From 6568957258e37b8178610741692b43ff96430507 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Tue, 10 Dec 2024 21:03:11 +0000 Subject: [PATCH 1/2] fix: Add compatibility for PHP 8.4 docs: Add documentation for logger client option PiperOrigin-RevId: 704769822 Source-Link: https://github.com/googleapis/googleapis/commit/68e77625374a91c46fe47980209fedd108c756e8 Source-Link: https://github.com/googleapis/googleapis-gen/commit/724f6fc2efd4597d2e1c14709a0686ae070280ea Copy-Tag: eyJwIjoiTWFuYWdlZElkZW50aXRpZXMvLk93bEJvdC55YW1sIiwiaCI6IjcyNGY2ZmMyZWZkNDU5N2QyZTFjMTQ3MDlhMDY4NmFlMDcwMjgwZWEifQ== Copy-Tag: eyJwIjoiTWFuYWdlZEthZmthLy5Pd2xCb3QueWFtbCIsImgiOiI3MjRmNmZjMmVmZDQ1OTdkMmUxYzE0NzA5YTA2ODZhZTA3MDI4MGVhIn0= Copy-Tag: eyJwIjoiTWFwc0ZsZWV0RW5naW5lRGVsaXZlcnkvLk93bEJvdC55YW1sIiwiaCI6IjcyNGY2ZmMyZWZkNDU5N2QyZTFjMTQ3MDlhMDY4NmFlMDcwMjgwZWEifQ== Copy-Tag: eyJwIjoiTWFwc1JvdXRlT3B0aW1pemF0aW9uLy5Pd2xCb3QueWFtbCIsImgiOiI3MjRmNmZjMmVmZDQ1OTdkMmUxYzE0NzA5YTA2ODZhZTA3MDI4MGVhIn0= Copy-Tag: eyJwIjoiTWVkaWFUcmFuc2xhdGlvbi8uT3dsQm90LnlhbWwiLCJoIjoiNzI0ZjZmYzJlZmQ0NTk3ZDJlMWMxNDcwOWEwNjg2YWUwNzAyODBlYSJ9 Copy-Tag: eyJwIjoiTWVtY2FjaGUvLk93bEJvdC55YW1sIiwiaCI6IjcyNGY2ZmMyZWZkNDU5N2QyZTFjMTQ3MDlhMDY4NmFlMDcwMjgwZWEifQ== Copy-Tag: eyJwIjoiTWlncmF0aW9uQ2VudGVyLy5Pd2xCb3QueWFtbCIsImgiOiI3MjRmNmZjMmVmZDQ1OTdkMmUxYzE0NzA5YTA2ODZhZTA3MDI4MGVhIn0= Copy-Tag: eyJwIjoiTW9uaXRvcmluZy8uT3dsQm90LnlhbWwiLCJoIjoiNzI0ZjZmYzJlZmQ0NTk3ZDJlMWMxNDcwOWEwNjg2YWUwNzAyODBlYSJ9 Copy-Tag: eyJwIjoiTmV0QXBwLy5Pd2xCb3QueWFtbCIsImgiOiI3MjRmNmZjMmVmZDQ1OTdkMmUxYzE0NzA5YTA2ODZhZTA3MDI4MGVhIn0= Copy-Tag: eyJwIjoiTmV0d29ya0Nvbm5lY3Rpdml0eS8uT3dsQm90LnlhbWwiLCJoIjoiNzI0ZjZmYzJlZmQ0NTk3ZDJlMWMxNDcwOWEwNjg2YWUwNzAyODBlYSJ9 Copy-Tag: eyJwIjoiTmV0d29ya01hbmFnZW1lbnQvLk93bEJvdC55YW1sIiwiaCI6IjcyNGY2ZmMyZWZkNDU5N2QyZTFjMTQ3MDlhMDY4NmFlMDcwMjgwZWEifQ== Copy-Tag: eyJwIjoiTmV0d29ya1NlY3VyaXR5Ly5Pd2xCb3QueWFtbCIsImgiOiI3MjRmNmZjMmVmZDQ1OTdkMmUxYzE0NzA5YTA2ODZhZTA3MDI4MGVhIn0= Copy-Tag: eyJwIjoiTmV0d29ya1NlcnZpY2VzLy5Pd2xCb3QueWFtbCIsImgiOiI3MjRmNmZjMmVmZDQ1OTdkMmUxYzE0NzA5YTA2ODZhZTA3MDI4MGVhIn0= Copy-Tag: eyJwIjoiTm90ZWJvb2tzLy5Pd2xCb3QueWFtbCIsImgiOiI3MjRmNmZjMmVmZDQ1OTdkMmUxYzE0NzA5YTA2ODZhZTA3MDI4MGVhIn0= Copy-Tag: eyJwIjoiT3B0aW1pemF0aW9uLy5Pd2xCb3QueWFtbCIsImgiOiI3MjRmNmZjMmVmZDQ1OTdkMmUxYzE0NzA5YTA2ODZhZTA3MDI4MGVhIn0= Copy-Tag: eyJwIjoiT3JhY2xlRGF0YWJhc2UvLk93bEJvdC55YW1sIiwiaCI6IjcyNGY2ZmMyZWZkNDU5N2QyZTFjMTQ3MDlhMDY4NmFlMDcwMjgwZWEifQ== Copy-Tag: eyJwIjoiT3JjaGVzdHJhdGlvbkFpcmZsb3cvLk93bEJvdC55YW1sIiwiaCI6IjcyNGY2ZmMyZWZkNDU5N2QyZTFjMTQ3MDlhMDY4NmFlMDcwMjgwZWEifQ== Copy-Tag: eyJwIjoiT3JnUG9saWN5Ly5Pd2xCb3QueWFtbCIsImgiOiI3MjRmNmZjMmVmZDQ1OTdkMmUxYzE0NzA5YTA2ODZhZTA3MDI4MGVhIn0= Copy-Tag: eyJwIjoiT3NDb25maWcvLk93bEJvdC55YW1sIiwiaCI6IjcyNGY2ZmMyZWZkNDU5N2QyZTFjMTQ3MDlhMDY4NmFlMDcwMjgwZWEifQ== Copy-Tag: eyJwIjoiT3NMb2dpbi8uT3dsQm90LnlhbWwiLCJoIjoiNzI0ZjZmYzJlZmQ0NTk3ZDJlMWMxNDcwOWEwNjg2YWUwNzAyODBlYSJ9 --- .../V1/ManagedIdentitiesService.php | 117 + .../Cloud/Managedidentities/V1/Resource.php | Bin 0 -> 2818 bytes .../V1/AttachTrustRequest.php | 133 + .../V1/CreateMicrosoftAdDomainRequest.php | 220 + .../V1/DeleteDomainRequest.php | 87 + .../V1/DetachTrustRequest.php | 133 + .../Cloud/ManagedIdentities/V1/Domain.php | 525 ++ .../ManagedIdentities/V1/Domain/State.php | 100 + .../ManagedIdentities/V1/GetDomainRequest.php | 86 + .../V1/ListDomainsRequest.php | 263 + .../V1/ListDomainsResponse.php | 140 + .../Cloud/ManagedIdentities/V1/OpMetadata.php | 269 + .../V1/ReconfigureTrustRequest.php | 169 + .../V1/ResetAdminPasswordRequest.php | 87 + .../V1/ResetAdminPasswordResponse.php | 68 + .../Cloud/ManagedIdentities/V1/Trust.php | 462 ++ .../ManagedIdentities/V1/Trust/State.php | 85 + .../V1/Trust/TrustDirection.php | 74 + .../ManagedIdentities/V1/Trust/TrustType.php | 64 + .../V1/UpdateDomainRequest.php | 167 + .../V1/ValidateTrustRequest.php | 133 + .../attach_trust.php | 122 + .../create_microsoft_ad_domain.php | 129 + .../delete_domain.php | 81 + .../detach_trust.php | 122 + .../get_domain.php | 72 + .../list_domains.php | 77 + .../reconfigure_trust.php | 96 + .../reset_admin_password.php | 72 + .../update_domain.php | 105 + .../validate_trust.php | 123 + .../Client/ManagedIdentitiesServiceClient.php | 607 ++ .../v1/src/V1/gapic_metadata.json | 68 + ...aged_identities_service_client_config.json | 82 + ...d_identities_service_descriptor_config.php | 210 + ..._identities_service_rest_client_config.php | 295 + .../ManagedIdentitiesServiceClientTest.php | 1417 ++++ .../Cloud/Managedkafka/V1/ManagedKafka.php | 125 + .../Cloud/Managedkafka/V1/Resources.php | Bin 0 -> 3894 bytes .../Cloud/ManagedKafka/V1/AccessConfig.php | 75 + .../Cloud/ManagedKafka/V1/CapacityConfig.php | 109 + .../Google/Cloud/ManagedKafka/V1/Cluster.php | 448 ++ .../Cloud/ManagedKafka/V1/Cluster/State.php | 71 + .../Cloud/ManagedKafka/V1/ConsumerGroup.php | 117 + .../V1/ConsumerPartitionMetadata.php | 109 + .../ManagedKafka/V1/ConsumerTopicMetadata.php | 71 + .../ManagedKafka/V1/CreateClusterRequest.php | 272 + .../ManagedKafka/V1/CreateTopicRequest.php | 189 + .../ManagedKafka/V1/DeleteClusterRequest.php | 159 + .../V1/DeleteConsumerGroupRequest.php | 86 + .../ManagedKafka/V1/DeleteTopicRequest.php | 86 + .../Cloud/ManagedKafka/V1/GcpConfig.php | 124 + .../ManagedKafka/V1/GetClusterRequest.php | 81 + .../V1/GetConsumerGroupRequest.php | 86 + .../Cloud/ManagedKafka/V1/GetTopicRequest.php | 91 + .../ManagedKafka/V1/ListClustersRequest.php | 242 + .../ManagedKafka/V1/ListClustersResponse.php | 139 + .../V1/ListConsumerGroupsRequest.php | 179 + .../V1/ListConsumerGroupsResponse.php | 109 + .../ManagedKafka/V1/ListTopicsRequest.php | 174 + .../ManagedKafka/V1/ListTopicsResponse.php | 109 + .../Cloud/ManagedKafka/V1/NetworkConfig.php | 96 + .../ManagedKafka/V1/OperationMetadata.php | 307 + .../Cloud/ManagedKafka/V1/RebalanceConfig.php | 71 + .../ManagedKafka/V1/RebalanceConfig/Mode.php | 65 + .../Google/Cloud/ManagedKafka/V1/Topic.php | 201 + .../ManagedKafka/V1/UpdateClusterRequest.php | 234 + .../V1/UpdateConsumerGroupRequest.php | 156 + .../ManagedKafka/V1/UpdateTopicRequest.php | 156 + .../V1/ManagedKafkaClient/create_cluster.php | 138 + .../V1/ManagedKafkaClient/create_topic.php | 95 + .../V1/ManagedKafkaClient/delete_cluster.php | 80 + .../delete_consumer_group.php | 75 + .../V1/ManagedKafkaClient/delete_topic.php | 70 + .../V1/ManagedKafkaClient/get_cluster.php | 71 + .../ManagedKafkaClient/get_consumer_group.php | 77 + .../V1/ManagedKafkaClient/get_location.php | 57 + .../V1/ManagedKafkaClient/get_topic.php | 73 + .../V1/ManagedKafkaClient/list_clusters.php | 77 + .../list_consumer_groups.php | 78 + .../V1/ManagedKafkaClient/list_locations.php | 62 + .../V1/ManagedKafkaClient/list_topics.php | 77 + .../V1/ManagedKafkaClient/update_cluster.php | 124 + .../update_consumer_group.php | 62 + .../V1/ManagedKafkaClient/update_topic.php | 82 + .../v1/src/V1/Client/ManagedKafkaClient.php | 802 ++ .../v1/src/V1/gapic_metadata.json | 98 + .../managed_kafka_client_config.json | 124 + .../managed_kafka_descriptor_config.php | 285 + .../managed_kafka_rest_client_config.php | 277 + .../Unit/V1/Client/ManagedKafkaClientTest.php | 1526 ++++ .../Maps/Fleetengine/Delivery/V1/Common.php | Bin 0 -> 3682 bytes .../Fleetengine/Delivery/V1/DeliveryApi.php | 123 + .../Delivery/V1/DeliveryVehicles.php | Bin 0 -> 3115 bytes .../Maps/Fleetengine/Delivery/V1/Header.php | Bin 0 -> 1535 bytes .../Delivery/V1/TaskTrackingInfo.php | 53 + .../Maps/Fleetengine/Delivery/V1/Tasks.php | Bin 0 -> 4076 bytes .../Delivery/V1/BatchCreateTasksRequest.php | 177 + .../Delivery/V1/BatchCreateTasksResponse.php | 67 + .../V1/CreateDeliveryVehicleRequest.php | 279 + .../Delivery/V1/CreateTaskRequest.php | 304 + .../Delivery/V1/DeliveryRequestHeader.php | 493 ++ .../V1/DeliveryRequestHeader/Platform.php | 71 + .../V1/DeliveryRequestHeader/SdkType.php | 71 + .../Delivery/V1/DeliveryVehicle.php | 671 ++ .../DeliveryVehicle/DeliveryVehicleType.php | 79 + .../Delivery/V1/DeliveryVehicleAttribute.php | 225 + .../Delivery/V1/DeliveryVehicleLocation.php | 1789 +++++ .../V1/DeliveryVehicleLocationSensor.php | 110 + .../V1/DeliveryVehicleNavigationStatus.php | 76 + .../Delivery/V1/GetDeliveryVehicleRequest.php | 140 + .../Delivery/V1/GetTaskRequest.php | 135 + .../V1/GetTaskTrackingInfoRequest.php | 145 + .../V1/ListDeliveryVehiclesRequest.php | 365 + .../V1/ListDeliveryVehiclesResponse.php | 159 + .../Delivery/V1/ListTasksRequest.php | 273 + .../Delivery/V1/ListTasksResponse.php | 160 + .../FleetEngine/Delivery/V1/LocationInfo.php | 77 + .../Maps/FleetEngine/Delivery/V1/Task.php | 720 ++ .../Delivery/V1/Task/JourneySharingInfo.php | 216 + .../FleetEngine/Delivery/V1/Task/State.php | 65 + .../Delivery/V1/Task/TaskOutcome.php | 65 + .../V1/Task/TaskOutcomeLocationSource.php | 65 + .../FleetEngine/Delivery/V1/Task/Type.php | 87 + .../FleetEngine/Delivery/V1/TaskAttribute.php | 176 + .../Delivery/V1/TaskTrackingInfo.php | 698 ++ .../Delivery/V1/TaskTrackingViewConfig.php | 346 + .../VisibilityOption.php | 229 + .../FleetEngine/Delivery/V1/TimeWindow.php | 121 + .../V1/UpdateDeliveryVehicleRequest.php | 201 + .../Delivery/V1/UpdateTaskRequest.php | 259 + .../Delivery/V1/VehicleJourneySegment.php | 352 + .../FleetEngine/Delivery/V1/VehicleStop.php | 161 + .../Delivery/V1/VehicleStop/State.php | 76 + .../Delivery/V1/VehicleStop/TaskInfo.php | 190 + .../batch_create_tasks.php | 122 + .../create_delivery_vehicle.php | 84 + .../V1/DeliveryServiceClient/create_task.php | 98 + .../get_delivery_vehicle.php | 74 + .../V1/DeliveryServiceClient/get_task.php | 73 + .../get_task_tracking_info.php | 75 + .../list_delivery_vehicles.php | 78 + .../V1/DeliveryServiceClient/list_tasks.php | 78 + .../update_delivery_vehicle.php | 68 + .../V1/DeliveryServiceClient/update_task.php | 84 + .../src/V1/Client/DeliveryServiceClient.php | 557 ++ .../v1/src/V1/gapic_metadata.json | 68 + .../delivery_service_client_config.json | 84 + .../delivery_service_descriptor_config.php | 202 + .../delivery_service_rest_client_config.php | 158 + .../V1/Client/DeliveryServiceClientTest.php | 855 ++ .../V1/RouteOptimizationService.php | Bin 0 -> 17393 bytes .../V1/AggregatedMetrics.php | 454 ++ .../V1/BatchOptimizeToursMetadata.php | 33 + .../V1/BatchOptimizeToursRequest.php | 125 + .../AsyncModelConfig.php | 162 + .../V1/BatchOptimizeToursResponse.php | 34 + .../Maps/RouteOptimization/V1/BreakRule.php | 113 + .../V1/BreakRule/BreakRequest.php | 172 + .../V1/BreakRule/FrequencyConstraint.php | 166 + .../Maps/RouteOptimization/V1/DataFormat.php | 62 + .../RouteOptimization/V1/DistanceLimit.php | 284 + .../RouteOptimization/V1/GcsDestination.php | 68 + .../Maps/RouteOptimization/V1/GcsSource.php | 71 + .../V1/InjectedSolutionConstraint.php | 156 + .../ConstraintRelaxation.php | 151 + .../ConstraintRelaxation/Relaxation.php | 204 + .../ConstraintRelaxation/Relaxation/Level.php | 83 + .../Maps/RouteOptimization/V1/InputConfig.php | 110 + .../Maps/RouteOptimization/V1/Location.php | 133 + .../V1/OptimizeToursRequest.php | 1178 +++ .../V1/OptimizeToursRequest/SearchMode.php | 65 + .../V1/OptimizeToursRequest/SolvingMode.php | 84 + .../V1/OptimizeToursResponse.php | 243 + .../V1/OptimizeToursResponse/Metrics.php | 372 + .../V1/OptimizeToursValidationError.php | 316 + .../FieldReference.php | 197 + .../RouteOptimization/V1/OutputConfig.php | 111 + .../RouteOptimization/V1/RouteModifiers.php | 204 + .../Maps/RouteOptimization/V1/Shipment.php | 841 ++ .../RouteOptimization/V1/Shipment/Load.php | 81 + .../V1/Shipment/VisitRequest.php | 615 ++ .../RouteOptimization/V1/ShipmentModel.php | 1010 +++ .../ShipmentModel/DurationDistanceMatrix.php | 137 + .../DurationDistanceMatrix/Row.php | 116 + .../V1/ShipmentModel/PrecedenceRule.php | 243 + .../RouteOptimization/V1/ShipmentRoute.php | 706 ++ .../V1/ShipmentRoute/EncodedPolyline.php | 73 + .../V1/ShipmentRoute/PBBreak.php | 124 + .../V1/ShipmentRoute/Transition.php | 639 ++ .../V1/ShipmentRoute/VehicleLoad.php | 80 + .../V1/ShipmentRoute/Visit.php | 433 ++ .../V1/ShipmentTypeIncompatibility.php | 107 + .../IncompatibilityMode.php | 72 + .../V1/ShipmentTypeRequirement.php | 156 + .../RequirementMode.php | 80 + .../RouteOptimization/V1/SkippedShipment.php | 157 + .../V1/SkippedShipment/Reason.php | 181 + .../V1/SkippedShipment/Reason/Code.php | 115 + .../Maps/RouteOptimization/V1/TimeWindow.php | 389 + .../V1/TransitionAttributes.php | 412 + .../Maps/RouteOptimization/V1/Vehicle.php | 1423 ++++ .../V1/Vehicle/DurationLimit.php | 359 + .../V1/Vehicle/LoadLimit.php | 270 + .../V1/Vehicle/LoadLimit/Interval.php | 150 + .../V1/Vehicle/TravelMode.php | 67 + .../V1/Vehicle/UnloadingPolicy.php | 68 + .../Maps/RouteOptimization/V1/Waypoint.php | 166 + .../batch_optimize_tours.php | 133 + .../optimize_tours.php | 89 + .../src/V1/Client/RouteOptimizationClient.php | 327 + .../v1/src/V1/gapic_metadata.json | 28 + .../route_optimization_client_config.json | 44 + .../route_optimization_descriptor_config.php | 59 + .../route_optimization_rest_client_config.php | 80 + .../V1/Client/RouteOptimizationClientTest.php | 327 + .../V1Beta1/MediaTranslation.php | Bin 0 -> 2626 bytes .../StreamingTranslateSpeechConfig.php | 159 + .../StreamingTranslateSpeechRequest.php | 139 + .../StreamingTranslateSpeechResponse.php | 164 + .../SpeechEventType.php | 66 + .../StreamingTranslateSpeechResult.php | 76 + .../TextTranslationResult.php | 124 + .../V1beta1/TranslateSpeechConfig.php | 308 + .../streaming_translate_speech.php | 64 + .../Client/SpeechTranslationServiceClient.php | 181 + .../SpeechTranslationServiceGapicClient.php | 258 + .../SpeechTranslationServiceClient.php | 36 + .../v1beta1/src/V1beta1/gapic_metadata.json | 23 + ...ech_translation_service_client_config.json | 49 + ..._translation_service_descriptor_config.php | 35 + ...translation_service_rest_client_config.php | 26 + .../SpeechTranslationServiceClientTest.php | 151 + .../SpeechTranslationServiceClientTest.php | 151 + .../Cloud/Memcache/V1/CloudMemcache.php | Bin 0 -> 8216 bytes .../Memcache/V1/ApplyParametersRequest.php | 168 + .../Memcache/V1/CreateInstanceRequest.php | 210 + .../Memcache/V1/DeleteInstanceRequest.php | 91 + .../Cloud/Memcache/V1/GetInstanceRequest.php | 91 + .../src/Google/Cloud/Memcache/V1/Instance.php | 809 ++ .../Memcache/V1/Instance/InstanceMessage.php | 102 + .../V1/Instance/InstanceMessage/Code.php | 55 + .../Cloud/Memcache/V1/Instance/Node.php | 256 + .../Cloud/Memcache/V1/Instance/Node/State.php | 78 + .../Cloud/Memcache/V1/Instance/NodeConfig.php | 104 + .../Cloud/Memcache/V1/Instance/State.php | 86 + .../Memcache/V1/ListInstancesRequest.php | 251 + .../Memcache/V1/ListInstancesResponse.php | 151 + .../Cloud/Memcache/V1/LocationMetadata.php | 75 + .../Cloud/Memcache/V1/MaintenancePolicy.php | 201 + .../Cloud/Memcache/V1/MaintenanceSchedule.php | 169 + .../Cloud/Memcache/V1/MemcacheParameters.php | 115 + .../Cloud/Memcache/V1/MemcacheVersion.php | 52 + .../Cloud/Memcache/V1/OperationMetadata.php | 303 + .../V1/RescheduleMaintenanceRequest.php | 184 + .../RescheduleType.php | 72 + .../Memcache/V1/UpdateInstanceRequest.php | 147 + .../Memcache/V1/UpdateParametersRequest.php | 178 + .../Memcache/V1/WeeklyMaintenanceWindow.php | 155 + .../Google/Cloud/Memcache/V1/ZoneMetadata.php | 31 + .../CloudMemcacheClient/apply_parameters.php | 85 + .../CloudMemcacheClient/create_instance.php | 134 + .../CloudMemcacheClient/delete_instance.php | 82 + .../V1/CloudMemcacheClient/get_instance.php | 73 + .../V1/CloudMemcacheClient/get_location.php | 57 + .../V1/CloudMemcacheClient/list_instances.php | 78 + .../V1/CloudMemcacheClient/list_locations.php | 62 + .../reschedule_maintenance.php | 89 + .../CloudMemcacheClient/update_instance.php | 115 + .../CloudMemcacheClient/update_parameters.php | 90 + .../v1/src/V1/Client/CloudMemcacheClient.php | 587 ++ .../Memcache/v1/src/V1/gapic_metadata.json | 68 + .../cloud_memcache_client_config.json | 82 + .../cloud_memcache_descriptor_config.php | 213 + .../cloud_memcache_rest_client_config.php | 200 + .../V1/Client/CloudMemcacheClientTest.php | 1284 +++ .../Migrationcenter/V1/Migrationcenter.php | Bin 0 -> 48680 bytes .../V1/AddAssetsToGroupRequest.php | 257 + .../V1/AggregateAssetsValuesRequest.php | 139 + .../V1/AggregateAssetsValuesResponse.php | 67 + .../Cloud/MigrationCenter/V1/Aggregation.php | 209 + .../MigrationCenter/V1/Aggregation/Count.php | 36 + .../V1/Aggregation/Frequency.php | 36 + .../V1/Aggregation/Histogram.php | 102 + .../MigrationCenter/V1/Aggregation/Sum.php | 36 + .../MigrationCenter/V1/AggregationResult.php | 181 + .../V1/AggregationResult/Count.php | 63 + .../V1/AggregationResult/Frequency.php | 63 + .../V1/AggregationResult/Histogram.php | 86 + .../V1/AggregationResult/Histogram/Bucket.php | 141 + .../V1/AggregationResult/Sum.php | 63 + .../Google/Cloud/MigrationCenter/V1/Asset.php | 425 + .../Cloud/MigrationCenter/V1/AssetFrame.php | 263 + .../Cloud/MigrationCenter/V1/AssetList.php | 67 + .../V1/AssetPerformanceData.php | 75 + .../Cloud/MigrationCenter/V1/AssetView.php | 63 + .../V1/AwsEc2PlatformDetails.php | 101 + .../V1/AzureVmPlatformDetails.php | 135 + .../V1/BatchDeleteAssetsRequest.php | 170 + .../V1/BatchUpdateAssetsRequest.php | 122 + .../V1/BatchUpdateAssetsResponse.php | 71 + .../Cloud/MigrationCenter/V1/BiosDetails.php | 256 + .../MigrationCenter/V1/CommitmentPlan.php | 68 + .../V1/ComputeEngineMigrationTarget.php | 77 + .../V1/ComputeEnginePreferences.php | 119 + .../V1/ComputeEngineShapeDescriptor.php | 237 + .../V1/ComputeMigrationTargetProduct.php | 68 + .../V1/ComputeStorageDescriptor.php | 101 + .../MigrationCenter/V1/CpuUsageSample.php | 71 + .../MigrationCenter/V1/CreateGroupRequest.php | 257 + .../V1/CreateImportDataFileRequest.php | 237 + .../V1/CreateImportJobRequest.php | 237 + .../V1/CreatePreferenceSetRequest.php | 262 + .../V1/CreateReportConfigRequest.php | 257 + .../V1/CreateReportRequest.php | 257 + .../V1/CreateSourceRequest.php | 257 + .../V1/DailyResourceUsageAggregation.php | 253 + .../V1/DailyResourceUsageAggregation/CPU.php | 80 + .../V1/DailyResourceUsageAggregation/Disk.php | 80 + .../DailyResourceUsageAggregation/Memory.php | 80 + .../DailyResourceUsageAggregation/Network.php | 124 + .../DailyResourceUsageAggregation/Stats.php | 172 + .../MigrationCenter/V1/DeleteAssetRequest.php | 155 + .../MigrationCenter/V1/DeleteGroupRequest.php | 155 + .../V1/DeleteImportDataFileRequest.php | 155 + .../V1/DeleteImportJobRequest.php | 197 + .../V1/DeletePreferenceSetRequest.php | 155 + .../V1/DeleteReportConfigRequest.php | 197 + .../V1/DeleteReportRequest.php | 155 + .../V1/DeleteSourceRequest.php | 155 + .../Cloud/MigrationCenter/V1/DiskEntry.php | 323 + .../V1/DiskEntry/InterfaceType.php | 99 + .../MigrationCenter/V1/DiskEntryList.php | 67 + .../MigrationCenter/V1/DiskPartition.php | 281 + .../MigrationCenter/V1/DiskPartitionList.php | 67 + .../MigrationCenter/V1/DiskUsageSample.php | 67 + .../Cloud/MigrationCenter/V1/ErrorFrame.php | 189 + .../MigrationCenter/V1/ErrorFrameView.php | 62 + .../MigrationCenter/V1/ExecutionReport.php | 145 + .../V1/FileValidationReport.php | 173 + .../MigrationCenter/V1/FitDescriptor.php | 67 + .../V1/FitDescriptor/FitLevel.php | 71 + .../V1/FrameViolationEntry.php | 102 + .../Cloud/MigrationCenter/V1/Frames.php | 67 + .../Cloud/MigrationCenter/V1/FstabEntry.php | 241 + .../MigrationCenter/V1/FstabEntryList.php | 67 + .../MigrationCenter/V1/GenericInsight.php | 155 + .../V1/GenericPlatformDetails.php | 75 + .../MigrationCenter/V1/GetAssetRequest.php | 115 + .../V1/GetErrorFrameRequest.php | 127 + .../MigrationCenter/V1/GetGroupRequest.php | 81 + .../V1/GetImportDataFileRequest.php | 81 + .../V1/GetImportJobRequest.php | 119 + .../V1/GetPreferenceSetRequest.php | 81 + .../V1/GetReportConfigRequest.php | 81 + .../MigrationCenter/V1/GetReportRequest.php | 115 + .../MigrationCenter/V1/GetSettingsRequest.php | 81 + .../MigrationCenter/V1/GetSourceRequest.php | 81 + .../Google/Cloud/MigrationCenter/V1/Group.php | 260 + .../MigrationCenter/V1/GuestConfigDetails.php | 233 + .../V1/GuestConfigDetails/SeLinuxMode.php | 71 + .../V1/GuestInstalledApplication.php | 213 + .../V1/GuestInstalledApplicationList.php | 67 + .../MigrationCenter/V1/GuestOsDetails.php | 223 + .../V1/GuestRuntimeDetails.php | 365 + .../Cloud/MigrationCenter/V1/HostsEntry.php | 101 + .../MigrationCenter/V1/HostsEntryList.php | 67 + .../MigrationCenter/V1/ImportDataFile.php | 255 + .../V1/ImportDataFile/State.php | 64 + .../Cloud/MigrationCenter/V1/ImportError.php | 102 + .../V1/ImportError/Severity.php | 63 + .../Cloud/MigrationCenter/V1/ImportJob.php | 410 + .../V1/ImportJob/ImportJobState.php | 99 + .../MigrationCenter/V1/ImportJobFormat.php | 88 + .../MigrationCenter/V1/ImportJobView.php | 64 + .../MigrationCenter/V1/ImportRowError.php | 174 + .../Cloud/MigrationCenter/V1/Insight.php | 108 + .../Cloud/MigrationCenter/V1/InsightList.php | 111 + .../Cloud/MigrationCenter/V1/LicenseType.php | 63 + .../MigrationCenter/V1/ListAssetsRequest.php | 255 + .../MigrationCenter/V1/ListAssetsResponse.php | 135 + .../V1/ListErrorFramesRequest.php | 191 + .../V1/ListErrorFramesResponse.php | 135 + .../MigrationCenter/V1/ListGroupsRequest.php | 221 + .../MigrationCenter/V1/ListGroupsResponse.php | 135 + .../V1/ListImportDataFilesRequest.php | 241 + .../V1/ListImportDataFilesResponse.php | 139 + .../V1/ListImportJobsRequest.php | 259 + .../V1/ListImportJobsResponse.php | 135 + .../V1/ListPreferenceSetsRequest.php | 191 + .../V1/ListPreferenceSetsResponse.php | 135 + .../V1/ListReportConfigsRequest.php | 221 + .../V1/ListReportConfigsResponse.php | 135 + .../MigrationCenter/V1/ListReportsRequest.php | 255 + .../V1/ListReportsResponse.php | 135 + .../MigrationCenter/V1/ListSourcesRequest.php | 221 + .../V1/ListSourcesResponse.php | 135 + .../V1/MachineArchitectureDetails.php | 315 + .../CpuHyperThreading.php | 64 + .../FirmwareType.php | 64 + .../MigrationCenter/V1/MachineDetails.php | 467 ++ .../V1/MachineDetails/PowerState.php | 94 + .../MigrationCenter/V1/MachineDiskDetails.php | 145 + .../V1/MachineNetworkDetails.php | 183 + .../MigrationCenter/V1/MachinePreferences.php | 73 + .../MigrationCenter/V1/MachineSeries.php | 75 + .../MigrationCenter/V1/MemoryUsageSample.php | 67 + .../MigrationCenter/V1/MigrationInsight.php | 123 + .../V1/NetworkAdapterDetails.php | 145 + .../MigrationCenter/V1/NetworkAdapterList.php | 67 + .../MigrationCenter/V1/NetworkAddress.php | 203 + .../V1/NetworkAddress/AddressAssignment.php | 64 + .../MigrationCenter/V1/NetworkAddressList.php | 67 + .../MigrationCenter/V1/NetworkConnection.php | 303 + .../V1/NetworkConnection/State.php | 85 + .../V1/NetworkConnectionList.php | 67 + .../MigrationCenter/V1/NetworkUsageSample.php | 109 + .../Cloud/MigrationCenter/V1/NfsExport.php | 101 + .../MigrationCenter/V1/NfsExportList.php | 67 + .../MigrationCenter/V1/OpenFileDetails.php | 169 + .../Cloud/MigrationCenter/V1/OpenFileList.php | 67 + .../V1/OperatingSystemFamily.php | 66 + .../MigrationCenter/V1/OperationMetadata.php | 307 + .../MigrationCenter/V1/PerformanceSample.php | 257 + .../MigrationCenter/V1/PersistentDiskType.php | 70 + .../V1/PhysicalPlatformDetails.php | 75 + .../MigrationCenter/V1/PlatformDetails.php | 207 + .../MigrationCenter/V1/PreferenceSet.php | 267 + .../MigrationCenter/V1/RegionPreferences.php | 83 + .../V1/RemoveAssetsFromGroupRequest.php | 253 + .../Cloud/MigrationCenter/V1/Report.php | 335 + .../Cloud/MigrationCenter/V1/Report/State.php | 71 + .../Cloud/MigrationCenter/V1/Report/Type.php | 57 + .../V1/ReportAssetFramesRequest.php | 145 + .../V1/ReportAssetFramesResponse.php | 33 + .../Cloud/MigrationCenter/V1/ReportConfig.php | 258 + .../GroupPreferenceSetAssignment.php | 104 + .../MigrationCenter/V1/ReportSummary.php | 112 + .../V1/ReportSummary/AssetAggregateStats.php | 436 ++ .../V1/ReportSummary/ChartData.php | 78 + .../V1/ReportSummary/ChartData/DataPoint.php | 104 + .../V1/ReportSummary/ComputeEngineFinding.php | 172 + .../V1/ReportSummary/GroupFinding.php | 221 + .../GroupPreferenceSetFinding.php | 544 ++ .../V1/ReportSummary/HistogramChartData.php | 87 + .../HistogramChartData/Bucket.php | 141 + .../ReportSummary/MachineSeriesAllocation.php | 115 + .../V1/ReportSummary/SoleTenantFinding.php | 138 + .../SoleTenantNodeAllocation.php | 148 + .../V1/ReportSummary/UtilizationChartData.php | 105 + .../V1/ReportSummary/VmwareEngineFinding.php | 138 + .../V1/ReportSummary/VmwareNode.php | 78 + .../V1/ReportSummary/VmwareNodeAllocation.php | 148 + .../Cloud/MigrationCenter/V1/ReportView.php | 73 + .../V1/RunImportJobRequest.php | 155 + .../MigrationCenter/V1/RunningProcess.php | 203 + .../MigrationCenter/V1/RunningProcessList.php | 67 + .../MigrationCenter/V1/RunningService.php | 237 + .../V1/RunningService/StartMode.php | 85 + .../V1/RunningService/State.php | 71 + .../MigrationCenter/V1/RunningServiceList.php | 67 + .../MigrationCenter/V1/RuntimeNetworkInfo.php | 121 + .../Cloud/MigrationCenter/V1/Settings.php | 101 + .../V1/SizingOptimizationStrategy.php | 74 + .../V1/SoleTenancyPreferences.php | 189 + .../SoleTenancyPreferences/CommitmentPlan.php | 71 + .../HostMaintenancePolicy.php | 71 + .../MigrationCenter/V1/SoleTenantNodeType.php | 71 + .../Cloud/MigrationCenter/V1/Source.php | 436 ++ .../MigrationCenter/V1/Source/SourceType.php | 76 + .../Cloud/MigrationCenter/V1/Source/State.php | 72 + .../MigrationCenter/V1/UpdateAssetRequest.php | 235 + .../MigrationCenter/V1/UpdateGroupRequest.php | 230 + .../V1/UpdateImportJobRequest.php | 235 + .../V1/UpdatePreferenceSetRequest.php | 235 + .../V1/UpdateSettingsRequest.php | 235 + .../V1/UpdateSourceRequest.php | 235 + .../MigrationCenter/V1/UploadFileInfo.php | 145 + .../V1/ValidateImportJobRequest.php | 155 + .../MigrationCenter/V1/ValidationReport.php | 101 + .../V1/VirtualMachinePreferences.php | 366 + .../MigrationCenter/V1/VmwareDiskConfig.php | 169 + .../V1/VmwareDiskConfig/BackingType.php | 106 + .../V1/VmwareDiskConfig/RdmCompatibility.php | 64 + .../V1/VmwareDiskConfig/VmdkMode.php | 71 + .../V1/VmwareEnginePreferences.php | 217 + .../CommitmentPlan.php | 85 + .../V1/VmwarePlatformDetails.php | 241 + .../add_assets_to_group.php | 97 + .../aggregate_assets_values.php | 70 + .../batch_delete_assets.php | 76 + .../batch_update_assets.php | 81 + .../V1/MigrationCenterClient/create_group.php | 92 + .../create_import_data_file.php | 95 + .../create_import_job.php | 99 + .../create_preference_set.php | 93 + .../MigrationCenterClient/create_report.php | 96 + .../create_report_config.php | 121 + .../MigrationCenterClient/create_source.php | 92 + .../V1/MigrationCenterClient/delete_asset.php | 69 + .../V1/MigrationCenterClient/delete_group.php | 80 + .../delete_import_data_file.php | 85 + .../delete_import_job.php | 80 + .../delete_preference_set.php | 84 + .../MigrationCenterClient/delete_report.php | 85 + .../delete_report_config.php | 84 + .../MigrationCenterClient/delete_source.php | 80 + .../V1/MigrationCenterClient/get_asset.php | 71 + .../MigrationCenterClient/get_error_frame.php | 78 + .../V1/MigrationCenterClient/get_group.php | 71 + .../get_import_data_file.php | 76 + .../MigrationCenterClient/get_import_job.php | 71 + .../V1/MigrationCenterClient/get_location.php | 57 + .../get_preference_set.php | 75 + .../V1/MigrationCenterClient/get_report.php | 76 + .../get_report_config.php | 75 + .../V1/MigrationCenterClient/get_settings.php | 71 + .../V1/MigrationCenterClient/get_source.php | 71 + .../V1/MigrationCenterClient/list_assets.php | 76 + .../list_error_frames.php | 76 + .../V1/MigrationCenterClient/list_groups.php | 76 + .../list_import_data_files.php | 76 + .../list_import_jobs.php | 76 + .../MigrationCenterClient/list_locations.php | 62 + .../list_preference_sets.php | 76 + .../list_report_configs.php | 76 + .../V1/MigrationCenterClient/list_reports.php | 80 + .../V1/MigrationCenterClient/list_sources.php | 76 + .../remove_assets_from_group.php | 97 + .../report_asset_frames.php | 74 + .../MigrationCenterClient/run_import_job.php | 80 + .../V1/MigrationCenterClient/update_asset.php | 62 + .../V1/MigrationCenterClient/update_group.php | 74 + .../update_import_job.php | 92 + .../update_preference_set.php | 74 + .../MigrationCenterClient/update_settings.php | 74 + .../MigrationCenterClient/update_source.php | 74 + .../validate_import_job.php | 80 + .../src/V1/Client/MigrationCenterClient.php | 1883 +++++ .../v1/src/V1/gapic_metadata.json | 268 + .../migration_center_client_config.json | 292 + .../migration_center_descriptor_config.php | 890 +++ .../migration_center_rest_client_config.php | 694 ++ .../V1/Client/MigrationCenterClientTest.php | 5105 ++++++++++++ .../Google/Monitoring/V3/Alert.php | Bin 0 -> 6219 bytes .../Google/Monitoring/V3/AlertService.php | 64 + .../Google/Monitoring/V3/Common.php | Bin 0 -> 2539 bytes .../Google/Monitoring/V3/DroppedLabels.php | 33 + .../Google/Monitoring/V3/Group.php | 37 + .../Google/Monitoring/V3/GroupService.php | Bin 0 -> 3723 bytes .../Google/Monitoring/V3/Metric.php | Bin 0 -> 2648 bytes .../Google/Monitoring/V3/MetricService.php | Bin 0 -> 7118 bytes .../Google/Monitoring/V3/MutationRecord.php | 32 + .../Google/Monitoring/V3/Notification.php | Bin 0 -> 2943 bytes .../Monitoring/V3/NotificationService.php | 97 + .../Google/Monitoring/V3/QueryService.php | 32 + .../Google/Monitoring/V3/Service.php | Bin 0 -> 5715 bytes .../Google/Monitoring/V3/ServiceService.php | 95 + .../Google/Monitoring/V3/Snooze.php | 39 + .../Google/Monitoring/V3/SnoozeService.php | 56 + .../Google/Monitoring/V3/SpanContext.php | 29 + .../Google/Monitoring/V3/Uptime.php | Bin 0 -> 6049 bytes .../Google/Monitoring/V3/UptimeService.php | 72 + .../Cloud/Monitoring/V3/Aggregation.php | 389 + .../Monitoring/V3/Aggregation/Aligner.php | 269 + .../Monitoring/V3/Aggregation/Reducer.php | 191 + .../Cloud/Monitoring/V3/AlertPolicy.php | 805 ++ .../V3/AlertPolicy/AlertStrategy.php | 217 + .../NotificationChannelStrategy.php | 139 + .../AlertStrategy/NotificationPrompt.php | 64 + .../AlertStrategy/NotificationRateLimit.php | 81 + .../Monitoring/V3/AlertPolicy/Condition.php | 373 + .../Condition/EvaluationMissingData.php | 76 + .../V3/AlertPolicy/Condition/LogMatch.php | 151 + .../AlertPolicy/Condition/MetricAbsence.php | 304 + .../AlertPolicy/Condition/MetricThreshold.php | 635 ++ .../MetricThreshold/ForecastOptions.php | 101 + .../MonitoringQueryLanguageCondition.php | 257 + .../PrometheusQueryLanguageCondition.php | 433 ++ .../V3/AlertPolicy/Condition/Trigger.php | 118 + .../V3/AlertPolicy/ConditionCombinerType.php | 81 + .../V3/AlertPolicy/Documentation.php | 245 + .../V3/AlertPolicy/Documentation/Link.php | 124 + .../Monitoring/V3/AlertPolicy/Severity.php | 75 + .../Google/Cloud/Monitoring/V3/BasicSli.php | 269 + .../V3/BasicSli/AvailabilityCriteria.php | 36 + .../V3/BasicSli/LatencyCriteria.php | 84 + .../Cloud/Monitoring/V3/ComparisonType.php | 90 + .../V3/CreateAlertPolicyRequest.php | 188 + .../Monitoring/V3/CreateGroupRequest.php | 181 + .../V3/CreateMetricDescriptorRequest.php | 151 + .../V3/CreateNotificationChannelRequest.php | 163 + .../V3/CreateServiceLevelObjectiveRequest.php | 185 + .../Monitoring/V3/CreateServiceRequest.php | 180 + .../Monitoring/V3/CreateSnoozeRequest.php | 149 + .../Monitoring/V3/CreateTimeSeriesError.php | 135 + .../Monitoring/V3/CreateTimeSeriesRequest.php | 159 + .../Monitoring/V3/CreateTimeSeriesSummary.php | 135 + .../V3/CreateTimeSeriesSummary/Error.php | 114 + .../V3/CreateUptimeCheckConfigRequest.php | 142 + .../V3/DeleteAlertPolicyRequest.php | 93 + .../Monitoring/V3/DeleteGroupRequest.php | 130 + .../V3/DeleteMetricDescriptorRequest.php | 103 + .../V3/DeleteNotificationChannelRequest.php | 138 + .../V3/DeleteServiceLevelObjectiveRequest.php | 92 + .../Monitoring/V3/DeleteServiceRequest.php | 87 + .../V3/DeleteUptimeCheckConfigRequest.php | 87 + .../Cloud/Monitoring/V3/DistributionCut.php | 127 + .../Cloud/Monitoring/V3/DroppedLabels.php | 80 + .../Monitoring/V3/GetAlertPolicyRequest.php | 87 + .../Cloud/Monitoring/V3/GetGroupRequest.php | 87 + .../V3/GetMetricDescriptorRequest.php | 103 + .../GetMonitoredResourceDescriptorRequest.php | 98 + ...etNotificationChannelDescriptorRequest.php | 87 + .../V3/GetNotificationChannelRequest.php | 87 + ...ficationChannelVerificationCodeRequest.php | 167 + ...icationChannelVerificationCodeResponse.php | 131 + .../V3/GetServiceLevelObjectiveRequest.php | 138 + .../Cloud/Monitoring/V3/GetServiceRequest.php | 87 + .../Cloud/Monitoring/V3/GetSnoozeRequest.php | 88 + .../V3/GetUptimeCheckConfigRequest.php | 87 + .../src/Google/Cloud/Monitoring/V3/Group.php | 257 + .../Cloud/Monitoring/V3/GroupResourceType.php | 66 + .../Cloud/Monitoring/V3/InternalChecker.php | 271 + .../Monitoring/V3/InternalChecker/State.php | 74 + .../Google/Cloud/Monitoring/V3/LabelValue.php | 141 + .../V3/ListAlertPoliciesRequest.php | 298 + .../V3/ListAlertPoliciesResponse.php | 147 + .../Monitoring/V3/ListGroupMembersRequest.php | 277 + .../V3/ListGroupMembersResponse.php | 143 + .../Cloud/Monitoring/V3/ListGroupsRequest.php | 316 + .../Monitoring/V3/ListGroupsResponse.php | 109 + .../V3/ListMetricDescriptorsRequest.php | 238 + .../V3/ListMetricDescriptorsResponse.php | 113 + ...istMonitoredResourceDescriptorsRequest.php | 222 + ...stMonitoredResourceDescriptorsResponse.php | 113 + ...tNotificationChannelDescriptorsRequest.php | 206 + ...NotificationChannelDescriptorsResponse.php | 117 + .../V3/ListNotificationChannelsRequest.php | 307 + .../V3/ListNotificationChannelsResponse.php | 151 + .../V3/ListServiceLevelObjectivesRequest.php | 257 + .../V3/ListServiceLevelObjectivesResponse.php | 109 + .../Monitoring/V3/ListServicesRequest.php | 275 + .../Monitoring/V3/ListServicesResponse.php | 109 + .../Monitoring/V3/ListSnoozesRequest.php | 252 + .../Monitoring/V3/ListSnoozesResponse.php | 106 + .../Monitoring/V3/ListTimeSeriesRequest.php | 501 ++ .../ListTimeSeriesRequest/TimeSeriesView.php | 59 + .../Monitoring/V3/ListTimeSeriesResponse.php | 201 + .../V3/ListUptimeCheckConfigsRequest.php | 230 + .../V3/ListUptimeCheckConfigsResponse.php | 155 + .../V3/ListUptimeCheckIpsRequest.php | 129 + .../V3/ListUptimeCheckIpsResponse.php | 125 + .../Cloud/Monitoring/V3/MutationRecord.php | 111 + .../Monitoring/V3/NotificationChannel.php | 594 ++ .../VerificationStatus.php | 76 + .../V3/NotificationChannelDescriptor.php | 326 + .../src/Google/Cloud/Monitoring/V3/Point.php | 153 + .../Google/Cloud/Monitoring/V3/QueryError.php | 115 + .../Cloud/Monitoring/V3/QueryErrorList.php | 105 + .../Monitoring/V3/QueryTimeSeriesRequest.php | 197 + .../Monitoring/V3/QueryTimeSeriesResponse.php | 195 + .../src/Google/Cloud/Monitoring/V3/Range.php | 101 + .../Cloud/Monitoring/V3/RequestBasedSli.php | 121 + ...ficationChannelVerificationCodeRequest.php | 81 + .../Google/Cloud/Monitoring/V3/Service.php | 608 ++ .../Cloud/Monitoring/V3/Service/AppEngine.php | 78 + .../Monitoring/V3/Service/BasicService.php | 130 + .../Monitoring/V3/Service/CloudEndpoints.php | 78 + .../Cloud/Monitoring/V3/Service/CloudRun.php | 120 + .../Monitoring/V3/Service/ClusterIstio.php | 198 + .../Cloud/Monitoring/V3/Service/Custom.php | 38 + .../Monitoring/V3/Service/GkeNamespace.php | 182 + .../Monitoring/V3/Service/GkeService.php | 219 + .../Monitoring/V3/Service/GkeWorkload.php | 250 + .../V3/Service/IstioCanonicalService.php | 171 + .../Cloud/Monitoring/V3/Service/MeshIstio.php | 151 + .../Cloud/Monitoring/V3/Service/Telemetry.php | 74 + .../Monitoring/V3/ServiceLevelIndicator.php | 153 + .../Monitoring/V3/ServiceLevelObjective.php | 338 + .../V3/ServiceLevelObjective/View.php | 71 + .../Cloud/Monitoring/V3/ServiceTier.php | 74 + .../src/Google/Cloud/Monitoring/V3/Snooze.php | 224 + .../Cloud/Monitoring/V3/Snooze/Criteria.php | 88 + .../Cloud/Monitoring/V3/SpanContext.php | 91 + .../Monitoring/V3/SyntheticMonitorTarget.php | 75 + .../CloudFunctionV2Target.php | 134 + .../Cloud/Monitoring/V3/TextLocator.php | 303 + .../Monitoring/V3/TextLocator/Position.php | 108 + .../Cloud/Monitoring/V3/TimeInterval.php | 165 + .../Google/Cloud/Monitoring/V3/TimeSeries.php | 404 + .../Cloud/Monitoring/V3/TimeSeriesData.php | 114 + .../V3/TimeSeriesData/PointData.php | 116 + .../Monitoring/V3/TimeSeriesDescriptor.php | 101 + .../TimeSeriesDescriptor/ValueDescriptor.php | 184 + .../Cloud/Monitoring/V3/TimeSeriesRatio.php | 180 + .../Google/Cloud/Monitoring/V3/TypedValue.php | 213 + .../V3/UpdateAlertPolicyRequest.php | 239 + .../Monitoring/V3/UpdateGroupRequest.php | 134 + .../V3/UpdateNotificationChannelRequest.php | 151 + .../V3/UpdateServiceLevelObjectiveRequest.php | 139 + .../Monitoring/V3/UpdateServiceRequest.php | 139 + .../Monitoring/V3/UpdateSnoozeRequest.php | 227 + .../V3/UpdateUptimeCheckConfigRequest.php | 192 + .../Cloud/Monitoring/V3/UptimeCheckConfig.php | 748 ++ .../V3/UptimeCheckConfig/CheckerType.php | 69 + .../V3/UptimeCheckConfig/ContentMatcher.php | 158 + .../ContentMatcher/ContentMatcherOption.php | 107 + .../ContentMatcher/JsonPathMatcher.php | 114 + .../JsonPathMatcher/JsonPathMatcherOption.php | 68 + .../V3/UptimeCheckConfig/HttpCheck.php | 730 ++ .../HttpCheck/BasicAuthentication.php | 107 + .../HttpCheck/ContentType.php | 67 + .../HttpCheck/RequestMethod.php | 64 + .../HttpCheck/ResponseStatusCode.php | 112 + .../ResponseStatusCode/StatusClass.php | 92 + .../HttpCheck/ServiceAgentAuthentication.php | 74 + .../ServiceAgentAuthenticationType.php | 57 + .../V3/UptimeCheckConfig/PingConfig.php | 72 + .../V3/UptimeCheckConfig/ResourceGroup.php | 113 + .../V3/UptimeCheckConfig/TcpCheck.php | 122 + .../Cloud/Monitoring/V3/UptimeCheckIp.php | 160 + .../Cloud/Monitoring/V3/UptimeCheckRegion.php | 102 + .../V3/VerifyNotificationChannelRequest.php | 147 + .../Cloud/Monitoring/V3/WindowsBasedSli.php | 236 + .../V3/WindowsBasedSli/MetricRange.php | 125 + .../WindowsBasedSli/PerformanceThreshold.php | 146 + .../create_alert_policy.php | 88 + .../delete_alert_policy.php | 77 + .../get_alert_policy.php | 73 + .../list_alert_policies.php | 85 + .../update_alert_policy.php | 66 + .../V3/GroupServiceClient/create_group.php | 76 + .../V3/GroupServiceClient/delete_group.php | 71 + .../V3/GroupServiceClient/get_group.php | 73 + .../GroupServiceClient/list_group_members.php | 78 + .../V3/GroupServiceClient/list_groups.php | 79 + .../V3/GroupServiceClient/update_group.php | 60 + .../create_metric_descriptor.php | 81 + .../create_service_time_series.php | 84 + .../create_time_series.php | 82 + .../delete_metric_descriptor.php | 77 + .../get_metric_descriptor.php | 77 + .../get_monitored_resource_descriptor.php | 79 + .../list_metric_descriptors.php | 79 + .../list_monitored_resource_descriptors.php | 79 + .../MetricServiceClient/list_time_series.php | 99 + .../create_notification_channel.php | 87 + .../delete_notification_channel.php | 79 + .../get_notification_channel.php | 80 + .../get_notification_channel_descriptor.php | 77 + ...notification_channel_verification_code.php | 96 + .../list_notification_channel_descriptors.php | 86 + .../list_notification_channels.php | 88 + ...notification_channel_verification_code.php | 73 + .../update_notification_channel.php | 65 + .../verify_notification_channel.php | 85 + .../QueryServiceClient/query_time_series.php | 84 + .../create_service.php | 76 + .../create_service_level_objective.php | 75 + .../delete_service.php | 71 + .../delete_service_level_objective.php | 76 + .../get_service.php | 73 + .../get_service_level_objective.php | 78 + .../list_service_level_objectives.php | 80 + .../list_services.php | 80 + .../update_service.php | 59 + .../update_service_level_objective.php | 59 + .../V3/SnoozeServiceClient/create_snooze.php | 89 + .../V3/SnoozeServiceClient/get_snooze.php | 73 + .../V3/SnoozeServiceClient/list_snoozes.php | 81 + .../V3/SnoozeServiceClient/update_snooze.php | 83 + .../create_uptime_check_config.php | 76 + .../delete_uptime_check_config.php | 76 + .../get_uptime_check_config.php | 76 + .../list_uptime_check_configs.php | 80 + .../list_uptime_check_ips.php | 62 + .../update_uptime_check_config.php | 62 + .../v3/src/V3/AlertPolicyServiceClient.php | 34 + .../V3/Client/AlertPolicyServiceClient.php | 511 ++ .../v3/src/V3/Client/GroupServiceClient.php | 448 ++ .../v3/src/V3/Client/MetricServiceClient.php | 679 ++ .../NotificationChannelServiceClient.php | 683 ++ .../v3/src/V3/Client/QueryServiceClient.php | 197 + .../Client/ServiceMonitoringServiceClient.php | 639 ++ .../v3/src/V3/Client/SnoozeServiceClient.php | 438 ++ .../V3/Client/UptimeCheckServiceClient.php | 475 ++ .../Gapic/AlertPolicyServiceGapicClient.php | 806 ++ .../src/V3/Gapic/GroupServiceGapicClient.php | 752 ++ .../src/V3/Gapic/MetricServiceGapicClient.php | 1178 +++ .../NotificationChannelServiceGapicClient.php | 1075 +++ .../src/V3/Gapic/QueryServiceGapicClient.php | 256 + .../ServiceMonitoringServiceGapicClient.php | 1044 +++ .../src/V3/Gapic/SnoozeServiceGapicClient.php | 680 ++ .../Gapic/UptimeCheckServiceGapicClient.php | 724 ++ .../v3/src/V3/GroupServiceClient.php | 34 + .../v3/src/V3/MetricServiceClient.php | 34 + .../V3/NotificationChannelServiceClient.php | 34 + .../v3/src/V3/QueryServiceClient.php | 34 + .../src/V3/ServiceMonitoringServiceClient.php | 34 + .../v3/src/V3/SnoozeServiceClient.php | 34 + .../v3/src/V3/UptimeCheckServiceClient.php | 34 + .../Monitoring/v3/src/V3/gapic_metadata.json | 336 + .../alert_policy_service_client_config.json | 69 + ...alert_policy_service_descriptor_config.php | 107 + ...lert_policy_service_rest_client_config.php | 87 + .../group_service_client_config.json | 86 + .../group_service_descriptor_config.php | 123 + .../group_service_rest_client_config.php | 98 + .../metric_service_client_config.json | 101 + .../metric_service_descriptor_config.php | 174 + .../metric_service_rest_client_config.php | 156 + ...ication_channel_service_client_config.json | 94 + ...tion_channel_service_descriptor_config.php | 175 + ...ion_channel_service_rest_client_config.php | 145 + .../query_service_client_config.json | 27 + .../query_service_descriptor_config.php | 48 + .../query_service_rest_client_config.php | 41 + ...vice_monitoring_service_client_config.json | 94 + ...e_monitoring_service_descriptor_config.php | 176 + ..._monitoring_service_rest_client_config.php | 145 + .../snooze_service_client_config.json | 64 + .../snooze_service_descriptor_config.php | 94 + .../snooze_service_rest_client_config.php | 79 + .../uptime_check_service_client_config.json | 74 + ...uptime_check_service_descriptor_config.php | 116 + ...ptime_check_service_rest_client_config.php | 91 + .../Unit/V3/AlertPolicyServiceClientTest.php | 380 + .../Client/AlertPolicyServiceClientTest.php | 442 ++ .../Unit/V3/Client/GroupServiceClientTest.php | 541 ++ .../V3/Client/MetricServiceClientTest.php | 769 ++ .../NotificationChannelServiceClientTest.php | 809 ++ .../Unit/V3/Client/QueryServiceClientTest.php | 182 + .../ServiceMonitoringServiceClientTest.php | 790 ++ .../V3/Client/SnoozeServiceClientTest.php | 416 + .../Client/UptimeCheckServiceClientTest.php | 517 ++ .../tests/Unit/V3/GroupServiceClientTest.php | 468 ++ .../tests/Unit/V3/MetricServiceClientTest.php | 672 ++ .../NotificationChannelServiceClientTest.php | 716 ++ .../tests/Unit/V3/QueryServiceClientTest.php | 134 + .../V3/ServiceMonitoringServiceClientTest.php | 701 ++ .../tests/Unit/V3/SnoozeServiceClientTest.php | 351 + .../Unit/V3/UptimeCheckServiceClientTest.php | 450 ++ .../Cloud/Netapp/V1/ActiveDirectory.php | Bin 0 -> 3025 bytes .../Google/Cloud/Netapp/V1/Backup.php | Bin 0 -> 2667 bytes .../Google/Cloud/Netapp/V1/BackupPolicy.php | Bin 0 -> 2776 bytes .../Google/Cloud/Netapp/V1/BackupVault.php | Bin 0 -> 2445 bytes .../Cloud/Netapp/V1/CloudNetappService.php | 144 + .../Google/Cloud/Netapp/V1/Common.php | Bin 0 -> 1126 bytes .../Google/Cloud/Netapp/V1/Kms.php | Bin 0 -> 2847 bytes .../Google/Cloud/Netapp/V1/Replication.php | Bin 0 -> 5576 bytes .../Google/Cloud/Netapp/V1/Snapshot.php | Bin 0 -> 2434 bytes .../Google/Cloud/Netapp/V1/StoragePool.php | Bin 0 -> 3337 bytes .../Google/Cloud/Netapp/V1/Volume.php | Bin 0 -> 7713 bytes .../src/Google/Cloud/NetApp/V1/AccessType.php | 68 + .../Cloud/NetApp/V1/ActiveDirectory.php | 827 ++ .../Cloud/NetApp/V1/ActiveDirectory/State.php | 99 + .../src/Google/Cloud/NetApp/V1/Backup.php | 441 ++ .../Google/Cloud/NetApp/V1/Backup/State.php | 96 + .../Google/Cloud/NetApp/V1/Backup/Type.php | 64 + .../Google/Cloud/NetApp/V1/BackupConfig.php | 209 + .../Google/Cloud/NetApp/V1/BackupPolicy.php | 471 ++ .../Cloud/NetApp/V1/BackupPolicy/State.php | 83 + .../Google/Cloud/NetApp/V1/BackupVault.php | 221 + .../Cloud/NetApp/V1/BackupVault/State.php | 85 + .../V1/CreateActiveDirectoryRequest.php | 178 + .../NetApp/V1/CreateBackupPolicyRequest.php | 188 + .../Cloud/NetApp/V1/CreateBackupRequest.php | 188 + .../NetApp/V1/CreateBackupVaultRequest.php | 188 + .../NetApp/V1/CreateKmsConfigRequest.php | 178 + .../NetApp/V1/CreateReplicationRequest.php | 183 + .../Cloud/NetApp/V1/CreateSnapshotRequest.php | 183 + .../NetApp/V1/CreateStoragePoolRequest.php | 178 + .../Cloud/NetApp/V1/CreateVolumeRequest.php | 178 + .../Google/Cloud/NetApp/V1/DailySchedule.php | 169 + .../V1/DeleteActiveDirectoryRequest.php | 81 + .../NetApp/V1/DeleteBackupPolicyRequest.php | 86 + .../Cloud/NetApp/V1/DeleteBackupRequest.php | 86 + .../NetApp/V1/DeleteBackupVaultRequest.php | 86 + .../NetApp/V1/DeleteKmsConfigRequest.php | 81 + .../NetApp/V1/DeleteReplicationRequest.php | 86 + .../Cloud/NetApp/V1/DeleteSnapshotRequest.php | 86 + .../NetApp/V1/DeleteStoragePoolRequest.php | 81 + .../Cloud/NetApp/V1/DeleteVolumeRequest.php | 123 + .../NetApp/V1/DestinationVolumeParameters.php | 240 + .../Cloud/NetApp/V1/EncryptVolumesRequest.php | 67 + .../Google/Cloud/NetApp/V1/EncryptionType.php | 61 + .../NetApp/V1/EstablishPeeringRequest.php | 220 + .../Google/Cloud/NetApp/V1/ExportPolicy.php | 67 + .../NetApp/V1/GetActiveDirectoryRequest.php | 81 + .../NetApp/V1/GetBackupPolicyRequest.php | 86 + .../Cloud/NetApp/V1/GetBackupRequest.php | 86 + .../Cloud/NetApp/V1/GetBackupVaultRequest.php | 86 + .../Cloud/NetApp/V1/GetKmsConfigRequest.php | 81 + .../Cloud/NetApp/V1/GetReplicationRequest.php | 86 + .../Cloud/NetApp/V1/GetSnapshotRequest.php | 86 + .../Cloud/NetApp/V1/GetStoragePoolRequest.php | 81 + .../Cloud/NetApp/V1/GetVolumeRequest.php | 81 + .../Google/Cloud/NetApp/V1/HourlySchedule.php | 125 + .../Cloud/NetApp/V1/HybridPeeringDetails.php | 187 + .../NetApp/V1/HybridReplicationParameters.php | 329 + .../src/Google/Cloud/NetApp/V1/KmsConfig.php | 361 + .../Cloud/NetApp/V1/KmsConfig/State.php | 129 + .../V1/ListActiveDirectoriesRequest.php | 221 + .../V1/ListActiveDirectoriesResponse.php | 135 + .../NetApp/V1/ListBackupPoliciesRequest.php | 221 + .../NetApp/V1/ListBackupPoliciesResponse.php | 135 + .../NetApp/V1/ListBackupVaultsRequest.php | 231 + .../NetApp/V1/ListBackupVaultsResponse.php | 139 + .../Cloud/NetApp/V1/ListBackupsRequest.php | 281 + .../Cloud/NetApp/V1/ListBackupsResponse.php | 139 + .../Cloud/NetApp/V1/ListKmsConfigsRequest.php | 221 + .../NetApp/V1/ListKmsConfigsResponse.php | 135 + .../NetApp/V1/ListReplicationsRequest.php | 231 + .../NetApp/V1/ListReplicationsResponse.php | 139 + .../Cloud/NetApp/V1/ListSnapshotsRequest.php | 231 + .../Cloud/NetApp/V1/ListSnapshotsResponse.php | 139 + .../NetApp/V1/ListStoragePoolsRequest.php | 225 + .../NetApp/V1/ListStoragePoolsResponse.php | 135 + .../Cloud/NetApp/V1/ListVolumesRequest.php | 221 + .../Cloud/NetApp/V1/ListVolumesResponse.php | 135 + .../Cloud/NetApp/V1/LocationMetadata.php | 68 + .../Cloud/NetApp/V1/MonthlySchedule.php | 217 + .../Google/Cloud/NetApp/V1/MountOption.php | 169 + .../Cloud/NetApp/V1/OperationMetadata.php | 307 + .../src/Google/Cloud/NetApp/V1/Protocols.php | 68 + .../Google/Cloud/NetApp/V1/Replication.php | 705 ++ .../V1/Replication/HybridReplicationType.php | 64 + .../NetApp/V1/Replication/MirrorState.php | 94 + .../NetApp/V1/Replication/ReplicationRole.php | 65 + .../V1/Replication/ReplicationSchedule.php | 73 + .../Cloud/NetApp/V1/Replication/State.php | 100 + .../Cloud/NetApp/V1/RestoreParameters.php | 120 + .../Cloud/NetApp/V1/RestrictedAction.php | 54 + .../NetApp/V1/ResumeReplicationRequest.php | 71 + .../V1/ReverseReplicationDirectionRequest.php | 72 + .../Cloud/NetApp/V1/RevertVolumeRequest.php | 113 + .../Google/Cloud/NetApp/V1/SMBSettings.php | 111 + .../Google/Cloud/NetApp/V1/SecurityStyle.php | 61 + .../Google/Cloud/NetApp/V1/ServiceLevel.php | 75 + .../NetApp/V1/SimpleExportPolicyRule.php | 577 ++ .../src/Google/Cloud/NetApp/V1/Snapshot.php | 293 + .../Google/Cloud/NetApp/V1/Snapshot/State.php | 92 + .../Google/Cloud/NetApp/V1/SnapshotPolicy.php | 257 + .../NetApp/V1/StopReplicationRequest.php | 125 + .../Google/Cloud/NetApp/V1/StoragePool.php | 766 ++ .../Cloud/NetApp/V1/StoragePool/State.php | 99 + .../V1/SwitchActiveReplicaZoneRequest.php | 68 + .../NetApp/V1/SyncReplicationRequest.php | 71 + .../Google/Cloud/NetApp/V1/TieringPolicy.php | 129 + .../NetApp/V1/TieringPolicy/TierAction.php | 65 + .../Google/Cloud/NetApp/V1/TransferStats.php | 393 + .../V1/UpdateActiveDirectoryRequest.php | 156 + .../NetApp/V1/UpdateBackupPolicyRequest.php | 156 + .../Cloud/NetApp/V1/UpdateBackupRequest.php | 156 + .../NetApp/V1/UpdateBackupVaultRequest.php | 156 + .../NetApp/V1/UpdateKmsConfigRequest.php | 156 + .../NetApp/V1/UpdateReplicationRequest.php | 141 + .../Cloud/NetApp/V1/UpdateSnapshotRequest.php | 141 + .../NetApp/V1/UpdateStoragePoolRequest.php | 156 + .../Cloud/NetApp/V1/UpdateVolumeRequest.php | 156 + .../NetApp/V1/VerifyKmsConfigRequest.php | 67 + .../NetApp/V1/VerifyKmsConfigResponse.php | 144 + .../src/Google/Cloud/NetApp/V1/Volume.php | 1443 ++++ .../Google/Cloud/NetApp/V1/Volume/State.php | 115 + .../Google/Cloud/NetApp/V1/WeeklySchedule.php | 218 + .../NetAppClient/create_active_directory.php | 123 + .../samples/V1/NetAppClient/create_backup.php | 96 + .../V1/NetAppClient/create_backup_policy.php | 93 + .../V1/NetAppClient/create_backup_vault.php | 93 + .../V1/NetAppClient/create_kms_config.php | 98 + .../V1/NetAppClient/create_replication.php | 116 + .../V1/NetAppClient/create_snapshot.php | 92 + .../V1/NetAppClient/create_storage_pool.php | 114 + .../samples/V1/NetAppClient/create_volume.php | 123 + .../NetAppClient/delete_active_directory.php | 80 + .../samples/V1/NetAppClient/delete_backup.php | 81 + .../V1/NetAppClient/delete_backup_policy.php | 81 + .../V1/NetAppClient/delete_backup_vault.php | 81 + .../V1/NetAppClient/delete_kms_config.php | 80 + .../V1/NetAppClient/delete_replication.php | 86 + .../V1/NetAppClient/delete_snapshot.php | 81 + .../V1/NetAppClient/delete_storage_pool.php | 80 + .../samples/V1/NetAppClient/delete_volume.php | 80 + .../V1/NetAppClient/encrypt_volumes.php | 84 + .../V1/NetAppClient/establish_peering.php | 105 + .../V1/NetAppClient/get_active_directory.php | 71 + .../v1/samples/V1/NetAppClient/get_backup.php | 72 + .../V1/NetAppClient/get_backup_policy.php | 72 + .../V1/NetAppClient/get_backup_vault.php | 72 + .../V1/NetAppClient/get_kms_config.php | 71 + .../samples/V1/NetAppClient/get_location.php | 57 + .../V1/NetAppClient/get_replication.php | 77 + .../samples/V1/NetAppClient/get_snapshot.php | 72 + .../V1/NetAppClient/get_storage_pool.php | 71 + .../v1/samples/V1/NetAppClient/get_volume.php | 71 + .../NetAppClient/list_active_directories.php | 76 + .../V1/NetAppClient/list_backup_policies.php | 76 + .../V1/NetAppClient/list_backup_vaults.php | 78 + .../samples/V1/NetAppClient/list_backups.php | 84 + .../V1/NetAppClient/list_kms_configs.php | 76 + .../V1/NetAppClient/list_locations.php | 62 + .../V1/NetAppClient/list_replications.php | 78 + .../V1/NetAppClient/list_snapshots.php | 78 + .../V1/NetAppClient/list_storage_pools.php | 76 + .../samples/V1/NetAppClient/list_volumes.php | 76 + .../V1/NetAppClient/resume_replication.php | 89 + .../reverse_replication_direction.php | 90 + .../samples/V1/NetAppClient/revert_volume.php | 91 + .../V1/NetAppClient/stop_replication.php | 89 + .../switch_active_replica_zone.php | 84 + .../V1/NetAppClient/sync_replication.php | 90 + .../NetAppClient/update_active_directory.php | 111 + .../samples/V1/NetAppClient/update_backup.php | 74 + .../V1/NetAppClient/update_backup_policy.php | 74 + .../V1/NetAppClient/update_backup_vault.php | 74 + .../V1/NetAppClient/update_kms_config.php | 88 + .../V1/NetAppClient/update_replication.php | 104 + .../V1/NetAppClient/update_snapshot.php | 74 + .../V1/NetAppClient/update_storage_pool.php | 103 + .../samples/V1/NetAppClient/update_volume.php | 112 + .../V1/NetAppClient/verify_kms_config.php | 71 + .../NetApp/v1/src/V1/Client/NetAppClient.php | 2060 +++++ .../NetApp/v1/src/V1/gapic_metadata.json | 298 + .../V1/resources/net_app_client_config.json | 324 + .../resources/net_app_descriptor_config.php | 1049 +++ .../resources/net_app_rest_client_config.php | 784 ++ .../tests/Unit/V1/Client/NetAppClientTest.php | 6873 +++++++++++++++++ .../Cloud/Networkconnectivity/V1/Common.php | 40 + .../Cloud/Networkconnectivity/V1/Hub.php | Bin 0 -> 19414 bytes .../V1/PolicyBasedRouting.php | Bin 0 -> 5510 bytes .../V1/AcceptHubSpokeRequest.php | 197 + .../V1/AcceptHubSpokeResponse.php | 78 + .../NetworkConnectivity/V1/AutoAccept.php | 81 + .../V1/CreateHubRequest.php | 243 + .../V1/CreatePolicyBasedRouteRequest.php | 237 + .../V1/CreateSpokeRequest.php | 242 + .../V1/DeleteHubRequest.php | 160 + .../V1/DeletePolicyBasedRouteRequest.php | 155 + .../V1/DeleteSpokeRequest.php | 160 + .../V1/GetGroupRequest.php | 82 + .../NetworkConnectivity/V1/GetHubRequest.php | 83 + .../V1/GetPolicyBasedRouteRequest.php | 81 + .../V1/GetRouteRequest.php | 82 + .../V1/GetRouteTableRequest.php | 82 + .../V1/GetSpokeRequest.php | 82 + .../Cloud/NetworkConnectivity/V1/Group.php | 405 + .../Cloud/NetworkConnectivity/V1/Hub.php | 620 ++ .../NetworkConnectivity/V1/HubStatusEntry.php | 158 + .../V1/LinkedInterconnectAttachments.php | 188 + .../V1/LinkedProducerVpcNetwork.php | 247 + .../V1/LinkedRouterApplianceInstances.php | 192 + .../V1/LinkedVpcNetwork.php | 177 + .../V1/LinkedVpnTunnels.php | 188 + .../V1/ListGroupsRequest.php | 219 + .../V1/ListGroupsResponse.php | 145 + .../V1/ListHubSpokesRequest.php | 322 + .../V1/ListHubSpokesRequest/SpokeView.php | 68 + .../V1/ListHubSpokesResponse.php | 152 + .../V1/ListHubsRequest.php | 219 + .../V1/ListHubsResponse.php | 145 + .../V1/ListPolicyBasedRoutesRequest.php | 217 + .../V1/ListPolicyBasedRoutesResponse.php | 139 + .../V1/ListRouteTablesRequest.php | 219 + .../V1/ListRouteTablesResponse.php | 145 + .../V1/ListRoutesRequest.php | 219 + .../V1/ListRoutesResponse.php | 145 + .../V1/ListSpokesRequest.php | 218 + .../V1/ListSpokesResponse.php | 144 + .../V1/LocationFeature.php | 61 + .../V1/LocationMetadata.php | 67 + .../V1/NextHopInterconnectAttachment.php | 147 + .../V1/NextHopRouterApplianceInstance.php | 143 + .../V1/NextHopVPNTunnel.php | 143 + .../V1/NextHopVpcNetwork.php | 65 + .../V1/OperationMetadata.php | 307 + .../V1/PolicyBasedRoute.php | 636 ++ .../V1/PolicyBasedRoute/Filter.php | 192 + .../Filter/ProtocolVersion.php | 57 + .../InterconnectAttachment.php | 74 + .../V1/PolicyBasedRoute/OtherRoutes.php | 60 + .../V1/PolicyBasedRoute/VirtualMachine.php | 78 + .../V1/PolicyBasedRoute/Warnings.php | 158 + .../V1/PolicyBasedRoute/Warnings/Code.php | 68 + .../NetworkConnectivity/V1/PolicyMode.php | 55 + .../NetworkConnectivity/V1/PresetTopology.php | 65 + .../V1/PscPropagationStatus.php | 276 + .../V1/PscPropagationStatus/Code.php | 103 + .../V1/QueryHubStatusRequest.php | 348 + .../V1/QueryHubStatusResponse.php | 110 + .../V1/RejectHubSpokeRequest.php | 231 + .../V1/RejectHubSpokeResponse.php | 78 + .../Cloud/NetworkConnectivity/V1/Route.php | 694 ++ .../NetworkConnectivity/V1/RouteTable.php | 317 + .../NetworkConnectivity/V1/RouteType.php | 72 + .../V1/RouterApplianceInstance.php | 104 + .../NetworkConnectivity/V1/RoutingVPC.php | 118 + .../Cloud/NetworkConnectivity/V1/Spoke.php | 682 ++ .../V1/Spoke/StateReason.php | 138 + .../V1/Spoke/StateReason/Code.php | 79 + .../NetworkConnectivity/V1/SpokeSummary.php | 151 + .../V1/SpokeSummary/SpokeStateCount.php | 109 + .../V1/SpokeSummary/SpokeStateReasonCount.php | 108 + .../V1/SpokeSummary/SpokeTypeCount.php | 110 + .../NetworkConnectivity/V1/SpokeType.php | 83 + .../Cloud/NetworkConnectivity/V1/State.php | 105 + .../V1/UpdateGroupRequest.php | 236 + .../V1/UpdateHubRequest.php | 236 + .../V1/UpdateSpokeRequest.php | 236 + .../V1/HubServiceClient/accept_hub_spoke.php | 88 + .../V1/HubServiceClient/create_hub.php | 88 + .../V1/HubServiceClient/create_spoke.php | 88 + .../V1/HubServiceClient/delete_hub.php | 80 + .../V1/HubServiceClient/delete_spoke.php | 80 + .../samples/V1/HubServiceClient/get_group.php | 71 + .../samples/V1/HubServiceClient/get_hub.php | 71 + .../V1/HubServiceClient/get_iam_policy.php | 72 + .../V1/HubServiceClient/get_location.php | 57 + .../samples/V1/HubServiceClient/get_route.php | 71 + .../V1/HubServiceClient/get_route_table.php | 71 + .../samples/V1/HubServiceClient/get_spoke.php | 71 + .../V1/HubServiceClient/list_groups.php | 76 + .../V1/HubServiceClient/list_hub_spokes.php | 78 + .../samples/V1/HubServiceClient/list_hubs.php | 76 + .../V1/HubServiceClient/list_locations.php | 62 + .../V1/HubServiceClient/list_route_tables.php | 76 + .../V1/HubServiceClient/list_routes.php | 76 + .../V1/HubServiceClient/list_spokes.php | 77 + .../V1/HubServiceClient/query_hub_status.php | 77 + .../V1/HubServiceClient/reject_hub_spoke.php | 90 + .../V1/HubServiceClient/set_iam_policy.php | 77 + .../HubServiceClient/test_iam_permissions.php | 84 + .../V1/HubServiceClient/update_group.php | 71 + .../V1/HubServiceClient/update_hub.php | 72 + .../V1/HubServiceClient/update_spoke.php | 71 + .../create_policy_based_route.php | 113 + .../delete_policy_based_route.php | 83 + .../get_iam_policy.php | 72 + .../get_location.php | 57 + .../get_policy_based_route.php | 74 + .../list_locations.php | 62 + .../list_policy_based_routes.php | 76 + .../set_iam_policy.php | 77 + .../test_iam_permissions.php | 84 + .../v1/src/V1/Client/HubServiceClient.php | 1203 +++ .../PolicyBasedRoutingServiceClient.php | 580 ++ .../v1/src/V1/gapic_metadata.json | 202 + .../resources/hub_service_client_config.json | 174 + .../hub_service_descriptor_config.php | 487 ++ .../hub_service_rest_client_config.php | 432 ++ ...y_based_routing_service_client_config.json | 89 + ...ased_routing_service_descriptor_config.php | 176 + ...sed_routing_service_rest_client_config.php | 233 + .../Unit/V1/Client/HubServiceClientTest.php | 2537 ++++++ .../PolicyBasedRoutingServiceClientTest.php | 932 +++ .../Networkmanagement/V1/ConnectivityTest.php | Bin 0 -> 4939 bytes .../Networkmanagement/V1/Reachability.php | 84 + .../Cloud/Networkmanagement/V1/Trace.php | Bin 0 -> 17481 bytes .../Cloud/NetworkManagement/V1/AbortInfo.php | 173 + .../NetworkManagement/V1/AbortInfo/Cause.php | 327 + .../V1/AppEngineVersionInfo.php | 169 + .../V1/CloudFunctionInfo.php | 169 + .../V1/CloudRunRevisionInfo.php | 169 + .../V1/CloudSQLInstanceInfo.php | 241 + .../NetworkManagement/V1/ConnectivityTest.php | 781 ++ .../V1/CreateConnectivityTestRequest.php | 199 + .../V1/DeleteConnectivityTestRequest.php | 86 + .../NetworkManagement/V1/DeliverInfo.php | 207 + .../V1/DeliverInfo/Target.php | 172 + .../Cloud/NetworkManagement/V1/DropInfo.php | 203 + .../NetworkManagement/V1/DropInfo/Cause.php | 711 ++ .../Cloud/NetworkManagement/V1/Endpoint.php | 805 ++ .../V1/Endpoint/AppEngineVersionEndpoint.php | 78 + .../V1/Endpoint/CloudFunctionEndpoint.php | 70 + .../V1/Endpoint/CloudRunRevisionEndpoint.php | 82 + .../V1/Endpoint/ForwardingRuleTarget.php | 79 + .../V1/Endpoint/NetworkType.php | 69 + .../NetworkManagement/V1/EndpointInfo.php | 307 + .../NetworkManagement/V1/FirewallInfo.php | 440 ++ .../V1/FirewallInfo/FirewallRuleType.php | 125 + .../NetworkManagement/V1/ForwardInfo.php | 135 + .../V1/ForwardInfo/Target.php | 113 + .../V1/ForwardingRuleInfo.php | 415 + .../NetworkManagement/V1/GKEMasterInfo.php | 204 + .../V1/GetConnectivityTestRequest.php | 86 + .../V1/GoogleServiceInfo.php | 105 + .../GoogleServiceInfo/GoogleServiceType.php | 101 + .../NetworkManagement/V1/InstanceInfo.php | 344 + .../V1/LatencyDistribution.php | 67 + .../V1/LatencyPercentile.php | 109 + .../V1/ListConnectivityTestsRequest.php | 282 + .../V1/ListConnectivityTestsResponse.php | 135 + .../V1/LoadBalancerBackend.php | 203 + .../HealthCheckFirewallState.php | 69 + .../V1/LoadBalancerBackendInfo.php | 409 + .../HealthCheckFirewallsConfigState.php | 86 + .../NetworkManagement/V1/LoadBalancerInfo.php | 216 + .../V1/LoadBalancerInfo/BackendType.php | 71 + .../V1/LoadBalancerInfo/LoadBalancerType.php | 85 + .../NetworkManagement/V1/LoadBalancerType.php | 120 + .../Cloud/NetworkManagement/V1/NatInfo.php | 483 ++ .../NetworkManagement/V1/NatInfo/Type.php | 78 + .../NetworkManagement/V1/NetworkInfo.php | 204 + .../V1/OperationMetadata.php | 295 + .../NetworkManagement/V1/ProbingDetails.php | 417 + .../V1/ProbingDetails/EdgeLocation.php | 71 + .../V1/ProbingDetails/ProbingAbortCause.php | 65 + .../V1/ProbingDetails/ProbingResult.php | 82 + .../V1/ProxyConnectionInfo.php | 419 + .../V1/ReachabilityDetails.php | 197 + .../V1/ReachabilityDetails/Result.php | 94 + .../NetworkManagement/V1/RedisClusterInfo.php | 249 + .../V1/RedisInstanceInfo.php | 237 + .../V1/RerunConnectivityTestRequest.php | 71 + .../Cloud/NetworkManagement/V1/RouteInfo.php | 735 ++ .../V1/RouteInfo/NextHopType.php | 140 + .../V1/RouteInfo/RouteScope.php | 64 + .../V1/RouteInfo/RouteType.php | 112 + .../V1/ServerlessNegInfo.php | 68 + .../Cloud/NetworkManagement/V1/Step.php | 1090 +++ .../Cloud/NetworkManagement/V1/Step/State.php | 304 + .../V1/StorageBucketInfo.php | 67 + .../Cloud/NetworkManagement/V1/Trace.php | 190 + .../V1/UpdateConnectivityTestRequest.php | 141 + .../NetworkManagement/V1/VpcConnectorInfo.php | 135 + .../NetworkManagement/V1/VpnGatewayInfo.php | 245 + .../NetworkManagement/V1/VpnTunnelInfo.php | 339 + .../V1/VpnTunnelInfo/RoutingType.php | 72 + .../create_connectivity_test.php | 113 + .../delete_connectivity_test.php | 81 + .../get_connectivity_test.php | 72 + .../get_iam_policy.php | 72 + .../get_location.php | 57 + .../list_connectivity_tests.php | 77 + .../list_locations.php | 62 + .../rerun_connectivity_test.php | 95 + .../set_iam_policy.php | 77 + .../test_iam_permissions.php | 84 + .../update_connectivity_test.php | 92 + .../V1/Client/ReachabilityServiceClient.php | 656 ++ .../v1/src/V1/gapic_metadata.json | 73 + .../reachability_service_client_config.json | 87 + ...reachability_service_descriptor_config.php | 214 + ...eachability_service_rest_client_config.php | 213 + .../Client/ReachabilityServiceClientTest.php | 1202 +++ .../V1/AuthorizationPolicy.php | Bin 0 -> 3391 bytes .../Networksecurity/V1/ClientTlsPolicy.php | 67 + .../Cloud/Networksecurity/V1/Common.php | 37 + .../Networksecurity/V1/NetworkSecurity.php | 58 + .../Networksecurity/V1/ServerTlsPolicy.php | 71 + .../Google/Cloud/Networksecurity/V1/Tls.php | Bin 0 -> 1442 bytes .../V1/AuthorizationPolicy.php | 314 + .../V1/AuthorizationPolicy/Action.php | 66 + .../V1/AuthorizationPolicy/Rule.php | 132 + .../AuthorizationPolicy/Rule/Destination.php | 214 + .../Rule/Destination/HttpHeaderMatch.php | 142 + .../V1/AuthorizationPolicy/Rule/Source.php | 140 + .../V1/CertificateProvider.php | 118 + .../V1/CertificateProviderInstance.php | 78 + .../NetworkSecurity/V1/ClientTlsPolicy.php | 357 + .../V1/CreateAuthorizationPolicyRequest.php | 183 + .../V1/CreateClientTlsPolicyRequest.php | 178 + .../V1/CreateServerTlsPolicyRequest.php | 178 + .../V1/DeleteAuthorizationPolicyRequest.php | 86 + .../V1/DeleteClientTlsPolicyRequest.php | 86 + .../V1/DeleteServerTlsPolicyRequest.php | 86 + .../V1/GetAuthorizationPolicyRequest.php | 86 + .../V1/GetClientTlsPolicyRequest.php | 86 + .../V1/GetServerTlsPolicyRequest.php | 86 + .../Cloud/NetworkSecurity/V1/GrpcEndpoint.php | 71 + .../V1/ListAuthorizationPoliciesRequest.php | 171 + .../V1/ListAuthorizationPoliciesResponse.php | 109 + .../V1/ListClientTlsPoliciesRequest.php | 166 + .../V1/ListClientTlsPoliciesResponse.php | 109 + .../V1/ListServerTlsPoliciesRequest.php | 166 + .../V1/ListServerTlsPoliciesResponse.php | 109 + .../NetworkSecurity/V1/OperationMetadata.php | 303 + .../NetworkSecurity/V1/ServerTlsPolicy.php | 403 + .../V1/ServerTlsPolicy/MTLSPolicy.php | 74 + .../V1/UpdateAuthorizationPolicyRequest.php | 156 + .../V1/UpdateClientTlsPolicyRequest.php | 161 + .../V1/UpdateServerTlsPolicyRequest.php | 161 + .../Cloud/NetworkSecurity/V1/ValidationCA.php | 118 + .../create_authorization_policy.php | 110 + .../create_client_tls_policy.php | 98 + .../create_server_tls_policy.php | 98 + .../delete_authorization_policy.php | 85 + .../delete_client_tls_policy.php | 85 + .../delete_server_tls_policy.php | 85 + .../get_authorization_policy.php | 76 + .../get_client_tls_policy.php | 76 + .../NetworkSecurityClient/get_iam_policy.php | 72 + .../V1/NetworkSecurityClient/get_location.php | 57 + .../get_server_tls_policy.php | 76 + .../list_authorization_policies.php | 78 + .../list_client_tls_policies.php | 77 + .../NetworkSecurityClient/list_locations.php | 62 + .../list_server_tls_policies.php | 77 + .../NetworkSecurityClient/set_iam_policy.php | 77 + .../test_iam_permissions.php | 84 + .../update_authorization_policy.php | 92 + .../update_client_tls_policy.php | 85 + .../update_server_tls_policy.php | 85 + .../src/V1/Client/NetworkSecurityClient.php | 919 +++ .../v1/src/V1/gapic_metadata.json | 118 + .../network_security_client_config.json | 132 + .../network_security_descriptor_config.php | 377 + .../network_security_rest_client_config.php | 354 + .../V1/Client/NetworkSecurityClientTest.php | 2113 +++++ .../Cloud/Networkservices/V1/Common.php | Bin 0 -> 1930 bytes .../Google/Cloud/Networkservices/V1/Dep.php | Bin 0 -> 9040 bytes .../Networkservices/V1/EndpointPolicy.php | Bin 0 -> 3659 bytes .../Cloud/Networkservices/V1/Gateway.php | Bin 0 -> 2567 bytes .../Cloud/Networkservices/V1/GrpcRoute.php | Bin 0 -> 4529 bytes .../Cloud/Networkservices/V1/HttpRoute.php | Bin 0 -> 6027 bytes .../Google/Cloud/Networkservices/V1/Mesh.php | 64 + .../Networkservices/V1/NetworkServices.php | 110 + .../Networkservices/V1/ServiceBinding.php | 59 + .../Cloud/Networkservices/V1/TcpRoute.php | 85 + .../Cloud/Networkservices/V1/TlsRoute.php | 78 + .../V1/CreateEndpointPolicyRequest.php | 173 + .../V1/CreateGatewayRequest.php | 168 + .../V1/CreateGrpcRouteRequest.php | 168 + .../V1/CreateHttpRouteRequest.php | 168 + .../V1/CreateLbRouteExtensionRequest.php | 247 + .../V1/CreateLbTrafficExtensionRequest.php | 247 + .../NetworkServices/V1/CreateMeshRequest.php | 168 + .../V1/CreateServiceBindingRequest.php | 168 + .../V1/CreateTcpRouteRequest.php | 168 + .../V1/CreateTlsRouteRequest.php | 168 + .../V1/DeleteEndpointPolicyRequest.php | 86 + .../V1/DeleteGatewayRequest.php | 86 + .../V1/DeleteGrpcRouteRequest.php | 86 + .../V1/DeleteHttpRouteRequest.php | 86 + .../V1/DeleteLbRouteExtensionRequest.php | 165 + .../V1/DeleteLbTrafficExtensionRequest.php | 165 + .../NetworkServices/V1/DeleteMeshRequest.php | 86 + .../V1/DeleteServiceBindingRequest.php | 86 + .../V1/DeleteTcpRouteRequest.php | 86 + .../V1/DeleteTlsRouteRequest.php | 86 + .../NetworkServices/V1/EndpointMatcher.php | 76 + .../EndpointMatcher/MetadataLabelMatcher.php | 196 + .../MetadataLabelMatchCriteria.php | 66 + .../MetadataLabelMatcher/MetadataLabels.php | 108 + .../NetworkServices/V1/EndpointPolicy.php | 526 ++ .../V1/EndpointPolicy/EndpointPolicyType.php | 64 + .../Cloud/NetworkServices/V1/EventType.php | 95 + .../NetworkServices/V1/ExtensionChain.php | 182 + .../V1/ExtensionChain/Extension.php | 416 + .../V1/ExtensionChain/MatchCondition.php | 82 + .../Cloud/NetworkServices/V1/Gateway.php | 444 ++ .../Cloud/NetworkServices/V1/Gateway/Type.php | 68 + .../V1/GetEndpointPolicyRequest.php | 86 + .../NetworkServices/V1/GetGatewayRequest.php | 86 + .../V1/GetGrpcRouteRequest.php | 86 + .../V1/GetHttpRouteRequest.php | 86 + .../V1/GetLbRouteExtensionRequest.php | 91 + .../V1/GetLbTrafficExtensionRequest.php | 91 + .../NetworkServices/V1/GetMeshRequest.php | 86 + .../V1/GetServiceBindingRequest.php | 86 + .../NetworkServices/V1/GetTcpRouteRequest.php | 86 + .../NetworkServices/V1/GetTlsRouteRequest.php | 86 + .../Cloud/NetworkServices/V1/GrpcRoute.php | 534 ++ .../V1/GrpcRoute/Destination.php | 165 + .../V1/GrpcRoute/FaultInjectionPolicy.php | 129 + .../GrpcRoute/FaultInjectionPolicy/Abort.php | 133 + .../GrpcRoute/FaultInjectionPolicy/Delay.php | 129 + .../V1/GrpcRoute/HeaderMatch.php | 142 + .../V1/GrpcRoute/HeaderMatch/Type.php | 65 + .../V1/GrpcRoute/MethodMatch.php | 202 + .../V1/GrpcRoute/MethodMatch/Type.php | 65 + .../V1/GrpcRoute/RetryPolicy.php | 168 + .../V1/GrpcRoute/RouteAction.php | 250 + .../V1/GrpcRoute/RouteMatch.php | 119 + .../V1/GrpcRoute/RouteRule.php | 130 + .../Cloud/NetworkServices/V1/HttpRoute.php | 518 ++ .../V1/HttpRoute/CorsPolicy.php | 344 + .../V1/HttpRoute/Destination.php | 144 + .../V1/HttpRoute/FaultInjectionPolicy.php | 129 + .../HttpRoute/FaultInjectionPolicy/Abort.php | 113 + .../HttpRoute/FaultInjectionPolicy/Delay.php | 119 + .../V1/HttpRoute/HeaderMatch.php | 330 + .../V1/HttpRoute/HeaderMatch/IntegerRange.php | 104 + .../V1/HttpRoute/HeaderModifier.php | 147 + .../V1/HttpRoute/QueryParameterMatch.php | 202 + .../NetworkServices/V1/HttpRoute/Redirect.php | 330 + .../V1/HttpRoute/Redirect/ResponseCode.php | 85 + .../V1/HttpRoute/RequestMirrorPolicy.php | 87 + .../V1/HttpRoute/RetryPolicy.php | 216 + .../V1/HttpRoute/RouteAction.php | 546 ++ .../V1/HttpRoute/RouteMatch.php | 290 + .../V1/HttpRoute/RouteRule.php | 139 + .../V1/HttpRoute/URLRewrite.php | 113 + .../NetworkServices/V1/LbRouteExtension.php | 462 ++ .../NetworkServices/V1/LbTrafficExtension.php | 460 ++ .../V1/ListEndpointPoliciesRequest.php | 166 + .../V1/ListEndpointPoliciesResponse.php | 109 + .../V1/ListGatewaysRequest.php | 162 + .../V1/ListGatewaysResponse.php | 109 + .../V1/ListGrpcRoutesRequest.php | 162 + .../V1/ListGrpcRoutesResponse.php | 109 + .../V1/ListHttpRoutesRequest.php | 162 + .../V1/ListHttpRoutesResponse.php | 109 + .../V1/ListLbRouteExtensionsRequest.php | 231 + .../V1/ListLbRouteExtensionsResponse.php | 135 + .../V1/ListLbTrafficExtensionsRequest.php | 231 + .../V1/ListLbTrafficExtensionsResponse.php | 135 + .../NetworkServices/V1/ListMeshesRequest.php | 162 + .../NetworkServices/V1/ListMeshesResponse.php | 109 + .../V1/ListServiceBindingsRequest.php | 162 + .../V1/ListServiceBindingsResponse.php | 109 + .../V1/ListTcpRoutesRequest.php | 162 + .../V1/ListTcpRoutesResponse.php | 109 + .../V1/ListTlsRoutesRequest.php | 162 + .../V1/ListTlsRoutesResponse.php | 109 + .../V1/LoadBalancingScheme.php | 65 + .../Google/Cloud/NetworkServices/V1/Mesh.php | 321 + .../NetworkServices/V1/OperationMetadata.php | 307 + .../NetworkServices/V1/ServiceBinding.php | 270 + .../Cloud/NetworkServices/V1/TcpRoute.php | 404 + .../V1/TcpRoute/RouteAction.php | 120 + .../V1/TcpRoute/RouteDestination.php | 144 + .../V1/TcpRoute/RouteMatch.php | 139 + .../NetworkServices/V1/TcpRoute/RouteRule.php | 127 + .../Cloud/NetworkServices/V1/TlsRoute.php | 370 + .../V1/TlsRoute/RouteAction.php | 74 + .../V1/TlsRoute/RouteDestination.php | 116 + .../V1/TlsRoute/RouteMatch.php | 147 + .../NetworkServices/V1/TlsRoute/RouteRule.php | 119 + .../V1/TrafficPortSelector.php | 79 + .../V1/UpdateEndpointPolicyRequest.php | 156 + .../V1/UpdateGatewayRequest.php | 156 + .../V1/UpdateGrpcRouteRequest.php | 156 + .../V1/UpdateHttpRouteRequest.php | 156 + .../V1/UpdateLbRouteExtensionRequest.php | 230 + .../V1/UpdateLbTrafficExtensionRequest.php | 230 + .../NetworkServices/V1/UpdateMeshRequest.php | 156 + .../V1/UpdateTcpRouteRequest.php | 156 + .../V1/UpdateTlsRouteRequest.php | 156 + .../create_lb_route_extension.php | 176 + .../create_lb_traffic_extension.php | 177 + .../delete_lb_route_extension.php | 86 + .../delete_lb_traffic_extension.php | 86 + .../V1/DepServiceClient/get_iam_policy.php | 72 + .../get_lb_route_extension.php | 77 + .../get_lb_traffic_extension.php | 77 + .../V1/DepServiceClient/get_location.php | 57 + .../list_lb_route_extensions.php | 78 + .../list_lb_traffic_extensions.php | 78 + .../V1/DepServiceClient/list_locations.php | 62 + .../V1/DepServiceClient/set_iam_policy.php | 77 + .../DepServiceClient/test_iam_permissions.php | 84 + .../update_lb_route_extension.php | 163 + .../update_lb_traffic_extension.php | 163 + .../create_endpoint_policy.php | 111 + .../NetworkServicesClient/create_gateway.php | 120 + .../create_grpc_route.php | 143 + .../create_http_route.php | 132 + .../V1/NetworkServicesClient/create_mesh.php | 93 + .../create_service_binding.php | 106 + .../create_tcp_route.php | 103 + .../create_tls_route.php | 124 + .../delete_endpoint_policy.php | 85 + .../NetworkServicesClient/delete_gateway.php | 81 + .../delete_grpc_route.php | 81 + .../delete_http_route.php | 81 + .../V1/NetworkServicesClient/delete_mesh.php | 81 + .../delete_service_binding.php | 85 + .../delete_tcp_route.php | 81 + .../delete_tls_route.php | 81 + .../get_endpoint_policy.php | 76 + .../V1/NetworkServicesClient/get_gateway.php | 72 + .../NetworkServicesClient/get_grpc_route.php | 72 + .../NetworkServicesClient/get_http_route.php | 72 + .../NetworkServicesClient/get_iam_policy.php | 72 + .../V1/NetworkServicesClient/get_location.php | 57 + .../V1/NetworkServicesClient/get_mesh.php | 72 + .../get_service_binding.php | 76 + .../NetworkServicesClient/get_tcp_route.php | 72 + .../NetworkServicesClient/get_tls_route.php | 72 + .../list_endpoint_policies.php | 77 + .../NetworkServicesClient/list_gateways.php | 77 + .../list_grpc_routes.php | 77 + .../list_http_routes.php | 77 + .../NetworkServicesClient/list_locations.php | 62 + .../V1/NetworkServicesClient/list_meshes.php | 77 + .../list_service_bindings.php | 77 + .../NetworkServicesClient/list_tcp_routes.php | 77 + .../NetworkServicesClient/list_tls_routes.php | 77 + .../NetworkServicesClient/set_iam_policy.php | 77 + .../test_iam_permissions.php | 84 + .../update_endpoint_policy.php | 93 + .../NetworkServicesClient/update_gateway.php | 104 + .../update_grpc_route.php | 126 + .../update_http_route.php | 115 + .../V1/NetworkServicesClient/update_mesh.php | 85 + .../update_tcp_route.php | 92 + .../update_tls_route.php | 109 + .../v1/src/V1/Client/DepServiceClient.php | 744 ++ .../src/V1/Client/NetworkServicesClient.php | 1761 +++++ .../v1/src/V1/gapic_metadata.json | 322 + .../resources/dep_service_client_config.json | 107 + .../dep_service_descriptor_config.php | 286 + .../dep_service_rest_client_config.php | 349 + .../network_services_client_config.json | 252 + .../network_services_descriptor_config.php | 816 ++ .../network_services_rest_client_config.php | 702 ++ .../Unit/V1/Client/DepServiceClientTest.php | 1609 ++++ .../V1/Client/NetworkServicesClientTest.php | 4812 ++++++++++++ .../Cloud/Notebooks/V1/DiagnosticConfig.php | 35 + .../Google/Cloud/Notebooks/V1/Environment.php | Bin 0 -> 1607 bytes .../Google/Cloud/Notebooks/V1/Event.php | Bin 0 -> 1205 bytes .../Google/Cloud/Notebooks/V1/Execution.php | Bin 0 -> 3375 bytes .../Google/Cloud/Notebooks/V1/Instance.php | Bin 0 -> 5063 bytes .../Cloud/Notebooks/V1/InstanceConfig.php | 30 + .../Cloud/Notebooks/V1/ManagedService.php | 131 + .../Google/Cloud/Notebooks/V1/Runtime.php | Bin 0 -> 6123 bytes .../Google/Cloud/Notebooks/V1/Schedule.php | Bin 0 -> 1737 bytes .../Google/Cloud/Notebooks/V1/Service.php | Bin 0 -> 14354 bytes .../Cloud/Notebooks/V1/ContainerImage.php | 110 + .../Notebooks/V1/CreateEnvironmentRequest.php | 177 + .../Notebooks/V1/CreateExecutionRequest.php | 168 + .../Notebooks/V1/CreateInstanceRequest.php | 167 + .../Notebooks/V1/CreateRuntimeRequest.php | 202 + .../Notebooks/V1/CreateScheduleRequest.php | 168 + .../Notebooks/V1/DeleteEnvironmentRequest.php | 85 + .../Notebooks/V1/DeleteExecutionRequest.php | 86 + .../Notebooks/V1/DeleteInstanceRequest.php | 85 + .../Notebooks/V1/DeleteRuntimeRequest.php | 120 + .../Notebooks/V1/DeleteScheduleRequest.php | 86 + .../Notebooks/V1/DiagnoseInstanceRequest.php | 132 + .../Notebooks/V1/DiagnoseRuntimeRequest.php | 132 + .../Cloud/Notebooks/V1/DiagnosticConfig.php | 263 + .../Cloud/Notebooks/V1/EncryptionConfig.php | 80 + .../Google/Cloud/Notebooks/V1/Environment.php | 305 + .../src/Google/Cloud/Notebooks/V1/Event.php | 145 + .../Cloud/Notebooks/V1/Event/EventType.php | 84 + .../Google/Cloud/Notebooks/V1/Execution.php | 377 + .../Cloud/Notebooks/V1/Execution/State.php | 117 + .../Cloud/Notebooks/V1/ExecutionTemplate.php | 829 ++ .../ExecutionTemplate/DataprocParameters.php | 74 + .../V1/ExecutionTemplate/JobType.php | 66 + .../V1/ExecutionTemplate/ScaleTier.php | 99 + .../SchedulerAcceleratorConfig.php | 107 + .../SchedulerAcceleratorType.php | 106 + .../ExecutionTemplate/VertexAIParameters.php | 148 + .../Notebooks/V1/GetEnvironmentRequest.php | 85 + .../Notebooks/V1/GetExecutionRequest.php | 86 + .../Notebooks/V1/GetInstanceHealthRequest.php | 86 + .../V1/GetInstanceHealthResponse.php | 133 + .../GetInstanceHealthResponse/HealthState.php | 84 + .../Cloud/Notebooks/V1/GetInstanceRequest.php | 85 + .../Cloud/Notebooks/V1/GetRuntimeRequest.php | 86 + .../Cloud/Notebooks/V1/GetScheduleRequest.php | 86 + .../Google/Cloud/Notebooks/V1/Instance.php | 1522 ++++ .../V1/Instance/AcceleratorConfig.php | 107 + .../Notebooks/V1/Instance/AcceleratorType.php | 128 + .../Cloud/Notebooks/V1/Instance/Disk.php | 568 ++ .../V1/Instance/Disk/GuestOsFeature.php | 102 + .../Notebooks/V1/Instance/DiskEncryption.php | 64 + .../Cloud/Notebooks/V1/Instance/DiskType.php | 78 + .../Cloud/Notebooks/V1/Instance/NicType.php | 65 + .../V1/Instance/ShieldedInstanceConfig.php | 169 + .../Cloud/Notebooks/V1/Instance/State.php | 128 + .../V1/Instance/UpgradeHistoryEntry.php | 391 + .../Instance/UpgradeHistoryEntry/Action.php | 64 + .../V1/Instance/UpgradeHistoryEntry/State.php | 71 + .../Cloud/Notebooks/V1/InstanceConfig.php | 105 + .../V1/IsInstanceUpgradeableRequest.php | 109 + .../V1/IsInstanceUpgradeableResponse.php | 181 + .../Notebooks/V1/ListEnvironmentsRequest.php | 152 + .../Notebooks/V1/ListEnvironmentsResponse.php | 139 + .../Notebooks/V1/ListExecutionsRequest.php | 234 + .../Notebooks/V1/ListExecutionsResponse.php | 147 + .../Notebooks/V1/ListInstancesRequest.php | 157 + .../Notebooks/V1/ListInstancesResponse.php | 147 + .../Notebooks/V1/ListRuntimesRequest.php | 158 + .../Notebooks/V1/ListRuntimesResponse.php | 147 + .../Notebooks/V1/ListSchedulesRequest.php | 226 + .../Notebooks/V1/ListSchedulesResponse.php | 147 + .../Google/Cloud/Notebooks/V1/LocalDisk.php | 583 ++ .../V1/LocalDisk/RuntimeGuestOsFeature.php | 111 + .../V1/LocalDiskInitializeParams.php | 231 + .../V1/LocalDiskInitializeParams/DiskType.php | 78 + .../Cloud/Notebooks/V1/OperationMetadata.php | 337 + .../V1/RefreshRuntimeTokenInternalRequest.php | 127 + .../RefreshRuntimeTokenInternalResponse.php | 111 + .../Notebooks/V1/RegisterInstanceRequest.php | 117 + .../V1/ReportInstanceInfoRequest.php | 147 + .../V1/ReportRuntimeEventRequest.php | 168 + .../Notebooks/V1/ReservationAffinity.php | 135 + .../Notebooks/V1/ReservationAffinity/Type.php | 72 + .../Notebooks/V1/ResetInstanceRequest.php | 71 + .../Notebooks/V1/ResetRuntimeRequest.php | 119 + .../Notebooks/V1/RollbackInstanceRequest.php | 109 + .../src/Google/Cloud/Notebooks/V1/Runtime.php | 409 + .../Notebooks/V1/Runtime/HealthState.php | 84 + .../Cloud/Notebooks/V1/Runtime/State.php | 107 + .../Notebooks/V1/RuntimeAcceleratorConfig.php | 111 + .../AcceleratorType.php | 127 + .../Notebooks/V1/RuntimeAccessConfig.php | 139 + .../RuntimeAccessConfig/RuntimeAccessType.php | 68 + .../Cloud/Notebooks/V1/RuntimeMetrics.php | 67 + .../V1/RuntimeShieldedInstanceConfig.php | 166 + .../Notebooks/V1/RuntimeSoftwareConfig.php | 528 ++ .../PostStartupScriptBehavior.php | 64 + .../Google/Cloud/Notebooks/V1/Schedule.php | 448 ++ .../Cloud/Notebooks/V1/Schedule/State.php | 97 + .../V1/SetInstanceAcceleratorRequest.php | 151 + .../Notebooks/V1/SetInstanceLabelsRequest.php | 109 + .../V1/SetInstanceMachineTypeRequest.php | 109 + .../Notebooks/V1/StartInstanceRequest.php | 71 + .../Notebooks/V1/StartRuntimeRequest.php | 119 + .../Notebooks/V1/StopInstanceRequest.php | 71 + .../Cloud/Notebooks/V1/StopRuntimeRequest.php | 119 + .../Notebooks/V1/SwitchRuntimeRequest.php | 197 + .../Notebooks/V1/TriggerScheduleRequest.php | 71 + .../V1/UpdateInstanceConfigRequest.php | 115 + .../V1/UpdateInstanceMetadataItemsRequest.php | 105 + .../UpdateInstanceMetadataItemsResponse.php | 67 + .../Notebooks/V1/UpdateRuntimeRequest.php | 268 + .../UpdateShieldedInstanceConfigRequest.php | 116 + .../V1/UpgradeInstanceInternalRequest.php | 147 + .../Notebooks/V1/UpgradeInstanceRequest.php | 109 + .../Notebooks/V1/UpgradeRuntimeRequest.php | 121 + .../Google/Cloud/Notebooks/V1/UpgradeType.php | 76 + .../Cloud/Notebooks/V1/VirtualMachine.php | 145 + .../Notebooks/V1/VirtualMachineConfig.php | 873 +++ .../V1/VirtualMachineConfig/BootImage.php | 37 + .../V1/VirtualMachineConfig/NicType.php | 65 + .../src/Google/Cloud/Notebooks/V1/VmImage.php | 150 + .../create_runtime.php | 93 + .../delete_runtime.php | 81 + .../diagnose_runtime.php | 102 + .../get_iam_policy.php | 72 + .../get_location.php | 57 + .../get_runtime.php | 73 + .../list_locations.php | 62 + .../list_runtimes.php | 77 + .../refresh_runtime_token_internal.php | 77 + .../report_runtime_event.php | 91 + .../reset_runtime.php | 83 + .../set_iam_policy.php | 77 + .../start_runtime.php | 87 + .../stop_runtime.php | 87 + .../switch_runtime.php | 83 + .../test_iam_permissions.php | 84 + .../update_runtime.php | 74 + .../upgrade_runtime.php | 83 + .../create_environment.php | 90 + .../create_execution.php | 89 + .../NotebookServiceClient/create_instance.php | 96 + .../NotebookServiceClient/create_schedule.php | 89 + .../delete_environment.php | 80 + .../delete_execution.php | 81 + .../NotebookServiceClient/delete_instance.php | 80 + .../NotebookServiceClient/delete_schedule.php | 81 + .../diagnose_instance.php | 102 + .../NotebookServiceClient/get_environment.php | 71 + .../NotebookServiceClient/get_execution.php | 72 + .../NotebookServiceClient/get_iam_policy.php | 72 + .../V1/NotebookServiceClient/get_instance.php | 71 + .../get_instance_health.php | 72 + .../V1/NotebookServiceClient/get_location.php | 57 + .../V1/NotebookServiceClient/get_schedule.php | 72 + .../is_instance_upgradeable.php | 71 + .../list_environments.php | 75 + .../NotebookServiceClient/list_executions.php | 77 + .../NotebookServiceClient/list_instances.php | 76 + .../NotebookServiceClient/list_locations.php | 62 + .../NotebookServiceClient/list_schedules.php | 77 + .../register_instance.php | 92 + .../report_instance_info.php | 90 + .../NotebookServiceClient/reset_instance.php | 83 + .../rollback_instance.php | 87 + .../NotebookServiceClient/set_iam_policy.php | 77 + .../set_instance_accelerator.php | 93 + .../set_instance_labels.php | 83 + .../set_instance_machine_type.php | 87 + .../NotebookServiceClient/start_instance.php | 83 + .../NotebookServiceClient/stop_instance.php | 83 + .../test_iam_permissions.php | 84 + .../trigger_schedule.php | 84 + .../update_instance_config.php | 83 + .../update_instance_metadata_items.php | 71 + .../update_shielded_instance_config.php | 83 + .../upgrade_instance.php | 83 + .../upgrade_instance_internal.php | 88 + .../Client/ManagedNotebookServiceClient.php | 822 ++ .../src/V1/Client/NotebookServiceClient.php | 1471 ++++ .../Notebooks/v1/src/V1/gapic_metadata.json | 312 + ...anaged_notebook_service_client_config.json | 134 + ...ged_notebook_service_descriptor_config.php | 340 + ...ed_notebook_service_rest_client_config.php | 317 + .../notebook_service_client_config.json | 239 + .../notebook_service_descriptor_config.php | 709 ++ .../notebook_service_rest_client_config.php | 563 ++ .../ManagedNotebookServiceClientTest.php | 1971 +++++ .../V1/Client/NotebookServiceClientTest.php | 4758 ++++++++++++ .../Cloud/Notebooks/V2/DiagnosticConfig.php | 35 + .../Google/Cloud/Notebooks/V2/Event.php | Bin 0 -> 1327 bytes .../Google/Cloud/Notebooks/V2/GceSetup.php | Bin 0 -> 3414 bytes .../Google/Cloud/Notebooks/V2/Instance.php | Bin 0 -> 2907 bytes .../Google/Cloud/Notebooks/V2/Service.php | 123 + .../Cloud/Notebooks/V2/AcceleratorConfig.php | 106 + .../V2/AcceleratorConfig/AcceleratorType.php | 121 + .../Google/Cloud/Notebooks/V2/BootDisk.php | 193 + .../V2/CheckInstanceUpgradabilityRequest.php | 71 + .../V2/CheckInstanceUpgradabilityResponse.php | 181 + .../Cloud/Notebooks/V2/ContainerImage.php | 110 + .../Notebooks/V2/CreateInstanceRequest.php | 202 + .../Google/Cloud/Notebooks/V2/DataDisk.php | 189 + .../Notebooks/V2/DeleteInstanceRequest.php | 120 + .../Notebooks/V2/DiagnoseInstanceRequest.php | 166 + .../Cloud/Notebooks/V2/DiagnosticConfig.php | 259 + .../Cloud/Notebooks/V2/DiskEncryption.php | 61 + .../Google/Cloud/Notebooks/V2/DiskType.php | 75 + .../src/Google/Cloud/Notebooks/V2/Event.php | 145 + .../Cloud/Notebooks/V2/Event/EventType.php | 93 + .../Cloud/Notebooks/V2/GPUDriverConfig.php | 117 + .../Google/Cloud/Notebooks/V2/GceSetup.php | 595 ++ .../Cloud/Notebooks/V2/GetInstanceRequest.php | 86 + .../Google/Cloud/Notebooks/V2/HealthState.php | 81 + .../Google/Cloud/Notebooks/V2/Instance.php | 604 ++ .../Notebooks/V2/ListInstancesRequest.php | 230 + .../Notebooks/V2/ListInstancesResponse.php | 147 + .../Cloud/Notebooks/V2/NetworkInterface.php | 155 + .../Notebooks/V2/NetworkInterface/NicType.php | 65 + .../Cloud/Notebooks/V2/OperationMetadata.php | 341 + .../Notebooks/V2/ResetInstanceRequest.php | 71 + .../Notebooks/V2/RollbackInstanceRequest.php | 143 + .../Cloud/Notebooks/V2/ServiceAccount.php | 105 + .../Notebooks/V2/ShieldedInstanceConfig.php | 170 + .../Notebooks/V2/StartInstanceRequest.php | 71 + .../src/Google/Cloud/Notebooks/V2/State.php | 118 + .../Notebooks/V2/StopInstanceRequest.php | 71 + .../Notebooks/V2/UpdateInstanceRequest.php | 170 + .../Notebooks/V2/UpgradeHistoryEntry.php | 353 + .../V2/UpgradeHistoryEntry/Action.php | 64 + .../V2/UpgradeHistoryEntry/State.php | 71 + .../Notebooks/V2/UpgradeInstanceRequest.php | 71 + .../src/Google/Cloud/Notebooks/V2/VmImage.php | 150 + .../check_instance_upgradability.php | 71 + .../NotebookServiceClient/create_instance.php | 89 + .../NotebookServiceClient/delete_instance.php | 81 + .../diagnose_instance.php | 102 + .../NotebookServiceClient/get_iam_policy.php | 72 + .../V2/NotebookServiceClient/get_instance.php | 72 + .../V2/NotebookServiceClient/get_location.php | 57 + .../NotebookServiceClient/list_instances.php | 77 + .../NotebookServiceClient/list_locations.php | 62 + .../NotebookServiceClient/reset_instance.php | 83 + .../rollback_instance.php | 94 + .../NotebookServiceClient/set_iam_policy.php | 77 + .../NotebookServiceClient/start_instance.php | 83 + .../NotebookServiceClient/stop_instance.php | 83 + .../test_iam_permissions.php | 84 + .../NotebookServiceClient/update_instance.php | 74 + .../upgrade_instance.php | 83 + .../src/V2/Client/NotebookServiceClient.php | 780 ++ .../Notebooks/v2/src/V2/gapic_metadata.json | 103 + .../notebook_service_client_config.json | 129 + .../notebook_service_descriptor_config.php | 321 + .../notebook_service_rest_client_config.php | 284 + .../V2/Client/NotebookServiceClientTest.php | 1879 +++++ .../Cloud/Optimization/V1/AsyncModel.php | Bin 0 -> 1677 bytes .../Cloud/Optimization/V1/FleetRouting.php | Bin 0 -> 18781 bytes .../Optimization/V1/AggregatedMetrics.php | 554 ++ .../Optimization/V1/AsyncModelMetadata.php | 193 + .../V1/AsyncModelMetadata/State.php | 78 + .../V1/BatchOptimizeToursRequest.php | 117 + .../AsyncModelConfig.php | 224 + .../V1/BatchOptimizeToursResponse.php | 34 + .../Cloud/Optimization/V1/BreakRule.php | 113 + .../V1/BreakRule/BreakRequest.php | 172 + .../V1/BreakRule/FrequencyConstraint.php | 166 + .../Optimization/V1/CapacityQuantity.php | 90 + .../V1/CapacityQuantityInterval.php | 137 + .../Cloud/Optimization/V1/DataFormat.php | 61 + .../Cloud/Optimization/V1/DistanceLimit.php | 284 + .../Cloud/Optimization/V1/GcsDestination.php | 67 + .../Cloud/Optimization/V1/GcsSource.php | 67 + .../V1/InjectedSolutionConstraint.php | 156 + .../ConstraintRelaxation.php | 151 + .../ConstraintRelaxation/Relaxation.php | 204 + .../ConstraintRelaxation/Relaxation/Level.php | 83 + .../Cloud/Optimization/V1/InputConfig.php | 112 + .../Google/Cloud/Optimization/V1/Location.php | 133 + .../Optimization/V1/OptimizeToursRequest.php | 1237 +++ .../V1/OptimizeToursRequest/SearchMode.php | 65 + .../V1/OptimizeToursRequest/SolvingMode.php | 83 + .../Optimization/V1/OptimizeToursResponse.php | 294 + .../V1/OptimizeToursResponse/Metrics.php | 372 + .../V1/OptimizeToursValidationError.php | 1207 +++ .../FieldReference.php | 197 + .../Cloud/Optimization/V1/OutputConfig.php | 109 + .../Cloud/Optimization/V1/RouteModifiers.php | 204 + .../Google/Cloud/Optimization/V1/Shipment.php | 850 ++ .../Cloud/Optimization/V1/Shipment/Load.php | 81 + .../Optimization/V1/Shipment/VisitRequest.php | 658 ++ .../Cloud/Optimization/V1/ShipmentModel.php | 1057 +++ .../V1/ShipmentModel/BreakRule.php | 120 + .../ShipmentModel/BreakRule/BreakRequest.php | 172 + .../BreakRule/FrequencyConstraint.php | 166 + .../ShipmentModel/DurationDistanceMatrix.php | 137 + .../DurationDistanceMatrix/Row.php | 116 + .../V1/ShipmentModel/PrecedenceRule.php | 243 + .../Cloud/Optimization/V1/ShipmentRoute.php | 954 +++ .../Optimization/V1/ShipmentRoute/Delay.php | 128 + .../V1/ShipmentRoute/EncodedPolyline.php | 73 + .../Optimization/V1/ShipmentRoute/PBBreak.php | 124 + .../V1/ShipmentRoute/Transition.php | 620 ++ .../V1/ShipmentRoute/TravelStep.php | 236 + .../V1/ShipmentRoute/VehicleLoad.php | 80 + .../Optimization/V1/ShipmentRoute/Visit.php | 606 ++ .../V1/ShipmentTypeIncompatibility.php | 107 + .../IncompatibilityMode.php | 72 + .../V1/ShipmentTypeRequirement.php | 156 + .../RequirementMode.php | 80 + .../Cloud/Optimization/V1/SkippedShipment.php | 153 + .../V1/SkippedShipment/Reason.php | 181 + .../V1/SkippedShipment/Reason/Code.php | 116 + .../Cloud/Optimization/V1/TimeWindow.php | 388 + .../Optimization/V1/TransitionAttributes.php | 408 + .../Google/Cloud/Optimization/V1/Vehicle.php | 1581 ++++ .../Optimization/V1/Vehicle/DurationLimit.php | 359 + .../Optimization/V1/Vehicle/LoadLimit.php | 270 + .../V1/Vehicle/LoadLimit/Interval.php | 150 + .../Optimization/V1/Vehicle/TravelMode.php | 67 + .../V1/Vehicle/UnloadingPolicy.php | 68 + .../Google/Cloud/Optimization/V1/Waypoint.php | 166 + .../batch_optimize_tours.php | 105 + .../V1/FleetRoutingClient/optimize_tours.php | 87 + .../v1/src/V1/Client/FleetRoutingClient.php | 314 + .../v1/src/V1/gapic_metadata.json | 28 + .../fleet_routing_client_config.json | 56 + .../fleet_routing_descriptor_config.php | 59 + .../fleet_routing_rest_client_config.php | 86 + .../Unit/V1/Client/FleetRoutingClientTest.php | 329 + .../Oracledatabase/V1/AutonomousDatabase.php | Bin 0 -> 10121 bytes .../V1/AutonomousDatabaseCharacterSet.php | Bin 0 -> 1639 bytes .../Oracledatabase/V1/AutonomousDbBackup.php | Bin 0 -> 2777 bytes .../Oracledatabase/V1/AutonomousDbVersion.php | 36 + .../Google/Cloud/Oracledatabase/V1/Common.php | 30 + .../Google/Cloud/Oracledatabase/V1/DbNode.php | Bin 0 -> 1729 bytes .../Cloud/Oracledatabase/V1/DbServer.php | Bin 0 -> 1820 bytes .../Cloud/Oracledatabase/V1/DbSystemShape.php | 44 + .../Cloud/Oracledatabase/V1/Entitlement.php | Bin 0 -> 1722 bytes .../Cloud/Oracledatabase/V1/ExadataInfra.php | Bin 0 -> 4076 bytes .../Cloud/Oracledatabase/V1/GiVersion.php | 34 + .../Oracledatabase/V1/LocationMetadata.php | 30 + .../Oracledatabase/V1/Oracledatabase.php | 236 + .../Cloud/Oracledatabase/V1/VmCluster.php | Bin 0 -> 3650 bytes .../V1/AllConnectionStrings.php | 148 + .../OracleDatabase/V1/AutonomousDatabase.php | 422 + .../V1/AutonomousDatabaseApex.php | 102 + .../V1/AutonomousDatabaseBackup.php | 234 + .../V1/AutonomousDatabaseBackupProperties.php | 775 ++ .../State.php | 92 + .../Type.php | 71 + .../V1/AutonomousDatabaseCharacterSet.php | 148 + .../CharacterSetType.php | 64 + .../AutonomousDatabaseConnectionStrings.php | 276 + .../V1/AutonomousDatabaseConnectionUrls.php | 327 + .../V1/AutonomousDatabaseProperties.php | 2197 ++++++ .../DataSafeState.php | 85 + .../DatabaseEdition.php | 64 + .../DatabaseManagementState.php | 92 + .../LicenseType.php | 64 + .../LocalDisasterRecoveryType.php | 64 + .../MaintenanceScheduleType.php | 65 + .../AutonomousDatabaseProperties/OpenMode.php | 64 + .../PermissionLevel.php | 64 + .../RefreshableMode.php | 66 + .../RefreshableState.php | 64 + .../V1/AutonomousDatabaseProperties/Role.php | 85 + .../V1/AutonomousDatabaseStandbySummary.php | 250 + .../OracleDatabase/V1/AutonomousDbVersion.php | 182 + .../OracleDatabase/V1/CloudAccountDetails.php | 189 + .../V1/CloudExadataInfrastructure.php | 304 + .../CloudExadataInfrastructureProperties.php | 1025 +++ .../State.php | 99 + .../OracleDatabase/V1/CloudVmCluster.php | 414 + .../V1/CloudVmClusterProperties.php | 1157 +++ .../DiskRedundancy.php | 64 + .../CloudVmClusterProperties/LicenseType.php | 64 + .../V1/CloudVmClusterProperties/State.php | 99 + .../V1/CreateAutonomousDatabaseRequest.php | 241 + ...reateCloudExadataInfrastructureRequest.php | 241 + .../V1/CreateCloudVmClusterRequest.php | 241 + .../OracleDatabase/V1/CustomerContact.php | 72 + .../Cloud/OracleDatabase/V1/DBWorkload.php | 76 + .../V1/DataCollectionOptions.php | 143 + .../V1/DatabaseConnectionStringProfile.php | 352 + .../ConsumerGroup.php | 85 + .../HostFormat.php | 64 + .../Protocol.php | 64 + .../SessionMode.php | 64 + .../SyntaxFormat.php | 71 + .../TLSAuthentication.php | 64 + .../Google/Cloud/OracleDatabase/V1/DbNode.php | 116 + .../OracleDatabase/V1/DbNodeProperties.php | 305 + .../V1/DbNodeProperties/State.php | 113 + .../Cloud/OracleDatabase/V1/DbServer.php | 150 + .../OracleDatabase/V1/DbServerProperties.php | 373 + .../V1/DbServerProperties/State.php | 85 + .../Cloud/OracleDatabase/V1/DbSystemShape.php | 446 ++ .../V1/DeleteAutonomousDatabaseRequest.php | 144 + ...eleteCloudExadataInfrastructureRequest.php | 191 + .../V1/DeleteCloudVmClusterRequest.php | 186 + .../Cloud/OracleDatabase/V1/Entitlement.php | 183 + .../OracleDatabase/V1/Entitlement/State.php | 71 + ...enerateAutonomousDatabaseWalletRequest.php | 210 + ...nerateAutonomousDatabaseWalletResponse.php | 67 + .../Cloud/OracleDatabase/V1/GenerateType.php | 61 + .../V1/GetAutonomousDatabaseRequest.php | 86 + .../GetCloudExadataInfrastructureRequest.php | 91 + .../V1/GetCloudVmClusterRequest.php | 86 + .../Cloud/OracleDatabase/V1/GiVersion.php | 110 + .../ListAutonomousDatabaseBackupsRequest.php | 220 + .../ListAutonomousDatabaseBackupsResponse.php | 101 + ...AutonomousDatabaseCharacterSetsRequest.php | 208 + ...utonomousDatabaseCharacterSetsResponse.php | 101 + .../V1/ListAutonomousDatabasesRequest.php | 230 + .../V1/ListAutonomousDatabasesResponse.php | 101 + .../V1/ListAutonomousDbVersionsRequest.php | 162 + .../V1/ListAutonomousDbVersionsResponse.php | 101 + ...ListCloudExadataInfrastructuresRequest.php | 162 + ...istCloudExadataInfrastructuresResponse.php | 101 + .../V1/ListCloudVmClustersRequest.php | 196 + .../V1/ListCloudVmClustersResponse.php | 101 + .../OracleDatabase/V1/ListDbNodesRequest.php | 162 + .../OracleDatabase/V1/ListDbNodesResponse.php | 101 + .../V1/ListDbServersRequest.php | 162 + .../V1/ListDbServersResponse.php | 101 + .../V1/ListDbSystemShapesRequest.php | 162 + .../V1/ListDbSystemShapesResponse.php | 101 + .../V1/ListEntitlementsRequest.php | 162 + .../V1/ListEntitlementsResponse.php | 101 + .../V1/ListGiVersionsRequest.php | 166 + .../V1/ListGiVersionsResponse.php | 101 + .../OracleDatabase/V1/LocationMetadata.php | 67 + .../OracleDatabase/V1/MaintenanceWindow.php | 404 + .../MaintenanceWindowPreference.php | 64 + .../V1/MaintenanceWindow/PatchingMode.php | 65 + .../OracleDatabase/V1/OperationMetadata.php | 345 + .../V1/OperationsInsightsState.php | 89 + .../V1/RestoreAutonomousDatabaseRequest.php | 132 + .../V1/ScheduledOperationDetails.php | 156 + .../Google/Cloud/OracleDatabase/V1/State.php | 195 + .../create_autonomous_database.php | 109 + .../create_cloud_exadata_infrastructure.php | 94 + .../create_cloud_vm_cluster.php | 126 + .../delete_autonomous_database.php | 85 + .../delete_cloud_exadata_infrastructure.php | 86 + .../delete_cloud_vm_cluster.php | 85 + .../generate_autonomous_database_wallet.php | 80 + .../get_autonomous_database.php | 76 + .../get_cloud_exadata_infrastructure.php | 77 + .../get_cloud_vm_cluster.php | 76 + .../V1/OracleDatabaseClient/get_location.php | 57 + .../list_autonomous_database_backups.php | 75 + ...ist_autonomous_database_character_sets.php | 75 + .../list_autonomous_databases.php | 75 + .../list_autonomous_db_versions.php | 76 + .../list_cloud_exadata_infrastructures.php | 75 + .../list_cloud_vm_clusters.php | 75 + .../V1/OracleDatabaseClient/list_db_nodes.php | 79 + .../OracleDatabaseClient/list_db_servers.php | 79 + .../list_db_system_shapes.php | 75 + .../list_entitlements.php | 75 + .../OracleDatabaseClient/list_gi_versions.php | 76 + .../OracleDatabaseClient/list_locations.php | 60 + .../restore_autonomous_database.php | 91 + .../v1/src/V1/Client/OracleDatabaseClient.php | 1047 +++ .../v1/src/V1/gapic_metadata.json | 138 + .../oracle_database_client_config.json | 167 + .../oracle_database_descriptor_config.php | 470 ++ .../oracle_database_rest_client_config.php | 356 + .../V1/Client/OracleDatabaseClientTest.php | 2376 ++++++ .../Airflow/Service/V1/Environments.php | Bin 0 -> 23403 bytes .../Airflow/Service/V1/ImageVersions.php | 49 + .../Airflow/Service/V1/Operations.php | Bin 0 -> 1505 bytes .../AirflowMetadataRetentionPolicyConfig.php | 101 + .../RetentionMode.php | 64 + .../Service/V1/CheckUpgradeRequest.php | 185 + .../Service/V1/CheckUpgradeResponse.php | 212 + .../CheckUpgradeResponse/ConflictResult.php | 64 + .../V1/CloudDataLineageIntegration.php | 67 + .../Service/V1/CreateEnvironmentRequest.php | 131 + .../CreateUserWorkloadsConfigMapRequest.php | 132 + .../V1/CreateUserWorkloadsSecretRequest.php | 132 + .../Service/V1/DataRetentionConfig.php | 121 + .../Airflow/Service/V1/DatabaseConfig.php | 134 + .../Service/V1/DatabaseFailoverRequest.php | 72 + .../Service/V1/DatabaseFailoverResponse.php | 33 + .../Service/V1/DeleteEnvironmentRequest.php | 85 + .../DeleteUserWorkloadsConfigMapRequest.php | 86 + .../V1/DeleteUserWorkloadsSecretRequest.php | 86 + .../Airflow/Service/V1/EncryptionConfig.php | 77 + .../Airflow/Service/V1/Environment.php | 453 ++ .../Airflow/Service/V1/Environment/State.php | 86 + .../Airflow/Service/V1/EnvironmentConfig.php | 979 +++ .../V1/EnvironmentConfig/EnvironmentSize.php | 71 + .../V1/EnvironmentConfig/ResilienceMode.php | 57 + .../V1/ExecuteAirflowCommandRequest.php | 185 + .../V1/ExecuteAirflowCommandResponse.php | 169 + .../V1/FetchDatabasePropertiesRequest.php | 71 + .../V1/FetchDatabasePropertiesResponse.php | 147 + .../Service/V1/GetEnvironmentRequest.php | 85 + .../V1/GetUserWorkloadsConfigMapRequest.php | 86 + .../V1/GetUserWorkloadsSecretRequest.php | 86 + .../Airflow/Service/V1/IPAllocationPolicy.php | 318 + .../Airflow/Service/V1/ImageVersion.php | 259 + .../Service/V1/ListEnvironmentsRequest.php | 153 + .../Service/V1/ListEnvironmentsResponse.php | 101 + .../Service/V1/ListImageVersionsRequest.php | 187 + .../Service/V1/ListImageVersionsResponse.php | 101 + .../V1/ListUserWorkloadsConfigMapsRequest.php | 158 + .../ListUserWorkloadsConfigMapsResponse.php | 101 + .../V1/ListUserWorkloadsSecretsRequest.php | 158 + .../V1/ListUserWorkloadsSecretsResponse.php | 101 + .../Service/V1/ListWorkloadsRequest.php | 212 + .../Service/V1/ListWorkloadsResponse.php | 101 + .../ComposerWorkload.php | 148 + .../ComposerWorkloadState.php | 92 + .../ComposerWorkloadStatus.php | 138 + .../ComposerWorkloadType.php | 106 + .../Service/V1/LoadSnapshotRequest.php | 261 + .../Service/V1/LoadSnapshotResponse.php | 33 + .../Airflow/Service/V1/MaintenanceWindow.php | 185 + .../V1/MasterAuthorizedNetworksConfig.php | 108 + .../CidrBlock.php | 104 + .../Airflow/Service/V1/NetworkingConfig.php | 76 + .../V1/NetworkingConfig/ConnectionType.php | 69 + .../Airflow/Service/V1/NodeConfig.php | 776 ++ .../Airflow/Service/V1/OperationMetadata.php | 265 + .../Service/V1/OperationMetadata/State.php | 83 + .../Service/V1/OperationMetadata/Type.php | 100 + .../Service/V1/PollAirflowCommandRequest.php | 207 + .../Service/V1/PollAirflowCommandResponse.php | 149 + .../PollAirflowCommandResponse/ExitInfo.php | 104 + .../V1/PollAirflowCommandResponse/Line.php | 104 + .../Service/V1/PrivateClusterConfig.php | 160 + .../Service/V1/PrivateEnvironmentConfig.php | 564 ++ .../Airflow/Service/V1/RecoveryConfig.php | 77 + .../Service/V1/SaveSnapshotRequest.php | 109 + .../Service/V1/SaveSnapshotResponse.php | 79 + .../Service/V1/ScheduledSnapshotsConfig.php | 185 + .../Airflow/Service/V1/SoftwareConfig.php | 583 ++ .../SoftwareConfig/WebServerPluginsMode.php | 64 + .../Service/V1/StopAirflowCommandRequest.php | 211 + .../Service/V1/StopAirflowCommandResponse.php | 101 + .../Airflow/Service/V1/StorageConfig.php | 71 + .../Service/V1/TaskLogsRetentionConfig.php | 67 + .../TaskLogsStorageMode.php | 65 + .../Service/V1/UpdateEnvironmentRequest.php | 756 ++ .../UpdateUserWorkloadsConfigMapRequest.php | 90 + .../V1/UpdateUserWorkloadsSecretRequest.php | 90 + .../Service/V1/UserWorkloadsConfigMap.php | 134 + .../Service/V1/UserWorkloadsSecret.php | 138 + .../Airflow/Service/V1/WebServerConfig.php | 89 + .../V1/WebServerNetworkAccessControl.php | 67 + .../AllowedIpRange.php | 132 + .../Airflow/Service/V1/WorkloadsConfig.php | 263 + .../WorkloadsConfig/DagProcessorResource.php | 190 + .../V1/WorkloadsConfig/SchedulerResource.php | 180 + .../V1/WorkloadsConfig/TriggererResource.php | 142 + .../V1/WorkloadsConfig/WebServerResource.php | 138 + .../V1/WorkloadsConfig/WorkerResource.php | 214 + .../V1/EnvironmentsClient/check_upgrade.php | 86 + .../EnvironmentsClient/create_environment.php | 69 + .../create_user_workloads_config_map.php | 77 + .../create_user_workloads_secret.php | 77 + .../EnvironmentsClient/database_failover.php | 69 + .../EnvironmentsClient/delete_environment.php | 66 + .../delete_user_workloads_config_map.php | 78 + .../delete_user_workloads_secret.php | 78 + .../execute_airflow_command.php | 57 + .../fetch_database_properties.php | 76 + .../V1/EnvironmentsClient/get_environment.php | 57 + .../get_user_workloads_config_map.php | 80 + .../get_user_workloads_secret.php | 81 + .../EnvironmentsClient/list_environments.php | 62 + .../list_user_workloads_config_maps.php | 80 + .../list_user_workloads_secrets.php | 80 + .../V1/EnvironmentsClient/list_workloads.php | 81 + .../V1/EnvironmentsClient/load_snapshot.php | 72 + .../poll_airflow_command.php | 57 + .../V1/EnvironmentsClient/save_snapshot.php | 72 + .../stop_airflow_command.php | 57 + .../EnvironmentsClient/update_environment.php | 69 + .../update_user_workloads_config_map.php | 60 + .../update_user_workloads_secret.php | 60 + .../list_image_versions.php | 62 + .../v1/src/V1/Client/EnvironmentsClient.php | 1040 +++ .../v1/src/V1/Client/ImageVersionsClient.php | 193 + .../v1/src/V1/gapic_metadata.json | 152 + .../resources/environments_client_config.json | 142 + .../environments_descriptor_config.php | 404 + .../environments_rest_client_config.php | 343 + .../image_versions_client_config.json | 27 + .../image_versions_descriptor_config.php | 48 + .../image_versions_rest_client_config.php | 75 + .../Unit/V1/Client/EnvironmentsClientTest.php | 2084 +++++ .../V1/Client/ImageVersionsClientTest.php | 159 + .../Google/Cloud/Orgpolicy/V2/Constraint.php | Bin 0 -> 2426 bytes .../Google/Cloud/Orgpolicy/V2/Orgpolicy.php | Bin 0 -> 7185 bytes .../OrgPolicy/V2/AlternatePolicySpec.php | 120 + .../Google/Cloud/OrgPolicy/V2/Constraint.php | 322 + .../V2/Constraint/BooleanConstraint.php | 39 + .../V2/Constraint/ConstraintDefault.php | 69 + .../V2/Constraint/ListConstraint.php | 125 + .../V2/CreateCustomConstraintRequest.php | 134 + .../OrgPolicy/V2/CreatePolicyRequest.php | 154 + .../Cloud/OrgPolicy/V2/CustomConstraint.php | 375 + .../V2/CustomConstraint/ActionType.php | 64 + .../V2/CustomConstraint/MethodType.php | 91 + .../V2/DeleteCustomConstraintRequest.php | 87 + .../OrgPolicy/V2/DeletePolicyRequest.php | 129 + .../V2/GetCustomConstraintRequest.php | 87 + .../V2/GetEffectivePolicyRequest.php | 87 + .../Cloud/OrgPolicy/V2/GetPolicyRequest.php | 87 + .../OrgPolicy/V2/ListConstraintsRequest.php | 188 + .../OrgPolicy/V2/ListConstraintsResponse.php | 102 + .../V2/ListCustomConstraintsRequest.php | 178 + .../V2/ListCustomConstraintsResponse.php | 111 + .../OrgPolicy/V2/ListPoliciesRequest.php | 193 + .../OrgPolicy/V2/ListPoliciesResponse.php | 111 + .../src/Google/Cloud/OrgPolicy/V2/Policy.php | 297 + .../Google/Cloud/OrgPolicy/V2/PolicySpec.php | 310 + .../OrgPolicy/V2/PolicySpec/PolicyRule.php | 280 + .../V2/PolicySpec/PolicyRule/StringValues.php | 118 + .../V2/UpdateCustomConstraintRequest.php | 91 + .../OrgPolicy/V2/UpdatePolicyRequest.php | 143 + .../create_custom_constraint.php | 80 + .../V2/OrgPolicyClient/create_policy.php | 84 + .../delete_custom_constraint.php | 73 + .../V2/OrgPolicyClient/delete_policy.php | 73 + .../OrgPolicyClient/get_custom_constraint.php | 75 + .../OrgPolicyClient/get_effective_policy.php | 77 + .../samples/V2/OrgPolicyClient/get_policy.php | 76 + .../V2/OrgPolicyClient/list_constraints.php | 82 + .../list_custom_constraints.php | 81 + .../V2/OrgPolicyClient/list_policies.php | 83 + .../update_custom_constraint.php | 65 + .../V2/OrgPolicyClient/update_policy.php | 67 + .../v2/src/V2/Client/OrgPolicyClient.php | 729 ++ .../OrgPolicy/v2/src/V2/gapic_metadata.json | 78 + .../resources/org_policy_client_config.json | 95 + .../org_policy_descriptor_config.php | 208 + .../org_policy_rest_client_config.php | 241 + .../Unit/V2/Client/OrgPolicyClientTest.php | 942 +++ .../Google/Cloud/Osconfig/V1/Inventory.php | Bin 0 -> 4419 bytes .../Google/Cloud/Osconfig/V1/OsPolicy.php | Bin 0 -> 5077 bytes .../Osconfig/V1/OsPolicyAssignmentReports.php | Bin 0 -> 3585 bytes .../Cloud/Osconfig/V1/OsPolicyAssignments.php | Bin 0 -> 4721 bytes .../Cloud/Osconfig/V1/OsconfigCommon.php | Bin 0 -> 889 bytes .../Cloud/Osconfig/V1/OsconfigService.php | 47 + .../Osconfig/V1/OsconfigZonalService.php | 50 + .../Cloud/Osconfig/V1/PatchDeployments.php | Bin 0 -> 4584 bytes .../Google/Cloud/Osconfig/V1/PatchJobs.php | Bin 0 -> 6898 bytes .../Cloud/Osconfig/V1/Vulnerability.php | Bin 0 -> 3891 bytes .../Google/Cloud/OsConfig/V1/AptSettings.php | 152 + .../Cloud/OsConfig/V1/AptSettings/Type.php | 64 + .../src/Google/Cloud/OsConfig/V1/CVSSv3.php | 460 ++ .../OsConfig/V1/CVSSv3/AttackComplexity.php | 71 + .../Cloud/OsConfig/V1/CVSSv3/AttackVector.php | 84 + .../Cloud/OsConfig/V1/CVSSv3/Impact.php | 73 + .../OsConfig/V1/CVSSv3/PrivilegesRequired.php | 79 + .../Google/Cloud/OsConfig/V1/CVSSv3/Scope.php | 67 + .../OsConfig/V1/CVSSv3/UserInteraction.php | 67 + .../OsConfig/V1/CancelPatchJobRequest.php | 67 + .../V1/CreateOSPolicyAssignmentRequest.php | 199 + .../V1/CreatePatchDeploymentRequest.php | 198 + .../V1/DeleteOSPolicyAssignmentRequest.php | 81 + .../V1/DeletePatchDeploymentRequest.php | 86 + .../src/Google/Cloud/OsConfig/V1/ExecStep.php | 121 + .../Cloud/OsConfig/V1/ExecStepConfig.php | 192 + .../V1/ExecStepConfig/Interpreter.php | 68 + .../OsConfig/V1/ExecutePatchJobRequest.php | 366 + .../Cloud/OsConfig/V1/FixedOrPercent.php | 112 + .../Google/Cloud/OsConfig/V1/GcsObject.php | 139 + .../Cloud/OsConfig/V1/GetInventoryRequest.php | 146 + .../V1/GetOSPolicyAssignmentReportRequest.php | 113 + .../V1/GetOSPolicyAssignmentRequest.php | 92 + .../OsConfig/V1/GetPatchDeploymentRequest.php | 86 + .../Cloud/OsConfig/V1/GetPatchJobRequest.php | 81 + .../V1/GetVulnerabilityReportRequest.php | 108 + .../Google/Cloud/OsConfig/V1/GooSettings.php | 33 + .../src/Google/Cloud/OsConfig/V1/Instance.php | 33 + .../Cloud/OsConfig/V1/Instance/PatchState.php | 157 + .../Google/Cloud/OsConfig/V1/Inventory.php | 213 + .../Cloud/OsConfig/V1/Inventory/Item.php | 301 + .../OsConfig/V1/Inventory/Item/OriginType.php | 58 + .../Cloud/OsConfig/V1/Inventory/Item/Type.php | 64 + .../Cloud/OsConfig/V1/Inventory/OsInfo.php | 320 + .../OsConfig/V1/Inventory/SoftwarePackage.php | 387 + .../V1/Inventory/VersionedPackage.php | 139 + .../V1/Inventory/WindowsApplication.php | 226 + .../WindowsQuickFixEngineeringPackage.php | 185 + .../V1/Inventory/WindowsUpdatePackage.php | 368 + .../WindowsUpdateCategory.php | 104 + .../OsConfig/V1/Inventory/ZypperPatch.php | 172 + .../Cloud/OsConfig/V1/InventoryView.php | 62 + .../OsConfig/V1/ListInventoriesRequest.php | 246 + .../OsConfig/V1/ListInventoriesResponse.php | 102 + .../ListOSPolicyAssignmentReportsRequest.php | 283 + .../ListOSPolicyAssignmentReportsResponse.php | 106 + ...ListOSPolicyAssignmentRevisionsRequest.php | 157 + ...istOSPolicyAssignmentRevisionsResponse.php | 105 + .../V1/ListOSPolicyAssignmentsRequest.php | 157 + .../V1/ListOSPolicyAssignmentsResponse.php | 101 + .../V1/ListPatchDeploymentsRequest.php | 161 + .../V1/ListPatchDeploymentsResponse.php | 105 + .../V1/ListPatchJobInstanceDetailsRequest.php | 200 + .../ListPatchJobInstanceDetailsResponse.php | 101 + .../OsConfig/V1/ListPatchJobsRequest.php | 195 + .../OsConfig/V1/ListPatchJobsResponse.php | 101 + .../V1/ListVulnerabilityReportsRequest.php | 208 + .../V1/ListVulnerabilityReportsResponse.php | 106 + .../Cloud/OsConfig/V1/MonthlySchedule.php | 118 + .../src/Google/Cloud/OsConfig/V1/OSPolicy.php | 263 + .../OsConfig/V1/OSPolicy/InventoryFilter.php | 120 + .../Cloud/OsConfig/V1/OSPolicy/Mode.php | 67 + .../Cloud/OsConfig/V1/OSPolicy/Resource.php | 235 + .../V1/OSPolicy/Resource/ExecResource.php | 165 + .../OSPolicy/Resource/ExecResource/Exec.php | 236 + .../ExecResource/Exec/Interpreter.php | 76 + .../OsConfig/V1/OSPolicy/Resource/File.php | 190 + .../V1/OSPolicy/Resource/File/Gcs.php | 138 + .../V1/OSPolicy/Resource/File/Remote.php | 108 + .../V1/OSPolicy/Resource/FileResource.php | 260 + .../Resource/FileResource/DesiredState.php | 72 + .../V1/OSPolicy/Resource/PackageResource.php | 310 + .../OSPolicy/Resource/PackageResource/APT.php | 72 + .../OSPolicy/Resource/PackageResource/Deb.php | 126 + .../Resource/PackageResource/DesiredState.php | 65 + .../Resource/PackageResource/GooGet.php | 72 + .../OSPolicy/Resource/PackageResource/MSI.php | 126 + .../OSPolicy/Resource/PackageResource/RPM.php | 126 + .../OSPolicy/Resource/PackageResource/YUM.php | 72 + .../Resource/PackageResource/Zypper.php | 72 + .../OSPolicy/Resource/RepositoryResource.php | 177 + .../RepositoryResource/AptRepository.php | 216 + .../AptRepository/ArchiveType.php | 64 + .../RepositoryResource/GooRepository.php | 106 + .../RepositoryResource/YumRepository.php | 186 + .../RepositoryResource/ZypperRepository.php | 186 + .../OsConfig/V1/OSPolicy/ResourceGroup.php | 149 + .../Cloud/OsConfig/V1/OSPolicyAssignment.php | 597 ++ .../V1/OSPolicyAssignment/InstanceFilter.php | 202 + .../InstanceFilter/Inventory.php | 120 + .../V1/OSPolicyAssignment/LabelSet.php | 86 + .../V1/OSPolicyAssignment/Rollout.php | 145 + .../V1/OSPolicyAssignment/RolloutState.php | 78 + .../OSPolicyAssignmentOperationMetadata.php | 232 + .../APIMethod.php | 71 + .../RolloutState.php | 78 + .../OsConfig/V1/OSPolicyAssignmentReport.php | 287 + .../OSPolicyCompliance.php | 244 + .../OSPolicyCompliance/ComplianceState.php | 70 + .../OSPolicyResourceCompliance.php | 262 + .../ComplianceState.php | 66 + .../ExecResourceOutput.php | 74 + .../OSPolicyResourceConfigStep.php | 109 + .../OSPolicyResourceConfigStep/Type.php | 84 + .../Cloud/OsConfig/V1/OneTimeSchedule.php | 78 + .../Google/Cloud/OsConfig/V1/PatchConfig.php | 426 + .../OsConfig/V1/PatchConfig/RebootConfig.php | 78 + .../Cloud/OsConfig/V1/PatchDeployment.php | 558 ++ .../OsConfig/V1/PatchDeployment/State.php | 65 + .../Cloud/OsConfig/V1/PatchInstanceFilter.php | 238 + .../V1/PatchInstanceFilter/GroupLabel.php | 80 + .../src/Google/Cloud/OsConfig/V1/PatchJob.php | 643 ++ .../V1/PatchJob/InstanceDetailsSummary.php | 557 ++ .../Cloud/OsConfig/V1/PatchJob/State.php | 100 + .../OsConfig/V1/PatchJobInstanceDetails.php | 210 + .../Google/Cloud/OsConfig/V1/PatchRollout.php | 184 + .../Cloud/OsConfig/V1/PatchRollout/Mode.php | 69 + .../V1/PausePatchDeploymentRequest.php | 86 + .../Cloud/OsConfig/V1/RecurringSchedule.php | 418 + .../V1/RecurringSchedule/Frequency.php | 74 + .../V1/ResumePatchDeploymentRequest.php | 86 + .../V1/UpdateOSPolicyAssignmentRequest.php | 141 + .../V1/UpdatePatchDeploymentRequest.php | 141 + .../Cloud/OsConfig/V1/VulnerabilityReport.php | 160 + .../V1/VulnerabilityReport/Vulnerability.php | 320 + .../Vulnerability/Details.php | 263 + .../Vulnerability/Details/Reference.php | 104 + .../Vulnerability/Item.php | 213 + .../Cloud/OsConfig/V1/WeekDayOfMonth.php | 163 + .../Cloud/OsConfig/V1/WeeklySchedule.php | 67 + .../OsConfig/V1/WindowsUpdateSettings.php | 147 + .../WindowsUpdateSettings/Classification.php | 132 + .../Google/Cloud/OsConfig/V1/YumSettings.php | 191 + .../Cloud/OsConfig/V1/ZypperSettings.php | 254 + .../cancel_patch_job.php | 72 + .../create_patch_deployment.php | 92 + .../delete_patch_deployment.php | 70 + .../execute_patch_job.php | 74 + .../get_patch_deployment.php | 72 + .../OsConfigServiceClient/get_patch_job.php | 72 + .../list_patch_deployments.php | 76 + .../list_patch_job_instance_details.php | 77 + .../OsConfigServiceClient/list_patch_jobs.php | 76 + .../pause_patch_deployment.php | 73 + .../resume_patch_deployment.php | 73 + .../update_patch_deployment.php | 68 + .../create_os_policy_assignment.php | 161 + .../delete_os_policy_assignment.php | 95 + .../get_inventory.php | 79 + .../get_os_policy_assignment.php | 82 + .../get_os_policy_assignment_report.php | 85 + .../get_vulnerability_report.php | 83 + .../list_inventories.php | 80 + .../list_os_policy_assignment_reports.php | 102 + .../list_os_policy_assignment_revisions.php | 80 + .../list_os_policy_assignments.php | 78 + .../list_vulnerability_reports.php | 80 + .../update_os_policy_assignment.php | 142 + .../src/V1/Client/OsConfigServiceClient.php | 595 ++ .../V1/Client/OsConfigZonalServiceClient.php | 821 ++ .../OsConfig/v1/src/V1/gapic_metadata.json | 147 + .../os_config_service_client_config.json | 94 + .../os_config_service_descriptor_config.php | 202 + .../os_config_service_rest_client_config.php | 196 + ...os_config_zonal_service_client_config.json | 94 + ...config_zonal_service_descriptor_config.php | 245 + ...onfig_zonal_service_rest_client_config.php | 192 + .../V1/Client/OsConfigServiceClientTest.php | 1000 +++ .../Client/OsConfigZonalServiceClientTest.php | 1271 +++ .../Google/Cloud/Oslogin/Common/Common.php | Bin 0 -> 1639 bytes .../Google/Cloud/Oslogin/V1/Oslogin.php | 80 + .../OsLogin/Common/OperatingSystemType.php | 62 + .../Cloud/OsLogin/Common/PosixAccount.php | 411 + .../Cloud/OsLogin/Common/SshPublicKey.php | 177 + .../OsLogin/V1/CreateSshPublicKeyRequest.php | 127 + .../OsLogin/V1/DeletePosixAccountRequest.php | 91 + .../OsLogin/V1/DeleteSshPublicKeyRequest.php | 91 + .../OsLogin/V1/GetLoginProfileRequest.php | 149 + .../OsLogin/V1/GetSshPublicKeyRequest.php | 91 + .../OsLogin/V1/ImportSshPublicKeyRequest.php | 221 + .../OsLogin/V1/ImportSshPublicKeyResponse.php | 111 + .../Google/Cloud/OsLogin/V1/LoginProfile.php | 136 + .../OsLogin/V1/UpdateSshPublicKeyRequest.php | 201 + .../create_ssh_public_key.php | 73 + .../delete_posix_account.php | 71 + .../delete_ssh_public_key.php | 71 + .../get_login_profile.php | 72 + .../get_ssh_public_key.php | 73 + .../import_ssh_public_key.php | 73 + .../update_ssh_public_key.php | 76 + .../v1/src/V1/Client/OsLoginServiceClient.php | 451 ++ .../OsLogin/v1/src/V1/gapic_metadata.json | 53 + .../os_login_service_client_config.json | 70 + .../os_login_service_descriptor_config.php | 117 + .../os_login_service_rest_client_config.php | 109 + .../V1/Client/OsLoginServiceClientTest.php | 582 ++ 2359 files changed, 433440 insertions(+) create mode 100644 owl-bot-staging/ManagedIdentities/v1/proto/src/GPBMetadata/Google/Cloud/Managedidentities/V1/ManagedIdentitiesService.php create mode 100644 owl-bot-staging/ManagedIdentities/v1/proto/src/GPBMetadata/Google/Cloud/Managedidentities/V1/Resource.php create mode 100644 owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/AttachTrustRequest.php create mode 100644 owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/CreateMicrosoftAdDomainRequest.php create mode 100644 owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/DeleteDomainRequest.php create mode 100644 owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/DetachTrustRequest.php create mode 100644 owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/Domain.php create mode 100644 owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/Domain/State.php create mode 100644 owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/GetDomainRequest.php create mode 100644 owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/ListDomainsRequest.php create mode 100644 owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/ListDomainsResponse.php create mode 100644 owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/OpMetadata.php create mode 100644 owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/ReconfigureTrustRequest.php create mode 100644 owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/ResetAdminPasswordRequest.php create mode 100644 owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/ResetAdminPasswordResponse.php create mode 100644 owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/Trust.php create mode 100644 owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/Trust/State.php create mode 100644 owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/Trust/TrustDirection.php create mode 100644 owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/Trust/TrustType.php create mode 100644 owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/UpdateDomainRequest.php create mode 100644 owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/ValidateTrustRequest.php create mode 100644 owl-bot-staging/ManagedIdentities/v1/samples/V1/ManagedIdentitiesServiceClient/attach_trust.php create mode 100644 owl-bot-staging/ManagedIdentities/v1/samples/V1/ManagedIdentitiesServiceClient/create_microsoft_ad_domain.php create mode 100644 owl-bot-staging/ManagedIdentities/v1/samples/V1/ManagedIdentitiesServiceClient/delete_domain.php create mode 100644 owl-bot-staging/ManagedIdentities/v1/samples/V1/ManagedIdentitiesServiceClient/detach_trust.php create mode 100644 owl-bot-staging/ManagedIdentities/v1/samples/V1/ManagedIdentitiesServiceClient/get_domain.php create mode 100644 owl-bot-staging/ManagedIdentities/v1/samples/V1/ManagedIdentitiesServiceClient/list_domains.php create mode 100644 owl-bot-staging/ManagedIdentities/v1/samples/V1/ManagedIdentitiesServiceClient/reconfigure_trust.php create mode 100644 owl-bot-staging/ManagedIdentities/v1/samples/V1/ManagedIdentitiesServiceClient/reset_admin_password.php create mode 100644 owl-bot-staging/ManagedIdentities/v1/samples/V1/ManagedIdentitiesServiceClient/update_domain.php create mode 100644 owl-bot-staging/ManagedIdentities/v1/samples/V1/ManagedIdentitiesServiceClient/validate_trust.php create mode 100644 owl-bot-staging/ManagedIdentities/v1/src/V1/Client/ManagedIdentitiesServiceClient.php create mode 100644 owl-bot-staging/ManagedIdentities/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/ManagedIdentities/v1/src/V1/resources/managed_identities_service_client_config.json create mode 100644 owl-bot-staging/ManagedIdentities/v1/src/V1/resources/managed_identities_service_descriptor_config.php create mode 100644 owl-bot-staging/ManagedIdentities/v1/src/V1/resources/managed_identities_service_rest_client_config.php create mode 100644 owl-bot-staging/ManagedIdentities/v1/tests/Unit/V1/Client/ManagedIdentitiesServiceClientTest.php create mode 100644 owl-bot-staging/ManagedKafka/v1/proto/src/GPBMetadata/Google/Cloud/Managedkafka/V1/ManagedKafka.php create mode 100644 owl-bot-staging/ManagedKafka/v1/proto/src/GPBMetadata/Google/Cloud/Managedkafka/V1/Resources.php create mode 100644 owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/AccessConfig.php create mode 100644 owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/CapacityConfig.php create mode 100644 owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/Cluster.php create mode 100644 owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/Cluster/State.php create mode 100644 owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/ConsumerGroup.php create mode 100644 owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/ConsumerPartitionMetadata.php create mode 100644 owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/ConsumerTopicMetadata.php create mode 100644 owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/CreateClusterRequest.php create mode 100644 owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/CreateTopicRequest.php create mode 100644 owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/DeleteClusterRequest.php create mode 100644 owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/DeleteConsumerGroupRequest.php create mode 100644 owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/DeleteTopicRequest.php create mode 100644 owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/GcpConfig.php create mode 100644 owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/GetClusterRequest.php create mode 100644 owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/GetConsumerGroupRequest.php create mode 100644 owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/GetTopicRequest.php create mode 100644 owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/ListClustersRequest.php create mode 100644 owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/ListClustersResponse.php create mode 100644 owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/ListConsumerGroupsRequest.php create mode 100644 owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/ListConsumerGroupsResponse.php create mode 100644 owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/ListTopicsRequest.php create mode 100644 owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/ListTopicsResponse.php create mode 100644 owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/NetworkConfig.php create mode 100644 owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/OperationMetadata.php create mode 100644 owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/RebalanceConfig.php create mode 100644 owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/RebalanceConfig/Mode.php create mode 100644 owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/Topic.php create mode 100644 owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/UpdateClusterRequest.php create mode 100644 owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/UpdateConsumerGroupRequest.php create mode 100644 owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/UpdateTopicRequest.php create mode 100644 owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/create_cluster.php create mode 100644 owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/create_topic.php create mode 100644 owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/delete_cluster.php create mode 100644 owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/delete_consumer_group.php create mode 100644 owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/delete_topic.php create mode 100644 owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/get_cluster.php create mode 100644 owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/get_consumer_group.php create mode 100644 owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/get_location.php create mode 100644 owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/get_topic.php create mode 100644 owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/list_clusters.php create mode 100644 owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/list_consumer_groups.php create mode 100644 owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/list_locations.php create mode 100644 owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/list_topics.php create mode 100644 owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/update_cluster.php create mode 100644 owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/update_consumer_group.php create mode 100644 owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/update_topic.php create mode 100644 owl-bot-staging/ManagedKafka/v1/src/V1/Client/ManagedKafkaClient.php create mode 100644 owl-bot-staging/ManagedKafka/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/ManagedKafka/v1/src/V1/resources/managed_kafka_client_config.json create mode 100644 owl-bot-staging/ManagedKafka/v1/src/V1/resources/managed_kafka_descriptor_config.php create mode 100644 owl-bot-staging/ManagedKafka/v1/src/V1/resources/managed_kafka_rest_client_config.php create mode 100644 owl-bot-staging/ManagedKafka/v1/tests/Unit/V1/Client/ManagedKafkaClientTest.php create mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/GPBMetadata/Google/Maps/Fleetengine/Delivery/V1/Common.php create mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/GPBMetadata/Google/Maps/Fleetengine/Delivery/V1/DeliveryApi.php create mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/GPBMetadata/Google/Maps/Fleetengine/Delivery/V1/DeliveryVehicles.php create mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/GPBMetadata/Google/Maps/Fleetengine/Delivery/V1/Header.php create mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/GPBMetadata/Google/Maps/Fleetengine/Delivery/V1/TaskTrackingInfo.php create mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/GPBMetadata/Google/Maps/Fleetengine/Delivery/V1/Tasks.php create mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/BatchCreateTasksRequest.php create mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/BatchCreateTasksResponse.php create mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/CreateDeliveryVehicleRequest.php create mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/CreateTaskRequest.php create mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/DeliveryRequestHeader.php create mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/DeliveryRequestHeader/Platform.php create mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/DeliveryRequestHeader/SdkType.php create mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/DeliveryVehicle.php create mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/DeliveryVehicle/DeliveryVehicleType.php create mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/DeliveryVehicleAttribute.php create mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/DeliveryVehicleLocation.php create mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/DeliveryVehicleLocationSensor.php create mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/DeliveryVehicleNavigationStatus.php create mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/GetDeliveryVehicleRequest.php create mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/GetTaskRequest.php create mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/GetTaskTrackingInfoRequest.php create mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/ListDeliveryVehiclesRequest.php create mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/ListDeliveryVehiclesResponse.php create mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/ListTasksRequest.php create mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/ListTasksResponse.php create mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/LocationInfo.php create mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/Task.php create mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/Task/JourneySharingInfo.php create mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/Task/State.php create mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/Task/TaskOutcome.php create mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/Task/TaskOutcomeLocationSource.php create mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/Task/Type.php create mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/TaskAttribute.php create mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/TaskTrackingInfo.php create mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/TaskTrackingViewConfig.php create mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/TaskTrackingViewConfig/VisibilityOption.php create mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/TimeWindow.php create mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/UpdateDeliveryVehicleRequest.php create mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/UpdateTaskRequest.php create mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/VehicleJourneySegment.php create mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/VehicleStop.php create mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/VehicleStop/State.php create mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/VehicleStop/TaskInfo.php create mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/samples/V1/DeliveryServiceClient/batch_create_tasks.php create mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/samples/V1/DeliveryServiceClient/create_delivery_vehicle.php create mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/samples/V1/DeliveryServiceClient/create_task.php create mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/samples/V1/DeliveryServiceClient/get_delivery_vehicle.php create mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/samples/V1/DeliveryServiceClient/get_task.php create mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/samples/V1/DeliveryServiceClient/get_task_tracking_info.php create mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/samples/V1/DeliveryServiceClient/list_delivery_vehicles.php create mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/samples/V1/DeliveryServiceClient/list_tasks.php create mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/samples/V1/DeliveryServiceClient/update_delivery_vehicle.php create mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/samples/V1/DeliveryServiceClient/update_task.php create mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/src/V1/Client/DeliveryServiceClient.php create mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/src/V1/resources/delivery_service_client_config.json create mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/src/V1/resources/delivery_service_descriptor_config.php create mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/src/V1/resources/delivery_service_rest_client_config.php create mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/tests/Unit/V1/Client/DeliveryServiceClientTest.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/GPBMetadata/Google/Maps/Routeoptimization/V1/RouteOptimizationService.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/AggregatedMetrics.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BatchOptimizeToursMetadata.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BatchOptimizeToursRequest.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BatchOptimizeToursRequest/AsyncModelConfig.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BatchOptimizeToursResponse.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BreakRule.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BreakRule/BreakRequest.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BreakRule/FrequencyConstraint.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/DataFormat.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/DistanceLimit.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/GcsDestination.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/GcsSource.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/InjectedSolutionConstraint.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/InjectedSolutionConstraint/ConstraintRelaxation.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/InjectedSolutionConstraint/ConstraintRelaxation/Relaxation.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/InjectedSolutionConstraint/ConstraintRelaxation/Relaxation/Level.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/InputConfig.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Location.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursRequest.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursRequest/SearchMode.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursRequest/SolvingMode.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursResponse.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursResponse/Metrics.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursValidationError.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursValidationError/FieldReference.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OutputConfig.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/RouteModifiers.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Shipment.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Shipment/Load.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Shipment/VisitRequest.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentModel.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentModel/DurationDistanceMatrix.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentModel/DurationDistanceMatrix/Row.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentModel/PrecedenceRule.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentRoute.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentRoute/EncodedPolyline.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentRoute/PBBreak.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentRoute/Transition.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentRoute/VehicleLoad.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentRoute/Visit.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentTypeIncompatibility.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentTypeIncompatibility/IncompatibilityMode.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentTypeRequirement.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentTypeRequirement/RequirementMode.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/SkippedShipment.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/SkippedShipment/Reason.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/SkippedShipment/Reason/Code.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/TimeWindow.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/TransitionAttributes.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Vehicle.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Vehicle/DurationLimit.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Vehicle/LoadLimit.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Vehicle/LoadLimit/Interval.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Vehicle/TravelMode.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Vehicle/UnloadingPolicy.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Waypoint.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/samples/V1/RouteOptimizationClient/batch_optimize_tours.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/samples/V1/RouteOptimizationClient/optimize_tours.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/src/V1/Client/RouteOptimizationClient.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/src/V1/resources/route_optimization_client_config.json create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/src/V1/resources/route_optimization_descriptor_config.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/src/V1/resources/route_optimization_rest_client_config.php create mode 100644 owl-bot-staging/MapsRouteOptimization/v1/tests/Unit/V1/Client/RouteOptimizationClientTest.php create mode 100644 owl-bot-staging/MediaTranslation/v1beta1/proto/src/GPBMetadata/Google/Cloud/Mediatranslation/V1Beta1/MediaTranslation.php create mode 100644 owl-bot-staging/MediaTranslation/v1beta1/proto/src/Google/Cloud/MediaTranslation/V1beta1/StreamingTranslateSpeechConfig.php create mode 100644 owl-bot-staging/MediaTranslation/v1beta1/proto/src/Google/Cloud/MediaTranslation/V1beta1/StreamingTranslateSpeechRequest.php create mode 100644 owl-bot-staging/MediaTranslation/v1beta1/proto/src/Google/Cloud/MediaTranslation/V1beta1/StreamingTranslateSpeechResponse.php create mode 100644 owl-bot-staging/MediaTranslation/v1beta1/proto/src/Google/Cloud/MediaTranslation/V1beta1/StreamingTranslateSpeechResponse/SpeechEventType.php create mode 100644 owl-bot-staging/MediaTranslation/v1beta1/proto/src/Google/Cloud/MediaTranslation/V1beta1/StreamingTranslateSpeechResult.php create mode 100644 owl-bot-staging/MediaTranslation/v1beta1/proto/src/Google/Cloud/MediaTranslation/V1beta1/StreamingTranslateSpeechResult/TextTranslationResult.php create mode 100644 owl-bot-staging/MediaTranslation/v1beta1/proto/src/Google/Cloud/MediaTranslation/V1beta1/TranslateSpeechConfig.php create mode 100644 owl-bot-staging/MediaTranslation/v1beta1/samples/V1beta1/SpeechTranslationServiceClient/streaming_translate_speech.php create mode 100644 owl-bot-staging/MediaTranslation/v1beta1/src/V1beta1/Client/SpeechTranslationServiceClient.php create mode 100644 owl-bot-staging/MediaTranslation/v1beta1/src/V1beta1/Gapic/SpeechTranslationServiceGapicClient.php create mode 100644 owl-bot-staging/MediaTranslation/v1beta1/src/V1beta1/SpeechTranslationServiceClient.php create mode 100644 owl-bot-staging/MediaTranslation/v1beta1/src/V1beta1/gapic_metadata.json create mode 100644 owl-bot-staging/MediaTranslation/v1beta1/src/V1beta1/resources/speech_translation_service_client_config.json create mode 100644 owl-bot-staging/MediaTranslation/v1beta1/src/V1beta1/resources/speech_translation_service_descriptor_config.php create mode 100644 owl-bot-staging/MediaTranslation/v1beta1/src/V1beta1/resources/speech_translation_service_rest_client_config.php create mode 100644 owl-bot-staging/MediaTranslation/v1beta1/tests/Unit/V1beta1/Client/SpeechTranslationServiceClientTest.php create mode 100644 owl-bot-staging/MediaTranslation/v1beta1/tests/Unit/V1beta1/SpeechTranslationServiceClientTest.php create mode 100644 owl-bot-staging/Memcache/v1/proto/src/GPBMetadata/Google/Cloud/Memcache/V1/CloudMemcache.php create mode 100644 owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/ApplyParametersRequest.php create mode 100644 owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/CreateInstanceRequest.php create mode 100644 owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/DeleteInstanceRequest.php create mode 100644 owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/GetInstanceRequest.php create mode 100644 owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/Instance.php create mode 100644 owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/Instance/InstanceMessage.php create mode 100644 owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/Instance/InstanceMessage/Code.php create mode 100644 owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/Instance/Node.php create mode 100644 owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/Instance/Node/State.php create mode 100644 owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/Instance/NodeConfig.php create mode 100644 owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/Instance/State.php create mode 100644 owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/ListInstancesRequest.php create mode 100644 owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/ListInstancesResponse.php create mode 100644 owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/LocationMetadata.php create mode 100644 owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/MaintenancePolicy.php create mode 100644 owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/MaintenanceSchedule.php create mode 100644 owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/MemcacheParameters.php create mode 100644 owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/MemcacheVersion.php create mode 100644 owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/OperationMetadata.php create mode 100644 owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/RescheduleMaintenanceRequest.php create mode 100644 owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/RescheduleMaintenanceRequest/RescheduleType.php create mode 100644 owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/UpdateInstanceRequest.php create mode 100644 owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/UpdateParametersRequest.php create mode 100644 owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/WeeklyMaintenanceWindow.php create mode 100644 owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/ZoneMetadata.php create mode 100644 owl-bot-staging/Memcache/v1/samples/V1/CloudMemcacheClient/apply_parameters.php create mode 100644 owl-bot-staging/Memcache/v1/samples/V1/CloudMemcacheClient/create_instance.php create mode 100644 owl-bot-staging/Memcache/v1/samples/V1/CloudMemcacheClient/delete_instance.php create mode 100644 owl-bot-staging/Memcache/v1/samples/V1/CloudMemcacheClient/get_instance.php create mode 100644 owl-bot-staging/Memcache/v1/samples/V1/CloudMemcacheClient/get_location.php create mode 100644 owl-bot-staging/Memcache/v1/samples/V1/CloudMemcacheClient/list_instances.php create mode 100644 owl-bot-staging/Memcache/v1/samples/V1/CloudMemcacheClient/list_locations.php create mode 100644 owl-bot-staging/Memcache/v1/samples/V1/CloudMemcacheClient/reschedule_maintenance.php create mode 100644 owl-bot-staging/Memcache/v1/samples/V1/CloudMemcacheClient/update_instance.php create mode 100644 owl-bot-staging/Memcache/v1/samples/V1/CloudMemcacheClient/update_parameters.php create mode 100644 owl-bot-staging/Memcache/v1/src/V1/Client/CloudMemcacheClient.php create mode 100644 owl-bot-staging/Memcache/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/Memcache/v1/src/V1/resources/cloud_memcache_client_config.json create mode 100644 owl-bot-staging/Memcache/v1/src/V1/resources/cloud_memcache_descriptor_config.php create mode 100644 owl-bot-staging/Memcache/v1/src/V1/resources/cloud_memcache_rest_client_config.php create mode 100644 owl-bot-staging/Memcache/v1/tests/Unit/V1/Client/CloudMemcacheClientTest.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/GPBMetadata/Google/Cloud/Migrationcenter/V1/Migrationcenter.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AddAssetsToGroupRequest.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AggregateAssetsValuesRequest.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AggregateAssetsValuesResponse.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Aggregation.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Aggregation/Count.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Aggregation/Frequency.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Aggregation/Histogram.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Aggregation/Sum.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AggregationResult.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AggregationResult/Count.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AggregationResult/Frequency.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AggregationResult/Histogram.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AggregationResult/Histogram/Bucket.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AggregationResult/Sum.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Asset.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AssetFrame.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AssetList.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AssetPerformanceData.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AssetView.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AwsEc2PlatformDetails.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AzureVmPlatformDetails.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/BatchDeleteAssetsRequest.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/BatchUpdateAssetsRequest.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/BatchUpdateAssetsResponse.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/BiosDetails.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/CommitmentPlan.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ComputeEngineMigrationTarget.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ComputeEnginePreferences.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ComputeEngineShapeDescriptor.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ComputeMigrationTargetProduct.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ComputeStorageDescriptor.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/CpuUsageSample.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/CreateGroupRequest.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/CreateImportDataFileRequest.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/CreateImportJobRequest.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/CreatePreferenceSetRequest.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/CreateReportConfigRequest.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/CreateReportRequest.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/CreateSourceRequest.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DailyResourceUsageAggregation.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DailyResourceUsageAggregation/CPU.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DailyResourceUsageAggregation/Disk.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DailyResourceUsageAggregation/Memory.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DailyResourceUsageAggregation/Network.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DailyResourceUsageAggregation/Stats.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DeleteAssetRequest.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DeleteGroupRequest.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DeleteImportDataFileRequest.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DeleteImportJobRequest.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DeletePreferenceSetRequest.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DeleteReportConfigRequest.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DeleteReportRequest.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DeleteSourceRequest.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DiskEntry.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DiskEntry/InterfaceType.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DiskEntryList.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DiskPartition.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DiskPartitionList.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DiskUsageSample.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ErrorFrame.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ErrorFrameView.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ExecutionReport.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/FileValidationReport.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/FitDescriptor.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/FitDescriptor/FitLevel.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/FrameViolationEntry.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Frames.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/FstabEntry.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/FstabEntryList.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GenericInsight.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GenericPlatformDetails.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GetAssetRequest.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GetErrorFrameRequest.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GetGroupRequest.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GetImportDataFileRequest.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GetImportJobRequest.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GetPreferenceSetRequest.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GetReportConfigRequest.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GetReportRequest.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GetSettingsRequest.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GetSourceRequest.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Group.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GuestConfigDetails.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GuestConfigDetails/SeLinuxMode.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GuestInstalledApplication.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GuestInstalledApplicationList.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GuestOsDetails.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GuestRuntimeDetails.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/HostsEntry.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/HostsEntryList.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ImportDataFile.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ImportDataFile/State.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ImportError.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ImportError/Severity.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ImportJob.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ImportJob/ImportJobState.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ImportJobFormat.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ImportJobView.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ImportRowError.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Insight.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/InsightList.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/LicenseType.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListAssetsRequest.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListAssetsResponse.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListErrorFramesRequest.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListErrorFramesResponse.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListGroupsRequest.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListGroupsResponse.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListImportDataFilesRequest.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListImportDataFilesResponse.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListImportJobsRequest.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListImportJobsResponse.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListPreferenceSetsRequest.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListPreferenceSetsResponse.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListReportConfigsRequest.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListReportConfigsResponse.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListReportsRequest.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListReportsResponse.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListSourcesRequest.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListSourcesResponse.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/MachineArchitectureDetails.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/MachineArchitectureDetails/CpuHyperThreading.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/MachineArchitectureDetails/FirmwareType.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/MachineDetails.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/MachineDetails/PowerState.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/MachineDiskDetails.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/MachineNetworkDetails.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/MachinePreferences.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/MachineSeries.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/MemoryUsageSample.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/MigrationInsight.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/NetworkAdapterDetails.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/NetworkAdapterList.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/NetworkAddress.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/NetworkAddress/AddressAssignment.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/NetworkAddressList.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/NetworkConnection.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/NetworkConnection/State.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/NetworkConnectionList.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/NetworkUsageSample.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/NfsExport.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/NfsExportList.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/OpenFileDetails.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/OpenFileList.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/OperatingSystemFamily.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/OperationMetadata.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/PerformanceSample.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/PersistentDiskType.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/PhysicalPlatformDetails.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/PlatformDetails.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/PreferenceSet.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/RegionPreferences.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/RemoveAssetsFromGroupRequest.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Report.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Report/State.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Report/Type.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportAssetFramesRequest.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportAssetFramesResponse.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportConfig.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportConfig/GroupPreferenceSetAssignment.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/AssetAggregateStats.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/ChartData.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/ChartData/DataPoint.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/ComputeEngineFinding.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/GroupFinding.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/GroupPreferenceSetFinding.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/HistogramChartData.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/HistogramChartData/Bucket.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/MachineSeriesAllocation.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/SoleTenantFinding.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/SoleTenantNodeAllocation.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/UtilizationChartData.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/VmwareEngineFinding.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/VmwareNode.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/VmwareNodeAllocation.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportView.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/RunImportJobRequest.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/RunningProcess.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/RunningProcessList.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/RunningService.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/RunningService/StartMode.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/RunningService/State.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/RunningServiceList.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/RuntimeNetworkInfo.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Settings.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/SizingOptimizationStrategy.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/SoleTenancyPreferences.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/SoleTenancyPreferences/CommitmentPlan.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/SoleTenancyPreferences/HostMaintenancePolicy.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/SoleTenantNodeType.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Source.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Source/SourceType.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Source/State.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/UpdateAssetRequest.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/UpdateGroupRequest.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/UpdateImportJobRequest.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/UpdatePreferenceSetRequest.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/UpdateSettingsRequest.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/UpdateSourceRequest.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/UploadFileInfo.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ValidateImportJobRequest.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ValidationReport.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/VirtualMachinePreferences.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/VmwareDiskConfig.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/VmwareDiskConfig/BackingType.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/VmwareDiskConfig/RdmCompatibility.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/VmwareDiskConfig/VmdkMode.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/VmwareEnginePreferences.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/VmwareEnginePreferences/CommitmentPlan.php create mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/VmwarePlatformDetails.php create mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/add_assets_to_group.php create mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/aggregate_assets_values.php create mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/batch_delete_assets.php create mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/batch_update_assets.php create mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/create_group.php create mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/create_import_data_file.php create mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/create_import_job.php create mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/create_preference_set.php create mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/create_report.php create mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/create_report_config.php create mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/create_source.php create mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/delete_asset.php create mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/delete_group.php create mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/delete_import_data_file.php create mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/delete_import_job.php create mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/delete_preference_set.php create mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/delete_report.php create mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/delete_report_config.php create mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/delete_source.php create mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/get_asset.php create mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/get_error_frame.php create mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/get_group.php create mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/get_import_data_file.php create mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/get_import_job.php create mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/get_location.php create mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/get_preference_set.php create mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/get_report.php create mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/get_report_config.php create mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/get_settings.php create mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/get_source.php create mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/list_assets.php create mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/list_error_frames.php create mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/list_groups.php create mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/list_import_data_files.php create mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/list_import_jobs.php create mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/list_locations.php create mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/list_preference_sets.php create mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/list_report_configs.php create mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/list_reports.php create mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/list_sources.php create mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/remove_assets_from_group.php create mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/report_asset_frames.php create mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/run_import_job.php create mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/update_asset.php create mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/update_group.php create mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/update_import_job.php create mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/update_preference_set.php create mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/update_settings.php create mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/update_source.php create mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/validate_import_job.php create mode 100644 owl-bot-staging/MigrationCenter/v1/src/V1/Client/MigrationCenterClient.php create mode 100644 owl-bot-staging/MigrationCenter/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/MigrationCenter/v1/src/V1/resources/migration_center_client_config.json create mode 100644 owl-bot-staging/MigrationCenter/v1/src/V1/resources/migration_center_descriptor_config.php create mode 100644 owl-bot-staging/MigrationCenter/v1/src/V1/resources/migration_center_rest_client_config.php create mode 100644 owl-bot-staging/MigrationCenter/v1/tests/Unit/V1/Client/MigrationCenterClientTest.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/Alert.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/AlertService.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/Common.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/DroppedLabels.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/Group.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/GroupService.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/Metric.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/MetricService.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/MutationRecord.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/Notification.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/NotificationService.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/QueryService.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/Service.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/ServiceService.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/Snooze.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/SnoozeService.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/SpanContext.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/Uptime.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/UptimeService.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Aggregation.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Aggregation/Aligner.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Aggregation/Reducer.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/AlertStrategy.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/AlertStrategy/NotificationChannelStrategy.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/AlertStrategy/NotificationPrompt.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/AlertStrategy/NotificationRateLimit.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/Condition.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/Condition/EvaluationMissingData.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/Condition/LogMatch.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/Condition/MetricAbsence.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/Condition/MetricThreshold.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/Condition/MetricThreshold/ForecastOptions.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/Condition/MonitoringQueryLanguageCondition.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/Condition/PrometheusQueryLanguageCondition.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/Condition/Trigger.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/ConditionCombinerType.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/Documentation.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/Documentation/Link.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/Severity.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/BasicSli.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/BasicSli/AvailabilityCriteria.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/BasicSli/LatencyCriteria.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ComparisonType.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/CreateAlertPolicyRequest.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/CreateGroupRequest.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/CreateMetricDescriptorRequest.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/CreateNotificationChannelRequest.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/CreateServiceLevelObjectiveRequest.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/CreateServiceRequest.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/CreateSnoozeRequest.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/CreateTimeSeriesError.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/CreateTimeSeriesRequest.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/CreateTimeSeriesSummary.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/CreateTimeSeriesSummary/Error.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/CreateUptimeCheckConfigRequest.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/DeleteAlertPolicyRequest.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/DeleteGroupRequest.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/DeleteMetricDescriptorRequest.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/DeleteNotificationChannelRequest.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/DeleteServiceLevelObjectiveRequest.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/DeleteServiceRequest.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/DeleteUptimeCheckConfigRequest.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/DistributionCut.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/DroppedLabels.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GetAlertPolicyRequest.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GetGroupRequest.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GetMetricDescriptorRequest.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GetMonitoredResourceDescriptorRequest.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GetNotificationChannelDescriptorRequest.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GetNotificationChannelRequest.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GetNotificationChannelVerificationCodeRequest.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GetNotificationChannelVerificationCodeResponse.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GetServiceLevelObjectiveRequest.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GetServiceRequest.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GetSnoozeRequest.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GetUptimeCheckConfigRequest.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Group.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GroupResourceType.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/InternalChecker.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/InternalChecker/State.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/LabelValue.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListAlertPoliciesRequest.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListAlertPoliciesResponse.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListGroupMembersRequest.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListGroupMembersResponse.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListGroupsRequest.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListGroupsResponse.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListMetricDescriptorsRequest.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListMetricDescriptorsResponse.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListMonitoredResourceDescriptorsRequest.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListMonitoredResourceDescriptorsResponse.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListNotificationChannelDescriptorsRequest.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListNotificationChannelDescriptorsResponse.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListNotificationChannelsRequest.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListNotificationChannelsResponse.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListServiceLevelObjectivesRequest.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListServiceLevelObjectivesResponse.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListServicesRequest.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListServicesResponse.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListSnoozesRequest.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListSnoozesResponse.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListTimeSeriesRequest.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListTimeSeriesRequest/TimeSeriesView.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListTimeSeriesResponse.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListUptimeCheckConfigsRequest.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListUptimeCheckConfigsResponse.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListUptimeCheckIpsRequest.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListUptimeCheckIpsResponse.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/MutationRecord.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/NotificationChannel.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/NotificationChannel/VerificationStatus.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/NotificationChannelDescriptor.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Point.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/QueryError.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/QueryErrorList.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/QueryTimeSeriesRequest.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/QueryTimeSeriesResponse.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Range.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/RequestBasedSli.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/SendNotificationChannelVerificationCodeRequest.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service/AppEngine.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service/BasicService.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service/CloudEndpoints.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service/CloudRun.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service/ClusterIstio.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service/Custom.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service/GkeNamespace.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service/GkeService.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service/GkeWorkload.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service/IstioCanonicalService.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service/MeshIstio.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service/Telemetry.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ServiceLevelIndicator.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ServiceLevelObjective.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ServiceLevelObjective/View.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ServiceTier.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Snooze.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Snooze/Criteria.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/SpanContext.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/SyntheticMonitorTarget.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/SyntheticMonitorTarget/CloudFunctionV2Target.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/TextLocator.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/TextLocator/Position.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/TimeInterval.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/TimeSeries.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/TimeSeriesData.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/TimeSeriesData/PointData.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/TimeSeriesDescriptor.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/TimeSeriesDescriptor/ValueDescriptor.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/TimeSeriesRatio.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/TypedValue.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UpdateAlertPolicyRequest.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UpdateGroupRequest.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UpdateNotificationChannelRequest.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UpdateServiceLevelObjectiveRequest.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UpdateServiceRequest.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UpdateSnoozeRequest.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UpdateUptimeCheckConfigRequest.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/CheckerType.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/ContentMatcher.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/ContentMatcher/ContentMatcherOption.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/ContentMatcher/JsonPathMatcher.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/ContentMatcher/JsonPathMatcher/JsonPathMatcherOption.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/HttpCheck.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/HttpCheck/BasicAuthentication.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/HttpCheck/ContentType.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/HttpCheck/RequestMethod.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/HttpCheck/ResponseStatusCode.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/HttpCheck/ResponseStatusCode/StatusClass.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/HttpCheck/ServiceAgentAuthentication.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/HttpCheck/ServiceAgentAuthentication/ServiceAgentAuthenticationType.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/PingConfig.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/ResourceGroup.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/TcpCheck.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckIp.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckRegion.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/VerifyNotificationChannelRequest.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/WindowsBasedSli.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/WindowsBasedSli/MetricRange.php create mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/WindowsBasedSli/PerformanceThreshold.php create mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/AlertPolicyServiceClient/create_alert_policy.php create mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/AlertPolicyServiceClient/delete_alert_policy.php create mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/AlertPolicyServiceClient/get_alert_policy.php create mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/AlertPolicyServiceClient/list_alert_policies.php create mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/AlertPolicyServiceClient/update_alert_policy.php create mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/GroupServiceClient/create_group.php create mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/GroupServiceClient/delete_group.php create mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/GroupServiceClient/get_group.php create mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/GroupServiceClient/list_group_members.php create mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/GroupServiceClient/list_groups.php create mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/GroupServiceClient/update_group.php create mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/MetricServiceClient/create_metric_descriptor.php create mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/MetricServiceClient/create_service_time_series.php create mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/MetricServiceClient/create_time_series.php create mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/MetricServiceClient/delete_metric_descriptor.php create mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/MetricServiceClient/get_metric_descriptor.php create mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/MetricServiceClient/get_monitored_resource_descriptor.php create mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/MetricServiceClient/list_metric_descriptors.php create mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/MetricServiceClient/list_monitored_resource_descriptors.php create mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/MetricServiceClient/list_time_series.php create mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/NotificationChannelServiceClient/create_notification_channel.php create mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/NotificationChannelServiceClient/delete_notification_channel.php create mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/NotificationChannelServiceClient/get_notification_channel.php create mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/NotificationChannelServiceClient/get_notification_channel_descriptor.php create mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/NotificationChannelServiceClient/get_notification_channel_verification_code.php create mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/NotificationChannelServiceClient/list_notification_channel_descriptors.php create mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/NotificationChannelServiceClient/list_notification_channels.php create mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/NotificationChannelServiceClient/send_notification_channel_verification_code.php create mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/NotificationChannelServiceClient/update_notification_channel.php create mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/NotificationChannelServiceClient/verify_notification_channel.php create mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/QueryServiceClient/query_time_series.php create mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/ServiceMonitoringServiceClient/create_service.php create mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/ServiceMonitoringServiceClient/create_service_level_objective.php create mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/ServiceMonitoringServiceClient/delete_service.php create mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/ServiceMonitoringServiceClient/delete_service_level_objective.php create mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/ServiceMonitoringServiceClient/get_service.php create mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/ServiceMonitoringServiceClient/get_service_level_objective.php create mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/ServiceMonitoringServiceClient/list_service_level_objectives.php create mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/ServiceMonitoringServiceClient/list_services.php create mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/ServiceMonitoringServiceClient/update_service.php create mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/ServiceMonitoringServiceClient/update_service_level_objective.php create mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/SnoozeServiceClient/create_snooze.php create mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/SnoozeServiceClient/get_snooze.php create mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/SnoozeServiceClient/list_snoozes.php create mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/SnoozeServiceClient/update_snooze.php create mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/UptimeCheckServiceClient/create_uptime_check_config.php create mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/UptimeCheckServiceClient/delete_uptime_check_config.php create mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/UptimeCheckServiceClient/get_uptime_check_config.php create mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/UptimeCheckServiceClient/list_uptime_check_configs.php create mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/UptimeCheckServiceClient/list_uptime_check_ips.php create mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/UptimeCheckServiceClient/update_uptime_check_config.php create mode 100644 owl-bot-staging/Monitoring/v3/src/V3/AlertPolicyServiceClient.php create mode 100644 owl-bot-staging/Monitoring/v3/src/V3/Client/AlertPolicyServiceClient.php create mode 100644 owl-bot-staging/Monitoring/v3/src/V3/Client/GroupServiceClient.php create mode 100644 owl-bot-staging/Monitoring/v3/src/V3/Client/MetricServiceClient.php create mode 100644 owl-bot-staging/Monitoring/v3/src/V3/Client/NotificationChannelServiceClient.php create mode 100644 owl-bot-staging/Monitoring/v3/src/V3/Client/QueryServiceClient.php create mode 100644 owl-bot-staging/Monitoring/v3/src/V3/Client/ServiceMonitoringServiceClient.php create mode 100644 owl-bot-staging/Monitoring/v3/src/V3/Client/SnoozeServiceClient.php create mode 100644 owl-bot-staging/Monitoring/v3/src/V3/Client/UptimeCheckServiceClient.php create mode 100644 owl-bot-staging/Monitoring/v3/src/V3/Gapic/AlertPolicyServiceGapicClient.php create mode 100644 owl-bot-staging/Monitoring/v3/src/V3/Gapic/GroupServiceGapicClient.php create mode 100644 owl-bot-staging/Monitoring/v3/src/V3/Gapic/MetricServiceGapicClient.php create mode 100644 owl-bot-staging/Monitoring/v3/src/V3/Gapic/NotificationChannelServiceGapicClient.php create mode 100644 owl-bot-staging/Monitoring/v3/src/V3/Gapic/QueryServiceGapicClient.php create mode 100644 owl-bot-staging/Monitoring/v3/src/V3/Gapic/ServiceMonitoringServiceGapicClient.php create mode 100644 owl-bot-staging/Monitoring/v3/src/V3/Gapic/SnoozeServiceGapicClient.php create mode 100644 owl-bot-staging/Monitoring/v3/src/V3/Gapic/UptimeCheckServiceGapicClient.php create mode 100644 owl-bot-staging/Monitoring/v3/src/V3/GroupServiceClient.php create mode 100644 owl-bot-staging/Monitoring/v3/src/V3/MetricServiceClient.php create mode 100644 owl-bot-staging/Monitoring/v3/src/V3/NotificationChannelServiceClient.php create mode 100644 owl-bot-staging/Monitoring/v3/src/V3/QueryServiceClient.php create mode 100644 owl-bot-staging/Monitoring/v3/src/V3/ServiceMonitoringServiceClient.php create mode 100644 owl-bot-staging/Monitoring/v3/src/V3/SnoozeServiceClient.php create mode 100644 owl-bot-staging/Monitoring/v3/src/V3/UptimeCheckServiceClient.php create mode 100644 owl-bot-staging/Monitoring/v3/src/V3/gapic_metadata.json create mode 100644 owl-bot-staging/Monitoring/v3/src/V3/resources/alert_policy_service_client_config.json create mode 100644 owl-bot-staging/Monitoring/v3/src/V3/resources/alert_policy_service_descriptor_config.php create mode 100644 owl-bot-staging/Monitoring/v3/src/V3/resources/alert_policy_service_rest_client_config.php create mode 100644 owl-bot-staging/Monitoring/v3/src/V3/resources/group_service_client_config.json create mode 100644 owl-bot-staging/Monitoring/v3/src/V3/resources/group_service_descriptor_config.php create mode 100644 owl-bot-staging/Monitoring/v3/src/V3/resources/group_service_rest_client_config.php create mode 100644 owl-bot-staging/Monitoring/v3/src/V3/resources/metric_service_client_config.json create mode 100644 owl-bot-staging/Monitoring/v3/src/V3/resources/metric_service_descriptor_config.php create mode 100644 owl-bot-staging/Monitoring/v3/src/V3/resources/metric_service_rest_client_config.php create mode 100644 owl-bot-staging/Monitoring/v3/src/V3/resources/notification_channel_service_client_config.json create mode 100644 owl-bot-staging/Monitoring/v3/src/V3/resources/notification_channel_service_descriptor_config.php create mode 100644 owl-bot-staging/Monitoring/v3/src/V3/resources/notification_channel_service_rest_client_config.php create mode 100644 owl-bot-staging/Monitoring/v3/src/V3/resources/query_service_client_config.json create mode 100644 owl-bot-staging/Monitoring/v3/src/V3/resources/query_service_descriptor_config.php create mode 100644 owl-bot-staging/Monitoring/v3/src/V3/resources/query_service_rest_client_config.php create mode 100644 owl-bot-staging/Monitoring/v3/src/V3/resources/service_monitoring_service_client_config.json create mode 100644 owl-bot-staging/Monitoring/v3/src/V3/resources/service_monitoring_service_descriptor_config.php create mode 100644 owl-bot-staging/Monitoring/v3/src/V3/resources/service_monitoring_service_rest_client_config.php create mode 100644 owl-bot-staging/Monitoring/v3/src/V3/resources/snooze_service_client_config.json create mode 100644 owl-bot-staging/Monitoring/v3/src/V3/resources/snooze_service_descriptor_config.php create mode 100644 owl-bot-staging/Monitoring/v3/src/V3/resources/snooze_service_rest_client_config.php create mode 100644 owl-bot-staging/Monitoring/v3/src/V3/resources/uptime_check_service_client_config.json create mode 100644 owl-bot-staging/Monitoring/v3/src/V3/resources/uptime_check_service_descriptor_config.php create mode 100644 owl-bot-staging/Monitoring/v3/src/V3/resources/uptime_check_service_rest_client_config.php create mode 100644 owl-bot-staging/Monitoring/v3/tests/Unit/V3/AlertPolicyServiceClientTest.php create mode 100644 owl-bot-staging/Monitoring/v3/tests/Unit/V3/Client/AlertPolicyServiceClientTest.php create mode 100644 owl-bot-staging/Monitoring/v3/tests/Unit/V3/Client/GroupServiceClientTest.php create mode 100644 owl-bot-staging/Monitoring/v3/tests/Unit/V3/Client/MetricServiceClientTest.php create mode 100644 owl-bot-staging/Monitoring/v3/tests/Unit/V3/Client/NotificationChannelServiceClientTest.php create mode 100644 owl-bot-staging/Monitoring/v3/tests/Unit/V3/Client/QueryServiceClientTest.php create mode 100644 owl-bot-staging/Monitoring/v3/tests/Unit/V3/Client/ServiceMonitoringServiceClientTest.php create mode 100644 owl-bot-staging/Monitoring/v3/tests/Unit/V3/Client/SnoozeServiceClientTest.php create mode 100644 owl-bot-staging/Monitoring/v3/tests/Unit/V3/Client/UptimeCheckServiceClientTest.php create mode 100644 owl-bot-staging/Monitoring/v3/tests/Unit/V3/GroupServiceClientTest.php create mode 100644 owl-bot-staging/Monitoring/v3/tests/Unit/V3/MetricServiceClientTest.php create mode 100644 owl-bot-staging/Monitoring/v3/tests/Unit/V3/NotificationChannelServiceClientTest.php create mode 100644 owl-bot-staging/Monitoring/v3/tests/Unit/V3/QueryServiceClientTest.php create mode 100644 owl-bot-staging/Monitoring/v3/tests/Unit/V3/ServiceMonitoringServiceClientTest.php create mode 100644 owl-bot-staging/Monitoring/v3/tests/Unit/V3/SnoozeServiceClientTest.php create mode 100644 owl-bot-staging/Monitoring/v3/tests/Unit/V3/UptimeCheckServiceClientTest.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/GPBMetadata/Google/Cloud/Netapp/V1/ActiveDirectory.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/GPBMetadata/Google/Cloud/Netapp/V1/Backup.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/GPBMetadata/Google/Cloud/Netapp/V1/BackupPolicy.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/GPBMetadata/Google/Cloud/Netapp/V1/BackupVault.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/GPBMetadata/Google/Cloud/Netapp/V1/CloudNetappService.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/GPBMetadata/Google/Cloud/Netapp/V1/Common.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/GPBMetadata/Google/Cloud/Netapp/V1/Kms.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/GPBMetadata/Google/Cloud/Netapp/V1/Replication.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/GPBMetadata/Google/Cloud/Netapp/V1/Snapshot.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/GPBMetadata/Google/Cloud/Netapp/V1/StoragePool.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/GPBMetadata/Google/Cloud/Netapp/V1/Volume.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/AccessType.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ActiveDirectory.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ActiveDirectory/State.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Backup.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Backup/State.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Backup/Type.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/BackupConfig.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/BackupPolicy.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/BackupPolicy/State.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/BackupVault.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/BackupVault/State.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateActiveDirectoryRequest.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateBackupPolicyRequest.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateBackupRequest.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateBackupVaultRequest.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateKmsConfigRequest.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateReplicationRequest.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateSnapshotRequest.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateStoragePoolRequest.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateVolumeRequest.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DailySchedule.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteActiveDirectoryRequest.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteBackupPolicyRequest.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteBackupRequest.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteBackupVaultRequest.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteKmsConfigRequest.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteReplicationRequest.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteSnapshotRequest.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteStoragePoolRequest.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteVolumeRequest.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DestinationVolumeParameters.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/EncryptVolumesRequest.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/EncryptionType.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/EstablishPeeringRequest.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ExportPolicy.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetActiveDirectoryRequest.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetBackupPolicyRequest.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetBackupRequest.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetBackupVaultRequest.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetKmsConfigRequest.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetReplicationRequest.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetSnapshotRequest.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetStoragePoolRequest.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetVolumeRequest.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/HourlySchedule.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/HybridPeeringDetails.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/HybridReplicationParameters.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/KmsConfig.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/KmsConfig/State.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListActiveDirectoriesRequest.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListActiveDirectoriesResponse.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListBackupPoliciesRequest.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListBackupPoliciesResponse.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListBackupVaultsRequest.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListBackupVaultsResponse.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListBackupsRequest.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListBackupsResponse.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListKmsConfigsRequest.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListKmsConfigsResponse.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListReplicationsRequest.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListReplicationsResponse.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListSnapshotsRequest.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListSnapshotsResponse.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListStoragePoolsRequest.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListStoragePoolsResponse.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListVolumesRequest.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListVolumesResponse.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/LocationMetadata.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/MonthlySchedule.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/MountOption.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/OperationMetadata.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Protocols.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Replication.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Replication/HybridReplicationType.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Replication/MirrorState.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Replication/ReplicationRole.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Replication/ReplicationSchedule.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Replication/State.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/RestoreParameters.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/RestrictedAction.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ResumeReplicationRequest.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ReverseReplicationDirectionRequest.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/RevertVolumeRequest.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/SMBSettings.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/SecurityStyle.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ServiceLevel.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/SimpleExportPolicyRule.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Snapshot.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Snapshot/State.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/SnapshotPolicy.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/StopReplicationRequest.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/StoragePool.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/StoragePool/State.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/SwitchActiveReplicaZoneRequest.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/SyncReplicationRequest.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/TieringPolicy.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/TieringPolicy/TierAction.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/TransferStats.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateActiveDirectoryRequest.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateBackupPolicyRequest.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateBackupRequest.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateBackupVaultRequest.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateKmsConfigRequest.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateReplicationRequest.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateSnapshotRequest.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateStoragePoolRequest.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateVolumeRequest.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/VerifyKmsConfigRequest.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/VerifyKmsConfigResponse.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Volume.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Volume/State.php create mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/WeeklySchedule.php create mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_active_directory.php create mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_backup.php create mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_backup_policy.php create mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_backup_vault.php create mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_kms_config.php create mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_replication.php create mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_snapshot.php create mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_storage_pool.php create mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_volume.php create mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_active_directory.php create mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_backup.php create mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_backup_policy.php create mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_backup_vault.php create mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_kms_config.php create mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_replication.php create mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_snapshot.php create mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_storage_pool.php create mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_volume.php create mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/encrypt_volumes.php create mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/establish_peering.php create mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_active_directory.php create mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_backup.php create mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_backup_policy.php create mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_backup_vault.php create mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_kms_config.php create mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_location.php create mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_replication.php create mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_snapshot.php create mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_storage_pool.php create mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_volume.php create mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_active_directories.php create mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_backup_policies.php create mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_backup_vaults.php create mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_backups.php create mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_kms_configs.php create mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_locations.php create mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_replications.php create mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_snapshots.php create mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_storage_pools.php create mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_volumes.php create mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/resume_replication.php create mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/reverse_replication_direction.php create mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/revert_volume.php create mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/stop_replication.php create mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/switch_active_replica_zone.php create mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/sync_replication.php create mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_active_directory.php create mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_backup.php create mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_backup_policy.php create mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_backup_vault.php create mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_kms_config.php create mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_replication.php create mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_snapshot.php create mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_storage_pool.php create mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_volume.php create mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/verify_kms_config.php create mode 100644 owl-bot-staging/NetApp/v1/src/V1/Client/NetAppClient.php create mode 100644 owl-bot-staging/NetApp/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/NetApp/v1/src/V1/resources/net_app_client_config.json create mode 100644 owl-bot-staging/NetApp/v1/src/V1/resources/net_app_descriptor_config.php create mode 100644 owl-bot-staging/NetApp/v1/src/V1/resources/net_app_rest_client_config.php create mode 100644 owl-bot-staging/NetApp/v1/tests/Unit/V1/Client/NetAppClientTest.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/GPBMetadata/Google/Cloud/Networkconnectivity/V1/Common.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/GPBMetadata/Google/Cloud/Networkconnectivity/V1/Hub.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/GPBMetadata/Google/Cloud/Networkconnectivity/V1/PolicyBasedRouting.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/AcceptHubSpokeRequest.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/AcceptHubSpokeResponse.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/AutoAccept.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/CreateHubRequest.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/CreatePolicyBasedRouteRequest.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/CreateSpokeRequest.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/DeleteHubRequest.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/DeletePolicyBasedRouteRequest.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/DeleteSpokeRequest.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/GetGroupRequest.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/GetHubRequest.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/GetPolicyBasedRouteRequest.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/GetRouteRequest.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/GetRouteTableRequest.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/GetSpokeRequest.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/Group.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/Hub.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/HubStatusEntry.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/LinkedInterconnectAttachments.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/LinkedProducerVpcNetwork.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/LinkedRouterApplianceInstances.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/LinkedVpcNetwork.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/LinkedVpnTunnels.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListGroupsRequest.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListGroupsResponse.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListHubSpokesRequest.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListHubSpokesRequest/SpokeView.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListHubSpokesResponse.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListHubsRequest.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListHubsResponse.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListPolicyBasedRoutesRequest.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListPolicyBasedRoutesResponse.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListRouteTablesRequest.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListRouteTablesResponse.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListRoutesRequest.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListRoutesResponse.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListSpokesRequest.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListSpokesResponse.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/LocationFeature.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/LocationMetadata.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/NextHopInterconnectAttachment.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/NextHopRouterApplianceInstance.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/NextHopVPNTunnel.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/NextHopVpcNetwork.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/OperationMetadata.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/PolicyBasedRoute.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/PolicyBasedRoute/Filter.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/PolicyBasedRoute/Filter/ProtocolVersion.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/PolicyBasedRoute/InterconnectAttachment.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/PolicyBasedRoute/OtherRoutes.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/PolicyBasedRoute/VirtualMachine.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/PolicyBasedRoute/Warnings.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/PolicyBasedRoute/Warnings/Code.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/PolicyMode.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/PresetTopology.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/PscPropagationStatus.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/PscPropagationStatus/Code.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/QueryHubStatusRequest.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/QueryHubStatusResponse.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/RejectHubSpokeRequest.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/RejectHubSpokeResponse.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/Route.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/RouteTable.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/RouteType.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/RouterApplianceInstance.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/RoutingVPC.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/Spoke.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/Spoke/StateReason.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/Spoke/StateReason/Code.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/SpokeSummary.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/SpokeSummary/SpokeStateCount.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/SpokeSummary/SpokeStateReasonCount.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/SpokeSummary/SpokeTypeCount.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/SpokeType.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/State.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/UpdateGroupRequest.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/UpdateHubRequest.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/UpdateSpokeRequest.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/accept_hub_spoke.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/create_hub.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/create_spoke.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/delete_hub.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/delete_spoke.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/get_group.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/get_hub.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/get_iam_policy.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/get_location.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/get_route.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/get_route_table.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/get_spoke.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/list_groups.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/list_hub_spokes.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/list_hubs.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/list_locations.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/list_route_tables.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/list_routes.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/list_spokes.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/query_hub_status.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/reject_hub_spoke.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/set_iam_policy.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/test_iam_permissions.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/update_group.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/update_hub.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/update_spoke.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/samples/V1/PolicyBasedRoutingServiceClient/create_policy_based_route.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/samples/V1/PolicyBasedRoutingServiceClient/delete_policy_based_route.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/samples/V1/PolicyBasedRoutingServiceClient/get_iam_policy.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/samples/V1/PolicyBasedRoutingServiceClient/get_location.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/samples/V1/PolicyBasedRoutingServiceClient/get_policy_based_route.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/samples/V1/PolicyBasedRoutingServiceClient/list_locations.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/samples/V1/PolicyBasedRoutingServiceClient/list_policy_based_routes.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/samples/V1/PolicyBasedRoutingServiceClient/set_iam_policy.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/samples/V1/PolicyBasedRoutingServiceClient/test_iam_permissions.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/src/V1/Client/HubServiceClient.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/src/V1/Client/PolicyBasedRoutingServiceClient.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/NetworkConnectivity/v1/src/V1/resources/hub_service_client_config.json create mode 100644 owl-bot-staging/NetworkConnectivity/v1/src/V1/resources/hub_service_descriptor_config.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/src/V1/resources/hub_service_rest_client_config.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/src/V1/resources/policy_based_routing_service_client_config.json create mode 100644 owl-bot-staging/NetworkConnectivity/v1/src/V1/resources/policy_based_routing_service_descriptor_config.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/src/V1/resources/policy_based_routing_service_rest_client_config.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/tests/Unit/V1/Client/HubServiceClientTest.php create mode 100644 owl-bot-staging/NetworkConnectivity/v1/tests/Unit/V1/Client/PolicyBasedRoutingServiceClientTest.php create mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/GPBMetadata/Google/Cloud/Networkmanagement/V1/ConnectivityTest.php create mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/GPBMetadata/Google/Cloud/Networkmanagement/V1/Reachability.php create mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/GPBMetadata/Google/Cloud/Networkmanagement/V1/Trace.php create mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/AbortInfo.php create mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/AbortInfo/Cause.php create mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/AppEngineVersionInfo.php create mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/CloudFunctionInfo.php create mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/CloudRunRevisionInfo.php create mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/CloudSQLInstanceInfo.php create mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ConnectivityTest.php create mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/CreateConnectivityTestRequest.php create mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/DeleteConnectivityTestRequest.php create mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/DeliverInfo.php create mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/DeliverInfo/Target.php create mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/DropInfo.php create mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/DropInfo/Cause.php create mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Endpoint.php create mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Endpoint/AppEngineVersionEndpoint.php create mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Endpoint/CloudFunctionEndpoint.php create mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Endpoint/CloudRunRevisionEndpoint.php create mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Endpoint/ForwardingRuleTarget.php create mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Endpoint/NetworkType.php create mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/EndpointInfo.php create mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/FirewallInfo.php create mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/FirewallInfo/FirewallRuleType.php create mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ForwardInfo.php create mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ForwardInfo/Target.php create mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ForwardingRuleInfo.php create mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/GKEMasterInfo.php create mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/GetConnectivityTestRequest.php create mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/GoogleServiceInfo.php create mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/GoogleServiceInfo/GoogleServiceType.php create mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/InstanceInfo.php create mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LatencyDistribution.php create mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LatencyPercentile.php create mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ListConnectivityTestsRequest.php create mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ListConnectivityTestsResponse.php create mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LoadBalancerBackend.php create mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LoadBalancerBackend/HealthCheckFirewallState.php create mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LoadBalancerBackendInfo.php create mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LoadBalancerBackendInfo/HealthCheckFirewallsConfigState.php create mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LoadBalancerInfo.php create mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LoadBalancerInfo/BackendType.php create mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LoadBalancerInfo/LoadBalancerType.php create mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LoadBalancerType.php create mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/NatInfo.php create mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/NatInfo/Type.php create mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/NetworkInfo.php create mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/OperationMetadata.php create mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ProbingDetails.php create mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ProbingDetails/EdgeLocation.php create mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ProbingDetails/ProbingAbortCause.php create mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ProbingDetails/ProbingResult.php create mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ProxyConnectionInfo.php create mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ReachabilityDetails.php create mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ReachabilityDetails/Result.php create mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/RedisClusterInfo.php create mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/RedisInstanceInfo.php create mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/RerunConnectivityTestRequest.php create mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/RouteInfo.php create mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/RouteInfo/NextHopType.php create mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/RouteInfo/RouteScope.php create mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/RouteInfo/RouteType.php create mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ServerlessNegInfo.php create mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Step.php create mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Step/State.php create mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/StorageBucketInfo.php create mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Trace.php create mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/UpdateConnectivityTestRequest.php create mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/VpcConnectorInfo.php create mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/VpnGatewayInfo.php create mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/VpnTunnelInfo.php create mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/VpnTunnelInfo/RoutingType.php create mode 100644 owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/create_connectivity_test.php create mode 100644 owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/delete_connectivity_test.php create mode 100644 owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/get_connectivity_test.php create mode 100644 owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/get_iam_policy.php create mode 100644 owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/get_location.php create mode 100644 owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/list_connectivity_tests.php create mode 100644 owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/list_locations.php create mode 100644 owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/rerun_connectivity_test.php create mode 100644 owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/set_iam_policy.php create mode 100644 owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/test_iam_permissions.php create mode 100644 owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/update_connectivity_test.php create mode 100644 owl-bot-staging/NetworkManagement/v1/src/V1/Client/ReachabilityServiceClient.php create mode 100644 owl-bot-staging/NetworkManagement/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/NetworkManagement/v1/src/V1/resources/reachability_service_client_config.json create mode 100644 owl-bot-staging/NetworkManagement/v1/src/V1/resources/reachability_service_descriptor_config.php create mode 100644 owl-bot-staging/NetworkManagement/v1/src/V1/resources/reachability_service_rest_client_config.php create mode 100644 owl-bot-staging/NetworkManagement/v1/tests/Unit/V1/Client/ReachabilityServiceClientTest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/AuthorizationPolicy.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/ClientTlsPolicy.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/Common.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/NetworkSecurity.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/ServerTlsPolicy.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/Tls.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthorizationPolicy.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthorizationPolicy/Action.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthorizationPolicy/Rule.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthorizationPolicy/Rule/Destination.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthorizationPolicy/Rule/Destination/HttpHeaderMatch.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthorizationPolicy/Rule/Source.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CertificateProvider.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CertificateProviderInstance.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ClientTlsPolicy.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateAuthorizationPolicyRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateClientTlsPolicyRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateServerTlsPolicyRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteAuthorizationPolicyRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteClientTlsPolicyRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteServerTlsPolicyRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetAuthorizationPolicyRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetClientTlsPolicyRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetServerTlsPolicyRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GrpcEndpoint.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListAuthorizationPoliciesRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListAuthorizationPoliciesResponse.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListClientTlsPoliciesRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListClientTlsPoliciesResponse.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListServerTlsPoliciesRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListServerTlsPoliciesResponse.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/OperationMetadata.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ServerTlsPolicy.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ServerTlsPolicy/MTLSPolicy.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateAuthorizationPolicyRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateClientTlsPolicyRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateServerTlsPolicyRequest.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ValidationCA.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/create_authorization_policy.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/create_client_tls_policy.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/create_server_tls_policy.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/delete_authorization_policy.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/delete_client_tls_policy.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/delete_server_tls_policy.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_authorization_policy.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_client_tls_policy.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_iam_policy.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_location.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_server_tls_policy.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_authorization_policies.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_client_tls_policies.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_locations.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_server_tls_policies.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/set_iam_policy.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/test_iam_permissions.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/update_authorization_policy.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/update_client_tls_policy.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/update_server_tls_policy.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/src/V1/Client/NetworkSecurityClient.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/NetworkSecurity/v1/src/V1/resources/network_security_client_config.json create mode 100644 owl-bot-staging/NetworkSecurity/v1/src/V1/resources/network_security_descriptor_config.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/src/V1/resources/network_security_rest_client_config.php create mode 100644 owl-bot-staging/NetworkSecurity/v1/tests/Unit/V1/Client/NetworkSecurityClientTest.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/GPBMetadata/Google/Cloud/Networkservices/V1/Common.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/GPBMetadata/Google/Cloud/Networkservices/V1/Dep.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/GPBMetadata/Google/Cloud/Networkservices/V1/EndpointPolicy.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/GPBMetadata/Google/Cloud/Networkservices/V1/Gateway.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/GPBMetadata/Google/Cloud/Networkservices/V1/GrpcRoute.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/GPBMetadata/Google/Cloud/Networkservices/V1/HttpRoute.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/GPBMetadata/Google/Cloud/Networkservices/V1/Mesh.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/GPBMetadata/Google/Cloud/Networkservices/V1/NetworkServices.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/GPBMetadata/Google/Cloud/Networkservices/V1/ServiceBinding.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/GPBMetadata/Google/Cloud/Networkservices/V1/TcpRoute.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/GPBMetadata/Google/Cloud/Networkservices/V1/TlsRoute.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/CreateEndpointPolicyRequest.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/CreateGatewayRequest.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/CreateGrpcRouteRequest.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/CreateHttpRouteRequest.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/CreateLbRouteExtensionRequest.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/CreateLbTrafficExtensionRequest.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/CreateMeshRequest.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/CreateServiceBindingRequest.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/CreateTcpRouteRequest.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/CreateTlsRouteRequest.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/DeleteEndpointPolicyRequest.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/DeleteGatewayRequest.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/DeleteGrpcRouteRequest.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/DeleteHttpRouteRequest.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/DeleteLbRouteExtensionRequest.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/DeleteLbTrafficExtensionRequest.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/DeleteMeshRequest.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/DeleteServiceBindingRequest.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/DeleteTcpRouteRequest.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/DeleteTlsRouteRequest.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/EndpointMatcher.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/EndpointMatcher/MetadataLabelMatcher.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/EndpointMatcher/MetadataLabelMatcher/MetadataLabelMatchCriteria.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/EndpointMatcher/MetadataLabelMatcher/MetadataLabels.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/EndpointPolicy.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/EndpointPolicy/EndpointPolicyType.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/EventType.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ExtensionChain.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ExtensionChain/Extension.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ExtensionChain/MatchCondition.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/Gateway.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/Gateway/Type.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GetEndpointPolicyRequest.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GetGatewayRequest.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GetGrpcRouteRequest.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GetHttpRouteRequest.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GetLbRouteExtensionRequest.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GetLbTrafficExtensionRequest.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GetMeshRequest.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GetServiceBindingRequest.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GetTcpRouteRequest.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GetTlsRouteRequest.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute/Destination.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute/FaultInjectionPolicy.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute/FaultInjectionPolicy/Abort.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute/FaultInjectionPolicy/Delay.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute/HeaderMatch.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute/HeaderMatch/Type.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute/MethodMatch.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute/MethodMatch/Type.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute/RetryPolicy.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute/RouteAction.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute/RouteMatch.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute/RouteRule.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/CorsPolicy.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/Destination.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/FaultInjectionPolicy.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/FaultInjectionPolicy/Abort.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/FaultInjectionPolicy/Delay.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/HeaderMatch.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/HeaderMatch/IntegerRange.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/HeaderModifier.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/QueryParameterMatch.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/Redirect.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/Redirect/ResponseCode.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/RequestMirrorPolicy.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/RetryPolicy.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/RouteAction.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/RouteMatch.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/RouteRule.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/URLRewrite.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/LbRouteExtension.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/LbTrafficExtension.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListEndpointPoliciesRequest.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListEndpointPoliciesResponse.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListGatewaysRequest.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListGatewaysResponse.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListGrpcRoutesRequest.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListGrpcRoutesResponse.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListHttpRoutesRequest.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListHttpRoutesResponse.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListLbRouteExtensionsRequest.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListLbRouteExtensionsResponse.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListLbTrafficExtensionsRequest.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListLbTrafficExtensionsResponse.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListMeshesRequest.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListMeshesResponse.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListServiceBindingsRequest.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListServiceBindingsResponse.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListTcpRoutesRequest.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListTcpRoutesResponse.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListTlsRoutesRequest.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListTlsRoutesResponse.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/LoadBalancingScheme.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/Mesh.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/OperationMetadata.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ServiceBinding.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/TcpRoute.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/TcpRoute/RouteAction.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/TcpRoute/RouteDestination.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/TcpRoute/RouteMatch.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/TcpRoute/RouteRule.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/TlsRoute.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/TlsRoute/RouteAction.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/TlsRoute/RouteDestination.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/TlsRoute/RouteMatch.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/TlsRoute/RouteRule.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/TrafficPortSelector.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/UpdateEndpointPolicyRequest.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/UpdateGatewayRequest.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/UpdateGrpcRouteRequest.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/UpdateHttpRouteRequest.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/UpdateLbRouteExtensionRequest.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/UpdateLbTrafficExtensionRequest.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/UpdateMeshRequest.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/UpdateTcpRouteRequest.php create mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/UpdateTlsRouteRequest.php create mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/create_lb_route_extension.php create mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/create_lb_traffic_extension.php create mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/delete_lb_route_extension.php create mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/delete_lb_traffic_extension.php create mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/get_iam_policy.php create mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/get_lb_route_extension.php create mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/get_lb_traffic_extension.php create mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/get_location.php create mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/list_lb_route_extensions.php create mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/list_lb_traffic_extensions.php create mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/list_locations.php create mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/set_iam_policy.php create mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/test_iam_permissions.php create mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/update_lb_route_extension.php create mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/update_lb_traffic_extension.php create mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/create_endpoint_policy.php create mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/create_gateway.php create mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/create_grpc_route.php create mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/create_http_route.php create mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/create_mesh.php create mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/create_service_binding.php create mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/create_tcp_route.php create mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/create_tls_route.php create mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/delete_endpoint_policy.php create mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/delete_gateway.php create mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/delete_grpc_route.php create mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/delete_http_route.php create mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/delete_mesh.php create mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/delete_service_binding.php create mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/delete_tcp_route.php create mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/delete_tls_route.php create mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/get_endpoint_policy.php create mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/get_gateway.php create mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/get_grpc_route.php create mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/get_http_route.php create mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/get_iam_policy.php create mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/get_location.php create mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/get_mesh.php create mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/get_service_binding.php create mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/get_tcp_route.php create mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/get_tls_route.php create mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/list_endpoint_policies.php create mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/list_gateways.php create mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/list_grpc_routes.php create mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/list_http_routes.php create mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/list_locations.php create mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/list_meshes.php create mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/list_service_bindings.php create mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/list_tcp_routes.php create mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/list_tls_routes.php create mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/set_iam_policy.php create mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/test_iam_permissions.php create mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/update_endpoint_policy.php create mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/update_gateway.php create mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/update_grpc_route.php create mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/update_http_route.php create mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/update_mesh.php create mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/update_tcp_route.php create mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/update_tls_route.php create mode 100644 owl-bot-staging/NetworkServices/v1/src/V1/Client/DepServiceClient.php create mode 100644 owl-bot-staging/NetworkServices/v1/src/V1/Client/NetworkServicesClient.php create mode 100644 owl-bot-staging/NetworkServices/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/NetworkServices/v1/src/V1/resources/dep_service_client_config.json create mode 100644 owl-bot-staging/NetworkServices/v1/src/V1/resources/dep_service_descriptor_config.php create mode 100644 owl-bot-staging/NetworkServices/v1/src/V1/resources/dep_service_rest_client_config.php create mode 100644 owl-bot-staging/NetworkServices/v1/src/V1/resources/network_services_client_config.json create mode 100644 owl-bot-staging/NetworkServices/v1/src/V1/resources/network_services_descriptor_config.php create mode 100644 owl-bot-staging/NetworkServices/v1/src/V1/resources/network_services_rest_client_config.php create mode 100644 owl-bot-staging/NetworkServices/v1/tests/Unit/V1/Client/DepServiceClientTest.php create mode 100644 owl-bot-staging/NetworkServices/v1/tests/Unit/V1/Client/NetworkServicesClientTest.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/GPBMetadata/Google/Cloud/Notebooks/V1/DiagnosticConfig.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/GPBMetadata/Google/Cloud/Notebooks/V1/Environment.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/GPBMetadata/Google/Cloud/Notebooks/V1/Event.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/GPBMetadata/Google/Cloud/Notebooks/V1/Execution.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/GPBMetadata/Google/Cloud/Notebooks/V1/Instance.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/GPBMetadata/Google/Cloud/Notebooks/V1/InstanceConfig.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/GPBMetadata/Google/Cloud/Notebooks/V1/ManagedService.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/GPBMetadata/Google/Cloud/Notebooks/V1/Runtime.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/GPBMetadata/Google/Cloud/Notebooks/V1/Schedule.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/GPBMetadata/Google/Cloud/Notebooks/V1/Service.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ContainerImage.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/CreateEnvironmentRequest.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/CreateExecutionRequest.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/CreateInstanceRequest.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/CreateRuntimeRequest.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/CreateScheduleRequest.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/DeleteEnvironmentRequest.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/DeleteExecutionRequest.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/DeleteInstanceRequest.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/DeleteRuntimeRequest.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/DeleteScheduleRequest.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/DiagnoseInstanceRequest.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/DiagnoseRuntimeRequest.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/DiagnosticConfig.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/EncryptionConfig.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Environment.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Event.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Event/EventType.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Execution.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Execution/State.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ExecutionTemplate.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ExecutionTemplate/DataprocParameters.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ExecutionTemplate/JobType.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ExecutionTemplate/ScaleTier.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ExecutionTemplate/SchedulerAcceleratorConfig.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ExecutionTemplate/SchedulerAcceleratorType.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ExecutionTemplate/VertexAIParameters.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/GetEnvironmentRequest.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/GetExecutionRequest.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/GetInstanceHealthRequest.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/GetInstanceHealthResponse.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/GetInstanceHealthResponse/HealthState.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/GetInstanceRequest.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/GetRuntimeRequest.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/GetScheduleRequest.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance/AcceleratorConfig.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance/AcceleratorType.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance/Disk.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance/Disk/GuestOsFeature.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance/DiskEncryption.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance/DiskType.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance/NicType.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance/ShieldedInstanceConfig.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance/State.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance/UpgradeHistoryEntry.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance/UpgradeHistoryEntry/Action.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance/UpgradeHistoryEntry/State.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/InstanceConfig.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/IsInstanceUpgradeableRequest.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/IsInstanceUpgradeableResponse.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ListEnvironmentsRequest.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ListEnvironmentsResponse.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ListExecutionsRequest.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ListExecutionsResponse.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ListInstancesRequest.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ListInstancesResponse.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ListRuntimesRequest.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ListRuntimesResponse.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ListSchedulesRequest.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ListSchedulesResponse.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/LocalDisk.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/LocalDisk/RuntimeGuestOsFeature.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/LocalDiskInitializeParams.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/LocalDiskInitializeParams/DiskType.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/OperationMetadata.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/RefreshRuntimeTokenInternalRequest.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/RefreshRuntimeTokenInternalResponse.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/RegisterInstanceRequest.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ReportInstanceInfoRequest.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ReportRuntimeEventRequest.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ReservationAffinity.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ReservationAffinity/Type.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ResetInstanceRequest.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ResetRuntimeRequest.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/RollbackInstanceRequest.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Runtime.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Runtime/HealthState.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Runtime/State.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/RuntimeAcceleratorConfig.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/RuntimeAcceleratorConfig/AcceleratorType.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/RuntimeAccessConfig.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/RuntimeAccessConfig/RuntimeAccessType.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/RuntimeMetrics.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/RuntimeShieldedInstanceConfig.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/RuntimeSoftwareConfig.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/RuntimeSoftwareConfig/PostStartupScriptBehavior.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Schedule.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Schedule/State.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/SetInstanceAcceleratorRequest.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/SetInstanceLabelsRequest.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/SetInstanceMachineTypeRequest.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/StartInstanceRequest.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/StartRuntimeRequest.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/StopInstanceRequest.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/StopRuntimeRequest.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/SwitchRuntimeRequest.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/TriggerScheduleRequest.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/UpdateInstanceConfigRequest.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/UpdateInstanceMetadataItemsRequest.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/UpdateInstanceMetadataItemsResponse.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/UpdateRuntimeRequest.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/UpdateShieldedInstanceConfigRequest.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/UpgradeInstanceInternalRequest.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/UpgradeInstanceRequest.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/UpgradeRuntimeRequest.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/UpgradeType.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/VirtualMachine.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/VirtualMachineConfig.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/VirtualMachineConfig/BootImage.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/VirtualMachineConfig/NicType.php create mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/VmImage.php create mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/create_runtime.php create mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/delete_runtime.php create mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/diagnose_runtime.php create mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/get_iam_policy.php create mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/get_location.php create mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/get_runtime.php create mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/list_locations.php create mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/list_runtimes.php create mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/refresh_runtime_token_internal.php create mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/report_runtime_event.php create mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/reset_runtime.php create mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/set_iam_policy.php create mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/start_runtime.php create mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/stop_runtime.php create mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/switch_runtime.php create mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/test_iam_permissions.php create mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/update_runtime.php create mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/upgrade_runtime.php create mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/create_environment.php create mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/create_execution.php create mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/create_instance.php create mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/create_schedule.php create mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/delete_environment.php create mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/delete_execution.php create mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/delete_instance.php create mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/delete_schedule.php create mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/diagnose_instance.php create mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/get_environment.php create mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/get_execution.php create mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/get_iam_policy.php create mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/get_instance.php create mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/get_instance_health.php create mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/get_location.php create mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/get_schedule.php create mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/is_instance_upgradeable.php create mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/list_environments.php create mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/list_executions.php create mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/list_instances.php create mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/list_locations.php create mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/list_schedules.php create mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/register_instance.php create mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/report_instance_info.php create mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/reset_instance.php create mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/rollback_instance.php create mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/set_iam_policy.php create mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/set_instance_accelerator.php create mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/set_instance_labels.php create mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/set_instance_machine_type.php create mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/start_instance.php create mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/stop_instance.php create mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/test_iam_permissions.php create mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/trigger_schedule.php create mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/update_instance_config.php create mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/update_instance_metadata_items.php create mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/update_shielded_instance_config.php create mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/upgrade_instance.php create mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/upgrade_instance_internal.php create mode 100644 owl-bot-staging/Notebooks/v1/src/V1/Client/ManagedNotebookServiceClient.php create mode 100644 owl-bot-staging/Notebooks/v1/src/V1/Client/NotebookServiceClient.php create mode 100644 owl-bot-staging/Notebooks/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/Notebooks/v1/src/V1/resources/managed_notebook_service_client_config.json create mode 100644 owl-bot-staging/Notebooks/v1/src/V1/resources/managed_notebook_service_descriptor_config.php create mode 100644 owl-bot-staging/Notebooks/v1/src/V1/resources/managed_notebook_service_rest_client_config.php create mode 100644 owl-bot-staging/Notebooks/v1/src/V1/resources/notebook_service_client_config.json create mode 100644 owl-bot-staging/Notebooks/v1/src/V1/resources/notebook_service_descriptor_config.php create mode 100644 owl-bot-staging/Notebooks/v1/src/V1/resources/notebook_service_rest_client_config.php create mode 100644 owl-bot-staging/Notebooks/v1/tests/Unit/V1/Client/ManagedNotebookServiceClientTest.php create mode 100644 owl-bot-staging/Notebooks/v1/tests/Unit/V1/Client/NotebookServiceClientTest.php create mode 100644 owl-bot-staging/Notebooks/v2/proto/src/GPBMetadata/Google/Cloud/Notebooks/V2/DiagnosticConfig.php create mode 100644 owl-bot-staging/Notebooks/v2/proto/src/GPBMetadata/Google/Cloud/Notebooks/V2/Event.php create mode 100644 owl-bot-staging/Notebooks/v2/proto/src/GPBMetadata/Google/Cloud/Notebooks/V2/GceSetup.php create mode 100644 owl-bot-staging/Notebooks/v2/proto/src/GPBMetadata/Google/Cloud/Notebooks/V2/Instance.php create mode 100644 owl-bot-staging/Notebooks/v2/proto/src/GPBMetadata/Google/Cloud/Notebooks/V2/Service.php create mode 100644 owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/AcceleratorConfig.php create mode 100644 owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/AcceleratorConfig/AcceleratorType.php create mode 100644 owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/BootDisk.php create mode 100644 owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/CheckInstanceUpgradabilityRequest.php create mode 100644 owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/CheckInstanceUpgradabilityResponse.php create mode 100644 owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/ContainerImage.php create mode 100644 owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/CreateInstanceRequest.php create mode 100644 owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/DataDisk.php create mode 100644 owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/DeleteInstanceRequest.php create mode 100644 owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/DiagnoseInstanceRequest.php create mode 100644 owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/DiagnosticConfig.php create mode 100644 owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/DiskEncryption.php create mode 100644 owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/DiskType.php create mode 100644 owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/Event.php create mode 100644 owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/Event/EventType.php create mode 100644 owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/GPUDriverConfig.php create mode 100644 owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/GceSetup.php create mode 100644 owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/GetInstanceRequest.php create mode 100644 owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/HealthState.php create mode 100644 owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/Instance.php create mode 100644 owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/ListInstancesRequest.php create mode 100644 owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/ListInstancesResponse.php create mode 100644 owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/NetworkInterface.php create mode 100644 owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/NetworkInterface/NicType.php create mode 100644 owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/OperationMetadata.php create mode 100644 owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/ResetInstanceRequest.php create mode 100644 owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/RollbackInstanceRequest.php create mode 100644 owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/ServiceAccount.php create mode 100644 owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/ShieldedInstanceConfig.php create mode 100644 owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/StartInstanceRequest.php create mode 100644 owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/State.php create mode 100644 owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/StopInstanceRequest.php create mode 100644 owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/UpdateInstanceRequest.php create mode 100644 owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/UpgradeHistoryEntry.php create mode 100644 owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/UpgradeHistoryEntry/Action.php create mode 100644 owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/UpgradeHistoryEntry/State.php create mode 100644 owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/UpgradeInstanceRequest.php create mode 100644 owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/VmImage.php create mode 100644 owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/check_instance_upgradability.php create mode 100644 owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/create_instance.php create mode 100644 owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/delete_instance.php create mode 100644 owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/diagnose_instance.php create mode 100644 owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/get_iam_policy.php create mode 100644 owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/get_instance.php create mode 100644 owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/get_location.php create mode 100644 owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/list_instances.php create mode 100644 owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/list_locations.php create mode 100644 owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/reset_instance.php create mode 100644 owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/rollback_instance.php create mode 100644 owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/set_iam_policy.php create mode 100644 owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/start_instance.php create mode 100644 owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/stop_instance.php create mode 100644 owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/test_iam_permissions.php create mode 100644 owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/update_instance.php create mode 100644 owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/upgrade_instance.php create mode 100644 owl-bot-staging/Notebooks/v2/src/V2/Client/NotebookServiceClient.php create mode 100644 owl-bot-staging/Notebooks/v2/src/V2/gapic_metadata.json create mode 100644 owl-bot-staging/Notebooks/v2/src/V2/resources/notebook_service_client_config.json create mode 100644 owl-bot-staging/Notebooks/v2/src/V2/resources/notebook_service_descriptor_config.php create mode 100644 owl-bot-staging/Notebooks/v2/src/V2/resources/notebook_service_rest_client_config.php create mode 100644 owl-bot-staging/Notebooks/v2/tests/Unit/V2/Client/NotebookServiceClientTest.php create mode 100644 owl-bot-staging/Optimization/v1/proto/src/GPBMetadata/Google/Cloud/Optimization/V1/AsyncModel.php create mode 100644 owl-bot-staging/Optimization/v1/proto/src/GPBMetadata/Google/Cloud/Optimization/V1/FleetRouting.php create mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/AggregatedMetrics.php create mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/AsyncModelMetadata.php create mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/AsyncModelMetadata/State.php create mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/BatchOptimizeToursRequest.php create mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/BatchOptimizeToursRequest/AsyncModelConfig.php create mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/BatchOptimizeToursResponse.php create mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/BreakRule.php create mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/BreakRule/BreakRequest.php create mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/BreakRule/FrequencyConstraint.php create mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/CapacityQuantity.php create mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/CapacityQuantityInterval.php create mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/DataFormat.php create mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/DistanceLimit.php create mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/GcsDestination.php create mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/GcsSource.php create mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/InjectedSolutionConstraint.php create mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/InjectedSolutionConstraint/ConstraintRelaxation.php create mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/InjectedSolutionConstraint/ConstraintRelaxation/Relaxation.php create mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/InjectedSolutionConstraint/ConstraintRelaxation/Relaxation/Level.php create mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/InputConfig.php create mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/Location.php create mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/OptimizeToursRequest.php create mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/OptimizeToursRequest/SearchMode.php create mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/OptimizeToursRequest/SolvingMode.php create mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/OptimizeToursResponse.php create mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/OptimizeToursResponse/Metrics.php create mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/OptimizeToursValidationError.php create mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/OptimizeToursValidationError/FieldReference.php create mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/OutputConfig.php create mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/RouteModifiers.php create mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/Shipment.php create mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/Shipment/Load.php create mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/Shipment/VisitRequest.php create mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentModel.php create mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentModel/BreakRule.php create mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentModel/BreakRule/BreakRequest.php create mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentModel/BreakRule/FrequencyConstraint.php create mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentModel/DurationDistanceMatrix.php create mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentModel/DurationDistanceMatrix/Row.php create mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentModel/PrecedenceRule.php create mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentRoute.php create mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentRoute/Delay.php create mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentRoute/EncodedPolyline.php create mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentRoute/PBBreak.php create mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentRoute/Transition.php create mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentRoute/TravelStep.php create mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentRoute/VehicleLoad.php create mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentRoute/Visit.php create mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentTypeIncompatibility.php create mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentTypeIncompatibility/IncompatibilityMode.php create mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentTypeRequirement.php create mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentTypeRequirement/RequirementMode.php create mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/SkippedShipment.php create mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/SkippedShipment/Reason.php create mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/SkippedShipment/Reason/Code.php create mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/TimeWindow.php create mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/TransitionAttributes.php create mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/Vehicle.php create mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/Vehicle/DurationLimit.php create mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/Vehicle/LoadLimit.php create mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/Vehicle/LoadLimit/Interval.php create mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/Vehicle/TravelMode.php create mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/Vehicle/UnloadingPolicy.php create mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/Waypoint.php create mode 100644 owl-bot-staging/Optimization/v1/samples/V1/FleetRoutingClient/batch_optimize_tours.php create mode 100644 owl-bot-staging/Optimization/v1/samples/V1/FleetRoutingClient/optimize_tours.php create mode 100644 owl-bot-staging/Optimization/v1/src/V1/Client/FleetRoutingClient.php create mode 100644 owl-bot-staging/Optimization/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/Optimization/v1/src/V1/resources/fleet_routing_client_config.json create mode 100644 owl-bot-staging/Optimization/v1/src/V1/resources/fleet_routing_descriptor_config.php create mode 100644 owl-bot-staging/Optimization/v1/src/V1/resources/fleet_routing_rest_client_config.php create mode 100644 owl-bot-staging/Optimization/v1/tests/Unit/V1/Client/FleetRoutingClientTest.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/GPBMetadata/Google/Cloud/Oracledatabase/V1/AutonomousDatabase.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/GPBMetadata/Google/Cloud/Oracledatabase/V1/AutonomousDatabaseCharacterSet.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/GPBMetadata/Google/Cloud/Oracledatabase/V1/AutonomousDbBackup.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/GPBMetadata/Google/Cloud/Oracledatabase/V1/AutonomousDbVersion.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/GPBMetadata/Google/Cloud/Oracledatabase/V1/Common.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/GPBMetadata/Google/Cloud/Oracledatabase/V1/DbNode.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/GPBMetadata/Google/Cloud/Oracledatabase/V1/DbServer.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/GPBMetadata/Google/Cloud/Oracledatabase/V1/DbSystemShape.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/GPBMetadata/Google/Cloud/Oracledatabase/V1/Entitlement.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/GPBMetadata/Google/Cloud/Oracledatabase/V1/ExadataInfra.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/GPBMetadata/Google/Cloud/Oracledatabase/V1/GiVersion.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/GPBMetadata/Google/Cloud/Oracledatabase/V1/LocationMetadata.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/GPBMetadata/Google/Cloud/Oracledatabase/V1/Oracledatabase.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/GPBMetadata/Google/Cloud/Oracledatabase/V1/VmCluster.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AllConnectionStrings.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabase.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseApex.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseBackup.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseBackupProperties.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseBackupProperties/State.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseBackupProperties/Type.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseCharacterSet.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseCharacterSet/CharacterSetType.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseConnectionStrings.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseConnectionUrls.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseProperties.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseProperties/DataSafeState.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseProperties/DatabaseEdition.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseProperties/DatabaseManagementState.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseProperties/LicenseType.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseProperties/LocalDisasterRecoveryType.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseProperties/MaintenanceScheduleType.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseProperties/OpenMode.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseProperties/PermissionLevel.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseProperties/RefreshableMode.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseProperties/RefreshableState.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseProperties/Role.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseStandbySummary.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDbVersion.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CloudAccountDetails.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CloudExadataInfrastructure.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CloudExadataInfrastructureProperties.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CloudExadataInfrastructureProperties/State.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CloudVmCluster.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CloudVmClusterProperties.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CloudVmClusterProperties/DiskRedundancy.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CloudVmClusterProperties/LicenseType.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CloudVmClusterProperties/State.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CreateAutonomousDatabaseRequest.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CreateCloudExadataInfrastructureRequest.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CreateCloudVmClusterRequest.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CustomerContact.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DBWorkload.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DataCollectionOptions.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DatabaseConnectionStringProfile.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DatabaseConnectionStringProfile/ConsumerGroup.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DatabaseConnectionStringProfile/HostFormat.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DatabaseConnectionStringProfile/Protocol.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DatabaseConnectionStringProfile/SessionMode.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DatabaseConnectionStringProfile/SyntaxFormat.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DatabaseConnectionStringProfile/TLSAuthentication.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DbNode.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DbNodeProperties.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DbNodeProperties/State.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DbServer.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DbServerProperties.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DbServerProperties/State.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DbSystemShape.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DeleteAutonomousDatabaseRequest.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DeleteCloudExadataInfrastructureRequest.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DeleteCloudVmClusterRequest.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/Entitlement.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/Entitlement/State.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/GenerateAutonomousDatabaseWalletRequest.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/GenerateAutonomousDatabaseWalletResponse.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/GenerateType.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/GetAutonomousDatabaseRequest.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/GetCloudExadataInfrastructureRequest.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/GetCloudVmClusterRequest.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/GiVersion.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListAutonomousDatabaseBackupsRequest.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListAutonomousDatabaseBackupsResponse.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListAutonomousDatabaseCharacterSetsRequest.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListAutonomousDatabaseCharacterSetsResponse.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListAutonomousDatabasesRequest.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListAutonomousDatabasesResponse.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListAutonomousDbVersionsRequest.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListAutonomousDbVersionsResponse.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListCloudExadataInfrastructuresRequest.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListCloudExadataInfrastructuresResponse.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListCloudVmClustersRequest.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListCloudVmClustersResponse.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListDbNodesRequest.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListDbNodesResponse.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListDbServersRequest.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListDbServersResponse.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListDbSystemShapesRequest.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListDbSystemShapesResponse.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListEntitlementsRequest.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListEntitlementsResponse.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListGiVersionsRequest.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListGiVersionsResponse.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/LocationMetadata.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/MaintenanceWindow.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/MaintenanceWindow/MaintenanceWindowPreference.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/MaintenanceWindow/PatchingMode.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/OperationMetadata.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/OperationsInsightsState.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/RestoreAutonomousDatabaseRequest.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ScheduledOperationDetails.php create mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/State.php create mode 100644 owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/create_autonomous_database.php create mode 100644 owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/create_cloud_exadata_infrastructure.php create mode 100644 owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/create_cloud_vm_cluster.php create mode 100644 owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/delete_autonomous_database.php create mode 100644 owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/delete_cloud_exadata_infrastructure.php create mode 100644 owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/delete_cloud_vm_cluster.php create mode 100644 owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/generate_autonomous_database_wallet.php create mode 100644 owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/get_autonomous_database.php create mode 100644 owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/get_cloud_exadata_infrastructure.php create mode 100644 owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/get_cloud_vm_cluster.php create mode 100644 owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/get_location.php create mode 100644 owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/list_autonomous_database_backups.php create mode 100644 owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/list_autonomous_database_character_sets.php create mode 100644 owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/list_autonomous_databases.php create mode 100644 owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/list_autonomous_db_versions.php create mode 100644 owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/list_cloud_exadata_infrastructures.php create mode 100644 owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/list_cloud_vm_clusters.php create mode 100644 owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/list_db_nodes.php create mode 100644 owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/list_db_servers.php create mode 100644 owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/list_db_system_shapes.php create mode 100644 owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/list_entitlements.php create mode 100644 owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/list_gi_versions.php create mode 100644 owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/list_locations.php create mode 100644 owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/restore_autonomous_database.php create mode 100644 owl-bot-staging/OracleDatabase/v1/src/V1/Client/OracleDatabaseClient.php create mode 100644 owl-bot-staging/OracleDatabase/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/OracleDatabase/v1/src/V1/resources/oracle_database_client_config.json create mode 100644 owl-bot-staging/OracleDatabase/v1/src/V1/resources/oracle_database_descriptor_config.php create mode 100644 owl-bot-staging/OracleDatabase/v1/src/V1/resources/oracle_database_rest_client_config.php create mode 100644 owl-bot-staging/OracleDatabase/v1/tests/Unit/V1/Client/OracleDatabaseClientTest.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/GPBMetadata/Google/Cloud/Orchestration/Airflow/Service/V1/Environments.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/GPBMetadata/Google/Cloud/Orchestration/Airflow/Service/V1/ImageVersions.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/GPBMetadata/Google/Cloud/Orchestration/Airflow/Service/V1/Operations.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/AirflowMetadataRetentionPolicyConfig.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/AirflowMetadataRetentionPolicyConfig/RetentionMode.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/CheckUpgradeRequest.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/CheckUpgradeResponse.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/CheckUpgradeResponse/ConflictResult.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/CloudDataLineageIntegration.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/CreateEnvironmentRequest.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/CreateUserWorkloadsConfigMapRequest.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/CreateUserWorkloadsSecretRequest.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/DataRetentionConfig.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/DatabaseConfig.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/DatabaseFailoverRequest.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/DatabaseFailoverResponse.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/DeleteEnvironmentRequest.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/DeleteUserWorkloadsConfigMapRequest.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/DeleteUserWorkloadsSecretRequest.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/EncryptionConfig.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/Environment.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/Environment/State.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/EnvironmentConfig.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/EnvironmentConfig/EnvironmentSize.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/EnvironmentConfig/ResilienceMode.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ExecuteAirflowCommandRequest.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ExecuteAirflowCommandResponse.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/FetchDatabasePropertiesRequest.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/FetchDatabasePropertiesResponse.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/GetEnvironmentRequest.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/GetUserWorkloadsConfigMapRequest.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/GetUserWorkloadsSecretRequest.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/IPAllocationPolicy.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ImageVersion.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListEnvironmentsRequest.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListEnvironmentsResponse.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListImageVersionsRequest.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListImageVersionsResponse.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListUserWorkloadsConfigMapsRequest.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListUserWorkloadsConfigMapsResponse.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListUserWorkloadsSecretsRequest.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListUserWorkloadsSecretsResponse.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListWorkloadsRequest.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListWorkloadsResponse.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListWorkloadsResponse/ComposerWorkload.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListWorkloadsResponse/ComposerWorkloadState.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListWorkloadsResponse/ComposerWorkloadStatus.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListWorkloadsResponse/ComposerWorkloadType.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/LoadSnapshotRequest.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/LoadSnapshotResponse.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/MaintenanceWindow.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/MasterAuthorizedNetworksConfig.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/MasterAuthorizedNetworksConfig/CidrBlock.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/NetworkingConfig.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/NetworkingConfig/ConnectionType.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/NodeConfig.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/OperationMetadata.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/OperationMetadata/State.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/OperationMetadata/Type.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/PollAirflowCommandRequest.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/PollAirflowCommandResponse.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/PollAirflowCommandResponse/ExitInfo.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/PollAirflowCommandResponse/Line.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/PrivateClusterConfig.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/PrivateEnvironmentConfig.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/RecoveryConfig.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/SaveSnapshotRequest.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/SaveSnapshotResponse.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ScheduledSnapshotsConfig.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/SoftwareConfig.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/SoftwareConfig/WebServerPluginsMode.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/StopAirflowCommandRequest.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/StopAirflowCommandResponse.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/StorageConfig.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/TaskLogsRetentionConfig.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/TaskLogsRetentionConfig/TaskLogsStorageMode.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/UpdateEnvironmentRequest.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/UpdateUserWorkloadsConfigMapRequest.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/UpdateUserWorkloadsSecretRequest.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/UserWorkloadsConfigMap.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/UserWorkloadsSecret.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/WebServerConfig.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/WebServerNetworkAccessControl.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/WebServerNetworkAccessControl/AllowedIpRange.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/WorkloadsConfig.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/WorkloadsConfig/DagProcessorResource.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/WorkloadsConfig/SchedulerResource.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/WorkloadsConfig/TriggererResource.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/WorkloadsConfig/WebServerResource.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/WorkloadsConfig/WorkerResource.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/check_upgrade.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/create_environment.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/create_user_workloads_config_map.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/create_user_workloads_secret.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/database_failover.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/delete_environment.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/delete_user_workloads_config_map.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/delete_user_workloads_secret.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/execute_airflow_command.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/fetch_database_properties.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/get_environment.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/get_user_workloads_config_map.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/get_user_workloads_secret.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/list_environments.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/list_user_workloads_config_maps.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/list_user_workloads_secrets.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/list_workloads.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/load_snapshot.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/poll_airflow_command.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/save_snapshot.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/stop_airflow_command.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/update_environment.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/update_user_workloads_config_map.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/update_user_workloads_secret.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/samples/V1/ImageVersionsClient/list_image_versions.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/src/V1/Client/EnvironmentsClient.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/src/V1/Client/ImageVersionsClient.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/src/V1/resources/environments_client_config.json create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/src/V1/resources/environments_descriptor_config.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/src/V1/resources/environments_rest_client_config.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/src/V1/resources/image_versions_client_config.json create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/src/V1/resources/image_versions_descriptor_config.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/src/V1/resources/image_versions_rest_client_config.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/tests/Unit/V1/Client/EnvironmentsClientTest.php create mode 100644 owl-bot-staging/OrchestrationAirflow/v1/tests/Unit/V1/Client/ImageVersionsClientTest.php create mode 100644 owl-bot-staging/OrgPolicy/v2/proto/src/GPBMetadata/Google/Cloud/Orgpolicy/V2/Constraint.php create mode 100644 owl-bot-staging/OrgPolicy/v2/proto/src/GPBMetadata/Google/Cloud/Orgpolicy/V2/Orgpolicy.php create mode 100644 owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/AlternatePolicySpec.php create mode 100644 owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/Constraint.php create mode 100644 owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/Constraint/BooleanConstraint.php create mode 100644 owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/Constraint/ConstraintDefault.php create mode 100644 owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/Constraint/ListConstraint.php create mode 100644 owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/CreateCustomConstraintRequest.php create mode 100644 owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/CreatePolicyRequest.php create mode 100644 owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/CustomConstraint.php create mode 100644 owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/CustomConstraint/ActionType.php create mode 100644 owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/CustomConstraint/MethodType.php create mode 100644 owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/DeleteCustomConstraintRequest.php create mode 100644 owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/DeletePolicyRequest.php create mode 100644 owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/GetCustomConstraintRequest.php create mode 100644 owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/GetEffectivePolicyRequest.php create mode 100644 owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/GetPolicyRequest.php create mode 100644 owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/ListConstraintsRequest.php create mode 100644 owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/ListConstraintsResponse.php create mode 100644 owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/ListCustomConstraintsRequest.php create mode 100644 owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/ListCustomConstraintsResponse.php create mode 100644 owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/ListPoliciesRequest.php create mode 100644 owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/ListPoliciesResponse.php create mode 100644 owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/Policy.php create mode 100644 owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/PolicySpec.php create mode 100644 owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/PolicySpec/PolicyRule.php create mode 100644 owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/PolicySpec/PolicyRule/StringValues.php create mode 100644 owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/UpdateCustomConstraintRequest.php create mode 100644 owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/UpdatePolicyRequest.php create mode 100644 owl-bot-staging/OrgPolicy/v2/samples/V2/OrgPolicyClient/create_custom_constraint.php create mode 100644 owl-bot-staging/OrgPolicy/v2/samples/V2/OrgPolicyClient/create_policy.php create mode 100644 owl-bot-staging/OrgPolicy/v2/samples/V2/OrgPolicyClient/delete_custom_constraint.php create mode 100644 owl-bot-staging/OrgPolicy/v2/samples/V2/OrgPolicyClient/delete_policy.php create mode 100644 owl-bot-staging/OrgPolicy/v2/samples/V2/OrgPolicyClient/get_custom_constraint.php create mode 100644 owl-bot-staging/OrgPolicy/v2/samples/V2/OrgPolicyClient/get_effective_policy.php create mode 100644 owl-bot-staging/OrgPolicy/v2/samples/V2/OrgPolicyClient/get_policy.php create mode 100644 owl-bot-staging/OrgPolicy/v2/samples/V2/OrgPolicyClient/list_constraints.php create mode 100644 owl-bot-staging/OrgPolicy/v2/samples/V2/OrgPolicyClient/list_custom_constraints.php create mode 100644 owl-bot-staging/OrgPolicy/v2/samples/V2/OrgPolicyClient/list_policies.php create mode 100644 owl-bot-staging/OrgPolicy/v2/samples/V2/OrgPolicyClient/update_custom_constraint.php create mode 100644 owl-bot-staging/OrgPolicy/v2/samples/V2/OrgPolicyClient/update_policy.php create mode 100644 owl-bot-staging/OrgPolicy/v2/src/V2/Client/OrgPolicyClient.php create mode 100644 owl-bot-staging/OrgPolicy/v2/src/V2/gapic_metadata.json create mode 100644 owl-bot-staging/OrgPolicy/v2/src/V2/resources/org_policy_client_config.json create mode 100644 owl-bot-staging/OrgPolicy/v2/src/V2/resources/org_policy_descriptor_config.php create mode 100644 owl-bot-staging/OrgPolicy/v2/src/V2/resources/org_policy_rest_client_config.php create mode 100644 owl-bot-staging/OrgPolicy/v2/tests/Unit/V2/Client/OrgPolicyClientTest.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/GPBMetadata/Google/Cloud/Osconfig/V1/Inventory.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/GPBMetadata/Google/Cloud/Osconfig/V1/OsPolicy.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/GPBMetadata/Google/Cloud/Osconfig/V1/OsPolicyAssignmentReports.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/GPBMetadata/Google/Cloud/Osconfig/V1/OsPolicyAssignments.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/GPBMetadata/Google/Cloud/Osconfig/V1/OsconfigCommon.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/GPBMetadata/Google/Cloud/Osconfig/V1/OsconfigService.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/GPBMetadata/Google/Cloud/Osconfig/V1/OsconfigZonalService.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/GPBMetadata/Google/Cloud/Osconfig/V1/PatchDeployments.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/GPBMetadata/Google/Cloud/Osconfig/V1/PatchJobs.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/GPBMetadata/Google/Cloud/Osconfig/V1/Vulnerability.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/AptSettings.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/AptSettings/Type.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/CVSSv3.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/CVSSv3/AttackComplexity.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/CVSSv3/AttackVector.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/CVSSv3/Impact.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/CVSSv3/PrivilegesRequired.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/CVSSv3/Scope.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/CVSSv3/UserInteraction.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/CancelPatchJobRequest.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/CreateOSPolicyAssignmentRequest.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/CreatePatchDeploymentRequest.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/DeleteOSPolicyAssignmentRequest.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/DeletePatchDeploymentRequest.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ExecStep.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ExecStepConfig.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ExecStepConfig/Interpreter.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ExecutePatchJobRequest.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/FixedOrPercent.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/GcsObject.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/GetInventoryRequest.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/GetOSPolicyAssignmentReportRequest.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/GetOSPolicyAssignmentRequest.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/GetPatchDeploymentRequest.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/GetPatchJobRequest.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/GetVulnerabilityReportRequest.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/GooSettings.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Instance.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Instance/PatchState.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Inventory.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Inventory/Item.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Inventory/Item/OriginType.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Inventory/Item/Type.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Inventory/OsInfo.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Inventory/SoftwarePackage.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Inventory/VersionedPackage.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Inventory/WindowsApplication.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Inventory/WindowsQuickFixEngineeringPackage.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Inventory/WindowsUpdatePackage.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Inventory/WindowsUpdatePackage/WindowsUpdateCategory.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Inventory/ZypperPatch.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/InventoryView.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListInventoriesRequest.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListInventoriesResponse.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListOSPolicyAssignmentReportsRequest.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListOSPolicyAssignmentReportsResponse.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListOSPolicyAssignmentRevisionsRequest.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListOSPolicyAssignmentRevisionsResponse.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListOSPolicyAssignmentsRequest.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListOSPolicyAssignmentsResponse.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListPatchDeploymentsRequest.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListPatchDeploymentsResponse.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListPatchJobInstanceDetailsRequest.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListPatchJobInstanceDetailsResponse.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListPatchJobsRequest.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListPatchJobsResponse.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListVulnerabilityReportsRequest.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListVulnerabilityReportsResponse.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/MonthlySchedule.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/InventoryFilter.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Mode.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/ExecResource.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/ExecResource/Exec.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/ExecResource/Exec/Interpreter.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/File.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/File/Gcs.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/File/Remote.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/FileResource.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/FileResource/DesiredState.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/PackageResource.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/PackageResource/APT.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/PackageResource/Deb.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/PackageResource/DesiredState.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/PackageResource/GooGet.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/PackageResource/MSI.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/PackageResource/RPM.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/PackageResource/YUM.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/PackageResource/Zypper.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/RepositoryResource.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/RepositoryResource/AptRepository.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/RepositoryResource/AptRepository/ArchiveType.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/RepositoryResource/GooRepository.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/RepositoryResource/YumRepository.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/RepositoryResource/ZypperRepository.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/ResourceGroup.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignment.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignment/InstanceFilter.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignment/InstanceFilter/Inventory.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignment/LabelSet.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignment/Rollout.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignment/RolloutState.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignmentOperationMetadata.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignmentOperationMetadata/APIMethod.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignmentOperationMetadata/RolloutState.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignmentReport.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignmentReport/OSPolicyCompliance.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignmentReport/OSPolicyCompliance/ComplianceState.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignmentReport/OSPolicyCompliance/OSPolicyResourceCompliance.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignmentReport/OSPolicyCompliance/OSPolicyResourceCompliance/ComplianceState.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignmentReport/OSPolicyCompliance/OSPolicyResourceCompliance/ExecResourceOutput.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignmentReport/OSPolicyCompliance/OSPolicyResourceCompliance/OSPolicyResourceConfigStep.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignmentReport/OSPolicyCompliance/OSPolicyResourceCompliance/OSPolicyResourceConfigStep/Type.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OneTimeSchedule.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PatchConfig.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PatchConfig/RebootConfig.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PatchDeployment.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PatchDeployment/State.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PatchInstanceFilter.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PatchInstanceFilter/GroupLabel.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PatchJob.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PatchJob/InstanceDetailsSummary.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PatchJob/State.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PatchJobInstanceDetails.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PatchRollout.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PatchRollout/Mode.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PausePatchDeploymentRequest.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/RecurringSchedule.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/RecurringSchedule/Frequency.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ResumePatchDeploymentRequest.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/UpdateOSPolicyAssignmentRequest.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/UpdatePatchDeploymentRequest.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/VulnerabilityReport.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/VulnerabilityReport/Vulnerability.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/VulnerabilityReport/Vulnerability/Details.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/VulnerabilityReport/Vulnerability/Details/Reference.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/VulnerabilityReport/Vulnerability/Item.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/WeekDayOfMonth.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/WeeklySchedule.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/WindowsUpdateSettings.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/WindowsUpdateSettings/Classification.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/YumSettings.php create mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ZypperSettings.php create mode 100644 owl-bot-staging/OsConfig/v1/samples/V1/OsConfigServiceClient/cancel_patch_job.php create mode 100644 owl-bot-staging/OsConfig/v1/samples/V1/OsConfigServiceClient/create_patch_deployment.php create mode 100644 owl-bot-staging/OsConfig/v1/samples/V1/OsConfigServiceClient/delete_patch_deployment.php create mode 100644 owl-bot-staging/OsConfig/v1/samples/V1/OsConfigServiceClient/execute_patch_job.php create mode 100644 owl-bot-staging/OsConfig/v1/samples/V1/OsConfigServiceClient/get_patch_deployment.php create mode 100644 owl-bot-staging/OsConfig/v1/samples/V1/OsConfigServiceClient/get_patch_job.php create mode 100644 owl-bot-staging/OsConfig/v1/samples/V1/OsConfigServiceClient/list_patch_deployments.php create mode 100644 owl-bot-staging/OsConfig/v1/samples/V1/OsConfigServiceClient/list_patch_job_instance_details.php create mode 100644 owl-bot-staging/OsConfig/v1/samples/V1/OsConfigServiceClient/list_patch_jobs.php create mode 100644 owl-bot-staging/OsConfig/v1/samples/V1/OsConfigServiceClient/pause_patch_deployment.php create mode 100644 owl-bot-staging/OsConfig/v1/samples/V1/OsConfigServiceClient/resume_patch_deployment.php create mode 100644 owl-bot-staging/OsConfig/v1/samples/V1/OsConfigServiceClient/update_patch_deployment.php create mode 100644 owl-bot-staging/OsConfig/v1/samples/V1/OsConfigZonalServiceClient/create_os_policy_assignment.php create mode 100644 owl-bot-staging/OsConfig/v1/samples/V1/OsConfigZonalServiceClient/delete_os_policy_assignment.php create mode 100644 owl-bot-staging/OsConfig/v1/samples/V1/OsConfigZonalServiceClient/get_inventory.php create mode 100644 owl-bot-staging/OsConfig/v1/samples/V1/OsConfigZonalServiceClient/get_os_policy_assignment.php create mode 100644 owl-bot-staging/OsConfig/v1/samples/V1/OsConfigZonalServiceClient/get_os_policy_assignment_report.php create mode 100644 owl-bot-staging/OsConfig/v1/samples/V1/OsConfigZonalServiceClient/get_vulnerability_report.php create mode 100644 owl-bot-staging/OsConfig/v1/samples/V1/OsConfigZonalServiceClient/list_inventories.php create mode 100644 owl-bot-staging/OsConfig/v1/samples/V1/OsConfigZonalServiceClient/list_os_policy_assignment_reports.php create mode 100644 owl-bot-staging/OsConfig/v1/samples/V1/OsConfigZonalServiceClient/list_os_policy_assignment_revisions.php create mode 100644 owl-bot-staging/OsConfig/v1/samples/V1/OsConfigZonalServiceClient/list_os_policy_assignments.php create mode 100644 owl-bot-staging/OsConfig/v1/samples/V1/OsConfigZonalServiceClient/list_vulnerability_reports.php create mode 100644 owl-bot-staging/OsConfig/v1/samples/V1/OsConfigZonalServiceClient/update_os_policy_assignment.php create mode 100644 owl-bot-staging/OsConfig/v1/src/V1/Client/OsConfigServiceClient.php create mode 100644 owl-bot-staging/OsConfig/v1/src/V1/Client/OsConfigZonalServiceClient.php create mode 100644 owl-bot-staging/OsConfig/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/OsConfig/v1/src/V1/resources/os_config_service_client_config.json create mode 100644 owl-bot-staging/OsConfig/v1/src/V1/resources/os_config_service_descriptor_config.php create mode 100644 owl-bot-staging/OsConfig/v1/src/V1/resources/os_config_service_rest_client_config.php create mode 100644 owl-bot-staging/OsConfig/v1/src/V1/resources/os_config_zonal_service_client_config.json create mode 100644 owl-bot-staging/OsConfig/v1/src/V1/resources/os_config_zonal_service_descriptor_config.php create mode 100644 owl-bot-staging/OsConfig/v1/src/V1/resources/os_config_zonal_service_rest_client_config.php create mode 100644 owl-bot-staging/OsConfig/v1/tests/Unit/V1/Client/OsConfigServiceClientTest.php create mode 100644 owl-bot-staging/OsConfig/v1/tests/Unit/V1/Client/OsConfigZonalServiceClientTest.php create mode 100644 owl-bot-staging/OsLogin/v1/proto/src/GPBMetadata/Google/Cloud/Oslogin/Common/Common.php create mode 100644 owl-bot-staging/OsLogin/v1/proto/src/GPBMetadata/Google/Cloud/Oslogin/V1/Oslogin.php create mode 100644 owl-bot-staging/OsLogin/v1/proto/src/Google/Cloud/OsLogin/Common/OperatingSystemType.php create mode 100644 owl-bot-staging/OsLogin/v1/proto/src/Google/Cloud/OsLogin/Common/PosixAccount.php create mode 100644 owl-bot-staging/OsLogin/v1/proto/src/Google/Cloud/OsLogin/Common/SshPublicKey.php create mode 100644 owl-bot-staging/OsLogin/v1/proto/src/Google/Cloud/OsLogin/V1/CreateSshPublicKeyRequest.php create mode 100644 owl-bot-staging/OsLogin/v1/proto/src/Google/Cloud/OsLogin/V1/DeletePosixAccountRequest.php create mode 100644 owl-bot-staging/OsLogin/v1/proto/src/Google/Cloud/OsLogin/V1/DeleteSshPublicKeyRequest.php create mode 100644 owl-bot-staging/OsLogin/v1/proto/src/Google/Cloud/OsLogin/V1/GetLoginProfileRequest.php create mode 100644 owl-bot-staging/OsLogin/v1/proto/src/Google/Cloud/OsLogin/V1/GetSshPublicKeyRequest.php create mode 100644 owl-bot-staging/OsLogin/v1/proto/src/Google/Cloud/OsLogin/V1/ImportSshPublicKeyRequest.php create mode 100644 owl-bot-staging/OsLogin/v1/proto/src/Google/Cloud/OsLogin/V1/ImportSshPublicKeyResponse.php create mode 100644 owl-bot-staging/OsLogin/v1/proto/src/Google/Cloud/OsLogin/V1/LoginProfile.php create mode 100644 owl-bot-staging/OsLogin/v1/proto/src/Google/Cloud/OsLogin/V1/UpdateSshPublicKeyRequest.php create mode 100644 owl-bot-staging/OsLogin/v1/samples/V1/OsLoginServiceClient/create_ssh_public_key.php create mode 100644 owl-bot-staging/OsLogin/v1/samples/V1/OsLoginServiceClient/delete_posix_account.php create mode 100644 owl-bot-staging/OsLogin/v1/samples/V1/OsLoginServiceClient/delete_ssh_public_key.php create mode 100644 owl-bot-staging/OsLogin/v1/samples/V1/OsLoginServiceClient/get_login_profile.php create mode 100644 owl-bot-staging/OsLogin/v1/samples/V1/OsLoginServiceClient/get_ssh_public_key.php create mode 100644 owl-bot-staging/OsLogin/v1/samples/V1/OsLoginServiceClient/import_ssh_public_key.php create mode 100644 owl-bot-staging/OsLogin/v1/samples/V1/OsLoginServiceClient/update_ssh_public_key.php create mode 100644 owl-bot-staging/OsLogin/v1/src/V1/Client/OsLoginServiceClient.php create mode 100644 owl-bot-staging/OsLogin/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/OsLogin/v1/src/V1/resources/os_login_service_client_config.json create mode 100644 owl-bot-staging/OsLogin/v1/src/V1/resources/os_login_service_descriptor_config.php create mode 100644 owl-bot-staging/OsLogin/v1/src/V1/resources/os_login_service_rest_client_config.php create mode 100644 owl-bot-staging/OsLogin/v1/tests/Unit/V1/Client/OsLoginServiceClientTest.php diff --git a/owl-bot-staging/ManagedIdentities/v1/proto/src/GPBMetadata/Google/Cloud/Managedidentities/V1/ManagedIdentitiesService.php b/owl-bot-staging/ManagedIdentities/v1/proto/src/GPBMetadata/Google/Cloud/Managedidentities/V1/ManagedIdentitiesService.php new file mode 100644 index 000000000000..b488af3c4a76 --- /dev/null +++ b/owl-bot-staging/ManagedIdentities/v1/proto/src/GPBMetadata/Google/Cloud/Managedidentities/V1/ManagedIdentitiesService.php @@ -0,0 +1,117 @@ +internalAddGeneratedFile( + ' +ß$ +Bgoogle/cloud/managedidentities/v1/managed_identities_service.proto!google.cloud.managedidentities.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto0google/cloud/managedidentities/v1/resource.proto#google/longrunning/operations.proto google/protobuf/field_mask.protogoogle/protobuf/timestamp.proto"Ü + +OpMetadata4 + create_time ( 2.google.protobuf.TimestampBàA1 +end_time ( 2.google.protobuf.TimestampBàA +target ( BàA +verb ( BàA# +requested_cancellation (BàA + api_version ( BàA"» +CreateMicrosoftAdDomainRequest? +parent ( B/àAúA)\'managedidentities.googleapis.com/Domain + domain_name ( BàA> +domain ( 2).google.cloud.managedidentities.v1.DomainBàA"Z +ResetAdminPasswordRequest= +name ( B/àAúA) +\'managedidentities.googleapis.com/Domain". +ResetAdminPasswordResponse +password ( "² +ListDomainsRequest? +parent ( B/àAúA)\'managedidentities.googleapis.com/Domain + page_size (BàA + +page_token ( BàA +filter ( BàA +order_by ( BàA" +ListDomainsResponse: +domains ( 2).google.cloud.managedidentities.v1.Domain +next_page_token (  + unreachable ( "Q +GetDomainRequest= +name ( B/àAúA) +\'managedidentities.googleapis.com/Domain"‹ +UpdateDomainRequest4 + update_mask ( 2.google.protobuf.FieldMaskBàA> +domain ( 2).google.cloud.managedidentities.v1.DomainBàA"T +DeleteDomainRequest= +name ( B/àAúA) +\'managedidentities.googleapis.com/Domain"‘ +AttachTrustRequest= +name ( B/àAúA) +\'managedidentities.googleapis.com/Domain< +trust ( 2(.google.cloud.managedidentities.v1.TrustBàA"Ÿ +ReconfigureTrustRequest= +name ( B/àAúA) +\'managedidentities.googleapis.com/Domain +target_domain_name ( BàA$ +target_dns_ip_addresses ( BàA"‘ +DetachTrustRequest= +name ( B/àAúA) +\'managedidentities.googleapis.com/Domain< +trust ( 2(.google.cloud.managedidentities.v1.TrustBàA"“ +ValidateTrustRequest= +name ( B/àAúA) +\'managedidentities.googleapis.com/Domain< +trust ( 2(.google.cloud.managedidentities.v1.TrustBàA2ò +ManagedIdentitiesServiceð +CreateMicrosoftAdDomainA.google.cloud.managedidentities.v1.CreateMicrosoftAdDomainRequest.google.longrunning.Operation"sÊA +Domain +OpMetadataÚAparent,domain_name,domain‚Óä“:"0/v1/{parent=projects/*/locations/global}/domains:domainè +ResetAdminPassword<.google.cloud.managedidentities.v1.ResetAdminPasswordRequest=.google.cloud.managedidentities.v1.ResetAdminPasswordResponse"UÚAname‚Óä“H"C/v1/{name=projects/*/locations/global/domains/*}:resetAdminPassword:*¿ + ListDomains5.google.cloud.managedidentities.v1.ListDomainsRequest6.google.cloud.managedidentities.v1.ListDomainsResponse"AÚAparent‚Óä“20/v1/{parent=projects/*/locations/global}/domains¬ + GetDomain3.google.cloud.managedidentities.v1.GetDomainRequest).google.cloud.managedidentities.v1.Domain"?ÚAname‚Óä“20/v1/{name=projects/*/locations/global/domains/*}Ú + UpdateDomain6.google.cloud.managedidentities.v1.UpdateDomainRequest.google.longrunning.Operation"sÊA +Domain +OpMetadataÚAdomain,update_mask‚Óä“A27/v1/{domain.name=projects/*/locations/global/domains/*}:domainÌ + DeleteDomain6.google.cloud.managedidentities.v1.DeleteDomainRequest.google.longrunning.Operation"eÊA# +google.protobuf.Empty +OpMetadataÚAname‚Óä“2*0/v1/{name=projects/*/locations/global/domains/*}Ð + AttachTrust5.google.cloud.managedidentities.v1.AttachTrustRequest.google.longrunning.Operation"kÊA +Domain +OpMetadataÚA +name,trust‚Óä“A"/v1/{name=projects/*/locations/global/domains/*}:validateTrust:*TÊA managedidentities.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformB“ +%com.google.cloud.managedidentities.v1BManagedIdentitiesServiceProtoPZScloud.google.com/go/managedidentities/apiv1/managedidentitiespb;managedidentitiespb¢GCMIª!Google.Cloud.ManagedIdentities.V1Ê!Google\\Cloud\\ManagedIdentities\\V1ê$Google::Cloud::ManagedIdentities::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/ManagedIdentities/v1/proto/src/GPBMetadata/Google/Cloud/Managedidentities/V1/Resource.php b/owl-bot-staging/ManagedIdentities/v1/proto/src/GPBMetadata/Google/Cloud/Managedidentities/V1/Resource.php new file mode 100644 index 0000000000000000000000000000000000000000..f7ef4e6c6bea9123381ee15731484e5f6d291557 GIT binary patch literal 2818 zcmb7G?{3>v6emfOt~YC!88Na>Vs~AqWfF5}0WodLLoV!X-r&-_j;`Z%7{l88SM$2QJdq84ld)24!2$+ z7aesz~-XILWcsdSz7pIIc_}lbT#}C0a3H)Cnt{prfK}tdSs_bMMy3CJ4%oVz! zOB>Iy#N@J@aRhnT!I@`0o*GEY$P5`xLK2KRG<6d{W>L}uQB6CdEKex^(s(vA%i;V9 zZb%knr~qCKI&O_oI@J9gub3aWIX6XJ);U9`m8w_d=7#!9R7w_a4f zLzRGxX^_^7xYVd_f2qFL8&#sI`$EqMS#rj)3JOLak|{fm65hK`NZBt@@;a@T09aTn zD4(Faz$coV!nq$i2?>vAeQEB^J+u-;E>Ix~(|S46D=G>q6Ysy=Elz=N6m?1god zeJUwmpsJftm=et_0E$TW4J3sV?A^|g64JE#J@N?BUJBTCa)z=X{e1orxKRJ~9krHV?g z>6t9OvWm*5B$!etI&^|od{Nl=t$@nHGvy<6cVO$b;S8-o&uE*wrqQW=pxj2c+I>T} zO>3`KP*zYGUOKO8MSd{sb>u;bzjcg#Lx?Sbp_RVT)6G8DDl6;gUeD<7cKZkL?i}c* zWgC`mwT)Uuxr3@hOFz`jeZ94B)Rwi$Tir#Yr&kFfI~2H(sxaZ3v*vyQ_5F#uEN#A- zJ)Jl6W@^649?zSeAOncWhx3hpDyS?Hr#wUoBMD4GN1i#C>GC~7q9zVIi)HrKwzn6p zizSlCw7SE0Xb9pKju9~_oR=f}eAw`BM5l`! z5{$|@RN@?JcP-0k+rYymrG{>I%)$Iic|%7ld1rBo+5O?bcI;QZ%M?ba0^BnOHV_yr z8b8=Z-_rMM#SI6o35dLvfC>*JPRHznX|roxng><1Y+9}E(CSFE?$DNRMHtPiEi=~x z1Eto#1@r{S`u=LQRgoogle.cloud.managedidentities.v1.AttachTrustRequest + */ +class AttachTrustRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource domain name, project name and location using the form: + * `projects/{project_id}/locations/global/domains/{domain_name}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. The domain trust resource. + * + * Generated from protobuf field .google.cloud.managedidentities.v1.Trust trust = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $trust = null; + + /** + * @param string $name Required. The resource domain name, project name and location using the form: + * `projects/{project_id}/locations/global/domains/{domain_name}` + * Please see {@see ManagedIdentitiesServiceClient::domainName()} for help formatting this field. + * @param \Google\Cloud\ManagedIdentities\V1\Trust $trust Required. The domain trust resource. + * + * @return \Google\Cloud\ManagedIdentities\V1\AttachTrustRequest + * + * @experimental + */ + public static function build(string $name, \Google\Cloud\ManagedIdentities\V1\Trust $trust): self + { + return (new self()) + ->setName($name) + ->setTrust($trust); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource domain name, project name and location using the form: + * `projects/{project_id}/locations/global/domains/{domain_name}` + * @type \Google\Cloud\ManagedIdentities\V1\Trust $trust + * Required. The domain trust resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Managedidentities\V1\ManagedIdentitiesService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource domain name, project name and location using the form: + * `projects/{project_id}/locations/global/domains/{domain_name}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource domain name, project name and location using the form: + * `projects/{project_id}/locations/global/domains/{domain_name}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. The domain trust resource. + * + * Generated from protobuf field .google.cloud.managedidentities.v1.Trust trust = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\ManagedIdentities\V1\Trust|null + */ + public function getTrust() + { + return $this->trust; + } + + public function hasTrust() + { + return isset($this->trust); + } + + public function clearTrust() + { + unset($this->trust); + } + + /** + * Required. The domain trust resource. + * + * Generated from protobuf field .google.cloud.managedidentities.v1.Trust trust = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\ManagedIdentities\V1\Trust $var + * @return $this + */ + public function setTrust($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ManagedIdentities\V1\Trust::class); + $this->trust = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/CreateMicrosoftAdDomainRequest.php b/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/CreateMicrosoftAdDomainRequest.php new file mode 100644 index 000000000000..d96de3d33357 --- /dev/null +++ b/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/CreateMicrosoftAdDomainRequest.php @@ -0,0 +1,220 @@ +google.cloud.managedidentities.v1.CreateMicrosoftAdDomainRequest + */ +class CreateMicrosoftAdDomainRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource project name and location using the form: + * `projects/{project_id}/locations/global` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The fully qualified domain name. + * e.g. mydomain.myorganization.com, with the following restrictions: + * * Must contain only lowercase letters, numbers, periods and hyphens. + * * Must start with a letter. + * * Must contain between 2-64 characters. + * * Must end with a number or a letter. + * * Must not start with period. + * * First segement length (mydomain form example above) shouldn't exceed + * 15 chars. + * * The last segment cannot be fully numeric. + * * Must be unique within the customer project. + * + * Generated from protobuf field string domain_name = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $domain_name = ''; + /** + * Required. A Managed Identity domain resource. + * + * Generated from protobuf field .google.cloud.managedidentities.v1.Domain domain = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $domain = null; + + /** + * @param string $parent Required. The resource project name and location using the form: + * `projects/{project_id}/locations/global` + * Please see {@see ManagedIdentitiesServiceClient::locationName()} for help formatting this field. + * @param string $domainName Required. The fully qualified domain name. + * e.g. mydomain.myorganization.com, with the following restrictions: + * + * * Must contain only lowercase letters, numbers, periods and hyphens. + * * Must start with a letter. + * * Must contain between 2-64 characters. + * * Must end with a number or a letter. + * * Must not start with period. + * * First segement length (mydomain form example above) shouldn't exceed + * 15 chars. + * * The last segment cannot be fully numeric. + * * Must be unique within the customer project. + * @param \Google\Cloud\ManagedIdentities\V1\Domain $domain Required. A Managed Identity domain resource. + * + * @return \Google\Cloud\ManagedIdentities\V1\CreateMicrosoftAdDomainRequest + * + * @experimental + */ + public static function build(string $parent, string $domainName, \Google\Cloud\ManagedIdentities\V1\Domain $domain): self + { + return (new self()) + ->setParent($parent) + ->setDomainName($domainName) + ->setDomain($domain); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource project name and location using the form: + * `projects/{project_id}/locations/global` + * @type string $domain_name + * Required. The fully qualified domain name. + * e.g. mydomain.myorganization.com, with the following restrictions: + * * Must contain only lowercase letters, numbers, periods and hyphens. + * * Must start with a letter. + * * Must contain between 2-64 characters. + * * Must end with a number or a letter. + * * Must not start with period. + * * First segement length (mydomain form example above) shouldn't exceed + * 15 chars. + * * The last segment cannot be fully numeric. + * * Must be unique within the customer project. + * @type \Google\Cloud\ManagedIdentities\V1\Domain $domain + * Required. A Managed Identity domain resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Managedidentities\V1\ManagedIdentitiesService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource project name and location using the form: + * `projects/{project_id}/locations/global` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The resource project name and location using the form: + * `projects/{project_id}/locations/global` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The fully qualified domain name. + * e.g. mydomain.myorganization.com, with the following restrictions: + * * Must contain only lowercase letters, numbers, periods and hyphens. + * * Must start with a letter. + * * Must contain between 2-64 characters. + * * Must end with a number or a letter. + * * Must not start with period. + * * First segement length (mydomain form example above) shouldn't exceed + * 15 chars. + * * The last segment cannot be fully numeric. + * * Must be unique within the customer project. + * + * Generated from protobuf field string domain_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDomainName() + { + return $this->domain_name; + } + + /** + * Required. The fully qualified domain name. + * e.g. mydomain.myorganization.com, with the following restrictions: + * * Must contain only lowercase letters, numbers, periods and hyphens. + * * Must start with a letter. + * * Must contain between 2-64 characters. + * * Must end with a number or a letter. + * * Must not start with period. + * * First segement length (mydomain form example above) shouldn't exceed + * 15 chars. + * * The last segment cannot be fully numeric. + * * Must be unique within the customer project. + * + * Generated from protobuf field string domain_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDomainName($var) + { + GPBUtil::checkString($var, True); + $this->domain_name = $var; + + return $this; + } + + /** + * Required. A Managed Identity domain resource. + * + * Generated from protobuf field .google.cloud.managedidentities.v1.Domain domain = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\ManagedIdentities\V1\Domain|null + */ + public function getDomain() + { + return $this->domain; + } + + public function hasDomain() + { + return isset($this->domain); + } + + public function clearDomain() + { + unset($this->domain); + } + + /** + * Required. A Managed Identity domain resource. + * + * Generated from protobuf field .google.cloud.managedidentities.v1.Domain domain = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\ManagedIdentities\V1\Domain $var + * @return $this + */ + public function setDomain($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ManagedIdentities\V1\Domain::class); + $this->domain = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/DeleteDomainRequest.php b/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/DeleteDomainRequest.php new file mode 100644 index 000000000000..e32ca99efc77 --- /dev/null +++ b/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/DeleteDomainRequest.php @@ -0,0 +1,87 @@ +google.cloud.managedidentities.v1.DeleteDomainRequest + */ +class DeleteDomainRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The domain resource name using the form: + * `projects/{project_id}/locations/global/domains/{domain_name}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The domain resource name using the form: + * `projects/{project_id}/locations/global/domains/{domain_name}` + * Please see {@see ManagedIdentitiesServiceClient::domainName()} for help formatting this field. + * + * @return \Google\Cloud\ManagedIdentities\V1\DeleteDomainRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The domain resource name using the form: + * `projects/{project_id}/locations/global/domains/{domain_name}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Managedidentities\V1\ManagedIdentitiesService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The domain resource name using the form: + * `projects/{project_id}/locations/global/domains/{domain_name}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The domain resource name using the form: + * `projects/{project_id}/locations/global/domains/{domain_name}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/DetachTrustRequest.php b/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/DetachTrustRequest.php new file mode 100644 index 000000000000..6f4da640e84c --- /dev/null +++ b/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/DetachTrustRequest.php @@ -0,0 +1,133 @@ +google.cloud.managedidentities.v1.DetachTrustRequest + */ +class DetachTrustRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource domain name, project name, and location using the form: + * `projects/{project_id}/locations/global/domains/{domain_name}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. The domain trust resource to removed. + * + * Generated from protobuf field .google.cloud.managedidentities.v1.Trust trust = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $trust = null; + + /** + * @param string $name Required. The resource domain name, project name, and location using the form: + * `projects/{project_id}/locations/global/domains/{domain_name}` + * Please see {@see ManagedIdentitiesServiceClient::domainName()} for help formatting this field. + * @param \Google\Cloud\ManagedIdentities\V1\Trust $trust Required. The domain trust resource to removed. + * + * @return \Google\Cloud\ManagedIdentities\V1\DetachTrustRequest + * + * @experimental + */ + public static function build(string $name, \Google\Cloud\ManagedIdentities\V1\Trust $trust): self + { + return (new self()) + ->setName($name) + ->setTrust($trust); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource domain name, project name, and location using the form: + * `projects/{project_id}/locations/global/domains/{domain_name}` + * @type \Google\Cloud\ManagedIdentities\V1\Trust $trust + * Required. The domain trust resource to removed. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Managedidentities\V1\ManagedIdentitiesService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource domain name, project name, and location using the form: + * `projects/{project_id}/locations/global/domains/{domain_name}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource domain name, project name, and location using the form: + * `projects/{project_id}/locations/global/domains/{domain_name}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. The domain trust resource to removed. + * + * Generated from protobuf field .google.cloud.managedidentities.v1.Trust trust = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\ManagedIdentities\V1\Trust|null + */ + public function getTrust() + { + return $this->trust; + } + + public function hasTrust() + { + return isset($this->trust); + } + + public function clearTrust() + { + unset($this->trust); + } + + /** + * Required. The domain trust resource to removed. + * + * Generated from protobuf field .google.cloud.managedidentities.v1.Trust trust = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\ManagedIdentities\V1\Trust $var + * @return $this + */ + public function setTrust($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ManagedIdentities\V1\Trust::class); + $this->trust = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/Domain.php b/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/Domain.php new file mode 100644 index 000000000000..fcc587589a00 --- /dev/null +++ b/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/Domain.php @@ -0,0 +1,525 @@ +google.cloud.managedidentities.v1.Domain + */ +class Domain extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The unique name of the domain using the form: + * `projects/{project_id}/locations/global/domains/{domain_name}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * Optional. Resource labels that can contain user-provided metadata. + * + * Generated from protobuf field map labels = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Optional. The full names of the Google Compute Engine + * [networks](/compute/docs/networks-and-firewalls#networks) the domain + * instance is connected to. Networks can be added using UpdateDomain. + * The domain is only available on networks listed in `authorized_networks`. + * If CIDR subnets overlap between networks, domain creation will fail. + * + * Generated from protobuf field repeated string authorized_networks = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $authorized_networks; + /** + * Required. The CIDR range of internal addresses that are reserved for this + * domain. Reserved networks must be /24 or larger. Ranges must be + * unique and non-overlapping with existing subnets in + * [Domain].[authorized_networks]. + * + * Generated from protobuf field string reserved_ip_range = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $reserved_ip_range = ''; + /** + * Required. Locations where domain needs to be provisioned. + * [regions][compute/docs/regions-zones/] + * e.g. us-west1 or us-east4 + * Service supports up to 4 locations at once. Each location will use a /26 + * block. + * + * Generated from protobuf field repeated string locations = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + private $locations; + /** + * Optional. The name of delegated administrator account used to perform + * Active Directory operations. If not specified, `setupadmin` will be used. + * + * Generated from protobuf field string admin = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $admin = ''; + /** + * Output only. The fully-qualified domain name of the exposed domain used by + * clients to connect to the service. Similar to what would be chosen for an + * Active Directory set up on an internal network. + * + * Generated from protobuf field string fqdn = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $fqdn = ''; + /** + * Output only. The time the instance was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The last update time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Output only. The current state of this domain. + * + * Generated from protobuf field .google.cloud.managedidentities.v1.Domain.State state = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. Additional information about the current status of this + * domain, if available. + * + * Generated from protobuf field string status_message = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $status_message = ''; + /** + * Output only. The current trusts associated with the domain. + * + * Generated from protobuf field repeated .google.cloud.managedidentities.v1.Trust trusts = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $trusts; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The unique name of the domain using the form: + * `projects/{project_id}/locations/global/domains/{domain_name}`. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. Resource labels that can contain user-provided metadata. + * @type array|\Google\Protobuf\Internal\RepeatedField $authorized_networks + * Optional. The full names of the Google Compute Engine + * [networks](/compute/docs/networks-and-firewalls#networks) the domain + * instance is connected to. Networks can be added using UpdateDomain. + * The domain is only available on networks listed in `authorized_networks`. + * If CIDR subnets overlap between networks, domain creation will fail. + * @type string $reserved_ip_range + * Required. The CIDR range of internal addresses that are reserved for this + * domain. Reserved networks must be /24 or larger. Ranges must be + * unique and non-overlapping with existing subnets in + * [Domain].[authorized_networks]. + * @type array|\Google\Protobuf\Internal\RepeatedField $locations + * Required. Locations where domain needs to be provisioned. + * [regions][compute/docs/regions-zones/] + * e.g. us-west1 or us-east4 + * Service supports up to 4 locations at once. Each location will use a /26 + * block. + * @type string $admin + * Optional. The name of delegated administrator account used to perform + * Active Directory operations. If not specified, `setupadmin` will be used. + * @type string $fqdn + * Output only. The fully-qualified domain name of the exposed domain used by + * clients to connect to the service. Similar to what would be chosen for an + * Active Directory set up on an internal network. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time the instance was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The last update time. + * @type int $state + * Output only. The current state of this domain. + * @type string $status_message + * Output only. Additional information about the current status of this + * domain, if available. + * @type array<\Google\Cloud\ManagedIdentities\V1\Trust>|\Google\Protobuf\Internal\RepeatedField $trusts + * Output only. The current trusts associated with the domain. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Managedidentities\V1\Resource::initOnce(); + parent::__construct($data); + } + + /** + * Required. The unique name of the domain using the form: + * `projects/{project_id}/locations/global/domains/{domain_name}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The unique name of the domain using the form: + * `projects/{project_id}/locations/global/domains/{domain_name}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. Resource labels that can contain user-provided metadata. + * + * Generated from protobuf field map labels = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. Resource labels that can contain user-provided metadata. + * + * Generated from protobuf field map labels = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Optional. The full names of the Google Compute Engine + * [networks](/compute/docs/networks-and-firewalls#networks) the domain + * instance is connected to. Networks can be added using UpdateDomain. + * The domain is only available on networks listed in `authorized_networks`. + * If CIDR subnets overlap between networks, domain creation will fail. + * + * Generated from protobuf field repeated string authorized_networks = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAuthorizedNetworks() + { + return $this->authorized_networks; + } + + /** + * Optional. The full names of the Google Compute Engine + * [networks](/compute/docs/networks-and-firewalls#networks) the domain + * instance is connected to. Networks can be added using UpdateDomain. + * The domain is only available on networks listed in `authorized_networks`. + * If CIDR subnets overlap between networks, domain creation will fail. + * + * Generated from protobuf field repeated string authorized_networks = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAuthorizedNetworks($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->authorized_networks = $arr; + + return $this; + } + + /** + * Required. The CIDR range of internal addresses that are reserved for this + * domain. Reserved networks must be /24 or larger. Ranges must be + * unique and non-overlapping with existing subnets in + * [Domain].[authorized_networks]. + * + * Generated from protobuf field string reserved_ip_range = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getReservedIpRange() + { + return $this->reserved_ip_range; + } + + /** + * Required. The CIDR range of internal addresses that are reserved for this + * domain. Reserved networks must be /24 or larger. Ranges must be + * unique and non-overlapping with existing subnets in + * [Domain].[authorized_networks]. + * + * Generated from protobuf field string reserved_ip_range = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setReservedIpRange($var) + { + GPBUtil::checkString($var, True); + $this->reserved_ip_range = $var; + + return $this; + } + + /** + * Required. Locations where domain needs to be provisioned. + * [regions][compute/docs/regions-zones/] + * e.g. us-west1 or us-east4 + * Service supports up to 4 locations at once. Each location will use a /26 + * block. + * + * Generated from protobuf field repeated string locations = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getLocations() + { + return $this->locations; + } + + /** + * Required. Locations where domain needs to be provisioned. + * [regions][compute/docs/regions-zones/] + * e.g. us-west1 or us-east4 + * Service supports up to 4 locations at once. Each location will use a /26 + * block. + * + * Generated from protobuf field repeated string locations = 5 [(.google.api.field_behavior) = REQUIRED]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setLocations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->locations = $arr; + + return $this; + } + + /** + * Optional. The name of delegated administrator account used to perform + * Active Directory operations. If not specified, `setupadmin` will be used. + * + * Generated from protobuf field string admin = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getAdmin() + { + return $this->admin; + } + + /** + * Optional. The name of delegated administrator account used to perform + * Active Directory operations. If not specified, `setupadmin` will be used. + * + * Generated from protobuf field string admin = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setAdmin($var) + { + GPBUtil::checkString($var, True); + $this->admin = $var; + + return $this; + } + + /** + * Output only. The fully-qualified domain name of the exposed domain used by + * clients to connect to the service. Similar to what would be chosen for an + * Active Directory set up on an internal network. + * + * Generated from protobuf field string fqdn = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getFqdn() + { + return $this->fqdn; + } + + /** + * Output only. The fully-qualified domain name of the exposed domain used by + * clients to connect to the service. Similar to what would be chosen for an + * Active Directory set up on an internal network. + * + * Generated from protobuf field string fqdn = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setFqdn($var) + { + GPBUtil::checkString($var, True); + $this->fqdn = $var; + + return $this; + } + + /** + * Output only. The time the instance was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The time the instance was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The last update time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The last update time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Output only. The current state of this domain. + * + * Generated from protobuf field .google.cloud.managedidentities.v1.Domain.State state = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The current state of this domain. + * + * Generated from protobuf field .google.cloud.managedidentities.v1.Domain.State state = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\ManagedIdentities\V1\Domain\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. Additional information about the current status of this + * domain, if available. + * + * Generated from protobuf field string status_message = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getStatusMessage() + { + return $this->status_message; + } + + /** + * Output only. Additional information about the current status of this + * domain, if available. + * + * Generated from protobuf field string status_message = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setStatusMessage($var) + { + GPBUtil::checkString($var, True); + $this->status_message = $var; + + return $this; + } + + /** + * Output only. The current trusts associated with the domain. + * + * Generated from protobuf field repeated .google.cloud.managedidentities.v1.Trust trusts = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTrusts() + { + return $this->trusts; + } + + /** + * Output only. The current trusts associated with the domain. + * + * Generated from protobuf field repeated .google.cloud.managedidentities.v1.Trust trusts = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\ManagedIdentities\V1\Trust>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTrusts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ManagedIdentities\V1\Trust::class); + $this->trusts = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/Domain/State.php b/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/Domain/State.php new file mode 100644 index 000000000000..1c43dad77b98 --- /dev/null +++ b/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/Domain/State.php @@ -0,0 +1,100 @@ +google.cloud.managedidentities.v1.Domain.State + */ +class State +{ + /** + * Not set. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The domain is being created. + * + * Generated from protobuf enum CREATING = 1; + */ + const CREATING = 1; + /** + * The domain has been created and is fully usable. + * + * Generated from protobuf enum READY = 2; + */ + const READY = 2; + /** + * The domain's configuration is being updated. + * + * Generated from protobuf enum UPDATING = 3; + */ + const UPDATING = 3; + /** + * The domain is being deleted. + * + * Generated from protobuf enum DELETING = 4; + */ + const DELETING = 4; + /** + * The domain is being repaired and may be unusable. Details + * can be found in the `status_message` field. + * + * Generated from protobuf enum REPAIRING = 5; + */ + const REPAIRING = 5; + /** + * The domain is undergoing maintenance. + * + * Generated from protobuf enum PERFORMING_MAINTENANCE = 6; + */ + const PERFORMING_MAINTENANCE = 6; + /** + * The domain is not serving requests. + * + * Generated from protobuf enum UNAVAILABLE = 7; + */ + const UNAVAILABLE = 7; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::CREATING => 'CREATING', + self::READY => 'READY', + self::UPDATING => 'UPDATING', + self::DELETING => 'DELETING', + self::REPAIRING => 'REPAIRING', + self::PERFORMING_MAINTENANCE => 'PERFORMING_MAINTENANCE', + self::UNAVAILABLE => 'UNAVAILABLE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\ManagedIdentities\V1\Domain_State::class); + diff --git a/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/GetDomainRequest.php b/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/GetDomainRequest.php new file mode 100644 index 000000000000..8900370c46d4 --- /dev/null +++ b/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/GetDomainRequest.php @@ -0,0 +1,86 @@ +google.cloud.managedidentities.v1.GetDomainRequest + */ +class GetDomainRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The domain resource name using the form: + * `projects/{project_id}/locations/global/domains/{domain_name}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The domain resource name using the form: + * `projects/{project_id}/locations/global/domains/{domain_name}` + * Please see {@see ManagedIdentitiesServiceClient::domainName()} for help formatting this field. + * + * @return \Google\Cloud\ManagedIdentities\V1\GetDomainRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The domain resource name using the form: + * `projects/{project_id}/locations/global/domains/{domain_name}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Managedidentities\V1\ManagedIdentitiesService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The domain resource name using the form: + * `projects/{project_id}/locations/global/domains/{domain_name}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The domain resource name using the form: + * `projects/{project_id}/locations/global/domains/{domain_name}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/ListDomainsRequest.php b/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/ListDomainsRequest.php new file mode 100644 index 000000000000..0d7b7bdcb159 --- /dev/null +++ b/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/ListDomainsRequest.php @@ -0,0 +1,263 @@ +google.cloud.managedidentities.v1.ListDomainsRequest + */ +class ListDomainsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the domain location using the form: + * `projects/{project_id}/locations/global` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of items to return. + * If not specified, a default value of 1000 will be used. + * Regardless of the page_size value, the response may include a partial list. + * Callers should rely on a response's + * [next_page_token][google.cloud.managedidentities.v1.ListDomainsResponse.next_page_token] + * to determine if there are additional results to list. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. The `next_page_token` value returned from a previous ListDomainsRequest + * request, if any. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. A filter specifying constraints of a list operation. + * For example, `Domain.fqdn="mydomain.myorginization"`. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. Specifies the ordering of results. See + * [Sorting + * order](https://cloud.google.com/apis/design/design_patterns#sorting_order) + * for more information. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The resource name of the domain location using the form: + * `projects/{project_id}/locations/global` + * Please see {@see ManagedIdentitiesServiceClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\ManagedIdentities\V1\ListDomainsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name of the domain location using the form: + * `projects/{project_id}/locations/global` + * @type int $page_size + * Optional. The maximum number of items to return. + * If not specified, a default value of 1000 will be used. + * Regardless of the page_size value, the response may include a partial list. + * Callers should rely on a response's + * [next_page_token][google.cloud.managedidentities.v1.ListDomainsResponse.next_page_token] + * to determine if there are additional results to list. + * @type string $page_token + * Optional. The `next_page_token` value returned from a previous ListDomainsRequest + * request, if any. + * @type string $filter + * Optional. A filter specifying constraints of a list operation. + * For example, `Domain.fqdn="mydomain.myorginization"`. + * @type string $order_by + * Optional. Specifies the ordering of results. See + * [Sorting + * order](https://cloud.google.com/apis/design/design_patterns#sorting_order) + * for more information. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Managedidentities\V1\ManagedIdentitiesService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the domain location using the form: + * `projects/{project_id}/locations/global` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The resource name of the domain location using the form: + * `projects/{project_id}/locations/global` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The maximum number of items to return. + * If not specified, a default value of 1000 will be used. + * Regardless of the page_size value, the response may include a partial list. + * Callers should rely on a response's + * [next_page_token][google.cloud.managedidentities.v1.ListDomainsResponse.next_page_token] + * to determine if there are additional results to list. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of items to return. + * If not specified, a default value of 1000 will be used. + * Regardless of the page_size value, the response may include a partial list. + * Callers should rely on a response's + * [next_page_token][google.cloud.managedidentities.v1.ListDomainsResponse.next_page_token] + * to determine if there are additional results to list. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. The `next_page_token` value returned from a previous ListDomainsRequest + * request, if any. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. The `next_page_token` value returned from a previous ListDomainsRequest + * request, if any. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. A filter specifying constraints of a list operation. + * For example, `Domain.fqdn="mydomain.myorginization"`. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. A filter specifying constraints of a list operation. + * For example, `Domain.fqdn="mydomain.myorginization"`. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Optional. Specifies the ordering of results. See + * [Sorting + * order](https://cloud.google.com/apis/design/design_patterns#sorting_order) + * for more information. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. Specifies the ordering of results. See + * [Sorting + * order](https://cloud.google.com/apis/design/design_patterns#sorting_order) + * for more information. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/ListDomainsResponse.php b/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/ListDomainsResponse.php new file mode 100644 index 000000000000..4d274be3bf26 --- /dev/null +++ b/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/ListDomainsResponse.php @@ -0,0 +1,140 @@ +google.cloud.managedidentities.v1.ListDomainsResponse + */ +class ListDomainsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of Managed Identities Service domains in the project. + * + * Generated from protobuf field repeated .google.cloud.managedidentities.v1.Domain domains = 1; + */ + private $domains; + /** + * A token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * A list of locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\ManagedIdentities\V1\Domain>|\Google\Protobuf\Internal\RepeatedField $domains + * A list of Managed Identities Service domains in the project. + * @type string $next_page_token + * A token to retrieve the next page of results, or empty if there are no more + * results in the list. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * A list of locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Managedidentities\V1\ManagedIdentitiesService::initOnce(); + parent::__construct($data); + } + + /** + * A list of Managed Identities Service domains in the project. + * + * Generated from protobuf field repeated .google.cloud.managedidentities.v1.Domain domains = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDomains() + { + return $this->domains; + } + + /** + * A list of Managed Identities Service domains in the project. + * + * Generated from protobuf field repeated .google.cloud.managedidentities.v1.Domain domains = 1; + * @param array<\Google\Cloud\ManagedIdentities\V1\Domain>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDomains($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ManagedIdentities\V1\Domain::class); + $this->domains = $arr; + + return $this; + } + + /** + * A token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * A list of locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * A list of locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/OpMetadata.php b/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/OpMetadata.php new file mode 100644 index 000000000000..45fcb533abb3 --- /dev/null +++ b/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/OpMetadata.php @@ -0,0 +1,269 @@ +google.cloud.managedidentities.v1.OpMetadata + */ +class OpMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $end_time = null; + /** + * Output only. Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $target = ''; + /** + * Output only. Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $verb = ''; + /** + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have successfully been cancelled + * have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, + * corresponding to `Code.CANCELLED`. + * + * Generated from protobuf field bool requested_cancellation = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $requested_cancellation = false; + /** + * Output only. API version used to start the operation. + * + * Generated from protobuf field string api_version = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $api_version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time the operation was created. + * @type \Google\Protobuf\Timestamp $end_time + * Output only. The time the operation finished running. + * @type string $target + * Output only. Server-defined resource path for the target of the operation. + * @type string $verb + * Output only. Name of the verb executed by the operation. + * @type bool $requested_cancellation + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have successfully been cancelled + * have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, + * corresponding to `Code.CANCELLED`. + * @type string $api_version + * Output only. API version used to start the operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Managedidentities\V1\ManagedIdentitiesService::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEndTime() + { + return $this->end_time; + } + + public function hasEndTime() + { + return isset($this->end_time); + } + + public function clearEndTime() + { + unset($this->end_time); + } + + /** + * Output only. The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * Output only. Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getTarget() + { + return $this->target; + } + + /** + * Output only. Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setTarget($var) + { + GPBUtil::checkString($var, True); + $this->target = $var; + + return $this; + } + + /** + * Output only. Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getVerb() + { + return $this->verb; + } + + /** + * Output only. Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setVerb($var) + { + GPBUtil::checkString($var, True); + $this->verb = $var; + + return $this; + } + + /** + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have successfully been cancelled + * have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, + * corresponding to `Code.CANCELLED`. + * + * Generated from protobuf field bool requested_cancellation = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getRequestedCancellation() + { + return $this->requested_cancellation; + } + + /** + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have successfully been cancelled + * have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, + * corresponding to `Code.CANCELLED`. + * + * Generated from protobuf field bool requested_cancellation = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setRequestedCancellation($var) + { + GPBUtil::checkBool($var); + $this->requested_cancellation = $var; + + return $this; + } + + /** + * Output only. API version used to start the operation. + * + * Generated from protobuf field string api_version = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getApiVersion() + { + return $this->api_version; + } + + /** + * Output only. API version used to start the operation. + * + * Generated from protobuf field string api_version = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setApiVersion($var) + { + GPBUtil::checkString($var, True); + $this->api_version = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/ReconfigureTrustRequest.php b/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/ReconfigureTrustRequest.php new file mode 100644 index 000000000000..fe92488377fc --- /dev/null +++ b/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/ReconfigureTrustRequest.php @@ -0,0 +1,169 @@ +google.cloud.managedidentities.v1.ReconfigureTrustRequest + */ +class ReconfigureTrustRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource domain name, project name and location using the form: + * `projects/{project_id}/locations/global/domains/{domain_name}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. The fully-qualified target domain name which will be in trust with current + * domain. + * + * Generated from protobuf field string target_domain_name = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $target_domain_name = ''; + /** + * Required. The target DNS server IP addresses to resolve the remote domain involved + * in the trust. + * + * Generated from protobuf field repeated string target_dns_ip_addresses = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + private $target_dns_ip_addresses; + + /** + * @param string $name Required. The resource domain name, project name and location using the form: + * `projects/{project_id}/locations/global/domains/{domain_name}` + * Please see {@see ManagedIdentitiesServiceClient::domainName()} for help formatting this field. + * @param string $targetDomainName Required. The fully-qualified target domain name which will be in trust with current + * domain. + * @param string[] $targetDnsIpAddresses Required. The target DNS server IP addresses to resolve the remote domain involved + * in the trust. + * + * @return \Google\Cloud\ManagedIdentities\V1\ReconfigureTrustRequest + * + * @experimental + */ + public static function build(string $name, string $targetDomainName, array $targetDnsIpAddresses): self + { + return (new self()) + ->setName($name) + ->setTargetDomainName($targetDomainName) + ->setTargetDnsIpAddresses($targetDnsIpAddresses); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource domain name, project name and location using the form: + * `projects/{project_id}/locations/global/domains/{domain_name}` + * @type string $target_domain_name + * Required. The fully-qualified target domain name which will be in trust with current + * domain. + * @type array|\Google\Protobuf\Internal\RepeatedField $target_dns_ip_addresses + * Required. The target DNS server IP addresses to resolve the remote domain involved + * in the trust. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Managedidentities\V1\ManagedIdentitiesService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource domain name, project name and location using the form: + * `projects/{project_id}/locations/global/domains/{domain_name}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource domain name, project name and location using the form: + * `projects/{project_id}/locations/global/domains/{domain_name}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. The fully-qualified target domain name which will be in trust with current + * domain. + * + * Generated from protobuf field string target_domain_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getTargetDomainName() + { + return $this->target_domain_name; + } + + /** + * Required. The fully-qualified target domain name which will be in trust with current + * domain. + * + * Generated from protobuf field string target_domain_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setTargetDomainName($var) + { + GPBUtil::checkString($var, True); + $this->target_domain_name = $var; + + return $this; + } + + /** + * Required. The target DNS server IP addresses to resolve the remote domain involved + * in the trust. + * + * Generated from protobuf field repeated string target_dns_ip_addresses = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTargetDnsIpAddresses() + { + return $this->target_dns_ip_addresses; + } + + /** + * Required. The target DNS server IP addresses to resolve the remote domain involved + * in the trust. + * + * Generated from protobuf field repeated string target_dns_ip_addresses = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTargetDnsIpAddresses($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->target_dns_ip_addresses = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/ResetAdminPasswordRequest.php b/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/ResetAdminPasswordRequest.php new file mode 100644 index 000000000000..5aa41f4f8b8e --- /dev/null +++ b/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/ResetAdminPasswordRequest.php @@ -0,0 +1,87 @@ +google.cloud.managedidentities.v1.ResetAdminPasswordRequest + */ +class ResetAdminPasswordRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The domain resource name using the form: + * `projects/{project_id}/locations/global/domains/{domain_name}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The domain resource name using the form: + * `projects/{project_id}/locations/global/domains/{domain_name}` + * Please see {@see ManagedIdentitiesServiceClient::domainName()} for help formatting this field. + * + * @return \Google\Cloud\ManagedIdentities\V1\ResetAdminPasswordRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The domain resource name using the form: + * `projects/{project_id}/locations/global/domains/{domain_name}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Managedidentities\V1\ManagedIdentitiesService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The domain resource name using the form: + * `projects/{project_id}/locations/global/domains/{domain_name}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The domain resource name using the form: + * `projects/{project_id}/locations/global/domains/{domain_name}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/ResetAdminPasswordResponse.php b/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/ResetAdminPasswordResponse.php new file mode 100644 index 000000000000..0e2b6865b4ef --- /dev/null +++ b/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/ResetAdminPasswordResponse.php @@ -0,0 +1,68 @@ +google.cloud.managedidentities.v1.ResetAdminPasswordResponse + */ +class ResetAdminPasswordResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A random password. See [admin][google.cloud.managedidentities.v1.Domain.admin] for more information. + * + * Generated from protobuf field string password = 1; + */ + protected $password = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $password + * A random password. See [admin][google.cloud.managedidentities.v1.Domain.admin] for more information. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Managedidentities\V1\ManagedIdentitiesService::initOnce(); + parent::__construct($data); + } + + /** + * A random password. See [admin][google.cloud.managedidentities.v1.Domain.admin] for more information. + * + * Generated from protobuf field string password = 1; + * @return string + */ + public function getPassword() + { + return $this->password; + } + + /** + * A random password. See [admin][google.cloud.managedidentities.v1.Domain.admin] for more information. + * + * Generated from protobuf field string password = 1; + * @param string $var + * @return $this + */ + public function setPassword($var) + { + GPBUtil::checkString($var, True); + $this->password = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/Trust.php b/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/Trust.php new file mode 100644 index 000000000000..637e3b32d72b --- /dev/null +++ b/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/Trust.php @@ -0,0 +1,462 @@ +google.cloud.managedidentities.v1.Trust + */ +class Trust extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The fully qualified target domain name which will be in trust with the + * current domain. + * + * Generated from protobuf field string target_domain_name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $target_domain_name = ''; + /** + * Required. The type of trust represented by the trust resource. + * + * Generated from protobuf field .google.cloud.managedidentities.v1.Trust.TrustType trust_type = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $trust_type = 0; + /** + * Required. The trust direction, which decides if the current domain is trusted, + * trusting, or both. + * + * Generated from protobuf field .google.cloud.managedidentities.v1.Trust.TrustDirection trust_direction = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $trust_direction = 0; + /** + * Optional. The trust authentication type, which decides whether the trusted side has + * forest/domain wide access or selective access to an approved set of + * resources. + * + * Generated from protobuf field bool selective_authentication = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $selective_authentication = false; + /** + * Required. The target DNS server IP addresses which can resolve the remote domain + * involved in the trust. + * + * Generated from protobuf field repeated string target_dns_ip_addresses = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + private $target_dns_ip_addresses; + /** + * Required. The trust secret used for the handshake with the target domain. This will + * not be stored. + * + * Generated from protobuf field string trust_handshake_secret = 6 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $trust_handshake_secret = ''; + /** + * Output only. The time the instance was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The last update time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Output only. The current state of the trust. + * + * Generated from protobuf field .google.cloud.managedidentities.v1.Trust.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. Additional information about the current state of the trust, if available. + * + * Generated from protobuf field string state_description = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state_description = ''; + /** + * Output only. The last heartbeat time when the trust was known to be connected. + * + * Generated from protobuf field .google.protobuf.Timestamp last_trust_heartbeat_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $last_trust_heartbeat_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $target_domain_name + * Required. The fully qualified target domain name which will be in trust with the + * current domain. + * @type int $trust_type + * Required. The type of trust represented by the trust resource. + * @type int $trust_direction + * Required. The trust direction, which decides if the current domain is trusted, + * trusting, or both. + * @type bool $selective_authentication + * Optional. The trust authentication type, which decides whether the trusted side has + * forest/domain wide access or selective access to an approved set of + * resources. + * @type array|\Google\Protobuf\Internal\RepeatedField $target_dns_ip_addresses + * Required. The target DNS server IP addresses which can resolve the remote domain + * involved in the trust. + * @type string $trust_handshake_secret + * Required. The trust secret used for the handshake with the target domain. This will + * not be stored. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time the instance was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The last update time. + * @type int $state + * Output only. The current state of the trust. + * @type string $state_description + * Output only. Additional information about the current state of the trust, if available. + * @type \Google\Protobuf\Timestamp $last_trust_heartbeat_time + * Output only. The last heartbeat time when the trust was known to be connected. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Managedidentities\V1\Resource::initOnce(); + parent::__construct($data); + } + + /** + * Required. The fully qualified target domain name which will be in trust with the + * current domain. + * + * Generated from protobuf field string target_domain_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getTargetDomainName() + { + return $this->target_domain_name; + } + + /** + * Required. The fully qualified target domain name which will be in trust with the + * current domain. + * + * Generated from protobuf field string target_domain_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setTargetDomainName($var) + { + GPBUtil::checkString($var, True); + $this->target_domain_name = $var; + + return $this; + } + + /** + * Required. The type of trust represented by the trust resource. + * + * Generated from protobuf field .google.cloud.managedidentities.v1.Trust.TrustType trust_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getTrustType() + { + return $this->trust_type; + } + + /** + * Required. The type of trust represented by the trust resource. + * + * Generated from protobuf field .google.cloud.managedidentities.v1.Trust.TrustType trust_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setTrustType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\ManagedIdentities\V1\Trust\TrustType::class); + $this->trust_type = $var; + + return $this; + } + + /** + * Required. The trust direction, which decides if the current domain is trusted, + * trusting, or both. + * + * Generated from protobuf field .google.cloud.managedidentities.v1.Trust.TrustDirection trust_direction = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getTrustDirection() + { + return $this->trust_direction; + } + + /** + * Required. The trust direction, which decides if the current domain is trusted, + * trusting, or both. + * + * Generated from protobuf field .google.cloud.managedidentities.v1.Trust.TrustDirection trust_direction = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setTrustDirection($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\ManagedIdentities\V1\Trust\TrustDirection::class); + $this->trust_direction = $var; + + return $this; + } + + /** + * Optional. The trust authentication type, which decides whether the trusted side has + * forest/domain wide access or selective access to an approved set of + * resources. + * + * Generated from protobuf field bool selective_authentication = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getSelectiveAuthentication() + { + return $this->selective_authentication; + } + + /** + * Optional. The trust authentication type, which decides whether the trusted side has + * forest/domain wide access or selective access to an approved set of + * resources. + * + * Generated from protobuf field bool selective_authentication = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setSelectiveAuthentication($var) + { + GPBUtil::checkBool($var); + $this->selective_authentication = $var; + + return $this; + } + + /** + * Required. The target DNS server IP addresses which can resolve the remote domain + * involved in the trust. + * + * Generated from protobuf field repeated string target_dns_ip_addresses = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTargetDnsIpAddresses() + { + return $this->target_dns_ip_addresses; + } + + /** + * Required. The target DNS server IP addresses which can resolve the remote domain + * involved in the trust. + * + * Generated from protobuf field repeated string target_dns_ip_addresses = 5 [(.google.api.field_behavior) = REQUIRED]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTargetDnsIpAddresses($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->target_dns_ip_addresses = $arr; + + return $this; + } + + /** + * Required. The trust secret used for the handshake with the target domain. This will + * not be stored. + * + * Generated from protobuf field string trust_handshake_secret = 6 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getTrustHandshakeSecret() + { + return $this->trust_handshake_secret; + } + + /** + * Required. The trust secret used for the handshake with the target domain. This will + * not be stored. + * + * Generated from protobuf field string trust_handshake_secret = 6 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setTrustHandshakeSecret($var) + { + GPBUtil::checkString($var, True); + $this->trust_handshake_secret = $var; + + return $this; + } + + /** + * Output only. The time the instance was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The time the instance was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The last update time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The last update time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Output only. The current state of the trust. + * + * Generated from protobuf field .google.cloud.managedidentities.v1.Trust.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The current state of the trust. + * + * Generated from protobuf field .google.cloud.managedidentities.v1.Trust.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\ManagedIdentities\V1\Trust\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. Additional information about the current state of the trust, if available. + * + * Generated from protobuf field string state_description = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getStateDescription() + { + return $this->state_description; + } + + /** + * Output only. Additional information about the current state of the trust, if available. + * + * Generated from protobuf field string state_description = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setStateDescription($var) + { + GPBUtil::checkString($var, True); + $this->state_description = $var; + + return $this; + } + + /** + * Output only. The last heartbeat time when the trust was known to be connected. + * + * Generated from protobuf field .google.protobuf.Timestamp last_trust_heartbeat_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getLastTrustHeartbeatTime() + { + return $this->last_trust_heartbeat_time; + } + + public function hasLastTrustHeartbeatTime() + { + return isset($this->last_trust_heartbeat_time); + } + + public function clearLastTrustHeartbeatTime() + { + unset($this->last_trust_heartbeat_time); + } + + /** + * Output only. The last heartbeat time when the trust was known to be connected. + * + * Generated from protobuf field .google.protobuf.Timestamp last_trust_heartbeat_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setLastTrustHeartbeatTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->last_trust_heartbeat_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/Trust/State.php b/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/Trust/State.php new file mode 100644 index 000000000000..6c45c0cba0f6 --- /dev/null +++ b/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/Trust/State.php @@ -0,0 +1,85 @@ +google.cloud.managedidentities.v1.Trust.State + */ +class State +{ + /** + * Not set. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The domain trust is being created. + * + * Generated from protobuf enum CREATING = 1; + */ + const CREATING = 1; + /** + * The domain trust is being updated. + * + * Generated from protobuf enum UPDATING = 2; + */ + const UPDATING = 2; + /** + * The domain trust is being deleted. + * + * Generated from protobuf enum DELETING = 3; + */ + const DELETING = 3; + /** + * The domain trust is connected. + * + * Generated from protobuf enum CONNECTED = 4; + */ + const CONNECTED = 4; + /** + * The domain trust is disconnected. + * + * Generated from protobuf enum DISCONNECTED = 5; + */ + const DISCONNECTED = 5; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::CREATING => 'CREATING', + self::UPDATING => 'UPDATING', + self::DELETING => 'DELETING', + self::CONNECTED => 'CONNECTED', + self::DISCONNECTED => 'DISCONNECTED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\ManagedIdentities\V1\Trust_State::class); + diff --git a/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/Trust/TrustDirection.php b/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/Trust/TrustDirection.php new file mode 100644 index 000000000000..1eedb6a50162 --- /dev/null +++ b/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/Trust/TrustDirection.php @@ -0,0 +1,74 @@ +google.cloud.managedidentities.v1.Trust.TrustDirection + */ +class TrustDirection +{ + /** + * Not set. + * + * Generated from protobuf enum TRUST_DIRECTION_UNSPECIFIED = 0; + */ + const TRUST_DIRECTION_UNSPECIFIED = 0; + /** + * The inbound direction represents the trusting side. + * + * Generated from protobuf enum INBOUND = 1; + */ + const INBOUND = 1; + /** + * The outboud direction represents the trusted side. + * + * Generated from protobuf enum OUTBOUND = 2; + */ + const OUTBOUND = 2; + /** + * The bidirectional direction represents the trusted / trusting side. + * + * Generated from protobuf enum BIDIRECTIONAL = 3; + */ + const BIDIRECTIONAL = 3; + + private static $valueToName = [ + self::TRUST_DIRECTION_UNSPECIFIED => 'TRUST_DIRECTION_UNSPECIFIED', + self::INBOUND => 'INBOUND', + self::OUTBOUND => 'OUTBOUND', + self::BIDIRECTIONAL => 'BIDIRECTIONAL', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(TrustDirection::class, \Google\Cloud\ManagedIdentities\V1\Trust_TrustDirection::class); + diff --git a/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/Trust/TrustType.php b/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/Trust/TrustType.php new file mode 100644 index 000000000000..33b99c2807f4 --- /dev/null +++ b/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/Trust/TrustType.php @@ -0,0 +1,64 @@ +google.cloud.managedidentities.v1.Trust.TrustType + */ +class TrustType +{ + /** + * Not set. + * + * Generated from protobuf enum TRUST_TYPE_UNSPECIFIED = 0; + */ + const TRUST_TYPE_UNSPECIFIED = 0; + /** + * The forest trust. + * + * Generated from protobuf enum FOREST = 1; + */ + const FOREST = 1; + /** + * The external domain trust. + * + * Generated from protobuf enum EXTERNAL = 2; + */ + const EXTERNAL = 2; + + private static $valueToName = [ + self::TRUST_TYPE_UNSPECIFIED => 'TRUST_TYPE_UNSPECIFIED', + self::FOREST => 'FOREST', + self::EXTERNAL => 'EXTERNAL', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(TrustType::class, \Google\Cloud\ManagedIdentities\V1\Trust_TrustType::class); + diff --git a/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/UpdateDomainRequest.php b/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/UpdateDomainRequest.php new file mode 100644 index 000000000000..35eceef3d024 --- /dev/null +++ b/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/UpdateDomainRequest.php @@ -0,0 +1,167 @@ +google.cloud.managedidentities.v1.UpdateDomainRequest + */ +class UpdateDomainRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Mask of fields to update. At least one path must be supplied in this + * field. The elements of the repeated paths field may only include + * fields from [Domain][google.cloud.managedidentities.v1.Domain]: + * * `labels` + * * `locations` + * * `authorized_networks` + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + /** + * Required. Domain message with updated fields. Only supported fields specified in + * update_mask are updated. + * + * Generated from protobuf field .google.cloud.managedidentities.v1.Domain domain = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $domain = null; + + /** + * @param \Google\Cloud\ManagedIdentities\V1\Domain $domain Required. Domain message with updated fields. Only supported fields specified in + * update_mask are updated. + * @param \Google\Protobuf\FieldMask $updateMask Required. Mask of fields to update. At least one path must be supplied in this + * field. The elements of the repeated paths field may only include + * fields from [Domain][google.cloud.managedidentities.v1.Domain]: + * * `labels` + * * `locations` + * * `authorized_networks` + * + * @return \Google\Cloud\ManagedIdentities\V1\UpdateDomainRequest + * + * @experimental + */ + public static function build(\Google\Cloud\ManagedIdentities\V1\Domain $domain, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setDomain($domain) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Required. Mask of fields to update. At least one path must be supplied in this + * field. The elements of the repeated paths field may only include + * fields from [Domain][google.cloud.managedidentities.v1.Domain]: + * * `labels` + * * `locations` + * * `authorized_networks` + * @type \Google\Cloud\ManagedIdentities\V1\Domain $domain + * Required. Domain message with updated fields. Only supported fields specified in + * update_mask are updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Managedidentities\V1\ManagedIdentitiesService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Mask of fields to update. At least one path must be supplied in this + * field. The elements of the repeated paths field may only include + * fields from [Domain][google.cloud.managedidentities.v1.Domain]: + * * `labels` + * * `locations` + * * `authorized_networks` + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. Mask of fields to update. At least one path must be supplied in this + * field. The elements of the repeated paths field may only include + * fields from [Domain][google.cloud.managedidentities.v1.Domain]: + * * `labels` + * * `locations` + * * `authorized_networks` + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Required. Domain message with updated fields. Only supported fields specified in + * update_mask are updated. + * + * Generated from protobuf field .google.cloud.managedidentities.v1.Domain domain = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\ManagedIdentities\V1\Domain|null + */ + public function getDomain() + { + return $this->domain; + } + + public function hasDomain() + { + return isset($this->domain); + } + + public function clearDomain() + { + unset($this->domain); + } + + /** + * Required. Domain message with updated fields. Only supported fields specified in + * update_mask are updated. + * + * Generated from protobuf field .google.cloud.managedidentities.v1.Domain domain = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\ManagedIdentities\V1\Domain $var + * @return $this + */ + public function setDomain($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ManagedIdentities\V1\Domain::class); + $this->domain = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/ValidateTrustRequest.php b/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/ValidateTrustRequest.php new file mode 100644 index 000000000000..da322c4a9393 --- /dev/null +++ b/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/ValidateTrustRequest.php @@ -0,0 +1,133 @@ +google.cloud.managedidentities.v1.ValidateTrustRequest + */ +class ValidateTrustRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource domain name, project name, and location using the form: + * `projects/{project_id}/locations/global/domains/{domain_name}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. The domain trust to validate trust state for. + * + * Generated from protobuf field .google.cloud.managedidentities.v1.Trust trust = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $trust = null; + + /** + * @param string $name Required. The resource domain name, project name, and location using the form: + * `projects/{project_id}/locations/global/domains/{domain_name}` + * Please see {@see ManagedIdentitiesServiceClient::domainName()} for help formatting this field. + * @param \Google\Cloud\ManagedIdentities\V1\Trust $trust Required. The domain trust to validate trust state for. + * + * @return \Google\Cloud\ManagedIdentities\V1\ValidateTrustRequest + * + * @experimental + */ + public static function build(string $name, \Google\Cloud\ManagedIdentities\V1\Trust $trust): self + { + return (new self()) + ->setName($name) + ->setTrust($trust); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource domain name, project name, and location using the form: + * `projects/{project_id}/locations/global/domains/{domain_name}` + * @type \Google\Cloud\ManagedIdentities\V1\Trust $trust + * Required. The domain trust to validate trust state for. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Managedidentities\V1\ManagedIdentitiesService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource domain name, project name, and location using the form: + * `projects/{project_id}/locations/global/domains/{domain_name}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource domain name, project name, and location using the form: + * `projects/{project_id}/locations/global/domains/{domain_name}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. The domain trust to validate trust state for. + * + * Generated from protobuf field .google.cloud.managedidentities.v1.Trust trust = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\ManagedIdentities\V1\Trust|null + */ + public function getTrust() + { + return $this->trust; + } + + public function hasTrust() + { + return isset($this->trust); + } + + public function clearTrust() + { + unset($this->trust); + } + + /** + * Required. The domain trust to validate trust state for. + * + * Generated from protobuf field .google.cloud.managedidentities.v1.Trust trust = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\ManagedIdentities\V1\Trust $var + * @return $this + */ + public function setTrust($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ManagedIdentities\V1\Trust::class); + $this->trust = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ManagedIdentities/v1/samples/V1/ManagedIdentitiesServiceClient/attach_trust.php b/owl-bot-staging/ManagedIdentities/v1/samples/V1/ManagedIdentitiesServiceClient/attach_trust.php new file mode 100644 index 000000000000..6478dfaf4a80 --- /dev/null +++ b/owl-bot-staging/ManagedIdentities/v1/samples/V1/ManagedIdentitiesServiceClient/attach_trust.php @@ -0,0 +1,122 @@ +setTargetDomainName($trustTargetDomainName) + ->setTrustType($trustTrustType) + ->setTrustDirection($trustTrustDirection) + ->setTargetDnsIpAddresses($trustTargetDnsIpAddresses) + ->setTrustHandshakeSecret($trustTrustHandshakeSecret); + $request = (new AttachTrustRequest()) + ->setName($formattedName) + ->setTrust($trust); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $managedIdentitiesServiceClient->attachTrust($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Domain $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ManagedIdentitiesServiceClient::domainName('[PROJECT]', '[LOCATION]', '[DOMAIN]'); + $trustTargetDomainName = '[TARGET_DOMAIN_NAME]'; + $trustTrustType = TrustType::TRUST_TYPE_UNSPECIFIED; + $trustTrustDirection = TrustDirection::TRUST_DIRECTION_UNSPECIFIED; + $trustTargetDnsIpAddressesElement = '[TARGET_DNS_IP_ADDRESSES]'; + $trustTrustHandshakeSecret = '[TRUST_HANDSHAKE_SECRET]'; + + attach_trust_sample( + $formattedName, + $trustTargetDomainName, + $trustTrustType, + $trustTrustDirection, + $trustTargetDnsIpAddressesElement, + $trustTrustHandshakeSecret + ); +} +// [END managedidentities_v1_generated_ManagedIdentitiesService_AttachTrust_sync] diff --git a/owl-bot-staging/ManagedIdentities/v1/samples/V1/ManagedIdentitiesServiceClient/create_microsoft_ad_domain.php b/owl-bot-staging/ManagedIdentities/v1/samples/V1/ManagedIdentitiesServiceClient/create_microsoft_ad_domain.php new file mode 100644 index 000000000000..4e74f2a1db34 --- /dev/null +++ b/owl-bot-staging/ManagedIdentities/v1/samples/V1/ManagedIdentitiesServiceClient/create_microsoft_ad_domain.php @@ -0,0 +1,129 @@ +setName($domainName) + ->setReservedIpRange($domainReservedIpRange) + ->setLocations($domainLocations); + $request = (new CreateMicrosoftAdDomainRequest()) + ->setParent($formattedParent) + ->setDomainName($domainName) + ->setDomain($domain); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $managedIdentitiesServiceClient->createMicrosoftAdDomain($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Domain $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = ManagedIdentitiesServiceClient::locationName('[PROJECT]', '[LOCATION]'); + $domainName = '[DOMAIN_NAME]'; + $domainName = '[NAME]'; + $domainReservedIpRange = '[RESERVED_IP_RANGE]'; + $domainLocationsElement = '[LOCATIONS]'; + + create_microsoft_ad_domain_sample( + $formattedParent, + $domainName, + $domainName, + $domainReservedIpRange, + $domainLocationsElement + ); +} +// [END managedidentities_v1_generated_ManagedIdentitiesService_CreateMicrosoftAdDomain_sync] diff --git a/owl-bot-staging/ManagedIdentities/v1/samples/V1/ManagedIdentitiesServiceClient/delete_domain.php b/owl-bot-staging/ManagedIdentities/v1/samples/V1/ManagedIdentitiesServiceClient/delete_domain.php new file mode 100644 index 000000000000..20c8a8a12a1b --- /dev/null +++ b/owl-bot-staging/ManagedIdentities/v1/samples/V1/ManagedIdentitiesServiceClient/delete_domain.php @@ -0,0 +1,81 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $managedIdentitiesServiceClient->deleteDomain($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ManagedIdentitiesServiceClient::domainName('[PROJECT]', '[LOCATION]', '[DOMAIN]'); + + delete_domain_sample($formattedName); +} +// [END managedidentities_v1_generated_ManagedIdentitiesService_DeleteDomain_sync] diff --git a/owl-bot-staging/ManagedIdentities/v1/samples/V1/ManagedIdentitiesServiceClient/detach_trust.php b/owl-bot-staging/ManagedIdentities/v1/samples/V1/ManagedIdentitiesServiceClient/detach_trust.php new file mode 100644 index 000000000000..e287c2ee6b28 --- /dev/null +++ b/owl-bot-staging/ManagedIdentities/v1/samples/V1/ManagedIdentitiesServiceClient/detach_trust.php @@ -0,0 +1,122 @@ +setTargetDomainName($trustTargetDomainName) + ->setTrustType($trustTrustType) + ->setTrustDirection($trustTrustDirection) + ->setTargetDnsIpAddresses($trustTargetDnsIpAddresses) + ->setTrustHandshakeSecret($trustTrustHandshakeSecret); + $request = (new DetachTrustRequest()) + ->setName($formattedName) + ->setTrust($trust); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $managedIdentitiesServiceClient->detachTrust($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Domain $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ManagedIdentitiesServiceClient::domainName('[PROJECT]', '[LOCATION]', '[DOMAIN]'); + $trustTargetDomainName = '[TARGET_DOMAIN_NAME]'; + $trustTrustType = TrustType::TRUST_TYPE_UNSPECIFIED; + $trustTrustDirection = TrustDirection::TRUST_DIRECTION_UNSPECIFIED; + $trustTargetDnsIpAddressesElement = '[TARGET_DNS_IP_ADDRESSES]'; + $trustTrustHandshakeSecret = '[TRUST_HANDSHAKE_SECRET]'; + + detach_trust_sample( + $formattedName, + $trustTargetDomainName, + $trustTrustType, + $trustTrustDirection, + $trustTargetDnsIpAddressesElement, + $trustTrustHandshakeSecret + ); +} +// [END managedidentities_v1_generated_ManagedIdentitiesService_DetachTrust_sync] diff --git a/owl-bot-staging/ManagedIdentities/v1/samples/V1/ManagedIdentitiesServiceClient/get_domain.php b/owl-bot-staging/ManagedIdentities/v1/samples/V1/ManagedIdentitiesServiceClient/get_domain.php new file mode 100644 index 000000000000..7a6b49fa1482 --- /dev/null +++ b/owl-bot-staging/ManagedIdentities/v1/samples/V1/ManagedIdentitiesServiceClient/get_domain.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Domain $response */ + $response = $managedIdentitiesServiceClient->getDomain($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ManagedIdentitiesServiceClient::domainName('[PROJECT]', '[LOCATION]', '[DOMAIN]'); + + get_domain_sample($formattedName); +} +// [END managedidentities_v1_generated_ManagedIdentitiesService_GetDomain_sync] diff --git a/owl-bot-staging/ManagedIdentities/v1/samples/V1/ManagedIdentitiesServiceClient/list_domains.php b/owl-bot-staging/ManagedIdentities/v1/samples/V1/ManagedIdentitiesServiceClient/list_domains.php new file mode 100644 index 000000000000..71f27124492a --- /dev/null +++ b/owl-bot-staging/ManagedIdentities/v1/samples/V1/ManagedIdentitiesServiceClient/list_domains.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $managedIdentitiesServiceClient->listDomains($request); + + /** @var Domain $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = ManagedIdentitiesServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + list_domains_sample($formattedParent); +} +// [END managedidentities_v1_generated_ManagedIdentitiesService_ListDomains_sync] diff --git a/owl-bot-staging/ManagedIdentities/v1/samples/V1/ManagedIdentitiesServiceClient/reconfigure_trust.php b/owl-bot-staging/ManagedIdentities/v1/samples/V1/ManagedIdentitiesServiceClient/reconfigure_trust.php new file mode 100644 index 000000000000..fc3405ce881b --- /dev/null +++ b/owl-bot-staging/ManagedIdentities/v1/samples/V1/ManagedIdentitiesServiceClient/reconfigure_trust.php @@ -0,0 +1,96 @@ +setName($formattedName) + ->setTargetDomainName($targetDomainName) + ->setTargetDnsIpAddresses($targetDnsIpAddresses); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $managedIdentitiesServiceClient->reconfigureTrust($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Domain $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ManagedIdentitiesServiceClient::domainName('[PROJECT]', '[LOCATION]', '[DOMAIN]'); + $targetDomainName = '[TARGET_DOMAIN_NAME]'; + $targetDnsIpAddressesElement = '[TARGET_DNS_IP_ADDRESSES]'; + + reconfigure_trust_sample($formattedName, $targetDomainName, $targetDnsIpAddressesElement); +} +// [END managedidentities_v1_generated_ManagedIdentitiesService_ReconfigureTrust_sync] diff --git a/owl-bot-staging/ManagedIdentities/v1/samples/V1/ManagedIdentitiesServiceClient/reset_admin_password.php b/owl-bot-staging/ManagedIdentities/v1/samples/V1/ManagedIdentitiesServiceClient/reset_admin_password.php new file mode 100644 index 000000000000..6dcf28503934 --- /dev/null +++ b/owl-bot-staging/ManagedIdentities/v1/samples/V1/ManagedIdentitiesServiceClient/reset_admin_password.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var ResetAdminPasswordResponse $response */ + $response = $managedIdentitiesServiceClient->resetAdminPassword($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ManagedIdentitiesServiceClient::domainName('[PROJECT]', '[LOCATION]', '[DOMAIN]'); + + reset_admin_password_sample($formattedName); +} +// [END managedidentities_v1_generated_ManagedIdentitiesService_ResetAdminPassword_sync] diff --git a/owl-bot-staging/ManagedIdentities/v1/samples/V1/ManagedIdentitiesServiceClient/update_domain.php b/owl-bot-staging/ManagedIdentities/v1/samples/V1/ManagedIdentitiesServiceClient/update_domain.php new file mode 100644 index 000000000000..94032efa618e --- /dev/null +++ b/owl-bot-staging/ManagedIdentities/v1/samples/V1/ManagedIdentitiesServiceClient/update_domain.php @@ -0,0 +1,105 @@ +setName($domainName) + ->setReservedIpRange($domainReservedIpRange) + ->setLocations($domainLocations); + $request = (new UpdateDomainRequest()) + ->setUpdateMask($updateMask) + ->setDomain($domain); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $managedIdentitiesServiceClient->updateDomain($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Domain $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $domainName = '[NAME]'; + $domainReservedIpRange = '[RESERVED_IP_RANGE]'; + $domainLocationsElement = '[LOCATIONS]'; + + update_domain_sample($domainName, $domainReservedIpRange, $domainLocationsElement); +} +// [END managedidentities_v1_generated_ManagedIdentitiesService_UpdateDomain_sync] diff --git a/owl-bot-staging/ManagedIdentities/v1/samples/V1/ManagedIdentitiesServiceClient/validate_trust.php b/owl-bot-staging/ManagedIdentities/v1/samples/V1/ManagedIdentitiesServiceClient/validate_trust.php new file mode 100644 index 000000000000..da23c9ce0f8b --- /dev/null +++ b/owl-bot-staging/ManagedIdentities/v1/samples/V1/ManagedIdentitiesServiceClient/validate_trust.php @@ -0,0 +1,123 @@ +setTargetDomainName($trustTargetDomainName) + ->setTrustType($trustTrustType) + ->setTrustDirection($trustTrustDirection) + ->setTargetDnsIpAddresses($trustTargetDnsIpAddresses) + ->setTrustHandshakeSecret($trustTrustHandshakeSecret); + $request = (new ValidateTrustRequest()) + ->setName($formattedName) + ->setTrust($trust); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $managedIdentitiesServiceClient->validateTrust($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Domain $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ManagedIdentitiesServiceClient::domainName('[PROJECT]', '[LOCATION]', '[DOMAIN]'); + $trustTargetDomainName = '[TARGET_DOMAIN_NAME]'; + $trustTrustType = TrustType::TRUST_TYPE_UNSPECIFIED; + $trustTrustDirection = TrustDirection::TRUST_DIRECTION_UNSPECIFIED; + $trustTargetDnsIpAddressesElement = '[TARGET_DNS_IP_ADDRESSES]'; + $trustTrustHandshakeSecret = '[TRUST_HANDSHAKE_SECRET]'; + + validate_trust_sample( + $formattedName, + $trustTargetDomainName, + $trustTrustType, + $trustTrustDirection, + $trustTargetDnsIpAddressesElement, + $trustTrustHandshakeSecret + ); +} +// [END managedidentities_v1_generated_ManagedIdentitiesService_ValidateTrust_sync] diff --git a/owl-bot-staging/ManagedIdentities/v1/src/V1/Client/ManagedIdentitiesServiceClient.php b/owl-bot-staging/ManagedIdentities/v1/src/V1/Client/ManagedIdentitiesServiceClient.php new file mode 100644 index 000000000000..3548e741d59f --- /dev/null +++ b/owl-bot-staging/ManagedIdentities/v1/src/V1/Client/ManagedIdentitiesServiceClient.php @@ -0,0 +1,607 @@ + attachTrustAsync(AttachTrustRequest $request, array $optionalArgs = []) + * @method PromiseInterface createMicrosoftAdDomainAsync(CreateMicrosoftAdDomainRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteDomainAsync(DeleteDomainRequest $request, array $optionalArgs = []) + * @method PromiseInterface detachTrustAsync(DetachTrustRequest $request, array $optionalArgs = []) + * @method PromiseInterface getDomainAsync(GetDomainRequest $request, array $optionalArgs = []) + * @method PromiseInterface listDomainsAsync(ListDomainsRequest $request, array $optionalArgs = []) + * @method PromiseInterface reconfigureTrustAsync(ReconfigureTrustRequest $request, array $optionalArgs = []) + * @method PromiseInterface resetAdminPasswordAsync(ResetAdminPasswordRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateDomainAsync(UpdateDomainRequest $request, array $optionalArgs = []) + * @method PromiseInterface validateTrustAsync(ValidateTrustRequest $request, array $optionalArgs = []) + */ +final class ManagedIdentitiesServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.managedidentities.v1.ManagedIdentitiesService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'managedidentities.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'managedidentities.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/managed_identities_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/managed_identities_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/managed_identities_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/managed_identities_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Create the default operation client for the service. + * + * @param array $options ClientOptions for the client. + * + * @return OperationsClient + */ + private function createOperationsClient(array $options) + { + // Unset client-specific configuration options + unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); + + if (isset($options['operationsClient'])) { + return $options['operationsClient']; + } + + return new OperationsClient($options); + } + + /** + * Formats a string containing the fully-qualified path to represent a domain + * resource. + * + * @param string $project + * @param string $location + * @param string $domain + * + * @return string The formatted domain resource. + */ + public static function domainName(string $project, string $location, string $domain): string + { + return self::getPathTemplate('domain')->render([ + 'project' => $project, + 'location' => $location, + 'domain' => $domain, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a location + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted location resource. + */ + public static function locationName(string $project, string $location): string + { + return self::getPathTemplate('location')->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - domain: projects/{project}/locations/{location}/domains/{domain} + * - location: projects/{project}/locations/{location} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'managedidentities.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Adds an AD trust to a domain. + * + * The async variant is {@see ManagedIdentitiesServiceClient::attachTrustAsync()} . + * + * @example samples/V1/ManagedIdentitiesServiceClient/attach_trust.php + * + * @param AttachTrustRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function attachTrust(AttachTrustRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('AttachTrust', $request, $callOptions)->wait(); + } + + /** + * Creates a Microsoft AD domain. + * + * The async variant is + * {@see ManagedIdentitiesServiceClient::createMicrosoftAdDomainAsync()} . + * + * @example samples/V1/ManagedIdentitiesServiceClient/create_microsoft_ad_domain.php + * + * @param CreateMicrosoftAdDomainRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createMicrosoftAdDomain(CreateMicrosoftAdDomainRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateMicrosoftAdDomain', $request, $callOptions)->wait(); + } + + /** + * Deletes a domain. + * + * The async variant is {@see ManagedIdentitiesServiceClient::deleteDomainAsync()} + * . + * + * @example samples/V1/ManagedIdentitiesServiceClient/delete_domain.php + * + * @param DeleteDomainRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteDomain(DeleteDomainRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteDomain', $request, $callOptions)->wait(); + } + + /** + * Removes an AD trust. + * + * The async variant is {@see ManagedIdentitiesServiceClient::detachTrustAsync()} . + * + * @example samples/V1/ManagedIdentitiesServiceClient/detach_trust.php + * + * @param DetachTrustRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function detachTrust(DetachTrustRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DetachTrust', $request, $callOptions)->wait(); + } + + /** + * Gets information about a domain. + * + * The async variant is {@see ManagedIdentitiesServiceClient::getDomainAsync()} . + * + * @example samples/V1/ManagedIdentitiesServiceClient/get_domain.php + * + * @param GetDomainRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Domain + * + * @throws ApiException Thrown if the API call fails. + */ + public function getDomain(GetDomainRequest $request, array $callOptions = []): Domain + { + return $this->startApiCall('GetDomain', $request, $callOptions)->wait(); + } + + /** + * Lists domains in a project. + * + * The async variant is {@see ManagedIdentitiesServiceClient::listDomainsAsync()} . + * + * @example samples/V1/ManagedIdentitiesServiceClient/list_domains.php + * + * @param ListDomainsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listDomains(ListDomainsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListDomains', $request, $callOptions); + } + + /** + * Updates the DNS conditional forwarder. + * + * The async variant is + * {@see ManagedIdentitiesServiceClient::reconfigureTrustAsync()} . + * + * @example samples/V1/ManagedIdentitiesServiceClient/reconfigure_trust.php + * + * @param ReconfigureTrustRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function reconfigureTrust(ReconfigureTrustRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('ReconfigureTrust', $request, $callOptions)->wait(); + } + + /** + * Resets a domain's administrator password. + * + * The async variant is + * {@see ManagedIdentitiesServiceClient::resetAdminPasswordAsync()} . + * + * @example samples/V1/ManagedIdentitiesServiceClient/reset_admin_password.php + * + * @param ResetAdminPasswordRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ResetAdminPasswordResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function resetAdminPassword(ResetAdminPasswordRequest $request, array $callOptions = []): ResetAdminPasswordResponse + { + return $this->startApiCall('ResetAdminPassword', $request, $callOptions)->wait(); + } + + /** + * Updates the metadata and configuration of a domain. + * + * The async variant is {@see ManagedIdentitiesServiceClient::updateDomainAsync()} + * . + * + * @example samples/V1/ManagedIdentitiesServiceClient/update_domain.php + * + * @param UpdateDomainRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateDomain(UpdateDomainRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateDomain', $request, $callOptions)->wait(); + } + + /** + * Validates a trust state, that the target domain is reachable, and that the + * target domain is able to accept incoming trust requests. + * + * The async variant is {@see ManagedIdentitiesServiceClient::validateTrustAsync()} + * . + * + * @example samples/V1/ManagedIdentitiesServiceClient/validate_trust.php + * + * @param ValidateTrustRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function validateTrust(ValidateTrustRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('ValidateTrust', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/ManagedIdentities/v1/src/V1/gapic_metadata.json b/owl-bot-staging/ManagedIdentities/v1/src/V1/gapic_metadata.json new file mode 100644 index 000000000000..ceace87a4fb2 --- /dev/null +++ b/owl-bot-staging/ManagedIdentities/v1/src/V1/gapic_metadata.json @@ -0,0 +1,68 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.cloud.managedidentities.v1", + "libraryPackage": "Google\\Cloud\\ManagedIdentities\\V1", + "services": { + "ManagedIdentitiesService": { + "clients": { + "grpc": { + "libraryClient": "ManagedIdentitiesServiceGapicClient", + "rpcs": { + "AttachTrust": { + "methods": [ + "attachTrust" + ] + }, + "CreateMicrosoftAdDomain": { + "methods": [ + "createMicrosoftAdDomain" + ] + }, + "DeleteDomain": { + "methods": [ + "deleteDomain" + ] + }, + "DetachTrust": { + "methods": [ + "detachTrust" + ] + }, + "GetDomain": { + "methods": [ + "getDomain" + ] + }, + "ListDomains": { + "methods": [ + "listDomains" + ] + }, + "ReconfigureTrust": { + "methods": [ + "reconfigureTrust" + ] + }, + "ResetAdminPassword": { + "methods": [ + "resetAdminPassword" + ] + }, + "UpdateDomain": { + "methods": [ + "updateDomain" + ] + }, + "ValidateTrust": { + "methods": [ + "validateTrust" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/ManagedIdentities/v1/src/V1/resources/managed_identities_service_client_config.json b/owl-bot-staging/ManagedIdentities/v1/src/V1/resources/managed_identities_service_client_config.json new file mode 100644 index 000000000000..6dc854819889 --- /dev/null +++ b/owl-bot-staging/ManagedIdentities/v1/src/V1/resources/managed_identities_service_client_config.json @@ -0,0 +1,82 @@ +{ + "interfaces": { + "google.cloud.managedidentities.v1.ManagedIdentitiesService": { + "retry_codes": { + "no_retry_codes": [], + "no_retry_1_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "AttachTrust": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateMicrosoftAdDomain": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteDomain": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DetachTrust": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetDomain": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListDomains": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ReconfigureTrust": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ResetAdminPassword": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateDomain": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ValidateTrust": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/ManagedIdentities/v1/src/V1/resources/managed_identities_service_descriptor_config.php b/owl-bot-staging/ManagedIdentities/v1/src/V1/resources/managed_identities_service_descriptor_config.php new file mode 100644 index 000000000000..f5f9c7931585 --- /dev/null +++ b/owl-bot-staging/ManagedIdentities/v1/src/V1/resources/managed_identities_service_descriptor_config.php @@ -0,0 +1,210 @@ + [ + 'google.cloud.managedidentities.v1.ManagedIdentitiesService' => [ + 'AttachTrust' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\ManagedIdentities\V1\Domain', + 'metadataReturnType' => '\Google\Cloud\ManagedIdentities\V1\OpMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'CreateMicrosoftAdDomain' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\ManagedIdentities\V1\Domain', + 'metadataReturnType' => '\Google\Cloud\ManagedIdentities\V1\OpMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteDomain' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\ManagedIdentities\V1\OpMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DetachTrust' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\ManagedIdentities\V1\Domain', + 'metadataReturnType' => '\Google\Cloud\ManagedIdentities\V1\OpMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ReconfigureTrust' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\ManagedIdentities\V1\Domain', + 'metadataReturnType' => '\Google\Cloud\ManagedIdentities\V1\OpMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UpdateDomain' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\ManagedIdentities\V1\Domain', + 'metadataReturnType' => '\Google\Cloud\ManagedIdentities\V1\OpMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'domain.name', + 'fieldAccessors' => [ + 'getDomain', + 'getName', + ], + ], + ], + ], + 'ValidateTrust' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\ManagedIdentities\V1\Domain', + 'metadataReturnType' => '\Google\Cloud\ManagedIdentities\V1\OpMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetDomain' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\ManagedIdentities\V1\Domain', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListDomains' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getDomains', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\ManagedIdentities\V1\ListDomainsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ResetAdminPassword' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\ManagedIdentities\V1\ResetAdminPasswordResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'templateMap' => [ + 'domain' => 'projects/{project}/locations/{location}/domains/{domain}', + 'location' => 'projects/{project}/locations/{location}', + ], + ], + ], +]; diff --git a/owl-bot-staging/ManagedIdentities/v1/src/V1/resources/managed_identities_service_rest_client_config.php b/owl-bot-staging/ManagedIdentities/v1/src/V1/resources/managed_identities_service_rest_client_config.php new file mode 100644 index 000000000000..5a26dbcf0866 --- /dev/null +++ b/owl-bot-staging/ManagedIdentities/v1/src/V1/resources/managed_identities_service_rest_client_config.php @@ -0,0 +1,295 @@ + [ + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.cloud.managedidentities.v1.ManagedIdentitiesService' => [ + 'AttachTrust' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/global/domains/*}:attachTrust', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'CreateMicrosoftAdDomain' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/global}/domains', + 'body' => 'domain', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'domain_name', + ], + ], + 'DeleteDomain' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/global/domains/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DetachTrust' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/global/domains/*}:detachTrust', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetDomain' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/global/domains/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListDomains' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/global}/domains', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ReconfigureTrust' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/global/domains/*}:reconfigureTrust', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ResetAdminPassword' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/global/domains/*}:resetAdminPassword', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'UpdateDomain' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{domain.name=projects/*/locations/global/domains/*}', + 'body' => 'domain', + 'placeholders' => [ + 'domain.name' => [ + 'getters' => [ + 'getDomain', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'ValidateTrust' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/global/domains/*}:validateTrust', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.iam.v1.IAMPolicy' => [ + 'GetIamPolicy' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/global/domains/*}:getIamPolicy', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/global/peerings/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/global/domains/*/backups/*}:getIamPolicy', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'SetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/global/domains/*}:setIamPolicy', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/global/peerings/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/global/domains/*/backups/*}:setIamPolicy', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'TestIamPermissions' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/global/domains/*}:testIamPermissions', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/global/peerings/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/global/domains/*/backups/*}:testIamPermissions', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/global/operations/*}:cancel', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/global/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/global/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/global/operations}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/ManagedIdentities/v1/tests/Unit/V1/Client/ManagedIdentitiesServiceClientTest.php b/owl-bot-staging/ManagedIdentities/v1/tests/Unit/V1/Client/ManagedIdentitiesServiceClientTest.php new file mode 100644 index 000000000000..db9009a4d3f0 --- /dev/null +++ b/owl-bot-staging/ManagedIdentities/v1/tests/Unit/V1/Client/ManagedIdentitiesServiceClientTest.php @@ -0,0 +1,1417 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return ManagedIdentitiesServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new ManagedIdentitiesServiceClient($options); + } + + /** @test */ + public function attachTrustTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/attachTrustTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $reservedIpRange = 'reservedIpRange-1082940580'; + $admin = 'admin92668751'; + $fqdn = 'fqdn3150485'; + $statusMessage = 'statusMessage-239442758'; + $expectedResponse = new Domain(); + $expectedResponse->setName($name2); + $expectedResponse->setReservedIpRange($reservedIpRange); + $expectedResponse->setAdmin($admin); + $expectedResponse->setFqdn($fqdn); + $expectedResponse->setStatusMessage($statusMessage); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/attachTrustTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->domainName('[PROJECT]', '[LOCATION]', '[DOMAIN]'); + $trust = new Trust(); + $trustTargetDomainName = 'trustTargetDomainName-39985064'; + $trust->setTargetDomainName($trustTargetDomainName); + $trustTrustType = TrustType::TRUST_TYPE_UNSPECIFIED; + $trust->setTrustType($trustTrustType); + $trustTrustDirection = TrustDirection::TRUST_DIRECTION_UNSPECIFIED; + $trust->setTrustDirection($trustTrustDirection); + $trustTargetDnsIpAddresses = []; + $trust->setTargetDnsIpAddresses($trustTargetDnsIpAddresses); + $trustTrustHandshakeSecret = 'trustTrustHandshakeSecret-1896647033'; + $trust->setTrustHandshakeSecret($trustTrustHandshakeSecret); + $request = (new AttachTrustRequest()) + ->setName($formattedName) + ->setTrust($trust); + $response = $gapicClient->attachTrust($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.managedidentities.v1.ManagedIdentitiesService/AttachTrust', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualApiRequestObject->getTrust(); + $this->assertProtobufEquals($trust, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/attachTrustTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function attachTrustExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/attachTrustTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->domainName('[PROJECT]', '[LOCATION]', '[DOMAIN]'); + $trust = new Trust(); + $trustTargetDomainName = 'trustTargetDomainName-39985064'; + $trust->setTargetDomainName($trustTargetDomainName); + $trustTrustType = TrustType::TRUST_TYPE_UNSPECIFIED; + $trust->setTrustType($trustTrustType); + $trustTrustDirection = TrustDirection::TRUST_DIRECTION_UNSPECIFIED; + $trust->setTrustDirection($trustTrustDirection); + $trustTargetDnsIpAddresses = []; + $trust->setTargetDnsIpAddresses($trustTargetDnsIpAddresses); + $trustTrustHandshakeSecret = 'trustTrustHandshakeSecret-1896647033'; + $trust->setTrustHandshakeSecret($trustTrustHandshakeSecret); + $request = (new AttachTrustRequest()) + ->setName($formattedName) + ->setTrust($trust); + $response = $gapicClient->attachTrust($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/attachTrustTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createMicrosoftAdDomainTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createMicrosoftAdDomainTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $reservedIpRange = 'reservedIpRange-1082940580'; + $admin = 'admin92668751'; + $fqdn = 'fqdn3150485'; + $statusMessage = 'statusMessage-239442758'; + $expectedResponse = new Domain(); + $expectedResponse->setName($name); + $expectedResponse->setReservedIpRange($reservedIpRange); + $expectedResponse->setAdmin($admin); + $expectedResponse->setFqdn($fqdn); + $expectedResponse->setStatusMessage($statusMessage); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createMicrosoftAdDomainTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $domainName = 'domainName104118566'; + $domain = new Domain(); + $domainName = 'domainName-1244085905'; + $domain->setName($domainName); + $domainReservedIpRange = 'domainReservedIpRange1357926058'; + $domain->setReservedIpRange($domainReservedIpRange); + $domainLocations = []; + $domain->setLocations($domainLocations); + $request = (new CreateMicrosoftAdDomainRequest()) + ->setParent($formattedParent) + ->setDomainName($domainName) + ->setDomain($domain); + $response = $gapicClient->createMicrosoftAdDomain($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.managedidentities.v1.ManagedIdentitiesService/CreateMicrosoftAdDomain', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getDomainName(); + $this->assertProtobufEquals($domainName, $actualValue); + $actualValue = $actualApiRequestObject->getDomain(); + $this->assertProtobufEquals($domain, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createMicrosoftAdDomainTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createMicrosoftAdDomainExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createMicrosoftAdDomainTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $domainName = 'domainName104118566'; + $domain = new Domain(); + $domainName = 'domainName-1244085905'; + $domain->setName($domainName); + $domainReservedIpRange = 'domainReservedIpRange1357926058'; + $domain->setReservedIpRange($domainReservedIpRange); + $domainLocations = []; + $domain->setLocations($domainLocations); + $request = (new CreateMicrosoftAdDomainRequest()) + ->setParent($formattedParent) + ->setDomainName($domainName) + ->setDomain($domain); + $response = $gapicClient->createMicrosoftAdDomain($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createMicrosoftAdDomainTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteDomainTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteDomainTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteDomainTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->domainName('[PROJECT]', '[LOCATION]', '[DOMAIN]'); + $request = (new DeleteDomainRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteDomain($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.managedidentities.v1.ManagedIdentitiesService/DeleteDomain', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteDomainTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteDomainExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteDomainTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->domainName('[PROJECT]', '[LOCATION]', '[DOMAIN]'); + $request = (new DeleteDomainRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteDomain($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteDomainTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function detachTrustTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/detachTrustTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $reservedIpRange = 'reservedIpRange-1082940580'; + $admin = 'admin92668751'; + $fqdn = 'fqdn3150485'; + $statusMessage = 'statusMessage-239442758'; + $expectedResponse = new Domain(); + $expectedResponse->setName($name2); + $expectedResponse->setReservedIpRange($reservedIpRange); + $expectedResponse->setAdmin($admin); + $expectedResponse->setFqdn($fqdn); + $expectedResponse->setStatusMessage($statusMessage); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/detachTrustTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->domainName('[PROJECT]', '[LOCATION]', '[DOMAIN]'); + $trust = new Trust(); + $trustTargetDomainName = 'trustTargetDomainName-39985064'; + $trust->setTargetDomainName($trustTargetDomainName); + $trustTrustType = TrustType::TRUST_TYPE_UNSPECIFIED; + $trust->setTrustType($trustTrustType); + $trustTrustDirection = TrustDirection::TRUST_DIRECTION_UNSPECIFIED; + $trust->setTrustDirection($trustTrustDirection); + $trustTargetDnsIpAddresses = []; + $trust->setTargetDnsIpAddresses($trustTargetDnsIpAddresses); + $trustTrustHandshakeSecret = 'trustTrustHandshakeSecret-1896647033'; + $trust->setTrustHandshakeSecret($trustTrustHandshakeSecret); + $request = (new DetachTrustRequest()) + ->setName($formattedName) + ->setTrust($trust); + $response = $gapicClient->detachTrust($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.managedidentities.v1.ManagedIdentitiesService/DetachTrust', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualApiRequestObject->getTrust(); + $this->assertProtobufEquals($trust, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/detachTrustTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function detachTrustExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/detachTrustTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->domainName('[PROJECT]', '[LOCATION]', '[DOMAIN]'); + $trust = new Trust(); + $trustTargetDomainName = 'trustTargetDomainName-39985064'; + $trust->setTargetDomainName($trustTargetDomainName); + $trustTrustType = TrustType::TRUST_TYPE_UNSPECIFIED; + $trust->setTrustType($trustTrustType); + $trustTrustDirection = TrustDirection::TRUST_DIRECTION_UNSPECIFIED; + $trust->setTrustDirection($trustTrustDirection); + $trustTargetDnsIpAddresses = []; + $trust->setTargetDnsIpAddresses($trustTargetDnsIpAddresses); + $trustTrustHandshakeSecret = 'trustTrustHandshakeSecret-1896647033'; + $trust->setTrustHandshakeSecret($trustTrustHandshakeSecret); + $request = (new DetachTrustRequest()) + ->setName($formattedName) + ->setTrust($trust); + $response = $gapicClient->detachTrust($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/detachTrustTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getDomainTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $reservedIpRange = 'reservedIpRange-1082940580'; + $admin = 'admin92668751'; + $fqdn = 'fqdn3150485'; + $statusMessage = 'statusMessage-239442758'; + $expectedResponse = new Domain(); + $expectedResponse->setName($name2); + $expectedResponse->setReservedIpRange($reservedIpRange); + $expectedResponse->setAdmin($admin); + $expectedResponse->setFqdn($fqdn); + $expectedResponse->setStatusMessage($statusMessage); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->domainName('[PROJECT]', '[LOCATION]', '[DOMAIN]'); + $request = (new GetDomainRequest()) + ->setName($formattedName); + $response = $gapicClient->getDomain($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.managedidentities.v1.ManagedIdentitiesService/GetDomain', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getDomainExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->domainName('[PROJECT]', '[LOCATION]', '[DOMAIN]'); + $request = (new GetDomainRequest()) + ->setName($formattedName); + try { + $gapicClient->getDomain($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listDomainsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $domainsElement = new Domain(); + $domains = [ + $domainsElement, + ]; + $expectedResponse = new ListDomainsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setDomains($domains); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListDomainsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listDomains($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getDomains()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.managedidentities.v1.ManagedIdentitiesService/ListDomains', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listDomainsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListDomainsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listDomains($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function reconfigureTrustTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/reconfigureTrustTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $reservedIpRange = 'reservedIpRange-1082940580'; + $admin = 'admin92668751'; + $fqdn = 'fqdn3150485'; + $statusMessage = 'statusMessage-239442758'; + $expectedResponse = new Domain(); + $expectedResponse->setName($name2); + $expectedResponse->setReservedIpRange($reservedIpRange); + $expectedResponse->setAdmin($admin); + $expectedResponse->setFqdn($fqdn); + $expectedResponse->setStatusMessage($statusMessage); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/reconfigureTrustTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->domainName('[PROJECT]', '[LOCATION]', '[DOMAIN]'); + $targetDomainName = 'targetDomainName1303689080'; + $targetDnsIpAddresses = []; + $request = (new ReconfigureTrustRequest()) + ->setName($formattedName) + ->setTargetDomainName($targetDomainName) + ->setTargetDnsIpAddresses($targetDnsIpAddresses); + $response = $gapicClient->reconfigureTrust($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.managedidentities.v1.ManagedIdentitiesService/ReconfigureTrust', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualApiRequestObject->getTargetDomainName(); + $this->assertProtobufEquals($targetDomainName, $actualValue); + $actualValue = $actualApiRequestObject->getTargetDnsIpAddresses(); + $this->assertProtobufEquals($targetDnsIpAddresses, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/reconfigureTrustTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function reconfigureTrustExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/reconfigureTrustTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->domainName('[PROJECT]', '[LOCATION]', '[DOMAIN]'); + $targetDomainName = 'targetDomainName1303689080'; + $targetDnsIpAddresses = []; + $request = (new ReconfigureTrustRequest()) + ->setName($formattedName) + ->setTargetDomainName($targetDomainName) + ->setTargetDnsIpAddresses($targetDnsIpAddresses); + $response = $gapicClient->reconfigureTrust($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/reconfigureTrustTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function resetAdminPasswordTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $password = 'password1216985755'; + $expectedResponse = new ResetAdminPasswordResponse(); + $expectedResponse->setPassword($password); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->domainName('[PROJECT]', '[LOCATION]', '[DOMAIN]'); + $request = (new ResetAdminPasswordRequest()) + ->setName($formattedName); + $response = $gapicClient->resetAdminPassword($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.managedidentities.v1.ManagedIdentitiesService/ResetAdminPassword', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function resetAdminPasswordExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->domainName('[PROJECT]', '[LOCATION]', '[DOMAIN]'); + $request = (new ResetAdminPasswordRequest()) + ->setName($formattedName); + try { + $gapicClient->resetAdminPassword($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateDomainTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateDomainTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $reservedIpRange = 'reservedIpRange-1082940580'; + $admin = 'admin92668751'; + $fqdn = 'fqdn3150485'; + $statusMessage = 'statusMessage-239442758'; + $expectedResponse = new Domain(); + $expectedResponse->setName($name); + $expectedResponse->setReservedIpRange($reservedIpRange); + $expectedResponse->setAdmin($admin); + $expectedResponse->setFqdn($fqdn); + $expectedResponse->setStatusMessage($statusMessage); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateDomainTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $updateMask = new FieldMask(); + $domain = new Domain(); + $domainName = 'domainName-1244085905'; + $domain->setName($domainName); + $domainReservedIpRange = 'domainReservedIpRange1357926058'; + $domain->setReservedIpRange($domainReservedIpRange); + $domainLocations = []; + $domain->setLocations($domainLocations); + $request = (new UpdateDomainRequest()) + ->setUpdateMask($updateMask) + ->setDomain($domain); + $response = $gapicClient->updateDomain($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.managedidentities.v1.ManagedIdentitiesService/UpdateDomain', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $actualValue = $actualApiRequestObject->getDomain(); + $this->assertProtobufEquals($domain, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateDomainTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateDomainExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateDomainTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $updateMask = new FieldMask(); + $domain = new Domain(); + $domainName = 'domainName-1244085905'; + $domain->setName($domainName); + $domainReservedIpRange = 'domainReservedIpRange1357926058'; + $domain->setReservedIpRange($domainReservedIpRange); + $domainLocations = []; + $domain->setLocations($domainLocations); + $request = (new UpdateDomainRequest()) + ->setUpdateMask($updateMask) + ->setDomain($domain); + $response = $gapicClient->updateDomain($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateDomainTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function validateTrustTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/validateTrustTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $reservedIpRange = 'reservedIpRange-1082940580'; + $admin = 'admin92668751'; + $fqdn = 'fqdn3150485'; + $statusMessage = 'statusMessage-239442758'; + $expectedResponse = new Domain(); + $expectedResponse->setName($name2); + $expectedResponse->setReservedIpRange($reservedIpRange); + $expectedResponse->setAdmin($admin); + $expectedResponse->setFqdn($fqdn); + $expectedResponse->setStatusMessage($statusMessage); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/validateTrustTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->domainName('[PROJECT]', '[LOCATION]', '[DOMAIN]'); + $trust = new Trust(); + $trustTargetDomainName = 'trustTargetDomainName-39985064'; + $trust->setTargetDomainName($trustTargetDomainName); + $trustTrustType = TrustType::TRUST_TYPE_UNSPECIFIED; + $trust->setTrustType($trustTrustType); + $trustTrustDirection = TrustDirection::TRUST_DIRECTION_UNSPECIFIED; + $trust->setTrustDirection($trustTrustDirection); + $trustTargetDnsIpAddresses = []; + $trust->setTargetDnsIpAddresses($trustTargetDnsIpAddresses); + $trustTrustHandshakeSecret = 'trustTrustHandshakeSecret-1896647033'; + $trust->setTrustHandshakeSecret($trustTrustHandshakeSecret); + $request = (new ValidateTrustRequest()) + ->setName($formattedName) + ->setTrust($trust); + $response = $gapicClient->validateTrust($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.managedidentities.v1.ManagedIdentitiesService/ValidateTrust', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualApiRequestObject->getTrust(); + $this->assertProtobufEquals($trust, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/validateTrustTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function validateTrustExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/validateTrustTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->domainName('[PROJECT]', '[LOCATION]', '[DOMAIN]'); + $trust = new Trust(); + $trustTargetDomainName = 'trustTargetDomainName-39985064'; + $trust->setTargetDomainName($trustTargetDomainName); + $trustTrustType = TrustType::TRUST_TYPE_UNSPECIFIED; + $trust->setTrustType($trustTrustType); + $trustTrustDirection = TrustDirection::TRUST_DIRECTION_UNSPECIFIED; + $trust->setTrustDirection($trustTrustDirection); + $trustTargetDnsIpAddresses = []; + $trust->setTargetDnsIpAddresses($trustTargetDnsIpAddresses); + $trustTrustHandshakeSecret = 'trustTrustHandshakeSecret-1896647033'; + $trust->setTrustHandshakeSecret($trustTrustHandshakeSecret); + $request = (new ValidateTrustRequest()) + ->setName($formattedName) + ->setTrust($trust); + $response = $gapicClient->validateTrust($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/validateTrustTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function attachTrustAsyncTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/attachTrustTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $reservedIpRange = 'reservedIpRange-1082940580'; + $admin = 'admin92668751'; + $fqdn = 'fqdn3150485'; + $statusMessage = 'statusMessage-239442758'; + $expectedResponse = new Domain(); + $expectedResponse->setName($name2); + $expectedResponse->setReservedIpRange($reservedIpRange); + $expectedResponse->setAdmin($admin); + $expectedResponse->setFqdn($fqdn); + $expectedResponse->setStatusMessage($statusMessage); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/attachTrustTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->domainName('[PROJECT]', '[LOCATION]', '[DOMAIN]'); + $trust = new Trust(); + $trustTargetDomainName = 'trustTargetDomainName-39985064'; + $trust->setTargetDomainName($trustTargetDomainName); + $trustTrustType = TrustType::TRUST_TYPE_UNSPECIFIED; + $trust->setTrustType($trustTrustType); + $trustTrustDirection = TrustDirection::TRUST_DIRECTION_UNSPECIFIED; + $trust->setTrustDirection($trustTrustDirection); + $trustTargetDnsIpAddresses = []; + $trust->setTargetDnsIpAddresses($trustTargetDnsIpAddresses); + $trustTrustHandshakeSecret = 'trustTrustHandshakeSecret-1896647033'; + $trust->setTrustHandshakeSecret($trustTrustHandshakeSecret); + $request = (new AttachTrustRequest()) + ->setName($formattedName) + ->setTrust($trust); + $response = $gapicClient->attachTrustAsync($request)->wait(); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.managedidentities.v1.ManagedIdentitiesService/AttachTrust', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualApiRequestObject->getTrust(); + $this->assertProtobufEquals($trust, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/attachTrustTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } +} diff --git a/owl-bot-staging/ManagedKafka/v1/proto/src/GPBMetadata/Google/Cloud/Managedkafka/V1/ManagedKafka.php b/owl-bot-staging/ManagedKafka/v1/proto/src/GPBMetadata/Google/Cloud/Managedkafka/V1/ManagedKafka.php new file mode 100644 index 000000000000..10674c4cc346 --- /dev/null +++ b/owl-bot-staging/ManagedKafka/v1/proto/src/GPBMetadata/Google/Cloud/Managedkafka/V1/ManagedKafka.php @@ -0,0 +1,125 @@ +internalAddGeneratedFile( + ' +ñ+ +0google/cloud/managedkafka/v1/managed_kafka.protogoogle.cloud.managedkafka.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/field_info.protogoogle/api/resource.proto,google/cloud/managedkafka/v1/resources.proto#google/longrunning/operations.protogoogle/protobuf/empty.proto google/protobuf/field_mask.proto"¯ +ListClustersRequest; +parent ( B+àAúA%#managedkafka.googleapis.com/Cluster + page_size (BàA + +page_token ( BàA +filter ( BàA +order_by ( BàA"} +ListClustersResponse7 +clusters ( 2%.google.cloud.managedkafka.v1.Cluster +next_page_token (  + unreachable ( "N +GetClusterRequest9 +name ( B+àAúA% +#managedkafka.googleapis.com/Cluster"Ê +CreateClusterRequest; +parent ( B+àAúA%#managedkafka.googleapis.com/Cluster + +cluster_id ( BàA; +cluster ( 2%.google.cloud.managedkafka.v1.ClusterBàA + +request_id ( B àAâŒÏ×"ª +UpdateClusterRequest4 + update_mask ( 2.google.protobuf.FieldMaskBàA; +cluster ( 2%.google.cloud.managedkafka.v1.ClusterBàA + +request_id ( B àAâŒÏ×"r +DeleteClusterRequest9 +name ( B+àAúA% +#managedkafka.googleapis.com/Cluster + +request_id ( B àAâŒÏ×" +ListTopicsRequest9 +parent ( B)àAúA#!managedkafka.googleapis.com/Topic + page_size (BàA + +page_token ( BàA"b +ListTopicsResponse3 +topics ( 2#.google.cloud.managedkafka.v1.Topic +next_page_token ( "J +GetTopicRequest7 +name ( B)àAúA# +!managedkafka.googleapis.com/Topic"Ÿ +CreateTopicRequest9 +parent ( B)àAúA#!managedkafka.googleapis.com/Topic +topic_id ( BàA7 +topic ( 2#.google.cloud.managedkafka.v1.TopicBàA"ƒ +UpdateTopicRequest4 + update_mask ( 2.google.protobuf.FieldMaskBàA7 +topic ( 2#.google.cloud.managedkafka.v1.TopicBàA"M +DeleteTopicRequest7 +name ( B)àAúA# +!managedkafka.googleapis.com/Topic" +ListConsumerGroupsRequestA +parent ( B1àAúA+)managedkafka.googleapis.com/ConsumerGroup + page_size (BàA + +page_token ( BàA"{ +ListConsumerGroupsResponseD +consumer_groups ( 2+.google.cloud.managedkafka.v1.ConsumerGroup +next_page_token ( "Z +GetConsumerGroupRequest? +name ( B1àAúA+ +)managedkafka.googleapis.com/ConsumerGroup"œ +UpdateConsumerGroupRequest4 + update_mask ( 2.google.protobuf.FieldMaskBàAH +consumer_group ( 2+.google.cloud.managedkafka.v1.ConsumerGroupBàA"] +DeleteConsumerGroupRequest? +name ( B1àAúA+ +)managedkafka.googleapis.com/ConsumerGroup2² + ManagedKafka´ + ListClusters1.google.cloud.managedkafka.v1.ListClustersRequest2.google.cloud.managedkafka.v1.ListClustersResponse"=ÚAparent‚Óä“.,/v1/{parent=projects/*/locations/*}/clusters¡ + +GetCluster/.google.cloud.managedkafka.v1.GetClusterRequest%.google.cloud.managedkafka.v1.Cluster";ÚAname‚Óä“.,/v1/{name=projects/*/locations/*/clusters/*}Ü + CreateCluster2.google.cloud.managedkafka.v1.CreateClusterRequest.google.longrunning.Operation"xÊA +ClusterOperationMetadataÚAparent,cluster,cluster_id‚Óä“7",/v1/{parent=projects/*/locations/*}/clusters:clusterÞ + UpdateCluster2.google.cloud.managedkafka.v1.UpdateClusterRequest.google.longrunning.Operation"zÊA +ClusterOperationMetadataÚAcluster,update_mask‚Óä“?24/v1/{cluster.name=projects/*/locations/*/clusters/*}:clusterÌ + DeleteCluster2.google.cloud.managedkafka.v1.DeleteClusterRequest.google.longrunning.Operation"hÊA* +google.protobuf.EmptyOperationMetadataÚAname‚Óä“.*,/v1/{name=projects/*/locations/*/clusters/*}· + +ListTopics/.google.cloud.managedkafka.v1.ListTopicsRequest0.google.cloud.managedkafka.v1.ListTopicsResponse"FÚAparent‚Óä“75/v1/{parent=projects/*/locations/*/clusters/*}/topics¤ +GetTopic-.google.cloud.managedkafka.v1.GetTopicRequest#.google.cloud.managedkafka.v1.Topic"DÚAname‚Óä“75/v1/{name=projects/*/locations/*/clusters/*/topics/*} + CreateTopic0.google.cloud.managedkafka.v1.CreateTopicRequest#.google.cloud.managedkafka.v1.Topic"\\ÚAparent,topic,topic_id‚Óä“>"5/v1/{parent=projects/*/locations/*/clusters/*}/topics:topicÄ + UpdateTopic0.google.cloud.managedkafka.v1.UpdateTopicRequest#.google.cloud.managedkafka.v1.Topic"^ÚAtopic,update_mask‚Óä“D2;/v1/{topic.name=projects/*/locations/*/clusters/*/topics/*}:topic + DeleteTopic0.google.cloud.managedkafka.v1.DeleteTopicRequest.google.protobuf.Empty"DÚAname‚Óä“7*5/v1/{name=projects/*/locations/*/clusters/*/topics/*}× +ListConsumerGroups7.google.cloud.managedkafka.v1.ListConsumerGroupsRequest8.google.cloud.managedkafka.v1.ListConsumerGroupsResponse"NÚAparent‚Óä“?=/v1/{parent=projects/*/locations/*/clusters/*}/consumerGroupsÄ +GetConsumerGroup5.google.cloud.managedkafka.v1.GetConsumerGroupRequest+.google.cloud.managedkafka.v1.ConsumerGroup"LÚAname‚Óä“?=/v1/{name=projects/*/locations/*/clusters/*/consumerGroups/*}€ +UpdateConsumerGroup8.google.cloud.managedkafka.v1.UpdateConsumerGroupRequest+.google.cloud.managedkafka.v1.ConsumerGroup"ÚAconsumer_group,update_mask‚Óä“^2L/v1/{consumer_group.name=projects/*/locations/*/clusters/*/consumerGroups/*}:consumer_groupµ +DeleteConsumerGroup8.google.cloud.managedkafka.v1.DeleteConsumerGroupRequest.google.protobuf.Empty"LÚAname‚Óä“?*=/v1/{name=projects/*/locations/*/clusters/*/consumerGroups/*}OÊAmanagedkafka.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformBÝ + com.google.cloud.managedkafka.v1BManagedKafkaProtoPZDcloud.google.com/go/managedkafka/apiv1/managedkafkapb;managedkafkapbªGoogle.Cloud.ManagedKafka.V1ÊGoogle\\Cloud\\ManagedKafka\\V1êGoogle::Cloud::ManagedKafka::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/ManagedKafka/v1/proto/src/GPBMetadata/Google/Cloud/Managedkafka/V1/Resources.php b/owl-bot-staging/ManagedKafka/v1/proto/src/GPBMetadata/Google/Cloud/Managedkafka/V1/Resources.php new file mode 100644 index 0000000000000000000000000000000000000000..05cd1c359ad8b3e163889ec69d9541536134757e GIT binary patch literal 3894 zcmbtXOK;mo5Dq0vwnu)*Y||=k&@ggXEv+}HDVG+ z^+;Ff36(3RGd=)X4fBA+SkhZ`l_5zb!(XOyHfhujuC$0zaK1;HVn@0j=5xv7EC_^EvkX0olfcXVQOOXQh) ztXqyGop^O(HXZiz^!MB?c3tCy~UblmzjJi`KO$Cc!ghq8Or+{hwAfmagP52GMYm$^Ax&! zF2M}1Ms}m4iDQhZR+4J@HfBtymAstR4x|mWLku@JBP8+sThTV>LMMioqzYAH1bW}sd?2C-eF=Kb98#{=!PONeK14z*n zBRN15OU2Kon}{4dq$&ZhH(=4lGUE1h;wtt_J(od4bL`tg?kA4pPYJlWg%g1U3as9R zObjqS1IZ&Y3?j}iLh4vG{2N(Lo zx9}=_8WjvnL$56p*P_P}R&qvtTnnE@8*|ZGaW;G^t-!Kvs9w)<24Vb4Sy)mgP&~8Z z<}0vNo}dH&F~G5A`)I^BJqB2k;-28I!NPzHEN7^6h8}TQjs&0bzjCmAiU@oaW(HO_ zNV273aXJM~DT{lk$w;1WzzluiKZNYwe&uvnvarzDR}QKrc~@?fs~DP3VO4(IimfU8 z4dt*b@1klmo5zYS|PYD zB13cc0%}ie#bC_;%)$J)BJn%0sIrZsqzh`u#&o#iXA6R}4YNlBSD_rIwQIh#i522c zIrX=^1~*wqsrt@$fFU%#apzk5sU89(ae? zc=I#nDm_)hdpJkkNR`sa8$1MhIjgY>9F@G!r~Ai_A_myIClzm1goXIxMOiJq=HAI8 zxH&By1F!4|nj zYe{TI(TQXA9F|Y5$Kj$ei50<2@yp9?JT@7*!K!Bsu0h)YqFnZsH#pEi? z4Z?2oB=5NVk4adJEY%##x6k9_E`%7PCe6W19-Y|}Sq$Phbs!U4i(@p8-Npn)_b!Lg zM3^Z)(i`OAFC5&NM#M?CpZ*U*Y9Za2!}Qt+-<3W^bhNP)Ed&C^#fkU)>jbRq+jI=U ze2>C>xR=1cY6z>xNy>s_;&iZK3OlwW{|PM79>aGP zYkUi7OY1B!hQO~+}dpvGz1|wH&LZe~TwR5I3CK=37BNzev17uI= A&Hw-a literal 0 HcmV?d00001 diff --git a/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/AccessConfig.php b/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/AccessConfig.php new file mode 100644 index 000000000000..7b0b55d42851 --- /dev/null +++ b/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/AccessConfig.php @@ -0,0 +1,75 @@ +google.cloud.managedkafka.v1.AccessConfig + */ +class AccessConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Virtual Private Cloud (VPC) networks that must be granted direct + * access to the Kafka cluster. Minimum of 1 network is required. Maximum 10 + * networks can be specified. + * + * Generated from protobuf field repeated .google.cloud.managedkafka.v1.NetworkConfig network_configs = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private $network_configs; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\ManagedKafka\V1\NetworkConfig>|\Google\Protobuf\Internal\RepeatedField $network_configs + * Required. Virtual Private Cloud (VPC) networks that must be granted direct + * access to the Kafka cluster. Minimum of 1 network is required. Maximum 10 + * networks can be specified. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Managedkafka\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Required. Virtual Private Cloud (VPC) networks that must be granted direct + * access to the Kafka cluster. Minimum of 1 network is required. Maximum 10 + * networks can be specified. + * + * Generated from protobuf field repeated .google.cloud.managedkafka.v1.NetworkConfig network_configs = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNetworkConfigs() + { + return $this->network_configs; + } + + /** + * Required. Virtual Private Cloud (VPC) networks that must be granted direct + * access to the Kafka cluster. Minimum of 1 network is required. Maximum 10 + * networks can be specified. + * + * Generated from protobuf field repeated .google.cloud.managedkafka.v1.NetworkConfig network_configs = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Cloud\ManagedKafka\V1\NetworkConfig>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNetworkConfigs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ManagedKafka\V1\NetworkConfig::class); + $this->network_configs = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/CapacityConfig.php b/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/CapacityConfig.php new file mode 100644 index 000000000000..491c262bce33 --- /dev/null +++ b/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/CapacityConfig.php @@ -0,0 +1,109 @@ +google.cloud.managedkafka.v1.CapacityConfig + */ +class CapacityConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The number of vCPUs to provision for the cluster. Minimum: 3. + * + * Generated from protobuf field int64 vcpu_count = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $vcpu_count = 0; + /** + * Required. The memory to provision for the cluster in bytes. + * The CPU:memory ratio (vCPU:GiB) must be between 1:1 and 1:8. + * Minimum: 3221225472 (3 GiB). + * + * Generated from protobuf field int64 memory_bytes = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $memory_bytes = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $vcpu_count + * Required. The number of vCPUs to provision for the cluster. Minimum: 3. + * @type int|string $memory_bytes + * Required. The memory to provision for the cluster in bytes. + * The CPU:memory ratio (vCPU:GiB) must be between 1:1 and 1:8. + * Minimum: 3221225472 (3 GiB). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Managedkafka\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Required. The number of vCPUs to provision for the cluster. Minimum: 3. + * + * Generated from protobuf field int64 vcpu_count = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return int|string + */ + public function getVcpuCount() + { + return $this->vcpu_count; + } + + /** + * Required. The number of vCPUs to provision for the cluster. Minimum: 3. + * + * Generated from protobuf field int64 vcpu_count = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param int|string $var + * @return $this + */ + public function setVcpuCount($var) + { + GPBUtil::checkInt64($var); + $this->vcpu_count = $var; + + return $this; + } + + /** + * Required. The memory to provision for the cluster in bytes. + * The CPU:memory ratio (vCPU:GiB) must be between 1:1 and 1:8. + * Minimum: 3221225472 (3 GiB). + * + * Generated from protobuf field int64 memory_bytes = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return int|string + */ + public function getMemoryBytes() + { + return $this->memory_bytes; + } + + /** + * Required. The memory to provision for the cluster in bytes. + * The CPU:memory ratio (vCPU:GiB) must be between 1:1 and 1:8. + * Minimum: 3221225472 (3 GiB). + * + * Generated from protobuf field int64 memory_bytes = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param int|string $var + * @return $this + */ + public function setMemoryBytes($var) + { + GPBUtil::checkInt64($var); + $this->memory_bytes = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/Cluster.php b/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/Cluster.php new file mode 100644 index 000000000000..0f78467726d0 --- /dev/null +++ b/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/Cluster.php @@ -0,0 +1,448 @@ +google.cloud.managedkafka.v1.Cluster + */ +class Cluster extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The name of the cluster. Structured like: + * projects/{project_number}/locations/{location}/clusters/{cluster_id} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Output only. The time when the cluster was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The time when the cluster was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Optional. Labels as key value pairs. + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Required. Capacity configuration for the Kafka cluster. + * + * Generated from protobuf field .google.cloud.managedkafka.v1.CapacityConfig capacity_config = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $capacity_config = null; + /** + * Optional. Rebalance configuration for the Kafka cluster. + * + * Generated from protobuf field .google.cloud.managedkafka.v1.RebalanceConfig rebalance_config = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $rebalance_config = null; + /** + * Output only. The current state of the cluster. + * + * Generated from protobuf field .google.cloud.managedkafka.v1.Cluster.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. Reserved for future use. + * + * Generated from protobuf field optional bool satisfies_pzi = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $satisfies_pzi = null; + /** + * Output only. Reserved for future use. + * + * Generated from protobuf field optional bool satisfies_pzs = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $satisfies_pzs = null; + protected $platform_config; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\ManagedKafka\V1\GcpConfig $gcp_config + * Required. Configuration properties for a Kafka cluster deployed to Google + * Cloud Platform. + * @type string $name + * Identifier. The name of the cluster. Structured like: + * projects/{project_number}/locations/{location}/clusters/{cluster_id} + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time when the cluster was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The time when the cluster was last updated. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. Labels as key value pairs. + * @type \Google\Cloud\ManagedKafka\V1\CapacityConfig $capacity_config + * Required. Capacity configuration for the Kafka cluster. + * @type \Google\Cloud\ManagedKafka\V1\RebalanceConfig $rebalance_config + * Optional. Rebalance configuration for the Kafka cluster. + * @type int $state + * Output only. The current state of the cluster. + * @type bool $satisfies_pzi + * Output only. Reserved for future use. + * @type bool $satisfies_pzs + * Output only. Reserved for future use. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Managedkafka\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Required. Configuration properties for a Kafka cluster deployed to Google + * Cloud Platform. + * + * Generated from protobuf field .google.cloud.managedkafka.v1.GcpConfig gcp_config = 9 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\ManagedKafka\V1\GcpConfig|null + */ + public function getGcpConfig() + { + return $this->readOneof(9); + } + + public function hasGcpConfig() + { + return $this->hasOneof(9); + } + + /** + * Required. Configuration properties for a Kafka cluster deployed to Google + * Cloud Platform. + * + * Generated from protobuf field .google.cloud.managedkafka.v1.GcpConfig gcp_config = 9 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\ManagedKafka\V1\GcpConfig $var + * @return $this + */ + public function setGcpConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ManagedKafka\V1\GcpConfig::class); + $this->writeOneof(9, $var); + + return $this; + } + + /** + * Identifier. The name of the cluster. Structured like: + * projects/{project_number}/locations/{location}/clusters/{cluster_id} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The name of the cluster. Structured like: + * projects/{project_number}/locations/{location}/clusters/{cluster_id} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The time when the cluster was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The time when the cluster was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The time when the cluster was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The time when the cluster was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Optional. Labels as key value pairs. + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. Labels as key value pairs. + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Required. Capacity configuration for the Kafka cluster. + * + * Generated from protobuf field .google.cloud.managedkafka.v1.CapacityConfig capacity_config = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\ManagedKafka\V1\CapacityConfig|null + */ + public function getCapacityConfig() + { + return $this->capacity_config; + } + + public function hasCapacityConfig() + { + return isset($this->capacity_config); + } + + public function clearCapacityConfig() + { + unset($this->capacity_config); + } + + /** + * Required. Capacity configuration for the Kafka cluster. + * + * Generated from protobuf field .google.cloud.managedkafka.v1.CapacityConfig capacity_config = 5 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\ManagedKafka\V1\CapacityConfig $var + * @return $this + */ + public function setCapacityConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ManagedKafka\V1\CapacityConfig::class); + $this->capacity_config = $var; + + return $this; + } + + /** + * Optional. Rebalance configuration for the Kafka cluster. + * + * Generated from protobuf field .google.cloud.managedkafka.v1.RebalanceConfig rebalance_config = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\ManagedKafka\V1\RebalanceConfig|null + */ + public function getRebalanceConfig() + { + return $this->rebalance_config; + } + + public function hasRebalanceConfig() + { + return isset($this->rebalance_config); + } + + public function clearRebalanceConfig() + { + unset($this->rebalance_config); + } + + /** + * Optional. Rebalance configuration for the Kafka cluster. + * + * Generated from protobuf field .google.cloud.managedkafka.v1.RebalanceConfig rebalance_config = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\ManagedKafka\V1\RebalanceConfig $var + * @return $this + */ + public function setRebalanceConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ManagedKafka\V1\RebalanceConfig::class); + $this->rebalance_config = $var; + + return $this; + } + + /** + * Output only. The current state of the cluster. + * + * Generated from protobuf field .google.cloud.managedkafka.v1.Cluster.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The current state of the cluster. + * + * Generated from protobuf field .google.cloud.managedkafka.v1.Cluster.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\ManagedKafka\V1\Cluster\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. Reserved for future use. + * + * Generated from protobuf field optional bool satisfies_pzi = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getSatisfiesPzi() + { + return isset($this->satisfies_pzi) ? $this->satisfies_pzi : false; + } + + public function hasSatisfiesPzi() + { + return isset($this->satisfies_pzi); + } + + public function clearSatisfiesPzi() + { + unset($this->satisfies_pzi); + } + + /** + * Output only. Reserved for future use. + * + * Generated from protobuf field optional bool satisfies_pzi = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setSatisfiesPzi($var) + { + GPBUtil::checkBool($var); + $this->satisfies_pzi = $var; + + return $this; + } + + /** + * Output only. Reserved for future use. + * + * Generated from protobuf field optional bool satisfies_pzs = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getSatisfiesPzs() + { + return isset($this->satisfies_pzs) ? $this->satisfies_pzs : false; + } + + public function hasSatisfiesPzs() + { + return isset($this->satisfies_pzs); + } + + public function clearSatisfiesPzs() + { + unset($this->satisfies_pzs); + } + + /** + * Output only. Reserved for future use. + * + * Generated from protobuf field optional bool satisfies_pzs = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setSatisfiesPzs($var) + { + GPBUtil::checkBool($var); + $this->satisfies_pzs = $var; + + return $this; + } + + /** + * @return string + */ + public function getPlatformConfig() + { + return $this->whichOneof("platform_config"); + } + +} + diff --git a/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/Cluster/State.php b/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/Cluster/State.php new file mode 100644 index 000000000000..e3a34a3a6a34 --- /dev/null +++ b/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/Cluster/State.php @@ -0,0 +1,71 @@ +google.cloud.managedkafka.v1.Cluster.State + */ +class State +{ + /** + * A state was not specified. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The cluster is being created. + * + * Generated from protobuf enum CREATING = 1; + */ + const CREATING = 1; + /** + * The cluster is active. + * + * Generated from protobuf enum ACTIVE = 2; + */ + const ACTIVE = 2; + /** + * The cluster is being deleted. + * + * Generated from protobuf enum DELETING = 3; + */ + const DELETING = 3; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::CREATING => 'CREATING', + self::ACTIVE => 'ACTIVE', + self::DELETING => 'DELETING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\ManagedKafka\V1\Cluster_State::class); + diff --git a/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/ConsumerGroup.php b/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/ConsumerGroup.php new file mode 100644 index 000000000000..1dd45cb33745 --- /dev/null +++ b/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/ConsumerGroup.php @@ -0,0 +1,117 @@ +google.cloud.managedkafka.v1.ConsumerGroup + */ +class ConsumerGroup extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The name of the consumer group. The `consumer_group` segment is + * used when connecting directly to the cluster. Structured like: + * projects/{project}/locations/{location}/clusters/{cluster}/consumerGroups/{consumer_group} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Optional. Metadata for this consumer group for all topics it has metadata + * for. The key of the map is a topic name, structured like: + * projects/{project}/locations/{location}/clusters/{cluster}/topics/{topic} + * + * Generated from protobuf field map topics = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $topics; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The name of the consumer group. The `consumer_group` segment is + * used when connecting directly to the cluster. Structured like: + * projects/{project}/locations/{location}/clusters/{cluster}/consumerGroups/{consumer_group} + * @type array|\Google\Protobuf\Internal\MapField $topics + * Optional. Metadata for this consumer group for all topics it has metadata + * for. The key of the map is a topic name, structured like: + * projects/{project}/locations/{location}/clusters/{cluster}/topics/{topic} + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Managedkafka\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The name of the consumer group. The `consumer_group` segment is + * used when connecting directly to the cluster. Structured like: + * projects/{project}/locations/{location}/clusters/{cluster}/consumerGroups/{consumer_group} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The name of the consumer group. The `consumer_group` segment is + * used when connecting directly to the cluster. Structured like: + * projects/{project}/locations/{location}/clusters/{cluster}/consumerGroups/{consumer_group} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. Metadata for this consumer group for all topics it has metadata + * for. The key of the map is a topic name, structured like: + * projects/{project}/locations/{location}/clusters/{cluster}/topics/{topic} + * + * Generated from protobuf field map topics = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getTopics() + { + return $this->topics; + } + + /** + * Optional. Metadata for this consumer group for all topics it has metadata + * for. The key of the map is a topic name, structured like: + * projects/{project}/locations/{location}/clusters/{cluster}/topics/{topic} + * + * Generated from protobuf field map topics = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setTopics($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ManagedKafka\V1\ConsumerTopicMetadata::class); + $this->topics = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/ConsumerPartitionMetadata.php b/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/ConsumerPartitionMetadata.php new file mode 100644 index 000000000000..c51b38cc407a --- /dev/null +++ b/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/ConsumerPartitionMetadata.php @@ -0,0 +1,109 @@ +google.cloud.managedkafka.v1.ConsumerPartitionMetadata + */ +class ConsumerPartitionMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The current offset for this partition, or 0 if no offset has been + * committed. + * + * Generated from protobuf field int64 offset = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $offset = 0; + /** + * Optional. The associated metadata for this partition, or empty if it does + * not exist. + * + * Generated from protobuf field string metadata = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $metadata = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $offset + * Required. The current offset for this partition, or 0 if no offset has been + * committed. + * @type string $metadata + * Optional. The associated metadata for this partition, or empty if it does + * not exist. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Managedkafka\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Required. The current offset for this partition, or 0 if no offset has been + * committed. + * + * Generated from protobuf field int64 offset = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return int|string + */ + public function getOffset() + { + return $this->offset; + } + + /** + * Required. The current offset for this partition, or 0 if no offset has been + * committed. + * + * Generated from protobuf field int64 offset = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param int|string $var + * @return $this + */ + public function setOffset($var) + { + GPBUtil::checkInt64($var); + $this->offset = $var; + + return $this; + } + + /** + * Optional. The associated metadata for this partition, or empty if it does + * not exist. + * + * Generated from protobuf field string metadata = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getMetadata() + { + return $this->metadata; + } + + /** + * Optional. The associated metadata for this partition, or empty if it does + * not exist. + * + * Generated from protobuf field string metadata = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setMetadata($var) + { + GPBUtil::checkString($var, True); + $this->metadata = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/ConsumerTopicMetadata.php b/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/ConsumerTopicMetadata.php new file mode 100644 index 000000000000..1bae3f307e4f --- /dev/null +++ b/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/ConsumerTopicMetadata.php @@ -0,0 +1,71 @@ +google.cloud.managedkafka.v1.ConsumerTopicMetadata + */ +class ConsumerTopicMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Metadata for this consumer group and topic for all partition + * indexes it has metadata for. + * + * Generated from protobuf field map partitions = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $partitions; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\MapField $partitions + * Optional. Metadata for this consumer group and topic for all partition + * indexes it has metadata for. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Managedkafka\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Metadata for this consumer group and topic for all partition + * indexes it has metadata for. + * + * Generated from protobuf field map partitions = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getPartitions() + { + return $this->partitions; + } + + /** + * Optional. Metadata for this consumer group and topic for all partition + * indexes it has metadata for. + * + * Generated from protobuf field map partitions = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setPartitions($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::INT32, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ManagedKafka\V1\ConsumerPartitionMetadata::class); + $this->partitions = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/CreateClusterRequest.php b/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/CreateClusterRequest.php new file mode 100644 index 000000000000..8271e3324f0e --- /dev/null +++ b/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/CreateClusterRequest.php @@ -0,0 +1,272 @@ +google.cloud.managedkafka.v1.CreateClusterRequest + */ +class CreateClusterRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent region in which to create the cluster. Structured like + * `projects/{project}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The ID to use for the cluster, which will become the final + * component of the cluster's name. The ID must be 1-63 characters long, and + * match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` to comply with + * RFC 1035. + * This value is structured like: `my-cluster-id`. + * + * Generated from protobuf field string cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $cluster_id = ''; + /** + * Required. Configuration of the cluster to create. Its `name` field is + * ignored. + * + * Generated from protobuf field .google.cloud.managedkafka.v1.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $cluster = null; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID to avoid duplication of requests. If a request times out or + * fails, retrying with the same ID allows the server to recognize the + * previous attempt. For at least 60 minutes, the server ignores duplicate + * requests bearing the same ID. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID + * within 60 minutes of the last request, the server checks if an original + * operation with the same request ID was received. If so, the server ignores + * the second request. + * The request ID must be a valid UUID. A zero UUID is not supported + * (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param string $parent Required. The parent region in which to create the cluster. Structured like + * `projects/{project}/locations/{location}`. Please see + * {@see ManagedKafkaClient::locationName()} for help formatting this field. + * @param \Google\Cloud\ManagedKafka\V1\Cluster $cluster Required. Configuration of the cluster to create. Its `name` field is + * ignored. + * @param string $clusterId Required. The ID to use for the cluster, which will become the final + * component of the cluster's name. The ID must be 1-63 characters long, and + * match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` to comply with + * RFC 1035. + * + * This value is structured like: `my-cluster-id`. + * + * @return \Google\Cloud\ManagedKafka\V1\CreateClusterRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\ManagedKafka\V1\Cluster $cluster, string $clusterId): self + { + return (new self()) + ->setParent($parent) + ->setCluster($cluster) + ->setClusterId($clusterId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent region in which to create the cluster. Structured like + * `projects/{project}/locations/{location}`. + * @type string $cluster_id + * Required. The ID to use for the cluster, which will become the final + * component of the cluster's name. The ID must be 1-63 characters long, and + * match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` to comply with + * RFC 1035. + * This value is structured like: `my-cluster-id`. + * @type \Google\Cloud\ManagedKafka\V1\Cluster $cluster + * Required. Configuration of the cluster to create. Its `name` field is + * ignored. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID to avoid duplication of requests. If a request times out or + * fails, retrying with the same ID allows the server to recognize the + * previous attempt. For at least 60 minutes, the server ignores duplicate + * requests bearing the same ID. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID + * within 60 minutes of the last request, the server checks if an original + * operation with the same request ID was received. If so, the server ignores + * the second request. + * The request ID must be a valid UUID. A zero UUID is not supported + * (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Managedkafka\V1\ManagedKafka::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent region in which to create the cluster. Structured like + * `projects/{project}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent region in which to create the cluster. Structured like + * `projects/{project}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The ID to use for the cluster, which will become the final + * component of the cluster's name. The ID must be 1-63 characters long, and + * match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` to comply with + * RFC 1035. + * This value is structured like: `my-cluster-id`. + * + * Generated from protobuf field string cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getClusterId() + { + return $this->cluster_id; + } + + /** + * Required. The ID to use for the cluster, which will become the final + * component of the cluster's name. The ID must be 1-63 characters long, and + * match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` to comply with + * RFC 1035. + * This value is structured like: `my-cluster-id`. + * + * Generated from protobuf field string cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setClusterId($var) + { + GPBUtil::checkString($var, True); + $this->cluster_id = $var; + + return $this; + } + + /** + * Required. Configuration of the cluster to create. Its `name` field is + * ignored. + * + * Generated from protobuf field .google.cloud.managedkafka.v1.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\ManagedKafka\V1\Cluster|null + */ + public function getCluster() + { + return $this->cluster; + } + + public function hasCluster() + { + return isset($this->cluster); + } + + public function clearCluster() + { + unset($this->cluster); + } + + /** + * Required. Configuration of the cluster to create. Its `name` field is + * ignored. + * + * Generated from protobuf field .google.cloud.managedkafka.v1.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\ManagedKafka\V1\Cluster $var + * @return $this + */ + public function setCluster($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ManagedKafka\V1\Cluster::class); + $this->cluster = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID to avoid duplication of requests. If a request times out or + * fails, retrying with the same ID allows the server to recognize the + * previous attempt. For at least 60 minutes, the server ignores duplicate + * requests bearing the same ID. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID + * within 60 minutes of the last request, the server checks if an original + * operation with the same request ID was received. If so, the server ignores + * the second request. + * The request ID must be a valid UUID. A zero UUID is not supported + * (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID to avoid duplication of requests. If a request times out or + * fails, retrying with the same ID allows the server to recognize the + * previous attempt. For at least 60 minutes, the server ignores duplicate + * requests bearing the same ID. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID + * within 60 minutes of the last request, the server checks if an original + * operation with the same request ID was received. If so, the server ignores + * the second request. + * The request ID must be a valid UUID. A zero UUID is not supported + * (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/CreateTopicRequest.php b/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/CreateTopicRequest.php new file mode 100644 index 000000000000..49797ac7e3d0 --- /dev/null +++ b/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/CreateTopicRequest.php @@ -0,0 +1,189 @@ +google.cloud.managedkafka.v1.CreateTopicRequest + */ +class CreateTopicRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent cluster in which to create the topic. + * Structured like + * `projects/{project}/locations/{location}/clusters/{cluster}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The ID to use for the topic, which will become the final + * component of the topic's name. + * This value is structured like: `my-topic-name`. + * + * Generated from protobuf field string topic_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $topic_id = ''; + /** + * Required. Configuration of the topic to create. Its `name` field is + * ignored. + * + * Generated from protobuf field .google.cloud.managedkafka.v1.Topic topic = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $topic = null; + + /** + * @param string $parent Required. The parent cluster in which to create the topic. + * Structured like + * `projects/{project}/locations/{location}/clusters/{cluster}`. Please see + * {@see ManagedKafkaClient::clusterName()} for help formatting this field. + * @param \Google\Cloud\ManagedKafka\V1\Topic $topic Required. Configuration of the topic to create. Its `name` field is + * ignored. + * @param string $topicId Required. The ID to use for the topic, which will become the final + * component of the topic's name. + * + * This value is structured like: `my-topic-name`. + * + * @return \Google\Cloud\ManagedKafka\V1\CreateTopicRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\ManagedKafka\V1\Topic $topic, string $topicId): self + { + return (new self()) + ->setParent($parent) + ->setTopic($topic) + ->setTopicId($topicId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent cluster in which to create the topic. + * Structured like + * `projects/{project}/locations/{location}/clusters/{cluster}`. + * @type string $topic_id + * Required. The ID to use for the topic, which will become the final + * component of the topic's name. + * This value is structured like: `my-topic-name`. + * @type \Google\Cloud\ManagedKafka\V1\Topic $topic + * Required. Configuration of the topic to create. Its `name` field is + * ignored. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Managedkafka\V1\ManagedKafka::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent cluster in which to create the topic. + * Structured like + * `projects/{project}/locations/{location}/clusters/{cluster}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent cluster in which to create the topic. + * Structured like + * `projects/{project}/locations/{location}/clusters/{cluster}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The ID to use for the topic, which will become the final + * component of the topic's name. + * This value is structured like: `my-topic-name`. + * + * Generated from protobuf field string topic_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getTopicId() + { + return $this->topic_id; + } + + /** + * Required. The ID to use for the topic, which will become the final + * component of the topic's name. + * This value is structured like: `my-topic-name`. + * + * Generated from protobuf field string topic_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setTopicId($var) + { + GPBUtil::checkString($var, True); + $this->topic_id = $var; + + return $this; + } + + /** + * Required. Configuration of the topic to create. Its `name` field is + * ignored. + * + * Generated from protobuf field .google.cloud.managedkafka.v1.Topic topic = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\ManagedKafka\V1\Topic|null + */ + public function getTopic() + { + return $this->topic; + } + + public function hasTopic() + { + return isset($this->topic); + } + + public function clearTopic() + { + unset($this->topic); + } + + /** + * Required. Configuration of the topic to create. Its `name` field is + * ignored. + * + * Generated from protobuf field .google.cloud.managedkafka.v1.Topic topic = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\ManagedKafka\V1\Topic $var + * @return $this + */ + public function setTopic($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ManagedKafka\V1\Topic::class); + $this->topic = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/DeleteClusterRequest.php b/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/DeleteClusterRequest.php new file mode 100644 index 000000000000..d01b80718e76 --- /dev/null +++ b/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/DeleteClusterRequest.php @@ -0,0 +1,159 @@ +google.cloud.managedkafka.v1.DeleteClusterRequest + */ +class DeleteClusterRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the cluster to delete. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID to avoid duplication of requests. If a request times out or + * fails, retrying with the same ID allows the server to recognize the + * previous attempt. For at least 60 minutes, the server ignores duplicate + * requests bearing the same ID. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID + * within 60 minutes of the last request, the server checks if an original + * operation with the same request ID was received. If so, the server ignores + * the second request. + * The request ID must be a valid UUID. A zero UUID is not supported + * (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param string $name Required. The name of the cluster to delete. Please see + * {@see ManagedKafkaClient::clusterName()} for help formatting this field. + * + * @return \Google\Cloud\ManagedKafka\V1\DeleteClusterRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the cluster to delete. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID to avoid duplication of requests. If a request times out or + * fails, retrying with the same ID allows the server to recognize the + * previous attempt. For at least 60 minutes, the server ignores duplicate + * requests bearing the same ID. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID + * within 60 minutes of the last request, the server checks if an original + * operation with the same request ID was received. If so, the server ignores + * the second request. + * The request ID must be a valid UUID. A zero UUID is not supported + * (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Managedkafka\V1\ManagedKafka::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the cluster to delete. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the cluster to delete. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID to avoid duplication of requests. If a request times out or + * fails, retrying with the same ID allows the server to recognize the + * previous attempt. For at least 60 minutes, the server ignores duplicate + * requests bearing the same ID. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID + * within 60 minutes of the last request, the server checks if an original + * operation with the same request ID was received. If so, the server ignores + * the second request. + * The request ID must be a valid UUID. A zero UUID is not supported + * (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID to avoid duplication of requests. If a request times out or + * fails, retrying with the same ID allows the server to recognize the + * previous attempt. For at least 60 minutes, the server ignores duplicate + * requests bearing the same ID. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID + * within 60 minutes of the last request, the server checks if an original + * operation with the same request ID was received. If so, the server ignores + * the second request. + * The request ID must be a valid UUID. A zero UUID is not supported + * (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/DeleteConsumerGroupRequest.php b/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/DeleteConsumerGroupRequest.php new file mode 100644 index 000000000000..fec2b3a08134 --- /dev/null +++ b/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/DeleteConsumerGroupRequest.php @@ -0,0 +1,86 @@ +google.cloud.managedkafka.v1.DeleteConsumerGroupRequest + */ +class DeleteConsumerGroupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the consumer group to delete. + * `projects/{project}/locations/{location}/clusters/{cluster}/consumerGroups/{consumerGroup}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the consumer group to delete. + * `projects/{project}/locations/{location}/clusters/{cluster}/consumerGroups/{consumerGroup}`. Please see + * {@see ManagedKafkaClient::consumerGroupName()} for help formatting this field. + * + * @return \Google\Cloud\ManagedKafka\V1\DeleteConsumerGroupRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the consumer group to delete. + * `projects/{project}/locations/{location}/clusters/{cluster}/consumerGroups/{consumerGroup}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Managedkafka\V1\ManagedKafka::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the consumer group to delete. + * `projects/{project}/locations/{location}/clusters/{cluster}/consumerGroups/{consumerGroup}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the consumer group to delete. + * `projects/{project}/locations/{location}/clusters/{cluster}/consumerGroups/{consumerGroup}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/DeleteTopicRequest.php b/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/DeleteTopicRequest.php new file mode 100644 index 000000000000..c8f0b94a2ee5 --- /dev/null +++ b/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/DeleteTopicRequest.php @@ -0,0 +1,86 @@ +google.cloud.managedkafka.v1.DeleteTopicRequest + */ +class DeleteTopicRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the topic to delete. + * `projects/{project}/locations/{location}/clusters/{cluster}/topics/{topic}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the topic to delete. + * `projects/{project}/locations/{location}/clusters/{cluster}/topics/{topic}`. Please see + * {@see ManagedKafkaClient::topicName()} for help formatting this field. + * + * @return \Google\Cloud\ManagedKafka\V1\DeleteTopicRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the topic to delete. + * `projects/{project}/locations/{location}/clusters/{cluster}/topics/{topic}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Managedkafka\V1\ManagedKafka::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the topic to delete. + * `projects/{project}/locations/{location}/clusters/{cluster}/topics/{topic}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the topic to delete. + * `projects/{project}/locations/{location}/clusters/{cluster}/topics/{topic}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/GcpConfig.php b/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/GcpConfig.php new file mode 100644 index 000000000000..e4bc8e0c167d --- /dev/null +++ b/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/GcpConfig.php @@ -0,0 +1,124 @@ +google.cloud.managedkafka.v1.GcpConfig + */ +class GcpConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Access configuration for the Kafka cluster. + * + * Generated from protobuf field .google.cloud.managedkafka.v1.AccessConfig access_config = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $access_config = null; + /** + * Optional. Immutable. The Cloud KMS Key name to use for encryption. The key + * must be located in the same region as the cluster and cannot be changed. + * Structured like: + * projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}. + * + * Generated from protobuf field string kms_key = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + */ + protected $kms_key = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\ManagedKafka\V1\AccessConfig $access_config + * Required. Access configuration for the Kafka cluster. + * @type string $kms_key + * Optional. Immutable. The Cloud KMS Key name to use for encryption. The key + * must be located in the same region as the cluster and cannot be changed. + * Structured like: + * projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Managedkafka\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Required. Access configuration for the Kafka cluster. + * + * Generated from protobuf field .google.cloud.managedkafka.v1.AccessConfig access_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\ManagedKafka\V1\AccessConfig|null + */ + public function getAccessConfig() + { + return $this->access_config; + } + + public function hasAccessConfig() + { + return isset($this->access_config); + } + + public function clearAccessConfig() + { + unset($this->access_config); + } + + /** + * Required. Access configuration for the Kafka cluster. + * + * Generated from protobuf field .google.cloud.managedkafka.v1.AccessConfig access_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\ManagedKafka\V1\AccessConfig $var + * @return $this + */ + public function setAccessConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ManagedKafka\V1\AccessConfig::class); + $this->access_config = $var; + + return $this; + } + + /** + * Optional. Immutable. The Cloud KMS Key name to use for encryption. The key + * must be located in the same region as the cluster and cannot be changed. + * Structured like: + * projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}. + * + * Generated from protobuf field string kms_key = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + * @return string + */ + public function getKmsKey() + { + return $this->kms_key; + } + + /** + * Optional. Immutable. The Cloud KMS Key name to use for encryption. The key + * must be located in the same region as the cluster and cannot be changed. + * Structured like: + * projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}. + * + * Generated from protobuf field string kms_key = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setKmsKey($var) + { + GPBUtil::checkString($var, True); + $this->kms_key = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/GetClusterRequest.php b/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/GetClusterRequest.php new file mode 100644 index 000000000000..a0aae7374680 --- /dev/null +++ b/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/GetClusterRequest.php @@ -0,0 +1,81 @@ +google.cloud.managedkafka.v1.GetClusterRequest + */ +class GetClusterRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the cluster whose configuration to return. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the cluster whose configuration to return. Please see + * {@see ManagedKafkaClient::clusterName()} for help formatting this field. + * + * @return \Google\Cloud\ManagedKafka\V1\GetClusterRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the cluster whose configuration to return. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Managedkafka\V1\ManagedKafka::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the cluster whose configuration to return. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the cluster whose configuration to return. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/GetConsumerGroupRequest.php b/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/GetConsumerGroupRequest.php new file mode 100644 index 000000000000..05104476d0a0 --- /dev/null +++ b/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/GetConsumerGroupRequest.php @@ -0,0 +1,86 @@ +google.cloud.managedkafka.v1.GetConsumerGroupRequest + */ +class GetConsumerGroupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the consumer group whose configuration to return. + * `projects/{project}/locations/{location}/clusters/{cluster}/consumerGroups/{consumerGroup}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the consumer group whose configuration to return. + * `projects/{project}/locations/{location}/clusters/{cluster}/consumerGroups/{consumerGroup}`. Please see + * {@see ManagedKafkaClient::consumerGroupName()} for help formatting this field. + * + * @return \Google\Cloud\ManagedKafka\V1\GetConsumerGroupRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the consumer group whose configuration to return. + * `projects/{project}/locations/{location}/clusters/{cluster}/consumerGroups/{consumerGroup}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Managedkafka\V1\ManagedKafka::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the consumer group whose configuration to return. + * `projects/{project}/locations/{location}/clusters/{cluster}/consumerGroups/{consumerGroup}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the consumer group whose configuration to return. + * `projects/{project}/locations/{location}/clusters/{cluster}/consumerGroups/{consumerGroup}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/GetTopicRequest.php b/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/GetTopicRequest.php new file mode 100644 index 000000000000..49f1ad997717 --- /dev/null +++ b/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/GetTopicRequest.php @@ -0,0 +1,91 @@ +google.cloud.managedkafka.v1.GetTopicRequest + */ +class GetTopicRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the topic whose configuration to return. Structured + * like: + * projects/{project}/locations/{location}/clusters/{cluster}/topics/{topic}. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the topic whose configuration to return. Structured + * like: + * projects/{project}/locations/{location}/clusters/{cluster}/topics/{topic}. Please see + * {@see ManagedKafkaClient::topicName()} for help formatting this field. + * + * @return \Google\Cloud\ManagedKafka\V1\GetTopicRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the topic whose configuration to return. Structured + * like: + * projects/{project}/locations/{location}/clusters/{cluster}/topics/{topic}. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Managedkafka\V1\ManagedKafka::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the topic whose configuration to return. Structured + * like: + * projects/{project}/locations/{location}/clusters/{cluster}/topics/{topic}. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the topic whose configuration to return. Structured + * like: + * projects/{project}/locations/{location}/clusters/{cluster}/topics/{topic}. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/ListClustersRequest.php b/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/ListClustersRequest.php new file mode 100644 index 000000000000..aa5222147449 --- /dev/null +++ b/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/ListClustersRequest.php @@ -0,0 +1,242 @@ +google.cloud.managedkafka.v1.ListClustersRequest + */ +class ListClustersRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent location whose clusters are to be listed. Structured + * like `projects/{project}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of clusters to return. The service may return + * fewer than this value. If unspecified, server will pick an appropriate + * default. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A page token, received from a previous `ListClusters` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListClusters` must match + * the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. Filter expression for the result. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. Order by fields for the result. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The parent location whose clusters are to be listed. Structured + * like `projects/{project}/locations/{location}`. Please see + * {@see ManagedKafkaClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\ManagedKafka\V1\ListClustersRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent location whose clusters are to be listed. Structured + * like `projects/{project}/locations/{location}`. + * @type int $page_size + * Optional. The maximum number of clusters to return. The service may return + * fewer than this value. If unspecified, server will pick an appropriate + * default. + * @type string $page_token + * Optional. A page token, received from a previous `ListClusters` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListClusters` must match + * the call that provided the page token. + * @type string $filter + * Optional. Filter expression for the result. + * @type string $order_by + * Optional. Order by fields for the result. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Managedkafka\V1\ManagedKafka::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent location whose clusters are to be listed. Structured + * like `projects/{project}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent location whose clusters are to be listed. Structured + * like `projects/{project}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The maximum number of clusters to return. The service may return + * fewer than this value. If unspecified, server will pick an appropriate + * default. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of clusters to return. The service may return + * fewer than this value. If unspecified, server will pick an appropriate + * default. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. A page token, received from a previous `ListClusters` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListClusters` must match + * the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A page token, received from a previous `ListClusters` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListClusters` must match + * the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. Filter expression for the result. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. Filter expression for the result. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Optional. Order by fields for the result. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. Order by fields for the result. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/ListClustersResponse.php b/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/ListClustersResponse.php new file mode 100644 index 000000000000..f02d1357fbc3 --- /dev/null +++ b/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/ListClustersResponse.php @@ -0,0 +1,139 @@ +google.cloud.managedkafka.v1.ListClustersResponse + */ +class ListClustersResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of Clusters in the requested parent. + * + * Generated from protobuf field repeated .google.cloud.managedkafka.v1.Cluster clusters = 1; + */ + private $clusters; + /** + * A token that can be sent as `page_token` to retrieve the next page of + * results. If this field is omitted, there are no more results. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\ManagedKafka\V1\Cluster>|\Google\Protobuf\Internal\RepeatedField $clusters + * The list of Clusters in the requested parent. + * @type string $next_page_token + * A token that can be sent as `page_token` to retrieve the next page of + * results. If this field is omitted, there are no more results. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Managedkafka\V1\ManagedKafka::initOnce(); + parent::__construct($data); + } + + /** + * The list of Clusters in the requested parent. + * + * Generated from protobuf field repeated .google.cloud.managedkafka.v1.Cluster clusters = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getClusters() + { + return $this->clusters; + } + + /** + * The list of Clusters in the requested parent. + * + * Generated from protobuf field repeated .google.cloud.managedkafka.v1.Cluster clusters = 1; + * @param array<\Google\Cloud\ManagedKafka\V1\Cluster>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setClusters($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ManagedKafka\V1\Cluster::class); + $this->clusters = $arr; + + return $this; + } + + /** + * A token that can be sent as `page_token` to retrieve the next page of + * results. If this field is omitted, there are no more results. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token that can be sent as `page_token` to retrieve the next page of + * results. If this field is omitted, there are no more results. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/ListConsumerGroupsRequest.php b/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/ListConsumerGroupsRequest.php new file mode 100644 index 000000000000..d201e3bc513c --- /dev/null +++ b/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/ListConsumerGroupsRequest.php @@ -0,0 +1,179 @@ +google.cloud.managedkafka.v1.ListConsumerGroupsRequest + */ +class ListConsumerGroupsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent cluster whose consumer groups are to be listed. + * Structured like + * `projects/{project}/locations/{location}/clusters/{cluster}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of consumer groups to return. The service may + * return fewer than this value. If unset or zero, all consumer groups for the + * parent is returned. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A page token, received from a previous `ListConsumerGroups` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListConsumerGroups` must + * match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The parent cluster whose consumer groups are to be listed. + * Structured like + * `projects/{project}/locations/{location}/clusters/{cluster}`. Please see + * {@see ManagedKafkaClient::clusterName()} for help formatting this field. + * + * @return \Google\Cloud\ManagedKafka\V1\ListConsumerGroupsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent cluster whose consumer groups are to be listed. + * Structured like + * `projects/{project}/locations/{location}/clusters/{cluster}`. + * @type int $page_size + * Optional. The maximum number of consumer groups to return. The service may + * return fewer than this value. If unset or zero, all consumer groups for the + * parent is returned. + * @type string $page_token + * Optional. A page token, received from a previous `ListConsumerGroups` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListConsumerGroups` must + * match the call that provided the page token. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Managedkafka\V1\ManagedKafka::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent cluster whose consumer groups are to be listed. + * Structured like + * `projects/{project}/locations/{location}/clusters/{cluster}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent cluster whose consumer groups are to be listed. + * Structured like + * `projects/{project}/locations/{location}/clusters/{cluster}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The maximum number of consumer groups to return. The service may + * return fewer than this value. If unset or zero, all consumer groups for the + * parent is returned. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of consumer groups to return. The service may + * return fewer than this value. If unset or zero, all consumer groups for the + * parent is returned. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. A page token, received from a previous `ListConsumerGroups` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListConsumerGroups` must + * match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A page token, received from a previous `ListConsumerGroups` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListConsumerGroups` must + * match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/ListConsumerGroupsResponse.php b/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/ListConsumerGroupsResponse.php new file mode 100644 index 000000000000..abcaff0766b1 --- /dev/null +++ b/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/ListConsumerGroupsResponse.php @@ -0,0 +1,109 @@ +google.cloud.managedkafka.v1.ListConsumerGroupsResponse + */ +class ListConsumerGroupsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of consumer group in the requested parent. The order of the + * consumer groups is unspecified. + * + * Generated from protobuf field repeated .google.cloud.managedkafka.v1.ConsumerGroup consumer_groups = 1; + */ + private $consumer_groups; + /** + * A token that can be sent as `page_token` to retrieve the next page of + * results. If this field is omitted, there are no more results. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\ManagedKafka\V1\ConsumerGroup>|\Google\Protobuf\Internal\RepeatedField $consumer_groups + * The list of consumer group in the requested parent. The order of the + * consumer groups is unspecified. + * @type string $next_page_token + * A token that can be sent as `page_token` to retrieve the next page of + * results. If this field is omitted, there are no more results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Managedkafka\V1\ManagedKafka::initOnce(); + parent::__construct($data); + } + + /** + * The list of consumer group in the requested parent. The order of the + * consumer groups is unspecified. + * + * Generated from protobuf field repeated .google.cloud.managedkafka.v1.ConsumerGroup consumer_groups = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getConsumerGroups() + { + return $this->consumer_groups; + } + + /** + * The list of consumer group in the requested parent. The order of the + * consumer groups is unspecified. + * + * Generated from protobuf field repeated .google.cloud.managedkafka.v1.ConsumerGroup consumer_groups = 1; + * @param array<\Google\Cloud\ManagedKafka\V1\ConsumerGroup>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setConsumerGroups($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ManagedKafka\V1\ConsumerGroup::class); + $this->consumer_groups = $arr; + + return $this; + } + + /** + * A token that can be sent as `page_token` to retrieve the next page of + * results. If this field is omitted, there are no more results. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token that can be sent as `page_token` to retrieve the next page of + * results. If this field is omitted, there are no more results. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/ListTopicsRequest.php b/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/ListTopicsRequest.php new file mode 100644 index 000000000000..cae01297e741 --- /dev/null +++ b/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/ListTopicsRequest.php @@ -0,0 +1,174 @@ +google.cloud.managedkafka.v1.ListTopicsRequest + */ +class ListTopicsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent cluster whose topics are to be listed. Structured like + * `projects/{project}/locations/{location}/clusters/{cluster}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of topics to return. The service may return + * fewer than this value. If unset or zero, all topics for the parent is + * returned. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A page token, received from a previous `ListTopics` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListTopics` must match + * the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The parent cluster whose topics are to be listed. Structured like + * `projects/{project}/locations/{location}/clusters/{cluster}`. Please see + * {@see ManagedKafkaClient::clusterName()} for help formatting this field. + * + * @return \Google\Cloud\ManagedKafka\V1\ListTopicsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent cluster whose topics are to be listed. Structured like + * `projects/{project}/locations/{location}/clusters/{cluster}`. + * @type int $page_size + * Optional. The maximum number of topics to return. The service may return + * fewer than this value. If unset or zero, all topics for the parent is + * returned. + * @type string $page_token + * Optional. A page token, received from a previous `ListTopics` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListTopics` must match + * the call that provided the page token. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Managedkafka\V1\ManagedKafka::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent cluster whose topics are to be listed. Structured like + * `projects/{project}/locations/{location}/clusters/{cluster}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent cluster whose topics are to be listed. Structured like + * `projects/{project}/locations/{location}/clusters/{cluster}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The maximum number of topics to return. The service may return + * fewer than this value. If unset or zero, all topics for the parent is + * returned. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of topics to return. The service may return + * fewer than this value. If unset or zero, all topics for the parent is + * returned. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. A page token, received from a previous `ListTopics` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListTopics` must match + * the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A page token, received from a previous `ListTopics` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListTopics` must match + * the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/ListTopicsResponse.php b/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/ListTopicsResponse.php new file mode 100644 index 000000000000..c9437db1809b --- /dev/null +++ b/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/ListTopicsResponse.php @@ -0,0 +1,109 @@ +google.cloud.managedkafka.v1.ListTopicsResponse + */ +class ListTopicsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of topics in the requested parent. The order of the topics is + * unspecified. + * + * Generated from protobuf field repeated .google.cloud.managedkafka.v1.Topic topics = 1; + */ + private $topics; + /** + * A token that can be sent as `page_token` to retrieve the next page of + * results. If this field is omitted, there are no more results. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\ManagedKafka\V1\Topic>|\Google\Protobuf\Internal\RepeatedField $topics + * The list of topics in the requested parent. The order of the topics is + * unspecified. + * @type string $next_page_token + * A token that can be sent as `page_token` to retrieve the next page of + * results. If this field is omitted, there are no more results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Managedkafka\V1\ManagedKafka::initOnce(); + parent::__construct($data); + } + + /** + * The list of topics in the requested parent. The order of the topics is + * unspecified. + * + * Generated from protobuf field repeated .google.cloud.managedkafka.v1.Topic topics = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTopics() + { + return $this->topics; + } + + /** + * The list of topics in the requested parent. The order of the topics is + * unspecified. + * + * Generated from protobuf field repeated .google.cloud.managedkafka.v1.Topic topics = 1; + * @param array<\Google\Cloud\ManagedKafka\V1\Topic>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTopics($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ManagedKafka\V1\Topic::class); + $this->topics = $arr; + + return $this; + } + + /** + * A token that can be sent as `page_token` to retrieve the next page of + * results. If this field is omitted, there are no more results. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token that can be sent as `page_token` to retrieve the next page of + * results. If this field is omitted, there are no more results. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/NetworkConfig.php b/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/NetworkConfig.php new file mode 100644 index 000000000000..c0efa7fdf8ad --- /dev/null +++ b/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/NetworkConfig.php @@ -0,0 +1,96 @@ +google.cloud.managedkafka.v1.NetworkConfig + */ +class NetworkConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the VPC subnet in which to create Private Service Connect + * (PSC) endpoints for the Kafka brokers and bootstrap address. Structured + * like: projects/{project}/regions/{region}/subnetworks/{subnet_id} + * The subnet must be located in the same region as the Kafka cluster. The + * project may differ. Multiple subnets from the same parent network must not + * be specified. + * The CIDR range of the subnet must be within the IPv4 address ranges for + * private networks, as specified in RFC 1918. + * + * Generated from protobuf field string subnet = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $subnet = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $subnet + * Required. Name of the VPC subnet in which to create Private Service Connect + * (PSC) endpoints for the Kafka brokers and bootstrap address. Structured + * like: projects/{project}/regions/{region}/subnetworks/{subnet_id} + * The subnet must be located in the same region as the Kafka cluster. The + * project may differ. Multiple subnets from the same parent network must not + * be specified. + * The CIDR range of the subnet must be within the IPv4 address ranges for + * private networks, as specified in RFC 1918. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Managedkafka\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the VPC subnet in which to create Private Service Connect + * (PSC) endpoints for the Kafka brokers and bootstrap address. Structured + * like: projects/{project}/regions/{region}/subnetworks/{subnet_id} + * The subnet must be located in the same region as the Kafka cluster. The + * project may differ. Multiple subnets from the same parent network must not + * be specified. + * The CIDR range of the subnet must be within the IPv4 address ranges for + * private networks, as specified in RFC 1918. + * + * Generated from protobuf field string subnet = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getSubnet() + { + return $this->subnet; + } + + /** + * Required. Name of the VPC subnet in which to create Private Service Connect + * (PSC) endpoints for the Kafka brokers and bootstrap address. Structured + * like: projects/{project}/regions/{region}/subnetworks/{subnet_id} + * The subnet must be located in the same region as the Kafka cluster. The + * project may differ. Multiple subnets from the same parent network must not + * be specified. + * The CIDR range of the subnet must be within the IPv4 address ranges for + * private networks, as specified in RFC 1918. + * + * Generated from protobuf field string subnet = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setSubnet($var) + { + GPBUtil::checkString($var, True); + $this->subnet = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/OperationMetadata.php b/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/OperationMetadata.php new file mode 100644 index 000000000000..ebfd69902bdd --- /dev/null +++ b/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/OperationMetadata.php @@ -0,0 +1,307 @@ +google.cloud.managedkafka.v1.OperationMetadata + */ +class OperationMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $end_time = null; + /** + * Output only. Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $target = ''; + /** + * Output only. Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $verb = ''; + /** + * Output only. Human-readable status of the operation, if any. + * + * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $status_message = ''; + /** + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have been cancelled successfully + * have [Operation.error][] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`. + * + * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $requested_cancellation = false; + /** + * Output only. API version used to start the operation. + * + * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $api_version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time the operation was created. + * @type \Google\Protobuf\Timestamp $end_time + * Output only. The time the operation finished running. + * @type string $target + * Output only. Server-defined resource path for the target of the operation. + * @type string $verb + * Output only. Name of the verb executed by the operation. + * @type string $status_message + * Output only. Human-readable status of the operation, if any. + * @type bool $requested_cancellation + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have been cancelled successfully + * have [Operation.error][] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`. + * @type string $api_version + * Output only. API version used to start the operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Managedkafka\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEndTime() + { + return $this->end_time; + } + + public function hasEndTime() + { + return isset($this->end_time); + } + + public function clearEndTime() + { + unset($this->end_time); + } + + /** + * Output only. The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * Output only. Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getTarget() + { + return $this->target; + } + + /** + * Output only. Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setTarget($var) + { + GPBUtil::checkString($var, True); + $this->target = $var; + + return $this; + } + + /** + * Output only. Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getVerb() + { + return $this->verb; + } + + /** + * Output only. Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setVerb($var) + { + GPBUtil::checkString($var, True); + $this->verb = $var; + + return $this; + } + + /** + * Output only. Human-readable status of the operation, if any. + * + * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getStatusMessage() + { + return $this->status_message; + } + + /** + * Output only. Human-readable status of the operation, if any. + * + * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setStatusMessage($var) + { + GPBUtil::checkString($var, True); + $this->status_message = $var; + + return $this; + } + + /** + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have been cancelled successfully + * have [Operation.error][] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`. + * + * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getRequestedCancellation() + { + return $this->requested_cancellation; + } + + /** + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have been cancelled successfully + * have [Operation.error][] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`. + * + * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setRequestedCancellation($var) + { + GPBUtil::checkBool($var); + $this->requested_cancellation = $var; + + return $this; + } + + /** + * Output only. API version used to start the operation. + * + * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getApiVersion() + { + return $this->api_version; + } + + /** + * Output only. API version used to start the operation. + * + * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setApiVersion($var) + { + GPBUtil::checkString($var, True); + $this->api_version = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/RebalanceConfig.php b/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/RebalanceConfig.php new file mode 100644 index 000000000000..b13164db93f7 --- /dev/null +++ b/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/RebalanceConfig.php @@ -0,0 +1,71 @@ +google.cloud.managedkafka.v1.RebalanceConfig + */ +class RebalanceConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The rebalance behavior for the cluster. + * When not specified, defaults to `NO_REBALANCE`. + * + * Generated from protobuf field .google.cloud.managedkafka.v1.RebalanceConfig.Mode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $mode = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $mode + * Optional. The rebalance behavior for the cluster. + * When not specified, defaults to `NO_REBALANCE`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Managedkafka\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The rebalance behavior for the cluster. + * When not specified, defaults to `NO_REBALANCE`. + * + * Generated from protobuf field .google.cloud.managedkafka.v1.RebalanceConfig.Mode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getMode() + { + return $this->mode; + } + + /** + * Optional. The rebalance behavior for the cluster. + * When not specified, defaults to `NO_REBALANCE`. + * + * Generated from protobuf field .google.cloud.managedkafka.v1.RebalanceConfig.Mode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\ManagedKafka\V1\RebalanceConfig\Mode::class); + $this->mode = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/RebalanceConfig/Mode.php b/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/RebalanceConfig/Mode.php new file mode 100644 index 000000000000..d2c73ce51672 --- /dev/null +++ b/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/RebalanceConfig/Mode.php @@ -0,0 +1,65 @@ +google.cloud.managedkafka.v1.RebalanceConfig.Mode + */ +class Mode +{ + /** + * A mode was not specified. Do not use. + * + * Generated from protobuf enum MODE_UNSPECIFIED = 0; + */ + const MODE_UNSPECIFIED = 0; + /** + * Do not rebalance automatically. + * + * Generated from protobuf enum NO_REBALANCE = 1; + */ + const NO_REBALANCE = 1; + /** + * Automatically rebalance topic partitions among brokers when the + * cluster is scaled up. + * + * Generated from protobuf enum AUTO_REBALANCE_ON_SCALE_UP = 2; + */ + const AUTO_REBALANCE_ON_SCALE_UP = 2; + + private static $valueToName = [ + self::MODE_UNSPECIFIED => 'MODE_UNSPECIFIED', + self::NO_REBALANCE => 'NO_REBALANCE', + self::AUTO_REBALANCE_ON_SCALE_UP => 'AUTO_REBALANCE_ON_SCALE_UP', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Mode::class, \Google\Cloud\ManagedKafka\V1\RebalanceConfig_Mode::class); + diff --git a/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/Topic.php b/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/Topic.php new file mode 100644 index 000000000000..da04d6f0f968 --- /dev/null +++ b/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/Topic.php @@ -0,0 +1,201 @@ +google.cloud.managedkafka.v1.Topic + */ +class Topic extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The name of the topic. The `topic` segment is used when + * connecting directly to the cluster. Structured like: + * projects/{project}/locations/{location}/clusters/{cluster}/topics/{topic} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Required. The number of partitions this topic has. The partition count can + * only be increased, not decreased. Please note that if partitions are + * increased for a topic that has a key, the partitioning logic or the + * ordering of the messages will be affected. + * + * Generated from protobuf field int32 partition_count = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $partition_count = 0; + /** + * Required. Immutable. The number of replicas of each partition. A + * replication factor of 3 is recommended for high availability. + * + * Generated from protobuf field int32 replication_factor = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + */ + protected $replication_factor = 0; + /** + * Optional. Configurations for the topic that are overridden from the cluster + * defaults. The key of the map is a Kafka topic property name, for example: + * `cleanup.policy`, `compression.type`. + * + * Generated from protobuf field map configs = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $configs; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The name of the topic. The `topic` segment is used when + * connecting directly to the cluster. Structured like: + * projects/{project}/locations/{location}/clusters/{cluster}/topics/{topic} + * @type int $partition_count + * Required. The number of partitions this topic has. The partition count can + * only be increased, not decreased. Please note that if partitions are + * increased for a topic that has a key, the partitioning logic or the + * ordering of the messages will be affected. + * @type int $replication_factor + * Required. Immutable. The number of replicas of each partition. A + * replication factor of 3 is recommended for high availability. + * @type array|\Google\Protobuf\Internal\MapField $configs + * Optional. Configurations for the topic that are overridden from the cluster + * defaults. The key of the map is a Kafka topic property name, for example: + * `cleanup.policy`, `compression.type`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Managedkafka\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The name of the topic. The `topic` segment is used when + * connecting directly to the cluster. Structured like: + * projects/{project}/locations/{location}/clusters/{cluster}/topics/{topic} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The name of the topic. The `topic` segment is used when + * connecting directly to the cluster. Structured like: + * projects/{project}/locations/{location}/clusters/{cluster}/topics/{topic} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. The number of partitions this topic has. The partition count can + * only be increased, not decreased. Please note that if partitions are + * increased for a topic that has a key, the partitioning logic or the + * ordering of the messages will be affected. + * + * Generated from protobuf field int32 partition_count = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getPartitionCount() + { + return $this->partition_count; + } + + /** + * Required. The number of partitions this topic has. The partition count can + * only be increased, not decreased. Please note that if partitions are + * increased for a topic that has a key, the partitioning logic or the + * ordering of the messages will be affected. + * + * Generated from protobuf field int32 partition_count = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setPartitionCount($var) + { + GPBUtil::checkInt32($var); + $this->partition_count = $var; + + return $this; + } + + /** + * Required. Immutable. The number of replicas of each partition. A + * replication factor of 3 is recommended for high availability. + * + * Generated from protobuf field int32 replication_factor = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * @return int + */ + public function getReplicationFactor() + { + return $this->replication_factor; + } + + /** + * Required. Immutable. The number of replicas of each partition. A + * replication factor of 3 is recommended for high availability. + * + * Generated from protobuf field int32 replication_factor = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * @param int $var + * @return $this + */ + public function setReplicationFactor($var) + { + GPBUtil::checkInt32($var); + $this->replication_factor = $var; + + return $this; + } + + /** + * Optional. Configurations for the topic that are overridden from the cluster + * defaults. The key of the map is a Kafka topic property name, for example: + * `cleanup.policy`, `compression.type`. + * + * Generated from protobuf field map configs = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getConfigs() + { + return $this->configs; + } + + /** + * Optional. Configurations for the topic that are overridden from the cluster + * defaults. The key of the map is a Kafka topic property name, for example: + * `cleanup.policy`, `compression.type`. + * + * Generated from protobuf field map configs = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setConfigs($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->configs = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/UpdateClusterRequest.php b/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/UpdateClusterRequest.php new file mode 100644 index 000000000000..93b64c314b65 --- /dev/null +++ b/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/UpdateClusterRequest.php @@ -0,0 +1,234 @@ +google.cloud.managedkafka.v1.UpdateClusterRequest + */ +class UpdateClusterRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * cluster resource by the update. The fields specified in the update_mask are + * relative to the resource, not the full request. A field will be overwritten + * if it is in the mask. The mask is required and a value of * will update all + * fields. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + /** + * Required. The cluster to update. Its `name` field must be populated. + * + * Generated from protobuf field .google.cloud.managedkafka.v1.Cluster cluster = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $cluster = null; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID to avoid duplication of requests. If a request times out or + * fails, retrying with the same ID allows the server to recognize the + * previous attempt. For at least 60 minutes, the server ignores duplicate + * requests bearing the same ID. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID + * within 60 minutes of the last request, the server checks if an original + * operation with the same request ID was received. If so, the server ignores + * the second request. + * The request ID must be a valid UUID. A zero UUID is not supported + * (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param \Google\Cloud\ManagedKafka\V1\Cluster $cluster Required. The cluster to update. Its `name` field must be populated. + * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the + * cluster resource by the update. The fields specified in the update_mask are + * relative to the resource, not the full request. A field will be overwritten + * if it is in the mask. The mask is required and a value of * will update all + * fields. + * + * @return \Google\Cloud\ManagedKafka\V1\UpdateClusterRequest + * + * @experimental + */ + public static function build(\Google\Cloud\ManagedKafka\V1\Cluster $cluster, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setCluster($cluster) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Required. Field mask is used to specify the fields to be overwritten in the + * cluster resource by the update. The fields specified in the update_mask are + * relative to the resource, not the full request. A field will be overwritten + * if it is in the mask. The mask is required and a value of * will update all + * fields. + * @type \Google\Cloud\ManagedKafka\V1\Cluster $cluster + * Required. The cluster to update. Its `name` field must be populated. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID to avoid duplication of requests. If a request times out or + * fails, retrying with the same ID allows the server to recognize the + * previous attempt. For at least 60 minutes, the server ignores duplicate + * requests bearing the same ID. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID + * within 60 minutes of the last request, the server checks if an original + * operation with the same request ID was received. If so, the server ignores + * the second request. + * The request ID must be a valid UUID. A zero UUID is not supported + * (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Managedkafka\V1\ManagedKafka::initOnce(); + parent::__construct($data); + } + + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * cluster resource by the update. The fields specified in the update_mask are + * relative to the resource, not the full request. A field will be overwritten + * if it is in the mask. The mask is required and a value of * will update all + * fields. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * cluster resource by the update. The fields specified in the update_mask are + * relative to the resource, not the full request. A field will be overwritten + * if it is in the mask. The mask is required and a value of * will update all + * fields. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Required. The cluster to update. Its `name` field must be populated. + * + * Generated from protobuf field .google.cloud.managedkafka.v1.Cluster cluster = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\ManagedKafka\V1\Cluster|null + */ + public function getCluster() + { + return $this->cluster; + } + + public function hasCluster() + { + return isset($this->cluster); + } + + public function clearCluster() + { + unset($this->cluster); + } + + /** + * Required. The cluster to update. Its `name` field must be populated. + * + * Generated from protobuf field .google.cloud.managedkafka.v1.Cluster cluster = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\ManagedKafka\V1\Cluster $var + * @return $this + */ + public function setCluster($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ManagedKafka\V1\Cluster::class); + $this->cluster = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID to avoid duplication of requests. If a request times out or + * fails, retrying with the same ID allows the server to recognize the + * previous attempt. For at least 60 minutes, the server ignores duplicate + * requests bearing the same ID. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID + * within 60 minutes of the last request, the server checks if an original + * operation with the same request ID was received. If so, the server ignores + * the second request. + * The request ID must be a valid UUID. A zero UUID is not supported + * (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID to avoid duplication of requests. If a request times out or + * fails, retrying with the same ID allows the server to recognize the + * previous attempt. For at least 60 minutes, the server ignores duplicate + * requests bearing the same ID. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID + * within 60 minutes of the last request, the server checks if an original + * operation with the same request ID was received. If so, the server ignores + * the second request. + * The request ID must be a valid UUID. A zero UUID is not supported + * (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/UpdateConsumerGroupRequest.php b/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/UpdateConsumerGroupRequest.php new file mode 100644 index 000000000000..dcdd3471a832 --- /dev/null +++ b/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/UpdateConsumerGroupRequest.php @@ -0,0 +1,156 @@ +google.cloud.managedkafka.v1.UpdateConsumerGroupRequest + */ +class UpdateConsumerGroupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * ConsumerGroup resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. The + * mask is required and a value of * will update all fields. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + /** + * Required. The consumer group to update. Its `name` field must be populated. + * + * Generated from protobuf field .google.cloud.managedkafka.v1.ConsumerGroup consumer_group = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $consumer_group = null; + + /** + * @param \Google\Cloud\ManagedKafka\V1\ConsumerGroup $consumerGroup Required. The consumer group to update. Its `name` field must be populated. + * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the + * ConsumerGroup resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. The + * mask is required and a value of * will update all fields. + * + * @return \Google\Cloud\ManagedKafka\V1\UpdateConsumerGroupRequest + * + * @experimental + */ + public static function build(\Google\Cloud\ManagedKafka\V1\ConsumerGroup $consumerGroup, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setConsumerGroup($consumerGroup) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Required. Field mask is used to specify the fields to be overwritten in the + * ConsumerGroup resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. The + * mask is required and a value of * will update all fields. + * @type \Google\Cloud\ManagedKafka\V1\ConsumerGroup $consumer_group + * Required. The consumer group to update. Its `name` field must be populated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Managedkafka\V1\ManagedKafka::initOnce(); + parent::__construct($data); + } + + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * ConsumerGroup resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. The + * mask is required and a value of * will update all fields. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * ConsumerGroup resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. The + * mask is required and a value of * will update all fields. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Required. The consumer group to update. Its `name` field must be populated. + * + * Generated from protobuf field .google.cloud.managedkafka.v1.ConsumerGroup consumer_group = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\ManagedKafka\V1\ConsumerGroup|null + */ + public function getConsumerGroup() + { + return $this->consumer_group; + } + + public function hasConsumerGroup() + { + return isset($this->consumer_group); + } + + public function clearConsumerGroup() + { + unset($this->consumer_group); + } + + /** + * Required. The consumer group to update. Its `name` field must be populated. + * + * Generated from protobuf field .google.cloud.managedkafka.v1.ConsumerGroup consumer_group = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\ManagedKafka\V1\ConsumerGroup $var + * @return $this + */ + public function setConsumerGroup($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ManagedKafka\V1\ConsumerGroup::class); + $this->consumer_group = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/UpdateTopicRequest.php b/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/UpdateTopicRequest.php new file mode 100644 index 000000000000..3e2a1f8792eb --- /dev/null +++ b/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/UpdateTopicRequest.php @@ -0,0 +1,156 @@ +google.cloud.managedkafka.v1.UpdateTopicRequest + */ +class UpdateTopicRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * Topic resource by the update. The fields specified in the update_mask are + * relative to the resource, not the full request. A field will be overwritten + * if it is in the mask. The mask is required and a value of * will update all + * fields. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + /** + * Required. The topic to update. Its `name` field must be populated. + * + * Generated from protobuf field .google.cloud.managedkafka.v1.Topic topic = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $topic = null; + + /** + * @param \Google\Cloud\ManagedKafka\V1\Topic $topic Required. The topic to update. Its `name` field must be populated. + * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the + * Topic resource by the update. The fields specified in the update_mask are + * relative to the resource, not the full request. A field will be overwritten + * if it is in the mask. The mask is required and a value of * will update all + * fields. + * + * @return \Google\Cloud\ManagedKafka\V1\UpdateTopicRequest + * + * @experimental + */ + public static function build(\Google\Cloud\ManagedKafka\V1\Topic $topic, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setTopic($topic) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Required. Field mask is used to specify the fields to be overwritten in the + * Topic resource by the update. The fields specified in the update_mask are + * relative to the resource, not the full request. A field will be overwritten + * if it is in the mask. The mask is required and a value of * will update all + * fields. + * @type \Google\Cloud\ManagedKafka\V1\Topic $topic + * Required. The topic to update. Its `name` field must be populated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Managedkafka\V1\ManagedKafka::initOnce(); + parent::__construct($data); + } + + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * Topic resource by the update. The fields specified in the update_mask are + * relative to the resource, not the full request. A field will be overwritten + * if it is in the mask. The mask is required and a value of * will update all + * fields. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * Topic resource by the update. The fields specified in the update_mask are + * relative to the resource, not the full request. A field will be overwritten + * if it is in the mask. The mask is required and a value of * will update all + * fields. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Required. The topic to update. Its `name` field must be populated. + * + * Generated from protobuf field .google.cloud.managedkafka.v1.Topic topic = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\ManagedKafka\V1\Topic|null + */ + public function getTopic() + { + return $this->topic; + } + + public function hasTopic() + { + return isset($this->topic); + } + + public function clearTopic() + { + unset($this->topic); + } + + /** + * Required. The topic to update. Its `name` field must be populated. + * + * Generated from protobuf field .google.cloud.managedkafka.v1.Topic topic = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\ManagedKafka\V1\Topic $var + * @return $this + */ + public function setTopic($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ManagedKafka\V1\Topic::class); + $this->topic = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/create_cluster.php b/owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/create_cluster.php new file mode 100644 index 000000000000..2a7f3f1cc01a --- /dev/null +++ b/owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/create_cluster.php @@ -0,0 +1,138 @@ +setSubnet($clusterGcpConfigAccessConfigNetworkConfigsSubnet); + $clusterGcpConfigAccessConfigNetworkConfigs = [$networkConfig,]; + $clusterGcpConfigAccessConfig = (new AccessConfig()) + ->setNetworkConfigs($clusterGcpConfigAccessConfigNetworkConfigs); + $clusterGcpConfig = (new GcpConfig()) + ->setAccessConfig($clusterGcpConfigAccessConfig); + $clusterCapacityConfig = (new CapacityConfig()) + ->setVcpuCount($clusterCapacityConfigVcpuCount) + ->setMemoryBytes($clusterCapacityConfigMemoryBytes); + $cluster = (new Cluster()) + ->setGcpConfig($clusterGcpConfig) + ->setCapacityConfig($clusterCapacityConfig); + $request = (new CreateClusterRequest()) + ->setParent($formattedParent) + ->setClusterId($clusterId) + ->setCluster($cluster); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $managedKafkaClient->createCluster($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Cluster $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = ManagedKafkaClient::locationName('[PROJECT]', '[LOCATION]'); + $clusterId = '[CLUSTER_ID]'; + $clusterGcpConfigAccessConfigNetworkConfigsSubnet = '[SUBNET]'; + $clusterCapacityConfigVcpuCount = 0; + $clusterCapacityConfigMemoryBytes = 0; + + create_cluster_sample( + $formattedParent, + $clusterId, + $clusterGcpConfigAccessConfigNetworkConfigsSubnet, + $clusterCapacityConfigVcpuCount, + $clusterCapacityConfigMemoryBytes + ); +} +// [END managedkafka_v1_generated_ManagedKafka_CreateCluster_sync] diff --git a/owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/create_topic.php b/owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/create_topic.php new file mode 100644 index 000000000000..0cc45662eb29 --- /dev/null +++ b/owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/create_topic.php @@ -0,0 +1,95 @@ +setPartitionCount($topicPartitionCount) + ->setReplicationFactor($topicReplicationFactor); + $request = (new CreateTopicRequest()) + ->setParent($formattedParent) + ->setTopicId($topicId) + ->setTopic($topic); + + // Call the API and handle any network failures. + try { + /** @var Topic $response */ + $response = $managedKafkaClient->createTopic($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = ManagedKafkaClient::clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); + $topicId = '[TOPIC_ID]'; + $topicPartitionCount = 0; + $topicReplicationFactor = 0; + + create_topic_sample($formattedParent, $topicId, $topicPartitionCount, $topicReplicationFactor); +} +// [END managedkafka_v1_generated_ManagedKafka_CreateTopic_sync] diff --git a/owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/delete_cluster.php b/owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/delete_cluster.php new file mode 100644 index 000000000000..f028249f7cd8 --- /dev/null +++ b/owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/delete_cluster.php @@ -0,0 +1,80 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $managedKafkaClient->deleteCluster($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ManagedKafkaClient::clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); + + delete_cluster_sample($formattedName); +} +// [END managedkafka_v1_generated_ManagedKafka_DeleteCluster_sync] diff --git a/owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/delete_consumer_group.php b/owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/delete_consumer_group.php new file mode 100644 index 000000000000..d953c6d7c30e --- /dev/null +++ b/owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/delete_consumer_group.php @@ -0,0 +1,75 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $managedKafkaClient->deleteConsumerGroup($request); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ManagedKafkaClient::consumerGroupName( + '[PROJECT]', + '[LOCATION]', + '[CLUSTER]', + '[CONSUMER_GROUP]' + ); + + delete_consumer_group_sample($formattedName); +} +// [END managedkafka_v1_generated_ManagedKafka_DeleteConsumerGroup_sync] diff --git a/owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/delete_topic.php b/owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/delete_topic.php new file mode 100644 index 000000000000..f2e8ee9e3cbf --- /dev/null +++ b/owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/delete_topic.php @@ -0,0 +1,70 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $managedKafkaClient->deleteTopic($request); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ManagedKafkaClient::topicName('[PROJECT]', '[LOCATION]', '[CLUSTER]', '[TOPIC]'); + + delete_topic_sample($formattedName); +} +// [END managedkafka_v1_generated_ManagedKafka_DeleteTopic_sync] diff --git a/owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/get_cluster.php b/owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/get_cluster.php new file mode 100644 index 000000000000..5c3fc319d4f9 --- /dev/null +++ b/owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/get_cluster.php @@ -0,0 +1,71 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Cluster $response */ + $response = $managedKafkaClient->getCluster($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ManagedKafkaClient::clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); + + get_cluster_sample($formattedName); +} +// [END managedkafka_v1_generated_ManagedKafka_GetCluster_sync] diff --git a/owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/get_consumer_group.php b/owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/get_consumer_group.php new file mode 100644 index 000000000000..ebbfda931847 --- /dev/null +++ b/owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/get_consumer_group.php @@ -0,0 +1,77 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var ConsumerGroup $response */ + $response = $managedKafkaClient->getConsumerGroup($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ManagedKafkaClient::consumerGroupName( + '[PROJECT]', + '[LOCATION]', + '[CLUSTER]', + '[CONSUMER_GROUP]' + ); + + get_consumer_group_sample($formattedName); +} +// [END managedkafka_v1_generated_ManagedKafka_GetConsumerGroup_sync] diff --git a/owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/get_location.php b/owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/get_location.php new file mode 100644 index 000000000000..54ef42f76ae7 --- /dev/null +++ b/owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/get_location.php @@ -0,0 +1,57 @@ +getLocation($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END managedkafka_v1_generated_ManagedKafka_GetLocation_sync] diff --git a/owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/get_topic.php b/owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/get_topic.php new file mode 100644 index 000000000000..48c3f4d04e00 --- /dev/null +++ b/owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/get_topic.php @@ -0,0 +1,73 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Topic $response */ + $response = $managedKafkaClient->getTopic($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ManagedKafkaClient::topicName('[PROJECT]', '[LOCATION]', '[CLUSTER]', '[TOPIC]'); + + get_topic_sample($formattedName); +} +// [END managedkafka_v1_generated_ManagedKafka_GetTopic_sync] diff --git a/owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/list_clusters.php b/owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/list_clusters.php new file mode 100644 index 000000000000..0a4b0a051a9f --- /dev/null +++ b/owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/list_clusters.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $managedKafkaClient->listClusters($request); + + /** @var Cluster $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = ManagedKafkaClient::locationName('[PROJECT]', '[LOCATION]'); + + list_clusters_sample($formattedParent); +} +// [END managedkafka_v1_generated_ManagedKafka_ListClusters_sync] diff --git a/owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/list_consumer_groups.php b/owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/list_consumer_groups.php new file mode 100644 index 000000000000..7ab0b78142b1 --- /dev/null +++ b/owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/list_consumer_groups.php @@ -0,0 +1,78 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $managedKafkaClient->listConsumerGroups($request); + + /** @var ConsumerGroup $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = ManagedKafkaClient::clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); + + list_consumer_groups_sample($formattedParent); +} +// [END managedkafka_v1_generated_ManagedKafka_ListConsumerGroups_sync] diff --git a/owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/list_locations.php b/owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/list_locations.php new file mode 100644 index 000000000000..c7aec8b4850e --- /dev/null +++ b/owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/list_locations.php @@ -0,0 +1,62 @@ +listLocations($request); + + /** @var Location $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END managedkafka_v1_generated_ManagedKafka_ListLocations_sync] diff --git a/owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/list_topics.php b/owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/list_topics.php new file mode 100644 index 000000000000..90860be6b9db --- /dev/null +++ b/owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/list_topics.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $managedKafkaClient->listTopics($request); + + /** @var Topic $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = ManagedKafkaClient::clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); + + list_topics_sample($formattedParent); +} +// [END managedkafka_v1_generated_ManagedKafka_ListTopics_sync] diff --git a/owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/update_cluster.php b/owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/update_cluster.php new file mode 100644 index 000000000000..61e3c38aa419 --- /dev/null +++ b/owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/update_cluster.php @@ -0,0 +1,124 @@ +setSubnet($clusterGcpConfigAccessConfigNetworkConfigsSubnet); + $clusterGcpConfigAccessConfigNetworkConfigs = [$networkConfig,]; + $clusterGcpConfigAccessConfig = (new AccessConfig()) + ->setNetworkConfigs($clusterGcpConfigAccessConfigNetworkConfigs); + $clusterGcpConfig = (new GcpConfig()) + ->setAccessConfig($clusterGcpConfigAccessConfig); + $clusterCapacityConfig = (new CapacityConfig()) + ->setVcpuCount($clusterCapacityConfigVcpuCount) + ->setMemoryBytes($clusterCapacityConfigMemoryBytes); + $cluster = (new Cluster()) + ->setGcpConfig($clusterGcpConfig) + ->setCapacityConfig($clusterCapacityConfig); + $request = (new UpdateClusterRequest()) + ->setUpdateMask($updateMask) + ->setCluster($cluster); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $managedKafkaClient->updateCluster($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Cluster $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $clusterGcpConfigAccessConfigNetworkConfigsSubnet = '[SUBNET]'; + $clusterCapacityConfigVcpuCount = 0; + $clusterCapacityConfigMemoryBytes = 0; + + update_cluster_sample( + $clusterGcpConfigAccessConfigNetworkConfigsSubnet, + $clusterCapacityConfigVcpuCount, + $clusterCapacityConfigMemoryBytes + ); +} +// [END managedkafka_v1_generated_ManagedKafka_UpdateCluster_sync] diff --git a/owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/update_consumer_group.php b/owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/update_consumer_group.php new file mode 100644 index 000000000000..91b8e7b0091f --- /dev/null +++ b/owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/update_consumer_group.php @@ -0,0 +1,62 @@ +setUpdateMask($updateMask) + ->setConsumerGroup($consumerGroup); + + // Call the API and handle any network failures. + try { + /** @var ConsumerGroup $response */ + $response = $managedKafkaClient->updateConsumerGroup($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END managedkafka_v1_generated_ManagedKafka_UpdateConsumerGroup_sync] diff --git a/owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/update_topic.php b/owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/update_topic.php new file mode 100644 index 000000000000..cc41bac1056f --- /dev/null +++ b/owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/update_topic.php @@ -0,0 +1,82 @@ +setPartitionCount($topicPartitionCount) + ->setReplicationFactor($topicReplicationFactor); + $request = (new UpdateTopicRequest()) + ->setUpdateMask($updateMask) + ->setTopic($topic); + + // Call the API and handle any network failures. + try { + /** @var Topic $response */ + $response = $managedKafkaClient->updateTopic($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $topicPartitionCount = 0; + $topicReplicationFactor = 0; + + update_topic_sample($topicPartitionCount, $topicReplicationFactor); +} +// [END managedkafka_v1_generated_ManagedKafka_UpdateTopic_sync] diff --git a/owl-bot-staging/ManagedKafka/v1/src/V1/Client/ManagedKafkaClient.php b/owl-bot-staging/ManagedKafka/v1/src/V1/Client/ManagedKafkaClient.php new file mode 100644 index 000000000000..daeef68cb1a3 --- /dev/null +++ b/owl-bot-staging/ManagedKafka/v1/src/V1/Client/ManagedKafkaClient.php @@ -0,0 +1,802 @@ + createClusterAsync(CreateClusterRequest $request, array $optionalArgs = []) + * @method PromiseInterface createTopicAsync(CreateTopicRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteClusterAsync(DeleteClusterRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteConsumerGroupAsync(DeleteConsumerGroupRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteTopicAsync(DeleteTopicRequest $request, array $optionalArgs = []) + * @method PromiseInterface getClusterAsync(GetClusterRequest $request, array $optionalArgs = []) + * @method PromiseInterface getConsumerGroupAsync(GetConsumerGroupRequest $request, array $optionalArgs = []) + * @method PromiseInterface getTopicAsync(GetTopicRequest $request, array $optionalArgs = []) + * @method PromiseInterface listClustersAsync(ListClustersRequest $request, array $optionalArgs = []) + * @method PromiseInterface listConsumerGroupsAsync(ListConsumerGroupsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listTopicsAsync(ListTopicsRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateClusterAsync(UpdateClusterRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateConsumerGroupAsync(UpdateConsumerGroupRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateTopicAsync(UpdateTopicRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + */ +final class ManagedKafkaClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.managedkafka.v1.ManagedKafka'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'managedkafka.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'managedkafka.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/managed_kafka_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/managed_kafka_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/managed_kafka_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/managed_kafka_rest_client_config.php', + ], + ], + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Create the default operation client for the service. + * + * @param array $options ClientOptions for the client. + * + * @return OperationsClient + */ + private function createOperationsClient(array $options) + { + // Unset client-specific configuration options + unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); + + if (isset($options['operationsClient'])) { + return $options['operationsClient']; + } + + return new OperationsClient($options); + } + + /** + * Formats a string containing the fully-qualified path to represent a cluster + * resource. + * + * @param string $project + * @param string $location + * @param string $cluster + * + * @return string The formatted cluster resource. + */ + public static function clusterName(string $project, string $location, string $cluster): string + { + return self::getPathTemplate('cluster')->render([ + 'project' => $project, + 'location' => $location, + 'cluster' => $cluster, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * consumer_group resource. + * + * @param string $project + * @param string $location + * @param string $cluster + * @param string $consumerGroup + * + * @return string The formatted consumer_group resource. + */ + public static function consumerGroupName(string $project, string $location, string $cluster, string $consumerGroup): string + { + return self::getPathTemplate('consumerGroup')->render([ + 'project' => $project, + 'location' => $location, + 'cluster' => $cluster, + 'consumer_group' => $consumerGroup, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a crypto_key + * resource. + * + * @param string $project + * @param string $location + * @param string $keyRing + * @param string $cryptoKey + * + * @return string The formatted crypto_key resource. + */ + public static function cryptoKeyName(string $project, string $location, string $keyRing, string $cryptoKey): string + { + return self::getPathTemplate('cryptoKey')->render([ + 'project' => $project, + 'location' => $location, + 'key_ring' => $keyRing, + 'crypto_key' => $cryptoKey, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a location + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted location resource. + */ + public static function locationName(string $project, string $location): string + { + return self::getPathTemplate('location')->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a topic + * resource. + * + * @param string $project + * @param string $location + * @param string $cluster + * @param string $topic + * + * @return string The formatted topic resource. + */ + public static function topicName(string $project, string $location, string $cluster, string $topic): string + { + return self::getPathTemplate('topic')->render([ + 'project' => $project, + 'location' => $location, + 'cluster' => $cluster, + 'topic' => $topic, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - cluster: projects/{project}/locations/{location}/clusters/{cluster} + * - consumerGroup: projects/{project}/locations/{location}/clusters/{cluster}/consumerGroups/{consumer_group} + * - cryptoKey: projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key} + * - location: projects/{project}/locations/{location} + * - topic: projects/{project}/locations/{location}/clusters/{cluster}/topics/{topic} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'managedkafka.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Creates a new cluster in a given project and location. + * + * The async variant is {@see ManagedKafkaClient::createClusterAsync()} . + * + * @example samples/V1/ManagedKafkaClient/create_cluster.php + * + * @param CreateClusterRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createCluster(CreateClusterRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateCluster', $request, $callOptions)->wait(); + } + + /** + * Creates a new topic in a given project and location. + * + * The async variant is {@see ManagedKafkaClient::createTopicAsync()} . + * + * @example samples/V1/ManagedKafkaClient/create_topic.php + * + * @param CreateTopicRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Topic + * + * @throws ApiException Thrown if the API call fails. + */ + public function createTopic(CreateTopicRequest $request, array $callOptions = []): Topic + { + return $this->startApiCall('CreateTopic', $request, $callOptions)->wait(); + } + + /** + * Deletes a single cluster. + * + * The async variant is {@see ManagedKafkaClient::deleteClusterAsync()} . + * + * @example samples/V1/ManagedKafkaClient/delete_cluster.php + * + * @param DeleteClusterRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteCluster(DeleteClusterRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteCluster', $request, $callOptions)->wait(); + } + + /** + * Deletes a single consumer group. + * + * The async variant is {@see ManagedKafkaClient::deleteConsumerGroupAsync()} . + * + * @example samples/V1/ManagedKafkaClient/delete_consumer_group.php + * + * @param DeleteConsumerGroupRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteConsumerGroup(DeleteConsumerGroupRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteConsumerGroup', $request, $callOptions)->wait(); + } + + /** + * Deletes a single topic. + * + * The async variant is {@see ManagedKafkaClient::deleteTopicAsync()} . + * + * @example samples/V1/ManagedKafkaClient/delete_topic.php + * + * @param DeleteTopicRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteTopic(DeleteTopicRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteTopic', $request, $callOptions)->wait(); + } + + /** + * Returns the properties of a single cluster. + * + * The async variant is {@see ManagedKafkaClient::getClusterAsync()} . + * + * @example samples/V1/ManagedKafkaClient/get_cluster.php + * + * @param GetClusterRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Cluster + * + * @throws ApiException Thrown if the API call fails. + */ + public function getCluster(GetClusterRequest $request, array $callOptions = []): Cluster + { + return $this->startApiCall('GetCluster', $request, $callOptions)->wait(); + } + + /** + * Returns the properties of a single consumer group. + * + * The async variant is {@see ManagedKafkaClient::getConsumerGroupAsync()} . + * + * @example samples/V1/ManagedKafkaClient/get_consumer_group.php + * + * @param GetConsumerGroupRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ConsumerGroup + * + * @throws ApiException Thrown if the API call fails. + */ + public function getConsumerGroup(GetConsumerGroupRequest $request, array $callOptions = []): ConsumerGroup + { + return $this->startApiCall('GetConsumerGroup', $request, $callOptions)->wait(); + } + + /** + * Returns the properties of a single topic. + * + * The async variant is {@see ManagedKafkaClient::getTopicAsync()} . + * + * @example samples/V1/ManagedKafkaClient/get_topic.php + * + * @param GetTopicRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Topic + * + * @throws ApiException Thrown if the API call fails. + */ + public function getTopic(GetTopicRequest $request, array $callOptions = []): Topic + { + return $this->startApiCall('GetTopic', $request, $callOptions)->wait(); + } + + /** + * Lists the clusters in a given project and location. + * + * The async variant is {@see ManagedKafkaClient::listClustersAsync()} . + * + * @example samples/V1/ManagedKafkaClient/list_clusters.php + * + * @param ListClustersRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listClusters(ListClustersRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListClusters', $request, $callOptions); + } + + /** + * Lists the consumer groups in a given cluster. + * + * The async variant is {@see ManagedKafkaClient::listConsumerGroupsAsync()} . + * + * @example samples/V1/ManagedKafkaClient/list_consumer_groups.php + * + * @param ListConsumerGroupsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listConsumerGroups(ListConsumerGroupsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListConsumerGroups', $request, $callOptions); + } + + /** + * Lists the topics in a given cluster. + * + * The async variant is {@see ManagedKafkaClient::listTopicsAsync()} . + * + * @example samples/V1/ManagedKafkaClient/list_topics.php + * + * @param ListTopicsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listTopics(ListTopicsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListTopics', $request, $callOptions); + } + + /** + * Updates the properties of a single cluster. + * + * The async variant is {@see ManagedKafkaClient::updateClusterAsync()} . + * + * @example samples/V1/ManagedKafkaClient/update_cluster.php + * + * @param UpdateClusterRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateCluster(UpdateClusterRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateCluster', $request, $callOptions)->wait(); + } + + /** + * Updates the properties of a single consumer group. + * + * The async variant is {@see ManagedKafkaClient::updateConsumerGroupAsync()} . + * + * @example samples/V1/ManagedKafkaClient/update_consumer_group.php + * + * @param UpdateConsumerGroupRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ConsumerGroup + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateConsumerGroup(UpdateConsumerGroupRequest $request, array $callOptions = []): ConsumerGroup + { + return $this->startApiCall('UpdateConsumerGroup', $request, $callOptions)->wait(); + } + + /** + * Updates the properties of a single topic. + * + * The async variant is {@see ManagedKafkaClient::updateTopicAsync()} . + * + * @example samples/V1/ManagedKafkaClient/update_topic.php + * + * @param UpdateTopicRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Topic + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateTopic(UpdateTopicRequest $request, array $callOptions = []): Topic + { + return $this->startApiCall('UpdateTopic', $request, $callOptions)->wait(); + } + + /** + * Gets information about a location. + * + * The async variant is {@see ManagedKafkaClient::getLocationAsync()} . + * + * @example samples/V1/ManagedKafkaClient/get_location.php + * + * @param GetLocationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Location + * + * @throws ApiException Thrown if the API call fails. + */ + public function getLocation(GetLocationRequest $request, array $callOptions = []): Location + { + return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * The async variant is {@see ManagedKafkaClient::listLocationsAsync()} . + * + * @example samples/V1/ManagedKafkaClient/list_locations.php + * + * @param ListLocationsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListLocations', $request, $callOptions); + } +} diff --git a/owl-bot-staging/ManagedKafka/v1/src/V1/gapic_metadata.json b/owl-bot-staging/ManagedKafka/v1/src/V1/gapic_metadata.json new file mode 100644 index 000000000000..52eab10d2dac --- /dev/null +++ b/owl-bot-staging/ManagedKafka/v1/src/V1/gapic_metadata.json @@ -0,0 +1,98 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.cloud.managedkafka.v1", + "libraryPackage": "Google\\Cloud\\ManagedKafka\\V1", + "services": { + "ManagedKafka": { + "clients": { + "grpc": { + "libraryClient": "ManagedKafkaGapicClient", + "rpcs": { + "CreateCluster": { + "methods": [ + "createCluster" + ] + }, + "CreateTopic": { + "methods": [ + "createTopic" + ] + }, + "DeleteCluster": { + "methods": [ + "deleteCluster" + ] + }, + "DeleteConsumerGroup": { + "methods": [ + "deleteConsumerGroup" + ] + }, + "DeleteTopic": { + "methods": [ + "deleteTopic" + ] + }, + "GetCluster": { + "methods": [ + "getCluster" + ] + }, + "GetConsumerGroup": { + "methods": [ + "getConsumerGroup" + ] + }, + "GetTopic": { + "methods": [ + "getTopic" + ] + }, + "ListClusters": { + "methods": [ + "listClusters" + ] + }, + "ListConsumerGroups": { + "methods": [ + "listConsumerGroups" + ] + }, + "ListTopics": { + "methods": [ + "listTopics" + ] + }, + "UpdateCluster": { + "methods": [ + "updateCluster" + ] + }, + "UpdateConsumerGroup": { + "methods": [ + "updateConsumerGroup" + ] + }, + "UpdateTopic": { + "methods": [ + "updateTopic" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/ManagedKafka/v1/src/V1/resources/managed_kafka_client_config.json b/owl-bot-staging/ManagedKafka/v1/src/V1/resources/managed_kafka_client_config.json new file mode 100644 index 000000000000..8585444e9db2 --- /dev/null +++ b/owl-bot-staging/ManagedKafka/v1/src/V1/resources/managed_kafka_client_config.json @@ -0,0 +1,124 @@ +{ + "interfaces": { + "google.cloud.managedkafka.v1.ManagedKafka": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE" + ], + "no_retry_1_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 10000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "CreateCluster": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateTopic": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteCluster": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteConsumerGroup": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteTopic": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetCluster": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetConsumerGroup": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetTopic": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListClusters": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListConsumerGroups": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListTopics": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateCluster": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateConsumerGroup": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateTopic": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetLocation": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListLocations": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } + } + } +} diff --git a/owl-bot-staging/ManagedKafka/v1/src/V1/resources/managed_kafka_descriptor_config.php b/owl-bot-staging/ManagedKafka/v1/src/V1/resources/managed_kafka_descriptor_config.php new file mode 100644 index 000000000000..37b43b976d5a --- /dev/null +++ b/owl-bot-staging/ManagedKafka/v1/src/V1/resources/managed_kafka_descriptor_config.php @@ -0,0 +1,285 @@ + [ + 'google.cloud.managedkafka.v1.ManagedKafka' => [ + 'CreateCluster' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\ManagedKafka\V1\Cluster', + 'metadataReturnType' => '\Google\Cloud\ManagedKafka\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteCluster' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\ManagedKafka\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UpdateCluster' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\ManagedKafka\V1\Cluster', + 'metadataReturnType' => '\Google\Cloud\ManagedKafka\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'cluster.name', + 'fieldAccessors' => [ + 'getCluster', + 'getName', + ], + ], + ], + ], + 'CreateTopic' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\ManagedKafka\V1\Topic', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteConsumerGroup' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteTopic' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetCluster' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\ManagedKafka\V1\Cluster', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetConsumerGroup' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\ManagedKafka\V1\ConsumerGroup', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetTopic' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\ManagedKafka\V1\Topic', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListClusters' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getClusters', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\ManagedKafka\V1\ListClustersResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListConsumerGroups' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getConsumerGroups', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\ManagedKafka\V1\ListConsumerGroupsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListTopics' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getTopics', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\ManagedKafka\V1\ListTopicsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateConsumerGroup' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\ManagedKafka\V1\ConsumerGroup', + 'headerParams' => [ + [ + 'keyName' => 'consumer_group.name', + 'fieldAccessors' => [ + 'getConsumerGroup', + 'getName', + ], + ], + ], + ], + 'UpdateTopic' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\ManagedKafka\V1\Topic', + 'headerParams' => [ + [ + 'keyName' => 'topic.name', + 'fieldAccessors' => [ + 'getTopic', + 'getName', + ], + ], + ], + ], + 'GetLocation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Location\Location', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'templateMap' => [ + 'cluster' => 'projects/{project}/locations/{location}/clusters/{cluster}', + 'consumerGroup' => 'projects/{project}/locations/{location}/clusters/{cluster}/consumerGroups/{consumer_group}', + 'cryptoKey' => 'projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}', + 'location' => 'projects/{project}/locations/{location}', + 'topic' => 'projects/{project}/locations/{location}/clusters/{cluster}/topics/{topic}', + ], + ], + ], +]; diff --git a/owl-bot-staging/ManagedKafka/v1/src/V1/resources/managed_kafka_rest_client_config.php b/owl-bot-staging/ManagedKafka/v1/src/V1/resources/managed_kafka_rest_client_config.php new file mode 100644 index 000000000000..f6fcea12de47 --- /dev/null +++ b/owl-bot-staging/ManagedKafka/v1/src/V1/resources/managed_kafka_rest_client_config.php @@ -0,0 +1,277 @@ + [ + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.cloud.managedkafka.v1.ManagedKafka' => [ + 'CreateCluster' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/clusters', + 'body' => 'cluster', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'cluster_id', + ], + ], + 'CreateTopic' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/clusters/*}/topics', + 'body' => 'topic', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'topic_id', + ], + ], + 'DeleteCluster' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/clusters/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteConsumerGroup' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/clusters/*/consumerGroups/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteTopic' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/clusters/*/topics/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetCluster' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/clusters/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetConsumerGroup' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/clusters/*/consumerGroups/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetTopic' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/clusters/*/topics/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListClusters' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/clusters', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListConsumerGroups' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/clusters/*}/consumerGroups', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListTopics' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/clusters/*}/topics', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateCluster' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{cluster.name=projects/*/locations/*/clusters/*}', + 'body' => 'cluster', + 'placeholders' => [ + 'cluster.name' => [ + 'getters' => [ + 'getCluster', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdateConsumerGroup' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{consumer_group.name=projects/*/locations/*/clusters/*/consumerGroups/*}', + 'body' => 'consumer_group', + 'placeholders' => [ + 'consumer_group.name' => [ + 'getters' => [ + 'getConsumerGroup', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdateTopic' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{topic.name=projects/*/locations/*/clusters/*/topics/*}', + 'body' => 'topic', + 'placeholders' => [ + 'topic.name' => [ + 'getters' => [ + 'getTopic', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/ManagedKafka/v1/tests/Unit/V1/Client/ManagedKafkaClientTest.php b/owl-bot-staging/ManagedKafka/v1/tests/Unit/V1/Client/ManagedKafkaClientTest.php new file mode 100644 index 000000000000..cf3da605fcf5 --- /dev/null +++ b/owl-bot-staging/ManagedKafka/v1/tests/Unit/V1/Client/ManagedKafkaClientTest.php @@ -0,0 +1,1526 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return ManagedKafkaClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new ManagedKafkaClient($options); + } + + /** @test */ + public function createClusterTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $satisfiesPzi = false; + $satisfiesPzs = false; + $expectedResponse = new Cluster(); + $expectedResponse->setName($name); + $expectedResponse->setSatisfiesPzi($satisfiesPzi); + $expectedResponse->setSatisfiesPzs($satisfiesPzs); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createClusterTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $clusterId = 'clusterId240280960'; + $cluster = new Cluster(); + $clusterCapacityConfig = new CapacityConfig(); + $capacityConfigVcpuCount = 1944563327; + $clusterCapacityConfig->setVcpuCount($capacityConfigVcpuCount); + $capacityConfigMemoryBytes = 743041454; + $clusterCapacityConfig->setMemoryBytes($capacityConfigMemoryBytes); + $cluster->setCapacityConfig($clusterCapacityConfig); + $clusterGcpConfig = new GcpConfig(); + $gcpConfigAccessConfig = new AccessConfig(); + $accessConfigNetworkConfigs = []; + $gcpConfigAccessConfig->setNetworkConfigs($accessConfigNetworkConfigs); + $clusterGcpConfig->setAccessConfig($gcpConfigAccessConfig); + $cluster->setGcpConfig($clusterGcpConfig); + $request = (new CreateClusterRequest()) + ->setParent($formattedParent) + ->setClusterId($clusterId) + ->setCluster($cluster); + $response = $gapicClient->createCluster($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.managedkafka.v1.ManagedKafka/CreateCluster', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getClusterId(); + $this->assertProtobufEquals($clusterId, $actualValue); + $actualValue = $actualApiRequestObject->getCluster(); + $this->assertProtobufEquals($cluster, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createClusterTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createClusterExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $clusterId = 'clusterId240280960'; + $cluster = new Cluster(); + $clusterCapacityConfig = new CapacityConfig(); + $capacityConfigVcpuCount = 1944563327; + $clusterCapacityConfig->setVcpuCount($capacityConfigVcpuCount); + $capacityConfigMemoryBytes = 743041454; + $clusterCapacityConfig->setMemoryBytes($capacityConfigMemoryBytes); + $cluster->setCapacityConfig($clusterCapacityConfig); + $clusterGcpConfig = new GcpConfig(); + $gcpConfigAccessConfig = new AccessConfig(); + $accessConfigNetworkConfigs = []; + $gcpConfigAccessConfig->setNetworkConfigs($accessConfigNetworkConfigs); + $clusterGcpConfig->setAccessConfig($gcpConfigAccessConfig); + $cluster->setGcpConfig($clusterGcpConfig); + $request = (new CreateClusterRequest()) + ->setParent($formattedParent) + ->setClusterId($clusterId) + ->setCluster($cluster); + $response = $gapicClient->createCluster($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createClusterTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createTopicTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $partitionCount = 1738969222; + $replicationFactor = 1434332894; + $expectedResponse = new Topic(); + $expectedResponse->setName($name); + $expectedResponse->setPartitionCount($partitionCount); + $expectedResponse->setReplicationFactor($replicationFactor); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); + $topicId = 'topicId-957291989'; + $topic = new Topic(); + $topicPartitionCount = 2129663148; + $topic->setPartitionCount($topicPartitionCount); + $topicReplicationFactor = 1954252084; + $topic->setReplicationFactor($topicReplicationFactor); + $request = (new CreateTopicRequest()) + ->setParent($formattedParent) + ->setTopicId($topicId) + ->setTopic($topic); + $response = $gapicClient->createTopic($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.managedkafka.v1.ManagedKafka/CreateTopic', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getTopicId(); + $this->assertProtobufEquals($topicId, $actualValue); + $actualValue = $actualRequestObject->getTopic(); + $this->assertProtobufEquals($topic, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createTopicExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); + $topicId = 'topicId-957291989'; + $topic = new Topic(); + $topicPartitionCount = 2129663148; + $topic->setPartitionCount($topicPartitionCount); + $topicReplicationFactor = 1954252084; + $topic->setReplicationFactor($topicReplicationFactor); + $request = (new CreateTopicRequest()) + ->setParent($formattedParent) + ->setTopicId($topicId) + ->setTopic($topic); + try { + $gapicClient->createTopic($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteClusterTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteClusterTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); + $request = (new DeleteClusterRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteCluster($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.managedkafka.v1.ManagedKafka/DeleteCluster', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteClusterTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteClusterExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); + $request = (new DeleteClusterRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteCluster($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteClusterTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteConsumerGroupTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->consumerGroupName('[PROJECT]', '[LOCATION]', '[CLUSTER]', '[CONSUMER_GROUP]'); + $request = (new DeleteConsumerGroupRequest()) + ->setName($formattedName); + $gapicClient->deleteConsumerGroup($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.managedkafka.v1.ManagedKafka/DeleteConsumerGroup', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteConsumerGroupExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->consumerGroupName('[PROJECT]', '[LOCATION]', '[CLUSTER]', '[CONSUMER_GROUP]'); + $request = (new DeleteConsumerGroupRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteConsumerGroup($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteTopicTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->topicName('[PROJECT]', '[LOCATION]', '[CLUSTER]', '[TOPIC]'); + $request = (new DeleteTopicRequest()) + ->setName($formattedName); + $gapicClient->deleteTopic($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.managedkafka.v1.ManagedKafka/DeleteTopic', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteTopicExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->topicName('[PROJECT]', '[LOCATION]', '[CLUSTER]', '[TOPIC]'); + $request = (new DeleteTopicRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteTopic($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getClusterTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $satisfiesPzi = false; + $satisfiesPzs = false; + $expectedResponse = new Cluster(); + $expectedResponse->setName($name2); + $expectedResponse->setSatisfiesPzi($satisfiesPzi); + $expectedResponse->setSatisfiesPzs($satisfiesPzs); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); + $request = (new GetClusterRequest()) + ->setName($formattedName); + $response = $gapicClient->getCluster($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.managedkafka.v1.ManagedKafka/GetCluster', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getClusterExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); + $request = (new GetClusterRequest()) + ->setName($formattedName); + try { + $gapicClient->getCluster($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getConsumerGroupTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new ConsumerGroup(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->consumerGroupName('[PROJECT]', '[LOCATION]', '[CLUSTER]', '[CONSUMER_GROUP]'); + $request = (new GetConsumerGroupRequest()) + ->setName($formattedName); + $response = $gapicClient->getConsumerGroup($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.managedkafka.v1.ManagedKafka/GetConsumerGroup', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getConsumerGroupExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->consumerGroupName('[PROJECT]', '[LOCATION]', '[CLUSTER]', '[CONSUMER_GROUP]'); + $request = (new GetConsumerGroupRequest()) + ->setName($formattedName); + try { + $gapicClient->getConsumerGroup($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getTopicTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $partitionCount = 1738969222; + $replicationFactor = 1434332894; + $expectedResponse = new Topic(); + $expectedResponse->setName($name2); + $expectedResponse->setPartitionCount($partitionCount); + $expectedResponse->setReplicationFactor($replicationFactor); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->topicName('[PROJECT]', '[LOCATION]', '[CLUSTER]', '[TOPIC]'); + $request = (new GetTopicRequest()) + ->setName($formattedName); + $response = $gapicClient->getTopic($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.managedkafka.v1.ManagedKafka/GetTopic', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getTopicExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->topicName('[PROJECT]', '[LOCATION]', '[CLUSTER]', '[TOPIC]'); + $request = (new GetTopicRequest()) + ->setName($formattedName); + try { + $gapicClient->getTopic($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listClustersTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $clustersElement = new Cluster(); + $clusters = [ + $clustersElement, + ]; + $expectedResponse = new ListClustersResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setClusters($clusters); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListClustersRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listClusters($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getClusters()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.managedkafka.v1.ManagedKafka/ListClusters', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listClustersExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListClustersRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listClusters($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listConsumerGroupsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $consumerGroupsElement = new ConsumerGroup(); + $consumerGroups = [ + $consumerGroupsElement, + ]; + $expectedResponse = new ListConsumerGroupsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setConsumerGroups($consumerGroups); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); + $request = (new ListConsumerGroupsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listConsumerGroups($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getConsumerGroups()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.managedkafka.v1.ManagedKafka/ListConsumerGroups', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listConsumerGroupsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); + $request = (new ListConsumerGroupsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listConsumerGroups($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listTopicsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $topicsElement = new Topic(); + $topics = [ + $topicsElement, + ]; + $expectedResponse = new ListTopicsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTopics($topics); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); + $request = (new ListTopicsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listTopics($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getTopics()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.managedkafka.v1.ManagedKafka/ListTopics', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listTopicsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); + $request = (new ListTopicsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listTopics($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateClusterTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $satisfiesPzi = false; + $satisfiesPzs = false; + $expectedResponse = new Cluster(); + $expectedResponse->setName($name); + $expectedResponse->setSatisfiesPzi($satisfiesPzi); + $expectedResponse->setSatisfiesPzs($satisfiesPzs); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateClusterTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $updateMask = new FieldMask(); + $cluster = new Cluster(); + $clusterCapacityConfig = new CapacityConfig(); + $capacityConfigVcpuCount = 1944563327; + $clusterCapacityConfig->setVcpuCount($capacityConfigVcpuCount); + $capacityConfigMemoryBytes = 743041454; + $clusterCapacityConfig->setMemoryBytes($capacityConfigMemoryBytes); + $cluster->setCapacityConfig($clusterCapacityConfig); + $clusterGcpConfig = new GcpConfig(); + $gcpConfigAccessConfig = new AccessConfig(); + $accessConfigNetworkConfigs = []; + $gcpConfigAccessConfig->setNetworkConfigs($accessConfigNetworkConfigs); + $clusterGcpConfig->setAccessConfig($gcpConfigAccessConfig); + $cluster->setGcpConfig($clusterGcpConfig); + $request = (new UpdateClusterRequest()) + ->setUpdateMask($updateMask) + ->setCluster($cluster); + $response = $gapicClient->updateCluster($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.managedkafka.v1.ManagedKafka/UpdateCluster', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $actualValue = $actualApiRequestObject->getCluster(); + $this->assertProtobufEquals($cluster, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateClusterTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateClusterExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $updateMask = new FieldMask(); + $cluster = new Cluster(); + $clusterCapacityConfig = new CapacityConfig(); + $capacityConfigVcpuCount = 1944563327; + $clusterCapacityConfig->setVcpuCount($capacityConfigVcpuCount); + $capacityConfigMemoryBytes = 743041454; + $clusterCapacityConfig->setMemoryBytes($capacityConfigMemoryBytes); + $cluster->setCapacityConfig($clusterCapacityConfig); + $clusterGcpConfig = new GcpConfig(); + $gcpConfigAccessConfig = new AccessConfig(); + $accessConfigNetworkConfigs = []; + $gcpConfigAccessConfig->setNetworkConfigs($accessConfigNetworkConfigs); + $clusterGcpConfig->setAccessConfig($gcpConfigAccessConfig); + $cluster->setGcpConfig($clusterGcpConfig); + $request = (new UpdateClusterRequest()) + ->setUpdateMask($updateMask) + ->setCluster($cluster); + $response = $gapicClient->updateCluster($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateClusterTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateConsumerGroupTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $expectedResponse = new ConsumerGroup(); + $expectedResponse->setName($name); + $transport->addResponse($expectedResponse); + // Mock request + $updateMask = new FieldMask(); + $consumerGroup = new ConsumerGroup(); + $request = (new UpdateConsumerGroupRequest()) + ->setUpdateMask($updateMask) + ->setConsumerGroup($consumerGroup); + $response = $gapicClient->updateConsumerGroup($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.managedkafka.v1.ManagedKafka/UpdateConsumerGroup', $actualFuncCall); + $actualValue = $actualRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $actualValue = $actualRequestObject->getConsumerGroup(); + $this->assertProtobufEquals($consumerGroup, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateConsumerGroupExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $updateMask = new FieldMask(); + $consumerGroup = new ConsumerGroup(); + $request = (new UpdateConsumerGroupRequest()) + ->setUpdateMask($updateMask) + ->setConsumerGroup($consumerGroup); + try { + $gapicClient->updateConsumerGroup($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateTopicTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $partitionCount = 1738969222; + $replicationFactor = 1434332894; + $expectedResponse = new Topic(); + $expectedResponse->setName($name); + $expectedResponse->setPartitionCount($partitionCount); + $expectedResponse->setReplicationFactor($replicationFactor); + $transport->addResponse($expectedResponse); + // Mock request + $updateMask = new FieldMask(); + $topic = new Topic(); + $topicPartitionCount = 2129663148; + $topic->setPartitionCount($topicPartitionCount); + $topicReplicationFactor = 1954252084; + $topic->setReplicationFactor($topicReplicationFactor); + $request = (new UpdateTopicRequest()) + ->setUpdateMask($updateMask) + ->setTopic($topic); + $response = $gapicClient->updateTopic($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.managedkafka.v1.ManagedKafka/UpdateTopic', $actualFuncCall); + $actualValue = $actualRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $actualValue = $actualRequestObject->getTopic(); + $this->assertProtobufEquals($topic, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateTopicExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $updateMask = new FieldMask(); + $topic = new Topic(); + $topicPartitionCount = 2129663148; + $topic->setPartitionCount($topicPartitionCount); + $topicReplicationFactor = 1954252084; + $topic->setReplicationFactor($topicReplicationFactor); + $request = (new UpdateTopicRequest()) + ->setUpdateMask($updateMask) + ->setTopic($topic); + try { + $gapicClient->updateTopic($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $locationId = 'locationId552319461'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Location(); + $expectedResponse->setName($name2); + $expectedResponse->setLocationId($locationId); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + $request = new GetLocationRequest(); + $response = $gapicClient->getLocation($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new GetLocationRequest(); + try { + $gapicClient->getLocation($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $locationsElement = new Location(); + $locations = [ + $locationsElement, + ]; + $expectedResponse = new ListLocationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setLocations($locations); + $transport->addResponse($expectedResponse); + $request = new ListLocationsRequest(); + $response = $gapicClient->listLocations($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new ListLocationsRequest(); + try { + $gapicClient->listLocations($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createClusterAsyncTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $satisfiesPzi = false; + $satisfiesPzs = false; + $expectedResponse = new Cluster(); + $expectedResponse->setName($name); + $expectedResponse->setSatisfiesPzi($satisfiesPzi); + $expectedResponse->setSatisfiesPzs($satisfiesPzs); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createClusterTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $clusterId = 'clusterId240280960'; + $cluster = new Cluster(); + $clusterCapacityConfig = new CapacityConfig(); + $capacityConfigVcpuCount = 1944563327; + $clusterCapacityConfig->setVcpuCount($capacityConfigVcpuCount); + $capacityConfigMemoryBytes = 743041454; + $clusterCapacityConfig->setMemoryBytes($capacityConfigMemoryBytes); + $cluster->setCapacityConfig($clusterCapacityConfig); + $clusterGcpConfig = new GcpConfig(); + $gcpConfigAccessConfig = new AccessConfig(); + $accessConfigNetworkConfigs = []; + $gcpConfigAccessConfig->setNetworkConfigs($accessConfigNetworkConfigs); + $clusterGcpConfig->setAccessConfig($gcpConfigAccessConfig); + $cluster->setGcpConfig($clusterGcpConfig); + $request = (new CreateClusterRequest()) + ->setParent($formattedParent) + ->setClusterId($clusterId) + ->setCluster($cluster); + $response = $gapicClient->createClusterAsync($request)->wait(); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.managedkafka.v1.ManagedKafka/CreateCluster', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getClusterId(); + $this->assertProtobufEquals($clusterId, $actualValue); + $actualValue = $actualApiRequestObject->getCluster(); + $this->assertProtobufEquals($cluster, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createClusterTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } +} diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/GPBMetadata/Google/Maps/Fleetengine/Delivery/V1/Common.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/GPBMetadata/Google/Maps/Fleetengine/Delivery/V1/Common.php new file mode 100644 index 0000000000000000000000000000000000000000..6706e838d022a8fa0f947615d039af9b18a1e465 GIT binary patch literal 3682 zcmbtXOK;mo5RUxL$c|+?b{NNXSSN*@G^J`MX#u)UAz73n#32QVmWx6Fu_D(p5sD=E zaNrdAA3YX5_Fwc?^jGxML(jeS(%mH~DYh)RjW4E_^UdR%*%{6^-+HGWJP<0_!9EJH zDYVap@DvN4?}o17+Cn=zIl;bQxLwb(u`dcjNfi`T6Xa4=`;5E39c-R+G&uWw!LQAXagxGhGOfo?PC_UMJl$fRJtP^27_EC~9Ik_){euM|D3xbcs$anUb-&Dc--cxG`Zw1e4l`U+W zMSP0REZ3K$epG!W!=SyuG>arAL|yNHV2^#|dDsuG57o{++&V;|?R18NSOUIyVI_1I zOtZ&snbhQVj}OYu7W}#jU;fu(tPN&G}962S@PSkB zbz~TkkBoDEj(CyXT~84yy<*8FcNsTnw8aTN!##(^n6y50bv%@N0<)(WnS>+8S$6l{ zB}?QEKiy@9I00V|_3A@nG&LK;U6)>TkN z*FfbV8+l}CV4dDap4NJHckNP+d+m&S2H61nguxiFFb+_h{G%|*X{7p+8rK8t1g_6# z3G&wNo;a#&h*#X122(*uT_hvQcaf}aC zi&^{YF~D8TzzbL#iixRM9!mv+_2Kx0liMH9NeMQFo9L0Vat(5LQWb-DV2xnrXam^{ z0cdKEEyr}jOhE*n@3>(P9Ws-Z#%u5OAAg>hIw;GfUnU+@*d`>> zO-N*$kjyr!-dquzJHMw=t$1OIH>Oyw)nA#&&h*zrYb#bLNmQdG4XBi)G#irC+-c9S d53#3Py$|ar@meyl#ay|;Fv)n&cn|LZ{srxno<{%x literal 0 HcmV?d00001 diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/GPBMetadata/Google/Maps/Fleetengine/Delivery/V1/DeliveryApi.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/GPBMetadata/Google/Maps/Fleetengine/Delivery/V1/DeliveryApi.php new file mode 100644 index 000000000000..daae42f83879 --- /dev/null +++ b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/GPBMetadata/Google/Maps/Fleetengine/Delivery/V1/DeliveryApi.php @@ -0,0 +1,123 @@ +internalAddGeneratedFile( + ' +Ú, +6google/maps/fleetengine/delivery/v1/delivery_api.protomaps.fleetengine.delivery.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.protogoogle/api/routing.protogoogle/geo/type/viewport.proto;google/maps/fleetengine/delivery/v1/delivery_vehicles.proto0google/maps/fleetengine/delivery/v1/header.protovfhN+=ni=jAhAJVoCfRRxh+eCAZXz`DN1;tMGVuL@OUpwm zh{}DJQck@A^Jv+jE*sPExIEsNJey;B#B7&Fsyqk4vxYPZESr+O*7g(1Eyv=Pu_q~w zCrD}Ro>CgMgwp74Yy#M>6-6Xn>n6fZjyvpMrUA^=U#rt5b|%qjNX4tx}6i=;8OgkGqXQTI3vJz)fX)Bm5#@d1EOp9RYU(U?ym8}t zLTv@C946_C&2{7Rvz&_l#+)RG4-l@i8pN`IY$ z)fuNM7a=F?UtA(f>lc&;TtYu{)Aenc>tY6%^OgJRqU)GKIrN zQ89~*mn&Ou#kfCVIgljE2XM_Eg(3C08Tunm&4><$_^X&h_KV5`_-O8HlX{LB_*gW> zWqGlyYAlv2#8R=|8s0#82-ib8w9up8z;qbKjs3?QVowdD;yH$So=%6Z6DpLUvsC1n-zox`Si_(<0qdb^NO z^02a9-+6|>LRPs9(9&!AL8o1>?iX^}_b;p8!QE+F$Mt|lj#PAIc_t>Mj0qnz2P>ic zB7HoWd|A`aU-?Cnzmrl0E~b8{dwpLi!E#)H!f^S@yaFu!vjo@Xr|?V2McfahTl1AW zi)BwJ4iKPJ;aw+W<9QVwTYOPPZ)g9kW|gm?Fri3`T9`Rsd3{mG$WI^_So{b*Cu(=z zmF2$D?^(!C2VI9k;98zXozsRC%XWA1&8HO?)ET`0GPj~1BW!3QhRS06R1j(hVKQ?M zVOg{=nsl)8*(pTRqBnk7g7XuyRag=6n9NB!?|rx=7t&^*blx{fTL*<(Ax<|YXG3Z} zXP)Cfml5VG>x(1oAmC8$kJU$sWT475xN^{`c4j@c0@;225G{s|()ZiVryV`ESGCVL5nrnmJrjyL3LGRa0 zZf94o{g%14C+ApI3`MG(V|6(iPr8uW-S{KjWyIrdJnzQ)jMIS^C*GGCV=X4sG{LB8 sQ&-);cG| z4_T7XFLONdBcb?<(|O2!nkc65?+H&l9&yE4$Y0}J7j(hG1hDkY+(jDsii?P51*6D^ z##35gX1PydfqS^18)i^@}WL`&TmI( z2f>zcAK$sL?U8jnBR^HiXaDtqwU06_7<*bUHd-*&tj^T$C5>-5>_K>_A zvS^vIC3wCFKrhi!ZGP5eu*9r^y4h~bU>=RflemY*WUCyr{}#KPMluX?%O@9{*HD`YTeOr z@^a7{*GstYLu+i$@Lbj&5b{-f)}D07wll3)PP?SGWv7!9=bQGlKN=7IfpinternalAddGeneratedFile( + ' +¸ +p1b=l+*7uQO+1s4 zrcyst*gjEQ&tXo(v6OnZ)gqqKa5^rvh^Hz_uBhx3D~g`WSMH*!?{vKe(Ui91v@MeA zn695{S%ffRx2a81O=8g=@eWhH)f6-Rx4tT{0c^8FeAjFcWvi5VNtoF*nOWNsFtwKm zQ`;QC)N&zAt-87n(6CJ3S1KG1-hqNYZntjHhT=1m;jjDDH>gb+H7)uJdbOdnOv@*z zd0MvBwHu5&w!#&Pc7r4zC;=vyz3)00g$*ToScwM)gHp@ejCi(b;miDnM_uN4B^1@P zHevm6@^6w4LbDu>wv=S>Mol~Q$PI;gT{3K4Q9Q!Bp1m&K%>j=3pK51>E$!0UCM8xg zL-x%cbv#WQcr^g|nCdPGvpKfbs65rOPN(D8<3C{}SVVv-*{2PQ_~XO&QRN3@9Tg9i1E>|0&rH8h$KI#o(ldzj z!Xxse07#CZU*__eNd%B`aD_K7!|5^%6_IBJh&l!ce@QXWlAgl#VHAVAE(1c%tu3lS zT!J8A+|)khq&(a@re-+}!DD$&sD3s26@^ebZ?_z&4!6&QGJ?XFuL!@MjYi}yi3o>& zMHb3p6i716G0$wgrFPq(O?e6-XL%Ikk^(nQ(uPaKBZ*0LHQ`#OZIhW6 zDrbeR^c=us%%k-#Bffl1nM7hfJRd0?=`8*;0n+JLO9m`^q+{YJLP~`F!srKwv^&IR zKGr$6_jt6uu>D6y0$r&9^SBYP0cUuZm|Ht1$R|chL}O_QK0k(L__pb~X59*!$IS9i z*rBkuNH-x-d0o6I07iATAn@bPKMRE9uHf_!*cgmh>G2M?={{ zv5ZDz%bPIA%QEUTw?VF?%P)-LUL{+6c@knCX3Klotgh!!SKw@-eSzb_!VpdrlCZKL zLGl=Cp_olq^2HsaT-@8up0t9#mv)QQd`{m*-xuIkAziK*Red|3E$Bw1o0!zLKBRN7 zG(6gZUWmiYSFzou_=}{wI8l1ENjyLGF8X*BtdyyDydI90|Go^LaoIDd?SSH8^CpJt zSceuaruYHJwQuyOPwUj8>`)Avxix(>0nf%)t9_WF%XbXPg}b;h&<@|K4b$^z&$NPm zGGsBJ=>=K*86FHQ@_=AV=(rZ)&pBn8Pr(cGmBE*T`fj4Dyv~~x=Pj<&!x84Q;KHoh zur#phGsi`LyEYrP$0y5$*?R+DM7=ATO~bZ=F?BJyT>Lc#iBptH!ksf6X8XAE?K@Ue zFgU(_Nvc49?J_VV)G`LlIL5_+YCy%0Pe(+33J(YNPo=qoC!gmV14K?S{+I+zo7RDO z=!;cg2EVxmahu>#C?-FCk+}ia2UTG>qJlF2PC#u1DI5*#Q43!t&g;@IP5hW|SWdSY z>G1B+c1B#K*kkZ8jkXfEzCQT)TWl)3sptNP-P;mJsmkvYRUDmaps.fleetengine.delivery.v1.BatchCreateTasksRequest + */ +class BatchCreateTasksRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The standard Delivery API request header. + * Note: If you set this field, then the header field in the + * `CreateTaskRequest` messages must either be empty, or it must match this + * field. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $header = null; + /** + * Required. The parent resource shared by all tasks. This value must be in + * the format `providers/{provider}`. The `provider` must be the Google Cloud + * Project ID. For example, `sample-cloud-project`. The parent field in the + * `CreateTaskRequest` messages must either be empty, or it must match this + * field. + * + * Generated from protobuf field string parent = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The request message that specifies the resources to create. + * Note: You can create a maximum of 500 tasks in a batch. + * + * Generated from protobuf field repeated .maps.fleetengine.delivery.v1.CreateTaskRequest requests = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + private $requests; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Maps\FleetEngine\Delivery\V1\DeliveryRequestHeader $header + * Optional. The standard Delivery API request header. + * Note: If you set this field, then the header field in the + * `CreateTaskRequest` messages must either be empty, or it must match this + * field. + * @type string $parent + * Required. The parent resource shared by all tasks. This value must be in + * the format `providers/{provider}`. The `provider` must be the Google Cloud + * Project ID. For example, `sample-cloud-project`. The parent field in the + * `CreateTaskRequest` messages must either be empty, or it must match this + * field. + * @type array<\Google\Maps\FleetEngine\Delivery\V1\CreateTaskRequest>|\Google\Protobuf\Internal\RepeatedField $requests + * Required. The request message that specifies the resources to create. + * Note: You can create a maximum of 500 tasks in a batch. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Fleetengine\Delivery\V1\DeliveryApi::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The standard Delivery API request header. + * Note: If you set this field, then the header field in the + * `CreateTaskRequest` messages must either be empty, or it must match this + * field. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Maps\FleetEngine\Delivery\V1\DeliveryRequestHeader|null + */ + public function getHeader() + { + return $this->header; + } + + public function hasHeader() + { + return isset($this->header); + } + + public function clearHeader() + { + unset($this->header); + } + + /** + * Optional. The standard Delivery API request header. + * Note: If you set this field, then the header field in the + * `CreateTaskRequest` messages must either be empty, or it must match this + * field. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Maps\FleetEngine\Delivery\V1\DeliveryRequestHeader $var + * @return $this + */ + public function setHeader($var) + { + GPBUtil::checkMessage($var, \Google\Maps\FleetEngine\Delivery\V1\DeliveryRequestHeader::class); + $this->header = $var; + + return $this; + } + + /** + * Required. The parent resource shared by all tasks. This value must be in + * the format `providers/{provider}`. The `provider` must be the Google Cloud + * Project ID. For example, `sample-cloud-project`. The parent field in the + * `CreateTaskRequest` messages must either be empty, or it must match this + * field. + * + * Generated from protobuf field string parent = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource shared by all tasks. This value must be in + * the format `providers/{provider}`. The `provider` must be the Google Cloud + * Project ID. For example, `sample-cloud-project`. The parent field in the + * `CreateTaskRequest` messages must either be empty, or it must match this + * field. + * + * Generated from protobuf field string parent = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The request message that specifies the resources to create. + * Note: You can create a maximum of 500 tasks in a batch. + * + * Generated from protobuf field repeated .maps.fleetengine.delivery.v1.CreateTaskRequest requests = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRequests() + { + return $this->requests; + } + + /** + * Required. The request message that specifies the resources to create. + * Note: You can create a maximum of 500 tasks in a batch. + * + * Generated from protobuf field repeated .maps.fleetengine.delivery.v1.CreateTaskRequest requests = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Maps\FleetEngine\Delivery\V1\CreateTaskRequest>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRequests($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\FleetEngine\Delivery\V1\CreateTaskRequest::class); + $this->requests = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/BatchCreateTasksResponse.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/BatchCreateTasksResponse.php new file mode 100644 index 000000000000..2f87fdd9b497 --- /dev/null +++ b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/BatchCreateTasksResponse.php @@ -0,0 +1,67 @@ +maps.fleetengine.delivery.v1.BatchCreateTasksResponse + */ +class BatchCreateTasksResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The created Tasks. + * + * Generated from protobuf field repeated .maps.fleetengine.delivery.v1.Task tasks = 1; + */ + private $tasks; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Maps\FleetEngine\Delivery\V1\Task>|\Google\Protobuf\Internal\RepeatedField $tasks + * The created Tasks. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Fleetengine\Delivery\V1\DeliveryApi::initOnce(); + parent::__construct($data); + } + + /** + * The created Tasks. + * + * Generated from protobuf field repeated .maps.fleetengine.delivery.v1.Task tasks = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTasks() + { + return $this->tasks; + } + + /** + * The created Tasks. + * + * Generated from protobuf field repeated .maps.fleetengine.delivery.v1.Task tasks = 1; + * @param array<\Google\Maps\FleetEngine\Delivery\V1\Task>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTasks($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\FleetEngine\Delivery\V1\Task::class); + $this->tasks = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/CreateDeliveryVehicleRequest.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/CreateDeliveryVehicleRequest.php new file mode 100644 index 000000000000..4af64a0a5ce4 --- /dev/null +++ b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/CreateDeliveryVehicleRequest.php @@ -0,0 +1,279 @@ +maps.fleetengine.delivery.v1.CreateDeliveryVehicleRequest + */ +class CreateDeliveryVehicleRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The standard Delivery API request header. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $header = null; + /** + * Required. Must be in the format `providers/{provider}`. The provider must + * be the Google Cloud Project ID. For example, `sample-cloud-project`. + * + * Generated from protobuf field string parent = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $parent = ''; + /** + * Required. The Delivery Vehicle ID must be unique and subject to the + * following restrictions: + * * Must be a valid Unicode string. + * * Limited to a maximum length of 64 characters. + * * Normalized according to [Unicode Normalization Form C] + * (http://www.unicode.org/reports/tr15/). + * * May not contain any of the following ASCII characters: '/', ':', '?', + * ',', or '#'. + * + * Generated from protobuf field string delivery_vehicle_id = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $delivery_vehicle_id = ''; + /** + * Required. The `DeliveryVehicle` entity to create. When creating a new + * delivery vehicle, you may set the following optional fields: + * * type + * * last_location + * * attributes + * Note: The DeliveryVehicle's `name` field is ignored. All other + * DeliveryVehicle fields must not be set; otherwise, an error is returned. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryVehicle delivery_vehicle = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $delivery_vehicle = null; + + /** + * @param string $parent Required. Must be in the format `providers/{provider}`. The provider must + * be the Google Cloud Project ID. For example, `sample-cloud-project`. + * @param \Google\Maps\FleetEngine\Delivery\V1\DeliveryVehicle $deliveryVehicle Required. The `DeliveryVehicle` entity to create. When creating a new + * delivery vehicle, you may set the following optional fields: + * + * * type + * * last_location + * * attributes + * + * Note: The DeliveryVehicle's `name` field is ignored. All other + * DeliveryVehicle fields must not be set; otherwise, an error is returned. + * @param string $deliveryVehicleId Required. The Delivery Vehicle ID must be unique and subject to the + * following restrictions: + * + * * Must be a valid Unicode string. + * * Limited to a maximum length of 64 characters. + * * Normalized according to [Unicode Normalization Form C] + * (http://www.unicode.org/reports/tr15/). + * * May not contain any of the following ASCII characters: '/', ':', '?', + * ',', or '#'. + * + * @return \Google\Maps\FleetEngine\Delivery\V1\CreateDeliveryVehicleRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Maps\FleetEngine\Delivery\V1\DeliveryVehicle $deliveryVehicle, string $deliveryVehicleId): self + { + return (new self()) + ->setParent($parent) + ->setDeliveryVehicle($deliveryVehicle) + ->setDeliveryVehicleId($deliveryVehicleId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Maps\FleetEngine\Delivery\V1\DeliveryRequestHeader $header + * Optional. The standard Delivery API request header. + * @type string $parent + * Required. Must be in the format `providers/{provider}`. The provider must + * be the Google Cloud Project ID. For example, `sample-cloud-project`. + * @type string $delivery_vehicle_id + * Required. The Delivery Vehicle ID must be unique and subject to the + * following restrictions: + * * Must be a valid Unicode string. + * * Limited to a maximum length of 64 characters. + * * Normalized according to [Unicode Normalization Form C] + * (http://www.unicode.org/reports/tr15/). + * * May not contain any of the following ASCII characters: '/', ':', '?', + * ',', or '#'. + * @type \Google\Maps\FleetEngine\Delivery\V1\DeliveryVehicle $delivery_vehicle + * Required. The `DeliveryVehicle` entity to create. When creating a new + * delivery vehicle, you may set the following optional fields: + * * type + * * last_location + * * attributes + * Note: The DeliveryVehicle's `name` field is ignored. All other + * DeliveryVehicle fields must not be set; otherwise, an error is returned. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Fleetengine\Delivery\V1\DeliveryApi::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The standard Delivery API request header. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Maps\FleetEngine\Delivery\V1\DeliveryRequestHeader|null + */ + public function getHeader() + { + return $this->header; + } + + public function hasHeader() + { + return isset($this->header); + } + + public function clearHeader() + { + unset($this->header); + } + + /** + * Optional. The standard Delivery API request header. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Maps\FleetEngine\Delivery\V1\DeliveryRequestHeader $var + * @return $this + */ + public function setHeader($var) + { + GPBUtil::checkMessage($var, \Google\Maps\FleetEngine\Delivery\V1\DeliveryRequestHeader::class); + $this->header = $var; + + return $this; + } + + /** + * Required. Must be in the format `providers/{provider}`. The provider must + * be the Google Cloud Project ID. For example, `sample-cloud-project`. + * + * Generated from protobuf field string parent = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Must be in the format `providers/{provider}`. The provider must + * be the Google Cloud Project ID. For example, `sample-cloud-project`. + * + * Generated from protobuf field string parent = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The Delivery Vehicle ID must be unique and subject to the + * following restrictions: + * * Must be a valid Unicode string. + * * Limited to a maximum length of 64 characters. + * * Normalized according to [Unicode Normalization Form C] + * (http://www.unicode.org/reports/tr15/). + * * May not contain any of the following ASCII characters: '/', ':', '?', + * ',', or '#'. + * + * Generated from protobuf field string delivery_vehicle_id = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDeliveryVehicleId() + { + return $this->delivery_vehicle_id; + } + + /** + * Required. The Delivery Vehicle ID must be unique and subject to the + * following restrictions: + * * Must be a valid Unicode string. + * * Limited to a maximum length of 64 characters. + * * Normalized according to [Unicode Normalization Form C] + * (http://www.unicode.org/reports/tr15/). + * * May not contain any of the following ASCII characters: '/', ':', '?', + * ',', or '#'. + * + * Generated from protobuf field string delivery_vehicle_id = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDeliveryVehicleId($var) + { + GPBUtil::checkString($var, True); + $this->delivery_vehicle_id = $var; + + return $this; + } + + /** + * Required. The `DeliveryVehicle` entity to create. When creating a new + * delivery vehicle, you may set the following optional fields: + * * type + * * last_location + * * attributes + * Note: The DeliveryVehicle's `name` field is ignored. All other + * DeliveryVehicle fields must not be set; otherwise, an error is returned. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryVehicle delivery_vehicle = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Maps\FleetEngine\Delivery\V1\DeliveryVehicle|null + */ + public function getDeliveryVehicle() + { + return $this->delivery_vehicle; + } + + public function hasDeliveryVehicle() + { + return isset($this->delivery_vehicle); + } + + public function clearDeliveryVehicle() + { + unset($this->delivery_vehicle); + } + + /** + * Required. The `DeliveryVehicle` entity to create. When creating a new + * delivery vehicle, you may set the following optional fields: + * * type + * * last_location + * * attributes + * Note: The DeliveryVehicle's `name` field is ignored. All other + * DeliveryVehicle fields must not be set; otherwise, an error is returned. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryVehicle delivery_vehicle = 5 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Maps\FleetEngine\Delivery\V1\DeliveryVehicle $var + * @return $this + */ + public function setDeliveryVehicle($var) + { + GPBUtil::checkMessage($var, \Google\Maps\FleetEngine\Delivery\V1\DeliveryVehicle::class); + $this->delivery_vehicle = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/CreateTaskRequest.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/CreateTaskRequest.php new file mode 100644 index 000000000000..a46f2f910ca5 --- /dev/null +++ b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/CreateTaskRequest.php @@ -0,0 +1,304 @@ +maps.fleetengine.delivery.v1.CreateTaskRequest + */ +class CreateTaskRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The standard Delivery API request header. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $header = null; + /** + * Required. Must be in the format `providers/{provider}`. The `provider` must + * be the Google Cloud Project ID. For example, `sample-cloud-project`. + * + * Generated from protobuf field string parent = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $parent = ''; + /** + * Required. The Task ID must be unique, but it should be not a shipment + * tracking ID. To store a shipment tracking ID, use the `tracking_id` field. + * Note that multiple tasks can have the same `tracking_id`. Task IDs are + * subject to the following restrictions: + * * Must be a valid Unicode string. + * * Limited to a maximum length of 64 characters. + * * Normalized according to [Unicode Normalization Form C] + * (http://www.unicode.org/reports/tr15/). + * * May not contain any of the following ASCII characters: '/', ':', '?', + * ',', or '#'. + * + * Generated from protobuf field string task_id = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $task_id = ''; + /** + * Required. The Task entity to create. + * When creating a Task, the following fields are required: + * * `type` + * * `state` (must be set to `OPEN`) + * * `tracking_id` (must not be set for `UNAVAILABLE` or `SCHEDULED_STOP` + * tasks, but required for all other task types) + * * `planned_location` (optional for `UNAVAILABLE` tasks) + * * `task_duration` + * Note: The Task's `name` field is ignored. All other Task fields must not be + * set; otherwise, an error is returned. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.Task task = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $task = null; + + /** + * @param string $parent Required. Must be in the format `providers/{provider}`. The `provider` must + * be the Google Cloud Project ID. For example, `sample-cloud-project`. + * @param \Google\Maps\FleetEngine\Delivery\V1\Task $task Required. The Task entity to create. + * When creating a Task, the following fields are required: + * + * * `type` + * * `state` (must be set to `OPEN`) + * * `tracking_id` (must not be set for `UNAVAILABLE` or `SCHEDULED_STOP` + * tasks, but required for all other task types) + * * `planned_location` (optional for `UNAVAILABLE` tasks) + * * `task_duration` + * + * Note: The Task's `name` field is ignored. All other Task fields must not be + * set; otherwise, an error is returned. + * @param string $taskId Required. The Task ID must be unique, but it should be not a shipment + * tracking ID. To store a shipment tracking ID, use the `tracking_id` field. + * Note that multiple tasks can have the same `tracking_id`. Task IDs are + * subject to the following restrictions: + * + * * Must be a valid Unicode string. + * * Limited to a maximum length of 64 characters. + * * Normalized according to [Unicode Normalization Form C] + * (http://www.unicode.org/reports/tr15/). + * * May not contain any of the following ASCII characters: '/', ':', '?', + * ',', or '#'. + * + * @return \Google\Maps\FleetEngine\Delivery\V1\CreateTaskRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Maps\FleetEngine\Delivery\V1\Task $task, string $taskId): self + { + return (new self()) + ->setParent($parent) + ->setTask($task) + ->setTaskId($taskId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Maps\FleetEngine\Delivery\V1\DeliveryRequestHeader $header + * Optional. The standard Delivery API request header. + * @type string $parent + * Required. Must be in the format `providers/{provider}`. The `provider` must + * be the Google Cloud Project ID. For example, `sample-cloud-project`. + * @type string $task_id + * Required. The Task ID must be unique, but it should be not a shipment + * tracking ID. To store a shipment tracking ID, use the `tracking_id` field. + * Note that multiple tasks can have the same `tracking_id`. Task IDs are + * subject to the following restrictions: + * * Must be a valid Unicode string. + * * Limited to a maximum length of 64 characters. + * * Normalized according to [Unicode Normalization Form C] + * (http://www.unicode.org/reports/tr15/). + * * May not contain any of the following ASCII characters: '/', ':', '?', + * ',', or '#'. + * @type \Google\Maps\FleetEngine\Delivery\V1\Task $task + * Required. The Task entity to create. + * When creating a Task, the following fields are required: + * * `type` + * * `state` (must be set to `OPEN`) + * * `tracking_id` (must not be set for `UNAVAILABLE` or `SCHEDULED_STOP` + * tasks, but required for all other task types) + * * `planned_location` (optional for `UNAVAILABLE` tasks) + * * `task_duration` + * Note: The Task's `name` field is ignored. All other Task fields must not be + * set; otherwise, an error is returned. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Fleetengine\Delivery\V1\DeliveryApi::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The standard Delivery API request header. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Maps\FleetEngine\Delivery\V1\DeliveryRequestHeader|null + */ + public function getHeader() + { + return $this->header; + } + + public function hasHeader() + { + return isset($this->header); + } + + public function clearHeader() + { + unset($this->header); + } + + /** + * Optional. The standard Delivery API request header. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Maps\FleetEngine\Delivery\V1\DeliveryRequestHeader $var + * @return $this + */ + public function setHeader($var) + { + GPBUtil::checkMessage($var, \Google\Maps\FleetEngine\Delivery\V1\DeliveryRequestHeader::class); + $this->header = $var; + + return $this; + } + + /** + * Required. Must be in the format `providers/{provider}`. The `provider` must + * be the Google Cloud Project ID. For example, `sample-cloud-project`. + * + * Generated from protobuf field string parent = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Must be in the format `providers/{provider}`. The `provider` must + * be the Google Cloud Project ID. For example, `sample-cloud-project`. + * + * Generated from protobuf field string parent = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The Task ID must be unique, but it should be not a shipment + * tracking ID. To store a shipment tracking ID, use the `tracking_id` field. + * Note that multiple tasks can have the same `tracking_id`. Task IDs are + * subject to the following restrictions: + * * Must be a valid Unicode string. + * * Limited to a maximum length of 64 characters. + * * Normalized according to [Unicode Normalization Form C] + * (http://www.unicode.org/reports/tr15/). + * * May not contain any of the following ASCII characters: '/', ':', '?', + * ',', or '#'. + * + * Generated from protobuf field string task_id = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getTaskId() + { + return $this->task_id; + } + + /** + * Required. The Task ID must be unique, but it should be not a shipment + * tracking ID. To store a shipment tracking ID, use the `tracking_id` field. + * Note that multiple tasks can have the same `tracking_id`. Task IDs are + * subject to the following restrictions: + * * Must be a valid Unicode string. + * * Limited to a maximum length of 64 characters. + * * Normalized according to [Unicode Normalization Form C] + * (http://www.unicode.org/reports/tr15/). + * * May not contain any of the following ASCII characters: '/', ':', '?', + * ',', or '#'. + * + * Generated from protobuf field string task_id = 5 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setTaskId($var) + { + GPBUtil::checkString($var, True); + $this->task_id = $var; + + return $this; + } + + /** + * Required. The Task entity to create. + * When creating a Task, the following fields are required: + * * `type` + * * `state` (must be set to `OPEN`) + * * `tracking_id` (must not be set for `UNAVAILABLE` or `SCHEDULED_STOP` + * tasks, but required for all other task types) + * * `planned_location` (optional for `UNAVAILABLE` tasks) + * * `task_duration` + * Note: The Task's `name` field is ignored. All other Task fields must not be + * set; otherwise, an error is returned. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.Task task = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Maps\FleetEngine\Delivery\V1\Task|null + */ + public function getTask() + { + return $this->task; + } + + public function hasTask() + { + return isset($this->task); + } + + public function clearTask() + { + unset($this->task); + } + + /** + * Required. The Task entity to create. + * When creating a Task, the following fields are required: + * * `type` + * * `state` (must be set to `OPEN`) + * * `tracking_id` (must not be set for `UNAVAILABLE` or `SCHEDULED_STOP` + * tasks, but required for all other task types) + * * `planned_location` (optional for `UNAVAILABLE` tasks) + * * `task_duration` + * Note: The Task's `name` field is ignored. All other Task fields must not be + * set; otherwise, an error is returned. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.Task task = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Maps\FleetEngine\Delivery\V1\Task $var + * @return $this + */ + public function setTask($var) + { + GPBUtil::checkMessage($var, \Google\Maps\FleetEngine\Delivery\V1\Task::class); + $this->task = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/DeliveryRequestHeader.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/DeliveryRequestHeader.php new file mode 100644 index 000000000000..99c677f30314 --- /dev/null +++ b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/DeliveryRequestHeader.php @@ -0,0 +1,493 @@ +maps.fleetengine.delivery.v1.DeliveryRequestHeader + */ +class DeliveryRequestHeader extends \Google\Protobuf\Internal\Message +{ + /** + * The BCP-47 language code, such as en-US or sr-Latn. For more information, + * see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. If none + * is specified, the response may be in any language, with a preference for + * English if such a name exists. Field value example: `en-US`. + * + * Generated from protobuf field string language_code = 1; + */ + protected $language_code = ''; + /** + * Required. CLDR region code of the region where the request originates. + * Field value example: `US`. + * + * Generated from protobuf field string region_code = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $region_code = ''; + /** + * Version of the calling SDK, if applicable. + * The version format is "major.minor.patch", example: `1.1.2`. + * + * Generated from protobuf field string sdk_version = 3; + */ + protected $sdk_version = ''; + /** + * Version of the operating system on which the calling SDK is running. + * Field value examples: `4.4.1`, `12.1`. + * + * Generated from protobuf field string os_version = 4; + */ + protected $os_version = ''; + /** + * Model of the device on which the calling SDK is running. + * Field value examples: `iPhone12,1`, `SM-G920F`. + * + * Generated from protobuf field string device_model = 5; + */ + protected $device_model = ''; + /** + * The type of SDK sending the request. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryRequestHeader.SdkType sdk_type = 6; + */ + protected $sdk_type = 0; + /** + * Version of the MapSDK which the calling SDK depends on, if applicable. + * The version format is "major.minor.patch", example: `5.2.1`. + * + * Generated from protobuf field string maps_sdk_version = 7; + */ + protected $maps_sdk_version = ''; + /** + * Version of the NavSDK which the calling SDK depends on, if applicable. + * The version format is "major.minor.patch", example: `2.1.0`. + * + * Generated from protobuf field string nav_sdk_version = 8; + */ + protected $nav_sdk_version = ''; + /** + * Platform of the calling SDK. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryRequestHeader.Platform platform = 9; + */ + protected $platform = 0; + /** + * Manufacturer of the Android device from the calling SDK, only applicable + * for the Android SDKs. + * Field value example: `Samsung`. + * + * Generated from protobuf field string manufacturer = 10; + */ + protected $manufacturer = ''; + /** + * Android API level of the calling SDK, only applicable for the Android SDKs. + * Field value example: `23`. + * + * Generated from protobuf field int32 android_api_level = 11; + */ + protected $android_api_level = 0; + /** + * Optional ID that can be provided for logging purposes in order to identify + * the request. + * + * Generated from protobuf field string trace_id = 12; + */ + protected $trace_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $language_code + * The BCP-47 language code, such as en-US or sr-Latn. For more information, + * see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. If none + * is specified, the response may be in any language, with a preference for + * English if such a name exists. Field value example: `en-US`. + * @type string $region_code + * Required. CLDR region code of the region where the request originates. + * Field value example: `US`. + * @type string $sdk_version + * Version of the calling SDK, if applicable. + * The version format is "major.minor.patch", example: `1.1.2`. + * @type string $os_version + * Version of the operating system on which the calling SDK is running. + * Field value examples: `4.4.1`, `12.1`. + * @type string $device_model + * Model of the device on which the calling SDK is running. + * Field value examples: `iPhone12,1`, `SM-G920F`. + * @type int $sdk_type + * The type of SDK sending the request. + * @type string $maps_sdk_version + * Version of the MapSDK which the calling SDK depends on, if applicable. + * The version format is "major.minor.patch", example: `5.2.1`. + * @type string $nav_sdk_version + * Version of the NavSDK which the calling SDK depends on, if applicable. + * The version format is "major.minor.patch", example: `2.1.0`. + * @type int $platform + * Platform of the calling SDK. + * @type string $manufacturer + * Manufacturer of the Android device from the calling SDK, only applicable + * for the Android SDKs. + * Field value example: `Samsung`. + * @type int $android_api_level + * Android API level of the calling SDK, only applicable for the Android SDKs. + * Field value example: `23`. + * @type string $trace_id + * Optional ID that can be provided for logging purposes in order to identify + * the request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Fleetengine\Delivery\V1\Header::initOnce(); + parent::__construct($data); + } + + /** + * The BCP-47 language code, such as en-US or sr-Latn. For more information, + * see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. If none + * is specified, the response may be in any language, with a preference for + * English if such a name exists. Field value example: `en-US`. + * + * Generated from protobuf field string language_code = 1; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * The BCP-47 language code, such as en-US or sr-Latn. For more information, + * see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. If none + * is specified, the response may be in any language, with a preference for + * English if such a name exists. Field value example: `en-US`. + * + * Generated from protobuf field string language_code = 1; + * @param string $var + * @return $this + */ + public function setLanguageCode($var) + { + GPBUtil::checkString($var, True); + $this->language_code = $var; + + return $this; + } + + /** + * Required. CLDR region code of the region where the request originates. + * Field value example: `US`. + * + * Generated from protobuf field string region_code = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getRegionCode() + { + return $this->region_code; + } + + /** + * Required. CLDR region code of the region where the request originates. + * Field value example: `US`. + * + * Generated from protobuf field string region_code = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setRegionCode($var) + { + GPBUtil::checkString($var, True); + $this->region_code = $var; + + return $this; + } + + /** + * Version of the calling SDK, if applicable. + * The version format is "major.minor.patch", example: `1.1.2`. + * + * Generated from protobuf field string sdk_version = 3; + * @return string + */ + public function getSdkVersion() + { + return $this->sdk_version; + } + + /** + * Version of the calling SDK, if applicable. + * The version format is "major.minor.patch", example: `1.1.2`. + * + * Generated from protobuf field string sdk_version = 3; + * @param string $var + * @return $this + */ + public function setSdkVersion($var) + { + GPBUtil::checkString($var, True); + $this->sdk_version = $var; + + return $this; + } + + /** + * Version of the operating system on which the calling SDK is running. + * Field value examples: `4.4.1`, `12.1`. + * + * Generated from protobuf field string os_version = 4; + * @return string + */ + public function getOsVersion() + { + return $this->os_version; + } + + /** + * Version of the operating system on which the calling SDK is running. + * Field value examples: `4.4.1`, `12.1`. + * + * Generated from protobuf field string os_version = 4; + * @param string $var + * @return $this + */ + public function setOsVersion($var) + { + GPBUtil::checkString($var, True); + $this->os_version = $var; + + return $this; + } + + /** + * Model of the device on which the calling SDK is running. + * Field value examples: `iPhone12,1`, `SM-G920F`. + * + * Generated from protobuf field string device_model = 5; + * @return string + */ + public function getDeviceModel() + { + return $this->device_model; + } + + /** + * Model of the device on which the calling SDK is running. + * Field value examples: `iPhone12,1`, `SM-G920F`. + * + * Generated from protobuf field string device_model = 5; + * @param string $var + * @return $this + */ + public function setDeviceModel($var) + { + GPBUtil::checkString($var, True); + $this->device_model = $var; + + return $this; + } + + /** + * The type of SDK sending the request. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryRequestHeader.SdkType sdk_type = 6; + * @return int + */ + public function getSdkType() + { + return $this->sdk_type; + } + + /** + * The type of SDK sending the request. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryRequestHeader.SdkType sdk_type = 6; + * @param int $var + * @return $this + */ + public function setSdkType($var) + { + GPBUtil::checkEnum($var, \Google\Maps\FleetEngine\Delivery\V1\DeliveryRequestHeader\SdkType::class); + $this->sdk_type = $var; + + return $this; + } + + /** + * Version of the MapSDK which the calling SDK depends on, if applicable. + * The version format is "major.minor.patch", example: `5.2.1`. + * + * Generated from protobuf field string maps_sdk_version = 7; + * @return string + */ + public function getMapsSdkVersion() + { + return $this->maps_sdk_version; + } + + /** + * Version of the MapSDK which the calling SDK depends on, if applicable. + * The version format is "major.minor.patch", example: `5.2.1`. + * + * Generated from protobuf field string maps_sdk_version = 7; + * @param string $var + * @return $this + */ + public function setMapsSdkVersion($var) + { + GPBUtil::checkString($var, True); + $this->maps_sdk_version = $var; + + return $this; + } + + /** + * Version of the NavSDK which the calling SDK depends on, if applicable. + * The version format is "major.minor.patch", example: `2.1.0`. + * + * Generated from protobuf field string nav_sdk_version = 8; + * @return string + */ + public function getNavSdkVersion() + { + return $this->nav_sdk_version; + } + + /** + * Version of the NavSDK which the calling SDK depends on, if applicable. + * The version format is "major.minor.patch", example: `2.1.0`. + * + * Generated from protobuf field string nav_sdk_version = 8; + * @param string $var + * @return $this + */ + public function setNavSdkVersion($var) + { + GPBUtil::checkString($var, True); + $this->nav_sdk_version = $var; + + return $this; + } + + /** + * Platform of the calling SDK. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryRequestHeader.Platform platform = 9; + * @return int + */ + public function getPlatform() + { + return $this->platform; + } + + /** + * Platform of the calling SDK. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryRequestHeader.Platform platform = 9; + * @param int $var + * @return $this + */ + public function setPlatform($var) + { + GPBUtil::checkEnum($var, \Google\Maps\FleetEngine\Delivery\V1\DeliveryRequestHeader\Platform::class); + $this->platform = $var; + + return $this; + } + + /** + * Manufacturer of the Android device from the calling SDK, only applicable + * for the Android SDKs. + * Field value example: `Samsung`. + * + * Generated from protobuf field string manufacturer = 10; + * @return string + */ + public function getManufacturer() + { + return $this->manufacturer; + } + + /** + * Manufacturer of the Android device from the calling SDK, only applicable + * for the Android SDKs. + * Field value example: `Samsung`. + * + * Generated from protobuf field string manufacturer = 10; + * @param string $var + * @return $this + */ + public function setManufacturer($var) + { + GPBUtil::checkString($var, True); + $this->manufacturer = $var; + + return $this; + } + + /** + * Android API level of the calling SDK, only applicable for the Android SDKs. + * Field value example: `23`. + * + * Generated from protobuf field int32 android_api_level = 11; + * @return int + */ + public function getAndroidApiLevel() + { + return $this->android_api_level; + } + + /** + * Android API level of the calling SDK, only applicable for the Android SDKs. + * Field value example: `23`. + * + * Generated from protobuf field int32 android_api_level = 11; + * @param int $var + * @return $this + */ + public function setAndroidApiLevel($var) + { + GPBUtil::checkInt32($var); + $this->android_api_level = $var; + + return $this; + } + + /** + * Optional ID that can be provided for logging purposes in order to identify + * the request. + * + * Generated from protobuf field string trace_id = 12; + * @return string + */ + public function getTraceId() + { + return $this->trace_id; + } + + /** + * Optional ID that can be provided for logging purposes in order to identify + * the request. + * + * Generated from protobuf field string trace_id = 12; + * @param string $var + * @return $this + */ + public function setTraceId($var) + { + GPBUtil::checkString($var, True); + $this->trace_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/DeliveryRequestHeader/Platform.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/DeliveryRequestHeader/Platform.php new file mode 100644 index 000000000000..765859442242 --- /dev/null +++ b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/DeliveryRequestHeader/Platform.php @@ -0,0 +1,71 @@ +maps.fleetengine.delivery.v1.DeliveryRequestHeader.Platform + */ +class Platform +{ + /** + * The default value. This value is used if the platform is omitted. + * + * Generated from protobuf enum PLATFORM_UNSPECIFIED = 0; + */ + const PLATFORM_UNSPECIFIED = 0; + /** + * The request is coming from Android. + * + * Generated from protobuf enum ANDROID = 1; + */ + const ANDROID = 1; + /** + * The request is coming from iOS. + * + * Generated from protobuf enum IOS = 2; + */ + const IOS = 2; + /** + * The request is coming from the web. + * + * Generated from protobuf enum WEB = 3; + */ + const WEB = 3; + + private static $valueToName = [ + self::PLATFORM_UNSPECIFIED => 'PLATFORM_UNSPECIFIED', + self::ANDROID => 'ANDROID', + self::IOS => 'IOS', + self::WEB => 'WEB', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Platform::class, \Google\Maps\FleetEngine\Delivery\V1\DeliveryRequestHeader_Platform::class); + diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/DeliveryRequestHeader/SdkType.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/DeliveryRequestHeader/SdkType.php new file mode 100644 index 000000000000..1c4eb571244c --- /dev/null +++ b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/DeliveryRequestHeader/SdkType.php @@ -0,0 +1,71 @@ +maps.fleetengine.delivery.v1.DeliveryRequestHeader.SdkType + */ +class SdkType +{ + /** + * The default value. This value is used if the `sdk_type` is omitted. + * + * Generated from protobuf enum SDK_TYPE_UNSPECIFIED = 0; + */ + const SDK_TYPE_UNSPECIFIED = 0; + /** + * The calling SDK is Consumer. + * + * Generated from protobuf enum CONSUMER = 1; + */ + const CONSUMER = 1; + /** + * The calling SDK is Driver. + * + * Generated from protobuf enum DRIVER = 2; + */ + const DRIVER = 2; + /** + * The calling SDK is JavaScript. + * + * Generated from protobuf enum JAVASCRIPT = 3; + */ + const JAVASCRIPT = 3; + + private static $valueToName = [ + self::SDK_TYPE_UNSPECIFIED => 'SDK_TYPE_UNSPECIFIED', + self::CONSUMER => 'CONSUMER', + self::DRIVER => 'DRIVER', + self::JAVASCRIPT => 'JAVASCRIPT', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SdkType::class, \Google\Maps\FleetEngine\Delivery\V1\DeliveryRequestHeader_SdkType::class); + diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/DeliveryVehicle.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/DeliveryVehicle.php new file mode 100644 index 000000000000..30bf0c4151e0 --- /dev/null +++ b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/DeliveryVehicle.php @@ -0,0 +1,671 @@ +maps.fleetengine.delivery.v1.DeliveryVehicle + */ +class DeliveryVehicle extends \Google\Protobuf\Internal\Message +{ + /** + * The unique name of this Delivery Vehicle. + * The format is `providers/{provider}/deliveryVehicles/{vehicle}`. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The last reported location of the Delivery Vehicle. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryVehicleLocation last_location = 2; + */ + protected $last_location = null; + /** + * The Delivery Vehicle's navigation status. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryVehicleNavigationStatus navigation_status = 3; + */ + protected $navigation_status = 0; + /** + * The encoded polyline specifying the route that the navigation recommends + * taking to the next waypoint. Your driver app updates this when a + * stop is reached or passed, and when the navigation reroutes. These + * `LatLng`s are returned in + * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0].path` + * (gRPC) or `Task.journeySharingInfo.remainingVehicleJourneySegments[0].path` + * (REST) for all active Tasks assigned to the Vehicle. + * There are a few cases where this field might not be used to populate + * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0].path` + * (gRPC) or `Task.journeySharingInfo.remainingVehicleJourneySegments[0].path` + * (REST): + * * The endpoint of the `current_route_segment` does not match + * `DeliveryVehicle.remaining_vehicle_journey_segments[0].stop` (gRPC) or + * `DeliveryVehicle.remainingVehicleJourneySegments[0].stop` (REST). + * * The driver app has not updated its location recently, so the last + * updated value for this field might be stale. + * * The driver app has recently updated its location, but the + * `current_route_segment` is stale, and points to a previous vehicle stop. + * In these cases, Fleet Engine populates this field with a route from the + * most recently passed VehicleStop to the upcoming VehicleStop to ensure that + * the consumer of this field has the best available information on the + * current path of the Delivery Vehicle. + * + * Generated from protobuf field bytes current_route_segment = 4; + */ + protected $current_route_segment = ''; + /** + * The location where the `current_route_segment` ends. This is not currently + * populated by the driver app, but you can supply it on + * `UpdateDeliveryVehicle` calls. It is either the `LatLng` from the upcoming + * vehicle stop, or the last `LatLng` of the `current_route_segment`. Fleet + * Engine will then do its best to interpolate to an actual `VehicleStop`. + * This field is ignored in `UpdateDeliveryVehicle` calls if the + * `current_route_segment` field is empty. + * + * Generated from protobuf field .google.type.LatLng current_route_segment_end_point = 5; + */ + protected $current_route_segment_end_point = null; + /** + * The remaining driving distance for the `current_route_segment`. + * The Driver app typically provides this field, but there are some + * circumstances in which Fleet Engine will override the value sent by the + * app. For more information, see + * [DeliveryVehicle.current_route_segment][maps.fleetengine.delivery.v1.DeliveryVehicle.current_route_segment]. + * This field is returned in + * `Task.remaining_vehicle_journey_segments[0].driving_distance_meters` (gRPC) + * or `Task.remainingVehicleJourneySegments[0].drivingDistanceMeters` (REST) + * for all active `Task`s assigned to the Delivery Vehicle. + * Fleet Engine ignores this field in `UpdateDeliveryVehicleRequest` if the + * `current_route_segment` field is empty. + * + * Generated from protobuf field .google.protobuf.Int32Value remaining_distance_meters = 6; + */ + protected $remaining_distance_meters = null; + /** + * The remaining driving time for the `current_route_segment`. + * The Driver app typically provides this field, but there are some + * circumstances in which Fleet Engine will override the value sent by the + * app. For more information, see + * [DeliveryVehicle.current_route_segment][maps.fleetengine.delivery.v1.DeliveryVehicle.current_route_segment]. + * This field is returned in + * `Task.remaining_vehicle_journey_segments[0].driving_duration` (gRPC) or + * `Task.remainingVehicleJourneySegments[0].drivingDuration` (REST) for all + * active tasks assigned to the Delivery Vehicle. + * Fleet Engine ignores this field in `UpdateDeliveryVehicleRequest` if the + * `current_route_segment` field is empty. + * + * Generated from protobuf field .google.protobuf.Duration remaining_duration = 7; + */ + protected $remaining_duration = null; + /** + * The journey segments assigned to this Delivery Vehicle, starting from the + * Vehicle's most recently reported location. This field won't be populated + * in the response of `ListDeliveryVehicles`. + * + * Generated from protobuf field repeated .maps.fleetengine.delivery.v1.VehicleJourneySegment remaining_vehicle_journey_segments = 8; + */ + private $remaining_vehicle_journey_segments; + /** + * A list of custom Delivery Vehicle attributes. A Delivery Vehicle can have + * at most 100 attributes, and each attribute must have a unique key. + * + * Generated from protobuf field repeated .maps.fleetengine.delivery.v1.DeliveryVehicleAttribute attributes = 9; + */ + private $attributes; + /** + * The type of this delivery vehicle. If unset, this will default to `AUTO`. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryVehicle.DeliveryVehicleType type = 10; + */ + protected $type = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The unique name of this Delivery Vehicle. + * The format is `providers/{provider}/deliveryVehicles/{vehicle}`. + * @type \Google\Maps\FleetEngine\Delivery\V1\DeliveryVehicleLocation $last_location + * The last reported location of the Delivery Vehicle. + * @type int $navigation_status + * The Delivery Vehicle's navigation status. + * @type string $current_route_segment + * The encoded polyline specifying the route that the navigation recommends + * taking to the next waypoint. Your driver app updates this when a + * stop is reached or passed, and when the navigation reroutes. These + * `LatLng`s are returned in + * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0].path` + * (gRPC) or `Task.journeySharingInfo.remainingVehicleJourneySegments[0].path` + * (REST) for all active Tasks assigned to the Vehicle. + * There are a few cases where this field might not be used to populate + * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0].path` + * (gRPC) or `Task.journeySharingInfo.remainingVehicleJourneySegments[0].path` + * (REST): + * * The endpoint of the `current_route_segment` does not match + * `DeliveryVehicle.remaining_vehicle_journey_segments[0].stop` (gRPC) or + * `DeliveryVehicle.remainingVehicleJourneySegments[0].stop` (REST). + * * The driver app has not updated its location recently, so the last + * updated value for this field might be stale. + * * The driver app has recently updated its location, but the + * `current_route_segment` is stale, and points to a previous vehicle stop. + * In these cases, Fleet Engine populates this field with a route from the + * most recently passed VehicleStop to the upcoming VehicleStop to ensure that + * the consumer of this field has the best available information on the + * current path of the Delivery Vehicle. + * @type \Google\Type\LatLng $current_route_segment_end_point + * The location where the `current_route_segment` ends. This is not currently + * populated by the driver app, but you can supply it on + * `UpdateDeliveryVehicle` calls. It is either the `LatLng` from the upcoming + * vehicle stop, or the last `LatLng` of the `current_route_segment`. Fleet + * Engine will then do its best to interpolate to an actual `VehicleStop`. + * This field is ignored in `UpdateDeliveryVehicle` calls if the + * `current_route_segment` field is empty. + * @type \Google\Protobuf\Int32Value $remaining_distance_meters + * The remaining driving distance for the `current_route_segment`. + * The Driver app typically provides this field, but there are some + * circumstances in which Fleet Engine will override the value sent by the + * app. For more information, see + * [DeliveryVehicle.current_route_segment][maps.fleetengine.delivery.v1.DeliveryVehicle.current_route_segment]. + * This field is returned in + * `Task.remaining_vehicle_journey_segments[0].driving_distance_meters` (gRPC) + * or `Task.remainingVehicleJourneySegments[0].drivingDistanceMeters` (REST) + * for all active `Task`s assigned to the Delivery Vehicle. + * Fleet Engine ignores this field in `UpdateDeliveryVehicleRequest` if the + * `current_route_segment` field is empty. + * @type \Google\Protobuf\Duration $remaining_duration + * The remaining driving time for the `current_route_segment`. + * The Driver app typically provides this field, but there are some + * circumstances in which Fleet Engine will override the value sent by the + * app. For more information, see + * [DeliveryVehicle.current_route_segment][maps.fleetengine.delivery.v1.DeliveryVehicle.current_route_segment]. + * This field is returned in + * `Task.remaining_vehicle_journey_segments[0].driving_duration` (gRPC) or + * `Task.remainingVehicleJourneySegments[0].drivingDuration` (REST) for all + * active tasks assigned to the Delivery Vehicle. + * Fleet Engine ignores this field in `UpdateDeliveryVehicleRequest` if the + * `current_route_segment` field is empty. + * @type array<\Google\Maps\FleetEngine\Delivery\V1\VehicleJourneySegment>|\Google\Protobuf\Internal\RepeatedField $remaining_vehicle_journey_segments + * The journey segments assigned to this Delivery Vehicle, starting from the + * Vehicle's most recently reported location. This field won't be populated + * in the response of `ListDeliveryVehicles`. + * @type array<\Google\Maps\FleetEngine\Delivery\V1\DeliveryVehicleAttribute>|\Google\Protobuf\Internal\RepeatedField $attributes + * A list of custom Delivery Vehicle attributes. A Delivery Vehicle can have + * at most 100 attributes, and each attribute must have a unique key. + * @type int $type + * The type of this delivery vehicle. If unset, this will default to `AUTO`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Fleetengine\Delivery\V1\DeliveryVehicles::initOnce(); + parent::__construct($data); + } + + /** + * The unique name of this Delivery Vehicle. + * The format is `providers/{provider}/deliveryVehicles/{vehicle}`. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The unique name of this Delivery Vehicle. + * The format is `providers/{provider}/deliveryVehicles/{vehicle}`. + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The last reported location of the Delivery Vehicle. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryVehicleLocation last_location = 2; + * @return \Google\Maps\FleetEngine\Delivery\V1\DeliveryVehicleLocation|null + */ + public function getLastLocation() + { + return $this->last_location; + } + + public function hasLastLocation() + { + return isset($this->last_location); + } + + public function clearLastLocation() + { + unset($this->last_location); + } + + /** + * The last reported location of the Delivery Vehicle. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryVehicleLocation last_location = 2; + * @param \Google\Maps\FleetEngine\Delivery\V1\DeliveryVehicleLocation $var + * @return $this + */ + public function setLastLocation($var) + { + GPBUtil::checkMessage($var, \Google\Maps\FleetEngine\Delivery\V1\DeliveryVehicleLocation::class); + $this->last_location = $var; + + return $this; + } + + /** + * The Delivery Vehicle's navigation status. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryVehicleNavigationStatus navigation_status = 3; + * @return int + */ + public function getNavigationStatus() + { + return $this->navigation_status; + } + + /** + * The Delivery Vehicle's navigation status. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryVehicleNavigationStatus navigation_status = 3; + * @param int $var + * @return $this + */ + public function setNavigationStatus($var) + { + GPBUtil::checkEnum($var, \Google\Maps\FleetEngine\Delivery\V1\DeliveryVehicleNavigationStatus::class); + $this->navigation_status = $var; + + return $this; + } + + /** + * The encoded polyline specifying the route that the navigation recommends + * taking to the next waypoint. Your driver app updates this when a + * stop is reached or passed, and when the navigation reroutes. These + * `LatLng`s are returned in + * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0].path` + * (gRPC) or `Task.journeySharingInfo.remainingVehicleJourneySegments[0].path` + * (REST) for all active Tasks assigned to the Vehicle. + * There are a few cases where this field might not be used to populate + * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0].path` + * (gRPC) or `Task.journeySharingInfo.remainingVehicleJourneySegments[0].path` + * (REST): + * * The endpoint of the `current_route_segment` does not match + * `DeliveryVehicle.remaining_vehicle_journey_segments[0].stop` (gRPC) or + * `DeliveryVehicle.remainingVehicleJourneySegments[0].stop` (REST). + * * The driver app has not updated its location recently, so the last + * updated value for this field might be stale. + * * The driver app has recently updated its location, but the + * `current_route_segment` is stale, and points to a previous vehicle stop. + * In these cases, Fleet Engine populates this field with a route from the + * most recently passed VehicleStop to the upcoming VehicleStop to ensure that + * the consumer of this field has the best available information on the + * current path of the Delivery Vehicle. + * + * Generated from protobuf field bytes current_route_segment = 4; + * @return string + */ + public function getCurrentRouteSegment() + { + return $this->current_route_segment; + } + + /** + * The encoded polyline specifying the route that the navigation recommends + * taking to the next waypoint. Your driver app updates this when a + * stop is reached or passed, and when the navigation reroutes. These + * `LatLng`s are returned in + * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0].path` + * (gRPC) or `Task.journeySharingInfo.remainingVehicleJourneySegments[0].path` + * (REST) for all active Tasks assigned to the Vehicle. + * There are a few cases where this field might not be used to populate + * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0].path` + * (gRPC) or `Task.journeySharingInfo.remainingVehicleJourneySegments[0].path` + * (REST): + * * The endpoint of the `current_route_segment` does not match + * `DeliveryVehicle.remaining_vehicle_journey_segments[0].stop` (gRPC) or + * `DeliveryVehicle.remainingVehicleJourneySegments[0].stop` (REST). + * * The driver app has not updated its location recently, so the last + * updated value for this field might be stale. + * * The driver app has recently updated its location, but the + * `current_route_segment` is stale, and points to a previous vehicle stop. + * In these cases, Fleet Engine populates this field with a route from the + * most recently passed VehicleStop to the upcoming VehicleStop to ensure that + * the consumer of this field has the best available information on the + * current path of the Delivery Vehicle. + * + * Generated from protobuf field bytes current_route_segment = 4; + * @param string $var + * @return $this + */ + public function setCurrentRouteSegment($var) + { + GPBUtil::checkString($var, False); + $this->current_route_segment = $var; + + return $this; + } + + /** + * The location where the `current_route_segment` ends. This is not currently + * populated by the driver app, but you can supply it on + * `UpdateDeliveryVehicle` calls. It is either the `LatLng` from the upcoming + * vehicle stop, or the last `LatLng` of the `current_route_segment`. Fleet + * Engine will then do its best to interpolate to an actual `VehicleStop`. + * This field is ignored in `UpdateDeliveryVehicle` calls if the + * `current_route_segment` field is empty. + * + * Generated from protobuf field .google.type.LatLng current_route_segment_end_point = 5; + * @return \Google\Type\LatLng|null + */ + public function getCurrentRouteSegmentEndPoint() + { + return $this->current_route_segment_end_point; + } + + public function hasCurrentRouteSegmentEndPoint() + { + return isset($this->current_route_segment_end_point); + } + + public function clearCurrentRouteSegmentEndPoint() + { + unset($this->current_route_segment_end_point); + } + + /** + * The location where the `current_route_segment` ends. This is not currently + * populated by the driver app, but you can supply it on + * `UpdateDeliveryVehicle` calls. It is either the `LatLng` from the upcoming + * vehicle stop, or the last `LatLng` of the `current_route_segment`. Fleet + * Engine will then do its best to interpolate to an actual `VehicleStop`. + * This field is ignored in `UpdateDeliveryVehicle` calls if the + * `current_route_segment` field is empty. + * + * Generated from protobuf field .google.type.LatLng current_route_segment_end_point = 5; + * @param \Google\Type\LatLng $var + * @return $this + */ + public function setCurrentRouteSegmentEndPoint($var) + { + GPBUtil::checkMessage($var, \Google\Type\LatLng::class); + $this->current_route_segment_end_point = $var; + + return $this; + } + + /** + * The remaining driving distance for the `current_route_segment`. + * The Driver app typically provides this field, but there are some + * circumstances in which Fleet Engine will override the value sent by the + * app. For more information, see + * [DeliveryVehicle.current_route_segment][maps.fleetengine.delivery.v1.DeliveryVehicle.current_route_segment]. + * This field is returned in + * `Task.remaining_vehicle_journey_segments[0].driving_distance_meters` (gRPC) + * or `Task.remainingVehicleJourneySegments[0].drivingDistanceMeters` (REST) + * for all active `Task`s assigned to the Delivery Vehicle. + * Fleet Engine ignores this field in `UpdateDeliveryVehicleRequest` if the + * `current_route_segment` field is empty. + * + * Generated from protobuf field .google.protobuf.Int32Value remaining_distance_meters = 6; + * @return \Google\Protobuf\Int32Value|null + */ + public function getRemainingDistanceMeters() + { + return $this->remaining_distance_meters; + } + + public function hasRemainingDistanceMeters() + { + return isset($this->remaining_distance_meters); + } + + public function clearRemainingDistanceMeters() + { + unset($this->remaining_distance_meters); + } + + /** + * Returns the unboxed value from getRemainingDistanceMeters() + + * The remaining driving distance for the `current_route_segment`. + * The Driver app typically provides this field, but there are some + * circumstances in which Fleet Engine will override the value sent by the + * app. For more information, see + * [DeliveryVehicle.current_route_segment][maps.fleetengine.delivery.v1.DeliveryVehicle.current_route_segment]. + * This field is returned in + * `Task.remaining_vehicle_journey_segments[0].driving_distance_meters` (gRPC) + * or `Task.remainingVehicleJourneySegments[0].drivingDistanceMeters` (REST) + * for all active `Task`s assigned to the Delivery Vehicle. + * Fleet Engine ignores this field in `UpdateDeliveryVehicleRequest` if the + * `current_route_segment` field is empty. + * + * Generated from protobuf field .google.protobuf.Int32Value remaining_distance_meters = 6; + * @return int|null + */ + public function getRemainingDistanceMetersUnwrapped() + { + return $this->readWrapperValue("remaining_distance_meters"); + } + + /** + * The remaining driving distance for the `current_route_segment`. + * The Driver app typically provides this field, but there are some + * circumstances in which Fleet Engine will override the value sent by the + * app. For more information, see + * [DeliveryVehicle.current_route_segment][maps.fleetengine.delivery.v1.DeliveryVehicle.current_route_segment]. + * This field is returned in + * `Task.remaining_vehicle_journey_segments[0].driving_distance_meters` (gRPC) + * or `Task.remainingVehicleJourneySegments[0].drivingDistanceMeters` (REST) + * for all active `Task`s assigned to the Delivery Vehicle. + * Fleet Engine ignores this field in `UpdateDeliveryVehicleRequest` if the + * `current_route_segment` field is empty. + * + * Generated from protobuf field .google.protobuf.Int32Value remaining_distance_meters = 6; + * @param \Google\Protobuf\Int32Value $var + * @return $this + */ + public function setRemainingDistanceMeters($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class); + $this->remaining_distance_meters = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object. + + * The remaining driving distance for the `current_route_segment`. + * The Driver app typically provides this field, but there are some + * circumstances in which Fleet Engine will override the value sent by the + * app. For more information, see + * [DeliveryVehicle.current_route_segment][maps.fleetengine.delivery.v1.DeliveryVehicle.current_route_segment]. + * This field is returned in + * `Task.remaining_vehicle_journey_segments[0].driving_distance_meters` (gRPC) + * or `Task.remainingVehicleJourneySegments[0].drivingDistanceMeters` (REST) + * for all active `Task`s assigned to the Delivery Vehicle. + * Fleet Engine ignores this field in `UpdateDeliveryVehicleRequest` if the + * `current_route_segment` field is empty. + * + * Generated from protobuf field .google.protobuf.Int32Value remaining_distance_meters = 6; + * @param int|null $var + * @return $this + */ + public function setRemainingDistanceMetersUnwrapped($var) + { + $this->writeWrapperValue("remaining_distance_meters", $var); + return $this;} + + /** + * The remaining driving time for the `current_route_segment`. + * The Driver app typically provides this field, but there are some + * circumstances in which Fleet Engine will override the value sent by the + * app. For more information, see + * [DeliveryVehicle.current_route_segment][maps.fleetengine.delivery.v1.DeliveryVehicle.current_route_segment]. + * This field is returned in + * `Task.remaining_vehicle_journey_segments[0].driving_duration` (gRPC) or + * `Task.remainingVehicleJourneySegments[0].drivingDuration` (REST) for all + * active tasks assigned to the Delivery Vehicle. + * Fleet Engine ignores this field in `UpdateDeliveryVehicleRequest` if the + * `current_route_segment` field is empty. + * + * Generated from protobuf field .google.protobuf.Duration remaining_duration = 7; + * @return \Google\Protobuf\Duration|null + */ + public function getRemainingDuration() + { + return $this->remaining_duration; + } + + public function hasRemainingDuration() + { + return isset($this->remaining_duration); + } + + public function clearRemainingDuration() + { + unset($this->remaining_duration); + } + + /** + * The remaining driving time for the `current_route_segment`. + * The Driver app typically provides this field, but there are some + * circumstances in which Fleet Engine will override the value sent by the + * app. For more information, see + * [DeliveryVehicle.current_route_segment][maps.fleetengine.delivery.v1.DeliveryVehicle.current_route_segment]. + * This field is returned in + * `Task.remaining_vehicle_journey_segments[0].driving_duration` (gRPC) or + * `Task.remainingVehicleJourneySegments[0].drivingDuration` (REST) for all + * active tasks assigned to the Delivery Vehicle. + * Fleet Engine ignores this field in `UpdateDeliveryVehicleRequest` if the + * `current_route_segment` field is empty. + * + * Generated from protobuf field .google.protobuf.Duration remaining_duration = 7; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setRemainingDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->remaining_duration = $var; + + return $this; + } + + /** + * The journey segments assigned to this Delivery Vehicle, starting from the + * Vehicle's most recently reported location. This field won't be populated + * in the response of `ListDeliveryVehicles`. + * + * Generated from protobuf field repeated .maps.fleetengine.delivery.v1.VehicleJourneySegment remaining_vehicle_journey_segments = 8; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRemainingVehicleJourneySegments() + { + return $this->remaining_vehicle_journey_segments; + } + + /** + * The journey segments assigned to this Delivery Vehicle, starting from the + * Vehicle's most recently reported location. This field won't be populated + * in the response of `ListDeliveryVehicles`. + * + * Generated from protobuf field repeated .maps.fleetengine.delivery.v1.VehicleJourneySegment remaining_vehicle_journey_segments = 8; + * @param array<\Google\Maps\FleetEngine\Delivery\V1\VehicleJourneySegment>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRemainingVehicleJourneySegments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\FleetEngine\Delivery\V1\VehicleJourneySegment::class); + $this->remaining_vehicle_journey_segments = $arr; + + return $this; + } + + /** + * A list of custom Delivery Vehicle attributes. A Delivery Vehicle can have + * at most 100 attributes, and each attribute must have a unique key. + * + * Generated from protobuf field repeated .maps.fleetengine.delivery.v1.DeliveryVehicleAttribute attributes = 9; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAttributes() + { + return $this->attributes; + } + + /** + * A list of custom Delivery Vehicle attributes. A Delivery Vehicle can have + * at most 100 attributes, and each attribute must have a unique key. + * + * Generated from protobuf field repeated .maps.fleetengine.delivery.v1.DeliveryVehicleAttribute attributes = 9; + * @param array<\Google\Maps\FleetEngine\Delivery\V1\DeliveryVehicleAttribute>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAttributes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\FleetEngine\Delivery\V1\DeliveryVehicleAttribute::class); + $this->attributes = $arr; + + return $this; + } + + /** + * The type of this delivery vehicle. If unset, this will default to `AUTO`. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryVehicle.DeliveryVehicleType type = 10; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * The type of this delivery vehicle. If unset, this will default to `AUTO`. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryVehicle.DeliveryVehicleType type = 10; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Maps\FleetEngine\Delivery\V1\DeliveryVehicle\DeliveryVehicleType::class); + $this->type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/DeliveryVehicle/DeliveryVehicleType.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/DeliveryVehicle/DeliveryVehicleType.php new file mode 100644 index 000000000000..896654441ac9 --- /dev/null +++ b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/DeliveryVehicle/DeliveryVehicleType.php @@ -0,0 +1,79 @@ +maps.fleetengine.delivery.v1.DeliveryVehicle.DeliveryVehicleType + */ +class DeliveryVehicleType +{ + /** + * The value is unused. + * + * Generated from protobuf enum DELIVERY_VEHICLE_TYPE_UNSPECIFIED = 0; + */ + const DELIVERY_VEHICLE_TYPE_UNSPECIFIED = 0; + /** + * An automobile. + * + * Generated from protobuf enum AUTO = 1; + */ + const AUTO = 1; + /** + * A motorcycle, moped, or other two-wheeled vehicle + * + * Generated from protobuf enum TWO_WHEELER = 2; + */ + const TWO_WHEELER = 2; + /** + * Human-powered transport. + * + * Generated from protobuf enum BICYCLE = 3; + */ + const BICYCLE = 3; + /** + * A human transporter, typically walking or running, traveling along + * pedestrian pathways. + * + * Generated from protobuf enum PEDESTRIAN = 4; + */ + const PEDESTRIAN = 4; + + private static $valueToName = [ + self::DELIVERY_VEHICLE_TYPE_UNSPECIFIED => 'DELIVERY_VEHICLE_TYPE_UNSPECIFIED', + self::AUTO => 'AUTO', + self::TWO_WHEELER => 'TWO_WHEELER', + self::BICYCLE => 'BICYCLE', + self::PEDESTRIAN => 'PEDESTRIAN', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(DeliveryVehicleType::class, \Google\Maps\FleetEngine\Delivery\V1\DeliveryVehicle_DeliveryVehicleType::class); + diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/DeliveryVehicleAttribute.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/DeliveryVehicleAttribute.php new file mode 100644 index 000000000000..6260a1669498 --- /dev/null +++ b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/DeliveryVehicleAttribute.php @@ -0,0 +1,225 @@ +maps.fleetengine.delivery.v1.DeliveryVehicleAttribute + */ +class DeliveryVehicleAttribute extends \Google\Protobuf\Internal\Message +{ + /** + * The attribute's key. + * + * Generated from protobuf field string key = 1; + */ + protected $key = ''; + /** + * The attribute's value. + * + * Generated from protobuf field string value = 2; + */ + protected $value = ''; + protected $delivery_vehicle_attribute_value; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $key + * The attribute's key. + * @type string $value + * The attribute's value. + * @type string $string_value + * String typed attribute value. + * Note: This is identical to the `value` field which will eventually be + * deprecated. For create or update methods, either field can be used, but + * it's strongly recommended to use `string_value`. If both `string_value` + * and `value` are set, they must be identical or an error will be thrown. + * Both fields are populated in responses. + * @type bool $bool_value + * Boolean typed attribute value. + * @type float $number_value + * Double typed attribute value. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Fleetengine\Delivery\V1\Common::initOnce(); + parent::__construct($data); + } + + /** + * The attribute's key. + * + * Generated from protobuf field string key = 1; + * @return string + */ + public function getKey() + { + return $this->key; + } + + /** + * The attribute's key. + * + * Generated from protobuf field string key = 1; + * @param string $var + * @return $this + */ + public function setKey($var) + { + GPBUtil::checkString($var, True); + $this->key = $var; + + return $this; + } + + /** + * The attribute's value. + * + * Generated from protobuf field string value = 2; + * @return string + */ + public function getValue() + { + return $this->value; + } + + /** + * The attribute's value. + * + * Generated from protobuf field string value = 2; + * @param string $var + * @return $this + */ + public function setValue($var) + { + GPBUtil::checkString($var, True); + $this->value = $var; + + return $this; + } + + /** + * String typed attribute value. + * Note: This is identical to the `value` field which will eventually be + * deprecated. For create or update methods, either field can be used, but + * it's strongly recommended to use `string_value`. If both `string_value` + * and `value` are set, they must be identical or an error will be thrown. + * Both fields are populated in responses. + * + * Generated from protobuf field string string_value = 3; + * @return string + */ + public function getStringValue() + { + return $this->readOneof(3); + } + + public function hasStringValue() + { + return $this->hasOneof(3); + } + + /** + * String typed attribute value. + * Note: This is identical to the `value` field which will eventually be + * deprecated. For create or update methods, either field can be used, but + * it's strongly recommended to use `string_value`. If both `string_value` + * and `value` are set, they must be identical or an error will be thrown. + * Both fields are populated in responses. + * + * Generated from protobuf field string string_value = 3; + * @param string $var + * @return $this + */ + public function setStringValue($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Boolean typed attribute value. + * + * Generated from protobuf field bool bool_value = 4; + * @return bool + */ + public function getBoolValue() + { + return $this->readOneof(4); + } + + public function hasBoolValue() + { + return $this->hasOneof(4); + } + + /** + * Boolean typed attribute value. + * + * Generated from protobuf field bool bool_value = 4; + * @param bool $var + * @return $this + */ + public function setBoolValue($var) + { + GPBUtil::checkBool($var); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Double typed attribute value. + * + * Generated from protobuf field double number_value = 5; + * @return float + */ + public function getNumberValue() + { + return $this->readOneof(5); + } + + public function hasNumberValue() + { + return $this->hasOneof(5); + } + + /** + * Double typed attribute value. + * + * Generated from protobuf field double number_value = 5; + * @param float $var + * @return $this + */ + public function setNumberValue($var) + { + GPBUtil::checkDouble($var); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * @return string + */ + public function getDeliveryVehicleAttributeValue() + { + return $this->whichOneof("delivery_vehicle_attribute_value"); + } + +} + diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/DeliveryVehicleLocation.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/DeliveryVehicleLocation.php new file mode 100644 index 000000000000..e5bcab30627f --- /dev/null +++ b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/DeliveryVehicleLocation.php @@ -0,0 +1,1789 @@ +maps.fleetengine.delivery.v1.DeliveryVehicleLocation + */ +class DeliveryVehicleLocation extends \Google\Protobuf\Internal\Message +{ + /** + * The location of the vehicle. + * When it is sent to Fleet Engine, the vehicle's location is a GPS location. + * When you receive it in a response, the vehicle's location can be either a + * GPS location, a supplemental location, or some other estimated location. + * The source is specified in `location_sensor`. + * + * Generated from protobuf field .google.type.LatLng location = 1; + */ + protected $location = null; + /** + * Deprecated: Use `latlng_accuracy` instead. + * + * Generated from protobuf field .google.protobuf.DoubleValue horizontal_accuracy = 8 [deprecated = true]; + * @deprecated + */ + protected $horizontal_accuracy = null; + /** + * Accuracy of `location` in meters as a radius. + * + * Generated from protobuf field .google.protobuf.DoubleValue latlng_accuracy = 22; + */ + protected $latlng_accuracy = null; + /** + * Direction the vehicle is moving in degrees. 0 represents North. + * The valid range is [0,360). + * + * Generated from protobuf field .google.protobuf.Int32Value heading = 2; + */ + protected $heading = null; + /** + * Deprecated: Use `heading_accuracy` instead. + * + * Generated from protobuf field .google.protobuf.DoubleValue bearing_accuracy = 10 [deprecated = true]; + * @deprecated + */ + protected $bearing_accuracy = null; + /** + * Accuracy of `heading` in degrees. + * + * Generated from protobuf field .google.protobuf.DoubleValue heading_accuracy = 23; + */ + protected $heading_accuracy = null; + /** + * Altitude in meters above WGS84. + * + * Generated from protobuf field .google.protobuf.DoubleValue altitude = 5; + */ + protected $altitude = null; + /** + * Deprecated: Use `altitude_accuracy` instead. + * + * Generated from protobuf field .google.protobuf.DoubleValue vertical_accuracy = 9 [deprecated = true]; + * @deprecated + */ + protected $vertical_accuracy = null; + /** + * Accuracy of `altitude` in meters. + * + * Generated from protobuf field .google.protobuf.DoubleValue altitude_accuracy = 24; + */ + protected $altitude_accuracy = null; + /** + * Speed of the vehicle in kilometers per hour. + * Deprecated: Use `speed` instead. + * + * Generated from protobuf field .google.protobuf.Int32Value speed_kmph = 3 [deprecated = true]; + * @deprecated + */ + protected $speed_kmph = null; + /** + * Speed of the vehicle in meters/second + * + * Generated from protobuf field .google.protobuf.DoubleValue speed = 6; + */ + protected $speed = null; + /** + * Accuracy of `speed` in meters/second. + * + * Generated from protobuf field .google.protobuf.DoubleValue speed_accuracy = 7; + */ + protected $speed_accuracy = null; + /** + * The time when `location` was reported by the sensor according to the + * sensor's clock. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4; + */ + protected $update_time = null; + /** + * Output only. The time when the server received the location information. + * + * Generated from protobuf field .google.protobuf.Timestamp server_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $server_time = null; + /** + * Provider of location data (for example, `GPS`). + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor location_sensor = 11; + */ + protected $location_sensor = 0; + /** + * Whether `location` is snapped to a road. + * + * Generated from protobuf field .google.protobuf.BoolValue is_road_snapped = 27; + */ + protected $is_road_snapped = null; + /** + * Input only. Indicates whether the GPS sensor is enabled on the mobile + * device. + * + * Generated from protobuf field .google.protobuf.BoolValue is_gps_sensor_enabled = 12 [(.google.api.field_behavior) = INPUT_ONLY]; + */ + protected $is_gps_sensor_enabled = null; + /** + * Input only. Time (in seconds) since this location was first sent to the + * server. This will be zero for the first update. If the time is unknown (for + * example, when the app restarts), this value resets to zero. + * + * Generated from protobuf field .google.protobuf.Int32Value time_since_update = 14 [(.google.api.field_behavior) = INPUT_ONLY]; + */ + protected $time_since_update = null; + /** + * Input only. Deprecated: Other signals are now used to determine if a + * location is stale. + * + * Generated from protobuf field .google.protobuf.Int32Value num_stale_updates = 15 [deprecated = true, (.google.api.field_behavior) = INPUT_ONLY]; + * @deprecated + */ + protected $num_stale_updates = null; + /** + * Raw vehicle location (unprocessed by road-snapper). + * + * Generated from protobuf field .google.type.LatLng raw_location = 16; + */ + protected $raw_location = null; + /** + * Timestamp associated with the raw location. + * + * Generated from protobuf field .google.protobuf.Timestamp raw_location_time = 17; + */ + protected $raw_location_time = null; + /** + * Source of the raw location. Defaults to `GPS`. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor raw_location_sensor = 28; + */ + protected $raw_location_sensor = 0; + /** + * Accuracy of `raw_location` as a radius, in meters. + * + * Generated from protobuf field .google.protobuf.DoubleValue raw_location_accuracy = 25; + */ + protected $raw_location_accuracy = null; + /** + * Supplemental location provided by the integrating app. + * + * Generated from protobuf field .google.type.LatLng supplemental_location = 18; + */ + protected $supplemental_location = null; + /** + * Timestamp associated with the supplemental location. + * + * Generated from protobuf field .google.protobuf.Timestamp supplemental_location_time = 19; + */ + protected $supplemental_location_time = null; + /** + * Source of the supplemental location. Defaults to + * `CUSTOMER_SUPPLIED_LOCATION`. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor supplemental_location_sensor = 20; + */ + protected $supplemental_location_sensor = 0; + /** + * Accuracy of `supplemental_location` as a radius, in meters. + * + * Generated from protobuf field .google.protobuf.DoubleValue supplemental_location_accuracy = 21; + */ + protected $supplemental_location_accuracy = null; + /** + * Deprecated: Use `is_road_snapped` instead. + * + * Generated from protobuf field bool road_snapped = 26 [deprecated = true]; + * @deprecated + */ + protected $road_snapped = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Type\LatLng $location + * The location of the vehicle. + * When it is sent to Fleet Engine, the vehicle's location is a GPS location. + * When you receive it in a response, the vehicle's location can be either a + * GPS location, a supplemental location, or some other estimated location. + * The source is specified in `location_sensor`. + * @type \Google\Protobuf\DoubleValue $horizontal_accuracy + * Deprecated: Use `latlng_accuracy` instead. + * @type \Google\Protobuf\DoubleValue $latlng_accuracy + * Accuracy of `location` in meters as a radius. + * @type \Google\Protobuf\Int32Value $heading + * Direction the vehicle is moving in degrees. 0 represents North. + * The valid range is [0,360). + * @type \Google\Protobuf\DoubleValue $bearing_accuracy + * Deprecated: Use `heading_accuracy` instead. + * @type \Google\Protobuf\DoubleValue $heading_accuracy + * Accuracy of `heading` in degrees. + * @type \Google\Protobuf\DoubleValue $altitude + * Altitude in meters above WGS84. + * @type \Google\Protobuf\DoubleValue $vertical_accuracy + * Deprecated: Use `altitude_accuracy` instead. + * @type \Google\Protobuf\DoubleValue $altitude_accuracy + * Accuracy of `altitude` in meters. + * @type \Google\Protobuf\Int32Value $speed_kmph + * Speed of the vehicle in kilometers per hour. + * Deprecated: Use `speed` instead. + * @type \Google\Protobuf\DoubleValue $speed + * Speed of the vehicle in meters/second + * @type \Google\Protobuf\DoubleValue $speed_accuracy + * Accuracy of `speed` in meters/second. + * @type \Google\Protobuf\Timestamp $update_time + * The time when `location` was reported by the sensor according to the + * sensor's clock. + * @type \Google\Protobuf\Timestamp $server_time + * Output only. The time when the server received the location information. + * @type int $location_sensor + * Provider of location data (for example, `GPS`). + * @type \Google\Protobuf\BoolValue $is_road_snapped + * Whether `location` is snapped to a road. + * @type \Google\Protobuf\BoolValue $is_gps_sensor_enabled + * Input only. Indicates whether the GPS sensor is enabled on the mobile + * device. + * @type \Google\Protobuf\Int32Value $time_since_update + * Input only. Time (in seconds) since this location was first sent to the + * server. This will be zero for the first update. If the time is unknown (for + * example, when the app restarts), this value resets to zero. + * @type \Google\Protobuf\Int32Value $num_stale_updates + * Input only. Deprecated: Other signals are now used to determine if a + * location is stale. + * @type \Google\Type\LatLng $raw_location + * Raw vehicle location (unprocessed by road-snapper). + * @type \Google\Protobuf\Timestamp $raw_location_time + * Timestamp associated with the raw location. + * @type int $raw_location_sensor + * Source of the raw location. Defaults to `GPS`. + * @type \Google\Protobuf\DoubleValue $raw_location_accuracy + * Accuracy of `raw_location` as a radius, in meters. + * @type \Google\Type\LatLng $supplemental_location + * Supplemental location provided by the integrating app. + * @type \Google\Protobuf\Timestamp $supplemental_location_time + * Timestamp associated with the supplemental location. + * @type int $supplemental_location_sensor + * Source of the supplemental location. Defaults to + * `CUSTOMER_SUPPLIED_LOCATION`. + * @type \Google\Protobuf\DoubleValue $supplemental_location_accuracy + * Accuracy of `supplemental_location` as a radius, in meters. + * @type bool $road_snapped + * Deprecated: Use `is_road_snapped` instead. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Fleetengine\Delivery\V1\Common::initOnce(); + parent::__construct($data); + } + + /** + * The location of the vehicle. + * When it is sent to Fleet Engine, the vehicle's location is a GPS location. + * When you receive it in a response, the vehicle's location can be either a + * GPS location, a supplemental location, or some other estimated location. + * The source is specified in `location_sensor`. + * + * Generated from protobuf field .google.type.LatLng location = 1; + * @return \Google\Type\LatLng|null + */ + public function getLocation() + { + return $this->location; + } + + public function hasLocation() + { + return isset($this->location); + } + + public function clearLocation() + { + unset($this->location); + } + + /** + * The location of the vehicle. + * When it is sent to Fleet Engine, the vehicle's location is a GPS location. + * When you receive it in a response, the vehicle's location can be either a + * GPS location, a supplemental location, or some other estimated location. + * The source is specified in `location_sensor`. + * + * Generated from protobuf field .google.type.LatLng location = 1; + * @param \Google\Type\LatLng $var + * @return $this + */ + public function setLocation($var) + { + GPBUtil::checkMessage($var, \Google\Type\LatLng::class); + $this->location = $var; + + return $this; + } + + /** + * Deprecated: Use `latlng_accuracy` instead. + * + * Generated from protobuf field .google.protobuf.DoubleValue horizontal_accuracy = 8 [deprecated = true]; + * @return \Google\Protobuf\DoubleValue|null + * @deprecated + */ + public function getHorizontalAccuracy() + { + @trigger_error('horizontal_accuracy is deprecated.', E_USER_DEPRECATED); + return $this->horizontal_accuracy; + } + + public function hasHorizontalAccuracy() + { + @trigger_error('horizontal_accuracy is deprecated.', E_USER_DEPRECATED); + return isset($this->horizontal_accuracy); + } + + public function clearHorizontalAccuracy() + { + @trigger_error('horizontal_accuracy is deprecated.', E_USER_DEPRECATED); + unset($this->horizontal_accuracy); + } + + /** + * Returns the unboxed value from getHorizontalAccuracy() + + * Deprecated: Use `latlng_accuracy` instead. + * + * Generated from protobuf field .google.protobuf.DoubleValue horizontal_accuracy = 8 [deprecated = true]; + * @return float|null + */ + public function getHorizontalAccuracyUnwrapped() + { + @trigger_error('horizontal_accuracy is deprecated.', E_USER_DEPRECATED); + return $this->readWrapperValue("horizontal_accuracy"); + } + + /** + * Deprecated: Use `latlng_accuracy` instead. + * + * Generated from protobuf field .google.protobuf.DoubleValue horizontal_accuracy = 8 [deprecated = true]; + * @param \Google\Protobuf\DoubleValue $var + * @return $this + * @deprecated + */ + public function setHorizontalAccuracy($var) + { + @trigger_error('horizontal_accuracy is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkMessage($var, \Google\Protobuf\DoubleValue::class); + $this->horizontal_accuracy = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\DoubleValue object. + + * Deprecated: Use `latlng_accuracy` instead. + * + * Generated from protobuf field .google.protobuf.DoubleValue horizontal_accuracy = 8 [deprecated = true]; + * @param float|null $var + * @return $this + */ + public function setHorizontalAccuracyUnwrapped($var) + { + $this->writeWrapperValue("horizontal_accuracy", $var); + return $this;} + + /** + * Accuracy of `location` in meters as a radius. + * + * Generated from protobuf field .google.protobuf.DoubleValue latlng_accuracy = 22; + * @return \Google\Protobuf\DoubleValue|null + */ + public function getLatlngAccuracy() + { + return $this->latlng_accuracy; + } + + public function hasLatlngAccuracy() + { + return isset($this->latlng_accuracy); + } + + public function clearLatlngAccuracy() + { + unset($this->latlng_accuracy); + } + + /** + * Returns the unboxed value from getLatlngAccuracy() + + * Accuracy of `location` in meters as a radius. + * + * Generated from protobuf field .google.protobuf.DoubleValue latlng_accuracy = 22; + * @return float|null + */ + public function getLatlngAccuracyUnwrapped() + { + return $this->readWrapperValue("latlng_accuracy"); + } + + /** + * Accuracy of `location` in meters as a radius. + * + * Generated from protobuf field .google.protobuf.DoubleValue latlng_accuracy = 22; + * @param \Google\Protobuf\DoubleValue $var + * @return $this + */ + public function setLatlngAccuracy($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\DoubleValue::class); + $this->latlng_accuracy = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\DoubleValue object. + + * Accuracy of `location` in meters as a radius. + * + * Generated from protobuf field .google.protobuf.DoubleValue latlng_accuracy = 22; + * @param float|null $var + * @return $this + */ + public function setLatlngAccuracyUnwrapped($var) + { + $this->writeWrapperValue("latlng_accuracy", $var); + return $this;} + + /** + * Direction the vehicle is moving in degrees. 0 represents North. + * The valid range is [0,360). + * + * Generated from protobuf field .google.protobuf.Int32Value heading = 2; + * @return \Google\Protobuf\Int32Value|null + */ + public function getHeading() + { + return $this->heading; + } + + public function hasHeading() + { + return isset($this->heading); + } + + public function clearHeading() + { + unset($this->heading); + } + + /** + * Returns the unboxed value from getHeading() + + * Direction the vehicle is moving in degrees. 0 represents North. + * The valid range is [0,360). + * + * Generated from protobuf field .google.protobuf.Int32Value heading = 2; + * @return int|null + */ + public function getHeadingUnwrapped() + { + return $this->readWrapperValue("heading"); + } + + /** + * Direction the vehicle is moving in degrees. 0 represents North. + * The valid range is [0,360). + * + * Generated from protobuf field .google.protobuf.Int32Value heading = 2; + * @param \Google\Protobuf\Int32Value $var + * @return $this + */ + public function setHeading($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class); + $this->heading = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object. + + * Direction the vehicle is moving in degrees. 0 represents North. + * The valid range is [0,360). + * + * Generated from protobuf field .google.protobuf.Int32Value heading = 2; + * @param int|null $var + * @return $this + */ + public function setHeadingUnwrapped($var) + { + $this->writeWrapperValue("heading", $var); + return $this;} + + /** + * Deprecated: Use `heading_accuracy` instead. + * + * Generated from protobuf field .google.protobuf.DoubleValue bearing_accuracy = 10 [deprecated = true]; + * @return \Google\Protobuf\DoubleValue|null + * @deprecated + */ + public function getBearingAccuracy() + { + @trigger_error('bearing_accuracy is deprecated.', E_USER_DEPRECATED); + return $this->bearing_accuracy; + } + + public function hasBearingAccuracy() + { + @trigger_error('bearing_accuracy is deprecated.', E_USER_DEPRECATED); + return isset($this->bearing_accuracy); + } + + public function clearBearingAccuracy() + { + @trigger_error('bearing_accuracy is deprecated.', E_USER_DEPRECATED); + unset($this->bearing_accuracy); + } + + /** + * Returns the unboxed value from getBearingAccuracy() + + * Deprecated: Use `heading_accuracy` instead. + * + * Generated from protobuf field .google.protobuf.DoubleValue bearing_accuracy = 10 [deprecated = true]; + * @return float|null + */ + public function getBearingAccuracyUnwrapped() + { + @trigger_error('bearing_accuracy is deprecated.', E_USER_DEPRECATED); + return $this->readWrapperValue("bearing_accuracy"); + } + + /** + * Deprecated: Use `heading_accuracy` instead. + * + * Generated from protobuf field .google.protobuf.DoubleValue bearing_accuracy = 10 [deprecated = true]; + * @param \Google\Protobuf\DoubleValue $var + * @return $this + * @deprecated + */ + public function setBearingAccuracy($var) + { + @trigger_error('bearing_accuracy is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkMessage($var, \Google\Protobuf\DoubleValue::class); + $this->bearing_accuracy = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\DoubleValue object. + + * Deprecated: Use `heading_accuracy` instead. + * + * Generated from protobuf field .google.protobuf.DoubleValue bearing_accuracy = 10 [deprecated = true]; + * @param float|null $var + * @return $this + */ + public function setBearingAccuracyUnwrapped($var) + { + $this->writeWrapperValue("bearing_accuracy", $var); + return $this;} + + /** + * Accuracy of `heading` in degrees. + * + * Generated from protobuf field .google.protobuf.DoubleValue heading_accuracy = 23; + * @return \Google\Protobuf\DoubleValue|null + */ + public function getHeadingAccuracy() + { + return $this->heading_accuracy; + } + + public function hasHeadingAccuracy() + { + return isset($this->heading_accuracy); + } + + public function clearHeadingAccuracy() + { + unset($this->heading_accuracy); + } + + /** + * Returns the unboxed value from getHeadingAccuracy() + + * Accuracy of `heading` in degrees. + * + * Generated from protobuf field .google.protobuf.DoubleValue heading_accuracy = 23; + * @return float|null + */ + public function getHeadingAccuracyUnwrapped() + { + return $this->readWrapperValue("heading_accuracy"); + } + + /** + * Accuracy of `heading` in degrees. + * + * Generated from protobuf field .google.protobuf.DoubleValue heading_accuracy = 23; + * @param \Google\Protobuf\DoubleValue $var + * @return $this + */ + public function setHeadingAccuracy($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\DoubleValue::class); + $this->heading_accuracy = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\DoubleValue object. + + * Accuracy of `heading` in degrees. + * + * Generated from protobuf field .google.protobuf.DoubleValue heading_accuracy = 23; + * @param float|null $var + * @return $this + */ + public function setHeadingAccuracyUnwrapped($var) + { + $this->writeWrapperValue("heading_accuracy", $var); + return $this;} + + /** + * Altitude in meters above WGS84. + * + * Generated from protobuf field .google.protobuf.DoubleValue altitude = 5; + * @return \Google\Protobuf\DoubleValue|null + */ + public function getAltitude() + { + return $this->altitude; + } + + public function hasAltitude() + { + return isset($this->altitude); + } + + public function clearAltitude() + { + unset($this->altitude); + } + + /** + * Returns the unboxed value from getAltitude() + + * Altitude in meters above WGS84. + * + * Generated from protobuf field .google.protobuf.DoubleValue altitude = 5; + * @return float|null + */ + public function getAltitudeUnwrapped() + { + return $this->readWrapperValue("altitude"); + } + + /** + * Altitude in meters above WGS84. + * + * Generated from protobuf field .google.protobuf.DoubleValue altitude = 5; + * @param \Google\Protobuf\DoubleValue $var + * @return $this + */ + public function setAltitude($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\DoubleValue::class); + $this->altitude = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\DoubleValue object. + + * Altitude in meters above WGS84. + * + * Generated from protobuf field .google.protobuf.DoubleValue altitude = 5; + * @param float|null $var + * @return $this + */ + public function setAltitudeUnwrapped($var) + { + $this->writeWrapperValue("altitude", $var); + return $this;} + + /** + * Deprecated: Use `altitude_accuracy` instead. + * + * Generated from protobuf field .google.protobuf.DoubleValue vertical_accuracy = 9 [deprecated = true]; + * @return \Google\Protobuf\DoubleValue|null + * @deprecated + */ + public function getVerticalAccuracy() + { + @trigger_error('vertical_accuracy is deprecated.', E_USER_DEPRECATED); + return $this->vertical_accuracy; + } + + public function hasVerticalAccuracy() + { + @trigger_error('vertical_accuracy is deprecated.', E_USER_DEPRECATED); + return isset($this->vertical_accuracy); + } + + public function clearVerticalAccuracy() + { + @trigger_error('vertical_accuracy is deprecated.', E_USER_DEPRECATED); + unset($this->vertical_accuracy); + } + + /** + * Returns the unboxed value from getVerticalAccuracy() + + * Deprecated: Use `altitude_accuracy` instead. + * + * Generated from protobuf field .google.protobuf.DoubleValue vertical_accuracy = 9 [deprecated = true]; + * @return float|null + */ + public function getVerticalAccuracyUnwrapped() + { + @trigger_error('vertical_accuracy is deprecated.', E_USER_DEPRECATED); + return $this->readWrapperValue("vertical_accuracy"); + } + + /** + * Deprecated: Use `altitude_accuracy` instead. + * + * Generated from protobuf field .google.protobuf.DoubleValue vertical_accuracy = 9 [deprecated = true]; + * @param \Google\Protobuf\DoubleValue $var + * @return $this + * @deprecated + */ + public function setVerticalAccuracy($var) + { + @trigger_error('vertical_accuracy is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkMessage($var, \Google\Protobuf\DoubleValue::class); + $this->vertical_accuracy = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\DoubleValue object. + + * Deprecated: Use `altitude_accuracy` instead. + * + * Generated from protobuf field .google.protobuf.DoubleValue vertical_accuracy = 9 [deprecated = true]; + * @param float|null $var + * @return $this + */ + public function setVerticalAccuracyUnwrapped($var) + { + $this->writeWrapperValue("vertical_accuracy", $var); + return $this;} + + /** + * Accuracy of `altitude` in meters. + * + * Generated from protobuf field .google.protobuf.DoubleValue altitude_accuracy = 24; + * @return \Google\Protobuf\DoubleValue|null + */ + public function getAltitudeAccuracy() + { + return $this->altitude_accuracy; + } + + public function hasAltitudeAccuracy() + { + return isset($this->altitude_accuracy); + } + + public function clearAltitudeAccuracy() + { + unset($this->altitude_accuracy); + } + + /** + * Returns the unboxed value from getAltitudeAccuracy() + + * Accuracy of `altitude` in meters. + * + * Generated from protobuf field .google.protobuf.DoubleValue altitude_accuracy = 24; + * @return float|null + */ + public function getAltitudeAccuracyUnwrapped() + { + return $this->readWrapperValue("altitude_accuracy"); + } + + /** + * Accuracy of `altitude` in meters. + * + * Generated from protobuf field .google.protobuf.DoubleValue altitude_accuracy = 24; + * @param \Google\Protobuf\DoubleValue $var + * @return $this + */ + public function setAltitudeAccuracy($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\DoubleValue::class); + $this->altitude_accuracy = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\DoubleValue object. + + * Accuracy of `altitude` in meters. + * + * Generated from protobuf field .google.protobuf.DoubleValue altitude_accuracy = 24; + * @param float|null $var + * @return $this + */ + public function setAltitudeAccuracyUnwrapped($var) + { + $this->writeWrapperValue("altitude_accuracy", $var); + return $this;} + + /** + * Speed of the vehicle in kilometers per hour. + * Deprecated: Use `speed` instead. + * + * Generated from protobuf field .google.protobuf.Int32Value speed_kmph = 3 [deprecated = true]; + * @return \Google\Protobuf\Int32Value|null + * @deprecated + */ + public function getSpeedKmph() + { + @trigger_error('speed_kmph is deprecated.', E_USER_DEPRECATED); + return $this->speed_kmph; + } + + public function hasSpeedKmph() + { + @trigger_error('speed_kmph is deprecated.', E_USER_DEPRECATED); + return isset($this->speed_kmph); + } + + public function clearSpeedKmph() + { + @trigger_error('speed_kmph is deprecated.', E_USER_DEPRECATED); + unset($this->speed_kmph); + } + + /** + * Returns the unboxed value from getSpeedKmph() + + * Speed of the vehicle in kilometers per hour. + * Deprecated: Use `speed` instead. + * + * Generated from protobuf field .google.protobuf.Int32Value speed_kmph = 3 [deprecated = true]; + * @return int|null + */ + public function getSpeedKmphUnwrapped() + { + @trigger_error('speed_kmph is deprecated.', E_USER_DEPRECATED); + return $this->readWrapperValue("speed_kmph"); + } + + /** + * Speed of the vehicle in kilometers per hour. + * Deprecated: Use `speed` instead. + * + * Generated from protobuf field .google.protobuf.Int32Value speed_kmph = 3 [deprecated = true]; + * @param \Google\Protobuf\Int32Value $var + * @return $this + * @deprecated + */ + public function setSpeedKmph($var) + { + @trigger_error('speed_kmph is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class); + $this->speed_kmph = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object. + + * Speed of the vehicle in kilometers per hour. + * Deprecated: Use `speed` instead. + * + * Generated from protobuf field .google.protobuf.Int32Value speed_kmph = 3 [deprecated = true]; + * @param int|null $var + * @return $this + */ + public function setSpeedKmphUnwrapped($var) + { + $this->writeWrapperValue("speed_kmph", $var); + return $this;} + + /** + * Speed of the vehicle in meters/second + * + * Generated from protobuf field .google.protobuf.DoubleValue speed = 6; + * @return \Google\Protobuf\DoubleValue|null + */ + public function getSpeed() + { + return $this->speed; + } + + public function hasSpeed() + { + return isset($this->speed); + } + + public function clearSpeed() + { + unset($this->speed); + } + + /** + * Returns the unboxed value from getSpeed() + + * Speed of the vehicle in meters/second + * + * Generated from protobuf field .google.protobuf.DoubleValue speed = 6; + * @return float|null + */ + public function getSpeedUnwrapped() + { + return $this->readWrapperValue("speed"); + } + + /** + * Speed of the vehicle in meters/second + * + * Generated from protobuf field .google.protobuf.DoubleValue speed = 6; + * @param \Google\Protobuf\DoubleValue $var + * @return $this + */ + public function setSpeed($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\DoubleValue::class); + $this->speed = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\DoubleValue object. + + * Speed of the vehicle in meters/second + * + * Generated from protobuf field .google.protobuf.DoubleValue speed = 6; + * @param float|null $var + * @return $this + */ + public function setSpeedUnwrapped($var) + { + $this->writeWrapperValue("speed", $var); + return $this;} + + /** + * Accuracy of `speed` in meters/second. + * + * Generated from protobuf field .google.protobuf.DoubleValue speed_accuracy = 7; + * @return \Google\Protobuf\DoubleValue|null + */ + public function getSpeedAccuracy() + { + return $this->speed_accuracy; + } + + public function hasSpeedAccuracy() + { + return isset($this->speed_accuracy); + } + + public function clearSpeedAccuracy() + { + unset($this->speed_accuracy); + } + + /** + * Returns the unboxed value from getSpeedAccuracy() + + * Accuracy of `speed` in meters/second. + * + * Generated from protobuf field .google.protobuf.DoubleValue speed_accuracy = 7; + * @return float|null + */ + public function getSpeedAccuracyUnwrapped() + { + return $this->readWrapperValue("speed_accuracy"); + } + + /** + * Accuracy of `speed` in meters/second. + * + * Generated from protobuf field .google.protobuf.DoubleValue speed_accuracy = 7; + * @param \Google\Protobuf\DoubleValue $var + * @return $this + */ + public function setSpeedAccuracy($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\DoubleValue::class); + $this->speed_accuracy = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\DoubleValue object. + + * Accuracy of `speed` in meters/second. + * + * Generated from protobuf field .google.protobuf.DoubleValue speed_accuracy = 7; + * @param float|null $var + * @return $this + */ + public function setSpeedAccuracyUnwrapped($var) + { + $this->writeWrapperValue("speed_accuracy", $var); + return $this;} + + /** + * The time when `location` was reported by the sensor according to the + * sensor's clock. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * The time when `location` was reported by the sensor according to the + * sensor's clock. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Output only. The time when the server received the location information. + * + * Generated from protobuf field .google.protobuf.Timestamp server_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getServerTime() + { + return $this->server_time; + } + + public function hasServerTime() + { + return isset($this->server_time); + } + + public function clearServerTime() + { + unset($this->server_time); + } + + /** + * Output only. The time when the server received the location information. + * + * Generated from protobuf field .google.protobuf.Timestamp server_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setServerTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->server_time = $var; + + return $this; + } + + /** + * Provider of location data (for example, `GPS`). + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor location_sensor = 11; + * @return int + */ + public function getLocationSensor() + { + return $this->location_sensor; + } + + /** + * Provider of location data (for example, `GPS`). + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor location_sensor = 11; + * @param int $var + * @return $this + */ + public function setLocationSensor($var) + { + GPBUtil::checkEnum($var, \Google\Maps\FleetEngine\Delivery\V1\DeliveryVehicleLocationSensor::class); + $this->location_sensor = $var; + + return $this; + } + + /** + * Whether `location` is snapped to a road. + * + * Generated from protobuf field .google.protobuf.BoolValue is_road_snapped = 27; + * @return \Google\Protobuf\BoolValue|null + */ + public function getIsRoadSnapped() + { + return $this->is_road_snapped; + } + + public function hasIsRoadSnapped() + { + return isset($this->is_road_snapped); + } + + public function clearIsRoadSnapped() + { + unset($this->is_road_snapped); + } + + /** + * Returns the unboxed value from getIsRoadSnapped() + + * Whether `location` is snapped to a road. + * + * Generated from protobuf field .google.protobuf.BoolValue is_road_snapped = 27; + * @return bool|null + */ + public function getIsRoadSnappedUnwrapped() + { + return $this->readWrapperValue("is_road_snapped"); + } + + /** + * Whether `location` is snapped to a road. + * + * Generated from protobuf field .google.protobuf.BoolValue is_road_snapped = 27; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setIsRoadSnapped($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->is_road_snapped = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Whether `location` is snapped to a road. + * + * Generated from protobuf field .google.protobuf.BoolValue is_road_snapped = 27; + * @param bool|null $var + * @return $this + */ + public function setIsRoadSnappedUnwrapped($var) + { + $this->writeWrapperValue("is_road_snapped", $var); + return $this;} + + /** + * Input only. Indicates whether the GPS sensor is enabled on the mobile + * device. + * + * Generated from protobuf field .google.protobuf.BoolValue is_gps_sensor_enabled = 12 [(.google.api.field_behavior) = INPUT_ONLY]; + * @return \Google\Protobuf\BoolValue|null + */ + public function getIsGpsSensorEnabled() + { + return $this->is_gps_sensor_enabled; + } + + public function hasIsGpsSensorEnabled() + { + return isset($this->is_gps_sensor_enabled); + } + + public function clearIsGpsSensorEnabled() + { + unset($this->is_gps_sensor_enabled); + } + + /** + * Returns the unboxed value from getIsGpsSensorEnabled() + + * Input only. Indicates whether the GPS sensor is enabled on the mobile + * device. + * + * Generated from protobuf field .google.protobuf.BoolValue is_gps_sensor_enabled = 12 [(.google.api.field_behavior) = INPUT_ONLY]; + * @return bool|null + */ + public function getIsGpsSensorEnabledUnwrapped() + { + return $this->readWrapperValue("is_gps_sensor_enabled"); + } + + /** + * Input only. Indicates whether the GPS sensor is enabled on the mobile + * device. + * + * Generated from protobuf field .google.protobuf.BoolValue is_gps_sensor_enabled = 12 [(.google.api.field_behavior) = INPUT_ONLY]; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setIsGpsSensorEnabled($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->is_gps_sensor_enabled = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Input only. Indicates whether the GPS sensor is enabled on the mobile + * device. + * + * Generated from protobuf field .google.protobuf.BoolValue is_gps_sensor_enabled = 12 [(.google.api.field_behavior) = INPUT_ONLY]; + * @param bool|null $var + * @return $this + */ + public function setIsGpsSensorEnabledUnwrapped($var) + { + $this->writeWrapperValue("is_gps_sensor_enabled", $var); + return $this;} + + /** + * Input only. Time (in seconds) since this location was first sent to the + * server. This will be zero for the first update. If the time is unknown (for + * example, when the app restarts), this value resets to zero. + * + * Generated from protobuf field .google.protobuf.Int32Value time_since_update = 14 [(.google.api.field_behavior) = INPUT_ONLY]; + * @return \Google\Protobuf\Int32Value|null + */ + public function getTimeSinceUpdate() + { + return $this->time_since_update; + } + + public function hasTimeSinceUpdate() + { + return isset($this->time_since_update); + } + + public function clearTimeSinceUpdate() + { + unset($this->time_since_update); + } + + /** + * Returns the unboxed value from getTimeSinceUpdate() + + * Input only. Time (in seconds) since this location was first sent to the + * server. This will be zero for the first update. If the time is unknown (for + * example, when the app restarts), this value resets to zero. + * + * Generated from protobuf field .google.protobuf.Int32Value time_since_update = 14 [(.google.api.field_behavior) = INPUT_ONLY]; + * @return int|null + */ + public function getTimeSinceUpdateUnwrapped() + { + return $this->readWrapperValue("time_since_update"); + } + + /** + * Input only. Time (in seconds) since this location was first sent to the + * server. This will be zero for the first update. If the time is unknown (for + * example, when the app restarts), this value resets to zero. + * + * Generated from protobuf field .google.protobuf.Int32Value time_since_update = 14 [(.google.api.field_behavior) = INPUT_ONLY]; + * @param \Google\Protobuf\Int32Value $var + * @return $this + */ + public function setTimeSinceUpdate($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class); + $this->time_since_update = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object. + + * Input only. Time (in seconds) since this location was first sent to the + * server. This will be zero for the first update. If the time is unknown (for + * example, when the app restarts), this value resets to zero. + * + * Generated from protobuf field .google.protobuf.Int32Value time_since_update = 14 [(.google.api.field_behavior) = INPUT_ONLY]; + * @param int|null $var + * @return $this + */ + public function setTimeSinceUpdateUnwrapped($var) + { + $this->writeWrapperValue("time_since_update", $var); + return $this;} + + /** + * Input only. Deprecated: Other signals are now used to determine if a + * location is stale. + * + * Generated from protobuf field .google.protobuf.Int32Value num_stale_updates = 15 [deprecated = true, (.google.api.field_behavior) = INPUT_ONLY]; + * @return \Google\Protobuf\Int32Value|null + * @deprecated + */ + public function getNumStaleUpdates() + { + @trigger_error('num_stale_updates is deprecated.', E_USER_DEPRECATED); + return $this->num_stale_updates; + } + + public function hasNumStaleUpdates() + { + @trigger_error('num_stale_updates is deprecated.', E_USER_DEPRECATED); + return isset($this->num_stale_updates); + } + + public function clearNumStaleUpdates() + { + @trigger_error('num_stale_updates is deprecated.', E_USER_DEPRECATED); + unset($this->num_stale_updates); + } + + /** + * Returns the unboxed value from getNumStaleUpdates() + + * Input only. Deprecated: Other signals are now used to determine if a + * location is stale. + * + * Generated from protobuf field .google.protobuf.Int32Value num_stale_updates = 15 [deprecated = true, (.google.api.field_behavior) = INPUT_ONLY]; + * @return int|null + */ + public function getNumStaleUpdatesUnwrapped() + { + @trigger_error('num_stale_updates is deprecated.', E_USER_DEPRECATED); + return $this->readWrapperValue("num_stale_updates"); + } + + /** + * Input only. Deprecated: Other signals are now used to determine if a + * location is stale. + * + * Generated from protobuf field .google.protobuf.Int32Value num_stale_updates = 15 [deprecated = true, (.google.api.field_behavior) = INPUT_ONLY]; + * @param \Google\Protobuf\Int32Value $var + * @return $this + * @deprecated + */ + public function setNumStaleUpdates($var) + { + @trigger_error('num_stale_updates is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class); + $this->num_stale_updates = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object. + + * Input only. Deprecated: Other signals are now used to determine if a + * location is stale. + * + * Generated from protobuf field .google.protobuf.Int32Value num_stale_updates = 15 [deprecated = true, (.google.api.field_behavior) = INPUT_ONLY]; + * @param int|null $var + * @return $this + */ + public function setNumStaleUpdatesUnwrapped($var) + { + $this->writeWrapperValue("num_stale_updates", $var); + return $this;} + + /** + * Raw vehicle location (unprocessed by road-snapper). + * + * Generated from protobuf field .google.type.LatLng raw_location = 16; + * @return \Google\Type\LatLng|null + */ + public function getRawLocation() + { + return $this->raw_location; + } + + public function hasRawLocation() + { + return isset($this->raw_location); + } + + public function clearRawLocation() + { + unset($this->raw_location); + } + + /** + * Raw vehicle location (unprocessed by road-snapper). + * + * Generated from protobuf field .google.type.LatLng raw_location = 16; + * @param \Google\Type\LatLng $var + * @return $this + */ + public function setRawLocation($var) + { + GPBUtil::checkMessage($var, \Google\Type\LatLng::class); + $this->raw_location = $var; + + return $this; + } + + /** + * Timestamp associated with the raw location. + * + * Generated from protobuf field .google.protobuf.Timestamp raw_location_time = 17; + * @return \Google\Protobuf\Timestamp|null + */ + public function getRawLocationTime() + { + return $this->raw_location_time; + } + + public function hasRawLocationTime() + { + return isset($this->raw_location_time); + } + + public function clearRawLocationTime() + { + unset($this->raw_location_time); + } + + /** + * Timestamp associated with the raw location. + * + * Generated from protobuf field .google.protobuf.Timestamp raw_location_time = 17; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setRawLocationTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->raw_location_time = $var; + + return $this; + } + + /** + * Source of the raw location. Defaults to `GPS`. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor raw_location_sensor = 28; + * @return int + */ + public function getRawLocationSensor() + { + return $this->raw_location_sensor; + } + + /** + * Source of the raw location. Defaults to `GPS`. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor raw_location_sensor = 28; + * @param int $var + * @return $this + */ + public function setRawLocationSensor($var) + { + GPBUtil::checkEnum($var, \Google\Maps\FleetEngine\Delivery\V1\DeliveryVehicleLocationSensor::class); + $this->raw_location_sensor = $var; + + return $this; + } + + /** + * Accuracy of `raw_location` as a radius, in meters. + * + * Generated from protobuf field .google.protobuf.DoubleValue raw_location_accuracy = 25; + * @return \Google\Protobuf\DoubleValue|null + */ + public function getRawLocationAccuracy() + { + return $this->raw_location_accuracy; + } + + public function hasRawLocationAccuracy() + { + return isset($this->raw_location_accuracy); + } + + public function clearRawLocationAccuracy() + { + unset($this->raw_location_accuracy); + } + + /** + * Returns the unboxed value from getRawLocationAccuracy() + + * Accuracy of `raw_location` as a radius, in meters. + * + * Generated from protobuf field .google.protobuf.DoubleValue raw_location_accuracy = 25; + * @return float|null + */ + public function getRawLocationAccuracyUnwrapped() + { + return $this->readWrapperValue("raw_location_accuracy"); + } + + /** + * Accuracy of `raw_location` as a radius, in meters. + * + * Generated from protobuf field .google.protobuf.DoubleValue raw_location_accuracy = 25; + * @param \Google\Protobuf\DoubleValue $var + * @return $this + */ + public function setRawLocationAccuracy($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\DoubleValue::class); + $this->raw_location_accuracy = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\DoubleValue object. + + * Accuracy of `raw_location` as a radius, in meters. + * + * Generated from protobuf field .google.protobuf.DoubleValue raw_location_accuracy = 25; + * @param float|null $var + * @return $this + */ + public function setRawLocationAccuracyUnwrapped($var) + { + $this->writeWrapperValue("raw_location_accuracy", $var); + return $this;} + + /** + * Supplemental location provided by the integrating app. + * + * Generated from protobuf field .google.type.LatLng supplemental_location = 18; + * @return \Google\Type\LatLng|null + */ + public function getSupplementalLocation() + { + return $this->supplemental_location; + } + + public function hasSupplementalLocation() + { + return isset($this->supplemental_location); + } + + public function clearSupplementalLocation() + { + unset($this->supplemental_location); + } + + /** + * Supplemental location provided by the integrating app. + * + * Generated from protobuf field .google.type.LatLng supplemental_location = 18; + * @param \Google\Type\LatLng $var + * @return $this + */ + public function setSupplementalLocation($var) + { + GPBUtil::checkMessage($var, \Google\Type\LatLng::class); + $this->supplemental_location = $var; + + return $this; + } + + /** + * Timestamp associated with the supplemental location. + * + * Generated from protobuf field .google.protobuf.Timestamp supplemental_location_time = 19; + * @return \Google\Protobuf\Timestamp|null + */ + public function getSupplementalLocationTime() + { + return $this->supplemental_location_time; + } + + public function hasSupplementalLocationTime() + { + return isset($this->supplemental_location_time); + } + + public function clearSupplementalLocationTime() + { + unset($this->supplemental_location_time); + } + + /** + * Timestamp associated with the supplemental location. + * + * Generated from protobuf field .google.protobuf.Timestamp supplemental_location_time = 19; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setSupplementalLocationTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->supplemental_location_time = $var; + + return $this; + } + + /** + * Source of the supplemental location. Defaults to + * `CUSTOMER_SUPPLIED_LOCATION`. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor supplemental_location_sensor = 20; + * @return int + */ + public function getSupplementalLocationSensor() + { + return $this->supplemental_location_sensor; + } + + /** + * Source of the supplemental location. Defaults to + * `CUSTOMER_SUPPLIED_LOCATION`. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor supplemental_location_sensor = 20; + * @param int $var + * @return $this + */ + public function setSupplementalLocationSensor($var) + { + GPBUtil::checkEnum($var, \Google\Maps\FleetEngine\Delivery\V1\DeliveryVehicleLocationSensor::class); + $this->supplemental_location_sensor = $var; + + return $this; + } + + /** + * Accuracy of `supplemental_location` as a radius, in meters. + * + * Generated from protobuf field .google.protobuf.DoubleValue supplemental_location_accuracy = 21; + * @return \Google\Protobuf\DoubleValue|null + */ + public function getSupplementalLocationAccuracy() + { + return $this->supplemental_location_accuracy; + } + + public function hasSupplementalLocationAccuracy() + { + return isset($this->supplemental_location_accuracy); + } + + public function clearSupplementalLocationAccuracy() + { + unset($this->supplemental_location_accuracy); + } + + /** + * Returns the unboxed value from getSupplementalLocationAccuracy() + + * Accuracy of `supplemental_location` as a radius, in meters. + * + * Generated from protobuf field .google.protobuf.DoubleValue supplemental_location_accuracy = 21; + * @return float|null + */ + public function getSupplementalLocationAccuracyUnwrapped() + { + return $this->readWrapperValue("supplemental_location_accuracy"); + } + + /** + * Accuracy of `supplemental_location` as a radius, in meters. + * + * Generated from protobuf field .google.protobuf.DoubleValue supplemental_location_accuracy = 21; + * @param \Google\Protobuf\DoubleValue $var + * @return $this + */ + public function setSupplementalLocationAccuracy($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\DoubleValue::class); + $this->supplemental_location_accuracy = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\DoubleValue object. + + * Accuracy of `supplemental_location` as a radius, in meters. + * + * Generated from protobuf field .google.protobuf.DoubleValue supplemental_location_accuracy = 21; + * @param float|null $var + * @return $this + */ + public function setSupplementalLocationAccuracyUnwrapped($var) + { + $this->writeWrapperValue("supplemental_location_accuracy", $var); + return $this;} + + /** + * Deprecated: Use `is_road_snapped` instead. + * + * Generated from protobuf field bool road_snapped = 26 [deprecated = true]; + * @return bool + * @deprecated + */ + public function getRoadSnapped() + { + @trigger_error('road_snapped is deprecated.', E_USER_DEPRECATED); + return $this->road_snapped; + } + + /** + * Deprecated: Use `is_road_snapped` instead. + * + * Generated from protobuf field bool road_snapped = 26 [deprecated = true]; + * @param bool $var + * @return $this + * @deprecated + */ + public function setRoadSnapped($var) + { + @trigger_error('road_snapped is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkBool($var); + $this->road_snapped = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/DeliveryVehicleLocationSensor.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/DeliveryVehicleLocationSensor.php new file mode 100644 index 000000000000..eb723fbe4a61 --- /dev/null +++ b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/DeliveryVehicleLocationSensor.php @@ -0,0 +1,110 @@ +maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor + */ +class DeliveryVehicleLocationSensor +{ + /** + * The sensor is unspecified or unknown. + * + * Generated from protobuf enum UNKNOWN_SENSOR = 0; + */ + const UNKNOWN_SENSOR = 0; + /** + * GPS or Assisted GPS. + * + * Generated from protobuf enum GPS = 1; + */ + const GPS = 1; + /** + * Assisted GPS, cell tower ID, or WiFi access point. + * + * Generated from protobuf enum NETWORK = 2; + */ + const NETWORK = 2; + /** + * Cell tower ID or WiFi access point. + * + * Generated from protobuf enum PASSIVE = 3; + */ + const PASSIVE = 3; + /** + * A location determined by the mobile device to be the most likely + * road position. + * + * Generated from protobuf enum ROAD_SNAPPED_LOCATION_PROVIDER = 4; + */ + const ROAD_SNAPPED_LOCATION_PROVIDER = 4; + /** + * A customer-supplied location from an independent source. Typically, this + * value is used for a location provided from sources other than the mobile + * device running Driver SDK. If the original source is described by one of + * the other enum values, use that value. Locations marked + * CUSTOMER_SUPPLIED_LOCATION are typically provided via a DeliveryVehicle's + * `last_location.supplemental_location_sensor`. + * + * Generated from protobuf enum CUSTOMER_SUPPLIED_LOCATION = 5; + */ + const CUSTOMER_SUPPLIED_LOCATION = 5; + /** + * A location calculated by Fleet Engine based on the signals available to it. + * Output only. This value will be rejected if it is received in a request. + * + * Generated from protobuf enum FLEET_ENGINE_LOCATION = 6; + */ + const FLEET_ENGINE_LOCATION = 6; + /** + * Android's Fused Location Provider. + * + * Generated from protobuf enum FUSED_LOCATION_PROVIDER = 100; + */ + const FUSED_LOCATION_PROVIDER = 100; + /** + * The location provider on Apple operating systems. + * + * Generated from protobuf enum CORE_LOCATION = 200; + */ + const CORE_LOCATION = 200; + + private static $valueToName = [ + self::UNKNOWN_SENSOR => 'UNKNOWN_SENSOR', + self::GPS => 'GPS', + self::NETWORK => 'NETWORK', + self::PASSIVE => 'PASSIVE', + self::ROAD_SNAPPED_LOCATION_PROVIDER => 'ROAD_SNAPPED_LOCATION_PROVIDER', + self::CUSTOMER_SUPPLIED_LOCATION => 'CUSTOMER_SUPPLIED_LOCATION', + self::FLEET_ENGINE_LOCATION => 'FLEET_ENGINE_LOCATION', + self::FUSED_LOCATION_PROVIDER => 'FUSED_LOCATION_PROVIDER', + self::CORE_LOCATION => 'CORE_LOCATION', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/DeliveryVehicleNavigationStatus.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/DeliveryVehicleNavigationStatus.php new file mode 100644 index 000000000000..2e8bcd7c4266 --- /dev/null +++ b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/DeliveryVehicleNavigationStatus.php @@ -0,0 +1,76 @@ +maps.fleetengine.delivery.v1.DeliveryVehicleNavigationStatus + */ +class DeliveryVehicleNavigationStatus +{ + /** + * Unspecified navigation status. + * + * Generated from protobuf enum UNKNOWN_NAVIGATION_STATUS = 0; + */ + const UNKNOWN_NAVIGATION_STATUS = 0; + /** + * The Driver app's navigation is in `FREE_NAV` mode. + * + * Generated from protobuf enum NO_GUIDANCE = 1; + */ + const NO_GUIDANCE = 1; + /** + * Turn-by-turn navigation is available and the Driver app navigation has + * entered `GUIDED_NAV` mode. + * + * Generated from protobuf enum ENROUTE_TO_DESTINATION = 2; + */ + const ENROUTE_TO_DESTINATION = 2; + /** + * The vehicle has gone off the suggested route. + * + * Generated from protobuf enum OFF_ROUTE = 3; + */ + const OFF_ROUTE = 3; + /** + * The vehicle is within approximately 50m of the destination. + * + * Generated from protobuf enum ARRIVED_AT_DESTINATION = 4; + */ + const ARRIVED_AT_DESTINATION = 4; + + private static $valueToName = [ + self::UNKNOWN_NAVIGATION_STATUS => 'UNKNOWN_NAVIGATION_STATUS', + self::NO_GUIDANCE => 'NO_GUIDANCE', + self::ENROUTE_TO_DESTINATION => 'ENROUTE_TO_DESTINATION', + self::OFF_ROUTE => 'OFF_ROUTE', + self::ARRIVED_AT_DESTINATION => 'ARRIVED_AT_DESTINATION', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/GetDeliveryVehicleRequest.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/GetDeliveryVehicleRequest.php new file mode 100644 index 000000000000..20719e8f261d --- /dev/null +++ b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/GetDeliveryVehicleRequest.php @@ -0,0 +1,140 @@ +maps.fleetengine.delivery.v1.GetDeliveryVehicleRequest + */ +class GetDeliveryVehicleRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The standard Delivery API request header. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $header = null; + /** + * Required. Must be in the format + * `providers/{provider}/deliveryVehicles/{delivery_vehicle}`. + * The `provider` must be the Google Cloud Project ID. For example, + * `sample-cloud-project`. + * + * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Must be in the format + * `providers/{provider}/deliveryVehicles/{delivery_vehicle}`. + * The `provider` must be the Google Cloud Project ID. For example, + * `sample-cloud-project`. Please see + * {@see DeliveryServiceClient::deliveryVehicleName()} for help formatting this field. + * + * @return \Google\Maps\FleetEngine\Delivery\V1\GetDeliveryVehicleRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Maps\FleetEngine\Delivery\V1\DeliveryRequestHeader $header + * Optional. The standard Delivery API request header. + * @type string $name + * Required. Must be in the format + * `providers/{provider}/deliveryVehicles/{delivery_vehicle}`. + * The `provider` must be the Google Cloud Project ID. For example, + * `sample-cloud-project`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Fleetengine\Delivery\V1\DeliveryApi::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The standard Delivery API request header. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Maps\FleetEngine\Delivery\V1\DeliveryRequestHeader|null + */ + public function getHeader() + { + return $this->header; + } + + public function hasHeader() + { + return isset($this->header); + } + + public function clearHeader() + { + unset($this->header); + } + + /** + * Optional. The standard Delivery API request header. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Maps\FleetEngine\Delivery\V1\DeliveryRequestHeader $var + * @return $this + */ + public function setHeader($var) + { + GPBUtil::checkMessage($var, \Google\Maps\FleetEngine\Delivery\V1\DeliveryRequestHeader::class); + $this->header = $var; + + return $this; + } + + /** + * Required. Must be in the format + * `providers/{provider}/deliveryVehicles/{delivery_vehicle}`. + * The `provider` must be the Google Cloud Project ID. For example, + * `sample-cloud-project`. + * + * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Must be in the format + * `providers/{provider}/deliveryVehicles/{delivery_vehicle}`. + * The `provider` must be the Google Cloud Project ID. For example, + * `sample-cloud-project`. + * + * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/GetTaskRequest.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/GetTaskRequest.php new file mode 100644 index 000000000000..019e1e9dc29d --- /dev/null +++ b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/GetTaskRequest.php @@ -0,0 +1,135 @@ +maps.fleetengine.delivery.v1.GetTaskRequest + */ +class GetTaskRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The standard Delivery API request header. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $header = null; + /** + * Required. Must be in the format `providers/{provider}/tasks/{task}`. The + * `provider` must be the Google Cloud Project ID. For example, + * `sample-cloud-project`. + * + * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Must be in the format `providers/{provider}/tasks/{task}`. The + * `provider` must be the Google Cloud Project ID. For example, + * `sample-cloud-project`. Please see + * {@see DeliveryServiceClient::taskName()} for help formatting this field. + * + * @return \Google\Maps\FleetEngine\Delivery\V1\GetTaskRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Maps\FleetEngine\Delivery\V1\DeliveryRequestHeader $header + * Optional. The standard Delivery API request header. + * @type string $name + * Required. Must be in the format `providers/{provider}/tasks/{task}`. The + * `provider` must be the Google Cloud Project ID. For example, + * `sample-cloud-project`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Fleetengine\Delivery\V1\DeliveryApi::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The standard Delivery API request header. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Maps\FleetEngine\Delivery\V1\DeliveryRequestHeader|null + */ + public function getHeader() + { + return $this->header; + } + + public function hasHeader() + { + return isset($this->header); + } + + public function clearHeader() + { + unset($this->header); + } + + /** + * Optional. The standard Delivery API request header. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Maps\FleetEngine\Delivery\V1\DeliveryRequestHeader $var + * @return $this + */ + public function setHeader($var) + { + GPBUtil::checkMessage($var, \Google\Maps\FleetEngine\Delivery\V1\DeliveryRequestHeader::class); + $this->header = $var; + + return $this; + } + + /** + * Required. Must be in the format `providers/{provider}/tasks/{task}`. The + * `provider` must be the Google Cloud Project ID. For example, + * `sample-cloud-project`. + * + * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Must be in the format `providers/{provider}/tasks/{task}`. The + * `provider` must be the Google Cloud Project ID. For example, + * `sample-cloud-project`. + * + * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/GetTaskTrackingInfoRequest.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/GetTaskTrackingInfoRequest.php new file mode 100644 index 000000000000..022c8c8f04b0 --- /dev/null +++ b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/GetTaskTrackingInfoRequest.php @@ -0,0 +1,145 @@ +maps.fleetengine.delivery.v1.GetTaskTrackingInfoRequest + */ +class GetTaskTrackingInfoRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The standard Delivery API request header. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $header = null; + /** + * Required. Must be in the format + * `providers/{provider}/taskTrackingInfo/{tracking_id}`. The `provider` + * must be the Google Cloud Project ID, and the `tracking_id` must be the + * tracking ID associated with the task. An example name can be + * `providers/sample-cloud-project/taskTrackingInfo/sample-tracking-id`. + * + * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Must be in the format + * `providers/{provider}/taskTrackingInfo/{tracking_id}`. The `provider` + * must be the Google Cloud Project ID, and the `tracking_id` must be the + * tracking ID associated with the task. An example name can be + * `providers/sample-cloud-project/taskTrackingInfo/sample-tracking-id`. Please see + * {@see DeliveryServiceClient::taskTrackingInfoName()} for help formatting this field. + * + * @return \Google\Maps\FleetEngine\Delivery\V1\GetTaskTrackingInfoRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Maps\FleetEngine\Delivery\V1\DeliveryRequestHeader $header + * Optional. The standard Delivery API request header. + * @type string $name + * Required. Must be in the format + * `providers/{provider}/taskTrackingInfo/{tracking_id}`. The `provider` + * must be the Google Cloud Project ID, and the `tracking_id` must be the + * tracking ID associated with the task. An example name can be + * `providers/sample-cloud-project/taskTrackingInfo/sample-tracking-id`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Fleetengine\Delivery\V1\DeliveryApi::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The standard Delivery API request header. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Maps\FleetEngine\Delivery\V1\DeliveryRequestHeader|null + */ + public function getHeader() + { + return $this->header; + } + + public function hasHeader() + { + return isset($this->header); + } + + public function clearHeader() + { + unset($this->header); + } + + /** + * Optional. The standard Delivery API request header. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Maps\FleetEngine\Delivery\V1\DeliveryRequestHeader $var + * @return $this + */ + public function setHeader($var) + { + GPBUtil::checkMessage($var, \Google\Maps\FleetEngine\Delivery\V1\DeliveryRequestHeader::class); + $this->header = $var; + + return $this; + } + + /** + * Required. Must be in the format + * `providers/{provider}/taskTrackingInfo/{tracking_id}`. The `provider` + * must be the Google Cloud Project ID, and the `tracking_id` must be the + * tracking ID associated with the task. An example name can be + * `providers/sample-cloud-project/taskTrackingInfo/sample-tracking-id`. + * + * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Must be in the format + * `providers/{provider}/taskTrackingInfo/{tracking_id}`. The `provider` + * must be the Google Cloud Project ID, and the `tracking_id` must be the + * tracking ID associated with the task. An example name can be + * `providers/sample-cloud-project/taskTrackingInfo/sample-tracking-id`. + * + * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/ListDeliveryVehiclesRequest.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/ListDeliveryVehiclesRequest.php new file mode 100644 index 000000000000..6bdedae146df --- /dev/null +++ b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/ListDeliveryVehiclesRequest.php @@ -0,0 +1,365 @@ +maps.fleetengine.delivery.v1.ListDeliveryVehiclesRequest + */ +class ListDeliveryVehiclesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The standard Delivery API request header. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $header = null; + /** + * Required. Must be in the format `providers/{provider}`. + * The `provider` must be the Google Cloud Project ID. + * For example, `sample-cloud-project`. + * + * Generated from protobuf field string parent = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of vehicles to return. The service may return + * fewer than this number. If you don't specify this number, then the server + * determines the number of results to return. + * + * Generated from protobuf field int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A page token, received from a previous `ListDeliveryVehicles` + * call. You must provide this in order to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListDeliveryVehicles` + * must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. A filter query to apply when listing delivery vehicles. See + * http://aip.dev/160 for examples of the filter syntax. If you don't specify + * a value, or if you specify an empty string for the filter, then all + * delivery vehicles are returned. + * Note that the only queries supported for `ListDeliveryVehicles` are + * on vehicle attributes (for example, `attributes. = ` or + * `attributes. = AND attributes. = `). Also, all + * attributes are stored as strings, so the only supported comparisons against + * attributes are string comparisons. In order to compare against number or + * boolean values, the values must be explicitly quoted to be treated as + * strings (for example, `attributes. = "10"` or + * `attributes. = "true"`). + * The maximum number of restrictions allowed in a filter query is 50. A + * restriction is a part of the query of the form + * `attribute. `, for example `attributes.foo = bar` + * is 1 restriction. + * + * Generated from protobuf field string filter = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. A filter that limits the vehicles returned to those whose last + * known location was in the rectangular area defined by the viewport. + * + * Generated from protobuf field .google.geo.type.Viewport viewport = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $viewport = null; + + /** + * @param string $parent Required. Must be in the format `providers/{provider}`. + * The `provider` must be the Google Cloud Project ID. + * For example, `sample-cloud-project`. Please see + * {@see DeliveryServiceClient::providerName()} for help formatting this field. + * + * @return \Google\Maps\FleetEngine\Delivery\V1\ListDeliveryVehiclesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Maps\FleetEngine\Delivery\V1\DeliveryRequestHeader $header + * Optional. The standard Delivery API request header. + * @type string $parent + * Required. Must be in the format `providers/{provider}`. + * The `provider` must be the Google Cloud Project ID. + * For example, `sample-cloud-project`. + * @type int $page_size + * Optional. The maximum number of vehicles to return. The service may return + * fewer than this number. If you don't specify this number, then the server + * determines the number of results to return. + * @type string $page_token + * Optional. A page token, received from a previous `ListDeliveryVehicles` + * call. You must provide this in order to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListDeliveryVehicles` + * must match the call that provided the page token. + * @type string $filter + * Optional. A filter query to apply when listing delivery vehicles. See + * http://aip.dev/160 for examples of the filter syntax. If you don't specify + * a value, or if you specify an empty string for the filter, then all + * delivery vehicles are returned. + * Note that the only queries supported for `ListDeliveryVehicles` are + * on vehicle attributes (for example, `attributes. = ` or + * `attributes. = AND attributes. = `). Also, all + * attributes are stored as strings, so the only supported comparisons against + * attributes are string comparisons. In order to compare against number or + * boolean values, the values must be explicitly quoted to be treated as + * strings (for example, `attributes. = "10"` or + * `attributes. = "true"`). + * The maximum number of restrictions allowed in a filter query is 50. A + * restriction is a part of the query of the form + * `attribute. `, for example `attributes.foo = bar` + * is 1 restriction. + * @type \Google\Geo\Type\Viewport $viewport + * Optional. A filter that limits the vehicles returned to those whose last + * known location was in the rectangular area defined by the viewport. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Fleetengine\Delivery\V1\DeliveryApi::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The standard Delivery API request header. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Maps\FleetEngine\Delivery\V1\DeliveryRequestHeader|null + */ + public function getHeader() + { + return $this->header; + } + + public function hasHeader() + { + return isset($this->header); + } + + public function clearHeader() + { + unset($this->header); + } + + /** + * Optional. The standard Delivery API request header. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Maps\FleetEngine\Delivery\V1\DeliveryRequestHeader $var + * @return $this + */ + public function setHeader($var) + { + GPBUtil::checkMessage($var, \Google\Maps\FleetEngine\Delivery\V1\DeliveryRequestHeader::class); + $this->header = $var; + + return $this; + } + + /** + * Required. Must be in the format `providers/{provider}`. + * The `provider` must be the Google Cloud Project ID. + * For example, `sample-cloud-project`. + * + * Generated from protobuf field string parent = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Must be in the format `providers/{provider}`. + * The `provider` must be the Google Cloud Project ID. + * For example, `sample-cloud-project`. + * + * Generated from protobuf field string parent = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The maximum number of vehicles to return. The service may return + * fewer than this number. If you don't specify this number, then the server + * determines the number of results to return. + * + * Generated from protobuf field int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of vehicles to return. The service may return + * fewer than this number. If you don't specify this number, then the server + * determines the number of results to return. + * + * Generated from protobuf field int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. A page token, received from a previous `ListDeliveryVehicles` + * call. You must provide this in order to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListDeliveryVehicles` + * must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A page token, received from a previous `ListDeliveryVehicles` + * call. You must provide this in order to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListDeliveryVehicles` + * must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. A filter query to apply when listing delivery vehicles. See + * http://aip.dev/160 for examples of the filter syntax. If you don't specify + * a value, or if you specify an empty string for the filter, then all + * delivery vehicles are returned. + * Note that the only queries supported for `ListDeliveryVehicles` are + * on vehicle attributes (for example, `attributes. = ` or + * `attributes. = AND attributes. = `). Also, all + * attributes are stored as strings, so the only supported comparisons against + * attributes are string comparisons. In order to compare against number or + * boolean values, the values must be explicitly quoted to be treated as + * strings (for example, `attributes. = "10"` or + * `attributes. = "true"`). + * The maximum number of restrictions allowed in a filter query is 50. A + * restriction is a part of the query of the form + * `attribute. `, for example `attributes.foo = bar` + * is 1 restriction. + * + * Generated from protobuf field string filter = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. A filter query to apply when listing delivery vehicles. See + * http://aip.dev/160 for examples of the filter syntax. If you don't specify + * a value, or if you specify an empty string for the filter, then all + * delivery vehicles are returned. + * Note that the only queries supported for `ListDeliveryVehicles` are + * on vehicle attributes (for example, `attributes. = ` or + * `attributes. = AND attributes. = `). Also, all + * attributes are stored as strings, so the only supported comparisons against + * attributes are string comparisons. In order to compare against number or + * boolean values, the values must be explicitly quoted to be treated as + * strings (for example, `attributes. = "10"` or + * `attributes. = "true"`). + * The maximum number of restrictions allowed in a filter query is 50. A + * restriction is a part of the query of the form + * `attribute. `, for example `attributes.foo = bar` + * is 1 restriction. + * + * Generated from protobuf field string filter = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Optional. A filter that limits the vehicles returned to those whose last + * known location was in the rectangular area defined by the viewport. + * + * Generated from protobuf field .google.geo.type.Viewport viewport = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Geo\Type\Viewport|null + */ + public function getViewport() + { + return $this->viewport; + } + + public function hasViewport() + { + return isset($this->viewport); + } + + public function clearViewport() + { + unset($this->viewport); + } + + /** + * Optional. A filter that limits the vehicles returned to those whose last + * known location was in the rectangular area defined by the viewport. + * + * Generated from protobuf field .google.geo.type.Viewport viewport = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Geo\Type\Viewport $var + * @return $this + */ + public function setViewport($var) + { + GPBUtil::checkMessage($var, \Google\Geo\Type\Viewport::class); + $this->viewport = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/ListDeliveryVehiclesResponse.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/ListDeliveryVehiclesResponse.php new file mode 100644 index 000000000000..286675bd84db --- /dev/null +++ b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/ListDeliveryVehiclesResponse.php @@ -0,0 +1,159 @@ +maps.fleetengine.delivery.v1.ListDeliveryVehiclesResponse + */ +class ListDeliveryVehiclesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The set of delivery vehicles that meet the requested filtering criteria. + * When no filter is specified, the request returns all delivery vehicles. A + * successful response can also be empty. An empty response indicates that no + * delivery vehicles were found meeting the requested filter criteria. + * + * Generated from protobuf field repeated .maps.fleetengine.delivery.v1.DeliveryVehicle delivery_vehicles = 1; + */ + private $delivery_vehicles; + /** + * You can pass this token in the `ListDeliveryVehiclesRequest` to continue to + * list results. When all of the results are returned, this field won't be in + * the response, or it will be an empty string. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * The total number of delivery vehicles that match the request criteria, + * across all pages. + * + * Generated from protobuf field int64 total_size = 3; + */ + protected $total_size = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Maps\FleetEngine\Delivery\V1\DeliveryVehicle>|\Google\Protobuf\Internal\RepeatedField $delivery_vehicles + * The set of delivery vehicles that meet the requested filtering criteria. + * When no filter is specified, the request returns all delivery vehicles. A + * successful response can also be empty. An empty response indicates that no + * delivery vehicles were found meeting the requested filter criteria. + * @type string $next_page_token + * You can pass this token in the `ListDeliveryVehiclesRequest` to continue to + * list results. When all of the results are returned, this field won't be in + * the response, or it will be an empty string. + * @type int|string $total_size + * The total number of delivery vehicles that match the request criteria, + * across all pages. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Fleetengine\Delivery\V1\DeliveryApi::initOnce(); + parent::__construct($data); + } + + /** + * The set of delivery vehicles that meet the requested filtering criteria. + * When no filter is specified, the request returns all delivery vehicles. A + * successful response can also be empty. An empty response indicates that no + * delivery vehicles were found meeting the requested filter criteria. + * + * Generated from protobuf field repeated .maps.fleetengine.delivery.v1.DeliveryVehicle delivery_vehicles = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDeliveryVehicles() + { + return $this->delivery_vehicles; + } + + /** + * The set of delivery vehicles that meet the requested filtering criteria. + * When no filter is specified, the request returns all delivery vehicles. A + * successful response can also be empty. An empty response indicates that no + * delivery vehicles were found meeting the requested filter criteria. + * + * Generated from protobuf field repeated .maps.fleetengine.delivery.v1.DeliveryVehicle delivery_vehicles = 1; + * @param array<\Google\Maps\FleetEngine\Delivery\V1\DeliveryVehicle>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDeliveryVehicles($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\FleetEngine\Delivery\V1\DeliveryVehicle::class); + $this->delivery_vehicles = $arr; + + return $this; + } + + /** + * You can pass this token in the `ListDeliveryVehiclesRequest` to continue to + * list results. When all of the results are returned, this field won't be in + * the response, or it will be an empty string. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * You can pass this token in the `ListDeliveryVehiclesRequest` to continue to + * list results. When all of the results are returned, this field won't be in + * the response, or it will be an empty string. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * The total number of delivery vehicles that match the request criteria, + * across all pages. + * + * Generated from protobuf field int64 total_size = 3; + * @return int|string + */ + public function getTotalSize() + { + return $this->total_size; + } + + /** + * The total number of delivery vehicles that match the request criteria, + * across all pages. + * + * Generated from protobuf field int64 total_size = 3; + * @param int|string $var + * @return $this + */ + public function setTotalSize($var) + { + GPBUtil::checkInt64($var); + $this->total_size = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/ListTasksRequest.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/ListTasksRequest.php new file mode 100644 index 000000000000..e23c8d8e365d --- /dev/null +++ b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/ListTasksRequest.php @@ -0,0 +1,273 @@ +maps.fleetengine.delivery.v1.ListTasksRequest + */ +class ListTasksRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The standard Delivery API request header. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $header = null; + /** + * Required. Must be in the format `providers/{provider}`. + * The `provider` must be the Google Cloud Project ID. For example, + * `sample-cloud-project`. + * + * Generated from protobuf field string parent = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of Tasks to return. The service may return + * fewer than this value. If you don't specify this value, then the server + * determines the number of results to return. + * + * Generated from protobuf field int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A page token received from a previous `ListTasks` call. + * You can provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListTasks` must match + * the call that provided the page token. + * + * Generated from protobuf field string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. A filter query to apply when listing Tasks. See + * http://aip.dev/160 for examples of filter syntax. If you don't specify a + * value, or if you filter on an empty string, then all Tasks are returned. + * For information about the Task properties that you can filter on, see [List + * tasks](https://developers.google.com/maps/documentation/mobility/fleet-engine/journeys/tasks/find-tasks#filter_listed_tasks). + * + * Generated from protobuf field string filter = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + + /** + * @param string $parent Required. Must be in the format `providers/{provider}`. + * The `provider` must be the Google Cloud Project ID. For example, + * `sample-cloud-project`. Please see + * {@see DeliveryServiceClient::providerName()} for help formatting this field. + * + * @return \Google\Maps\FleetEngine\Delivery\V1\ListTasksRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Maps\FleetEngine\Delivery\V1\DeliveryRequestHeader $header + * Optional. The standard Delivery API request header. + * @type string $parent + * Required. Must be in the format `providers/{provider}`. + * The `provider` must be the Google Cloud Project ID. For example, + * `sample-cloud-project`. + * @type int $page_size + * Optional. The maximum number of Tasks to return. The service may return + * fewer than this value. If you don't specify this value, then the server + * determines the number of results to return. + * @type string $page_token + * Optional. A page token received from a previous `ListTasks` call. + * You can provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListTasks` must match + * the call that provided the page token. + * @type string $filter + * Optional. A filter query to apply when listing Tasks. See + * http://aip.dev/160 for examples of filter syntax. If you don't specify a + * value, or if you filter on an empty string, then all Tasks are returned. + * For information about the Task properties that you can filter on, see [List + * tasks](https://developers.google.com/maps/documentation/mobility/fleet-engine/journeys/tasks/find-tasks#filter_listed_tasks). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Fleetengine\Delivery\V1\DeliveryApi::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The standard Delivery API request header. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Maps\FleetEngine\Delivery\V1\DeliveryRequestHeader|null + */ + public function getHeader() + { + return $this->header; + } + + public function hasHeader() + { + return isset($this->header); + } + + public function clearHeader() + { + unset($this->header); + } + + /** + * Optional. The standard Delivery API request header. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Maps\FleetEngine\Delivery\V1\DeliveryRequestHeader $var + * @return $this + */ + public function setHeader($var) + { + GPBUtil::checkMessage($var, \Google\Maps\FleetEngine\Delivery\V1\DeliveryRequestHeader::class); + $this->header = $var; + + return $this; + } + + /** + * Required. Must be in the format `providers/{provider}`. + * The `provider` must be the Google Cloud Project ID. For example, + * `sample-cloud-project`. + * + * Generated from protobuf field string parent = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Must be in the format `providers/{provider}`. + * The `provider` must be the Google Cloud Project ID. For example, + * `sample-cloud-project`. + * + * Generated from protobuf field string parent = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The maximum number of Tasks to return. The service may return + * fewer than this value. If you don't specify this value, then the server + * determines the number of results to return. + * + * Generated from protobuf field int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of Tasks to return. The service may return + * fewer than this value. If you don't specify this value, then the server + * determines the number of results to return. + * + * Generated from protobuf field int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. A page token received from a previous `ListTasks` call. + * You can provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListTasks` must match + * the call that provided the page token. + * + * Generated from protobuf field string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A page token received from a previous `ListTasks` call. + * You can provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListTasks` must match + * the call that provided the page token. + * + * Generated from protobuf field string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. A filter query to apply when listing Tasks. See + * http://aip.dev/160 for examples of filter syntax. If you don't specify a + * value, or if you filter on an empty string, then all Tasks are returned. + * For information about the Task properties that you can filter on, see [List + * tasks](https://developers.google.com/maps/documentation/mobility/fleet-engine/journeys/tasks/find-tasks#filter_listed_tasks). + * + * Generated from protobuf field string filter = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. A filter query to apply when listing Tasks. See + * http://aip.dev/160 for examples of filter syntax. If you don't specify a + * value, or if you filter on an empty string, then all Tasks are returned. + * For information about the Task properties that you can filter on, see [List + * tasks](https://developers.google.com/maps/documentation/mobility/fleet-engine/journeys/tasks/find-tasks#filter_listed_tasks). + * + * Generated from protobuf field string filter = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/ListTasksResponse.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/ListTasksResponse.php new file mode 100644 index 000000000000..6ff86766b915 --- /dev/null +++ b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/ListTasksResponse.php @@ -0,0 +1,160 @@ +maps.fleetengine.delivery.v1.ListTasksResponse + */ +class ListTasksResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The set of Tasks that meet the requested filtering criteria. When no filter + * is specified, the request returns all tasks. A successful response can also + * be empty. An empty response indicates that no Tasks were found meeting the + * requested filter criteria. + * + * Generated from protobuf field repeated .maps.fleetengine.delivery.v1.Task tasks = 1; + */ + private $tasks; + /** + * Pass this token in the `ListTasksRequest` to continue to list results. + * If all results have been returned, then this field is either an empty + * string, or it doesn't appear in the response. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * The total number of Tasks that match the request criteria, across all + * pages. + * + * Generated from protobuf field int64 total_size = 3; + */ + protected $total_size = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Maps\FleetEngine\Delivery\V1\Task>|\Google\Protobuf\Internal\RepeatedField $tasks + * The set of Tasks that meet the requested filtering criteria. When no filter + * is specified, the request returns all tasks. A successful response can also + * be empty. An empty response indicates that no Tasks were found meeting the + * requested filter criteria. + * @type string $next_page_token + * Pass this token in the `ListTasksRequest` to continue to list results. + * If all results have been returned, then this field is either an empty + * string, or it doesn't appear in the response. + * @type int|string $total_size + * The total number of Tasks that match the request criteria, across all + * pages. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Fleetengine\Delivery\V1\DeliveryApi::initOnce(); + parent::__construct($data); + } + + /** + * The set of Tasks that meet the requested filtering criteria. When no filter + * is specified, the request returns all tasks. A successful response can also + * be empty. An empty response indicates that no Tasks were found meeting the + * requested filter criteria. + * + * Generated from protobuf field repeated .maps.fleetengine.delivery.v1.Task tasks = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTasks() + { + return $this->tasks; + } + + /** + * The set of Tasks that meet the requested filtering criteria. When no filter + * is specified, the request returns all tasks. A successful response can also + * be empty. An empty response indicates that no Tasks were found meeting the + * requested filter criteria. + * + * Generated from protobuf field repeated .maps.fleetengine.delivery.v1.Task tasks = 1; + * @param array<\Google\Maps\FleetEngine\Delivery\V1\Task>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTasks($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\FleetEngine\Delivery\V1\Task::class); + $this->tasks = $arr; + + return $this; + } + + /** + * Pass this token in the `ListTasksRequest` to continue to list results. + * If all results have been returned, then this field is either an empty + * string, or it doesn't appear in the response. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Pass this token in the `ListTasksRequest` to continue to list results. + * If all results have been returned, then this field is either an empty + * string, or it doesn't appear in the response. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * The total number of Tasks that match the request criteria, across all + * pages. + * + * Generated from protobuf field int64 total_size = 3; + * @return int|string + */ + public function getTotalSize() + { + return $this->total_size; + } + + /** + * The total number of Tasks that match the request criteria, across all + * pages. + * + * Generated from protobuf field int64 total_size = 3; + * @param int|string $var + * @return $this + */ + public function setTotalSize($var) + { + GPBUtil::checkInt64($var); + $this->total_size = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/LocationInfo.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/LocationInfo.php new file mode 100644 index 000000000000..6c8597013b43 --- /dev/null +++ b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/LocationInfo.php @@ -0,0 +1,77 @@ +maps.fleetengine.delivery.v1.LocationInfo + */ +class LocationInfo extends \Google\Protobuf\Internal\Message +{ + /** + * The location's coordinates. + * + * Generated from protobuf field .google.type.LatLng point = 1; + */ + protected $point = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Type\LatLng $point + * The location's coordinates. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Fleetengine\Delivery\V1\DeliveryVehicles::initOnce(); + parent::__construct($data); + } + + /** + * The location's coordinates. + * + * Generated from protobuf field .google.type.LatLng point = 1; + * @return \Google\Type\LatLng|null + */ + public function getPoint() + { + return $this->point; + } + + public function hasPoint() + { + return isset($this->point); + } + + public function clearPoint() + { + unset($this->point); + } + + /** + * The location's coordinates. + * + * Generated from protobuf field .google.type.LatLng point = 1; + * @param \Google\Type\LatLng $var + * @return $this + */ + public function setPoint($var) + { + GPBUtil::checkMessage($var, \Google\Type\LatLng::class); + $this->point = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/Task.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/Task.php new file mode 100644 index 000000000000..66471744ba32 --- /dev/null +++ b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/Task.php @@ -0,0 +1,720 @@ +maps.fleetengine.delivery.v1.Task + */ +class Task extends \Google\Protobuf\Internal\Message +{ + /** + * Must be in the format `providers/{provider}/tasks/{task}`. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Required. Immutable. Defines the type of the Task. For example, a break or + * shipment. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.Task.Type type = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + */ + protected $type = 0; + /** + * Required. The current execution state of the Task. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.Task.State state = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $state = 0; + /** + * The outcome of the Task. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.Task.TaskOutcome task_outcome = 9; + */ + protected $task_outcome = 0; + /** + * The timestamp that indicates when the `Task`'s outcome was set by the + * provider. + * + * Generated from protobuf field .google.protobuf.Timestamp task_outcome_time = 10; + */ + protected $task_outcome_time = null; + /** + * The location where the `Task`'s outcome was set. This value is updated as + * part of `UpdateTask`. If this value isn't explicitly updated by the + * provider, then Fleet Engine populates it by default with the last known + * vehicle location (the *raw* location). + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.LocationInfo task_outcome_location = 11; + */ + protected $task_outcome_location = null; + /** + * Indicates where the value of the `task_outcome_location` came from. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.Task.TaskOutcomeLocationSource task_outcome_location_source = 12; + */ + protected $task_outcome_location_source = 0; + /** + * Immutable. This field facilitates the storing of an ID so you can avoid + * using a complicated mapping. You cannot set `tracking_id` for Tasks of type + * `UNAVAILABLE` and `SCHEDULED_STOP`. These IDs are subject to the + * following restrictions: + * * Must be a valid Unicode string. + * * Limited to a maximum length of 64 characters. + * * Normalized according to [Unicode Normalization Form C] + * (http://www.unicode.org/reports/tr15/). + * * May not contain any of the following ASCII characters: '/', ':', '?', + * ',', or '#'. + * + * Generated from protobuf field string tracking_id = 4 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $tracking_id = ''; + /** + * Output only. The ID of the vehicle that is executing this Task. Delivery + * Vehicle IDs are subject to the following restrictions: + * * Must be a valid Unicode string. + * * Limited to a maximum length of 64 characters. + * * Normalized according to [Unicode Normalization Form C] + * (http://www.unicode.org/reports/tr15/). + * * May not contain any of the following ASCII characters: '/', ':', '?', + * ',', or '#'. + * + * Generated from protobuf field string delivery_vehicle_id = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $delivery_vehicle_id = ''; + /** + * Immutable. The location where the Task will be completed. + * Optional for `UNAVAILABLE` Tasks, but required for all other Tasks. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.LocationInfo planned_location = 6 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $planned_location = null; + /** + * Required. Immutable. The time needed to execute a Task at this location. + * + * Generated from protobuf field .google.protobuf.Duration task_duration = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + */ + protected $task_duration = null; + /** + * The time window during which the task should be completed. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.TimeWindow target_time_window = 14; + */ + protected $target_time_window = null; + /** + * Output only. Journey sharing-specific fields. Not populated when state is + * `CLOSED`. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.Task.JourneySharingInfo journey_sharing_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $journey_sharing_info = null; + /** + * The configuration for task tracking that specifies which data elements are + * visible to the end users under what circumstances. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.TaskTrackingViewConfig task_tracking_view_config = 13; + */ + protected $task_tracking_view_config = null; + /** + * A list of custom Task attributes. Each attribute must have a unique key. + * + * Generated from protobuf field repeated .maps.fleetengine.delivery.v1.TaskAttribute attributes = 15; + */ + private $attributes; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Must be in the format `providers/{provider}/tasks/{task}`. + * @type int $type + * Required. Immutable. Defines the type of the Task. For example, a break or + * shipment. + * @type int $state + * Required. The current execution state of the Task. + * @type int $task_outcome + * The outcome of the Task. + * @type \Google\Protobuf\Timestamp $task_outcome_time + * The timestamp that indicates when the `Task`'s outcome was set by the + * provider. + * @type \Google\Maps\FleetEngine\Delivery\V1\LocationInfo $task_outcome_location + * The location where the `Task`'s outcome was set. This value is updated as + * part of `UpdateTask`. If this value isn't explicitly updated by the + * provider, then Fleet Engine populates it by default with the last known + * vehicle location (the *raw* location). + * @type int $task_outcome_location_source + * Indicates where the value of the `task_outcome_location` came from. + * @type string $tracking_id + * Immutable. This field facilitates the storing of an ID so you can avoid + * using a complicated mapping. You cannot set `tracking_id` for Tasks of type + * `UNAVAILABLE` and `SCHEDULED_STOP`. These IDs are subject to the + * following restrictions: + * * Must be a valid Unicode string. + * * Limited to a maximum length of 64 characters. + * * Normalized according to [Unicode Normalization Form C] + * (http://www.unicode.org/reports/tr15/). + * * May not contain any of the following ASCII characters: '/', ':', '?', + * ',', or '#'. + * @type string $delivery_vehicle_id + * Output only. The ID of the vehicle that is executing this Task. Delivery + * Vehicle IDs are subject to the following restrictions: + * * Must be a valid Unicode string. + * * Limited to a maximum length of 64 characters. + * * Normalized according to [Unicode Normalization Form C] + * (http://www.unicode.org/reports/tr15/). + * * May not contain any of the following ASCII characters: '/', ':', '?', + * ',', or '#'. + * @type \Google\Maps\FleetEngine\Delivery\V1\LocationInfo $planned_location + * Immutable. The location where the Task will be completed. + * Optional for `UNAVAILABLE` Tasks, but required for all other Tasks. + * @type \Google\Protobuf\Duration $task_duration + * Required. Immutable. The time needed to execute a Task at this location. + * @type \Google\Maps\FleetEngine\Delivery\V1\TimeWindow $target_time_window + * The time window during which the task should be completed. + * @type \Google\Maps\FleetEngine\Delivery\V1\Task\JourneySharingInfo $journey_sharing_info + * Output only. Journey sharing-specific fields. Not populated when state is + * `CLOSED`. + * @type \Google\Maps\FleetEngine\Delivery\V1\TaskTrackingViewConfig $task_tracking_view_config + * The configuration for task tracking that specifies which data elements are + * visible to the end users under what circumstances. + * @type array<\Google\Maps\FleetEngine\Delivery\V1\TaskAttribute>|\Google\Protobuf\Internal\RepeatedField $attributes + * A list of custom Task attributes. Each attribute must have a unique key. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Fleetengine\Delivery\V1\Tasks::initOnce(); + parent::__construct($data); + } + + /** + * Must be in the format `providers/{provider}/tasks/{task}`. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Must be in the format `providers/{provider}/tasks/{task}`. + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. Immutable. Defines the type of the Task. For example, a break or + * shipment. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.Task.Type type = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Required. Immutable. Defines the type of the Task. For example, a break or + * shipment. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.Task.Type type = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Maps\FleetEngine\Delivery\V1\Task\Type::class); + $this->type = $var; + + return $this; + } + + /** + * Required. The current execution state of the Task. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.Task.State state = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Required. The current execution state of the Task. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.Task.State state = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Maps\FleetEngine\Delivery\V1\Task\State::class); + $this->state = $var; + + return $this; + } + + /** + * The outcome of the Task. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.Task.TaskOutcome task_outcome = 9; + * @return int + */ + public function getTaskOutcome() + { + return $this->task_outcome; + } + + /** + * The outcome of the Task. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.Task.TaskOutcome task_outcome = 9; + * @param int $var + * @return $this + */ + public function setTaskOutcome($var) + { + GPBUtil::checkEnum($var, \Google\Maps\FleetEngine\Delivery\V1\Task\TaskOutcome::class); + $this->task_outcome = $var; + + return $this; + } + + /** + * The timestamp that indicates when the `Task`'s outcome was set by the + * provider. + * + * Generated from protobuf field .google.protobuf.Timestamp task_outcome_time = 10; + * @return \Google\Protobuf\Timestamp|null + */ + public function getTaskOutcomeTime() + { + return $this->task_outcome_time; + } + + public function hasTaskOutcomeTime() + { + return isset($this->task_outcome_time); + } + + public function clearTaskOutcomeTime() + { + unset($this->task_outcome_time); + } + + /** + * The timestamp that indicates when the `Task`'s outcome was set by the + * provider. + * + * Generated from protobuf field .google.protobuf.Timestamp task_outcome_time = 10; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setTaskOutcomeTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->task_outcome_time = $var; + + return $this; + } + + /** + * The location where the `Task`'s outcome was set. This value is updated as + * part of `UpdateTask`. If this value isn't explicitly updated by the + * provider, then Fleet Engine populates it by default with the last known + * vehicle location (the *raw* location). + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.LocationInfo task_outcome_location = 11; + * @return \Google\Maps\FleetEngine\Delivery\V1\LocationInfo|null + */ + public function getTaskOutcomeLocation() + { + return $this->task_outcome_location; + } + + public function hasTaskOutcomeLocation() + { + return isset($this->task_outcome_location); + } + + public function clearTaskOutcomeLocation() + { + unset($this->task_outcome_location); + } + + /** + * The location where the `Task`'s outcome was set. This value is updated as + * part of `UpdateTask`. If this value isn't explicitly updated by the + * provider, then Fleet Engine populates it by default with the last known + * vehicle location (the *raw* location). + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.LocationInfo task_outcome_location = 11; + * @param \Google\Maps\FleetEngine\Delivery\V1\LocationInfo $var + * @return $this + */ + public function setTaskOutcomeLocation($var) + { + GPBUtil::checkMessage($var, \Google\Maps\FleetEngine\Delivery\V1\LocationInfo::class); + $this->task_outcome_location = $var; + + return $this; + } + + /** + * Indicates where the value of the `task_outcome_location` came from. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.Task.TaskOutcomeLocationSource task_outcome_location_source = 12; + * @return int + */ + public function getTaskOutcomeLocationSource() + { + return $this->task_outcome_location_source; + } + + /** + * Indicates where the value of the `task_outcome_location` came from. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.Task.TaskOutcomeLocationSource task_outcome_location_source = 12; + * @param int $var + * @return $this + */ + public function setTaskOutcomeLocationSource($var) + { + GPBUtil::checkEnum($var, \Google\Maps\FleetEngine\Delivery\V1\Task\TaskOutcomeLocationSource::class); + $this->task_outcome_location_source = $var; + + return $this; + } + + /** + * Immutable. This field facilitates the storing of an ID so you can avoid + * using a complicated mapping. You cannot set `tracking_id` for Tasks of type + * `UNAVAILABLE` and `SCHEDULED_STOP`. These IDs are subject to the + * following restrictions: + * * Must be a valid Unicode string. + * * Limited to a maximum length of 64 characters. + * * Normalized according to [Unicode Normalization Form C] + * (http://www.unicode.org/reports/tr15/). + * * May not contain any of the following ASCII characters: '/', ':', '?', + * ',', or '#'. + * + * Generated from protobuf field string tracking_id = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getTrackingId() + { + return $this->tracking_id; + } + + /** + * Immutable. This field facilitates the storing of an ID so you can avoid + * using a complicated mapping. You cannot set `tracking_id` for Tasks of type + * `UNAVAILABLE` and `SCHEDULED_STOP`. These IDs are subject to the + * following restrictions: + * * Must be a valid Unicode string. + * * Limited to a maximum length of 64 characters. + * * Normalized according to [Unicode Normalization Form C] + * (http://www.unicode.org/reports/tr15/). + * * May not contain any of the following ASCII characters: '/', ':', '?', + * ',', or '#'. + * + * Generated from protobuf field string tracking_id = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * @param string $var + * @return $this + */ + public function setTrackingId($var) + { + GPBUtil::checkString($var, True); + $this->tracking_id = $var; + + return $this; + } + + /** + * Output only. The ID of the vehicle that is executing this Task. Delivery + * Vehicle IDs are subject to the following restrictions: + * * Must be a valid Unicode string. + * * Limited to a maximum length of 64 characters. + * * Normalized according to [Unicode Normalization Form C] + * (http://www.unicode.org/reports/tr15/). + * * May not contain any of the following ASCII characters: '/', ':', '?', + * ',', or '#'. + * + * Generated from protobuf field string delivery_vehicle_id = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDeliveryVehicleId() + { + return $this->delivery_vehicle_id; + } + + /** + * Output only. The ID of the vehicle that is executing this Task. Delivery + * Vehicle IDs are subject to the following restrictions: + * * Must be a valid Unicode string. + * * Limited to a maximum length of 64 characters. + * * Normalized according to [Unicode Normalization Form C] + * (http://www.unicode.org/reports/tr15/). + * * May not contain any of the following ASCII characters: '/', ':', '?', + * ',', or '#'. + * + * Generated from protobuf field string delivery_vehicle_id = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setDeliveryVehicleId($var) + { + GPBUtil::checkString($var, True); + $this->delivery_vehicle_id = $var; + + return $this; + } + + /** + * Immutable. The location where the Task will be completed. + * Optional for `UNAVAILABLE` Tasks, but required for all other Tasks. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.LocationInfo planned_location = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * @return \Google\Maps\FleetEngine\Delivery\V1\LocationInfo|null + */ + public function getPlannedLocation() + { + return $this->planned_location; + } + + public function hasPlannedLocation() + { + return isset($this->planned_location); + } + + public function clearPlannedLocation() + { + unset($this->planned_location); + } + + /** + * Immutable. The location where the Task will be completed. + * Optional for `UNAVAILABLE` Tasks, but required for all other Tasks. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.LocationInfo planned_location = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * @param \Google\Maps\FleetEngine\Delivery\V1\LocationInfo $var + * @return $this + */ + public function setPlannedLocation($var) + { + GPBUtil::checkMessage($var, \Google\Maps\FleetEngine\Delivery\V1\LocationInfo::class); + $this->planned_location = $var; + + return $this; + } + + /** + * Required. Immutable. The time needed to execute a Task at this location. + * + * Generated from protobuf field .google.protobuf.Duration task_duration = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * @return \Google\Protobuf\Duration|null + */ + public function getTaskDuration() + { + return $this->task_duration; + } + + public function hasTaskDuration() + { + return isset($this->task_duration); + } + + public function clearTaskDuration() + { + unset($this->task_duration); + } + + /** + * Required. Immutable. The time needed to execute a Task at this location. + * + * Generated from protobuf field .google.protobuf.Duration task_duration = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setTaskDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->task_duration = $var; + + return $this; + } + + /** + * The time window during which the task should be completed. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.TimeWindow target_time_window = 14; + * @return \Google\Maps\FleetEngine\Delivery\V1\TimeWindow|null + */ + public function getTargetTimeWindow() + { + return $this->target_time_window; + } + + public function hasTargetTimeWindow() + { + return isset($this->target_time_window); + } + + public function clearTargetTimeWindow() + { + unset($this->target_time_window); + } + + /** + * The time window during which the task should be completed. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.TimeWindow target_time_window = 14; + * @param \Google\Maps\FleetEngine\Delivery\V1\TimeWindow $var + * @return $this + */ + public function setTargetTimeWindow($var) + { + GPBUtil::checkMessage($var, \Google\Maps\FleetEngine\Delivery\V1\TimeWindow::class); + $this->target_time_window = $var; + + return $this; + } + + /** + * Output only. Journey sharing-specific fields. Not populated when state is + * `CLOSED`. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.Task.JourneySharingInfo journey_sharing_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Maps\FleetEngine\Delivery\V1\Task\JourneySharingInfo|null + */ + public function getJourneySharingInfo() + { + return $this->journey_sharing_info; + } + + public function hasJourneySharingInfo() + { + return isset($this->journey_sharing_info); + } + + public function clearJourneySharingInfo() + { + unset($this->journey_sharing_info); + } + + /** + * Output only. Journey sharing-specific fields. Not populated when state is + * `CLOSED`. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.Task.JourneySharingInfo journey_sharing_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Maps\FleetEngine\Delivery\V1\Task\JourneySharingInfo $var + * @return $this + */ + public function setJourneySharingInfo($var) + { + GPBUtil::checkMessage($var, \Google\Maps\FleetEngine\Delivery\V1\Task\JourneySharingInfo::class); + $this->journey_sharing_info = $var; + + return $this; + } + + /** + * The configuration for task tracking that specifies which data elements are + * visible to the end users under what circumstances. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.TaskTrackingViewConfig task_tracking_view_config = 13; + * @return \Google\Maps\FleetEngine\Delivery\V1\TaskTrackingViewConfig|null + */ + public function getTaskTrackingViewConfig() + { + return $this->task_tracking_view_config; + } + + public function hasTaskTrackingViewConfig() + { + return isset($this->task_tracking_view_config); + } + + public function clearTaskTrackingViewConfig() + { + unset($this->task_tracking_view_config); + } + + /** + * The configuration for task tracking that specifies which data elements are + * visible to the end users under what circumstances. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.TaskTrackingViewConfig task_tracking_view_config = 13; + * @param \Google\Maps\FleetEngine\Delivery\V1\TaskTrackingViewConfig $var + * @return $this + */ + public function setTaskTrackingViewConfig($var) + { + GPBUtil::checkMessage($var, \Google\Maps\FleetEngine\Delivery\V1\TaskTrackingViewConfig::class); + $this->task_tracking_view_config = $var; + + return $this; + } + + /** + * A list of custom Task attributes. Each attribute must have a unique key. + * + * Generated from protobuf field repeated .maps.fleetengine.delivery.v1.TaskAttribute attributes = 15; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAttributes() + { + return $this->attributes; + } + + /** + * A list of custom Task attributes. Each attribute must have a unique key. + * + * Generated from protobuf field repeated .maps.fleetengine.delivery.v1.TaskAttribute attributes = 15; + * @param array<\Google\Maps\FleetEngine\Delivery\V1\TaskAttribute>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAttributes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\FleetEngine\Delivery\V1\TaskAttribute::class); + $this->attributes = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/Task/JourneySharingInfo.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/Task/JourneySharingInfo.php new file mode 100644 index 000000000000..24c3728cd2e5 --- /dev/null +++ b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/Task/JourneySharingInfo.php @@ -0,0 +1,216 @@ +maps.fleetengine.delivery.v1.Task.JourneySharingInfo + */ +class JourneySharingInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Tracking information for the stops that the assigned vehicle will make + * before it completes this Task. Note that this list can contain stops + * from other tasks. + * The first segment, + * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0]` (gRPC) + * or `Task.journeySharingInfo.remainingVehicleJourneySegments[0]` (REST), + * contains route information from the driver's last known location to the + * upcoming `VehicleStop`. Current route information usually comes from the + * driver app, except for some cases noted in the documentation for + * [DeliveryVehicle.current_route_segment][maps.fleetengine.delivery.v1.DeliveryVehicle.current_route_segment]. + * The other segments in + * `Task.journey_sharing_info.remaining_vehicle_journey_segments` (gRPC) or + * `Task.journeySharingInfo.remainingVehicleJourneySegments` (REST) are + * populated by Fleet Engine. They provide route information between the + * remaining `VehicleStops`. + * + * Generated from protobuf field repeated .maps.fleetengine.delivery.v1.VehicleJourneySegment remaining_vehicle_journey_segments = 1; + */ + private $remaining_vehicle_journey_segments; + /** + * Indicates the vehicle's last reported location of the assigned vehicle. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryVehicleLocation last_location = 2; + */ + protected $last_location = null; + /** + * Indicates whether the vehicle's lastLocation can be snapped to + * the `current_route_segment`. This value is False if either + * `last_location` or `current_route_segment` don't exist. This value is + * computed by Fleet Engine. Updates from clients are ignored. + * + * Generated from protobuf field bool last_location_snappable = 3; + */ + protected $last_location_snappable = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Maps\FleetEngine\Delivery\V1\VehicleJourneySegment>|\Google\Protobuf\Internal\RepeatedField $remaining_vehicle_journey_segments + * Tracking information for the stops that the assigned vehicle will make + * before it completes this Task. Note that this list can contain stops + * from other tasks. + * The first segment, + * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0]` (gRPC) + * or `Task.journeySharingInfo.remainingVehicleJourneySegments[0]` (REST), + * contains route information from the driver's last known location to the + * upcoming `VehicleStop`. Current route information usually comes from the + * driver app, except for some cases noted in the documentation for + * [DeliveryVehicle.current_route_segment][maps.fleetengine.delivery.v1.DeliveryVehicle.current_route_segment]. + * The other segments in + * `Task.journey_sharing_info.remaining_vehicle_journey_segments` (gRPC) or + * `Task.journeySharingInfo.remainingVehicleJourneySegments` (REST) are + * populated by Fleet Engine. They provide route information between the + * remaining `VehicleStops`. + * @type \Google\Maps\FleetEngine\Delivery\V1\DeliveryVehicleLocation $last_location + * Indicates the vehicle's last reported location of the assigned vehicle. + * @type bool $last_location_snappable + * Indicates whether the vehicle's lastLocation can be snapped to + * the `current_route_segment`. This value is False if either + * `last_location` or `current_route_segment` don't exist. This value is + * computed by Fleet Engine. Updates from clients are ignored. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Fleetengine\Delivery\V1\Tasks::initOnce(); + parent::__construct($data); + } + + /** + * Tracking information for the stops that the assigned vehicle will make + * before it completes this Task. Note that this list can contain stops + * from other tasks. + * The first segment, + * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0]` (gRPC) + * or `Task.journeySharingInfo.remainingVehicleJourneySegments[0]` (REST), + * contains route information from the driver's last known location to the + * upcoming `VehicleStop`. Current route information usually comes from the + * driver app, except for some cases noted in the documentation for + * [DeliveryVehicle.current_route_segment][maps.fleetengine.delivery.v1.DeliveryVehicle.current_route_segment]. + * The other segments in + * `Task.journey_sharing_info.remaining_vehicle_journey_segments` (gRPC) or + * `Task.journeySharingInfo.remainingVehicleJourneySegments` (REST) are + * populated by Fleet Engine. They provide route information between the + * remaining `VehicleStops`. + * + * Generated from protobuf field repeated .maps.fleetengine.delivery.v1.VehicleJourneySegment remaining_vehicle_journey_segments = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRemainingVehicleJourneySegments() + { + return $this->remaining_vehicle_journey_segments; + } + + /** + * Tracking information for the stops that the assigned vehicle will make + * before it completes this Task. Note that this list can contain stops + * from other tasks. + * The first segment, + * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0]` (gRPC) + * or `Task.journeySharingInfo.remainingVehicleJourneySegments[0]` (REST), + * contains route information from the driver's last known location to the + * upcoming `VehicleStop`. Current route information usually comes from the + * driver app, except for some cases noted in the documentation for + * [DeliveryVehicle.current_route_segment][maps.fleetengine.delivery.v1.DeliveryVehicle.current_route_segment]. + * The other segments in + * `Task.journey_sharing_info.remaining_vehicle_journey_segments` (gRPC) or + * `Task.journeySharingInfo.remainingVehicleJourneySegments` (REST) are + * populated by Fleet Engine. They provide route information between the + * remaining `VehicleStops`. + * + * Generated from protobuf field repeated .maps.fleetengine.delivery.v1.VehicleJourneySegment remaining_vehicle_journey_segments = 1; + * @param array<\Google\Maps\FleetEngine\Delivery\V1\VehicleJourneySegment>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRemainingVehicleJourneySegments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\FleetEngine\Delivery\V1\VehicleJourneySegment::class); + $this->remaining_vehicle_journey_segments = $arr; + + return $this; + } + + /** + * Indicates the vehicle's last reported location of the assigned vehicle. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryVehicleLocation last_location = 2; + * @return \Google\Maps\FleetEngine\Delivery\V1\DeliveryVehicleLocation|null + */ + public function getLastLocation() + { + return $this->last_location; + } + + public function hasLastLocation() + { + return isset($this->last_location); + } + + public function clearLastLocation() + { + unset($this->last_location); + } + + /** + * Indicates the vehicle's last reported location of the assigned vehicle. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryVehicleLocation last_location = 2; + * @param \Google\Maps\FleetEngine\Delivery\V1\DeliveryVehicleLocation $var + * @return $this + */ + public function setLastLocation($var) + { + GPBUtil::checkMessage($var, \Google\Maps\FleetEngine\Delivery\V1\DeliveryVehicleLocation::class); + $this->last_location = $var; + + return $this; + } + + /** + * Indicates whether the vehicle's lastLocation can be snapped to + * the `current_route_segment`. This value is False if either + * `last_location` or `current_route_segment` don't exist. This value is + * computed by Fleet Engine. Updates from clients are ignored. + * + * Generated from protobuf field bool last_location_snappable = 3; + * @return bool + */ + public function getLastLocationSnappable() + { + return $this->last_location_snappable; + } + + /** + * Indicates whether the vehicle's lastLocation can be snapped to + * the `current_route_segment`. This value is False if either + * `last_location` or `current_route_segment` don't exist. This value is + * computed by Fleet Engine. Updates from clients are ignored. + * + * Generated from protobuf field bool last_location_snappable = 3; + * @param bool $var + * @return $this + */ + public function setLastLocationSnappable($var) + { + GPBUtil::checkBool($var); + $this->last_location_snappable = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(JourneySharingInfo::class, \Google\Maps\FleetEngine\Delivery\V1\Task_JourneySharingInfo::class); + diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/Task/State.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/Task/State.php new file mode 100644 index 000000000000..8ad698087d0f --- /dev/null +++ b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/Task/State.php @@ -0,0 +1,65 @@ +maps.fleetengine.delivery.v1.Task.State + */ +class State +{ + /** + * Default. Used for an unspecified or unrecognized Task state. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Either the Task has not yet been assigned to a delivery vehicle, or the + * delivery vehicle has not yet passed the `Task`'s assigned vehicle stop. + * + * Generated from protobuf enum OPEN = 1; + */ + const OPEN = 1; + /** + * When the vehicle passes the vehicle stop for this Task. + * + * Generated from protobuf enum CLOSED = 2; + */ + const CLOSED = 2; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::OPEN => 'OPEN', + self::CLOSED => 'CLOSED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Maps\FleetEngine\Delivery\V1\Task_State::class); + diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/Task/TaskOutcome.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/Task/TaskOutcome.php new file mode 100644 index 000000000000..9c9af30335ba --- /dev/null +++ b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/Task/TaskOutcome.php @@ -0,0 +1,65 @@ +maps.fleetengine.delivery.v1.Task.TaskOutcome + */ +class TaskOutcome +{ + /** + * The Task outcome before its value is set. + * + * Generated from protobuf enum TASK_OUTCOME_UNSPECIFIED = 0; + */ + const TASK_OUTCOME_UNSPECIFIED = 0; + /** + * The Task completed successfully. + * + * Generated from protobuf enum SUCCEEDED = 1; + */ + const SUCCEEDED = 1; + /** + * Either the Task couldn't be completed, or it was cancelled. + * + * Generated from protobuf enum FAILED = 2; + */ + const FAILED = 2; + + private static $valueToName = [ + self::TASK_OUTCOME_UNSPECIFIED => 'TASK_OUTCOME_UNSPECIFIED', + self::SUCCEEDED => 'SUCCEEDED', + self::FAILED => 'FAILED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(TaskOutcome::class, \Google\Maps\FleetEngine\Delivery\V1\Task_TaskOutcome::class); + diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/Task/TaskOutcomeLocationSource.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/Task/TaskOutcomeLocationSource.php new file mode 100644 index 000000000000..c5b2d9d5e23c --- /dev/null +++ b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/Task/TaskOutcomeLocationSource.php @@ -0,0 +1,65 @@ +maps.fleetengine.delivery.v1.Task.TaskOutcomeLocationSource + */ +class TaskOutcomeLocationSource +{ + /** + * The task outcome before it is set. + * + * Generated from protobuf enum TASK_OUTCOME_LOCATION_SOURCE_UNSPECIFIED = 0; + */ + const TASK_OUTCOME_LOCATION_SOURCE_UNSPECIFIED = 0; + /** + * The provider-specified the `task_outcome_location`. + * + * Generated from protobuf enum PROVIDER = 2; + */ + const PROVIDER = 2; + /** + * The provider didn't specify the `task_outcome_location`, so Fleet Engine + * used the last known vehicle location. + * + * Generated from protobuf enum LAST_VEHICLE_LOCATION = 3; + */ + const LAST_VEHICLE_LOCATION = 3; + + private static $valueToName = [ + self::TASK_OUTCOME_LOCATION_SOURCE_UNSPECIFIED => 'TASK_OUTCOME_LOCATION_SOURCE_UNSPECIFIED', + self::PROVIDER => 'PROVIDER', + self::LAST_VEHICLE_LOCATION => 'LAST_VEHICLE_LOCATION', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(TaskOutcomeLocationSource::class, \Google\Maps\FleetEngine\Delivery\V1\Task_TaskOutcomeLocationSource::class); + diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/Task/Type.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/Task/Type.php new file mode 100644 index 000000000000..a4e6bb2b1965 --- /dev/null +++ b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/Task/Type.php @@ -0,0 +1,87 @@ +maps.fleetengine.delivery.v1.Task.Type + */ +class Type +{ + /** + * Default, the Task type is unknown. + * + * Generated from protobuf enum TYPE_UNSPECIFIED = 0; + */ + const TYPE_UNSPECIFIED = 0; + /** + * A pickup Task is the action taken for picking up a shipment from a + * customer. Depot or feeder vehicle pickups should use the `SCHEDULED_STOP` + * type. + * + * Generated from protobuf enum PICKUP = 1; + */ + const PICKUP = 1; + /** + * A delivery Task is the action taken for delivering a shipment to an end + * customer. Depot or feeder vehicle dropoffs should use the + * `SCHEDULED_STOP` type. + * + * Generated from protobuf enum DELIVERY = 2; + */ + const DELIVERY = 2; + /** + * A scheduled stop Task is used for planning purposes. For example, it + * could represent picking up or dropping off shipments from feeder vehicles + * or depots. It shouldn't be used for any shipments that are picked up or + * dropped off from an end customer. + * + * Generated from protobuf enum SCHEDULED_STOP = 3; + */ + const SCHEDULED_STOP = 3; + /** + * A Task that means the Vehicle is not available for service. For example, + * this can happen when the driver takes a break, or when the vehicle + * is being refueled. + * + * Generated from protobuf enum UNAVAILABLE = 4; + */ + const UNAVAILABLE = 4; + + private static $valueToName = [ + self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', + self::PICKUP => 'PICKUP', + self::DELIVERY => 'DELIVERY', + self::SCHEDULED_STOP => 'SCHEDULED_STOP', + self::UNAVAILABLE => 'UNAVAILABLE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Type::class, \Google\Maps\FleetEngine\Delivery\V1\Task_Type::class); + diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/TaskAttribute.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/TaskAttribute.php new file mode 100644 index 000000000000..f5fba7a3cea3 --- /dev/null +++ b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/TaskAttribute.php @@ -0,0 +1,176 @@ +maps.fleetengine.delivery.v1.TaskAttribute + */ +class TaskAttribute extends \Google\Protobuf\Internal\Message +{ + /** + * The attribute's key. Keys may not contain the colon character (:). + * + * Generated from protobuf field string key = 1; + */ + protected $key = ''; + protected $task_attribute_value; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $key + * The attribute's key. Keys may not contain the colon character (:). + * @type string $string_value + * String typed attribute value. + * @type bool $bool_value + * Boolean typed attribute value. + * @type float $number_value + * Double typed attribute value. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Fleetengine\Delivery\V1\Common::initOnce(); + parent::__construct($data); + } + + /** + * The attribute's key. Keys may not contain the colon character (:). + * + * Generated from protobuf field string key = 1; + * @return string + */ + public function getKey() + { + return $this->key; + } + + /** + * The attribute's key. Keys may not contain the colon character (:). + * + * Generated from protobuf field string key = 1; + * @param string $var + * @return $this + */ + public function setKey($var) + { + GPBUtil::checkString($var, True); + $this->key = $var; + + return $this; + } + + /** + * String typed attribute value. + * + * Generated from protobuf field string string_value = 2; + * @return string + */ + public function getStringValue() + { + return $this->readOneof(2); + } + + public function hasStringValue() + { + return $this->hasOneof(2); + } + + /** + * String typed attribute value. + * + * Generated from protobuf field string string_value = 2; + * @param string $var + * @return $this + */ + public function setStringValue($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Boolean typed attribute value. + * + * Generated from protobuf field bool bool_value = 3; + * @return bool + */ + public function getBoolValue() + { + return $this->readOneof(3); + } + + public function hasBoolValue() + { + return $this->hasOneof(3); + } + + /** + * Boolean typed attribute value. + * + * Generated from protobuf field bool bool_value = 3; + * @param bool $var + * @return $this + */ + public function setBoolValue($var) + { + GPBUtil::checkBool($var); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Double typed attribute value. + * + * Generated from protobuf field double number_value = 4; + * @return float + */ + public function getNumberValue() + { + return $this->readOneof(4); + } + + public function hasNumberValue() + { + return $this->hasOneof(4); + } + + /** + * Double typed attribute value. + * + * Generated from protobuf field double number_value = 4; + * @param float $var + * @return $this + */ + public function setNumberValue($var) + { + GPBUtil::checkDouble($var); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * @return string + */ + public function getTaskAttributeValue() + { + return $this->whichOneof("task_attribute_value"); + } + +} + diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/TaskTrackingInfo.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/TaskTrackingInfo.php new file mode 100644 index 000000000000..66383f156e70 --- /dev/null +++ b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/TaskTrackingInfo.php @@ -0,0 +1,698 @@ +maps.fleetengine.delivery.v1.TaskTrackingInfo + */ +class TaskTrackingInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Must be in the format `providers/{provider}/taskTrackingInfo/{tracking}`, + * where `tracking` represents the tracking ID. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Immutable. The tracking ID of a Task. + * * Must be a valid Unicode string. + * * Limited to a maximum length of 64 characters. + * * Normalized according to [Unicode Normalization Form C] + * (http://www.unicode.org/reports/tr15/). + * * May not contain any of the following ASCII characters: '/', ':', '?', + * ',', or '#'. + * + * Generated from protobuf field string tracking_id = 2 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $tracking_id = ''; + /** + * The vehicle's last location. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryVehicleLocation vehicle_location = 3; + */ + protected $vehicle_location = null; + /** + * A list of points which when connected forms a polyline of the vehicle's + * expected route to the location of this task. + * + * Generated from protobuf field repeated .google.type.LatLng route_polyline_points = 4; + */ + private $route_polyline_points; + /** + * Indicates the number of stops the vehicle remaining until the task stop is + * reached, including the task stop. For example, if the vehicle's next stop + * is the task stop, the value will be 1. + * + * Generated from protobuf field .google.protobuf.Int32Value remaining_stop_count = 5; + */ + protected $remaining_stop_count = null; + /** + * The total remaining distance in meters to the `VehicleStop` of interest. + * + * Generated from protobuf field .google.protobuf.Int32Value remaining_driving_distance_meters = 6; + */ + protected $remaining_driving_distance_meters = null; + /** + * The timestamp that indicates the estimated arrival time to the stop + * location. + * + * Generated from protobuf field .google.protobuf.Timestamp estimated_arrival_time = 7; + */ + protected $estimated_arrival_time = null; + /** + * The timestamp that indicates the estimated completion time of a Task. + * + * Generated from protobuf field .google.protobuf.Timestamp estimated_task_completion_time = 8; + */ + protected $estimated_task_completion_time = null; + /** + * The current execution state of the Task. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.Task.State state = 11; + */ + protected $state = 0; + /** + * The outcome of attempting to execute a Task. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.Task.TaskOutcome task_outcome = 9; + */ + protected $task_outcome = 0; + /** + * The timestamp that indicates when the Task's outcome was set by the + * provider. + * + * Generated from protobuf field .google.protobuf.Timestamp task_outcome_time = 12; + */ + protected $task_outcome_time = null; + /** + * Immutable. The location where the Task will be completed. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.LocationInfo planned_location = 10 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $planned_location = null; + /** + * The time window during which the task should be completed. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.TimeWindow target_time_window = 13; + */ + protected $target_time_window = null; + /** + * The custom attributes set on the task. + * + * Generated from protobuf field repeated .maps.fleetengine.delivery.v1.TaskAttribute attributes = 14; + */ + private $attributes; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Must be in the format `providers/{provider}/taskTrackingInfo/{tracking}`, + * where `tracking` represents the tracking ID. + * @type string $tracking_id + * Immutable. The tracking ID of a Task. + * * Must be a valid Unicode string. + * * Limited to a maximum length of 64 characters. + * * Normalized according to [Unicode Normalization Form C] + * (http://www.unicode.org/reports/tr15/). + * * May not contain any of the following ASCII characters: '/', ':', '?', + * ',', or '#'. + * @type \Google\Maps\FleetEngine\Delivery\V1\DeliveryVehicleLocation $vehicle_location + * The vehicle's last location. + * @type array<\Google\Type\LatLng>|\Google\Protobuf\Internal\RepeatedField $route_polyline_points + * A list of points which when connected forms a polyline of the vehicle's + * expected route to the location of this task. + * @type \Google\Protobuf\Int32Value $remaining_stop_count + * Indicates the number of stops the vehicle remaining until the task stop is + * reached, including the task stop. For example, if the vehicle's next stop + * is the task stop, the value will be 1. + * @type \Google\Protobuf\Int32Value $remaining_driving_distance_meters + * The total remaining distance in meters to the `VehicleStop` of interest. + * @type \Google\Protobuf\Timestamp $estimated_arrival_time + * The timestamp that indicates the estimated arrival time to the stop + * location. + * @type \Google\Protobuf\Timestamp $estimated_task_completion_time + * The timestamp that indicates the estimated completion time of a Task. + * @type int $state + * The current execution state of the Task. + * @type int $task_outcome + * The outcome of attempting to execute a Task. + * @type \Google\Protobuf\Timestamp $task_outcome_time + * The timestamp that indicates when the Task's outcome was set by the + * provider. + * @type \Google\Maps\FleetEngine\Delivery\V1\LocationInfo $planned_location + * Immutable. The location where the Task will be completed. + * @type \Google\Maps\FleetEngine\Delivery\V1\TimeWindow $target_time_window + * The time window during which the task should be completed. + * @type array<\Google\Maps\FleetEngine\Delivery\V1\TaskAttribute>|\Google\Protobuf\Internal\RepeatedField $attributes + * The custom attributes set on the task. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Fleetengine\Delivery\V1\TaskTrackingInfo::initOnce(); + parent::__construct($data); + } + + /** + * Must be in the format `providers/{provider}/taskTrackingInfo/{tracking}`, + * where `tracking` represents the tracking ID. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Must be in the format `providers/{provider}/taskTrackingInfo/{tracking}`, + * where `tracking` represents the tracking ID. + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Immutable. The tracking ID of a Task. + * * Must be a valid Unicode string. + * * Limited to a maximum length of 64 characters. + * * Normalized according to [Unicode Normalization Form C] + * (http://www.unicode.org/reports/tr15/). + * * May not contain any of the following ASCII characters: '/', ':', '?', + * ',', or '#'. + * + * Generated from protobuf field string tracking_id = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getTrackingId() + { + return $this->tracking_id; + } + + /** + * Immutable. The tracking ID of a Task. + * * Must be a valid Unicode string. + * * Limited to a maximum length of 64 characters. + * * Normalized according to [Unicode Normalization Form C] + * (http://www.unicode.org/reports/tr15/). + * * May not contain any of the following ASCII characters: '/', ':', '?', + * ',', or '#'. + * + * Generated from protobuf field string tracking_id = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * @param string $var + * @return $this + */ + public function setTrackingId($var) + { + GPBUtil::checkString($var, True); + $this->tracking_id = $var; + + return $this; + } + + /** + * The vehicle's last location. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryVehicleLocation vehicle_location = 3; + * @return \Google\Maps\FleetEngine\Delivery\V1\DeliveryVehicleLocation|null + */ + public function getVehicleLocation() + { + return $this->vehicle_location; + } + + public function hasVehicleLocation() + { + return isset($this->vehicle_location); + } + + public function clearVehicleLocation() + { + unset($this->vehicle_location); + } + + /** + * The vehicle's last location. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryVehicleLocation vehicle_location = 3; + * @param \Google\Maps\FleetEngine\Delivery\V1\DeliveryVehicleLocation $var + * @return $this + */ + public function setVehicleLocation($var) + { + GPBUtil::checkMessage($var, \Google\Maps\FleetEngine\Delivery\V1\DeliveryVehicleLocation::class); + $this->vehicle_location = $var; + + return $this; + } + + /** + * A list of points which when connected forms a polyline of the vehicle's + * expected route to the location of this task. + * + * Generated from protobuf field repeated .google.type.LatLng route_polyline_points = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRoutePolylinePoints() + { + return $this->route_polyline_points; + } + + /** + * A list of points which when connected forms a polyline of the vehicle's + * expected route to the location of this task. + * + * Generated from protobuf field repeated .google.type.LatLng route_polyline_points = 4; + * @param array<\Google\Type\LatLng>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRoutePolylinePoints($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Type\LatLng::class); + $this->route_polyline_points = $arr; + + return $this; + } + + /** + * Indicates the number of stops the vehicle remaining until the task stop is + * reached, including the task stop. For example, if the vehicle's next stop + * is the task stop, the value will be 1. + * + * Generated from protobuf field .google.protobuf.Int32Value remaining_stop_count = 5; + * @return \Google\Protobuf\Int32Value|null + */ + public function getRemainingStopCount() + { + return $this->remaining_stop_count; + } + + public function hasRemainingStopCount() + { + return isset($this->remaining_stop_count); + } + + public function clearRemainingStopCount() + { + unset($this->remaining_stop_count); + } + + /** + * Returns the unboxed value from getRemainingStopCount() + + * Indicates the number of stops the vehicle remaining until the task stop is + * reached, including the task stop. For example, if the vehicle's next stop + * is the task stop, the value will be 1. + * + * Generated from protobuf field .google.protobuf.Int32Value remaining_stop_count = 5; + * @return int|null + */ + public function getRemainingStopCountUnwrapped() + { + return $this->readWrapperValue("remaining_stop_count"); + } + + /** + * Indicates the number of stops the vehicle remaining until the task stop is + * reached, including the task stop. For example, if the vehicle's next stop + * is the task stop, the value will be 1. + * + * Generated from protobuf field .google.protobuf.Int32Value remaining_stop_count = 5; + * @param \Google\Protobuf\Int32Value $var + * @return $this + */ + public function setRemainingStopCount($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class); + $this->remaining_stop_count = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object. + + * Indicates the number of stops the vehicle remaining until the task stop is + * reached, including the task stop. For example, if the vehicle's next stop + * is the task stop, the value will be 1. + * + * Generated from protobuf field .google.protobuf.Int32Value remaining_stop_count = 5; + * @param int|null $var + * @return $this + */ + public function setRemainingStopCountUnwrapped($var) + { + $this->writeWrapperValue("remaining_stop_count", $var); + return $this;} + + /** + * The total remaining distance in meters to the `VehicleStop` of interest. + * + * Generated from protobuf field .google.protobuf.Int32Value remaining_driving_distance_meters = 6; + * @return \Google\Protobuf\Int32Value|null + */ + public function getRemainingDrivingDistanceMeters() + { + return $this->remaining_driving_distance_meters; + } + + public function hasRemainingDrivingDistanceMeters() + { + return isset($this->remaining_driving_distance_meters); + } + + public function clearRemainingDrivingDistanceMeters() + { + unset($this->remaining_driving_distance_meters); + } + + /** + * Returns the unboxed value from getRemainingDrivingDistanceMeters() + + * The total remaining distance in meters to the `VehicleStop` of interest. + * + * Generated from protobuf field .google.protobuf.Int32Value remaining_driving_distance_meters = 6; + * @return int|null + */ + public function getRemainingDrivingDistanceMetersUnwrapped() + { + return $this->readWrapperValue("remaining_driving_distance_meters"); + } + + /** + * The total remaining distance in meters to the `VehicleStop` of interest. + * + * Generated from protobuf field .google.protobuf.Int32Value remaining_driving_distance_meters = 6; + * @param \Google\Protobuf\Int32Value $var + * @return $this + */ + public function setRemainingDrivingDistanceMeters($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class); + $this->remaining_driving_distance_meters = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object. + + * The total remaining distance in meters to the `VehicleStop` of interest. + * + * Generated from protobuf field .google.protobuf.Int32Value remaining_driving_distance_meters = 6; + * @param int|null $var + * @return $this + */ + public function setRemainingDrivingDistanceMetersUnwrapped($var) + { + $this->writeWrapperValue("remaining_driving_distance_meters", $var); + return $this;} + + /** + * The timestamp that indicates the estimated arrival time to the stop + * location. + * + * Generated from protobuf field .google.protobuf.Timestamp estimated_arrival_time = 7; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEstimatedArrivalTime() + { + return $this->estimated_arrival_time; + } + + public function hasEstimatedArrivalTime() + { + return isset($this->estimated_arrival_time); + } + + public function clearEstimatedArrivalTime() + { + unset($this->estimated_arrival_time); + } + + /** + * The timestamp that indicates the estimated arrival time to the stop + * location. + * + * Generated from protobuf field .google.protobuf.Timestamp estimated_arrival_time = 7; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEstimatedArrivalTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->estimated_arrival_time = $var; + + return $this; + } + + /** + * The timestamp that indicates the estimated completion time of a Task. + * + * Generated from protobuf field .google.protobuf.Timestamp estimated_task_completion_time = 8; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEstimatedTaskCompletionTime() + { + return $this->estimated_task_completion_time; + } + + public function hasEstimatedTaskCompletionTime() + { + return isset($this->estimated_task_completion_time); + } + + public function clearEstimatedTaskCompletionTime() + { + unset($this->estimated_task_completion_time); + } + + /** + * The timestamp that indicates the estimated completion time of a Task. + * + * Generated from protobuf field .google.protobuf.Timestamp estimated_task_completion_time = 8; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEstimatedTaskCompletionTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->estimated_task_completion_time = $var; + + return $this; + } + + /** + * The current execution state of the Task. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.Task.State state = 11; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * The current execution state of the Task. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.Task.State state = 11; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Maps\FleetEngine\Delivery\V1\Task\State::class); + $this->state = $var; + + return $this; + } + + /** + * The outcome of attempting to execute a Task. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.Task.TaskOutcome task_outcome = 9; + * @return int + */ + public function getTaskOutcome() + { + return $this->task_outcome; + } + + /** + * The outcome of attempting to execute a Task. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.Task.TaskOutcome task_outcome = 9; + * @param int $var + * @return $this + */ + public function setTaskOutcome($var) + { + GPBUtil::checkEnum($var, \Google\Maps\FleetEngine\Delivery\V1\Task\TaskOutcome::class); + $this->task_outcome = $var; + + return $this; + } + + /** + * The timestamp that indicates when the Task's outcome was set by the + * provider. + * + * Generated from protobuf field .google.protobuf.Timestamp task_outcome_time = 12; + * @return \Google\Protobuf\Timestamp|null + */ + public function getTaskOutcomeTime() + { + return $this->task_outcome_time; + } + + public function hasTaskOutcomeTime() + { + return isset($this->task_outcome_time); + } + + public function clearTaskOutcomeTime() + { + unset($this->task_outcome_time); + } + + /** + * The timestamp that indicates when the Task's outcome was set by the + * provider. + * + * Generated from protobuf field .google.protobuf.Timestamp task_outcome_time = 12; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setTaskOutcomeTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->task_outcome_time = $var; + + return $this; + } + + /** + * Immutable. The location where the Task will be completed. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.LocationInfo planned_location = 10 [(.google.api.field_behavior) = IMMUTABLE]; + * @return \Google\Maps\FleetEngine\Delivery\V1\LocationInfo|null + */ + public function getPlannedLocation() + { + return $this->planned_location; + } + + public function hasPlannedLocation() + { + return isset($this->planned_location); + } + + public function clearPlannedLocation() + { + unset($this->planned_location); + } + + /** + * Immutable. The location where the Task will be completed. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.LocationInfo planned_location = 10 [(.google.api.field_behavior) = IMMUTABLE]; + * @param \Google\Maps\FleetEngine\Delivery\V1\LocationInfo $var + * @return $this + */ + public function setPlannedLocation($var) + { + GPBUtil::checkMessage($var, \Google\Maps\FleetEngine\Delivery\V1\LocationInfo::class); + $this->planned_location = $var; + + return $this; + } + + /** + * The time window during which the task should be completed. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.TimeWindow target_time_window = 13; + * @return \Google\Maps\FleetEngine\Delivery\V1\TimeWindow|null + */ + public function getTargetTimeWindow() + { + return $this->target_time_window; + } + + public function hasTargetTimeWindow() + { + return isset($this->target_time_window); + } + + public function clearTargetTimeWindow() + { + unset($this->target_time_window); + } + + /** + * The time window during which the task should be completed. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.TimeWindow target_time_window = 13; + * @param \Google\Maps\FleetEngine\Delivery\V1\TimeWindow $var + * @return $this + */ + public function setTargetTimeWindow($var) + { + GPBUtil::checkMessage($var, \Google\Maps\FleetEngine\Delivery\V1\TimeWindow::class); + $this->target_time_window = $var; + + return $this; + } + + /** + * The custom attributes set on the task. + * + * Generated from protobuf field repeated .maps.fleetengine.delivery.v1.TaskAttribute attributes = 14; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAttributes() + { + return $this->attributes; + } + + /** + * The custom attributes set on the task. + * + * Generated from protobuf field repeated .maps.fleetengine.delivery.v1.TaskAttribute attributes = 14; + * @param array<\Google\Maps\FleetEngine\Delivery\V1\TaskAttribute>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAttributes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\FleetEngine\Delivery\V1\TaskAttribute::class); + $this->attributes = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/TaskTrackingViewConfig.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/TaskTrackingViewConfig.php new file mode 100644 index 000000000000..0c3036b3dc7f --- /dev/null +++ b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/TaskTrackingViewConfig.php @@ -0,0 +1,346 @@ +maps.fleetengine.delivery.v1.TaskTrackingViewConfig + */ +class TaskTrackingViewConfig extends \Google\Protobuf\Internal\Message +{ + /** + * The field that specifies when route polyline points can be visible. If this + * field is not specified, the project level default visibility configuration + * for this data will be used. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption route_polyline_points_visibility = 1; + */ + protected $route_polyline_points_visibility = null; + /** + * The field that specifies when estimated arrival time can be visible. If + * this field is not specified, the project level default visibility + * configuration for this data will be used. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption estimated_arrival_time_visibility = 2; + */ + protected $estimated_arrival_time_visibility = null; + /** + * The field that specifies when estimated task completion time can be + * visible. If this field is not specified, the project level default + * visibility configuration for this data will be used. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption estimated_task_completion_time_visibility = 3; + */ + protected $estimated_task_completion_time_visibility = null; + /** + * The field that specifies when remaining driving distance can be visible. If + * this field is not specified, the project level default visibility + * configuration for this data will be used. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption remaining_driving_distance_visibility = 4; + */ + protected $remaining_driving_distance_visibility = null; + /** + * The field that specifies when remaining stop count can be visible. If this + * field is not specified, the project level default visibility configuration + * for this data will be used. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption remaining_stop_count_visibility = 5; + */ + protected $remaining_stop_count_visibility = null; + /** + * The field that specifies when vehicle location can be visible. If this + * field is not specified, the project level default visibility configuration + * for this data will be used. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption vehicle_location_visibility = 6; + */ + protected $vehicle_location_visibility = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Maps\FleetEngine\Delivery\V1\TaskTrackingViewConfig\VisibilityOption $route_polyline_points_visibility + * The field that specifies when route polyline points can be visible. If this + * field is not specified, the project level default visibility configuration + * for this data will be used. + * @type \Google\Maps\FleetEngine\Delivery\V1\TaskTrackingViewConfig\VisibilityOption $estimated_arrival_time_visibility + * The field that specifies when estimated arrival time can be visible. If + * this field is not specified, the project level default visibility + * configuration for this data will be used. + * @type \Google\Maps\FleetEngine\Delivery\V1\TaskTrackingViewConfig\VisibilityOption $estimated_task_completion_time_visibility + * The field that specifies when estimated task completion time can be + * visible. If this field is not specified, the project level default + * visibility configuration for this data will be used. + * @type \Google\Maps\FleetEngine\Delivery\V1\TaskTrackingViewConfig\VisibilityOption $remaining_driving_distance_visibility + * The field that specifies when remaining driving distance can be visible. If + * this field is not specified, the project level default visibility + * configuration for this data will be used. + * @type \Google\Maps\FleetEngine\Delivery\V1\TaskTrackingViewConfig\VisibilityOption $remaining_stop_count_visibility + * The field that specifies when remaining stop count can be visible. If this + * field is not specified, the project level default visibility configuration + * for this data will be used. + * @type \Google\Maps\FleetEngine\Delivery\V1\TaskTrackingViewConfig\VisibilityOption $vehicle_location_visibility + * The field that specifies when vehicle location can be visible. If this + * field is not specified, the project level default visibility configuration + * for this data will be used. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Fleetengine\Delivery\V1\Tasks::initOnce(); + parent::__construct($data); + } + + /** + * The field that specifies when route polyline points can be visible. If this + * field is not specified, the project level default visibility configuration + * for this data will be used. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption route_polyline_points_visibility = 1; + * @return \Google\Maps\FleetEngine\Delivery\V1\TaskTrackingViewConfig\VisibilityOption|null + */ + public function getRoutePolylinePointsVisibility() + { + return $this->route_polyline_points_visibility; + } + + public function hasRoutePolylinePointsVisibility() + { + return isset($this->route_polyline_points_visibility); + } + + public function clearRoutePolylinePointsVisibility() + { + unset($this->route_polyline_points_visibility); + } + + /** + * The field that specifies when route polyline points can be visible. If this + * field is not specified, the project level default visibility configuration + * for this data will be used. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption route_polyline_points_visibility = 1; + * @param \Google\Maps\FleetEngine\Delivery\V1\TaskTrackingViewConfig\VisibilityOption $var + * @return $this + */ + public function setRoutePolylinePointsVisibility($var) + { + GPBUtil::checkMessage($var, \Google\Maps\FleetEngine\Delivery\V1\TaskTrackingViewConfig\VisibilityOption::class); + $this->route_polyline_points_visibility = $var; + + return $this; + } + + /** + * The field that specifies when estimated arrival time can be visible. If + * this field is not specified, the project level default visibility + * configuration for this data will be used. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption estimated_arrival_time_visibility = 2; + * @return \Google\Maps\FleetEngine\Delivery\V1\TaskTrackingViewConfig\VisibilityOption|null + */ + public function getEstimatedArrivalTimeVisibility() + { + return $this->estimated_arrival_time_visibility; + } + + public function hasEstimatedArrivalTimeVisibility() + { + return isset($this->estimated_arrival_time_visibility); + } + + public function clearEstimatedArrivalTimeVisibility() + { + unset($this->estimated_arrival_time_visibility); + } + + /** + * The field that specifies when estimated arrival time can be visible. If + * this field is not specified, the project level default visibility + * configuration for this data will be used. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption estimated_arrival_time_visibility = 2; + * @param \Google\Maps\FleetEngine\Delivery\V1\TaskTrackingViewConfig\VisibilityOption $var + * @return $this + */ + public function setEstimatedArrivalTimeVisibility($var) + { + GPBUtil::checkMessage($var, \Google\Maps\FleetEngine\Delivery\V1\TaskTrackingViewConfig\VisibilityOption::class); + $this->estimated_arrival_time_visibility = $var; + + return $this; + } + + /** + * The field that specifies when estimated task completion time can be + * visible. If this field is not specified, the project level default + * visibility configuration for this data will be used. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption estimated_task_completion_time_visibility = 3; + * @return \Google\Maps\FleetEngine\Delivery\V1\TaskTrackingViewConfig\VisibilityOption|null + */ + public function getEstimatedTaskCompletionTimeVisibility() + { + return $this->estimated_task_completion_time_visibility; + } + + public function hasEstimatedTaskCompletionTimeVisibility() + { + return isset($this->estimated_task_completion_time_visibility); + } + + public function clearEstimatedTaskCompletionTimeVisibility() + { + unset($this->estimated_task_completion_time_visibility); + } + + /** + * The field that specifies when estimated task completion time can be + * visible. If this field is not specified, the project level default + * visibility configuration for this data will be used. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption estimated_task_completion_time_visibility = 3; + * @param \Google\Maps\FleetEngine\Delivery\V1\TaskTrackingViewConfig\VisibilityOption $var + * @return $this + */ + public function setEstimatedTaskCompletionTimeVisibility($var) + { + GPBUtil::checkMessage($var, \Google\Maps\FleetEngine\Delivery\V1\TaskTrackingViewConfig\VisibilityOption::class); + $this->estimated_task_completion_time_visibility = $var; + + return $this; + } + + /** + * The field that specifies when remaining driving distance can be visible. If + * this field is not specified, the project level default visibility + * configuration for this data will be used. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption remaining_driving_distance_visibility = 4; + * @return \Google\Maps\FleetEngine\Delivery\V1\TaskTrackingViewConfig\VisibilityOption|null + */ + public function getRemainingDrivingDistanceVisibility() + { + return $this->remaining_driving_distance_visibility; + } + + public function hasRemainingDrivingDistanceVisibility() + { + return isset($this->remaining_driving_distance_visibility); + } + + public function clearRemainingDrivingDistanceVisibility() + { + unset($this->remaining_driving_distance_visibility); + } + + /** + * The field that specifies when remaining driving distance can be visible. If + * this field is not specified, the project level default visibility + * configuration for this data will be used. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption remaining_driving_distance_visibility = 4; + * @param \Google\Maps\FleetEngine\Delivery\V1\TaskTrackingViewConfig\VisibilityOption $var + * @return $this + */ + public function setRemainingDrivingDistanceVisibility($var) + { + GPBUtil::checkMessage($var, \Google\Maps\FleetEngine\Delivery\V1\TaskTrackingViewConfig\VisibilityOption::class); + $this->remaining_driving_distance_visibility = $var; + + return $this; + } + + /** + * The field that specifies when remaining stop count can be visible. If this + * field is not specified, the project level default visibility configuration + * for this data will be used. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption remaining_stop_count_visibility = 5; + * @return \Google\Maps\FleetEngine\Delivery\V1\TaskTrackingViewConfig\VisibilityOption|null + */ + public function getRemainingStopCountVisibility() + { + return $this->remaining_stop_count_visibility; + } + + public function hasRemainingStopCountVisibility() + { + return isset($this->remaining_stop_count_visibility); + } + + public function clearRemainingStopCountVisibility() + { + unset($this->remaining_stop_count_visibility); + } + + /** + * The field that specifies when remaining stop count can be visible. If this + * field is not specified, the project level default visibility configuration + * for this data will be used. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption remaining_stop_count_visibility = 5; + * @param \Google\Maps\FleetEngine\Delivery\V1\TaskTrackingViewConfig\VisibilityOption $var + * @return $this + */ + public function setRemainingStopCountVisibility($var) + { + GPBUtil::checkMessage($var, \Google\Maps\FleetEngine\Delivery\V1\TaskTrackingViewConfig\VisibilityOption::class); + $this->remaining_stop_count_visibility = $var; + + return $this; + } + + /** + * The field that specifies when vehicle location can be visible. If this + * field is not specified, the project level default visibility configuration + * for this data will be used. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption vehicle_location_visibility = 6; + * @return \Google\Maps\FleetEngine\Delivery\V1\TaskTrackingViewConfig\VisibilityOption|null + */ + public function getVehicleLocationVisibility() + { + return $this->vehicle_location_visibility; + } + + public function hasVehicleLocationVisibility() + { + return isset($this->vehicle_location_visibility); + } + + public function clearVehicleLocationVisibility() + { + unset($this->vehicle_location_visibility); + } + + /** + * The field that specifies when vehicle location can be visible. If this + * field is not specified, the project level default visibility configuration + * for this data will be used. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption vehicle_location_visibility = 6; + * @param \Google\Maps\FleetEngine\Delivery\V1\TaskTrackingViewConfig\VisibilityOption $var + * @return $this + */ + public function setVehicleLocationVisibility($var) + { + GPBUtil::checkMessage($var, \Google\Maps\FleetEngine\Delivery\V1\TaskTrackingViewConfig\VisibilityOption::class); + $this->vehicle_location_visibility = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/TaskTrackingViewConfig/VisibilityOption.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/TaskTrackingViewConfig/VisibilityOption.php new file mode 100644 index 000000000000..57d7c4bda43e --- /dev/null +++ b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/TaskTrackingViewConfig/VisibilityOption.php @@ -0,0 +1,229 @@ +maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption + */ +class VisibilityOption extends \Google\Protobuf\Internal\Message +{ + protected $visibility_option; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $remaining_stop_count_threshold + * This data element is visible to the end users if the remaining stop + * count <= remaining_stop_count_threshold. + * @type \Google\Protobuf\Duration $duration_until_estimated_arrival_time_threshold + * This data element is visible to the end users if the ETA to the stop + * <= duration_until_estimated_arrival_time_threshold. + * @type int $remaining_driving_distance_meters_threshold + * This data element is visible to the end users if the remaining + * driving distance in meters <= + * remaining_driving_distance_meters_threshold. + * @type bool $always + * If set to true, this data element is always visible to the end users + * with no thresholds. This field cannot be set to false. + * @type bool $never + * If set to true, this data element is always hidden from the end users + * with no thresholds. This field cannot be set to false. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Fleetengine\Delivery\V1\Tasks::initOnce(); + parent::__construct($data); + } + + /** + * This data element is visible to the end users if the remaining stop + * count <= remaining_stop_count_threshold. + * + * Generated from protobuf field int32 remaining_stop_count_threshold = 1; + * @return int + */ + public function getRemainingStopCountThreshold() + { + return $this->readOneof(1); + } + + public function hasRemainingStopCountThreshold() + { + return $this->hasOneof(1); + } + + /** + * This data element is visible to the end users if the remaining stop + * count <= remaining_stop_count_threshold. + * + * Generated from protobuf field int32 remaining_stop_count_threshold = 1; + * @param int $var + * @return $this + */ + public function setRemainingStopCountThreshold($var) + { + GPBUtil::checkInt32($var); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * This data element is visible to the end users if the ETA to the stop + * <= duration_until_estimated_arrival_time_threshold. + * + * Generated from protobuf field .google.protobuf.Duration duration_until_estimated_arrival_time_threshold = 2; + * @return \Google\Protobuf\Duration|null + */ + public function getDurationUntilEstimatedArrivalTimeThreshold() + { + return $this->readOneof(2); + } + + public function hasDurationUntilEstimatedArrivalTimeThreshold() + { + return $this->hasOneof(2); + } + + /** + * This data element is visible to the end users if the ETA to the stop + * <= duration_until_estimated_arrival_time_threshold. + * + * Generated from protobuf field .google.protobuf.Duration duration_until_estimated_arrival_time_threshold = 2; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setDurationUntilEstimatedArrivalTimeThreshold($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * This data element is visible to the end users if the remaining + * driving distance in meters <= + * remaining_driving_distance_meters_threshold. + * + * Generated from protobuf field int32 remaining_driving_distance_meters_threshold = 3; + * @return int + */ + public function getRemainingDrivingDistanceMetersThreshold() + { + return $this->readOneof(3); + } + + public function hasRemainingDrivingDistanceMetersThreshold() + { + return $this->hasOneof(3); + } + + /** + * This data element is visible to the end users if the remaining + * driving distance in meters <= + * remaining_driving_distance_meters_threshold. + * + * Generated from protobuf field int32 remaining_driving_distance_meters_threshold = 3; + * @param int $var + * @return $this + */ + public function setRemainingDrivingDistanceMetersThreshold($var) + { + GPBUtil::checkInt32($var); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * If set to true, this data element is always visible to the end users + * with no thresholds. This field cannot be set to false. + * + * Generated from protobuf field bool always = 4; + * @return bool + */ + public function getAlways() + { + return $this->readOneof(4); + } + + public function hasAlways() + { + return $this->hasOneof(4); + } + + /** + * If set to true, this data element is always visible to the end users + * with no thresholds. This field cannot be set to false. + * + * Generated from protobuf field bool always = 4; + * @param bool $var + * @return $this + */ + public function setAlways($var) + { + GPBUtil::checkBool($var); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * If set to true, this data element is always hidden from the end users + * with no thresholds. This field cannot be set to false. + * + * Generated from protobuf field bool never = 5; + * @return bool + */ + public function getNever() + { + return $this->readOneof(5); + } + + public function hasNever() + { + return $this->hasOneof(5); + } + + /** + * If set to true, this data element is always hidden from the end users + * with no thresholds. This field cannot be set to false. + * + * Generated from protobuf field bool never = 5; + * @param bool $var + * @return $this + */ + public function setNever($var) + { + GPBUtil::checkBool($var); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * @return string + */ + public function getVisibilityOption() + { + return $this->whichOneof("visibility_option"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(VisibilityOption::class, \Google\Maps\FleetEngine\Delivery\V1\TaskTrackingViewConfig_VisibilityOption::class); + diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/TimeWindow.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/TimeWindow.php new file mode 100644 index 000000000000..8d4491a57d7b --- /dev/null +++ b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/TimeWindow.php @@ -0,0 +1,121 @@ +maps.fleetengine.delivery.v1.TimeWindow + */ +class TimeWindow extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The start time of the time window (inclusive). + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $start_time = null; + /** + * Required. The end time of the time window (inclusive). + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $end_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $start_time + * Required. The start time of the time window (inclusive). + * @type \Google\Protobuf\Timestamp $end_time + * Required. The end time of the time window (inclusive). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Fleetengine\Delivery\V1\Common::initOnce(); + parent::__construct($data); + } + + /** + * Required. The start time of the time window (inclusive). + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getStartTime() + { + return $this->start_time; + } + + public function hasStartTime() + { + return isset($this->start_time); + } + + public function clearStartTime() + { + unset($this->start_time); + } + + /** + * Required. The start time of the time window (inclusive). + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * Required. The end time of the time window (inclusive). + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEndTime() + { + return $this->end_time; + } + + public function hasEndTime() + { + return isset($this->end_time); + } + + public function clearEndTime() + { + unset($this->end_time); + } + + /** + * Required. The end time of the time window (inclusive). + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/UpdateDeliveryVehicleRequest.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/UpdateDeliveryVehicleRequest.php new file mode 100644 index 000000000000..0d7c7af0e6f8 --- /dev/null +++ b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/UpdateDeliveryVehicleRequest.php @@ -0,0 +1,201 @@ +maps.fleetengine.delivery.v1.UpdateDeliveryVehicleRequest + */ +class UpdateDeliveryVehicleRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The standard Delivery API request header. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $header = null; + /** + * Required. The `DeliveryVehicle` entity update to apply. + * Note: You cannot update the name of the `DeliveryVehicle`. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryVehicle delivery_vehicle = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $delivery_vehicle = null; + /** + * Required. A field mask that indicates which `DeliveryVehicle` fields to + * update. Note that the update_mask must contain at least one field. + * This is a comma-separated list of fully qualified names of fields. Example: + * `"remaining_vehicle_journey_segments"`. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + + /** + * @param \Google\Maps\FleetEngine\Delivery\V1\DeliveryVehicle $deliveryVehicle Required. The `DeliveryVehicle` entity update to apply. + * Note: You cannot update the name of the `DeliveryVehicle`. + * @param \Google\Protobuf\FieldMask $updateMask Required. A field mask that indicates which `DeliveryVehicle` fields to + * update. Note that the update_mask must contain at least one field. + * + * This is a comma-separated list of fully qualified names of fields. Example: + * `"remaining_vehicle_journey_segments"`. + * + * @return \Google\Maps\FleetEngine\Delivery\V1\UpdateDeliveryVehicleRequest + * + * @experimental + */ + public static function build(\Google\Maps\FleetEngine\Delivery\V1\DeliveryVehicle $deliveryVehicle, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setDeliveryVehicle($deliveryVehicle) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Maps\FleetEngine\Delivery\V1\DeliveryRequestHeader $header + * Optional. The standard Delivery API request header. + * @type \Google\Maps\FleetEngine\Delivery\V1\DeliveryVehicle $delivery_vehicle + * Required. The `DeliveryVehicle` entity update to apply. + * Note: You cannot update the name of the `DeliveryVehicle`. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. A field mask that indicates which `DeliveryVehicle` fields to + * update. Note that the update_mask must contain at least one field. + * This is a comma-separated list of fully qualified names of fields. Example: + * `"remaining_vehicle_journey_segments"`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Fleetengine\Delivery\V1\DeliveryApi::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The standard Delivery API request header. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Maps\FleetEngine\Delivery\V1\DeliveryRequestHeader|null + */ + public function getHeader() + { + return $this->header; + } + + public function hasHeader() + { + return isset($this->header); + } + + public function clearHeader() + { + unset($this->header); + } + + /** + * Optional. The standard Delivery API request header. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Maps\FleetEngine\Delivery\V1\DeliveryRequestHeader $var + * @return $this + */ + public function setHeader($var) + { + GPBUtil::checkMessage($var, \Google\Maps\FleetEngine\Delivery\V1\DeliveryRequestHeader::class); + $this->header = $var; + + return $this; + } + + /** + * Required. The `DeliveryVehicle` entity update to apply. + * Note: You cannot update the name of the `DeliveryVehicle`. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryVehicle delivery_vehicle = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Maps\FleetEngine\Delivery\V1\DeliveryVehicle|null + */ + public function getDeliveryVehicle() + { + return $this->delivery_vehicle; + } + + public function hasDeliveryVehicle() + { + return isset($this->delivery_vehicle); + } + + public function clearDeliveryVehicle() + { + unset($this->delivery_vehicle); + } + + /** + * Required. The `DeliveryVehicle` entity update to apply. + * Note: You cannot update the name of the `DeliveryVehicle`. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryVehicle delivery_vehicle = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Maps\FleetEngine\Delivery\V1\DeliveryVehicle $var + * @return $this + */ + public function setDeliveryVehicle($var) + { + GPBUtil::checkMessage($var, \Google\Maps\FleetEngine\Delivery\V1\DeliveryVehicle::class); + $this->delivery_vehicle = $var; + + return $this; + } + + /** + * Required. A field mask that indicates which `DeliveryVehicle` fields to + * update. Note that the update_mask must contain at least one field. + * This is a comma-separated list of fully qualified names of fields. Example: + * `"remaining_vehicle_journey_segments"`. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. A field mask that indicates which `DeliveryVehicle` fields to + * update. Note that the update_mask must contain at least one field. + * This is a comma-separated list of fully qualified names of fields. Example: + * `"remaining_vehicle_journey_segments"`. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/UpdateTaskRequest.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/UpdateTaskRequest.php new file mode 100644 index 000000000000..5ec3945df6de --- /dev/null +++ b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/UpdateTaskRequest.php @@ -0,0 +1,259 @@ +maps.fleetengine.delivery.v1.UpdateTaskRequest + */ +class UpdateTaskRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The standard Delivery API request header. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $header = null; + /** + * Required. The Task associated with the update. + * The following fields are maintained by Fleet Engine. Do not update + * them using `Task.update`. + * * `last_location`. + * * `last_location_snappable`. + * * `name`. + * * `remaining_vehicle_journey_segments`. + * * `task_outcome_location_source`. + * Note: You cannot change the value of `task_outcome` once you set it. + * If the Task has been assigned to a delivery vehicle, then don't set the + * Task state to CLOSED using `Task.update`. Instead, remove the `VehicleStop` + * that contains the Task from the delivery vehicle, which automatically sets + * the Task state to CLOSED. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.Task task = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $task = null; + /** + * Required. The field mask that indicates which Task fields to update. + * Note: The `update_mask` must contain at least one field. + * This is a comma-separated list of fully qualified names of fields. Example: + * `"task_outcome,task_outcome_time,task_outcome_location"`. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + + /** + * @param \Google\Maps\FleetEngine\Delivery\V1\Task $task Required. The Task associated with the update. + * The following fields are maintained by Fleet Engine. Do not update + * them using `Task.update`. + * + * * `last_location`. + * * `last_location_snappable`. + * * `name`. + * * `remaining_vehicle_journey_segments`. + * * `task_outcome_location_source`. + * + * Note: You cannot change the value of `task_outcome` once you set it. + * + * If the Task has been assigned to a delivery vehicle, then don't set the + * Task state to CLOSED using `Task.update`. Instead, remove the `VehicleStop` + * that contains the Task from the delivery vehicle, which automatically sets + * the Task state to CLOSED. + * @param \Google\Protobuf\FieldMask $updateMask Required. The field mask that indicates which Task fields to update. + * Note: The `update_mask` must contain at least one field. + * + * This is a comma-separated list of fully qualified names of fields. Example: + * `"task_outcome,task_outcome_time,task_outcome_location"`. + * + * @return \Google\Maps\FleetEngine\Delivery\V1\UpdateTaskRequest + * + * @experimental + */ + public static function build(\Google\Maps\FleetEngine\Delivery\V1\Task $task, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setTask($task) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Maps\FleetEngine\Delivery\V1\DeliveryRequestHeader $header + * Optional. The standard Delivery API request header. + * @type \Google\Maps\FleetEngine\Delivery\V1\Task $task + * Required. The Task associated with the update. + * The following fields are maintained by Fleet Engine. Do not update + * them using `Task.update`. + * * `last_location`. + * * `last_location_snappable`. + * * `name`. + * * `remaining_vehicle_journey_segments`. + * * `task_outcome_location_source`. + * Note: You cannot change the value of `task_outcome` once you set it. + * If the Task has been assigned to a delivery vehicle, then don't set the + * Task state to CLOSED using `Task.update`. Instead, remove the `VehicleStop` + * that contains the Task from the delivery vehicle, which automatically sets + * the Task state to CLOSED. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. The field mask that indicates which Task fields to update. + * Note: The `update_mask` must contain at least one field. + * This is a comma-separated list of fully qualified names of fields. Example: + * `"task_outcome,task_outcome_time,task_outcome_location"`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Fleetengine\Delivery\V1\DeliveryApi::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The standard Delivery API request header. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Maps\FleetEngine\Delivery\V1\DeliveryRequestHeader|null + */ + public function getHeader() + { + return $this->header; + } + + public function hasHeader() + { + return isset($this->header); + } + + public function clearHeader() + { + unset($this->header); + } + + /** + * Optional. The standard Delivery API request header. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Maps\FleetEngine\Delivery\V1\DeliveryRequestHeader $var + * @return $this + */ + public function setHeader($var) + { + GPBUtil::checkMessage($var, \Google\Maps\FleetEngine\Delivery\V1\DeliveryRequestHeader::class); + $this->header = $var; + + return $this; + } + + /** + * Required. The Task associated with the update. + * The following fields are maintained by Fleet Engine. Do not update + * them using `Task.update`. + * * `last_location`. + * * `last_location_snappable`. + * * `name`. + * * `remaining_vehicle_journey_segments`. + * * `task_outcome_location_source`. + * Note: You cannot change the value of `task_outcome` once you set it. + * If the Task has been assigned to a delivery vehicle, then don't set the + * Task state to CLOSED using `Task.update`. Instead, remove the `VehicleStop` + * that contains the Task from the delivery vehicle, which automatically sets + * the Task state to CLOSED. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.Task task = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Maps\FleetEngine\Delivery\V1\Task|null + */ + public function getTask() + { + return $this->task; + } + + public function hasTask() + { + return isset($this->task); + } + + public function clearTask() + { + unset($this->task); + } + + /** + * Required. The Task associated with the update. + * The following fields are maintained by Fleet Engine. Do not update + * them using `Task.update`. + * * `last_location`. + * * `last_location_snappable`. + * * `name`. + * * `remaining_vehicle_journey_segments`. + * * `task_outcome_location_source`. + * Note: You cannot change the value of `task_outcome` once you set it. + * If the Task has been assigned to a delivery vehicle, then don't set the + * Task state to CLOSED using `Task.update`. Instead, remove the `VehicleStop` + * that contains the Task from the delivery vehicle, which automatically sets + * the Task state to CLOSED. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.Task task = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Maps\FleetEngine\Delivery\V1\Task $var + * @return $this + */ + public function setTask($var) + { + GPBUtil::checkMessage($var, \Google\Maps\FleetEngine\Delivery\V1\Task::class); + $this->task = $var; + + return $this; + } + + /** + * Required. The field mask that indicates which Task fields to update. + * Note: The `update_mask` must contain at least one field. + * This is a comma-separated list of fully qualified names of fields. Example: + * `"task_outcome,task_outcome_time,task_outcome_location"`. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. The field mask that indicates which Task fields to update. + * Note: The `update_mask` must contain at least one field. + * This is a comma-separated list of fully qualified names of fields. Example: + * `"task_outcome,task_outcome_time,task_outcome_location"`. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/VehicleJourneySegment.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/VehicleJourneySegment.php new file mode 100644 index 000000000000..cdef673d39a0 --- /dev/null +++ b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/VehicleJourneySegment.php @@ -0,0 +1,352 @@ +maps.fleetengine.delivery.v1.VehicleJourneySegment + */ +class VehicleJourneySegment extends \Google\Protobuf\Internal\Message +{ + /** + * Specifies the stop location, along with the `Task`s associated with + * the stop. Some fields of the VehicleStop might not be present if this + * journey segment is part of `JourneySharingInfo`. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.VehicleStop stop = 1; + */ + protected $stop = null; + /** + * Output only. The travel distance from the previous stop to this stop. + * If the current stop is the first stop in the list of journey + * segments, then the starting point is the vehicle's location recorded + * at the time that this stop was added to the list. This field might not be + * present if this journey segment is part of `JourneySharingInfo`. + * + * Generated from protobuf field .google.protobuf.Int32Value driving_distance_meters = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $driving_distance_meters = null; + /** + * Output only. The travel time from the previous stop to this stop. + * If the current stop is the first stop in the list of journey + * segments, then the starting point is the Vehicle's location recorded + * at the time that this stop was added to the list. + * If this field is defined in the path + * `Task.remaining_vehicle_journey_segments[0].driving_duration` (gRPC) or + * `Task.remainingVehicleJourneySegments[0].drivingDuration` (REST), + * then it may be populated with the value from + * `DeliveryVehicle.remaining_duration` (gRPC) or + * `DeliveryVehicle.remainingDuration` (REST). + * This provides the remaining driving duration from the driver app's latest + * known location rather than the driving time from the previous stop. + * + * Generated from protobuf field .google.protobuf.Duration driving_duration = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $driving_duration = null; + /** + * Output only. The path from the previous stop to this stop. If the current + * stop is the first stop in the list of journey segments, then this is the + * path from the vehicle's current location to this stop at the time that the + * stop was added to the list. This field might not be present if this journey + * segment is part of `JourneySharingInfo`. + * If this field is defined in the path + * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0].path` + * (gRPC) or `Task.journeySharingInfo.remainingVehicleJourneySegments[0].path` + * (REST), then it may be populated with the `LatLng`s decoded from + * `DeliveryVehicle.current_route_segment` (gRPC) or + * `DeliveryVehicle.currentRouteSegment` (REST). This provides the driving + * path from the driver app's latest known location rather than the path from + * the previous stop. + * + * Generated from protobuf field repeated .google.type.LatLng path = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $path; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Maps\FleetEngine\Delivery\V1\VehicleStop $stop + * Specifies the stop location, along with the `Task`s associated with + * the stop. Some fields of the VehicleStop might not be present if this + * journey segment is part of `JourneySharingInfo`. + * @type \Google\Protobuf\Int32Value $driving_distance_meters + * Output only. The travel distance from the previous stop to this stop. + * If the current stop is the first stop in the list of journey + * segments, then the starting point is the vehicle's location recorded + * at the time that this stop was added to the list. This field might not be + * present if this journey segment is part of `JourneySharingInfo`. + * @type \Google\Protobuf\Duration $driving_duration + * Output only. The travel time from the previous stop to this stop. + * If the current stop is the first stop in the list of journey + * segments, then the starting point is the Vehicle's location recorded + * at the time that this stop was added to the list. + * If this field is defined in the path + * `Task.remaining_vehicle_journey_segments[0].driving_duration` (gRPC) or + * `Task.remainingVehicleJourneySegments[0].drivingDuration` (REST), + * then it may be populated with the value from + * `DeliveryVehicle.remaining_duration` (gRPC) or + * `DeliveryVehicle.remainingDuration` (REST). + * This provides the remaining driving duration from the driver app's latest + * known location rather than the driving time from the previous stop. + * @type array<\Google\Type\LatLng>|\Google\Protobuf\Internal\RepeatedField $path + * Output only. The path from the previous stop to this stop. If the current + * stop is the first stop in the list of journey segments, then this is the + * path from the vehicle's current location to this stop at the time that the + * stop was added to the list. This field might not be present if this journey + * segment is part of `JourneySharingInfo`. + * If this field is defined in the path + * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0].path` + * (gRPC) or `Task.journeySharingInfo.remainingVehicleJourneySegments[0].path` + * (REST), then it may be populated with the `LatLng`s decoded from + * `DeliveryVehicle.current_route_segment` (gRPC) or + * `DeliveryVehicle.currentRouteSegment` (REST). This provides the driving + * path from the driver app's latest known location rather than the path from + * the previous stop. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Fleetengine\Delivery\V1\DeliveryVehicles::initOnce(); + parent::__construct($data); + } + + /** + * Specifies the stop location, along with the `Task`s associated with + * the stop. Some fields of the VehicleStop might not be present if this + * journey segment is part of `JourneySharingInfo`. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.VehicleStop stop = 1; + * @return \Google\Maps\FleetEngine\Delivery\V1\VehicleStop|null + */ + public function getStop() + { + return $this->stop; + } + + public function hasStop() + { + return isset($this->stop); + } + + public function clearStop() + { + unset($this->stop); + } + + /** + * Specifies the stop location, along with the `Task`s associated with + * the stop. Some fields of the VehicleStop might not be present if this + * journey segment is part of `JourneySharingInfo`. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.VehicleStop stop = 1; + * @param \Google\Maps\FleetEngine\Delivery\V1\VehicleStop $var + * @return $this + */ + public function setStop($var) + { + GPBUtil::checkMessage($var, \Google\Maps\FleetEngine\Delivery\V1\VehicleStop::class); + $this->stop = $var; + + return $this; + } + + /** + * Output only. The travel distance from the previous stop to this stop. + * If the current stop is the first stop in the list of journey + * segments, then the starting point is the vehicle's location recorded + * at the time that this stop was added to the list. This field might not be + * present if this journey segment is part of `JourneySharingInfo`. + * + * Generated from protobuf field .google.protobuf.Int32Value driving_distance_meters = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Int32Value|null + */ + public function getDrivingDistanceMeters() + { + return $this->driving_distance_meters; + } + + public function hasDrivingDistanceMeters() + { + return isset($this->driving_distance_meters); + } + + public function clearDrivingDistanceMeters() + { + unset($this->driving_distance_meters); + } + + /** + * Returns the unboxed value from getDrivingDistanceMeters() + + * Output only. The travel distance from the previous stop to this stop. + * If the current stop is the first stop in the list of journey + * segments, then the starting point is the vehicle's location recorded + * at the time that this stop was added to the list. This field might not be + * present if this journey segment is part of `JourneySharingInfo`. + * + * Generated from protobuf field .google.protobuf.Int32Value driving_distance_meters = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|null + */ + public function getDrivingDistanceMetersUnwrapped() + { + return $this->readWrapperValue("driving_distance_meters"); + } + + /** + * Output only. The travel distance from the previous stop to this stop. + * If the current stop is the first stop in the list of journey + * segments, then the starting point is the vehicle's location recorded + * at the time that this stop was added to the list. This field might not be + * present if this journey segment is part of `JourneySharingInfo`. + * + * Generated from protobuf field .google.protobuf.Int32Value driving_distance_meters = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Int32Value $var + * @return $this + */ + public function setDrivingDistanceMeters($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class); + $this->driving_distance_meters = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object. + + * Output only. The travel distance from the previous stop to this stop. + * If the current stop is the first stop in the list of journey + * segments, then the starting point is the vehicle's location recorded + * at the time that this stop was added to the list. This field might not be + * present if this journey segment is part of `JourneySharingInfo`. + * + * Generated from protobuf field .google.protobuf.Int32Value driving_distance_meters = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|null $var + * @return $this + */ + public function setDrivingDistanceMetersUnwrapped($var) + { + $this->writeWrapperValue("driving_distance_meters", $var); + return $this;} + + /** + * Output only. The travel time from the previous stop to this stop. + * If the current stop is the first stop in the list of journey + * segments, then the starting point is the Vehicle's location recorded + * at the time that this stop was added to the list. + * If this field is defined in the path + * `Task.remaining_vehicle_journey_segments[0].driving_duration` (gRPC) or + * `Task.remainingVehicleJourneySegments[0].drivingDuration` (REST), + * then it may be populated with the value from + * `DeliveryVehicle.remaining_duration` (gRPC) or + * `DeliveryVehicle.remainingDuration` (REST). + * This provides the remaining driving duration from the driver app's latest + * known location rather than the driving time from the previous stop. + * + * Generated from protobuf field .google.protobuf.Duration driving_duration = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Duration|null + */ + public function getDrivingDuration() + { + return $this->driving_duration; + } + + public function hasDrivingDuration() + { + return isset($this->driving_duration); + } + + public function clearDrivingDuration() + { + unset($this->driving_duration); + } + + /** + * Output only. The travel time from the previous stop to this stop. + * If the current stop is the first stop in the list of journey + * segments, then the starting point is the Vehicle's location recorded + * at the time that this stop was added to the list. + * If this field is defined in the path + * `Task.remaining_vehicle_journey_segments[0].driving_duration` (gRPC) or + * `Task.remainingVehicleJourneySegments[0].drivingDuration` (REST), + * then it may be populated with the value from + * `DeliveryVehicle.remaining_duration` (gRPC) or + * `DeliveryVehicle.remainingDuration` (REST). + * This provides the remaining driving duration from the driver app's latest + * known location rather than the driving time from the previous stop. + * + * Generated from protobuf field .google.protobuf.Duration driving_duration = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setDrivingDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->driving_duration = $var; + + return $this; + } + + /** + * Output only. The path from the previous stop to this stop. If the current + * stop is the first stop in the list of journey segments, then this is the + * path from the vehicle's current location to this stop at the time that the + * stop was added to the list. This field might not be present if this journey + * segment is part of `JourneySharingInfo`. + * If this field is defined in the path + * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0].path` + * (gRPC) or `Task.journeySharingInfo.remainingVehicleJourneySegments[0].path` + * (REST), then it may be populated with the `LatLng`s decoded from + * `DeliveryVehicle.current_route_segment` (gRPC) or + * `DeliveryVehicle.currentRouteSegment` (REST). This provides the driving + * path from the driver app's latest known location rather than the path from + * the previous stop. + * + * Generated from protobuf field repeated .google.type.LatLng path = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPath() + { + return $this->path; + } + + /** + * Output only. The path from the previous stop to this stop. If the current + * stop is the first stop in the list of journey segments, then this is the + * path from the vehicle's current location to this stop at the time that the + * stop was added to the list. This field might not be present if this journey + * segment is part of `JourneySharingInfo`. + * If this field is defined in the path + * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0].path` + * (gRPC) or `Task.journeySharingInfo.remainingVehicleJourneySegments[0].path` + * (REST), then it may be populated with the `LatLng`s decoded from + * `DeliveryVehicle.current_route_segment` (gRPC) or + * `DeliveryVehicle.currentRouteSegment` (REST). This provides the driving + * path from the driver app's latest known location rather than the path from + * the previous stop. + * + * Generated from protobuf field repeated .google.type.LatLng path = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Type\LatLng>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPath($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Type\LatLng::class); + $this->path = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/VehicleStop.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/VehicleStop.php new file mode 100644 index 000000000000..febbc0c1605b --- /dev/null +++ b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/VehicleStop.php @@ -0,0 +1,161 @@ +maps.fleetengine.delivery.v1.VehicleStop + */ +class VehicleStop extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The location of the stop. Note that the locations in the `Task`s + * might not exactly match this location, but will be within a short distance + * of it. This field won't be populated in the response of a `GetTask` call. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.LocationInfo planned_location = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $planned_location = null; + /** + * The list of `Task`s to be performed at this stop. This field won't be + * populated in the response of a `GetTask` call. + * + * Generated from protobuf field repeated .maps.fleetengine.delivery.v1.VehicleStop.TaskInfo tasks = 2; + */ + private $tasks; + /** + * The state of the `VehicleStop`. This field won't be populated in the + * response of a `GetTask` call. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.VehicleStop.State state = 3; + */ + protected $state = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Maps\FleetEngine\Delivery\V1\LocationInfo $planned_location + * Required. The location of the stop. Note that the locations in the `Task`s + * might not exactly match this location, but will be within a short distance + * of it. This field won't be populated in the response of a `GetTask` call. + * @type array<\Google\Maps\FleetEngine\Delivery\V1\VehicleStop\TaskInfo>|\Google\Protobuf\Internal\RepeatedField $tasks + * The list of `Task`s to be performed at this stop. This field won't be + * populated in the response of a `GetTask` call. + * @type int $state + * The state of the `VehicleStop`. This field won't be populated in the + * response of a `GetTask` call. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Fleetengine\Delivery\V1\DeliveryVehicles::initOnce(); + parent::__construct($data); + } + + /** + * Required. The location of the stop. Note that the locations in the `Task`s + * might not exactly match this location, but will be within a short distance + * of it. This field won't be populated in the response of a `GetTask` call. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.LocationInfo planned_location = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Maps\FleetEngine\Delivery\V1\LocationInfo|null + */ + public function getPlannedLocation() + { + return $this->planned_location; + } + + public function hasPlannedLocation() + { + return isset($this->planned_location); + } + + public function clearPlannedLocation() + { + unset($this->planned_location); + } + + /** + * Required. The location of the stop. Note that the locations in the `Task`s + * might not exactly match this location, but will be within a short distance + * of it. This field won't be populated in the response of a `GetTask` call. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.LocationInfo planned_location = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Maps\FleetEngine\Delivery\V1\LocationInfo $var + * @return $this + */ + public function setPlannedLocation($var) + { + GPBUtil::checkMessage($var, \Google\Maps\FleetEngine\Delivery\V1\LocationInfo::class); + $this->planned_location = $var; + + return $this; + } + + /** + * The list of `Task`s to be performed at this stop. This field won't be + * populated in the response of a `GetTask` call. + * + * Generated from protobuf field repeated .maps.fleetengine.delivery.v1.VehicleStop.TaskInfo tasks = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTasks() + { + return $this->tasks; + } + + /** + * The list of `Task`s to be performed at this stop. This field won't be + * populated in the response of a `GetTask` call. + * + * Generated from protobuf field repeated .maps.fleetengine.delivery.v1.VehicleStop.TaskInfo tasks = 2; + * @param array<\Google\Maps\FleetEngine\Delivery\V1\VehicleStop\TaskInfo>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTasks($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\FleetEngine\Delivery\V1\VehicleStop\TaskInfo::class); + $this->tasks = $arr; + + return $this; + } + + /** + * The state of the `VehicleStop`. This field won't be populated in the + * response of a `GetTask` call. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.VehicleStop.State state = 3; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * The state of the `VehicleStop`. This field won't be populated in the + * response of a `GetTask` call. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.VehicleStop.State state = 3; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Maps\FleetEngine\Delivery\V1\VehicleStop\State::class); + $this->state = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/VehicleStop/State.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/VehicleStop/State.php new file mode 100644 index 000000000000..f212532f517f --- /dev/null +++ b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/VehicleStop/State.php @@ -0,0 +1,76 @@ +maps.fleetengine.delivery.v1.VehicleStop.State + */ +class State +{ + /** + * Unknown. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Created, but not actively routing. + * + * Generated from protobuf enum NEW = 1; + */ + const PBNEW = 1; + /** + * Assigned and actively routing. + * + * Generated from protobuf enum ENROUTE = 2; + */ + const ENROUTE = 2; + /** + * Arrived at stop. Assumes that when the Vehicle is routing to the next + * stop, that all previous stops have been completed. + * + * Generated from protobuf enum ARRIVED = 3; + */ + const ARRIVED = 3; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::PBNEW => 'NEW', + self::ENROUTE => 'ENROUTE', + self::ARRIVED => 'ARRIVED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + $pbconst = __CLASS__. '::PB' . strtoupper($name); + if (!defined($pbconst)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($pbconst); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Maps\FleetEngine\Delivery\V1\VehicleStop_State::class); + diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/VehicleStop/TaskInfo.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/VehicleStop/TaskInfo.php new file mode 100644 index 000000000000..3e6b3a1b19a4 --- /dev/null +++ b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/VehicleStop/TaskInfo.php @@ -0,0 +1,190 @@ +maps.fleetengine.delivery.v1.VehicleStop.TaskInfo + */ +class TaskInfo extends \Google\Protobuf\Internal\Message +{ + /** + * The Task ID. This field won't be populated in the response of a `GetTask` + * call. Task IDs are subject to the following restrictions: + * * Must be a valid Unicode string. + * * Limited to a maximum length of 64 characters. + * * Normalized according to [Unicode Normalization Form C] + * (http://www.unicode.org/reports/tr15/). + * * May not contain any of the following ASCII characters: '/', ':', '?', + * ',', or '#'. + * + * Generated from protobuf field string task_id = 1; + */ + protected $task_id = ''; + /** + * Output only. The time required to perform the Task. + * + * Generated from protobuf field .google.protobuf.Duration task_duration = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $task_duration = null; + /** + * Output only. The time window during which the task should be completed. + * This is only set in the response to `GetDeliveryVehicle`. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.TimeWindow target_time_window = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $target_time_window = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $task_id + * The Task ID. This field won't be populated in the response of a `GetTask` + * call. Task IDs are subject to the following restrictions: + * * Must be a valid Unicode string. + * * Limited to a maximum length of 64 characters. + * * Normalized according to [Unicode Normalization Form C] + * (http://www.unicode.org/reports/tr15/). + * * May not contain any of the following ASCII characters: '/', ':', '?', + * ',', or '#'. + * @type \Google\Protobuf\Duration $task_duration + * Output only. The time required to perform the Task. + * @type \Google\Maps\FleetEngine\Delivery\V1\TimeWindow $target_time_window + * Output only. The time window during which the task should be completed. + * This is only set in the response to `GetDeliveryVehicle`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Fleetengine\Delivery\V1\DeliveryVehicles::initOnce(); + parent::__construct($data); + } + + /** + * The Task ID. This field won't be populated in the response of a `GetTask` + * call. Task IDs are subject to the following restrictions: + * * Must be a valid Unicode string. + * * Limited to a maximum length of 64 characters. + * * Normalized according to [Unicode Normalization Form C] + * (http://www.unicode.org/reports/tr15/). + * * May not contain any of the following ASCII characters: '/', ':', '?', + * ',', or '#'. + * + * Generated from protobuf field string task_id = 1; + * @return string + */ + public function getTaskId() + { + return $this->task_id; + } + + /** + * The Task ID. This field won't be populated in the response of a `GetTask` + * call. Task IDs are subject to the following restrictions: + * * Must be a valid Unicode string. + * * Limited to a maximum length of 64 characters. + * * Normalized according to [Unicode Normalization Form C] + * (http://www.unicode.org/reports/tr15/). + * * May not contain any of the following ASCII characters: '/', ':', '?', + * ',', or '#'. + * + * Generated from protobuf field string task_id = 1; + * @param string $var + * @return $this + */ + public function setTaskId($var) + { + GPBUtil::checkString($var, True); + $this->task_id = $var; + + return $this; + } + + /** + * Output only. The time required to perform the Task. + * + * Generated from protobuf field .google.protobuf.Duration task_duration = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Duration|null + */ + public function getTaskDuration() + { + return $this->task_duration; + } + + public function hasTaskDuration() + { + return isset($this->task_duration); + } + + public function clearTaskDuration() + { + unset($this->task_duration); + } + + /** + * Output only. The time required to perform the Task. + * + * Generated from protobuf field .google.protobuf.Duration task_duration = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setTaskDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->task_duration = $var; + + return $this; + } + + /** + * Output only. The time window during which the task should be completed. + * This is only set in the response to `GetDeliveryVehicle`. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.TimeWindow target_time_window = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Maps\FleetEngine\Delivery\V1\TimeWindow|null + */ + public function getTargetTimeWindow() + { + return $this->target_time_window; + } + + public function hasTargetTimeWindow() + { + return isset($this->target_time_window); + } + + public function clearTargetTimeWindow() + { + unset($this->target_time_window); + } + + /** + * Output only. The time window during which the task should be completed. + * This is only set in the response to `GetDeliveryVehicle`. + * + * Generated from protobuf field .maps.fleetengine.delivery.v1.TimeWindow target_time_window = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Maps\FleetEngine\Delivery\V1\TimeWindow $var + * @return $this + */ + public function setTargetTimeWindow($var) + { + GPBUtil::checkMessage($var, \Google\Maps\FleetEngine\Delivery\V1\TimeWindow::class); + $this->target_time_window = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(TaskInfo::class, \Google\Maps\FleetEngine\Delivery\V1\VehicleStop_TaskInfo::class); + diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/samples/V1/DeliveryServiceClient/batch_create_tasks.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/samples/V1/DeliveryServiceClient/batch_create_tasks.php new file mode 100644 index 000000000000..1c816c55c451 --- /dev/null +++ b/owl-bot-staging/MapsFleetEngineDelivery/v1/samples/V1/DeliveryServiceClient/batch_create_tasks.php @@ -0,0 +1,122 @@ +setType($requestsTaskType) + ->setState($requestsTaskState) + ->setTaskDuration($requestsTaskTaskDuration); + $createTaskRequest = (new CreateTaskRequest()) + ->setParent($requestsParent) + ->setTaskId($requestsTaskId) + ->setTask($requestsTask); + $requests = [$createTaskRequest,]; + $request = (new BatchCreateTasksRequest()) + ->setParent($formattedParent) + ->setRequests($requests); + + // Call the API and handle any network failures. + try { + /** @var BatchCreateTasksResponse $response */ + $response = $deliveryServiceClient->batchCreateTasks($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = DeliveryServiceClient::providerName('[PROVIDER]'); + $requestsParent = '[PARENT]'; + $requestsTaskId = '[TASK_ID]'; + $requestsTaskType = Type::TYPE_UNSPECIFIED; + $requestsTaskState = State::STATE_UNSPECIFIED; + + batch_create_tasks_sample( + $formattedParent, + $requestsParent, + $requestsTaskId, + $requestsTaskType, + $requestsTaskState + ); +} +// [END fleetengine_v1_generated_DeliveryService_BatchCreateTasks_sync] diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/samples/V1/DeliveryServiceClient/create_delivery_vehicle.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/samples/V1/DeliveryServiceClient/create_delivery_vehicle.php new file mode 100644 index 000000000000..073a24cbc694 --- /dev/null +++ b/owl-bot-staging/MapsFleetEngineDelivery/v1/samples/V1/DeliveryServiceClient/create_delivery_vehicle.php @@ -0,0 +1,84 @@ +setParent($parent) + ->setDeliveryVehicleId($deliveryVehicleId) + ->setDeliveryVehicle($deliveryVehicle); + + // Call the API and handle any network failures. + try { + /** @var DeliveryVehicle $response */ + $response = $deliveryServiceClient->createDeliveryVehicle($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $parent = '[PARENT]'; + $deliveryVehicleId = '[DELIVERY_VEHICLE_ID]'; + + create_delivery_vehicle_sample($parent, $deliveryVehicleId); +} +// [END fleetengine_v1_generated_DeliveryService_CreateDeliveryVehicle_sync] diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/samples/V1/DeliveryServiceClient/create_task.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/samples/V1/DeliveryServiceClient/create_task.php new file mode 100644 index 000000000000..1a5973aa56dd --- /dev/null +++ b/owl-bot-staging/MapsFleetEngineDelivery/v1/samples/V1/DeliveryServiceClient/create_task.php @@ -0,0 +1,98 @@ +setType($taskType) + ->setState($taskState) + ->setTaskDuration($taskTaskDuration); + $request = (new CreateTaskRequest()) + ->setParent($parent) + ->setTaskId($taskId) + ->setTask($task); + + // Call the API and handle any network failures. + try { + /** @var Task $response */ + $response = $deliveryServiceClient->createTask($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $parent = '[PARENT]'; + $taskId = '[TASK_ID]'; + $taskType = Type::TYPE_UNSPECIFIED; + $taskState = State::STATE_UNSPECIFIED; + + create_task_sample($parent, $taskId, $taskType, $taskState); +} +// [END fleetengine_v1_generated_DeliveryService_CreateTask_sync] diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/samples/V1/DeliveryServiceClient/get_delivery_vehicle.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/samples/V1/DeliveryServiceClient/get_delivery_vehicle.php new file mode 100644 index 000000000000..50f56f19dccc --- /dev/null +++ b/owl-bot-staging/MapsFleetEngineDelivery/v1/samples/V1/DeliveryServiceClient/get_delivery_vehicle.php @@ -0,0 +1,74 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var DeliveryVehicle $response */ + $response = $deliveryServiceClient->getDeliveryVehicle($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = DeliveryServiceClient::deliveryVehicleName('[PROVIDER]', '[VEHICLE]'); + + get_delivery_vehicle_sample($formattedName); +} +// [END fleetengine_v1_generated_DeliveryService_GetDeliveryVehicle_sync] diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/samples/V1/DeliveryServiceClient/get_task.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/samples/V1/DeliveryServiceClient/get_task.php new file mode 100644 index 000000000000..c2813462b02b --- /dev/null +++ b/owl-bot-staging/MapsFleetEngineDelivery/v1/samples/V1/DeliveryServiceClient/get_task.php @@ -0,0 +1,73 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Task $response */ + $response = $deliveryServiceClient->getTask($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = DeliveryServiceClient::taskName('[PROVIDER]', '[TASK]'); + + get_task_sample($formattedName); +} +// [END fleetengine_v1_generated_DeliveryService_GetTask_sync] diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/samples/V1/DeliveryServiceClient/get_task_tracking_info.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/samples/V1/DeliveryServiceClient/get_task_tracking_info.php new file mode 100644 index 000000000000..8535af281902 --- /dev/null +++ b/owl-bot-staging/MapsFleetEngineDelivery/v1/samples/V1/DeliveryServiceClient/get_task_tracking_info.php @@ -0,0 +1,75 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var TaskTrackingInfo $response */ + $response = $deliveryServiceClient->getTaskTrackingInfo($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = DeliveryServiceClient::taskTrackingInfoName('[PROVIDER]', '[TRACKING]'); + + get_task_tracking_info_sample($formattedName); +} +// [END fleetengine_v1_generated_DeliveryService_GetTaskTrackingInfo_sync] diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/samples/V1/DeliveryServiceClient/list_delivery_vehicles.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/samples/V1/DeliveryServiceClient/list_delivery_vehicles.php new file mode 100644 index 000000000000..957671072030 --- /dev/null +++ b/owl-bot-staging/MapsFleetEngineDelivery/v1/samples/V1/DeliveryServiceClient/list_delivery_vehicles.php @@ -0,0 +1,78 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $deliveryServiceClient->listDeliveryVehicles($request); + + /** @var DeliveryVehicle $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = DeliveryServiceClient::providerName('[PROVIDER]'); + + list_delivery_vehicles_sample($formattedParent); +} +// [END fleetengine_v1_generated_DeliveryService_ListDeliveryVehicles_sync] diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/samples/V1/DeliveryServiceClient/list_tasks.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/samples/V1/DeliveryServiceClient/list_tasks.php new file mode 100644 index 000000000000..cbdf67b339bf --- /dev/null +++ b/owl-bot-staging/MapsFleetEngineDelivery/v1/samples/V1/DeliveryServiceClient/list_tasks.php @@ -0,0 +1,78 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $deliveryServiceClient->listTasks($request); + + /** @var Task $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = DeliveryServiceClient::providerName('[PROVIDER]'); + + list_tasks_sample($formattedParent); +} +// [END fleetengine_v1_generated_DeliveryService_ListTasks_sync] diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/samples/V1/DeliveryServiceClient/update_delivery_vehicle.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/samples/V1/DeliveryServiceClient/update_delivery_vehicle.php new file mode 100644 index 000000000000..e1c846357a3b --- /dev/null +++ b/owl-bot-staging/MapsFleetEngineDelivery/v1/samples/V1/DeliveryServiceClient/update_delivery_vehicle.php @@ -0,0 +1,68 @@ +setDeliveryVehicle($deliveryVehicle) + ->setUpdateMask($updateMask); + + // Call the API and handle any network failures. + try { + /** @var DeliveryVehicle $response */ + $response = $deliveryServiceClient->updateDeliveryVehicle($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END fleetengine_v1_generated_DeliveryService_UpdateDeliveryVehicle_sync] diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/samples/V1/DeliveryServiceClient/update_task.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/samples/V1/DeliveryServiceClient/update_task.php new file mode 100644 index 000000000000..ba858db67368 --- /dev/null +++ b/owl-bot-staging/MapsFleetEngineDelivery/v1/samples/V1/DeliveryServiceClient/update_task.php @@ -0,0 +1,84 @@ +setType($taskType) + ->setState($taskState) + ->setTaskDuration($taskTaskDuration); + $updateMask = new FieldMask(); + $request = (new UpdateTaskRequest()) + ->setTask($task) + ->setUpdateMask($updateMask); + + // Call the API and handle any network failures. + try { + /** @var Task $response */ + $response = $deliveryServiceClient->updateTask($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $taskType = Type::TYPE_UNSPECIFIED; + $taskState = State::STATE_UNSPECIFIED; + + update_task_sample($taskType, $taskState); +} +// [END fleetengine_v1_generated_DeliveryService_UpdateTask_sync] diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/src/V1/Client/DeliveryServiceClient.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/src/V1/Client/DeliveryServiceClient.php new file mode 100644 index 000000000000..656f0f8a45b8 --- /dev/null +++ b/owl-bot-staging/MapsFleetEngineDelivery/v1/src/V1/Client/DeliveryServiceClient.php @@ -0,0 +1,557 @@ + batchCreateTasksAsync(BatchCreateTasksRequest $request, array $optionalArgs = []) + * @method PromiseInterface createDeliveryVehicleAsync(CreateDeliveryVehicleRequest $request, array $optionalArgs = []) + * @method PromiseInterface createTaskAsync(CreateTaskRequest $request, array $optionalArgs = []) + * @method PromiseInterface getDeliveryVehicleAsync(GetDeliveryVehicleRequest $request, array $optionalArgs = []) + * @method PromiseInterface getTaskAsync(GetTaskRequest $request, array $optionalArgs = []) + * @method PromiseInterface getTaskTrackingInfoAsync(GetTaskTrackingInfoRequest $request, array $optionalArgs = []) + * @method PromiseInterface listDeliveryVehiclesAsync(ListDeliveryVehiclesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listTasksAsync(ListTasksRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateDeliveryVehicleAsync(UpdateDeliveryVehicleRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateTaskAsync(UpdateTaskRequest $request, array $optionalArgs = []) + */ +final class DeliveryServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'maps.fleetengine.delivery.v1.DeliveryService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'fleetengine.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'fleetengine.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/delivery_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/delivery_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/delivery_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/delivery_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a + * delivery_vehicle resource. + * + * @param string $provider + * @param string $vehicle + * + * @return string The formatted delivery_vehicle resource. + */ + public static function deliveryVehicleName(string $provider, string $vehicle): string + { + return self::getPathTemplate('deliveryVehicle')->render([ + 'provider' => $provider, + 'vehicle' => $vehicle, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a provider + * resource. + * + * @param string $provider + * + * @return string The formatted provider resource. + */ + public static function providerName(string $provider): string + { + return self::getPathTemplate('provider')->render([ + 'provider' => $provider, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a task + * resource. + * + * @param string $provider + * @param string $task + * + * @return string The formatted task resource. + */ + public static function taskName(string $provider, string $task): string + { + return self::getPathTemplate('task')->render([ + 'provider' => $provider, + 'task' => $task, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * task_tracking_info resource. + * + * @param string $provider + * @param string $tracking + * + * @return string The formatted task_tracking_info resource. + */ + public static function taskTrackingInfoName(string $provider, string $tracking): string + { + return self::getPathTemplate('taskTrackingInfo')->render([ + 'provider' => $provider, + 'tracking' => $tracking, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - deliveryVehicle: providers/{provider}/deliveryVehicles/{vehicle} + * - provider: providers/{provider} + * - task: providers/{provider}/tasks/{task} + * - taskTrackingInfo: providers/{provider}/taskTrackingInfo/{tracking} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'fleetengine.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Creates and returns a batch of new `Task` objects. + * + * The async variant is {@see DeliveryServiceClient::batchCreateTasksAsync()} . + * + * @example samples/V1/DeliveryServiceClient/batch_create_tasks.php + * + * @param BatchCreateTasksRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return BatchCreateTasksResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function batchCreateTasks(BatchCreateTasksRequest $request, array $callOptions = []): BatchCreateTasksResponse + { + return $this->startApiCall('BatchCreateTasks', $request, $callOptions)->wait(); + } + + /** + * Creates and returns a new `DeliveryVehicle`. + * + * The async variant is {@see DeliveryServiceClient::createDeliveryVehicleAsync()} + * . + * + * @example samples/V1/DeliveryServiceClient/create_delivery_vehicle.php + * + * @param CreateDeliveryVehicleRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return DeliveryVehicle + * + * @throws ApiException Thrown if the API call fails. + */ + public function createDeliveryVehicle(CreateDeliveryVehicleRequest $request, array $callOptions = []): DeliveryVehicle + { + return $this->startApiCall('CreateDeliveryVehicle', $request, $callOptions)->wait(); + } + + /** + * Creates and returns a new `Task` object. + * + * The async variant is {@see DeliveryServiceClient::createTaskAsync()} . + * + * @example samples/V1/DeliveryServiceClient/create_task.php + * + * @param CreateTaskRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Task + * + * @throws ApiException Thrown if the API call fails. + */ + public function createTask(CreateTaskRequest $request, array $callOptions = []): Task + { + return $this->startApiCall('CreateTask', $request, $callOptions)->wait(); + } + + /** + * Returns the specified `DeliveryVehicle` instance. + * + * The async variant is {@see DeliveryServiceClient::getDeliveryVehicleAsync()} . + * + * @example samples/V1/DeliveryServiceClient/get_delivery_vehicle.php + * + * @param GetDeliveryVehicleRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return DeliveryVehicle + * + * @throws ApiException Thrown if the API call fails. + */ + public function getDeliveryVehicle(GetDeliveryVehicleRequest $request, array $callOptions = []): DeliveryVehicle + { + return $this->startApiCall('GetDeliveryVehicle', $request, $callOptions)->wait(); + } + + /** + * Gets information about a `Task`. + * + * The async variant is {@see DeliveryServiceClient::getTaskAsync()} . + * + * @example samples/V1/DeliveryServiceClient/get_task.php + * + * @param GetTaskRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Task + * + * @throws ApiException Thrown if the API call fails. + */ + public function getTask(GetTaskRequest $request, array $callOptions = []): Task + { + return $this->startApiCall('GetTask', $request, $callOptions)->wait(); + } + + /** + * Returns the specified `TaskTrackingInfo` instance. + * + * The async variant is {@see DeliveryServiceClient::getTaskTrackingInfoAsync()} . + * + * @example samples/V1/DeliveryServiceClient/get_task_tracking_info.php + * + * @param GetTaskTrackingInfoRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return TaskTrackingInfo + * + * @throws ApiException Thrown if the API call fails. + */ + public function getTaskTrackingInfo(GetTaskTrackingInfoRequest $request, array $callOptions = []): TaskTrackingInfo + { + return $this->startApiCall('GetTaskTrackingInfo', $request, $callOptions)->wait(); + } + + /** + * Gets all `DeliveryVehicle`s that meet the specified filtering criteria. + * + * The async variant is {@see DeliveryServiceClient::listDeliveryVehiclesAsync()} . + * + * @example samples/V1/DeliveryServiceClient/list_delivery_vehicles.php + * + * @param ListDeliveryVehiclesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listDeliveryVehicles(ListDeliveryVehiclesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListDeliveryVehicles', $request, $callOptions); + } + + /** + * Gets all `Task`s that meet the specified filtering criteria. + * + * The async variant is {@see DeliveryServiceClient::listTasksAsync()} . + * + * @example samples/V1/DeliveryServiceClient/list_tasks.php + * + * @param ListTasksRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listTasks(ListTasksRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListTasks', $request, $callOptions); + } + + /** + * Writes updated `DeliveryVehicle` data to Fleet Engine, and assigns + * `Tasks` to the `DeliveryVehicle`. You cannot update the name of the + * `DeliveryVehicle`. You *can* update `remaining_vehicle_journey_segments`, + * but it must contain all of the `VehicleJourneySegment`s to be persisted on + * the `DeliveryVehicle`. The `task_id`s are retrieved from + * `remaining_vehicle_journey_segments`, and their corresponding `Tasks` are + * assigned to the `DeliveryVehicle` if they have not yet been assigned. + * + * The async variant is {@see DeliveryServiceClient::updateDeliveryVehicleAsync()} + * . + * + * @example samples/V1/DeliveryServiceClient/update_delivery_vehicle.php + * + * @param UpdateDeliveryVehicleRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return DeliveryVehicle + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateDeliveryVehicle(UpdateDeliveryVehicleRequest $request, array $callOptions = []): DeliveryVehicle + { + return $this->startApiCall('UpdateDeliveryVehicle', $request, $callOptions)->wait(); + } + + /** + * Updates `Task` data. + * + * The async variant is {@see DeliveryServiceClient::updateTaskAsync()} . + * + * @example samples/V1/DeliveryServiceClient/update_task.php + * + * @param UpdateTaskRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Task + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateTask(UpdateTaskRequest $request, array $callOptions = []): Task + { + return $this->startApiCall('UpdateTask', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/src/V1/gapic_metadata.json b/owl-bot-staging/MapsFleetEngineDelivery/v1/src/V1/gapic_metadata.json new file mode 100644 index 000000000000..bb2fff435e22 --- /dev/null +++ b/owl-bot-staging/MapsFleetEngineDelivery/v1/src/V1/gapic_metadata.json @@ -0,0 +1,68 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "maps.fleetengine.delivery.v1", + "libraryPackage": "Google\\Maps\\FleetEngine\\Delivery\\V1", + "services": { + "DeliveryService": { + "clients": { + "grpc": { + "libraryClient": "DeliveryServiceGapicClient", + "rpcs": { + "BatchCreateTasks": { + "methods": [ + "batchCreateTasks" + ] + }, + "CreateDeliveryVehicle": { + "methods": [ + "createDeliveryVehicle" + ] + }, + "CreateTask": { + "methods": [ + "createTask" + ] + }, + "GetDeliveryVehicle": { + "methods": [ + "getDeliveryVehicle" + ] + }, + "GetTask": { + "methods": [ + "getTask" + ] + }, + "GetTaskTrackingInfo": { + "methods": [ + "getTaskTrackingInfo" + ] + }, + "ListDeliveryVehicles": { + "methods": [ + "listDeliveryVehicles" + ] + }, + "ListTasks": { + "methods": [ + "listTasks" + ] + }, + "UpdateDeliveryVehicle": { + "methods": [ + "updateDeliveryVehicle" + ] + }, + "UpdateTask": { + "methods": [ + "updateTask" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/src/V1/resources/delivery_service_client_config.json b/owl-bot-staging/MapsFleetEngineDelivery/v1/src/V1/resources/delivery_service_client_config.json new file mode 100644 index 000000000000..ec4118ccb923 --- /dev/null +++ b/owl-bot-staging/MapsFleetEngineDelivery/v1/src/V1/resources/delivery_service_client_config.json @@ -0,0 +1,84 @@ +{ + "interfaces": { + "maps.fleetengine.delivery.v1.DeliveryService": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE" + ] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 10000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "BatchCreateTasks": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "CreateDeliveryVehicle": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "CreateTask": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetDeliveryVehicle": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetTask": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetTaskTrackingInfo": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListDeliveryVehicles": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListTasks": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateDeliveryVehicle": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateTask": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/src/V1/resources/delivery_service_descriptor_config.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/src/V1/resources/delivery_service_descriptor_config.php new file mode 100644 index 000000000000..165315e83862 --- /dev/null +++ b/owl-bot-staging/MapsFleetEngineDelivery/v1/src/V1/resources/delivery_service_descriptor_config.php @@ -0,0 +1,202 @@ + [ + 'maps.fleetengine.delivery.v1.DeliveryService' => [ + 'BatchCreateTasks' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Maps\FleetEngine\Delivery\V1\BatchCreateTasksResponse', + 'headerParams' => [ + [ + 'keyName' => 'provider_id', + 'fieldAccessors' => [ + 'getParent', + ], + 'matchers' => [ + '/^(?providers\/[^\/]+)$/', + ], + ], + ], + ], + 'CreateDeliveryVehicle' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Maps\FleetEngine\Delivery\V1\DeliveryVehicle', + 'headerParams' => [ + [ + 'keyName' => 'provider_id', + 'fieldAccessors' => [ + 'getParent', + ], + 'matchers' => [ + '/^(?providers\/[^\/]+)$/', + ], + ], + ], + ], + 'CreateTask' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Maps\FleetEngine\Delivery\V1\Task', + 'headerParams' => [ + [ + 'keyName' => 'provider_id', + 'fieldAccessors' => [ + 'getParent', + ], + 'matchers' => [ + '/^(?providers\/[^\/]+)$/', + ], + ], + ], + ], + 'GetDeliveryVehicle' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Maps\FleetEngine\Delivery\V1\DeliveryVehicle', + 'headerParams' => [ + [ + 'keyName' => 'provider_id', + 'fieldAccessors' => [ + 'getName', + ], + 'matchers' => [ + '/^(?providers\/[^\/]+)$/', + ], + ], + ], + ], + 'GetTask' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Maps\FleetEngine\Delivery\V1\Task', + 'headerParams' => [ + [ + 'keyName' => 'provider_id', + 'fieldAccessors' => [ + 'getName', + ], + 'matchers' => [ + '/^(?providers\/[^\/]+)$/', + ], + ], + ], + ], + 'GetTaskTrackingInfo' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Maps\FleetEngine\Delivery\V1\TaskTrackingInfo', + 'headerParams' => [ + [ + 'keyName' => 'provider_id', + 'fieldAccessors' => [ + 'getName', + ], + 'matchers' => [ + '/^(?providers\/[^\/]+)$/', + ], + ], + ], + ], + 'ListDeliveryVehicles' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getDeliveryVehicles', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Maps\FleetEngine\Delivery\V1\ListDeliveryVehiclesResponse', + 'headerParams' => [ + [ + 'keyName' => 'provider_id', + 'fieldAccessors' => [ + 'getParent', + ], + 'matchers' => [ + '/^(?providers\/[^\/]+)$/', + ], + ], + ], + ], + 'ListTasks' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getTasks', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Maps\FleetEngine\Delivery\V1\ListTasksResponse', + 'headerParams' => [ + [ + 'keyName' => 'provider_id', + 'fieldAccessors' => [ + 'getParent', + ], + 'matchers' => [ + '/^(?providers\/[^\/]+)$/', + ], + ], + ], + ], + 'UpdateDeliveryVehicle' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Maps\FleetEngine\Delivery\V1\DeliveryVehicle', + 'headerParams' => [ + [ + 'keyName' => 'provider_id', + 'fieldAccessors' => [ + 'getDeliveryVehicle', + 'getName', + ], + 'matchers' => [ + '/^(?providers\/[^\/]+)$/', + ], + ], + ], + ], + 'UpdateTask' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Maps\FleetEngine\Delivery\V1\Task', + 'headerParams' => [ + [ + 'keyName' => 'provider_id', + 'fieldAccessors' => [ + 'getTask', + 'getName', + ], + 'matchers' => [ + '/^(?providers\/[^\/]+)$/', + ], + ], + ], + ], + 'templateMap' => [ + 'deliveryVehicle' => 'providers/{provider}/deliveryVehicles/{vehicle}', + 'provider' => 'providers/{provider}', + 'task' => 'providers/{provider}/tasks/{task}', + 'taskTrackingInfo' => 'providers/{provider}/taskTrackingInfo/{tracking}', + ], + ], + ], +]; diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/src/V1/resources/delivery_service_rest_client_config.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/src/V1/resources/delivery_service_rest_client_config.php new file mode 100644 index 000000000000..66575bc17381 --- /dev/null +++ b/owl-bot-staging/MapsFleetEngineDelivery/v1/src/V1/resources/delivery_service_rest_client_config.php @@ -0,0 +1,158 @@ + [ + 'maps.fleetengine.delivery.v1.DeliveryService' => [ + 'BatchCreateTasks' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=providers/*}/tasks:batchCreate', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreateDeliveryVehicle' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=providers/*}/deliveryVehicles', + 'body' => 'delivery_vehicle', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'delivery_vehicle_id', + ], + ], + 'CreateTask' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=providers/*}/tasks', + 'body' => 'task', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'task_id', + ], + ], + 'GetDeliveryVehicle' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=providers/*/deliveryVehicles/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetTask' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=providers/*/tasks/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetTaskTrackingInfo' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=providers/*/taskTrackingInfo/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListDeliveryVehicles' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=providers/*}/deliveryVehicles', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListTasks' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=providers/*}/tasks', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateDeliveryVehicle' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{delivery_vehicle.name=providers/*/deliveryVehicles/*}', + 'body' => 'delivery_vehicle', + 'placeholders' => [ + 'delivery_vehicle.name' => [ + 'getters' => [ + 'getDeliveryVehicle', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdateTask' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{task.name=providers/*/tasks/*}', + 'body' => 'task', + 'placeholders' => [ + 'task.name' => [ + 'getters' => [ + 'getTask', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/tests/Unit/V1/Client/DeliveryServiceClientTest.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/tests/Unit/V1/Client/DeliveryServiceClientTest.php new file mode 100644 index 000000000000..0e341373cb40 --- /dev/null +++ b/owl-bot-staging/MapsFleetEngineDelivery/v1/tests/Unit/V1/Client/DeliveryServiceClientTest.php @@ -0,0 +1,855 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return DeliveryServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new DeliveryServiceClient($options); + } + + /** @test */ + public function batchCreateTasksTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new BatchCreateTasksResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->providerName('[PROVIDER]'); + $requests = []; + $request = (new BatchCreateTasksRequest()) + ->setParent($formattedParent) + ->setRequests($requests); + $response = $gapicClient->batchCreateTasks($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/maps.fleetengine.delivery.v1.DeliveryService/BatchCreateTasks', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getRequests(); + $this->assertProtobufEquals($requests, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchCreateTasksExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->providerName('[PROVIDER]'); + $requests = []; + $request = (new BatchCreateTasksRequest()) + ->setParent($formattedParent) + ->setRequests($requests); + try { + $gapicClient->batchCreateTasks($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createDeliveryVehicleTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $currentRouteSegment = '-9'; + $expectedResponse = new DeliveryVehicle(); + $expectedResponse->setName($name); + $expectedResponse->setCurrentRouteSegment($currentRouteSegment); + $transport->addResponse($expectedResponse); + // Mock request + $parent = 'parent-995424086'; + $deliveryVehicleId = 'deliveryVehicleId-1069581255'; + $deliveryVehicle = new DeliveryVehicle(); + $request = (new CreateDeliveryVehicleRequest()) + ->setParent($parent) + ->setDeliveryVehicleId($deliveryVehicleId) + ->setDeliveryVehicle($deliveryVehicle); + $response = $gapicClient->createDeliveryVehicle($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/maps.fleetengine.delivery.v1.DeliveryService/CreateDeliveryVehicle', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($parent, $actualValue); + $actualValue = $actualRequestObject->getDeliveryVehicleId(); + $this->assertProtobufEquals($deliveryVehicleId, $actualValue); + $actualValue = $actualRequestObject->getDeliveryVehicle(); + $this->assertProtobufEquals($deliveryVehicle, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createDeliveryVehicleExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $parent = 'parent-995424086'; + $deliveryVehicleId = 'deliveryVehicleId-1069581255'; + $deliveryVehicle = new DeliveryVehicle(); + $request = (new CreateDeliveryVehicleRequest()) + ->setParent($parent) + ->setDeliveryVehicleId($deliveryVehicleId) + ->setDeliveryVehicle($deliveryVehicle); + try { + $gapicClient->createDeliveryVehicle($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createTaskTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $trackingId = 'trackingId1878901667'; + $deliveryVehicleId = 'deliveryVehicleId-1069581255'; + $expectedResponse = new Task(); + $expectedResponse->setName($name); + $expectedResponse->setTrackingId($trackingId); + $expectedResponse->setDeliveryVehicleId($deliveryVehicleId); + $transport->addResponse($expectedResponse); + // Mock request + $parent = 'parent-995424086'; + $taskId = 'taskId-1537240555'; + $task = new Task(); + $taskType = Type::TYPE_UNSPECIFIED; + $task->setType($taskType); + $taskState = State::STATE_UNSPECIFIED; + $task->setState($taskState); + $taskTaskDuration = new Duration(); + $task->setTaskDuration($taskTaskDuration); + $request = (new CreateTaskRequest()) + ->setParent($parent) + ->setTaskId($taskId) + ->setTask($task); + $response = $gapicClient->createTask($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/maps.fleetengine.delivery.v1.DeliveryService/CreateTask', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($parent, $actualValue); + $actualValue = $actualRequestObject->getTaskId(); + $this->assertProtobufEquals($taskId, $actualValue); + $actualValue = $actualRequestObject->getTask(); + $this->assertProtobufEquals($task, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createTaskExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $parent = 'parent-995424086'; + $taskId = 'taskId-1537240555'; + $task = new Task(); + $taskType = Type::TYPE_UNSPECIFIED; + $task->setType($taskType); + $taskState = State::STATE_UNSPECIFIED; + $task->setState($taskState); + $taskTaskDuration = new Duration(); + $task->setTaskDuration($taskTaskDuration); + $request = (new CreateTaskRequest()) + ->setParent($parent) + ->setTaskId($taskId) + ->setTask($task); + try { + $gapicClient->createTask($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getDeliveryVehicleTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $currentRouteSegment = '-9'; + $expectedResponse = new DeliveryVehicle(); + $expectedResponse->setName($name2); + $expectedResponse->setCurrentRouteSegment($currentRouteSegment); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->deliveryVehicleName('[PROVIDER]', '[VEHICLE]'); + $request = (new GetDeliveryVehicleRequest()) + ->setName($formattedName); + $response = $gapicClient->getDeliveryVehicle($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/maps.fleetengine.delivery.v1.DeliveryService/GetDeliveryVehicle', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getDeliveryVehicleExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->deliveryVehicleName('[PROVIDER]', '[VEHICLE]'); + $request = (new GetDeliveryVehicleRequest()) + ->setName($formattedName); + try { + $gapicClient->getDeliveryVehicle($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getTaskTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $trackingId = 'trackingId1878901667'; + $deliveryVehicleId = 'deliveryVehicleId-1069581255'; + $expectedResponse = new Task(); + $expectedResponse->setName($name2); + $expectedResponse->setTrackingId($trackingId); + $expectedResponse->setDeliveryVehicleId($deliveryVehicleId); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->taskName('[PROVIDER]', '[TASK]'); + $request = (new GetTaskRequest()) + ->setName($formattedName); + $response = $gapicClient->getTask($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/maps.fleetengine.delivery.v1.DeliveryService/GetTask', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getTaskExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->taskName('[PROVIDER]', '[TASK]'); + $request = (new GetTaskRequest()) + ->setName($formattedName); + try { + $gapicClient->getTask($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getTaskTrackingInfoTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $trackingId = 'trackingId1878901667'; + $expectedResponse = new TaskTrackingInfo(); + $expectedResponse->setName($name2); + $expectedResponse->setTrackingId($trackingId); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->taskTrackingInfoName('[PROVIDER]', '[TRACKING]'); + $request = (new GetTaskTrackingInfoRequest()) + ->setName($formattedName); + $response = $gapicClient->getTaskTrackingInfo($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/maps.fleetengine.delivery.v1.DeliveryService/GetTaskTrackingInfo', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getTaskTrackingInfoExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->taskTrackingInfoName('[PROVIDER]', '[TRACKING]'); + $request = (new GetTaskTrackingInfoRequest()) + ->setName($formattedName); + try { + $gapicClient->getTaskTrackingInfo($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listDeliveryVehiclesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $totalSize = 705419236; + $deliveryVehiclesElement = new DeliveryVehicle(); + $deliveryVehicles = [ + $deliveryVehiclesElement, + ]; + $expectedResponse = new ListDeliveryVehiclesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTotalSize($totalSize); + $expectedResponse->setDeliveryVehicles($deliveryVehicles); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->providerName('[PROVIDER]'); + $request = (new ListDeliveryVehiclesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listDeliveryVehicles($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getDeliveryVehicles()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/maps.fleetengine.delivery.v1.DeliveryService/ListDeliveryVehicles', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listDeliveryVehiclesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->providerName('[PROVIDER]'); + $request = (new ListDeliveryVehiclesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listDeliveryVehicles($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listTasksTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $totalSize = 705419236; + $tasksElement = new Task(); + $tasks = [ + $tasksElement, + ]; + $expectedResponse = new ListTasksResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTotalSize($totalSize); + $expectedResponse->setTasks($tasks); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->providerName('[PROVIDER]'); + $request = (new ListTasksRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listTasks($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getTasks()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/maps.fleetengine.delivery.v1.DeliveryService/ListTasks', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listTasksExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->providerName('[PROVIDER]'); + $request = (new ListTasksRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listTasks($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateDeliveryVehicleTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $currentRouteSegment = '-9'; + $expectedResponse = new DeliveryVehicle(); + $expectedResponse->setName($name); + $expectedResponse->setCurrentRouteSegment($currentRouteSegment); + $transport->addResponse($expectedResponse); + // Mock request + $deliveryVehicle = new DeliveryVehicle(); + $updateMask = new FieldMask(); + $request = (new UpdateDeliveryVehicleRequest()) + ->setDeliveryVehicle($deliveryVehicle) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateDeliveryVehicle($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/maps.fleetengine.delivery.v1.DeliveryService/UpdateDeliveryVehicle', $actualFuncCall); + $actualValue = $actualRequestObject->getDeliveryVehicle(); + $this->assertProtobufEquals($deliveryVehicle, $actualValue); + $actualValue = $actualRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateDeliveryVehicleExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $deliveryVehicle = new DeliveryVehicle(); + $updateMask = new FieldMask(); + $request = (new UpdateDeliveryVehicleRequest()) + ->setDeliveryVehicle($deliveryVehicle) + ->setUpdateMask($updateMask); + try { + $gapicClient->updateDeliveryVehicle($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateTaskTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $trackingId = 'trackingId1878901667'; + $deliveryVehicleId = 'deliveryVehicleId-1069581255'; + $expectedResponse = new Task(); + $expectedResponse->setName($name); + $expectedResponse->setTrackingId($trackingId); + $expectedResponse->setDeliveryVehicleId($deliveryVehicleId); + $transport->addResponse($expectedResponse); + // Mock request + $task = new Task(); + $taskType = Type::TYPE_UNSPECIFIED; + $task->setType($taskType); + $taskState = State::STATE_UNSPECIFIED; + $task->setState($taskState); + $taskTaskDuration = new Duration(); + $task->setTaskDuration($taskTaskDuration); + $updateMask = new FieldMask(); + $request = (new UpdateTaskRequest()) + ->setTask($task) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateTask($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/maps.fleetengine.delivery.v1.DeliveryService/UpdateTask', $actualFuncCall); + $actualValue = $actualRequestObject->getTask(); + $this->assertProtobufEquals($task, $actualValue); + $actualValue = $actualRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateTaskExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $task = new Task(); + $taskType = Type::TYPE_UNSPECIFIED; + $task->setType($taskType); + $taskState = State::STATE_UNSPECIFIED; + $task->setState($taskState); + $taskTaskDuration = new Duration(); + $task->setTaskDuration($taskTaskDuration); + $updateMask = new FieldMask(); + $request = (new UpdateTaskRequest()) + ->setTask($task) + ->setUpdateMask($updateMask); + try { + $gapicClient->updateTask($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchCreateTasksAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new BatchCreateTasksResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->providerName('[PROVIDER]'); + $requests = []; + $request = (new BatchCreateTasksRequest()) + ->setParent($formattedParent) + ->setRequests($requests); + $response = $gapicClient->batchCreateTasksAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/maps.fleetengine.delivery.v1.DeliveryService/BatchCreateTasks', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getRequests(); + $this->assertProtobufEquals($requests, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/GPBMetadata/Google/Maps/Routeoptimization/V1/RouteOptimizationService.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/GPBMetadata/Google/Maps/Routeoptimization/V1/RouteOptimizationService.php new file mode 100644 index 0000000000000000000000000000000000000000..debefc2ef34e4d83c84bc87abc669dd3c1aa4075 GIT binary patch literal 17393 zcmcg!+ix3JdJm}^`BB%AFEo7#O~)JCNvKGf|6I(FU2Bo8g?uxYFu>uqPnwmPn1wO#Yr{9JcU ztF>~n${%X}rDnE`zj`uh8*ayLz0dYd1itY8+8@BiY}?$= zwptc(!D=~~O!rJ(5@$_ZZ<Q%S(`Ytw#*uzvTK4!;i&pEu|r+CgD8a zcD-B3clg}#m-ePsO_WDhKW>jdw|d$(_KUjPY#k1s#H8ho4^1H(*+#o#{U9OrNYKE{jFw{;t(HXcfb?nHAFzsZJ`BbYn38b(vATdf20(20kW6L(^3#WY{! zY&NCOTqvD&PFwXYqPotAvXv759)iW*H_8>5ZJ18Gsh?_O^13?{2n70hWWHMr&x_DG^~IIgXusftIK?0hi#1O>4@qFjfIbSkr9 z*todf(C~Z*2WCAUW3LmSw5@gr&5NP6t>$UdY#B~`mc6?T*S&W*3yCnkcZbcfVedj( zZ#J!GxUPL@;7RocQNcf)wuxlfj_nSj6uLCic^aQ*^KQVUj$>$t2Fj0P)-^N`u8vT{ zi7&AC`>#U6dwFaivT!ssvIwE@K#lk!4hn6)^e3T^l7frJ`g83Bfeqp(TE?(#%XZ>Z zIA&@yL}TV)it#1BgwLX>ClJF6BTZmpwghu|btAi5tZJ1~aZg=*Nx?^Z*xGSin#VO3AXZkZyX9?dBU`EB3O69JUfQngBK2&ssAc!Eg<_T#s1~-= z#c=LAT0oaI>HD!XmH5utd7>I3ZE*?m+}Ob23;>v`*1Y1z{&SKF;PiMlpUBsPTFSOiIdri zt$lP(f@KtRatmqn07NG7Zxb*h{#JG&t{)!S#v#QTT>Uk<9Qo(i+FPTS%X$liOTzMnM{Xoy3s-tLz7AOhEIM1Q+3O6$x_ihek|8H+nWXMv6t=X zbt0y=T>Df}09*w81a};lU27=uI)HCP3?`l$ryPioaX{(n7>s41O!&P}>R$lnr1X)A zXe#$1+7)E3EB8ikS<*mOMFfi___{lK_8z}9B?-%<*E$AeCx*N#QYW%+%m%&#ONULX zhDY{Y;OIMe3l_vQ@8Y-;47+u73}TYRw2aTpIv*hvMW2keS@|9$y!X<$qj@47K_eew zm%cHY2a<#A7CbDJ7v5rv=sj2N!p$?*dagNkU2}EByySJGLx(m{lG#ua$tWuCMW5r- zU0kY$alV7jlO*=t(VMS&elzRMRu150DM=ckdvuYMZ9vymGn?pSnFpo??vGwTa)-jO zLV(Pv@*PM7*C9J?+6DnaCqBo{@cZXmf`SY|0ny|l0+G7WFwkpjcBhH^o@YeIFv)V? z{8o27I%Oo2_*DolNzmJK(T`!$ww^htxMSLk;6j6`rpwkdj8T?)Y@mL~3_>)q4ihxu zb%;tKlN%TU*5_dw4Lzb3Brwl7TV6PRrhOl}zDSEWF|e~!HsaeAK5=FSK&tZiUc%su7qi0(rm*O%ck!_Gec zjGSinaSDZIiiDE+NM>7wc%nZ;c~Wk|mA+SWEo?SLMN`TJUSokq&$K8WCbo9A3@P8nD1zN{U=IWl#KIJ(45feoGhoJ8 z=o0NBdWu$}3aXoV*s^Q`4I9dP;(sS$HXtT%z@l#3COUepY1LVrz%(wlwk&U#jB&cC zyT#U_lJ5?Grk}Pg3JQ5{VhpeUNX$@HKxr75j=_W_o>wl*!}o#9Zulp73zNvi*3Pr= zEKD*-Mq(6Iaxlv{{tV@VtS3oOZ0&V^C&I*Wj);K=%gff9mhTa8T=Z=ATL=w!@Wi^Dl=w)OU* z{Na&#c!YM-5oigW2Y-$=J)7_WM?>h7`D3zemd&70gc8`H)GwD|M#f#e&?QNxL@7WF z!-5mcrXQnZGAA;>_V(x-5meI{6yRiHK9X8s*%zY3k0+eWo1@9~u;n$F=b_&?ZYC!O ze+3tF7iKAF^p@k%=0LCZZ9ddnjK`Sg@n;y(i@=s5If6G)Wf3AQYNaO>P7EZC1{`(DnuRfr9Ln552=mCx(nz9Wu+jvAK9T7hquL|6_L+MV(%k{$P){7df+r!u zcm`sPTrk!cqXf_=cr4!dF5DVNZv$)J39fxMQ&}E-9iZBUD_G5{ma}_maS$Yo!A!nf z*eh&5Ks1g2d6X?ar2m9dHCX8NO^7gew~M809!F?9rD9?INl$U?A}kfLDn@{Oqfo{_ zO1o4dy95gVZ{T@2cNMNsZ8KoMrKe5(Z~~9f4Q10Fn4n4pFT)H=c)u=y294%YKWsGS z)S0q$kq9$B!;2xS!m3HoF-Gxa6<+aVo(X%+Kqnwfo^NroK>}u^;bw4(Pb0mR37iSl zz#8oBuILY0B=-uWdIk<4o%$J>BH;$PJG%@(rbuK;=_-Vozb3fod&>+xPf_^~;$aHx z)1f-Fv{a0Rq0KOre+Q2rmD&p(yffn=fG@ zFoIo2Se`H&Omn07j1uVB520CvFA-Z%M9pJAN}Rf=CBW!^{9M2Zy`TQI}L=%rwKb?eV7ZUBjyuehvh%VFN@0|lzr8zlH0JCiuvFQYx z!CH07ILmevnHnFXyzT8Sy&(y8+gcL;8iLutf*-)LS4Q^Poso8xx29!aNz{;ib4OZP zKKE?|GG?ob6L@0vY~kW9YCpkL(tv|08BmBCzYY)P@MDaiiD~XQSt^Dodnxe4jG&PE z!D6@K%tCtvz;h>}YL96OSs?O1<}EE;|K9~gj`lH<1JGga>TOt*^8zklxW7_ingt-T z0qdR7;wqD7>~K7zi!D-=N)dKX7KJnCrPVc^$}PBhq&u?93Gd^;(4B5wmC6+ngzED= zf|R{XtXXQT&X3?BRIIq7CB}H0bxtYB6(&8hLVRwnFulUsgV&Nm#f=y25vf9qpORd@ zgN;v=^B+U|gGXeywcc&5KnKLB`Wh@)ET8zR37BF5BPHV;ks+mulqb1M5XD%Yr=*#6 zj3`%OnaL4WrC9r_7*C2kgXTo{9 zamWl@gp0E`Wn_gbD4V=pbeL@R+Z5SzkaV@fEmoLIf(L5#mK;qfg5{Pz={wNNc?ybrum=BLn_~TrHyggkb?c1f+V)& zVT}XZbB*WtO$jz1N}$0HL>v_TF5iM1atwwy2KE$TN?6A)qfG3YU!Z68* zUVz2*{)XClfbEj6rgsZo&Z}G5?YyQwURTw8MZVM4vpd;!EEX$_Mb?7^{gaOFlSzN_h)b z#+i-X!rG(4cE0qevN)|=hGlsQIwf`%mmXpN@eJ!1mTV7PP3jkuu+-mmiUuA#urbMS zOwp(G@VwiUlxJ#?TN$M%N}stNh2p;ww|Y^Tb5C#n#oz=9iaUdbBc zyNbTMOK<7VeO9{(bAbn6tHnMXQ8IcgDocN1LxG?C2@)wst#V=sGbGSlt zi^XD$)L({RiW8@Vvr4(`;71y_;bvJaW*=*Ng-W5y+7c>ScB876wd!VBt!$QxdCW_% zL3+S2^gI=8q)^Fm^v((6$2nK{9QLtC56OwtA5XxwK+F4H&!-D4k0;#pR9~MZPYZkp zrrAe~QhLWI2@YE`&Ax6e8`w^P`6Yvr5$t0d%!)dWe#oOVmV3l*Q_Lq&J)5;v@vm{B ziJxN|Y!3}QM)#{g%wr0?Bj5oR4H=kZsY^`XeHZ)iJ2mV}#V<2iSP@(M-JXfsUKv2q zu%wC~38elu1To*&hDsLTu3JwKTbbh z9w%X47U!^3RxSe5d>g5M!mOPCJ4VEC3$#o8xXLxD@yOz3!`RvwttGhCe0SdOaKD&W z_iZS39ikprsGQlcO%Bo7=~5|}5ALLY%snhnb(wHu7{}B2z``)k*ZIuBZ;ckgvNnng=rrsTV zz#wC4eIH8`cUDsO22cJXGjKwp`eioBLT$llCMDvC_!YU6#;-Vjl}#VHZrjPMtUP=6 ztmoy5-f@rcV{@z1cmvB4E@^-6&%#v4JC>|Evllmay-z~L&pqtW?=S3xK7Gt6OF~F< z<k|;_V?lB1NNH~h$8WG`o4Xn_g24@L-zUaR`4IL5JJru zwU57C@!Rk%PAHQhN|{U_sZ3^XwKk0s?pklX>ismp>-<+Bd_Nk2DQ;{P81RD;Y$X3- KhcDm@fd2=v>Qx;8 literal 0 HcmV?d00001 diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/AggregatedMetrics.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/AggregatedMetrics.php new file mode 100644 index 000000000000..a4e7c9fdc222 --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/AggregatedMetrics.php @@ -0,0 +1,454 @@ +google.maps.routeoptimization.v1.AggregatedMetrics + */ +class AggregatedMetrics extends \Google\Protobuf\Internal\Message +{ + /** + * Number of shipments performed. Note that a pickup and delivery pair only + * counts once. + * + * Generated from protobuf field int32 performed_shipment_count = 1; + */ + protected $performed_shipment_count = 0; + /** + * Total travel duration for a route or a solution. + * + * Generated from protobuf field .google.protobuf.Duration travel_duration = 2; + */ + protected $travel_duration = null; + /** + * Total wait duration for a route or a solution. + * + * Generated from protobuf field .google.protobuf.Duration wait_duration = 3; + */ + protected $wait_duration = null; + /** + * Total delay duration for a route or a solution. + * + * Generated from protobuf field .google.protobuf.Duration delay_duration = 4; + */ + protected $delay_duration = null; + /** + * Total break duration for a route or a solution. + * + * Generated from protobuf field .google.protobuf.Duration break_duration = 5; + */ + protected $break_duration = null; + /** + * Total visit duration for a route or a solution. + * + * Generated from protobuf field .google.protobuf.Duration visit_duration = 6; + */ + protected $visit_duration = null; + /** + * The total duration should be equal to the sum of all durations above. + * For routes, it also corresponds to: + * ``` + * [ShipmentRoute.vehicle_end_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_end_time] + * - + * [ShipmentRoute.vehicle_start_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_start_time] + * ``` + * + * Generated from protobuf field .google.protobuf.Duration total_duration = 7; + */ + protected $total_duration = null; + /** + * Total travel distance for a route or a solution. + * + * Generated from protobuf field double travel_distance_meters = 8; + */ + protected $travel_distance_meters = 0.0; + /** + * Maximum load achieved over the entire route (resp. solution), for each of + * the quantities on this route (resp. solution), computed as the maximum over + * all + * [Transition.vehicle_loads][google.maps.routeoptimization.v1.ShipmentRoute.Transition.vehicle_loads] + * (resp. + * [ShipmentRoute.metrics.max_loads][google.maps.routeoptimization.v1.AggregatedMetrics.max_loads]. + * + * Generated from protobuf field map max_loads = 9; + */ + private $max_loads; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $performed_shipment_count + * Number of shipments performed. Note that a pickup and delivery pair only + * counts once. + * @type \Google\Protobuf\Duration $travel_duration + * Total travel duration for a route or a solution. + * @type \Google\Protobuf\Duration $wait_duration + * Total wait duration for a route or a solution. + * @type \Google\Protobuf\Duration $delay_duration + * Total delay duration for a route or a solution. + * @type \Google\Protobuf\Duration $break_duration + * Total break duration for a route or a solution. + * @type \Google\Protobuf\Duration $visit_duration + * Total visit duration for a route or a solution. + * @type \Google\Protobuf\Duration $total_duration + * The total duration should be equal to the sum of all durations above. + * For routes, it also corresponds to: + * ``` + * [ShipmentRoute.vehicle_end_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_end_time] + * - + * [ShipmentRoute.vehicle_start_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_start_time] + * ``` + * @type float $travel_distance_meters + * Total travel distance for a route or a solution. + * @type array|\Google\Protobuf\Internal\MapField $max_loads + * Maximum load achieved over the entire route (resp. solution), for each of + * the quantities on this route (resp. solution), computed as the maximum over + * all + * [Transition.vehicle_loads][google.maps.routeoptimization.v1.ShipmentRoute.Transition.vehicle_loads] + * (resp. + * [ShipmentRoute.metrics.max_loads][google.maps.routeoptimization.v1.AggregatedMetrics.max_loads]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); + parent::__construct($data); + } + + /** + * Number of shipments performed. Note that a pickup and delivery pair only + * counts once. + * + * Generated from protobuf field int32 performed_shipment_count = 1; + * @return int + */ + public function getPerformedShipmentCount() + { + return $this->performed_shipment_count; + } + + /** + * Number of shipments performed. Note that a pickup and delivery pair only + * counts once. + * + * Generated from protobuf field int32 performed_shipment_count = 1; + * @param int $var + * @return $this + */ + public function setPerformedShipmentCount($var) + { + GPBUtil::checkInt32($var); + $this->performed_shipment_count = $var; + + return $this; + } + + /** + * Total travel duration for a route or a solution. + * + * Generated from protobuf field .google.protobuf.Duration travel_duration = 2; + * @return \Google\Protobuf\Duration|null + */ + public function getTravelDuration() + { + return $this->travel_duration; + } + + public function hasTravelDuration() + { + return isset($this->travel_duration); + } + + public function clearTravelDuration() + { + unset($this->travel_duration); + } + + /** + * Total travel duration for a route or a solution. + * + * Generated from protobuf field .google.protobuf.Duration travel_duration = 2; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setTravelDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->travel_duration = $var; + + return $this; + } + + /** + * Total wait duration for a route or a solution. + * + * Generated from protobuf field .google.protobuf.Duration wait_duration = 3; + * @return \Google\Protobuf\Duration|null + */ + public function getWaitDuration() + { + return $this->wait_duration; + } + + public function hasWaitDuration() + { + return isset($this->wait_duration); + } + + public function clearWaitDuration() + { + unset($this->wait_duration); + } + + /** + * Total wait duration for a route or a solution. + * + * Generated from protobuf field .google.protobuf.Duration wait_duration = 3; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setWaitDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->wait_duration = $var; + + return $this; + } + + /** + * Total delay duration for a route or a solution. + * + * Generated from protobuf field .google.protobuf.Duration delay_duration = 4; + * @return \Google\Protobuf\Duration|null + */ + public function getDelayDuration() + { + return $this->delay_duration; + } + + public function hasDelayDuration() + { + return isset($this->delay_duration); + } + + public function clearDelayDuration() + { + unset($this->delay_duration); + } + + /** + * Total delay duration for a route or a solution. + * + * Generated from protobuf field .google.protobuf.Duration delay_duration = 4; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setDelayDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->delay_duration = $var; + + return $this; + } + + /** + * Total break duration for a route or a solution. + * + * Generated from protobuf field .google.protobuf.Duration break_duration = 5; + * @return \Google\Protobuf\Duration|null + */ + public function getBreakDuration() + { + return $this->break_duration; + } + + public function hasBreakDuration() + { + return isset($this->break_duration); + } + + public function clearBreakDuration() + { + unset($this->break_duration); + } + + /** + * Total break duration for a route or a solution. + * + * Generated from protobuf field .google.protobuf.Duration break_duration = 5; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setBreakDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->break_duration = $var; + + return $this; + } + + /** + * Total visit duration for a route or a solution. + * + * Generated from protobuf field .google.protobuf.Duration visit_duration = 6; + * @return \Google\Protobuf\Duration|null + */ + public function getVisitDuration() + { + return $this->visit_duration; + } + + public function hasVisitDuration() + { + return isset($this->visit_duration); + } + + public function clearVisitDuration() + { + unset($this->visit_duration); + } + + /** + * Total visit duration for a route or a solution. + * + * Generated from protobuf field .google.protobuf.Duration visit_duration = 6; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setVisitDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->visit_duration = $var; + + return $this; + } + + /** + * The total duration should be equal to the sum of all durations above. + * For routes, it also corresponds to: + * ``` + * [ShipmentRoute.vehicle_end_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_end_time] + * - + * [ShipmentRoute.vehicle_start_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_start_time] + * ``` + * + * Generated from protobuf field .google.protobuf.Duration total_duration = 7; + * @return \Google\Protobuf\Duration|null + */ + public function getTotalDuration() + { + return $this->total_duration; + } + + public function hasTotalDuration() + { + return isset($this->total_duration); + } + + public function clearTotalDuration() + { + unset($this->total_duration); + } + + /** + * The total duration should be equal to the sum of all durations above. + * For routes, it also corresponds to: + * ``` + * [ShipmentRoute.vehicle_end_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_end_time] + * - + * [ShipmentRoute.vehicle_start_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_start_time] + * ``` + * + * Generated from protobuf field .google.protobuf.Duration total_duration = 7; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setTotalDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->total_duration = $var; + + return $this; + } + + /** + * Total travel distance for a route or a solution. + * + * Generated from protobuf field double travel_distance_meters = 8; + * @return float + */ + public function getTravelDistanceMeters() + { + return $this->travel_distance_meters; + } + + /** + * Total travel distance for a route or a solution. + * + * Generated from protobuf field double travel_distance_meters = 8; + * @param float $var + * @return $this + */ + public function setTravelDistanceMeters($var) + { + GPBUtil::checkDouble($var); + $this->travel_distance_meters = $var; + + return $this; + } + + /** + * Maximum load achieved over the entire route (resp. solution), for each of + * the quantities on this route (resp. solution), computed as the maximum over + * all + * [Transition.vehicle_loads][google.maps.routeoptimization.v1.ShipmentRoute.Transition.vehicle_loads] + * (resp. + * [ShipmentRoute.metrics.max_loads][google.maps.routeoptimization.v1.AggregatedMetrics.max_loads]. + * + * Generated from protobuf field map max_loads = 9; + * @return \Google\Protobuf\Internal\MapField + */ + public function getMaxLoads() + { + return $this->max_loads; + } + + /** + * Maximum load achieved over the entire route (resp. solution), for each of + * the quantities on this route (resp. solution), computed as the maximum over + * all + * [Transition.vehicle_loads][google.maps.routeoptimization.v1.ShipmentRoute.Transition.vehicle_loads] + * (resp. + * [ShipmentRoute.metrics.max_loads][google.maps.routeoptimization.v1.AggregatedMetrics.max_loads]. + * + * Generated from protobuf field map max_loads = 9; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setMaxLoads($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\ShipmentRoute\VehicleLoad::class); + $this->max_loads = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BatchOptimizeToursMetadata.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BatchOptimizeToursMetadata.php new file mode 100644 index 000000000000..50b825aa8a7e --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BatchOptimizeToursMetadata.php @@ -0,0 +1,33 @@ +google.maps.routeoptimization.v1.BatchOptimizeToursMetadata + */ +class BatchOptimizeToursMetadata extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BatchOptimizeToursRequest.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BatchOptimizeToursRequest.php new file mode 100644 index 000000000000..3c9fbf3f7c0d --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BatchOptimizeToursRequest.php @@ -0,0 +1,125 @@ +google.maps.routeoptimization.v1.BatchOptimizeToursRequest + */ +class BatchOptimizeToursRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Target project and location to make a call. + * Format: + * * `projects/{project-id}` + * * `projects/{project-id}/locations/{location-id}` + * If no location is specified, a region will be chosen automatically. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $parent = ''; + /** + * Required. Input/Output information each purchase model, such as file paths + * and data formats. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.BatchOptimizeToursRequest.AsyncModelConfig model_configs = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $model_configs; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Target project and location to make a call. + * Format: + * * `projects/{project-id}` + * * `projects/{project-id}/locations/{location-id}` + * If no location is specified, a region will be chosen automatically. + * @type array<\Google\Maps\RouteOptimization\V1\BatchOptimizeToursRequest\AsyncModelConfig>|\Google\Protobuf\Internal\RepeatedField $model_configs + * Required. Input/Output information each purchase model, such as file paths + * and data formats. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Target project and location to make a call. + * Format: + * * `projects/{project-id}` + * * `projects/{project-id}/locations/{location-id}` + * If no location is specified, a region will be chosen automatically. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Target project and location to make a call. + * Format: + * * `projects/{project-id}` + * * `projects/{project-id}/locations/{location-id}` + * If no location is specified, a region will be chosen automatically. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. Input/Output information each purchase model, such as file paths + * and data formats. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.BatchOptimizeToursRequest.AsyncModelConfig model_configs = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getModelConfigs() + { + return $this->model_configs; + } + + /** + * Required. Input/Output information each purchase model, such as file paths + * and data formats. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.BatchOptimizeToursRequest.AsyncModelConfig model_configs = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Maps\RouteOptimization\V1\BatchOptimizeToursRequest\AsyncModelConfig>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setModelConfigs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\BatchOptimizeToursRequest\AsyncModelConfig::class); + $this->model_configs = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BatchOptimizeToursRequest/AsyncModelConfig.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BatchOptimizeToursRequest/AsyncModelConfig.php new file mode 100644 index 000000000000..9f323a5cd726 --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BatchOptimizeToursRequest/AsyncModelConfig.php @@ -0,0 +1,162 @@ +google.maps.routeoptimization.v1.BatchOptimizeToursRequest.AsyncModelConfig + */ +class AsyncModelConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. User defined model name, can be used as alias by users to keep + * track of models. + * + * Generated from protobuf field string display_name = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $display_name = ''; + /** + * Required. Information about the input model. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.InputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $input_config = null; + /** + * Required. The desired output location information. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.OutputConfig output_config = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $output_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $display_name + * Optional. User defined model name, can be used as alias by users to keep + * track of models. + * @type \Google\Maps\RouteOptimization\V1\InputConfig $input_config + * Required. Information about the input model. + * @type \Google\Maps\RouteOptimization\V1\OutputConfig $output_config + * Required. The desired output location information. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); + parent::__construct($data); + } + + /** + * Optional. User defined model name, can be used as alias by users to keep + * track of models. + * + * Generated from protobuf field string display_name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Optional. User defined model name, can be used as alias by users to keep + * track of models. + * + * Generated from protobuf field string display_name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Required. Information about the input model. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.InputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Maps\RouteOptimization\V1\InputConfig|null + */ + public function getInputConfig() + { + return $this->input_config; + } + + public function hasInputConfig() + { + return isset($this->input_config); + } + + public function clearInputConfig() + { + unset($this->input_config); + } + + /** + * Required. Information about the input model. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.InputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Maps\RouteOptimization\V1\InputConfig $var + * @return $this + */ + public function setInputConfig($var) + { + GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\InputConfig::class); + $this->input_config = $var; + + return $this; + } + + /** + * Required. The desired output location information. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.OutputConfig output_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Maps\RouteOptimization\V1\OutputConfig|null + */ + public function getOutputConfig() + { + return $this->output_config; + } + + public function hasOutputConfig() + { + return isset($this->output_config); + } + + public function clearOutputConfig() + { + unset($this->output_config); + } + + /** + * Required. The desired output location information. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.OutputConfig output_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Maps\RouteOptimization\V1\OutputConfig $var + * @return $this + */ + public function setOutputConfig($var) + { + GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\OutputConfig::class); + $this->output_config = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(AsyncModelConfig::class, \Google\Maps\RouteOptimization\V1\BatchOptimizeToursRequest_AsyncModelConfig::class); + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BatchOptimizeToursResponse.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BatchOptimizeToursResponse.php new file mode 100644 index 000000000000..2b0e02bf139a --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BatchOptimizeToursResponse.php @@ -0,0 +1,34 @@ +google.maps.routeoptimization.v1.BatchOptimizeToursResponse + */ +class BatchOptimizeToursResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BreakRule.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BreakRule.php new file mode 100644 index 000000000000..500ac900d732 --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BreakRule.php @@ -0,0 +1,113 @@ +google.maps.routeoptimization.v1.BreakRule + */ +class BreakRule extends \Google\Protobuf\Internal\Message +{ + /** + * Sequence of breaks. See the `BreakRequest` message. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.BreakRule.BreakRequest break_requests = 1; + */ + private $break_requests; + /** + * Several `FrequencyConstraint` may apply. They must all be satisfied by + * the `BreakRequest`s of this `BreakRule`. See `FrequencyConstraint`. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.BreakRule.FrequencyConstraint frequency_constraints = 2; + */ + private $frequency_constraints; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Maps\RouteOptimization\V1\BreakRule\BreakRequest>|\Google\Protobuf\Internal\RepeatedField $break_requests + * Sequence of breaks. See the `BreakRequest` message. + * @type array<\Google\Maps\RouteOptimization\V1\BreakRule\FrequencyConstraint>|\Google\Protobuf\Internal\RepeatedField $frequency_constraints + * Several `FrequencyConstraint` may apply. They must all be satisfied by + * the `BreakRequest`s of this `BreakRule`. See `FrequencyConstraint`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); + parent::__construct($data); + } + + /** + * Sequence of breaks. See the `BreakRequest` message. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.BreakRule.BreakRequest break_requests = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getBreakRequests() + { + return $this->break_requests; + } + + /** + * Sequence of breaks. See the `BreakRequest` message. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.BreakRule.BreakRequest break_requests = 1; + * @param array<\Google\Maps\RouteOptimization\V1\BreakRule\BreakRequest>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setBreakRequests($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\BreakRule\BreakRequest::class); + $this->break_requests = $arr; + + return $this; + } + + /** + * Several `FrequencyConstraint` may apply. They must all be satisfied by + * the `BreakRequest`s of this `BreakRule`. See `FrequencyConstraint`. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.BreakRule.FrequencyConstraint frequency_constraints = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFrequencyConstraints() + { + return $this->frequency_constraints; + } + + /** + * Several `FrequencyConstraint` may apply. They must all be satisfied by + * the `BreakRequest`s of this `BreakRule`. See `FrequencyConstraint`. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.BreakRule.FrequencyConstraint frequency_constraints = 2; + * @param array<\Google\Maps\RouteOptimization\V1\BreakRule\FrequencyConstraint>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFrequencyConstraints($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\BreakRule\FrequencyConstraint::class); + $this->frequency_constraints = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BreakRule/BreakRequest.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BreakRule/BreakRequest.php new file mode 100644 index 000000000000..3defefe05194 --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BreakRule/BreakRequest.php @@ -0,0 +1,172 @@ +google.maps.routeoptimization.v1.BreakRule.BreakRequest + */ +class BreakRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Lower bound (inclusive) on the start of the break. + * + * Generated from protobuf field .google.protobuf.Timestamp earliest_start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $earliest_start_time = null; + /** + * Required. Upper bound (inclusive) on the start of the break. + * + * Generated from protobuf field .google.protobuf.Timestamp latest_start_time = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $latest_start_time = null; + /** + * Required. Minimum duration of the break. Must be positive. + * + * Generated from protobuf field .google.protobuf.Duration min_duration = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $min_duration = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $earliest_start_time + * Required. Lower bound (inclusive) on the start of the break. + * @type \Google\Protobuf\Timestamp $latest_start_time + * Required. Upper bound (inclusive) on the start of the break. + * @type \Google\Protobuf\Duration $min_duration + * Required. Minimum duration of the break. Must be positive. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Lower bound (inclusive) on the start of the break. + * + * Generated from protobuf field .google.protobuf.Timestamp earliest_start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEarliestStartTime() + { + return $this->earliest_start_time; + } + + public function hasEarliestStartTime() + { + return isset($this->earliest_start_time); + } + + public function clearEarliestStartTime() + { + unset($this->earliest_start_time); + } + + /** + * Required. Lower bound (inclusive) on the start of the break. + * + * Generated from protobuf field .google.protobuf.Timestamp earliest_start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEarliestStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->earliest_start_time = $var; + + return $this; + } + + /** + * Required. Upper bound (inclusive) on the start of the break. + * + * Generated from protobuf field .google.protobuf.Timestamp latest_start_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getLatestStartTime() + { + return $this->latest_start_time; + } + + public function hasLatestStartTime() + { + return isset($this->latest_start_time); + } + + public function clearLatestStartTime() + { + unset($this->latest_start_time); + } + + /** + * Required. Upper bound (inclusive) on the start of the break. + * + * Generated from protobuf field .google.protobuf.Timestamp latest_start_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setLatestStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->latest_start_time = $var; + + return $this; + } + + /** + * Required. Minimum duration of the break. Must be positive. + * + * Generated from protobuf field .google.protobuf.Duration min_duration = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Duration|null + */ + public function getMinDuration() + { + return $this->min_duration; + } + + public function hasMinDuration() + { + return isset($this->min_duration); + } + + public function clearMinDuration() + { + unset($this->min_duration); + } + + /** + * Required. Minimum duration of the break. Must be positive. + * + * Generated from protobuf field .google.protobuf.Duration min_duration = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setMinDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->min_duration = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(BreakRequest::class, \Google\Maps\RouteOptimization\V1\BreakRule_BreakRequest::class); + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BreakRule/FrequencyConstraint.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BreakRule/FrequencyConstraint.php new file mode 100644 index 000000000000..3a9cd80a9e6d --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BreakRule/FrequencyConstraint.php @@ -0,0 +1,166 @@ +google.maps.routeoptimization.v1.BreakRule.FrequencyConstraint + */ +class FrequencyConstraint extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Minimum break duration for this constraint. Nonnegative. + * See description of `FrequencyConstraint`. + * + * Generated from protobuf field .google.protobuf.Duration min_break_duration = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $min_break_duration = null; + /** + * Required. Maximum allowed span of any interval of time in the route that + * does not include at least partially a break of `duration >= + * min_break_duration`. Must be positive. + * + * Generated from protobuf field .google.protobuf.Duration max_inter_break_duration = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $max_inter_break_duration = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Duration $min_break_duration + * Required. Minimum break duration for this constraint. Nonnegative. + * See description of `FrequencyConstraint`. + * @type \Google\Protobuf\Duration $max_inter_break_duration + * Required. Maximum allowed span of any interval of time in the route that + * does not include at least partially a break of `duration >= + * min_break_duration`. Must be positive. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Minimum break duration for this constraint. Nonnegative. + * See description of `FrequencyConstraint`. + * + * Generated from protobuf field .google.protobuf.Duration min_break_duration = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Duration|null + */ + public function getMinBreakDuration() + { + return $this->min_break_duration; + } + + public function hasMinBreakDuration() + { + return isset($this->min_break_duration); + } + + public function clearMinBreakDuration() + { + unset($this->min_break_duration); + } + + /** + * Required. Minimum break duration for this constraint. Nonnegative. + * See description of `FrequencyConstraint`. + * + * Generated from protobuf field .google.protobuf.Duration min_break_duration = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setMinBreakDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->min_break_duration = $var; + + return $this; + } + + /** + * Required. Maximum allowed span of any interval of time in the route that + * does not include at least partially a break of `duration >= + * min_break_duration`. Must be positive. + * + * Generated from protobuf field .google.protobuf.Duration max_inter_break_duration = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Duration|null + */ + public function getMaxInterBreakDuration() + { + return $this->max_inter_break_duration; + } + + public function hasMaxInterBreakDuration() + { + return isset($this->max_inter_break_duration); + } + + public function clearMaxInterBreakDuration() + { + unset($this->max_inter_break_duration); + } + + /** + * Required. Maximum allowed span of any interval of time in the route that + * does not include at least partially a break of `duration >= + * min_break_duration`. Must be positive. + * + * Generated from protobuf field .google.protobuf.Duration max_inter_break_duration = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setMaxInterBreakDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->max_inter_break_duration = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(FrequencyConstraint::class, \Google\Maps\RouteOptimization\V1\BreakRule_FrequencyConstraint::class); + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/DataFormat.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/DataFormat.php new file mode 100644 index 000000000000..76303e93fb37 --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/DataFormat.php @@ -0,0 +1,62 @@ +google.maps.routeoptimization.v1.DataFormat + */ +class DataFormat +{ + /** + * Invalid value, format must not be UNSPECIFIED. + * + * Generated from protobuf enum DATA_FORMAT_UNSPECIFIED = 0; + */ + const DATA_FORMAT_UNSPECIFIED = 0; + /** + * JavaScript Object Notation. + * + * Generated from protobuf enum JSON = 1; + */ + const JSON = 1; + /** + * Protocol Buffers text format. See + * https://protobuf.dev/reference/protobuf/textformat-spec/ + * + * Generated from protobuf enum PROTO_TEXT = 2; + */ + const PROTO_TEXT = 2; + + private static $valueToName = [ + self::DATA_FORMAT_UNSPECIFIED => 'DATA_FORMAT_UNSPECIFIED', + self::JSON => 'JSON', + self::PROTO_TEXT => 'PROTO_TEXT', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/DistanceLimit.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/DistanceLimit.php new file mode 100644 index 000000000000..a2ec284f830a --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/DistanceLimit.php @@ -0,0 +1,284 @@ +google.maps.routeoptimization.v1.DistanceLimit + */ +class DistanceLimit extends \Google\Protobuf\Internal\Message +{ + /** + * A hard limit constraining the distance to be at most max_meters. The limit + * must be nonnegative. + * + * Generated from protobuf field optional int64 max_meters = 1; + */ + protected $max_meters = null; + /** + * A soft limit not enforcing a maximum distance limit, but when violated + * results in a cost which adds up to other costs defined in the model, + * with the same unit. + * If defined soft_max_meters must be less than max_meters and must be + * nonnegative. + * + * Generated from protobuf field optional int64 soft_max_meters = 2; + */ + protected $soft_max_meters = null; + /** + * Cost per kilometer incurred, increasing up to `soft_max_meters`, with + * formula: + * ``` + * min(distance_meters, soft_max_meters) / 1000.0 * + * cost_per_kilometer_below_soft_max. + * ``` + * This cost is not supported in `route_distance_limit`. + * + * Generated from protobuf field optional double cost_per_kilometer_below_soft_max = 4; + */ + protected $cost_per_kilometer_below_soft_max = null; + /** + * Cost per kilometer incurred if distance is above `soft_max_meters` limit. + * The additional cost is 0 if the distance is under the limit, otherwise the + * formula used to compute the cost is the following: + * ``` + * (distance_meters - soft_max_meters) / 1000.0 * + * cost_per_kilometer_above_soft_max. + * ``` + * The cost must be nonnegative. + * + * Generated from protobuf field optional double cost_per_kilometer_above_soft_max = 3; + */ + protected $cost_per_kilometer_above_soft_max = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $max_meters + * A hard limit constraining the distance to be at most max_meters. The limit + * must be nonnegative. + * @type int|string $soft_max_meters + * A soft limit not enforcing a maximum distance limit, but when violated + * results in a cost which adds up to other costs defined in the model, + * with the same unit. + * If defined soft_max_meters must be less than max_meters and must be + * nonnegative. + * @type float $cost_per_kilometer_below_soft_max + * Cost per kilometer incurred, increasing up to `soft_max_meters`, with + * formula: + * ``` + * min(distance_meters, soft_max_meters) / 1000.0 * + * cost_per_kilometer_below_soft_max. + * ``` + * This cost is not supported in `route_distance_limit`. + * @type float $cost_per_kilometer_above_soft_max + * Cost per kilometer incurred if distance is above `soft_max_meters` limit. + * The additional cost is 0 if the distance is under the limit, otherwise the + * formula used to compute the cost is the following: + * ``` + * (distance_meters - soft_max_meters) / 1000.0 * + * cost_per_kilometer_above_soft_max. + * ``` + * The cost must be nonnegative. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); + parent::__construct($data); + } + + /** + * A hard limit constraining the distance to be at most max_meters. The limit + * must be nonnegative. + * + * Generated from protobuf field optional int64 max_meters = 1; + * @return int|string + */ + public function getMaxMeters() + { + return isset($this->max_meters) ? $this->max_meters : 0; + } + + public function hasMaxMeters() + { + return isset($this->max_meters); + } + + public function clearMaxMeters() + { + unset($this->max_meters); + } + + /** + * A hard limit constraining the distance to be at most max_meters. The limit + * must be nonnegative. + * + * Generated from protobuf field optional int64 max_meters = 1; + * @param int|string $var + * @return $this + */ + public function setMaxMeters($var) + { + GPBUtil::checkInt64($var); + $this->max_meters = $var; + + return $this; + } + + /** + * A soft limit not enforcing a maximum distance limit, but when violated + * results in a cost which adds up to other costs defined in the model, + * with the same unit. + * If defined soft_max_meters must be less than max_meters and must be + * nonnegative. + * + * Generated from protobuf field optional int64 soft_max_meters = 2; + * @return int|string + */ + public function getSoftMaxMeters() + { + return isset($this->soft_max_meters) ? $this->soft_max_meters : 0; + } + + public function hasSoftMaxMeters() + { + return isset($this->soft_max_meters); + } + + public function clearSoftMaxMeters() + { + unset($this->soft_max_meters); + } + + /** + * A soft limit not enforcing a maximum distance limit, but when violated + * results in a cost which adds up to other costs defined in the model, + * with the same unit. + * If defined soft_max_meters must be less than max_meters and must be + * nonnegative. + * + * Generated from protobuf field optional int64 soft_max_meters = 2; + * @param int|string $var + * @return $this + */ + public function setSoftMaxMeters($var) + { + GPBUtil::checkInt64($var); + $this->soft_max_meters = $var; + + return $this; + } + + /** + * Cost per kilometer incurred, increasing up to `soft_max_meters`, with + * formula: + * ``` + * min(distance_meters, soft_max_meters) / 1000.0 * + * cost_per_kilometer_below_soft_max. + * ``` + * This cost is not supported in `route_distance_limit`. + * + * Generated from protobuf field optional double cost_per_kilometer_below_soft_max = 4; + * @return float + */ + public function getCostPerKilometerBelowSoftMax() + { + return isset($this->cost_per_kilometer_below_soft_max) ? $this->cost_per_kilometer_below_soft_max : 0.0; + } + + public function hasCostPerKilometerBelowSoftMax() + { + return isset($this->cost_per_kilometer_below_soft_max); + } + + public function clearCostPerKilometerBelowSoftMax() + { + unset($this->cost_per_kilometer_below_soft_max); + } + + /** + * Cost per kilometer incurred, increasing up to `soft_max_meters`, with + * formula: + * ``` + * min(distance_meters, soft_max_meters) / 1000.0 * + * cost_per_kilometer_below_soft_max. + * ``` + * This cost is not supported in `route_distance_limit`. + * + * Generated from protobuf field optional double cost_per_kilometer_below_soft_max = 4; + * @param float $var + * @return $this + */ + public function setCostPerKilometerBelowSoftMax($var) + { + GPBUtil::checkDouble($var); + $this->cost_per_kilometer_below_soft_max = $var; + + return $this; + } + + /** + * Cost per kilometer incurred if distance is above `soft_max_meters` limit. + * The additional cost is 0 if the distance is under the limit, otherwise the + * formula used to compute the cost is the following: + * ``` + * (distance_meters - soft_max_meters) / 1000.0 * + * cost_per_kilometer_above_soft_max. + * ``` + * The cost must be nonnegative. + * + * Generated from protobuf field optional double cost_per_kilometer_above_soft_max = 3; + * @return float + */ + public function getCostPerKilometerAboveSoftMax() + { + return isset($this->cost_per_kilometer_above_soft_max) ? $this->cost_per_kilometer_above_soft_max : 0.0; + } + + public function hasCostPerKilometerAboveSoftMax() + { + return isset($this->cost_per_kilometer_above_soft_max); + } + + public function clearCostPerKilometerAboveSoftMax() + { + unset($this->cost_per_kilometer_above_soft_max); + } + + /** + * Cost per kilometer incurred if distance is above `soft_max_meters` limit. + * The additional cost is 0 if the distance is under the limit, otherwise the + * formula used to compute the cost is the following: + * ``` + * (distance_meters - soft_max_meters) / 1000.0 * + * cost_per_kilometer_above_soft_max. + * ``` + * The cost must be nonnegative. + * + * Generated from protobuf field optional double cost_per_kilometer_above_soft_max = 3; + * @param float $var + * @return $this + */ + public function setCostPerKilometerAboveSoftMax($var) + { + GPBUtil::checkDouble($var); + $this->cost_per_kilometer_above_soft_max = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/GcsDestination.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/GcsDestination.php new file mode 100644 index 000000000000..593d35570a86 --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/GcsDestination.php @@ -0,0 +1,68 @@ +google.maps.routeoptimization.v1.GcsDestination + */ +class GcsDestination extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Google Cloud Storage URI. + * + * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $uri = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $uri + * Required. Google Cloud Storage URI. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Google Cloud Storage URI. + * + * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * Required. Google Cloud Storage URI. + * + * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setUri($var) + { + GPBUtil::checkString($var, True); + $this->uri = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/GcsSource.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/GcsSource.php new file mode 100644 index 000000000000..a4b7083b7252 --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/GcsSource.php @@ -0,0 +1,71 @@ +google.maps.routeoptimization.v1.GcsSource + */ +class GcsSource extends \Google\Protobuf\Internal\Message +{ + /** + * Required. URI of a Google Cloud Storage object with the format + * `gs://bucket/path/to/object`. + * + * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $uri = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $uri + * Required. URI of a Google Cloud Storage object with the format + * `gs://bucket/path/to/object`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. URI of a Google Cloud Storage object with the format + * `gs://bucket/path/to/object`. + * + * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * Required. URI of a Google Cloud Storage object with the format + * `gs://bucket/path/to/object`. + * + * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setUri($var) + { + GPBUtil::checkString($var, True); + $this->uri = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/InjectedSolutionConstraint.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/InjectedSolutionConstraint.php new file mode 100644 index 000000000000..bfb8197f0531 --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/InjectedSolutionConstraint.php @@ -0,0 +1,156 @@ +google.maps.routeoptimization.v1.InjectedSolutionConstraint + */ +class InjectedSolutionConstraint extends \Google\Protobuf\Internal\Message +{ + /** + * Routes of the solution to inject. Some routes may be omitted from the + * original solution. The routes and skipped shipments must satisfy the basic + * validity assumptions listed for `injected_first_solution_routes`. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentRoute routes = 1; + */ + private $routes; + /** + * Skipped shipments of the solution to inject. Some may be omitted from the + * original solution. See the `routes` field. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.SkippedShipment skipped_shipments = 2; + */ + private $skipped_shipments; + /** + * For zero or more groups of vehicles, specifies when and how much to relax + * constraints. If this field is empty, all non-empty vehicle routes are + * fully constrained. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.InjectedSolutionConstraint.ConstraintRelaxation constraint_relaxations = 3; + */ + private $constraint_relaxations; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Maps\RouteOptimization\V1\ShipmentRoute>|\Google\Protobuf\Internal\RepeatedField $routes + * Routes of the solution to inject. Some routes may be omitted from the + * original solution. The routes and skipped shipments must satisfy the basic + * validity assumptions listed for `injected_first_solution_routes`. + * @type array<\Google\Maps\RouteOptimization\V1\SkippedShipment>|\Google\Protobuf\Internal\RepeatedField $skipped_shipments + * Skipped shipments of the solution to inject. Some may be omitted from the + * original solution. See the `routes` field. + * @type array<\Google\Maps\RouteOptimization\V1\InjectedSolutionConstraint\ConstraintRelaxation>|\Google\Protobuf\Internal\RepeatedField $constraint_relaxations + * For zero or more groups of vehicles, specifies when and how much to relax + * constraints. If this field is empty, all non-empty vehicle routes are + * fully constrained. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); + parent::__construct($data); + } + + /** + * Routes of the solution to inject. Some routes may be omitted from the + * original solution. The routes and skipped shipments must satisfy the basic + * validity assumptions listed for `injected_first_solution_routes`. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentRoute routes = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRoutes() + { + return $this->routes; + } + + /** + * Routes of the solution to inject. Some routes may be omitted from the + * original solution. The routes and skipped shipments must satisfy the basic + * validity assumptions listed for `injected_first_solution_routes`. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentRoute routes = 1; + * @param array<\Google\Maps\RouteOptimization\V1\ShipmentRoute>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRoutes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\ShipmentRoute::class); + $this->routes = $arr; + + return $this; + } + + /** + * Skipped shipments of the solution to inject. Some may be omitted from the + * original solution. See the `routes` field. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.SkippedShipment skipped_shipments = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSkippedShipments() + { + return $this->skipped_shipments; + } + + /** + * Skipped shipments of the solution to inject. Some may be omitted from the + * original solution. See the `routes` field. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.SkippedShipment skipped_shipments = 2; + * @param array<\Google\Maps\RouteOptimization\V1\SkippedShipment>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSkippedShipments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\SkippedShipment::class); + $this->skipped_shipments = $arr; + + return $this; + } + + /** + * For zero or more groups of vehicles, specifies when and how much to relax + * constraints. If this field is empty, all non-empty vehicle routes are + * fully constrained. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.InjectedSolutionConstraint.ConstraintRelaxation constraint_relaxations = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getConstraintRelaxations() + { + return $this->constraint_relaxations; + } + + /** + * For zero or more groups of vehicles, specifies when and how much to relax + * constraints. If this field is empty, all non-empty vehicle routes are + * fully constrained. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.InjectedSolutionConstraint.ConstraintRelaxation constraint_relaxations = 3; + * @param array<\Google\Maps\RouteOptimization\V1\InjectedSolutionConstraint\ConstraintRelaxation>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setConstraintRelaxations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\InjectedSolutionConstraint\ConstraintRelaxation::class); + $this->constraint_relaxations = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/InjectedSolutionConstraint/ConstraintRelaxation.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/InjectedSolutionConstraint/ConstraintRelaxation.php new file mode 100644 index 000000000000..9f6a431bd350 --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/InjectedSolutionConstraint/ConstraintRelaxation.php @@ -0,0 +1,151 @@ +google.maps.routeoptimization.v1.InjectedSolutionConstraint.ConstraintRelaxation + */ +class ConstraintRelaxation extends \Google\Protobuf\Internal\Message +{ + /** + * All the visit constraint relaxations that will apply to visits on + * routes with vehicles in `vehicle_indices`. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.Relaxation relaxations = 1; + */ + private $relaxations; + /** + * Specifies the vehicle indices to which the visit constraint + * `relaxations` apply. If empty, this is considered the default and the + * `relaxations` apply to all vehicles that are not specified in other + * `constraint_relaxations`. There can be at most one default, i.e., at + * most one constraint relaxation field is allowed empty + * `vehicle_indices`. A vehicle index can only be listed once, even within + * several `constraint_relaxations`. + * A vehicle index is mapped the same as + * [ShipmentRoute.vehicle_index][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_index], + * if `interpret_injected_solutions_using_labels` is true (see `fields` + * comment). + * + * Generated from protobuf field repeated int32 vehicle_indices = 2; + */ + private $vehicle_indices; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Maps\RouteOptimization\V1\InjectedSolutionConstraint\ConstraintRelaxation\Relaxation>|\Google\Protobuf\Internal\RepeatedField $relaxations + * All the visit constraint relaxations that will apply to visits on + * routes with vehicles in `vehicle_indices`. + * @type array|\Google\Protobuf\Internal\RepeatedField $vehicle_indices + * Specifies the vehicle indices to which the visit constraint + * `relaxations` apply. If empty, this is considered the default and the + * `relaxations` apply to all vehicles that are not specified in other + * `constraint_relaxations`. There can be at most one default, i.e., at + * most one constraint relaxation field is allowed empty + * `vehicle_indices`. A vehicle index can only be listed once, even within + * several `constraint_relaxations`. + * A vehicle index is mapped the same as + * [ShipmentRoute.vehicle_index][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_index], + * if `interpret_injected_solutions_using_labels` is true (see `fields` + * comment). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); + parent::__construct($data); + } + + /** + * All the visit constraint relaxations that will apply to visits on + * routes with vehicles in `vehicle_indices`. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.Relaxation relaxations = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRelaxations() + { + return $this->relaxations; + } + + /** + * All the visit constraint relaxations that will apply to visits on + * routes with vehicles in `vehicle_indices`. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.Relaxation relaxations = 1; + * @param array<\Google\Maps\RouteOptimization\V1\InjectedSolutionConstraint\ConstraintRelaxation\Relaxation>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRelaxations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\InjectedSolutionConstraint\ConstraintRelaxation\Relaxation::class); + $this->relaxations = $arr; + + return $this; + } + + /** + * Specifies the vehicle indices to which the visit constraint + * `relaxations` apply. If empty, this is considered the default and the + * `relaxations` apply to all vehicles that are not specified in other + * `constraint_relaxations`. There can be at most one default, i.e., at + * most one constraint relaxation field is allowed empty + * `vehicle_indices`. A vehicle index can only be listed once, even within + * several `constraint_relaxations`. + * A vehicle index is mapped the same as + * [ShipmentRoute.vehicle_index][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_index], + * if `interpret_injected_solutions_using_labels` is true (see `fields` + * comment). + * + * Generated from protobuf field repeated int32 vehicle_indices = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getVehicleIndices() + { + return $this->vehicle_indices; + } + + /** + * Specifies the vehicle indices to which the visit constraint + * `relaxations` apply. If empty, this is considered the default and the + * `relaxations` apply to all vehicles that are not specified in other + * `constraint_relaxations`. There can be at most one default, i.e., at + * most one constraint relaxation field is allowed empty + * `vehicle_indices`. A vehicle index can only be listed once, even within + * several `constraint_relaxations`. + * A vehicle index is mapped the same as + * [ShipmentRoute.vehicle_index][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_index], + * if `interpret_injected_solutions_using_labels` is true (see `fields` + * comment). + * + * Generated from protobuf field repeated int32 vehicle_indices = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setVehicleIndices($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); + $this->vehicle_indices = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ConstraintRelaxation::class, \Google\Maps\RouteOptimization\V1\InjectedSolutionConstraint_ConstraintRelaxation::class); + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/InjectedSolutionConstraint/ConstraintRelaxation/Relaxation.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/InjectedSolutionConstraint/ConstraintRelaxation/Relaxation.php new file mode 100644 index 000000000000..f8cb219682a8 --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/InjectedSolutionConstraint/ConstraintRelaxation/Relaxation.php @@ -0,0 +1,204 @@ += relaxations(i).threshold_time` AND + * * `j + 1 >= relaxations(i).threshold_visit_count` + * Similarly, the vehicle start is relaxed to `relaxations(i).level` if it + * satisfies: + * * `vehicle_start_time >= relaxations(i).threshold_time` AND + * * `relaxations(i).threshold_visit_count == 0` + * and the vehicle end is relaxed to `relaxations(i).level` if it satisfies: + * * `vehicle_end_time >= relaxations(i).threshold_time` AND + * * `route.visits_size() + 1 >= relaxations(i).threshold_visit_count` + * To apply a relaxation level if a visit meets the `threshold_visit_count` + * OR the `threshold_time` add two `relaxations` with the same `level`: + * one with only `threshold_visit_count` set and the other with only + * `threshold_time` set. If a visit satisfies the conditions of multiple + * `relaxations`, the most relaxed level applies. As a result, from the + * vehicle start through the route visits in order to the vehicle end, the + * relaxation level becomes more relaxed: i.e., the relaxation level is + * non-decreasing as the route progresses. + * The timing and sequence of route visits that do not satisfy the + * threshold conditions of any `relaxations` are fully constrained + * and no visits may be inserted into these sequences. Also, if a + * vehicle start or end does not satisfy the conditions of any + * relaxation the time is fixed, unless the vehicle is empty. + * + * Generated from protobuf message google.maps.routeoptimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.Relaxation + */ +class Relaxation extends \Google\Protobuf\Internal\Message +{ + /** + * The constraint relaxation level that applies when the conditions + * at or after `threshold_time` AND at least `threshold_visit_count` are + * satisfied. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.Relaxation.Level level = 1; + */ + protected $level = 0; + /** + * The time at or after which the relaxation `level` may be applied. + * + * Generated from protobuf field .google.protobuf.Timestamp threshold_time = 2; + */ + protected $threshold_time = null; + /** + * The number of visits at or after which the relaxation `level` may be + * applied. If `threshold_visit_count` is 0 (or unset), the `level` may be + * applied directly at the vehicle start. + * If it is `route.visits_size() + 1`, the `level` may only be applied to + * the vehicle end. If it is more than `route.visits_size() + 1`, + * `level` is not applied at all for that route. + * + * Generated from protobuf field int32 threshold_visit_count = 3; + */ + protected $threshold_visit_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $level + * The constraint relaxation level that applies when the conditions + * at or after `threshold_time` AND at least `threshold_visit_count` are + * satisfied. + * @type \Google\Protobuf\Timestamp $threshold_time + * The time at or after which the relaxation `level` may be applied. + * @type int $threshold_visit_count + * The number of visits at or after which the relaxation `level` may be + * applied. If `threshold_visit_count` is 0 (or unset), the `level` may be + * applied directly at the vehicle start. + * If it is `route.visits_size() + 1`, the `level` may only be applied to + * the vehicle end. If it is more than `route.visits_size() + 1`, + * `level` is not applied at all for that route. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); + parent::__construct($data); + } + + /** + * The constraint relaxation level that applies when the conditions + * at or after `threshold_time` AND at least `threshold_visit_count` are + * satisfied. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.Relaxation.Level level = 1; + * @return int + */ + public function getLevel() + { + return $this->level; + } + + /** + * The constraint relaxation level that applies when the conditions + * at or after `threshold_time` AND at least `threshold_visit_count` are + * satisfied. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.Relaxation.Level level = 1; + * @param int $var + * @return $this + */ + public function setLevel($var) + { + GPBUtil::checkEnum($var, \Google\Maps\RouteOptimization\V1\InjectedSolutionConstraint\ConstraintRelaxation\Relaxation\Level::class); + $this->level = $var; + + return $this; + } + + /** + * The time at or after which the relaxation `level` may be applied. + * + * Generated from protobuf field .google.protobuf.Timestamp threshold_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getThresholdTime() + { + return $this->threshold_time; + } + + public function hasThresholdTime() + { + return isset($this->threshold_time); + } + + public function clearThresholdTime() + { + unset($this->threshold_time); + } + + /** + * The time at or after which the relaxation `level` may be applied. + * + * Generated from protobuf field .google.protobuf.Timestamp threshold_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setThresholdTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->threshold_time = $var; + + return $this; + } + + /** + * The number of visits at or after which the relaxation `level` may be + * applied. If `threshold_visit_count` is 0 (or unset), the `level` may be + * applied directly at the vehicle start. + * If it is `route.visits_size() + 1`, the `level` may only be applied to + * the vehicle end. If it is more than `route.visits_size() + 1`, + * `level` is not applied at all for that route. + * + * Generated from protobuf field int32 threshold_visit_count = 3; + * @return int + */ + public function getThresholdVisitCount() + { + return $this->threshold_visit_count; + } + + /** + * The number of visits at or after which the relaxation `level` may be + * applied. If `threshold_visit_count` is 0 (or unset), the `level` may be + * applied directly at the vehicle start. + * If it is `route.visits_size() + 1`, the `level` may only be applied to + * the vehicle end. If it is more than `route.visits_size() + 1`, + * `level` is not applied at all for that route. + * + * Generated from protobuf field int32 threshold_visit_count = 3; + * @param int $var + * @return $this + */ + public function setThresholdVisitCount($var) + { + GPBUtil::checkInt32($var); + $this->threshold_visit_count = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Relaxation::class, \Google\Maps\RouteOptimization\V1\InjectedSolutionConstraint_ConstraintRelaxation_Relaxation::class); + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/InjectedSolutionConstraint/ConstraintRelaxation/Relaxation/Level.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/InjectedSolutionConstraint/ConstraintRelaxation/Relaxation/Level.php new file mode 100644 index 000000000000..718a0dba2366 --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/InjectedSolutionConstraint/ConstraintRelaxation/Relaxation/Level.php @@ -0,0 +1,83 @@ +google.maps.routeoptimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.Relaxation.Level + */ +class Level +{ + /** + * Implicit default relaxation level: no constraints are relaxed, + * i.e., all visits are fully constrained. + * This value must not be explicitly used in `level`. + * + * Generated from protobuf enum LEVEL_UNSPECIFIED = 0; + */ + const LEVEL_UNSPECIFIED = 0; + /** + * Visit start times and vehicle start/end times will be relaxed, but + * each visit remains bound to the same vehicle and the visit sequence + * must be observed: no visit can be inserted between them or before + * them. + * + * Generated from protobuf enum RELAX_VISIT_TIMES_AFTER_THRESHOLD = 1; + */ + const RELAX_VISIT_TIMES_AFTER_THRESHOLD = 1; + /** + * Same as `RELAX_VISIT_TIMES_AFTER_THRESHOLD`, but the visit sequence + * is also relaxed: visits can only be performed by this vehicle, but + * can potentially become unperformed. + * + * Generated from protobuf enum RELAX_VISIT_TIMES_AND_SEQUENCE_AFTER_THRESHOLD = 2; + */ + const RELAX_VISIT_TIMES_AND_SEQUENCE_AFTER_THRESHOLD = 2; + /** + * Same as `RELAX_VISIT_TIMES_AND_SEQUENCE_AFTER_THRESHOLD`, but the + * vehicle is also relaxed: visits are completely free at or after the + * threshold time and can potentially become unperformed. + * + * Generated from protobuf enum RELAX_ALL_AFTER_THRESHOLD = 3; + */ + const RELAX_ALL_AFTER_THRESHOLD = 3; + + private static $valueToName = [ + self::LEVEL_UNSPECIFIED => 'LEVEL_UNSPECIFIED', + self::RELAX_VISIT_TIMES_AFTER_THRESHOLD => 'RELAX_VISIT_TIMES_AFTER_THRESHOLD', + self::RELAX_VISIT_TIMES_AND_SEQUENCE_AFTER_THRESHOLD => 'RELAX_VISIT_TIMES_AND_SEQUENCE_AFTER_THRESHOLD', + self::RELAX_ALL_AFTER_THRESHOLD => 'RELAX_ALL_AFTER_THRESHOLD', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Level::class, \Google\Maps\RouteOptimization\V1\InjectedSolutionConstraint_ConstraintRelaxation_Relaxation_Level::class); + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/InputConfig.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/InputConfig.php new file mode 100644 index 000000000000..1ce8d31e1dbd --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/InputConfig.php @@ -0,0 +1,110 @@ +google.maps.routeoptimization.v1.InputConfig + */ +class InputConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The input data format. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.DataFormat data_format = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $data_format = 0; + protected $source; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Maps\RouteOptimization\V1\GcsSource $gcs_source + * A Google Cloud Storage location. This must be a single object (file). + * @type int $data_format + * Required. The input data format. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); + parent::__construct($data); + } + + /** + * A Google Cloud Storage location. This must be a single object (file). + * + * Generated from protobuf field .google.maps.routeoptimization.v1.GcsSource gcs_source = 1; + * @return \Google\Maps\RouteOptimization\V1\GcsSource|null + */ + public function getGcsSource() + { + return $this->readOneof(1); + } + + public function hasGcsSource() + { + return $this->hasOneof(1); + } + + /** + * A Google Cloud Storage location. This must be a single object (file). + * + * Generated from protobuf field .google.maps.routeoptimization.v1.GcsSource gcs_source = 1; + * @param \Google\Maps\RouteOptimization\V1\GcsSource $var + * @return $this + */ + public function setGcsSource($var) + { + GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\GcsSource::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Required. The input data format. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.DataFormat data_format = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getDataFormat() + { + return $this->data_format; + } + + /** + * Required. The input data format. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.DataFormat data_format = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setDataFormat($var) + { + GPBUtil::checkEnum($var, \Google\Maps\RouteOptimization\V1\DataFormat::class); + $this->data_format = $var; + + return $this; + } + + /** + * @return string + */ + public function getSource() + { + return $this->whichOneof("source"); + } + +} + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Location.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Location.php new file mode 100644 index 000000000000..fd6c1e3bb48d --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Location.php @@ -0,0 +1,133 @@ +google.maps.routeoptimization.v1.Location + */ +class Location extends \Google\Protobuf\Internal\Message +{ + /** + * The waypoint's geographic coordinates. + * + * Generated from protobuf field .google.type.LatLng lat_lng = 1; + */ + protected $lat_lng = null; + /** + * The compass heading associated with the direction of the flow of traffic. + * This value is used to specify the side of the road to use for pickup and + * drop-off. Heading values can be from 0 to 360, where 0 specifies a heading + * of due North, 90 specifies a heading of due East, etc. + * + * Generated from protobuf field optional int32 heading = 2; + */ + protected $heading = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Type\LatLng $lat_lng + * The waypoint's geographic coordinates. + * @type int $heading + * The compass heading associated with the direction of the flow of traffic. + * This value is used to specify the side of the road to use for pickup and + * drop-off. Heading values can be from 0 to 360, where 0 specifies a heading + * of due North, 90 specifies a heading of due East, etc. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); + parent::__construct($data); + } + + /** + * The waypoint's geographic coordinates. + * + * Generated from protobuf field .google.type.LatLng lat_lng = 1; + * @return \Google\Type\LatLng|null + */ + public function getLatLng() + { + return $this->lat_lng; + } + + public function hasLatLng() + { + return isset($this->lat_lng); + } + + public function clearLatLng() + { + unset($this->lat_lng); + } + + /** + * The waypoint's geographic coordinates. + * + * Generated from protobuf field .google.type.LatLng lat_lng = 1; + * @param \Google\Type\LatLng $var + * @return $this + */ + public function setLatLng($var) + { + GPBUtil::checkMessage($var, \Google\Type\LatLng::class); + $this->lat_lng = $var; + + return $this; + } + + /** + * The compass heading associated with the direction of the flow of traffic. + * This value is used to specify the side of the road to use for pickup and + * drop-off. Heading values can be from 0 to 360, where 0 specifies a heading + * of due North, 90 specifies a heading of due East, etc. + * + * Generated from protobuf field optional int32 heading = 2; + * @return int + */ + public function getHeading() + { + return isset($this->heading) ? $this->heading : 0; + } + + public function hasHeading() + { + return isset($this->heading); + } + + public function clearHeading() + { + unset($this->heading); + } + + /** + * The compass heading associated with the direction of the flow of traffic. + * This value is used to specify the side of the road to use for pickup and + * drop-off. Heading values can be from 0 to 360, where 0 specifies a heading + * of due North, 90 specifies a heading of due East, etc. + * + * Generated from protobuf field optional int32 heading = 2; + * @param int $var + * @return $this + */ + public function setHeading($var) + { + GPBUtil::checkInt32($var); + $this->heading = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursRequest.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursRequest.php new file mode 100644 index 000000000000..a7a94c081cf6 --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursRequest.php @@ -0,0 +1,1178 @@ +google.maps.routeoptimization.v1.OptimizeToursRequest + */ +class OptimizeToursRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Target project or location to make a call. + * Format: + * * `projects/{project-id}` + * * `projects/{project-id}/locations/{location-id}` + * If no location is specified, a region will be chosen automatically. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $parent = ''; + /** + * If this timeout is set, the server returns a response before the timeout + * period has elapsed or the server deadline for synchronous requests is + * reached, whichever is sooner. + * For asynchronous requests, the server will generate a solution (if + * possible) before the timeout has elapsed. + * + * Generated from protobuf field .google.protobuf.Duration timeout = 2; + */ + protected $timeout = null; + /** + * Shipment model to solve. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.ShipmentModel model = 3; + */ + protected $model = null; + /** + * By default, the solving mode is `DEFAULT_SOLVE` (0). + * + * Generated from protobuf field .google.maps.routeoptimization.v1.OptimizeToursRequest.SolvingMode solving_mode = 4; + */ + protected $solving_mode = 0; + /** + * Search mode used to solve the request. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.OptimizeToursRequest.SearchMode search_mode = 6; + */ + protected $search_mode = 0; + /** + * Guide the optimization algorithm in finding a first solution that is + * similar to a previous solution. + * The model is constrained when the first solution is built. + * Any shipments not performed on a route are implicitly skipped in the first + * solution, but they may be performed in successive solutions. + * The solution must satisfy some basic validity assumptions: + * * for all routes, `vehicle_index` must be in range and not be duplicated. + * * for all visits, `shipment_index` and `visit_request_index` must be + * in range. + * * a shipment may only be referenced on one route. + * * the pickup of a pickup-delivery shipment must be performed before + * the delivery. + * * no more than one pickup alternative or delivery alternative of + * a shipment may be performed. + * * for all routes, times are increasing (i.e., `vehicle_start_time + * <= visits[0].start_time <= visits[1].start_time ... + * <= vehicle_end_time`). + * * a shipment may only be performed on a vehicle that is allowed. A + * vehicle is allowed if + * [Shipment.allowed_vehicle_indices][google.maps.routeoptimization.v1.Shipment.allowed_vehicle_indices] + * is empty or its `vehicle_index` is included in + * [Shipment.allowed_vehicle_indices][google.maps.routeoptimization.v1.Shipment.allowed_vehicle_indices]. + * If the injected solution is not feasible, a validation error is not + * necessarily returned and an error indicating infeasibility may be returned + * instead. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentRoute injected_first_solution_routes = 7; + */ + private $injected_first_solution_routes; + /** + * Constrain the optimization algorithm to find a final solution that is + * similar to a previous solution. For example, this may be used to freeze + * portions of routes which have already been completed or which are to be + * completed but must not be modified. + * If the injected solution is not feasible, a validation error is not + * necessarily returned and an error indicating infeasibility may be returned + * instead. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.InjectedSolutionConstraint injected_solution_constraint = 8; + */ + protected $injected_solution_constraint = null; + /** + * If non-empty, the given routes will be refreshed, without modifying their + * underlying sequence of visits or travel times: only other details will be + * updated. This does not solve the model. + * As of 2020/11, this only populates the polylines of non-empty routes and + * requires that `populate_polylines` is true. + * The `route_polyline` fields of the passed-in routes may be inconsistent + * with route `transitions`. + * This field must not be used together with `injected_first_solution_routes` + * or `injected_solution_constraint`. + * `Shipment.ignore` and `Vehicle.ignore` have no effect on the behavior. + * Polylines are still populated between all visits in all non-empty routes + * regardless of whether the related shipments or vehicles are ignored. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentRoute refresh_details_routes = 9; + */ + private $refresh_details_routes; + /** + * If true: + * * uses + * [ShipmentRoute.vehicle_label][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_label] + * instead of `vehicle_index` to + * match routes in an injected solution with vehicles in the request; + * reuses the mapping of original + * [ShipmentRoute.vehicle_index][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_index] + * to new + * [ShipmentRoute.vehicle_index][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_index] + * to update + * [ConstraintRelaxation.vehicle_indices][google.maps.routeoptimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.vehicle_indices] + * if non-empty, but the mapping must be unambiguous (i.e., multiple + * `ShipmentRoute`s must not share the same original `vehicle_index`). + * * uses + * [ShipmentRoute.Visit.shipment_label][google.maps.routeoptimization.v1.ShipmentRoute.Visit.shipment_label] + * instead of `shipment_index` + * to match visits in an injected solution with shipments in the request; + * * uses + * [SkippedShipment.label][google.maps.routeoptimization.v1.SkippedShipment.label] + * instead of + * [SkippedShipment.index][google.maps.routeoptimization.v1.SkippedShipment.index] + * to + * match skipped shipments in the injected solution with request + * shipments. + * This interpretation applies to the `injected_first_solution_routes`, + * `injected_solution_constraint`, and `refresh_details_routes` fields. + * It can be used when shipment or vehicle indices in the request have + * changed since the solution was created, perhaps because shipments or + * vehicles have been removed from or added to the request. + * If true, labels in the following categories must appear at most once in + * their category: + * * [Vehicle.label][google.maps.routeoptimization.v1.Vehicle.label] in the + * request; + * * [Shipment.label][google.maps.routeoptimization.v1.Shipment.label] in + * the request; + * * [ShipmentRoute.vehicle_label][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_label] in the injected solution; + * * [SkippedShipment.label][google.maps.routeoptimization.v1.SkippedShipment.label] and [ShipmentRoute.Visit.shipment_label][google.maps.routeoptimization.v1.ShipmentRoute.Visit.shipment_label] in + * the injected solution (except pickup/delivery visit pairs, whose + * `shipment_label` must appear twice). + * If a `vehicle_label` in the injected solution does not correspond to a + * request vehicle, the corresponding route is removed from the solution + * along with its visits. If a `shipment_label` in the injected solution does + * not correspond to a request shipment, the corresponding visit is removed + * from the solution. If a + * [SkippedShipment.label][google.maps.routeoptimization.v1.SkippedShipment.label] + * in the injected solution does not correspond to a request shipment, the + * `SkippedShipment` is removed from the solution. + * Removing route visits or entire routes from an injected solution may + * have an effect on the implied constraints, which may lead to change in + * solution, validation errors, or infeasibility. + * NOTE: The caller must ensure that each + * [Vehicle.label][google.maps.routeoptimization.v1.Vehicle.label] (resp. + * [Shipment.label][google.maps.routeoptimization.v1.Shipment.label]) uniquely + * identifies a vehicle (resp. shipment) entity used across the two relevant + * requests: the past request that produced the `OptimizeToursResponse` used + * in the injected solution and the current request that includes the injected + * solution. The uniqueness checks described above are not enough to guarantee + * this requirement. + * + * Generated from protobuf field bool interpret_injected_solutions_using_labels = 10; + */ + protected $interpret_injected_solutions_using_labels = false; + /** + * Consider traffic estimation in calculating `ShipmentRoute` fields + * [Transition.travel_duration][google.maps.routeoptimization.v1.ShipmentRoute.Transition.travel_duration], + * [Visit.start_time][google.maps.routeoptimization.v1.ShipmentRoute.Visit.start_time], + * and `vehicle_end_time`; in setting the + * [ShipmentRoute.has_traffic_infeasibilities][google.maps.routeoptimization.v1.ShipmentRoute.has_traffic_infeasibilities] + * field, and in calculating the + * [OptimizeToursResponse.total_cost][google.maps.routeoptimization.v1.OptimizeToursResponse.total_cost] + * field. + * + * Generated from protobuf field bool consider_road_traffic = 11; + */ + protected $consider_road_traffic = false; + /** + * If true, polylines will be populated in response `ShipmentRoute`s. + * + * Generated from protobuf field bool populate_polylines = 12; + */ + protected $populate_polylines = false; + /** + * If true, polylines and route tokens will be populated in response + * [ShipmentRoute.transitions][google.maps.routeoptimization.v1.ShipmentRoute.transitions]. + * + * Generated from protobuf field bool populate_transition_polylines = 13; + */ + protected $populate_transition_polylines = false; + /** + * If this is set, then the request can have a deadline + * (see https://grpc.io/blog/deadlines) of up to 60 minutes. + * Otherwise, the maximum deadline is only 30 minutes. + * Note that long-lived requests have a significantly larger (but still small) + * risk of interruption. + * + * Generated from protobuf field bool allow_large_deadline_despite_interruption_risk = 14; + */ + protected $allow_large_deadline_despite_interruption_risk = false; + /** + * If true, travel distances will be computed using geodesic distances instead + * of Google Maps distances, and travel times will be computed using geodesic + * distances with a speed defined by `geodesic_meters_per_second`. + * + * Generated from protobuf field bool use_geodesic_distances = 15; + */ + protected $use_geodesic_distances = false; + /** + * When `use_geodesic_distances` is true, this field must be set and defines + * the speed applied to compute travel times. Its value must be at least 1.0 + * meters/seconds. + * + * Generated from protobuf field optional double geodesic_meters_per_second = 16; + */ + protected $geodesic_meters_per_second = null; + /** + * Truncates the number of validation errors returned. These errors are + * typically attached to an INVALID_ARGUMENT error payload as a BadRequest + * error detail (https://cloud.google.com/apis/design/errors#error_details), + * unless solving_mode=VALIDATE_ONLY: see the + * [OptimizeToursResponse.validation_errors][google.maps.routeoptimization.v1.OptimizeToursResponse.validation_errors] + * field. + * This defaults to 100 and is capped at 10,000. + * + * Generated from protobuf field optional int32 max_validation_errors = 5; + */ + protected $max_validation_errors = null; + /** + * Label that may be used to identify this request, reported back in the + * [OptimizeToursResponse.request_label][google.maps.routeoptimization.v1.OptimizeToursResponse.request_label]. + * + * Generated from protobuf field string label = 17; + */ + protected $label = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Target project or location to make a call. + * Format: + * * `projects/{project-id}` + * * `projects/{project-id}/locations/{location-id}` + * If no location is specified, a region will be chosen automatically. + * @type \Google\Protobuf\Duration $timeout + * If this timeout is set, the server returns a response before the timeout + * period has elapsed or the server deadline for synchronous requests is + * reached, whichever is sooner. + * For asynchronous requests, the server will generate a solution (if + * possible) before the timeout has elapsed. + * @type \Google\Maps\RouteOptimization\V1\ShipmentModel $model + * Shipment model to solve. + * @type int $solving_mode + * By default, the solving mode is `DEFAULT_SOLVE` (0). + * @type int $search_mode + * Search mode used to solve the request. + * @type array<\Google\Maps\RouteOptimization\V1\ShipmentRoute>|\Google\Protobuf\Internal\RepeatedField $injected_first_solution_routes + * Guide the optimization algorithm in finding a first solution that is + * similar to a previous solution. + * The model is constrained when the first solution is built. + * Any shipments not performed on a route are implicitly skipped in the first + * solution, but they may be performed in successive solutions. + * The solution must satisfy some basic validity assumptions: + * * for all routes, `vehicle_index` must be in range and not be duplicated. + * * for all visits, `shipment_index` and `visit_request_index` must be + * in range. + * * a shipment may only be referenced on one route. + * * the pickup of a pickup-delivery shipment must be performed before + * the delivery. + * * no more than one pickup alternative or delivery alternative of + * a shipment may be performed. + * * for all routes, times are increasing (i.e., `vehicle_start_time + * <= visits[0].start_time <= visits[1].start_time ... + * <= vehicle_end_time`). + * * a shipment may only be performed on a vehicle that is allowed. A + * vehicle is allowed if + * [Shipment.allowed_vehicle_indices][google.maps.routeoptimization.v1.Shipment.allowed_vehicle_indices] + * is empty or its `vehicle_index` is included in + * [Shipment.allowed_vehicle_indices][google.maps.routeoptimization.v1.Shipment.allowed_vehicle_indices]. + * If the injected solution is not feasible, a validation error is not + * necessarily returned and an error indicating infeasibility may be returned + * instead. + * @type \Google\Maps\RouteOptimization\V1\InjectedSolutionConstraint $injected_solution_constraint + * Constrain the optimization algorithm to find a final solution that is + * similar to a previous solution. For example, this may be used to freeze + * portions of routes which have already been completed or which are to be + * completed but must not be modified. + * If the injected solution is not feasible, a validation error is not + * necessarily returned and an error indicating infeasibility may be returned + * instead. + * @type array<\Google\Maps\RouteOptimization\V1\ShipmentRoute>|\Google\Protobuf\Internal\RepeatedField $refresh_details_routes + * If non-empty, the given routes will be refreshed, without modifying their + * underlying sequence of visits or travel times: only other details will be + * updated. This does not solve the model. + * As of 2020/11, this only populates the polylines of non-empty routes and + * requires that `populate_polylines` is true. + * The `route_polyline` fields of the passed-in routes may be inconsistent + * with route `transitions`. + * This field must not be used together with `injected_first_solution_routes` + * or `injected_solution_constraint`. + * `Shipment.ignore` and `Vehicle.ignore` have no effect on the behavior. + * Polylines are still populated between all visits in all non-empty routes + * regardless of whether the related shipments or vehicles are ignored. + * @type bool $interpret_injected_solutions_using_labels + * If true: + * * uses + * [ShipmentRoute.vehicle_label][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_label] + * instead of `vehicle_index` to + * match routes in an injected solution with vehicles in the request; + * reuses the mapping of original + * [ShipmentRoute.vehicle_index][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_index] + * to new + * [ShipmentRoute.vehicle_index][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_index] + * to update + * [ConstraintRelaxation.vehicle_indices][google.maps.routeoptimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.vehicle_indices] + * if non-empty, but the mapping must be unambiguous (i.e., multiple + * `ShipmentRoute`s must not share the same original `vehicle_index`). + * * uses + * [ShipmentRoute.Visit.shipment_label][google.maps.routeoptimization.v1.ShipmentRoute.Visit.shipment_label] + * instead of `shipment_index` + * to match visits in an injected solution with shipments in the request; + * * uses + * [SkippedShipment.label][google.maps.routeoptimization.v1.SkippedShipment.label] + * instead of + * [SkippedShipment.index][google.maps.routeoptimization.v1.SkippedShipment.index] + * to + * match skipped shipments in the injected solution with request + * shipments. + * This interpretation applies to the `injected_first_solution_routes`, + * `injected_solution_constraint`, and `refresh_details_routes` fields. + * It can be used when shipment or vehicle indices in the request have + * changed since the solution was created, perhaps because shipments or + * vehicles have been removed from or added to the request. + * If true, labels in the following categories must appear at most once in + * their category: + * * [Vehicle.label][google.maps.routeoptimization.v1.Vehicle.label] in the + * request; + * * [Shipment.label][google.maps.routeoptimization.v1.Shipment.label] in + * the request; + * * [ShipmentRoute.vehicle_label][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_label] in the injected solution; + * * [SkippedShipment.label][google.maps.routeoptimization.v1.SkippedShipment.label] and [ShipmentRoute.Visit.shipment_label][google.maps.routeoptimization.v1.ShipmentRoute.Visit.shipment_label] in + * the injected solution (except pickup/delivery visit pairs, whose + * `shipment_label` must appear twice). + * If a `vehicle_label` in the injected solution does not correspond to a + * request vehicle, the corresponding route is removed from the solution + * along with its visits. If a `shipment_label` in the injected solution does + * not correspond to a request shipment, the corresponding visit is removed + * from the solution. If a + * [SkippedShipment.label][google.maps.routeoptimization.v1.SkippedShipment.label] + * in the injected solution does not correspond to a request shipment, the + * `SkippedShipment` is removed from the solution. + * Removing route visits or entire routes from an injected solution may + * have an effect on the implied constraints, which may lead to change in + * solution, validation errors, or infeasibility. + * NOTE: The caller must ensure that each + * [Vehicle.label][google.maps.routeoptimization.v1.Vehicle.label] (resp. + * [Shipment.label][google.maps.routeoptimization.v1.Shipment.label]) uniquely + * identifies a vehicle (resp. shipment) entity used across the two relevant + * requests: the past request that produced the `OptimizeToursResponse` used + * in the injected solution and the current request that includes the injected + * solution. The uniqueness checks described above are not enough to guarantee + * this requirement. + * @type bool $consider_road_traffic + * Consider traffic estimation in calculating `ShipmentRoute` fields + * [Transition.travel_duration][google.maps.routeoptimization.v1.ShipmentRoute.Transition.travel_duration], + * [Visit.start_time][google.maps.routeoptimization.v1.ShipmentRoute.Visit.start_time], + * and `vehicle_end_time`; in setting the + * [ShipmentRoute.has_traffic_infeasibilities][google.maps.routeoptimization.v1.ShipmentRoute.has_traffic_infeasibilities] + * field, and in calculating the + * [OptimizeToursResponse.total_cost][google.maps.routeoptimization.v1.OptimizeToursResponse.total_cost] + * field. + * @type bool $populate_polylines + * If true, polylines will be populated in response `ShipmentRoute`s. + * @type bool $populate_transition_polylines + * If true, polylines and route tokens will be populated in response + * [ShipmentRoute.transitions][google.maps.routeoptimization.v1.ShipmentRoute.transitions]. + * @type bool $allow_large_deadline_despite_interruption_risk + * If this is set, then the request can have a deadline + * (see https://grpc.io/blog/deadlines) of up to 60 minutes. + * Otherwise, the maximum deadline is only 30 minutes. + * Note that long-lived requests have a significantly larger (but still small) + * risk of interruption. + * @type bool $use_geodesic_distances + * If true, travel distances will be computed using geodesic distances instead + * of Google Maps distances, and travel times will be computed using geodesic + * distances with a speed defined by `geodesic_meters_per_second`. + * @type float $geodesic_meters_per_second + * When `use_geodesic_distances` is true, this field must be set and defines + * the speed applied to compute travel times. Its value must be at least 1.0 + * meters/seconds. + * @type int $max_validation_errors + * Truncates the number of validation errors returned. These errors are + * typically attached to an INVALID_ARGUMENT error payload as a BadRequest + * error detail (https://cloud.google.com/apis/design/errors#error_details), + * unless solving_mode=VALIDATE_ONLY: see the + * [OptimizeToursResponse.validation_errors][google.maps.routeoptimization.v1.OptimizeToursResponse.validation_errors] + * field. + * This defaults to 100 and is capped at 10,000. + * @type string $label + * Label that may be used to identify this request, reported back in the + * [OptimizeToursResponse.request_label][google.maps.routeoptimization.v1.OptimizeToursResponse.request_label]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Target project or location to make a call. + * Format: + * * `projects/{project-id}` + * * `projects/{project-id}/locations/{location-id}` + * If no location is specified, a region will be chosen automatically. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Target project or location to make a call. + * Format: + * * `projects/{project-id}` + * * `projects/{project-id}/locations/{location-id}` + * If no location is specified, a region will be chosen automatically. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * If this timeout is set, the server returns a response before the timeout + * period has elapsed or the server deadline for synchronous requests is + * reached, whichever is sooner. + * For asynchronous requests, the server will generate a solution (if + * possible) before the timeout has elapsed. + * + * Generated from protobuf field .google.protobuf.Duration timeout = 2; + * @return \Google\Protobuf\Duration|null + */ + public function getTimeout() + { + return $this->timeout; + } + + public function hasTimeout() + { + return isset($this->timeout); + } + + public function clearTimeout() + { + unset($this->timeout); + } + + /** + * If this timeout is set, the server returns a response before the timeout + * period has elapsed or the server deadline for synchronous requests is + * reached, whichever is sooner. + * For asynchronous requests, the server will generate a solution (if + * possible) before the timeout has elapsed. + * + * Generated from protobuf field .google.protobuf.Duration timeout = 2; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setTimeout($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->timeout = $var; + + return $this; + } + + /** + * Shipment model to solve. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.ShipmentModel model = 3; + * @return \Google\Maps\RouteOptimization\V1\ShipmentModel|null + */ + public function getModel() + { + return $this->model; + } + + public function hasModel() + { + return isset($this->model); + } + + public function clearModel() + { + unset($this->model); + } + + /** + * Shipment model to solve. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.ShipmentModel model = 3; + * @param \Google\Maps\RouteOptimization\V1\ShipmentModel $var + * @return $this + */ + public function setModel($var) + { + GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\ShipmentModel::class); + $this->model = $var; + + return $this; + } + + /** + * By default, the solving mode is `DEFAULT_SOLVE` (0). + * + * Generated from protobuf field .google.maps.routeoptimization.v1.OptimizeToursRequest.SolvingMode solving_mode = 4; + * @return int + */ + public function getSolvingMode() + { + return $this->solving_mode; + } + + /** + * By default, the solving mode is `DEFAULT_SOLVE` (0). + * + * Generated from protobuf field .google.maps.routeoptimization.v1.OptimizeToursRequest.SolvingMode solving_mode = 4; + * @param int $var + * @return $this + */ + public function setSolvingMode($var) + { + GPBUtil::checkEnum($var, \Google\Maps\RouteOptimization\V1\OptimizeToursRequest\SolvingMode::class); + $this->solving_mode = $var; + + return $this; + } + + /** + * Search mode used to solve the request. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.OptimizeToursRequest.SearchMode search_mode = 6; + * @return int + */ + public function getSearchMode() + { + return $this->search_mode; + } + + /** + * Search mode used to solve the request. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.OptimizeToursRequest.SearchMode search_mode = 6; + * @param int $var + * @return $this + */ + public function setSearchMode($var) + { + GPBUtil::checkEnum($var, \Google\Maps\RouteOptimization\V1\OptimizeToursRequest\SearchMode::class); + $this->search_mode = $var; + + return $this; + } + + /** + * Guide the optimization algorithm in finding a first solution that is + * similar to a previous solution. + * The model is constrained when the first solution is built. + * Any shipments not performed on a route are implicitly skipped in the first + * solution, but they may be performed in successive solutions. + * The solution must satisfy some basic validity assumptions: + * * for all routes, `vehicle_index` must be in range and not be duplicated. + * * for all visits, `shipment_index` and `visit_request_index` must be + * in range. + * * a shipment may only be referenced on one route. + * * the pickup of a pickup-delivery shipment must be performed before + * the delivery. + * * no more than one pickup alternative or delivery alternative of + * a shipment may be performed. + * * for all routes, times are increasing (i.e., `vehicle_start_time + * <= visits[0].start_time <= visits[1].start_time ... + * <= vehicle_end_time`). + * * a shipment may only be performed on a vehicle that is allowed. A + * vehicle is allowed if + * [Shipment.allowed_vehicle_indices][google.maps.routeoptimization.v1.Shipment.allowed_vehicle_indices] + * is empty or its `vehicle_index` is included in + * [Shipment.allowed_vehicle_indices][google.maps.routeoptimization.v1.Shipment.allowed_vehicle_indices]. + * If the injected solution is not feasible, a validation error is not + * necessarily returned and an error indicating infeasibility may be returned + * instead. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentRoute injected_first_solution_routes = 7; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getInjectedFirstSolutionRoutes() + { + return $this->injected_first_solution_routes; + } + + /** + * Guide the optimization algorithm in finding a first solution that is + * similar to a previous solution. + * The model is constrained when the first solution is built. + * Any shipments not performed on a route are implicitly skipped in the first + * solution, but they may be performed in successive solutions. + * The solution must satisfy some basic validity assumptions: + * * for all routes, `vehicle_index` must be in range and not be duplicated. + * * for all visits, `shipment_index` and `visit_request_index` must be + * in range. + * * a shipment may only be referenced on one route. + * * the pickup of a pickup-delivery shipment must be performed before + * the delivery. + * * no more than one pickup alternative or delivery alternative of + * a shipment may be performed. + * * for all routes, times are increasing (i.e., `vehicle_start_time + * <= visits[0].start_time <= visits[1].start_time ... + * <= vehicle_end_time`). + * * a shipment may only be performed on a vehicle that is allowed. A + * vehicle is allowed if + * [Shipment.allowed_vehicle_indices][google.maps.routeoptimization.v1.Shipment.allowed_vehicle_indices] + * is empty or its `vehicle_index` is included in + * [Shipment.allowed_vehicle_indices][google.maps.routeoptimization.v1.Shipment.allowed_vehicle_indices]. + * If the injected solution is not feasible, a validation error is not + * necessarily returned and an error indicating infeasibility may be returned + * instead. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentRoute injected_first_solution_routes = 7; + * @param array<\Google\Maps\RouteOptimization\V1\ShipmentRoute>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setInjectedFirstSolutionRoutes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\ShipmentRoute::class); + $this->injected_first_solution_routes = $arr; + + return $this; + } + + /** + * Constrain the optimization algorithm to find a final solution that is + * similar to a previous solution. For example, this may be used to freeze + * portions of routes which have already been completed or which are to be + * completed but must not be modified. + * If the injected solution is not feasible, a validation error is not + * necessarily returned and an error indicating infeasibility may be returned + * instead. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.InjectedSolutionConstraint injected_solution_constraint = 8; + * @return \Google\Maps\RouteOptimization\V1\InjectedSolutionConstraint|null + */ + public function getInjectedSolutionConstraint() + { + return $this->injected_solution_constraint; + } + + public function hasInjectedSolutionConstraint() + { + return isset($this->injected_solution_constraint); + } + + public function clearInjectedSolutionConstraint() + { + unset($this->injected_solution_constraint); + } + + /** + * Constrain the optimization algorithm to find a final solution that is + * similar to a previous solution. For example, this may be used to freeze + * portions of routes which have already been completed or which are to be + * completed but must not be modified. + * If the injected solution is not feasible, a validation error is not + * necessarily returned and an error indicating infeasibility may be returned + * instead. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.InjectedSolutionConstraint injected_solution_constraint = 8; + * @param \Google\Maps\RouteOptimization\V1\InjectedSolutionConstraint $var + * @return $this + */ + public function setInjectedSolutionConstraint($var) + { + GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\InjectedSolutionConstraint::class); + $this->injected_solution_constraint = $var; + + return $this; + } + + /** + * If non-empty, the given routes will be refreshed, without modifying their + * underlying sequence of visits or travel times: only other details will be + * updated. This does not solve the model. + * As of 2020/11, this only populates the polylines of non-empty routes and + * requires that `populate_polylines` is true. + * The `route_polyline` fields of the passed-in routes may be inconsistent + * with route `transitions`. + * This field must not be used together with `injected_first_solution_routes` + * or `injected_solution_constraint`. + * `Shipment.ignore` and `Vehicle.ignore` have no effect on the behavior. + * Polylines are still populated between all visits in all non-empty routes + * regardless of whether the related shipments or vehicles are ignored. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentRoute refresh_details_routes = 9; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRefreshDetailsRoutes() + { + return $this->refresh_details_routes; + } + + /** + * If non-empty, the given routes will be refreshed, without modifying their + * underlying sequence of visits or travel times: only other details will be + * updated. This does not solve the model. + * As of 2020/11, this only populates the polylines of non-empty routes and + * requires that `populate_polylines` is true. + * The `route_polyline` fields of the passed-in routes may be inconsistent + * with route `transitions`. + * This field must not be used together with `injected_first_solution_routes` + * or `injected_solution_constraint`. + * `Shipment.ignore` and `Vehicle.ignore` have no effect on the behavior. + * Polylines are still populated between all visits in all non-empty routes + * regardless of whether the related shipments or vehicles are ignored. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentRoute refresh_details_routes = 9; + * @param array<\Google\Maps\RouteOptimization\V1\ShipmentRoute>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRefreshDetailsRoutes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\ShipmentRoute::class); + $this->refresh_details_routes = $arr; + + return $this; + } + + /** + * If true: + * * uses + * [ShipmentRoute.vehicle_label][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_label] + * instead of `vehicle_index` to + * match routes in an injected solution with vehicles in the request; + * reuses the mapping of original + * [ShipmentRoute.vehicle_index][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_index] + * to new + * [ShipmentRoute.vehicle_index][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_index] + * to update + * [ConstraintRelaxation.vehicle_indices][google.maps.routeoptimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.vehicle_indices] + * if non-empty, but the mapping must be unambiguous (i.e., multiple + * `ShipmentRoute`s must not share the same original `vehicle_index`). + * * uses + * [ShipmentRoute.Visit.shipment_label][google.maps.routeoptimization.v1.ShipmentRoute.Visit.shipment_label] + * instead of `shipment_index` + * to match visits in an injected solution with shipments in the request; + * * uses + * [SkippedShipment.label][google.maps.routeoptimization.v1.SkippedShipment.label] + * instead of + * [SkippedShipment.index][google.maps.routeoptimization.v1.SkippedShipment.index] + * to + * match skipped shipments in the injected solution with request + * shipments. + * This interpretation applies to the `injected_first_solution_routes`, + * `injected_solution_constraint`, and `refresh_details_routes` fields. + * It can be used when shipment or vehicle indices in the request have + * changed since the solution was created, perhaps because shipments or + * vehicles have been removed from or added to the request. + * If true, labels in the following categories must appear at most once in + * their category: + * * [Vehicle.label][google.maps.routeoptimization.v1.Vehicle.label] in the + * request; + * * [Shipment.label][google.maps.routeoptimization.v1.Shipment.label] in + * the request; + * * [ShipmentRoute.vehicle_label][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_label] in the injected solution; + * * [SkippedShipment.label][google.maps.routeoptimization.v1.SkippedShipment.label] and [ShipmentRoute.Visit.shipment_label][google.maps.routeoptimization.v1.ShipmentRoute.Visit.shipment_label] in + * the injected solution (except pickup/delivery visit pairs, whose + * `shipment_label` must appear twice). + * If a `vehicle_label` in the injected solution does not correspond to a + * request vehicle, the corresponding route is removed from the solution + * along with its visits. If a `shipment_label` in the injected solution does + * not correspond to a request shipment, the corresponding visit is removed + * from the solution. If a + * [SkippedShipment.label][google.maps.routeoptimization.v1.SkippedShipment.label] + * in the injected solution does not correspond to a request shipment, the + * `SkippedShipment` is removed from the solution. + * Removing route visits or entire routes from an injected solution may + * have an effect on the implied constraints, which may lead to change in + * solution, validation errors, or infeasibility. + * NOTE: The caller must ensure that each + * [Vehicle.label][google.maps.routeoptimization.v1.Vehicle.label] (resp. + * [Shipment.label][google.maps.routeoptimization.v1.Shipment.label]) uniquely + * identifies a vehicle (resp. shipment) entity used across the two relevant + * requests: the past request that produced the `OptimizeToursResponse` used + * in the injected solution and the current request that includes the injected + * solution. The uniqueness checks described above are not enough to guarantee + * this requirement. + * + * Generated from protobuf field bool interpret_injected_solutions_using_labels = 10; + * @return bool + */ + public function getInterpretInjectedSolutionsUsingLabels() + { + return $this->interpret_injected_solutions_using_labels; + } + + /** + * If true: + * * uses + * [ShipmentRoute.vehicle_label][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_label] + * instead of `vehicle_index` to + * match routes in an injected solution with vehicles in the request; + * reuses the mapping of original + * [ShipmentRoute.vehicle_index][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_index] + * to new + * [ShipmentRoute.vehicle_index][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_index] + * to update + * [ConstraintRelaxation.vehicle_indices][google.maps.routeoptimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.vehicle_indices] + * if non-empty, but the mapping must be unambiguous (i.e., multiple + * `ShipmentRoute`s must not share the same original `vehicle_index`). + * * uses + * [ShipmentRoute.Visit.shipment_label][google.maps.routeoptimization.v1.ShipmentRoute.Visit.shipment_label] + * instead of `shipment_index` + * to match visits in an injected solution with shipments in the request; + * * uses + * [SkippedShipment.label][google.maps.routeoptimization.v1.SkippedShipment.label] + * instead of + * [SkippedShipment.index][google.maps.routeoptimization.v1.SkippedShipment.index] + * to + * match skipped shipments in the injected solution with request + * shipments. + * This interpretation applies to the `injected_first_solution_routes`, + * `injected_solution_constraint`, and `refresh_details_routes` fields. + * It can be used when shipment or vehicle indices in the request have + * changed since the solution was created, perhaps because shipments or + * vehicles have been removed from or added to the request. + * If true, labels in the following categories must appear at most once in + * their category: + * * [Vehicle.label][google.maps.routeoptimization.v1.Vehicle.label] in the + * request; + * * [Shipment.label][google.maps.routeoptimization.v1.Shipment.label] in + * the request; + * * [ShipmentRoute.vehicle_label][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_label] in the injected solution; + * * [SkippedShipment.label][google.maps.routeoptimization.v1.SkippedShipment.label] and [ShipmentRoute.Visit.shipment_label][google.maps.routeoptimization.v1.ShipmentRoute.Visit.shipment_label] in + * the injected solution (except pickup/delivery visit pairs, whose + * `shipment_label` must appear twice). + * If a `vehicle_label` in the injected solution does not correspond to a + * request vehicle, the corresponding route is removed from the solution + * along with its visits. If a `shipment_label` in the injected solution does + * not correspond to a request shipment, the corresponding visit is removed + * from the solution. If a + * [SkippedShipment.label][google.maps.routeoptimization.v1.SkippedShipment.label] + * in the injected solution does not correspond to a request shipment, the + * `SkippedShipment` is removed from the solution. + * Removing route visits or entire routes from an injected solution may + * have an effect on the implied constraints, which may lead to change in + * solution, validation errors, or infeasibility. + * NOTE: The caller must ensure that each + * [Vehicle.label][google.maps.routeoptimization.v1.Vehicle.label] (resp. + * [Shipment.label][google.maps.routeoptimization.v1.Shipment.label]) uniquely + * identifies a vehicle (resp. shipment) entity used across the two relevant + * requests: the past request that produced the `OptimizeToursResponse` used + * in the injected solution and the current request that includes the injected + * solution. The uniqueness checks described above are not enough to guarantee + * this requirement. + * + * Generated from protobuf field bool interpret_injected_solutions_using_labels = 10; + * @param bool $var + * @return $this + */ + public function setInterpretInjectedSolutionsUsingLabels($var) + { + GPBUtil::checkBool($var); + $this->interpret_injected_solutions_using_labels = $var; + + return $this; + } + + /** + * Consider traffic estimation in calculating `ShipmentRoute` fields + * [Transition.travel_duration][google.maps.routeoptimization.v1.ShipmentRoute.Transition.travel_duration], + * [Visit.start_time][google.maps.routeoptimization.v1.ShipmentRoute.Visit.start_time], + * and `vehicle_end_time`; in setting the + * [ShipmentRoute.has_traffic_infeasibilities][google.maps.routeoptimization.v1.ShipmentRoute.has_traffic_infeasibilities] + * field, and in calculating the + * [OptimizeToursResponse.total_cost][google.maps.routeoptimization.v1.OptimizeToursResponse.total_cost] + * field. + * + * Generated from protobuf field bool consider_road_traffic = 11; + * @return bool + */ + public function getConsiderRoadTraffic() + { + return $this->consider_road_traffic; + } + + /** + * Consider traffic estimation in calculating `ShipmentRoute` fields + * [Transition.travel_duration][google.maps.routeoptimization.v1.ShipmentRoute.Transition.travel_duration], + * [Visit.start_time][google.maps.routeoptimization.v1.ShipmentRoute.Visit.start_time], + * and `vehicle_end_time`; in setting the + * [ShipmentRoute.has_traffic_infeasibilities][google.maps.routeoptimization.v1.ShipmentRoute.has_traffic_infeasibilities] + * field, and in calculating the + * [OptimizeToursResponse.total_cost][google.maps.routeoptimization.v1.OptimizeToursResponse.total_cost] + * field. + * + * Generated from protobuf field bool consider_road_traffic = 11; + * @param bool $var + * @return $this + */ + public function setConsiderRoadTraffic($var) + { + GPBUtil::checkBool($var); + $this->consider_road_traffic = $var; + + return $this; + } + + /** + * If true, polylines will be populated in response `ShipmentRoute`s. + * + * Generated from protobuf field bool populate_polylines = 12; + * @return bool + */ + public function getPopulatePolylines() + { + return $this->populate_polylines; + } + + /** + * If true, polylines will be populated in response `ShipmentRoute`s. + * + * Generated from protobuf field bool populate_polylines = 12; + * @param bool $var + * @return $this + */ + public function setPopulatePolylines($var) + { + GPBUtil::checkBool($var); + $this->populate_polylines = $var; + + return $this; + } + + /** + * If true, polylines and route tokens will be populated in response + * [ShipmentRoute.transitions][google.maps.routeoptimization.v1.ShipmentRoute.transitions]. + * + * Generated from protobuf field bool populate_transition_polylines = 13; + * @return bool + */ + public function getPopulateTransitionPolylines() + { + return $this->populate_transition_polylines; + } + + /** + * If true, polylines and route tokens will be populated in response + * [ShipmentRoute.transitions][google.maps.routeoptimization.v1.ShipmentRoute.transitions]. + * + * Generated from protobuf field bool populate_transition_polylines = 13; + * @param bool $var + * @return $this + */ + public function setPopulateTransitionPolylines($var) + { + GPBUtil::checkBool($var); + $this->populate_transition_polylines = $var; + + return $this; + } + + /** + * If this is set, then the request can have a deadline + * (see https://grpc.io/blog/deadlines) of up to 60 minutes. + * Otherwise, the maximum deadline is only 30 minutes. + * Note that long-lived requests have a significantly larger (but still small) + * risk of interruption. + * + * Generated from protobuf field bool allow_large_deadline_despite_interruption_risk = 14; + * @return bool + */ + public function getAllowLargeDeadlineDespiteInterruptionRisk() + { + return $this->allow_large_deadline_despite_interruption_risk; + } + + /** + * If this is set, then the request can have a deadline + * (see https://grpc.io/blog/deadlines) of up to 60 minutes. + * Otherwise, the maximum deadline is only 30 minutes. + * Note that long-lived requests have a significantly larger (but still small) + * risk of interruption. + * + * Generated from protobuf field bool allow_large_deadline_despite_interruption_risk = 14; + * @param bool $var + * @return $this + */ + public function setAllowLargeDeadlineDespiteInterruptionRisk($var) + { + GPBUtil::checkBool($var); + $this->allow_large_deadline_despite_interruption_risk = $var; + + return $this; + } + + /** + * If true, travel distances will be computed using geodesic distances instead + * of Google Maps distances, and travel times will be computed using geodesic + * distances with a speed defined by `geodesic_meters_per_second`. + * + * Generated from protobuf field bool use_geodesic_distances = 15; + * @return bool + */ + public function getUseGeodesicDistances() + { + return $this->use_geodesic_distances; + } + + /** + * If true, travel distances will be computed using geodesic distances instead + * of Google Maps distances, and travel times will be computed using geodesic + * distances with a speed defined by `geodesic_meters_per_second`. + * + * Generated from protobuf field bool use_geodesic_distances = 15; + * @param bool $var + * @return $this + */ + public function setUseGeodesicDistances($var) + { + GPBUtil::checkBool($var); + $this->use_geodesic_distances = $var; + + return $this; + } + + /** + * When `use_geodesic_distances` is true, this field must be set and defines + * the speed applied to compute travel times. Its value must be at least 1.0 + * meters/seconds. + * + * Generated from protobuf field optional double geodesic_meters_per_second = 16; + * @return float + */ + public function getGeodesicMetersPerSecond() + { + return isset($this->geodesic_meters_per_second) ? $this->geodesic_meters_per_second : 0.0; + } + + public function hasGeodesicMetersPerSecond() + { + return isset($this->geodesic_meters_per_second); + } + + public function clearGeodesicMetersPerSecond() + { + unset($this->geodesic_meters_per_second); + } + + /** + * When `use_geodesic_distances` is true, this field must be set and defines + * the speed applied to compute travel times. Its value must be at least 1.0 + * meters/seconds. + * + * Generated from protobuf field optional double geodesic_meters_per_second = 16; + * @param float $var + * @return $this + */ + public function setGeodesicMetersPerSecond($var) + { + GPBUtil::checkDouble($var); + $this->geodesic_meters_per_second = $var; + + return $this; + } + + /** + * Truncates the number of validation errors returned. These errors are + * typically attached to an INVALID_ARGUMENT error payload as a BadRequest + * error detail (https://cloud.google.com/apis/design/errors#error_details), + * unless solving_mode=VALIDATE_ONLY: see the + * [OptimizeToursResponse.validation_errors][google.maps.routeoptimization.v1.OptimizeToursResponse.validation_errors] + * field. + * This defaults to 100 and is capped at 10,000. + * + * Generated from protobuf field optional int32 max_validation_errors = 5; + * @return int + */ + public function getMaxValidationErrors() + { + return isset($this->max_validation_errors) ? $this->max_validation_errors : 0; + } + + public function hasMaxValidationErrors() + { + return isset($this->max_validation_errors); + } + + public function clearMaxValidationErrors() + { + unset($this->max_validation_errors); + } + + /** + * Truncates the number of validation errors returned. These errors are + * typically attached to an INVALID_ARGUMENT error payload as a BadRequest + * error detail (https://cloud.google.com/apis/design/errors#error_details), + * unless solving_mode=VALIDATE_ONLY: see the + * [OptimizeToursResponse.validation_errors][google.maps.routeoptimization.v1.OptimizeToursResponse.validation_errors] + * field. + * This defaults to 100 and is capped at 10,000. + * + * Generated from protobuf field optional int32 max_validation_errors = 5; + * @param int $var + * @return $this + */ + public function setMaxValidationErrors($var) + { + GPBUtil::checkInt32($var); + $this->max_validation_errors = $var; + + return $this; + } + + /** + * Label that may be used to identify this request, reported back in the + * [OptimizeToursResponse.request_label][google.maps.routeoptimization.v1.OptimizeToursResponse.request_label]. + * + * Generated from protobuf field string label = 17; + * @return string + */ + public function getLabel() + { + return $this->label; + } + + /** + * Label that may be used to identify this request, reported back in the + * [OptimizeToursResponse.request_label][google.maps.routeoptimization.v1.OptimizeToursResponse.request_label]. + * + * Generated from protobuf field string label = 17; + * @param string $var + * @return $this + */ + public function setLabel($var) + { + GPBUtil::checkString($var, True); + $this->label = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursRequest/SearchMode.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursRequest/SearchMode.php new file mode 100644 index 000000000000..1933e8a6c82e --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursRequest/SearchMode.php @@ -0,0 +1,65 @@ +google.maps.routeoptimization.v1.OptimizeToursRequest.SearchMode + */ +class SearchMode +{ + /** + * Unspecified search mode, equivalent to `RETURN_FAST`. + * + * Generated from protobuf enum SEARCH_MODE_UNSPECIFIED = 0; + */ + const SEARCH_MODE_UNSPECIFIED = 0; + /** + * Stop the search after finding the first good solution. + * + * Generated from protobuf enum RETURN_FAST = 1; + */ + const RETURN_FAST = 1; + /** + * Spend all the available time to search for better solutions. + * + * Generated from protobuf enum CONSUME_ALL_AVAILABLE_TIME = 2; + */ + const CONSUME_ALL_AVAILABLE_TIME = 2; + + private static $valueToName = [ + self::SEARCH_MODE_UNSPECIFIED => 'SEARCH_MODE_UNSPECIFIED', + self::RETURN_FAST => 'RETURN_FAST', + self::CONSUME_ALL_AVAILABLE_TIME => 'CONSUME_ALL_AVAILABLE_TIME', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SearchMode::class, \Google\Maps\RouteOptimization\V1\OptimizeToursRequest_SearchMode::class); + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursRequest/SolvingMode.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursRequest/SolvingMode.php new file mode 100644 index 000000000000..33490075a243 --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursRequest/SolvingMode.php @@ -0,0 +1,84 @@ +google.maps.routeoptimization.v1.OptimizeToursRequest.SolvingMode + */ +class SolvingMode +{ + /** + * Solve the model. Warnings may be issued in + * [OptimizeToursResponse.validation_errors][google.cloud.optimization.v1.OptimizeToursResponse.validation_errors]. + * + * Generated from protobuf enum DEFAULT_SOLVE = 0; + */ + const DEFAULT_SOLVE = 0; + /** + * Only validates the model without solving it: populates as many + * [OptimizeToursResponse.validation_errors][google.maps.routeoptimization.v1.OptimizeToursResponse.validation_errors] + * as possible. + * + * Generated from protobuf enum VALIDATE_ONLY = 1; + */ + const VALIDATE_ONLY = 1; + /** + * Only populates + * [OptimizeToursResponse.validation_errors][google.maps.routeoptimization.v1.OptimizeToursResponse.validation_errors] + * or + * [OptimizeToursResponse.skipped_shipments][google.maps.routeoptimization.v1.OptimizeToursResponse.skipped_shipments], + * and doesn't actually solve the rest of the request (`status` and `routes` + * are unset in the response). + * If infeasibilities in `injected_solution_constraint` routes are detected + * they are populated in the + * [OptimizeToursResponse.validation_errors][google.maps.routeoptimization.v1.OptimizeToursResponse.validation_errors] + * field and + * [OptimizeToursResponse.skipped_shipments][google.maps.routeoptimization.v1.OptimizeToursResponse.skipped_shipments] + * is left empty. + * *IMPORTANT*: not all infeasible shipments are returned here, but only the + * ones that are detected as infeasible during preprocessing. + * + * Generated from protobuf enum DETECT_SOME_INFEASIBLE_SHIPMENTS = 2; + */ + const DETECT_SOME_INFEASIBLE_SHIPMENTS = 2; + + private static $valueToName = [ + self::DEFAULT_SOLVE => 'DEFAULT_SOLVE', + self::VALIDATE_ONLY => 'VALIDATE_ONLY', + self::DETECT_SOME_INFEASIBLE_SHIPMENTS => 'DETECT_SOME_INFEASIBLE_SHIPMENTS', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SolvingMode::class, \Google\Maps\RouteOptimization\V1\OptimizeToursRequest_SolvingMode::class); + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursResponse.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursResponse.php new file mode 100644 index 000000000000..4933ce254730 --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursResponse.php @@ -0,0 +1,243 @@ +google.maps.routeoptimization.v1.OptimizeToursResponse + */ +class OptimizeToursResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Routes computed for each vehicle; the i-th route corresponds to the i-th + * vehicle in the model. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentRoute routes = 1; + */ + private $routes; + /** + * Copy of the + * [OptimizeToursRequest.label][google.maps.routeoptimization.v1.OptimizeToursRequest.label], + * if a label was specified in the request. + * + * Generated from protobuf field string request_label = 3; + */ + protected $request_label = ''; + /** + * The list of all shipments skipped. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.SkippedShipment skipped_shipments = 4; + */ + private $skipped_shipments; + /** + * List of all the validation errors that we were able to detect + * independently. See the "MULTIPLE ERRORS" explanation for the + * [OptimizeToursValidationError][google.maps.routeoptimization.v1.OptimizeToursValidationError] + * message. Instead of errors, this will include warnings in the case + * `solving_mode` is `DEFAULT_SOLVE`. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.OptimizeToursValidationError validation_errors = 5; + */ + private $validation_errors; + /** + * Duration, distance and usage metrics for this solution. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.OptimizeToursResponse.Metrics metrics = 6; + */ + protected $metrics = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Maps\RouteOptimization\V1\ShipmentRoute>|\Google\Protobuf\Internal\RepeatedField $routes + * Routes computed for each vehicle; the i-th route corresponds to the i-th + * vehicle in the model. + * @type string $request_label + * Copy of the + * [OptimizeToursRequest.label][google.maps.routeoptimization.v1.OptimizeToursRequest.label], + * if a label was specified in the request. + * @type array<\Google\Maps\RouteOptimization\V1\SkippedShipment>|\Google\Protobuf\Internal\RepeatedField $skipped_shipments + * The list of all shipments skipped. + * @type array<\Google\Maps\RouteOptimization\V1\OptimizeToursValidationError>|\Google\Protobuf\Internal\RepeatedField $validation_errors + * List of all the validation errors that we were able to detect + * independently. See the "MULTIPLE ERRORS" explanation for the + * [OptimizeToursValidationError][google.maps.routeoptimization.v1.OptimizeToursValidationError] + * message. Instead of errors, this will include warnings in the case + * `solving_mode` is `DEFAULT_SOLVE`. + * @type \Google\Maps\RouteOptimization\V1\OptimizeToursResponse\Metrics $metrics + * Duration, distance and usage metrics for this solution. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); + parent::__construct($data); + } + + /** + * Routes computed for each vehicle; the i-th route corresponds to the i-th + * vehicle in the model. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentRoute routes = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRoutes() + { + return $this->routes; + } + + /** + * Routes computed for each vehicle; the i-th route corresponds to the i-th + * vehicle in the model. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentRoute routes = 1; + * @param array<\Google\Maps\RouteOptimization\V1\ShipmentRoute>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRoutes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\ShipmentRoute::class); + $this->routes = $arr; + + return $this; + } + + /** + * Copy of the + * [OptimizeToursRequest.label][google.maps.routeoptimization.v1.OptimizeToursRequest.label], + * if a label was specified in the request. + * + * Generated from protobuf field string request_label = 3; + * @return string + */ + public function getRequestLabel() + { + return $this->request_label; + } + + /** + * Copy of the + * [OptimizeToursRequest.label][google.maps.routeoptimization.v1.OptimizeToursRequest.label], + * if a label was specified in the request. + * + * Generated from protobuf field string request_label = 3; + * @param string $var + * @return $this + */ + public function setRequestLabel($var) + { + GPBUtil::checkString($var, True); + $this->request_label = $var; + + return $this; + } + + /** + * The list of all shipments skipped. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.SkippedShipment skipped_shipments = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSkippedShipments() + { + return $this->skipped_shipments; + } + + /** + * The list of all shipments skipped. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.SkippedShipment skipped_shipments = 4; + * @param array<\Google\Maps\RouteOptimization\V1\SkippedShipment>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSkippedShipments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\SkippedShipment::class); + $this->skipped_shipments = $arr; + + return $this; + } + + /** + * List of all the validation errors that we were able to detect + * independently. See the "MULTIPLE ERRORS" explanation for the + * [OptimizeToursValidationError][google.maps.routeoptimization.v1.OptimizeToursValidationError] + * message. Instead of errors, this will include warnings in the case + * `solving_mode` is `DEFAULT_SOLVE`. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.OptimizeToursValidationError validation_errors = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getValidationErrors() + { + return $this->validation_errors; + } + + /** + * List of all the validation errors that we were able to detect + * independently. See the "MULTIPLE ERRORS" explanation for the + * [OptimizeToursValidationError][google.maps.routeoptimization.v1.OptimizeToursValidationError] + * message. Instead of errors, this will include warnings in the case + * `solving_mode` is `DEFAULT_SOLVE`. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.OptimizeToursValidationError validation_errors = 5; + * @param array<\Google\Maps\RouteOptimization\V1\OptimizeToursValidationError>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setValidationErrors($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\OptimizeToursValidationError::class); + $this->validation_errors = $arr; + + return $this; + } + + /** + * Duration, distance and usage metrics for this solution. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.OptimizeToursResponse.Metrics metrics = 6; + * @return \Google\Maps\RouteOptimization\V1\OptimizeToursResponse\Metrics|null + */ + public function getMetrics() + { + return $this->metrics; + } + + public function hasMetrics() + { + return isset($this->metrics); + } + + public function clearMetrics() + { + unset($this->metrics); + } + + /** + * Duration, distance and usage metrics for this solution. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.OptimizeToursResponse.Metrics metrics = 6; + * @param \Google\Maps\RouteOptimization\V1\OptimizeToursResponse\Metrics $var + * @return $this + */ + public function setMetrics($var) + { + GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\OptimizeToursResponse\Metrics::class); + $this->metrics = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursResponse/Metrics.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursResponse/Metrics.php new file mode 100644 index 000000000000..88e8bbb1cba8 --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursResponse/Metrics.php @@ -0,0 +1,372 @@ +google.maps.routeoptimization.v1.OptimizeToursResponse.Metrics + */ +class Metrics extends \Google\Protobuf\Internal\Message +{ + /** + * Aggregated over the routes. Each metric is the sum (or max, for loads) + * over all + * [ShipmentRoute.metrics][google.maps.routeoptimization.v1.ShipmentRoute.metrics] + * fields of the same name. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.AggregatedMetrics aggregated_route_metrics = 1; + */ + protected $aggregated_route_metrics = null; + /** + * Number of mandatory shipments skipped. + * + * Generated from protobuf field int32 skipped_mandatory_shipment_count = 2; + */ + protected $skipped_mandatory_shipment_count = 0; + /** + * Number of vehicles used. Note: if a vehicle route is empty and + * [Vehicle.used_if_route_is_empty][google.maps.routeoptimization.v1.Vehicle.used_if_route_is_empty] + * is true, the vehicle is considered used. + * + * Generated from protobuf field int32 used_vehicle_count = 3; + */ + protected $used_vehicle_count = 0; + /** + * The earliest start time for a used vehicle, computed as the minimum over + * all used vehicles of + * [ShipmentRoute.vehicle_start_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_start_time]. + * + * Generated from protobuf field .google.protobuf.Timestamp earliest_vehicle_start_time = 4; + */ + protected $earliest_vehicle_start_time = null; + /** + * The latest end time for a used vehicle, computed as the maximum over all + * used vehicles of + * [ShipmentRoute.vehicle_end_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_end_time]. + * + * Generated from protobuf field .google.protobuf.Timestamp latest_vehicle_end_time = 5; + */ + protected $latest_vehicle_end_time = null; + /** + * Cost of the solution, broken down by cost-related request fields. + * The keys are proto paths, relative to the input OptimizeToursRequest, + * e.g. "model.shipments.pickups.cost", and the values are the total cost + * generated by the corresponding cost field, aggregated over the whole + * solution. In other words, costs["model.shipments.pickups.cost"] is the + * sum of all pickup costs over the solution. All costs defined in the model + * are reported in detail here with the exception of costs related to + * TransitionAttributes that are only reported in an aggregated way as of + * 2022/01. + * + * Generated from protobuf field map costs = 10; + */ + private $costs; + /** + * Total cost of the solution. The sum of all values in the costs map. + * + * Generated from protobuf field double total_cost = 6; + */ + protected $total_cost = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Maps\RouteOptimization\V1\AggregatedMetrics $aggregated_route_metrics + * Aggregated over the routes. Each metric is the sum (or max, for loads) + * over all + * [ShipmentRoute.metrics][google.maps.routeoptimization.v1.ShipmentRoute.metrics] + * fields of the same name. + * @type int $skipped_mandatory_shipment_count + * Number of mandatory shipments skipped. + * @type int $used_vehicle_count + * Number of vehicles used. Note: if a vehicle route is empty and + * [Vehicle.used_if_route_is_empty][google.maps.routeoptimization.v1.Vehicle.used_if_route_is_empty] + * is true, the vehicle is considered used. + * @type \Google\Protobuf\Timestamp $earliest_vehicle_start_time + * The earliest start time for a used vehicle, computed as the minimum over + * all used vehicles of + * [ShipmentRoute.vehicle_start_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_start_time]. + * @type \Google\Protobuf\Timestamp $latest_vehicle_end_time + * The latest end time for a used vehicle, computed as the maximum over all + * used vehicles of + * [ShipmentRoute.vehicle_end_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_end_time]. + * @type array|\Google\Protobuf\Internal\MapField $costs + * Cost of the solution, broken down by cost-related request fields. + * The keys are proto paths, relative to the input OptimizeToursRequest, + * e.g. "model.shipments.pickups.cost", and the values are the total cost + * generated by the corresponding cost field, aggregated over the whole + * solution. In other words, costs["model.shipments.pickups.cost"] is the + * sum of all pickup costs over the solution. All costs defined in the model + * are reported in detail here with the exception of costs related to + * TransitionAttributes that are only reported in an aggregated way as of + * 2022/01. + * @type float $total_cost + * Total cost of the solution. The sum of all values in the costs map. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); + parent::__construct($data); + } + + /** + * Aggregated over the routes. Each metric is the sum (or max, for loads) + * over all + * [ShipmentRoute.metrics][google.maps.routeoptimization.v1.ShipmentRoute.metrics] + * fields of the same name. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.AggregatedMetrics aggregated_route_metrics = 1; + * @return \Google\Maps\RouteOptimization\V1\AggregatedMetrics|null + */ + public function getAggregatedRouteMetrics() + { + return $this->aggregated_route_metrics; + } + + public function hasAggregatedRouteMetrics() + { + return isset($this->aggregated_route_metrics); + } + + public function clearAggregatedRouteMetrics() + { + unset($this->aggregated_route_metrics); + } + + /** + * Aggregated over the routes. Each metric is the sum (or max, for loads) + * over all + * [ShipmentRoute.metrics][google.maps.routeoptimization.v1.ShipmentRoute.metrics] + * fields of the same name. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.AggregatedMetrics aggregated_route_metrics = 1; + * @param \Google\Maps\RouteOptimization\V1\AggregatedMetrics $var + * @return $this + */ + public function setAggregatedRouteMetrics($var) + { + GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\AggregatedMetrics::class); + $this->aggregated_route_metrics = $var; + + return $this; + } + + /** + * Number of mandatory shipments skipped. + * + * Generated from protobuf field int32 skipped_mandatory_shipment_count = 2; + * @return int + */ + public function getSkippedMandatoryShipmentCount() + { + return $this->skipped_mandatory_shipment_count; + } + + /** + * Number of mandatory shipments skipped. + * + * Generated from protobuf field int32 skipped_mandatory_shipment_count = 2; + * @param int $var + * @return $this + */ + public function setSkippedMandatoryShipmentCount($var) + { + GPBUtil::checkInt32($var); + $this->skipped_mandatory_shipment_count = $var; + + return $this; + } + + /** + * Number of vehicles used. Note: if a vehicle route is empty and + * [Vehicle.used_if_route_is_empty][google.maps.routeoptimization.v1.Vehicle.used_if_route_is_empty] + * is true, the vehicle is considered used. + * + * Generated from protobuf field int32 used_vehicle_count = 3; + * @return int + */ + public function getUsedVehicleCount() + { + return $this->used_vehicle_count; + } + + /** + * Number of vehicles used. Note: if a vehicle route is empty and + * [Vehicle.used_if_route_is_empty][google.maps.routeoptimization.v1.Vehicle.used_if_route_is_empty] + * is true, the vehicle is considered used. + * + * Generated from protobuf field int32 used_vehicle_count = 3; + * @param int $var + * @return $this + */ + public function setUsedVehicleCount($var) + { + GPBUtil::checkInt32($var); + $this->used_vehicle_count = $var; + + return $this; + } + + /** + * The earliest start time for a used vehicle, computed as the minimum over + * all used vehicles of + * [ShipmentRoute.vehicle_start_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_start_time]. + * + * Generated from protobuf field .google.protobuf.Timestamp earliest_vehicle_start_time = 4; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEarliestVehicleStartTime() + { + return $this->earliest_vehicle_start_time; + } + + public function hasEarliestVehicleStartTime() + { + return isset($this->earliest_vehicle_start_time); + } + + public function clearEarliestVehicleStartTime() + { + unset($this->earliest_vehicle_start_time); + } + + /** + * The earliest start time for a used vehicle, computed as the minimum over + * all used vehicles of + * [ShipmentRoute.vehicle_start_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_start_time]. + * + * Generated from protobuf field .google.protobuf.Timestamp earliest_vehicle_start_time = 4; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEarliestVehicleStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->earliest_vehicle_start_time = $var; + + return $this; + } + + /** + * The latest end time for a used vehicle, computed as the maximum over all + * used vehicles of + * [ShipmentRoute.vehicle_end_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_end_time]. + * + * Generated from protobuf field .google.protobuf.Timestamp latest_vehicle_end_time = 5; + * @return \Google\Protobuf\Timestamp|null + */ + public function getLatestVehicleEndTime() + { + return $this->latest_vehicle_end_time; + } + + public function hasLatestVehicleEndTime() + { + return isset($this->latest_vehicle_end_time); + } + + public function clearLatestVehicleEndTime() + { + unset($this->latest_vehicle_end_time); + } + + /** + * The latest end time for a used vehicle, computed as the maximum over all + * used vehicles of + * [ShipmentRoute.vehicle_end_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_end_time]. + * + * Generated from protobuf field .google.protobuf.Timestamp latest_vehicle_end_time = 5; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setLatestVehicleEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->latest_vehicle_end_time = $var; + + return $this; + } + + /** + * Cost of the solution, broken down by cost-related request fields. + * The keys are proto paths, relative to the input OptimizeToursRequest, + * e.g. "model.shipments.pickups.cost", and the values are the total cost + * generated by the corresponding cost field, aggregated over the whole + * solution. In other words, costs["model.shipments.pickups.cost"] is the + * sum of all pickup costs over the solution. All costs defined in the model + * are reported in detail here with the exception of costs related to + * TransitionAttributes that are only reported in an aggregated way as of + * 2022/01. + * + * Generated from protobuf field map costs = 10; + * @return \Google\Protobuf\Internal\MapField + */ + public function getCosts() + { + return $this->costs; + } + + /** + * Cost of the solution, broken down by cost-related request fields. + * The keys are proto paths, relative to the input OptimizeToursRequest, + * e.g. "model.shipments.pickups.cost", and the values are the total cost + * generated by the corresponding cost field, aggregated over the whole + * solution. In other words, costs["model.shipments.pickups.cost"] is the + * sum of all pickup costs over the solution. All costs defined in the model + * are reported in detail here with the exception of costs related to + * TransitionAttributes that are only reported in an aggregated way as of + * 2022/01. + * + * Generated from protobuf field map costs = 10; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setCosts($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::DOUBLE); + $this->costs = $arr; + + return $this; + } + + /** + * Total cost of the solution. The sum of all values in the costs map. + * + * Generated from protobuf field double total_cost = 6; + * @return float + */ + public function getTotalCost() + { + return $this->total_cost; + } + + /** + * Total cost of the solution. The sum of all values in the costs map. + * + * Generated from protobuf field double total_cost = 6; + * @param float $var + * @return $this + */ + public function setTotalCost($var) + { + GPBUtil::checkDouble($var); + $this->total_cost = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Metrics::class, \Google\Maps\RouteOptimization\V1\OptimizeToursResponse_Metrics::class); + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursValidationError.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursValidationError.php new file mode 100644 index 000000000000..8f2ad51ee288 --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursValidationError.php @@ -0,0 +1,316 @@ +google.maps.routeoptimization.v1.OptimizeToursValidationError + */ +class OptimizeToursValidationError extends \Google\Protobuf\Internal\Message +{ + /** + * A validation error is defined by the pair (`code`, `display_name`) which + * are always present. + * The fields following this section provide more context about the error. + * *MULTIPLE ERRORS*: + * When there are multiple errors, the validation process tries to output + * several of them. Much like a compiler, this is an imperfect process. Some + * validation errors will be "fatal", meaning that they stop the entire + * validation process. This is the case for `display_name="UNSPECIFIED"` + * errors, among others. Some errors may cause the validation process to skip + * other errors. + * *STABILITY*: + * `code` and `display_name` should be very stable. But new codes and + * display names may appear over time, which may cause a given (invalid) + * request to yield a different (`code`, `display_name`) pair because the new + * error hid the old one. For example, see "MULTIPLE ERRORS". + * + * Generated from protobuf field int32 code = 1; + */ + protected $code = 0; + /** + * The error display name. + * + * Generated from protobuf field string display_name = 2; + */ + protected $display_name = ''; + /** + * An error context may involve 0, 1 (most of the time) or more fields. For + * example, referring to vehicle #4 and shipment #2's first pickup can be + * done as follows: + * ``` + * fields { name: "vehicles" index: 4} + * fields { name: "shipments" index: 2 sub_field {name: "pickups" index: 0} } + * ``` + * Note, however, that the cardinality of `fields` should not change for a + * given error code. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference fields = 3; + */ + private $fields; + /** + * Human-readable string describing the error. There is a 1:1 mapping + * between `code` and `error_message` (when code != "UNSPECIFIED"). + * *STABILITY*: Not stable: the error message associated to a given `code` may + * change (hopefully to clarify it) over time. Please rely on the + * `display_name` and `code` instead. + * + * Generated from protobuf field string error_message = 4; + */ + protected $error_message = ''; + /** + * May contain the value(s) of the field(s). This is not always available. You + * should absolutely not rely on it and use it only for manual model + * debugging. + * + * Generated from protobuf field string offending_values = 5; + */ + protected $offending_values = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $code + * A validation error is defined by the pair (`code`, `display_name`) which + * are always present. + * The fields following this section provide more context about the error. + * *MULTIPLE ERRORS*: + * When there are multiple errors, the validation process tries to output + * several of them. Much like a compiler, this is an imperfect process. Some + * validation errors will be "fatal", meaning that they stop the entire + * validation process. This is the case for `display_name="UNSPECIFIED"` + * errors, among others. Some errors may cause the validation process to skip + * other errors. + * *STABILITY*: + * `code` and `display_name` should be very stable. But new codes and + * display names may appear over time, which may cause a given (invalid) + * request to yield a different (`code`, `display_name`) pair because the new + * error hid the old one. For example, see "MULTIPLE ERRORS". + * @type string $display_name + * The error display name. + * @type array<\Google\Maps\RouteOptimization\V1\OptimizeToursValidationError\FieldReference>|\Google\Protobuf\Internal\RepeatedField $fields + * An error context may involve 0, 1 (most of the time) or more fields. For + * example, referring to vehicle #4 and shipment #2's first pickup can be + * done as follows: + * ``` + * fields { name: "vehicles" index: 4} + * fields { name: "shipments" index: 2 sub_field {name: "pickups" index: 0} } + * ``` + * Note, however, that the cardinality of `fields` should not change for a + * given error code. + * @type string $error_message + * Human-readable string describing the error. There is a 1:1 mapping + * between `code` and `error_message` (when code != "UNSPECIFIED"). + * *STABILITY*: Not stable: the error message associated to a given `code` may + * change (hopefully to clarify it) over time. Please rely on the + * `display_name` and `code` instead. + * @type string $offending_values + * May contain the value(s) of the field(s). This is not always available. You + * should absolutely not rely on it and use it only for manual model + * debugging. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); + parent::__construct($data); + } + + /** + * A validation error is defined by the pair (`code`, `display_name`) which + * are always present. + * The fields following this section provide more context about the error. + * *MULTIPLE ERRORS*: + * When there are multiple errors, the validation process tries to output + * several of them. Much like a compiler, this is an imperfect process. Some + * validation errors will be "fatal", meaning that they stop the entire + * validation process. This is the case for `display_name="UNSPECIFIED"` + * errors, among others. Some errors may cause the validation process to skip + * other errors. + * *STABILITY*: + * `code` and `display_name` should be very stable. But new codes and + * display names may appear over time, which may cause a given (invalid) + * request to yield a different (`code`, `display_name`) pair because the new + * error hid the old one. For example, see "MULTIPLE ERRORS". + * + * Generated from protobuf field int32 code = 1; + * @return int + */ + public function getCode() + { + return $this->code; + } + + /** + * A validation error is defined by the pair (`code`, `display_name`) which + * are always present. + * The fields following this section provide more context about the error. + * *MULTIPLE ERRORS*: + * When there are multiple errors, the validation process tries to output + * several of them. Much like a compiler, this is an imperfect process. Some + * validation errors will be "fatal", meaning that they stop the entire + * validation process. This is the case for `display_name="UNSPECIFIED"` + * errors, among others. Some errors may cause the validation process to skip + * other errors. + * *STABILITY*: + * `code` and `display_name` should be very stable. But new codes and + * display names may appear over time, which may cause a given (invalid) + * request to yield a different (`code`, `display_name`) pair because the new + * error hid the old one. For example, see "MULTIPLE ERRORS". + * + * Generated from protobuf field int32 code = 1; + * @param int $var + * @return $this + */ + public function setCode($var) + { + GPBUtil::checkInt32($var); + $this->code = $var; + + return $this; + } + + /** + * The error display name. + * + * Generated from protobuf field string display_name = 2; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * The error display name. + * + * Generated from protobuf field string display_name = 2; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * An error context may involve 0, 1 (most of the time) or more fields. For + * example, referring to vehicle #4 and shipment #2's first pickup can be + * done as follows: + * ``` + * fields { name: "vehicles" index: 4} + * fields { name: "shipments" index: 2 sub_field {name: "pickups" index: 0} } + * ``` + * Note, however, that the cardinality of `fields` should not change for a + * given error code. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference fields = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFields() + { + return $this->fields; + } + + /** + * An error context may involve 0, 1 (most of the time) or more fields. For + * example, referring to vehicle #4 and shipment #2's first pickup can be + * done as follows: + * ``` + * fields { name: "vehicles" index: 4} + * fields { name: "shipments" index: 2 sub_field {name: "pickups" index: 0} } + * ``` + * Note, however, that the cardinality of `fields` should not change for a + * given error code. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference fields = 3; + * @param array<\Google\Maps\RouteOptimization\V1\OptimizeToursValidationError\FieldReference>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFields($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\OptimizeToursValidationError\FieldReference::class); + $this->fields = $arr; + + return $this; + } + + /** + * Human-readable string describing the error. There is a 1:1 mapping + * between `code` and `error_message` (when code != "UNSPECIFIED"). + * *STABILITY*: Not stable: the error message associated to a given `code` may + * change (hopefully to clarify it) over time. Please rely on the + * `display_name` and `code` instead. + * + * Generated from protobuf field string error_message = 4; + * @return string + */ + public function getErrorMessage() + { + return $this->error_message; + } + + /** + * Human-readable string describing the error. There is a 1:1 mapping + * between `code` and `error_message` (when code != "UNSPECIFIED"). + * *STABILITY*: Not stable: the error message associated to a given `code` may + * change (hopefully to clarify it) over time. Please rely on the + * `display_name` and `code` instead. + * + * Generated from protobuf field string error_message = 4; + * @param string $var + * @return $this + */ + public function setErrorMessage($var) + { + GPBUtil::checkString($var, True); + $this->error_message = $var; + + return $this; + } + + /** + * May contain the value(s) of the field(s). This is not always available. You + * should absolutely not rely on it and use it only for manual model + * debugging. + * + * Generated from protobuf field string offending_values = 5; + * @return string + */ + public function getOffendingValues() + { + return $this->offending_values; + } + + /** + * May contain the value(s) of the field(s). This is not always available. You + * should absolutely not rely on it and use it only for manual model + * debugging. + * + * Generated from protobuf field string offending_values = 5; + * @param string $var + * @return $this + */ + public function setOffendingValues($var) + { + GPBUtil::checkString($var, True); + $this->offending_values = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursValidationError/FieldReference.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursValidationError/FieldReference.php new file mode 100644 index 000000000000..0956451618ea --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursValidationError/FieldReference.php @@ -0,0 +1,197 @@ +google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference + */ +class FieldReference extends \Google\Protobuf\Internal\Message +{ + /** + * Name of the field, e.g., "vehicles". + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Recursively nested sub-field, if needed. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference sub_field = 3; + */ + protected $sub_field = null; + protected $index_or_key; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Name of the field, e.g., "vehicles". + * @type int $index + * Index of the field if repeated. + * @type string $key + * Key if the field is a map. + * @type \Google\Maps\RouteOptimization\V1\OptimizeToursValidationError\FieldReference $sub_field + * Recursively nested sub-field, if needed. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); + parent::__construct($data); + } + + /** + * Name of the field, e.g., "vehicles". + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Name of the field, e.g., "vehicles". + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Index of the field if repeated. + * + * Generated from protobuf field int32 index = 2; + * @return int + */ + public function getIndex() + { + return $this->readOneof(2); + } + + public function hasIndex() + { + return $this->hasOneof(2); + } + + /** + * Index of the field if repeated. + * + * Generated from protobuf field int32 index = 2; + * @param int $var + * @return $this + */ + public function setIndex($var) + { + GPBUtil::checkInt32($var); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Key if the field is a map. + * + * Generated from protobuf field string key = 4; + * @return string + */ + public function getKey() + { + return $this->readOneof(4); + } + + public function hasKey() + { + return $this->hasOneof(4); + } + + /** + * Key if the field is a map. + * + * Generated from protobuf field string key = 4; + * @param string $var + * @return $this + */ + public function setKey($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Recursively nested sub-field, if needed. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference sub_field = 3; + * @return \Google\Maps\RouteOptimization\V1\OptimizeToursValidationError\FieldReference|null + */ + public function getSubField() + { + return $this->sub_field; + } + + public function hasSubField() + { + return isset($this->sub_field); + } + + public function clearSubField() + { + unset($this->sub_field); + } + + /** + * Recursively nested sub-field, if needed. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference sub_field = 3; + * @param \Google\Maps\RouteOptimization\V1\OptimizeToursValidationError\FieldReference $var + * @return $this + */ + public function setSubField($var) + { + GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\OptimizeToursValidationError\FieldReference::class); + $this->sub_field = $var; + + return $this; + } + + /** + * @return string + */ + public function getIndexOrKey() + { + return $this->whichOneof("index_or_key"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(FieldReference::class, \Google\Maps\RouteOptimization\V1\OptimizeToursValidationError_FieldReference::class); + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OutputConfig.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OutputConfig.php new file mode 100644 index 000000000000..7ed7e0a1d93f --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OutputConfig.php @@ -0,0 +1,111 @@ +google.maps.routeoptimization.v1.OutputConfig + */ +class OutputConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The output data format. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.DataFormat data_format = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $data_format = 0; + protected $destination; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Maps\RouteOptimization\V1\GcsDestination $gcs_destination + * The Google Cloud Storage location to write the output to. + * @type int $data_format + * Required. The output data format. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); + parent::__construct($data); + } + + /** + * The Google Cloud Storage location to write the output to. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.GcsDestination gcs_destination = 1; + * @return \Google\Maps\RouteOptimization\V1\GcsDestination|null + */ + public function getGcsDestination() + { + return $this->readOneof(1); + } + + public function hasGcsDestination() + { + return $this->hasOneof(1); + } + + /** + * The Google Cloud Storage location to write the output to. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.GcsDestination gcs_destination = 1; + * @param \Google\Maps\RouteOptimization\V1\GcsDestination $var + * @return $this + */ + public function setGcsDestination($var) + { + GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\GcsDestination::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Required. The output data format. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.DataFormat data_format = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getDataFormat() + { + return $this->data_format; + } + + /** + * Required. The output data format. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.DataFormat data_format = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setDataFormat($var) + { + GPBUtil::checkEnum($var, \Google\Maps\RouteOptimization\V1\DataFormat::class); + $this->data_format = $var; + + return $this; + } + + /** + * @return string + */ + public function getDestination() + { + return $this->whichOneof("destination"); + } + +} + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/RouteModifiers.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/RouteModifiers.php new file mode 100644 index 000000000000..941420fd652c --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/RouteModifiers.php @@ -0,0 +1,204 @@ +google.maps.routeoptimization.v1.RouteModifiers + */ +class RouteModifiers extends \Google\Protobuf\Internal\Message +{ + /** + * Specifies whether to avoid toll roads where reasonable. Preference will be + * given to routes not containing toll roads. Applies only to motorized travel + * modes. + * + * Generated from protobuf field bool avoid_tolls = 2; + */ + protected $avoid_tolls = false; + /** + * Specifies whether to avoid highways where reasonable. Preference will be + * given to routes not containing highways. Applies only to motorized travel + * modes. + * + * Generated from protobuf field bool avoid_highways = 3; + */ + protected $avoid_highways = false; + /** + * Specifies whether to avoid ferries where reasonable. Preference will be + * given to routes not containing travel by ferries. Applies only to motorized + * travel modes. + * + * Generated from protobuf field bool avoid_ferries = 4; + */ + protected $avoid_ferries = false; + /** + * Optional. Specifies whether to avoid navigating indoors where reasonable. + * Preference will be given to routes not containing indoor navigation. + * Applies only to the `WALKING` travel mode. + * + * Generated from protobuf field bool avoid_indoor = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $avoid_indoor = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $avoid_tolls + * Specifies whether to avoid toll roads where reasonable. Preference will be + * given to routes not containing toll roads. Applies only to motorized travel + * modes. + * @type bool $avoid_highways + * Specifies whether to avoid highways where reasonable. Preference will be + * given to routes not containing highways. Applies only to motorized travel + * modes. + * @type bool $avoid_ferries + * Specifies whether to avoid ferries where reasonable. Preference will be + * given to routes not containing travel by ferries. Applies only to motorized + * travel modes. + * @type bool $avoid_indoor + * Optional. Specifies whether to avoid navigating indoors where reasonable. + * Preference will be given to routes not containing indoor navigation. + * Applies only to the `WALKING` travel mode. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); + parent::__construct($data); + } + + /** + * Specifies whether to avoid toll roads where reasonable. Preference will be + * given to routes not containing toll roads. Applies only to motorized travel + * modes. + * + * Generated from protobuf field bool avoid_tolls = 2; + * @return bool + */ + public function getAvoidTolls() + { + return $this->avoid_tolls; + } + + /** + * Specifies whether to avoid toll roads where reasonable. Preference will be + * given to routes not containing toll roads. Applies only to motorized travel + * modes. + * + * Generated from protobuf field bool avoid_tolls = 2; + * @param bool $var + * @return $this + */ + public function setAvoidTolls($var) + { + GPBUtil::checkBool($var); + $this->avoid_tolls = $var; + + return $this; + } + + /** + * Specifies whether to avoid highways where reasonable. Preference will be + * given to routes not containing highways. Applies only to motorized travel + * modes. + * + * Generated from protobuf field bool avoid_highways = 3; + * @return bool + */ + public function getAvoidHighways() + { + return $this->avoid_highways; + } + + /** + * Specifies whether to avoid highways where reasonable. Preference will be + * given to routes not containing highways. Applies only to motorized travel + * modes. + * + * Generated from protobuf field bool avoid_highways = 3; + * @param bool $var + * @return $this + */ + public function setAvoidHighways($var) + { + GPBUtil::checkBool($var); + $this->avoid_highways = $var; + + return $this; + } + + /** + * Specifies whether to avoid ferries where reasonable. Preference will be + * given to routes not containing travel by ferries. Applies only to motorized + * travel modes. + * + * Generated from protobuf field bool avoid_ferries = 4; + * @return bool + */ + public function getAvoidFerries() + { + return $this->avoid_ferries; + } + + /** + * Specifies whether to avoid ferries where reasonable. Preference will be + * given to routes not containing travel by ferries. Applies only to motorized + * travel modes. + * + * Generated from protobuf field bool avoid_ferries = 4; + * @param bool $var + * @return $this + */ + public function setAvoidFerries($var) + { + GPBUtil::checkBool($var); + $this->avoid_ferries = $var; + + return $this; + } + + /** + * Optional. Specifies whether to avoid navigating indoors where reasonable. + * Preference will be given to routes not containing indoor navigation. + * Applies only to the `WALKING` travel mode. + * + * Generated from protobuf field bool avoid_indoor = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getAvoidIndoor() + { + return $this->avoid_indoor; + } + + /** + * Optional. Specifies whether to avoid navigating indoors where reasonable. + * Preference will be given to routes not containing indoor navigation. + * Applies only to the `WALKING` travel mode. + * + * Generated from protobuf field bool avoid_indoor = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setAvoidIndoor($var) + { + GPBUtil::checkBool($var); + $this->avoid_indoor = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Shipment.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Shipment.php new file mode 100644 index 000000000000..c3de173e6cc8 --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Shipment.php @@ -0,0 +1,841 @@ +google.maps.routeoptimization.v1.Shipment + */ +class Shipment extends \Google\Protobuf\Internal\Message +{ + /** + * The user-defined display name of the shipment. + * It can be up to 63 characters long and may use UTF-8 characters. + * + * Generated from protobuf field string display_name = 16; + */ + protected $display_name = ''; + /** + * Set of pickup alternatives associated to the shipment. If not specified, + * the vehicle only needs to visit a location corresponding to the deliveries. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.Shipment.VisitRequest pickups = 1; + */ + private $pickups; + /** + * Set of delivery alternatives associated to the shipment. If not specified, + * the vehicle only needs to visit a location corresponding to the pickups. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.Shipment.VisitRequest deliveries = 2; + */ + private $deliveries; + /** + * Load demands of the shipment (for example weight, volume, number of + * pallets etc). The keys in the map should be identifiers describing the type + * of the corresponding load, ideally also including the units. + * For example: "weight_kg", "volume_gallons", "pallet_count", etc. + * If a given key does not appear in the map, the corresponding load is + * considered as null. + * + * Generated from protobuf field map load_demands = 14; + */ + private $load_demands; + /** + * If the shipment is not completed, this penalty is added to the overall + * cost of the routes. A shipment is considered completed if one of its pickup + * and delivery alternatives is visited. The cost may be expressed in the + * same unit used for all other cost-related fields in the model and must be + * positive. + * *IMPORTANT*: If this penalty is not specified, it is considered infinite, + * i.e. the shipment must be completed. + * + * Generated from protobuf field optional double penalty_cost = 4; + */ + protected $penalty_cost = null; + /** + * The set of vehicles that may perform this shipment. If empty, all vehicles + * may perform it. Vehicles are given by their index in the `ShipmentModel`'s + * `vehicles` list. + * + * Generated from protobuf field repeated int32 allowed_vehicle_indices = 5; + */ + private $allowed_vehicle_indices; + /** + * Specifies the cost that is incurred when this shipment is delivered by each + * vehicle. If specified, it must have EITHER: + * * the same number of elements as `costs_per_vehicle_indices`. + * `costs_per_vehicle[i]` corresponds to vehicle + * `costs_per_vehicle_indices[i]` of the model. + * * the same number of elements as there are vehicles in the model. The + * i-th element corresponds to vehicle #i of the model. + * These costs must be in the same unit as `penalty_cost` and must not be + * negative. Leave this field empty, if there are no such costs. + * + * Generated from protobuf field repeated double costs_per_vehicle = 6; + */ + private $costs_per_vehicle; + /** + * Indices of the vehicles to which `costs_per_vehicle` applies. If non-empty, + * it must have the same number of elements as `costs_per_vehicle`. A vehicle + * index may not be specified more than once. If a vehicle is excluded from + * `costs_per_vehicle_indices`, its cost is zero. + * + * Generated from protobuf field repeated int32 costs_per_vehicle_indices = 7; + */ + private $costs_per_vehicle_indices; + /** + * Specifies the maximum relative detour time compared to the shortest path + * from pickup to delivery. If specified, it must be nonnegative, and the + * shipment must contain at least a pickup and a delivery. + * For example, let t be the shortest time taken to go from the selected + * pickup alternative directly to the selected delivery alternative. Then + * setting `pickup_to_delivery_relative_detour_limit` enforces: + * ``` + * start_time(delivery) - start_time(pickup) <= + * std::ceil(t * (1.0 + pickup_to_delivery_relative_detour_limit)) + * ``` + * If both relative and absolute limits are specified on the same shipment, + * the more constraining limit is used for each possible pickup/delivery pair. + * As of 2017/10, detours are only supported when travel durations do not + * depend on vehicles. + * + * Generated from protobuf field optional double pickup_to_delivery_relative_detour_limit = 8; + */ + protected $pickup_to_delivery_relative_detour_limit = null; + /** + * Specifies the maximum absolute detour time compared to the shortest path + * from pickup to delivery. If specified, it must be nonnegative, and the + * shipment must contain at least a pickup and a delivery. + * For example, let t be the shortest time taken to go from the selected + * pickup alternative directly to the selected delivery alternative. Then + * setting `pickup_to_delivery_absolute_detour_limit` enforces: + * ``` + * start_time(delivery) - start_time(pickup) <= + * t + pickup_to_delivery_absolute_detour_limit + * ``` + * If both relative and absolute limits are specified on the same shipment, + * the more constraining limit is used for each possible pickup/delivery pair. + * As of 2017/10, detours are only supported when travel durations do not + * depend on vehicles. + * + * Generated from protobuf field .google.protobuf.Duration pickup_to_delivery_absolute_detour_limit = 9; + */ + protected $pickup_to_delivery_absolute_detour_limit = null; + /** + * Specifies the maximum duration from start of pickup to start of delivery of + * a shipment. If specified, it must be nonnegative, and the shipment must + * contain at least a pickup and a delivery. This does not depend on which + * alternatives are selected for pickup and delivery, nor on vehicle speed. + * This can be specified alongside maximum detour constraints: the solution + * will respect both specifications. + * + * Generated from protobuf field .google.protobuf.Duration pickup_to_delivery_time_limit = 10; + */ + protected $pickup_to_delivery_time_limit = null; + /** + * Non-empty string specifying a "type" for this shipment. + * This feature can be used to define incompatibilities or requirements + * between `shipment_types` (see `shipment_type_incompatibilities` and + * `shipment_type_requirements` in `ShipmentModel`). + * Differs from `visit_types` which is specified for a single visit: All + * pickup/deliveries belonging to the same shipment share the same + * `shipment_type`. + * + * Generated from protobuf field string shipment_type = 11; + */ + protected $shipment_type = ''; + /** + * Specifies a label for this shipment. This label is reported in the response + * in the `shipment_label` of the corresponding + * [ShipmentRoute.Visit][google.maps.routeoptimization.v1.ShipmentRoute.Visit]. + * + * Generated from protobuf field string label = 12; + */ + protected $label = ''; + /** + * If true, skip this shipment, but don't apply a `penalty_cost`. + * Ignoring a shipment results in a validation error when there are any + * `shipment_type_requirements` in the model. + * Ignoring a shipment that is performed in `injected_first_solution_routes` + * or `injected_solution_constraint` is permitted; the solver removes the + * related pickup/delivery visits from the performing route. + * `precedence_rules` that reference ignored shipments will also be ignored. + * + * Generated from protobuf field bool ignore = 13; + */ + protected $ignore = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $display_name + * The user-defined display name of the shipment. + * It can be up to 63 characters long and may use UTF-8 characters. + * @type array<\Google\Maps\RouteOptimization\V1\Shipment\VisitRequest>|\Google\Protobuf\Internal\RepeatedField $pickups + * Set of pickup alternatives associated to the shipment. If not specified, + * the vehicle only needs to visit a location corresponding to the deliveries. + * @type array<\Google\Maps\RouteOptimization\V1\Shipment\VisitRequest>|\Google\Protobuf\Internal\RepeatedField $deliveries + * Set of delivery alternatives associated to the shipment. If not specified, + * the vehicle only needs to visit a location corresponding to the pickups. + * @type array|\Google\Protobuf\Internal\MapField $load_demands + * Load demands of the shipment (for example weight, volume, number of + * pallets etc). The keys in the map should be identifiers describing the type + * of the corresponding load, ideally also including the units. + * For example: "weight_kg", "volume_gallons", "pallet_count", etc. + * If a given key does not appear in the map, the corresponding load is + * considered as null. + * @type float $penalty_cost + * If the shipment is not completed, this penalty is added to the overall + * cost of the routes. A shipment is considered completed if one of its pickup + * and delivery alternatives is visited. The cost may be expressed in the + * same unit used for all other cost-related fields in the model and must be + * positive. + * *IMPORTANT*: If this penalty is not specified, it is considered infinite, + * i.e. the shipment must be completed. + * @type array|\Google\Protobuf\Internal\RepeatedField $allowed_vehicle_indices + * The set of vehicles that may perform this shipment. If empty, all vehicles + * may perform it. Vehicles are given by their index in the `ShipmentModel`'s + * `vehicles` list. + * @type array|\Google\Protobuf\Internal\RepeatedField $costs_per_vehicle + * Specifies the cost that is incurred when this shipment is delivered by each + * vehicle. If specified, it must have EITHER: + * * the same number of elements as `costs_per_vehicle_indices`. + * `costs_per_vehicle[i]` corresponds to vehicle + * `costs_per_vehicle_indices[i]` of the model. + * * the same number of elements as there are vehicles in the model. The + * i-th element corresponds to vehicle #i of the model. + * These costs must be in the same unit as `penalty_cost` and must not be + * negative. Leave this field empty, if there are no such costs. + * @type array|\Google\Protobuf\Internal\RepeatedField $costs_per_vehicle_indices + * Indices of the vehicles to which `costs_per_vehicle` applies. If non-empty, + * it must have the same number of elements as `costs_per_vehicle`. A vehicle + * index may not be specified more than once. If a vehicle is excluded from + * `costs_per_vehicle_indices`, its cost is zero. + * @type float $pickup_to_delivery_relative_detour_limit + * Specifies the maximum relative detour time compared to the shortest path + * from pickup to delivery. If specified, it must be nonnegative, and the + * shipment must contain at least a pickup and a delivery. + * For example, let t be the shortest time taken to go from the selected + * pickup alternative directly to the selected delivery alternative. Then + * setting `pickup_to_delivery_relative_detour_limit` enforces: + * ``` + * start_time(delivery) - start_time(pickup) <= + * std::ceil(t * (1.0 + pickup_to_delivery_relative_detour_limit)) + * ``` + * If both relative and absolute limits are specified on the same shipment, + * the more constraining limit is used for each possible pickup/delivery pair. + * As of 2017/10, detours are only supported when travel durations do not + * depend on vehicles. + * @type \Google\Protobuf\Duration $pickup_to_delivery_absolute_detour_limit + * Specifies the maximum absolute detour time compared to the shortest path + * from pickup to delivery. If specified, it must be nonnegative, and the + * shipment must contain at least a pickup and a delivery. + * For example, let t be the shortest time taken to go from the selected + * pickup alternative directly to the selected delivery alternative. Then + * setting `pickup_to_delivery_absolute_detour_limit` enforces: + * ``` + * start_time(delivery) - start_time(pickup) <= + * t + pickup_to_delivery_absolute_detour_limit + * ``` + * If both relative and absolute limits are specified on the same shipment, + * the more constraining limit is used for each possible pickup/delivery pair. + * As of 2017/10, detours are only supported when travel durations do not + * depend on vehicles. + * @type \Google\Protobuf\Duration $pickup_to_delivery_time_limit + * Specifies the maximum duration from start of pickup to start of delivery of + * a shipment. If specified, it must be nonnegative, and the shipment must + * contain at least a pickup and a delivery. This does not depend on which + * alternatives are selected for pickup and delivery, nor on vehicle speed. + * This can be specified alongside maximum detour constraints: the solution + * will respect both specifications. + * @type string $shipment_type + * Non-empty string specifying a "type" for this shipment. + * This feature can be used to define incompatibilities or requirements + * between `shipment_types` (see `shipment_type_incompatibilities` and + * `shipment_type_requirements` in `ShipmentModel`). + * Differs from `visit_types` which is specified for a single visit: All + * pickup/deliveries belonging to the same shipment share the same + * `shipment_type`. + * @type string $label + * Specifies a label for this shipment. This label is reported in the response + * in the `shipment_label` of the corresponding + * [ShipmentRoute.Visit][google.maps.routeoptimization.v1.ShipmentRoute.Visit]. + * @type bool $ignore + * If true, skip this shipment, but don't apply a `penalty_cost`. + * Ignoring a shipment results in a validation error when there are any + * `shipment_type_requirements` in the model. + * Ignoring a shipment that is performed in `injected_first_solution_routes` + * or `injected_solution_constraint` is permitted; the solver removes the + * related pickup/delivery visits from the performing route. + * `precedence_rules` that reference ignored shipments will also be ignored. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); + parent::__construct($data); + } + + /** + * The user-defined display name of the shipment. + * It can be up to 63 characters long and may use UTF-8 characters. + * + * Generated from protobuf field string display_name = 16; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * The user-defined display name of the shipment. + * It can be up to 63 characters long and may use UTF-8 characters. + * + * Generated from protobuf field string display_name = 16; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Set of pickup alternatives associated to the shipment. If not specified, + * the vehicle only needs to visit a location corresponding to the deliveries. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.Shipment.VisitRequest pickups = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPickups() + { + return $this->pickups; + } + + /** + * Set of pickup alternatives associated to the shipment. If not specified, + * the vehicle only needs to visit a location corresponding to the deliveries. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.Shipment.VisitRequest pickups = 1; + * @param array<\Google\Maps\RouteOptimization\V1\Shipment\VisitRequest>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPickups($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\Shipment\VisitRequest::class); + $this->pickups = $arr; + + return $this; + } + + /** + * Set of delivery alternatives associated to the shipment. If not specified, + * the vehicle only needs to visit a location corresponding to the pickups. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.Shipment.VisitRequest deliveries = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDeliveries() + { + return $this->deliveries; + } + + /** + * Set of delivery alternatives associated to the shipment. If not specified, + * the vehicle only needs to visit a location corresponding to the pickups. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.Shipment.VisitRequest deliveries = 2; + * @param array<\Google\Maps\RouteOptimization\V1\Shipment\VisitRequest>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDeliveries($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\Shipment\VisitRequest::class); + $this->deliveries = $arr; + + return $this; + } + + /** + * Load demands of the shipment (for example weight, volume, number of + * pallets etc). The keys in the map should be identifiers describing the type + * of the corresponding load, ideally also including the units. + * For example: "weight_kg", "volume_gallons", "pallet_count", etc. + * If a given key does not appear in the map, the corresponding load is + * considered as null. + * + * Generated from protobuf field map load_demands = 14; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLoadDemands() + { + return $this->load_demands; + } + + /** + * Load demands of the shipment (for example weight, volume, number of + * pallets etc). The keys in the map should be identifiers describing the type + * of the corresponding load, ideally also including the units. + * For example: "weight_kg", "volume_gallons", "pallet_count", etc. + * If a given key does not appear in the map, the corresponding load is + * considered as null. + * + * Generated from protobuf field map load_demands = 14; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLoadDemands($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\Shipment\Load::class); + $this->load_demands = $arr; + + return $this; + } + + /** + * If the shipment is not completed, this penalty is added to the overall + * cost of the routes. A shipment is considered completed if one of its pickup + * and delivery alternatives is visited. The cost may be expressed in the + * same unit used for all other cost-related fields in the model and must be + * positive. + * *IMPORTANT*: If this penalty is not specified, it is considered infinite, + * i.e. the shipment must be completed. + * + * Generated from protobuf field optional double penalty_cost = 4; + * @return float + */ + public function getPenaltyCost() + { + return isset($this->penalty_cost) ? $this->penalty_cost : 0.0; + } + + public function hasPenaltyCost() + { + return isset($this->penalty_cost); + } + + public function clearPenaltyCost() + { + unset($this->penalty_cost); + } + + /** + * If the shipment is not completed, this penalty is added to the overall + * cost of the routes. A shipment is considered completed if one of its pickup + * and delivery alternatives is visited. The cost may be expressed in the + * same unit used for all other cost-related fields in the model and must be + * positive. + * *IMPORTANT*: If this penalty is not specified, it is considered infinite, + * i.e. the shipment must be completed. + * + * Generated from protobuf field optional double penalty_cost = 4; + * @param float $var + * @return $this + */ + public function setPenaltyCost($var) + { + GPBUtil::checkDouble($var); + $this->penalty_cost = $var; + + return $this; + } + + /** + * The set of vehicles that may perform this shipment. If empty, all vehicles + * may perform it. Vehicles are given by their index in the `ShipmentModel`'s + * `vehicles` list. + * + * Generated from protobuf field repeated int32 allowed_vehicle_indices = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAllowedVehicleIndices() + { + return $this->allowed_vehicle_indices; + } + + /** + * The set of vehicles that may perform this shipment. If empty, all vehicles + * may perform it. Vehicles are given by their index in the `ShipmentModel`'s + * `vehicles` list. + * + * Generated from protobuf field repeated int32 allowed_vehicle_indices = 5; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAllowedVehicleIndices($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); + $this->allowed_vehicle_indices = $arr; + + return $this; + } + + /** + * Specifies the cost that is incurred when this shipment is delivered by each + * vehicle. If specified, it must have EITHER: + * * the same number of elements as `costs_per_vehicle_indices`. + * `costs_per_vehicle[i]` corresponds to vehicle + * `costs_per_vehicle_indices[i]` of the model. + * * the same number of elements as there are vehicles in the model. The + * i-th element corresponds to vehicle #i of the model. + * These costs must be in the same unit as `penalty_cost` and must not be + * negative. Leave this field empty, if there are no such costs. + * + * Generated from protobuf field repeated double costs_per_vehicle = 6; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCostsPerVehicle() + { + return $this->costs_per_vehicle; + } + + /** + * Specifies the cost that is incurred when this shipment is delivered by each + * vehicle. If specified, it must have EITHER: + * * the same number of elements as `costs_per_vehicle_indices`. + * `costs_per_vehicle[i]` corresponds to vehicle + * `costs_per_vehicle_indices[i]` of the model. + * * the same number of elements as there are vehicles in the model. The + * i-th element corresponds to vehicle #i of the model. + * These costs must be in the same unit as `penalty_cost` and must not be + * negative. Leave this field empty, if there are no such costs. + * + * Generated from protobuf field repeated double costs_per_vehicle = 6; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCostsPerVehicle($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::DOUBLE); + $this->costs_per_vehicle = $arr; + + return $this; + } + + /** + * Indices of the vehicles to which `costs_per_vehicle` applies. If non-empty, + * it must have the same number of elements as `costs_per_vehicle`. A vehicle + * index may not be specified more than once. If a vehicle is excluded from + * `costs_per_vehicle_indices`, its cost is zero. + * + * Generated from protobuf field repeated int32 costs_per_vehicle_indices = 7; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCostsPerVehicleIndices() + { + return $this->costs_per_vehicle_indices; + } + + /** + * Indices of the vehicles to which `costs_per_vehicle` applies. If non-empty, + * it must have the same number of elements as `costs_per_vehicle`. A vehicle + * index may not be specified more than once. If a vehicle is excluded from + * `costs_per_vehicle_indices`, its cost is zero. + * + * Generated from protobuf field repeated int32 costs_per_vehicle_indices = 7; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCostsPerVehicleIndices($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); + $this->costs_per_vehicle_indices = $arr; + + return $this; + } + + /** + * Specifies the maximum relative detour time compared to the shortest path + * from pickup to delivery. If specified, it must be nonnegative, and the + * shipment must contain at least a pickup and a delivery. + * For example, let t be the shortest time taken to go from the selected + * pickup alternative directly to the selected delivery alternative. Then + * setting `pickup_to_delivery_relative_detour_limit` enforces: + * ``` + * start_time(delivery) - start_time(pickup) <= + * std::ceil(t * (1.0 + pickup_to_delivery_relative_detour_limit)) + * ``` + * If both relative and absolute limits are specified on the same shipment, + * the more constraining limit is used for each possible pickup/delivery pair. + * As of 2017/10, detours are only supported when travel durations do not + * depend on vehicles. + * + * Generated from protobuf field optional double pickup_to_delivery_relative_detour_limit = 8; + * @return float + */ + public function getPickupToDeliveryRelativeDetourLimit() + { + return isset($this->pickup_to_delivery_relative_detour_limit) ? $this->pickup_to_delivery_relative_detour_limit : 0.0; + } + + public function hasPickupToDeliveryRelativeDetourLimit() + { + return isset($this->pickup_to_delivery_relative_detour_limit); + } + + public function clearPickupToDeliveryRelativeDetourLimit() + { + unset($this->pickup_to_delivery_relative_detour_limit); + } + + /** + * Specifies the maximum relative detour time compared to the shortest path + * from pickup to delivery. If specified, it must be nonnegative, and the + * shipment must contain at least a pickup and a delivery. + * For example, let t be the shortest time taken to go from the selected + * pickup alternative directly to the selected delivery alternative. Then + * setting `pickup_to_delivery_relative_detour_limit` enforces: + * ``` + * start_time(delivery) - start_time(pickup) <= + * std::ceil(t * (1.0 + pickup_to_delivery_relative_detour_limit)) + * ``` + * If both relative and absolute limits are specified on the same shipment, + * the more constraining limit is used for each possible pickup/delivery pair. + * As of 2017/10, detours are only supported when travel durations do not + * depend on vehicles. + * + * Generated from protobuf field optional double pickup_to_delivery_relative_detour_limit = 8; + * @param float $var + * @return $this + */ + public function setPickupToDeliveryRelativeDetourLimit($var) + { + GPBUtil::checkDouble($var); + $this->pickup_to_delivery_relative_detour_limit = $var; + + return $this; + } + + /** + * Specifies the maximum absolute detour time compared to the shortest path + * from pickup to delivery. If specified, it must be nonnegative, and the + * shipment must contain at least a pickup and a delivery. + * For example, let t be the shortest time taken to go from the selected + * pickup alternative directly to the selected delivery alternative. Then + * setting `pickup_to_delivery_absolute_detour_limit` enforces: + * ``` + * start_time(delivery) - start_time(pickup) <= + * t + pickup_to_delivery_absolute_detour_limit + * ``` + * If both relative and absolute limits are specified on the same shipment, + * the more constraining limit is used for each possible pickup/delivery pair. + * As of 2017/10, detours are only supported when travel durations do not + * depend on vehicles. + * + * Generated from protobuf field .google.protobuf.Duration pickup_to_delivery_absolute_detour_limit = 9; + * @return \Google\Protobuf\Duration|null + */ + public function getPickupToDeliveryAbsoluteDetourLimit() + { + return $this->pickup_to_delivery_absolute_detour_limit; + } + + public function hasPickupToDeliveryAbsoluteDetourLimit() + { + return isset($this->pickup_to_delivery_absolute_detour_limit); + } + + public function clearPickupToDeliveryAbsoluteDetourLimit() + { + unset($this->pickup_to_delivery_absolute_detour_limit); + } + + /** + * Specifies the maximum absolute detour time compared to the shortest path + * from pickup to delivery. If specified, it must be nonnegative, and the + * shipment must contain at least a pickup and a delivery. + * For example, let t be the shortest time taken to go from the selected + * pickup alternative directly to the selected delivery alternative. Then + * setting `pickup_to_delivery_absolute_detour_limit` enforces: + * ``` + * start_time(delivery) - start_time(pickup) <= + * t + pickup_to_delivery_absolute_detour_limit + * ``` + * If both relative and absolute limits are specified on the same shipment, + * the more constraining limit is used for each possible pickup/delivery pair. + * As of 2017/10, detours are only supported when travel durations do not + * depend on vehicles. + * + * Generated from protobuf field .google.protobuf.Duration pickup_to_delivery_absolute_detour_limit = 9; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setPickupToDeliveryAbsoluteDetourLimit($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->pickup_to_delivery_absolute_detour_limit = $var; + + return $this; + } + + /** + * Specifies the maximum duration from start of pickup to start of delivery of + * a shipment. If specified, it must be nonnegative, and the shipment must + * contain at least a pickup and a delivery. This does not depend on which + * alternatives are selected for pickup and delivery, nor on vehicle speed. + * This can be specified alongside maximum detour constraints: the solution + * will respect both specifications. + * + * Generated from protobuf field .google.protobuf.Duration pickup_to_delivery_time_limit = 10; + * @return \Google\Protobuf\Duration|null + */ + public function getPickupToDeliveryTimeLimit() + { + return $this->pickup_to_delivery_time_limit; + } + + public function hasPickupToDeliveryTimeLimit() + { + return isset($this->pickup_to_delivery_time_limit); + } + + public function clearPickupToDeliveryTimeLimit() + { + unset($this->pickup_to_delivery_time_limit); + } + + /** + * Specifies the maximum duration from start of pickup to start of delivery of + * a shipment. If specified, it must be nonnegative, and the shipment must + * contain at least a pickup and a delivery. This does not depend on which + * alternatives are selected for pickup and delivery, nor on vehicle speed. + * This can be specified alongside maximum detour constraints: the solution + * will respect both specifications. + * + * Generated from protobuf field .google.protobuf.Duration pickup_to_delivery_time_limit = 10; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setPickupToDeliveryTimeLimit($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->pickup_to_delivery_time_limit = $var; + + return $this; + } + + /** + * Non-empty string specifying a "type" for this shipment. + * This feature can be used to define incompatibilities or requirements + * between `shipment_types` (see `shipment_type_incompatibilities` and + * `shipment_type_requirements` in `ShipmentModel`). + * Differs from `visit_types` which is specified for a single visit: All + * pickup/deliveries belonging to the same shipment share the same + * `shipment_type`. + * + * Generated from protobuf field string shipment_type = 11; + * @return string + */ + public function getShipmentType() + { + return $this->shipment_type; + } + + /** + * Non-empty string specifying a "type" for this shipment. + * This feature can be used to define incompatibilities or requirements + * between `shipment_types` (see `shipment_type_incompatibilities` and + * `shipment_type_requirements` in `ShipmentModel`). + * Differs from `visit_types` which is specified for a single visit: All + * pickup/deliveries belonging to the same shipment share the same + * `shipment_type`. + * + * Generated from protobuf field string shipment_type = 11; + * @param string $var + * @return $this + */ + public function setShipmentType($var) + { + GPBUtil::checkString($var, True); + $this->shipment_type = $var; + + return $this; + } + + /** + * Specifies a label for this shipment. This label is reported in the response + * in the `shipment_label` of the corresponding + * [ShipmentRoute.Visit][google.maps.routeoptimization.v1.ShipmentRoute.Visit]. + * + * Generated from protobuf field string label = 12; + * @return string + */ + public function getLabel() + { + return $this->label; + } + + /** + * Specifies a label for this shipment. This label is reported in the response + * in the `shipment_label` of the corresponding + * [ShipmentRoute.Visit][google.maps.routeoptimization.v1.ShipmentRoute.Visit]. + * + * Generated from protobuf field string label = 12; + * @param string $var + * @return $this + */ + public function setLabel($var) + { + GPBUtil::checkString($var, True); + $this->label = $var; + + return $this; + } + + /** + * If true, skip this shipment, but don't apply a `penalty_cost`. + * Ignoring a shipment results in a validation error when there are any + * `shipment_type_requirements` in the model. + * Ignoring a shipment that is performed in `injected_first_solution_routes` + * or `injected_solution_constraint` is permitted; the solver removes the + * related pickup/delivery visits from the performing route. + * `precedence_rules` that reference ignored shipments will also be ignored. + * + * Generated from protobuf field bool ignore = 13; + * @return bool + */ + public function getIgnore() + { + return $this->ignore; + } + + /** + * If true, skip this shipment, but don't apply a `penalty_cost`. + * Ignoring a shipment results in a validation error when there are any + * `shipment_type_requirements` in the model. + * Ignoring a shipment that is performed in `injected_first_solution_routes` + * or `injected_solution_constraint` is permitted; the solver removes the + * related pickup/delivery visits from the performing route. + * `precedence_rules` that reference ignored shipments will also be ignored. + * + * Generated from protobuf field bool ignore = 13; + * @param bool $var + * @return $this + */ + public function setIgnore($var) + { + GPBUtil::checkBool($var); + $this->ignore = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Shipment/Load.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Shipment/Load.php new file mode 100644 index 000000000000..dec1b28584e2 --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Shipment/Load.php @@ -0,0 +1,81 @@ +google.maps.routeoptimization.v1.Shipment.Load + */ +class Load extends \Google\Protobuf\Internal\Message +{ + /** + * The amount by which the load of the vehicle performing the corresponding + * visit will vary. Since it is an integer, users are advised to choose an + * appropriate unit to avoid loss of precision. Must be ≥ 0. + * + * Generated from protobuf field int64 amount = 2; + */ + protected $amount = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $amount + * The amount by which the load of the vehicle performing the corresponding + * visit will vary. Since it is an integer, users are advised to choose an + * appropriate unit to avoid loss of precision. Must be ≥ 0. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); + parent::__construct($data); + } + + /** + * The amount by which the load of the vehicle performing the corresponding + * visit will vary. Since it is an integer, users are advised to choose an + * appropriate unit to avoid loss of precision. Must be ≥ 0. + * + * Generated from protobuf field int64 amount = 2; + * @return int|string + */ + public function getAmount() + { + return $this->amount; + } + + /** + * The amount by which the load of the vehicle performing the corresponding + * visit will vary. Since it is an integer, users are advised to choose an + * appropriate unit to avoid loss of precision. Must be ≥ 0. + * + * Generated from protobuf field int64 amount = 2; + * @param int|string $var + * @return $this + */ + public function setAmount($var) + { + GPBUtil::checkInt64($var); + $this->amount = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Load::class, \Google\Maps\RouteOptimization\V1\Shipment_Load::class); + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Shipment/VisitRequest.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Shipment/VisitRequest.php new file mode 100644 index 000000000000..518eb8d4c60e --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Shipment/VisitRequest.php @@ -0,0 +1,615 @@ +google.maps.routeoptimization.v1.Shipment.VisitRequest + */ +class VisitRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The geo-location where the vehicle arrives when performing this + * `VisitRequest`. If the shipment model has duration distance matrices, + * `arrival_location` must not be specified. + * + * Generated from protobuf field .google.type.LatLng arrival_location = 1; + */ + protected $arrival_location = null; + /** + * The waypoint where the vehicle arrives when performing this + * `VisitRequest`. If the shipment model has duration distance matrices, + * `arrival_waypoint` must not be specified. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.Waypoint arrival_waypoint = 2; + */ + protected $arrival_waypoint = null; + /** + * The geo-location where the vehicle departs after completing this + * `VisitRequest`. Can be omitted if it is the same as `arrival_location`. + * If the shipment model has duration distance matrices, + * `departure_location` must not be specified. + * + * Generated from protobuf field .google.type.LatLng departure_location = 3; + */ + protected $departure_location = null; + /** + * The waypoint where the vehicle departs after completing this + * `VisitRequest`. Can be omitted if it is the same as `arrival_waypoint`. + * If the shipment model has duration distance matrices, + * `departure_waypoint` must not be specified. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.Waypoint departure_waypoint = 4; + */ + protected $departure_waypoint = null; + /** + * Specifies tags attached to the visit request. + * Empty or duplicate strings are not allowed. + * + * Generated from protobuf field repeated string tags = 5; + */ + private $tags; + /** + * Time windows which constrain the arrival time at a visit. + * Note that a vehicle may depart outside of the arrival time window, i.e. + * arrival time + duration do not need to be inside a time window. This can + * result in waiting time if the vehicle arrives before + * [TimeWindow.start_time][google.maps.routeoptimization.v1.TimeWindow.start_time]. + * The absence of `TimeWindow` means that the vehicle can perform this visit + * at any time. + * Time windows must be disjoint, i.e. no time window must overlap with or + * be adjacent to another, and they must be in increasing order. + * `cost_per_hour_after_soft_end_time` and `soft_end_time` can only + * be set if there is a single time window. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.TimeWindow time_windows = 6; + */ + private $time_windows; + /** + * Duration of the visit, i.e. time spent by the vehicle between arrival + * and departure (to be added to the possible waiting time; see + * `time_windows`). + * + * Generated from protobuf field .google.protobuf.Duration duration = 7; + */ + protected $duration = null; + /** + * Cost to service this visit request on a vehicle route. This can be used + * to pay different costs for each alternative pickup or delivery of a + * shipment. This cost must be in the same unit as `Shipment.penalty_cost` + * and must not be negative. + * + * Generated from protobuf field double cost = 8; + */ + protected $cost = 0.0; + /** + * Load demands of this visit request. This is just like + * [Shipment.load_demands][google.maps.routeoptimization.v1.Shipment.load_demands] + * field, except that it only applies to this + * [VisitRequest][google.maps.routeoptimization.v1.Shipment.VisitRequest] + * instead of the whole + * [Shipment][google.maps.routeoptimization.v1.Shipment]. The demands listed + * here are added to the demands listed in + * [Shipment.load_demands][google.maps.routeoptimization.v1.Shipment.load_demands]. + * + * Generated from protobuf field map load_demands = 12; + */ + private $load_demands; + /** + * Specifies the types of the visit. This may be used to allocate additional + * time required for a vehicle to complete this visit (see + * [Vehicle.extra_visit_duration_for_visit_type][google.maps.routeoptimization.v1.Vehicle.extra_visit_duration_for_visit_type]). + * A type can only appear once. + * + * Generated from protobuf field repeated string visit_types = 10; + */ + private $visit_types; + /** + * Specifies a label for this `VisitRequest`. This label is reported in the + * response as `visit_label` in the corresponding + * [ShipmentRoute.Visit][google.maps.routeoptimization.v1.ShipmentRoute.Visit]. + * + * Generated from protobuf field string label = 11; + */ + protected $label = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Type\LatLng $arrival_location + * The geo-location where the vehicle arrives when performing this + * `VisitRequest`. If the shipment model has duration distance matrices, + * `arrival_location` must not be specified. + * @type \Google\Maps\RouteOptimization\V1\Waypoint $arrival_waypoint + * The waypoint where the vehicle arrives when performing this + * `VisitRequest`. If the shipment model has duration distance matrices, + * `arrival_waypoint` must not be specified. + * @type \Google\Type\LatLng $departure_location + * The geo-location where the vehicle departs after completing this + * `VisitRequest`. Can be omitted if it is the same as `arrival_location`. + * If the shipment model has duration distance matrices, + * `departure_location` must not be specified. + * @type \Google\Maps\RouteOptimization\V1\Waypoint $departure_waypoint + * The waypoint where the vehicle departs after completing this + * `VisitRequest`. Can be omitted if it is the same as `arrival_waypoint`. + * If the shipment model has duration distance matrices, + * `departure_waypoint` must not be specified. + * @type array|\Google\Protobuf\Internal\RepeatedField $tags + * Specifies tags attached to the visit request. + * Empty or duplicate strings are not allowed. + * @type array<\Google\Maps\RouteOptimization\V1\TimeWindow>|\Google\Protobuf\Internal\RepeatedField $time_windows + * Time windows which constrain the arrival time at a visit. + * Note that a vehicle may depart outside of the arrival time window, i.e. + * arrival time + duration do not need to be inside a time window. This can + * result in waiting time if the vehicle arrives before + * [TimeWindow.start_time][google.maps.routeoptimization.v1.TimeWindow.start_time]. + * The absence of `TimeWindow` means that the vehicle can perform this visit + * at any time. + * Time windows must be disjoint, i.e. no time window must overlap with or + * be adjacent to another, and they must be in increasing order. + * `cost_per_hour_after_soft_end_time` and `soft_end_time` can only + * be set if there is a single time window. + * @type \Google\Protobuf\Duration $duration + * Duration of the visit, i.e. time spent by the vehicle between arrival + * and departure (to be added to the possible waiting time; see + * `time_windows`). + * @type float $cost + * Cost to service this visit request on a vehicle route. This can be used + * to pay different costs for each alternative pickup or delivery of a + * shipment. This cost must be in the same unit as `Shipment.penalty_cost` + * and must not be negative. + * @type array|\Google\Protobuf\Internal\MapField $load_demands + * Load demands of this visit request. This is just like + * [Shipment.load_demands][google.maps.routeoptimization.v1.Shipment.load_demands] + * field, except that it only applies to this + * [VisitRequest][google.maps.routeoptimization.v1.Shipment.VisitRequest] + * instead of the whole + * [Shipment][google.maps.routeoptimization.v1.Shipment]. The demands listed + * here are added to the demands listed in + * [Shipment.load_demands][google.maps.routeoptimization.v1.Shipment.load_demands]. + * @type array|\Google\Protobuf\Internal\RepeatedField $visit_types + * Specifies the types of the visit. This may be used to allocate additional + * time required for a vehicle to complete this visit (see + * [Vehicle.extra_visit_duration_for_visit_type][google.maps.routeoptimization.v1.Vehicle.extra_visit_duration_for_visit_type]). + * A type can only appear once. + * @type string $label + * Specifies a label for this `VisitRequest`. This label is reported in the + * response as `visit_label` in the corresponding + * [ShipmentRoute.Visit][google.maps.routeoptimization.v1.ShipmentRoute.Visit]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); + parent::__construct($data); + } + + /** + * The geo-location where the vehicle arrives when performing this + * `VisitRequest`. If the shipment model has duration distance matrices, + * `arrival_location` must not be specified. + * + * Generated from protobuf field .google.type.LatLng arrival_location = 1; + * @return \Google\Type\LatLng|null + */ + public function getArrivalLocation() + { + return $this->arrival_location; + } + + public function hasArrivalLocation() + { + return isset($this->arrival_location); + } + + public function clearArrivalLocation() + { + unset($this->arrival_location); + } + + /** + * The geo-location where the vehicle arrives when performing this + * `VisitRequest`. If the shipment model has duration distance matrices, + * `arrival_location` must not be specified. + * + * Generated from protobuf field .google.type.LatLng arrival_location = 1; + * @param \Google\Type\LatLng $var + * @return $this + */ + public function setArrivalLocation($var) + { + GPBUtil::checkMessage($var, \Google\Type\LatLng::class); + $this->arrival_location = $var; + + return $this; + } + + /** + * The waypoint where the vehicle arrives when performing this + * `VisitRequest`. If the shipment model has duration distance matrices, + * `arrival_waypoint` must not be specified. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.Waypoint arrival_waypoint = 2; + * @return \Google\Maps\RouteOptimization\V1\Waypoint|null + */ + public function getArrivalWaypoint() + { + return $this->arrival_waypoint; + } + + public function hasArrivalWaypoint() + { + return isset($this->arrival_waypoint); + } + + public function clearArrivalWaypoint() + { + unset($this->arrival_waypoint); + } + + /** + * The waypoint where the vehicle arrives when performing this + * `VisitRequest`. If the shipment model has duration distance matrices, + * `arrival_waypoint` must not be specified. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.Waypoint arrival_waypoint = 2; + * @param \Google\Maps\RouteOptimization\V1\Waypoint $var + * @return $this + */ + public function setArrivalWaypoint($var) + { + GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\Waypoint::class); + $this->arrival_waypoint = $var; + + return $this; + } + + /** + * The geo-location where the vehicle departs after completing this + * `VisitRequest`. Can be omitted if it is the same as `arrival_location`. + * If the shipment model has duration distance matrices, + * `departure_location` must not be specified. + * + * Generated from protobuf field .google.type.LatLng departure_location = 3; + * @return \Google\Type\LatLng|null + */ + public function getDepartureLocation() + { + return $this->departure_location; + } + + public function hasDepartureLocation() + { + return isset($this->departure_location); + } + + public function clearDepartureLocation() + { + unset($this->departure_location); + } + + /** + * The geo-location where the vehicle departs after completing this + * `VisitRequest`. Can be omitted if it is the same as `arrival_location`. + * If the shipment model has duration distance matrices, + * `departure_location` must not be specified. + * + * Generated from protobuf field .google.type.LatLng departure_location = 3; + * @param \Google\Type\LatLng $var + * @return $this + */ + public function setDepartureLocation($var) + { + GPBUtil::checkMessage($var, \Google\Type\LatLng::class); + $this->departure_location = $var; + + return $this; + } + + /** + * The waypoint where the vehicle departs after completing this + * `VisitRequest`. Can be omitted if it is the same as `arrival_waypoint`. + * If the shipment model has duration distance matrices, + * `departure_waypoint` must not be specified. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.Waypoint departure_waypoint = 4; + * @return \Google\Maps\RouteOptimization\V1\Waypoint|null + */ + public function getDepartureWaypoint() + { + return $this->departure_waypoint; + } + + public function hasDepartureWaypoint() + { + return isset($this->departure_waypoint); + } + + public function clearDepartureWaypoint() + { + unset($this->departure_waypoint); + } + + /** + * The waypoint where the vehicle departs after completing this + * `VisitRequest`. Can be omitted if it is the same as `arrival_waypoint`. + * If the shipment model has duration distance matrices, + * `departure_waypoint` must not be specified. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.Waypoint departure_waypoint = 4; + * @param \Google\Maps\RouteOptimization\V1\Waypoint $var + * @return $this + */ + public function setDepartureWaypoint($var) + { + GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\Waypoint::class); + $this->departure_waypoint = $var; + + return $this; + } + + /** + * Specifies tags attached to the visit request. + * Empty or duplicate strings are not allowed. + * + * Generated from protobuf field repeated string tags = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTags() + { + return $this->tags; + } + + /** + * Specifies tags attached to the visit request. + * Empty or duplicate strings are not allowed. + * + * Generated from protobuf field repeated string tags = 5; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTags($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->tags = $arr; + + return $this; + } + + /** + * Time windows which constrain the arrival time at a visit. + * Note that a vehicle may depart outside of the arrival time window, i.e. + * arrival time + duration do not need to be inside a time window. This can + * result in waiting time if the vehicle arrives before + * [TimeWindow.start_time][google.maps.routeoptimization.v1.TimeWindow.start_time]. + * The absence of `TimeWindow` means that the vehicle can perform this visit + * at any time. + * Time windows must be disjoint, i.e. no time window must overlap with or + * be adjacent to another, and they must be in increasing order. + * `cost_per_hour_after_soft_end_time` and `soft_end_time` can only + * be set if there is a single time window. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.TimeWindow time_windows = 6; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTimeWindows() + { + return $this->time_windows; + } + + /** + * Time windows which constrain the arrival time at a visit. + * Note that a vehicle may depart outside of the arrival time window, i.e. + * arrival time + duration do not need to be inside a time window. This can + * result in waiting time if the vehicle arrives before + * [TimeWindow.start_time][google.maps.routeoptimization.v1.TimeWindow.start_time]. + * The absence of `TimeWindow` means that the vehicle can perform this visit + * at any time. + * Time windows must be disjoint, i.e. no time window must overlap with or + * be adjacent to another, and they must be in increasing order. + * `cost_per_hour_after_soft_end_time` and `soft_end_time` can only + * be set if there is a single time window. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.TimeWindow time_windows = 6; + * @param array<\Google\Maps\RouteOptimization\V1\TimeWindow>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTimeWindows($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\TimeWindow::class); + $this->time_windows = $arr; + + return $this; + } + + /** + * Duration of the visit, i.e. time spent by the vehicle between arrival + * and departure (to be added to the possible waiting time; see + * `time_windows`). + * + * Generated from protobuf field .google.protobuf.Duration duration = 7; + * @return \Google\Protobuf\Duration|null + */ + public function getDuration() + { + return $this->duration; + } + + public function hasDuration() + { + return isset($this->duration); + } + + public function clearDuration() + { + unset($this->duration); + } + + /** + * Duration of the visit, i.e. time spent by the vehicle between arrival + * and departure (to be added to the possible waiting time; see + * `time_windows`). + * + * Generated from protobuf field .google.protobuf.Duration duration = 7; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->duration = $var; + + return $this; + } + + /** + * Cost to service this visit request on a vehicle route. This can be used + * to pay different costs for each alternative pickup or delivery of a + * shipment. This cost must be in the same unit as `Shipment.penalty_cost` + * and must not be negative. + * + * Generated from protobuf field double cost = 8; + * @return float + */ + public function getCost() + { + return $this->cost; + } + + /** + * Cost to service this visit request on a vehicle route. This can be used + * to pay different costs for each alternative pickup or delivery of a + * shipment. This cost must be in the same unit as `Shipment.penalty_cost` + * and must not be negative. + * + * Generated from protobuf field double cost = 8; + * @param float $var + * @return $this + */ + public function setCost($var) + { + GPBUtil::checkDouble($var); + $this->cost = $var; + + return $this; + } + + /** + * Load demands of this visit request. This is just like + * [Shipment.load_demands][google.maps.routeoptimization.v1.Shipment.load_demands] + * field, except that it only applies to this + * [VisitRequest][google.maps.routeoptimization.v1.Shipment.VisitRequest] + * instead of the whole + * [Shipment][google.maps.routeoptimization.v1.Shipment]. The demands listed + * here are added to the demands listed in + * [Shipment.load_demands][google.maps.routeoptimization.v1.Shipment.load_demands]. + * + * Generated from protobuf field map load_demands = 12; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLoadDemands() + { + return $this->load_demands; + } + + /** + * Load demands of this visit request. This is just like + * [Shipment.load_demands][google.maps.routeoptimization.v1.Shipment.load_demands] + * field, except that it only applies to this + * [VisitRequest][google.maps.routeoptimization.v1.Shipment.VisitRequest] + * instead of the whole + * [Shipment][google.maps.routeoptimization.v1.Shipment]. The demands listed + * here are added to the demands listed in + * [Shipment.load_demands][google.maps.routeoptimization.v1.Shipment.load_demands]. + * + * Generated from protobuf field map load_demands = 12; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLoadDemands($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\Shipment\Load::class); + $this->load_demands = $arr; + + return $this; + } + + /** + * Specifies the types of the visit. This may be used to allocate additional + * time required for a vehicle to complete this visit (see + * [Vehicle.extra_visit_duration_for_visit_type][google.maps.routeoptimization.v1.Vehicle.extra_visit_duration_for_visit_type]). + * A type can only appear once. + * + * Generated from protobuf field repeated string visit_types = 10; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getVisitTypes() + { + return $this->visit_types; + } + + /** + * Specifies the types of the visit. This may be used to allocate additional + * time required for a vehicle to complete this visit (see + * [Vehicle.extra_visit_duration_for_visit_type][google.maps.routeoptimization.v1.Vehicle.extra_visit_duration_for_visit_type]). + * A type can only appear once. + * + * Generated from protobuf field repeated string visit_types = 10; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setVisitTypes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->visit_types = $arr; + + return $this; + } + + /** + * Specifies a label for this `VisitRequest`. This label is reported in the + * response as `visit_label` in the corresponding + * [ShipmentRoute.Visit][google.maps.routeoptimization.v1.ShipmentRoute.Visit]. + * + * Generated from protobuf field string label = 11; + * @return string + */ + public function getLabel() + { + return $this->label; + } + + /** + * Specifies a label for this `VisitRequest`. This label is reported in the + * response as `visit_label` in the corresponding + * [ShipmentRoute.Visit][google.maps.routeoptimization.v1.ShipmentRoute.Visit]. + * + * Generated from protobuf field string label = 11; + * @param string $var + * @return $this + */ + public function setLabel($var) + { + GPBUtil::checkString($var, True); + $this->label = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(VisitRequest::class, \Google\Maps\RouteOptimization\V1\Shipment_VisitRequest::class); + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentModel.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentModel.php new file mode 100644 index 000000000000..34ac5c5b5eb4 --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentModel.php @@ -0,0 +1,1010 @@ +google.maps.routeoptimization.v1.ShipmentModel + */ +class ShipmentModel extends \Google\Protobuf\Internal\Message +{ + /** + * Set of shipments which must be performed in the model. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.Shipment shipments = 1; + */ + private $shipments; + /** + * Set of vehicles which can be used to perform visits. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.Vehicle vehicles = 2; + */ + private $vehicles; + /** + * Constrains the maximum number of active vehicles. A vehicle is active if + * its route performs at least one shipment. This can be used to limit the + * number of routes in the case where there are fewer drivers than + * vehicles and that the fleet of vehicles is heterogeneous. The optimization + * will then select the best subset of vehicles to use. + * Must be strictly positive. + * + * Generated from protobuf field optional int32 max_active_vehicles = 4; + */ + protected $max_active_vehicles = null; + /** + * Global start and end time of the model: no times outside of this range + * can be considered valid. + * The model's time span must be less than a year, i.e. the `global_end_time` + * and the `global_start_time` must be within 31536000 seconds of each other. + * When using `cost_per_*hour` fields, you might want to set this window to a + * smaller interval to increase performance (eg. if you model a single day, + * you should set the global time limits to that day). + * If unset, 00:00:00 UTC, January 1, 1970 (i.e. seconds: 0, nanos: 0) is used + * as default. + * + * Generated from protobuf field .google.protobuf.Timestamp global_start_time = 5; + */ + protected $global_start_time = null; + /** + * If unset, 00:00:00 UTC, January 1, 1971 (i.e. seconds: 31536000, nanos: 0) + * is used as default. + * + * Generated from protobuf field .google.protobuf.Timestamp global_end_time = 6; + */ + protected $global_end_time = null; + /** + * The "global duration" of the overall plan is the difference between the + * earliest effective start time and the latest effective end time of + * all vehicles. Users can assign a cost per hour to that quantity to try + * and optimize for earliest job completion, for example. This cost must be in + * the same unit as + * [Shipment.penalty_cost][google.maps.routeoptimization.v1.Shipment.penalty_cost]. + * + * Generated from protobuf field double global_duration_cost_per_hour = 7; + */ + protected $global_duration_cost_per_hour = 0.0; + /** + * Specifies duration and distance matrices used in the model. If this field + * is empty, Google Maps or geodesic distances will be used instead, depending + * on the value of the `use_geodesic_distances` field. If it is not empty, + * `use_geodesic_distances` cannot be true and neither + * `duration_distance_matrix_src_tags` nor `duration_distance_matrix_dst_tags` + * can be empty. + * Usage examples: + * * There are two locations: locA and locB. + * * 1 vehicle starting its route at locA and ending it at locA. + * * 1 pickup visit request at locB. + * ``` + * model { + * vehicles { start_tags: "locA" end_tags: "locA" } + * shipments { pickups { tags: "locB" } } + * duration_distance_matrix_src_tags: "locA" + * duration_distance_matrix_src_tags: "locB" + * duration_distance_matrix_dst_tags: "locA" + * duration_distance_matrix_dst_tags: "locB" + * duration_distance_matrices { + * rows { # from: locA + * durations { seconds: 0 } meters: 0 # to: locA + * durations { seconds: 100 } meters: 1000 # to: locB + * } + * rows { # from: locB + * durations { seconds: 102 } meters: 990 # to: locA + * durations { seconds: 0 } meters: 0 # to: locB + * } + * } + * } + * ``` + * * There are three locations: locA, locB and locC. + * * 1 vehicle starting its route at locA and ending it at locB, using + * matrix "fast". + * * 1 vehicle starting its route at locB and ending it at locB, using + * matrix "slow". + * * 1 vehicle starting its route at locB and ending it at locB, using + * matrix "fast". + * * 1 pickup visit request at locC. + * ``` + * model { + * vehicles { start_tags: "locA" end_tags: "locB" start_tags: "fast" } + * vehicles { start_tags: "locB" end_tags: "locB" start_tags: "slow" } + * vehicles { start_tags: "locB" end_tags: "locB" start_tags: "fast" } + * shipments { pickups { tags: "locC" } } + * duration_distance_matrix_src_tags: "locA" + * duration_distance_matrix_src_tags: "locB" + * duration_distance_matrix_src_tags: "locC" + * duration_distance_matrix_dst_tags: "locB" + * duration_distance_matrix_dst_tags: "locC" + * duration_distance_matrices { + * vehicle_start_tag: "fast" + * rows { # from: locA + * durations { seconds: 1000 } meters: 2000 # to: locB + * durations { seconds: 600 } meters: 1000 # to: locC + * } + * rows { # from: locB + * durations { seconds: 0 } meters: 0 # to: locB + * durations { seconds: 700 } meters: 1200 # to: locC + * } + * rows { # from: locC + * durations { seconds: 702 } meters: 1190 # to: locB + * durations { seconds: 0 } meters: 0 # to: locC + * } + * } + * duration_distance_matrices { + * vehicle_start_tag: "slow" + * rows { # from: locA + * durations { seconds: 1800 } meters: 2001 # to: locB + * durations { seconds: 900 } meters: 1002 # to: locC + * } + * rows { # from: locB + * durations { seconds: 0 } meters: 0 # to: locB + * durations { seconds: 1000 } meters: 1202 # to: locC + * } + * rows { # from: locC + * durations { seconds: 1001 } meters: 1195 # to: locB + * durations { seconds: 0 } meters: 0 # to: locC + * } + * } + * } + * ``` + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentModel.DurationDistanceMatrix duration_distance_matrices = 8; + */ + private $duration_distance_matrices; + /** + * Tags defining the sources of the duration and distance matrices; + * `duration_distance_matrices(i).rows(j)` defines durations and distances + * from visits with tag `duration_distance_matrix_src_tags(j)` to other visits + * in matrix i. + * Tags correspond to + * [VisitRequest.tags][google.maps.routeoptimization.v1.Shipment.VisitRequest.tags] + * or + * [Vehicle.start_tags][google.maps.routeoptimization.v1.Vehicle.start_tags]. + * A given `VisitRequest` or `Vehicle` must match exactly one tag in this + * field. Note that a `Vehicle`'s source, destination and matrix tags may be + * the same; similarly a `VisitRequest`'s source and destination tags may be + * the same. All tags must be different and cannot be empty strings. If this + * field is not empty, then `duration_distance_matrices` must not be empty. + * + * Generated from protobuf field repeated string duration_distance_matrix_src_tags = 9; + */ + private $duration_distance_matrix_src_tags; + /** + * Tags defining the destinations of the duration and distance matrices; + * `duration_distance_matrices(i).rows(j).durations(k)` (resp. + * `duration_distance_matrices(i).rows(j).meters(k))` defines the duration + * (resp. the distance) of the travel from visits with tag + * `duration_distance_matrix_src_tags(j)` to visits with tag + * `duration_distance_matrix_dst_tags(k)` in matrix i. + * Tags correspond to + * [VisitRequest.tags][google.maps.routeoptimization.v1.Shipment.VisitRequest.tags] + * or + * [Vehicle.start_tags][google.maps.routeoptimization.v1.Vehicle.start_tags]. + * A given `VisitRequest` or `Vehicle` must match exactly one tag in this + * field. Note that a `Vehicle`'s source, destination and matrix tags may be + * the same; similarly a `VisitRequest`'s source and destination tags may be + * the same. All tags must be different and cannot be empty strings. If this + * field is not empty, then `duration_distance_matrices` must not be empty. + * + * Generated from protobuf field repeated string duration_distance_matrix_dst_tags = 10; + */ + private $duration_distance_matrix_dst_tags; + /** + * Transition attributes added to the model. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.TransitionAttributes transition_attributes = 11; + */ + private $transition_attributes; + /** + * Sets of incompatible shipment_types (see `ShipmentTypeIncompatibility`). + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentTypeIncompatibility shipment_type_incompatibilities = 12; + */ + private $shipment_type_incompatibilities; + /** + * Sets of `shipment_type` requirements (see `ShipmentTypeRequirement`). + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentTypeRequirement shipment_type_requirements = 13; + */ + private $shipment_type_requirements; + /** + * Set of precedence rules which must be enforced in the model. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentModel.PrecedenceRule precedence_rules = 14; + */ + private $precedence_rules; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Maps\RouteOptimization\V1\Shipment>|\Google\Protobuf\Internal\RepeatedField $shipments + * Set of shipments which must be performed in the model. + * @type array<\Google\Maps\RouteOptimization\V1\Vehicle>|\Google\Protobuf\Internal\RepeatedField $vehicles + * Set of vehicles which can be used to perform visits. + * @type int $max_active_vehicles + * Constrains the maximum number of active vehicles. A vehicle is active if + * its route performs at least one shipment. This can be used to limit the + * number of routes in the case where there are fewer drivers than + * vehicles and that the fleet of vehicles is heterogeneous. The optimization + * will then select the best subset of vehicles to use. + * Must be strictly positive. + * @type \Google\Protobuf\Timestamp $global_start_time + * Global start and end time of the model: no times outside of this range + * can be considered valid. + * The model's time span must be less than a year, i.e. the `global_end_time` + * and the `global_start_time` must be within 31536000 seconds of each other. + * When using `cost_per_*hour` fields, you might want to set this window to a + * smaller interval to increase performance (eg. if you model a single day, + * you should set the global time limits to that day). + * If unset, 00:00:00 UTC, January 1, 1970 (i.e. seconds: 0, nanos: 0) is used + * as default. + * @type \Google\Protobuf\Timestamp $global_end_time + * If unset, 00:00:00 UTC, January 1, 1971 (i.e. seconds: 31536000, nanos: 0) + * is used as default. + * @type float $global_duration_cost_per_hour + * The "global duration" of the overall plan is the difference between the + * earliest effective start time and the latest effective end time of + * all vehicles. Users can assign a cost per hour to that quantity to try + * and optimize for earliest job completion, for example. This cost must be in + * the same unit as + * [Shipment.penalty_cost][google.maps.routeoptimization.v1.Shipment.penalty_cost]. + * @type array<\Google\Maps\RouteOptimization\V1\ShipmentModel\DurationDistanceMatrix>|\Google\Protobuf\Internal\RepeatedField $duration_distance_matrices + * Specifies duration and distance matrices used in the model. If this field + * is empty, Google Maps or geodesic distances will be used instead, depending + * on the value of the `use_geodesic_distances` field. If it is not empty, + * `use_geodesic_distances` cannot be true and neither + * `duration_distance_matrix_src_tags` nor `duration_distance_matrix_dst_tags` + * can be empty. + * Usage examples: + * * There are two locations: locA and locB. + * * 1 vehicle starting its route at locA and ending it at locA. + * * 1 pickup visit request at locB. + * ``` + * model { + * vehicles { start_tags: "locA" end_tags: "locA" } + * shipments { pickups { tags: "locB" } } + * duration_distance_matrix_src_tags: "locA" + * duration_distance_matrix_src_tags: "locB" + * duration_distance_matrix_dst_tags: "locA" + * duration_distance_matrix_dst_tags: "locB" + * duration_distance_matrices { + * rows { # from: locA + * durations { seconds: 0 } meters: 0 # to: locA + * durations { seconds: 100 } meters: 1000 # to: locB + * } + * rows { # from: locB + * durations { seconds: 102 } meters: 990 # to: locA + * durations { seconds: 0 } meters: 0 # to: locB + * } + * } + * } + * ``` + * * There are three locations: locA, locB and locC. + * * 1 vehicle starting its route at locA and ending it at locB, using + * matrix "fast". + * * 1 vehicle starting its route at locB and ending it at locB, using + * matrix "slow". + * * 1 vehicle starting its route at locB and ending it at locB, using + * matrix "fast". + * * 1 pickup visit request at locC. + * ``` + * model { + * vehicles { start_tags: "locA" end_tags: "locB" start_tags: "fast" } + * vehicles { start_tags: "locB" end_tags: "locB" start_tags: "slow" } + * vehicles { start_tags: "locB" end_tags: "locB" start_tags: "fast" } + * shipments { pickups { tags: "locC" } } + * duration_distance_matrix_src_tags: "locA" + * duration_distance_matrix_src_tags: "locB" + * duration_distance_matrix_src_tags: "locC" + * duration_distance_matrix_dst_tags: "locB" + * duration_distance_matrix_dst_tags: "locC" + * duration_distance_matrices { + * vehicle_start_tag: "fast" + * rows { # from: locA + * durations { seconds: 1000 } meters: 2000 # to: locB + * durations { seconds: 600 } meters: 1000 # to: locC + * } + * rows { # from: locB + * durations { seconds: 0 } meters: 0 # to: locB + * durations { seconds: 700 } meters: 1200 # to: locC + * } + * rows { # from: locC + * durations { seconds: 702 } meters: 1190 # to: locB + * durations { seconds: 0 } meters: 0 # to: locC + * } + * } + * duration_distance_matrices { + * vehicle_start_tag: "slow" + * rows { # from: locA + * durations { seconds: 1800 } meters: 2001 # to: locB + * durations { seconds: 900 } meters: 1002 # to: locC + * } + * rows { # from: locB + * durations { seconds: 0 } meters: 0 # to: locB + * durations { seconds: 1000 } meters: 1202 # to: locC + * } + * rows { # from: locC + * durations { seconds: 1001 } meters: 1195 # to: locB + * durations { seconds: 0 } meters: 0 # to: locC + * } + * } + * } + * ``` + * @type array|\Google\Protobuf\Internal\RepeatedField $duration_distance_matrix_src_tags + * Tags defining the sources of the duration and distance matrices; + * `duration_distance_matrices(i).rows(j)` defines durations and distances + * from visits with tag `duration_distance_matrix_src_tags(j)` to other visits + * in matrix i. + * Tags correspond to + * [VisitRequest.tags][google.maps.routeoptimization.v1.Shipment.VisitRequest.tags] + * or + * [Vehicle.start_tags][google.maps.routeoptimization.v1.Vehicle.start_tags]. + * A given `VisitRequest` or `Vehicle` must match exactly one tag in this + * field. Note that a `Vehicle`'s source, destination and matrix tags may be + * the same; similarly a `VisitRequest`'s source and destination tags may be + * the same. All tags must be different and cannot be empty strings. If this + * field is not empty, then `duration_distance_matrices` must not be empty. + * @type array|\Google\Protobuf\Internal\RepeatedField $duration_distance_matrix_dst_tags + * Tags defining the destinations of the duration and distance matrices; + * `duration_distance_matrices(i).rows(j).durations(k)` (resp. + * `duration_distance_matrices(i).rows(j).meters(k))` defines the duration + * (resp. the distance) of the travel from visits with tag + * `duration_distance_matrix_src_tags(j)` to visits with tag + * `duration_distance_matrix_dst_tags(k)` in matrix i. + * Tags correspond to + * [VisitRequest.tags][google.maps.routeoptimization.v1.Shipment.VisitRequest.tags] + * or + * [Vehicle.start_tags][google.maps.routeoptimization.v1.Vehicle.start_tags]. + * A given `VisitRequest` or `Vehicle` must match exactly one tag in this + * field. Note that a `Vehicle`'s source, destination and matrix tags may be + * the same; similarly a `VisitRequest`'s source and destination tags may be + * the same. All tags must be different and cannot be empty strings. If this + * field is not empty, then `duration_distance_matrices` must not be empty. + * @type array<\Google\Maps\RouteOptimization\V1\TransitionAttributes>|\Google\Protobuf\Internal\RepeatedField $transition_attributes + * Transition attributes added to the model. + * @type array<\Google\Maps\RouteOptimization\V1\ShipmentTypeIncompatibility>|\Google\Protobuf\Internal\RepeatedField $shipment_type_incompatibilities + * Sets of incompatible shipment_types (see `ShipmentTypeIncompatibility`). + * @type array<\Google\Maps\RouteOptimization\V1\ShipmentTypeRequirement>|\Google\Protobuf\Internal\RepeatedField $shipment_type_requirements + * Sets of `shipment_type` requirements (see `ShipmentTypeRequirement`). + * @type array<\Google\Maps\RouteOptimization\V1\ShipmentModel\PrecedenceRule>|\Google\Protobuf\Internal\RepeatedField $precedence_rules + * Set of precedence rules which must be enforced in the model. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); + parent::__construct($data); + } + + /** + * Set of shipments which must be performed in the model. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.Shipment shipments = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getShipments() + { + return $this->shipments; + } + + /** + * Set of shipments which must be performed in the model. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.Shipment shipments = 1; + * @param array<\Google\Maps\RouteOptimization\V1\Shipment>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setShipments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\Shipment::class); + $this->shipments = $arr; + + return $this; + } + + /** + * Set of vehicles which can be used to perform visits. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.Vehicle vehicles = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getVehicles() + { + return $this->vehicles; + } + + /** + * Set of vehicles which can be used to perform visits. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.Vehicle vehicles = 2; + * @param array<\Google\Maps\RouteOptimization\V1\Vehicle>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setVehicles($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\Vehicle::class); + $this->vehicles = $arr; + + return $this; + } + + /** + * Constrains the maximum number of active vehicles. A vehicle is active if + * its route performs at least one shipment. This can be used to limit the + * number of routes in the case where there are fewer drivers than + * vehicles and that the fleet of vehicles is heterogeneous. The optimization + * will then select the best subset of vehicles to use. + * Must be strictly positive. + * + * Generated from protobuf field optional int32 max_active_vehicles = 4; + * @return int + */ + public function getMaxActiveVehicles() + { + return isset($this->max_active_vehicles) ? $this->max_active_vehicles : 0; + } + + public function hasMaxActiveVehicles() + { + return isset($this->max_active_vehicles); + } + + public function clearMaxActiveVehicles() + { + unset($this->max_active_vehicles); + } + + /** + * Constrains the maximum number of active vehicles. A vehicle is active if + * its route performs at least one shipment. This can be used to limit the + * number of routes in the case where there are fewer drivers than + * vehicles and that the fleet of vehicles is heterogeneous. The optimization + * will then select the best subset of vehicles to use. + * Must be strictly positive. + * + * Generated from protobuf field optional int32 max_active_vehicles = 4; + * @param int $var + * @return $this + */ + public function setMaxActiveVehicles($var) + { + GPBUtil::checkInt32($var); + $this->max_active_vehicles = $var; + + return $this; + } + + /** + * Global start and end time of the model: no times outside of this range + * can be considered valid. + * The model's time span must be less than a year, i.e. the `global_end_time` + * and the `global_start_time` must be within 31536000 seconds of each other. + * When using `cost_per_*hour` fields, you might want to set this window to a + * smaller interval to increase performance (eg. if you model a single day, + * you should set the global time limits to that day). + * If unset, 00:00:00 UTC, January 1, 1970 (i.e. seconds: 0, nanos: 0) is used + * as default. + * + * Generated from protobuf field .google.protobuf.Timestamp global_start_time = 5; + * @return \Google\Protobuf\Timestamp|null + */ + public function getGlobalStartTime() + { + return $this->global_start_time; + } + + public function hasGlobalStartTime() + { + return isset($this->global_start_time); + } + + public function clearGlobalStartTime() + { + unset($this->global_start_time); + } + + /** + * Global start and end time of the model: no times outside of this range + * can be considered valid. + * The model's time span must be less than a year, i.e. the `global_end_time` + * and the `global_start_time` must be within 31536000 seconds of each other. + * When using `cost_per_*hour` fields, you might want to set this window to a + * smaller interval to increase performance (eg. if you model a single day, + * you should set the global time limits to that day). + * If unset, 00:00:00 UTC, January 1, 1970 (i.e. seconds: 0, nanos: 0) is used + * as default. + * + * Generated from protobuf field .google.protobuf.Timestamp global_start_time = 5; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setGlobalStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->global_start_time = $var; + + return $this; + } + + /** + * If unset, 00:00:00 UTC, January 1, 1971 (i.e. seconds: 31536000, nanos: 0) + * is used as default. + * + * Generated from protobuf field .google.protobuf.Timestamp global_end_time = 6; + * @return \Google\Protobuf\Timestamp|null + */ + public function getGlobalEndTime() + { + return $this->global_end_time; + } + + public function hasGlobalEndTime() + { + return isset($this->global_end_time); + } + + public function clearGlobalEndTime() + { + unset($this->global_end_time); + } + + /** + * If unset, 00:00:00 UTC, January 1, 1971 (i.e. seconds: 31536000, nanos: 0) + * is used as default. + * + * Generated from protobuf field .google.protobuf.Timestamp global_end_time = 6; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setGlobalEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->global_end_time = $var; + + return $this; + } + + /** + * The "global duration" of the overall plan is the difference between the + * earliest effective start time and the latest effective end time of + * all vehicles. Users can assign a cost per hour to that quantity to try + * and optimize for earliest job completion, for example. This cost must be in + * the same unit as + * [Shipment.penalty_cost][google.maps.routeoptimization.v1.Shipment.penalty_cost]. + * + * Generated from protobuf field double global_duration_cost_per_hour = 7; + * @return float + */ + public function getGlobalDurationCostPerHour() + { + return $this->global_duration_cost_per_hour; + } + + /** + * The "global duration" of the overall plan is the difference between the + * earliest effective start time and the latest effective end time of + * all vehicles. Users can assign a cost per hour to that quantity to try + * and optimize for earliest job completion, for example. This cost must be in + * the same unit as + * [Shipment.penalty_cost][google.maps.routeoptimization.v1.Shipment.penalty_cost]. + * + * Generated from protobuf field double global_duration_cost_per_hour = 7; + * @param float $var + * @return $this + */ + public function setGlobalDurationCostPerHour($var) + { + GPBUtil::checkDouble($var); + $this->global_duration_cost_per_hour = $var; + + return $this; + } + + /** + * Specifies duration and distance matrices used in the model. If this field + * is empty, Google Maps or geodesic distances will be used instead, depending + * on the value of the `use_geodesic_distances` field. If it is not empty, + * `use_geodesic_distances` cannot be true and neither + * `duration_distance_matrix_src_tags` nor `duration_distance_matrix_dst_tags` + * can be empty. + * Usage examples: + * * There are two locations: locA and locB. + * * 1 vehicle starting its route at locA and ending it at locA. + * * 1 pickup visit request at locB. + * ``` + * model { + * vehicles { start_tags: "locA" end_tags: "locA" } + * shipments { pickups { tags: "locB" } } + * duration_distance_matrix_src_tags: "locA" + * duration_distance_matrix_src_tags: "locB" + * duration_distance_matrix_dst_tags: "locA" + * duration_distance_matrix_dst_tags: "locB" + * duration_distance_matrices { + * rows { # from: locA + * durations { seconds: 0 } meters: 0 # to: locA + * durations { seconds: 100 } meters: 1000 # to: locB + * } + * rows { # from: locB + * durations { seconds: 102 } meters: 990 # to: locA + * durations { seconds: 0 } meters: 0 # to: locB + * } + * } + * } + * ``` + * * There are three locations: locA, locB and locC. + * * 1 vehicle starting its route at locA and ending it at locB, using + * matrix "fast". + * * 1 vehicle starting its route at locB and ending it at locB, using + * matrix "slow". + * * 1 vehicle starting its route at locB and ending it at locB, using + * matrix "fast". + * * 1 pickup visit request at locC. + * ``` + * model { + * vehicles { start_tags: "locA" end_tags: "locB" start_tags: "fast" } + * vehicles { start_tags: "locB" end_tags: "locB" start_tags: "slow" } + * vehicles { start_tags: "locB" end_tags: "locB" start_tags: "fast" } + * shipments { pickups { tags: "locC" } } + * duration_distance_matrix_src_tags: "locA" + * duration_distance_matrix_src_tags: "locB" + * duration_distance_matrix_src_tags: "locC" + * duration_distance_matrix_dst_tags: "locB" + * duration_distance_matrix_dst_tags: "locC" + * duration_distance_matrices { + * vehicle_start_tag: "fast" + * rows { # from: locA + * durations { seconds: 1000 } meters: 2000 # to: locB + * durations { seconds: 600 } meters: 1000 # to: locC + * } + * rows { # from: locB + * durations { seconds: 0 } meters: 0 # to: locB + * durations { seconds: 700 } meters: 1200 # to: locC + * } + * rows { # from: locC + * durations { seconds: 702 } meters: 1190 # to: locB + * durations { seconds: 0 } meters: 0 # to: locC + * } + * } + * duration_distance_matrices { + * vehicle_start_tag: "slow" + * rows { # from: locA + * durations { seconds: 1800 } meters: 2001 # to: locB + * durations { seconds: 900 } meters: 1002 # to: locC + * } + * rows { # from: locB + * durations { seconds: 0 } meters: 0 # to: locB + * durations { seconds: 1000 } meters: 1202 # to: locC + * } + * rows { # from: locC + * durations { seconds: 1001 } meters: 1195 # to: locB + * durations { seconds: 0 } meters: 0 # to: locC + * } + * } + * } + * ``` + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentModel.DurationDistanceMatrix duration_distance_matrices = 8; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDurationDistanceMatrices() + { + return $this->duration_distance_matrices; + } + + /** + * Specifies duration and distance matrices used in the model. If this field + * is empty, Google Maps or geodesic distances will be used instead, depending + * on the value of the `use_geodesic_distances` field. If it is not empty, + * `use_geodesic_distances` cannot be true and neither + * `duration_distance_matrix_src_tags` nor `duration_distance_matrix_dst_tags` + * can be empty. + * Usage examples: + * * There are two locations: locA and locB. + * * 1 vehicle starting its route at locA and ending it at locA. + * * 1 pickup visit request at locB. + * ``` + * model { + * vehicles { start_tags: "locA" end_tags: "locA" } + * shipments { pickups { tags: "locB" } } + * duration_distance_matrix_src_tags: "locA" + * duration_distance_matrix_src_tags: "locB" + * duration_distance_matrix_dst_tags: "locA" + * duration_distance_matrix_dst_tags: "locB" + * duration_distance_matrices { + * rows { # from: locA + * durations { seconds: 0 } meters: 0 # to: locA + * durations { seconds: 100 } meters: 1000 # to: locB + * } + * rows { # from: locB + * durations { seconds: 102 } meters: 990 # to: locA + * durations { seconds: 0 } meters: 0 # to: locB + * } + * } + * } + * ``` + * * There are three locations: locA, locB and locC. + * * 1 vehicle starting its route at locA and ending it at locB, using + * matrix "fast". + * * 1 vehicle starting its route at locB and ending it at locB, using + * matrix "slow". + * * 1 vehicle starting its route at locB and ending it at locB, using + * matrix "fast". + * * 1 pickup visit request at locC. + * ``` + * model { + * vehicles { start_tags: "locA" end_tags: "locB" start_tags: "fast" } + * vehicles { start_tags: "locB" end_tags: "locB" start_tags: "slow" } + * vehicles { start_tags: "locB" end_tags: "locB" start_tags: "fast" } + * shipments { pickups { tags: "locC" } } + * duration_distance_matrix_src_tags: "locA" + * duration_distance_matrix_src_tags: "locB" + * duration_distance_matrix_src_tags: "locC" + * duration_distance_matrix_dst_tags: "locB" + * duration_distance_matrix_dst_tags: "locC" + * duration_distance_matrices { + * vehicle_start_tag: "fast" + * rows { # from: locA + * durations { seconds: 1000 } meters: 2000 # to: locB + * durations { seconds: 600 } meters: 1000 # to: locC + * } + * rows { # from: locB + * durations { seconds: 0 } meters: 0 # to: locB + * durations { seconds: 700 } meters: 1200 # to: locC + * } + * rows { # from: locC + * durations { seconds: 702 } meters: 1190 # to: locB + * durations { seconds: 0 } meters: 0 # to: locC + * } + * } + * duration_distance_matrices { + * vehicle_start_tag: "slow" + * rows { # from: locA + * durations { seconds: 1800 } meters: 2001 # to: locB + * durations { seconds: 900 } meters: 1002 # to: locC + * } + * rows { # from: locB + * durations { seconds: 0 } meters: 0 # to: locB + * durations { seconds: 1000 } meters: 1202 # to: locC + * } + * rows { # from: locC + * durations { seconds: 1001 } meters: 1195 # to: locB + * durations { seconds: 0 } meters: 0 # to: locC + * } + * } + * } + * ``` + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentModel.DurationDistanceMatrix duration_distance_matrices = 8; + * @param array<\Google\Maps\RouteOptimization\V1\ShipmentModel\DurationDistanceMatrix>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDurationDistanceMatrices($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\ShipmentModel\DurationDistanceMatrix::class); + $this->duration_distance_matrices = $arr; + + return $this; + } + + /** + * Tags defining the sources of the duration and distance matrices; + * `duration_distance_matrices(i).rows(j)` defines durations and distances + * from visits with tag `duration_distance_matrix_src_tags(j)` to other visits + * in matrix i. + * Tags correspond to + * [VisitRequest.tags][google.maps.routeoptimization.v1.Shipment.VisitRequest.tags] + * or + * [Vehicle.start_tags][google.maps.routeoptimization.v1.Vehicle.start_tags]. + * A given `VisitRequest` or `Vehicle` must match exactly one tag in this + * field. Note that a `Vehicle`'s source, destination and matrix tags may be + * the same; similarly a `VisitRequest`'s source and destination tags may be + * the same. All tags must be different and cannot be empty strings. If this + * field is not empty, then `duration_distance_matrices` must not be empty. + * + * Generated from protobuf field repeated string duration_distance_matrix_src_tags = 9; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDurationDistanceMatrixSrcTags() + { + return $this->duration_distance_matrix_src_tags; + } + + /** + * Tags defining the sources of the duration and distance matrices; + * `duration_distance_matrices(i).rows(j)` defines durations and distances + * from visits with tag `duration_distance_matrix_src_tags(j)` to other visits + * in matrix i. + * Tags correspond to + * [VisitRequest.tags][google.maps.routeoptimization.v1.Shipment.VisitRequest.tags] + * or + * [Vehicle.start_tags][google.maps.routeoptimization.v1.Vehicle.start_tags]. + * A given `VisitRequest` or `Vehicle` must match exactly one tag in this + * field. Note that a `Vehicle`'s source, destination and matrix tags may be + * the same; similarly a `VisitRequest`'s source and destination tags may be + * the same. All tags must be different and cannot be empty strings. If this + * field is not empty, then `duration_distance_matrices` must not be empty. + * + * Generated from protobuf field repeated string duration_distance_matrix_src_tags = 9; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDurationDistanceMatrixSrcTags($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->duration_distance_matrix_src_tags = $arr; + + return $this; + } + + /** + * Tags defining the destinations of the duration and distance matrices; + * `duration_distance_matrices(i).rows(j).durations(k)` (resp. + * `duration_distance_matrices(i).rows(j).meters(k))` defines the duration + * (resp. the distance) of the travel from visits with tag + * `duration_distance_matrix_src_tags(j)` to visits with tag + * `duration_distance_matrix_dst_tags(k)` in matrix i. + * Tags correspond to + * [VisitRequest.tags][google.maps.routeoptimization.v1.Shipment.VisitRequest.tags] + * or + * [Vehicle.start_tags][google.maps.routeoptimization.v1.Vehicle.start_tags]. + * A given `VisitRequest` or `Vehicle` must match exactly one tag in this + * field. Note that a `Vehicle`'s source, destination and matrix tags may be + * the same; similarly a `VisitRequest`'s source and destination tags may be + * the same. All tags must be different and cannot be empty strings. If this + * field is not empty, then `duration_distance_matrices` must not be empty. + * + * Generated from protobuf field repeated string duration_distance_matrix_dst_tags = 10; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDurationDistanceMatrixDstTags() + { + return $this->duration_distance_matrix_dst_tags; + } + + /** + * Tags defining the destinations of the duration and distance matrices; + * `duration_distance_matrices(i).rows(j).durations(k)` (resp. + * `duration_distance_matrices(i).rows(j).meters(k))` defines the duration + * (resp. the distance) of the travel from visits with tag + * `duration_distance_matrix_src_tags(j)` to visits with tag + * `duration_distance_matrix_dst_tags(k)` in matrix i. + * Tags correspond to + * [VisitRequest.tags][google.maps.routeoptimization.v1.Shipment.VisitRequest.tags] + * or + * [Vehicle.start_tags][google.maps.routeoptimization.v1.Vehicle.start_tags]. + * A given `VisitRequest` or `Vehicle` must match exactly one tag in this + * field. Note that a `Vehicle`'s source, destination and matrix tags may be + * the same; similarly a `VisitRequest`'s source and destination tags may be + * the same. All tags must be different and cannot be empty strings. If this + * field is not empty, then `duration_distance_matrices` must not be empty. + * + * Generated from protobuf field repeated string duration_distance_matrix_dst_tags = 10; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDurationDistanceMatrixDstTags($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->duration_distance_matrix_dst_tags = $arr; + + return $this; + } + + /** + * Transition attributes added to the model. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.TransitionAttributes transition_attributes = 11; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTransitionAttributes() + { + return $this->transition_attributes; + } + + /** + * Transition attributes added to the model. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.TransitionAttributes transition_attributes = 11; + * @param array<\Google\Maps\RouteOptimization\V1\TransitionAttributes>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTransitionAttributes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\TransitionAttributes::class); + $this->transition_attributes = $arr; + + return $this; + } + + /** + * Sets of incompatible shipment_types (see `ShipmentTypeIncompatibility`). + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentTypeIncompatibility shipment_type_incompatibilities = 12; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getShipmentTypeIncompatibilities() + { + return $this->shipment_type_incompatibilities; + } + + /** + * Sets of incompatible shipment_types (see `ShipmentTypeIncompatibility`). + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentTypeIncompatibility shipment_type_incompatibilities = 12; + * @param array<\Google\Maps\RouteOptimization\V1\ShipmentTypeIncompatibility>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setShipmentTypeIncompatibilities($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\ShipmentTypeIncompatibility::class); + $this->shipment_type_incompatibilities = $arr; + + return $this; + } + + /** + * Sets of `shipment_type` requirements (see `ShipmentTypeRequirement`). + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentTypeRequirement shipment_type_requirements = 13; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getShipmentTypeRequirements() + { + return $this->shipment_type_requirements; + } + + /** + * Sets of `shipment_type` requirements (see `ShipmentTypeRequirement`). + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentTypeRequirement shipment_type_requirements = 13; + * @param array<\Google\Maps\RouteOptimization\V1\ShipmentTypeRequirement>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setShipmentTypeRequirements($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\ShipmentTypeRequirement::class); + $this->shipment_type_requirements = $arr; + + return $this; + } + + /** + * Set of precedence rules which must be enforced in the model. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentModel.PrecedenceRule precedence_rules = 14; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPrecedenceRules() + { + return $this->precedence_rules; + } + + /** + * Set of precedence rules which must be enforced in the model. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentModel.PrecedenceRule precedence_rules = 14; + * @param array<\Google\Maps\RouteOptimization\V1\ShipmentModel\PrecedenceRule>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPrecedenceRules($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\ShipmentModel\PrecedenceRule::class); + $this->precedence_rules = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentModel/DurationDistanceMatrix.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentModel/DurationDistanceMatrix.php new file mode 100644 index 000000000000..5bc080ab9ce0 --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentModel/DurationDistanceMatrix.php @@ -0,0 +1,137 @@ +google.maps.routeoptimization.v1.ShipmentModel.DurationDistanceMatrix + */ +class DurationDistanceMatrix extends \Google\Protobuf\Internal\Message +{ + /** + * Specifies the rows of the duration and distance matrix. It must have as + * many elements as + * [ShipmentModel.duration_distance_matrix_src_tags][google.maps.routeoptimization.v1.ShipmentModel.duration_distance_matrix_src_tags]. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentModel.DurationDistanceMatrix.Row rows = 1; + */ + private $rows; + /** + * Tag defining to which vehicles this duration and distance matrix applies. + * If empty, this applies to all vehicles, and there can only be a single + * matrix. + * Each vehicle start must match exactly one matrix, i.e. exactly one of + * their `start_tags` field must match the `vehicle_start_tag` of a matrix + * (and of that matrix only). + * All matrices must have a different `vehicle_start_tag`. + * + * Generated from protobuf field string vehicle_start_tag = 2; + */ + protected $vehicle_start_tag = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Maps\RouteOptimization\V1\ShipmentModel\DurationDistanceMatrix\Row>|\Google\Protobuf\Internal\RepeatedField $rows + * Specifies the rows of the duration and distance matrix. It must have as + * many elements as + * [ShipmentModel.duration_distance_matrix_src_tags][google.maps.routeoptimization.v1.ShipmentModel.duration_distance_matrix_src_tags]. + * @type string $vehicle_start_tag + * Tag defining to which vehicles this duration and distance matrix applies. + * If empty, this applies to all vehicles, and there can only be a single + * matrix. + * Each vehicle start must match exactly one matrix, i.e. exactly one of + * their `start_tags` field must match the `vehicle_start_tag` of a matrix + * (and of that matrix only). + * All matrices must have a different `vehicle_start_tag`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); + parent::__construct($data); + } + + /** + * Specifies the rows of the duration and distance matrix. It must have as + * many elements as + * [ShipmentModel.duration_distance_matrix_src_tags][google.maps.routeoptimization.v1.ShipmentModel.duration_distance_matrix_src_tags]. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentModel.DurationDistanceMatrix.Row rows = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRows() + { + return $this->rows; + } + + /** + * Specifies the rows of the duration and distance matrix. It must have as + * many elements as + * [ShipmentModel.duration_distance_matrix_src_tags][google.maps.routeoptimization.v1.ShipmentModel.duration_distance_matrix_src_tags]. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentModel.DurationDistanceMatrix.Row rows = 1; + * @param array<\Google\Maps\RouteOptimization\V1\ShipmentModel\DurationDistanceMatrix\Row>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRows($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\ShipmentModel\DurationDistanceMatrix\Row::class); + $this->rows = $arr; + + return $this; + } + + /** + * Tag defining to which vehicles this duration and distance matrix applies. + * If empty, this applies to all vehicles, and there can only be a single + * matrix. + * Each vehicle start must match exactly one matrix, i.e. exactly one of + * their `start_tags` field must match the `vehicle_start_tag` of a matrix + * (and of that matrix only). + * All matrices must have a different `vehicle_start_tag`. + * + * Generated from protobuf field string vehicle_start_tag = 2; + * @return string + */ + public function getVehicleStartTag() + { + return $this->vehicle_start_tag; + } + + /** + * Tag defining to which vehicles this duration and distance matrix applies. + * If empty, this applies to all vehicles, and there can only be a single + * matrix. + * Each vehicle start must match exactly one matrix, i.e. exactly one of + * their `start_tags` field must match the `vehicle_start_tag` of a matrix + * (and of that matrix only). + * All matrices must have a different `vehicle_start_tag`. + * + * Generated from protobuf field string vehicle_start_tag = 2; + * @param string $var + * @return $this + */ + public function setVehicleStartTag($var) + { + GPBUtil::checkString($var, True); + $this->vehicle_start_tag = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(DurationDistanceMatrix::class, \Google\Maps\RouteOptimization\V1\ShipmentModel_DurationDistanceMatrix::class); + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentModel/DurationDistanceMatrix/Row.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentModel/DurationDistanceMatrix/Row.php new file mode 100644 index 000000000000..ade7fdceddc1 --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentModel/DurationDistanceMatrix/Row.php @@ -0,0 +1,116 @@ +google.maps.routeoptimization.v1.ShipmentModel.DurationDistanceMatrix.Row + */ +class Row extends \Google\Protobuf\Internal\Message +{ + /** + * Duration values for a given row. It must have as many elements as + * [ShipmentModel.duration_distance_matrix_dst_tags][google.maps.routeoptimization.v1.ShipmentModel.duration_distance_matrix_dst_tags]. + * + * Generated from protobuf field repeated .google.protobuf.Duration durations = 1; + */ + private $durations; + /** + * Distance values for a given row. If no costs or constraints refer to + * distances in the model, this can be left empty; otherwise it must have + * as many elements as `durations`. + * + * Generated from protobuf field repeated double meters = 2; + */ + private $meters; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Protobuf\Duration>|\Google\Protobuf\Internal\RepeatedField $durations + * Duration values for a given row. It must have as many elements as + * [ShipmentModel.duration_distance_matrix_dst_tags][google.maps.routeoptimization.v1.ShipmentModel.duration_distance_matrix_dst_tags]. + * @type array|\Google\Protobuf\Internal\RepeatedField $meters + * Distance values for a given row. If no costs or constraints refer to + * distances in the model, this can be left empty; otherwise it must have + * as many elements as `durations`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); + parent::__construct($data); + } + + /** + * Duration values for a given row. It must have as many elements as + * [ShipmentModel.duration_distance_matrix_dst_tags][google.maps.routeoptimization.v1.ShipmentModel.duration_distance_matrix_dst_tags]. + * + * Generated from protobuf field repeated .google.protobuf.Duration durations = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDurations() + { + return $this->durations; + } + + /** + * Duration values for a given row. It must have as many elements as + * [ShipmentModel.duration_distance_matrix_dst_tags][google.maps.routeoptimization.v1.ShipmentModel.duration_distance_matrix_dst_tags]. + * + * Generated from protobuf field repeated .google.protobuf.Duration durations = 1; + * @param array<\Google\Protobuf\Duration>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDurations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Duration::class); + $this->durations = $arr; + + return $this; + } + + /** + * Distance values for a given row. If no costs or constraints refer to + * distances in the model, this can be left empty; otherwise it must have + * as many elements as `durations`. + * + * Generated from protobuf field repeated double meters = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMeters() + { + return $this->meters; + } + + /** + * Distance values for a given row. If no costs or constraints refer to + * distances in the model, this can be left empty; otherwise it must have + * as many elements as `durations`. + * + * Generated from protobuf field repeated double meters = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMeters($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::DOUBLE); + $this->meters = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Row::class, \Google\Maps\RouteOptimization\V1\ShipmentModel_DurationDistanceMatrix_Row::class); + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentModel/PrecedenceRule.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentModel/PrecedenceRule.php new file mode 100644 index 000000000000..d83e3791b007 --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentModel/PrecedenceRule.php @@ -0,0 +1,243 @@ +google.maps.routeoptimization.v1.ShipmentModel.PrecedenceRule + */ +class PrecedenceRule extends \Google\Protobuf\Internal\Message +{ + /** + * Shipment index of the "first" event. This field must be specified. + * + * Generated from protobuf field optional int32 first_index = 1; + */ + protected $first_index = null; + /** + * Indicates if the "first" event is a delivery. + * + * Generated from protobuf field bool first_is_delivery = 3; + */ + protected $first_is_delivery = false; + /** + * Shipment index of the "second" event. This field must be specified. + * + * Generated from protobuf field optional int32 second_index = 2; + */ + protected $second_index = null; + /** + * Indicates if the "second" event is a delivery. + * + * Generated from protobuf field bool second_is_delivery = 4; + */ + protected $second_is_delivery = false; + /** + * The offset between the "first" and "second" event. It can be negative. + * + * Generated from protobuf field .google.protobuf.Duration offset_duration = 5; + */ + protected $offset_duration = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $first_index + * Shipment index of the "first" event. This field must be specified. + * @type bool $first_is_delivery + * Indicates if the "first" event is a delivery. + * @type int $second_index + * Shipment index of the "second" event. This field must be specified. + * @type bool $second_is_delivery + * Indicates if the "second" event is a delivery. + * @type \Google\Protobuf\Duration $offset_duration + * The offset between the "first" and "second" event. It can be negative. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); + parent::__construct($data); + } + + /** + * Shipment index of the "first" event. This field must be specified. + * + * Generated from protobuf field optional int32 first_index = 1; + * @return int + */ + public function getFirstIndex() + { + return isset($this->first_index) ? $this->first_index : 0; + } + + public function hasFirstIndex() + { + return isset($this->first_index); + } + + public function clearFirstIndex() + { + unset($this->first_index); + } + + /** + * Shipment index of the "first" event. This field must be specified. + * + * Generated from protobuf field optional int32 first_index = 1; + * @param int $var + * @return $this + */ + public function setFirstIndex($var) + { + GPBUtil::checkInt32($var); + $this->first_index = $var; + + return $this; + } + + /** + * Indicates if the "first" event is a delivery. + * + * Generated from protobuf field bool first_is_delivery = 3; + * @return bool + */ + public function getFirstIsDelivery() + { + return $this->first_is_delivery; + } + + /** + * Indicates if the "first" event is a delivery. + * + * Generated from protobuf field bool first_is_delivery = 3; + * @param bool $var + * @return $this + */ + public function setFirstIsDelivery($var) + { + GPBUtil::checkBool($var); + $this->first_is_delivery = $var; + + return $this; + } + + /** + * Shipment index of the "second" event. This field must be specified. + * + * Generated from protobuf field optional int32 second_index = 2; + * @return int + */ + public function getSecondIndex() + { + return isset($this->second_index) ? $this->second_index : 0; + } + + public function hasSecondIndex() + { + return isset($this->second_index); + } + + public function clearSecondIndex() + { + unset($this->second_index); + } + + /** + * Shipment index of the "second" event. This field must be specified. + * + * Generated from protobuf field optional int32 second_index = 2; + * @param int $var + * @return $this + */ + public function setSecondIndex($var) + { + GPBUtil::checkInt32($var); + $this->second_index = $var; + + return $this; + } + + /** + * Indicates if the "second" event is a delivery. + * + * Generated from protobuf field bool second_is_delivery = 4; + * @return bool + */ + public function getSecondIsDelivery() + { + return $this->second_is_delivery; + } + + /** + * Indicates if the "second" event is a delivery. + * + * Generated from protobuf field bool second_is_delivery = 4; + * @param bool $var + * @return $this + */ + public function setSecondIsDelivery($var) + { + GPBUtil::checkBool($var); + $this->second_is_delivery = $var; + + return $this; + } + + /** + * The offset between the "first" and "second" event. It can be negative. + * + * Generated from protobuf field .google.protobuf.Duration offset_duration = 5; + * @return \Google\Protobuf\Duration|null + */ + public function getOffsetDuration() + { + return $this->offset_duration; + } + + public function hasOffsetDuration() + { + return isset($this->offset_duration); + } + + public function clearOffsetDuration() + { + unset($this->offset_duration); + } + + /** + * The offset between the "first" and "second" event. It can be negative. + * + * Generated from protobuf field .google.protobuf.Duration offset_duration = 5; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setOffsetDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->offset_duration = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(PrecedenceRule::class, \Google\Maps\RouteOptimization\V1\ShipmentModel_PrecedenceRule::class); + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentRoute.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentRoute.php new file mode 100644 index 000000000000..3c191d29cca6 --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentRoute.php @@ -0,0 +1,706 @@ + + * | TRANSITION[i] | VISIT[i] | + * | | | + * | * TRAVEL: the vehicle moves from | PERFORM the visit: | + * | VISIT[i-1].departure_location to | | + * | VISIT[i].arrival_location, which | * Spend some time: | + * | takes a given travel duration | the "visit duration". | + * | and distance | | + * | | * Load or unload | + * | * BREAKS: the driver may have | some quantities from the | + * | breaks (e.g. lunch break). | vehicle: the "demand". | + * | | | + * | * WAIT: the driver/vehicle does | | + * | nothing. This can happen for | | + * | many reasons, for example when | | + * | the vehicle reaches the next | | + * | event's destination before the | | + * | start of its time window | | + * | | | + * | * DELAY: *right before* the next | | + * | arrival. E.g. the vehicle and/or | | + * | driver spends time unloading. | | + * | | | + * ---+-------------------------------------+-----------------------------+--> + * ^ ^ ^ + * V[i-1].end V[i].start V[i].end + * ``` + * Lastly, here is how the TRAVEL, BREAKS, DELAY and WAIT can be arranged + * during a transition. + * * They don't overlap. + * * The DELAY is unique and *must* be a contiguous period of time right + * before the next visit (or vehicle end). Thus, it suffice to know the + * delay duration to know its start and end time. + * * The BREAKS are contiguous, non-overlapping periods of time. The + * response specifies the start time and duration of each break. + * * TRAVEL and WAIT are "preemptable": they can be interrupted several times + * during this transition. Clients can assume that travel happens "as soon as + * possible" and that "wait" fills the remaining time. + * A (complex) example: + * ``` + * TRANSITION[i] + * --++-----+-----------------------------------------------------------++--> + * || | | | | | | || + * || T | B | T | | B | | D || + * || r | r | r | W | r | W | e || + * || a | e | a | a | e | a | l || + * || v | a | v | i | a | i | a || + * || e | k | e | t | k | t | y || + * || l | | l | | | | || + * || | | | | | | || + * --++-----------------------------------------------------------------++--> + * ``` + * + * Generated from protobuf message google.maps.routeoptimization.v1.ShipmentRoute + */ +class ShipmentRoute extends \Google\Protobuf\Internal\Message +{ + /** + * Vehicle performing the route, identified by its index in the source + * `ShipmentModel`. + * + * Generated from protobuf field int32 vehicle_index = 1; + */ + protected $vehicle_index = 0; + /** + * Label of the vehicle performing this route, equal to + * `ShipmentModel.vehicles(vehicle_index).label`, if specified. + * + * Generated from protobuf field string vehicle_label = 2; + */ + protected $vehicle_label = ''; + /** + * Time at which the vehicle starts its route. + * + * Generated from protobuf field .google.protobuf.Timestamp vehicle_start_time = 5; + */ + protected $vehicle_start_time = null; + /** + * Time at which the vehicle finishes its route. + * + * Generated from protobuf field .google.protobuf.Timestamp vehicle_end_time = 6; + */ + protected $vehicle_end_time = null; + /** + * Ordered sequence of visits representing a route. + * visits[i] is the i-th visit in the route. + * If this field is empty, the vehicle is considered as unused. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentRoute.Visit visits = 7; + */ + private $visits; + /** + * Ordered list of transitions for the route. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentRoute.Transition transitions = 8; + */ + private $transitions; + /** + * When + * [OptimizeToursRequest.consider_road_traffic][google.maps.routeoptimization.v1.OptimizeToursRequest.consider_road_traffic], + * is set to true, this field indicates that inconsistencies in route timings + * are predicted using traffic-based travel duration estimates. There may be + * insufficient time to complete traffic-adjusted travel, delays, and breaks + * between visits, before the first visit, or after the last visit, while + * still satisfying the visit and vehicle time windows. For example, + * ``` + * start_time(previous_visit) + duration(previous_visit) + + * travel_duration(previous_visit, next_visit) > start_time(next_visit) + * ``` + * Arrival at next_visit will likely happen later than its current + * time window due the increased estimate of travel time + * `travel_duration(previous_visit, next_visit)` due to traffic. Also, a break + * may be forced to overlap with a visit due to an increase in travel time + * estimates and visit or break time window restrictions. + * + * Generated from protobuf field bool has_traffic_infeasibilities = 9; + */ + protected $has_traffic_infeasibilities = false; + /** + * The encoded polyline representation of the route. + * This field is only populated if + * [OptimizeToursRequest.populate_polylines][google.maps.routeoptimization.v1.OptimizeToursRequest.populate_polylines] + * is set to true. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.ShipmentRoute.EncodedPolyline route_polyline = 10; + */ + protected $route_polyline = null; + /** + * Breaks scheduled for the vehicle performing this route. + * The `breaks` sequence represents time intervals, each starting at the + * corresponding `start_time` and lasting `duration` seconds. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentRoute.Break breaks = 11; + */ + private $breaks; + /** + * Duration, distance and load metrics for this route. The fields of + * [AggregatedMetrics][google.maps.routeoptimization.v1.AggregatedMetrics] are + * summed over all + * [ShipmentRoute.transitions][google.maps.routeoptimization.v1.ShipmentRoute.transitions] + * or + * [ShipmentRoute.visits][google.maps.routeoptimization.v1.ShipmentRoute.visits], + * depending on the context. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.AggregatedMetrics metrics = 12; + */ + protected $metrics = null; + /** + * Cost of the route, broken down by cost-related request fields. + * The keys are proto paths, relative to the input OptimizeToursRequest, e.g. + * "model.shipments.pickups.cost", and the values are the total cost + * generated by the corresponding cost field, aggregated over the whole route. + * In other words, costs["model.shipments.pickups.cost"] is the sum of all + * pickup costs over the route. All costs defined in the model are reported in + * detail here with the exception of costs related to TransitionAttributes + * that are only reported in an aggregated way as of 2022/01. + * + * Generated from protobuf field map route_costs = 17; + */ + private $route_costs; + /** + * Total cost of the route. The sum of all costs in the cost map. + * + * Generated from protobuf field double route_total_cost = 18; + */ + protected $route_total_cost = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $vehicle_index + * Vehicle performing the route, identified by its index in the source + * `ShipmentModel`. + * @type string $vehicle_label + * Label of the vehicle performing this route, equal to + * `ShipmentModel.vehicles(vehicle_index).label`, if specified. + * @type \Google\Protobuf\Timestamp $vehicle_start_time + * Time at which the vehicle starts its route. + * @type \Google\Protobuf\Timestamp $vehicle_end_time + * Time at which the vehicle finishes its route. + * @type array<\Google\Maps\RouteOptimization\V1\ShipmentRoute\Visit>|\Google\Protobuf\Internal\RepeatedField $visits + * Ordered sequence of visits representing a route. + * visits[i] is the i-th visit in the route. + * If this field is empty, the vehicle is considered as unused. + * @type array<\Google\Maps\RouteOptimization\V1\ShipmentRoute\Transition>|\Google\Protobuf\Internal\RepeatedField $transitions + * Ordered list of transitions for the route. + * @type bool $has_traffic_infeasibilities + * When + * [OptimizeToursRequest.consider_road_traffic][google.maps.routeoptimization.v1.OptimizeToursRequest.consider_road_traffic], + * is set to true, this field indicates that inconsistencies in route timings + * are predicted using traffic-based travel duration estimates. There may be + * insufficient time to complete traffic-adjusted travel, delays, and breaks + * between visits, before the first visit, or after the last visit, while + * still satisfying the visit and vehicle time windows. For example, + * ``` + * start_time(previous_visit) + duration(previous_visit) + + * travel_duration(previous_visit, next_visit) > start_time(next_visit) + * ``` + * Arrival at next_visit will likely happen later than its current + * time window due the increased estimate of travel time + * `travel_duration(previous_visit, next_visit)` due to traffic. Also, a break + * may be forced to overlap with a visit due to an increase in travel time + * estimates and visit or break time window restrictions. + * @type \Google\Maps\RouteOptimization\V1\ShipmentRoute\EncodedPolyline $route_polyline + * The encoded polyline representation of the route. + * This field is only populated if + * [OptimizeToursRequest.populate_polylines][google.maps.routeoptimization.v1.OptimizeToursRequest.populate_polylines] + * is set to true. + * @type array<\Google\Maps\RouteOptimization\V1\ShipmentRoute\PBBreak>|\Google\Protobuf\Internal\RepeatedField $breaks + * Breaks scheduled for the vehicle performing this route. + * The `breaks` sequence represents time intervals, each starting at the + * corresponding `start_time` and lasting `duration` seconds. + * @type \Google\Maps\RouteOptimization\V1\AggregatedMetrics $metrics + * Duration, distance and load metrics for this route. The fields of + * [AggregatedMetrics][google.maps.routeoptimization.v1.AggregatedMetrics] are + * summed over all + * [ShipmentRoute.transitions][google.maps.routeoptimization.v1.ShipmentRoute.transitions] + * or + * [ShipmentRoute.visits][google.maps.routeoptimization.v1.ShipmentRoute.visits], + * depending on the context. + * @type array|\Google\Protobuf\Internal\MapField $route_costs + * Cost of the route, broken down by cost-related request fields. + * The keys are proto paths, relative to the input OptimizeToursRequest, e.g. + * "model.shipments.pickups.cost", and the values are the total cost + * generated by the corresponding cost field, aggregated over the whole route. + * In other words, costs["model.shipments.pickups.cost"] is the sum of all + * pickup costs over the route. All costs defined in the model are reported in + * detail here with the exception of costs related to TransitionAttributes + * that are only reported in an aggregated way as of 2022/01. + * @type float $route_total_cost + * Total cost of the route. The sum of all costs in the cost map. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); + parent::__construct($data); + } + + /** + * Vehicle performing the route, identified by its index in the source + * `ShipmentModel`. + * + * Generated from protobuf field int32 vehicle_index = 1; + * @return int + */ + public function getVehicleIndex() + { + return $this->vehicle_index; + } + + /** + * Vehicle performing the route, identified by its index in the source + * `ShipmentModel`. + * + * Generated from protobuf field int32 vehicle_index = 1; + * @param int $var + * @return $this + */ + public function setVehicleIndex($var) + { + GPBUtil::checkInt32($var); + $this->vehicle_index = $var; + + return $this; + } + + /** + * Label of the vehicle performing this route, equal to + * `ShipmentModel.vehicles(vehicle_index).label`, if specified. + * + * Generated from protobuf field string vehicle_label = 2; + * @return string + */ + public function getVehicleLabel() + { + return $this->vehicle_label; + } + + /** + * Label of the vehicle performing this route, equal to + * `ShipmentModel.vehicles(vehicle_index).label`, if specified. + * + * Generated from protobuf field string vehicle_label = 2; + * @param string $var + * @return $this + */ + public function setVehicleLabel($var) + { + GPBUtil::checkString($var, True); + $this->vehicle_label = $var; + + return $this; + } + + /** + * Time at which the vehicle starts its route. + * + * Generated from protobuf field .google.protobuf.Timestamp vehicle_start_time = 5; + * @return \Google\Protobuf\Timestamp|null + */ + public function getVehicleStartTime() + { + return $this->vehicle_start_time; + } + + public function hasVehicleStartTime() + { + return isset($this->vehicle_start_time); + } + + public function clearVehicleStartTime() + { + unset($this->vehicle_start_time); + } + + /** + * Time at which the vehicle starts its route. + * + * Generated from protobuf field .google.protobuf.Timestamp vehicle_start_time = 5; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setVehicleStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->vehicle_start_time = $var; + + return $this; + } + + /** + * Time at which the vehicle finishes its route. + * + * Generated from protobuf field .google.protobuf.Timestamp vehicle_end_time = 6; + * @return \Google\Protobuf\Timestamp|null + */ + public function getVehicleEndTime() + { + return $this->vehicle_end_time; + } + + public function hasVehicleEndTime() + { + return isset($this->vehicle_end_time); + } + + public function clearVehicleEndTime() + { + unset($this->vehicle_end_time); + } + + /** + * Time at which the vehicle finishes its route. + * + * Generated from protobuf field .google.protobuf.Timestamp vehicle_end_time = 6; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setVehicleEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->vehicle_end_time = $var; + + return $this; + } + + /** + * Ordered sequence of visits representing a route. + * visits[i] is the i-th visit in the route. + * If this field is empty, the vehicle is considered as unused. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentRoute.Visit visits = 7; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getVisits() + { + return $this->visits; + } + + /** + * Ordered sequence of visits representing a route. + * visits[i] is the i-th visit in the route. + * If this field is empty, the vehicle is considered as unused. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentRoute.Visit visits = 7; + * @param array<\Google\Maps\RouteOptimization\V1\ShipmentRoute\Visit>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setVisits($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\ShipmentRoute\Visit::class); + $this->visits = $arr; + + return $this; + } + + /** + * Ordered list of transitions for the route. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentRoute.Transition transitions = 8; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTransitions() + { + return $this->transitions; + } + + /** + * Ordered list of transitions for the route. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentRoute.Transition transitions = 8; + * @param array<\Google\Maps\RouteOptimization\V1\ShipmentRoute\Transition>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTransitions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\ShipmentRoute\Transition::class); + $this->transitions = $arr; + + return $this; + } + + /** + * When + * [OptimizeToursRequest.consider_road_traffic][google.maps.routeoptimization.v1.OptimizeToursRequest.consider_road_traffic], + * is set to true, this field indicates that inconsistencies in route timings + * are predicted using traffic-based travel duration estimates. There may be + * insufficient time to complete traffic-adjusted travel, delays, and breaks + * between visits, before the first visit, or after the last visit, while + * still satisfying the visit and vehicle time windows. For example, + * ``` + * start_time(previous_visit) + duration(previous_visit) + + * travel_duration(previous_visit, next_visit) > start_time(next_visit) + * ``` + * Arrival at next_visit will likely happen later than its current + * time window due the increased estimate of travel time + * `travel_duration(previous_visit, next_visit)` due to traffic. Also, a break + * may be forced to overlap with a visit due to an increase in travel time + * estimates and visit or break time window restrictions. + * + * Generated from protobuf field bool has_traffic_infeasibilities = 9; + * @return bool + */ + public function getHasTrafficInfeasibilities() + { + return $this->has_traffic_infeasibilities; + } + + /** + * When + * [OptimizeToursRequest.consider_road_traffic][google.maps.routeoptimization.v1.OptimizeToursRequest.consider_road_traffic], + * is set to true, this field indicates that inconsistencies in route timings + * are predicted using traffic-based travel duration estimates. There may be + * insufficient time to complete traffic-adjusted travel, delays, and breaks + * between visits, before the first visit, or after the last visit, while + * still satisfying the visit and vehicle time windows. For example, + * ``` + * start_time(previous_visit) + duration(previous_visit) + + * travel_duration(previous_visit, next_visit) > start_time(next_visit) + * ``` + * Arrival at next_visit will likely happen later than its current + * time window due the increased estimate of travel time + * `travel_duration(previous_visit, next_visit)` due to traffic. Also, a break + * may be forced to overlap with a visit due to an increase in travel time + * estimates and visit or break time window restrictions. + * + * Generated from protobuf field bool has_traffic_infeasibilities = 9; + * @param bool $var + * @return $this + */ + public function setHasTrafficInfeasibilities($var) + { + GPBUtil::checkBool($var); + $this->has_traffic_infeasibilities = $var; + + return $this; + } + + /** + * The encoded polyline representation of the route. + * This field is only populated if + * [OptimizeToursRequest.populate_polylines][google.maps.routeoptimization.v1.OptimizeToursRequest.populate_polylines] + * is set to true. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.ShipmentRoute.EncodedPolyline route_polyline = 10; + * @return \Google\Maps\RouteOptimization\V1\ShipmentRoute\EncodedPolyline|null + */ + public function getRoutePolyline() + { + return $this->route_polyline; + } + + public function hasRoutePolyline() + { + return isset($this->route_polyline); + } + + public function clearRoutePolyline() + { + unset($this->route_polyline); + } + + /** + * The encoded polyline representation of the route. + * This field is only populated if + * [OptimizeToursRequest.populate_polylines][google.maps.routeoptimization.v1.OptimizeToursRequest.populate_polylines] + * is set to true. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.ShipmentRoute.EncodedPolyline route_polyline = 10; + * @param \Google\Maps\RouteOptimization\V1\ShipmentRoute\EncodedPolyline $var + * @return $this + */ + public function setRoutePolyline($var) + { + GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\ShipmentRoute\EncodedPolyline::class); + $this->route_polyline = $var; + + return $this; + } + + /** + * Breaks scheduled for the vehicle performing this route. + * The `breaks` sequence represents time intervals, each starting at the + * corresponding `start_time` and lasting `duration` seconds. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentRoute.Break breaks = 11; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getBreaks() + { + return $this->breaks; + } + + /** + * Breaks scheduled for the vehicle performing this route. + * The `breaks` sequence represents time intervals, each starting at the + * corresponding `start_time` and lasting `duration` seconds. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentRoute.Break breaks = 11; + * @param array<\Google\Maps\RouteOptimization\V1\ShipmentRoute\PBBreak>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setBreaks($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\ShipmentRoute\PBBreak::class); + $this->breaks = $arr; + + return $this; + } + + /** + * Duration, distance and load metrics for this route. The fields of + * [AggregatedMetrics][google.maps.routeoptimization.v1.AggregatedMetrics] are + * summed over all + * [ShipmentRoute.transitions][google.maps.routeoptimization.v1.ShipmentRoute.transitions] + * or + * [ShipmentRoute.visits][google.maps.routeoptimization.v1.ShipmentRoute.visits], + * depending on the context. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.AggregatedMetrics metrics = 12; + * @return \Google\Maps\RouteOptimization\V1\AggregatedMetrics|null + */ + public function getMetrics() + { + return $this->metrics; + } + + public function hasMetrics() + { + return isset($this->metrics); + } + + public function clearMetrics() + { + unset($this->metrics); + } + + /** + * Duration, distance and load metrics for this route. The fields of + * [AggregatedMetrics][google.maps.routeoptimization.v1.AggregatedMetrics] are + * summed over all + * [ShipmentRoute.transitions][google.maps.routeoptimization.v1.ShipmentRoute.transitions] + * or + * [ShipmentRoute.visits][google.maps.routeoptimization.v1.ShipmentRoute.visits], + * depending on the context. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.AggregatedMetrics metrics = 12; + * @param \Google\Maps\RouteOptimization\V1\AggregatedMetrics $var + * @return $this + */ + public function setMetrics($var) + { + GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\AggregatedMetrics::class); + $this->metrics = $var; + + return $this; + } + + /** + * Cost of the route, broken down by cost-related request fields. + * The keys are proto paths, relative to the input OptimizeToursRequest, e.g. + * "model.shipments.pickups.cost", and the values are the total cost + * generated by the corresponding cost field, aggregated over the whole route. + * In other words, costs["model.shipments.pickups.cost"] is the sum of all + * pickup costs over the route. All costs defined in the model are reported in + * detail here with the exception of costs related to TransitionAttributes + * that are only reported in an aggregated way as of 2022/01. + * + * Generated from protobuf field map route_costs = 17; + * @return \Google\Protobuf\Internal\MapField + */ + public function getRouteCosts() + { + return $this->route_costs; + } + + /** + * Cost of the route, broken down by cost-related request fields. + * The keys are proto paths, relative to the input OptimizeToursRequest, e.g. + * "model.shipments.pickups.cost", and the values are the total cost + * generated by the corresponding cost field, aggregated over the whole route. + * In other words, costs["model.shipments.pickups.cost"] is the sum of all + * pickup costs over the route. All costs defined in the model are reported in + * detail here with the exception of costs related to TransitionAttributes + * that are only reported in an aggregated way as of 2022/01. + * + * Generated from protobuf field map route_costs = 17; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setRouteCosts($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::DOUBLE); + $this->route_costs = $arr; + + return $this; + } + + /** + * Total cost of the route. The sum of all costs in the cost map. + * + * Generated from protobuf field double route_total_cost = 18; + * @return float + */ + public function getRouteTotalCost() + { + return $this->route_total_cost; + } + + /** + * Total cost of the route. The sum of all costs in the cost map. + * + * Generated from protobuf field double route_total_cost = 18; + * @param float $var + * @return $this + */ + public function setRouteTotalCost($var) + { + GPBUtil::checkDouble($var); + $this->route_total_cost = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentRoute/EncodedPolyline.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentRoute/EncodedPolyline.php new file mode 100644 index 000000000000..a3aecf3c5212 --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentRoute/EncodedPolyline.php @@ -0,0 +1,73 @@ +google.maps.routeoptimization.v1.ShipmentRoute.EncodedPolyline + */ +class EncodedPolyline extends \Google\Protobuf\Internal\Message +{ + /** + * String representing encoded points of the polyline. + * + * Generated from protobuf field string points = 1; + */ + protected $points = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $points + * String representing encoded points of the polyline. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); + parent::__construct($data); + } + + /** + * String representing encoded points of the polyline. + * + * Generated from protobuf field string points = 1; + * @return string + */ + public function getPoints() + { + return $this->points; + } + + /** + * String representing encoded points of the polyline. + * + * Generated from protobuf field string points = 1; + * @param string $var + * @return $this + */ + public function setPoints($var) + { + GPBUtil::checkString($var, True); + $this->points = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(EncodedPolyline::class, \Google\Maps\RouteOptimization\V1\ShipmentRoute_EncodedPolyline::class); + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentRoute/PBBreak.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentRoute/PBBreak.php new file mode 100644 index 000000000000..e05a14f991b9 --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentRoute/PBBreak.php @@ -0,0 +1,124 @@ +google.maps.routeoptimization.v1.ShipmentRoute.Break + */ +class PBBreak extends \Google\Protobuf\Internal\Message +{ + /** + * Start time of a break. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + */ + protected $start_time = null; + /** + * Duration of a break. + * + * Generated from protobuf field .google.protobuf.Duration duration = 2; + */ + protected $duration = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $start_time + * Start time of a break. + * @type \Google\Protobuf\Duration $duration + * Duration of a break. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); + parent::__construct($data); + } + + /** + * Start time of a break. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + * @return \Google\Protobuf\Timestamp|null + */ + public function getStartTime() + { + return $this->start_time; + } + + public function hasStartTime() + { + return isset($this->start_time); + } + + public function clearStartTime() + { + unset($this->start_time); + } + + /** + * Start time of a break. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * Duration of a break. + * + * Generated from protobuf field .google.protobuf.Duration duration = 2; + * @return \Google\Protobuf\Duration|null + */ + public function getDuration() + { + return $this->duration; + } + + public function hasDuration() + { + return isset($this->duration); + } + + public function clearDuration() + { + unset($this->duration); + } + + /** + * Duration of a break. + * + * Generated from protobuf field .google.protobuf.Duration duration = 2; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->duration = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(PBBreak::class, \Google\Maps\RouteOptimization\V1\ShipmentRoute_Break::class); + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentRoute/Transition.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentRoute/Transition.php new file mode 100644 index 000000000000..e2c4c53592bf --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentRoute/Transition.php @@ -0,0 +1,639 @@ +google.maps.routeoptimization.v1.ShipmentRoute.Transition + */ +class Transition extends \Google\Protobuf\Internal\Message +{ + /** + * Travel duration during this transition. + * + * Generated from protobuf field .google.protobuf.Duration travel_duration = 1; + */ + protected $travel_duration = null; + /** + * Distance traveled during the transition. + * + * Generated from protobuf field double travel_distance_meters = 2; + */ + protected $travel_distance_meters = 0.0; + /** + * When traffic is requested via + * [OptimizeToursRequest.consider_road_traffic] + * [google.maps.routeoptimization.v1.OptimizeToursRequest.consider_road_traffic], + * and the traffic info couldn't be retrieved for a `Transition`, this + * boolean is set to true. This may be temporary (rare hiccup in the + * realtime traffic servers) or permanent (no data for this location). + * + * Generated from protobuf field bool traffic_info_unavailable = 3; + */ + protected $traffic_info_unavailable = false; + /** + * Sum of the delay durations applied to this transition. If any, the delay + * starts exactly `delay_duration` seconds before the next event (visit or + * vehicle end). See + * [TransitionAttributes.delay][google.maps.routeoptimization.v1.TransitionAttributes.delay]. + * + * Generated from protobuf field .google.protobuf.Duration delay_duration = 4; + */ + protected $delay_duration = null; + /** + * Sum of the duration of the breaks occurring during this transition, if + * any. Details about each break's start time and duration are stored in + * [ShipmentRoute.breaks][google.maps.routeoptimization.v1.ShipmentRoute.breaks]. + * + * Generated from protobuf field .google.protobuf.Duration break_duration = 5; + */ + protected $break_duration = null; + /** + * Time spent waiting during this transition. Wait duration corresponds to + * idle time and does not include break time. Also note that this wait time + * may be split into several non-contiguous intervals. + * + * Generated from protobuf field .google.protobuf.Duration wait_duration = 6; + */ + protected $wait_duration = null; + /** + * Total duration of the transition, provided for convenience. It is equal + * to: + * * next visit `start_time` (or `vehicle_end_time` if this is the last + * transition) - this transition's `start_time`; + * * if `ShipmentRoute.has_traffic_infeasibilities` is false, the following + * additionally holds: `total_duration = travel_duration + delay_duration + * + break_duration + wait_duration`. + * + * Generated from protobuf field .google.protobuf.Duration total_duration = 7; + */ + protected $total_duration = null; + /** + * Start time of this transition. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 8; + */ + protected $start_time = null; + /** + * The encoded polyline representation of the route followed during the + * transition. + * This field is only populated if [populate_transition_polylines] + * [google.maps.routeoptimization.v1.OptimizeToursRequest.populate_transition_polylines] + * is set to true. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.ShipmentRoute.EncodedPolyline route_polyline = 9; + */ + protected $route_polyline = null; + /** + * Output only. An opaque token that can be passed to [Navigation + * SDK](https://developers.google.com/maps/documentation/navigation) to + * reconstruct the route during navigation, and, in the event of rerouting, + * honor the original intention when the route was created. Treat this token + * as an opaque blob. Don't compare its value across requests as its value + * may change even if the service returns the exact same route. This field + * is only populated if [populate_transition_polylines] + * [google.maps.routeoptimization.v1.OptimizeToursRequest.populate_transition_polylines] + * is set to true. + * + * Generated from protobuf field string route_token = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $route_token = ''; + /** + * Vehicle loads during this transition, for each type that either appears + * in this vehicle's + * [Vehicle.load_limits][google.maps.routeoptimization.v1.Vehicle.load_limits], + * or that have non-zero + * [Shipment.load_demands][google.maps.routeoptimization.v1.Shipment.load_demands] + * on some shipment performed on this route. + * The loads during the first transition are the starting loads of the + * vehicle route. Then, after each visit, the visit's `load_demands` are + * either added or subtracted to get the next transition's loads, depending + * on whether the visit was a pickup or a delivery. + * + * Generated from protobuf field map vehicle_loads = 11; + */ + private $vehicle_loads; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Duration $travel_duration + * Travel duration during this transition. + * @type float $travel_distance_meters + * Distance traveled during the transition. + * @type bool $traffic_info_unavailable + * When traffic is requested via + * [OptimizeToursRequest.consider_road_traffic] + * [google.maps.routeoptimization.v1.OptimizeToursRequest.consider_road_traffic], + * and the traffic info couldn't be retrieved for a `Transition`, this + * boolean is set to true. This may be temporary (rare hiccup in the + * realtime traffic servers) or permanent (no data for this location). + * @type \Google\Protobuf\Duration $delay_duration + * Sum of the delay durations applied to this transition. If any, the delay + * starts exactly `delay_duration` seconds before the next event (visit or + * vehicle end). See + * [TransitionAttributes.delay][google.maps.routeoptimization.v1.TransitionAttributes.delay]. + * @type \Google\Protobuf\Duration $break_duration + * Sum of the duration of the breaks occurring during this transition, if + * any. Details about each break's start time and duration are stored in + * [ShipmentRoute.breaks][google.maps.routeoptimization.v1.ShipmentRoute.breaks]. + * @type \Google\Protobuf\Duration $wait_duration + * Time spent waiting during this transition. Wait duration corresponds to + * idle time and does not include break time. Also note that this wait time + * may be split into several non-contiguous intervals. + * @type \Google\Protobuf\Duration $total_duration + * Total duration of the transition, provided for convenience. It is equal + * to: + * * next visit `start_time` (or `vehicle_end_time` if this is the last + * transition) - this transition's `start_time`; + * * if `ShipmentRoute.has_traffic_infeasibilities` is false, the following + * additionally holds: `total_duration = travel_duration + delay_duration + * + break_duration + wait_duration`. + * @type \Google\Protobuf\Timestamp $start_time + * Start time of this transition. + * @type \Google\Maps\RouteOptimization\V1\ShipmentRoute\EncodedPolyline $route_polyline + * The encoded polyline representation of the route followed during the + * transition. + * This field is only populated if [populate_transition_polylines] + * [google.maps.routeoptimization.v1.OptimizeToursRequest.populate_transition_polylines] + * is set to true. + * @type string $route_token + * Output only. An opaque token that can be passed to [Navigation + * SDK](https://developers.google.com/maps/documentation/navigation) to + * reconstruct the route during navigation, and, in the event of rerouting, + * honor the original intention when the route was created. Treat this token + * as an opaque blob. Don't compare its value across requests as its value + * may change even if the service returns the exact same route. This field + * is only populated if [populate_transition_polylines] + * [google.maps.routeoptimization.v1.OptimizeToursRequest.populate_transition_polylines] + * is set to true. + * @type array|\Google\Protobuf\Internal\MapField $vehicle_loads + * Vehicle loads during this transition, for each type that either appears + * in this vehicle's + * [Vehicle.load_limits][google.maps.routeoptimization.v1.Vehicle.load_limits], + * or that have non-zero + * [Shipment.load_demands][google.maps.routeoptimization.v1.Shipment.load_demands] + * on some shipment performed on this route. + * The loads during the first transition are the starting loads of the + * vehicle route. Then, after each visit, the visit's `load_demands` are + * either added or subtracted to get the next transition's loads, depending + * on whether the visit was a pickup or a delivery. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); + parent::__construct($data); + } + + /** + * Travel duration during this transition. + * + * Generated from protobuf field .google.protobuf.Duration travel_duration = 1; + * @return \Google\Protobuf\Duration|null + */ + public function getTravelDuration() + { + return $this->travel_duration; + } + + public function hasTravelDuration() + { + return isset($this->travel_duration); + } + + public function clearTravelDuration() + { + unset($this->travel_duration); + } + + /** + * Travel duration during this transition. + * + * Generated from protobuf field .google.protobuf.Duration travel_duration = 1; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setTravelDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->travel_duration = $var; + + return $this; + } + + /** + * Distance traveled during the transition. + * + * Generated from protobuf field double travel_distance_meters = 2; + * @return float + */ + public function getTravelDistanceMeters() + { + return $this->travel_distance_meters; + } + + /** + * Distance traveled during the transition. + * + * Generated from protobuf field double travel_distance_meters = 2; + * @param float $var + * @return $this + */ + public function setTravelDistanceMeters($var) + { + GPBUtil::checkDouble($var); + $this->travel_distance_meters = $var; + + return $this; + } + + /** + * When traffic is requested via + * [OptimizeToursRequest.consider_road_traffic] + * [google.maps.routeoptimization.v1.OptimizeToursRequest.consider_road_traffic], + * and the traffic info couldn't be retrieved for a `Transition`, this + * boolean is set to true. This may be temporary (rare hiccup in the + * realtime traffic servers) or permanent (no data for this location). + * + * Generated from protobuf field bool traffic_info_unavailable = 3; + * @return bool + */ + public function getTrafficInfoUnavailable() + { + return $this->traffic_info_unavailable; + } + + /** + * When traffic is requested via + * [OptimizeToursRequest.consider_road_traffic] + * [google.maps.routeoptimization.v1.OptimizeToursRequest.consider_road_traffic], + * and the traffic info couldn't be retrieved for a `Transition`, this + * boolean is set to true. This may be temporary (rare hiccup in the + * realtime traffic servers) or permanent (no data for this location). + * + * Generated from protobuf field bool traffic_info_unavailable = 3; + * @param bool $var + * @return $this + */ + public function setTrafficInfoUnavailable($var) + { + GPBUtil::checkBool($var); + $this->traffic_info_unavailable = $var; + + return $this; + } + + /** + * Sum of the delay durations applied to this transition. If any, the delay + * starts exactly `delay_duration` seconds before the next event (visit or + * vehicle end). See + * [TransitionAttributes.delay][google.maps.routeoptimization.v1.TransitionAttributes.delay]. + * + * Generated from protobuf field .google.protobuf.Duration delay_duration = 4; + * @return \Google\Protobuf\Duration|null + */ + public function getDelayDuration() + { + return $this->delay_duration; + } + + public function hasDelayDuration() + { + return isset($this->delay_duration); + } + + public function clearDelayDuration() + { + unset($this->delay_duration); + } + + /** + * Sum of the delay durations applied to this transition. If any, the delay + * starts exactly `delay_duration` seconds before the next event (visit or + * vehicle end). See + * [TransitionAttributes.delay][google.maps.routeoptimization.v1.TransitionAttributes.delay]. + * + * Generated from protobuf field .google.protobuf.Duration delay_duration = 4; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setDelayDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->delay_duration = $var; + + return $this; + } + + /** + * Sum of the duration of the breaks occurring during this transition, if + * any. Details about each break's start time and duration are stored in + * [ShipmentRoute.breaks][google.maps.routeoptimization.v1.ShipmentRoute.breaks]. + * + * Generated from protobuf field .google.protobuf.Duration break_duration = 5; + * @return \Google\Protobuf\Duration|null + */ + public function getBreakDuration() + { + return $this->break_duration; + } + + public function hasBreakDuration() + { + return isset($this->break_duration); + } + + public function clearBreakDuration() + { + unset($this->break_duration); + } + + /** + * Sum of the duration of the breaks occurring during this transition, if + * any. Details about each break's start time and duration are stored in + * [ShipmentRoute.breaks][google.maps.routeoptimization.v1.ShipmentRoute.breaks]. + * + * Generated from protobuf field .google.protobuf.Duration break_duration = 5; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setBreakDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->break_duration = $var; + + return $this; + } + + /** + * Time spent waiting during this transition. Wait duration corresponds to + * idle time and does not include break time. Also note that this wait time + * may be split into several non-contiguous intervals. + * + * Generated from protobuf field .google.protobuf.Duration wait_duration = 6; + * @return \Google\Protobuf\Duration|null + */ + public function getWaitDuration() + { + return $this->wait_duration; + } + + public function hasWaitDuration() + { + return isset($this->wait_duration); + } + + public function clearWaitDuration() + { + unset($this->wait_duration); + } + + /** + * Time spent waiting during this transition. Wait duration corresponds to + * idle time and does not include break time. Also note that this wait time + * may be split into several non-contiguous intervals. + * + * Generated from protobuf field .google.protobuf.Duration wait_duration = 6; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setWaitDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->wait_duration = $var; + + return $this; + } + + /** + * Total duration of the transition, provided for convenience. It is equal + * to: + * * next visit `start_time` (or `vehicle_end_time` if this is the last + * transition) - this transition's `start_time`; + * * if `ShipmentRoute.has_traffic_infeasibilities` is false, the following + * additionally holds: `total_duration = travel_duration + delay_duration + * + break_duration + wait_duration`. + * + * Generated from protobuf field .google.protobuf.Duration total_duration = 7; + * @return \Google\Protobuf\Duration|null + */ + public function getTotalDuration() + { + return $this->total_duration; + } + + public function hasTotalDuration() + { + return isset($this->total_duration); + } + + public function clearTotalDuration() + { + unset($this->total_duration); + } + + /** + * Total duration of the transition, provided for convenience. It is equal + * to: + * * next visit `start_time` (or `vehicle_end_time` if this is the last + * transition) - this transition's `start_time`; + * * if `ShipmentRoute.has_traffic_infeasibilities` is false, the following + * additionally holds: `total_duration = travel_duration + delay_duration + * + break_duration + wait_duration`. + * + * Generated from protobuf field .google.protobuf.Duration total_duration = 7; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setTotalDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->total_duration = $var; + + return $this; + } + + /** + * Start time of this transition. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 8; + * @return \Google\Protobuf\Timestamp|null + */ + public function getStartTime() + { + return $this->start_time; + } + + public function hasStartTime() + { + return isset($this->start_time); + } + + public function clearStartTime() + { + unset($this->start_time); + } + + /** + * Start time of this transition. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 8; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * The encoded polyline representation of the route followed during the + * transition. + * This field is only populated if [populate_transition_polylines] + * [google.maps.routeoptimization.v1.OptimizeToursRequest.populate_transition_polylines] + * is set to true. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.ShipmentRoute.EncodedPolyline route_polyline = 9; + * @return \Google\Maps\RouteOptimization\V1\ShipmentRoute\EncodedPolyline|null + */ + public function getRoutePolyline() + { + return $this->route_polyline; + } + + public function hasRoutePolyline() + { + return isset($this->route_polyline); + } + + public function clearRoutePolyline() + { + unset($this->route_polyline); + } + + /** + * The encoded polyline representation of the route followed during the + * transition. + * This field is only populated if [populate_transition_polylines] + * [google.maps.routeoptimization.v1.OptimizeToursRequest.populate_transition_polylines] + * is set to true. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.ShipmentRoute.EncodedPolyline route_polyline = 9; + * @param \Google\Maps\RouteOptimization\V1\ShipmentRoute\EncodedPolyline $var + * @return $this + */ + public function setRoutePolyline($var) + { + GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\ShipmentRoute\EncodedPolyline::class); + $this->route_polyline = $var; + + return $this; + } + + /** + * Output only. An opaque token that can be passed to [Navigation + * SDK](https://developers.google.com/maps/documentation/navigation) to + * reconstruct the route during navigation, and, in the event of rerouting, + * honor the original intention when the route was created. Treat this token + * as an opaque blob. Don't compare its value across requests as its value + * may change even if the service returns the exact same route. This field + * is only populated if [populate_transition_polylines] + * [google.maps.routeoptimization.v1.OptimizeToursRequest.populate_transition_polylines] + * is set to true. + * + * Generated from protobuf field string route_token = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getRouteToken() + { + return $this->route_token; + } + + /** + * Output only. An opaque token that can be passed to [Navigation + * SDK](https://developers.google.com/maps/documentation/navigation) to + * reconstruct the route during navigation, and, in the event of rerouting, + * honor the original intention when the route was created. Treat this token + * as an opaque blob. Don't compare its value across requests as its value + * may change even if the service returns the exact same route. This field + * is only populated if [populate_transition_polylines] + * [google.maps.routeoptimization.v1.OptimizeToursRequest.populate_transition_polylines] + * is set to true. + * + * Generated from protobuf field string route_token = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setRouteToken($var) + { + GPBUtil::checkString($var, True); + $this->route_token = $var; + + return $this; + } + + /** + * Vehicle loads during this transition, for each type that either appears + * in this vehicle's + * [Vehicle.load_limits][google.maps.routeoptimization.v1.Vehicle.load_limits], + * or that have non-zero + * [Shipment.load_demands][google.maps.routeoptimization.v1.Shipment.load_demands] + * on some shipment performed on this route. + * The loads during the first transition are the starting loads of the + * vehicle route. Then, after each visit, the visit's `load_demands` are + * either added or subtracted to get the next transition's loads, depending + * on whether the visit was a pickup or a delivery. + * + * Generated from protobuf field map vehicle_loads = 11; + * @return \Google\Protobuf\Internal\MapField + */ + public function getVehicleLoads() + { + return $this->vehicle_loads; + } + + /** + * Vehicle loads during this transition, for each type that either appears + * in this vehicle's + * [Vehicle.load_limits][google.maps.routeoptimization.v1.Vehicle.load_limits], + * or that have non-zero + * [Shipment.load_demands][google.maps.routeoptimization.v1.Shipment.load_demands] + * on some shipment performed on this route. + * The loads during the first transition are the starting loads of the + * vehicle route. Then, after each visit, the visit's `load_demands` are + * either added or subtracted to get the next transition's loads, depending + * on whether the visit was a pickup or a delivery. + * + * Generated from protobuf field map vehicle_loads = 11; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setVehicleLoads($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\ShipmentRoute\VehicleLoad::class); + $this->vehicle_loads = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Transition::class, \Google\Maps\RouteOptimization\V1\ShipmentRoute_Transition::class); + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentRoute/VehicleLoad.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentRoute/VehicleLoad.php new file mode 100644 index 000000000000..cb8378f1af45 --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentRoute/VehicleLoad.php @@ -0,0 +1,80 @@ +google.maps.routeoptimization.v1.ShipmentRoute.VehicleLoad + */ +class VehicleLoad extends \Google\Protobuf\Internal\Message +{ + /** + * The amount of load on the vehicle, for the given type. The unit of load + * is usually indicated by the type. See + * [Transition.vehicle_loads][google.maps.routeoptimization.v1.ShipmentRoute.Transition.vehicle_loads]. + * + * Generated from protobuf field int64 amount = 1; + */ + protected $amount = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $amount + * The amount of load on the vehicle, for the given type. The unit of load + * is usually indicated by the type. See + * [Transition.vehicle_loads][google.maps.routeoptimization.v1.ShipmentRoute.Transition.vehicle_loads]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); + parent::__construct($data); + } + + /** + * The amount of load on the vehicle, for the given type. The unit of load + * is usually indicated by the type. See + * [Transition.vehicle_loads][google.maps.routeoptimization.v1.ShipmentRoute.Transition.vehicle_loads]. + * + * Generated from protobuf field int64 amount = 1; + * @return int|string + */ + public function getAmount() + { + return $this->amount; + } + + /** + * The amount of load on the vehicle, for the given type. The unit of load + * is usually indicated by the type. See + * [Transition.vehicle_loads][google.maps.routeoptimization.v1.ShipmentRoute.Transition.vehicle_loads]. + * + * Generated from protobuf field int64 amount = 1; + * @param int|string $var + * @return $this + */ + public function setAmount($var) + { + GPBUtil::checkInt64($var); + $this->amount = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(VehicleLoad::class, \Google\Maps\RouteOptimization\V1\ShipmentRoute_VehicleLoad::class); + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentRoute/Visit.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentRoute/Visit.php new file mode 100644 index 000000000000..a863ea8092cb --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentRoute/Visit.php @@ -0,0 +1,433 @@ +google.maps.routeoptimization.v1.ShipmentRoute.Visit + */ +class Visit extends \Google\Protobuf\Internal\Message +{ + /** + * Index of the `shipments` field in the source + * [ShipmentModel][google.maps.routeoptimization.v1.ShipmentModel]. + * + * Generated from protobuf field int32 shipment_index = 1; + */ + protected $shipment_index = 0; + /** + * If true the visit corresponds to a pickup of a `Shipment`. Otherwise, it + * corresponds to a delivery. + * + * Generated from protobuf field bool is_pickup = 2; + */ + protected $is_pickup = false; + /** + * Index of `VisitRequest` in either the pickup or delivery field of the + * `Shipment` (see `is_pickup`). + * + * Generated from protobuf field int32 visit_request_index = 3; + */ + protected $visit_request_index = 0; + /** + * Time at which the visit starts. Note that the vehicle may arrive earlier + * than this at the visit location. Times are consistent with the + * `ShipmentModel`. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 4; + */ + protected $start_time = null; + /** + * Total visit load demand as the sum of the shipment and the visit request + * `load_demands`. The values are negative if the visit is a delivery. + * Demands are reported for the same types as the + * [Transition.loads][google.maps.routeoptimization.v1.ShipmentRoute.Transition] + * (see this field). + * + * Generated from protobuf field map load_demands = 11; + */ + private $load_demands; + /** + * Extra detour time due to the shipments visited on the route before the + * visit and to the potential waiting time induced by time windows. + * If the visit is a delivery, the detour is computed from the corresponding + * pickup visit and is equal to: + * ``` + * start_time(delivery) - start_time(pickup) + * - (duration(pickup) + travel duration from the pickup location + * to the delivery location). + * ``` + * Otherwise, it is computed from the vehicle `start_location` and is equal + * to: + * ``` + * start_time - vehicle_start_time - travel duration from + * the vehicle's `start_location` to the visit. + * ``` + * + * Generated from protobuf field .google.protobuf.Duration detour = 6; + */ + protected $detour = null; + /** + * Copy of the corresponding `Shipment.label`, if specified in the + * `Shipment`. + * + * Generated from protobuf field string shipment_label = 7; + */ + protected $shipment_label = ''; + /** + * Copy of the corresponding + * [VisitRequest.label][google.maps.routeoptimization.v1.Shipment.VisitRequest.label], + * if specified in the `VisitRequest`. + * + * Generated from protobuf field string visit_label = 8; + */ + protected $visit_label = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $shipment_index + * Index of the `shipments` field in the source + * [ShipmentModel][google.maps.routeoptimization.v1.ShipmentModel]. + * @type bool $is_pickup + * If true the visit corresponds to a pickup of a `Shipment`. Otherwise, it + * corresponds to a delivery. + * @type int $visit_request_index + * Index of `VisitRequest` in either the pickup or delivery field of the + * `Shipment` (see `is_pickup`). + * @type \Google\Protobuf\Timestamp $start_time + * Time at which the visit starts. Note that the vehicle may arrive earlier + * than this at the visit location. Times are consistent with the + * `ShipmentModel`. + * @type array|\Google\Protobuf\Internal\MapField $load_demands + * Total visit load demand as the sum of the shipment and the visit request + * `load_demands`. The values are negative if the visit is a delivery. + * Demands are reported for the same types as the + * [Transition.loads][google.maps.routeoptimization.v1.ShipmentRoute.Transition] + * (see this field). + * @type \Google\Protobuf\Duration $detour + * Extra detour time due to the shipments visited on the route before the + * visit and to the potential waiting time induced by time windows. + * If the visit is a delivery, the detour is computed from the corresponding + * pickup visit and is equal to: + * ``` + * start_time(delivery) - start_time(pickup) + * - (duration(pickup) + travel duration from the pickup location + * to the delivery location). + * ``` + * Otherwise, it is computed from the vehicle `start_location` and is equal + * to: + * ``` + * start_time - vehicle_start_time - travel duration from + * the vehicle's `start_location` to the visit. + * ``` + * @type string $shipment_label + * Copy of the corresponding `Shipment.label`, if specified in the + * `Shipment`. + * @type string $visit_label + * Copy of the corresponding + * [VisitRequest.label][google.maps.routeoptimization.v1.Shipment.VisitRequest.label], + * if specified in the `VisitRequest`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); + parent::__construct($data); + } + + /** + * Index of the `shipments` field in the source + * [ShipmentModel][google.maps.routeoptimization.v1.ShipmentModel]. + * + * Generated from protobuf field int32 shipment_index = 1; + * @return int + */ + public function getShipmentIndex() + { + return $this->shipment_index; + } + + /** + * Index of the `shipments` field in the source + * [ShipmentModel][google.maps.routeoptimization.v1.ShipmentModel]. + * + * Generated from protobuf field int32 shipment_index = 1; + * @param int $var + * @return $this + */ + public function setShipmentIndex($var) + { + GPBUtil::checkInt32($var); + $this->shipment_index = $var; + + return $this; + } + + /** + * If true the visit corresponds to a pickup of a `Shipment`. Otherwise, it + * corresponds to a delivery. + * + * Generated from protobuf field bool is_pickup = 2; + * @return bool + */ + public function getIsPickup() + { + return $this->is_pickup; + } + + /** + * If true the visit corresponds to a pickup of a `Shipment`. Otherwise, it + * corresponds to a delivery. + * + * Generated from protobuf field bool is_pickup = 2; + * @param bool $var + * @return $this + */ + public function setIsPickup($var) + { + GPBUtil::checkBool($var); + $this->is_pickup = $var; + + return $this; + } + + /** + * Index of `VisitRequest` in either the pickup or delivery field of the + * `Shipment` (see `is_pickup`). + * + * Generated from protobuf field int32 visit_request_index = 3; + * @return int + */ + public function getVisitRequestIndex() + { + return $this->visit_request_index; + } + + /** + * Index of `VisitRequest` in either the pickup or delivery field of the + * `Shipment` (see `is_pickup`). + * + * Generated from protobuf field int32 visit_request_index = 3; + * @param int $var + * @return $this + */ + public function setVisitRequestIndex($var) + { + GPBUtil::checkInt32($var); + $this->visit_request_index = $var; + + return $this; + } + + /** + * Time at which the visit starts. Note that the vehicle may arrive earlier + * than this at the visit location. Times are consistent with the + * `ShipmentModel`. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 4; + * @return \Google\Protobuf\Timestamp|null + */ + public function getStartTime() + { + return $this->start_time; + } + + public function hasStartTime() + { + return isset($this->start_time); + } + + public function clearStartTime() + { + unset($this->start_time); + } + + /** + * Time at which the visit starts. Note that the vehicle may arrive earlier + * than this at the visit location. Times are consistent with the + * `ShipmentModel`. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 4; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * Total visit load demand as the sum of the shipment and the visit request + * `load_demands`. The values are negative if the visit is a delivery. + * Demands are reported for the same types as the + * [Transition.loads][google.maps.routeoptimization.v1.ShipmentRoute.Transition] + * (see this field). + * + * Generated from protobuf field map load_demands = 11; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLoadDemands() + { + return $this->load_demands; + } + + /** + * Total visit load demand as the sum of the shipment and the visit request + * `load_demands`. The values are negative if the visit is a delivery. + * Demands are reported for the same types as the + * [Transition.loads][google.maps.routeoptimization.v1.ShipmentRoute.Transition] + * (see this field). + * + * Generated from protobuf field map load_demands = 11; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLoadDemands($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\Shipment\Load::class); + $this->load_demands = $arr; + + return $this; + } + + /** + * Extra detour time due to the shipments visited on the route before the + * visit and to the potential waiting time induced by time windows. + * If the visit is a delivery, the detour is computed from the corresponding + * pickup visit and is equal to: + * ``` + * start_time(delivery) - start_time(pickup) + * - (duration(pickup) + travel duration from the pickup location + * to the delivery location). + * ``` + * Otherwise, it is computed from the vehicle `start_location` and is equal + * to: + * ``` + * start_time - vehicle_start_time - travel duration from + * the vehicle's `start_location` to the visit. + * ``` + * + * Generated from protobuf field .google.protobuf.Duration detour = 6; + * @return \Google\Protobuf\Duration|null + */ + public function getDetour() + { + return $this->detour; + } + + public function hasDetour() + { + return isset($this->detour); + } + + public function clearDetour() + { + unset($this->detour); + } + + /** + * Extra detour time due to the shipments visited on the route before the + * visit and to the potential waiting time induced by time windows. + * If the visit is a delivery, the detour is computed from the corresponding + * pickup visit and is equal to: + * ``` + * start_time(delivery) - start_time(pickup) + * - (duration(pickup) + travel duration from the pickup location + * to the delivery location). + * ``` + * Otherwise, it is computed from the vehicle `start_location` and is equal + * to: + * ``` + * start_time - vehicle_start_time - travel duration from + * the vehicle's `start_location` to the visit. + * ``` + * + * Generated from protobuf field .google.protobuf.Duration detour = 6; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setDetour($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->detour = $var; + + return $this; + } + + /** + * Copy of the corresponding `Shipment.label`, if specified in the + * `Shipment`. + * + * Generated from protobuf field string shipment_label = 7; + * @return string + */ + public function getShipmentLabel() + { + return $this->shipment_label; + } + + /** + * Copy of the corresponding `Shipment.label`, if specified in the + * `Shipment`. + * + * Generated from protobuf field string shipment_label = 7; + * @param string $var + * @return $this + */ + public function setShipmentLabel($var) + { + GPBUtil::checkString($var, True); + $this->shipment_label = $var; + + return $this; + } + + /** + * Copy of the corresponding + * [VisitRequest.label][google.maps.routeoptimization.v1.Shipment.VisitRequest.label], + * if specified in the `VisitRequest`. + * + * Generated from protobuf field string visit_label = 8; + * @return string + */ + public function getVisitLabel() + { + return $this->visit_label; + } + + /** + * Copy of the corresponding + * [VisitRequest.label][google.maps.routeoptimization.v1.Shipment.VisitRequest.label], + * if specified in the `VisitRequest`. + * + * Generated from protobuf field string visit_label = 8; + * @param string $var + * @return $this + */ + public function setVisitLabel($var) + { + GPBUtil::checkString($var, True); + $this->visit_label = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Visit::class, \Google\Maps\RouteOptimization\V1\ShipmentRoute_Visit::class); + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentTypeIncompatibility.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentTypeIncompatibility.php new file mode 100644 index 000000000000..17d80f6ccd1d --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentTypeIncompatibility.php @@ -0,0 +1,107 @@ +google.maps.routeoptimization.v1.ShipmentTypeIncompatibility + */ +class ShipmentTypeIncompatibility extends \Google\Protobuf\Internal\Message +{ + /** + * List of incompatible types. Two shipments having different `shipment_types` + * among those listed are "incompatible". + * + * Generated from protobuf field repeated string types = 1; + */ + private $types; + /** + * Mode applied to the incompatibility. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.ShipmentTypeIncompatibility.IncompatibilityMode incompatibility_mode = 2; + */ + protected $incompatibility_mode = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $types + * List of incompatible types. Two shipments having different `shipment_types` + * among those listed are "incompatible". + * @type int $incompatibility_mode + * Mode applied to the incompatibility. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); + parent::__construct($data); + } + + /** + * List of incompatible types. Two shipments having different `shipment_types` + * among those listed are "incompatible". + * + * Generated from protobuf field repeated string types = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTypes() + { + return $this->types; + } + + /** + * List of incompatible types. Two shipments having different `shipment_types` + * among those listed are "incompatible". + * + * Generated from protobuf field repeated string types = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTypes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->types = $arr; + + return $this; + } + + /** + * Mode applied to the incompatibility. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.ShipmentTypeIncompatibility.IncompatibilityMode incompatibility_mode = 2; + * @return int + */ + public function getIncompatibilityMode() + { + return $this->incompatibility_mode; + } + + /** + * Mode applied to the incompatibility. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.ShipmentTypeIncompatibility.IncompatibilityMode incompatibility_mode = 2; + * @param int $var + * @return $this + */ + public function setIncompatibilityMode($var) + { + GPBUtil::checkEnum($var, \Google\Maps\RouteOptimization\V1\ShipmentTypeIncompatibility\IncompatibilityMode::class); + $this->incompatibility_mode = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentTypeIncompatibility/IncompatibilityMode.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentTypeIncompatibility/IncompatibilityMode.php new file mode 100644 index 000000000000..1b34c50ca5fa --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentTypeIncompatibility/IncompatibilityMode.php @@ -0,0 +1,72 @@ +google.maps.routeoptimization.v1.ShipmentTypeIncompatibility.IncompatibilityMode + */ +class IncompatibilityMode +{ + /** + * Unspecified incompatibility mode. This value should never be used. + * + * Generated from protobuf enum INCOMPATIBILITY_MODE_UNSPECIFIED = 0; + */ + const INCOMPATIBILITY_MODE_UNSPECIFIED = 0; + /** + * In this mode, two shipments with incompatible types can never share the + * same vehicle. + * + * Generated from protobuf enum NOT_PERFORMED_BY_SAME_VEHICLE = 1; + */ + const NOT_PERFORMED_BY_SAME_VEHICLE = 1; + /** + * For two shipments with incompatible types with the + * `NOT_IN_SAME_VEHICLE_SIMULTANEOUSLY` incompatibility mode: + * * If both are pickups only (no deliveries) or deliveries only (no + * pickups), they cannot share the same vehicle at all. + * * If one of the shipments has a delivery and the other a pickup, the two + * shipments can share the same vehicle iff the former shipment is + * delivered before the latter is picked up. + * + * Generated from protobuf enum NOT_IN_SAME_VEHICLE_SIMULTANEOUSLY = 2; + */ + const NOT_IN_SAME_VEHICLE_SIMULTANEOUSLY = 2; + + private static $valueToName = [ + self::INCOMPATIBILITY_MODE_UNSPECIFIED => 'INCOMPATIBILITY_MODE_UNSPECIFIED', + self::NOT_PERFORMED_BY_SAME_VEHICLE => 'NOT_PERFORMED_BY_SAME_VEHICLE', + self::NOT_IN_SAME_VEHICLE_SIMULTANEOUSLY => 'NOT_IN_SAME_VEHICLE_SIMULTANEOUSLY', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(IncompatibilityMode::class, \Google\Maps\RouteOptimization\V1\ShipmentTypeIncompatibility_IncompatibilityMode::class); + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentTypeRequirement.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentTypeRequirement.php new file mode 100644 index 000000000000..c7d8d7f847b7 --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentTypeRequirement.php @@ -0,0 +1,156 @@ +google.maps.routeoptimization.v1.ShipmentTypeRequirement + */ +class ShipmentTypeRequirement extends \Google\Protobuf\Internal\Message +{ + /** + * List of alternative shipment types required by the + * `dependent_shipment_types`. + * + * Generated from protobuf field repeated string required_shipment_type_alternatives = 1; + */ + private $required_shipment_type_alternatives; + /** + * All shipments with a type in the `dependent_shipment_types` field require + * at least one shipment of type `required_shipment_type_alternatives` to be + * visited on the same route. + * NOTE: Chains of requirements such that a `shipment_type` depends on itself + * are not allowed. + * + * Generated from protobuf field repeated string dependent_shipment_types = 2; + */ + private $dependent_shipment_types; + /** + * Mode applied to the requirement. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.ShipmentTypeRequirement.RequirementMode requirement_mode = 3; + */ + protected $requirement_mode = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $required_shipment_type_alternatives + * List of alternative shipment types required by the + * `dependent_shipment_types`. + * @type array|\Google\Protobuf\Internal\RepeatedField $dependent_shipment_types + * All shipments with a type in the `dependent_shipment_types` field require + * at least one shipment of type `required_shipment_type_alternatives` to be + * visited on the same route. + * NOTE: Chains of requirements such that a `shipment_type` depends on itself + * are not allowed. + * @type int $requirement_mode + * Mode applied to the requirement. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); + parent::__construct($data); + } + + /** + * List of alternative shipment types required by the + * `dependent_shipment_types`. + * + * Generated from protobuf field repeated string required_shipment_type_alternatives = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRequiredShipmentTypeAlternatives() + { + return $this->required_shipment_type_alternatives; + } + + /** + * List of alternative shipment types required by the + * `dependent_shipment_types`. + * + * Generated from protobuf field repeated string required_shipment_type_alternatives = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRequiredShipmentTypeAlternatives($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->required_shipment_type_alternatives = $arr; + + return $this; + } + + /** + * All shipments with a type in the `dependent_shipment_types` field require + * at least one shipment of type `required_shipment_type_alternatives` to be + * visited on the same route. + * NOTE: Chains of requirements such that a `shipment_type` depends on itself + * are not allowed. + * + * Generated from protobuf field repeated string dependent_shipment_types = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDependentShipmentTypes() + { + return $this->dependent_shipment_types; + } + + /** + * All shipments with a type in the `dependent_shipment_types` field require + * at least one shipment of type `required_shipment_type_alternatives` to be + * visited on the same route. + * NOTE: Chains of requirements such that a `shipment_type` depends on itself + * are not allowed. + * + * Generated from protobuf field repeated string dependent_shipment_types = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDependentShipmentTypes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->dependent_shipment_types = $arr; + + return $this; + } + + /** + * Mode applied to the requirement. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.ShipmentTypeRequirement.RequirementMode requirement_mode = 3; + * @return int + */ + public function getRequirementMode() + { + return $this->requirement_mode; + } + + /** + * Mode applied to the requirement. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.ShipmentTypeRequirement.RequirementMode requirement_mode = 3; + * @param int $var + * @return $this + */ + public function setRequirementMode($var) + { + GPBUtil::checkEnum($var, \Google\Maps\RouteOptimization\V1\ShipmentTypeRequirement\RequirementMode::class); + $this->requirement_mode = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentTypeRequirement/RequirementMode.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentTypeRequirement/RequirementMode.php new file mode 100644 index 000000000000..b25581fc1f06 --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentTypeRequirement/RequirementMode.php @@ -0,0 +1,80 @@ +google.maps.routeoptimization.v1.ShipmentTypeRequirement.RequirementMode + */ +class RequirementMode +{ + /** + * Unspecified requirement mode. This value should never be used. + * + * Generated from protobuf enum REQUIREMENT_MODE_UNSPECIFIED = 0; + */ + const REQUIREMENT_MODE_UNSPECIFIED = 0; + /** + * In this mode, all "dependent" shipments must share the same vehicle as at + * least one of their "required" shipments. + * + * Generated from protobuf enum PERFORMED_BY_SAME_VEHICLE = 1; + */ + const PERFORMED_BY_SAME_VEHICLE = 1; + /** + * With the `IN_SAME_VEHICLE_AT_PICKUP_TIME` mode, all "dependent" + * shipments need to have at least one "required" shipment on their vehicle + * at the time of their pickup. + * A "dependent" shipment pickup must therefore have either: + * * A delivery-only "required" shipment delivered on the route after, or + * * A "required" shipment picked up on the route before it, and if the + * "required" shipment has a delivery, this delivery must be performed + * after the "dependent" shipment's pickup. + * + * Generated from protobuf enum IN_SAME_VEHICLE_AT_PICKUP_TIME = 2; + */ + const IN_SAME_VEHICLE_AT_PICKUP_TIME = 2; + /** + * Same as before, except the "dependent" shipments need to have a + * "required" shipment on their vehicle at the time of their *delivery*. + * + * Generated from protobuf enum IN_SAME_VEHICLE_AT_DELIVERY_TIME = 3; + */ + const IN_SAME_VEHICLE_AT_DELIVERY_TIME = 3; + + private static $valueToName = [ + self::REQUIREMENT_MODE_UNSPECIFIED => 'REQUIREMENT_MODE_UNSPECIFIED', + self::PERFORMED_BY_SAME_VEHICLE => 'PERFORMED_BY_SAME_VEHICLE', + self::IN_SAME_VEHICLE_AT_PICKUP_TIME => 'IN_SAME_VEHICLE_AT_PICKUP_TIME', + self::IN_SAME_VEHICLE_AT_DELIVERY_TIME => 'IN_SAME_VEHICLE_AT_DELIVERY_TIME', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(RequirementMode::class, \Google\Maps\RouteOptimization\V1\ShipmentTypeRequirement_RequirementMode::class); + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/SkippedShipment.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/SkippedShipment.php new file mode 100644 index 000000000000..451c769e8d2a --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/SkippedShipment.php @@ -0,0 +1,157 @@ +google.maps.routeoptimization.v1.SkippedShipment + */ +class SkippedShipment extends \Google\Protobuf\Internal\Message +{ + /** + * The index corresponds to the index of the shipment in the source + * `ShipmentModel`. + * + * Generated from protobuf field int32 index = 1; + */ + protected $index = 0; + /** + * Copy of the corresponding + * [Shipment.label][google.maps.routeoptimization.v1.Shipment.label], if + * specified in the `Shipment`. + * + * Generated from protobuf field string label = 2; + */ + protected $label = ''; + /** + * A list of reasons that explain why the shipment was skipped. See comment + * above `Reason`. If we are unable to understand why a shipment was skipped, + * reasons will not be set. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.SkippedShipment.Reason reasons = 3; + */ + private $reasons; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $index + * The index corresponds to the index of the shipment in the source + * `ShipmentModel`. + * @type string $label + * Copy of the corresponding + * [Shipment.label][google.maps.routeoptimization.v1.Shipment.label], if + * specified in the `Shipment`. + * @type array<\Google\Maps\RouteOptimization\V1\SkippedShipment\Reason>|\Google\Protobuf\Internal\RepeatedField $reasons + * A list of reasons that explain why the shipment was skipped. See comment + * above `Reason`. If we are unable to understand why a shipment was skipped, + * reasons will not be set. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); + parent::__construct($data); + } + + /** + * The index corresponds to the index of the shipment in the source + * `ShipmentModel`. + * + * Generated from protobuf field int32 index = 1; + * @return int + */ + public function getIndex() + { + return $this->index; + } + + /** + * The index corresponds to the index of the shipment in the source + * `ShipmentModel`. + * + * Generated from protobuf field int32 index = 1; + * @param int $var + * @return $this + */ + public function setIndex($var) + { + GPBUtil::checkInt32($var); + $this->index = $var; + + return $this; + } + + /** + * Copy of the corresponding + * [Shipment.label][google.maps.routeoptimization.v1.Shipment.label], if + * specified in the `Shipment`. + * + * Generated from protobuf field string label = 2; + * @return string + */ + public function getLabel() + { + return $this->label; + } + + /** + * Copy of the corresponding + * [Shipment.label][google.maps.routeoptimization.v1.Shipment.label], if + * specified in the `Shipment`. + * + * Generated from protobuf field string label = 2; + * @param string $var + * @return $this + */ + public function setLabel($var) + { + GPBUtil::checkString($var, True); + $this->label = $var; + + return $this; + } + + /** + * A list of reasons that explain why the shipment was skipped. See comment + * above `Reason`. If we are unable to understand why a shipment was skipped, + * reasons will not be set. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.SkippedShipment.Reason reasons = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getReasons() + { + return $this->reasons; + } + + /** + * A list of reasons that explain why the shipment was skipped. See comment + * above `Reason`. If we are unable to understand why a shipment was skipped, + * reasons will not be set. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.SkippedShipment.Reason reasons = 3; + * @param array<\Google\Maps\RouteOptimization\V1\SkippedShipment\Reason>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setReasons($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\SkippedShipment\Reason::class); + $this->reasons = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/SkippedShipment/Reason.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/SkippedShipment/Reason.php new file mode 100644 index 000000000000..b764ddfda63a --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/SkippedShipment/Reason.php @@ -0,0 +1,181 @@ +google.maps.routeoptimization.v1.SkippedShipment.Reason + */ +class Reason extends \Google\Protobuf\Internal\Message +{ + /** + * Refer to the comments of Code. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.SkippedShipment.Reason.Code code = 1; + */ + protected $code = 0; + /** + * If the reason is related to a shipment-vehicle incompatibility, this + * field provides the index of one relevant vehicle. + * + * Generated from protobuf field optional int32 example_vehicle_index = 2; + */ + protected $example_vehicle_index = null; + /** + * If the reason code is `DEMAND_EXCEEDS_VEHICLE_CAPACITY`, documents one + * capacity type that is exceeded. + * + * Generated from protobuf field string example_exceeded_capacity_type = 3; + */ + protected $example_exceeded_capacity_type = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $code + * Refer to the comments of Code. + * @type int $example_vehicle_index + * If the reason is related to a shipment-vehicle incompatibility, this + * field provides the index of one relevant vehicle. + * @type string $example_exceeded_capacity_type + * If the reason code is `DEMAND_EXCEEDS_VEHICLE_CAPACITY`, documents one + * capacity type that is exceeded. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); + parent::__construct($data); + } + + /** + * Refer to the comments of Code. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.SkippedShipment.Reason.Code code = 1; + * @return int + */ + public function getCode() + { + return $this->code; + } + + /** + * Refer to the comments of Code. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.SkippedShipment.Reason.Code code = 1; + * @param int $var + * @return $this + */ + public function setCode($var) + { + GPBUtil::checkEnum($var, \Google\Maps\RouteOptimization\V1\SkippedShipment\Reason\Code::class); + $this->code = $var; + + return $this; + } + + /** + * If the reason is related to a shipment-vehicle incompatibility, this + * field provides the index of one relevant vehicle. + * + * Generated from protobuf field optional int32 example_vehicle_index = 2; + * @return int + */ + public function getExampleVehicleIndex() + { + return isset($this->example_vehicle_index) ? $this->example_vehicle_index : 0; + } + + public function hasExampleVehicleIndex() + { + return isset($this->example_vehicle_index); + } + + public function clearExampleVehicleIndex() + { + unset($this->example_vehicle_index); + } + + /** + * If the reason is related to a shipment-vehicle incompatibility, this + * field provides the index of one relevant vehicle. + * + * Generated from protobuf field optional int32 example_vehicle_index = 2; + * @param int $var + * @return $this + */ + public function setExampleVehicleIndex($var) + { + GPBUtil::checkInt32($var); + $this->example_vehicle_index = $var; + + return $this; + } + + /** + * If the reason code is `DEMAND_EXCEEDS_VEHICLE_CAPACITY`, documents one + * capacity type that is exceeded. + * + * Generated from protobuf field string example_exceeded_capacity_type = 3; + * @return string + */ + public function getExampleExceededCapacityType() + { + return $this->example_exceeded_capacity_type; + } + + /** + * If the reason code is `DEMAND_EXCEEDS_VEHICLE_CAPACITY`, documents one + * capacity type that is exceeded. + * + * Generated from protobuf field string example_exceeded_capacity_type = 3; + * @param string $var + * @return $this + */ + public function setExampleExceededCapacityType($var) + { + GPBUtil::checkString($var, True); + $this->example_exceeded_capacity_type = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Reason::class, \Google\Maps\RouteOptimization\V1\SkippedShipment_Reason::class); + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/SkippedShipment/Reason/Code.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/SkippedShipment/Reason/Code.php new file mode 100644 index 000000000000..28c5af490f6b --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/SkippedShipment/Reason/Code.php @@ -0,0 +1,115 @@ +google.maps.routeoptimization.v1.SkippedShipment.Reason.Code + */ +class Code +{ + /** + * This should never be used. + * + * Generated from protobuf enum CODE_UNSPECIFIED = 0; + */ + const CODE_UNSPECIFIED = 0; + /** + * There is no vehicle in the model making all shipments infeasible. + * + * Generated from protobuf enum NO_VEHICLE = 1; + */ + const NO_VEHICLE = 1; + /** + * The demand of the shipment exceeds a vehicle's capacity for some + * capacity types, one of which is `example_exceeded_capacity_type`. + * + * Generated from protobuf enum DEMAND_EXCEEDS_VEHICLE_CAPACITY = 2; + */ + const DEMAND_EXCEEDS_VEHICLE_CAPACITY = 2; + /** + * The minimum distance necessary to perform this shipment, i.e. from + * the vehicle's `start_location` to the shipment's pickup and/or delivery + * locations and to the vehicle's end location exceeds the vehicle's + * `route_distance_limit`. + * Note that for this computation we use the geodesic distances. + * + * Generated from protobuf enum CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DISTANCE_LIMIT = 3; + */ + const CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DISTANCE_LIMIT = 3; + /** + * The minimum time necessary to perform this shipment, including travel + * time, wait time and service time exceeds the vehicle's + * `route_duration_limit`. + * Note: travel time is computed in the best-case scenario, namely as + * geodesic distance x 36 m/s (roughly 130 km/hour). + * + * Generated from protobuf enum CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DURATION_LIMIT = 4; + */ + const CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DURATION_LIMIT = 4; + /** + * Same as above but we only compare minimum travel time and the + * vehicle's `travel_duration_limit`. + * + * Generated from protobuf enum CANNOT_BE_PERFORMED_WITHIN_VEHICLE_TRAVEL_DURATION_LIMIT = 5; + */ + const CANNOT_BE_PERFORMED_WITHIN_VEHICLE_TRAVEL_DURATION_LIMIT = 5; + /** + * The vehicle cannot perform this shipment in the best-case scenario + * (see `CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DURATION_LIMIT` for time + * computation) if it starts at its earliest start time: the total time + * would make the vehicle end after its latest end time. + * + * Generated from protobuf enum CANNOT_BE_PERFORMED_WITHIN_VEHICLE_TIME_WINDOWS = 6; + */ + const CANNOT_BE_PERFORMED_WITHIN_VEHICLE_TIME_WINDOWS = 6; + /** + * The `allowed_vehicle_indices` field of the shipment is not empty and + * this vehicle does not belong to it. + * + * Generated from protobuf enum VEHICLE_NOT_ALLOWED = 7; + */ + const VEHICLE_NOT_ALLOWED = 7; + + private static $valueToName = [ + self::CODE_UNSPECIFIED => 'CODE_UNSPECIFIED', + self::NO_VEHICLE => 'NO_VEHICLE', + self::DEMAND_EXCEEDS_VEHICLE_CAPACITY => 'DEMAND_EXCEEDS_VEHICLE_CAPACITY', + self::CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DISTANCE_LIMIT => 'CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DISTANCE_LIMIT', + self::CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DURATION_LIMIT => 'CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DURATION_LIMIT', + self::CANNOT_BE_PERFORMED_WITHIN_VEHICLE_TRAVEL_DURATION_LIMIT => 'CANNOT_BE_PERFORMED_WITHIN_VEHICLE_TRAVEL_DURATION_LIMIT', + self::CANNOT_BE_PERFORMED_WITHIN_VEHICLE_TIME_WINDOWS => 'CANNOT_BE_PERFORMED_WITHIN_VEHICLE_TIME_WINDOWS', + self::VEHICLE_NOT_ALLOWED => 'VEHICLE_NOT_ALLOWED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Code::class, \Google\Maps\RouteOptimization\V1\SkippedShipment_Reason_Code::class); + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/TimeWindow.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/TimeWindow.php new file mode 100644 index 000000000000..380dd0376f8d --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/TimeWindow.php @@ -0,0 +1,389 @@ +google.maps.routeoptimization.v1.TimeWindow + */ +class TimeWindow extends \Google\Protobuf\Internal\Message +{ + /** + * The hard time window start time. If unspecified it will be set to + * `ShipmentModel.global_start_time`. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + */ + protected $start_time = null; + /** + * The hard time window end time. If unspecified it will be set to + * `ShipmentModel.global_end_time`. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + */ + protected $end_time = null; + /** + * The soft start time of the time window. + * + * Generated from protobuf field .google.protobuf.Timestamp soft_start_time = 3; + */ + protected $soft_start_time = null; + /** + * The soft end time of the time window. + * + * Generated from protobuf field .google.protobuf.Timestamp soft_end_time = 4; + */ + protected $soft_end_time = null; + /** + * A cost per hour added to other costs in the model if the event occurs + * before soft_start_time, computed as: + * ``` + * max(0, soft_start_time - t.seconds) + * * cost_per_hour_before_soft_start_time / 3600, + * t being the time of the event. + * ``` + * This cost must be positive, and the field can only be set if + * soft_start_time has been set. + * + * Generated from protobuf field optional double cost_per_hour_before_soft_start_time = 5; + */ + protected $cost_per_hour_before_soft_start_time = null; + /** + * A cost per hour added to other costs in the model if the event occurs after + * `soft_end_time`, computed as: + * ``` + * max(0, t.seconds - soft_end_time.seconds) + * * cost_per_hour_after_soft_end_time / 3600, + * t being the time of the event. + * ``` + * This cost must be positive, and the field can only be set if + * `soft_end_time` has been set. + * + * Generated from protobuf field optional double cost_per_hour_after_soft_end_time = 6; + */ + protected $cost_per_hour_after_soft_end_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $start_time + * The hard time window start time. If unspecified it will be set to + * `ShipmentModel.global_start_time`. + * @type \Google\Protobuf\Timestamp $end_time + * The hard time window end time. If unspecified it will be set to + * `ShipmentModel.global_end_time`. + * @type \Google\Protobuf\Timestamp $soft_start_time + * The soft start time of the time window. + * @type \Google\Protobuf\Timestamp $soft_end_time + * The soft end time of the time window. + * @type float $cost_per_hour_before_soft_start_time + * A cost per hour added to other costs in the model if the event occurs + * before soft_start_time, computed as: + * ``` + * max(0, soft_start_time - t.seconds) + * * cost_per_hour_before_soft_start_time / 3600, + * t being the time of the event. + * ``` + * This cost must be positive, and the field can only be set if + * soft_start_time has been set. + * @type float $cost_per_hour_after_soft_end_time + * A cost per hour added to other costs in the model if the event occurs after + * `soft_end_time`, computed as: + * ``` + * max(0, t.seconds - soft_end_time.seconds) + * * cost_per_hour_after_soft_end_time / 3600, + * t being the time of the event. + * ``` + * This cost must be positive, and the field can only be set if + * `soft_end_time` has been set. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); + parent::__construct($data); + } + + /** + * The hard time window start time. If unspecified it will be set to + * `ShipmentModel.global_start_time`. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + * @return \Google\Protobuf\Timestamp|null + */ + public function getStartTime() + { + return $this->start_time; + } + + public function hasStartTime() + { + return isset($this->start_time); + } + + public function clearStartTime() + { + unset($this->start_time); + } + + /** + * The hard time window start time. If unspecified it will be set to + * `ShipmentModel.global_start_time`. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * The hard time window end time. If unspecified it will be set to + * `ShipmentModel.global_end_time`. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEndTime() + { + return $this->end_time; + } + + public function hasEndTime() + { + return isset($this->end_time); + } + + public function clearEndTime() + { + unset($this->end_time); + } + + /** + * The hard time window end time. If unspecified it will be set to + * `ShipmentModel.global_end_time`. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * The soft start time of the time window. + * + * Generated from protobuf field .google.protobuf.Timestamp soft_start_time = 3; + * @return \Google\Protobuf\Timestamp|null + */ + public function getSoftStartTime() + { + return $this->soft_start_time; + } + + public function hasSoftStartTime() + { + return isset($this->soft_start_time); + } + + public function clearSoftStartTime() + { + unset($this->soft_start_time); + } + + /** + * The soft start time of the time window. + * + * Generated from protobuf field .google.protobuf.Timestamp soft_start_time = 3; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setSoftStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->soft_start_time = $var; + + return $this; + } + + /** + * The soft end time of the time window. + * + * Generated from protobuf field .google.protobuf.Timestamp soft_end_time = 4; + * @return \Google\Protobuf\Timestamp|null + */ + public function getSoftEndTime() + { + return $this->soft_end_time; + } + + public function hasSoftEndTime() + { + return isset($this->soft_end_time); + } + + public function clearSoftEndTime() + { + unset($this->soft_end_time); + } + + /** + * The soft end time of the time window. + * + * Generated from protobuf field .google.protobuf.Timestamp soft_end_time = 4; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setSoftEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->soft_end_time = $var; + + return $this; + } + + /** + * A cost per hour added to other costs in the model if the event occurs + * before soft_start_time, computed as: + * ``` + * max(0, soft_start_time - t.seconds) + * * cost_per_hour_before_soft_start_time / 3600, + * t being the time of the event. + * ``` + * This cost must be positive, and the field can only be set if + * soft_start_time has been set. + * + * Generated from protobuf field optional double cost_per_hour_before_soft_start_time = 5; + * @return float + */ + public function getCostPerHourBeforeSoftStartTime() + { + return isset($this->cost_per_hour_before_soft_start_time) ? $this->cost_per_hour_before_soft_start_time : 0.0; + } + + public function hasCostPerHourBeforeSoftStartTime() + { + return isset($this->cost_per_hour_before_soft_start_time); + } + + public function clearCostPerHourBeforeSoftStartTime() + { + unset($this->cost_per_hour_before_soft_start_time); + } + + /** + * A cost per hour added to other costs in the model if the event occurs + * before soft_start_time, computed as: + * ``` + * max(0, soft_start_time - t.seconds) + * * cost_per_hour_before_soft_start_time / 3600, + * t being the time of the event. + * ``` + * This cost must be positive, and the field can only be set if + * soft_start_time has been set. + * + * Generated from protobuf field optional double cost_per_hour_before_soft_start_time = 5; + * @param float $var + * @return $this + */ + public function setCostPerHourBeforeSoftStartTime($var) + { + GPBUtil::checkDouble($var); + $this->cost_per_hour_before_soft_start_time = $var; + + return $this; + } + + /** + * A cost per hour added to other costs in the model if the event occurs after + * `soft_end_time`, computed as: + * ``` + * max(0, t.seconds - soft_end_time.seconds) + * * cost_per_hour_after_soft_end_time / 3600, + * t being the time of the event. + * ``` + * This cost must be positive, and the field can only be set if + * `soft_end_time` has been set. + * + * Generated from protobuf field optional double cost_per_hour_after_soft_end_time = 6; + * @return float + */ + public function getCostPerHourAfterSoftEndTime() + { + return isset($this->cost_per_hour_after_soft_end_time) ? $this->cost_per_hour_after_soft_end_time : 0.0; + } + + public function hasCostPerHourAfterSoftEndTime() + { + return isset($this->cost_per_hour_after_soft_end_time); + } + + public function clearCostPerHourAfterSoftEndTime() + { + unset($this->cost_per_hour_after_soft_end_time); + } + + /** + * A cost per hour added to other costs in the model if the event occurs after + * `soft_end_time`, computed as: + * ``` + * max(0, t.seconds - soft_end_time.seconds) + * * cost_per_hour_after_soft_end_time / 3600, + * t being the time of the event. + * ``` + * This cost must be positive, and the field can only be set if + * `soft_end_time` has been set. + * + * Generated from protobuf field optional double cost_per_hour_after_soft_end_time = 6; + * @param float $var + * @return $this + */ + public function setCostPerHourAfterSoftEndTime($var) + { + GPBUtil::checkDouble($var); + $this->cost_per_hour_after_soft_end_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/TransitionAttributes.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/TransitionAttributes.php new file mode 100644 index 000000000000..6201a4c661d7 --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/TransitionAttributes.php @@ -0,0 +1,412 @@ +google.maps.routeoptimization.v1.TransitionAttributes + */ +class TransitionAttributes extends \Google\Protobuf\Internal\Message +{ + /** + * Tags defining the set of (src->dst) transitions these attributes apply to. + * A source visit or vehicle start matches iff its + * [VisitRequest.tags][google.maps.routeoptimization.v1.Shipment.VisitRequest.tags] + * or + * [Vehicle.start_tags][google.maps.routeoptimization.v1.Vehicle.start_tags] + * either contains `src_tag` or does not contain `excluded_src_tag` (depending + * on which of these two fields is non-empty). + * + * Generated from protobuf field string src_tag = 1; + */ + protected $src_tag = ''; + /** + * See `src_tag`. Exactly one of `src_tag` and `excluded_src_tag` must be + * non-empty. + * + * Generated from protobuf field string excluded_src_tag = 2; + */ + protected $excluded_src_tag = ''; + /** + * A destination visit or vehicle end matches iff its + * [VisitRequest.tags][google.maps.routeoptimization.v1.Shipment.VisitRequest.tags] + * or [Vehicle.end_tags][google.maps.routeoptimization.v1.Vehicle.end_tags] + * either contains `dst_tag` or does not contain `excluded_dst_tag` (depending + * on which of these two fields is non-empty). + * + * Generated from protobuf field string dst_tag = 3; + */ + protected $dst_tag = ''; + /** + * See `dst_tag`. Exactly one of `dst_tag` and `excluded_dst_tag` must be + * non-empty. + * + * Generated from protobuf field string excluded_dst_tag = 4; + */ + protected $excluded_dst_tag = ''; + /** + * Specifies a cost for performing this transition. This is in the same unit + * as all other costs in the model and must not be negative. It is applied on + * top of all other existing costs. + * + * Generated from protobuf field double cost = 5; + */ + protected $cost = 0.0; + /** + * Specifies a cost per kilometer applied to the distance traveled while + * performing this transition. It adds up to any + * [Vehicle.cost_per_kilometer][google.maps.routeoptimization.v1.Vehicle.cost_per_kilometer] + * specified on vehicles. + * + * Generated from protobuf field double cost_per_kilometer = 6; + */ + protected $cost_per_kilometer = 0.0; + /** + * Specifies a limit on the distance traveled while performing this + * transition. + * As of 2021/06, only soft limits are supported. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.DistanceLimit distance_limit = 7; + */ + protected $distance_limit = null; + /** + * Specifies a delay incurred when performing this transition. + * This delay always occurs *after* finishing the source visit and *before* + * starting the destination visit. + * + * Generated from protobuf field .google.protobuf.Duration delay = 8; + */ + protected $delay = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $src_tag + * Tags defining the set of (src->dst) transitions these attributes apply to. + * A source visit or vehicle start matches iff its + * [VisitRequest.tags][google.maps.routeoptimization.v1.Shipment.VisitRequest.tags] + * or + * [Vehicle.start_tags][google.maps.routeoptimization.v1.Vehicle.start_tags] + * either contains `src_tag` or does not contain `excluded_src_tag` (depending + * on which of these two fields is non-empty). + * @type string $excluded_src_tag + * See `src_tag`. Exactly one of `src_tag` and `excluded_src_tag` must be + * non-empty. + * @type string $dst_tag + * A destination visit or vehicle end matches iff its + * [VisitRequest.tags][google.maps.routeoptimization.v1.Shipment.VisitRequest.tags] + * or [Vehicle.end_tags][google.maps.routeoptimization.v1.Vehicle.end_tags] + * either contains `dst_tag` or does not contain `excluded_dst_tag` (depending + * on which of these two fields is non-empty). + * @type string $excluded_dst_tag + * See `dst_tag`. Exactly one of `dst_tag` and `excluded_dst_tag` must be + * non-empty. + * @type float $cost + * Specifies a cost for performing this transition. This is in the same unit + * as all other costs in the model and must not be negative. It is applied on + * top of all other existing costs. + * @type float $cost_per_kilometer + * Specifies a cost per kilometer applied to the distance traveled while + * performing this transition. It adds up to any + * [Vehicle.cost_per_kilometer][google.maps.routeoptimization.v1.Vehicle.cost_per_kilometer] + * specified on vehicles. + * @type \Google\Maps\RouteOptimization\V1\DistanceLimit $distance_limit + * Specifies a limit on the distance traveled while performing this + * transition. + * As of 2021/06, only soft limits are supported. + * @type \Google\Protobuf\Duration $delay + * Specifies a delay incurred when performing this transition. + * This delay always occurs *after* finishing the source visit and *before* + * starting the destination visit. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); + parent::__construct($data); + } + + /** + * Tags defining the set of (src->dst) transitions these attributes apply to. + * A source visit or vehicle start matches iff its + * [VisitRequest.tags][google.maps.routeoptimization.v1.Shipment.VisitRequest.tags] + * or + * [Vehicle.start_tags][google.maps.routeoptimization.v1.Vehicle.start_tags] + * either contains `src_tag` or does not contain `excluded_src_tag` (depending + * on which of these two fields is non-empty). + * + * Generated from protobuf field string src_tag = 1; + * @return string + */ + public function getSrcTag() + { + return $this->src_tag; + } + + /** + * Tags defining the set of (src->dst) transitions these attributes apply to. + * A source visit or vehicle start matches iff its + * [VisitRequest.tags][google.maps.routeoptimization.v1.Shipment.VisitRequest.tags] + * or + * [Vehicle.start_tags][google.maps.routeoptimization.v1.Vehicle.start_tags] + * either contains `src_tag` or does not contain `excluded_src_tag` (depending + * on which of these two fields is non-empty). + * + * Generated from protobuf field string src_tag = 1; + * @param string $var + * @return $this + */ + public function setSrcTag($var) + { + GPBUtil::checkString($var, True); + $this->src_tag = $var; + + return $this; + } + + /** + * See `src_tag`. Exactly one of `src_tag` and `excluded_src_tag` must be + * non-empty. + * + * Generated from protobuf field string excluded_src_tag = 2; + * @return string + */ + public function getExcludedSrcTag() + { + return $this->excluded_src_tag; + } + + /** + * See `src_tag`. Exactly one of `src_tag` and `excluded_src_tag` must be + * non-empty. + * + * Generated from protobuf field string excluded_src_tag = 2; + * @param string $var + * @return $this + */ + public function setExcludedSrcTag($var) + { + GPBUtil::checkString($var, True); + $this->excluded_src_tag = $var; + + return $this; + } + + /** + * A destination visit or vehicle end matches iff its + * [VisitRequest.tags][google.maps.routeoptimization.v1.Shipment.VisitRequest.tags] + * or [Vehicle.end_tags][google.maps.routeoptimization.v1.Vehicle.end_tags] + * either contains `dst_tag` or does not contain `excluded_dst_tag` (depending + * on which of these two fields is non-empty). + * + * Generated from protobuf field string dst_tag = 3; + * @return string + */ + public function getDstTag() + { + return $this->dst_tag; + } + + /** + * A destination visit or vehicle end matches iff its + * [VisitRequest.tags][google.maps.routeoptimization.v1.Shipment.VisitRequest.tags] + * or [Vehicle.end_tags][google.maps.routeoptimization.v1.Vehicle.end_tags] + * either contains `dst_tag` or does not contain `excluded_dst_tag` (depending + * on which of these two fields is non-empty). + * + * Generated from protobuf field string dst_tag = 3; + * @param string $var + * @return $this + */ + public function setDstTag($var) + { + GPBUtil::checkString($var, True); + $this->dst_tag = $var; + + return $this; + } + + /** + * See `dst_tag`. Exactly one of `dst_tag` and `excluded_dst_tag` must be + * non-empty. + * + * Generated from protobuf field string excluded_dst_tag = 4; + * @return string + */ + public function getExcludedDstTag() + { + return $this->excluded_dst_tag; + } + + /** + * See `dst_tag`. Exactly one of `dst_tag` and `excluded_dst_tag` must be + * non-empty. + * + * Generated from protobuf field string excluded_dst_tag = 4; + * @param string $var + * @return $this + */ + public function setExcludedDstTag($var) + { + GPBUtil::checkString($var, True); + $this->excluded_dst_tag = $var; + + return $this; + } + + /** + * Specifies a cost for performing this transition. This is in the same unit + * as all other costs in the model and must not be negative. It is applied on + * top of all other existing costs. + * + * Generated from protobuf field double cost = 5; + * @return float + */ + public function getCost() + { + return $this->cost; + } + + /** + * Specifies a cost for performing this transition. This is in the same unit + * as all other costs in the model and must not be negative. It is applied on + * top of all other existing costs. + * + * Generated from protobuf field double cost = 5; + * @param float $var + * @return $this + */ + public function setCost($var) + { + GPBUtil::checkDouble($var); + $this->cost = $var; + + return $this; + } + + /** + * Specifies a cost per kilometer applied to the distance traveled while + * performing this transition. It adds up to any + * [Vehicle.cost_per_kilometer][google.maps.routeoptimization.v1.Vehicle.cost_per_kilometer] + * specified on vehicles. + * + * Generated from protobuf field double cost_per_kilometer = 6; + * @return float + */ + public function getCostPerKilometer() + { + return $this->cost_per_kilometer; + } + + /** + * Specifies a cost per kilometer applied to the distance traveled while + * performing this transition. It adds up to any + * [Vehicle.cost_per_kilometer][google.maps.routeoptimization.v1.Vehicle.cost_per_kilometer] + * specified on vehicles. + * + * Generated from protobuf field double cost_per_kilometer = 6; + * @param float $var + * @return $this + */ + public function setCostPerKilometer($var) + { + GPBUtil::checkDouble($var); + $this->cost_per_kilometer = $var; + + return $this; + } + + /** + * Specifies a limit on the distance traveled while performing this + * transition. + * As of 2021/06, only soft limits are supported. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.DistanceLimit distance_limit = 7; + * @return \Google\Maps\RouteOptimization\V1\DistanceLimit|null + */ + public function getDistanceLimit() + { + return $this->distance_limit; + } + + public function hasDistanceLimit() + { + return isset($this->distance_limit); + } + + public function clearDistanceLimit() + { + unset($this->distance_limit); + } + + /** + * Specifies a limit on the distance traveled while performing this + * transition. + * As of 2021/06, only soft limits are supported. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.DistanceLimit distance_limit = 7; + * @param \Google\Maps\RouteOptimization\V1\DistanceLimit $var + * @return $this + */ + public function setDistanceLimit($var) + { + GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\DistanceLimit::class); + $this->distance_limit = $var; + + return $this; + } + + /** + * Specifies a delay incurred when performing this transition. + * This delay always occurs *after* finishing the source visit and *before* + * starting the destination visit. + * + * Generated from protobuf field .google.protobuf.Duration delay = 8; + * @return \Google\Protobuf\Duration|null + */ + public function getDelay() + { + return $this->delay; + } + + public function hasDelay() + { + return isset($this->delay); + } + + public function clearDelay() + { + unset($this->delay); + } + + /** + * Specifies a delay incurred when performing this transition. + * This delay always occurs *after* finishing the source visit and *before* + * starting the destination visit. + * + * Generated from protobuf field .google.protobuf.Duration delay = 8; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setDelay($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->delay = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Vehicle.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Vehicle.php new file mode 100644 index 000000000000..c77ff7c216ae --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Vehicle.php @@ -0,0 +1,1423 @@ +google.maps.routeoptimization.v1.Vehicle + */ +class Vehicle extends \Google\Protobuf\Internal\Message +{ + /** + * The user-defined display name of the vehicle. + * It can be up to 63 characters long and may use UTF-8 characters. + * + * Generated from protobuf field string display_name = 32; + */ + protected $display_name = ''; + /** + * The travel mode which affects the roads usable by the vehicle and its + * speed. See also `travel_duration_multiple`. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.Vehicle.TravelMode travel_mode = 1; + */ + protected $travel_mode = 0; + /** + * A set of conditions to satisfy that affect the way routes are calculated + * for the given vehicle. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.RouteModifiers route_modifiers = 2; + */ + protected $route_modifiers = null; + /** + * Geographic location where the vehicle starts before picking up any + * shipments. If not specified, the vehicle starts at its first pickup. + * If the shipment model has duration and distance matrices, `start_location` + * must not be specified. + * + * Generated from protobuf field .google.type.LatLng start_location = 3; + */ + protected $start_location = null; + /** + * Waypoint representing a geographic location where the vehicle starts before + * picking up any shipments. If neither `start_waypoint` nor `start_location` + * is specified, the vehicle starts at its first pickup. + * If the shipment model has duration and distance matrices, `start_waypoint` + * must not be specified. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.Waypoint start_waypoint = 4; + */ + protected $start_waypoint = null; + /** + * Geographic location where the vehicle ends after it has completed its last + * `VisitRequest`. If not specified the vehicle's `ShipmentRoute` ends + * immediately when it completes its last `VisitRequest`. + * If the shipment model has duration and distance matrices, `end_location` + * must not be specified. + * + * Generated from protobuf field .google.type.LatLng end_location = 5; + */ + protected $end_location = null; + /** + * Waypoint representing a geographic location where the vehicle ends after + * it has completed its last `VisitRequest`. If neither `end_waypoint` nor + * `end_location` is specified, the vehicle's `ShipmentRoute` ends immediately + * when it completes its last `VisitRequest`. + * If the shipment model has duration and distance matrices, `end_waypoint` + * must not be specified. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.Waypoint end_waypoint = 6; + */ + protected $end_waypoint = null; + /** + * Specifies tags attached to the start of the vehicle's route. + * Empty or duplicate strings are not allowed. + * + * Generated from protobuf field repeated string start_tags = 7; + */ + private $start_tags; + /** + * Specifies tags attached to the end of the vehicle's route. + * Empty or duplicate strings are not allowed. + * + * Generated from protobuf field repeated string end_tags = 8; + */ + private $end_tags; + /** + * Time windows during which the vehicle may depart its start location. + * They must be within the global time limits (see + * [ShipmentModel.global_*][google.maps.routeoptimization.v1.ShipmentModel.global_start_time] + * fields). If unspecified, there is no limitation besides those global time + * limits. + * Time windows belonging to the same repeated field must be disjoint, i.e. no + * time window can overlap with or be adjacent to another, and they must be in + * chronological order. + * `cost_per_hour_after_soft_end_time` and `soft_end_time` can only be set if + * there is a single time window. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.TimeWindow start_time_windows = 9; + */ + private $start_time_windows; + /** + * Time windows during which the vehicle may arrive at its end location. + * They must be within the global time limits (see + * [ShipmentModel.global_*][google.maps.routeoptimization.v1.ShipmentModel.global_start_time] + * fields). If unspecified, there is no limitation besides those global time + * limits. + * Time windows belonging to the same repeated field must be disjoint, i.e. no + * time window can overlap with or be adjacent to another, and they must be in + * chronological order. + * `cost_per_hour_after_soft_end_time` and `soft_end_time` can only be set if + * there is a single time window. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.TimeWindow end_time_windows = 10; + */ + private $end_time_windows; + /** + * Specifies a multiplicative factor that can be used to increase or decrease + * travel times of this vehicle. For example, setting this to 2.0 means + * that this vehicle is slower and has travel times that are twice what they + * are for standard vehicles. This multiple does not affect visit durations. + * It does affect cost if `cost_per_hour` or `cost_per_traveled_hour` are + * specified. This must be in the range [0.001, 1000.0]. If unset, the vehicle + * is standard, and this multiple is considered 1.0. + * WARNING: Travel times will be rounded to the nearest second after this + * multiple is applied but before performing any numerical operations, thus, + * a small multiple may result in a loss of precision. + * See also `extra_visit_duration_for_visit_type` below. + * + * Generated from protobuf field optional double travel_duration_multiple = 11; + */ + protected $travel_duration_multiple = null; + /** + * Unloading policy enforced on the vehicle. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.Vehicle.UnloadingPolicy unloading_policy = 12; + */ + protected $unloading_policy = 0; + /** + * Capacities of the vehicle (weight, volume, # of pallets for example). + * The keys in the map are the identifiers of the type of load, consistent + * with the keys of the + * [Shipment.load_demands][google.maps.routeoptimization.v1.Shipment.load_demands] + * field. If a given key is absent from this map, the corresponding capacity + * is considered to be limitless. + * + * Generated from protobuf field map load_limits = 30; + */ + private $load_limits; + /** + * Vehicle costs: all costs add up and must be in the same unit as + * [Shipment.penalty_cost][google.maps.routeoptimization.v1.Shipment.penalty_cost]. + * Cost per hour of the vehicle route. This cost is applied to the total time + * taken by the route, and includes travel time, waiting time, and visit time. + * Using `cost_per_hour` instead of just `cost_per_traveled_hour` may result + * in additional latency. + * + * Generated from protobuf field double cost_per_hour = 16; + */ + protected $cost_per_hour = 0.0; + /** + * Cost per traveled hour of the vehicle route. This cost is applied only to + * travel time taken by the route (i.e., that reported in + * [ShipmentRoute.transitions][google.maps.routeoptimization.v1.ShipmentRoute.transitions]), + * and excludes waiting time and visit time. + * + * Generated from protobuf field double cost_per_traveled_hour = 17; + */ + protected $cost_per_traveled_hour = 0.0; + /** + * Cost per kilometer of the vehicle route. This cost is applied to the + * distance reported in the + * [ShipmentRoute.transitions][google.maps.routeoptimization.v1.ShipmentRoute.transitions] + * and does not apply to any distance implicitly traveled from the + * `arrival_location` to the `departure_location` of a single `VisitRequest`. + * + * Generated from protobuf field double cost_per_kilometer = 18; + */ + protected $cost_per_kilometer = 0.0; + /** + * Fixed cost applied if this vehicle is used to handle a shipment. + * + * Generated from protobuf field double fixed_cost = 19; + */ + protected $fixed_cost = 0.0; + /** + * This field only applies to vehicles when their route does not serve any + * shipments. It indicates if the vehicle should be considered as used or not + * in this case. + * If true, the vehicle goes from its start to its end location even if it + * doesn't serve any shipments, and time and distance costs resulting from its + * start --> end travel are taken into account. + * Otherwise, it doesn't travel from its start to its end location, and no + * `break_rule` or delay (from `TransitionAttributes`) are scheduled for this + * vehicle. In this case, the vehicle's `ShipmentRoute` doesn't contain any + * information except for the vehicle index and label. + * + * Generated from protobuf field bool used_if_route_is_empty = 20; + */ + protected $used_if_route_is_empty = false; + /** + * Limit applied to the total duration of the vehicle's route. In a given + * `OptimizeToursResponse`, the route duration of a vehicle is the + * difference between its `vehicle_end_time` and `vehicle_start_time`. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.Vehicle.DurationLimit route_duration_limit = 21; + */ + protected $route_duration_limit = null; + /** + * Limit applied to the travel duration of the vehicle's route. In a given + * `OptimizeToursResponse`, the route travel duration is the sum of all its + * [transitions.travel_duration][google.maps.routeoptimization.v1.ShipmentRoute.Transition.travel_duration]. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.Vehicle.DurationLimit travel_duration_limit = 22; + */ + protected $travel_duration_limit = null; + /** + * Limit applied to the total distance of the vehicle's route. In a given + * `OptimizeToursResponse`, the route distance is the sum of all its + * [transitions.travel_distance_meters][google.maps.routeoptimization.v1.ShipmentRoute.Transition.travel_distance_meters]. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.DistanceLimit route_distance_limit = 23; + */ + protected $route_distance_limit = null; + /** + * Specifies a map from visit_types strings to durations. The duration is time + * in addition to + * [VisitRequest.duration][google.maps.routeoptimization.v1.Shipment.VisitRequest.duration] + * to be taken at visits with the specified `visit_types`. This extra visit + * duration adds cost if `cost_per_hour` is specified. Keys (i.e. + * `visit_types`) cannot be empty strings. + * If a visit request has multiple types, a duration will be added for each + * type in the map. + * + * Generated from protobuf field map extra_visit_duration_for_visit_type = 24; + */ + private $extra_visit_duration_for_visit_type; + /** + * Describes the break schedule to be enforced on this vehicle. + * If empty, no breaks will be scheduled for this vehicle. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.BreakRule break_rule = 25; + */ + protected $break_rule = null; + /** + * Specifies a label for this vehicle. This label is reported in the response + * as the `vehicle_label` of the corresponding + * [ShipmentRoute][google.maps.routeoptimization.v1.ShipmentRoute]. + * + * Generated from protobuf field string label = 27; + */ + protected $label = ''; + /** + * If true, `used_if_route_is_empty` must be false, and this vehicle will + * remain unused. + * If a shipment is performed by an ignored vehicle in + * `injected_first_solution_routes`, it is skipped in the first solution but + * is free to be performed in the response. + * If a shipment is performed by an ignored vehicle in + * `injected_solution_constraint` and any related pickup/delivery is + * constrained to remain on the vehicle (i.e., not relaxed to level + * `RELAX_ALL_AFTER_THRESHOLD`), it is skipped in the response. + * If a shipment has a non-empty `allowed_vehicle_indices` field and all of + * the allowed vehicles are ignored, it is skipped in the response. + * + * Generated from protobuf field bool ignore = 28; + */ + protected $ignore = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $display_name + * The user-defined display name of the vehicle. + * It can be up to 63 characters long and may use UTF-8 characters. + * @type int $travel_mode + * The travel mode which affects the roads usable by the vehicle and its + * speed. See also `travel_duration_multiple`. + * @type \Google\Maps\RouteOptimization\V1\RouteModifiers $route_modifiers + * A set of conditions to satisfy that affect the way routes are calculated + * for the given vehicle. + * @type \Google\Type\LatLng $start_location + * Geographic location where the vehicle starts before picking up any + * shipments. If not specified, the vehicle starts at its first pickup. + * If the shipment model has duration and distance matrices, `start_location` + * must not be specified. + * @type \Google\Maps\RouteOptimization\V1\Waypoint $start_waypoint + * Waypoint representing a geographic location where the vehicle starts before + * picking up any shipments. If neither `start_waypoint` nor `start_location` + * is specified, the vehicle starts at its first pickup. + * If the shipment model has duration and distance matrices, `start_waypoint` + * must not be specified. + * @type \Google\Type\LatLng $end_location + * Geographic location where the vehicle ends after it has completed its last + * `VisitRequest`. If not specified the vehicle's `ShipmentRoute` ends + * immediately when it completes its last `VisitRequest`. + * If the shipment model has duration and distance matrices, `end_location` + * must not be specified. + * @type \Google\Maps\RouteOptimization\V1\Waypoint $end_waypoint + * Waypoint representing a geographic location where the vehicle ends after + * it has completed its last `VisitRequest`. If neither `end_waypoint` nor + * `end_location` is specified, the vehicle's `ShipmentRoute` ends immediately + * when it completes its last `VisitRequest`. + * If the shipment model has duration and distance matrices, `end_waypoint` + * must not be specified. + * @type array|\Google\Protobuf\Internal\RepeatedField $start_tags + * Specifies tags attached to the start of the vehicle's route. + * Empty or duplicate strings are not allowed. + * @type array|\Google\Protobuf\Internal\RepeatedField $end_tags + * Specifies tags attached to the end of the vehicle's route. + * Empty or duplicate strings are not allowed. + * @type array<\Google\Maps\RouteOptimization\V1\TimeWindow>|\Google\Protobuf\Internal\RepeatedField $start_time_windows + * Time windows during which the vehicle may depart its start location. + * They must be within the global time limits (see + * [ShipmentModel.global_*][google.maps.routeoptimization.v1.ShipmentModel.global_start_time] + * fields). If unspecified, there is no limitation besides those global time + * limits. + * Time windows belonging to the same repeated field must be disjoint, i.e. no + * time window can overlap with or be adjacent to another, and they must be in + * chronological order. + * `cost_per_hour_after_soft_end_time` and `soft_end_time` can only be set if + * there is a single time window. + * @type array<\Google\Maps\RouteOptimization\V1\TimeWindow>|\Google\Protobuf\Internal\RepeatedField $end_time_windows + * Time windows during which the vehicle may arrive at its end location. + * They must be within the global time limits (see + * [ShipmentModel.global_*][google.maps.routeoptimization.v1.ShipmentModel.global_start_time] + * fields). If unspecified, there is no limitation besides those global time + * limits. + * Time windows belonging to the same repeated field must be disjoint, i.e. no + * time window can overlap with or be adjacent to another, and they must be in + * chronological order. + * `cost_per_hour_after_soft_end_time` and `soft_end_time` can only be set if + * there is a single time window. + * @type float $travel_duration_multiple + * Specifies a multiplicative factor that can be used to increase or decrease + * travel times of this vehicle. For example, setting this to 2.0 means + * that this vehicle is slower and has travel times that are twice what they + * are for standard vehicles. This multiple does not affect visit durations. + * It does affect cost if `cost_per_hour` or `cost_per_traveled_hour` are + * specified. This must be in the range [0.001, 1000.0]. If unset, the vehicle + * is standard, and this multiple is considered 1.0. + * WARNING: Travel times will be rounded to the nearest second after this + * multiple is applied but before performing any numerical operations, thus, + * a small multiple may result in a loss of precision. + * See also `extra_visit_duration_for_visit_type` below. + * @type int $unloading_policy + * Unloading policy enforced on the vehicle. + * @type array|\Google\Protobuf\Internal\MapField $load_limits + * Capacities of the vehicle (weight, volume, # of pallets for example). + * The keys in the map are the identifiers of the type of load, consistent + * with the keys of the + * [Shipment.load_demands][google.maps.routeoptimization.v1.Shipment.load_demands] + * field. If a given key is absent from this map, the corresponding capacity + * is considered to be limitless. + * @type float $cost_per_hour + * Vehicle costs: all costs add up and must be in the same unit as + * [Shipment.penalty_cost][google.maps.routeoptimization.v1.Shipment.penalty_cost]. + * Cost per hour of the vehicle route. This cost is applied to the total time + * taken by the route, and includes travel time, waiting time, and visit time. + * Using `cost_per_hour` instead of just `cost_per_traveled_hour` may result + * in additional latency. + * @type float $cost_per_traveled_hour + * Cost per traveled hour of the vehicle route. This cost is applied only to + * travel time taken by the route (i.e., that reported in + * [ShipmentRoute.transitions][google.maps.routeoptimization.v1.ShipmentRoute.transitions]), + * and excludes waiting time and visit time. + * @type float $cost_per_kilometer + * Cost per kilometer of the vehicle route. This cost is applied to the + * distance reported in the + * [ShipmentRoute.transitions][google.maps.routeoptimization.v1.ShipmentRoute.transitions] + * and does not apply to any distance implicitly traveled from the + * `arrival_location` to the `departure_location` of a single `VisitRequest`. + * @type float $fixed_cost + * Fixed cost applied if this vehicle is used to handle a shipment. + * @type bool $used_if_route_is_empty + * This field only applies to vehicles when their route does not serve any + * shipments. It indicates if the vehicle should be considered as used or not + * in this case. + * If true, the vehicle goes from its start to its end location even if it + * doesn't serve any shipments, and time and distance costs resulting from its + * start --> end travel are taken into account. + * Otherwise, it doesn't travel from its start to its end location, and no + * `break_rule` or delay (from `TransitionAttributes`) are scheduled for this + * vehicle. In this case, the vehicle's `ShipmentRoute` doesn't contain any + * information except for the vehicle index and label. + * @type \Google\Maps\RouteOptimization\V1\Vehicle\DurationLimit $route_duration_limit + * Limit applied to the total duration of the vehicle's route. In a given + * `OptimizeToursResponse`, the route duration of a vehicle is the + * difference between its `vehicle_end_time` and `vehicle_start_time`. + * @type \Google\Maps\RouteOptimization\V1\Vehicle\DurationLimit $travel_duration_limit + * Limit applied to the travel duration of the vehicle's route. In a given + * `OptimizeToursResponse`, the route travel duration is the sum of all its + * [transitions.travel_duration][google.maps.routeoptimization.v1.ShipmentRoute.Transition.travel_duration]. + * @type \Google\Maps\RouteOptimization\V1\DistanceLimit $route_distance_limit + * Limit applied to the total distance of the vehicle's route. In a given + * `OptimizeToursResponse`, the route distance is the sum of all its + * [transitions.travel_distance_meters][google.maps.routeoptimization.v1.ShipmentRoute.Transition.travel_distance_meters]. + * @type array|\Google\Protobuf\Internal\MapField $extra_visit_duration_for_visit_type + * Specifies a map from visit_types strings to durations. The duration is time + * in addition to + * [VisitRequest.duration][google.maps.routeoptimization.v1.Shipment.VisitRequest.duration] + * to be taken at visits with the specified `visit_types`. This extra visit + * duration adds cost if `cost_per_hour` is specified. Keys (i.e. + * `visit_types`) cannot be empty strings. + * If a visit request has multiple types, a duration will be added for each + * type in the map. + * @type \Google\Maps\RouteOptimization\V1\BreakRule $break_rule + * Describes the break schedule to be enforced on this vehicle. + * If empty, no breaks will be scheduled for this vehicle. + * @type string $label + * Specifies a label for this vehicle. This label is reported in the response + * as the `vehicle_label` of the corresponding + * [ShipmentRoute][google.maps.routeoptimization.v1.ShipmentRoute]. + * @type bool $ignore + * If true, `used_if_route_is_empty` must be false, and this vehicle will + * remain unused. + * If a shipment is performed by an ignored vehicle in + * `injected_first_solution_routes`, it is skipped in the first solution but + * is free to be performed in the response. + * If a shipment is performed by an ignored vehicle in + * `injected_solution_constraint` and any related pickup/delivery is + * constrained to remain on the vehicle (i.e., not relaxed to level + * `RELAX_ALL_AFTER_THRESHOLD`), it is skipped in the response. + * If a shipment has a non-empty `allowed_vehicle_indices` field and all of + * the allowed vehicles are ignored, it is skipped in the response. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); + parent::__construct($data); + } + + /** + * The user-defined display name of the vehicle. + * It can be up to 63 characters long and may use UTF-8 characters. + * + * Generated from protobuf field string display_name = 32; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * The user-defined display name of the vehicle. + * It can be up to 63 characters long and may use UTF-8 characters. + * + * Generated from protobuf field string display_name = 32; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * The travel mode which affects the roads usable by the vehicle and its + * speed. See also `travel_duration_multiple`. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.Vehicle.TravelMode travel_mode = 1; + * @return int + */ + public function getTravelMode() + { + return $this->travel_mode; + } + + /** + * The travel mode which affects the roads usable by the vehicle and its + * speed. See also `travel_duration_multiple`. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.Vehicle.TravelMode travel_mode = 1; + * @param int $var + * @return $this + */ + public function setTravelMode($var) + { + GPBUtil::checkEnum($var, \Google\Maps\RouteOptimization\V1\Vehicle\TravelMode::class); + $this->travel_mode = $var; + + return $this; + } + + /** + * A set of conditions to satisfy that affect the way routes are calculated + * for the given vehicle. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.RouteModifiers route_modifiers = 2; + * @return \Google\Maps\RouteOptimization\V1\RouteModifiers|null + */ + public function getRouteModifiers() + { + return $this->route_modifiers; + } + + public function hasRouteModifiers() + { + return isset($this->route_modifiers); + } + + public function clearRouteModifiers() + { + unset($this->route_modifiers); + } + + /** + * A set of conditions to satisfy that affect the way routes are calculated + * for the given vehicle. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.RouteModifiers route_modifiers = 2; + * @param \Google\Maps\RouteOptimization\V1\RouteModifiers $var + * @return $this + */ + public function setRouteModifiers($var) + { + GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\RouteModifiers::class); + $this->route_modifiers = $var; + + return $this; + } + + /** + * Geographic location where the vehicle starts before picking up any + * shipments. If not specified, the vehicle starts at its first pickup. + * If the shipment model has duration and distance matrices, `start_location` + * must not be specified. + * + * Generated from protobuf field .google.type.LatLng start_location = 3; + * @return \Google\Type\LatLng|null + */ + public function getStartLocation() + { + return $this->start_location; + } + + public function hasStartLocation() + { + return isset($this->start_location); + } + + public function clearStartLocation() + { + unset($this->start_location); + } + + /** + * Geographic location where the vehicle starts before picking up any + * shipments. If not specified, the vehicle starts at its first pickup. + * If the shipment model has duration and distance matrices, `start_location` + * must not be specified. + * + * Generated from protobuf field .google.type.LatLng start_location = 3; + * @param \Google\Type\LatLng $var + * @return $this + */ + public function setStartLocation($var) + { + GPBUtil::checkMessage($var, \Google\Type\LatLng::class); + $this->start_location = $var; + + return $this; + } + + /** + * Waypoint representing a geographic location where the vehicle starts before + * picking up any shipments. If neither `start_waypoint` nor `start_location` + * is specified, the vehicle starts at its first pickup. + * If the shipment model has duration and distance matrices, `start_waypoint` + * must not be specified. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.Waypoint start_waypoint = 4; + * @return \Google\Maps\RouteOptimization\V1\Waypoint|null + */ + public function getStartWaypoint() + { + return $this->start_waypoint; + } + + public function hasStartWaypoint() + { + return isset($this->start_waypoint); + } + + public function clearStartWaypoint() + { + unset($this->start_waypoint); + } + + /** + * Waypoint representing a geographic location where the vehicle starts before + * picking up any shipments. If neither `start_waypoint` nor `start_location` + * is specified, the vehicle starts at its first pickup. + * If the shipment model has duration and distance matrices, `start_waypoint` + * must not be specified. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.Waypoint start_waypoint = 4; + * @param \Google\Maps\RouteOptimization\V1\Waypoint $var + * @return $this + */ + public function setStartWaypoint($var) + { + GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\Waypoint::class); + $this->start_waypoint = $var; + + return $this; + } + + /** + * Geographic location where the vehicle ends after it has completed its last + * `VisitRequest`. If not specified the vehicle's `ShipmentRoute` ends + * immediately when it completes its last `VisitRequest`. + * If the shipment model has duration and distance matrices, `end_location` + * must not be specified. + * + * Generated from protobuf field .google.type.LatLng end_location = 5; + * @return \Google\Type\LatLng|null + */ + public function getEndLocation() + { + return $this->end_location; + } + + public function hasEndLocation() + { + return isset($this->end_location); + } + + public function clearEndLocation() + { + unset($this->end_location); + } + + /** + * Geographic location where the vehicle ends after it has completed its last + * `VisitRequest`. If not specified the vehicle's `ShipmentRoute` ends + * immediately when it completes its last `VisitRequest`. + * If the shipment model has duration and distance matrices, `end_location` + * must not be specified. + * + * Generated from protobuf field .google.type.LatLng end_location = 5; + * @param \Google\Type\LatLng $var + * @return $this + */ + public function setEndLocation($var) + { + GPBUtil::checkMessage($var, \Google\Type\LatLng::class); + $this->end_location = $var; + + return $this; + } + + /** + * Waypoint representing a geographic location where the vehicle ends after + * it has completed its last `VisitRequest`. If neither `end_waypoint` nor + * `end_location` is specified, the vehicle's `ShipmentRoute` ends immediately + * when it completes its last `VisitRequest`. + * If the shipment model has duration and distance matrices, `end_waypoint` + * must not be specified. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.Waypoint end_waypoint = 6; + * @return \Google\Maps\RouteOptimization\V1\Waypoint|null + */ + public function getEndWaypoint() + { + return $this->end_waypoint; + } + + public function hasEndWaypoint() + { + return isset($this->end_waypoint); + } + + public function clearEndWaypoint() + { + unset($this->end_waypoint); + } + + /** + * Waypoint representing a geographic location where the vehicle ends after + * it has completed its last `VisitRequest`. If neither `end_waypoint` nor + * `end_location` is specified, the vehicle's `ShipmentRoute` ends immediately + * when it completes its last `VisitRequest`. + * If the shipment model has duration and distance matrices, `end_waypoint` + * must not be specified. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.Waypoint end_waypoint = 6; + * @param \Google\Maps\RouteOptimization\V1\Waypoint $var + * @return $this + */ + public function setEndWaypoint($var) + { + GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\Waypoint::class); + $this->end_waypoint = $var; + + return $this; + } + + /** + * Specifies tags attached to the start of the vehicle's route. + * Empty or duplicate strings are not allowed. + * + * Generated from protobuf field repeated string start_tags = 7; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getStartTags() + { + return $this->start_tags; + } + + /** + * Specifies tags attached to the start of the vehicle's route. + * Empty or duplicate strings are not allowed. + * + * Generated from protobuf field repeated string start_tags = 7; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setStartTags($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->start_tags = $arr; + + return $this; + } + + /** + * Specifies tags attached to the end of the vehicle's route. + * Empty or duplicate strings are not allowed. + * + * Generated from protobuf field repeated string end_tags = 8; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEndTags() + { + return $this->end_tags; + } + + /** + * Specifies tags attached to the end of the vehicle's route. + * Empty or duplicate strings are not allowed. + * + * Generated from protobuf field repeated string end_tags = 8; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEndTags($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->end_tags = $arr; + + return $this; + } + + /** + * Time windows during which the vehicle may depart its start location. + * They must be within the global time limits (see + * [ShipmentModel.global_*][google.maps.routeoptimization.v1.ShipmentModel.global_start_time] + * fields). If unspecified, there is no limitation besides those global time + * limits. + * Time windows belonging to the same repeated field must be disjoint, i.e. no + * time window can overlap with or be adjacent to another, and they must be in + * chronological order. + * `cost_per_hour_after_soft_end_time` and `soft_end_time` can only be set if + * there is a single time window. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.TimeWindow start_time_windows = 9; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getStartTimeWindows() + { + return $this->start_time_windows; + } + + /** + * Time windows during which the vehicle may depart its start location. + * They must be within the global time limits (see + * [ShipmentModel.global_*][google.maps.routeoptimization.v1.ShipmentModel.global_start_time] + * fields). If unspecified, there is no limitation besides those global time + * limits. + * Time windows belonging to the same repeated field must be disjoint, i.e. no + * time window can overlap with or be adjacent to another, and they must be in + * chronological order. + * `cost_per_hour_after_soft_end_time` and `soft_end_time` can only be set if + * there is a single time window. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.TimeWindow start_time_windows = 9; + * @param array<\Google\Maps\RouteOptimization\V1\TimeWindow>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setStartTimeWindows($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\TimeWindow::class); + $this->start_time_windows = $arr; + + return $this; + } + + /** + * Time windows during which the vehicle may arrive at its end location. + * They must be within the global time limits (see + * [ShipmentModel.global_*][google.maps.routeoptimization.v1.ShipmentModel.global_start_time] + * fields). If unspecified, there is no limitation besides those global time + * limits. + * Time windows belonging to the same repeated field must be disjoint, i.e. no + * time window can overlap with or be adjacent to another, and they must be in + * chronological order. + * `cost_per_hour_after_soft_end_time` and `soft_end_time` can only be set if + * there is a single time window. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.TimeWindow end_time_windows = 10; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEndTimeWindows() + { + return $this->end_time_windows; + } + + /** + * Time windows during which the vehicle may arrive at its end location. + * They must be within the global time limits (see + * [ShipmentModel.global_*][google.maps.routeoptimization.v1.ShipmentModel.global_start_time] + * fields). If unspecified, there is no limitation besides those global time + * limits. + * Time windows belonging to the same repeated field must be disjoint, i.e. no + * time window can overlap with or be adjacent to another, and they must be in + * chronological order. + * `cost_per_hour_after_soft_end_time` and `soft_end_time` can only be set if + * there is a single time window. + * + * Generated from protobuf field repeated .google.maps.routeoptimization.v1.TimeWindow end_time_windows = 10; + * @param array<\Google\Maps\RouteOptimization\V1\TimeWindow>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEndTimeWindows($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\TimeWindow::class); + $this->end_time_windows = $arr; + + return $this; + } + + /** + * Specifies a multiplicative factor that can be used to increase or decrease + * travel times of this vehicle. For example, setting this to 2.0 means + * that this vehicle is slower and has travel times that are twice what they + * are for standard vehicles. This multiple does not affect visit durations. + * It does affect cost if `cost_per_hour` or `cost_per_traveled_hour` are + * specified. This must be in the range [0.001, 1000.0]. If unset, the vehicle + * is standard, and this multiple is considered 1.0. + * WARNING: Travel times will be rounded to the nearest second after this + * multiple is applied but before performing any numerical operations, thus, + * a small multiple may result in a loss of precision. + * See also `extra_visit_duration_for_visit_type` below. + * + * Generated from protobuf field optional double travel_duration_multiple = 11; + * @return float + */ + public function getTravelDurationMultiple() + { + return isset($this->travel_duration_multiple) ? $this->travel_duration_multiple : 0.0; + } + + public function hasTravelDurationMultiple() + { + return isset($this->travel_duration_multiple); + } + + public function clearTravelDurationMultiple() + { + unset($this->travel_duration_multiple); + } + + /** + * Specifies a multiplicative factor that can be used to increase or decrease + * travel times of this vehicle. For example, setting this to 2.0 means + * that this vehicle is slower and has travel times that are twice what they + * are for standard vehicles. This multiple does not affect visit durations. + * It does affect cost if `cost_per_hour` or `cost_per_traveled_hour` are + * specified. This must be in the range [0.001, 1000.0]. If unset, the vehicle + * is standard, and this multiple is considered 1.0. + * WARNING: Travel times will be rounded to the nearest second after this + * multiple is applied but before performing any numerical operations, thus, + * a small multiple may result in a loss of precision. + * See also `extra_visit_duration_for_visit_type` below. + * + * Generated from protobuf field optional double travel_duration_multiple = 11; + * @param float $var + * @return $this + */ + public function setTravelDurationMultiple($var) + { + GPBUtil::checkDouble($var); + $this->travel_duration_multiple = $var; + + return $this; + } + + /** + * Unloading policy enforced on the vehicle. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.Vehicle.UnloadingPolicy unloading_policy = 12; + * @return int + */ + public function getUnloadingPolicy() + { + return $this->unloading_policy; + } + + /** + * Unloading policy enforced on the vehicle. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.Vehicle.UnloadingPolicy unloading_policy = 12; + * @param int $var + * @return $this + */ + public function setUnloadingPolicy($var) + { + GPBUtil::checkEnum($var, \Google\Maps\RouteOptimization\V1\Vehicle\UnloadingPolicy::class); + $this->unloading_policy = $var; + + return $this; + } + + /** + * Capacities of the vehicle (weight, volume, # of pallets for example). + * The keys in the map are the identifiers of the type of load, consistent + * with the keys of the + * [Shipment.load_demands][google.maps.routeoptimization.v1.Shipment.load_demands] + * field. If a given key is absent from this map, the corresponding capacity + * is considered to be limitless. + * + * Generated from protobuf field map load_limits = 30; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLoadLimits() + { + return $this->load_limits; + } + + /** + * Capacities of the vehicle (weight, volume, # of pallets for example). + * The keys in the map are the identifiers of the type of load, consistent + * with the keys of the + * [Shipment.load_demands][google.maps.routeoptimization.v1.Shipment.load_demands] + * field. If a given key is absent from this map, the corresponding capacity + * is considered to be limitless. + * + * Generated from protobuf field map load_limits = 30; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLoadLimits($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\Vehicle\LoadLimit::class); + $this->load_limits = $arr; + + return $this; + } + + /** + * Vehicle costs: all costs add up and must be in the same unit as + * [Shipment.penalty_cost][google.maps.routeoptimization.v1.Shipment.penalty_cost]. + * Cost per hour of the vehicle route. This cost is applied to the total time + * taken by the route, and includes travel time, waiting time, and visit time. + * Using `cost_per_hour` instead of just `cost_per_traveled_hour` may result + * in additional latency. + * + * Generated from protobuf field double cost_per_hour = 16; + * @return float + */ + public function getCostPerHour() + { + return $this->cost_per_hour; + } + + /** + * Vehicle costs: all costs add up and must be in the same unit as + * [Shipment.penalty_cost][google.maps.routeoptimization.v1.Shipment.penalty_cost]. + * Cost per hour of the vehicle route. This cost is applied to the total time + * taken by the route, and includes travel time, waiting time, and visit time. + * Using `cost_per_hour` instead of just `cost_per_traveled_hour` may result + * in additional latency. + * + * Generated from protobuf field double cost_per_hour = 16; + * @param float $var + * @return $this + */ + public function setCostPerHour($var) + { + GPBUtil::checkDouble($var); + $this->cost_per_hour = $var; + + return $this; + } + + /** + * Cost per traveled hour of the vehicle route. This cost is applied only to + * travel time taken by the route (i.e., that reported in + * [ShipmentRoute.transitions][google.maps.routeoptimization.v1.ShipmentRoute.transitions]), + * and excludes waiting time and visit time. + * + * Generated from protobuf field double cost_per_traveled_hour = 17; + * @return float + */ + public function getCostPerTraveledHour() + { + return $this->cost_per_traveled_hour; + } + + /** + * Cost per traveled hour of the vehicle route. This cost is applied only to + * travel time taken by the route (i.e., that reported in + * [ShipmentRoute.transitions][google.maps.routeoptimization.v1.ShipmentRoute.transitions]), + * and excludes waiting time and visit time. + * + * Generated from protobuf field double cost_per_traveled_hour = 17; + * @param float $var + * @return $this + */ + public function setCostPerTraveledHour($var) + { + GPBUtil::checkDouble($var); + $this->cost_per_traveled_hour = $var; + + return $this; + } + + /** + * Cost per kilometer of the vehicle route. This cost is applied to the + * distance reported in the + * [ShipmentRoute.transitions][google.maps.routeoptimization.v1.ShipmentRoute.transitions] + * and does not apply to any distance implicitly traveled from the + * `arrival_location` to the `departure_location` of a single `VisitRequest`. + * + * Generated from protobuf field double cost_per_kilometer = 18; + * @return float + */ + public function getCostPerKilometer() + { + return $this->cost_per_kilometer; + } + + /** + * Cost per kilometer of the vehicle route. This cost is applied to the + * distance reported in the + * [ShipmentRoute.transitions][google.maps.routeoptimization.v1.ShipmentRoute.transitions] + * and does not apply to any distance implicitly traveled from the + * `arrival_location` to the `departure_location` of a single `VisitRequest`. + * + * Generated from protobuf field double cost_per_kilometer = 18; + * @param float $var + * @return $this + */ + public function setCostPerKilometer($var) + { + GPBUtil::checkDouble($var); + $this->cost_per_kilometer = $var; + + return $this; + } + + /** + * Fixed cost applied if this vehicle is used to handle a shipment. + * + * Generated from protobuf field double fixed_cost = 19; + * @return float + */ + public function getFixedCost() + { + return $this->fixed_cost; + } + + /** + * Fixed cost applied if this vehicle is used to handle a shipment. + * + * Generated from protobuf field double fixed_cost = 19; + * @param float $var + * @return $this + */ + public function setFixedCost($var) + { + GPBUtil::checkDouble($var); + $this->fixed_cost = $var; + + return $this; + } + + /** + * This field only applies to vehicles when their route does not serve any + * shipments. It indicates if the vehicle should be considered as used or not + * in this case. + * If true, the vehicle goes from its start to its end location even if it + * doesn't serve any shipments, and time and distance costs resulting from its + * start --> end travel are taken into account. + * Otherwise, it doesn't travel from its start to its end location, and no + * `break_rule` or delay (from `TransitionAttributes`) are scheduled for this + * vehicle. In this case, the vehicle's `ShipmentRoute` doesn't contain any + * information except for the vehicle index and label. + * + * Generated from protobuf field bool used_if_route_is_empty = 20; + * @return bool + */ + public function getUsedIfRouteIsEmpty() + { + return $this->used_if_route_is_empty; + } + + /** + * This field only applies to vehicles when their route does not serve any + * shipments. It indicates if the vehicle should be considered as used or not + * in this case. + * If true, the vehicle goes from its start to its end location even if it + * doesn't serve any shipments, and time and distance costs resulting from its + * start --> end travel are taken into account. + * Otherwise, it doesn't travel from its start to its end location, and no + * `break_rule` or delay (from `TransitionAttributes`) are scheduled for this + * vehicle. In this case, the vehicle's `ShipmentRoute` doesn't contain any + * information except for the vehicle index and label. + * + * Generated from protobuf field bool used_if_route_is_empty = 20; + * @param bool $var + * @return $this + */ + public function setUsedIfRouteIsEmpty($var) + { + GPBUtil::checkBool($var); + $this->used_if_route_is_empty = $var; + + return $this; + } + + /** + * Limit applied to the total duration of the vehicle's route. In a given + * `OptimizeToursResponse`, the route duration of a vehicle is the + * difference between its `vehicle_end_time` and `vehicle_start_time`. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.Vehicle.DurationLimit route_duration_limit = 21; + * @return \Google\Maps\RouteOptimization\V1\Vehicle\DurationLimit|null + */ + public function getRouteDurationLimit() + { + return $this->route_duration_limit; + } + + public function hasRouteDurationLimit() + { + return isset($this->route_duration_limit); + } + + public function clearRouteDurationLimit() + { + unset($this->route_duration_limit); + } + + /** + * Limit applied to the total duration of the vehicle's route. In a given + * `OptimizeToursResponse`, the route duration of a vehicle is the + * difference between its `vehicle_end_time` and `vehicle_start_time`. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.Vehicle.DurationLimit route_duration_limit = 21; + * @param \Google\Maps\RouteOptimization\V1\Vehicle\DurationLimit $var + * @return $this + */ + public function setRouteDurationLimit($var) + { + GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\Vehicle\DurationLimit::class); + $this->route_duration_limit = $var; + + return $this; + } + + /** + * Limit applied to the travel duration of the vehicle's route. In a given + * `OptimizeToursResponse`, the route travel duration is the sum of all its + * [transitions.travel_duration][google.maps.routeoptimization.v1.ShipmentRoute.Transition.travel_duration]. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.Vehicle.DurationLimit travel_duration_limit = 22; + * @return \Google\Maps\RouteOptimization\V1\Vehicle\DurationLimit|null + */ + public function getTravelDurationLimit() + { + return $this->travel_duration_limit; + } + + public function hasTravelDurationLimit() + { + return isset($this->travel_duration_limit); + } + + public function clearTravelDurationLimit() + { + unset($this->travel_duration_limit); + } + + /** + * Limit applied to the travel duration of the vehicle's route. In a given + * `OptimizeToursResponse`, the route travel duration is the sum of all its + * [transitions.travel_duration][google.maps.routeoptimization.v1.ShipmentRoute.Transition.travel_duration]. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.Vehicle.DurationLimit travel_duration_limit = 22; + * @param \Google\Maps\RouteOptimization\V1\Vehicle\DurationLimit $var + * @return $this + */ + public function setTravelDurationLimit($var) + { + GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\Vehicle\DurationLimit::class); + $this->travel_duration_limit = $var; + + return $this; + } + + /** + * Limit applied to the total distance of the vehicle's route. In a given + * `OptimizeToursResponse`, the route distance is the sum of all its + * [transitions.travel_distance_meters][google.maps.routeoptimization.v1.ShipmentRoute.Transition.travel_distance_meters]. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.DistanceLimit route_distance_limit = 23; + * @return \Google\Maps\RouteOptimization\V1\DistanceLimit|null + */ + public function getRouteDistanceLimit() + { + return $this->route_distance_limit; + } + + public function hasRouteDistanceLimit() + { + return isset($this->route_distance_limit); + } + + public function clearRouteDistanceLimit() + { + unset($this->route_distance_limit); + } + + /** + * Limit applied to the total distance of the vehicle's route. In a given + * `OptimizeToursResponse`, the route distance is the sum of all its + * [transitions.travel_distance_meters][google.maps.routeoptimization.v1.ShipmentRoute.Transition.travel_distance_meters]. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.DistanceLimit route_distance_limit = 23; + * @param \Google\Maps\RouteOptimization\V1\DistanceLimit $var + * @return $this + */ + public function setRouteDistanceLimit($var) + { + GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\DistanceLimit::class); + $this->route_distance_limit = $var; + + return $this; + } + + /** + * Specifies a map from visit_types strings to durations. The duration is time + * in addition to + * [VisitRequest.duration][google.maps.routeoptimization.v1.Shipment.VisitRequest.duration] + * to be taken at visits with the specified `visit_types`. This extra visit + * duration adds cost if `cost_per_hour` is specified. Keys (i.e. + * `visit_types`) cannot be empty strings. + * If a visit request has multiple types, a duration will be added for each + * type in the map. + * + * Generated from protobuf field map extra_visit_duration_for_visit_type = 24; + * @return \Google\Protobuf\Internal\MapField + */ + public function getExtraVisitDurationForVisitType() + { + return $this->extra_visit_duration_for_visit_type; + } + + /** + * Specifies a map from visit_types strings to durations. The duration is time + * in addition to + * [VisitRequest.duration][google.maps.routeoptimization.v1.Shipment.VisitRequest.duration] + * to be taken at visits with the specified `visit_types`. This extra visit + * duration adds cost if `cost_per_hour` is specified. Keys (i.e. + * `visit_types`) cannot be empty strings. + * If a visit request has multiple types, a duration will be added for each + * type in the map. + * + * Generated from protobuf field map extra_visit_duration_for_visit_type = 24; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setExtraVisitDurationForVisitType($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Duration::class); + $this->extra_visit_duration_for_visit_type = $arr; + + return $this; + } + + /** + * Describes the break schedule to be enforced on this vehicle. + * If empty, no breaks will be scheduled for this vehicle. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.BreakRule break_rule = 25; + * @return \Google\Maps\RouteOptimization\V1\BreakRule|null + */ + public function getBreakRule() + { + return $this->break_rule; + } + + public function hasBreakRule() + { + return isset($this->break_rule); + } + + public function clearBreakRule() + { + unset($this->break_rule); + } + + /** + * Describes the break schedule to be enforced on this vehicle. + * If empty, no breaks will be scheduled for this vehicle. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.BreakRule break_rule = 25; + * @param \Google\Maps\RouteOptimization\V1\BreakRule $var + * @return $this + */ + public function setBreakRule($var) + { + GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\BreakRule::class); + $this->break_rule = $var; + + return $this; + } + + /** + * Specifies a label for this vehicle. This label is reported in the response + * as the `vehicle_label` of the corresponding + * [ShipmentRoute][google.maps.routeoptimization.v1.ShipmentRoute]. + * + * Generated from protobuf field string label = 27; + * @return string + */ + public function getLabel() + { + return $this->label; + } + + /** + * Specifies a label for this vehicle. This label is reported in the response + * as the `vehicle_label` of the corresponding + * [ShipmentRoute][google.maps.routeoptimization.v1.ShipmentRoute]. + * + * Generated from protobuf field string label = 27; + * @param string $var + * @return $this + */ + public function setLabel($var) + { + GPBUtil::checkString($var, True); + $this->label = $var; + + return $this; + } + + /** + * If true, `used_if_route_is_empty` must be false, and this vehicle will + * remain unused. + * If a shipment is performed by an ignored vehicle in + * `injected_first_solution_routes`, it is skipped in the first solution but + * is free to be performed in the response. + * If a shipment is performed by an ignored vehicle in + * `injected_solution_constraint` and any related pickup/delivery is + * constrained to remain on the vehicle (i.e., not relaxed to level + * `RELAX_ALL_AFTER_THRESHOLD`), it is skipped in the response. + * If a shipment has a non-empty `allowed_vehicle_indices` field and all of + * the allowed vehicles are ignored, it is skipped in the response. + * + * Generated from protobuf field bool ignore = 28; + * @return bool + */ + public function getIgnore() + { + return $this->ignore; + } + + /** + * If true, `used_if_route_is_empty` must be false, and this vehicle will + * remain unused. + * If a shipment is performed by an ignored vehicle in + * `injected_first_solution_routes`, it is skipped in the first solution but + * is free to be performed in the response. + * If a shipment is performed by an ignored vehicle in + * `injected_solution_constraint` and any related pickup/delivery is + * constrained to remain on the vehicle (i.e., not relaxed to level + * `RELAX_ALL_AFTER_THRESHOLD`), it is skipped in the response. + * If a shipment has a non-empty `allowed_vehicle_indices` field and all of + * the allowed vehicles are ignored, it is skipped in the response. + * + * Generated from protobuf field bool ignore = 28; + * @param bool $var + * @return $this + */ + public function setIgnore($var) + { + GPBUtil::checkBool($var); + $this->ignore = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Vehicle/DurationLimit.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Vehicle/DurationLimit.php new file mode 100644 index 000000000000..75db61656a5f --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Vehicle/DurationLimit.php @@ -0,0 +1,359 @@ +google.maps.routeoptimization.v1.Vehicle.DurationLimit + */ +class DurationLimit extends \Google\Protobuf\Internal\Message +{ + /** + * A hard limit constraining the duration to be at most max_duration. + * + * Generated from protobuf field .google.protobuf.Duration max_duration = 1; + */ + protected $max_duration = null; + /** + * A soft limit not enforcing a maximum duration limit, but when violated + * makes the route incur a cost. This cost adds up to other costs defined in + * the model, with the same unit. + * If defined, `soft_max_duration` must be nonnegative. If max_duration is + * also defined, `soft_max_duration` must be less than max_duration. + * + * Generated from protobuf field .google.protobuf.Duration soft_max_duration = 2; + */ + protected $soft_max_duration = null; + /** + * Cost per hour incurred if the `soft_max_duration` threshold is violated. + * The additional cost is 0 if the duration is under the threshold, + * otherwise the cost depends on the duration as follows: + * ``` + * cost_per_hour_after_soft_max * (duration - soft_max_duration) + * ``` + * The cost must be nonnegative. + * + * Generated from protobuf field optional double cost_per_hour_after_soft_max = 3; + */ + protected $cost_per_hour_after_soft_max = null; + /** + * A soft limit not enforcing a maximum duration limit, but when violated + * makes the route incur a cost, quadratic in the duration. This cost adds + * up to other costs defined in the model, with the same unit. + * If defined, `quadratic_soft_max_duration` must be nonnegative. If + * `max_duration` is also defined, `quadratic_soft_max_duration` must be + * less than `max_duration`, and the difference must be no larger than one + * day: + * `max_duration - quadratic_soft_max_duration <= 86400 seconds` + * + * Generated from protobuf field .google.protobuf.Duration quadratic_soft_max_duration = 4; + */ + protected $quadratic_soft_max_duration = null; + /** + * Cost per square hour incurred if the + * `quadratic_soft_max_duration` threshold is violated. + * The additional cost is 0 if the duration is under the threshold, + * otherwise the cost depends on the duration as follows: + * ``` + * cost_per_square_hour_after_quadratic_soft_max * + * (duration - quadratic_soft_max_duration)^2 + * ``` + * The cost must be nonnegative. + * + * Generated from protobuf field optional double cost_per_square_hour_after_quadratic_soft_max = 5; + */ + protected $cost_per_square_hour_after_quadratic_soft_max = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Duration $max_duration + * A hard limit constraining the duration to be at most max_duration. + * @type \Google\Protobuf\Duration $soft_max_duration + * A soft limit not enforcing a maximum duration limit, but when violated + * makes the route incur a cost. This cost adds up to other costs defined in + * the model, with the same unit. + * If defined, `soft_max_duration` must be nonnegative. If max_duration is + * also defined, `soft_max_duration` must be less than max_duration. + * @type float $cost_per_hour_after_soft_max + * Cost per hour incurred if the `soft_max_duration` threshold is violated. + * The additional cost is 0 if the duration is under the threshold, + * otherwise the cost depends on the duration as follows: + * ``` + * cost_per_hour_after_soft_max * (duration - soft_max_duration) + * ``` + * The cost must be nonnegative. + * @type \Google\Protobuf\Duration $quadratic_soft_max_duration + * A soft limit not enforcing a maximum duration limit, but when violated + * makes the route incur a cost, quadratic in the duration. This cost adds + * up to other costs defined in the model, with the same unit. + * If defined, `quadratic_soft_max_duration` must be nonnegative. If + * `max_duration` is also defined, `quadratic_soft_max_duration` must be + * less than `max_duration`, and the difference must be no larger than one + * day: + * `max_duration - quadratic_soft_max_duration <= 86400 seconds` + * @type float $cost_per_square_hour_after_quadratic_soft_max + * Cost per square hour incurred if the + * `quadratic_soft_max_duration` threshold is violated. + * The additional cost is 0 if the duration is under the threshold, + * otherwise the cost depends on the duration as follows: + * ``` + * cost_per_square_hour_after_quadratic_soft_max * + * (duration - quadratic_soft_max_duration)^2 + * ``` + * The cost must be nonnegative. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); + parent::__construct($data); + } + + /** + * A hard limit constraining the duration to be at most max_duration. + * + * Generated from protobuf field .google.protobuf.Duration max_duration = 1; + * @return \Google\Protobuf\Duration|null + */ + public function getMaxDuration() + { + return $this->max_duration; + } + + public function hasMaxDuration() + { + return isset($this->max_duration); + } + + public function clearMaxDuration() + { + unset($this->max_duration); + } + + /** + * A hard limit constraining the duration to be at most max_duration. + * + * Generated from protobuf field .google.protobuf.Duration max_duration = 1; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setMaxDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->max_duration = $var; + + return $this; + } + + /** + * A soft limit not enforcing a maximum duration limit, but when violated + * makes the route incur a cost. This cost adds up to other costs defined in + * the model, with the same unit. + * If defined, `soft_max_duration` must be nonnegative. If max_duration is + * also defined, `soft_max_duration` must be less than max_duration. + * + * Generated from protobuf field .google.protobuf.Duration soft_max_duration = 2; + * @return \Google\Protobuf\Duration|null + */ + public function getSoftMaxDuration() + { + return $this->soft_max_duration; + } + + public function hasSoftMaxDuration() + { + return isset($this->soft_max_duration); + } + + public function clearSoftMaxDuration() + { + unset($this->soft_max_duration); + } + + /** + * A soft limit not enforcing a maximum duration limit, but when violated + * makes the route incur a cost. This cost adds up to other costs defined in + * the model, with the same unit. + * If defined, `soft_max_duration` must be nonnegative. If max_duration is + * also defined, `soft_max_duration` must be less than max_duration. + * + * Generated from protobuf field .google.protobuf.Duration soft_max_duration = 2; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setSoftMaxDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->soft_max_duration = $var; + + return $this; + } + + /** + * Cost per hour incurred if the `soft_max_duration` threshold is violated. + * The additional cost is 0 if the duration is under the threshold, + * otherwise the cost depends on the duration as follows: + * ``` + * cost_per_hour_after_soft_max * (duration - soft_max_duration) + * ``` + * The cost must be nonnegative. + * + * Generated from protobuf field optional double cost_per_hour_after_soft_max = 3; + * @return float + */ + public function getCostPerHourAfterSoftMax() + { + return isset($this->cost_per_hour_after_soft_max) ? $this->cost_per_hour_after_soft_max : 0.0; + } + + public function hasCostPerHourAfterSoftMax() + { + return isset($this->cost_per_hour_after_soft_max); + } + + public function clearCostPerHourAfterSoftMax() + { + unset($this->cost_per_hour_after_soft_max); + } + + /** + * Cost per hour incurred if the `soft_max_duration` threshold is violated. + * The additional cost is 0 if the duration is under the threshold, + * otherwise the cost depends on the duration as follows: + * ``` + * cost_per_hour_after_soft_max * (duration - soft_max_duration) + * ``` + * The cost must be nonnegative. + * + * Generated from protobuf field optional double cost_per_hour_after_soft_max = 3; + * @param float $var + * @return $this + */ + public function setCostPerHourAfterSoftMax($var) + { + GPBUtil::checkDouble($var); + $this->cost_per_hour_after_soft_max = $var; + + return $this; + } + + /** + * A soft limit not enforcing a maximum duration limit, but when violated + * makes the route incur a cost, quadratic in the duration. This cost adds + * up to other costs defined in the model, with the same unit. + * If defined, `quadratic_soft_max_duration` must be nonnegative. If + * `max_duration` is also defined, `quadratic_soft_max_duration` must be + * less than `max_duration`, and the difference must be no larger than one + * day: + * `max_duration - quadratic_soft_max_duration <= 86400 seconds` + * + * Generated from protobuf field .google.protobuf.Duration quadratic_soft_max_duration = 4; + * @return \Google\Protobuf\Duration|null + */ + public function getQuadraticSoftMaxDuration() + { + return $this->quadratic_soft_max_duration; + } + + public function hasQuadraticSoftMaxDuration() + { + return isset($this->quadratic_soft_max_duration); + } + + public function clearQuadraticSoftMaxDuration() + { + unset($this->quadratic_soft_max_duration); + } + + /** + * A soft limit not enforcing a maximum duration limit, but when violated + * makes the route incur a cost, quadratic in the duration. This cost adds + * up to other costs defined in the model, with the same unit. + * If defined, `quadratic_soft_max_duration` must be nonnegative. If + * `max_duration` is also defined, `quadratic_soft_max_duration` must be + * less than `max_duration`, and the difference must be no larger than one + * day: + * `max_duration - quadratic_soft_max_duration <= 86400 seconds` + * + * Generated from protobuf field .google.protobuf.Duration quadratic_soft_max_duration = 4; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setQuadraticSoftMaxDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->quadratic_soft_max_duration = $var; + + return $this; + } + + /** + * Cost per square hour incurred if the + * `quadratic_soft_max_duration` threshold is violated. + * The additional cost is 0 if the duration is under the threshold, + * otherwise the cost depends on the duration as follows: + * ``` + * cost_per_square_hour_after_quadratic_soft_max * + * (duration - quadratic_soft_max_duration)^2 + * ``` + * The cost must be nonnegative. + * + * Generated from protobuf field optional double cost_per_square_hour_after_quadratic_soft_max = 5; + * @return float + */ + public function getCostPerSquareHourAfterQuadraticSoftMax() + { + return isset($this->cost_per_square_hour_after_quadratic_soft_max) ? $this->cost_per_square_hour_after_quadratic_soft_max : 0.0; + } + + public function hasCostPerSquareHourAfterQuadraticSoftMax() + { + return isset($this->cost_per_square_hour_after_quadratic_soft_max); + } + + public function clearCostPerSquareHourAfterQuadraticSoftMax() + { + unset($this->cost_per_square_hour_after_quadratic_soft_max); + } + + /** + * Cost per square hour incurred if the + * `quadratic_soft_max_duration` threshold is violated. + * The additional cost is 0 if the duration is under the threshold, + * otherwise the cost depends on the duration as follows: + * ``` + * cost_per_square_hour_after_quadratic_soft_max * + * (duration - quadratic_soft_max_duration)^2 + * ``` + * The cost must be nonnegative. + * + * Generated from protobuf field optional double cost_per_square_hour_after_quadratic_soft_max = 5; + * @param float $var + * @return $this + */ + public function setCostPerSquareHourAfterQuadraticSoftMax($var) + { + GPBUtil::checkDouble($var); + $this->cost_per_square_hour_after_quadratic_soft_max = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(DurationLimit::class, \Google\Maps\RouteOptimization\V1\Vehicle_DurationLimit::class); + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Vehicle/LoadLimit.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Vehicle/LoadLimit.php new file mode 100644 index 000000000000..076beefb96f4 --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Vehicle/LoadLimit.php @@ -0,0 +1,270 @@ +google.maps.routeoptimization.v1.Vehicle.LoadLimit + */ +class LoadLimit extends \Google\Protobuf\Internal\Message +{ + /** + * The maximum acceptable amount of load. + * + * Generated from protobuf field optional int64 max_load = 1; + */ + protected $max_load = null; + /** + * A soft limit of the load. See + * [cost_per_unit_above_soft_max][google.maps.routeoptimization.v1.Vehicle.LoadLimit.cost_per_unit_above_soft_max]. + * + * Generated from protobuf field int64 soft_max_load = 2; + */ + protected $soft_max_load = 0; + /** + * If the load ever exceeds + * [soft_max_load][google.maps.routeoptimization.v1.Vehicle.LoadLimit.soft_max_load] + * along this vehicle's route, the following cost penalty applies (only once + * per vehicle): (load - + * [soft_max_load][google.maps.routeoptimization.v1.Vehicle.LoadLimit.soft_max_load]) + * * [cost_per_unit_above_soft_max][google.maps.routeoptimization.v1.Vehicle.LoadLimit.cost_per_unit_above_soft_max]. All costs + * add up and must be in the same unit as + * [Shipment.penalty_cost][google.maps.routeoptimization.v1.Shipment.penalty_cost]. + * + * Generated from protobuf field double cost_per_unit_above_soft_max = 3; + */ + protected $cost_per_unit_above_soft_max = 0.0; + /** + * The acceptable load interval of the vehicle at the start of the route. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.Vehicle.LoadLimit.Interval start_load_interval = 4; + */ + protected $start_load_interval = null; + /** + * The acceptable load interval of the vehicle at the end of the route. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.Vehicle.LoadLimit.Interval end_load_interval = 5; + */ + protected $end_load_interval = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $max_load + * The maximum acceptable amount of load. + * @type int|string $soft_max_load + * A soft limit of the load. See + * [cost_per_unit_above_soft_max][google.maps.routeoptimization.v1.Vehicle.LoadLimit.cost_per_unit_above_soft_max]. + * @type float $cost_per_unit_above_soft_max + * If the load ever exceeds + * [soft_max_load][google.maps.routeoptimization.v1.Vehicle.LoadLimit.soft_max_load] + * along this vehicle's route, the following cost penalty applies (only once + * per vehicle): (load - + * [soft_max_load][google.maps.routeoptimization.v1.Vehicle.LoadLimit.soft_max_load]) + * * [cost_per_unit_above_soft_max][google.maps.routeoptimization.v1.Vehicle.LoadLimit.cost_per_unit_above_soft_max]. All costs + * add up and must be in the same unit as + * [Shipment.penalty_cost][google.maps.routeoptimization.v1.Shipment.penalty_cost]. + * @type \Google\Maps\RouteOptimization\V1\Vehicle\LoadLimit\Interval $start_load_interval + * The acceptable load interval of the vehicle at the start of the route. + * @type \Google\Maps\RouteOptimization\V1\Vehicle\LoadLimit\Interval $end_load_interval + * The acceptable load interval of the vehicle at the end of the route. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); + parent::__construct($data); + } + + /** + * The maximum acceptable amount of load. + * + * Generated from protobuf field optional int64 max_load = 1; + * @return int|string + */ + public function getMaxLoad() + { + return isset($this->max_load) ? $this->max_load : 0; + } + + public function hasMaxLoad() + { + return isset($this->max_load); + } + + public function clearMaxLoad() + { + unset($this->max_load); + } + + /** + * The maximum acceptable amount of load. + * + * Generated from protobuf field optional int64 max_load = 1; + * @param int|string $var + * @return $this + */ + public function setMaxLoad($var) + { + GPBUtil::checkInt64($var); + $this->max_load = $var; + + return $this; + } + + /** + * A soft limit of the load. See + * [cost_per_unit_above_soft_max][google.maps.routeoptimization.v1.Vehicle.LoadLimit.cost_per_unit_above_soft_max]. + * + * Generated from protobuf field int64 soft_max_load = 2; + * @return int|string + */ + public function getSoftMaxLoad() + { + return $this->soft_max_load; + } + + /** + * A soft limit of the load. See + * [cost_per_unit_above_soft_max][google.maps.routeoptimization.v1.Vehicle.LoadLimit.cost_per_unit_above_soft_max]. + * + * Generated from protobuf field int64 soft_max_load = 2; + * @param int|string $var + * @return $this + */ + public function setSoftMaxLoad($var) + { + GPBUtil::checkInt64($var); + $this->soft_max_load = $var; + + return $this; + } + + /** + * If the load ever exceeds + * [soft_max_load][google.maps.routeoptimization.v1.Vehicle.LoadLimit.soft_max_load] + * along this vehicle's route, the following cost penalty applies (only once + * per vehicle): (load - + * [soft_max_load][google.maps.routeoptimization.v1.Vehicle.LoadLimit.soft_max_load]) + * * [cost_per_unit_above_soft_max][google.maps.routeoptimization.v1.Vehicle.LoadLimit.cost_per_unit_above_soft_max]. All costs + * add up and must be in the same unit as + * [Shipment.penalty_cost][google.maps.routeoptimization.v1.Shipment.penalty_cost]. + * + * Generated from protobuf field double cost_per_unit_above_soft_max = 3; + * @return float + */ + public function getCostPerUnitAboveSoftMax() + { + return $this->cost_per_unit_above_soft_max; + } + + /** + * If the load ever exceeds + * [soft_max_load][google.maps.routeoptimization.v1.Vehicle.LoadLimit.soft_max_load] + * along this vehicle's route, the following cost penalty applies (only once + * per vehicle): (load - + * [soft_max_load][google.maps.routeoptimization.v1.Vehicle.LoadLimit.soft_max_load]) + * * [cost_per_unit_above_soft_max][google.maps.routeoptimization.v1.Vehicle.LoadLimit.cost_per_unit_above_soft_max]. All costs + * add up and must be in the same unit as + * [Shipment.penalty_cost][google.maps.routeoptimization.v1.Shipment.penalty_cost]. + * + * Generated from protobuf field double cost_per_unit_above_soft_max = 3; + * @param float $var + * @return $this + */ + public function setCostPerUnitAboveSoftMax($var) + { + GPBUtil::checkDouble($var); + $this->cost_per_unit_above_soft_max = $var; + + return $this; + } + + /** + * The acceptable load interval of the vehicle at the start of the route. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.Vehicle.LoadLimit.Interval start_load_interval = 4; + * @return \Google\Maps\RouteOptimization\V1\Vehicle\LoadLimit\Interval|null + */ + public function getStartLoadInterval() + { + return $this->start_load_interval; + } + + public function hasStartLoadInterval() + { + return isset($this->start_load_interval); + } + + public function clearStartLoadInterval() + { + unset($this->start_load_interval); + } + + /** + * The acceptable load interval of the vehicle at the start of the route. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.Vehicle.LoadLimit.Interval start_load_interval = 4; + * @param \Google\Maps\RouteOptimization\V1\Vehicle\LoadLimit\Interval $var + * @return $this + */ + public function setStartLoadInterval($var) + { + GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\Vehicle\LoadLimit\Interval::class); + $this->start_load_interval = $var; + + return $this; + } + + /** + * The acceptable load interval of the vehicle at the end of the route. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.Vehicle.LoadLimit.Interval end_load_interval = 5; + * @return \Google\Maps\RouteOptimization\V1\Vehicle\LoadLimit\Interval|null + */ + public function getEndLoadInterval() + { + return $this->end_load_interval; + } + + public function hasEndLoadInterval() + { + return isset($this->end_load_interval); + } + + public function clearEndLoadInterval() + { + unset($this->end_load_interval); + } + + /** + * The acceptable load interval of the vehicle at the end of the route. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.Vehicle.LoadLimit.Interval end_load_interval = 5; + * @param \Google\Maps\RouteOptimization\V1\Vehicle\LoadLimit\Interval $var + * @return $this + */ + public function setEndLoadInterval($var) + { + GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\Vehicle\LoadLimit\Interval::class); + $this->end_load_interval = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(LoadLimit::class, \Google\Maps\RouteOptimization\V1\Vehicle_LoadLimit::class); + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Vehicle/LoadLimit/Interval.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Vehicle/LoadLimit/Interval.php new file mode 100644 index 000000000000..cc4429851ef7 --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Vehicle/LoadLimit/Interval.php @@ -0,0 +1,150 @@ +google.maps.routeoptimization.v1.Vehicle.LoadLimit.Interval + */ +class Interval extends \Google\Protobuf\Internal\Message +{ + /** + * A minimum acceptable load. Must be ≥ 0. + * If they're both specified, + * [min][google.maps.routeoptimization.v1.Vehicle.LoadLimit.Interval.min] + * must be ≤ + * [max][google.maps.routeoptimization.v1.Vehicle.LoadLimit.Interval.max]. + * + * Generated from protobuf field int64 min = 1; + */ + protected $min = 0; + /** + * A maximum acceptable load. Must be ≥ 0. If unspecified, the maximum + * load is unrestricted by this message. + * If they're both specified, + * [min][google.maps.routeoptimization.v1.Vehicle.LoadLimit.Interval.min] + * must be ≤ + * [max][google.maps.routeoptimization.v1.Vehicle.LoadLimit.Interval.max]. + * + * Generated from protobuf field optional int64 max = 2; + */ + protected $max = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $min + * A minimum acceptable load. Must be ≥ 0. + * If they're both specified, + * [min][google.maps.routeoptimization.v1.Vehicle.LoadLimit.Interval.min] + * must be ≤ + * [max][google.maps.routeoptimization.v1.Vehicle.LoadLimit.Interval.max]. + * @type int|string $max + * A maximum acceptable load. Must be ≥ 0. If unspecified, the maximum + * load is unrestricted by this message. + * If they're both specified, + * [min][google.maps.routeoptimization.v1.Vehicle.LoadLimit.Interval.min] + * must be ≤ + * [max][google.maps.routeoptimization.v1.Vehicle.LoadLimit.Interval.max]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); + parent::__construct($data); + } + + /** + * A minimum acceptable load. Must be ≥ 0. + * If they're both specified, + * [min][google.maps.routeoptimization.v1.Vehicle.LoadLimit.Interval.min] + * must be ≤ + * [max][google.maps.routeoptimization.v1.Vehicle.LoadLimit.Interval.max]. + * + * Generated from protobuf field int64 min = 1; + * @return int|string + */ + public function getMin() + { + return $this->min; + } + + /** + * A minimum acceptable load. Must be ≥ 0. + * If they're both specified, + * [min][google.maps.routeoptimization.v1.Vehicle.LoadLimit.Interval.min] + * must be ≤ + * [max][google.maps.routeoptimization.v1.Vehicle.LoadLimit.Interval.max]. + * + * Generated from protobuf field int64 min = 1; + * @param int|string $var + * @return $this + */ + public function setMin($var) + { + GPBUtil::checkInt64($var); + $this->min = $var; + + return $this; + } + + /** + * A maximum acceptable load. Must be ≥ 0. If unspecified, the maximum + * load is unrestricted by this message. + * If they're both specified, + * [min][google.maps.routeoptimization.v1.Vehicle.LoadLimit.Interval.min] + * must be ≤ + * [max][google.maps.routeoptimization.v1.Vehicle.LoadLimit.Interval.max]. + * + * Generated from protobuf field optional int64 max = 2; + * @return int|string + */ + public function getMax() + { + return isset($this->max) ? $this->max : 0; + } + + public function hasMax() + { + return isset($this->max); + } + + public function clearMax() + { + unset($this->max); + } + + /** + * A maximum acceptable load. Must be ≥ 0. If unspecified, the maximum + * load is unrestricted by this message. + * If they're both specified, + * [min][google.maps.routeoptimization.v1.Vehicle.LoadLimit.Interval.min] + * must be ≤ + * [max][google.maps.routeoptimization.v1.Vehicle.LoadLimit.Interval.max]. + * + * Generated from protobuf field optional int64 max = 2; + * @param int|string $var + * @return $this + */ + public function setMax($var) + { + GPBUtil::checkInt64($var); + $this->max = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Interval::class, \Google\Maps\RouteOptimization\V1\Vehicle_LoadLimit_Interval::class); + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Vehicle/TravelMode.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Vehicle/TravelMode.php new file mode 100644 index 000000000000..29c7c3891265 --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Vehicle/TravelMode.php @@ -0,0 +1,67 @@ +google.maps.routeoptimization.v1.Vehicle.TravelMode + */ +class TravelMode +{ + /** + * Unspecified travel mode, equivalent to `DRIVING`. + * + * Generated from protobuf enum TRAVEL_MODE_UNSPECIFIED = 0; + */ + const TRAVEL_MODE_UNSPECIFIED = 0; + /** + * Travel mode corresponding to driving directions (car, ...). + * + * Generated from protobuf enum DRIVING = 1; + */ + const DRIVING = 1; + /** + * Travel mode corresponding to walking directions. + * + * Generated from protobuf enum WALKING = 2; + */ + const WALKING = 2; + + private static $valueToName = [ + self::TRAVEL_MODE_UNSPECIFIED => 'TRAVEL_MODE_UNSPECIFIED', + self::DRIVING => 'DRIVING', + self::WALKING => 'WALKING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(TravelMode::class, \Google\Maps\RouteOptimization\V1\Vehicle_TravelMode::class); + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Vehicle/UnloadingPolicy.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Vehicle/UnloadingPolicy.php new file mode 100644 index 000000000000..dc58c2f42b5b --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Vehicle/UnloadingPolicy.php @@ -0,0 +1,68 @@ +google.maps.routeoptimization.v1.Vehicle.UnloadingPolicy + */ +class UnloadingPolicy +{ + /** + * Unspecified unloading policy; deliveries must just occur after their + * corresponding pickups. + * + * Generated from protobuf enum UNLOADING_POLICY_UNSPECIFIED = 0; + */ + const UNLOADING_POLICY_UNSPECIFIED = 0; + /** + * Deliveries must occur in reverse order of pickups + * + * Generated from protobuf enum LAST_IN_FIRST_OUT = 1; + */ + const LAST_IN_FIRST_OUT = 1; + /** + * Deliveries must occur in the same order as pickups + * + * Generated from protobuf enum FIRST_IN_FIRST_OUT = 2; + */ + const FIRST_IN_FIRST_OUT = 2; + + private static $valueToName = [ + self::UNLOADING_POLICY_UNSPECIFIED => 'UNLOADING_POLICY_UNSPECIFIED', + self::LAST_IN_FIRST_OUT => 'LAST_IN_FIRST_OUT', + self::FIRST_IN_FIRST_OUT => 'FIRST_IN_FIRST_OUT', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(UnloadingPolicy::class, \Google\Maps\RouteOptimization\V1\Vehicle_UnloadingPolicy::class); + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Waypoint.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Waypoint.php new file mode 100644 index 000000000000..b691d5167b2b --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Waypoint.php @@ -0,0 +1,166 @@ +google.maps.routeoptimization.v1.Waypoint + */ +class Waypoint extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Indicates that the location of this waypoint is meant to have a + * preference for the vehicle to stop at a particular side of road. When you + * set this value, the route will pass through the location so that the + * vehicle can stop at the side of road that the location is biased towards + * from the center of the road. This option doesn't work for the 'WALKING' + * travel mode. + * + * Generated from protobuf field bool side_of_road = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $side_of_road = false; + protected $location_type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Maps\RouteOptimization\V1\Location $location + * A point specified using geographic coordinates, including an optional + * heading. + * @type string $place_id + * The POI Place ID associated with the waypoint. + * @type bool $side_of_road + * Optional. Indicates that the location of this waypoint is meant to have a + * preference for the vehicle to stop at a particular side of road. When you + * set this value, the route will pass through the location so that the + * vehicle can stop at the side of road that the location is biased towards + * from the center of the road. This option doesn't work for the 'WALKING' + * travel mode. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); + parent::__construct($data); + } + + /** + * A point specified using geographic coordinates, including an optional + * heading. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.Location location = 1; + * @return \Google\Maps\RouteOptimization\V1\Location|null + */ + public function getLocation() + { + return $this->readOneof(1); + } + + public function hasLocation() + { + return $this->hasOneof(1); + } + + /** + * A point specified using geographic coordinates, including an optional + * heading. + * + * Generated from protobuf field .google.maps.routeoptimization.v1.Location location = 1; + * @param \Google\Maps\RouteOptimization\V1\Location $var + * @return $this + */ + public function setLocation($var) + { + GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\Location::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * The POI Place ID associated with the waypoint. + * + * Generated from protobuf field string place_id = 2; + * @return string + */ + public function getPlaceId() + { + return $this->readOneof(2); + } + + public function hasPlaceId() + { + return $this->hasOneof(2); + } + + /** + * The POI Place ID associated with the waypoint. + * + * Generated from protobuf field string place_id = 2; + * @param string $var + * @return $this + */ + public function setPlaceId($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Optional. Indicates that the location of this waypoint is meant to have a + * preference for the vehicle to stop at a particular side of road. When you + * set this value, the route will pass through the location so that the + * vehicle can stop at the side of road that the location is biased towards + * from the center of the road. This option doesn't work for the 'WALKING' + * travel mode. + * + * Generated from protobuf field bool side_of_road = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getSideOfRoad() + { + return $this->side_of_road; + } + + /** + * Optional. Indicates that the location of this waypoint is meant to have a + * preference for the vehicle to stop at a particular side of road. When you + * set this value, the route will pass through the location so that the + * vehicle can stop at the side of road that the location is biased towards + * from the center of the road. This option doesn't work for the 'WALKING' + * travel mode. + * + * Generated from protobuf field bool side_of_road = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setSideOfRoad($var) + { + GPBUtil::checkBool($var); + $this->side_of_road = $var; + + return $this; + } + + /** + * @return string + */ + public function getLocationType() + { + return $this->whichOneof("location_type"); + } + +} + diff --git a/owl-bot-staging/MapsRouteOptimization/v1/samples/V1/RouteOptimizationClient/batch_optimize_tours.php b/owl-bot-staging/MapsRouteOptimization/v1/samples/V1/RouteOptimizationClient/batch_optimize_tours.php new file mode 100644 index 000000000000..e118b4dbdf9b --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/samples/V1/RouteOptimizationClient/batch_optimize_tours.php @@ -0,0 +1,133 @@ +setDataFormat($modelConfigsInputConfigDataFormat); + $modelConfigsOutputConfig = (new OutputConfig()) + ->setDataFormat($modelConfigsOutputConfigDataFormat); + $asyncModelConfig = (new AsyncModelConfig()) + ->setInputConfig($modelConfigsInputConfig) + ->setOutputConfig($modelConfigsOutputConfig); + $modelConfigs = [$asyncModelConfig,]; + $request = (new BatchOptimizeToursRequest()) + ->setParent($parent) + ->setModelConfigs($modelConfigs); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $routeOptimizationClient->batchOptimizeTours($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var BatchOptimizeToursResponse $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $parent = '[PARENT]'; + $modelConfigsInputConfigDataFormat = DataFormat::DATA_FORMAT_UNSPECIFIED; + $modelConfigsOutputConfigDataFormat = DataFormat::DATA_FORMAT_UNSPECIFIED; + + batch_optimize_tours_sample( + $parent, + $modelConfigsInputConfigDataFormat, + $modelConfigsOutputConfigDataFormat + ); +} +// [END routeoptimization_v1_generated_RouteOptimization_BatchOptimizeTours_sync] diff --git a/owl-bot-staging/MapsRouteOptimization/v1/samples/V1/RouteOptimizationClient/optimize_tours.php b/owl-bot-staging/MapsRouteOptimization/v1/samples/V1/RouteOptimizationClient/optimize_tours.php new file mode 100644 index 000000000000..8ad98f631377 --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/samples/V1/RouteOptimizationClient/optimize_tours.php @@ -0,0 +1,89 @@ +setParent($parent); + + // Call the API and handle any network failures. + try { + /** @var OptimizeToursResponse $response */ + $response = $routeOptimizationClient->optimizeTours($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $parent = '[PARENT]'; + + optimize_tours_sample($parent); +} +// [END routeoptimization_v1_generated_RouteOptimization_OptimizeTours_sync] diff --git a/owl-bot-staging/MapsRouteOptimization/v1/src/V1/Client/RouteOptimizationClient.php b/owl-bot-staging/MapsRouteOptimization/v1/src/V1/Client/RouteOptimizationClient.php new file mode 100644 index 000000000000..ccb83c53a0fb --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/src/V1/Client/RouteOptimizationClient.php @@ -0,0 +1,327 @@ + batchOptimizeToursAsync(BatchOptimizeToursRequest $request, array $optionalArgs = []) + * @method PromiseInterface optimizeToursAsync(OptimizeToursRequest $request, array $optionalArgs = []) + */ +final class RouteOptimizationClient +{ + use GapicClientTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.maps.routeoptimization.v1.RouteOptimization'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'routeoptimization.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'routeoptimization.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/route_optimization_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/route_optimization_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/route_optimization_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/route_optimization_rest_client_config.php', + ], + ], + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Create the default operation client for the service. + * + * @param array $options ClientOptions for the client. + * + * @return OperationsClient + */ + private function createOperationsClient(array $options) + { + // Unset client-specific configuration options + unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); + + if (isset($options['operationsClient'])) { + return $options['operationsClient']; + } + + return new OperationsClient($options); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'routeoptimization.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Optimizes vehicle tours for one or more `OptimizeToursRequest` + * messages as a batch. + * + * This method is a Long Running Operation (LRO). The inputs for optimization + * (`OptimizeToursRequest` messages) and outputs (`OptimizeToursResponse` + * messages) are read from and written to Cloud Storage in user-specified + * format. Like the `OptimizeTours` method, each `OptimizeToursRequest` + * contains a `ShipmentModel` and returns an `OptimizeToursResponse` + * containing `ShipmentRoute` fields, which are a set of routes to be + * performed by vehicles minimizing the overall cost. + * + * The user can poll `operations.get` to check the status of the LRO: + * + * If the LRO `done` field is false, then at least one request is still + * being processed. Other requests may have completed successfully and their + * results are available in Cloud Storage. + * + * If the LRO's `done` field is true, then all requests have been processed. + * Any successfully processed requests will have their results available in + * Cloud Storage. Any requests that failed will not have their results + * available in Cloud Storage. If the LRO's `error` field is set, then it + * contains the error from one of the failed requests. + * + * The async variant is {@see RouteOptimizationClient::batchOptimizeToursAsync()} . + * + * @example samples/V1/RouteOptimizationClient/batch_optimize_tours.php + * + * @param BatchOptimizeToursRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function batchOptimizeTours(BatchOptimizeToursRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('BatchOptimizeTours', $request, $callOptions)->wait(); + } + + /** + * Sends an `OptimizeToursRequest` containing a `ShipmentModel` and returns an + * `OptimizeToursResponse` containing `ShipmentRoute`s, which are a set of + * routes to be performed by vehicles minimizing the overall cost. + * + * A `ShipmentModel` model consists mainly of `Shipment`s that need to be + * carried out and `Vehicle`s that can be used to transport the `Shipment`s. + * The `ShipmentRoute`s assign `Shipment`s to `Vehicle`s. More specifically, + * they assign a series of `Visit`s to each vehicle, where a `Visit` + * corresponds to a `VisitRequest`, which is a pickup or delivery for a + * `Shipment`. + * + * The goal is to provide an assignment of `ShipmentRoute`s to `Vehicle`s that + * minimizes the total cost where cost has many components defined in the + * `ShipmentModel`. + * + * The async variant is {@see RouteOptimizationClient::optimizeToursAsync()} . + * + * @example samples/V1/RouteOptimizationClient/optimize_tours.php + * + * @param OptimizeToursRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OptimizeToursResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function optimizeTours(OptimizeToursRequest $request, array $callOptions = []): OptimizeToursResponse + { + return $this->startApiCall('OptimizeTours', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/MapsRouteOptimization/v1/src/V1/gapic_metadata.json b/owl-bot-staging/MapsRouteOptimization/v1/src/V1/gapic_metadata.json new file mode 100644 index 000000000000..71f5ea3e4f9b --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/src/V1/gapic_metadata.json @@ -0,0 +1,28 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.maps.routeoptimization.v1", + "libraryPackage": "Google\\Maps\\RouteOptimization\\V1", + "services": { + "RouteOptimization": { + "clients": { + "grpc": { + "libraryClient": "RouteOptimizationGapicClient", + "rpcs": { + "BatchOptimizeTours": { + "methods": [ + "batchOptimizeTours" + ] + }, + "OptimizeTours": { + "methods": [ + "optimizeTours" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/MapsRouteOptimization/v1/src/V1/resources/route_optimization_client_config.json b/owl-bot-staging/MapsRouteOptimization/v1/src/V1/resources/route_optimization_client_config.json new file mode 100644 index 000000000000..0e5122e35b74 --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/src/V1/resources/route_optimization_client_config.json @@ -0,0 +1,44 @@ +{ + "interfaces": { + "google.maps.routeoptimization.v1.RouteOptimization": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE" + ] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 10000, + "initial_rpc_timeout_millis": 3600000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 3600000, + "total_timeout_millis": 3600000 + } + }, + "methods": { + "BatchOptimizeTours": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "OptimizeTours": { + "timeout_millis": 3600000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/MapsRouteOptimization/v1/src/V1/resources/route_optimization_descriptor_config.php b/owl-bot-staging/MapsRouteOptimization/v1/src/V1/resources/route_optimization_descriptor_config.php new file mode 100644 index 000000000000..0e8b84155c48 --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/src/V1/resources/route_optimization_descriptor_config.php @@ -0,0 +1,59 @@ + [ + 'google.maps.routeoptimization.v1.RouteOptimization' => [ + 'BatchOptimizeTours' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Maps\RouteOptimization\V1\BatchOptimizeToursResponse', + 'metadataReturnType' => '\Google\Maps\RouteOptimization\V1\BatchOptimizeToursMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'OptimizeTours' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Maps\RouteOptimization\V1\OptimizeToursResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + ], + ], +]; diff --git a/owl-bot-staging/MapsRouteOptimization/v1/src/V1/resources/route_optimization_rest_client_config.php b/owl-bot-staging/MapsRouteOptimization/v1/src/V1/resources/route_optimization_rest_client_config.php new file mode 100644 index 000000000000..5087b38b87fd --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/src/V1/resources/route_optimization_rest_client_config.php @@ -0,0 +1,80 @@ + [ + 'google.longrunning.Operations' => [ + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.maps.routeoptimization.v1.RouteOptimization' => [ + 'BatchOptimizeTours' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}:batchOptimizeTours', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*}:batchOptimizeTours', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'OptimizeTours' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}:optimizeTours', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*}:optimizeTours', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/MapsRouteOptimization/v1/tests/Unit/V1/Client/RouteOptimizationClientTest.php b/owl-bot-staging/MapsRouteOptimization/v1/tests/Unit/V1/Client/RouteOptimizationClientTest.php new file mode 100644 index 000000000000..ce03ba07af40 --- /dev/null +++ b/owl-bot-staging/MapsRouteOptimization/v1/tests/Unit/V1/Client/RouteOptimizationClientTest.php @@ -0,0 +1,327 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return RouteOptimizationClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new RouteOptimizationClient($options); + } + + /** @test */ + public function batchOptimizeToursTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/batchOptimizeToursTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new BatchOptimizeToursResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/batchOptimizeToursTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $parent = 'parent-995424086'; + $modelConfigs = []; + $request = (new BatchOptimizeToursRequest()) + ->setParent($parent) + ->setModelConfigs($modelConfigs); + $response = $gapicClient->batchOptimizeTours($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.maps.routeoptimization.v1.RouteOptimization/BatchOptimizeTours', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($parent, $actualValue); + $actualValue = $actualApiRequestObject->getModelConfigs(); + $this->assertProtobufEquals($modelConfigs, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/batchOptimizeToursTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function batchOptimizeToursExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/batchOptimizeToursTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $parent = 'parent-995424086'; + $modelConfigs = []; + $request = (new BatchOptimizeToursRequest()) + ->setParent($parent) + ->setModelConfigs($modelConfigs); + $response = $gapicClient->batchOptimizeTours($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/batchOptimizeToursTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function optimizeToursTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $requestLabel = 'requestLabel1739091268'; + $expectedResponse = new OptimizeToursResponse(); + $expectedResponse->setRequestLabel($requestLabel); + $transport->addResponse($expectedResponse); + // Mock request + $parent = 'parent-995424086'; + $request = (new OptimizeToursRequest()) + ->setParent($parent); + $response = $gapicClient->optimizeTours($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.maps.routeoptimization.v1.RouteOptimization/OptimizeTours', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($parent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function optimizeToursExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $parent = 'parent-995424086'; + $request = (new OptimizeToursRequest()) + ->setParent($parent); + try { + $gapicClient->optimizeTours($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchOptimizeToursAsyncTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/batchOptimizeToursTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new BatchOptimizeToursResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/batchOptimizeToursTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $parent = 'parent-995424086'; + $modelConfigs = []; + $request = (new BatchOptimizeToursRequest()) + ->setParent($parent) + ->setModelConfigs($modelConfigs); + $response = $gapicClient->batchOptimizeToursAsync($request)->wait(); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.maps.routeoptimization.v1.RouteOptimization/BatchOptimizeTours', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($parent, $actualValue); + $actualValue = $actualApiRequestObject->getModelConfigs(); + $this->assertProtobufEquals($modelConfigs, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/batchOptimizeToursTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } +} diff --git a/owl-bot-staging/MediaTranslation/v1beta1/proto/src/GPBMetadata/Google/Cloud/Mediatranslation/V1Beta1/MediaTranslation.php b/owl-bot-staging/MediaTranslation/v1beta1/proto/src/GPBMetadata/Google/Cloud/Mediatranslation/V1Beta1/MediaTranslation.php new file mode 100644 index 0000000000000000000000000000000000000000..bf1b2516f5173a3586e5690536cf20756d4da7e1 GIT binary patch literal 2626 zcmbtWO>Y}T7|zATLKG{g?bNi?k?5L)+ol2eW9>wuj)~n?l$BQF_1GS1y}QiL zCbTI04mfk;fCN9I7bJcGXO4&iN8X*;wOz-qA|uKIKHv zKJLB1VnlJs0};4^hkNm0Ksk1UamYN%4UFq2xOLLSR{gkp7oJ8z%w1~YVGs;GT6Vo4 z?w7~3&xqi}k31q+;Fr(#dQ^}-WpHLJhKz)ePsTI~iA!;_U40C`eIkh6l%RGk0kt2` zf!a^^stM=;Las-m2up|VG%ETYVfYKSZ7Mf^wgDcAZ8pXQ2pq8(d9uNX4Ym z$(Pb@8a9Dr16)!ZP4g1TLo9eqXQN}xsff9MAbBSM7nA?&1vRXM%x*C1^{aG5&RD=r zbDGr@WYN>p(6u{Iy*Rr1nED0|^-nd6Jki6o1vwRyK6B6H@AqYJops zL;XXvLE=6O9O}D4pZUXrhPBe$)%;(ToPHO5pjOB6h(CtM8=^8EE;2R5A5&}CVGhUN)i@$5=&N6DJ^xK$5LMH%`v4@f+ zl}`CtSLC-Wf@<5*ioT8BnWQhE(~{!Nqm}CWQ0_@=t_T(XeM3D@X%u@x{{d|a`kk0P zd=8hUl=?T$gOeCG8nv<8=Qz~GKeJCv`k zp&N>L@t+*R%PI+h!@!TI{xMpmoCiEjQ_s?b^)l2+NgAKmpJ%W#*82W+Td6Wv*yqqR zxt0z+gJwG7MMw+D4sGl|%lN$cDgf2R>yqVZsJ*um{4T)Dz{Ri7yK~=R>u+`1mQ_1) ztfyA1>vX?vTh5afe5)Ndj;;FU3S5nCt5tVS8cyf9)%+67-L7?7Y1OPvZU5&SDk#jE zHg_mLV=mQy)4;fdsouDDs&f5yn%BlrqfuNbX`gC4omZ7RmyWSIGjM4m1BAz)6=Nhs z7@6hr`T2PoJ~Ng{EJjLoJPbi>3<5r`{**(z@bGF(t6THBLH>}pwdYUNRAfgl7?+2^ zWoZLUUQ;(S`xN#L=5q^s|7qGUx%*A2Yz(PvjCle^s%&0mes(H>lm?n$3-w-`G!-x|k6oONEH^RC3`0T_E&7y+nQR literal 0 HcmV?d00001 diff --git a/owl-bot-staging/MediaTranslation/v1beta1/proto/src/Google/Cloud/MediaTranslation/V1beta1/StreamingTranslateSpeechConfig.php b/owl-bot-staging/MediaTranslation/v1beta1/proto/src/Google/Cloud/MediaTranslation/V1beta1/StreamingTranslateSpeechConfig.php new file mode 100644 index 000000000000..410ed6ffea0f --- /dev/null +++ b/owl-bot-staging/MediaTranslation/v1beta1/proto/src/Google/Cloud/MediaTranslation/V1beta1/StreamingTranslateSpeechConfig.php @@ -0,0 +1,159 @@ +google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechConfig + */ +class StreamingTranslateSpeechConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The common config for all the following audio contents. + * + * Generated from protobuf field .google.cloud.mediatranslation.v1beta1.TranslateSpeechConfig audio_config = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $audio_config = null; + /** + * Optional. If `false` or omitted, the system performs + * continuous translation (continuing to wait for and process audio even if + * the user pauses speaking) until the client closes the input stream (gRPC + * API) or until the maximum time limit has been reached. May return multiple + * `StreamingTranslateSpeechResult`s with the `is_final` flag set to `true`. + * If `true`, the speech translator will detect a single spoken utterance. + * When it detects that the user has paused or stopped speaking, it will + * return an `END_OF_SINGLE_UTTERANCE` event and cease translation. + * When the client receives 'END_OF_SINGLE_UTTERANCE' event, the client should + * stop sending the requests. However, clients should keep receiving remaining + * responses until the stream is terminated. To construct the complete + * sentence in a streaming way, one should override (if 'is_final' of previous + * response is false), or append (if 'is_final' of previous response is true). + * + * Generated from protobuf field bool single_utterance = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $single_utterance = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\MediaTranslation\V1beta1\TranslateSpeechConfig $audio_config + * Required. The common config for all the following audio contents. + * @type bool $single_utterance + * Optional. If `false` or omitted, the system performs + * continuous translation (continuing to wait for and process audio even if + * the user pauses speaking) until the client closes the input stream (gRPC + * API) or until the maximum time limit has been reached. May return multiple + * `StreamingTranslateSpeechResult`s with the `is_final` flag set to `true`. + * If `true`, the speech translator will detect a single spoken utterance. + * When it detects that the user has paused or stopped speaking, it will + * return an `END_OF_SINGLE_UTTERANCE` event and cease translation. + * When the client receives 'END_OF_SINGLE_UTTERANCE' event, the client should + * stop sending the requests. However, clients should keep receiving remaining + * responses until the stream is terminated. To construct the complete + * sentence in a streaming way, one should override (if 'is_final' of previous + * response is false), or append (if 'is_final' of previous response is true). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Mediatranslation\V1Beta1\MediaTranslation::initOnce(); + parent::__construct($data); + } + + /** + * Required. The common config for all the following audio contents. + * + * Generated from protobuf field .google.cloud.mediatranslation.v1beta1.TranslateSpeechConfig audio_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\MediaTranslation\V1beta1\TranslateSpeechConfig|null + */ + public function getAudioConfig() + { + return $this->audio_config; + } + + public function hasAudioConfig() + { + return isset($this->audio_config); + } + + public function clearAudioConfig() + { + unset($this->audio_config); + } + + /** + * Required. The common config for all the following audio contents. + * + * Generated from protobuf field .google.cloud.mediatranslation.v1beta1.TranslateSpeechConfig audio_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\MediaTranslation\V1beta1\TranslateSpeechConfig $var + * @return $this + */ + public function setAudioConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MediaTranslation\V1beta1\TranslateSpeechConfig::class); + $this->audio_config = $var; + + return $this; + } + + /** + * Optional. If `false` or omitted, the system performs + * continuous translation (continuing to wait for and process audio even if + * the user pauses speaking) until the client closes the input stream (gRPC + * API) or until the maximum time limit has been reached. May return multiple + * `StreamingTranslateSpeechResult`s with the `is_final` flag set to `true`. + * If `true`, the speech translator will detect a single spoken utterance. + * When it detects that the user has paused or stopped speaking, it will + * return an `END_OF_SINGLE_UTTERANCE` event and cease translation. + * When the client receives 'END_OF_SINGLE_UTTERANCE' event, the client should + * stop sending the requests. However, clients should keep receiving remaining + * responses until the stream is terminated. To construct the complete + * sentence in a streaming way, one should override (if 'is_final' of previous + * response is false), or append (if 'is_final' of previous response is true). + * + * Generated from protobuf field bool single_utterance = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getSingleUtterance() + { + return $this->single_utterance; + } + + /** + * Optional. If `false` or omitted, the system performs + * continuous translation (continuing to wait for and process audio even if + * the user pauses speaking) until the client closes the input stream (gRPC + * API) or until the maximum time limit has been reached. May return multiple + * `StreamingTranslateSpeechResult`s with the `is_final` flag set to `true`. + * If `true`, the speech translator will detect a single spoken utterance. + * When it detects that the user has paused or stopped speaking, it will + * return an `END_OF_SINGLE_UTTERANCE` event and cease translation. + * When the client receives 'END_OF_SINGLE_UTTERANCE' event, the client should + * stop sending the requests. However, clients should keep receiving remaining + * responses until the stream is terminated. To construct the complete + * sentence in a streaming way, one should override (if 'is_final' of previous + * response is false), or append (if 'is_final' of previous response is true). + * + * Generated from protobuf field bool single_utterance = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setSingleUtterance($var) + { + GPBUtil::checkBool($var); + $this->single_utterance = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MediaTranslation/v1beta1/proto/src/Google/Cloud/MediaTranslation/V1beta1/StreamingTranslateSpeechRequest.php b/owl-bot-staging/MediaTranslation/v1beta1/proto/src/Google/Cloud/MediaTranslation/V1beta1/StreamingTranslateSpeechRequest.php new file mode 100644 index 000000000000..7675f1ceba05 --- /dev/null +++ b/owl-bot-staging/MediaTranslation/v1beta1/proto/src/Google/Cloud/MediaTranslation/V1beta1/StreamingTranslateSpeechRequest.php @@ -0,0 +1,139 @@ +google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechRequest + */ +class StreamingTranslateSpeechRequest extends \Google\Protobuf\Internal\Message +{ + protected $streaming_request; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\MediaTranslation\V1beta1\StreamingTranslateSpeechConfig $streaming_config + * Provides information to the recognizer that specifies how to process the + * request. The first `StreamingTranslateSpeechRequest` message must contain + * a `streaming_config` message. + * @type string $audio_content + * The audio data to be translated. Sequential chunks of audio data are sent + * in sequential `StreamingTranslateSpeechRequest` messages. The first + * `StreamingTranslateSpeechRequest` message must not contain + * `audio_content` data and all subsequent `StreamingTranslateSpeechRequest` + * messages must contain `audio_content` data. The audio bytes must be + * encoded as specified in `StreamingTranslateSpeechConfig`. Note: as with + * all bytes fields, protobuffers use a pure binary representation (not + * base64). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Mediatranslation\V1Beta1\MediaTranslation::initOnce(); + parent::__construct($data); + } + + /** + * Provides information to the recognizer that specifies how to process the + * request. The first `StreamingTranslateSpeechRequest` message must contain + * a `streaming_config` message. + * + * Generated from protobuf field .google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechConfig streaming_config = 1; + * @return \Google\Cloud\MediaTranslation\V1beta1\StreamingTranslateSpeechConfig|null + */ + public function getStreamingConfig() + { + return $this->readOneof(1); + } + + public function hasStreamingConfig() + { + return $this->hasOneof(1); + } + + /** + * Provides information to the recognizer that specifies how to process the + * request. The first `StreamingTranslateSpeechRequest` message must contain + * a `streaming_config` message. + * + * Generated from protobuf field .google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechConfig streaming_config = 1; + * @param \Google\Cloud\MediaTranslation\V1beta1\StreamingTranslateSpeechConfig $var + * @return $this + */ + public function setStreamingConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MediaTranslation\V1beta1\StreamingTranslateSpeechConfig::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * The audio data to be translated. Sequential chunks of audio data are sent + * in sequential `StreamingTranslateSpeechRequest` messages. The first + * `StreamingTranslateSpeechRequest` message must not contain + * `audio_content` data and all subsequent `StreamingTranslateSpeechRequest` + * messages must contain `audio_content` data. The audio bytes must be + * encoded as specified in `StreamingTranslateSpeechConfig`. Note: as with + * all bytes fields, protobuffers use a pure binary representation (not + * base64). + * + * Generated from protobuf field bytes audio_content = 2; + * @return string + */ + public function getAudioContent() + { + return $this->readOneof(2); + } + + public function hasAudioContent() + { + return $this->hasOneof(2); + } + + /** + * The audio data to be translated. Sequential chunks of audio data are sent + * in sequential `StreamingTranslateSpeechRequest` messages. The first + * `StreamingTranslateSpeechRequest` message must not contain + * `audio_content` data and all subsequent `StreamingTranslateSpeechRequest` + * messages must contain `audio_content` data. The audio bytes must be + * encoded as specified in `StreamingTranslateSpeechConfig`. Note: as with + * all bytes fields, protobuffers use a pure binary representation (not + * base64). + * + * Generated from protobuf field bytes audio_content = 2; + * @param string $var + * @return $this + */ + public function setAudioContent($var) + { + GPBUtil::checkString($var, False); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getStreamingRequest() + { + return $this->whichOneof("streaming_request"); + } + +} + diff --git a/owl-bot-staging/MediaTranslation/v1beta1/proto/src/Google/Cloud/MediaTranslation/V1beta1/StreamingTranslateSpeechResponse.php b/owl-bot-staging/MediaTranslation/v1beta1/proto/src/Google/Cloud/MediaTranslation/V1beta1/StreamingTranslateSpeechResponse.php new file mode 100644 index 000000000000..8760ccf25ab8 --- /dev/null +++ b/owl-bot-staging/MediaTranslation/v1beta1/proto/src/Google/Cloud/MediaTranslation/V1beta1/StreamingTranslateSpeechResponse.php @@ -0,0 +1,164 @@ +google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechResponse + */ +class StreamingTranslateSpeechResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. If set, returns a [google.rpc.Status][google.rpc.Status] message that + * specifies the error for the operation. + * + * Generated from protobuf field .google.rpc.Status error = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $error = null; + /** + * Output only. The translation result that is currently being processed (is_final could be + * true or false). + * + * Generated from protobuf field .google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechResult result = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $result = null; + /** + * Output only. Indicates the type of speech event. + * + * Generated from protobuf field .google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechResponse.SpeechEventType speech_event_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $speech_event_type = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Rpc\Status $error + * Output only. If set, returns a [google.rpc.Status][google.rpc.Status] message that + * specifies the error for the operation. + * @type \Google\Cloud\MediaTranslation\V1beta1\StreamingTranslateSpeechResult $result + * Output only. The translation result that is currently being processed (is_final could be + * true or false). + * @type int $speech_event_type + * Output only. Indicates the type of speech event. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Mediatranslation\V1Beta1\MediaTranslation::initOnce(); + parent::__construct($data); + } + + /** + * Output only. If set, returns a [google.rpc.Status][google.rpc.Status] message that + * specifies the error for the operation. + * + * Generated from protobuf field .google.rpc.Status error = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Rpc\Status|null + */ + public function getError() + { + return $this->error; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * Output only. If set, returns a [google.rpc.Status][google.rpc.Status] message that + * specifies the error for the operation. + * + * Generated from protobuf field .google.rpc.Status error = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Rpc\Status $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \Google\Rpc\Status::class); + $this->error = $var; + + return $this; + } + + /** + * Output only. The translation result that is currently being processed (is_final could be + * true or false). + * + * Generated from protobuf field .google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechResult result = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\MediaTranslation\V1beta1\StreamingTranslateSpeechResult|null + */ + public function getResult() + { + return $this->result; + } + + public function hasResult() + { + return isset($this->result); + } + + public function clearResult() + { + unset($this->result); + } + + /** + * Output only. The translation result that is currently being processed (is_final could be + * true or false). + * + * Generated from protobuf field .google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechResult result = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\MediaTranslation\V1beta1\StreamingTranslateSpeechResult $var + * @return $this + */ + public function setResult($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MediaTranslation\V1beta1\StreamingTranslateSpeechResult::class); + $this->result = $var; + + return $this; + } + + /** + * Output only. Indicates the type of speech event. + * + * Generated from protobuf field .google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechResponse.SpeechEventType speech_event_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getSpeechEventType() + { + return $this->speech_event_type; + } + + /** + * Output only. Indicates the type of speech event. + * + * Generated from protobuf field .google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechResponse.SpeechEventType speech_event_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setSpeechEventType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\MediaTranslation\V1beta1\StreamingTranslateSpeechResponse\SpeechEventType::class); + $this->speech_event_type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MediaTranslation/v1beta1/proto/src/Google/Cloud/MediaTranslation/V1beta1/StreamingTranslateSpeechResponse/SpeechEventType.php b/owl-bot-staging/MediaTranslation/v1beta1/proto/src/Google/Cloud/MediaTranslation/V1beta1/StreamingTranslateSpeechResponse/SpeechEventType.php new file mode 100644 index 000000000000..f8dd4b40d7ee --- /dev/null +++ b/owl-bot-staging/MediaTranslation/v1beta1/proto/src/Google/Cloud/MediaTranslation/V1beta1/StreamingTranslateSpeechResponse/SpeechEventType.php @@ -0,0 +1,66 @@ +google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechResponse.SpeechEventType + */ +class SpeechEventType +{ + /** + * No speech event specified. + * + * Generated from protobuf enum SPEECH_EVENT_TYPE_UNSPECIFIED = 0; + */ + const SPEECH_EVENT_TYPE_UNSPECIFIED = 0; + /** + * This event indicates that the server has detected the end of the user's + * speech utterance and expects no additional speech. Therefore, the server + * will not process additional audio (although it may subsequently return + * additional results). When the client receives 'END_OF_SINGLE_UTTERANCE' + * event, the client should stop sending the requests. However, clients + * should keep receiving remaining responses until the stream is terminated. + * To construct the complete sentence in a streaming way, one should + * override (if 'is_final' of previous response is false), or append (if + * 'is_final' of previous response is true). This event is only sent if + * `single_utterance` was set to `true`, and is not used otherwise. + * + * Generated from protobuf enum END_OF_SINGLE_UTTERANCE = 1; + */ + const END_OF_SINGLE_UTTERANCE = 1; + + private static $valueToName = [ + self::SPEECH_EVENT_TYPE_UNSPECIFIED => 'SPEECH_EVENT_TYPE_UNSPECIFIED', + self::END_OF_SINGLE_UTTERANCE => 'END_OF_SINGLE_UTTERANCE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SpeechEventType::class, \Google\Cloud\MediaTranslation\V1beta1\StreamingTranslateSpeechResponse_SpeechEventType::class); + diff --git a/owl-bot-staging/MediaTranslation/v1beta1/proto/src/Google/Cloud/MediaTranslation/V1beta1/StreamingTranslateSpeechResult.php b/owl-bot-staging/MediaTranslation/v1beta1/proto/src/Google/Cloud/MediaTranslation/V1beta1/StreamingTranslateSpeechResult.php new file mode 100644 index 000000000000..f70d56afe8af --- /dev/null +++ b/owl-bot-staging/MediaTranslation/v1beta1/proto/src/Google/Cloud/MediaTranslation/V1beta1/StreamingTranslateSpeechResult.php @@ -0,0 +1,76 @@ +google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechResult + */ +class StreamingTranslateSpeechResult extends \Google\Protobuf\Internal\Message +{ + protected $result; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\MediaTranslation\V1beta1\StreamingTranslateSpeechResult\TextTranslationResult $text_translation_result + * Text translation result. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Mediatranslation\V1Beta1\MediaTranslation::initOnce(); + parent::__construct($data); + } + + /** + * Text translation result. + * + * Generated from protobuf field .google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechResult.TextTranslationResult text_translation_result = 1; + * @return \Google\Cloud\MediaTranslation\V1beta1\StreamingTranslateSpeechResult\TextTranslationResult|null + */ + public function getTextTranslationResult() + { + return $this->readOneof(1); + } + + public function hasTextTranslationResult() + { + return $this->hasOneof(1); + } + + /** + * Text translation result. + * + * Generated from protobuf field .google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechResult.TextTranslationResult text_translation_result = 1; + * @param \Google\Cloud\MediaTranslation\V1beta1\StreamingTranslateSpeechResult\TextTranslationResult $var + * @return $this + */ + public function setTextTranslationResult($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MediaTranslation\V1beta1\StreamingTranslateSpeechResult\TextTranslationResult::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * @return string + */ + public function getResult() + { + return $this->whichOneof("result"); + } + +} + diff --git a/owl-bot-staging/MediaTranslation/v1beta1/proto/src/Google/Cloud/MediaTranslation/V1beta1/StreamingTranslateSpeechResult/TextTranslationResult.php b/owl-bot-staging/MediaTranslation/v1beta1/proto/src/Google/Cloud/MediaTranslation/V1beta1/StreamingTranslateSpeechResult/TextTranslationResult.php new file mode 100644 index 000000000000..30b706ff4853 --- /dev/null +++ b/owl-bot-staging/MediaTranslation/v1beta1/proto/src/Google/Cloud/MediaTranslation/V1beta1/StreamingTranslateSpeechResult/TextTranslationResult.php @@ -0,0 +1,124 @@ +google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechResult.TextTranslationResult + */ +class TextTranslationResult extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The translated sentence. + * + * Generated from protobuf field string translation = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $translation = ''; + /** + * Output only. If `false`, this `StreamingTranslateSpeechResult` represents + * an interim result that may change. If `true`, this is the final time the + * translation service will return this particular + * `StreamingTranslateSpeechResult`, the streaming translator will not + * return any further hypotheses for this portion of the transcript and + * corresponding audio. + * + * Generated from protobuf field bool is_final = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $is_final = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $translation + * Output only. The translated sentence. + * @type bool $is_final + * Output only. If `false`, this `StreamingTranslateSpeechResult` represents + * an interim result that may change. If `true`, this is the final time the + * translation service will return this particular + * `StreamingTranslateSpeechResult`, the streaming translator will not + * return any further hypotheses for this portion of the transcript and + * corresponding audio. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Mediatranslation\V1Beta1\MediaTranslation::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The translated sentence. + * + * Generated from protobuf field string translation = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getTranslation() + { + return $this->translation; + } + + /** + * Output only. The translated sentence. + * + * Generated from protobuf field string translation = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setTranslation($var) + { + GPBUtil::checkString($var, True); + $this->translation = $var; + + return $this; + } + + /** + * Output only. If `false`, this `StreamingTranslateSpeechResult` represents + * an interim result that may change. If `true`, this is the final time the + * translation service will return this particular + * `StreamingTranslateSpeechResult`, the streaming translator will not + * return any further hypotheses for this portion of the transcript and + * corresponding audio. + * + * Generated from protobuf field bool is_final = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getIsFinal() + { + return $this->is_final; + } + + /** + * Output only. If `false`, this `StreamingTranslateSpeechResult` represents + * an interim result that may change. If `true`, this is the final time the + * translation service will return this particular + * `StreamingTranslateSpeechResult`, the streaming translator will not + * return any further hypotheses for this portion of the transcript and + * corresponding audio. + * + * Generated from protobuf field bool is_final = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setIsFinal($var) + { + GPBUtil::checkBool($var); + $this->is_final = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(TextTranslationResult::class, \Google\Cloud\MediaTranslation\V1beta1\StreamingTranslateSpeechResult_TextTranslationResult::class); + diff --git a/owl-bot-staging/MediaTranslation/v1beta1/proto/src/Google/Cloud/MediaTranslation/V1beta1/TranslateSpeechConfig.php b/owl-bot-staging/MediaTranslation/v1beta1/proto/src/Google/Cloud/MediaTranslation/V1beta1/TranslateSpeechConfig.php new file mode 100644 index 000000000000..7ff6b9c28d56 --- /dev/null +++ b/owl-bot-staging/MediaTranslation/v1beta1/proto/src/Google/Cloud/MediaTranslation/V1beta1/TranslateSpeechConfig.php @@ -0,0 +1,308 @@ +google.cloud.mediatranslation.v1beta1.TranslateSpeechConfig + */ +class TranslateSpeechConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Encoding of audio data. + * Supported formats: + * - `linear16` + * Uncompressed 16-bit signed little-endian samples (Linear PCM). + * - `flac` + * `flac` (Free Lossless Audio Codec) is the recommended encoding + * because it is lossless--therefore recognition is not compromised--and + * requires only about half the bandwidth of `linear16`. + * - `mulaw` + * 8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law. + * - `amr` + * Adaptive Multi-Rate Narrowband codec. `sample_rate_hertz` must be 8000. + * - `amr-wb` + * Adaptive Multi-Rate Wideband codec. `sample_rate_hertz` must be 16000. + * - `ogg-opus` + * Opus encoded audio frames in [Ogg](https://wikipedia.org/wiki/Ogg) + * container. `sample_rate_hertz` must be one of 8000, 12000, 16000, 24000, + * or 48000. + * - `mp3` + * MP3 audio. Support all standard MP3 bitrates (which range from 32-320 + * kbps). When using this encoding, `sample_rate_hertz` has to match the + * sample rate of the file being used. + * + * Generated from protobuf field string audio_encoding = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $audio_encoding = ''; + /** + * Required. Source language code (BCP-47) of the input audio. + * + * Generated from protobuf field string source_language_code = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $source_language_code = ''; + /** + * Required. Target language code (BCP-47) of the output. + * + * Generated from protobuf field string target_language_code = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $target_language_code = ''; + /** + * Optional. Sample rate in Hertz of the audio data. Valid values are: + * 8000-48000. 16000 is optimal. For best results, set the sampling rate of + * the audio source to 16000 Hz. If that's not possible, use the native sample + * rate of the audio source (instead of re-sampling). + * + * Generated from protobuf field int32 sample_rate_hertz = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $sample_rate_hertz = 0; + /** + * Optional. `google-provided-model/video` and + * `google-provided-model/enhanced-phone-call` are premium models. + * `google-provided-model/phone-call` is not premium model. + * + * Generated from protobuf field string model = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $model = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $audio_encoding + * Required. Encoding of audio data. + * Supported formats: + * - `linear16` + * Uncompressed 16-bit signed little-endian samples (Linear PCM). + * - `flac` + * `flac` (Free Lossless Audio Codec) is the recommended encoding + * because it is lossless--therefore recognition is not compromised--and + * requires only about half the bandwidth of `linear16`. + * - `mulaw` + * 8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law. + * - `amr` + * Adaptive Multi-Rate Narrowband codec. `sample_rate_hertz` must be 8000. + * - `amr-wb` + * Adaptive Multi-Rate Wideband codec. `sample_rate_hertz` must be 16000. + * - `ogg-opus` + * Opus encoded audio frames in [Ogg](https://wikipedia.org/wiki/Ogg) + * container. `sample_rate_hertz` must be one of 8000, 12000, 16000, 24000, + * or 48000. + * - `mp3` + * MP3 audio. Support all standard MP3 bitrates (which range from 32-320 + * kbps). When using this encoding, `sample_rate_hertz` has to match the + * sample rate of the file being used. + * @type string $source_language_code + * Required. Source language code (BCP-47) of the input audio. + * @type string $target_language_code + * Required. Target language code (BCP-47) of the output. + * @type int $sample_rate_hertz + * Optional. Sample rate in Hertz of the audio data. Valid values are: + * 8000-48000. 16000 is optimal. For best results, set the sampling rate of + * the audio source to 16000 Hz. If that's not possible, use the native sample + * rate of the audio source (instead of re-sampling). + * @type string $model + * Optional. `google-provided-model/video` and + * `google-provided-model/enhanced-phone-call` are premium models. + * `google-provided-model/phone-call` is not premium model. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Mediatranslation\V1Beta1\MediaTranslation::initOnce(); + parent::__construct($data); + } + + /** + * Required. Encoding of audio data. + * Supported formats: + * - `linear16` + * Uncompressed 16-bit signed little-endian samples (Linear PCM). + * - `flac` + * `flac` (Free Lossless Audio Codec) is the recommended encoding + * because it is lossless--therefore recognition is not compromised--and + * requires only about half the bandwidth of `linear16`. + * - `mulaw` + * 8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law. + * - `amr` + * Adaptive Multi-Rate Narrowband codec. `sample_rate_hertz` must be 8000. + * - `amr-wb` + * Adaptive Multi-Rate Wideband codec. `sample_rate_hertz` must be 16000. + * - `ogg-opus` + * Opus encoded audio frames in [Ogg](https://wikipedia.org/wiki/Ogg) + * container. `sample_rate_hertz` must be one of 8000, 12000, 16000, 24000, + * or 48000. + * - `mp3` + * MP3 audio. Support all standard MP3 bitrates (which range from 32-320 + * kbps). When using this encoding, `sample_rate_hertz` has to match the + * sample rate of the file being used. + * + * Generated from protobuf field string audio_encoding = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getAudioEncoding() + { + return $this->audio_encoding; + } + + /** + * Required. Encoding of audio data. + * Supported formats: + * - `linear16` + * Uncompressed 16-bit signed little-endian samples (Linear PCM). + * - `flac` + * `flac` (Free Lossless Audio Codec) is the recommended encoding + * because it is lossless--therefore recognition is not compromised--and + * requires only about half the bandwidth of `linear16`. + * - `mulaw` + * 8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law. + * - `amr` + * Adaptive Multi-Rate Narrowband codec. `sample_rate_hertz` must be 8000. + * - `amr-wb` + * Adaptive Multi-Rate Wideband codec. `sample_rate_hertz` must be 16000. + * - `ogg-opus` + * Opus encoded audio frames in [Ogg](https://wikipedia.org/wiki/Ogg) + * container. `sample_rate_hertz` must be one of 8000, 12000, 16000, 24000, + * or 48000. + * - `mp3` + * MP3 audio. Support all standard MP3 bitrates (which range from 32-320 + * kbps). When using this encoding, `sample_rate_hertz` has to match the + * sample rate of the file being used. + * + * Generated from protobuf field string audio_encoding = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setAudioEncoding($var) + { + GPBUtil::checkString($var, True); + $this->audio_encoding = $var; + + return $this; + } + + /** + * Required. Source language code (BCP-47) of the input audio. + * + * Generated from protobuf field string source_language_code = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getSourceLanguageCode() + { + return $this->source_language_code; + } + + /** + * Required. Source language code (BCP-47) of the input audio. + * + * Generated from protobuf field string source_language_code = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setSourceLanguageCode($var) + { + GPBUtil::checkString($var, True); + $this->source_language_code = $var; + + return $this; + } + + /** + * Required. Target language code (BCP-47) of the output. + * + * Generated from protobuf field string target_language_code = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getTargetLanguageCode() + { + return $this->target_language_code; + } + + /** + * Required. Target language code (BCP-47) of the output. + * + * Generated from protobuf field string target_language_code = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setTargetLanguageCode($var) + { + GPBUtil::checkString($var, True); + $this->target_language_code = $var; + + return $this; + } + + /** + * Optional. Sample rate in Hertz of the audio data. Valid values are: + * 8000-48000. 16000 is optimal. For best results, set the sampling rate of + * the audio source to 16000 Hz. If that's not possible, use the native sample + * rate of the audio source (instead of re-sampling). + * + * Generated from protobuf field int32 sample_rate_hertz = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getSampleRateHertz() + { + return $this->sample_rate_hertz; + } + + /** + * Optional. Sample rate in Hertz of the audio data. Valid values are: + * 8000-48000. 16000 is optimal. For best results, set the sampling rate of + * the audio source to 16000 Hz. If that's not possible, use the native sample + * rate of the audio source (instead of re-sampling). + * + * Generated from protobuf field int32 sample_rate_hertz = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setSampleRateHertz($var) + { + GPBUtil::checkInt32($var); + $this->sample_rate_hertz = $var; + + return $this; + } + + /** + * Optional. `google-provided-model/video` and + * `google-provided-model/enhanced-phone-call` are premium models. + * `google-provided-model/phone-call` is not premium model. + * + * Generated from protobuf field string model = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getModel() + { + return $this->model; + } + + /** + * Optional. `google-provided-model/video` and + * `google-provided-model/enhanced-phone-call` are premium models. + * `google-provided-model/phone-call` is not premium model. + * + * Generated from protobuf field string model = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setModel($var) + { + GPBUtil::checkString($var, True); + $this->model = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MediaTranslation/v1beta1/samples/V1beta1/SpeechTranslationServiceClient/streaming_translate_speech.php b/owl-bot-staging/MediaTranslation/v1beta1/samples/V1beta1/SpeechTranslationServiceClient/streaming_translate_speech.php new file mode 100644 index 000000000000..16ba4b85793d --- /dev/null +++ b/owl-bot-staging/MediaTranslation/v1beta1/samples/V1beta1/SpeechTranslationServiceClient/streaming_translate_speech.php @@ -0,0 +1,64 @@ +streamingTranslateSpeech(); + $stream->writeAll([$request,]); + + /** @var StreamingTranslateSpeechResponse $element */ + foreach ($stream->closeWriteAndReadAll() as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END mediatranslation_v1beta1_generated_SpeechTranslationService_StreamingTranslateSpeech_sync] diff --git a/owl-bot-staging/MediaTranslation/v1beta1/src/V1beta1/Client/SpeechTranslationServiceClient.php b/owl-bot-staging/MediaTranslation/v1beta1/src/V1beta1/Client/SpeechTranslationServiceClient.php new file mode 100644 index 000000000000..23048f622246 --- /dev/null +++ b/owl-bot-staging/MediaTranslation/v1beta1/src/V1beta1/Client/SpeechTranslationServiceClient.php @@ -0,0 +1,181 @@ + self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/speech_translation_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/speech_translation_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/speech_translation_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/speech_translation_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'mediatranslation.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * } + * + * @throws ValidationException + * + * @experimental + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** + * Performs bidirectional streaming speech translation: receive results while + * sending audio. This method is only available via the gRPC API (not REST). + * + * @example samples/V1beta1/SpeechTranslationServiceClient/streaming_translate_speech.php + * + * @param array $callOptions { + * Optional. + * + * @type int $timeoutMillis + * Timeout to use for this call. + * } + * + * @return BidiStream + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function streamingTranslateSpeech(array $callOptions = []): BidiStream + { + return $this->startApiCall('StreamingTranslateSpeech', null, $callOptions); + } +} diff --git a/owl-bot-staging/MediaTranslation/v1beta1/src/V1beta1/Gapic/SpeechTranslationServiceGapicClient.php b/owl-bot-staging/MediaTranslation/v1beta1/src/V1beta1/Gapic/SpeechTranslationServiceGapicClient.php new file mode 100644 index 000000000000..39ead91cf776 --- /dev/null +++ b/owl-bot-staging/MediaTranslation/v1beta1/src/V1beta1/Gapic/SpeechTranslationServiceGapicClient.php @@ -0,0 +1,258 @@ +streamingTranslateSpeech(); + * $stream->writeAll($requests); + * foreach ($stream->closeWriteAndReadAll() as $element) { + * // doSomethingWith($element); + * } + * // Alternatively: + * // Write requests individually, making read() calls if + * // required. Call closeWrite() once writes are complete, and read the + * // remaining responses from the server. + * $requests = [ + * $request, + * ]; + * $stream = $speechTranslationServiceClient->streamingTranslateSpeech(); + * foreach ($requests as $request) { + * $stream->write($request); + * // if required, read a single response from the stream + * $element = $stream->read(); + * // doSomethingWith($element) + * } + * $stream->closeWrite(); + * $element = $stream->read(); + * while (!is_null($element)) { + * // doSomethingWith($element) + * $element = $stream->read(); + * } + * } finally { + * $speechTranslationServiceClient->close(); + * } + * ``` + * + * @experimental + * + * @deprecated Please use the new service client {@see \Google\Cloud\MediaTranslation\V1beta1\Client\SpeechTranslationServiceClient}. + */ +class SpeechTranslationServiceGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.mediatranslation.v1beta1.SpeechTranslationService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + const SERVICE_ADDRESS = 'mediatranslation.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'mediatranslation.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/speech_translation_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/speech_translation_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/speech_translation_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/speech_translation_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'mediatranslation.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + * + * @experimental + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** + * Performs bidirectional streaming speech translation: receive results while + * sending audio. This method is only available via the gRPC API (not REST). + * + * Sample code: + * ``` + * $speechTranslationServiceClient = new SpeechTranslationServiceClient(); + * try { + * $request = new StreamingTranslateSpeechRequest(); + * // Write all requests to the server, then read all responses until the + * // stream is complete + * $requests = [ + * $request, + * ]; + * $stream = $speechTranslationServiceClient->streamingTranslateSpeech(); + * $stream->writeAll($requests); + * foreach ($stream->closeWriteAndReadAll() as $element) { + * // doSomethingWith($element); + * } + * // Alternatively: + * // Write requests individually, making read() calls if + * // required. Call closeWrite() once writes are complete, and read the + * // remaining responses from the server. + * $requests = [ + * $request, + * ]; + * $stream = $speechTranslationServiceClient->streamingTranslateSpeech(); + * foreach ($requests as $request) { + * $stream->write($request); + * // if required, read a single response from the stream + * $element = $stream->read(); + * // doSomethingWith($element) + * } + * $stream->closeWrite(); + * $element = $stream->read(); + * while (!is_null($element)) { + * // doSomethingWith($element) + * $element = $stream->read(); + * } + * } finally { + * $speechTranslationServiceClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type int $timeoutMillis + * Timeout to use for this call. + * } + * + * @return \Google\ApiCore\BidiStream + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function streamingTranslateSpeech(array $optionalArgs = []) + { + return $this->startCall('StreamingTranslateSpeech', StreamingTranslateSpeechResponse::class, $optionalArgs, null, Call::BIDI_STREAMING_CALL); + } +} diff --git a/owl-bot-staging/MediaTranslation/v1beta1/src/V1beta1/SpeechTranslationServiceClient.php b/owl-bot-staging/MediaTranslation/v1beta1/src/V1beta1/SpeechTranslationServiceClient.php new file mode 100644 index 000000000000..f6074ee325aa --- /dev/null +++ b/owl-bot-staging/MediaTranslation/v1beta1/src/V1beta1/SpeechTranslationServiceClient.php @@ -0,0 +1,36 @@ + [ + 'google.cloud.mediatranslation.v1beta1.SpeechTranslationService' => [ + 'StreamingTranslateSpeech' => [ + 'grpcStreaming' => [ + 'grpcStreamingType' => 'BidiStreaming', + ], + 'callType' => \Google\ApiCore\Call::BIDI_STREAMING_CALL, + 'responseType' => 'Google\Cloud\MediaTranslation\V1beta1\StreamingTranslateSpeechResponse', + ], + ], + ], +]; diff --git a/owl-bot-staging/MediaTranslation/v1beta1/src/V1beta1/resources/speech_translation_service_rest_client_config.php b/owl-bot-staging/MediaTranslation/v1beta1/src/V1beta1/resources/speech_translation_service_rest_client_config.php new file mode 100644 index 000000000000..b33f57959be3 --- /dev/null +++ b/owl-bot-staging/MediaTranslation/v1beta1/src/V1beta1/resources/speech_translation_service_rest_client_config.php @@ -0,0 +1,26 @@ + [], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/MediaTranslation/v1beta1/tests/Unit/V1beta1/Client/SpeechTranslationServiceClientTest.php b/owl-bot-staging/MediaTranslation/v1beta1/tests/Unit/V1beta1/Client/SpeechTranslationServiceClientTest.php new file mode 100644 index 000000000000..28e620cf269b --- /dev/null +++ b/owl-bot-staging/MediaTranslation/v1beta1/tests/Unit/V1beta1/Client/SpeechTranslationServiceClientTest.php @@ -0,0 +1,151 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return SpeechTranslationServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new SpeechTranslationServiceClient($options); + } + + /** @test */ + public function streamingTranslateSpeechTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new StreamingTranslateSpeechResponse(); + $transport->addResponse($expectedResponse); + $expectedResponse2 = new StreamingTranslateSpeechResponse(); + $transport->addResponse($expectedResponse2); + $expectedResponse3 = new StreamingTranslateSpeechResponse(); + $transport->addResponse($expectedResponse3); + // Mock request + $request = new StreamingTranslateSpeechRequest(); + $request2 = new StreamingTranslateSpeechRequest(); + $request3 = new StreamingTranslateSpeechRequest(); + $bidi = $gapicClient->streamingTranslateSpeech(); + $this->assertInstanceOf(BidiStream::class, $bidi); + $bidi->write($request); + $responses = []; + $responses[] = $bidi->read(); + $bidi->writeAll([ + $request2, + $request3, + ]); + foreach ($bidi->closeWriteAndReadAll() as $response) { + $responses[] = $response; + } + + $expectedResponses = []; + $expectedResponses[] = $expectedResponse; + $expectedResponses[] = $expectedResponse2; + $expectedResponses[] = $expectedResponse3; + $this->assertEquals($expectedResponses, $responses); + $createStreamRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($createStreamRequests)); + $streamFuncCall = $createStreamRequests[0]->getFuncCall(); + $streamRequestObject = $createStreamRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.mediatranslation.v1beta1.SpeechTranslationService/StreamingTranslateSpeech', $streamFuncCall); + $this->assertNull($streamRequestObject); + $callObjects = $transport->popCallObjects(); + $this->assertSame(1, count($callObjects)); + $bidiCall = $callObjects[0]; + $writeRequests = $bidiCall->popReceivedCalls(); + $expectedRequests = []; + $expectedRequests[] = $request; + $expectedRequests[] = $request2; + $expectedRequests[] = $request3; + $this->assertEquals($expectedRequests, $writeRequests); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function streamingTranslateSpeechExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->setStreamingStatus($status); + $this->assertTrue($transport->isExhausted()); + $bidi = $gapicClient->streamingTranslateSpeech(); + $results = $bidi->closeWriteAndReadAll(); + try { + iterator_to_array($results); + // If the close stream method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/MediaTranslation/v1beta1/tests/Unit/V1beta1/SpeechTranslationServiceClientTest.php b/owl-bot-staging/MediaTranslation/v1beta1/tests/Unit/V1beta1/SpeechTranslationServiceClientTest.php new file mode 100644 index 000000000000..e6d617f07091 --- /dev/null +++ b/owl-bot-staging/MediaTranslation/v1beta1/tests/Unit/V1beta1/SpeechTranslationServiceClientTest.php @@ -0,0 +1,151 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return SpeechTranslationServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new SpeechTranslationServiceClient($options); + } + + /** @test */ + public function streamingTranslateSpeechTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new StreamingTranslateSpeechResponse(); + $transport->addResponse($expectedResponse); + $expectedResponse2 = new StreamingTranslateSpeechResponse(); + $transport->addResponse($expectedResponse2); + $expectedResponse3 = new StreamingTranslateSpeechResponse(); + $transport->addResponse($expectedResponse3); + // Mock request + $request = new StreamingTranslateSpeechRequest(); + $request2 = new StreamingTranslateSpeechRequest(); + $request3 = new StreamingTranslateSpeechRequest(); + $bidi = $gapicClient->streamingTranslateSpeech(); + $this->assertInstanceOf(BidiStream::class, $bidi); + $bidi->write($request); + $responses = []; + $responses[] = $bidi->read(); + $bidi->writeAll([ + $request2, + $request3, + ]); + foreach ($bidi->closeWriteAndReadAll() as $response) { + $responses[] = $response; + } + + $expectedResponses = []; + $expectedResponses[] = $expectedResponse; + $expectedResponses[] = $expectedResponse2; + $expectedResponses[] = $expectedResponse3; + $this->assertEquals($expectedResponses, $responses); + $createStreamRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($createStreamRequests)); + $streamFuncCall = $createStreamRequests[0]->getFuncCall(); + $streamRequestObject = $createStreamRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.mediatranslation.v1beta1.SpeechTranslationService/StreamingTranslateSpeech', $streamFuncCall); + $this->assertNull($streamRequestObject); + $callObjects = $transport->popCallObjects(); + $this->assertSame(1, count($callObjects)); + $bidiCall = $callObjects[0]; + $writeRequests = $bidiCall->popReceivedCalls(); + $expectedRequests = []; + $expectedRequests[] = $request; + $expectedRequests[] = $request2; + $expectedRequests[] = $request3; + $this->assertEquals($expectedRequests, $writeRequests); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function streamingTranslateSpeechExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->setStreamingStatus($status); + $this->assertTrue($transport->isExhausted()); + $bidi = $gapicClient->streamingTranslateSpeech(); + $results = $bidi->closeWriteAndReadAll(); + try { + iterator_to_array($results); + // If the close stream method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/Memcache/v1/proto/src/GPBMetadata/Google/Cloud/Memcache/V1/CloudMemcache.php b/owl-bot-staging/Memcache/v1/proto/src/GPBMetadata/Google/Cloud/Memcache/V1/CloudMemcache.php new file mode 100644 index 0000000000000000000000000000000000000000..b978df5fc7fe5c2b8af27fc93d70110acf0ca62e GIT binary patch literal 8216 zcmcIpO>i4o5k``o*sa)BUgAV?vg}0JB93vSwU%TPqmgVma+dhw(Y)?{ z{l5NxbN2&x$Av4(ieVd`9vCfUtE&V%hT?io;4~de+3K|0hNm>0UDvb>FRLh}nzB}_ zE9Fw9ei>PPr{gt^g0k&6+m?}QT27~x+ckEZdUMCfJzwH)H2EgWBm>y`uHn0S(@<8{ zm#apgxAZ`7tS}*sA{El83L%Y0OLqX8mhSrsTagR!0u=mnJ6o37RQx~>@ZUS8ubH+P zn7UBDGqlm>?dFiX9l9 zty_(f;Ws_g4IFPBNehK-BM6bCZ|1LwZK*i3t;};B3xxwp-ctgvV?=jX6we4co_&Yu zO$F?SPmMz`Q(d#6+O|VcaBRO&=$)x2Vi;r5G7UR89?t{Quv*K;j{e+qyyLNM7{Y5t zR&v#`x4n*SoA!32=2Blh-XTNVl{%bvbcI7!cHpY+KYI<{x{2-{=)3Ody!EbYG)j8c zY3~`vG4^D9bU&xv(z}Q6$6WjReN#BH+G>S<`vAjyKJ+x|cUR$;@5A+D#WzWF@+?aS z*)aH@FU_47f^^r!)Ii;ir-Zq;BMWWnTiTXzERQG*DS$2)Q~gmO{ZbJsQ_t7^juRNY601=H)I2qOa!#o0OjK znSt5x!0nD@h2RsE#@sJKs&LvA-if8$_w{YW~z}))@;~hqF;ZJ~kz-j%B3JF;Pdj zX++efU}A91sQ^9CCFfwW>2^d^(0CP5aglkEgU9nRwzS=?G>urkIQK~$#;6R8>XX#P zG_%!<^#l!n8hMOE;IB#xCs4}t$l;ZZm>H$+IDWvRn_C`VxsDfLgbURY1Mx${JefaM z{A4y^ob5_x;q+!*t(UcjYn$ukV&y@lTuOa`oPvqsMp>;_)>cw6G701Oqx2*drwgU> zYMCu0=&y(CB~CUr_p2Dp3_4L6#+nEoLvA|%{&265jG^}nH_R5P4QAk^@MsQr=01$E zg|m<<)=GowD{$#)ZLO@8Dx39<%JRc{rM8AATvk`rwIUucHg_G8(HxtE#51GI?MpDJ zKG&^|ux%lJE0%FS2VNmU46hKqF-+{|*2^0YY8zFAS*xm*wR(AtDwrBCH2232DD4aVux32Q$8kznhFd;ork?TrG@EyS;Bg-svf0Gwzo(-b8fUHnCfjo+XL#IN1i-m!*stSETR`T%A3Ux%cX~_ zWv%{XeK1u`!DOXc#X%jDFs9lIFuPX%dRdgKC;7Qei4J& zBI^{TI#S~2KspUci34pe*kQQq-HyZt_qq`P;)&yXsOdx2oepY>d0n)vbXsDLahNxU z6ZAnJ3=5n5K}}xQ3LQA7x~|pj4Fb{%uPKqB*NWcGNBrpsh3>D@Jv802 zSj10c{)9z?L;C;Qc)%DO*@Ibmz!?356ZeecHGV&h0g>Za?=;w7#rxaa4_N}ycjeG} zYj}Vj6qjX^eKx+*PAl@0ysFds5B4PC<&nH|930f%T-`eZC$O^P9U-&5XzZ~C$02Ad z+Lg~?alq-U<70IUbkpKFkA_TwyalNyoro;WP>W_Ic90KinpRQnIR)@RVK`Fv~D)=Dq=E4q59r(~W3DoXme| z_`X!S)SNZW({L*KZlMe_(qH6l05+<&QxD*N$Y|M7!(j$Ef#=`UPXc<+Us z`9h>4Ux;+#vmMrsr}B9bFyQr!{KaOUnym0eQx=|``ohG-WV6BhQ#_v0|#U-ZZk z81++1E#H!$MsEGGVSHykiG8Zp;PNXk#K^)>l2DlRyO-)kZh}QwUBd?~vkZ#cnd6zN z5Vor1hX_i4eLV`4e##L+`OO;vnR~}`0><9&1AmCaY;Qu0OvU8paD)zJ7!jw>-Uv?fGF2?%2hiS-jHC0S z())=sGXrilv(lGeMkzjpp4FohkSl!l>9UCKI{Yh500IPO8@`> literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/ApplyParametersRequest.php b/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/ApplyParametersRequest.php new file mode 100644 index 000000000000..e950bb56548d --- /dev/null +++ b/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/ApplyParametersRequest.php @@ -0,0 +1,168 @@ +google.cloud.memcache.v1.ApplyParametersRequest + */ +class ApplyParametersRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the Memcached instance for which parameter group updates + * should be applied. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Nodes to which the instance-level parameter group is applied. + * + * Generated from protobuf field repeated string node_ids = 2; + */ + private $node_ids; + /** + * Whether to apply instance-level parameter group to all nodes. If set to + * true, users are restricted from specifying individual nodes, and + * `ApplyParameters` updates all nodes within the instance. + * + * Generated from protobuf field bool apply_all = 3; + */ + protected $apply_all = false; + + /** + * @param string $name Required. Resource name of the Memcached instance for which parameter group updates + * should be applied. Please see + * {@see CloudMemcacheClient::instanceName()} for help formatting this field. + * @param string[] $nodeIds Nodes to which the instance-level parameter group is applied. + * @param bool $applyAll Whether to apply instance-level parameter group to all nodes. If set to + * true, users are restricted from specifying individual nodes, and + * `ApplyParameters` updates all nodes within the instance. + * + * @return \Google\Cloud\Memcache\V1\ApplyParametersRequest + * + * @experimental + */ + public static function build(string $name, array $nodeIds, bool $applyAll): self + { + return (new self()) + ->setName($name) + ->setNodeIds($nodeIds) + ->setApplyAll($applyAll); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Resource name of the Memcached instance for which parameter group updates + * should be applied. + * @type array|\Google\Protobuf\Internal\RepeatedField $node_ids + * Nodes to which the instance-level parameter group is applied. + * @type bool $apply_all + * Whether to apply instance-level parameter group to all nodes. If set to + * true, users are restricted from specifying individual nodes, and + * `ApplyParameters` updates all nodes within the instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Memcache\V1\CloudMemcache::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the Memcached instance for which parameter group updates + * should be applied. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Resource name of the Memcached instance for which parameter group updates + * should be applied. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Nodes to which the instance-level parameter group is applied. + * + * Generated from protobuf field repeated string node_ids = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNodeIds() + { + return $this->node_ids; + } + + /** + * Nodes to which the instance-level parameter group is applied. + * + * Generated from protobuf field repeated string node_ids = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNodeIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->node_ids = $arr; + + return $this; + } + + /** + * Whether to apply instance-level parameter group to all nodes. If set to + * true, users are restricted from specifying individual nodes, and + * `ApplyParameters` updates all nodes within the instance. + * + * Generated from protobuf field bool apply_all = 3; + * @return bool + */ + public function getApplyAll() + { + return $this->apply_all; + } + + /** + * Whether to apply instance-level parameter group to all nodes. If set to + * true, users are restricted from specifying individual nodes, and + * `ApplyParameters` updates all nodes within the instance. + * + * Generated from protobuf field bool apply_all = 3; + * @param bool $var + * @return $this + */ + public function setApplyAll($var) + { + GPBUtil::checkBool($var); + $this->apply_all = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/CreateInstanceRequest.php b/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/CreateInstanceRequest.php new file mode 100644 index 000000000000..0557bc075057 --- /dev/null +++ b/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/CreateInstanceRequest.php @@ -0,0 +1,210 @@ +google.cloud.memcache.v1.CreateInstanceRequest + */ +class CreateInstanceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the instance location using the form: + * `projects/{project_id}/locations/{location_id}` + * where `location_id` refers to a GCP region + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The logical name of the Memcached instance in the user + * project with the following restrictions: + * * Must contain only lowercase letters, numbers, and hyphens. + * * Must start with a letter. + * * Must be between 1-40 characters. + * * Must end with a number or a letter. + * * Must be unique within the user project / location. + * If any of the above are not met, the API raises an invalid argument error. + * + * Generated from protobuf field string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $instance_id = ''; + /** + * Required. A Memcached Instance + * + * Generated from protobuf field .google.cloud.memcache.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $instance = null; + + /** + * @param string $parent Required. The resource name of the instance location using the form: + * `projects/{project_id}/locations/{location_id}` + * where `location_id` refers to a GCP region + * Please see {@see CloudMemcacheClient::locationName()} for help formatting this field. + * @param \Google\Cloud\Memcache\V1\Instance $instance Required. A Memcached Instance + * @param string $instanceId Required. The logical name of the Memcached instance in the user + * project with the following restrictions: + * + * * Must contain only lowercase letters, numbers, and hyphens. + * * Must start with a letter. + * * Must be between 1-40 characters. + * * Must end with a number or a letter. + * * Must be unique within the user project / location. + * + * If any of the above are not met, the API raises an invalid argument error. + * + * @return \Google\Cloud\Memcache\V1\CreateInstanceRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Memcache\V1\Instance $instance, string $instanceId): self + { + return (new self()) + ->setParent($parent) + ->setInstance($instance) + ->setInstanceId($instanceId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name of the instance location using the form: + * `projects/{project_id}/locations/{location_id}` + * where `location_id` refers to a GCP region + * @type string $instance_id + * Required. The logical name of the Memcached instance in the user + * project with the following restrictions: + * * Must contain only lowercase letters, numbers, and hyphens. + * * Must start with a letter. + * * Must be between 1-40 characters. + * * Must end with a number or a letter. + * * Must be unique within the user project / location. + * If any of the above are not met, the API raises an invalid argument error. + * @type \Google\Cloud\Memcache\V1\Instance $instance + * Required. A Memcached Instance + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Memcache\V1\CloudMemcache::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the instance location using the form: + * `projects/{project_id}/locations/{location_id}` + * where `location_id` refers to a GCP region + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The resource name of the instance location using the form: + * `projects/{project_id}/locations/{location_id}` + * where `location_id` refers to a GCP region + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The logical name of the Memcached instance in the user + * project with the following restrictions: + * * Must contain only lowercase letters, numbers, and hyphens. + * * Must start with a letter. + * * Must be between 1-40 characters. + * * Must end with a number or a letter. + * * Must be unique within the user project / location. + * If any of the above are not met, the API raises an invalid argument error. + * + * Generated from protobuf field string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getInstanceId() + { + return $this->instance_id; + } + + /** + * Required. The logical name of the Memcached instance in the user + * project with the following restrictions: + * * Must contain only lowercase letters, numbers, and hyphens. + * * Must start with a letter. + * * Must be between 1-40 characters. + * * Must end with a number or a letter. + * * Must be unique within the user project / location. + * If any of the above are not met, the API raises an invalid argument error. + * + * Generated from protobuf field string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setInstanceId($var) + { + GPBUtil::checkString($var, True); + $this->instance_id = $var; + + return $this; + } + + /** + * Required. A Memcached Instance + * + * Generated from protobuf field .google.cloud.memcache.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Memcache\V1\Instance|null + */ + public function getInstance() + { + return $this->instance; + } + + public function hasInstance() + { + return isset($this->instance); + } + + public function clearInstance() + { + unset($this->instance); + } + + /** + * Required. A Memcached Instance + * + * Generated from protobuf field .google.cloud.memcache.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Memcache\V1\Instance $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Memcache\V1\Instance::class); + $this->instance = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/DeleteInstanceRequest.php b/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/DeleteInstanceRequest.php new file mode 100644 index 000000000000..b72fed64dd51 --- /dev/null +++ b/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/DeleteInstanceRequest.php @@ -0,0 +1,91 @@ +google.cloud.memcache.v1.DeleteInstanceRequest + */ +class DeleteInstanceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Memcached instance resource name in the format: + * `projects/{project_id}/locations/{location_id}/instances/{instance_id}` + * where `location_id` refers to a GCP region + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Memcached instance resource name in the format: + * `projects/{project_id}/locations/{location_id}/instances/{instance_id}` + * where `location_id` refers to a GCP region + * Please see {@see CloudMemcacheClient::instanceName()} for help formatting this field. + * + * @return \Google\Cloud\Memcache\V1\DeleteInstanceRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Memcached instance resource name in the format: + * `projects/{project_id}/locations/{location_id}/instances/{instance_id}` + * where `location_id` refers to a GCP region + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Memcache\V1\CloudMemcache::initOnce(); + parent::__construct($data); + } + + /** + * Required. Memcached instance resource name in the format: + * `projects/{project_id}/locations/{location_id}/instances/{instance_id}` + * where `location_id` refers to a GCP region + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Memcached instance resource name in the format: + * `projects/{project_id}/locations/{location_id}/instances/{instance_id}` + * where `location_id` refers to a GCP region + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/GetInstanceRequest.php b/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/GetInstanceRequest.php new file mode 100644 index 000000000000..68579a961bf6 --- /dev/null +++ b/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/GetInstanceRequest.php @@ -0,0 +1,91 @@ +google.cloud.memcache.v1.GetInstanceRequest + */ +class GetInstanceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Memcached instance resource name in the format: + * `projects/{project_id}/locations/{location_id}/instances/{instance_id}` + * where `location_id` refers to a GCP region + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Memcached instance resource name in the format: + * `projects/{project_id}/locations/{location_id}/instances/{instance_id}` + * where `location_id` refers to a GCP region + * Please see {@see CloudMemcacheClient::instanceName()} for help formatting this field. + * + * @return \Google\Cloud\Memcache\V1\GetInstanceRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Memcached instance resource name in the format: + * `projects/{project_id}/locations/{location_id}/instances/{instance_id}` + * where `location_id` refers to a GCP region + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Memcache\V1\CloudMemcache::initOnce(); + parent::__construct($data); + } + + /** + * Required. Memcached instance resource name in the format: + * `projects/{project_id}/locations/{location_id}/instances/{instance_id}` + * where `location_id` refers to a GCP region + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Memcached instance resource name in the format: + * `projects/{project_id}/locations/{location_id}/instances/{instance_id}` + * where `location_id` refers to a GCP region + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/Instance.php b/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/Instance.php new file mode 100644 index 000000000000..ae899b8ef090 --- /dev/null +++ b/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/Instance.php @@ -0,0 +1,809 @@ +google.cloud.memcache.v1.Instance + */ +class Instance extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Unique name of the resource in this scope including project and + * location using the form: + * `projects/{project_id}/locations/{location_id}/instances/{instance_id}` + * Note: Memcached instances are managed and addressed at the regional level + * so `location_id` here refers to a Google Cloud region; however, users may + * choose which zones Memcached nodes should be provisioned in within an + * instance. Refer to [zones][google.cloud.memcache.v1.Instance.zones] field for more details. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * User provided name for the instance, which is only used for display + * purposes. Cannot be more than 80 characters. + * + * Generated from protobuf field string display_name = 2; + */ + protected $display_name = ''; + /** + * Resource labels to represent user-provided metadata. + * Refer to cloud documentation on labels for more details. + * https://cloud.google.com/compute/docs/labeling-resources + * + * Generated from protobuf field map labels = 3; + */ + private $labels; + /** + * The full name of the Google Compute Engine + * [network](/compute/docs/networks-and-firewalls#networks) to which the + * instance is connected. If left unspecified, the `default` network + * will be used. + * + * Generated from protobuf field string authorized_network = 4; + */ + protected $authorized_network = ''; + /** + * Zones in which Memcached nodes should be provisioned. + * Memcached nodes will be equally distributed across these zones. If not + * provided, the service will by default create nodes in all zones in the + * region for the instance. + * + * Generated from protobuf field repeated string zones = 5; + */ + private $zones; + /** + * Required. Number of nodes in the Memcached instance. + * + * Generated from protobuf field int32 node_count = 6 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $node_count = 0; + /** + * Required. Configuration for Memcached nodes. + * + * Generated from protobuf field .google.cloud.memcache.v1.Instance.NodeConfig node_config = 7 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $node_config = null; + /** + * The major version of Memcached software. + * If not provided, latest supported version will be used. Currently the + * latest supported major version is `MEMCACHE_1_5`. + * The minor version will be automatically determined by our system based on + * the latest supported minor version. + * + * Generated from protobuf field .google.cloud.memcache.v1.MemcacheVersion memcache_version = 9; + */ + protected $memcache_version = 0; + /** + * User defined parameters to apply to the memcached process + * on each node. + * + * Generated from protobuf field .google.cloud.memcache.v1.MemcacheParameters parameters = 11; + */ + protected $parameters = null; + /** + * Output only. List of Memcached nodes. + * Refer to [Node][google.cloud.memcache.v1.Instance.Node] message for more details. + * + * Generated from protobuf field repeated .google.cloud.memcache.v1.Instance.Node memcache_nodes = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $memcache_nodes; + /** + * Output only. The time the instance was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The time the instance was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Output only. The state of this Memcached instance. + * + * Generated from protobuf field .google.cloud.memcache.v1.Instance.State state = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. The full version of memcached server running on this instance. + * System automatically determines the full memcached version for an instance + * based on the input MemcacheVersion. + * The full version format will be "memcached-1.5.16". + * + * Generated from protobuf field string memcache_full_version = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $memcache_full_version = ''; + /** + * List of messages that describe the current state of the Memcached instance. + * + * Generated from protobuf field repeated .google.cloud.memcache.v1.Instance.InstanceMessage instance_messages = 19; + */ + private $instance_messages; + /** + * Output only. Endpoint for the Discovery API. + * + * Generated from protobuf field string discovery_endpoint = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $discovery_endpoint = ''; + /** + * The maintenance policy for the instance. If not provided, + * the maintenance event will be performed based on Memorystore + * internal rollout schedule. + * + * Generated from protobuf field .google.cloud.memcache.v1.MaintenancePolicy maintenance_policy = 21; + */ + protected $maintenance_policy = null; + /** + * Output only. Published maintenance schedule. + * + * Generated from protobuf field .google.cloud.memcache.v1.MaintenanceSchedule maintenance_schedule = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $maintenance_schedule = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Unique name of the resource in this scope including project and + * location using the form: + * `projects/{project_id}/locations/{location_id}/instances/{instance_id}` + * Note: Memcached instances are managed and addressed at the regional level + * so `location_id` here refers to a Google Cloud region; however, users may + * choose which zones Memcached nodes should be provisioned in within an + * instance. Refer to [zones][google.cloud.memcache.v1.Instance.zones] field for more details. + * @type string $display_name + * User provided name for the instance, which is only used for display + * purposes. Cannot be more than 80 characters. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Resource labels to represent user-provided metadata. + * Refer to cloud documentation on labels for more details. + * https://cloud.google.com/compute/docs/labeling-resources + * @type string $authorized_network + * The full name of the Google Compute Engine + * [network](/compute/docs/networks-and-firewalls#networks) to which the + * instance is connected. If left unspecified, the `default` network + * will be used. + * @type array|\Google\Protobuf\Internal\RepeatedField $zones + * Zones in which Memcached nodes should be provisioned. + * Memcached nodes will be equally distributed across these zones. If not + * provided, the service will by default create nodes in all zones in the + * region for the instance. + * @type int $node_count + * Required. Number of nodes in the Memcached instance. + * @type \Google\Cloud\Memcache\V1\Instance\NodeConfig $node_config + * Required. Configuration for Memcached nodes. + * @type int $memcache_version + * The major version of Memcached software. + * If not provided, latest supported version will be used. Currently the + * latest supported major version is `MEMCACHE_1_5`. + * The minor version will be automatically determined by our system based on + * the latest supported minor version. + * @type \Google\Cloud\Memcache\V1\MemcacheParameters $parameters + * User defined parameters to apply to the memcached process + * on each node. + * @type array<\Google\Cloud\Memcache\V1\Instance\Node>|\Google\Protobuf\Internal\RepeatedField $memcache_nodes + * Output only. List of Memcached nodes. + * Refer to [Node][google.cloud.memcache.v1.Instance.Node] message for more details. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time the instance was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The time the instance was updated. + * @type int $state + * Output only. The state of this Memcached instance. + * @type string $memcache_full_version + * Output only. The full version of memcached server running on this instance. + * System automatically determines the full memcached version for an instance + * based on the input MemcacheVersion. + * The full version format will be "memcached-1.5.16". + * @type array<\Google\Cloud\Memcache\V1\Instance\InstanceMessage>|\Google\Protobuf\Internal\RepeatedField $instance_messages + * List of messages that describe the current state of the Memcached instance. + * @type string $discovery_endpoint + * Output only. Endpoint for the Discovery API. + * @type \Google\Cloud\Memcache\V1\MaintenancePolicy $maintenance_policy + * The maintenance policy for the instance. If not provided, + * the maintenance event will be performed based on Memorystore + * internal rollout schedule. + * @type \Google\Cloud\Memcache\V1\MaintenanceSchedule $maintenance_schedule + * Output only. Published maintenance schedule. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Memcache\V1\CloudMemcache::initOnce(); + parent::__construct($data); + } + + /** + * Required. Unique name of the resource in this scope including project and + * location using the form: + * `projects/{project_id}/locations/{location_id}/instances/{instance_id}` + * Note: Memcached instances are managed and addressed at the regional level + * so `location_id` here refers to a Google Cloud region; however, users may + * choose which zones Memcached nodes should be provisioned in within an + * instance. Refer to [zones][google.cloud.memcache.v1.Instance.zones] field for more details. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Unique name of the resource in this scope including project and + * location using the form: + * `projects/{project_id}/locations/{location_id}/instances/{instance_id}` + * Note: Memcached instances are managed and addressed at the regional level + * so `location_id` here refers to a Google Cloud region; however, users may + * choose which zones Memcached nodes should be provisioned in within an + * instance. Refer to [zones][google.cloud.memcache.v1.Instance.zones] field for more details. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * User provided name for the instance, which is only used for display + * purposes. Cannot be more than 80 characters. + * + * Generated from protobuf field string display_name = 2; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * User provided name for the instance, which is only used for display + * purposes. Cannot be more than 80 characters. + * + * Generated from protobuf field string display_name = 2; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Resource labels to represent user-provided metadata. + * Refer to cloud documentation on labels for more details. + * https://cloud.google.com/compute/docs/labeling-resources + * + * Generated from protobuf field map labels = 3; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Resource labels to represent user-provided metadata. + * Refer to cloud documentation on labels for more details. + * https://cloud.google.com/compute/docs/labeling-resources + * + * Generated from protobuf field map labels = 3; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * The full name of the Google Compute Engine + * [network](/compute/docs/networks-and-firewalls#networks) to which the + * instance is connected. If left unspecified, the `default` network + * will be used. + * + * Generated from protobuf field string authorized_network = 4; + * @return string + */ + public function getAuthorizedNetwork() + { + return $this->authorized_network; + } + + /** + * The full name of the Google Compute Engine + * [network](/compute/docs/networks-and-firewalls#networks) to which the + * instance is connected. If left unspecified, the `default` network + * will be used. + * + * Generated from protobuf field string authorized_network = 4; + * @param string $var + * @return $this + */ + public function setAuthorizedNetwork($var) + { + GPBUtil::checkString($var, True); + $this->authorized_network = $var; + + return $this; + } + + /** + * Zones in which Memcached nodes should be provisioned. + * Memcached nodes will be equally distributed across these zones. If not + * provided, the service will by default create nodes in all zones in the + * region for the instance. + * + * Generated from protobuf field repeated string zones = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getZones() + { + return $this->zones; + } + + /** + * Zones in which Memcached nodes should be provisioned. + * Memcached nodes will be equally distributed across these zones. If not + * provided, the service will by default create nodes in all zones in the + * region for the instance. + * + * Generated from protobuf field repeated string zones = 5; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setZones($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->zones = $arr; + + return $this; + } + + /** + * Required. Number of nodes in the Memcached instance. + * + * Generated from protobuf field int32 node_count = 6 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getNodeCount() + { + return $this->node_count; + } + + /** + * Required. Number of nodes in the Memcached instance. + * + * Generated from protobuf field int32 node_count = 6 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setNodeCount($var) + { + GPBUtil::checkInt32($var); + $this->node_count = $var; + + return $this; + } + + /** + * Required. Configuration for Memcached nodes. + * + * Generated from protobuf field .google.cloud.memcache.v1.Instance.NodeConfig node_config = 7 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Memcache\V1\Instance\NodeConfig|null + */ + public function getNodeConfig() + { + return $this->node_config; + } + + public function hasNodeConfig() + { + return isset($this->node_config); + } + + public function clearNodeConfig() + { + unset($this->node_config); + } + + /** + * Required. Configuration for Memcached nodes. + * + * Generated from protobuf field .google.cloud.memcache.v1.Instance.NodeConfig node_config = 7 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Memcache\V1\Instance\NodeConfig $var + * @return $this + */ + public function setNodeConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Memcache\V1\Instance\NodeConfig::class); + $this->node_config = $var; + + return $this; + } + + /** + * The major version of Memcached software. + * If not provided, latest supported version will be used. Currently the + * latest supported major version is `MEMCACHE_1_5`. + * The minor version will be automatically determined by our system based on + * the latest supported minor version. + * + * Generated from protobuf field .google.cloud.memcache.v1.MemcacheVersion memcache_version = 9; + * @return int + */ + public function getMemcacheVersion() + { + return $this->memcache_version; + } + + /** + * The major version of Memcached software. + * If not provided, latest supported version will be used. Currently the + * latest supported major version is `MEMCACHE_1_5`. + * The minor version will be automatically determined by our system based on + * the latest supported minor version. + * + * Generated from protobuf field .google.cloud.memcache.v1.MemcacheVersion memcache_version = 9; + * @param int $var + * @return $this + */ + public function setMemcacheVersion($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Memcache\V1\MemcacheVersion::class); + $this->memcache_version = $var; + + return $this; + } + + /** + * User defined parameters to apply to the memcached process + * on each node. + * + * Generated from protobuf field .google.cloud.memcache.v1.MemcacheParameters parameters = 11; + * @return \Google\Cloud\Memcache\V1\MemcacheParameters|null + */ + public function getParameters() + { + return $this->parameters; + } + + public function hasParameters() + { + return isset($this->parameters); + } + + public function clearParameters() + { + unset($this->parameters); + } + + /** + * User defined parameters to apply to the memcached process + * on each node. + * + * Generated from protobuf field .google.cloud.memcache.v1.MemcacheParameters parameters = 11; + * @param \Google\Cloud\Memcache\V1\MemcacheParameters $var + * @return $this + */ + public function setParameters($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Memcache\V1\MemcacheParameters::class); + $this->parameters = $var; + + return $this; + } + + /** + * Output only. List of Memcached nodes. + * Refer to [Node][google.cloud.memcache.v1.Instance.Node] message for more details. + * + * Generated from protobuf field repeated .google.cloud.memcache.v1.Instance.Node memcache_nodes = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMemcacheNodes() + { + return $this->memcache_nodes; + } + + /** + * Output only. List of Memcached nodes. + * Refer to [Node][google.cloud.memcache.v1.Instance.Node] message for more details. + * + * Generated from protobuf field repeated .google.cloud.memcache.v1.Instance.Node memcache_nodes = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\Memcache\V1\Instance\Node>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMemcacheNodes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Memcache\V1\Instance\Node::class); + $this->memcache_nodes = $arr; + + return $this; + } + + /** + * Output only. The time the instance was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The time the instance was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The time the instance was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The time the instance was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Output only. The state of this Memcached instance. + * + * Generated from protobuf field .google.cloud.memcache.v1.Instance.State state = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The state of this Memcached instance. + * + * Generated from protobuf field .google.cloud.memcache.v1.Instance.State state = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Memcache\V1\Instance\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. The full version of memcached server running on this instance. + * System automatically determines the full memcached version for an instance + * based on the input MemcacheVersion. + * The full version format will be "memcached-1.5.16". + * + * Generated from protobuf field string memcache_full_version = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getMemcacheFullVersion() + { + return $this->memcache_full_version; + } + + /** + * Output only. The full version of memcached server running on this instance. + * System automatically determines the full memcached version for an instance + * based on the input MemcacheVersion. + * The full version format will be "memcached-1.5.16". + * + * Generated from protobuf field string memcache_full_version = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setMemcacheFullVersion($var) + { + GPBUtil::checkString($var, True); + $this->memcache_full_version = $var; + + return $this; + } + + /** + * List of messages that describe the current state of the Memcached instance. + * + * Generated from protobuf field repeated .google.cloud.memcache.v1.Instance.InstanceMessage instance_messages = 19; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getInstanceMessages() + { + return $this->instance_messages; + } + + /** + * List of messages that describe the current state of the Memcached instance. + * + * Generated from protobuf field repeated .google.cloud.memcache.v1.Instance.InstanceMessage instance_messages = 19; + * @param array<\Google\Cloud\Memcache\V1\Instance\InstanceMessage>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setInstanceMessages($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Memcache\V1\Instance\InstanceMessage::class); + $this->instance_messages = $arr; + + return $this; + } + + /** + * Output only. Endpoint for the Discovery API. + * + * Generated from protobuf field string discovery_endpoint = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDiscoveryEndpoint() + { + return $this->discovery_endpoint; + } + + /** + * Output only. Endpoint for the Discovery API. + * + * Generated from protobuf field string discovery_endpoint = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setDiscoveryEndpoint($var) + { + GPBUtil::checkString($var, True); + $this->discovery_endpoint = $var; + + return $this; + } + + /** + * The maintenance policy for the instance. If not provided, + * the maintenance event will be performed based on Memorystore + * internal rollout schedule. + * + * Generated from protobuf field .google.cloud.memcache.v1.MaintenancePolicy maintenance_policy = 21; + * @return \Google\Cloud\Memcache\V1\MaintenancePolicy|null + */ + public function getMaintenancePolicy() + { + return $this->maintenance_policy; + } + + public function hasMaintenancePolicy() + { + return isset($this->maintenance_policy); + } + + public function clearMaintenancePolicy() + { + unset($this->maintenance_policy); + } + + /** + * The maintenance policy for the instance. If not provided, + * the maintenance event will be performed based on Memorystore + * internal rollout schedule. + * + * Generated from protobuf field .google.cloud.memcache.v1.MaintenancePolicy maintenance_policy = 21; + * @param \Google\Cloud\Memcache\V1\MaintenancePolicy $var + * @return $this + */ + public function setMaintenancePolicy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Memcache\V1\MaintenancePolicy::class); + $this->maintenance_policy = $var; + + return $this; + } + + /** + * Output only. Published maintenance schedule. + * + * Generated from protobuf field .google.cloud.memcache.v1.MaintenanceSchedule maintenance_schedule = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Memcache\V1\MaintenanceSchedule|null + */ + public function getMaintenanceSchedule() + { + return $this->maintenance_schedule; + } + + public function hasMaintenanceSchedule() + { + return isset($this->maintenance_schedule); + } + + public function clearMaintenanceSchedule() + { + unset($this->maintenance_schedule); + } + + /** + * Output only. Published maintenance schedule. + * + * Generated from protobuf field .google.cloud.memcache.v1.MaintenanceSchedule maintenance_schedule = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Memcache\V1\MaintenanceSchedule $var + * @return $this + */ + public function setMaintenanceSchedule($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Memcache\V1\MaintenanceSchedule::class); + $this->maintenance_schedule = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/Instance/InstanceMessage.php b/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/Instance/InstanceMessage.php new file mode 100644 index 000000000000..981abe10b8b6 --- /dev/null +++ b/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/Instance/InstanceMessage.php @@ -0,0 +1,102 @@ +google.cloud.memcache.v1.Instance.InstanceMessage + */ +class InstanceMessage extends \Google\Protobuf\Internal\Message +{ + /** + * A code that correspond to one type of user-facing message. + * + * Generated from protobuf field .google.cloud.memcache.v1.Instance.InstanceMessage.Code code = 1; + */ + protected $code = 0; + /** + * Message on memcached instance which will be exposed to users. + * + * Generated from protobuf field string message = 2; + */ + protected $message = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $code + * A code that correspond to one type of user-facing message. + * @type string $message + * Message on memcached instance which will be exposed to users. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Memcache\V1\CloudMemcache::initOnce(); + parent::__construct($data); + } + + /** + * A code that correspond to one type of user-facing message. + * + * Generated from protobuf field .google.cloud.memcache.v1.Instance.InstanceMessage.Code code = 1; + * @return int + */ + public function getCode() + { + return $this->code; + } + + /** + * A code that correspond to one type of user-facing message. + * + * Generated from protobuf field .google.cloud.memcache.v1.Instance.InstanceMessage.Code code = 1; + * @param int $var + * @return $this + */ + public function setCode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Memcache\V1\Instance\InstanceMessage\Code::class); + $this->code = $var; + + return $this; + } + + /** + * Message on memcached instance which will be exposed to users. + * + * Generated from protobuf field string message = 2; + * @return string + */ + public function getMessage() + { + return $this->message; + } + + /** + * Message on memcached instance which will be exposed to users. + * + * Generated from protobuf field string message = 2; + * @param string $var + * @return $this + */ + public function setMessage($var) + { + GPBUtil::checkString($var, True); + $this->message = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(InstanceMessage::class, \Google\Cloud\Memcache\V1\Instance_InstanceMessage::class); + diff --git a/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/Instance/InstanceMessage/Code.php b/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/Instance/InstanceMessage/Code.php new file mode 100644 index 000000000000..e0f20c3adb3f --- /dev/null +++ b/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/Instance/InstanceMessage/Code.php @@ -0,0 +1,55 @@ +google.cloud.memcache.v1.Instance.InstanceMessage.Code + */ +class Code +{ + /** + * Message Code not set. + * + * Generated from protobuf enum CODE_UNSPECIFIED = 0; + */ + const CODE_UNSPECIFIED = 0; + /** + * Memcached nodes are distributed unevenly. + * + * Generated from protobuf enum ZONE_DISTRIBUTION_UNBALANCED = 1; + */ + const ZONE_DISTRIBUTION_UNBALANCED = 1; + + private static $valueToName = [ + self::CODE_UNSPECIFIED => 'CODE_UNSPECIFIED', + self::ZONE_DISTRIBUTION_UNBALANCED => 'ZONE_DISTRIBUTION_UNBALANCED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Code::class, \Google\Cloud\Memcache\V1\Instance_InstanceMessage_Code::class); + diff --git a/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/Instance/Node.php b/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/Instance/Node.php new file mode 100644 index 000000000000..85f5a875b821 --- /dev/null +++ b/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/Instance/Node.php @@ -0,0 +1,256 @@ +google.cloud.memcache.v1.Instance.Node + */ +class Node extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Identifier of the Memcached node. The node id does not + * include project or location like the Memcached instance name. + * + * Generated from protobuf field string node_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $node_id = ''; + /** + * Output only. Location (GCP Zone) for the Memcached node. + * + * Generated from protobuf field string zone = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $zone = ''; + /** + * Output only. Current state of the Memcached node. + * + * Generated from protobuf field .google.cloud.memcache.v1.Instance.Node.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. Hostname or IP address of the Memcached node used by the + * clients to connect to the Memcached server on this node. + * + * Generated from protobuf field string host = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $host = ''; + /** + * Output only. The port number of the Memcached server on this node. + * + * Generated from protobuf field int32 port = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $port = 0; + /** + * User defined parameters currently applied to the node. + * + * Generated from protobuf field .google.cloud.memcache.v1.MemcacheParameters parameters = 6; + */ + protected $parameters = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $node_id + * Output only. Identifier of the Memcached node. The node id does not + * include project or location like the Memcached instance name. + * @type string $zone + * Output only. Location (GCP Zone) for the Memcached node. + * @type int $state + * Output only. Current state of the Memcached node. + * @type string $host + * Output only. Hostname or IP address of the Memcached node used by the + * clients to connect to the Memcached server on this node. + * @type int $port + * Output only. The port number of the Memcached server on this node. + * @type \Google\Cloud\Memcache\V1\MemcacheParameters $parameters + * User defined parameters currently applied to the node. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Memcache\V1\CloudMemcache::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Identifier of the Memcached node. The node id does not + * include project or location like the Memcached instance name. + * + * Generated from protobuf field string node_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getNodeId() + { + return $this->node_id; + } + + /** + * Output only. Identifier of the Memcached node. The node id does not + * include project or location like the Memcached instance name. + * + * Generated from protobuf field string node_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setNodeId($var) + { + GPBUtil::checkString($var, True); + $this->node_id = $var; + + return $this; + } + + /** + * Output only. Location (GCP Zone) for the Memcached node. + * + * Generated from protobuf field string zone = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getZone() + { + return $this->zone; + } + + /** + * Output only. Location (GCP Zone) for the Memcached node. + * + * Generated from protobuf field string zone = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setZone($var) + { + GPBUtil::checkString($var, True); + $this->zone = $var; + + return $this; + } + + /** + * Output only. Current state of the Memcached node. + * + * Generated from protobuf field .google.cloud.memcache.v1.Instance.Node.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. Current state of the Memcached node. + * + * Generated from protobuf field .google.cloud.memcache.v1.Instance.Node.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Memcache\V1\Instance\Node\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. Hostname or IP address of the Memcached node used by the + * clients to connect to the Memcached server on this node. + * + * Generated from protobuf field string host = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getHost() + { + return $this->host; + } + + /** + * Output only. Hostname or IP address of the Memcached node used by the + * clients to connect to the Memcached server on this node. + * + * Generated from protobuf field string host = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setHost($var) + { + GPBUtil::checkString($var, True); + $this->host = $var; + + return $this; + } + + /** + * Output only. The port number of the Memcached server on this node. + * + * Generated from protobuf field int32 port = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getPort() + { + return $this->port; + } + + /** + * Output only. The port number of the Memcached server on this node. + * + * Generated from protobuf field int32 port = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setPort($var) + { + GPBUtil::checkInt32($var); + $this->port = $var; + + return $this; + } + + /** + * User defined parameters currently applied to the node. + * + * Generated from protobuf field .google.cloud.memcache.v1.MemcacheParameters parameters = 6; + * @return \Google\Cloud\Memcache\V1\MemcacheParameters|null + */ + public function getParameters() + { + return $this->parameters; + } + + public function hasParameters() + { + return isset($this->parameters); + } + + public function clearParameters() + { + unset($this->parameters); + } + + /** + * User defined parameters currently applied to the node. + * + * Generated from protobuf field .google.cloud.memcache.v1.MemcacheParameters parameters = 6; + * @param \Google\Cloud\Memcache\V1\MemcacheParameters $var + * @return $this + */ + public function setParameters($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Memcache\V1\MemcacheParameters::class); + $this->parameters = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Node::class, \Google\Cloud\Memcache\V1\Instance_Node::class); + diff --git a/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/Instance/Node/State.php b/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/Instance/Node/State.php new file mode 100644 index 000000000000..b93e40ce84be --- /dev/null +++ b/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/Instance/Node/State.php @@ -0,0 +1,78 @@ +google.cloud.memcache.v1.Instance.Node.State + */ +class State +{ + /** + * Node state is not set. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Node is being created. + * + * Generated from protobuf enum CREATING = 1; + */ + const CREATING = 1; + /** + * Node has been created and ready to be used. + * + * Generated from protobuf enum READY = 2; + */ + const READY = 2; + /** + * Node is being deleted. + * + * Generated from protobuf enum DELETING = 3; + */ + const DELETING = 3; + /** + * Node is being updated. + * + * Generated from protobuf enum UPDATING = 4; + */ + const UPDATING = 4; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::CREATING => 'CREATING', + self::READY => 'READY', + self::DELETING => 'DELETING', + self::UPDATING => 'UPDATING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\Memcache\V1\Instance_Node_State::class); + diff --git a/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/Instance/NodeConfig.php b/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/Instance/NodeConfig.php new file mode 100644 index 000000000000..042d6658735f --- /dev/null +++ b/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/Instance/NodeConfig.php @@ -0,0 +1,104 @@ +google.cloud.memcache.v1.Instance.NodeConfig + */ +class NodeConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Number of cpus per Memcached node. + * + * Generated from protobuf field int32 cpu_count = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $cpu_count = 0; + /** + * Required. Memory size in MiB for each Memcached node. + * + * Generated from protobuf field int32 memory_size_mb = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $memory_size_mb = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $cpu_count + * Required. Number of cpus per Memcached node. + * @type int $memory_size_mb + * Required. Memory size in MiB for each Memcached node. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Memcache\V1\CloudMemcache::initOnce(); + parent::__construct($data); + } + + /** + * Required. Number of cpus per Memcached node. + * + * Generated from protobuf field int32 cpu_count = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getCpuCount() + { + return $this->cpu_count; + } + + /** + * Required. Number of cpus per Memcached node. + * + * Generated from protobuf field int32 cpu_count = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setCpuCount($var) + { + GPBUtil::checkInt32($var); + $this->cpu_count = $var; + + return $this; + } + + /** + * Required. Memory size in MiB for each Memcached node. + * + * Generated from protobuf field int32 memory_size_mb = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getMemorySizeMb() + { + return $this->memory_size_mb; + } + + /** + * Required. Memory size in MiB for each Memcached node. + * + * Generated from protobuf field int32 memory_size_mb = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setMemorySizeMb($var) + { + GPBUtil::checkInt32($var); + $this->memory_size_mb = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(NodeConfig::class, \Google\Cloud\Memcache\V1\Instance_NodeConfig::class); + diff --git a/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/Instance/State.php b/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/Instance/State.php new file mode 100644 index 000000000000..bd965a0eb907 --- /dev/null +++ b/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/Instance/State.php @@ -0,0 +1,86 @@ +google.cloud.memcache.v1.Instance.State + */ +class State +{ + /** + * State not set. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Memcached instance is being created. + * + * Generated from protobuf enum CREATING = 1; + */ + const CREATING = 1; + /** + * Memcached instance has been created and ready to be used. + * + * Generated from protobuf enum READY = 2; + */ + const READY = 2; + /** + * Memcached instance is updating configuration such as maintenance policy + * and schedule. + * + * Generated from protobuf enum UPDATING = 3; + */ + const UPDATING = 3; + /** + * Memcached instance is being deleted. + * + * Generated from protobuf enum DELETING = 4; + */ + const DELETING = 4; + /** + * Memcached instance is going through maintenance, e.g. data plane rollout. + * + * Generated from protobuf enum PERFORMING_MAINTENANCE = 5; + */ + const PERFORMING_MAINTENANCE = 5; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::CREATING => 'CREATING', + self::READY => 'READY', + self::UPDATING => 'UPDATING', + self::DELETING => 'DELETING', + self::PERFORMING_MAINTENANCE => 'PERFORMING_MAINTENANCE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\Memcache\V1\Instance_State::class); + diff --git a/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/ListInstancesRequest.php b/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/ListInstancesRequest.php new file mode 100644 index 000000000000..8a5c9bb572c6 --- /dev/null +++ b/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/ListInstancesRequest.php @@ -0,0 +1,251 @@ +google.cloud.memcache.v1.ListInstancesRequest + */ +class ListInstancesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the instance location using the form: + * `projects/{project_id}/locations/{location_id}` + * where `location_id` refers to a GCP region + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of items to return. + * If not specified, a default value of 1000 will be used by the service. + * Regardless of the `page_size` value, the response may include a partial + * list and a caller should only rely on response's + * [`next_page_token`][google.cloud.memcache.v1.ListInstancesResponse.next_page_token] + * to determine if there are more instances left to be queried. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The `next_page_token` value returned from a previous List request, if any. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * List filter. For example, exclude all Memcached instances with name as + * my-instance by specifying `"name != my-instance"`. + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + /** + * Sort results. Supported values are "name", "name desc" or "" (unsorted). + * + * Generated from protobuf field string order_by = 5; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The resource name of the instance location using the form: + * `projects/{project_id}/locations/{location_id}` + * where `location_id` refers to a GCP region + * Please see {@see CloudMemcacheClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\Memcache\V1\ListInstancesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name of the instance location using the form: + * `projects/{project_id}/locations/{location_id}` + * where `location_id` refers to a GCP region + * @type int $page_size + * The maximum number of items to return. + * If not specified, a default value of 1000 will be used by the service. + * Regardless of the `page_size` value, the response may include a partial + * list and a caller should only rely on response's + * [`next_page_token`][google.cloud.memcache.v1.ListInstancesResponse.next_page_token] + * to determine if there are more instances left to be queried. + * @type string $page_token + * The `next_page_token` value returned from a previous List request, if any. + * @type string $filter + * List filter. For example, exclude all Memcached instances with name as + * my-instance by specifying `"name != my-instance"`. + * @type string $order_by + * Sort results. Supported values are "name", "name desc" or "" (unsorted). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Memcache\V1\CloudMemcache::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the instance location using the form: + * `projects/{project_id}/locations/{location_id}` + * where `location_id` refers to a GCP region + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The resource name of the instance location using the form: + * `projects/{project_id}/locations/{location_id}` + * where `location_id` refers to a GCP region + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The maximum number of items to return. + * If not specified, a default value of 1000 will be used by the service. + * Regardless of the `page_size` value, the response may include a partial + * list and a caller should only rely on response's + * [`next_page_token`][google.cloud.memcache.v1.ListInstancesResponse.next_page_token] + * to determine if there are more instances left to be queried. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of items to return. + * If not specified, a default value of 1000 will be used by the service. + * Regardless of the `page_size` value, the response may include a partial + * list and a caller should only rely on response's + * [`next_page_token`][google.cloud.memcache.v1.ListInstancesResponse.next_page_token] + * to determine if there are more instances left to be queried. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The `next_page_token` value returned from a previous List request, if any. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The `next_page_token` value returned from a previous List request, if any. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * List filter. For example, exclude all Memcached instances with name as + * my-instance by specifying `"name != my-instance"`. + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * List filter. For example, exclude all Memcached instances with name as + * my-instance by specifying `"name != my-instance"`. + * + * Generated from protobuf field string filter = 4; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Sort results. Supported values are "name", "name desc" or "" (unsorted). + * + * Generated from protobuf field string order_by = 5; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Sort results. Supported values are "name", "name desc" or "" (unsorted). + * + * Generated from protobuf field string order_by = 5; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/ListInstancesResponse.php b/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/ListInstancesResponse.php new file mode 100644 index 000000000000..baa54f4cd391 --- /dev/null +++ b/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/ListInstancesResponse.php @@ -0,0 +1,151 @@ +google.cloud.memcache.v1.ListInstancesResponse + */ +class ListInstancesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of Memcached instances in the project in the specified location, + * or across all locations. + * If the `location_id` in the parent field of the request is "-", all regions + * available to the project are queried, and the results aggregated. + * + * Generated from protobuf field repeated .google.cloud.memcache.v1.Instance instances = 1; + */ + private $instances; + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Memcache\V1\Instance>|\Google\Protobuf\Internal\RepeatedField $instances + * A list of Memcached instances in the project in the specified location, + * or across all locations. + * If the `location_id` in the parent field of the request is "-", all regions + * available to the project are queried, and the results aggregated. + * @type string $next_page_token + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Memcache\V1\CloudMemcache::initOnce(); + parent::__construct($data); + } + + /** + * A list of Memcached instances in the project in the specified location, + * or across all locations. + * If the `location_id` in the parent field of the request is "-", all regions + * available to the project are queried, and the results aggregated. + * + * Generated from protobuf field repeated .google.cloud.memcache.v1.Instance instances = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getInstances() + { + return $this->instances; + } + + /** + * A list of Memcached instances in the project in the specified location, + * or across all locations. + * If the `location_id` in the parent field of the request is "-", all regions + * available to the project are queried, and the results aggregated. + * + * Generated from protobuf field repeated .google.cloud.memcache.v1.Instance instances = 1; + * @param array<\Google\Cloud\Memcache\V1\Instance>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setInstances($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Memcache\V1\Instance::class); + $this->instances = $arr; + + return $this; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/LocationMetadata.php b/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/LocationMetadata.php new file mode 100644 index 000000000000..43b01dbbb3d6 --- /dev/null +++ b/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/LocationMetadata.php @@ -0,0 +1,75 @@ +google.cloud.memcache.v1.LocationMetadata + */ +class LocationMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The set of available zones in the location. The map is keyed + * by the lowercase ID of each zone, as defined by GCE. These keys can be + * specified in the `zones` field when creating a Memcached instance. + * + * Generated from protobuf field map available_zones = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $available_zones; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\MapField $available_zones + * Output only. The set of available zones in the location. The map is keyed + * by the lowercase ID of each zone, as defined by GCE. These keys can be + * specified in the `zones` field when creating a Memcached instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Memcache\V1\CloudMemcache::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The set of available zones in the location. The map is keyed + * by the lowercase ID of each zone, as defined by GCE. These keys can be + * specified in the `zones` field when creating a Memcached instance. + * + * Generated from protobuf field map available_zones = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getAvailableZones() + { + return $this->available_zones; + } + + /** + * Output only. The set of available zones in the location. The map is keyed + * by the lowercase ID of each zone, as defined by GCE. These keys can be + * specified in the `zones` field when creating a Memcached instance. + * + * Generated from protobuf field map available_zones = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setAvailableZones($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Memcache\V1\ZoneMetadata::class); + $this->available_zones = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/MaintenancePolicy.php b/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/MaintenancePolicy.php new file mode 100644 index 000000000000..5bb59c83e923 --- /dev/null +++ b/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/MaintenancePolicy.php @@ -0,0 +1,201 @@ +google.cloud.memcache.v1.MaintenancePolicy + */ +class MaintenancePolicy extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The time when the policy was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The time when the policy was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Description of what this policy is for. Create/Update methods + * return INVALID_ARGUMENT if the length is greater than 512. + * + * Generated from protobuf field string description = 3; + */ + protected $description = ''; + /** + * Required. Maintenance window that is applied to resources covered by this + * policy. Minimum 1. For the current version, the maximum number of + * weekly_maintenance_windows is expected to be one. + * + * Generated from protobuf field repeated .google.cloud.memcache.v1.WeeklyMaintenanceWindow weekly_maintenance_window = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + private $weekly_maintenance_window; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time when the policy was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The time when the policy was updated. + * @type string $description + * Description of what this policy is for. Create/Update methods + * return INVALID_ARGUMENT if the length is greater than 512. + * @type array<\Google\Cloud\Memcache\V1\WeeklyMaintenanceWindow>|\Google\Protobuf\Internal\RepeatedField $weekly_maintenance_window + * Required. Maintenance window that is applied to resources covered by this + * policy. Minimum 1. For the current version, the maximum number of + * weekly_maintenance_windows is expected to be one. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Memcache\V1\CloudMemcache::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The time when the policy was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The time when the policy was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The time when the policy was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The time when the policy was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Description of what this policy is for. Create/Update methods + * return INVALID_ARGUMENT if the length is greater than 512. + * + * Generated from protobuf field string description = 3; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Description of what this policy is for. Create/Update methods + * return INVALID_ARGUMENT if the length is greater than 512. + * + * Generated from protobuf field string description = 3; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Required. Maintenance window that is applied to resources covered by this + * policy. Minimum 1. For the current version, the maximum number of + * weekly_maintenance_windows is expected to be one. + * + * Generated from protobuf field repeated .google.cloud.memcache.v1.WeeklyMaintenanceWindow weekly_maintenance_window = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getWeeklyMaintenanceWindow() + { + return $this->weekly_maintenance_window; + } + + /** + * Required. Maintenance window that is applied to resources covered by this + * policy. Minimum 1. For the current version, the maximum number of + * weekly_maintenance_windows is expected to be one. + * + * Generated from protobuf field repeated .google.cloud.memcache.v1.WeeklyMaintenanceWindow weekly_maintenance_window = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Cloud\Memcache\V1\WeeklyMaintenanceWindow>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setWeeklyMaintenanceWindow($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Memcache\V1\WeeklyMaintenanceWindow::class); + $this->weekly_maintenance_window = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/MaintenanceSchedule.php b/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/MaintenanceSchedule.php new file mode 100644 index 000000000000..f141831d3947 --- /dev/null +++ b/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/MaintenanceSchedule.php @@ -0,0 +1,169 @@ +google.cloud.memcache.v1.MaintenanceSchedule + */ +class MaintenanceSchedule extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The start time of any upcoming scheduled maintenance for this instance. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $start_time = null; + /** + * Output only. The end time of any upcoming scheduled maintenance for this instance. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $end_time = null; + /** + * Output only. The deadline that the maintenance schedule start time can not go beyond, + * including reschedule. + * + * Generated from protobuf field .google.protobuf.Timestamp schedule_deadline_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $schedule_deadline_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $start_time + * Output only. The start time of any upcoming scheduled maintenance for this instance. + * @type \Google\Protobuf\Timestamp $end_time + * Output only. The end time of any upcoming scheduled maintenance for this instance. + * @type \Google\Protobuf\Timestamp $schedule_deadline_time + * Output only. The deadline that the maintenance schedule start time can not go beyond, + * including reschedule. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Memcache\V1\CloudMemcache::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The start time of any upcoming scheduled maintenance for this instance. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getStartTime() + { + return $this->start_time; + } + + public function hasStartTime() + { + return isset($this->start_time); + } + + public function clearStartTime() + { + unset($this->start_time); + } + + /** + * Output only. The start time of any upcoming scheduled maintenance for this instance. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * Output only. The end time of any upcoming scheduled maintenance for this instance. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEndTime() + { + return $this->end_time; + } + + public function hasEndTime() + { + return isset($this->end_time); + } + + public function clearEndTime() + { + unset($this->end_time); + } + + /** + * Output only. The end time of any upcoming scheduled maintenance for this instance. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * Output only. The deadline that the maintenance schedule start time can not go beyond, + * including reschedule. + * + * Generated from protobuf field .google.protobuf.Timestamp schedule_deadline_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getScheduleDeadlineTime() + { + return $this->schedule_deadline_time; + } + + public function hasScheduleDeadlineTime() + { + return isset($this->schedule_deadline_time); + } + + public function clearScheduleDeadlineTime() + { + unset($this->schedule_deadline_time); + } + + /** + * Output only. The deadline that the maintenance schedule start time can not go beyond, + * including reschedule. + * + * Generated from protobuf field .google.protobuf.Timestamp schedule_deadline_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setScheduleDeadlineTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->schedule_deadline_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/MemcacheParameters.php b/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/MemcacheParameters.php new file mode 100644 index 000000000000..8d5064794560 --- /dev/null +++ b/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/MemcacheParameters.php @@ -0,0 +1,115 @@ +google.cloud.memcache.v1.MemcacheParameters + */ +class MemcacheParameters extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The unique ID associated with this set of parameters. Users + * can use this id to determine if the parameters associated with the instance + * differ from the parameters associated with the nodes. A discrepancy between + * parameter ids can inform users that they may need to take action to apply + * parameters on nodes. + * + * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $id = ''; + /** + * User defined set of parameters to use in the memcached process. + * + * Generated from protobuf field map params = 3; + */ + private $params; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $id + * Output only. The unique ID associated with this set of parameters. Users + * can use this id to determine if the parameters associated with the instance + * differ from the parameters associated with the nodes. A discrepancy between + * parameter ids can inform users that they may need to take action to apply + * parameters on nodes. + * @type array|\Google\Protobuf\Internal\MapField $params + * User defined set of parameters to use in the memcached process. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Memcache\V1\CloudMemcache::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The unique ID associated with this set of parameters. Users + * can use this id to determine if the parameters associated with the instance + * differ from the parameters associated with the nodes. A discrepancy between + * parameter ids can inform users that they may need to take action to apply + * parameters on nodes. + * + * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * Output only. The unique ID associated with this set of parameters. Users + * can use this id to determine if the parameters associated with the instance + * differ from the parameters associated with the nodes. A discrepancy between + * parameter ids can inform users that they may need to take action to apply + * parameters on nodes. + * + * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkString($var, True); + $this->id = $var; + + return $this; + } + + /** + * User defined set of parameters to use in the memcached process. + * + * Generated from protobuf field map params = 3; + * @return \Google\Protobuf\Internal\MapField + */ + public function getParams() + { + return $this->params; + } + + /** + * User defined set of parameters to use in the memcached process. + * + * Generated from protobuf field map params = 3; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setParams($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->params = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/MemcacheVersion.php b/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/MemcacheVersion.php new file mode 100644 index 000000000000..99ddc115dd49 --- /dev/null +++ b/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/MemcacheVersion.php @@ -0,0 +1,52 @@ +google.cloud.memcache.v1.MemcacheVersion + */ +class MemcacheVersion +{ + /** + * Generated from protobuf enum MEMCACHE_VERSION_UNSPECIFIED = 0; + */ + const MEMCACHE_VERSION_UNSPECIFIED = 0; + /** + * Memcached 1.5 version. + * + * Generated from protobuf enum MEMCACHE_1_5 = 1; + */ + const MEMCACHE_1_5 = 1; + + private static $valueToName = [ + self::MEMCACHE_VERSION_UNSPECIFIED => 'MEMCACHE_VERSION_UNSPECIFIED', + self::MEMCACHE_1_5 => 'MEMCACHE_1_5', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/OperationMetadata.php b/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/OperationMetadata.php new file mode 100644 index 000000000000..0dcd99c7e97a --- /dev/null +++ b/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/OperationMetadata.php @@ -0,0 +1,303 @@ +google.cloud.memcache.v1.OperationMetadata + */ +class OperationMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Time when the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. Time when the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $end_time = null; + /** + * Output only. Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $target = ''; + /** + * Output only. Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $verb = ''; + /** + * Output only. Human-readable status of the operation, if any. + * + * Generated from protobuf field string status_detail = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $status_detail = ''; + /** + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have successfully been cancelled + * have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, + * corresponding to `Code.CANCELLED`. + * + * Generated from protobuf field bool cancel_requested = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $cancel_requested = false; + /** + * Output only. API version used to start the operation. + * + * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $api_version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Time when the operation was created. + * @type \Google\Protobuf\Timestamp $end_time + * Output only. Time when the operation finished running. + * @type string $target + * Output only. Server-defined resource path for the target of the operation. + * @type string $verb + * Output only. Name of the verb executed by the operation. + * @type string $status_detail + * Output only. Human-readable status of the operation, if any. + * @type bool $cancel_requested + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have successfully been cancelled + * have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, + * corresponding to `Code.CANCELLED`. + * @type string $api_version + * Output only. API version used to start the operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Memcache\V1\CloudMemcache::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Time when the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. Time when the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. Time when the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEndTime() + { + return $this->end_time; + } + + public function hasEndTime() + { + return isset($this->end_time); + } + + public function clearEndTime() + { + unset($this->end_time); + } + + /** + * Output only. Time when the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * Output only. Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getTarget() + { + return $this->target; + } + + /** + * Output only. Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setTarget($var) + { + GPBUtil::checkString($var, True); + $this->target = $var; + + return $this; + } + + /** + * Output only. Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getVerb() + { + return $this->verb; + } + + /** + * Output only. Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setVerb($var) + { + GPBUtil::checkString($var, True); + $this->verb = $var; + + return $this; + } + + /** + * Output only. Human-readable status of the operation, if any. + * + * Generated from protobuf field string status_detail = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getStatusDetail() + { + return $this->status_detail; + } + + /** + * Output only. Human-readable status of the operation, if any. + * + * Generated from protobuf field string status_detail = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setStatusDetail($var) + { + GPBUtil::checkString($var, True); + $this->status_detail = $var; + + return $this; + } + + /** + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have successfully been cancelled + * have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, + * corresponding to `Code.CANCELLED`. + * + * Generated from protobuf field bool cancel_requested = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getCancelRequested() + { + return $this->cancel_requested; + } + + /** + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have successfully been cancelled + * have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, + * corresponding to `Code.CANCELLED`. + * + * Generated from protobuf field bool cancel_requested = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setCancelRequested($var) + { + GPBUtil::checkBool($var); + $this->cancel_requested = $var; + + return $this; + } + + /** + * Output only. API version used to start the operation. + * + * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getApiVersion() + { + return $this->api_version; + } + + /** + * Output only. API version used to start the operation. + * + * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setApiVersion($var) + { + GPBUtil::checkString($var, True); + $this->api_version = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/RescheduleMaintenanceRequest.php b/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/RescheduleMaintenanceRequest.php new file mode 100644 index 000000000000..f5848d53b348 --- /dev/null +++ b/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/RescheduleMaintenanceRequest.php @@ -0,0 +1,184 @@ +google.cloud.memcache.v1.RescheduleMaintenanceRequest + */ +class RescheduleMaintenanceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Memcache instance resource name using the form: + * `projects/{project_id}/locations/{location_id}/instances/{instance_id}` + * where `location_id` refers to a GCP region. + * + * Generated from protobuf field string instance = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $instance = ''; + /** + * Required. If reschedule type is SPECIFIC_TIME, must set up schedule_time as well. + * + * Generated from protobuf field .google.cloud.memcache.v1.RescheduleMaintenanceRequest.RescheduleType reschedule_type = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $reschedule_type = 0; + /** + * Timestamp when the maintenance shall be rescheduled to if + * reschedule_type=SPECIFIC_TIME, in RFC 3339 format, for + * example `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 3; + */ + protected $schedule_time = null; + + /** + * @param string $instance Required. Memcache instance resource name using the form: + * `projects/{project_id}/locations/{location_id}/instances/{instance_id}` + * where `location_id` refers to a GCP region. Please see + * {@see CloudMemcacheClient::instanceName()} for help formatting this field. + * @param int $rescheduleType Required. If reschedule type is SPECIFIC_TIME, must set up schedule_time as well. + * For allowed values, use constants defined on {@see \Google\Cloud\Memcache\V1\RescheduleMaintenanceRequest\RescheduleType} + * @param \Google\Protobuf\Timestamp $scheduleTime Timestamp when the maintenance shall be rescheduled to if + * reschedule_type=SPECIFIC_TIME, in RFC 3339 format, for + * example `2012-11-15T16:19:00.094Z`. + * + * @return \Google\Cloud\Memcache\V1\RescheduleMaintenanceRequest + * + * @experimental + */ + public static function build(string $instance, int $rescheduleType, \Google\Protobuf\Timestamp $scheduleTime): self + { + return (new self()) + ->setInstance($instance) + ->setRescheduleType($rescheduleType) + ->setScheduleTime($scheduleTime); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Required. Memcache instance resource name using the form: + * `projects/{project_id}/locations/{location_id}/instances/{instance_id}` + * where `location_id` refers to a GCP region. + * @type int $reschedule_type + * Required. If reschedule type is SPECIFIC_TIME, must set up schedule_time as well. + * @type \Google\Protobuf\Timestamp $schedule_time + * Timestamp when the maintenance shall be rescheduled to if + * reschedule_type=SPECIFIC_TIME, in RFC 3339 format, for + * example `2012-11-15T16:19:00.094Z`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Memcache\V1\CloudMemcache::initOnce(); + parent::__construct($data); + } + + /** + * Required. Memcache instance resource name using the form: + * `projects/{project_id}/locations/{location_id}/instances/{instance_id}` + * where `location_id` refers to a GCP region. + * + * Generated from protobuf field string instance = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Required. Memcache instance resource name using the form: + * `projects/{project_id}/locations/{location_id}/instances/{instance_id}` + * where `location_id` refers to a GCP region. + * + * Generated from protobuf field string instance = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Required. If reschedule type is SPECIFIC_TIME, must set up schedule_time as well. + * + * Generated from protobuf field .google.cloud.memcache.v1.RescheduleMaintenanceRequest.RescheduleType reschedule_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getRescheduleType() + { + return $this->reschedule_type; + } + + /** + * Required. If reschedule type is SPECIFIC_TIME, must set up schedule_time as well. + * + * Generated from protobuf field .google.cloud.memcache.v1.RescheduleMaintenanceRequest.RescheduleType reschedule_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setRescheduleType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Memcache\V1\RescheduleMaintenanceRequest\RescheduleType::class); + $this->reschedule_type = $var; + + return $this; + } + + /** + * Timestamp when the maintenance shall be rescheduled to if + * reschedule_type=SPECIFIC_TIME, in RFC 3339 format, for + * example `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 3; + * @return \Google\Protobuf\Timestamp|null + */ + public function getScheduleTime() + { + return $this->schedule_time; + } + + public function hasScheduleTime() + { + return isset($this->schedule_time); + } + + public function clearScheduleTime() + { + unset($this->schedule_time); + } + + /** + * Timestamp when the maintenance shall be rescheduled to if + * reschedule_type=SPECIFIC_TIME, in RFC 3339 format, for + * example `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 3; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setScheduleTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->schedule_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/RescheduleMaintenanceRequest/RescheduleType.php b/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/RescheduleMaintenanceRequest/RescheduleType.php new file mode 100644 index 000000000000..b015d580ce0d --- /dev/null +++ b/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/RescheduleMaintenanceRequest/RescheduleType.php @@ -0,0 +1,72 @@ +google.cloud.memcache.v1.RescheduleMaintenanceRequest.RescheduleType + */ +class RescheduleType +{ + /** + * Not set. + * + * Generated from protobuf enum RESCHEDULE_TYPE_UNSPECIFIED = 0; + */ + const RESCHEDULE_TYPE_UNSPECIFIED = 0; + /** + * If the user wants to schedule the maintenance to happen now. + * + * Generated from protobuf enum IMMEDIATE = 1; + */ + const IMMEDIATE = 1; + /** + * If the user wants to use the existing maintenance policy to find the + * next available window. + * + * Generated from protobuf enum NEXT_AVAILABLE_WINDOW = 2; + */ + const NEXT_AVAILABLE_WINDOW = 2; + /** + * If the user wants to reschedule the maintenance to a specific time. + * + * Generated from protobuf enum SPECIFIC_TIME = 3; + */ + const SPECIFIC_TIME = 3; + + private static $valueToName = [ + self::RESCHEDULE_TYPE_UNSPECIFIED => 'RESCHEDULE_TYPE_UNSPECIFIED', + self::IMMEDIATE => 'IMMEDIATE', + self::NEXT_AVAILABLE_WINDOW => 'NEXT_AVAILABLE_WINDOW', + self::SPECIFIC_TIME => 'SPECIFIC_TIME', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(RescheduleType::class, \Google\Cloud\Memcache\V1\RescheduleMaintenanceRequest_RescheduleType::class); + diff --git a/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/UpdateInstanceRequest.php b/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/UpdateInstanceRequest.php new file mode 100644 index 000000000000..2e74317853fd --- /dev/null +++ b/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/UpdateInstanceRequest.php @@ -0,0 +1,147 @@ +google.cloud.memcache.v1.UpdateInstanceRequest + */ +class UpdateInstanceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Mask of fields to update. + * * `displayName` + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + /** + * Required. A Memcached Instance. + * Only fields specified in update_mask are updated. + * + * Generated from protobuf field .google.cloud.memcache.v1.Instance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $instance = null; + + /** + * @param \Google\Cloud\Memcache\V1\Instance $instance Required. A Memcached Instance. + * Only fields specified in update_mask are updated. + * @param \Google\Protobuf\FieldMask $updateMask Required. Mask of fields to update. + * + * * `displayName` + * + * @return \Google\Cloud\Memcache\V1\UpdateInstanceRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Memcache\V1\Instance $instance, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setInstance($instance) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Required. Mask of fields to update. + * * `displayName` + * @type \Google\Cloud\Memcache\V1\Instance $instance + * Required. A Memcached Instance. + * Only fields specified in update_mask are updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Memcache\V1\CloudMemcache::initOnce(); + parent::__construct($data); + } + + /** + * Required. Mask of fields to update. + * * `displayName` + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. Mask of fields to update. + * * `displayName` + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Required. A Memcached Instance. + * Only fields specified in update_mask are updated. + * + * Generated from protobuf field .google.cloud.memcache.v1.Instance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Memcache\V1\Instance|null + */ + public function getInstance() + { + return $this->instance; + } + + public function hasInstance() + { + return isset($this->instance); + } + + public function clearInstance() + { + unset($this->instance); + } + + /** + * Required. A Memcached Instance. + * Only fields specified in update_mask are updated. + * + * Generated from protobuf field .google.cloud.memcache.v1.Instance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Memcache\V1\Instance $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Memcache\V1\Instance::class); + $this->instance = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/UpdateParametersRequest.php b/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/UpdateParametersRequest.php new file mode 100644 index 000000000000..af9daca3148d --- /dev/null +++ b/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/UpdateParametersRequest.php @@ -0,0 +1,178 @@ +google.cloud.memcache.v1.UpdateParametersRequest + */ +class UpdateParametersRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the Memcached instance for which the parameters should be + * updated. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. Mask of fields to update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + /** + * The parameters to apply to the instance. + * + * Generated from protobuf field .google.cloud.memcache.v1.MemcacheParameters parameters = 3; + */ + protected $parameters = null; + + /** + * @param string $name Required. Resource name of the Memcached instance for which the parameters should be + * updated. Please see + * {@see CloudMemcacheClient::instanceName()} for help formatting this field. + * @param \Google\Protobuf\FieldMask $updateMask Required. Mask of fields to update. + * @param \Google\Cloud\Memcache\V1\MemcacheParameters $parameters The parameters to apply to the instance. + * + * @return \Google\Cloud\Memcache\V1\UpdateParametersRequest + * + * @experimental + */ + public static function build(string $name, \Google\Protobuf\FieldMask $updateMask, \Google\Cloud\Memcache\V1\MemcacheParameters $parameters): self + { + return (new self()) + ->setName($name) + ->setUpdateMask($updateMask) + ->setParameters($parameters); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Resource name of the Memcached instance for which the parameters should be + * updated. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. Mask of fields to update. + * @type \Google\Cloud\Memcache\V1\MemcacheParameters $parameters + * The parameters to apply to the instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Memcache\V1\CloudMemcache::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the Memcached instance for which the parameters should be + * updated. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Resource name of the Memcached instance for which the parameters should be + * updated. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. Mask of fields to update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. Mask of fields to update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * The parameters to apply to the instance. + * + * Generated from protobuf field .google.cloud.memcache.v1.MemcacheParameters parameters = 3; + * @return \Google\Cloud\Memcache\V1\MemcacheParameters|null + */ + public function getParameters() + { + return $this->parameters; + } + + public function hasParameters() + { + return isset($this->parameters); + } + + public function clearParameters() + { + unset($this->parameters); + } + + /** + * The parameters to apply to the instance. + * + * Generated from protobuf field .google.cloud.memcache.v1.MemcacheParameters parameters = 3; + * @param \Google\Cloud\Memcache\V1\MemcacheParameters $var + * @return $this + */ + public function setParameters($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Memcache\V1\MemcacheParameters::class); + $this->parameters = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/WeeklyMaintenanceWindow.php b/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/WeeklyMaintenanceWindow.php new file mode 100644 index 000000000000..ec49a6a4aa09 --- /dev/null +++ b/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/WeeklyMaintenanceWindow.php @@ -0,0 +1,155 @@ +google.cloud.memcache.v1.WeeklyMaintenanceWindow + */ +class WeeklyMaintenanceWindow extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Allows to define schedule that runs specified day of the week. + * + * Generated from protobuf field .google.type.DayOfWeek day = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $day = 0; + /** + * Required. Start time of the window in UTC. + * + * Generated from protobuf field .google.type.TimeOfDay start_time = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $start_time = null; + /** + * Required. Duration of the time window. + * + * Generated from protobuf field .google.protobuf.Duration duration = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $duration = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $day + * Required. Allows to define schedule that runs specified day of the week. + * @type \Google\Type\TimeOfDay $start_time + * Required. Start time of the window in UTC. + * @type \Google\Protobuf\Duration $duration + * Required. Duration of the time window. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Memcache\V1\CloudMemcache::initOnce(); + parent::__construct($data); + } + + /** + * Required. Allows to define schedule that runs specified day of the week. + * + * Generated from protobuf field .google.type.DayOfWeek day = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getDay() + { + return $this->day; + } + + /** + * Required. Allows to define schedule that runs specified day of the week. + * + * Generated from protobuf field .google.type.DayOfWeek day = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setDay($var) + { + GPBUtil::checkEnum($var, \Google\Type\DayOfWeek::class); + $this->day = $var; + + return $this; + } + + /** + * Required. Start time of the window in UTC. + * + * Generated from protobuf field .google.type.TimeOfDay start_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Type\TimeOfDay|null + */ + public function getStartTime() + { + return $this->start_time; + } + + public function hasStartTime() + { + return isset($this->start_time); + } + + public function clearStartTime() + { + unset($this->start_time); + } + + /** + * Required. Start time of the window in UTC. + * + * Generated from protobuf field .google.type.TimeOfDay start_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Type\TimeOfDay $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Type\TimeOfDay::class); + $this->start_time = $var; + + return $this; + } + + /** + * Required. Duration of the time window. + * + * Generated from protobuf field .google.protobuf.Duration duration = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Duration|null + */ + public function getDuration() + { + return $this->duration; + } + + public function hasDuration() + { + return isset($this->duration); + } + + public function clearDuration() + { + unset($this->duration); + } + + /** + * Required. Duration of the time window. + * + * Generated from protobuf field .google.protobuf.Duration duration = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->duration = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/ZoneMetadata.php b/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/ZoneMetadata.php new file mode 100644 index 000000000000..ef8a0e92f5d1 --- /dev/null +++ b/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/ZoneMetadata.php @@ -0,0 +1,31 @@ +google.cloud.memcache.v1.ZoneMetadata + */ +class ZoneMetadata extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Memcache\V1\CloudMemcache::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/Memcache/v1/samples/V1/CloudMemcacheClient/apply_parameters.php b/owl-bot-staging/Memcache/v1/samples/V1/CloudMemcacheClient/apply_parameters.php new file mode 100644 index 000000000000..d7bcb6ff4768 --- /dev/null +++ b/owl-bot-staging/Memcache/v1/samples/V1/CloudMemcacheClient/apply_parameters.php @@ -0,0 +1,85 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $cloudMemcacheClient->applyParameters($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Instance $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = CloudMemcacheClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + + apply_parameters_sample($formattedName); +} +// [END memcache_v1_generated_CloudMemcache_ApplyParameters_sync] diff --git a/owl-bot-staging/Memcache/v1/samples/V1/CloudMemcacheClient/create_instance.php b/owl-bot-staging/Memcache/v1/samples/V1/CloudMemcacheClient/create_instance.php new file mode 100644 index 000000000000..6ce653b4a8c1 --- /dev/null +++ b/owl-bot-staging/Memcache/v1/samples/V1/CloudMemcacheClient/create_instance.php @@ -0,0 +1,134 @@ +setCpuCount($instanceNodeConfigCpuCount) + ->setMemorySizeMb($instanceNodeConfigMemorySizeMb); + $instance = (new Instance()) + ->setName($instanceName) + ->setNodeCount($instanceNodeCount) + ->setNodeConfig($instanceNodeConfig); + $request = (new CreateInstanceRequest()) + ->setParent($formattedParent) + ->setInstanceId($instanceId) + ->setInstance($instance); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $cloudMemcacheClient->createInstance($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Instance $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = CloudMemcacheClient::locationName('[PROJECT]', '[LOCATION]'); + $instanceId = '[INSTANCE_ID]'; + $instanceName = '[NAME]'; + $instanceNodeCount = 0; + $instanceNodeConfigCpuCount = 0; + $instanceNodeConfigMemorySizeMb = 0; + + create_instance_sample( + $formattedParent, + $instanceId, + $instanceName, + $instanceNodeCount, + $instanceNodeConfigCpuCount, + $instanceNodeConfigMemorySizeMb + ); +} +// [END memcache_v1_generated_CloudMemcache_CreateInstance_sync] diff --git a/owl-bot-staging/Memcache/v1/samples/V1/CloudMemcacheClient/delete_instance.php b/owl-bot-staging/Memcache/v1/samples/V1/CloudMemcacheClient/delete_instance.php new file mode 100644 index 000000000000..9589955ab918 --- /dev/null +++ b/owl-bot-staging/Memcache/v1/samples/V1/CloudMemcacheClient/delete_instance.php @@ -0,0 +1,82 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $cloudMemcacheClient->deleteInstance($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = CloudMemcacheClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + + delete_instance_sample($formattedName); +} +// [END memcache_v1_generated_CloudMemcache_DeleteInstance_sync] diff --git a/owl-bot-staging/Memcache/v1/samples/V1/CloudMemcacheClient/get_instance.php b/owl-bot-staging/Memcache/v1/samples/V1/CloudMemcacheClient/get_instance.php new file mode 100644 index 000000000000..7055ea1a1d43 --- /dev/null +++ b/owl-bot-staging/Memcache/v1/samples/V1/CloudMemcacheClient/get_instance.php @@ -0,0 +1,73 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Instance $response */ + $response = $cloudMemcacheClient->getInstance($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = CloudMemcacheClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + + get_instance_sample($formattedName); +} +// [END memcache_v1_generated_CloudMemcache_GetInstance_sync] diff --git a/owl-bot-staging/Memcache/v1/samples/V1/CloudMemcacheClient/get_location.php b/owl-bot-staging/Memcache/v1/samples/V1/CloudMemcacheClient/get_location.php new file mode 100644 index 000000000000..f0294f489913 --- /dev/null +++ b/owl-bot-staging/Memcache/v1/samples/V1/CloudMemcacheClient/get_location.php @@ -0,0 +1,57 @@ +getLocation($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END memcache_v1_generated_CloudMemcache_GetLocation_sync] diff --git a/owl-bot-staging/Memcache/v1/samples/V1/CloudMemcacheClient/list_instances.php b/owl-bot-staging/Memcache/v1/samples/V1/CloudMemcacheClient/list_instances.php new file mode 100644 index 000000000000..b8a288424f2a --- /dev/null +++ b/owl-bot-staging/Memcache/v1/samples/V1/CloudMemcacheClient/list_instances.php @@ -0,0 +1,78 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $cloudMemcacheClient->listInstances($request); + + /** @var Instance $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = CloudMemcacheClient::locationName('[PROJECT]', '[LOCATION]'); + + list_instances_sample($formattedParent); +} +// [END memcache_v1_generated_CloudMemcache_ListInstances_sync] diff --git a/owl-bot-staging/Memcache/v1/samples/V1/CloudMemcacheClient/list_locations.php b/owl-bot-staging/Memcache/v1/samples/V1/CloudMemcacheClient/list_locations.php new file mode 100644 index 000000000000..02151c67ba4a --- /dev/null +++ b/owl-bot-staging/Memcache/v1/samples/V1/CloudMemcacheClient/list_locations.php @@ -0,0 +1,62 @@ +listLocations($request); + + /** @var Location $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END memcache_v1_generated_CloudMemcache_ListLocations_sync] diff --git a/owl-bot-staging/Memcache/v1/samples/V1/CloudMemcacheClient/reschedule_maintenance.php b/owl-bot-staging/Memcache/v1/samples/V1/CloudMemcacheClient/reschedule_maintenance.php new file mode 100644 index 000000000000..e618a1ca565b --- /dev/null +++ b/owl-bot-staging/Memcache/v1/samples/V1/CloudMemcacheClient/reschedule_maintenance.php @@ -0,0 +1,89 @@ +setInstance($formattedInstance) + ->setRescheduleType($rescheduleType); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $cloudMemcacheClient->rescheduleMaintenance($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Instance $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedInstance = CloudMemcacheClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $rescheduleType = RescheduleType::RESCHEDULE_TYPE_UNSPECIFIED; + + reschedule_maintenance_sample($formattedInstance, $rescheduleType); +} +// [END memcache_v1_generated_CloudMemcache_RescheduleMaintenance_sync] diff --git a/owl-bot-staging/Memcache/v1/samples/V1/CloudMemcacheClient/update_instance.php b/owl-bot-staging/Memcache/v1/samples/V1/CloudMemcacheClient/update_instance.php new file mode 100644 index 000000000000..5b1d84bd0234 --- /dev/null +++ b/owl-bot-staging/Memcache/v1/samples/V1/CloudMemcacheClient/update_instance.php @@ -0,0 +1,115 @@ +setCpuCount($instanceNodeConfigCpuCount) + ->setMemorySizeMb($instanceNodeConfigMemorySizeMb); + $instance = (new Instance()) + ->setName($instanceName) + ->setNodeCount($instanceNodeCount) + ->setNodeConfig($instanceNodeConfig); + $request = (new UpdateInstanceRequest()) + ->setUpdateMask($updateMask) + ->setInstance($instance); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $cloudMemcacheClient->updateInstance($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Instance $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $instanceName = '[NAME]'; + $instanceNodeCount = 0; + $instanceNodeConfigCpuCount = 0; + $instanceNodeConfigMemorySizeMb = 0; + + update_instance_sample( + $instanceName, + $instanceNodeCount, + $instanceNodeConfigCpuCount, + $instanceNodeConfigMemorySizeMb + ); +} +// [END memcache_v1_generated_CloudMemcache_UpdateInstance_sync] diff --git a/owl-bot-staging/Memcache/v1/samples/V1/CloudMemcacheClient/update_parameters.php b/owl-bot-staging/Memcache/v1/samples/V1/CloudMemcacheClient/update_parameters.php new file mode 100644 index 000000000000..91c0c48ef163 --- /dev/null +++ b/owl-bot-staging/Memcache/v1/samples/V1/CloudMemcacheClient/update_parameters.php @@ -0,0 +1,90 @@ +setName($formattedName) + ->setUpdateMask($updateMask); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $cloudMemcacheClient->updateParameters($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Instance $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = CloudMemcacheClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + + update_parameters_sample($formattedName); +} +// [END memcache_v1_generated_CloudMemcache_UpdateParameters_sync] diff --git a/owl-bot-staging/Memcache/v1/src/V1/Client/CloudMemcacheClient.php b/owl-bot-staging/Memcache/v1/src/V1/Client/CloudMemcacheClient.php new file mode 100644 index 000000000000..451786626307 --- /dev/null +++ b/owl-bot-staging/Memcache/v1/src/V1/Client/CloudMemcacheClient.php @@ -0,0 +1,587 @@ + applyParametersAsync(ApplyParametersRequest $request, array $optionalArgs = []) + * @method PromiseInterface createInstanceAsync(CreateInstanceRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteInstanceAsync(DeleteInstanceRequest $request, array $optionalArgs = []) + * @method PromiseInterface getInstanceAsync(GetInstanceRequest $request, array $optionalArgs = []) + * @method PromiseInterface listInstancesAsync(ListInstancesRequest $request, array $optionalArgs = []) + * @method PromiseInterface rescheduleMaintenanceAsync(RescheduleMaintenanceRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateInstanceAsync(UpdateInstanceRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateParametersAsync(UpdateParametersRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + */ +final class CloudMemcacheClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.memcache.v1.CloudMemcache'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'memcache.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'memcache.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/cloud_memcache_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/cloud_memcache_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/cloud_memcache_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/cloud_memcache_rest_client_config.php', + ], + ], + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Create the default operation client for the service. + * + * @param array $options ClientOptions for the client. + * + * @return OperationsClient + */ + private function createOperationsClient(array $options) + { + // Unset client-specific configuration options + unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); + + if (isset($options['operationsClient'])) { + return $options['operationsClient']; + } + + return new OperationsClient($options); + } + + /** + * Formats a string containing the fully-qualified path to represent a instance + * resource. + * + * @param string $project + * @param string $location + * @param string $instance + * + * @return string The formatted instance resource. + */ + public static function instanceName(string $project, string $location, string $instance): string + { + return self::getPathTemplate('instance')->render([ + 'project' => $project, + 'location' => $location, + 'instance' => $instance, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a location + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted location resource. + */ + public static function locationName(string $project, string $location): string + { + return self::getPathTemplate('location')->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - instance: projects/{project}/locations/{location}/instances/{instance} + * - location: projects/{project}/locations/{location} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'memcache.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * `ApplyParameters` restarts the set of specified nodes in order to update + * them to the current set of parameters for the Memcached Instance. + * + * The async variant is {@see CloudMemcacheClient::applyParametersAsync()} . + * + * @example samples/V1/CloudMemcacheClient/apply_parameters.php + * + * @param ApplyParametersRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function applyParameters(ApplyParametersRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('ApplyParameters', $request, $callOptions)->wait(); + } + + /** + * Creates a new Instance in a given location. + * + * The async variant is {@see CloudMemcacheClient::createInstanceAsync()} . + * + * @example samples/V1/CloudMemcacheClient/create_instance.php + * + * @param CreateInstanceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createInstance(CreateInstanceRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateInstance', $request, $callOptions)->wait(); + } + + /** + * Deletes a single Instance. + * + * The async variant is {@see CloudMemcacheClient::deleteInstanceAsync()} . + * + * @example samples/V1/CloudMemcacheClient/delete_instance.php + * + * @param DeleteInstanceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteInstance(DeleteInstanceRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteInstance', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single Instance. + * + * The async variant is {@see CloudMemcacheClient::getInstanceAsync()} . + * + * @example samples/V1/CloudMemcacheClient/get_instance.php + * + * @param GetInstanceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Instance + * + * @throws ApiException Thrown if the API call fails. + */ + public function getInstance(GetInstanceRequest $request, array $callOptions = []): Instance + { + return $this->startApiCall('GetInstance', $request, $callOptions)->wait(); + } + + /** + * Lists Instances in a given location. + * + * The async variant is {@see CloudMemcacheClient::listInstancesAsync()} . + * + * @example samples/V1/CloudMemcacheClient/list_instances.php + * + * @param ListInstancesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listInstances(ListInstancesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListInstances', $request, $callOptions); + } + + /** + * Reschedules upcoming maintenance event. + * + * The async variant is {@see CloudMemcacheClient::rescheduleMaintenanceAsync()} . + * + * @example samples/V1/CloudMemcacheClient/reschedule_maintenance.php + * + * @param RescheduleMaintenanceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function rescheduleMaintenance(RescheduleMaintenanceRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('RescheduleMaintenance', $request, $callOptions)->wait(); + } + + /** + * Updates an existing Instance in a given project and location. + * + * The async variant is {@see CloudMemcacheClient::updateInstanceAsync()} . + * + * @example samples/V1/CloudMemcacheClient/update_instance.php + * + * @param UpdateInstanceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateInstance(UpdateInstanceRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateInstance', $request, $callOptions)->wait(); + } + + /** + * Updates the defined Memcached parameters for an existing instance. + * This method only stages the parameters, it must be followed by + * `ApplyParameters` to apply the parameters to nodes of the Memcached + * instance. + * + * The async variant is {@see CloudMemcacheClient::updateParametersAsync()} . + * + * @example samples/V1/CloudMemcacheClient/update_parameters.php + * + * @param UpdateParametersRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateParameters(UpdateParametersRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateParameters', $request, $callOptions)->wait(); + } + + /** + * Gets information about a location. + * + * The async variant is {@see CloudMemcacheClient::getLocationAsync()} . + * + * @example samples/V1/CloudMemcacheClient/get_location.php + * + * @param GetLocationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Location + * + * @throws ApiException Thrown if the API call fails. + */ + public function getLocation(GetLocationRequest $request, array $callOptions = []): Location + { + return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * The async variant is {@see CloudMemcacheClient::listLocationsAsync()} . + * + * @example samples/V1/CloudMemcacheClient/list_locations.php + * + * @param ListLocationsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListLocations', $request, $callOptions); + } +} diff --git a/owl-bot-staging/Memcache/v1/src/V1/gapic_metadata.json b/owl-bot-staging/Memcache/v1/src/V1/gapic_metadata.json new file mode 100644 index 000000000000..e993652f358b --- /dev/null +++ b/owl-bot-staging/Memcache/v1/src/V1/gapic_metadata.json @@ -0,0 +1,68 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.cloud.memcache.v1", + "libraryPackage": "Google\\Cloud\\Memcache\\V1", + "services": { + "CloudMemcache": { + "clients": { + "grpc": { + "libraryClient": "CloudMemcacheGapicClient", + "rpcs": { + "ApplyParameters": { + "methods": [ + "applyParameters" + ] + }, + "CreateInstance": { + "methods": [ + "createInstance" + ] + }, + "DeleteInstance": { + "methods": [ + "deleteInstance" + ] + }, + "GetInstance": { + "methods": [ + "getInstance" + ] + }, + "ListInstances": { + "methods": [ + "listInstances" + ] + }, + "RescheduleMaintenance": { + "methods": [ + "rescheduleMaintenance" + ] + }, + "UpdateInstance": { + "methods": [ + "updateInstance" + ] + }, + "UpdateParameters": { + "methods": [ + "updateParameters" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/Memcache/v1/src/V1/resources/cloud_memcache_client_config.json b/owl-bot-staging/Memcache/v1/src/V1/resources/cloud_memcache_client_config.json new file mode 100644 index 000000000000..d52aad915ae6 --- /dev/null +++ b/owl-bot-staging/Memcache/v1/src/V1/resources/cloud_memcache_client_config.json @@ -0,0 +1,82 @@ +{ + "interfaces": { + "google.cloud.memcache.v1.CloudMemcache": { + "retry_codes": { + "no_retry_codes": [], + "no_retry_1_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 1200000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 1200000, + "total_timeout_millis": 1200000 + } + }, + "methods": { + "ApplyParameters": { + "timeout_millis": 1200000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateInstance": { + "timeout_millis": 1200000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteInstance": { + "timeout_millis": 1200000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetInstance": { + "timeout_millis": 1200000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListInstances": { + "timeout_millis": 1200000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "RescheduleMaintenance": { + "timeout_millis": 1200000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateInstance": { + "timeout_millis": 1200000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateParameters": { + "timeout_millis": 1200000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetLocation": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListLocations": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } + } + } +} diff --git a/owl-bot-staging/Memcache/v1/src/V1/resources/cloud_memcache_descriptor_config.php b/owl-bot-staging/Memcache/v1/src/V1/resources/cloud_memcache_descriptor_config.php new file mode 100644 index 000000000000..97d3dc1ba57d --- /dev/null +++ b/owl-bot-staging/Memcache/v1/src/V1/resources/cloud_memcache_descriptor_config.php @@ -0,0 +1,213 @@ + [ + 'google.cloud.memcache.v1.CloudMemcache' => [ + 'ApplyParameters' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Memcache\V1\Instance', + 'metadataReturnType' => '\Google\Cloud\Memcache\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'CreateInstance' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Memcache\V1\Instance', + 'metadataReturnType' => '\Google\Cloud\Memcache\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteInstance' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\Memcache\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'RescheduleMaintenance' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Memcache\V1\Instance', + 'metadataReturnType' => '\Google\Cloud\Memcache\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + ], + ], + 'UpdateInstance' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Memcache\V1\Instance', + 'metadataReturnType' => '\Google\Cloud\Memcache\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'instance.name', + 'fieldAccessors' => [ + 'getInstance', + 'getName', + ], + ], + ], + ], + 'UpdateParameters' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Memcache\V1\Instance', + 'metadataReturnType' => '\Google\Cloud\Memcache\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetInstance' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Memcache\V1\Instance', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListInstances' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getInstances', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Memcache\V1\ListInstancesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'GetLocation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Location\Location', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'templateMap' => [ + 'instance' => 'projects/{project}/locations/{location}/instances/{instance}', + 'location' => 'projects/{project}/locations/{location}', + ], + ], + ], +]; diff --git a/owl-bot-staging/Memcache/v1/src/V1/resources/cloud_memcache_rest_client_config.php b/owl-bot-staging/Memcache/v1/src/V1/resources/cloud_memcache_rest_client_config.php new file mode 100644 index 000000000000..281466044120 --- /dev/null +++ b/owl-bot-staging/Memcache/v1/src/V1/resources/cloud_memcache_rest_client_config.php @@ -0,0 +1,200 @@ + [ + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.cloud.memcache.v1.CloudMemcache' => [ + 'ApplyParameters' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*}:applyParameters', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'CreateInstance' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/instances', + 'body' => 'instance', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'instance_id', + ], + ], + 'DeleteInstance' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetInstance' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListInstances' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/instances', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'RescheduleMaintenance' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{instance=projects/*/locations/*/instances/*}:rescheduleMaintenance', + 'body' => '*', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + ], + ], + 'UpdateInstance' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{instance.name=projects/*/locations/*/instances/*}', + 'body' => 'instance', + 'placeholders' => [ + 'instance.name' => [ + 'getters' => [ + 'getInstance', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdateParameters' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*}:updateParameters', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Memcache/v1/tests/Unit/V1/Client/CloudMemcacheClientTest.php b/owl-bot-staging/Memcache/v1/tests/Unit/V1/Client/CloudMemcacheClientTest.php new file mode 100644 index 000000000000..b4bcd6a189cb --- /dev/null +++ b/owl-bot-staging/Memcache/v1/tests/Unit/V1/Client/CloudMemcacheClientTest.php @@ -0,0 +1,1284 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return CloudMemcacheClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new CloudMemcacheClient($options); + } + + /** @test */ + public function applyParametersTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/applyParametersTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $authorizedNetwork = 'authorizedNetwork-1733809270'; + $nodeCount = 1539922066; + $memcacheFullVersion = 'memcacheFullVersion-1666834598'; + $discoveryEndpoint = 'discoveryEndpoint224997188'; + $expectedResponse = new Instance(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setAuthorizedNetwork($authorizedNetwork); + $expectedResponse->setNodeCount($nodeCount); + $expectedResponse->setMemcacheFullVersion($memcacheFullVersion); + $expectedResponse->setDiscoveryEndpoint($discoveryEndpoint); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/applyParametersTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new ApplyParametersRequest()) + ->setName($formattedName); + $response = $gapicClient->applyParameters($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.memcache.v1.CloudMemcache/ApplyParameters', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/applyParametersTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function applyParametersExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/applyParametersTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new ApplyParametersRequest()) + ->setName($formattedName); + $response = $gapicClient->applyParameters($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/applyParametersTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createInstanceTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createInstanceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $authorizedNetwork = 'authorizedNetwork-1733809270'; + $nodeCount = 1539922066; + $memcacheFullVersion = 'memcacheFullVersion-1666834598'; + $discoveryEndpoint = 'discoveryEndpoint224997188'; + $expectedResponse = new Instance(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setAuthorizedNetwork($authorizedNetwork); + $expectedResponse->setNodeCount($nodeCount); + $expectedResponse->setMemcacheFullVersion($memcacheFullVersion); + $expectedResponse->setDiscoveryEndpoint($discoveryEndpoint); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createInstanceTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $instanceId = 'instanceId-2101995259'; + $instance = new Instance(); + $instanceName = 'instanceName-737857344'; + $instance->setName($instanceName); + $instanceNodeCount = 310900968; + $instance->setNodeCount($instanceNodeCount); + $instanceNodeConfig = new NodeConfig(); + $nodeConfigCpuCount = 604896331; + $instanceNodeConfig->setCpuCount($nodeConfigCpuCount); + $nodeConfigMemorySizeMb = 701709349; + $instanceNodeConfig->setMemorySizeMb($nodeConfigMemorySizeMb); + $instance->setNodeConfig($instanceNodeConfig); + $request = (new CreateInstanceRequest()) + ->setParent($formattedParent) + ->setInstanceId($instanceId) + ->setInstance($instance); + $response = $gapicClient->createInstance($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.memcache.v1.CloudMemcache/CreateInstance', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getInstanceId(); + $this->assertProtobufEquals($instanceId, $actualValue); + $actualValue = $actualApiRequestObject->getInstance(); + $this->assertProtobufEquals($instance, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createInstanceTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createInstanceExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createInstanceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $instanceId = 'instanceId-2101995259'; + $instance = new Instance(); + $instanceName = 'instanceName-737857344'; + $instance->setName($instanceName); + $instanceNodeCount = 310900968; + $instance->setNodeCount($instanceNodeCount); + $instanceNodeConfig = new NodeConfig(); + $nodeConfigCpuCount = 604896331; + $instanceNodeConfig->setCpuCount($nodeConfigCpuCount); + $nodeConfigMemorySizeMb = 701709349; + $instanceNodeConfig->setMemorySizeMb($nodeConfigMemorySizeMb); + $instance->setNodeConfig($instanceNodeConfig); + $request = (new CreateInstanceRequest()) + ->setParent($formattedParent) + ->setInstanceId($instanceId) + ->setInstance($instance); + $response = $gapicClient->createInstance($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createInstanceTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteInstanceTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteInstanceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteInstanceTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new DeleteInstanceRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteInstance($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.memcache.v1.CloudMemcache/DeleteInstance', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteInstanceTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteInstanceExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteInstanceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new DeleteInstanceRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteInstance($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteInstanceTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getInstanceTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $authorizedNetwork = 'authorizedNetwork-1733809270'; + $nodeCount = 1539922066; + $memcacheFullVersion = 'memcacheFullVersion-1666834598'; + $discoveryEndpoint = 'discoveryEndpoint224997188'; + $expectedResponse = new Instance(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setAuthorizedNetwork($authorizedNetwork); + $expectedResponse->setNodeCount($nodeCount); + $expectedResponse->setMemcacheFullVersion($memcacheFullVersion); + $expectedResponse->setDiscoveryEndpoint($discoveryEndpoint); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new GetInstanceRequest()) + ->setName($formattedName); + $response = $gapicClient->getInstance($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.memcache.v1.CloudMemcache/GetInstance', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getInstanceExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new GetInstanceRequest()) + ->setName($formattedName); + try { + $gapicClient->getInstance($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listInstancesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $instancesElement = new Instance(); + $instances = [ + $instancesElement, + ]; + $expectedResponse = new ListInstancesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setInstances($instances); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListInstancesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listInstances($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getInstances()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.memcache.v1.CloudMemcache/ListInstances', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listInstancesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListInstancesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listInstances($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function rescheduleMaintenanceTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/rescheduleMaintenanceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $authorizedNetwork = 'authorizedNetwork-1733809270'; + $nodeCount = 1539922066; + $memcacheFullVersion = 'memcacheFullVersion-1666834598'; + $discoveryEndpoint = 'discoveryEndpoint224997188'; + $expectedResponse = new Instance(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setAuthorizedNetwork($authorizedNetwork); + $expectedResponse->setNodeCount($nodeCount); + $expectedResponse->setMemcacheFullVersion($memcacheFullVersion); + $expectedResponse->setDiscoveryEndpoint($discoveryEndpoint); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/rescheduleMaintenanceTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedInstance = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $rescheduleType = RescheduleType::RESCHEDULE_TYPE_UNSPECIFIED; + $request = (new RescheduleMaintenanceRequest()) + ->setInstance($formattedInstance) + ->setRescheduleType($rescheduleType); + $response = $gapicClient->rescheduleMaintenance($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.memcache.v1.CloudMemcache/RescheduleMaintenance', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getInstance(); + $this->assertProtobufEquals($formattedInstance, $actualValue); + $actualValue = $actualApiRequestObject->getRescheduleType(); + $this->assertProtobufEquals($rescheduleType, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/rescheduleMaintenanceTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function rescheduleMaintenanceExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/rescheduleMaintenanceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedInstance = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $rescheduleType = RescheduleType::RESCHEDULE_TYPE_UNSPECIFIED; + $request = (new RescheduleMaintenanceRequest()) + ->setInstance($formattedInstance) + ->setRescheduleType($rescheduleType); + $response = $gapicClient->rescheduleMaintenance($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/rescheduleMaintenanceTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateInstanceTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateInstanceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $authorizedNetwork = 'authorizedNetwork-1733809270'; + $nodeCount = 1539922066; + $memcacheFullVersion = 'memcacheFullVersion-1666834598'; + $discoveryEndpoint = 'discoveryEndpoint224997188'; + $expectedResponse = new Instance(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setAuthorizedNetwork($authorizedNetwork); + $expectedResponse->setNodeCount($nodeCount); + $expectedResponse->setMemcacheFullVersion($memcacheFullVersion); + $expectedResponse->setDiscoveryEndpoint($discoveryEndpoint); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateInstanceTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $updateMask = new FieldMask(); + $instance = new Instance(); + $instanceName = 'instanceName-737857344'; + $instance->setName($instanceName); + $instanceNodeCount = 310900968; + $instance->setNodeCount($instanceNodeCount); + $instanceNodeConfig = new NodeConfig(); + $nodeConfigCpuCount = 604896331; + $instanceNodeConfig->setCpuCount($nodeConfigCpuCount); + $nodeConfigMemorySizeMb = 701709349; + $instanceNodeConfig->setMemorySizeMb($nodeConfigMemorySizeMb); + $instance->setNodeConfig($instanceNodeConfig); + $request = (new UpdateInstanceRequest()) + ->setUpdateMask($updateMask) + ->setInstance($instance); + $response = $gapicClient->updateInstance($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.memcache.v1.CloudMemcache/UpdateInstance', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $actualValue = $actualApiRequestObject->getInstance(); + $this->assertProtobufEquals($instance, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateInstanceTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateInstanceExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateInstanceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $updateMask = new FieldMask(); + $instance = new Instance(); + $instanceName = 'instanceName-737857344'; + $instance->setName($instanceName); + $instanceNodeCount = 310900968; + $instance->setNodeCount($instanceNodeCount); + $instanceNodeConfig = new NodeConfig(); + $nodeConfigCpuCount = 604896331; + $instanceNodeConfig->setCpuCount($nodeConfigCpuCount); + $nodeConfigMemorySizeMb = 701709349; + $instanceNodeConfig->setMemorySizeMb($nodeConfigMemorySizeMb); + $instance->setNodeConfig($instanceNodeConfig); + $request = (new UpdateInstanceRequest()) + ->setUpdateMask($updateMask) + ->setInstance($instance); + $response = $gapicClient->updateInstance($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateInstanceTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateParametersTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateParametersTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $authorizedNetwork = 'authorizedNetwork-1733809270'; + $nodeCount = 1539922066; + $memcacheFullVersion = 'memcacheFullVersion-1666834598'; + $discoveryEndpoint = 'discoveryEndpoint224997188'; + $expectedResponse = new Instance(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setAuthorizedNetwork($authorizedNetwork); + $expectedResponse->setNodeCount($nodeCount); + $expectedResponse->setMemcacheFullVersion($memcacheFullVersion); + $expectedResponse->setDiscoveryEndpoint($discoveryEndpoint); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateParametersTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $updateMask = new FieldMask(); + $request = (new UpdateParametersRequest()) + ->setName($formattedName) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateParameters($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.memcache.v1.CloudMemcache/UpdateParameters', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateParametersTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateParametersExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateParametersTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $updateMask = new FieldMask(); + $request = (new UpdateParametersRequest()) + ->setName($formattedName) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateParameters($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateParametersTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getLocationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $locationId = 'locationId552319461'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Location(); + $expectedResponse->setName($name2); + $expectedResponse->setLocationId($locationId); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + $request = new GetLocationRequest(); + $response = $gapicClient->getLocation($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new GetLocationRequest(); + try { + $gapicClient->getLocation($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $locationsElement = new Location(); + $locations = [ + $locationsElement, + ]; + $expectedResponse = new ListLocationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setLocations($locations); + $transport->addResponse($expectedResponse); + $request = new ListLocationsRequest(); + $response = $gapicClient->listLocations($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new ListLocationsRequest(); + try { + $gapicClient->listLocations($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function applyParametersAsyncTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/applyParametersTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $authorizedNetwork = 'authorizedNetwork-1733809270'; + $nodeCount = 1539922066; + $memcacheFullVersion = 'memcacheFullVersion-1666834598'; + $discoveryEndpoint = 'discoveryEndpoint224997188'; + $expectedResponse = new Instance(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setAuthorizedNetwork($authorizedNetwork); + $expectedResponse->setNodeCount($nodeCount); + $expectedResponse->setMemcacheFullVersion($memcacheFullVersion); + $expectedResponse->setDiscoveryEndpoint($discoveryEndpoint); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/applyParametersTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new ApplyParametersRequest()) + ->setName($formattedName); + $response = $gapicClient->applyParametersAsync($request)->wait(); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.memcache.v1.CloudMemcache/ApplyParameters', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/applyParametersTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } +} diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/GPBMetadata/Google/Cloud/Migrationcenter/V1/Migrationcenter.php b/owl-bot-staging/MigrationCenter/v1/proto/src/GPBMetadata/Google/Cloud/Migrationcenter/V1/Migrationcenter.php new file mode 100644 index 0000000000000000000000000000000000000000..9d3e41b60dedd60c06b31228d7b1b6364f5c6605 GIT binary patch literal 48680 zcmdUYeQab`me<(T?rvXqyWOw994DDLFPTZw>DXx}nPlAE(<$3!cO|yVsj{7P##kK>GnKiuf2<5DG7R< zeW&V8maFx>t;yZW4!~9FwX#=hd(FvvSL2T+_zOzaO1oaGQ7U`m3oA2AUc0naYL_+^ z7}&-v0oz!L0^3->dQGWvwbW{j$6l$A)HwcY>}^&nQUmIN}FWsnYq-(W0%|gA_nw}1D3P9}Fakg5)%JtS~zT#E4X1qJ4dzE^#x2}0l zlTqS9F4k*1&AnQ!Qrp?cHHdh7L(*S6%v@%-(SDG8zH?Xk;Jz2@zM9#iy7U#e*OO>b@a_UL?mQ*k zCYV1=#Q4L+y{luFG~8070wzM#CoE!2_nf2`+eBi;O-*CE!DFGGO-)Gp)ie54HK3Ns zx=$^-(c`)ib0lo%Nss73zchT!eoV4FjVCB@A-BS5ZrREj4ASx;t*m1^W(h6`%`proi&T#0}281Pb^;dgD3ux%du}^~WA*O+Z#p7Fa4f8FdC?va(b2wu(E= z`d*_odWivDVL+c(&syLtP^Yn%)KGXyhg9mW_dtl!Ijsinm8yF}iG$PqZ}g2_RcGQW zXX!Fs`ZWDR*1^c0_yRWCSG{t(HTjYL>)~XzUKRl``H}ha;UqBks1^VFaAsJYVgQ;1 z+@DUV(<@C6+Kq=LEBxN?w)5)LR;AUbmL3#&(;ox<3_9o3(3aLJAmOlq=wVSkey`GO z@0F@WvmqKjDrQqmTPbf{VCcOOOh#+^!%x%q)fEeI1RZGh7Lu+@Fj92mRWyrG#DYC^ zfA*vr%LLJT35)QhYA0$0s#>IFz@r{6AAgM4<*8*XVod*Bt_viqbF%XiP`k`!fXoa zEI2_0ybpw0Y!A8u32x%6nm$Lk#m}E6j}P7y;QMH*>$) zuZI0;i%)f3sJm0W(c_*QPFSXfQ3W{PXeg_X=~c0QY#8~Kd$gc|K=v65My%PudB z^mTokUt3Uj%y@aN3AnUphB%&rGlkiUyx zt#3Y@IjN2dIk~@b%q#{;Nzzf1FbGl-1|bZOvw&{1(lk6}CmiZALXR>DJ z6Ned|vTFtMZG+`RXxG23M)n%jdTFb;4g6u-Zr52X3{Bb9pf&DD^Oi-oTc2^?Py<5K z7u4BqgnUY!oW-&;@$@-L9Z%1$X4f+#{nJ0w_i6fDed?t|WMJ@cHjhXPlR_5;UO*^Y zpa-6ihciQJ(4QIi>nSzBT1+=W`Ttv)=3z$|bzJg^HV{)0nA&^fa>*1hna9Km*bZx) zlOOTF58eOOuT-YltT*SIuxYw2$C6U;9aKe?!!9M8<5er0XK?GLA6p6{9&f4Pdb6@q zfoG<;P2U_9rQk&?NLCaXu0VQS4a3m@gPkNB+g-^Nh3Ox|Ci#Qv1h`KSg!BY+M|QiT2}tE>TGB( z^?Ook^!v2o>!g$nPrYO%Ei+DEi*vu-r&MUzm(;mJZY@8XDX!jLA-&@5<=nf=&?zn| zC-P!tF_)f$Hu0o-Ec|?7EmK%6<_g8aYR4Bo2}QjD?8n| z%kL($?}5-iP){*~ECzNF%%CC^a@g&=@Pm;(N1X62D{X~mV1k)-#6$yE(;$hq`^WxV zpL*h;R?amwz(dpiCpZmY5F~UOIE!jHz=$k6R=WmgUS%i~y;+yj_diXy)r%HB8phwr zBqb(MEro8tI^`#JI?>TX_Xo$+ae@2$h^D3^%+v1A5(FohZC*DVjd*4fj;1?{8aW4- z)!y!Isri6e?9kLiLaHrDFXp=L7u7Ky%Xu}TnPAwsf&sLeTTL$(XLH2q=8NEunS9|^ zc4ef`owu+pFsHx}JFNx_YqPVN%p8oTeo}9>A(hgS+vaD}l(GIuXl=5|rms(f58WT> zS7-gx4Rbmcw?N1_oWS>RRh@*W>&a_;P91NTnmEK_#YsD$p+emAnwxM5laqjb(vPd* z7UbDptB6C57UZkAspRD|>SELT+8&fAI3dgA9<7Ro$D;kDG#XVy@Ld)GxJ6zrB0Yia z{?k5nmi(-&lC|;z$+@nMH%f5awWF-bvH3F@3O4d!1EVaqa3IKBX~4nS^P_hCu2&Ou zonaV^l`4+*1Xofh>dh^$S=@Y}{cvw!E-K!At)yJGk~)8W9X;F+l@rFQ)xZ&*=X^mO zFR|AWXc5c*d@_j6C3U9eeb6q3P!OjWOoP1|jtk0nN}E;Ef8j-Tzuu?LEO;`bWWzNJp;Z??3p^NMx3L!;1>#p8Di>ai}P zJQ`KG73Iu%1f*Q(KqWpt{&?$RG|;z2T!DTcADM}Jj;wr3+`BOY_lJ`A~OT0vF-$xZAjRzYnU&g zQ;5ToWj^R`sVB|r*g!NX&#DtR;@zu4DHaZCHw+Cxd=Fs;=t?5x;w+z``VKyW>6@`- zdzqEh%T97s!oRp95A>pGv ztZ=tI#JopntEEQuNtD+y-lMMSe)Hzm)Vcg#?RW2cMK$VEt#PCq(w&Wv?rY5cCVO=9 zyIAzGV27Gd`0NM=F%j9QzvA?Gl<=r{lKV4#>hZ3_)m-H*b+*DMQyka9hYW_d*iT$! zSy)M>LaggT@hzNv>rz5^tg9SFbbBZ3Bjc*hlK|Fx!eF{3ys1 zYY0~yBU+T6(O!;$%~Xj6V3)DM5Q3@t6X3EmRdTlIi!-YS*G(Lo+*3HO(B z&n9$~k|6#gI(4xv_;$xBx2PmN&a7oa{xzT~ z8?q~^hufE(Lzn&e2!S?NZKp!?fe2b4#lJ#a`JP>(2~ zpt2vJ9|1M3KKhsi>SI&FDD(+Y0(C=U)tmb0s~^()(Jb|Tq~?BEUG%9cx{Z%c;Kb5K zNw*P9bR?8P=#j9AM@2C1H?(LXj2dq8;%jbX^qk)KO^<3$p!G*7;m}&YfI(p9 zphhNoiU@sLo+sD(1)_zIzJ=%~KAm>nR6}x3Es2a`hS~W}a18GLpOjL;Pb7hMByLL7 zlHIb6CT=2Ub5afIY2iR@NiaGf0TxM~CX025gKA#4iq~M|k?8weB$f3P1H0A>uy|Hv zj>35(5EAD24uT(=$V6@<5p}QW zalqQpl${tf#B`{y&PR39@LyAuT(RELp_BH_u|OSiEdydfov3;3`}O8s4q+dfvL{;W z0WC{6187DKAQkm)OQ-MI4^JW$-SG& zcg?tq#B~O->HUZ?QH3>xk4o}g3JJ@I`Q+c6Fc%J8A8-JL1KIKFxcf`T)Yt(FHmXL- zjlE)o4urU2pwpWWVM7zThv>_ClX>uroD5}%jmFDh!#7q`BtwMr(Z&|t5{`gPKYk(Z7>#5;8NV;eW zMzFV-hKHw?j`D@s#@;Ogy2{f8pzfRMROGYBeVEVYm)=e1{d9?Nr0_{~Y$ls4AW7nc zN@eD=BmIb!JKF))c}6`oyRufig@lWIarGAEIU7F+R=aQUG36jTh61&Vl}53&wS~AUQkRGg zKL)1<*U$;S5)S=1M3(NhTPpkg*yu!tjDn?L*o1JrL&XbmYq=mX)QBLPm zi18DM_ia`nAVnduGq)%d!&G3QUFiCT)Cf?k6X)lr!W z>0=1^rs5?;4k=>Y@^-uFdHM~_TM9v%T51YC*!^hqQO;LnQdm@{BM*>%6QctAIj0Z6 z{a#89`oCaH40lBaG|_mjrbQ zxH&-=vluDUO?5gtVoKOwUd`m^(?QZ+SPDV*WalyK+Df-7%|NJac@CVgEmS3KjIR}ocb)#ad;gu`fm9o34&UT`GGfp(g$k3lV z7svTbhyD}N+*xPv*&%0Fw;mv)V^_jkN%-uN5>sr{K@OT|I*E>GCPga~B08d%ly4od z*n+({47P-H2A>XS{gMX;DsCy%R<_1G#p1$An(RK5$9BH;AHQ#Y(c8wWHoBT$%f zq2#shK*N%l-;>Ug8oal=b+@=%-;$Wf;VHY#(eZ_KfLH&PU$PFQ!+E>sLYK-QP@s z=uu)I(r0BUvxF^xgxAR9{M-^jI@bNg6gJ3X>O!PPAyZgM=L;F^nfR#9D}s39fVWd4 zC*8U_=}$I3vA#6-c5x{;7q9IB17a>i_5_3x@TEc-_**|HLW3-13#;_5pHg$f@0N4R zq1P$5sz&0=;5@CKqzRyc9}rIgaQ6j*3%bZb}STW?G z3ez=KOa{^aU@}zqjJQUU;s6W<(Y4gcD1d)2g@YlooTJd8_8`dvm8^u%eF@Rba2IUq zLm9gUHczd6aqgi1oq7w23Zf0z``@D0LH}7bRNHP9y$`64j?t&>%zSyfmEkTd1lQE5 zmRGIR_C63UB*OWom0fgB&qTpnBsj#1+#d(82>s?1^h|LvyS(;Zw;cn5Eks_2>?my5 z=sWC?r7W~PDl$UqTl8&ac|Mn)r9AVLyR3#|bACN8{OnH40D`-tRPc)=5=mN34WtC4 zYKj(jMBdvi7K%dNVEwzbb{+NAL@lD`P48>k{e-s-D9yDxt1|;M@YrG>V&DM;_li=% zFG$z^N<$Bulpv558={h;Gw4Fkj1tKq^h_Us`>GoBe~@l0^jh4iG~pV96HX5Vn~Mfw z#_&5SWKPf)jBZV`AX{GZUZt$n?Iac?Ku{Ubg7jmuhjoUGTmWeS4k_n7z*&)w3~VdZrgV>w*WgS?{0xj>%?g|mr@OQifEBj?yM!FJ#cn%fu@!8T7k3K z;h{n)kChetNVz3=JqZUM0rBJ2G|HEC(Qe3PmdlZ11Gt6T&}5dthw(JMwwi;shNnyE zW#|`B(83MaPgeW6;}_ zcy5X~P(wtAa3C(C=)P~+yx62Um=2`Suz!GlV83CPEwUAX9fu~fi@5?dIYuw&2ln&; z%!emghVIM8-;S@D-Td4ap!?G}dEfUfNq)#5BSgYH7?MmMeaPl~nQQKn+z|>F!Ftdk zA9in)SsK%VmUGa>SzK7^;2@rm^gK`xX{gK@1*F$lpQL-}|r}%2Phbq+B6=zm+LZ zb%HElc|XKKXYt;y4^tK{!D%{mT;J^knpbCb=;DD&*@sEHc4*2Db3yub!lXjXcOJB$ z%v61#Vk_FW`HJq?0d-~sYsANQ1}5bUUg$di6g+ZIu08O}nTSCNUgWht@E;1@fQsrZ zh z{#_XxWT+{eEGCY-sV=6wE?jSLs5RK)y$aQJA$OZ_UPjlwOhHXd0I?}2k>HPqN9ewY z!{6@f)1~pt>g*DS0IX3p8XX*gqbrn=xHqEa;kzTbUG4dYlaaq}hr*e2Gc z1l~lYWq>N3a1=M8lk*p7BFsxKct=#w@8Xp240$fY!00f_03*Xv#`#@H(9XCI#7#)> zNK&N%mE9#qLR&|6Vct2P*HsFq+=<;AvFQz&R(%yMyeEJ~qkj zk0OJIqkTeiN&zfRMLoTR0`m`0$5^Lc>=7vyBPB279MW!V%@L%$2E@Y;6{T?h;|cZT zfh|zf_t+NcD?|ca&wg{V6vE~0&fo*THi46HXU(S%;qn=)L3uDtp&sYmz@C;xpFbj8 zO%f1!VLF&SB2=Q1v3EstYmwyF8&U6Ma`t#zl~Rp2Pd}FD5?EW?djNZRyM4zn7jhTT z?Ddl?so|CGGBfWVyQ@+(#ars4up_CL9pgwtQ*%c|0_I-3HCBVU#+>kX>3c}+Jz*B* zHmY&N*x(~V%Xv?!7!!R&kjLIv$7uPTygF7fZ1)ktcK;CErcl=Dz6o}-+*BvwzM-Ec zrr~+(qU-(?)yJ2C?1irNko|vvD$Tvzzm7H1U~mw2)=zwZ(Bi>pK4U)|T{1T_g$D%% z6!&x(#m<0~q1m0_S|5l4oEcOnG$0r~!_hWSxRfqCM@kU!$dt^^6F9W?wo54aF<6V|DVZc-dW2cRHvAk#|h0U zT#nyPsiBabLpR0nzyOnD;vFtJ`J5NfI<026M~w7GQMhvxf_1q(Wq`z~)WwTb~&_p#~Vsu>r)2?Cp*{ ztp@#Xk+TU^>8KPXCSpsZN8cESVC(PCTvX>vL4CHOx!TVC^#O!h1uvkMfH(FxHE@4`NMxYvO0DTKrd zZ66I&R-ZU)Y77O+5!$cm3aZy}T=RmnJ3ycsrS=%&&Qbc%CZy0HpL$b{Lg*(s`S-bI zDn-{!$*mw<(C;6@ilaj(UAhZ0ToPVLzOYv=$N;1od`;AI-aPX)-# zd}quKV)-)pd@c{c34cD~)%9gRI9SUfqyggc5964tgUpy#YkRw!a0T*IavV7{19<#G z=>_tDp60{Q;D5nTqBq5ml1;I?IA$gXBn?HY(Rp>^4ssYMoq2$$$JgPhYgQ=qr6L!5COj$N-eVK$R2bv|e1xy7Lp;PFyMVMwHi$?K#6wrK zRPC{1toyn;$7xW}3rXVg6^zNh>4eD-Rhb9WWBXpn=HR4XRCrtyP~X}sn@f!B&L^#+ z#*73UV-gf+Svjct3XU1Ren9I}c9ks8U4zX2mUBy;DdU)=(x#gWij69qB&3cfDffec z>VEJB*PN1i0_rchjOz^?kybtwKS>J-Zf$Qz^sC_nDOUvsk_*8oXb^~~9K&G4W>}-+ z7QMvwf!Jc7HO}BI%iH1!sv(+Z};KqaQo2b92649xuJ*p=Msxc9Bg>XE{ztY z6WK~A9Bcyl!;qI@;#2iza4j=tZ6b>5VvnZN!!593={~7WM;?%4uS_u^%n#k~rqreV zmJ2xraF!QQRIDlcqsW|%d-jnBQQYyJ4QOKfkQlk~oVHsb$F^|)mk!tAa9}!Vpe-yQ zY5w}0Kd|3MT(D}*```eLKD-&5swyq1fs2z09`;+`Dr1#tRx(~a(jLy7IKgO|XcN}m8_RKB1&toY~ z$rQ`!Wh7Iq+RQYE;FBATO{wq74`gnjo_r<;HT_z5fnO0VWzLCtNXQH z$}Z&Te#dvStGCc&nc~40^0~DYsBE<(ZvceEcMvSb6MZZMitk~LoX$xlD~DGnuyWi9 zb+%JBQ(7O(H>4=QZXu~JX2hWT5Bf-pl`1rV7cQB?j^=DfnIqy$gELouknZ&+pC9@( z{pIB4cAS@??oiv0)A0VOy(h-w<4coWv_T6_deh?9`CAC^Tx$pzQO zp!N8S1wQoQ9j-jOUE#aLj3#VP2am$$B9rq1W9%C+x@VD1(&ppHcX10aU2w?hHOBVq zb?iPkN*FDzP^Qk<3rJ=#KS)WHq%W3dfwzKX(AbnZzsBe1tcdx*NC+ahPJ7YIz-u?iyDR7NlCCg zE{0b)^a;8ca412#tMwC`>XMm%CX~=O`N~K2B)iiWr3Gzms&v1uEOsMs! z5hL;A0%_QQN&)C>I0t^?)Yv!r)p@8A!BLgwZWOW^^oxih3rOdyYAibPq6Wm$jE?Sx zrtE4@bb~*I`h^n%TrD6m|ui zJP*PFzc^CZ@>=C)1uhqyrn91m$e*rm16s$SBw4YQW_zzx)f+V!Ov{--RAar?zJpM$ zGK?csK0;`*KFM>8sY?gI6HE1)_rQ5sosYCH3wzSSwOfx@V4R1)fQ(7)uh7})-8#Ll z9*=aYNg7d6qE>X8PPdNn@o6!krCYZi@foPM@4#CuqN-c_vbv~|Ho*tmqI2qMKfSVz zt_;4UE@idd1*YZ7JZNy%&@;!QrKk%km`h81M?6)a3 z__6Qwt5ac(oX%X6Qai90VOTQPYH6cG=)G6$yD6j3s7vHbsv_#1bgQuJC5LN@4+<*k zl308=k;Zk0aBJ&XYJuL99o|K!Xs9T5bfr}JxzizEG)Yw7~R@I`x!q!+_J#s$ao>7^|EM8OTok;m^M^E&q~)&2qO zpfx9{!o+seaPV+#Is4v7>hkw-rX@!(Z`C*FIUb1ev9n7nh-fIjm76Idv|$N}?rY28 z`VJ^l(%B@xzM9J|7K-mJ7T&`cx`HunW((`$Id5^xGnJcE>EflHUG3R;p>_P3` zUqdYIps*E6(TBOPOx80y^qwVZMYxbiC7_`jfCay9Cr=I)e23B65)5 z?pE0VE7i3XoJPxY={&hD_iHkfhR1W3lkbq$+#N~**?1uAp^*2Q$`ZiOm03orbN5mU zk+*@9i+pC0S2KAk*Kixxhtr+7NXTZO*h#;I0@4Q@guq)?$i7c~b1SRarR@7CJpex~ zlS*bG?tq(AFCN&sK&zR?1>}5g6ZbGIfhKb&MS-Ewe$&`Ff@EU6Z&fi89g;Y70LE7gi)VkMk7CuRz<(avnqnW7~84vo4Q!n$h^4p0- zL!XvgfSrE>1F+*xT*q#pcJwjW*pnx_bk)=X49^H@Txkl`wHUu^?iZ4i&Gcq)5%F~2 zWrwN`O5yXQYZPj2u)1hA3`n+J-`v}t$m}-S4`Q@)S*SbF0ywy>KxRJlxmMDd5BIT+ zapjZrDLtz+vO`a)e3Pd1Uts9M)Obo+S4lGTjy`7ScB1LhRTIr3lgPY#y$2F$a{24f z;HUMK!_L3L(VOqk<_7wfU&kKh-L;=V(H?@bPj`)GhS9v~PWOPOZ&x8Y455g$bpIX7 zyIgkQYqO3$ku=uB;Pj-~71cU2Sfs$ngtkTMHTNg_K2CpD4F(@N>%Uv_+NdGfE`5@I zN|R2w!%3M9BG-J{a1eTXdaQ&E)TEyN8<_1nk8T{aJEvgaxA+@j=Wjn12$E{|uxi zJi`Z>fYf3=%(yM2_SKKmm(_)xdVQzrO+s1`AVP!coM)c|6<{rKrPZrC6<=8_C0xs?MGHBT& zbGvrdeEyv%pEp<@Xz*y%^sb8|>ii-d4|2W#D4vdeq}{q1JS`mcm%(|SF|pQWlDhKJ z7o!q<3#7#*v5Xw|9~f!A>dMj|VN#|$E?Oqd=6qOq_+z$DQ@3sjr|E|ey^&`wAAJKD zvz{H!NzHm`Z1A(2tVHgnkEZg&ne{sq{^OhV3^JKn&rQvM?PfhUkC|rL@oXzXr(?%T_Byvth}HI? zxA>I=4gnt}=QoklgzD~MbgtF~A$#b1yh}o?Jj+_i1he%u?Y_pMnuofdQ_RO>8u{Xa z18E)bFJ0(*O>_c#x@*6L=-o+<-VOJSUeKdTY39;vtyi5P78xAdv=W#(u^t91`*L@5 z)GYa}sN!+W5xxIl87oCw*yqZLP}-C8H<3aOwJ*TPu_w?)+8cCUwA!e_H{4rc_0Wv} zAcpOaelj$8;@^K2T!H3EuDop};0mGEX6$yoKhjAr!}aJg;GRgPtpk_g;iSgI`O^qz z#YD=u9edWF-_{H|!8LvY+?@{3wi#xk*?vg=zf&Ud^hoV<6>e?@YmtzxkJFE%xF%oe z+*R?sq(x+ln_Q89jF5cI?Pcbt^%c?1CqPXEUt-k4%@d-wXG6`=IPFQ@65rE*eM+o9 zd3~U)lqM`J4RYTFaw7i{BNuL-5V@U0%gdK8%bF!5LkLX1x;+SVLey2uu{)D#<3>9f z)RI|_@xFTR&qnwDtB$OdW$!oqWI7%_j+E$T)W|0syI6>KF$md1RU=<=(_yw?FgR#E zqQfWd`&0eqe)kCI1Xj5)iAXPlhlN-C9IRDWosM+v$}={e(@Y~6H%0thiT*T9WKKI< zdRoHi;V3W%@xA(@_~`iT#3rmI(ktPF{Cv_08H*0KLpd)@rA31IWJ>dOAm<4n5=Da~ zI%eeG!f_*ZVyLzj2tJT=JIxBCxO7|?357SZ(|!i4TmzHH|o!Iv-Uryxsn`AB1V@6 zhC^_w$E<%Do;2fLO`=jtU-@KfI(omj^EYsW0cwj3%YL*K>tUwAUhY2p9rw+!gn7jg zWDb%r5ll$H{1bSxNrZ>NCOLlY=wmQQrZGf5hk`&2BnEo!OjPI_ge(#xf|G+BVMiES z_!|l6va^#x$+8c356ui;xqOHf`_I0?AP6QnybN!-gh>53HXAGk{fTbd%vcOE{bqmZ zL*|To&AzcFrK{dopho?mHGN#(IDc7eI6aC)Hk`CISSGOHq=O5aKRC#|;mGiN*h*&X zw5fhg+spzwsm-igo1xq7z+exy{4KN?-9iSD1Gmt=>)@cAo;Gr1a0zHFyp0ShmJM|O z&>QH+<)f_ASROGIe!)Vipsk%OrADPSft-ckOi$ctw;QeL$;tco@5f$FmiF3rCOKr_ zC8VVA#ltiIvrj#Pjy7k_%=uVY;R*#qt@ORWBq0d;_#KcYcj}X|K~7?L2>pvaZERla zc=G4_pIVTE{Ml-KZ)+m<(TVk|ADb2%8{A}LBi3ePWBux<{jPwSp5{i=)3HX=)9Y6^ zk8`lVE6=HM{oj@Gc5}~r;hOTFP%Z9Cd3yTUN(%)rQ3?~M#UFZG<2ShFHE#D%Jyh!d E0XwFj!~g&Q literal 0 HcmV?d00001 diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AddAssetsToGroupRequest.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AddAssetsToGroupRequest.php new file mode 100644 index 000000000000..c55045d848d3 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AddAssetsToGroupRequest.php @@ -0,0 +1,257 @@ +google.cloud.migrationcenter.v1.AddAssetsToGroupRequest + */ +class AddAssetsToGroupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Group reference. + * + * Generated from protobuf field string group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $group = ''; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + /** + * Required. List of assets to be added. + * The maximum number of assets that can be added in a single request is + * 1000. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.AssetList assets = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $assets = null; + /** + * Optional. When this value is set to `false` and one of the given assets is + * already an existing member of the group, the operation fails with an + * `Already Exists` error. When set to `true` this situation is silently + * ignored by the server. + * Default value is `false`. + * + * Generated from protobuf field bool allow_existing = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $allow_existing = false; + + /** + * @param string $group Required. Group reference. Please see + * {@see MigrationCenterClient::groupName()} for help formatting this field. + * + * @return \Google\Cloud\MigrationCenter\V1\AddAssetsToGroupRequest + * + * @experimental + */ + public static function build(string $group): self + { + return (new self()) + ->setGroup($group); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $group + * Required. Group reference. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @type \Google\Cloud\MigrationCenter\V1\AssetList $assets + * Required. List of assets to be added. + * The maximum number of assets that can be added in a single request is + * 1000. + * @type bool $allow_existing + * Optional. When this value is set to `false` and one of the given assets is + * already an existing member of the group, the operation fails with an + * `Already Exists` error. When set to `true` this situation is silently + * ignored by the server. + * Default value is `false`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Required. Group reference. + * + * Generated from protobuf field string group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getGroup() + { + return $this->group; + } + + /** + * Required. Group reference. + * + * Generated from protobuf field string group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setGroup($var) + { + GPBUtil::checkString($var, True); + $this->group = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + + /** + * Required. List of assets to be added. + * The maximum number of assets that can be added in a single request is + * 1000. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.AssetList assets = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\MigrationCenter\V1\AssetList|null + */ + public function getAssets() + { + return $this->assets; + } + + public function hasAssets() + { + return isset($this->assets); + } + + public function clearAssets() + { + unset($this->assets); + } + + /** + * Required. List of assets to be added. + * The maximum number of assets that can be added in a single request is + * 1000. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.AssetList assets = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\MigrationCenter\V1\AssetList $var + * @return $this + */ + public function setAssets($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\AssetList::class); + $this->assets = $var; + + return $this; + } + + /** + * Optional. When this value is set to `false` and one of the given assets is + * already an existing member of the group, the operation fails with an + * `Already Exists` error. When set to `true` this situation is silently + * ignored by the server. + * Default value is `false`. + * + * Generated from protobuf field bool allow_existing = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getAllowExisting() + { + return $this->allow_existing; + } + + /** + * Optional. When this value is set to `false` and one of the given assets is + * already an existing member of the group, the operation fails with an + * `Already Exists` error. When set to `true` this situation is silently + * ignored by the server. + * Default value is `false`. + * + * Generated from protobuf field bool allow_existing = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setAllowExisting($var) + { + GPBUtil::checkBool($var); + $this->allow_existing = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AggregateAssetsValuesRequest.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AggregateAssetsValuesRequest.php new file mode 100644 index 000000000000..38de4a10663f --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AggregateAssetsValuesRequest.php @@ -0,0 +1,139 @@ +google.cloud.migrationcenter.v1.AggregateAssetsValuesRequest + */ +class AggregateAssetsValuesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Parent value for `AggregateAssetsValuesRequest`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $parent = ''; + /** + * Array of aggregations to perform. + * Up to 25 aggregations can be defined. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.Aggregation aggregations = 2; + */ + private $aggregations; + /** + * The aggregation will be performed on assets that match the provided filter. + * + * Generated from protobuf field string filter = 3; + */ + protected $filter = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Parent value for `AggregateAssetsValuesRequest`. + * @type array<\Google\Cloud\MigrationCenter\V1\Aggregation>|\Google\Protobuf\Internal\RepeatedField $aggregations + * Array of aggregations to perform. + * Up to 25 aggregations can be defined. + * @type string $filter + * The aggregation will be performed on assets that match the provided filter. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Required. Parent value for `AggregateAssetsValuesRequest`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Parent value for `AggregateAssetsValuesRequest`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Array of aggregations to perform. + * Up to 25 aggregations can be defined. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.Aggregation aggregations = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAggregations() + { + return $this->aggregations; + } + + /** + * Array of aggregations to perform. + * Up to 25 aggregations can be defined. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.Aggregation aggregations = 2; + * @param array<\Google\Cloud\MigrationCenter\V1\Aggregation>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAggregations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\Aggregation::class); + $this->aggregations = $arr; + + return $this; + } + + /** + * The aggregation will be performed on assets that match the provided filter. + * + * Generated from protobuf field string filter = 3; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * The aggregation will be performed on assets that match the provided filter. + * + * Generated from protobuf field string filter = 3; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AggregateAssetsValuesResponse.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AggregateAssetsValuesResponse.php new file mode 100644 index 000000000000..b41c3db831c6 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AggregateAssetsValuesResponse.php @@ -0,0 +1,67 @@ +google.cloud.migrationcenter.v1.AggregateAssetsValuesResponse + */ +class AggregateAssetsValuesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The aggregation results. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.AggregationResult results = 1; + */ + private $results; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\MigrationCenter\V1\AggregationResult>|\Google\Protobuf\Internal\RepeatedField $results + * The aggregation results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * The aggregation results. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.AggregationResult results = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getResults() + { + return $this->results; + } + + /** + * The aggregation results. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.AggregationResult results = 1; + * @param array<\Google\Cloud\MigrationCenter\V1\AggregationResult>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setResults($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\AggregationResult::class); + $this->results = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Aggregation.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Aggregation.php new file mode 100644 index 000000000000..5035de75b22c --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Aggregation.php @@ -0,0 +1,209 @@ +google.cloud.migrationcenter.v1.Aggregation + */ +class Aggregation extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the field on which to aggregate. + * + * Generated from protobuf field string field = 1; + */ + protected $field = ''; + protected $aggregation_function; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $field + * The name of the field on which to aggregate. + * @type \Google\Cloud\MigrationCenter\V1\Aggregation\Count $count + * Count the number of matching objects. + * @type \Google\Cloud\MigrationCenter\V1\Aggregation\Sum $sum + * Sum over a numeric field. + * @type \Google\Cloud\MigrationCenter\V1\Aggregation\Histogram $histogram + * Creates a bucketed histogram of field values. + * @type \Google\Cloud\MigrationCenter\V1\Aggregation\Frequency $frequency + * Creates a frequency distribution of all field values. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * The name of the field on which to aggregate. + * + * Generated from protobuf field string field = 1; + * @return string + */ + public function getField() + { + return $this->field; + } + + /** + * The name of the field on which to aggregate. + * + * Generated from protobuf field string field = 1; + * @param string $var + * @return $this + */ + public function setField($var) + { + GPBUtil::checkString($var, True); + $this->field = $var; + + return $this; + } + + /** + * Count the number of matching objects. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.Aggregation.Count count = 2; + * @return \Google\Cloud\MigrationCenter\V1\Aggregation\Count|null + */ + public function getCount() + { + return $this->readOneof(2); + } + + public function hasCount() + { + return $this->hasOneof(2); + } + + /** + * Count the number of matching objects. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.Aggregation.Count count = 2; + * @param \Google\Cloud\MigrationCenter\V1\Aggregation\Count $var + * @return $this + */ + public function setCount($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\Aggregation\Count::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Sum over a numeric field. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.Aggregation.Sum sum = 3; + * @return \Google\Cloud\MigrationCenter\V1\Aggregation\Sum|null + */ + public function getSum() + { + return $this->readOneof(3); + } + + public function hasSum() + { + return $this->hasOneof(3); + } + + /** + * Sum over a numeric field. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.Aggregation.Sum sum = 3; + * @param \Google\Cloud\MigrationCenter\V1\Aggregation\Sum $var + * @return $this + */ + public function setSum($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\Aggregation\Sum::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Creates a bucketed histogram of field values. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.Aggregation.Histogram histogram = 4; + * @return \Google\Cloud\MigrationCenter\V1\Aggregation\Histogram|null + */ + public function getHistogram() + { + return $this->readOneof(4); + } + + public function hasHistogram() + { + return $this->hasOneof(4); + } + + /** + * Creates a bucketed histogram of field values. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.Aggregation.Histogram histogram = 4; + * @param \Google\Cloud\MigrationCenter\V1\Aggregation\Histogram $var + * @return $this + */ + public function setHistogram($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\Aggregation\Histogram::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Creates a frequency distribution of all field values. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.Aggregation.Frequency frequency = 5; + * @return \Google\Cloud\MigrationCenter\V1\Aggregation\Frequency|null + */ + public function getFrequency() + { + return $this->readOneof(5); + } + + public function hasFrequency() + { + return $this->hasOneof(5); + } + + /** + * Creates a frequency distribution of all field values. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.Aggregation.Frequency frequency = 5; + * @param \Google\Cloud\MigrationCenter\V1\Aggregation\Frequency $var + * @return $this + */ + public function setFrequency($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\Aggregation\Frequency::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * @return string + */ + public function getAggregationFunction() + { + return $this->whichOneof("aggregation_function"); + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Aggregation/Count.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Aggregation/Count.php new file mode 100644 index 000000000000..f55240e0af88 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Aggregation/Count.php @@ -0,0 +1,36 @@ +google.cloud.migrationcenter.v1.Aggregation.Count + */ +class Count extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Count::class, \Google\Cloud\MigrationCenter\V1\Aggregation_Count::class); + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Aggregation/Frequency.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Aggregation/Frequency.php new file mode 100644 index 000000000000..cf3d70ec7ef9 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Aggregation/Frequency.php @@ -0,0 +1,36 @@ +google.cloud.migrationcenter.v1.Aggregation.Frequency + */ +class Frequency extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Frequency::class, \Google\Cloud\MigrationCenter\V1\Aggregation_Frequency::class); + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Aggregation/Histogram.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Aggregation/Histogram.php new file mode 100644 index 000000000000..73db78d7c763 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Aggregation/Histogram.php @@ -0,0 +1,102 @@ +google.cloud.migrationcenter.v1.Aggregation.Histogram + */ +class Histogram extends \Google\Protobuf\Internal\Message +{ + /** + * Lower bounds of buckets. + * The response will contain `n+1` buckets for `n` bounds. + * The first bucket will count all assets for which the field value is + * smaller than the first bound. + * Subsequent buckets will count assets for which the field value is + * greater or equal to a lower bound and smaller than the next one. + * The last bucket will count assets for which the field value is greater or + * equal to the final lower bound. + * You can define up to 20 lower bounds. + * + * Generated from protobuf field repeated double lower_bounds = 1; + */ + private $lower_bounds; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $lower_bounds + * Lower bounds of buckets. + * The response will contain `n+1` buckets for `n` bounds. + * The first bucket will count all assets for which the field value is + * smaller than the first bound. + * Subsequent buckets will count assets for which the field value is + * greater or equal to a lower bound and smaller than the next one. + * The last bucket will count assets for which the field value is greater or + * equal to the final lower bound. + * You can define up to 20 lower bounds. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Lower bounds of buckets. + * The response will contain `n+1` buckets for `n` bounds. + * The first bucket will count all assets for which the field value is + * smaller than the first bound. + * Subsequent buckets will count assets for which the field value is + * greater or equal to a lower bound and smaller than the next one. + * The last bucket will count assets for which the field value is greater or + * equal to the final lower bound. + * You can define up to 20 lower bounds. + * + * Generated from protobuf field repeated double lower_bounds = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getLowerBounds() + { + return $this->lower_bounds; + } + + /** + * Lower bounds of buckets. + * The response will contain `n+1` buckets for `n` bounds. + * The first bucket will count all assets for which the field value is + * smaller than the first bound. + * Subsequent buckets will count assets for which the field value is + * greater or equal to a lower bound and smaller than the next one. + * The last bucket will count assets for which the field value is greater or + * equal to the final lower bound. + * You can define up to 20 lower bounds. + * + * Generated from protobuf field repeated double lower_bounds = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setLowerBounds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::DOUBLE); + $this->lower_bounds = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Histogram::class, \Google\Cloud\MigrationCenter\V1\Aggregation_Histogram::class); + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Aggregation/Sum.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Aggregation/Sum.php new file mode 100644 index 000000000000..5181d3c7a311 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Aggregation/Sum.php @@ -0,0 +1,36 @@ +google.cloud.migrationcenter.v1.Aggregation.Sum + */ +class Sum extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Sum::class, \Google\Cloud\MigrationCenter\V1\Aggregation_Sum::class); + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AggregationResult.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AggregationResult.php new file mode 100644 index 000000000000..bc0d13e64663 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AggregationResult.php @@ -0,0 +1,181 @@ +google.cloud.migrationcenter.v1.AggregationResult + */ +class AggregationResult extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string field = 1; + */ + protected $field = ''; + protected $result; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $field + * @type \Google\Cloud\MigrationCenter\V1\AggregationResult\Count $count + * @type \Google\Cloud\MigrationCenter\V1\AggregationResult\Sum $sum + * @type \Google\Cloud\MigrationCenter\V1\AggregationResult\Histogram $histogram + * @type \Google\Cloud\MigrationCenter\V1\AggregationResult\Frequency $frequency + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string field = 1; + * @return string + */ + public function getField() + { + return $this->field; + } + + /** + * Generated from protobuf field string field = 1; + * @param string $var + * @return $this + */ + public function setField($var) + { + GPBUtil::checkString($var, True); + $this->field = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.cloud.migrationcenter.v1.AggregationResult.Count count = 2; + * @return \Google\Cloud\MigrationCenter\V1\AggregationResult\Count|null + */ + public function getCount() + { + return $this->readOneof(2); + } + + public function hasCount() + { + return $this->hasOneof(2); + } + + /** + * Generated from protobuf field .google.cloud.migrationcenter.v1.AggregationResult.Count count = 2; + * @param \Google\Cloud\MigrationCenter\V1\AggregationResult\Count $var + * @return $this + */ + public function setCount($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\AggregationResult\Count::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Generated from protobuf field .google.cloud.migrationcenter.v1.AggregationResult.Sum sum = 3; + * @return \Google\Cloud\MigrationCenter\V1\AggregationResult\Sum|null + */ + public function getSum() + { + return $this->readOneof(3); + } + + public function hasSum() + { + return $this->hasOneof(3); + } + + /** + * Generated from protobuf field .google.cloud.migrationcenter.v1.AggregationResult.Sum sum = 3; + * @param \Google\Cloud\MigrationCenter\V1\AggregationResult\Sum $var + * @return $this + */ + public function setSum($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\AggregationResult\Sum::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Generated from protobuf field .google.cloud.migrationcenter.v1.AggregationResult.Histogram histogram = 4; + * @return \Google\Cloud\MigrationCenter\V1\AggregationResult\Histogram|null + */ + public function getHistogram() + { + return $this->readOneof(4); + } + + public function hasHistogram() + { + return $this->hasOneof(4); + } + + /** + * Generated from protobuf field .google.cloud.migrationcenter.v1.AggregationResult.Histogram histogram = 4; + * @param \Google\Cloud\MigrationCenter\V1\AggregationResult\Histogram $var + * @return $this + */ + public function setHistogram($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\AggregationResult\Histogram::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Generated from protobuf field .google.cloud.migrationcenter.v1.AggregationResult.Frequency frequency = 5; + * @return \Google\Cloud\MigrationCenter\V1\AggregationResult\Frequency|null + */ + public function getFrequency() + { + return $this->readOneof(5); + } + + public function hasFrequency() + { + return $this->hasOneof(5); + } + + /** + * Generated from protobuf field .google.cloud.migrationcenter.v1.AggregationResult.Frequency frequency = 5; + * @param \Google\Cloud\MigrationCenter\V1\AggregationResult\Frequency $var + * @return $this + */ + public function setFrequency($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\AggregationResult\Frequency::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * @return string + */ + public function getResult() + { + return $this->whichOneof("result"); + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AggregationResult/Count.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AggregationResult/Count.php new file mode 100644 index 000000000000..82125a40ceb6 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AggregationResult/Count.php @@ -0,0 +1,63 @@ +google.cloud.migrationcenter.v1.AggregationResult.Count + */ +class Count extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field int64 value = 1; + */ + protected $value = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $value + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field int64 value = 1; + * @return int|string + */ + public function getValue() + { + return $this->value; + } + + /** + * Generated from protobuf field int64 value = 1; + * @param int|string $var + * @return $this + */ + public function setValue($var) + { + GPBUtil::checkInt64($var); + $this->value = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Count::class, \Google\Cloud\MigrationCenter\V1\AggregationResult_Count::class); + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AggregationResult/Frequency.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AggregationResult/Frequency.php new file mode 100644 index 000000000000..abcbadcdaa59 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AggregationResult/Frequency.php @@ -0,0 +1,63 @@ +google.cloud.migrationcenter.v1.AggregationResult.Frequency + */ +class Frequency extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field map values = 1; + */ + private $values; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\MapField $values + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field map values = 1; + * @return \Google\Protobuf\Internal\MapField + */ + public function getValues() + { + return $this->values; + } + + /** + * Generated from protobuf field map values = 1; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setValues($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::INT64); + $this->values = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Frequency::class, \Google\Cloud\MigrationCenter\V1\AggregationResult_Frequency::class); + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AggregationResult/Histogram.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AggregationResult/Histogram.php new file mode 100644 index 000000000000..0343bc4390f2 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AggregationResult/Histogram.php @@ -0,0 +1,86 @@ +google.cloud.migrationcenter.v1.AggregationResult.Histogram + */ +class Histogram extends \Google\Protobuf\Internal\Message +{ + /** + * Buckets in the histogram. + * There will be `n+1` buckets matching `n` lower bounds in the request. + * The first bucket will be from -infinity to the first bound. + * Subsequent buckets will be between one bound and the next. + * The final bucket will be from the final bound to infinity. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket buckets = 1; + */ + private $buckets; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\MigrationCenter\V1\AggregationResult\Histogram\Bucket>|\Google\Protobuf\Internal\RepeatedField $buckets + * Buckets in the histogram. + * There will be `n+1` buckets matching `n` lower bounds in the request. + * The first bucket will be from -infinity to the first bound. + * Subsequent buckets will be between one bound and the next. + * The final bucket will be from the final bound to infinity. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Buckets in the histogram. + * There will be `n+1` buckets matching `n` lower bounds in the request. + * The first bucket will be from -infinity to the first bound. + * Subsequent buckets will be between one bound and the next. + * The final bucket will be from the final bound to infinity. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket buckets = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getBuckets() + { + return $this->buckets; + } + + /** + * Buckets in the histogram. + * There will be `n+1` buckets matching `n` lower bounds in the request. + * The first bucket will be from -infinity to the first bound. + * Subsequent buckets will be between one bound and the next. + * The final bucket will be from the final bound to infinity. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket buckets = 1; + * @param array<\Google\Cloud\MigrationCenter\V1\AggregationResult\Histogram\Bucket>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setBuckets($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\AggregationResult\Histogram\Bucket::class); + $this->buckets = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Histogram::class, \Google\Cloud\MigrationCenter\V1\AggregationResult_Histogram::class); + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AggregationResult/Histogram/Bucket.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AggregationResult/Histogram/Bucket.php new file mode 100644 index 000000000000..bfc4030ab137 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AggregationResult/Histogram/Bucket.php @@ -0,0 +1,141 @@ +google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket + */ +class Bucket extends \Google\Protobuf\Internal\Message +{ + /** + * Lower bound - inclusive. + * + * Generated from protobuf field double lower_bound = 1; + */ + protected $lower_bound = 0.0; + /** + * Upper bound - exclusive. + * + * Generated from protobuf field double upper_bound = 2; + */ + protected $upper_bound = 0.0; + /** + * Count of items in the bucket. + * + * Generated from protobuf field int64 count = 3; + */ + protected $count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $lower_bound + * Lower bound - inclusive. + * @type float $upper_bound + * Upper bound - exclusive. + * @type int|string $count + * Count of items in the bucket. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Lower bound - inclusive. + * + * Generated from protobuf field double lower_bound = 1; + * @return float + */ + public function getLowerBound() + { + return $this->lower_bound; + } + + /** + * Lower bound - inclusive. + * + * Generated from protobuf field double lower_bound = 1; + * @param float $var + * @return $this + */ + public function setLowerBound($var) + { + GPBUtil::checkDouble($var); + $this->lower_bound = $var; + + return $this; + } + + /** + * Upper bound - exclusive. + * + * Generated from protobuf field double upper_bound = 2; + * @return float + */ + public function getUpperBound() + { + return $this->upper_bound; + } + + /** + * Upper bound - exclusive. + * + * Generated from protobuf field double upper_bound = 2; + * @param float $var + * @return $this + */ + public function setUpperBound($var) + { + GPBUtil::checkDouble($var); + $this->upper_bound = $var; + + return $this; + } + + /** + * Count of items in the bucket. + * + * Generated from protobuf field int64 count = 3; + * @return int|string + */ + public function getCount() + { + return $this->count; + } + + /** + * Count of items in the bucket. + * + * Generated from protobuf field int64 count = 3; + * @param int|string $var + * @return $this + */ + public function setCount($var) + { + GPBUtil::checkInt64($var); + $this->count = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Bucket::class, \Google\Cloud\MigrationCenter\V1\AggregationResult_Histogram_Bucket::class); + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AggregationResult/Sum.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AggregationResult/Sum.php new file mode 100644 index 000000000000..414a36fa146a --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AggregationResult/Sum.php @@ -0,0 +1,63 @@ +google.cloud.migrationcenter.v1.AggregationResult.Sum + */ +class Sum extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field double value = 1; + */ + protected $value = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $value + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field double value = 1; + * @return float + */ + public function getValue() + { + return $this->value; + } + + /** + * Generated from protobuf field double value = 1; + * @param float $var + * @return $this + */ + public function setValue($var) + { + GPBUtil::checkDouble($var); + $this->value = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Sum::class, \Google\Cloud\MigrationCenter\V1\AggregationResult_Sum::class); + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Asset.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Asset.php new file mode 100644 index 000000000000..7838a624d2b5 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Asset.php @@ -0,0 +1,425 @@ +google.cloud.migrationcenter.v1.Asset + */ +class Asset extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The full name of the asset. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. The timestamp when the asset was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The timestamp when the asset was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Labels as key value pairs. + * + * Generated from protobuf field map labels = 4; + */ + private $labels; + /** + * Generic asset attributes. + * + * Generated from protobuf field map attributes = 5; + */ + private $attributes; + /** + * Output only. The list of insights associated with the asset. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.InsightList insight_list = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $insight_list = null; + /** + * Output only. Performance data for the asset. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.AssetPerformanceData performance_data = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $performance_data = null; + /** + * Output only. The list of sources contributing to the asset. + * + * Generated from protobuf field repeated string sources = 22 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + private $sources; + /** + * Output only. The list of groups that the asset is assigned to. + * + * Generated from protobuf field repeated string assigned_groups = 23 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + private $assigned_groups; + protected $AssetDetails; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The full name of the asset. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The timestamp when the asset was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The timestamp when the asset was last updated. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Labels as key value pairs. + * @type array|\Google\Protobuf\Internal\MapField $attributes + * Generic asset attributes. + * @type \Google\Cloud\MigrationCenter\V1\MachineDetails $machine_details + * Output only. Asset information specific for virtual and physical + * machines. + * @type \Google\Cloud\MigrationCenter\V1\InsightList $insight_list + * Output only. The list of insights associated with the asset. + * @type \Google\Cloud\MigrationCenter\V1\AssetPerformanceData $performance_data + * Output only. Performance data for the asset. + * @type array|\Google\Protobuf\Internal\RepeatedField $sources + * Output only. The list of sources contributing to the asset. + * @type array|\Google\Protobuf\Internal\RepeatedField $assigned_groups + * Output only. The list of groups that the asset is assigned to. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The full name of the asset. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The full name of the asset. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The timestamp when the asset was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The timestamp when the asset was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The timestamp when the asset was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The timestamp when the asset was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Labels as key value pairs. + * + * Generated from protobuf field map labels = 4; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Labels as key value pairs. + * + * Generated from protobuf field map labels = 4; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Generic asset attributes. + * + * Generated from protobuf field map attributes = 5; + * @return \Google\Protobuf\Internal\MapField + */ + public function getAttributes() + { + return $this->attributes; + } + + /** + * Generic asset attributes. + * + * Generated from protobuf field map attributes = 5; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setAttributes($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->attributes = $arr; + + return $this; + } + + /** + * Output only. Asset information specific for virtual and physical + * machines. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.MachineDetails machine_details = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\MigrationCenter\V1\MachineDetails|null + */ + public function getMachineDetails() + { + return $this->readOneof(6); + } + + public function hasMachineDetails() + { + return $this->hasOneof(6); + } + + /** + * Output only. Asset information specific for virtual and physical + * machines. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.MachineDetails machine_details = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\MigrationCenter\V1\MachineDetails $var + * @return $this + */ + public function setMachineDetails($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\MachineDetails::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * Output only. The list of insights associated with the asset. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.InsightList insight_list = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\MigrationCenter\V1\InsightList|null + */ + public function getInsightList() + { + return $this->insight_list; + } + + public function hasInsightList() + { + return isset($this->insight_list); + } + + public function clearInsightList() + { + unset($this->insight_list); + } + + /** + * Output only. The list of insights associated with the asset. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.InsightList insight_list = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\MigrationCenter\V1\InsightList $var + * @return $this + */ + public function setInsightList($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\InsightList::class); + $this->insight_list = $var; + + return $this; + } + + /** + * Output only. Performance data for the asset. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.AssetPerformanceData performance_data = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\MigrationCenter\V1\AssetPerformanceData|null + */ + public function getPerformanceData() + { + return $this->performance_data; + } + + public function hasPerformanceData() + { + return isset($this->performance_data); + } + + public function clearPerformanceData() + { + unset($this->performance_data); + } + + /** + * Output only. Performance data for the asset. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.AssetPerformanceData performance_data = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\MigrationCenter\V1\AssetPerformanceData $var + * @return $this + */ + public function setPerformanceData($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\AssetPerformanceData::class); + $this->performance_data = $var; + + return $this; + } + + /** + * Output only. The list of sources contributing to the asset. + * + * Generated from protobuf field repeated string sources = 22 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSources() + { + return $this->sources; + } + + /** + * Output only. The list of sources contributing to the asset. + * + * Generated from protobuf field repeated string sources = 22 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSources($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->sources = $arr; + + return $this; + } + + /** + * Output only. The list of groups that the asset is assigned to. + * + * Generated from protobuf field repeated string assigned_groups = 23 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAssignedGroups() + { + return $this->assigned_groups; + } + + /** + * Output only. The list of groups that the asset is assigned to. + * + * Generated from protobuf field repeated string assigned_groups = 23 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAssignedGroups($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->assigned_groups = $arr; + + return $this; + } + + /** + * @return string + */ + public function getAssetDetails() + { + return $this->whichOneof("AssetDetails"); + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AssetFrame.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AssetFrame.php new file mode 100644 index 000000000000..cbd99ab9cb59 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AssetFrame.php @@ -0,0 +1,263 @@ +google.cloud.migrationcenter.v1.AssetFrame + */ +class AssetFrame extends \Google\Protobuf\Internal\Message +{ + /** + * The time the data was reported. + * + * Generated from protobuf field .google.protobuf.Timestamp report_time = 10; + */ + protected $report_time = null; + /** + * Labels as key value pairs. + * + * Generated from protobuf field map labels = 11; + */ + private $labels; + /** + * Generic asset attributes. + * + * Generated from protobuf field map attributes = 12; + */ + private $attributes; + /** + * Asset performance data samples. + * Samples that are from more than 40 days ago or after tomorrow are ignored. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.PerformanceSample performance_samples = 13; + */ + private $performance_samples; + /** + * Optional. Trace token is optionally provided to assist with debugging and + * traceability. + * + * Generated from protobuf field string trace_token = 14 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $trace_token = ''; + protected $FrameData; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\MigrationCenter\V1\MachineDetails $machine_details + * Asset information specific for virtual machines. + * @type \Google\Protobuf\Timestamp $report_time + * The time the data was reported. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Labels as key value pairs. + * @type array|\Google\Protobuf\Internal\MapField $attributes + * Generic asset attributes. + * @type array<\Google\Cloud\MigrationCenter\V1\PerformanceSample>|\Google\Protobuf\Internal\RepeatedField $performance_samples + * Asset performance data samples. + * Samples that are from more than 40 days ago or after tomorrow are ignored. + * @type string $trace_token + * Optional. Trace token is optionally provided to assist with debugging and + * traceability. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Asset information specific for virtual machines. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.MachineDetails machine_details = 1; + * @return \Google\Cloud\MigrationCenter\V1\MachineDetails|null + */ + public function getMachineDetails() + { + return $this->readOneof(1); + } + + public function hasMachineDetails() + { + return $this->hasOneof(1); + } + + /** + * Asset information specific for virtual machines. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.MachineDetails machine_details = 1; + * @param \Google\Cloud\MigrationCenter\V1\MachineDetails $var + * @return $this + */ + public function setMachineDetails($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\MachineDetails::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * The time the data was reported. + * + * Generated from protobuf field .google.protobuf.Timestamp report_time = 10; + * @return \Google\Protobuf\Timestamp|null + */ + public function getReportTime() + { + return $this->report_time; + } + + public function hasReportTime() + { + return isset($this->report_time); + } + + public function clearReportTime() + { + unset($this->report_time); + } + + /** + * The time the data was reported. + * + * Generated from protobuf field .google.protobuf.Timestamp report_time = 10; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setReportTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->report_time = $var; + + return $this; + } + + /** + * Labels as key value pairs. + * + * Generated from protobuf field map labels = 11; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Labels as key value pairs. + * + * Generated from protobuf field map labels = 11; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Generic asset attributes. + * + * Generated from protobuf field map attributes = 12; + * @return \Google\Protobuf\Internal\MapField + */ + public function getAttributes() + { + return $this->attributes; + } + + /** + * Generic asset attributes. + * + * Generated from protobuf field map attributes = 12; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setAttributes($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->attributes = $arr; + + return $this; + } + + /** + * Asset performance data samples. + * Samples that are from more than 40 days ago or after tomorrow are ignored. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.PerformanceSample performance_samples = 13; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPerformanceSamples() + { + return $this->performance_samples; + } + + /** + * Asset performance data samples. + * Samples that are from more than 40 days ago or after tomorrow are ignored. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.PerformanceSample performance_samples = 13; + * @param array<\Google\Cloud\MigrationCenter\V1\PerformanceSample>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPerformanceSamples($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\PerformanceSample::class); + $this->performance_samples = $arr; + + return $this; + } + + /** + * Optional. Trace token is optionally provided to assist with debugging and + * traceability. + * + * Generated from protobuf field string trace_token = 14 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getTraceToken() + { + return $this->trace_token; + } + + /** + * Optional. Trace token is optionally provided to assist with debugging and + * traceability. + * + * Generated from protobuf field string trace_token = 14 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setTraceToken($var) + { + GPBUtil::checkString($var, True); + $this->trace_token = $var; + + return $this; + } + + /** + * @return string + */ + public function getFrameData() + { + return $this->whichOneof("FrameData"); + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AssetList.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AssetList.php new file mode 100644 index 000000000000..0f91dbc432d0 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AssetList.php @@ -0,0 +1,67 @@ +google.cloud.migrationcenter.v1.AssetList + */ +class AssetList extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A list of asset IDs + * + * Generated from protobuf field repeated string asset_ids = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + private $asset_ids; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $asset_ids + * Required. A list of asset IDs + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Required. A list of asset IDs + * + * Generated from protobuf field repeated string asset_ids = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAssetIds() + { + return $this->asset_ids; + } + + /** + * Required. A list of asset IDs + * + * Generated from protobuf field repeated string asset_ids = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAssetIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->asset_ids = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AssetPerformanceData.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AssetPerformanceData.php new file mode 100644 index 000000000000..a043cf9248e9 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AssetPerformanceData.php @@ -0,0 +1,75 @@ +google.cloud.migrationcenter.v1.AssetPerformanceData + */ +class AssetPerformanceData extends \Google\Protobuf\Internal\Message +{ + /** + * Daily resource usage aggregations. + * Contains all of the data available for an asset, up to the last 420 days. + * Aggregations are sorted from oldest to most recent. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation daily_resource_usage_aggregations = 1; + */ + private $daily_resource_usage_aggregations; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\MigrationCenter\V1\DailyResourceUsageAggregation>|\Google\Protobuf\Internal\RepeatedField $daily_resource_usage_aggregations + * Daily resource usage aggregations. + * Contains all of the data available for an asset, up to the last 420 days. + * Aggregations are sorted from oldest to most recent. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Daily resource usage aggregations. + * Contains all of the data available for an asset, up to the last 420 days. + * Aggregations are sorted from oldest to most recent. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation daily_resource_usage_aggregations = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDailyResourceUsageAggregations() + { + return $this->daily_resource_usage_aggregations; + } + + /** + * Daily resource usage aggregations. + * Contains all of the data available for an asset, up to the last 420 days. + * Aggregations are sorted from oldest to most recent. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation daily_resource_usage_aggregations = 1; + * @param array<\Google\Cloud\MigrationCenter\V1\DailyResourceUsageAggregation>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDailyResourceUsageAggregations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\DailyResourceUsageAggregation::class); + $this->daily_resource_usage_aggregations = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AssetView.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AssetView.php new file mode 100644 index 000000000000..8a7721b084f7 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AssetView.php @@ -0,0 +1,63 @@ +google.cloud.migrationcenter.v1.AssetView + */ +class AssetView +{ + /** + * The asset view is not specified. The API displays the basic view by + * default. + * + * Generated from protobuf enum ASSET_VIEW_UNSPECIFIED = 0; + */ + const ASSET_VIEW_UNSPECIFIED = 0; + /** + * The asset view includes only basic metadata of the asset. + * + * Generated from protobuf enum ASSET_VIEW_BASIC = 1; + */ + const ASSET_VIEW_BASIC = 1; + /** + * The asset view includes all the metadata of an asset and performance data. + * + * Generated from protobuf enum ASSET_VIEW_FULL = 2; + */ + const ASSET_VIEW_FULL = 2; + + private static $valueToName = [ + self::ASSET_VIEW_UNSPECIFIED => 'ASSET_VIEW_UNSPECIFIED', + self::ASSET_VIEW_BASIC => 'ASSET_VIEW_BASIC', + self::ASSET_VIEW_FULL => 'ASSET_VIEW_FULL', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AwsEc2PlatformDetails.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AwsEc2PlatformDetails.php new file mode 100644 index 000000000000..a296b339037a --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AwsEc2PlatformDetails.php @@ -0,0 +1,101 @@ +google.cloud.migrationcenter.v1.AwsEc2PlatformDetails + */ +class AwsEc2PlatformDetails extends \Google\Protobuf\Internal\Message +{ + /** + * AWS platform's machine type label. + * + * Generated from protobuf field string machine_type_label = 1; + */ + protected $machine_type_label = ''; + /** + * The location of the machine in the AWS format. + * + * Generated from protobuf field string location = 2; + */ + protected $location = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $machine_type_label + * AWS platform's machine type label. + * @type string $location + * The location of the machine in the AWS format. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * AWS platform's machine type label. + * + * Generated from protobuf field string machine_type_label = 1; + * @return string + */ + public function getMachineTypeLabel() + { + return $this->machine_type_label; + } + + /** + * AWS platform's machine type label. + * + * Generated from protobuf field string machine_type_label = 1; + * @param string $var + * @return $this + */ + public function setMachineTypeLabel($var) + { + GPBUtil::checkString($var, True); + $this->machine_type_label = $var; + + return $this; + } + + /** + * The location of the machine in the AWS format. + * + * Generated from protobuf field string location = 2; + * @return string + */ + public function getLocation() + { + return $this->location; + } + + /** + * The location of the machine in the AWS format. + * + * Generated from protobuf field string location = 2; + * @param string $var + * @return $this + */ + public function setLocation($var) + { + GPBUtil::checkString($var, True); + $this->location = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AzureVmPlatformDetails.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AzureVmPlatformDetails.php new file mode 100644 index 000000000000..301fdf059374 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AzureVmPlatformDetails.php @@ -0,0 +1,135 @@ +google.cloud.migrationcenter.v1.AzureVmPlatformDetails + */ +class AzureVmPlatformDetails extends \Google\Protobuf\Internal\Message +{ + /** + * Azure platform's machine type label. + * + * Generated from protobuf field string machine_type_label = 1; + */ + protected $machine_type_label = ''; + /** + * The location of the machine in the Azure format. + * + * Generated from protobuf field string location = 2; + */ + protected $location = ''; + /** + * Azure platform's provisioning state. + * + * Generated from protobuf field string provisioning_state = 3; + */ + protected $provisioning_state = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $machine_type_label + * Azure platform's machine type label. + * @type string $location + * The location of the machine in the Azure format. + * @type string $provisioning_state + * Azure platform's provisioning state. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Azure platform's machine type label. + * + * Generated from protobuf field string machine_type_label = 1; + * @return string + */ + public function getMachineTypeLabel() + { + return $this->machine_type_label; + } + + /** + * Azure platform's machine type label. + * + * Generated from protobuf field string machine_type_label = 1; + * @param string $var + * @return $this + */ + public function setMachineTypeLabel($var) + { + GPBUtil::checkString($var, True); + $this->machine_type_label = $var; + + return $this; + } + + /** + * The location of the machine in the Azure format. + * + * Generated from protobuf field string location = 2; + * @return string + */ + public function getLocation() + { + return $this->location; + } + + /** + * The location of the machine in the Azure format. + * + * Generated from protobuf field string location = 2; + * @param string $var + * @return $this + */ + public function setLocation($var) + { + GPBUtil::checkString($var, True); + $this->location = $var; + + return $this; + } + + /** + * Azure platform's provisioning state. + * + * Generated from protobuf field string provisioning_state = 3; + * @return string + */ + public function getProvisioningState() + { + return $this->provisioning_state; + } + + /** + * Azure platform's provisioning state. + * + * Generated from protobuf field string provisioning_state = 3; + * @param string $var + * @return $this + */ + public function setProvisioningState($var) + { + GPBUtil::checkString($var, True); + $this->provisioning_state = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/BatchDeleteAssetsRequest.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/BatchDeleteAssetsRequest.php new file mode 100644 index 000000000000..bd2d1da5d670 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/BatchDeleteAssetsRequest.php @@ -0,0 +1,170 @@ +google.cloud.migrationcenter.v1.BatchDeleteAssetsRequest + */ +class BatchDeleteAssetsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Parent value for batch asset delete. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The IDs of the assets to delete. + * A maximum of 1000 assets can be deleted in a batch. + * Format: projects/{project}/locations/{location}/assets/{name}. + * + * Generated from protobuf field repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + private $names; + /** + * Optional. When this value is set to `true` the request is a no-op for + * non-existing assets. See https://google.aip.dev/135#delete-if-existing for + * additional details. Default value is `false`. + * + * Generated from protobuf field bool allow_missing = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $allow_missing = false; + + /** + * @param string $parent Required. Parent value for batch asset delete. Please see + * {@see MigrationCenterClient::locationName()} for help formatting this field. + * @param string[] $names Required. The IDs of the assets to delete. + * A maximum of 1000 assets can be deleted in a batch. + * Format: projects/{project}/locations/{location}/assets/{name}. Please see + * {@see MigrationCenterClient::assetName()} for help formatting this field. + * + * @return \Google\Cloud\MigrationCenter\V1\BatchDeleteAssetsRequest + * + * @experimental + */ + public static function build(string $parent, array $names): self + { + return (new self()) + ->setParent($parent) + ->setNames($names); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Parent value for batch asset delete. + * @type array|\Google\Protobuf\Internal\RepeatedField $names + * Required. The IDs of the assets to delete. + * A maximum of 1000 assets can be deleted in a batch. + * Format: projects/{project}/locations/{location}/assets/{name}. + * @type bool $allow_missing + * Optional. When this value is set to `true` the request is a no-op for + * non-existing assets. See https://google.aip.dev/135#delete-if-existing for + * additional details. Default value is `false`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Required. Parent value for batch asset delete. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Parent value for batch asset delete. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The IDs of the assets to delete. + * A maximum of 1000 assets can be deleted in a batch. + * Format: projects/{project}/locations/{location}/assets/{name}. + * + * Generated from protobuf field repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNames() + { + return $this->names; + } + + /** + * Required. The IDs of the assets to delete. + * A maximum of 1000 assets can be deleted in a batch. + * Format: projects/{project}/locations/{location}/assets/{name}. + * + * Generated from protobuf field repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNames($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->names = $arr; + + return $this; + } + + /** + * Optional. When this value is set to `true` the request is a no-op for + * non-existing assets. See https://google.aip.dev/135#delete-if-existing for + * additional details. Default value is `false`. + * + * Generated from protobuf field bool allow_missing = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getAllowMissing() + { + return $this->allow_missing; + } + + /** + * Optional. When this value is set to `true` the request is a no-op for + * non-existing assets. See https://google.aip.dev/135#delete-if-existing for + * additional details. Default value is `false`. + * + * Generated from protobuf field bool allow_missing = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setAllowMissing($var) + { + GPBUtil::checkBool($var); + $this->allow_missing = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/BatchUpdateAssetsRequest.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/BatchUpdateAssetsRequest.php new file mode 100644 index 000000000000..84257e43ba54 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/BatchUpdateAssetsRequest.php @@ -0,0 +1,122 @@ +google.cloud.migrationcenter.v1.BatchUpdateAssetsRequest + */ +class BatchUpdateAssetsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Parent value for batch asset update. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The request message specifying the resources to update. + * A maximum of 1000 assets can be modified in a batch. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.UpdateAssetRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $requests; + + /** + * @param string $parent Required. Parent value for batch asset update. Please see + * {@see MigrationCenterClient::locationName()} for help formatting this field. + * @param \Google\Cloud\MigrationCenter\V1\UpdateAssetRequest[] $requests Required. The request message specifying the resources to update. + * A maximum of 1000 assets can be modified in a batch. + * + * @return \Google\Cloud\MigrationCenter\V1\BatchUpdateAssetsRequest + * + * @experimental + */ + public static function build(string $parent, array $requests): self + { + return (new self()) + ->setParent($parent) + ->setRequests($requests); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Parent value for batch asset update. + * @type array<\Google\Cloud\MigrationCenter\V1\UpdateAssetRequest>|\Google\Protobuf\Internal\RepeatedField $requests + * Required. The request message specifying the resources to update. + * A maximum of 1000 assets can be modified in a batch. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Required. Parent value for batch asset update. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Parent value for batch asset update. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The request message specifying the resources to update. + * A maximum of 1000 assets can be modified in a batch. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.UpdateAssetRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRequests() + { + return $this->requests; + } + + /** + * Required. The request message specifying the resources to update. + * A maximum of 1000 assets can be modified in a batch. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.UpdateAssetRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Cloud\MigrationCenter\V1\UpdateAssetRequest>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRequests($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\UpdateAssetRequest::class); + $this->requests = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/BatchUpdateAssetsResponse.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/BatchUpdateAssetsResponse.php new file mode 100644 index 000000000000..1ab18be8f7c6 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/BatchUpdateAssetsResponse.php @@ -0,0 +1,71 @@ +google.cloud.migrationcenter.v1.BatchUpdateAssetsResponse + */ +class BatchUpdateAssetsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Update asset content. + * The content only includes values after field mask being applied. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.Asset assets = 1; + */ + private $assets; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\MigrationCenter\V1\Asset>|\Google\Protobuf\Internal\RepeatedField $assets + * Update asset content. + * The content only includes values after field mask being applied. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Update asset content. + * The content only includes values after field mask being applied. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.Asset assets = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAssets() + { + return $this->assets; + } + + /** + * Update asset content. + * The content only includes values after field mask being applied. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.Asset assets = 1; + * @param array<\Google\Cloud\MigrationCenter\V1\Asset>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAssets($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\Asset::class); + $this->assets = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/BiosDetails.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/BiosDetails.php new file mode 100644 index 000000000000..13d0fe01664b --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/BiosDetails.php @@ -0,0 +1,256 @@ +google.cloud.migrationcenter.v1.BiosDetails + */ +class BiosDetails extends \Google\Protobuf\Internal\Message +{ + /** + * BIOS name. + * This fields is deprecated. Please use the `id` field instead. + * + * Generated from protobuf field string bios_name = 1 [deprecated = true]; + * @deprecated + */ + protected $bios_name = ''; + /** + * BIOS ID. + * + * Generated from protobuf field string id = 2; + */ + protected $id = ''; + /** + * BIOS manufacturer. + * + * Generated from protobuf field string manufacturer = 3; + */ + protected $manufacturer = ''; + /** + * BIOS version. + * + * Generated from protobuf field string version = 4; + */ + protected $version = ''; + /** + * BIOS release date. + * + * Generated from protobuf field .google.type.Date release_date = 5; + */ + protected $release_date = null; + /** + * SMBIOS UUID. + * + * Generated from protobuf field string smbios_uuid = 6; + */ + protected $smbios_uuid = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $bios_name + * BIOS name. + * This fields is deprecated. Please use the `id` field instead. + * @type string $id + * BIOS ID. + * @type string $manufacturer + * BIOS manufacturer. + * @type string $version + * BIOS version. + * @type \Google\Type\Date $release_date + * BIOS release date. + * @type string $smbios_uuid + * SMBIOS UUID. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * BIOS name. + * This fields is deprecated. Please use the `id` field instead. + * + * Generated from protobuf field string bios_name = 1 [deprecated = true]; + * @return string + * @deprecated + */ + public function getBiosName() + { + @trigger_error('bios_name is deprecated.', E_USER_DEPRECATED); + return $this->bios_name; + } + + /** + * BIOS name. + * This fields is deprecated. Please use the `id` field instead. + * + * Generated from protobuf field string bios_name = 1 [deprecated = true]; + * @param string $var + * @return $this + * @deprecated + */ + public function setBiosName($var) + { + @trigger_error('bios_name is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkString($var, True); + $this->bios_name = $var; + + return $this; + } + + /** + * BIOS ID. + * + * Generated from protobuf field string id = 2; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * BIOS ID. + * + * Generated from protobuf field string id = 2; + * @param string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkString($var, True); + $this->id = $var; + + return $this; + } + + /** + * BIOS manufacturer. + * + * Generated from protobuf field string manufacturer = 3; + * @return string + */ + public function getManufacturer() + { + return $this->manufacturer; + } + + /** + * BIOS manufacturer. + * + * Generated from protobuf field string manufacturer = 3; + * @param string $var + * @return $this + */ + public function setManufacturer($var) + { + GPBUtil::checkString($var, True); + $this->manufacturer = $var; + + return $this; + } + + /** + * BIOS version. + * + * Generated from protobuf field string version = 4; + * @return string + */ + public function getVersion() + { + return $this->version; + } + + /** + * BIOS version. + * + * Generated from protobuf field string version = 4; + * @param string $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkString($var, True); + $this->version = $var; + + return $this; + } + + /** + * BIOS release date. + * + * Generated from protobuf field .google.type.Date release_date = 5; + * @return \Google\Type\Date|null + */ + public function getReleaseDate() + { + return $this->release_date; + } + + public function hasReleaseDate() + { + return isset($this->release_date); + } + + public function clearReleaseDate() + { + unset($this->release_date); + } + + /** + * BIOS release date. + * + * Generated from protobuf field .google.type.Date release_date = 5; + * @param \Google\Type\Date $var + * @return $this + */ + public function setReleaseDate($var) + { + GPBUtil::checkMessage($var, \Google\Type\Date::class); + $this->release_date = $var; + + return $this; + } + + /** + * SMBIOS UUID. + * + * Generated from protobuf field string smbios_uuid = 6; + * @return string + */ + public function getSmbiosUuid() + { + return $this->smbios_uuid; + } + + /** + * SMBIOS UUID. + * + * Generated from protobuf field string smbios_uuid = 6; + * @param string $var + * @return $this + */ + public function setSmbiosUuid($var) + { + GPBUtil::checkString($var, True); + $this->smbios_uuid = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/CommitmentPlan.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/CommitmentPlan.php new file mode 100644 index 000000000000..ccbcd5e00664 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/CommitmentPlan.php @@ -0,0 +1,68 @@ +google.cloud.migrationcenter.v1.CommitmentPlan + */ +class CommitmentPlan +{ + /** + * Unspecified commitment plan. + * + * Generated from protobuf enum COMMITMENT_PLAN_UNSPECIFIED = 0; + */ + const COMMITMENT_PLAN_UNSPECIFIED = 0; + /** + * No commitment plan. + * + * Generated from protobuf enum COMMITMENT_PLAN_NONE = 1; + */ + const COMMITMENT_PLAN_NONE = 1; + /** + * 1 year commitment. + * + * Generated from protobuf enum COMMITMENT_PLAN_ONE_YEAR = 2; + */ + const COMMITMENT_PLAN_ONE_YEAR = 2; + /** + * 3 years commitment. + * + * Generated from protobuf enum COMMITMENT_PLAN_THREE_YEARS = 3; + */ + const COMMITMENT_PLAN_THREE_YEARS = 3; + + private static $valueToName = [ + self::COMMITMENT_PLAN_UNSPECIFIED => 'COMMITMENT_PLAN_UNSPECIFIED', + self::COMMITMENT_PLAN_NONE => 'COMMITMENT_PLAN_NONE', + self::COMMITMENT_PLAN_ONE_YEAR => 'COMMITMENT_PLAN_ONE_YEAR', + self::COMMITMENT_PLAN_THREE_YEARS => 'COMMITMENT_PLAN_THREE_YEARS', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ComputeEngineMigrationTarget.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ComputeEngineMigrationTarget.php new file mode 100644 index 000000000000..e03c6fabc843 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ComputeEngineMigrationTarget.php @@ -0,0 +1,77 @@ +google.cloud.migrationcenter.v1.ComputeEngineMigrationTarget + */ +class ComputeEngineMigrationTarget extends \Google\Protobuf\Internal\Message +{ + /** + * Description of the suggested shape for the migration target. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor shape = 1; + */ + protected $shape = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\MigrationCenter\V1\ComputeEngineShapeDescriptor $shape + * Description of the suggested shape for the migration target. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Description of the suggested shape for the migration target. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor shape = 1; + * @return \Google\Cloud\MigrationCenter\V1\ComputeEngineShapeDescriptor|null + */ + public function getShape() + { + return $this->shape; + } + + public function hasShape() + { + return isset($this->shape); + } + + public function clearShape() + { + unset($this->shape); + } + + /** + * Description of the suggested shape for the migration target. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor shape = 1; + * @param \Google\Cloud\MigrationCenter\V1\ComputeEngineShapeDescriptor $var + * @return $this + */ + public function setShape($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\ComputeEngineShapeDescriptor::class); + $this->shape = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ComputeEnginePreferences.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ComputeEnginePreferences.php new file mode 100644 index 000000000000..34c9dbe357d2 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ComputeEnginePreferences.php @@ -0,0 +1,119 @@ +google.cloud.migrationcenter.v1.ComputeEnginePreferences + */ +class ComputeEnginePreferences extends \Google\Protobuf\Internal\Message +{ + /** + * Preferences concerning the machine types to consider on Compute Engine. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.MachinePreferences machine_preferences = 2; + */ + protected $machine_preferences = null; + /** + * License type to consider when calculating costs for virtual machine + * insights and recommendations. If unspecified, costs are calculated + * based on the default licensing plan. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.LicenseType license_type = 3; + */ + protected $license_type = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\MigrationCenter\V1\MachinePreferences $machine_preferences + * Preferences concerning the machine types to consider on Compute Engine. + * @type int $license_type + * License type to consider when calculating costs for virtual machine + * insights and recommendations. If unspecified, costs are calculated + * based on the default licensing plan. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Preferences concerning the machine types to consider on Compute Engine. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.MachinePreferences machine_preferences = 2; + * @return \Google\Cloud\MigrationCenter\V1\MachinePreferences|null + */ + public function getMachinePreferences() + { + return $this->machine_preferences; + } + + public function hasMachinePreferences() + { + return isset($this->machine_preferences); + } + + public function clearMachinePreferences() + { + unset($this->machine_preferences); + } + + /** + * Preferences concerning the machine types to consider on Compute Engine. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.MachinePreferences machine_preferences = 2; + * @param \Google\Cloud\MigrationCenter\V1\MachinePreferences $var + * @return $this + */ + public function setMachinePreferences($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\MachinePreferences::class); + $this->machine_preferences = $var; + + return $this; + } + + /** + * License type to consider when calculating costs for virtual machine + * insights and recommendations. If unspecified, costs are calculated + * based on the default licensing plan. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.LicenseType license_type = 3; + * @return int + */ + public function getLicenseType() + { + return $this->license_type; + } + + /** + * License type to consider when calculating costs for virtual machine + * insights and recommendations. If unspecified, costs are calculated + * based on the default licensing plan. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.LicenseType license_type = 3; + * @param int $var + * @return $this + */ + public function setLicenseType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\MigrationCenter\V1\LicenseType::class); + $this->license_type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ComputeEngineShapeDescriptor.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ComputeEngineShapeDescriptor.php new file mode 100644 index 000000000000..3df71598456b --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ComputeEngineShapeDescriptor.php @@ -0,0 +1,237 @@ +google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor + */ +class ComputeEngineShapeDescriptor extends \Google\Protobuf\Internal\Message +{ + /** + * Memory in mebibytes. + * + * Generated from protobuf field int32 memory_mb = 1; + */ + protected $memory_mb = 0; + /** + * Number of physical cores. + * + * Generated from protobuf field int32 physical_core_count = 2; + */ + protected $physical_core_count = 0; + /** + * Number of logical cores. + * + * Generated from protobuf field int32 logical_core_count = 3; + */ + protected $logical_core_count = 0; + /** + * Compute Engine machine series. + * + * Generated from protobuf field string series = 4; + */ + protected $series = ''; + /** + * Compute Engine machine type. + * + * Generated from protobuf field string machine_type = 5; + */ + protected $machine_type = ''; + /** + * Compute Engine storage. Never empty. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ComputeStorageDescriptor storage = 6; + */ + private $storage; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $memory_mb + * Memory in mebibytes. + * @type int $physical_core_count + * Number of physical cores. + * @type int $logical_core_count + * Number of logical cores. + * @type string $series + * Compute Engine machine series. + * @type string $machine_type + * Compute Engine machine type. + * @type array<\Google\Cloud\MigrationCenter\V1\ComputeStorageDescriptor>|\Google\Protobuf\Internal\RepeatedField $storage + * Compute Engine storage. Never empty. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Memory in mebibytes. + * + * Generated from protobuf field int32 memory_mb = 1; + * @return int + */ + public function getMemoryMb() + { + return $this->memory_mb; + } + + /** + * Memory in mebibytes. + * + * Generated from protobuf field int32 memory_mb = 1; + * @param int $var + * @return $this + */ + public function setMemoryMb($var) + { + GPBUtil::checkInt32($var); + $this->memory_mb = $var; + + return $this; + } + + /** + * Number of physical cores. + * + * Generated from protobuf field int32 physical_core_count = 2; + * @return int + */ + public function getPhysicalCoreCount() + { + return $this->physical_core_count; + } + + /** + * Number of physical cores. + * + * Generated from protobuf field int32 physical_core_count = 2; + * @param int $var + * @return $this + */ + public function setPhysicalCoreCount($var) + { + GPBUtil::checkInt32($var); + $this->physical_core_count = $var; + + return $this; + } + + /** + * Number of logical cores. + * + * Generated from protobuf field int32 logical_core_count = 3; + * @return int + */ + public function getLogicalCoreCount() + { + return $this->logical_core_count; + } + + /** + * Number of logical cores. + * + * Generated from protobuf field int32 logical_core_count = 3; + * @param int $var + * @return $this + */ + public function setLogicalCoreCount($var) + { + GPBUtil::checkInt32($var); + $this->logical_core_count = $var; + + return $this; + } + + /** + * Compute Engine machine series. + * + * Generated from protobuf field string series = 4; + * @return string + */ + public function getSeries() + { + return $this->series; + } + + /** + * Compute Engine machine series. + * + * Generated from protobuf field string series = 4; + * @param string $var + * @return $this + */ + public function setSeries($var) + { + GPBUtil::checkString($var, True); + $this->series = $var; + + return $this; + } + + /** + * Compute Engine machine type. + * + * Generated from protobuf field string machine_type = 5; + * @return string + */ + public function getMachineType() + { + return $this->machine_type; + } + + /** + * Compute Engine machine type. + * + * Generated from protobuf field string machine_type = 5; + * @param string $var + * @return $this + */ + public function setMachineType($var) + { + GPBUtil::checkString($var, True); + $this->machine_type = $var; + + return $this; + } + + /** + * Compute Engine storage. Never empty. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ComputeStorageDescriptor storage = 6; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getStorage() + { + return $this->storage; + } + + /** + * Compute Engine storage. Never empty. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ComputeStorageDescriptor storage = 6; + * @param array<\Google\Cloud\MigrationCenter\V1\ComputeStorageDescriptor>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setStorage($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\ComputeStorageDescriptor::class); + $this->storage = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ComputeMigrationTargetProduct.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ComputeMigrationTargetProduct.php new file mode 100644 index 000000000000..de1c5e1e2915 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ComputeMigrationTargetProduct.php @@ -0,0 +1,68 @@ +google.cloud.migrationcenter.v1.ComputeMigrationTargetProduct + */ +class ComputeMigrationTargetProduct +{ + /** + * Unspecified (default value). + * + * Generated from protobuf enum COMPUTE_MIGRATION_TARGET_PRODUCT_UNSPECIFIED = 0; + */ + const COMPUTE_MIGRATION_TARGET_PRODUCT_UNSPECIFIED = 0; + /** + * Prefer to migrate to Google Cloud Compute Engine. + * + * Generated from protobuf enum COMPUTE_MIGRATION_TARGET_PRODUCT_COMPUTE_ENGINE = 1; + */ + const COMPUTE_MIGRATION_TARGET_PRODUCT_COMPUTE_ENGINE = 1; + /** + * Prefer to migrate to Google Cloud VMware Engine. + * + * Generated from protobuf enum COMPUTE_MIGRATION_TARGET_PRODUCT_VMWARE_ENGINE = 2; + */ + const COMPUTE_MIGRATION_TARGET_PRODUCT_VMWARE_ENGINE = 2; + /** + * Prefer to migrate to Google Cloud Sole Tenant Nodes. + * + * Generated from protobuf enum COMPUTE_MIGRATION_TARGET_PRODUCT_SOLE_TENANCY = 3; + */ + const COMPUTE_MIGRATION_TARGET_PRODUCT_SOLE_TENANCY = 3; + + private static $valueToName = [ + self::COMPUTE_MIGRATION_TARGET_PRODUCT_UNSPECIFIED => 'COMPUTE_MIGRATION_TARGET_PRODUCT_UNSPECIFIED', + self::COMPUTE_MIGRATION_TARGET_PRODUCT_COMPUTE_ENGINE => 'COMPUTE_MIGRATION_TARGET_PRODUCT_COMPUTE_ENGINE', + self::COMPUTE_MIGRATION_TARGET_PRODUCT_VMWARE_ENGINE => 'COMPUTE_MIGRATION_TARGET_PRODUCT_VMWARE_ENGINE', + self::COMPUTE_MIGRATION_TARGET_PRODUCT_SOLE_TENANCY => 'COMPUTE_MIGRATION_TARGET_PRODUCT_SOLE_TENANCY', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ComputeStorageDescriptor.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ComputeStorageDescriptor.php new file mode 100644 index 000000000000..bca525749f7a --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ComputeStorageDescriptor.php @@ -0,0 +1,101 @@ +google.cloud.migrationcenter.v1.ComputeStorageDescriptor + */ +class ComputeStorageDescriptor extends \Google\Protobuf\Internal\Message +{ + /** + * Disk type backing the storage. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.PersistentDiskType type = 1; + */ + protected $type = 0; + /** + * Disk size in GiB. + * + * Generated from protobuf field int32 size_gb = 2; + */ + protected $size_gb = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $type + * Disk type backing the storage. + * @type int $size_gb + * Disk size in GiB. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Disk type backing the storage. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.PersistentDiskType type = 1; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Disk type backing the storage. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.PersistentDiskType type = 1; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\MigrationCenter\V1\PersistentDiskType::class); + $this->type = $var; + + return $this; + } + + /** + * Disk size in GiB. + * + * Generated from protobuf field int32 size_gb = 2; + * @return int + */ + public function getSizeGb() + { + return $this->size_gb; + } + + /** + * Disk size in GiB. + * + * Generated from protobuf field int32 size_gb = 2; + * @param int $var + * @return $this + */ + public function setSizeGb($var) + { + GPBUtil::checkInt32($var); + $this->size_gb = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/CpuUsageSample.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/CpuUsageSample.php new file mode 100644 index 000000000000..9670ebb811f7 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/CpuUsageSample.php @@ -0,0 +1,71 @@ +google.cloud.migrationcenter.v1.CpuUsageSample + */ +class CpuUsageSample extends \Google\Protobuf\Internal\Message +{ + /** + * Percentage of total CPU capacity utilized. Must be in the interval [0, + * 100]. On most systems can be calculated using 100 - idle percentage. + * + * Generated from protobuf field float utilized_percentage = 1; + */ + protected $utilized_percentage = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $utilized_percentage + * Percentage of total CPU capacity utilized. Must be in the interval [0, + * 100]. On most systems can be calculated using 100 - idle percentage. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Percentage of total CPU capacity utilized. Must be in the interval [0, + * 100]. On most systems can be calculated using 100 - idle percentage. + * + * Generated from protobuf field float utilized_percentage = 1; + * @return float + */ + public function getUtilizedPercentage() + { + return $this->utilized_percentage; + } + + /** + * Percentage of total CPU capacity utilized. Must be in the interval [0, + * 100]. On most systems can be calculated using 100 - idle percentage. + * + * Generated from protobuf field float utilized_percentage = 1; + * @param float $var + * @return $this + */ + public function setUtilizedPercentage($var) + { + GPBUtil::checkFloat($var); + $this->utilized_percentage = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/CreateGroupRequest.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/CreateGroupRequest.php new file mode 100644 index 000000000000..eaae81c59883 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/CreateGroupRequest.php @@ -0,0 +1,257 @@ +google.cloud.migrationcenter.v1.CreateGroupRequest + */ +class CreateGroupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Value for parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. User specified ID for the group. It will become the last + * component of the group name. The ID must be unique within the project, must + * conform with RFC-1034, is restricted to lower-cased letters, and has a + * maximum length of 63 characters. The ID must match the regular expression: + * `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`. + * + * Generated from protobuf field string group_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $group_id = ''; + /** + * Required. The group resource being created. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.Group group = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $group = null; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param string $parent Required. Value for parent. Please see + * {@see MigrationCenterClient::locationName()} for help formatting this field. + * @param \Google\Cloud\MigrationCenter\V1\Group $group Required. The group resource being created. + * @param string $groupId Required. User specified ID for the group. It will become the last + * component of the group name. The ID must be unique within the project, must + * conform with RFC-1034, is restricted to lower-cased letters, and has a + * maximum length of 63 characters. The ID must match the regular expression: + * `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`. + * + * @return \Google\Cloud\MigrationCenter\V1\CreateGroupRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\MigrationCenter\V1\Group $group, string $groupId): self + { + return (new self()) + ->setParent($parent) + ->setGroup($group) + ->setGroupId($groupId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Value for parent. + * @type string $group_id + * Required. User specified ID for the group. It will become the last + * component of the group name. The ID must be unique within the project, must + * conform with RFC-1034, is restricted to lower-cased letters, and has a + * maximum length of 63 characters. The ID must match the regular expression: + * `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`. + * @type \Google\Cloud\MigrationCenter\V1\Group $group + * Required. The group resource being created. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Required. Value for parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Value for parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. User specified ID for the group. It will become the last + * component of the group name. The ID must be unique within the project, must + * conform with RFC-1034, is restricted to lower-cased letters, and has a + * maximum length of 63 characters. The ID must match the regular expression: + * `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`. + * + * Generated from protobuf field string group_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getGroupId() + { + return $this->group_id; + } + + /** + * Required. User specified ID for the group. It will become the last + * component of the group name. The ID must be unique within the project, must + * conform with RFC-1034, is restricted to lower-cased letters, and has a + * maximum length of 63 characters. The ID must match the regular expression: + * `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`. + * + * Generated from protobuf field string group_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setGroupId($var) + { + GPBUtil::checkString($var, True); + $this->group_id = $var; + + return $this; + } + + /** + * Required. The group resource being created. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.Group group = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\MigrationCenter\V1\Group|null + */ + public function getGroup() + { + return $this->group; + } + + public function hasGroup() + { + return isset($this->group); + } + + public function clearGroup() + { + unset($this->group); + } + + /** + * Required. The group resource being created. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.Group group = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\MigrationCenter\V1\Group $var + * @return $this + */ + public function setGroup($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\Group::class); + $this->group = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/CreateImportDataFileRequest.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/CreateImportDataFileRequest.php new file mode 100644 index 000000000000..5f81d9e8f1c3 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/CreateImportDataFileRequest.php @@ -0,0 +1,237 @@ +google.cloud.migrationcenter.v1.CreateImportDataFileRequest + */ +class CreateImportDataFileRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the parent of the ImportDataFile. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The ID of the new data file. + * + * Generated from protobuf field string import_data_file_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $import_data_file_id = ''; + /** + * Required. The resource being created. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ImportDataFile import_data_file = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $import_data_file = null; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param string $parent Required. Name of the parent of the ImportDataFile. Please see + * {@see MigrationCenterClient::importJobName()} for help formatting this field. + * @param \Google\Cloud\MigrationCenter\V1\ImportDataFile $importDataFile Required. The resource being created. + * @param string $importDataFileId Required. The ID of the new data file. + * + * @return \Google\Cloud\MigrationCenter\V1\CreateImportDataFileRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\MigrationCenter\V1\ImportDataFile $importDataFile, string $importDataFileId): self + { + return (new self()) + ->setParent($parent) + ->setImportDataFile($importDataFile) + ->setImportDataFileId($importDataFileId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Name of the parent of the ImportDataFile. + * @type string $import_data_file_id + * Required. The ID of the new data file. + * @type \Google\Cloud\MigrationCenter\V1\ImportDataFile $import_data_file + * Required. The resource being created. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the parent of the ImportDataFile. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Name of the parent of the ImportDataFile. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The ID of the new data file. + * + * Generated from protobuf field string import_data_file_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getImportDataFileId() + { + return $this->import_data_file_id; + } + + /** + * Required. The ID of the new data file. + * + * Generated from protobuf field string import_data_file_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setImportDataFileId($var) + { + GPBUtil::checkString($var, True); + $this->import_data_file_id = $var; + + return $this; + } + + /** + * Required. The resource being created. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ImportDataFile import_data_file = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\MigrationCenter\V1\ImportDataFile|null + */ + public function getImportDataFile() + { + return $this->import_data_file; + } + + public function hasImportDataFile() + { + return isset($this->import_data_file); + } + + public function clearImportDataFile() + { + unset($this->import_data_file); + } + + /** + * Required. The resource being created. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ImportDataFile import_data_file = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\MigrationCenter\V1\ImportDataFile $var + * @return $this + */ + public function setImportDataFile($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\ImportDataFile::class); + $this->import_data_file = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/CreateImportJobRequest.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/CreateImportJobRequest.php new file mode 100644 index 000000000000..0a5e153e5d50 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/CreateImportJobRequest.php @@ -0,0 +1,237 @@ +google.cloud.migrationcenter.v1.CreateImportJobRequest + */ +class CreateImportJobRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Value for parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. ID of the import job. + * + * Generated from protobuf field string import_job_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $import_job_id = ''; + /** + * Required. The resource being created. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ImportJob import_job = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $import_job = null; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param string $parent Required. Value for parent. Please see + * {@see MigrationCenterClient::locationName()} for help formatting this field. + * @param \Google\Cloud\MigrationCenter\V1\ImportJob $importJob Required. The resource being created. + * @param string $importJobId Required. ID of the import job. + * + * @return \Google\Cloud\MigrationCenter\V1\CreateImportJobRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\MigrationCenter\V1\ImportJob $importJob, string $importJobId): self + { + return (new self()) + ->setParent($parent) + ->setImportJob($importJob) + ->setImportJobId($importJobId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Value for parent. + * @type string $import_job_id + * Required. ID of the import job. + * @type \Google\Cloud\MigrationCenter\V1\ImportJob $import_job + * Required. The resource being created. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Required. Value for parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Value for parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. ID of the import job. + * + * Generated from protobuf field string import_job_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getImportJobId() + { + return $this->import_job_id; + } + + /** + * Required. ID of the import job. + * + * Generated from protobuf field string import_job_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setImportJobId($var) + { + GPBUtil::checkString($var, True); + $this->import_job_id = $var; + + return $this; + } + + /** + * Required. The resource being created. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ImportJob import_job = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\MigrationCenter\V1\ImportJob|null + */ + public function getImportJob() + { + return $this->import_job; + } + + public function hasImportJob() + { + return isset($this->import_job); + } + + public function clearImportJob() + { + unset($this->import_job); + } + + /** + * Required. The resource being created. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ImportJob import_job = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\MigrationCenter\V1\ImportJob $var + * @return $this + */ + public function setImportJob($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\ImportJob::class); + $this->import_job = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/CreatePreferenceSetRequest.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/CreatePreferenceSetRequest.php new file mode 100644 index 000000000000..c972bae0ecc1 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/CreatePreferenceSetRequest.php @@ -0,0 +1,262 @@ +google.cloud.migrationcenter.v1.CreatePreferenceSetRequest + */ +class CreatePreferenceSetRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Value for parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. User specified ID for the preference set. It will become the last + * component of the preference set name. The ID must be unique within the + * project, must conform with RFC-1034, is restricted to lower-cased letters, + * and has a maximum length of 63 characters. The ID must match the regular + * expression + * `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`. + * + * Generated from protobuf field string preference_set_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $preference_set_id = ''; + /** + * Required. The preference set resource being created. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.PreferenceSet preference_set = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $preference_set = null; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param string $parent Required. Value for parent. Please see + * {@see MigrationCenterClient::locationName()} for help formatting this field. + * @param \Google\Cloud\MigrationCenter\V1\PreferenceSet $preferenceSet Required. The preference set resource being created. + * @param string $preferenceSetId Required. User specified ID for the preference set. It will become the last + * component of the preference set name. The ID must be unique within the + * project, must conform with RFC-1034, is restricted to lower-cased letters, + * and has a maximum length of 63 characters. The ID must match the regular + * expression + * `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`. + * + * @return \Google\Cloud\MigrationCenter\V1\CreatePreferenceSetRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\MigrationCenter\V1\PreferenceSet $preferenceSet, string $preferenceSetId): self + { + return (new self()) + ->setParent($parent) + ->setPreferenceSet($preferenceSet) + ->setPreferenceSetId($preferenceSetId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Value for parent. + * @type string $preference_set_id + * Required. User specified ID for the preference set. It will become the last + * component of the preference set name. The ID must be unique within the + * project, must conform with RFC-1034, is restricted to lower-cased letters, + * and has a maximum length of 63 characters. The ID must match the regular + * expression + * `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`. + * @type \Google\Cloud\MigrationCenter\V1\PreferenceSet $preference_set + * Required. The preference set resource being created. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Required. Value for parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Value for parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. User specified ID for the preference set. It will become the last + * component of the preference set name. The ID must be unique within the + * project, must conform with RFC-1034, is restricted to lower-cased letters, + * and has a maximum length of 63 characters. The ID must match the regular + * expression + * `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`. + * + * Generated from protobuf field string preference_set_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPreferenceSetId() + { + return $this->preference_set_id; + } + + /** + * Required. User specified ID for the preference set. It will become the last + * component of the preference set name. The ID must be unique within the + * project, must conform with RFC-1034, is restricted to lower-cased letters, + * and has a maximum length of 63 characters. The ID must match the regular + * expression + * `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`. + * + * Generated from protobuf field string preference_set_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPreferenceSetId($var) + { + GPBUtil::checkString($var, True); + $this->preference_set_id = $var; + + return $this; + } + + /** + * Required. The preference set resource being created. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.PreferenceSet preference_set = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\MigrationCenter\V1\PreferenceSet|null + */ + public function getPreferenceSet() + { + return $this->preference_set; + } + + public function hasPreferenceSet() + { + return isset($this->preference_set); + } + + public function clearPreferenceSet() + { + unset($this->preference_set); + } + + /** + * Required. The preference set resource being created. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.PreferenceSet preference_set = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\MigrationCenter\V1\PreferenceSet $var + * @return $this + */ + public function setPreferenceSet($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\PreferenceSet::class); + $this->preference_set = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/CreateReportConfigRequest.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/CreateReportConfigRequest.php new file mode 100644 index 000000000000..7f7d7dbf97db --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/CreateReportConfigRequest.php @@ -0,0 +1,257 @@ +google.cloud.migrationcenter.v1.CreateReportConfigRequest + */ +class CreateReportConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Value for parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. User specified ID for the report config. It will become the last + * component of the report config name. The ID must be unique within the + * project, must conform with RFC-1034, is restricted to lower-cased letters, + * and has a maximum length of 63 characters. The ID must match the regular + * expression: [a-z]([a-z0-9-]{0,61}[a-z0-9])?. + * + * Generated from protobuf field string report_config_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $report_config_id = ''; + /** + * Required. The report config set resource being created. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ReportConfig report_config = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $report_config = null; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param string $parent Required. Value for parent. Please see + * {@see MigrationCenterClient::locationName()} for help formatting this field. + * @param \Google\Cloud\MigrationCenter\V1\ReportConfig $reportConfig Required. The report config set resource being created. + * @param string $reportConfigId Required. User specified ID for the report config. It will become the last + * component of the report config name. The ID must be unique within the + * project, must conform with RFC-1034, is restricted to lower-cased letters, + * and has a maximum length of 63 characters. The ID must match the regular + * expression: [a-z]([a-z0-9-]{0,61}[a-z0-9])?. + * + * @return \Google\Cloud\MigrationCenter\V1\CreateReportConfigRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\MigrationCenter\V1\ReportConfig $reportConfig, string $reportConfigId): self + { + return (new self()) + ->setParent($parent) + ->setReportConfig($reportConfig) + ->setReportConfigId($reportConfigId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Value for parent. + * @type string $report_config_id + * Required. User specified ID for the report config. It will become the last + * component of the report config name. The ID must be unique within the + * project, must conform with RFC-1034, is restricted to lower-cased letters, + * and has a maximum length of 63 characters. The ID must match the regular + * expression: [a-z]([a-z0-9-]{0,61}[a-z0-9])?. + * @type \Google\Cloud\MigrationCenter\V1\ReportConfig $report_config + * Required. The report config set resource being created. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Required. Value for parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Value for parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. User specified ID for the report config. It will become the last + * component of the report config name. The ID must be unique within the + * project, must conform with RFC-1034, is restricted to lower-cased letters, + * and has a maximum length of 63 characters. The ID must match the regular + * expression: [a-z]([a-z0-9-]{0,61}[a-z0-9])?. + * + * Generated from protobuf field string report_config_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getReportConfigId() + { + return $this->report_config_id; + } + + /** + * Required. User specified ID for the report config. It will become the last + * component of the report config name. The ID must be unique within the + * project, must conform with RFC-1034, is restricted to lower-cased letters, + * and has a maximum length of 63 characters. The ID must match the regular + * expression: [a-z]([a-z0-9-]{0,61}[a-z0-9])?. + * + * Generated from protobuf field string report_config_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setReportConfigId($var) + { + GPBUtil::checkString($var, True); + $this->report_config_id = $var; + + return $this; + } + + /** + * Required. The report config set resource being created. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ReportConfig report_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\MigrationCenter\V1\ReportConfig|null + */ + public function getReportConfig() + { + return $this->report_config; + } + + public function hasReportConfig() + { + return isset($this->report_config); + } + + public function clearReportConfig() + { + unset($this->report_config); + } + + /** + * Required. The report config set resource being created. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ReportConfig report_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\MigrationCenter\V1\ReportConfig $var + * @return $this + */ + public function setReportConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\ReportConfig::class); + $this->report_config = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/CreateReportRequest.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/CreateReportRequest.php new file mode 100644 index 000000000000..203eeb2ced47 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/CreateReportRequest.php @@ -0,0 +1,257 @@ +google.cloud.migrationcenter.v1.CreateReportRequest + */ +class CreateReportRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Value for parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. User specified id for the report. It will become the last + * component of the report name. The id must be unique within the project, + * must conform with RFC-1034, is restricted to lower-cased letters, and has a + * maximum length of 63 characters. The id must match the regular expression: + * [a-z]([a-z0-9-]{0,61}[a-z0-9])?. + * + * Generated from protobuf field string report_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $report_id = ''; + /** + * Required. The report resource being created. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.Report report = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $report = null; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param string $parent Required. Value for parent. Please see + * {@see MigrationCenterClient::reportConfigName()} for help formatting this field. + * @param \Google\Cloud\MigrationCenter\V1\Report $report Required. The report resource being created. + * @param string $reportId Required. User specified id for the report. It will become the last + * component of the report name. The id must be unique within the project, + * must conform with RFC-1034, is restricted to lower-cased letters, and has a + * maximum length of 63 characters. The id must match the regular expression: + * [a-z]([a-z0-9-]{0,61}[a-z0-9])?. + * + * @return \Google\Cloud\MigrationCenter\V1\CreateReportRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\MigrationCenter\V1\Report $report, string $reportId): self + { + return (new self()) + ->setParent($parent) + ->setReport($report) + ->setReportId($reportId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Value for parent. + * @type string $report_id + * Required. User specified id for the report. It will become the last + * component of the report name. The id must be unique within the project, + * must conform with RFC-1034, is restricted to lower-cased letters, and has a + * maximum length of 63 characters. The id must match the regular expression: + * [a-z]([a-z0-9-]{0,61}[a-z0-9])?. + * @type \Google\Cloud\MigrationCenter\V1\Report $report + * Required. The report resource being created. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Required. Value for parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Value for parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. User specified id for the report. It will become the last + * component of the report name. The id must be unique within the project, + * must conform with RFC-1034, is restricted to lower-cased letters, and has a + * maximum length of 63 characters. The id must match the regular expression: + * [a-z]([a-z0-9-]{0,61}[a-z0-9])?. + * + * Generated from protobuf field string report_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getReportId() + { + return $this->report_id; + } + + /** + * Required. User specified id for the report. It will become the last + * component of the report name. The id must be unique within the project, + * must conform with RFC-1034, is restricted to lower-cased letters, and has a + * maximum length of 63 characters. The id must match the regular expression: + * [a-z]([a-z0-9-]{0,61}[a-z0-9])?. + * + * Generated from protobuf field string report_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setReportId($var) + { + GPBUtil::checkString($var, True); + $this->report_id = $var; + + return $this; + } + + /** + * Required. The report resource being created. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.Report report = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\MigrationCenter\V1\Report|null + */ + public function getReport() + { + return $this->report; + } + + public function hasReport() + { + return isset($this->report); + } + + public function clearReport() + { + unset($this->report); + } + + /** + * Required. The report resource being created. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.Report report = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\MigrationCenter\V1\Report $var + * @return $this + */ + public function setReport($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\Report::class); + $this->report = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/CreateSourceRequest.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/CreateSourceRequest.php new file mode 100644 index 000000000000..0b0e144c6a00 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/CreateSourceRequest.php @@ -0,0 +1,257 @@ +google.cloud.migrationcenter.v1.CreateSourceRequest + */ +class CreateSourceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Value for parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. User specified ID for the source. It will become the last + * component of the source name. The ID must be unique within the project, + * must conform with RFC-1034, is restricted to lower-cased letters, and has a + * maximum length of 63 characters. The ID must match the regular expression: + * `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`. + * + * Generated from protobuf field string source_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $source_id = ''; + /** + * Required. The resource being created. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.Source source = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $source = null; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param string $parent Required. Value for parent. Please see + * {@see MigrationCenterClient::locationName()} for help formatting this field. + * @param \Google\Cloud\MigrationCenter\V1\Source $source Required. The resource being created. + * @param string $sourceId Required. User specified ID for the source. It will become the last + * component of the source name. The ID must be unique within the project, + * must conform with RFC-1034, is restricted to lower-cased letters, and has a + * maximum length of 63 characters. The ID must match the regular expression: + * `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`. + * + * @return \Google\Cloud\MigrationCenter\V1\CreateSourceRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\MigrationCenter\V1\Source $source, string $sourceId): self + { + return (new self()) + ->setParent($parent) + ->setSource($source) + ->setSourceId($sourceId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Value for parent. + * @type string $source_id + * Required. User specified ID for the source. It will become the last + * component of the source name. The ID must be unique within the project, + * must conform with RFC-1034, is restricted to lower-cased letters, and has a + * maximum length of 63 characters. The ID must match the regular expression: + * `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`. + * @type \Google\Cloud\MigrationCenter\V1\Source $source + * Required. The resource being created. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Required. Value for parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Value for parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. User specified ID for the source. It will become the last + * component of the source name. The ID must be unique within the project, + * must conform with RFC-1034, is restricted to lower-cased letters, and has a + * maximum length of 63 characters. The ID must match the regular expression: + * `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`. + * + * Generated from protobuf field string source_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getSourceId() + { + return $this->source_id; + } + + /** + * Required. User specified ID for the source. It will become the last + * component of the source name. The ID must be unique within the project, + * must conform with RFC-1034, is restricted to lower-cased letters, and has a + * maximum length of 63 characters. The ID must match the regular expression: + * `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`. + * + * Generated from protobuf field string source_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setSourceId($var) + { + GPBUtil::checkString($var, True); + $this->source_id = $var; + + return $this; + } + + /** + * Required. The resource being created. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.Source source = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\MigrationCenter\V1\Source|null + */ + public function getSource() + { + return $this->source; + } + + public function hasSource() + { + return isset($this->source); + } + + public function clearSource() + { + unset($this->source); + } + + /** + * Required. The resource being created. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.Source source = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\MigrationCenter\V1\Source $var + * @return $this + */ + public function setSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\Source::class); + $this->source = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DailyResourceUsageAggregation.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DailyResourceUsageAggregation.php new file mode 100644 index 000000000000..cb5cc1ead3de --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DailyResourceUsageAggregation.php @@ -0,0 +1,253 @@ +google.cloud.migrationcenter.v1.DailyResourceUsageAggregation + */ +class DailyResourceUsageAggregation extends \Google\Protobuf\Internal\Message +{ + /** + * Aggregation date. Day boundaries are at midnight UTC. + * + * Generated from protobuf field .google.type.Date date = 1; + */ + protected $date = null; + /** + * CPU usage. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.CPU cpu = 2; + */ + protected $cpu = null; + /** + * Memory usage. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Memory memory = 3; + */ + protected $memory = null; + /** + * Network usage. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Network network = 4; + */ + protected $network = null; + /** + * Disk usage. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Disk disk = 5; + */ + protected $disk = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Type\Date $date + * Aggregation date. Day boundaries are at midnight UTC. + * @type \Google\Cloud\MigrationCenter\V1\DailyResourceUsageAggregation\CPU $cpu + * CPU usage. + * @type \Google\Cloud\MigrationCenter\V1\DailyResourceUsageAggregation\Memory $memory + * Memory usage. + * @type \Google\Cloud\MigrationCenter\V1\DailyResourceUsageAggregation\Network $network + * Network usage. + * @type \Google\Cloud\MigrationCenter\V1\DailyResourceUsageAggregation\Disk $disk + * Disk usage. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Aggregation date. Day boundaries are at midnight UTC. + * + * Generated from protobuf field .google.type.Date date = 1; + * @return \Google\Type\Date|null + */ + public function getDate() + { + return $this->date; + } + + public function hasDate() + { + return isset($this->date); + } + + public function clearDate() + { + unset($this->date); + } + + /** + * Aggregation date. Day boundaries are at midnight UTC. + * + * Generated from protobuf field .google.type.Date date = 1; + * @param \Google\Type\Date $var + * @return $this + */ + public function setDate($var) + { + GPBUtil::checkMessage($var, \Google\Type\Date::class); + $this->date = $var; + + return $this; + } + + /** + * CPU usage. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.CPU cpu = 2; + * @return \Google\Cloud\MigrationCenter\V1\DailyResourceUsageAggregation\CPU|null + */ + public function getCpu() + { + return $this->cpu; + } + + public function hasCpu() + { + return isset($this->cpu); + } + + public function clearCpu() + { + unset($this->cpu); + } + + /** + * CPU usage. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.CPU cpu = 2; + * @param \Google\Cloud\MigrationCenter\V1\DailyResourceUsageAggregation\CPU $var + * @return $this + */ + public function setCpu($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\DailyResourceUsageAggregation\CPU::class); + $this->cpu = $var; + + return $this; + } + + /** + * Memory usage. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Memory memory = 3; + * @return \Google\Cloud\MigrationCenter\V1\DailyResourceUsageAggregation\Memory|null + */ + public function getMemory() + { + return $this->memory; + } + + public function hasMemory() + { + return isset($this->memory); + } + + public function clearMemory() + { + unset($this->memory); + } + + /** + * Memory usage. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Memory memory = 3; + * @param \Google\Cloud\MigrationCenter\V1\DailyResourceUsageAggregation\Memory $var + * @return $this + */ + public function setMemory($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\DailyResourceUsageAggregation\Memory::class); + $this->memory = $var; + + return $this; + } + + /** + * Network usage. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Network network = 4; + * @return \Google\Cloud\MigrationCenter\V1\DailyResourceUsageAggregation\Network|null + */ + public function getNetwork() + { + return $this->network; + } + + public function hasNetwork() + { + return isset($this->network); + } + + public function clearNetwork() + { + unset($this->network); + } + + /** + * Network usage. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Network network = 4; + * @param \Google\Cloud\MigrationCenter\V1\DailyResourceUsageAggregation\Network $var + * @return $this + */ + public function setNetwork($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\DailyResourceUsageAggregation\Network::class); + $this->network = $var; + + return $this; + } + + /** + * Disk usage. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Disk disk = 5; + * @return \Google\Cloud\MigrationCenter\V1\DailyResourceUsageAggregation\Disk|null + */ + public function getDisk() + { + return $this->disk; + } + + public function hasDisk() + { + return isset($this->disk); + } + + public function clearDisk() + { + unset($this->disk); + } + + /** + * Disk usage. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Disk disk = 5; + * @param \Google\Cloud\MigrationCenter\V1\DailyResourceUsageAggregation\Disk $var + * @return $this + */ + public function setDisk($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\DailyResourceUsageAggregation\Disk::class); + $this->disk = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DailyResourceUsageAggregation/CPU.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DailyResourceUsageAggregation/CPU.php new file mode 100644 index 000000000000..3d47f260cf30 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DailyResourceUsageAggregation/CPU.php @@ -0,0 +1,80 @@ +google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.CPU + */ +class CPU extends \Google\Protobuf\Internal\Message +{ + /** + * CPU utilization percentage. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats utilization_percentage = 1; + */ + protected $utilization_percentage = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\MigrationCenter\V1\DailyResourceUsageAggregation\Stats $utilization_percentage + * CPU utilization percentage. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * CPU utilization percentage. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats utilization_percentage = 1; + * @return \Google\Cloud\MigrationCenter\V1\DailyResourceUsageAggregation\Stats|null + */ + public function getUtilizationPercentage() + { + return $this->utilization_percentage; + } + + public function hasUtilizationPercentage() + { + return isset($this->utilization_percentage); + } + + public function clearUtilizationPercentage() + { + unset($this->utilization_percentage); + } + + /** + * CPU utilization percentage. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats utilization_percentage = 1; + * @param \Google\Cloud\MigrationCenter\V1\DailyResourceUsageAggregation\Stats $var + * @return $this + */ + public function setUtilizationPercentage($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\DailyResourceUsageAggregation\Stats::class); + $this->utilization_percentage = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(CPU::class, \Google\Cloud\MigrationCenter\V1\DailyResourceUsageAggregation_CPU::class); + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DailyResourceUsageAggregation/Disk.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DailyResourceUsageAggregation/Disk.php new file mode 100644 index 000000000000..6a18aa1ea7ab --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DailyResourceUsageAggregation/Disk.php @@ -0,0 +1,80 @@ +google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Disk + */ +class Disk extends \Google\Protobuf\Internal\Message +{ + /** + * Disk I/O operations per second. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats iops = 1; + */ + protected $iops = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\MigrationCenter\V1\DailyResourceUsageAggregation\Stats $iops + * Disk I/O operations per second. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Disk I/O operations per second. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats iops = 1; + * @return \Google\Cloud\MigrationCenter\V1\DailyResourceUsageAggregation\Stats|null + */ + public function getIops() + { + return $this->iops; + } + + public function hasIops() + { + return isset($this->iops); + } + + public function clearIops() + { + unset($this->iops); + } + + /** + * Disk I/O operations per second. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats iops = 1; + * @param \Google\Cloud\MigrationCenter\V1\DailyResourceUsageAggregation\Stats $var + * @return $this + */ + public function setIops($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\DailyResourceUsageAggregation\Stats::class); + $this->iops = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Disk::class, \Google\Cloud\MigrationCenter\V1\DailyResourceUsageAggregation_Disk::class); + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DailyResourceUsageAggregation/Memory.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DailyResourceUsageAggregation/Memory.php new file mode 100644 index 000000000000..efc89f8fa29a --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DailyResourceUsageAggregation/Memory.php @@ -0,0 +1,80 @@ +google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Memory + */ +class Memory extends \Google\Protobuf\Internal\Message +{ + /** + * Memory utilization percentage. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats utilization_percentage = 1; + */ + protected $utilization_percentage = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\MigrationCenter\V1\DailyResourceUsageAggregation\Stats $utilization_percentage + * Memory utilization percentage. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Memory utilization percentage. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats utilization_percentage = 1; + * @return \Google\Cloud\MigrationCenter\V1\DailyResourceUsageAggregation\Stats|null + */ + public function getUtilizationPercentage() + { + return $this->utilization_percentage; + } + + public function hasUtilizationPercentage() + { + return isset($this->utilization_percentage); + } + + public function clearUtilizationPercentage() + { + unset($this->utilization_percentage); + } + + /** + * Memory utilization percentage. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats utilization_percentage = 1; + * @param \Google\Cloud\MigrationCenter\V1\DailyResourceUsageAggregation\Stats $var + * @return $this + */ + public function setUtilizationPercentage($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\DailyResourceUsageAggregation\Stats::class); + $this->utilization_percentage = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Memory::class, \Google\Cloud\MigrationCenter\V1\DailyResourceUsageAggregation_Memory::class); + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DailyResourceUsageAggregation/Network.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DailyResourceUsageAggregation/Network.php new file mode 100644 index 000000000000..1861848fd408 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DailyResourceUsageAggregation/Network.php @@ -0,0 +1,124 @@ +google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Network + */ +class Network extends \Google\Protobuf\Internal\Message +{ + /** + * Network ingress in B/s. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats ingress_bps = 1; + */ + protected $ingress_bps = null; + /** + * Network egress in B/s. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats egress_bps = 2; + */ + protected $egress_bps = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\MigrationCenter\V1\DailyResourceUsageAggregation\Stats $ingress_bps + * Network ingress in B/s. + * @type \Google\Cloud\MigrationCenter\V1\DailyResourceUsageAggregation\Stats $egress_bps + * Network egress in B/s. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Network ingress in B/s. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats ingress_bps = 1; + * @return \Google\Cloud\MigrationCenter\V1\DailyResourceUsageAggregation\Stats|null + */ + public function getIngressBps() + { + return $this->ingress_bps; + } + + public function hasIngressBps() + { + return isset($this->ingress_bps); + } + + public function clearIngressBps() + { + unset($this->ingress_bps); + } + + /** + * Network ingress in B/s. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats ingress_bps = 1; + * @param \Google\Cloud\MigrationCenter\V1\DailyResourceUsageAggregation\Stats $var + * @return $this + */ + public function setIngressBps($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\DailyResourceUsageAggregation\Stats::class); + $this->ingress_bps = $var; + + return $this; + } + + /** + * Network egress in B/s. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats egress_bps = 2; + * @return \Google\Cloud\MigrationCenter\V1\DailyResourceUsageAggregation\Stats|null + */ + public function getEgressBps() + { + return $this->egress_bps; + } + + public function hasEgressBps() + { + return isset($this->egress_bps); + } + + public function clearEgressBps() + { + unset($this->egress_bps); + } + + /** + * Network egress in B/s. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats egress_bps = 2; + * @param \Google\Cloud\MigrationCenter\V1\DailyResourceUsageAggregation\Stats $var + * @return $this + */ + public function setEgressBps($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\DailyResourceUsageAggregation\Stats::class); + $this->egress_bps = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Network::class, \Google\Cloud\MigrationCenter\V1\DailyResourceUsageAggregation_Network::class); + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DailyResourceUsageAggregation/Stats.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DailyResourceUsageAggregation/Stats.php new file mode 100644 index 000000000000..c51d20e780d6 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DailyResourceUsageAggregation/Stats.php @@ -0,0 +1,172 @@ +google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats + */ +class Stats extends \Google\Protobuf\Internal\Message +{ + /** + * Average usage value. + * + * Generated from protobuf field float average = 1; + */ + protected $average = 0.0; + /** + * Median usage value. + * + * Generated from protobuf field float median = 2; + */ + protected $median = 0.0; + /** + * 95th percentile usage value. + * + * Generated from protobuf field float nintey_fifth_percentile = 3; + */ + protected $nintey_fifth_percentile = 0.0; + /** + * Peak usage value. + * + * Generated from protobuf field float peak = 4; + */ + protected $peak = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $average + * Average usage value. + * @type float $median + * Median usage value. + * @type float $nintey_fifth_percentile + * 95th percentile usage value. + * @type float $peak + * Peak usage value. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Average usage value. + * + * Generated from protobuf field float average = 1; + * @return float + */ + public function getAverage() + { + return $this->average; + } + + /** + * Average usage value. + * + * Generated from protobuf field float average = 1; + * @param float $var + * @return $this + */ + public function setAverage($var) + { + GPBUtil::checkFloat($var); + $this->average = $var; + + return $this; + } + + /** + * Median usage value. + * + * Generated from protobuf field float median = 2; + * @return float + */ + public function getMedian() + { + return $this->median; + } + + /** + * Median usage value. + * + * Generated from protobuf field float median = 2; + * @param float $var + * @return $this + */ + public function setMedian($var) + { + GPBUtil::checkFloat($var); + $this->median = $var; + + return $this; + } + + /** + * 95th percentile usage value. + * + * Generated from protobuf field float nintey_fifth_percentile = 3; + * @return float + */ + public function getNinteyFifthPercentile() + { + return $this->nintey_fifth_percentile; + } + + /** + * 95th percentile usage value. + * + * Generated from protobuf field float nintey_fifth_percentile = 3; + * @param float $var + * @return $this + */ + public function setNinteyFifthPercentile($var) + { + GPBUtil::checkFloat($var); + $this->nintey_fifth_percentile = $var; + + return $this; + } + + /** + * Peak usage value. + * + * Generated from protobuf field float peak = 4; + * @return float + */ + public function getPeak() + { + return $this->peak; + } + + /** + * Peak usage value. + * + * Generated from protobuf field float peak = 4; + * @param float $var + * @return $this + */ + public function setPeak($var) + { + GPBUtil::checkFloat($var); + $this->peak = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Stats::class, \Google\Cloud\MigrationCenter\V1\DailyResourceUsageAggregation_Stats::class); + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DeleteAssetRequest.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DeleteAssetRequest.php new file mode 100644 index 000000000000..bf316eb295cd --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DeleteAssetRequest.php @@ -0,0 +1,155 @@ +google.cloud.migrationcenter.v1.DeleteAssetRequest + */ +class DeleteAssetRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param string $name Required. Name of the resource. Please see + * {@see MigrationCenterClient::assetName()} for help formatting this field. + * + * @return \Google\Cloud\MigrationCenter\V1\DeleteAssetRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the resource. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DeleteGroupRequest.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DeleteGroupRequest.php new file mode 100644 index 000000000000..e4ef8cb44d70 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DeleteGroupRequest.php @@ -0,0 +1,155 @@ +google.cloud.migrationcenter.v1.DeleteGroupRequest + */ +class DeleteGroupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the group resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param string $name Required. Name of the group resource. Please see + * {@see MigrationCenterClient::groupName()} for help formatting this field. + * + * @return \Google\Cloud\MigrationCenter\V1\DeleteGroupRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the group resource. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the group resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the group resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DeleteImportDataFileRequest.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DeleteImportDataFileRequest.php new file mode 100644 index 000000000000..57bcb180d47f --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DeleteImportDataFileRequest.php @@ -0,0 +1,155 @@ +google.cloud.migrationcenter.v1.DeleteImportDataFileRequest + */ +class DeleteImportDataFileRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the ImportDataFile to delete. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param string $name Required. Name of the ImportDataFile to delete. Please see + * {@see MigrationCenterClient::importDataFileName()} for help formatting this field. + * + * @return \Google\Cloud\MigrationCenter\V1\DeleteImportDataFileRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the ImportDataFile to delete. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the ImportDataFile to delete. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the ImportDataFile to delete. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DeleteImportJobRequest.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DeleteImportJobRequest.php new file mode 100644 index 000000000000..3d581d7757c1 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DeleteImportJobRequest.php @@ -0,0 +1,197 @@ +google.cloud.migrationcenter.v1.DeleteImportJobRequest + */ +class DeleteImportJobRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + /** + * Optional. If set to `true`, any `ImportDataFiles` of this job will also be + * deleted If set to `false`, the request only works if the job has no data + * files. + * + * Generated from protobuf field bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $force = false; + + /** + * @param string $name Required. Name of the resource. Please see + * {@see MigrationCenterClient::importJobName()} for help formatting this field. + * + * @return \Google\Cloud\MigrationCenter\V1\DeleteImportJobRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the resource. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @type bool $force + * Optional. If set to `true`, any `ImportDataFiles` of this job will also be + * deleted If set to `false`, the request only works if the job has no data + * files. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + + /** + * Optional. If set to `true`, any `ImportDataFiles` of this job will also be + * deleted If set to `false`, the request only works if the job has no data + * files. + * + * Generated from protobuf field bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getForce() + { + return $this->force; + } + + /** + * Optional. If set to `true`, any `ImportDataFiles` of this job will also be + * deleted If set to `false`, the request only works if the job has no data + * files. + * + * Generated from protobuf field bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setForce($var) + { + GPBUtil::checkBool($var); + $this->force = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DeletePreferenceSetRequest.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DeletePreferenceSetRequest.php new file mode 100644 index 000000000000..dfdac0be8cbe --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DeletePreferenceSetRequest.php @@ -0,0 +1,155 @@ +google.cloud.migrationcenter.v1.DeletePreferenceSetRequest + */ +class DeletePreferenceSetRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the group resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param string $name Required. Name of the group resource. Please see + * {@see MigrationCenterClient::preferenceSetName()} for help formatting this field. + * + * @return \Google\Cloud\MigrationCenter\V1\DeletePreferenceSetRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the group resource. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the group resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the group resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DeleteReportConfigRequest.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DeleteReportConfigRequest.php new file mode 100644 index 000000000000..dc84aa089a70 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DeleteReportConfigRequest.php @@ -0,0 +1,197 @@ +google.cloud.migrationcenter.v1.DeleteReportConfigRequest + */ +class DeleteReportConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + /** + * Optional. If set to `true`, any child `Reports` of this entity will also be + * deleted. If set to `false`, the request only works if the resource has no + * children. + * + * Generated from protobuf field bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $force = false; + + /** + * @param string $name Required. Name of the resource. Please see + * {@see MigrationCenterClient::reportConfigName()} for help formatting this field. + * + * @return \Google\Cloud\MigrationCenter\V1\DeleteReportConfigRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the resource. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @type bool $force + * Optional. If set to `true`, any child `Reports` of this entity will also be + * deleted. If set to `false`, the request only works if the resource has no + * children. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + + /** + * Optional. If set to `true`, any child `Reports` of this entity will also be + * deleted. If set to `false`, the request only works if the resource has no + * children. + * + * Generated from protobuf field bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getForce() + { + return $this->force; + } + + /** + * Optional. If set to `true`, any child `Reports` of this entity will also be + * deleted. If set to `false`, the request only works if the resource has no + * children. + * + * Generated from protobuf field bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setForce($var) + { + GPBUtil::checkBool($var); + $this->force = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DeleteReportRequest.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DeleteReportRequest.php new file mode 100644 index 000000000000..a65423b390c1 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DeleteReportRequest.php @@ -0,0 +1,155 @@ +google.cloud.migrationcenter.v1.DeleteReportRequest + */ +class DeleteReportRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param string $name Required. Name of the resource. Please see + * {@see MigrationCenterClient::reportName()} for help formatting this field. + * + * @return \Google\Cloud\MigrationCenter\V1\DeleteReportRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the resource. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DeleteSourceRequest.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DeleteSourceRequest.php new file mode 100644 index 000000000000..13b36660f9b3 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DeleteSourceRequest.php @@ -0,0 +1,155 @@ +google.cloud.migrationcenter.v1.DeleteSourceRequest + */ +class DeleteSourceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param string $name Required. Name of the resource. Please see + * {@see MigrationCenterClient::sourceName()} for help formatting this field. + * + * @return \Google\Cloud\MigrationCenter\V1\DeleteSourceRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the resource. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DiskEntry.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DiskEntry.php new file mode 100644 index 000000000000..4a10c0ae7a15 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DiskEntry.php @@ -0,0 +1,323 @@ +google.cloud.migrationcenter.v1.DiskEntry + */ +class DiskEntry extends \Google\Protobuf\Internal\Message +{ + /** + * Disk capacity. + * + * Generated from protobuf field int64 capacity_bytes = 1; + */ + protected $capacity_bytes = 0; + /** + * Disk free space. + * + * Generated from protobuf field int64 free_bytes = 2; + */ + protected $free_bytes = 0; + /** + * Disk label. + * + * Generated from protobuf field string disk_label = 3; + */ + protected $disk_label = ''; + /** + * Disk label type (e.g. BIOS/GPT) + * + * Generated from protobuf field string disk_label_type = 4; + */ + protected $disk_label_type = ''; + /** + * Disks interface type. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.DiskEntry.InterfaceType interface_type = 5; + */ + protected $interface_type = 0; + /** + * Partition layout. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.DiskPartitionList partitions = 6; + */ + protected $partitions = null; + /** + * Disk hardware address (e.g. 0:1 for SCSI). + * + * Generated from protobuf field string hw_address = 7; + */ + protected $hw_address = ''; + protected $platform_specific; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $capacity_bytes + * Disk capacity. + * @type int|string $free_bytes + * Disk free space. + * @type string $disk_label + * Disk label. + * @type string $disk_label_type + * Disk label type (e.g. BIOS/GPT) + * @type int $interface_type + * Disks interface type. + * @type \Google\Cloud\MigrationCenter\V1\DiskPartitionList $partitions + * Partition layout. + * @type string $hw_address + * Disk hardware address (e.g. 0:1 for SCSI). + * @type \Google\Cloud\MigrationCenter\V1\VmwareDiskConfig $vmware + * VMware disk details. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Disk capacity. + * + * Generated from protobuf field int64 capacity_bytes = 1; + * @return int|string + */ + public function getCapacityBytes() + { + return $this->capacity_bytes; + } + + /** + * Disk capacity. + * + * Generated from protobuf field int64 capacity_bytes = 1; + * @param int|string $var + * @return $this + */ + public function setCapacityBytes($var) + { + GPBUtil::checkInt64($var); + $this->capacity_bytes = $var; + + return $this; + } + + /** + * Disk free space. + * + * Generated from protobuf field int64 free_bytes = 2; + * @return int|string + */ + public function getFreeBytes() + { + return $this->free_bytes; + } + + /** + * Disk free space. + * + * Generated from protobuf field int64 free_bytes = 2; + * @param int|string $var + * @return $this + */ + public function setFreeBytes($var) + { + GPBUtil::checkInt64($var); + $this->free_bytes = $var; + + return $this; + } + + /** + * Disk label. + * + * Generated from protobuf field string disk_label = 3; + * @return string + */ + public function getDiskLabel() + { + return $this->disk_label; + } + + /** + * Disk label. + * + * Generated from protobuf field string disk_label = 3; + * @param string $var + * @return $this + */ + public function setDiskLabel($var) + { + GPBUtil::checkString($var, True); + $this->disk_label = $var; + + return $this; + } + + /** + * Disk label type (e.g. BIOS/GPT) + * + * Generated from protobuf field string disk_label_type = 4; + * @return string + */ + public function getDiskLabelType() + { + return $this->disk_label_type; + } + + /** + * Disk label type (e.g. BIOS/GPT) + * + * Generated from protobuf field string disk_label_type = 4; + * @param string $var + * @return $this + */ + public function setDiskLabelType($var) + { + GPBUtil::checkString($var, True); + $this->disk_label_type = $var; + + return $this; + } + + /** + * Disks interface type. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.DiskEntry.InterfaceType interface_type = 5; + * @return int + */ + public function getInterfaceType() + { + return $this->interface_type; + } + + /** + * Disks interface type. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.DiskEntry.InterfaceType interface_type = 5; + * @param int $var + * @return $this + */ + public function setInterfaceType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\MigrationCenter\V1\DiskEntry\InterfaceType::class); + $this->interface_type = $var; + + return $this; + } + + /** + * Partition layout. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.DiskPartitionList partitions = 6; + * @return \Google\Cloud\MigrationCenter\V1\DiskPartitionList|null + */ + public function getPartitions() + { + return $this->partitions; + } + + public function hasPartitions() + { + return isset($this->partitions); + } + + public function clearPartitions() + { + unset($this->partitions); + } + + /** + * Partition layout. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.DiskPartitionList partitions = 6; + * @param \Google\Cloud\MigrationCenter\V1\DiskPartitionList $var + * @return $this + */ + public function setPartitions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\DiskPartitionList::class); + $this->partitions = $var; + + return $this; + } + + /** + * Disk hardware address (e.g. 0:1 for SCSI). + * + * Generated from protobuf field string hw_address = 7; + * @return string + */ + public function getHwAddress() + { + return $this->hw_address; + } + + /** + * Disk hardware address (e.g. 0:1 for SCSI). + * + * Generated from protobuf field string hw_address = 7; + * @param string $var + * @return $this + */ + public function setHwAddress($var) + { + GPBUtil::checkString($var, True); + $this->hw_address = $var; + + return $this; + } + + /** + * VMware disk details. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.VmwareDiskConfig vmware = 20; + * @return \Google\Cloud\MigrationCenter\V1\VmwareDiskConfig|null + */ + public function getVmware() + { + return $this->readOneof(20); + } + + public function hasVmware() + { + return $this->hasOneof(20); + } + + /** + * VMware disk details. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.VmwareDiskConfig vmware = 20; + * @param \Google\Cloud\MigrationCenter\V1\VmwareDiskConfig $var + * @return $this + */ + public function setVmware($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\VmwareDiskConfig::class); + $this->writeOneof(20, $var); + + return $this; + } + + /** + * @return string + */ + public function getPlatformSpecific() + { + return $this->whichOneof("platform_specific"); + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DiskEntry/InterfaceType.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DiskEntry/InterfaceType.php new file mode 100644 index 000000000000..ffca5a44029e --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DiskEntry/InterfaceType.php @@ -0,0 +1,99 @@ +google.cloud.migrationcenter.v1.DiskEntry.InterfaceType + */ +class InterfaceType +{ + /** + * Interface type unknown or unspecified. + * + * Generated from protobuf enum INTERFACE_TYPE_UNSPECIFIED = 0; + */ + const INTERFACE_TYPE_UNSPECIFIED = 0; + /** + * IDE interface type. + * + * Generated from protobuf enum IDE = 1; + */ + const IDE = 1; + /** + * SATA interface type. + * + * Generated from protobuf enum SATA = 2; + */ + const SATA = 2; + /** + * SAS interface type. + * + * Generated from protobuf enum SAS = 3; + */ + const SAS = 3; + /** + * SCSI interface type. + * + * Generated from protobuf enum SCSI = 4; + */ + const SCSI = 4; + /** + * NVME interface type. + * + * Generated from protobuf enum NVME = 5; + */ + const NVME = 5; + /** + * FC interface type. + * + * Generated from protobuf enum FC = 6; + */ + const FC = 6; + /** + * iSCSI interface type. + * + * Generated from protobuf enum ISCSI = 7; + */ + const ISCSI = 7; + + private static $valueToName = [ + self::INTERFACE_TYPE_UNSPECIFIED => 'INTERFACE_TYPE_UNSPECIFIED', + self::IDE => 'IDE', + self::SATA => 'SATA', + self::SAS => 'SAS', + self::SCSI => 'SCSI', + self::NVME => 'NVME', + self::FC => 'FC', + self::ISCSI => 'ISCSI', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(InterfaceType::class, \Google\Cloud\MigrationCenter\V1\DiskEntry_InterfaceType::class); + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DiskEntryList.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DiskEntryList.php new file mode 100644 index 000000000000..bb0f746c0ffa --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DiskEntryList.php @@ -0,0 +1,67 @@ +google.cloud.migrationcenter.v1.DiskEntryList + */ +class DiskEntryList extends \Google\Protobuf\Internal\Message +{ + /** + * Disk entries. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.DiskEntry entries = 1; + */ + private $entries; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\MigrationCenter\V1\DiskEntry>|\Google\Protobuf\Internal\RepeatedField $entries + * Disk entries. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Disk entries. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.DiskEntry entries = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEntries() + { + return $this->entries; + } + + /** + * Disk entries. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.DiskEntry entries = 1; + * @param array<\Google\Cloud\MigrationCenter\V1\DiskEntry>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEntries($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\DiskEntry::class); + $this->entries = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DiskPartition.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DiskPartition.php new file mode 100644 index 000000000000..c5607c6cc945 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DiskPartition.php @@ -0,0 +1,281 @@ +google.cloud.migrationcenter.v1.DiskPartition + */ +class DiskPartition extends \Google\Protobuf\Internal\Message +{ + /** + * Partition type. + * + * Generated from protobuf field string type = 1; + */ + protected $type = ''; + /** + * Partition file system. + * + * Generated from protobuf field string file_system = 2; + */ + protected $file_system = ''; + /** + * Mount pount (Linux/Windows) or drive letter (Windows). + * + * Generated from protobuf field string mount_point = 3; + */ + protected $mount_point = ''; + /** + * Partition capacity. + * + * Generated from protobuf field int64 capacity_bytes = 4; + */ + protected $capacity_bytes = 0; + /** + * Partition free space. + * + * Generated from protobuf field int64 free_bytes = 5; + */ + protected $free_bytes = 0; + /** + * Partition UUID. + * + * Generated from protobuf field string uuid = 6; + */ + protected $uuid = ''; + /** + * Sub-partitions. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.DiskPartitionList sub_partitions = 7; + */ + protected $sub_partitions = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $type + * Partition type. + * @type string $file_system + * Partition file system. + * @type string $mount_point + * Mount pount (Linux/Windows) or drive letter (Windows). + * @type int|string $capacity_bytes + * Partition capacity. + * @type int|string $free_bytes + * Partition free space. + * @type string $uuid + * Partition UUID. + * @type \Google\Cloud\MigrationCenter\V1\DiskPartitionList $sub_partitions + * Sub-partitions. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Partition type. + * + * Generated from protobuf field string type = 1; + * @return string + */ + public function getType() + { + return $this->type; + } + + /** + * Partition type. + * + * Generated from protobuf field string type = 1; + * @param string $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkString($var, True); + $this->type = $var; + + return $this; + } + + /** + * Partition file system. + * + * Generated from protobuf field string file_system = 2; + * @return string + */ + public function getFileSystem() + { + return $this->file_system; + } + + /** + * Partition file system. + * + * Generated from protobuf field string file_system = 2; + * @param string $var + * @return $this + */ + public function setFileSystem($var) + { + GPBUtil::checkString($var, True); + $this->file_system = $var; + + return $this; + } + + /** + * Mount pount (Linux/Windows) or drive letter (Windows). + * + * Generated from protobuf field string mount_point = 3; + * @return string + */ + public function getMountPoint() + { + return $this->mount_point; + } + + /** + * Mount pount (Linux/Windows) or drive letter (Windows). + * + * Generated from protobuf field string mount_point = 3; + * @param string $var + * @return $this + */ + public function setMountPoint($var) + { + GPBUtil::checkString($var, True); + $this->mount_point = $var; + + return $this; + } + + /** + * Partition capacity. + * + * Generated from protobuf field int64 capacity_bytes = 4; + * @return int|string + */ + public function getCapacityBytes() + { + return $this->capacity_bytes; + } + + /** + * Partition capacity. + * + * Generated from protobuf field int64 capacity_bytes = 4; + * @param int|string $var + * @return $this + */ + public function setCapacityBytes($var) + { + GPBUtil::checkInt64($var); + $this->capacity_bytes = $var; + + return $this; + } + + /** + * Partition free space. + * + * Generated from protobuf field int64 free_bytes = 5; + * @return int|string + */ + public function getFreeBytes() + { + return $this->free_bytes; + } + + /** + * Partition free space. + * + * Generated from protobuf field int64 free_bytes = 5; + * @param int|string $var + * @return $this + */ + public function setFreeBytes($var) + { + GPBUtil::checkInt64($var); + $this->free_bytes = $var; + + return $this; + } + + /** + * Partition UUID. + * + * Generated from protobuf field string uuid = 6; + * @return string + */ + public function getUuid() + { + return $this->uuid; + } + + /** + * Partition UUID. + * + * Generated from protobuf field string uuid = 6; + * @param string $var + * @return $this + */ + public function setUuid($var) + { + GPBUtil::checkString($var, True); + $this->uuid = $var; + + return $this; + } + + /** + * Sub-partitions. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.DiskPartitionList sub_partitions = 7; + * @return \Google\Cloud\MigrationCenter\V1\DiskPartitionList|null + */ + public function getSubPartitions() + { + return $this->sub_partitions; + } + + public function hasSubPartitions() + { + return isset($this->sub_partitions); + } + + public function clearSubPartitions() + { + unset($this->sub_partitions); + } + + /** + * Sub-partitions. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.DiskPartitionList sub_partitions = 7; + * @param \Google\Cloud\MigrationCenter\V1\DiskPartitionList $var + * @return $this + */ + public function setSubPartitions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\DiskPartitionList::class); + $this->sub_partitions = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DiskPartitionList.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DiskPartitionList.php new file mode 100644 index 000000000000..2970bf370b48 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DiskPartitionList.php @@ -0,0 +1,67 @@ +google.cloud.migrationcenter.v1.DiskPartitionList + */ +class DiskPartitionList extends \Google\Protobuf\Internal\Message +{ + /** + * Partition entries. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.DiskPartition entries = 1; + */ + private $entries; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\MigrationCenter\V1\DiskPartition>|\Google\Protobuf\Internal\RepeatedField $entries + * Partition entries. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Partition entries. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.DiskPartition entries = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEntries() + { + return $this->entries; + } + + /** + * Partition entries. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.DiskPartition entries = 1; + * @param array<\Google\Cloud\MigrationCenter\V1\DiskPartition>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEntries($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\DiskPartition::class); + $this->entries = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DiskUsageSample.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DiskUsageSample.php new file mode 100644 index 000000000000..41df87337527 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DiskUsageSample.php @@ -0,0 +1,67 @@ +google.cloud.migrationcenter.v1.DiskUsageSample + */ +class DiskUsageSample extends \Google\Protobuf\Internal\Message +{ + /** + * Average IOPS sampled over a short window. Must be non-negative. + * + * Generated from protobuf field float average_iops = 1; + */ + protected $average_iops = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $average_iops + * Average IOPS sampled over a short window. Must be non-negative. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Average IOPS sampled over a short window. Must be non-negative. + * + * Generated from protobuf field float average_iops = 1; + * @return float + */ + public function getAverageIops() + { + return $this->average_iops; + } + + /** + * Average IOPS sampled over a short window. Must be non-negative. + * + * Generated from protobuf field float average_iops = 1; + * @param float $var + * @return $this + */ + public function setAverageIops($var) + { + GPBUtil::checkFloat($var); + $this->average_iops = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ErrorFrame.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ErrorFrame.php new file mode 100644 index 000000000000..442d356e1dd6 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ErrorFrame.php @@ -0,0 +1,189 @@ +google.cloud.migrationcenter.v1.ErrorFrame + */ +class ErrorFrame extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The identifier of the ErrorFrame. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. All the violations that were detected for the frame. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.FrameViolationEntry violations = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $violations; + /** + * Output only. The frame that was originally reported. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.AssetFrame original_frame = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $original_frame = null; + /** + * Output only. Frame ingestion time. + * + * Generated from protobuf field .google.protobuf.Timestamp ingestion_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $ingestion_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The identifier of the ErrorFrame. + * @type array<\Google\Cloud\MigrationCenter\V1\FrameViolationEntry>|\Google\Protobuf\Internal\RepeatedField $violations + * Output only. All the violations that were detected for the frame. + * @type \Google\Cloud\MigrationCenter\V1\AssetFrame $original_frame + * Output only. The frame that was originally reported. + * @type \Google\Protobuf\Timestamp $ingestion_time + * Output only. Frame ingestion time. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The identifier of the ErrorFrame. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The identifier of the ErrorFrame. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. All the violations that were detected for the frame. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.FrameViolationEntry violations = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getViolations() + { + return $this->violations; + } + + /** + * Output only. All the violations that were detected for the frame. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.FrameViolationEntry violations = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\MigrationCenter\V1\FrameViolationEntry>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setViolations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\FrameViolationEntry::class); + $this->violations = $arr; + + return $this; + } + + /** + * Output only. The frame that was originally reported. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.AssetFrame original_frame = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\MigrationCenter\V1\AssetFrame|null + */ + public function getOriginalFrame() + { + return $this->original_frame; + } + + public function hasOriginalFrame() + { + return isset($this->original_frame); + } + + public function clearOriginalFrame() + { + unset($this->original_frame); + } + + /** + * Output only. The frame that was originally reported. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.AssetFrame original_frame = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\MigrationCenter\V1\AssetFrame $var + * @return $this + */ + public function setOriginalFrame($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\AssetFrame::class); + $this->original_frame = $var; + + return $this; + } + + /** + * Output only. Frame ingestion time. + * + * Generated from protobuf field .google.protobuf.Timestamp ingestion_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getIngestionTime() + { + return $this->ingestion_time; + } + + public function hasIngestionTime() + { + return isset($this->ingestion_time); + } + + public function clearIngestionTime() + { + unset($this->ingestion_time); + } + + /** + * Output only. Frame ingestion time. + * + * Generated from protobuf field .google.protobuf.Timestamp ingestion_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setIngestionTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->ingestion_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ErrorFrameView.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ErrorFrameView.php new file mode 100644 index 000000000000..2d2db3356bf8 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ErrorFrameView.php @@ -0,0 +1,62 @@ +google.cloud.migrationcenter.v1.ErrorFrameView + */ +class ErrorFrameView +{ + /** + * Value is unset. The system will fallback to the default value. + * + * Generated from protobuf enum ERROR_FRAME_VIEW_UNSPECIFIED = 0; + */ + const ERROR_FRAME_VIEW_UNSPECIFIED = 0; + /** + * Include basic frame data, but not the full contents. + * + * Generated from protobuf enum ERROR_FRAME_VIEW_BASIC = 1; + */ + const ERROR_FRAME_VIEW_BASIC = 1; + /** + * Include everything. + * + * Generated from protobuf enum ERROR_FRAME_VIEW_FULL = 2; + */ + const ERROR_FRAME_VIEW_FULL = 2; + + private static $valueToName = [ + self::ERROR_FRAME_VIEW_UNSPECIFIED => 'ERROR_FRAME_VIEW_UNSPECIFIED', + self::ERROR_FRAME_VIEW_BASIC => 'ERROR_FRAME_VIEW_BASIC', + self::ERROR_FRAME_VIEW_FULL => 'ERROR_FRAME_VIEW_FULL', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ExecutionReport.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ExecutionReport.php new file mode 100644 index 000000000000..3225a8a85559 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ExecutionReport.php @@ -0,0 +1,145 @@ +google.cloud.migrationcenter.v1.ExecutionReport + */ +class ExecutionReport extends \Google\Protobuf\Internal\Message +{ + /** + * Total number of asset frames reported for the import job. + * + * Generated from protobuf field int32 frames_reported = 1; + */ + protected $frames_reported = 0; + /** + * Validation errors encountered during the execution of the import job. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ValidationReport execution_errors = 2; + */ + protected $execution_errors = null; + /** + * Output only. Total number of rows in the import job. + * + * Generated from protobuf field int32 total_rows_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $total_rows_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $frames_reported + * Total number of asset frames reported for the import job. + * @type \Google\Cloud\MigrationCenter\V1\ValidationReport $execution_errors + * Validation errors encountered during the execution of the import job. + * @type int $total_rows_count + * Output only. Total number of rows in the import job. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Total number of asset frames reported for the import job. + * + * Generated from protobuf field int32 frames_reported = 1; + * @return int + */ + public function getFramesReported() + { + return $this->frames_reported; + } + + /** + * Total number of asset frames reported for the import job. + * + * Generated from protobuf field int32 frames_reported = 1; + * @param int $var + * @return $this + */ + public function setFramesReported($var) + { + GPBUtil::checkInt32($var); + $this->frames_reported = $var; + + return $this; + } + + /** + * Validation errors encountered during the execution of the import job. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ValidationReport execution_errors = 2; + * @return \Google\Cloud\MigrationCenter\V1\ValidationReport|null + */ + public function getExecutionErrors() + { + return $this->execution_errors; + } + + public function hasExecutionErrors() + { + return isset($this->execution_errors); + } + + public function clearExecutionErrors() + { + unset($this->execution_errors); + } + + /** + * Validation errors encountered during the execution of the import job. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ValidationReport execution_errors = 2; + * @param \Google\Cloud\MigrationCenter\V1\ValidationReport $var + * @return $this + */ + public function setExecutionErrors($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\ValidationReport::class); + $this->execution_errors = $var; + + return $this; + } + + /** + * Output only. Total number of rows in the import job. + * + * Generated from protobuf field int32 total_rows_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getTotalRowsCount() + { + return $this->total_rows_count; + } + + /** + * Output only. Total number of rows in the import job. + * + * Generated from protobuf field int32 total_rows_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setTotalRowsCount($var) + { + GPBUtil::checkInt32($var); + $this->total_rows_count = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/FileValidationReport.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/FileValidationReport.php new file mode 100644 index 000000000000..c2a87564211b --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/FileValidationReport.php @@ -0,0 +1,173 @@ +google.cloud.migrationcenter.v1.FileValidationReport + */ +class FileValidationReport extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the file. + * + * Generated from protobuf field string file_name = 1; + */ + protected $file_name = ''; + /** + * Partial list of rows that encountered validation error. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ImportRowError row_errors = 2; + */ + private $row_errors; + /** + * Flag indicating that processing was aborted due to maximum number of + * errors. + * + * Generated from protobuf field bool partial_report = 3; + */ + protected $partial_report = false; + /** + * List of file level errors. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ImportError file_errors = 4; + */ + private $file_errors; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $file_name + * The name of the file. + * @type array<\Google\Cloud\MigrationCenter\V1\ImportRowError>|\Google\Protobuf\Internal\RepeatedField $row_errors + * Partial list of rows that encountered validation error. + * @type bool $partial_report + * Flag indicating that processing was aborted due to maximum number of + * errors. + * @type array<\Google\Cloud\MigrationCenter\V1\ImportError>|\Google\Protobuf\Internal\RepeatedField $file_errors + * List of file level errors. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * The name of the file. + * + * Generated from protobuf field string file_name = 1; + * @return string + */ + public function getFileName() + { + return $this->file_name; + } + + /** + * The name of the file. + * + * Generated from protobuf field string file_name = 1; + * @param string $var + * @return $this + */ + public function setFileName($var) + { + GPBUtil::checkString($var, True); + $this->file_name = $var; + + return $this; + } + + /** + * Partial list of rows that encountered validation error. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ImportRowError row_errors = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRowErrors() + { + return $this->row_errors; + } + + /** + * Partial list of rows that encountered validation error. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ImportRowError row_errors = 2; + * @param array<\Google\Cloud\MigrationCenter\V1\ImportRowError>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRowErrors($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\ImportRowError::class); + $this->row_errors = $arr; + + return $this; + } + + /** + * Flag indicating that processing was aborted due to maximum number of + * errors. + * + * Generated from protobuf field bool partial_report = 3; + * @return bool + */ + public function getPartialReport() + { + return $this->partial_report; + } + + /** + * Flag indicating that processing was aborted due to maximum number of + * errors. + * + * Generated from protobuf field bool partial_report = 3; + * @param bool $var + * @return $this + */ + public function setPartialReport($var) + { + GPBUtil::checkBool($var); + $this->partial_report = $var; + + return $this; + } + + /** + * List of file level errors. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ImportError file_errors = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFileErrors() + { + return $this->file_errors; + } + + /** + * List of file level errors. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ImportError file_errors = 4; + * @param array<\Google\Cloud\MigrationCenter\V1\ImportError>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFileErrors($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\ImportError::class); + $this->file_errors = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/FitDescriptor.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/FitDescriptor.php new file mode 100644 index 000000000000..af3374b36ae8 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/FitDescriptor.php @@ -0,0 +1,67 @@ +google.cloud.migrationcenter.v1.FitDescriptor + */ +class FitDescriptor extends \Google\Protobuf\Internal\Message +{ + /** + * Fit level. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.FitDescriptor.FitLevel fit_level = 1; + */ + protected $fit_level = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $fit_level + * Fit level. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Fit level. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.FitDescriptor.FitLevel fit_level = 1; + * @return int + */ + public function getFitLevel() + { + return $this->fit_level; + } + + /** + * Fit level. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.FitDescriptor.FitLevel fit_level = 1; + * @param int $var + * @return $this + */ + public function setFitLevel($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\MigrationCenter\V1\FitDescriptor\FitLevel::class); + $this->fit_level = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/FitDescriptor/FitLevel.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/FitDescriptor/FitLevel.php new file mode 100644 index 000000000000..e680d898a10c --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/FitDescriptor/FitLevel.php @@ -0,0 +1,71 @@ +google.cloud.migrationcenter.v1.FitDescriptor.FitLevel + */ +class FitLevel +{ + /** + * Not enough information. + * + * Generated from protobuf enum FIT_LEVEL_UNSPECIFIED = 0; + */ + const FIT_LEVEL_UNSPECIFIED = 0; + /** + * Fit. + * + * Generated from protobuf enum FIT = 1; + */ + const FIT = 1; + /** + * No Fit. + * + * Generated from protobuf enum NO_FIT = 2; + */ + const NO_FIT = 2; + /** + * Fit with effort. + * + * Generated from protobuf enum REQUIRES_EFFORT = 3; + */ + const REQUIRES_EFFORT = 3; + + private static $valueToName = [ + self::FIT_LEVEL_UNSPECIFIED => 'FIT_LEVEL_UNSPECIFIED', + self::FIT => 'FIT', + self::NO_FIT => 'NO_FIT', + self::REQUIRES_EFFORT => 'REQUIRES_EFFORT', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(FitLevel::class, \Google\Cloud\MigrationCenter\V1\FitDescriptor_FitLevel::class); + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/FrameViolationEntry.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/FrameViolationEntry.php new file mode 100644 index 000000000000..ef32d08c50cf --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/FrameViolationEntry.php @@ -0,0 +1,102 @@ +google.cloud.migrationcenter.v1.FrameViolationEntry + */ +class FrameViolationEntry extends \Google\Protobuf\Internal\Message +{ + /** + * The field of the original frame where the violation occurred. + * + * Generated from protobuf field string field = 1; + */ + protected $field = ''; + /** + * A message describing the violation. + * + * Generated from protobuf field string violation = 2; + */ + protected $violation = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $field + * The field of the original frame where the violation occurred. + * @type string $violation + * A message describing the violation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * The field of the original frame where the violation occurred. + * + * Generated from protobuf field string field = 1; + * @return string + */ + public function getField() + { + return $this->field; + } + + /** + * The field of the original frame where the violation occurred. + * + * Generated from protobuf field string field = 1; + * @param string $var + * @return $this + */ + public function setField($var) + { + GPBUtil::checkString($var, True); + $this->field = $var; + + return $this; + } + + /** + * A message describing the violation. + * + * Generated from protobuf field string violation = 2; + * @return string + */ + public function getViolation() + { + return $this->violation; + } + + /** + * A message describing the violation. + * + * Generated from protobuf field string violation = 2; + * @param string $var + * @return $this + */ + public function setViolation($var) + { + GPBUtil::checkString($var, True); + $this->violation = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Frames.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Frames.php new file mode 100644 index 000000000000..e838abbd4204 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Frames.php @@ -0,0 +1,67 @@ +google.cloud.migrationcenter.v1.Frames + */ +class Frames extends \Google\Protobuf\Internal\Message +{ + /** + * A repeated field of asset data. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.AssetFrame frames_data = 1; + */ + private $frames_data; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\MigrationCenter\V1\AssetFrame>|\Google\Protobuf\Internal\RepeatedField $frames_data + * A repeated field of asset data. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * A repeated field of asset data. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.AssetFrame frames_data = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFramesData() + { + return $this->frames_data; + } + + /** + * A repeated field of asset data. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.AssetFrame frames_data = 1; + * @param array<\Google\Cloud\MigrationCenter\V1\AssetFrame>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFramesData($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\AssetFrame::class); + $this->frames_data = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/FstabEntry.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/FstabEntry.php new file mode 100644 index 000000000000..871f30e54357 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/FstabEntry.php @@ -0,0 +1,241 @@ +google.cloud.migrationcenter.v1.FstabEntry + */ +class FstabEntry extends \Google\Protobuf\Internal\Message +{ + /** + * The block special device or remote filesystem to be mounted. + * + * Generated from protobuf field string spec = 1; + */ + protected $spec = ''; + /** + * The mount point for the filesystem. + * + * Generated from protobuf field string file = 2; + */ + protected $file = ''; + /** + * The type of the filesystem. + * + * Generated from protobuf field string vfstype = 3; + */ + protected $vfstype = ''; + /** + * Mount options associated with the filesystem. + * + * Generated from protobuf field string mntops = 4; + */ + protected $mntops = ''; + /** + * Used by dump to determine which filesystems need to be dumped. + * + * Generated from protobuf field int32 freq = 5; + */ + protected $freq = 0; + /** + * Used by the fsck(8) program to determine the order in which filesystem + * checks are done at reboot time. + * + * Generated from protobuf field int32 passno = 6; + */ + protected $passno = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $spec + * The block special device or remote filesystem to be mounted. + * @type string $file + * The mount point for the filesystem. + * @type string $vfstype + * The type of the filesystem. + * @type string $mntops + * Mount options associated with the filesystem. + * @type int $freq + * Used by dump to determine which filesystems need to be dumped. + * @type int $passno + * Used by the fsck(8) program to determine the order in which filesystem + * checks are done at reboot time. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * The block special device or remote filesystem to be mounted. + * + * Generated from protobuf field string spec = 1; + * @return string + */ + public function getSpec() + { + return $this->spec; + } + + /** + * The block special device or remote filesystem to be mounted. + * + * Generated from protobuf field string spec = 1; + * @param string $var + * @return $this + */ + public function setSpec($var) + { + GPBUtil::checkString($var, True); + $this->spec = $var; + + return $this; + } + + /** + * The mount point for the filesystem. + * + * Generated from protobuf field string file = 2; + * @return string + */ + public function getFile() + { + return $this->file; + } + + /** + * The mount point for the filesystem. + * + * Generated from protobuf field string file = 2; + * @param string $var + * @return $this + */ + public function setFile($var) + { + GPBUtil::checkString($var, True); + $this->file = $var; + + return $this; + } + + /** + * The type of the filesystem. + * + * Generated from protobuf field string vfstype = 3; + * @return string + */ + public function getVfstype() + { + return $this->vfstype; + } + + /** + * The type of the filesystem. + * + * Generated from protobuf field string vfstype = 3; + * @param string $var + * @return $this + */ + public function setVfstype($var) + { + GPBUtil::checkString($var, True); + $this->vfstype = $var; + + return $this; + } + + /** + * Mount options associated with the filesystem. + * + * Generated from protobuf field string mntops = 4; + * @return string + */ + public function getMntops() + { + return $this->mntops; + } + + /** + * Mount options associated with the filesystem. + * + * Generated from protobuf field string mntops = 4; + * @param string $var + * @return $this + */ + public function setMntops($var) + { + GPBUtil::checkString($var, True); + $this->mntops = $var; + + return $this; + } + + /** + * Used by dump to determine which filesystems need to be dumped. + * + * Generated from protobuf field int32 freq = 5; + * @return int + */ + public function getFreq() + { + return $this->freq; + } + + /** + * Used by dump to determine which filesystems need to be dumped. + * + * Generated from protobuf field int32 freq = 5; + * @param int $var + * @return $this + */ + public function setFreq($var) + { + GPBUtil::checkInt32($var); + $this->freq = $var; + + return $this; + } + + /** + * Used by the fsck(8) program to determine the order in which filesystem + * checks are done at reboot time. + * + * Generated from protobuf field int32 passno = 6; + * @return int + */ + public function getPassno() + { + return $this->passno; + } + + /** + * Used by the fsck(8) program to determine the order in which filesystem + * checks are done at reboot time. + * + * Generated from protobuf field int32 passno = 6; + * @param int $var + * @return $this + */ + public function setPassno($var) + { + GPBUtil::checkInt32($var); + $this->passno = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/FstabEntryList.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/FstabEntryList.php new file mode 100644 index 000000000000..cc53a54a3edd --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/FstabEntryList.php @@ -0,0 +1,67 @@ +google.cloud.migrationcenter.v1.FstabEntryList + */ +class FstabEntryList extends \Google\Protobuf\Internal\Message +{ + /** + * Fstab entries. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.FstabEntry entries = 1; + */ + private $entries; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\MigrationCenter\V1\FstabEntry>|\Google\Protobuf\Internal\RepeatedField $entries + * Fstab entries. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Fstab entries. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.FstabEntry entries = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEntries() + { + return $this->entries; + } + + /** + * Fstab entries. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.FstabEntry entries = 1; + * @param array<\Google\Cloud\MigrationCenter\V1\FstabEntry>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEntries($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\FstabEntry::class); + $this->entries = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GenericInsight.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GenericInsight.php new file mode 100644 index 000000000000..4795382282f3 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GenericInsight.php @@ -0,0 +1,155 @@ +google.cloud.migrationcenter.v1.GenericInsight + */ +class GenericInsight extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Represents a globally unique message id for + * this insight, can be used for localization purposes, in case message_code + * is not yet known by the client use default_message instead. + * + * Generated from protobuf field int64 message_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $message_id = 0; + /** + * Output only. In case message_code is not yet known by the client + * default_message will be the message to be used instead. + * + * Generated from protobuf field string default_message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $default_message = ''; + /** + * Output only. Additional information about the insight, each entry can be a + * logical entry and must make sense if it is displayed with line breaks + * between each entry. Text can contain md style links. + * + * Generated from protobuf field repeated string additional_information = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $additional_information; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $message_id + * Output only. Represents a globally unique message id for + * this insight, can be used for localization purposes, in case message_code + * is not yet known by the client use default_message instead. + * @type string $default_message + * Output only. In case message_code is not yet known by the client + * default_message will be the message to be used instead. + * @type array|\Google\Protobuf\Internal\RepeatedField $additional_information + * Output only. Additional information about the insight, each entry can be a + * logical entry and must make sense if it is displayed with line breaks + * between each entry. Text can contain md style links. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Represents a globally unique message id for + * this insight, can be used for localization purposes, in case message_code + * is not yet known by the client use default_message instead. + * + * Generated from protobuf field int64 message_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getMessageId() + { + return $this->message_id; + } + + /** + * Output only. Represents a globally unique message id for + * this insight, can be used for localization purposes, in case message_code + * is not yet known by the client use default_message instead. + * + * Generated from protobuf field int64 message_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setMessageId($var) + { + GPBUtil::checkInt64($var); + $this->message_id = $var; + + return $this; + } + + /** + * Output only. In case message_code is not yet known by the client + * default_message will be the message to be used instead. + * + * Generated from protobuf field string default_message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDefaultMessage() + { + return $this->default_message; + } + + /** + * Output only. In case message_code is not yet known by the client + * default_message will be the message to be used instead. + * + * Generated from protobuf field string default_message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setDefaultMessage($var) + { + GPBUtil::checkString($var, True); + $this->default_message = $var; + + return $this; + } + + /** + * Output only. Additional information about the insight, each entry can be a + * logical entry and must make sense if it is displayed with line breaks + * between each entry. Text can contain md style links. + * + * Generated from protobuf field repeated string additional_information = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAdditionalInformation() + { + return $this->additional_information; + } + + /** + * Output only. Additional information about the insight, each entry can be a + * logical entry and must make sense if it is displayed with line breaks + * between each entry. Text can contain md style links. + * + * Generated from protobuf field repeated string additional_information = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAdditionalInformation($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->additional_information = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GenericPlatformDetails.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GenericPlatformDetails.php new file mode 100644 index 000000000000..c45ee7a8e4d6 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GenericPlatformDetails.php @@ -0,0 +1,75 @@ +google.cloud.migrationcenter.v1.GenericPlatformDetails + */ +class GenericPlatformDetails extends \Google\Protobuf\Internal\Message +{ + /** + * Free text representation of the machine location. + * The format of this field should not be relied on. Different VMs in the same + * location may have different string values for this field. + * + * Generated from protobuf field string location = 1; + */ + protected $location = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $location + * Free text representation of the machine location. + * The format of this field should not be relied on. Different VMs in the same + * location may have different string values for this field. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Free text representation of the machine location. + * The format of this field should not be relied on. Different VMs in the same + * location may have different string values for this field. + * + * Generated from protobuf field string location = 1; + * @return string + */ + public function getLocation() + { + return $this->location; + } + + /** + * Free text representation of the machine location. + * The format of this field should not be relied on. Different VMs in the same + * location may have different string values for this field. + * + * Generated from protobuf field string location = 1; + * @param string $var + * @return $this + */ + public function setLocation($var) + { + GPBUtil::checkString($var, True); + $this->location = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GetAssetRequest.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GetAssetRequest.php new file mode 100644 index 000000000000..a1d156249c2f --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GetAssetRequest.php @@ -0,0 +1,115 @@ +google.cloud.migrationcenter.v1.GetAssetRequest + */ +class GetAssetRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * View of the assets. Defaults to BASIC. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.AssetView view = 2; + */ + protected $view = 0; + + /** + * @param string $name Required. Name of the resource. Please see + * {@see MigrationCenterClient::assetName()} for help formatting this field. + * + * @return \Google\Cloud\MigrationCenter\V1\GetAssetRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the resource. + * @type int $view + * View of the assets. Defaults to BASIC. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * View of the assets. Defaults to BASIC. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.AssetView view = 2; + * @return int + */ + public function getView() + { + return $this->view; + } + + /** + * View of the assets. Defaults to BASIC. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.AssetView view = 2; + * @param int $var + * @return $this + */ + public function setView($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\MigrationCenter\V1\AssetView::class); + $this->view = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GetErrorFrameRequest.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GetErrorFrameRequest.php new file mode 100644 index 000000000000..450c50959d97 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GetErrorFrameRequest.php @@ -0,0 +1,127 @@ +google.cloud.migrationcenter.v1.GetErrorFrameRequest + */ +class GetErrorFrameRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the frame to retrieve. + * Format: + * projects/{project}/locations/{location}/sources/{source}/errorFrames/{error_frame} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. An optional view mode to control the level of details for the + * frame. The default is a basic frame view. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ErrorFrameView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $view = 0; + + /** + * @param string $name Required. The name of the frame to retrieve. + * Format: + * projects/{project}/locations/{location}/sources/{source}/errorFrames/{error_frame} + * Please see {@see MigrationCenterClient::errorFrameName()} for help formatting this field. + * + * @return \Google\Cloud\MigrationCenter\V1\GetErrorFrameRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the frame to retrieve. + * Format: + * projects/{project}/locations/{location}/sources/{source}/errorFrames/{error_frame} + * @type int $view + * Optional. An optional view mode to control the level of details for the + * frame. The default is a basic frame view. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the frame to retrieve. + * Format: + * projects/{project}/locations/{location}/sources/{source}/errorFrames/{error_frame} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the frame to retrieve. + * Format: + * projects/{project}/locations/{location}/sources/{source}/errorFrames/{error_frame} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. An optional view mode to control the level of details for the + * frame. The default is a basic frame view. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ErrorFrameView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getView() + { + return $this->view; + } + + /** + * Optional. An optional view mode to control the level of details for the + * frame. The default is a basic frame view. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ErrorFrameView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setView($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\MigrationCenter\V1\ErrorFrameView::class); + $this->view = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GetGroupRequest.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GetGroupRequest.php new file mode 100644 index 000000000000..c01e860e2eed --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GetGroupRequest.php @@ -0,0 +1,81 @@ +google.cloud.migrationcenter.v1.GetGroupRequest + */ +class GetGroupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Name of the resource. Please see + * {@see MigrationCenterClient::groupName()} for help formatting this field. + * + * @return \Google\Cloud\MigrationCenter\V1\GetGroupRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GetImportDataFileRequest.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GetImportDataFileRequest.php new file mode 100644 index 000000000000..f091acfc527e --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GetImportDataFileRequest.php @@ -0,0 +1,81 @@ +google.cloud.migrationcenter.v1.GetImportDataFileRequest + */ +class GetImportDataFileRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the ImportDataFile. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Name of the ImportDataFile. Please see + * {@see MigrationCenterClient::importDataFileName()} for help formatting this field. + * + * @return \Google\Cloud\MigrationCenter\V1\GetImportDataFileRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the ImportDataFile. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the ImportDataFile. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the ImportDataFile. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GetImportJobRequest.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GetImportJobRequest.php new file mode 100644 index 000000000000..1592d02043f5 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GetImportJobRequest.php @@ -0,0 +1,119 @@ +google.cloud.migrationcenter.v1.GetImportJobRequest + */ +class GetImportJobRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. The level of details of the import job. + * Default value is FULL. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ImportJobView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $view = 0; + + /** + * @param string $name Required. Name of the resource. Please see + * {@see MigrationCenterClient::importJobName()} for help formatting this field. + * + * @return \Google\Cloud\MigrationCenter\V1\GetImportJobRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the resource. + * @type int $view + * Optional. The level of details of the import job. + * Default value is FULL. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. The level of details of the import job. + * Default value is FULL. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ImportJobView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getView() + { + return $this->view; + } + + /** + * Optional. The level of details of the import job. + * Default value is FULL. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ImportJobView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setView($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\MigrationCenter\V1\ImportJobView::class); + $this->view = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GetPreferenceSetRequest.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GetPreferenceSetRequest.php new file mode 100644 index 000000000000..27ba45722aeb --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GetPreferenceSetRequest.php @@ -0,0 +1,81 @@ +google.cloud.migrationcenter.v1.GetPreferenceSetRequest + */ +class GetPreferenceSetRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Name of the resource. Please see + * {@see MigrationCenterClient::preferenceSetName()} for help formatting this field. + * + * @return \Google\Cloud\MigrationCenter\V1\GetPreferenceSetRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GetReportConfigRequest.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GetReportConfigRequest.php new file mode 100644 index 000000000000..21a31ca5025d --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GetReportConfigRequest.php @@ -0,0 +1,81 @@ +google.cloud.migrationcenter.v1.GetReportConfigRequest + */ +class GetReportConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Name of the resource. Please see + * {@see MigrationCenterClient::reportConfigName()} for help formatting this field. + * + * @return \Google\Cloud\MigrationCenter\V1\GetReportConfigRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GetReportRequest.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GetReportRequest.php new file mode 100644 index 000000000000..151893ba187d --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GetReportRequest.php @@ -0,0 +1,115 @@ +google.cloud.migrationcenter.v1.GetReportRequest + */ +class GetReportRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Determines what information to retrieve for the Report. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ReportView view = 6; + */ + protected $view = 0; + + /** + * @param string $name Required. Name of the resource. Please see + * {@see MigrationCenterClient::reportName()} for help formatting this field. + * + * @return \Google\Cloud\MigrationCenter\V1\GetReportRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the resource. + * @type int $view + * Determines what information to retrieve for the Report. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Determines what information to retrieve for the Report. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ReportView view = 6; + * @return int + */ + public function getView() + { + return $this->view; + } + + /** + * Determines what information to retrieve for the Report. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ReportView view = 6; + * @param int $var + * @return $this + */ + public function setView($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\MigrationCenter\V1\ReportView::class); + $this->view = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GetSettingsRequest.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GetSettingsRequest.php new file mode 100644 index 000000000000..44708c87d75f --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GetSettingsRequest.php @@ -0,0 +1,81 @@ +google.cloud.migrationcenter.v1.GetSettingsRequest + */ +class GetSettingsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Name of the resource. Please see + * {@see MigrationCenterClient::settingsName()} for help formatting this field. + * + * @return \Google\Cloud\MigrationCenter\V1\GetSettingsRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GetSourceRequest.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GetSourceRequest.php new file mode 100644 index 000000000000..0b45d01ed2ee --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GetSourceRequest.php @@ -0,0 +1,81 @@ +google.cloud.migrationcenter.v1.GetSourceRequest + */ +class GetSourceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Name of the resource. Please see + * {@see MigrationCenterClient::sourceName()} for help formatting this field. + * + * @return \Google\Cloud\MigrationCenter\V1\GetSourceRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Group.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Group.php new file mode 100644 index 000000000000..6b468b1fd52c --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Group.php @@ -0,0 +1,260 @@ +google.cloud.migrationcenter.v1.Group + */ +class Group extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The name of the group. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. The timestamp when the group was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The timestamp when the group was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Labels as key value pairs. + * + * Generated from protobuf field map labels = 4; + */ + private $labels; + /** + * User-friendly display name. + * + * Generated from protobuf field string display_name = 5; + */ + protected $display_name = ''; + /** + * The description of the resource. + * + * Generated from protobuf field string description = 6; + */ + protected $description = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The name of the group. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The timestamp when the group was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The timestamp when the group was last updated. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Labels as key value pairs. + * @type string $display_name + * User-friendly display name. + * @type string $description + * The description of the resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The name of the group. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The name of the group. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The timestamp when the group was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The timestamp when the group was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The timestamp when the group was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The timestamp when the group was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Labels as key value pairs. + * + * Generated from protobuf field map labels = 4; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Labels as key value pairs. + * + * Generated from protobuf field map labels = 4; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * User-friendly display name. + * + * Generated from protobuf field string display_name = 5; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * User-friendly display name. + * + * Generated from protobuf field string display_name = 5; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * The description of the resource. + * + * Generated from protobuf field string description = 6; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * The description of the resource. + * + * Generated from protobuf field string description = 6; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GuestConfigDetails.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GuestConfigDetails.php new file mode 100644 index 000000000000..e5c8b3af74cd --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GuestConfigDetails.php @@ -0,0 +1,233 @@ +google.cloud.migrationcenter.v1.GuestConfigDetails + */ +class GuestConfigDetails extends \Google\Protobuf\Internal\Message +{ + /** + * OS issue (typically /etc/issue in Linux). + * + * Generated from protobuf field string issue = 1; + */ + protected $issue = ''; + /** + * Mount list (Linux fstab). + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.FstabEntryList fstab = 2; + */ + protected $fstab = null; + /** + * Hosts file (/etc/hosts). + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.HostsEntryList hosts = 3; + */ + protected $hosts = null; + /** + * NFS exports. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.NfsExportList nfs_exports = 4; + */ + protected $nfs_exports = null; + /** + * Security-Enhanced Linux (SELinux) mode. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.GuestConfigDetails.SeLinuxMode selinux_mode = 5; + */ + protected $selinux_mode = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $issue + * OS issue (typically /etc/issue in Linux). + * @type \Google\Cloud\MigrationCenter\V1\FstabEntryList $fstab + * Mount list (Linux fstab). + * @type \Google\Cloud\MigrationCenter\V1\HostsEntryList $hosts + * Hosts file (/etc/hosts). + * @type \Google\Cloud\MigrationCenter\V1\NfsExportList $nfs_exports + * NFS exports. + * @type int $selinux_mode + * Security-Enhanced Linux (SELinux) mode. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * OS issue (typically /etc/issue in Linux). + * + * Generated from protobuf field string issue = 1; + * @return string + */ + public function getIssue() + { + return $this->issue; + } + + /** + * OS issue (typically /etc/issue in Linux). + * + * Generated from protobuf field string issue = 1; + * @param string $var + * @return $this + */ + public function setIssue($var) + { + GPBUtil::checkString($var, True); + $this->issue = $var; + + return $this; + } + + /** + * Mount list (Linux fstab). + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.FstabEntryList fstab = 2; + * @return \Google\Cloud\MigrationCenter\V1\FstabEntryList|null + */ + public function getFstab() + { + return $this->fstab; + } + + public function hasFstab() + { + return isset($this->fstab); + } + + public function clearFstab() + { + unset($this->fstab); + } + + /** + * Mount list (Linux fstab). + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.FstabEntryList fstab = 2; + * @param \Google\Cloud\MigrationCenter\V1\FstabEntryList $var + * @return $this + */ + public function setFstab($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\FstabEntryList::class); + $this->fstab = $var; + + return $this; + } + + /** + * Hosts file (/etc/hosts). + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.HostsEntryList hosts = 3; + * @return \Google\Cloud\MigrationCenter\V1\HostsEntryList|null + */ + public function getHosts() + { + return $this->hosts; + } + + public function hasHosts() + { + return isset($this->hosts); + } + + public function clearHosts() + { + unset($this->hosts); + } + + /** + * Hosts file (/etc/hosts). + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.HostsEntryList hosts = 3; + * @param \Google\Cloud\MigrationCenter\V1\HostsEntryList $var + * @return $this + */ + public function setHosts($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\HostsEntryList::class); + $this->hosts = $var; + + return $this; + } + + /** + * NFS exports. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.NfsExportList nfs_exports = 4; + * @return \Google\Cloud\MigrationCenter\V1\NfsExportList|null + */ + public function getNfsExports() + { + return $this->nfs_exports; + } + + public function hasNfsExports() + { + return isset($this->nfs_exports); + } + + public function clearNfsExports() + { + unset($this->nfs_exports); + } + + /** + * NFS exports. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.NfsExportList nfs_exports = 4; + * @param \Google\Cloud\MigrationCenter\V1\NfsExportList $var + * @return $this + */ + public function setNfsExports($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\NfsExportList::class); + $this->nfs_exports = $var; + + return $this; + } + + /** + * Security-Enhanced Linux (SELinux) mode. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.GuestConfigDetails.SeLinuxMode selinux_mode = 5; + * @return int + */ + public function getSelinuxMode() + { + return $this->selinux_mode; + } + + /** + * Security-Enhanced Linux (SELinux) mode. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.GuestConfigDetails.SeLinuxMode selinux_mode = 5; + * @param int $var + * @return $this + */ + public function setSelinuxMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\MigrationCenter\V1\GuestConfigDetails\SeLinuxMode::class); + $this->selinux_mode = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GuestConfigDetails/SeLinuxMode.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GuestConfigDetails/SeLinuxMode.php new file mode 100644 index 000000000000..34ea69b84192 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GuestConfigDetails/SeLinuxMode.php @@ -0,0 +1,71 @@ +google.cloud.migrationcenter.v1.GuestConfigDetails.SeLinuxMode + */ +class SeLinuxMode +{ + /** + * SELinux mode unknown or unspecified. + * + * Generated from protobuf enum SE_LINUX_MODE_UNSPECIFIED = 0; + */ + const SE_LINUX_MODE_UNSPECIFIED = 0; + /** + * SELinux is disabled. + * + * Generated from protobuf enum SE_LINUX_MODE_DISABLED = 1; + */ + const SE_LINUX_MODE_DISABLED = 1; + /** + * SELinux permissive mode. + * + * Generated from protobuf enum SE_LINUX_MODE_PERMISSIVE = 2; + */ + const SE_LINUX_MODE_PERMISSIVE = 2; + /** + * SELinux enforcing mode. + * + * Generated from protobuf enum SE_LINUX_MODE_ENFORCING = 3; + */ + const SE_LINUX_MODE_ENFORCING = 3; + + private static $valueToName = [ + self::SE_LINUX_MODE_UNSPECIFIED => 'SE_LINUX_MODE_UNSPECIFIED', + self::SE_LINUX_MODE_DISABLED => 'SE_LINUX_MODE_DISABLED', + self::SE_LINUX_MODE_PERMISSIVE => 'SE_LINUX_MODE_PERMISSIVE', + self::SE_LINUX_MODE_ENFORCING => 'SE_LINUX_MODE_ENFORCING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SeLinuxMode::class, \Google\Cloud\MigrationCenter\V1\GuestConfigDetails_SeLinuxMode::class); + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GuestInstalledApplication.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GuestInstalledApplication.php new file mode 100644 index 000000000000..d11d9a3dadab --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GuestInstalledApplication.php @@ -0,0 +1,213 @@ +google.cloud.migrationcenter.v1.GuestInstalledApplication + */ +class GuestInstalledApplication extends \Google\Protobuf\Internal\Message +{ + /** + * Installed application name. + * + * Generated from protobuf field string application_name = 1; + */ + protected $application_name = ''; + /** + * Installed application vendor. + * + * Generated from protobuf field string vendor = 2; + */ + protected $vendor = ''; + /** + * The time when the application was installed. + * + * Generated from protobuf field .google.protobuf.Timestamp install_time = 3; + */ + protected $install_time = null; + /** + * Source path. + * + * Generated from protobuf field string path = 4; + */ + protected $path = ''; + /** + * Installed application version. + * + * Generated from protobuf field string version = 5; + */ + protected $version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $application_name + * Installed application name. + * @type string $vendor + * Installed application vendor. + * @type \Google\Protobuf\Timestamp $install_time + * The time when the application was installed. + * @type string $path + * Source path. + * @type string $version + * Installed application version. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Installed application name. + * + * Generated from protobuf field string application_name = 1; + * @return string + */ + public function getApplicationName() + { + return $this->application_name; + } + + /** + * Installed application name. + * + * Generated from protobuf field string application_name = 1; + * @param string $var + * @return $this + */ + public function setApplicationName($var) + { + GPBUtil::checkString($var, True); + $this->application_name = $var; + + return $this; + } + + /** + * Installed application vendor. + * + * Generated from protobuf field string vendor = 2; + * @return string + */ + public function getVendor() + { + return $this->vendor; + } + + /** + * Installed application vendor. + * + * Generated from protobuf field string vendor = 2; + * @param string $var + * @return $this + */ + public function setVendor($var) + { + GPBUtil::checkString($var, True); + $this->vendor = $var; + + return $this; + } + + /** + * The time when the application was installed. + * + * Generated from protobuf field .google.protobuf.Timestamp install_time = 3; + * @return \Google\Protobuf\Timestamp|null + */ + public function getInstallTime() + { + return $this->install_time; + } + + public function hasInstallTime() + { + return isset($this->install_time); + } + + public function clearInstallTime() + { + unset($this->install_time); + } + + /** + * The time when the application was installed. + * + * Generated from protobuf field .google.protobuf.Timestamp install_time = 3; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setInstallTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->install_time = $var; + + return $this; + } + + /** + * Source path. + * + * Generated from protobuf field string path = 4; + * @return string + */ + public function getPath() + { + return $this->path; + } + + /** + * Source path. + * + * Generated from protobuf field string path = 4; + * @param string $var + * @return $this + */ + public function setPath($var) + { + GPBUtil::checkString($var, True); + $this->path = $var; + + return $this; + } + + /** + * Installed application version. + * + * Generated from protobuf field string version = 5; + * @return string + */ + public function getVersion() + { + return $this->version; + } + + /** + * Installed application version. + * + * Generated from protobuf field string version = 5; + * @param string $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkString($var, True); + $this->version = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GuestInstalledApplicationList.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GuestInstalledApplicationList.php new file mode 100644 index 000000000000..7f22bc068a8b --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GuestInstalledApplicationList.php @@ -0,0 +1,67 @@ +google.cloud.migrationcenter.v1.GuestInstalledApplicationList + */ +class GuestInstalledApplicationList extends \Google\Protobuf\Internal\Message +{ + /** + * Application entries. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.GuestInstalledApplication entries = 1; + */ + private $entries; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\MigrationCenter\V1\GuestInstalledApplication>|\Google\Protobuf\Internal\RepeatedField $entries + * Application entries. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Application entries. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.GuestInstalledApplication entries = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEntries() + { + return $this->entries; + } + + /** + * Application entries. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.GuestInstalledApplication entries = 1; + * @param array<\Google\Cloud\MigrationCenter\V1\GuestInstalledApplication>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEntries($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\GuestInstalledApplication::class); + $this->entries = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GuestOsDetails.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GuestOsDetails.php new file mode 100644 index 000000000000..83c03f363e10 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GuestOsDetails.php @@ -0,0 +1,223 @@ +google.cloud.migrationcenter.v1.GuestOsDetails + */ +class GuestOsDetails extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the operating system. + * + * Generated from protobuf field string os_name = 1; + */ + protected $os_name = ''; + /** + * What family the OS belong to, if known. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.OperatingSystemFamily family = 2; + */ + protected $family = 0; + /** + * The version of the operating system. + * + * Generated from protobuf field string version = 3; + */ + protected $version = ''; + /** + * OS and app configuration. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.GuestConfigDetails config = 4; + */ + protected $config = null; + /** + * Runtime information. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.GuestRuntimeDetails runtime = 5; + */ + protected $runtime = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $os_name + * The name of the operating system. + * @type int $family + * What family the OS belong to, if known. + * @type string $version + * The version of the operating system. + * @type \Google\Cloud\MigrationCenter\V1\GuestConfigDetails $config + * OS and app configuration. + * @type \Google\Cloud\MigrationCenter\V1\GuestRuntimeDetails $runtime + * Runtime information. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * The name of the operating system. + * + * Generated from protobuf field string os_name = 1; + * @return string + */ + public function getOsName() + { + return $this->os_name; + } + + /** + * The name of the operating system. + * + * Generated from protobuf field string os_name = 1; + * @param string $var + * @return $this + */ + public function setOsName($var) + { + GPBUtil::checkString($var, True); + $this->os_name = $var; + + return $this; + } + + /** + * What family the OS belong to, if known. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.OperatingSystemFamily family = 2; + * @return int + */ + public function getFamily() + { + return $this->family; + } + + /** + * What family the OS belong to, if known. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.OperatingSystemFamily family = 2; + * @param int $var + * @return $this + */ + public function setFamily($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\MigrationCenter\V1\OperatingSystemFamily::class); + $this->family = $var; + + return $this; + } + + /** + * The version of the operating system. + * + * Generated from protobuf field string version = 3; + * @return string + */ + public function getVersion() + { + return $this->version; + } + + /** + * The version of the operating system. + * + * Generated from protobuf field string version = 3; + * @param string $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkString($var, True); + $this->version = $var; + + return $this; + } + + /** + * OS and app configuration. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.GuestConfigDetails config = 4; + * @return \Google\Cloud\MigrationCenter\V1\GuestConfigDetails|null + */ + public function getConfig() + { + return $this->config; + } + + public function hasConfig() + { + return isset($this->config); + } + + public function clearConfig() + { + unset($this->config); + } + + /** + * OS and app configuration. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.GuestConfigDetails config = 4; + * @param \Google\Cloud\MigrationCenter\V1\GuestConfigDetails $var + * @return $this + */ + public function setConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\GuestConfigDetails::class); + $this->config = $var; + + return $this; + } + + /** + * Runtime information. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.GuestRuntimeDetails runtime = 5; + * @return \Google\Cloud\MigrationCenter\V1\GuestRuntimeDetails|null + */ + public function getRuntime() + { + return $this->runtime; + } + + public function hasRuntime() + { + return isset($this->runtime); + } + + public function clearRuntime() + { + unset($this->runtime); + } + + /** + * Runtime information. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.GuestRuntimeDetails runtime = 5; + * @param \Google\Cloud\MigrationCenter\V1\GuestRuntimeDetails $var + * @return $this + */ + public function setRuntime($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\GuestRuntimeDetails::class); + $this->runtime = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GuestRuntimeDetails.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GuestRuntimeDetails.php new file mode 100644 index 000000000000..00c2013d7b03 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GuestRuntimeDetails.php @@ -0,0 +1,365 @@ +google.cloud.migrationcenter.v1.GuestRuntimeDetails + */ +class GuestRuntimeDetails extends \Google\Protobuf\Internal\Message +{ + /** + * Running background services. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.RunningServiceList services = 1; + */ + protected $services = null; + /** + * Running processes. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.RunningProcessList processes = 2; + */ + protected $processes = null; + /** + * Runtime network information (connections, ports). + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.RuntimeNetworkInfo network = 3; + */ + protected $network = null; + /** + * Last time the OS was booted. + * + * Generated from protobuf field .google.protobuf.Timestamp last_boot_time = 4; + */ + protected $last_boot_time = null; + /** + * Domain, e.g. c.stratozone-development.internal. + * + * Generated from protobuf field string domain = 5; + */ + protected $domain = ''; + /** + * Machine name. + * + * Generated from protobuf field string machine_name = 6; + */ + protected $machine_name = ''; + /** + * Installed applications information. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.GuestInstalledApplicationList installed_apps = 7; + */ + protected $installed_apps = null; + /** + * Open files information. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.OpenFileList open_file_list = 8; + */ + protected $open_file_list = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\MigrationCenter\V1\RunningServiceList $services + * Running background services. + * @type \Google\Cloud\MigrationCenter\V1\RunningProcessList $processes + * Running processes. + * @type \Google\Cloud\MigrationCenter\V1\RuntimeNetworkInfo $network + * Runtime network information (connections, ports). + * @type \Google\Protobuf\Timestamp $last_boot_time + * Last time the OS was booted. + * @type string $domain + * Domain, e.g. c.stratozone-development.internal. + * @type string $machine_name + * Machine name. + * @type \Google\Cloud\MigrationCenter\V1\GuestInstalledApplicationList $installed_apps + * Installed applications information. + * @type \Google\Cloud\MigrationCenter\V1\OpenFileList $open_file_list + * Open files information. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Running background services. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.RunningServiceList services = 1; + * @return \Google\Cloud\MigrationCenter\V1\RunningServiceList|null + */ + public function getServices() + { + return $this->services; + } + + public function hasServices() + { + return isset($this->services); + } + + public function clearServices() + { + unset($this->services); + } + + /** + * Running background services. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.RunningServiceList services = 1; + * @param \Google\Cloud\MigrationCenter\V1\RunningServiceList $var + * @return $this + */ + public function setServices($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\RunningServiceList::class); + $this->services = $var; + + return $this; + } + + /** + * Running processes. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.RunningProcessList processes = 2; + * @return \Google\Cloud\MigrationCenter\V1\RunningProcessList|null + */ + public function getProcesses() + { + return $this->processes; + } + + public function hasProcesses() + { + return isset($this->processes); + } + + public function clearProcesses() + { + unset($this->processes); + } + + /** + * Running processes. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.RunningProcessList processes = 2; + * @param \Google\Cloud\MigrationCenter\V1\RunningProcessList $var + * @return $this + */ + public function setProcesses($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\RunningProcessList::class); + $this->processes = $var; + + return $this; + } + + /** + * Runtime network information (connections, ports). + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.RuntimeNetworkInfo network = 3; + * @return \Google\Cloud\MigrationCenter\V1\RuntimeNetworkInfo|null + */ + public function getNetwork() + { + return $this->network; + } + + public function hasNetwork() + { + return isset($this->network); + } + + public function clearNetwork() + { + unset($this->network); + } + + /** + * Runtime network information (connections, ports). + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.RuntimeNetworkInfo network = 3; + * @param \Google\Cloud\MigrationCenter\V1\RuntimeNetworkInfo $var + * @return $this + */ + public function setNetwork($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\RuntimeNetworkInfo::class); + $this->network = $var; + + return $this; + } + + /** + * Last time the OS was booted. + * + * Generated from protobuf field .google.protobuf.Timestamp last_boot_time = 4; + * @return \Google\Protobuf\Timestamp|null + */ + public function getLastBootTime() + { + return $this->last_boot_time; + } + + public function hasLastBootTime() + { + return isset($this->last_boot_time); + } + + public function clearLastBootTime() + { + unset($this->last_boot_time); + } + + /** + * Last time the OS was booted. + * + * Generated from protobuf field .google.protobuf.Timestamp last_boot_time = 4; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setLastBootTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->last_boot_time = $var; + + return $this; + } + + /** + * Domain, e.g. c.stratozone-development.internal. + * + * Generated from protobuf field string domain = 5; + * @return string + */ + public function getDomain() + { + return $this->domain; + } + + /** + * Domain, e.g. c.stratozone-development.internal. + * + * Generated from protobuf field string domain = 5; + * @param string $var + * @return $this + */ + public function setDomain($var) + { + GPBUtil::checkString($var, True); + $this->domain = $var; + + return $this; + } + + /** + * Machine name. + * + * Generated from protobuf field string machine_name = 6; + * @return string + */ + public function getMachineName() + { + return $this->machine_name; + } + + /** + * Machine name. + * + * Generated from protobuf field string machine_name = 6; + * @param string $var + * @return $this + */ + public function setMachineName($var) + { + GPBUtil::checkString($var, True); + $this->machine_name = $var; + + return $this; + } + + /** + * Installed applications information. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.GuestInstalledApplicationList installed_apps = 7; + * @return \Google\Cloud\MigrationCenter\V1\GuestInstalledApplicationList|null + */ + public function getInstalledApps() + { + return $this->installed_apps; + } + + public function hasInstalledApps() + { + return isset($this->installed_apps); + } + + public function clearInstalledApps() + { + unset($this->installed_apps); + } + + /** + * Installed applications information. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.GuestInstalledApplicationList installed_apps = 7; + * @param \Google\Cloud\MigrationCenter\V1\GuestInstalledApplicationList $var + * @return $this + */ + public function setInstalledApps($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\GuestInstalledApplicationList::class); + $this->installed_apps = $var; + + return $this; + } + + /** + * Open files information. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.OpenFileList open_file_list = 8; + * @return \Google\Cloud\MigrationCenter\V1\OpenFileList|null + */ + public function getOpenFileList() + { + return $this->open_file_list; + } + + public function hasOpenFileList() + { + return isset($this->open_file_list); + } + + public function clearOpenFileList() + { + unset($this->open_file_list); + } + + /** + * Open files information. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.OpenFileList open_file_list = 8; + * @param \Google\Cloud\MigrationCenter\V1\OpenFileList $var + * @return $this + */ + public function setOpenFileList($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\OpenFileList::class); + $this->open_file_list = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/HostsEntry.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/HostsEntry.php new file mode 100644 index 000000000000..1b1b21b86ead --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/HostsEntry.php @@ -0,0 +1,101 @@ +google.cloud.migrationcenter.v1.HostsEntry + */ +class HostsEntry extends \Google\Protobuf\Internal\Message +{ + /** + * IP (raw, IPv4/6 agnostic). + * + * Generated from protobuf field string ip = 1; + */ + protected $ip = ''; + /** + * List of host names / aliases. + * + * Generated from protobuf field repeated string host_names = 2; + */ + private $host_names; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $ip + * IP (raw, IPv4/6 agnostic). + * @type array|\Google\Protobuf\Internal\RepeatedField $host_names + * List of host names / aliases. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * IP (raw, IPv4/6 agnostic). + * + * Generated from protobuf field string ip = 1; + * @return string + */ + public function getIp() + { + return $this->ip; + } + + /** + * IP (raw, IPv4/6 agnostic). + * + * Generated from protobuf field string ip = 1; + * @param string $var + * @return $this + */ + public function setIp($var) + { + GPBUtil::checkString($var, True); + $this->ip = $var; + + return $this; + } + + /** + * List of host names / aliases. + * + * Generated from protobuf field repeated string host_names = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getHostNames() + { + return $this->host_names; + } + + /** + * List of host names / aliases. + * + * Generated from protobuf field repeated string host_names = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setHostNames($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->host_names = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/HostsEntryList.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/HostsEntryList.php new file mode 100644 index 000000000000..95a0f125958f --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/HostsEntryList.php @@ -0,0 +1,67 @@ +google.cloud.migrationcenter.v1.HostsEntryList + */ +class HostsEntryList extends \Google\Protobuf\Internal\Message +{ + /** + * Hosts entries. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.HostsEntry entries = 1; + */ + private $entries; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\MigrationCenter\V1\HostsEntry>|\Google\Protobuf\Internal\RepeatedField $entries + * Hosts entries. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Hosts entries. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.HostsEntry entries = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEntries() + { + return $this->entries; + } + + /** + * Hosts entries. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.HostsEntry entries = 1; + * @param array<\Google\Cloud\MigrationCenter\V1\HostsEntry>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEntries($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\HostsEntry::class); + $this->entries = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ImportDataFile.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ImportDataFile.php new file mode 100644 index 000000000000..18d7f3e10c86 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ImportDataFile.php @@ -0,0 +1,255 @@ +google.cloud.migrationcenter.v1.ImportDataFile + */ +class ImportDataFile extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The name of the file. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * User-friendly display name. Maximum length is 63 characters. + * + * Generated from protobuf field string display_name = 6; + */ + protected $display_name = ''; + /** + * Required. The payload format. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ImportJobFormat format = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $format = 0; + /** + * Output only. The timestamp when the file was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The state of the import data file. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ImportDataFile.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + protected $file_info; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The name of the file. + * @type string $display_name + * User-friendly display name. Maximum length is 63 characters. + * @type int $format + * Required. The payload format. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The timestamp when the file was created. + * @type int $state + * Output only. The state of the import data file. + * @type \Google\Cloud\MigrationCenter\V1\UploadFileInfo $upload_file_info + * Information about a file that is uploaded to a storage service. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The name of the file. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The name of the file. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * User-friendly display name. Maximum length is 63 characters. + * + * Generated from protobuf field string display_name = 6; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * User-friendly display name. Maximum length is 63 characters. + * + * Generated from protobuf field string display_name = 6; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Required. The payload format. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ImportJobFormat format = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getFormat() + { + return $this->format; + } + + /** + * Required. The payload format. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ImportJobFormat format = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setFormat($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\MigrationCenter\V1\ImportJobFormat::class); + $this->format = $var; + + return $this; + } + + /** + * Output only. The timestamp when the file was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The timestamp when the file was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The state of the import data file. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ImportDataFile.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The state of the import data file. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ImportDataFile.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\MigrationCenter\V1\ImportDataFile\State::class); + $this->state = $var; + + return $this; + } + + /** + * Information about a file that is uploaded to a storage service. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.UploadFileInfo upload_file_info = 5; + * @return \Google\Cloud\MigrationCenter\V1\UploadFileInfo|null + */ + public function getUploadFileInfo() + { + return $this->readOneof(5); + } + + public function hasUploadFileInfo() + { + return $this->hasOneof(5); + } + + /** + * Information about a file that is uploaded to a storage service. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.UploadFileInfo upload_file_info = 5; + * @param \Google\Cloud\MigrationCenter\V1\UploadFileInfo $var + * @return $this + */ + public function setUploadFileInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\UploadFileInfo::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * @return string + */ + public function getFileInfo() + { + return $this->whichOneof("file_info"); + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ImportDataFile/State.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ImportDataFile/State.php new file mode 100644 index 000000000000..0a89ef4a4c60 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ImportDataFile/State.php @@ -0,0 +1,64 @@ +google.cloud.migrationcenter.v1.ImportDataFile.State + */ +class State +{ + /** + * Default value. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The data file is being created. + * + * Generated from protobuf enum CREATING = 1; + */ + const CREATING = 1; + /** + * The data file completed initialization. + * + * Generated from protobuf enum ACTIVE = 2; + */ + const ACTIVE = 2; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::CREATING => 'CREATING', + self::ACTIVE => 'ACTIVE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\MigrationCenter\V1\ImportDataFile_State::class); + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ImportError.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ImportError.php new file mode 100644 index 000000000000..04a2df954f0c --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ImportError.php @@ -0,0 +1,102 @@ +google.cloud.migrationcenter.v1.ImportError + */ +class ImportError extends \Google\Protobuf\Internal\Message +{ + /** + * The error information. + * + * Generated from protobuf field string error_details = 1; + */ + protected $error_details = ''; + /** + * The severity of the error. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ImportError.Severity severity = 2; + */ + protected $severity = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $error_details + * The error information. + * @type int $severity + * The severity of the error. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * The error information. + * + * Generated from protobuf field string error_details = 1; + * @return string + */ + public function getErrorDetails() + { + return $this->error_details; + } + + /** + * The error information. + * + * Generated from protobuf field string error_details = 1; + * @param string $var + * @return $this + */ + public function setErrorDetails($var) + { + GPBUtil::checkString($var, True); + $this->error_details = $var; + + return $this; + } + + /** + * The severity of the error. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ImportError.Severity severity = 2; + * @return int + */ + public function getSeverity() + { + return $this->severity; + } + + /** + * The severity of the error. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ImportError.Severity severity = 2; + * @param int $var + * @return $this + */ + public function setSeverity($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\MigrationCenter\V1\ImportError\Severity::class); + $this->severity = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ImportError/Severity.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ImportError/Severity.php new file mode 100644 index 000000000000..4495bb787812 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ImportError/Severity.php @@ -0,0 +1,63 @@ +google.cloud.migrationcenter.v1.ImportError.Severity + */ +class Severity +{ + /** + * Generated from protobuf enum SEVERITY_UNSPECIFIED = 0; + */ + const SEVERITY_UNSPECIFIED = 0; + /** + * Generated from protobuf enum ERROR = 1; + */ + const ERROR = 1; + /** + * Generated from protobuf enum WARNING = 2; + */ + const WARNING = 2; + /** + * Generated from protobuf enum INFO = 3; + */ + const INFO = 3; + + private static $valueToName = [ + self::SEVERITY_UNSPECIFIED => 'SEVERITY_UNSPECIFIED', + self::ERROR => 'ERROR', + self::WARNING => 'WARNING', + self::INFO => 'INFO', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Severity::class, \Google\Cloud\MigrationCenter\V1\ImportError_Severity::class); + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ImportJob.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ImportJob.php new file mode 100644 index 000000000000..686fb1277d40 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ImportJob.php @@ -0,0 +1,410 @@ +google.cloud.migrationcenter.v1.ImportJob + */ +class ImportJob extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The full name of the import job. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * User-friendly display name. Maximum length is 63 characters. + * + * Generated from protobuf field string display_name = 2; + */ + protected $display_name = ''; + /** + * Output only. The timestamp when the import job was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The timestamp when the import job was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Output only. The timestamp when the import job was completed. + * + * Generated from protobuf field .google.protobuf.Timestamp complete_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $complete_time = null; + /** + * Output only. The state of the import job. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ImportJob.ImportJobState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Labels as key value pairs. + * + * Generated from protobuf field map labels = 7; + */ + private $labels; + /** + * Required. Reference to a source. + * + * Generated from protobuf field string asset_source = 8 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $asset_source = ''; + protected $report; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The full name of the import job. + * @type string $display_name + * User-friendly display name. Maximum length is 63 characters. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The timestamp when the import job was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The timestamp when the import job was last updated. + * @type \Google\Protobuf\Timestamp $complete_time + * Output only. The timestamp when the import job was completed. + * @type int $state + * Output only. The state of the import job. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Labels as key value pairs. + * @type string $asset_source + * Required. Reference to a source. + * @type \Google\Cloud\MigrationCenter\V1\ValidationReport $validation_report + * Output only. The report with the validation results of the import job. + * @type \Google\Cloud\MigrationCenter\V1\ExecutionReport $execution_report + * Output only. The report with the results of running the import job. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The full name of the import job. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The full name of the import job. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * User-friendly display name. Maximum length is 63 characters. + * + * Generated from protobuf field string display_name = 2; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * User-friendly display name. Maximum length is 63 characters. + * + * Generated from protobuf field string display_name = 2; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Output only. The timestamp when the import job was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The timestamp when the import job was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The timestamp when the import job was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The timestamp when the import job was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Output only. The timestamp when the import job was completed. + * + * Generated from protobuf field .google.protobuf.Timestamp complete_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCompleteTime() + { + return $this->complete_time; + } + + public function hasCompleteTime() + { + return isset($this->complete_time); + } + + public function clearCompleteTime() + { + unset($this->complete_time); + } + + /** + * Output only. The timestamp when the import job was completed. + * + * Generated from protobuf field .google.protobuf.Timestamp complete_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCompleteTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->complete_time = $var; + + return $this; + } + + /** + * Output only. The state of the import job. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ImportJob.ImportJobState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The state of the import job. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ImportJob.ImportJobState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\MigrationCenter\V1\ImportJob\ImportJobState::class); + $this->state = $var; + + return $this; + } + + /** + * Labels as key value pairs. + * + * Generated from protobuf field map labels = 7; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Labels as key value pairs. + * + * Generated from protobuf field map labels = 7; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Required. Reference to a source. + * + * Generated from protobuf field string asset_source = 8 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getAssetSource() + { + return $this->asset_source; + } + + /** + * Required. Reference to a source. + * + * Generated from protobuf field string asset_source = 8 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setAssetSource($var) + { + GPBUtil::checkString($var, True); + $this->asset_source = $var; + + return $this; + } + + /** + * Output only. The report with the validation results of the import job. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ValidationReport validation_report = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\MigrationCenter\V1\ValidationReport|null + */ + public function getValidationReport() + { + return $this->readOneof(10); + } + + public function hasValidationReport() + { + return $this->hasOneof(10); + } + + /** + * Output only. The report with the validation results of the import job. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ValidationReport validation_report = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\MigrationCenter\V1\ValidationReport $var + * @return $this + */ + public function setValidationReport($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\ValidationReport::class); + $this->writeOneof(10, $var); + + return $this; + } + + /** + * Output only. The report with the results of running the import job. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ExecutionReport execution_report = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\MigrationCenter\V1\ExecutionReport|null + */ + public function getExecutionReport() + { + return $this->readOneof(11); + } + + public function hasExecutionReport() + { + return $this->hasOneof(11); + } + + /** + * Output only. The report with the results of running the import job. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ExecutionReport execution_report = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\MigrationCenter\V1\ExecutionReport $var + * @return $this + */ + public function setExecutionReport($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\ExecutionReport::class); + $this->writeOneof(11, $var); + + return $this; + } + + /** + * @return string + */ + public function getReport() + { + return $this->whichOneof("report"); + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ImportJob/ImportJobState.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ImportJob/ImportJobState.php new file mode 100644 index 000000000000..f40118238812 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ImportJob/ImportJobState.php @@ -0,0 +1,99 @@ +google.cloud.migrationcenter.v1.ImportJob.ImportJobState + */ +class ImportJobState +{ + /** + * Default value. + * + * Generated from protobuf enum IMPORT_JOB_STATE_UNSPECIFIED = 0; + */ + const IMPORT_JOB_STATE_UNSPECIFIED = 0; + /** + * The import job is pending. + * + * Generated from protobuf enum IMPORT_JOB_STATE_PENDING = 1; + */ + const IMPORT_JOB_STATE_PENDING = 1; + /** + * The processing of the import job is ongoing. + * + * Generated from protobuf enum IMPORT_JOB_STATE_RUNNING = 2; + */ + const IMPORT_JOB_STATE_RUNNING = 2; + /** + * The import job processing has completed. + * + * Generated from protobuf enum IMPORT_JOB_STATE_COMPLETED = 3; + */ + const IMPORT_JOB_STATE_COMPLETED = 3; + /** + * The import job failed to be processed. + * + * Generated from protobuf enum IMPORT_JOB_STATE_FAILED = 4; + */ + const IMPORT_JOB_STATE_FAILED = 4; + /** + * The import job is being validated. + * + * Generated from protobuf enum IMPORT_JOB_STATE_VALIDATING = 5; + */ + const IMPORT_JOB_STATE_VALIDATING = 5; + /** + * The import job contains blocking errors. + * + * Generated from protobuf enum IMPORT_JOB_STATE_FAILED_VALIDATION = 6; + */ + const IMPORT_JOB_STATE_FAILED_VALIDATION = 6; + /** + * The validation of the job completed with no blocking errors. + * + * Generated from protobuf enum IMPORT_JOB_STATE_READY = 7; + */ + const IMPORT_JOB_STATE_READY = 7; + + private static $valueToName = [ + self::IMPORT_JOB_STATE_UNSPECIFIED => 'IMPORT_JOB_STATE_UNSPECIFIED', + self::IMPORT_JOB_STATE_PENDING => 'IMPORT_JOB_STATE_PENDING', + self::IMPORT_JOB_STATE_RUNNING => 'IMPORT_JOB_STATE_RUNNING', + self::IMPORT_JOB_STATE_COMPLETED => 'IMPORT_JOB_STATE_COMPLETED', + self::IMPORT_JOB_STATE_FAILED => 'IMPORT_JOB_STATE_FAILED', + self::IMPORT_JOB_STATE_VALIDATING => 'IMPORT_JOB_STATE_VALIDATING', + self::IMPORT_JOB_STATE_FAILED_VALIDATION => 'IMPORT_JOB_STATE_FAILED_VALIDATION', + self::IMPORT_JOB_STATE_READY => 'IMPORT_JOB_STATE_READY', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ImportJobState::class, \Google\Cloud\MigrationCenter\V1\ImportJob_ImportJobState::class); + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ImportJobFormat.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ImportJobFormat.php new file mode 100644 index 000000000000..7243bd1d17dc --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ImportJobFormat.php @@ -0,0 +1,88 @@ +google.cloud.migrationcenter.v1.ImportJobFormat + */ +class ImportJobFormat +{ + /** + * Default value. + * + * Generated from protobuf enum IMPORT_JOB_FORMAT_UNSPECIFIED = 0; + */ + const IMPORT_JOB_FORMAT_UNSPECIFIED = 0; + /** + * RVTools format (XLSX). + * + * Generated from protobuf enum IMPORT_JOB_FORMAT_RVTOOLS_XLSX = 1; + */ + const IMPORT_JOB_FORMAT_RVTOOLS_XLSX = 1; + /** + * RVTools format (CSV). + * + * Generated from protobuf enum IMPORT_JOB_FORMAT_RVTOOLS_CSV = 2; + */ + const IMPORT_JOB_FORMAT_RVTOOLS_CSV = 2; + /** + * CSV format exported from AWS using the + * [AWS collection + * script][https://github.com/GoogleCloudPlatform/aws-to-stratozone-export]. + * + * Generated from protobuf enum IMPORT_JOB_FORMAT_EXPORTED_AWS_CSV = 4; + */ + const IMPORT_JOB_FORMAT_EXPORTED_AWS_CSV = 4; + /** + * CSV format exported from Azure using the + * [Azure collection + * script][https://github.com/GoogleCloudPlatform/azure-to-stratozone-export]. + * + * Generated from protobuf enum IMPORT_JOB_FORMAT_EXPORTED_AZURE_CSV = 5; + */ + const IMPORT_JOB_FORMAT_EXPORTED_AZURE_CSV = 5; + /** + * CSV format created manually and following the StratoZone format. For more + * information, see [Manually create and upload data + * tables][https://cloud.google.com/migrate/stratozone/docs/import-data-portal]. + * + * Generated from protobuf enum IMPORT_JOB_FORMAT_STRATOZONE_CSV = 6; + */ + const IMPORT_JOB_FORMAT_STRATOZONE_CSV = 6; + + private static $valueToName = [ + self::IMPORT_JOB_FORMAT_UNSPECIFIED => 'IMPORT_JOB_FORMAT_UNSPECIFIED', + self::IMPORT_JOB_FORMAT_RVTOOLS_XLSX => 'IMPORT_JOB_FORMAT_RVTOOLS_XLSX', + self::IMPORT_JOB_FORMAT_RVTOOLS_CSV => 'IMPORT_JOB_FORMAT_RVTOOLS_CSV', + self::IMPORT_JOB_FORMAT_EXPORTED_AWS_CSV => 'IMPORT_JOB_FORMAT_EXPORTED_AWS_CSV', + self::IMPORT_JOB_FORMAT_EXPORTED_AZURE_CSV => 'IMPORT_JOB_FORMAT_EXPORTED_AZURE_CSV', + self::IMPORT_JOB_FORMAT_STRATOZONE_CSV => 'IMPORT_JOB_FORMAT_STRATOZONE_CSV', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ImportJobView.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ImportJobView.php new file mode 100644 index 000000000000..b203f8c4cb41 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ImportJobView.php @@ -0,0 +1,64 @@ +google.cloud.migrationcenter.v1.ImportJobView + */ +class ImportJobView +{ + /** + * The import job view is not specified. The API displays the basic view by + * default. + * + * Generated from protobuf enum IMPORT_JOB_VIEW_UNSPECIFIED = 0; + */ + const IMPORT_JOB_VIEW_UNSPECIFIED = 0; + /** + * The import job view includes basic metadata of an import job. + * This view does not include payload information. + * + * Generated from protobuf enum IMPORT_JOB_VIEW_BASIC = 1; + */ + const IMPORT_JOB_VIEW_BASIC = 1; + /** + * The import job view includes all metadata of an import job. + * + * Generated from protobuf enum IMPORT_JOB_VIEW_FULL = 2; + */ + const IMPORT_JOB_VIEW_FULL = 2; + + private static $valueToName = [ + self::IMPORT_JOB_VIEW_UNSPECIFIED => 'IMPORT_JOB_VIEW_UNSPECIFIED', + self::IMPORT_JOB_VIEW_BASIC => 'IMPORT_JOB_VIEW_BASIC', + self::IMPORT_JOB_VIEW_FULL => 'IMPORT_JOB_VIEW_FULL', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ImportRowError.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ImportRowError.php new file mode 100644 index 000000000000..25d5131c0196 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ImportRowError.php @@ -0,0 +1,174 @@ +google.cloud.migrationcenter.v1.ImportRowError + */ +class ImportRowError extends \Google\Protobuf\Internal\Message +{ + /** + * The row number where the error was detected. + * + * Generated from protobuf field int32 row_number = 1 [deprecated = true]; + * @deprecated + */ + protected $row_number = 0; + /** + * The name of the VM in the row. + * + * Generated from protobuf field string vm_name = 2; + */ + protected $vm_name = ''; + /** + * The VM UUID. + * + * Generated from protobuf field string vm_uuid = 3; + */ + protected $vm_uuid = ''; + /** + * The list of errors detected in the row. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ImportError errors = 4; + */ + private $errors; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $row_number + * The row number where the error was detected. + * @type string $vm_name + * The name of the VM in the row. + * @type string $vm_uuid + * The VM UUID. + * @type array<\Google\Cloud\MigrationCenter\V1\ImportError>|\Google\Protobuf\Internal\RepeatedField $errors + * The list of errors detected in the row. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * The row number where the error was detected. + * + * Generated from protobuf field int32 row_number = 1 [deprecated = true]; + * @return int + * @deprecated + */ + public function getRowNumber() + { + @trigger_error('row_number is deprecated.', E_USER_DEPRECATED); + return $this->row_number; + } + + /** + * The row number where the error was detected. + * + * Generated from protobuf field int32 row_number = 1 [deprecated = true]; + * @param int $var + * @return $this + * @deprecated + */ + public function setRowNumber($var) + { + @trigger_error('row_number is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkInt32($var); + $this->row_number = $var; + + return $this; + } + + /** + * The name of the VM in the row. + * + * Generated from protobuf field string vm_name = 2; + * @return string + */ + public function getVmName() + { + return $this->vm_name; + } + + /** + * The name of the VM in the row. + * + * Generated from protobuf field string vm_name = 2; + * @param string $var + * @return $this + */ + public function setVmName($var) + { + GPBUtil::checkString($var, True); + $this->vm_name = $var; + + return $this; + } + + /** + * The VM UUID. + * + * Generated from protobuf field string vm_uuid = 3; + * @return string + */ + public function getVmUuid() + { + return $this->vm_uuid; + } + + /** + * The VM UUID. + * + * Generated from protobuf field string vm_uuid = 3; + * @param string $var + * @return $this + */ + public function setVmUuid($var) + { + GPBUtil::checkString($var, True); + $this->vm_uuid = $var; + + return $this; + } + + /** + * The list of errors detected in the row. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ImportError errors = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getErrors() + { + return $this->errors; + } + + /** + * The list of errors detected in the row. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ImportError errors = 4; + * @param array<\Google\Cloud\MigrationCenter\V1\ImportError>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setErrors($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\ImportError::class); + $this->errors = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Insight.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Insight.php new file mode 100644 index 000000000000..990ef8436af2 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Insight.php @@ -0,0 +1,108 @@ +google.cloud.migrationcenter.v1.Insight + */ +class Insight extends \Google\Protobuf\Internal\Message +{ + protected $insight; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\MigrationCenter\V1\MigrationInsight $migration_insight + * Output only. An insight about potential migrations for an asset. + * @type \Google\Cloud\MigrationCenter\V1\GenericInsight $generic_insight + * Output only. A generic insight about an asset + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Output only. An insight about potential migrations for an asset. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.MigrationInsight migration_insight = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\MigrationCenter\V1\MigrationInsight|null + */ + public function getMigrationInsight() + { + return $this->readOneof(1); + } + + public function hasMigrationInsight() + { + return $this->hasOneof(1); + } + + /** + * Output only. An insight about potential migrations for an asset. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.MigrationInsight migration_insight = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\MigrationCenter\V1\MigrationInsight $var + * @return $this + */ + public function setMigrationInsight($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\MigrationInsight::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Output only. A generic insight about an asset + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.GenericInsight generic_insight = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\MigrationCenter\V1\GenericInsight|null + */ + public function getGenericInsight() + { + return $this->readOneof(2); + } + + public function hasGenericInsight() + { + return $this->hasOneof(2); + } + + /** + * Output only. A generic insight about an asset + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.GenericInsight generic_insight = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\MigrationCenter\V1\GenericInsight $var + * @return $this + */ + public function setGenericInsight($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\GenericInsight::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getInsight() + { + return $this->whichOneof("insight"); + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/InsightList.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/InsightList.php new file mode 100644 index 000000000000..ecaa4573249f --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/InsightList.php @@ -0,0 +1,111 @@ +google.cloud.migrationcenter.v1.InsightList + */ +class InsightList extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Insights of the list. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.Insight insights = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $insights; + /** + * Output only. Update timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\MigrationCenter\V1\Insight>|\Google\Protobuf\Internal\RepeatedField $insights + * Output only. Insights of the list. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. Update timestamp. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Insights of the list. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.Insight insights = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getInsights() + { + return $this->insights; + } + + /** + * Output only. Insights of the list. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.Insight insights = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\MigrationCenter\V1\Insight>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setInsights($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\Insight::class); + $this->insights = $arr; + + return $this; + } + + /** + * Output only. Update timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. Update timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/LicenseType.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/LicenseType.php new file mode 100644 index 000000000000..695c1cc788ec --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/LicenseType.php @@ -0,0 +1,63 @@ +google.cloud.migrationcenter.v1.LicenseType + */ +class LicenseType +{ + /** + * Unspecified (default value). + * + * Generated from protobuf enum LICENSE_TYPE_UNSPECIFIED = 0; + */ + const LICENSE_TYPE_UNSPECIFIED = 0; + /** + * Default Google Cloud licensing plan. Licensing is charged per usage. + * This a good value to start with. + * + * Generated from protobuf enum LICENSE_TYPE_DEFAULT = 1; + */ + const LICENSE_TYPE_DEFAULT = 1; + /** + * Bring-your-own-license (BYOL) plan. User provides the OS license. + * + * Generated from protobuf enum LICENSE_TYPE_BRING_YOUR_OWN_LICENSE = 2; + */ + const LICENSE_TYPE_BRING_YOUR_OWN_LICENSE = 2; + + private static $valueToName = [ + self::LICENSE_TYPE_UNSPECIFIED => 'LICENSE_TYPE_UNSPECIFIED', + self::LICENSE_TYPE_DEFAULT => 'LICENSE_TYPE_DEFAULT', + self::LICENSE_TYPE_BRING_YOUR_OWN_LICENSE => 'LICENSE_TYPE_BRING_YOUR_OWN_LICENSE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListAssetsRequest.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListAssetsRequest.php new file mode 100644 index 000000000000..2270d9571d64 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListAssetsRequest.php @@ -0,0 +1,255 @@ +google.cloud.migrationcenter.v1.ListAssetsRequest + */ +class ListAssetsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Parent value for `ListAssetsRequest`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * Filtering results. + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + /** + * Field to sort by. See https://google.aip.dev/132#ordering for more details. + * + * Generated from protobuf field string order_by = 5; + */ + protected $order_by = ''; + /** + * View of the assets. Defaults to BASIC. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.AssetView view = 6; + */ + protected $view = 0; + + /** + * @param string $parent Required. Parent value for `ListAssetsRequest`. Please see + * {@see MigrationCenterClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\MigrationCenter\V1\ListAssetsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Parent value for `ListAssetsRequest`. + * @type int $page_size + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * @type string $page_token + * A token identifying a page of results the server should return. + * @type string $filter + * Filtering results. + * @type string $order_by + * Field to sort by. See https://google.aip.dev/132#ordering for more details. + * @type int $view + * View of the assets. Defaults to BASIC. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Required. Parent value for `ListAssetsRequest`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Parent value for `ListAssetsRequest`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Filtering results. + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Filtering results. + * + * Generated from protobuf field string filter = 4; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Field to sort by. See https://google.aip.dev/132#ordering for more details. + * + * Generated from protobuf field string order_by = 5; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Field to sort by. See https://google.aip.dev/132#ordering for more details. + * + * Generated from protobuf field string order_by = 5; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + + /** + * View of the assets. Defaults to BASIC. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.AssetView view = 6; + * @return int + */ + public function getView() + { + return $this->view; + } + + /** + * View of the assets. Defaults to BASIC. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.AssetView view = 6; + * @param int $var + * @return $this + */ + public function setView($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\MigrationCenter\V1\AssetView::class); + $this->view = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListAssetsResponse.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListAssetsResponse.php new file mode 100644 index 000000000000..747c8939c0a2 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListAssetsResponse.php @@ -0,0 +1,135 @@ +google.cloud.migrationcenter.v1.ListAssetsResponse + */ +class ListAssetsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of assets. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.Asset assets = 1; + */ + private $assets; + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\MigrationCenter\V1\Asset>|\Google\Protobuf\Internal\RepeatedField $assets + * A list of assets. + * @type string $next_page_token + * A token identifying a page of results the server should return. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * A list of assets. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.Asset assets = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAssets() + { + return $this->assets; + } + + /** + * A list of assets. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.Asset assets = 1; + * @param array<\Google\Cloud\MigrationCenter\V1\Asset>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAssets($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\Asset::class); + $this->assets = $arr; + + return $this; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListErrorFramesRequest.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListErrorFramesRequest.php new file mode 100644 index 000000000000..d6553b985f6c --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListErrorFramesRequest.php @@ -0,0 +1,191 @@ +google.cloud.migrationcenter.v1.ListErrorFramesRequest + */ +class ListErrorFramesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Parent value (the source) for `ListErrorFramesRequest`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * Optional. An optional view mode to control the level of details of each + * error frame. The default is a BASIC frame view. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ErrorFrameView view = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $view = 0; + + /** + * @param string $parent Required. Parent value (the source) for `ListErrorFramesRequest`. Please see + * {@see MigrationCenterClient::sourceName()} for help formatting this field. + * + * @return \Google\Cloud\MigrationCenter\V1\ListErrorFramesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Parent value (the source) for `ListErrorFramesRequest`. + * @type int $page_size + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * @type string $page_token + * A token identifying a page of results the server should return. + * @type int $view + * Optional. An optional view mode to control the level of details of each + * error frame. The default is a BASIC frame view. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Required. Parent value (the source) for `ListErrorFramesRequest`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Parent value (the source) for `ListErrorFramesRequest`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. An optional view mode to control the level of details of each + * error frame. The default is a BASIC frame view. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ErrorFrameView view = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getView() + { + return $this->view; + } + + /** + * Optional. An optional view mode to control the level of details of each + * error frame. The default is a BASIC frame view. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ErrorFrameView view = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setView($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\MigrationCenter\V1\ErrorFrameView::class); + $this->view = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListErrorFramesResponse.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListErrorFramesResponse.php new file mode 100644 index 000000000000..a01575621bc4 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListErrorFramesResponse.php @@ -0,0 +1,135 @@ +google.cloud.migrationcenter.v1.ListErrorFramesResponse + */ +class ListErrorFramesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of error frames. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ErrorFrame error_frames = 1; + */ + private $error_frames; + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\MigrationCenter\V1\ErrorFrame>|\Google\Protobuf\Internal\RepeatedField $error_frames + * The list of error frames. + * @type string $next_page_token + * A token identifying a page of results the server should return. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * The list of error frames. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ErrorFrame error_frames = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getErrorFrames() + { + return $this->error_frames; + } + + /** + * The list of error frames. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ErrorFrame error_frames = 1; + * @param array<\Google\Cloud\MigrationCenter\V1\ErrorFrame>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setErrorFrames($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\ErrorFrame::class); + $this->error_frames = $arr; + + return $this; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListGroupsRequest.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListGroupsRequest.php new file mode 100644 index 000000000000..609ab9c2c0c8 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListGroupsRequest.php @@ -0,0 +1,221 @@ +google.cloud.migrationcenter.v1.ListGroupsRequest + */ +class ListGroupsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Parent value for `ListGroupsRequest`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * Filtering results. + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + /** + * Field to sort by. See https://google.aip.dev/132#ordering for more details. + * + * Generated from protobuf field string order_by = 5; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. Parent value for `ListGroupsRequest`. Please see + * {@see MigrationCenterClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\MigrationCenter\V1\ListGroupsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Parent value for `ListGroupsRequest`. + * @type int $page_size + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * @type string $page_token + * A token identifying a page of results the server should return. + * @type string $filter + * Filtering results. + * @type string $order_by + * Field to sort by. See https://google.aip.dev/132#ordering for more details. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Required. Parent value for `ListGroupsRequest`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Parent value for `ListGroupsRequest`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Filtering results. + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Filtering results. + * + * Generated from protobuf field string filter = 4; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Field to sort by. See https://google.aip.dev/132#ordering for more details. + * + * Generated from protobuf field string order_by = 5; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Field to sort by. See https://google.aip.dev/132#ordering for more details. + * + * Generated from protobuf field string order_by = 5; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListGroupsResponse.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListGroupsResponse.php new file mode 100644 index 000000000000..433533778676 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListGroupsResponse.php @@ -0,0 +1,135 @@ +google.cloud.migrationcenter.v1.ListGroupsResponse + */ +class ListGroupsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of Group + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.Group groups = 1; + */ + private $groups; + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\MigrationCenter\V1\Group>|\Google\Protobuf\Internal\RepeatedField $groups + * The list of Group + * @type string $next_page_token + * A token identifying a page of results the server should return. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * The list of Group + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.Group groups = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getGroups() + { + return $this->groups; + } + + /** + * The list of Group + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.Group groups = 1; + * @param array<\Google\Cloud\MigrationCenter\V1\Group>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setGroups($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\Group::class); + $this->groups = $arr; + + return $this; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListImportDataFilesRequest.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListImportDataFilesRequest.php new file mode 100644 index 000000000000..658157f3a3f3 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListImportDataFilesRequest.php @@ -0,0 +1,241 @@ +google.cloud.migrationcenter.v1.ListImportDataFilesRequest + */ +class ListImportDataFilesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the parent of the `ImportDataFiles` resource. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of data files to return. The service may return + * fewer than this value. If unspecified, at most 500 data files will be + * returned. The maximum value is 1000; values above 1000 will be coerced to + * 1000. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A page token, received from a previous `ListImportDataFiles` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListImportDataFiles` + * must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * Filtering results. + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + /** + * Field to sort by. See https://google.aip.dev/132#ordering for more details. + * + * Generated from protobuf field string order_by = 5; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. Name of the parent of the `ImportDataFiles` resource. Please see + * {@see MigrationCenterClient::importJobName()} for help formatting this field. + * + * @return \Google\Cloud\MigrationCenter\V1\ListImportDataFilesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Name of the parent of the `ImportDataFiles` resource. + * @type int $page_size + * The maximum number of data files to return. The service may return + * fewer than this value. If unspecified, at most 500 data files will be + * returned. The maximum value is 1000; values above 1000 will be coerced to + * 1000. + * @type string $page_token + * A page token, received from a previous `ListImportDataFiles` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListImportDataFiles` + * must match the call that provided the page token. + * @type string $filter + * Filtering results. + * @type string $order_by + * Field to sort by. See https://google.aip.dev/132#ordering for more details. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the parent of the `ImportDataFiles` resource. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Name of the parent of the `ImportDataFiles` resource. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The maximum number of data files to return. The service may return + * fewer than this value. If unspecified, at most 500 data files will be + * returned. The maximum value is 1000; values above 1000 will be coerced to + * 1000. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of data files to return. The service may return + * fewer than this value. If unspecified, at most 500 data files will be + * returned. The maximum value is 1000; values above 1000 will be coerced to + * 1000. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A page token, received from a previous `ListImportDataFiles` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListImportDataFiles` + * must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A page token, received from a previous `ListImportDataFiles` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListImportDataFiles` + * must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Filtering results. + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Filtering results. + * + * Generated from protobuf field string filter = 4; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Field to sort by. See https://google.aip.dev/132#ordering for more details. + * + * Generated from protobuf field string order_by = 5; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Field to sort by. See https://google.aip.dev/132#ordering for more details. + * + * Generated from protobuf field string order_by = 5; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListImportDataFilesResponse.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListImportDataFilesResponse.php new file mode 100644 index 000000000000..47bdd308d3e4 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListImportDataFilesResponse.php @@ -0,0 +1,139 @@ +google.cloud.migrationcenter.v1.ListImportDataFilesResponse + */ +class ListImportDataFilesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of import data files. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ImportDataFile import_data_files = 1; + */ + private $import_data_files; + /** + * A token that can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\MigrationCenter\V1\ImportDataFile>|\Google\Protobuf\Internal\RepeatedField $import_data_files + * The list of import data files. + * @type string $next_page_token + * A token that can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * The list of import data files. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ImportDataFile import_data_files = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getImportDataFiles() + { + return $this->import_data_files; + } + + /** + * The list of import data files. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ImportDataFile import_data_files = 1; + * @param array<\Google\Cloud\MigrationCenter\V1\ImportDataFile>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setImportDataFiles($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\ImportDataFile::class); + $this->import_data_files = $arr; + + return $this; + } + + /** + * A token that can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token that can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListImportJobsRequest.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListImportJobsRequest.php new file mode 100644 index 000000000000..8dd59bea8a89 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListImportJobsRequest.php @@ -0,0 +1,259 @@ +google.cloud.migrationcenter.v1.ListImportJobsRequest + */ +class ListImportJobsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Parent value for `ListImportJobsRequest`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * Filtering results. + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + /** + * Field to sort by. See https://google.aip.dev/132#ordering for more details. + * + * Generated from protobuf field string order_by = 5; + */ + protected $order_by = ''; + /** + * Optional. The level of details of each import job. + * Default value is BASIC. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ImportJobView view = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $view = 0; + + /** + * @param string $parent Required. Parent value for `ListImportJobsRequest`. Please see + * {@see MigrationCenterClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\MigrationCenter\V1\ListImportJobsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Parent value for `ListImportJobsRequest`. + * @type int $page_size + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * @type string $page_token + * A token identifying a page of results the server should return. + * @type string $filter + * Filtering results. + * @type string $order_by + * Field to sort by. See https://google.aip.dev/132#ordering for more details. + * @type int $view + * Optional. The level of details of each import job. + * Default value is BASIC. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Required. Parent value for `ListImportJobsRequest`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Parent value for `ListImportJobsRequest`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Filtering results. + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Filtering results. + * + * Generated from protobuf field string filter = 4; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Field to sort by. See https://google.aip.dev/132#ordering for more details. + * + * Generated from protobuf field string order_by = 5; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Field to sort by. See https://google.aip.dev/132#ordering for more details. + * + * Generated from protobuf field string order_by = 5; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + + /** + * Optional. The level of details of each import job. + * Default value is BASIC. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ImportJobView view = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getView() + { + return $this->view; + } + + /** + * Optional. The level of details of each import job. + * Default value is BASIC. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ImportJobView view = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setView($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\MigrationCenter\V1\ImportJobView::class); + $this->view = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListImportJobsResponse.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListImportJobsResponse.php new file mode 100644 index 000000000000..42c57493d293 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListImportJobsResponse.php @@ -0,0 +1,135 @@ +google.cloud.migrationcenter.v1.ListImportJobsResponse + */ +class ListImportJobsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of import jobs. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ImportJob import_jobs = 1; + */ + private $import_jobs; + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\MigrationCenter\V1\ImportJob>|\Google\Protobuf\Internal\RepeatedField $import_jobs + * The list of import jobs. + * @type string $next_page_token + * A token identifying a page of results the server should return. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * The list of import jobs. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ImportJob import_jobs = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getImportJobs() + { + return $this->import_jobs; + } + + /** + * The list of import jobs. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ImportJob import_jobs = 1; + * @param array<\Google\Cloud\MigrationCenter\V1\ImportJob>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setImportJobs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\ImportJob::class); + $this->import_jobs = $arr; + + return $this; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListPreferenceSetsRequest.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListPreferenceSetsRequest.php new file mode 100644 index 000000000000..9a4713babe01 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListPreferenceSetsRequest.php @@ -0,0 +1,191 @@ +google.cloud.migrationcenter.v1.ListPreferenceSetsRequest + */ +class ListPreferenceSetsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Parent value for `ListPreferenceSetsRequest`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, at most 500 preference sets will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * Field to sort by. See https://google.aip.dev/132#ordering for more details. + * + * Generated from protobuf field string order_by = 5; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. Parent value for `ListPreferenceSetsRequest`. Please see + * {@see MigrationCenterClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\MigrationCenter\V1\ListPreferenceSetsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Parent value for `ListPreferenceSetsRequest`. + * @type int $page_size + * Requested page size. Server may return fewer items than requested. + * If unspecified, at most 500 preference sets will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * @type string $page_token + * A token identifying a page of results the server should return. + * @type string $order_by + * Field to sort by. See https://google.aip.dev/132#ordering for more details. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Required. Parent value for `ListPreferenceSetsRequest`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Parent value for `ListPreferenceSetsRequest`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, at most 500 preference sets will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, at most 500 preference sets will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Field to sort by. See https://google.aip.dev/132#ordering for more details. + * + * Generated from protobuf field string order_by = 5; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Field to sort by. See https://google.aip.dev/132#ordering for more details. + * + * Generated from protobuf field string order_by = 5; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListPreferenceSetsResponse.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListPreferenceSetsResponse.php new file mode 100644 index 000000000000..9066e61fbad0 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListPreferenceSetsResponse.php @@ -0,0 +1,135 @@ +google.cloud.migrationcenter.v1.ListPreferenceSetsResponse + */ +class ListPreferenceSetsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of PreferenceSets + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.PreferenceSet preference_sets = 1; + */ + private $preference_sets; + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\MigrationCenter\V1\PreferenceSet>|\Google\Protobuf\Internal\RepeatedField $preference_sets + * The list of PreferenceSets + * @type string $next_page_token + * A token identifying a page of results the server should return. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * The list of PreferenceSets + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.PreferenceSet preference_sets = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPreferenceSets() + { + return $this->preference_sets; + } + + /** + * The list of PreferenceSets + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.PreferenceSet preference_sets = 1; + * @param array<\Google\Cloud\MigrationCenter\V1\PreferenceSet>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPreferenceSets($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\PreferenceSet::class); + $this->preference_sets = $arr; + + return $this; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListReportConfigsRequest.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListReportConfigsRequest.php new file mode 100644 index 000000000000..f0736d1ae9fa --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListReportConfigsRequest.php @@ -0,0 +1,221 @@ +google.cloud.migrationcenter.v1.ListReportConfigsRequest + */ +class ListReportConfigsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Parent value for `ListReportConfigsRequest`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * Filtering results. + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + /** + * Field to sort by. See https://google.aip.dev/132#ordering for more details. + * + * Generated from protobuf field string order_by = 5; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. Parent value for `ListReportConfigsRequest`. Please see + * {@see MigrationCenterClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\MigrationCenter\V1\ListReportConfigsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Parent value for `ListReportConfigsRequest`. + * @type int $page_size + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * @type string $page_token + * A token identifying a page of results the server should return. + * @type string $filter + * Filtering results. + * @type string $order_by + * Field to sort by. See https://google.aip.dev/132#ordering for more details. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Required. Parent value for `ListReportConfigsRequest`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Parent value for `ListReportConfigsRequest`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Filtering results. + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Filtering results. + * + * Generated from protobuf field string filter = 4; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Field to sort by. See https://google.aip.dev/132#ordering for more details. + * + * Generated from protobuf field string order_by = 5; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Field to sort by. See https://google.aip.dev/132#ordering for more details. + * + * Generated from protobuf field string order_by = 5; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListReportConfigsResponse.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListReportConfigsResponse.php new file mode 100644 index 000000000000..262c7dfa22bd --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListReportConfigsResponse.php @@ -0,0 +1,135 @@ +google.cloud.migrationcenter.v1.ListReportConfigsResponse + */ +class ListReportConfigsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of report configs. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ReportConfig report_configs = 1; + */ + private $report_configs; + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\MigrationCenter\V1\ReportConfig>|\Google\Protobuf\Internal\RepeatedField $report_configs + * A list of report configs. + * @type string $next_page_token + * A token identifying a page of results the server should return. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * A list of report configs. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ReportConfig report_configs = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getReportConfigs() + { + return $this->report_configs; + } + + /** + * A list of report configs. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ReportConfig report_configs = 1; + * @param array<\Google\Cloud\MigrationCenter\V1\ReportConfig>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setReportConfigs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\ReportConfig::class); + $this->report_configs = $arr; + + return $this; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListReportsRequest.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListReportsRequest.php new file mode 100644 index 000000000000..85c5b136e30b --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListReportsRequest.php @@ -0,0 +1,255 @@ +google.cloud.migrationcenter.v1.ListReportsRequest + */ +class ListReportsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Parent value for `ListReportsRequest`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Requested page size. The server may return fewer items than requested. + * If unspecified, the server will pick an appropriate default value. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A token identifying a page of results that the server should return. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * Filtering results. + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + /** + * Field to sort by. See https://google.aip.dev/132#ordering for more details. + * + * Generated from protobuf field string order_by = 5; + */ + protected $order_by = ''; + /** + * Determines what information to retrieve for each Report. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ReportView view = 6; + */ + protected $view = 0; + + /** + * @param string $parent Required. Parent value for `ListReportsRequest`. Please see + * {@see MigrationCenterClient::reportConfigName()} for help formatting this field. + * + * @return \Google\Cloud\MigrationCenter\V1\ListReportsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Parent value for `ListReportsRequest`. + * @type int $page_size + * Requested page size. The server may return fewer items than requested. + * If unspecified, the server will pick an appropriate default value. + * @type string $page_token + * A token identifying a page of results that the server should return. + * @type string $filter + * Filtering results. + * @type string $order_by + * Field to sort by. See https://google.aip.dev/132#ordering for more details. + * @type int $view + * Determines what information to retrieve for each Report. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Required. Parent value for `ListReportsRequest`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Parent value for `ListReportsRequest`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Requested page size. The server may return fewer items than requested. + * If unspecified, the server will pick an appropriate default value. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Requested page size. The server may return fewer items than requested. + * If unspecified, the server will pick an appropriate default value. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A token identifying a page of results that the server should return. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A token identifying a page of results that the server should return. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Filtering results. + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Filtering results. + * + * Generated from protobuf field string filter = 4; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Field to sort by. See https://google.aip.dev/132#ordering for more details. + * + * Generated from protobuf field string order_by = 5; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Field to sort by. See https://google.aip.dev/132#ordering for more details. + * + * Generated from protobuf field string order_by = 5; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + + /** + * Determines what information to retrieve for each Report. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ReportView view = 6; + * @return int + */ + public function getView() + { + return $this->view; + } + + /** + * Determines what information to retrieve for each Report. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ReportView view = 6; + * @param int $var + * @return $this + */ + public function setView($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\MigrationCenter\V1\ReportView::class); + $this->view = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListReportsResponse.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListReportsResponse.php new file mode 100644 index 000000000000..7b0da1132933 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListReportsResponse.php @@ -0,0 +1,135 @@ +google.cloud.migrationcenter.v1.ListReportsResponse + */ +class ListReportsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of Reports. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.Report reports = 1; + */ + private $reports; + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\MigrationCenter\V1\Report>|\Google\Protobuf\Internal\RepeatedField $reports + * The list of Reports. + * @type string $next_page_token + * A token identifying a page of results the server should return. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * The list of Reports. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.Report reports = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getReports() + { + return $this->reports; + } + + /** + * The list of Reports. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.Report reports = 1; + * @param array<\Google\Cloud\MigrationCenter\V1\Report>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setReports($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\Report::class); + $this->reports = $arr; + + return $this; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListSourcesRequest.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListSourcesRequest.php new file mode 100644 index 000000000000..25b0f1dd0ca6 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListSourcesRequest.php @@ -0,0 +1,221 @@ +google.cloud.migrationcenter.v1.ListSourcesRequest + */ +class ListSourcesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Parent value for `ListSourcesRequest`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Requested page size. The server may return fewer items than requested. + * If unspecified, the server will pick an appropriate default value. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A token identifying a page of results that the server should return. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * Filtering results. + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + /** + * Field to sort by. See https://google.aip.dev/132#ordering for more details. + * + * Generated from protobuf field string order_by = 5; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. Parent value for `ListSourcesRequest`. Please see + * {@see MigrationCenterClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\MigrationCenter\V1\ListSourcesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Parent value for `ListSourcesRequest`. + * @type int $page_size + * Requested page size. The server may return fewer items than requested. + * If unspecified, the server will pick an appropriate default value. + * @type string $page_token + * A token identifying a page of results that the server should return. + * @type string $filter + * Filtering results. + * @type string $order_by + * Field to sort by. See https://google.aip.dev/132#ordering for more details. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Required. Parent value for `ListSourcesRequest`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Parent value for `ListSourcesRequest`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Requested page size. The server may return fewer items than requested. + * If unspecified, the server will pick an appropriate default value. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Requested page size. The server may return fewer items than requested. + * If unspecified, the server will pick an appropriate default value. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A token identifying a page of results that the server should return. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A token identifying a page of results that the server should return. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Filtering results. + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Filtering results. + * + * Generated from protobuf field string filter = 4; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Field to sort by. See https://google.aip.dev/132#ordering for more details. + * + * Generated from protobuf field string order_by = 5; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Field to sort by. See https://google.aip.dev/132#ordering for more details. + * + * Generated from protobuf field string order_by = 5; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListSourcesResponse.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListSourcesResponse.php new file mode 100644 index 000000000000..1e4b1dbaaff8 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListSourcesResponse.php @@ -0,0 +1,135 @@ +google.cloud.migrationcenter.v1.ListSourcesResponse + */ +class ListSourcesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of sources. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.Source sources = 1; + */ + private $sources; + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\MigrationCenter\V1\Source>|\Google\Protobuf\Internal\RepeatedField $sources + * The list of sources. + * @type string $next_page_token + * A token identifying a page of results the server should return. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * The list of sources. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.Source sources = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSources() + { + return $this->sources; + } + + /** + * The list of sources. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.Source sources = 1; + * @param array<\Google\Cloud\MigrationCenter\V1\Source>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSources($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\Source::class); + $this->sources = $arr; + + return $this; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/MachineArchitectureDetails.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/MachineArchitectureDetails.php new file mode 100644 index 000000000000..45790ac59bd9 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/MachineArchitectureDetails.php @@ -0,0 +1,315 @@ +google.cloud.migrationcenter.v1.MachineArchitectureDetails + */ +class MachineArchitectureDetails extends \Google\Protobuf\Internal\Message +{ + /** + * CPU architecture, e.g., "x64-based PC", "x86_64", "i686" etc. + * + * Generated from protobuf field string cpu_architecture = 1; + */ + protected $cpu_architecture = ''; + /** + * CPU name, e.g., "Intel Xeon E5-2690", "AMD EPYC 7571" etc. + * + * Generated from protobuf field string cpu_name = 2; + */ + protected $cpu_name = ''; + /** + * Hardware vendor. + * + * Generated from protobuf field string vendor = 3; + */ + protected $vendor = ''; + /** + * Number of CPU threads allocated to the machine. + * + * Generated from protobuf field int32 cpu_thread_count = 4; + */ + protected $cpu_thread_count = 0; + /** + * Number of processor sockets allocated to the machine. + * + * Generated from protobuf field int32 cpu_socket_count = 5; + */ + protected $cpu_socket_count = 0; + /** + * BIOS Details. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.BiosDetails bios = 6; + */ + protected $bios = null; + /** + * Firmware type. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.MachineArchitectureDetails.FirmwareType firmware_type = 7; + */ + protected $firmware_type = 0; + /** + * CPU hyper-threading support. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.MachineArchitectureDetails.CpuHyperThreading hyperthreading = 8; + */ + protected $hyperthreading = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $cpu_architecture + * CPU architecture, e.g., "x64-based PC", "x86_64", "i686" etc. + * @type string $cpu_name + * CPU name, e.g., "Intel Xeon E5-2690", "AMD EPYC 7571" etc. + * @type string $vendor + * Hardware vendor. + * @type int $cpu_thread_count + * Number of CPU threads allocated to the machine. + * @type int $cpu_socket_count + * Number of processor sockets allocated to the machine. + * @type \Google\Cloud\MigrationCenter\V1\BiosDetails $bios + * BIOS Details. + * @type int $firmware_type + * Firmware type. + * @type int $hyperthreading + * CPU hyper-threading support. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * CPU architecture, e.g., "x64-based PC", "x86_64", "i686" etc. + * + * Generated from protobuf field string cpu_architecture = 1; + * @return string + */ + public function getCpuArchitecture() + { + return $this->cpu_architecture; + } + + /** + * CPU architecture, e.g., "x64-based PC", "x86_64", "i686" etc. + * + * Generated from protobuf field string cpu_architecture = 1; + * @param string $var + * @return $this + */ + public function setCpuArchitecture($var) + { + GPBUtil::checkString($var, True); + $this->cpu_architecture = $var; + + return $this; + } + + /** + * CPU name, e.g., "Intel Xeon E5-2690", "AMD EPYC 7571" etc. + * + * Generated from protobuf field string cpu_name = 2; + * @return string + */ + public function getCpuName() + { + return $this->cpu_name; + } + + /** + * CPU name, e.g., "Intel Xeon E5-2690", "AMD EPYC 7571" etc. + * + * Generated from protobuf field string cpu_name = 2; + * @param string $var + * @return $this + */ + public function setCpuName($var) + { + GPBUtil::checkString($var, True); + $this->cpu_name = $var; + + return $this; + } + + /** + * Hardware vendor. + * + * Generated from protobuf field string vendor = 3; + * @return string + */ + public function getVendor() + { + return $this->vendor; + } + + /** + * Hardware vendor. + * + * Generated from protobuf field string vendor = 3; + * @param string $var + * @return $this + */ + public function setVendor($var) + { + GPBUtil::checkString($var, True); + $this->vendor = $var; + + return $this; + } + + /** + * Number of CPU threads allocated to the machine. + * + * Generated from protobuf field int32 cpu_thread_count = 4; + * @return int + */ + public function getCpuThreadCount() + { + return $this->cpu_thread_count; + } + + /** + * Number of CPU threads allocated to the machine. + * + * Generated from protobuf field int32 cpu_thread_count = 4; + * @param int $var + * @return $this + */ + public function setCpuThreadCount($var) + { + GPBUtil::checkInt32($var); + $this->cpu_thread_count = $var; + + return $this; + } + + /** + * Number of processor sockets allocated to the machine. + * + * Generated from protobuf field int32 cpu_socket_count = 5; + * @return int + */ + public function getCpuSocketCount() + { + return $this->cpu_socket_count; + } + + /** + * Number of processor sockets allocated to the machine. + * + * Generated from protobuf field int32 cpu_socket_count = 5; + * @param int $var + * @return $this + */ + public function setCpuSocketCount($var) + { + GPBUtil::checkInt32($var); + $this->cpu_socket_count = $var; + + return $this; + } + + /** + * BIOS Details. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.BiosDetails bios = 6; + * @return \Google\Cloud\MigrationCenter\V1\BiosDetails|null + */ + public function getBios() + { + return $this->bios; + } + + public function hasBios() + { + return isset($this->bios); + } + + public function clearBios() + { + unset($this->bios); + } + + /** + * BIOS Details. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.BiosDetails bios = 6; + * @param \Google\Cloud\MigrationCenter\V1\BiosDetails $var + * @return $this + */ + public function setBios($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\BiosDetails::class); + $this->bios = $var; + + return $this; + } + + /** + * Firmware type. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.MachineArchitectureDetails.FirmwareType firmware_type = 7; + * @return int + */ + public function getFirmwareType() + { + return $this->firmware_type; + } + + /** + * Firmware type. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.MachineArchitectureDetails.FirmwareType firmware_type = 7; + * @param int $var + * @return $this + */ + public function setFirmwareType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\MigrationCenter\V1\MachineArchitectureDetails\FirmwareType::class); + $this->firmware_type = $var; + + return $this; + } + + /** + * CPU hyper-threading support. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.MachineArchitectureDetails.CpuHyperThreading hyperthreading = 8; + * @return int + */ + public function getHyperthreading() + { + return $this->hyperthreading; + } + + /** + * CPU hyper-threading support. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.MachineArchitectureDetails.CpuHyperThreading hyperthreading = 8; + * @param int $var + * @return $this + */ + public function setHyperthreading($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\MigrationCenter\V1\MachineArchitectureDetails\CpuHyperThreading::class); + $this->hyperthreading = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/MachineArchitectureDetails/CpuHyperThreading.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/MachineArchitectureDetails/CpuHyperThreading.php new file mode 100644 index 000000000000..85eefa303885 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/MachineArchitectureDetails/CpuHyperThreading.php @@ -0,0 +1,64 @@ +google.cloud.migrationcenter.v1.MachineArchitectureDetails.CpuHyperThreading + */ +class CpuHyperThreading +{ + /** + * Unspecified or unknown. + * + * Generated from protobuf enum CPU_HYPER_THREADING_UNSPECIFIED = 0; + */ + const CPU_HYPER_THREADING_UNSPECIFIED = 0; + /** + * Hyper-threading is disabled. + * + * Generated from protobuf enum DISABLED = 1; + */ + const DISABLED = 1; + /** + * Hyper-threading is enabled. + * + * Generated from protobuf enum ENABLED = 2; + */ + const ENABLED = 2; + + private static $valueToName = [ + self::CPU_HYPER_THREADING_UNSPECIFIED => 'CPU_HYPER_THREADING_UNSPECIFIED', + self::DISABLED => 'DISABLED', + self::ENABLED => 'ENABLED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(CpuHyperThreading::class, \Google\Cloud\MigrationCenter\V1\MachineArchitectureDetails_CpuHyperThreading::class); + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/MachineArchitectureDetails/FirmwareType.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/MachineArchitectureDetails/FirmwareType.php new file mode 100644 index 000000000000..2323225f79b3 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/MachineArchitectureDetails/FirmwareType.php @@ -0,0 +1,64 @@ +google.cloud.migrationcenter.v1.MachineArchitectureDetails.FirmwareType + */ +class FirmwareType +{ + /** + * Unspecified or unknown. + * + * Generated from protobuf enum FIRMWARE_TYPE_UNSPECIFIED = 0; + */ + const FIRMWARE_TYPE_UNSPECIFIED = 0; + /** + * BIOS firmware. + * + * Generated from protobuf enum BIOS = 1; + */ + const BIOS = 1; + /** + * EFI firmware. + * + * Generated from protobuf enum EFI = 2; + */ + const EFI = 2; + + private static $valueToName = [ + self::FIRMWARE_TYPE_UNSPECIFIED => 'FIRMWARE_TYPE_UNSPECIFIED', + self::BIOS => 'BIOS', + self::EFI => 'EFI', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(FirmwareType::class, \Google\Cloud\MigrationCenter\V1\MachineArchitectureDetails_FirmwareType::class); + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/MachineDetails.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/MachineDetails.php new file mode 100644 index 000000000000..00a127cedaca --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/MachineDetails.php @@ -0,0 +1,467 @@ +google.cloud.migrationcenter.v1.MachineDetails + */ +class MachineDetails extends \Google\Protobuf\Internal\Message +{ + /** + * Machine unique identifier. + * + * Generated from protobuf field string uuid = 1; + */ + protected $uuid = ''; + /** + * Machine name. + * + * Generated from protobuf field string machine_name = 2; + */ + protected $machine_name = ''; + /** + * Machine creation time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; + */ + protected $create_time = null; + /** + * Number of CPU cores in the machine. Must be non-negative. + * + * Generated from protobuf field int32 core_count = 4; + */ + protected $core_count = 0; + /** + * The amount of memory in the machine. Must be non-negative. + * + * Generated from protobuf field int32 memory_mb = 5; + */ + protected $memory_mb = 0; + /** + * Power state of the machine. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.MachineDetails.PowerState power_state = 6; + */ + protected $power_state = 0; + /** + * Architecture details (vendor, CPU architecture). + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.MachineArchitectureDetails architecture = 7; + */ + protected $architecture = null; + /** + * Guest OS information. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.GuestOsDetails guest_os = 8; + */ + protected $guest_os = null; + /** + * Network details. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.MachineNetworkDetails network = 9; + */ + protected $network = null; + /** + * Disk details. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.MachineDiskDetails disks = 10; + */ + protected $disks = null; + /** + * Platform specific information. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.PlatformDetails platform = 11; + */ + protected $platform = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $uuid + * Machine unique identifier. + * @type string $machine_name + * Machine name. + * @type \Google\Protobuf\Timestamp $create_time + * Machine creation time. + * @type int $core_count + * Number of CPU cores in the machine. Must be non-negative. + * @type int $memory_mb + * The amount of memory in the machine. Must be non-negative. + * @type int $power_state + * Power state of the machine. + * @type \Google\Cloud\MigrationCenter\V1\MachineArchitectureDetails $architecture + * Architecture details (vendor, CPU architecture). + * @type \Google\Cloud\MigrationCenter\V1\GuestOsDetails $guest_os + * Guest OS information. + * @type \Google\Cloud\MigrationCenter\V1\MachineNetworkDetails $network + * Network details. + * @type \Google\Cloud\MigrationCenter\V1\MachineDiskDetails $disks + * Disk details. + * @type \Google\Cloud\MigrationCenter\V1\PlatformDetails $platform + * Platform specific information. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Machine unique identifier. + * + * Generated from protobuf field string uuid = 1; + * @return string + */ + public function getUuid() + { + return $this->uuid; + } + + /** + * Machine unique identifier. + * + * Generated from protobuf field string uuid = 1; + * @param string $var + * @return $this + */ + public function setUuid($var) + { + GPBUtil::checkString($var, True); + $this->uuid = $var; + + return $this; + } + + /** + * Machine name. + * + * Generated from protobuf field string machine_name = 2; + * @return string + */ + public function getMachineName() + { + return $this->machine_name; + } + + /** + * Machine name. + * + * Generated from protobuf field string machine_name = 2; + * @param string $var + * @return $this + */ + public function setMachineName($var) + { + GPBUtil::checkString($var, True); + $this->machine_name = $var; + + return $this; + } + + /** + * Machine creation time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Machine creation time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Number of CPU cores in the machine. Must be non-negative. + * + * Generated from protobuf field int32 core_count = 4; + * @return int + */ + public function getCoreCount() + { + return $this->core_count; + } + + /** + * Number of CPU cores in the machine. Must be non-negative. + * + * Generated from protobuf field int32 core_count = 4; + * @param int $var + * @return $this + */ + public function setCoreCount($var) + { + GPBUtil::checkInt32($var); + $this->core_count = $var; + + return $this; + } + + /** + * The amount of memory in the machine. Must be non-negative. + * + * Generated from protobuf field int32 memory_mb = 5; + * @return int + */ + public function getMemoryMb() + { + return $this->memory_mb; + } + + /** + * The amount of memory in the machine. Must be non-negative. + * + * Generated from protobuf field int32 memory_mb = 5; + * @param int $var + * @return $this + */ + public function setMemoryMb($var) + { + GPBUtil::checkInt32($var); + $this->memory_mb = $var; + + return $this; + } + + /** + * Power state of the machine. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.MachineDetails.PowerState power_state = 6; + * @return int + */ + public function getPowerState() + { + return $this->power_state; + } + + /** + * Power state of the machine. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.MachineDetails.PowerState power_state = 6; + * @param int $var + * @return $this + */ + public function setPowerState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\MigrationCenter\V1\MachineDetails\PowerState::class); + $this->power_state = $var; + + return $this; + } + + /** + * Architecture details (vendor, CPU architecture). + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.MachineArchitectureDetails architecture = 7; + * @return \Google\Cloud\MigrationCenter\V1\MachineArchitectureDetails|null + */ + public function getArchitecture() + { + return $this->architecture; + } + + public function hasArchitecture() + { + return isset($this->architecture); + } + + public function clearArchitecture() + { + unset($this->architecture); + } + + /** + * Architecture details (vendor, CPU architecture). + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.MachineArchitectureDetails architecture = 7; + * @param \Google\Cloud\MigrationCenter\V1\MachineArchitectureDetails $var + * @return $this + */ + public function setArchitecture($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\MachineArchitectureDetails::class); + $this->architecture = $var; + + return $this; + } + + /** + * Guest OS information. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.GuestOsDetails guest_os = 8; + * @return \Google\Cloud\MigrationCenter\V1\GuestOsDetails|null + */ + public function getGuestOs() + { + return $this->guest_os; + } + + public function hasGuestOs() + { + return isset($this->guest_os); + } + + public function clearGuestOs() + { + unset($this->guest_os); + } + + /** + * Guest OS information. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.GuestOsDetails guest_os = 8; + * @param \Google\Cloud\MigrationCenter\V1\GuestOsDetails $var + * @return $this + */ + public function setGuestOs($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\GuestOsDetails::class); + $this->guest_os = $var; + + return $this; + } + + /** + * Network details. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.MachineNetworkDetails network = 9; + * @return \Google\Cloud\MigrationCenter\V1\MachineNetworkDetails|null + */ + public function getNetwork() + { + return $this->network; + } + + public function hasNetwork() + { + return isset($this->network); + } + + public function clearNetwork() + { + unset($this->network); + } + + /** + * Network details. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.MachineNetworkDetails network = 9; + * @param \Google\Cloud\MigrationCenter\V1\MachineNetworkDetails $var + * @return $this + */ + public function setNetwork($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\MachineNetworkDetails::class); + $this->network = $var; + + return $this; + } + + /** + * Disk details. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.MachineDiskDetails disks = 10; + * @return \Google\Cloud\MigrationCenter\V1\MachineDiskDetails|null + */ + public function getDisks() + { + return $this->disks; + } + + public function hasDisks() + { + return isset($this->disks); + } + + public function clearDisks() + { + unset($this->disks); + } + + /** + * Disk details. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.MachineDiskDetails disks = 10; + * @param \Google\Cloud\MigrationCenter\V1\MachineDiskDetails $var + * @return $this + */ + public function setDisks($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\MachineDiskDetails::class); + $this->disks = $var; + + return $this; + } + + /** + * Platform specific information. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.PlatformDetails platform = 11; + * @return \Google\Cloud\MigrationCenter\V1\PlatformDetails|null + */ + public function getPlatform() + { + return $this->platform; + } + + public function hasPlatform() + { + return isset($this->platform); + } + + public function clearPlatform() + { + unset($this->platform); + } + + /** + * Platform specific information. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.PlatformDetails platform = 11; + * @param \Google\Cloud\MigrationCenter\V1\PlatformDetails $var + * @return $this + */ + public function setPlatform($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\PlatformDetails::class); + $this->platform = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/MachineDetails/PowerState.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/MachineDetails/PowerState.php new file mode 100644 index 000000000000..21dad929d6af --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/MachineDetails/PowerState.php @@ -0,0 +1,94 @@ +google.cloud.migrationcenter.v1.MachineDetails.PowerState + */ +class PowerState +{ + /** + * Power state is unknown. + * + * Generated from protobuf enum POWER_STATE_UNSPECIFIED = 0; + */ + const POWER_STATE_UNSPECIFIED = 0; + /** + * The machine is preparing to enter the ACTIVE state. An instance may enter + * the PENDING state when it launches for the first time, or when it is + * started after being in the SUSPENDED state. + * + * Generated from protobuf enum PENDING = 1; + */ + const PENDING = 1; + /** + * The machine is active. + * + * Generated from protobuf enum ACTIVE = 2; + */ + const ACTIVE = 2; + /** + * The machine is being turned off. + * + * Generated from protobuf enum SUSPENDING = 3; + */ + const SUSPENDING = 3; + /** + * The machine is off. + * + * Generated from protobuf enum SUSPENDED = 4; + */ + const SUSPENDED = 4; + /** + * The machine is being deleted from the hosting platform. + * + * Generated from protobuf enum DELETING = 5; + */ + const DELETING = 5; + /** + * The machine is deleted from the hosting platform. + * + * Generated from protobuf enum DELETED = 6; + */ + const DELETED = 6; + + private static $valueToName = [ + self::POWER_STATE_UNSPECIFIED => 'POWER_STATE_UNSPECIFIED', + self::PENDING => 'PENDING', + self::ACTIVE => 'ACTIVE', + self::SUSPENDING => 'SUSPENDING', + self::SUSPENDED => 'SUSPENDED', + self::DELETING => 'DELETING', + self::DELETED => 'DELETED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(PowerState::class, \Google\Cloud\MigrationCenter\V1\MachineDetails_PowerState::class); + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/MachineDiskDetails.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/MachineDiskDetails.php new file mode 100644 index 000000000000..968285069a4b --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/MachineDiskDetails.php @@ -0,0 +1,145 @@ +google.cloud.migrationcenter.v1.MachineDiskDetails + */ +class MachineDiskDetails extends \Google\Protobuf\Internal\Message +{ + /** + * Disk total Capacity. + * + * Generated from protobuf field int64 total_capacity_bytes = 1; + */ + protected $total_capacity_bytes = 0; + /** + * Total disk free space. + * + * Generated from protobuf field int64 total_free_bytes = 2; + */ + protected $total_free_bytes = 0; + /** + * List of disks. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.DiskEntryList disks = 3; + */ + protected $disks = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $total_capacity_bytes + * Disk total Capacity. + * @type int|string $total_free_bytes + * Total disk free space. + * @type \Google\Cloud\MigrationCenter\V1\DiskEntryList $disks + * List of disks. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Disk total Capacity. + * + * Generated from protobuf field int64 total_capacity_bytes = 1; + * @return int|string + */ + public function getTotalCapacityBytes() + { + return $this->total_capacity_bytes; + } + + /** + * Disk total Capacity. + * + * Generated from protobuf field int64 total_capacity_bytes = 1; + * @param int|string $var + * @return $this + */ + public function setTotalCapacityBytes($var) + { + GPBUtil::checkInt64($var); + $this->total_capacity_bytes = $var; + + return $this; + } + + /** + * Total disk free space. + * + * Generated from protobuf field int64 total_free_bytes = 2; + * @return int|string + */ + public function getTotalFreeBytes() + { + return $this->total_free_bytes; + } + + /** + * Total disk free space. + * + * Generated from protobuf field int64 total_free_bytes = 2; + * @param int|string $var + * @return $this + */ + public function setTotalFreeBytes($var) + { + GPBUtil::checkInt64($var); + $this->total_free_bytes = $var; + + return $this; + } + + /** + * List of disks. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.DiskEntryList disks = 3; + * @return \Google\Cloud\MigrationCenter\V1\DiskEntryList|null + */ + public function getDisks() + { + return $this->disks; + } + + public function hasDisks() + { + return isset($this->disks); + } + + public function clearDisks() + { + unset($this->disks); + } + + /** + * List of disks. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.DiskEntryList disks = 3; + * @param \Google\Cloud\MigrationCenter\V1\DiskEntryList $var + * @return $this + */ + public function setDisks($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\DiskEntryList::class); + $this->disks = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/MachineNetworkDetails.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/MachineNetworkDetails.php new file mode 100644 index 000000000000..9949793b9975 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/MachineNetworkDetails.php @@ -0,0 +1,183 @@ +google.cloud.migrationcenter.v1.MachineNetworkDetails + */ +class MachineNetworkDetails extends \Google\Protobuf\Internal\Message +{ + /** + * The primary IP address of the machine. + * + * Generated from protobuf field string primary_ip_address = 1; + */ + protected $primary_ip_address = ''; + /** + * The public IP address of the machine. + * + * Generated from protobuf field string public_ip_address = 2; + */ + protected $public_ip_address = ''; + /** + * MAC address of the machine. + * This property is used to uniqly identify the machine. + * + * Generated from protobuf field string primary_mac_address = 3; + */ + protected $primary_mac_address = ''; + /** + * List of network adapters. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.NetworkAdapterList adapters = 4; + */ + protected $adapters = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $primary_ip_address + * The primary IP address of the machine. + * @type string $public_ip_address + * The public IP address of the machine. + * @type string $primary_mac_address + * MAC address of the machine. + * This property is used to uniqly identify the machine. + * @type \Google\Cloud\MigrationCenter\V1\NetworkAdapterList $adapters + * List of network adapters. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * The primary IP address of the machine. + * + * Generated from protobuf field string primary_ip_address = 1; + * @return string + */ + public function getPrimaryIpAddress() + { + return $this->primary_ip_address; + } + + /** + * The primary IP address of the machine. + * + * Generated from protobuf field string primary_ip_address = 1; + * @param string $var + * @return $this + */ + public function setPrimaryIpAddress($var) + { + GPBUtil::checkString($var, True); + $this->primary_ip_address = $var; + + return $this; + } + + /** + * The public IP address of the machine. + * + * Generated from protobuf field string public_ip_address = 2; + * @return string + */ + public function getPublicIpAddress() + { + return $this->public_ip_address; + } + + /** + * The public IP address of the machine. + * + * Generated from protobuf field string public_ip_address = 2; + * @param string $var + * @return $this + */ + public function setPublicIpAddress($var) + { + GPBUtil::checkString($var, True); + $this->public_ip_address = $var; + + return $this; + } + + /** + * MAC address of the machine. + * This property is used to uniqly identify the machine. + * + * Generated from protobuf field string primary_mac_address = 3; + * @return string + */ + public function getPrimaryMacAddress() + { + return $this->primary_mac_address; + } + + /** + * MAC address of the machine. + * This property is used to uniqly identify the machine. + * + * Generated from protobuf field string primary_mac_address = 3; + * @param string $var + * @return $this + */ + public function setPrimaryMacAddress($var) + { + GPBUtil::checkString($var, True); + $this->primary_mac_address = $var; + + return $this; + } + + /** + * List of network adapters. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.NetworkAdapterList adapters = 4; + * @return \Google\Cloud\MigrationCenter\V1\NetworkAdapterList|null + */ + public function getAdapters() + { + return $this->adapters; + } + + public function hasAdapters() + { + return isset($this->adapters); + } + + public function clearAdapters() + { + unset($this->adapters); + } + + /** + * List of network adapters. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.NetworkAdapterList adapters = 4; + * @param \Google\Cloud\MigrationCenter\V1\NetworkAdapterList $var + * @return $this + */ + public function setAdapters($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\NetworkAdapterList::class); + $this->adapters = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/MachinePreferences.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/MachinePreferences.php new file mode 100644 index 000000000000..98a819f472b9 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/MachinePreferences.php @@ -0,0 +1,73 @@ +google.cloud.migrationcenter.v1.MachinePreferences + */ +class MachinePreferences extends \Google\Protobuf\Internal\Message +{ + /** + * Compute Engine machine series to consider for insights and recommendations. + * If empty, no restriction is applied on the machine series. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.MachineSeries allowed_machine_series = 1; + */ + private $allowed_machine_series; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\MigrationCenter\V1\MachineSeries>|\Google\Protobuf\Internal\RepeatedField $allowed_machine_series + * Compute Engine machine series to consider for insights and recommendations. + * If empty, no restriction is applied on the machine series. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Compute Engine machine series to consider for insights and recommendations. + * If empty, no restriction is applied on the machine series. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.MachineSeries allowed_machine_series = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAllowedMachineSeries() + { + return $this->allowed_machine_series; + } + + /** + * Compute Engine machine series to consider for insights and recommendations. + * If empty, no restriction is applied on the machine series. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.MachineSeries allowed_machine_series = 1; + * @param array<\Google\Cloud\MigrationCenter\V1\MachineSeries>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAllowedMachineSeries($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\MachineSeries::class); + $this->allowed_machine_series = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/MachineSeries.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/MachineSeries.php new file mode 100644 index 000000000000..eaae31262c65 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/MachineSeries.php @@ -0,0 +1,75 @@ +google.cloud.migrationcenter.v1.MachineSeries + */ +class MachineSeries extends \Google\Protobuf\Internal\Message +{ + /** + * Code to identify a Compute Engine machine series. Consult + * https://cloud.google.com/compute/docs/machine-resource#machine_type_comparison + * for more details on the available series. + * + * Generated from protobuf field string code = 1; + */ + protected $code = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $code + * Code to identify a Compute Engine machine series. Consult + * https://cloud.google.com/compute/docs/machine-resource#machine_type_comparison + * for more details on the available series. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Code to identify a Compute Engine machine series. Consult + * https://cloud.google.com/compute/docs/machine-resource#machine_type_comparison + * for more details on the available series. + * + * Generated from protobuf field string code = 1; + * @return string + */ + public function getCode() + { + return $this->code; + } + + /** + * Code to identify a Compute Engine machine series. Consult + * https://cloud.google.com/compute/docs/machine-resource#machine_type_comparison + * for more details on the available series. + * + * Generated from protobuf field string code = 1; + * @param string $var + * @return $this + */ + public function setCode($var) + { + GPBUtil::checkString($var, True); + $this->code = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/MemoryUsageSample.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/MemoryUsageSample.php new file mode 100644 index 000000000000..4cf93d504334 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/MemoryUsageSample.php @@ -0,0 +1,67 @@ +google.cloud.migrationcenter.v1.MemoryUsageSample + */ +class MemoryUsageSample extends \Google\Protobuf\Internal\Message +{ + /** + * Percentage of system memory utilized. Must be in the interval [0, 100]. + * + * Generated from protobuf field float utilized_percentage = 1; + */ + protected $utilized_percentage = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $utilized_percentage + * Percentage of system memory utilized. Must be in the interval [0, 100]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Percentage of system memory utilized. Must be in the interval [0, 100]. + * + * Generated from protobuf field float utilized_percentage = 1; + * @return float + */ + public function getUtilizedPercentage() + { + return $this->utilized_percentage; + } + + /** + * Percentage of system memory utilized. Must be in the interval [0, 100]. + * + * Generated from protobuf field float utilized_percentage = 1; + * @param float $var + * @return $this + */ + public function setUtilizedPercentage($var) + { + GPBUtil::checkFloat($var); + $this->utilized_percentage = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/MigrationInsight.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/MigrationInsight.php new file mode 100644 index 000000000000..f735aaf003f3 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/MigrationInsight.php @@ -0,0 +1,123 @@ +google.cloud.migrationcenter.v1.MigrationInsight + */ +class MigrationInsight extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Description of how well the asset this insight is associated + * with fits the proposed migration. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.FitDescriptor fit = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $fit = null; + protected $migration_target; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\MigrationCenter\V1\FitDescriptor $fit + * Output only. Description of how well the asset this insight is associated + * with fits the proposed migration. + * @type \Google\Cloud\MigrationCenter\V1\ComputeEngineMigrationTarget $compute_engine_target + * Output only. A Google Compute Engine target. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Description of how well the asset this insight is associated + * with fits the proposed migration. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.FitDescriptor fit = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\MigrationCenter\V1\FitDescriptor|null + */ + public function getFit() + { + return $this->fit; + } + + public function hasFit() + { + return isset($this->fit); + } + + public function clearFit() + { + unset($this->fit); + } + + /** + * Output only. Description of how well the asset this insight is associated + * with fits the proposed migration. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.FitDescriptor fit = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\MigrationCenter\V1\FitDescriptor $var + * @return $this + */ + public function setFit($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\FitDescriptor::class); + $this->fit = $var; + + return $this; + } + + /** + * Output only. A Google Compute Engine target. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ComputeEngineMigrationTarget compute_engine_target = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\MigrationCenter\V1\ComputeEngineMigrationTarget|null + */ + public function getComputeEngineTarget() + { + return $this->readOneof(10); + } + + public function hasComputeEngineTarget() + { + return $this->hasOneof(10); + } + + /** + * Output only. A Google Compute Engine target. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ComputeEngineMigrationTarget compute_engine_target = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\MigrationCenter\V1\ComputeEngineMigrationTarget $var + * @return $this + */ + public function setComputeEngineTarget($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\ComputeEngineMigrationTarget::class); + $this->writeOneof(10, $var); + + return $this; + } + + /** + * @return string + */ + public function getMigrationTarget() + { + return $this->whichOneof("migration_target"); + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/NetworkAdapterDetails.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/NetworkAdapterDetails.php new file mode 100644 index 000000000000..34f3c8168393 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/NetworkAdapterDetails.php @@ -0,0 +1,145 @@ +google.cloud.migrationcenter.v1.NetworkAdapterDetails + */ +class NetworkAdapterDetails extends \Google\Protobuf\Internal\Message +{ + /** + * Network adapter type (e.g. VMXNET3). + * + * Generated from protobuf field string adapter_type = 1; + */ + protected $adapter_type = ''; + /** + * MAC address. + * + * Generated from protobuf field string mac_address = 2; + */ + protected $mac_address = ''; + /** + * NetworkAddressList + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.NetworkAddressList addresses = 3; + */ + protected $addresses = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $adapter_type + * Network adapter type (e.g. VMXNET3). + * @type string $mac_address + * MAC address. + * @type \Google\Cloud\MigrationCenter\V1\NetworkAddressList $addresses + * NetworkAddressList + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Network adapter type (e.g. VMXNET3). + * + * Generated from protobuf field string adapter_type = 1; + * @return string + */ + public function getAdapterType() + { + return $this->adapter_type; + } + + /** + * Network adapter type (e.g. VMXNET3). + * + * Generated from protobuf field string adapter_type = 1; + * @param string $var + * @return $this + */ + public function setAdapterType($var) + { + GPBUtil::checkString($var, True); + $this->adapter_type = $var; + + return $this; + } + + /** + * MAC address. + * + * Generated from protobuf field string mac_address = 2; + * @return string + */ + public function getMacAddress() + { + return $this->mac_address; + } + + /** + * MAC address. + * + * Generated from protobuf field string mac_address = 2; + * @param string $var + * @return $this + */ + public function setMacAddress($var) + { + GPBUtil::checkString($var, True); + $this->mac_address = $var; + + return $this; + } + + /** + * NetworkAddressList + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.NetworkAddressList addresses = 3; + * @return \Google\Cloud\MigrationCenter\V1\NetworkAddressList|null + */ + public function getAddresses() + { + return $this->addresses; + } + + public function hasAddresses() + { + return isset($this->addresses); + } + + public function clearAddresses() + { + unset($this->addresses); + } + + /** + * NetworkAddressList + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.NetworkAddressList addresses = 3; + * @param \Google\Cloud\MigrationCenter\V1\NetworkAddressList $var + * @return $this + */ + public function setAddresses($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\NetworkAddressList::class); + $this->addresses = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/NetworkAdapterList.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/NetworkAdapterList.php new file mode 100644 index 000000000000..a8767ce3a699 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/NetworkAdapterList.php @@ -0,0 +1,67 @@ +google.cloud.migrationcenter.v1.NetworkAdapterList + */ +class NetworkAdapterList extends \Google\Protobuf\Internal\Message +{ + /** + * Network adapter entries. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.NetworkAdapterDetails entries = 1; + */ + private $entries; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\MigrationCenter\V1\NetworkAdapterDetails>|\Google\Protobuf\Internal\RepeatedField $entries + * Network adapter entries. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Network adapter entries. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.NetworkAdapterDetails entries = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEntries() + { + return $this->entries; + } + + /** + * Network adapter entries. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.NetworkAdapterDetails entries = 1; + * @param array<\Google\Cloud\MigrationCenter\V1\NetworkAdapterDetails>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEntries($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\NetworkAdapterDetails::class); + $this->entries = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/NetworkAddress.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/NetworkAddress.php new file mode 100644 index 000000000000..ed7928240f41 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/NetworkAddress.php @@ -0,0 +1,203 @@ +google.cloud.migrationcenter.v1.NetworkAddress + */ +class NetworkAddress extends \Google\Protobuf\Internal\Message +{ + /** + * Assigned or configured IP Address. + * + * Generated from protobuf field string ip_address = 1; + */ + protected $ip_address = ''; + /** + * Subnet mask. + * + * Generated from protobuf field string subnet_mask = 2; + */ + protected $subnet_mask = ''; + /** + * Broadcast address. + * + * Generated from protobuf field string bcast = 3; + */ + protected $bcast = ''; + /** + * Fully qualified domain name. + * + * Generated from protobuf field string fqdn = 4; + */ + protected $fqdn = ''; + /** + * Whether DHCP is used to assign addresses. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.NetworkAddress.AddressAssignment assignment = 5; + */ + protected $assignment = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $ip_address + * Assigned or configured IP Address. + * @type string $subnet_mask + * Subnet mask. + * @type string $bcast + * Broadcast address. + * @type string $fqdn + * Fully qualified domain name. + * @type int $assignment + * Whether DHCP is used to assign addresses. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Assigned or configured IP Address. + * + * Generated from protobuf field string ip_address = 1; + * @return string + */ + public function getIpAddress() + { + return $this->ip_address; + } + + /** + * Assigned or configured IP Address. + * + * Generated from protobuf field string ip_address = 1; + * @param string $var + * @return $this + */ + public function setIpAddress($var) + { + GPBUtil::checkString($var, True); + $this->ip_address = $var; + + return $this; + } + + /** + * Subnet mask. + * + * Generated from protobuf field string subnet_mask = 2; + * @return string + */ + public function getSubnetMask() + { + return $this->subnet_mask; + } + + /** + * Subnet mask. + * + * Generated from protobuf field string subnet_mask = 2; + * @param string $var + * @return $this + */ + public function setSubnetMask($var) + { + GPBUtil::checkString($var, True); + $this->subnet_mask = $var; + + return $this; + } + + /** + * Broadcast address. + * + * Generated from protobuf field string bcast = 3; + * @return string + */ + public function getBcast() + { + return $this->bcast; + } + + /** + * Broadcast address. + * + * Generated from protobuf field string bcast = 3; + * @param string $var + * @return $this + */ + public function setBcast($var) + { + GPBUtil::checkString($var, True); + $this->bcast = $var; + + return $this; + } + + /** + * Fully qualified domain name. + * + * Generated from protobuf field string fqdn = 4; + * @return string + */ + public function getFqdn() + { + return $this->fqdn; + } + + /** + * Fully qualified domain name. + * + * Generated from protobuf field string fqdn = 4; + * @param string $var + * @return $this + */ + public function setFqdn($var) + { + GPBUtil::checkString($var, True); + $this->fqdn = $var; + + return $this; + } + + /** + * Whether DHCP is used to assign addresses. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.NetworkAddress.AddressAssignment assignment = 5; + * @return int + */ + public function getAssignment() + { + return $this->assignment; + } + + /** + * Whether DHCP is used to assign addresses. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.NetworkAddress.AddressAssignment assignment = 5; + * @param int $var + * @return $this + */ + public function setAssignment($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\MigrationCenter\V1\NetworkAddress\AddressAssignment::class); + $this->assignment = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/NetworkAddress/AddressAssignment.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/NetworkAddress/AddressAssignment.php new file mode 100644 index 000000000000..7ef71a9aab7b --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/NetworkAddress/AddressAssignment.php @@ -0,0 +1,64 @@ +google.cloud.migrationcenter.v1.NetworkAddress.AddressAssignment + */ +class AddressAssignment +{ + /** + * Unknown (default value). + * + * Generated from protobuf enum ADDRESS_ASSIGNMENT_UNSPECIFIED = 0; + */ + const ADDRESS_ASSIGNMENT_UNSPECIFIED = 0; + /** + * Staticly assigned IP. + * + * Generated from protobuf enum ADDRESS_ASSIGNMENT_STATIC = 1; + */ + const ADDRESS_ASSIGNMENT_STATIC = 1; + /** + * Dynamically assigned IP (DHCP). + * + * Generated from protobuf enum ADDRESS_ASSIGNMENT_DHCP = 2; + */ + const ADDRESS_ASSIGNMENT_DHCP = 2; + + private static $valueToName = [ + self::ADDRESS_ASSIGNMENT_UNSPECIFIED => 'ADDRESS_ASSIGNMENT_UNSPECIFIED', + self::ADDRESS_ASSIGNMENT_STATIC => 'ADDRESS_ASSIGNMENT_STATIC', + self::ADDRESS_ASSIGNMENT_DHCP => 'ADDRESS_ASSIGNMENT_DHCP', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(AddressAssignment::class, \Google\Cloud\MigrationCenter\V1\NetworkAddress_AddressAssignment::class); + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/NetworkAddressList.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/NetworkAddressList.php new file mode 100644 index 000000000000..a11b3d494b8c --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/NetworkAddressList.php @@ -0,0 +1,67 @@ +google.cloud.migrationcenter.v1.NetworkAddressList + */ +class NetworkAddressList extends \Google\Protobuf\Internal\Message +{ + /** + * Network address entries. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.NetworkAddress entries = 1; + */ + private $entries; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\MigrationCenter\V1\NetworkAddress>|\Google\Protobuf\Internal\RepeatedField $entries + * Network address entries. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Network address entries. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.NetworkAddress entries = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEntries() + { + return $this->entries; + } + + /** + * Network address entries. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.NetworkAddress entries = 1; + * @param array<\Google\Cloud\MigrationCenter\V1\NetworkAddress>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEntries($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\NetworkAddress::class); + $this->entries = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/NetworkConnection.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/NetworkConnection.php new file mode 100644 index 000000000000..1cb223103ec1 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/NetworkConnection.php @@ -0,0 +1,303 @@ +google.cloud.migrationcenter.v1.NetworkConnection + */ +class NetworkConnection extends \Google\Protobuf\Internal\Message +{ + /** + * Connection protocol (e.g. TCP/UDP). + * + * Generated from protobuf field string protocol = 1; + */ + protected $protocol = ''; + /** + * Local IP address. + * + * Generated from protobuf field string local_ip_address = 2; + */ + protected $local_ip_address = ''; + /** + * Local port. + * + * Generated from protobuf field int32 local_port = 3; + */ + protected $local_port = 0; + /** + * Remote IP address. + * + * Generated from protobuf field string remote_ip_address = 4; + */ + protected $remote_ip_address = ''; + /** + * Remote port. + * + * Generated from protobuf field int32 remote_port = 5; + */ + protected $remote_port = 0; + /** + * Network connection state. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.NetworkConnection.State state = 6; + */ + protected $state = 0; + /** + * Process ID. + * + * Generated from protobuf field int64 pid = 7; + */ + protected $pid = 0; + /** + * Process or service name. + * + * Generated from protobuf field string process_name = 8; + */ + protected $process_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $protocol + * Connection protocol (e.g. TCP/UDP). + * @type string $local_ip_address + * Local IP address. + * @type int $local_port + * Local port. + * @type string $remote_ip_address + * Remote IP address. + * @type int $remote_port + * Remote port. + * @type int $state + * Network connection state. + * @type int|string $pid + * Process ID. + * @type string $process_name + * Process or service name. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Connection protocol (e.g. TCP/UDP). + * + * Generated from protobuf field string protocol = 1; + * @return string + */ + public function getProtocol() + { + return $this->protocol; + } + + /** + * Connection protocol (e.g. TCP/UDP). + * + * Generated from protobuf field string protocol = 1; + * @param string $var + * @return $this + */ + public function setProtocol($var) + { + GPBUtil::checkString($var, True); + $this->protocol = $var; + + return $this; + } + + /** + * Local IP address. + * + * Generated from protobuf field string local_ip_address = 2; + * @return string + */ + public function getLocalIpAddress() + { + return $this->local_ip_address; + } + + /** + * Local IP address. + * + * Generated from protobuf field string local_ip_address = 2; + * @param string $var + * @return $this + */ + public function setLocalIpAddress($var) + { + GPBUtil::checkString($var, True); + $this->local_ip_address = $var; + + return $this; + } + + /** + * Local port. + * + * Generated from protobuf field int32 local_port = 3; + * @return int + */ + public function getLocalPort() + { + return $this->local_port; + } + + /** + * Local port. + * + * Generated from protobuf field int32 local_port = 3; + * @param int $var + * @return $this + */ + public function setLocalPort($var) + { + GPBUtil::checkInt32($var); + $this->local_port = $var; + + return $this; + } + + /** + * Remote IP address. + * + * Generated from protobuf field string remote_ip_address = 4; + * @return string + */ + public function getRemoteIpAddress() + { + return $this->remote_ip_address; + } + + /** + * Remote IP address. + * + * Generated from protobuf field string remote_ip_address = 4; + * @param string $var + * @return $this + */ + public function setRemoteIpAddress($var) + { + GPBUtil::checkString($var, True); + $this->remote_ip_address = $var; + + return $this; + } + + /** + * Remote port. + * + * Generated from protobuf field int32 remote_port = 5; + * @return int + */ + public function getRemotePort() + { + return $this->remote_port; + } + + /** + * Remote port. + * + * Generated from protobuf field int32 remote_port = 5; + * @param int $var + * @return $this + */ + public function setRemotePort($var) + { + GPBUtil::checkInt32($var); + $this->remote_port = $var; + + return $this; + } + + /** + * Network connection state. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.NetworkConnection.State state = 6; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Network connection state. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.NetworkConnection.State state = 6; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\MigrationCenter\V1\NetworkConnection\State::class); + $this->state = $var; + + return $this; + } + + /** + * Process ID. + * + * Generated from protobuf field int64 pid = 7; + * @return int|string + */ + public function getPid() + { + return $this->pid; + } + + /** + * Process ID. + * + * Generated from protobuf field int64 pid = 7; + * @param int|string $var + * @return $this + */ + public function setPid($var) + { + GPBUtil::checkInt64($var); + $this->pid = $var; + + return $this; + } + + /** + * Process or service name. + * + * Generated from protobuf field string process_name = 8; + * @return string + */ + public function getProcessName() + { + return $this->process_name; + } + + /** + * Process or service name. + * + * Generated from protobuf field string process_name = 8; + * @param string $var + * @return $this + */ + public function setProcessName($var) + { + GPBUtil::checkString($var, True); + $this->process_name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/NetworkConnection/State.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/NetworkConnection/State.php new file mode 100644 index 000000000000..bc8072a8b94e --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/NetworkConnection/State.php @@ -0,0 +1,85 @@ +google.cloud.migrationcenter.v1.NetworkConnection.State + */ +class State +{ + /** + * Connection state is unknown or unspecified. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The connection is being opened. + * + * Generated from protobuf enum OPENING = 1; + */ + const OPENING = 1; + /** + * The connection is open. + * + * Generated from protobuf enum OPEN = 2; + */ + const OPEN = 2; + /** + * Listening for incoming connections. + * + * Generated from protobuf enum LISTEN = 3; + */ + const LISTEN = 3; + /** + * The connection is being closed. + * + * Generated from protobuf enum CLOSING = 4; + */ + const CLOSING = 4; + /** + * The connection is closed. + * + * Generated from protobuf enum CLOSED = 5; + */ + const CLOSED = 5; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::OPENING => 'OPENING', + self::OPEN => 'OPEN', + self::LISTEN => 'LISTEN', + self::CLOSING => 'CLOSING', + self::CLOSED => 'CLOSED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\MigrationCenter\V1\NetworkConnection_State::class); + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/NetworkConnectionList.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/NetworkConnectionList.php new file mode 100644 index 000000000000..bc8d2c11713d --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/NetworkConnectionList.php @@ -0,0 +1,67 @@ +google.cloud.migrationcenter.v1.NetworkConnectionList + */ +class NetworkConnectionList extends \Google\Protobuf\Internal\Message +{ + /** + * Network connection entries. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.NetworkConnection entries = 1; + */ + private $entries; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\MigrationCenter\V1\NetworkConnection>|\Google\Protobuf\Internal\RepeatedField $entries + * Network connection entries. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Network connection entries. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.NetworkConnection entries = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEntries() + { + return $this->entries; + } + + /** + * Network connection entries. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.NetworkConnection entries = 1; + * @param array<\Google\Cloud\MigrationCenter\V1\NetworkConnection>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEntries($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\NetworkConnection::class); + $this->entries = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/NetworkUsageSample.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/NetworkUsageSample.php new file mode 100644 index 000000000000..93378d8a79e8 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/NetworkUsageSample.php @@ -0,0 +1,109 @@ +google.cloud.migrationcenter.v1.NetworkUsageSample + */ +class NetworkUsageSample extends \Google\Protobuf\Internal\Message +{ + /** + * Average network ingress in B/s sampled over a short window. + * Must be non-negative. + * + * Generated from protobuf field float average_ingress_bps = 1; + */ + protected $average_ingress_bps = 0.0; + /** + * Average network egress in B/s sampled over a short window. + * Must be non-negative. + * + * Generated from protobuf field float average_egress_bps = 2; + */ + protected $average_egress_bps = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $average_ingress_bps + * Average network ingress in B/s sampled over a short window. + * Must be non-negative. + * @type float $average_egress_bps + * Average network egress in B/s sampled over a short window. + * Must be non-negative. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Average network ingress in B/s sampled over a short window. + * Must be non-negative. + * + * Generated from protobuf field float average_ingress_bps = 1; + * @return float + */ + public function getAverageIngressBps() + { + return $this->average_ingress_bps; + } + + /** + * Average network ingress in B/s sampled over a short window. + * Must be non-negative. + * + * Generated from protobuf field float average_ingress_bps = 1; + * @param float $var + * @return $this + */ + public function setAverageIngressBps($var) + { + GPBUtil::checkFloat($var); + $this->average_ingress_bps = $var; + + return $this; + } + + /** + * Average network egress in B/s sampled over a short window. + * Must be non-negative. + * + * Generated from protobuf field float average_egress_bps = 2; + * @return float + */ + public function getAverageEgressBps() + { + return $this->average_egress_bps; + } + + /** + * Average network egress in B/s sampled over a short window. + * Must be non-negative. + * + * Generated from protobuf field float average_egress_bps = 2; + * @param float $var + * @return $this + */ + public function setAverageEgressBps($var) + { + GPBUtil::checkFloat($var); + $this->average_egress_bps = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/NfsExport.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/NfsExport.php new file mode 100644 index 000000000000..32cbc9a7ccb7 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/NfsExport.php @@ -0,0 +1,101 @@ +google.cloud.migrationcenter.v1.NfsExport + */ +class NfsExport extends \Google\Protobuf\Internal\Message +{ + /** + * The directory being exported. + * + * Generated from protobuf field string export_directory = 1; + */ + protected $export_directory = ''; + /** + * The hosts or networks to which the export is being shared. + * + * Generated from protobuf field repeated string hosts = 2; + */ + private $hosts; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $export_directory + * The directory being exported. + * @type array|\Google\Protobuf\Internal\RepeatedField $hosts + * The hosts or networks to which the export is being shared. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * The directory being exported. + * + * Generated from protobuf field string export_directory = 1; + * @return string + */ + public function getExportDirectory() + { + return $this->export_directory; + } + + /** + * The directory being exported. + * + * Generated from protobuf field string export_directory = 1; + * @param string $var + * @return $this + */ + public function setExportDirectory($var) + { + GPBUtil::checkString($var, True); + $this->export_directory = $var; + + return $this; + } + + /** + * The hosts or networks to which the export is being shared. + * + * Generated from protobuf field repeated string hosts = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getHosts() + { + return $this->hosts; + } + + /** + * The hosts or networks to which the export is being shared. + * + * Generated from protobuf field repeated string hosts = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setHosts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->hosts = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/NfsExportList.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/NfsExportList.php new file mode 100644 index 000000000000..9031002de19e --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/NfsExportList.php @@ -0,0 +1,67 @@ +google.cloud.migrationcenter.v1.NfsExportList + */ +class NfsExportList extends \Google\Protobuf\Internal\Message +{ + /** + * NFS export entries. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.NfsExport entries = 1; + */ + private $entries; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\MigrationCenter\V1\NfsExport>|\Google\Protobuf\Internal\RepeatedField $entries + * NFS export entries. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * NFS export entries. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.NfsExport entries = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEntries() + { + return $this->entries; + } + + /** + * NFS export entries. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.NfsExport entries = 1; + * @param array<\Google\Cloud\MigrationCenter\V1\NfsExport>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEntries($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\NfsExport::class); + $this->entries = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/OpenFileDetails.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/OpenFileDetails.php new file mode 100644 index 000000000000..c6f2e511686b --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/OpenFileDetails.php @@ -0,0 +1,169 @@ +google.cloud.migrationcenter.v1.OpenFileDetails + */ +class OpenFileDetails extends \Google\Protobuf\Internal\Message +{ + /** + * Opened file command. + * + * Generated from protobuf field string command = 1; + */ + protected $command = ''; + /** + * Opened file user. + * + * Generated from protobuf field string user = 2; + */ + protected $user = ''; + /** + * Opened file file type. + * + * Generated from protobuf field string file_type = 3; + */ + protected $file_type = ''; + /** + * Opened file file path. + * + * Generated from protobuf field string file_path = 4; + */ + protected $file_path = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $command + * Opened file command. + * @type string $user + * Opened file user. + * @type string $file_type + * Opened file file type. + * @type string $file_path + * Opened file file path. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Opened file command. + * + * Generated from protobuf field string command = 1; + * @return string + */ + public function getCommand() + { + return $this->command; + } + + /** + * Opened file command. + * + * Generated from protobuf field string command = 1; + * @param string $var + * @return $this + */ + public function setCommand($var) + { + GPBUtil::checkString($var, True); + $this->command = $var; + + return $this; + } + + /** + * Opened file user. + * + * Generated from protobuf field string user = 2; + * @return string + */ + public function getUser() + { + return $this->user; + } + + /** + * Opened file user. + * + * Generated from protobuf field string user = 2; + * @param string $var + * @return $this + */ + public function setUser($var) + { + GPBUtil::checkString($var, True); + $this->user = $var; + + return $this; + } + + /** + * Opened file file type. + * + * Generated from protobuf field string file_type = 3; + * @return string + */ + public function getFileType() + { + return $this->file_type; + } + + /** + * Opened file file type. + * + * Generated from protobuf field string file_type = 3; + * @param string $var + * @return $this + */ + public function setFileType($var) + { + GPBUtil::checkString($var, True); + $this->file_type = $var; + + return $this; + } + + /** + * Opened file file path. + * + * Generated from protobuf field string file_path = 4; + * @return string + */ + public function getFilePath() + { + return $this->file_path; + } + + /** + * Opened file file path. + * + * Generated from protobuf field string file_path = 4; + * @param string $var + * @return $this + */ + public function setFilePath($var) + { + GPBUtil::checkString($var, True); + $this->file_path = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/OpenFileList.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/OpenFileList.php new file mode 100644 index 000000000000..649827ef86a8 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/OpenFileList.php @@ -0,0 +1,67 @@ +google.cloud.migrationcenter.v1.OpenFileList + */ +class OpenFileList extends \Google\Protobuf\Internal\Message +{ + /** + * Open file details entries. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.OpenFileDetails entries = 1; + */ + private $entries; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\MigrationCenter\V1\OpenFileDetails>|\Google\Protobuf\Internal\RepeatedField $entries + * Open file details entries. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Open file details entries. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.OpenFileDetails entries = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEntries() + { + return $this->entries; + } + + /** + * Open file details entries. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.OpenFileDetails entries = 1; + * @param array<\Google\Cloud\MigrationCenter\V1\OpenFileDetails>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEntries($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\OpenFileDetails::class); + $this->entries = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/OperatingSystemFamily.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/OperatingSystemFamily.php new file mode 100644 index 000000000000..81224261c687 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/OperatingSystemFamily.php @@ -0,0 +1,66 @@ +google.cloud.migrationcenter.v1.OperatingSystemFamily + */ +class OperatingSystemFamily +{ + /** + * Generated from protobuf enum OS_FAMILY_UNKNOWN = 0; + */ + const OS_FAMILY_UNKNOWN = 0; + /** + * Microsoft Windows Server and Desktop. + * + * Generated from protobuf enum OS_FAMILY_WINDOWS = 1; + */ + const OS_FAMILY_WINDOWS = 1; + /** + * Various Linux flavors. + * + * Generated from protobuf enum OS_FAMILY_LINUX = 2; + */ + const OS_FAMILY_LINUX = 2; + /** + * Non-Linux Unix flavors. + * + * Generated from protobuf enum OS_FAMILY_UNIX = 3; + */ + const OS_FAMILY_UNIX = 3; + + private static $valueToName = [ + self::OS_FAMILY_UNKNOWN => 'OS_FAMILY_UNKNOWN', + self::OS_FAMILY_WINDOWS => 'OS_FAMILY_WINDOWS', + self::OS_FAMILY_LINUX => 'OS_FAMILY_LINUX', + self::OS_FAMILY_UNIX => 'OS_FAMILY_UNIX', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/OperationMetadata.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/OperationMetadata.php new file mode 100644 index 000000000000..4e1d8d863cdb --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/OperationMetadata.php @@ -0,0 +1,307 @@ +google.cloud.migrationcenter.v1.OperationMetadata + */ +class OperationMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $end_time = null; + /** + * Output only. Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $target = ''; + /** + * Output only. Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $verb = ''; + /** + * Output only. Human-readable status of the operation, if any. + * + * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $status_message = ''; + /** + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have been cancelled successfully + * have [Operation.error][] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`. + * + * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $requested_cancellation = false; + /** + * Output only. API version used to start the operation. + * + * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $api_version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time the operation was created. + * @type \Google\Protobuf\Timestamp $end_time + * Output only. The time the operation finished running. + * @type string $target + * Output only. Server-defined resource path for the target of the operation. + * @type string $verb + * Output only. Name of the verb executed by the operation. + * @type string $status_message + * Output only. Human-readable status of the operation, if any. + * @type bool $requested_cancellation + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have been cancelled successfully + * have [Operation.error][] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`. + * @type string $api_version + * Output only. API version used to start the operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEndTime() + { + return $this->end_time; + } + + public function hasEndTime() + { + return isset($this->end_time); + } + + public function clearEndTime() + { + unset($this->end_time); + } + + /** + * Output only. The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * Output only. Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getTarget() + { + return $this->target; + } + + /** + * Output only. Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setTarget($var) + { + GPBUtil::checkString($var, True); + $this->target = $var; + + return $this; + } + + /** + * Output only. Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getVerb() + { + return $this->verb; + } + + /** + * Output only. Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setVerb($var) + { + GPBUtil::checkString($var, True); + $this->verb = $var; + + return $this; + } + + /** + * Output only. Human-readable status of the operation, if any. + * + * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getStatusMessage() + { + return $this->status_message; + } + + /** + * Output only. Human-readable status of the operation, if any. + * + * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setStatusMessage($var) + { + GPBUtil::checkString($var, True); + $this->status_message = $var; + + return $this; + } + + /** + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have been cancelled successfully + * have [Operation.error][] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`. + * + * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getRequestedCancellation() + { + return $this->requested_cancellation; + } + + /** + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have been cancelled successfully + * have [Operation.error][] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`. + * + * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setRequestedCancellation($var) + { + GPBUtil::checkBool($var); + $this->requested_cancellation = $var; + + return $this; + } + + /** + * Output only. API version used to start the operation. + * + * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getApiVersion() + { + return $this->api_version; + } + + /** + * Output only. API version used to start the operation. + * + * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setApiVersion($var) + { + GPBUtil::checkString($var, True); + $this->api_version = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/PerformanceSample.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/PerformanceSample.php new file mode 100644 index 000000000000..4839a52ab473 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/PerformanceSample.php @@ -0,0 +1,257 @@ +google.cloud.migrationcenter.v1.PerformanceSample + */ +class PerformanceSample extends \Google\Protobuf\Internal\Message +{ + /** + * Time the sample was collected. + * If omitted, the frame report time will be used. + * + * Generated from protobuf field .google.protobuf.Timestamp sample_time = 1; + */ + protected $sample_time = null; + /** + * Memory usage sample. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.MemoryUsageSample memory = 2; + */ + protected $memory = null; + /** + * CPU usage sample. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.CpuUsageSample cpu = 3; + */ + protected $cpu = null; + /** + * Network usage sample. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.NetworkUsageSample network = 4; + */ + protected $network = null; + /** + * Disk usage sample. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.DiskUsageSample disk = 5; + */ + protected $disk = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $sample_time + * Time the sample was collected. + * If omitted, the frame report time will be used. + * @type \Google\Cloud\MigrationCenter\V1\MemoryUsageSample $memory + * Memory usage sample. + * @type \Google\Cloud\MigrationCenter\V1\CpuUsageSample $cpu + * CPU usage sample. + * @type \Google\Cloud\MigrationCenter\V1\NetworkUsageSample $network + * Network usage sample. + * @type \Google\Cloud\MigrationCenter\V1\DiskUsageSample $disk + * Disk usage sample. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Time the sample was collected. + * If omitted, the frame report time will be used. + * + * Generated from protobuf field .google.protobuf.Timestamp sample_time = 1; + * @return \Google\Protobuf\Timestamp|null + */ + public function getSampleTime() + { + return $this->sample_time; + } + + public function hasSampleTime() + { + return isset($this->sample_time); + } + + public function clearSampleTime() + { + unset($this->sample_time); + } + + /** + * Time the sample was collected. + * If omitted, the frame report time will be used. + * + * Generated from protobuf field .google.protobuf.Timestamp sample_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setSampleTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->sample_time = $var; + + return $this; + } + + /** + * Memory usage sample. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.MemoryUsageSample memory = 2; + * @return \Google\Cloud\MigrationCenter\V1\MemoryUsageSample|null + */ + public function getMemory() + { + return $this->memory; + } + + public function hasMemory() + { + return isset($this->memory); + } + + public function clearMemory() + { + unset($this->memory); + } + + /** + * Memory usage sample. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.MemoryUsageSample memory = 2; + * @param \Google\Cloud\MigrationCenter\V1\MemoryUsageSample $var + * @return $this + */ + public function setMemory($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\MemoryUsageSample::class); + $this->memory = $var; + + return $this; + } + + /** + * CPU usage sample. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.CpuUsageSample cpu = 3; + * @return \Google\Cloud\MigrationCenter\V1\CpuUsageSample|null + */ + public function getCpu() + { + return $this->cpu; + } + + public function hasCpu() + { + return isset($this->cpu); + } + + public function clearCpu() + { + unset($this->cpu); + } + + /** + * CPU usage sample. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.CpuUsageSample cpu = 3; + * @param \Google\Cloud\MigrationCenter\V1\CpuUsageSample $var + * @return $this + */ + public function setCpu($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\CpuUsageSample::class); + $this->cpu = $var; + + return $this; + } + + /** + * Network usage sample. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.NetworkUsageSample network = 4; + * @return \Google\Cloud\MigrationCenter\V1\NetworkUsageSample|null + */ + public function getNetwork() + { + return $this->network; + } + + public function hasNetwork() + { + return isset($this->network); + } + + public function clearNetwork() + { + unset($this->network); + } + + /** + * Network usage sample. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.NetworkUsageSample network = 4; + * @param \Google\Cloud\MigrationCenter\V1\NetworkUsageSample $var + * @return $this + */ + public function setNetwork($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\NetworkUsageSample::class); + $this->network = $var; + + return $this; + } + + /** + * Disk usage sample. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.DiskUsageSample disk = 5; + * @return \Google\Cloud\MigrationCenter\V1\DiskUsageSample|null + */ + public function getDisk() + { + return $this->disk; + } + + public function hasDisk() + { + return isset($this->disk); + } + + public function clearDisk() + { + unset($this->disk); + } + + /** + * Disk usage sample. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.DiskUsageSample disk = 5; + * @param \Google\Cloud\MigrationCenter\V1\DiskUsageSample $var + * @return $this + */ + public function setDisk($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\DiskUsageSample::class); + $this->disk = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/PersistentDiskType.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/PersistentDiskType.php new file mode 100644 index 000000000000..de8f9f782ac7 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/PersistentDiskType.php @@ -0,0 +1,70 @@ +google.cloud.migrationcenter.v1.PersistentDiskType + */ +class PersistentDiskType +{ + /** + * Unspecified (default value). + * Selecting this value allows the system to use any disk type according + * to reported usage. This a good value to start with. + * + * Generated from protobuf enum PERSISTENT_DISK_TYPE_UNSPECIFIED = 0; + */ + const PERSISTENT_DISK_TYPE_UNSPECIFIED = 0; + /** + * Standard HDD Persistent Disk. + * + * Generated from protobuf enum PERSISTENT_DISK_TYPE_STANDARD = 1; + */ + const PERSISTENT_DISK_TYPE_STANDARD = 1; + /** + * Balanced Persistent Disk. + * + * Generated from protobuf enum PERSISTENT_DISK_TYPE_BALANCED = 2; + */ + const PERSISTENT_DISK_TYPE_BALANCED = 2; + /** + * SSD Persistent Disk. + * + * Generated from protobuf enum PERSISTENT_DISK_TYPE_SSD = 3; + */ + const PERSISTENT_DISK_TYPE_SSD = 3; + + private static $valueToName = [ + self::PERSISTENT_DISK_TYPE_UNSPECIFIED => 'PERSISTENT_DISK_TYPE_UNSPECIFIED', + self::PERSISTENT_DISK_TYPE_STANDARD => 'PERSISTENT_DISK_TYPE_STANDARD', + self::PERSISTENT_DISK_TYPE_BALANCED => 'PERSISTENT_DISK_TYPE_BALANCED', + self::PERSISTENT_DISK_TYPE_SSD => 'PERSISTENT_DISK_TYPE_SSD', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/PhysicalPlatformDetails.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/PhysicalPlatformDetails.php new file mode 100644 index 000000000000..6865a5e414cc --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/PhysicalPlatformDetails.php @@ -0,0 +1,75 @@ +google.cloud.migrationcenter.v1.PhysicalPlatformDetails + */ +class PhysicalPlatformDetails extends \Google\Protobuf\Internal\Message +{ + /** + * Free text representation of the machine location. + * The format of this field should not be relied on. Different machines in the + * same location may have different string values for this field. + * + * Generated from protobuf field string location = 1; + */ + protected $location = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $location + * Free text representation of the machine location. + * The format of this field should not be relied on. Different machines in the + * same location may have different string values for this field. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Free text representation of the machine location. + * The format of this field should not be relied on. Different machines in the + * same location may have different string values for this field. + * + * Generated from protobuf field string location = 1; + * @return string + */ + public function getLocation() + { + return $this->location; + } + + /** + * Free text representation of the machine location. + * The format of this field should not be relied on. Different machines in the + * same location may have different string values for this field. + * + * Generated from protobuf field string location = 1; + * @param string $var + * @return $this + */ + public function setLocation($var) + { + GPBUtil::checkString($var, True); + $this->location = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/PlatformDetails.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/PlatformDetails.php new file mode 100644 index 000000000000..997532b52d6a --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/PlatformDetails.php @@ -0,0 +1,207 @@ +google.cloud.migrationcenter.v1.PlatformDetails + */ +class PlatformDetails extends \Google\Protobuf\Internal\Message +{ + protected $vendor_details; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\MigrationCenter\V1\VmwarePlatformDetails $vmware_details + * VMware specific details. + * @type \Google\Cloud\MigrationCenter\V1\AwsEc2PlatformDetails $aws_ec2_details + * AWS EC2 specific details. + * @type \Google\Cloud\MigrationCenter\V1\AzureVmPlatformDetails $azure_vm_details + * Azure VM specific details. + * @type \Google\Cloud\MigrationCenter\V1\GenericPlatformDetails $generic_details + * Generic platform details. + * @type \Google\Cloud\MigrationCenter\V1\PhysicalPlatformDetails $physical_details + * Physical machines platform details. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * VMware specific details. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.VmwarePlatformDetails vmware_details = 1; + * @return \Google\Cloud\MigrationCenter\V1\VmwarePlatformDetails|null + */ + public function getVmwareDetails() + { + return $this->readOneof(1); + } + + public function hasVmwareDetails() + { + return $this->hasOneof(1); + } + + /** + * VMware specific details. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.VmwarePlatformDetails vmware_details = 1; + * @param \Google\Cloud\MigrationCenter\V1\VmwarePlatformDetails $var + * @return $this + */ + public function setVmwareDetails($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\VmwarePlatformDetails::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * AWS EC2 specific details. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.AwsEc2PlatformDetails aws_ec2_details = 2; + * @return \Google\Cloud\MigrationCenter\V1\AwsEc2PlatformDetails|null + */ + public function getAwsEc2Details() + { + return $this->readOneof(2); + } + + public function hasAwsEc2Details() + { + return $this->hasOneof(2); + } + + /** + * AWS EC2 specific details. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.AwsEc2PlatformDetails aws_ec2_details = 2; + * @param \Google\Cloud\MigrationCenter\V1\AwsEc2PlatformDetails $var + * @return $this + */ + public function setAwsEc2Details($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\AwsEc2PlatformDetails::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Azure VM specific details. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.AzureVmPlatformDetails azure_vm_details = 3; + * @return \Google\Cloud\MigrationCenter\V1\AzureVmPlatformDetails|null + */ + public function getAzureVmDetails() + { + return $this->readOneof(3); + } + + public function hasAzureVmDetails() + { + return $this->hasOneof(3); + } + + /** + * Azure VM specific details. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.AzureVmPlatformDetails azure_vm_details = 3; + * @param \Google\Cloud\MigrationCenter\V1\AzureVmPlatformDetails $var + * @return $this + */ + public function setAzureVmDetails($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\AzureVmPlatformDetails::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Generic platform details. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.GenericPlatformDetails generic_details = 4; + * @return \Google\Cloud\MigrationCenter\V1\GenericPlatformDetails|null + */ + public function getGenericDetails() + { + return $this->readOneof(4); + } + + public function hasGenericDetails() + { + return $this->hasOneof(4); + } + + /** + * Generic platform details. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.GenericPlatformDetails generic_details = 4; + * @param \Google\Cloud\MigrationCenter\V1\GenericPlatformDetails $var + * @return $this + */ + public function setGenericDetails($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\GenericPlatformDetails::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Physical machines platform details. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.PhysicalPlatformDetails physical_details = 5; + * @return \Google\Cloud\MigrationCenter\V1\PhysicalPlatformDetails|null + */ + public function getPhysicalDetails() + { + return $this->readOneof(5); + } + + public function hasPhysicalDetails() + { + return $this->hasOneof(5); + } + + /** + * Physical machines platform details. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.PhysicalPlatformDetails physical_details = 5; + * @param \Google\Cloud\MigrationCenter\V1\PhysicalPlatformDetails $var + * @return $this + */ + public function setPhysicalDetails($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\PhysicalPlatformDetails::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * @return string + */ + public function getVendorDetails() + { + return $this->whichOneof("vendor_details"); + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/PreferenceSet.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/PreferenceSet.php new file mode 100644 index 000000000000..e210335dcc6e --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/PreferenceSet.php @@ -0,0 +1,267 @@ +google.cloud.migrationcenter.v1.PreferenceSet + */ +class PreferenceSet extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Name of the preference set. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. The timestamp when the preference set was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The timestamp when the preference set was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * User-friendly display name. Maximum length is 63 characters. + * + * Generated from protobuf field string display_name = 4; + */ + protected $display_name = ''; + /** + * A description of the preference set. + * + * Generated from protobuf field string description = 5; + */ + protected $description = ''; + /** + * A set of preferences that applies to all virtual machines in the context. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.VirtualMachinePreferences virtual_machine_preferences = 6; + */ + protected $virtual_machine_preferences = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. Name of the preference set. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The timestamp when the preference set was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The timestamp when the preference set was last updated. + * @type string $display_name + * User-friendly display name. Maximum length is 63 characters. + * @type string $description + * A description of the preference set. + * @type \Google\Cloud\MigrationCenter\V1\VirtualMachinePreferences $virtual_machine_preferences + * A set of preferences that applies to all virtual machines in the context. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Name of the preference set. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. Name of the preference set. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The timestamp when the preference set was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The timestamp when the preference set was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The timestamp when the preference set was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The timestamp when the preference set was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * User-friendly display name. Maximum length is 63 characters. + * + * Generated from protobuf field string display_name = 4; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * User-friendly display name. Maximum length is 63 characters. + * + * Generated from protobuf field string display_name = 4; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * A description of the preference set. + * + * Generated from protobuf field string description = 5; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * A description of the preference set. + * + * Generated from protobuf field string description = 5; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * A set of preferences that applies to all virtual machines in the context. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.VirtualMachinePreferences virtual_machine_preferences = 6; + * @return \Google\Cloud\MigrationCenter\V1\VirtualMachinePreferences|null + */ + public function getVirtualMachinePreferences() + { + return $this->virtual_machine_preferences; + } + + public function hasVirtualMachinePreferences() + { + return isset($this->virtual_machine_preferences); + } + + public function clearVirtualMachinePreferences() + { + unset($this->virtual_machine_preferences); + } + + /** + * A set of preferences that applies to all virtual machines in the context. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.VirtualMachinePreferences virtual_machine_preferences = 6; + * @param \Google\Cloud\MigrationCenter\V1\VirtualMachinePreferences $var + * @return $this + */ + public function setVirtualMachinePreferences($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\VirtualMachinePreferences::class); + $this->virtual_machine_preferences = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/RegionPreferences.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/RegionPreferences.php new file mode 100644 index 000000000000..ad1a9da70136 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/RegionPreferences.php @@ -0,0 +1,83 @@ +google.cloud.migrationcenter.v1.RegionPreferences + */ +class RegionPreferences extends \Google\Protobuf\Internal\Message +{ + /** + * A list of preferred regions, + * ordered by the most preferred region first. + * Set only valid Google Cloud region names. + * See https://cloud.google.com/compute/docs/regions-zones + * for available regions. + * + * Generated from protobuf field repeated string preferred_regions = 1; + */ + private $preferred_regions; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $preferred_regions + * A list of preferred regions, + * ordered by the most preferred region first. + * Set only valid Google Cloud region names. + * See https://cloud.google.com/compute/docs/regions-zones + * for available regions. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * A list of preferred regions, + * ordered by the most preferred region first. + * Set only valid Google Cloud region names. + * See https://cloud.google.com/compute/docs/regions-zones + * for available regions. + * + * Generated from protobuf field repeated string preferred_regions = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPreferredRegions() + { + return $this->preferred_regions; + } + + /** + * A list of preferred regions, + * ordered by the most preferred region first. + * Set only valid Google Cloud region names. + * See https://cloud.google.com/compute/docs/regions-zones + * for available regions. + * + * Generated from protobuf field repeated string preferred_regions = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPreferredRegions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->preferred_regions = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/RemoveAssetsFromGroupRequest.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/RemoveAssetsFromGroupRequest.php new file mode 100644 index 000000000000..249f733d7864 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/RemoveAssetsFromGroupRequest.php @@ -0,0 +1,253 @@ +google.cloud.migrationcenter.v1.RemoveAssetsFromGroupRequest + */ +class RemoveAssetsFromGroupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Group reference. + * + * Generated from protobuf field string group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $group = ''; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + /** + * Required. List of assets to be removed. + * The maximum number of assets that can be removed in a single request is + * 1000. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.AssetList assets = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $assets = null; + /** + * Optional. When this value is set to `false` and one of the given assets is + * not an existing member of the group, the operation fails with a `Not Found` + * error. When set to `true` this situation is silently ignored by the server. + * Default value is `false`. + * + * Generated from protobuf field bool allow_missing = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $allow_missing = false; + + /** + * @param string $group Required. Group reference. Please see + * {@see MigrationCenterClient::groupName()} for help formatting this field. + * + * @return \Google\Cloud\MigrationCenter\V1\RemoveAssetsFromGroupRequest + * + * @experimental + */ + public static function build(string $group): self + { + return (new self()) + ->setGroup($group); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $group + * Required. Group reference. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @type \Google\Cloud\MigrationCenter\V1\AssetList $assets + * Required. List of assets to be removed. + * The maximum number of assets that can be removed in a single request is + * 1000. + * @type bool $allow_missing + * Optional. When this value is set to `false` and one of the given assets is + * not an existing member of the group, the operation fails with a `Not Found` + * error. When set to `true` this situation is silently ignored by the server. + * Default value is `false`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Required. Group reference. + * + * Generated from protobuf field string group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getGroup() + { + return $this->group; + } + + /** + * Required. Group reference. + * + * Generated from protobuf field string group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setGroup($var) + { + GPBUtil::checkString($var, True); + $this->group = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + + /** + * Required. List of assets to be removed. + * The maximum number of assets that can be removed in a single request is + * 1000. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.AssetList assets = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\MigrationCenter\V1\AssetList|null + */ + public function getAssets() + { + return $this->assets; + } + + public function hasAssets() + { + return isset($this->assets); + } + + public function clearAssets() + { + unset($this->assets); + } + + /** + * Required. List of assets to be removed. + * The maximum number of assets that can be removed in a single request is + * 1000. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.AssetList assets = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\MigrationCenter\V1\AssetList $var + * @return $this + */ + public function setAssets($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\AssetList::class); + $this->assets = $var; + + return $this; + } + + /** + * Optional. When this value is set to `false` and one of the given assets is + * not an existing member of the group, the operation fails with a `Not Found` + * error. When set to `true` this situation is silently ignored by the server. + * Default value is `false`. + * + * Generated from protobuf field bool allow_missing = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getAllowMissing() + { + return $this->allow_missing; + } + + /** + * Optional. When this value is set to `false` and one of the given assets is + * not an existing member of the group, the operation fails with a `Not Found` + * error. When set to `true` this situation is silently ignored by the server. + * Default value is `false`. + * + * Generated from protobuf field bool allow_missing = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setAllowMissing($var) + { + GPBUtil::checkBool($var); + $this->allow_missing = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Report.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Report.php new file mode 100644 index 000000000000..8fa528e7443d --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Report.php @@ -0,0 +1,335 @@ +google.cloud.migrationcenter.v1.Report + */ +class Report extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Name of resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. Creation timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. Last update timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * User-friendly display name. Maximum length is 63 characters. + * + * Generated from protobuf field string display_name = 4; + */ + protected $display_name = ''; + /** + * Free-text description. + * + * Generated from protobuf field string description = 5; + */ + protected $description = ''; + /** + * Report type. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.Report.Type type = 6; + */ + protected $type = 0; + /** + * Report creation state. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.Report.State state = 7; + */ + protected $state = 0; + /** + * Output only. Summary view of the Report. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ReportSummary summary = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $summary = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. Name of resource. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Creation timestamp. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. Last update timestamp. + * @type string $display_name + * User-friendly display name. Maximum length is 63 characters. + * @type string $description + * Free-text description. + * @type int $type + * Report type. + * @type int $state + * Report creation state. + * @type \Google\Cloud\MigrationCenter\V1\ReportSummary $summary + * Output only. Summary view of the Report. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Name of resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. Name of resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. Creation timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. Creation timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. Last update timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. Last update timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * User-friendly display name. Maximum length is 63 characters. + * + * Generated from protobuf field string display_name = 4; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * User-friendly display name. Maximum length is 63 characters. + * + * Generated from protobuf field string display_name = 4; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Free-text description. + * + * Generated from protobuf field string description = 5; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Free-text description. + * + * Generated from protobuf field string description = 5; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Report type. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.Report.Type type = 6; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Report type. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.Report.Type type = 6; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\MigrationCenter\V1\Report\Type::class); + $this->type = $var; + + return $this; + } + + /** + * Report creation state. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.Report.State state = 7; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Report creation state. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.Report.State state = 7; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\MigrationCenter\V1\Report\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. Summary view of the Report. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ReportSummary summary = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\MigrationCenter\V1\ReportSummary|null + */ + public function getSummary() + { + return $this->summary; + } + + public function hasSummary() + { + return isset($this->summary); + } + + public function clearSummary() + { + unset($this->summary); + } + + /** + * Output only. Summary view of the Report. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ReportSummary summary = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\MigrationCenter\V1\ReportSummary $var + * @return $this + */ + public function setSummary($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\ReportSummary::class); + $this->summary = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Report/State.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Report/State.php new file mode 100644 index 000000000000..0e4fdea1154b --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Report/State.php @@ -0,0 +1,71 @@ +google.cloud.migrationcenter.v1.Report.State + */ +class State +{ + /** + * Default Report creation state. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Creating Report. + * + * Generated from protobuf enum PENDING = 1; + */ + const PENDING = 1; + /** + * Successfully created Report. + * + * Generated from protobuf enum SUCCEEDED = 2; + */ + const SUCCEEDED = 2; + /** + * Failed to create Report. + * + * Generated from protobuf enum FAILED = 3; + */ + const FAILED = 3; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::PENDING => 'PENDING', + self::SUCCEEDED => 'SUCCEEDED', + self::FAILED => 'FAILED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\MigrationCenter\V1\Report_State::class); + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Report/Type.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Report/Type.php new file mode 100644 index 000000000000..930d1708a900 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Report/Type.php @@ -0,0 +1,57 @@ +google.cloud.migrationcenter.v1.Report.Type + */ +class Type +{ + /** + * Default Report type. + * + * Generated from protobuf enum TYPE_UNSPECIFIED = 0; + */ + const TYPE_UNSPECIFIED = 0; + /** + * Total cost of ownership Report type. + * + * Generated from protobuf enum TOTAL_COST_OF_OWNERSHIP = 1; + */ + const TOTAL_COST_OF_OWNERSHIP = 1; + + private static $valueToName = [ + self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', + self::TOTAL_COST_OF_OWNERSHIP => 'TOTAL_COST_OF_OWNERSHIP', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Type::class, \Google\Cloud\MigrationCenter\V1\Report_Type::class); + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportAssetFramesRequest.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportAssetFramesRequest.php new file mode 100644 index 000000000000..f3e6443020f7 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportAssetFramesRequest.php @@ -0,0 +1,145 @@ +google.cloud.migrationcenter.v1.ReportAssetFramesRequest + */ +class ReportAssetFramesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Parent of the resource. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $parent = ''; + /** + * Collection of frames data. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.Frames frames = 2; + */ + protected $frames = null; + /** + * Required. Reference to a source. + * + * Generated from protobuf field string source = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $source = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Parent of the resource. + * @type \Google\Cloud\MigrationCenter\V1\Frames $frames + * Collection of frames data. + * @type string $source + * Required. Reference to a source. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Required. Parent of the resource. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Parent of the resource. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Collection of frames data. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.Frames frames = 2; + * @return \Google\Cloud\MigrationCenter\V1\Frames|null + */ + public function getFrames() + { + return $this->frames; + } + + public function hasFrames() + { + return isset($this->frames); + } + + public function clearFrames() + { + unset($this->frames); + } + + /** + * Collection of frames data. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.Frames frames = 2; + * @param \Google\Cloud\MigrationCenter\V1\Frames $var + * @return $this + */ + public function setFrames($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\Frames::class); + $this->frames = $var; + + return $this; + } + + /** + * Required. Reference to a source. + * + * Generated from protobuf field string source = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getSource() + { + return $this->source; + } + + /** + * Required. Reference to a source. + * + * Generated from protobuf field string source = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setSource($var) + { + GPBUtil::checkString($var, True); + $this->source = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportAssetFramesResponse.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportAssetFramesResponse.php new file mode 100644 index 000000000000..b0952ef378ff --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportAssetFramesResponse.php @@ -0,0 +1,33 @@ +google.cloud.migrationcenter.v1.ReportAssetFramesResponse + */ +class ReportAssetFramesResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportConfig.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportConfig.php new file mode 100644 index 000000000000..e115833e8bca --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportConfig.php @@ -0,0 +1,258 @@ +google.cloud.migrationcenter.v1.ReportConfig + */ +class ReportConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Name of resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. The timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The timestamp when the resource was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * User-friendly display name. Maximum length is 63 characters. + * + * Generated from protobuf field string display_name = 4; + */ + protected $display_name = ''; + /** + * Free-text description. + * + * Generated from protobuf field string description = 5; + */ + protected $description = ''; + /** + * Required. Collection of combinations of groups and preference sets. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment group_preferenceset_assignments = 6 [(.google.api.field_behavior) = REQUIRED]; + */ + private $group_preferenceset_assignments; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. Name of resource. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The timestamp when the resource was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The timestamp when the resource was last updated. + * @type string $display_name + * User-friendly display name. Maximum length is 63 characters. + * @type string $description + * Free-text description. + * @type array<\Google\Cloud\MigrationCenter\V1\ReportConfig\GroupPreferenceSetAssignment>|\Google\Protobuf\Internal\RepeatedField $group_preferenceset_assignments + * Required. Collection of combinations of groups and preference sets. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Name of resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. Name of resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The timestamp when the resource was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The timestamp when the resource was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * User-friendly display name. Maximum length is 63 characters. + * + * Generated from protobuf field string display_name = 4; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * User-friendly display name. Maximum length is 63 characters. + * + * Generated from protobuf field string display_name = 4; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Free-text description. + * + * Generated from protobuf field string description = 5; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Free-text description. + * + * Generated from protobuf field string description = 5; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Required. Collection of combinations of groups and preference sets. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment group_preferenceset_assignments = 6 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getGroupPreferencesetAssignments() + { + return $this->group_preferenceset_assignments; + } + + /** + * Required. Collection of combinations of groups and preference sets. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment group_preferenceset_assignments = 6 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Cloud\MigrationCenter\V1\ReportConfig\GroupPreferenceSetAssignment>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setGroupPreferencesetAssignments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\ReportConfig\GroupPreferenceSetAssignment::class); + $this->group_preferenceset_assignments = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportConfig/GroupPreferenceSetAssignment.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportConfig/GroupPreferenceSetAssignment.php new file mode 100644 index 000000000000..1f3b30434183 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportConfig/GroupPreferenceSetAssignment.php @@ -0,0 +1,104 @@ +google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment + */ +class GroupPreferenceSetAssignment extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the group. + * + * Generated from protobuf field string group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $group = ''; + /** + * Required. Name of the Preference Set. + * + * Generated from protobuf field string preference_set = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $preference_set = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $group + * Required. Name of the group. + * @type string $preference_set + * Required. Name of the Preference Set. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the group. + * + * Generated from protobuf field string group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getGroup() + { + return $this->group; + } + + /** + * Required. Name of the group. + * + * Generated from protobuf field string group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setGroup($var) + { + GPBUtil::checkString($var, True); + $this->group = $var; + + return $this; + } + + /** + * Required. Name of the Preference Set. + * + * Generated from protobuf field string preference_set = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getPreferenceSet() + { + return $this->preference_set; + } + + /** + * Required. Name of the Preference Set. + * + * Generated from protobuf field string preference_set = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setPreferenceSet($var) + { + GPBUtil::checkString($var, True); + $this->preference_set = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(GroupPreferenceSetAssignment::class, \Google\Cloud\MigrationCenter\V1\ReportConfig_GroupPreferenceSetAssignment::class); + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary.php new file mode 100644 index 000000000000..a4ddcabde91d --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary.php @@ -0,0 +1,112 @@ +google.cloud.migrationcenter.v1.ReportSummary + */ +class ReportSummary extends \Google\Protobuf\Internal\Message +{ + /** + * Aggregate statistics for all the assets across all the groups. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats all_assets_stats = 1; + */ + protected $all_assets_stats = null; + /** + * Findings for each Group included in this report. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ReportSummary.GroupFinding group_findings = 2; + */ + private $group_findings; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\MigrationCenter\V1\ReportSummary\AssetAggregateStats $all_assets_stats + * Aggregate statistics for all the assets across all the groups. + * @type array<\Google\Cloud\MigrationCenter\V1\ReportSummary\GroupFinding>|\Google\Protobuf\Internal\RepeatedField $group_findings + * Findings for each Group included in this report. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Aggregate statistics for all the assets across all the groups. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats all_assets_stats = 1; + * @return \Google\Cloud\MigrationCenter\V1\ReportSummary\AssetAggregateStats|null + */ + public function getAllAssetsStats() + { + return $this->all_assets_stats; + } + + public function hasAllAssetsStats() + { + return isset($this->all_assets_stats); + } + + public function clearAllAssetsStats() + { + unset($this->all_assets_stats); + } + + /** + * Aggregate statistics for all the assets across all the groups. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats all_assets_stats = 1; + * @param \Google\Cloud\MigrationCenter\V1\ReportSummary\AssetAggregateStats $var + * @return $this + */ + public function setAllAssetsStats($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\ReportSummary\AssetAggregateStats::class); + $this->all_assets_stats = $var; + + return $this; + } + + /** + * Findings for each Group included in this report. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ReportSummary.GroupFinding group_findings = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getGroupFindings() + { + return $this->group_findings; + } + + /** + * Findings for each Group included in this report. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ReportSummary.GroupFinding group_findings = 2; + * @param array<\Google\Cloud\MigrationCenter\V1\ReportSummary\GroupFinding>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setGroupFindings($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\ReportSummary\GroupFinding::class); + $this->group_findings = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/AssetAggregateStats.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/AssetAggregateStats.php new file mode 100644 index 000000000000..84a7c1e88454 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/AssetAggregateStats.php @@ -0,0 +1,436 @@ +google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats + */ +class AssetAggregateStats extends \Google\Protobuf\Internal\Message +{ + /** + * Sum of the memory in bytes of all the assets in this collection. + * + * Generated from protobuf field int64 total_memory_bytes = 1; + */ + protected $total_memory_bytes = 0; + /** + * Sum of persistent storage in bytes of all the assets in this collection. + * + * Generated from protobuf field int64 total_storage_bytes = 2; + */ + protected $total_storage_bytes = 0; + /** + * Sum of the CPU core count of all the assets in this collection. + * + * Generated from protobuf field int64 total_cores = 3; + */ + protected $total_cores = 0; + /** + * Count of the number of unique assets in this collection. + * + * Generated from protobuf field int64 total_assets = 4; + */ + protected $total_assets = 0; + /** + * Total memory split into Used/Free buckets. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData memory_utilization_chart = 5; + */ + protected $memory_utilization_chart = null; + /** + * Total memory split into Used/Free buckets. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData storage_utilization_chart = 6; + */ + protected $storage_utilization_chart = null; + /** + * Count of assets grouped by Operating System families. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ReportSummary.ChartData operating_system = 7; + */ + protected $operating_system = null; + /** + * Histogram showing a distribution of CPU core counts. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData core_count_histogram = 8; + */ + protected $core_count_histogram = null; + /** + * Histogram showing a distribution of memory sizes. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData memory_bytes_histogram = 9; + */ + protected $memory_bytes_histogram = null; + /** + * Histogram showing a distribution of memory sizes. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData storage_bytes_histogram = 10; + */ + protected $storage_bytes_histogram = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $total_memory_bytes + * Sum of the memory in bytes of all the assets in this collection. + * @type int|string $total_storage_bytes + * Sum of persistent storage in bytes of all the assets in this collection. + * @type int|string $total_cores + * Sum of the CPU core count of all the assets in this collection. + * @type int|string $total_assets + * Count of the number of unique assets in this collection. + * @type \Google\Cloud\MigrationCenter\V1\ReportSummary\UtilizationChartData $memory_utilization_chart + * Total memory split into Used/Free buckets. + * @type \Google\Cloud\MigrationCenter\V1\ReportSummary\UtilizationChartData $storage_utilization_chart + * Total memory split into Used/Free buckets. + * @type \Google\Cloud\MigrationCenter\V1\ReportSummary\ChartData $operating_system + * Count of assets grouped by Operating System families. + * @type \Google\Cloud\MigrationCenter\V1\ReportSummary\HistogramChartData $core_count_histogram + * Histogram showing a distribution of CPU core counts. + * @type \Google\Cloud\MigrationCenter\V1\ReportSummary\HistogramChartData $memory_bytes_histogram + * Histogram showing a distribution of memory sizes. + * @type \Google\Cloud\MigrationCenter\V1\ReportSummary\HistogramChartData $storage_bytes_histogram + * Histogram showing a distribution of memory sizes. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Sum of the memory in bytes of all the assets in this collection. + * + * Generated from protobuf field int64 total_memory_bytes = 1; + * @return int|string + */ + public function getTotalMemoryBytes() + { + return $this->total_memory_bytes; + } + + /** + * Sum of the memory in bytes of all the assets in this collection. + * + * Generated from protobuf field int64 total_memory_bytes = 1; + * @param int|string $var + * @return $this + */ + public function setTotalMemoryBytes($var) + { + GPBUtil::checkInt64($var); + $this->total_memory_bytes = $var; + + return $this; + } + + /** + * Sum of persistent storage in bytes of all the assets in this collection. + * + * Generated from protobuf field int64 total_storage_bytes = 2; + * @return int|string + */ + public function getTotalStorageBytes() + { + return $this->total_storage_bytes; + } + + /** + * Sum of persistent storage in bytes of all the assets in this collection. + * + * Generated from protobuf field int64 total_storage_bytes = 2; + * @param int|string $var + * @return $this + */ + public function setTotalStorageBytes($var) + { + GPBUtil::checkInt64($var); + $this->total_storage_bytes = $var; + + return $this; + } + + /** + * Sum of the CPU core count of all the assets in this collection. + * + * Generated from protobuf field int64 total_cores = 3; + * @return int|string + */ + public function getTotalCores() + { + return $this->total_cores; + } + + /** + * Sum of the CPU core count of all the assets in this collection. + * + * Generated from protobuf field int64 total_cores = 3; + * @param int|string $var + * @return $this + */ + public function setTotalCores($var) + { + GPBUtil::checkInt64($var); + $this->total_cores = $var; + + return $this; + } + + /** + * Count of the number of unique assets in this collection. + * + * Generated from protobuf field int64 total_assets = 4; + * @return int|string + */ + public function getTotalAssets() + { + return $this->total_assets; + } + + /** + * Count of the number of unique assets in this collection. + * + * Generated from protobuf field int64 total_assets = 4; + * @param int|string $var + * @return $this + */ + public function setTotalAssets($var) + { + GPBUtil::checkInt64($var); + $this->total_assets = $var; + + return $this; + } + + /** + * Total memory split into Used/Free buckets. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData memory_utilization_chart = 5; + * @return \Google\Cloud\MigrationCenter\V1\ReportSummary\UtilizationChartData|null + */ + public function getMemoryUtilizationChart() + { + return $this->memory_utilization_chart; + } + + public function hasMemoryUtilizationChart() + { + return isset($this->memory_utilization_chart); + } + + public function clearMemoryUtilizationChart() + { + unset($this->memory_utilization_chart); + } + + /** + * Total memory split into Used/Free buckets. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData memory_utilization_chart = 5; + * @param \Google\Cloud\MigrationCenter\V1\ReportSummary\UtilizationChartData $var + * @return $this + */ + public function setMemoryUtilizationChart($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\ReportSummary\UtilizationChartData::class); + $this->memory_utilization_chart = $var; + + return $this; + } + + /** + * Total memory split into Used/Free buckets. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData storage_utilization_chart = 6; + * @return \Google\Cloud\MigrationCenter\V1\ReportSummary\UtilizationChartData|null + */ + public function getStorageUtilizationChart() + { + return $this->storage_utilization_chart; + } + + public function hasStorageUtilizationChart() + { + return isset($this->storage_utilization_chart); + } + + public function clearStorageUtilizationChart() + { + unset($this->storage_utilization_chart); + } + + /** + * Total memory split into Used/Free buckets. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData storage_utilization_chart = 6; + * @param \Google\Cloud\MigrationCenter\V1\ReportSummary\UtilizationChartData $var + * @return $this + */ + public function setStorageUtilizationChart($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\ReportSummary\UtilizationChartData::class); + $this->storage_utilization_chart = $var; + + return $this; + } + + /** + * Count of assets grouped by Operating System families. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ReportSummary.ChartData operating_system = 7; + * @return \Google\Cloud\MigrationCenter\V1\ReportSummary\ChartData|null + */ + public function getOperatingSystem() + { + return $this->operating_system; + } + + public function hasOperatingSystem() + { + return isset($this->operating_system); + } + + public function clearOperatingSystem() + { + unset($this->operating_system); + } + + /** + * Count of assets grouped by Operating System families. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ReportSummary.ChartData operating_system = 7; + * @param \Google\Cloud\MigrationCenter\V1\ReportSummary\ChartData $var + * @return $this + */ + public function setOperatingSystem($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\ReportSummary\ChartData::class); + $this->operating_system = $var; + + return $this; + } + + /** + * Histogram showing a distribution of CPU core counts. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData core_count_histogram = 8; + * @return \Google\Cloud\MigrationCenter\V1\ReportSummary\HistogramChartData|null + */ + public function getCoreCountHistogram() + { + return $this->core_count_histogram; + } + + public function hasCoreCountHistogram() + { + return isset($this->core_count_histogram); + } + + public function clearCoreCountHistogram() + { + unset($this->core_count_histogram); + } + + /** + * Histogram showing a distribution of CPU core counts. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData core_count_histogram = 8; + * @param \Google\Cloud\MigrationCenter\V1\ReportSummary\HistogramChartData $var + * @return $this + */ + public function setCoreCountHistogram($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\ReportSummary\HistogramChartData::class); + $this->core_count_histogram = $var; + + return $this; + } + + /** + * Histogram showing a distribution of memory sizes. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData memory_bytes_histogram = 9; + * @return \Google\Cloud\MigrationCenter\V1\ReportSummary\HistogramChartData|null + */ + public function getMemoryBytesHistogram() + { + return $this->memory_bytes_histogram; + } + + public function hasMemoryBytesHistogram() + { + return isset($this->memory_bytes_histogram); + } + + public function clearMemoryBytesHistogram() + { + unset($this->memory_bytes_histogram); + } + + /** + * Histogram showing a distribution of memory sizes. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData memory_bytes_histogram = 9; + * @param \Google\Cloud\MigrationCenter\V1\ReportSummary\HistogramChartData $var + * @return $this + */ + public function setMemoryBytesHistogram($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\ReportSummary\HistogramChartData::class); + $this->memory_bytes_histogram = $var; + + return $this; + } + + /** + * Histogram showing a distribution of memory sizes. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData storage_bytes_histogram = 10; + * @return \Google\Cloud\MigrationCenter\V1\ReportSummary\HistogramChartData|null + */ + public function getStorageBytesHistogram() + { + return $this->storage_bytes_histogram; + } + + public function hasStorageBytesHistogram() + { + return isset($this->storage_bytes_histogram); + } + + public function clearStorageBytesHistogram() + { + unset($this->storage_bytes_histogram); + } + + /** + * Histogram showing a distribution of memory sizes. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData storage_bytes_histogram = 10; + * @param \Google\Cloud\MigrationCenter\V1\ReportSummary\HistogramChartData $var + * @return $this + */ + public function setStorageBytesHistogram($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\ReportSummary\HistogramChartData::class); + $this->storage_bytes_histogram = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(AssetAggregateStats::class, \Google\Cloud\MigrationCenter\V1\ReportSummary_AssetAggregateStats::class); + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/ChartData.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/ChartData.php new file mode 100644 index 000000000000..d4db831af724 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/ChartData.php @@ -0,0 +1,78 @@ +google.cloud.migrationcenter.v1.ReportSummary.ChartData + */ +class ChartData extends \Google\Protobuf\Internal\Message +{ + /** + * Each data point in the chart is represented as a name-value pair + * with the name being the x-axis label, and the value being the y-axis + * value. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint data_points = 1; + */ + private $data_points; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\MigrationCenter\V1\ReportSummary\ChartData\DataPoint>|\Google\Protobuf\Internal\RepeatedField $data_points + * Each data point in the chart is represented as a name-value pair + * with the name being the x-axis label, and the value being the y-axis + * value. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Each data point in the chart is represented as a name-value pair + * with the name being the x-axis label, and the value being the y-axis + * value. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint data_points = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDataPoints() + { + return $this->data_points; + } + + /** + * Each data point in the chart is represented as a name-value pair + * with the name being the x-axis label, and the value being the y-axis + * value. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint data_points = 1; + * @param array<\Google\Cloud\MigrationCenter\V1\ReportSummary\ChartData\DataPoint>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDataPoints($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\ReportSummary\ChartData\DataPoint::class); + $this->data_points = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ChartData::class, \Google\Cloud\MigrationCenter\V1\ReportSummary_ChartData::class); + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/ChartData/DataPoint.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/ChartData/DataPoint.php new file mode 100644 index 000000000000..b2bea49da9ac --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/ChartData/DataPoint.php @@ -0,0 +1,104 @@ +google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint + */ +class DataPoint extends \Google\Protobuf\Internal\Message +{ + /** + * The X-axis label for this data point. + * + * Generated from protobuf field string label = 1; + */ + protected $label = ''; + /** + * The Y-axis value for this data point. + * + * Generated from protobuf field double value = 2; + */ + protected $value = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $label + * The X-axis label for this data point. + * @type float $value + * The Y-axis value for this data point. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * The X-axis label for this data point. + * + * Generated from protobuf field string label = 1; + * @return string + */ + public function getLabel() + { + return $this->label; + } + + /** + * The X-axis label for this data point. + * + * Generated from protobuf field string label = 1; + * @param string $var + * @return $this + */ + public function setLabel($var) + { + GPBUtil::checkString($var, True); + $this->label = $var; + + return $this; + } + + /** + * The Y-axis value for this data point. + * + * Generated from protobuf field double value = 2; + * @return float + */ + public function getValue() + { + return $this->value; + } + + /** + * The Y-axis value for this data point. + * + * Generated from protobuf field double value = 2; + * @param float $var + * @return $this + */ + public function setValue($var) + { + GPBUtil::checkDouble($var); + $this->value = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(DataPoint::class, \Google\Cloud\MigrationCenter\V1\ReportSummary_ChartData_DataPoint::class); + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/ComputeEngineFinding.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/ComputeEngineFinding.php new file mode 100644 index 000000000000..ba31b6aae2fc --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/ComputeEngineFinding.php @@ -0,0 +1,172 @@ +google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding + */ +class ComputeEngineFinding extends \Google\Protobuf\Internal\Message +{ + /** + * Set of regions in which the assets were allocated. + * + * Generated from protobuf field repeated string allocated_regions = 1; + */ + private $allocated_regions; + /** + * Count of assets which were allocated. + * + * Generated from protobuf field int64 allocated_asset_count = 2; + */ + protected $allocated_asset_count = 0; + /** + * Distribution of assets based on the Machine Series. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation machine_series_allocations = 3; + */ + private $machine_series_allocations; + /** + * Set of disk types allocated to assets. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.PersistentDiskType allocated_disk_types = 4; + */ + private $allocated_disk_types; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $allocated_regions + * Set of regions in which the assets were allocated. + * @type int|string $allocated_asset_count + * Count of assets which were allocated. + * @type array<\Google\Cloud\MigrationCenter\V1\ReportSummary\MachineSeriesAllocation>|\Google\Protobuf\Internal\RepeatedField $machine_series_allocations + * Distribution of assets based on the Machine Series. + * @type array|\Google\Protobuf\Internal\RepeatedField $allocated_disk_types + * Set of disk types allocated to assets. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Set of regions in which the assets were allocated. + * + * Generated from protobuf field repeated string allocated_regions = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAllocatedRegions() + { + return $this->allocated_regions; + } + + /** + * Set of regions in which the assets were allocated. + * + * Generated from protobuf field repeated string allocated_regions = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAllocatedRegions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->allocated_regions = $arr; + + return $this; + } + + /** + * Count of assets which were allocated. + * + * Generated from protobuf field int64 allocated_asset_count = 2; + * @return int|string + */ + public function getAllocatedAssetCount() + { + return $this->allocated_asset_count; + } + + /** + * Count of assets which were allocated. + * + * Generated from protobuf field int64 allocated_asset_count = 2; + * @param int|string $var + * @return $this + */ + public function setAllocatedAssetCount($var) + { + GPBUtil::checkInt64($var); + $this->allocated_asset_count = $var; + + return $this; + } + + /** + * Distribution of assets based on the Machine Series. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation machine_series_allocations = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMachineSeriesAllocations() + { + return $this->machine_series_allocations; + } + + /** + * Distribution of assets based on the Machine Series. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation machine_series_allocations = 3; + * @param array<\Google\Cloud\MigrationCenter\V1\ReportSummary\MachineSeriesAllocation>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMachineSeriesAllocations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\ReportSummary\MachineSeriesAllocation::class); + $this->machine_series_allocations = $arr; + + return $this; + } + + /** + * Set of disk types allocated to assets. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.PersistentDiskType allocated_disk_types = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAllocatedDiskTypes() + { + return $this->allocated_disk_types; + } + + /** + * Set of disk types allocated to assets. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.PersistentDiskType allocated_disk_types = 4; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAllocatedDiskTypes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\MigrationCenter\V1\PersistentDiskType::class); + $this->allocated_disk_types = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ComputeEngineFinding::class, \Google\Cloud\MigrationCenter\V1\ReportSummary_ComputeEngineFinding::class); + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/GroupFinding.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/GroupFinding.php new file mode 100644 index 000000000000..719521989d08 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/GroupFinding.php @@ -0,0 +1,221 @@ +google.cloud.migrationcenter.v1.ReportSummary.GroupFinding + */ +class GroupFinding extends \Google\Protobuf\Internal\Message +{ + /** + * Display Name for the Group. + * + * Generated from protobuf field string display_name = 1; + */ + protected $display_name = ''; + /** + * Description for the Group. + * + * Generated from protobuf field string description = 2; + */ + protected $description = ''; + /** + * Summary statistics for all the assets in this group. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats asset_aggregate_stats = 3; + */ + protected $asset_aggregate_stats = null; + /** + * This field is deprecated, do not rely on it having a value. + * + * Generated from protobuf field int64 overlapping_asset_count = 4 [deprecated = true]; + * @deprecated + */ + protected $overlapping_asset_count = 0; + /** + * Findings for each of the PreferenceSets for this group. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding preference_set_findings = 5; + */ + private $preference_set_findings; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $display_name + * Display Name for the Group. + * @type string $description + * Description for the Group. + * @type \Google\Cloud\MigrationCenter\V1\ReportSummary\AssetAggregateStats $asset_aggregate_stats + * Summary statistics for all the assets in this group. + * @type int|string $overlapping_asset_count + * This field is deprecated, do not rely on it having a value. + * @type array<\Google\Cloud\MigrationCenter\V1\ReportSummary\GroupPreferenceSetFinding>|\Google\Protobuf\Internal\RepeatedField $preference_set_findings + * Findings for each of the PreferenceSets for this group. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Display Name for the Group. + * + * Generated from protobuf field string display_name = 1; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Display Name for the Group. + * + * Generated from protobuf field string display_name = 1; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Description for the Group. + * + * Generated from protobuf field string description = 2; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Description for the Group. + * + * Generated from protobuf field string description = 2; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Summary statistics for all the assets in this group. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats asset_aggregate_stats = 3; + * @return \Google\Cloud\MigrationCenter\V1\ReportSummary\AssetAggregateStats|null + */ + public function getAssetAggregateStats() + { + return $this->asset_aggregate_stats; + } + + public function hasAssetAggregateStats() + { + return isset($this->asset_aggregate_stats); + } + + public function clearAssetAggregateStats() + { + unset($this->asset_aggregate_stats); + } + + /** + * Summary statistics for all the assets in this group. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats asset_aggregate_stats = 3; + * @param \Google\Cloud\MigrationCenter\V1\ReportSummary\AssetAggregateStats $var + * @return $this + */ + public function setAssetAggregateStats($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\ReportSummary\AssetAggregateStats::class); + $this->asset_aggregate_stats = $var; + + return $this; + } + + /** + * This field is deprecated, do not rely on it having a value. + * + * Generated from protobuf field int64 overlapping_asset_count = 4 [deprecated = true]; + * @return int|string + * @deprecated + */ + public function getOverlappingAssetCount() + { + @trigger_error('overlapping_asset_count is deprecated.', E_USER_DEPRECATED); + return $this->overlapping_asset_count; + } + + /** + * This field is deprecated, do not rely on it having a value. + * + * Generated from protobuf field int64 overlapping_asset_count = 4 [deprecated = true]; + * @param int|string $var + * @return $this + * @deprecated + */ + public function setOverlappingAssetCount($var) + { + @trigger_error('overlapping_asset_count is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkInt64($var); + $this->overlapping_asset_count = $var; + + return $this; + } + + /** + * Findings for each of the PreferenceSets for this group. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding preference_set_findings = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPreferenceSetFindings() + { + return $this->preference_set_findings; + } + + /** + * Findings for each of the PreferenceSets for this group. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding preference_set_findings = 5; + * @param array<\Google\Cloud\MigrationCenter\V1\ReportSummary\GroupPreferenceSetFinding>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPreferenceSetFindings($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\ReportSummary\GroupPreferenceSetFinding::class); + $this->preference_set_findings = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(GroupFinding::class, \Google\Cloud\MigrationCenter\V1\ReportSummary_GroupFinding::class); + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/GroupPreferenceSetFinding.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/GroupPreferenceSetFinding.php new file mode 100644 index 000000000000..fa84bf84d5bd --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/GroupPreferenceSetFinding.php @@ -0,0 +1,544 @@ +google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding + */ +class GroupPreferenceSetFinding extends \Google\Protobuf\Internal\Message +{ + /** + * Display Name of the Preference Set + * + * Generated from protobuf field string display_name = 1; + */ + protected $display_name = ''; + /** + * Description for the Preference Set. + * + * Generated from protobuf field string description = 2; + */ + protected $description = ''; + /** + * A set of preferences that applies to all machines in the context. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.VirtualMachinePreferences machine_preferences = 3; + */ + protected $machine_preferences = null; + /** + * Total monthly cost for this preference set. + * + * Generated from protobuf field .google.type.Money monthly_cost_total = 4; + */ + protected $monthly_cost_total = null; + /** + * Compute monthly cost for this preference set. + * + * Generated from protobuf field .google.type.Money monthly_cost_compute = 5; + */ + protected $monthly_cost_compute = null; + /** + * Licensing monthly cost for this preference set. + * + * Generated from protobuf field .google.type.Money monthly_cost_os_license = 6; + */ + protected $monthly_cost_os_license = null; + /** + * Network Egress monthly cost for this preference set. + * + * Generated from protobuf field .google.type.Money monthly_cost_network_egress = 7; + */ + protected $monthly_cost_network_egress = null; + /** + * Storage monthly cost for this preference set. + * + * Generated from protobuf field .google.type.Money monthly_cost_storage = 8; + */ + protected $monthly_cost_storage = null; + /** + * Miscellaneous monthly cost for this preference set. + * + * Generated from protobuf field .google.type.Money monthly_cost_other = 9; + */ + protected $monthly_cost_other = null; + /** + * A set of findings that applies to Compute Engine machines in the input. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding compute_engine_finding = 10; + */ + protected $compute_engine_finding = null; + /** + * A set of findings that applies to VMWare machines in the input. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ReportSummary.VmwareEngineFinding vmware_engine_finding = 11; + */ + protected $vmware_engine_finding = null; + /** + * A set of findings that applies to Sole-Tenant machines in the input. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ReportSummary.SoleTenantFinding sole_tenant_finding = 12; + */ + protected $sole_tenant_finding = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $display_name + * Display Name of the Preference Set + * @type string $description + * Description for the Preference Set. + * @type \Google\Cloud\MigrationCenter\V1\VirtualMachinePreferences $machine_preferences + * A set of preferences that applies to all machines in the context. + * @type \Google\Type\Money $monthly_cost_total + * Total monthly cost for this preference set. + * @type \Google\Type\Money $monthly_cost_compute + * Compute monthly cost for this preference set. + * @type \Google\Type\Money $monthly_cost_os_license + * Licensing monthly cost for this preference set. + * @type \Google\Type\Money $monthly_cost_network_egress + * Network Egress monthly cost for this preference set. + * @type \Google\Type\Money $monthly_cost_storage + * Storage monthly cost for this preference set. + * @type \Google\Type\Money $monthly_cost_other + * Miscellaneous monthly cost for this preference set. + * @type \Google\Cloud\MigrationCenter\V1\ReportSummary\ComputeEngineFinding $compute_engine_finding + * A set of findings that applies to Compute Engine machines in the input. + * @type \Google\Cloud\MigrationCenter\V1\ReportSummary\VmwareEngineFinding $vmware_engine_finding + * A set of findings that applies to VMWare machines in the input. + * @type \Google\Cloud\MigrationCenter\V1\ReportSummary\SoleTenantFinding $sole_tenant_finding + * A set of findings that applies to Sole-Tenant machines in the input. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Display Name of the Preference Set + * + * Generated from protobuf field string display_name = 1; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Display Name of the Preference Set + * + * Generated from protobuf field string display_name = 1; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Description for the Preference Set. + * + * Generated from protobuf field string description = 2; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Description for the Preference Set. + * + * Generated from protobuf field string description = 2; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * A set of preferences that applies to all machines in the context. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.VirtualMachinePreferences machine_preferences = 3; + * @return \Google\Cloud\MigrationCenter\V1\VirtualMachinePreferences|null + */ + public function getMachinePreferences() + { + return $this->machine_preferences; + } + + public function hasMachinePreferences() + { + return isset($this->machine_preferences); + } + + public function clearMachinePreferences() + { + unset($this->machine_preferences); + } + + /** + * A set of preferences that applies to all machines in the context. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.VirtualMachinePreferences machine_preferences = 3; + * @param \Google\Cloud\MigrationCenter\V1\VirtualMachinePreferences $var + * @return $this + */ + public function setMachinePreferences($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\VirtualMachinePreferences::class); + $this->machine_preferences = $var; + + return $this; + } + + /** + * Total monthly cost for this preference set. + * + * Generated from protobuf field .google.type.Money monthly_cost_total = 4; + * @return \Google\Type\Money|null + */ + public function getMonthlyCostTotal() + { + return $this->monthly_cost_total; + } + + public function hasMonthlyCostTotal() + { + return isset($this->monthly_cost_total); + } + + public function clearMonthlyCostTotal() + { + unset($this->monthly_cost_total); + } + + /** + * Total monthly cost for this preference set. + * + * Generated from protobuf field .google.type.Money monthly_cost_total = 4; + * @param \Google\Type\Money $var + * @return $this + */ + public function setMonthlyCostTotal($var) + { + GPBUtil::checkMessage($var, \Google\Type\Money::class); + $this->monthly_cost_total = $var; + + return $this; + } + + /** + * Compute monthly cost for this preference set. + * + * Generated from protobuf field .google.type.Money monthly_cost_compute = 5; + * @return \Google\Type\Money|null + */ + public function getMonthlyCostCompute() + { + return $this->monthly_cost_compute; + } + + public function hasMonthlyCostCompute() + { + return isset($this->monthly_cost_compute); + } + + public function clearMonthlyCostCompute() + { + unset($this->monthly_cost_compute); + } + + /** + * Compute monthly cost for this preference set. + * + * Generated from protobuf field .google.type.Money monthly_cost_compute = 5; + * @param \Google\Type\Money $var + * @return $this + */ + public function setMonthlyCostCompute($var) + { + GPBUtil::checkMessage($var, \Google\Type\Money::class); + $this->monthly_cost_compute = $var; + + return $this; + } + + /** + * Licensing monthly cost for this preference set. + * + * Generated from protobuf field .google.type.Money monthly_cost_os_license = 6; + * @return \Google\Type\Money|null + */ + public function getMonthlyCostOsLicense() + { + return $this->monthly_cost_os_license; + } + + public function hasMonthlyCostOsLicense() + { + return isset($this->monthly_cost_os_license); + } + + public function clearMonthlyCostOsLicense() + { + unset($this->monthly_cost_os_license); + } + + /** + * Licensing monthly cost for this preference set. + * + * Generated from protobuf field .google.type.Money monthly_cost_os_license = 6; + * @param \Google\Type\Money $var + * @return $this + */ + public function setMonthlyCostOsLicense($var) + { + GPBUtil::checkMessage($var, \Google\Type\Money::class); + $this->monthly_cost_os_license = $var; + + return $this; + } + + /** + * Network Egress monthly cost for this preference set. + * + * Generated from protobuf field .google.type.Money monthly_cost_network_egress = 7; + * @return \Google\Type\Money|null + */ + public function getMonthlyCostNetworkEgress() + { + return $this->monthly_cost_network_egress; + } + + public function hasMonthlyCostNetworkEgress() + { + return isset($this->monthly_cost_network_egress); + } + + public function clearMonthlyCostNetworkEgress() + { + unset($this->monthly_cost_network_egress); + } + + /** + * Network Egress monthly cost for this preference set. + * + * Generated from protobuf field .google.type.Money monthly_cost_network_egress = 7; + * @param \Google\Type\Money $var + * @return $this + */ + public function setMonthlyCostNetworkEgress($var) + { + GPBUtil::checkMessage($var, \Google\Type\Money::class); + $this->monthly_cost_network_egress = $var; + + return $this; + } + + /** + * Storage monthly cost for this preference set. + * + * Generated from protobuf field .google.type.Money monthly_cost_storage = 8; + * @return \Google\Type\Money|null + */ + public function getMonthlyCostStorage() + { + return $this->monthly_cost_storage; + } + + public function hasMonthlyCostStorage() + { + return isset($this->monthly_cost_storage); + } + + public function clearMonthlyCostStorage() + { + unset($this->monthly_cost_storage); + } + + /** + * Storage monthly cost for this preference set. + * + * Generated from protobuf field .google.type.Money monthly_cost_storage = 8; + * @param \Google\Type\Money $var + * @return $this + */ + public function setMonthlyCostStorage($var) + { + GPBUtil::checkMessage($var, \Google\Type\Money::class); + $this->monthly_cost_storage = $var; + + return $this; + } + + /** + * Miscellaneous monthly cost for this preference set. + * + * Generated from protobuf field .google.type.Money monthly_cost_other = 9; + * @return \Google\Type\Money|null + */ + public function getMonthlyCostOther() + { + return $this->monthly_cost_other; + } + + public function hasMonthlyCostOther() + { + return isset($this->monthly_cost_other); + } + + public function clearMonthlyCostOther() + { + unset($this->monthly_cost_other); + } + + /** + * Miscellaneous monthly cost for this preference set. + * + * Generated from protobuf field .google.type.Money monthly_cost_other = 9; + * @param \Google\Type\Money $var + * @return $this + */ + public function setMonthlyCostOther($var) + { + GPBUtil::checkMessage($var, \Google\Type\Money::class); + $this->monthly_cost_other = $var; + + return $this; + } + + /** + * A set of findings that applies to Compute Engine machines in the input. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding compute_engine_finding = 10; + * @return \Google\Cloud\MigrationCenter\V1\ReportSummary\ComputeEngineFinding|null + */ + public function getComputeEngineFinding() + { + return $this->compute_engine_finding; + } + + public function hasComputeEngineFinding() + { + return isset($this->compute_engine_finding); + } + + public function clearComputeEngineFinding() + { + unset($this->compute_engine_finding); + } + + /** + * A set of findings that applies to Compute Engine machines in the input. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding compute_engine_finding = 10; + * @param \Google\Cloud\MigrationCenter\V1\ReportSummary\ComputeEngineFinding $var + * @return $this + */ + public function setComputeEngineFinding($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\ReportSummary\ComputeEngineFinding::class); + $this->compute_engine_finding = $var; + + return $this; + } + + /** + * A set of findings that applies to VMWare machines in the input. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ReportSummary.VmwareEngineFinding vmware_engine_finding = 11; + * @return \Google\Cloud\MigrationCenter\V1\ReportSummary\VmwareEngineFinding|null + */ + public function getVmwareEngineFinding() + { + return $this->vmware_engine_finding; + } + + public function hasVmwareEngineFinding() + { + return isset($this->vmware_engine_finding); + } + + public function clearVmwareEngineFinding() + { + unset($this->vmware_engine_finding); + } + + /** + * A set of findings that applies to VMWare machines in the input. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ReportSummary.VmwareEngineFinding vmware_engine_finding = 11; + * @param \Google\Cloud\MigrationCenter\V1\ReportSummary\VmwareEngineFinding $var + * @return $this + */ + public function setVmwareEngineFinding($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\ReportSummary\VmwareEngineFinding::class); + $this->vmware_engine_finding = $var; + + return $this; + } + + /** + * A set of findings that applies to Sole-Tenant machines in the input. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ReportSummary.SoleTenantFinding sole_tenant_finding = 12; + * @return \Google\Cloud\MigrationCenter\V1\ReportSummary\SoleTenantFinding|null + */ + public function getSoleTenantFinding() + { + return $this->sole_tenant_finding; + } + + public function hasSoleTenantFinding() + { + return isset($this->sole_tenant_finding); + } + + public function clearSoleTenantFinding() + { + unset($this->sole_tenant_finding); + } + + /** + * A set of findings that applies to Sole-Tenant machines in the input. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ReportSummary.SoleTenantFinding sole_tenant_finding = 12; + * @param \Google\Cloud\MigrationCenter\V1\ReportSummary\SoleTenantFinding $var + * @return $this + */ + public function setSoleTenantFinding($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\ReportSummary\SoleTenantFinding::class); + $this->sole_tenant_finding = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(GroupPreferenceSetFinding::class, \Google\Cloud\MigrationCenter\V1\ReportSummary_GroupPreferenceSetFinding::class); + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/HistogramChartData.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/HistogramChartData.php new file mode 100644 index 000000000000..75d06644f304 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/HistogramChartData.php @@ -0,0 +1,87 @@ +google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData + */ +class HistogramChartData extends \Google\Protobuf\Internal\Message +{ + /** + * Buckets in the histogram. + * There will be `n+1` buckets matching `n` lower bounds in the request. + * The first bucket will be from -infinity to the first bound. + * Subsequent buckets will be between one bound and the next. + * The final bucket will be from the final bound to infinity. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket buckets = 1; + */ + private $buckets; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\MigrationCenter\V1\ReportSummary\HistogramChartData\Bucket>|\Google\Protobuf\Internal\RepeatedField $buckets + * Buckets in the histogram. + * There will be `n+1` buckets matching `n` lower bounds in the request. + * The first bucket will be from -infinity to the first bound. + * Subsequent buckets will be between one bound and the next. + * The final bucket will be from the final bound to infinity. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Buckets in the histogram. + * There will be `n+1` buckets matching `n` lower bounds in the request. + * The first bucket will be from -infinity to the first bound. + * Subsequent buckets will be between one bound and the next. + * The final bucket will be from the final bound to infinity. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket buckets = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getBuckets() + { + return $this->buckets; + } + + /** + * Buckets in the histogram. + * There will be `n+1` buckets matching `n` lower bounds in the request. + * The first bucket will be from -infinity to the first bound. + * Subsequent buckets will be between one bound and the next. + * The final bucket will be from the final bound to infinity. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket buckets = 1; + * @param array<\Google\Cloud\MigrationCenter\V1\ReportSummary\HistogramChartData\Bucket>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setBuckets($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\ReportSummary\HistogramChartData\Bucket::class); + $this->buckets = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(HistogramChartData::class, \Google\Cloud\MigrationCenter\V1\ReportSummary_HistogramChartData::class); + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/HistogramChartData/Bucket.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/HistogramChartData/Bucket.php new file mode 100644 index 000000000000..ca8197db764a --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/HistogramChartData/Bucket.php @@ -0,0 +1,141 @@ +google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket + */ +class Bucket extends \Google\Protobuf\Internal\Message +{ + /** + * Lower bound - inclusive. + * + * Generated from protobuf field int64 lower_bound = 1; + */ + protected $lower_bound = 0; + /** + * Upper bound - exclusive. + * + * Generated from protobuf field int64 upper_bound = 2; + */ + protected $upper_bound = 0; + /** + * Count of items in the bucket. + * + * Generated from protobuf field int64 count = 3; + */ + protected $count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $lower_bound + * Lower bound - inclusive. + * @type int|string $upper_bound + * Upper bound - exclusive. + * @type int|string $count + * Count of items in the bucket. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Lower bound - inclusive. + * + * Generated from protobuf field int64 lower_bound = 1; + * @return int|string + */ + public function getLowerBound() + { + return $this->lower_bound; + } + + /** + * Lower bound - inclusive. + * + * Generated from protobuf field int64 lower_bound = 1; + * @param int|string $var + * @return $this + */ + public function setLowerBound($var) + { + GPBUtil::checkInt64($var); + $this->lower_bound = $var; + + return $this; + } + + /** + * Upper bound - exclusive. + * + * Generated from protobuf field int64 upper_bound = 2; + * @return int|string + */ + public function getUpperBound() + { + return $this->upper_bound; + } + + /** + * Upper bound - exclusive. + * + * Generated from protobuf field int64 upper_bound = 2; + * @param int|string $var + * @return $this + */ + public function setUpperBound($var) + { + GPBUtil::checkInt64($var); + $this->upper_bound = $var; + + return $this; + } + + /** + * Count of items in the bucket. + * + * Generated from protobuf field int64 count = 3; + * @return int|string + */ + public function getCount() + { + return $this->count; + } + + /** + * Count of items in the bucket. + * + * Generated from protobuf field int64 count = 3; + * @param int|string $var + * @return $this + */ + public function setCount($var) + { + GPBUtil::checkInt64($var); + $this->count = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Bucket::class, \Google\Cloud\MigrationCenter\V1\ReportSummary_HistogramChartData_Bucket::class); + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/MachineSeriesAllocation.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/MachineSeriesAllocation.php new file mode 100644 index 000000000000..ae3ebad0dd3a --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/MachineSeriesAllocation.php @@ -0,0 +1,115 @@ +google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation + */ +class MachineSeriesAllocation extends \Google\Protobuf\Internal\Message +{ + /** + * The Machine Series (e.g. "E2", "N2") + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.MachineSeries machine_series = 1; + */ + protected $machine_series = null; + /** + * Count of assets allocated to this machine series. + * + * Generated from protobuf field int64 allocated_asset_count = 2; + */ + protected $allocated_asset_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\MigrationCenter\V1\MachineSeries $machine_series + * The Machine Series (e.g. "E2", "N2") + * @type int|string $allocated_asset_count + * Count of assets allocated to this machine series. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * The Machine Series (e.g. "E2", "N2") + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.MachineSeries machine_series = 1; + * @return \Google\Cloud\MigrationCenter\V1\MachineSeries|null + */ + public function getMachineSeries() + { + return $this->machine_series; + } + + public function hasMachineSeries() + { + return isset($this->machine_series); + } + + public function clearMachineSeries() + { + unset($this->machine_series); + } + + /** + * The Machine Series (e.g. "E2", "N2") + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.MachineSeries machine_series = 1; + * @param \Google\Cloud\MigrationCenter\V1\MachineSeries $var + * @return $this + */ + public function setMachineSeries($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\MachineSeries::class); + $this->machine_series = $var; + + return $this; + } + + /** + * Count of assets allocated to this machine series. + * + * Generated from protobuf field int64 allocated_asset_count = 2; + * @return int|string + */ + public function getAllocatedAssetCount() + { + return $this->allocated_asset_count; + } + + /** + * Count of assets allocated to this machine series. + * + * Generated from protobuf field int64 allocated_asset_count = 2; + * @param int|string $var + * @return $this + */ + public function setAllocatedAssetCount($var) + { + GPBUtil::checkInt64($var); + $this->allocated_asset_count = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(MachineSeriesAllocation::class, \Google\Cloud\MigrationCenter\V1\ReportSummary_MachineSeriesAllocation::class); + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/SoleTenantFinding.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/SoleTenantFinding.php new file mode 100644 index 000000000000..9dd9c5693d87 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/SoleTenantFinding.php @@ -0,0 +1,138 @@ +google.cloud.migrationcenter.v1.ReportSummary.SoleTenantFinding + */ +class SoleTenantFinding extends \Google\Protobuf\Internal\Message +{ + /** + * Set of regions in which the assets are allocated + * + * Generated from protobuf field repeated string allocated_regions = 1; + */ + private $allocated_regions; + /** + * Count of assets which are allocated + * + * Generated from protobuf field int64 allocated_asset_count = 2; + */ + protected $allocated_asset_count = 0; + /** + * Set of per-nodetype allocation records + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ReportSummary.SoleTenantNodeAllocation node_allocations = 3; + */ + private $node_allocations; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $allocated_regions + * Set of regions in which the assets are allocated + * @type int|string $allocated_asset_count + * Count of assets which are allocated + * @type array<\Google\Cloud\MigrationCenter\V1\ReportSummary\SoleTenantNodeAllocation>|\Google\Protobuf\Internal\RepeatedField $node_allocations + * Set of per-nodetype allocation records + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Set of regions in which the assets are allocated + * + * Generated from protobuf field repeated string allocated_regions = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAllocatedRegions() + { + return $this->allocated_regions; + } + + /** + * Set of regions in which the assets are allocated + * + * Generated from protobuf field repeated string allocated_regions = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAllocatedRegions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->allocated_regions = $arr; + + return $this; + } + + /** + * Count of assets which are allocated + * + * Generated from protobuf field int64 allocated_asset_count = 2; + * @return int|string + */ + public function getAllocatedAssetCount() + { + return $this->allocated_asset_count; + } + + /** + * Count of assets which are allocated + * + * Generated from protobuf field int64 allocated_asset_count = 2; + * @param int|string $var + * @return $this + */ + public function setAllocatedAssetCount($var) + { + GPBUtil::checkInt64($var); + $this->allocated_asset_count = $var; + + return $this; + } + + /** + * Set of per-nodetype allocation records + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ReportSummary.SoleTenantNodeAllocation node_allocations = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNodeAllocations() + { + return $this->node_allocations; + } + + /** + * Set of per-nodetype allocation records + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ReportSummary.SoleTenantNodeAllocation node_allocations = 3; + * @param array<\Google\Cloud\MigrationCenter\V1\ReportSummary\SoleTenantNodeAllocation>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNodeAllocations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\ReportSummary\SoleTenantNodeAllocation::class); + $this->node_allocations = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SoleTenantFinding::class, \Google\Cloud\MigrationCenter\V1\ReportSummary_SoleTenantFinding::class); + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/SoleTenantNodeAllocation.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/SoleTenantNodeAllocation.php new file mode 100644 index 000000000000..019fb4f70b41 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/SoleTenantNodeAllocation.php @@ -0,0 +1,148 @@ +google.cloud.migrationcenter.v1.ReportSummary.SoleTenantNodeAllocation + */ +class SoleTenantNodeAllocation extends \Google\Protobuf\Internal\Message +{ + /** + * Sole Tenant node type, e.g. "m3-node-128-3904" + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.SoleTenantNodeType node = 1; + */ + protected $node = null; + /** + * Count of this node type to be provisioned + * + * Generated from protobuf field int64 node_count = 2; + */ + protected $node_count = 0; + /** + * Count of assets allocated to these nodes + * + * Generated from protobuf field int64 allocated_asset_count = 3; + */ + protected $allocated_asset_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\MigrationCenter\V1\SoleTenantNodeType $node + * Sole Tenant node type, e.g. "m3-node-128-3904" + * @type int|string $node_count + * Count of this node type to be provisioned + * @type int|string $allocated_asset_count + * Count of assets allocated to these nodes + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Sole Tenant node type, e.g. "m3-node-128-3904" + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.SoleTenantNodeType node = 1; + * @return \Google\Cloud\MigrationCenter\V1\SoleTenantNodeType|null + */ + public function getNode() + { + return $this->node; + } + + public function hasNode() + { + return isset($this->node); + } + + public function clearNode() + { + unset($this->node); + } + + /** + * Sole Tenant node type, e.g. "m3-node-128-3904" + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.SoleTenantNodeType node = 1; + * @param \Google\Cloud\MigrationCenter\V1\SoleTenantNodeType $var + * @return $this + */ + public function setNode($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\SoleTenantNodeType::class); + $this->node = $var; + + return $this; + } + + /** + * Count of this node type to be provisioned + * + * Generated from protobuf field int64 node_count = 2; + * @return int|string + */ + public function getNodeCount() + { + return $this->node_count; + } + + /** + * Count of this node type to be provisioned + * + * Generated from protobuf field int64 node_count = 2; + * @param int|string $var + * @return $this + */ + public function setNodeCount($var) + { + GPBUtil::checkInt64($var); + $this->node_count = $var; + + return $this; + } + + /** + * Count of assets allocated to these nodes + * + * Generated from protobuf field int64 allocated_asset_count = 3; + * @return int|string + */ + public function getAllocatedAssetCount() + { + return $this->allocated_asset_count; + } + + /** + * Count of assets allocated to these nodes + * + * Generated from protobuf field int64 allocated_asset_count = 3; + * @param int|string $var + * @return $this + */ + public function setAllocatedAssetCount($var) + { + GPBUtil::checkInt64($var); + $this->allocated_asset_count = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SoleTenantNodeAllocation::class, \Google\Cloud\MigrationCenter\V1\ReportSummary_SoleTenantNodeAllocation::class); + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/UtilizationChartData.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/UtilizationChartData.php new file mode 100644 index 000000000000..7f3104415ff6 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/UtilizationChartData.php @@ -0,0 +1,105 @@ +google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData + */ +class UtilizationChartData extends \Google\Protobuf\Internal\Message +{ + /** + * Aggregate value which falls into the "Used" bucket. + * + * Generated from protobuf field int64 used = 1; + */ + protected $used = 0; + /** + * Aggregate value which falls into the "Free" bucket. + * + * Generated from protobuf field int64 free = 2; + */ + protected $free = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $used + * Aggregate value which falls into the "Used" bucket. + * @type int|string $free + * Aggregate value which falls into the "Free" bucket. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Aggregate value which falls into the "Used" bucket. + * + * Generated from protobuf field int64 used = 1; + * @return int|string + */ + public function getUsed() + { + return $this->used; + } + + /** + * Aggregate value which falls into the "Used" bucket. + * + * Generated from protobuf field int64 used = 1; + * @param int|string $var + * @return $this + */ + public function setUsed($var) + { + GPBUtil::checkInt64($var); + $this->used = $var; + + return $this; + } + + /** + * Aggregate value which falls into the "Free" bucket. + * + * Generated from protobuf field int64 free = 2; + * @return int|string + */ + public function getFree() + { + return $this->free; + } + + /** + * Aggregate value which falls into the "Free" bucket. + * + * Generated from protobuf field int64 free = 2; + * @param int|string $var + * @return $this + */ + public function setFree($var) + { + GPBUtil::checkInt64($var); + $this->free = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(UtilizationChartData::class, \Google\Cloud\MigrationCenter\V1\ReportSummary_UtilizationChartData::class); + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/VmwareEngineFinding.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/VmwareEngineFinding.php new file mode 100644 index 000000000000..dc870baba1ef --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/VmwareEngineFinding.php @@ -0,0 +1,138 @@ +google.cloud.migrationcenter.v1.ReportSummary.VmwareEngineFinding + */ +class VmwareEngineFinding extends \Google\Protobuf\Internal\Message +{ + /** + * Set of regions in which the assets were allocated + * + * Generated from protobuf field repeated string allocated_regions = 1; + */ + private $allocated_regions; + /** + * Count of assets which are allocated + * + * Generated from protobuf field int64 allocated_asset_count = 2; + */ + protected $allocated_asset_count = 0; + /** + * Set of per-nodetype allocation records + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ReportSummary.VmwareNodeAllocation node_allocations = 3; + */ + private $node_allocations; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $allocated_regions + * Set of regions in which the assets were allocated + * @type int|string $allocated_asset_count + * Count of assets which are allocated + * @type array<\Google\Cloud\MigrationCenter\V1\ReportSummary\VmwareNodeAllocation>|\Google\Protobuf\Internal\RepeatedField $node_allocations + * Set of per-nodetype allocation records + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Set of regions in which the assets were allocated + * + * Generated from protobuf field repeated string allocated_regions = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAllocatedRegions() + { + return $this->allocated_regions; + } + + /** + * Set of regions in which the assets were allocated + * + * Generated from protobuf field repeated string allocated_regions = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAllocatedRegions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->allocated_regions = $arr; + + return $this; + } + + /** + * Count of assets which are allocated + * + * Generated from protobuf field int64 allocated_asset_count = 2; + * @return int|string + */ + public function getAllocatedAssetCount() + { + return $this->allocated_asset_count; + } + + /** + * Count of assets which are allocated + * + * Generated from protobuf field int64 allocated_asset_count = 2; + * @param int|string $var + * @return $this + */ + public function setAllocatedAssetCount($var) + { + GPBUtil::checkInt64($var); + $this->allocated_asset_count = $var; + + return $this; + } + + /** + * Set of per-nodetype allocation records + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ReportSummary.VmwareNodeAllocation node_allocations = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNodeAllocations() + { + return $this->node_allocations; + } + + /** + * Set of per-nodetype allocation records + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ReportSummary.VmwareNodeAllocation node_allocations = 3; + * @param array<\Google\Cloud\MigrationCenter\V1\ReportSummary\VmwareNodeAllocation>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNodeAllocations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\ReportSummary\VmwareNodeAllocation::class); + $this->node_allocations = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(VmwareEngineFinding::class, \Google\Cloud\MigrationCenter\V1\ReportSummary_VmwareEngineFinding::class); + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/VmwareNode.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/VmwareNode.php new file mode 100644 index 000000000000..9a0dfe332a7c --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/VmwareNode.php @@ -0,0 +1,78 @@ +google.cloud.migrationcenter.v1.ReportSummary.VmwareNode + */ +class VmwareNode extends \Google\Protobuf\Internal\Message +{ + /** + * Code to identify VMware Engine node series, e.g. "ve1-standard-72". Based + * on the displayName of + * cloud.google.com/vmware-engine/docs/reference/rest/v1/projects.locations.nodeTypes + * + * Generated from protobuf field string code = 1; + */ + protected $code = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $code + * Code to identify VMware Engine node series, e.g. "ve1-standard-72". Based + * on the displayName of + * cloud.google.com/vmware-engine/docs/reference/rest/v1/projects.locations.nodeTypes + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Code to identify VMware Engine node series, e.g. "ve1-standard-72". Based + * on the displayName of + * cloud.google.com/vmware-engine/docs/reference/rest/v1/projects.locations.nodeTypes + * + * Generated from protobuf field string code = 1; + * @return string + */ + public function getCode() + { + return $this->code; + } + + /** + * Code to identify VMware Engine node series, e.g. "ve1-standard-72". Based + * on the displayName of + * cloud.google.com/vmware-engine/docs/reference/rest/v1/projects.locations.nodeTypes + * + * Generated from protobuf field string code = 1; + * @param string $var + * @return $this + */ + public function setCode($var) + { + GPBUtil::checkString($var, True); + $this->code = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(VmwareNode::class, \Google\Cloud\MigrationCenter\V1\ReportSummary_VmwareNode::class); + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/VmwareNodeAllocation.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/VmwareNodeAllocation.php new file mode 100644 index 000000000000..376a758d9bc5 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/VmwareNodeAllocation.php @@ -0,0 +1,148 @@ +google.cloud.migrationcenter.v1.ReportSummary.VmwareNodeAllocation + */ +class VmwareNodeAllocation extends \Google\Protobuf\Internal\Message +{ + /** + * VMWare node type, e.g. "ve1-standard-72" + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ReportSummary.VmwareNode vmware_node = 1; + */ + protected $vmware_node = null; + /** + * Count of this node type to be provisioned + * + * Generated from protobuf field int64 node_count = 2; + */ + protected $node_count = 0; + /** + * Count of assets allocated to these nodes + * + * Generated from protobuf field int64 allocated_asset_count = 3; + */ + protected $allocated_asset_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\MigrationCenter\V1\ReportSummary\VmwareNode $vmware_node + * VMWare node type, e.g. "ve1-standard-72" + * @type int|string $node_count + * Count of this node type to be provisioned + * @type int|string $allocated_asset_count + * Count of assets allocated to these nodes + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * VMWare node type, e.g. "ve1-standard-72" + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ReportSummary.VmwareNode vmware_node = 1; + * @return \Google\Cloud\MigrationCenter\V1\ReportSummary\VmwareNode|null + */ + public function getVmwareNode() + { + return $this->vmware_node; + } + + public function hasVmwareNode() + { + return isset($this->vmware_node); + } + + public function clearVmwareNode() + { + unset($this->vmware_node); + } + + /** + * VMWare node type, e.g. "ve1-standard-72" + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ReportSummary.VmwareNode vmware_node = 1; + * @param \Google\Cloud\MigrationCenter\V1\ReportSummary\VmwareNode $var + * @return $this + */ + public function setVmwareNode($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\ReportSummary\VmwareNode::class); + $this->vmware_node = $var; + + return $this; + } + + /** + * Count of this node type to be provisioned + * + * Generated from protobuf field int64 node_count = 2; + * @return int|string + */ + public function getNodeCount() + { + return $this->node_count; + } + + /** + * Count of this node type to be provisioned + * + * Generated from protobuf field int64 node_count = 2; + * @param int|string $var + * @return $this + */ + public function setNodeCount($var) + { + GPBUtil::checkInt64($var); + $this->node_count = $var; + + return $this; + } + + /** + * Count of assets allocated to these nodes + * + * Generated from protobuf field int64 allocated_asset_count = 3; + * @return int|string + */ + public function getAllocatedAssetCount() + { + return $this->allocated_asset_count; + } + + /** + * Count of assets allocated to these nodes + * + * Generated from protobuf field int64 allocated_asset_count = 3; + * @param int|string $var + * @return $this + */ + public function setAllocatedAssetCount($var) + { + GPBUtil::checkInt64($var); + $this->allocated_asset_count = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(VmwareNodeAllocation::class, \Google\Cloud\MigrationCenter\V1\ReportSummary_VmwareNodeAllocation::class); + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportView.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportView.php new file mode 100644 index 000000000000..8aa6a7e13acb --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportView.php @@ -0,0 +1,73 @@ +google.cloud.migrationcenter.v1.ReportView + */ +class ReportView +{ + /** + * The report view is not specified. The API displays the basic view by + * default. + * + * Generated from protobuf enum REPORT_VIEW_UNSPECIFIED = 0; + */ + const REPORT_VIEW_UNSPECIFIED = 0; + /** + * The report view includes only basic metadata of the Report. Useful for + * list views. + * + * Generated from protobuf enum REPORT_VIEW_BASIC = 1; + */ + const REPORT_VIEW_BASIC = 1; + /** + * The report view includes all the metadata of the Report. Useful for + * preview. + * + * Generated from protobuf enum REPORT_VIEW_FULL = 2; + */ + const REPORT_VIEW_FULL = 2; + /** + * The report view includes the standard metadata of an report. Useful for + * detail view. + * + * Generated from protobuf enum REPORT_VIEW_STANDARD = 3; + */ + const REPORT_VIEW_STANDARD = 3; + + private static $valueToName = [ + self::REPORT_VIEW_UNSPECIFIED => 'REPORT_VIEW_UNSPECIFIED', + self::REPORT_VIEW_BASIC => 'REPORT_VIEW_BASIC', + self::REPORT_VIEW_FULL => 'REPORT_VIEW_FULL', + self::REPORT_VIEW_STANDARD => 'REPORT_VIEW_STANDARD', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/RunImportJobRequest.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/RunImportJobRequest.php new file mode 100644 index 000000000000..08b377a9b4b1 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/RunImportJobRequest.php @@ -0,0 +1,155 @@ +google.cloud.migrationcenter.v1.RunImportJobRequest + */ +class RunImportJobRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the import job to run. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param string $name Required. The name of the import job to run. Please see + * {@see MigrationCenterClient::importJobName()} for help formatting this field. + * + * @return \Google\Cloud\MigrationCenter\V1\RunImportJobRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the import job to run. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the import job to run. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the import job to run. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/RunningProcess.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/RunningProcess.php new file mode 100644 index 000000000000..6d196f7fad00 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/RunningProcess.php @@ -0,0 +1,203 @@ +google.cloud.migrationcenter.v1.RunningProcess + */ +class RunningProcess extends \Google\Protobuf\Internal\Message +{ + /** + * Process ID. + * + * Generated from protobuf field int64 pid = 1; + */ + protected $pid = 0; + /** + * Process binary path. + * + * Generated from protobuf field string exe_path = 2; + */ + protected $exe_path = ''; + /** + * Process full command line. + * + * Generated from protobuf field string cmdline = 3; + */ + protected $cmdline = ''; + /** + * User running the process. + * + * Generated from protobuf field string user = 4; + */ + protected $user = ''; + /** + * Process extended attributes. + * + * Generated from protobuf field map attributes = 100; + */ + private $attributes; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $pid + * Process ID. + * @type string $exe_path + * Process binary path. + * @type string $cmdline + * Process full command line. + * @type string $user + * User running the process. + * @type array|\Google\Protobuf\Internal\MapField $attributes + * Process extended attributes. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Process ID. + * + * Generated from protobuf field int64 pid = 1; + * @return int|string + */ + public function getPid() + { + return $this->pid; + } + + /** + * Process ID. + * + * Generated from protobuf field int64 pid = 1; + * @param int|string $var + * @return $this + */ + public function setPid($var) + { + GPBUtil::checkInt64($var); + $this->pid = $var; + + return $this; + } + + /** + * Process binary path. + * + * Generated from protobuf field string exe_path = 2; + * @return string + */ + public function getExePath() + { + return $this->exe_path; + } + + /** + * Process binary path. + * + * Generated from protobuf field string exe_path = 2; + * @param string $var + * @return $this + */ + public function setExePath($var) + { + GPBUtil::checkString($var, True); + $this->exe_path = $var; + + return $this; + } + + /** + * Process full command line. + * + * Generated from protobuf field string cmdline = 3; + * @return string + */ + public function getCmdline() + { + return $this->cmdline; + } + + /** + * Process full command line. + * + * Generated from protobuf field string cmdline = 3; + * @param string $var + * @return $this + */ + public function setCmdline($var) + { + GPBUtil::checkString($var, True); + $this->cmdline = $var; + + return $this; + } + + /** + * User running the process. + * + * Generated from protobuf field string user = 4; + * @return string + */ + public function getUser() + { + return $this->user; + } + + /** + * User running the process. + * + * Generated from protobuf field string user = 4; + * @param string $var + * @return $this + */ + public function setUser($var) + { + GPBUtil::checkString($var, True); + $this->user = $var; + + return $this; + } + + /** + * Process extended attributes. + * + * Generated from protobuf field map attributes = 100; + * @return \Google\Protobuf\Internal\MapField + */ + public function getAttributes() + { + return $this->attributes; + } + + /** + * Process extended attributes. + * + * Generated from protobuf field map attributes = 100; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setAttributes($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->attributes = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/RunningProcessList.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/RunningProcessList.php new file mode 100644 index 000000000000..2db4b45ee7cb --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/RunningProcessList.php @@ -0,0 +1,67 @@ +google.cloud.migrationcenter.v1.RunningProcessList + */ +class RunningProcessList extends \Google\Protobuf\Internal\Message +{ + /** + * Running process entries. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.RunningProcess entries = 1; + */ + private $entries; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\MigrationCenter\V1\RunningProcess>|\Google\Protobuf\Internal\RepeatedField $entries + * Running process entries. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Running process entries. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.RunningProcess entries = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEntries() + { + return $this->entries; + } + + /** + * Running process entries. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.RunningProcess entries = 1; + * @param array<\Google\Cloud\MigrationCenter\V1\RunningProcess>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEntries($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\RunningProcess::class); + $this->entries = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/RunningService.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/RunningService.php new file mode 100644 index 000000000000..6a7eb69330a9 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/RunningService.php @@ -0,0 +1,237 @@ +google.cloud.migrationcenter.v1.RunningService + */ +class RunningService extends \Google\Protobuf\Internal\Message +{ + /** + * Service name. + * + * Generated from protobuf field string service_name = 1; + */ + protected $service_name = ''; + /** + * Service state (OS-agnostic). + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.RunningService.State state = 2; + */ + protected $state = 0; + /** + * Service start mode (OS-agnostic). + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.RunningService.StartMode start_mode = 3; + */ + protected $start_mode = 0; + /** + * Service binary path. + * + * Generated from protobuf field string exe_path = 4; + */ + protected $exe_path = ''; + /** + * Service command line. + * + * Generated from protobuf field string cmdline = 5; + */ + protected $cmdline = ''; + /** + * Service pid. + * + * Generated from protobuf field int64 pid = 6; + */ + protected $pid = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $service_name + * Service name. + * @type int $state + * Service state (OS-agnostic). + * @type int $start_mode + * Service start mode (OS-agnostic). + * @type string $exe_path + * Service binary path. + * @type string $cmdline + * Service command line. + * @type int|string $pid + * Service pid. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Service name. + * + * Generated from protobuf field string service_name = 1; + * @return string + */ + public function getServiceName() + { + return $this->service_name; + } + + /** + * Service name. + * + * Generated from protobuf field string service_name = 1; + * @param string $var + * @return $this + */ + public function setServiceName($var) + { + GPBUtil::checkString($var, True); + $this->service_name = $var; + + return $this; + } + + /** + * Service state (OS-agnostic). + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.RunningService.State state = 2; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Service state (OS-agnostic). + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.RunningService.State state = 2; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\MigrationCenter\V1\RunningService\State::class); + $this->state = $var; + + return $this; + } + + /** + * Service start mode (OS-agnostic). + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.RunningService.StartMode start_mode = 3; + * @return int + */ + public function getStartMode() + { + return $this->start_mode; + } + + /** + * Service start mode (OS-agnostic). + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.RunningService.StartMode start_mode = 3; + * @param int $var + * @return $this + */ + public function setStartMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\MigrationCenter\V1\RunningService\StartMode::class); + $this->start_mode = $var; + + return $this; + } + + /** + * Service binary path. + * + * Generated from protobuf field string exe_path = 4; + * @return string + */ + public function getExePath() + { + return $this->exe_path; + } + + /** + * Service binary path. + * + * Generated from protobuf field string exe_path = 4; + * @param string $var + * @return $this + */ + public function setExePath($var) + { + GPBUtil::checkString($var, True); + $this->exe_path = $var; + + return $this; + } + + /** + * Service command line. + * + * Generated from protobuf field string cmdline = 5; + * @return string + */ + public function getCmdline() + { + return $this->cmdline; + } + + /** + * Service command line. + * + * Generated from protobuf field string cmdline = 5; + * @param string $var + * @return $this + */ + public function setCmdline($var) + { + GPBUtil::checkString($var, True); + $this->cmdline = $var; + + return $this; + } + + /** + * Service pid. + * + * Generated from protobuf field int64 pid = 6; + * @return int|string + */ + public function getPid() + { + return $this->pid; + } + + /** + * Service pid. + * + * Generated from protobuf field int64 pid = 6; + * @param int|string $var + * @return $this + */ + public function setPid($var) + { + GPBUtil::checkInt64($var); + $this->pid = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/RunningService/StartMode.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/RunningService/StartMode.php new file mode 100644 index 000000000000..76bc7f88e836 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/RunningService/StartMode.php @@ -0,0 +1,85 @@ +google.cloud.migrationcenter.v1.RunningService.StartMode + */ +class StartMode +{ + /** + * Start mode unspecified. + * + * Generated from protobuf enum START_MODE_UNSPECIFIED = 0; + */ + const START_MODE_UNSPECIFIED = 0; + /** + * The service is a device driver started by the system loader. + * + * Generated from protobuf enum BOOT = 1; + */ + const BOOT = 1; + /** + * The service is a device driver started by the IOInitSystem function. + * + * Generated from protobuf enum SYSTEM = 2; + */ + const SYSTEM = 2; + /** + * The service is started by the operating system, at system start-up + * + * Generated from protobuf enum AUTO = 3; + */ + const AUTO = 3; + /** + * The service is started only manually, by a user. + * + * Generated from protobuf enum MANUAL = 4; + */ + const MANUAL = 4; + /** + * The service is disabled. + * + * Generated from protobuf enum DISABLED = 5; + */ + const DISABLED = 5; + + private static $valueToName = [ + self::START_MODE_UNSPECIFIED => 'START_MODE_UNSPECIFIED', + self::BOOT => 'BOOT', + self::SYSTEM => 'SYSTEM', + self::AUTO => 'AUTO', + self::MANUAL => 'MANUAL', + self::DISABLED => 'DISABLED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(StartMode::class, \Google\Cloud\MigrationCenter\V1\RunningService_StartMode::class); + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/RunningService/State.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/RunningService/State.php new file mode 100644 index 000000000000..4c55cf16bf6f --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/RunningService/State.php @@ -0,0 +1,71 @@ +google.cloud.migrationcenter.v1.RunningService.State + */ +class State +{ + /** + * Service state unspecified. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Service is active. + * + * Generated from protobuf enum ACTIVE = 1; + */ + const ACTIVE = 1; + /** + * Service is paused. + * + * Generated from protobuf enum PAUSED = 2; + */ + const PAUSED = 2; + /** + * Service is stopped. + * + * Generated from protobuf enum STOPPED = 3; + */ + const STOPPED = 3; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::ACTIVE => 'ACTIVE', + self::PAUSED => 'PAUSED', + self::STOPPED => 'STOPPED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\MigrationCenter\V1\RunningService_State::class); + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/RunningServiceList.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/RunningServiceList.php new file mode 100644 index 000000000000..ae8c30df576d --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/RunningServiceList.php @@ -0,0 +1,67 @@ +google.cloud.migrationcenter.v1.RunningServiceList + */ +class RunningServiceList extends \Google\Protobuf\Internal\Message +{ + /** + * Running service entries. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.RunningService entries = 1; + */ + private $entries; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\MigrationCenter\V1\RunningService>|\Google\Protobuf\Internal\RepeatedField $entries + * Running service entries. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Running service entries. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.RunningService entries = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEntries() + { + return $this->entries; + } + + /** + * Running service entries. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.RunningService entries = 1; + * @param array<\Google\Cloud\MigrationCenter\V1\RunningService>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEntries($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\RunningService::class); + $this->entries = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/RuntimeNetworkInfo.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/RuntimeNetworkInfo.php new file mode 100644 index 000000000000..49549af0d98f --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/RuntimeNetworkInfo.php @@ -0,0 +1,121 @@ +google.cloud.migrationcenter.v1.RuntimeNetworkInfo + */ +class RuntimeNetworkInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Time of the last network scan. + * + * Generated from protobuf field .google.protobuf.Timestamp scan_time = 1; + */ + protected $scan_time = null; + /** + * Network connections. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.NetworkConnectionList connections = 2; + */ + protected $connections = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $scan_time + * Time of the last network scan. + * @type \Google\Cloud\MigrationCenter\V1\NetworkConnectionList $connections + * Network connections. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Time of the last network scan. + * + * Generated from protobuf field .google.protobuf.Timestamp scan_time = 1; + * @return \Google\Protobuf\Timestamp|null + */ + public function getScanTime() + { + return $this->scan_time; + } + + public function hasScanTime() + { + return isset($this->scan_time); + } + + public function clearScanTime() + { + unset($this->scan_time); + } + + /** + * Time of the last network scan. + * + * Generated from protobuf field .google.protobuf.Timestamp scan_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setScanTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->scan_time = $var; + + return $this; + } + + /** + * Network connections. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.NetworkConnectionList connections = 2; + * @return \Google\Cloud\MigrationCenter\V1\NetworkConnectionList|null + */ + public function getConnections() + { + return $this->connections; + } + + public function hasConnections() + { + return isset($this->connections); + } + + public function clearConnections() + { + unset($this->connections); + } + + /** + * Network connections. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.NetworkConnectionList connections = 2; + * @param \Google\Cloud\MigrationCenter\V1\NetworkConnectionList $var + * @return $this + */ + public function setConnections($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\NetworkConnectionList::class); + $this->connections = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Settings.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Settings.php new file mode 100644 index 000000000000..59797b9d8491 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Settings.php @@ -0,0 +1,101 @@ +google.cloud.migrationcenter.v1.Settings + */ +class Settings extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The name of the resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * The preference set used by default for a project. + * + * Generated from protobuf field string preference_set = 2 [(.google.api.resource_reference) = { + */ + protected $preference_set = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The name of the resource. + * @type string $preference_set + * The preference set used by default for a project. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The name of the resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The name of the resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The preference set used by default for a project. + * + * Generated from protobuf field string preference_set = 2 [(.google.api.resource_reference) = { + * @return string + */ + public function getPreferenceSet() + { + return $this->preference_set; + } + + /** + * The preference set used by default for a project. + * + * Generated from protobuf field string preference_set = 2 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setPreferenceSet($var) + { + GPBUtil::checkString($var, True); + $this->preference_set = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/SizingOptimizationStrategy.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/SizingOptimizationStrategy.php new file mode 100644 index 000000000000..6ac0e00cbf69 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/SizingOptimizationStrategy.php @@ -0,0 +1,74 @@ +google.cloud.migrationcenter.v1.SizingOptimizationStrategy + */ +class SizingOptimizationStrategy +{ + /** + * Unspecified (default value). + * + * Generated from protobuf enum SIZING_OPTIMIZATION_STRATEGY_UNSPECIFIED = 0; + */ + const SIZING_OPTIMIZATION_STRATEGY_UNSPECIFIED = 0; + /** + * No optimization applied. Virtual machine sizing matches as closely as + * possible the machine shape on the source site, not considering any actual + * performance data. + * + * Generated from protobuf enum SIZING_OPTIMIZATION_STRATEGY_SAME_AS_SOURCE = 1; + */ + const SIZING_OPTIMIZATION_STRATEGY_SAME_AS_SOURCE = 1; + /** + * Virtual machine sizing will match the reported usage and shape, with some + * slack. This a good value to start with. + * + * Generated from protobuf enum SIZING_OPTIMIZATION_STRATEGY_MODERATE = 2; + */ + const SIZING_OPTIMIZATION_STRATEGY_MODERATE = 2; + /** + * Virtual machine sizing will match the reported usage, with little slack. + * Using this option can help reduce costs. + * + * Generated from protobuf enum SIZING_OPTIMIZATION_STRATEGY_AGGRESSIVE = 3; + */ + const SIZING_OPTIMIZATION_STRATEGY_AGGRESSIVE = 3; + + private static $valueToName = [ + self::SIZING_OPTIMIZATION_STRATEGY_UNSPECIFIED => 'SIZING_OPTIMIZATION_STRATEGY_UNSPECIFIED', + self::SIZING_OPTIMIZATION_STRATEGY_SAME_AS_SOURCE => 'SIZING_OPTIMIZATION_STRATEGY_SAME_AS_SOURCE', + self::SIZING_OPTIMIZATION_STRATEGY_MODERATE => 'SIZING_OPTIMIZATION_STRATEGY_MODERATE', + self::SIZING_OPTIMIZATION_STRATEGY_AGGRESSIVE => 'SIZING_OPTIMIZATION_STRATEGY_AGGRESSIVE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/SoleTenancyPreferences.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/SoleTenancyPreferences.php new file mode 100644 index 000000000000..7d8d4bd37d34 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/SoleTenancyPreferences.php @@ -0,0 +1,189 @@ +google.cloud.migrationcenter.v1.SoleTenancyPreferences + */ +class SoleTenancyPreferences extends \Google\Protobuf\Internal\Message +{ + /** + * CPU overcommit ratio. + * Acceptable values are between 1.0 and 2.0 inclusive. + * + * Generated from protobuf field double cpu_overcommit_ratio = 1; + */ + protected $cpu_overcommit_ratio = 0.0; + /** + * Sole Tenancy nodes maintenance policy. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.SoleTenancyPreferences.HostMaintenancePolicy host_maintenance_policy = 2; + */ + protected $host_maintenance_policy = 0; + /** + * Commitment plan to consider when calculating costs for virtual machine + * insights and recommendations. + * If you are unsure which value to set, a 3 year commitment plan is often a + * good value to start with. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.SoleTenancyPreferences.CommitmentPlan commitment_plan = 3; + */ + protected $commitment_plan = 0; + /** + * A list of sole tenant node types. + * An empty list means that all possible node types will be considered. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.SoleTenantNodeType node_types = 4; + */ + private $node_types; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $cpu_overcommit_ratio + * CPU overcommit ratio. + * Acceptable values are between 1.0 and 2.0 inclusive. + * @type int $host_maintenance_policy + * Sole Tenancy nodes maintenance policy. + * @type int $commitment_plan + * Commitment plan to consider when calculating costs for virtual machine + * insights and recommendations. + * If you are unsure which value to set, a 3 year commitment plan is often a + * good value to start with. + * @type array<\Google\Cloud\MigrationCenter\V1\SoleTenantNodeType>|\Google\Protobuf\Internal\RepeatedField $node_types + * A list of sole tenant node types. + * An empty list means that all possible node types will be considered. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * CPU overcommit ratio. + * Acceptable values are between 1.0 and 2.0 inclusive. + * + * Generated from protobuf field double cpu_overcommit_ratio = 1; + * @return float + */ + public function getCpuOvercommitRatio() + { + return $this->cpu_overcommit_ratio; + } + + /** + * CPU overcommit ratio. + * Acceptable values are between 1.0 and 2.0 inclusive. + * + * Generated from protobuf field double cpu_overcommit_ratio = 1; + * @param float $var + * @return $this + */ + public function setCpuOvercommitRatio($var) + { + GPBUtil::checkDouble($var); + $this->cpu_overcommit_ratio = $var; + + return $this; + } + + /** + * Sole Tenancy nodes maintenance policy. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.SoleTenancyPreferences.HostMaintenancePolicy host_maintenance_policy = 2; + * @return int + */ + public function getHostMaintenancePolicy() + { + return $this->host_maintenance_policy; + } + + /** + * Sole Tenancy nodes maintenance policy. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.SoleTenancyPreferences.HostMaintenancePolicy host_maintenance_policy = 2; + * @param int $var + * @return $this + */ + public function setHostMaintenancePolicy($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\MigrationCenter\V1\SoleTenancyPreferences\HostMaintenancePolicy::class); + $this->host_maintenance_policy = $var; + + return $this; + } + + /** + * Commitment plan to consider when calculating costs for virtual machine + * insights and recommendations. + * If you are unsure which value to set, a 3 year commitment plan is often a + * good value to start with. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.SoleTenancyPreferences.CommitmentPlan commitment_plan = 3; + * @return int + */ + public function getCommitmentPlan() + { + return $this->commitment_plan; + } + + /** + * Commitment plan to consider when calculating costs for virtual machine + * insights and recommendations. + * If you are unsure which value to set, a 3 year commitment plan is often a + * good value to start with. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.SoleTenancyPreferences.CommitmentPlan commitment_plan = 3; + * @param int $var + * @return $this + */ + public function setCommitmentPlan($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\MigrationCenter\V1\SoleTenancyPreferences\CommitmentPlan::class); + $this->commitment_plan = $var; + + return $this; + } + + /** + * A list of sole tenant node types. + * An empty list means that all possible node types will be considered. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.SoleTenantNodeType node_types = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNodeTypes() + { + return $this->node_types; + } + + /** + * A list of sole tenant node types. + * An empty list means that all possible node types will be considered. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.SoleTenantNodeType node_types = 4; + * @param array<\Google\Cloud\MigrationCenter\V1\SoleTenantNodeType>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNodeTypes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\SoleTenantNodeType::class); + $this->node_types = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/SoleTenancyPreferences/CommitmentPlan.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/SoleTenancyPreferences/CommitmentPlan.php new file mode 100644 index 000000000000..3a5b64cc0477 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/SoleTenancyPreferences/CommitmentPlan.php @@ -0,0 +1,71 @@ +google.cloud.migrationcenter.v1.SoleTenancyPreferences.CommitmentPlan + */ +class CommitmentPlan +{ + /** + * Unspecified commitment plan. + * + * Generated from protobuf enum COMMITMENT_PLAN_UNSPECIFIED = 0; + */ + const COMMITMENT_PLAN_UNSPECIFIED = 0; + /** + * No commitment plan (on-demand usage). + * + * Generated from protobuf enum ON_DEMAND = 1; + */ + const ON_DEMAND = 1; + /** + * 1 year commitment. + * + * Generated from protobuf enum COMMITMENT_1_YEAR = 2; + */ + const COMMITMENT_1_YEAR = 2; + /** + * 3 years commitment. + * + * Generated from protobuf enum COMMITMENT_3_YEAR = 3; + */ + const COMMITMENT_3_YEAR = 3; + + private static $valueToName = [ + self::COMMITMENT_PLAN_UNSPECIFIED => 'COMMITMENT_PLAN_UNSPECIFIED', + self::ON_DEMAND => 'ON_DEMAND', + self::COMMITMENT_1_YEAR => 'COMMITMENT_1_YEAR', + self::COMMITMENT_3_YEAR => 'COMMITMENT_3_YEAR', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(CommitmentPlan::class, \Google\Cloud\MigrationCenter\V1\SoleTenancyPreferences_CommitmentPlan::class); + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/SoleTenancyPreferences/HostMaintenancePolicy.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/SoleTenancyPreferences/HostMaintenancePolicy.php new file mode 100644 index 000000000000..36c62c02e8c8 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/SoleTenancyPreferences/HostMaintenancePolicy.php @@ -0,0 +1,71 @@ +google.cloud.migrationcenter.v1.SoleTenancyPreferences.HostMaintenancePolicy + */ +class HostMaintenancePolicy +{ + /** + * Unspecified host maintenance policy. + * + * Generated from protobuf enum HOST_MAINTENANCE_POLICY_UNSPECIFIED = 0; + */ + const HOST_MAINTENANCE_POLICY_UNSPECIFIED = 0; + /** + * Default host maintenance policy. + * + * Generated from protobuf enum HOST_MAINTENANCE_POLICY_DEFAULT = 1; + */ + const HOST_MAINTENANCE_POLICY_DEFAULT = 1; + /** + * Restart in place host maintenance policy. + * + * Generated from protobuf enum HOST_MAINTENANCE_POLICY_RESTART_IN_PLACE = 2; + */ + const HOST_MAINTENANCE_POLICY_RESTART_IN_PLACE = 2; + /** + * Migrate within node group host maintenance policy. + * + * Generated from protobuf enum HOST_MAINTENANCE_POLICY_MIGRATE_WITHIN_NODE_GROUP = 3; + */ + const HOST_MAINTENANCE_POLICY_MIGRATE_WITHIN_NODE_GROUP = 3; + + private static $valueToName = [ + self::HOST_MAINTENANCE_POLICY_UNSPECIFIED => 'HOST_MAINTENANCE_POLICY_UNSPECIFIED', + self::HOST_MAINTENANCE_POLICY_DEFAULT => 'HOST_MAINTENANCE_POLICY_DEFAULT', + self::HOST_MAINTENANCE_POLICY_RESTART_IN_PLACE => 'HOST_MAINTENANCE_POLICY_RESTART_IN_PLACE', + self::HOST_MAINTENANCE_POLICY_MIGRATE_WITHIN_NODE_GROUP => 'HOST_MAINTENANCE_POLICY_MIGRATE_WITHIN_NODE_GROUP', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(HostMaintenancePolicy::class, \Google\Cloud\MigrationCenter\V1\SoleTenancyPreferences_HostMaintenancePolicy::class); + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/SoleTenantNodeType.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/SoleTenantNodeType.php new file mode 100644 index 000000000000..de2a0dc41427 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/SoleTenantNodeType.php @@ -0,0 +1,71 @@ +google.cloud.migrationcenter.v1.SoleTenantNodeType + */ +class SoleTenantNodeType extends \Google\Protobuf\Internal\Message +{ + /** + * Name of the Sole Tenant node. Consult + * https://cloud.google.com/compute/docs/nodes/sole-tenant-nodes + * + * Generated from protobuf field string node_name = 1; + */ + protected $node_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $node_name + * Name of the Sole Tenant node. Consult + * https://cloud.google.com/compute/docs/nodes/sole-tenant-nodes + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Name of the Sole Tenant node. Consult + * https://cloud.google.com/compute/docs/nodes/sole-tenant-nodes + * + * Generated from protobuf field string node_name = 1; + * @return string + */ + public function getNodeName() + { + return $this->node_name; + } + + /** + * Name of the Sole Tenant node. Consult + * https://cloud.google.com/compute/docs/nodes/sole-tenant-nodes + * + * Generated from protobuf field string node_name = 1; + * @param string $var + * @return $this + */ + public function setNodeName($var) + { + GPBUtil::checkString($var, True); + $this->node_name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Source.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Source.php new file mode 100644 index 000000000000..52c94434e41e --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Source.php @@ -0,0 +1,436 @@ +google.cloud.migrationcenter.v1.Source + */ +class Source extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The full name of the source. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. The timestamp when the source was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The timestamp when the source was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * User-friendly display name. + * + * Generated from protobuf field string display_name = 4; + */ + protected $display_name = ''; + /** + * Free-text description. + * + * Generated from protobuf field string description = 5; + */ + protected $description = ''; + /** + * Data source type. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.Source.SourceType type = 6; + */ + protected $type = 0; + /** + * The information confidence of the source. + * The higher the value, the higher the confidence. + * + * Generated from protobuf field int32 priority = 7; + */ + protected $priority = 0; + /** + * If `true`, the source is managed by other service(s). + * + * Generated from protobuf field bool managed = 8; + */ + protected $managed = false; + /** + * Output only. Number of frames that are still being processed. + * + * Generated from protobuf field int32 pending_frame_count = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $pending_frame_count = 0; + /** + * Output only. The number of frames that were reported by the source and + * contained errors. + * + * Generated from protobuf field int32 error_frame_count = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $error_frame_count = 0; + /** + * Output only. The state of the source. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.Source.State state = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The full name of the source. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The timestamp when the source was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The timestamp when the source was last updated. + * @type string $display_name + * User-friendly display name. + * @type string $description + * Free-text description. + * @type int $type + * Data source type. + * @type int $priority + * The information confidence of the source. + * The higher the value, the higher the confidence. + * @type bool $managed + * If `true`, the source is managed by other service(s). + * @type int $pending_frame_count + * Output only. Number of frames that are still being processed. + * @type int $error_frame_count + * Output only. The number of frames that were reported by the source and + * contained errors. + * @type int $state + * Output only. The state of the source. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The full name of the source. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The full name of the source. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The timestamp when the source was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The timestamp when the source was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The timestamp when the source was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The timestamp when the source was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * User-friendly display name. + * + * Generated from protobuf field string display_name = 4; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * User-friendly display name. + * + * Generated from protobuf field string display_name = 4; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Free-text description. + * + * Generated from protobuf field string description = 5; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Free-text description. + * + * Generated from protobuf field string description = 5; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Data source type. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.Source.SourceType type = 6; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Data source type. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.Source.SourceType type = 6; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\MigrationCenter\V1\Source\SourceType::class); + $this->type = $var; + + return $this; + } + + /** + * The information confidence of the source. + * The higher the value, the higher the confidence. + * + * Generated from protobuf field int32 priority = 7; + * @return int + */ + public function getPriority() + { + return $this->priority; + } + + /** + * The information confidence of the source. + * The higher the value, the higher the confidence. + * + * Generated from protobuf field int32 priority = 7; + * @param int $var + * @return $this + */ + public function setPriority($var) + { + GPBUtil::checkInt32($var); + $this->priority = $var; + + return $this; + } + + /** + * If `true`, the source is managed by other service(s). + * + * Generated from protobuf field bool managed = 8; + * @return bool + */ + public function getManaged() + { + return $this->managed; + } + + /** + * If `true`, the source is managed by other service(s). + * + * Generated from protobuf field bool managed = 8; + * @param bool $var + * @return $this + */ + public function setManaged($var) + { + GPBUtil::checkBool($var); + $this->managed = $var; + + return $this; + } + + /** + * Output only. Number of frames that are still being processed. + * + * Generated from protobuf field int32 pending_frame_count = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getPendingFrameCount() + { + return $this->pending_frame_count; + } + + /** + * Output only. Number of frames that are still being processed. + * + * Generated from protobuf field int32 pending_frame_count = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setPendingFrameCount($var) + { + GPBUtil::checkInt32($var); + $this->pending_frame_count = $var; + + return $this; + } + + /** + * Output only. The number of frames that were reported by the source and + * contained errors. + * + * Generated from protobuf field int32 error_frame_count = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getErrorFrameCount() + { + return $this->error_frame_count; + } + + /** + * Output only. The number of frames that were reported by the source and + * contained errors. + * + * Generated from protobuf field int32 error_frame_count = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setErrorFrameCount($var) + { + GPBUtil::checkInt32($var); + $this->error_frame_count = $var; + + return $this; + } + + /** + * Output only. The state of the source. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.Source.State state = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The state of the source. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.Source.State state = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\MigrationCenter\V1\Source\State::class); + $this->state = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Source/SourceType.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Source/SourceType.php new file mode 100644 index 000000000000..cfb8f6b41c2c --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Source/SourceType.php @@ -0,0 +1,76 @@ +google.cloud.migrationcenter.v1.Source.SourceType + */ +class SourceType +{ + /** + * Unspecified + * + * Generated from protobuf enum SOURCE_TYPE_UNKNOWN = 0; + */ + const SOURCE_TYPE_UNKNOWN = 0; + /** + * Manually uploaded file (e.g. CSV) + * + * Generated from protobuf enum SOURCE_TYPE_UPLOAD = 1; + */ + const SOURCE_TYPE_UPLOAD = 1; + /** + * Guest-level info + * + * Generated from protobuf enum SOURCE_TYPE_GUEST_OS_SCAN = 2; + */ + const SOURCE_TYPE_GUEST_OS_SCAN = 2; + /** + * Inventory-level scan + * + * Generated from protobuf enum SOURCE_TYPE_INVENTORY_SCAN = 3; + */ + const SOURCE_TYPE_INVENTORY_SCAN = 3; + /** + * Third-party owned sources. + * + * Generated from protobuf enum SOURCE_TYPE_CUSTOM = 4; + */ + const SOURCE_TYPE_CUSTOM = 4; + + private static $valueToName = [ + self::SOURCE_TYPE_UNKNOWN => 'SOURCE_TYPE_UNKNOWN', + self::SOURCE_TYPE_UPLOAD => 'SOURCE_TYPE_UPLOAD', + self::SOURCE_TYPE_GUEST_OS_SCAN => 'SOURCE_TYPE_GUEST_OS_SCAN', + self::SOURCE_TYPE_INVENTORY_SCAN => 'SOURCE_TYPE_INVENTORY_SCAN', + self::SOURCE_TYPE_CUSTOM => 'SOURCE_TYPE_CUSTOM', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SourceType::class, \Google\Cloud\MigrationCenter\V1\Source_SourceType::class); + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Source/State.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Source/State.php new file mode 100644 index 000000000000..4c4a472ef5d7 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Source/State.php @@ -0,0 +1,72 @@ +google.cloud.migrationcenter.v1.Source.State + */ +class State +{ + /** + * Unspecified. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The source is active and ready to be used. + * + * Generated from protobuf enum ACTIVE = 1; + */ + const ACTIVE = 1; + /** + * In the process of being deleted. + * + * Generated from protobuf enum DELETING = 2; + */ + const DELETING = 2; + /** + * Source is in an invalid state. Asset frames reported to it will be + * ignored. + * + * Generated from protobuf enum INVALID = 3; + */ + const INVALID = 3; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::ACTIVE => 'ACTIVE', + self::DELETING => 'DELETING', + self::INVALID => 'INVALID', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\MigrationCenter\V1\Source_State::class); + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/UpdateAssetRequest.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/UpdateAssetRequest.php new file mode 100644 index 000000000000..d4d95dd80c3b --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/UpdateAssetRequest.php @@ -0,0 +1,235 @@ +google.cloud.migrationcenter.v1.UpdateAssetRequest + */ +class UpdateAssetRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * `Asset` resource by the update. + * The values specified in the `update_mask` field are relative to the + * resource, not the full request. + * A field will be overwritten if it is in the mask. + * A single * value in the mask lets you to overwrite all fields. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + /** + * Required. The resource being updated. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.Asset asset = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $asset = null; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param \Google\Cloud\MigrationCenter\V1\Asset $asset Required. The resource being updated. + * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the + * `Asset` resource by the update. + * The values specified in the `update_mask` field are relative to the + * resource, not the full request. + * A field will be overwritten if it is in the mask. + * A single * value in the mask lets you to overwrite all fields. + * + * @return \Google\Cloud\MigrationCenter\V1\UpdateAssetRequest + * + * @experimental + */ + public static function build(\Google\Cloud\MigrationCenter\V1\Asset $asset, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setAsset($asset) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Required. Field mask is used to specify the fields to be overwritten in the + * `Asset` resource by the update. + * The values specified in the `update_mask` field are relative to the + * resource, not the full request. + * A field will be overwritten if it is in the mask. + * A single * value in the mask lets you to overwrite all fields. + * @type \Google\Cloud\MigrationCenter\V1\Asset $asset + * Required. The resource being updated. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * `Asset` resource by the update. + * The values specified in the `update_mask` field are relative to the + * resource, not the full request. + * A field will be overwritten if it is in the mask. + * A single * value in the mask lets you to overwrite all fields. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * `Asset` resource by the update. + * The values specified in the `update_mask` field are relative to the + * resource, not the full request. + * A field will be overwritten if it is in the mask. + * A single * value in the mask lets you to overwrite all fields. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Required. The resource being updated. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.Asset asset = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\MigrationCenter\V1\Asset|null + */ + public function getAsset() + { + return $this->asset; + } + + public function hasAsset() + { + return isset($this->asset); + } + + public function clearAsset() + { + unset($this->asset); + } + + /** + * Required. The resource being updated. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.Asset asset = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\MigrationCenter\V1\Asset $var + * @return $this + */ + public function setAsset($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\Asset::class); + $this->asset = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/UpdateGroupRequest.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/UpdateGroupRequest.php new file mode 100644 index 000000000000..2630b822fcdd --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/UpdateGroupRequest.php @@ -0,0 +1,230 @@ +google.cloud.migrationcenter.v1.UpdateGroupRequest + */ +class UpdateGroupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * `Group` resource by the update. + * The values specified in the `update_mask` are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. + * A single * value in the mask lets you to overwrite all fields. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + /** + * Required. The group resource being updated. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.Group group = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $group = null; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param \Google\Cloud\MigrationCenter\V1\Group $group Required. The group resource being updated. + * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the + * `Group` resource by the update. + * The values specified in the `update_mask` are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. + * A single * value in the mask lets you to overwrite all fields. + * + * @return \Google\Cloud\MigrationCenter\V1\UpdateGroupRequest + * + * @experimental + */ + public static function build(\Google\Cloud\MigrationCenter\V1\Group $group, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setGroup($group) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Required. Field mask is used to specify the fields to be overwritten in the + * `Group` resource by the update. + * The values specified in the `update_mask` are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. + * A single * value in the mask lets you to overwrite all fields. + * @type \Google\Cloud\MigrationCenter\V1\Group $group + * Required. The group resource being updated. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * `Group` resource by the update. + * The values specified in the `update_mask` are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. + * A single * value in the mask lets you to overwrite all fields. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * `Group` resource by the update. + * The values specified in the `update_mask` are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. + * A single * value in the mask lets you to overwrite all fields. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Required. The group resource being updated. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.Group group = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\MigrationCenter\V1\Group|null + */ + public function getGroup() + { + return $this->group; + } + + public function hasGroup() + { + return isset($this->group); + } + + public function clearGroup() + { + unset($this->group); + } + + /** + * Required. The group resource being updated. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.Group group = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\MigrationCenter\V1\Group $var + * @return $this + */ + public function setGroup($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\Group::class); + $this->group = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/UpdateImportJobRequest.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/UpdateImportJobRequest.php new file mode 100644 index 000000000000..c5f2b56e3459 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/UpdateImportJobRequest.php @@ -0,0 +1,235 @@ +google.cloud.migrationcenter.v1.UpdateImportJobRequest + */ +class UpdateImportJobRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * `Asset` resource by the update. + * The values specified in the `update_mask` field are relative to the + * resource, not the full request. + * A field will be overwritten if it is in the mask. + * A single * value in the mask lets you to overwrite all fields. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + /** + * Required. The resource being updated + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ImportJob import_job = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $import_job = null; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param \Google\Cloud\MigrationCenter\V1\ImportJob $importJob Required. The resource being updated + * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the + * `Asset` resource by the update. + * The values specified in the `update_mask` field are relative to the + * resource, not the full request. + * A field will be overwritten if it is in the mask. + * A single * value in the mask lets you to overwrite all fields. + * + * @return \Google\Cloud\MigrationCenter\V1\UpdateImportJobRequest + * + * @experimental + */ + public static function build(\Google\Cloud\MigrationCenter\V1\ImportJob $importJob, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setImportJob($importJob) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Required. Field mask is used to specify the fields to be overwritten in the + * `Asset` resource by the update. + * The values specified in the `update_mask` field are relative to the + * resource, not the full request. + * A field will be overwritten if it is in the mask. + * A single * value in the mask lets you to overwrite all fields. + * @type \Google\Cloud\MigrationCenter\V1\ImportJob $import_job + * Required. The resource being updated + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * `Asset` resource by the update. + * The values specified in the `update_mask` field are relative to the + * resource, not the full request. + * A field will be overwritten if it is in the mask. + * A single * value in the mask lets you to overwrite all fields. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * `Asset` resource by the update. + * The values specified in the `update_mask` field are relative to the + * resource, not the full request. + * A field will be overwritten if it is in the mask. + * A single * value in the mask lets you to overwrite all fields. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Required. The resource being updated + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ImportJob import_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\MigrationCenter\V1\ImportJob|null + */ + public function getImportJob() + { + return $this->import_job; + } + + public function hasImportJob() + { + return isset($this->import_job); + } + + public function clearImportJob() + { + unset($this->import_job); + } + + /** + * Required. The resource being updated + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ImportJob import_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\MigrationCenter\V1\ImportJob $var + * @return $this + */ + public function setImportJob($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\ImportJob::class); + $this->import_job = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/UpdatePreferenceSetRequest.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/UpdatePreferenceSetRequest.php new file mode 100644 index 000000000000..d8661e55c657 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/UpdatePreferenceSetRequest.php @@ -0,0 +1,235 @@ +google.cloud.migrationcenter.v1.UpdatePreferenceSetRequest + */ +class UpdatePreferenceSetRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * `PreferenceSet` resource by the update. + * The values specified in the `update_mask` field are relative to the + * resource, not the full request. + * A field will be overwritten if it is in the mask. + * A single * value in the mask lets you to overwrite all fields. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + /** + * Required. The preference set resource being updated. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.PreferenceSet preference_set = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $preference_set = null; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param \Google\Cloud\MigrationCenter\V1\PreferenceSet $preferenceSet Required. The preference set resource being updated. + * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the + * `PreferenceSet` resource by the update. + * The values specified in the `update_mask` field are relative to the + * resource, not the full request. + * A field will be overwritten if it is in the mask. + * A single * value in the mask lets you to overwrite all fields. + * + * @return \Google\Cloud\MigrationCenter\V1\UpdatePreferenceSetRequest + * + * @experimental + */ + public static function build(\Google\Cloud\MigrationCenter\V1\PreferenceSet $preferenceSet, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setPreferenceSet($preferenceSet) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Required. Field mask is used to specify the fields to be overwritten in the + * `PreferenceSet` resource by the update. + * The values specified in the `update_mask` field are relative to the + * resource, not the full request. + * A field will be overwritten if it is in the mask. + * A single * value in the mask lets you to overwrite all fields. + * @type \Google\Cloud\MigrationCenter\V1\PreferenceSet $preference_set + * Required. The preference set resource being updated. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * `PreferenceSet` resource by the update. + * The values specified in the `update_mask` field are relative to the + * resource, not the full request. + * A field will be overwritten if it is in the mask. + * A single * value in the mask lets you to overwrite all fields. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * `PreferenceSet` resource by the update. + * The values specified in the `update_mask` field are relative to the + * resource, not the full request. + * A field will be overwritten if it is in the mask. + * A single * value in the mask lets you to overwrite all fields. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Required. The preference set resource being updated. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.PreferenceSet preference_set = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\MigrationCenter\V1\PreferenceSet|null + */ + public function getPreferenceSet() + { + return $this->preference_set; + } + + public function hasPreferenceSet() + { + return isset($this->preference_set); + } + + public function clearPreferenceSet() + { + unset($this->preference_set); + } + + /** + * Required. The preference set resource being updated. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.PreferenceSet preference_set = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\MigrationCenter\V1\PreferenceSet $var + * @return $this + */ + public function setPreferenceSet($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\PreferenceSet::class); + $this->preference_set = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/UpdateSettingsRequest.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/UpdateSettingsRequest.php new file mode 100644 index 000000000000..54e7bb155722 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/UpdateSettingsRequest.php @@ -0,0 +1,235 @@ +google.cloud.migrationcenter.v1.UpdateSettingsRequest + */ +class UpdateSettingsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * `Settings` resource by the update. + * The values specified in the `update_mask` field are relative to the + * resource, not the full request. + * A field will be overwritten if it is in the mask. + * A single * value in the mask lets you to overwrite all fields. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + /** + * Required. The project settings resource being updated. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.Settings settings = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $settings = null; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param \Google\Cloud\MigrationCenter\V1\Settings $settings Required. The project settings resource being updated. + * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the + * `Settings` resource by the update. + * The values specified in the `update_mask` field are relative to the + * resource, not the full request. + * A field will be overwritten if it is in the mask. + * A single * value in the mask lets you to overwrite all fields. + * + * @return \Google\Cloud\MigrationCenter\V1\UpdateSettingsRequest + * + * @experimental + */ + public static function build(\Google\Cloud\MigrationCenter\V1\Settings $settings, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setSettings($settings) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Required. Field mask is used to specify the fields to be overwritten in the + * `Settings` resource by the update. + * The values specified in the `update_mask` field are relative to the + * resource, not the full request. + * A field will be overwritten if it is in the mask. + * A single * value in the mask lets you to overwrite all fields. + * @type \Google\Cloud\MigrationCenter\V1\Settings $settings + * Required. The project settings resource being updated. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * `Settings` resource by the update. + * The values specified in the `update_mask` field are relative to the + * resource, not the full request. + * A field will be overwritten if it is in the mask. + * A single * value in the mask lets you to overwrite all fields. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * `Settings` resource by the update. + * The values specified in the `update_mask` field are relative to the + * resource, not the full request. + * A field will be overwritten if it is in the mask. + * A single * value in the mask lets you to overwrite all fields. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Required. The project settings resource being updated. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.Settings settings = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\MigrationCenter\V1\Settings|null + */ + public function getSettings() + { + return $this->settings; + } + + public function hasSettings() + { + return isset($this->settings); + } + + public function clearSettings() + { + unset($this->settings); + } + + /** + * Required. The project settings resource being updated. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.Settings settings = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\MigrationCenter\V1\Settings $var + * @return $this + */ + public function setSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\Settings::class); + $this->settings = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/UpdateSourceRequest.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/UpdateSourceRequest.php new file mode 100644 index 000000000000..a59cbccc7e1f --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/UpdateSourceRequest.php @@ -0,0 +1,235 @@ +google.cloud.migrationcenter.v1.UpdateSourceRequest + */ +class UpdateSourceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * `Source` resource by the update. + * The values specified in the `update_mask` field are relative to the + * resource, not the full request. + * A field will be overwritten if it is in the mask. + * A single * value in the mask lets you to overwrite all fields. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + /** + * Required. The resource being updated + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.Source source = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $source = null; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param \Google\Cloud\MigrationCenter\V1\Source $source Required. The resource being updated + * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the + * `Source` resource by the update. + * The values specified in the `update_mask` field are relative to the + * resource, not the full request. + * A field will be overwritten if it is in the mask. + * A single * value in the mask lets you to overwrite all fields. + * + * @return \Google\Cloud\MigrationCenter\V1\UpdateSourceRequest + * + * @experimental + */ + public static function build(\Google\Cloud\MigrationCenter\V1\Source $source, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setSource($source) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Required. Field mask is used to specify the fields to be overwritten in the + * `Source` resource by the update. + * The values specified in the `update_mask` field are relative to the + * resource, not the full request. + * A field will be overwritten if it is in the mask. + * A single * value in the mask lets you to overwrite all fields. + * @type \Google\Cloud\MigrationCenter\V1\Source $source + * Required. The resource being updated + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * `Source` resource by the update. + * The values specified in the `update_mask` field are relative to the + * resource, not the full request. + * A field will be overwritten if it is in the mask. + * A single * value in the mask lets you to overwrite all fields. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * `Source` resource by the update. + * The values specified in the `update_mask` field are relative to the + * resource, not the full request. + * A field will be overwritten if it is in the mask. + * A single * value in the mask lets you to overwrite all fields. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Required. The resource being updated + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.Source source = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\MigrationCenter\V1\Source|null + */ + public function getSource() + { + return $this->source; + } + + public function hasSource() + { + return isset($this->source); + } + + public function clearSource() + { + unset($this->source); + } + + /** + * Required. The resource being updated + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.Source source = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\MigrationCenter\V1\Source $var + * @return $this + */ + public function setSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\Source::class); + $this->source = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/UploadFileInfo.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/UploadFileInfo.php new file mode 100644 index 000000000000..928e161e6d41 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/UploadFileInfo.php @@ -0,0 +1,145 @@ +google.cloud.migrationcenter.v1.UploadFileInfo + */ +class UploadFileInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Upload URI for the file. + * + * Generated from protobuf field string signed_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $signed_uri = ''; + /** + * Output only. The headers that were used to sign the URI. + * + * Generated from protobuf field map headers = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $headers; + /** + * Output only. Expiration time of the upload URI. + * + * Generated from protobuf field .google.protobuf.Timestamp uri_expiration_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $uri_expiration_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $signed_uri + * Output only. Upload URI for the file. + * @type array|\Google\Protobuf\Internal\MapField $headers + * Output only. The headers that were used to sign the URI. + * @type \Google\Protobuf\Timestamp $uri_expiration_time + * Output only. Expiration time of the upload URI. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Upload URI for the file. + * + * Generated from protobuf field string signed_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getSignedUri() + { + return $this->signed_uri; + } + + /** + * Output only. Upload URI for the file. + * + * Generated from protobuf field string signed_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setSignedUri($var) + { + GPBUtil::checkString($var, True); + $this->signed_uri = $var; + + return $this; + } + + /** + * Output only. The headers that were used to sign the URI. + * + * Generated from protobuf field map headers = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getHeaders() + { + return $this->headers; + } + + /** + * Output only. The headers that were used to sign the URI. + * + * Generated from protobuf field map headers = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setHeaders($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->headers = $arr; + + return $this; + } + + /** + * Output only. Expiration time of the upload URI. + * + * Generated from protobuf field .google.protobuf.Timestamp uri_expiration_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUriExpirationTime() + { + return $this->uri_expiration_time; + } + + public function hasUriExpirationTime() + { + return isset($this->uri_expiration_time); + } + + public function clearUriExpirationTime() + { + unset($this->uri_expiration_time); + } + + /** + * Output only. Expiration time of the upload URI. + * + * Generated from protobuf field .google.protobuf.Timestamp uri_expiration_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUriExpirationTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->uri_expiration_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ValidateImportJobRequest.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ValidateImportJobRequest.php new file mode 100644 index 000000000000..29b792d20ee1 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ValidateImportJobRequest.php @@ -0,0 +1,155 @@ +google.cloud.migrationcenter.v1.ValidateImportJobRequest + */ +class ValidateImportJobRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the import job to validate. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param string $name Required. The name of the import job to validate. Please see + * {@see MigrationCenterClient::importJobName()} for help formatting this field. + * + * @return \Google\Cloud\MigrationCenter\V1\ValidateImportJobRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the import job to validate. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the import job to validate. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the import job to validate. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ValidationReport.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ValidationReport.php new file mode 100644 index 000000000000..997d13c8228f --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ValidationReport.php @@ -0,0 +1,101 @@ +google.cloud.migrationcenter.v1.ValidationReport + */ +class ValidationReport extends \Google\Protobuf\Internal\Message +{ + /** + * List of errors found in files. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.FileValidationReport file_validations = 1; + */ + private $file_validations; + /** + * List of job level errors. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ImportError job_errors = 2; + */ + private $job_errors; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\MigrationCenter\V1\FileValidationReport>|\Google\Protobuf\Internal\RepeatedField $file_validations + * List of errors found in files. + * @type array<\Google\Cloud\MigrationCenter\V1\ImportError>|\Google\Protobuf\Internal\RepeatedField $job_errors + * List of job level errors. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * List of errors found in files. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.FileValidationReport file_validations = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFileValidations() + { + return $this->file_validations; + } + + /** + * List of errors found in files. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.FileValidationReport file_validations = 1; + * @param array<\Google\Cloud\MigrationCenter\V1\FileValidationReport>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFileValidations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\FileValidationReport::class); + $this->file_validations = $arr; + + return $this; + } + + /** + * List of job level errors. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ImportError job_errors = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getJobErrors() + { + return $this->job_errors; + } + + /** + * List of job level errors. + * + * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ImportError job_errors = 2; + * @param array<\Google\Cloud\MigrationCenter\V1\ImportError>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setJobErrors($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\ImportError::class); + $this->job_errors = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/VirtualMachinePreferences.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/VirtualMachinePreferences.php new file mode 100644 index 000000000000..8bcad9ff0e45 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/VirtualMachinePreferences.php @@ -0,0 +1,366 @@ +google.cloud.migrationcenter.v1.VirtualMachinePreferences + */ +class VirtualMachinePreferences extends \Google\Protobuf\Internal\Message +{ + /** + * Target product for assets using this preference set. + * Specify either target product or business goal, but + * not both. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ComputeMigrationTargetProduct target_product = 2; + */ + protected $target_product = 0; + /** + * Region preferences for assets using this preference set. + * If you are unsure which value to set, the migration service API region is + * often a good value to start with. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.RegionPreferences region_preferences = 3; + */ + protected $region_preferences = null; + /** + * Commitment plan to consider when calculating costs for virtual machine + * insights and recommendations. + * If you are unsure which value to set, a 3 year commitment plan is often a + * good value to start with. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.CommitmentPlan commitment_plan = 4; + */ + protected $commitment_plan = 0; + /** + * Sizing optimization strategy specifies the preferred strategy used when + * extrapolating usage data to calculate insights and recommendations for a + * virtual machine. + * If you are unsure which value to set, a moderate sizing optimization + * strategy is often a good value to start with. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.SizingOptimizationStrategy sizing_optimization_strategy = 5; + */ + protected $sizing_optimization_strategy = 0; + /** + * Compute Engine preferences concern insights and recommendations for Compute + * Engine target. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ComputeEnginePreferences compute_engine_preferences = 6; + */ + protected $compute_engine_preferences = null; + /** + * Preferences concerning insights and recommendations for + * Google Cloud VMware Engine. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.VmwareEnginePreferences vmware_engine_preferences = 7; + */ + protected $vmware_engine_preferences = null; + /** + * Preferences concerning Sole Tenant nodes and virtual machines. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.SoleTenancyPreferences sole_tenancy_preferences = 8; + */ + protected $sole_tenancy_preferences = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $target_product + * Target product for assets using this preference set. + * Specify either target product or business goal, but + * not both. + * @type \Google\Cloud\MigrationCenter\V1\RegionPreferences $region_preferences + * Region preferences for assets using this preference set. + * If you are unsure which value to set, the migration service API region is + * often a good value to start with. + * @type int $commitment_plan + * Commitment plan to consider when calculating costs for virtual machine + * insights and recommendations. + * If you are unsure which value to set, a 3 year commitment plan is often a + * good value to start with. + * @type int $sizing_optimization_strategy + * Sizing optimization strategy specifies the preferred strategy used when + * extrapolating usage data to calculate insights and recommendations for a + * virtual machine. + * If you are unsure which value to set, a moderate sizing optimization + * strategy is often a good value to start with. + * @type \Google\Cloud\MigrationCenter\V1\ComputeEnginePreferences $compute_engine_preferences + * Compute Engine preferences concern insights and recommendations for Compute + * Engine target. + * @type \Google\Cloud\MigrationCenter\V1\VmwareEnginePreferences $vmware_engine_preferences + * Preferences concerning insights and recommendations for + * Google Cloud VMware Engine. + * @type \Google\Cloud\MigrationCenter\V1\SoleTenancyPreferences $sole_tenancy_preferences + * Preferences concerning Sole Tenant nodes and virtual machines. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * Target product for assets using this preference set. + * Specify either target product or business goal, but + * not both. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ComputeMigrationTargetProduct target_product = 2; + * @return int + */ + public function getTargetProduct() + { + return $this->target_product; + } + + /** + * Target product for assets using this preference set. + * Specify either target product or business goal, but + * not both. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ComputeMigrationTargetProduct target_product = 2; + * @param int $var + * @return $this + */ + public function setTargetProduct($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\MigrationCenter\V1\ComputeMigrationTargetProduct::class); + $this->target_product = $var; + + return $this; + } + + /** + * Region preferences for assets using this preference set. + * If you are unsure which value to set, the migration service API region is + * often a good value to start with. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.RegionPreferences region_preferences = 3; + * @return \Google\Cloud\MigrationCenter\V1\RegionPreferences|null + */ + public function getRegionPreferences() + { + return $this->region_preferences; + } + + public function hasRegionPreferences() + { + return isset($this->region_preferences); + } + + public function clearRegionPreferences() + { + unset($this->region_preferences); + } + + /** + * Region preferences for assets using this preference set. + * If you are unsure which value to set, the migration service API region is + * often a good value to start with. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.RegionPreferences region_preferences = 3; + * @param \Google\Cloud\MigrationCenter\V1\RegionPreferences $var + * @return $this + */ + public function setRegionPreferences($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\RegionPreferences::class); + $this->region_preferences = $var; + + return $this; + } + + /** + * Commitment plan to consider when calculating costs for virtual machine + * insights and recommendations. + * If you are unsure which value to set, a 3 year commitment plan is often a + * good value to start with. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.CommitmentPlan commitment_plan = 4; + * @return int + */ + public function getCommitmentPlan() + { + return $this->commitment_plan; + } + + /** + * Commitment plan to consider when calculating costs for virtual machine + * insights and recommendations. + * If you are unsure which value to set, a 3 year commitment plan is often a + * good value to start with. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.CommitmentPlan commitment_plan = 4; + * @param int $var + * @return $this + */ + public function setCommitmentPlan($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\MigrationCenter\V1\CommitmentPlan::class); + $this->commitment_plan = $var; + + return $this; + } + + /** + * Sizing optimization strategy specifies the preferred strategy used when + * extrapolating usage data to calculate insights and recommendations for a + * virtual machine. + * If you are unsure which value to set, a moderate sizing optimization + * strategy is often a good value to start with. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.SizingOptimizationStrategy sizing_optimization_strategy = 5; + * @return int + */ + public function getSizingOptimizationStrategy() + { + return $this->sizing_optimization_strategy; + } + + /** + * Sizing optimization strategy specifies the preferred strategy used when + * extrapolating usage data to calculate insights and recommendations for a + * virtual machine. + * If you are unsure which value to set, a moderate sizing optimization + * strategy is often a good value to start with. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.SizingOptimizationStrategy sizing_optimization_strategy = 5; + * @param int $var + * @return $this + */ + public function setSizingOptimizationStrategy($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\MigrationCenter\V1\SizingOptimizationStrategy::class); + $this->sizing_optimization_strategy = $var; + + return $this; + } + + /** + * Compute Engine preferences concern insights and recommendations for Compute + * Engine target. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ComputeEnginePreferences compute_engine_preferences = 6; + * @return \Google\Cloud\MigrationCenter\V1\ComputeEnginePreferences|null + */ + public function getComputeEnginePreferences() + { + return $this->compute_engine_preferences; + } + + public function hasComputeEnginePreferences() + { + return isset($this->compute_engine_preferences); + } + + public function clearComputeEnginePreferences() + { + unset($this->compute_engine_preferences); + } + + /** + * Compute Engine preferences concern insights and recommendations for Compute + * Engine target. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.ComputeEnginePreferences compute_engine_preferences = 6; + * @param \Google\Cloud\MigrationCenter\V1\ComputeEnginePreferences $var + * @return $this + */ + public function setComputeEnginePreferences($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\ComputeEnginePreferences::class); + $this->compute_engine_preferences = $var; + + return $this; + } + + /** + * Preferences concerning insights and recommendations for + * Google Cloud VMware Engine. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.VmwareEnginePreferences vmware_engine_preferences = 7; + * @return \Google\Cloud\MigrationCenter\V1\VmwareEnginePreferences|null + */ + public function getVmwareEnginePreferences() + { + return $this->vmware_engine_preferences; + } + + public function hasVmwareEnginePreferences() + { + return isset($this->vmware_engine_preferences); + } + + public function clearVmwareEnginePreferences() + { + unset($this->vmware_engine_preferences); + } + + /** + * Preferences concerning insights and recommendations for + * Google Cloud VMware Engine. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.VmwareEnginePreferences vmware_engine_preferences = 7; + * @param \Google\Cloud\MigrationCenter\V1\VmwareEnginePreferences $var + * @return $this + */ + public function setVmwareEnginePreferences($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\VmwareEnginePreferences::class); + $this->vmware_engine_preferences = $var; + + return $this; + } + + /** + * Preferences concerning Sole Tenant nodes and virtual machines. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.SoleTenancyPreferences sole_tenancy_preferences = 8; + * @return \Google\Cloud\MigrationCenter\V1\SoleTenancyPreferences|null + */ + public function getSoleTenancyPreferences() + { + return $this->sole_tenancy_preferences; + } + + public function hasSoleTenancyPreferences() + { + return isset($this->sole_tenancy_preferences); + } + + public function clearSoleTenancyPreferences() + { + unset($this->sole_tenancy_preferences); + } + + /** + * Preferences concerning Sole Tenant nodes and virtual machines. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.SoleTenancyPreferences sole_tenancy_preferences = 8; + * @param \Google\Cloud\MigrationCenter\V1\SoleTenancyPreferences $var + * @return $this + */ + public function setSoleTenancyPreferences($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\SoleTenancyPreferences::class); + $this->sole_tenancy_preferences = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/VmwareDiskConfig.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/VmwareDiskConfig.php new file mode 100644 index 000000000000..ae83912c74aa --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/VmwareDiskConfig.php @@ -0,0 +1,169 @@ +google.cloud.migrationcenter.v1.VmwareDiskConfig + */ +class VmwareDiskConfig extends \Google\Protobuf\Internal\Message +{ + /** + * VMDK backing type. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.VmwareDiskConfig.BackingType backing_type = 1; + */ + protected $backing_type = 0; + /** + * Is VMDK shared with other VMs. + * + * Generated from protobuf field bool shared = 2; + */ + protected $shared = false; + /** + * VMDK disk mode. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.VmwareDiskConfig.VmdkMode vmdk_mode = 3; + */ + protected $vmdk_mode = 0; + /** + * RDM compatibility mode. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.VmwareDiskConfig.RdmCompatibility rdm_compatibility = 4; + */ + protected $rdm_compatibility = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $backing_type + * VMDK backing type. + * @type bool $shared + * Is VMDK shared with other VMs. + * @type int $vmdk_mode + * VMDK disk mode. + * @type int $rdm_compatibility + * RDM compatibility mode. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * VMDK backing type. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.VmwareDiskConfig.BackingType backing_type = 1; + * @return int + */ + public function getBackingType() + { + return $this->backing_type; + } + + /** + * VMDK backing type. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.VmwareDiskConfig.BackingType backing_type = 1; + * @param int $var + * @return $this + */ + public function setBackingType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\MigrationCenter\V1\VmwareDiskConfig\BackingType::class); + $this->backing_type = $var; + + return $this; + } + + /** + * Is VMDK shared with other VMs. + * + * Generated from protobuf field bool shared = 2; + * @return bool + */ + public function getShared() + { + return $this->shared; + } + + /** + * Is VMDK shared with other VMs. + * + * Generated from protobuf field bool shared = 2; + * @param bool $var + * @return $this + */ + public function setShared($var) + { + GPBUtil::checkBool($var); + $this->shared = $var; + + return $this; + } + + /** + * VMDK disk mode. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.VmwareDiskConfig.VmdkMode vmdk_mode = 3; + * @return int + */ + public function getVmdkMode() + { + return $this->vmdk_mode; + } + + /** + * VMDK disk mode. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.VmwareDiskConfig.VmdkMode vmdk_mode = 3; + * @param int $var + * @return $this + */ + public function setVmdkMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\MigrationCenter\V1\VmwareDiskConfig\VmdkMode::class); + $this->vmdk_mode = $var; + + return $this; + } + + /** + * RDM compatibility mode. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.VmwareDiskConfig.RdmCompatibility rdm_compatibility = 4; + * @return int + */ + public function getRdmCompatibility() + { + return $this->rdm_compatibility; + } + + /** + * RDM compatibility mode. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.VmwareDiskConfig.RdmCompatibility rdm_compatibility = 4; + * @param int $var + * @return $this + */ + public function setRdmCompatibility($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\MigrationCenter\V1\VmwareDiskConfig\RdmCompatibility::class); + $this->rdm_compatibility = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/VmwareDiskConfig/BackingType.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/VmwareDiskConfig/BackingType.php new file mode 100644 index 000000000000..1b22c3b4e692 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/VmwareDiskConfig/BackingType.php @@ -0,0 +1,106 @@ +google.cloud.migrationcenter.v1.VmwareDiskConfig.BackingType + */ +class BackingType +{ + /** + * Default value. + * + * Generated from protobuf enum BACKING_TYPE_UNSPECIFIED = 0; + */ + const BACKING_TYPE_UNSPECIFIED = 0; + /** + * Flat v1. + * + * Generated from protobuf enum BACKING_TYPE_FLAT_V1 = 1; + */ + const BACKING_TYPE_FLAT_V1 = 1; + /** + * Flat v2. + * + * Generated from protobuf enum BACKING_TYPE_FLAT_V2 = 2; + */ + const BACKING_TYPE_FLAT_V2 = 2; + /** + * Persistent memory, also known as Non-Volatile Memory (NVM). + * + * Generated from protobuf enum BACKING_TYPE_PMEM = 3; + */ + const BACKING_TYPE_PMEM = 3; + /** + * Raw Disk Memory v1. + * + * Generated from protobuf enum BACKING_TYPE_RDM_V1 = 4; + */ + const BACKING_TYPE_RDM_V1 = 4; + /** + * Raw Disk Memory v2. + * + * Generated from protobuf enum BACKING_TYPE_RDM_V2 = 5; + */ + const BACKING_TYPE_RDM_V2 = 5; + /** + * SEsparse is a snapshot format introduced in vSphere 5.5 for large disks. + * + * Generated from protobuf enum BACKING_TYPE_SESPARSE = 6; + */ + const BACKING_TYPE_SESPARSE = 6; + /** + * SEsparse v1. + * + * Generated from protobuf enum BACKING_TYPE_SESPARSE_V1 = 7; + */ + const BACKING_TYPE_SESPARSE_V1 = 7; + /** + * SEsparse v1. + * + * Generated from protobuf enum BACKING_TYPE_SESPARSE_V2 = 8; + */ + const BACKING_TYPE_SESPARSE_V2 = 8; + + private static $valueToName = [ + self::BACKING_TYPE_UNSPECIFIED => 'BACKING_TYPE_UNSPECIFIED', + self::BACKING_TYPE_FLAT_V1 => 'BACKING_TYPE_FLAT_V1', + self::BACKING_TYPE_FLAT_V2 => 'BACKING_TYPE_FLAT_V2', + self::BACKING_TYPE_PMEM => 'BACKING_TYPE_PMEM', + self::BACKING_TYPE_RDM_V1 => 'BACKING_TYPE_RDM_V1', + self::BACKING_TYPE_RDM_V2 => 'BACKING_TYPE_RDM_V2', + self::BACKING_TYPE_SESPARSE => 'BACKING_TYPE_SESPARSE', + self::BACKING_TYPE_SESPARSE_V1 => 'BACKING_TYPE_SESPARSE_V1', + self::BACKING_TYPE_SESPARSE_V2 => 'BACKING_TYPE_SESPARSE_V2', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(BackingType::class, \Google\Cloud\MigrationCenter\V1\VmwareDiskConfig_BackingType::class); + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/VmwareDiskConfig/RdmCompatibility.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/VmwareDiskConfig/RdmCompatibility.php new file mode 100644 index 000000000000..ff224da8e130 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/VmwareDiskConfig/RdmCompatibility.php @@ -0,0 +1,64 @@ +google.cloud.migrationcenter.v1.VmwareDiskConfig.RdmCompatibility + */ +class RdmCompatibility +{ + /** + * Compatibility mode unspecified or unknown. + * + * Generated from protobuf enum RDM_COMPATIBILITY_UNSPECIFIED = 0; + */ + const RDM_COMPATIBILITY_UNSPECIFIED = 0; + /** + * Physical compatibility mode. + * + * Generated from protobuf enum PHYSICAL_COMPATIBILITY = 1; + */ + const PHYSICAL_COMPATIBILITY = 1; + /** + * Virtual compatibility mode. + * + * Generated from protobuf enum VIRTUAL_COMPATIBILITY = 2; + */ + const VIRTUAL_COMPATIBILITY = 2; + + private static $valueToName = [ + self::RDM_COMPATIBILITY_UNSPECIFIED => 'RDM_COMPATIBILITY_UNSPECIFIED', + self::PHYSICAL_COMPATIBILITY => 'PHYSICAL_COMPATIBILITY', + self::VIRTUAL_COMPATIBILITY => 'VIRTUAL_COMPATIBILITY', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(RdmCompatibility::class, \Google\Cloud\MigrationCenter\V1\VmwareDiskConfig_RdmCompatibility::class); + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/VmwareDiskConfig/VmdkMode.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/VmwareDiskConfig/VmdkMode.php new file mode 100644 index 000000000000..808f36b21778 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/VmwareDiskConfig/VmdkMode.php @@ -0,0 +1,71 @@ +google.cloud.migrationcenter.v1.VmwareDiskConfig.VmdkMode + */ +class VmdkMode +{ + /** + * VMDK disk mode unspecified or unknown. + * + * Generated from protobuf enum VMDK_MODE_UNSPECIFIED = 0; + */ + const VMDK_MODE_UNSPECIFIED = 0; + /** + * Dependent disk mode. + * + * Generated from protobuf enum DEPENDENT = 1; + */ + const DEPENDENT = 1; + /** + * Independent - Persistent disk mode. + * + * Generated from protobuf enum INDEPENDENT_PERSISTENT = 2; + */ + const INDEPENDENT_PERSISTENT = 2; + /** + * Independent - Nonpersistent disk mode. + * + * Generated from protobuf enum INDEPENDENT_NONPERSISTENT = 3; + */ + const INDEPENDENT_NONPERSISTENT = 3; + + private static $valueToName = [ + self::VMDK_MODE_UNSPECIFIED => 'VMDK_MODE_UNSPECIFIED', + self::DEPENDENT => 'DEPENDENT', + self::INDEPENDENT_PERSISTENT => 'INDEPENDENT_PERSISTENT', + self::INDEPENDENT_NONPERSISTENT => 'INDEPENDENT_NONPERSISTENT', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(VmdkMode::class, \Google\Cloud\MigrationCenter\V1\VmwareDiskConfig_VmdkMode::class); + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/VmwareEnginePreferences.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/VmwareEnginePreferences.php new file mode 100644 index 000000000000..bad6fe515a83 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/VmwareEnginePreferences.php @@ -0,0 +1,217 @@ +google.cloud.migrationcenter.v1.VmwareEnginePreferences + */ +class VmwareEnginePreferences extends \Google\Protobuf\Internal\Message +{ + /** + * CPU overcommit ratio. + * Acceptable values are between 1.0 and 8.0, with 0.1 increment. + * + * Generated from protobuf field double cpu_overcommit_ratio = 1; + */ + protected $cpu_overcommit_ratio = 0.0; + /** + * Memory overcommit ratio. + * Acceptable values are 1.0, 1.25, 1.5, 1.75 and 2.0. + * + * Generated from protobuf field double memory_overcommit_ratio = 2; + */ + protected $memory_overcommit_ratio = 0.0; + /** + * The Deduplication and Compression ratio is based on the logical (Used + * Before) space required to store data before applying deduplication and + * compression, in relation to the physical (Used After) space required after + * applying deduplication and compression. Specifically, the ratio is the Used + * Before space divided by the Used After space. For example, if the Used + * Before space is 3 GB, but the physical Used After space is 1 GB, the + * deduplication and compression ratio is 3x. Acceptable values are + * between 1.0 and 4.0. + * + * Generated from protobuf field double storage_deduplication_compression_ratio = 3; + */ + protected $storage_deduplication_compression_ratio = 0.0; + /** + * Commitment plan to consider when calculating costs for virtual machine + * insights and recommendations. + * If you are unsure which value to set, a 3 year commitment plan is often a + * good value to start with. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.VmwareEnginePreferences.CommitmentPlan commitment_plan = 4; + */ + protected $commitment_plan = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $cpu_overcommit_ratio + * CPU overcommit ratio. + * Acceptable values are between 1.0 and 8.0, with 0.1 increment. + * @type float $memory_overcommit_ratio + * Memory overcommit ratio. + * Acceptable values are 1.0, 1.25, 1.5, 1.75 and 2.0. + * @type float $storage_deduplication_compression_ratio + * The Deduplication and Compression ratio is based on the logical (Used + * Before) space required to store data before applying deduplication and + * compression, in relation to the physical (Used After) space required after + * applying deduplication and compression. Specifically, the ratio is the Used + * Before space divided by the Used After space. For example, if the Used + * Before space is 3 GB, but the physical Used After space is 1 GB, the + * deduplication and compression ratio is 3x. Acceptable values are + * between 1.0 and 4.0. + * @type int $commitment_plan + * Commitment plan to consider when calculating costs for virtual machine + * insights and recommendations. + * If you are unsure which value to set, a 3 year commitment plan is often a + * good value to start with. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * CPU overcommit ratio. + * Acceptable values are between 1.0 and 8.0, with 0.1 increment. + * + * Generated from protobuf field double cpu_overcommit_ratio = 1; + * @return float + */ + public function getCpuOvercommitRatio() + { + return $this->cpu_overcommit_ratio; + } + + /** + * CPU overcommit ratio. + * Acceptable values are between 1.0 and 8.0, with 0.1 increment. + * + * Generated from protobuf field double cpu_overcommit_ratio = 1; + * @param float $var + * @return $this + */ + public function setCpuOvercommitRatio($var) + { + GPBUtil::checkDouble($var); + $this->cpu_overcommit_ratio = $var; + + return $this; + } + + /** + * Memory overcommit ratio. + * Acceptable values are 1.0, 1.25, 1.5, 1.75 and 2.0. + * + * Generated from protobuf field double memory_overcommit_ratio = 2; + * @return float + */ + public function getMemoryOvercommitRatio() + { + return $this->memory_overcommit_ratio; + } + + /** + * Memory overcommit ratio. + * Acceptable values are 1.0, 1.25, 1.5, 1.75 and 2.0. + * + * Generated from protobuf field double memory_overcommit_ratio = 2; + * @param float $var + * @return $this + */ + public function setMemoryOvercommitRatio($var) + { + GPBUtil::checkDouble($var); + $this->memory_overcommit_ratio = $var; + + return $this; + } + + /** + * The Deduplication and Compression ratio is based on the logical (Used + * Before) space required to store data before applying deduplication and + * compression, in relation to the physical (Used After) space required after + * applying deduplication and compression. Specifically, the ratio is the Used + * Before space divided by the Used After space. For example, if the Used + * Before space is 3 GB, but the physical Used After space is 1 GB, the + * deduplication and compression ratio is 3x. Acceptable values are + * between 1.0 and 4.0. + * + * Generated from protobuf field double storage_deduplication_compression_ratio = 3; + * @return float + */ + public function getStorageDeduplicationCompressionRatio() + { + return $this->storage_deduplication_compression_ratio; + } + + /** + * The Deduplication and Compression ratio is based on the logical (Used + * Before) space required to store data before applying deduplication and + * compression, in relation to the physical (Used After) space required after + * applying deduplication and compression. Specifically, the ratio is the Used + * Before space divided by the Used After space. For example, if the Used + * Before space is 3 GB, but the physical Used After space is 1 GB, the + * deduplication and compression ratio is 3x. Acceptable values are + * between 1.0 and 4.0. + * + * Generated from protobuf field double storage_deduplication_compression_ratio = 3; + * @param float $var + * @return $this + */ + public function setStorageDeduplicationCompressionRatio($var) + { + GPBUtil::checkDouble($var); + $this->storage_deduplication_compression_ratio = $var; + + return $this; + } + + /** + * Commitment plan to consider when calculating costs for virtual machine + * insights and recommendations. + * If you are unsure which value to set, a 3 year commitment plan is often a + * good value to start with. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.VmwareEnginePreferences.CommitmentPlan commitment_plan = 4; + * @return int + */ + public function getCommitmentPlan() + { + return $this->commitment_plan; + } + + /** + * Commitment plan to consider when calculating costs for virtual machine + * insights and recommendations. + * If you are unsure which value to set, a 3 year commitment plan is often a + * good value to start with. + * + * Generated from protobuf field .google.cloud.migrationcenter.v1.VmwareEnginePreferences.CommitmentPlan commitment_plan = 4; + * @param int $var + * @return $this + */ + public function setCommitmentPlan($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\MigrationCenter\V1\VmwareEnginePreferences\CommitmentPlan::class); + $this->commitment_plan = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/VmwareEnginePreferences/CommitmentPlan.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/VmwareEnginePreferences/CommitmentPlan.php new file mode 100644 index 000000000000..6f7f3204713f --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/VmwareEnginePreferences/CommitmentPlan.php @@ -0,0 +1,85 @@ +google.cloud.migrationcenter.v1.VmwareEnginePreferences.CommitmentPlan + */ +class CommitmentPlan +{ + /** + * Unspecified commitment plan. + * + * Generated from protobuf enum COMMITMENT_PLAN_UNSPECIFIED = 0; + */ + const COMMITMENT_PLAN_UNSPECIFIED = 0; + /** + * No commitment plan (on-demand usage). + * + * Generated from protobuf enum ON_DEMAND = 1; + */ + const ON_DEMAND = 1; + /** + * 1 year commitment (monthly payments). + * + * Generated from protobuf enum COMMITMENT_1_YEAR_MONTHLY_PAYMENTS = 2; + */ + const COMMITMENT_1_YEAR_MONTHLY_PAYMENTS = 2; + /** + * 3 year commitment (monthly payments). + * + * Generated from protobuf enum COMMITMENT_3_YEAR_MONTHLY_PAYMENTS = 3; + */ + const COMMITMENT_3_YEAR_MONTHLY_PAYMENTS = 3; + /** + * 1 year commitment (upfront payment). + * + * Generated from protobuf enum COMMITMENT_1_YEAR_UPFRONT_PAYMENT = 4; + */ + const COMMITMENT_1_YEAR_UPFRONT_PAYMENT = 4; + /** + * 3 years commitment (upfront payment). + * + * Generated from protobuf enum COMMITMENT_3_YEAR_UPFRONT_PAYMENT = 5; + */ + const COMMITMENT_3_YEAR_UPFRONT_PAYMENT = 5; + + private static $valueToName = [ + self::COMMITMENT_PLAN_UNSPECIFIED => 'COMMITMENT_PLAN_UNSPECIFIED', + self::ON_DEMAND => 'ON_DEMAND', + self::COMMITMENT_1_YEAR_MONTHLY_PAYMENTS => 'COMMITMENT_1_YEAR_MONTHLY_PAYMENTS', + self::COMMITMENT_3_YEAR_MONTHLY_PAYMENTS => 'COMMITMENT_3_YEAR_MONTHLY_PAYMENTS', + self::COMMITMENT_1_YEAR_UPFRONT_PAYMENT => 'COMMITMENT_1_YEAR_UPFRONT_PAYMENT', + self::COMMITMENT_3_YEAR_UPFRONT_PAYMENT => 'COMMITMENT_3_YEAR_UPFRONT_PAYMENT', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(CommitmentPlan::class, \Google\Cloud\MigrationCenter\V1\VmwareEnginePreferences_CommitmentPlan::class); + diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/VmwarePlatformDetails.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/VmwarePlatformDetails.php new file mode 100644 index 000000000000..45c08c9c3398 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/VmwarePlatformDetails.php @@ -0,0 +1,241 @@ +google.cloud.migrationcenter.v1.VmwarePlatformDetails + */ +class VmwarePlatformDetails extends \Google\Protobuf\Internal\Message +{ + /** + * vCenter version. + * + * Generated from protobuf field string vcenter_version = 1; + */ + protected $vcenter_version = ''; + /** + * ESX version. + * + * Generated from protobuf field string esx_version = 2; + */ + protected $esx_version = ''; + /** + * VMware os enum - + * https://vdc-repo.vmware.com/vmwb-repository/dcr-public/da47f910-60ac-438b-8b9b-6122f4d14524/16b7274a-bf8b-4b4c-a05e-746f2aa93c8c/doc/vim.vm.GuestOsDescriptor.GuestOsIdentifier.html. + * + * Generated from protobuf field string osid = 3; + */ + protected $osid = ''; + /** + * Folder name in vCenter where asset resides. + * + * Generated from protobuf field string vcenter_folder = 4; + */ + protected $vcenter_folder = ''; + /** + * vCenter URI used in collection. + * + * Generated from protobuf field string vcenter_uri = 5; + */ + protected $vcenter_uri = ''; + /** + * vCenter VM ID. + * + * Generated from protobuf field string vcenter_vm_id = 6; + */ + protected $vcenter_vm_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $vcenter_version + * vCenter version. + * @type string $esx_version + * ESX version. + * @type string $osid + * VMware os enum - + * https://vdc-repo.vmware.com/vmwb-repository/dcr-public/da47f910-60ac-438b-8b9b-6122f4d14524/16b7274a-bf8b-4b4c-a05e-746f2aa93c8c/doc/vim.vm.GuestOsDescriptor.GuestOsIdentifier.html. + * @type string $vcenter_folder + * Folder name in vCenter where asset resides. + * @type string $vcenter_uri + * vCenter URI used in collection. + * @type string $vcenter_vm_id + * vCenter VM ID. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); + parent::__construct($data); + } + + /** + * vCenter version. + * + * Generated from protobuf field string vcenter_version = 1; + * @return string + */ + public function getVcenterVersion() + { + return $this->vcenter_version; + } + + /** + * vCenter version. + * + * Generated from protobuf field string vcenter_version = 1; + * @param string $var + * @return $this + */ + public function setVcenterVersion($var) + { + GPBUtil::checkString($var, True); + $this->vcenter_version = $var; + + return $this; + } + + /** + * ESX version. + * + * Generated from protobuf field string esx_version = 2; + * @return string + */ + public function getEsxVersion() + { + return $this->esx_version; + } + + /** + * ESX version. + * + * Generated from protobuf field string esx_version = 2; + * @param string $var + * @return $this + */ + public function setEsxVersion($var) + { + GPBUtil::checkString($var, True); + $this->esx_version = $var; + + return $this; + } + + /** + * VMware os enum - + * https://vdc-repo.vmware.com/vmwb-repository/dcr-public/da47f910-60ac-438b-8b9b-6122f4d14524/16b7274a-bf8b-4b4c-a05e-746f2aa93c8c/doc/vim.vm.GuestOsDescriptor.GuestOsIdentifier.html. + * + * Generated from protobuf field string osid = 3; + * @return string + */ + public function getOsid() + { + return $this->osid; + } + + /** + * VMware os enum - + * https://vdc-repo.vmware.com/vmwb-repository/dcr-public/da47f910-60ac-438b-8b9b-6122f4d14524/16b7274a-bf8b-4b4c-a05e-746f2aa93c8c/doc/vim.vm.GuestOsDescriptor.GuestOsIdentifier.html. + * + * Generated from protobuf field string osid = 3; + * @param string $var + * @return $this + */ + public function setOsid($var) + { + GPBUtil::checkString($var, True); + $this->osid = $var; + + return $this; + } + + /** + * Folder name in vCenter where asset resides. + * + * Generated from protobuf field string vcenter_folder = 4; + * @return string + */ + public function getVcenterFolder() + { + return $this->vcenter_folder; + } + + /** + * Folder name in vCenter where asset resides. + * + * Generated from protobuf field string vcenter_folder = 4; + * @param string $var + * @return $this + */ + public function setVcenterFolder($var) + { + GPBUtil::checkString($var, True); + $this->vcenter_folder = $var; + + return $this; + } + + /** + * vCenter URI used in collection. + * + * Generated from protobuf field string vcenter_uri = 5; + * @return string + */ + public function getVcenterUri() + { + return $this->vcenter_uri; + } + + /** + * vCenter URI used in collection. + * + * Generated from protobuf field string vcenter_uri = 5; + * @param string $var + * @return $this + */ + public function setVcenterUri($var) + { + GPBUtil::checkString($var, True); + $this->vcenter_uri = $var; + + return $this; + } + + /** + * vCenter VM ID. + * + * Generated from protobuf field string vcenter_vm_id = 6; + * @return string + */ + public function getVcenterVmId() + { + return $this->vcenter_vm_id; + } + + /** + * vCenter VM ID. + * + * Generated from protobuf field string vcenter_vm_id = 6; + * @param string $var + * @return $this + */ + public function setVcenterVmId($var) + { + GPBUtil::checkString($var, True); + $this->vcenter_vm_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/add_assets_to_group.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/add_assets_to_group.php new file mode 100644 index 000000000000..dc19807c3ac9 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/add_assets_to_group.php @@ -0,0 +1,97 @@ +setAssetIds($formattedAssetsAssetIds); + $request = (new AddAssetsToGroupRequest()) + ->setGroup($formattedGroup) + ->setAssets($assets); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $migrationCenterClient->addAssetsToGroup($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Group $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedGroup = MigrationCenterClient::groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); + $formattedAssetsAssetIdsElement = MigrationCenterClient::assetName( + '[PROJECT]', + '[LOCATION]', + '[ASSET]' + ); + + add_assets_to_group_sample($formattedGroup, $formattedAssetsAssetIdsElement); +} +// [END migrationcenter_v1_generated_MigrationCenter_AddAssetsToGroup_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/aggregate_assets_values.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/aggregate_assets_values.php new file mode 100644 index 000000000000..6d5f7cabd828 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/aggregate_assets_values.php @@ -0,0 +1,70 @@ +setParent($parent); + + // Call the API and handle any network failures. + try { + /** @var AggregateAssetsValuesResponse $response */ + $response = $migrationCenterClient->aggregateAssetsValues($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $parent = '[PARENT]'; + + aggregate_assets_values_sample($parent); +} +// [END migrationcenter_v1_generated_MigrationCenter_AggregateAssetsValues_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/batch_delete_assets.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/batch_delete_assets.php new file mode 100644 index 000000000000..2318fd82f7f3 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/batch_delete_assets.php @@ -0,0 +1,76 @@ +setParent($formattedParent) + ->setNames($formattedNames); + + // Call the API and handle any network failures. + try { + $migrationCenterClient->batchDeleteAssets($request); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = MigrationCenterClient::locationName('[PROJECT]', '[LOCATION]'); + $formattedNamesElement = MigrationCenterClient::assetName('[PROJECT]', '[LOCATION]', '[ASSET]'); + + batch_delete_assets_sample($formattedParent, $formattedNamesElement); +} +// [END migrationcenter_v1_generated_MigrationCenter_BatchDeleteAssets_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/batch_update_assets.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/batch_update_assets.php new file mode 100644 index 000000000000..cf665e64b4d4 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/batch_update_assets.php @@ -0,0 +1,81 @@ +setUpdateMask($requestsUpdateMask) + ->setAsset($requestsAsset); + $requests = [$updateAssetRequest,]; + $request = (new BatchUpdateAssetsRequest()) + ->setParent($formattedParent) + ->setRequests($requests); + + // Call the API and handle any network failures. + try { + /** @var BatchUpdateAssetsResponse $response */ + $response = $migrationCenterClient->batchUpdateAssets($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = MigrationCenterClient::locationName('[PROJECT]', '[LOCATION]'); + + batch_update_assets_sample($formattedParent); +} +// [END migrationcenter_v1_generated_MigrationCenter_BatchUpdateAssets_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/create_group.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/create_group.php new file mode 100644 index 000000000000..a99fb5d2d373 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/create_group.php @@ -0,0 +1,92 @@ +setParent($formattedParent) + ->setGroupId($groupId) + ->setGroup($group); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $migrationCenterClient->createGroup($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Group $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = MigrationCenterClient::locationName('[PROJECT]', '[LOCATION]'); + $groupId = '[GROUP_ID]'; + + create_group_sample($formattedParent, $groupId); +} +// [END migrationcenter_v1_generated_MigrationCenter_CreateGroup_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/create_import_data_file.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/create_import_data_file.php new file mode 100644 index 000000000000..c067eeac2738 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/create_import_data_file.php @@ -0,0 +1,95 @@ +setFormat($importDataFileFormat); + $request = (new CreateImportDataFileRequest()) + ->setParent($formattedParent) + ->setImportDataFileId($importDataFileId) + ->setImportDataFile($importDataFile); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $migrationCenterClient->createImportDataFile($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var ImportDataFile $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = MigrationCenterClient::importJobName('[PROJECT]', '[LOCATION]', '[IMPORT_JOB]'); + $importDataFileId = '[IMPORT_DATA_FILE_ID]'; + $importDataFileFormat = ImportJobFormat::IMPORT_JOB_FORMAT_UNSPECIFIED; + + create_import_data_file_sample($formattedParent, $importDataFileId, $importDataFileFormat); +} +// [END migrationcenter_v1_generated_MigrationCenter_CreateImportDataFile_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/create_import_job.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/create_import_job.php new file mode 100644 index 000000000000..581e2f65c76f --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/create_import_job.php @@ -0,0 +1,99 @@ +setAssetSource($formattedImportJobAssetSource); + $request = (new CreateImportJobRequest()) + ->setParent($formattedParent) + ->setImportJobId($importJobId) + ->setImportJob($importJob); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $migrationCenterClient->createImportJob($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var ImportJob $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = MigrationCenterClient::locationName('[PROJECT]', '[LOCATION]'); + $importJobId = '[IMPORT_JOB_ID]'; + $formattedImportJobAssetSource = MigrationCenterClient::sourceName( + '[PROJECT]', + '[LOCATION]', + '[SOURCE]' + ); + + create_import_job_sample($formattedParent, $importJobId, $formattedImportJobAssetSource); +} +// [END migrationcenter_v1_generated_MigrationCenter_CreateImportJob_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/create_preference_set.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/create_preference_set.php new file mode 100644 index 000000000000..ffa0df62a728 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/create_preference_set.php @@ -0,0 +1,93 @@ +setParent($formattedParent) + ->setPreferenceSetId($preferenceSetId) + ->setPreferenceSet($preferenceSet); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $migrationCenterClient->createPreferenceSet($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var PreferenceSet $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = MigrationCenterClient::locationName('[PROJECT]', '[LOCATION]'); + $preferenceSetId = '[PREFERENCE_SET_ID]'; + + create_preference_set_sample($formattedParent, $preferenceSetId); +} +// [END migrationcenter_v1_generated_MigrationCenter_CreatePreferenceSet_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/create_report.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/create_report.php new file mode 100644 index 000000000000..9a56a41ee130 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/create_report.php @@ -0,0 +1,96 @@ +setParent($formattedParent) + ->setReportId($reportId) + ->setReport($report); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $migrationCenterClient->createReport($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Report $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = MigrationCenterClient::reportConfigName( + '[PROJECT]', + '[LOCATION]', + '[REPORT_CONFIG]' + ); + $reportId = '[REPORT_ID]'; + + create_report_sample($formattedParent, $reportId); +} +// [END migrationcenter_v1_generated_MigrationCenter_CreateReport_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/create_report_config.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/create_report_config.php new file mode 100644 index 000000000000..ea635c561aa0 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/create_report_config.php @@ -0,0 +1,121 @@ +setGroup($formattedReportConfigGroupPreferencesetAssignmentsGroup) + ->setPreferenceSet($formattedReportConfigGroupPreferencesetAssignmentsPreferenceSet); + $reportConfigGroupPreferencesetAssignments = [$groupPreferenceSetAssignment,]; + $reportConfig = (new ReportConfig()) + ->setGroupPreferencesetAssignments($reportConfigGroupPreferencesetAssignments); + $request = (new CreateReportConfigRequest()) + ->setParent($formattedParent) + ->setReportConfigId($reportConfigId) + ->setReportConfig($reportConfig); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $migrationCenterClient->createReportConfig($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var ReportConfig $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = MigrationCenterClient::locationName('[PROJECT]', '[LOCATION]'); + $reportConfigId = '[REPORT_CONFIG_ID]'; + $formattedReportConfigGroupPreferencesetAssignmentsGroup = MigrationCenterClient::groupName( + '[PROJECT]', + '[LOCATION]', + '[GROUP]' + ); + $formattedReportConfigGroupPreferencesetAssignmentsPreferenceSet = MigrationCenterClient::preferenceSetName( + '[PROJECT]', + '[LOCATION]', + '[PREFERENCE_SET]' + ); + + create_report_config_sample( + $formattedParent, + $reportConfigId, + $formattedReportConfigGroupPreferencesetAssignmentsGroup, + $formattedReportConfigGroupPreferencesetAssignmentsPreferenceSet + ); +} +// [END migrationcenter_v1_generated_MigrationCenter_CreateReportConfig_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/create_source.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/create_source.php new file mode 100644 index 000000000000..f2c02b41062f --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/create_source.php @@ -0,0 +1,92 @@ +setParent($formattedParent) + ->setSourceId($sourceId) + ->setSource($source); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $migrationCenterClient->createSource($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Source $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = MigrationCenterClient::locationName('[PROJECT]', '[LOCATION]'); + $sourceId = '[SOURCE_ID]'; + + create_source_sample($formattedParent, $sourceId); +} +// [END migrationcenter_v1_generated_MigrationCenter_CreateSource_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/delete_asset.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/delete_asset.php new file mode 100644 index 000000000000..8f82a66e9e9f --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/delete_asset.php @@ -0,0 +1,69 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $migrationCenterClient->deleteAsset($request); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = MigrationCenterClient::assetName('[PROJECT]', '[LOCATION]', '[ASSET]'); + + delete_asset_sample($formattedName); +} +// [END migrationcenter_v1_generated_MigrationCenter_DeleteAsset_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/delete_group.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/delete_group.php new file mode 100644 index 000000000000..1c19e10c4a1f --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/delete_group.php @@ -0,0 +1,80 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $migrationCenterClient->deleteGroup($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = MigrationCenterClient::groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); + + delete_group_sample($formattedName); +} +// [END migrationcenter_v1_generated_MigrationCenter_DeleteGroup_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/delete_import_data_file.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/delete_import_data_file.php new file mode 100644 index 000000000000..78c5c71100a5 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/delete_import_data_file.php @@ -0,0 +1,85 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $migrationCenterClient->deleteImportDataFile($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = MigrationCenterClient::importDataFileName( + '[PROJECT]', + '[LOCATION]', + '[IMPORT_JOB]', + '[IMPORT_DATA_FILE]' + ); + + delete_import_data_file_sample($formattedName); +} +// [END migrationcenter_v1_generated_MigrationCenter_DeleteImportDataFile_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/delete_import_job.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/delete_import_job.php new file mode 100644 index 000000000000..ab52f6c8e4ed --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/delete_import_job.php @@ -0,0 +1,80 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $migrationCenterClient->deleteImportJob($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = MigrationCenterClient::importJobName('[PROJECT]', '[LOCATION]', '[IMPORT_JOB]'); + + delete_import_job_sample($formattedName); +} +// [END migrationcenter_v1_generated_MigrationCenter_DeleteImportJob_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/delete_preference_set.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/delete_preference_set.php new file mode 100644 index 000000000000..9292f8d5b266 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/delete_preference_set.php @@ -0,0 +1,84 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $migrationCenterClient->deletePreferenceSet($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = MigrationCenterClient::preferenceSetName( + '[PROJECT]', + '[LOCATION]', + '[PREFERENCE_SET]' + ); + + delete_preference_set_sample($formattedName); +} +// [END migrationcenter_v1_generated_MigrationCenter_DeletePreferenceSet_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/delete_report.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/delete_report.php new file mode 100644 index 000000000000..ac40fe41c2b1 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/delete_report.php @@ -0,0 +1,85 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $migrationCenterClient->deleteReport($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = MigrationCenterClient::reportName( + '[PROJECT]', + '[LOCATION]', + '[REPORT_CONFIG]', + '[REPORT]' + ); + + delete_report_sample($formattedName); +} +// [END migrationcenter_v1_generated_MigrationCenter_DeleteReport_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/delete_report_config.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/delete_report_config.php new file mode 100644 index 000000000000..3153aaf8eda5 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/delete_report_config.php @@ -0,0 +1,84 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $migrationCenterClient->deleteReportConfig($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = MigrationCenterClient::reportConfigName( + '[PROJECT]', + '[LOCATION]', + '[REPORT_CONFIG]' + ); + + delete_report_config_sample($formattedName); +} +// [END migrationcenter_v1_generated_MigrationCenter_DeleteReportConfig_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/delete_source.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/delete_source.php new file mode 100644 index 000000000000..a82cdfa562f5 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/delete_source.php @@ -0,0 +1,80 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $migrationCenterClient->deleteSource($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = MigrationCenterClient::sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + + delete_source_sample($formattedName); +} +// [END migrationcenter_v1_generated_MigrationCenter_DeleteSource_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/get_asset.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/get_asset.php new file mode 100644 index 000000000000..c6acf97ed498 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/get_asset.php @@ -0,0 +1,71 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Asset $response */ + $response = $migrationCenterClient->getAsset($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = MigrationCenterClient::assetName('[PROJECT]', '[LOCATION]', '[ASSET]'); + + get_asset_sample($formattedName); +} +// [END migrationcenter_v1_generated_MigrationCenter_GetAsset_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/get_error_frame.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/get_error_frame.php new file mode 100644 index 000000000000..8534e71a90a5 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/get_error_frame.php @@ -0,0 +1,78 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var ErrorFrame $response */ + $response = $migrationCenterClient->getErrorFrame($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = MigrationCenterClient::errorFrameName( + '[PROJECT]', + '[LOCATION]', + '[SOURCE]', + '[ERROR_FRAME]' + ); + + get_error_frame_sample($formattedName); +} +// [END migrationcenter_v1_generated_MigrationCenter_GetErrorFrame_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/get_group.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/get_group.php new file mode 100644 index 000000000000..bcf0bbb0fbf0 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/get_group.php @@ -0,0 +1,71 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Group $response */ + $response = $migrationCenterClient->getGroup($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = MigrationCenterClient::groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); + + get_group_sample($formattedName); +} +// [END migrationcenter_v1_generated_MigrationCenter_GetGroup_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/get_import_data_file.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/get_import_data_file.php new file mode 100644 index 000000000000..171bbfbc3e26 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/get_import_data_file.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var ImportDataFile $response */ + $response = $migrationCenterClient->getImportDataFile($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = MigrationCenterClient::importDataFileName( + '[PROJECT]', + '[LOCATION]', + '[IMPORT_JOB]', + '[IMPORT_DATA_FILE]' + ); + + get_import_data_file_sample($formattedName); +} +// [END migrationcenter_v1_generated_MigrationCenter_GetImportDataFile_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/get_import_job.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/get_import_job.php new file mode 100644 index 000000000000..866f2e31e7ff --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/get_import_job.php @@ -0,0 +1,71 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var ImportJob $response */ + $response = $migrationCenterClient->getImportJob($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = MigrationCenterClient::importJobName('[PROJECT]', '[LOCATION]', '[IMPORT_JOB]'); + + get_import_job_sample($formattedName); +} +// [END migrationcenter_v1_generated_MigrationCenter_GetImportJob_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/get_location.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/get_location.php new file mode 100644 index 000000000000..6413993b0568 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/get_location.php @@ -0,0 +1,57 @@ +getLocation($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END migrationcenter_v1_generated_MigrationCenter_GetLocation_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/get_preference_set.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/get_preference_set.php new file mode 100644 index 000000000000..9d715db7c7aa --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/get_preference_set.php @@ -0,0 +1,75 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var PreferenceSet $response */ + $response = $migrationCenterClient->getPreferenceSet($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = MigrationCenterClient::preferenceSetName( + '[PROJECT]', + '[LOCATION]', + '[PREFERENCE_SET]' + ); + + get_preference_set_sample($formattedName); +} +// [END migrationcenter_v1_generated_MigrationCenter_GetPreferenceSet_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/get_report.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/get_report.php new file mode 100644 index 000000000000..10356b021038 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/get_report.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Report $response */ + $response = $migrationCenterClient->getReport($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = MigrationCenterClient::reportName( + '[PROJECT]', + '[LOCATION]', + '[REPORT_CONFIG]', + '[REPORT]' + ); + + get_report_sample($formattedName); +} +// [END migrationcenter_v1_generated_MigrationCenter_GetReport_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/get_report_config.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/get_report_config.php new file mode 100644 index 000000000000..e3baaf6aeb01 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/get_report_config.php @@ -0,0 +1,75 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var ReportConfig $response */ + $response = $migrationCenterClient->getReportConfig($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = MigrationCenterClient::reportConfigName( + '[PROJECT]', + '[LOCATION]', + '[REPORT_CONFIG]' + ); + + get_report_config_sample($formattedName); +} +// [END migrationcenter_v1_generated_MigrationCenter_GetReportConfig_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/get_settings.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/get_settings.php new file mode 100644 index 000000000000..47ecdfb1b626 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/get_settings.php @@ -0,0 +1,71 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Settings $response */ + $response = $migrationCenterClient->getSettings($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = MigrationCenterClient::settingsName('[PROJECT]', '[LOCATION]'); + + get_settings_sample($formattedName); +} +// [END migrationcenter_v1_generated_MigrationCenter_GetSettings_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/get_source.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/get_source.php new file mode 100644 index 000000000000..5a1ee035ecfd --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/get_source.php @@ -0,0 +1,71 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Source $response */ + $response = $migrationCenterClient->getSource($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = MigrationCenterClient::sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + + get_source_sample($formattedName); +} +// [END migrationcenter_v1_generated_MigrationCenter_GetSource_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/list_assets.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/list_assets.php new file mode 100644 index 000000000000..eb6f413f3efd --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/list_assets.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $migrationCenterClient->listAssets($request); + + /** @var Asset $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = MigrationCenterClient::locationName('[PROJECT]', '[LOCATION]'); + + list_assets_sample($formattedParent); +} +// [END migrationcenter_v1_generated_MigrationCenter_ListAssets_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/list_error_frames.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/list_error_frames.php new file mode 100644 index 000000000000..148fa203f681 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/list_error_frames.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $migrationCenterClient->listErrorFrames($request); + + /** @var ErrorFrame $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = MigrationCenterClient::sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + + list_error_frames_sample($formattedParent); +} +// [END migrationcenter_v1_generated_MigrationCenter_ListErrorFrames_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/list_groups.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/list_groups.php new file mode 100644 index 000000000000..886ab3dfc3d4 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/list_groups.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $migrationCenterClient->listGroups($request); + + /** @var Group $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = MigrationCenterClient::locationName('[PROJECT]', '[LOCATION]'); + + list_groups_sample($formattedParent); +} +// [END migrationcenter_v1_generated_MigrationCenter_ListGroups_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/list_import_data_files.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/list_import_data_files.php new file mode 100644 index 000000000000..4b14ec35055e --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/list_import_data_files.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $migrationCenterClient->listImportDataFiles($request); + + /** @var ImportDataFile $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = MigrationCenterClient::importJobName('[PROJECT]', '[LOCATION]', '[IMPORT_JOB]'); + + list_import_data_files_sample($formattedParent); +} +// [END migrationcenter_v1_generated_MigrationCenter_ListImportDataFiles_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/list_import_jobs.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/list_import_jobs.php new file mode 100644 index 000000000000..121b05e94636 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/list_import_jobs.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $migrationCenterClient->listImportJobs($request); + + /** @var ImportJob $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = MigrationCenterClient::locationName('[PROJECT]', '[LOCATION]'); + + list_import_jobs_sample($formattedParent); +} +// [END migrationcenter_v1_generated_MigrationCenter_ListImportJobs_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/list_locations.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/list_locations.php new file mode 100644 index 000000000000..f1cce4e51c90 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/list_locations.php @@ -0,0 +1,62 @@ +listLocations($request); + + /** @var Location $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END migrationcenter_v1_generated_MigrationCenter_ListLocations_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/list_preference_sets.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/list_preference_sets.php new file mode 100644 index 000000000000..1dc0251d994a --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/list_preference_sets.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $migrationCenterClient->listPreferenceSets($request); + + /** @var PreferenceSet $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = MigrationCenterClient::locationName('[PROJECT]', '[LOCATION]'); + + list_preference_sets_sample($formattedParent); +} +// [END migrationcenter_v1_generated_MigrationCenter_ListPreferenceSets_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/list_report_configs.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/list_report_configs.php new file mode 100644 index 000000000000..36bcbf588e0a --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/list_report_configs.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $migrationCenterClient->listReportConfigs($request); + + /** @var ReportConfig $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = MigrationCenterClient::locationName('[PROJECT]', '[LOCATION]'); + + list_report_configs_sample($formattedParent); +} +// [END migrationcenter_v1_generated_MigrationCenter_ListReportConfigs_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/list_reports.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/list_reports.php new file mode 100644 index 000000000000..65dad76af1f2 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/list_reports.php @@ -0,0 +1,80 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $migrationCenterClient->listReports($request); + + /** @var Report $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = MigrationCenterClient::reportConfigName( + '[PROJECT]', + '[LOCATION]', + '[REPORT_CONFIG]' + ); + + list_reports_sample($formattedParent); +} +// [END migrationcenter_v1_generated_MigrationCenter_ListReports_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/list_sources.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/list_sources.php new file mode 100644 index 000000000000..2f3b3b6bf373 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/list_sources.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $migrationCenterClient->listSources($request); + + /** @var Source $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = MigrationCenterClient::locationName('[PROJECT]', '[LOCATION]'); + + list_sources_sample($formattedParent); +} +// [END migrationcenter_v1_generated_MigrationCenter_ListSources_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/remove_assets_from_group.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/remove_assets_from_group.php new file mode 100644 index 000000000000..6b2a2363abc4 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/remove_assets_from_group.php @@ -0,0 +1,97 @@ +setAssetIds($formattedAssetsAssetIds); + $request = (new RemoveAssetsFromGroupRequest()) + ->setGroup($formattedGroup) + ->setAssets($assets); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $migrationCenterClient->removeAssetsFromGroup($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Group $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedGroup = MigrationCenterClient::groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); + $formattedAssetsAssetIdsElement = MigrationCenterClient::assetName( + '[PROJECT]', + '[LOCATION]', + '[ASSET]' + ); + + remove_assets_from_group_sample($formattedGroup, $formattedAssetsAssetIdsElement); +} +// [END migrationcenter_v1_generated_MigrationCenter_RemoveAssetsFromGroup_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/report_asset_frames.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/report_asset_frames.php new file mode 100644 index 000000000000..96764598cc04 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/report_asset_frames.php @@ -0,0 +1,74 @@ +setParent($parent) + ->setSource($formattedSource); + + // Call the API and handle any network failures. + try { + /** @var ReportAssetFramesResponse $response */ + $response = $migrationCenterClient->reportAssetFrames($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $parent = '[PARENT]'; + $formattedSource = MigrationCenterClient::sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + + report_asset_frames_sample($parent, $formattedSource); +} +// [END migrationcenter_v1_generated_MigrationCenter_ReportAssetFrames_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/run_import_job.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/run_import_job.php new file mode 100644 index 000000000000..11bf180f9aec --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/run_import_job.php @@ -0,0 +1,80 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $migrationCenterClient->runImportJob($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = MigrationCenterClient::importJobName('[PROJECT]', '[LOCATION]', '[IMPORT_JOB]'); + + run_import_job_sample($formattedName); +} +// [END migrationcenter_v1_generated_MigrationCenter_RunImportJob_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/update_asset.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/update_asset.php new file mode 100644 index 000000000000..2389be669992 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/update_asset.php @@ -0,0 +1,62 @@ +setUpdateMask($updateMask) + ->setAsset($asset); + + // Call the API and handle any network failures. + try { + /** @var Asset $response */ + $response = $migrationCenterClient->updateAsset($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END migrationcenter_v1_generated_MigrationCenter_UpdateAsset_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/update_group.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/update_group.php new file mode 100644 index 000000000000..644c4137509d --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/update_group.php @@ -0,0 +1,74 @@ +setUpdateMask($updateMask) + ->setGroup($group); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $migrationCenterClient->updateGroup($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Group $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END migrationcenter_v1_generated_MigrationCenter_UpdateGroup_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/update_import_job.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/update_import_job.php new file mode 100644 index 000000000000..2af252d5cdf2 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/update_import_job.php @@ -0,0 +1,92 @@ +setAssetSource($formattedImportJobAssetSource); + $request = (new UpdateImportJobRequest()) + ->setUpdateMask($updateMask) + ->setImportJob($importJob); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $migrationCenterClient->updateImportJob($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var ImportJob $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedImportJobAssetSource = MigrationCenterClient::sourceName( + '[PROJECT]', + '[LOCATION]', + '[SOURCE]' + ); + + update_import_job_sample($formattedImportJobAssetSource); +} +// [END migrationcenter_v1_generated_MigrationCenter_UpdateImportJob_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/update_preference_set.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/update_preference_set.php new file mode 100644 index 000000000000..13536ccd7292 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/update_preference_set.php @@ -0,0 +1,74 @@ +setUpdateMask($updateMask) + ->setPreferenceSet($preferenceSet); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $migrationCenterClient->updatePreferenceSet($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var PreferenceSet $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END migrationcenter_v1_generated_MigrationCenter_UpdatePreferenceSet_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/update_settings.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/update_settings.php new file mode 100644 index 000000000000..1426d9f05cf1 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/update_settings.php @@ -0,0 +1,74 @@ +setUpdateMask($updateMask) + ->setSettings($settings); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $migrationCenterClient->updateSettings($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Settings $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END migrationcenter_v1_generated_MigrationCenter_UpdateSettings_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/update_source.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/update_source.php new file mode 100644 index 000000000000..61bb46995ca5 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/update_source.php @@ -0,0 +1,74 @@ +setUpdateMask($updateMask) + ->setSource($source); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $migrationCenterClient->updateSource($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Source $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END migrationcenter_v1_generated_MigrationCenter_UpdateSource_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/validate_import_job.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/validate_import_job.php new file mode 100644 index 000000000000..a5fadf886aa0 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/validate_import_job.php @@ -0,0 +1,80 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $migrationCenterClient->validateImportJob($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = MigrationCenterClient::importJobName('[PROJECT]', '[LOCATION]', '[IMPORT_JOB]'); + + validate_import_job_sample($formattedName); +} +// [END migrationcenter_v1_generated_MigrationCenter_ValidateImportJob_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/src/V1/Client/MigrationCenterClient.php b/owl-bot-staging/MigrationCenter/v1/src/V1/Client/MigrationCenterClient.php new file mode 100644 index 000000000000..dad9fe65847e --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/src/V1/Client/MigrationCenterClient.php @@ -0,0 +1,1883 @@ + addAssetsToGroupAsync(AddAssetsToGroupRequest $request, array $optionalArgs = []) + * @method PromiseInterface aggregateAssetsValuesAsync(AggregateAssetsValuesRequest $request, array $optionalArgs = []) + * @method PromiseInterface batchDeleteAssetsAsync(BatchDeleteAssetsRequest $request, array $optionalArgs = []) + * @method PromiseInterface batchUpdateAssetsAsync(BatchUpdateAssetsRequest $request, array $optionalArgs = []) + * @method PromiseInterface createGroupAsync(CreateGroupRequest $request, array $optionalArgs = []) + * @method PromiseInterface createImportDataFileAsync(CreateImportDataFileRequest $request, array $optionalArgs = []) + * @method PromiseInterface createImportJobAsync(CreateImportJobRequest $request, array $optionalArgs = []) + * @method PromiseInterface createPreferenceSetAsync(CreatePreferenceSetRequest $request, array $optionalArgs = []) + * @method PromiseInterface createReportAsync(CreateReportRequest $request, array $optionalArgs = []) + * @method PromiseInterface createReportConfigAsync(CreateReportConfigRequest $request, array $optionalArgs = []) + * @method PromiseInterface createSourceAsync(CreateSourceRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteAssetAsync(DeleteAssetRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteGroupAsync(DeleteGroupRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteImportDataFileAsync(DeleteImportDataFileRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteImportJobAsync(DeleteImportJobRequest $request, array $optionalArgs = []) + * @method PromiseInterface deletePreferenceSetAsync(DeletePreferenceSetRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteReportAsync(DeleteReportRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteReportConfigAsync(DeleteReportConfigRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteSourceAsync(DeleteSourceRequest $request, array $optionalArgs = []) + * @method PromiseInterface getAssetAsync(GetAssetRequest $request, array $optionalArgs = []) + * @method PromiseInterface getErrorFrameAsync(GetErrorFrameRequest $request, array $optionalArgs = []) + * @method PromiseInterface getGroupAsync(GetGroupRequest $request, array $optionalArgs = []) + * @method PromiseInterface getImportDataFileAsync(GetImportDataFileRequest $request, array $optionalArgs = []) + * @method PromiseInterface getImportJobAsync(GetImportJobRequest $request, array $optionalArgs = []) + * @method PromiseInterface getPreferenceSetAsync(GetPreferenceSetRequest $request, array $optionalArgs = []) + * @method PromiseInterface getReportAsync(GetReportRequest $request, array $optionalArgs = []) + * @method PromiseInterface getReportConfigAsync(GetReportConfigRequest $request, array $optionalArgs = []) + * @method PromiseInterface getSettingsAsync(GetSettingsRequest $request, array $optionalArgs = []) + * @method PromiseInterface getSourceAsync(GetSourceRequest $request, array $optionalArgs = []) + * @method PromiseInterface listAssetsAsync(ListAssetsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listErrorFramesAsync(ListErrorFramesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listGroupsAsync(ListGroupsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listImportDataFilesAsync(ListImportDataFilesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listImportJobsAsync(ListImportJobsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listPreferenceSetsAsync(ListPreferenceSetsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listReportConfigsAsync(ListReportConfigsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listReportsAsync(ListReportsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listSourcesAsync(ListSourcesRequest $request, array $optionalArgs = []) + * @method PromiseInterface removeAssetsFromGroupAsync(RemoveAssetsFromGroupRequest $request, array $optionalArgs = []) + * @method PromiseInterface reportAssetFramesAsync(ReportAssetFramesRequest $request, array $optionalArgs = []) + * @method PromiseInterface runImportJobAsync(RunImportJobRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateAssetAsync(UpdateAssetRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateGroupAsync(UpdateGroupRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateImportJobAsync(UpdateImportJobRequest $request, array $optionalArgs = []) + * @method PromiseInterface updatePreferenceSetAsync(UpdatePreferenceSetRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateSettingsAsync(UpdateSettingsRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateSourceAsync(UpdateSourceRequest $request, array $optionalArgs = []) + * @method PromiseInterface validateImportJobAsync(ValidateImportJobRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + */ +final class MigrationCenterClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.migrationcenter.v1.MigrationCenter'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'migrationcenter.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'migrationcenter.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/migration_center_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/migration_center_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/migration_center_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/migration_center_rest_client_config.php', + ], + ], + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Create the default operation client for the service. + * + * @param array $options ClientOptions for the client. + * + * @return OperationsClient + */ + private function createOperationsClient(array $options) + { + // Unset client-specific configuration options + unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); + + if (isset($options['operationsClient'])) { + return $options['operationsClient']; + } + + return new OperationsClient($options); + } + + /** + * Formats a string containing the fully-qualified path to represent a asset + * resource. + * + * @param string $project + * @param string $location + * @param string $asset + * + * @return string The formatted asset resource. + */ + public static function assetName(string $project, string $location, string $asset): string + { + return self::getPathTemplate('asset')->render([ + 'project' => $project, + 'location' => $location, + 'asset' => $asset, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a error_frame + * resource. + * + * @param string $project + * @param string $location + * @param string $source + * @param string $errorFrame + * + * @return string The formatted error_frame resource. + */ + public static function errorFrameName(string $project, string $location, string $source, string $errorFrame): string + { + return self::getPathTemplate('errorFrame')->render([ + 'project' => $project, + 'location' => $location, + 'source' => $source, + 'error_frame' => $errorFrame, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a group + * resource. + * + * @param string $project + * @param string $location + * @param string $group + * + * @return string The formatted group resource. + */ + public static function groupName(string $project, string $location, string $group): string + { + return self::getPathTemplate('group')->render([ + 'project' => $project, + 'location' => $location, + 'group' => $group, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * import_data_file resource. + * + * @param string $project + * @param string $location + * @param string $importJob + * @param string $importDataFile + * + * @return string The formatted import_data_file resource. + */ + public static function importDataFileName(string $project, string $location, string $importJob, string $importDataFile): string + { + return self::getPathTemplate('importDataFile')->render([ + 'project' => $project, + 'location' => $location, + 'import_job' => $importJob, + 'import_data_file' => $importDataFile, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a import_job + * resource. + * + * @param string $project + * @param string $location + * @param string $importJob + * + * @return string The formatted import_job resource. + */ + public static function importJobName(string $project, string $location, string $importJob): string + { + return self::getPathTemplate('importJob')->render([ + 'project' => $project, + 'location' => $location, + 'import_job' => $importJob, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a location + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted location resource. + */ + public static function locationName(string $project, string $location): string + { + return self::getPathTemplate('location')->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * preference_set resource. + * + * @param string $project + * @param string $location + * @param string $preferenceSet + * + * @return string The formatted preference_set resource. + */ + public static function preferenceSetName(string $project, string $location, string $preferenceSet): string + { + return self::getPathTemplate('preferenceSet')->render([ + 'project' => $project, + 'location' => $location, + 'preference_set' => $preferenceSet, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a report + * resource. + * + * @param string $project + * @param string $location + * @param string $reportConfig + * @param string $report + * + * @return string The formatted report resource. + */ + public static function reportName(string $project, string $location, string $reportConfig, string $report): string + { + return self::getPathTemplate('report')->render([ + 'project' => $project, + 'location' => $location, + 'report_config' => $reportConfig, + 'report' => $report, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * report_config resource. + * + * @param string $project + * @param string $location + * @param string $reportConfig + * + * @return string The formatted report_config resource. + */ + public static function reportConfigName(string $project, string $location, string $reportConfig): string + { + return self::getPathTemplate('reportConfig')->render([ + 'project' => $project, + 'location' => $location, + 'report_config' => $reportConfig, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a settings + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted settings resource. + */ + public static function settingsName(string $project, string $location): string + { + return self::getPathTemplate('settings')->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a source + * resource. + * + * @param string $project + * @param string $location + * @param string $source + * + * @return string The formatted source resource. + */ + public static function sourceName(string $project, string $location, string $source): string + { + return self::getPathTemplate('source')->render([ + 'project' => $project, + 'location' => $location, + 'source' => $source, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - asset: projects/{project}/locations/{location}/assets/{asset} + * - errorFrame: projects/{project}/locations/{location}/sources/{source}/errorFrames/{error_frame} + * - group: projects/{project}/locations/{location}/groups/{group} + * - importDataFile: projects/{project}/locations/{location}/importJobs/{import_job}/importDataFiles/{import_data_file} + * - importJob: projects/{project}/locations/{location}/importJobs/{import_job} + * - location: projects/{project}/locations/{location} + * - preferenceSet: projects/{project}/locations/{location}/preferenceSets/{preference_set} + * - report: projects/{project}/locations/{location}/reportConfigs/{report_config}/reports/{report} + * - reportConfig: projects/{project}/locations/{location}/reportConfigs/{report_config} + * - settings: projects/{project}/locations/{location}/settings + * - source: projects/{project}/locations/{location}/sources/{source} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'migrationcenter.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Adds assets to a group. + * + * The async variant is {@see MigrationCenterClient::addAssetsToGroupAsync()} . + * + * @example samples/V1/MigrationCenterClient/add_assets_to_group.php + * + * @param AddAssetsToGroupRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function addAssetsToGroup(AddAssetsToGroupRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('AddAssetsToGroup', $request, $callOptions)->wait(); + } + + /** + * Aggregates the requested fields based on provided function. + * + * The async variant is {@see MigrationCenterClient::aggregateAssetsValuesAsync()} + * . + * + * @example samples/V1/MigrationCenterClient/aggregate_assets_values.php + * + * @param AggregateAssetsValuesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return AggregateAssetsValuesResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function aggregateAssetsValues(AggregateAssetsValuesRequest $request, array $callOptions = []): AggregateAssetsValuesResponse + { + return $this->startApiCall('AggregateAssetsValues', $request, $callOptions)->wait(); + } + + /** + * Deletes list of Assets. + * + * The async variant is {@see MigrationCenterClient::batchDeleteAssetsAsync()} . + * + * @example samples/V1/MigrationCenterClient/batch_delete_assets.php + * + * @param BatchDeleteAssetsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException Thrown if the API call fails. + */ + public function batchDeleteAssets(BatchDeleteAssetsRequest $request, array $callOptions = []): void + { + $this->startApiCall('BatchDeleteAssets', $request, $callOptions)->wait(); + } + + /** + * Updates the parameters of a list of assets. + * + * The async variant is {@see MigrationCenterClient::batchUpdateAssetsAsync()} . + * + * @example samples/V1/MigrationCenterClient/batch_update_assets.php + * + * @param BatchUpdateAssetsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return BatchUpdateAssetsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function batchUpdateAssets(BatchUpdateAssetsRequest $request, array $callOptions = []): BatchUpdateAssetsResponse + { + return $this->startApiCall('BatchUpdateAssets', $request, $callOptions)->wait(); + } + + /** + * Creates a new group in a given project and location. + * + * The async variant is {@see MigrationCenterClient::createGroupAsync()} . + * + * @example samples/V1/MigrationCenterClient/create_group.php + * + * @param CreateGroupRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createGroup(CreateGroupRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateGroup', $request, $callOptions)->wait(); + } + + /** + * Creates an import data file. + * + * The async variant is {@see MigrationCenterClient::createImportDataFileAsync()} . + * + * @example samples/V1/MigrationCenterClient/create_import_data_file.php + * + * @param CreateImportDataFileRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createImportDataFile(CreateImportDataFileRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateImportDataFile', $request, $callOptions)->wait(); + } + + /** + * Creates an import job. + * + * The async variant is {@see MigrationCenterClient::createImportJobAsync()} . + * + * @example samples/V1/MigrationCenterClient/create_import_job.php + * + * @param CreateImportJobRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createImportJob(CreateImportJobRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateImportJob', $request, $callOptions)->wait(); + } + + /** + * Creates a new preference set in a given project and location. + * + * The async variant is {@see MigrationCenterClient::createPreferenceSetAsync()} . + * + * @example samples/V1/MigrationCenterClient/create_preference_set.php + * + * @param CreatePreferenceSetRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createPreferenceSet(CreatePreferenceSetRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreatePreferenceSet', $request, $callOptions)->wait(); + } + + /** + * Creates a report. + * + * The async variant is {@see MigrationCenterClient::createReportAsync()} . + * + * @example samples/V1/MigrationCenterClient/create_report.php + * + * @param CreateReportRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createReport(CreateReportRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateReport', $request, $callOptions)->wait(); + } + + /** + * Creates a report configuration. + * + * The async variant is {@see MigrationCenterClient::createReportConfigAsync()} . + * + * @example samples/V1/MigrationCenterClient/create_report_config.php + * + * @param CreateReportConfigRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createReportConfig(CreateReportConfigRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateReportConfig', $request, $callOptions)->wait(); + } + + /** + * Creates a new source in a given project and location. + * + * The async variant is {@see MigrationCenterClient::createSourceAsync()} . + * + * @example samples/V1/MigrationCenterClient/create_source.php + * + * @param CreateSourceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createSource(CreateSourceRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateSource', $request, $callOptions)->wait(); + } + + /** + * Deletes an asset. + * + * The async variant is {@see MigrationCenterClient::deleteAssetAsync()} . + * + * @example samples/V1/MigrationCenterClient/delete_asset.php + * + * @param DeleteAssetRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteAsset(DeleteAssetRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteAsset', $request, $callOptions)->wait(); + } + + /** + * Deletes a group. + * + * The async variant is {@see MigrationCenterClient::deleteGroupAsync()} . + * + * @example samples/V1/MigrationCenterClient/delete_group.php + * + * @param DeleteGroupRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteGroup(DeleteGroupRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteGroup', $request, $callOptions)->wait(); + } + + /** + * Delete an import data file. + * + * The async variant is {@see MigrationCenterClient::deleteImportDataFileAsync()} . + * + * @example samples/V1/MigrationCenterClient/delete_import_data_file.php + * + * @param DeleteImportDataFileRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteImportDataFile(DeleteImportDataFileRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteImportDataFile', $request, $callOptions)->wait(); + } + + /** + * Deletes an import job. + * + * The async variant is {@see MigrationCenterClient::deleteImportJobAsync()} . + * + * @example samples/V1/MigrationCenterClient/delete_import_job.php + * + * @param DeleteImportJobRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteImportJob(DeleteImportJobRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteImportJob', $request, $callOptions)->wait(); + } + + /** + * Deletes a preference set. + * + * The async variant is {@see MigrationCenterClient::deletePreferenceSetAsync()} . + * + * @example samples/V1/MigrationCenterClient/delete_preference_set.php + * + * @param DeletePreferenceSetRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deletePreferenceSet(DeletePreferenceSetRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeletePreferenceSet', $request, $callOptions)->wait(); + } + + /** + * Deletes a Report. + * + * The async variant is {@see MigrationCenterClient::deleteReportAsync()} . + * + * @example samples/V1/MigrationCenterClient/delete_report.php + * + * @param DeleteReportRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteReport(DeleteReportRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteReport', $request, $callOptions)->wait(); + } + + /** + * Deletes a ReportConfig. + * + * The async variant is {@see MigrationCenterClient::deleteReportConfigAsync()} . + * + * @example samples/V1/MigrationCenterClient/delete_report_config.php + * + * @param DeleteReportConfigRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteReportConfig(DeleteReportConfigRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteReportConfig', $request, $callOptions)->wait(); + } + + /** + * Deletes a source. + * + * The async variant is {@see MigrationCenterClient::deleteSourceAsync()} . + * + * @example samples/V1/MigrationCenterClient/delete_source.php + * + * @param DeleteSourceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteSource(DeleteSourceRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteSource', $request, $callOptions)->wait(); + } + + /** + * Gets the details of an asset. + * + * The async variant is {@see MigrationCenterClient::getAssetAsync()} . + * + * @example samples/V1/MigrationCenterClient/get_asset.php + * + * @param GetAssetRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Asset + * + * @throws ApiException Thrown if the API call fails. + */ + public function getAsset(GetAssetRequest $request, array $callOptions = []): Asset + { + return $this->startApiCall('GetAsset', $request, $callOptions)->wait(); + } + + /** + * Gets the details of an error frame. + * + * The async variant is {@see MigrationCenterClient::getErrorFrameAsync()} . + * + * @example samples/V1/MigrationCenterClient/get_error_frame.php + * + * @param GetErrorFrameRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ErrorFrame + * + * @throws ApiException Thrown if the API call fails. + */ + public function getErrorFrame(GetErrorFrameRequest $request, array $callOptions = []): ErrorFrame + { + return $this->startApiCall('GetErrorFrame', $request, $callOptions)->wait(); + } + + /** + * Gets the details of a group. + * + * The async variant is {@see MigrationCenterClient::getGroupAsync()} . + * + * @example samples/V1/MigrationCenterClient/get_group.php + * + * @param GetGroupRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Group + * + * @throws ApiException Thrown if the API call fails. + */ + public function getGroup(GetGroupRequest $request, array $callOptions = []): Group + { + return $this->startApiCall('GetGroup', $request, $callOptions)->wait(); + } + + /** + * Gets an import data file. + * + * The async variant is {@see MigrationCenterClient::getImportDataFileAsync()} . + * + * @example samples/V1/MigrationCenterClient/get_import_data_file.php + * + * @param GetImportDataFileRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ImportDataFile + * + * @throws ApiException Thrown if the API call fails. + */ + public function getImportDataFile(GetImportDataFileRequest $request, array $callOptions = []): ImportDataFile + { + return $this->startApiCall('GetImportDataFile', $request, $callOptions)->wait(); + } + + /** + * Gets the details of an import job. + * + * The async variant is {@see MigrationCenterClient::getImportJobAsync()} . + * + * @example samples/V1/MigrationCenterClient/get_import_job.php + * + * @param GetImportJobRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ImportJob + * + * @throws ApiException Thrown if the API call fails. + */ + public function getImportJob(GetImportJobRequest $request, array $callOptions = []): ImportJob + { + return $this->startApiCall('GetImportJob', $request, $callOptions)->wait(); + } + + /** + * Gets the details of a preference set. + * + * The async variant is {@see MigrationCenterClient::getPreferenceSetAsync()} . + * + * @example samples/V1/MigrationCenterClient/get_preference_set.php + * + * @param GetPreferenceSetRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PreferenceSet + * + * @throws ApiException Thrown if the API call fails. + */ + public function getPreferenceSet(GetPreferenceSetRequest $request, array $callOptions = []): PreferenceSet + { + return $this->startApiCall('GetPreferenceSet', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single Report. + * + * The async variant is {@see MigrationCenterClient::getReportAsync()} . + * + * @example samples/V1/MigrationCenterClient/get_report.php + * + * @param GetReportRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Report + * + * @throws ApiException Thrown if the API call fails. + */ + public function getReport(GetReportRequest $request, array $callOptions = []): Report + { + return $this->startApiCall('GetReport', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single ReportConfig. + * + * The async variant is {@see MigrationCenterClient::getReportConfigAsync()} . + * + * @example samples/V1/MigrationCenterClient/get_report_config.php + * + * @param GetReportConfigRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ReportConfig + * + * @throws ApiException Thrown if the API call fails. + */ + public function getReportConfig(GetReportConfigRequest $request, array $callOptions = []): ReportConfig + { + return $this->startApiCall('GetReportConfig', $request, $callOptions)->wait(); + } + + /** + * Gets the details of regional settings. + * + * The async variant is {@see MigrationCenterClient::getSettingsAsync()} . + * + * @example samples/V1/MigrationCenterClient/get_settings.php + * + * @param GetSettingsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Settings + * + * @throws ApiException Thrown if the API call fails. + */ + public function getSettings(GetSettingsRequest $request, array $callOptions = []): Settings + { + return $this->startApiCall('GetSettings', $request, $callOptions)->wait(); + } + + /** + * Gets the details of a source. + * + * The async variant is {@see MigrationCenterClient::getSourceAsync()} . + * + * @example samples/V1/MigrationCenterClient/get_source.php + * + * @param GetSourceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Source + * + * @throws ApiException Thrown if the API call fails. + */ + public function getSource(GetSourceRequest $request, array $callOptions = []): Source + { + return $this->startApiCall('GetSource', $request, $callOptions)->wait(); + } + + /** + * Lists all the assets in a given project and location. + * + * The async variant is {@see MigrationCenterClient::listAssetsAsync()} . + * + * @example samples/V1/MigrationCenterClient/list_assets.php + * + * @param ListAssetsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listAssets(ListAssetsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListAssets', $request, $callOptions); + } + + /** + * Lists all error frames in a given source and location. + * + * The async variant is {@see MigrationCenterClient::listErrorFramesAsync()} . + * + * @example samples/V1/MigrationCenterClient/list_error_frames.php + * + * @param ListErrorFramesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listErrorFrames(ListErrorFramesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListErrorFrames', $request, $callOptions); + } + + /** + * Lists all groups in a given project and location. + * + * The async variant is {@see MigrationCenterClient::listGroupsAsync()} . + * + * @example samples/V1/MigrationCenterClient/list_groups.php + * + * @param ListGroupsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listGroups(ListGroupsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListGroups', $request, $callOptions); + } + + /** + * List import data files. + * + * The async variant is {@see MigrationCenterClient::listImportDataFilesAsync()} . + * + * @example samples/V1/MigrationCenterClient/list_import_data_files.php + * + * @param ListImportDataFilesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listImportDataFiles(ListImportDataFilesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListImportDataFiles', $request, $callOptions); + } + + /** + * Lists all import jobs. + * + * The async variant is {@see MigrationCenterClient::listImportJobsAsync()} . + * + * @example samples/V1/MigrationCenterClient/list_import_jobs.php + * + * @param ListImportJobsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listImportJobs(ListImportJobsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListImportJobs', $request, $callOptions); + } + + /** + * Lists all the preference sets in a given project and location. + * + * The async variant is {@see MigrationCenterClient::listPreferenceSetsAsync()} . + * + * @example samples/V1/MigrationCenterClient/list_preference_sets.php + * + * @param ListPreferenceSetsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listPreferenceSets(ListPreferenceSetsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListPreferenceSets', $request, $callOptions); + } + + /** + * Lists ReportConfigs in a given project and location. + * + * The async variant is {@see MigrationCenterClient::listReportConfigsAsync()} . + * + * @example samples/V1/MigrationCenterClient/list_report_configs.php + * + * @param ListReportConfigsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listReportConfigs(ListReportConfigsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListReportConfigs', $request, $callOptions); + } + + /** + * Lists Reports in a given ReportConfig. + * + * The async variant is {@see MigrationCenterClient::listReportsAsync()} . + * + * @example samples/V1/MigrationCenterClient/list_reports.php + * + * @param ListReportsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listReports(ListReportsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListReports', $request, $callOptions); + } + + /** + * Lists all the sources in a given project and location. + * + * The async variant is {@see MigrationCenterClient::listSourcesAsync()} . + * + * @example samples/V1/MigrationCenterClient/list_sources.php + * + * @param ListSourcesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listSources(ListSourcesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListSources', $request, $callOptions); + } + + /** + * Removes assets from a group. + * + * The async variant is {@see MigrationCenterClient::removeAssetsFromGroupAsync()} + * . + * + * @example samples/V1/MigrationCenterClient/remove_assets_from_group.php + * + * @param RemoveAssetsFromGroupRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function removeAssetsFromGroup(RemoveAssetsFromGroupRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('RemoveAssetsFromGroup', $request, $callOptions)->wait(); + } + + /** + * Reports a set of frames. + * + * The async variant is {@see MigrationCenterClient::reportAssetFramesAsync()} . + * + * @example samples/V1/MigrationCenterClient/report_asset_frames.php + * + * @param ReportAssetFramesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ReportAssetFramesResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function reportAssetFrames(ReportAssetFramesRequest $request, array $callOptions = []): ReportAssetFramesResponse + { + return $this->startApiCall('ReportAssetFrames', $request, $callOptions)->wait(); + } + + /** + * Runs an import job. + * + * The async variant is {@see MigrationCenterClient::runImportJobAsync()} . + * + * @example samples/V1/MigrationCenterClient/run_import_job.php + * + * @param RunImportJobRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function runImportJob(RunImportJobRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('RunImportJob', $request, $callOptions)->wait(); + } + + /** + * Updates the parameters of an asset. + * + * The async variant is {@see MigrationCenterClient::updateAssetAsync()} . + * + * @example samples/V1/MigrationCenterClient/update_asset.php + * + * @param UpdateAssetRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Asset + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateAsset(UpdateAssetRequest $request, array $callOptions = []): Asset + { + return $this->startApiCall('UpdateAsset', $request, $callOptions)->wait(); + } + + /** + * Updates the parameters of a group. + * + * The async variant is {@see MigrationCenterClient::updateGroupAsync()} . + * + * @example samples/V1/MigrationCenterClient/update_group.php + * + * @param UpdateGroupRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateGroup(UpdateGroupRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateGroup', $request, $callOptions)->wait(); + } + + /** + * Updates an import job. + * + * The async variant is {@see MigrationCenterClient::updateImportJobAsync()} . + * + * @example samples/V1/MigrationCenterClient/update_import_job.php + * + * @param UpdateImportJobRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateImportJob(UpdateImportJobRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateImportJob', $request, $callOptions)->wait(); + } + + /** + * Updates the parameters of a preference set. + * + * The async variant is {@see MigrationCenterClient::updatePreferenceSetAsync()} . + * + * @example samples/V1/MigrationCenterClient/update_preference_set.php + * + * @param UpdatePreferenceSetRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updatePreferenceSet(UpdatePreferenceSetRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdatePreferenceSet', $request, $callOptions)->wait(); + } + + /** + * Updates the regional-level project settings. + * + * The async variant is {@see MigrationCenterClient::updateSettingsAsync()} . + * + * @example samples/V1/MigrationCenterClient/update_settings.php + * + * @param UpdateSettingsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateSettings(UpdateSettingsRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateSettings', $request, $callOptions)->wait(); + } + + /** + * Updates the parameters of a source. + * + * The async variant is {@see MigrationCenterClient::updateSourceAsync()} . + * + * @example samples/V1/MigrationCenterClient/update_source.php + * + * @param UpdateSourceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateSource(UpdateSourceRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateSource', $request, $callOptions)->wait(); + } + + /** + * Validates an import job. + * + * The async variant is {@see MigrationCenterClient::validateImportJobAsync()} . + * + * @example samples/V1/MigrationCenterClient/validate_import_job.php + * + * @param ValidateImportJobRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function validateImportJob(ValidateImportJobRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('ValidateImportJob', $request, $callOptions)->wait(); + } + + /** + * Gets information about a location. + * + * The async variant is {@see MigrationCenterClient::getLocationAsync()} . + * + * @example samples/V1/MigrationCenterClient/get_location.php + * + * @param GetLocationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Location + * + * @throws ApiException Thrown if the API call fails. + */ + public function getLocation(GetLocationRequest $request, array $callOptions = []): Location + { + return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * The async variant is {@see MigrationCenterClient::listLocationsAsync()} . + * + * @example samples/V1/MigrationCenterClient/list_locations.php + * + * @param ListLocationsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListLocations', $request, $callOptions); + } +} diff --git a/owl-bot-staging/MigrationCenter/v1/src/V1/gapic_metadata.json b/owl-bot-staging/MigrationCenter/v1/src/V1/gapic_metadata.json new file mode 100644 index 000000000000..84d26c232e01 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/src/V1/gapic_metadata.json @@ -0,0 +1,268 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.cloud.migrationcenter.v1", + "libraryPackage": "Google\\Cloud\\MigrationCenter\\V1", + "services": { + "MigrationCenter": { + "clients": { + "grpc": { + "libraryClient": "MigrationCenterGapicClient", + "rpcs": { + "AddAssetsToGroup": { + "methods": [ + "addAssetsToGroup" + ] + }, + "AggregateAssetsValues": { + "methods": [ + "aggregateAssetsValues" + ] + }, + "BatchDeleteAssets": { + "methods": [ + "batchDeleteAssets" + ] + }, + "BatchUpdateAssets": { + "methods": [ + "batchUpdateAssets" + ] + }, + "CreateGroup": { + "methods": [ + "createGroup" + ] + }, + "CreateImportDataFile": { + "methods": [ + "createImportDataFile" + ] + }, + "CreateImportJob": { + "methods": [ + "createImportJob" + ] + }, + "CreatePreferenceSet": { + "methods": [ + "createPreferenceSet" + ] + }, + "CreateReport": { + "methods": [ + "createReport" + ] + }, + "CreateReportConfig": { + "methods": [ + "createReportConfig" + ] + }, + "CreateSource": { + "methods": [ + "createSource" + ] + }, + "DeleteAsset": { + "methods": [ + "deleteAsset" + ] + }, + "DeleteGroup": { + "methods": [ + "deleteGroup" + ] + }, + "DeleteImportDataFile": { + "methods": [ + "deleteImportDataFile" + ] + }, + "DeleteImportJob": { + "methods": [ + "deleteImportJob" + ] + }, + "DeletePreferenceSet": { + "methods": [ + "deletePreferenceSet" + ] + }, + "DeleteReport": { + "methods": [ + "deleteReport" + ] + }, + "DeleteReportConfig": { + "methods": [ + "deleteReportConfig" + ] + }, + "DeleteSource": { + "methods": [ + "deleteSource" + ] + }, + "GetAsset": { + "methods": [ + "getAsset" + ] + }, + "GetErrorFrame": { + "methods": [ + "getErrorFrame" + ] + }, + "GetGroup": { + "methods": [ + "getGroup" + ] + }, + "GetImportDataFile": { + "methods": [ + "getImportDataFile" + ] + }, + "GetImportJob": { + "methods": [ + "getImportJob" + ] + }, + "GetPreferenceSet": { + "methods": [ + "getPreferenceSet" + ] + }, + "GetReport": { + "methods": [ + "getReport" + ] + }, + "GetReportConfig": { + "methods": [ + "getReportConfig" + ] + }, + "GetSettings": { + "methods": [ + "getSettings" + ] + }, + "GetSource": { + "methods": [ + "getSource" + ] + }, + "ListAssets": { + "methods": [ + "listAssets" + ] + }, + "ListErrorFrames": { + "methods": [ + "listErrorFrames" + ] + }, + "ListGroups": { + "methods": [ + "listGroups" + ] + }, + "ListImportDataFiles": { + "methods": [ + "listImportDataFiles" + ] + }, + "ListImportJobs": { + "methods": [ + "listImportJobs" + ] + }, + "ListPreferenceSets": { + "methods": [ + "listPreferenceSets" + ] + }, + "ListReportConfigs": { + "methods": [ + "listReportConfigs" + ] + }, + "ListReports": { + "methods": [ + "listReports" + ] + }, + "ListSources": { + "methods": [ + "listSources" + ] + }, + "RemoveAssetsFromGroup": { + "methods": [ + "removeAssetsFromGroup" + ] + }, + "ReportAssetFrames": { + "methods": [ + "reportAssetFrames" + ] + }, + "RunImportJob": { + "methods": [ + "runImportJob" + ] + }, + "UpdateAsset": { + "methods": [ + "updateAsset" + ] + }, + "UpdateGroup": { + "methods": [ + "updateGroup" + ] + }, + "UpdateImportJob": { + "methods": [ + "updateImportJob" + ] + }, + "UpdatePreferenceSet": { + "methods": [ + "updatePreferenceSet" + ] + }, + "UpdateSettings": { + "methods": [ + "updateSettings" + ] + }, + "UpdateSource": { + "methods": [ + "updateSource" + ] + }, + "ValidateImportJob": { + "methods": [ + "validateImportJob" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/MigrationCenter/v1/src/V1/resources/migration_center_client_config.json b/owl-bot-staging/MigrationCenter/v1/src/V1/resources/migration_center_client_config.json new file mode 100644 index 000000000000..22b47025fdfd --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/src/V1/resources/migration_center_client_config.json @@ -0,0 +1,292 @@ +{ + "interfaces": { + "google.cloud.migrationcenter.v1.MigrationCenter": { + "retry_codes": { + "no_retry_codes": [], + "no_retry_1_codes": [], + "no_retry_2_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + }, + "no_retry_2_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 600000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 600000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "AddAssetsToGroup": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "AggregateAssetsValues": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "BatchDeleteAssets": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "BatchUpdateAssets": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateGroup": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateImportDataFile": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateImportJob": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreatePreferenceSet": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateReport": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateReportConfig": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateSource": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteAsset": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteGroup": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteImportDataFile": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteImportJob": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeletePreferenceSet": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteReport": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteReportConfig": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteSource": { + "timeout_millis": 600000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" + }, + "GetAsset": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetErrorFrame": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetGroup": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetImportDataFile": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetImportJob": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetPreferenceSet": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetReport": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetReportConfig": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetSettings": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetSource": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListAssets": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListErrorFrames": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListGroups": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListImportDataFiles": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListImportJobs": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListPreferenceSets": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListReportConfigs": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListReports": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListSources": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "RemoveAssetsFromGroup": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ReportAssetFrames": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "RunImportJob": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateAsset": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateGroup": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateImportJob": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdatePreferenceSet": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateSettings": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateSource": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ValidateImportJob": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetLocation": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListLocations": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/MigrationCenter/v1/src/V1/resources/migration_center_descriptor_config.php b/owl-bot-staging/MigrationCenter/v1/src/V1/resources/migration_center_descriptor_config.php new file mode 100644 index 000000000000..27a9cb93b901 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/src/V1/resources/migration_center_descriptor_config.php @@ -0,0 +1,890 @@ + [ + 'google.cloud.migrationcenter.v1.MigrationCenter' => [ + 'AddAssetsToGroup' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\MigrationCenter\V1\Group', + 'metadataReturnType' => '\Google\Cloud\MigrationCenter\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'group', + 'fieldAccessors' => [ + 'getGroup', + ], + ], + ], + ], + 'CreateGroup' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\MigrationCenter\V1\Group', + 'metadataReturnType' => '\Google\Cloud\MigrationCenter\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateImportDataFile' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\MigrationCenter\V1\ImportDataFile', + 'metadataReturnType' => '\Google\Cloud\MigrationCenter\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateImportJob' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\MigrationCenter\V1\ImportJob', + 'metadataReturnType' => '\Google\Cloud\MigrationCenter\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreatePreferenceSet' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\MigrationCenter\V1\PreferenceSet', + 'metadataReturnType' => '\Google\Cloud\MigrationCenter\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateReport' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\MigrationCenter\V1\Report', + 'metadataReturnType' => '\Google\Cloud\MigrationCenter\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateReportConfig' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\MigrationCenter\V1\ReportConfig', + 'metadataReturnType' => '\Google\Cloud\MigrationCenter\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateSource' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\MigrationCenter\V1\Source', + 'metadataReturnType' => '\Google\Cloud\MigrationCenter\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteGroup' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\MigrationCenter\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteImportDataFile' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\MigrationCenter\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteImportJob' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\MigrationCenter\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeletePreferenceSet' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\MigrationCenter\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteReport' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\MigrationCenter\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteReportConfig' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\MigrationCenter\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteSource' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\MigrationCenter\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'RemoveAssetsFromGroup' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\MigrationCenter\V1\Group', + 'metadataReturnType' => '\Google\Cloud\MigrationCenter\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'group', + 'fieldAccessors' => [ + 'getGroup', + ], + ], + ], + ], + 'RunImportJob' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\MigrationCenter\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UpdateGroup' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\MigrationCenter\V1\Group', + 'metadataReturnType' => '\Google\Cloud\MigrationCenter\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'group.name', + 'fieldAccessors' => [ + 'getGroup', + 'getName', + ], + ], + ], + ], + 'UpdateImportJob' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\MigrationCenter\V1\ImportJob', + 'metadataReturnType' => '\Google\Cloud\MigrationCenter\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'import_job.name', + 'fieldAccessors' => [ + 'getImportJob', + 'getName', + ], + ], + ], + ], + 'UpdatePreferenceSet' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\MigrationCenter\V1\PreferenceSet', + 'metadataReturnType' => '\Google\Cloud\MigrationCenter\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'preference_set.name', + 'fieldAccessors' => [ + 'getPreferenceSet', + 'getName', + ], + ], + ], + ], + 'UpdateSettings' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\MigrationCenter\V1\Settings', + 'metadataReturnType' => '\Google\Cloud\MigrationCenter\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'settings.name', + 'fieldAccessors' => [ + 'getSettings', + 'getName', + ], + ], + ], + ], + 'UpdateSource' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\MigrationCenter\V1\Source', + 'metadataReturnType' => '\Google\Cloud\MigrationCenter\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'source.name', + 'fieldAccessors' => [ + 'getSource', + 'getName', + ], + ], + ], + ], + 'ValidateImportJob' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\MigrationCenter\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'AggregateAssetsValues' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\MigrationCenter\V1\AggregateAssetsValuesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'BatchDeleteAssets' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'BatchUpdateAssets' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\MigrationCenter\V1\BatchUpdateAssetsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteAsset' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetAsset' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\MigrationCenter\V1\Asset', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetErrorFrame' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\MigrationCenter\V1\ErrorFrame', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetGroup' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\MigrationCenter\V1\Group', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetImportDataFile' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\MigrationCenter\V1\ImportDataFile', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetImportJob' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\MigrationCenter\V1\ImportJob', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetPreferenceSet' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\MigrationCenter\V1\PreferenceSet', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetReport' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\MigrationCenter\V1\Report', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetReportConfig' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\MigrationCenter\V1\ReportConfig', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetSettings' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\MigrationCenter\V1\Settings', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetSource' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\MigrationCenter\V1\Source', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListAssets' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getAssets', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\MigrationCenter\V1\ListAssetsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListErrorFrames' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getErrorFrames', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\MigrationCenter\V1\ListErrorFramesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListGroups' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getGroups', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\MigrationCenter\V1\ListGroupsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListImportDataFiles' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getImportDataFiles', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\MigrationCenter\V1\ListImportDataFilesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListImportJobs' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getImportJobs', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\MigrationCenter\V1\ListImportJobsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListPreferenceSets' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getPreferenceSets', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\MigrationCenter\V1\ListPreferenceSetsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListReportConfigs' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getReportConfigs', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\MigrationCenter\V1\ListReportConfigsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListReports' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getReports', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\MigrationCenter\V1\ListReportsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListSources' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getSources', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\MigrationCenter\V1\ListSourcesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ReportAssetFrames' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\MigrationCenter\V1\ReportAssetFramesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateAsset' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\MigrationCenter\V1\Asset', + 'headerParams' => [ + [ + 'keyName' => 'asset.name', + 'fieldAccessors' => [ + 'getAsset', + 'getName', + ], + ], + ], + ], + 'GetLocation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Location\Location', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'templateMap' => [ + 'asset' => 'projects/{project}/locations/{location}/assets/{asset}', + 'errorFrame' => 'projects/{project}/locations/{location}/sources/{source}/errorFrames/{error_frame}', + 'group' => 'projects/{project}/locations/{location}/groups/{group}', + 'importDataFile' => 'projects/{project}/locations/{location}/importJobs/{import_job}/importDataFiles/{import_data_file}', + 'importJob' => 'projects/{project}/locations/{location}/importJobs/{import_job}', + 'location' => 'projects/{project}/locations/{location}', + 'preferenceSet' => 'projects/{project}/locations/{location}/preferenceSets/{preference_set}', + 'report' => 'projects/{project}/locations/{location}/reportConfigs/{report_config}/reports/{report}', + 'reportConfig' => 'projects/{project}/locations/{location}/reportConfigs/{report_config}', + 'settings' => 'projects/{project}/locations/{location}/settings', + 'source' => 'projects/{project}/locations/{location}/sources/{source}', + ], + ], + ], +]; diff --git a/owl-bot-staging/MigrationCenter/v1/src/V1/resources/migration_center_rest_client_config.php b/owl-bot-staging/MigrationCenter/v1/src/V1/resources/migration_center_rest_client_config.php new file mode 100644 index 000000000000..209af4c348a6 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/src/V1/resources/migration_center_rest_client_config.php @@ -0,0 +1,694 @@ + [ + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.cloud.migrationcenter.v1.MigrationCenter' => [ + 'AddAssetsToGroup' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{group=projects/*/locations/*/groups/*}:addAssets', + 'body' => '*', + 'placeholders' => [ + 'group' => [ + 'getters' => [ + 'getGroup', + ], + ], + ], + ], + 'AggregateAssetsValues' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/assets:aggregateValues', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'BatchDeleteAssets' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/assets:batchDelete', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'BatchUpdateAssets' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/assets:batchUpdate', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreateGroup' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/groups', + 'body' => 'group', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'group_id', + ], + ], + 'CreateImportDataFile' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/importJobs/*}/importDataFiles', + 'body' => 'import_data_file', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'import_data_file_id', + ], + ], + 'CreateImportJob' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/importJobs', + 'body' => 'import_job', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'import_job_id', + ], + ], + 'CreatePreferenceSet' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/preferenceSets', + 'body' => 'preference_set', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'preference_set_id', + ], + ], + 'CreateReport' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/reportConfigs/*}/reports', + 'body' => 'report', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'report_id', + ], + ], + 'CreateReportConfig' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/reportConfigs', + 'body' => 'report_config', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'report_config_id', + ], + ], + 'CreateSource' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/sources', + 'body' => 'source', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'source_id', + ], + ], + 'DeleteAsset' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/assets/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteGroup' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/groups/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteImportDataFile' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/importJobs/*/importDataFiles/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteImportJob' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/importJobs/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeletePreferenceSet' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/preferenceSets/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteReport' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/reportConfigs/*/reports/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteReportConfig' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/reportConfigs/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteSource' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/sources/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetAsset' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/assets/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetErrorFrame' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/sources/*/errorFrames/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetGroup' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/groups/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetImportDataFile' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/importJobs/*/importDataFiles/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetImportJob' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/importJobs/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetPreferenceSet' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/preferenceSets/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetReport' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/reportConfigs/*/reports/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetReportConfig' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/reportConfigs/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetSettings' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/settings}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetSource' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/sources/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListAssets' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/assets', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListErrorFrames' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/sources/*}/errorFrames', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListGroups' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/groups', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListImportDataFiles' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/importJobs/*}/importDataFiles', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListImportJobs' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/importJobs', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListPreferenceSets' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/preferenceSets', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListReportConfigs' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/reportConfigs', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListReports' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/reportConfigs/*}/reports', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListSources' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/sources', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'RemoveAssetsFromGroup' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{group=projects/*/locations/*/groups/*}:removeAssets', + 'body' => '*', + 'placeholders' => [ + 'group' => [ + 'getters' => [ + 'getGroup', + ], + ], + ], + ], + 'ReportAssetFrames' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/assets:reportAssetFrames', + 'body' => 'frames', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'RunImportJob' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/importJobs/*}:run', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'UpdateAsset' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{asset.name=projects/*/locations/*/assets/*}', + 'body' => 'asset', + 'placeholders' => [ + 'asset.name' => [ + 'getters' => [ + 'getAsset', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdateGroup' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{group.name=projects/*/locations/*/groups/*}', + 'body' => 'group', + 'placeholders' => [ + 'group.name' => [ + 'getters' => [ + 'getGroup', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdateImportJob' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{import_job.name=projects/*/locations/*/importJobs/*}', + 'body' => 'import_job', + 'placeholders' => [ + 'import_job.name' => [ + 'getters' => [ + 'getImportJob', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdatePreferenceSet' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{preference_set.name=projects/*/locations/*/preferenceSets/*}', + 'body' => 'preference_set', + 'placeholders' => [ + 'preference_set.name' => [ + 'getters' => [ + 'getPreferenceSet', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdateSettings' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{settings.name=projects/*/locations/*/settings}', + 'body' => 'settings', + 'placeholders' => [ + 'settings.name' => [ + 'getters' => [ + 'getSettings', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdateSource' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{source.name=projects/*/locations/*/sources/*}', + 'body' => 'source', + 'placeholders' => [ + 'source.name' => [ + 'getters' => [ + 'getSource', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'ValidateImportJob' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/importJobs/*}:validate', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/MigrationCenter/v1/tests/Unit/V1/Client/MigrationCenterClientTest.php b/owl-bot-staging/MigrationCenter/v1/tests/Unit/V1/Client/MigrationCenterClientTest.php new file mode 100644 index 000000000000..045a91b183b6 --- /dev/null +++ b/owl-bot-staging/MigrationCenter/v1/tests/Unit/V1/Client/MigrationCenterClientTest.php @@ -0,0 +1,5105 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return MigrationCenterClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new MigrationCenterClient($options); + } + + /** @test */ + public function addAssetsToGroupTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/addAssetsToGroupTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $expectedResponse = new Group(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/addAssetsToGroupTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedGroup = $gapicClient->groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); + $assets = new AssetList(); + $assetsAssetIds = [ + $gapicClient->assetName('[PROJECT]', '[LOCATION]', '[ASSET]'), + ]; + $assets->setAssetIds($assetsAssetIds); + $request = (new AddAssetsToGroupRequest()) + ->setGroup($formattedGroup) + ->setAssets($assets); + $response = $gapicClient->addAssetsToGroup($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/AddAssetsToGroup', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getGroup(); + $this->assertProtobufEquals($formattedGroup, $actualValue); + $actualValue = $actualApiRequestObject->getAssets(); + $this->assertProtobufEquals($assets, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/addAssetsToGroupTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function addAssetsToGroupExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/addAssetsToGroupTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedGroup = $gapicClient->groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); + $assets = new AssetList(); + $assetsAssetIds = [ + $gapicClient->assetName('[PROJECT]', '[LOCATION]', '[ASSET]'), + ]; + $assets->setAssetIds($assetsAssetIds); + $request = (new AddAssetsToGroupRequest()) + ->setGroup($formattedGroup) + ->setAssets($assets); + $response = $gapicClient->addAssetsToGroup($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/addAssetsToGroupTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function aggregateAssetsValuesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new AggregateAssetsValuesResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $parent = 'parent-995424086'; + $request = (new AggregateAssetsValuesRequest()) + ->setParent($parent); + $response = $gapicClient->aggregateAssetsValues($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/AggregateAssetsValues', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($parent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function aggregateAssetsValuesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $parent = 'parent-995424086'; + $request = (new AggregateAssetsValuesRequest()) + ->setParent($parent); + try { + $gapicClient->aggregateAssetsValues($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchDeleteAssetsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $formattedNames = [ + $gapicClient->assetName('[PROJECT]', '[LOCATION]', '[ASSET]'), + ]; + $request = (new BatchDeleteAssetsRequest()) + ->setParent($formattedParent) + ->setNames($formattedNames); + $gapicClient->batchDeleteAssets($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/BatchDeleteAssets', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getNames(); + $this->assertProtobufEquals($formattedNames, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchDeleteAssetsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $formattedNames = [ + $gapicClient->assetName('[PROJECT]', '[LOCATION]', '[ASSET]'), + ]; + $request = (new BatchDeleteAssetsRequest()) + ->setParent($formattedParent) + ->setNames($formattedNames); + try { + $gapicClient->batchDeleteAssets($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchUpdateAssetsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new BatchUpdateAssetsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $requests = []; + $request = (new BatchUpdateAssetsRequest()) + ->setParent($formattedParent) + ->setRequests($requests); + $response = $gapicClient->batchUpdateAssets($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/BatchUpdateAssets', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getRequests(); + $this->assertProtobufEquals($requests, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchUpdateAssetsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $requests = []; + $request = (new BatchUpdateAssetsRequest()) + ->setParent($formattedParent) + ->setRequests($requests); + try { + $gapicClient->batchUpdateAssets($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createGroupTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createGroupTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $expectedResponse = new Group(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createGroupTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $groupId = 'groupId506361563'; + $group = new Group(); + $request = (new CreateGroupRequest()) + ->setParent($formattedParent) + ->setGroupId($groupId) + ->setGroup($group); + $response = $gapicClient->createGroup($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/CreateGroup', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getGroupId(); + $this->assertProtobufEquals($groupId, $actualValue); + $actualValue = $actualApiRequestObject->getGroup(); + $this->assertProtobufEquals($group, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createGroupTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createGroupExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createGroupTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $groupId = 'groupId506361563'; + $group = new Group(); + $request = (new CreateGroupRequest()) + ->setParent($formattedParent) + ->setGroupId($groupId) + ->setGroup($group); + $response = $gapicClient->createGroup($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createGroupTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createImportDataFileTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createImportDataFileTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $expectedResponse = new ImportDataFile(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createImportDataFileTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->importJobName('[PROJECT]', '[LOCATION]', '[IMPORT_JOB]'); + $importDataFileId = 'importDataFileId-1455500925'; + $importDataFile = new ImportDataFile(); + $importDataFileFormat = ImportJobFormat::IMPORT_JOB_FORMAT_UNSPECIFIED; + $importDataFile->setFormat($importDataFileFormat); + $request = (new CreateImportDataFileRequest()) + ->setParent($formattedParent) + ->setImportDataFileId($importDataFileId) + ->setImportDataFile($importDataFile); + $response = $gapicClient->createImportDataFile($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/CreateImportDataFile', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getImportDataFileId(); + $this->assertProtobufEquals($importDataFileId, $actualValue); + $actualValue = $actualApiRequestObject->getImportDataFile(); + $this->assertProtobufEquals($importDataFile, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createImportDataFileTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createImportDataFileExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createImportDataFileTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->importJobName('[PROJECT]', '[LOCATION]', '[IMPORT_JOB]'); + $importDataFileId = 'importDataFileId-1455500925'; + $importDataFile = new ImportDataFile(); + $importDataFileFormat = ImportJobFormat::IMPORT_JOB_FORMAT_UNSPECIFIED; + $importDataFile->setFormat($importDataFileFormat); + $request = (new CreateImportDataFileRequest()) + ->setParent($formattedParent) + ->setImportDataFileId($importDataFileId) + ->setImportDataFile($importDataFile); + $response = $gapicClient->createImportDataFile($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createImportDataFileTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createImportJobTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createImportJobTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $assetSource = 'assetSource-2028843958'; + $expectedResponse = new ImportJob(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setAssetSource($assetSource); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createImportJobTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $importJobId = 'importJobId-1620773193'; + $importJob = new ImportJob(); + $importJobAssetSource = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + $importJob->setAssetSource($importJobAssetSource); + $request = (new CreateImportJobRequest()) + ->setParent($formattedParent) + ->setImportJobId($importJobId) + ->setImportJob($importJob); + $response = $gapicClient->createImportJob($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/CreateImportJob', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getImportJobId(); + $this->assertProtobufEquals($importJobId, $actualValue); + $actualValue = $actualApiRequestObject->getImportJob(); + $this->assertProtobufEquals($importJob, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createImportJobTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createImportJobExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createImportJobTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $importJobId = 'importJobId-1620773193'; + $importJob = new ImportJob(); + $importJobAssetSource = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + $importJob->setAssetSource($importJobAssetSource); + $request = (new CreateImportJobRequest()) + ->setParent($formattedParent) + ->setImportJobId($importJobId) + ->setImportJob($importJob); + $response = $gapicClient->createImportJob($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createImportJobTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createPreferenceSetTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createPreferenceSetTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $expectedResponse = new PreferenceSet(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createPreferenceSetTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $preferenceSetId = 'preferenceSetId697034236'; + $preferenceSet = new PreferenceSet(); + $request = (new CreatePreferenceSetRequest()) + ->setParent($formattedParent) + ->setPreferenceSetId($preferenceSetId) + ->setPreferenceSet($preferenceSet); + $response = $gapicClient->createPreferenceSet($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/CreatePreferenceSet', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getPreferenceSetId(); + $this->assertProtobufEquals($preferenceSetId, $actualValue); + $actualValue = $actualApiRequestObject->getPreferenceSet(); + $this->assertProtobufEquals($preferenceSet, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createPreferenceSetTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createPreferenceSetExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createPreferenceSetTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $preferenceSetId = 'preferenceSetId697034236'; + $preferenceSet = new PreferenceSet(); + $request = (new CreatePreferenceSetRequest()) + ->setParent($formattedParent) + ->setPreferenceSetId($preferenceSetId) + ->setPreferenceSet($preferenceSet); + $response = $gapicClient->createPreferenceSet($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createPreferenceSetTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createReportTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createReportTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $expectedResponse = new Report(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createReportTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->reportConfigName('[PROJECT]', '[LOCATION]', '[REPORT_CONFIG]'); + $reportId = 'reportId-353329146'; + $report = new Report(); + $request = (new CreateReportRequest()) + ->setParent($formattedParent) + ->setReportId($reportId) + ->setReport($report); + $response = $gapicClient->createReport($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/CreateReport', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getReportId(); + $this->assertProtobufEquals($reportId, $actualValue); + $actualValue = $actualApiRequestObject->getReport(); + $this->assertProtobufEquals($report, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createReportTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createReportExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createReportTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->reportConfigName('[PROJECT]', '[LOCATION]', '[REPORT_CONFIG]'); + $reportId = 'reportId-353329146'; + $report = new Report(); + $request = (new CreateReportRequest()) + ->setParent($formattedParent) + ->setReportId($reportId) + ->setReport($report); + $response = $gapicClient->createReport($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createReportTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createReportConfigTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createReportConfigTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $expectedResponse = new ReportConfig(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createReportConfigTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $reportConfigId = 'reportConfigId2120773101'; + $reportConfig = new ReportConfig(); + $reportConfigGroupPreferencesetAssignments = []; + $reportConfig->setGroupPreferencesetAssignments($reportConfigGroupPreferencesetAssignments); + $request = (new CreateReportConfigRequest()) + ->setParent($formattedParent) + ->setReportConfigId($reportConfigId) + ->setReportConfig($reportConfig); + $response = $gapicClient->createReportConfig($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/CreateReportConfig', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getReportConfigId(); + $this->assertProtobufEquals($reportConfigId, $actualValue); + $actualValue = $actualApiRequestObject->getReportConfig(); + $this->assertProtobufEquals($reportConfig, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createReportConfigTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createReportConfigExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createReportConfigTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $reportConfigId = 'reportConfigId2120773101'; + $reportConfig = new ReportConfig(); + $reportConfigGroupPreferencesetAssignments = []; + $reportConfig->setGroupPreferencesetAssignments($reportConfigGroupPreferencesetAssignments); + $request = (new CreateReportConfigRequest()) + ->setParent($formattedParent) + ->setReportConfigId($reportConfigId) + ->setReportConfig($reportConfig); + $response = $gapicClient->createReportConfig($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createReportConfigTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createSourceTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createSourceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $priority = 1165461084; + $managed = false; + $pendingFrameCount = 322639125; + $errorFrameCount = 1431911430; + $expectedResponse = new Source(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setPriority($priority); + $expectedResponse->setManaged($managed); + $expectedResponse->setPendingFrameCount($pendingFrameCount); + $expectedResponse->setErrorFrameCount($errorFrameCount); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createSourceTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $sourceId = 'sourceId-1698410561'; + $source = new Source(); + $request = (new CreateSourceRequest()) + ->setParent($formattedParent) + ->setSourceId($sourceId) + ->setSource($source); + $response = $gapicClient->createSource($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/CreateSource', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getSourceId(); + $this->assertProtobufEquals($sourceId, $actualValue); + $actualValue = $actualApiRequestObject->getSource(); + $this->assertProtobufEquals($source, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createSourceTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createSourceExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createSourceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $sourceId = 'sourceId-1698410561'; + $source = new Source(); + $request = (new CreateSourceRequest()) + ->setParent($formattedParent) + ->setSourceId($sourceId) + ->setSource($source); + $response = $gapicClient->createSource($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createSourceTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteAssetTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->assetName('[PROJECT]', '[LOCATION]', '[ASSET]'); + $request = (new DeleteAssetRequest()) + ->setName($formattedName); + $gapicClient->deleteAsset($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/DeleteAsset', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteAssetExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->assetName('[PROJECT]', '[LOCATION]', '[ASSET]'); + $request = (new DeleteAssetRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteAsset($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteGroupTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteGroupTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteGroupTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); + $request = (new DeleteGroupRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteGroup($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/DeleteGroup', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteGroupTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteGroupExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteGroupTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); + $request = (new DeleteGroupRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteGroup($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteGroupTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteImportDataFileTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteImportDataFileTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteImportDataFileTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->importDataFileName('[PROJECT]', '[LOCATION]', '[IMPORT_JOB]', '[IMPORT_DATA_FILE]'); + $request = (new DeleteImportDataFileRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteImportDataFile($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/DeleteImportDataFile', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteImportDataFileTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteImportDataFileExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteImportDataFileTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->importDataFileName('[PROJECT]', '[LOCATION]', '[IMPORT_JOB]', '[IMPORT_DATA_FILE]'); + $request = (new DeleteImportDataFileRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteImportDataFile($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteImportDataFileTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteImportJobTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteImportJobTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteImportJobTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->importJobName('[PROJECT]', '[LOCATION]', '[IMPORT_JOB]'); + $request = (new DeleteImportJobRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteImportJob($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/DeleteImportJob', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteImportJobTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteImportJobExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteImportJobTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->importJobName('[PROJECT]', '[LOCATION]', '[IMPORT_JOB]'); + $request = (new DeleteImportJobRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteImportJob($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteImportJobTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deletePreferenceSetTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deletePreferenceSetTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deletePreferenceSetTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->preferenceSetName('[PROJECT]', '[LOCATION]', '[PREFERENCE_SET]'); + $request = (new DeletePreferenceSetRequest()) + ->setName($formattedName); + $response = $gapicClient->deletePreferenceSet($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/DeletePreferenceSet', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deletePreferenceSetTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deletePreferenceSetExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deletePreferenceSetTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->preferenceSetName('[PROJECT]', '[LOCATION]', '[PREFERENCE_SET]'); + $request = (new DeletePreferenceSetRequest()) + ->setName($formattedName); + $response = $gapicClient->deletePreferenceSet($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deletePreferenceSetTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteReportTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteReportTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteReportTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->reportName('[PROJECT]', '[LOCATION]', '[REPORT_CONFIG]', '[REPORT]'); + $request = (new DeleteReportRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteReport($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/DeleteReport', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteReportTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteReportExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteReportTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->reportName('[PROJECT]', '[LOCATION]', '[REPORT_CONFIG]', '[REPORT]'); + $request = (new DeleteReportRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteReport($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteReportTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteReportConfigTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteReportConfigTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteReportConfigTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->reportConfigName('[PROJECT]', '[LOCATION]', '[REPORT_CONFIG]'); + $request = (new DeleteReportConfigRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteReportConfig($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/DeleteReportConfig', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteReportConfigTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteReportConfigExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteReportConfigTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->reportConfigName('[PROJECT]', '[LOCATION]', '[REPORT_CONFIG]'); + $request = (new DeleteReportConfigRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteReportConfig($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteReportConfigTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteSourceTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteSourceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteSourceTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + $request = (new DeleteSourceRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteSource($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/DeleteSource', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteSourceTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteSourceExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteSourceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + $request = (new DeleteSourceRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteSource($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteSourceTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getAssetTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new Asset(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->assetName('[PROJECT]', '[LOCATION]', '[ASSET]'); + $request = (new GetAssetRequest()) + ->setName($formattedName); + $response = $gapicClient->getAsset($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/GetAsset', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAssetExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->assetName('[PROJECT]', '[LOCATION]', '[ASSET]'); + $request = (new GetAssetRequest()) + ->setName($formattedName); + try { + $gapicClient->getAsset($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getErrorFrameTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new ErrorFrame(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->errorFrameName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[ERROR_FRAME]'); + $request = (new GetErrorFrameRequest()) + ->setName($formattedName); + $response = $gapicClient->getErrorFrame($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/GetErrorFrame', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getErrorFrameExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->errorFrameName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[ERROR_FRAME]'); + $request = (new GetErrorFrameRequest()) + ->setName($formattedName); + try { + $gapicClient->getErrorFrame($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getGroupTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $expectedResponse = new Group(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); + $request = (new GetGroupRequest()) + ->setName($formattedName); + $response = $gapicClient->getGroup($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/GetGroup', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getGroupExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); + $request = (new GetGroupRequest()) + ->setName($formattedName); + try { + $gapicClient->getGroup($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getImportDataFileTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $expectedResponse = new ImportDataFile(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->importDataFileName('[PROJECT]', '[LOCATION]', '[IMPORT_JOB]', '[IMPORT_DATA_FILE]'); + $request = (new GetImportDataFileRequest()) + ->setName($formattedName); + $response = $gapicClient->getImportDataFile($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/GetImportDataFile', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getImportDataFileExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->importDataFileName('[PROJECT]', '[LOCATION]', '[IMPORT_JOB]', '[IMPORT_DATA_FILE]'); + $request = (new GetImportDataFileRequest()) + ->setName($formattedName); + try { + $gapicClient->getImportDataFile($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getImportJobTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $assetSource = 'assetSource-2028843958'; + $expectedResponse = new ImportJob(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setAssetSource($assetSource); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->importJobName('[PROJECT]', '[LOCATION]', '[IMPORT_JOB]'); + $request = (new GetImportJobRequest()) + ->setName($formattedName); + $response = $gapicClient->getImportJob($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/GetImportJob', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getImportJobExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->importJobName('[PROJECT]', '[LOCATION]', '[IMPORT_JOB]'); + $request = (new GetImportJobRequest()) + ->setName($formattedName); + try { + $gapicClient->getImportJob($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getPreferenceSetTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $expectedResponse = new PreferenceSet(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->preferenceSetName('[PROJECT]', '[LOCATION]', '[PREFERENCE_SET]'); + $request = (new GetPreferenceSetRequest()) + ->setName($formattedName); + $response = $gapicClient->getPreferenceSet($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/GetPreferenceSet', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getPreferenceSetExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->preferenceSetName('[PROJECT]', '[LOCATION]', '[PREFERENCE_SET]'); + $request = (new GetPreferenceSetRequest()) + ->setName($formattedName); + try { + $gapicClient->getPreferenceSet($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getReportTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $expectedResponse = new Report(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->reportName('[PROJECT]', '[LOCATION]', '[REPORT_CONFIG]', '[REPORT]'); + $request = (new GetReportRequest()) + ->setName($formattedName); + $response = $gapicClient->getReport($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/GetReport', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getReportExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->reportName('[PROJECT]', '[LOCATION]', '[REPORT_CONFIG]', '[REPORT]'); + $request = (new GetReportRequest()) + ->setName($formattedName); + try { + $gapicClient->getReport($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getReportConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $expectedResponse = new ReportConfig(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->reportConfigName('[PROJECT]', '[LOCATION]', '[REPORT_CONFIG]'); + $request = (new GetReportConfigRequest()) + ->setName($formattedName); + $response = $gapicClient->getReportConfig($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/GetReportConfig', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getReportConfigExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->reportConfigName('[PROJECT]', '[LOCATION]', '[REPORT_CONFIG]'); + $request = (new GetReportConfigRequest()) + ->setName($formattedName); + try { + $gapicClient->getReportConfig($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getSettingsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $preferenceSet = 'preferenceSet813286142'; + $expectedResponse = new Settings(); + $expectedResponse->setName($name2); + $expectedResponse->setPreferenceSet($preferenceSet); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->settingsName('[PROJECT]', '[LOCATION]'); + $request = (new GetSettingsRequest()) + ->setName($formattedName); + $response = $gapicClient->getSettings($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/GetSettings', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getSettingsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->settingsName('[PROJECT]', '[LOCATION]'); + $request = (new GetSettingsRequest()) + ->setName($formattedName); + try { + $gapicClient->getSettings($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getSourceTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $priority = 1165461084; + $managed = false; + $pendingFrameCount = 322639125; + $errorFrameCount = 1431911430; + $expectedResponse = new Source(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setPriority($priority); + $expectedResponse->setManaged($managed); + $expectedResponse->setPendingFrameCount($pendingFrameCount); + $expectedResponse->setErrorFrameCount($errorFrameCount); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + $request = (new GetSourceRequest()) + ->setName($formattedName); + $response = $gapicClient->getSource($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/GetSource', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getSourceExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + $request = (new GetSourceRequest()) + ->setName($formattedName); + try { + $gapicClient->getSource($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAssetsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $assetsElement = new Asset(); + $assets = [ + $assetsElement, + ]; + $expectedResponse = new ListAssetsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setAssets($assets); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListAssetsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listAssets($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getAssets()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/ListAssets', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAssetsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListAssetsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listAssets($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listErrorFramesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $errorFramesElement = new ErrorFrame(); + $errorFrames = [ + $errorFramesElement, + ]; + $expectedResponse = new ListErrorFramesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setErrorFrames($errorFrames); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + $request = (new ListErrorFramesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listErrorFrames($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getErrorFrames()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/ListErrorFrames', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listErrorFramesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + $request = (new ListErrorFramesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listErrorFrames($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listGroupsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $groupsElement = new Group(); + $groups = [ + $groupsElement, + ]; + $expectedResponse = new ListGroupsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setGroups($groups); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListGroupsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listGroups($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getGroups()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/ListGroups', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listGroupsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListGroupsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listGroups($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listImportDataFilesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $importDataFilesElement = new ImportDataFile(); + $importDataFiles = [ + $importDataFilesElement, + ]; + $expectedResponse = new ListImportDataFilesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setImportDataFiles($importDataFiles); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->importJobName('[PROJECT]', '[LOCATION]', '[IMPORT_JOB]'); + $request = (new ListImportDataFilesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listImportDataFiles($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getImportDataFiles()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/ListImportDataFiles', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listImportDataFilesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->importJobName('[PROJECT]', '[LOCATION]', '[IMPORT_JOB]'); + $request = (new ListImportDataFilesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listImportDataFiles($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listImportJobsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $importJobsElement = new ImportJob(); + $importJobs = [ + $importJobsElement, + ]; + $expectedResponse = new ListImportJobsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setImportJobs($importJobs); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListImportJobsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listImportJobs($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getImportJobs()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/ListImportJobs', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listImportJobsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListImportJobsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listImportJobs($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listPreferenceSetsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $preferenceSetsElement = new PreferenceSet(); + $preferenceSets = [ + $preferenceSetsElement, + ]; + $expectedResponse = new ListPreferenceSetsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setPreferenceSets($preferenceSets); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListPreferenceSetsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listPreferenceSets($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getPreferenceSets()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/ListPreferenceSets', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listPreferenceSetsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListPreferenceSetsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listPreferenceSets($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listReportConfigsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $reportConfigsElement = new ReportConfig(); + $reportConfigs = [ + $reportConfigsElement, + ]; + $expectedResponse = new ListReportConfigsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setReportConfigs($reportConfigs); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListReportConfigsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listReportConfigs($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getReportConfigs()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/ListReportConfigs', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listReportConfigsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListReportConfigsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listReportConfigs($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listReportsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $reportsElement = new Report(); + $reports = [ + $reportsElement, + ]; + $expectedResponse = new ListReportsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setReports($reports); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->reportConfigName('[PROJECT]', '[LOCATION]', '[REPORT_CONFIG]'); + $request = (new ListReportsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listReports($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getReports()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/ListReports', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listReportsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->reportConfigName('[PROJECT]', '[LOCATION]', '[REPORT_CONFIG]'); + $request = (new ListReportsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listReports($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listSourcesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $sourcesElement = new Source(); + $sources = [ + $sourcesElement, + ]; + $expectedResponse = new ListSourcesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setSources($sources); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListSourcesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listSources($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getSources()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/ListSources', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listSourcesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListSourcesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listSources($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function removeAssetsFromGroupTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/removeAssetsFromGroupTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $expectedResponse = new Group(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/removeAssetsFromGroupTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedGroup = $gapicClient->groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); + $assets = new AssetList(); + $assetsAssetIds = [ + $gapicClient->assetName('[PROJECT]', '[LOCATION]', '[ASSET]'), + ]; + $assets->setAssetIds($assetsAssetIds); + $request = (new RemoveAssetsFromGroupRequest()) + ->setGroup($formattedGroup) + ->setAssets($assets); + $response = $gapicClient->removeAssetsFromGroup($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/RemoveAssetsFromGroup', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getGroup(); + $this->assertProtobufEquals($formattedGroup, $actualValue); + $actualValue = $actualApiRequestObject->getAssets(); + $this->assertProtobufEquals($assets, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/removeAssetsFromGroupTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function removeAssetsFromGroupExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/removeAssetsFromGroupTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedGroup = $gapicClient->groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); + $assets = new AssetList(); + $assetsAssetIds = [ + $gapicClient->assetName('[PROJECT]', '[LOCATION]', '[ASSET]'), + ]; + $assets->setAssetIds($assetsAssetIds); + $request = (new RemoveAssetsFromGroupRequest()) + ->setGroup($formattedGroup) + ->setAssets($assets); + $response = $gapicClient->removeAssetsFromGroup($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/removeAssetsFromGroupTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function reportAssetFramesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new ReportAssetFramesResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $parent = 'parent-995424086'; + $formattedSource = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + $request = (new ReportAssetFramesRequest()) + ->setParent($parent) + ->setSource($formattedSource); + $response = $gapicClient->reportAssetFrames($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/ReportAssetFrames', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($parent, $actualValue); + $actualValue = $actualRequestObject->getSource(); + $this->assertProtobufEquals($formattedSource, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function reportAssetFramesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $parent = 'parent-995424086'; + $formattedSource = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + $request = (new ReportAssetFramesRequest()) + ->setParent($parent) + ->setSource($formattedSource); + try { + $gapicClient->reportAssetFrames($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function runImportJobTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/runImportJobTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/runImportJobTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->importJobName('[PROJECT]', '[LOCATION]', '[IMPORT_JOB]'); + $request = (new RunImportJobRequest()) + ->setName($formattedName); + $response = $gapicClient->runImportJob($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/RunImportJob', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/runImportJobTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function runImportJobExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/runImportJobTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->importJobName('[PROJECT]', '[LOCATION]', '[IMPORT_JOB]'); + $request = (new RunImportJobRequest()) + ->setName($formattedName); + $response = $gapicClient->runImportJob($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/runImportJobTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateAssetTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $expectedResponse = new Asset(); + $expectedResponse->setName($name); + $transport->addResponse($expectedResponse); + // Mock request + $updateMask = new FieldMask(); + $asset = new Asset(); + $request = (new UpdateAssetRequest()) + ->setUpdateMask($updateMask) + ->setAsset($asset); + $response = $gapicClient->updateAsset($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/UpdateAsset', $actualFuncCall); + $actualValue = $actualRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $actualValue = $actualRequestObject->getAsset(); + $this->assertProtobufEquals($asset, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateAssetExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $updateMask = new FieldMask(); + $asset = new Asset(); + $request = (new UpdateAssetRequest()) + ->setUpdateMask($updateMask) + ->setAsset($asset); + try { + $gapicClient->updateAsset($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateGroupTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateGroupTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $expectedResponse = new Group(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateGroupTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $updateMask = new FieldMask(); + $group = new Group(); + $request = (new UpdateGroupRequest()) + ->setUpdateMask($updateMask) + ->setGroup($group); + $response = $gapicClient->updateGroup($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/UpdateGroup', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $actualValue = $actualApiRequestObject->getGroup(); + $this->assertProtobufEquals($group, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateGroupTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateGroupExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateGroupTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $updateMask = new FieldMask(); + $group = new Group(); + $request = (new UpdateGroupRequest()) + ->setUpdateMask($updateMask) + ->setGroup($group); + $response = $gapicClient->updateGroup($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateGroupTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateImportJobTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateImportJobTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $assetSource = 'assetSource-2028843958'; + $expectedResponse = new ImportJob(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setAssetSource($assetSource); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateImportJobTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $updateMask = new FieldMask(); + $importJob = new ImportJob(); + $importJobAssetSource = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + $importJob->setAssetSource($importJobAssetSource); + $request = (new UpdateImportJobRequest()) + ->setUpdateMask($updateMask) + ->setImportJob($importJob); + $response = $gapicClient->updateImportJob($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/UpdateImportJob', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $actualValue = $actualApiRequestObject->getImportJob(); + $this->assertProtobufEquals($importJob, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateImportJobTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateImportJobExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateImportJobTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $updateMask = new FieldMask(); + $importJob = new ImportJob(); + $importJobAssetSource = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + $importJob->setAssetSource($importJobAssetSource); + $request = (new UpdateImportJobRequest()) + ->setUpdateMask($updateMask) + ->setImportJob($importJob); + $response = $gapicClient->updateImportJob($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateImportJobTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updatePreferenceSetTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updatePreferenceSetTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $expectedResponse = new PreferenceSet(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updatePreferenceSetTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $updateMask = new FieldMask(); + $preferenceSet = new PreferenceSet(); + $request = (new UpdatePreferenceSetRequest()) + ->setUpdateMask($updateMask) + ->setPreferenceSet($preferenceSet); + $response = $gapicClient->updatePreferenceSet($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/UpdatePreferenceSet', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $actualValue = $actualApiRequestObject->getPreferenceSet(); + $this->assertProtobufEquals($preferenceSet, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updatePreferenceSetTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updatePreferenceSetExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updatePreferenceSetTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $updateMask = new FieldMask(); + $preferenceSet = new PreferenceSet(); + $request = (new UpdatePreferenceSetRequest()) + ->setUpdateMask($updateMask) + ->setPreferenceSet($preferenceSet); + $response = $gapicClient->updatePreferenceSet($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updatePreferenceSetTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateSettingsTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateSettingsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $preferenceSet = 'preferenceSet813286142'; + $expectedResponse = new Settings(); + $expectedResponse->setName($name); + $expectedResponse->setPreferenceSet($preferenceSet); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateSettingsTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $updateMask = new FieldMask(); + $settings = new Settings(); + $request = (new UpdateSettingsRequest()) + ->setUpdateMask($updateMask) + ->setSettings($settings); + $response = $gapicClient->updateSettings($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/UpdateSettings', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $actualValue = $actualApiRequestObject->getSettings(); + $this->assertProtobufEquals($settings, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateSettingsTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateSettingsExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateSettingsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $updateMask = new FieldMask(); + $settings = new Settings(); + $request = (new UpdateSettingsRequest()) + ->setUpdateMask($updateMask) + ->setSettings($settings); + $response = $gapicClient->updateSettings($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateSettingsTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateSourceTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateSourceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $priority = 1165461084; + $managed = false; + $pendingFrameCount = 322639125; + $errorFrameCount = 1431911430; + $expectedResponse = new Source(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setPriority($priority); + $expectedResponse->setManaged($managed); + $expectedResponse->setPendingFrameCount($pendingFrameCount); + $expectedResponse->setErrorFrameCount($errorFrameCount); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateSourceTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $updateMask = new FieldMask(); + $source = new Source(); + $request = (new UpdateSourceRequest()) + ->setUpdateMask($updateMask) + ->setSource($source); + $response = $gapicClient->updateSource($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/UpdateSource', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $actualValue = $actualApiRequestObject->getSource(); + $this->assertProtobufEquals($source, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateSourceTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateSourceExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateSourceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $updateMask = new FieldMask(); + $source = new Source(); + $request = (new UpdateSourceRequest()) + ->setUpdateMask($updateMask) + ->setSource($source); + $response = $gapicClient->updateSource($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateSourceTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function validateImportJobTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/validateImportJobTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/validateImportJobTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->importJobName('[PROJECT]', '[LOCATION]', '[IMPORT_JOB]'); + $request = (new ValidateImportJobRequest()) + ->setName($formattedName); + $response = $gapicClient->validateImportJob($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/ValidateImportJob', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/validateImportJobTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function validateImportJobExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/validateImportJobTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->importJobName('[PROJECT]', '[LOCATION]', '[IMPORT_JOB]'); + $request = (new ValidateImportJobRequest()) + ->setName($formattedName); + $response = $gapicClient->validateImportJob($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/validateImportJobTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getLocationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $locationId = 'locationId552319461'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Location(); + $expectedResponse->setName($name2); + $expectedResponse->setLocationId($locationId); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + $request = new GetLocationRequest(); + $response = $gapicClient->getLocation($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new GetLocationRequest(); + try { + $gapicClient->getLocation($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $locationsElement = new Location(); + $locations = [ + $locationsElement, + ]; + $expectedResponse = new ListLocationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setLocations($locations); + $transport->addResponse($expectedResponse); + $request = new ListLocationsRequest(); + $response = $gapicClient->listLocations($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new ListLocationsRequest(); + try { + $gapicClient->listLocations($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function addAssetsToGroupAsyncTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/addAssetsToGroupTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $expectedResponse = new Group(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/addAssetsToGroupTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedGroup = $gapicClient->groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); + $assets = new AssetList(); + $assetsAssetIds = [ + $gapicClient->assetName('[PROJECT]', '[LOCATION]', '[ASSET]'), + ]; + $assets->setAssetIds($assetsAssetIds); + $request = (new AddAssetsToGroupRequest()) + ->setGroup($formattedGroup) + ->setAssets($assets); + $response = $gapicClient->addAssetsToGroupAsync($request)->wait(); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/AddAssetsToGroup', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getGroup(); + $this->assertProtobufEquals($formattedGroup, $actualValue); + $actualValue = $actualApiRequestObject->getAssets(); + $this->assertProtobufEquals($assets, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/addAssetsToGroupTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } +} diff --git a/owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/Alert.php b/owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/Alert.php new file mode 100644 index 0000000000000000000000000000000000000000..caca7cc0e1b68c8e0e3b844657c577995e23ff5c GIT binary patch literal 6219 zcmcgw&2t+`6_4cj>&ahf+jw@Ugo%@_#91P-^1|-Qge_T?9kI5gm1PIER5gr7ZF$(y z%rGBb9GCALxIq;+{s5}@4=8R>1*iQJ_MAJ#mDk-fqmgYza-hg1@^rsncfa?0zxTR- z{F!s=z$0akTGZ8i+ELo)ihoKK$F+T1w@sxToSaZs(e0jNnAFWG%1%wG)|yIrr_y|g zrk)+RIxQ$&+wPh)*Rw6dw_U^P=FT>A8k+c74hCRpJ?c4{PL;j-_5t;^j^=BvJ#N=J zi0xX(n_B?7sd=7KWcF|Y3jT9~wrS{!=W9Ox_t@}M1D7&1(|C>hexaObrbp58`rMPi z(tX3W6lPGfboz8d5twZ5W5>pGzEGl_)Y;MT*sY4?Q`geW)(-V_*KqJyb(~r#bg3UZ zjD2~!5iZN%j1%Rl*khq^ZIdq)-wkMTbwzQhAGp>Q-!}uejDNLm@Kez-TDt}{JKOYB zJ2PyzQ0Skk4>HWOLBn{BZ8Z>>R>|&RgvVcV(E1=?!LzLf)or&kK1v*tod8*i0PkS> z%GDf)y59Jv4M%Ss;)a7EHk>%me`16*DRw$BD|Rtgp2l%xQGEix-++-xLRLf?WzorD z8fDKm<@dtm(i|h_h7lB5B|p3|?=W2vA)NB;#woop7OKmG5zc)O&gChKNs#M=9v?RT zb?DY`d@Zzh9X-dgAn?S%`rqG&4A17ejaht7?!jHA2U1E&J)Pa2__jDhR$#7Uc#f%^ zt9&TUhR80=cWgcAQA=<~n#a$Xd@d_i8uU~)u|#$!X@)qNz@x5eYHezI(vmWPC?AeS zIYOg-Zd0~=_ndr&+GJZDR36*%q&W`r!DyILWJ4-2gW+i#sJPM;o@F8b@h!|T0l8`O z+@a(Hn5LH2Hfcw?$Gsv)NKyQ<+o(^+ni){?7-r5;EOF=O65+E+G#jIp6-+1hVb!vI z`l90@qq;|Objx!J*tXXaOUCuMG7z6T4uqNtwF zs#W(~TIJSbkbx89Ff=1YnDOWtb(t@|gAfb(XE*OZ$*056g0VFv|1|~kgA7}QX=H|v zL=~(?j?eat9#wsel_c1_0@Gg5{w39YX#&^f%ukV*FlidrSDtj2)9Itpdl^_cyN||V zR~vAb{c$aqc$$$6Oa!hewj%#~6=wUaoD1`Dj_vB2IpgUp`4X06>Z|@KD$%KJcKBg4 z`K{5Lj#tZK^>+=u89}_fLylmnkFB*m=0)bRO#ai`0~eXSPC4vqAGW9Y`YG+GrrniR zIQAHx?r(bE?jA4%guQ@A3D{Vx)n5hFJx7VLx`EcE(lTFU|5gWx!Mr%c zqW36vY=L)magiFgS{&zK8YK<2h&(#^(b_ymv^?O z;4Wjo{KrXHyb^S>3{xkDi9MDeBqMN|d<=71x9id_*BDQl;TiF8hzt8Oi43GeExTt} z8a8Tbh&;=QTLLLLHn0GUy8wly6B{*8^L*8IBKciUQb{yA< zsIwwFFpas%0xV5)`ff&Z2bDdkjQ!I^+-SoZWm^!HqGxy>-Uw9I@N>am$QN&eT8^O( z1kw%y$)CgGb?5bCbc(l-*XTkfeQ!H4=biiw%DEtDC>{xV#y!e)dQOhZo@5M!u8kK1 zRwXj|cZq@gmlVuInsxJObXel;kV=1zl~KpM@h}%zV^q0Kc%ntJyiY2}SiE79e*`Nx zeP_k!D|#N5%6XU+jOAsrkp3hk|0WH}!3Z@ZXvZ}-g!%t_nY@MRB6|%S$P;4iARS3g@KBL%2U| zPPL}i>Pr)aKcwFjf0u^jrAS(i~cA3+o+YFAxzb{GMcDtHoycV@Pcai+_-4J(9u*1Y#d+tK~csG>Pv+WGb#v7G? zI|=jL5%GoK1l9(wJ?wg+nnuqMy?iEL9!=!|#B4Qji)tX+J_94afR%xD(A_=97pl9E z-~MkFVfo|uA#GZx8a-+fFGcf(C*r*~X>e4?_ zZ;F3Q!TX68a=0#$Tqr{0$`ScADKu!6{PXRKL7v}AUIjK_{BYinternalAddGeneratedFile( + ' +ƒ +(google/monitoring/v3/alert_service.protogoogle.monitoring.v3google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto google/monitoring/v3/alert.protogoogle/protobuf/empty.proto google/protobuf/field_mask.proto"• +CreateAlertPolicyRequest; +name ( B-àAúA\'%monitoring.googleapis.com/AlertPolicy< + alert_policy ( 2!.google.monitoring.v3.AlertPolicyBàA"T +GetAlertPolicyRequest; +name ( B-àAúA\' +%monitoring.googleapis.com/AlertPolicy"´ +ListAlertPoliciesRequest; +name ( B-àAúA\'%monitoring.googleapis.com/AlertPolicy +filter ( BàA +order_by ( BàA + page_size (BàA + +page_token ( BàA"ƒ +ListAlertPoliciesResponse9 +alert_policies ( 2!.google.monitoring.v3.AlertPolicy +next_page_token (  + +total_size ("Ž +UpdateAlertPolicyRequest4 + update_mask ( 2.google.protobuf.FieldMaskBàA< + alert_policy ( 2!.google.monitoring.v3.AlertPolicyBàA"W +DeleteAlertPolicyRequest; +name ( B-àAúA\' +%monitoring.googleapis.com/AlertPolicy2ž +AlertPolicyService¨ +ListAlertPolicies..google.monitoring.v3.ListAlertPoliciesRequest/.google.monitoring.v3.ListAlertPoliciesResponse"2ÚAname‚Óä“%#/v3/{name=projects/*}/alertPolicies– +GetAlertPolicy+.google.monitoring.v3.GetAlertPolicyRequest!.google.monitoring.v3.AlertPolicy"4ÚAname‚Óä“\'%/v3/{name=projects/*/alertPolicies/*}µ +CreateAlertPolicy..google.monitoring.v3.CreateAlertPolicyRequest!.google.monitoring.v3.AlertPolicy"MÚAname,alert_policy‚Óä“3"#/v3/{name=projects/*}/alertPolicies: alert_policy‘ +DeleteAlertPolicy..google.monitoring.v3.DeleteAlertPolicyRequest.google.protobuf.Empty"4ÚAname‚Óä“\'*%/v3/{name=projects/*/alertPolicies/*}Ë +UpdateAlertPolicy..google.monitoring.v3.UpdateAlertPolicyRequest!.google.monitoring.v3.AlertPolicy"cÚAupdate_mask,alert_policy‚Óä“B22/v3/{alert_policy.name=projects/*/alertPolicies/*}: alert_policy©ÊAmonitoring.googleapis.comÒA‰https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/monitoring,https://www.googleapis.com/auth/monitoring.readBÌ +com.google.monitoring.v3BAlertServiceProtoPZAcloud.google.com/go/monitoring/apiv3/v2/monitoringpb;monitoringpbªGoogle.Cloud.Monitoring.V3ÊGoogle\\Cloud\\Monitoring\\V3êGoogle::Cloud::Monitoring::V3bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/Common.php b/owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/Common.php new file mode 100644 index 0000000000000000000000000000000000000000..0fef40d6d1092c1e0a0c14353880a477bd27cd54 GIT binary patch literal 2539 zcmbVOYirw97>?~+k8@GfwDrO+r&*y+>68*Lg(}O2VxKqyTlQqdlwlCEbnFTgN$3*D zMt;Hm!(jVZ*oXa%!T!j8#a`VkId!|Sd~we6-k6FJ)$C+C6=-RQ(!0}9b zdUVq`0y6-(*c(E&c1?X((`M+QAxr}aae_>6R)x(-x& zhO<=qQSngtNVEg$*_t(KQD65=7YgfxD$h@8FrzF&>W69A$elUC^(050e=o^19C#ru zM#tErLFn11ao&-GyV-xE1w;w1Ick}H;F;qvs)^_GqH-ULEN6AKLTL8?GgVCJVW3^R zi^IlLe)X-H5+@kOjHe5jpZct_sLp5T*KPFVUk8WXOH{agwz!+d{^zM-JY3MNBO|RU z8Mpl}?#qKL^+e&|T?rxO)}_W!vqH-5AvA_osyET8R>GzF`sEV)5LKa=S6`=a8Q==Q zkI<&!z&O$ruK-?3@TfEPG{u(z-vIm-VvR!2Qt1jvtH(7itxt1JuGrbjrSmnk66bSZ zq0NZ;cp?E|U!Zkr8){TjElR3-yq~$r2;pYEVmXAMXQ4t}nnwJh2; zLPAGuORCh92(!fQ01@%IMLLSWl-QYqEGUF2!+`823ZkSCx!>zVa0RA`N&S#FirVY6 zh|DarTWBLeyQ0LP!clm`RCCu|B1p_;9=qAQk`!hu*B@MUnQfLqn~Ar9(rS?*vy(@S zEmTFmA`FwKn4lLzXF!-5@bMrqzmSEdBKD+2e>WHOiQFWTB6f)S`ZdEY7Mw5-779*Y zGJ6XJFHe|w8c%+4E3G0XFYJBq6lmi+sWeST;VmXvCVyK5&Qb5c&s!D&vv> literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/DroppedLabels.php b/owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/DroppedLabels.php new file mode 100644 index 000000000000..f7e45d86002a --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/DroppedLabels.php @@ -0,0 +1,33 @@ +internalAddGeneratedFile( + ' +— +)google/monitoring/v3/dropped_labels.protogoogle.monitoring.v3"| + DroppedLabels= +label ( 2..google.monitoring.v3.DroppedLabels.LabelEntry, + +LabelEntry +key (  +value ( :8BÍ +com.google.monitoring.v3BDroppedLabelsProtoPZAcloud.google.com/go/monitoring/apiv3/v2/monitoringpb;monitoringpbªGoogle.Cloud.Monitoring.V3ÊGoogle\\Cloud\\Monitoring\\V3êGoogle::Cloud::Monitoring::V3bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/Group.php b/owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/Group.php new file mode 100644 index 000000000000..999b703bd1a3 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/Group.php @@ -0,0 +1,37 @@ +internalAddGeneratedFile( + ' +‹ + google/monitoring/v3/group.protogoogle.monitoring.v3"€ +Group +name (  + display_name (  + parent_name (  +filter (  + +is_cluster (:™êA• +monitoring.googleapis.com/Group!projects/{project}/groups/{group}+organizations/{organization}/groups/{group}folders/{folder}/groups/{group}*BÅ +com.google.monitoring.v3B +GroupProtoPZAcloud.google.com/go/monitoring/apiv3/v2/monitoringpb;monitoringpbªGoogle.Cloud.Monitoring.V3ÊGoogle\\Cloud\\Monitoring\\V3êGoogle::Cloud::Monitoring::V3bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/GroupService.php b/owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/GroupService.php new file mode 100644 index 0000000000000000000000000000000000000000..a03455b22eaefbdb97cd6bc07b10a02c337b4ce1 GIT binary patch literal 3723 zcmb_fL2nyH6vj@IIuoE|)DqXF?Zi!q8-E@PSnn>o zV~0?M12+UhLcQ=4fd9Z9Rh;0K69-QG1Wvq}on5aTJGLcqakTT^oA15%y>DjTe%EVx z=nkn+hx!Jiby7PatVN0EyUaCRo76gu2K9;Qwmr+HzCy_EK6!utkUZFZe7Fp*f!py- zs*sLyN<8*DRCt^Z!Z7G5BJk&RYPMyPfEf&aR;-|E!OoUpTVFyN+oWOG0fhkP zZ5tiOWR~j??y&Eev~Z7vF}dxE=R(@sBm#86D*;u|A3Kctj$!M&G%$V3gDelgR8^al z#r5M~3isr;Je<`ag%G2vo&&i}nBSqv-3jq2>-f%=z|8}k#{cO<%B6Xht~rj&tKd3; zs`hf~g&5_yV_Vc=)A>BKs9i79meI9be>zv$T3UZXC26KYJH1yQm-HRC4dk30a=*7= z;N;FRYoKQj+8#R@?kdQ(@s1^_rPb>(lODpj72@7=Caj`wuc5-EbB3>mmI@>-CsOH_ za!blio-i6%T9!*aJX|3_Sm1;7 zzCc8z#SIxmNC`}3k@Dh(i}~NuXz@KOV4_#S6Z(0F1`OXvm$>3&FOyVZzO1kQrKSJX zmhtT#4kZi zjG3uo?4ql65FF~%4TmM7T$(D%BAWM%Cangbj@emooy8a-@rk*gQ71bm!e!80!?Ho= z@*g3bEM?$Tv($h-1wFkqx3k?i_fU7F<;%jADep{2O{d$e7n{+MwZ z+bX_IkAWQHAOl6S@XHYc1xx4gnqY3Xv*^&$;}DAHEeUaH=w}Zr_e%TVDX476DAX(cZ*Zof?Alu6AciSH+QRKTxa%%h^5;M~ut=i2oI zqW+Wo5AB;&i!m=yi^b#PV+kof=Zy|)!6nG;)HgiaU=7!Aua7hD?KOp|0!LK6{Cf&z z;d(K&Fy+OhYKYt8LF!{ofQuaX)uibrUs#X{%zAe-@y)Ak^&on+U(&gXcvvYrJkLnp z;CZGTm7Yh7x-M4rU;czDug=QK>d3cvf1Cuc_LQ7pZ)U!4W_IWPH^IvQZjeLjQEo-l zA)_-Ay`&`Ie&pM}OGfc{OgXXrX~0~{bwUn~$q&Z^^6=pCU>l*KA9I@;Wa9f1m$s+A z$0DCIZ_+;Pwx=}W%+{qh0MDAzFtBV&4*R_$8d;7NS>~YxnnyFBdD7hluw5$*30k28 z_!$U(f_UUIn}m@S;nz(T4jBexmdk#^%=gIHazl#Hw{6FIOVXtXh%0$oFQ9tcAK1zUAz~)-B zaU=gCB|YQ`Yt_Gv#bI$WFo-f~dQj^7$V9sXWl8ANa_a?BXjMB+eNjsKfK91vGqlv& zP{Oa6){7ECmO#z|>YNC>=HEpC;o&*ujD}hh*44x%F}2hI64q4%V2pCgD+zOb&MIY} zmR$P^%IH+iYJEfIb?cn~j3bS;`%qQc3|}$Nsjnfn)-iYHz;e8^=}MCP9_=*)K#DPp zkZ=96M1S&5u+(IL*4k&V9*8=G^%7Y_@jp&+bN!&JT5ZDR7>|W|8ADW>e-&XXlQc_B zy9-xcF?K^|b{K@H^PGF3vz*Nw?nk&PbD6`bw2Z}REefwoa+%x4Zw0vW#xt!7Yp>{; zEPmw;{X|FAI;-mUKTDS?DvDNV{!)ZmjuM{vsO6^8QdT&XaY?^RK_ykK2asrqUa)#L+7no5nFb`L&?aN_Xl!Mg#m$q=nD-pv;PIWAiO zBfL6>GQO-?`OziqL#U$XyLXbuqHJsU_!?}6coTY)N@!uu*Y3AUGrL|;cwl%aM7Ht>25t%*8*D$QSuP#xq9YOtSKD1~-h8?r2?ZY2BUKefzmuRdSon(yc~XsvYDU&H?@d|07jR literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/MetricService.php b/owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/MetricService.php new file mode 100644 index 0000000000000000000000000000000000000000..5cd56e066aeefad844fdcf1fcff8a8fcad56221e GIT binary patch literal 7118 zcmb_hOLH7o6{clLk?s&hzK-Rw5|eh@j->H;CN+ZtZdt~yheg1O9ocazVT!3%&z(_| zneL_^Qe>4j>|jL|3t$BcR#YWB3X0+fP$`N9*`&0himbfKItz+(AN`!3k;cIrkNTc- z?m6Fi+^=un{+_ezpeynwv52etq$Teh$o?*o9oP14!|uvELAy;{*|2+#*(Gj8me(K1 zZ$Ee}Z>+!d_%f(^cHkOBl{>cG>5^*CwoKo4O{-Jgt5puK< z)%2Ps>}~2@^C<+fBDeLfN5DeAY&)DgBDK;@kajk0-%O6eWo=Li`RkEw^nYKHcD$nAG zI=mi8YnzBt8!5ukwNeGxShIUj(x-PhtvzbMQK>R{{U4LyY1XG}$)0FuaOm)EqvGrX9UQnjTEb;u&}}fiXht zk#B!Utl~HoQ+^?##gqN@92h$UZ=jb$tedT9K6*t-KC@V;H5P=w6>zvR%-0L(C5wFI zHxu44rxhPv+a$xV%R)y3i=ac#2c7b33BAfNU{#otsJp2|)mWm+xHKeD8B5Qb9T#01 z;F!qBcM;}Qo0E@MQ|ZWhG%yE0M)NcW8TktS<_+p{T5$f!r!Oy0lKZWJCu?0^y%$(0Q8K$7YWJ<1tAz6jV`bh*fr()!OU$ z>fl<7P2h9s8Ni~!x6l+j5cc#g>-j=W2@4}(bgy2ah8X<;Nv`@PD(Ib#OFE2qusKzz zUC!6mVnKWto%e`gTP@u^XeKQbAgEJWm_<{z+ahjr=b$)Ak-%GMe9t8N#TVeOnVOpK zL@uN(Fb?t)u)sr0jmIglnH`VQbXTRZfM#NVsXCrQ)Ngd6P}J>92$j# zslu58{w5j^;Kb&qjPe@^UEtjp?-cg7CQ6U@cAb^p4Rqb;+CeLv`#s%)Q^ghgL?;uF znx7EE$7(v%G3M2Yq4KtSiq2;}+n~Wg1!wT1MRc;!v7&@uN0a<~7Tuo%&??9&pXb2x zDCqT|fbm6i)(7g{Z8|nIQq!;l%ZDV=l6eK4^8&*lo|jsrhuH*PLzAiG)WhVY+b$ck z*tWuApTCPHI0#A<3EetB)#p$l=_7MPX`{J!0^%O@=liV4H#IoT+XABr;3nO8}WcC0Zn`?Jr!_|@3Aag9>$ zL&|PffI!pH;8jaU;mtw(q8I1Y!~c-bw}!JnyqxdlaIG-JQ}a`0JsAuz^1NV%#!@Yn zj__Y3e#U2Mj)!acVX$0fcvr{^<_AoV0XiZpZzcm-!i|NzNFXiQP4Vv~bS{Sl;y3a= z&k+q#AIi6sTS*6jQs?>C?;eBq?{MJe^GG}Zt9RGN1BGG&+tFl9%yo zv0&To0{3JSD;B}OmC$VVu*Ns?!^+BqC=5!>onvj5g-iDnM3F^#O*t`2RVv|6BK{%{ zjmHrP|1THs4|1`tRAT6o(>}&dHP{QE@C_WEKbAh#E+*nAat?uvd z3ydSSsR#Zp+%^F%z2S6qziqp{@=4=C{>6xn!&Wz?4XP#Yw=GYRhac6}kbelPPcLWvJZ^d;3aay}k0N&b=N I2pu8xKQr*R@&Et; literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/MutationRecord.php b/owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/MutationRecord.php new file mode 100644 index 000000000000..cc7e45493f8f --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/MutationRecord.php @@ -0,0 +1,32 @@ +internalAddGeneratedFile( + ' +ò +*google/monitoring/v3/mutation_record.protogoogle.monitoring.v3"U +MutationRecord/ + mutate_time ( 2.google.protobuf.Timestamp + +mutated_by ( BÎ +com.google.monitoring.v3BMutationRecordProtoPZAcloud.google.com/go/monitoring/apiv3/v2/monitoringpb;monitoringpbªGoogle.Cloud.Monitoring.V3ÊGoogle\\Cloud\\Monitoring\\V3êGoogle::Cloud::Monitoring::V3bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/Notification.php b/owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/Notification.php new file mode 100644 index 0000000000000000000000000000000000000000..247b22413b13dd8762fee1d3312bc23d6c75c015 GIT binary patch literal 2943 zcmbVO-A?016s`jc?1Y6~vufQ`v;&JomR%AxQPtM`R0#x%R6+zHtFA0X6MGV-H6Ckh zr(#jwq!+#EO<$qv3silGUh@dOsCqnh5(h#zySa*I&iBpCcg}Zaw!d*NT=WbdQilrS zQwz7Quzx|ZE4a^1ZsS(aZc~9xe(5rsiX6uKC%Af2$Cdq~`U*fj9te}_xWjqJruj?m zFrN$Nbn@L|-r+uLGn4p?J2}aTkV7u1=Mt0R!&>>6`otnWF%Bi%I3B=_MsW)v(ZRc#U~Y1`9J{vo~;x9o#0iM}gpOY&&qwa6dQ%oH!=UKF1Mf z7`x_jIQ0(hZ>Sau0U{Vjj!%U{Y-68#reH1{vIe2L-l6_LzHlV_JYF`WV{M#`_NeQ3 zHo1d+5zyr77z^qL!r7Ah4hedLf5sTON-i@F7`3f3y&zr2g{}`zH6*zY`W?cTTCvg*7?LApNfdaa}6B@laVc zo4YKok&_R1`e zjEA{uLj84UJpFNETErQNr&i*r;X0v%!T2x`hir@uxs0`K3Mp z&-<|`8>_$1qNOn++^UBs$yzB-{au<6{Q1@ie_AHbCT=p$+^w}EDJK``yMTIsTf?Kp^^Q-(;mv2+Mb-ZksyK2 z4IJtVG)o=QvZJC~o1(mfCdt95BptU||RHxBqtL~!5 zw_1d!J(Ai?gwJfEbW)Wxn);Dm#eLurde9B`sL2MPr@m4$pQFXwLcRsE`UN~pPx0)t7o;!9t>CZAAg`OAaq`h!r)thvYZ=yrSyN5o6Vyx}4YbAzarR#ny~8NO65|rN4|`afwG?=u>8ndGN`|=vmf7J%s)P Dx_sV8 literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/NotificationService.php b/owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/NotificationService.php new file mode 100644 index 000000000000..b7607591fe99 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/NotificationService.php @@ -0,0 +1,97 @@ +internalAddGeneratedFile( + ' +Õ% +/google/monitoring/v3/notification_service.protogoogle.monitoring.v3google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto\'google/monitoring/v3/notification.protogoogle/protobuf/empty.proto google/protobuf/field_mask.protogoogle/protobuf/timestamp.proto"¡ +)ListNotificationChannelDescriptorsRequestM +name ( B?àAúA97monitoring.googleapis.com/NotificationChannelDescriptor + page_size ( + +page_token ( "— +*ListNotificationChannelDescriptorsResponseP +channel_descriptors ( 23.google.monitoring.v3.NotificationChannelDescriptor +next_page_token ( "x +\'GetNotificationChannelDescriptorRequestM +name ( B?àAúA9 +7monitoring.googleapis.com/NotificationChannelDescriptor"µ + CreateNotificationChannelRequestC +name ( B5àAúA/-monitoring.googleapis.com/NotificationChannelL +notification_channel ( 2).google.monitoring.v3.NotificationChannelBàA"à +ListNotificationChannelsRequestC +name ( B5àAúA/-monitoring.googleapis.com/NotificationChannel +filter ( BàA +order_by ( BàA + page_size (BàA + +page_token ( BàA"™ + ListNotificationChannelsResponseH +notification_channels ( 2).google.monitoring.v3.NotificationChannel +next_page_token (  + +total_size ("d +GetNotificationChannelRequestC +name ( B5àAúA/ +-monitoring.googleapis.com/NotificationChannel"¦ + UpdateNotificationChannelRequest4 + update_mask ( 2.google.protobuf.FieldMaskBàAL +notification_channel ( 2).google.monitoring.v3.NotificationChannelBàA"v + DeleteNotificationChannelRequestC +name ( B5àAúA/ +-monitoring.googleapis.com/NotificationChannel +force ("u +.SendNotificationChannelVerificationCodeRequestC +name ( B5àAúA/ +-monitoring.googleapis.com/NotificationChannel"¥ +-GetNotificationChannelVerificationCodeRequestC +name ( B5àAúA/ +-monitoring.googleapis.com/NotificationChannel/ + expire_time ( 2.google.protobuf.Timestamp"o +.GetNotificationChannelVerificationCodeResponse +code ( / + expire_time ( 2.google.protobuf.Timestamp"z + VerifyNotificationChannelRequestC +name ( B5àAúA/ +-monitoring.googleapis.com/NotificationChannel +code ( BàA2ê +NotificationChannelServiceì +"ListNotificationChannelDescriptors?.google.monitoring.v3.ListNotificationChannelDescriptorsRequest@.google.monitoring.v3.ListNotificationChannelDescriptorsResponse"CÚAname‚Óä“64/v3/{name=projects/*}/notificationChannelDescriptorsÝ + GetNotificationChannelDescriptor=.google.monitoring.v3.GetNotificationChannelDescriptorRequest3.google.monitoring.v3.NotificationChannelDescriptor"EÚAname‚Óä“86/v3/{name=projects/*/notificationChannelDescriptors/*}Ä +ListNotificationChannels5.google.monitoring.v3.ListNotificationChannelsRequest6.google.monitoring.v3.ListNotificationChannelsResponse"9ÚAname‚Óä“,*/v3/{name=projects/*}/notificationChannelsµ +GetNotificationChannel3.google.monitoring.v3.GetNotificationChannelRequest).google.monitoring.v3.NotificationChannel";ÚAname‚Óä“.,/v3/{name=projects/*/notificationChannels/*}ä +CreateNotificationChannel6.google.monitoring.v3.CreateNotificationChannelRequest).google.monitoring.v3.NotificationChannel"dÚAname,notification_channel‚Óä“B"*/v3/{name=projects/*}/notificationChannels:notification_channelƒ +UpdateNotificationChannel6.google.monitoring.v3.UpdateNotificationChannelRequest).google.monitoring.v3.NotificationChannel"‚ÚA update_mask,notification_channel‚Óä“Y2A/v3/{notification_channel.name=projects/*/notificationChannels/*}:notification_channel® +DeleteNotificationChannel6.google.monitoring.v3.DeleteNotificationChannelRequest.google.protobuf.Empty"AÚA +name,force‚Óä“.*,/v3/{name=projects/*/notificationChannels/*}Ü +\'SendNotificationChannelVerificationCodeD.google.monitoring.v3.SendNotificationChannelVerificationCodeRequest.google.protobuf.Empty"SÚAname‚Óä“F"A/v3/{name=projects/*/notificationChannels/*}:sendVerificationCode:*‡ +&GetNotificationChannelVerificationCodeC.google.monitoring.v3.GetNotificationChannelVerificationCodeRequestD.google.monitoring.v3.GetNotificationChannelVerificationCodeResponse"RÚAname‚Óä“E"@/v3/{name=projects/*/notificationChannels/*}:getVerificationCode:*Ê +VerifyNotificationChannel6.google.monitoring.v3.VerifyNotificationChannelRequest).google.monitoring.v3.NotificationChannel"JÚA name,code‚Óä“8"3/v3/{name=projects/*/notificationChannels/*}:verify:*©ÊAmonitoring.googleapis.comÒA‰https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/monitoring,https://www.googleapis.com/auth/monitoring.readBÓ +com.google.monitoring.v3BNotificationServiceProtoPZAcloud.google.com/go/monitoring/apiv3/v2/monitoringpb;monitoringpbªGoogle.Cloud.Monitoring.V3ÊGoogle\\Cloud\\Monitoring\\V3êGoogle::Cloud::Monitoring::V3bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/QueryService.php b/owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/QueryService.php new file mode 100644 index 000000000000..fb4ffd3bc28d --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/QueryService.php @@ -0,0 +1,32 @@ +internalAddGeneratedFile( + ' +¼ +(google/monitoring/v3/query_service.protogoogle.monitoring.v3google/api/client.proto)google/monitoring/v3/metric_service.proto2Þ + QueryService¡ +QueryTimeSeries,.google.monitoring.v3.QueryTimeSeriesRequest-.google.monitoring.v3.QueryTimeSeriesResponse"1‚Óä“+"&/v3/{name=projects/*}/timeSeries:query:*©ÊAmonitoring.googleapis.comÒA‰https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/monitoring,https://www.googleapis.com/auth/monitoring.readBÌ +com.google.monitoring.v3BQueryServiceProtoPZAcloud.google.com/go/monitoring/apiv3/v2/monitoringpb;monitoringpbªGoogle.Cloud.Monitoring.V3ÊGoogle\\Cloud\\Monitoring\\V3êGoogle::Cloud::Monitoring::V3bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/Service.php b/owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/Service.php new file mode 100644 index 0000000000000000000000000000000000000000..ffa79a3a9746c27bd7d886c8dec772ecbf848b0b GIT binary patch literal 5715 zcmcIo-EJGl753`S;-MtcYuTph)>zR_EV~Zbh(QogQ4Erj6{3>O$g&&+1UAdv5jFL4 zce_7y6hl{ih2Hh5=tY5|7wt_Sp%+1K3giKD?WgFOpCy+RMbQD`8;d*heRIy4@0>X^ zpFi=s)Z*+^L#gSP1n}i(eW|yHPh{S)FysW)3%>$&z>J@JKK%J zHG~Fk6CiqQb7D3HA#`v0XRmN1fF3MZMRw5C!t{(q0!pq z$ku)z**Yq30+_ZD1lkM10B=FVe_qtKsi_5_5#oRMX`oYFjv6-o9&O*!jtx5?h&?~| zIC9L8x{k&G&mEJjKhy*#n|t4L(bp|4wx!A3N7q{oCnUaO*sX06m_GH;wI)ujR5~Q= z2aSDMe<+t_bo5wT7dBQZ=ZxIaLO&wO)iup0VdOiT+-^p2*8i(DCQ?<8ww_XATQzcG z^r-7sDg&0R%X>L!^&kj$HU1+Ajc~SK#C`jW)yKi zu5pI-OBn`HsKRpF2&mboxIT>|H3pF+Y6Vguu}PPN{%LNR!!J|oVLV^0K{`U~b=znY zJIJkQvzRC!O?KcV0`~a)9S7IUFT#Szo%~%$^%DW}G}U#j$R;|qM6%}BU}ae3Y6h+% z8#~bClnyM_h32_%)GRF8uE{H;n8A`g&Wc2`--c_FD4~j3j7Ew9l0&&U_BH+$c28TPk_)zaDX&~pJ7QN0N(Ec`tEMAa2>{f7eSM3Ves3#n^xJ9ItWCOu;7ri)T^ zZEUA>c8uia`OaT7h3keL3aR{C0JQdn(BLm;?5GC0effVWur!p*iD}#ov70YpB^I#E z(;1$pTa)uN$sC_@$-MmpROxr(tD1({*W^^@+A_@d3_Bt@E~3iJXG*>RsX_U;0n71W zFEqdn&VLMfn z9+{?3VFzeR-Gf`wYAI&wSa{B2Uz}s9mfrZy#C_gl%Qj+&x&(6_*RXl1P}DN4u(ZIt zgKVgHW~4W6$CPnXR*d^lJk>tM24=Vo;~mt>#+?|Δ}K@ry+K1`OlNH=3lVrP5h zz8;5SRvb~y&k$1K6PP=q>``OqmHzVCi{?(f@wBnCoxP$i!rarBdwba#jML)I z*Uh~~y>XaTDnHD;tNv#O5_c_W_Ne@LvMYL)x$#@abkzfH<@3iZDK z3Wrn3{ry>$N19T@hCp=hg&&pS>=?+j3@O?8*pzEEy>WNEQbZZEDGKZhR&M?fks#C& zOhj9e-uPfV@IXvOJh5KH_&1nb?wdg3Sy{Uf|4K|9;A;yo$CO|A_Y5q?W~nQ%fW6m= zYvEO47SlP|u`Kd0*yQxEu;3*RJ9swbcd%si42s2^+B7`n)iu3wK_eY6RIDZ-b)Vw3 zfEpN-DqOYkoxw3rWw|Jh4@aM8Ps|=rmSJBKc2@i4IT&<*kW!SBl) zdg0a`(k?sGDG3f({pV52;uSIUX**)KZQYDQY5oQ3*-p%^N8y)On5@M{7fv8EvVwXC zu5%OPN`6djbXhcPY97?KVZ}YZF2_WV@+(*sZjB&$ds6rYG9!ktm4-YSTImtY`z*k+ z%=ZiSaPj4PQ266KWJWZuYH*Xg!OUeh3cQ<Ilo3;EH#&&p@_;zvZ z`dtH`jt*l@;R;{Ds$9BD3internalAddGeneratedFile( + ' +ó +*google/monitoring/v3/service_service.protogoogle.monitoring.v3google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto"google/monitoring/v3/service.protogoogle/protobuf/empty.proto google/protobuf/field_mask.proto"š +CreateServiceRequest9 +parent ( B)àAúA#!monitoring.googleapis.com/Service + +service_id ( 3 +service ( 2.google.monitoring.v3.ServiceBàA"L +GetServiceRequest7 +name ( B)àAúA# +!monitoring.googleapis.com/Service"‡ +ListServicesRequest9 +parent ( B)àAúA#!monitoring.googleapis.com/Service +filter (  + page_size ( + +page_token ( "` +ListServicesResponse/ +services ( 2.google.monitoring.v3.Service +next_page_token ( "| +UpdateServiceRequest3 +service ( 2.google.monitoring.v3.ServiceBàA/ + update_mask ( 2.google.protobuf.FieldMask"O +DeleteServiceRequest7 +name ( B)àAúA# +!monitoring.googleapis.com/Service"Ö +"CreateServiceLevelObjectiveRequest9 +parent ( B)àAúA# +!monitoring.googleapis.com/Service" +service_level_objective_id ( Q +service_level_objective ( 2+.google.monitoring.v3.ServiceLevelObjectiveBàA"¨ +GetServiceLevelObjectiveRequestE +name ( B7àAúA1 +/monitoring.googleapis.com/ServiceLevelObjective> +view (20.google.monitoring.v3.ServiceLevelObjective.View"Õ +!ListServiceLevelObjectivesRequest9 +parent ( B)àAúA# +!monitoring.googleapis.com/Service +filter (  + page_size ( + +page_token ( > +view (20.google.monitoring.v3.ServiceLevelObjective.View"Œ +"ListServiceLevelObjectivesResponseM +service_level_objectives ( 2+.google.monitoring.v3.ServiceLevelObjective +next_page_token ( "¨ +"UpdateServiceLevelObjectiveRequestQ +service_level_objective ( 2+.google.monitoring.v3.ServiceLevelObjectiveBàA/ + update_mask ( 2.google.protobuf.FieldMask"k +"DeleteServiceLevelObjectiveRequestE +name ( B7àAúA1 +/monitoring.googleapis.com/ServiceLevelObjective2ê +ServiceMonitoringService— + CreateService*.google.monitoring.v3.CreateServiceRequest.google.monitoring.v3.Service";ÚAparent,service‚Óä“$"/v3/{parent=*/*}/services:service~ + +GetService\'.google.monitoring.v3.GetServiceRequest.google.monitoring.v3.Service"(ÚAname‚Óä“/v3/{name=*/*/services/*}‘ + ListServices).google.monitoring.v3.ListServicesRequest*.google.monitoring.v3.ListServicesResponse"*ÚAparent‚Óä“/v3/{parent=*/*}/services˜ + UpdateService*.google.monitoring.v3.UpdateServiceRequest.google.monitoring.v3.Service"<ÚAservice‚Óä“,2!/v3/{service.name=*/*/services/*}:service} + DeleteService*.google.monitoring.v3.DeleteServiceRequest.google.protobuf.Empty"(ÚAname‚Óä“*/v3/{name=*/*/services/*}ú +CreateServiceLevelObjective8.google.monitoring.v3.CreateServiceLevelObjectiveRequest+.google.monitoring.v3.ServiceLevelObjective"tÚAparent,service_level_objective‚Óä“M"2/v3/{parent=*/*/services/*}/serviceLevelObjectives:service_level_objectiveÁ +GetServiceLevelObjective5.google.monitoring.v3.GetServiceLevelObjectiveRequest+.google.monitoring.v3.ServiceLevelObjective"AÚAname‚Óä“42/v3/{name=*/*/services/*/serviceLevelObjectives/*}Ô +ListServiceLevelObjectives7.google.monitoring.v3.ListServiceLevelObjectivesRequest8.google.monitoring.v3.ListServiceLevelObjectivesResponse"CÚAparent‚Óä“42/v3/{parent=*/*/services/*}/serviceLevelObjectivesŒ +UpdateServiceLevelObjective8.google.monitoring.v3.UpdateServiceLevelObjectiveRequest+.google.monitoring.v3.ServiceLevelObjective"…ÚAservice_level_objective‚Óä“e2J/v3/{service_level_objective.name=*/*/services/*/serviceLevelObjectives/*}:service_level_objective² +DeleteServiceLevelObjective8.google.monitoring.v3.DeleteServiceLevelObjectiveRequest.google.protobuf.Empty"AÚAname‚Óä“4*2/v3/{name=*/*/services/*/serviceLevelObjectives/*}©ÊAmonitoring.googleapis.comÒA‰https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/monitoring,https://www.googleapis.com/auth/monitoring.readBØ +com.google.monitoring.v3BServiceMonitoringServiceProtoPZAcloud.google.com/go/monitoring/apiv3/v2/monitoringpb;monitoringpbªGoogle.Cloud.Monitoring.V3ÊGoogle\\Cloud\\Monitoring\\V3êGoogle::Cloud::Monitoring::V3bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/Snooze.php b/owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/Snooze.php new file mode 100644 index 000000000000..e98aca9ec3cc --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/Snooze.php @@ -0,0 +1,39 @@ +internalAddGeneratedFile( + ' + +!google/monitoring/v3/snooze.protogoogle.monitoring.v3google/api/resource.proto!google/monitoring/v3/common.proto"Å +Snooze +name ( BàA< +criteria ( 2%.google.monitoring.v3.Snooze.CriteriaBàA9 +interval ( 2".google.monitoring.v3.TimeIntervalBàA + display_name ( BàAH +Criteria< +policies ( B*úA\' +%monitoring.googleapis.com/AlertPolicy:JêAG + monitoring.googleapis.com/Snooze#projects/{project}/snoozes/{snooze}BÆ +com.google.monitoring.v3B SnoozeProtoPZAcloud.google.com/go/monitoring/apiv3/v2/monitoringpb;monitoringpbªGoogle.Cloud.Monitoring.V3ÊGoogle\\Cloud\\Monitoring\\V3êGoogle::Cloud::Monitoring::V3bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/SnoozeService.php b/owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/SnoozeService.php new file mode 100644 index 000000000000..c0b830a53194 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/SnoozeService.php @@ -0,0 +1,56 @@ +internalAddGeneratedFile( + ' +• +)google/monitoring/v3/snooze_service.protogoogle.monitoring.v3google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto!google/monitoring/v3/snooze.proto google/protobuf/field_mask.proto"‚ +CreateSnoozeRequest8 +parent ( B(àAúA" monitoring.googleapis.com/Snooze1 +snooze ( 2.google.monitoring.v3.SnoozeBàA"” +ListSnoozesRequest8 +parent ( B(àAúA" monitoring.googleapis.com/Snooze +filter ( BàA + page_size (BàA + +page_token ( BàA"] +ListSnoozesResponse- +snoozes ( 2.google.monitoring.v3.Snooze +next_page_token ( "J +GetSnoozeRequest6 +name ( B(àAúA" + monitoring.googleapis.com/Snooze"~ +UpdateSnoozeRequest1 +snooze ( 2.google.monitoring.v3.SnoozeBàA4 + update_mask ( 2.google.protobuf.FieldMaskBàA2˜ + SnoozeService˜ + CreateSnooze).google.monitoring.v3.CreateSnoozeRequest.google.monitoring.v3.Snooze"?ÚA parent,snooze‚Óä“)"/v3/{parent=projects/*}/snoozes:snooze” + ListSnoozes(.google.monitoring.v3.ListSnoozesRequest).google.monitoring.v3.ListSnoozesResponse"0ÚAparent‚Óä“!/v3/{parent=projects/*}/snoozes + GetSnooze&.google.monitoring.v3.GetSnoozeRequest.google.monitoring.v3.Snooze".ÚAname‚Óä“!/v3/{name=projects/*/snoozes/*}¤ + UpdateSnooze).google.monitoring.v3.UpdateSnoozeRequest.google.monitoring.v3.Snooze"KÚAsnooze,update_mask‚Óä“02&/v3/{snooze.name=projects/*/snoozes/*}:snooze©ÊAmonitoring.googleapis.comÒA‰https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/monitoring,https://www.googleapis.com/auth/monitoring.readBÍ +com.google.monitoring.v3BSnoozeServiceProtoPZAcloud.google.com/go/monitoring/apiv3/v2/monitoringpb;monitoringpbªGoogle.Cloud.Monitoring.V3ÊGoogle\\Cloud\\Monitoring\\V3êGoogle::Cloud::Monitoring::V3bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/SpanContext.php b/owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/SpanContext.php new file mode 100644 index 000000000000..ed30a8928d94 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/SpanContext.php @@ -0,0 +1,29 @@ +internalAddGeneratedFile( + ' +· +\'google/monitoring/v3/span_context.protogoogle.monitoring.v3" + SpanContext + span_name ( BË +com.google.monitoring.v3BSpanContextProtoPZAcloud.google.com/go/monitoring/apiv3/v2/monitoringpb;monitoringpbªGoogle.Cloud.Monitoring.V3ÊGoogle\\Cloud\\Monitoring\\V3êGoogle::Cloud::Monitoring::V3bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/Uptime.php b/owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/Uptime.php new file mode 100644 index 0000000000000000000000000000000000000000..528518b81c8051f6bd7984d3cb2001d0d814ed5a GIT binary patch literal 6049 zcmb_gTW{mm5njnRdE|>s+q<%wU2v6c*1JihuG}<@_7YGMEh}q_f<$|rRsca$#}Z?i zWO;GnUHCurr9grHgQ7rR`Xhq;fIRgfPeqZJ0&Sm)7U-NqQr3muwS)S_;+!*c=FEI^ zIrHput7pOce3cl)R$bEJkIs3wM|jINT~jmr{E>HjOl)2=Pc6Mq>>STmB)%@myjZEp z_mR~xJzFD1zH6G@KFOb&hVGiSZglf!TY1lN^;42#(f|zglsJ~E5x&|e?Gab)sIJJ@xqrR^3j;p%(?}6?pIv%F0ef>3R{+vHn`wl_Y z$-T#(p}D$g@RUI^G_v`K_hr((4=fXJ`kW6{Y0%5##oIN*CAOjV+ZEzywr=6Y8o0Gs z>=JiiGD_Ke6dX&%>Bs!0uVb+|q2zPkwLLO?I?vn0^=#uQ)0+yo82oBS7)r48_O?#? zof7G(XS!(@ihv0wa`QO-6OdFPRMa<{+8S&DsyLBnfC)m)zU+}l8#~r_VCe~*%;b1wsbF8Vz5S> zbb(GaYkK+IfJ;rHtm!2 z6eFY{(bX*FwP}#_G^5;sWs4A7!K1$-nycuY^ekH_!VJY6NzdWuQsKi~)Xj5aTIE`l zCA$SP><70D$^Ck(A(m^~HL;Sqg<2=dO;M0*^=c}{C1I|)U$4`Tcrl)iWq%)s+pTj0 z69xuk04!OxF*-N}Ryc~R zvtd)0a^DH@e+!%N0aGW`#tC#l2sk-RZu#&8?genZ;3o zB9KZ`-w9Kt1kAe31le!z!HS>17zoOyajbW_l@aZbC2<8Bo&p!Zb_kpd81GVK=N2cy zQV3e5Ynz_M@RKZj65e1WB61UI=E69yQf3rbgB2(Av=T6<*O^s5ik2DePZU)J=((^2p3jax zSYUU>_;=4Ol3qa-mI_RE5$ZVp?*?+0gHo}VfLj#f3-naWP~!QQ8V`e8rb**fxZe! z3%?viGd;s)XUt^&u>kV}2y?G!l>W*i4nl;uJwzZy)l%W}>)vu83geZ@!LAC$U?QJG z+bNFIXXhqp`LR^D$MV=b`!a2pC6gKM5aw0S?O`)@YzApUytx7;)zLKpW#;`5tJ4dRVO$d6!E z^BmVaMgRFx%w#X3Y*xR|u8y zFBOW7OP^vKQ^~v6m3)cNmM>MHLPv3e)%-J9jRFt`Da`>xofA?ld>CMp)bYWb`AZzQ z2!q^)g}~V8DbH`bX0ZD726XnqU_zD(jho+R@=VrFp+D%$W#?A*&oM{_9-?HAs!DJ~=#0b-490Y5}QV$0o>INd9Adg8Wk?|7L1}{0Wl(HAxog zU#9*xS6YPR5K1%ui9zOS*Ky}C&EkTl(51r3&CPhV?A+B$G(xi)+1)We3buX_Amr>EV(N76y1lW#fu=15-8Vap*VaFA;%iBNj zoG(yb1H}bb!aVg~eA==I0U@6KItFWz=Klb)WvMRHD0}M> ztFTP>3AK7lX~|9hWqAiy>yoUDFT^RheQ7O)>5-yoYlZF|B~MdwNE%!=HN$Pd`ta_{ zrPM*G1lAgEXcg zx({0fT=Z#viykx%7o2F?UDeQEvkne74S(K1%xA}DpZ0wDH~x+rC8L3a*?qqyphp2_#r>w#5K|1yEeR`-BJ7DxtU(B7bhyx} z2^gAm=2A{gb69|oQ;|@tR7U{g2!?*wq*p>}mhPut2eoFkR<8-ExyQeRm5G-KcNaFA zBA(U6$`=7Yl!@Ud3-z*yDq@HTuUd+@TT*rinternalAddGeneratedFile( + ' +˜ +)google/monitoring/v3/uptime_service.protogoogle.monitoring.v3google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto!google/monitoring/v3/uptime.protogoogle/protobuf/empty.proto google/protobuf/field_mask.proto"› +ListUptimeCheckConfigsRequestC +parent ( B3àAúA-+monitoring.googleapis.com/UptimeCheckConfig +filter (  + page_size ( + +page_token ( "” +ListUptimeCheckConfigsResponseE +uptime_check_configs ( 2\'.google.monitoring.v3.UptimeCheckConfig +next_page_token (  + +total_size ("` +GetUptimeCheckConfigRequestA +name ( B3àAúA- ++monitoring.googleapis.com/UptimeCheckConfig"° +CreateUptimeCheckConfigRequestC +parent ( B3àAúA-+monitoring.googleapis.com/UptimeCheckConfigI +uptime_check_config ( 2\'.google.monitoring.v3.UptimeCheckConfigBàA"œ +UpdateUptimeCheckConfigRequest/ + update_mask ( 2.google.protobuf.FieldMaskI +uptime_check_config ( 2\'.google.monitoring.v3.UptimeCheckConfigBàA"c +DeleteUptimeCheckConfigRequestA +name ( B3àAúA- ++monitoring.googleapis.com/UptimeCheckConfig"B +ListUptimeCheckIpsRequest + page_size ( + +page_token ( "t +ListUptimeCheckIpsResponse= +uptime_check_ips ( 2#.google.monitoring.v3.UptimeCheckIp +next_page_token ( 2½ + +UptimeCheckServiceÀ +ListUptimeCheckConfigs3.google.monitoring.v3.ListUptimeCheckConfigsRequest4.google.monitoring.v3.ListUptimeCheckConfigsResponse";ÚAparent‚Óä“,*/v3/{parent=projects/*}/uptimeCheckConfigs­ +GetUptimeCheckConfig1.google.monitoring.v3.GetUptimeCheckConfigRequest\'.google.monitoring.v3.UptimeCheckConfig"9ÚAname‚Óä“,*/v3/{name=projects/*/uptimeCheckConfigs/*}Þ +CreateUptimeCheckConfig4.google.monitoring.v3.CreateUptimeCheckConfigRequest\'.google.monitoring.v3.UptimeCheckConfig"dÚAparent,uptime_check_config‚Óä“A"*/v3/{parent=projects/*}/uptimeCheckConfigs:uptime_check_configë +UpdateUptimeCheckConfig4.google.monitoring.v3.UpdateUptimeCheckConfigRequest\'.google.monitoring.v3.UptimeCheckConfig"qÚAuptime_check_config‚Óä“U2>/v3/{uptime_check_config.name=projects/*/uptimeCheckConfigs/*}:uptime_check_config¢ +DeleteUptimeCheckConfig4.google.monitoring.v3.DeleteUptimeCheckConfigRequest.google.protobuf.Empty"9ÚAname‚Óä“,**/v3/{name=projects/*/uptimeCheckConfigs/*}“ +ListUptimeCheckIps/.google.monitoring.v3.ListUptimeCheckIpsRequest0.google.monitoring.v3.ListUptimeCheckIpsResponse"‚Óä“/v3/uptimeCheckIps©ÊAmonitoring.googleapis.comÒA‰https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/monitoring,https://www.googleapis.com/auth/monitoring.readBÍ +com.google.monitoring.v3BUptimeServiceProtoPZAcloud.google.com/go/monitoring/apiv3/v2/monitoringpb;monitoringpbªGoogle.Cloud.Monitoring.V3ÊGoogle\\Cloud\\Monitoring\\V3êGoogle::Cloud::Monitoring::V3bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Aggregation.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Aggregation.php new file mode 100644 index 000000000000..7d97df10e8e0 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Aggregation.php @@ -0,0 +1,389 @@ +google.monitoring.v3.Aggregation + */ +class Aggregation extends \Google\Protobuf\Internal\Message +{ + /** + * The `alignment_period` specifies a time interval, in seconds, that is used + * to divide the data in all the + * [time series][google.monitoring.v3.TimeSeries] into consistent blocks of + * time. This will be done before the per-series aligner can be applied to + * the data. + * The value must be at least 60 seconds. If a per-series + * aligner other than `ALIGN_NONE` is specified, this field is required or an + * error is returned. If no per-series aligner is specified, or the aligner + * `ALIGN_NONE` is specified, then this field is ignored. + * The maximum value of the `alignment_period` is 104 weeks (2 years) for + * charts, and 90,000 seconds (25 hours) for alerting policies. + * + * Generated from protobuf field .google.protobuf.Duration alignment_period = 1; + */ + protected $alignment_period = null; + /** + * An `Aligner` describes how to bring the data points in a single + * time series into temporal alignment. Except for `ALIGN_NONE`, all + * alignments cause all the data points in an `alignment_period` to be + * mathematically grouped together, resulting in a single data point for + * each `alignment_period` with end timestamp at the end of the period. + * Not all alignment operations may be applied to all time series. The valid + * choices depend on the `metric_kind` and `value_type` of the original time + * series. Alignment can change the `metric_kind` or the `value_type` of + * the time series. + * Time series data must be aligned in order to perform cross-time + * series reduction. If `cross_series_reducer` is specified, then + * `per_series_aligner` must be specified and not equal to `ALIGN_NONE` + * and `alignment_period` must be specified; otherwise, an error is + * returned. + * + * Generated from protobuf field .google.monitoring.v3.Aggregation.Aligner per_series_aligner = 2; + */ + protected $per_series_aligner = 0; + /** + * The reduction operation to be used to combine time series into a single + * time series, where the value of each data point in the resulting series is + * a function of all the already aligned values in the input time series. + * Not all reducer operations can be applied to all time series. The valid + * choices depend on the `metric_kind` and the `value_type` of the original + * time series. Reduction can yield a time series with a different + * `metric_kind` or `value_type` than the input time series. + * Time series data must first be aligned (see `per_series_aligner`) in order + * to perform cross-time series reduction. If `cross_series_reducer` is + * specified, then `per_series_aligner` must be specified, and must not be + * `ALIGN_NONE`. An `alignment_period` must also be specified; otherwise, an + * error is returned. + * + * Generated from protobuf field .google.monitoring.v3.Aggregation.Reducer cross_series_reducer = 4; + */ + protected $cross_series_reducer = 0; + /** + * The set of fields to preserve when `cross_series_reducer` is + * specified. The `group_by_fields` determine how the time series are + * partitioned into subsets prior to applying the aggregation + * operation. Each subset contains time series that have the same + * value for each of the grouping fields. Each individual time + * series is a member of exactly one subset. The + * `cross_series_reducer` is applied to each subset of time series. + * It is not possible to reduce across different resource types, so + * this field implicitly contains `resource.type`. Fields not + * specified in `group_by_fields` are aggregated away. If + * `group_by_fields` is not specified and all the time series have + * the same resource type, then the time series are aggregated into + * a single output time series. If `cross_series_reducer` is not + * defined, this field is ignored. + * + * Generated from protobuf field repeated string group_by_fields = 5; + */ + private $group_by_fields; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Duration $alignment_period + * The `alignment_period` specifies a time interval, in seconds, that is used + * to divide the data in all the + * [time series][google.monitoring.v3.TimeSeries] into consistent blocks of + * time. This will be done before the per-series aligner can be applied to + * the data. + * The value must be at least 60 seconds. If a per-series + * aligner other than `ALIGN_NONE` is specified, this field is required or an + * error is returned. If no per-series aligner is specified, or the aligner + * `ALIGN_NONE` is specified, then this field is ignored. + * The maximum value of the `alignment_period` is 104 weeks (2 years) for + * charts, and 90,000 seconds (25 hours) for alerting policies. + * @type int $per_series_aligner + * An `Aligner` describes how to bring the data points in a single + * time series into temporal alignment. Except for `ALIGN_NONE`, all + * alignments cause all the data points in an `alignment_period` to be + * mathematically grouped together, resulting in a single data point for + * each `alignment_period` with end timestamp at the end of the period. + * Not all alignment operations may be applied to all time series. The valid + * choices depend on the `metric_kind` and `value_type` of the original time + * series. Alignment can change the `metric_kind` or the `value_type` of + * the time series. + * Time series data must be aligned in order to perform cross-time + * series reduction. If `cross_series_reducer` is specified, then + * `per_series_aligner` must be specified and not equal to `ALIGN_NONE` + * and `alignment_period` must be specified; otherwise, an error is + * returned. + * @type int $cross_series_reducer + * The reduction operation to be used to combine time series into a single + * time series, where the value of each data point in the resulting series is + * a function of all the already aligned values in the input time series. + * Not all reducer operations can be applied to all time series. The valid + * choices depend on the `metric_kind` and the `value_type` of the original + * time series. Reduction can yield a time series with a different + * `metric_kind` or `value_type` than the input time series. + * Time series data must first be aligned (see `per_series_aligner`) in order + * to perform cross-time series reduction. If `cross_series_reducer` is + * specified, then `per_series_aligner` must be specified, and must not be + * `ALIGN_NONE`. An `alignment_period` must also be specified; otherwise, an + * error is returned. + * @type array|\Google\Protobuf\Internal\RepeatedField $group_by_fields + * The set of fields to preserve when `cross_series_reducer` is + * specified. The `group_by_fields` determine how the time series are + * partitioned into subsets prior to applying the aggregation + * operation. Each subset contains time series that have the same + * value for each of the grouping fields. Each individual time + * series is a member of exactly one subset. The + * `cross_series_reducer` is applied to each subset of time series. + * It is not possible to reduce across different resource types, so + * this field implicitly contains `resource.type`. Fields not + * specified in `group_by_fields` are aggregated away. If + * `group_by_fields` is not specified and all the time series have + * the same resource type, then the time series are aggregated into + * a single output time series. If `cross_series_reducer` is not + * defined, this field is ignored. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\Common::initOnce(); + parent::__construct($data); + } + + /** + * The `alignment_period` specifies a time interval, in seconds, that is used + * to divide the data in all the + * [time series][google.monitoring.v3.TimeSeries] into consistent blocks of + * time. This will be done before the per-series aligner can be applied to + * the data. + * The value must be at least 60 seconds. If a per-series + * aligner other than `ALIGN_NONE` is specified, this field is required or an + * error is returned. If no per-series aligner is specified, or the aligner + * `ALIGN_NONE` is specified, then this field is ignored. + * The maximum value of the `alignment_period` is 104 weeks (2 years) for + * charts, and 90,000 seconds (25 hours) for alerting policies. + * + * Generated from protobuf field .google.protobuf.Duration alignment_period = 1; + * @return \Google\Protobuf\Duration|null + */ + public function getAlignmentPeriod() + { + return $this->alignment_period; + } + + public function hasAlignmentPeriod() + { + return isset($this->alignment_period); + } + + public function clearAlignmentPeriod() + { + unset($this->alignment_period); + } + + /** + * The `alignment_period` specifies a time interval, in seconds, that is used + * to divide the data in all the + * [time series][google.monitoring.v3.TimeSeries] into consistent blocks of + * time. This will be done before the per-series aligner can be applied to + * the data. + * The value must be at least 60 seconds. If a per-series + * aligner other than `ALIGN_NONE` is specified, this field is required or an + * error is returned. If no per-series aligner is specified, or the aligner + * `ALIGN_NONE` is specified, then this field is ignored. + * The maximum value of the `alignment_period` is 104 weeks (2 years) for + * charts, and 90,000 seconds (25 hours) for alerting policies. + * + * Generated from protobuf field .google.protobuf.Duration alignment_period = 1; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setAlignmentPeriod($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->alignment_period = $var; + + return $this; + } + + /** + * An `Aligner` describes how to bring the data points in a single + * time series into temporal alignment. Except for `ALIGN_NONE`, all + * alignments cause all the data points in an `alignment_period` to be + * mathematically grouped together, resulting in a single data point for + * each `alignment_period` with end timestamp at the end of the period. + * Not all alignment operations may be applied to all time series. The valid + * choices depend on the `metric_kind` and `value_type` of the original time + * series. Alignment can change the `metric_kind` or the `value_type` of + * the time series. + * Time series data must be aligned in order to perform cross-time + * series reduction. If `cross_series_reducer` is specified, then + * `per_series_aligner` must be specified and not equal to `ALIGN_NONE` + * and `alignment_period` must be specified; otherwise, an error is + * returned. + * + * Generated from protobuf field .google.monitoring.v3.Aggregation.Aligner per_series_aligner = 2; + * @return int + */ + public function getPerSeriesAligner() + { + return $this->per_series_aligner; + } + + /** + * An `Aligner` describes how to bring the data points in a single + * time series into temporal alignment. Except for `ALIGN_NONE`, all + * alignments cause all the data points in an `alignment_period` to be + * mathematically grouped together, resulting in a single data point for + * each `alignment_period` with end timestamp at the end of the period. + * Not all alignment operations may be applied to all time series. The valid + * choices depend on the `metric_kind` and `value_type` of the original time + * series. Alignment can change the `metric_kind` or the `value_type` of + * the time series. + * Time series data must be aligned in order to perform cross-time + * series reduction. If `cross_series_reducer` is specified, then + * `per_series_aligner` must be specified and not equal to `ALIGN_NONE` + * and `alignment_period` must be specified; otherwise, an error is + * returned. + * + * Generated from protobuf field .google.monitoring.v3.Aggregation.Aligner per_series_aligner = 2; + * @param int $var + * @return $this + */ + public function setPerSeriesAligner($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Monitoring\V3\Aggregation\Aligner::class); + $this->per_series_aligner = $var; + + return $this; + } + + /** + * The reduction operation to be used to combine time series into a single + * time series, where the value of each data point in the resulting series is + * a function of all the already aligned values in the input time series. + * Not all reducer operations can be applied to all time series. The valid + * choices depend on the `metric_kind` and the `value_type` of the original + * time series. Reduction can yield a time series with a different + * `metric_kind` or `value_type` than the input time series. + * Time series data must first be aligned (see `per_series_aligner`) in order + * to perform cross-time series reduction. If `cross_series_reducer` is + * specified, then `per_series_aligner` must be specified, and must not be + * `ALIGN_NONE`. An `alignment_period` must also be specified; otherwise, an + * error is returned. + * + * Generated from protobuf field .google.monitoring.v3.Aggregation.Reducer cross_series_reducer = 4; + * @return int + */ + public function getCrossSeriesReducer() + { + return $this->cross_series_reducer; + } + + /** + * The reduction operation to be used to combine time series into a single + * time series, where the value of each data point in the resulting series is + * a function of all the already aligned values in the input time series. + * Not all reducer operations can be applied to all time series. The valid + * choices depend on the `metric_kind` and the `value_type` of the original + * time series. Reduction can yield a time series with a different + * `metric_kind` or `value_type` than the input time series. + * Time series data must first be aligned (see `per_series_aligner`) in order + * to perform cross-time series reduction. If `cross_series_reducer` is + * specified, then `per_series_aligner` must be specified, and must not be + * `ALIGN_NONE`. An `alignment_period` must also be specified; otherwise, an + * error is returned. + * + * Generated from protobuf field .google.monitoring.v3.Aggregation.Reducer cross_series_reducer = 4; + * @param int $var + * @return $this + */ + public function setCrossSeriesReducer($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Monitoring\V3\Aggregation\Reducer::class); + $this->cross_series_reducer = $var; + + return $this; + } + + /** + * The set of fields to preserve when `cross_series_reducer` is + * specified. The `group_by_fields` determine how the time series are + * partitioned into subsets prior to applying the aggregation + * operation. Each subset contains time series that have the same + * value for each of the grouping fields. Each individual time + * series is a member of exactly one subset. The + * `cross_series_reducer` is applied to each subset of time series. + * It is not possible to reduce across different resource types, so + * this field implicitly contains `resource.type`. Fields not + * specified in `group_by_fields` are aggregated away. If + * `group_by_fields` is not specified and all the time series have + * the same resource type, then the time series are aggregated into + * a single output time series. If `cross_series_reducer` is not + * defined, this field is ignored. + * + * Generated from protobuf field repeated string group_by_fields = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getGroupByFields() + { + return $this->group_by_fields; + } + + /** + * The set of fields to preserve when `cross_series_reducer` is + * specified. The `group_by_fields` determine how the time series are + * partitioned into subsets prior to applying the aggregation + * operation. Each subset contains time series that have the same + * value for each of the grouping fields. Each individual time + * series is a member of exactly one subset. The + * `cross_series_reducer` is applied to each subset of time series. + * It is not possible to reduce across different resource types, so + * this field implicitly contains `resource.type`. Fields not + * specified in `group_by_fields` are aggregated away. If + * `group_by_fields` is not specified and all the time series have + * the same resource type, then the time series are aggregated into + * a single output time series. If `cross_series_reducer` is not + * defined, this field is ignored. + * + * Generated from protobuf field repeated string group_by_fields = 5; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setGroupByFields($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->group_by_fields = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Aggregation/Aligner.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Aggregation/Aligner.php new file mode 100644 index 000000000000..9f2767800daf --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Aggregation/Aligner.php @@ -0,0 +1,269 @@ +google.monitoring.v3.Aggregation.Aligner + */ +class Aligner +{ + /** + * No alignment. Raw data is returned. Not valid if cross-series reduction + * is requested. The `value_type` of the result is the same as the + * `value_type` of the input. + * + * Generated from protobuf enum ALIGN_NONE = 0; + */ + const ALIGN_NONE = 0; + /** + * Align and convert to + * [DELTA][google.api.MetricDescriptor.MetricKind.DELTA]. + * The output is `delta = y1 - y0`. + * This alignment is valid for + * [CUMULATIVE][google.api.MetricDescriptor.MetricKind.CUMULATIVE] and + * `DELTA` metrics. If the selected alignment period results in periods + * with no data, then the aligned value for such a period is created by + * interpolation. The `value_type` of the aligned result is the same as + * the `value_type` of the input. + * + * Generated from protobuf enum ALIGN_DELTA = 1; + */ + const ALIGN_DELTA = 1; + /** + * Align and convert to a rate. The result is computed as + * `rate = (y1 - y0)/(t1 - t0)`, or "delta over time". + * Think of this aligner as providing the slope of the line that passes + * through the value at the start and at the end of the `alignment_period`. + * This aligner is valid for `CUMULATIVE` + * and `DELTA` metrics with numeric values. If the selected alignment + * period results in periods with no data, then the aligned value for + * such a period is created by interpolation. The output is a `GAUGE` + * metric with `value_type` `DOUBLE`. + * If, by "rate", you mean "percentage change", see the + * `ALIGN_PERCENT_CHANGE` aligner instead. + * + * Generated from protobuf enum ALIGN_RATE = 2; + */ + const ALIGN_RATE = 2; + /** + * Align by interpolating between adjacent points around the alignment + * period boundary. This aligner is valid for `GAUGE` metrics with + * numeric values. The `value_type` of the aligned result is the same as the + * `value_type` of the input. + * + * Generated from protobuf enum ALIGN_INTERPOLATE = 3; + */ + const ALIGN_INTERPOLATE = 3; + /** + * Align by moving the most recent data point before the end of the + * alignment period to the boundary at the end of the alignment + * period. This aligner is valid for `GAUGE` metrics. The `value_type` of + * the aligned result is the same as the `value_type` of the input. + * + * Generated from protobuf enum ALIGN_NEXT_OLDER = 4; + */ + const ALIGN_NEXT_OLDER = 4; + /** + * Align the time series by returning the minimum value in each alignment + * period. This aligner is valid for `GAUGE` and `DELTA` metrics with + * numeric values. The `value_type` of the aligned result is the same as + * the `value_type` of the input. + * + * Generated from protobuf enum ALIGN_MIN = 10; + */ + const ALIGN_MIN = 10; + /** + * Align the time series by returning the maximum value in each alignment + * period. This aligner is valid for `GAUGE` and `DELTA` metrics with + * numeric values. The `value_type` of the aligned result is the same as + * the `value_type` of the input. + * + * Generated from protobuf enum ALIGN_MAX = 11; + */ + const ALIGN_MAX = 11; + /** + * Align the time series by returning the mean value in each alignment + * period. This aligner is valid for `GAUGE` and `DELTA` metrics with + * numeric values. The `value_type` of the aligned result is `DOUBLE`. + * + * Generated from protobuf enum ALIGN_MEAN = 12; + */ + const ALIGN_MEAN = 12; + /** + * Align the time series by returning the number of values in each alignment + * period. This aligner is valid for `GAUGE` and `DELTA` metrics with + * numeric or Boolean values. The `value_type` of the aligned result is + * `INT64`. + * + * Generated from protobuf enum ALIGN_COUNT = 13; + */ + const ALIGN_COUNT = 13; + /** + * Align the time series by returning the sum of the values in each + * alignment period. This aligner is valid for `GAUGE` and `DELTA` + * metrics with numeric and distribution values. The `value_type` of the + * aligned result is the same as the `value_type` of the input. + * + * Generated from protobuf enum ALIGN_SUM = 14; + */ + const ALIGN_SUM = 14; + /** + * Align the time series by returning the standard deviation of the values + * in each alignment period. This aligner is valid for `GAUGE` and + * `DELTA` metrics with numeric values. The `value_type` of the output is + * `DOUBLE`. + * + * Generated from protobuf enum ALIGN_STDDEV = 15; + */ + const ALIGN_STDDEV = 15; + /** + * Align the time series by returning the number of `True` values in + * each alignment period. This aligner is valid for `GAUGE` metrics with + * Boolean values. The `value_type` of the output is `INT64`. + * + * Generated from protobuf enum ALIGN_COUNT_TRUE = 16; + */ + const ALIGN_COUNT_TRUE = 16; + /** + * Align the time series by returning the number of `False` values in + * each alignment period. This aligner is valid for `GAUGE` metrics with + * Boolean values. The `value_type` of the output is `INT64`. + * + * Generated from protobuf enum ALIGN_COUNT_FALSE = 24; + */ + const ALIGN_COUNT_FALSE = 24; + /** + * Align the time series by returning the ratio of the number of `True` + * values to the total number of values in each alignment period. This + * aligner is valid for `GAUGE` metrics with Boolean values. The output + * value is in the range [0.0, 1.0] and has `value_type` `DOUBLE`. + * + * Generated from protobuf enum ALIGN_FRACTION_TRUE = 17; + */ + const ALIGN_FRACTION_TRUE = 17; + /** + * Align the time series by using [percentile + * aggregation](https://en.wikipedia.org/wiki/Percentile). The resulting + * data point in each alignment period is the 99th percentile of all data + * points in the period. This aligner is valid for `GAUGE` and `DELTA` + * metrics with distribution values. The output is a `GAUGE` metric with + * `value_type` `DOUBLE`. + * + * Generated from protobuf enum ALIGN_PERCENTILE_99 = 18; + */ + const ALIGN_PERCENTILE_99 = 18; + /** + * Align the time series by using [percentile + * aggregation](https://en.wikipedia.org/wiki/Percentile). The resulting + * data point in each alignment period is the 95th percentile of all data + * points in the period. This aligner is valid for `GAUGE` and `DELTA` + * metrics with distribution values. The output is a `GAUGE` metric with + * `value_type` `DOUBLE`. + * + * Generated from protobuf enum ALIGN_PERCENTILE_95 = 19; + */ + const ALIGN_PERCENTILE_95 = 19; + /** + * Align the time series by using [percentile + * aggregation](https://en.wikipedia.org/wiki/Percentile). The resulting + * data point in each alignment period is the 50th percentile of all data + * points in the period. This aligner is valid for `GAUGE` and `DELTA` + * metrics with distribution values. The output is a `GAUGE` metric with + * `value_type` `DOUBLE`. + * + * Generated from protobuf enum ALIGN_PERCENTILE_50 = 20; + */ + const ALIGN_PERCENTILE_50 = 20; + /** + * Align the time series by using [percentile + * aggregation](https://en.wikipedia.org/wiki/Percentile). The resulting + * data point in each alignment period is the 5th percentile of all data + * points in the period. This aligner is valid for `GAUGE` and `DELTA` + * metrics with distribution values. The output is a `GAUGE` metric with + * `value_type` `DOUBLE`. + * + * Generated from protobuf enum ALIGN_PERCENTILE_05 = 21; + */ + const ALIGN_PERCENTILE_05 = 21; + /** + * Align and convert to a percentage change. This aligner is valid for + * `GAUGE` and `DELTA` metrics with numeric values. This alignment returns + * `((current - previous)/previous) * 100`, where the value of `previous` is + * determined based on the `alignment_period`. + * If the values of `current` and `previous` are both 0, then the returned + * value is 0. If only `previous` is 0, the returned value is infinity. + * A 10-minute moving mean is computed at each point of the alignment period + * prior to the above calculation to smooth the metric and prevent false + * positives from very short-lived spikes. The moving mean is only + * applicable for data whose values are `>= 0`. Any values `< 0` are + * treated as a missing datapoint, and are ignored. While `DELTA` + * metrics are accepted by this alignment, special care should be taken that + * the values for the metric will always be positive. The output is a + * `GAUGE` metric with `value_type` `DOUBLE`. + * + * Generated from protobuf enum ALIGN_PERCENT_CHANGE = 23; + */ + const ALIGN_PERCENT_CHANGE = 23; + + private static $valueToName = [ + self::ALIGN_NONE => 'ALIGN_NONE', + self::ALIGN_DELTA => 'ALIGN_DELTA', + self::ALIGN_RATE => 'ALIGN_RATE', + self::ALIGN_INTERPOLATE => 'ALIGN_INTERPOLATE', + self::ALIGN_NEXT_OLDER => 'ALIGN_NEXT_OLDER', + self::ALIGN_MIN => 'ALIGN_MIN', + self::ALIGN_MAX => 'ALIGN_MAX', + self::ALIGN_MEAN => 'ALIGN_MEAN', + self::ALIGN_COUNT => 'ALIGN_COUNT', + self::ALIGN_SUM => 'ALIGN_SUM', + self::ALIGN_STDDEV => 'ALIGN_STDDEV', + self::ALIGN_COUNT_TRUE => 'ALIGN_COUNT_TRUE', + self::ALIGN_COUNT_FALSE => 'ALIGN_COUNT_FALSE', + self::ALIGN_FRACTION_TRUE => 'ALIGN_FRACTION_TRUE', + self::ALIGN_PERCENTILE_99 => 'ALIGN_PERCENTILE_99', + self::ALIGN_PERCENTILE_95 => 'ALIGN_PERCENTILE_95', + self::ALIGN_PERCENTILE_50 => 'ALIGN_PERCENTILE_50', + self::ALIGN_PERCENTILE_05 => 'ALIGN_PERCENTILE_05', + self::ALIGN_PERCENT_CHANGE => 'ALIGN_PERCENT_CHANGE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Aligner::class, \Google\Cloud\Monitoring\V3\Aggregation_Aligner::class); + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Aggregation/Reducer.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Aggregation/Reducer.php new file mode 100644 index 000000000000..c5d065c3b4e6 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Aggregation/Reducer.php @@ -0,0 +1,191 @@ +google.monitoring.v3.Aggregation.Reducer + */ +class Reducer +{ + /** + * No cross-time series reduction. The output of the `Aligner` is + * returned. + * + * Generated from protobuf enum REDUCE_NONE = 0; + */ + const REDUCE_NONE = 0; + /** + * Reduce by computing the mean value across time series for each + * alignment period. This reducer is valid for + * [DELTA][google.api.MetricDescriptor.MetricKind.DELTA] and + * [GAUGE][google.api.MetricDescriptor.MetricKind.GAUGE] metrics with + * numeric or distribution values. The `value_type` of the output is + * [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]. + * + * Generated from protobuf enum REDUCE_MEAN = 1; + */ + const REDUCE_MEAN = 1; + /** + * Reduce by computing the minimum value across time series for each + * alignment period. This reducer is valid for `DELTA` and `GAUGE` metrics + * with numeric values. The `value_type` of the output is the same as the + * `value_type` of the input. + * + * Generated from protobuf enum REDUCE_MIN = 2; + */ + const REDUCE_MIN = 2; + /** + * Reduce by computing the maximum value across time series for each + * alignment period. This reducer is valid for `DELTA` and `GAUGE` metrics + * with numeric values. The `value_type` of the output is the same as the + * `value_type` of the input. + * + * Generated from protobuf enum REDUCE_MAX = 3; + */ + const REDUCE_MAX = 3; + /** + * Reduce by computing the sum across time series for each + * alignment period. This reducer is valid for `DELTA` and `GAUGE` metrics + * with numeric and distribution values. The `value_type` of the output is + * the same as the `value_type` of the input. + * + * Generated from protobuf enum REDUCE_SUM = 4; + */ + const REDUCE_SUM = 4; + /** + * Reduce by computing the standard deviation across time series + * for each alignment period. This reducer is valid for `DELTA` and + * `GAUGE` metrics with numeric or distribution values. The `value_type` + * of the output is `DOUBLE`. + * + * Generated from protobuf enum REDUCE_STDDEV = 5; + */ + const REDUCE_STDDEV = 5; + /** + * Reduce by computing the number of data points across time series + * for each alignment period. This reducer is valid for `DELTA` and + * `GAUGE` metrics of numeric, Boolean, distribution, and string + * `value_type`. The `value_type` of the output is `INT64`. + * + * Generated from protobuf enum REDUCE_COUNT = 6; + */ + const REDUCE_COUNT = 6; + /** + * Reduce by computing the number of `True`-valued data points across time + * series for each alignment period. This reducer is valid for `DELTA` and + * `GAUGE` metrics of Boolean `value_type`. The `value_type` of the output + * is `INT64`. + * + * Generated from protobuf enum REDUCE_COUNT_TRUE = 7; + */ + const REDUCE_COUNT_TRUE = 7; + /** + * Reduce by computing the number of `False`-valued data points across time + * series for each alignment period. This reducer is valid for `DELTA` and + * `GAUGE` metrics of Boolean `value_type`. The `value_type` of the output + * is `INT64`. + * + * Generated from protobuf enum REDUCE_COUNT_FALSE = 15; + */ + const REDUCE_COUNT_FALSE = 15; + /** + * Reduce by computing the ratio of the number of `True`-valued data points + * to the total number of data points for each alignment period. This + * reducer is valid for `DELTA` and `GAUGE` metrics of Boolean `value_type`. + * The output value is in the range [0.0, 1.0] and has `value_type` + * `DOUBLE`. + * + * Generated from protobuf enum REDUCE_FRACTION_TRUE = 8; + */ + const REDUCE_FRACTION_TRUE = 8; + /** + * Reduce by computing the [99th + * percentile](https://en.wikipedia.org/wiki/Percentile) of data points + * across time series for each alignment period. This reducer is valid for + * `GAUGE` and `DELTA` metrics of numeric and distribution type. The value + * of the output is `DOUBLE`. + * + * Generated from protobuf enum REDUCE_PERCENTILE_99 = 9; + */ + const REDUCE_PERCENTILE_99 = 9; + /** + * Reduce by computing the [95th + * percentile](https://en.wikipedia.org/wiki/Percentile) of data points + * across time series for each alignment period. This reducer is valid for + * `GAUGE` and `DELTA` metrics of numeric and distribution type. The value + * of the output is `DOUBLE`. + * + * Generated from protobuf enum REDUCE_PERCENTILE_95 = 10; + */ + const REDUCE_PERCENTILE_95 = 10; + /** + * Reduce by computing the [50th + * percentile](https://en.wikipedia.org/wiki/Percentile) of data points + * across time series for each alignment period. This reducer is valid for + * `GAUGE` and `DELTA` metrics of numeric and distribution type. The value + * of the output is `DOUBLE`. + * + * Generated from protobuf enum REDUCE_PERCENTILE_50 = 11; + */ + const REDUCE_PERCENTILE_50 = 11; + /** + * Reduce by computing the [5th + * percentile](https://en.wikipedia.org/wiki/Percentile) of data points + * across time series for each alignment period. This reducer is valid for + * `GAUGE` and `DELTA` metrics of numeric and distribution type. The value + * of the output is `DOUBLE`. + * + * Generated from protobuf enum REDUCE_PERCENTILE_05 = 12; + */ + const REDUCE_PERCENTILE_05 = 12; + + private static $valueToName = [ + self::REDUCE_NONE => 'REDUCE_NONE', + self::REDUCE_MEAN => 'REDUCE_MEAN', + self::REDUCE_MIN => 'REDUCE_MIN', + self::REDUCE_MAX => 'REDUCE_MAX', + self::REDUCE_SUM => 'REDUCE_SUM', + self::REDUCE_STDDEV => 'REDUCE_STDDEV', + self::REDUCE_COUNT => 'REDUCE_COUNT', + self::REDUCE_COUNT_TRUE => 'REDUCE_COUNT_TRUE', + self::REDUCE_COUNT_FALSE => 'REDUCE_COUNT_FALSE', + self::REDUCE_FRACTION_TRUE => 'REDUCE_FRACTION_TRUE', + self::REDUCE_PERCENTILE_99 => 'REDUCE_PERCENTILE_99', + self::REDUCE_PERCENTILE_95 => 'REDUCE_PERCENTILE_95', + self::REDUCE_PERCENTILE_50 => 'REDUCE_PERCENTILE_50', + self::REDUCE_PERCENTILE_05 => 'REDUCE_PERCENTILE_05', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Reducer::class, \Google\Cloud\Monitoring\V3\Aggregation_Reducer::class); + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy.php new file mode 100644 index 000000000000..c9b92c00eff9 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy.php @@ -0,0 +1,805 @@ +google.monitoring.v3.AlertPolicy + */ +class AlertPolicy extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. Required if the policy exists. The resource name for this + * policy. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID] + * `[ALERT_POLICY_ID]` is assigned by Cloud Monitoring when the policy + * is created. When calling the + * [alertPolicies.create][google.monitoring.v3.AlertPolicyService.CreateAlertPolicy] + * method, do not include the `name` field in the alerting policy passed as + * part of the request. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * A short name or phrase used to identify the policy in dashboards, + * notifications, and incidents. To avoid confusion, don't use the same + * display name for multiple policies in the same project. The name is + * limited to 512 Unicode characters. + * The convention for the display_name of a PrometheusQueryLanguageCondition + * is "{rule group name}/{alert name}", where the {rule group name} and + * {alert name} should be taken from the corresponding Prometheus + * configuration file. This convention is not enforced. + * In any case the display_name is not a unique key of the AlertPolicy. + * + * Generated from protobuf field string display_name = 2; + */ + protected $display_name = ''; + /** + * Documentation that is included with notifications and incidents related to + * this policy. Best practice is for the documentation to include information + * to help responders understand, mitigate, escalate, and correct the + * underlying problems detected by the alerting policy. Notification channels + * that have limited capacity might not show this documentation. + * + * Generated from protobuf field .google.monitoring.v3.AlertPolicy.Documentation documentation = 13; + */ + protected $documentation = null; + /** + * User-supplied key/value data to be used for organizing and + * identifying the `AlertPolicy` objects. + * The field can contain up to 64 entries. Each key and value is limited to + * 63 Unicode characters or 128 bytes, whichever is smaller. Labels and + * values can contain only lowercase letters, numerals, underscores, and + * dashes. Keys must begin with a letter. + * Note that Prometheus {alert name} is a + * [valid Prometheus label + * names](https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels), + * whereas Prometheus {rule group} is an unrestricted UTF-8 string. + * This means that they cannot be stored as-is in user labels, because + * they may contain characters that are not allowed in user-label values. + * + * Generated from protobuf field map user_labels = 16; + */ + private $user_labels; + /** + * A list of conditions for the policy. The conditions are combined by AND or + * OR according to the `combiner` field. If the combined conditions evaluate + * to true, then an incident is created. A policy can have from one to six + * conditions. + * If `condition_time_series_query_language` is present, it must be the only + * `condition`. + * If `condition_monitoring_query_language` is present, it must be the only + * `condition`. + * + * Generated from protobuf field repeated .google.monitoring.v3.AlertPolicy.Condition conditions = 12; + */ + private $conditions; + /** + * How to combine the results of multiple conditions to determine if an + * incident should be opened. + * If `condition_time_series_query_language` is present, this must be + * `COMBINE_UNSPECIFIED`. + * + * Generated from protobuf field .google.monitoring.v3.AlertPolicy.ConditionCombinerType combiner = 6; + */ + protected $combiner = 0; + /** + * Whether or not the policy is enabled. On write, the default interpretation + * if unset is that the policy is enabled. On read, clients should not make + * any assumption about the state if it has not been populated. The + * field should always be populated on List and Get operations, unless + * a field projection has been specified that strips it out. + * + * Generated from protobuf field .google.protobuf.BoolValue enabled = 17; + */ + protected $enabled = null; + /** + * Read-only description of how the alerting policy is invalid. This field is + * only set when the alerting policy is invalid. An invalid alerting policy + * will not generate incidents. + * + * Generated from protobuf field .google.rpc.Status validity = 18; + */ + protected $validity = null; + /** + * Identifies the notification channels to which notifications should be sent + * when incidents are opened or closed or when new violations occur on + * an already opened incident. Each element of this array corresponds to + * the `name` field in each of the + * [`NotificationChannel`][google.monitoring.v3.NotificationChannel] + * objects that are returned from the [`ListNotificationChannels`] + * [google.monitoring.v3.NotificationChannelService.ListNotificationChannels] + * method. The format of the entries in this field is: + * projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID] + * + * Generated from protobuf field repeated string notification_channels = 14; + */ + private $notification_channels; + /** + * A read-only record of the creation of the alerting policy. If provided + * in a call to create or update, this field will be ignored. + * + * Generated from protobuf field .google.monitoring.v3.MutationRecord creation_record = 10; + */ + protected $creation_record = null; + /** + * A read-only record of the most recent change to the alerting policy. If + * provided in a call to create or update, this field will be ignored. + * + * Generated from protobuf field .google.monitoring.v3.MutationRecord mutation_record = 11; + */ + protected $mutation_record = null; + /** + * Control over how this alerting policy's notification channels are notified. + * + * Generated from protobuf field .google.monitoring.v3.AlertPolicy.AlertStrategy alert_strategy = 21; + */ + protected $alert_strategy = null; + /** + * Optional. The severity of an alerting policy indicates how important + * incidents generated by that policy are. The severity level will be + * displayed on the Incident detail page and in notifications. + * + * Generated from protobuf field .google.monitoring.v3.AlertPolicy.Severity severity = 22 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $severity = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. Required if the policy exists. The resource name for this + * policy. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID] + * `[ALERT_POLICY_ID]` is assigned by Cloud Monitoring when the policy + * is created. When calling the + * [alertPolicies.create][google.monitoring.v3.AlertPolicyService.CreateAlertPolicy] + * method, do not include the `name` field in the alerting policy passed as + * part of the request. + * @type string $display_name + * A short name or phrase used to identify the policy in dashboards, + * notifications, and incidents. To avoid confusion, don't use the same + * display name for multiple policies in the same project. The name is + * limited to 512 Unicode characters. + * The convention for the display_name of a PrometheusQueryLanguageCondition + * is "{rule group name}/{alert name}", where the {rule group name} and + * {alert name} should be taken from the corresponding Prometheus + * configuration file. This convention is not enforced. + * In any case the display_name is not a unique key of the AlertPolicy. + * @type \Google\Cloud\Monitoring\V3\AlertPolicy\Documentation $documentation + * Documentation that is included with notifications and incidents related to + * this policy. Best practice is for the documentation to include information + * to help responders understand, mitigate, escalate, and correct the + * underlying problems detected by the alerting policy. Notification channels + * that have limited capacity might not show this documentation. + * @type array|\Google\Protobuf\Internal\MapField $user_labels + * User-supplied key/value data to be used for organizing and + * identifying the `AlertPolicy` objects. + * The field can contain up to 64 entries. Each key and value is limited to + * 63 Unicode characters or 128 bytes, whichever is smaller. Labels and + * values can contain only lowercase letters, numerals, underscores, and + * dashes. Keys must begin with a letter. + * Note that Prometheus {alert name} is a + * [valid Prometheus label + * names](https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels), + * whereas Prometheus {rule group} is an unrestricted UTF-8 string. + * This means that they cannot be stored as-is in user labels, because + * they may contain characters that are not allowed in user-label values. + * @type array<\Google\Cloud\Monitoring\V3\AlertPolicy\Condition>|\Google\Protobuf\Internal\RepeatedField $conditions + * A list of conditions for the policy. The conditions are combined by AND or + * OR according to the `combiner` field. If the combined conditions evaluate + * to true, then an incident is created. A policy can have from one to six + * conditions. + * If `condition_time_series_query_language` is present, it must be the only + * `condition`. + * If `condition_monitoring_query_language` is present, it must be the only + * `condition`. + * @type int $combiner + * How to combine the results of multiple conditions to determine if an + * incident should be opened. + * If `condition_time_series_query_language` is present, this must be + * `COMBINE_UNSPECIFIED`. + * @type \Google\Protobuf\BoolValue $enabled + * Whether or not the policy is enabled. On write, the default interpretation + * if unset is that the policy is enabled. On read, clients should not make + * any assumption about the state if it has not been populated. The + * field should always be populated on List and Get operations, unless + * a field projection has been specified that strips it out. + * @type \Google\Rpc\Status $validity + * Read-only description of how the alerting policy is invalid. This field is + * only set when the alerting policy is invalid. An invalid alerting policy + * will not generate incidents. + * @type array|\Google\Protobuf\Internal\RepeatedField $notification_channels + * Identifies the notification channels to which notifications should be sent + * when incidents are opened or closed or when new violations occur on + * an already opened incident. Each element of this array corresponds to + * the `name` field in each of the + * [`NotificationChannel`][google.monitoring.v3.NotificationChannel] + * objects that are returned from the [`ListNotificationChannels`] + * [google.monitoring.v3.NotificationChannelService.ListNotificationChannels] + * method. The format of the entries in this field is: + * projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID] + * @type \Google\Cloud\Monitoring\V3\MutationRecord $creation_record + * A read-only record of the creation of the alerting policy. If provided + * in a call to create or update, this field will be ignored. + * @type \Google\Cloud\Monitoring\V3\MutationRecord $mutation_record + * A read-only record of the most recent change to the alerting policy. If + * provided in a call to create or update, this field will be ignored. + * @type \Google\Cloud\Monitoring\V3\AlertPolicy\AlertStrategy $alert_strategy + * Control over how this alerting policy's notification channels are notified. + * @type int $severity + * Optional. The severity of an alerting policy indicates how important + * incidents generated by that policy are. The severity level will be + * displayed on the Incident detail page and in notifications. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\Alert::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. Required if the policy exists. The resource name for this + * policy. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID] + * `[ALERT_POLICY_ID]` is assigned by Cloud Monitoring when the policy + * is created. When calling the + * [alertPolicies.create][google.monitoring.v3.AlertPolicyService.CreateAlertPolicy] + * method, do not include the `name` field in the alerting policy passed as + * part of the request. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. Required if the policy exists. The resource name for this + * policy. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID] + * `[ALERT_POLICY_ID]` is assigned by Cloud Monitoring when the policy + * is created. When calling the + * [alertPolicies.create][google.monitoring.v3.AlertPolicyService.CreateAlertPolicy] + * method, do not include the `name` field in the alerting policy passed as + * part of the request. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * A short name or phrase used to identify the policy in dashboards, + * notifications, and incidents. To avoid confusion, don't use the same + * display name for multiple policies in the same project. The name is + * limited to 512 Unicode characters. + * The convention for the display_name of a PrometheusQueryLanguageCondition + * is "{rule group name}/{alert name}", where the {rule group name} and + * {alert name} should be taken from the corresponding Prometheus + * configuration file. This convention is not enforced. + * In any case the display_name is not a unique key of the AlertPolicy. + * + * Generated from protobuf field string display_name = 2; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * A short name or phrase used to identify the policy in dashboards, + * notifications, and incidents. To avoid confusion, don't use the same + * display name for multiple policies in the same project. The name is + * limited to 512 Unicode characters. + * The convention for the display_name of a PrometheusQueryLanguageCondition + * is "{rule group name}/{alert name}", where the {rule group name} and + * {alert name} should be taken from the corresponding Prometheus + * configuration file. This convention is not enforced. + * In any case the display_name is not a unique key of the AlertPolicy. + * + * Generated from protobuf field string display_name = 2; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Documentation that is included with notifications and incidents related to + * this policy. Best practice is for the documentation to include information + * to help responders understand, mitigate, escalate, and correct the + * underlying problems detected by the alerting policy. Notification channels + * that have limited capacity might not show this documentation. + * + * Generated from protobuf field .google.monitoring.v3.AlertPolicy.Documentation documentation = 13; + * @return \Google\Cloud\Monitoring\V3\AlertPolicy\Documentation|null + */ + public function getDocumentation() + { + return $this->documentation; + } + + public function hasDocumentation() + { + return isset($this->documentation); + } + + public function clearDocumentation() + { + unset($this->documentation); + } + + /** + * Documentation that is included with notifications and incidents related to + * this policy. Best practice is for the documentation to include information + * to help responders understand, mitigate, escalate, and correct the + * underlying problems detected by the alerting policy. Notification channels + * that have limited capacity might not show this documentation. + * + * Generated from protobuf field .google.monitoring.v3.AlertPolicy.Documentation documentation = 13; + * @param \Google\Cloud\Monitoring\V3\AlertPolicy\Documentation $var + * @return $this + */ + public function setDocumentation($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\AlertPolicy\Documentation::class); + $this->documentation = $var; + + return $this; + } + + /** + * User-supplied key/value data to be used for organizing and + * identifying the `AlertPolicy` objects. + * The field can contain up to 64 entries. Each key and value is limited to + * 63 Unicode characters or 128 bytes, whichever is smaller. Labels and + * values can contain only lowercase letters, numerals, underscores, and + * dashes. Keys must begin with a letter. + * Note that Prometheus {alert name} is a + * [valid Prometheus label + * names](https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels), + * whereas Prometheus {rule group} is an unrestricted UTF-8 string. + * This means that they cannot be stored as-is in user labels, because + * they may contain characters that are not allowed in user-label values. + * + * Generated from protobuf field map user_labels = 16; + * @return \Google\Protobuf\Internal\MapField + */ + public function getUserLabels() + { + return $this->user_labels; + } + + /** + * User-supplied key/value data to be used for organizing and + * identifying the `AlertPolicy` objects. + * The field can contain up to 64 entries. Each key and value is limited to + * 63 Unicode characters or 128 bytes, whichever is smaller. Labels and + * values can contain only lowercase letters, numerals, underscores, and + * dashes. Keys must begin with a letter. + * Note that Prometheus {alert name} is a + * [valid Prometheus label + * names](https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels), + * whereas Prometheus {rule group} is an unrestricted UTF-8 string. + * This means that they cannot be stored as-is in user labels, because + * they may contain characters that are not allowed in user-label values. + * + * Generated from protobuf field map user_labels = 16; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setUserLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->user_labels = $arr; + + return $this; + } + + /** + * A list of conditions for the policy. The conditions are combined by AND or + * OR according to the `combiner` field. If the combined conditions evaluate + * to true, then an incident is created. A policy can have from one to six + * conditions. + * If `condition_time_series_query_language` is present, it must be the only + * `condition`. + * If `condition_monitoring_query_language` is present, it must be the only + * `condition`. + * + * Generated from protobuf field repeated .google.monitoring.v3.AlertPolicy.Condition conditions = 12; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getConditions() + { + return $this->conditions; + } + + /** + * A list of conditions for the policy. The conditions are combined by AND or + * OR according to the `combiner` field. If the combined conditions evaluate + * to true, then an incident is created. A policy can have from one to six + * conditions. + * If `condition_time_series_query_language` is present, it must be the only + * `condition`. + * If `condition_monitoring_query_language` is present, it must be the only + * `condition`. + * + * Generated from protobuf field repeated .google.monitoring.v3.AlertPolicy.Condition conditions = 12; + * @param array<\Google\Cloud\Monitoring\V3\AlertPolicy\Condition>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setConditions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Monitoring\V3\AlertPolicy\Condition::class); + $this->conditions = $arr; + + return $this; + } + + /** + * How to combine the results of multiple conditions to determine if an + * incident should be opened. + * If `condition_time_series_query_language` is present, this must be + * `COMBINE_UNSPECIFIED`. + * + * Generated from protobuf field .google.monitoring.v3.AlertPolicy.ConditionCombinerType combiner = 6; + * @return int + */ + public function getCombiner() + { + return $this->combiner; + } + + /** + * How to combine the results of multiple conditions to determine if an + * incident should be opened. + * If `condition_time_series_query_language` is present, this must be + * `COMBINE_UNSPECIFIED`. + * + * Generated from protobuf field .google.monitoring.v3.AlertPolicy.ConditionCombinerType combiner = 6; + * @param int $var + * @return $this + */ + public function setCombiner($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Monitoring\V3\AlertPolicy\ConditionCombinerType::class); + $this->combiner = $var; + + return $this; + } + + /** + * Whether or not the policy is enabled. On write, the default interpretation + * if unset is that the policy is enabled. On read, clients should not make + * any assumption about the state if it has not been populated. The + * field should always be populated on List and Get operations, unless + * a field projection has been specified that strips it out. + * + * Generated from protobuf field .google.protobuf.BoolValue enabled = 17; + * @return \Google\Protobuf\BoolValue|null + */ + public function getEnabled() + { + return $this->enabled; + } + + public function hasEnabled() + { + return isset($this->enabled); + } + + public function clearEnabled() + { + unset($this->enabled); + } + + /** + * Returns the unboxed value from getEnabled() + + * Whether or not the policy is enabled. On write, the default interpretation + * if unset is that the policy is enabled. On read, clients should not make + * any assumption about the state if it has not been populated. The + * field should always be populated on List and Get operations, unless + * a field projection has been specified that strips it out. + * + * Generated from protobuf field .google.protobuf.BoolValue enabled = 17; + * @return bool|null + */ + public function getEnabledUnwrapped() + { + return $this->readWrapperValue("enabled"); + } + + /** + * Whether or not the policy is enabled. On write, the default interpretation + * if unset is that the policy is enabled. On read, clients should not make + * any assumption about the state if it has not been populated. The + * field should always be populated on List and Get operations, unless + * a field projection has been specified that strips it out. + * + * Generated from protobuf field .google.protobuf.BoolValue enabled = 17; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setEnabled($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->enabled = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Whether or not the policy is enabled. On write, the default interpretation + * if unset is that the policy is enabled. On read, clients should not make + * any assumption about the state if it has not been populated. The + * field should always be populated on List and Get operations, unless + * a field projection has been specified that strips it out. + * + * Generated from protobuf field .google.protobuf.BoolValue enabled = 17; + * @param bool|null $var + * @return $this + */ + public function setEnabledUnwrapped($var) + { + $this->writeWrapperValue("enabled", $var); + return $this;} + + /** + * Read-only description of how the alerting policy is invalid. This field is + * only set when the alerting policy is invalid. An invalid alerting policy + * will not generate incidents. + * + * Generated from protobuf field .google.rpc.Status validity = 18; + * @return \Google\Rpc\Status|null + */ + public function getValidity() + { + return $this->validity; + } + + public function hasValidity() + { + return isset($this->validity); + } + + public function clearValidity() + { + unset($this->validity); + } + + /** + * Read-only description of how the alerting policy is invalid. This field is + * only set when the alerting policy is invalid. An invalid alerting policy + * will not generate incidents. + * + * Generated from protobuf field .google.rpc.Status validity = 18; + * @param \Google\Rpc\Status $var + * @return $this + */ + public function setValidity($var) + { + GPBUtil::checkMessage($var, \Google\Rpc\Status::class); + $this->validity = $var; + + return $this; + } + + /** + * Identifies the notification channels to which notifications should be sent + * when incidents are opened or closed or when new violations occur on + * an already opened incident. Each element of this array corresponds to + * the `name` field in each of the + * [`NotificationChannel`][google.monitoring.v3.NotificationChannel] + * objects that are returned from the [`ListNotificationChannels`] + * [google.monitoring.v3.NotificationChannelService.ListNotificationChannels] + * method. The format of the entries in this field is: + * projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID] + * + * Generated from protobuf field repeated string notification_channels = 14; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNotificationChannels() + { + return $this->notification_channels; + } + + /** + * Identifies the notification channels to which notifications should be sent + * when incidents are opened or closed or when new violations occur on + * an already opened incident. Each element of this array corresponds to + * the `name` field in each of the + * [`NotificationChannel`][google.monitoring.v3.NotificationChannel] + * objects that are returned from the [`ListNotificationChannels`] + * [google.monitoring.v3.NotificationChannelService.ListNotificationChannels] + * method. The format of the entries in this field is: + * projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID] + * + * Generated from protobuf field repeated string notification_channels = 14; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNotificationChannels($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->notification_channels = $arr; + + return $this; + } + + /** + * A read-only record of the creation of the alerting policy. If provided + * in a call to create or update, this field will be ignored. + * + * Generated from protobuf field .google.monitoring.v3.MutationRecord creation_record = 10; + * @return \Google\Cloud\Monitoring\V3\MutationRecord|null + */ + public function getCreationRecord() + { + return $this->creation_record; + } + + public function hasCreationRecord() + { + return isset($this->creation_record); + } + + public function clearCreationRecord() + { + unset($this->creation_record); + } + + /** + * A read-only record of the creation of the alerting policy. If provided + * in a call to create or update, this field will be ignored. + * + * Generated from protobuf field .google.monitoring.v3.MutationRecord creation_record = 10; + * @param \Google\Cloud\Monitoring\V3\MutationRecord $var + * @return $this + */ + public function setCreationRecord($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\MutationRecord::class); + $this->creation_record = $var; + + return $this; + } + + /** + * A read-only record of the most recent change to the alerting policy. If + * provided in a call to create or update, this field will be ignored. + * + * Generated from protobuf field .google.monitoring.v3.MutationRecord mutation_record = 11; + * @return \Google\Cloud\Monitoring\V3\MutationRecord|null + */ + public function getMutationRecord() + { + return $this->mutation_record; + } + + public function hasMutationRecord() + { + return isset($this->mutation_record); + } + + public function clearMutationRecord() + { + unset($this->mutation_record); + } + + /** + * A read-only record of the most recent change to the alerting policy. If + * provided in a call to create or update, this field will be ignored. + * + * Generated from protobuf field .google.monitoring.v3.MutationRecord mutation_record = 11; + * @param \Google\Cloud\Monitoring\V3\MutationRecord $var + * @return $this + */ + public function setMutationRecord($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\MutationRecord::class); + $this->mutation_record = $var; + + return $this; + } + + /** + * Control over how this alerting policy's notification channels are notified. + * + * Generated from protobuf field .google.monitoring.v3.AlertPolicy.AlertStrategy alert_strategy = 21; + * @return \Google\Cloud\Monitoring\V3\AlertPolicy\AlertStrategy|null + */ + public function getAlertStrategy() + { + return $this->alert_strategy; + } + + public function hasAlertStrategy() + { + return isset($this->alert_strategy); + } + + public function clearAlertStrategy() + { + unset($this->alert_strategy); + } + + /** + * Control over how this alerting policy's notification channels are notified. + * + * Generated from protobuf field .google.monitoring.v3.AlertPolicy.AlertStrategy alert_strategy = 21; + * @param \Google\Cloud\Monitoring\V3\AlertPolicy\AlertStrategy $var + * @return $this + */ + public function setAlertStrategy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\AlertPolicy\AlertStrategy::class); + $this->alert_strategy = $var; + + return $this; + } + + /** + * Optional. The severity of an alerting policy indicates how important + * incidents generated by that policy are. The severity level will be + * displayed on the Incident detail page and in notifications. + * + * Generated from protobuf field .google.monitoring.v3.AlertPolicy.Severity severity = 22 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getSeverity() + { + return $this->severity; + } + + /** + * Optional. The severity of an alerting policy indicates how important + * incidents generated by that policy are. The severity level will be + * displayed on the Incident detail page and in notifications. + * + * Generated from protobuf field .google.monitoring.v3.AlertPolicy.Severity severity = 22 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setSeverity($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Monitoring\V3\AlertPolicy\Severity::class); + $this->severity = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/AlertStrategy.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/AlertStrategy.php new file mode 100644 index 000000000000..c8145f8e85af --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/AlertStrategy.php @@ -0,0 +1,217 @@ +google.monitoring.v3.AlertPolicy.AlertStrategy + */ +class AlertStrategy extends \Google\Protobuf\Internal\Message +{ + /** + * Required for log-based alerting policies, i.e. policies with a `LogMatch` + * condition. + * This limit is not implemented for alerting policies that do not have + * a LogMatch condition. + * + * Generated from protobuf field .google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit notification_rate_limit = 1; + */ + protected $notification_rate_limit = null; + /** + * For log-based alert policies, the notification prompts is always + * [OPENED]. For non log-based alert policies, the notification prompts can + * be [OPENED] or [OPENED, CLOSED]. + * + * Generated from protobuf field repeated .google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationPrompt notification_prompts = 2; + */ + private $notification_prompts; + /** + * If an alerting policy that was active has no data for this long, any open + * incidents will close + * + * Generated from protobuf field .google.protobuf.Duration auto_close = 3; + */ + protected $auto_close = null; + /** + * Control how notifications will be sent out, on a per-channel basis. + * + * Generated from protobuf field repeated .google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationChannelStrategy notification_channel_strategy = 4; + */ + private $notification_channel_strategy; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Monitoring\V3\AlertPolicy\AlertStrategy\NotificationRateLimit $notification_rate_limit + * Required for log-based alerting policies, i.e. policies with a `LogMatch` + * condition. + * This limit is not implemented for alerting policies that do not have + * a LogMatch condition. + * @type array|\Google\Protobuf\Internal\RepeatedField $notification_prompts + * For log-based alert policies, the notification prompts is always + * [OPENED]. For non log-based alert policies, the notification prompts can + * be [OPENED] or [OPENED, CLOSED]. + * @type \Google\Protobuf\Duration $auto_close + * If an alerting policy that was active has no data for this long, any open + * incidents will close + * @type array<\Google\Cloud\Monitoring\V3\AlertPolicy\AlertStrategy\NotificationChannelStrategy>|\Google\Protobuf\Internal\RepeatedField $notification_channel_strategy + * Control how notifications will be sent out, on a per-channel basis. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\Alert::initOnce(); + parent::__construct($data); + } + + /** + * Required for log-based alerting policies, i.e. policies with a `LogMatch` + * condition. + * This limit is not implemented for alerting policies that do not have + * a LogMatch condition. + * + * Generated from protobuf field .google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit notification_rate_limit = 1; + * @return \Google\Cloud\Monitoring\V3\AlertPolicy\AlertStrategy\NotificationRateLimit|null + */ + public function getNotificationRateLimit() + { + return $this->notification_rate_limit; + } + + public function hasNotificationRateLimit() + { + return isset($this->notification_rate_limit); + } + + public function clearNotificationRateLimit() + { + unset($this->notification_rate_limit); + } + + /** + * Required for log-based alerting policies, i.e. policies with a `LogMatch` + * condition. + * This limit is not implemented for alerting policies that do not have + * a LogMatch condition. + * + * Generated from protobuf field .google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit notification_rate_limit = 1; + * @param \Google\Cloud\Monitoring\V3\AlertPolicy\AlertStrategy\NotificationRateLimit $var + * @return $this + */ + public function setNotificationRateLimit($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\AlertPolicy\AlertStrategy\NotificationRateLimit::class); + $this->notification_rate_limit = $var; + + return $this; + } + + /** + * For log-based alert policies, the notification prompts is always + * [OPENED]. For non log-based alert policies, the notification prompts can + * be [OPENED] or [OPENED, CLOSED]. + * + * Generated from protobuf field repeated .google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationPrompt notification_prompts = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNotificationPrompts() + { + return $this->notification_prompts; + } + + /** + * For log-based alert policies, the notification prompts is always + * [OPENED]. For non log-based alert policies, the notification prompts can + * be [OPENED] or [OPENED, CLOSED]. + * + * Generated from protobuf field repeated .google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationPrompt notification_prompts = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNotificationPrompts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Monitoring\V3\AlertPolicy\AlertStrategy\NotificationPrompt::class); + $this->notification_prompts = $arr; + + return $this; + } + + /** + * If an alerting policy that was active has no data for this long, any open + * incidents will close + * + * Generated from protobuf field .google.protobuf.Duration auto_close = 3; + * @return \Google\Protobuf\Duration|null + */ + public function getAutoClose() + { + return $this->auto_close; + } + + public function hasAutoClose() + { + return isset($this->auto_close); + } + + public function clearAutoClose() + { + unset($this->auto_close); + } + + /** + * If an alerting policy that was active has no data for this long, any open + * incidents will close + * + * Generated from protobuf field .google.protobuf.Duration auto_close = 3; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setAutoClose($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->auto_close = $var; + + return $this; + } + + /** + * Control how notifications will be sent out, on a per-channel basis. + * + * Generated from protobuf field repeated .google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationChannelStrategy notification_channel_strategy = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNotificationChannelStrategy() + { + return $this->notification_channel_strategy; + } + + /** + * Control how notifications will be sent out, on a per-channel basis. + * + * Generated from protobuf field repeated .google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationChannelStrategy notification_channel_strategy = 4; + * @param array<\Google\Cloud\Monitoring\V3\AlertPolicy\AlertStrategy\NotificationChannelStrategy>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNotificationChannelStrategy($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Monitoring\V3\AlertPolicy\AlertStrategy\NotificationChannelStrategy::class); + $this->notification_channel_strategy = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(AlertStrategy::class, \Google\Cloud\Monitoring\V3\AlertPolicy_AlertStrategy::class); + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/AlertStrategy/NotificationChannelStrategy.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/AlertStrategy/NotificationChannelStrategy.php new file mode 100644 index 000000000000..3fb4be795892 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/AlertStrategy/NotificationChannelStrategy.php @@ -0,0 +1,139 @@ +google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationChannelStrategy + */ +class NotificationChannelStrategy extends \Google\Protobuf\Internal\Message +{ + /** + * The full REST resource name for the notification channels that these + * settings apply to. Each of these correspond to the name field in one + * of the NotificationChannel objects referenced in the + * notification_channels field of this AlertPolicy. + * The format is: + * projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID] + * + * Generated from protobuf field repeated string notification_channel_names = 1; + */ + private $notification_channel_names; + /** + * The frequency at which to send reminder notifications for open + * incidents. + * + * Generated from protobuf field .google.protobuf.Duration renotify_interval = 2; + */ + protected $renotify_interval = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $notification_channel_names + * The full REST resource name for the notification channels that these + * settings apply to. Each of these correspond to the name field in one + * of the NotificationChannel objects referenced in the + * notification_channels field of this AlertPolicy. + * The format is: + * projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID] + * @type \Google\Protobuf\Duration $renotify_interval + * The frequency at which to send reminder notifications for open + * incidents. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\Alert::initOnce(); + parent::__construct($data); + } + + /** + * The full REST resource name for the notification channels that these + * settings apply to. Each of these correspond to the name field in one + * of the NotificationChannel objects referenced in the + * notification_channels field of this AlertPolicy. + * The format is: + * projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID] + * + * Generated from protobuf field repeated string notification_channel_names = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNotificationChannelNames() + { + return $this->notification_channel_names; + } + + /** + * The full REST resource name for the notification channels that these + * settings apply to. Each of these correspond to the name field in one + * of the NotificationChannel objects referenced in the + * notification_channels field of this AlertPolicy. + * The format is: + * projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID] + * + * Generated from protobuf field repeated string notification_channel_names = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNotificationChannelNames($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->notification_channel_names = $arr; + + return $this; + } + + /** + * The frequency at which to send reminder notifications for open + * incidents. + * + * Generated from protobuf field .google.protobuf.Duration renotify_interval = 2; + * @return \Google\Protobuf\Duration|null + */ + public function getRenotifyInterval() + { + return $this->renotify_interval; + } + + public function hasRenotifyInterval() + { + return isset($this->renotify_interval); + } + + public function clearRenotifyInterval() + { + unset($this->renotify_interval); + } + + /** + * The frequency at which to send reminder notifications for open + * incidents. + * + * Generated from protobuf field .google.protobuf.Duration renotify_interval = 2; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setRenotifyInterval($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->renotify_interval = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(NotificationChannelStrategy::class, \Google\Cloud\Monitoring\V3\AlertPolicy_AlertStrategy_NotificationChannelStrategy::class); + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/AlertStrategy/NotificationPrompt.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/AlertStrategy/NotificationPrompt.php new file mode 100644 index 000000000000..c5cceba508af --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/AlertStrategy/NotificationPrompt.php @@ -0,0 +1,64 @@ +google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationPrompt + */ +class NotificationPrompt +{ + /** + * No strategy specified. Treated as error. + * + * Generated from protobuf enum NOTIFICATION_PROMPT_UNSPECIFIED = 0; + */ + const NOTIFICATION_PROMPT_UNSPECIFIED = 0; + /** + * Notify when an incident is opened. + * + * Generated from protobuf enum OPENED = 1; + */ + const OPENED = 1; + /** + * Notify when an incident is closed. + * + * Generated from protobuf enum CLOSED = 3; + */ + const CLOSED = 3; + + private static $valueToName = [ + self::NOTIFICATION_PROMPT_UNSPECIFIED => 'NOTIFICATION_PROMPT_UNSPECIFIED', + self::OPENED => 'OPENED', + self::CLOSED => 'CLOSED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(NotificationPrompt::class, \Google\Cloud\Monitoring\V3\AlertPolicy_AlertStrategy_NotificationPrompt::class); + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/AlertStrategy/NotificationRateLimit.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/AlertStrategy/NotificationRateLimit.php new file mode 100644 index 000000000000..24928f618e19 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/AlertStrategy/NotificationRateLimit.php @@ -0,0 +1,81 @@ +google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit + */ +class NotificationRateLimit extends \Google\Protobuf\Internal\Message +{ + /** + * Not more than one notification per `period`. + * + * Generated from protobuf field .google.protobuf.Duration period = 1; + */ + protected $period = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Duration $period + * Not more than one notification per `period`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\Alert::initOnce(); + parent::__construct($data); + } + + /** + * Not more than one notification per `period`. + * + * Generated from protobuf field .google.protobuf.Duration period = 1; + * @return \Google\Protobuf\Duration|null + */ + public function getPeriod() + { + return $this->period; + } + + public function hasPeriod() + { + return isset($this->period); + } + + public function clearPeriod() + { + unset($this->period); + } + + /** + * Not more than one notification per `period`. + * + * Generated from protobuf field .google.protobuf.Duration period = 1; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setPeriod($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->period = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(NotificationRateLimit::class, \Google\Cloud\Monitoring\V3\AlertPolicy_AlertStrategy_NotificationRateLimit::class); + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/Condition.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/Condition.php new file mode 100644 index 000000000000..c476fb7bd10c --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/Condition.php @@ -0,0 +1,373 @@ +google.monitoring.v3.AlertPolicy.Condition + */ +class Condition extends \Google\Protobuf\Internal\Message +{ + /** + * Required if the condition exists. The unique resource name for this + * condition. Its format is: + * projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[POLICY_ID]/conditions/[CONDITION_ID] + * `[CONDITION_ID]` is assigned by Cloud Monitoring when the + * condition is created as part of a new or updated alerting policy. + * When calling the + * [alertPolicies.create][google.monitoring.v3.AlertPolicyService.CreateAlertPolicy] + * method, do not include the `name` field in the conditions of the + * requested alerting policy. Cloud Monitoring creates the + * condition identifiers and includes them in the new policy. + * When calling the + * [alertPolicies.update][google.monitoring.v3.AlertPolicyService.UpdateAlertPolicy] + * method to update a policy, including a condition `name` causes the + * existing condition to be updated. Conditions without names are added to + * the updated policy. Existing conditions are deleted if they are not + * updated. + * Best practice is to preserve `[CONDITION_ID]` if you make only small + * changes, such as those to condition thresholds, durations, or trigger + * values. Otherwise, treat the change as a new condition and let the + * existing condition be deleted. + * + * Generated from protobuf field string name = 12; + */ + protected $name = ''; + /** + * A short name or phrase used to identify the condition in dashboards, + * notifications, and incidents. To avoid confusion, don't use the same + * display name for multiple conditions in the same policy. + * + * Generated from protobuf field string display_name = 6; + */ + protected $display_name = ''; + protected $condition; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required if the condition exists. The unique resource name for this + * condition. Its format is: + * projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[POLICY_ID]/conditions/[CONDITION_ID] + * `[CONDITION_ID]` is assigned by Cloud Monitoring when the + * condition is created as part of a new or updated alerting policy. + * When calling the + * [alertPolicies.create][google.monitoring.v3.AlertPolicyService.CreateAlertPolicy] + * method, do not include the `name` field in the conditions of the + * requested alerting policy. Cloud Monitoring creates the + * condition identifiers and includes them in the new policy. + * When calling the + * [alertPolicies.update][google.monitoring.v3.AlertPolicyService.UpdateAlertPolicy] + * method to update a policy, including a condition `name` causes the + * existing condition to be updated. Conditions without names are added to + * the updated policy. Existing conditions are deleted if they are not + * updated. + * Best practice is to preserve `[CONDITION_ID]` if you make only small + * changes, such as those to condition thresholds, durations, or trigger + * values. Otherwise, treat the change as a new condition and let the + * existing condition be deleted. + * @type string $display_name + * A short name or phrase used to identify the condition in dashboards, + * notifications, and incidents. To avoid confusion, don't use the same + * display name for multiple conditions in the same policy. + * @type \Google\Cloud\Monitoring\V3\AlertPolicy\Condition\MetricThreshold $condition_threshold + * A condition that compares a time series against a threshold. + * @type \Google\Cloud\Monitoring\V3\AlertPolicy\Condition\MetricAbsence $condition_absent + * A condition that checks that a time series continues to + * receive new data points. + * @type \Google\Cloud\Monitoring\V3\AlertPolicy\Condition\LogMatch $condition_matched_log + * A condition that checks for log messages matching given constraints. If + * set, no other conditions can be present. + * @type \Google\Cloud\Monitoring\V3\AlertPolicy\Condition\MonitoringQueryLanguageCondition $condition_monitoring_query_language + * A condition that uses the Monitoring Query Language to define + * alerts. + * @type \Google\Cloud\Monitoring\V3\AlertPolicy\Condition\PrometheusQueryLanguageCondition $condition_prometheus_query_language + * A condition that uses the Prometheus query language to define alerts. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\Alert::initOnce(); + parent::__construct($data); + } + + /** + * Required if the condition exists. The unique resource name for this + * condition. Its format is: + * projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[POLICY_ID]/conditions/[CONDITION_ID] + * `[CONDITION_ID]` is assigned by Cloud Monitoring when the + * condition is created as part of a new or updated alerting policy. + * When calling the + * [alertPolicies.create][google.monitoring.v3.AlertPolicyService.CreateAlertPolicy] + * method, do not include the `name` field in the conditions of the + * requested alerting policy. Cloud Monitoring creates the + * condition identifiers and includes them in the new policy. + * When calling the + * [alertPolicies.update][google.monitoring.v3.AlertPolicyService.UpdateAlertPolicy] + * method to update a policy, including a condition `name` causes the + * existing condition to be updated. Conditions without names are added to + * the updated policy. Existing conditions are deleted if they are not + * updated. + * Best practice is to preserve `[CONDITION_ID]` if you make only small + * changes, such as those to condition thresholds, durations, or trigger + * values. Otherwise, treat the change as a new condition and let the + * existing condition be deleted. + * + * Generated from protobuf field string name = 12; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required if the condition exists. The unique resource name for this + * condition. Its format is: + * projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[POLICY_ID]/conditions/[CONDITION_ID] + * `[CONDITION_ID]` is assigned by Cloud Monitoring when the + * condition is created as part of a new or updated alerting policy. + * When calling the + * [alertPolicies.create][google.monitoring.v3.AlertPolicyService.CreateAlertPolicy] + * method, do not include the `name` field in the conditions of the + * requested alerting policy. Cloud Monitoring creates the + * condition identifiers and includes them in the new policy. + * When calling the + * [alertPolicies.update][google.monitoring.v3.AlertPolicyService.UpdateAlertPolicy] + * method to update a policy, including a condition `name` causes the + * existing condition to be updated. Conditions without names are added to + * the updated policy. Existing conditions are deleted if they are not + * updated. + * Best practice is to preserve `[CONDITION_ID]` if you make only small + * changes, such as those to condition thresholds, durations, or trigger + * values. Otherwise, treat the change as a new condition and let the + * existing condition be deleted. + * + * Generated from protobuf field string name = 12; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * A short name or phrase used to identify the condition in dashboards, + * notifications, and incidents. To avoid confusion, don't use the same + * display name for multiple conditions in the same policy. + * + * Generated from protobuf field string display_name = 6; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * A short name or phrase used to identify the condition in dashboards, + * notifications, and incidents. To avoid confusion, don't use the same + * display name for multiple conditions in the same policy. + * + * Generated from protobuf field string display_name = 6; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * A condition that compares a time series against a threshold. + * + * Generated from protobuf field .google.monitoring.v3.AlertPolicy.Condition.MetricThreshold condition_threshold = 1; + * @return \Google\Cloud\Monitoring\V3\AlertPolicy\Condition\MetricThreshold|null + */ + public function getConditionThreshold() + { + return $this->readOneof(1); + } + + public function hasConditionThreshold() + { + return $this->hasOneof(1); + } + + /** + * A condition that compares a time series against a threshold. + * + * Generated from protobuf field .google.monitoring.v3.AlertPolicy.Condition.MetricThreshold condition_threshold = 1; + * @param \Google\Cloud\Monitoring\V3\AlertPolicy\Condition\MetricThreshold $var + * @return $this + */ + public function setConditionThreshold($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\AlertPolicy\Condition\MetricThreshold::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * A condition that checks that a time series continues to + * receive new data points. + * + * Generated from protobuf field .google.monitoring.v3.AlertPolicy.Condition.MetricAbsence condition_absent = 2; + * @return \Google\Cloud\Monitoring\V3\AlertPolicy\Condition\MetricAbsence|null + */ + public function getConditionAbsent() + { + return $this->readOneof(2); + } + + public function hasConditionAbsent() + { + return $this->hasOneof(2); + } + + /** + * A condition that checks that a time series continues to + * receive new data points. + * + * Generated from protobuf field .google.monitoring.v3.AlertPolicy.Condition.MetricAbsence condition_absent = 2; + * @param \Google\Cloud\Monitoring\V3\AlertPolicy\Condition\MetricAbsence $var + * @return $this + */ + public function setConditionAbsent($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\AlertPolicy\Condition\MetricAbsence::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * A condition that checks for log messages matching given constraints. If + * set, no other conditions can be present. + * + * Generated from protobuf field .google.monitoring.v3.AlertPolicy.Condition.LogMatch condition_matched_log = 20; + * @return \Google\Cloud\Monitoring\V3\AlertPolicy\Condition\LogMatch|null + */ + public function getConditionMatchedLog() + { + return $this->readOneof(20); + } + + public function hasConditionMatchedLog() + { + return $this->hasOneof(20); + } + + /** + * A condition that checks for log messages matching given constraints. If + * set, no other conditions can be present. + * + * Generated from protobuf field .google.monitoring.v3.AlertPolicy.Condition.LogMatch condition_matched_log = 20; + * @param \Google\Cloud\Monitoring\V3\AlertPolicy\Condition\LogMatch $var + * @return $this + */ + public function setConditionMatchedLog($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\AlertPolicy\Condition\LogMatch::class); + $this->writeOneof(20, $var); + + return $this; + } + + /** + * A condition that uses the Monitoring Query Language to define + * alerts. + * + * Generated from protobuf field .google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition condition_monitoring_query_language = 19; + * @return \Google\Cloud\Monitoring\V3\AlertPolicy\Condition\MonitoringQueryLanguageCondition|null + */ + public function getConditionMonitoringQueryLanguage() + { + return $this->readOneof(19); + } + + public function hasConditionMonitoringQueryLanguage() + { + return $this->hasOneof(19); + } + + /** + * A condition that uses the Monitoring Query Language to define + * alerts. + * + * Generated from protobuf field .google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition condition_monitoring_query_language = 19; + * @param \Google\Cloud\Monitoring\V3\AlertPolicy\Condition\MonitoringQueryLanguageCondition $var + * @return $this + */ + public function setConditionMonitoringQueryLanguage($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\AlertPolicy\Condition\MonitoringQueryLanguageCondition::class); + $this->writeOneof(19, $var); + + return $this; + } + + /** + * A condition that uses the Prometheus query language to define alerts. + * + * Generated from protobuf field .google.monitoring.v3.AlertPolicy.Condition.PrometheusQueryLanguageCondition condition_prometheus_query_language = 21; + * @return \Google\Cloud\Monitoring\V3\AlertPolicy\Condition\PrometheusQueryLanguageCondition|null + */ + public function getConditionPrometheusQueryLanguage() + { + return $this->readOneof(21); + } + + public function hasConditionPrometheusQueryLanguage() + { + return $this->hasOneof(21); + } + + /** + * A condition that uses the Prometheus query language to define alerts. + * + * Generated from protobuf field .google.monitoring.v3.AlertPolicy.Condition.PrometheusQueryLanguageCondition condition_prometheus_query_language = 21; + * @param \Google\Cloud\Monitoring\V3\AlertPolicy\Condition\PrometheusQueryLanguageCondition $var + * @return $this + */ + public function setConditionPrometheusQueryLanguage($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\AlertPolicy\Condition\PrometheusQueryLanguageCondition::class); + $this->writeOneof(21, $var); + + return $this; + } + + /** + * @return string + */ + public function getCondition() + { + return $this->whichOneof("condition"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Condition::class, \Google\Cloud\Monitoring\V3\AlertPolicy_Condition::class); + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/Condition/EvaluationMissingData.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/Condition/EvaluationMissingData.php new file mode 100644 index 000000000000..6fc5a47b481b --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/Condition/EvaluationMissingData.php @@ -0,0 +1,76 @@ +google.monitoring.v3.AlertPolicy.Condition.EvaluationMissingData + */ +class EvaluationMissingData +{ + /** + * An unspecified evaluation missing data option. Equivalent to + * EVALUATION_MISSING_DATA_NO_OP. + * + * Generated from protobuf enum EVALUATION_MISSING_DATA_UNSPECIFIED = 0; + */ + const EVALUATION_MISSING_DATA_UNSPECIFIED = 0; + /** + * If there is no data to evaluate the condition, then evaluate the + * condition as false. + * + * Generated from protobuf enum EVALUATION_MISSING_DATA_INACTIVE = 1; + */ + const EVALUATION_MISSING_DATA_INACTIVE = 1; + /** + * If there is no data to evaluate the condition, then evaluate the + * condition as true. + * + * Generated from protobuf enum EVALUATION_MISSING_DATA_ACTIVE = 2; + */ + const EVALUATION_MISSING_DATA_ACTIVE = 2; + /** + * Do not evaluate the condition to any value if there is no data. + * + * Generated from protobuf enum EVALUATION_MISSING_DATA_NO_OP = 3; + */ + const EVALUATION_MISSING_DATA_NO_OP = 3; + + private static $valueToName = [ + self::EVALUATION_MISSING_DATA_UNSPECIFIED => 'EVALUATION_MISSING_DATA_UNSPECIFIED', + self::EVALUATION_MISSING_DATA_INACTIVE => 'EVALUATION_MISSING_DATA_INACTIVE', + self::EVALUATION_MISSING_DATA_ACTIVE => 'EVALUATION_MISSING_DATA_ACTIVE', + self::EVALUATION_MISSING_DATA_NO_OP => 'EVALUATION_MISSING_DATA_NO_OP', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(EvaluationMissingData::class, \Google\Cloud\Monitoring\V3\AlertPolicy_Condition_EvaluationMissingData::class); + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/Condition/LogMatch.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/Condition/LogMatch.php new file mode 100644 index 000000000000..cd52e655a016 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/Condition/LogMatch.php @@ -0,0 +1,151 @@ +google.monitoring.v3.AlertPolicy.Condition.LogMatch + */ +class LogMatch extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A logs-based filter. See [Advanced Logs + * Queries](https://cloud.google.com/logging/docs/view/advanced-queries) + * for how this filter should be constructed. + * + * Generated from protobuf field string filter = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $filter = ''; + /** + * Optional. A map from a label key to an extractor expression, which is + * used to extract the value for this label key. Each entry in this map is + * a specification for how data should be extracted from log entries that + * match `filter`. Each combination of extracted values is treated as a + * separate rule for the purposes of triggering notifications. Label keys + * and corresponding values can be used in notifications generated by this + * condition. + * Please see [the documentation on logs-based metric + * `valueExtractor`s](https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.metrics#LogMetric.FIELDS.value_extractor) + * for syntax and examples. + * + * Generated from protobuf field map label_extractors = 2; + */ + private $label_extractors; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $filter + * Required. A logs-based filter. See [Advanced Logs + * Queries](https://cloud.google.com/logging/docs/view/advanced-queries) + * for how this filter should be constructed. + * @type array|\Google\Protobuf\Internal\MapField $label_extractors + * Optional. A map from a label key to an extractor expression, which is + * used to extract the value for this label key. Each entry in this map is + * a specification for how data should be extracted from log entries that + * match `filter`. Each combination of extracted values is treated as a + * separate rule for the purposes of triggering notifications. Label keys + * and corresponding values can be used in notifications generated by this + * condition. + * Please see [the documentation on logs-based metric + * `valueExtractor`s](https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.metrics#LogMetric.FIELDS.value_extractor) + * for syntax and examples. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\Alert::initOnce(); + parent::__construct($data); + } + + /** + * Required. A logs-based filter. See [Advanced Logs + * Queries](https://cloud.google.com/logging/docs/view/advanced-queries) + * for how this filter should be constructed. + * + * Generated from protobuf field string filter = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Required. A logs-based filter. See [Advanced Logs + * Queries](https://cloud.google.com/logging/docs/view/advanced-queries) + * for how this filter should be constructed. + * + * Generated from protobuf field string filter = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Optional. A map from a label key to an extractor expression, which is + * used to extract the value for this label key. Each entry in this map is + * a specification for how data should be extracted from log entries that + * match `filter`. Each combination of extracted values is treated as a + * separate rule for the purposes of triggering notifications. Label keys + * and corresponding values can be used in notifications generated by this + * condition. + * Please see [the documentation on logs-based metric + * `valueExtractor`s](https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.metrics#LogMetric.FIELDS.value_extractor) + * for syntax and examples. + * + * Generated from protobuf field map label_extractors = 2; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabelExtractors() + { + return $this->label_extractors; + } + + /** + * Optional. A map from a label key to an extractor expression, which is + * used to extract the value for this label key. Each entry in this map is + * a specification for how data should be extracted from log entries that + * match `filter`. Each combination of extracted values is treated as a + * separate rule for the purposes of triggering notifications. Label keys + * and corresponding values can be used in notifications generated by this + * condition. + * Please see [the documentation on logs-based metric + * `valueExtractor`s](https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.metrics#LogMetric.FIELDS.value_extractor) + * for syntax and examples. + * + * Generated from protobuf field map label_extractors = 2; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabelExtractors($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->label_extractors = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(LogMatch::class, \Google\Cloud\Monitoring\V3\AlertPolicy_Condition_LogMatch::class); + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/Condition/MetricAbsence.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/Condition/MetricAbsence.php new file mode 100644 index 000000000000..fc6aad1dfc46 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/Condition/MetricAbsence.php @@ -0,0 +1,304 @@ +google.monitoring.v3.AlertPolicy.Condition.MetricAbsence + */ +class MetricAbsence extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A + * [filter](https://cloud.google.com/monitoring/api/v3/filters) that + * identifies which time series should be compared with the threshold. + * The filter is similar to the one that is specified in the + * [`ListTimeSeries` + * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list) + * (that call is useful to verify the time series that will be retrieved / + * processed). The filter must specify the metric type and the resource + * type. Optionally, it can specify resource labels and metric labels. + * This field must not exceed 2048 Unicode characters in length. + * + * Generated from protobuf field string filter = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $filter = ''; + /** + * Specifies the alignment of data points in individual time series as + * well as how to combine the retrieved time series together (such as + * when aggregating multiple streams on each resource to a single + * stream for each resource or when aggregating streams across all + * members of a group of resources). Multiple aggregations + * are applied in the order specified. + * This field is similar to the one in the [`ListTimeSeries` + * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list). + * It is advisable to use the `ListTimeSeries` method when debugging this + * field. + * + * Generated from protobuf field repeated .google.monitoring.v3.Aggregation aggregations = 5; + */ + private $aggregations; + /** + * The amount of time that a time series must fail to report new + * data to be considered failing. The minimum value of this field + * is 120 seconds. Larger values that are a multiple of a + * minute--for example, 240 or 300 seconds--are supported. + * If an invalid value is given, an + * error will be returned. The `Duration.nanos` field is + * ignored. + * + * Generated from protobuf field .google.protobuf.Duration duration = 2; + */ + protected $duration = null; + /** + * The number/percent of time series for which the comparison must hold + * in order for the condition to trigger. If unspecified, then the + * condition will trigger if the comparison is true for any of the + * time series that have been identified by `filter` and `aggregations`. + * + * Generated from protobuf field .google.monitoring.v3.AlertPolicy.Condition.Trigger trigger = 3; + */ + protected $trigger = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $filter + * Required. A + * [filter](https://cloud.google.com/monitoring/api/v3/filters) that + * identifies which time series should be compared with the threshold. + * The filter is similar to the one that is specified in the + * [`ListTimeSeries` + * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list) + * (that call is useful to verify the time series that will be retrieved / + * processed). The filter must specify the metric type and the resource + * type. Optionally, it can specify resource labels and metric labels. + * This field must not exceed 2048 Unicode characters in length. + * @type array<\Google\Cloud\Monitoring\V3\Aggregation>|\Google\Protobuf\Internal\RepeatedField $aggregations + * Specifies the alignment of data points in individual time series as + * well as how to combine the retrieved time series together (such as + * when aggregating multiple streams on each resource to a single + * stream for each resource or when aggregating streams across all + * members of a group of resources). Multiple aggregations + * are applied in the order specified. + * This field is similar to the one in the [`ListTimeSeries` + * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list). + * It is advisable to use the `ListTimeSeries` method when debugging this + * field. + * @type \Google\Protobuf\Duration $duration + * The amount of time that a time series must fail to report new + * data to be considered failing. The minimum value of this field + * is 120 seconds. Larger values that are a multiple of a + * minute--for example, 240 or 300 seconds--are supported. + * If an invalid value is given, an + * error will be returned. The `Duration.nanos` field is + * ignored. + * @type \Google\Cloud\Monitoring\V3\AlertPolicy\Condition\Trigger $trigger + * The number/percent of time series for which the comparison must hold + * in order for the condition to trigger. If unspecified, then the + * condition will trigger if the comparison is true for any of the + * time series that have been identified by `filter` and `aggregations`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\Alert::initOnce(); + parent::__construct($data); + } + + /** + * Required. A + * [filter](https://cloud.google.com/monitoring/api/v3/filters) that + * identifies which time series should be compared with the threshold. + * The filter is similar to the one that is specified in the + * [`ListTimeSeries` + * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list) + * (that call is useful to verify the time series that will be retrieved / + * processed). The filter must specify the metric type and the resource + * type. Optionally, it can specify resource labels and metric labels. + * This field must not exceed 2048 Unicode characters in length. + * + * Generated from protobuf field string filter = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Required. A + * [filter](https://cloud.google.com/monitoring/api/v3/filters) that + * identifies which time series should be compared with the threshold. + * The filter is similar to the one that is specified in the + * [`ListTimeSeries` + * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list) + * (that call is useful to verify the time series that will be retrieved / + * processed). The filter must specify the metric type and the resource + * type. Optionally, it can specify resource labels and metric labels. + * This field must not exceed 2048 Unicode characters in length. + * + * Generated from protobuf field string filter = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Specifies the alignment of data points in individual time series as + * well as how to combine the retrieved time series together (such as + * when aggregating multiple streams on each resource to a single + * stream for each resource or when aggregating streams across all + * members of a group of resources). Multiple aggregations + * are applied in the order specified. + * This field is similar to the one in the [`ListTimeSeries` + * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list). + * It is advisable to use the `ListTimeSeries` method when debugging this + * field. + * + * Generated from protobuf field repeated .google.monitoring.v3.Aggregation aggregations = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAggregations() + { + return $this->aggregations; + } + + /** + * Specifies the alignment of data points in individual time series as + * well as how to combine the retrieved time series together (such as + * when aggregating multiple streams on each resource to a single + * stream for each resource or when aggregating streams across all + * members of a group of resources). Multiple aggregations + * are applied in the order specified. + * This field is similar to the one in the [`ListTimeSeries` + * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list). + * It is advisable to use the `ListTimeSeries` method when debugging this + * field. + * + * Generated from protobuf field repeated .google.monitoring.v3.Aggregation aggregations = 5; + * @param array<\Google\Cloud\Monitoring\V3\Aggregation>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAggregations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Monitoring\V3\Aggregation::class); + $this->aggregations = $arr; + + return $this; + } + + /** + * The amount of time that a time series must fail to report new + * data to be considered failing. The minimum value of this field + * is 120 seconds. Larger values that are a multiple of a + * minute--for example, 240 or 300 seconds--are supported. + * If an invalid value is given, an + * error will be returned. The `Duration.nanos` field is + * ignored. + * + * Generated from protobuf field .google.protobuf.Duration duration = 2; + * @return \Google\Protobuf\Duration|null + */ + public function getDuration() + { + return $this->duration; + } + + public function hasDuration() + { + return isset($this->duration); + } + + public function clearDuration() + { + unset($this->duration); + } + + /** + * The amount of time that a time series must fail to report new + * data to be considered failing. The minimum value of this field + * is 120 seconds. Larger values that are a multiple of a + * minute--for example, 240 or 300 seconds--are supported. + * If an invalid value is given, an + * error will be returned. The `Duration.nanos` field is + * ignored. + * + * Generated from protobuf field .google.protobuf.Duration duration = 2; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->duration = $var; + + return $this; + } + + /** + * The number/percent of time series for which the comparison must hold + * in order for the condition to trigger. If unspecified, then the + * condition will trigger if the comparison is true for any of the + * time series that have been identified by `filter` and `aggregations`. + * + * Generated from protobuf field .google.monitoring.v3.AlertPolicy.Condition.Trigger trigger = 3; + * @return \Google\Cloud\Monitoring\V3\AlertPolicy\Condition\Trigger|null + */ + public function getTrigger() + { + return $this->trigger; + } + + public function hasTrigger() + { + return isset($this->trigger); + } + + public function clearTrigger() + { + unset($this->trigger); + } + + /** + * The number/percent of time series for which the comparison must hold + * in order for the condition to trigger. If unspecified, then the + * condition will trigger if the comparison is true for any of the + * time series that have been identified by `filter` and `aggregations`. + * + * Generated from protobuf field .google.monitoring.v3.AlertPolicy.Condition.Trigger trigger = 3; + * @param \Google\Cloud\Monitoring\V3\AlertPolicy\Condition\Trigger $var + * @return $this + */ + public function setTrigger($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\AlertPolicy\Condition\Trigger::class); + $this->trigger = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(MetricAbsence::class, \Google\Cloud\Monitoring\V3\AlertPolicy_Condition_MetricAbsence::class); + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/Condition/MetricThreshold.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/Condition/MetricThreshold.php new file mode 100644 index 000000000000..74e9099f57fc --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/Condition/MetricThreshold.php @@ -0,0 +1,635 @@ +google.monitoring.v3.AlertPolicy.Condition.MetricThreshold + */ +class MetricThreshold extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A + * [filter](https://cloud.google.com/monitoring/api/v3/filters) that + * identifies which time series should be compared with the threshold. + * The filter is similar to the one that is specified in the + * [`ListTimeSeries` + * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list) + * (that call is useful to verify the time series that will be retrieved / + * processed). The filter must specify the metric type and the resource + * type. Optionally, it can specify resource labels and metric labels. + * This field must not exceed 2048 Unicode characters in length. + * + * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $filter = ''; + /** + * Specifies the alignment of data points in individual time series as + * well as how to combine the retrieved time series together (such as + * when aggregating multiple streams on each resource to a single + * stream for each resource or when aggregating streams across all + * members of a group of resources). Multiple aggregations + * are applied in the order specified. + * This field is similar to the one in the [`ListTimeSeries` + * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list). + * It is advisable to use the `ListTimeSeries` method when debugging this + * field. + * + * Generated from protobuf field repeated .google.monitoring.v3.Aggregation aggregations = 8; + */ + private $aggregations; + /** + * A [filter](https://cloud.google.com/monitoring/api/v3/filters) that + * identifies a time series that should be used as the denominator of a + * ratio that will be compared with the threshold. If a + * `denominator_filter` is specified, the time series specified by the + * `filter` field will be used as the numerator. + * The filter must specify the metric type and optionally may contain + * restrictions on resource type, resource labels, and metric labels. + * This field may not exceed 2048 Unicode characters in length. + * + * Generated from protobuf field string denominator_filter = 9; + */ + protected $denominator_filter = ''; + /** + * Specifies the alignment of data points in individual time series + * selected by `denominatorFilter` as + * well as how to combine the retrieved time series together (such as + * when aggregating multiple streams on each resource to a single + * stream for each resource or when aggregating streams across all + * members of a group of resources). + * When computing ratios, the `aggregations` and + * `denominator_aggregations` fields must use the same alignment period + * and produce time series that have the same periodicity and labels. + * + * Generated from protobuf field repeated .google.monitoring.v3.Aggregation denominator_aggregations = 10; + */ + private $denominator_aggregations; + /** + * When this field is present, the `MetricThreshold` condition forecasts + * whether the time series is predicted to violate the threshold within + * the `forecast_horizon`. When this field is not set, the + * `MetricThreshold` tests the current value of the timeseries against the + * threshold. + * + * Generated from protobuf field .google.monitoring.v3.AlertPolicy.Condition.MetricThreshold.ForecastOptions forecast_options = 12; + */ + protected $forecast_options = null; + /** + * The comparison to apply between the time series (indicated by `filter` + * and `aggregation`) and the threshold (indicated by `threshold_value`). + * The comparison is applied on each time series, with the time series + * on the left-hand side and the threshold on the right-hand side. + * Only `COMPARISON_LT` and `COMPARISON_GT` are supported currently. + * + * Generated from protobuf field .google.monitoring.v3.ComparisonType comparison = 4; + */ + protected $comparison = 0; + /** + * A value against which to compare the time series. + * + * Generated from protobuf field double threshold_value = 5; + */ + protected $threshold_value = 0.0; + /** + * The amount of time that a time series must violate the + * threshold to be considered failing. Currently, only values + * that are a multiple of a minute--e.g., 0, 60, 120, or 300 + * seconds--are supported. If an invalid value is given, an + * error will be returned. When choosing a duration, it is useful to + * keep in mind the frequency of the underlying time series data + * (which may also be affected by any alignments specified in the + * `aggregations` field); a good duration is long enough so that a single + * outlier does not generate spurious alerts, but short enough that + * unhealthy states are detected and alerted on quickly. + * + * Generated from protobuf field .google.protobuf.Duration duration = 6; + */ + protected $duration = null; + /** + * The number/percent of time series for which the comparison must hold + * in order for the condition to trigger. If unspecified, then the + * condition will trigger if the comparison is true for any of the + * time series that have been identified by `filter` and `aggregations`, + * or by the ratio, if `denominator_filter` and `denominator_aggregations` + * are specified. + * + * Generated from protobuf field .google.monitoring.v3.AlertPolicy.Condition.Trigger trigger = 7; + */ + protected $trigger = null; + /** + * A condition control that determines how metric-threshold conditions + * are evaluated when data stops arriving. To use this control, the value + * of the `duration` field must be greater than or equal to 60 seconds. + * + * Generated from protobuf field .google.monitoring.v3.AlertPolicy.Condition.EvaluationMissingData evaluation_missing_data = 11; + */ + protected $evaluation_missing_data = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $filter + * Required. A + * [filter](https://cloud.google.com/monitoring/api/v3/filters) that + * identifies which time series should be compared with the threshold. + * The filter is similar to the one that is specified in the + * [`ListTimeSeries` + * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list) + * (that call is useful to verify the time series that will be retrieved / + * processed). The filter must specify the metric type and the resource + * type. Optionally, it can specify resource labels and metric labels. + * This field must not exceed 2048 Unicode characters in length. + * @type array<\Google\Cloud\Monitoring\V3\Aggregation>|\Google\Protobuf\Internal\RepeatedField $aggregations + * Specifies the alignment of data points in individual time series as + * well as how to combine the retrieved time series together (such as + * when aggregating multiple streams on each resource to a single + * stream for each resource or when aggregating streams across all + * members of a group of resources). Multiple aggregations + * are applied in the order specified. + * This field is similar to the one in the [`ListTimeSeries` + * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list). + * It is advisable to use the `ListTimeSeries` method when debugging this + * field. + * @type string $denominator_filter + * A [filter](https://cloud.google.com/monitoring/api/v3/filters) that + * identifies a time series that should be used as the denominator of a + * ratio that will be compared with the threshold. If a + * `denominator_filter` is specified, the time series specified by the + * `filter` field will be used as the numerator. + * The filter must specify the metric type and optionally may contain + * restrictions on resource type, resource labels, and metric labels. + * This field may not exceed 2048 Unicode characters in length. + * @type array<\Google\Cloud\Monitoring\V3\Aggregation>|\Google\Protobuf\Internal\RepeatedField $denominator_aggregations + * Specifies the alignment of data points in individual time series + * selected by `denominatorFilter` as + * well as how to combine the retrieved time series together (such as + * when aggregating multiple streams on each resource to a single + * stream for each resource or when aggregating streams across all + * members of a group of resources). + * When computing ratios, the `aggregations` and + * `denominator_aggregations` fields must use the same alignment period + * and produce time series that have the same periodicity and labels. + * @type \Google\Cloud\Monitoring\V3\AlertPolicy\Condition\MetricThreshold\ForecastOptions $forecast_options + * When this field is present, the `MetricThreshold` condition forecasts + * whether the time series is predicted to violate the threshold within + * the `forecast_horizon`. When this field is not set, the + * `MetricThreshold` tests the current value of the timeseries against the + * threshold. + * @type int $comparison + * The comparison to apply between the time series (indicated by `filter` + * and `aggregation`) and the threshold (indicated by `threshold_value`). + * The comparison is applied on each time series, with the time series + * on the left-hand side and the threshold on the right-hand side. + * Only `COMPARISON_LT` and `COMPARISON_GT` are supported currently. + * @type float $threshold_value + * A value against which to compare the time series. + * @type \Google\Protobuf\Duration $duration + * The amount of time that a time series must violate the + * threshold to be considered failing. Currently, only values + * that are a multiple of a minute--e.g., 0, 60, 120, or 300 + * seconds--are supported. If an invalid value is given, an + * error will be returned. When choosing a duration, it is useful to + * keep in mind the frequency of the underlying time series data + * (which may also be affected by any alignments specified in the + * `aggregations` field); a good duration is long enough so that a single + * outlier does not generate spurious alerts, but short enough that + * unhealthy states are detected and alerted on quickly. + * @type \Google\Cloud\Monitoring\V3\AlertPolicy\Condition\Trigger $trigger + * The number/percent of time series for which the comparison must hold + * in order for the condition to trigger. If unspecified, then the + * condition will trigger if the comparison is true for any of the + * time series that have been identified by `filter` and `aggregations`, + * or by the ratio, if `denominator_filter` and `denominator_aggregations` + * are specified. + * @type int $evaluation_missing_data + * A condition control that determines how metric-threshold conditions + * are evaluated when data stops arriving. To use this control, the value + * of the `duration` field must be greater than or equal to 60 seconds. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\Alert::initOnce(); + parent::__construct($data); + } + + /** + * Required. A + * [filter](https://cloud.google.com/monitoring/api/v3/filters) that + * identifies which time series should be compared with the threshold. + * The filter is similar to the one that is specified in the + * [`ListTimeSeries` + * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list) + * (that call is useful to verify the time series that will be retrieved / + * processed). The filter must specify the metric type and the resource + * type. Optionally, it can specify resource labels and metric labels. + * This field must not exceed 2048 Unicode characters in length. + * + * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Required. A + * [filter](https://cloud.google.com/monitoring/api/v3/filters) that + * identifies which time series should be compared with the threshold. + * The filter is similar to the one that is specified in the + * [`ListTimeSeries` + * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list) + * (that call is useful to verify the time series that will be retrieved / + * processed). The filter must specify the metric type and the resource + * type. Optionally, it can specify resource labels and metric labels. + * This field must not exceed 2048 Unicode characters in length. + * + * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Specifies the alignment of data points in individual time series as + * well as how to combine the retrieved time series together (such as + * when aggregating multiple streams on each resource to a single + * stream for each resource or when aggregating streams across all + * members of a group of resources). Multiple aggregations + * are applied in the order specified. + * This field is similar to the one in the [`ListTimeSeries` + * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list). + * It is advisable to use the `ListTimeSeries` method when debugging this + * field. + * + * Generated from protobuf field repeated .google.monitoring.v3.Aggregation aggregations = 8; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAggregations() + { + return $this->aggregations; + } + + /** + * Specifies the alignment of data points in individual time series as + * well as how to combine the retrieved time series together (such as + * when aggregating multiple streams on each resource to a single + * stream for each resource or when aggregating streams across all + * members of a group of resources). Multiple aggregations + * are applied in the order specified. + * This field is similar to the one in the [`ListTimeSeries` + * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list). + * It is advisable to use the `ListTimeSeries` method when debugging this + * field. + * + * Generated from protobuf field repeated .google.monitoring.v3.Aggregation aggregations = 8; + * @param array<\Google\Cloud\Monitoring\V3\Aggregation>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAggregations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Monitoring\V3\Aggregation::class); + $this->aggregations = $arr; + + return $this; + } + + /** + * A [filter](https://cloud.google.com/monitoring/api/v3/filters) that + * identifies a time series that should be used as the denominator of a + * ratio that will be compared with the threshold. If a + * `denominator_filter` is specified, the time series specified by the + * `filter` field will be used as the numerator. + * The filter must specify the metric type and optionally may contain + * restrictions on resource type, resource labels, and metric labels. + * This field may not exceed 2048 Unicode characters in length. + * + * Generated from protobuf field string denominator_filter = 9; + * @return string + */ + public function getDenominatorFilter() + { + return $this->denominator_filter; + } + + /** + * A [filter](https://cloud.google.com/monitoring/api/v3/filters) that + * identifies a time series that should be used as the denominator of a + * ratio that will be compared with the threshold. If a + * `denominator_filter` is specified, the time series specified by the + * `filter` field will be used as the numerator. + * The filter must specify the metric type and optionally may contain + * restrictions on resource type, resource labels, and metric labels. + * This field may not exceed 2048 Unicode characters in length. + * + * Generated from protobuf field string denominator_filter = 9; + * @param string $var + * @return $this + */ + public function setDenominatorFilter($var) + { + GPBUtil::checkString($var, True); + $this->denominator_filter = $var; + + return $this; + } + + /** + * Specifies the alignment of data points in individual time series + * selected by `denominatorFilter` as + * well as how to combine the retrieved time series together (such as + * when aggregating multiple streams on each resource to a single + * stream for each resource or when aggregating streams across all + * members of a group of resources). + * When computing ratios, the `aggregations` and + * `denominator_aggregations` fields must use the same alignment period + * and produce time series that have the same periodicity and labels. + * + * Generated from protobuf field repeated .google.monitoring.v3.Aggregation denominator_aggregations = 10; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDenominatorAggregations() + { + return $this->denominator_aggregations; + } + + /** + * Specifies the alignment of data points in individual time series + * selected by `denominatorFilter` as + * well as how to combine the retrieved time series together (such as + * when aggregating multiple streams on each resource to a single + * stream for each resource or when aggregating streams across all + * members of a group of resources). + * When computing ratios, the `aggregations` and + * `denominator_aggregations` fields must use the same alignment period + * and produce time series that have the same periodicity and labels. + * + * Generated from protobuf field repeated .google.monitoring.v3.Aggregation denominator_aggregations = 10; + * @param array<\Google\Cloud\Monitoring\V3\Aggregation>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDenominatorAggregations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Monitoring\V3\Aggregation::class); + $this->denominator_aggregations = $arr; + + return $this; + } + + /** + * When this field is present, the `MetricThreshold` condition forecasts + * whether the time series is predicted to violate the threshold within + * the `forecast_horizon`. When this field is not set, the + * `MetricThreshold` tests the current value of the timeseries against the + * threshold. + * + * Generated from protobuf field .google.monitoring.v3.AlertPolicy.Condition.MetricThreshold.ForecastOptions forecast_options = 12; + * @return \Google\Cloud\Monitoring\V3\AlertPolicy\Condition\MetricThreshold\ForecastOptions|null + */ + public function getForecastOptions() + { + return $this->forecast_options; + } + + public function hasForecastOptions() + { + return isset($this->forecast_options); + } + + public function clearForecastOptions() + { + unset($this->forecast_options); + } + + /** + * When this field is present, the `MetricThreshold` condition forecasts + * whether the time series is predicted to violate the threshold within + * the `forecast_horizon`. When this field is not set, the + * `MetricThreshold` tests the current value of the timeseries against the + * threshold. + * + * Generated from protobuf field .google.monitoring.v3.AlertPolicy.Condition.MetricThreshold.ForecastOptions forecast_options = 12; + * @param \Google\Cloud\Monitoring\V3\AlertPolicy\Condition\MetricThreshold\ForecastOptions $var + * @return $this + */ + public function setForecastOptions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\AlertPolicy\Condition\MetricThreshold\ForecastOptions::class); + $this->forecast_options = $var; + + return $this; + } + + /** + * The comparison to apply between the time series (indicated by `filter` + * and `aggregation`) and the threshold (indicated by `threshold_value`). + * The comparison is applied on each time series, with the time series + * on the left-hand side and the threshold on the right-hand side. + * Only `COMPARISON_LT` and `COMPARISON_GT` are supported currently. + * + * Generated from protobuf field .google.monitoring.v3.ComparisonType comparison = 4; + * @return int + */ + public function getComparison() + { + return $this->comparison; + } + + /** + * The comparison to apply between the time series (indicated by `filter` + * and `aggregation`) and the threshold (indicated by `threshold_value`). + * The comparison is applied on each time series, with the time series + * on the left-hand side and the threshold on the right-hand side. + * Only `COMPARISON_LT` and `COMPARISON_GT` are supported currently. + * + * Generated from protobuf field .google.monitoring.v3.ComparisonType comparison = 4; + * @param int $var + * @return $this + */ + public function setComparison($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Monitoring\V3\ComparisonType::class); + $this->comparison = $var; + + return $this; + } + + /** + * A value against which to compare the time series. + * + * Generated from protobuf field double threshold_value = 5; + * @return float + */ + public function getThresholdValue() + { + return $this->threshold_value; + } + + /** + * A value against which to compare the time series. + * + * Generated from protobuf field double threshold_value = 5; + * @param float $var + * @return $this + */ + public function setThresholdValue($var) + { + GPBUtil::checkDouble($var); + $this->threshold_value = $var; + + return $this; + } + + /** + * The amount of time that a time series must violate the + * threshold to be considered failing. Currently, only values + * that are a multiple of a minute--e.g., 0, 60, 120, or 300 + * seconds--are supported. If an invalid value is given, an + * error will be returned. When choosing a duration, it is useful to + * keep in mind the frequency of the underlying time series data + * (which may also be affected by any alignments specified in the + * `aggregations` field); a good duration is long enough so that a single + * outlier does not generate spurious alerts, but short enough that + * unhealthy states are detected and alerted on quickly. + * + * Generated from protobuf field .google.protobuf.Duration duration = 6; + * @return \Google\Protobuf\Duration|null + */ + public function getDuration() + { + return $this->duration; + } + + public function hasDuration() + { + return isset($this->duration); + } + + public function clearDuration() + { + unset($this->duration); + } + + /** + * The amount of time that a time series must violate the + * threshold to be considered failing. Currently, only values + * that are a multiple of a minute--e.g., 0, 60, 120, or 300 + * seconds--are supported. If an invalid value is given, an + * error will be returned. When choosing a duration, it is useful to + * keep in mind the frequency of the underlying time series data + * (which may also be affected by any alignments specified in the + * `aggregations` field); a good duration is long enough so that a single + * outlier does not generate spurious alerts, but short enough that + * unhealthy states are detected and alerted on quickly. + * + * Generated from protobuf field .google.protobuf.Duration duration = 6; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->duration = $var; + + return $this; + } + + /** + * The number/percent of time series for which the comparison must hold + * in order for the condition to trigger. If unspecified, then the + * condition will trigger if the comparison is true for any of the + * time series that have been identified by `filter` and `aggregations`, + * or by the ratio, if `denominator_filter` and `denominator_aggregations` + * are specified. + * + * Generated from protobuf field .google.monitoring.v3.AlertPolicy.Condition.Trigger trigger = 7; + * @return \Google\Cloud\Monitoring\V3\AlertPolicy\Condition\Trigger|null + */ + public function getTrigger() + { + return $this->trigger; + } + + public function hasTrigger() + { + return isset($this->trigger); + } + + public function clearTrigger() + { + unset($this->trigger); + } + + /** + * The number/percent of time series for which the comparison must hold + * in order for the condition to trigger. If unspecified, then the + * condition will trigger if the comparison is true for any of the + * time series that have been identified by `filter` and `aggregations`, + * or by the ratio, if `denominator_filter` and `denominator_aggregations` + * are specified. + * + * Generated from protobuf field .google.monitoring.v3.AlertPolicy.Condition.Trigger trigger = 7; + * @param \Google\Cloud\Monitoring\V3\AlertPolicy\Condition\Trigger $var + * @return $this + */ + public function setTrigger($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\AlertPolicy\Condition\Trigger::class); + $this->trigger = $var; + + return $this; + } + + /** + * A condition control that determines how metric-threshold conditions + * are evaluated when data stops arriving. To use this control, the value + * of the `duration` field must be greater than or equal to 60 seconds. + * + * Generated from protobuf field .google.monitoring.v3.AlertPolicy.Condition.EvaluationMissingData evaluation_missing_data = 11; + * @return int + */ + public function getEvaluationMissingData() + { + return $this->evaluation_missing_data; + } + + /** + * A condition control that determines how metric-threshold conditions + * are evaluated when data stops arriving. To use this control, the value + * of the `duration` field must be greater than or equal to 60 seconds. + * + * Generated from protobuf field .google.monitoring.v3.AlertPolicy.Condition.EvaluationMissingData evaluation_missing_data = 11; + * @param int $var + * @return $this + */ + public function setEvaluationMissingData($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Monitoring\V3\AlertPolicy\Condition\EvaluationMissingData::class); + $this->evaluation_missing_data = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(MetricThreshold::class, \Google\Cloud\Monitoring\V3\AlertPolicy_Condition_MetricThreshold::class); + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/Condition/MetricThreshold/ForecastOptions.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/Condition/MetricThreshold/ForecastOptions.php new file mode 100644 index 000000000000..5b730b5b812c --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/Condition/MetricThreshold/ForecastOptions.php @@ -0,0 +1,101 @@ +google.monitoring.v3.AlertPolicy.Condition.MetricThreshold.ForecastOptions + */ +class ForecastOptions extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The length of time into the future to forecast whether a + * time series will violate the threshold. If the predicted value is + * found to violate the threshold, and the violation is observed in all + * forecasts made for the configured `duration`, then the time series is + * considered to be failing. + * The forecast horizon can range from 1 hour to 60 hours. + * + * Generated from protobuf field .google.protobuf.Duration forecast_horizon = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $forecast_horizon = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Duration $forecast_horizon + * Required. The length of time into the future to forecast whether a + * time series will violate the threshold. If the predicted value is + * found to violate the threshold, and the violation is observed in all + * forecasts made for the configured `duration`, then the time series is + * considered to be failing. + * The forecast horizon can range from 1 hour to 60 hours. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\Alert::initOnce(); + parent::__construct($data); + } + + /** + * Required. The length of time into the future to forecast whether a + * time series will violate the threshold. If the predicted value is + * found to violate the threshold, and the violation is observed in all + * forecasts made for the configured `duration`, then the time series is + * considered to be failing. + * The forecast horizon can range from 1 hour to 60 hours. + * + * Generated from protobuf field .google.protobuf.Duration forecast_horizon = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Duration|null + */ + public function getForecastHorizon() + { + return $this->forecast_horizon; + } + + public function hasForecastHorizon() + { + return isset($this->forecast_horizon); + } + + public function clearForecastHorizon() + { + unset($this->forecast_horizon); + } + + /** + * Required. The length of time into the future to forecast whether a + * time series will violate the threshold. If the predicted value is + * found to violate the threshold, and the violation is observed in all + * forecasts made for the configured `duration`, then the time series is + * considered to be failing. + * The forecast horizon can range from 1 hour to 60 hours. + * + * Generated from protobuf field .google.protobuf.Duration forecast_horizon = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setForecastHorizon($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->forecast_horizon = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ForecastOptions::class, \Google\Cloud\Monitoring\V3\AlertPolicy_Condition_MetricThreshold_ForecastOptions::class); + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/Condition/MonitoringQueryLanguageCondition.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/Condition/MonitoringQueryLanguageCondition.php new file mode 100644 index 000000000000..22bb059fe5b0 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/Condition/MonitoringQueryLanguageCondition.php @@ -0,0 +1,257 @@ +google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition + */ +class MonitoringQueryLanguageCondition extends \Google\Protobuf\Internal\Message +{ + /** + * [Monitoring Query Language](https://cloud.google.com/monitoring/mql) + * query that outputs a boolean stream. + * + * Generated from protobuf field string query = 1; + */ + protected $query = ''; + /** + * The amount of time that a time series must violate the + * threshold to be considered failing. Currently, only values + * that are a multiple of a minute--e.g., 0, 60, 120, or 300 + * seconds--are supported. If an invalid value is given, an + * error will be returned. When choosing a duration, it is useful to + * keep in mind the frequency of the underlying time series data + * (which may also be affected by any alignments specified in the + * `aggregations` field); a good duration is long enough so that a single + * outlier does not generate spurious alerts, but short enough that + * unhealthy states are detected and alerted on quickly. + * + * Generated from protobuf field .google.protobuf.Duration duration = 2; + */ + protected $duration = null; + /** + * The number/percent of time series for which the comparison must hold + * in order for the condition to trigger. If unspecified, then the + * condition will trigger if the comparison is true for any of the + * time series that have been identified by `filter` and `aggregations`, + * or by the ratio, if `denominator_filter` and `denominator_aggregations` + * are specified. + * + * Generated from protobuf field .google.monitoring.v3.AlertPolicy.Condition.Trigger trigger = 3; + */ + protected $trigger = null; + /** + * A condition control that determines how metric-threshold conditions + * are evaluated when data stops arriving. + * + * Generated from protobuf field .google.monitoring.v3.AlertPolicy.Condition.EvaluationMissingData evaluation_missing_data = 4; + */ + protected $evaluation_missing_data = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $query + * [Monitoring Query Language](https://cloud.google.com/monitoring/mql) + * query that outputs a boolean stream. + * @type \Google\Protobuf\Duration $duration + * The amount of time that a time series must violate the + * threshold to be considered failing. Currently, only values + * that are a multiple of a minute--e.g., 0, 60, 120, or 300 + * seconds--are supported. If an invalid value is given, an + * error will be returned. When choosing a duration, it is useful to + * keep in mind the frequency of the underlying time series data + * (which may also be affected by any alignments specified in the + * `aggregations` field); a good duration is long enough so that a single + * outlier does not generate spurious alerts, but short enough that + * unhealthy states are detected and alerted on quickly. + * @type \Google\Cloud\Monitoring\V3\AlertPolicy\Condition\Trigger $trigger + * The number/percent of time series for which the comparison must hold + * in order for the condition to trigger. If unspecified, then the + * condition will trigger if the comparison is true for any of the + * time series that have been identified by `filter` and `aggregations`, + * or by the ratio, if `denominator_filter` and `denominator_aggregations` + * are specified. + * @type int $evaluation_missing_data + * A condition control that determines how metric-threshold conditions + * are evaluated when data stops arriving. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\Alert::initOnce(); + parent::__construct($data); + } + + /** + * [Monitoring Query Language](https://cloud.google.com/monitoring/mql) + * query that outputs a boolean stream. + * + * Generated from protobuf field string query = 1; + * @return string + */ + public function getQuery() + { + return $this->query; + } + + /** + * [Monitoring Query Language](https://cloud.google.com/monitoring/mql) + * query that outputs a boolean stream. + * + * Generated from protobuf field string query = 1; + * @param string $var + * @return $this + */ + public function setQuery($var) + { + GPBUtil::checkString($var, True); + $this->query = $var; + + return $this; + } + + /** + * The amount of time that a time series must violate the + * threshold to be considered failing. Currently, only values + * that are a multiple of a minute--e.g., 0, 60, 120, or 300 + * seconds--are supported. If an invalid value is given, an + * error will be returned. When choosing a duration, it is useful to + * keep in mind the frequency of the underlying time series data + * (which may also be affected by any alignments specified in the + * `aggregations` field); a good duration is long enough so that a single + * outlier does not generate spurious alerts, but short enough that + * unhealthy states are detected and alerted on quickly. + * + * Generated from protobuf field .google.protobuf.Duration duration = 2; + * @return \Google\Protobuf\Duration|null + */ + public function getDuration() + { + return $this->duration; + } + + public function hasDuration() + { + return isset($this->duration); + } + + public function clearDuration() + { + unset($this->duration); + } + + /** + * The amount of time that a time series must violate the + * threshold to be considered failing. Currently, only values + * that are a multiple of a minute--e.g., 0, 60, 120, or 300 + * seconds--are supported. If an invalid value is given, an + * error will be returned. When choosing a duration, it is useful to + * keep in mind the frequency of the underlying time series data + * (which may also be affected by any alignments specified in the + * `aggregations` field); a good duration is long enough so that a single + * outlier does not generate spurious alerts, but short enough that + * unhealthy states are detected and alerted on quickly. + * + * Generated from protobuf field .google.protobuf.Duration duration = 2; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->duration = $var; + + return $this; + } + + /** + * The number/percent of time series for which the comparison must hold + * in order for the condition to trigger. If unspecified, then the + * condition will trigger if the comparison is true for any of the + * time series that have been identified by `filter` and `aggregations`, + * or by the ratio, if `denominator_filter` and `denominator_aggregations` + * are specified. + * + * Generated from protobuf field .google.monitoring.v3.AlertPolicy.Condition.Trigger trigger = 3; + * @return \Google\Cloud\Monitoring\V3\AlertPolicy\Condition\Trigger|null + */ + public function getTrigger() + { + return $this->trigger; + } + + public function hasTrigger() + { + return isset($this->trigger); + } + + public function clearTrigger() + { + unset($this->trigger); + } + + /** + * The number/percent of time series for which the comparison must hold + * in order for the condition to trigger. If unspecified, then the + * condition will trigger if the comparison is true for any of the + * time series that have been identified by `filter` and `aggregations`, + * or by the ratio, if `denominator_filter` and `denominator_aggregations` + * are specified. + * + * Generated from protobuf field .google.monitoring.v3.AlertPolicy.Condition.Trigger trigger = 3; + * @param \Google\Cloud\Monitoring\V3\AlertPolicy\Condition\Trigger $var + * @return $this + */ + public function setTrigger($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\AlertPolicy\Condition\Trigger::class); + $this->trigger = $var; + + return $this; + } + + /** + * A condition control that determines how metric-threshold conditions + * are evaluated when data stops arriving. + * + * Generated from protobuf field .google.monitoring.v3.AlertPolicy.Condition.EvaluationMissingData evaluation_missing_data = 4; + * @return int + */ + public function getEvaluationMissingData() + { + return $this->evaluation_missing_data; + } + + /** + * A condition control that determines how metric-threshold conditions + * are evaluated when data stops arriving. + * + * Generated from protobuf field .google.monitoring.v3.AlertPolicy.Condition.EvaluationMissingData evaluation_missing_data = 4; + * @param int $var + * @return $this + */ + public function setEvaluationMissingData($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Monitoring\V3\AlertPolicy\Condition\EvaluationMissingData::class); + $this->evaluation_missing_data = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(MonitoringQueryLanguageCondition::class, \Google\Cloud\Monitoring\V3\AlertPolicy_Condition_MonitoringQueryLanguageCondition::class); + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/Condition/PrometheusQueryLanguageCondition.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/Condition/PrometheusQueryLanguageCondition.php new file mode 100644 index 000000000000..6fe5be4207c8 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/Condition/PrometheusQueryLanguageCondition.php @@ -0,0 +1,433 @@ +google.monitoring.v3.AlertPolicy.Condition.PrometheusQueryLanguageCondition + */ +class PrometheusQueryLanguageCondition extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The PromQL expression to evaluate. Every evaluation cycle + * this expression is evaluated at the current time, and all resultant + * time series become pending/firing alerts. This field must not be empty. + * + * Generated from protobuf field string query = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $query = ''; + /** + * Optional. Alerts are considered firing once their PromQL expression was + * evaluated to be "true" for this long. + * Alerts whose PromQL expression was not evaluated to be "true" for + * long enough are considered pending. + * Must be a non-negative duration or missing. + * This field is optional. Its default value is zero. + * + * Generated from protobuf field .google.protobuf.Duration duration = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $duration = null; + /** + * Optional. How often this rule should be evaluated. + * Must be a positive multiple of 30 seconds or missing. + * This field is optional. Its default value is 30 seconds. + * If this PrometheusQueryLanguageCondition was generated from a + * Prometheus alerting rule, then this value should be taken from the + * enclosing rule group. + * + * Generated from protobuf field .google.protobuf.Duration evaluation_interval = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $evaluation_interval = null; + /** + * Optional. Labels to add to or overwrite in the PromQL query result. + * Label names [must be + * valid](https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels). + * Label values can be [templatized by using + * variables](https://cloud.google.com/monitoring/alerts/doc-variables#doc-vars). + * The only available variable names are the names of the labels in the + * PromQL result, including "__name__" and "value". "labels" may be empty. + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Optional. The rule group name of this alert in the corresponding + * Prometheus configuration file. + * Some external tools may require this field to be populated correctly + * in order to refer to the original Prometheus configuration file. + * The rule group name and the alert name are necessary to update the + * relevant AlertPolicies in case the definition of the rule group changes + * in the future. + * This field is optional. If this field is not empty, then it must + * contain a valid UTF-8 string. + * This field may not exceed 2048 Unicode characters in length. + * + * Generated from protobuf field string rule_group = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $rule_group = ''; + /** + * Optional. The alerting rule name of this alert in the corresponding + * Prometheus configuration file. + * Some external tools may require this field to be populated correctly + * in order to refer to the original Prometheus configuration file. + * The rule group name and the alert name are necessary to update the + * relevant AlertPolicies in case the definition of the rule group changes + * in the future. + * This field is optional. If this field is not empty, then it must be a + * [valid Prometheus label + * name](https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels). + * This field may not exceed 2048 Unicode characters in length. + * + * Generated from protobuf field string alert_rule = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $alert_rule = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $query + * Required. The PromQL expression to evaluate. Every evaluation cycle + * this expression is evaluated at the current time, and all resultant + * time series become pending/firing alerts. This field must not be empty. + * @type \Google\Protobuf\Duration $duration + * Optional. Alerts are considered firing once their PromQL expression was + * evaluated to be "true" for this long. + * Alerts whose PromQL expression was not evaluated to be "true" for + * long enough are considered pending. + * Must be a non-negative duration or missing. + * This field is optional. Its default value is zero. + * @type \Google\Protobuf\Duration $evaluation_interval + * Optional. How often this rule should be evaluated. + * Must be a positive multiple of 30 seconds or missing. + * This field is optional. Its default value is 30 seconds. + * If this PrometheusQueryLanguageCondition was generated from a + * Prometheus alerting rule, then this value should be taken from the + * enclosing rule group. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. Labels to add to or overwrite in the PromQL query result. + * Label names [must be + * valid](https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels). + * Label values can be [templatized by using + * variables](https://cloud.google.com/monitoring/alerts/doc-variables#doc-vars). + * The only available variable names are the names of the labels in the + * PromQL result, including "__name__" and "value". "labels" may be empty. + * @type string $rule_group + * Optional. The rule group name of this alert in the corresponding + * Prometheus configuration file. + * Some external tools may require this field to be populated correctly + * in order to refer to the original Prometheus configuration file. + * The rule group name and the alert name are necessary to update the + * relevant AlertPolicies in case the definition of the rule group changes + * in the future. + * This field is optional. If this field is not empty, then it must + * contain a valid UTF-8 string. + * This field may not exceed 2048 Unicode characters in length. + * @type string $alert_rule + * Optional. The alerting rule name of this alert in the corresponding + * Prometheus configuration file. + * Some external tools may require this field to be populated correctly + * in order to refer to the original Prometheus configuration file. + * The rule group name and the alert name are necessary to update the + * relevant AlertPolicies in case the definition of the rule group changes + * in the future. + * This field is optional. If this field is not empty, then it must be a + * [valid Prometheus label + * name](https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels). + * This field may not exceed 2048 Unicode characters in length. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\Alert::initOnce(); + parent::__construct($data); + } + + /** + * Required. The PromQL expression to evaluate. Every evaluation cycle + * this expression is evaluated at the current time, and all resultant + * time series become pending/firing alerts. This field must not be empty. + * + * Generated from protobuf field string query = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getQuery() + { + return $this->query; + } + + /** + * Required. The PromQL expression to evaluate. Every evaluation cycle + * this expression is evaluated at the current time, and all resultant + * time series become pending/firing alerts. This field must not be empty. + * + * Generated from protobuf field string query = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setQuery($var) + { + GPBUtil::checkString($var, True); + $this->query = $var; + + return $this; + } + + /** + * Optional. Alerts are considered firing once their PromQL expression was + * evaluated to be "true" for this long. + * Alerts whose PromQL expression was not evaluated to be "true" for + * long enough are considered pending. + * Must be a non-negative duration or missing. + * This field is optional. Its default value is zero. + * + * Generated from protobuf field .google.protobuf.Duration duration = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Duration|null + */ + public function getDuration() + { + return $this->duration; + } + + public function hasDuration() + { + return isset($this->duration); + } + + public function clearDuration() + { + unset($this->duration); + } + + /** + * Optional. Alerts are considered firing once their PromQL expression was + * evaluated to be "true" for this long. + * Alerts whose PromQL expression was not evaluated to be "true" for + * long enough are considered pending. + * Must be a non-negative duration or missing. + * This field is optional. Its default value is zero. + * + * Generated from protobuf field .google.protobuf.Duration duration = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->duration = $var; + + return $this; + } + + /** + * Optional. How often this rule should be evaluated. + * Must be a positive multiple of 30 seconds or missing. + * This field is optional. Its default value is 30 seconds. + * If this PrometheusQueryLanguageCondition was generated from a + * Prometheus alerting rule, then this value should be taken from the + * enclosing rule group. + * + * Generated from protobuf field .google.protobuf.Duration evaluation_interval = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Duration|null + */ + public function getEvaluationInterval() + { + return $this->evaluation_interval; + } + + public function hasEvaluationInterval() + { + return isset($this->evaluation_interval); + } + + public function clearEvaluationInterval() + { + unset($this->evaluation_interval); + } + + /** + * Optional. How often this rule should be evaluated. + * Must be a positive multiple of 30 seconds or missing. + * This field is optional. Its default value is 30 seconds. + * If this PrometheusQueryLanguageCondition was generated from a + * Prometheus alerting rule, then this value should be taken from the + * enclosing rule group. + * + * Generated from protobuf field .google.protobuf.Duration evaluation_interval = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setEvaluationInterval($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->evaluation_interval = $var; + + return $this; + } + + /** + * Optional. Labels to add to or overwrite in the PromQL query result. + * Label names [must be + * valid](https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels). + * Label values can be [templatized by using + * variables](https://cloud.google.com/monitoring/alerts/doc-variables#doc-vars). + * The only available variable names are the names of the labels in the + * PromQL result, including "__name__" and "value". "labels" may be empty. + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. Labels to add to or overwrite in the PromQL query result. + * Label names [must be + * valid](https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels). + * Label values can be [templatized by using + * variables](https://cloud.google.com/monitoring/alerts/doc-variables#doc-vars). + * The only available variable names are the names of the labels in the + * PromQL result, including "__name__" and "value". "labels" may be empty. + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Optional. The rule group name of this alert in the corresponding + * Prometheus configuration file. + * Some external tools may require this field to be populated correctly + * in order to refer to the original Prometheus configuration file. + * The rule group name and the alert name are necessary to update the + * relevant AlertPolicies in case the definition of the rule group changes + * in the future. + * This field is optional. If this field is not empty, then it must + * contain a valid UTF-8 string. + * This field may not exceed 2048 Unicode characters in length. + * + * Generated from protobuf field string rule_group = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRuleGroup() + { + return $this->rule_group; + } + + /** + * Optional. The rule group name of this alert in the corresponding + * Prometheus configuration file. + * Some external tools may require this field to be populated correctly + * in order to refer to the original Prometheus configuration file. + * The rule group name and the alert name are necessary to update the + * relevant AlertPolicies in case the definition of the rule group changes + * in the future. + * This field is optional. If this field is not empty, then it must + * contain a valid UTF-8 string. + * This field may not exceed 2048 Unicode characters in length. + * + * Generated from protobuf field string rule_group = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRuleGroup($var) + { + GPBUtil::checkString($var, True); + $this->rule_group = $var; + + return $this; + } + + /** + * Optional. The alerting rule name of this alert in the corresponding + * Prometheus configuration file. + * Some external tools may require this field to be populated correctly + * in order to refer to the original Prometheus configuration file. + * The rule group name and the alert name are necessary to update the + * relevant AlertPolicies in case the definition of the rule group changes + * in the future. + * This field is optional. If this field is not empty, then it must be a + * [valid Prometheus label + * name](https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels). + * This field may not exceed 2048 Unicode characters in length. + * + * Generated from protobuf field string alert_rule = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getAlertRule() + { + return $this->alert_rule; + } + + /** + * Optional. The alerting rule name of this alert in the corresponding + * Prometheus configuration file. + * Some external tools may require this field to be populated correctly + * in order to refer to the original Prometheus configuration file. + * The rule group name and the alert name are necessary to update the + * relevant AlertPolicies in case the definition of the rule group changes + * in the future. + * This field is optional. If this field is not empty, then it must be a + * [valid Prometheus label + * name](https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels). + * This field may not exceed 2048 Unicode characters in length. + * + * Generated from protobuf field string alert_rule = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setAlertRule($var) + { + GPBUtil::checkString($var, True); + $this->alert_rule = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(PrometheusQueryLanguageCondition::class, \Google\Cloud\Monitoring\V3\AlertPolicy_Condition_PrometheusQueryLanguageCondition::class); + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/Condition/Trigger.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/Condition/Trigger.php new file mode 100644 index 000000000000..8daaca29380f --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/Condition/Trigger.php @@ -0,0 +1,118 @@ +google.monitoring.v3.AlertPolicy.Condition.Trigger + */ +class Trigger extends \Google\Protobuf\Internal\Message +{ + protected $type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $count + * The absolute number of time series that must fail + * the predicate for the condition to be triggered. + * @type float $percent + * The percentage of time series that must fail the + * predicate for the condition to be triggered. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\Alert::initOnce(); + parent::__construct($data); + } + + /** + * The absolute number of time series that must fail + * the predicate for the condition to be triggered. + * + * Generated from protobuf field int32 count = 1; + * @return int + */ + public function getCount() + { + return $this->readOneof(1); + } + + public function hasCount() + { + return $this->hasOneof(1); + } + + /** + * The absolute number of time series that must fail + * the predicate for the condition to be triggered. + * + * Generated from protobuf field int32 count = 1; + * @param int $var + * @return $this + */ + public function setCount($var) + { + GPBUtil::checkInt32($var); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * The percentage of time series that must fail the + * predicate for the condition to be triggered. + * + * Generated from protobuf field double percent = 2; + * @return float + */ + public function getPercent() + { + return $this->readOneof(2); + } + + public function hasPercent() + { + return $this->hasOneof(2); + } + + /** + * The percentage of time series that must fail the + * predicate for the condition to be triggered. + * + * Generated from protobuf field double percent = 2; + * @param float $var + * @return $this + */ + public function setPercent($var) + { + GPBUtil::checkDouble($var); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getType() + { + return $this->whichOneof("type"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Trigger::class, \Google\Cloud\Monitoring\V3\AlertPolicy_Condition_Trigger::class); + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/ConditionCombinerType.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/ConditionCombinerType.php new file mode 100644 index 000000000000..bb9e016f4bd9 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/ConditionCombinerType.php @@ -0,0 +1,81 @@ +google.monitoring.v3.AlertPolicy.ConditionCombinerType + */ +class ConditionCombinerType +{ + /** + * An unspecified combiner. + * + * Generated from protobuf enum COMBINE_UNSPECIFIED = 0; + */ + const COMBINE_UNSPECIFIED = 0; + /** + * Combine conditions using the logical `AND` operator. An + * incident is created only if all the conditions are met + * simultaneously. This combiner is satisfied if all conditions are + * met, even if they are met on completely different resources. + * + * Generated from protobuf enum AND = 1; + */ + const PBAND = 1; + /** + * Combine conditions using the logical `OR` operator. An incident + * is created if any of the listed conditions is met. + * + * Generated from protobuf enum OR = 2; + */ + const PBOR = 2; + /** + * Combine conditions using logical `AND` operator, but unlike the regular + * `AND` option, an incident is created only if all conditions are met + * simultaneously on at least one resource. + * + * Generated from protobuf enum AND_WITH_MATCHING_RESOURCE = 3; + */ + const AND_WITH_MATCHING_RESOURCE = 3; + + private static $valueToName = [ + self::COMBINE_UNSPECIFIED => 'COMBINE_UNSPECIFIED', + self::PBAND => 'AND', + self::PBOR => 'OR', + self::AND_WITH_MATCHING_RESOURCE => 'AND_WITH_MATCHING_RESOURCE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + $pbconst = __CLASS__. '::PB' . strtoupper($name); + if (!defined($pbconst)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($pbconst); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ConditionCombinerType::class, \Google\Cloud\Monitoring\V3\AlertPolicy_ConditionCombinerType::class); + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/Documentation.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/Documentation.php new file mode 100644 index 000000000000..19c93b5e2dff --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/Documentation.php @@ -0,0 +1,245 @@ +google.monitoring.v3.AlertPolicy.Documentation + */ +class Documentation extends \Google\Protobuf\Internal\Message +{ + /** + * The body of the documentation, interpreted according to `mime_type`. + * The content may not exceed 8,192 Unicode characters and may not exceed + * more than 10,240 bytes when encoded in UTF-8 format, whichever is + * smaller. This text can be [templatized by using + * variables](https://cloud.google.com/monitoring/alerts/doc-variables#doc-vars). + * + * Generated from protobuf field string content = 1; + */ + protected $content = ''; + /** + * The format of the `content` field. Presently, only the value + * `"text/markdown"` is supported. See + * [Markdown](https://en.wikipedia.org/wiki/Markdown) for more information. + * + * Generated from protobuf field string mime_type = 2; + */ + protected $mime_type = ''; + /** + * Optional. The subject line of the notification. The subject line may not + * exceed 10,240 bytes. In notifications generated by this policy, the + * contents of the subject line after variable expansion will be truncated + * to 255 bytes or shorter at the latest UTF-8 character boundary. The + * 255-byte limit is recommended by [this + * thread](https://stackoverflow.com/questions/1592291/what-is-the-email-subject-length-limit). + * It is both the limit imposed by some third-party ticketing products and + * it is common to define textual fields in databases as VARCHAR(255). + * The contents of the subject line can be [templatized by using + * variables](https://cloud.google.com/monitoring/alerts/doc-variables#doc-vars). + * If this field is missing or empty, a default subject line will be + * generated. + * + * Generated from protobuf field string subject = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $subject = ''; + /** + * Optional. Links to content such as playbooks, repositories, and other + * resources. This field can contain up to 3 entries. + * + * Generated from protobuf field repeated .google.monitoring.v3.AlertPolicy.Documentation.Link links = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $links; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $content + * The body of the documentation, interpreted according to `mime_type`. + * The content may not exceed 8,192 Unicode characters and may not exceed + * more than 10,240 bytes when encoded in UTF-8 format, whichever is + * smaller. This text can be [templatized by using + * variables](https://cloud.google.com/monitoring/alerts/doc-variables#doc-vars). + * @type string $mime_type + * The format of the `content` field. Presently, only the value + * `"text/markdown"` is supported. See + * [Markdown](https://en.wikipedia.org/wiki/Markdown) for more information. + * @type string $subject + * Optional. The subject line of the notification. The subject line may not + * exceed 10,240 bytes. In notifications generated by this policy, the + * contents of the subject line after variable expansion will be truncated + * to 255 bytes or shorter at the latest UTF-8 character boundary. The + * 255-byte limit is recommended by [this + * thread](https://stackoverflow.com/questions/1592291/what-is-the-email-subject-length-limit). + * It is both the limit imposed by some third-party ticketing products and + * it is common to define textual fields in databases as VARCHAR(255). + * The contents of the subject line can be [templatized by using + * variables](https://cloud.google.com/monitoring/alerts/doc-variables#doc-vars). + * If this field is missing or empty, a default subject line will be + * generated. + * @type array<\Google\Cloud\Monitoring\V3\AlertPolicy\Documentation\Link>|\Google\Protobuf\Internal\RepeatedField $links + * Optional. Links to content such as playbooks, repositories, and other + * resources. This field can contain up to 3 entries. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\Alert::initOnce(); + parent::__construct($data); + } + + /** + * The body of the documentation, interpreted according to `mime_type`. + * The content may not exceed 8,192 Unicode characters and may not exceed + * more than 10,240 bytes when encoded in UTF-8 format, whichever is + * smaller. This text can be [templatized by using + * variables](https://cloud.google.com/monitoring/alerts/doc-variables#doc-vars). + * + * Generated from protobuf field string content = 1; + * @return string + */ + public function getContent() + { + return $this->content; + } + + /** + * The body of the documentation, interpreted according to `mime_type`. + * The content may not exceed 8,192 Unicode characters and may not exceed + * more than 10,240 bytes when encoded in UTF-8 format, whichever is + * smaller. This text can be [templatized by using + * variables](https://cloud.google.com/monitoring/alerts/doc-variables#doc-vars). + * + * Generated from protobuf field string content = 1; + * @param string $var + * @return $this + */ + public function setContent($var) + { + GPBUtil::checkString($var, True); + $this->content = $var; + + return $this; + } + + /** + * The format of the `content` field. Presently, only the value + * `"text/markdown"` is supported. See + * [Markdown](https://en.wikipedia.org/wiki/Markdown) for more information. + * + * Generated from protobuf field string mime_type = 2; + * @return string + */ + public function getMimeType() + { + return $this->mime_type; + } + + /** + * The format of the `content` field. Presently, only the value + * `"text/markdown"` is supported. See + * [Markdown](https://en.wikipedia.org/wiki/Markdown) for more information. + * + * Generated from protobuf field string mime_type = 2; + * @param string $var + * @return $this + */ + public function setMimeType($var) + { + GPBUtil::checkString($var, True); + $this->mime_type = $var; + + return $this; + } + + /** + * Optional. The subject line of the notification. The subject line may not + * exceed 10,240 bytes. In notifications generated by this policy, the + * contents of the subject line after variable expansion will be truncated + * to 255 bytes or shorter at the latest UTF-8 character boundary. The + * 255-byte limit is recommended by [this + * thread](https://stackoverflow.com/questions/1592291/what-is-the-email-subject-length-limit). + * It is both the limit imposed by some third-party ticketing products and + * it is common to define textual fields in databases as VARCHAR(255). + * The contents of the subject line can be [templatized by using + * variables](https://cloud.google.com/monitoring/alerts/doc-variables#doc-vars). + * If this field is missing or empty, a default subject line will be + * generated. + * + * Generated from protobuf field string subject = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getSubject() + { + return $this->subject; + } + + /** + * Optional. The subject line of the notification. The subject line may not + * exceed 10,240 bytes. In notifications generated by this policy, the + * contents of the subject line after variable expansion will be truncated + * to 255 bytes or shorter at the latest UTF-8 character boundary. The + * 255-byte limit is recommended by [this + * thread](https://stackoverflow.com/questions/1592291/what-is-the-email-subject-length-limit). + * It is both the limit imposed by some third-party ticketing products and + * it is common to define textual fields in databases as VARCHAR(255). + * The contents of the subject line can be [templatized by using + * variables](https://cloud.google.com/monitoring/alerts/doc-variables#doc-vars). + * If this field is missing or empty, a default subject line will be + * generated. + * + * Generated from protobuf field string subject = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setSubject($var) + { + GPBUtil::checkString($var, True); + $this->subject = $var; + + return $this; + } + + /** + * Optional. Links to content such as playbooks, repositories, and other + * resources. This field can contain up to 3 entries. + * + * Generated from protobuf field repeated .google.monitoring.v3.AlertPolicy.Documentation.Link links = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getLinks() + { + return $this->links; + } + + /** + * Optional. Links to content such as playbooks, repositories, and other + * resources. This field can contain up to 3 entries. + * + * Generated from protobuf field repeated .google.monitoring.v3.AlertPolicy.Documentation.Link links = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\Monitoring\V3\AlertPolicy\Documentation\Link>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setLinks($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Monitoring\V3\AlertPolicy\Documentation\Link::class); + $this->links = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Documentation::class, \Google\Cloud\Monitoring\V3\AlertPolicy_Documentation::class); + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/Documentation/Link.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/Documentation/Link.php new file mode 100644 index 000000000000..278b55932be5 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/Documentation/Link.php @@ -0,0 +1,124 @@ +google.monitoring.v3.AlertPolicy.Documentation.Link + */ +class Link extends \Google\Protobuf\Internal\Message +{ + /** + * A short display name for the link. The display name must not be empty + * or exceed 63 characters. Example: "playbook". + * + * Generated from protobuf field string display_name = 1; + */ + protected $display_name = ''; + /** + * The url of a webpage. + * A url can be templatized by using variables + * in the path or the query parameters. The total length of a URL should + * not exceed 2083 characters before and after variable expansion. + * Example: "https://my_domain.com/playbook?name=${resource.name}" + * + * Generated from protobuf field string url = 2; + */ + protected $url = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $display_name + * A short display name for the link. The display name must not be empty + * or exceed 63 characters. Example: "playbook". + * @type string $url + * The url of a webpage. + * A url can be templatized by using variables + * in the path or the query parameters. The total length of a URL should + * not exceed 2083 characters before and after variable expansion. + * Example: "https://my_domain.com/playbook?name=${resource.name}" + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\Alert::initOnce(); + parent::__construct($data); + } + + /** + * A short display name for the link. The display name must not be empty + * or exceed 63 characters. Example: "playbook". + * + * Generated from protobuf field string display_name = 1; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * A short display name for the link. The display name must not be empty + * or exceed 63 characters. Example: "playbook". + * + * Generated from protobuf field string display_name = 1; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * The url of a webpage. + * A url can be templatized by using variables + * in the path or the query parameters. The total length of a URL should + * not exceed 2083 characters before and after variable expansion. + * Example: "https://my_domain.com/playbook?name=${resource.name}" + * + * Generated from protobuf field string url = 2; + * @return string + */ + public function getUrl() + { + return $this->url; + } + + /** + * The url of a webpage. + * A url can be templatized by using variables + * in the path or the query parameters. The total length of a URL should + * not exceed 2083 characters before and after variable expansion. + * Example: "https://my_domain.com/playbook?name=${resource.name}" + * + * Generated from protobuf field string url = 2; + * @param string $var + * @return $this + */ + public function setUrl($var) + { + GPBUtil::checkString($var, True); + $this->url = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Link::class, \Google\Cloud\Monitoring\V3\AlertPolicy_Documentation_Link::class); + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/Severity.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/Severity.php new file mode 100644 index 000000000000..85808c4b4a58 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/Severity.php @@ -0,0 +1,75 @@ +google.monitoring.v3.AlertPolicy.Severity + */ +class Severity +{ + /** + * No severity is specified. This is the default value. + * + * Generated from protobuf enum SEVERITY_UNSPECIFIED = 0; + */ + const SEVERITY_UNSPECIFIED = 0; + /** + * This is the highest severity level. Use this if the problem could + * cause significant damage or downtime. + * + * Generated from protobuf enum CRITICAL = 1; + */ + const CRITICAL = 1; + /** + * This is the medium severity level. Use this if the problem could + * cause minor damage or downtime. + * + * Generated from protobuf enum ERROR = 2; + */ + const ERROR = 2; + /** + * This is the lowest severity level. Use this if the problem is not causing + * any damage or downtime, but could potentially lead to a problem in the + * future. + * + * Generated from protobuf enum WARNING = 3; + */ + const WARNING = 3; + + private static $valueToName = [ + self::SEVERITY_UNSPECIFIED => 'SEVERITY_UNSPECIFIED', + self::CRITICAL => 'CRITICAL', + self::ERROR => 'ERROR', + self::WARNING => 'WARNING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Severity::class, \Google\Cloud\Monitoring\V3\AlertPolicy_Severity::class); + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/BasicSli.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/BasicSli.php new file mode 100644 index 000000000000..5becfda99f47 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/BasicSli.php @@ -0,0 +1,269 @@ +google.monitoring.v3.BasicSli + */ +class BasicSli extends \Google\Protobuf\Internal\Message +{ + /** + * OPTIONAL: The set of RPCs to which this SLI is relevant. Telemetry from + * other methods will not be used to calculate performance for this SLI. If + * omitted, this SLI applies to all the Service's methods. For service types + * that don't support breaking down by method, setting this field will result + * in an error. + * + * Generated from protobuf field repeated string method = 7; + */ + private $method; + /** + * OPTIONAL: The set of locations to which this SLI is relevant. Telemetry + * from other locations will not be used to calculate performance for this + * SLI. If omitted, this SLI applies to all locations in which the Service has + * activity. For service types that don't support breaking down by location, + * setting this field will result in an error. + * + * Generated from protobuf field repeated string location = 8; + */ + private $location; + /** + * OPTIONAL: The set of API versions to which this SLI is relevant. Telemetry + * from other API versions will not be used to calculate performance for this + * SLI. If omitted, this SLI applies to all API versions. For service types + * that don't support breaking down by version, setting this field will result + * in an error. + * + * Generated from protobuf field repeated string version = 9; + */ + private $version; + protected $sli_criteria; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $method + * OPTIONAL: The set of RPCs to which this SLI is relevant. Telemetry from + * other methods will not be used to calculate performance for this SLI. If + * omitted, this SLI applies to all the Service's methods. For service types + * that don't support breaking down by method, setting this field will result + * in an error. + * @type array|\Google\Protobuf\Internal\RepeatedField $location + * OPTIONAL: The set of locations to which this SLI is relevant. Telemetry + * from other locations will not be used to calculate performance for this + * SLI. If omitted, this SLI applies to all locations in which the Service has + * activity. For service types that don't support breaking down by location, + * setting this field will result in an error. + * @type array|\Google\Protobuf\Internal\RepeatedField $version + * OPTIONAL: The set of API versions to which this SLI is relevant. Telemetry + * from other API versions will not be used to calculate performance for this + * SLI. If omitted, this SLI applies to all API versions. For service types + * that don't support breaking down by version, setting this field will result + * in an error. + * @type \Google\Cloud\Monitoring\V3\BasicSli\AvailabilityCriteria $availability + * Good service is defined to be the count of requests made to this service + * that return successfully. + * @type \Google\Cloud\Monitoring\V3\BasicSli\LatencyCriteria $latency + * Good service is defined to be the count of requests made to this service + * that are fast enough with respect to `latency.threshold`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\Service::initOnce(); + parent::__construct($data); + } + + /** + * OPTIONAL: The set of RPCs to which this SLI is relevant. Telemetry from + * other methods will not be used to calculate performance for this SLI. If + * omitted, this SLI applies to all the Service's methods. For service types + * that don't support breaking down by method, setting this field will result + * in an error. + * + * Generated from protobuf field repeated string method = 7; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMethod() + { + return $this->method; + } + + /** + * OPTIONAL: The set of RPCs to which this SLI is relevant. Telemetry from + * other methods will not be used to calculate performance for this SLI. If + * omitted, this SLI applies to all the Service's methods. For service types + * that don't support breaking down by method, setting this field will result + * in an error. + * + * Generated from protobuf field repeated string method = 7; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMethod($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->method = $arr; + + return $this; + } + + /** + * OPTIONAL: The set of locations to which this SLI is relevant. Telemetry + * from other locations will not be used to calculate performance for this + * SLI. If omitted, this SLI applies to all locations in which the Service has + * activity. For service types that don't support breaking down by location, + * setting this field will result in an error. + * + * Generated from protobuf field repeated string location = 8; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getLocation() + { + return $this->location; + } + + /** + * OPTIONAL: The set of locations to which this SLI is relevant. Telemetry + * from other locations will not be used to calculate performance for this + * SLI. If omitted, this SLI applies to all locations in which the Service has + * activity. For service types that don't support breaking down by location, + * setting this field will result in an error. + * + * Generated from protobuf field repeated string location = 8; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setLocation($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->location = $arr; + + return $this; + } + + /** + * OPTIONAL: The set of API versions to which this SLI is relevant. Telemetry + * from other API versions will not be used to calculate performance for this + * SLI. If omitted, this SLI applies to all API versions. For service types + * that don't support breaking down by version, setting this field will result + * in an error. + * + * Generated from protobuf field repeated string version = 9; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getVersion() + { + return $this->version; + } + + /** + * OPTIONAL: The set of API versions to which this SLI is relevant. Telemetry + * from other API versions will not be used to calculate performance for this + * SLI. If omitted, this SLI applies to all API versions. For service types + * that don't support breaking down by version, setting this field will result + * in an error. + * + * Generated from protobuf field repeated string version = 9; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setVersion($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->version = $arr; + + return $this; + } + + /** + * Good service is defined to be the count of requests made to this service + * that return successfully. + * + * Generated from protobuf field .google.monitoring.v3.BasicSli.AvailabilityCriteria availability = 2; + * @return \Google\Cloud\Monitoring\V3\BasicSli\AvailabilityCriteria|null + */ + public function getAvailability() + { + return $this->readOneof(2); + } + + public function hasAvailability() + { + return $this->hasOneof(2); + } + + /** + * Good service is defined to be the count of requests made to this service + * that return successfully. + * + * Generated from protobuf field .google.monitoring.v3.BasicSli.AvailabilityCriteria availability = 2; + * @param \Google\Cloud\Monitoring\V3\BasicSli\AvailabilityCriteria $var + * @return $this + */ + public function setAvailability($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\BasicSli\AvailabilityCriteria::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Good service is defined to be the count of requests made to this service + * that are fast enough with respect to `latency.threshold`. + * + * Generated from protobuf field .google.monitoring.v3.BasicSli.LatencyCriteria latency = 3; + * @return \Google\Cloud\Monitoring\V3\BasicSli\LatencyCriteria|null + */ + public function getLatency() + { + return $this->readOneof(3); + } + + public function hasLatency() + { + return $this->hasOneof(3); + } + + /** + * Good service is defined to be the count of requests made to this service + * that are fast enough with respect to `latency.threshold`. + * + * Generated from protobuf field .google.monitoring.v3.BasicSli.LatencyCriteria latency = 3; + * @param \Google\Cloud\Monitoring\V3\BasicSli\LatencyCriteria $var + * @return $this + */ + public function setLatency($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\BasicSli\LatencyCriteria::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * @return string + */ + public function getSliCriteria() + { + return $this->whichOneof("sli_criteria"); + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/BasicSli/AvailabilityCriteria.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/BasicSli/AvailabilityCriteria.php new file mode 100644 index 000000000000..39790b19ee01 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/BasicSli/AvailabilityCriteria.php @@ -0,0 +1,36 @@ +google.monitoring.v3.BasicSli.AvailabilityCriteria + */ +class AvailabilityCriteria extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\Service::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(AvailabilityCriteria::class, \Google\Cloud\Monitoring\V3\BasicSli_AvailabilityCriteria::class); + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/BasicSli/LatencyCriteria.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/BasicSli/LatencyCriteria.php new file mode 100644 index 000000000000..331b6b6e46f4 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/BasicSli/LatencyCriteria.php @@ -0,0 +1,84 @@ +google.monitoring.v3.BasicSli.LatencyCriteria + */ +class LatencyCriteria extends \Google\Protobuf\Internal\Message +{ + /** + * Good service is defined to be the count of requests made to this service + * that return in no more than `threshold`. + * + * Generated from protobuf field .google.protobuf.Duration threshold = 3; + */ + protected $threshold = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Duration $threshold + * Good service is defined to be the count of requests made to this service + * that return in no more than `threshold`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\Service::initOnce(); + parent::__construct($data); + } + + /** + * Good service is defined to be the count of requests made to this service + * that return in no more than `threshold`. + * + * Generated from protobuf field .google.protobuf.Duration threshold = 3; + * @return \Google\Protobuf\Duration|null + */ + public function getThreshold() + { + return $this->threshold; + } + + public function hasThreshold() + { + return isset($this->threshold); + } + + public function clearThreshold() + { + unset($this->threshold); + } + + /** + * Good service is defined to be the count of requests made to this service + * that return in no more than `threshold`. + * + * Generated from protobuf field .google.protobuf.Duration threshold = 3; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setThreshold($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->threshold = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(LatencyCriteria::class, \Google\Cloud\Monitoring\V3\BasicSli_LatencyCriteria::class); + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ComparisonType.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ComparisonType.php new file mode 100644 index 000000000000..d86a3fbc2cde --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ComparisonType.php @@ -0,0 +1,90 @@ +google.monitoring.v3.ComparisonType + */ +class ComparisonType +{ + /** + * No ordering relationship is specified. + * + * Generated from protobuf enum COMPARISON_UNSPECIFIED = 0; + */ + const COMPARISON_UNSPECIFIED = 0; + /** + * True if the left argument is greater than the right argument. + * + * Generated from protobuf enum COMPARISON_GT = 1; + */ + const COMPARISON_GT = 1; + /** + * True if the left argument is greater than or equal to the right argument. + * + * Generated from protobuf enum COMPARISON_GE = 2; + */ + const COMPARISON_GE = 2; + /** + * True if the left argument is less than the right argument. + * + * Generated from protobuf enum COMPARISON_LT = 3; + */ + const COMPARISON_LT = 3; + /** + * True if the left argument is less than or equal to the right argument. + * + * Generated from protobuf enum COMPARISON_LE = 4; + */ + const COMPARISON_LE = 4; + /** + * True if the left argument is equal to the right argument. + * + * Generated from protobuf enum COMPARISON_EQ = 5; + */ + const COMPARISON_EQ = 5; + /** + * True if the left argument is not equal to the right argument. + * + * Generated from protobuf enum COMPARISON_NE = 6; + */ + const COMPARISON_NE = 6; + + private static $valueToName = [ + self::COMPARISON_UNSPECIFIED => 'COMPARISON_UNSPECIFIED', + self::COMPARISON_GT => 'COMPARISON_GT', + self::COMPARISON_GE => 'COMPARISON_GE', + self::COMPARISON_LT => 'COMPARISON_LT', + self::COMPARISON_LE => 'COMPARISON_LE', + self::COMPARISON_EQ => 'COMPARISON_EQ', + self::COMPARISON_NE => 'COMPARISON_NE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/CreateAlertPolicyRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/CreateAlertPolicyRequest.php new file mode 100644 index 000000000000..6c9c18ef40f4 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/CreateAlertPolicyRequest.php @@ -0,0 +1,188 @@ +google.monitoring.v3.CreateAlertPolicyRequest + */ +class CreateAlertPolicyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) in which + * to create the alerting policy. The format is: + * projects/[PROJECT_ID_OR_NUMBER] + * Note that this field names the parent container in which the alerting + * policy will be written, not the name of the created policy. |name| must be + * a host project of a Metrics Scope, otherwise INVALID_ARGUMENT error will + * return. The alerting policy that is returned will have a name that contains + * a normalized representation of this name as a prefix but adds a suffix of + * the form `/alertPolicies/[ALERT_POLICY_ID]`, identifying the policy in the + * container. + * + * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. The requested alerting policy. You should omit the `name` field + * in this policy. The name will be returned in the new policy, including a + * new `[ALERT_POLICY_ID]` value. + * + * Generated from protobuf field .google.monitoring.v3.AlertPolicy alert_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $alert_policy = null; + + /** + * @param string $name Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) in which + * to create the alerting policy. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER] + * + * Note that this field names the parent container in which the alerting + * policy will be written, not the name of the created policy. |name| must be + * a host project of a Metrics Scope, otherwise INVALID_ARGUMENT error will + * return. The alerting policy that is returned will have a name that contains + * a normalized representation of this name as a prefix but adds a suffix of + * the form `/alertPolicies/[ALERT_POLICY_ID]`, identifying the policy in the + * container. + * @param \Google\Cloud\Monitoring\V3\AlertPolicy $alertPolicy Required. The requested alerting policy. You should omit the `name` field + * in this policy. The name will be returned in the new policy, including a + * new `[ALERT_POLICY_ID]` value. + * + * @return \Google\Cloud\Monitoring\V3\CreateAlertPolicyRequest + * + * @experimental + */ + public static function build(string $name, \Google\Cloud\Monitoring\V3\AlertPolicy $alertPolicy): self + { + return (new self()) + ->setName($name) + ->setAlertPolicy($alertPolicy); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) in which + * to create the alerting policy. The format is: + * projects/[PROJECT_ID_OR_NUMBER] + * Note that this field names the parent container in which the alerting + * policy will be written, not the name of the created policy. |name| must be + * a host project of a Metrics Scope, otherwise INVALID_ARGUMENT error will + * return. The alerting policy that is returned will have a name that contains + * a normalized representation of this name as a prefix but adds a suffix of + * the form `/alertPolicies/[ALERT_POLICY_ID]`, identifying the policy in the + * container. + * @type \Google\Cloud\Monitoring\V3\AlertPolicy $alert_policy + * Required. The requested alerting policy. You should omit the `name` field + * in this policy. The name will be returned in the new policy, including a + * new `[ALERT_POLICY_ID]` value. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\AlertService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) in which + * to create the alerting policy. The format is: + * projects/[PROJECT_ID_OR_NUMBER] + * Note that this field names the parent container in which the alerting + * policy will be written, not the name of the created policy. |name| must be + * a host project of a Metrics Scope, otherwise INVALID_ARGUMENT error will + * return. The alerting policy that is returned will have a name that contains + * a normalized representation of this name as a prefix but adds a suffix of + * the form `/alertPolicies/[ALERT_POLICY_ID]`, identifying the policy in the + * container. + * + * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) in which + * to create the alerting policy. The format is: + * projects/[PROJECT_ID_OR_NUMBER] + * Note that this field names the parent container in which the alerting + * policy will be written, not the name of the created policy. |name| must be + * a host project of a Metrics Scope, otherwise INVALID_ARGUMENT error will + * return. The alerting policy that is returned will have a name that contains + * a normalized representation of this name as a prefix but adds a suffix of + * the form `/alertPolicies/[ALERT_POLICY_ID]`, identifying the policy in the + * container. + * + * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. The requested alerting policy. You should omit the `name` field + * in this policy. The name will be returned in the new policy, including a + * new `[ALERT_POLICY_ID]` value. + * + * Generated from protobuf field .google.monitoring.v3.AlertPolicy alert_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Monitoring\V3\AlertPolicy|null + */ + public function getAlertPolicy() + { + return $this->alert_policy; + } + + public function hasAlertPolicy() + { + return isset($this->alert_policy); + } + + public function clearAlertPolicy() + { + unset($this->alert_policy); + } + + /** + * Required. The requested alerting policy. You should omit the `name` field + * in this policy. The name will be returned in the new policy, including a + * new `[ALERT_POLICY_ID]` value. + * + * Generated from protobuf field .google.monitoring.v3.AlertPolicy alert_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Monitoring\V3\AlertPolicy $var + * @return $this + */ + public function setAlertPolicy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\AlertPolicy::class); + $this->alert_policy = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/CreateGroupRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/CreateGroupRequest.php new file mode 100644 index 000000000000..bad7c64edac4 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/CreateGroupRequest.php @@ -0,0 +1,181 @@ +google.monitoring.v3.CreateGroupRequest + */ +class CreateGroupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) in which + * to create the group. The format is: + * projects/[PROJECT_ID_OR_NUMBER] + * + * Generated from protobuf field string name = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. A group definition. It is an error to define the `name` field + * because the system assigns the name. + * + * Generated from protobuf field .google.monitoring.v3.Group group = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $group = null; + /** + * If true, validate this request but do not create the group. + * + * Generated from protobuf field bool validate_only = 3; + */ + protected $validate_only = false; + + /** + * @param string $name Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) in which + * to create the group. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER] + * @param \Google\Cloud\Monitoring\V3\Group $group Required. A group definition. It is an error to define the `name` field + * because the system assigns the name. + * + * @return \Google\Cloud\Monitoring\V3\CreateGroupRequest + * + * @experimental + */ + public static function build(string $name, \Google\Cloud\Monitoring\V3\Group $group): self + { + return (new self()) + ->setName($name) + ->setGroup($group); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) in which + * to create the group. The format is: + * projects/[PROJECT_ID_OR_NUMBER] + * @type \Google\Cloud\Monitoring\V3\Group $group + * Required. A group definition. It is an error to define the `name` field + * because the system assigns the name. + * @type bool $validate_only + * If true, validate this request but do not create the group. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\GroupService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) in which + * to create the group. The format is: + * projects/[PROJECT_ID_OR_NUMBER] + * + * Generated from protobuf field string name = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) in which + * to create the group. The format is: + * projects/[PROJECT_ID_OR_NUMBER] + * + * Generated from protobuf field string name = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. A group definition. It is an error to define the `name` field + * because the system assigns the name. + * + * Generated from protobuf field .google.monitoring.v3.Group group = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Monitoring\V3\Group|null + */ + public function getGroup() + { + return $this->group; + } + + public function hasGroup() + { + return isset($this->group); + } + + public function clearGroup() + { + unset($this->group); + } + + /** + * Required. A group definition. It is an error to define the `name` field + * because the system assigns the name. + * + * Generated from protobuf field .google.monitoring.v3.Group group = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Monitoring\V3\Group $var + * @return $this + */ + public function setGroup($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\Group::class); + $this->group = $var; + + return $this; + } + + /** + * If true, validate this request but do not create the group. + * + * Generated from protobuf field bool validate_only = 3; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * If true, validate this request but do not create the group. + * + * Generated from protobuf field bool validate_only = 3; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/CreateMetricDescriptorRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/CreateMetricDescriptorRequest.php new file mode 100644 index 000000000000..45d737e63e85 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/CreateMetricDescriptorRequest.php @@ -0,0 +1,151 @@ +google.monitoring.v3.CreateMetricDescriptorRequest + */ +class CreateMetricDescriptorRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which + * to execute the request. The format is: + * 4 + * projects/[PROJECT_ID_OR_NUMBER] + * + * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. The new [custom + * metric](https://cloud.google.com/monitoring/custom-metrics) descriptor. + * + * Generated from protobuf field .google.api.MetricDescriptor metric_descriptor = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $metric_descriptor = null; + + /** + * @param string $name Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which + * to execute the request. The format is: + * 4 + * projects/[PROJECT_ID_OR_NUMBER] + * @param \Google\Api\MetricDescriptor $metricDescriptor Required. The new [custom + * metric](https://cloud.google.com/monitoring/custom-metrics) descriptor. + * + * @return \Google\Cloud\Monitoring\V3\CreateMetricDescriptorRequest + * + * @experimental + */ + public static function build(string $name, \Google\Api\MetricDescriptor $metricDescriptor): self + { + return (new self()) + ->setName($name) + ->setMetricDescriptor($metricDescriptor); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which + * to execute the request. The format is: + * 4 + * projects/[PROJECT_ID_OR_NUMBER] + * @type \Google\Api\MetricDescriptor $metric_descriptor + * Required. The new [custom + * metric](https://cloud.google.com/monitoring/custom-metrics) descriptor. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\MetricService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which + * to execute the request. The format is: + * 4 + * projects/[PROJECT_ID_OR_NUMBER] + * + * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which + * to execute the request. The format is: + * 4 + * projects/[PROJECT_ID_OR_NUMBER] + * + * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. The new [custom + * metric](https://cloud.google.com/monitoring/custom-metrics) descriptor. + * + * Generated from protobuf field .google.api.MetricDescriptor metric_descriptor = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Api\MetricDescriptor|null + */ + public function getMetricDescriptor() + { + return $this->metric_descriptor; + } + + public function hasMetricDescriptor() + { + return isset($this->metric_descriptor); + } + + public function clearMetricDescriptor() + { + unset($this->metric_descriptor); + } + + /** + * Required. The new [custom + * metric](https://cloud.google.com/monitoring/custom-metrics) descriptor. + * + * Generated from protobuf field .google.api.MetricDescriptor metric_descriptor = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Api\MetricDescriptor $var + * @return $this + */ + public function setMetricDescriptor($var) + { + GPBUtil::checkMessage($var, \Google\Api\MetricDescriptor::class); + $this->metric_descriptor = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/CreateNotificationChannelRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/CreateNotificationChannelRequest.php new file mode 100644 index 000000000000..2a528898bebc --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/CreateNotificationChannelRequest.php @@ -0,0 +1,163 @@ +google.monitoring.v3.CreateNotificationChannelRequest + */ +class CreateNotificationChannelRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which + * to execute the request. The format is: + * projects/[PROJECT_ID_OR_NUMBER] + * This names the container into which the channel will be + * written, this does not name the newly created channel. The resulting + * channel's name will have a normalized version of this field as a prefix, + * but will add `/notificationChannels/[CHANNEL_ID]` to identify the channel. + * + * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. The definition of the `NotificationChannel` to create. + * + * Generated from protobuf field .google.monitoring.v3.NotificationChannel notification_channel = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $notification_channel = null; + + /** + * @param string $name Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which + * to execute the request. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER] + * + * This names the container into which the channel will be + * written, this does not name the newly created channel. The resulting + * channel's name will have a normalized version of this field as a prefix, + * but will add `/notificationChannels/[CHANNEL_ID]` to identify the channel. + * @param \Google\Cloud\Monitoring\V3\NotificationChannel $notificationChannel Required. The definition of the `NotificationChannel` to create. + * + * @return \Google\Cloud\Monitoring\V3\CreateNotificationChannelRequest + * + * @experimental + */ + public static function build(string $name, \Google\Cloud\Monitoring\V3\NotificationChannel $notificationChannel): self + { + return (new self()) + ->setName($name) + ->setNotificationChannel($notificationChannel); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which + * to execute the request. The format is: + * projects/[PROJECT_ID_OR_NUMBER] + * This names the container into which the channel will be + * written, this does not name the newly created channel. The resulting + * channel's name will have a normalized version of this field as a prefix, + * but will add `/notificationChannels/[CHANNEL_ID]` to identify the channel. + * @type \Google\Cloud\Monitoring\V3\NotificationChannel $notification_channel + * Required. The definition of the `NotificationChannel` to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\NotificationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which + * to execute the request. The format is: + * projects/[PROJECT_ID_OR_NUMBER] + * This names the container into which the channel will be + * written, this does not name the newly created channel. The resulting + * channel's name will have a normalized version of this field as a prefix, + * but will add `/notificationChannels/[CHANNEL_ID]` to identify the channel. + * + * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which + * to execute the request. The format is: + * projects/[PROJECT_ID_OR_NUMBER] + * This names the container into which the channel will be + * written, this does not name the newly created channel. The resulting + * channel's name will have a normalized version of this field as a prefix, + * but will add `/notificationChannels/[CHANNEL_ID]` to identify the channel. + * + * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. The definition of the `NotificationChannel` to create. + * + * Generated from protobuf field .google.monitoring.v3.NotificationChannel notification_channel = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Monitoring\V3\NotificationChannel|null + */ + public function getNotificationChannel() + { + return $this->notification_channel; + } + + public function hasNotificationChannel() + { + return isset($this->notification_channel); + } + + public function clearNotificationChannel() + { + unset($this->notification_channel); + } + + /** + * Required. The definition of the `NotificationChannel` to create. + * + * Generated from protobuf field .google.monitoring.v3.NotificationChannel notification_channel = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Monitoring\V3\NotificationChannel $var + * @return $this + */ + public function setNotificationChannel($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\NotificationChannel::class); + $this->notification_channel = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/CreateServiceLevelObjectiveRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/CreateServiceLevelObjectiveRequest.php new file mode 100644 index 000000000000..151f66b7a84c --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/CreateServiceLevelObjectiveRequest.php @@ -0,0 +1,185 @@ +google.monitoring.v3.CreateServiceLevelObjectiveRequest + */ +class CreateServiceLevelObjectiveRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the parent `Service`. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The ServiceLevelObjective id to use for this + * ServiceLevelObjective. If omitted, an id will be generated instead. Must + * match the pattern `^[a-zA-Z0-9-_:.]+$` + * + * Generated from protobuf field string service_level_objective_id = 3; + */ + protected $service_level_objective_id = ''; + /** + * Required. The `ServiceLevelObjective` to create. + * The provided `name` will be respected if no `ServiceLevelObjective` exists + * with this name. + * + * Generated from protobuf field .google.monitoring.v3.ServiceLevelObjective service_level_objective = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $service_level_objective = null; + + /** + * @param string $parent Required. Resource name of the parent `Service`. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] + * Please see {@see ServiceMonitoringServiceClient::serviceName()} for help formatting this field. + * @param \Google\Cloud\Monitoring\V3\ServiceLevelObjective $serviceLevelObjective Required. The `ServiceLevelObjective` to create. + * The provided `name` will be respected if no `ServiceLevelObjective` exists + * with this name. + * + * @return \Google\Cloud\Monitoring\V3\CreateServiceLevelObjectiveRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Monitoring\V3\ServiceLevelObjective $serviceLevelObjective): self + { + return (new self()) + ->setParent($parent) + ->setServiceLevelObjective($serviceLevelObjective); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Resource name of the parent `Service`. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] + * @type string $service_level_objective_id + * Optional. The ServiceLevelObjective id to use for this + * ServiceLevelObjective. If omitted, an id will be generated instead. Must + * match the pattern `^[a-zA-Z0-9-_:.]+$` + * @type \Google\Cloud\Monitoring\V3\ServiceLevelObjective $service_level_objective + * Required. The `ServiceLevelObjective` to create. + * The provided `name` will be respected if no `ServiceLevelObjective` exists + * with this name. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\ServiceService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the parent `Service`. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Resource name of the parent `Service`. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The ServiceLevelObjective id to use for this + * ServiceLevelObjective. If omitted, an id will be generated instead. Must + * match the pattern `^[a-zA-Z0-9-_:.]+$` + * + * Generated from protobuf field string service_level_objective_id = 3; + * @return string + */ + public function getServiceLevelObjectiveId() + { + return $this->service_level_objective_id; + } + + /** + * Optional. The ServiceLevelObjective id to use for this + * ServiceLevelObjective. If omitted, an id will be generated instead. Must + * match the pattern `^[a-zA-Z0-9-_:.]+$` + * + * Generated from protobuf field string service_level_objective_id = 3; + * @param string $var + * @return $this + */ + public function setServiceLevelObjectiveId($var) + { + GPBUtil::checkString($var, True); + $this->service_level_objective_id = $var; + + return $this; + } + + /** + * Required. The `ServiceLevelObjective` to create. + * The provided `name` will be respected if no `ServiceLevelObjective` exists + * with this name. + * + * Generated from protobuf field .google.monitoring.v3.ServiceLevelObjective service_level_objective = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Monitoring\V3\ServiceLevelObjective|null + */ + public function getServiceLevelObjective() + { + return $this->service_level_objective; + } + + public function hasServiceLevelObjective() + { + return isset($this->service_level_objective); + } + + public function clearServiceLevelObjective() + { + unset($this->service_level_objective); + } + + /** + * Required. The `ServiceLevelObjective` to create. + * The provided `name` will be respected if no `ServiceLevelObjective` exists + * with this name. + * + * Generated from protobuf field .google.monitoring.v3.ServiceLevelObjective service_level_objective = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Monitoring\V3\ServiceLevelObjective $var + * @return $this + */ + public function setServiceLevelObjective($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\ServiceLevelObjective::class); + $this->service_level_objective = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/CreateServiceRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/CreateServiceRequest.php new file mode 100644 index 000000000000..7d9425e30c52 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/CreateServiceRequest.php @@ -0,0 +1,180 @@ +google.monitoring.v3.CreateServiceRequest + */ +class CreateServiceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource + * [name](https://cloud.google.com/monitoring/api/v3#project_name) of the + * parent Metrics Scope. The format is: + * projects/[PROJECT_ID_OR_NUMBER] + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The Service id to use for this Service. If omitted, an id will be + * generated instead. Must match the pattern `[a-z0-9\-]+` + * + * Generated from protobuf field string service_id = 3; + */ + protected $service_id = ''; + /** + * Required. The `Service` to create. + * + * Generated from protobuf field .google.monitoring.v3.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $service = null; + + /** + * @param string $parent Required. Resource + * [name](https://cloud.google.com/monitoring/api/v3#project_name) of the + * parent Metrics Scope. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER] + * @param \Google\Cloud\Monitoring\V3\Service $service Required. The `Service` to create. + * + * @return \Google\Cloud\Monitoring\V3\CreateServiceRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Monitoring\V3\Service $service): self + { + return (new self()) + ->setParent($parent) + ->setService($service); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Resource + * [name](https://cloud.google.com/monitoring/api/v3#project_name) of the + * parent Metrics Scope. The format is: + * projects/[PROJECT_ID_OR_NUMBER] + * @type string $service_id + * Optional. The Service id to use for this Service. If omitted, an id will be + * generated instead. Must match the pattern `[a-z0-9\-]+` + * @type \Google\Cloud\Monitoring\V3\Service $service + * Required. The `Service` to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\ServiceService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource + * [name](https://cloud.google.com/monitoring/api/v3#project_name) of the + * parent Metrics Scope. The format is: + * projects/[PROJECT_ID_OR_NUMBER] + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Resource + * [name](https://cloud.google.com/monitoring/api/v3#project_name) of the + * parent Metrics Scope. The format is: + * projects/[PROJECT_ID_OR_NUMBER] + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The Service id to use for this Service. If omitted, an id will be + * generated instead. Must match the pattern `[a-z0-9\-]+` + * + * Generated from protobuf field string service_id = 3; + * @return string + */ + public function getServiceId() + { + return $this->service_id; + } + + /** + * Optional. The Service id to use for this Service. If omitted, an id will be + * generated instead. Must match the pattern `[a-z0-9\-]+` + * + * Generated from protobuf field string service_id = 3; + * @param string $var + * @return $this + */ + public function setServiceId($var) + { + GPBUtil::checkString($var, True); + $this->service_id = $var; + + return $this; + } + + /** + * Required. The `Service` to create. + * + * Generated from protobuf field .google.monitoring.v3.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Monitoring\V3\Service|null + */ + public function getService() + { + return $this->service; + } + + public function hasService() + { + return isset($this->service); + } + + public function clearService() + { + unset($this->service); + } + + /** + * Required. The `Service` to create. + * + * Generated from protobuf field .google.monitoring.v3.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Monitoring\V3\Service $var + * @return $this + */ + public function setService($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\Service::class); + $this->service = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/CreateSnoozeRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/CreateSnoozeRequest.php new file mode 100644 index 000000000000..c03b63fbc9d1 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/CreateSnoozeRequest.php @@ -0,0 +1,149 @@ +google.monitoring.v3.CreateSnoozeRequest + */ +class CreateSnoozeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) in which + * a `Snooze` should be created. The format is: + * projects/[PROJECT_ID_OR_NUMBER] + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The `Snooze` to create. Omit the `name` field, as it will be + * filled in by the API. + * + * Generated from protobuf field .google.monitoring.v3.Snooze snooze = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $snooze = null; + + /** + * @param string $parent Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) in which + * a `Snooze` should be created. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER] + * Please see {@see SnoozeServiceClient::workspaceName()} for help formatting this field. + * @param \Google\Cloud\Monitoring\V3\Snooze $snooze Required. The `Snooze` to create. Omit the `name` field, as it will be + * filled in by the API. + * + * @return \Google\Cloud\Monitoring\V3\CreateSnoozeRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Monitoring\V3\Snooze $snooze): self + { + return (new self()) + ->setParent($parent) + ->setSnooze($snooze); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) in which + * a `Snooze` should be created. The format is: + * projects/[PROJECT_ID_OR_NUMBER] + * @type \Google\Cloud\Monitoring\V3\Snooze $snooze + * Required. The `Snooze` to create. Omit the `name` field, as it will be + * filled in by the API. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\SnoozeService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) in which + * a `Snooze` should be created. The format is: + * projects/[PROJECT_ID_OR_NUMBER] + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) in which + * a `Snooze` should be created. The format is: + * projects/[PROJECT_ID_OR_NUMBER] + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The `Snooze` to create. Omit the `name` field, as it will be + * filled in by the API. + * + * Generated from protobuf field .google.monitoring.v3.Snooze snooze = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Monitoring\V3\Snooze|null + */ + public function getSnooze() + { + return $this->snooze; + } + + public function hasSnooze() + { + return isset($this->snooze); + } + + public function clearSnooze() + { + unset($this->snooze); + } + + /** + * Required. The `Snooze` to create. Omit the `name` field, as it will be + * filled in by the API. + * + * Generated from protobuf field .google.monitoring.v3.Snooze snooze = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Monitoring\V3\Snooze $var + * @return $this + */ + public function setSnooze($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\Snooze::class); + $this->snooze = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/CreateTimeSeriesError.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/CreateTimeSeriesError.php new file mode 100644 index 000000000000..556d57d66086 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/CreateTimeSeriesError.php @@ -0,0 +1,135 @@ +google.monitoring.v3.CreateTimeSeriesError + */ +class CreateTimeSeriesError extends \Google\Protobuf\Internal\Message +{ + /** + * DEPRECATED. Time series ID that resulted in the `status` error. + * + * Generated from protobuf field .google.monitoring.v3.TimeSeries time_series = 1 [deprecated = true]; + * @deprecated + */ + protected $time_series = null; + /** + * DEPRECATED. The status of the requested write operation for `time_series`. + * + * Generated from protobuf field .google.rpc.Status status = 2 [deprecated = true]; + * @deprecated + */ + protected $status = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Monitoring\V3\TimeSeries $time_series + * DEPRECATED. Time series ID that resulted in the `status` error. + * @type \Google\Rpc\Status $status + * DEPRECATED. The status of the requested write operation for `time_series`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\MetricService::initOnce(); + parent::__construct($data); + } + + /** + * DEPRECATED. Time series ID that resulted in the `status` error. + * + * Generated from protobuf field .google.monitoring.v3.TimeSeries time_series = 1 [deprecated = true]; + * @return \Google\Cloud\Monitoring\V3\TimeSeries|null + * @deprecated + */ + public function getTimeSeries() + { + @trigger_error('time_series is deprecated.', E_USER_DEPRECATED); + return $this->time_series; + } + + public function hasTimeSeries() + { + @trigger_error('time_series is deprecated.', E_USER_DEPRECATED); + return isset($this->time_series); + } + + public function clearTimeSeries() + { + @trigger_error('time_series is deprecated.', E_USER_DEPRECATED); + unset($this->time_series); + } + + /** + * DEPRECATED. Time series ID that resulted in the `status` error. + * + * Generated from protobuf field .google.monitoring.v3.TimeSeries time_series = 1 [deprecated = true]; + * @param \Google\Cloud\Monitoring\V3\TimeSeries $var + * @return $this + * @deprecated + */ + public function setTimeSeries($var) + { + @trigger_error('time_series is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\TimeSeries::class); + $this->time_series = $var; + + return $this; + } + + /** + * DEPRECATED. The status of the requested write operation for `time_series`. + * + * Generated from protobuf field .google.rpc.Status status = 2 [deprecated = true]; + * @return \Google\Rpc\Status|null + * @deprecated + */ + public function getStatus() + { + @trigger_error('status is deprecated.', E_USER_DEPRECATED); + return $this->status; + } + + public function hasStatus() + { + @trigger_error('status is deprecated.', E_USER_DEPRECATED); + return isset($this->status); + } + + public function clearStatus() + { + @trigger_error('status is deprecated.', E_USER_DEPRECATED); + unset($this->status); + } + + /** + * DEPRECATED. The status of the requested write operation for `time_series`. + * + * Generated from protobuf field .google.rpc.Status status = 2 [deprecated = true]; + * @param \Google\Rpc\Status $var + * @return $this + * @deprecated + */ + public function setStatus($var) + { + @trigger_error('status is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkMessage($var, \Google\Rpc\Status::class); + $this->status = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/CreateTimeSeriesRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/CreateTimeSeriesRequest.php new file mode 100644 index 000000000000..66cb39cd93ac --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/CreateTimeSeriesRequest.php @@ -0,0 +1,159 @@ +google.monitoring.v3.CreateTimeSeriesRequest + */ +class CreateTimeSeriesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which + * to execute the request. The format is: + * projects/[PROJECT_ID_OR_NUMBER] + * + * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. The new data to be added to a list of time series. + * Adds at most one data point to each of several time series. The new data + * point must be more recent than any other point in its time series. Each + * `TimeSeries` value must fully specify a unique time series by supplying + * all label values for the metric and the monitored resource. + * The maximum number of `TimeSeries` objects per `Create` request is 200. + * + * Generated from protobuf field repeated .google.monitoring.v3.TimeSeries time_series = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $time_series; + + /** + * @param string $name Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which + * to execute the request. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER] + * Please see {@see MetricServiceClient::projectName()} for help formatting this field. + * @param \Google\Cloud\Monitoring\V3\TimeSeries[] $timeSeries Required. The new data to be added to a list of time series. + * Adds at most one data point to each of several time series. The new data + * point must be more recent than any other point in its time series. Each + * `TimeSeries` value must fully specify a unique time series by supplying + * all label values for the metric and the monitored resource. + * + * The maximum number of `TimeSeries` objects per `Create` request is 200. + * + * @return \Google\Cloud\Monitoring\V3\CreateTimeSeriesRequest + * + * @experimental + */ + public static function build(string $name, array $timeSeries): self + { + return (new self()) + ->setName($name) + ->setTimeSeries($timeSeries); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which + * to execute the request. The format is: + * projects/[PROJECT_ID_OR_NUMBER] + * @type array<\Google\Cloud\Monitoring\V3\TimeSeries>|\Google\Protobuf\Internal\RepeatedField $time_series + * Required. The new data to be added to a list of time series. + * Adds at most one data point to each of several time series. The new data + * point must be more recent than any other point in its time series. Each + * `TimeSeries` value must fully specify a unique time series by supplying + * all label values for the metric and the monitored resource. + * The maximum number of `TimeSeries` objects per `Create` request is 200. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\MetricService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which + * to execute the request. The format is: + * projects/[PROJECT_ID_OR_NUMBER] + * + * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which + * to execute the request. The format is: + * projects/[PROJECT_ID_OR_NUMBER] + * + * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. The new data to be added to a list of time series. + * Adds at most one data point to each of several time series. The new data + * point must be more recent than any other point in its time series. Each + * `TimeSeries` value must fully specify a unique time series by supplying + * all label values for the metric and the monitored resource. + * The maximum number of `TimeSeries` objects per `Create` request is 200. + * + * Generated from protobuf field repeated .google.monitoring.v3.TimeSeries time_series = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTimeSeries() + { + return $this->time_series; + } + + /** + * Required. The new data to be added to a list of time series. + * Adds at most one data point to each of several time series. The new data + * point must be more recent than any other point in its time series. Each + * `TimeSeries` value must fully specify a unique time series by supplying + * all label values for the metric and the monitored resource. + * The maximum number of `TimeSeries` objects per `Create` request is 200. + * + * Generated from protobuf field repeated .google.monitoring.v3.TimeSeries time_series = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Cloud\Monitoring\V3\TimeSeries>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTimeSeries($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Monitoring\V3\TimeSeries::class); + $this->time_series = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/CreateTimeSeriesSummary.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/CreateTimeSeriesSummary.php new file mode 100644 index 000000000000..8fb4fe1f025c --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/CreateTimeSeriesSummary.php @@ -0,0 +1,135 @@ +google.monitoring.v3.CreateTimeSeriesSummary + */ +class CreateTimeSeriesSummary extends \Google\Protobuf\Internal\Message +{ + /** + * The number of points in the request. + * + * Generated from protobuf field int32 total_point_count = 1; + */ + protected $total_point_count = 0; + /** + * The number of points that were successfully written. + * + * Generated from protobuf field int32 success_point_count = 2; + */ + protected $success_point_count = 0; + /** + * The number of points that failed to be written. Order is not guaranteed. + * + * Generated from protobuf field repeated .google.monitoring.v3.CreateTimeSeriesSummary.Error errors = 3; + */ + private $errors; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $total_point_count + * The number of points in the request. + * @type int $success_point_count + * The number of points that were successfully written. + * @type array<\Google\Cloud\Monitoring\V3\CreateTimeSeriesSummary\Error>|\Google\Protobuf\Internal\RepeatedField $errors + * The number of points that failed to be written. Order is not guaranteed. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\MetricService::initOnce(); + parent::__construct($data); + } + + /** + * The number of points in the request. + * + * Generated from protobuf field int32 total_point_count = 1; + * @return int + */ + public function getTotalPointCount() + { + return $this->total_point_count; + } + + /** + * The number of points in the request. + * + * Generated from protobuf field int32 total_point_count = 1; + * @param int $var + * @return $this + */ + public function setTotalPointCount($var) + { + GPBUtil::checkInt32($var); + $this->total_point_count = $var; + + return $this; + } + + /** + * The number of points that were successfully written. + * + * Generated from protobuf field int32 success_point_count = 2; + * @return int + */ + public function getSuccessPointCount() + { + return $this->success_point_count; + } + + /** + * The number of points that were successfully written. + * + * Generated from protobuf field int32 success_point_count = 2; + * @param int $var + * @return $this + */ + public function setSuccessPointCount($var) + { + GPBUtil::checkInt32($var); + $this->success_point_count = $var; + + return $this; + } + + /** + * The number of points that failed to be written. Order is not guaranteed. + * + * Generated from protobuf field repeated .google.monitoring.v3.CreateTimeSeriesSummary.Error errors = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getErrors() + { + return $this->errors; + } + + /** + * The number of points that failed to be written. Order is not guaranteed. + * + * Generated from protobuf field repeated .google.monitoring.v3.CreateTimeSeriesSummary.Error errors = 3; + * @param array<\Google\Cloud\Monitoring\V3\CreateTimeSeriesSummary\Error>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setErrors($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Monitoring\V3\CreateTimeSeriesSummary\Error::class); + $this->errors = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/CreateTimeSeriesSummary/Error.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/CreateTimeSeriesSummary/Error.php new file mode 100644 index 000000000000..5bd917825b90 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/CreateTimeSeriesSummary/Error.php @@ -0,0 +1,114 @@ +google.monitoring.v3.CreateTimeSeriesSummary.Error + */ +class Error extends \Google\Protobuf\Internal\Message +{ + /** + * The status of the requested write operation. + * + * Generated from protobuf field .google.rpc.Status status = 1; + */ + protected $status = null; + /** + * The number of points that couldn't be written because of `status`. + * + * Generated from protobuf field int32 point_count = 2; + */ + protected $point_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Rpc\Status $status + * The status of the requested write operation. + * @type int $point_count + * The number of points that couldn't be written because of `status`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\MetricService::initOnce(); + parent::__construct($data); + } + + /** + * The status of the requested write operation. + * + * Generated from protobuf field .google.rpc.Status status = 1; + * @return \Google\Rpc\Status|null + */ + public function getStatus() + { + return $this->status; + } + + public function hasStatus() + { + return isset($this->status); + } + + public function clearStatus() + { + unset($this->status); + } + + /** + * The status of the requested write operation. + * + * Generated from protobuf field .google.rpc.Status status = 1; + * @param \Google\Rpc\Status $var + * @return $this + */ + public function setStatus($var) + { + GPBUtil::checkMessage($var, \Google\Rpc\Status::class); + $this->status = $var; + + return $this; + } + + /** + * The number of points that couldn't be written because of `status`. + * + * Generated from protobuf field int32 point_count = 2; + * @return int + */ + public function getPointCount() + { + return $this->point_count; + } + + /** + * The number of points that couldn't be written because of `status`. + * + * Generated from protobuf field int32 point_count = 2; + * @param int $var + * @return $this + */ + public function setPointCount($var) + { + GPBUtil::checkInt32($var); + $this->point_count = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Error::class, \Google\Cloud\Monitoring\V3\CreateTimeSeriesSummary_Error::class); + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/CreateUptimeCheckConfigRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/CreateUptimeCheckConfigRequest.php new file mode 100644 index 000000000000..991e2028b3ae --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/CreateUptimeCheckConfigRequest.php @@ -0,0 +1,142 @@ +google.monitoring.v3.CreateUptimeCheckConfigRequest + */ +class CreateUptimeCheckConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) in which + * to create the Uptime check. The format is: + * projects/[PROJECT_ID_OR_NUMBER] + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The new Uptime check configuration. + * + * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig uptime_check_config = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $uptime_check_config = null; + + /** + * @param string $parent Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) in which + * to create the Uptime check. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER] + * @param \Google\Cloud\Monitoring\V3\UptimeCheckConfig $uptimeCheckConfig Required. The new Uptime check configuration. + * + * @return \Google\Cloud\Monitoring\V3\CreateUptimeCheckConfigRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Monitoring\V3\UptimeCheckConfig $uptimeCheckConfig): self + { + return (new self()) + ->setParent($parent) + ->setUptimeCheckConfig($uptimeCheckConfig); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) in which + * to create the Uptime check. The format is: + * projects/[PROJECT_ID_OR_NUMBER] + * @type \Google\Cloud\Monitoring\V3\UptimeCheckConfig $uptime_check_config + * Required. The new Uptime check configuration. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\UptimeService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) in which + * to create the Uptime check. The format is: + * projects/[PROJECT_ID_OR_NUMBER] + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) in which + * to create the Uptime check. The format is: + * projects/[PROJECT_ID_OR_NUMBER] + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The new Uptime check configuration. + * + * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig uptime_check_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Monitoring\V3\UptimeCheckConfig|null + */ + public function getUptimeCheckConfig() + { + return $this->uptime_check_config; + } + + public function hasUptimeCheckConfig() + { + return isset($this->uptime_check_config); + } + + public function clearUptimeCheckConfig() + { + unset($this->uptime_check_config); + } + + /** + * Required. The new Uptime check configuration. + * + * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig uptime_check_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Monitoring\V3\UptimeCheckConfig $var + * @return $this + */ + public function setUptimeCheckConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\UptimeCheckConfig::class); + $this->uptime_check_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/DeleteAlertPolicyRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/DeleteAlertPolicyRequest.php new file mode 100644 index 000000000000..2333c3a46912 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/DeleteAlertPolicyRequest.php @@ -0,0 +1,93 @@ +google.monitoring.v3.DeleteAlertPolicyRequest + */ +class DeleteAlertPolicyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The alerting policy to delete. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID] + * For more information, see [AlertPolicy][google.monitoring.v3.AlertPolicy]. + * + * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The alerting policy to delete. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID] + * + * For more information, see [AlertPolicy][google.monitoring.v3.AlertPolicy]. Please see + * {@see AlertPolicyServiceClient::alertPolicyName()} for help formatting this field. + * + * @return \Google\Cloud\Monitoring\V3\DeleteAlertPolicyRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The alerting policy to delete. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID] + * For more information, see [AlertPolicy][google.monitoring.v3.AlertPolicy]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\AlertService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The alerting policy to delete. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID] + * For more information, see [AlertPolicy][google.monitoring.v3.AlertPolicy]. + * + * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The alerting policy to delete. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID] + * For more information, see [AlertPolicy][google.monitoring.v3.AlertPolicy]. + * + * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/DeleteGroupRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/DeleteGroupRequest.php new file mode 100644 index 000000000000..b63a0bdb79fe --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/DeleteGroupRequest.php @@ -0,0 +1,130 @@ +google.monitoring.v3.DeleteGroupRequest + */ +class DeleteGroupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The group to delete. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] + * + * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * If this field is true, then the request means to delete a group with all + * its descendants. Otherwise, the request means to delete a group only when + * it has no descendants. The default value is false. + * + * Generated from protobuf field bool recursive = 4; + */ + protected $recursive = false; + + /** + * @param string $name Required. The group to delete. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] + * Please see {@see GroupServiceClient::groupName()} for help formatting this field. + * + * @return \Google\Cloud\Monitoring\V3\DeleteGroupRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The group to delete. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] + * @type bool $recursive + * If this field is true, then the request means to delete a group with all + * its descendants. Otherwise, the request means to delete a group only when + * it has no descendants. The default value is false. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\GroupService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The group to delete. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] + * + * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The group to delete. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] + * + * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * If this field is true, then the request means to delete a group with all + * its descendants. Otherwise, the request means to delete a group only when + * it has no descendants. The default value is false. + * + * Generated from protobuf field bool recursive = 4; + * @return bool + */ + public function getRecursive() + { + return $this->recursive; + } + + /** + * If this field is true, then the request means to delete a group with all + * its descendants. Otherwise, the request means to delete a group only when + * it has no descendants. The default value is false. + * + * Generated from protobuf field bool recursive = 4; + * @param bool $var + * @return $this + */ + public function setRecursive($var) + { + GPBUtil::checkBool($var); + $this->recursive = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/DeleteMetricDescriptorRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/DeleteMetricDescriptorRequest.php new file mode 100644 index 000000000000..3d57dd66af31 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/DeleteMetricDescriptorRequest.php @@ -0,0 +1,103 @@ +google.monitoring.v3.DeleteMetricDescriptorRequest + */ +class DeleteMetricDescriptorRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The metric descriptor on which to execute the request. The format + * is: + * projects/[PROJECT_ID_OR_NUMBER]/metricDescriptors/[METRIC_ID] + * An example of `[METRIC_ID]` is: + * `"custom.googleapis.com/my_test_metric"`. + * + * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The metric descriptor on which to execute the request. The format + * is: + * + * projects/[PROJECT_ID_OR_NUMBER]/metricDescriptors/[METRIC_ID] + * + * An example of `[METRIC_ID]` is: + * `"custom.googleapis.com/my_test_metric"`. Please see + * {@see MetricServiceClient::metricDescriptorName()} for help formatting this field. + * + * @return \Google\Cloud\Monitoring\V3\DeleteMetricDescriptorRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The metric descriptor on which to execute the request. The format + * is: + * projects/[PROJECT_ID_OR_NUMBER]/metricDescriptors/[METRIC_ID] + * An example of `[METRIC_ID]` is: + * `"custom.googleapis.com/my_test_metric"`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\MetricService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The metric descriptor on which to execute the request. The format + * is: + * projects/[PROJECT_ID_OR_NUMBER]/metricDescriptors/[METRIC_ID] + * An example of `[METRIC_ID]` is: + * `"custom.googleapis.com/my_test_metric"`. + * + * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The metric descriptor on which to execute the request. The format + * is: + * projects/[PROJECT_ID_OR_NUMBER]/metricDescriptors/[METRIC_ID] + * An example of `[METRIC_ID]` is: + * `"custom.googleapis.com/my_test_metric"`. + * + * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/DeleteNotificationChannelRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/DeleteNotificationChannelRequest.php new file mode 100644 index 000000000000..d547bd360b46 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/DeleteNotificationChannelRequest.php @@ -0,0 +1,138 @@ +google.monitoring.v3.DeleteNotificationChannelRequest + */ +class DeleteNotificationChannelRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The channel for which to execute the request. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID] + * + * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * If true, the notification channel will be deleted regardless of its + * use in alert policies (the policies will be updated to remove the + * channel). If false, this operation will fail if the notification channel + * is referenced by existing alerting policies. + * + * Generated from protobuf field bool force = 5; + */ + protected $force = false; + + /** + * @param string $name Required. The channel for which to execute the request. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID] + * Please see {@see NotificationChannelServiceClient::notificationChannelName()} for help formatting this field. + * @param bool $force If true, the notification channel will be deleted regardless of its + * use in alert policies (the policies will be updated to remove the + * channel). If false, this operation will fail if the notification channel + * is referenced by existing alerting policies. + * + * @return \Google\Cloud\Monitoring\V3\DeleteNotificationChannelRequest + * + * @experimental + */ + public static function build(string $name, bool $force): self + { + return (new self()) + ->setName($name) + ->setForce($force); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The channel for which to execute the request. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID] + * @type bool $force + * If true, the notification channel will be deleted regardless of its + * use in alert policies (the policies will be updated to remove the + * channel). If false, this operation will fail if the notification channel + * is referenced by existing alerting policies. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\NotificationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The channel for which to execute the request. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID] + * + * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The channel for which to execute the request. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID] + * + * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * If true, the notification channel will be deleted regardless of its + * use in alert policies (the policies will be updated to remove the + * channel). If false, this operation will fail if the notification channel + * is referenced by existing alerting policies. + * + * Generated from protobuf field bool force = 5; + * @return bool + */ + public function getForce() + { + return $this->force; + } + + /** + * If true, the notification channel will be deleted regardless of its + * use in alert policies (the policies will be updated to remove the + * channel). If false, this operation will fail if the notification channel + * is referenced by existing alerting policies. + * + * Generated from protobuf field bool force = 5; + * @param bool $var + * @return $this + */ + public function setForce($var) + { + GPBUtil::checkBool($var); + $this->force = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/DeleteServiceLevelObjectiveRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/DeleteServiceLevelObjectiveRequest.php new file mode 100644 index 000000000000..8771b8fb4ab7 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/DeleteServiceLevelObjectiveRequest.php @@ -0,0 +1,92 @@ +google.monitoring.v3.DeleteServiceLevelObjectiveRequest + */ +class DeleteServiceLevelObjectiveRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the `ServiceLevelObjective` to delete. The + * format is: + * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME] + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Resource name of the `ServiceLevelObjective` to delete. The + * format is: + * + * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME] + * Please see {@see ServiceMonitoringServiceClient::serviceLevelObjectiveName()} for help formatting this field. + * + * @return \Google\Cloud\Monitoring\V3\DeleteServiceLevelObjectiveRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Resource name of the `ServiceLevelObjective` to delete. The + * format is: + * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME] + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\ServiceService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the `ServiceLevelObjective` to delete. The + * format is: + * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME] + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Resource name of the `ServiceLevelObjective` to delete. The + * format is: + * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME] + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/DeleteServiceRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/DeleteServiceRequest.php new file mode 100644 index 000000000000..378fecd0724b --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/DeleteServiceRequest.php @@ -0,0 +1,87 @@ +google.monitoring.v3.DeleteServiceRequest + */ +class DeleteServiceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the `Service` to delete. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Resource name of the `Service` to delete. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] + * Please see {@see ServiceMonitoringServiceClient::serviceName()} for help formatting this field. + * + * @return \Google\Cloud\Monitoring\V3\DeleteServiceRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Resource name of the `Service` to delete. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\ServiceService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the `Service` to delete. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Resource name of the `Service` to delete. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/DeleteUptimeCheckConfigRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/DeleteUptimeCheckConfigRequest.php new file mode 100644 index 000000000000..dfda97aa0167 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/DeleteUptimeCheckConfigRequest.php @@ -0,0 +1,87 @@ +google.monitoring.v3.DeleteUptimeCheckConfigRequest + */ +class DeleteUptimeCheckConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The Uptime check configuration to delete. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/uptimeCheckConfigs/[UPTIME_CHECK_ID] + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The Uptime check configuration to delete. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER]/uptimeCheckConfigs/[UPTIME_CHECK_ID] + * Please see {@see UptimeCheckServiceClient::uptimeCheckConfigName()} for help formatting this field. + * + * @return \Google\Cloud\Monitoring\V3\DeleteUptimeCheckConfigRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The Uptime check configuration to delete. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/uptimeCheckConfigs/[UPTIME_CHECK_ID] + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\UptimeService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The Uptime check configuration to delete. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/uptimeCheckConfigs/[UPTIME_CHECK_ID] + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The Uptime check configuration to delete. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/uptimeCheckConfigs/[UPTIME_CHECK_ID] + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/DistributionCut.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/DistributionCut.php new file mode 100644 index 000000000000..cffd93e1651b --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/DistributionCut.php @@ -0,0 +1,127 @@ +google.monitoring.v3.DistributionCut + */ +class DistributionCut extends \Google\Protobuf\Internal\Message +{ + /** + * A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) + * specifying a `TimeSeries` aggregating values. Must have `ValueType = + * DISTRIBUTION` and `MetricKind = DELTA` or `MetricKind = CUMULATIVE`. + * + * Generated from protobuf field string distribution_filter = 4; + */ + protected $distribution_filter = ''; + /** + * Range of values considered "good." For a one-sided range, set one bound to + * an infinite value. + * + * Generated from protobuf field .google.monitoring.v3.Range range = 5; + */ + protected $range = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $distribution_filter + * A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) + * specifying a `TimeSeries` aggregating values. Must have `ValueType = + * DISTRIBUTION` and `MetricKind = DELTA` or `MetricKind = CUMULATIVE`. + * @type \Google\Cloud\Monitoring\V3\Range $range + * Range of values considered "good." For a one-sided range, set one bound to + * an infinite value. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\Service::initOnce(); + parent::__construct($data); + } + + /** + * A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) + * specifying a `TimeSeries` aggregating values. Must have `ValueType = + * DISTRIBUTION` and `MetricKind = DELTA` or `MetricKind = CUMULATIVE`. + * + * Generated from protobuf field string distribution_filter = 4; + * @return string + */ + public function getDistributionFilter() + { + return $this->distribution_filter; + } + + /** + * A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) + * specifying a `TimeSeries` aggregating values. Must have `ValueType = + * DISTRIBUTION` and `MetricKind = DELTA` or `MetricKind = CUMULATIVE`. + * + * Generated from protobuf field string distribution_filter = 4; + * @param string $var + * @return $this + */ + public function setDistributionFilter($var) + { + GPBUtil::checkString($var, True); + $this->distribution_filter = $var; + + return $this; + } + + /** + * Range of values considered "good." For a one-sided range, set one bound to + * an infinite value. + * + * Generated from protobuf field .google.monitoring.v3.Range range = 5; + * @return \Google\Cloud\Monitoring\V3\Range|null + */ + public function getRange() + { + return $this->range; + } + + public function hasRange() + { + return isset($this->range); + } + + public function clearRange() + { + unset($this->range); + } + + /** + * Range of values considered "good." For a one-sided range, set one bound to + * an infinite value. + * + * Generated from protobuf field .google.monitoring.v3.Range range = 5; + * @param \Google\Cloud\Monitoring\V3\Range $var + * @return $this + */ + public function setRange($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\Range::class); + $this->range = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/DroppedLabels.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/DroppedLabels.php new file mode 100644 index 000000000000..4fb73d3bdd71 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/DroppedLabels.php @@ -0,0 +1,80 @@ +google.monitoring.v3.DroppedLabels + */ +class DroppedLabels extends \Google\Protobuf\Internal\Message +{ + /** + * Map from label to its value, for all labels dropped in any aggregation. + * + * Generated from protobuf field map label = 1; + */ + private $label; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\MapField $label + * Map from label to its value, for all labels dropped in any aggregation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\DroppedLabels::initOnce(); + parent::__construct($data); + } + + /** + * Map from label to its value, for all labels dropped in any aggregation. + * + * Generated from protobuf field map label = 1; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabel() + { + return $this->label; + } + + /** + * Map from label to its value, for all labels dropped in any aggregation. + * + * Generated from protobuf field map label = 1; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabel($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->label = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GetAlertPolicyRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GetAlertPolicyRequest.php new file mode 100644 index 000000000000..573ae71a8ad5 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GetAlertPolicyRequest.php @@ -0,0 +1,87 @@ +google.monitoring.v3.GetAlertPolicyRequest + */ +class GetAlertPolicyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The alerting policy to retrieve. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID] + * + * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The alerting policy to retrieve. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID] + * Please see {@see AlertPolicyServiceClient::alertPolicyName()} for help formatting this field. + * + * @return \Google\Cloud\Monitoring\V3\GetAlertPolicyRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The alerting policy to retrieve. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID] + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\AlertService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The alerting policy to retrieve. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID] + * + * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The alerting policy to retrieve. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID] + * + * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GetGroupRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GetGroupRequest.php new file mode 100644 index 000000000000..da9c56f0a13a --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GetGroupRequest.php @@ -0,0 +1,87 @@ +google.monitoring.v3.GetGroupRequest + */ +class GetGroupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The group to retrieve. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] + * + * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The group to retrieve. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] + * Please see {@see GroupServiceClient::groupName()} for help formatting this field. + * + * @return \Google\Cloud\Monitoring\V3\GetGroupRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The group to retrieve. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\GroupService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The group to retrieve. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] + * + * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The group to retrieve. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] + * + * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GetMetricDescriptorRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GetMetricDescriptorRequest.php new file mode 100644 index 000000000000..360bdfac4cc5 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GetMetricDescriptorRequest.php @@ -0,0 +1,103 @@ +google.monitoring.v3.GetMetricDescriptorRequest + */ +class GetMetricDescriptorRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The metric descriptor on which to execute the request. The format + * is: + * projects/[PROJECT_ID_OR_NUMBER]/metricDescriptors/[METRIC_ID] + * An example value of `[METRIC_ID]` is + * `"compute.googleapis.com/instance/disk/read_bytes_count"`. + * + * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The metric descriptor on which to execute the request. The format + * is: + * + * projects/[PROJECT_ID_OR_NUMBER]/metricDescriptors/[METRIC_ID] + * + * An example value of `[METRIC_ID]` is + * `"compute.googleapis.com/instance/disk/read_bytes_count"`. Please see + * {@see MetricServiceClient::metricDescriptorName()} for help formatting this field. + * + * @return \Google\Cloud\Monitoring\V3\GetMetricDescriptorRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The metric descriptor on which to execute the request. The format + * is: + * projects/[PROJECT_ID_OR_NUMBER]/metricDescriptors/[METRIC_ID] + * An example value of `[METRIC_ID]` is + * `"compute.googleapis.com/instance/disk/read_bytes_count"`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\MetricService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The metric descriptor on which to execute the request. The format + * is: + * projects/[PROJECT_ID_OR_NUMBER]/metricDescriptors/[METRIC_ID] + * An example value of `[METRIC_ID]` is + * `"compute.googleapis.com/instance/disk/read_bytes_count"`. + * + * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The metric descriptor on which to execute the request. The format + * is: + * projects/[PROJECT_ID_OR_NUMBER]/metricDescriptors/[METRIC_ID] + * An example value of `[METRIC_ID]` is + * `"compute.googleapis.com/instance/disk/read_bytes_count"`. + * + * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GetMonitoredResourceDescriptorRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GetMonitoredResourceDescriptorRequest.php new file mode 100644 index 000000000000..82d4800c5e15 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GetMonitoredResourceDescriptorRequest.php @@ -0,0 +1,98 @@ +google.monitoring.v3.GetMonitoredResourceDescriptorRequest + */ +class GetMonitoredResourceDescriptorRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The monitored resource descriptor to get. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/monitoredResourceDescriptors/[RESOURCE_TYPE] + * The `[RESOURCE_TYPE]` is a predefined type, such as + * `cloudsql_database`. + * + * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The monitored resource descriptor to get. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER]/monitoredResourceDescriptors/[RESOURCE_TYPE] + * + * The `[RESOURCE_TYPE]` is a predefined type, such as + * `cloudsql_database`. Please see + * {@see MetricServiceClient::monitoredResourceDescriptorName()} for help formatting this field. + * + * @return \Google\Cloud\Monitoring\V3\GetMonitoredResourceDescriptorRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The monitored resource descriptor to get. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/monitoredResourceDescriptors/[RESOURCE_TYPE] + * The `[RESOURCE_TYPE]` is a predefined type, such as + * `cloudsql_database`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\MetricService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The monitored resource descriptor to get. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/monitoredResourceDescriptors/[RESOURCE_TYPE] + * The `[RESOURCE_TYPE]` is a predefined type, such as + * `cloudsql_database`. + * + * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The monitored resource descriptor to get. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/monitoredResourceDescriptors/[RESOURCE_TYPE] + * The `[RESOURCE_TYPE]` is a predefined type, such as + * `cloudsql_database`. + * + * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GetNotificationChannelDescriptorRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GetNotificationChannelDescriptorRequest.php new file mode 100644 index 000000000000..f7ff869b7298 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GetNotificationChannelDescriptorRequest.php @@ -0,0 +1,87 @@ +google.monitoring.v3.GetNotificationChannelDescriptorRequest + */ +class GetNotificationChannelDescriptorRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The channel type for which to execute the request. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/notificationChannelDescriptors/[CHANNEL_TYPE] + * + * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The channel type for which to execute the request. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER]/notificationChannelDescriptors/[CHANNEL_TYPE] + * Please see {@see NotificationChannelServiceClient::notificationChannelDescriptorName()} for help formatting this field. + * + * @return \Google\Cloud\Monitoring\V3\GetNotificationChannelDescriptorRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The channel type for which to execute the request. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/notificationChannelDescriptors/[CHANNEL_TYPE] + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\NotificationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The channel type for which to execute the request. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/notificationChannelDescriptors/[CHANNEL_TYPE] + * + * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The channel type for which to execute the request. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/notificationChannelDescriptors/[CHANNEL_TYPE] + * + * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GetNotificationChannelRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GetNotificationChannelRequest.php new file mode 100644 index 000000000000..708a1446cd9c --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GetNotificationChannelRequest.php @@ -0,0 +1,87 @@ +google.monitoring.v3.GetNotificationChannelRequest + */ +class GetNotificationChannelRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The channel for which to execute the request. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID] + * + * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The channel for which to execute the request. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID] + * Please see {@see NotificationChannelServiceClient::notificationChannelName()} for help formatting this field. + * + * @return \Google\Cloud\Monitoring\V3\GetNotificationChannelRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The channel for which to execute the request. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID] + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\NotificationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The channel for which to execute the request. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID] + * + * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The channel for which to execute the request. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID] + * + * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GetNotificationChannelVerificationCodeRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GetNotificationChannelVerificationCodeRequest.php new file mode 100644 index 000000000000..acb10877c211 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GetNotificationChannelVerificationCodeRequest.php @@ -0,0 +1,167 @@ +google.monitoring.v3.GetNotificationChannelVerificationCodeRequest + */ +class GetNotificationChannelVerificationCodeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The notification channel for which a verification code is to be + * generated and retrieved. This must name a channel that is already verified; + * if the specified channel is not verified, the request will fail. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * The desired expiration time. If specified, the API will guarantee that + * the returned code will not be valid after the specified timestamp; + * however, the API cannot guarantee that the returned code will be + * valid for at least as long as the requested time (the API puts an upper + * bound on the amount of time for which a code may be valid). If omitted, + * a default expiration will be used, which may be less than the max + * permissible expiration (so specifying an expiration may extend the + * code's lifetime over omitting an expiration, even though the API does + * impose an upper limit on the maximum expiration that is permitted). + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 2; + */ + protected $expire_time = null; + + /** + * @param string $name Required. The notification channel for which a verification code is to be + * generated and retrieved. This must name a channel that is already verified; + * if the specified channel is not verified, the request will fail. Please see + * {@see NotificationChannelServiceClient::notificationChannelName()} for help formatting this field. + * + * @return \Google\Cloud\Monitoring\V3\GetNotificationChannelVerificationCodeRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The notification channel for which a verification code is to be + * generated and retrieved. This must name a channel that is already verified; + * if the specified channel is not verified, the request will fail. + * @type \Google\Protobuf\Timestamp $expire_time + * The desired expiration time. If specified, the API will guarantee that + * the returned code will not be valid after the specified timestamp; + * however, the API cannot guarantee that the returned code will be + * valid for at least as long as the requested time (the API puts an upper + * bound on the amount of time for which a code may be valid). If omitted, + * a default expiration will be used, which may be less than the max + * permissible expiration (so specifying an expiration may extend the + * code's lifetime over omitting an expiration, even though the API does + * impose an upper limit on the maximum expiration that is permitted). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\NotificationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The notification channel for which a verification code is to be + * generated and retrieved. This must name a channel that is already verified; + * if the specified channel is not verified, the request will fail. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The notification channel for which a verification code is to be + * generated and retrieved. This must name a channel that is already verified; + * if the specified channel is not verified, the request will fail. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The desired expiration time. If specified, the API will guarantee that + * the returned code will not be valid after the specified timestamp; + * however, the API cannot guarantee that the returned code will be + * valid for at least as long as the requested time (the API puts an upper + * bound on the amount of time for which a code may be valid). If omitted, + * a default expiration will be used, which may be less than the max + * permissible expiration (so specifying an expiration may extend the + * code's lifetime over omitting an expiration, even though the API does + * impose an upper limit on the maximum expiration that is permitted). + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getExpireTime() + { + return $this->expire_time; + } + + public function hasExpireTime() + { + return isset($this->expire_time); + } + + public function clearExpireTime() + { + unset($this->expire_time); + } + + /** + * The desired expiration time. If specified, the API will guarantee that + * the returned code will not be valid after the specified timestamp; + * however, the API cannot guarantee that the returned code will be + * valid for at least as long as the requested time (the API puts an upper + * bound on the amount of time for which a code may be valid). If omitted, + * a default expiration will be used, which may be less than the max + * permissible expiration (so specifying an expiration may extend the + * code's lifetime over omitting an expiration, even though the API does + * impose an upper limit on the maximum expiration that is permitted). + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setExpireTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->expire_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GetNotificationChannelVerificationCodeResponse.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GetNotificationChannelVerificationCodeResponse.php new file mode 100644 index 000000000000..b62d064177a3 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GetNotificationChannelVerificationCodeResponse.php @@ -0,0 +1,131 @@ +google.monitoring.v3.GetNotificationChannelVerificationCodeResponse + */ +class GetNotificationChannelVerificationCodeResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The verification code, which may be used to verify other channels + * that have an equivalent identity (i.e. other channels of the same + * type with the same fingerprint such as other email channels with + * the same email address or other sms channels with the same number). + * + * Generated from protobuf field string code = 1; + */ + protected $code = ''; + /** + * The expiration time associated with the code that was returned. If + * an expiration was provided in the request, this is the minimum of the + * requested expiration in the request and the max permitted expiration. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 2; + */ + protected $expire_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $code + * The verification code, which may be used to verify other channels + * that have an equivalent identity (i.e. other channels of the same + * type with the same fingerprint such as other email channels with + * the same email address or other sms channels with the same number). + * @type \Google\Protobuf\Timestamp $expire_time + * The expiration time associated with the code that was returned. If + * an expiration was provided in the request, this is the minimum of the + * requested expiration in the request and the max permitted expiration. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\NotificationService::initOnce(); + parent::__construct($data); + } + + /** + * The verification code, which may be used to verify other channels + * that have an equivalent identity (i.e. other channels of the same + * type with the same fingerprint such as other email channels with + * the same email address or other sms channels with the same number). + * + * Generated from protobuf field string code = 1; + * @return string + */ + public function getCode() + { + return $this->code; + } + + /** + * The verification code, which may be used to verify other channels + * that have an equivalent identity (i.e. other channels of the same + * type with the same fingerprint such as other email channels with + * the same email address or other sms channels with the same number). + * + * Generated from protobuf field string code = 1; + * @param string $var + * @return $this + */ + public function setCode($var) + { + GPBUtil::checkString($var, True); + $this->code = $var; + + return $this; + } + + /** + * The expiration time associated with the code that was returned. If + * an expiration was provided in the request, this is the minimum of the + * requested expiration in the request and the max permitted expiration. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getExpireTime() + { + return $this->expire_time; + } + + public function hasExpireTime() + { + return isset($this->expire_time); + } + + public function clearExpireTime() + { + unset($this->expire_time); + } + + /** + * The expiration time associated with the code that was returned. If + * an expiration was provided in the request, this is the minimum of the + * requested expiration in the request and the max permitted expiration. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setExpireTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->expire_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GetServiceLevelObjectiveRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GetServiceLevelObjectiveRequest.php new file mode 100644 index 000000000000..c22d24403f63 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GetServiceLevelObjectiveRequest.php @@ -0,0 +1,138 @@ +google.monitoring.v3.GetServiceLevelObjectiveRequest + */ +class GetServiceLevelObjectiveRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the `ServiceLevelObjective` to get. The format + * is: + * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME] + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * View of the `ServiceLevelObjective` to return. If `DEFAULT`, return the + * `ServiceLevelObjective` as originally defined. If `EXPLICIT` and the + * `ServiceLevelObjective` is defined in terms of a `BasicSli`, replace the + * `BasicSli` with a `RequestBasedSli` spelling out how the SLI is computed. + * + * Generated from protobuf field .google.monitoring.v3.ServiceLevelObjective.View view = 2; + */ + protected $view = 0; + + /** + * @param string $name Required. Resource name of the `ServiceLevelObjective` to get. The format + * is: + * + * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME] + * Please see {@see ServiceMonitoringServiceClient::serviceLevelObjectiveName()} for help formatting this field. + * + * @return \Google\Cloud\Monitoring\V3\GetServiceLevelObjectiveRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Resource name of the `ServiceLevelObjective` to get. The format + * is: + * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME] + * @type int $view + * View of the `ServiceLevelObjective` to return. If `DEFAULT`, return the + * `ServiceLevelObjective` as originally defined. If `EXPLICIT` and the + * `ServiceLevelObjective` is defined in terms of a `BasicSli`, replace the + * `BasicSli` with a `RequestBasedSli` spelling out how the SLI is computed. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\ServiceService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the `ServiceLevelObjective` to get. The format + * is: + * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME] + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Resource name of the `ServiceLevelObjective` to get. The format + * is: + * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME] + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * View of the `ServiceLevelObjective` to return. If `DEFAULT`, return the + * `ServiceLevelObjective` as originally defined. If `EXPLICIT` and the + * `ServiceLevelObjective` is defined in terms of a `BasicSli`, replace the + * `BasicSli` with a `RequestBasedSli` spelling out how the SLI is computed. + * + * Generated from protobuf field .google.monitoring.v3.ServiceLevelObjective.View view = 2; + * @return int + */ + public function getView() + { + return $this->view; + } + + /** + * View of the `ServiceLevelObjective` to return. If `DEFAULT`, return the + * `ServiceLevelObjective` as originally defined. If `EXPLICIT` and the + * `ServiceLevelObjective` is defined in terms of a `BasicSli`, replace the + * `BasicSli` with a `RequestBasedSli` spelling out how the SLI is computed. + * + * Generated from protobuf field .google.monitoring.v3.ServiceLevelObjective.View view = 2; + * @param int $var + * @return $this + */ + public function setView($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Monitoring\V3\ServiceLevelObjective\View::class); + $this->view = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GetServiceRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GetServiceRequest.php new file mode 100644 index 000000000000..6113d513f423 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GetServiceRequest.php @@ -0,0 +1,87 @@ +google.monitoring.v3.GetServiceRequest + */ +class GetServiceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the `Service`. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Resource name of the `Service`. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] + * Please see {@see ServiceMonitoringServiceClient::serviceName()} for help formatting this field. + * + * @return \Google\Cloud\Monitoring\V3\GetServiceRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Resource name of the `Service`. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\ServiceService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the `Service`. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Resource name of the `Service`. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GetSnoozeRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GetSnoozeRequest.php new file mode 100644 index 000000000000..83b9da5e20f6 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GetSnoozeRequest.php @@ -0,0 +1,88 @@ +google.monitoring.v3.GetSnoozeRequest + */ +class GetSnoozeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The ID of the `Snooze` to retrieve. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/snoozes/[SNOOZE_ID] + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The ID of the `Snooze` to retrieve. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER]/snoozes/[SNOOZE_ID] + * Please see {@see SnoozeServiceClient::snoozeName()} for help formatting this field. + * + * @return \Google\Cloud\Monitoring\V3\GetSnoozeRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The ID of the `Snooze` to retrieve. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/snoozes/[SNOOZE_ID] + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\SnoozeService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The ID of the `Snooze` to retrieve. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/snoozes/[SNOOZE_ID] + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The ID of the `Snooze` to retrieve. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/snoozes/[SNOOZE_ID] + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GetUptimeCheckConfigRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GetUptimeCheckConfigRequest.php new file mode 100644 index 000000000000..83b9a3f2eaa3 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GetUptimeCheckConfigRequest.php @@ -0,0 +1,87 @@ +google.monitoring.v3.GetUptimeCheckConfigRequest + */ +class GetUptimeCheckConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The Uptime check configuration to retrieve. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/uptimeCheckConfigs/[UPTIME_CHECK_ID] + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The Uptime check configuration to retrieve. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER]/uptimeCheckConfigs/[UPTIME_CHECK_ID] + * Please see {@see UptimeCheckServiceClient::uptimeCheckConfigName()} for help formatting this field. + * + * @return \Google\Cloud\Monitoring\V3\GetUptimeCheckConfigRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The Uptime check configuration to retrieve. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/uptimeCheckConfigs/[UPTIME_CHECK_ID] + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\UptimeService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The Uptime check configuration to retrieve. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/uptimeCheckConfigs/[UPTIME_CHECK_ID] + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The Uptime check configuration to retrieve. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/uptimeCheckConfigs/[UPTIME_CHECK_ID] + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Group.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Group.php new file mode 100644 index 000000000000..4a768d02d746 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Group.php @@ -0,0 +1,257 @@ +google.monitoring.v3.Group + */ +class Group extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The name of this group. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] + * When creating a group, this field is ignored and a new name is created + * consisting of the project specified in the call to `CreateGroup` + * and a unique `[GROUP_ID]` that is generated automatically. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * A user-assigned name for this group, used only for display purposes. + * + * Generated from protobuf field string display_name = 2; + */ + protected $display_name = ''; + /** + * The name of the group's parent, if it has one. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] + * For groups with no parent, `parent_name` is the empty string, `""`. + * + * Generated from protobuf field string parent_name = 3; + */ + protected $parent_name = ''; + /** + * The filter used to determine which monitored resources belong to this + * group. + * + * Generated from protobuf field string filter = 5; + */ + protected $filter = ''; + /** + * If true, the members of this group are considered to be a cluster. + * The system can perform additional analysis on groups that are clusters. + * + * Generated from protobuf field bool is_cluster = 6; + */ + protected $is_cluster = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The name of this group. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] + * When creating a group, this field is ignored and a new name is created + * consisting of the project specified in the call to `CreateGroup` + * and a unique `[GROUP_ID]` that is generated automatically. + * @type string $display_name + * A user-assigned name for this group, used only for display purposes. + * @type string $parent_name + * The name of the group's parent, if it has one. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] + * For groups with no parent, `parent_name` is the empty string, `""`. + * @type string $filter + * The filter used to determine which monitored resources belong to this + * group. + * @type bool $is_cluster + * If true, the members of this group are considered to be a cluster. + * The system can perform additional analysis on groups that are clusters. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\Group::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The name of this group. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] + * When creating a group, this field is ignored and a new name is created + * consisting of the project specified in the call to `CreateGroup` + * and a unique `[GROUP_ID]` that is generated automatically. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The name of this group. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] + * When creating a group, this field is ignored and a new name is created + * consisting of the project specified in the call to `CreateGroup` + * and a unique `[GROUP_ID]` that is generated automatically. + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * A user-assigned name for this group, used only for display purposes. + * + * Generated from protobuf field string display_name = 2; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * A user-assigned name for this group, used only for display purposes. + * + * Generated from protobuf field string display_name = 2; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * The name of the group's parent, if it has one. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] + * For groups with no parent, `parent_name` is the empty string, `""`. + * + * Generated from protobuf field string parent_name = 3; + * @return string + */ + public function getParentName() + { + return $this->parent_name; + } + + /** + * The name of the group's parent, if it has one. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] + * For groups with no parent, `parent_name` is the empty string, `""`. + * + * Generated from protobuf field string parent_name = 3; + * @param string $var + * @return $this + */ + public function setParentName($var) + { + GPBUtil::checkString($var, True); + $this->parent_name = $var; + + return $this; + } + + /** + * The filter used to determine which monitored resources belong to this + * group. + * + * Generated from protobuf field string filter = 5; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * The filter used to determine which monitored resources belong to this + * group. + * + * Generated from protobuf field string filter = 5; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * If true, the members of this group are considered to be a cluster. + * The system can perform additional analysis on groups that are clusters. + * + * Generated from protobuf field bool is_cluster = 6; + * @return bool + */ + public function getIsCluster() + { + return $this->is_cluster; + } + + /** + * If true, the members of this group are considered to be a cluster. + * The system can perform additional analysis on groups that are clusters. + * + * Generated from protobuf field bool is_cluster = 6; + * @param bool $var + * @return $this + */ + public function setIsCluster($var) + { + GPBUtil::checkBool($var); + $this->is_cluster = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GroupResourceType.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GroupResourceType.php new file mode 100644 index 000000000000..ddf9d0eee1a8 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GroupResourceType.php @@ -0,0 +1,66 @@ +google.monitoring.v3.GroupResourceType + */ +class GroupResourceType +{ + /** + * Default value (not valid). + * + * Generated from protobuf enum RESOURCE_TYPE_UNSPECIFIED = 0; + */ + const RESOURCE_TYPE_UNSPECIFIED = 0; + /** + * A group of instances from Google Cloud Platform (GCP) or + * Amazon Web Services (AWS). + * + * Generated from protobuf enum INSTANCE = 1; + */ + const INSTANCE = 1; + /** + * A group of Amazon ELB load balancers. + * + * Generated from protobuf enum AWS_ELB_LOAD_BALANCER = 2; + */ + const AWS_ELB_LOAD_BALANCER = 2; + + private static $valueToName = [ + self::RESOURCE_TYPE_UNSPECIFIED => 'RESOURCE_TYPE_UNSPECIFIED', + self::INSTANCE => 'INSTANCE', + self::AWS_ELB_LOAD_BALANCER => 'AWS_ELB_LOAD_BALANCER', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/InternalChecker.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/InternalChecker.php new file mode 100644 index 000000000000..19273fdc3f2b --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/InternalChecker.php @@ -0,0 +1,271 @@ +google.monitoring.v3.InternalChecker + */ +class InternalChecker extends \Google\Protobuf\Internal\Message +{ + /** + * A unique resource name for this InternalChecker. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/internalCheckers/[INTERNAL_CHECKER_ID] + * `[PROJECT_ID_OR_NUMBER]` is the Cloud Monitoring Metrics Scope project for + * the Uptime check config associated with the internal checker. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The checker's human-readable name. The display name + * should be unique within a Cloud Monitoring Metrics Scope in order to make + * it easier to identify; however, uniqueness is not enforced. + * + * Generated from protobuf field string display_name = 2; + */ + protected $display_name = ''; + /** + * The [GCP VPC network](https://cloud.google.com/vpc/docs/vpc) where the + * internal resource lives (ex: "default"). + * + * Generated from protobuf field string network = 3; + */ + protected $network = ''; + /** + * The GCP zone the Uptime check should egress from. Only respected for + * internal Uptime checks, where internal_network is specified. + * + * Generated from protobuf field string gcp_zone = 4; + */ + protected $gcp_zone = ''; + /** + * The GCP project ID where the internal checker lives. Not necessary + * the same as the Metrics Scope project. + * + * Generated from protobuf field string peer_project_id = 6; + */ + protected $peer_project_id = ''; + /** + * The current operational state of the internal checker. + * + * Generated from protobuf field .google.monitoring.v3.InternalChecker.State state = 7; + */ + protected $state = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * A unique resource name for this InternalChecker. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/internalCheckers/[INTERNAL_CHECKER_ID] + * `[PROJECT_ID_OR_NUMBER]` is the Cloud Monitoring Metrics Scope project for + * the Uptime check config associated with the internal checker. + * @type string $display_name + * The checker's human-readable name. The display name + * should be unique within a Cloud Monitoring Metrics Scope in order to make + * it easier to identify; however, uniqueness is not enforced. + * @type string $network + * The [GCP VPC network](https://cloud.google.com/vpc/docs/vpc) where the + * internal resource lives (ex: "default"). + * @type string $gcp_zone + * The GCP zone the Uptime check should egress from. Only respected for + * internal Uptime checks, where internal_network is specified. + * @type string $peer_project_id + * The GCP project ID where the internal checker lives. Not necessary + * the same as the Metrics Scope project. + * @type int $state + * The current operational state of the internal checker. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\Uptime::initOnce(); + parent::__construct($data); + } + + /** + * A unique resource name for this InternalChecker. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/internalCheckers/[INTERNAL_CHECKER_ID] + * `[PROJECT_ID_OR_NUMBER]` is the Cloud Monitoring Metrics Scope project for + * the Uptime check config associated with the internal checker. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * A unique resource name for this InternalChecker. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/internalCheckers/[INTERNAL_CHECKER_ID] + * `[PROJECT_ID_OR_NUMBER]` is the Cloud Monitoring Metrics Scope project for + * the Uptime check config associated with the internal checker. + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The checker's human-readable name. The display name + * should be unique within a Cloud Monitoring Metrics Scope in order to make + * it easier to identify; however, uniqueness is not enforced. + * + * Generated from protobuf field string display_name = 2; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * The checker's human-readable name. The display name + * should be unique within a Cloud Monitoring Metrics Scope in order to make + * it easier to identify; however, uniqueness is not enforced. + * + * Generated from protobuf field string display_name = 2; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * The [GCP VPC network](https://cloud.google.com/vpc/docs/vpc) where the + * internal resource lives (ex: "default"). + * + * Generated from protobuf field string network = 3; + * @return string + */ + public function getNetwork() + { + return $this->network; + } + + /** + * The [GCP VPC network](https://cloud.google.com/vpc/docs/vpc) where the + * internal resource lives (ex: "default"). + * + * Generated from protobuf field string network = 3; + * @param string $var + * @return $this + */ + public function setNetwork($var) + { + GPBUtil::checkString($var, True); + $this->network = $var; + + return $this; + } + + /** + * The GCP zone the Uptime check should egress from. Only respected for + * internal Uptime checks, where internal_network is specified. + * + * Generated from protobuf field string gcp_zone = 4; + * @return string + */ + public function getGcpZone() + { + return $this->gcp_zone; + } + + /** + * The GCP zone the Uptime check should egress from. Only respected for + * internal Uptime checks, where internal_network is specified. + * + * Generated from protobuf field string gcp_zone = 4; + * @param string $var + * @return $this + */ + public function setGcpZone($var) + { + GPBUtil::checkString($var, True); + $this->gcp_zone = $var; + + return $this; + } + + /** + * The GCP project ID where the internal checker lives. Not necessary + * the same as the Metrics Scope project. + * + * Generated from protobuf field string peer_project_id = 6; + * @return string + */ + public function getPeerProjectId() + { + return $this->peer_project_id; + } + + /** + * The GCP project ID where the internal checker lives. Not necessary + * the same as the Metrics Scope project. + * + * Generated from protobuf field string peer_project_id = 6; + * @param string $var + * @return $this + */ + public function setPeerProjectId($var) + { + GPBUtil::checkString($var, True); + $this->peer_project_id = $var; + + return $this; + } + + /** + * The current operational state of the internal checker. + * + * Generated from protobuf field .google.monitoring.v3.InternalChecker.State state = 7; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * The current operational state of the internal checker. + * + * Generated from protobuf field .google.monitoring.v3.InternalChecker.State state = 7; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Monitoring\V3\InternalChecker\State::class); + $this->state = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/InternalChecker/State.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/InternalChecker/State.php new file mode 100644 index 000000000000..d006a60c773f --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/InternalChecker/State.php @@ -0,0 +1,74 @@ +google.monitoring.v3.InternalChecker.State + */ +class State +{ + /** + * An internal checker should never be in the unspecified state. + * + * Generated from protobuf enum UNSPECIFIED = 0; + */ + const UNSPECIFIED = 0; + /** + * The checker is being created, provisioned, and configured. A checker in + * this state can be returned by `ListInternalCheckers` or + * `GetInternalChecker`, as well as by examining the [long running + * Operation](https://cloud.google.com/apis/design/design_patterns#long_running_operations) + * that created it. + * + * Generated from protobuf enum CREATING = 1; + */ + const CREATING = 1; + /** + * The checker is running and available for use. A checker in this state + * can be returned by `ListInternalCheckers` or `GetInternalChecker` as + * well as by examining the [long running + * Operation](https://cloud.google.com/apis/design/design_patterns#long_running_operations) + * that created it. + * If a checker is being torn down, it is neither visible nor usable, so + * there is no "deleting" or "down" state. + * + * Generated from protobuf enum RUNNING = 2; + */ + const RUNNING = 2; + + private static $valueToName = [ + self::UNSPECIFIED => 'UNSPECIFIED', + self::CREATING => 'CREATING', + self::RUNNING => 'RUNNING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\Monitoring\V3\InternalChecker_State::class); + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/LabelValue.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/LabelValue.php new file mode 100644 index 000000000000..3a66a26a4359 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/LabelValue.php @@ -0,0 +1,141 @@ +google.monitoring.v3.LabelValue + */ +class LabelValue extends \Google\Protobuf\Internal\Message +{ + protected $value; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $bool_value + * A bool label value. + * @type int|string $int64_value + * An int64 label value. + * @type string $string_value + * A string label value. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\Metric::initOnce(); + parent::__construct($data); + } + + /** + * A bool label value. + * + * Generated from protobuf field bool bool_value = 1; + * @return bool + */ + public function getBoolValue() + { + return $this->readOneof(1); + } + + public function hasBoolValue() + { + return $this->hasOneof(1); + } + + /** + * A bool label value. + * + * Generated from protobuf field bool bool_value = 1; + * @param bool $var + * @return $this + */ + public function setBoolValue($var) + { + GPBUtil::checkBool($var); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * An int64 label value. + * + * Generated from protobuf field int64 int64_value = 2; + * @return int|string + */ + public function getInt64Value() + { + return $this->readOneof(2); + } + + public function hasInt64Value() + { + return $this->hasOneof(2); + } + + /** + * An int64 label value. + * + * Generated from protobuf field int64 int64_value = 2; + * @param int|string $var + * @return $this + */ + public function setInt64Value($var) + { + GPBUtil::checkInt64($var); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * A string label value. + * + * Generated from protobuf field string string_value = 3; + * @return string + */ + public function getStringValue() + { + return $this->readOneof(3); + } + + public function hasStringValue() + { + return $this->hasOneof(3); + } + + /** + * A string label value. + * + * Generated from protobuf field string string_value = 3; + * @param string $var + * @return $this + */ + public function setStringValue($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * @return string + */ + public function getValue() + { + return $this->whichOneof("value"); + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListAlertPoliciesRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListAlertPoliciesRequest.php new file mode 100644 index 000000000000..cf35d504f674 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListAlertPoliciesRequest.php @@ -0,0 +1,298 @@ +google.monitoring.v3.ListAlertPoliciesRequest + */ +class ListAlertPoliciesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) whose + * alert policies are to be listed. The format is: + * projects/[PROJECT_ID_OR_NUMBER] + * Note that this field names the parent container in which the alerting + * policies to be listed are stored. To retrieve a single alerting policy + * by name, use the + * [GetAlertPolicy][google.monitoring.v3.AlertPolicyService.GetAlertPolicy] + * operation, instead. + * + * Generated from protobuf field string name = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. If provided, this field specifies the criteria that must be met + * by alert policies to be included in the response. + * For more details, see [sorting and + * filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering). + * + * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. A comma-separated list of fields by which to sort the result. + * Supports the same set of field references as the `filter` field. Entries + * can be prefixed with a minus sign to sort by the field in descending order. + * For more details, see [sorting and + * filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering). + * + * Generated from protobuf field string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + /** + * Optional. The maximum number of results to return in a single response. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. If this field is not empty then it must contain the + * `nextPageToken` value returned by a previous call to this method. Using + * this field causes the method to return more results from the previous + * method call. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * @param string $name Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) whose + * alert policies are to be listed. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER] + * + * Note that this field names the parent container in which the alerting + * policies to be listed are stored. To retrieve a single alerting policy + * by name, use the + * [GetAlertPolicy][google.monitoring.v3.AlertPolicyService.GetAlertPolicy] + * operation, instead. + * + * @return \Google\Cloud\Monitoring\V3\ListAlertPoliciesRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) whose + * alert policies are to be listed. The format is: + * projects/[PROJECT_ID_OR_NUMBER] + * Note that this field names the parent container in which the alerting + * policies to be listed are stored. To retrieve a single alerting policy + * by name, use the + * [GetAlertPolicy][google.monitoring.v3.AlertPolicyService.GetAlertPolicy] + * operation, instead. + * @type string $filter + * Optional. If provided, this field specifies the criteria that must be met + * by alert policies to be included in the response. + * For more details, see [sorting and + * filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering). + * @type string $order_by + * Optional. A comma-separated list of fields by which to sort the result. + * Supports the same set of field references as the `filter` field. Entries + * can be prefixed with a minus sign to sort by the field in descending order. + * For more details, see [sorting and + * filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering). + * @type int $page_size + * Optional. The maximum number of results to return in a single response. + * @type string $page_token + * Optional. If this field is not empty then it must contain the + * `nextPageToken` value returned by a previous call to this method. Using + * this field causes the method to return more results from the previous + * method call. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\AlertService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) whose + * alert policies are to be listed. The format is: + * projects/[PROJECT_ID_OR_NUMBER] + * Note that this field names the parent container in which the alerting + * policies to be listed are stored. To retrieve a single alerting policy + * by name, use the + * [GetAlertPolicy][google.monitoring.v3.AlertPolicyService.GetAlertPolicy] + * operation, instead. + * + * Generated from protobuf field string name = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) whose + * alert policies are to be listed. The format is: + * projects/[PROJECT_ID_OR_NUMBER] + * Note that this field names the parent container in which the alerting + * policies to be listed are stored. To retrieve a single alerting policy + * by name, use the + * [GetAlertPolicy][google.monitoring.v3.AlertPolicyService.GetAlertPolicy] + * operation, instead. + * + * Generated from protobuf field string name = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. If provided, this field specifies the criteria that must be met + * by alert policies to be included in the response. + * For more details, see [sorting and + * filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering). + * + * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. If provided, this field specifies the criteria that must be met + * by alert policies to be included in the response. + * For more details, see [sorting and + * filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering). + * + * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Optional. A comma-separated list of fields by which to sort the result. + * Supports the same set of field references as the `filter` field. Entries + * can be prefixed with a minus sign to sort by the field in descending order. + * For more details, see [sorting and + * filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering). + * + * Generated from protobuf field string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. A comma-separated list of fields by which to sort the result. + * Supports the same set of field references as the `filter` field. Entries + * can be prefixed with a minus sign to sort by the field in descending order. + * For more details, see [sorting and + * filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering). + * + * Generated from protobuf field string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + + /** + * Optional. The maximum number of results to return in a single response. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of results to return in a single response. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. If this field is not empty then it must contain the + * `nextPageToken` value returned by a previous call to this method. Using + * this field causes the method to return more results from the previous + * method call. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. If this field is not empty then it must contain the + * `nextPageToken` value returned by a previous call to this method. Using + * this field causes the method to return more results from the previous + * method call. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListAlertPoliciesResponse.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListAlertPoliciesResponse.php new file mode 100644 index 000000000000..45d31688ec1b --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListAlertPoliciesResponse.php @@ -0,0 +1,147 @@ +google.monitoring.v3.ListAlertPoliciesResponse + */ +class ListAlertPoliciesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The returned alert policies. + * + * Generated from protobuf field repeated .google.monitoring.v3.AlertPolicy alert_policies = 3; + */ + private $alert_policies; + /** + * If there might be more results than were returned, then this field is set + * to a non-empty value. To see the additional results, + * use that value as `page_token` in the next call to this method. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * The total number of alert policies in all pages. This number is only an + * estimate, and may change in subsequent pages. https://aip.dev/158 + * + * Generated from protobuf field int32 total_size = 4; + */ + protected $total_size = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Monitoring\V3\AlertPolicy>|\Google\Protobuf\Internal\RepeatedField $alert_policies + * The returned alert policies. + * @type string $next_page_token + * If there might be more results than were returned, then this field is set + * to a non-empty value. To see the additional results, + * use that value as `page_token` in the next call to this method. + * @type int $total_size + * The total number of alert policies in all pages. This number is only an + * estimate, and may change in subsequent pages. https://aip.dev/158 + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\AlertService::initOnce(); + parent::__construct($data); + } + + /** + * The returned alert policies. + * + * Generated from protobuf field repeated .google.monitoring.v3.AlertPolicy alert_policies = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAlertPolicies() + { + return $this->alert_policies; + } + + /** + * The returned alert policies. + * + * Generated from protobuf field repeated .google.monitoring.v3.AlertPolicy alert_policies = 3; + * @param array<\Google\Cloud\Monitoring\V3\AlertPolicy>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAlertPolicies($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Monitoring\V3\AlertPolicy::class); + $this->alert_policies = $arr; + + return $this; + } + + /** + * If there might be more results than were returned, then this field is set + * to a non-empty value. To see the additional results, + * use that value as `page_token` in the next call to this method. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * If there might be more results than were returned, then this field is set + * to a non-empty value. To see the additional results, + * use that value as `page_token` in the next call to this method. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * The total number of alert policies in all pages. This number is only an + * estimate, and may change in subsequent pages. https://aip.dev/158 + * + * Generated from protobuf field int32 total_size = 4; + * @return int + */ + public function getTotalSize() + { + return $this->total_size; + } + + /** + * The total number of alert policies in all pages. This number is only an + * estimate, and may change in subsequent pages. https://aip.dev/158 + * + * Generated from protobuf field int32 total_size = 4; + * @param int $var + * @return $this + */ + public function setTotalSize($var) + { + GPBUtil::checkInt32($var); + $this->total_size = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListGroupMembersRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListGroupMembersRequest.php new file mode 100644 index 000000000000..876c5364c1a1 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListGroupMembersRequest.php @@ -0,0 +1,277 @@ +google.monitoring.v3.ListGroupMembersRequest + */ +class ListGroupMembersRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The group whose members are listed. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] + * + * Generated from protobuf field string name = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * A positive number that is the maximum number of results to return. + * + * Generated from protobuf field int32 page_size = 3; + */ + protected $page_size = 0; + /** + * If this field is not empty then it must contain the `next_page_token` value + * returned by a previous call to this method. Using this field causes the + * method to return additional results from the previous method call. + * + * Generated from protobuf field string page_token = 4; + */ + protected $page_token = ''; + /** + * An optional [list + * filter](https://cloud.google.com/monitoring/api/learn_more#filtering) + * describing the members to be returned. The filter may reference the type, + * labels, and metadata of monitored resources that comprise the group. For + * example, to return only resources representing Compute Engine VM instances, + * use this filter: + * `resource.type = "gce_instance"` + * + * Generated from protobuf field string filter = 5; + */ + protected $filter = ''; + /** + * An optional time interval for which results should be returned. Only + * members that were part of the group during the specified interval are + * included in the response. If no interval is provided then the group + * membership over the last minute is returned. + * + * Generated from protobuf field .google.monitoring.v3.TimeInterval interval = 6; + */ + protected $interval = null; + + /** + * @param string $name Required. The group whose members are listed. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] + * Please see {@see GroupServiceClient::groupName()} for help formatting this field. + * + * @return \Google\Cloud\Monitoring\V3\ListGroupMembersRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The group whose members are listed. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] + * @type int $page_size + * A positive number that is the maximum number of results to return. + * @type string $page_token + * If this field is not empty then it must contain the `next_page_token` value + * returned by a previous call to this method. Using this field causes the + * method to return additional results from the previous method call. + * @type string $filter + * An optional [list + * filter](https://cloud.google.com/monitoring/api/learn_more#filtering) + * describing the members to be returned. The filter may reference the type, + * labels, and metadata of monitored resources that comprise the group. For + * example, to return only resources representing Compute Engine VM instances, + * use this filter: + * `resource.type = "gce_instance"` + * @type \Google\Cloud\Monitoring\V3\TimeInterval $interval + * An optional time interval for which results should be returned. Only + * members that were part of the group during the specified interval are + * included in the response. If no interval is provided then the group + * membership over the last minute is returned. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\GroupService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The group whose members are listed. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] + * + * Generated from protobuf field string name = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The group whose members are listed. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] + * + * Generated from protobuf field string name = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * A positive number that is the maximum number of results to return. + * + * Generated from protobuf field int32 page_size = 3; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * A positive number that is the maximum number of results to return. + * + * Generated from protobuf field int32 page_size = 3; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * If this field is not empty then it must contain the `next_page_token` value + * returned by a previous call to this method. Using this field causes the + * method to return additional results from the previous method call. + * + * Generated from protobuf field string page_token = 4; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * If this field is not empty then it must contain the `next_page_token` value + * returned by a previous call to this method. Using this field causes the + * method to return additional results from the previous method call. + * + * Generated from protobuf field string page_token = 4; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * An optional [list + * filter](https://cloud.google.com/monitoring/api/learn_more#filtering) + * describing the members to be returned. The filter may reference the type, + * labels, and metadata of monitored resources that comprise the group. For + * example, to return only resources representing Compute Engine VM instances, + * use this filter: + * `resource.type = "gce_instance"` + * + * Generated from protobuf field string filter = 5; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * An optional [list + * filter](https://cloud.google.com/monitoring/api/learn_more#filtering) + * describing the members to be returned. The filter may reference the type, + * labels, and metadata of monitored resources that comprise the group. For + * example, to return only resources representing Compute Engine VM instances, + * use this filter: + * `resource.type = "gce_instance"` + * + * Generated from protobuf field string filter = 5; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * An optional time interval for which results should be returned. Only + * members that were part of the group during the specified interval are + * included in the response. If no interval is provided then the group + * membership over the last minute is returned. + * + * Generated from protobuf field .google.monitoring.v3.TimeInterval interval = 6; + * @return \Google\Cloud\Monitoring\V3\TimeInterval|null + */ + public function getInterval() + { + return $this->interval; + } + + public function hasInterval() + { + return isset($this->interval); + } + + public function clearInterval() + { + unset($this->interval); + } + + /** + * An optional time interval for which results should be returned. Only + * members that were part of the group during the specified interval are + * included in the response. If no interval is provided then the group + * membership over the last minute is returned. + * + * Generated from protobuf field .google.monitoring.v3.TimeInterval interval = 6; + * @param \Google\Cloud\Monitoring\V3\TimeInterval $var + * @return $this + */ + public function setInterval($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\TimeInterval::class); + $this->interval = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListGroupMembersResponse.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListGroupMembersResponse.php new file mode 100644 index 000000000000..8cfc0e8fcd34 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListGroupMembersResponse.php @@ -0,0 +1,143 @@ +google.monitoring.v3.ListGroupMembersResponse + */ +class ListGroupMembersResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A set of monitored resources in the group. + * + * Generated from protobuf field repeated .google.api.MonitoredResource members = 1; + */ + private $members; + /** + * If there are more results than have been returned, then this field is + * set to a non-empty value. To see the additional results, use that value as + * `page_token` in the next call to this method. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * The total number of elements matching this request. + * + * Generated from protobuf field int32 total_size = 3; + */ + protected $total_size = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Api\MonitoredResource>|\Google\Protobuf\Internal\RepeatedField $members + * A set of monitored resources in the group. + * @type string $next_page_token + * If there are more results than have been returned, then this field is + * set to a non-empty value. To see the additional results, use that value as + * `page_token` in the next call to this method. + * @type int $total_size + * The total number of elements matching this request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\GroupService::initOnce(); + parent::__construct($data); + } + + /** + * A set of monitored resources in the group. + * + * Generated from protobuf field repeated .google.api.MonitoredResource members = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMembers() + { + return $this->members; + } + + /** + * A set of monitored resources in the group. + * + * Generated from protobuf field repeated .google.api.MonitoredResource members = 1; + * @param array<\Google\Api\MonitoredResource>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMembers($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Api\MonitoredResource::class); + $this->members = $arr; + + return $this; + } + + /** + * If there are more results than have been returned, then this field is + * set to a non-empty value. To see the additional results, use that value as + * `page_token` in the next call to this method. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * If there are more results than have been returned, then this field is + * set to a non-empty value. To see the additional results, use that value as + * `page_token` in the next call to this method. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * The total number of elements matching this request. + * + * Generated from protobuf field int32 total_size = 3; + * @return int + */ + public function getTotalSize() + { + return $this->total_size; + } + + /** + * The total number of elements matching this request. + * + * Generated from protobuf field int32 total_size = 3; + * @param int $var + * @return $this + */ + public function setTotalSize($var) + { + GPBUtil::checkInt32($var); + $this->total_size = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListGroupsRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListGroupsRequest.php new file mode 100644 index 000000000000..7203ea371000 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListGroupsRequest.php @@ -0,0 +1,316 @@ +google.monitoring.v3.ListGroupsRequest + */ +class ListGroupsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) whose + * groups are to be listed. The format is: + * projects/[PROJECT_ID_OR_NUMBER] + * + * Generated from protobuf field string name = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * A positive number that is the maximum number of results to return. + * + * Generated from protobuf field int32 page_size = 5; + */ + protected $page_size = 0; + /** + * If this field is not empty then it must contain the `next_page_token` value + * returned by a previous call to this method. Using this field causes the + * method to return additional results from the previous method call. + * + * Generated from protobuf field string page_token = 6; + */ + protected $page_token = ''; + protected $filter; + + /** + * @param string $name Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) whose + * groups are to be listed. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER] + * + * @return \Google\Cloud\Monitoring\V3\ListGroupsRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) whose + * groups are to be listed. The format is: + * projects/[PROJECT_ID_OR_NUMBER] + * @type string $children_of_group + * A group name. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] + * Returns groups whose `parent_name` field contains the group + * name. If no groups have this parent, the results are empty. + * @type string $ancestors_of_group + * A group name. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] + * Returns groups that are ancestors of the specified group. + * The groups are returned in order, starting with the immediate parent and + * ending with the most distant ancestor. If the specified group has no + * immediate parent, the results are empty. + * @type string $descendants_of_group + * A group name. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] + * Returns the descendants of the specified group. This is a superset of + * the results returned by the `children_of_group` filter, and includes + * children-of-children, and so forth. + * @type int $page_size + * A positive number that is the maximum number of results to return. + * @type string $page_token + * If this field is not empty then it must contain the `next_page_token` value + * returned by a previous call to this method. Using this field causes the + * method to return additional results from the previous method call. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\GroupService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) whose + * groups are to be listed. The format is: + * projects/[PROJECT_ID_OR_NUMBER] + * + * Generated from protobuf field string name = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) whose + * groups are to be listed. The format is: + * projects/[PROJECT_ID_OR_NUMBER] + * + * Generated from protobuf field string name = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * A group name. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] + * Returns groups whose `parent_name` field contains the group + * name. If no groups have this parent, the results are empty. + * + * Generated from protobuf field string children_of_group = 2 [(.google.api.resource_reference) = { + * @return string + */ + public function getChildrenOfGroup() + { + return $this->readOneof(2); + } + + public function hasChildrenOfGroup() + { + return $this->hasOneof(2); + } + + /** + * A group name. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] + * Returns groups whose `parent_name` field contains the group + * name. If no groups have this parent, the results are empty. + * + * Generated from protobuf field string children_of_group = 2 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setChildrenOfGroup($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * A group name. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] + * Returns groups that are ancestors of the specified group. + * The groups are returned in order, starting with the immediate parent and + * ending with the most distant ancestor. If the specified group has no + * immediate parent, the results are empty. + * + * Generated from protobuf field string ancestors_of_group = 3 [(.google.api.resource_reference) = { + * @return string + */ + public function getAncestorsOfGroup() + { + return $this->readOneof(3); + } + + public function hasAncestorsOfGroup() + { + return $this->hasOneof(3); + } + + /** + * A group name. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] + * Returns groups that are ancestors of the specified group. + * The groups are returned in order, starting with the immediate parent and + * ending with the most distant ancestor. If the specified group has no + * immediate parent, the results are empty. + * + * Generated from protobuf field string ancestors_of_group = 3 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setAncestorsOfGroup($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * A group name. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] + * Returns the descendants of the specified group. This is a superset of + * the results returned by the `children_of_group` filter, and includes + * children-of-children, and so forth. + * + * Generated from protobuf field string descendants_of_group = 4 [(.google.api.resource_reference) = { + * @return string + */ + public function getDescendantsOfGroup() + { + return $this->readOneof(4); + } + + public function hasDescendantsOfGroup() + { + return $this->hasOneof(4); + } + + /** + * A group name. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] + * Returns the descendants of the specified group. This is a superset of + * the results returned by the `children_of_group` filter, and includes + * children-of-children, and so forth. + * + * Generated from protobuf field string descendants_of_group = 4 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setDescendantsOfGroup($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * A positive number that is the maximum number of results to return. + * + * Generated from protobuf field int32 page_size = 5; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * A positive number that is the maximum number of results to return. + * + * Generated from protobuf field int32 page_size = 5; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * If this field is not empty then it must contain the `next_page_token` value + * returned by a previous call to this method. Using this field causes the + * method to return additional results from the previous method call. + * + * Generated from protobuf field string page_token = 6; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * If this field is not empty then it must contain the `next_page_token` value + * returned by a previous call to this method. Using this field causes the + * method to return additional results from the previous method call. + * + * Generated from protobuf field string page_token = 6; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * @return string + */ + public function getFilter() + { + return $this->whichOneof("filter"); + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListGroupsResponse.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListGroupsResponse.php new file mode 100644 index 000000000000..98e3257f20aa --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListGroupsResponse.php @@ -0,0 +1,109 @@ +google.monitoring.v3.ListGroupsResponse + */ +class ListGroupsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The groups that match the specified filters. + * + * Generated from protobuf field repeated .google.monitoring.v3.Group group = 1; + */ + private $group; + /** + * If there are more results than have been returned, then this field is set + * to a non-empty value. To see the additional results, + * use that value as `page_token` in the next call to this method. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Monitoring\V3\Group>|\Google\Protobuf\Internal\RepeatedField $group + * The groups that match the specified filters. + * @type string $next_page_token + * If there are more results than have been returned, then this field is set + * to a non-empty value. To see the additional results, + * use that value as `page_token` in the next call to this method. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\GroupService::initOnce(); + parent::__construct($data); + } + + /** + * The groups that match the specified filters. + * + * Generated from protobuf field repeated .google.monitoring.v3.Group group = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getGroup() + { + return $this->group; + } + + /** + * The groups that match the specified filters. + * + * Generated from protobuf field repeated .google.monitoring.v3.Group group = 1; + * @param array<\Google\Cloud\Monitoring\V3\Group>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setGroup($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Monitoring\V3\Group::class); + $this->group = $arr; + + return $this; + } + + /** + * If there are more results than have been returned, then this field is set + * to a non-empty value. To see the additional results, + * use that value as `page_token` in the next call to this method. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * If there are more results than have been returned, then this field is set + * to a non-empty value. To see the additional results, + * use that value as `page_token` in the next call to this method. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListMetricDescriptorsRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListMetricDescriptorsRequest.php new file mode 100644 index 000000000000..800b557691f2 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListMetricDescriptorsRequest.php @@ -0,0 +1,238 @@ +google.monitoring.v3.ListMetricDescriptorsRequest + */ +class ListMetricDescriptorsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which + * to execute the request. The format is: + * projects/[PROJECT_ID_OR_NUMBER] + * + * Generated from protobuf field string name = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * If this field is empty, all custom and + * system-defined metric descriptors are returned. + * Otherwise, the [filter](https://cloud.google.com/monitoring/api/v3/filters) + * specifies which metric descriptors are to be + * returned. For example, the following filter matches all + * [custom metrics](https://cloud.google.com/monitoring/custom-metrics): + * metric.type = starts_with("custom.googleapis.com/") + * + * Generated from protobuf field string filter = 2; + */ + protected $filter = ''; + /** + * A positive number that is the maximum number of results to return. The + * default and maximum value is 10,000. If a page_size <= 0 or > 10,000 is + * submitted, will instead return a maximum of 10,000 results. + * + * Generated from protobuf field int32 page_size = 3; + */ + protected $page_size = 0; + /** + * If this field is not empty then it must contain the `nextPageToken` value + * returned by a previous call to this method. Using this field causes the + * method to return additional results from the previous method call. + * + * Generated from protobuf field string page_token = 4; + */ + protected $page_token = ''; + + /** + * @param string $name Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which + * to execute the request. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER] + * + * @return \Google\Cloud\Monitoring\V3\ListMetricDescriptorsRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which + * to execute the request. The format is: + * projects/[PROJECT_ID_OR_NUMBER] + * @type string $filter + * If this field is empty, all custom and + * system-defined metric descriptors are returned. + * Otherwise, the [filter](https://cloud.google.com/monitoring/api/v3/filters) + * specifies which metric descriptors are to be + * returned. For example, the following filter matches all + * [custom metrics](https://cloud.google.com/monitoring/custom-metrics): + * metric.type = starts_with("custom.googleapis.com/") + * @type int $page_size + * A positive number that is the maximum number of results to return. The + * default and maximum value is 10,000. If a page_size <= 0 or > 10,000 is + * submitted, will instead return a maximum of 10,000 results. + * @type string $page_token + * If this field is not empty then it must contain the `nextPageToken` value + * returned by a previous call to this method. Using this field causes the + * method to return additional results from the previous method call. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\MetricService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which + * to execute the request. The format is: + * projects/[PROJECT_ID_OR_NUMBER] + * + * Generated from protobuf field string name = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which + * to execute the request. The format is: + * projects/[PROJECT_ID_OR_NUMBER] + * + * Generated from protobuf field string name = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * If this field is empty, all custom and + * system-defined metric descriptors are returned. + * Otherwise, the [filter](https://cloud.google.com/monitoring/api/v3/filters) + * specifies which metric descriptors are to be + * returned. For example, the following filter matches all + * [custom metrics](https://cloud.google.com/monitoring/custom-metrics): + * metric.type = starts_with("custom.googleapis.com/") + * + * Generated from protobuf field string filter = 2; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * If this field is empty, all custom and + * system-defined metric descriptors are returned. + * Otherwise, the [filter](https://cloud.google.com/monitoring/api/v3/filters) + * specifies which metric descriptors are to be + * returned. For example, the following filter matches all + * [custom metrics](https://cloud.google.com/monitoring/custom-metrics): + * metric.type = starts_with("custom.googleapis.com/") + * + * Generated from protobuf field string filter = 2; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * A positive number that is the maximum number of results to return. The + * default and maximum value is 10,000. If a page_size <= 0 or > 10,000 is + * submitted, will instead return a maximum of 10,000 results. + * + * Generated from protobuf field int32 page_size = 3; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * A positive number that is the maximum number of results to return. The + * default and maximum value is 10,000. If a page_size <= 0 or > 10,000 is + * submitted, will instead return a maximum of 10,000 results. + * + * Generated from protobuf field int32 page_size = 3; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * If this field is not empty then it must contain the `nextPageToken` value + * returned by a previous call to this method. Using this field causes the + * method to return additional results from the previous method call. + * + * Generated from protobuf field string page_token = 4; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * If this field is not empty then it must contain the `nextPageToken` value + * returned by a previous call to this method. Using this field causes the + * method to return additional results from the previous method call. + * + * Generated from protobuf field string page_token = 4; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListMetricDescriptorsResponse.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListMetricDescriptorsResponse.php new file mode 100644 index 000000000000..4ea2039e212c --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListMetricDescriptorsResponse.php @@ -0,0 +1,113 @@ +google.monitoring.v3.ListMetricDescriptorsResponse + */ +class ListMetricDescriptorsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The metric descriptors that are available to the project + * and that match the value of `filter`, if present. + * + * Generated from protobuf field repeated .google.api.MetricDescriptor metric_descriptors = 1; + */ + private $metric_descriptors; + /** + * If there are more results than have been returned, then this field is set + * to a non-empty value. To see the additional results, + * use that value as `page_token` in the next call to this method. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Api\MetricDescriptor>|\Google\Protobuf\Internal\RepeatedField $metric_descriptors + * The metric descriptors that are available to the project + * and that match the value of `filter`, if present. + * @type string $next_page_token + * If there are more results than have been returned, then this field is set + * to a non-empty value. To see the additional results, + * use that value as `page_token` in the next call to this method. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\MetricService::initOnce(); + parent::__construct($data); + } + + /** + * The metric descriptors that are available to the project + * and that match the value of `filter`, if present. + * + * Generated from protobuf field repeated .google.api.MetricDescriptor metric_descriptors = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMetricDescriptors() + { + return $this->metric_descriptors; + } + + /** + * The metric descriptors that are available to the project + * and that match the value of `filter`, if present. + * + * Generated from protobuf field repeated .google.api.MetricDescriptor metric_descriptors = 1; + * @param array<\Google\Api\MetricDescriptor>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMetricDescriptors($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Api\MetricDescriptor::class); + $this->metric_descriptors = $arr; + + return $this; + } + + /** + * If there are more results than have been returned, then this field is set + * to a non-empty value. To see the additional results, + * use that value as `page_token` in the next call to this method. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * If there are more results than have been returned, then this field is set + * to a non-empty value. To see the additional results, + * use that value as `page_token` in the next call to this method. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListMonitoredResourceDescriptorsRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListMonitoredResourceDescriptorsRequest.php new file mode 100644 index 000000000000..14696bd981c1 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListMonitoredResourceDescriptorsRequest.php @@ -0,0 +1,222 @@ +google.monitoring.v3.ListMonitoredResourceDescriptorsRequest + */ +class ListMonitoredResourceDescriptorsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which + * to execute the request. The format is: + * projects/[PROJECT_ID_OR_NUMBER] + * + * Generated from protobuf field string name = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * An optional [filter](https://cloud.google.com/monitoring/api/v3/filters) + * describing the descriptors to be returned. The filter can reference the + * descriptor's type and labels. For example, the following filter returns + * only Google Compute Engine descriptors that have an `id` label: + * resource.type = starts_with("gce_") AND resource.label:id + * + * Generated from protobuf field string filter = 2; + */ + protected $filter = ''; + /** + * A positive number that is the maximum number of results to return. + * + * Generated from protobuf field int32 page_size = 3; + */ + protected $page_size = 0; + /** + * If this field is not empty then it must contain the `nextPageToken` value + * returned by a previous call to this method. Using this field causes the + * method to return additional results from the previous method call. + * + * Generated from protobuf field string page_token = 4; + */ + protected $page_token = ''; + + /** + * @param string $name Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which + * to execute the request. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER] + * + * @return \Google\Cloud\Monitoring\V3\ListMonitoredResourceDescriptorsRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which + * to execute the request. The format is: + * projects/[PROJECT_ID_OR_NUMBER] + * @type string $filter + * An optional [filter](https://cloud.google.com/monitoring/api/v3/filters) + * describing the descriptors to be returned. The filter can reference the + * descriptor's type and labels. For example, the following filter returns + * only Google Compute Engine descriptors that have an `id` label: + * resource.type = starts_with("gce_") AND resource.label:id + * @type int $page_size + * A positive number that is the maximum number of results to return. + * @type string $page_token + * If this field is not empty then it must contain the `nextPageToken` value + * returned by a previous call to this method. Using this field causes the + * method to return additional results from the previous method call. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\MetricService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which + * to execute the request. The format is: + * projects/[PROJECT_ID_OR_NUMBER] + * + * Generated from protobuf field string name = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which + * to execute the request. The format is: + * projects/[PROJECT_ID_OR_NUMBER] + * + * Generated from protobuf field string name = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * An optional [filter](https://cloud.google.com/monitoring/api/v3/filters) + * describing the descriptors to be returned. The filter can reference the + * descriptor's type and labels. For example, the following filter returns + * only Google Compute Engine descriptors that have an `id` label: + * resource.type = starts_with("gce_") AND resource.label:id + * + * Generated from protobuf field string filter = 2; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * An optional [filter](https://cloud.google.com/monitoring/api/v3/filters) + * describing the descriptors to be returned. The filter can reference the + * descriptor's type and labels. For example, the following filter returns + * only Google Compute Engine descriptors that have an `id` label: + * resource.type = starts_with("gce_") AND resource.label:id + * + * Generated from protobuf field string filter = 2; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * A positive number that is the maximum number of results to return. + * + * Generated from protobuf field int32 page_size = 3; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * A positive number that is the maximum number of results to return. + * + * Generated from protobuf field int32 page_size = 3; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * If this field is not empty then it must contain the `nextPageToken` value + * returned by a previous call to this method. Using this field causes the + * method to return additional results from the previous method call. + * + * Generated from protobuf field string page_token = 4; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * If this field is not empty then it must contain the `nextPageToken` value + * returned by a previous call to this method. Using this field causes the + * method to return additional results from the previous method call. + * + * Generated from protobuf field string page_token = 4; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListMonitoredResourceDescriptorsResponse.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListMonitoredResourceDescriptorsResponse.php new file mode 100644 index 000000000000..07992037c864 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListMonitoredResourceDescriptorsResponse.php @@ -0,0 +1,113 @@ +google.monitoring.v3.ListMonitoredResourceDescriptorsResponse + */ +class ListMonitoredResourceDescriptorsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The monitored resource descriptors that are available to this project + * and that match `filter`, if present. + * + * Generated from protobuf field repeated .google.api.MonitoredResourceDescriptor resource_descriptors = 1; + */ + private $resource_descriptors; + /** + * If there are more results than have been returned, then this field is set + * to a non-empty value. To see the additional results, + * use that value as `page_token` in the next call to this method. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Api\MonitoredResourceDescriptor>|\Google\Protobuf\Internal\RepeatedField $resource_descriptors + * The monitored resource descriptors that are available to this project + * and that match `filter`, if present. + * @type string $next_page_token + * If there are more results than have been returned, then this field is set + * to a non-empty value. To see the additional results, + * use that value as `page_token` in the next call to this method. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\MetricService::initOnce(); + parent::__construct($data); + } + + /** + * The monitored resource descriptors that are available to this project + * and that match `filter`, if present. + * + * Generated from protobuf field repeated .google.api.MonitoredResourceDescriptor resource_descriptors = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getResourceDescriptors() + { + return $this->resource_descriptors; + } + + /** + * The monitored resource descriptors that are available to this project + * and that match `filter`, if present. + * + * Generated from protobuf field repeated .google.api.MonitoredResourceDescriptor resource_descriptors = 1; + * @param array<\Google\Api\MonitoredResourceDescriptor>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setResourceDescriptors($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Api\MonitoredResourceDescriptor::class); + $this->resource_descriptors = $arr; + + return $this; + } + + /** + * If there are more results than have been returned, then this field is set + * to a non-empty value. To see the additional results, + * use that value as `page_token` in the next call to this method. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * If there are more results than have been returned, then this field is set + * to a non-empty value. To see the additional results, + * use that value as `page_token` in the next call to this method. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListNotificationChannelDescriptorsRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListNotificationChannelDescriptorsRequest.php new file mode 100644 index 000000000000..ef7d9522e6f2 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListNotificationChannelDescriptorsRequest.php @@ -0,0 +1,206 @@ +google.monitoring.v3.ListNotificationChannelDescriptorsRequest + */ +class ListNotificationChannelDescriptorsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The REST resource name of the parent from which to retrieve + * the notification channel descriptors. The expected syntax is: + * projects/[PROJECT_ID_OR_NUMBER] + * Note that this + * [names](https://cloud.google.com/monitoring/api/v3#project_name) the parent + * container in which to look for the descriptors; to retrieve a single + * descriptor by name, use the + * [GetNotificationChannelDescriptor][google.monitoring.v3.NotificationChannelService.GetNotificationChannelDescriptor] + * operation, instead. + * + * Generated from protobuf field string name = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * The maximum number of results to return in a single response. If + * not set to a positive number, a reasonable value will be chosen by the + * service. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * If non-empty, `page_token` must contain a value returned as the + * `next_page_token` in a previous response to request the next set + * of results. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $name Required. The REST resource name of the parent from which to retrieve + * the notification channel descriptors. The expected syntax is: + * + * projects/[PROJECT_ID_OR_NUMBER] + * + * Note that this + * [names](https://cloud.google.com/monitoring/api/v3#project_name) the parent + * container in which to look for the descriptors; to retrieve a single + * descriptor by name, use the + * [GetNotificationChannelDescriptor][google.monitoring.v3.NotificationChannelService.GetNotificationChannelDescriptor] + * operation, instead. + * + * @return \Google\Cloud\Monitoring\V3\ListNotificationChannelDescriptorsRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The REST resource name of the parent from which to retrieve + * the notification channel descriptors. The expected syntax is: + * projects/[PROJECT_ID_OR_NUMBER] + * Note that this + * [names](https://cloud.google.com/monitoring/api/v3#project_name) the parent + * container in which to look for the descriptors; to retrieve a single + * descriptor by name, use the + * [GetNotificationChannelDescriptor][google.monitoring.v3.NotificationChannelService.GetNotificationChannelDescriptor] + * operation, instead. + * @type int $page_size + * The maximum number of results to return in a single response. If + * not set to a positive number, a reasonable value will be chosen by the + * service. + * @type string $page_token + * If non-empty, `page_token` must contain a value returned as the + * `next_page_token` in a previous response to request the next set + * of results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\NotificationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The REST resource name of the parent from which to retrieve + * the notification channel descriptors. The expected syntax is: + * projects/[PROJECT_ID_OR_NUMBER] + * Note that this + * [names](https://cloud.google.com/monitoring/api/v3#project_name) the parent + * container in which to look for the descriptors; to retrieve a single + * descriptor by name, use the + * [GetNotificationChannelDescriptor][google.monitoring.v3.NotificationChannelService.GetNotificationChannelDescriptor] + * operation, instead. + * + * Generated from protobuf field string name = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The REST resource name of the parent from which to retrieve + * the notification channel descriptors. The expected syntax is: + * projects/[PROJECT_ID_OR_NUMBER] + * Note that this + * [names](https://cloud.google.com/monitoring/api/v3#project_name) the parent + * container in which to look for the descriptors; to retrieve a single + * descriptor by name, use the + * [GetNotificationChannelDescriptor][google.monitoring.v3.NotificationChannelService.GetNotificationChannelDescriptor] + * operation, instead. + * + * Generated from protobuf field string name = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The maximum number of results to return in a single response. If + * not set to a positive number, a reasonable value will be chosen by the + * service. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of results to return in a single response. If + * not set to a positive number, a reasonable value will be chosen by the + * service. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * If non-empty, `page_token` must contain a value returned as the + * `next_page_token` in a previous response to request the next set + * of results. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * If non-empty, `page_token` must contain a value returned as the + * `next_page_token` in a previous response to request the next set + * of results. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListNotificationChannelDescriptorsResponse.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListNotificationChannelDescriptorsResponse.php new file mode 100644 index 000000000000..93034ae15999 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListNotificationChannelDescriptorsResponse.php @@ -0,0 +1,117 @@ +google.monitoring.v3.ListNotificationChannelDescriptorsResponse + */ +class ListNotificationChannelDescriptorsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The monitored resource descriptors supported for the specified + * project, optionally filtered. + * + * Generated from protobuf field repeated .google.monitoring.v3.NotificationChannelDescriptor channel_descriptors = 1; + */ + private $channel_descriptors; + /** + * If not empty, indicates that there may be more results that match + * the request. Use the value in the `page_token` field in a + * subsequent request to fetch the next set of results. If empty, + * all results have been returned. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Monitoring\V3\NotificationChannelDescriptor>|\Google\Protobuf\Internal\RepeatedField $channel_descriptors + * The monitored resource descriptors supported for the specified + * project, optionally filtered. + * @type string $next_page_token + * If not empty, indicates that there may be more results that match + * the request. Use the value in the `page_token` field in a + * subsequent request to fetch the next set of results. If empty, + * all results have been returned. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\NotificationService::initOnce(); + parent::__construct($data); + } + + /** + * The monitored resource descriptors supported for the specified + * project, optionally filtered. + * + * Generated from protobuf field repeated .google.monitoring.v3.NotificationChannelDescriptor channel_descriptors = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getChannelDescriptors() + { + return $this->channel_descriptors; + } + + /** + * The monitored resource descriptors supported for the specified + * project, optionally filtered. + * + * Generated from protobuf field repeated .google.monitoring.v3.NotificationChannelDescriptor channel_descriptors = 1; + * @param array<\Google\Cloud\Monitoring\V3\NotificationChannelDescriptor>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setChannelDescriptors($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Monitoring\V3\NotificationChannelDescriptor::class); + $this->channel_descriptors = $arr; + + return $this; + } + + /** + * If not empty, indicates that there may be more results that match + * the request. Use the value in the `page_token` field in a + * subsequent request to fetch the next set of results. If empty, + * all results have been returned. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * If not empty, indicates that there may be more results that match + * the request. Use the value in the `page_token` field in a + * subsequent request to fetch the next set of results. If empty, + * all results have been returned. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListNotificationChannelsRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListNotificationChannelsRequest.php new file mode 100644 index 000000000000..ec2c80372ea3 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListNotificationChannelsRequest.php @@ -0,0 +1,307 @@ +google.monitoring.v3.ListNotificationChannelsRequest + */ +class ListNotificationChannelsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which + * to execute the request. The format is: + * projects/[PROJECT_ID_OR_NUMBER] + * This names the container + * in which to look for the notification channels; it does not name a + * specific channel. To query a specific channel by REST resource name, use + * the + * [`GetNotificationChannel`][google.monitoring.v3.NotificationChannelService.GetNotificationChannel] + * operation. + * + * Generated from protobuf field string name = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. If provided, this field specifies the criteria that must be met + * by notification channels to be included in the response. + * For more details, see [sorting and + * filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering). + * + * Generated from protobuf field string filter = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. A comma-separated list of fields by which to sort the result. + * Supports the same set of fields as in `filter`. Entries can be prefixed + * with a minus sign to sort in descending rather than ascending order. + * For more details, see [sorting and + * filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering). + * + * Generated from protobuf field string order_by = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + /** + * Optional. The maximum number of results to return in a single response. If + * not set to a positive number, a reasonable value will be chosen by the + * service. + * + * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. If non-empty, `page_token` must contain a value returned as the + * `next_page_token` in a previous response to request the next set + * of results. + * + * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * @param string $name Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which + * to execute the request. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER] + * + * This names the container + * in which to look for the notification channels; it does not name a + * specific channel. To query a specific channel by REST resource name, use + * the + * [`GetNotificationChannel`][google.monitoring.v3.NotificationChannelService.GetNotificationChannel] + * operation. + * + * @return \Google\Cloud\Monitoring\V3\ListNotificationChannelsRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which + * to execute the request. The format is: + * projects/[PROJECT_ID_OR_NUMBER] + * This names the container + * in which to look for the notification channels; it does not name a + * specific channel. To query a specific channel by REST resource name, use + * the + * [`GetNotificationChannel`][google.monitoring.v3.NotificationChannelService.GetNotificationChannel] + * operation. + * @type string $filter + * Optional. If provided, this field specifies the criteria that must be met + * by notification channels to be included in the response. + * For more details, see [sorting and + * filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering). + * @type string $order_by + * Optional. A comma-separated list of fields by which to sort the result. + * Supports the same set of fields as in `filter`. Entries can be prefixed + * with a minus sign to sort in descending rather than ascending order. + * For more details, see [sorting and + * filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering). + * @type int $page_size + * Optional. The maximum number of results to return in a single response. If + * not set to a positive number, a reasonable value will be chosen by the + * service. + * @type string $page_token + * Optional. If non-empty, `page_token` must contain a value returned as the + * `next_page_token` in a previous response to request the next set + * of results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\NotificationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which + * to execute the request. The format is: + * projects/[PROJECT_ID_OR_NUMBER] + * This names the container + * in which to look for the notification channels; it does not name a + * specific channel. To query a specific channel by REST resource name, use + * the + * [`GetNotificationChannel`][google.monitoring.v3.NotificationChannelService.GetNotificationChannel] + * operation. + * + * Generated from protobuf field string name = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which + * to execute the request. The format is: + * projects/[PROJECT_ID_OR_NUMBER] + * This names the container + * in which to look for the notification channels; it does not name a + * specific channel. To query a specific channel by REST resource name, use + * the + * [`GetNotificationChannel`][google.monitoring.v3.NotificationChannelService.GetNotificationChannel] + * operation. + * + * Generated from protobuf field string name = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. If provided, this field specifies the criteria that must be met + * by notification channels to be included in the response. + * For more details, see [sorting and + * filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering). + * + * Generated from protobuf field string filter = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. If provided, this field specifies the criteria that must be met + * by notification channels to be included in the response. + * For more details, see [sorting and + * filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering). + * + * Generated from protobuf field string filter = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Optional. A comma-separated list of fields by which to sort the result. + * Supports the same set of fields as in `filter`. Entries can be prefixed + * with a minus sign to sort in descending rather than ascending order. + * For more details, see [sorting and + * filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering). + * + * Generated from protobuf field string order_by = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. A comma-separated list of fields by which to sort the result. + * Supports the same set of fields as in `filter`. Entries can be prefixed + * with a minus sign to sort in descending rather than ascending order. + * For more details, see [sorting and + * filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering). + * + * Generated from protobuf field string order_by = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + + /** + * Optional. The maximum number of results to return in a single response. If + * not set to a positive number, a reasonable value will be chosen by the + * service. + * + * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of results to return in a single response. If + * not set to a positive number, a reasonable value will be chosen by the + * service. + * + * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. If non-empty, `page_token` must contain a value returned as the + * `next_page_token` in a previous response to request the next set + * of results. + * + * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. If non-empty, `page_token` must contain a value returned as the + * `next_page_token` in a previous response to request the next set + * of results. + * + * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListNotificationChannelsResponse.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListNotificationChannelsResponse.php new file mode 100644 index 000000000000..28dc01fb0af2 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListNotificationChannelsResponse.php @@ -0,0 +1,151 @@ +google.monitoring.v3.ListNotificationChannelsResponse + */ +class ListNotificationChannelsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The notification channels defined for the specified project. + * + * Generated from protobuf field repeated .google.monitoring.v3.NotificationChannel notification_channels = 3; + */ + private $notification_channels; + /** + * If not empty, indicates that there may be more results that match + * the request. Use the value in the `page_token` field in a + * subsequent request to fetch the next set of results. If empty, + * all results have been returned. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * The total number of notification channels in all pages. This number is only + * an estimate, and may change in subsequent pages. https://aip.dev/158 + * + * Generated from protobuf field int32 total_size = 4; + */ + protected $total_size = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Monitoring\V3\NotificationChannel>|\Google\Protobuf\Internal\RepeatedField $notification_channels + * The notification channels defined for the specified project. + * @type string $next_page_token + * If not empty, indicates that there may be more results that match + * the request. Use the value in the `page_token` field in a + * subsequent request to fetch the next set of results. If empty, + * all results have been returned. + * @type int $total_size + * The total number of notification channels in all pages. This number is only + * an estimate, and may change in subsequent pages. https://aip.dev/158 + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\NotificationService::initOnce(); + parent::__construct($data); + } + + /** + * The notification channels defined for the specified project. + * + * Generated from protobuf field repeated .google.monitoring.v3.NotificationChannel notification_channels = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNotificationChannels() + { + return $this->notification_channels; + } + + /** + * The notification channels defined for the specified project. + * + * Generated from protobuf field repeated .google.monitoring.v3.NotificationChannel notification_channels = 3; + * @param array<\Google\Cloud\Monitoring\V3\NotificationChannel>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNotificationChannels($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Monitoring\V3\NotificationChannel::class); + $this->notification_channels = $arr; + + return $this; + } + + /** + * If not empty, indicates that there may be more results that match + * the request. Use the value in the `page_token` field in a + * subsequent request to fetch the next set of results. If empty, + * all results have been returned. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * If not empty, indicates that there may be more results that match + * the request. Use the value in the `page_token` field in a + * subsequent request to fetch the next set of results. If empty, + * all results have been returned. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * The total number of notification channels in all pages. This number is only + * an estimate, and may change in subsequent pages. https://aip.dev/158 + * + * Generated from protobuf field int32 total_size = 4; + * @return int + */ + public function getTotalSize() + { + return $this->total_size; + } + + /** + * The total number of notification channels in all pages. This number is only + * an estimate, and may change in subsequent pages. https://aip.dev/158 + * + * Generated from protobuf field int32 total_size = 4; + * @param int $var + * @return $this + */ + public function setTotalSize($var) + { + GPBUtil::checkInt32($var); + $this->total_size = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListServiceLevelObjectivesRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListServiceLevelObjectivesRequest.php new file mode 100644 index 000000000000..19128d58f56f --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListServiceLevelObjectivesRequest.php @@ -0,0 +1,257 @@ +google.monitoring.v3.ListServiceLevelObjectivesRequest + */ +class ListServiceLevelObjectivesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the parent containing the listed SLOs, either a + * project or a Monitoring Metrics Scope. The formats are: + * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] + * workspaces/[HOST_PROJECT_ID_OR_NUMBER]/services/- + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * A filter specifying what `ServiceLevelObjective`s to return. + * + * Generated from protobuf field string filter = 2; + */ + protected $filter = ''; + /** + * A non-negative number that is the maximum number of results to return. + * When 0, use default page size. + * + * Generated from protobuf field int32 page_size = 3; + */ + protected $page_size = 0; + /** + * If this field is not empty then it must contain the `nextPageToken` value + * returned by a previous call to this method. Using this field causes the + * method to return additional results from the previous method call. + * + * Generated from protobuf field string page_token = 4; + */ + protected $page_token = ''; + /** + * View of the `ServiceLevelObjective`s to return. If `DEFAULT`, return each + * `ServiceLevelObjective` as originally defined. If `EXPLICIT` and the + * `ServiceLevelObjective` is defined in terms of a `BasicSli`, replace the + * `BasicSli` with a `RequestBasedSli` spelling out how the SLI is computed. + * + * Generated from protobuf field .google.monitoring.v3.ServiceLevelObjective.View view = 5; + */ + protected $view = 0; + + /** + * @param string $parent Required. Resource name of the parent containing the listed SLOs, either a + * project or a Monitoring Metrics Scope. The formats are: + * + * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] + * workspaces/[HOST_PROJECT_ID_OR_NUMBER]/services/- + * Please see {@see ServiceMonitoringServiceClient::serviceName()} for help formatting this field. + * + * @return \Google\Cloud\Monitoring\V3\ListServiceLevelObjectivesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Resource name of the parent containing the listed SLOs, either a + * project or a Monitoring Metrics Scope. The formats are: + * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] + * workspaces/[HOST_PROJECT_ID_OR_NUMBER]/services/- + * @type string $filter + * A filter specifying what `ServiceLevelObjective`s to return. + * @type int $page_size + * A non-negative number that is the maximum number of results to return. + * When 0, use default page size. + * @type string $page_token + * If this field is not empty then it must contain the `nextPageToken` value + * returned by a previous call to this method. Using this field causes the + * method to return additional results from the previous method call. + * @type int $view + * View of the `ServiceLevelObjective`s to return. If `DEFAULT`, return each + * `ServiceLevelObjective` as originally defined. If `EXPLICIT` and the + * `ServiceLevelObjective` is defined in terms of a `BasicSli`, replace the + * `BasicSli` with a `RequestBasedSli` spelling out how the SLI is computed. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\ServiceService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the parent containing the listed SLOs, either a + * project or a Monitoring Metrics Scope. The formats are: + * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] + * workspaces/[HOST_PROJECT_ID_OR_NUMBER]/services/- + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Resource name of the parent containing the listed SLOs, either a + * project or a Monitoring Metrics Scope. The formats are: + * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] + * workspaces/[HOST_PROJECT_ID_OR_NUMBER]/services/- + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * A filter specifying what `ServiceLevelObjective`s to return. + * + * Generated from protobuf field string filter = 2; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * A filter specifying what `ServiceLevelObjective`s to return. + * + * Generated from protobuf field string filter = 2; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * A non-negative number that is the maximum number of results to return. + * When 0, use default page size. + * + * Generated from protobuf field int32 page_size = 3; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * A non-negative number that is the maximum number of results to return. + * When 0, use default page size. + * + * Generated from protobuf field int32 page_size = 3; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * If this field is not empty then it must contain the `nextPageToken` value + * returned by a previous call to this method. Using this field causes the + * method to return additional results from the previous method call. + * + * Generated from protobuf field string page_token = 4; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * If this field is not empty then it must contain the `nextPageToken` value + * returned by a previous call to this method. Using this field causes the + * method to return additional results from the previous method call. + * + * Generated from protobuf field string page_token = 4; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * View of the `ServiceLevelObjective`s to return. If `DEFAULT`, return each + * `ServiceLevelObjective` as originally defined. If `EXPLICIT` and the + * `ServiceLevelObjective` is defined in terms of a `BasicSli`, replace the + * `BasicSli` with a `RequestBasedSli` spelling out how the SLI is computed. + * + * Generated from protobuf field .google.monitoring.v3.ServiceLevelObjective.View view = 5; + * @return int + */ + public function getView() + { + return $this->view; + } + + /** + * View of the `ServiceLevelObjective`s to return. If `DEFAULT`, return each + * `ServiceLevelObjective` as originally defined. If `EXPLICIT` and the + * `ServiceLevelObjective` is defined in terms of a `BasicSli`, replace the + * `BasicSli` with a `RequestBasedSli` spelling out how the SLI is computed. + * + * Generated from protobuf field .google.monitoring.v3.ServiceLevelObjective.View view = 5; + * @param int $var + * @return $this + */ + public function setView($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Monitoring\V3\ServiceLevelObjective\View::class); + $this->view = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListServiceLevelObjectivesResponse.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListServiceLevelObjectivesResponse.php new file mode 100644 index 000000000000..8e9d2ead1abf --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListServiceLevelObjectivesResponse.php @@ -0,0 +1,109 @@ +google.monitoring.v3.ListServiceLevelObjectivesResponse + */ +class ListServiceLevelObjectivesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The `ServiceLevelObjective`s matching the specified filter. + * + * Generated from protobuf field repeated .google.monitoring.v3.ServiceLevelObjective service_level_objectives = 1; + */ + private $service_level_objectives; + /** + * If there are more results than have been returned, then this field is set + * to a non-empty value. To see the additional results, + * use that value as `page_token` in the next call to this method. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Monitoring\V3\ServiceLevelObjective>|\Google\Protobuf\Internal\RepeatedField $service_level_objectives + * The `ServiceLevelObjective`s matching the specified filter. + * @type string $next_page_token + * If there are more results than have been returned, then this field is set + * to a non-empty value. To see the additional results, + * use that value as `page_token` in the next call to this method. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\ServiceService::initOnce(); + parent::__construct($data); + } + + /** + * The `ServiceLevelObjective`s matching the specified filter. + * + * Generated from protobuf field repeated .google.monitoring.v3.ServiceLevelObjective service_level_objectives = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getServiceLevelObjectives() + { + return $this->service_level_objectives; + } + + /** + * The `ServiceLevelObjective`s matching the specified filter. + * + * Generated from protobuf field repeated .google.monitoring.v3.ServiceLevelObjective service_level_objectives = 1; + * @param array<\Google\Cloud\Monitoring\V3\ServiceLevelObjective>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setServiceLevelObjectives($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Monitoring\V3\ServiceLevelObjective::class); + $this->service_level_objectives = $arr; + + return $this; + } + + /** + * If there are more results than have been returned, then this field is set + * to a non-empty value. To see the additional results, + * use that value as `page_token` in the next call to this method. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * If there are more results than have been returned, then this field is set + * to a non-empty value. To see the additional results, + * use that value as `page_token` in the next call to this method. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListServicesRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListServicesRequest.php new file mode 100644 index 000000000000..795a4e8e34eb --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListServicesRequest.php @@ -0,0 +1,275 @@ +google.monitoring.v3.ListServicesRequest + */ +class ListServicesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the parent containing the listed services, + * either a [project](https://cloud.google.com/monitoring/api/v3#project_name) + * or a Monitoring Metrics Scope. The formats are: + * projects/[PROJECT_ID_OR_NUMBER] + * workspaces/[HOST_PROJECT_ID_OR_NUMBER] + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * A filter specifying what `Service`s to return. The filter supports + * filtering on a particular service-identifier type or one of its attributes. + * To filter on a particular service-identifier type, the `identifier_case` + * refers to which option in the `identifier` field is populated. For example, + * the filter `identifier_case = "CUSTOM"` would match all services with a + * value for the `custom` field. Valid options include "CUSTOM", "APP_ENGINE", + * "MESH_ISTIO", and the other options listed at + * https://cloud.google.com/monitoring/api/ref_v3/rest/v3/services#Service + * To filter on an attribute of a service-identifier type, apply the filter + * name by using the snake case of the service-identifier type and the + * attribute of that service-identifier type, and join the two with a period. + * For example, to filter by the `meshUid` field of the `MeshIstio` + * service-identifier type, you must filter on `mesh_istio.mesh_uid = + * "123"` to match all services with mesh UID "123". Service-identifier types + * and their attributes are described at + * https://cloud.google.com/monitoring/api/ref_v3/rest/v3/services#Service + * + * Generated from protobuf field string filter = 2; + */ + protected $filter = ''; + /** + * A non-negative number that is the maximum number of results to return. + * When 0, use default page size. + * + * Generated from protobuf field int32 page_size = 3; + */ + protected $page_size = 0; + /** + * If this field is not empty then it must contain the `nextPageToken` value + * returned by a previous call to this method. Using this field causes the + * method to return additional results from the previous method call. + * + * Generated from protobuf field string page_token = 4; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. Resource name of the parent containing the listed services, + * either a [project](https://cloud.google.com/monitoring/api/v3#project_name) + * or a Monitoring Metrics Scope. The formats are: + * + * projects/[PROJECT_ID_OR_NUMBER] + * workspaces/[HOST_PROJECT_ID_OR_NUMBER] + * + * @return \Google\Cloud\Monitoring\V3\ListServicesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Resource name of the parent containing the listed services, + * either a [project](https://cloud.google.com/monitoring/api/v3#project_name) + * or a Monitoring Metrics Scope. The formats are: + * projects/[PROJECT_ID_OR_NUMBER] + * workspaces/[HOST_PROJECT_ID_OR_NUMBER] + * @type string $filter + * A filter specifying what `Service`s to return. The filter supports + * filtering on a particular service-identifier type or one of its attributes. + * To filter on a particular service-identifier type, the `identifier_case` + * refers to which option in the `identifier` field is populated. For example, + * the filter `identifier_case = "CUSTOM"` would match all services with a + * value for the `custom` field. Valid options include "CUSTOM", "APP_ENGINE", + * "MESH_ISTIO", and the other options listed at + * https://cloud.google.com/monitoring/api/ref_v3/rest/v3/services#Service + * To filter on an attribute of a service-identifier type, apply the filter + * name by using the snake case of the service-identifier type and the + * attribute of that service-identifier type, and join the two with a period. + * For example, to filter by the `meshUid` field of the `MeshIstio` + * service-identifier type, you must filter on `mesh_istio.mesh_uid = + * "123"` to match all services with mesh UID "123". Service-identifier types + * and their attributes are described at + * https://cloud.google.com/monitoring/api/ref_v3/rest/v3/services#Service + * @type int $page_size + * A non-negative number that is the maximum number of results to return. + * When 0, use default page size. + * @type string $page_token + * If this field is not empty then it must contain the `nextPageToken` value + * returned by a previous call to this method. Using this field causes the + * method to return additional results from the previous method call. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\ServiceService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the parent containing the listed services, + * either a [project](https://cloud.google.com/monitoring/api/v3#project_name) + * or a Monitoring Metrics Scope. The formats are: + * projects/[PROJECT_ID_OR_NUMBER] + * workspaces/[HOST_PROJECT_ID_OR_NUMBER] + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Resource name of the parent containing the listed services, + * either a [project](https://cloud.google.com/monitoring/api/v3#project_name) + * or a Monitoring Metrics Scope. The formats are: + * projects/[PROJECT_ID_OR_NUMBER] + * workspaces/[HOST_PROJECT_ID_OR_NUMBER] + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * A filter specifying what `Service`s to return. The filter supports + * filtering on a particular service-identifier type or one of its attributes. + * To filter on a particular service-identifier type, the `identifier_case` + * refers to which option in the `identifier` field is populated. For example, + * the filter `identifier_case = "CUSTOM"` would match all services with a + * value for the `custom` field. Valid options include "CUSTOM", "APP_ENGINE", + * "MESH_ISTIO", and the other options listed at + * https://cloud.google.com/monitoring/api/ref_v3/rest/v3/services#Service + * To filter on an attribute of a service-identifier type, apply the filter + * name by using the snake case of the service-identifier type and the + * attribute of that service-identifier type, and join the two with a period. + * For example, to filter by the `meshUid` field of the `MeshIstio` + * service-identifier type, you must filter on `mesh_istio.mesh_uid = + * "123"` to match all services with mesh UID "123". Service-identifier types + * and their attributes are described at + * https://cloud.google.com/monitoring/api/ref_v3/rest/v3/services#Service + * + * Generated from protobuf field string filter = 2; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * A filter specifying what `Service`s to return. The filter supports + * filtering on a particular service-identifier type or one of its attributes. + * To filter on a particular service-identifier type, the `identifier_case` + * refers to which option in the `identifier` field is populated. For example, + * the filter `identifier_case = "CUSTOM"` would match all services with a + * value for the `custom` field. Valid options include "CUSTOM", "APP_ENGINE", + * "MESH_ISTIO", and the other options listed at + * https://cloud.google.com/monitoring/api/ref_v3/rest/v3/services#Service + * To filter on an attribute of a service-identifier type, apply the filter + * name by using the snake case of the service-identifier type and the + * attribute of that service-identifier type, and join the two with a period. + * For example, to filter by the `meshUid` field of the `MeshIstio` + * service-identifier type, you must filter on `mesh_istio.mesh_uid = + * "123"` to match all services with mesh UID "123". Service-identifier types + * and their attributes are described at + * https://cloud.google.com/monitoring/api/ref_v3/rest/v3/services#Service + * + * Generated from protobuf field string filter = 2; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * A non-negative number that is the maximum number of results to return. + * When 0, use default page size. + * + * Generated from protobuf field int32 page_size = 3; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * A non-negative number that is the maximum number of results to return. + * When 0, use default page size. + * + * Generated from protobuf field int32 page_size = 3; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * If this field is not empty then it must contain the `nextPageToken` value + * returned by a previous call to this method. Using this field causes the + * method to return additional results from the previous method call. + * + * Generated from protobuf field string page_token = 4; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * If this field is not empty then it must contain the `nextPageToken` value + * returned by a previous call to this method. Using this field causes the + * method to return additional results from the previous method call. + * + * Generated from protobuf field string page_token = 4; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListServicesResponse.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListServicesResponse.php new file mode 100644 index 000000000000..4359a2689b2e --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListServicesResponse.php @@ -0,0 +1,109 @@ +google.monitoring.v3.ListServicesResponse + */ +class ListServicesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The `Service`s matching the specified filter. + * + * Generated from protobuf field repeated .google.monitoring.v3.Service services = 1; + */ + private $services; + /** + * If there are more results than have been returned, then this field is set + * to a non-empty value. To see the additional results, + * use that value as `page_token` in the next call to this method. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Monitoring\V3\Service>|\Google\Protobuf\Internal\RepeatedField $services + * The `Service`s matching the specified filter. + * @type string $next_page_token + * If there are more results than have been returned, then this field is set + * to a non-empty value. To see the additional results, + * use that value as `page_token` in the next call to this method. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\ServiceService::initOnce(); + parent::__construct($data); + } + + /** + * The `Service`s matching the specified filter. + * + * Generated from protobuf field repeated .google.monitoring.v3.Service services = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getServices() + { + return $this->services; + } + + /** + * The `Service`s matching the specified filter. + * + * Generated from protobuf field repeated .google.monitoring.v3.Service services = 1; + * @param array<\Google\Cloud\Monitoring\V3\Service>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setServices($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Monitoring\V3\Service::class); + $this->services = $arr; + + return $this; + } + + /** + * If there are more results than have been returned, then this field is set + * to a non-empty value. To see the additional results, + * use that value as `page_token` in the next call to this method. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * If there are more results than have been returned, then this field is set + * to a non-empty value. To see the additional results, + * use that value as `page_token` in the next call to this method. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListSnoozesRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListSnoozesRequest.php new file mode 100644 index 000000000000..ff92a8e233fa --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListSnoozesRequest.php @@ -0,0 +1,252 @@ +google.monitoring.v3.ListSnoozesRequest + */ +class ListSnoozesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) whose + * `Snooze`s should be listed. The format is: + * projects/[PROJECT_ID_OR_NUMBER] + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Optional filter to restrict results to the given criteria. The + * following fields are supported. + * * `interval.start_time` + * * `interval.end_time` + * For example: + * ``` + * interval.start_time > "2022-03-11T00:00:00-08:00" AND + * interval.end_time < "2022-03-12T00:00:00-08:00" + * ``` + * + * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. The maximum number of results to return for a single query. The + * server may further constrain the maximum number of results returned in a + * single page. The value should be in the range [1, 1000]. If the value given + * is outside this range, the server will decide the number of results to be + * returned. + * + * Generated from protobuf field int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. The `next_page_token` from a previous call to + * `ListSnoozesRequest` to get the next page of results. + * + * Generated from protobuf field string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) whose + * `Snooze`s should be listed. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER] + * Please see {@see SnoozeServiceClient::workspaceName()} for help formatting this field. + * + * @return \Google\Cloud\Monitoring\V3\ListSnoozesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) whose + * `Snooze`s should be listed. The format is: + * projects/[PROJECT_ID_OR_NUMBER] + * @type string $filter + * Optional. Optional filter to restrict results to the given criteria. The + * following fields are supported. + * * `interval.start_time` + * * `interval.end_time` + * For example: + * ``` + * interval.start_time > "2022-03-11T00:00:00-08:00" AND + * interval.end_time < "2022-03-12T00:00:00-08:00" + * ``` + * @type int $page_size + * Optional. The maximum number of results to return for a single query. The + * server may further constrain the maximum number of results returned in a + * single page. The value should be in the range [1, 1000]. If the value given + * is outside this range, the server will decide the number of results to be + * returned. + * @type string $page_token + * Optional. The `next_page_token` from a previous call to + * `ListSnoozesRequest` to get the next page of results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\SnoozeService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) whose + * `Snooze`s should be listed. The format is: + * projects/[PROJECT_ID_OR_NUMBER] + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) whose + * `Snooze`s should be listed. The format is: + * projects/[PROJECT_ID_OR_NUMBER] + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. Optional filter to restrict results to the given criteria. The + * following fields are supported. + * * `interval.start_time` + * * `interval.end_time` + * For example: + * ``` + * interval.start_time > "2022-03-11T00:00:00-08:00" AND + * interval.end_time < "2022-03-12T00:00:00-08:00" + * ``` + * + * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. Optional filter to restrict results to the given criteria. The + * following fields are supported. + * * `interval.start_time` + * * `interval.end_time` + * For example: + * ``` + * interval.start_time > "2022-03-11T00:00:00-08:00" AND + * interval.end_time < "2022-03-12T00:00:00-08:00" + * ``` + * + * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Optional. The maximum number of results to return for a single query. The + * server may further constrain the maximum number of results returned in a + * single page. The value should be in the range [1, 1000]. If the value given + * is outside this range, the server will decide the number of results to be + * returned. + * + * Generated from protobuf field int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of results to return for a single query. The + * server may further constrain the maximum number of results returned in a + * single page. The value should be in the range [1, 1000]. If the value given + * is outside this range, the server will decide the number of results to be + * returned. + * + * Generated from protobuf field int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. The `next_page_token` from a previous call to + * `ListSnoozesRequest` to get the next page of results. + * + * Generated from protobuf field string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. The `next_page_token` from a previous call to + * `ListSnoozesRequest` to get the next page of results. + * + * Generated from protobuf field string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListSnoozesResponse.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListSnoozesResponse.php new file mode 100644 index 000000000000..e22e8db840ef --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListSnoozesResponse.php @@ -0,0 +1,106 @@ +google.monitoring.v3.ListSnoozesResponse + */ +class ListSnoozesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * `Snooze`s matching this list call. + * + * Generated from protobuf field repeated .google.monitoring.v3.Snooze snoozes = 1; + */ + private $snoozes; + /** + * Page token for repeated calls to `ListSnoozes`, to fetch additional pages + * of results. If this is empty or missing, there are no more pages. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Monitoring\V3\Snooze>|\Google\Protobuf\Internal\RepeatedField $snoozes + * `Snooze`s matching this list call. + * @type string $next_page_token + * Page token for repeated calls to `ListSnoozes`, to fetch additional pages + * of results. If this is empty or missing, there are no more pages. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\SnoozeService::initOnce(); + parent::__construct($data); + } + + /** + * `Snooze`s matching this list call. + * + * Generated from protobuf field repeated .google.monitoring.v3.Snooze snoozes = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSnoozes() + { + return $this->snoozes; + } + + /** + * `Snooze`s matching this list call. + * + * Generated from protobuf field repeated .google.monitoring.v3.Snooze snoozes = 1; + * @param array<\Google\Cloud\Monitoring\V3\Snooze>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSnoozes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Monitoring\V3\Snooze::class); + $this->snoozes = $arr; + + return $this; + } + + /** + * Page token for repeated calls to `ListSnoozes`, to fetch additional pages + * of results. If this is empty or missing, there are no more pages. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Page token for repeated calls to `ListSnoozes`, to fetch additional pages + * of results. If this is empty or missing, there are no more pages. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListTimeSeriesRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListTimeSeriesRequest.php new file mode 100644 index 000000000000..0b123db098c9 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListTimeSeriesRequest.php @@ -0,0 +1,501 @@ +google.monitoring.v3.ListTimeSeriesRequest + */ +class ListTimeSeriesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name), + * organization or folder on which to execute the request. The format is: + * projects/[PROJECT_ID_OR_NUMBER] + * organizations/[ORGANIZATION_ID] + * folders/[FOLDER_ID] + * + * Generated from protobuf field string name = 10 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. A [monitoring + * filter](https://cloud.google.com/monitoring/api/v3/filters) that specifies + * which time series should be returned. The filter must specify a single + * metric type, and can additionally specify metric labels and other + * information. For example: + * metric.type = "compute.googleapis.com/instance/cpu/usage_time" AND + * metric.labels.instance_name = "my-instance-name" + * + * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $filter = ''; + /** + * Required. The time interval for which results should be returned. Only time + * series that contain data points in the specified interval are included in + * the response. + * + * Generated from protobuf field .google.monitoring.v3.TimeInterval interval = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $interval = null; + /** + * Specifies the alignment of data points in individual time series as + * well as how to combine the retrieved time series across specified labels. + * By default (if no `aggregation` is explicitly specified), the raw time + * series data is returned. + * + * Generated from protobuf field .google.monitoring.v3.Aggregation aggregation = 5; + */ + protected $aggregation = null; + /** + * Apply a second aggregation after `aggregation` is applied. May only be + * specified if `aggregation` is specified. + * + * Generated from protobuf field .google.monitoring.v3.Aggregation secondary_aggregation = 11; + */ + protected $secondary_aggregation = null; + /** + * Unsupported: must be left blank. The points in each time series are + * currently returned in reverse time order (most recent to oldest). + * + * Generated from protobuf field string order_by = 6; + */ + protected $order_by = ''; + /** + * Required. Specifies which information is returned about the time series. + * + * Generated from protobuf field .google.monitoring.v3.ListTimeSeriesRequest.TimeSeriesView view = 7 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $view = 0; + /** + * A positive number that is the maximum number of results to return. If + * `page_size` is empty or more than 100,000 results, the effective + * `page_size` is 100,000 results. If `view` is set to `FULL`, this is the + * maximum number of `Points` returned. If `view` is set to `HEADERS`, this is + * the maximum number of `TimeSeries` returned. + * + * Generated from protobuf field int32 page_size = 8; + */ + protected $page_size = 0; + /** + * If this field is not empty then it must contain the `nextPageToken` value + * returned by a previous call to this method. Using this field causes the + * method to return additional results from the previous method call. + * + * Generated from protobuf field string page_token = 9; + */ + protected $page_token = ''; + + /** + * @param string $name Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name), + * organization or folder on which to execute the request. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER] + * organizations/[ORGANIZATION_ID] + * folders/[FOLDER_ID] + * Please see {@see MetricServiceClient::workspaceName()} for help formatting this field. + * @param string $filter Required. A [monitoring + * filter](https://cloud.google.com/monitoring/api/v3/filters) that specifies + * which time series should be returned. The filter must specify a single + * metric type, and can additionally specify metric labels and other + * information. For example: + * + * metric.type = "compute.googleapis.com/instance/cpu/usage_time" AND + * metric.labels.instance_name = "my-instance-name" + * @param \Google\Cloud\Monitoring\V3\TimeInterval $interval Required. The time interval for which results should be returned. Only time + * series that contain data points in the specified interval are included in + * the response. + * @param int $view Required. Specifies which information is returned about the time series. + * For allowed values, use constants defined on {@see \Google\Cloud\Monitoring\V3\ListTimeSeriesRequest\TimeSeriesView} + * + * @return \Google\Cloud\Monitoring\V3\ListTimeSeriesRequest + * + * @experimental + */ + public static function build(string $name, string $filter, \Google\Cloud\Monitoring\V3\TimeInterval $interval, int $view): self + { + return (new self()) + ->setName($name) + ->setFilter($filter) + ->setInterval($interval) + ->setView($view); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name), + * organization or folder on which to execute the request. The format is: + * projects/[PROJECT_ID_OR_NUMBER] + * organizations/[ORGANIZATION_ID] + * folders/[FOLDER_ID] + * @type string $filter + * Required. A [monitoring + * filter](https://cloud.google.com/monitoring/api/v3/filters) that specifies + * which time series should be returned. The filter must specify a single + * metric type, and can additionally specify metric labels and other + * information. For example: + * metric.type = "compute.googleapis.com/instance/cpu/usage_time" AND + * metric.labels.instance_name = "my-instance-name" + * @type \Google\Cloud\Monitoring\V3\TimeInterval $interval + * Required. The time interval for which results should be returned. Only time + * series that contain data points in the specified interval are included in + * the response. + * @type \Google\Cloud\Monitoring\V3\Aggregation $aggregation + * Specifies the alignment of data points in individual time series as + * well as how to combine the retrieved time series across specified labels. + * By default (if no `aggregation` is explicitly specified), the raw time + * series data is returned. + * @type \Google\Cloud\Monitoring\V3\Aggregation $secondary_aggregation + * Apply a second aggregation after `aggregation` is applied. May only be + * specified if `aggregation` is specified. + * @type string $order_by + * Unsupported: must be left blank. The points in each time series are + * currently returned in reverse time order (most recent to oldest). + * @type int $view + * Required. Specifies which information is returned about the time series. + * @type int $page_size + * A positive number that is the maximum number of results to return. If + * `page_size` is empty or more than 100,000 results, the effective + * `page_size` is 100,000 results. If `view` is set to `FULL`, this is the + * maximum number of `Points` returned. If `view` is set to `HEADERS`, this is + * the maximum number of `TimeSeries` returned. + * @type string $page_token + * If this field is not empty then it must contain the `nextPageToken` value + * returned by a previous call to this method. Using this field causes the + * method to return additional results from the previous method call. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\MetricService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name), + * organization or folder on which to execute the request. The format is: + * projects/[PROJECT_ID_OR_NUMBER] + * organizations/[ORGANIZATION_ID] + * folders/[FOLDER_ID] + * + * Generated from protobuf field string name = 10 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name), + * organization or folder on which to execute the request. The format is: + * projects/[PROJECT_ID_OR_NUMBER] + * organizations/[ORGANIZATION_ID] + * folders/[FOLDER_ID] + * + * Generated from protobuf field string name = 10 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. A [monitoring + * filter](https://cloud.google.com/monitoring/api/v3/filters) that specifies + * which time series should be returned. The filter must specify a single + * metric type, and can additionally specify metric labels and other + * information. For example: + * metric.type = "compute.googleapis.com/instance/cpu/usage_time" AND + * metric.labels.instance_name = "my-instance-name" + * + * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Required. A [monitoring + * filter](https://cloud.google.com/monitoring/api/v3/filters) that specifies + * which time series should be returned. The filter must specify a single + * metric type, and can additionally specify metric labels and other + * information. For example: + * metric.type = "compute.googleapis.com/instance/cpu/usage_time" AND + * metric.labels.instance_name = "my-instance-name" + * + * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Required. The time interval for which results should be returned. Only time + * series that contain data points in the specified interval are included in + * the response. + * + * Generated from protobuf field .google.monitoring.v3.TimeInterval interval = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Monitoring\V3\TimeInterval|null + */ + public function getInterval() + { + return $this->interval; + } + + public function hasInterval() + { + return isset($this->interval); + } + + public function clearInterval() + { + unset($this->interval); + } + + /** + * Required. The time interval for which results should be returned. Only time + * series that contain data points in the specified interval are included in + * the response. + * + * Generated from protobuf field .google.monitoring.v3.TimeInterval interval = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Monitoring\V3\TimeInterval $var + * @return $this + */ + public function setInterval($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\TimeInterval::class); + $this->interval = $var; + + return $this; + } + + /** + * Specifies the alignment of data points in individual time series as + * well as how to combine the retrieved time series across specified labels. + * By default (if no `aggregation` is explicitly specified), the raw time + * series data is returned. + * + * Generated from protobuf field .google.monitoring.v3.Aggregation aggregation = 5; + * @return \Google\Cloud\Monitoring\V3\Aggregation|null + */ + public function getAggregation() + { + return $this->aggregation; + } + + public function hasAggregation() + { + return isset($this->aggregation); + } + + public function clearAggregation() + { + unset($this->aggregation); + } + + /** + * Specifies the alignment of data points in individual time series as + * well as how to combine the retrieved time series across specified labels. + * By default (if no `aggregation` is explicitly specified), the raw time + * series data is returned. + * + * Generated from protobuf field .google.monitoring.v3.Aggregation aggregation = 5; + * @param \Google\Cloud\Monitoring\V3\Aggregation $var + * @return $this + */ + public function setAggregation($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\Aggregation::class); + $this->aggregation = $var; + + return $this; + } + + /** + * Apply a second aggregation after `aggregation` is applied. May only be + * specified if `aggregation` is specified. + * + * Generated from protobuf field .google.monitoring.v3.Aggregation secondary_aggregation = 11; + * @return \Google\Cloud\Monitoring\V3\Aggregation|null + */ + public function getSecondaryAggregation() + { + return $this->secondary_aggregation; + } + + public function hasSecondaryAggregation() + { + return isset($this->secondary_aggregation); + } + + public function clearSecondaryAggregation() + { + unset($this->secondary_aggregation); + } + + /** + * Apply a second aggregation after `aggregation` is applied. May only be + * specified if `aggregation` is specified. + * + * Generated from protobuf field .google.monitoring.v3.Aggregation secondary_aggregation = 11; + * @param \Google\Cloud\Monitoring\V3\Aggregation $var + * @return $this + */ + public function setSecondaryAggregation($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\Aggregation::class); + $this->secondary_aggregation = $var; + + return $this; + } + + /** + * Unsupported: must be left blank. The points in each time series are + * currently returned in reverse time order (most recent to oldest). + * + * Generated from protobuf field string order_by = 6; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Unsupported: must be left blank. The points in each time series are + * currently returned in reverse time order (most recent to oldest). + * + * Generated from protobuf field string order_by = 6; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + + /** + * Required. Specifies which information is returned about the time series. + * + * Generated from protobuf field .google.monitoring.v3.ListTimeSeriesRequest.TimeSeriesView view = 7 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getView() + { + return $this->view; + } + + /** + * Required. Specifies which information is returned about the time series. + * + * Generated from protobuf field .google.monitoring.v3.ListTimeSeriesRequest.TimeSeriesView view = 7 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setView($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Monitoring\V3\ListTimeSeriesRequest\TimeSeriesView::class); + $this->view = $var; + + return $this; + } + + /** + * A positive number that is the maximum number of results to return. If + * `page_size` is empty or more than 100,000 results, the effective + * `page_size` is 100,000 results. If `view` is set to `FULL`, this is the + * maximum number of `Points` returned. If `view` is set to `HEADERS`, this is + * the maximum number of `TimeSeries` returned. + * + * Generated from protobuf field int32 page_size = 8; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * A positive number that is the maximum number of results to return. If + * `page_size` is empty or more than 100,000 results, the effective + * `page_size` is 100,000 results. If `view` is set to `FULL`, this is the + * maximum number of `Points` returned. If `view` is set to `HEADERS`, this is + * the maximum number of `TimeSeries` returned. + * + * Generated from protobuf field int32 page_size = 8; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * If this field is not empty then it must contain the `nextPageToken` value + * returned by a previous call to this method. Using this field causes the + * method to return additional results from the previous method call. + * + * Generated from protobuf field string page_token = 9; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * If this field is not empty then it must contain the `nextPageToken` value + * returned by a previous call to this method. Using this field causes the + * method to return additional results from the previous method call. + * + * Generated from protobuf field string page_token = 9; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListTimeSeriesRequest/TimeSeriesView.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListTimeSeriesRequest/TimeSeriesView.php new file mode 100644 index 000000000000..cd4d2c1bcc55 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListTimeSeriesRequest/TimeSeriesView.php @@ -0,0 +1,59 @@ +google.monitoring.v3.ListTimeSeriesRequest.TimeSeriesView + */ +class TimeSeriesView +{ + /** + * Returns the identity of the metric(s), the time series, + * and the time series data. + * + * Generated from protobuf enum FULL = 0; + */ + const FULL = 0; + /** + * Returns the identity of the metric and the time series resource, + * but not the time series data. + * + * Generated from protobuf enum HEADERS = 1; + */ + const HEADERS = 1; + + private static $valueToName = [ + self::FULL => 'FULL', + self::HEADERS => 'HEADERS', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(TimeSeriesView::class, \Google\Cloud\Monitoring\V3\ListTimeSeriesRequest_TimeSeriesView::class); + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListTimeSeriesResponse.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListTimeSeriesResponse.php new file mode 100644 index 000000000000..f2d874bd3478 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListTimeSeriesResponse.php @@ -0,0 +1,201 @@ +google.monitoring.v3.ListTimeSeriesResponse + */ +class ListTimeSeriesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * One or more time series that match the filter included in the request. + * + * Generated from protobuf field repeated .google.monitoring.v3.TimeSeries time_series = 1; + */ + private $time_series; + /** + * If there are more results than have been returned, then this field is set + * to a non-empty value. To see the additional results, + * use that value as `page_token` in the next call to this method. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Query execution errors that may have caused the time series data returned + * to be incomplete. + * + * Generated from protobuf field repeated .google.rpc.Status execution_errors = 3; + */ + private $execution_errors; + /** + * The unit in which all `time_series` point values are reported. `unit` + * follows the UCUM format for units as seen in + * https://unitsofmeasure.org/ucum.html. + * If different `time_series` have different units (for example, because they + * come from different metric types, or a unit is absent), then `unit` will be + * "{not_a_unit}". + * + * Generated from protobuf field string unit = 5; + */ + protected $unit = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Monitoring\V3\TimeSeries>|\Google\Protobuf\Internal\RepeatedField $time_series + * One or more time series that match the filter included in the request. + * @type string $next_page_token + * If there are more results than have been returned, then this field is set + * to a non-empty value. To see the additional results, + * use that value as `page_token` in the next call to this method. + * @type array<\Google\Rpc\Status>|\Google\Protobuf\Internal\RepeatedField $execution_errors + * Query execution errors that may have caused the time series data returned + * to be incomplete. + * @type string $unit + * The unit in which all `time_series` point values are reported. `unit` + * follows the UCUM format for units as seen in + * https://unitsofmeasure.org/ucum.html. + * If different `time_series` have different units (for example, because they + * come from different metric types, or a unit is absent), then `unit` will be + * "{not_a_unit}". + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\MetricService::initOnce(); + parent::__construct($data); + } + + /** + * One or more time series that match the filter included in the request. + * + * Generated from protobuf field repeated .google.monitoring.v3.TimeSeries time_series = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTimeSeries() + { + return $this->time_series; + } + + /** + * One or more time series that match the filter included in the request. + * + * Generated from protobuf field repeated .google.monitoring.v3.TimeSeries time_series = 1; + * @param array<\Google\Cloud\Monitoring\V3\TimeSeries>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTimeSeries($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Monitoring\V3\TimeSeries::class); + $this->time_series = $arr; + + return $this; + } + + /** + * If there are more results than have been returned, then this field is set + * to a non-empty value. To see the additional results, + * use that value as `page_token` in the next call to this method. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * If there are more results than have been returned, then this field is set + * to a non-empty value. To see the additional results, + * use that value as `page_token` in the next call to this method. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Query execution errors that may have caused the time series data returned + * to be incomplete. + * + * Generated from protobuf field repeated .google.rpc.Status execution_errors = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getExecutionErrors() + { + return $this->execution_errors; + } + + /** + * Query execution errors that may have caused the time series data returned + * to be incomplete. + * + * Generated from protobuf field repeated .google.rpc.Status execution_errors = 3; + * @param array<\Google\Rpc\Status>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setExecutionErrors($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Rpc\Status::class); + $this->execution_errors = $arr; + + return $this; + } + + /** + * The unit in which all `time_series` point values are reported. `unit` + * follows the UCUM format for units as seen in + * https://unitsofmeasure.org/ucum.html. + * If different `time_series` have different units (for example, because they + * come from different metric types, or a unit is absent), then `unit` will be + * "{not_a_unit}". + * + * Generated from protobuf field string unit = 5; + * @return string + */ + public function getUnit() + { + return $this->unit; + } + + /** + * The unit in which all `time_series` point values are reported. `unit` + * follows the UCUM format for units as seen in + * https://unitsofmeasure.org/ucum.html. + * If different `time_series` have different units (for example, because they + * come from different metric types, or a unit is absent), then `unit` will be + * "{not_a_unit}". + * + * Generated from protobuf field string unit = 5; + * @param string $var + * @return $this + */ + public function setUnit($var) + { + GPBUtil::checkString($var, True); + $this->unit = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListUptimeCheckConfigsRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListUptimeCheckConfigsRequest.php new file mode 100644 index 000000000000..0718e498334a --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListUptimeCheckConfigsRequest.php @@ -0,0 +1,230 @@ +google.monitoring.v3.ListUptimeCheckConfigsRequest + */ +class ListUptimeCheckConfigsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) whose + * Uptime check configurations are listed. The format is: + * projects/[PROJECT_ID_OR_NUMBER] + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * If provided, this field specifies the criteria that must be met by + * uptime checks to be included in the response. + * For more details, see [Filtering + * syntax](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering#filter_syntax). + * + * Generated from protobuf field string filter = 2; + */ + protected $filter = ''; + /** + * The maximum number of results to return in a single response. The server + * may further constrain the maximum number of results returned in a single + * page. If the page_size is <=0, the server will decide the number of results + * to be returned. + * + * Generated from protobuf field int32 page_size = 3; + */ + protected $page_size = 0; + /** + * If this field is not empty then it must contain the `nextPageToken` value + * returned by a previous call to this method. Using this field causes the + * method to return more results from the previous method call. + * + * Generated from protobuf field string page_token = 4; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) whose + * Uptime check configurations are listed. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER] + * + * @return \Google\Cloud\Monitoring\V3\ListUptimeCheckConfigsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) whose + * Uptime check configurations are listed. The format is: + * projects/[PROJECT_ID_OR_NUMBER] + * @type string $filter + * If provided, this field specifies the criteria that must be met by + * uptime checks to be included in the response. + * For more details, see [Filtering + * syntax](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering#filter_syntax). + * @type int $page_size + * The maximum number of results to return in a single response. The server + * may further constrain the maximum number of results returned in a single + * page. If the page_size is <=0, the server will decide the number of results + * to be returned. + * @type string $page_token + * If this field is not empty then it must contain the `nextPageToken` value + * returned by a previous call to this method. Using this field causes the + * method to return more results from the previous method call. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\UptimeService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) whose + * Uptime check configurations are listed. The format is: + * projects/[PROJECT_ID_OR_NUMBER] + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) whose + * Uptime check configurations are listed. The format is: + * projects/[PROJECT_ID_OR_NUMBER] + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * If provided, this field specifies the criteria that must be met by + * uptime checks to be included in the response. + * For more details, see [Filtering + * syntax](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering#filter_syntax). + * + * Generated from protobuf field string filter = 2; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * If provided, this field specifies the criteria that must be met by + * uptime checks to be included in the response. + * For more details, see [Filtering + * syntax](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering#filter_syntax). + * + * Generated from protobuf field string filter = 2; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * The maximum number of results to return in a single response. The server + * may further constrain the maximum number of results returned in a single + * page. If the page_size is <=0, the server will decide the number of results + * to be returned. + * + * Generated from protobuf field int32 page_size = 3; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of results to return in a single response. The server + * may further constrain the maximum number of results returned in a single + * page. If the page_size is <=0, the server will decide the number of results + * to be returned. + * + * Generated from protobuf field int32 page_size = 3; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * If this field is not empty then it must contain the `nextPageToken` value + * returned by a previous call to this method. Using this field causes the + * method to return more results from the previous method call. + * + * Generated from protobuf field string page_token = 4; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * If this field is not empty then it must contain the `nextPageToken` value + * returned by a previous call to this method. Using this field causes the + * method to return more results from the previous method call. + * + * Generated from protobuf field string page_token = 4; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListUptimeCheckConfigsResponse.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListUptimeCheckConfigsResponse.php new file mode 100644 index 000000000000..f12354762fe7 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListUptimeCheckConfigsResponse.php @@ -0,0 +1,155 @@ +google.monitoring.v3.ListUptimeCheckConfigsResponse + */ +class ListUptimeCheckConfigsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The returned Uptime check configurations. + * + * Generated from protobuf field repeated .google.monitoring.v3.UptimeCheckConfig uptime_check_configs = 1; + */ + private $uptime_check_configs; + /** + * This field represents the pagination token to retrieve the next page of + * results. If the value is empty, it means no further results for the + * request. To retrieve the next page of results, the value of the + * next_page_token is passed to the subsequent List method call (in the + * request message's page_token field). + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * The total number of Uptime check configurations for the project, + * irrespective of any pagination. + * + * Generated from protobuf field int32 total_size = 3; + */ + protected $total_size = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Monitoring\V3\UptimeCheckConfig>|\Google\Protobuf\Internal\RepeatedField $uptime_check_configs + * The returned Uptime check configurations. + * @type string $next_page_token + * This field represents the pagination token to retrieve the next page of + * results. If the value is empty, it means no further results for the + * request. To retrieve the next page of results, the value of the + * next_page_token is passed to the subsequent List method call (in the + * request message's page_token field). + * @type int $total_size + * The total number of Uptime check configurations for the project, + * irrespective of any pagination. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\UptimeService::initOnce(); + parent::__construct($data); + } + + /** + * The returned Uptime check configurations. + * + * Generated from protobuf field repeated .google.monitoring.v3.UptimeCheckConfig uptime_check_configs = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUptimeCheckConfigs() + { + return $this->uptime_check_configs; + } + + /** + * The returned Uptime check configurations. + * + * Generated from protobuf field repeated .google.monitoring.v3.UptimeCheckConfig uptime_check_configs = 1; + * @param array<\Google\Cloud\Monitoring\V3\UptimeCheckConfig>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUptimeCheckConfigs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Monitoring\V3\UptimeCheckConfig::class); + $this->uptime_check_configs = $arr; + + return $this; + } + + /** + * This field represents the pagination token to retrieve the next page of + * results. If the value is empty, it means no further results for the + * request. To retrieve the next page of results, the value of the + * next_page_token is passed to the subsequent List method call (in the + * request message's page_token field). + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * This field represents the pagination token to retrieve the next page of + * results. If the value is empty, it means no further results for the + * request. To retrieve the next page of results, the value of the + * next_page_token is passed to the subsequent List method call (in the + * request message's page_token field). + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * The total number of Uptime check configurations for the project, + * irrespective of any pagination. + * + * Generated from protobuf field int32 total_size = 3; + * @return int + */ + public function getTotalSize() + { + return $this->total_size; + } + + /** + * The total number of Uptime check configurations for the project, + * irrespective of any pagination. + * + * Generated from protobuf field int32 total_size = 3; + * @param int $var + * @return $this + */ + public function setTotalSize($var) + { + GPBUtil::checkInt32($var); + $this->total_size = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListUptimeCheckIpsRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListUptimeCheckIpsRequest.php new file mode 100644 index 000000000000..f2d106e88980 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListUptimeCheckIpsRequest.php @@ -0,0 +1,129 @@ +google.monitoring.v3.ListUptimeCheckIpsRequest + */ +class ListUptimeCheckIpsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The maximum number of results to return in a single response. The server + * may further constrain the maximum number of results returned in a single + * page. If the page_size is <=0, the server will decide the number of results + * to be returned. + * NOTE: this field is not yet implemented + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * If this field is not empty then it must contain the `nextPageToken` value + * returned by a previous call to this method. Using this field causes the + * method to return more results from the previous method call. + * NOTE: this field is not yet implemented + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $page_size + * The maximum number of results to return in a single response. The server + * may further constrain the maximum number of results returned in a single + * page. If the page_size is <=0, the server will decide the number of results + * to be returned. + * NOTE: this field is not yet implemented + * @type string $page_token + * If this field is not empty then it must contain the `nextPageToken` value + * returned by a previous call to this method. Using this field causes the + * method to return more results from the previous method call. + * NOTE: this field is not yet implemented + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\UptimeService::initOnce(); + parent::__construct($data); + } + + /** + * The maximum number of results to return in a single response. The server + * may further constrain the maximum number of results returned in a single + * page. If the page_size is <=0, the server will decide the number of results + * to be returned. + * NOTE: this field is not yet implemented + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of results to return in a single response. The server + * may further constrain the maximum number of results returned in a single + * page. If the page_size is <=0, the server will decide the number of results + * to be returned. + * NOTE: this field is not yet implemented + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * If this field is not empty then it must contain the `nextPageToken` value + * returned by a previous call to this method. Using this field causes the + * method to return more results from the previous method call. + * NOTE: this field is not yet implemented + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * If this field is not empty then it must contain the `nextPageToken` value + * returned by a previous call to this method. Using this field causes the + * method to return more results from the previous method call. + * NOTE: this field is not yet implemented + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListUptimeCheckIpsResponse.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListUptimeCheckIpsResponse.php new file mode 100644 index 000000000000..26da2fcdd61f --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListUptimeCheckIpsResponse.php @@ -0,0 +1,125 @@ +google.monitoring.v3.ListUptimeCheckIpsResponse + */ +class ListUptimeCheckIpsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The returned list of IP addresses (including region and location) that the + * checkers run from. + * + * Generated from protobuf field repeated .google.monitoring.v3.UptimeCheckIp uptime_check_ips = 1; + */ + private $uptime_check_ips; + /** + * This field represents the pagination token to retrieve the next page of + * results. If the value is empty, it means no further results for the + * request. To retrieve the next page of results, the value of the + * next_page_token is passed to the subsequent List method call (in the + * request message's page_token field). + * NOTE: this field is not yet implemented + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Monitoring\V3\UptimeCheckIp>|\Google\Protobuf\Internal\RepeatedField $uptime_check_ips + * The returned list of IP addresses (including region and location) that the + * checkers run from. + * @type string $next_page_token + * This field represents the pagination token to retrieve the next page of + * results. If the value is empty, it means no further results for the + * request. To retrieve the next page of results, the value of the + * next_page_token is passed to the subsequent List method call (in the + * request message's page_token field). + * NOTE: this field is not yet implemented + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\UptimeService::initOnce(); + parent::__construct($data); + } + + /** + * The returned list of IP addresses (including region and location) that the + * checkers run from. + * + * Generated from protobuf field repeated .google.monitoring.v3.UptimeCheckIp uptime_check_ips = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUptimeCheckIps() + { + return $this->uptime_check_ips; + } + + /** + * The returned list of IP addresses (including region and location) that the + * checkers run from. + * + * Generated from protobuf field repeated .google.monitoring.v3.UptimeCheckIp uptime_check_ips = 1; + * @param array<\Google\Cloud\Monitoring\V3\UptimeCheckIp>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUptimeCheckIps($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Monitoring\V3\UptimeCheckIp::class); + $this->uptime_check_ips = $arr; + + return $this; + } + + /** + * This field represents the pagination token to retrieve the next page of + * results. If the value is empty, it means no further results for the + * request. To retrieve the next page of results, the value of the + * next_page_token is passed to the subsequent List method call (in the + * request message's page_token field). + * NOTE: this field is not yet implemented + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * This field represents the pagination token to retrieve the next page of + * results. If the value is empty, it means no further results for the + * request. To retrieve the next page of results, the value of the + * next_page_token is passed to the subsequent List method call (in the + * request message's page_token field). + * NOTE: this field is not yet implemented + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/MutationRecord.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/MutationRecord.php new file mode 100644 index 000000000000..73a1f82bce89 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/MutationRecord.php @@ -0,0 +1,111 @@ +google.monitoring.v3.MutationRecord + */ +class MutationRecord extends \Google\Protobuf\Internal\Message +{ + /** + * When the change occurred. + * + * Generated from protobuf field .google.protobuf.Timestamp mutate_time = 1; + */ + protected $mutate_time = null; + /** + * The email address of the user making the change. + * + * Generated from protobuf field string mutated_by = 2; + */ + protected $mutated_by = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $mutate_time + * When the change occurred. + * @type string $mutated_by + * The email address of the user making the change. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\MutationRecord::initOnce(); + parent::__construct($data); + } + + /** + * When the change occurred. + * + * Generated from protobuf field .google.protobuf.Timestamp mutate_time = 1; + * @return \Google\Protobuf\Timestamp|null + */ + public function getMutateTime() + { + return $this->mutate_time; + } + + public function hasMutateTime() + { + return isset($this->mutate_time); + } + + public function clearMutateTime() + { + unset($this->mutate_time); + } + + /** + * When the change occurred. + * + * Generated from protobuf field .google.protobuf.Timestamp mutate_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setMutateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->mutate_time = $var; + + return $this; + } + + /** + * The email address of the user making the change. + * + * Generated from protobuf field string mutated_by = 2; + * @return string + */ + public function getMutatedBy() + { + return $this->mutated_by; + } + + /** + * The email address of the user making the change. + * + * Generated from protobuf field string mutated_by = 2; + * @param string $var + * @return $this + */ + public function setMutatedBy($var) + { + GPBUtil::checkString($var, True); + $this->mutated_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/NotificationChannel.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/NotificationChannel.php new file mode 100644 index 000000000000..a68ec145b595 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/NotificationChannel.php @@ -0,0 +1,594 @@ +google.monitoring.v3.NotificationChannel + */ +class NotificationChannel extends \Google\Protobuf\Internal\Message +{ + /** + * The type of the notification channel. This field matches the + * value of the + * [NotificationChannelDescriptor.type][google.monitoring.v3.NotificationChannelDescriptor.type] + * field. + * + * Generated from protobuf field string type = 1; + */ + protected $type = ''; + /** + * Identifier. The full REST resource name for this channel. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID] + * The `[CHANNEL_ID]` is automatically assigned by the server on creation. + * + * Generated from protobuf field string name = 6 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * An optional human-readable name for this notification channel. It is + * recommended that you specify a non-empty and unique name in order to + * make it easier to identify the channels in your project, though this is + * not enforced. The display name is limited to 512 Unicode characters. + * + * Generated from protobuf field string display_name = 3; + */ + protected $display_name = ''; + /** + * An optional human-readable description of this notification channel. This + * description may provide additional details, beyond the display + * name, for the channel. This may not exceed 1024 Unicode characters. + * + * Generated from protobuf field string description = 4; + */ + protected $description = ''; + /** + * Configuration fields that define the channel and its behavior. The + * permissible and required labels are specified in the + * [NotificationChannelDescriptor.labels][google.monitoring.v3.NotificationChannelDescriptor.labels] + * of the `NotificationChannelDescriptor` corresponding to the `type` field. + * + * Generated from protobuf field map labels = 5; + */ + private $labels; + /** + * User-supplied key/value data that does not need to conform to + * the corresponding `NotificationChannelDescriptor`'s schema, unlike + * the `labels` field. This field is intended to be used for organizing + * and identifying the `NotificationChannel` objects. + * The field can contain up to 64 entries. Each key and value is limited to + * 63 Unicode characters or 128 bytes, whichever is smaller. Labels and + * values can contain only lowercase letters, numerals, underscores, and + * dashes. Keys must begin with a letter. + * + * Generated from protobuf field map user_labels = 8; + */ + private $user_labels; + /** + * Indicates whether this channel has been verified or not. On a + * [`ListNotificationChannels`][google.monitoring.v3.NotificationChannelService.ListNotificationChannels] + * or + * [`GetNotificationChannel`][google.monitoring.v3.NotificationChannelService.GetNotificationChannel] + * operation, this field is expected to be populated. + * If the value is `UNVERIFIED`, then it indicates that the channel is + * non-functioning (it both requires verification and lacks verification); + * otherwise, it is assumed that the channel works. + * If the channel is neither `VERIFIED` nor `UNVERIFIED`, it implies that + * the channel is of a type that does not require verification or that + * this specific channel has been exempted from verification because it was + * created prior to verification being required for channels of this type. + * This field cannot be modified using a standard + * [`UpdateNotificationChannel`][google.monitoring.v3.NotificationChannelService.UpdateNotificationChannel] + * operation. To change the value of this field, you must call + * [`VerifyNotificationChannel`][google.monitoring.v3.NotificationChannelService.VerifyNotificationChannel]. + * + * Generated from protobuf field .google.monitoring.v3.NotificationChannel.VerificationStatus verification_status = 9; + */ + protected $verification_status = 0; + /** + * Whether notifications are forwarded to the described channel. This makes + * it possible to disable delivery of notifications to a particular channel + * without removing the channel from all alerting policies that reference + * the channel. This is a more convenient approach when the change is + * temporary and you want to receive notifications from the same set + * of alerting policies on the channel at some point in the future. + * + * Generated from protobuf field .google.protobuf.BoolValue enabled = 11; + */ + protected $enabled = null; + /** + * Record of the creation of this channel. + * + * Generated from protobuf field .google.monitoring.v3.MutationRecord creation_record = 12; + */ + protected $creation_record = null; + /** + * Records of the modification of this channel. + * + * Generated from protobuf field repeated .google.monitoring.v3.MutationRecord mutation_records = 13; + */ + private $mutation_records; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $type + * The type of the notification channel. This field matches the + * value of the + * [NotificationChannelDescriptor.type][google.monitoring.v3.NotificationChannelDescriptor.type] + * field. + * @type string $name + * Identifier. The full REST resource name for this channel. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID] + * The `[CHANNEL_ID]` is automatically assigned by the server on creation. + * @type string $display_name + * An optional human-readable name for this notification channel. It is + * recommended that you specify a non-empty and unique name in order to + * make it easier to identify the channels in your project, though this is + * not enforced. The display name is limited to 512 Unicode characters. + * @type string $description + * An optional human-readable description of this notification channel. This + * description may provide additional details, beyond the display + * name, for the channel. This may not exceed 1024 Unicode characters. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Configuration fields that define the channel and its behavior. The + * permissible and required labels are specified in the + * [NotificationChannelDescriptor.labels][google.monitoring.v3.NotificationChannelDescriptor.labels] + * of the `NotificationChannelDescriptor` corresponding to the `type` field. + * @type array|\Google\Protobuf\Internal\MapField $user_labels + * User-supplied key/value data that does not need to conform to + * the corresponding `NotificationChannelDescriptor`'s schema, unlike + * the `labels` field. This field is intended to be used for organizing + * and identifying the `NotificationChannel` objects. + * The field can contain up to 64 entries. Each key and value is limited to + * 63 Unicode characters or 128 bytes, whichever is smaller. Labels and + * values can contain only lowercase letters, numerals, underscores, and + * dashes. Keys must begin with a letter. + * @type int $verification_status + * Indicates whether this channel has been verified or not. On a + * [`ListNotificationChannels`][google.monitoring.v3.NotificationChannelService.ListNotificationChannels] + * or + * [`GetNotificationChannel`][google.monitoring.v3.NotificationChannelService.GetNotificationChannel] + * operation, this field is expected to be populated. + * If the value is `UNVERIFIED`, then it indicates that the channel is + * non-functioning (it both requires verification and lacks verification); + * otherwise, it is assumed that the channel works. + * If the channel is neither `VERIFIED` nor `UNVERIFIED`, it implies that + * the channel is of a type that does not require verification or that + * this specific channel has been exempted from verification because it was + * created prior to verification being required for channels of this type. + * This field cannot be modified using a standard + * [`UpdateNotificationChannel`][google.monitoring.v3.NotificationChannelService.UpdateNotificationChannel] + * operation. To change the value of this field, you must call + * [`VerifyNotificationChannel`][google.monitoring.v3.NotificationChannelService.VerifyNotificationChannel]. + * @type \Google\Protobuf\BoolValue $enabled + * Whether notifications are forwarded to the described channel. This makes + * it possible to disable delivery of notifications to a particular channel + * without removing the channel from all alerting policies that reference + * the channel. This is a more convenient approach when the change is + * temporary and you want to receive notifications from the same set + * of alerting policies on the channel at some point in the future. + * @type \Google\Cloud\Monitoring\V3\MutationRecord $creation_record + * Record of the creation of this channel. + * @type array<\Google\Cloud\Monitoring\V3\MutationRecord>|\Google\Protobuf\Internal\RepeatedField $mutation_records + * Records of the modification of this channel. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\Notification::initOnce(); + parent::__construct($data); + } + + /** + * The type of the notification channel. This field matches the + * value of the + * [NotificationChannelDescriptor.type][google.monitoring.v3.NotificationChannelDescriptor.type] + * field. + * + * Generated from protobuf field string type = 1; + * @return string + */ + public function getType() + { + return $this->type; + } + + /** + * The type of the notification channel. This field matches the + * value of the + * [NotificationChannelDescriptor.type][google.monitoring.v3.NotificationChannelDescriptor.type] + * field. + * + * Generated from protobuf field string type = 1; + * @param string $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkString($var, True); + $this->type = $var; + + return $this; + } + + /** + * Identifier. The full REST resource name for this channel. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID] + * The `[CHANNEL_ID]` is automatically assigned by the server on creation. + * + * Generated from protobuf field string name = 6 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The full REST resource name for this channel. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID] + * The `[CHANNEL_ID]` is automatically assigned by the server on creation. + * + * Generated from protobuf field string name = 6 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * An optional human-readable name for this notification channel. It is + * recommended that you specify a non-empty and unique name in order to + * make it easier to identify the channels in your project, though this is + * not enforced. The display name is limited to 512 Unicode characters. + * + * Generated from protobuf field string display_name = 3; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * An optional human-readable name for this notification channel. It is + * recommended that you specify a non-empty and unique name in order to + * make it easier to identify the channels in your project, though this is + * not enforced. The display name is limited to 512 Unicode characters. + * + * Generated from protobuf field string display_name = 3; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * An optional human-readable description of this notification channel. This + * description may provide additional details, beyond the display + * name, for the channel. This may not exceed 1024 Unicode characters. + * + * Generated from protobuf field string description = 4; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * An optional human-readable description of this notification channel. This + * description may provide additional details, beyond the display + * name, for the channel. This may not exceed 1024 Unicode characters. + * + * Generated from protobuf field string description = 4; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Configuration fields that define the channel and its behavior. The + * permissible and required labels are specified in the + * [NotificationChannelDescriptor.labels][google.monitoring.v3.NotificationChannelDescriptor.labels] + * of the `NotificationChannelDescriptor` corresponding to the `type` field. + * + * Generated from protobuf field map labels = 5; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Configuration fields that define the channel and its behavior. The + * permissible and required labels are specified in the + * [NotificationChannelDescriptor.labels][google.monitoring.v3.NotificationChannelDescriptor.labels] + * of the `NotificationChannelDescriptor` corresponding to the `type` field. + * + * Generated from protobuf field map labels = 5; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * User-supplied key/value data that does not need to conform to + * the corresponding `NotificationChannelDescriptor`'s schema, unlike + * the `labels` field. This field is intended to be used for organizing + * and identifying the `NotificationChannel` objects. + * The field can contain up to 64 entries. Each key and value is limited to + * 63 Unicode characters or 128 bytes, whichever is smaller. Labels and + * values can contain only lowercase letters, numerals, underscores, and + * dashes. Keys must begin with a letter. + * + * Generated from protobuf field map user_labels = 8; + * @return \Google\Protobuf\Internal\MapField + */ + public function getUserLabels() + { + return $this->user_labels; + } + + /** + * User-supplied key/value data that does not need to conform to + * the corresponding `NotificationChannelDescriptor`'s schema, unlike + * the `labels` field. This field is intended to be used for organizing + * and identifying the `NotificationChannel` objects. + * The field can contain up to 64 entries. Each key and value is limited to + * 63 Unicode characters or 128 bytes, whichever is smaller. Labels and + * values can contain only lowercase letters, numerals, underscores, and + * dashes. Keys must begin with a letter. + * + * Generated from protobuf field map user_labels = 8; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setUserLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->user_labels = $arr; + + return $this; + } + + /** + * Indicates whether this channel has been verified or not. On a + * [`ListNotificationChannels`][google.monitoring.v3.NotificationChannelService.ListNotificationChannels] + * or + * [`GetNotificationChannel`][google.monitoring.v3.NotificationChannelService.GetNotificationChannel] + * operation, this field is expected to be populated. + * If the value is `UNVERIFIED`, then it indicates that the channel is + * non-functioning (it both requires verification and lacks verification); + * otherwise, it is assumed that the channel works. + * If the channel is neither `VERIFIED` nor `UNVERIFIED`, it implies that + * the channel is of a type that does not require verification or that + * this specific channel has been exempted from verification because it was + * created prior to verification being required for channels of this type. + * This field cannot be modified using a standard + * [`UpdateNotificationChannel`][google.monitoring.v3.NotificationChannelService.UpdateNotificationChannel] + * operation. To change the value of this field, you must call + * [`VerifyNotificationChannel`][google.monitoring.v3.NotificationChannelService.VerifyNotificationChannel]. + * + * Generated from protobuf field .google.monitoring.v3.NotificationChannel.VerificationStatus verification_status = 9; + * @return int + */ + public function getVerificationStatus() + { + return $this->verification_status; + } + + /** + * Indicates whether this channel has been verified or not. On a + * [`ListNotificationChannels`][google.monitoring.v3.NotificationChannelService.ListNotificationChannels] + * or + * [`GetNotificationChannel`][google.monitoring.v3.NotificationChannelService.GetNotificationChannel] + * operation, this field is expected to be populated. + * If the value is `UNVERIFIED`, then it indicates that the channel is + * non-functioning (it both requires verification and lacks verification); + * otherwise, it is assumed that the channel works. + * If the channel is neither `VERIFIED` nor `UNVERIFIED`, it implies that + * the channel is of a type that does not require verification or that + * this specific channel has been exempted from verification because it was + * created prior to verification being required for channels of this type. + * This field cannot be modified using a standard + * [`UpdateNotificationChannel`][google.monitoring.v3.NotificationChannelService.UpdateNotificationChannel] + * operation. To change the value of this field, you must call + * [`VerifyNotificationChannel`][google.monitoring.v3.NotificationChannelService.VerifyNotificationChannel]. + * + * Generated from protobuf field .google.monitoring.v3.NotificationChannel.VerificationStatus verification_status = 9; + * @param int $var + * @return $this + */ + public function setVerificationStatus($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Monitoring\V3\NotificationChannel\VerificationStatus::class); + $this->verification_status = $var; + + return $this; + } + + /** + * Whether notifications are forwarded to the described channel. This makes + * it possible to disable delivery of notifications to a particular channel + * without removing the channel from all alerting policies that reference + * the channel. This is a more convenient approach when the change is + * temporary and you want to receive notifications from the same set + * of alerting policies on the channel at some point in the future. + * + * Generated from protobuf field .google.protobuf.BoolValue enabled = 11; + * @return \Google\Protobuf\BoolValue|null + */ + public function getEnabled() + { + return $this->enabled; + } + + public function hasEnabled() + { + return isset($this->enabled); + } + + public function clearEnabled() + { + unset($this->enabled); + } + + /** + * Returns the unboxed value from getEnabled() + + * Whether notifications are forwarded to the described channel. This makes + * it possible to disable delivery of notifications to a particular channel + * without removing the channel from all alerting policies that reference + * the channel. This is a more convenient approach when the change is + * temporary and you want to receive notifications from the same set + * of alerting policies on the channel at some point in the future. + * + * Generated from protobuf field .google.protobuf.BoolValue enabled = 11; + * @return bool|null + */ + public function getEnabledUnwrapped() + { + return $this->readWrapperValue("enabled"); + } + + /** + * Whether notifications are forwarded to the described channel. This makes + * it possible to disable delivery of notifications to a particular channel + * without removing the channel from all alerting policies that reference + * the channel. This is a more convenient approach when the change is + * temporary and you want to receive notifications from the same set + * of alerting policies on the channel at some point in the future. + * + * Generated from protobuf field .google.protobuf.BoolValue enabled = 11; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setEnabled($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->enabled = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Whether notifications are forwarded to the described channel. This makes + * it possible to disable delivery of notifications to a particular channel + * without removing the channel from all alerting policies that reference + * the channel. This is a more convenient approach when the change is + * temporary and you want to receive notifications from the same set + * of alerting policies on the channel at some point in the future. + * + * Generated from protobuf field .google.protobuf.BoolValue enabled = 11; + * @param bool|null $var + * @return $this + */ + public function setEnabledUnwrapped($var) + { + $this->writeWrapperValue("enabled", $var); + return $this;} + + /** + * Record of the creation of this channel. + * + * Generated from protobuf field .google.monitoring.v3.MutationRecord creation_record = 12; + * @return \Google\Cloud\Monitoring\V3\MutationRecord|null + */ + public function getCreationRecord() + { + return $this->creation_record; + } + + public function hasCreationRecord() + { + return isset($this->creation_record); + } + + public function clearCreationRecord() + { + unset($this->creation_record); + } + + /** + * Record of the creation of this channel. + * + * Generated from protobuf field .google.monitoring.v3.MutationRecord creation_record = 12; + * @param \Google\Cloud\Monitoring\V3\MutationRecord $var + * @return $this + */ + public function setCreationRecord($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\MutationRecord::class); + $this->creation_record = $var; + + return $this; + } + + /** + * Records of the modification of this channel. + * + * Generated from protobuf field repeated .google.monitoring.v3.MutationRecord mutation_records = 13; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMutationRecords() + { + return $this->mutation_records; + } + + /** + * Records of the modification of this channel. + * + * Generated from protobuf field repeated .google.monitoring.v3.MutationRecord mutation_records = 13; + * @param array<\Google\Cloud\Monitoring\V3\MutationRecord>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMutationRecords($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Monitoring\V3\MutationRecord::class); + $this->mutation_records = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/NotificationChannel/VerificationStatus.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/NotificationChannel/VerificationStatus.php new file mode 100644 index 000000000000..2b70fa842873 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/NotificationChannel/VerificationStatus.php @@ -0,0 +1,76 @@ +google.monitoring.v3.NotificationChannel.VerificationStatus + */ +class VerificationStatus +{ + /** + * Sentinel value used to indicate that the state is unknown, omitted, or + * is not applicable (as in the case of channels that neither support + * nor require verification in order to function). + * + * Generated from protobuf enum VERIFICATION_STATUS_UNSPECIFIED = 0; + */ + const VERIFICATION_STATUS_UNSPECIFIED = 0; + /** + * The channel has yet to be verified and requires verification to function. + * Note that this state also applies to the case where the verification + * process has been initiated by sending a verification code but where + * the verification code has not been submitted to complete the process. + * + * Generated from protobuf enum UNVERIFIED = 1; + */ + const UNVERIFIED = 1; + /** + * It has been proven that notifications can be received on this + * notification channel and that someone on the project has access + * to messages that are delivered to that channel. + * + * Generated from protobuf enum VERIFIED = 2; + */ + const VERIFIED = 2; + + private static $valueToName = [ + self::VERIFICATION_STATUS_UNSPECIFIED => 'VERIFICATION_STATUS_UNSPECIFIED', + self::UNVERIFIED => 'UNVERIFIED', + self::VERIFIED => 'VERIFIED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(VerificationStatus::class, \Google\Cloud\Monitoring\V3\NotificationChannel_VerificationStatus::class); + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/NotificationChannelDescriptor.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/NotificationChannelDescriptor.php new file mode 100644 index 000000000000..f9e6c8c27145 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/NotificationChannelDescriptor.php @@ -0,0 +1,326 @@ +google.monitoring.v3.NotificationChannelDescriptor + */ +class NotificationChannelDescriptor extends \Google\Protobuf\Internal\Message +{ + /** + * The full REST resource name for this descriptor. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/notificationChannelDescriptors/[TYPE] + * In the above, `[TYPE]` is the value of the `type` field. + * + * Generated from protobuf field string name = 6; + */ + protected $name = ''; + /** + * The type of notification channel, such as "email" and "sms". To view the + * full list of channels, see + * [Channel + * descriptors](https://cloud.google.com/monitoring/alerts/using-channels-api#ncd). + * Notification channel types are globally unique. + * + * Generated from protobuf field string type = 1; + */ + protected $type = ''; + /** + * A human-readable name for the notification channel type. This + * form of the name is suitable for a user interface. + * + * Generated from protobuf field string display_name = 2; + */ + protected $display_name = ''; + /** + * A human-readable description of the notification channel + * type. The description may include a description of the properties + * of the channel and pointers to external documentation. + * + * Generated from protobuf field string description = 3; + */ + protected $description = ''; + /** + * The set of labels that must be defined to identify a particular + * channel of the corresponding type. Each label includes a + * description for how that field should be populated. + * + * Generated from protobuf field repeated .google.api.LabelDescriptor labels = 4; + */ + private $labels; + /** + * The tiers that support this notification channel; the project service tier + * must be one of the supported_tiers. + * + * Generated from protobuf field repeated .google.monitoring.v3.ServiceTier supported_tiers = 5 [deprecated = true]; + * @deprecated + */ + private $supported_tiers; + /** + * The product launch stage for channels of this type. + * + * Generated from protobuf field .google.api.LaunchStage launch_stage = 7; + */ + protected $launch_stage = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The full REST resource name for this descriptor. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/notificationChannelDescriptors/[TYPE] + * In the above, `[TYPE]` is the value of the `type` field. + * @type string $type + * The type of notification channel, such as "email" and "sms". To view the + * full list of channels, see + * [Channel + * descriptors](https://cloud.google.com/monitoring/alerts/using-channels-api#ncd). + * Notification channel types are globally unique. + * @type string $display_name + * A human-readable name for the notification channel type. This + * form of the name is suitable for a user interface. + * @type string $description + * A human-readable description of the notification channel + * type. The description may include a description of the properties + * of the channel and pointers to external documentation. + * @type array<\Google\Api\LabelDescriptor>|\Google\Protobuf\Internal\RepeatedField $labels + * The set of labels that must be defined to identify a particular + * channel of the corresponding type. Each label includes a + * description for how that field should be populated. + * @type array|\Google\Protobuf\Internal\RepeatedField $supported_tiers + * The tiers that support this notification channel; the project service tier + * must be one of the supported_tiers. + * @type int $launch_stage + * The product launch stage for channels of this type. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\Notification::initOnce(); + parent::__construct($data); + } + + /** + * The full REST resource name for this descriptor. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/notificationChannelDescriptors/[TYPE] + * In the above, `[TYPE]` is the value of the `type` field. + * + * Generated from protobuf field string name = 6; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The full REST resource name for this descriptor. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/notificationChannelDescriptors/[TYPE] + * In the above, `[TYPE]` is the value of the `type` field. + * + * Generated from protobuf field string name = 6; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The type of notification channel, such as "email" and "sms". To view the + * full list of channels, see + * [Channel + * descriptors](https://cloud.google.com/monitoring/alerts/using-channels-api#ncd). + * Notification channel types are globally unique. + * + * Generated from protobuf field string type = 1; + * @return string + */ + public function getType() + { + return $this->type; + } + + /** + * The type of notification channel, such as "email" and "sms". To view the + * full list of channels, see + * [Channel + * descriptors](https://cloud.google.com/monitoring/alerts/using-channels-api#ncd). + * Notification channel types are globally unique. + * + * Generated from protobuf field string type = 1; + * @param string $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkString($var, True); + $this->type = $var; + + return $this; + } + + /** + * A human-readable name for the notification channel type. This + * form of the name is suitable for a user interface. + * + * Generated from protobuf field string display_name = 2; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * A human-readable name for the notification channel type. This + * form of the name is suitable for a user interface. + * + * Generated from protobuf field string display_name = 2; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * A human-readable description of the notification channel + * type. The description may include a description of the properties + * of the channel and pointers to external documentation. + * + * Generated from protobuf field string description = 3; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * A human-readable description of the notification channel + * type. The description may include a description of the properties + * of the channel and pointers to external documentation. + * + * Generated from protobuf field string description = 3; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * The set of labels that must be defined to identify a particular + * channel of the corresponding type. Each label includes a + * description for how that field should be populated. + * + * Generated from protobuf field repeated .google.api.LabelDescriptor labels = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * The set of labels that must be defined to identify a particular + * channel of the corresponding type. Each label includes a + * description for how that field should be populated. + * + * Generated from protobuf field repeated .google.api.LabelDescriptor labels = 4; + * @param array<\Google\Api\LabelDescriptor>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Api\LabelDescriptor::class); + $this->labels = $arr; + + return $this; + } + + /** + * The tiers that support this notification channel; the project service tier + * must be one of the supported_tiers. + * + * Generated from protobuf field repeated .google.monitoring.v3.ServiceTier supported_tiers = 5 [deprecated = true]; + * @return \Google\Protobuf\Internal\RepeatedField + * @deprecated + */ + public function getSupportedTiers() + { + @trigger_error('supported_tiers is deprecated.', E_USER_DEPRECATED); + return $this->supported_tiers; + } + + /** + * The tiers that support this notification channel; the project service tier + * must be one of the supported_tiers. + * + * Generated from protobuf field repeated .google.monitoring.v3.ServiceTier supported_tiers = 5 [deprecated = true]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + * @deprecated + */ + public function setSupportedTiers($var) + { + @trigger_error('supported_tiers is deprecated.', E_USER_DEPRECATED); + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Monitoring\V3\ServiceTier::class); + $this->supported_tiers = $arr; + + return $this; + } + + /** + * The product launch stage for channels of this type. + * + * Generated from protobuf field .google.api.LaunchStage launch_stage = 7; + * @return int + */ + public function getLaunchStage() + { + return $this->launch_stage; + } + + /** + * The product launch stage for channels of this type. + * + * Generated from protobuf field .google.api.LaunchStage launch_stage = 7; + * @param int $var + * @return $this + */ + public function setLaunchStage($var) + { + GPBUtil::checkEnum($var, \Google\Api\LaunchStage::class); + $this->launch_stage = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Point.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Point.php new file mode 100644 index 000000000000..5db4ed6c5b78 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Point.php @@ -0,0 +1,153 @@ +google.monitoring.v3.Point + */ +class Point extends \Google\Protobuf\Internal\Message +{ + /** + * The time interval to which the data point applies. For `GAUGE` metrics, + * the start time is optional, but if it is supplied, it must equal the + * end time. For `DELTA` metrics, the start + * and end time should specify a non-zero interval, with subsequent points + * specifying contiguous and non-overlapping intervals. For `CUMULATIVE` + * metrics, the start and end time should specify a non-zero interval, with + * subsequent points specifying the same start time and increasing end times, + * until an event resets the cumulative value to zero and sets a new start + * time for the following points. + * + * Generated from protobuf field .google.monitoring.v3.TimeInterval interval = 1; + */ + protected $interval = null; + /** + * The value of the data point. + * + * Generated from protobuf field .google.monitoring.v3.TypedValue value = 2; + */ + protected $value = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Monitoring\V3\TimeInterval $interval + * The time interval to which the data point applies. For `GAUGE` metrics, + * the start time is optional, but if it is supplied, it must equal the + * end time. For `DELTA` metrics, the start + * and end time should specify a non-zero interval, with subsequent points + * specifying contiguous and non-overlapping intervals. For `CUMULATIVE` + * metrics, the start and end time should specify a non-zero interval, with + * subsequent points specifying the same start time and increasing end times, + * until an event resets the cumulative value to zero and sets a new start + * time for the following points. + * @type \Google\Cloud\Monitoring\V3\TypedValue $value + * The value of the data point. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\Metric::initOnce(); + parent::__construct($data); + } + + /** + * The time interval to which the data point applies. For `GAUGE` metrics, + * the start time is optional, but if it is supplied, it must equal the + * end time. For `DELTA` metrics, the start + * and end time should specify a non-zero interval, with subsequent points + * specifying contiguous and non-overlapping intervals. For `CUMULATIVE` + * metrics, the start and end time should specify a non-zero interval, with + * subsequent points specifying the same start time and increasing end times, + * until an event resets the cumulative value to zero and sets a new start + * time for the following points. + * + * Generated from protobuf field .google.monitoring.v3.TimeInterval interval = 1; + * @return \Google\Cloud\Monitoring\V3\TimeInterval|null + */ + public function getInterval() + { + return $this->interval; + } + + public function hasInterval() + { + return isset($this->interval); + } + + public function clearInterval() + { + unset($this->interval); + } + + /** + * The time interval to which the data point applies. For `GAUGE` metrics, + * the start time is optional, but if it is supplied, it must equal the + * end time. For `DELTA` metrics, the start + * and end time should specify a non-zero interval, with subsequent points + * specifying contiguous and non-overlapping intervals. For `CUMULATIVE` + * metrics, the start and end time should specify a non-zero interval, with + * subsequent points specifying the same start time and increasing end times, + * until an event resets the cumulative value to zero and sets a new start + * time for the following points. + * + * Generated from protobuf field .google.monitoring.v3.TimeInterval interval = 1; + * @param \Google\Cloud\Monitoring\V3\TimeInterval $var + * @return $this + */ + public function setInterval($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\TimeInterval::class); + $this->interval = $var; + + return $this; + } + + /** + * The value of the data point. + * + * Generated from protobuf field .google.monitoring.v3.TypedValue value = 2; + * @return \Google\Cloud\Monitoring\V3\TypedValue|null + */ + public function getValue() + { + return $this->value; + } + + public function hasValue() + { + return isset($this->value); + } + + public function clearValue() + { + unset($this->value); + } + + /** + * The value of the data point. + * + * Generated from protobuf field .google.monitoring.v3.TypedValue value = 2; + * @param \Google\Cloud\Monitoring\V3\TypedValue $var + * @return $this + */ + public function setValue($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\TypedValue::class); + $this->value = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/QueryError.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/QueryError.php new file mode 100644 index 000000000000..8ff8ad79a2a5 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/QueryError.php @@ -0,0 +1,115 @@ +google.monitoring.v3.QueryError + */ +class QueryError extends \Google\Protobuf\Internal\Message +{ + /** + * The location of the time series query language text that this error applies + * to. + * + * Generated from protobuf field .google.monitoring.v3.TextLocator locator = 1; + */ + protected $locator = null; + /** + * The error message. + * + * Generated from protobuf field string message = 2; + */ + protected $message = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Monitoring\V3\TextLocator $locator + * The location of the time series query language text that this error applies + * to. + * @type string $message + * The error message. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\Metric::initOnce(); + parent::__construct($data); + } + + /** + * The location of the time series query language text that this error applies + * to. + * + * Generated from protobuf field .google.monitoring.v3.TextLocator locator = 1; + * @return \Google\Cloud\Monitoring\V3\TextLocator|null + */ + public function getLocator() + { + return $this->locator; + } + + public function hasLocator() + { + return isset($this->locator); + } + + public function clearLocator() + { + unset($this->locator); + } + + /** + * The location of the time series query language text that this error applies + * to. + * + * Generated from protobuf field .google.monitoring.v3.TextLocator locator = 1; + * @param \Google\Cloud\Monitoring\V3\TextLocator $var + * @return $this + */ + public function setLocator($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\TextLocator::class); + $this->locator = $var; + + return $this; + } + + /** + * The error message. + * + * Generated from protobuf field string message = 2; + * @return string + */ + public function getMessage() + { + return $this->message; + } + + /** + * The error message. + * + * Generated from protobuf field string message = 2; + * @param string $var + * @return $this + */ + public function setMessage($var) + { + GPBUtil::checkString($var, True); + $this->message = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/QueryErrorList.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/QueryErrorList.php new file mode 100644 index 000000000000..95542afd49b9 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/QueryErrorList.php @@ -0,0 +1,105 @@ +google.monitoring.v3.QueryErrorList + */ +class QueryErrorList extends \Google\Protobuf\Internal\Message +{ + /** + * Errors in parsing the time series query language text. The number of errors + * in the response may be limited. + * + * Generated from protobuf field repeated .google.monitoring.v3.QueryError errors = 1; + */ + private $errors; + /** + * A summary of all the errors. + * + * Generated from protobuf field string error_summary = 2; + */ + protected $error_summary = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Monitoring\V3\QueryError>|\Google\Protobuf\Internal\RepeatedField $errors + * Errors in parsing the time series query language text. The number of errors + * in the response may be limited. + * @type string $error_summary + * A summary of all the errors. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\MetricService::initOnce(); + parent::__construct($data); + } + + /** + * Errors in parsing the time series query language text. The number of errors + * in the response may be limited. + * + * Generated from protobuf field repeated .google.monitoring.v3.QueryError errors = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getErrors() + { + return $this->errors; + } + + /** + * Errors in parsing the time series query language text. The number of errors + * in the response may be limited. + * + * Generated from protobuf field repeated .google.monitoring.v3.QueryError errors = 1; + * @param array<\Google\Cloud\Monitoring\V3\QueryError>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setErrors($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Monitoring\V3\QueryError::class); + $this->errors = $arr; + + return $this; + } + + /** + * A summary of all the errors. + * + * Generated from protobuf field string error_summary = 2; + * @return string + */ + public function getErrorSummary() + { + return $this->error_summary; + } + + /** + * A summary of all the errors. + * + * Generated from protobuf field string error_summary = 2; + * @param string $var + * @return $this + */ + public function setErrorSummary($var) + { + GPBUtil::checkString($var, True); + $this->error_summary = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/QueryTimeSeriesRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/QueryTimeSeriesRequest.php new file mode 100644 index 000000000000..05eb26d2f95a --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/QueryTimeSeriesRequest.php @@ -0,0 +1,197 @@ +google.monitoring.v3.QueryTimeSeriesRequest + */ +class QueryTimeSeriesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which + * to execute the request. The format is: + * projects/[PROJECT_ID_OR_NUMBER] + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * Required. The query in the [Monitoring Query + * Language](https://cloud.google.com/monitoring/mql/reference) format. + * The default time zone is in UTC. + * + * Generated from protobuf field string query = 7 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $query = ''; + /** + * A positive number that is the maximum number of time_series_data to return. + * + * Generated from protobuf field int32 page_size = 9; + */ + protected $page_size = 0; + /** + * If this field is not empty then it must contain the `nextPageToken` value + * returned by a previous call to this method. Using this field causes the + * method to return additional results from the previous method call. + * + * Generated from protobuf field string page_token = 10; + */ + protected $page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which + * to execute the request. The format is: + * projects/[PROJECT_ID_OR_NUMBER] + * @type string $query + * Required. The query in the [Monitoring Query + * Language](https://cloud.google.com/monitoring/mql/reference) format. + * The default time zone is in UTC. + * @type int $page_size + * A positive number that is the maximum number of time_series_data to return. + * @type string $page_token + * If this field is not empty then it must contain the `nextPageToken` value + * returned by a previous call to this method. Using this field causes the + * method to return additional results from the previous method call. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\MetricService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which + * to execute the request. The format is: + * projects/[PROJECT_ID_OR_NUMBER] + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which + * to execute the request. The format is: + * projects/[PROJECT_ID_OR_NUMBER] + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. The query in the [Monitoring Query + * Language](https://cloud.google.com/monitoring/mql/reference) format. + * The default time zone is in UTC. + * + * Generated from protobuf field string query = 7 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getQuery() + { + return $this->query; + } + + /** + * Required. The query in the [Monitoring Query + * Language](https://cloud.google.com/monitoring/mql/reference) format. + * The default time zone is in UTC. + * + * Generated from protobuf field string query = 7 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setQuery($var) + { + GPBUtil::checkString($var, True); + $this->query = $var; + + return $this; + } + + /** + * A positive number that is the maximum number of time_series_data to return. + * + * Generated from protobuf field int32 page_size = 9; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * A positive number that is the maximum number of time_series_data to return. + * + * Generated from protobuf field int32 page_size = 9; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * If this field is not empty then it must contain the `nextPageToken` value + * returned by a previous call to this method. Using this field causes the + * method to return additional results from the previous method call. + * + * Generated from protobuf field string page_token = 10; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * If this field is not empty then it must contain the `nextPageToken` value + * returned by a previous call to this method. Using this field causes the + * method to return additional results from the previous method call. + * + * Generated from protobuf field string page_token = 10; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/QueryTimeSeriesResponse.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/QueryTimeSeriesResponse.php new file mode 100644 index 000000000000..79b8487cb24d --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/QueryTimeSeriesResponse.php @@ -0,0 +1,195 @@ +google.monitoring.v3.QueryTimeSeriesResponse + */ +class QueryTimeSeriesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The descriptor for the time series data. + * + * Generated from protobuf field .google.monitoring.v3.TimeSeriesDescriptor time_series_descriptor = 8; + */ + protected $time_series_descriptor = null; + /** + * The time series data. + * + * Generated from protobuf field repeated .google.monitoring.v3.TimeSeriesData time_series_data = 9; + */ + private $time_series_data; + /** + * If there are more results than have been returned, then this field is set + * to a non-empty value. To see the additional results, use that value as + * `page_token` in the next call to this method. + * + * Generated from protobuf field string next_page_token = 10; + */ + protected $next_page_token = ''; + /** + * Query execution errors that may have caused the time series data returned + * to be incomplete. The available data will be available in the + * response. + * + * Generated from protobuf field repeated .google.rpc.Status partial_errors = 11; + */ + private $partial_errors; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Monitoring\V3\TimeSeriesDescriptor $time_series_descriptor + * The descriptor for the time series data. + * @type array<\Google\Cloud\Monitoring\V3\TimeSeriesData>|\Google\Protobuf\Internal\RepeatedField $time_series_data + * The time series data. + * @type string $next_page_token + * If there are more results than have been returned, then this field is set + * to a non-empty value. To see the additional results, use that value as + * `page_token` in the next call to this method. + * @type array<\Google\Rpc\Status>|\Google\Protobuf\Internal\RepeatedField $partial_errors + * Query execution errors that may have caused the time series data returned + * to be incomplete. The available data will be available in the + * response. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\MetricService::initOnce(); + parent::__construct($data); + } + + /** + * The descriptor for the time series data. + * + * Generated from protobuf field .google.monitoring.v3.TimeSeriesDescriptor time_series_descriptor = 8; + * @return \Google\Cloud\Monitoring\V3\TimeSeriesDescriptor|null + */ + public function getTimeSeriesDescriptor() + { + return $this->time_series_descriptor; + } + + public function hasTimeSeriesDescriptor() + { + return isset($this->time_series_descriptor); + } + + public function clearTimeSeriesDescriptor() + { + unset($this->time_series_descriptor); + } + + /** + * The descriptor for the time series data. + * + * Generated from protobuf field .google.monitoring.v3.TimeSeriesDescriptor time_series_descriptor = 8; + * @param \Google\Cloud\Monitoring\V3\TimeSeriesDescriptor $var + * @return $this + */ + public function setTimeSeriesDescriptor($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\TimeSeriesDescriptor::class); + $this->time_series_descriptor = $var; + + return $this; + } + + /** + * The time series data. + * + * Generated from protobuf field repeated .google.monitoring.v3.TimeSeriesData time_series_data = 9; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTimeSeriesData() + { + return $this->time_series_data; + } + + /** + * The time series data. + * + * Generated from protobuf field repeated .google.monitoring.v3.TimeSeriesData time_series_data = 9; + * @param array<\Google\Cloud\Monitoring\V3\TimeSeriesData>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTimeSeriesData($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Monitoring\V3\TimeSeriesData::class); + $this->time_series_data = $arr; + + return $this; + } + + /** + * If there are more results than have been returned, then this field is set + * to a non-empty value. To see the additional results, use that value as + * `page_token` in the next call to this method. + * + * Generated from protobuf field string next_page_token = 10; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * If there are more results than have been returned, then this field is set + * to a non-empty value. To see the additional results, use that value as + * `page_token` in the next call to this method. + * + * Generated from protobuf field string next_page_token = 10; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Query execution errors that may have caused the time series data returned + * to be incomplete. The available data will be available in the + * response. + * + * Generated from protobuf field repeated .google.rpc.Status partial_errors = 11; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPartialErrors() + { + return $this->partial_errors; + } + + /** + * Query execution errors that may have caused the time series data returned + * to be incomplete. The available data will be available in the + * response. + * + * Generated from protobuf field repeated .google.rpc.Status partial_errors = 11; + * @param array<\Google\Rpc\Status>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPartialErrors($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Rpc\Status::class); + $this->partial_errors = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Range.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Range.php new file mode 100644 index 000000000000..3dd0db9c39f2 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Range.php @@ -0,0 +1,101 @@ +google.monitoring.v3.Range + */ +class Range extends \Google\Protobuf\Internal\Message +{ + /** + * Range minimum. + * + * Generated from protobuf field double min = 1; + */ + protected $min = 0.0; + /** + * Range maximum. + * + * Generated from protobuf field double max = 2; + */ + protected $max = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $min + * Range minimum. + * @type float $max + * Range maximum. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\Service::initOnce(); + parent::__construct($data); + } + + /** + * Range minimum. + * + * Generated from protobuf field double min = 1; + * @return float + */ + public function getMin() + { + return $this->min; + } + + /** + * Range minimum. + * + * Generated from protobuf field double min = 1; + * @param float $var + * @return $this + */ + public function setMin($var) + { + GPBUtil::checkDouble($var); + $this->min = $var; + + return $this; + } + + /** + * Range maximum. + * + * Generated from protobuf field double max = 2; + * @return float + */ + public function getMax() + { + return $this->max; + } + + /** + * Range maximum. + * + * Generated from protobuf field double max = 2; + * @param float $var + * @return $this + */ + public function setMax($var) + { + GPBUtil::checkDouble($var); + $this->max = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/RequestBasedSli.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/RequestBasedSli.php new file mode 100644 index 000000000000..e4820f273c21 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/RequestBasedSli.php @@ -0,0 +1,121 @@ +google.monitoring.v3.RequestBasedSli + */ +class RequestBasedSli extends \Google\Protobuf\Internal\Message +{ + protected $method; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Monitoring\V3\TimeSeriesRatio $good_total_ratio + * `good_total_ratio` is used when the ratio of `good_service` to + * `total_service` is computed from two `TimeSeries`. + * @type \Google\Cloud\Monitoring\V3\DistributionCut $distribution_cut + * `distribution_cut` is used when `good_service` is a count of values + * aggregated in a `Distribution` that fall into a good range. The + * `total_service` is the total count of all values aggregated in the + * `Distribution`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\Service::initOnce(); + parent::__construct($data); + } + + /** + * `good_total_ratio` is used when the ratio of `good_service` to + * `total_service` is computed from two `TimeSeries`. + * + * Generated from protobuf field .google.monitoring.v3.TimeSeriesRatio good_total_ratio = 1; + * @return \Google\Cloud\Monitoring\V3\TimeSeriesRatio|null + */ + public function getGoodTotalRatio() + { + return $this->readOneof(1); + } + + public function hasGoodTotalRatio() + { + return $this->hasOneof(1); + } + + /** + * `good_total_ratio` is used when the ratio of `good_service` to + * `total_service` is computed from two `TimeSeries`. + * + * Generated from protobuf field .google.monitoring.v3.TimeSeriesRatio good_total_ratio = 1; + * @param \Google\Cloud\Monitoring\V3\TimeSeriesRatio $var + * @return $this + */ + public function setGoodTotalRatio($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\TimeSeriesRatio::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * `distribution_cut` is used when `good_service` is a count of values + * aggregated in a `Distribution` that fall into a good range. The + * `total_service` is the total count of all values aggregated in the + * `Distribution`. + * + * Generated from protobuf field .google.monitoring.v3.DistributionCut distribution_cut = 3; + * @return \Google\Cloud\Monitoring\V3\DistributionCut|null + */ + public function getDistributionCut() + { + return $this->readOneof(3); + } + + public function hasDistributionCut() + { + return $this->hasOneof(3); + } + + /** + * `distribution_cut` is used when `good_service` is a count of values + * aggregated in a `Distribution` that fall into a good range. The + * `total_service` is the total count of all values aggregated in the + * `Distribution`. + * + * Generated from protobuf field .google.monitoring.v3.DistributionCut distribution_cut = 3; + * @param \Google\Cloud\Monitoring\V3\DistributionCut $var + * @return $this + */ + public function setDistributionCut($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\DistributionCut::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * @return string + */ + public function getMethod() + { + return $this->whichOneof("method"); + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/SendNotificationChannelVerificationCodeRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/SendNotificationChannelVerificationCodeRequest.php new file mode 100644 index 000000000000..efa0e97e35bc --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/SendNotificationChannelVerificationCodeRequest.php @@ -0,0 +1,81 @@ +google.monitoring.v3.SendNotificationChannelVerificationCodeRequest + */ +class SendNotificationChannelVerificationCodeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The notification channel to which to send a verification code. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The notification channel to which to send a verification code. Please see + * {@see NotificationChannelServiceClient::notificationChannelName()} for help formatting this field. + * + * @return \Google\Cloud\Monitoring\V3\SendNotificationChannelVerificationCodeRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The notification channel to which to send a verification code. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\NotificationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The notification channel to which to send a verification code. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The notification channel to which to send a verification code. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service.php new file mode 100644 index 000000000000..8b8aa5f3c2fe --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service.php @@ -0,0 +1,608 @@ +google.monitoring.v3.Service + */ +class Service extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. Resource name for this Service. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Name used for UI elements listing this Service. + * + * Generated from protobuf field string display_name = 2; + */ + protected $display_name = ''; + /** + * Message that contains the service type and service labels of this service + * if it is a basic service. + * Documentation and examples + * [here](https://cloud.google.com/stackdriver/docs/solutions/slo-monitoring/api/api-structures#basic-svc-w-basic-sli). + * + * Generated from protobuf field .google.monitoring.v3.Service.BasicService basic_service = 19; + */ + protected $basic_service = null; + /** + * Configuration for how to query telemetry on a Service. + * + * Generated from protobuf field .google.monitoring.v3.Service.Telemetry telemetry = 13; + */ + protected $telemetry = null; + /** + * Labels which have been used to annotate the service. Label keys must start + * with a letter. Label keys and values may contain lowercase letters, + * numbers, underscores, and dashes. Label keys and values have a maximum + * length of 63 characters, and must be less than 128 bytes in size. Up to 64 + * label entries may be stored. For labels which do not have a semantic value, + * the empty string may be supplied for the label value. + * + * Generated from protobuf field map user_labels = 14; + */ + private $user_labels; + protected $identifier; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. Resource name for this Service. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] + * @type string $display_name + * Name used for UI elements listing this Service. + * @type \Google\Cloud\Monitoring\V3\Service\Custom $custom + * Custom service type. + * @type \Google\Cloud\Monitoring\V3\Service\AppEngine $app_engine + * Type used for App Engine services. + * @type \Google\Cloud\Monitoring\V3\Service\CloudEndpoints $cloud_endpoints + * Type used for Cloud Endpoints services. + * @type \Google\Cloud\Monitoring\V3\Service\ClusterIstio $cluster_istio + * Type used for Istio services that live in a Kubernetes cluster. + * @type \Google\Cloud\Monitoring\V3\Service\MeshIstio $mesh_istio + * Type used for Istio services scoped to an Istio mesh. + * @type \Google\Cloud\Monitoring\V3\Service\IstioCanonicalService $istio_canonical_service + * Type used for canonical services scoped to an Istio mesh. + * Metrics for Istio are + * [documented here](https://istio.io/latest/docs/reference/config/metrics/) + * @type \Google\Cloud\Monitoring\V3\Service\CloudRun $cloud_run + * Type used for Cloud Run services. + * @type \Google\Cloud\Monitoring\V3\Service\GkeNamespace $gke_namespace + * Type used for GKE Namespaces. + * @type \Google\Cloud\Monitoring\V3\Service\GkeWorkload $gke_workload + * Type used for GKE Workloads. + * @type \Google\Cloud\Monitoring\V3\Service\GkeService $gke_service + * Type used for GKE Services (the Kubernetes concept of a service). + * @type \Google\Cloud\Monitoring\V3\Service\BasicService $basic_service + * Message that contains the service type and service labels of this service + * if it is a basic service. + * Documentation and examples + * [here](https://cloud.google.com/stackdriver/docs/solutions/slo-monitoring/api/api-structures#basic-svc-w-basic-sli). + * @type \Google\Cloud\Monitoring\V3\Service\Telemetry $telemetry + * Configuration for how to query telemetry on a Service. + * @type array|\Google\Protobuf\Internal\MapField $user_labels + * Labels which have been used to annotate the service. Label keys must start + * with a letter. Label keys and values may contain lowercase letters, + * numbers, underscores, and dashes. Label keys and values have a maximum + * length of 63 characters, and must be less than 128 bytes in size. Up to 64 + * label entries may be stored. For labels which do not have a semantic value, + * the empty string may be supplied for the label value. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\Service::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. Resource name for this Service. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. Resource name for this Service. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Name used for UI elements listing this Service. + * + * Generated from protobuf field string display_name = 2; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Name used for UI elements listing this Service. + * + * Generated from protobuf field string display_name = 2; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Custom service type. + * + * Generated from protobuf field .google.monitoring.v3.Service.Custom custom = 6; + * @return \Google\Cloud\Monitoring\V3\Service\Custom|null + */ + public function getCustom() + { + return $this->readOneof(6); + } + + public function hasCustom() + { + return $this->hasOneof(6); + } + + /** + * Custom service type. + * + * Generated from protobuf field .google.monitoring.v3.Service.Custom custom = 6; + * @param \Google\Cloud\Monitoring\V3\Service\Custom $var + * @return $this + */ + public function setCustom($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\Service\Custom::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * Type used for App Engine services. + * + * Generated from protobuf field .google.monitoring.v3.Service.AppEngine app_engine = 7; + * @return \Google\Cloud\Monitoring\V3\Service\AppEngine|null + */ + public function getAppEngine() + { + return $this->readOneof(7); + } + + public function hasAppEngine() + { + return $this->hasOneof(7); + } + + /** + * Type used for App Engine services. + * + * Generated from protobuf field .google.monitoring.v3.Service.AppEngine app_engine = 7; + * @param \Google\Cloud\Monitoring\V3\Service\AppEngine $var + * @return $this + */ + public function setAppEngine($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\Service\AppEngine::class); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * Type used for Cloud Endpoints services. + * + * Generated from protobuf field .google.monitoring.v3.Service.CloudEndpoints cloud_endpoints = 8; + * @return \Google\Cloud\Monitoring\V3\Service\CloudEndpoints|null + */ + public function getCloudEndpoints() + { + return $this->readOneof(8); + } + + public function hasCloudEndpoints() + { + return $this->hasOneof(8); + } + + /** + * Type used for Cloud Endpoints services. + * + * Generated from protobuf field .google.monitoring.v3.Service.CloudEndpoints cloud_endpoints = 8; + * @param \Google\Cloud\Monitoring\V3\Service\CloudEndpoints $var + * @return $this + */ + public function setCloudEndpoints($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\Service\CloudEndpoints::class); + $this->writeOneof(8, $var); + + return $this; + } + + /** + * Type used for Istio services that live in a Kubernetes cluster. + * + * Generated from protobuf field .google.monitoring.v3.Service.ClusterIstio cluster_istio = 9; + * @return \Google\Cloud\Monitoring\V3\Service\ClusterIstio|null + */ + public function getClusterIstio() + { + return $this->readOneof(9); + } + + public function hasClusterIstio() + { + return $this->hasOneof(9); + } + + /** + * Type used for Istio services that live in a Kubernetes cluster. + * + * Generated from protobuf field .google.monitoring.v3.Service.ClusterIstio cluster_istio = 9; + * @param \Google\Cloud\Monitoring\V3\Service\ClusterIstio $var + * @return $this + */ + public function setClusterIstio($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\Service\ClusterIstio::class); + $this->writeOneof(9, $var); + + return $this; + } + + /** + * Type used for Istio services scoped to an Istio mesh. + * + * Generated from protobuf field .google.monitoring.v3.Service.MeshIstio mesh_istio = 10; + * @return \Google\Cloud\Monitoring\V3\Service\MeshIstio|null + */ + public function getMeshIstio() + { + return $this->readOneof(10); + } + + public function hasMeshIstio() + { + return $this->hasOneof(10); + } + + /** + * Type used for Istio services scoped to an Istio mesh. + * + * Generated from protobuf field .google.monitoring.v3.Service.MeshIstio mesh_istio = 10; + * @param \Google\Cloud\Monitoring\V3\Service\MeshIstio $var + * @return $this + */ + public function setMeshIstio($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\Service\MeshIstio::class); + $this->writeOneof(10, $var); + + return $this; + } + + /** + * Type used for canonical services scoped to an Istio mesh. + * Metrics for Istio are + * [documented here](https://istio.io/latest/docs/reference/config/metrics/) + * + * Generated from protobuf field .google.monitoring.v3.Service.IstioCanonicalService istio_canonical_service = 11; + * @return \Google\Cloud\Monitoring\V3\Service\IstioCanonicalService|null + */ + public function getIstioCanonicalService() + { + return $this->readOneof(11); + } + + public function hasIstioCanonicalService() + { + return $this->hasOneof(11); + } + + /** + * Type used for canonical services scoped to an Istio mesh. + * Metrics for Istio are + * [documented here](https://istio.io/latest/docs/reference/config/metrics/) + * + * Generated from protobuf field .google.monitoring.v3.Service.IstioCanonicalService istio_canonical_service = 11; + * @param \Google\Cloud\Monitoring\V3\Service\IstioCanonicalService $var + * @return $this + */ + public function setIstioCanonicalService($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\Service\IstioCanonicalService::class); + $this->writeOneof(11, $var); + + return $this; + } + + /** + * Type used for Cloud Run services. + * + * Generated from protobuf field .google.monitoring.v3.Service.CloudRun cloud_run = 12; + * @return \Google\Cloud\Monitoring\V3\Service\CloudRun|null + */ + public function getCloudRun() + { + return $this->readOneof(12); + } + + public function hasCloudRun() + { + return $this->hasOneof(12); + } + + /** + * Type used for Cloud Run services. + * + * Generated from protobuf field .google.monitoring.v3.Service.CloudRun cloud_run = 12; + * @param \Google\Cloud\Monitoring\V3\Service\CloudRun $var + * @return $this + */ + public function setCloudRun($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\Service\CloudRun::class); + $this->writeOneof(12, $var); + + return $this; + } + + /** + * Type used for GKE Namespaces. + * + * Generated from protobuf field .google.monitoring.v3.Service.GkeNamespace gke_namespace = 15; + * @return \Google\Cloud\Monitoring\V3\Service\GkeNamespace|null + */ + public function getGkeNamespace() + { + return $this->readOneof(15); + } + + public function hasGkeNamespace() + { + return $this->hasOneof(15); + } + + /** + * Type used for GKE Namespaces. + * + * Generated from protobuf field .google.monitoring.v3.Service.GkeNamespace gke_namespace = 15; + * @param \Google\Cloud\Monitoring\V3\Service\GkeNamespace $var + * @return $this + */ + public function setGkeNamespace($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\Service\GkeNamespace::class); + $this->writeOneof(15, $var); + + return $this; + } + + /** + * Type used for GKE Workloads. + * + * Generated from protobuf field .google.monitoring.v3.Service.GkeWorkload gke_workload = 16; + * @return \Google\Cloud\Monitoring\V3\Service\GkeWorkload|null + */ + public function getGkeWorkload() + { + return $this->readOneof(16); + } + + public function hasGkeWorkload() + { + return $this->hasOneof(16); + } + + /** + * Type used for GKE Workloads. + * + * Generated from protobuf field .google.monitoring.v3.Service.GkeWorkload gke_workload = 16; + * @param \Google\Cloud\Monitoring\V3\Service\GkeWorkload $var + * @return $this + */ + public function setGkeWorkload($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\Service\GkeWorkload::class); + $this->writeOneof(16, $var); + + return $this; + } + + /** + * Type used for GKE Services (the Kubernetes concept of a service). + * + * Generated from protobuf field .google.monitoring.v3.Service.GkeService gke_service = 17; + * @return \Google\Cloud\Monitoring\V3\Service\GkeService|null + */ + public function getGkeService() + { + return $this->readOneof(17); + } + + public function hasGkeService() + { + return $this->hasOneof(17); + } + + /** + * Type used for GKE Services (the Kubernetes concept of a service). + * + * Generated from protobuf field .google.monitoring.v3.Service.GkeService gke_service = 17; + * @param \Google\Cloud\Monitoring\V3\Service\GkeService $var + * @return $this + */ + public function setGkeService($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\Service\GkeService::class); + $this->writeOneof(17, $var); + + return $this; + } + + /** + * Message that contains the service type and service labels of this service + * if it is a basic service. + * Documentation and examples + * [here](https://cloud.google.com/stackdriver/docs/solutions/slo-monitoring/api/api-structures#basic-svc-w-basic-sli). + * + * Generated from protobuf field .google.monitoring.v3.Service.BasicService basic_service = 19; + * @return \Google\Cloud\Monitoring\V3\Service\BasicService|null + */ + public function getBasicService() + { + return $this->basic_service; + } + + public function hasBasicService() + { + return isset($this->basic_service); + } + + public function clearBasicService() + { + unset($this->basic_service); + } + + /** + * Message that contains the service type and service labels of this service + * if it is a basic service. + * Documentation and examples + * [here](https://cloud.google.com/stackdriver/docs/solutions/slo-monitoring/api/api-structures#basic-svc-w-basic-sli). + * + * Generated from protobuf field .google.monitoring.v3.Service.BasicService basic_service = 19; + * @param \Google\Cloud\Monitoring\V3\Service\BasicService $var + * @return $this + */ + public function setBasicService($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\Service\BasicService::class); + $this->basic_service = $var; + + return $this; + } + + /** + * Configuration for how to query telemetry on a Service. + * + * Generated from protobuf field .google.monitoring.v3.Service.Telemetry telemetry = 13; + * @return \Google\Cloud\Monitoring\V3\Service\Telemetry|null + */ + public function getTelemetry() + { + return $this->telemetry; + } + + public function hasTelemetry() + { + return isset($this->telemetry); + } + + public function clearTelemetry() + { + unset($this->telemetry); + } + + /** + * Configuration for how to query telemetry on a Service. + * + * Generated from protobuf field .google.monitoring.v3.Service.Telemetry telemetry = 13; + * @param \Google\Cloud\Monitoring\V3\Service\Telemetry $var + * @return $this + */ + public function setTelemetry($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\Service\Telemetry::class); + $this->telemetry = $var; + + return $this; + } + + /** + * Labels which have been used to annotate the service. Label keys must start + * with a letter. Label keys and values may contain lowercase letters, + * numbers, underscores, and dashes. Label keys and values have a maximum + * length of 63 characters, and must be less than 128 bytes in size. Up to 64 + * label entries may be stored. For labels which do not have a semantic value, + * the empty string may be supplied for the label value. + * + * Generated from protobuf field map user_labels = 14; + * @return \Google\Protobuf\Internal\MapField + */ + public function getUserLabels() + { + return $this->user_labels; + } + + /** + * Labels which have been used to annotate the service. Label keys must start + * with a letter. Label keys and values may contain lowercase letters, + * numbers, underscores, and dashes. Label keys and values have a maximum + * length of 63 characters, and must be less than 128 bytes in size. Up to 64 + * label entries may be stored. For labels which do not have a semantic value, + * the empty string may be supplied for the label value. + * + * Generated from protobuf field map user_labels = 14; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setUserLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->user_labels = $arr; + + return $this; + } + + /** + * @return string + */ + public function getIdentifier() + { + return $this->whichOneof("identifier"); + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service/AppEngine.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service/AppEngine.php new file mode 100644 index 000000000000..7dd90e27a87e --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service/AppEngine.php @@ -0,0 +1,78 @@ +google.monitoring.v3.Service.AppEngine + */ +class AppEngine extends \Google\Protobuf\Internal\Message +{ + /** + * The ID of the App Engine module underlying this service. Corresponds to + * the `module_id` resource label in the [`gae_app` monitored + * resource](https://cloud.google.com/monitoring/api/resources#tag_gae_app). + * + * Generated from protobuf field string module_id = 1; + */ + protected $module_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $module_id + * The ID of the App Engine module underlying this service. Corresponds to + * the `module_id` resource label in the [`gae_app` monitored + * resource](https://cloud.google.com/monitoring/api/resources#tag_gae_app). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\Service::initOnce(); + parent::__construct($data); + } + + /** + * The ID of the App Engine module underlying this service. Corresponds to + * the `module_id` resource label in the [`gae_app` monitored + * resource](https://cloud.google.com/monitoring/api/resources#tag_gae_app). + * + * Generated from protobuf field string module_id = 1; + * @return string + */ + public function getModuleId() + { + return $this->module_id; + } + + /** + * The ID of the App Engine module underlying this service. Corresponds to + * the `module_id` resource label in the [`gae_app` monitored + * resource](https://cloud.google.com/monitoring/api/resources#tag_gae_app). + * + * Generated from protobuf field string module_id = 1; + * @param string $var + * @return $this + */ + public function setModuleId($var) + { + GPBUtil::checkString($var, True); + $this->module_id = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(AppEngine::class, \Google\Cloud\Monitoring\V3\Service_AppEngine::class); + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service/BasicService.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service/BasicService.php new file mode 100644 index 000000000000..5efe00c1cda5 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service/BasicService.php @@ -0,0 +1,130 @@ +google.monitoring.v3.Service.BasicService + */ +class BasicService extends \Google\Protobuf\Internal\Message +{ + /** + * The type of service that this basic service defines, e.g. + * APP_ENGINE service type. + * Documentation and valid values + * [here](https://cloud.google.com/stackdriver/docs/solutions/slo-monitoring/api/api-structures#basic-svc-w-basic-sli). + * + * Generated from protobuf field string service_type = 1; + */ + protected $service_type = ''; + /** + * Labels that specify the resource that emits the monitoring data which + * is used for SLO reporting of this `Service`. + * Documentation and valid values for given service types + * [here](https://cloud.google.com/stackdriver/docs/solutions/slo-monitoring/api/api-structures#basic-svc-w-basic-sli). + * + * Generated from protobuf field map service_labels = 2; + */ + private $service_labels; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $service_type + * The type of service that this basic service defines, e.g. + * APP_ENGINE service type. + * Documentation and valid values + * [here](https://cloud.google.com/stackdriver/docs/solutions/slo-monitoring/api/api-structures#basic-svc-w-basic-sli). + * @type array|\Google\Protobuf\Internal\MapField $service_labels + * Labels that specify the resource that emits the monitoring data which + * is used for SLO reporting of this `Service`. + * Documentation and valid values for given service types + * [here](https://cloud.google.com/stackdriver/docs/solutions/slo-monitoring/api/api-structures#basic-svc-w-basic-sli). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\Service::initOnce(); + parent::__construct($data); + } + + /** + * The type of service that this basic service defines, e.g. + * APP_ENGINE service type. + * Documentation and valid values + * [here](https://cloud.google.com/stackdriver/docs/solutions/slo-monitoring/api/api-structures#basic-svc-w-basic-sli). + * + * Generated from protobuf field string service_type = 1; + * @return string + */ + public function getServiceType() + { + return $this->service_type; + } + + /** + * The type of service that this basic service defines, e.g. + * APP_ENGINE service type. + * Documentation and valid values + * [here](https://cloud.google.com/stackdriver/docs/solutions/slo-monitoring/api/api-structures#basic-svc-w-basic-sli). + * + * Generated from protobuf field string service_type = 1; + * @param string $var + * @return $this + */ + public function setServiceType($var) + { + GPBUtil::checkString($var, True); + $this->service_type = $var; + + return $this; + } + + /** + * Labels that specify the resource that emits the monitoring data which + * is used for SLO reporting of this `Service`. + * Documentation and valid values for given service types + * [here](https://cloud.google.com/stackdriver/docs/solutions/slo-monitoring/api/api-structures#basic-svc-w-basic-sli). + * + * Generated from protobuf field map service_labels = 2; + * @return \Google\Protobuf\Internal\MapField + */ + public function getServiceLabels() + { + return $this->service_labels; + } + + /** + * Labels that specify the resource that emits the monitoring data which + * is used for SLO reporting of this `Service`. + * Documentation and valid values for given service types + * [here](https://cloud.google.com/stackdriver/docs/solutions/slo-monitoring/api/api-structures#basic-svc-w-basic-sli). + * + * Generated from protobuf field map service_labels = 2; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setServiceLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->service_labels = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(BasicService::class, \Google\Cloud\Monitoring\V3\Service_BasicService::class); + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service/CloudEndpoints.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service/CloudEndpoints.php new file mode 100644 index 000000000000..6560ccb0626d --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service/CloudEndpoints.php @@ -0,0 +1,78 @@ +google.monitoring.v3.Service.CloudEndpoints + */ +class CloudEndpoints extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the Cloud Endpoints service underlying this service. + * Corresponds to the `service` resource label in the [`api` monitored + * resource](https://cloud.google.com/monitoring/api/resources#tag_api). + * + * Generated from protobuf field string service = 1; + */ + protected $service = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $service + * The name of the Cloud Endpoints service underlying this service. + * Corresponds to the `service` resource label in the [`api` monitored + * resource](https://cloud.google.com/monitoring/api/resources#tag_api). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\Service::initOnce(); + parent::__construct($data); + } + + /** + * The name of the Cloud Endpoints service underlying this service. + * Corresponds to the `service` resource label in the [`api` monitored + * resource](https://cloud.google.com/monitoring/api/resources#tag_api). + * + * Generated from protobuf field string service = 1; + * @return string + */ + public function getService() + { + return $this->service; + } + + /** + * The name of the Cloud Endpoints service underlying this service. + * Corresponds to the `service` resource label in the [`api` monitored + * resource](https://cloud.google.com/monitoring/api/resources#tag_api). + * + * Generated from protobuf field string service = 1; + * @param string $var + * @return $this + */ + public function setService($var) + { + GPBUtil::checkString($var, True); + $this->service = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(CloudEndpoints::class, \Google\Cloud\Monitoring\V3\Service_CloudEndpoints::class); + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service/CloudRun.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service/CloudRun.php new file mode 100644 index 000000000000..05dd1da04bf8 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service/CloudRun.php @@ -0,0 +1,120 @@ +google.monitoring.v3.Service.CloudRun + */ +class CloudRun extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the Cloud Run service. Corresponds to the `service_name` + * resource label in the [`cloud_run_revision` monitored + * resource](https://cloud.google.com/monitoring/api/resources#tag_cloud_run_revision). + * + * Generated from protobuf field string service_name = 1; + */ + protected $service_name = ''; + /** + * The location the service is run. Corresponds to the `location` + * resource label in the [`cloud_run_revision` monitored + * resource](https://cloud.google.com/monitoring/api/resources#tag_cloud_run_revision). + * + * Generated from protobuf field string location = 2; + */ + protected $location = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $service_name + * The name of the Cloud Run service. Corresponds to the `service_name` + * resource label in the [`cloud_run_revision` monitored + * resource](https://cloud.google.com/monitoring/api/resources#tag_cloud_run_revision). + * @type string $location + * The location the service is run. Corresponds to the `location` + * resource label in the [`cloud_run_revision` monitored + * resource](https://cloud.google.com/monitoring/api/resources#tag_cloud_run_revision). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\Service::initOnce(); + parent::__construct($data); + } + + /** + * The name of the Cloud Run service. Corresponds to the `service_name` + * resource label in the [`cloud_run_revision` monitored + * resource](https://cloud.google.com/monitoring/api/resources#tag_cloud_run_revision). + * + * Generated from protobuf field string service_name = 1; + * @return string + */ + public function getServiceName() + { + return $this->service_name; + } + + /** + * The name of the Cloud Run service. Corresponds to the `service_name` + * resource label in the [`cloud_run_revision` monitored + * resource](https://cloud.google.com/monitoring/api/resources#tag_cloud_run_revision). + * + * Generated from protobuf field string service_name = 1; + * @param string $var + * @return $this + */ + public function setServiceName($var) + { + GPBUtil::checkString($var, True); + $this->service_name = $var; + + return $this; + } + + /** + * The location the service is run. Corresponds to the `location` + * resource label in the [`cloud_run_revision` monitored + * resource](https://cloud.google.com/monitoring/api/resources#tag_cloud_run_revision). + * + * Generated from protobuf field string location = 2; + * @return string + */ + public function getLocation() + { + return $this->location; + } + + /** + * The location the service is run. Corresponds to the `location` + * resource label in the [`cloud_run_revision` monitored + * resource](https://cloud.google.com/monitoring/api/resources#tag_cloud_run_revision). + * + * Generated from protobuf field string location = 2; + * @param string $var + * @return $this + */ + public function setLocation($var) + { + GPBUtil::checkString($var, True); + $this->location = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(CloudRun::class, \Google\Cloud\Monitoring\V3\Service_CloudRun::class); + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service/ClusterIstio.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service/ClusterIstio.php new file mode 100644 index 000000000000..bcbab5c1818c --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service/ClusterIstio.php @@ -0,0 +1,198 @@ +google.monitoring.v3.Service.ClusterIstio + */ +class ClusterIstio extends \Google\Protobuf\Internal\Message +{ + /** + * The location of the Kubernetes cluster in which this Istio service is + * defined. Corresponds to the `location` resource label in `k8s_cluster` + * resources. + * + * Generated from protobuf field string location = 1; + */ + protected $location = ''; + /** + * The name of the Kubernetes cluster in which this Istio service is + * defined. Corresponds to the `cluster_name` resource label in + * `k8s_cluster` resources. + * + * Generated from protobuf field string cluster_name = 2; + */ + protected $cluster_name = ''; + /** + * The namespace of the Istio service underlying this service. Corresponds + * to the `destination_service_namespace` metric label in Istio metrics. + * + * Generated from protobuf field string service_namespace = 3; + */ + protected $service_namespace = ''; + /** + * The name of the Istio service underlying this service. Corresponds to the + * `destination_service_name` metric label in Istio metrics. + * + * Generated from protobuf field string service_name = 4; + */ + protected $service_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $location + * The location of the Kubernetes cluster in which this Istio service is + * defined. Corresponds to the `location` resource label in `k8s_cluster` + * resources. + * @type string $cluster_name + * The name of the Kubernetes cluster in which this Istio service is + * defined. Corresponds to the `cluster_name` resource label in + * `k8s_cluster` resources. + * @type string $service_namespace + * The namespace of the Istio service underlying this service. Corresponds + * to the `destination_service_namespace` metric label in Istio metrics. + * @type string $service_name + * The name of the Istio service underlying this service. Corresponds to the + * `destination_service_name` metric label in Istio metrics. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\Service::initOnce(); + parent::__construct($data); + } + + /** + * The location of the Kubernetes cluster in which this Istio service is + * defined. Corresponds to the `location` resource label in `k8s_cluster` + * resources. + * + * Generated from protobuf field string location = 1; + * @return string + */ + public function getLocation() + { + return $this->location; + } + + /** + * The location of the Kubernetes cluster in which this Istio service is + * defined. Corresponds to the `location` resource label in `k8s_cluster` + * resources. + * + * Generated from protobuf field string location = 1; + * @param string $var + * @return $this + */ + public function setLocation($var) + { + GPBUtil::checkString($var, True); + $this->location = $var; + + return $this; + } + + /** + * The name of the Kubernetes cluster in which this Istio service is + * defined. Corresponds to the `cluster_name` resource label in + * `k8s_cluster` resources. + * + * Generated from protobuf field string cluster_name = 2; + * @return string + */ + public function getClusterName() + { + return $this->cluster_name; + } + + /** + * The name of the Kubernetes cluster in which this Istio service is + * defined. Corresponds to the `cluster_name` resource label in + * `k8s_cluster` resources. + * + * Generated from protobuf field string cluster_name = 2; + * @param string $var + * @return $this + */ + public function setClusterName($var) + { + GPBUtil::checkString($var, True); + $this->cluster_name = $var; + + return $this; + } + + /** + * The namespace of the Istio service underlying this service. Corresponds + * to the `destination_service_namespace` metric label in Istio metrics. + * + * Generated from protobuf field string service_namespace = 3; + * @return string + */ + public function getServiceNamespace() + { + return $this->service_namespace; + } + + /** + * The namespace of the Istio service underlying this service. Corresponds + * to the `destination_service_namespace` metric label in Istio metrics. + * + * Generated from protobuf field string service_namespace = 3; + * @param string $var + * @return $this + */ + public function setServiceNamespace($var) + { + GPBUtil::checkString($var, True); + $this->service_namespace = $var; + + return $this; + } + + /** + * The name of the Istio service underlying this service. Corresponds to the + * `destination_service_name` metric label in Istio metrics. + * + * Generated from protobuf field string service_name = 4; + * @return string + */ + public function getServiceName() + { + return $this->service_name; + } + + /** + * The name of the Istio service underlying this service. Corresponds to the + * `destination_service_name` metric label in Istio metrics. + * + * Generated from protobuf field string service_name = 4; + * @param string $var + * @return $this + */ + public function setServiceName($var) + { + GPBUtil::checkString($var, True); + $this->service_name = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ClusterIstio::class, \Google\Cloud\Monitoring\V3\Service_ClusterIstio::class); + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service/Custom.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service/Custom.php new file mode 100644 index 000000000000..03fb8595f374 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service/Custom.php @@ -0,0 +1,38 @@ +google.monitoring.v3.Service.Custom + */ +class Custom extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\Service::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Custom::class, \Google\Cloud\Monitoring\V3\Service_Custom::class); + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service/GkeNamespace.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service/GkeNamespace.php new file mode 100644 index 000000000000..65c6e82d342d --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service/GkeNamespace.php @@ -0,0 +1,182 @@ +google.monitoring.v3.Service.GkeNamespace + */ +class GkeNamespace extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The project this resource lives in. For legacy services + * migrated from the `Custom` type, this may be a distinct project from the + * one parenting the service itself. + * + * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $project_id = ''; + /** + * The location of the parent cluster. This may be a zone or region. + * + * Generated from protobuf field string location = 2; + */ + protected $location = ''; + /** + * The name of the parent cluster. + * + * Generated from protobuf field string cluster_name = 3; + */ + protected $cluster_name = ''; + /** + * The name of this namespace. + * + * Generated from protobuf field string namespace_name = 4; + */ + protected $namespace_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $project_id + * Output only. The project this resource lives in. For legacy services + * migrated from the `Custom` type, this may be a distinct project from the + * one parenting the service itself. + * @type string $location + * The location of the parent cluster. This may be a zone or region. + * @type string $cluster_name + * The name of the parent cluster. + * @type string $namespace_name + * The name of this namespace. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\Service::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The project this resource lives in. For legacy services + * migrated from the `Custom` type, this may be a distinct project from the + * one parenting the service itself. + * + * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getProjectId() + { + return $this->project_id; + } + + /** + * Output only. The project this resource lives in. For legacy services + * migrated from the `Custom` type, this may be a distinct project from the + * one parenting the service itself. + * + * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setProjectId($var) + { + GPBUtil::checkString($var, True); + $this->project_id = $var; + + return $this; + } + + /** + * The location of the parent cluster. This may be a zone or region. + * + * Generated from protobuf field string location = 2; + * @return string + */ + public function getLocation() + { + return $this->location; + } + + /** + * The location of the parent cluster. This may be a zone or region. + * + * Generated from protobuf field string location = 2; + * @param string $var + * @return $this + */ + public function setLocation($var) + { + GPBUtil::checkString($var, True); + $this->location = $var; + + return $this; + } + + /** + * The name of the parent cluster. + * + * Generated from protobuf field string cluster_name = 3; + * @return string + */ + public function getClusterName() + { + return $this->cluster_name; + } + + /** + * The name of the parent cluster. + * + * Generated from protobuf field string cluster_name = 3; + * @param string $var + * @return $this + */ + public function setClusterName($var) + { + GPBUtil::checkString($var, True); + $this->cluster_name = $var; + + return $this; + } + + /** + * The name of this namespace. + * + * Generated from protobuf field string namespace_name = 4; + * @return string + */ + public function getNamespaceName() + { + return $this->namespace_name; + } + + /** + * The name of this namespace. + * + * Generated from protobuf field string namespace_name = 4; + * @param string $var + * @return $this + */ + public function setNamespaceName($var) + { + GPBUtil::checkString($var, True); + $this->namespace_name = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(GkeNamespace::class, \Google\Cloud\Monitoring\V3\Service_GkeNamespace::class); + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service/GkeService.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service/GkeService.php new file mode 100644 index 000000000000..4b9bbf7606d7 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service/GkeService.php @@ -0,0 +1,219 @@ +google.monitoring.v3.Service.GkeService + */ +class GkeService extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The project this resource lives in. For legacy services + * migrated from the `Custom` type, this may be a distinct project from the + * one parenting the service itself. + * + * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $project_id = ''; + /** + * The location of the parent cluster. This may be a zone or region. + * + * Generated from protobuf field string location = 2; + */ + protected $location = ''; + /** + * The name of the parent cluster. + * + * Generated from protobuf field string cluster_name = 3; + */ + protected $cluster_name = ''; + /** + * The name of the parent namespace. + * + * Generated from protobuf field string namespace_name = 4; + */ + protected $namespace_name = ''; + /** + * The name of this service. + * + * Generated from protobuf field string service_name = 5; + */ + protected $service_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $project_id + * Output only. The project this resource lives in. For legacy services + * migrated from the `Custom` type, this may be a distinct project from the + * one parenting the service itself. + * @type string $location + * The location of the parent cluster. This may be a zone or region. + * @type string $cluster_name + * The name of the parent cluster. + * @type string $namespace_name + * The name of the parent namespace. + * @type string $service_name + * The name of this service. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\Service::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The project this resource lives in. For legacy services + * migrated from the `Custom` type, this may be a distinct project from the + * one parenting the service itself. + * + * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getProjectId() + { + return $this->project_id; + } + + /** + * Output only. The project this resource lives in. For legacy services + * migrated from the `Custom` type, this may be a distinct project from the + * one parenting the service itself. + * + * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setProjectId($var) + { + GPBUtil::checkString($var, True); + $this->project_id = $var; + + return $this; + } + + /** + * The location of the parent cluster. This may be a zone or region. + * + * Generated from protobuf field string location = 2; + * @return string + */ + public function getLocation() + { + return $this->location; + } + + /** + * The location of the parent cluster. This may be a zone or region. + * + * Generated from protobuf field string location = 2; + * @param string $var + * @return $this + */ + public function setLocation($var) + { + GPBUtil::checkString($var, True); + $this->location = $var; + + return $this; + } + + /** + * The name of the parent cluster. + * + * Generated from protobuf field string cluster_name = 3; + * @return string + */ + public function getClusterName() + { + return $this->cluster_name; + } + + /** + * The name of the parent cluster. + * + * Generated from protobuf field string cluster_name = 3; + * @param string $var + * @return $this + */ + public function setClusterName($var) + { + GPBUtil::checkString($var, True); + $this->cluster_name = $var; + + return $this; + } + + /** + * The name of the parent namespace. + * + * Generated from protobuf field string namespace_name = 4; + * @return string + */ + public function getNamespaceName() + { + return $this->namespace_name; + } + + /** + * The name of the parent namespace. + * + * Generated from protobuf field string namespace_name = 4; + * @param string $var + * @return $this + */ + public function setNamespaceName($var) + { + GPBUtil::checkString($var, True); + $this->namespace_name = $var; + + return $this; + } + + /** + * The name of this service. + * + * Generated from protobuf field string service_name = 5; + * @return string + */ + public function getServiceName() + { + return $this->service_name; + } + + /** + * The name of this service. + * + * Generated from protobuf field string service_name = 5; + * @param string $var + * @return $this + */ + public function setServiceName($var) + { + GPBUtil::checkString($var, True); + $this->service_name = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(GkeService::class, \Google\Cloud\Monitoring\V3\Service_GkeService::class); + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service/GkeWorkload.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service/GkeWorkload.php new file mode 100644 index 000000000000..7ec62cebfe7a --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service/GkeWorkload.php @@ -0,0 +1,250 @@ +google.monitoring.v3.Service.GkeWorkload + */ +class GkeWorkload extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The project this resource lives in. For legacy services + * migrated from the `Custom` type, this may be a distinct project from the + * one parenting the service itself. + * + * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $project_id = ''; + /** + * The location of the parent cluster. This may be a zone or region. + * + * Generated from protobuf field string location = 2; + */ + protected $location = ''; + /** + * The name of the parent cluster. + * + * Generated from protobuf field string cluster_name = 3; + */ + protected $cluster_name = ''; + /** + * The name of the parent namespace. + * + * Generated from protobuf field string namespace_name = 4; + */ + protected $namespace_name = ''; + /** + * The type of this workload (for example, "Deployment" or "DaemonSet") + * + * Generated from protobuf field string top_level_controller_type = 5; + */ + protected $top_level_controller_type = ''; + /** + * The name of this workload. + * + * Generated from protobuf field string top_level_controller_name = 6; + */ + protected $top_level_controller_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $project_id + * Output only. The project this resource lives in. For legacy services + * migrated from the `Custom` type, this may be a distinct project from the + * one parenting the service itself. + * @type string $location + * The location of the parent cluster. This may be a zone or region. + * @type string $cluster_name + * The name of the parent cluster. + * @type string $namespace_name + * The name of the parent namespace. + * @type string $top_level_controller_type + * The type of this workload (for example, "Deployment" or "DaemonSet") + * @type string $top_level_controller_name + * The name of this workload. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\Service::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The project this resource lives in. For legacy services + * migrated from the `Custom` type, this may be a distinct project from the + * one parenting the service itself. + * + * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getProjectId() + { + return $this->project_id; + } + + /** + * Output only. The project this resource lives in. For legacy services + * migrated from the `Custom` type, this may be a distinct project from the + * one parenting the service itself. + * + * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setProjectId($var) + { + GPBUtil::checkString($var, True); + $this->project_id = $var; + + return $this; + } + + /** + * The location of the parent cluster. This may be a zone or region. + * + * Generated from protobuf field string location = 2; + * @return string + */ + public function getLocation() + { + return $this->location; + } + + /** + * The location of the parent cluster. This may be a zone or region. + * + * Generated from protobuf field string location = 2; + * @param string $var + * @return $this + */ + public function setLocation($var) + { + GPBUtil::checkString($var, True); + $this->location = $var; + + return $this; + } + + /** + * The name of the parent cluster. + * + * Generated from protobuf field string cluster_name = 3; + * @return string + */ + public function getClusterName() + { + return $this->cluster_name; + } + + /** + * The name of the parent cluster. + * + * Generated from protobuf field string cluster_name = 3; + * @param string $var + * @return $this + */ + public function setClusterName($var) + { + GPBUtil::checkString($var, True); + $this->cluster_name = $var; + + return $this; + } + + /** + * The name of the parent namespace. + * + * Generated from protobuf field string namespace_name = 4; + * @return string + */ + public function getNamespaceName() + { + return $this->namespace_name; + } + + /** + * The name of the parent namespace. + * + * Generated from protobuf field string namespace_name = 4; + * @param string $var + * @return $this + */ + public function setNamespaceName($var) + { + GPBUtil::checkString($var, True); + $this->namespace_name = $var; + + return $this; + } + + /** + * The type of this workload (for example, "Deployment" or "DaemonSet") + * + * Generated from protobuf field string top_level_controller_type = 5; + * @return string + */ + public function getTopLevelControllerType() + { + return $this->top_level_controller_type; + } + + /** + * The type of this workload (for example, "Deployment" or "DaemonSet") + * + * Generated from protobuf field string top_level_controller_type = 5; + * @param string $var + * @return $this + */ + public function setTopLevelControllerType($var) + { + GPBUtil::checkString($var, True); + $this->top_level_controller_type = $var; + + return $this; + } + + /** + * The name of this workload. + * + * Generated from protobuf field string top_level_controller_name = 6; + * @return string + */ + public function getTopLevelControllerName() + { + return $this->top_level_controller_name; + } + + /** + * The name of this workload. + * + * Generated from protobuf field string top_level_controller_name = 6; + * @param string $var + * @return $this + */ + public function setTopLevelControllerName($var) + { + GPBUtil::checkString($var, True); + $this->top_level_controller_name = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(GkeWorkload::class, \Google\Cloud\Monitoring\V3\Service_GkeWorkload::class); + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service/IstioCanonicalService.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service/IstioCanonicalService.php new file mode 100644 index 000000000000..0feb3f3aaa8c --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service/IstioCanonicalService.php @@ -0,0 +1,171 @@ += + * 1.6.8 will have their services ingested as this type. + * + * Generated from protobuf message google.monitoring.v3.Service.IstioCanonicalService + */ +class IstioCanonicalService extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier for the Istio mesh in which this canonical service is defined. + * Corresponds to the `mesh_uid` metric label in + * [Istio metrics](https://cloud.google.com/monitoring/api/metrics_istio). + * + * Generated from protobuf field string mesh_uid = 1; + */ + protected $mesh_uid = ''; + /** + * The namespace of the canonical service underlying this service. + * Corresponds to the `destination_canonical_service_namespace` metric + * label in [Istio + * metrics](https://cloud.google.com/monitoring/api/metrics_istio). + * + * Generated from protobuf field string canonical_service_namespace = 3; + */ + protected $canonical_service_namespace = ''; + /** + * The name of the canonical service underlying this service. + * Corresponds to the `destination_canonical_service_name` metric label in + * label in [Istio + * metrics](https://cloud.google.com/monitoring/api/metrics_istio). + * + * Generated from protobuf field string canonical_service = 4; + */ + protected $canonical_service = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $mesh_uid + * Identifier for the Istio mesh in which this canonical service is defined. + * Corresponds to the `mesh_uid` metric label in + * [Istio metrics](https://cloud.google.com/monitoring/api/metrics_istio). + * @type string $canonical_service_namespace + * The namespace of the canonical service underlying this service. + * Corresponds to the `destination_canonical_service_namespace` metric + * label in [Istio + * metrics](https://cloud.google.com/monitoring/api/metrics_istio). + * @type string $canonical_service + * The name of the canonical service underlying this service. + * Corresponds to the `destination_canonical_service_name` metric label in + * label in [Istio + * metrics](https://cloud.google.com/monitoring/api/metrics_istio). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\Service::initOnce(); + parent::__construct($data); + } + + /** + * Identifier for the Istio mesh in which this canonical service is defined. + * Corresponds to the `mesh_uid` metric label in + * [Istio metrics](https://cloud.google.com/monitoring/api/metrics_istio). + * + * Generated from protobuf field string mesh_uid = 1; + * @return string + */ + public function getMeshUid() + { + return $this->mesh_uid; + } + + /** + * Identifier for the Istio mesh in which this canonical service is defined. + * Corresponds to the `mesh_uid` metric label in + * [Istio metrics](https://cloud.google.com/monitoring/api/metrics_istio). + * + * Generated from protobuf field string mesh_uid = 1; + * @param string $var + * @return $this + */ + public function setMeshUid($var) + { + GPBUtil::checkString($var, True); + $this->mesh_uid = $var; + + return $this; + } + + /** + * The namespace of the canonical service underlying this service. + * Corresponds to the `destination_canonical_service_namespace` metric + * label in [Istio + * metrics](https://cloud.google.com/monitoring/api/metrics_istio). + * + * Generated from protobuf field string canonical_service_namespace = 3; + * @return string + */ + public function getCanonicalServiceNamespace() + { + return $this->canonical_service_namespace; + } + + /** + * The namespace of the canonical service underlying this service. + * Corresponds to the `destination_canonical_service_namespace` metric + * label in [Istio + * metrics](https://cloud.google.com/monitoring/api/metrics_istio). + * + * Generated from protobuf field string canonical_service_namespace = 3; + * @param string $var + * @return $this + */ + public function setCanonicalServiceNamespace($var) + { + GPBUtil::checkString($var, True); + $this->canonical_service_namespace = $var; + + return $this; + } + + /** + * The name of the canonical service underlying this service. + * Corresponds to the `destination_canonical_service_name` metric label in + * label in [Istio + * metrics](https://cloud.google.com/monitoring/api/metrics_istio). + * + * Generated from protobuf field string canonical_service = 4; + * @return string + */ + public function getCanonicalService() + { + return $this->canonical_service; + } + + /** + * The name of the canonical service underlying this service. + * Corresponds to the `destination_canonical_service_name` metric label in + * label in [Istio + * metrics](https://cloud.google.com/monitoring/api/metrics_istio). + * + * Generated from protobuf field string canonical_service = 4; + * @param string $var + * @return $this + */ + public function setCanonicalService($var) + { + GPBUtil::checkString($var, True); + $this->canonical_service = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(IstioCanonicalService::class, \Google\Cloud\Monitoring\V3\Service_IstioCanonicalService::class); + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service/MeshIstio.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service/MeshIstio.php new file mode 100644 index 000000000000..e90ac6f8b63a --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service/MeshIstio.php @@ -0,0 +1,151 @@ +google.monitoring.v3.Service.MeshIstio + */ +class MeshIstio extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier for the mesh in which this Istio service is defined. + * Corresponds to the `mesh_uid` metric label in Istio metrics. + * + * Generated from protobuf field string mesh_uid = 1; + */ + protected $mesh_uid = ''; + /** + * The namespace of the Istio service underlying this service. Corresponds + * to the `destination_service_namespace` metric label in Istio metrics. + * + * Generated from protobuf field string service_namespace = 3; + */ + protected $service_namespace = ''; + /** + * The name of the Istio service underlying this service. Corresponds to the + * `destination_service_name` metric label in Istio metrics. + * + * Generated from protobuf field string service_name = 4; + */ + protected $service_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $mesh_uid + * Identifier for the mesh in which this Istio service is defined. + * Corresponds to the `mesh_uid` metric label in Istio metrics. + * @type string $service_namespace + * The namespace of the Istio service underlying this service. Corresponds + * to the `destination_service_namespace` metric label in Istio metrics. + * @type string $service_name + * The name of the Istio service underlying this service. Corresponds to the + * `destination_service_name` metric label in Istio metrics. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\Service::initOnce(); + parent::__construct($data); + } + + /** + * Identifier for the mesh in which this Istio service is defined. + * Corresponds to the `mesh_uid` metric label in Istio metrics. + * + * Generated from protobuf field string mesh_uid = 1; + * @return string + */ + public function getMeshUid() + { + return $this->mesh_uid; + } + + /** + * Identifier for the mesh in which this Istio service is defined. + * Corresponds to the `mesh_uid` metric label in Istio metrics. + * + * Generated from protobuf field string mesh_uid = 1; + * @param string $var + * @return $this + */ + public function setMeshUid($var) + { + GPBUtil::checkString($var, True); + $this->mesh_uid = $var; + + return $this; + } + + /** + * The namespace of the Istio service underlying this service. Corresponds + * to the `destination_service_namespace` metric label in Istio metrics. + * + * Generated from protobuf field string service_namespace = 3; + * @return string + */ + public function getServiceNamespace() + { + return $this->service_namespace; + } + + /** + * The namespace of the Istio service underlying this service. Corresponds + * to the `destination_service_namespace` metric label in Istio metrics. + * + * Generated from protobuf field string service_namespace = 3; + * @param string $var + * @return $this + */ + public function setServiceNamespace($var) + { + GPBUtil::checkString($var, True); + $this->service_namespace = $var; + + return $this; + } + + /** + * The name of the Istio service underlying this service. Corresponds to the + * `destination_service_name` metric label in Istio metrics. + * + * Generated from protobuf field string service_name = 4; + * @return string + */ + public function getServiceName() + { + return $this->service_name; + } + + /** + * The name of the Istio service underlying this service. Corresponds to the + * `destination_service_name` metric label in Istio metrics. + * + * Generated from protobuf field string service_name = 4; + * @param string $var + * @return $this + */ + public function setServiceName($var) + { + GPBUtil::checkString($var, True); + $this->service_name = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(MeshIstio::class, \Google\Cloud\Monitoring\V3\Service_MeshIstio::class); + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service/Telemetry.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service/Telemetry.php new file mode 100644 index 000000000000..6bb4bd890866 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service/Telemetry.php @@ -0,0 +1,74 @@ +google.monitoring.v3.Service.Telemetry + */ +class Telemetry extends \Google\Protobuf\Internal\Message +{ + /** + * The full name of the resource that defines this service. Formatted as + * described in https://cloud.google.com/apis/design/resource_names. + * + * Generated from protobuf field string resource_name = 1; + */ + protected $resource_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $resource_name + * The full name of the resource that defines this service. Formatted as + * described in https://cloud.google.com/apis/design/resource_names. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\Service::initOnce(); + parent::__construct($data); + } + + /** + * The full name of the resource that defines this service. Formatted as + * described in https://cloud.google.com/apis/design/resource_names. + * + * Generated from protobuf field string resource_name = 1; + * @return string + */ + public function getResourceName() + { + return $this->resource_name; + } + + /** + * The full name of the resource that defines this service. Formatted as + * described in https://cloud.google.com/apis/design/resource_names. + * + * Generated from protobuf field string resource_name = 1; + * @param string $var + * @return $this + */ + public function setResourceName($var) + { + GPBUtil::checkString($var, True); + $this->resource_name = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Telemetry::class, \Google\Cloud\Monitoring\V3\Service_Telemetry::class); + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ServiceLevelIndicator.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ServiceLevelIndicator.php new file mode 100644 index 000000000000..a1d08a4e348f --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ServiceLevelIndicator.php @@ -0,0 +1,153 @@ +google.monitoring.v3.ServiceLevelIndicator + */ +class ServiceLevelIndicator extends \Google\Protobuf\Internal\Message +{ + protected $type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Monitoring\V3\BasicSli $basic_sli + * Basic SLI on a well-known service type. + * @type \Google\Cloud\Monitoring\V3\RequestBasedSli $request_based + * Request-based SLIs + * @type \Google\Cloud\Monitoring\V3\WindowsBasedSli $windows_based + * Windows-based SLIs + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\Service::initOnce(); + parent::__construct($data); + } + + /** + * Basic SLI on a well-known service type. + * + * Generated from protobuf field .google.monitoring.v3.BasicSli basic_sli = 4; + * @return \Google\Cloud\Monitoring\V3\BasicSli|null + */ + public function getBasicSli() + { + return $this->readOneof(4); + } + + public function hasBasicSli() + { + return $this->hasOneof(4); + } + + /** + * Basic SLI on a well-known service type. + * + * Generated from protobuf field .google.monitoring.v3.BasicSli basic_sli = 4; + * @param \Google\Cloud\Monitoring\V3\BasicSli $var + * @return $this + */ + public function setBasicSli($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\BasicSli::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Request-based SLIs + * + * Generated from protobuf field .google.monitoring.v3.RequestBasedSli request_based = 1; + * @return \Google\Cloud\Monitoring\V3\RequestBasedSli|null + */ + public function getRequestBased() + { + return $this->readOneof(1); + } + + public function hasRequestBased() + { + return $this->hasOneof(1); + } + + /** + * Request-based SLIs + * + * Generated from protobuf field .google.monitoring.v3.RequestBasedSli request_based = 1; + * @param \Google\Cloud\Monitoring\V3\RequestBasedSli $var + * @return $this + */ + public function setRequestBased($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\RequestBasedSli::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Windows-based SLIs + * + * Generated from protobuf field .google.monitoring.v3.WindowsBasedSli windows_based = 2; + * @return \Google\Cloud\Monitoring\V3\WindowsBasedSli|null + */ + public function getWindowsBased() + { + return $this->readOneof(2); + } + + public function hasWindowsBased() + { + return $this->hasOneof(2); + } + + /** + * Windows-based SLIs + * + * Generated from protobuf field .google.monitoring.v3.WindowsBasedSli windows_based = 2; + * @param \Google\Cloud\Monitoring\V3\WindowsBasedSli $var + * @return $this + */ + public function setWindowsBased($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\WindowsBasedSli::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getType() + { + return $this->whichOneof("type"); + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ServiceLevelObjective.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ServiceLevelObjective.php new file mode 100644 index 000000000000..cbbc662feda8 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ServiceLevelObjective.php @@ -0,0 +1,338 @@ +google.monitoring.v3.ServiceLevelObjective + */ +class ServiceLevelObjective extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. Resource name for this `ServiceLevelObjective`. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME] + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Name used for UI elements listing this SLO. + * + * Generated from protobuf field string display_name = 11; + */ + protected $display_name = ''; + /** + * The definition of good service, used to measure and calculate the quality + * of the `Service`'s performance with respect to a single aspect of service + * quality. + * + * Generated from protobuf field .google.monitoring.v3.ServiceLevelIndicator service_level_indicator = 3; + */ + protected $service_level_indicator = null; + /** + * The fraction of service that must be good in order for this objective to be + * met. `0 < goal <= 0.999`. + * + * Generated from protobuf field double goal = 4; + */ + protected $goal = 0.0; + /** + * Labels which have been used to annotate the service-level objective. Label + * keys must start with a letter. Label keys and values may contain lowercase + * letters, numbers, underscores, and dashes. Label keys and values have a + * maximum length of 63 characters, and must be less than 128 bytes in size. + * Up to 64 label entries may be stored. For labels which do not have a + * semantic value, the empty string may be supplied for the label value. + * + * Generated from protobuf field map user_labels = 12; + */ + private $user_labels; + protected $period; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. Resource name for this `ServiceLevelObjective`. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME] + * @type string $display_name + * Name used for UI elements listing this SLO. + * @type \Google\Cloud\Monitoring\V3\ServiceLevelIndicator $service_level_indicator + * The definition of good service, used to measure and calculate the quality + * of the `Service`'s performance with respect to a single aspect of service + * quality. + * @type float $goal + * The fraction of service that must be good in order for this objective to be + * met. `0 < goal <= 0.999`. + * @type \Google\Protobuf\Duration $rolling_period + * A rolling time period, semantically "in the past ``". + * Must be an integer multiple of 1 day no larger than 30 days. + * @type int $calendar_period + * A calendar period, semantically "since the start of the current + * ``". At this time, only `DAY`, `WEEK`, `FORTNIGHT`, and + * `MONTH` are supported. + * @type array|\Google\Protobuf\Internal\MapField $user_labels + * Labels which have been used to annotate the service-level objective. Label + * keys must start with a letter. Label keys and values may contain lowercase + * letters, numbers, underscores, and dashes. Label keys and values have a + * maximum length of 63 characters, and must be less than 128 bytes in size. + * Up to 64 label entries may be stored. For labels which do not have a + * semantic value, the empty string may be supplied for the label value. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\Service::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. Resource name for this `ServiceLevelObjective`. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME] + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. Resource name for this `ServiceLevelObjective`. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME] + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Name used for UI elements listing this SLO. + * + * Generated from protobuf field string display_name = 11; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Name used for UI elements listing this SLO. + * + * Generated from protobuf field string display_name = 11; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * The definition of good service, used to measure and calculate the quality + * of the `Service`'s performance with respect to a single aspect of service + * quality. + * + * Generated from protobuf field .google.monitoring.v3.ServiceLevelIndicator service_level_indicator = 3; + * @return \Google\Cloud\Monitoring\V3\ServiceLevelIndicator|null + */ + public function getServiceLevelIndicator() + { + return $this->service_level_indicator; + } + + public function hasServiceLevelIndicator() + { + return isset($this->service_level_indicator); + } + + public function clearServiceLevelIndicator() + { + unset($this->service_level_indicator); + } + + /** + * The definition of good service, used to measure and calculate the quality + * of the `Service`'s performance with respect to a single aspect of service + * quality. + * + * Generated from protobuf field .google.monitoring.v3.ServiceLevelIndicator service_level_indicator = 3; + * @param \Google\Cloud\Monitoring\V3\ServiceLevelIndicator $var + * @return $this + */ + public function setServiceLevelIndicator($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\ServiceLevelIndicator::class); + $this->service_level_indicator = $var; + + return $this; + } + + /** + * The fraction of service that must be good in order for this objective to be + * met. `0 < goal <= 0.999`. + * + * Generated from protobuf field double goal = 4; + * @return float + */ + public function getGoal() + { + return $this->goal; + } + + /** + * The fraction of service that must be good in order for this objective to be + * met. `0 < goal <= 0.999`. + * + * Generated from protobuf field double goal = 4; + * @param float $var + * @return $this + */ + public function setGoal($var) + { + GPBUtil::checkDouble($var); + $this->goal = $var; + + return $this; + } + + /** + * A rolling time period, semantically "in the past ``". + * Must be an integer multiple of 1 day no larger than 30 days. + * + * Generated from protobuf field .google.protobuf.Duration rolling_period = 5; + * @return \Google\Protobuf\Duration|null + */ + public function getRollingPeriod() + { + return $this->readOneof(5); + } + + public function hasRollingPeriod() + { + return $this->hasOneof(5); + } + + /** + * A rolling time period, semantically "in the past ``". + * Must be an integer multiple of 1 day no larger than 30 days. + * + * Generated from protobuf field .google.protobuf.Duration rolling_period = 5; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setRollingPeriod($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * A calendar period, semantically "since the start of the current + * ``". At this time, only `DAY`, `WEEK`, `FORTNIGHT`, and + * `MONTH` are supported. + * + * Generated from protobuf field .google.type.CalendarPeriod calendar_period = 6; + * @return int + */ + public function getCalendarPeriod() + { + return $this->readOneof(6); + } + + public function hasCalendarPeriod() + { + return $this->hasOneof(6); + } + + /** + * A calendar period, semantically "since the start of the current + * ``". At this time, only `DAY`, `WEEK`, `FORTNIGHT`, and + * `MONTH` are supported. + * + * Generated from protobuf field .google.type.CalendarPeriod calendar_period = 6; + * @param int $var + * @return $this + */ + public function setCalendarPeriod($var) + { + GPBUtil::checkEnum($var, \Google\Type\CalendarPeriod::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * Labels which have been used to annotate the service-level objective. Label + * keys must start with a letter. Label keys and values may contain lowercase + * letters, numbers, underscores, and dashes. Label keys and values have a + * maximum length of 63 characters, and must be less than 128 bytes in size. + * Up to 64 label entries may be stored. For labels which do not have a + * semantic value, the empty string may be supplied for the label value. + * + * Generated from protobuf field map user_labels = 12; + * @return \Google\Protobuf\Internal\MapField + */ + public function getUserLabels() + { + return $this->user_labels; + } + + /** + * Labels which have been used to annotate the service-level objective. Label + * keys must start with a letter. Label keys and values may contain lowercase + * letters, numbers, underscores, and dashes. Label keys and values have a + * maximum length of 63 characters, and must be less than 128 bytes in size. + * Up to 64 label entries may be stored. For labels which do not have a + * semantic value, the empty string may be supplied for the label value. + * + * Generated from protobuf field map user_labels = 12; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setUserLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->user_labels = $arr; + + return $this; + } + + /** + * @return string + */ + public function getPeriod() + { + return $this->whichOneof("period"); + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ServiceLevelObjective/View.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ServiceLevelObjective/View.php new file mode 100644 index 000000000000..a21fbcb25964 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ServiceLevelObjective/View.php @@ -0,0 +1,71 @@ +google.monitoring.v3.ServiceLevelObjective.View + */ +class View +{ + /** + * Same as FULL. + * + * Generated from protobuf enum VIEW_UNSPECIFIED = 0; + */ + const VIEW_UNSPECIFIED = 0; + /** + * Return the embedded `ServiceLevelIndicator` in the form in which it was + * defined. If it was defined using a `BasicSli`, return that `BasicSli`. + * + * Generated from protobuf enum FULL = 2; + */ + const FULL = 2; + /** + * For `ServiceLevelIndicator`s using `BasicSli` articulation, instead + * return the `ServiceLevelIndicator` with its mode of computation fully + * spelled out as a `RequestBasedSli`. For `ServiceLevelIndicator`s using + * `RequestBasedSli` or `WindowsBasedSli`, return the + * `ServiceLevelIndicator` as it was provided. + * + * Generated from protobuf enum EXPLICIT = 1; + */ + const EXPLICIT = 1; + + private static $valueToName = [ + self::VIEW_UNSPECIFIED => 'VIEW_UNSPECIFIED', + self::FULL => 'FULL', + self::EXPLICIT => 'EXPLICIT', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(View::class, \Google\Cloud\Monitoring\V3\ServiceLevelObjective_View::class); + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ServiceTier.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ServiceTier.php new file mode 100644 index 000000000000..906682308486 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ServiceTier.php @@ -0,0 +1,74 @@ +google.monitoring.v3.ServiceTier + */ +class ServiceTier +{ + /** + * An invalid sentinel value, used to indicate that a tier has not + * been provided explicitly. + * + * Generated from protobuf enum SERVICE_TIER_UNSPECIFIED = 0; + */ + const SERVICE_TIER_UNSPECIFIED = 0; + /** + * The Cloud Monitoring Basic tier, a free tier of service that provides basic + * features, a moderate allotment of logs, and access to built-in metrics. + * A number of features are not available in this tier. For more details, + * see [the service tiers + * documentation](https://cloud.google.com/monitoring/workspaces/tiers). + * + * Generated from protobuf enum SERVICE_TIER_BASIC = 1; + */ + const SERVICE_TIER_BASIC = 1; + /** + * The Cloud Monitoring Premium tier, a higher, more expensive tier of service + * that provides access to all Cloud Monitoring features, lets you use Cloud + * Monitoring with AWS accounts, and has a larger allotments for logs and + * metrics. For more details, see [the service tiers + * documentation](https://cloud.google.com/monitoring/workspaces/tiers). + * + * Generated from protobuf enum SERVICE_TIER_PREMIUM = 2; + */ + const SERVICE_TIER_PREMIUM = 2; + + private static $valueToName = [ + self::SERVICE_TIER_UNSPECIFIED => 'SERVICE_TIER_UNSPECIFIED', + self::SERVICE_TIER_BASIC => 'SERVICE_TIER_BASIC', + self::SERVICE_TIER_PREMIUM => 'SERVICE_TIER_PREMIUM', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Snooze.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Snooze.php new file mode 100644 index 000000000000..c5f17a47719f --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Snooze.php @@ -0,0 +1,224 @@ +google.monitoring.v3.Snooze + */ +class Snooze extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Identifier. The name of the `Snooze`. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/snoozes/[SNOOZE_ID] + * The ID of the `Snooze` will be generated by the system. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Required. This defines the criteria for applying the `Snooze`. See + * `Criteria` for more information. + * + * Generated from protobuf field .google.monitoring.v3.Snooze.Criteria criteria = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $criteria = null; + /** + * Required. The `Snooze` will be active from `interval.start_time` through + * `interval.end_time`. + * `interval.start_time` cannot be in the past. There is a 15 second clock + * skew to account for the time it takes for a request to reach the API from + * the UI. + * + * Generated from protobuf field .google.monitoring.v3.TimeInterval interval = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $interval = null; + /** + * Required. A display name for the `Snooze`. This can be, at most, 512 + * unicode characters. + * + * Generated from protobuf field string display_name = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $display_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Identifier. The name of the `Snooze`. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/snoozes/[SNOOZE_ID] + * The ID of the `Snooze` will be generated by the system. + * @type \Google\Cloud\Monitoring\V3\Snooze\Criteria $criteria + * Required. This defines the criteria for applying the `Snooze`. See + * `Criteria` for more information. + * @type \Google\Cloud\Monitoring\V3\TimeInterval $interval + * Required. The `Snooze` will be active from `interval.start_time` through + * `interval.end_time`. + * `interval.start_time` cannot be in the past. There is a 15 second clock + * skew to account for the time it takes for a request to reach the API from + * the UI. + * @type string $display_name + * Required. A display name for the `Snooze`. This can be, at most, 512 + * unicode characters. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\Snooze::initOnce(); + parent::__construct($data); + } + + /** + * Required. Identifier. The name of the `Snooze`. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/snoozes/[SNOOZE_ID] + * The ID of the `Snooze` will be generated by the system. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Identifier. The name of the `Snooze`. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/snoozes/[SNOOZE_ID] + * The ID of the `Snooze` will be generated by the system. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. This defines the criteria for applying the `Snooze`. See + * `Criteria` for more information. + * + * Generated from protobuf field .google.monitoring.v3.Snooze.Criteria criteria = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Monitoring\V3\Snooze\Criteria|null + */ + public function getCriteria() + { + return $this->criteria; + } + + public function hasCriteria() + { + return isset($this->criteria); + } + + public function clearCriteria() + { + unset($this->criteria); + } + + /** + * Required. This defines the criteria for applying the `Snooze`. See + * `Criteria` for more information. + * + * Generated from protobuf field .google.monitoring.v3.Snooze.Criteria criteria = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Monitoring\V3\Snooze\Criteria $var + * @return $this + */ + public function setCriteria($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\Snooze\Criteria::class); + $this->criteria = $var; + + return $this; + } + + /** + * Required. The `Snooze` will be active from `interval.start_time` through + * `interval.end_time`. + * `interval.start_time` cannot be in the past. There is a 15 second clock + * skew to account for the time it takes for a request to reach the API from + * the UI. + * + * Generated from protobuf field .google.monitoring.v3.TimeInterval interval = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Monitoring\V3\TimeInterval|null + */ + public function getInterval() + { + return $this->interval; + } + + public function hasInterval() + { + return isset($this->interval); + } + + public function clearInterval() + { + unset($this->interval); + } + + /** + * Required. The `Snooze` will be active from `interval.start_time` through + * `interval.end_time`. + * `interval.start_time` cannot be in the past. There is a 15 second clock + * skew to account for the time it takes for a request to reach the API from + * the UI. + * + * Generated from protobuf field .google.monitoring.v3.TimeInterval interval = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Monitoring\V3\TimeInterval $var + * @return $this + */ + public function setInterval($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\TimeInterval::class); + $this->interval = $var; + + return $this; + } + + /** + * Required. A display name for the `Snooze`. This can be, at most, 512 + * unicode characters. + * + * Generated from protobuf field string display_name = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Required. A display name for the `Snooze`. This can be, at most, 512 + * unicode characters. + * + * Generated from protobuf field string display_name = 5 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Snooze/Criteria.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Snooze/Criteria.php new file mode 100644 index 000000000000..13e62c6c1855 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Snooze/Criteria.php @@ -0,0 +1,88 @@ +google.monitoring.v3.Snooze.Criteria + */ +class Criteria extends \Google\Protobuf\Internal\Message +{ + /** + * The specific `AlertPolicy` names for the alert that should be snoozed. + * The format is: + * projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[POLICY_ID] + * There is a limit of 16 policies per snooze. This limit is checked during + * snooze creation. + * + * Generated from protobuf field repeated string policies = 1 [(.google.api.resource_reference) = { + */ + private $policies; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $policies + * The specific `AlertPolicy` names for the alert that should be snoozed. + * The format is: + * projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[POLICY_ID] + * There is a limit of 16 policies per snooze. This limit is checked during + * snooze creation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\Snooze::initOnce(); + parent::__construct($data); + } + + /** + * The specific `AlertPolicy` names for the alert that should be snoozed. + * The format is: + * projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[POLICY_ID] + * There is a limit of 16 policies per snooze. This limit is checked during + * snooze creation. + * + * Generated from protobuf field repeated string policies = 1 [(.google.api.resource_reference) = { + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPolicies() + { + return $this->policies; + } + + /** + * The specific `AlertPolicy` names for the alert that should be snoozed. + * The format is: + * projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[POLICY_ID] + * There is a limit of 16 policies per snooze. This limit is checked during + * snooze creation. + * + * Generated from protobuf field repeated string policies = 1 [(.google.api.resource_reference) = { + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPolicies($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->policies = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Criteria::class, \Google\Cloud\Monitoring\V3\Snooze_Criteria::class); + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/SpanContext.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/SpanContext.php new file mode 100644 index 000000000000..cfeb31ba8340 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/SpanContext.php @@ -0,0 +1,91 @@ +google.monitoring.v3.SpanContext + */ +class SpanContext extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the span. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/traces/[TRACE_ID]/spans/[SPAN_ID] + * `[TRACE_ID]` is a unique identifier for a trace within a project; + * it is a 32-character hexadecimal encoding of a 16-byte array. + * `[SPAN_ID]` is a unique identifier for a span within a trace; it + * is a 16-character hexadecimal encoding of an 8-byte array. + * + * Generated from protobuf field string span_name = 1; + */ + protected $span_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $span_name + * The resource name of the span. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/traces/[TRACE_ID]/spans/[SPAN_ID] + * `[TRACE_ID]` is a unique identifier for a trace within a project; + * it is a 32-character hexadecimal encoding of a 16-byte array. + * `[SPAN_ID]` is a unique identifier for a span within a trace; it + * is a 16-character hexadecimal encoding of an 8-byte array. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\SpanContext::initOnce(); + parent::__construct($data); + } + + /** + * The resource name of the span. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/traces/[TRACE_ID]/spans/[SPAN_ID] + * `[TRACE_ID]` is a unique identifier for a trace within a project; + * it is a 32-character hexadecimal encoding of a 16-byte array. + * `[SPAN_ID]` is a unique identifier for a span within a trace; it + * is a 16-character hexadecimal encoding of an 8-byte array. + * + * Generated from protobuf field string span_name = 1; + * @return string + */ + public function getSpanName() + { + return $this->span_name; + } + + /** + * The resource name of the span. The format is: + * projects/[PROJECT_ID_OR_NUMBER]/traces/[TRACE_ID]/spans/[SPAN_ID] + * `[TRACE_ID]` is a unique identifier for a trace within a project; + * it is a 32-character hexadecimal encoding of a 16-byte array. + * `[SPAN_ID]` is a unique identifier for a span within a trace; it + * is a 16-character hexadecimal encoding of an 8-byte array. + * + * Generated from protobuf field string span_name = 1; + * @param string $var + * @return $this + */ + public function setSpanName($var) + { + GPBUtil::checkString($var, True); + $this->span_name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/SyntheticMonitorTarget.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/SyntheticMonitorTarget.php new file mode 100644 index 000000000000..8bbfac0f1098 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/SyntheticMonitorTarget.php @@ -0,0 +1,75 @@ +google.monitoring.v3.SyntheticMonitorTarget + */ +class SyntheticMonitorTarget extends \Google\Protobuf\Internal\Message +{ + protected $target; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Monitoring\V3\SyntheticMonitorTarget\CloudFunctionV2Target $cloud_function_v2 + * Target a Synthetic Monitor GCFv2 instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\Uptime::initOnce(); + parent::__construct($data); + } + + /** + * Target a Synthetic Monitor GCFv2 instance. + * + * Generated from protobuf field .google.monitoring.v3.SyntheticMonitorTarget.CloudFunctionV2Target cloud_function_v2 = 1; + * @return \Google\Cloud\Monitoring\V3\SyntheticMonitorTarget\CloudFunctionV2Target|null + */ + public function getCloudFunctionV2() + { + return $this->readOneof(1); + } + + public function hasCloudFunctionV2() + { + return $this->hasOneof(1); + } + + /** + * Target a Synthetic Monitor GCFv2 instance. + * + * Generated from protobuf field .google.monitoring.v3.SyntheticMonitorTarget.CloudFunctionV2Target cloud_function_v2 = 1; + * @param \Google\Cloud\Monitoring\V3\SyntheticMonitorTarget\CloudFunctionV2Target $var + * @return $this + */ + public function setCloudFunctionV2($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\SyntheticMonitorTarget\CloudFunctionV2Target::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * @return string + */ + public function getTarget() + { + return $this->whichOneof("target"); + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/SyntheticMonitorTarget/CloudFunctionV2Target.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/SyntheticMonitorTarget/CloudFunctionV2Target.php new file mode 100644 index 000000000000..1f9b8d546857 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/SyntheticMonitorTarget/CloudFunctionV2Target.php @@ -0,0 +1,134 @@ +google.monitoring.v3.SyntheticMonitorTarget.CloudFunctionV2Target + */ +class CloudFunctionV2Target extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Fully qualified GCFv2 resource name + * i.e. `projects/{project}/locations/{location}/functions/{function}` + * Required. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Output only. The `cloud_run_revision` Monitored Resource associated with + * the GCFv2. The Synthetic Monitor execution results (metrics, logs, and + * spans) are reported against this Monitored Resource. This field is output + * only. + * + * Generated from protobuf field .google.api.MonitoredResource cloud_run_revision = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $cloud_run_revision = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Fully qualified GCFv2 resource name + * i.e. `projects/{project}/locations/{location}/functions/{function}` + * Required. + * @type \Google\Api\MonitoredResource $cloud_run_revision + * Output only. The `cloud_run_revision` Monitored Resource associated with + * the GCFv2. The Synthetic Monitor execution results (metrics, logs, and + * spans) are reported against this Monitored Resource. This field is output + * only. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\Uptime::initOnce(); + parent::__construct($data); + } + + /** + * Required. Fully qualified GCFv2 resource name + * i.e. `projects/{project}/locations/{location}/functions/{function}` + * Required. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Fully qualified GCFv2 resource name + * i.e. `projects/{project}/locations/{location}/functions/{function}` + * Required. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The `cloud_run_revision` Monitored Resource associated with + * the GCFv2. The Synthetic Monitor execution results (metrics, logs, and + * spans) are reported against this Monitored Resource. This field is output + * only. + * + * Generated from protobuf field .google.api.MonitoredResource cloud_run_revision = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Api\MonitoredResource|null + */ + public function getCloudRunRevision() + { + return $this->cloud_run_revision; + } + + public function hasCloudRunRevision() + { + return isset($this->cloud_run_revision); + } + + public function clearCloudRunRevision() + { + unset($this->cloud_run_revision); + } + + /** + * Output only. The `cloud_run_revision` Monitored Resource associated with + * the GCFv2. The Synthetic Monitor execution results (metrics, logs, and + * spans) are reported against this Monitored Resource. This field is output + * only. + * + * Generated from protobuf field .google.api.MonitoredResource cloud_run_revision = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Api\MonitoredResource $var + * @return $this + */ + public function setCloudRunRevision($var) + { + GPBUtil::checkMessage($var, \Google\Api\MonitoredResource::class); + $this->cloud_run_revision = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(CloudFunctionV2Target::class, \Google\Cloud\Monitoring\V3\SyntheticMonitorTarget_CloudFunctionV2Target::class); + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/TextLocator.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/TextLocator.php new file mode 100644 index 000000000000..6c6c82460c63 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/TextLocator.php @@ -0,0 +1,303 @@ +google.monitoring.v3.TextLocator + */ +class TextLocator extends \Google\Protobuf\Internal\Message +{ + /** + * The source of the text. The source may be a field in the request, in which + * case its format is the format of the + * google.rpc.BadRequest.FieldViolation.field field in + * https://cloud.google.com/apis/design/errors#error_details. It may also be + * be a source other than the request field (e.g. a macro definition + * referenced in the text of the query), in which case this is the name of + * the source (e.g. the macro name). + * + * Generated from protobuf field string source = 1; + */ + protected $source = ''; + /** + * The position of the first byte within the text. + * + * Generated from protobuf field .google.monitoring.v3.TextLocator.Position start_position = 2; + */ + protected $start_position = null; + /** + * The position of the last byte within the text. + * + * Generated from protobuf field .google.monitoring.v3.TextLocator.Position end_position = 3; + */ + protected $end_position = null; + /** + * If `source`, `start_position`, and `end_position` describe a call on + * some object (e.g. a macro in the time series query language text) and a + * location is to be designated in that object's text, `nested_locator` + * identifies the location within that object. + * + * Generated from protobuf field .google.monitoring.v3.TextLocator nested_locator = 4; + */ + protected $nested_locator = null; + /** + * When `nested_locator` is set, this field gives the reason for the nesting. + * Usually, the reason is a macro invocation. In that case, the macro name + * (including the leading '@') signals the location of the macro call + * in the text and a macro argument name (including the leading '$') signals + * the location of the macro argument inside the macro body that got + * substituted away. + * + * Generated from protobuf field string nesting_reason = 5; + */ + protected $nesting_reason = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $source + * The source of the text. The source may be a field in the request, in which + * case its format is the format of the + * google.rpc.BadRequest.FieldViolation.field field in + * https://cloud.google.com/apis/design/errors#error_details. It may also be + * be a source other than the request field (e.g. a macro definition + * referenced in the text of the query), in which case this is the name of + * the source (e.g. the macro name). + * @type \Google\Cloud\Monitoring\V3\TextLocator\Position $start_position + * The position of the first byte within the text. + * @type \Google\Cloud\Monitoring\V3\TextLocator\Position $end_position + * The position of the last byte within the text. + * @type \Google\Cloud\Monitoring\V3\TextLocator $nested_locator + * If `source`, `start_position`, and `end_position` describe a call on + * some object (e.g. a macro in the time series query language text) and a + * location is to be designated in that object's text, `nested_locator` + * identifies the location within that object. + * @type string $nesting_reason + * When `nested_locator` is set, this field gives the reason for the nesting. + * Usually, the reason is a macro invocation. In that case, the macro name + * (including the leading '@') signals the location of the macro call + * in the text and a macro argument name (including the leading '$') signals + * the location of the macro argument inside the macro body that got + * substituted away. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\Metric::initOnce(); + parent::__construct($data); + } + + /** + * The source of the text. The source may be a field in the request, in which + * case its format is the format of the + * google.rpc.BadRequest.FieldViolation.field field in + * https://cloud.google.com/apis/design/errors#error_details. It may also be + * be a source other than the request field (e.g. a macro definition + * referenced in the text of the query), in which case this is the name of + * the source (e.g. the macro name). + * + * Generated from protobuf field string source = 1; + * @return string + */ + public function getSource() + { + return $this->source; + } + + /** + * The source of the text. The source may be a field in the request, in which + * case its format is the format of the + * google.rpc.BadRequest.FieldViolation.field field in + * https://cloud.google.com/apis/design/errors#error_details. It may also be + * be a source other than the request field (e.g. a macro definition + * referenced in the text of the query), in which case this is the name of + * the source (e.g. the macro name). + * + * Generated from protobuf field string source = 1; + * @param string $var + * @return $this + */ + public function setSource($var) + { + GPBUtil::checkString($var, True); + $this->source = $var; + + return $this; + } + + /** + * The position of the first byte within the text. + * + * Generated from protobuf field .google.monitoring.v3.TextLocator.Position start_position = 2; + * @return \Google\Cloud\Monitoring\V3\TextLocator\Position|null + */ + public function getStartPosition() + { + return $this->start_position; + } + + public function hasStartPosition() + { + return isset($this->start_position); + } + + public function clearStartPosition() + { + unset($this->start_position); + } + + /** + * The position of the first byte within the text. + * + * Generated from protobuf field .google.monitoring.v3.TextLocator.Position start_position = 2; + * @param \Google\Cloud\Monitoring\V3\TextLocator\Position $var + * @return $this + */ + public function setStartPosition($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\TextLocator\Position::class); + $this->start_position = $var; + + return $this; + } + + /** + * The position of the last byte within the text. + * + * Generated from protobuf field .google.monitoring.v3.TextLocator.Position end_position = 3; + * @return \Google\Cloud\Monitoring\V3\TextLocator\Position|null + */ + public function getEndPosition() + { + return $this->end_position; + } + + public function hasEndPosition() + { + return isset($this->end_position); + } + + public function clearEndPosition() + { + unset($this->end_position); + } + + /** + * The position of the last byte within the text. + * + * Generated from protobuf field .google.monitoring.v3.TextLocator.Position end_position = 3; + * @param \Google\Cloud\Monitoring\V3\TextLocator\Position $var + * @return $this + */ + public function setEndPosition($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\TextLocator\Position::class); + $this->end_position = $var; + + return $this; + } + + /** + * If `source`, `start_position`, and `end_position` describe a call on + * some object (e.g. a macro in the time series query language text) and a + * location is to be designated in that object's text, `nested_locator` + * identifies the location within that object. + * + * Generated from protobuf field .google.monitoring.v3.TextLocator nested_locator = 4; + * @return \Google\Cloud\Monitoring\V3\TextLocator|null + */ + public function getNestedLocator() + { + return $this->nested_locator; + } + + public function hasNestedLocator() + { + return isset($this->nested_locator); + } + + public function clearNestedLocator() + { + unset($this->nested_locator); + } + + /** + * If `source`, `start_position`, and `end_position` describe a call on + * some object (e.g. a macro in the time series query language text) and a + * location is to be designated in that object's text, `nested_locator` + * identifies the location within that object. + * + * Generated from protobuf field .google.monitoring.v3.TextLocator nested_locator = 4; + * @param \Google\Cloud\Monitoring\V3\TextLocator $var + * @return $this + */ + public function setNestedLocator($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\TextLocator::class); + $this->nested_locator = $var; + + return $this; + } + + /** + * When `nested_locator` is set, this field gives the reason for the nesting. + * Usually, the reason is a macro invocation. In that case, the macro name + * (including the leading '@') signals the location of the macro call + * in the text and a macro argument name (including the leading '$') signals + * the location of the macro argument inside the macro body that got + * substituted away. + * + * Generated from protobuf field string nesting_reason = 5; + * @return string + */ + public function getNestingReason() + { + return $this->nesting_reason; + } + + /** + * When `nested_locator` is set, this field gives the reason for the nesting. + * Usually, the reason is a macro invocation. In that case, the macro name + * (including the leading '@') signals the location of the macro call + * in the text and a macro argument name (including the leading '$') signals + * the location of the macro argument inside the macro body that got + * substituted away. + * + * Generated from protobuf field string nesting_reason = 5; + * @param string $var + * @return $this + */ + public function setNestingReason($var) + { + GPBUtil::checkString($var, True); + $this->nesting_reason = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/TextLocator/Position.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/TextLocator/Position.php new file mode 100644 index 000000000000..bd81e7bff71b --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/TextLocator/Position.php @@ -0,0 +1,108 @@ +google.monitoring.v3.TextLocator.Position + */ +class Position extends \Google\Protobuf\Internal\Message +{ + /** + * The line, starting with 1, where the byte is positioned. + * + * Generated from protobuf field int32 line = 1; + */ + protected $line = 0; + /** + * The column within the line, starting with 1, where the byte is + * positioned. This is a byte index even though the text is UTF-8. + * + * Generated from protobuf field int32 column = 2; + */ + protected $column = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $line + * The line, starting with 1, where the byte is positioned. + * @type int $column + * The column within the line, starting with 1, where the byte is + * positioned. This is a byte index even though the text is UTF-8. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\Metric::initOnce(); + parent::__construct($data); + } + + /** + * The line, starting with 1, where the byte is positioned. + * + * Generated from protobuf field int32 line = 1; + * @return int + */ + public function getLine() + { + return $this->line; + } + + /** + * The line, starting with 1, where the byte is positioned. + * + * Generated from protobuf field int32 line = 1; + * @param int $var + * @return $this + */ + public function setLine($var) + { + GPBUtil::checkInt32($var); + $this->line = $var; + + return $this; + } + + /** + * The column within the line, starting with 1, where the byte is + * positioned. This is a byte index even though the text is UTF-8. + * + * Generated from protobuf field int32 column = 2; + * @return int + */ + public function getColumn() + { + return $this->column; + } + + /** + * The column within the line, starting with 1, where the byte is + * positioned. This is a byte index even though the text is UTF-8. + * + * Generated from protobuf field int32 column = 2; + * @param int $var + * @return $this + */ + public function setColumn($var) + { + GPBUtil::checkInt32($var); + $this->column = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Position::class, \Google\Cloud\Monitoring\V3\TextLocator_Position::class); + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/TimeInterval.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/TimeInterval.php new file mode 100644 index 000000000000..1869cd41c8a9 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/TimeInterval.php @@ -0,0 +1,165 @@ +google.monitoring.v3.TimeInterval + */ +class TimeInterval extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The end of the time interval. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + */ + protected $end_time = null; + /** + * Optional. The beginning of the time interval. The default value + * for the start time is the end time. The start time must not be + * later than the end time. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + */ + protected $start_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $end_time + * Required. The end of the time interval. + * @type \Google\Protobuf\Timestamp $start_time + * Optional. The beginning of the time interval. The default value + * for the start time is the end time. The start time must not be + * later than the end time. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\Common::initOnce(); + parent::__construct($data); + } + + /** + * Required. The end of the time interval. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEndTime() + { + return $this->end_time; + } + + public function hasEndTime() + { + return isset($this->end_time); + } + + public function clearEndTime() + { + unset($this->end_time); + } + + /** + * Required. The end of the time interval. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * Optional. The beginning of the time interval. The default value + * for the start time is the end time. The start time must not be + * later than the end time. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + * @return \Google\Protobuf\Timestamp|null + */ + public function getStartTime() + { + return $this->start_time; + } + + public function hasStartTime() + { + return isset($this->start_time); + } + + public function clearStartTime() + { + unset($this->start_time); + } + + /** + * Optional. The beginning of the time interval. The default value + * for the start time is the end time. The start time must not be + * later than the end time. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/TimeSeries.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/TimeSeries.php new file mode 100644 index 000000000000..884802d3cdcc --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/TimeSeries.php @@ -0,0 +1,404 @@ +google.monitoring.v3.TimeSeries + */ +class TimeSeries extends \Google\Protobuf\Internal\Message +{ + /** + * The associated metric. A fully-specified metric used to identify the time + * series. + * + * Generated from protobuf field .google.api.Metric metric = 1; + */ + protected $metric = null; + /** + * The associated monitored resource. Custom metrics can use only certain + * monitored resource types in their time series data. For more information, + * see [Monitored resources for custom + * metrics](https://cloud.google.com/monitoring/custom-metrics/creating-metrics#custom-metric-resources). + * + * Generated from protobuf field .google.api.MonitoredResource resource = 2; + */ + protected $resource = null; + /** + * Output only. The associated monitored resource metadata. When reading a + * time series, this field will include metadata labels that are explicitly + * named in the reduction. When creating a time series, this field is ignored. + * + * Generated from protobuf field .google.api.MonitoredResourceMetadata metadata = 7; + */ + protected $metadata = null; + /** + * The metric kind of the time series. When listing time series, this metric + * kind might be different from the metric kind of the associated metric if + * this time series is an alignment or reduction of other time series. + * When creating a time series, this field is optional. If present, it must be + * the same as the metric kind of the associated metric. If the associated + * metric's descriptor must be auto-created, then this field specifies the + * metric kind of the new descriptor and must be either `GAUGE` (the default) + * or `CUMULATIVE`. + * + * Generated from protobuf field .google.api.MetricDescriptor.MetricKind metric_kind = 3; + */ + protected $metric_kind = 0; + /** + * The value type of the time series. When listing time series, this value + * type might be different from the value type of the associated metric if + * this time series is an alignment or reduction of other time series. + * When creating a time series, this field is optional. If present, it must be + * the same as the type of the data in the `points` field. + * + * Generated from protobuf field .google.api.MetricDescriptor.ValueType value_type = 4; + */ + protected $value_type = 0; + /** + * The data points of this time series. When listing time series, points are + * returned in reverse time order. + * When creating a time series, this field must contain exactly one point and + * the point's type must be the same as the value type of the associated + * metric. If the associated metric's descriptor must be auto-created, then + * the value type of the descriptor is determined by the point's type, which + * must be `BOOL`, `INT64`, `DOUBLE`, or `DISTRIBUTION`. + * + * Generated from protobuf field repeated .google.monitoring.v3.Point points = 5; + */ + private $points; + /** + * The units in which the metric value is reported. It is only applicable + * if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The `unit` + * defines the representation of the stored metric values. + * + * Generated from protobuf field string unit = 8; + */ + protected $unit = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Api\Metric $metric + * The associated metric. A fully-specified metric used to identify the time + * series. + * @type \Google\Api\MonitoredResource $resource + * The associated monitored resource. Custom metrics can use only certain + * monitored resource types in their time series data. For more information, + * see [Monitored resources for custom + * metrics](https://cloud.google.com/monitoring/custom-metrics/creating-metrics#custom-metric-resources). + * @type \Google\Api\MonitoredResourceMetadata $metadata + * Output only. The associated monitored resource metadata. When reading a + * time series, this field will include metadata labels that are explicitly + * named in the reduction. When creating a time series, this field is ignored. + * @type int $metric_kind + * The metric kind of the time series. When listing time series, this metric + * kind might be different from the metric kind of the associated metric if + * this time series is an alignment or reduction of other time series. + * When creating a time series, this field is optional. If present, it must be + * the same as the metric kind of the associated metric. If the associated + * metric's descriptor must be auto-created, then this field specifies the + * metric kind of the new descriptor and must be either `GAUGE` (the default) + * or `CUMULATIVE`. + * @type int $value_type + * The value type of the time series. When listing time series, this value + * type might be different from the value type of the associated metric if + * this time series is an alignment or reduction of other time series. + * When creating a time series, this field is optional. If present, it must be + * the same as the type of the data in the `points` field. + * @type array<\Google\Cloud\Monitoring\V3\Point>|\Google\Protobuf\Internal\RepeatedField $points + * The data points of this time series. When listing time series, points are + * returned in reverse time order. + * When creating a time series, this field must contain exactly one point and + * the point's type must be the same as the value type of the associated + * metric. If the associated metric's descriptor must be auto-created, then + * the value type of the descriptor is determined by the point's type, which + * must be `BOOL`, `INT64`, `DOUBLE`, or `DISTRIBUTION`. + * @type string $unit + * The units in which the metric value is reported. It is only applicable + * if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The `unit` + * defines the representation of the stored metric values. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\Metric::initOnce(); + parent::__construct($data); + } + + /** + * The associated metric. A fully-specified metric used to identify the time + * series. + * + * Generated from protobuf field .google.api.Metric metric = 1; + * @return \Google\Api\Metric|null + */ + public function getMetric() + { + return $this->metric; + } + + public function hasMetric() + { + return isset($this->metric); + } + + public function clearMetric() + { + unset($this->metric); + } + + /** + * The associated metric. A fully-specified metric used to identify the time + * series. + * + * Generated from protobuf field .google.api.Metric metric = 1; + * @param \Google\Api\Metric $var + * @return $this + */ + public function setMetric($var) + { + GPBUtil::checkMessage($var, \Google\Api\Metric::class); + $this->metric = $var; + + return $this; + } + + /** + * The associated monitored resource. Custom metrics can use only certain + * monitored resource types in their time series data. For more information, + * see [Monitored resources for custom + * metrics](https://cloud.google.com/monitoring/custom-metrics/creating-metrics#custom-metric-resources). + * + * Generated from protobuf field .google.api.MonitoredResource resource = 2; + * @return \Google\Api\MonitoredResource|null + */ + public function getResource() + { + return $this->resource; + } + + public function hasResource() + { + return isset($this->resource); + } + + public function clearResource() + { + unset($this->resource); + } + + /** + * The associated monitored resource. Custom metrics can use only certain + * monitored resource types in their time series data. For more information, + * see [Monitored resources for custom + * metrics](https://cloud.google.com/monitoring/custom-metrics/creating-metrics#custom-metric-resources). + * + * Generated from protobuf field .google.api.MonitoredResource resource = 2; + * @param \Google\Api\MonitoredResource $var + * @return $this + */ + public function setResource($var) + { + GPBUtil::checkMessage($var, \Google\Api\MonitoredResource::class); + $this->resource = $var; + + return $this; + } + + /** + * Output only. The associated monitored resource metadata. When reading a + * time series, this field will include metadata labels that are explicitly + * named in the reduction. When creating a time series, this field is ignored. + * + * Generated from protobuf field .google.api.MonitoredResourceMetadata metadata = 7; + * @return \Google\Api\MonitoredResourceMetadata|null + */ + public function getMetadata() + { + return $this->metadata; + } + + public function hasMetadata() + { + return isset($this->metadata); + } + + public function clearMetadata() + { + unset($this->metadata); + } + + /** + * Output only. The associated monitored resource metadata. When reading a + * time series, this field will include metadata labels that are explicitly + * named in the reduction. When creating a time series, this field is ignored. + * + * Generated from protobuf field .google.api.MonitoredResourceMetadata metadata = 7; + * @param \Google\Api\MonitoredResourceMetadata $var + * @return $this + */ + public function setMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Api\MonitoredResourceMetadata::class); + $this->metadata = $var; + + return $this; + } + + /** + * The metric kind of the time series. When listing time series, this metric + * kind might be different from the metric kind of the associated metric if + * this time series is an alignment or reduction of other time series. + * When creating a time series, this field is optional. If present, it must be + * the same as the metric kind of the associated metric. If the associated + * metric's descriptor must be auto-created, then this field specifies the + * metric kind of the new descriptor and must be either `GAUGE` (the default) + * or `CUMULATIVE`. + * + * Generated from protobuf field .google.api.MetricDescriptor.MetricKind metric_kind = 3; + * @return int + */ + public function getMetricKind() + { + return $this->metric_kind; + } + + /** + * The metric kind of the time series. When listing time series, this metric + * kind might be different from the metric kind of the associated metric if + * this time series is an alignment or reduction of other time series. + * When creating a time series, this field is optional. If present, it must be + * the same as the metric kind of the associated metric. If the associated + * metric's descriptor must be auto-created, then this field specifies the + * metric kind of the new descriptor and must be either `GAUGE` (the default) + * or `CUMULATIVE`. + * + * Generated from protobuf field .google.api.MetricDescriptor.MetricKind metric_kind = 3; + * @param int $var + * @return $this + */ + public function setMetricKind($var) + { + GPBUtil::checkEnum($var, \Google\Api\MetricDescriptor\MetricKind::class); + $this->metric_kind = $var; + + return $this; + } + + /** + * The value type of the time series. When listing time series, this value + * type might be different from the value type of the associated metric if + * this time series is an alignment or reduction of other time series. + * When creating a time series, this field is optional. If present, it must be + * the same as the type of the data in the `points` field. + * + * Generated from protobuf field .google.api.MetricDescriptor.ValueType value_type = 4; + * @return int + */ + public function getValueType() + { + return $this->value_type; + } + + /** + * The value type of the time series. When listing time series, this value + * type might be different from the value type of the associated metric if + * this time series is an alignment or reduction of other time series. + * When creating a time series, this field is optional. If present, it must be + * the same as the type of the data in the `points` field. + * + * Generated from protobuf field .google.api.MetricDescriptor.ValueType value_type = 4; + * @param int $var + * @return $this + */ + public function setValueType($var) + { + GPBUtil::checkEnum($var, \Google\Api\MetricDescriptor\ValueType::class); + $this->value_type = $var; + + return $this; + } + + /** + * The data points of this time series. When listing time series, points are + * returned in reverse time order. + * When creating a time series, this field must contain exactly one point and + * the point's type must be the same as the value type of the associated + * metric. If the associated metric's descriptor must be auto-created, then + * the value type of the descriptor is determined by the point's type, which + * must be `BOOL`, `INT64`, `DOUBLE`, or `DISTRIBUTION`. + * + * Generated from protobuf field repeated .google.monitoring.v3.Point points = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPoints() + { + return $this->points; + } + + /** + * The data points of this time series. When listing time series, points are + * returned in reverse time order. + * When creating a time series, this field must contain exactly one point and + * the point's type must be the same as the value type of the associated + * metric. If the associated metric's descriptor must be auto-created, then + * the value type of the descriptor is determined by the point's type, which + * must be `BOOL`, `INT64`, `DOUBLE`, or `DISTRIBUTION`. + * + * Generated from protobuf field repeated .google.monitoring.v3.Point points = 5; + * @param array<\Google\Cloud\Monitoring\V3\Point>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPoints($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Monitoring\V3\Point::class); + $this->points = $arr; + + return $this; + } + + /** + * The units in which the metric value is reported. It is only applicable + * if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The `unit` + * defines the representation of the stored metric values. + * + * Generated from protobuf field string unit = 8; + * @return string + */ + public function getUnit() + { + return $this->unit; + } + + /** + * The units in which the metric value is reported. It is only applicable + * if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The `unit` + * defines the representation of the stored metric values. + * + * Generated from protobuf field string unit = 8; + * @param string $var + * @return $this + */ + public function setUnit($var) + { + GPBUtil::checkString($var, True); + $this->unit = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/TimeSeriesData.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/TimeSeriesData.php new file mode 100644 index 000000000000..4c91cd6c80ab --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/TimeSeriesData.php @@ -0,0 +1,114 @@ +google.monitoring.v3.TimeSeriesData + */ +class TimeSeriesData extends \Google\Protobuf\Internal\Message +{ + /** + * The values of the labels in the time series identifier, given in the same + * order as the `label_descriptors` field of the TimeSeriesDescriptor + * associated with this object. Each value must have a value of the type + * given in the corresponding entry of `label_descriptors`. + * + * Generated from protobuf field repeated .google.monitoring.v3.LabelValue label_values = 1; + */ + private $label_values; + /** + * The points in the time series. + * + * Generated from protobuf field repeated .google.monitoring.v3.TimeSeriesData.PointData point_data = 2; + */ + private $point_data; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Monitoring\V3\LabelValue>|\Google\Protobuf\Internal\RepeatedField $label_values + * The values of the labels in the time series identifier, given in the same + * order as the `label_descriptors` field of the TimeSeriesDescriptor + * associated with this object. Each value must have a value of the type + * given in the corresponding entry of `label_descriptors`. + * @type array<\Google\Cloud\Monitoring\V3\TimeSeriesData\PointData>|\Google\Protobuf\Internal\RepeatedField $point_data + * The points in the time series. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\Metric::initOnce(); + parent::__construct($data); + } + + /** + * The values of the labels in the time series identifier, given in the same + * order as the `label_descriptors` field of the TimeSeriesDescriptor + * associated with this object. Each value must have a value of the type + * given in the corresponding entry of `label_descriptors`. + * + * Generated from protobuf field repeated .google.monitoring.v3.LabelValue label_values = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getLabelValues() + { + return $this->label_values; + } + + /** + * The values of the labels in the time series identifier, given in the same + * order as the `label_descriptors` field of the TimeSeriesDescriptor + * associated with this object. Each value must have a value of the type + * given in the corresponding entry of `label_descriptors`. + * + * Generated from protobuf field repeated .google.monitoring.v3.LabelValue label_values = 1; + * @param array<\Google\Cloud\Monitoring\V3\LabelValue>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setLabelValues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Monitoring\V3\LabelValue::class); + $this->label_values = $arr; + + return $this; + } + + /** + * The points in the time series. + * + * Generated from protobuf field repeated .google.monitoring.v3.TimeSeriesData.PointData point_data = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPointData() + { + return $this->point_data; + } + + /** + * The points in the time series. + * + * Generated from protobuf field repeated .google.monitoring.v3.TimeSeriesData.PointData point_data = 2; + * @param array<\Google\Cloud\Monitoring\V3\TimeSeriesData\PointData>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPointData($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Monitoring\V3\TimeSeriesData\PointData::class); + $this->point_data = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/TimeSeriesData/PointData.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/TimeSeriesData/PointData.php new file mode 100644 index 000000000000..9aa86421aa77 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/TimeSeriesData/PointData.php @@ -0,0 +1,116 @@ +google.monitoring.v3.TimeSeriesData.PointData + */ +class PointData extends \Google\Protobuf\Internal\Message +{ + /** + * The values that make up the point. + * + * Generated from protobuf field repeated .google.monitoring.v3.TypedValue values = 1; + */ + private $values; + /** + * The time interval associated with the point. + * + * Generated from protobuf field .google.monitoring.v3.TimeInterval time_interval = 2; + */ + protected $time_interval = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Monitoring\V3\TypedValue>|\Google\Protobuf\Internal\RepeatedField $values + * The values that make up the point. + * @type \Google\Cloud\Monitoring\V3\TimeInterval $time_interval + * The time interval associated with the point. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\Metric::initOnce(); + parent::__construct($data); + } + + /** + * The values that make up the point. + * + * Generated from protobuf field repeated .google.monitoring.v3.TypedValue values = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getValues() + { + return $this->values; + } + + /** + * The values that make up the point. + * + * Generated from protobuf field repeated .google.monitoring.v3.TypedValue values = 1; + * @param array<\Google\Cloud\Monitoring\V3\TypedValue>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setValues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Monitoring\V3\TypedValue::class); + $this->values = $arr; + + return $this; + } + + /** + * The time interval associated with the point. + * + * Generated from protobuf field .google.monitoring.v3.TimeInterval time_interval = 2; + * @return \Google\Cloud\Monitoring\V3\TimeInterval|null + */ + public function getTimeInterval() + { + return $this->time_interval; + } + + public function hasTimeInterval() + { + return isset($this->time_interval); + } + + public function clearTimeInterval() + { + unset($this->time_interval); + } + + /** + * The time interval associated with the point. + * + * Generated from protobuf field .google.monitoring.v3.TimeInterval time_interval = 2; + * @param \Google\Cloud\Monitoring\V3\TimeInterval $var + * @return $this + */ + public function setTimeInterval($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\TimeInterval::class); + $this->time_interval = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(PointData::class, \Google\Cloud\Monitoring\V3\TimeSeriesData_PointData::class); + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/TimeSeriesDescriptor.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/TimeSeriesDescriptor.php new file mode 100644 index 000000000000..ec714c4abc24 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/TimeSeriesDescriptor.php @@ -0,0 +1,101 @@ +google.monitoring.v3.TimeSeriesDescriptor + */ +class TimeSeriesDescriptor extends \Google\Protobuf\Internal\Message +{ + /** + * Descriptors for the labels. + * + * Generated from protobuf field repeated .google.api.LabelDescriptor label_descriptors = 1; + */ + private $label_descriptors; + /** + * Descriptors for the point data value columns. + * + * Generated from protobuf field repeated .google.monitoring.v3.TimeSeriesDescriptor.ValueDescriptor point_descriptors = 5; + */ + private $point_descriptors; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Api\LabelDescriptor>|\Google\Protobuf\Internal\RepeatedField $label_descriptors + * Descriptors for the labels. + * @type array<\Google\Cloud\Monitoring\V3\TimeSeriesDescriptor\ValueDescriptor>|\Google\Protobuf\Internal\RepeatedField $point_descriptors + * Descriptors for the point data value columns. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\Metric::initOnce(); + parent::__construct($data); + } + + /** + * Descriptors for the labels. + * + * Generated from protobuf field repeated .google.api.LabelDescriptor label_descriptors = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getLabelDescriptors() + { + return $this->label_descriptors; + } + + /** + * Descriptors for the labels. + * + * Generated from protobuf field repeated .google.api.LabelDescriptor label_descriptors = 1; + * @param array<\Google\Api\LabelDescriptor>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setLabelDescriptors($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Api\LabelDescriptor::class); + $this->label_descriptors = $arr; + + return $this; + } + + /** + * Descriptors for the point data value columns. + * + * Generated from protobuf field repeated .google.monitoring.v3.TimeSeriesDescriptor.ValueDescriptor point_descriptors = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPointDescriptors() + { + return $this->point_descriptors; + } + + /** + * Descriptors for the point data value columns. + * + * Generated from protobuf field repeated .google.monitoring.v3.TimeSeriesDescriptor.ValueDescriptor point_descriptors = 5; + * @param array<\Google\Cloud\Monitoring\V3\TimeSeriesDescriptor\ValueDescriptor>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPointDescriptors($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Monitoring\V3\TimeSeriesDescriptor\ValueDescriptor::class); + $this->point_descriptors = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/TimeSeriesDescriptor/ValueDescriptor.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/TimeSeriesDescriptor/ValueDescriptor.php new file mode 100644 index 000000000000..ac5dbc3a79e6 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/TimeSeriesDescriptor/ValueDescriptor.php @@ -0,0 +1,184 @@ +google.monitoring.v3.TimeSeriesDescriptor.ValueDescriptor + */ +class ValueDescriptor extends \Google\Protobuf\Internal\Message +{ + /** + * The value key. + * + * Generated from protobuf field string key = 1; + */ + protected $key = ''; + /** + * The value type. + * + * Generated from protobuf field .google.api.MetricDescriptor.ValueType value_type = 2; + */ + protected $value_type = 0; + /** + * The value stream kind. + * + * Generated from protobuf field .google.api.MetricDescriptor.MetricKind metric_kind = 3; + */ + protected $metric_kind = 0; + /** + * The unit in which `time_series` point values are reported. `unit` + * follows the UCUM format for units as seen in + * https://unitsofmeasure.org/ucum.html. + * `unit` is only valid if `value_type` is INTEGER, DOUBLE, DISTRIBUTION. + * + * Generated from protobuf field string unit = 4; + */ + protected $unit = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $key + * The value key. + * @type int $value_type + * The value type. + * @type int $metric_kind + * The value stream kind. + * @type string $unit + * The unit in which `time_series` point values are reported. `unit` + * follows the UCUM format for units as seen in + * https://unitsofmeasure.org/ucum.html. + * `unit` is only valid if `value_type` is INTEGER, DOUBLE, DISTRIBUTION. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\Metric::initOnce(); + parent::__construct($data); + } + + /** + * The value key. + * + * Generated from protobuf field string key = 1; + * @return string + */ + public function getKey() + { + return $this->key; + } + + /** + * The value key. + * + * Generated from protobuf field string key = 1; + * @param string $var + * @return $this + */ + public function setKey($var) + { + GPBUtil::checkString($var, True); + $this->key = $var; + + return $this; + } + + /** + * The value type. + * + * Generated from protobuf field .google.api.MetricDescriptor.ValueType value_type = 2; + * @return int + */ + public function getValueType() + { + return $this->value_type; + } + + /** + * The value type. + * + * Generated from protobuf field .google.api.MetricDescriptor.ValueType value_type = 2; + * @param int $var + * @return $this + */ + public function setValueType($var) + { + GPBUtil::checkEnum($var, \Google\Api\MetricDescriptor\ValueType::class); + $this->value_type = $var; + + return $this; + } + + /** + * The value stream kind. + * + * Generated from protobuf field .google.api.MetricDescriptor.MetricKind metric_kind = 3; + * @return int + */ + public function getMetricKind() + { + return $this->metric_kind; + } + + /** + * The value stream kind. + * + * Generated from protobuf field .google.api.MetricDescriptor.MetricKind metric_kind = 3; + * @param int $var + * @return $this + */ + public function setMetricKind($var) + { + GPBUtil::checkEnum($var, \Google\Api\MetricDescriptor\MetricKind::class); + $this->metric_kind = $var; + + return $this; + } + + /** + * The unit in which `time_series` point values are reported. `unit` + * follows the UCUM format for units as seen in + * https://unitsofmeasure.org/ucum.html. + * `unit` is only valid if `value_type` is INTEGER, DOUBLE, DISTRIBUTION. + * + * Generated from protobuf field string unit = 4; + * @return string + */ + public function getUnit() + { + return $this->unit; + } + + /** + * The unit in which `time_series` point values are reported. `unit` + * follows the UCUM format for units as seen in + * https://unitsofmeasure.org/ucum.html. + * `unit` is only valid if `value_type` is INTEGER, DOUBLE, DISTRIBUTION. + * + * Generated from protobuf field string unit = 4; + * @param string $var + * @return $this + */ + public function setUnit($var) + { + GPBUtil::checkString($var, True); + $this->unit = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ValueDescriptor::class, \Google\Cloud\Monitoring\V3\TimeSeriesDescriptor_ValueDescriptor::class); + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/TimeSeriesRatio.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/TimeSeriesRatio.php new file mode 100644 index 000000000000..bbd4edb9bac9 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/TimeSeriesRatio.php @@ -0,0 +1,180 @@ +google.monitoring.v3.TimeSeriesRatio + */ +class TimeSeriesRatio extends \Google\Protobuf\Internal\Message +{ + /** + * A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) + * specifying a `TimeSeries` quantifying good service provided. Must have + * `ValueType = DOUBLE` or `ValueType = INT64` and must have `MetricKind = + * DELTA` or `MetricKind = CUMULATIVE`. + * + * Generated from protobuf field string good_service_filter = 4; + */ + protected $good_service_filter = ''; + /** + * A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) + * specifying a `TimeSeries` quantifying bad service, either demanded service + * that was not provided or demanded service that was of inadequate quality. + * Must have `ValueType = DOUBLE` or `ValueType = INT64` and must have + * `MetricKind = DELTA` or `MetricKind = CUMULATIVE`. + * + * Generated from protobuf field string bad_service_filter = 5; + */ + protected $bad_service_filter = ''; + /** + * A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) + * specifying a `TimeSeries` quantifying total demanded service. Must have + * `ValueType = DOUBLE` or `ValueType = INT64` and must have `MetricKind = + * DELTA` or `MetricKind = CUMULATIVE`. + * + * Generated from protobuf field string total_service_filter = 6; + */ + protected $total_service_filter = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $good_service_filter + * A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) + * specifying a `TimeSeries` quantifying good service provided. Must have + * `ValueType = DOUBLE` or `ValueType = INT64` and must have `MetricKind = + * DELTA` or `MetricKind = CUMULATIVE`. + * @type string $bad_service_filter + * A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) + * specifying a `TimeSeries` quantifying bad service, either demanded service + * that was not provided or demanded service that was of inadequate quality. + * Must have `ValueType = DOUBLE` or `ValueType = INT64` and must have + * `MetricKind = DELTA` or `MetricKind = CUMULATIVE`. + * @type string $total_service_filter + * A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) + * specifying a `TimeSeries` quantifying total demanded service. Must have + * `ValueType = DOUBLE` or `ValueType = INT64` and must have `MetricKind = + * DELTA` or `MetricKind = CUMULATIVE`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\Service::initOnce(); + parent::__construct($data); + } + + /** + * A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) + * specifying a `TimeSeries` quantifying good service provided. Must have + * `ValueType = DOUBLE` or `ValueType = INT64` and must have `MetricKind = + * DELTA` or `MetricKind = CUMULATIVE`. + * + * Generated from protobuf field string good_service_filter = 4; + * @return string + */ + public function getGoodServiceFilter() + { + return $this->good_service_filter; + } + + /** + * A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) + * specifying a `TimeSeries` quantifying good service provided. Must have + * `ValueType = DOUBLE` or `ValueType = INT64` and must have `MetricKind = + * DELTA` or `MetricKind = CUMULATIVE`. + * + * Generated from protobuf field string good_service_filter = 4; + * @param string $var + * @return $this + */ + public function setGoodServiceFilter($var) + { + GPBUtil::checkString($var, True); + $this->good_service_filter = $var; + + return $this; + } + + /** + * A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) + * specifying a `TimeSeries` quantifying bad service, either demanded service + * that was not provided or demanded service that was of inadequate quality. + * Must have `ValueType = DOUBLE` or `ValueType = INT64` and must have + * `MetricKind = DELTA` or `MetricKind = CUMULATIVE`. + * + * Generated from protobuf field string bad_service_filter = 5; + * @return string + */ + public function getBadServiceFilter() + { + return $this->bad_service_filter; + } + + /** + * A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) + * specifying a `TimeSeries` quantifying bad service, either demanded service + * that was not provided or demanded service that was of inadequate quality. + * Must have `ValueType = DOUBLE` or `ValueType = INT64` and must have + * `MetricKind = DELTA` or `MetricKind = CUMULATIVE`. + * + * Generated from protobuf field string bad_service_filter = 5; + * @param string $var + * @return $this + */ + public function setBadServiceFilter($var) + { + GPBUtil::checkString($var, True); + $this->bad_service_filter = $var; + + return $this; + } + + /** + * A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) + * specifying a `TimeSeries` quantifying total demanded service. Must have + * `ValueType = DOUBLE` or `ValueType = INT64` and must have `MetricKind = + * DELTA` or `MetricKind = CUMULATIVE`. + * + * Generated from protobuf field string total_service_filter = 6; + * @return string + */ + public function getTotalServiceFilter() + { + return $this->total_service_filter; + } + + /** + * A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) + * specifying a `TimeSeries` quantifying total demanded service. Must have + * `ValueType = DOUBLE` or `ValueType = INT64` and must have `MetricKind = + * DELTA` or `MetricKind = CUMULATIVE`. + * + * Generated from protobuf field string total_service_filter = 6; + * @param string $var + * @return $this + */ + public function setTotalServiceFilter($var) + { + GPBUtil::checkString($var, True); + $this->total_service_filter = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/TypedValue.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/TypedValue.php new file mode 100644 index 000000000000..866bd8da0167 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/TypedValue.php @@ -0,0 +1,213 @@ +google.monitoring.v3.TypedValue + */ +class TypedValue extends \Google\Protobuf\Internal\Message +{ + protected $value; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $bool_value + * A Boolean value: `true` or `false`. + * @type int|string $int64_value + * A 64-bit integer. Its range is approximately ±9.2x1018. + * @type float $double_value + * A 64-bit double-precision floating-point number. Its magnitude + * is approximately ±10±300 and it has 16 + * significant digits of precision. + * @type string $string_value + * A variable-length string value. + * @type \Google\Api\Distribution $distribution_value + * A distribution value. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\Common::initOnce(); + parent::__construct($data); + } + + /** + * A Boolean value: `true` or `false`. + * + * Generated from protobuf field bool bool_value = 1; + * @return bool + */ + public function getBoolValue() + { + return $this->readOneof(1); + } + + public function hasBoolValue() + { + return $this->hasOneof(1); + } + + /** + * A Boolean value: `true` or `false`. + * + * Generated from protobuf field bool bool_value = 1; + * @param bool $var + * @return $this + */ + public function setBoolValue($var) + { + GPBUtil::checkBool($var); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * A 64-bit integer. Its range is approximately ±9.2x1018. + * + * Generated from protobuf field int64 int64_value = 2; + * @return int|string + */ + public function getInt64Value() + { + return $this->readOneof(2); + } + + public function hasInt64Value() + { + return $this->hasOneof(2); + } + + /** + * A 64-bit integer. Its range is approximately ±9.2x1018. + * + * Generated from protobuf field int64 int64_value = 2; + * @param int|string $var + * @return $this + */ + public function setInt64Value($var) + { + GPBUtil::checkInt64($var); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * A 64-bit double-precision floating-point number. Its magnitude + * is approximately ±10±300 and it has 16 + * significant digits of precision. + * + * Generated from protobuf field double double_value = 3; + * @return float + */ + public function getDoubleValue() + { + return $this->readOneof(3); + } + + public function hasDoubleValue() + { + return $this->hasOneof(3); + } + + /** + * A 64-bit double-precision floating-point number. Its magnitude + * is approximately ±10±300 and it has 16 + * significant digits of precision. + * + * Generated from protobuf field double double_value = 3; + * @param float $var + * @return $this + */ + public function setDoubleValue($var) + { + GPBUtil::checkDouble($var); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * A variable-length string value. + * + * Generated from protobuf field string string_value = 4; + * @return string + */ + public function getStringValue() + { + return $this->readOneof(4); + } + + public function hasStringValue() + { + return $this->hasOneof(4); + } + + /** + * A variable-length string value. + * + * Generated from protobuf field string string_value = 4; + * @param string $var + * @return $this + */ + public function setStringValue($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * A distribution value. + * + * Generated from protobuf field .google.api.Distribution distribution_value = 5; + * @return \Google\Api\Distribution|null + */ + public function getDistributionValue() + { + return $this->readOneof(5); + } + + public function hasDistributionValue() + { + return $this->hasOneof(5); + } + + /** + * A distribution value. + * + * Generated from protobuf field .google.api.Distribution distribution_value = 5; + * @param \Google\Api\Distribution $var + * @return $this + */ + public function setDistributionValue($var) + { + GPBUtil::checkMessage($var, \Google\Api\Distribution::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * @return string + */ + public function getValue() + { + return $this->whichOneof("value"); + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UpdateAlertPolicyRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UpdateAlertPolicyRequest.php new file mode 100644 index 000000000000..4891765d0252 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UpdateAlertPolicyRequest.php @@ -0,0 +1,239 @@ +google.monitoring.v3.UpdateAlertPolicyRequest + */ +class UpdateAlertPolicyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. A list of alerting policy field names. If this field is not + * empty, each listed field in the existing alerting policy is set to the + * value of the corresponding field in the supplied policy (`alert_policy`), + * or to the field's default value if the field is not in the supplied + * alerting policy. Fields not listed retain their previous value. + * Examples of valid field masks include `display_name`, `documentation`, + * `documentation.content`, `documentation.mime_type`, `user_labels`, + * `user_label.nameofkey`, `enabled`, `conditions`, `combiner`, etc. + * If this field is empty, then the supplied alerting policy replaces the + * existing policy. It is the same as deleting the existing policy and + * adding the supplied policy, except for the following: + * + The new policy will have the same `[ALERT_POLICY_ID]` as the former + * policy. This gives you continuity with the former policy in your + * notifications and incidents. + * + Conditions in the new policy will keep their former `[CONDITION_ID]` if + * the supplied condition includes the `name` field with that + * `[CONDITION_ID]`. If the supplied condition omits the `name` field, + * then a new `[CONDITION_ID]` is created. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $update_mask = null; + /** + * Required. The updated alerting policy or the updated values for the + * fields listed in `update_mask`. + * If `update_mask` is not empty, any fields in this policy that are + * not in `update_mask` are ignored. + * + * Generated from protobuf field .google.monitoring.v3.AlertPolicy alert_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $alert_policy = null; + + /** + * @param \Google\Protobuf\FieldMask $updateMask Optional. A list of alerting policy field names. If this field is not + * empty, each listed field in the existing alerting policy is set to the + * value of the corresponding field in the supplied policy (`alert_policy`), + * or to the field's default value if the field is not in the supplied + * alerting policy. Fields not listed retain their previous value. + * + * Examples of valid field masks include `display_name`, `documentation`, + * `documentation.content`, `documentation.mime_type`, `user_labels`, + * `user_label.nameofkey`, `enabled`, `conditions`, `combiner`, etc. + * + * If this field is empty, then the supplied alerting policy replaces the + * existing policy. It is the same as deleting the existing policy and + * adding the supplied policy, except for the following: + * + * + The new policy will have the same `[ALERT_POLICY_ID]` as the former + * policy. This gives you continuity with the former policy in your + * notifications and incidents. + * + Conditions in the new policy will keep their former `[CONDITION_ID]` if + * the supplied condition includes the `name` field with that + * `[CONDITION_ID]`. If the supplied condition omits the `name` field, + * then a new `[CONDITION_ID]` is created. + * @param \Google\Cloud\Monitoring\V3\AlertPolicy $alertPolicy Required. The updated alerting policy or the updated values for the + * fields listed in `update_mask`. + * If `update_mask` is not empty, any fields in this policy that are + * not in `update_mask` are ignored. + * + * @return \Google\Cloud\Monitoring\V3\UpdateAlertPolicyRequest + * + * @experimental + */ + public static function build(\Google\Protobuf\FieldMask $updateMask, \Google\Cloud\Monitoring\V3\AlertPolicy $alertPolicy): self + { + return (new self()) + ->setUpdateMask($updateMask) + ->setAlertPolicy($alertPolicy); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Optional. A list of alerting policy field names. If this field is not + * empty, each listed field in the existing alerting policy is set to the + * value of the corresponding field in the supplied policy (`alert_policy`), + * or to the field's default value if the field is not in the supplied + * alerting policy. Fields not listed retain their previous value. + * Examples of valid field masks include `display_name`, `documentation`, + * `documentation.content`, `documentation.mime_type`, `user_labels`, + * `user_label.nameofkey`, `enabled`, `conditions`, `combiner`, etc. + * If this field is empty, then the supplied alerting policy replaces the + * existing policy. It is the same as deleting the existing policy and + * adding the supplied policy, except for the following: + * + The new policy will have the same `[ALERT_POLICY_ID]` as the former + * policy. This gives you continuity with the former policy in your + * notifications and incidents. + * + Conditions in the new policy will keep their former `[CONDITION_ID]` if + * the supplied condition includes the `name` field with that + * `[CONDITION_ID]`. If the supplied condition omits the `name` field, + * then a new `[CONDITION_ID]` is created. + * @type \Google\Cloud\Monitoring\V3\AlertPolicy $alert_policy + * Required. The updated alerting policy or the updated values for the + * fields listed in `update_mask`. + * If `update_mask` is not empty, any fields in this policy that are + * not in `update_mask` are ignored. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\AlertService::initOnce(); + parent::__construct($data); + } + + /** + * Optional. A list of alerting policy field names. If this field is not + * empty, each listed field in the existing alerting policy is set to the + * value of the corresponding field in the supplied policy (`alert_policy`), + * or to the field's default value if the field is not in the supplied + * alerting policy. Fields not listed retain their previous value. + * Examples of valid field masks include `display_name`, `documentation`, + * `documentation.content`, `documentation.mime_type`, `user_labels`, + * `user_label.nameofkey`, `enabled`, `conditions`, `combiner`, etc. + * If this field is empty, then the supplied alerting policy replaces the + * existing policy. It is the same as deleting the existing policy and + * adding the supplied policy, except for the following: + * + The new policy will have the same `[ALERT_POLICY_ID]` as the former + * policy. This gives you continuity with the former policy in your + * notifications and incidents. + * + Conditions in the new policy will keep their former `[CONDITION_ID]` if + * the supplied condition includes the `name` field with that + * `[CONDITION_ID]`. If the supplied condition omits the `name` field, + * then a new `[CONDITION_ID]` is created. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Optional. A list of alerting policy field names. If this field is not + * empty, each listed field in the existing alerting policy is set to the + * value of the corresponding field in the supplied policy (`alert_policy`), + * or to the field's default value if the field is not in the supplied + * alerting policy. Fields not listed retain their previous value. + * Examples of valid field masks include `display_name`, `documentation`, + * `documentation.content`, `documentation.mime_type`, `user_labels`, + * `user_label.nameofkey`, `enabled`, `conditions`, `combiner`, etc. + * If this field is empty, then the supplied alerting policy replaces the + * existing policy. It is the same as deleting the existing policy and + * adding the supplied policy, except for the following: + * + The new policy will have the same `[ALERT_POLICY_ID]` as the former + * policy. This gives you continuity with the former policy in your + * notifications and incidents. + * + Conditions in the new policy will keep their former `[CONDITION_ID]` if + * the supplied condition includes the `name` field with that + * `[CONDITION_ID]`. If the supplied condition omits the `name` field, + * then a new `[CONDITION_ID]` is created. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Required. The updated alerting policy or the updated values for the + * fields listed in `update_mask`. + * If `update_mask` is not empty, any fields in this policy that are + * not in `update_mask` are ignored. + * + * Generated from protobuf field .google.monitoring.v3.AlertPolicy alert_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Monitoring\V3\AlertPolicy|null + */ + public function getAlertPolicy() + { + return $this->alert_policy; + } + + public function hasAlertPolicy() + { + return isset($this->alert_policy); + } + + public function clearAlertPolicy() + { + unset($this->alert_policy); + } + + /** + * Required. The updated alerting policy or the updated values for the + * fields listed in `update_mask`. + * If `update_mask` is not empty, any fields in this policy that are + * not in `update_mask` are ignored. + * + * Generated from protobuf field .google.monitoring.v3.AlertPolicy alert_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Monitoring\V3\AlertPolicy $var + * @return $this + */ + public function setAlertPolicy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\AlertPolicy::class); + $this->alert_policy = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UpdateGroupRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UpdateGroupRequest.php new file mode 100644 index 000000000000..1acaca5a69df --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UpdateGroupRequest.php @@ -0,0 +1,134 @@ +google.monitoring.v3.UpdateGroupRequest + */ +class UpdateGroupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The new definition of the group. All fields of the existing + * group, excepting `name`, are replaced with the corresponding fields of this + * group. + * + * Generated from protobuf field .google.monitoring.v3.Group group = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $group = null; + /** + * If true, validate this request but do not update the existing group. + * + * Generated from protobuf field bool validate_only = 3; + */ + protected $validate_only = false; + + /** + * @param \Google\Cloud\Monitoring\V3\Group $group Required. The new definition of the group. All fields of the existing + * group, excepting `name`, are replaced with the corresponding fields of this + * group. + * + * @return \Google\Cloud\Monitoring\V3\UpdateGroupRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Monitoring\V3\Group $group): self + { + return (new self()) + ->setGroup($group); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Monitoring\V3\Group $group + * Required. The new definition of the group. All fields of the existing + * group, excepting `name`, are replaced with the corresponding fields of this + * group. + * @type bool $validate_only + * If true, validate this request but do not update the existing group. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\GroupService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The new definition of the group. All fields of the existing + * group, excepting `name`, are replaced with the corresponding fields of this + * group. + * + * Generated from protobuf field .google.monitoring.v3.Group group = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Monitoring\V3\Group|null + */ + public function getGroup() + { + return $this->group; + } + + public function hasGroup() + { + return isset($this->group); + } + + public function clearGroup() + { + unset($this->group); + } + + /** + * Required. The new definition of the group. All fields of the existing + * group, excepting `name`, are replaced with the corresponding fields of this + * group. + * + * Generated from protobuf field .google.monitoring.v3.Group group = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Monitoring\V3\Group $var + * @return $this + */ + public function setGroup($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\Group::class); + $this->group = $var; + + return $this; + } + + /** + * If true, validate this request but do not update the existing group. + * + * Generated from protobuf field bool validate_only = 3; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * If true, validate this request but do not update the existing group. + * + * Generated from protobuf field bool validate_only = 3; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UpdateNotificationChannelRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UpdateNotificationChannelRequest.php new file mode 100644 index 000000000000..d66db070896e --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UpdateNotificationChannelRequest.php @@ -0,0 +1,151 @@ +google.monitoring.v3.UpdateNotificationChannelRequest + */ +class UpdateNotificationChannelRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The fields to update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $update_mask = null; + /** + * Required. A description of the changes to be applied to the specified + * notification channel. The description must provide a definition for + * fields to be updated; the names of these fields should also be + * included in the `update_mask`. + * + * Generated from protobuf field .google.monitoring.v3.NotificationChannel notification_channel = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $notification_channel = null; + + /** + * @param \Google\Protobuf\FieldMask $updateMask Optional. The fields to update. + * @param \Google\Cloud\Monitoring\V3\NotificationChannel $notificationChannel Required. A description of the changes to be applied to the specified + * notification channel. The description must provide a definition for + * fields to be updated; the names of these fields should also be + * included in the `update_mask`. + * + * @return \Google\Cloud\Monitoring\V3\UpdateNotificationChannelRequest + * + * @experimental + */ + public static function build(\Google\Protobuf\FieldMask $updateMask, \Google\Cloud\Monitoring\V3\NotificationChannel $notificationChannel): self + { + return (new self()) + ->setUpdateMask($updateMask) + ->setNotificationChannel($notificationChannel); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Optional. The fields to update. + * @type \Google\Cloud\Monitoring\V3\NotificationChannel $notification_channel + * Required. A description of the changes to be applied to the specified + * notification channel. The description must provide a definition for + * fields to be updated; the names of these fields should also be + * included in the `update_mask`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\NotificationService::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The fields to update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Optional. The fields to update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Required. A description of the changes to be applied to the specified + * notification channel. The description must provide a definition for + * fields to be updated; the names of these fields should also be + * included in the `update_mask`. + * + * Generated from protobuf field .google.monitoring.v3.NotificationChannel notification_channel = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Monitoring\V3\NotificationChannel|null + */ + public function getNotificationChannel() + { + return $this->notification_channel; + } + + public function hasNotificationChannel() + { + return isset($this->notification_channel); + } + + public function clearNotificationChannel() + { + unset($this->notification_channel); + } + + /** + * Required. A description of the changes to be applied to the specified + * notification channel. The description must provide a definition for + * fields to be updated; the names of these fields should also be + * included in the `update_mask`. + * + * Generated from protobuf field .google.monitoring.v3.NotificationChannel notification_channel = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Monitoring\V3\NotificationChannel $var + * @return $this + */ + public function setNotificationChannel($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\NotificationChannel::class); + $this->notification_channel = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UpdateServiceLevelObjectiveRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UpdateServiceLevelObjectiveRequest.php new file mode 100644 index 000000000000..c6521c3f2a33 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UpdateServiceLevelObjectiveRequest.php @@ -0,0 +1,139 @@ +google.monitoring.v3.UpdateServiceLevelObjectiveRequest + */ +class UpdateServiceLevelObjectiveRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The `ServiceLevelObjective` to draw updates from. + * The given `name` specifies the resource to update. + * + * Generated from protobuf field .google.monitoring.v3.ServiceLevelObjective service_level_objective = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $service_level_objective = null; + /** + * A set of field paths defining which fields to use for the update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\Monitoring\V3\ServiceLevelObjective $serviceLevelObjective Required. The `ServiceLevelObjective` to draw updates from. + * The given `name` specifies the resource to update. + * + * @return \Google\Cloud\Monitoring\V3\UpdateServiceLevelObjectiveRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Monitoring\V3\ServiceLevelObjective $serviceLevelObjective): self + { + return (new self()) + ->setServiceLevelObjective($serviceLevelObjective); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Monitoring\V3\ServiceLevelObjective $service_level_objective + * Required. The `ServiceLevelObjective` to draw updates from. + * The given `name` specifies the resource to update. + * @type \Google\Protobuf\FieldMask $update_mask + * A set of field paths defining which fields to use for the update. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\ServiceService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The `ServiceLevelObjective` to draw updates from. + * The given `name` specifies the resource to update. + * + * Generated from protobuf field .google.monitoring.v3.ServiceLevelObjective service_level_objective = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Monitoring\V3\ServiceLevelObjective|null + */ + public function getServiceLevelObjective() + { + return $this->service_level_objective; + } + + public function hasServiceLevelObjective() + { + return isset($this->service_level_objective); + } + + public function clearServiceLevelObjective() + { + unset($this->service_level_objective); + } + + /** + * Required. The `ServiceLevelObjective` to draw updates from. + * The given `name` specifies the resource to update. + * + * Generated from protobuf field .google.monitoring.v3.ServiceLevelObjective service_level_objective = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Monitoring\V3\ServiceLevelObjective $var + * @return $this + */ + public function setServiceLevelObjective($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\ServiceLevelObjective::class); + $this->service_level_objective = $var; + + return $this; + } + + /** + * A set of field paths defining which fields to use for the update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * A set of field paths defining which fields to use for the update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UpdateServiceRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UpdateServiceRequest.php new file mode 100644 index 000000000000..c672ae081a8d --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UpdateServiceRequest.php @@ -0,0 +1,139 @@ +google.monitoring.v3.UpdateServiceRequest + */ +class UpdateServiceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The `Service` to draw updates from. + * The given `name` specifies the resource to update. + * + * Generated from protobuf field .google.monitoring.v3.Service service = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $service = null; + /** + * A set of field paths defining which fields to use for the update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\Monitoring\V3\Service $service Required. The `Service` to draw updates from. + * The given `name` specifies the resource to update. + * + * @return \Google\Cloud\Monitoring\V3\UpdateServiceRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Monitoring\V3\Service $service): self + { + return (new self()) + ->setService($service); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Monitoring\V3\Service $service + * Required. The `Service` to draw updates from. + * The given `name` specifies the resource to update. + * @type \Google\Protobuf\FieldMask $update_mask + * A set of field paths defining which fields to use for the update. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\ServiceService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The `Service` to draw updates from. + * The given `name` specifies the resource to update. + * + * Generated from protobuf field .google.monitoring.v3.Service service = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Monitoring\V3\Service|null + */ + public function getService() + { + return $this->service; + } + + public function hasService() + { + return isset($this->service); + } + + public function clearService() + { + unset($this->service); + } + + /** + * Required. The `Service` to draw updates from. + * The given `name` specifies the resource to update. + * + * Generated from protobuf field .google.monitoring.v3.Service service = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Monitoring\V3\Service $var + * @return $this + */ + public function setService($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\Service::class); + $this->service = $var; + + return $this; + } + + /** + * A set of field paths defining which fields to use for the update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * A set of field paths defining which fields to use for the update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UpdateSnoozeRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UpdateSnoozeRequest.php new file mode 100644 index 000000000000..d3091d8bda9b --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UpdateSnoozeRequest.php @@ -0,0 +1,227 @@ +google.monitoring.v3.UpdateSnoozeRequest + */ +class UpdateSnoozeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The `Snooze` to update. Must have the name field present. + * + * Generated from protobuf field .google.monitoring.v3.Snooze snooze = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $snooze = null; + /** + * Required. The fields to update. + * For each field listed in `update_mask`: + * * If the `Snooze` object supplied in the `UpdateSnoozeRequest` has a + * value for that field, the value of the field in the existing `Snooze` + * will be set to the value of the field in the supplied `Snooze`. + * * If the field does not have a value in the supplied `Snooze`, the field + * in the existing `Snooze` is set to its default value. + * Fields not listed retain their existing value. + * The following are the field names that are accepted in `update_mask`: + * * `display_name` + * * `interval.start_time` + * * `interval.end_time` + * That said, the start time and end time of the `Snooze` determines which + * fields can legally be updated. Before attempting an update, users should + * consult the documentation for `UpdateSnoozeRequest`, which talks about + * which fields can be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\Monitoring\V3\Snooze $snooze Required. The `Snooze` to update. Must have the name field present. + * @param \Google\Protobuf\FieldMask $updateMask Required. The fields to update. + * + * For each field listed in `update_mask`: + * + * * If the `Snooze` object supplied in the `UpdateSnoozeRequest` has a + * value for that field, the value of the field in the existing `Snooze` + * will be set to the value of the field in the supplied `Snooze`. + * * If the field does not have a value in the supplied `Snooze`, the field + * in the existing `Snooze` is set to its default value. + * + * Fields not listed retain their existing value. + * + * The following are the field names that are accepted in `update_mask`: + * + * * `display_name` + * * `interval.start_time` + * * `interval.end_time` + * + * That said, the start time and end time of the `Snooze` determines which + * fields can legally be updated. Before attempting an update, users should + * consult the documentation for `UpdateSnoozeRequest`, which talks about + * which fields can be updated. + * + * @return \Google\Cloud\Monitoring\V3\UpdateSnoozeRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Monitoring\V3\Snooze $snooze, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setSnooze($snooze) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Monitoring\V3\Snooze $snooze + * Required. The `Snooze` to update. Must have the name field present. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. The fields to update. + * For each field listed in `update_mask`: + * * If the `Snooze` object supplied in the `UpdateSnoozeRequest` has a + * value for that field, the value of the field in the existing `Snooze` + * will be set to the value of the field in the supplied `Snooze`. + * * If the field does not have a value in the supplied `Snooze`, the field + * in the existing `Snooze` is set to its default value. + * Fields not listed retain their existing value. + * The following are the field names that are accepted in `update_mask`: + * * `display_name` + * * `interval.start_time` + * * `interval.end_time` + * That said, the start time and end time of the `Snooze` determines which + * fields can legally be updated. Before attempting an update, users should + * consult the documentation for `UpdateSnoozeRequest`, which talks about + * which fields can be updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\SnoozeService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The `Snooze` to update. Must have the name field present. + * + * Generated from protobuf field .google.monitoring.v3.Snooze snooze = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Monitoring\V3\Snooze|null + */ + public function getSnooze() + { + return $this->snooze; + } + + public function hasSnooze() + { + return isset($this->snooze); + } + + public function clearSnooze() + { + unset($this->snooze); + } + + /** + * Required. The `Snooze` to update. Must have the name field present. + * + * Generated from protobuf field .google.monitoring.v3.Snooze snooze = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Monitoring\V3\Snooze $var + * @return $this + */ + public function setSnooze($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\Snooze::class); + $this->snooze = $var; + + return $this; + } + + /** + * Required. The fields to update. + * For each field listed in `update_mask`: + * * If the `Snooze` object supplied in the `UpdateSnoozeRequest` has a + * value for that field, the value of the field in the existing `Snooze` + * will be set to the value of the field in the supplied `Snooze`. + * * If the field does not have a value in the supplied `Snooze`, the field + * in the existing `Snooze` is set to its default value. + * Fields not listed retain their existing value. + * The following are the field names that are accepted in `update_mask`: + * * `display_name` + * * `interval.start_time` + * * `interval.end_time` + * That said, the start time and end time of the `Snooze` determines which + * fields can legally be updated. Before attempting an update, users should + * consult the documentation for `UpdateSnoozeRequest`, which talks about + * which fields can be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. The fields to update. + * For each field listed in `update_mask`: + * * If the `Snooze` object supplied in the `UpdateSnoozeRequest` has a + * value for that field, the value of the field in the existing `Snooze` + * will be set to the value of the field in the supplied `Snooze`. + * * If the field does not have a value in the supplied `Snooze`, the field + * in the existing `Snooze` is set to its default value. + * Fields not listed retain their existing value. + * The following are the field names that are accepted in `update_mask`: + * * `display_name` + * * `interval.start_time` + * * `interval.end_time` + * That said, the start time and end time of the `Snooze` determines which + * fields can legally be updated. Before attempting an update, users should + * consult the documentation for `UpdateSnoozeRequest`, which talks about + * which fields can be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UpdateUptimeCheckConfigRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UpdateUptimeCheckConfigRequest.php new file mode 100644 index 000000000000..151f44869152 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UpdateUptimeCheckConfigRequest.php @@ -0,0 +1,192 @@ +google.monitoring.v3.UpdateUptimeCheckConfigRequest + */ +class UpdateUptimeCheckConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. If present, only the listed fields in the current Uptime check + * configuration are updated with values from the new configuration. If this + * field is empty, then the current configuration is completely replaced with + * the new configuration. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + protected $update_mask = null; + /** + * Required. If an `updateMask` has been specified, this field gives + * the values for the set of fields mentioned in the `updateMask`. If an + * `updateMask` has not been given, this Uptime check configuration replaces + * the current configuration. If a field is mentioned in `updateMask` but + * the corresponding field is omitted in this partial Uptime check + * configuration, it has the effect of deleting/clearing the field from the + * configuration on the server. + * The following fields can be updated: `display_name`, + * `http_check`, `tcp_check`, `timeout`, `content_matchers`, and + * `selected_regions`. + * + * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig uptime_check_config = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $uptime_check_config = null; + + /** + * @param \Google\Cloud\Monitoring\V3\UptimeCheckConfig $uptimeCheckConfig Required. If an `updateMask` has been specified, this field gives + * the values for the set of fields mentioned in the `updateMask`. If an + * `updateMask` has not been given, this Uptime check configuration replaces + * the current configuration. If a field is mentioned in `updateMask` but + * the corresponding field is omitted in this partial Uptime check + * configuration, it has the effect of deleting/clearing the field from the + * configuration on the server. + * + * The following fields can be updated: `display_name`, + * `http_check`, `tcp_check`, `timeout`, `content_matchers`, and + * `selected_regions`. + * + * @return \Google\Cloud\Monitoring\V3\UpdateUptimeCheckConfigRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Monitoring\V3\UptimeCheckConfig $uptimeCheckConfig): self + { + return (new self()) + ->setUptimeCheckConfig($uptimeCheckConfig); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Optional. If present, only the listed fields in the current Uptime check + * configuration are updated with values from the new configuration. If this + * field is empty, then the current configuration is completely replaced with + * the new configuration. + * @type \Google\Cloud\Monitoring\V3\UptimeCheckConfig $uptime_check_config + * Required. If an `updateMask` has been specified, this field gives + * the values for the set of fields mentioned in the `updateMask`. If an + * `updateMask` has not been given, this Uptime check configuration replaces + * the current configuration. If a field is mentioned in `updateMask` but + * the corresponding field is omitted in this partial Uptime check + * configuration, it has the effect of deleting/clearing the field from the + * configuration on the server. + * The following fields can be updated: `display_name`, + * `http_check`, `tcp_check`, `timeout`, `content_matchers`, and + * `selected_regions`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\UptimeService::initOnce(); + parent::__construct($data); + } + + /** + * Optional. If present, only the listed fields in the current Uptime check + * configuration are updated with values from the new configuration. If this + * field is empty, then the current configuration is completely replaced with + * the new configuration. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Optional. If present, only the listed fields in the current Uptime check + * configuration are updated with values from the new configuration. If this + * field is empty, then the current configuration is completely replaced with + * the new configuration. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Required. If an `updateMask` has been specified, this field gives + * the values for the set of fields mentioned in the `updateMask`. If an + * `updateMask` has not been given, this Uptime check configuration replaces + * the current configuration. If a field is mentioned in `updateMask` but + * the corresponding field is omitted in this partial Uptime check + * configuration, it has the effect of deleting/clearing the field from the + * configuration on the server. + * The following fields can be updated: `display_name`, + * `http_check`, `tcp_check`, `timeout`, `content_matchers`, and + * `selected_regions`. + * + * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig uptime_check_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Monitoring\V3\UptimeCheckConfig|null + */ + public function getUptimeCheckConfig() + { + return $this->uptime_check_config; + } + + public function hasUptimeCheckConfig() + { + return isset($this->uptime_check_config); + } + + public function clearUptimeCheckConfig() + { + unset($this->uptime_check_config); + } + + /** + * Required. If an `updateMask` has been specified, this field gives + * the values for the set of fields mentioned in the `updateMask`. If an + * `updateMask` has not been given, this Uptime check configuration replaces + * the current configuration. If a field is mentioned in `updateMask` but + * the corresponding field is omitted in this partial Uptime check + * configuration, it has the effect of deleting/clearing the field from the + * configuration on the server. + * The following fields can be updated: `display_name`, + * `http_check`, `tcp_check`, `timeout`, `content_matchers`, and + * `selected_regions`. + * + * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig uptime_check_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Monitoring\V3\UptimeCheckConfig $var + * @return $this + */ + public function setUptimeCheckConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\UptimeCheckConfig::class); + $this->uptime_check_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig.php new file mode 100644 index 000000000000..8823604b32cb --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig.php @@ -0,0 +1,748 @@ +google.monitoring.v3.UptimeCheckConfig + */ +class UptimeCheckConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. A unique resource name for this Uptime check configuration. The + * format is: + * projects/[PROJECT_ID_OR_NUMBER]/uptimeCheckConfigs/[UPTIME_CHECK_ID] + * `[PROJECT_ID_OR_NUMBER]` is the Workspace host project associated with the + * Uptime check. + * This field should be omitted when creating the Uptime check configuration; + * on create, the resource name is assigned by the server and included in the + * response. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * A human-friendly name for the Uptime check configuration. The display name + * should be unique within a Cloud Monitoring Workspace in order to make it + * easier to identify; however, uniqueness is not enforced. Required. + * + * Generated from protobuf field string display_name = 2; + */ + protected $display_name = ''; + /** + * How often, in seconds, the Uptime check is performed. + * Currently, the only supported values are `60s` (1 minute), `300s` + * (5 minutes), `600s` (10 minutes), and `900s` (15 minutes). Optional, + * defaults to `60s`. + * + * Generated from protobuf field .google.protobuf.Duration period = 7; + */ + protected $period = null; + /** + * The maximum amount of time to wait for the request to complete (must be + * between 1 and 60 seconds). Required. + * + * Generated from protobuf field .google.protobuf.Duration timeout = 8; + */ + protected $timeout = null; + /** + * The content that is expected to appear in the data returned by the target + * server against which the check is run. Currently, only the first entry + * in the `content_matchers` list is supported, and additional entries will + * be ignored. This field is optional and should only be specified if a + * content match is required as part of the/ Uptime check. + * + * Generated from protobuf field repeated .google.monitoring.v3.UptimeCheckConfig.ContentMatcher content_matchers = 9; + */ + private $content_matchers; + /** + * The type of checkers to use to execute the Uptime check. + * + * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.CheckerType checker_type = 17; + */ + protected $checker_type = 0; + /** + * The list of regions from which the check will be run. + * Some regions contain one location, and others contain more than one. + * If this field is specified, enough regions must be provided to include a + * minimum of 3 locations. Not specifying this field will result in Uptime + * checks running from all available regions. + * + * Generated from protobuf field repeated .google.monitoring.v3.UptimeCheckRegion selected_regions = 10; + */ + private $selected_regions; + /** + * If this is `true`, then checks are made only from the 'internal_checkers'. + * If it is `false`, then checks are made only from the 'selected_regions'. + * It is an error to provide 'selected_regions' when is_internal is `true`, + * or to provide 'internal_checkers' when is_internal is `false`. + * + * Generated from protobuf field bool is_internal = 15 [deprecated = true]; + * @deprecated + */ + protected $is_internal = false; + /** + * The internal checkers that this check will egress from. If `is_internal` is + * `true` and this list is empty, the check will egress from all the + * InternalCheckers configured for the project that owns this + * `UptimeCheckConfig`. + * + * Generated from protobuf field repeated .google.monitoring.v3.InternalChecker internal_checkers = 14 [deprecated = true]; + * @deprecated + */ + private $internal_checkers; + /** + * User-supplied key/value data to be used for organizing and + * identifying the `UptimeCheckConfig` objects. + * The field can contain up to 64 entries. Each key and value is limited to + * 63 Unicode characters or 128 bytes, whichever is smaller. Labels and + * values can contain only lowercase letters, numerals, underscores, and + * dashes. Keys must begin with a letter. + * + * Generated from protobuf field map user_labels = 20; + */ + private $user_labels; + protected $resource; + protected $check_request_type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. A unique resource name for this Uptime check configuration. The + * format is: + * projects/[PROJECT_ID_OR_NUMBER]/uptimeCheckConfigs/[UPTIME_CHECK_ID] + * `[PROJECT_ID_OR_NUMBER]` is the Workspace host project associated with the + * Uptime check. + * This field should be omitted when creating the Uptime check configuration; + * on create, the resource name is assigned by the server and included in the + * response. + * @type string $display_name + * A human-friendly name for the Uptime check configuration. The display name + * should be unique within a Cloud Monitoring Workspace in order to make it + * easier to identify; however, uniqueness is not enforced. Required. + * @type \Google\Api\MonitoredResource $monitored_resource + * The [monitored + * resource](https://cloud.google.com/monitoring/api/resources) associated + * with the configuration. + * The following monitored resource types are valid for this field: + * `uptime_url`, + * `gce_instance`, + * `gae_app`, + * `aws_ec2_instance`, + * `aws_elb_load_balancer` + * `k8s_service` + * `servicedirectory_service` + * `cloud_run_revision` + * @type \Google\Cloud\Monitoring\V3\UptimeCheckConfig\ResourceGroup $resource_group + * The group resource associated with the configuration. + * @type \Google\Cloud\Monitoring\V3\SyntheticMonitorTarget $synthetic_monitor + * Specifies a Synthetic Monitor to invoke. + * @type \Google\Cloud\Monitoring\V3\UptimeCheckConfig\HttpCheck $http_check + * Contains information needed to make an HTTP or HTTPS check. + * @type \Google\Cloud\Monitoring\V3\UptimeCheckConfig\TcpCheck $tcp_check + * Contains information needed to make a TCP check. + * @type \Google\Protobuf\Duration $period + * How often, in seconds, the Uptime check is performed. + * Currently, the only supported values are `60s` (1 minute), `300s` + * (5 minutes), `600s` (10 minutes), and `900s` (15 minutes). Optional, + * defaults to `60s`. + * @type \Google\Protobuf\Duration $timeout + * The maximum amount of time to wait for the request to complete (must be + * between 1 and 60 seconds). Required. + * @type array<\Google\Cloud\Monitoring\V3\UptimeCheckConfig\ContentMatcher>|\Google\Protobuf\Internal\RepeatedField $content_matchers + * The content that is expected to appear in the data returned by the target + * server against which the check is run. Currently, only the first entry + * in the `content_matchers` list is supported, and additional entries will + * be ignored. This field is optional and should only be specified if a + * content match is required as part of the/ Uptime check. + * @type int $checker_type + * The type of checkers to use to execute the Uptime check. + * @type array|\Google\Protobuf\Internal\RepeatedField $selected_regions + * The list of regions from which the check will be run. + * Some regions contain one location, and others contain more than one. + * If this field is specified, enough regions must be provided to include a + * minimum of 3 locations. Not specifying this field will result in Uptime + * checks running from all available regions. + * @type bool $is_internal + * If this is `true`, then checks are made only from the 'internal_checkers'. + * If it is `false`, then checks are made only from the 'selected_regions'. + * It is an error to provide 'selected_regions' when is_internal is `true`, + * or to provide 'internal_checkers' when is_internal is `false`. + * @type array<\Google\Cloud\Monitoring\V3\InternalChecker>|\Google\Protobuf\Internal\RepeatedField $internal_checkers + * The internal checkers that this check will egress from. If `is_internal` is + * `true` and this list is empty, the check will egress from all the + * InternalCheckers configured for the project that owns this + * `UptimeCheckConfig`. + * @type array|\Google\Protobuf\Internal\MapField $user_labels + * User-supplied key/value data to be used for organizing and + * identifying the `UptimeCheckConfig` objects. + * The field can contain up to 64 entries. Each key and value is limited to + * 63 Unicode characters or 128 bytes, whichever is smaller. Labels and + * values can contain only lowercase letters, numerals, underscores, and + * dashes. Keys must begin with a letter. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\Uptime::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. A unique resource name for this Uptime check configuration. The + * format is: + * projects/[PROJECT_ID_OR_NUMBER]/uptimeCheckConfigs/[UPTIME_CHECK_ID] + * `[PROJECT_ID_OR_NUMBER]` is the Workspace host project associated with the + * Uptime check. + * This field should be omitted when creating the Uptime check configuration; + * on create, the resource name is assigned by the server and included in the + * response. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. A unique resource name for this Uptime check configuration. The + * format is: + * projects/[PROJECT_ID_OR_NUMBER]/uptimeCheckConfigs/[UPTIME_CHECK_ID] + * `[PROJECT_ID_OR_NUMBER]` is the Workspace host project associated with the + * Uptime check. + * This field should be omitted when creating the Uptime check configuration; + * on create, the resource name is assigned by the server and included in the + * response. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * A human-friendly name for the Uptime check configuration. The display name + * should be unique within a Cloud Monitoring Workspace in order to make it + * easier to identify; however, uniqueness is not enforced. Required. + * + * Generated from protobuf field string display_name = 2; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * A human-friendly name for the Uptime check configuration. The display name + * should be unique within a Cloud Monitoring Workspace in order to make it + * easier to identify; however, uniqueness is not enforced. Required. + * + * Generated from protobuf field string display_name = 2; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * The [monitored + * resource](https://cloud.google.com/monitoring/api/resources) associated + * with the configuration. + * The following monitored resource types are valid for this field: + * `uptime_url`, + * `gce_instance`, + * `gae_app`, + * `aws_ec2_instance`, + * `aws_elb_load_balancer` + * `k8s_service` + * `servicedirectory_service` + * `cloud_run_revision` + * + * Generated from protobuf field .google.api.MonitoredResource monitored_resource = 3; + * @return \Google\Api\MonitoredResource|null + */ + public function getMonitoredResource() + { + return $this->readOneof(3); + } + + public function hasMonitoredResource() + { + return $this->hasOneof(3); + } + + /** + * The [monitored + * resource](https://cloud.google.com/monitoring/api/resources) associated + * with the configuration. + * The following monitored resource types are valid for this field: + * `uptime_url`, + * `gce_instance`, + * `gae_app`, + * `aws_ec2_instance`, + * `aws_elb_load_balancer` + * `k8s_service` + * `servicedirectory_service` + * `cloud_run_revision` + * + * Generated from protobuf field .google.api.MonitoredResource monitored_resource = 3; + * @param \Google\Api\MonitoredResource $var + * @return $this + */ + public function setMonitoredResource($var) + { + GPBUtil::checkMessage($var, \Google\Api\MonitoredResource::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * The group resource associated with the configuration. + * + * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.ResourceGroup resource_group = 4; + * @return \Google\Cloud\Monitoring\V3\UptimeCheckConfig\ResourceGroup|null + */ + public function getResourceGroup() + { + return $this->readOneof(4); + } + + public function hasResourceGroup() + { + return $this->hasOneof(4); + } + + /** + * The group resource associated with the configuration. + * + * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.ResourceGroup resource_group = 4; + * @param \Google\Cloud\Monitoring\V3\UptimeCheckConfig\ResourceGroup $var + * @return $this + */ + public function setResourceGroup($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\UptimeCheckConfig\ResourceGroup::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Specifies a Synthetic Monitor to invoke. + * + * Generated from protobuf field .google.monitoring.v3.SyntheticMonitorTarget synthetic_monitor = 21; + * @return \Google\Cloud\Monitoring\V3\SyntheticMonitorTarget|null + */ + public function getSyntheticMonitor() + { + return $this->readOneof(21); + } + + public function hasSyntheticMonitor() + { + return $this->hasOneof(21); + } + + /** + * Specifies a Synthetic Monitor to invoke. + * + * Generated from protobuf field .google.monitoring.v3.SyntheticMonitorTarget synthetic_monitor = 21; + * @param \Google\Cloud\Monitoring\V3\SyntheticMonitorTarget $var + * @return $this + */ + public function setSyntheticMonitor($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\SyntheticMonitorTarget::class); + $this->writeOneof(21, $var); + + return $this; + } + + /** + * Contains information needed to make an HTTP or HTTPS check. + * + * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.HttpCheck http_check = 5; + * @return \Google\Cloud\Monitoring\V3\UptimeCheckConfig\HttpCheck|null + */ + public function getHttpCheck() + { + return $this->readOneof(5); + } + + public function hasHttpCheck() + { + return $this->hasOneof(5); + } + + /** + * Contains information needed to make an HTTP or HTTPS check. + * + * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.HttpCheck http_check = 5; + * @param \Google\Cloud\Monitoring\V3\UptimeCheckConfig\HttpCheck $var + * @return $this + */ + public function setHttpCheck($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\UptimeCheckConfig\HttpCheck::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Contains information needed to make a TCP check. + * + * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.TcpCheck tcp_check = 6; + * @return \Google\Cloud\Monitoring\V3\UptimeCheckConfig\TcpCheck|null + */ + public function getTcpCheck() + { + return $this->readOneof(6); + } + + public function hasTcpCheck() + { + return $this->hasOneof(6); + } + + /** + * Contains information needed to make a TCP check. + * + * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.TcpCheck tcp_check = 6; + * @param \Google\Cloud\Monitoring\V3\UptimeCheckConfig\TcpCheck $var + * @return $this + */ + public function setTcpCheck($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\UptimeCheckConfig\TcpCheck::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * How often, in seconds, the Uptime check is performed. + * Currently, the only supported values are `60s` (1 minute), `300s` + * (5 minutes), `600s` (10 minutes), and `900s` (15 minutes). Optional, + * defaults to `60s`. + * + * Generated from protobuf field .google.protobuf.Duration period = 7; + * @return \Google\Protobuf\Duration|null + */ + public function getPeriod() + { + return $this->period; + } + + public function hasPeriod() + { + return isset($this->period); + } + + public function clearPeriod() + { + unset($this->period); + } + + /** + * How often, in seconds, the Uptime check is performed. + * Currently, the only supported values are `60s` (1 minute), `300s` + * (5 minutes), `600s` (10 minutes), and `900s` (15 minutes). Optional, + * defaults to `60s`. + * + * Generated from protobuf field .google.protobuf.Duration period = 7; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setPeriod($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->period = $var; + + return $this; + } + + /** + * The maximum amount of time to wait for the request to complete (must be + * between 1 and 60 seconds). Required. + * + * Generated from protobuf field .google.protobuf.Duration timeout = 8; + * @return \Google\Protobuf\Duration|null + */ + public function getTimeout() + { + return $this->timeout; + } + + public function hasTimeout() + { + return isset($this->timeout); + } + + public function clearTimeout() + { + unset($this->timeout); + } + + /** + * The maximum amount of time to wait for the request to complete (must be + * between 1 and 60 seconds). Required. + * + * Generated from protobuf field .google.protobuf.Duration timeout = 8; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setTimeout($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->timeout = $var; + + return $this; + } + + /** + * The content that is expected to appear in the data returned by the target + * server against which the check is run. Currently, only the first entry + * in the `content_matchers` list is supported, and additional entries will + * be ignored. This field is optional and should only be specified if a + * content match is required as part of the/ Uptime check. + * + * Generated from protobuf field repeated .google.monitoring.v3.UptimeCheckConfig.ContentMatcher content_matchers = 9; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getContentMatchers() + { + return $this->content_matchers; + } + + /** + * The content that is expected to appear in the data returned by the target + * server against which the check is run. Currently, only the first entry + * in the `content_matchers` list is supported, and additional entries will + * be ignored. This field is optional and should only be specified if a + * content match is required as part of the/ Uptime check. + * + * Generated from protobuf field repeated .google.monitoring.v3.UptimeCheckConfig.ContentMatcher content_matchers = 9; + * @param array<\Google\Cloud\Monitoring\V3\UptimeCheckConfig\ContentMatcher>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setContentMatchers($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Monitoring\V3\UptimeCheckConfig\ContentMatcher::class); + $this->content_matchers = $arr; + + return $this; + } + + /** + * The type of checkers to use to execute the Uptime check. + * + * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.CheckerType checker_type = 17; + * @return int + */ + public function getCheckerType() + { + return $this->checker_type; + } + + /** + * The type of checkers to use to execute the Uptime check. + * + * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.CheckerType checker_type = 17; + * @param int $var + * @return $this + */ + public function setCheckerType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Monitoring\V3\UptimeCheckConfig\CheckerType::class); + $this->checker_type = $var; + + return $this; + } + + /** + * The list of regions from which the check will be run. + * Some regions contain one location, and others contain more than one. + * If this field is specified, enough regions must be provided to include a + * minimum of 3 locations. Not specifying this field will result in Uptime + * checks running from all available regions. + * + * Generated from protobuf field repeated .google.monitoring.v3.UptimeCheckRegion selected_regions = 10; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSelectedRegions() + { + return $this->selected_regions; + } + + /** + * The list of regions from which the check will be run. + * Some regions contain one location, and others contain more than one. + * If this field is specified, enough regions must be provided to include a + * minimum of 3 locations. Not specifying this field will result in Uptime + * checks running from all available regions. + * + * Generated from protobuf field repeated .google.monitoring.v3.UptimeCheckRegion selected_regions = 10; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSelectedRegions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Monitoring\V3\UptimeCheckRegion::class); + $this->selected_regions = $arr; + + return $this; + } + + /** + * If this is `true`, then checks are made only from the 'internal_checkers'. + * If it is `false`, then checks are made only from the 'selected_regions'. + * It is an error to provide 'selected_regions' when is_internal is `true`, + * or to provide 'internal_checkers' when is_internal is `false`. + * + * Generated from protobuf field bool is_internal = 15 [deprecated = true]; + * @return bool + * @deprecated + */ + public function getIsInternal() + { + @trigger_error('is_internal is deprecated.', E_USER_DEPRECATED); + return $this->is_internal; + } + + /** + * If this is `true`, then checks are made only from the 'internal_checkers'. + * If it is `false`, then checks are made only from the 'selected_regions'. + * It is an error to provide 'selected_regions' when is_internal is `true`, + * or to provide 'internal_checkers' when is_internal is `false`. + * + * Generated from protobuf field bool is_internal = 15 [deprecated = true]; + * @param bool $var + * @return $this + * @deprecated + */ + public function setIsInternal($var) + { + @trigger_error('is_internal is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkBool($var); + $this->is_internal = $var; + + return $this; + } + + /** + * The internal checkers that this check will egress from. If `is_internal` is + * `true` and this list is empty, the check will egress from all the + * InternalCheckers configured for the project that owns this + * `UptimeCheckConfig`. + * + * Generated from protobuf field repeated .google.monitoring.v3.InternalChecker internal_checkers = 14 [deprecated = true]; + * @return \Google\Protobuf\Internal\RepeatedField + * @deprecated + */ + public function getInternalCheckers() + { + @trigger_error('internal_checkers is deprecated.', E_USER_DEPRECATED); + return $this->internal_checkers; + } + + /** + * The internal checkers that this check will egress from. If `is_internal` is + * `true` and this list is empty, the check will egress from all the + * InternalCheckers configured for the project that owns this + * `UptimeCheckConfig`. + * + * Generated from protobuf field repeated .google.monitoring.v3.InternalChecker internal_checkers = 14 [deprecated = true]; + * @param array<\Google\Cloud\Monitoring\V3\InternalChecker>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + * @deprecated + */ + public function setInternalCheckers($var) + { + @trigger_error('internal_checkers is deprecated.', E_USER_DEPRECATED); + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Monitoring\V3\InternalChecker::class); + $this->internal_checkers = $arr; + + return $this; + } + + /** + * User-supplied key/value data to be used for organizing and + * identifying the `UptimeCheckConfig` objects. + * The field can contain up to 64 entries. Each key and value is limited to + * 63 Unicode characters or 128 bytes, whichever is smaller. Labels and + * values can contain only lowercase letters, numerals, underscores, and + * dashes. Keys must begin with a letter. + * + * Generated from protobuf field map user_labels = 20; + * @return \Google\Protobuf\Internal\MapField + */ + public function getUserLabels() + { + return $this->user_labels; + } + + /** + * User-supplied key/value data to be used for organizing and + * identifying the `UptimeCheckConfig` objects. + * The field can contain up to 64 entries. Each key and value is limited to + * 63 Unicode characters or 128 bytes, whichever is smaller. Labels and + * values can contain only lowercase letters, numerals, underscores, and + * dashes. Keys must begin with a letter. + * + * Generated from protobuf field map user_labels = 20; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setUserLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->user_labels = $arr; + + return $this; + } + + /** + * @return string + */ + public function getResource() + { + return $this->whichOneof("resource"); + } + + /** + * @return string + */ + public function getCheckRequestType() + { + return $this->whichOneof("check_request_type"); + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/CheckerType.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/CheckerType.php new file mode 100644 index 000000000000..e97a33453e22 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/CheckerType.php @@ -0,0 +1,69 @@ +google.monitoring.v3.UptimeCheckConfig.CheckerType + */ +class CheckerType +{ + /** + * The default checker type. Currently converted to `STATIC_IP_CHECKERS` + * on creation, the default conversion behavior may change in the future. + * + * Generated from protobuf enum CHECKER_TYPE_UNSPECIFIED = 0; + */ + const CHECKER_TYPE_UNSPECIFIED = 0; + /** + * `STATIC_IP_CHECKERS` are used for uptime checks that perform egress + * across the public internet. `STATIC_IP_CHECKERS` use the static IP + * addresses returned by `ListUptimeCheckIps`. + * + * Generated from protobuf enum STATIC_IP_CHECKERS = 1; + */ + const STATIC_IP_CHECKERS = 1; + /** + * `VPC_CHECKERS` are used for uptime checks that perform egress using + * Service Directory and private network access. When using `VPC_CHECKERS`, + * the monitored resource type must be `servicedirectory_service`. + * + * Generated from protobuf enum VPC_CHECKERS = 3; + */ + const VPC_CHECKERS = 3; + + private static $valueToName = [ + self::CHECKER_TYPE_UNSPECIFIED => 'CHECKER_TYPE_UNSPECIFIED', + self::STATIC_IP_CHECKERS => 'STATIC_IP_CHECKERS', + self::VPC_CHECKERS => 'VPC_CHECKERS', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(CheckerType::class, \Google\Cloud\Monitoring\V3\UptimeCheckConfig_CheckerType::class); + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/ContentMatcher.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/ContentMatcher.php new file mode 100644 index 000000000000..6c5646dbef86 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/ContentMatcher.php @@ -0,0 +1,158 @@ +google.monitoring.v3.UptimeCheckConfig.ContentMatcher + */ +class ContentMatcher extends \Google\Protobuf\Internal\Message +{ + /** + * String, regex or JSON content to match. Maximum 1024 bytes. An empty + * `content` string indicates no content matching is to be performed. + * + * Generated from protobuf field string content = 1; + */ + protected $content = ''; + /** + * The type of content matcher that will be applied to the server output, + * compared to the `content` string when the check is run. + * + * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.ContentMatcher.ContentMatcherOption matcher = 2; + */ + protected $matcher = 0; + protected $additional_matcher_info; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $content + * String, regex or JSON content to match. Maximum 1024 bytes. An empty + * `content` string indicates no content matching is to be performed. + * @type int $matcher + * The type of content matcher that will be applied to the server output, + * compared to the `content` string when the check is run. + * @type \Google\Cloud\Monitoring\V3\UptimeCheckConfig\ContentMatcher\JsonPathMatcher $json_path_matcher + * Matcher information for `MATCHES_JSON_PATH` and `NOT_MATCHES_JSON_PATH` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\Uptime::initOnce(); + parent::__construct($data); + } + + /** + * String, regex or JSON content to match. Maximum 1024 bytes. An empty + * `content` string indicates no content matching is to be performed. + * + * Generated from protobuf field string content = 1; + * @return string + */ + public function getContent() + { + return $this->content; + } + + /** + * String, regex or JSON content to match. Maximum 1024 bytes. An empty + * `content` string indicates no content matching is to be performed. + * + * Generated from protobuf field string content = 1; + * @param string $var + * @return $this + */ + public function setContent($var) + { + GPBUtil::checkString($var, True); + $this->content = $var; + + return $this; + } + + /** + * The type of content matcher that will be applied to the server output, + * compared to the `content` string when the check is run. + * + * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.ContentMatcher.ContentMatcherOption matcher = 2; + * @return int + */ + public function getMatcher() + { + return $this->matcher; + } + + /** + * The type of content matcher that will be applied to the server output, + * compared to the `content` string when the check is run. + * + * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.ContentMatcher.ContentMatcherOption matcher = 2; + * @param int $var + * @return $this + */ + public function setMatcher($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Monitoring\V3\UptimeCheckConfig\ContentMatcher\ContentMatcherOption::class); + $this->matcher = $var; + + return $this; + } + + /** + * Matcher information for `MATCHES_JSON_PATH` and `NOT_MATCHES_JSON_PATH` + * + * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.ContentMatcher.JsonPathMatcher json_path_matcher = 3; + * @return \Google\Cloud\Monitoring\V3\UptimeCheckConfig\ContentMatcher\JsonPathMatcher|null + */ + public function getJsonPathMatcher() + { + return $this->readOneof(3); + } + + public function hasJsonPathMatcher() + { + return $this->hasOneof(3); + } + + /** + * Matcher information for `MATCHES_JSON_PATH` and `NOT_MATCHES_JSON_PATH` + * + * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.ContentMatcher.JsonPathMatcher json_path_matcher = 3; + * @param \Google\Cloud\Monitoring\V3\UptimeCheckConfig\ContentMatcher\JsonPathMatcher $var + * @return $this + */ + public function setJsonPathMatcher($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\UptimeCheckConfig\ContentMatcher\JsonPathMatcher::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * @return string + */ + public function getAdditionalMatcherInfo() + { + return $this->whichOneof("additional_matcher_info"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ContentMatcher::class, \Google\Cloud\Monitoring\V3\UptimeCheckConfig_ContentMatcher::class); + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/ContentMatcher/ContentMatcherOption.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/ContentMatcher/ContentMatcherOption.php new file mode 100644 index 000000000000..3dffeaa7586f --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/ContentMatcher/ContentMatcherOption.php @@ -0,0 +1,107 @@ +google.monitoring.v3.UptimeCheckConfig.ContentMatcher.ContentMatcherOption + */ +class ContentMatcherOption +{ + /** + * No content matcher type specified (maintained for backward + * compatibility, but deprecated for future use). + * Treated as `CONTAINS_STRING`. + * + * Generated from protobuf enum CONTENT_MATCHER_OPTION_UNSPECIFIED = 0; + */ + const CONTENT_MATCHER_OPTION_UNSPECIFIED = 0; + /** + * Selects substring matching. The match succeeds if the output contains + * the `content` string. This is the default value for checks without + * a `matcher` option, or where the value of `matcher` is + * `CONTENT_MATCHER_OPTION_UNSPECIFIED`. + * + * Generated from protobuf enum CONTAINS_STRING = 1; + */ + const CONTAINS_STRING = 1; + /** + * Selects negation of substring matching. The match succeeds if the + * output does _NOT_ contain the `content` string. + * + * Generated from protobuf enum NOT_CONTAINS_STRING = 2; + */ + const NOT_CONTAINS_STRING = 2; + /** + * Selects regular-expression matching. The match succeeds if the output + * matches the regular expression specified in the `content` string. + * Regex matching is only supported for HTTP/HTTPS checks. + * + * Generated from protobuf enum MATCHES_REGEX = 3; + */ + const MATCHES_REGEX = 3; + /** + * Selects negation of regular-expression matching. The match succeeds if + * the output does _NOT_ match the regular expression specified in the + * `content` string. Regex matching is only supported for HTTP/HTTPS + * checks. + * + * Generated from protobuf enum NOT_MATCHES_REGEX = 4; + */ + const NOT_MATCHES_REGEX = 4; + /** + * Selects JSONPath matching. See `JsonPathMatcher` for details on when + * the match succeeds. JSONPath matching is only supported for HTTP/HTTPS + * checks. + * + * Generated from protobuf enum MATCHES_JSON_PATH = 5; + */ + const MATCHES_JSON_PATH = 5; + /** + * Selects JSONPath matching. See `JsonPathMatcher` for details on when + * the match succeeds. Succeeds when output does _NOT_ match as specified. + * JSONPath is only supported for HTTP/HTTPS checks. + * + * Generated from protobuf enum NOT_MATCHES_JSON_PATH = 6; + */ + const NOT_MATCHES_JSON_PATH = 6; + + private static $valueToName = [ + self::CONTENT_MATCHER_OPTION_UNSPECIFIED => 'CONTENT_MATCHER_OPTION_UNSPECIFIED', + self::CONTAINS_STRING => 'CONTAINS_STRING', + self::NOT_CONTAINS_STRING => 'NOT_CONTAINS_STRING', + self::MATCHES_REGEX => 'MATCHES_REGEX', + self::NOT_MATCHES_REGEX => 'NOT_MATCHES_REGEX', + self::MATCHES_JSON_PATH => 'MATCHES_JSON_PATH', + self::NOT_MATCHES_JSON_PATH => 'NOT_MATCHES_JSON_PATH', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ContentMatcherOption::class, \Google\Cloud\Monitoring\V3\UptimeCheckConfig_ContentMatcher_ContentMatcherOption::class); + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/ContentMatcher/JsonPathMatcher.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/ContentMatcher/JsonPathMatcher.php new file mode 100644 index 000000000000..04e6f363bfab --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/ContentMatcher/JsonPathMatcher.php @@ -0,0 +1,114 @@ +google.monitoring.v3.UptimeCheckConfig.ContentMatcher.JsonPathMatcher + */ +class JsonPathMatcher extends \Google\Protobuf\Internal\Message +{ + /** + * JSONPath within the response output pointing to the expected + * `ContentMatcher::content` to match against. + * + * Generated from protobuf field string json_path = 1; + */ + protected $json_path = ''; + /** + * The type of JSONPath match that will be applied to the JSON output + * (`ContentMatcher.content`) + * + * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.ContentMatcher.JsonPathMatcher.JsonPathMatcherOption json_matcher = 2; + */ + protected $json_matcher = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $json_path + * JSONPath within the response output pointing to the expected + * `ContentMatcher::content` to match against. + * @type int $json_matcher + * The type of JSONPath match that will be applied to the JSON output + * (`ContentMatcher.content`) + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\Uptime::initOnce(); + parent::__construct($data); + } + + /** + * JSONPath within the response output pointing to the expected + * `ContentMatcher::content` to match against. + * + * Generated from protobuf field string json_path = 1; + * @return string + */ + public function getJsonPath() + { + return $this->json_path; + } + + /** + * JSONPath within the response output pointing to the expected + * `ContentMatcher::content` to match against. + * + * Generated from protobuf field string json_path = 1; + * @param string $var + * @return $this + */ + public function setJsonPath($var) + { + GPBUtil::checkString($var, True); + $this->json_path = $var; + + return $this; + } + + /** + * The type of JSONPath match that will be applied to the JSON output + * (`ContentMatcher.content`) + * + * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.ContentMatcher.JsonPathMatcher.JsonPathMatcherOption json_matcher = 2; + * @return int + */ + public function getJsonMatcher() + { + return $this->json_matcher; + } + + /** + * The type of JSONPath match that will be applied to the JSON output + * (`ContentMatcher.content`) + * + * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.ContentMatcher.JsonPathMatcher.JsonPathMatcherOption json_matcher = 2; + * @param int $var + * @return $this + */ + public function setJsonMatcher($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Monitoring\V3\UptimeCheckConfig\ContentMatcher\JsonPathMatcher\JsonPathMatcherOption::class); + $this->json_matcher = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(JsonPathMatcher::class, \Google\Cloud\Monitoring\V3\UptimeCheckConfig_ContentMatcher_JsonPathMatcher::class); + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/ContentMatcher/JsonPathMatcher/JsonPathMatcherOption.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/ContentMatcher/JsonPathMatcher/JsonPathMatcherOption.php new file mode 100644 index 000000000000..965725688ee1 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/ContentMatcher/JsonPathMatcher/JsonPathMatcherOption.php @@ -0,0 +1,68 @@ +google.monitoring.v3.UptimeCheckConfig.ContentMatcher.JsonPathMatcher.JsonPathMatcherOption + */ +class JsonPathMatcherOption +{ + /** + * No JSONPath matcher type specified (not valid). + * + * Generated from protobuf enum JSON_PATH_MATCHER_OPTION_UNSPECIFIED = 0; + */ + const JSON_PATH_MATCHER_OPTION_UNSPECIFIED = 0; + /** + * Selects 'exact string' matching. The match succeeds if the content at + * the `json_path` within the output is exactly the same as the + * `content` string. + * + * Generated from protobuf enum EXACT_MATCH = 1; + */ + const EXACT_MATCH = 1; + /** + * Selects regular-expression matching. The match succeeds if the + * content at the `json_path` within the output matches the regular + * expression specified in the `content` string. + * + * Generated from protobuf enum REGEX_MATCH = 2; + */ + const REGEX_MATCH = 2; + + private static $valueToName = [ + self::JSON_PATH_MATCHER_OPTION_UNSPECIFIED => 'JSON_PATH_MATCHER_OPTION_UNSPECIFIED', + self::EXACT_MATCH => 'EXACT_MATCH', + self::REGEX_MATCH => 'REGEX_MATCH', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(JsonPathMatcherOption::class, \Google\Cloud\Monitoring\V3\UptimeCheckConfig_ContentMatcher_JsonPathMatcher_JsonPathMatcherOption::class); + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/HttpCheck.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/HttpCheck.php new file mode 100644 index 000000000000..0c3ff2d2ed8d --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/HttpCheck.php @@ -0,0 +1,730 @@ +google.monitoring.v3.UptimeCheckConfig.HttpCheck + */ +class HttpCheck extends \Google\Protobuf\Internal\Message +{ + /** + * The HTTP request method to use for the check. If set to + * `METHOD_UNSPECIFIED` then `request_method` defaults to `GET`. + * + * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.HttpCheck.RequestMethod request_method = 8; + */ + protected $request_method = 0; + /** + * If `true`, use HTTPS instead of HTTP to run the check. + * + * Generated from protobuf field bool use_ssl = 1; + */ + protected $use_ssl = false; + /** + * Optional (defaults to "/"). The path to the page against which to run + * the check. Will be combined with the `host` (specified within the + * `monitored_resource`) and `port` to construct the full URL. If the + * provided path does not begin with "/", a "/" will be prepended + * automatically. + * + * Generated from protobuf field string path = 2; + */ + protected $path = ''; + /** + * Optional (defaults to 80 when `use_ssl` is `false`, and 443 when + * `use_ssl` is `true`). The TCP port on the HTTP server against which to + * run the check. Will be combined with host (specified within the + * `monitored_resource`) and `path` to construct the full URL. + * + * Generated from protobuf field int32 port = 3; + */ + protected $port = 0; + /** + * The authentication information. Optional when creating an HTTP check; + * defaults to empty. + * Do not set both `auth_method` and `auth_info`. + * + * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication auth_info = 4; + */ + protected $auth_info = null; + /** + * Boolean specifying whether to encrypt the header information. + * Encryption should be specified for any headers related to authentication + * that you do not wish to be seen when retrieving the configuration. The + * server will be responsible for encrypting the headers. + * On Get/List calls, if `mask_headers` is set to `true` then the headers + * will be obscured with `******.` + * + * Generated from protobuf field bool mask_headers = 5; + */ + protected $mask_headers = false; + /** + * The list of headers to send as part of the Uptime check request. + * If two headers have the same key and different values, they should + * be entered as a single header, with the value being a comma-separated + * list of all the desired values as described at + * https://www.w3.org/Protocols/rfc2616/rfc2616.txt (page 31). + * Entering two separate headers with the same key in a Create call will + * cause the first to be overwritten by the second. + * The maximum number of headers allowed is 100. + * + * Generated from protobuf field map headers = 6; + */ + private $headers; + /** + * The content type header to use for the check. The following + * configurations result in errors: + * 1. Content type is specified in both the `headers` field and the + * `content_type` field. + * 2. Request method is `GET` and `content_type` is not `TYPE_UNSPECIFIED` + * 3. Request method is `POST` and `content_type` is `TYPE_UNSPECIFIED`. + * 4. Request method is `POST` and a "Content-Type" header is provided via + * `headers` field. The `content_type` field should be used instead. + * + * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.HttpCheck.ContentType content_type = 9; + */ + protected $content_type = 0; + /** + * A user provided content type header to use for the check. The invalid + * configurations outlined in the `content_type` field apply to + * `custom_content_type`, as well as the following: + * 1. `content_type` is `URL_ENCODED` and `custom_content_type` is set. + * 2. `content_type` is `USER_PROVIDED` and `custom_content_type` is not + * set. + * + * Generated from protobuf field string custom_content_type = 13; + */ + protected $custom_content_type = ''; + /** + * Boolean specifying whether to include SSL certificate validation as a + * part of the Uptime check. Only applies to checks where + * `monitored_resource` is set to `uptime_url`. If `use_ssl` is `false`, + * setting `validate_ssl` to `true` has no effect. + * + * Generated from protobuf field bool validate_ssl = 7; + */ + protected $validate_ssl = false; + /** + * The request body associated with the HTTP POST request. If `content_type` + * is `URL_ENCODED`, the body passed in must be URL-encoded. Users can + * provide a `Content-Length` header via the `headers` field or the API will + * do so. If the `request_method` is `GET` and `body` is not empty, the API + * will return an error. The maximum byte size is 1 megabyte. + * Note: If client libraries aren't used (which performs the conversion + * automatically) base64 encode your `body` data since the field is of + * `bytes` type. + * + * Generated from protobuf field bytes body = 10; + */ + protected $body = ''; + /** + * If present, the check will only pass if the HTTP response status code is + * in this set of status codes. If empty, the HTTP status code will only + * pass if the HTTP status code is 200-299. + * + * Generated from protobuf field repeated .google.monitoring.v3.UptimeCheckConfig.HttpCheck.ResponseStatusCode accepted_response_status_codes = 11; + */ + private $accepted_response_status_codes; + /** + * Contains information needed to add pings to an HTTP check. + * + * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.PingConfig ping_config = 12; + */ + protected $ping_config = null; + protected $auth_method; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $request_method + * The HTTP request method to use for the check. If set to + * `METHOD_UNSPECIFIED` then `request_method` defaults to `GET`. + * @type bool $use_ssl + * If `true`, use HTTPS instead of HTTP to run the check. + * @type string $path + * Optional (defaults to "/"). The path to the page against which to run + * the check. Will be combined with the `host` (specified within the + * `monitored_resource`) and `port` to construct the full URL. If the + * provided path does not begin with "/", a "/" will be prepended + * automatically. + * @type int $port + * Optional (defaults to 80 when `use_ssl` is `false`, and 443 when + * `use_ssl` is `true`). The TCP port on the HTTP server against which to + * run the check. Will be combined with host (specified within the + * `monitored_resource`) and `path` to construct the full URL. + * @type \Google\Cloud\Monitoring\V3\UptimeCheckConfig\HttpCheck\BasicAuthentication $auth_info + * The authentication information. Optional when creating an HTTP check; + * defaults to empty. + * Do not set both `auth_method` and `auth_info`. + * @type bool $mask_headers + * Boolean specifying whether to encrypt the header information. + * Encryption should be specified for any headers related to authentication + * that you do not wish to be seen when retrieving the configuration. The + * server will be responsible for encrypting the headers. + * On Get/List calls, if `mask_headers` is set to `true` then the headers + * will be obscured with `******.` + * @type array|\Google\Protobuf\Internal\MapField $headers + * The list of headers to send as part of the Uptime check request. + * If two headers have the same key and different values, they should + * be entered as a single header, with the value being a comma-separated + * list of all the desired values as described at + * https://www.w3.org/Protocols/rfc2616/rfc2616.txt (page 31). + * Entering two separate headers with the same key in a Create call will + * cause the first to be overwritten by the second. + * The maximum number of headers allowed is 100. + * @type int $content_type + * The content type header to use for the check. The following + * configurations result in errors: + * 1. Content type is specified in both the `headers` field and the + * `content_type` field. + * 2. Request method is `GET` and `content_type` is not `TYPE_UNSPECIFIED` + * 3. Request method is `POST` and `content_type` is `TYPE_UNSPECIFIED`. + * 4. Request method is `POST` and a "Content-Type" header is provided via + * `headers` field. The `content_type` field should be used instead. + * @type string $custom_content_type + * A user provided content type header to use for the check. The invalid + * configurations outlined in the `content_type` field apply to + * `custom_content_type`, as well as the following: + * 1. `content_type` is `URL_ENCODED` and `custom_content_type` is set. + * 2. `content_type` is `USER_PROVIDED` and `custom_content_type` is not + * set. + * @type bool $validate_ssl + * Boolean specifying whether to include SSL certificate validation as a + * part of the Uptime check. Only applies to checks where + * `monitored_resource` is set to `uptime_url`. If `use_ssl` is `false`, + * setting `validate_ssl` to `true` has no effect. + * @type string $body + * The request body associated with the HTTP POST request. If `content_type` + * is `URL_ENCODED`, the body passed in must be URL-encoded. Users can + * provide a `Content-Length` header via the `headers` field or the API will + * do so. If the `request_method` is `GET` and `body` is not empty, the API + * will return an error. The maximum byte size is 1 megabyte. + * Note: If client libraries aren't used (which performs the conversion + * automatically) base64 encode your `body` data since the field is of + * `bytes` type. + * @type array<\Google\Cloud\Monitoring\V3\UptimeCheckConfig\HttpCheck\ResponseStatusCode>|\Google\Protobuf\Internal\RepeatedField $accepted_response_status_codes + * If present, the check will only pass if the HTTP response status code is + * in this set of status codes. If empty, the HTTP status code will only + * pass if the HTTP status code is 200-299. + * @type \Google\Cloud\Monitoring\V3\UptimeCheckConfig\PingConfig $ping_config + * Contains information needed to add pings to an HTTP check. + * @type \Google\Cloud\Monitoring\V3\UptimeCheckConfig\HttpCheck\ServiceAgentAuthentication $service_agent_authentication + * If specified, Uptime will generate and attach an OIDC JWT token for the + * Monitoring service agent service account as an `Authorization` header + * in the HTTP request when probing. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\Uptime::initOnce(); + parent::__construct($data); + } + + /** + * The HTTP request method to use for the check. If set to + * `METHOD_UNSPECIFIED` then `request_method` defaults to `GET`. + * + * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.HttpCheck.RequestMethod request_method = 8; + * @return int + */ + public function getRequestMethod() + { + return $this->request_method; + } + + /** + * The HTTP request method to use for the check. If set to + * `METHOD_UNSPECIFIED` then `request_method` defaults to `GET`. + * + * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.HttpCheck.RequestMethod request_method = 8; + * @param int $var + * @return $this + */ + public function setRequestMethod($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Monitoring\V3\UptimeCheckConfig\HttpCheck\RequestMethod::class); + $this->request_method = $var; + + return $this; + } + + /** + * If `true`, use HTTPS instead of HTTP to run the check. + * + * Generated from protobuf field bool use_ssl = 1; + * @return bool + */ + public function getUseSsl() + { + return $this->use_ssl; + } + + /** + * If `true`, use HTTPS instead of HTTP to run the check. + * + * Generated from protobuf field bool use_ssl = 1; + * @param bool $var + * @return $this + */ + public function setUseSsl($var) + { + GPBUtil::checkBool($var); + $this->use_ssl = $var; + + return $this; + } + + /** + * Optional (defaults to "/"). The path to the page against which to run + * the check. Will be combined with the `host` (specified within the + * `monitored_resource`) and `port` to construct the full URL. If the + * provided path does not begin with "/", a "/" will be prepended + * automatically. + * + * Generated from protobuf field string path = 2; + * @return string + */ + public function getPath() + { + return $this->path; + } + + /** + * Optional (defaults to "/"). The path to the page against which to run + * the check. Will be combined with the `host` (specified within the + * `monitored_resource`) and `port` to construct the full URL. If the + * provided path does not begin with "/", a "/" will be prepended + * automatically. + * + * Generated from protobuf field string path = 2; + * @param string $var + * @return $this + */ + public function setPath($var) + { + GPBUtil::checkString($var, True); + $this->path = $var; + + return $this; + } + + /** + * Optional (defaults to 80 when `use_ssl` is `false`, and 443 when + * `use_ssl` is `true`). The TCP port on the HTTP server against which to + * run the check. Will be combined with host (specified within the + * `monitored_resource`) and `path` to construct the full URL. + * + * Generated from protobuf field int32 port = 3; + * @return int + */ + public function getPort() + { + return $this->port; + } + + /** + * Optional (defaults to 80 when `use_ssl` is `false`, and 443 when + * `use_ssl` is `true`). The TCP port on the HTTP server against which to + * run the check. Will be combined with host (specified within the + * `monitored_resource`) and `path` to construct the full URL. + * + * Generated from protobuf field int32 port = 3; + * @param int $var + * @return $this + */ + public function setPort($var) + { + GPBUtil::checkInt32($var); + $this->port = $var; + + return $this; + } + + /** + * The authentication information. Optional when creating an HTTP check; + * defaults to empty. + * Do not set both `auth_method` and `auth_info`. + * + * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication auth_info = 4; + * @return \Google\Cloud\Monitoring\V3\UptimeCheckConfig\HttpCheck\BasicAuthentication|null + */ + public function getAuthInfo() + { + return $this->auth_info; + } + + public function hasAuthInfo() + { + return isset($this->auth_info); + } + + public function clearAuthInfo() + { + unset($this->auth_info); + } + + /** + * The authentication information. Optional when creating an HTTP check; + * defaults to empty. + * Do not set both `auth_method` and `auth_info`. + * + * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication auth_info = 4; + * @param \Google\Cloud\Monitoring\V3\UptimeCheckConfig\HttpCheck\BasicAuthentication $var + * @return $this + */ + public function setAuthInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\UptimeCheckConfig\HttpCheck\BasicAuthentication::class); + $this->auth_info = $var; + + return $this; + } + + /** + * Boolean specifying whether to encrypt the header information. + * Encryption should be specified for any headers related to authentication + * that you do not wish to be seen when retrieving the configuration. The + * server will be responsible for encrypting the headers. + * On Get/List calls, if `mask_headers` is set to `true` then the headers + * will be obscured with `******.` + * + * Generated from protobuf field bool mask_headers = 5; + * @return bool + */ + public function getMaskHeaders() + { + return $this->mask_headers; + } + + /** + * Boolean specifying whether to encrypt the header information. + * Encryption should be specified for any headers related to authentication + * that you do not wish to be seen when retrieving the configuration. The + * server will be responsible for encrypting the headers. + * On Get/List calls, if `mask_headers` is set to `true` then the headers + * will be obscured with `******.` + * + * Generated from protobuf field bool mask_headers = 5; + * @param bool $var + * @return $this + */ + public function setMaskHeaders($var) + { + GPBUtil::checkBool($var); + $this->mask_headers = $var; + + return $this; + } + + /** + * The list of headers to send as part of the Uptime check request. + * If two headers have the same key and different values, they should + * be entered as a single header, with the value being a comma-separated + * list of all the desired values as described at + * https://www.w3.org/Protocols/rfc2616/rfc2616.txt (page 31). + * Entering two separate headers with the same key in a Create call will + * cause the first to be overwritten by the second. + * The maximum number of headers allowed is 100. + * + * Generated from protobuf field map headers = 6; + * @return \Google\Protobuf\Internal\MapField + */ + public function getHeaders() + { + return $this->headers; + } + + /** + * The list of headers to send as part of the Uptime check request. + * If two headers have the same key and different values, they should + * be entered as a single header, with the value being a comma-separated + * list of all the desired values as described at + * https://www.w3.org/Protocols/rfc2616/rfc2616.txt (page 31). + * Entering two separate headers with the same key in a Create call will + * cause the first to be overwritten by the second. + * The maximum number of headers allowed is 100. + * + * Generated from protobuf field map headers = 6; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setHeaders($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->headers = $arr; + + return $this; + } + + /** + * The content type header to use for the check. The following + * configurations result in errors: + * 1. Content type is specified in both the `headers` field and the + * `content_type` field. + * 2. Request method is `GET` and `content_type` is not `TYPE_UNSPECIFIED` + * 3. Request method is `POST` and `content_type` is `TYPE_UNSPECIFIED`. + * 4. Request method is `POST` and a "Content-Type" header is provided via + * `headers` field. The `content_type` field should be used instead. + * + * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.HttpCheck.ContentType content_type = 9; + * @return int + */ + public function getContentType() + { + return $this->content_type; + } + + /** + * The content type header to use for the check. The following + * configurations result in errors: + * 1. Content type is specified in both the `headers` field and the + * `content_type` field. + * 2. Request method is `GET` and `content_type` is not `TYPE_UNSPECIFIED` + * 3. Request method is `POST` and `content_type` is `TYPE_UNSPECIFIED`. + * 4. Request method is `POST` and a "Content-Type" header is provided via + * `headers` field. The `content_type` field should be used instead. + * + * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.HttpCheck.ContentType content_type = 9; + * @param int $var + * @return $this + */ + public function setContentType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Monitoring\V3\UptimeCheckConfig\HttpCheck\ContentType::class); + $this->content_type = $var; + + return $this; + } + + /** + * A user provided content type header to use for the check. The invalid + * configurations outlined in the `content_type` field apply to + * `custom_content_type`, as well as the following: + * 1. `content_type` is `URL_ENCODED` and `custom_content_type` is set. + * 2. `content_type` is `USER_PROVIDED` and `custom_content_type` is not + * set. + * + * Generated from protobuf field string custom_content_type = 13; + * @return string + */ + public function getCustomContentType() + { + return $this->custom_content_type; + } + + /** + * A user provided content type header to use for the check. The invalid + * configurations outlined in the `content_type` field apply to + * `custom_content_type`, as well as the following: + * 1. `content_type` is `URL_ENCODED` and `custom_content_type` is set. + * 2. `content_type` is `USER_PROVIDED` and `custom_content_type` is not + * set. + * + * Generated from protobuf field string custom_content_type = 13; + * @param string $var + * @return $this + */ + public function setCustomContentType($var) + { + GPBUtil::checkString($var, True); + $this->custom_content_type = $var; + + return $this; + } + + /** + * Boolean specifying whether to include SSL certificate validation as a + * part of the Uptime check. Only applies to checks where + * `monitored_resource` is set to `uptime_url`. If `use_ssl` is `false`, + * setting `validate_ssl` to `true` has no effect. + * + * Generated from protobuf field bool validate_ssl = 7; + * @return bool + */ + public function getValidateSsl() + { + return $this->validate_ssl; + } + + /** + * Boolean specifying whether to include SSL certificate validation as a + * part of the Uptime check. Only applies to checks where + * `monitored_resource` is set to `uptime_url`. If `use_ssl` is `false`, + * setting `validate_ssl` to `true` has no effect. + * + * Generated from protobuf field bool validate_ssl = 7; + * @param bool $var + * @return $this + */ + public function setValidateSsl($var) + { + GPBUtil::checkBool($var); + $this->validate_ssl = $var; + + return $this; + } + + /** + * The request body associated with the HTTP POST request. If `content_type` + * is `URL_ENCODED`, the body passed in must be URL-encoded. Users can + * provide a `Content-Length` header via the `headers` field or the API will + * do so. If the `request_method` is `GET` and `body` is not empty, the API + * will return an error. The maximum byte size is 1 megabyte. + * Note: If client libraries aren't used (which performs the conversion + * automatically) base64 encode your `body` data since the field is of + * `bytes` type. + * + * Generated from protobuf field bytes body = 10; + * @return string + */ + public function getBody() + { + return $this->body; + } + + /** + * The request body associated with the HTTP POST request. If `content_type` + * is `URL_ENCODED`, the body passed in must be URL-encoded. Users can + * provide a `Content-Length` header via the `headers` field or the API will + * do so. If the `request_method` is `GET` and `body` is not empty, the API + * will return an error. The maximum byte size is 1 megabyte. + * Note: If client libraries aren't used (which performs the conversion + * automatically) base64 encode your `body` data since the field is of + * `bytes` type. + * + * Generated from protobuf field bytes body = 10; + * @param string $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkString($var, False); + $this->body = $var; + + return $this; + } + + /** + * If present, the check will only pass if the HTTP response status code is + * in this set of status codes. If empty, the HTTP status code will only + * pass if the HTTP status code is 200-299. + * + * Generated from protobuf field repeated .google.monitoring.v3.UptimeCheckConfig.HttpCheck.ResponseStatusCode accepted_response_status_codes = 11; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAcceptedResponseStatusCodes() + { + return $this->accepted_response_status_codes; + } + + /** + * If present, the check will only pass if the HTTP response status code is + * in this set of status codes. If empty, the HTTP status code will only + * pass if the HTTP status code is 200-299. + * + * Generated from protobuf field repeated .google.monitoring.v3.UptimeCheckConfig.HttpCheck.ResponseStatusCode accepted_response_status_codes = 11; + * @param array<\Google\Cloud\Monitoring\V3\UptimeCheckConfig\HttpCheck\ResponseStatusCode>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAcceptedResponseStatusCodes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Monitoring\V3\UptimeCheckConfig\HttpCheck\ResponseStatusCode::class); + $this->accepted_response_status_codes = $arr; + + return $this; + } + + /** + * Contains information needed to add pings to an HTTP check. + * + * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.PingConfig ping_config = 12; + * @return \Google\Cloud\Monitoring\V3\UptimeCheckConfig\PingConfig|null + */ + public function getPingConfig() + { + return $this->ping_config; + } + + public function hasPingConfig() + { + return isset($this->ping_config); + } + + public function clearPingConfig() + { + unset($this->ping_config); + } + + /** + * Contains information needed to add pings to an HTTP check. + * + * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.PingConfig ping_config = 12; + * @param \Google\Cloud\Monitoring\V3\UptimeCheckConfig\PingConfig $var + * @return $this + */ + public function setPingConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\UptimeCheckConfig\PingConfig::class); + $this->ping_config = $var; + + return $this; + } + + /** + * If specified, Uptime will generate and attach an OIDC JWT token for the + * Monitoring service agent service account as an `Authorization` header + * in the HTTP request when probing. + * + * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.HttpCheck.ServiceAgentAuthentication service_agent_authentication = 14; + * @return \Google\Cloud\Monitoring\V3\UptimeCheckConfig\HttpCheck\ServiceAgentAuthentication|null + */ + public function getServiceAgentAuthentication() + { + return $this->readOneof(14); + } + + public function hasServiceAgentAuthentication() + { + return $this->hasOneof(14); + } + + /** + * If specified, Uptime will generate and attach an OIDC JWT token for the + * Monitoring service agent service account as an `Authorization` header + * in the HTTP request when probing. + * + * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.HttpCheck.ServiceAgentAuthentication service_agent_authentication = 14; + * @param \Google\Cloud\Monitoring\V3\UptimeCheckConfig\HttpCheck\ServiceAgentAuthentication $var + * @return $this + */ + public function setServiceAgentAuthentication($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\UptimeCheckConfig\HttpCheck\ServiceAgentAuthentication::class); + $this->writeOneof(14, $var); + + return $this; + } + + /** + * @return string + */ + public function getAuthMethod() + { + return $this->whichOneof("auth_method"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(HttpCheck::class, \Google\Cloud\Monitoring\V3\UptimeCheckConfig_HttpCheck::class); + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/HttpCheck/BasicAuthentication.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/HttpCheck/BasicAuthentication.php new file mode 100644 index 000000000000..d193ecd51c76 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/HttpCheck/BasicAuthentication.php @@ -0,0 +1,107 @@ +google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication + */ +class BasicAuthentication extends \Google\Protobuf\Internal\Message +{ + /** + * The username to use when authenticating with the HTTP server. + * + * Generated from protobuf field string username = 1; + */ + protected $username = ''; + /** + * The password to use when authenticating with the HTTP server. + * + * Generated from protobuf field string password = 2; + */ + protected $password = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $username + * The username to use when authenticating with the HTTP server. + * @type string $password + * The password to use when authenticating with the HTTP server. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\Uptime::initOnce(); + parent::__construct($data); + } + + /** + * The username to use when authenticating with the HTTP server. + * + * Generated from protobuf field string username = 1; + * @return string + */ + public function getUsername() + { + return $this->username; + } + + /** + * The username to use when authenticating with the HTTP server. + * + * Generated from protobuf field string username = 1; + * @param string $var + * @return $this + */ + public function setUsername($var) + { + GPBUtil::checkString($var, True); + $this->username = $var; + + return $this; + } + + /** + * The password to use when authenticating with the HTTP server. + * + * Generated from protobuf field string password = 2; + * @return string + */ + public function getPassword() + { + return $this->password; + } + + /** + * The password to use when authenticating with the HTTP server. + * + * Generated from protobuf field string password = 2; + * @param string $var + * @return $this + */ + public function setPassword($var) + { + GPBUtil::checkString($var, True); + $this->password = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(BasicAuthentication::class, \Google\Cloud\Monitoring\V3\UptimeCheckConfig_HttpCheck_BasicAuthentication::class); + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/HttpCheck/ContentType.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/HttpCheck/ContentType.php new file mode 100644 index 000000000000..7eeb5f3ad046 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/HttpCheck/ContentType.php @@ -0,0 +1,67 @@ +google.monitoring.v3.UptimeCheckConfig.HttpCheck.ContentType + */ +class ContentType +{ + /** + * No content type specified. + * + * Generated from protobuf enum TYPE_UNSPECIFIED = 0; + */ + const TYPE_UNSPECIFIED = 0; + /** + * `body` is in URL-encoded form. Equivalent to setting the `Content-Type` + * to `application/x-www-form-urlencoded` in the HTTP request. + * + * Generated from protobuf enum URL_ENCODED = 1; + */ + const URL_ENCODED = 1; + /** + * `body` is in `custom_content_type` form. Equivalent to setting the + * `Content-Type` to the contents of `custom_content_type` in the HTTP + * request. + * + * Generated from protobuf enum USER_PROVIDED = 2; + */ + const USER_PROVIDED = 2; + + private static $valueToName = [ + self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', + self::URL_ENCODED => 'URL_ENCODED', + self::USER_PROVIDED => 'USER_PROVIDED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ContentType::class, \Google\Cloud\Monitoring\V3\UptimeCheckConfig_HttpCheck_ContentType::class); + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/HttpCheck/RequestMethod.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/HttpCheck/RequestMethod.php new file mode 100644 index 000000000000..981e2cbc3729 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/HttpCheck/RequestMethod.php @@ -0,0 +1,64 @@ +google.monitoring.v3.UptimeCheckConfig.HttpCheck.RequestMethod + */ +class RequestMethod +{ + /** + * No request method specified. + * + * Generated from protobuf enum METHOD_UNSPECIFIED = 0; + */ + const METHOD_UNSPECIFIED = 0; + /** + * GET request. + * + * Generated from protobuf enum GET = 1; + */ + const GET = 1; + /** + * POST request. + * + * Generated from protobuf enum POST = 2; + */ + const POST = 2; + + private static $valueToName = [ + self::METHOD_UNSPECIFIED => 'METHOD_UNSPECIFIED', + self::GET => 'GET', + self::POST => 'POST', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(RequestMethod::class, \Google\Cloud\Monitoring\V3\UptimeCheckConfig_HttpCheck_RequestMethod::class); + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/HttpCheck/ResponseStatusCode.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/HttpCheck/ResponseStatusCode.php new file mode 100644 index 000000000000..61fe31c3dabc --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/HttpCheck/ResponseStatusCode.php @@ -0,0 +1,112 @@ +google.monitoring.v3.UptimeCheckConfig.HttpCheck.ResponseStatusCode + */ +class ResponseStatusCode extends \Google\Protobuf\Internal\Message +{ + protected $status_code; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $status_value + * A status code to accept. + * @type int $status_class + * A class of status codes to accept. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\Uptime::initOnce(); + parent::__construct($data); + } + + /** + * A status code to accept. + * + * Generated from protobuf field int32 status_value = 1; + * @return int + */ + public function getStatusValue() + { + return $this->readOneof(1); + } + + public function hasStatusValue() + { + return $this->hasOneof(1); + } + + /** + * A status code to accept. + * + * Generated from protobuf field int32 status_value = 1; + * @param int $var + * @return $this + */ + public function setStatusValue($var) + { + GPBUtil::checkInt32($var); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * A class of status codes to accept. + * + * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.HttpCheck.ResponseStatusCode.StatusClass status_class = 2; + * @return int + */ + public function getStatusClass() + { + return $this->readOneof(2); + } + + public function hasStatusClass() + { + return $this->hasOneof(2); + } + + /** + * A class of status codes to accept. + * + * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.HttpCheck.ResponseStatusCode.StatusClass status_class = 2; + * @param int $var + * @return $this + */ + public function setStatusClass($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Monitoring\V3\UptimeCheckConfig\HttpCheck\ResponseStatusCode\StatusClass::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getStatusCode() + { + return $this->whichOneof("status_code"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ResponseStatusCode::class, \Google\Cloud\Monitoring\V3\UptimeCheckConfig_HttpCheck_ResponseStatusCode::class); + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/HttpCheck/ResponseStatusCode/StatusClass.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/HttpCheck/ResponseStatusCode/StatusClass.php new file mode 100644 index 000000000000..ec9ccc03c042 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/HttpCheck/ResponseStatusCode/StatusClass.php @@ -0,0 +1,92 @@ +google.monitoring.v3.UptimeCheckConfig.HttpCheck.ResponseStatusCode.StatusClass + */ +class StatusClass +{ + /** + * Default value that matches no status codes. + * + * Generated from protobuf enum STATUS_CLASS_UNSPECIFIED = 0; + */ + const STATUS_CLASS_UNSPECIFIED = 0; + /** + * The class of status codes between 100 and 199. + * + * Generated from protobuf enum STATUS_CLASS_1XX = 100; + */ + const STATUS_CLASS_1XX = 100; + /** + * The class of status codes between 200 and 299. + * + * Generated from protobuf enum STATUS_CLASS_2XX = 200; + */ + const STATUS_CLASS_2XX = 200; + /** + * The class of status codes between 300 and 399. + * + * Generated from protobuf enum STATUS_CLASS_3XX = 300; + */ + const STATUS_CLASS_3XX = 300; + /** + * The class of status codes between 400 and 499. + * + * Generated from protobuf enum STATUS_CLASS_4XX = 400; + */ + const STATUS_CLASS_4XX = 400; + /** + * The class of status codes between 500 and 599. + * + * Generated from protobuf enum STATUS_CLASS_5XX = 500; + */ + const STATUS_CLASS_5XX = 500; + /** + * The class of all status codes. + * + * Generated from protobuf enum STATUS_CLASS_ANY = 1000; + */ + const STATUS_CLASS_ANY = 1000; + + private static $valueToName = [ + self::STATUS_CLASS_UNSPECIFIED => 'STATUS_CLASS_UNSPECIFIED', + self::STATUS_CLASS_1XX => 'STATUS_CLASS_1XX', + self::STATUS_CLASS_2XX => 'STATUS_CLASS_2XX', + self::STATUS_CLASS_3XX => 'STATUS_CLASS_3XX', + self::STATUS_CLASS_4XX => 'STATUS_CLASS_4XX', + self::STATUS_CLASS_5XX => 'STATUS_CLASS_5XX', + self::STATUS_CLASS_ANY => 'STATUS_CLASS_ANY', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(StatusClass::class, \Google\Cloud\Monitoring\V3\UptimeCheckConfig_HttpCheck_ResponseStatusCode_StatusClass::class); + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/HttpCheck/ServiceAgentAuthentication.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/HttpCheck/ServiceAgentAuthentication.php new file mode 100644 index 000000000000..2a119dd51c0a --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/HttpCheck/ServiceAgentAuthentication.php @@ -0,0 +1,74 @@ +google.monitoring.v3.UptimeCheckConfig.HttpCheck.ServiceAgentAuthentication + */ +class ServiceAgentAuthentication extends \Google\Protobuf\Internal\Message +{ + /** + * Type of authentication. + * + * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.HttpCheck.ServiceAgentAuthentication.ServiceAgentAuthenticationType type = 1; + */ + protected $type = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $type + * Type of authentication. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\Uptime::initOnce(); + parent::__construct($data); + } + + /** + * Type of authentication. + * + * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.HttpCheck.ServiceAgentAuthentication.ServiceAgentAuthenticationType type = 1; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Type of authentication. + * + * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.HttpCheck.ServiceAgentAuthentication.ServiceAgentAuthenticationType type = 1; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Monitoring\V3\UptimeCheckConfig\HttpCheck\ServiceAgentAuthentication\ServiceAgentAuthenticationType::class); + $this->type = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ServiceAgentAuthentication::class, \Google\Cloud\Monitoring\V3\UptimeCheckConfig_HttpCheck_ServiceAgentAuthentication::class); + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/HttpCheck/ServiceAgentAuthentication/ServiceAgentAuthenticationType.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/HttpCheck/ServiceAgentAuthentication/ServiceAgentAuthenticationType.php new file mode 100644 index 000000000000..8b14271b462a --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/HttpCheck/ServiceAgentAuthentication/ServiceAgentAuthenticationType.php @@ -0,0 +1,57 @@ +google.monitoring.v3.UptimeCheckConfig.HttpCheck.ServiceAgentAuthentication.ServiceAgentAuthenticationType + */ +class ServiceAgentAuthenticationType +{ + /** + * Default value, will result in OIDC Authentication. + * + * Generated from protobuf enum SERVICE_AGENT_AUTHENTICATION_TYPE_UNSPECIFIED = 0; + */ + const SERVICE_AGENT_AUTHENTICATION_TYPE_UNSPECIFIED = 0; + /** + * OIDC Authentication + * + * Generated from protobuf enum OIDC_TOKEN = 1; + */ + const OIDC_TOKEN = 1; + + private static $valueToName = [ + self::SERVICE_AGENT_AUTHENTICATION_TYPE_UNSPECIFIED => 'SERVICE_AGENT_AUTHENTICATION_TYPE_UNSPECIFIED', + self::OIDC_TOKEN => 'OIDC_TOKEN', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ServiceAgentAuthenticationType::class, \Google\Cloud\Monitoring\V3\UptimeCheckConfig_HttpCheck_ServiceAgentAuthentication_ServiceAgentAuthenticationType::class); + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/PingConfig.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/PingConfig.php new file mode 100644 index 000000000000..ae85d7f10477 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/PingConfig.php @@ -0,0 +1,72 @@ +google.monitoring.v3.UptimeCheckConfig.PingConfig + */ +class PingConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Number of ICMP pings. A maximum of 3 ICMP pings is currently supported. + * + * Generated from protobuf field int32 pings_count = 1; + */ + protected $pings_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $pings_count + * Number of ICMP pings. A maximum of 3 ICMP pings is currently supported. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\Uptime::initOnce(); + parent::__construct($data); + } + + /** + * Number of ICMP pings. A maximum of 3 ICMP pings is currently supported. + * + * Generated from protobuf field int32 pings_count = 1; + * @return int + */ + public function getPingsCount() + { + return $this->pings_count; + } + + /** + * Number of ICMP pings. A maximum of 3 ICMP pings is currently supported. + * + * Generated from protobuf field int32 pings_count = 1; + * @param int $var + * @return $this + */ + public function setPingsCount($var) + { + GPBUtil::checkInt32($var); + $this->pings_count = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(PingConfig::class, \Google\Cloud\Monitoring\V3\UptimeCheckConfig_PingConfig::class); + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/ResourceGroup.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/ResourceGroup.php new file mode 100644 index 000000000000..25ef6cb80c61 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/ResourceGroup.php @@ -0,0 +1,113 @@ +google.monitoring.v3.UptimeCheckConfig.ResourceGroup + */ +class ResourceGroup extends \Google\Protobuf\Internal\Message +{ + /** + * The group of resources being monitored. Should be only the `[GROUP_ID]`, + * and not the full-path + * `projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID]`. + * + * Generated from protobuf field string group_id = 1; + */ + protected $group_id = ''; + /** + * The resource type of the group members. + * + * Generated from protobuf field .google.monitoring.v3.GroupResourceType resource_type = 2; + */ + protected $resource_type = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $group_id + * The group of resources being monitored. Should be only the `[GROUP_ID]`, + * and not the full-path + * `projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID]`. + * @type int $resource_type + * The resource type of the group members. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\Uptime::initOnce(); + parent::__construct($data); + } + + /** + * The group of resources being monitored. Should be only the `[GROUP_ID]`, + * and not the full-path + * `projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID]`. + * + * Generated from protobuf field string group_id = 1; + * @return string + */ + public function getGroupId() + { + return $this->group_id; + } + + /** + * The group of resources being monitored. Should be only the `[GROUP_ID]`, + * and not the full-path + * `projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID]`. + * + * Generated from protobuf field string group_id = 1; + * @param string $var + * @return $this + */ + public function setGroupId($var) + { + GPBUtil::checkString($var, True); + $this->group_id = $var; + + return $this; + } + + /** + * The resource type of the group members. + * + * Generated from protobuf field .google.monitoring.v3.GroupResourceType resource_type = 2; + * @return int + */ + public function getResourceType() + { + return $this->resource_type; + } + + /** + * The resource type of the group members. + * + * Generated from protobuf field .google.monitoring.v3.GroupResourceType resource_type = 2; + * @param int $var + * @return $this + */ + public function setResourceType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Monitoring\V3\GroupResourceType::class); + $this->resource_type = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ResourceGroup::class, \Google\Cloud\Monitoring\V3\UptimeCheckConfig_ResourceGroup::class); + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/TcpCheck.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/TcpCheck.php new file mode 100644 index 000000000000..09c0668c3b3b --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/TcpCheck.php @@ -0,0 +1,122 @@ +google.monitoring.v3.UptimeCheckConfig.TcpCheck + */ +class TcpCheck extends \Google\Protobuf\Internal\Message +{ + /** + * The TCP port on the server against which to run the check. Will be + * combined with host (specified within the `monitored_resource`) to + * construct the full URL. Required. + * + * Generated from protobuf field int32 port = 1; + */ + protected $port = 0; + /** + * Contains information needed to add pings to a TCP check. + * + * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.PingConfig ping_config = 2; + */ + protected $ping_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $port + * The TCP port on the server against which to run the check. Will be + * combined with host (specified within the `monitored_resource`) to + * construct the full URL. Required. + * @type \Google\Cloud\Monitoring\V3\UptimeCheckConfig\PingConfig $ping_config + * Contains information needed to add pings to a TCP check. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\Uptime::initOnce(); + parent::__construct($data); + } + + /** + * The TCP port on the server against which to run the check. Will be + * combined with host (specified within the `monitored_resource`) to + * construct the full URL. Required. + * + * Generated from protobuf field int32 port = 1; + * @return int + */ + public function getPort() + { + return $this->port; + } + + /** + * The TCP port on the server against which to run the check. Will be + * combined with host (specified within the `monitored_resource`) to + * construct the full URL. Required. + * + * Generated from protobuf field int32 port = 1; + * @param int $var + * @return $this + */ + public function setPort($var) + { + GPBUtil::checkInt32($var); + $this->port = $var; + + return $this; + } + + /** + * Contains information needed to add pings to a TCP check. + * + * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.PingConfig ping_config = 2; + * @return \Google\Cloud\Monitoring\V3\UptimeCheckConfig\PingConfig|null + */ + public function getPingConfig() + { + return $this->ping_config; + } + + public function hasPingConfig() + { + return isset($this->ping_config); + } + + public function clearPingConfig() + { + unset($this->ping_config); + } + + /** + * Contains information needed to add pings to a TCP check. + * + * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.PingConfig ping_config = 2; + * @param \Google\Cloud\Monitoring\V3\UptimeCheckConfig\PingConfig $var + * @return $this + */ + public function setPingConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\UptimeCheckConfig\PingConfig::class); + $this->ping_config = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(TcpCheck::class, \Google\Cloud\Monitoring\V3\UptimeCheckConfig_TcpCheck::class); + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckIp.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckIp.php new file mode 100644 index 000000000000..8eb3b2a696b7 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckIp.php @@ -0,0 +1,160 @@ +google.monitoring.v3.UptimeCheckIp + */ +class UptimeCheckIp extends \Google\Protobuf\Internal\Message +{ + /** + * A broad region category in which the IP address is located. + * + * Generated from protobuf field .google.monitoring.v3.UptimeCheckRegion region = 1; + */ + protected $region = 0; + /** + * A more specific location within the region that typically encodes + * a particular city/town/metro (and its containing state/province or country) + * within the broader umbrella region category. + * + * Generated from protobuf field string location = 2; + */ + protected $location = ''; + /** + * The IP address from which the Uptime check originates. This is a fully + * specified IP address (not an IP address range). Most IP addresses, as of + * this publication, are in IPv4 format; however, one should not rely on the + * IP addresses being in IPv4 format indefinitely, and should support + * interpreting this field in either IPv4 or IPv6 format. + * + * Generated from protobuf field string ip_address = 3; + */ + protected $ip_address = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $region + * A broad region category in which the IP address is located. + * @type string $location + * A more specific location within the region that typically encodes + * a particular city/town/metro (and its containing state/province or country) + * within the broader umbrella region category. + * @type string $ip_address + * The IP address from which the Uptime check originates. This is a fully + * specified IP address (not an IP address range). Most IP addresses, as of + * this publication, are in IPv4 format; however, one should not rely on the + * IP addresses being in IPv4 format indefinitely, and should support + * interpreting this field in either IPv4 or IPv6 format. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\Uptime::initOnce(); + parent::__construct($data); + } + + /** + * A broad region category in which the IP address is located. + * + * Generated from protobuf field .google.monitoring.v3.UptimeCheckRegion region = 1; + * @return int + */ + public function getRegion() + { + return $this->region; + } + + /** + * A broad region category in which the IP address is located. + * + * Generated from protobuf field .google.monitoring.v3.UptimeCheckRegion region = 1; + * @param int $var + * @return $this + */ + public function setRegion($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Monitoring\V3\UptimeCheckRegion::class); + $this->region = $var; + + return $this; + } + + /** + * A more specific location within the region that typically encodes + * a particular city/town/metro (and its containing state/province or country) + * within the broader umbrella region category. + * + * Generated from protobuf field string location = 2; + * @return string + */ + public function getLocation() + { + return $this->location; + } + + /** + * A more specific location within the region that typically encodes + * a particular city/town/metro (and its containing state/province or country) + * within the broader umbrella region category. + * + * Generated from protobuf field string location = 2; + * @param string $var + * @return $this + */ + public function setLocation($var) + { + GPBUtil::checkString($var, True); + $this->location = $var; + + return $this; + } + + /** + * The IP address from which the Uptime check originates. This is a fully + * specified IP address (not an IP address range). Most IP addresses, as of + * this publication, are in IPv4 format; however, one should not rely on the + * IP addresses being in IPv4 format indefinitely, and should support + * interpreting this field in either IPv4 or IPv6 format. + * + * Generated from protobuf field string ip_address = 3; + * @return string + */ + public function getIpAddress() + { + return $this->ip_address; + } + + /** + * The IP address from which the Uptime check originates. This is a fully + * specified IP address (not an IP address range). Most IP addresses, as of + * this publication, are in IPv4 format; however, one should not rely on the + * IP addresses being in IPv4 format indefinitely, and should support + * interpreting this field in either IPv4 or IPv6 format. + * + * Generated from protobuf field string ip_address = 3; + * @param string $var + * @return $this + */ + public function setIpAddress($var) + { + GPBUtil::checkString($var, True); + $this->ip_address = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckRegion.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckRegion.php new file mode 100644 index 000000000000..8524b68cf0f7 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckRegion.php @@ -0,0 +1,102 @@ +google.monitoring.v3.UptimeCheckRegion + */ +class UptimeCheckRegion +{ + /** + * Default value if no region is specified. Will result in Uptime checks + * running from all regions. + * + * Generated from protobuf enum REGION_UNSPECIFIED = 0; + */ + const REGION_UNSPECIFIED = 0; + /** + * Allows checks to run from locations within the United States of America. + * + * Generated from protobuf enum USA = 1; + */ + const USA = 1; + /** + * Allows checks to run from locations within the continent of Europe. + * + * Generated from protobuf enum EUROPE = 2; + */ + const EUROPE = 2; + /** + * Allows checks to run from locations within the continent of South + * America. + * + * Generated from protobuf enum SOUTH_AMERICA = 3; + */ + const SOUTH_AMERICA = 3; + /** + * Allows checks to run from locations within the Asia Pacific area (ex: + * Singapore). + * + * Generated from protobuf enum ASIA_PACIFIC = 4; + */ + const ASIA_PACIFIC = 4; + /** + * Allows checks to run from locations within the western United States of + * America + * + * Generated from protobuf enum USA_OREGON = 5; + */ + const USA_OREGON = 5; + /** + * Allows checks to run from locations within the central United States of + * America + * + * Generated from protobuf enum USA_IOWA = 6; + */ + const USA_IOWA = 6; + /** + * Allows checks to run from locations within the eastern United States of + * America + * + * Generated from protobuf enum USA_VIRGINIA = 7; + */ + const USA_VIRGINIA = 7; + + private static $valueToName = [ + self::REGION_UNSPECIFIED => 'REGION_UNSPECIFIED', + self::USA => 'USA', + self::EUROPE => 'EUROPE', + self::SOUTH_AMERICA => 'SOUTH_AMERICA', + self::ASIA_PACIFIC => 'ASIA_PACIFIC', + self::USA_OREGON => 'USA_OREGON', + self::USA_IOWA => 'USA_IOWA', + self::USA_VIRGINIA => 'USA_VIRGINIA', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/VerifyNotificationChannelRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/VerifyNotificationChannelRequest.php new file mode 100644 index 000000000000..95410209d065 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/VerifyNotificationChannelRequest.php @@ -0,0 +1,147 @@ +google.monitoring.v3.VerifyNotificationChannelRequest + */ +class VerifyNotificationChannelRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The notification channel to verify. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. The verification code that was delivered to the channel as + * a result of invoking the `SendNotificationChannelVerificationCode` API + * method or that was retrieved from a verified channel via + * `GetNotificationChannelVerificationCode`. For example, one might have + * "G-123456" or "TKNZGhhd2EyN3I1MnRnMjRv" (in general, one is only + * guaranteed that the code is valid UTF-8; one should not + * make any assumptions regarding the structure or format of the code). + * + * Generated from protobuf field string code = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $code = ''; + + /** + * @param string $name Required. The notification channel to verify. Please see + * {@see NotificationChannelServiceClient::notificationChannelName()} for help formatting this field. + * @param string $code Required. The verification code that was delivered to the channel as + * a result of invoking the `SendNotificationChannelVerificationCode` API + * method or that was retrieved from a verified channel via + * `GetNotificationChannelVerificationCode`. For example, one might have + * "G-123456" or "TKNZGhhd2EyN3I1MnRnMjRv" (in general, one is only + * guaranteed that the code is valid UTF-8; one should not + * make any assumptions regarding the structure or format of the code). + * + * @return \Google\Cloud\Monitoring\V3\VerifyNotificationChannelRequest + * + * @experimental + */ + public static function build(string $name, string $code): self + { + return (new self()) + ->setName($name) + ->setCode($code); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The notification channel to verify. + * @type string $code + * Required. The verification code that was delivered to the channel as + * a result of invoking the `SendNotificationChannelVerificationCode` API + * method or that was retrieved from a verified channel via + * `GetNotificationChannelVerificationCode`. For example, one might have + * "G-123456" or "TKNZGhhd2EyN3I1MnRnMjRv" (in general, one is only + * guaranteed that the code is valid UTF-8; one should not + * make any assumptions regarding the structure or format of the code). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\NotificationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The notification channel to verify. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The notification channel to verify. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. The verification code that was delivered to the channel as + * a result of invoking the `SendNotificationChannelVerificationCode` API + * method or that was retrieved from a verified channel via + * `GetNotificationChannelVerificationCode`. For example, one might have + * "G-123456" or "TKNZGhhd2EyN3I1MnRnMjRv" (in general, one is only + * guaranteed that the code is valid UTF-8; one should not + * make any assumptions regarding the structure or format of the code). + * + * Generated from protobuf field string code = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getCode() + { + return $this->code; + } + + /** + * Required. The verification code that was delivered to the channel as + * a result of invoking the `SendNotificationChannelVerificationCode` API + * method or that was retrieved from a verified channel via + * `GetNotificationChannelVerificationCode`. For example, one might have + * "G-123456" or "TKNZGhhd2EyN3I1MnRnMjRv" (in general, one is only + * guaranteed that the code is valid UTF-8; one should not + * make any assumptions regarding the structure or format of the code). + * + * Generated from protobuf field string code = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setCode($var) + { + GPBUtil::checkString($var, True); + $this->code = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/WindowsBasedSli.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/WindowsBasedSli.php new file mode 100644 index 000000000000..f049ead8c434 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/WindowsBasedSli.php @@ -0,0 +1,236 @@ +google.monitoring.v3.WindowsBasedSli + */ +class WindowsBasedSli extends \Google\Protobuf\Internal\Message +{ + /** + * Duration over which window quality is evaluated. Must be an integer + * fraction of a day and at least `60s`. + * + * Generated from protobuf field .google.protobuf.Duration window_period = 4; + */ + protected $window_period = null; + protected $window_criterion; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $good_bad_metric_filter + * A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) + * specifying a `TimeSeries` with `ValueType = BOOL`. The window is good if + * any `true` values appear in the window. + * @type \Google\Cloud\Monitoring\V3\WindowsBasedSli\PerformanceThreshold $good_total_ratio_threshold + * A window is good if its `performance` is high enough. + * @type \Google\Cloud\Monitoring\V3\WindowsBasedSli\MetricRange $metric_mean_in_range + * A window is good if the metric's value is in a good range, averaged + * across returned streams. + * @type \Google\Cloud\Monitoring\V3\WindowsBasedSli\MetricRange $metric_sum_in_range + * A window is good if the metric's value is in a good range, summed across + * returned streams. + * @type \Google\Protobuf\Duration $window_period + * Duration over which window quality is evaluated. Must be an integer + * fraction of a day and at least `60s`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\Service::initOnce(); + parent::__construct($data); + } + + /** + * A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) + * specifying a `TimeSeries` with `ValueType = BOOL`. The window is good if + * any `true` values appear in the window. + * + * Generated from protobuf field string good_bad_metric_filter = 5; + * @return string + */ + public function getGoodBadMetricFilter() + { + return $this->readOneof(5); + } + + public function hasGoodBadMetricFilter() + { + return $this->hasOneof(5); + } + + /** + * A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) + * specifying a `TimeSeries` with `ValueType = BOOL`. The window is good if + * any `true` values appear in the window. + * + * Generated from protobuf field string good_bad_metric_filter = 5; + * @param string $var + * @return $this + */ + public function setGoodBadMetricFilter($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * A window is good if its `performance` is high enough. + * + * Generated from protobuf field .google.monitoring.v3.WindowsBasedSli.PerformanceThreshold good_total_ratio_threshold = 2; + * @return \Google\Cloud\Monitoring\V3\WindowsBasedSli\PerformanceThreshold|null + */ + public function getGoodTotalRatioThreshold() + { + return $this->readOneof(2); + } + + public function hasGoodTotalRatioThreshold() + { + return $this->hasOneof(2); + } + + /** + * A window is good if its `performance` is high enough. + * + * Generated from protobuf field .google.monitoring.v3.WindowsBasedSli.PerformanceThreshold good_total_ratio_threshold = 2; + * @param \Google\Cloud\Monitoring\V3\WindowsBasedSli\PerformanceThreshold $var + * @return $this + */ + public function setGoodTotalRatioThreshold($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\WindowsBasedSli\PerformanceThreshold::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * A window is good if the metric's value is in a good range, averaged + * across returned streams. + * + * Generated from protobuf field .google.monitoring.v3.WindowsBasedSli.MetricRange metric_mean_in_range = 6; + * @return \Google\Cloud\Monitoring\V3\WindowsBasedSli\MetricRange|null + */ + public function getMetricMeanInRange() + { + return $this->readOneof(6); + } + + public function hasMetricMeanInRange() + { + return $this->hasOneof(6); + } + + /** + * A window is good if the metric's value is in a good range, averaged + * across returned streams. + * + * Generated from protobuf field .google.monitoring.v3.WindowsBasedSli.MetricRange metric_mean_in_range = 6; + * @param \Google\Cloud\Monitoring\V3\WindowsBasedSli\MetricRange $var + * @return $this + */ + public function setMetricMeanInRange($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\WindowsBasedSli\MetricRange::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * A window is good if the metric's value is in a good range, summed across + * returned streams. + * + * Generated from protobuf field .google.monitoring.v3.WindowsBasedSli.MetricRange metric_sum_in_range = 7; + * @return \Google\Cloud\Monitoring\V3\WindowsBasedSli\MetricRange|null + */ + public function getMetricSumInRange() + { + return $this->readOneof(7); + } + + public function hasMetricSumInRange() + { + return $this->hasOneof(7); + } + + /** + * A window is good if the metric's value is in a good range, summed across + * returned streams. + * + * Generated from protobuf field .google.monitoring.v3.WindowsBasedSli.MetricRange metric_sum_in_range = 7; + * @param \Google\Cloud\Monitoring\V3\WindowsBasedSli\MetricRange $var + * @return $this + */ + public function setMetricSumInRange($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\WindowsBasedSli\MetricRange::class); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * Duration over which window quality is evaluated. Must be an integer + * fraction of a day and at least `60s`. + * + * Generated from protobuf field .google.protobuf.Duration window_period = 4; + * @return \Google\Protobuf\Duration|null + */ + public function getWindowPeriod() + { + return $this->window_period; + } + + public function hasWindowPeriod() + { + return isset($this->window_period); + } + + public function clearWindowPeriod() + { + unset($this->window_period); + } + + /** + * Duration over which window quality is evaluated. Must be an integer + * fraction of a day and at least `60s`. + * + * Generated from protobuf field .google.protobuf.Duration window_period = 4; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setWindowPeriod($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->window_period = $var; + + return $this; + } + + /** + * @return string + */ + public function getWindowCriterion() + { + return $this->whichOneof("window_criterion"); + } + +} + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/WindowsBasedSli/MetricRange.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/WindowsBasedSli/MetricRange.php new file mode 100644 index 000000000000..2a86a24e4eab --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/WindowsBasedSli/MetricRange.php @@ -0,0 +1,125 @@ +google.monitoring.v3.WindowsBasedSli.MetricRange + */ +class MetricRange extends \Google\Protobuf\Internal\Message +{ + /** + * A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) + * specifying the `TimeSeries` to use for evaluating window quality. + * + * Generated from protobuf field string time_series = 1; + */ + protected $time_series = ''; + /** + * Range of values considered "good." For a one-sided range, set one bound + * to an infinite value. + * + * Generated from protobuf field .google.monitoring.v3.Range range = 4; + */ + protected $range = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $time_series + * A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) + * specifying the `TimeSeries` to use for evaluating window quality. + * @type \Google\Cloud\Monitoring\V3\Range $range + * Range of values considered "good." For a one-sided range, set one bound + * to an infinite value. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\Service::initOnce(); + parent::__construct($data); + } + + /** + * A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) + * specifying the `TimeSeries` to use for evaluating window quality. + * + * Generated from protobuf field string time_series = 1; + * @return string + */ + public function getTimeSeries() + { + return $this->time_series; + } + + /** + * A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) + * specifying the `TimeSeries` to use for evaluating window quality. + * + * Generated from protobuf field string time_series = 1; + * @param string $var + * @return $this + */ + public function setTimeSeries($var) + { + GPBUtil::checkString($var, True); + $this->time_series = $var; + + return $this; + } + + /** + * Range of values considered "good." For a one-sided range, set one bound + * to an infinite value. + * + * Generated from protobuf field .google.monitoring.v3.Range range = 4; + * @return \Google\Cloud\Monitoring\V3\Range|null + */ + public function getRange() + { + return $this->range; + } + + public function hasRange() + { + return isset($this->range); + } + + public function clearRange() + { + unset($this->range); + } + + /** + * Range of values considered "good." For a one-sided range, set one bound + * to an infinite value. + * + * Generated from protobuf field .google.monitoring.v3.Range range = 4; + * @param \Google\Cloud\Monitoring\V3\Range $var + * @return $this + */ + public function setRange($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\Range::class); + $this->range = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(MetricRange::class, \Google\Cloud\Monitoring\V3\WindowsBasedSli_MetricRange::class); + diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/WindowsBasedSli/PerformanceThreshold.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/WindowsBasedSli/PerformanceThreshold.php new file mode 100644 index 000000000000..7ff22f3a6770 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/WindowsBasedSli/PerformanceThreshold.php @@ -0,0 +1,146 @@ +google.monitoring.v3.WindowsBasedSli.PerformanceThreshold + */ +class PerformanceThreshold extends \Google\Protobuf\Internal\Message +{ + /** + * If window `performance >= threshold`, the window is counted as good. + * + * Generated from protobuf field double threshold = 2; + */ + protected $threshold = 0.0; + protected $type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Monitoring\V3\RequestBasedSli $performance + * `RequestBasedSli` to evaluate to judge window quality. + * @type \Google\Cloud\Monitoring\V3\BasicSli $basic_sli_performance + * `BasicSli` to evaluate to judge window quality. + * @type float $threshold + * If window `performance >= threshold`, the window is counted as good. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\Service::initOnce(); + parent::__construct($data); + } + + /** + * `RequestBasedSli` to evaluate to judge window quality. + * + * Generated from protobuf field .google.monitoring.v3.RequestBasedSli performance = 1; + * @return \Google\Cloud\Monitoring\V3\RequestBasedSli|null + */ + public function getPerformance() + { + return $this->readOneof(1); + } + + public function hasPerformance() + { + return $this->hasOneof(1); + } + + /** + * `RequestBasedSli` to evaluate to judge window quality. + * + * Generated from protobuf field .google.monitoring.v3.RequestBasedSli performance = 1; + * @param \Google\Cloud\Monitoring\V3\RequestBasedSli $var + * @return $this + */ + public function setPerformance($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\RequestBasedSli::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * `BasicSli` to evaluate to judge window quality. + * + * Generated from protobuf field .google.monitoring.v3.BasicSli basic_sli_performance = 3; + * @return \Google\Cloud\Monitoring\V3\BasicSli|null + */ + public function getBasicSliPerformance() + { + return $this->readOneof(3); + } + + public function hasBasicSliPerformance() + { + return $this->hasOneof(3); + } + + /** + * `BasicSli` to evaluate to judge window quality. + * + * Generated from protobuf field .google.monitoring.v3.BasicSli basic_sli_performance = 3; + * @param \Google\Cloud\Monitoring\V3\BasicSli $var + * @return $this + */ + public function setBasicSliPerformance($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\BasicSli::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * If window `performance >= threshold`, the window is counted as good. + * + * Generated from protobuf field double threshold = 2; + * @return float + */ + public function getThreshold() + { + return $this->threshold; + } + + /** + * If window `performance >= threshold`, the window is counted as good. + * + * Generated from protobuf field double threshold = 2; + * @param float $var + * @return $this + */ + public function setThreshold($var) + { + GPBUtil::checkDouble($var); + $this->threshold = $var; + + return $this; + } + + /** + * @return string + */ + public function getType() + { + return $this->whichOneof("type"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(PerformanceThreshold::class, \Google\Cloud\Monitoring\V3\WindowsBasedSli_PerformanceThreshold::class); + diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/AlertPolicyServiceClient/create_alert_policy.php b/owl-bot-staging/Monitoring/v3/samples/V3/AlertPolicyServiceClient/create_alert_policy.php new file mode 100644 index 000000000000..8da94f5c6a84 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/samples/V3/AlertPolicyServiceClient/create_alert_policy.php @@ -0,0 +1,88 @@ +setName($name) + ->setAlertPolicy($alertPolicy); + + // Call the API and handle any network failures. + try { + /** @var AlertPolicy $response */ + $response = $alertPolicyServiceClient->createAlertPolicy($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $name = '[NAME]'; + + create_alert_policy_sample($name); +} +// [END monitoring_v3_generated_AlertPolicyService_CreateAlertPolicy_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/AlertPolicyServiceClient/delete_alert_policy.php b/owl-bot-staging/Monitoring/v3/samples/V3/AlertPolicyServiceClient/delete_alert_policy.php new file mode 100644 index 000000000000..20341bb9cedc --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/samples/V3/AlertPolicyServiceClient/delete_alert_policy.php @@ -0,0 +1,77 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $alertPolicyServiceClient->deleteAlertPolicy($request); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = AlertPolicyServiceClient::alertPolicyName('[PROJECT]', '[ALERT_POLICY]'); + + delete_alert_policy_sample($formattedName); +} +// [END monitoring_v3_generated_AlertPolicyService_DeleteAlertPolicy_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/AlertPolicyServiceClient/get_alert_policy.php b/owl-bot-staging/Monitoring/v3/samples/V3/AlertPolicyServiceClient/get_alert_policy.php new file mode 100644 index 000000000000..a6b8ef21ad66 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/samples/V3/AlertPolicyServiceClient/get_alert_policy.php @@ -0,0 +1,73 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var AlertPolicy $response */ + $response = $alertPolicyServiceClient->getAlertPolicy($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = AlertPolicyServiceClient::alertPolicyName('[PROJECT]', '[ALERT_POLICY]'); + + get_alert_policy_sample($formattedName); +} +// [END monitoring_v3_generated_AlertPolicyService_GetAlertPolicy_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/AlertPolicyServiceClient/list_alert_policies.php b/owl-bot-staging/Monitoring/v3/samples/V3/AlertPolicyServiceClient/list_alert_policies.php new file mode 100644 index 000000000000..dc60fddad14f --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/samples/V3/AlertPolicyServiceClient/list_alert_policies.php @@ -0,0 +1,85 @@ +setName($name); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $alertPolicyServiceClient->listAlertPolicies($request); + + /** @var AlertPolicy $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $name = '[NAME]'; + + list_alert_policies_sample($name); +} +// [END monitoring_v3_generated_AlertPolicyService_ListAlertPolicies_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/AlertPolicyServiceClient/update_alert_policy.php b/owl-bot-staging/Monitoring/v3/samples/V3/AlertPolicyServiceClient/update_alert_policy.php new file mode 100644 index 000000000000..d4f9c5060ec7 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/samples/V3/AlertPolicyServiceClient/update_alert_policy.php @@ -0,0 +1,66 @@ +setAlertPolicy($alertPolicy); + + // Call the API and handle any network failures. + try { + /** @var AlertPolicy $response */ + $response = $alertPolicyServiceClient->updateAlertPolicy($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END monitoring_v3_generated_AlertPolicyService_UpdateAlertPolicy_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/GroupServiceClient/create_group.php b/owl-bot-staging/Monitoring/v3/samples/V3/GroupServiceClient/create_group.php new file mode 100644 index 000000000000..5662f185f72e --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/samples/V3/GroupServiceClient/create_group.php @@ -0,0 +1,76 @@ +setName($name) + ->setGroup($group); + + // Call the API and handle any network failures. + try { + /** @var Group $response */ + $response = $groupServiceClient->createGroup($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $name = '[NAME]'; + + create_group_sample($name); +} +// [END monitoring_v3_generated_GroupService_CreateGroup_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/GroupServiceClient/delete_group.php b/owl-bot-staging/Monitoring/v3/samples/V3/GroupServiceClient/delete_group.php new file mode 100644 index 000000000000..2b0b5d393b35 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/samples/V3/GroupServiceClient/delete_group.php @@ -0,0 +1,71 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $groupServiceClient->deleteGroup($request); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = GroupServiceClient::groupName('[PROJECT]', '[GROUP]'); + + delete_group_sample($formattedName); +} +// [END monitoring_v3_generated_GroupService_DeleteGroup_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/GroupServiceClient/get_group.php b/owl-bot-staging/Monitoring/v3/samples/V3/GroupServiceClient/get_group.php new file mode 100644 index 000000000000..59d00116484a --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/samples/V3/GroupServiceClient/get_group.php @@ -0,0 +1,73 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Group $response */ + $response = $groupServiceClient->getGroup($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = GroupServiceClient::groupName('[PROJECT]', '[GROUP]'); + + get_group_sample($formattedName); +} +// [END monitoring_v3_generated_GroupService_GetGroup_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/GroupServiceClient/list_group_members.php b/owl-bot-staging/Monitoring/v3/samples/V3/GroupServiceClient/list_group_members.php new file mode 100644 index 000000000000..810ef1fb51ce --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/samples/V3/GroupServiceClient/list_group_members.php @@ -0,0 +1,78 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $groupServiceClient->listGroupMembers($request); + + /** @var MonitoredResource $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = GroupServiceClient::groupName('[PROJECT]', '[GROUP]'); + + list_group_members_sample($formattedName); +} +// [END monitoring_v3_generated_GroupService_ListGroupMembers_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/GroupServiceClient/list_groups.php b/owl-bot-staging/Monitoring/v3/samples/V3/GroupServiceClient/list_groups.php new file mode 100644 index 000000000000..073f54a6f17e --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/samples/V3/GroupServiceClient/list_groups.php @@ -0,0 +1,79 @@ +setName($name); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $groupServiceClient->listGroups($request); + + /** @var Group $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $name = '[NAME]'; + + list_groups_sample($name); +} +// [END monitoring_v3_generated_GroupService_ListGroups_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/GroupServiceClient/update_group.php b/owl-bot-staging/Monitoring/v3/samples/V3/GroupServiceClient/update_group.php new file mode 100644 index 000000000000..58d8ed1e52b3 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/samples/V3/GroupServiceClient/update_group.php @@ -0,0 +1,60 @@ +setGroup($group); + + // Call the API and handle any network failures. + try { + /** @var Group $response */ + $response = $groupServiceClient->updateGroup($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END monitoring_v3_generated_GroupService_UpdateGroup_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/MetricServiceClient/create_metric_descriptor.php b/owl-bot-staging/Monitoring/v3/samples/V3/MetricServiceClient/create_metric_descriptor.php new file mode 100644 index 000000000000..c54f10ba5a8b --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/samples/V3/MetricServiceClient/create_metric_descriptor.php @@ -0,0 +1,81 @@ +setName($name) + ->setMetricDescriptor($metricDescriptor); + + // Call the API and handle any network failures. + try { + /** @var MetricDescriptor $response */ + $response = $metricServiceClient->createMetricDescriptor($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $name = '[NAME]'; + + create_metric_descriptor_sample($name); +} +// [END monitoring_v3_generated_MetricService_CreateMetricDescriptor_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/MetricServiceClient/create_service_time_series.php b/owl-bot-staging/Monitoring/v3/samples/V3/MetricServiceClient/create_service_time_series.php new file mode 100644 index 000000000000..3676da8a884a --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/samples/V3/MetricServiceClient/create_service_time_series.php @@ -0,0 +1,84 @@ +setName($formattedName) + ->setTimeSeries($timeSeries); + + // Call the API and handle any network failures. + try { + $metricServiceClient->createServiceTimeSeries($request); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = MetricServiceClient::projectName('[PROJECT]'); + + create_service_time_series_sample($formattedName); +} +// [END monitoring_v3_generated_MetricService_CreateServiceTimeSeries_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/MetricServiceClient/create_time_series.php b/owl-bot-staging/Monitoring/v3/samples/V3/MetricServiceClient/create_time_series.php new file mode 100644 index 000000000000..943e3d74156e --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/samples/V3/MetricServiceClient/create_time_series.php @@ -0,0 +1,82 @@ +setName($formattedName) + ->setTimeSeries($timeSeries); + + // Call the API and handle any network failures. + try { + $metricServiceClient->createTimeSeries($request); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = MetricServiceClient::projectName('[PROJECT]'); + + create_time_series_sample($formattedName); +} +// [END monitoring_v3_generated_MetricService_CreateTimeSeries_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/MetricServiceClient/delete_metric_descriptor.php b/owl-bot-staging/Monitoring/v3/samples/V3/MetricServiceClient/delete_metric_descriptor.php new file mode 100644 index 000000000000..5be71ec658ad --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/samples/V3/MetricServiceClient/delete_metric_descriptor.php @@ -0,0 +1,77 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $metricServiceClient->deleteMetricDescriptor($request); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = MetricServiceClient::metricDescriptorName('[PROJECT]', '[METRIC_DESCRIPTOR]'); + + delete_metric_descriptor_sample($formattedName); +} +// [END monitoring_v3_generated_MetricService_DeleteMetricDescriptor_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/MetricServiceClient/get_metric_descriptor.php b/owl-bot-staging/Monitoring/v3/samples/V3/MetricServiceClient/get_metric_descriptor.php new file mode 100644 index 000000000000..f1733d7ebcf3 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/samples/V3/MetricServiceClient/get_metric_descriptor.php @@ -0,0 +1,77 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var MetricDescriptor $response */ + $response = $metricServiceClient->getMetricDescriptor($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = MetricServiceClient::metricDescriptorName('[PROJECT]', '[METRIC_DESCRIPTOR]'); + + get_metric_descriptor_sample($formattedName); +} +// [END monitoring_v3_generated_MetricService_GetMetricDescriptor_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/MetricServiceClient/get_monitored_resource_descriptor.php b/owl-bot-staging/Monitoring/v3/samples/V3/MetricServiceClient/get_monitored_resource_descriptor.php new file mode 100644 index 000000000000..b80928f31d40 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/samples/V3/MetricServiceClient/get_monitored_resource_descriptor.php @@ -0,0 +1,79 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var MonitoredResourceDescriptor $response */ + $response = $metricServiceClient->getMonitoredResourceDescriptor($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = MetricServiceClient::monitoredResourceDescriptorName( + '[PROJECT]', + '[MONITORED_RESOURCE_DESCRIPTOR]' + ); + + get_monitored_resource_descriptor_sample($formattedName); +} +// [END monitoring_v3_generated_MetricService_GetMonitoredResourceDescriptor_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/MetricServiceClient/list_metric_descriptors.php b/owl-bot-staging/Monitoring/v3/samples/V3/MetricServiceClient/list_metric_descriptors.php new file mode 100644 index 000000000000..2a60d376cdf4 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/samples/V3/MetricServiceClient/list_metric_descriptors.php @@ -0,0 +1,79 @@ +setName($name); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $metricServiceClient->listMetricDescriptors($request); + + /** @var MetricDescriptor $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $name = '[NAME]'; + + list_metric_descriptors_sample($name); +} +// [END monitoring_v3_generated_MetricService_ListMetricDescriptors_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/MetricServiceClient/list_monitored_resource_descriptors.php b/owl-bot-staging/Monitoring/v3/samples/V3/MetricServiceClient/list_monitored_resource_descriptors.php new file mode 100644 index 000000000000..8594af87cfce --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/samples/V3/MetricServiceClient/list_monitored_resource_descriptors.php @@ -0,0 +1,79 @@ +setName($name); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $metricServiceClient->listMonitoredResourceDescriptors($request); + + /** @var MonitoredResourceDescriptor $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $name = '[NAME]'; + + list_monitored_resource_descriptors_sample($name); +} +// [END monitoring_v3_generated_MetricService_ListMonitoredResourceDescriptors_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/MetricServiceClient/list_time_series.php b/owl-bot-staging/Monitoring/v3/samples/V3/MetricServiceClient/list_time_series.php new file mode 100644 index 000000000000..2d408169cc27 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/samples/V3/MetricServiceClient/list_time_series.php @@ -0,0 +1,99 @@ +setName($formattedName) + ->setFilter($filter) + ->setInterval($interval) + ->setView($view); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $metricServiceClient->listTimeSeries($request); + + /** @var TimeSeries $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = MetricServiceClient::workspaceName('[PROJECT]'); + $filter = '[FILTER]'; + $view = TimeSeriesView::FULL; + + list_time_series_sample($formattedName, $filter, $view); +} +// [END monitoring_v3_generated_MetricService_ListTimeSeries_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/NotificationChannelServiceClient/create_notification_channel.php b/owl-bot-staging/Monitoring/v3/samples/V3/NotificationChannelServiceClient/create_notification_channel.php new file mode 100644 index 000000000000..4e2647ee0231 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/samples/V3/NotificationChannelServiceClient/create_notification_channel.php @@ -0,0 +1,87 @@ +setName($name) + ->setNotificationChannel($notificationChannel); + + // Call the API and handle any network failures. + try { + /** @var NotificationChannel $response */ + $response = $notificationChannelServiceClient->createNotificationChannel($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $name = '[NAME]'; + + create_notification_channel_sample($name); +} +// [END monitoring_v3_generated_NotificationChannelService_CreateNotificationChannel_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/NotificationChannelServiceClient/delete_notification_channel.php b/owl-bot-staging/Monitoring/v3/samples/V3/NotificationChannelServiceClient/delete_notification_channel.php new file mode 100644 index 000000000000..1af1aacc41e0 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/samples/V3/NotificationChannelServiceClient/delete_notification_channel.php @@ -0,0 +1,79 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $notificationChannelServiceClient->deleteNotificationChannel($request); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NotificationChannelServiceClient::notificationChannelName( + '[PROJECT]', + '[NOTIFICATION_CHANNEL]' + ); + + delete_notification_channel_sample($formattedName); +} +// [END monitoring_v3_generated_NotificationChannelService_DeleteNotificationChannel_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/NotificationChannelServiceClient/get_notification_channel.php b/owl-bot-staging/Monitoring/v3/samples/V3/NotificationChannelServiceClient/get_notification_channel.php new file mode 100644 index 000000000000..a1efeebeec4a --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/samples/V3/NotificationChannelServiceClient/get_notification_channel.php @@ -0,0 +1,80 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var NotificationChannel $response */ + $response = $notificationChannelServiceClient->getNotificationChannel($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NotificationChannelServiceClient::notificationChannelName( + '[PROJECT]', + '[NOTIFICATION_CHANNEL]' + ); + + get_notification_channel_sample($formattedName); +} +// [END monitoring_v3_generated_NotificationChannelService_GetNotificationChannel_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/NotificationChannelServiceClient/get_notification_channel_descriptor.php b/owl-bot-staging/Monitoring/v3/samples/V3/NotificationChannelServiceClient/get_notification_channel_descriptor.php new file mode 100644 index 000000000000..3f4bc0a77317 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/samples/V3/NotificationChannelServiceClient/get_notification_channel_descriptor.php @@ -0,0 +1,77 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var NotificationChannelDescriptor $response */ + $response = $notificationChannelServiceClient->getNotificationChannelDescriptor($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NotificationChannelServiceClient::notificationChannelDescriptorName( + '[PROJECT]', + '[CHANNEL_DESCRIPTOR]' + ); + + get_notification_channel_descriptor_sample($formattedName); +} +// [END monitoring_v3_generated_NotificationChannelService_GetNotificationChannelDescriptor_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/NotificationChannelServiceClient/get_notification_channel_verification_code.php b/owl-bot-staging/Monitoring/v3/samples/V3/NotificationChannelServiceClient/get_notification_channel_verification_code.php new file mode 100644 index 000000000000..a63472001e29 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/samples/V3/NotificationChannelServiceClient/get_notification_channel_verification_code.php @@ -0,0 +1,96 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var GetNotificationChannelVerificationCodeResponse $response */ + $response = $notificationChannelServiceClient->getNotificationChannelVerificationCode($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NotificationChannelServiceClient::notificationChannelName( + '[PROJECT]', + '[NOTIFICATION_CHANNEL]' + ); + + get_notification_channel_verification_code_sample($formattedName); +} +// [END monitoring_v3_generated_NotificationChannelService_GetNotificationChannelVerificationCode_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/NotificationChannelServiceClient/list_notification_channel_descriptors.php b/owl-bot-staging/Monitoring/v3/samples/V3/NotificationChannelServiceClient/list_notification_channel_descriptors.php new file mode 100644 index 000000000000..0382fad734f1 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/samples/V3/NotificationChannelServiceClient/list_notification_channel_descriptors.php @@ -0,0 +1,86 @@ +setName($name); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $notificationChannelServiceClient->listNotificationChannelDescriptors($request); + + /** @var NotificationChannelDescriptor $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $name = '[NAME]'; + + list_notification_channel_descriptors_sample($name); +} +// [END monitoring_v3_generated_NotificationChannelService_ListNotificationChannelDescriptors_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/NotificationChannelServiceClient/list_notification_channels.php b/owl-bot-staging/Monitoring/v3/samples/V3/NotificationChannelServiceClient/list_notification_channels.php new file mode 100644 index 000000000000..4a236f89c3ab --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/samples/V3/NotificationChannelServiceClient/list_notification_channels.php @@ -0,0 +1,88 @@ +setName($name); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $notificationChannelServiceClient->listNotificationChannels($request); + + /** @var NotificationChannel $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $name = '[NAME]'; + + list_notification_channels_sample($name); +} +// [END monitoring_v3_generated_NotificationChannelService_ListNotificationChannels_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/NotificationChannelServiceClient/send_notification_channel_verification_code.php b/owl-bot-staging/Monitoring/v3/samples/V3/NotificationChannelServiceClient/send_notification_channel_verification_code.php new file mode 100644 index 000000000000..b8810b7a3018 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/samples/V3/NotificationChannelServiceClient/send_notification_channel_verification_code.php @@ -0,0 +1,73 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $notificationChannelServiceClient->sendNotificationChannelVerificationCode($request); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NotificationChannelServiceClient::notificationChannelName( + '[PROJECT]', + '[NOTIFICATION_CHANNEL]' + ); + + send_notification_channel_verification_code_sample($formattedName); +} +// [END monitoring_v3_generated_NotificationChannelService_SendNotificationChannelVerificationCode_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/NotificationChannelServiceClient/update_notification_channel.php b/owl-bot-staging/Monitoring/v3/samples/V3/NotificationChannelServiceClient/update_notification_channel.php new file mode 100644 index 000000000000..ad79286eff6b --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/samples/V3/NotificationChannelServiceClient/update_notification_channel.php @@ -0,0 +1,65 @@ +setNotificationChannel($notificationChannel); + + // Call the API and handle any network failures. + try { + /** @var NotificationChannel $response */ + $response = $notificationChannelServiceClient->updateNotificationChannel($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END monitoring_v3_generated_NotificationChannelService_UpdateNotificationChannel_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/NotificationChannelServiceClient/verify_notification_channel.php b/owl-bot-staging/Monitoring/v3/samples/V3/NotificationChannelServiceClient/verify_notification_channel.php new file mode 100644 index 000000000000..7603415aff57 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/samples/V3/NotificationChannelServiceClient/verify_notification_channel.php @@ -0,0 +1,85 @@ +setName($formattedName) + ->setCode($code); + + // Call the API and handle any network failures. + try { + /** @var NotificationChannel $response */ + $response = $notificationChannelServiceClient->verifyNotificationChannel($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NotificationChannelServiceClient::notificationChannelName( + '[PROJECT]', + '[NOTIFICATION_CHANNEL]' + ); + $code = '[CODE]'; + + verify_notification_channel_sample($formattedName, $code); +} +// [END monitoring_v3_generated_NotificationChannelService_VerifyNotificationChannel_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/QueryServiceClient/query_time_series.php b/owl-bot-staging/Monitoring/v3/samples/V3/QueryServiceClient/query_time_series.php new file mode 100644 index 000000000000..c9e9a6166ae4 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/samples/V3/QueryServiceClient/query_time_series.php @@ -0,0 +1,84 @@ +setName($name) + ->setQuery($query); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $queryServiceClient->queryTimeSeries($request); + + /** @var TimeSeriesData $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $name = '[NAME]'; + $query = '[QUERY]'; + + query_time_series_sample($name, $query); +} +// [END monitoring_v3_generated_QueryService_QueryTimeSeries_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/ServiceMonitoringServiceClient/create_service.php b/owl-bot-staging/Monitoring/v3/samples/V3/ServiceMonitoringServiceClient/create_service.php new file mode 100644 index 000000000000..f1cd6dae9947 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/samples/V3/ServiceMonitoringServiceClient/create_service.php @@ -0,0 +1,76 @@ +setParent($parent) + ->setService($service); + + // Call the API and handle any network failures. + try { + /** @var Service $response */ + $response = $serviceMonitoringServiceClient->createService($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $parent = '[PARENT]'; + + create_service_sample($parent); +} +// [END monitoring_v3_generated_ServiceMonitoringService_CreateService_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/ServiceMonitoringServiceClient/create_service_level_objective.php b/owl-bot-staging/Monitoring/v3/samples/V3/ServiceMonitoringServiceClient/create_service_level_objective.php new file mode 100644 index 000000000000..2559795e52e7 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/samples/V3/ServiceMonitoringServiceClient/create_service_level_objective.php @@ -0,0 +1,75 @@ +setParent($formattedParent) + ->setServiceLevelObjective($serviceLevelObjective); + + // Call the API and handle any network failures. + try { + /** @var ServiceLevelObjective $response */ + $response = $serviceMonitoringServiceClient->createServiceLevelObjective($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = ServiceMonitoringServiceClient::serviceName('[PROJECT]', '[SERVICE]'); + + create_service_level_objective_sample($formattedParent); +} +// [END monitoring_v3_generated_ServiceMonitoringService_CreateServiceLevelObjective_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/ServiceMonitoringServiceClient/delete_service.php b/owl-bot-staging/Monitoring/v3/samples/V3/ServiceMonitoringServiceClient/delete_service.php new file mode 100644 index 000000000000..dd319f9e6108 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/samples/V3/ServiceMonitoringServiceClient/delete_service.php @@ -0,0 +1,71 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $serviceMonitoringServiceClient->deleteService($request); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ServiceMonitoringServiceClient::serviceName('[PROJECT]', '[SERVICE]'); + + delete_service_sample($formattedName); +} +// [END monitoring_v3_generated_ServiceMonitoringService_DeleteService_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/ServiceMonitoringServiceClient/delete_service_level_objective.php b/owl-bot-staging/Monitoring/v3/samples/V3/ServiceMonitoringServiceClient/delete_service_level_objective.php new file mode 100644 index 000000000000..ca3c81872464 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/samples/V3/ServiceMonitoringServiceClient/delete_service_level_objective.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $serviceMonitoringServiceClient->deleteServiceLevelObjective($request); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ServiceMonitoringServiceClient::serviceLevelObjectiveName( + '[PROJECT]', + '[SERVICE]', + '[SERVICE_LEVEL_OBJECTIVE]' + ); + + delete_service_level_objective_sample($formattedName); +} +// [END monitoring_v3_generated_ServiceMonitoringService_DeleteServiceLevelObjective_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/ServiceMonitoringServiceClient/get_service.php b/owl-bot-staging/Monitoring/v3/samples/V3/ServiceMonitoringServiceClient/get_service.php new file mode 100644 index 000000000000..cb12b2fcac7f --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/samples/V3/ServiceMonitoringServiceClient/get_service.php @@ -0,0 +1,73 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Service $response */ + $response = $serviceMonitoringServiceClient->getService($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ServiceMonitoringServiceClient::serviceName('[PROJECT]', '[SERVICE]'); + + get_service_sample($formattedName); +} +// [END monitoring_v3_generated_ServiceMonitoringService_GetService_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/ServiceMonitoringServiceClient/get_service_level_objective.php b/owl-bot-staging/Monitoring/v3/samples/V3/ServiceMonitoringServiceClient/get_service_level_objective.php new file mode 100644 index 000000000000..7bc8c814262f --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/samples/V3/ServiceMonitoringServiceClient/get_service_level_objective.php @@ -0,0 +1,78 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var ServiceLevelObjective $response */ + $response = $serviceMonitoringServiceClient->getServiceLevelObjective($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ServiceMonitoringServiceClient::serviceLevelObjectiveName( + '[PROJECT]', + '[SERVICE]', + '[SERVICE_LEVEL_OBJECTIVE]' + ); + + get_service_level_objective_sample($formattedName); +} +// [END monitoring_v3_generated_ServiceMonitoringService_GetServiceLevelObjective_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/ServiceMonitoringServiceClient/list_service_level_objectives.php b/owl-bot-staging/Monitoring/v3/samples/V3/ServiceMonitoringServiceClient/list_service_level_objectives.php new file mode 100644 index 000000000000..4476bfaaafda --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/samples/V3/ServiceMonitoringServiceClient/list_service_level_objectives.php @@ -0,0 +1,80 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $serviceMonitoringServiceClient->listServiceLevelObjectives($request); + + /** @var ServiceLevelObjective $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = ServiceMonitoringServiceClient::serviceName('[PROJECT]', '[SERVICE]'); + + list_service_level_objectives_sample($formattedParent); +} +// [END monitoring_v3_generated_ServiceMonitoringService_ListServiceLevelObjectives_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/ServiceMonitoringServiceClient/list_services.php b/owl-bot-staging/Monitoring/v3/samples/V3/ServiceMonitoringServiceClient/list_services.php new file mode 100644 index 000000000000..f1495ce77ad6 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/samples/V3/ServiceMonitoringServiceClient/list_services.php @@ -0,0 +1,80 @@ +setParent($parent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $serviceMonitoringServiceClient->listServices($request); + + /** @var Service $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $parent = '[PARENT]'; + + list_services_sample($parent); +} +// [END monitoring_v3_generated_ServiceMonitoringService_ListServices_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/ServiceMonitoringServiceClient/update_service.php b/owl-bot-staging/Monitoring/v3/samples/V3/ServiceMonitoringServiceClient/update_service.php new file mode 100644 index 000000000000..1a9fbecdfd95 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/samples/V3/ServiceMonitoringServiceClient/update_service.php @@ -0,0 +1,59 @@ +setService($service); + + // Call the API and handle any network failures. + try { + /** @var Service $response */ + $response = $serviceMonitoringServiceClient->updateService($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END monitoring_v3_generated_ServiceMonitoringService_UpdateService_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/ServiceMonitoringServiceClient/update_service_level_objective.php b/owl-bot-staging/Monitoring/v3/samples/V3/ServiceMonitoringServiceClient/update_service_level_objective.php new file mode 100644 index 000000000000..30611bd57c1b --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/samples/V3/ServiceMonitoringServiceClient/update_service_level_objective.php @@ -0,0 +1,59 @@ +setServiceLevelObjective($serviceLevelObjective); + + // Call the API and handle any network failures. + try { + /** @var ServiceLevelObjective $response */ + $response = $serviceMonitoringServiceClient->updateServiceLevelObjective($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END monitoring_v3_generated_ServiceMonitoringService_UpdateServiceLevelObjective_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/SnoozeServiceClient/create_snooze.php b/owl-bot-staging/Monitoring/v3/samples/V3/SnoozeServiceClient/create_snooze.php new file mode 100644 index 000000000000..ee2cdecb18fb --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/samples/V3/SnoozeServiceClient/create_snooze.php @@ -0,0 +1,89 @@ +setCriteria($snoozeCriteria) + ->setInterval($snoozeInterval) + ->setDisplayName($snoozeDisplayName); + $request = (new CreateSnoozeRequest()) + ->setParent($formattedParent) + ->setSnooze($snooze); + + // Call the API and handle any network failures. + try { + /** @var Snooze $response */ + $response = $snoozeServiceClient->createSnooze($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = SnoozeServiceClient::workspaceName('[PROJECT]'); + $snoozeDisplayName = '[DISPLAY_NAME]'; + + create_snooze_sample($formattedParent, $snoozeDisplayName); +} +// [END monitoring_v3_generated_SnoozeService_CreateSnooze_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/SnoozeServiceClient/get_snooze.php b/owl-bot-staging/Monitoring/v3/samples/V3/SnoozeServiceClient/get_snooze.php new file mode 100644 index 000000000000..cf467e5c3c3d --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/samples/V3/SnoozeServiceClient/get_snooze.php @@ -0,0 +1,73 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Snooze $response */ + $response = $snoozeServiceClient->getSnooze($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = SnoozeServiceClient::snoozeName('[PROJECT]', '[SNOOZE]'); + + get_snooze_sample($formattedName); +} +// [END monitoring_v3_generated_SnoozeService_GetSnooze_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/SnoozeServiceClient/list_snoozes.php b/owl-bot-staging/Monitoring/v3/samples/V3/SnoozeServiceClient/list_snoozes.php new file mode 100644 index 000000000000..f0fb94d66018 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/samples/V3/SnoozeServiceClient/list_snoozes.php @@ -0,0 +1,81 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $snoozeServiceClient->listSnoozes($request); + + /** @var Snooze $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = SnoozeServiceClient::workspaceName('[PROJECT]'); + + list_snoozes_sample($formattedParent); +} +// [END monitoring_v3_generated_SnoozeService_ListSnoozes_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/SnoozeServiceClient/update_snooze.php b/owl-bot-staging/Monitoring/v3/samples/V3/SnoozeServiceClient/update_snooze.php new file mode 100644 index 000000000000..923e1a90c280 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/samples/V3/SnoozeServiceClient/update_snooze.php @@ -0,0 +1,83 @@ +setCriteria($snoozeCriteria) + ->setInterval($snoozeInterval) + ->setDisplayName($snoozeDisplayName); + $updateMask = new FieldMask(); + $request = (new UpdateSnoozeRequest()) + ->setSnooze($snooze) + ->setUpdateMask($updateMask); + + // Call the API and handle any network failures. + try { + /** @var Snooze $response */ + $response = $snoozeServiceClient->updateSnooze($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $snoozeDisplayName = '[DISPLAY_NAME]'; + + update_snooze_sample($snoozeDisplayName); +} +// [END monitoring_v3_generated_SnoozeService_UpdateSnooze_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/UptimeCheckServiceClient/create_uptime_check_config.php b/owl-bot-staging/Monitoring/v3/samples/V3/UptimeCheckServiceClient/create_uptime_check_config.php new file mode 100644 index 000000000000..6ad37bedcda5 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/samples/V3/UptimeCheckServiceClient/create_uptime_check_config.php @@ -0,0 +1,76 @@ +setParent($parent) + ->setUptimeCheckConfig($uptimeCheckConfig); + + // Call the API and handle any network failures. + try { + /** @var UptimeCheckConfig $response */ + $response = $uptimeCheckServiceClient->createUptimeCheckConfig($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $parent = '[PARENT]'; + + create_uptime_check_config_sample($parent); +} +// [END monitoring_v3_generated_UptimeCheckService_CreateUptimeCheckConfig_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/UptimeCheckServiceClient/delete_uptime_check_config.php b/owl-bot-staging/Monitoring/v3/samples/V3/UptimeCheckServiceClient/delete_uptime_check_config.php new file mode 100644 index 000000000000..d33f28aec3ef --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/samples/V3/UptimeCheckServiceClient/delete_uptime_check_config.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $uptimeCheckServiceClient->deleteUptimeCheckConfig($request); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = UptimeCheckServiceClient::uptimeCheckConfigName( + '[PROJECT]', + '[UPTIME_CHECK_CONFIG]' + ); + + delete_uptime_check_config_sample($formattedName); +} +// [END monitoring_v3_generated_UptimeCheckService_DeleteUptimeCheckConfig_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/UptimeCheckServiceClient/get_uptime_check_config.php b/owl-bot-staging/Monitoring/v3/samples/V3/UptimeCheckServiceClient/get_uptime_check_config.php new file mode 100644 index 000000000000..a3dbc0e2c419 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/samples/V3/UptimeCheckServiceClient/get_uptime_check_config.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var UptimeCheckConfig $response */ + $response = $uptimeCheckServiceClient->getUptimeCheckConfig($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = UptimeCheckServiceClient::uptimeCheckConfigName( + '[PROJECT]', + '[UPTIME_CHECK_CONFIG]' + ); + + get_uptime_check_config_sample($formattedName); +} +// [END monitoring_v3_generated_UptimeCheckService_GetUptimeCheckConfig_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/UptimeCheckServiceClient/list_uptime_check_configs.php b/owl-bot-staging/Monitoring/v3/samples/V3/UptimeCheckServiceClient/list_uptime_check_configs.php new file mode 100644 index 000000000000..7a681db45273 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/samples/V3/UptimeCheckServiceClient/list_uptime_check_configs.php @@ -0,0 +1,80 @@ +setParent($parent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $uptimeCheckServiceClient->listUptimeCheckConfigs($request); + + /** @var UptimeCheckConfig $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $parent = '[PARENT]'; + + list_uptime_check_configs_sample($parent); +} +// [END monitoring_v3_generated_UptimeCheckService_ListUptimeCheckConfigs_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/UptimeCheckServiceClient/list_uptime_check_ips.php b/owl-bot-staging/Monitoring/v3/samples/V3/UptimeCheckServiceClient/list_uptime_check_ips.php new file mode 100644 index 000000000000..9d96322e41fa --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/samples/V3/UptimeCheckServiceClient/list_uptime_check_ips.php @@ -0,0 +1,62 @@ +listUptimeCheckIps($request); + + /** @var UptimeCheckIp $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END monitoring_v3_generated_UptimeCheckService_ListUptimeCheckIps_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/UptimeCheckServiceClient/update_uptime_check_config.php b/owl-bot-staging/Monitoring/v3/samples/V3/UptimeCheckServiceClient/update_uptime_check_config.php new file mode 100644 index 000000000000..cdef12857a2e --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/samples/V3/UptimeCheckServiceClient/update_uptime_check_config.php @@ -0,0 +1,62 @@ +setUptimeCheckConfig($uptimeCheckConfig); + + // Call the API and handle any network failures. + try { + /** @var UptimeCheckConfig $response */ + $response = $uptimeCheckServiceClient->updateUptimeCheckConfig($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END monitoring_v3_generated_UptimeCheckService_UpdateUptimeCheckConfig_sync] diff --git a/owl-bot-staging/Monitoring/v3/src/V3/AlertPolicyServiceClient.php b/owl-bot-staging/Monitoring/v3/src/V3/AlertPolicyServiceClient.php new file mode 100644 index 000000000000..66d3410ff0cb --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/src/V3/AlertPolicyServiceClient.php @@ -0,0 +1,34 @@ + createAlertPolicyAsync(CreateAlertPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteAlertPolicyAsync(DeleteAlertPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface getAlertPolicyAsync(GetAlertPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface listAlertPoliciesAsync(ListAlertPoliciesRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateAlertPolicyAsync(UpdateAlertPolicyRequest $request, array $optionalArgs = []) + */ +final class AlertPolicyServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.monitoring.v3.AlertPolicyService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'monitoring.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'monitoring.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/monitoring', + 'https://www.googleapis.com/auth/monitoring.read', + ]; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/alert_policy_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/alert_policy_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/alert_policy_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/alert_policy_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a alert_policy + * resource. + * + * @param string $project + * @param string $alertPolicy + * + * @return string The formatted alert_policy resource. + */ + public static function alertPolicyName(string $project, string $alertPolicy): string + { + return self::getPathTemplate('alertPolicy')->render([ + 'project' => $project, + 'alert_policy' => $alertPolicy, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * alert_policy_condition resource. + * + * @param string $project + * @param string $alertPolicy + * @param string $condition + * + * @return string The formatted alert_policy_condition resource. + */ + public static function alertPolicyConditionName(string $project, string $alertPolicy, string $condition): string + { + return self::getPathTemplate('alertPolicyCondition')->render([ + 'project' => $project, + 'alert_policy' => $alertPolicy, + 'condition' => $condition, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * folder_alert_policy resource. + * + * @param string $folder + * @param string $alertPolicy + * + * @return string The formatted folder_alert_policy resource. + */ + public static function folderAlertPolicyName(string $folder, string $alertPolicy): string + { + return self::getPathTemplate('folderAlertPolicy')->render([ + 'folder' => $folder, + 'alert_policy' => $alertPolicy, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * folder_alert_policy_condition resource. + * + * @param string $folder + * @param string $alertPolicy + * @param string $condition + * + * @return string The formatted folder_alert_policy_condition resource. + */ + public static function folderAlertPolicyConditionName(string $folder, string $alertPolicy, string $condition): string + { + return self::getPathTemplate('folderAlertPolicyCondition')->render([ + 'folder' => $folder, + 'alert_policy' => $alertPolicy, + 'condition' => $condition, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_alert_policy resource. + * + * @param string $organization + * @param string $alertPolicy + * + * @return string The formatted organization_alert_policy resource. + */ + public static function organizationAlertPolicyName(string $organization, string $alertPolicy): string + { + return self::getPathTemplate('organizationAlertPolicy')->render([ + 'organization' => $organization, + 'alert_policy' => $alertPolicy, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_alert_policy_condition resource. + * + * @param string $organization + * @param string $alertPolicy + * @param string $condition + * + * @return string The formatted organization_alert_policy_condition resource. + */ + public static function organizationAlertPolicyConditionName(string $organization, string $alertPolicy, string $condition): string + { + return self::getPathTemplate('organizationAlertPolicyCondition')->render([ + 'organization' => $organization, + 'alert_policy' => $alertPolicy, + 'condition' => $condition, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_alert_policy resource. + * + * @param string $project + * @param string $alertPolicy + * + * @return string The formatted project_alert_policy resource. + */ + public static function projectAlertPolicyName(string $project, string $alertPolicy): string + { + return self::getPathTemplate('projectAlertPolicy')->render([ + 'project' => $project, + 'alert_policy' => $alertPolicy, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_alert_policy_condition resource. + * + * @param string $project + * @param string $alertPolicy + * @param string $condition + * + * @return string The formatted project_alert_policy_condition resource. + */ + public static function projectAlertPolicyConditionName(string $project, string $alertPolicy, string $condition): string + { + return self::getPathTemplate('projectAlertPolicyCondition')->render([ + 'project' => $project, + 'alert_policy' => $alertPolicy, + 'condition' => $condition, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - alertPolicy: projects/{project}/alertPolicies/{alert_policy} + * - alertPolicyCondition: projects/{project}/alertPolicies/{alert_policy}/conditions/{condition} + * - folderAlertPolicy: folders/{folder}/alertPolicies/{alert_policy} + * - folderAlertPolicyCondition: folders/{folder}/alertPolicies/{alert_policy}/conditions/{condition} + * - organizationAlertPolicy: organizations/{organization}/alertPolicies/{alert_policy} + * - organizationAlertPolicyCondition: organizations/{organization}/alertPolicies/{alert_policy}/conditions/{condition} + * - projectAlertPolicy: projects/{project}/alertPolicies/{alert_policy} + * - projectAlertPolicyCondition: projects/{project}/alertPolicies/{alert_policy}/conditions/{condition} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'monitoring.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Creates a new alerting policy. + * + * Design your application to single-thread API calls that modify the state of + * alerting policies in a single project. This includes calls to + * CreateAlertPolicy, DeleteAlertPolicy and UpdateAlertPolicy. + * + * The async variant is {@see AlertPolicyServiceClient::createAlertPolicyAsync()} . + * + * @example samples/V3/AlertPolicyServiceClient/create_alert_policy.php + * + * @param CreateAlertPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return AlertPolicy + * + * @throws ApiException Thrown if the API call fails. + */ + public function createAlertPolicy(CreateAlertPolicyRequest $request, array $callOptions = []): AlertPolicy + { + return $this->startApiCall('CreateAlertPolicy', $request, $callOptions)->wait(); + } + + /** + * Deletes an alerting policy. + * + * Design your application to single-thread API calls that modify the state of + * alerting policies in a single project. This includes calls to + * CreateAlertPolicy, DeleteAlertPolicy and UpdateAlertPolicy. + * + * The async variant is {@see AlertPolicyServiceClient::deleteAlertPolicyAsync()} . + * + * @example samples/V3/AlertPolicyServiceClient/delete_alert_policy.php + * + * @param DeleteAlertPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteAlertPolicy(DeleteAlertPolicyRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteAlertPolicy', $request, $callOptions)->wait(); + } + + /** + * Gets a single alerting policy. + * + * The async variant is {@see AlertPolicyServiceClient::getAlertPolicyAsync()} . + * + * @example samples/V3/AlertPolicyServiceClient/get_alert_policy.php + * + * @param GetAlertPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return AlertPolicy + * + * @throws ApiException Thrown if the API call fails. + */ + public function getAlertPolicy(GetAlertPolicyRequest $request, array $callOptions = []): AlertPolicy + { + return $this->startApiCall('GetAlertPolicy', $request, $callOptions)->wait(); + } + + /** + * Lists the existing alerting policies for the workspace. + * + * The async variant is {@see AlertPolicyServiceClient::listAlertPoliciesAsync()} . + * + * @example samples/V3/AlertPolicyServiceClient/list_alert_policies.php + * + * @param ListAlertPoliciesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listAlertPolicies(ListAlertPoliciesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListAlertPolicies', $request, $callOptions); + } + + /** + * Updates an alerting policy. You can either replace the entire policy with + * a new one or replace only certain fields in the current alerting policy by + * specifying the fields to be updated via `updateMask`. Returns the + * updated alerting policy. + * + * Design your application to single-thread API calls that modify the state of + * alerting policies in a single project. This includes calls to + * CreateAlertPolicy, DeleteAlertPolicy and UpdateAlertPolicy. + * + * The async variant is {@see AlertPolicyServiceClient::updateAlertPolicyAsync()} . + * + * @example samples/V3/AlertPolicyServiceClient/update_alert_policy.php + * + * @param UpdateAlertPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return AlertPolicy + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateAlertPolicy(UpdateAlertPolicyRequest $request, array $callOptions = []): AlertPolicy + { + return $this->startApiCall('UpdateAlertPolicy', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/Monitoring/v3/src/V3/Client/GroupServiceClient.php b/owl-bot-staging/Monitoring/v3/src/V3/Client/GroupServiceClient.php new file mode 100644 index 000000000000..5300fa582fd7 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/src/V3/Client/GroupServiceClient.php @@ -0,0 +1,448 @@ + createGroupAsync(CreateGroupRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteGroupAsync(DeleteGroupRequest $request, array $optionalArgs = []) + * @method PromiseInterface getGroupAsync(GetGroupRequest $request, array $optionalArgs = []) + * @method PromiseInterface listGroupMembersAsync(ListGroupMembersRequest $request, array $optionalArgs = []) + * @method PromiseInterface listGroupsAsync(ListGroupsRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateGroupAsync(UpdateGroupRequest $request, array $optionalArgs = []) + */ +final class GroupServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.monitoring.v3.GroupService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'monitoring.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'monitoring.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/monitoring', + 'https://www.googleapis.com/auth/monitoring.read', + ]; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/group_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/group_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/group_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/group_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a folder_group + * resource. + * + * @param string $folder + * @param string $group + * + * @return string The formatted folder_group resource. + */ + public static function folderGroupName(string $folder, string $group): string + { + return self::getPathTemplate('folderGroup')->render([ + 'folder' => $folder, + 'group' => $group, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a group + * resource. + * + * @param string $project + * @param string $group + * + * @return string The formatted group resource. + */ + public static function groupName(string $project, string $group): string + { + return self::getPathTemplate('group')->render([ + 'project' => $project, + 'group' => $group, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_group resource. + * + * @param string $organization + * @param string $group + * + * @return string The formatted organization_group resource. + */ + public static function organizationGroupName(string $organization, string $group): string + { + return self::getPathTemplate('organizationGroup')->render([ + 'organization' => $organization, + 'group' => $group, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_group resource. + * + * @param string $project + * @param string $group + * + * @return string The formatted project_group resource. + */ + public static function projectGroupName(string $project, string $group): string + { + return self::getPathTemplate('projectGroup')->render([ + 'project' => $project, + 'group' => $group, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - folderGroup: folders/{folder}/groups/{group} + * - group: projects/{project}/groups/{group} + * - organizationGroup: organizations/{organization}/groups/{group} + * - projectGroup: projects/{project}/groups/{group} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'monitoring.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Creates a new group. + * + * The async variant is {@see GroupServiceClient::createGroupAsync()} . + * + * @example samples/V3/GroupServiceClient/create_group.php + * + * @param CreateGroupRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Group + * + * @throws ApiException Thrown if the API call fails. + */ + public function createGroup(CreateGroupRequest $request, array $callOptions = []): Group + { + return $this->startApiCall('CreateGroup', $request, $callOptions)->wait(); + } + + /** + * Deletes an existing group. + * + * The async variant is {@see GroupServiceClient::deleteGroupAsync()} . + * + * @example samples/V3/GroupServiceClient/delete_group.php + * + * @param DeleteGroupRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteGroup(DeleteGroupRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteGroup', $request, $callOptions)->wait(); + } + + /** + * Gets a single group. + * + * The async variant is {@see GroupServiceClient::getGroupAsync()} . + * + * @example samples/V3/GroupServiceClient/get_group.php + * + * @param GetGroupRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Group + * + * @throws ApiException Thrown if the API call fails. + */ + public function getGroup(GetGroupRequest $request, array $callOptions = []): Group + { + return $this->startApiCall('GetGroup', $request, $callOptions)->wait(); + } + + /** + * Lists the monitored resources that are members of a group. + * + * The async variant is {@see GroupServiceClient::listGroupMembersAsync()} . + * + * @example samples/V3/GroupServiceClient/list_group_members.php + * + * @param ListGroupMembersRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listGroupMembers(ListGroupMembersRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListGroupMembers', $request, $callOptions); + } + + /** + * Lists the existing groups. + * + * The async variant is {@see GroupServiceClient::listGroupsAsync()} . + * + * @example samples/V3/GroupServiceClient/list_groups.php + * + * @param ListGroupsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listGroups(ListGroupsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListGroups', $request, $callOptions); + } + + /** + * Updates an existing group. + * You can change any group attributes except `name`. + * + * The async variant is {@see GroupServiceClient::updateGroupAsync()} . + * + * @example samples/V3/GroupServiceClient/update_group.php + * + * @param UpdateGroupRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Group + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateGroup(UpdateGroupRequest $request, array $callOptions = []): Group + { + return $this->startApiCall('UpdateGroup', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/Monitoring/v3/src/V3/Client/MetricServiceClient.php b/owl-bot-staging/Monitoring/v3/src/V3/Client/MetricServiceClient.php new file mode 100644 index 000000000000..543c25b8c7d1 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/src/V3/Client/MetricServiceClient.php @@ -0,0 +1,679 @@ + createMetricDescriptorAsync(CreateMetricDescriptorRequest $request, array $optionalArgs = []) + * @method PromiseInterface createServiceTimeSeriesAsync(CreateTimeSeriesRequest $request, array $optionalArgs = []) + * @method PromiseInterface createTimeSeriesAsync(CreateTimeSeriesRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteMetricDescriptorAsync(DeleteMetricDescriptorRequest $request, array $optionalArgs = []) + * @method PromiseInterface getMetricDescriptorAsync(GetMetricDescriptorRequest $request, array $optionalArgs = []) + * @method PromiseInterface getMonitoredResourceDescriptorAsync(GetMonitoredResourceDescriptorRequest $request, array $optionalArgs = []) + * @method PromiseInterface listMetricDescriptorsAsync(ListMetricDescriptorsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listMonitoredResourceDescriptorsAsync(ListMonitoredResourceDescriptorsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listTimeSeriesAsync(ListTimeSeriesRequest $request, array $optionalArgs = []) + */ +final class MetricServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.monitoring.v3.MetricService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'monitoring.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'monitoring.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/monitoring', + 'https://www.googleapis.com/auth/monitoring.read', + 'https://www.googleapis.com/auth/monitoring.write', + ]; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/metric_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/metric_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/metric_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/metric_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a folder + * resource. + * + * @param string $folder + * + * @return string The formatted folder resource. + */ + public static function folderName(string $folder): string + { + return self::getPathTemplate('folder')->render([ + 'folder' => $folder, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * folder_metric_descriptor resource. + * + * @param string $folder + * @param string $metricDescriptor + * + * @return string The formatted folder_metric_descriptor resource. + */ + public static function folderMetricDescriptorName(string $folder, string $metricDescriptor): string + { + return self::getPathTemplate('folderMetricDescriptor')->render([ + 'folder' => $folder, + 'metric_descriptor' => $metricDescriptor, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * folder_monitored_resource_descriptor resource. + * + * @param string $folder + * @param string $monitoredResourceDescriptor + * + * @return string The formatted folder_monitored_resource_descriptor resource. + */ + public static function folderMonitoredResourceDescriptorName(string $folder, string $monitoredResourceDescriptor): string + { + return self::getPathTemplate('folderMonitoredResourceDescriptor')->render([ + 'folder' => $folder, + 'monitored_resource_descriptor' => $monitoredResourceDescriptor, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * metric_descriptor resource. + * + * @param string $project + * @param string $metricDescriptor + * + * @return string The formatted metric_descriptor resource. + */ + public static function metricDescriptorName(string $project, string $metricDescriptor): string + { + return self::getPathTemplate('metricDescriptor')->render([ + 'project' => $project, + 'metric_descriptor' => $metricDescriptor, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * monitored_resource_descriptor resource. + * + * @param string $project + * @param string $monitoredResourceDescriptor + * + * @return string The formatted monitored_resource_descriptor resource. + */ + public static function monitoredResourceDescriptorName(string $project, string $monitoredResourceDescriptor): string + { + return self::getPathTemplate('monitoredResourceDescriptor')->render([ + 'project' => $project, + 'monitored_resource_descriptor' => $monitoredResourceDescriptor, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a organization + * resource. + * + * @param string $organization + * + * @return string The formatted organization resource. + */ + public static function organizationName(string $organization): string + { + return self::getPathTemplate('organization')->render([ + 'organization' => $organization, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_metric_descriptor resource. + * + * @param string $organization + * @param string $metricDescriptor + * + * @return string The formatted organization_metric_descriptor resource. + */ + public static function organizationMetricDescriptorName(string $organization, string $metricDescriptor): string + { + return self::getPathTemplate('organizationMetricDescriptor')->render([ + 'organization' => $organization, + 'metric_descriptor' => $metricDescriptor, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_monitored_resource_descriptor resource. + * + * @param string $organization + * @param string $monitoredResourceDescriptor + * + * @return string The formatted organization_monitored_resource_descriptor resource. + */ + public static function organizationMonitoredResourceDescriptorName(string $organization, string $monitoredResourceDescriptor): string + { + return self::getPathTemplate('organizationMonitoredResourceDescriptor')->render([ + 'organization' => $organization, + 'monitored_resource_descriptor' => $monitoredResourceDescriptor, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a project + * resource. + * + * @param string $project + * + * @return string The formatted project resource. + */ + public static function projectName(string $project): string + { + return self::getPathTemplate('project')->render([ + 'project' => $project, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_metric_descriptor resource. + * + * @param string $project + * @param string $metricDescriptor + * + * @return string The formatted project_metric_descriptor resource. + */ + public static function projectMetricDescriptorName(string $project, string $metricDescriptor): string + { + return self::getPathTemplate('projectMetricDescriptor')->render([ + 'project' => $project, + 'metric_descriptor' => $metricDescriptor, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_monitored_resource_descriptor resource. + * + * @param string $project + * @param string $monitoredResourceDescriptor + * + * @return string The formatted project_monitored_resource_descriptor resource. + */ + public static function projectMonitoredResourceDescriptorName(string $project, string $monitoredResourceDescriptor): string + { + return self::getPathTemplate('projectMonitoredResourceDescriptor')->render([ + 'project' => $project, + 'monitored_resource_descriptor' => $monitoredResourceDescriptor, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a workspace + * resource. + * + * @param string $project + * + * @return string The formatted workspace resource. + */ + public static function workspaceName(string $project): string + { + return self::getPathTemplate('workspace')->render([ + 'project' => $project, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - folder: folders/{folder} + * - folderMetricDescriptor: folders/{folder}/metricDescriptors/{metric_descriptor=**} + * - folderMonitoredResourceDescriptor: folders/{folder}/monitoredResourceDescriptors/{monitored_resource_descriptor} + * - metricDescriptor: projects/{project}/metricDescriptors/{metric_descriptor=**} + * - monitoredResourceDescriptor: projects/{project}/monitoredResourceDescriptors/{monitored_resource_descriptor} + * - organization: organizations/{organization} + * - organizationMetricDescriptor: organizations/{organization}/metricDescriptors/{metric_descriptor=**} + * - organizationMonitoredResourceDescriptor: organizations/{organization}/monitoredResourceDescriptors/{monitored_resource_descriptor} + * - project: projects/{project} + * - projectMetricDescriptor: projects/{project}/metricDescriptors/{metric_descriptor=**} + * - projectMonitoredResourceDescriptor: projects/{project}/monitoredResourceDescriptors/{monitored_resource_descriptor} + * - workspace: projects/{project} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'monitoring.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Creates a new metric descriptor. + * The creation is executed asynchronously. + * User-created metric descriptors define + * [custom metrics](https://cloud.google.com/monitoring/custom-metrics). + * The metric descriptor is updated if it already exists, + * except that metric labels are never removed. + * + * The async variant is {@see MetricServiceClient::createMetricDescriptorAsync()} . + * + * @example samples/V3/MetricServiceClient/create_metric_descriptor.php + * + * @param CreateMetricDescriptorRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return MetricDescriptor + * + * @throws ApiException Thrown if the API call fails. + */ + public function createMetricDescriptor(CreateMetricDescriptorRequest $request, array $callOptions = []): MetricDescriptor + { + return $this->startApiCall('CreateMetricDescriptor', $request, $callOptions)->wait(); + } + + /** + * Creates or adds data to one or more service time series. A service time + * series is a time series for a metric from a Google Cloud service. The + * response is empty if all time series in the request were written. If any + * time series could not be written, a corresponding failure message is + * included in the error response. This endpoint rejects writes to + * user-defined metrics. + * This method is only for use by Google Cloud services. Use + * [projects.timeSeries.create][google.monitoring.v3.MetricService.CreateTimeSeries] + * instead. + * + * The async variant is {@see MetricServiceClient::createServiceTimeSeriesAsync()} + * . + * + * @example samples/V3/MetricServiceClient/create_service_time_series.php + * + * @param CreateTimeSeriesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException Thrown if the API call fails. + */ + public function createServiceTimeSeries(CreateTimeSeriesRequest $request, array $callOptions = []): void + { + $this->startApiCall('CreateServiceTimeSeries', $request, $callOptions)->wait(); + } + + /** + * Creates or adds data to one or more time series. + * The response is empty if all time series in the request were written. + * If any time series could not be written, a corresponding failure message is + * included in the error response. + * This method does not support + * [resource locations constraint of an organization + * policy](https://cloud.google.com/resource-manager/docs/organization-policy/defining-locations#setting_the_organization_policy). + * + * The async variant is {@see MetricServiceClient::createTimeSeriesAsync()} . + * + * @example samples/V3/MetricServiceClient/create_time_series.php + * + * @param CreateTimeSeriesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException Thrown if the API call fails. + */ + public function createTimeSeries(CreateTimeSeriesRequest $request, array $callOptions = []): void + { + $this->startApiCall('CreateTimeSeries', $request, $callOptions)->wait(); + } + + /** + * Deletes a metric descriptor. Only user-created + * [custom metrics](https://cloud.google.com/monitoring/custom-metrics) can be + * deleted. + * + * The async variant is {@see MetricServiceClient::deleteMetricDescriptorAsync()} . + * + * @example samples/V3/MetricServiceClient/delete_metric_descriptor.php + * + * @param DeleteMetricDescriptorRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteMetricDescriptor(DeleteMetricDescriptorRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteMetricDescriptor', $request, $callOptions)->wait(); + } + + /** + * Gets a single metric descriptor. + * + * The async variant is {@see MetricServiceClient::getMetricDescriptorAsync()} . + * + * @example samples/V3/MetricServiceClient/get_metric_descriptor.php + * + * @param GetMetricDescriptorRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return MetricDescriptor + * + * @throws ApiException Thrown if the API call fails. + */ + public function getMetricDescriptor(GetMetricDescriptorRequest $request, array $callOptions = []): MetricDescriptor + { + return $this->startApiCall('GetMetricDescriptor', $request, $callOptions)->wait(); + } + + /** + * Gets a single monitored resource descriptor. + * + * The async variant is + * {@see MetricServiceClient::getMonitoredResourceDescriptorAsync()} . + * + * @example samples/V3/MetricServiceClient/get_monitored_resource_descriptor.php + * + * @param GetMonitoredResourceDescriptorRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return MonitoredResourceDescriptor + * + * @throws ApiException Thrown if the API call fails. + */ + public function getMonitoredResourceDescriptor(GetMonitoredResourceDescriptorRequest $request, array $callOptions = []): MonitoredResourceDescriptor + { + return $this->startApiCall('GetMonitoredResourceDescriptor', $request, $callOptions)->wait(); + } + + /** + * Lists metric descriptors that match a filter. + * + * The async variant is {@see MetricServiceClient::listMetricDescriptorsAsync()} . + * + * @example samples/V3/MetricServiceClient/list_metric_descriptors.php + * + * @param ListMetricDescriptorsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listMetricDescriptors(ListMetricDescriptorsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListMetricDescriptors', $request, $callOptions); + } + + /** + * Lists monitored resource descriptors that match a filter. + * + * The async variant is + * {@see MetricServiceClient::listMonitoredResourceDescriptorsAsync()} . + * + * @example samples/V3/MetricServiceClient/list_monitored_resource_descriptors.php + * + * @param ListMonitoredResourceDescriptorsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listMonitoredResourceDescriptors(ListMonitoredResourceDescriptorsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListMonitoredResourceDescriptors', $request, $callOptions); + } + + /** + * Lists time series that match a filter. + * + * The async variant is {@see MetricServiceClient::listTimeSeriesAsync()} . + * + * @example samples/V3/MetricServiceClient/list_time_series.php + * + * @param ListTimeSeriesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listTimeSeries(ListTimeSeriesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListTimeSeries', $request, $callOptions); + } +} diff --git a/owl-bot-staging/Monitoring/v3/src/V3/Client/NotificationChannelServiceClient.php b/owl-bot-staging/Monitoring/v3/src/V3/Client/NotificationChannelServiceClient.php new file mode 100644 index 000000000000..581afdc21244 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/src/V3/Client/NotificationChannelServiceClient.php @@ -0,0 +1,683 @@ + createNotificationChannelAsync(CreateNotificationChannelRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteNotificationChannelAsync(DeleteNotificationChannelRequest $request, array $optionalArgs = []) + * @method PromiseInterface getNotificationChannelAsync(GetNotificationChannelRequest $request, array $optionalArgs = []) + * @method PromiseInterface getNotificationChannelDescriptorAsync(GetNotificationChannelDescriptorRequest $request, array $optionalArgs = []) + * @method PromiseInterface getNotificationChannelVerificationCodeAsync(GetNotificationChannelVerificationCodeRequest $request, array $optionalArgs = []) + * @method PromiseInterface listNotificationChannelDescriptorsAsync(ListNotificationChannelDescriptorsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listNotificationChannelsAsync(ListNotificationChannelsRequest $request, array $optionalArgs = []) + * @method PromiseInterface sendNotificationChannelVerificationCodeAsync(SendNotificationChannelVerificationCodeRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateNotificationChannelAsync(UpdateNotificationChannelRequest $request, array $optionalArgs = []) + * @method PromiseInterface verifyNotificationChannelAsync(VerifyNotificationChannelRequest $request, array $optionalArgs = []) + */ +final class NotificationChannelServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.monitoring.v3.NotificationChannelService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'monitoring.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'monitoring.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/monitoring', + 'https://www.googleapis.com/auth/monitoring.read', + ]; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/notification_channel_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/notification_channel_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/notification_channel_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/notification_channel_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a + * folder_channel_descriptor resource. + * + * @param string $folder + * @param string $channelDescriptor + * + * @return string The formatted folder_channel_descriptor resource. + */ + public static function folderChannelDescriptorName(string $folder, string $channelDescriptor): string + { + return self::getPathTemplate('folderChannelDescriptor')->render([ + 'folder' => $folder, + 'channel_descriptor' => $channelDescriptor, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * folder_notification_channel resource. + * + * @param string $folder + * @param string $notificationChannel + * + * @return string The formatted folder_notification_channel resource. + */ + public static function folderNotificationChannelName(string $folder, string $notificationChannel): string + { + return self::getPathTemplate('folderNotificationChannel')->render([ + 'folder' => $folder, + 'notification_channel' => $notificationChannel, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * notification_channel resource. + * + * @param string $project + * @param string $notificationChannel + * + * @return string The formatted notification_channel resource. + */ + public static function notificationChannelName(string $project, string $notificationChannel): string + { + return self::getPathTemplate('notificationChannel')->render([ + 'project' => $project, + 'notification_channel' => $notificationChannel, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * notification_channel_descriptor resource. + * + * @param string $project + * @param string $channelDescriptor + * + * @return string The formatted notification_channel_descriptor resource. + */ + public static function notificationChannelDescriptorName(string $project, string $channelDescriptor): string + { + return self::getPathTemplate('notificationChannelDescriptor')->render([ + 'project' => $project, + 'channel_descriptor' => $channelDescriptor, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_channel_descriptor resource. + * + * @param string $organization + * @param string $channelDescriptor + * + * @return string The formatted organization_channel_descriptor resource. + */ + public static function organizationChannelDescriptorName(string $organization, string $channelDescriptor): string + { + return self::getPathTemplate('organizationChannelDescriptor')->render([ + 'organization' => $organization, + 'channel_descriptor' => $channelDescriptor, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_notification_channel resource. + * + * @param string $organization + * @param string $notificationChannel + * + * @return string The formatted organization_notification_channel resource. + */ + public static function organizationNotificationChannelName(string $organization, string $notificationChannel): string + { + return self::getPathTemplate('organizationNotificationChannel')->render([ + 'organization' => $organization, + 'notification_channel' => $notificationChannel, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_channel_descriptor resource. + * + * @param string $project + * @param string $channelDescriptor + * + * @return string The formatted project_channel_descriptor resource. + */ + public static function projectChannelDescriptorName(string $project, string $channelDescriptor): string + { + return self::getPathTemplate('projectChannelDescriptor')->render([ + 'project' => $project, + 'channel_descriptor' => $channelDescriptor, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_notification_channel resource. + * + * @param string $project + * @param string $notificationChannel + * + * @return string The formatted project_notification_channel resource. + */ + public static function projectNotificationChannelName(string $project, string $notificationChannel): string + { + return self::getPathTemplate('projectNotificationChannel')->render([ + 'project' => $project, + 'notification_channel' => $notificationChannel, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - folderChannelDescriptor: folders/{folder}/notificationChannelDescriptors/{channel_descriptor} + * - folderNotificationChannel: folders/{folder}/notificationChannels/{notification_channel} + * - notificationChannel: projects/{project}/notificationChannels/{notification_channel} + * - notificationChannelDescriptor: projects/{project}/notificationChannelDescriptors/{channel_descriptor} + * - organizationChannelDescriptor: organizations/{organization}/notificationChannelDescriptors/{channel_descriptor} + * - organizationNotificationChannel: organizations/{organization}/notificationChannels/{notification_channel} + * - projectChannelDescriptor: projects/{project}/notificationChannelDescriptors/{channel_descriptor} + * - projectNotificationChannel: projects/{project}/notificationChannels/{notification_channel} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'monitoring.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Creates a new notification channel, representing a single notification + * endpoint such as an email address, SMS number, or PagerDuty service. + * + * Design your application to single-thread API calls that modify the state of + * notification channels in a single project. This includes calls to + * CreateNotificationChannel, DeleteNotificationChannel and + * UpdateNotificationChannel. + * + * The async variant is + * {@see NotificationChannelServiceClient::createNotificationChannelAsync()} . + * + * @example samples/V3/NotificationChannelServiceClient/create_notification_channel.php + * + * @param CreateNotificationChannelRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return NotificationChannel + * + * @throws ApiException Thrown if the API call fails. + */ + public function createNotificationChannel(CreateNotificationChannelRequest $request, array $callOptions = []): NotificationChannel + { + return $this->startApiCall('CreateNotificationChannel', $request, $callOptions)->wait(); + } + + /** + * Deletes a notification channel. + * + * Design your application to single-thread API calls that modify the state of + * notification channels in a single project. This includes calls to + * CreateNotificationChannel, DeleteNotificationChannel and + * UpdateNotificationChannel. + * + * The async variant is + * {@see NotificationChannelServiceClient::deleteNotificationChannelAsync()} . + * + * @example samples/V3/NotificationChannelServiceClient/delete_notification_channel.php + * + * @param DeleteNotificationChannelRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteNotificationChannel(DeleteNotificationChannelRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteNotificationChannel', $request, $callOptions)->wait(); + } + + /** + * Gets a single notification channel. The channel includes the relevant + * configuration details with which the channel was created. However, the + * response may truncate or omit passwords, API keys, or other private key + * matter and thus the response may not be 100% identical to the information + * that was supplied in the call to the create method. + * + * The async variant is + * {@see NotificationChannelServiceClient::getNotificationChannelAsync()} . + * + * @example samples/V3/NotificationChannelServiceClient/get_notification_channel.php + * + * @param GetNotificationChannelRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return NotificationChannel + * + * @throws ApiException Thrown if the API call fails. + */ + public function getNotificationChannel(GetNotificationChannelRequest $request, array $callOptions = []): NotificationChannel + { + return $this->startApiCall('GetNotificationChannel', $request, $callOptions)->wait(); + } + + /** + * Gets a single channel descriptor. The descriptor indicates which fields + * are expected / permitted for a notification channel of the given type. + * + * The async variant is + * {@see NotificationChannelServiceClient::getNotificationChannelDescriptorAsync()} + * . + * + * @example samples/V3/NotificationChannelServiceClient/get_notification_channel_descriptor.php + * + * @param GetNotificationChannelDescriptorRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return NotificationChannelDescriptor + * + * @throws ApiException Thrown if the API call fails. + */ + public function getNotificationChannelDescriptor(GetNotificationChannelDescriptorRequest $request, array $callOptions = []): NotificationChannelDescriptor + { + return $this->startApiCall('GetNotificationChannelDescriptor', $request, $callOptions)->wait(); + } + + /** + * Requests a verification code for an already verified channel that can then + * be used in a call to VerifyNotificationChannel() on a different channel + * with an equivalent identity in the same or in a different project. This + * makes it possible to copy a channel between projects without requiring + * manual reverification of the channel. If the channel is not in the + * verified state, this method will fail (in other words, this may only be + * used if the SendNotificationChannelVerificationCode and + * VerifyNotificationChannel paths have already been used to put the given + * channel into the verified state). + * + * There is no guarantee that the verification codes returned by this method + * will be of a similar structure or form as the ones that are delivered + * to the channel via SendNotificationChannelVerificationCode; while + * VerifyNotificationChannel() will recognize both the codes delivered via + * SendNotificationChannelVerificationCode() and returned from + * GetNotificationChannelVerificationCode(), it is typically the case that + * the verification codes delivered via + * SendNotificationChannelVerificationCode() will be shorter and also + * have a shorter expiration (e.g. codes such as "G-123456") whereas + * GetVerificationCode() will typically return a much longer, websafe base + * 64 encoded string that has a longer expiration time. + * + * The async variant is + * {@see NotificationChannelServiceClient::getNotificationChannelVerificationCodeAsync()} + * . + * + * @example samples/V3/NotificationChannelServiceClient/get_notification_channel_verification_code.php + * + * @param GetNotificationChannelVerificationCodeRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return GetNotificationChannelVerificationCodeResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function getNotificationChannelVerificationCode(GetNotificationChannelVerificationCodeRequest $request, array $callOptions = []): GetNotificationChannelVerificationCodeResponse + { + return $this->startApiCall('GetNotificationChannelVerificationCode', $request, $callOptions)->wait(); + } + + /** + * Lists the descriptors for supported channel types. The use of descriptors + * makes it possible for new channel types to be dynamically added. + * + * The async variant is + * {@see NotificationChannelServiceClient::listNotificationChannelDescriptorsAsync()} + * . + * + * @example samples/V3/NotificationChannelServiceClient/list_notification_channel_descriptors.php + * + * @param ListNotificationChannelDescriptorsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listNotificationChannelDescriptors(ListNotificationChannelDescriptorsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListNotificationChannelDescriptors', $request, $callOptions); + } + + /** + * Lists the notification channels that have been created for the project. + * To list the types of notification channels that are supported, use + * the `ListNotificationChannelDescriptors` method. + * + * The async variant is + * {@see NotificationChannelServiceClient::listNotificationChannelsAsync()} . + * + * @example samples/V3/NotificationChannelServiceClient/list_notification_channels.php + * + * @param ListNotificationChannelsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listNotificationChannels(ListNotificationChannelsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListNotificationChannels', $request, $callOptions); + } + + /** + * Causes a verification code to be delivered to the channel. The code + * can then be supplied in `VerifyNotificationChannel` to verify the channel. + * + * The async variant is + * {@see NotificationChannelServiceClient::sendNotificationChannelVerificationCodeAsync()} + * . + * + * @example samples/V3/NotificationChannelServiceClient/send_notification_channel_verification_code.php + * + * @param SendNotificationChannelVerificationCodeRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException Thrown if the API call fails. + */ + public function sendNotificationChannelVerificationCode(SendNotificationChannelVerificationCodeRequest $request, array $callOptions = []): void + { + $this->startApiCall('SendNotificationChannelVerificationCode', $request, $callOptions)->wait(); + } + + /** + * Updates a notification channel. Fields not specified in the field mask + * remain unchanged. + * + * Design your application to single-thread API calls that modify the state of + * notification channels in a single project. This includes calls to + * CreateNotificationChannel, DeleteNotificationChannel and + * UpdateNotificationChannel. + * + * The async variant is + * {@see NotificationChannelServiceClient::updateNotificationChannelAsync()} . + * + * @example samples/V3/NotificationChannelServiceClient/update_notification_channel.php + * + * @param UpdateNotificationChannelRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return NotificationChannel + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateNotificationChannel(UpdateNotificationChannelRequest $request, array $callOptions = []): NotificationChannel + { + return $this->startApiCall('UpdateNotificationChannel', $request, $callOptions)->wait(); + } + + /** + * Verifies a `NotificationChannel` by proving receipt of the code + * delivered to the channel as a result of calling + * `SendNotificationChannelVerificationCode`. + * + * The async variant is + * {@see NotificationChannelServiceClient::verifyNotificationChannelAsync()} . + * + * @example samples/V3/NotificationChannelServiceClient/verify_notification_channel.php + * + * @param VerifyNotificationChannelRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return NotificationChannel + * + * @throws ApiException Thrown if the API call fails. + */ + public function verifyNotificationChannel(VerifyNotificationChannelRequest $request, array $callOptions = []): NotificationChannel + { + return $this->startApiCall('VerifyNotificationChannel', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/Monitoring/v3/src/V3/Client/QueryServiceClient.php b/owl-bot-staging/Monitoring/v3/src/V3/Client/QueryServiceClient.php new file mode 100644 index 000000000000..15cb43e010f9 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/src/V3/Client/QueryServiceClient.php @@ -0,0 +1,197 @@ + queryTimeSeriesAsync(QueryTimeSeriesRequest $request, array $optionalArgs = []) + */ +final class QueryServiceClient +{ + use GapicClientTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.monitoring.v3.QueryService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'monitoring.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'monitoring.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/monitoring', + 'https://www.googleapis.com/auth/monitoring.read', + ]; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/query_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/query_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/query_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/query_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'monitoring.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Queries time series using Monitoring Query Language. + * + * The async variant is {@see QueryServiceClient::queryTimeSeriesAsync()} . + * + * @example samples/V3/QueryServiceClient/query_time_series.php + * + * @param QueryTimeSeriesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function queryTimeSeries(QueryTimeSeriesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('QueryTimeSeries', $request, $callOptions); + } +} diff --git a/owl-bot-staging/Monitoring/v3/src/V3/Client/ServiceMonitoringServiceClient.php b/owl-bot-staging/Monitoring/v3/src/V3/Client/ServiceMonitoringServiceClient.php new file mode 100644 index 000000000000..202598491b2c --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/src/V3/Client/ServiceMonitoringServiceClient.php @@ -0,0 +1,639 @@ + createServiceAsync(CreateServiceRequest $request, array $optionalArgs = []) + * @method PromiseInterface createServiceLevelObjectiveAsync(CreateServiceLevelObjectiveRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteServiceAsync(DeleteServiceRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteServiceLevelObjectiveAsync(DeleteServiceLevelObjectiveRequest $request, array $optionalArgs = []) + * @method PromiseInterface getServiceAsync(GetServiceRequest $request, array $optionalArgs = []) + * @method PromiseInterface getServiceLevelObjectiveAsync(GetServiceLevelObjectiveRequest $request, array $optionalArgs = []) + * @method PromiseInterface listServiceLevelObjectivesAsync(ListServiceLevelObjectivesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listServicesAsync(ListServicesRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateServiceAsync(UpdateServiceRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateServiceLevelObjectiveAsync(UpdateServiceLevelObjectiveRequest $request, array $optionalArgs = []) + */ +final class ServiceMonitoringServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.monitoring.v3.ServiceMonitoringService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'monitoring.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'monitoring.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/monitoring', + 'https://www.googleapis.com/auth/monitoring.read', + ]; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/service_monitoring_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/service_monitoring_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/service_monitoring_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/service_monitoring_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a + * folder_service resource. + * + * @param string $folder + * @param string $service + * + * @return string The formatted folder_service resource. + */ + public static function folderServiceName(string $folder, string $service): string + { + return self::getPathTemplate('folderService')->render([ + 'folder' => $folder, + 'service' => $service, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * folder_service_service_level_objective resource. + * + * @param string $folder + * @param string $service + * @param string $serviceLevelObjective + * + * @return string The formatted folder_service_service_level_objective resource. + */ + public static function folderServiceServiceLevelObjectiveName(string $folder, string $service, string $serviceLevelObjective): string + { + return self::getPathTemplate('folderServiceServiceLevelObjective')->render([ + 'folder' => $folder, + 'service' => $service, + 'service_level_objective' => $serviceLevelObjective, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_service resource. + * + * @param string $organization + * @param string $service + * + * @return string The formatted organization_service resource. + */ + public static function organizationServiceName(string $organization, string $service): string + { + return self::getPathTemplate('organizationService')->render([ + 'organization' => $organization, + 'service' => $service, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_service_service_level_objective resource. + * + * @param string $organization + * @param string $service + * @param string $serviceLevelObjective + * + * @return string The formatted organization_service_service_level_objective resource. + */ + public static function organizationServiceServiceLevelObjectiveName(string $organization, string $service, string $serviceLevelObjective): string + { + return self::getPathTemplate('organizationServiceServiceLevelObjective')->render([ + 'organization' => $organization, + 'service' => $service, + 'service_level_objective' => $serviceLevelObjective, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_service resource. + * + * @param string $project + * @param string $service + * + * @return string The formatted project_service resource. + */ + public static function projectServiceName(string $project, string $service): string + { + return self::getPathTemplate('projectService')->render([ + 'project' => $project, + 'service' => $service, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_service_service_level_objective resource. + * + * @param string $project + * @param string $service + * @param string $serviceLevelObjective + * + * @return string The formatted project_service_service_level_objective resource. + */ + public static function projectServiceServiceLevelObjectiveName(string $project, string $service, string $serviceLevelObjective): string + { + return self::getPathTemplate('projectServiceServiceLevelObjective')->render([ + 'project' => $project, + 'service' => $service, + 'service_level_objective' => $serviceLevelObjective, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a service + * resource. + * + * @param string $project + * @param string $service + * + * @return string The formatted service resource. + */ + public static function serviceName(string $project, string $service): string + { + return self::getPathTemplate('service')->render([ + 'project' => $project, + 'service' => $service, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * service_level_objective resource. + * + * @param string $project + * @param string $service + * @param string $serviceLevelObjective + * + * @return string The formatted service_level_objective resource. + */ + public static function serviceLevelObjectiveName(string $project, string $service, string $serviceLevelObjective): string + { + return self::getPathTemplate('serviceLevelObjective')->render([ + 'project' => $project, + 'service' => $service, + 'service_level_objective' => $serviceLevelObjective, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - folderService: folders/{folder}/services/{service} + * - folderServiceServiceLevelObjective: folders/{folder}/services/{service}/serviceLevelObjectives/{service_level_objective} + * - organizationService: organizations/{organization}/services/{service} + * - organizationServiceServiceLevelObjective: organizations/{organization}/services/{service}/serviceLevelObjectives/{service_level_objective} + * - projectService: projects/{project}/services/{service} + * - projectServiceServiceLevelObjective: projects/{project}/services/{service}/serviceLevelObjectives/{service_level_objective} + * - service: projects/{project}/services/{service} + * - serviceLevelObjective: projects/{project}/services/{service}/serviceLevelObjectives/{service_level_objective} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'monitoring.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Create a `Service`. + * + * The async variant is {@see ServiceMonitoringServiceClient::createServiceAsync()} + * . + * + * @example samples/V3/ServiceMonitoringServiceClient/create_service.php + * + * @param CreateServiceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Service + * + * @throws ApiException Thrown if the API call fails. + */ + public function createService(CreateServiceRequest $request, array $callOptions = []): Service + { + return $this->startApiCall('CreateService', $request, $callOptions)->wait(); + } + + /** + * Create a `ServiceLevelObjective` for the given `Service`. + * + * The async variant is + * {@see ServiceMonitoringServiceClient::createServiceLevelObjectiveAsync()} . + * + * @example samples/V3/ServiceMonitoringServiceClient/create_service_level_objective.php + * + * @param CreateServiceLevelObjectiveRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ServiceLevelObjective + * + * @throws ApiException Thrown if the API call fails. + */ + public function createServiceLevelObjective(CreateServiceLevelObjectiveRequest $request, array $callOptions = []): ServiceLevelObjective + { + return $this->startApiCall('CreateServiceLevelObjective', $request, $callOptions)->wait(); + } + + /** + * Soft delete this `Service`. + * + * The async variant is {@see ServiceMonitoringServiceClient::deleteServiceAsync()} + * . + * + * @example samples/V3/ServiceMonitoringServiceClient/delete_service.php + * + * @param DeleteServiceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteService(DeleteServiceRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteService', $request, $callOptions)->wait(); + } + + /** + * Delete the given `ServiceLevelObjective`. + * + * The async variant is + * {@see ServiceMonitoringServiceClient::deleteServiceLevelObjectiveAsync()} . + * + * @example samples/V3/ServiceMonitoringServiceClient/delete_service_level_objective.php + * + * @param DeleteServiceLevelObjectiveRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteServiceLevelObjective(DeleteServiceLevelObjectiveRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteServiceLevelObjective', $request, $callOptions)->wait(); + } + + /** + * Get the named `Service`. + * + * The async variant is {@see ServiceMonitoringServiceClient::getServiceAsync()} . + * + * @example samples/V3/ServiceMonitoringServiceClient/get_service.php + * + * @param GetServiceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Service + * + * @throws ApiException Thrown if the API call fails. + */ + public function getService(GetServiceRequest $request, array $callOptions = []): Service + { + return $this->startApiCall('GetService', $request, $callOptions)->wait(); + } + + /** + * Get a `ServiceLevelObjective` by name. + * + * The async variant is + * {@see ServiceMonitoringServiceClient::getServiceLevelObjectiveAsync()} . + * + * @example samples/V3/ServiceMonitoringServiceClient/get_service_level_objective.php + * + * @param GetServiceLevelObjectiveRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ServiceLevelObjective + * + * @throws ApiException Thrown if the API call fails. + */ + public function getServiceLevelObjective(GetServiceLevelObjectiveRequest $request, array $callOptions = []): ServiceLevelObjective + { + return $this->startApiCall('GetServiceLevelObjective', $request, $callOptions)->wait(); + } + + /** + * List the `ServiceLevelObjective`s for the given `Service`. + * + * The async variant is + * {@see ServiceMonitoringServiceClient::listServiceLevelObjectivesAsync()} . + * + * @example samples/V3/ServiceMonitoringServiceClient/list_service_level_objectives.php + * + * @param ListServiceLevelObjectivesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listServiceLevelObjectives(ListServiceLevelObjectivesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListServiceLevelObjectives', $request, $callOptions); + } + + /** + * List `Service`s for this Metrics Scope. + * + * The async variant is {@see ServiceMonitoringServiceClient::listServicesAsync()} + * . + * + * @example samples/V3/ServiceMonitoringServiceClient/list_services.php + * + * @param ListServicesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listServices(ListServicesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListServices', $request, $callOptions); + } + + /** + * Update this `Service`. + * + * The async variant is {@see ServiceMonitoringServiceClient::updateServiceAsync()} + * . + * + * @example samples/V3/ServiceMonitoringServiceClient/update_service.php + * + * @param UpdateServiceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Service + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateService(UpdateServiceRequest $request, array $callOptions = []): Service + { + return $this->startApiCall('UpdateService', $request, $callOptions)->wait(); + } + + /** + * Update the given `ServiceLevelObjective`. + * + * The async variant is + * {@see ServiceMonitoringServiceClient::updateServiceLevelObjectiveAsync()} . + * + * @example samples/V3/ServiceMonitoringServiceClient/update_service_level_objective.php + * + * @param UpdateServiceLevelObjectiveRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ServiceLevelObjective + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateServiceLevelObjective(UpdateServiceLevelObjectiveRequest $request, array $callOptions = []): ServiceLevelObjective + { + return $this->startApiCall('UpdateServiceLevelObjective', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/Monitoring/v3/src/V3/Client/SnoozeServiceClient.php b/owl-bot-staging/Monitoring/v3/src/V3/Client/SnoozeServiceClient.php new file mode 100644 index 000000000000..9c00f00b9cbe --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/src/V3/Client/SnoozeServiceClient.php @@ -0,0 +1,438 @@ + createSnoozeAsync(CreateSnoozeRequest $request, array $optionalArgs = []) + * @method PromiseInterface getSnoozeAsync(GetSnoozeRequest $request, array $optionalArgs = []) + * @method PromiseInterface listSnoozesAsync(ListSnoozesRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateSnoozeAsync(UpdateSnoozeRequest $request, array $optionalArgs = []) + */ +final class SnoozeServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.monitoring.v3.SnoozeService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'monitoring.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'monitoring.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/monitoring', + 'https://www.googleapis.com/auth/monitoring.read', + ]; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/snooze_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/snooze_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/snooze_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/snooze_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a alert_policy + * resource. + * + * @param string $project + * @param string $alertPolicy + * + * @return string The formatted alert_policy resource. + */ + public static function alertPolicyName(string $project, string $alertPolicy): string + { + return self::getPathTemplate('alertPolicy')->render([ + 'project' => $project, + 'alert_policy' => $alertPolicy, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * folder_alert_policy resource. + * + * @param string $folder + * @param string $alertPolicy + * + * @return string The formatted folder_alert_policy resource. + */ + public static function folderAlertPolicyName(string $folder, string $alertPolicy): string + { + return self::getPathTemplate('folderAlertPolicy')->render([ + 'folder' => $folder, + 'alert_policy' => $alertPolicy, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_alert_policy resource. + * + * @param string $organization + * @param string $alertPolicy + * + * @return string The formatted organization_alert_policy resource. + */ + public static function organizationAlertPolicyName(string $organization, string $alertPolicy): string + { + return self::getPathTemplate('organizationAlertPolicy')->render([ + 'organization' => $organization, + 'alert_policy' => $alertPolicy, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a project + * resource. + * + * @param string $project + * + * @return string The formatted project resource. + */ + public static function projectName(string $project): string + { + return self::getPathTemplate('project')->render([ + 'project' => $project, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_alert_policy resource. + * + * @param string $project + * @param string $alertPolicy + * + * @return string The formatted project_alert_policy resource. + */ + public static function projectAlertPolicyName(string $project, string $alertPolicy): string + { + return self::getPathTemplate('projectAlertPolicy')->render([ + 'project' => $project, + 'alert_policy' => $alertPolicy, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a snooze + * resource. + * + * @param string $project + * @param string $snooze + * + * @return string The formatted snooze resource. + */ + public static function snoozeName(string $project, string $snooze): string + { + return self::getPathTemplate('snooze')->render([ + 'project' => $project, + 'snooze' => $snooze, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a workspace + * resource. + * + * @param string $project + * + * @return string The formatted workspace resource. + */ + public static function workspaceName(string $project): string + { + return self::getPathTemplate('workspace')->render([ + 'project' => $project, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - alertPolicy: projects/{project}/alertPolicies/{alert_policy} + * - folderAlertPolicy: folders/{folder}/alertPolicies/{alert_policy} + * - organizationAlertPolicy: organizations/{organization}/alertPolicies/{alert_policy} + * - project: projects/{project} + * - projectAlertPolicy: projects/{project}/alertPolicies/{alert_policy} + * - snooze: projects/{project}/snoozes/{snooze} + * - workspace: projects/{project} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'monitoring.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Creates a `Snooze` that will prevent alerts, which match the provided + * criteria, from being opened. The `Snooze` applies for a specific time + * interval. + * + * The async variant is {@see SnoozeServiceClient::createSnoozeAsync()} . + * + * @example samples/V3/SnoozeServiceClient/create_snooze.php + * + * @param CreateSnoozeRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Snooze + * + * @throws ApiException Thrown if the API call fails. + */ + public function createSnooze(CreateSnoozeRequest $request, array $callOptions = []): Snooze + { + return $this->startApiCall('CreateSnooze', $request, $callOptions)->wait(); + } + + /** + * Retrieves a `Snooze` by `name`. + * + * The async variant is {@see SnoozeServiceClient::getSnoozeAsync()} . + * + * @example samples/V3/SnoozeServiceClient/get_snooze.php + * + * @param GetSnoozeRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Snooze + * + * @throws ApiException Thrown if the API call fails. + */ + public function getSnooze(GetSnoozeRequest $request, array $callOptions = []): Snooze + { + return $this->startApiCall('GetSnooze', $request, $callOptions)->wait(); + } + + /** + * Lists the `Snooze`s associated with a project. Can optionally pass in + * `filter`, which specifies predicates to match `Snooze`s. + * + * The async variant is {@see SnoozeServiceClient::listSnoozesAsync()} . + * + * @example samples/V3/SnoozeServiceClient/list_snoozes.php + * + * @param ListSnoozesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listSnoozes(ListSnoozesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListSnoozes', $request, $callOptions); + } + + /** + * Updates a `Snooze`, identified by its `name`, with the parameters in the + * given `Snooze` object. + * + * The async variant is {@see SnoozeServiceClient::updateSnoozeAsync()} . + * + * @example samples/V3/SnoozeServiceClient/update_snooze.php + * + * @param UpdateSnoozeRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Snooze + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateSnooze(UpdateSnoozeRequest $request, array $callOptions = []): Snooze + { + return $this->startApiCall('UpdateSnooze', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/Monitoring/v3/src/V3/Client/UptimeCheckServiceClient.php b/owl-bot-staging/Monitoring/v3/src/V3/Client/UptimeCheckServiceClient.php new file mode 100644 index 000000000000..9915c1762ca3 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/src/V3/Client/UptimeCheckServiceClient.php @@ -0,0 +1,475 @@ + createUptimeCheckConfigAsync(CreateUptimeCheckConfigRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteUptimeCheckConfigAsync(DeleteUptimeCheckConfigRequest $request, array $optionalArgs = []) + * @method PromiseInterface getUptimeCheckConfigAsync(GetUptimeCheckConfigRequest $request, array $optionalArgs = []) + * @method PromiseInterface listUptimeCheckConfigsAsync(ListUptimeCheckConfigsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listUptimeCheckIpsAsync(ListUptimeCheckIpsRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateUptimeCheckConfigAsync(UpdateUptimeCheckConfigRequest $request, array $optionalArgs = []) + */ +final class UptimeCheckServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.monitoring.v3.UptimeCheckService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'monitoring.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'monitoring.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/monitoring', + 'https://www.googleapis.com/auth/monitoring.read', + ]; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/uptime_check_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/uptime_check_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/uptime_check_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/uptime_check_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a + * folder_uptime_check_config resource. + * + * @param string $folder + * @param string $uptimeCheckConfig + * + * @return string The formatted folder_uptime_check_config resource. + */ + public static function folderUptimeCheckConfigName(string $folder, string $uptimeCheckConfig): string + { + return self::getPathTemplate('folderUptimeCheckConfig')->render([ + 'folder' => $folder, + 'uptime_check_config' => $uptimeCheckConfig, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a function + * resource. + * + * @param string $project + * @param string $location + * @param string $function + * + * @return string The formatted function resource. + */ + public static function functionName(string $project, string $location, string $function): string + { + return self::getPathTemplate('function')->render([ + 'project' => $project, + 'location' => $location, + 'function' => $function, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_uptime_check_config resource. + * + * @param string $organization + * @param string $uptimeCheckConfig + * + * @return string The formatted organization_uptime_check_config resource. + */ + public static function organizationUptimeCheckConfigName(string $organization, string $uptimeCheckConfig): string + { + return self::getPathTemplate('organizationUptimeCheckConfig')->render([ + 'organization' => $organization, + 'uptime_check_config' => $uptimeCheckConfig, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_uptime_check_config resource. + * + * @param string $project + * @param string $uptimeCheckConfig + * + * @return string The formatted project_uptime_check_config resource. + */ + public static function projectUptimeCheckConfigName(string $project, string $uptimeCheckConfig): string + { + return self::getPathTemplate('projectUptimeCheckConfig')->render([ + 'project' => $project, + 'uptime_check_config' => $uptimeCheckConfig, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * uptime_check_config resource. + * + * @param string $project + * @param string $uptimeCheckConfig + * + * @return string The formatted uptime_check_config resource. + */ + public static function uptimeCheckConfigName(string $project, string $uptimeCheckConfig): string + { + return self::getPathTemplate('uptimeCheckConfig')->render([ + 'project' => $project, + 'uptime_check_config' => $uptimeCheckConfig, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - folderUptimeCheckConfig: folders/{folder}/uptimeCheckConfigs/{uptime_check_config} + * - function: projects/{project}/locations/{location}/functions/{function} + * - organizationUptimeCheckConfig: organizations/{organization}/uptimeCheckConfigs/{uptime_check_config} + * - projectUptimeCheckConfig: projects/{project}/uptimeCheckConfigs/{uptime_check_config} + * - uptimeCheckConfig: projects/{project}/uptimeCheckConfigs/{uptime_check_config} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'monitoring.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Creates a new Uptime check configuration. + * + * The async variant is + * {@see UptimeCheckServiceClient::createUptimeCheckConfigAsync()} . + * + * @example samples/V3/UptimeCheckServiceClient/create_uptime_check_config.php + * + * @param CreateUptimeCheckConfigRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return UptimeCheckConfig + * + * @throws ApiException Thrown if the API call fails. + */ + public function createUptimeCheckConfig(CreateUptimeCheckConfigRequest $request, array $callOptions = []): UptimeCheckConfig + { + return $this->startApiCall('CreateUptimeCheckConfig', $request, $callOptions)->wait(); + } + + /** + * Deletes an Uptime check configuration. Note that this method will fail + * if the Uptime check configuration is referenced by an alert policy or + * other dependent configs that would be rendered invalid by the deletion. + * + * The async variant is + * {@see UptimeCheckServiceClient::deleteUptimeCheckConfigAsync()} . + * + * @example samples/V3/UptimeCheckServiceClient/delete_uptime_check_config.php + * + * @param DeleteUptimeCheckConfigRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteUptimeCheckConfig(DeleteUptimeCheckConfigRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteUptimeCheckConfig', $request, $callOptions)->wait(); + } + + /** + * Gets a single Uptime check configuration. + * + * The async variant is + * {@see UptimeCheckServiceClient::getUptimeCheckConfigAsync()} . + * + * @example samples/V3/UptimeCheckServiceClient/get_uptime_check_config.php + * + * @param GetUptimeCheckConfigRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return UptimeCheckConfig + * + * @throws ApiException Thrown if the API call fails. + */ + public function getUptimeCheckConfig(GetUptimeCheckConfigRequest $request, array $callOptions = []): UptimeCheckConfig + { + return $this->startApiCall('GetUptimeCheckConfig', $request, $callOptions)->wait(); + } + + /** + * Lists the existing valid Uptime check configurations for the project + * (leaving out any invalid configurations). + * + * The async variant is + * {@see UptimeCheckServiceClient::listUptimeCheckConfigsAsync()} . + * + * @example samples/V3/UptimeCheckServiceClient/list_uptime_check_configs.php + * + * @param ListUptimeCheckConfigsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listUptimeCheckConfigs(ListUptimeCheckConfigsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListUptimeCheckConfigs', $request, $callOptions); + } + + /** + * Returns the list of IP addresses that checkers run from + * + * The async variant is {@see UptimeCheckServiceClient::listUptimeCheckIpsAsync()} + * . + * + * @example samples/V3/UptimeCheckServiceClient/list_uptime_check_ips.php + * + * @param ListUptimeCheckIpsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listUptimeCheckIps(ListUptimeCheckIpsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListUptimeCheckIps', $request, $callOptions); + } + + /** + * Updates an Uptime check configuration. You can either replace the entire + * configuration with a new one or replace only certain fields in the current + * configuration by specifying the fields to be updated via `updateMask`. + * Returns the updated configuration. + * + * The async variant is + * {@see UptimeCheckServiceClient::updateUptimeCheckConfigAsync()} . + * + * @example samples/V3/UptimeCheckServiceClient/update_uptime_check_config.php + * + * @param UpdateUptimeCheckConfigRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return UptimeCheckConfig + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateUptimeCheckConfig(UpdateUptimeCheckConfigRequest $request, array $callOptions = []): UptimeCheckConfig + { + return $this->startApiCall('UpdateUptimeCheckConfig', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/Monitoring/v3/src/V3/Gapic/AlertPolicyServiceGapicClient.php b/owl-bot-staging/Monitoring/v3/src/V3/Gapic/AlertPolicyServiceGapicClient.php new file mode 100644 index 000000000000..b45a031630d8 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/src/V3/Gapic/AlertPolicyServiceGapicClient.php @@ -0,0 +1,806 @@ +createAlertPolicy($name, $alertPolicy); + * } finally { + * $alertPolicyServiceClient->close(); + * } + * ``` + * + * Many parameters require resource names to be formatted in a particular way. To + * assist with these names, this class includes a format method for each type of + * name, and additionally a parseName method to extract the individual identifiers + * contained within formatted names that are returned by the API. + * + * @deprecated Please use the new service client {@see \Google\Cloud\Monitoring\V3\Client\AlertPolicyServiceClient}. + */ +class AlertPolicyServiceGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.monitoring.v3.AlertPolicyService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + const SERVICE_ADDRESS = 'monitoring.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'monitoring.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/monitoring', + 'https://www.googleapis.com/auth/monitoring.read', + ]; + + private static $alertPolicyNameTemplate; + + private static $alertPolicyConditionNameTemplate; + + private static $folderAlertPolicyNameTemplate; + + private static $folderAlertPolicyConditionNameTemplate; + + private static $organizationAlertPolicyNameTemplate; + + private static $organizationAlertPolicyConditionNameTemplate; + + private static $projectAlertPolicyNameTemplate; + + private static $projectAlertPolicyConditionNameTemplate; + + private static $pathTemplateMap; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/alert_policy_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/alert_policy_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/alert_policy_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/alert_policy_service_rest_client_config.php', + ], + ], + ]; + } + + private static function getAlertPolicyNameTemplate() + { + if (self::$alertPolicyNameTemplate == null) { + self::$alertPolicyNameTemplate = new PathTemplate('projects/{project}/alertPolicies/{alert_policy}'); + } + + return self::$alertPolicyNameTemplate; + } + + private static function getAlertPolicyConditionNameTemplate() + { + if (self::$alertPolicyConditionNameTemplate == null) { + self::$alertPolicyConditionNameTemplate = new PathTemplate('projects/{project}/alertPolicies/{alert_policy}/conditions/{condition}'); + } + + return self::$alertPolicyConditionNameTemplate; + } + + private static function getFolderAlertPolicyNameTemplate() + { + if (self::$folderAlertPolicyNameTemplate == null) { + self::$folderAlertPolicyNameTemplate = new PathTemplate('folders/{folder}/alertPolicies/{alert_policy}'); + } + + return self::$folderAlertPolicyNameTemplate; + } + + private static function getFolderAlertPolicyConditionNameTemplate() + { + if (self::$folderAlertPolicyConditionNameTemplate == null) { + self::$folderAlertPolicyConditionNameTemplate = new PathTemplate('folders/{folder}/alertPolicies/{alert_policy}/conditions/{condition}'); + } + + return self::$folderAlertPolicyConditionNameTemplate; + } + + private static function getOrganizationAlertPolicyNameTemplate() + { + if (self::$organizationAlertPolicyNameTemplate == null) { + self::$organizationAlertPolicyNameTemplate = new PathTemplate('organizations/{organization}/alertPolicies/{alert_policy}'); + } + + return self::$organizationAlertPolicyNameTemplate; + } + + private static function getOrganizationAlertPolicyConditionNameTemplate() + { + if (self::$organizationAlertPolicyConditionNameTemplate == null) { + self::$organizationAlertPolicyConditionNameTemplate = new PathTemplate('organizations/{organization}/alertPolicies/{alert_policy}/conditions/{condition}'); + } + + return self::$organizationAlertPolicyConditionNameTemplate; + } + + private static function getProjectAlertPolicyNameTemplate() + { + if (self::$projectAlertPolicyNameTemplate == null) { + self::$projectAlertPolicyNameTemplate = new PathTemplate('projects/{project}/alertPolicies/{alert_policy}'); + } + + return self::$projectAlertPolicyNameTemplate; + } + + private static function getProjectAlertPolicyConditionNameTemplate() + { + if (self::$projectAlertPolicyConditionNameTemplate == null) { + self::$projectAlertPolicyConditionNameTemplate = new PathTemplate('projects/{project}/alertPolicies/{alert_policy}/conditions/{condition}'); + } + + return self::$projectAlertPolicyConditionNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'alertPolicy' => self::getAlertPolicyNameTemplate(), + 'alertPolicyCondition' => self::getAlertPolicyConditionNameTemplate(), + 'folderAlertPolicy' => self::getFolderAlertPolicyNameTemplate(), + 'folderAlertPolicyCondition' => self::getFolderAlertPolicyConditionNameTemplate(), + 'organizationAlertPolicy' => self::getOrganizationAlertPolicyNameTemplate(), + 'organizationAlertPolicyCondition' => self::getOrganizationAlertPolicyConditionNameTemplate(), + 'projectAlertPolicy' => self::getProjectAlertPolicyNameTemplate(), + 'projectAlertPolicyCondition' => self::getProjectAlertPolicyConditionNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent a alert_policy + * resource. + * + * @param string $project + * @param string $alertPolicy + * + * @return string The formatted alert_policy resource. + */ + public static function alertPolicyName($project, $alertPolicy) + { + return self::getAlertPolicyNameTemplate()->render([ + 'project' => $project, + 'alert_policy' => $alertPolicy, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * alert_policy_condition resource. + * + * @param string $project + * @param string $alertPolicy + * @param string $condition + * + * @return string The formatted alert_policy_condition resource. + */ + public static function alertPolicyConditionName($project, $alertPolicy, $condition) + { + return self::getAlertPolicyConditionNameTemplate()->render([ + 'project' => $project, + 'alert_policy' => $alertPolicy, + 'condition' => $condition, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * folder_alert_policy resource. + * + * @param string $folder + * @param string $alertPolicy + * + * @return string The formatted folder_alert_policy resource. + */ + public static function folderAlertPolicyName($folder, $alertPolicy) + { + return self::getFolderAlertPolicyNameTemplate()->render([ + 'folder' => $folder, + 'alert_policy' => $alertPolicy, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * folder_alert_policy_condition resource. + * + * @param string $folder + * @param string $alertPolicy + * @param string $condition + * + * @return string The formatted folder_alert_policy_condition resource. + */ + public static function folderAlertPolicyConditionName($folder, $alertPolicy, $condition) + { + return self::getFolderAlertPolicyConditionNameTemplate()->render([ + 'folder' => $folder, + 'alert_policy' => $alertPolicy, + 'condition' => $condition, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_alert_policy resource. + * + * @param string $organization + * @param string $alertPolicy + * + * @return string The formatted organization_alert_policy resource. + */ + public static function organizationAlertPolicyName($organization, $alertPolicy) + { + return self::getOrganizationAlertPolicyNameTemplate()->render([ + 'organization' => $organization, + 'alert_policy' => $alertPolicy, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_alert_policy_condition resource. + * + * @param string $organization + * @param string $alertPolicy + * @param string $condition + * + * @return string The formatted organization_alert_policy_condition resource. + */ + public static function organizationAlertPolicyConditionName($organization, $alertPolicy, $condition) + { + return self::getOrganizationAlertPolicyConditionNameTemplate()->render([ + 'organization' => $organization, + 'alert_policy' => $alertPolicy, + 'condition' => $condition, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_alert_policy resource. + * + * @param string $project + * @param string $alertPolicy + * + * @return string The formatted project_alert_policy resource. + */ + public static function projectAlertPolicyName($project, $alertPolicy) + { + return self::getProjectAlertPolicyNameTemplate()->render([ + 'project' => $project, + 'alert_policy' => $alertPolicy, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_alert_policy_condition resource. + * + * @param string $project + * @param string $alertPolicy + * @param string $condition + * + * @return string The formatted project_alert_policy_condition resource. + */ + public static function projectAlertPolicyConditionName($project, $alertPolicy, $condition) + { + return self::getProjectAlertPolicyConditionNameTemplate()->render([ + 'project' => $project, + 'alert_policy' => $alertPolicy, + 'condition' => $condition, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - alertPolicy: projects/{project}/alertPolicies/{alert_policy} + * - alertPolicyCondition: projects/{project}/alertPolicies/{alert_policy}/conditions/{condition} + * - folderAlertPolicy: folders/{folder}/alertPolicies/{alert_policy} + * - folderAlertPolicyCondition: folders/{folder}/alertPolicies/{alert_policy}/conditions/{condition} + * - organizationAlertPolicy: organizations/{organization}/alertPolicies/{alert_policy} + * - organizationAlertPolicyCondition: organizations/{organization}/alertPolicies/{alert_policy}/conditions/{condition} + * - projectAlertPolicy: projects/{project}/alertPolicies/{alert_policy} + * - projectAlertPolicyCondition: projects/{project}/alertPolicies/{alert_policy}/conditions/{condition} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName($formattedName, $template = null) + { + $templateMap = self::getPathTemplateMap(); + if ($template) { + if (!isset($templateMap[$template])) { + throw new ValidationException("Template name $template does not exist"); + } + + return $templateMap[$template]->match($formattedName); + } + + foreach ($templateMap as $templateName => $pathTemplate) { + try { + return $pathTemplate->match($formattedName); + } catch (ValidationException $ex) { + // Swallow the exception to continue trying other path templates + } + } + + throw new ValidationException("Input did not match any known format. Input: $formattedName"); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'monitoring.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** + * Creates a new alerting policy. + * + * Design your application to single-thread API calls that modify the state of + * alerting policies in a single project. This includes calls to + * CreateAlertPolicy, DeleteAlertPolicy and UpdateAlertPolicy. + * + * Sample code: + * ``` + * $alertPolicyServiceClient = new AlertPolicyServiceClient(); + * try { + * $name = 'name'; + * $alertPolicy = new AlertPolicy(); + * $response = $alertPolicyServiceClient->createAlertPolicy($name, $alertPolicy); + * } finally { + * $alertPolicyServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) in which + * to create the alerting policy. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER] + * + * Note that this field names the parent container in which the alerting + * policy will be written, not the name of the created policy. |name| must be + * a host project of a Metrics Scope, otherwise INVALID_ARGUMENT error will + * return. The alerting policy that is returned will have a name that contains + * a normalized representation of this name as a prefix but adds a suffix of + * the form `/alertPolicies/[ALERT_POLICY_ID]`, identifying the policy in the + * container. + * @param AlertPolicy $alertPolicy Required. The requested alerting policy. You should omit the `name` field + * in this policy. The name will be returned in the new policy, including a + * new `[ALERT_POLICY_ID]` value. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Monitoring\V3\AlertPolicy + * + * @throws ApiException if the remote call fails + */ + public function createAlertPolicy($name, $alertPolicy, array $optionalArgs = []) + { + $request = new CreateAlertPolicyRequest(); + $requestParamHeaders = []; + $request->setName($name); + $request->setAlertPolicy($alertPolicy); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('CreateAlertPolicy', AlertPolicy::class, $optionalArgs, $request)->wait(); + } + + /** + * Deletes an alerting policy. + * + * Design your application to single-thread API calls that modify the state of + * alerting policies in a single project. This includes calls to + * CreateAlertPolicy, DeleteAlertPolicy and UpdateAlertPolicy. + * + * Sample code: + * ``` + * $alertPolicyServiceClient = new AlertPolicyServiceClient(); + * try { + * $formattedName = $alertPolicyServiceClient->alertPolicyName('[PROJECT]', '[ALERT_POLICY]'); + * $alertPolicyServiceClient->deleteAlertPolicy($formattedName); + * } finally { + * $alertPolicyServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The alerting policy to delete. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID] + * + * For more information, see [AlertPolicy][google.monitoring.v3.AlertPolicy]. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException if the remote call fails + */ + public function deleteAlertPolicy($name, array $optionalArgs = []) + { + $request = new DeleteAlertPolicyRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('DeleteAlertPolicy', GPBEmpty::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets a single alerting policy. + * + * Sample code: + * ``` + * $alertPolicyServiceClient = new AlertPolicyServiceClient(); + * try { + * $formattedName = $alertPolicyServiceClient->alertPolicyName('[PROJECT]', '[ALERT_POLICY]'); + * $response = $alertPolicyServiceClient->getAlertPolicy($formattedName); + * } finally { + * $alertPolicyServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The alerting policy to retrieve. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID] + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Monitoring\V3\AlertPolicy + * + * @throws ApiException if the remote call fails + */ + public function getAlertPolicy($name, array $optionalArgs = []) + { + $request = new GetAlertPolicyRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetAlertPolicy', AlertPolicy::class, $optionalArgs, $request)->wait(); + } + + /** + * Lists the existing alerting policies for the workspace. + * + * Sample code: + * ``` + * $alertPolicyServiceClient = new AlertPolicyServiceClient(); + * try { + * $name = 'name'; + * // Iterate over pages of elements + * $pagedResponse = $alertPolicyServiceClient->listAlertPolicies($name); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $alertPolicyServiceClient->listAlertPolicies($name); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $alertPolicyServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) whose + * alert policies are to be listed. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER] + * + * Note that this field names the parent container in which the alerting + * policies to be listed are stored. To retrieve a single alerting policy + * by name, use the + * [GetAlertPolicy][google.monitoring.v3.AlertPolicyService.GetAlertPolicy] + * operation, instead. + * @param array $optionalArgs { + * Optional. + * + * @type string $filter + * Optional. If provided, this field specifies the criteria that must be met + * by alert policies to be included in the response. + * + * For more details, see [sorting and + * filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering). + * @type string $orderBy + * Optional. A comma-separated list of fields by which to sort the result. + * Supports the same set of field references as the `filter` field. Entries + * can be prefixed with a minus sign to sort by the field in descending order. + * + * For more details, see [sorting and + * filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering). + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listAlertPolicies($name, array $optionalArgs = []) + { + $request = new ListAlertPoliciesRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + if (isset($optionalArgs['orderBy'])) { + $request->setOrderBy($optionalArgs['orderBy']); + } + + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListAlertPolicies', $optionalArgs, ListAlertPoliciesResponse::class, $request); + } + + /** + * Updates an alerting policy. You can either replace the entire policy with + * a new one or replace only certain fields in the current alerting policy by + * specifying the fields to be updated via `updateMask`. Returns the + * updated alerting policy. + * + * Design your application to single-thread API calls that modify the state of + * alerting policies in a single project. This includes calls to + * CreateAlertPolicy, DeleteAlertPolicy and UpdateAlertPolicy. + * + * Sample code: + * ``` + * $alertPolicyServiceClient = new AlertPolicyServiceClient(); + * try { + * $alertPolicy = new AlertPolicy(); + * $response = $alertPolicyServiceClient->updateAlertPolicy($alertPolicy); + * } finally { + * $alertPolicyServiceClient->close(); + * } + * ``` + * + * @param AlertPolicy $alertPolicy Required. The updated alerting policy or the updated values for the + * fields listed in `update_mask`. + * If `update_mask` is not empty, any fields in this policy that are + * not in `update_mask` are ignored. + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $updateMask + * Optional. A list of alerting policy field names. If this field is not + * empty, each listed field in the existing alerting policy is set to the + * value of the corresponding field in the supplied policy (`alert_policy`), + * or to the field's default value if the field is not in the supplied + * alerting policy. Fields not listed retain their previous value. + * + * Examples of valid field masks include `display_name`, `documentation`, + * `documentation.content`, `documentation.mime_type`, `user_labels`, + * `user_label.nameofkey`, `enabled`, `conditions`, `combiner`, etc. + * + * If this field is empty, then the supplied alerting policy replaces the + * existing policy. It is the same as deleting the existing policy and + * adding the supplied policy, except for the following: + * + * + The new policy will have the same `[ALERT_POLICY_ID]` as the former + * policy. This gives you continuity with the former policy in your + * notifications and incidents. + * + Conditions in the new policy will keep their former `[CONDITION_ID]` if + * the supplied condition includes the `name` field with that + * `[CONDITION_ID]`. If the supplied condition omits the `name` field, + * then a new `[CONDITION_ID]` is created. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Monitoring\V3\AlertPolicy + * + * @throws ApiException if the remote call fails + */ + public function updateAlertPolicy($alertPolicy, array $optionalArgs = []) + { + $request = new UpdateAlertPolicyRequest(); + $requestParamHeaders = []; + $request->setAlertPolicy($alertPolicy); + $requestParamHeaders['alert_policy.name'] = $alertPolicy->getName(); + if (isset($optionalArgs['updateMask'])) { + $request->setUpdateMask($optionalArgs['updateMask']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('UpdateAlertPolicy', AlertPolicy::class, $optionalArgs, $request)->wait(); + } +} diff --git a/owl-bot-staging/Monitoring/v3/src/V3/Gapic/GroupServiceGapicClient.php b/owl-bot-staging/Monitoring/v3/src/V3/Gapic/GroupServiceGapicClient.php new file mode 100644 index 000000000000..04306c6bc04e --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/src/V3/Gapic/GroupServiceGapicClient.php @@ -0,0 +1,752 @@ +createGroup($name, $group); + * } finally { + * $groupServiceClient->close(); + * } + * ``` + * + * Many parameters require resource names to be formatted in a particular way. To + * assist with these names, this class includes a format method for each type of + * name, and additionally a parseName method to extract the individual identifiers + * contained within formatted names that are returned by the API. + * + * @deprecated Please use the new service client {@see \Google\Cloud\Monitoring\V3\Client\GroupServiceClient}. + */ +class GroupServiceGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.monitoring.v3.GroupService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + const SERVICE_ADDRESS = 'monitoring.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'monitoring.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/monitoring', + 'https://www.googleapis.com/auth/monitoring.read', + ]; + + private static $folderGroupNameTemplate; + + private static $groupNameTemplate; + + private static $organizationGroupNameTemplate; + + private static $projectGroupNameTemplate; + + private static $pathTemplateMap; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/group_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/group_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/group_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/group_service_rest_client_config.php', + ], + ], + ]; + } + + private static function getFolderGroupNameTemplate() + { + if (self::$folderGroupNameTemplate == null) { + self::$folderGroupNameTemplate = new PathTemplate('folders/{folder}/groups/{group}'); + } + + return self::$folderGroupNameTemplate; + } + + private static function getGroupNameTemplate() + { + if (self::$groupNameTemplate == null) { + self::$groupNameTemplate = new PathTemplate('projects/{project}/groups/{group}'); + } + + return self::$groupNameTemplate; + } + + private static function getOrganizationGroupNameTemplate() + { + if (self::$organizationGroupNameTemplate == null) { + self::$organizationGroupNameTemplate = new PathTemplate('organizations/{organization}/groups/{group}'); + } + + return self::$organizationGroupNameTemplate; + } + + private static function getProjectGroupNameTemplate() + { + if (self::$projectGroupNameTemplate == null) { + self::$projectGroupNameTemplate = new PathTemplate('projects/{project}/groups/{group}'); + } + + return self::$projectGroupNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'folderGroup' => self::getFolderGroupNameTemplate(), + 'group' => self::getGroupNameTemplate(), + 'organizationGroup' => self::getOrganizationGroupNameTemplate(), + 'projectGroup' => self::getProjectGroupNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent a folder_group + * resource. + * + * @param string $folder + * @param string $group + * + * @return string The formatted folder_group resource. + */ + public static function folderGroupName($folder, $group) + { + return self::getFolderGroupNameTemplate()->render([ + 'folder' => $folder, + 'group' => $group, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a group + * resource. + * + * @param string $project + * @param string $group + * + * @return string The formatted group resource. + */ + public static function groupName($project, $group) + { + return self::getGroupNameTemplate()->render([ + 'project' => $project, + 'group' => $group, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_group resource. + * + * @param string $organization + * @param string $group + * + * @return string The formatted organization_group resource. + */ + public static function organizationGroupName($organization, $group) + { + return self::getOrganizationGroupNameTemplate()->render([ + 'organization' => $organization, + 'group' => $group, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_group resource. + * + * @param string $project + * @param string $group + * + * @return string The formatted project_group resource. + */ + public static function projectGroupName($project, $group) + { + return self::getProjectGroupNameTemplate()->render([ + 'project' => $project, + 'group' => $group, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - folderGroup: folders/{folder}/groups/{group} + * - group: projects/{project}/groups/{group} + * - organizationGroup: organizations/{organization}/groups/{group} + * - projectGroup: projects/{project}/groups/{group} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName($formattedName, $template = null) + { + $templateMap = self::getPathTemplateMap(); + if ($template) { + if (!isset($templateMap[$template])) { + throw new ValidationException("Template name $template does not exist"); + } + + return $templateMap[$template]->match($formattedName); + } + + foreach ($templateMap as $templateName => $pathTemplate) { + try { + return $pathTemplate->match($formattedName); + } catch (ValidationException $ex) { + // Swallow the exception to continue trying other path templates + } + } + + throw new ValidationException("Input did not match any known format. Input: $formattedName"); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'monitoring.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** + * Creates a new group. + * + * Sample code: + * ``` + * $groupServiceClient = new GroupServiceClient(); + * try { + * $name = 'name'; + * $group = new Group(); + * $response = $groupServiceClient->createGroup($name, $group); + * } finally { + * $groupServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) in which + * to create the group. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER] + * @param Group $group Required. A group definition. It is an error to define the `name` field + * because the system assigns the name. + * @param array $optionalArgs { + * Optional. + * + * @type bool $validateOnly + * If true, validate this request but do not create the group. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Monitoring\V3\Group + * + * @throws ApiException if the remote call fails + */ + public function createGroup($name, $group, array $optionalArgs = []) + { + $request = new CreateGroupRequest(); + $requestParamHeaders = []; + $request->setName($name); + $request->setGroup($group); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['validateOnly'])) { + $request->setValidateOnly($optionalArgs['validateOnly']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('CreateGroup', Group::class, $optionalArgs, $request)->wait(); + } + + /** + * Deletes an existing group. + * + * Sample code: + * ``` + * $groupServiceClient = new GroupServiceClient(); + * try { + * $formattedName = $groupServiceClient->groupName('[PROJECT]', '[GROUP]'); + * $groupServiceClient->deleteGroup($formattedName); + * } finally { + * $groupServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The group to delete. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] + * @param array $optionalArgs { + * Optional. + * + * @type bool $recursive + * If this field is true, then the request means to delete a group with all + * its descendants. Otherwise, the request means to delete a group only when + * it has no descendants. The default value is false. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException if the remote call fails + */ + public function deleteGroup($name, array $optionalArgs = []) + { + $request = new DeleteGroupRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['recursive'])) { + $request->setRecursive($optionalArgs['recursive']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('DeleteGroup', GPBEmpty::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets a single group. + * + * Sample code: + * ``` + * $groupServiceClient = new GroupServiceClient(); + * try { + * $formattedName = $groupServiceClient->groupName('[PROJECT]', '[GROUP]'); + * $response = $groupServiceClient->getGroup($formattedName); + * } finally { + * $groupServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The group to retrieve. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Monitoring\V3\Group + * + * @throws ApiException if the remote call fails + */ + public function getGroup($name, array $optionalArgs = []) + { + $request = new GetGroupRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetGroup', Group::class, $optionalArgs, $request)->wait(); + } + + /** + * Lists the monitored resources that are members of a group. + * + * Sample code: + * ``` + * $groupServiceClient = new GroupServiceClient(); + * try { + * $formattedName = $groupServiceClient->groupName('[PROJECT]', '[GROUP]'); + * // Iterate over pages of elements + * $pagedResponse = $groupServiceClient->listGroupMembers($formattedName); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $groupServiceClient->listGroupMembers($formattedName); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $groupServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The group whose members are listed. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] + * @param array $optionalArgs { + * Optional. + * + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type string $filter + * An optional [list + * filter](https://cloud.google.com/monitoring/api/learn_more#filtering) + * describing the members to be returned. The filter may reference the type, + * labels, and metadata of monitored resources that comprise the group. For + * example, to return only resources representing Compute Engine VM instances, + * use this filter: + * + * `resource.type = "gce_instance"` + * @type TimeInterval $interval + * An optional time interval for which results should be returned. Only + * members that were part of the group during the specified interval are + * included in the response. If no interval is provided then the group + * membership over the last minute is returned. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listGroupMembers($name, array $optionalArgs = []) + { + $request = new ListGroupMembersRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + if (isset($optionalArgs['interval'])) { + $request->setInterval($optionalArgs['interval']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListGroupMembers', $optionalArgs, ListGroupMembersResponse::class, $request); + } + + /** + * Lists the existing groups. + * + * Sample code: + * ``` + * $groupServiceClient = new GroupServiceClient(); + * try { + * $name = 'name'; + * // Iterate over pages of elements + * $pagedResponse = $groupServiceClient->listGroups($name); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $groupServiceClient->listGroups($name); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $groupServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) whose + * groups are to be listed. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER] + * @param array $optionalArgs { + * Optional. + * + * @type string $childrenOfGroup + * A group name. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] + * + * Returns groups whose `parent_name` field contains the group + * name. If no groups have this parent, the results are empty. + * @type string $ancestorsOfGroup + * A group name. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] + * + * Returns groups that are ancestors of the specified group. + * The groups are returned in order, starting with the immediate parent and + * ending with the most distant ancestor. If the specified group has no + * immediate parent, the results are empty. + * @type string $descendantsOfGroup + * A group name. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] + * + * Returns the descendants of the specified group. This is a superset of + * the results returned by the `children_of_group` filter, and includes + * children-of-children, and so forth. + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listGroups($name, array $optionalArgs = []) + { + $request = new ListGroupsRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['childrenOfGroup'])) { + $request->setChildrenOfGroup($optionalArgs['childrenOfGroup']); + } + + if (isset($optionalArgs['ancestorsOfGroup'])) { + $request->setAncestorsOfGroup($optionalArgs['ancestorsOfGroup']); + } + + if (isset($optionalArgs['descendantsOfGroup'])) { + $request->setDescendantsOfGroup($optionalArgs['descendantsOfGroup']); + } + + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListGroups', $optionalArgs, ListGroupsResponse::class, $request); + } + + /** + * Updates an existing group. + * You can change any group attributes except `name`. + * + * Sample code: + * ``` + * $groupServiceClient = new GroupServiceClient(); + * try { + * $group = new Group(); + * $response = $groupServiceClient->updateGroup($group); + * } finally { + * $groupServiceClient->close(); + * } + * ``` + * + * @param Group $group Required. The new definition of the group. All fields of the existing + * group, excepting `name`, are replaced with the corresponding fields of this + * group. + * @param array $optionalArgs { + * Optional. + * + * @type bool $validateOnly + * If true, validate this request but do not update the existing group. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Monitoring\V3\Group + * + * @throws ApiException if the remote call fails + */ + public function updateGroup($group, array $optionalArgs = []) + { + $request = new UpdateGroupRequest(); + $requestParamHeaders = []; + $request->setGroup($group); + $requestParamHeaders['group.name'] = $group->getName(); + if (isset($optionalArgs['validateOnly'])) { + $request->setValidateOnly($optionalArgs['validateOnly']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('UpdateGroup', Group::class, $optionalArgs, $request)->wait(); + } +} diff --git a/owl-bot-staging/Monitoring/v3/src/V3/Gapic/MetricServiceGapicClient.php b/owl-bot-staging/Monitoring/v3/src/V3/Gapic/MetricServiceGapicClient.php new file mode 100644 index 000000000000..ca5159847791 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/src/V3/Gapic/MetricServiceGapicClient.php @@ -0,0 +1,1178 @@ +createMetricDescriptor($name, $metricDescriptor); + * } finally { + * $metricServiceClient->close(); + * } + * ``` + * + * Many parameters require resource names to be formatted in a particular way. To + * assist with these names, this class includes a format method for each type of + * name, and additionally a parseName method to extract the individual identifiers + * contained within formatted names that are returned by the API. + * + * @deprecated Please use the new service client {@see \Google\Cloud\Monitoring\V3\Client\MetricServiceClient}. + */ +class MetricServiceGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.monitoring.v3.MetricService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + const SERVICE_ADDRESS = 'monitoring.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'monitoring.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/monitoring', + 'https://www.googleapis.com/auth/monitoring.read', + 'https://www.googleapis.com/auth/monitoring.write', + ]; + + private static $folderNameTemplate; + + private static $folderMetricDescriptorNameTemplate; + + private static $folderMonitoredResourceDescriptorNameTemplate; + + private static $metricDescriptorNameTemplate; + + private static $monitoredResourceDescriptorNameTemplate; + + private static $organizationNameTemplate; + + private static $organizationMetricDescriptorNameTemplate; + + private static $organizationMonitoredResourceDescriptorNameTemplate; + + private static $projectNameTemplate; + + private static $projectMetricDescriptorNameTemplate; + + private static $projectMonitoredResourceDescriptorNameTemplate; + + private static $workspaceNameTemplate; + + private static $pathTemplateMap; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/metric_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/metric_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/metric_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/metric_service_rest_client_config.php', + ], + ], + ]; + } + + private static function getFolderNameTemplate() + { + if (self::$folderNameTemplate == null) { + self::$folderNameTemplate = new PathTemplate('folders/{folder}'); + } + + return self::$folderNameTemplate; + } + + private static function getFolderMetricDescriptorNameTemplate() + { + if (self::$folderMetricDescriptorNameTemplate == null) { + self::$folderMetricDescriptorNameTemplate = new PathTemplate('folders/{folder}/metricDescriptors/{metric_descriptor=**}'); + } + + return self::$folderMetricDescriptorNameTemplate; + } + + private static function getFolderMonitoredResourceDescriptorNameTemplate() + { + if (self::$folderMonitoredResourceDescriptorNameTemplate == null) { + self::$folderMonitoredResourceDescriptorNameTemplate = new PathTemplate('folders/{folder}/monitoredResourceDescriptors/{monitored_resource_descriptor}'); + } + + return self::$folderMonitoredResourceDescriptorNameTemplate; + } + + private static function getMetricDescriptorNameTemplate() + { + if (self::$metricDescriptorNameTemplate == null) { + self::$metricDescriptorNameTemplate = new PathTemplate('projects/{project}/metricDescriptors/{metric_descriptor=**}'); + } + + return self::$metricDescriptorNameTemplate; + } + + private static function getMonitoredResourceDescriptorNameTemplate() + { + if (self::$monitoredResourceDescriptorNameTemplate == null) { + self::$monitoredResourceDescriptorNameTemplate = new PathTemplate('projects/{project}/monitoredResourceDescriptors/{monitored_resource_descriptor}'); + } + + return self::$monitoredResourceDescriptorNameTemplate; + } + + private static function getOrganizationNameTemplate() + { + if (self::$organizationNameTemplate == null) { + self::$organizationNameTemplate = new PathTemplate('organizations/{organization}'); + } + + return self::$organizationNameTemplate; + } + + private static function getOrganizationMetricDescriptorNameTemplate() + { + if (self::$organizationMetricDescriptorNameTemplate == null) { + self::$organizationMetricDescriptorNameTemplate = new PathTemplate('organizations/{organization}/metricDescriptors/{metric_descriptor=**}'); + } + + return self::$organizationMetricDescriptorNameTemplate; + } + + private static function getOrganizationMonitoredResourceDescriptorNameTemplate() + { + if (self::$organizationMonitoredResourceDescriptorNameTemplate == null) { + self::$organizationMonitoredResourceDescriptorNameTemplate = new PathTemplate('organizations/{organization}/monitoredResourceDescriptors/{monitored_resource_descriptor}'); + } + + return self::$organizationMonitoredResourceDescriptorNameTemplate; + } + + private static function getProjectNameTemplate() + { + if (self::$projectNameTemplate == null) { + self::$projectNameTemplate = new PathTemplate('projects/{project}'); + } + + return self::$projectNameTemplate; + } + + private static function getProjectMetricDescriptorNameTemplate() + { + if (self::$projectMetricDescriptorNameTemplate == null) { + self::$projectMetricDescriptorNameTemplate = new PathTemplate('projects/{project}/metricDescriptors/{metric_descriptor=**}'); + } + + return self::$projectMetricDescriptorNameTemplate; + } + + private static function getProjectMonitoredResourceDescriptorNameTemplate() + { + if (self::$projectMonitoredResourceDescriptorNameTemplate == null) { + self::$projectMonitoredResourceDescriptorNameTemplate = new PathTemplate('projects/{project}/monitoredResourceDescriptors/{monitored_resource_descriptor}'); + } + + return self::$projectMonitoredResourceDescriptorNameTemplate; + } + + private static function getWorkspaceNameTemplate() + { + if (self::$workspaceNameTemplate == null) { + self::$workspaceNameTemplate = new PathTemplate('projects/{project}'); + } + + return self::$workspaceNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'folder' => self::getFolderNameTemplate(), + 'folderMetricDescriptor' => self::getFolderMetricDescriptorNameTemplate(), + 'folderMonitoredResourceDescriptor' => self::getFolderMonitoredResourceDescriptorNameTemplate(), + 'metricDescriptor' => self::getMetricDescriptorNameTemplate(), + 'monitoredResourceDescriptor' => self::getMonitoredResourceDescriptorNameTemplate(), + 'organization' => self::getOrganizationNameTemplate(), + 'organizationMetricDescriptor' => self::getOrganizationMetricDescriptorNameTemplate(), + 'organizationMonitoredResourceDescriptor' => self::getOrganizationMonitoredResourceDescriptorNameTemplate(), + 'project' => self::getProjectNameTemplate(), + 'projectMetricDescriptor' => self::getProjectMetricDescriptorNameTemplate(), + 'projectMonitoredResourceDescriptor' => self::getProjectMonitoredResourceDescriptorNameTemplate(), + 'workspace' => self::getWorkspaceNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent a folder + * resource. + * + * @param string $folder + * + * @return string The formatted folder resource. + */ + public static function folderName($folder) + { + return self::getFolderNameTemplate()->render([ + 'folder' => $folder, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * folder_metric_descriptor resource. + * + * @param string $folder + * @param string $metricDescriptor + * + * @return string The formatted folder_metric_descriptor resource. + */ + public static function folderMetricDescriptorName($folder, $metricDescriptor) + { + return self::getFolderMetricDescriptorNameTemplate()->render([ + 'folder' => $folder, + 'metric_descriptor' => $metricDescriptor, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * folder_monitored_resource_descriptor resource. + * + * @param string $folder + * @param string $monitoredResourceDescriptor + * + * @return string The formatted folder_monitored_resource_descriptor resource. + */ + public static function folderMonitoredResourceDescriptorName($folder, $monitoredResourceDescriptor) + { + return self::getFolderMonitoredResourceDescriptorNameTemplate()->render([ + 'folder' => $folder, + 'monitored_resource_descriptor' => $monitoredResourceDescriptor, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * metric_descriptor resource. + * + * @param string $project + * @param string $metricDescriptor + * + * @return string The formatted metric_descriptor resource. + */ + public static function metricDescriptorName($project, $metricDescriptor) + { + return self::getMetricDescriptorNameTemplate()->render([ + 'project' => $project, + 'metric_descriptor' => $metricDescriptor, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * monitored_resource_descriptor resource. + * + * @param string $project + * @param string $monitoredResourceDescriptor + * + * @return string The formatted monitored_resource_descriptor resource. + */ + public static function monitoredResourceDescriptorName($project, $monitoredResourceDescriptor) + { + return self::getMonitoredResourceDescriptorNameTemplate()->render([ + 'project' => $project, + 'monitored_resource_descriptor' => $monitoredResourceDescriptor, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a organization + * resource. + * + * @param string $organization + * + * @return string The formatted organization resource. + */ + public static function organizationName($organization) + { + return self::getOrganizationNameTemplate()->render([ + 'organization' => $organization, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_metric_descriptor resource. + * + * @param string $organization + * @param string $metricDescriptor + * + * @return string The formatted organization_metric_descriptor resource. + */ + public static function organizationMetricDescriptorName($organization, $metricDescriptor) + { + return self::getOrganizationMetricDescriptorNameTemplate()->render([ + 'organization' => $organization, + 'metric_descriptor' => $metricDescriptor, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_monitored_resource_descriptor resource. + * + * @param string $organization + * @param string $monitoredResourceDescriptor + * + * @return string The formatted organization_monitored_resource_descriptor resource. + */ + public static function organizationMonitoredResourceDescriptorName($organization, $monitoredResourceDescriptor) + { + return self::getOrganizationMonitoredResourceDescriptorNameTemplate()->render([ + 'organization' => $organization, + 'monitored_resource_descriptor' => $monitoredResourceDescriptor, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a project + * resource. + * + * @param string $project + * + * @return string The formatted project resource. + */ + public static function projectName($project) + { + return self::getProjectNameTemplate()->render([ + 'project' => $project, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_metric_descriptor resource. + * + * @param string $project + * @param string $metricDescriptor + * + * @return string The formatted project_metric_descriptor resource. + */ + public static function projectMetricDescriptorName($project, $metricDescriptor) + { + return self::getProjectMetricDescriptorNameTemplate()->render([ + 'project' => $project, + 'metric_descriptor' => $metricDescriptor, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_monitored_resource_descriptor resource. + * + * @param string $project + * @param string $monitoredResourceDescriptor + * + * @return string The formatted project_monitored_resource_descriptor resource. + */ + public static function projectMonitoredResourceDescriptorName($project, $monitoredResourceDescriptor) + { + return self::getProjectMonitoredResourceDescriptorNameTemplate()->render([ + 'project' => $project, + 'monitored_resource_descriptor' => $monitoredResourceDescriptor, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a workspace + * resource. + * + * @param string $project + * + * @return string The formatted workspace resource. + */ + public static function workspaceName($project) + { + return self::getWorkspaceNameTemplate()->render([ + 'project' => $project, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - folder: folders/{folder} + * - folderMetricDescriptor: folders/{folder}/metricDescriptors/{metric_descriptor=**} + * - folderMonitoredResourceDescriptor: folders/{folder}/monitoredResourceDescriptors/{monitored_resource_descriptor} + * - metricDescriptor: projects/{project}/metricDescriptors/{metric_descriptor=**} + * - monitoredResourceDescriptor: projects/{project}/monitoredResourceDescriptors/{monitored_resource_descriptor} + * - organization: organizations/{organization} + * - organizationMetricDescriptor: organizations/{organization}/metricDescriptors/{metric_descriptor=**} + * - organizationMonitoredResourceDescriptor: organizations/{organization}/monitoredResourceDescriptors/{monitored_resource_descriptor} + * - project: projects/{project} + * - projectMetricDescriptor: projects/{project}/metricDescriptors/{metric_descriptor=**} + * - projectMonitoredResourceDescriptor: projects/{project}/monitoredResourceDescriptors/{monitored_resource_descriptor} + * - workspace: projects/{project} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName($formattedName, $template = null) + { + $templateMap = self::getPathTemplateMap(); + if ($template) { + if (!isset($templateMap[$template])) { + throw new ValidationException("Template name $template does not exist"); + } + + return $templateMap[$template]->match($formattedName); + } + + foreach ($templateMap as $templateName => $pathTemplate) { + try { + return $pathTemplate->match($formattedName); + } catch (ValidationException $ex) { + // Swallow the exception to continue trying other path templates + } + } + + throw new ValidationException("Input did not match any known format. Input: $formattedName"); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'monitoring.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** + * Creates a new metric descriptor. + * The creation is executed asynchronously. + * User-created metric descriptors define + * [custom metrics](https://cloud.google.com/monitoring/custom-metrics). + * The metric descriptor is updated if it already exists, + * except that metric labels are never removed. + * + * Sample code: + * ``` + * $metricServiceClient = new MetricServiceClient(); + * try { + * $name = 'name'; + * $metricDescriptor = new MetricDescriptor(); + * $response = $metricServiceClient->createMetricDescriptor($name, $metricDescriptor); + * } finally { + * $metricServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which + * to execute the request. The format is: + * 4 + * projects/[PROJECT_ID_OR_NUMBER] + * @param MetricDescriptor $metricDescriptor Required. The new [custom + * metric](https://cloud.google.com/monitoring/custom-metrics) descriptor. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Api\MetricDescriptor + * + * @throws ApiException if the remote call fails + */ + public function createMetricDescriptor($name, $metricDescriptor, array $optionalArgs = []) + { + $request = new CreateMetricDescriptorRequest(); + $requestParamHeaders = []; + $request->setName($name); + $request->setMetricDescriptor($metricDescriptor); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('CreateMetricDescriptor', MetricDescriptor::class, $optionalArgs, $request)->wait(); + } + + /** + * Creates or adds data to one or more service time series. A service time + * series is a time series for a metric from a Google Cloud service. The + * response is empty if all time series in the request were written. If any + * time series could not be written, a corresponding failure message is + * included in the error response. This endpoint rejects writes to + * user-defined metrics. + * This method is only for use by Google Cloud services. Use + * [projects.timeSeries.create][google.monitoring.v3.MetricService.CreateTimeSeries] + * instead. + * + * Sample code: + * ``` + * $metricServiceClient = new MetricServiceClient(); + * try { + * $formattedName = $metricServiceClient->projectName('[PROJECT]'); + * $timeSeries = []; + * $metricServiceClient->createServiceTimeSeries($formattedName, $timeSeries); + * } finally { + * $metricServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which + * to execute the request. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER] + * @param TimeSeries[] $timeSeries Required. The new data to be added to a list of time series. + * Adds at most one data point to each of several time series. The new data + * point must be more recent than any other point in its time series. Each + * `TimeSeries` value must fully specify a unique time series by supplying + * all label values for the metric and the monitored resource. + * + * The maximum number of `TimeSeries` objects per `Create` request is 200. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException if the remote call fails + */ + public function createServiceTimeSeries($name, $timeSeries, array $optionalArgs = []) + { + $request = new CreateTimeSeriesRequest(); + $requestParamHeaders = []; + $request->setName($name); + $request->setTimeSeries($timeSeries); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('CreateServiceTimeSeries', GPBEmpty::class, $optionalArgs, $request)->wait(); + } + + /** + * Creates or adds data to one or more time series. + * The response is empty if all time series in the request were written. + * If any time series could not be written, a corresponding failure message is + * included in the error response. + * This method does not support + * [resource locations constraint of an organization + * policy](https://cloud.google.com/resource-manager/docs/organization-policy/defining-locations#setting_the_organization_policy). + * + * Sample code: + * ``` + * $metricServiceClient = new MetricServiceClient(); + * try { + * $formattedName = $metricServiceClient->projectName('[PROJECT]'); + * $timeSeries = []; + * $metricServiceClient->createTimeSeries($formattedName, $timeSeries); + * } finally { + * $metricServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which + * to execute the request. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER] + * @param TimeSeries[] $timeSeries Required. The new data to be added to a list of time series. + * Adds at most one data point to each of several time series. The new data + * point must be more recent than any other point in its time series. Each + * `TimeSeries` value must fully specify a unique time series by supplying + * all label values for the metric and the monitored resource. + * + * The maximum number of `TimeSeries` objects per `Create` request is 200. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException if the remote call fails + */ + public function createTimeSeries($name, $timeSeries, array $optionalArgs = []) + { + $request = new CreateTimeSeriesRequest(); + $requestParamHeaders = []; + $request->setName($name); + $request->setTimeSeries($timeSeries); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('CreateTimeSeries', GPBEmpty::class, $optionalArgs, $request)->wait(); + } + + /** + * Deletes a metric descriptor. Only user-created + * [custom metrics](https://cloud.google.com/monitoring/custom-metrics) can be + * deleted. + * + * Sample code: + * ``` + * $metricServiceClient = new MetricServiceClient(); + * try { + * $formattedName = $metricServiceClient->metricDescriptorName('[PROJECT]', '[METRIC_DESCRIPTOR]'); + * $metricServiceClient->deleteMetricDescriptor($formattedName); + * } finally { + * $metricServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The metric descriptor on which to execute the request. The format + * is: + * + * projects/[PROJECT_ID_OR_NUMBER]/metricDescriptors/[METRIC_ID] + * + * An example of `[METRIC_ID]` is: + * `"custom.googleapis.com/my_test_metric"`. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException if the remote call fails + */ + public function deleteMetricDescriptor($name, array $optionalArgs = []) + { + $request = new DeleteMetricDescriptorRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('DeleteMetricDescriptor', GPBEmpty::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets a single metric descriptor. + * + * Sample code: + * ``` + * $metricServiceClient = new MetricServiceClient(); + * try { + * $formattedName = $metricServiceClient->metricDescriptorName('[PROJECT]', '[METRIC_DESCRIPTOR]'); + * $response = $metricServiceClient->getMetricDescriptor($formattedName); + * } finally { + * $metricServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The metric descriptor on which to execute the request. The format + * is: + * + * projects/[PROJECT_ID_OR_NUMBER]/metricDescriptors/[METRIC_ID] + * + * An example value of `[METRIC_ID]` is + * `"compute.googleapis.com/instance/disk/read_bytes_count"`. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Api\MetricDescriptor + * + * @throws ApiException if the remote call fails + */ + public function getMetricDescriptor($name, array $optionalArgs = []) + { + $request = new GetMetricDescriptorRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetMetricDescriptor', MetricDescriptor::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets a single monitored resource descriptor. + * + * Sample code: + * ``` + * $metricServiceClient = new MetricServiceClient(); + * try { + * $formattedName = $metricServiceClient->monitoredResourceDescriptorName('[PROJECT]', '[MONITORED_RESOURCE_DESCRIPTOR]'); + * $response = $metricServiceClient->getMonitoredResourceDescriptor($formattedName); + * } finally { + * $metricServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The monitored resource descriptor to get. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER]/monitoredResourceDescriptors/[RESOURCE_TYPE] + * + * The `[RESOURCE_TYPE]` is a predefined type, such as + * `cloudsql_database`. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Api\MonitoredResourceDescriptor + * + * @throws ApiException if the remote call fails + */ + public function getMonitoredResourceDescriptor($name, array $optionalArgs = []) + { + $request = new GetMonitoredResourceDescriptorRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetMonitoredResourceDescriptor', MonitoredResourceDescriptor::class, $optionalArgs, $request)->wait(); + } + + /** + * Lists metric descriptors that match a filter. + * + * Sample code: + * ``` + * $metricServiceClient = new MetricServiceClient(); + * try { + * $name = 'name'; + * // Iterate over pages of elements + * $pagedResponse = $metricServiceClient->listMetricDescriptors($name); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $metricServiceClient->listMetricDescriptors($name); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $metricServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which + * to execute the request. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER] + * @param array $optionalArgs { + * Optional. + * + * @type string $filter + * If this field is empty, all custom and + * system-defined metric descriptors are returned. + * Otherwise, the [filter](https://cloud.google.com/monitoring/api/v3/filters) + * specifies which metric descriptors are to be + * returned. For example, the following filter matches all + * [custom metrics](https://cloud.google.com/monitoring/custom-metrics): + * + * metric.type = starts_with("custom.googleapis.com/") + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listMetricDescriptors($name, array $optionalArgs = []) + { + $request = new ListMetricDescriptorsRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListMetricDescriptors', $optionalArgs, ListMetricDescriptorsResponse::class, $request); + } + + /** + * Lists monitored resource descriptors that match a filter. + * + * Sample code: + * ``` + * $metricServiceClient = new MetricServiceClient(); + * try { + * $name = 'name'; + * // Iterate over pages of elements + * $pagedResponse = $metricServiceClient->listMonitoredResourceDescriptors($name); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $metricServiceClient->listMonitoredResourceDescriptors($name); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $metricServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which + * to execute the request. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER] + * @param array $optionalArgs { + * Optional. + * + * @type string $filter + * An optional [filter](https://cloud.google.com/monitoring/api/v3/filters) + * describing the descriptors to be returned. The filter can reference the + * descriptor's type and labels. For example, the following filter returns + * only Google Compute Engine descriptors that have an `id` label: + * + * resource.type = starts_with("gce_") AND resource.label:id + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listMonitoredResourceDescriptors($name, array $optionalArgs = []) + { + $request = new ListMonitoredResourceDescriptorsRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListMonitoredResourceDescriptors', $optionalArgs, ListMonitoredResourceDescriptorsResponse::class, $request); + } + + /** + * Lists time series that match a filter. + * + * Sample code: + * ``` + * $metricServiceClient = new MetricServiceClient(); + * try { + * $formattedName = $metricServiceClient->workspaceName('[PROJECT]'); + * $filter = 'filter'; + * $interval = new TimeInterval(); + * $view = TimeSeriesView::FULL; + * // Iterate over pages of elements + * $pagedResponse = $metricServiceClient->listTimeSeries($formattedName, $filter, $interval, $view); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $metricServiceClient->listTimeSeries($formattedName, $filter, $interval, $view); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $metricServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name), + * organization or folder on which to execute the request. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER] + * organizations/[ORGANIZATION_ID] + * folders/[FOLDER_ID] + * @param string $filter Required. A [monitoring + * filter](https://cloud.google.com/monitoring/api/v3/filters) that specifies + * which time series should be returned. The filter must specify a single + * metric type, and can additionally specify metric labels and other + * information. For example: + * + * metric.type = "compute.googleapis.com/instance/cpu/usage_time" AND + * metric.labels.instance_name = "my-instance-name" + * @param TimeInterval $interval Required. The time interval for which results should be returned. Only time + * series that contain data points in the specified interval are included in + * the response. + * @param int $view Required. Specifies which information is returned about the time series. + * For allowed values, use constants defined on {@see \Google\Cloud\Monitoring\V3\ListTimeSeriesRequest\TimeSeriesView} + * @param array $optionalArgs { + * Optional. + * + * @type Aggregation $aggregation + * Specifies the alignment of data points in individual time series as + * well as how to combine the retrieved time series across specified labels. + * + * By default (if no `aggregation` is explicitly specified), the raw time + * series data is returned. + * @type Aggregation $secondaryAggregation + * Apply a second aggregation after `aggregation` is applied. May only be + * specified if `aggregation` is specified. + * @type string $orderBy + * Unsupported: must be left blank. The points in each time series are + * currently returned in reverse time order (most recent to oldest). + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listTimeSeries($name, $filter, $interval, $view, array $optionalArgs = []) + { + $request = new ListTimeSeriesRequest(); + $requestParamHeaders = []; + $request->setName($name); + $request->setFilter($filter); + $request->setInterval($interval); + $request->setView($view); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['aggregation'])) { + $request->setAggregation($optionalArgs['aggregation']); + } + + if (isset($optionalArgs['secondaryAggregation'])) { + $request->setSecondaryAggregation($optionalArgs['secondaryAggregation']); + } + + if (isset($optionalArgs['orderBy'])) { + $request->setOrderBy($optionalArgs['orderBy']); + } + + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListTimeSeries', $optionalArgs, ListTimeSeriesResponse::class, $request); + } +} diff --git a/owl-bot-staging/Monitoring/v3/src/V3/Gapic/NotificationChannelServiceGapicClient.php b/owl-bot-staging/Monitoring/v3/src/V3/Gapic/NotificationChannelServiceGapicClient.php new file mode 100644 index 000000000000..75cf9393bd47 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/src/V3/Gapic/NotificationChannelServiceGapicClient.php @@ -0,0 +1,1075 @@ +createNotificationChannel($name, $notificationChannel); + * } finally { + * $notificationChannelServiceClient->close(); + * } + * ``` + * + * Many parameters require resource names to be formatted in a particular way. To + * assist with these names, this class includes a format method for each type of + * name, and additionally a parseName method to extract the individual identifiers + * contained within formatted names that are returned by the API. + * + * @deprecated Please use the new service client {@see \Google\Cloud\Monitoring\V3\Client\NotificationChannelServiceClient}. + */ +class NotificationChannelServiceGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.monitoring.v3.NotificationChannelService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + const SERVICE_ADDRESS = 'monitoring.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'monitoring.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/monitoring', + 'https://www.googleapis.com/auth/monitoring.read', + ]; + + private static $folderChannelDescriptorNameTemplate; + + private static $folderNotificationChannelNameTemplate; + + private static $notificationChannelNameTemplate; + + private static $notificationChannelDescriptorNameTemplate; + + private static $organizationChannelDescriptorNameTemplate; + + private static $organizationNotificationChannelNameTemplate; + + private static $projectChannelDescriptorNameTemplate; + + private static $projectNotificationChannelNameTemplate; + + private static $pathTemplateMap; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/notification_channel_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/notification_channel_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/notification_channel_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/notification_channel_service_rest_client_config.php', + ], + ], + ]; + } + + private static function getFolderChannelDescriptorNameTemplate() + { + if (self::$folderChannelDescriptorNameTemplate == null) { + self::$folderChannelDescriptorNameTemplate = new PathTemplate('folders/{folder}/notificationChannelDescriptors/{channel_descriptor}'); + } + + return self::$folderChannelDescriptorNameTemplate; + } + + private static function getFolderNotificationChannelNameTemplate() + { + if (self::$folderNotificationChannelNameTemplate == null) { + self::$folderNotificationChannelNameTemplate = new PathTemplate('folders/{folder}/notificationChannels/{notification_channel}'); + } + + return self::$folderNotificationChannelNameTemplate; + } + + private static function getNotificationChannelNameTemplate() + { + if (self::$notificationChannelNameTemplate == null) { + self::$notificationChannelNameTemplate = new PathTemplate('projects/{project}/notificationChannels/{notification_channel}'); + } + + return self::$notificationChannelNameTemplate; + } + + private static function getNotificationChannelDescriptorNameTemplate() + { + if (self::$notificationChannelDescriptorNameTemplate == null) { + self::$notificationChannelDescriptorNameTemplate = new PathTemplate('projects/{project}/notificationChannelDescriptors/{channel_descriptor}'); + } + + return self::$notificationChannelDescriptorNameTemplate; + } + + private static function getOrganizationChannelDescriptorNameTemplate() + { + if (self::$organizationChannelDescriptorNameTemplate == null) { + self::$organizationChannelDescriptorNameTemplate = new PathTemplate('organizations/{organization}/notificationChannelDescriptors/{channel_descriptor}'); + } + + return self::$organizationChannelDescriptorNameTemplate; + } + + private static function getOrganizationNotificationChannelNameTemplate() + { + if (self::$organizationNotificationChannelNameTemplate == null) { + self::$organizationNotificationChannelNameTemplate = new PathTemplate('organizations/{organization}/notificationChannels/{notification_channel}'); + } + + return self::$organizationNotificationChannelNameTemplate; + } + + private static function getProjectChannelDescriptorNameTemplate() + { + if (self::$projectChannelDescriptorNameTemplate == null) { + self::$projectChannelDescriptorNameTemplate = new PathTemplate('projects/{project}/notificationChannelDescriptors/{channel_descriptor}'); + } + + return self::$projectChannelDescriptorNameTemplate; + } + + private static function getProjectNotificationChannelNameTemplate() + { + if (self::$projectNotificationChannelNameTemplate == null) { + self::$projectNotificationChannelNameTemplate = new PathTemplate('projects/{project}/notificationChannels/{notification_channel}'); + } + + return self::$projectNotificationChannelNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'folderChannelDescriptor' => self::getFolderChannelDescriptorNameTemplate(), + 'folderNotificationChannel' => self::getFolderNotificationChannelNameTemplate(), + 'notificationChannel' => self::getNotificationChannelNameTemplate(), + 'notificationChannelDescriptor' => self::getNotificationChannelDescriptorNameTemplate(), + 'organizationChannelDescriptor' => self::getOrganizationChannelDescriptorNameTemplate(), + 'organizationNotificationChannel' => self::getOrganizationNotificationChannelNameTemplate(), + 'projectChannelDescriptor' => self::getProjectChannelDescriptorNameTemplate(), + 'projectNotificationChannel' => self::getProjectNotificationChannelNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent a + * folder_channel_descriptor resource. + * + * @param string $folder + * @param string $channelDescriptor + * + * @return string The formatted folder_channel_descriptor resource. + */ + public static function folderChannelDescriptorName($folder, $channelDescriptor) + { + return self::getFolderChannelDescriptorNameTemplate()->render([ + 'folder' => $folder, + 'channel_descriptor' => $channelDescriptor, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * folder_notification_channel resource. + * + * @param string $folder + * @param string $notificationChannel + * + * @return string The formatted folder_notification_channel resource. + */ + public static function folderNotificationChannelName($folder, $notificationChannel) + { + return self::getFolderNotificationChannelNameTemplate()->render([ + 'folder' => $folder, + 'notification_channel' => $notificationChannel, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * notification_channel resource. + * + * @param string $project + * @param string $notificationChannel + * + * @return string The formatted notification_channel resource. + */ + public static function notificationChannelName($project, $notificationChannel) + { + return self::getNotificationChannelNameTemplate()->render([ + 'project' => $project, + 'notification_channel' => $notificationChannel, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * notification_channel_descriptor resource. + * + * @param string $project + * @param string $channelDescriptor + * + * @return string The formatted notification_channel_descriptor resource. + */ + public static function notificationChannelDescriptorName($project, $channelDescriptor) + { + return self::getNotificationChannelDescriptorNameTemplate()->render([ + 'project' => $project, + 'channel_descriptor' => $channelDescriptor, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_channel_descriptor resource. + * + * @param string $organization + * @param string $channelDescriptor + * + * @return string The formatted organization_channel_descriptor resource. + */ + public static function organizationChannelDescriptorName($organization, $channelDescriptor) + { + return self::getOrganizationChannelDescriptorNameTemplate()->render([ + 'organization' => $organization, + 'channel_descriptor' => $channelDescriptor, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_notification_channel resource. + * + * @param string $organization + * @param string $notificationChannel + * + * @return string The formatted organization_notification_channel resource. + */ + public static function organizationNotificationChannelName($organization, $notificationChannel) + { + return self::getOrganizationNotificationChannelNameTemplate()->render([ + 'organization' => $organization, + 'notification_channel' => $notificationChannel, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_channel_descriptor resource. + * + * @param string $project + * @param string $channelDescriptor + * + * @return string The formatted project_channel_descriptor resource. + */ + public static function projectChannelDescriptorName($project, $channelDescriptor) + { + return self::getProjectChannelDescriptorNameTemplate()->render([ + 'project' => $project, + 'channel_descriptor' => $channelDescriptor, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_notification_channel resource. + * + * @param string $project + * @param string $notificationChannel + * + * @return string The formatted project_notification_channel resource. + */ + public static function projectNotificationChannelName($project, $notificationChannel) + { + return self::getProjectNotificationChannelNameTemplate()->render([ + 'project' => $project, + 'notification_channel' => $notificationChannel, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - folderChannelDescriptor: folders/{folder}/notificationChannelDescriptors/{channel_descriptor} + * - folderNotificationChannel: folders/{folder}/notificationChannels/{notification_channel} + * - notificationChannel: projects/{project}/notificationChannels/{notification_channel} + * - notificationChannelDescriptor: projects/{project}/notificationChannelDescriptors/{channel_descriptor} + * - organizationChannelDescriptor: organizations/{organization}/notificationChannelDescriptors/{channel_descriptor} + * - organizationNotificationChannel: organizations/{organization}/notificationChannels/{notification_channel} + * - projectChannelDescriptor: projects/{project}/notificationChannelDescriptors/{channel_descriptor} + * - projectNotificationChannel: projects/{project}/notificationChannels/{notification_channel} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName($formattedName, $template = null) + { + $templateMap = self::getPathTemplateMap(); + if ($template) { + if (!isset($templateMap[$template])) { + throw new ValidationException("Template name $template does not exist"); + } + + return $templateMap[$template]->match($formattedName); + } + + foreach ($templateMap as $templateName => $pathTemplate) { + try { + return $pathTemplate->match($formattedName); + } catch (ValidationException $ex) { + // Swallow the exception to continue trying other path templates + } + } + + throw new ValidationException("Input did not match any known format. Input: $formattedName"); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'monitoring.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** + * Creates a new notification channel, representing a single notification + * endpoint such as an email address, SMS number, or PagerDuty service. + * + * Design your application to single-thread API calls that modify the state of + * notification channels in a single project. This includes calls to + * CreateNotificationChannel, DeleteNotificationChannel and + * UpdateNotificationChannel. + * + * Sample code: + * ``` + * $notificationChannelServiceClient = new NotificationChannelServiceClient(); + * try { + * $name = 'name'; + * $notificationChannel = new NotificationChannel(); + * $response = $notificationChannelServiceClient->createNotificationChannel($name, $notificationChannel); + * } finally { + * $notificationChannelServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which + * to execute the request. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER] + * + * This names the container into which the channel will be + * written, this does not name the newly created channel. The resulting + * channel's name will have a normalized version of this field as a prefix, + * but will add `/notificationChannels/[CHANNEL_ID]` to identify the channel. + * @param NotificationChannel $notificationChannel Required. The definition of the `NotificationChannel` to create. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Monitoring\V3\NotificationChannel + * + * @throws ApiException if the remote call fails + */ + public function createNotificationChannel($name, $notificationChannel, array $optionalArgs = []) + { + $request = new CreateNotificationChannelRequest(); + $requestParamHeaders = []; + $request->setName($name); + $request->setNotificationChannel($notificationChannel); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('CreateNotificationChannel', NotificationChannel::class, $optionalArgs, $request)->wait(); + } + + /** + * Deletes a notification channel. + * + * Design your application to single-thread API calls that modify the state of + * notification channels in a single project. This includes calls to + * CreateNotificationChannel, DeleteNotificationChannel and + * UpdateNotificationChannel. + * + * Sample code: + * ``` + * $notificationChannelServiceClient = new NotificationChannelServiceClient(); + * try { + * $formattedName = $notificationChannelServiceClient->notificationChannelName('[PROJECT]', '[NOTIFICATION_CHANNEL]'); + * $notificationChannelServiceClient->deleteNotificationChannel($formattedName); + * } finally { + * $notificationChannelServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The channel for which to execute the request. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID] + * @param array $optionalArgs { + * Optional. + * + * @type bool $force + * If true, the notification channel will be deleted regardless of its + * use in alert policies (the policies will be updated to remove the + * channel). If false, this operation will fail if the notification channel + * is referenced by existing alerting policies. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException if the remote call fails + */ + public function deleteNotificationChannel($name, array $optionalArgs = []) + { + $request = new DeleteNotificationChannelRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['force'])) { + $request->setForce($optionalArgs['force']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('DeleteNotificationChannel', GPBEmpty::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets a single notification channel. The channel includes the relevant + * configuration details with which the channel was created. However, the + * response may truncate or omit passwords, API keys, or other private key + * matter and thus the response may not be 100% identical to the information + * that was supplied in the call to the create method. + * + * Sample code: + * ``` + * $notificationChannelServiceClient = new NotificationChannelServiceClient(); + * try { + * $formattedName = $notificationChannelServiceClient->notificationChannelName('[PROJECT]', '[NOTIFICATION_CHANNEL]'); + * $response = $notificationChannelServiceClient->getNotificationChannel($formattedName); + * } finally { + * $notificationChannelServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The channel for which to execute the request. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID] + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Monitoring\V3\NotificationChannel + * + * @throws ApiException if the remote call fails + */ + public function getNotificationChannel($name, array $optionalArgs = []) + { + $request = new GetNotificationChannelRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetNotificationChannel', NotificationChannel::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets a single channel descriptor. The descriptor indicates which fields + * are expected / permitted for a notification channel of the given type. + * + * Sample code: + * ``` + * $notificationChannelServiceClient = new NotificationChannelServiceClient(); + * try { + * $formattedName = $notificationChannelServiceClient->notificationChannelDescriptorName('[PROJECT]', '[CHANNEL_DESCRIPTOR]'); + * $response = $notificationChannelServiceClient->getNotificationChannelDescriptor($formattedName); + * } finally { + * $notificationChannelServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The channel type for which to execute the request. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER]/notificationChannelDescriptors/[CHANNEL_TYPE] + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Monitoring\V3\NotificationChannelDescriptor + * + * @throws ApiException if the remote call fails + */ + public function getNotificationChannelDescriptor($name, array $optionalArgs = []) + { + $request = new GetNotificationChannelDescriptorRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetNotificationChannelDescriptor', NotificationChannelDescriptor::class, $optionalArgs, $request)->wait(); + } + + /** + * Requests a verification code for an already verified channel that can then + * be used in a call to VerifyNotificationChannel() on a different channel + * with an equivalent identity in the same or in a different project. This + * makes it possible to copy a channel between projects without requiring + * manual reverification of the channel. If the channel is not in the + * verified state, this method will fail (in other words, this may only be + * used if the SendNotificationChannelVerificationCode and + * VerifyNotificationChannel paths have already been used to put the given + * channel into the verified state). + * + * There is no guarantee that the verification codes returned by this method + * will be of a similar structure or form as the ones that are delivered + * to the channel via SendNotificationChannelVerificationCode; while + * VerifyNotificationChannel() will recognize both the codes delivered via + * SendNotificationChannelVerificationCode() and returned from + * GetNotificationChannelVerificationCode(), it is typically the case that + * the verification codes delivered via + * SendNotificationChannelVerificationCode() will be shorter and also + * have a shorter expiration (e.g. codes such as "G-123456") whereas + * GetVerificationCode() will typically return a much longer, websafe base + * 64 encoded string that has a longer expiration time. + * + * Sample code: + * ``` + * $notificationChannelServiceClient = new NotificationChannelServiceClient(); + * try { + * $formattedName = $notificationChannelServiceClient->notificationChannelName('[PROJECT]', '[NOTIFICATION_CHANNEL]'); + * $response = $notificationChannelServiceClient->getNotificationChannelVerificationCode($formattedName); + * } finally { + * $notificationChannelServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The notification channel for which a verification code is to be + * generated and retrieved. This must name a channel that is already verified; + * if the specified channel is not verified, the request will fail. + * @param array $optionalArgs { + * Optional. + * + * @type Timestamp $expireTime + * The desired expiration time. If specified, the API will guarantee that + * the returned code will not be valid after the specified timestamp; + * however, the API cannot guarantee that the returned code will be + * valid for at least as long as the requested time (the API puts an upper + * bound on the amount of time for which a code may be valid). If omitted, + * a default expiration will be used, which may be less than the max + * permissible expiration (so specifying an expiration may extend the + * code's lifetime over omitting an expiration, even though the API does + * impose an upper limit on the maximum expiration that is permitted). + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Monitoring\V3\GetNotificationChannelVerificationCodeResponse + * + * @throws ApiException if the remote call fails + */ + public function getNotificationChannelVerificationCode($name, array $optionalArgs = []) + { + $request = new GetNotificationChannelVerificationCodeRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['expireTime'])) { + $request->setExpireTime($optionalArgs['expireTime']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetNotificationChannelVerificationCode', GetNotificationChannelVerificationCodeResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Lists the descriptors for supported channel types. The use of descriptors + * makes it possible for new channel types to be dynamically added. + * + * Sample code: + * ``` + * $notificationChannelServiceClient = new NotificationChannelServiceClient(); + * try { + * $name = 'name'; + * // Iterate over pages of elements + * $pagedResponse = $notificationChannelServiceClient->listNotificationChannelDescriptors($name); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $notificationChannelServiceClient->listNotificationChannelDescriptors($name); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $notificationChannelServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The REST resource name of the parent from which to retrieve + * the notification channel descriptors. The expected syntax is: + * + * projects/[PROJECT_ID_OR_NUMBER] + * + * Note that this + * [names](https://cloud.google.com/monitoring/api/v3#project_name) the parent + * container in which to look for the descriptors; to retrieve a single + * descriptor by name, use the + * [GetNotificationChannelDescriptor][google.monitoring.v3.NotificationChannelService.GetNotificationChannelDescriptor] + * operation, instead. + * @param array $optionalArgs { + * Optional. + * + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listNotificationChannelDescriptors($name, array $optionalArgs = []) + { + $request = new ListNotificationChannelDescriptorsRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListNotificationChannelDescriptors', $optionalArgs, ListNotificationChannelDescriptorsResponse::class, $request); + } + + /** + * Lists the notification channels that have been created for the project. + * To list the types of notification channels that are supported, use + * the `ListNotificationChannelDescriptors` method. + * + * Sample code: + * ``` + * $notificationChannelServiceClient = new NotificationChannelServiceClient(); + * try { + * $name = 'name'; + * // Iterate over pages of elements + * $pagedResponse = $notificationChannelServiceClient->listNotificationChannels($name); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $notificationChannelServiceClient->listNotificationChannels($name); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $notificationChannelServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which + * to execute the request. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER] + * + * This names the container + * in which to look for the notification channels; it does not name a + * specific channel. To query a specific channel by REST resource name, use + * the + * [`GetNotificationChannel`][google.monitoring.v3.NotificationChannelService.GetNotificationChannel] + * operation. + * @param array $optionalArgs { + * Optional. + * + * @type string $filter + * Optional. If provided, this field specifies the criteria that must be met + * by notification channels to be included in the response. + * + * For more details, see [sorting and + * filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering). + * @type string $orderBy + * Optional. A comma-separated list of fields by which to sort the result. + * Supports the same set of fields as in `filter`. Entries can be prefixed + * with a minus sign to sort in descending rather than ascending order. + * + * For more details, see [sorting and + * filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering). + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listNotificationChannels($name, array $optionalArgs = []) + { + $request = new ListNotificationChannelsRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + if (isset($optionalArgs['orderBy'])) { + $request->setOrderBy($optionalArgs['orderBy']); + } + + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListNotificationChannels', $optionalArgs, ListNotificationChannelsResponse::class, $request); + } + + /** + * Causes a verification code to be delivered to the channel. The code + * can then be supplied in `VerifyNotificationChannel` to verify the channel. + * + * Sample code: + * ``` + * $notificationChannelServiceClient = new NotificationChannelServiceClient(); + * try { + * $formattedName = $notificationChannelServiceClient->notificationChannelName('[PROJECT]', '[NOTIFICATION_CHANNEL]'); + * $notificationChannelServiceClient->sendNotificationChannelVerificationCode($formattedName); + * } finally { + * $notificationChannelServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The notification channel to which to send a verification code. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException if the remote call fails + */ + public function sendNotificationChannelVerificationCode($name, array $optionalArgs = []) + { + $request = new SendNotificationChannelVerificationCodeRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('SendNotificationChannelVerificationCode', GPBEmpty::class, $optionalArgs, $request)->wait(); + } + + /** + * Updates a notification channel. Fields not specified in the field mask + * remain unchanged. + * + * Design your application to single-thread API calls that modify the state of + * notification channels in a single project. This includes calls to + * CreateNotificationChannel, DeleteNotificationChannel and + * UpdateNotificationChannel. + * + * Sample code: + * ``` + * $notificationChannelServiceClient = new NotificationChannelServiceClient(); + * try { + * $notificationChannel = new NotificationChannel(); + * $response = $notificationChannelServiceClient->updateNotificationChannel($notificationChannel); + * } finally { + * $notificationChannelServiceClient->close(); + * } + * ``` + * + * @param NotificationChannel $notificationChannel Required. A description of the changes to be applied to the specified + * notification channel. The description must provide a definition for + * fields to be updated; the names of these fields should also be + * included in the `update_mask`. + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $updateMask + * Optional. The fields to update. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Monitoring\V3\NotificationChannel + * + * @throws ApiException if the remote call fails + */ + public function updateNotificationChannel($notificationChannel, array $optionalArgs = []) + { + $request = new UpdateNotificationChannelRequest(); + $requestParamHeaders = []; + $request->setNotificationChannel($notificationChannel); + $requestParamHeaders['notification_channel.name'] = $notificationChannel->getName(); + if (isset($optionalArgs['updateMask'])) { + $request->setUpdateMask($optionalArgs['updateMask']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('UpdateNotificationChannel', NotificationChannel::class, $optionalArgs, $request)->wait(); + } + + /** + * Verifies a `NotificationChannel` by proving receipt of the code + * delivered to the channel as a result of calling + * `SendNotificationChannelVerificationCode`. + * + * Sample code: + * ``` + * $notificationChannelServiceClient = new NotificationChannelServiceClient(); + * try { + * $formattedName = $notificationChannelServiceClient->notificationChannelName('[PROJECT]', '[NOTIFICATION_CHANNEL]'); + * $code = 'code'; + * $response = $notificationChannelServiceClient->verifyNotificationChannel($formattedName, $code); + * } finally { + * $notificationChannelServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The notification channel to verify. + * @param string $code Required. The verification code that was delivered to the channel as + * a result of invoking the `SendNotificationChannelVerificationCode` API + * method or that was retrieved from a verified channel via + * `GetNotificationChannelVerificationCode`. For example, one might have + * "G-123456" or "TKNZGhhd2EyN3I1MnRnMjRv" (in general, one is only + * guaranteed that the code is valid UTF-8; one should not + * make any assumptions regarding the structure or format of the code). + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Monitoring\V3\NotificationChannel + * + * @throws ApiException if the remote call fails + */ + public function verifyNotificationChannel($name, $code, array $optionalArgs = []) + { + $request = new VerifyNotificationChannelRequest(); + $requestParamHeaders = []; + $request->setName($name); + $request->setCode($code); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('VerifyNotificationChannel', NotificationChannel::class, $optionalArgs, $request)->wait(); + } +} diff --git a/owl-bot-staging/Monitoring/v3/src/V3/Gapic/QueryServiceGapicClient.php b/owl-bot-staging/Monitoring/v3/src/V3/Gapic/QueryServiceGapicClient.php new file mode 100644 index 000000000000..b083925f4ba9 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/src/V3/Gapic/QueryServiceGapicClient.php @@ -0,0 +1,256 @@ +queryTimeSeries($name, $query); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $queryServiceClient->queryTimeSeries($name, $query); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $queryServiceClient->close(); + * } + * ``` + * + * @deprecated Please use the new service client {@see \Google\Cloud\Monitoring\V3\Client\QueryServiceClient}. + */ +class QueryServiceGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.monitoring.v3.QueryService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + const SERVICE_ADDRESS = 'monitoring.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'monitoring.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/monitoring', + 'https://www.googleapis.com/auth/monitoring.read', + ]; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/query_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/query_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/query_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/query_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'monitoring.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** + * Queries time series using Monitoring Query Language. + * + * Sample code: + * ``` + * $queryServiceClient = new QueryServiceClient(); + * try { + * $name = 'name'; + * $query = 'query'; + * // Iterate over pages of elements + * $pagedResponse = $queryServiceClient->queryTimeSeries($name, $query); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $queryServiceClient->queryTimeSeries($name, $query); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $queryServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which + * to execute the request. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER] + * @param string $query Required. The query in the [Monitoring Query + * Language](https://cloud.google.com/monitoring/mql/reference) format. + * The default time zone is in UTC. + * @param array $optionalArgs { + * Optional. + * + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function queryTimeSeries($name, $query, array $optionalArgs = []) + { + $request = new QueryTimeSeriesRequest(); + $requestParamHeaders = []; + $request->setName($name); + $request->setQuery($query); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('QueryTimeSeries', $optionalArgs, QueryTimeSeriesResponse::class, $request); + } +} diff --git a/owl-bot-staging/Monitoring/v3/src/V3/Gapic/ServiceMonitoringServiceGapicClient.php b/owl-bot-staging/Monitoring/v3/src/V3/Gapic/ServiceMonitoringServiceGapicClient.php new file mode 100644 index 000000000000..c7cc9a8589b9 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/src/V3/Gapic/ServiceMonitoringServiceGapicClient.php @@ -0,0 +1,1044 @@ +createService($parent, $service); + * } finally { + * $serviceMonitoringServiceClient->close(); + * } + * ``` + * + * Many parameters require resource names to be formatted in a particular way. To + * assist with these names, this class includes a format method for each type of + * name, and additionally a parseName method to extract the individual identifiers + * contained within formatted names that are returned by the API. + * + * @deprecated Please use the new service client {@see \Google\Cloud\Monitoring\V3\Client\ServiceMonitoringServiceClient}. + */ +class ServiceMonitoringServiceGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.monitoring.v3.ServiceMonitoringService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + const SERVICE_ADDRESS = 'monitoring.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'monitoring.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/monitoring', + 'https://www.googleapis.com/auth/monitoring.read', + ]; + + private static $folderServiceNameTemplate; + + private static $folderServiceServiceLevelObjectiveNameTemplate; + + private static $organizationServiceNameTemplate; + + private static $organizationServiceServiceLevelObjectiveNameTemplate; + + private static $projectServiceNameTemplate; + + private static $projectServiceServiceLevelObjectiveNameTemplate; + + private static $serviceNameTemplate; + + private static $serviceLevelObjectiveNameTemplate; + + private static $pathTemplateMap; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/service_monitoring_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/service_monitoring_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/service_monitoring_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/service_monitoring_service_rest_client_config.php', + ], + ], + ]; + } + + private static function getFolderServiceNameTemplate() + { + if (self::$folderServiceNameTemplate == null) { + self::$folderServiceNameTemplate = new PathTemplate('folders/{folder}/services/{service}'); + } + + return self::$folderServiceNameTemplate; + } + + private static function getFolderServiceServiceLevelObjectiveNameTemplate() + { + if (self::$folderServiceServiceLevelObjectiveNameTemplate == null) { + self::$folderServiceServiceLevelObjectiveNameTemplate = new PathTemplate('folders/{folder}/services/{service}/serviceLevelObjectives/{service_level_objective}'); + } + + return self::$folderServiceServiceLevelObjectiveNameTemplate; + } + + private static function getOrganizationServiceNameTemplate() + { + if (self::$organizationServiceNameTemplate == null) { + self::$organizationServiceNameTemplate = new PathTemplate('organizations/{organization}/services/{service}'); + } + + return self::$organizationServiceNameTemplate; + } + + private static function getOrganizationServiceServiceLevelObjectiveNameTemplate() + { + if (self::$organizationServiceServiceLevelObjectiveNameTemplate == null) { + self::$organizationServiceServiceLevelObjectiveNameTemplate = new PathTemplate('organizations/{organization}/services/{service}/serviceLevelObjectives/{service_level_objective}'); + } + + return self::$organizationServiceServiceLevelObjectiveNameTemplate; + } + + private static function getProjectServiceNameTemplate() + { + if (self::$projectServiceNameTemplate == null) { + self::$projectServiceNameTemplate = new PathTemplate('projects/{project}/services/{service}'); + } + + return self::$projectServiceNameTemplate; + } + + private static function getProjectServiceServiceLevelObjectiveNameTemplate() + { + if (self::$projectServiceServiceLevelObjectiveNameTemplate == null) { + self::$projectServiceServiceLevelObjectiveNameTemplate = new PathTemplate('projects/{project}/services/{service}/serviceLevelObjectives/{service_level_objective}'); + } + + return self::$projectServiceServiceLevelObjectiveNameTemplate; + } + + private static function getServiceNameTemplate() + { + if (self::$serviceNameTemplate == null) { + self::$serviceNameTemplate = new PathTemplate('projects/{project}/services/{service}'); + } + + return self::$serviceNameTemplate; + } + + private static function getServiceLevelObjectiveNameTemplate() + { + if (self::$serviceLevelObjectiveNameTemplate == null) { + self::$serviceLevelObjectiveNameTemplate = new PathTemplate('projects/{project}/services/{service}/serviceLevelObjectives/{service_level_objective}'); + } + + return self::$serviceLevelObjectiveNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'folderService' => self::getFolderServiceNameTemplate(), + 'folderServiceServiceLevelObjective' => self::getFolderServiceServiceLevelObjectiveNameTemplate(), + 'organizationService' => self::getOrganizationServiceNameTemplate(), + 'organizationServiceServiceLevelObjective' => self::getOrganizationServiceServiceLevelObjectiveNameTemplate(), + 'projectService' => self::getProjectServiceNameTemplate(), + 'projectServiceServiceLevelObjective' => self::getProjectServiceServiceLevelObjectiveNameTemplate(), + 'service' => self::getServiceNameTemplate(), + 'serviceLevelObjective' => self::getServiceLevelObjectiveNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent a + * folder_service resource. + * + * @param string $folder + * @param string $service + * + * @return string The formatted folder_service resource. + */ + public static function folderServiceName($folder, $service) + { + return self::getFolderServiceNameTemplate()->render([ + 'folder' => $folder, + 'service' => $service, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * folder_service_service_level_objective resource. + * + * @param string $folder + * @param string $service + * @param string $serviceLevelObjective + * + * @return string The formatted folder_service_service_level_objective resource. + */ + public static function folderServiceServiceLevelObjectiveName($folder, $service, $serviceLevelObjective) + { + return self::getFolderServiceServiceLevelObjectiveNameTemplate()->render([ + 'folder' => $folder, + 'service' => $service, + 'service_level_objective' => $serviceLevelObjective, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_service resource. + * + * @param string $organization + * @param string $service + * + * @return string The formatted organization_service resource. + */ + public static function organizationServiceName($organization, $service) + { + return self::getOrganizationServiceNameTemplate()->render([ + 'organization' => $organization, + 'service' => $service, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_service_service_level_objective resource. + * + * @param string $organization + * @param string $service + * @param string $serviceLevelObjective + * + * @return string The formatted organization_service_service_level_objective resource. + */ + public static function organizationServiceServiceLevelObjectiveName($organization, $service, $serviceLevelObjective) + { + return self::getOrganizationServiceServiceLevelObjectiveNameTemplate()->render([ + 'organization' => $organization, + 'service' => $service, + 'service_level_objective' => $serviceLevelObjective, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_service resource. + * + * @param string $project + * @param string $service + * + * @return string The formatted project_service resource. + */ + public static function projectServiceName($project, $service) + { + return self::getProjectServiceNameTemplate()->render([ + 'project' => $project, + 'service' => $service, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_service_service_level_objective resource. + * + * @param string $project + * @param string $service + * @param string $serviceLevelObjective + * + * @return string The formatted project_service_service_level_objective resource. + */ + public static function projectServiceServiceLevelObjectiveName($project, $service, $serviceLevelObjective) + { + return self::getProjectServiceServiceLevelObjectiveNameTemplate()->render([ + 'project' => $project, + 'service' => $service, + 'service_level_objective' => $serviceLevelObjective, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a service + * resource. + * + * @param string $project + * @param string $service + * + * @return string The formatted service resource. + */ + public static function serviceName($project, $service) + { + return self::getServiceNameTemplate()->render([ + 'project' => $project, + 'service' => $service, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * service_level_objective resource. + * + * @param string $project + * @param string $service + * @param string $serviceLevelObjective + * + * @return string The formatted service_level_objective resource. + */ + public static function serviceLevelObjectiveName($project, $service, $serviceLevelObjective) + { + return self::getServiceLevelObjectiveNameTemplate()->render([ + 'project' => $project, + 'service' => $service, + 'service_level_objective' => $serviceLevelObjective, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - folderService: folders/{folder}/services/{service} + * - folderServiceServiceLevelObjective: folders/{folder}/services/{service}/serviceLevelObjectives/{service_level_objective} + * - organizationService: organizations/{organization}/services/{service} + * - organizationServiceServiceLevelObjective: organizations/{organization}/services/{service}/serviceLevelObjectives/{service_level_objective} + * - projectService: projects/{project}/services/{service} + * - projectServiceServiceLevelObjective: projects/{project}/services/{service}/serviceLevelObjectives/{service_level_objective} + * - service: projects/{project}/services/{service} + * - serviceLevelObjective: projects/{project}/services/{service}/serviceLevelObjectives/{service_level_objective} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName($formattedName, $template = null) + { + $templateMap = self::getPathTemplateMap(); + if ($template) { + if (!isset($templateMap[$template])) { + throw new ValidationException("Template name $template does not exist"); + } + + return $templateMap[$template]->match($formattedName); + } + + foreach ($templateMap as $templateName => $pathTemplate) { + try { + return $pathTemplate->match($formattedName); + } catch (ValidationException $ex) { + // Swallow the exception to continue trying other path templates + } + } + + throw new ValidationException("Input did not match any known format. Input: $formattedName"); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'monitoring.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** + * Create a `Service`. + * + * Sample code: + * ``` + * $serviceMonitoringServiceClient = new ServiceMonitoringServiceClient(); + * try { + * $parent = 'parent'; + * $service = new Service(); + * $response = $serviceMonitoringServiceClient->createService($parent, $service); + * } finally { + * $serviceMonitoringServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. Resource + * [name](https://cloud.google.com/monitoring/api/v3#project_name) of the + * parent Metrics Scope. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER] + * @param Service $service Required. The `Service` to create. + * @param array $optionalArgs { + * Optional. + * + * @type string $serviceId + * Optional. The Service id to use for this Service. If omitted, an id will be + * generated instead. Must match the pattern `[a-z0-9\-]+` + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Monitoring\V3\Service + * + * @throws ApiException if the remote call fails + */ + public function createService($parent, $service, array $optionalArgs = []) + { + $request = new CreateServiceRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setService($service); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['serviceId'])) { + $request->setServiceId($optionalArgs['serviceId']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('CreateService', Service::class, $optionalArgs, $request)->wait(); + } + + /** + * Create a `ServiceLevelObjective` for the given `Service`. + * + * Sample code: + * ``` + * $serviceMonitoringServiceClient = new ServiceMonitoringServiceClient(); + * try { + * $formattedParent = $serviceMonitoringServiceClient->serviceName('[PROJECT]', '[SERVICE]'); + * $serviceLevelObjective = new ServiceLevelObjective(); + * $response = $serviceMonitoringServiceClient->createServiceLevelObjective($formattedParent, $serviceLevelObjective); + * } finally { + * $serviceMonitoringServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. Resource name of the parent `Service`. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] + * @param ServiceLevelObjective $serviceLevelObjective Required. The `ServiceLevelObjective` to create. + * The provided `name` will be respected if no `ServiceLevelObjective` exists + * with this name. + * @param array $optionalArgs { + * Optional. + * + * @type string $serviceLevelObjectiveId + * Optional. The ServiceLevelObjective id to use for this + * ServiceLevelObjective. If omitted, an id will be generated instead. Must + * match the pattern `^[a-zA-Z0-9-_:.]+$` + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Monitoring\V3\ServiceLevelObjective + * + * @throws ApiException if the remote call fails + */ + public function createServiceLevelObjective($parent, $serviceLevelObjective, array $optionalArgs = []) + { + $request = new CreateServiceLevelObjectiveRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setServiceLevelObjective($serviceLevelObjective); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['serviceLevelObjectiveId'])) { + $request->setServiceLevelObjectiveId($optionalArgs['serviceLevelObjectiveId']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('CreateServiceLevelObjective', ServiceLevelObjective::class, $optionalArgs, $request)->wait(); + } + + /** + * Soft delete this `Service`. + * + * Sample code: + * ``` + * $serviceMonitoringServiceClient = new ServiceMonitoringServiceClient(); + * try { + * $formattedName = $serviceMonitoringServiceClient->serviceName('[PROJECT]', '[SERVICE]'); + * $serviceMonitoringServiceClient->deleteService($formattedName); + * } finally { + * $serviceMonitoringServiceClient->close(); + * } + * ``` + * + * @param string $name Required. Resource name of the `Service` to delete. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException if the remote call fails + */ + public function deleteService($name, array $optionalArgs = []) + { + $request = new DeleteServiceRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('DeleteService', GPBEmpty::class, $optionalArgs, $request)->wait(); + } + + /** + * Delete the given `ServiceLevelObjective`. + * + * Sample code: + * ``` + * $serviceMonitoringServiceClient = new ServiceMonitoringServiceClient(); + * try { + * $formattedName = $serviceMonitoringServiceClient->serviceLevelObjectiveName('[PROJECT]', '[SERVICE]', '[SERVICE_LEVEL_OBJECTIVE]'); + * $serviceMonitoringServiceClient->deleteServiceLevelObjective($formattedName); + * } finally { + * $serviceMonitoringServiceClient->close(); + * } + * ``` + * + * @param string $name Required. Resource name of the `ServiceLevelObjective` to delete. The + * format is: + * + * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME] + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException if the remote call fails + */ + public function deleteServiceLevelObjective($name, array $optionalArgs = []) + { + $request = new DeleteServiceLevelObjectiveRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('DeleteServiceLevelObjective', GPBEmpty::class, $optionalArgs, $request)->wait(); + } + + /** + * Get the named `Service`. + * + * Sample code: + * ``` + * $serviceMonitoringServiceClient = new ServiceMonitoringServiceClient(); + * try { + * $formattedName = $serviceMonitoringServiceClient->serviceName('[PROJECT]', '[SERVICE]'); + * $response = $serviceMonitoringServiceClient->getService($formattedName); + * } finally { + * $serviceMonitoringServiceClient->close(); + * } + * ``` + * + * @param string $name Required. Resource name of the `Service`. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Monitoring\V3\Service + * + * @throws ApiException if the remote call fails + */ + public function getService($name, array $optionalArgs = []) + { + $request = new GetServiceRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetService', Service::class, $optionalArgs, $request)->wait(); + } + + /** + * Get a `ServiceLevelObjective` by name. + * + * Sample code: + * ``` + * $serviceMonitoringServiceClient = new ServiceMonitoringServiceClient(); + * try { + * $formattedName = $serviceMonitoringServiceClient->serviceLevelObjectiveName('[PROJECT]', '[SERVICE]', '[SERVICE_LEVEL_OBJECTIVE]'); + * $response = $serviceMonitoringServiceClient->getServiceLevelObjective($formattedName); + * } finally { + * $serviceMonitoringServiceClient->close(); + * } + * ``` + * + * @param string $name Required. Resource name of the `ServiceLevelObjective` to get. The format + * is: + * + * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME] + * @param array $optionalArgs { + * Optional. + * + * @type int $view + * View of the `ServiceLevelObjective` to return. If `DEFAULT`, return the + * `ServiceLevelObjective` as originally defined. If `EXPLICIT` and the + * `ServiceLevelObjective` is defined in terms of a `BasicSli`, replace the + * `BasicSli` with a `RequestBasedSli` spelling out how the SLI is computed. + * For allowed values, use constants defined on {@see \Google\Cloud\Monitoring\V3\ServiceLevelObjective\View} + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Monitoring\V3\ServiceLevelObjective + * + * @throws ApiException if the remote call fails + */ + public function getServiceLevelObjective($name, array $optionalArgs = []) + { + $request = new GetServiceLevelObjectiveRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['view'])) { + $request->setView($optionalArgs['view']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetServiceLevelObjective', ServiceLevelObjective::class, $optionalArgs, $request)->wait(); + } + + /** + * List the `ServiceLevelObjective`s for the given `Service`. + * + * Sample code: + * ``` + * $serviceMonitoringServiceClient = new ServiceMonitoringServiceClient(); + * try { + * $formattedParent = $serviceMonitoringServiceClient->serviceName('[PROJECT]', '[SERVICE]'); + * // Iterate over pages of elements + * $pagedResponse = $serviceMonitoringServiceClient->listServiceLevelObjectives($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $serviceMonitoringServiceClient->listServiceLevelObjectives($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $serviceMonitoringServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. Resource name of the parent containing the listed SLOs, either a + * project or a Monitoring Metrics Scope. The formats are: + * + * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] + * workspaces/[HOST_PROJECT_ID_OR_NUMBER]/services/- + * @param array $optionalArgs { + * Optional. + * + * @type string $filter + * A filter specifying what `ServiceLevelObjective`s to return. + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type int $view + * View of the `ServiceLevelObjective`s to return. If `DEFAULT`, return each + * `ServiceLevelObjective` as originally defined. If `EXPLICIT` and the + * `ServiceLevelObjective` is defined in terms of a `BasicSli`, replace the + * `BasicSli` with a `RequestBasedSli` spelling out how the SLI is computed. + * For allowed values, use constants defined on {@see \Google\Cloud\Monitoring\V3\ServiceLevelObjective\View} + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listServiceLevelObjectives($parent, array $optionalArgs = []) + { + $request = new ListServiceLevelObjectivesRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + if (isset($optionalArgs['view'])) { + $request->setView($optionalArgs['view']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListServiceLevelObjectives', $optionalArgs, ListServiceLevelObjectivesResponse::class, $request); + } + + /** + * List `Service`s for this Metrics Scope. + * + * Sample code: + * ``` + * $serviceMonitoringServiceClient = new ServiceMonitoringServiceClient(); + * try { + * $parent = 'parent'; + * // Iterate over pages of elements + * $pagedResponse = $serviceMonitoringServiceClient->listServices($parent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $serviceMonitoringServiceClient->listServices($parent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $serviceMonitoringServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. Resource name of the parent containing the listed services, + * either a [project](https://cloud.google.com/monitoring/api/v3#project_name) + * or a Monitoring Metrics Scope. The formats are: + * + * projects/[PROJECT_ID_OR_NUMBER] + * workspaces/[HOST_PROJECT_ID_OR_NUMBER] + * @param array $optionalArgs { + * Optional. + * + * @type string $filter + * A filter specifying what `Service`s to return. The filter supports + * filtering on a particular service-identifier type or one of its attributes. + * + * To filter on a particular service-identifier type, the `identifier_case` + * refers to which option in the `identifier` field is populated. For example, + * the filter `identifier_case = "CUSTOM"` would match all services with a + * value for the `custom` field. Valid options include "CUSTOM", "APP_ENGINE", + * "MESH_ISTIO", and the other options listed at + * https://cloud.google.com/monitoring/api/ref_v3/rest/v3/services#Service + * + * To filter on an attribute of a service-identifier type, apply the filter + * name by using the snake case of the service-identifier type and the + * attribute of that service-identifier type, and join the two with a period. + * For example, to filter by the `meshUid` field of the `MeshIstio` + * service-identifier type, you must filter on `mesh_istio.mesh_uid = + * "123"` to match all services with mesh UID "123". Service-identifier types + * and their attributes are described at + * https://cloud.google.com/monitoring/api/ref_v3/rest/v3/services#Service + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listServices($parent, array $optionalArgs = []) + { + $request = new ListServicesRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListServices', $optionalArgs, ListServicesResponse::class, $request); + } + + /** + * Update this `Service`. + * + * Sample code: + * ``` + * $serviceMonitoringServiceClient = new ServiceMonitoringServiceClient(); + * try { + * $service = new Service(); + * $response = $serviceMonitoringServiceClient->updateService($service); + * } finally { + * $serviceMonitoringServiceClient->close(); + * } + * ``` + * + * @param Service $service Required. The `Service` to draw updates from. + * The given `name` specifies the resource to update. + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $updateMask + * A set of field paths defining which fields to use for the update. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Monitoring\V3\Service + * + * @throws ApiException if the remote call fails + */ + public function updateService($service, array $optionalArgs = []) + { + $request = new UpdateServiceRequest(); + $requestParamHeaders = []; + $request->setService($service); + $requestParamHeaders['service.name'] = $service->getName(); + if (isset($optionalArgs['updateMask'])) { + $request->setUpdateMask($optionalArgs['updateMask']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('UpdateService', Service::class, $optionalArgs, $request)->wait(); + } + + /** + * Update the given `ServiceLevelObjective`. + * + * Sample code: + * ``` + * $serviceMonitoringServiceClient = new ServiceMonitoringServiceClient(); + * try { + * $serviceLevelObjective = new ServiceLevelObjective(); + * $response = $serviceMonitoringServiceClient->updateServiceLevelObjective($serviceLevelObjective); + * } finally { + * $serviceMonitoringServiceClient->close(); + * } + * ``` + * + * @param ServiceLevelObjective $serviceLevelObjective Required. The `ServiceLevelObjective` to draw updates from. + * The given `name` specifies the resource to update. + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $updateMask + * A set of field paths defining which fields to use for the update. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Monitoring\V3\ServiceLevelObjective + * + * @throws ApiException if the remote call fails + */ + public function updateServiceLevelObjective($serviceLevelObjective, array $optionalArgs = []) + { + $request = new UpdateServiceLevelObjectiveRequest(); + $requestParamHeaders = []; + $request->setServiceLevelObjective($serviceLevelObjective); + $requestParamHeaders['service_level_objective.name'] = $serviceLevelObjective->getName(); + if (isset($optionalArgs['updateMask'])) { + $request->setUpdateMask($optionalArgs['updateMask']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('UpdateServiceLevelObjective', ServiceLevelObjective::class, $optionalArgs, $request)->wait(); + } +} diff --git a/owl-bot-staging/Monitoring/v3/src/V3/Gapic/SnoozeServiceGapicClient.php b/owl-bot-staging/Monitoring/v3/src/V3/Gapic/SnoozeServiceGapicClient.php new file mode 100644 index 000000000000..08c130e17a09 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/src/V3/Gapic/SnoozeServiceGapicClient.php @@ -0,0 +1,680 @@ +workspaceName('[PROJECT]'); + * $snooze = new Snooze(); + * $response = $snoozeServiceClient->createSnooze($formattedParent, $snooze); + * } finally { + * $snoozeServiceClient->close(); + * } + * ``` + * + * Many parameters require resource names to be formatted in a particular way. To + * assist with these names, this class includes a format method for each type of + * name, and additionally a parseName method to extract the individual identifiers + * contained within formatted names that are returned by the API. + * + * @deprecated Please use the new service client {@see \Google\Cloud\Monitoring\V3\Client\SnoozeServiceClient}. + */ +class SnoozeServiceGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.monitoring.v3.SnoozeService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + const SERVICE_ADDRESS = 'monitoring.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'monitoring.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/monitoring', + 'https://www.googleapis.com/auth/monitoring.read', + ]; + + private static $alertPolicyNameTemplate; + + private static $folderAlertPolicyNameTemplate; + + private static $organizationAlertPolicyNameTemplate; + + private static $projectNameTemplate; + + private static $projectAlertPolicyNameTemplate; + + private static $snoozeNameTemplate; + + private static $workspaceNameTemplate; + + private static $pathTemplateMap; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/snooze_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/snooze_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/snooze_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/snooze_service_rest_client_config.php', + ], + ], + ]; + } + + private static function getAlertPolicyNameTemplate() + { + if (self::$alertPolicyNameTemplate == null) { + self::$alertPolicyNameTemplate = new PathTemplate('projects/{project}/alertPolicies/{alert_policy}'); + } + + return self::$alertPolicyNameTemplate; + } + + private static function getFolderAlertPolicyNameTemplate() + { + if (self::$folderAlertPolicyNameTemplate == null) { + self::$folderAlertPolicyNameTemplate = new PathTemplate('folders/{folder}/alertPolicies/{alert_policy}'); + } + + return self::$folderAlertPolicyNameTemplate; + } + + private static function getOrganizationAlertPolicyNameTemplate() + { + if (self::$organizationAlertPolicyNameTemplate == null) { + self::$organizationAlertPolicyNameTemplate = new PathTemplate('organizations/{organization}/alertPolicies/{alert_policy}'); + } + + return self::$organizationAlertPolicyNameTemplate; + } + + private static function getProjectNameTemplate() + { + if (self::$projectNameTemplate == null) { + self::$projectNameTemplate = new PathTemplate('projects/{project}'); + } + + return self::$projectNameTemplate; + } + + private static function getProjectAlertPolicyNameTemplate() + { + if (self::$projectAlertPolicyNameTemplate == null) { + self::$projectAlertPolicyNameTemplate = new PathTemplate('projects/{project}/alertPolicies/{alert_policy}'); + } + + return self::$projectAlertPolicyNameTemplate; + } + + private static function getSnoozeNameTemplate() + { + if (self::$snoozeNameTemplate == null) { + self::$snoozeNameTemplate = new PathTemplate('projects/{project}/snoozes/{snooze}'); + } + + return self::$snoozeNameTemplate; + } + + private static function getWorkspaceNameTemplate() + { + if (self::$workspaceNameTemplate == null) { + self::$workspaceNameTemplate = new PathTemplate('projects/{project}'); + } + + return self::$workspaceNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'alertPolicy' => self::getAlertPolicyNameTemplate(), + 'folderAlertPolicy' => self::getFolderAlertPolicyNameTemplate(), + 'organizationAlertPolicy' => self::getOrganizationAlertPolicyNameTemplate(), + 'project' => self::getProjectNameTemplate(), + 'projectAlertPolicy' => self::getProjectAlertPolicyNameTemplate(), + 'snooze' => self::getSnoozeNameTemplate(), + 'workspace' => self::getWorkspaceNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent a alert_policy + * resource. + * + * @param string $project + * @param string $alertPolicy + * + * @return string The formatted alert_policy resource. + */ + public static function alertPolicyName($project, $alertPolicy) + { + return self::getAlertPolicyNameTemplate()->render([ + 'project' => $project, + 'alert_policy' => $alertPolicy, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * folder_alert_policy resource. + * + * @param string $folder + * @param string $alertPolicy + * + * @return string The formatted folder_alert_policy resource. + */ + public static function folderAlertPolicyName($folder, $alertPolicy) + { + return self::getFolderAlertPolicyNameTemplate()->render([ + 'folder' => $folder, + 'alert_policy' => $alertPolicy, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_alert_policy resource. + * + * @param string $organization + * @param string $alertPolicy + * + * @return string The formatted organization_alert_policy resource. + */ + public static function organizationAlertPolicyName($organization, $alertPolicy) + { + return self::getOrganizationAlertPolicyNameTemplate()->render([ + 'organization' => $organization, + 'alert_policy' => $alertPolicy, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a project + * resource. + * + * @param string $project + * + * @return string The formatted project resource. + */ + public static function projectName($project) + { + return self::getProjectNameTemplate()->render([ + 'project' => $project, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_alert_policy resource. + * + * @param string $project + * @param string $alertPolicy + * + * @return string The formatted project_alert_policy resource. + */ + public static function projectAlertPolicyName($project, $alertPolicy) + { + return self::getProjectAlertPolicyNameTemplate()->render([ + 'project' => $project, + 'alert_policy' => $alertPolicy, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a snooze + * resource. + * + * @param string $project + * @param string $snooze + * + * @return string The formatted snooze resource. + */ + public static function snoozeName($project, $snooze) + { + return self::getSnoozeNameTemplate()->render([ + 'project' => $project, + 'snooze' => $snooze, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a workspace + * resource. + * + * @param string $project + * + * @return string The formatted workspace resource. + */ + public static function workspaceName($project) + { + return self::getWorkspaceNameTemplate()->render([ + 'project' => $project, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - alertPolicy: projects/{project}/alertPolicies/{alert_policy} + * - folderAlertPolicy: folders/{folder}/alertPolicies/{alert_policy} + * - organizationAlertPolicy: organizations/{organization}/alertPolicies/{alert_policy} + * - project: projects/{project} + * - projectAlertPolicy: projects/{project}/alertPolicies/{alert_policy} + * - snooze: projects/{project}/snoozes/{snooze} + * - workspace: projects/{project} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName($formattedName, $template = null) + { + $templateMap = self::getPathTemplateMap(); + if ($template) { + if (!isset($templateMap[$template])) { + throw new ValidationException("Template name $template does not exist"); + } + + return $templateMap[$template]->match($formattedName); + } + + foreach ($templateMap as $templateName => $pathTemplate) { + try { + return $pathTemplate->match($formattedName); + } catch (ValidationException $ex) { + // Swallow the exception to continue trying other path templates + } + } + + throw new ValidationException("Input did not match any known format. Input: $formattedName"); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'monitoring.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** + * Creates a `Snooze` that will prevent alerts, which match the provided + * criteria, from being opened. The `Snooze` applies for a specific time + * interval. + * + * Sample code: + * ``` + * $snoozeServiceClient = new SnoozeServiceClient(); + * try { + * $formattedParent = $snoozeServiceClient->workspaceName('[PROJECT]'); + * $snooze = new Snooze(); + * $response = $snoozeServiceClient->createSnooze($formattedParent, $snooze); + * } finally { + * $snoozeServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) in which + * a `Snooze` should be created. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER] + * @param Snooze $snooze Required. The `Snooze` to create. Omit the `name` field, as it will be + * filled in by the API. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Monitoring\V3\Snooze + * + * @throws ApiException if the remote call fails + */ + public function createSnooze($parent, $snooze, array $optionalArgs = []) + { + $request = new CreateSnoozeRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setSnooze($snooze); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('CreateSnooze', Snooze::class, $optionalArgs, $request)->wait(); + } + + /** + * Retrieves a `Snooze` by `name`. + * + * Sample code: + * ``` + * $snoozeServiceClient = new SnoozeServiceClient(); + * try { + * $formattedName = $snoozeServiceClient->snoozeName('[PROJECT]', '[SNOOZE]'); + * $response = $snoozeServiceClient->getSnooze($formattedName); + * } finally { + * $snoozeServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The ID of the `Snooze` to retrieve. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER]/snoozes/[SNOOZE_ID] + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Monitoring\V3\Snooze + * + * @throws ApiException if the remote call fails + */ + public function getSnooze($name, array $optionalArgs = []) + { + $request = new GetSnoozeRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetSnooze', Snooze::class, $optionalArgs, $request)->wait(); + } + + /** + * Lists the `Snooze`s associated with a project. Can optionally pass in + * `filter`, which specifies predicates to match `Snooze`s. + * + * Sample code: + * ``` + * $snoozeServiceClient = new SnoozeServiceClient(); + * try { + * $formattedParent = $snoozeServiceClient->workspaceName('[PROJECT]'); + * // Iterate over pages of elements + * $pagedResponse = $snoozeServiceClient->listSnoozes($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $snoozeServiceClient->listSnoozes($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $snoozeServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) whose + * `Snooze`s should be listed. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER] + * @param array $optionalArgs { + * Optional. + * + * @type string $filter + * Optional. Optional filter to restrict results to the given criteria. The + * following fields are supported. + * + * * `interval.start_time` + * * `interval.end_time` + * + * For example: + * + * ``` + * interval.start_time > "2022-03-11T00:00:00-08:00" AND + * interval.end_time < "2022-03-12T00:00:00-08:00" + * ``` + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listSnoozes($parent, array $optionalArgs = []) + { + $request = new ListSnoozesRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListSnoozes', $optionalArgs, ListSnoozesResponse::class, $request); + } + + /** + * Updates a `Snooze`, identified by its `name`, with the parameters in the + * given `Snooze` object. + * + * Sample code: + * ``` + * $snoozeServiceClient = new SnoozeServiceClient(); + * try { + * $snooze = new Snooze(); + * $updateMask = new FieldMask(); + * $response = $snoozeServiceClient->updateSnooze($snooze, $updateMask); + * } finally { + * $snoozeServiceClient->close(); + * } + * ``` + * + * @param Snooze $snooze Required. The `Snooze` to update. Must have the name field present. + * @param FieldMask $updateMask Required. The fields to update. + * + * For each field listed in `update_mask`: + * + * * If the `Snooze` object supplied in the `UpdateSnoozeRequest` has a + * value for that field, the value of the field in the existing `Snooze` + * will be set to the value of the field in the supplied `Snooze`. + * * If the field does not have a value in the supplied `Snooze`, the field + * in the existing `Snooze` is set to its default value. + * + * Fields not listed retain their existing value. + * + * The following are the field names that are accepted in `update_mask`: + * + * * `display_name` + * * `interval.start_time` + * * `interval.end_time` + * + * That said, the start time and end time of the `Snooze` determines which + * fields can legally be updated. Before attempting an update, users should + * consult the documentation for `UpdateSnoozeRequest`, which talks about + * which fields can be updated. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Monitoring\V3\Snooze + * + * @throws ApiException if the remote call fails + */ + public function updateSnooze($snooze, $updateMask, array $optionalArgs = []) + { + $request = new UpdateSnoozeRequest(); + $requestParamHeaders = []; + $request->setSnooze($snooze); + $request->setUpdateMask($updateMask); + $requestParamHeaders['snooze.name'] = $snooze->getName(); + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('UpdateSnooze', Snooze::class, $optionalArgs, $request)->wait(); + } +} diff --git a/owl-bot-staging/Monitoring/v3/src/V3/Gapic/UptimeCheckServiceGapicClient.php b/owl-bot-staging/Monitoring/v3/src/V3/Gapic/UptimeCheckServiceGapicClient.php new file mode 100644 index 000000000000..5c178d847077 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/src/V3/Gapic/UptimeCheckServiceGapicClient.php @@ -0,0 +1,724 @@ +createUptimeCheckConfig($parent, $uptimeCheckConfig); + * } finally { + * $uptimeCheckServiceClient->close(); + * } + * ``` + * + * Many parameters require resource names to be formatted in a particular way. To + * assist with these names, this class includes a format method for each type of + * name, and additionally a parseName method to extract the individual identifiers + * contained within formatted names that are returned by the API. + * + * @deprecated Please use the new service client {@see \Google\Cloud\Monitoring\V3\Client\UptimeCheckServiceClient}. + */ +class UptimeCheckServiceGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.monitoring.v3.UptimeCheckService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + const SERVICE_ADDRESS = 'monitoring.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'monitoring.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/monitoring', + 'https://www.googleapis.com/auth/monitoring.read', + ]; + + private static $folderUptimeCheckConfigNameTemplate; + + private static $functionNameTemplate; + + private static $organizationUptimeCheckConfigNameTemplate; + + private static $projectUptimeCheckConfigNameTemplate; + + private static $uptimeCheckConfigNameTemplate; + + private static $pathTemplateMap; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/uptime_check_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/uptime_check_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/uptime_check_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/uptime_check_service_rest_client_config.php', + ], + ], + ]; + } + + private static function getFolderUptimeCheckConfigNameTemplate() + { + if (self::$folderUptimeCheckConfigNameTemplate == null) { + self::$folderUptimeCheckConfigNameTemplate = new PathTemplate('folders/{folder}/uptimeCheckConfigs/{uptime_check_config}'); + } + + return self::$folderUptimeCheckConfigNameTemplate; + } + + private static function getFunctionNameTemplate() + { + if (self::$functionNameTemplate == null) { + self::$functionNameTemplate = new PathTemplate('projects/{project}/locations/{location}/functions/{function}'); + } + + return self::$functionNameTemplate; + } + + private static function getOrganizationUptimeCheckConfigNameTemplate() + { + if (self::$organizationUptimeCheckConfigNameTemplate == null) { + self::$organizationUptimeCheckConfigNameTemplate = new PathTemplate('organizations/{organization}/uptimeCheckConfigs/{uptime_check_config}'); + } + + return self::$organizationUptimeCheckConfigNameTemplate; + } + + private static function getProjectUptimeCheckConfigNameTemplate() + { + if (self::$projectUptimeCheckConfigNameTemplate == null) { + self::$projectUptimeCheckConfigNameTemplate = new PathTemplate('projects/{project}/uptimeCheckConfigs/{uptime_check_config}'); + } + + return self::$projectUptimeCheckConfigNameTemplate; + } + + private static function getUptimeCheckConfigNameTemplate() + { + if (self::$uptimeCheckConfigNameTemplate == null) { + self::$uptimeCheckConfigNameTemplate = new PathTemplate('projects/{project}/uptimeCheckConfigs/{uptime_check_config}'); + } + + return self::$uptimeCheckConfigNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'folderUptimeCheckConfig' => self::getFolderUptimeCheckConfigNameTemplate(), + 'function' => self::getFunctionNameTemplate(), + 'organizationUptimeCheckConfig' => self::getOrganizationUptimeCheckConfigNameTemplate(), + 'projectUptimeCheckConfig' => self::getProjectUptimeCheckConfigNameTemplate(), + 'uptimeCheckConfig' => self::getUptimeCheckConfigNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent a + * folder_uptime_check_config resource. + * + * @param string $folder + * @param string $uptimeCheckConfig + * + * @return string The formatted folder_uptime_check_config resource. + */ + public static function folderUptimeCheckConfigName($folder, $uptimeCheckConfig) + { + return self::getFolderUptimeCheckConfigNameTemplate()->render([ + 'folder' => $folder, + 'uptime_check_config' => $uptimeCheckConfig, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a function + * resource. + * + * @param string $project + * @param string $location + * @param string $function + * + * @return string The formatted function resource. + */ + public static function functionName($project, $location, $function) + { + return self::getFunctionNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'function' => $function, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_uptime_check_config resource. + * + * @param string $organization + * @param string $uptimeCheckConfig + * + * @return string The formatted organization_uptime_check_config resource. + */ + public static function organizationUptimeCheckConfigName($organization, $uptimeCheckConfig) + { + return self::getOrganizationUptimeCheckConfigNameTemplate()->render([ + 'organization' => $organization, + 'uptime_check_config' => $uptimeCheckConfig, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_uptime_check_config resource. + * + * @param string $project + * @param string $uptimeCheckConfig + * + * @return string The formatted project_uptime_check_config resource. + */ + public static function projectUptimeCheckConfigName($project, $uptimeCheckConfig) + { + return self::getProjectUptimeCheckConfigNameTemplate()->render([ + 'project' => $project, + 'uptime_check_config' => $uptimeCheckConfig, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * uptime_check_config resource. + * + * @param string $project + * @param string $uptimeCheckConfig + * + * @return string The formatted uptime_check_config resource. + */ + public static function uptimeCheckConfigName($project, $uptimeCheckConfig) + { + return self::getUptimeCheckConfigNameTemplate()->render([ + 'project' => $project, + 'uptime_check_config' => $uptimeCheckConfig, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - folderUptimeCheckConfig: folders/{folder}/uptimeCheckConfigs/{uptime_check_config} + * - function: projects/{project}/locations/{location}/functions/{function} + * - organizationUptimeCheckConfig: organizations/{organization}/uptimeCheckConfigs/{uptime_check_config} + * - projectUptimeCheckConfig: projects/{project}/uptimeCheckConfigs/{uptime_check_config} + * - uptimeCheckConfig: projects/{project}/uptimeCheckConfigs/{uptime_check_config} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName($formattedName, $template = null) + { + $templateMap = self::getPathTemplateMap(); + if ($template) { + if (!isset($templateMap[$template])) { + throw new ValidationException("Template name $template does not exist"); + } + + return $templateMap[$template]->match($formattedName); + } + + foreach ($templateMap as $templateName => $pathTemplate) { + try { + return $pathTemplate->match($formattedName); + } catch (ValidationException $ex) { + // Swallow the exception to continue trying other path templates + } + } + + throw new ValidationException("Input did not match any known format. Input: $formattedName"); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'monitoring.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** + * Creates a new Uptime check configuration. + * + * Sample code: + * ``` + * $uptimeCheckServiceClient = new UptimeCheckServiceClient(); + * try { + * $parent = 'parent'; + * $uptimeCheckConfig = new UptimeCheckConfig(); + * $response = $uptimeCheckServiceClient->createUptimeCheckConfig($parent, $uptimeCheckConfig); + * } finally { + * $uptimeCheckServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) in which + * to create the Uptime check. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER] + * @param UptimeCheckConfig $uptimeCheckConfig Required. The new Uptime check configuration. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Monitoring\V3\UptimeCheckConfig + * + * @throws ApiException if the remote call fails + */ + public function createUptimeCheckConfig($parent, $uptimeCheckConfig, array $optionalArgs = []) + { + $request = new CreateUptimeCheckConfigRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setUptimeCheckConfig($uptimeCheckConfig); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('CreateUptimeCheckConfig', UptimeCheckConfig::class, $optionalArgs, $request)->wait(); + } + + /** + * Deletes an Uptime check configuration. Note that this method will fail + * if the Uptime check configuration is referenced by an alert policy or + * other dependent configs that would be rendered invalid by the deletion. + * + * Sample code: + * ``` + * $uptimeCheckServiceClient = new UptimeCheckServiceClient(); + * try { + * $formattedName = $uptimeCheckServiceClient->uptimeCheckConfigName('[PROJECT]', '[UPTIME_CHECK_CONFIG]'); + * $uptimeCheckServiceClient->deleteUptimeCheckConfig($formattedName); + * } finally { + * $uptimeCheckServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The Uptime check configuration to delete. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER]/uptimeCheckConfigs/[UPTIME_CHECK_ID] + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException if the remote call fails + */ + public function deleteUptimeCheckConfig($name, array $optionalArgs = []) + { + $request = new DeleteUptimeCheckConfigRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('DeleteUptimeCheckConfig', GPBEmpty::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets a single Uptime check configuration. + * + * Sample code: + * ``` + * $uptimeCheckServiceClient = new UptimeCheckServiceClient(); + * try { + * $formattedName = $uptimeCheckServiceClient->uptimeCheckConfigName('[PROJECT]', '[UPTIME_CHECK_CONFIG]'); + * $response = $uptimeCheckServiceClient->getUptimeCheckConfig($formattedName); + * } finally { + * $uptimeCheckServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The Uptime check configuration to retrieve. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER]/uptimeCheckConfigs/[UPTIME_CHECK_ID] + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Monitoring\V3\UptimeCheckConfig + * + * @throws ApiException if the remote call fails + */ + public function getUptimeCheckConfig($name, array $optionalArgs = []) + { + $request = new GetUptimeCheckConfigRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetUptimeCheckConfig', UptimeCheckConfig::class, $optionalArgs, $request)->wait(); + } + + /** + * Lists the existing valid Uptime check configurations for the project + * (leaving out any invalid configurations). + * + * Sample code: + * ``` + * $uptimeCheckServiceClient = new UptimeCheckServiceClient(); + * try { + * $parent = 'parent'; + * // Iterate over pages of elements + * $pagedResponse = $uptimeCheckServiceClient->listUptimeCheckConfigs($parent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $uptimeCheckServiceClient->listUptimeCheckConfigs($parent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $uptimeCheckServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) whose + * Uptime check configurations are listed. The format is: + * + * projects/[PROJECT_ID_OR_NUMBER] + * @param array $optionalArgs { + * Optional. + * + * @type string $filter + * If provided, this field specifies the criteria that must be met by + * uptime checks to be included in the response. + * + * For more details, see [Filtering + * syntax](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering#filter_syntax). + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listUptimeCheckConfigs($parent, array $optionalArgs = []) + { + $request = new ListUptimeCheckConfigsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListUptimeCheckConfigs', $optionalArgs, ListUptimeCheckConfigsResponse::class, $request); + } + + /** + * Returns the list of IP addresses that checkers run from + * + * Sample code: + * ``` + * $uptimeCheckServiceClient = new UptimeCheckServiceClient(); + * try { + * // Iterate over pages of elements + * $pagedResponse = $uptimeCheckServiceClient->listUptimeCheckIps(); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $uptimeCheckServiceClient->listUptimeCheckIps(); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $uptimeCheckServiceClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listUptimeCheckIps(array $optionalArgs = []) + { + $request = new ListUptimeCheckIpsRequest(); + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + return $this->getPagedListResponse('ListUptimeCheckIps', $optionalArgs, ListUptimeCheckIpsResponse::class, $request); + } + + /** + * Updates an Uptime check configuration. You can either replace the entire + * configuration with a new one or replace only certain fields in the current + * configuration by specifying the fields to be updated via `updateMask`. + * Returns the updated configuration. + * + * Sample code: + * ``` + * $uptimeCheckServiceClient = new UptimeCheckServiceClient(); + * try { + * $uptimeCheckConfig = new UptimeCheckConfig(); + * $response = $uptimeCheckServiceClient->updateUptimeCheckConfig($uptimeCheckConfig); + * } finally { + * $uptimeCheckServiceClient->close(); + * } + * ``` + * + * @param UptimeCheckConfig $uptimeCheckConfig Required. If an `updateMask` has been specified, this field gives + * the values for the set of fields mentioned in the `updateMask`. If an + * `updateMask` has not been given, this Uptime check configuration replaces + * the current configuration. If a field is mentioned in `updateMask` but + * the corresponding field is omitted in this partial Uptime check + * configuration, it has the effect of deleting/clearing the field from the + * configuration on the server. + * + * The following fields can be updated: `display_name`, + * `http_check`, `tcp_check`, `timeout`, `content_matchers`, and + * `selected_regions`. + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $updateMask + * Optional. If present, only the listed fields in the current Uptime check + * configuration are updated with values from the new configuration. If this + * field is empty, then the current configuration is completely replaced with + * the new configuration. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Monitoring\V3\UptimeCheckConfig + * + * @throws ApiException if the remote call fails + */ + public function updateUptimeCheckConfig($uptimeCheckConfig, array $optionalArgs = []) + { + $request = new UpdateUptimeCheckConfigRequest(); + $requestParamHeaders = []; + $request->setUptimeCheckConfig($uptimeCheckConfig); + $requestParamHeaders['uptime_check_config.name'] = $uptimeCheckConfig->getName(); + if (isset($optionalArgs['updateMask'])) { + $request->setUpdateMask($optionalArgs['updateMask']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('UpdateUptimeCheckConfig', UptimeCheckConfig::class, $optionalArgs, $request)->wait(); + } +} diff --git a/owl-bot-staging/Monitoring/v3/src/V3/GroupServiceClient.php b/owl-bot-staging/Monitoring/v3/src/V3/GroupServiceClient.php new file mode 100644 index 000000000000..c8b5d43074ef --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/src/V3/GroupServiceClient.php @@ -0,0 +1,34 @@ + [ + 'google.monitoring.v3.AlertPolicyService' => [ + 'CreateAlertPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Monitoring\V3\AlertPolicy', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteAlertPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetAlertPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Monitoring\V3\AlertPolicy', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListAlertPolicies' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getAlertPolicies', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Monitoring\V3\ListAlertPoliciesResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UpdateAlertPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Monitoring\V3\AlertPolicy', + 'headerParams' => [ + [ + 'keyName' => 'alert_policy.name', + 'fieldAccessors' => [ + 'getAlertPolicy', + 'getName', + ], + ], + ], + ], + 'templateMap' => [ + 'alertPolicy' => 'projects/{project}/alertPolicies/{alert_policy}', + 'alertPolicyCondition' => 'projects/{project}/alertPolicies/{alert_policy}/conditions/{condition}', + 'folderAlertPolicy' => 'folders/{folder}/alertPolicies/{alert_policy}', + 'folderAlertPolicyCondition' => 'folders/{folder}/alertPolicies/{alert_policy}/conditions/{condition}', + 'organizationAlertPolicy' => 'organizations/{organization}/alertPolicies/{alert_policy}', + 'organizationAlertPolicyCondition' => 'organizations/{organization}/alertPolicies/{alert_policy}/conditions/{condition}', + 'projectAlertPolicy' => 'projects/{project}/alertPolicies/{alert_policy}', + 'projectAlertPolicyCondition' => 'projects/{project}/alertPolicies/{alert_policy}/conditions/{condition}', + ], + ], + ], +]; diff --git a/owl-bot-staging/Monitoring/v3/src/V3/resources/alert_policy_service_rest_client_config.php b/owl-bot-staging/Monitoring/v3/src/V3/resources/alert_policy_service_rest_client_config.php new file mode 100644 index 000000000000..bb65ee95b1d7 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/src/V3/resources/alert_policy_service_rest_client_config.php @@ -0,0 +1,87 @@ + [ + 'google.monitoring.v3.AlertPolicyService' => [ + 'CreateAlertPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{name=projects/*}/alertPolicies', + 'body' => 'alert_policy', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteAlertPolicy' => [ + 'method' => 'delete', + 'uriTemplate' => '/v3/{name=projects/*/alertPolicies/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetAlertPolicy' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/alertPolicies/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListAlertPolicies' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*}/alertPolicies', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'UpdateAlertPolicy' => [ + 'method' => 'patch', + 'uriTemplate' => '/v3/{alert_policy.name=projects/*/alertPolicies/*}', + 'body' => 'alert_policy', + 'placeholders' => [ + 'alert_policy.name' => [ + 'getters' => [ + 'getAlertPolicy', + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Monitoring/v3/src/V3/resources/group_service_client_config.json b/owl-bot-staging/Monitoring/v3/src/V3/resources/group_service_client_config.json new file mode 100644 index 000000000000..3701e6baf28a --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/src/V3/resources/group_service_client_config.json @@ -0,0 +1,86 @@ +{ + "interfaces": { + "google.monitoring.v3.GroupService": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE" + ], + "retry_policy_2_codes": [ + "UNAVAILABLE" + ], + "no_retry_2_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 30000, + "initial_rpc_timeout_millis": 30000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 30000, + "total_timeout_millis": 30000 + }, + "retry_policy_2_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 30000, + "initial_rpc_timeout_millis": 180000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 180000, + "total_timeout_millis": 180000 + }, + "no_retry_2_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 30000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 30000, + "total_timeout_millis": 30000 + } + }, + "methods": { + "CreateGroup": { + "timeout_millis": 30000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" + }, + "DeleteGroup": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetGroup": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListGroupMembers": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListGroups": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateGroup": { + "timeout_millis": 180000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" + } + } + } + } +} diff --git a/owl-bot-staging/Monitoring/v3/src/V3/resources/group_service_descriptor_config.php b/owl-bot-staging/Monitoring/v3/src/V3/resources/group_service_descriptor_config.php new file mode 100644 index 000000000000..dba3498cf7f6 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/src/V3/resources/group_service_descriptor_config.php @@ -0,0 +1,123 @@ + [ + 'google.monitoring.v3.GroupService' => [ + 'CreateGroup' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Monitoring\V3\Group', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteGroup' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetGroup' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Monitoring\V3\Group', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListGroupMembers' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getMembers', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Monitoring\V3\ListGroupMembersResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListGroups' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getGroup', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Monitoring\V3\ListGroupsResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UpdateGroup' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Monitoring\V3\Group', + 'headerParams' => [ + [ + 'keyName' => 'group.name', + 'fieldAccessors' => [ + 'getGroup', + 'getName', + ], + ], + ], + ], + 'templateMap' => [ + 'folderGroup' => 'folders/{folder}/groups/{group}', + 'group' => 'projects/{project}/groups/{group}', + 'organizationGroup' => 'organizations/{organization}/groups/{group}', + 'projectGroup' => 'projects/{project}/groups/{group}', + ], + ], + ], +]; diff --git a/owl-bot-staging/Monitoring/v3/src/V3/resources/group_service_rest_client_config.php b/owl-bot-staging/Monitoring/v3/src/V3/resources/group_service_rest_client_config.php new file mode 100644 index 000000000000..1ec3e238ee16 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/src/V3/resources/group_service_rest_client_config.php @@ -0,0 +1,98 @@ + [ + 'google.monitoring.v3.GroupService' => [ + 'CreateGroup' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{name=projects/*}/groups', + 'body' => 'group', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteGroup' => [ + 'method' => 'delete', + 'uriTemplate' => '/v3/{name=projects/*/groups/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetGroup' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/groups/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListGroupMembers' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/groups/*}/members', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListGroups' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*}/groups', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'UpdateGroup' => [ + 'method' => 'put', + 'uriTemplate' => '/v3/{group.name=projects/*/groups/*}', + 'body' => 'group', + 'placeholders' => [ + 'group.name' => [ + 'getters' => [ + 'getGroup', + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Monitoring/v3/src/V3/resources/metric_service_client_config.json b/owl-bot-staging/Monitoring/v3/src/V3/resources/metric_service_client_config.json new file mode 100644 index 000000000000..37d238c05841 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/src/V3/resources/metric_service_client_config.json @@ -0,0 +1,101 @@ +{ + "interfaces": { + "google.monitoring.v3.MetricService": { + "retry_codes": { + "no_retry_codes": [], + "no_retry_3_codes": [], + "retry_policy_7_codes": [ + "UNAVAILABLE" + ], + "retry_policy_8_codes": [ + "UNAVAILABLE" + ] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "no_retry_3_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 12000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 12000, + "total_timeout_millis": 12000 + }, + "retry_policy_7_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 30000, + "initial_rpc_timeout_millis": 30000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 30000, + "total_timeout_millis": 30000 + }, + "retry_policy_8_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 30000, + "initial_rpc_timeout_millis": 90000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 90000, + "total_timeout_millis": 90000 + } + }, + "methods": { + "CreateMetricDescriptor": { + "timeout_millis": 12000, + "retry_codes_name": "no_retry_3_codes", + "retry_params_name": "no_retry_3_params" + }, + "CreateServiceTimeSeries": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "CreateTimeSeries": { + "timeout_millis": 12000, + "retry_codes_name": "no_retry_3_codes", + "retry_params_name": "no_retry_3_params" + }, + "DeleteMetricDescriptor": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_7_codes", + "retry_params_name": "retry_policy_7_params" + }, + "GetMetricDescriptor": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_7_codes", + "retry_params_name": "retry_policy_7_params" + }, + "GetMonitoredResourceDescriptor": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_7_codes", + "retry_params_name": "retry_policy_7_params" + }, + "ListMetricDescriptors": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_7_codes", + "retry_params_name": "retry_policy_7_params" + }, + "ListMonitoredResourceDescriptors": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_7_codes", + "retry_params_name": "retry_policy_7_params" + }, + "ListTimeSeries": { + "timeout_millis": 90000, + "retry_codes_name": "retry_policy_8_codes", + "retry_params_name": "retry_policy_8_params" + } + } + } + } +} diff --git a/owl-bot-staging/Monitoring/v3/src/V3/resources/metric_service_descriptor_config.php b/owl-bot-staging/Monitoring/v3/src/V3/resources/metric_service_descriptor_config.php new file mode 100644 index 000000000000..7b8896801ebc --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/src/V3/resources/metric_service_descriptor_config.php @@ -0,0 +1,174 @@ + [ + 'google.monitoring.v3.MetricService' => [ + 'CreateMetricDescriptor' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Api\MetricDescriptor', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'CreateServiceTimeSeries' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'CreateTimeSeries' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteMetricDescriptor' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetMetricDescriptor' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Api\MetricDescriptor', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetMonitoredResourceDescriptor' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Api\MonitoredResourceDescriptor', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListMetricDescriptors' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getMetricDescriptors', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Monitoring\V3\ListMetricDescriptorsResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListMonitoredResourceDescriptors' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getResourceDescriptors', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Monitoring\V3\ListMonitoredResourceDescriptorsResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListTimeSeries' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getTimeSeries', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Monitoring\V3\ListTimeSeriesResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'templateMap' => [ + 'folder' => 'folders/{folder}', + 'folderMetricDescriptor' => 'folders/{folder}/metricDescriptors/{metric_descriptor=**}', + 'folderMonitoredResourceDescriptor' => 'folders/{folder}/monitoredResourceDescriptors/{monitored_resource_descriptor}', + 'metricDescriptor' => 'projects/{project}/metricDescriptors/{metric_descriptor=**}', + 'monitoredResourceDescriptor' => 'projects/{project}/monitoredResourceDescriptors/{monitored_resource_descriptor}', + 'organization' => 'organizations/{organization}', + 'organizationMetricDescriptor' => 'organizations/{organization}/metricDescriptors/{metric_descriptor=**}', + 'organizationMonitoredResourceDescriptor' => 'organizations/{organization}/monitoredResourceDescriptors/{monitored_resource_descriptor}', + 'project' => 'projects/{project}', + 'projectMetricDescriptor' => 'projects/{project}/metricDescriptors/{metric_descriptor=**}', + 'projectMonitoredResourceDescriptor' => 'projects/{project}/monitoredResourceDescriptors/{monitored_resource_descriptor}', + 'workspace' => 'projects/{project}', + ], + ], + ], +]; diff --git a/owl-bot-staging/Monitoring/v3/src/V3/resources/metric_service_rest_client_config.php b/owl-bot-staging/Monitoring/v3/src/V3/resources/metric_service_rest_client_config.php new file mode 100644 index 000000000000..0367626add51 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/src/V3/resources/metric_service_rest_client_config.php @@ -0,0 +1,156 @@ + [ + 'google.monitoring.v3.MetricService' => [ + 'CreateMetricDescriptor' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{name=projects/*}/metricDescriptors', + 'body' => 'metric_descriptor', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'CreateServiceTimeSeries' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{name=projects/*}/timeSeries:createService', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'CreateTimeSeries' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{name=projects/*}/timeSeries', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteMetricDescriptor' => [ + 'method' => 'delete', + 'uriTemplate' => '/v3/{name=projects/*/metricDescriptors/**}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetMetricDescriptor' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/metricDescriptors/**}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetMonitoredResourceDescriptor' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/monitoredResourceDescriptors/**}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListMetricDescriptors' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*}/metricDescriptors', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListMonitoredResourceDescriptors' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*}/monitoredResourceDescriptors', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListTimeSeries' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*}/timeSeries', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=organizations/*}/timeSeries', + 'queryParams' => [ + 'filter', + 'interval', + 'view', + ], + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=folders/*}/timeSeries', + 'queryParams' => [ + 'filter', + 'interval', + 'view', + ], + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + 'queryParams' => [ + 'filter', + 'interval', + 'view', + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Monitoring/v3/src/V3/resources/notification_channel_service_client_config.json b/owl-bot-staging/Monitoring/v3/src/V3/resources/notification_channel_service_client_config.json new file mode 100644 index 000000000000..90437e7f64c3 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/src/V3/resources/notification_channel_service_client_config.json @@ -0,0 +1,94 @@ +{ + "interfaces": { + "google.monitoring.v3.NotificationChannelService": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_3_codes": [ + "UNAVAILABLE" + ], + "no_retry_5_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_3_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 30000, + "initial_rpc_timeout_millis": 30000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 30000, + "total_timeout_millis": 30000 + }, + "no_retry_5_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 30000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 30000, + "total_timeout_millis": 30000 + } + }, + "methods": { + "CreateNotificationChannel": { + "timeout_millis": 30000, + "retry_codes_name": "no_retry_5_codes", + "retry_params_name": "no_retry_5_params" + }, + "DeleteNotificationChannel": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params" + }, + "GetNotificationChannel": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params" + }, + "GetNotificationChannelDescriptor": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params" + }, + "GetNotificationChannelVerificationCode": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params" + }, + "ListNotificationChannelDescriptors": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params" + }, + "ListNotificationChannels": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params" + }, + "SendNotificationChannelVerificationCode": { + "timeout_millis": 30000, + "retry_codes_name": "no_retry_5_codes", + "retry_params_name": "no_retry_5_params" + }, + "UpdateNotificationChannel": { + "timeout_millis": 30000, + "retry_codes_name": "no_retry_5_codes", + "retry_params_name": "no_retry_5_params" + }, + "VerifyNotificationChannel": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params" + } + } + } + } +} diff --git a/owl-bot-staging/Monitoring/v3/src/V3/resources/notification_channel_service_descriptor_config.php b/owl-bot-staging/Monitoring/v3/src/V3/resources/notification_channel_service_descriptor_config.php new file mode 100644 index 000000000000..6088b2f89bf7 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/src/V3/resources/notification_channel_service_descriptor_config.php @@ -0,0 +1,175 @@ + [ + 'google.monitoring.v3.NotificationChannelService' => [ + 'CreateNotificationChannel' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Monitoring\V3\NotificationChannel', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteNotificationChannel' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetNotificationChannel' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Monitoring\V3\NotificationChannel', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetNotificationChannelDescriptor' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Monitoring\V3\NotificationChannelDescriptor', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetNotificationChannelVerificationCode' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Monitoring\V3\GetNotificationChannelVerificationCodeResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListNotificationChannelDescriptors' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getChannelDescriptors', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Monitoring\V3\ListNotificationChannelDescriptorsResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListNotificationChannels' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getNotificationChannels', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Monitoring\V3\ListNotificationChannelsResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'SendNotificationChannelVerificationCode' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UpdateNotificationChannel' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Monitoring\V3\NotificationChannel', + 'headerParams' => [ + [ + 'keyName' => 'notification_channel.name', + 'fieldAccessors' => [ + 'getNotificationChannel', + 'getName', + ], + ], + ], + ], + 'VerifyNotificationChannel' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Monitoring\V3\NotificationChannel', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'templateMap' => [ + 'folderChannelDescriptor' => 'folders/{folder}/notificationChannelDescriptors/{channel_descriptor}', + 'folderNotificationChannel' => 'folders/{folder}/notificationChannels/{notification_channel}', + 'notificationChannel' => 'projects/{project}/notificationChannels/{notification_channel}', + 'notificationChannelDescriptor' => 'projects/{project}/notificationChannelDescriptors/{channel_descriptor}', + 'organizationChannelDescriptor' => 'organizations/{organization}/notificationChannelDescriptors/{channel_descriptor}', + 'organizationNotificationChannel' => 'organizations/{organization}/notificationChannels/{notification_channel}', + 'projectChannelDescriptor' => 'projects/{project}/notificationChannelDescriptors/{channel_descriptor}', + 'projectNotificationChannel' => 'projects/{project}/notificationChannels/{notification_channel}', + ], + ], + ], +]; diff --git a/owl-bot-staging/Monitoring/v3/src/V3/resources/notification_channel_service_rest_client_config.php b/owl-bot-staging/Monitoring/v3/src/V3/resources/notification_channel_service_rest_client_config.php new file mode 100644 index 000000000000..822c7ebc9340 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/src/V3/resources/notification_channel_service_rest_client_config.php @@ -0,0 +1,145 @@ + [ + 'google.monitoring.v3.NotificationChannelService' => [ + 'CreateNotificationChannel' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{name=projects/*}/notificationChannels', + 'body' => 'notification_channel', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteNotificationChannel' => [ + 'method' => 'delete', + 'uriTemplate' => '/v3/{name=projects/*/notificationChannels/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetNotificationChannel' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/notificationChannels/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetNotificationChannelDescriptor' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/notificationChannelDescriptors/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetNotificationChannelVerificationCode' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{name=projects/*/notificationChannels/*}:getVerificationCode', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListNotificationChannelDescriptors' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*}/notificationChannelDescriptors', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListNotificationChannels' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*}/notificationChannels', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'SendNotificationChannelVerificationCode' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{name=projects/*/notificationChannels/*}:sendVerificationCode', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'UpdateNotificationChannel' => [ + 'method' => 'patch', + 'uriTemplate' => '/v3/{notification_channel.name=projects/*/notificationChannels/*}', + 'body' => 'notification_channel', + 'placeholders' => [ + 'notification_channel.name' => [ + 'getters' => [ + 'getNotificationChannel', + 'getName', + ], + ], + ], + ], + 'VerifyNotificationChannel' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{name=projects/*/notificationChannels/*}:verify', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Monitoring/v3/src/V3/resources/query_service_client_config.json b/owl-bot-staging/Monitoring/v3/src/V3/resources/query_service_client_config.json new file mode 100644 index 000000000000..c20408d0eced --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/src/V3/resources/query_service_client_config.json @@ -0,0 +1,27 @@ +{ + "interfaces": { + "google.monitoring.v3.QueryService": { + "retry_codes": { + "no_retry_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + } + }, + "methods": { + "QueryTimeSeries": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } + } + } +} diff --git a/owl-bot-staging/Monitoring/v3/src/V3/resources/query_service_descriptor_config.php b/owl-bot-staging/Monitoring/v3/src/V3/resources/query_service_descriptor_config.php new file mode 100644 index 000000000000..4b6dc680ebc6 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/src/V3/resources/query_service_descriptor_config.php @@ -0,0 +1,48 @@ + [ + 'google.monitoring.v3.QueryService' => [ + 'QueryTimeSeries' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getTimeSeriesData', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Monitoring\V3\QueryTimeSeriesResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + ], + ], +]; diff --git a/owl-bot-staging/Monitoring/v3/src/V3/resources/query_service_rest_client_config.php b/owl-bot-staging/Monitoring/v3/src/V3/resources/query_service_rest_client_config.php new file mode 100644 index 000000000000..38b688dbab52 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/src/V3/resources/query_service_rest_client_config.php @@ -0,0 +1,41 @@ + [ + 'google.monitoring.v3.QueryService' => [ + 'QueryTimeSeries' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{name=projects/*}/timeSeries:query', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Monitoring/v3/src/V3/resources/service_monitoring_service_client_config.json b/owl-bot-staging/Monitoring/v3/src/V3/resources/service_monitoring_service_client_config.json new file mode 100644 index 000000000000..daae71bdd457 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/src/V3/resources/service_monitoring_service_client_config.json @@ -0,0 +1,94 @@ +{ + "interfaces": { + "google.monitoring.v3.ServiceMonitoringService": { + "retry_codes": { + "no_retry_codes": [], + "no_retry_4_codes": [], + "retry_policy_4_codes": [ + "UNAVAILABLE" + ] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "no_retry_4_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 30000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 30000, + "total_timeout_millis": 30000 + }, + "retry_policy_4_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 30000, + "initial_rpc_timeout_millis": 30000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 30000, + "total_timeout_millis": 30000 + } + }, + "methods": { + "CreateService": { + "timeout_millis": 30000, + "retry_codes_name": "no_retry_4_codes", + "retry_params_name": "no_retry_4_params" + }, + "CreateServiceLevelObjective": { + "timeout_millis": 30000, + "retry_codes_name": "no_retry_4_codes", + "retry_params_name": "no_retry_4_params" + }, + "DeleteService": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_4_codes", + "retry_params_name": "retry_policy_4_params" + }, + "DeleteServiceLevelObjective": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_4_codes", + "retry_params_name": "retry_policy_4_params" + }, + "GetService": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_4_codes", + "retry_params_name": "retry_policy_4_params" + }, + "GetServiceLevelObjective": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_4_codes", + "retry_params_name": "retry_policy_4_params" + }, + "ListServiceLevelObjectives": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_4_codes", + "retry_params_name": "retry_policy_4_params" + }, + "ListServices": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_4_codes", + "retry_params_name": "retry_policy_4_params" + }, + "UpdateService": { + "timeout_millis": 30000, + "retry_codes_name": "no_retry_4_codes", + "retry_params_name": "no_retry_4_params" + }, + "UpdateServiceLevelObjective": { + "timeout_millis": 30000, + "retry_codes_name": "no_retry_4_codes", + "retry_params_name": "no_retry_4_params" + } + } + } + } +} diff --git a/owl-bot-staging/Monitoring/v3/src/V3/resources/service_monitoring_service_descriptor_config.php b/owl-bot-staging/Monitoring/v3/src/V3/resources/service_monitoring_service_descriptor_config.php new file mode 100644 index 000000000000..739ca8709340 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/src/V3/resources/service_monitoring_service_descriptor_config.php @@ -0,0 +1,176 @@ + [ + 'google.monitoring.v3.ServiceMonitoringService' => [ + 'CreateService' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Monitoring\V3\Service', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateServiceLevelObjective' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Monitoring\V3\ServiceLevelObjective', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteService' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteServiceLevelObjective' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetService' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Monitoring\V3\Service', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetServiceLevelObjective' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Monitoring\V3\ServiceLevelObjective', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListServiceLevelObjectives' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getServiceLevelObjectives', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Monitoring\V3\ListServiceLevelObjectivesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListServices' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getServices', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Monitoring\V3\ListServicesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateService' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Monitoring\V3\Service', + 'headerParams' => [ + [ + 'keyName' => 'service.name', + 'fieldAccessors' => [ + 'getService', + 'getName', + ], + ], + ], + ], + 'UpdateServiceLevelObjective' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Monitoring\V3\ServiceLevelObjective', + 'headerParams' => [ + [ + 'keyName' => 'service_level_objective.name', + 'fieldAccessors' => [ + 'getServiceLevelObjective', + 'getName', + ], + ], + ], + ], + 'templateMap' => [ + 'folderService' => 'folders/{folder}/services/{service}', + 'folderServiceServiceLevelObjective' => 'folders/{folder}/services/{service}/serviceLevelObjectives/{service_level_objective}', + 'organizationService' => 'organizations/{organization}/services/{service}', + 'organizationServiceServiceLevelObjective' => 'organizations/{organization}/services/{service}/serviceLevelObjectives/{service_level_objective}', + 'projectService' => 'projects/{project}/services/{service}', + 'projectServiceServiceLevelObjective' => 'projects/{project}/services/{service}/serviceLevelObjectives/{service_level_objective}', + 'service' => 'projects/{project}/services/{service}', + 'serviceLevelObjective' => 'projects/{project}/services/{service}/serviceLevelObjectives/{service_level_objective}', + ], + ], + ], +]; diff --git a/owl-bot-staging/Monitoring/v3/src/V3/resources/service_monitoring_service_rest_client_config.php b/owl-bot-staging/Monitoring/v3/src/V3/resources/service_monitoring_service_rest_client_config.php new file mode 100644 index 000000000000..f7ca03dded7a --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/src/V3/resources/service_monitoring_service_rest_client_config.php @@ -0,0 +1,145 @@ + [ + 'google.monitoring.v3.ServiceMonitoringService' => [ + 'CreateService' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{parent=*/*}/services', + 'body' => 'service', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreateServiceLevelObjective' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{parent=*/*/services/*}/serviceLevelObjectives', + 'body' => 'service_level_objective', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteService' => [ + 'method' => 'delete', + 'uriTemplate' => '/v3/{name=*/*/services/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteServiceLevelObjective' => [ + 'method' => 'delete', + 'uriTemplate' => '/v3/{name=*/*/services/*/serviceLevelObjectives/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetService' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=*/*/services/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetServiceLevelObjective' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=*/*/services/*/serviceLevelObjectives/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListServiceLevelObjectives' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{parent=*/*/services/*}/serviceLevelObjectives', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListServices' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{parent=*/*}/services', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateService' => [ + 'method' => 'patch', + 'uriTemplate' => '/v3/{service.name=*/*/services/*}', + 'body' => 'service', + 'placeholders' => [ + 'service.name' => [ + 'getters' => [ + 'getService', + 'getName', + ], + ], + ], + ], + 'UpdateServiceLevelObjective' => [ + 'method' => 'patch', + 'uriTemplate' => '/v3/{service_level_objective.name=*/*/services/*/serviceLevelObjectives/*}', + 'body' => 'service_level_objective', + 'placeholders' => [ + 'service_level_objective.name' => [ + 'getters' => [ + 'getServiceLevelObjective', + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Monitoring/v3/src/V3/resources/snooze_service_client_config.json b/owl-bot-staging/Monitoring/v3/src/V3/resources/snooze_service_client_config.json new file mode 100644 index 000000000000..0acb65e12bd9 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/src/V3/resources/snooze_service_client_config.json @@ -0,0 +1,64 @@ +{ + "interfaces": { + "google.monitoring.v3.SnoozeService": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_9_codes": [ + "UNAVAILABLE" + ], + "no_retry_7_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_9_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 30000, + "initial_rpc_timeout_millis": 30000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 30000, + "total_timeout_millis": 30000 + }, + "no_retry_7_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 30000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 30000, + "total_timeout_millis": 30000 + } + }, + "methods": { + "CreateSnooze": { + "timeout_millis": 30000, + "retry_codes_name": "no_retry_7_codes", + "retry_params_name": "no_retry_7_params" + }, + "GetSnooze": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_9_codes", + "retry_params_name": "retry_policy_9_params" + }, + "ListSnoozes": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_9_codes", + "retry_params_name": "retry_policy_9_params" + }, + "UpdateSnooze": { + "timeout_millis": 30000, + "retry_codes_name": "no_retry_7_codes", + "retry_params_name": "no_retry_7_params" + } + } + } + } +} diff --git a/owl-bot-staging/Monitoring/v3/src/V3/resources/snooze_service_descriptor_config.php b/owl-bot-staging/Monitoring/v3/src/V3/resources/snooze_service_descriptor_config.php new file mode 100644 index 000000000000..57e5c8ab3863 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/src/V3/resources/snooze_service_descriptor_config.php @@ -0,0 +1,94 @@ + [ + 'google.monitoring.v3.SnoozeService' => [ + 'CreateSnooze' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Monitoring\V3\Snooze', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'GetSnooze' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Monitoring\V3\Snooze', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListSnoozes' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getSnoozes', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Monitoring\V3\ListSnoozesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateSnooze' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Monitoring\V3\Snooze', + 'headerParams' => [ + [ + 'keyName' => 'snooze.name', + 'fieldAccessors' => [ + 'getSnooze', + 'getName', + ], + ], + ], + ], + 'templateMap' => [ + 'alertPolicy' => 'projects/{project}/alertPolicies/{alert_policy}', + 'folderAlertPolicy' => 'folders/{folder}/alertPolicies/{alert_policy}', + 'organizationAlertPolicy' => 'organizations/{organization}/alertPolicies/{alert_policy}', + 'project' => 'projects/{project}', + 'projectAlertPolicy' => 'projects/{project}/alertPolicies/{alert_policy}', + 'snooze' => 'projects/{project}/snoozes/{snooze}', + 'workspace' => 'projects/{project}', + ], + ], + ], +]; diff --git a/owl-bot-staging/Monitoring/v3/src/V3/resources/snooze_service_rest_client_config.php b/owl-bot-staging/Monitoring/v3/src/V3/resources/snooze_service_rest_client_config.php new file mode 100644 index 000000000000..a3b5e3574b8e --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/src/V3/resources/snooze_service_rest_client_config.php @@ -0,0 +1,79 @@ + [ + 'google.monitoring.v3.SnoozeService' => [ + 'CreateSnooze' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{parent=projects/*}/snoozes', + 'body' => 'snooze', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'GetSnooze' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/snoozes/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListSnoozes' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{parent=projects/*}/snoozes', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateSnooze' => [ + 'method' => 'patch', + 'uriTemplate' => '/v3/{snooze.name=projects/*/snoozes/*}', + 'body' => 'snooze', + 'placeholders' => [ + 'snooze.name' => [ + 'getters' => [ + 'getSnooze', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Monitoring/v3/src/V3/resources/uptime_check_service_client_config.json b/owl-bot-staging/Monitoring/v3/src/V3/resources/uptime_check_service_client_config.json new file mode 100644 index 000000000000..4e19af233897 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/src/V3/resources/uptime_check_service_client_config.json @@ -0,0 +1,74 @@ +{ + "interfaces": { + "google.monitoring.v3.UptimeCheckService": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_5_codes": [ + "UNAVAILABLE" + ], + "no_retry_6_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_5_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 30000, + "initial_rpc_timeout_millis": 30000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 30000, + "total_timeout_millis": 30000 + }, + "no_retry_6_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 30000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 30000, + "total_timeout_millis": 30000 + } + }, + "methods": { + "CreateUptimeCheckConfig": { + "timeout_millis": 30000, + "retry_codes_name": "no_retry_6_codes", + "retry_params_name": "no_retry_6_params" + }, + "DeleteUptimeCheckConfig": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_5_codes", + "retry_params_name": "retry_policy_5_params" + }, + "GetUptimeCheckConfig": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_5_codes", + "retry_params_name": "retry_policy_5_params" + }, + "ListUptimeCheckConfigs": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_5_codes", + "retry_params_name": "retry_policy_5_params" + }, + "ListUptimeCheckIps": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_5_codes", + "retry_params_name": "retry_policy_5_params" + }, + "UpdateUptimeCheckConfig": { + "timeout_millis": 30000, + "retry_codes_name": "no_retry_6_codes", + "retry_params_name": "no_retry_6_params" + } + } + } + } +} diff --git a/owl-bot-staging/Monitoring/v3/src/V3/resources/uptime_check_service_descriptor_config.php b/owl-bot-staging/Monitoring/v3/src/V3/resources/uptime_check_service_descriptor_config.php new file mode 100644 index 000000000000..e1d4dafc1ca4 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/src/V3/resources/uptime_check_service_descriptor_config.php @@ -0,0 +1,116 @@ + [ + 'google.monitoring.v3.UptimeCheckService' => [ + 'CreateUptimeCheckConfig' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Monitoring\V3\UptimeCheckConfig', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteUptimeCheckConfig' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetUptimeCheckConfig' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Monitoring\V3\UptimeCheckConfig', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListUptimeCheckConfigs' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getUptimeCheckConfigs', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Monitoring\V3\ListUptimeCheckConfigsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListUptimeCheckIps' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getUptimeCheckIps', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Monitoring\V3\ListUptimeCheckIpsResponse', + ], + 'UpdateUptimeCheckConfig' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Monitoring\V3\UptimeCheckConfig', + 'headerParams' => [ + [ + 'keyName' => 'uptime_check_config.name', + 'fieldAccessors' => [ + 'getUptimeCheckConfig', + 'getName', + ], + ], + ], + ], + 'templateMap' => [ + 'folderUptimeCheckConfig' => 'folders/{folder}/uptimeCheckConfigs/{uptime_check_config}', + 'function' => 'projects/{project}/locations/{location}/functions/{function}', + 'organizationUptimeCheckConfig' => 'organizations/{organization}/uptimeCheckConfigs/{uptime_check_config}', + 'projectUptimeCheckConfig' => 'projects/{project}/uptimeCheckConfigs/{uptime_check_config}', + 'uptimeCheckConfig' => 'projects/{project}/uptimeCheckConfigs/{uptime_check_config}', + ], + ], + ], +]; diff --git a/owl-bot-staging/Monitoring/v3/src/V3/resources/uptime_check_service_rest_client_config.php b/owl-bot-staging/Monitoring/v3/src/V3/resources/uptime_check_service_rest_client_config.php new file mode 100644 index 000000000000..4c50c3cd46b1 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/src/V3/resources/uptime_check_service_rest_client_config.php @@ -0,0 +1,91 @@ + [ + 'google.monitoring.v3.UptimeCheckService' => [ + 'CreateUptimeCheckConfig' => [ + 'method' => 'post', + 'uriTemplate' => '/v3/{parent=projects/*}/uptimeCheckConfigs', + 'body' => 'uptime_check_config', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteUptimeCheckConfig' => [ + 'method' => 'delete', + 'uriTemplate' => '/v3/{name=projects/*/uptimeCheckConfigs/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetUptimeCheckConfig' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{name=projects/*/uptimeCheckConfigs/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListUptimeCheckConfigs' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/{parent=projects/*}/uptimeCheckConfigs', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListUptimeCheckIps' => [ + 'method' => 'get', + 'uriTemplate' => '/v3/uptimeCheckIps', + ], + 'UpdateUptimeCheckConfig' => [ + 'method' => 'patch', + 'uriTemplate' => '/v3/{uptime_check_config.name=projects/*/uptimeCheckConfigs/*}', + 'body' => 'uptime_check_config', + 'placeholders' => [ + 'uptime_check_config.name' => [ + 'getters' => [ + 'getUptimeCheckConfig', + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Monitoring/v3/tests/Unit/V3/AlertPolicyServiceClientTest.php b/owl-bot-staging/Monitoring/v3/tests/Unit/V3/AlertPolicyServiceClientTest.php new file mode 100644 index 000000000000..9811f18bd6f3 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/tests/Unit/V3/AlertPolicyServiceClientTest.php @@ -0,0 +1,380 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return AlertPolicyServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new AlertPolicyServiceClient($options); + } + + /** @test */ + public function createAlertPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $expectedResponse = new AlertPolicy(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $name = 'name3373707'; + $alertPolicy = new AlertPolicy(); + $response = $gapicClient->createAlertPolicy($name, $alertPolicy); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.AlertPolicyService/CreateAlertPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $actualValue = $actualRequestObject->getAlertPolicy(); + $this->assertProtobufEquals($alertPolicy, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createAlertPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $name = 'name3373707'; + $alertPolicy = new AlertPolicy(); + try { + $gapicClient->createAlertPolicy($name, $alertPolicy); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteAlertPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->alertPolicyName('[PROJECT]', '[ALERT_POLICY]'); + $gapicClient->deleteAlertPolicy($formattedName); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.AlertPolicyService/DeleteAlertPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteAlertPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->alertPolicyName('[PROJECT]', '[ALERT_POLICY]'); + try { + $gapicClient->deleteAlertPolicy($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAlertPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $expectedResponse = new AlertPolicy(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->alertPolicyName('[PROJECT]', '[ALERT_POLICY]'); + $response = $gapicClient->getAlertPolicy($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.AlertPolicyService/GetAlertPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAlertPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->alertPolicyName('[PROJECT]', '[ALERT_POLICY]'); + try { + $gapicClient->getAlertPolicy($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAlertPoliciesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $totalSize = 705419236; + $alertPoliciesElement = new AlertPolicy(); + $alertPolicies = [ + $alertPoliciesElement, + ]; + $expectedResponse = new ListAlertPoliciesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTotalSize($totalSize); + $expectedResponse->setAlertPolicies($alertPolicies); + $transport->addResponse($expectedResponse); + // Mock request + $name = 'name3373707'; + $response = $gapicClient->listAlertPolicies($name); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getAlertPolicies()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.AlertPolicyService/ListAlertPolicies', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAlertPoliciesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $name = 'name3373707'; + try { + $gapicClient->listAlertPolicies($name); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateAlertPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $expectedResponse = new AlertPolicy(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $alertPolicy = new AlertPolicy(); + $response = $gapicClient->updateAlertPolicy($alertPolicy); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.AlertPolicyService/UpdateAlertPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getAlertPolicy(); + $this->assertProtobufEquals($alertPolicy, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateAlertPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $alertPolicy = new AlertPolicy(); + try { + $gapicClient->updateAlertPolicy($alertPolicy); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/Monitoring/v3/tests/Unit/V3/Client/AlertPolicyServiceClientTest.php b/owl-bot-staging/Monitoring/v3/tests/Unit/V3/Client/AlertPolicyServiceClientTest.php new file mode 100644 index 000000000000..498d9a5be075 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/tests/Unit/V3/Client/AlertPolicyServiceClientTest.php @@ -0,0 +1,442 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return AlertPolicyServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new AlertPolicyServiceClient($options); + } + + /** @test */ + public function createAlertPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $expectedResponse = new AlertPolicy(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $name = 'name3373707'; + $alertPolicy = new AlertPolicy(); + $request = (new CreateAlertPolicyRequest()) + ->setName($name) + ->setAlertPolicy($alertPolicy); + $response = $gapicClient->createAlertPolicy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.AlertPolicyService/CreateAlertPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $actualValue = $actualRequestObject->getAlertPolicy(); + $this->assertProtobufEquals($alertPolicy, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createAlertPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $name = 'name3373707'; + $alertPolicy = new AlertPolicy(); + $request = (new CreateAlertPolicyRequest()) + ->setName($name) + ->setAlertPolicy($alertPolicy); + try { + $gapicClient->createAlertPolicy($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteAlertPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->alertPolicyName('[PROJECT]', '[ALERT_POLICY]'); + $request = (new DeleteAlertPolicyRequest()) + ->setName($formattedName); + $gapicClient->deleteAlertPolicy($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.AlertPolicyService/DeleteAlertPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteAlertPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->alertPolicyName('[PROJECT]', '[ALERT_POLICY]'); + $request = (new DeleteAlertPolicyRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteAlertPolicy($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAlertPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $expectedResponse = new AlertPolicy(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->alertPolicyName('[PROJECT]', '[ALERT_POLICY]'); + $request = (new GetAlertPolicyRequest()) + ->setName($formattedName); + $response = $gapicClient->getAlertPolicy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.AlertPolicyService/GetAlertPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAlertPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->alertPolicyName('[PROJECT]', '[ALERT_POLICY]'); + $request = (new GetAlertPolicyRequest()) + ->setName($formattedName); + try { + $gapicClient->getAlertPolicy($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAlertPoliciesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $totalSize = 705419236; + $alertPoliciesElement = new AlertPolicy(); + $alertPolicies = [ + $alertPoliciesElement, + ]; + $expectedResponse = new ListAlertPoliciesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTotalSize($totalSize); + $expectedResponse->setAlertPolicies($alertPolicies); + $transport->addResponse($expectedResponse); + // Mock request + $name = 'name3373707'; + $request = (new ListAlertPoliciesRequest()) + ->setName($name); + $response = $gapicClient->listAlertPolicies($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getAlertPolicies()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.AlertPolicyService/ListAlertPolicies', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAlertPoliciesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $name = 'name3373707'; + $request = (new ListAlertPoliciesRequest()) + ->setName($name); + try { + $gapicClient->listAlertPolicies($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateAlertPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $expectedResponse = new AlertPolicy(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $alertPolicy = new AlertPolicy(); + $request = (new UpdateAlertPolicyRequest()) + ->setAlertPolicy($alertPolicy); + $response = $gapicClient->updateAlertPolicy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.AlertPolicyService/UpdateAlertPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getAlertPolicy(); + $this->assertProtobufEquals($alertPolicy, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateAlertPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $alertPolicy = new AlertPolicy(); + $request = (new UpdateAlertPolicyRequest()) + ->setAlertPolicy($alertPolicy); + try { + $gapicClient->updateAlertPolicy($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createAlertPolicyAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $expectedResponse = new AlertPolicy(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $name = 'name3373707'; + $alertPolicy = new AlertPolicy(); + $request = (new CreateAlertPolicyRequest()) + ->setName($name) + ->setAlertPolicy($alertPolicy); + $response = $gapicClient->createAlertPolicyAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.AlertPolicyService/CreateAlertPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $actualValue = $actualRequestObject->getAlertPolicy(); + $this->assertProtobufEquals($alertPolicy, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/Monitoring/v3/tests/Unit/V3/Client/GroupServiceClientTest.php b/owl-bot-staging/Monitoring/v3/tests/Unit/V3/Client/GroupServiceClientTest.php new file mode 100644 index 000000000000..5e7c3024f3ac --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/tests/Unit/V3/Client/GroupServiceClientTest.php @@ -0,0 +1,541 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return GroupServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new GroupServiceClient($options); + } + + /** @test */ + public function createGroupTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $parentName = 'parentName1015022848'; + $filter = 'filter-1274492040'; + $isCluster = false; + $expectedResponse = new Group(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setParentName($parentName); + $expectedResponse->setFilter($filter); + $expectedResponse->setIsCluster($isCluster); + $transport->addResponse($expectedResponse); + // Mock request + $name = 'name3373707'; + $group = new Group(); + $request = (new CreateGroupRequest()) + ->setName($name) + ->setGroup($group); + $response = $gapicClient->createGroup($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.GroupService/CreateGroup', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $actualValue = $actualRequestObject->getGroup(); + $this->assertProtobufEquals($group, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createGroupExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $name = 'name3373707'; + $group = new Group(); + $request = (new CreateGroupRequest()) + ->setName($name) + ->setGroup($group); + try { + $gapicClient->createGroup($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteGroupTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->groupName('[PROJECT]', '[GROUP]'); + $request = (new DeleteGroupRequest()) + ->setName($formattedName); + $gapicClient->deleteGroup($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.GroupService/DeleteGroup', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteGroupExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->groupName('[PROJECT]', '[GROUP]'); + $request = (new DeleteGroupRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteGroup($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getGroupTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $parentName = 'parentName1015022848'; + $filter = 'filter-1274492040'; + $isCluster = false; + $expectedResponse = new Group(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setParentName($parentName); + $expectedResponse->setFilter($filter); + $expectedResponse->setIsCluster($isCluster); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->groupName('[PROJECT]', '[GROUP]'); + $request = (new GetGroupRequest()) + ->setName($formattedName); + $response = $gapicClient->getGroup($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.GroupService/GetGroup', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getGroupExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->groupName('[PROJECT]', '[GROUP]'); + $request = (new GetGroupRequest()) + ->setName($formattedName); + try { + $gapicClient->getGroup($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listGroupMembersTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $totalSize = 705419236; + $membersElement = new MonitoredResource(); + $members = [ + $membersElement, + ]; + $expectedResponse = new ListGroupMembersResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTotalSize($totalSize); + $expectedResponse->setMembers($members); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->groupName('[PROJECT]', '[GROUP]'); + $request = (new ListGroupMembersRequest()) + ->setName($formattedName); + $response = $gapicClient->listGroupMembers($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getMembers()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.GroupService/ListGroupMembers', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listGroupMembersExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->groupName('[PROJECT]', '[GROUP]'); + $request = (new ListGroupMembersRequest()) + ->setName($formattedName); + try { + $gapicClient->listGroupMembers($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listGroupsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $groupElement = new Group(); + $group = [ + $groupElement, + ]; + $expectedResponse = new ListGroupsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setGroup($group); + $transport->addResponse($expectedResponse); + // Mock request + $name = 'name3373707'; + $request = (new ListGroupsRequest()) + ->setName($name); + $response = $gapicClient->listGroups($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getGroup()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.GroupService/ListGroups', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listGroupsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $name = 'name3373707'; + $request = (new ListGroupsRequest()) + ->setName($name); + try { + $gapicClient->listGroups($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateGroupTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $parentName = 'parentName1015022848'; + $filter = 'filter-1274492040'; + $isCluster = false; + $expectedResponse = new Group(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setParentName($parentName); + $expectedResponse->setFilter($filter); + $expectedResponse->setIsCluster($isCluster); + $transport->addResponse($expectedResponse); + // Mock request + $group = new Group(); + $request = (new UpdateGroupRequest()) + ->setGroup($group); + $response = $gapicClient->updateGroup($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.GroupService/UpdateGroup', $actualFuncCall); + $actualValue = $actualRequestObject->getGroup(); + $this->assertProtobufEquals($group, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateGroupExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $group = new Group(); + $request = (new UpdateGroupRequest()) + ->setGroup($group); + try { + $gapicClient->updateGroup($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createGroupAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $parentName = 'parentName1015022848'; + $filter = 'filter-1274492040'; + $isCluster = false; + $expectedResponse = new Group(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setParentName($parentName); + $expectedResponse->setFilter($filter); + $expectedResponse->setIsCluster($isCluster); + $transport->addResponse($expectedResponse); + // Mock request + $name = 'name3373707'; + $group = new Group(); + $request = (new CreateGroupRequest()) + ->setName($name) + ->setGroup($group); + $response = $gapicClient->createGroupAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.GroupService/CreateGroup', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $actualValue = $actualRequestObject->getGroup(); + $this->assertProtobufEquals($group, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/Monitoring/v3/tests/Unit/V3/Client/MetricServiceClientTest.php b/owl-bot-staging/Monitoring/v3/tests/Unit/V3/Client/MetricServiceClientTest.php new file mode 100644 index 000000000000..8a38d03c86bc --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/tests/Unit/V3/Client/MetricServiceClientTest.php @@ -0,0 +1,769 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return MetricServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new MetricServiceClient($options); + } + + /** @test */ + public function createMetricDescriptorTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $type = 'type3575610'; + $unit = 'unit3594628'; + $description = 'description-1724546052'; + $displayName = 'displayName1615086568'; + $expectedResponse = new MetricDescriptor(); + $expectedResponse->setName($name2); + $expectedResponse->setType($type); + $expectedResponse->setUnit($unit); + $expectedResponse->setDescription($description); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $name = 'name3373707'; + $metricDescriptor = new MetricDescriptor(); + $request = (new CreateMetricDescriptorRequest()) + ->setName($name) + ->setMetricDescriptor($metricDescriptor); + $response = $gapicClient->createMetricDescriptor($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.MetricService/CreateMetricDescriptor', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $actualValue = $actualRequestObject->getMetricDescriptor(); + $this->assertProtobufEquals($metricDescriptor, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createMetricDescriptorExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $name = 'name3373707'; + $metricDescriptor = new MetricDescriptor(); + $request = (new CreateMetricDescriptorRequest()) + ->setName($name) + ->setMetricDescriptor($metricDescriptor); + try { + $gapicClient->createMetricDescriptor($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createServiceTimeSeriesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->projectName('[PROJECT]'); + $timeSeries = []; + $request = (new CreateTimeSeriesRequest()) + ->setName($formattedName) + ->setTimeSeries($timeSeries); + $gapicClient->createServiceTimeSeries($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.MetricService/CreateServiceTimeSeries', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getTimeSeries(); + $this->assertProtobufEquals($timeSeries, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createServiceTimeSeriesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->projectName('[PROJECT]'); + $timeSeries = []; + $request = (new CreateTimeSeriesRequest()) + ->setName($formattedName) + ->setTimeSeries($timeSeries); + try { + $gapicClient->createServiceTimeSeries($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createTimeSeriesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->projectName('[PROJECT]'); + $timeSeries = []; + $request = (new CreateTimeSeriesRequest()) + ->setName($formattedName) + ->setTimeSeries($timeSeries); + $gapicClient->createTimeSeries($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.MetricService/CreateTimeSeries', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getTimeSeries(); + $this->assertProtobufEquals($timeSeries, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createTimeSeriesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->projectName('[PROJECT]'); + $timeSeries = []; + $request = (new CreateTimeSeriesRequest()) + ->setName($formattedName) + ->setTimeSeries($timeSeries); + try { + $gapicClient->createTimeSeries($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteMetricDescriptorTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->metricDescriptorName('[PROJECT]', '[METRIC_DESCRIPTOR]'); + $request = (new DeleteMetricDescriptorRequest()) + ->setName($formattedName); + $gapicClient->deleteMetricDescriptor($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.MetricService/DeleteMetricDescriptor', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteMetricDescriptorExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->metricDescriptorName('[PROJECT]', '[METRIC_DESCRIPTOR]'); + $request = (new DeleteMetricDescriptorRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteMetricDescriptor($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getMetricDescriptorTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $type = 'type3575610'; + $unit = 'unit3594628'; + $description = 'description-1724546052'; + $displayName = 'displayName1615086568'; + $expectedResponse = new MetricDescriptor(); + $expectedResponse->setName($name2); + $expectedResponse->setType($type); + $expectedResponse->setUnit($unit); + $expectedResponse->setDescription($description); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->metricDescriptorName('[PROJECT]', '[METRIC_DESCRIPTOR]'); + $request = (new GetMetricDescriptorRequest()) + ->setName($formattedName); + $response = $gapicClient->getMetricDescriptor($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.MetricService/GetMetricDescriptor', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getMetricDescriptorExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->metricDescriptorName('[PROJECT]', '[METRIC_DESCRIPTOR]'); + $request = (new GetMetricDescriptorRequest()) + ->setName($formattedName); + try { + $gapicClient->getMetricDescriptor($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getMonitoredResourceDescriptorTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $type = 'type3575610'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $expectedResponse = new MonitoredResourceDescriptor(); + $expectedResponse->setName($name2); + $expectedResponse->setType($type); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->monitoredResourceDescriptorName('[PROJECT]', '[MONITORED_RESOURCE_DESCRIPTOR]'); + $request = (new GetMonitoredResourceDescriptorRequest()) + ->setName($formattedName); + $response = $gapicClient->getMonitoredResourceDescriptor($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.MetricService/GetMonitoredResourceDescriptor', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getMonitoredResourceDescriptorExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->monitoredResourceDescriptorName('[PROJECT]', '[MONITORED_RESOURCE_DESCRIPTOR]'); + $request = (new GetMonitoredResourceDescriptorRequest()) + ->setName($formattedName); + try { + $gapicClient->getMonitoredResourceDescriptor($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listMetricDescriptorsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $metricDescriptorsElement = new MetricDescriptor(); + $metricDescriptors = [ + $metricDescriptorsElement, + ]; + $expectedResponse = new ListMetricDescriptorsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setMetricDescriptors($metricDescriptors); + $transport->addResponse($expectedResponse); + // Mock request + $name = 'name3373707'; + $request = (new ListMetricDescriptorsRequest()) + ->setName($name); + $response = $gapicClient->listMetricDescriptors($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getMetricDescriptors()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.MetricService/ListMetricDescriptors', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listMetricDescriptorsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $name = 'name3373707'; + $request = (new ListMetricDescriptorsRequest()) + ->setName($name); + try { + $gapicClient->listMetricDescriptors($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listMonitoredResourceDescriptorsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $resourceDescriptorsElement = new MonitoredResourceDescriptor(); + $resourceDescriptors = [ + $resourceDescriptorsElement, + ]; + $expectedResponse = new ListMonitoredResourceDescriptorsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setResourceDescriptors($resourceDescriptors); + $transport->addResponse($expectedResponse); + // Mock request + $name = 'name3373707'; + $request = (new ListMonitoredResourceDescriptorsRequest()) + ->setName($name); + $response = $gapicClient->listMonitoredResourceDescriptors($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getResourceDescriptors()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.MetricService/ListMonitoredResourceDescriptors', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listMonitoredResourceDescriptorsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $name = 'name3373707'; + $request = (new ListMonitoredResourceDescriptorsRequest()) + ->setName($name); + try { + $gapicClient->listMonitoredResourceDescriptors($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listTimeSeriesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $unit = 'unit3594628'; + $timeSeriesElement = new TimeSeries(); + $timeSeries = [ + $timeSeriesElement, + ]; + $expectedResponse = new ListTimeSeriesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setUnit($unit); + $expectedResponse->setTimeSeries($timeSeries); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->workspaceName('[PROJECT]'); + $filter = 'filter-1274492040'; + $interval = new TimeInterval(); + $view = TimeSeriesView::FULL; + $request = (new ListTimeSeriesRequest()) + ->setName($formattedName) + ->setFilter($filter) + ->setInterval($interval) + ->setView($view); + $response = $gapicClient->listTimeSeries($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getTimeSeries()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.MetricService/ListTimeSeries', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getFilter(); + $this->assertProtobufEquals($filter, $actualValue); + $actualValue = $actualRequestObject->getInterval(); + $this->assertProtobufEquals($interval, $actualValue); + $actualValue = $actualRequestObject->getView(); + $this->assertProtobufEquals($view, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listTimeSeriesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->workspaceName('[PROJECT]'); + $filter = 'filter-1274492040'; + $interval = new TimeInterval(); + $view = TimeSeriesView::FULL; + $request = (new ListTimeSeriesRequest()) + ->setName($formattedName) + ->setFilter($filter) + ->setInterval($interval) + ->setView($view); + try { + $gapicClient->listTimeSeries($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createMetricDescriptorAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $type = 'type3575610'; + $unit = 'unit3594628'; + $description = 'description-1724546052'; + $displayName = 'displayName1615086568'; + $expectedResponse = new MetricDescriptor(); + $expectedResponse->setName($name2); + $expectedResponse->setType($type); + $expectedResponse->setUnit($unit); + $expectedResponse->setDescription($description); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $name = 'name3373707'; + $metricDescriptor = new MetricDescriptor(); + $request = (new CreateMetricDescriptorRequest()) + ->setName($name) + ->setMetricDescriptor($metricDescriptor); + $response = $gapicClient->createMetricDescriptorAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.MetricService/CreateMetricDescriptor', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $actualValue = $actualRequestObject->getMetricDescriptor(); + $this->assertProtobufEquals($metricDescriptor, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/Monitoring/v3/tests/Unit/V3/Client/NotificationChannelServiceClientTest.php b/owl-bot-staging/Monitoring/v3/tests/Unit/V3/Client/NotificationChannelServiceClientTest.php new file mode 100644 index 000000000000..7a0e8fd53b02 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/tests/Unit/V3/Client/NotificationChannelServiceClientTest.php @@ -0,0 +1,809 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return NotificationChannelServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new NotificationChannelServiceClient($options); + } + + /** @test */ + public function createNotificationChannelTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $type = 'type3575610'; + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $expectedResponse = new NotificationChannel(); + $expectedResponse->setType($type); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $name = 'name3373707'; + $notificationChannel = new NotificationChannel(); + $request = (new CreateNotificationChannelRequest()) + ->setName($name) + ->setNotificationChannel($notificationChannel); + $response = $gapicClient->createNotificationChannel($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.NotificationChannelService/CreateNotificationChannel', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $actualValue = $actualRequestObject->getNotificationChannel(); + $this->assertProtobufEquals($notificationChannel, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createNotificationChannelExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $name = 'name3373707'; + $notificationChannel = new NotificationChannel(); + $request = (new CreateNotificationChannelRequest()) + ->setName($name) + ->setNotificationChannel($notificationChannel); + try { + $gapicClient->createNotificationChannel($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteNotificationChannelTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->notificationChannelName('[PROJECT]', '[NOTIFICATION_CHANNEL]'); + $request = (new DeleteNotificationChannelRequest()) + ->setName($formattedName); + $gapicClient->deleteNotificationChannel($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.NotificationChannelService/DeleteNotificationChannel', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteNotificationChannelExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->notificationChannelName('[PROJECT]', '[NOTIFICATION_CHANNEL]'); + $request = (new DeleteNotificationChannelRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteNotificationChannel($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getNotificationChannelTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $type = 'type3575610'; + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $expectedResponse = new NotificationChannel(); + $expectedResponse->setType($type); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->notificationChannelName('[PROJECT]', '[NOTIFICATION_CHANNEL]'); + $request = (new GetNotificationChannelRequest()) + ->setName($formattedName); + $response = $gapicClient->getNotificationChannel($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.NotificationChannelService/GetNotificationChannel', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getNotificationChannelExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->notificationChannelName('[PROJECT]', '[NOTIFICATION_CHANNEL]'); + $request = (new GetNotificationChannelRequest()) + ->setName($formattedName); + try { + $gapicClient->getNotificationChannel($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getNotificationChannelDescriptorTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $type = 'type3575610'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $expectedResponse = new NotificationChannelDescriptor(); + $expectedResponse->setName($name2); + $expectedResponse->setType($type); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->notificationChannelDescriptorName('[PROJECT]', '[CHANNEL_DESCRIPTOR]'); + $request = (new GetNotificationChannelDescriptorRequest()) + ->setName($formattedName); + $response = $gapicClient->getNotificationChannelDescriptor($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.NotificationChannelService/GetNotificationChannelDescriptor', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getNotificationChannelDescriptorExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->notificationChannelDescriptorName('[PROJECT]', '[CHANNEL_DESCRIPTOR]'); + $request = (new GetNotificationChannelDescriptorRequest()) + ->setName($formattedName); + try { + $gapicClient->getNotificationChannelDescriptor($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getNotificationChannelVerificationCodeTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $code = 'code3059181'; + $expectedResponse = new GetNotificationChannelVerificationCodeResponse(); + $expectedResponse->setCode($code); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->notificationChannelName('[PROJECT]', '[NOTIFICATION_CHANNEL]'); + $request = (new GetNotificationChannelVerificationCodeRequest()) + ->setName($formattedName); + $response = $gapicClient->getNotificationChannelVerificationCode($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.NotificationChannelService/GetNotificationChannelVerificationCode', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getNotificationChannelVerificationCodeExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->notificationChannelName('[PROJECT]', '[NOTIFICATION_CHANNEL]'); + $request = (new GetNotificationChannelVerificationCodeRequest()) + ->setName($formattedName); + try { + $gapicClient->getNotificationChannelVerificationCode($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listNotificationChannelDescriptorsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $channelDescriptorsElement = new NotificationChannelDescriptor(); + $channelDescriptors = [ + $channelDescriptorsElement, + ]; + $expectedResponse = new ListNotificationChannelDescriptorsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setChannelDescriptors($channelDescriptors); + $transport->addResponse($expectedResponse); + // Mock request + $name = 'name3373707'; + $request = (new ListNotificationChannelDescriptorsRequest()) + ->setName($name); + $response = $gapicClient->listNotificationChannelDescriptors($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getChannelDescriptors()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.NotificationChannelService/ListNotificationChannelDescriptors', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listNotificationChannelDescriptorsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $name = 'name3373707'; + $request = (new ListNotificationChannelDescriptorsRequest()) + ->setName($name); + try { + $gapicClient->listNotificationChannelDescriptors($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listNotificationChannelsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $totalSize = 705419236; + $notificationChannelsElement = new NotificationChannel(); + $notificationChannels = [ + $notificationChannelsElement, + ]; + $expectedResponse = new ListNotificationChannelsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTotalSize($totalSize); + $expectedResponse->setNotificationChannels($notificationChannels); + $transport->addResponse($expectedResponse); + // Mock request + $name = 'name3373707'; + $request = (new ListNotificationChannelsRequest()) + ->setName($name); + $response = $gapicClient->listNotificationChannels($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getNotificationChannels()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.NotificationChannelService/ListNotificationChannels', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listNotificationChannelsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $name = 'name3373707'; + $request = (new ListNotificationChannelsRequest()) + ->setName($name); + try { + $gapicClient->listNotificationChannels($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function sendNotificationChannelVerificationCodeTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->notificationChannelName('[PROJECT]', '[NOTIFICATION_CHANNEL]'); + $request = (new SendNotificationChannelVerificationCodeRequest()) + ->setName($formattedName); + $gapicClient->sendNotificationChannelVerificationCode($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.NotificationChannelService/SendNotificationChannelVerificationCode', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function sendNotificationChannelVerificationCodeExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->notificationChannelName('[PROJECT]', '[NOTIFICATION_CHANNEL]'); + $request = (new SendNotificationChannelVerificationCodeRequest()) + ->setName($formattedName); + try { + $gapicClient->sendNotificationChannelVerificationCode($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateNotificationChannelTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $type = 'type3575610'; + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $expectedResponse = new NotificationChannel(); + $expectedResponse->setType($type); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $notificationChannel = new NotificationChannel(); + $request = (new UpdateNotificationChannelRequest()) + ->setNotificationChannel($notificationChannel); + $response = $gapicClient->updateNotificationChannel($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.NotificationChannelService/UpdateNotificationChannel', $actualFuncCall); + $actualValue = $actualRequestObject->getNotificationChannel(); + $this->assertProtobufEquals($notificationChannel, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateNotificationChannelExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $notificationChannel = new NotificationChannel(); + $request = (new UpdateNotificationChannelRequest()) + ->setNotificationChannel($notificationChannel); + try { + $gapicClient->updateNotificationChannel($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function verifyNotificationChannelTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $type = 'type3575610'; + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $expectedResponse = new NotificationChannel(); + $expectedResponse->setType($type); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->notificationChannelName('[PROJECT]', '[NOTIFICATION_CHANNEL]'); + $code = 'code3059181'; + $request = (new VerifyNotificationChannelRequest()) + ->setName($formattedName) + ->setCode($code); + $response = $gapicClient->verifyNotificationChannel($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.NotificationChannelService/VerifyNotificationChannel', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getCode(); + $this->assertProtobufEquals($code, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function verifyNotificationChannelExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->notificationChannelName('[PROJECT]', '[NOTIFICATION_CHANNEL]'); + $code = 'code3059181'; + $request = (new VerifyNotificationChannelRequest()) + ->setName($formattedName) + ->setCode($code); + try { + $gapicClient->verifyNotificationChannel($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createNotificationChannelAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $type = 'type3575610'; + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $expectedResponse = new NotificationChannel(); + $expectedResponse->setType($type); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $name = 'name3373707'; + $notificationChannel = new NotificationChannel(); + $request = (new CreateNotificationChannelRequest()) + ->setName($name) + ->setNotificationChannel($notificationChannel); + $response = $gapicClient->createNotificationChannelAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.NotificationChannelService/CreateNotificationChannel', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $actualValue = $actualRequestObject->getNotificationChannel(); + $this->assertProtobufEquals($notificationChannel, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/Monitoring/v3/tests/Unit/V3/Client/QueryServiceClientTest.php b/owl-bot-staging/Monitoring/v3/tests/Unit/V3/Client/QueryServiceClientTest.php new file mode 100644 index 000000000000..cd32140b2e9d --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/tests/Unit/V3/Client/QueryServiceClientTest.php @@ -0,0 +1,182 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return QueryServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new QueryServiceClient($options); + } + + /** @test */ + public function queryTimeSeriesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $timeSeriesDataElement = new TimeSeriesData(); + $timeSeriesData = [ + $timeSeriesDataElement, + ]; + $expectedResponse = new QueryTimeSeriesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTimeSeriesData($timeSeriesData); + $transport->addResponse($expectedResponse); + // Mock request + $name = 'name3373707'; + $query = 'query107944136'; + $request = (new QueryTimeSeriesRequest()) + ->setName($name) + ->setQuery($query); + $response = $gapicClient->queryTimeSeries($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getTimeSeriesData()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.QueryService/QueryTimeSeries', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $actualValue = $actualRequestObject->getQuery(); + $this->assertProtobufEquals($query, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function queryTimeSeriesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $name = 'name3373707'; + $query = 'query107944136'; + $request = (new QueryTimeSeriesRequest()) + ->setName($name) + ->setQuery($query); + try { + $gapicClient->queryTimeSeries($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function queryTimeSeriesAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $timeSeriesDataElement = new TimeSeriesData(); + $timeSeriesData = [ + $timeSeriesDataElement, + ]; + $expectedResponse = new QueryTimeSeriesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTimeSeriesData($timeSeriesData); + $transport->addResponse($expectedResponse); + // Mock request + $name = 'name3373707'; + $query = 'query107944136'; + $request = (new QueryTimeSeriesRequest()) + ->setName($name) + ->setQuery($query); + $response = $gapicClient->queryTimeSeriesAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getTimeSeriesData()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.QueryService/QueryTimeSeries', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $actualValue = $actualRequestObject->getQuery(); + $this->assertProtobufEquals($query, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/Monitoring/v3/tests/Unit/V3/Client/ServiceMonitoringServiceClientTest.php b/owl-bot-staging/Monitoring/v3/tests/Unit/V3/Client/ServiceMonitoringServiceClientTest.php new file mode 100644 index 000000000000..d679066683c4 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/tests/Unit/V3/Client/ServiceMonitoringServiceClientTest.php @@ -0,0 +1,790 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return ServiceMonitoringServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new ServiceMonitoringServiceClient($options); + } + + /** @test */ + public function createServiceTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Service(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $parent = 'parent-995424086'; + $service = new Service(); + $request = (new CreateServiceRequest()) + ->setParent($parent) + ->setService($service); + $response = $gapicClient->createService($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.ServiceMonitoringService/CreateService', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($parent, $actualValue); + $actualValue = $actualRequestObject->getService(); + $this->assertProtobufEquals($service, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createServiceExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $parent = 'parent-995424086'; + $service = new Service(); + $request = (new CreateServiceRequest()) + ->setParent($parent) + ->setService($service); + try { + $gapicClient->createService($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createServiceLevelObjectiveTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $goal = 317825.0; + $expectedResponse = new ServiceLevelObjective(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setGoal($goal); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->serviceName('[PROJECT]', '[SERVICE]'); + $serviceLevelObjective = new ServiceLevelObjective(); + $request = (new CreateServiceLevelObjectiveRequest()) + ->setParent($formattedParent) + ->setServiceLevelObjective($serviceLevelObjective); + $response = $gapicClient->createServiceLevelObjective($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.ServiceMonitoringService/CreateServiceLevelObjective', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getServiceLevelObjective(); + $this->assertProtobufEquals($serviceLevelObjective, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createServiceLevelObjectiveExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->serviceName('[PROJECT]', '[SERVICE]'); + $serviceLevelObjective = new ServiceLevelObjective(); + $request = (new CreateServiceLevelObjectiveRequest()) + ->setParent($formattedParent) + ->setServiceLevelObjective($serviceLevelObjective); + try { + $gapicClient->createServiceLevelObjective($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteServiceTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->serviceName('[PROJECT]', '[SERVICE]'); + $request = (new DeleteServiceRequest()) + ->setName($formattedName); + $gapicClient->deleteService($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.ServiceMonitoringService/DeleteService', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteServiceExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->serviceName('[PROJECT]', '[SERVICE]'); + $request = (new DeleteServiceRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteService($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteServiceLevelObjectiveTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->serviceLevelObjectiveName('[PROJECT]', '[SERVICE]', '[SERVICE_LEVEL_OBJECTIVE]'); + $request = (new DeleteServiceLevelObjectiveRequest()) + ->setName($formattedName); + $gapicClient->deleteServiceLevelObjective($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.ServiceMonitoringService/DeleteServiceLevelObjective', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteServiceLevelObjectiveExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->serviceLevelObjectiveName('[PROJECT]', '[SERVICE]', '[SERVICE_LEVEL_OBJECTIVE]'); + $request = (new DeleteServiceLevelObjectiveRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteServiceLevelObjective($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getServiceTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Service(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->serviceName('[PROJECT]', '[SERVICE]'); + $request = (new GetServiceRequest()) + ->setName($formattedName); + $response = $gapicClient->getService($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.ServiceMonitoringService/GetService', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getServiceExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->serviceName('[PROJECT]', '[SERVICE]'); + $request = (new GetServiceRequest()) + ->setName($formattedName); + try { + $gapicClient->getService($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getServiceLevelObjectiveTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $goal = 317825.0; + $expectedResponse = new ServiceLevelObjective(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setGoal($goal); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->serviceLevelObjectiveName('[PROJECT]', '[SERVICE]', '[SERVICE_LEVEL_OBJECTIVE]'); + $request = (new GetServiceLevelObjectiveRequest()) + ->setName($formattedName); + $response = $gapicClient->getServiceLevelObjective($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.ServiceMonitoringService/GetServiceLevelObjective', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getServiceLevelObjectiveExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->serviceLevelObjectiveName('[PROJECT]', '[SERVICE]', '[SERVICE_LEVEL_OBJECTIVE]'); + $request = (new GetServiceLevelObjectiveRequest()) + ->setName($formattedName); + try { + $gapicClient->getServiceLevelObjective($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listServiceLevelObjectivesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $serviceLevelObjectivesElement = new ServiceLevelObjective(); + $serviceLevelObjectives = [ + $serviceLevelObjectivesElement, + ]; + $expectedResponse = new ListServiceLevelObjectivesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setServiceLevelObjectives($serviceLevelObjectives); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->serviceName('[PROJECT]', '[SERVICE]'); + $request = (new ListServiceLevelObjectivesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listServiceLevelObjectives($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getServiceLevelObjectives()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.ServiceMonitoringService/ListServiceLevelObjectives', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listServiceLevelObjectivesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->serviceName('[PROJECT]', '[SERVICE]'); + $request = (new ListServiceLevelObjectivesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listServiceLevelObjectives($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listServicesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $servicesElement = new Service(); + $services = [ + $servicesElement, + ]; + $expectedResponse = new ListServicesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setServices($services); + $transport->addResponse($expectedResponse); + // Mock request + $parent = 'parent-995424086'; + $request = (new ListServicesRequest()) + ->setParent($parent); + $response = $gapicClient->listServices($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getServices()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.ServiceMonitoringService/ListServices', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($parent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listServicesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $parent = 'parent-995424086'; + $request = (new ListServicesRequest()) + ->setParent($parent); + try { + $gapicClient->listServices($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateServiceTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Service(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $service = new Service(); + $request = (new UpdateServiceRequest()) + ->setService($service); + $response = $gapicClient->updateService($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.ServiceMonitoringService/UpdateService', $actualFuncCall); + $actualValue = $actualRequestObject->getService(); + $this->assertProtobufEquals($service, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateServiceExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $service = new Service(); + $request = (new UpdateServiceRequest()) + ->setService($service); + try { + $gapicClient->updateService($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateServiceLevelObjectiveTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $goal = 317825.0; + $expectedResponse = new ServiceLevelObjective(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setGoal($goal); + $transport->addResponse($expectedResponse); + // Mock request + $serviceLevelObjective = new ServiceLevelObjective(); + $request = (new UpdateServiceLevelObjectiveRequest()) + ->setServiceLevelObjective($serviceLevelObjective); + $response = $gapicClient->updateServiceLevelObjective($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.ServiceMonitoringService/UpdateServiceLevelObjective', $actualFuncCall); + $actualValue = $actualRequestObject->getServiceLevelObjective(); + $this->assertProtobufEquals($serviceLevelObjective, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateServiceLevelObjectiveExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $serviceLevelObjective = new ServiceLevelObjective(); + $request = (new UpdateServiceLevelObjectiveRequest()) + ->setServiceLevelObjective($serviceLevelObjective); + try { + $gapicClient->updateServiceLevelObjective($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createServiceAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Service(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $parent = 'parent-995424086'; + $service = new Service(); + $request = (new CreateServiceRequest()) + ->setParent($parent) + ->setService($service); + $response = $gapicClient->createServiceAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.ServiceMonitoringService/CreateService', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($parent, $actualValue); + $actualValue = $actualRequestObject->getService(); + $this->assertProtobufEquals($service, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/Monitoring/v3/tests/Unit/V3/Client/SnoozeServiceClientTest.php b/owl-bot-staging/Monitoring/v3/tests/Unit/V3/Client/SnoozeServiceClientTest.php new file mode 100644 index 000000000000..f46286b29e35 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/tests/Unit/V3/Client/SnoozeServiceClientTest.php @@ -0,0 +1,416 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return SnoozeServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new SnoozeServiceClient($options); + } + + /** @test */ + public function createSnoozeTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Snooze(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->workspaceName('[PROJECT]'); + $snooze = new Snooze(); + $snoozeCriteria = new Criteria(); + $snooze->setCriteria($snoozeCriteria); + $snoozeInterval = new TimeInterval(); + $snooze->setInterval($snoozeInterval); + $snoozeDisplayName = 'snoozeDisplayName-1956223833'; + $snooze->setDisplayName($snoozeDisplayName); + $request = (new CreateSnoozeRequest()) + ->setParent($formattedParent) + ->setSnooze($snooze); + $response = $gapicClient->createSnooze($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.SnoozeService/CreateSnooze', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getSnooze(); + $this->assertProtobufEquals($snooze, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createSnoozeExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->workspaceName('[PROJECT]'); + $snooze = new Snooze(); + $snoozeCriteria = new Criteria(); + $snooze->setCriteria($snoozeCriteria); + $snoozeInterval = new TimeInterval(); + $snooze->setInterval($snoozeInterval); + $snoozeDisplayName = 'snoozeDisplayName-1956223833'; + $snooze->setDisplayName($snoozeDisplayName); + $request = (new CreateSnoozeRequest()) + ->setParent($formattedParent) + ->setSnooze($snooze); + try { + $gapicClient->createSnooze($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getSnoozeTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Snooze(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->snoozeName('[PROJECT]', '[SNOOZE]'); + $request = (new GetSnoozeRequest()) + ->setName($formattedName); + $response = $gapicClient->getSnooze($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.SnoozeService/GetSnooze', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getSnoozeExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->snoozeName('[PROJECT]', '[SNOOZE]'); + $request = (new GetSnoozeRequest()) + ->setName($formattedName); + try { + $gapicClient->getSnooze($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listSnoozesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $snoozesElement = new Snooze(); + $snoozes = [ + $snoozesElement, + ]; + $expectedResponse = new ListSnoozesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setSnoozes($snoozes); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->workspaceName('[PROJECT]'); + $request = (new ListSnoozesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listSnoozes($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getSnoozes()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.SnoozeService/ListSnoozes', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listSnoozesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->workspaceName('[PROJECT]'); + $request = (new ListSnoozesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listSnoozes($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateSnoozeTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Snooze(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $snooze = new Snooze(); + $snoozeCriteria = new Criteria(); + $snooze->setCriteria($snoozeCriteria); + $snoozeInterval = new TimeInterval(); + $snooze->setInterval($snoozeInterval); + $snoozeDisplayName = 'snoozeDisplayName-1956223833'; + $snooze->setDisplayName($snoozeDisplayName); + $updateMask = new FieldMask(); + $request = (new UpdateSnoozeRequest()) + ->setSnooze($snooze) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateSnooze($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.SnoozeService/UpdateSnooze', $actualFuncCall); + $actualValue = $actualRequestObject->getSnooze(); + $this->assertProtobufEquals($snooze, $actualValue); + $actualValue = $actualRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateSnoozeExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $snooze = new Snooze(); + $snoozeCriteria = new Criteria(); + $snooze->setCriteria($snoozeCriteria); + $snoozeInterval = new TimeInterval(); + $snooze->setInterval($snoozeInterval); + $snoozeDisplayName = 'snoozeDisplayName-1956223833'; + $snooze->setDisplayName($snoozeDisplayName); + $updateMask = new FieldMask(); + $request = (new UpdateSnoozeRequest()) + ->setSnooze($snooze) + ->setUpdateMask($updateMask); + try { + $gapicClient->updateSnooze($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createSnoozeAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Snooze(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->workspaceName('[PROJECT]'); + $snooze = new Snooze(); + $snoozeCriteria = new Criteria(); + $snooze->setCriteria($snoozeCriteria); + $snoozeInterval = new TimeInterval(); + $snooze->setInterval($snoozeInterval); + $snoozeDisplayName = 'snoozeDisplayName-1956223833'; + $snooze->setDisplayName($snoozeDisplayName); + $request = (new CreateSnoozeRequest()) + ->setParent($formattedParent) + ->setSnooze($snooze); + $response = $gapicClient->createSnoozeAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.SnoozeService/CreateSnooze', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getSnooze(); + $this->assertProtobufEquals($snooze, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/Monitoring/v3/tests/Unit/V3/Client/UptimeCheckServiceClientTest.php b/owl-bot-staging/Monitoring/v3/tests/Unit/V3/Client/UptimeCheckServiceClientTest.php new file mode 100644 index 000000000000..8b1fc5ae6539 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/tests/Unit/V3/Client/UptimeCheckServiceClientTest.php @@ -0,0 +1,517 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return UptimeCheckServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new UptimeCheckServiceClient($options); + } + + /** @test */ + public function createUptimeCheckConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $isInternal = true; + $expectedResponse = new UptimeCheckConfig(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setIsInternal($isInternal); + $transport->addResponse($expectedResponse); + // Mock request + $parent = 'parent-995424086'; + $uptimeCheckConfig = new UptimeCheckConfig(); + $request = (new CreateUptimeCheckConfigRequest()) + ->setParent($parent) + ->setUptimeCheckConfig($uptimeCheckConfig); + $response = $gapicClient->createUptimeCheckConfig($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.UptimeCheckService/CreateUptimeCheckConfig', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($parent, $actualValue); + $actualValue = $actualRequestObject->getUptimeCheckConfig(); + $this->assertProtobufEquals($uptimeCheckConfig, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createUptimeCheckConfigExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $parent = 'parent-995424086'; + $uptimeCheckConfig = new UptimeCheckConfig(); + $request = (new CreateUptimeCheckConfigRequest()) + ->setParent($parent) + ->setUptimeCheckConfig($uptimeCheckConfig); + try { + $gapicClient->createUptimeCheckConfig($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteUptimeCheckConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->uptimeCheckConfigName('[PROJECT]', '[UPTIME_CHECK_CONFIG]'); + $request = (new DeleteUptimeCheckConfigRequest()) + ->setName($formattedName); + $gapicClient->deleteUptimeCheckConfig($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.UptimeCheckService/DeleteUptimeCheckConfig', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteUptimeCheckConfigExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->uptimeCheckConfigName('[PROJECT]', '[UPTIME_CHECK_CONFIG]'); + $request = (new DeleteUptimeCheckConfigRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteUptimeCheckConfig($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getUptimeCheckConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $isInternal = true; + $expectedResponse = new UptimeCheckConfig(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setIsInternal($isInternal); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->uptimeCheckConfigName('[PROJECT]', '[UPTIME_CHECK_CONFIG]'); + $request = (new GetUptimeCheckConfigRequest()) + ->setName($formattedName); + $response = $gapicClient->getUptimeCheckConfig($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.UptimeCheckService/GetUptimeCheckConfig', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getUptimeCheckConfigExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->uptimeCheckConfigName('[PROJECT]', '[UPTIME_CHECK_CONFIG]'); + $request = (new GetUptimeCheckConfigRequest()) + ->setName($formattedName); + try { + $gapicClient->getUptimeCheckConfig($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listUptimeCheckConfigsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $totalSize = 705419236; + $uptimeCheckConfigsElement = new UptimeCheckConfig(); + $uptimeCheckConfigs = [ + $uptimeCheckConfigsElement, + ]; + $expectedResponse = new ListUptimeCheckConfigsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTotalSize($totalSize); + $expectedResponse->setUptimeCheckConfigs($uptimeCheckConfigs); + $transport->addResponse($expectedResponse); + // Mock request + $parent = 'parent-995424086'; + $request = (new ListUptimeCheckConfigsRequest()) + ->setParent($parent); + $response = $gapicClient->listUptimeCheckConfigs($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getUptimeCheckConfigs()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.UptimeCheckService/ListUptimeCheckConfigs', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($parent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listUptimeCheckConfigsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $parent = 'parent-995424086'; + $request = (new ListUptimeCheckConfigsRequest()) + ->setParent($parent); + try { + $gapicClient->listUptimeCheckConfigs($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listUptimeCheckIpsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $uptimeCheckIpsElement = new UptimeCheckIp(); + $uptimeCheckIps = [ + $uptimeCheckIpsElement, + ]; + $expectedResponse = new ListUptimeCheckIpsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setUptimeCheckIps($uptimeCheckIps); + $transport->addResponse($expectedResponse); + $request = new ListUptimeCheckIpsRequest(); + $response = $gapicClient->listUptimeCheckIps($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getUptimeCheckIps()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.UptimeCheckService/ListUptimeCheckIps', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listUptimeCheckIpsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new ListUptimeCheckIpsRequest(); + try { + $gapicClient->listUptimeCheckIps($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateUptimeCheckConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $isInternal = true; + $expectedResponse = new UptimeCheckConfig(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setIsInternal($isInternal); + $transport->addResponse($expectedResponse); + // Mock request + $uptimeCheckConfig = new UptimeCheckConfig(); + $request = (new UpdateUptimeCheckConfigRequest()) + ->setUptimeCheckConfig($uptimeCheckConfig); + $response = $gapicClient->updateUptimeCheckConfig($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.UptimeCheckService/UpdateUptimeCheckConfig', $actualFuncCall); + $actualValue = $actualRequestObject->getUptimeCheckConfig(); + $this->assertProtobufEquals($uptimeCheckConfig, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateUptimeCheckConfigExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $uptimeCheckConfig = new UptimeCheckConfig(); + $request = (new UpdateUptimeCheckConfigRequest()) + ->setUptimeCheckConfig($uptimeCheckConfig); + try { + $gapicClient->updateUptimeCheckConfig($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createUptimeCheckConfigAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $isInternal = true; + $expectedResponse = new UptimeCheckConfig(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setIsInternal($isInternal); + $transport->addResponse($expectedResponse); + // Mock request + $parent = 'parent-995424086'; + $uptimeCheckConfig = new UptimeCheckConfig(); + $request = (new CreateUptimeCheckConfigRequest()) + ->setParent($parent) + ->setUptimeCheckConfig($uptimeCheckConfig); + $response = $gapicClient->createUptimeCheckConfigAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.UptimeCheckService/CreateUptimeCheckConfig', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($parent, $actualValue); + $actualValue = $actualRequestObject->getUptimeCheckConfig(); + $this->assertProtobufEquals($uptimeCheckConfig, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/Monitoring/v3/tests/Unit/V3/GroupServiceClientTest.php b/owl-bot-staging/Monitoring/v3/tests/Unit/V3/GroupServiceClientTest.php new file mode 100644 index 000000000000..6ac70404aed4 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/tests/Unit/V3/GroupServiceClientTest.php @@ -0,0 +1,468 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return GroupServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new GroupServiceClient($options); + } + + /** @test */ + public function createGroupTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $parentName = 'parentName1015022848'; + $filter = 'filter-1274492040'; + $isCluster = false; + $expectedResponse = new Group(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setParentName($parentName); + $expectedResponse->setFilter($filter); + $expectedResponse->setIsCluster($isCluster); + $transport->addResponse($expectedResponse); + // Mock request + $name = 'name3373707'; + $group = new Group(); + $response = $gapicClient->createGroup($name, $group); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.GroupService/CreateGroup', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $actualValue = $actualRequestObject->getGroup(); + $this->assertProtobufEquals($group, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createGroupExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $name = 'name3373707'; + $group = new Group(); + try { + $gapicClient->createGroup($name, $group); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteGroupTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->groupName('[PROJECT]', '[GROUP]'); + $gapicClient->deleteGroup($formattedName); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.GroupService/DeleteGroup', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteGroupExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->groupName('[PROJECT]', '[GROUP]'); + try { + $gapicClient->deleteGroup($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getGroupTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $parentName = 'parentName1015022848'; + $filter = 'filter-1274492040'; + $isCluster = false; + $expectedResponse = new Group(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setParentName($parentName); + $expectedResponse->setFilter($filter); + $expectedResponse->setIsCluster($isCluster); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->groupName('[PROJECT]', '[GROUP]'); + $response = $gapicClient->getGroup($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.GroupService/GetGroup', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getGroupExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->groupName('[PROJECT]', '[GROUP]'); + try { + $gapicClient->getGroup($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listGroupMembersTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $totalSize = 705419236; + $membersElement = new MonitoredResource(); + $members = [ + $membersElement, + ]; + $expectedResponse = new ListGroupMembersResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTotalSize($totalSize); + $expectedResponse->setMembers($members); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->groupName('[PROJECT]', '[GROUP]'); + $response = $gapicClient->listGroupMembers($formattedName); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getMembers()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.GroupService/ListGroupMembers', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listGroupMembersExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->groupName('[PROJECT]', '[GROUP]'); + try { + $gapicClient->listGroupMembers($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listGroupsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $groupElement = new Group(); + $group = [ + $groupElement, + ]; + $expectedResponse = new ListGroupsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setGroup($group); + $transport->addResponse($expectedResponse); + // Mock request + $name = 'name3373707'; + $response = $gapicClient->listGroups($name); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getGroup()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.GroupService/ListGroups', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listGroupsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $name = 'name3373707'; + try { + $gapicClient->listGroups($name); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateGroupTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $parentName = 'parentName1015022848'; + $filter = 'filter-1274492040'; + $isCluster = false; + $expectedResponse = new Group(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setParentName($parentName); + $expectedResponse->setFilter($filter); + $expectedResponse->setIsCluster($isCluster); + $transport->addResponse($expectedResponse); + // Mock request + $group = new Group(); + $response = $gapicClient->updateGroup($group); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.GroupService/UpdateGroup', $actualFuncCall); + $actualValue = $actualRequestObject->getGroup(); + $this->assertProtobufEquals($group, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateGroupExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $group = new Group(); + try { + $gapicClient->updateGroup($group); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/Monitoring/v3/tests/Unit/V3/MetricServiceClientTest.php b/owl-bot-staging/Monitoring/v3/tests/Unit/V3/MetricServiceClientTest.php new file mode 100644 index 000000000000..443a3f9faf17 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/tests/Unit/V3/MetricServiceClientTest.php @@ -0,0 +1,672 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return MetricServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new MetricServiceClient($options); + } + + /** @test */ + public function createMetricDescriptorTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $type = 'type3575610'; + $unit = 'unit3594628'; + $description = 'description-1724546052'; + $displayName = 'displayName1615086568'; + $expectedResponse = new MetricDescriptor(); + $expectedResponse->setName($name2); + $expectedResponse->setType($type); + $expectedResponse->setUnit($unit); + $expectedResponse->setDescription($description); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $name = 'name3373707'; + $metricDescriptor = new MetricDescriptor(); + $response = $gapicClient->createMetricDescriptor($name, $metricDescriptor); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.MetricService/CreateMetricDescriptor', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $actualValue = $actualRequestObject->getMetricDescriptor(); + $this->assertProtobufEquals($metricDescriptor, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createMetricDescriptorExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $name = 'name3373707'; + $metricDescriptor = new MetricDescriptor(); + try { + $gapicClient->createMetricDescriptor($name, $metricDescriptor); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createServiceTimeSeriesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->projectName('[PROJECT]'); + $timeSeries = []; + $gapicClient->createServiceTimeSeries($formattedName, $timeSeries); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.MetricService/CreateServiceTimeSeries', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getTimeSeries(); + $this->assertProtobufEquals($timeSeries, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createServiceTimeSeriesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->projectName('[PROJECT]'); + $timeSeries = []; + try { + $gapicClient->createServiceTimeSeries($formattedName, $timeSeries); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createTimeSeriesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->projectName('[PROJECT]'); + $timeSeries = []; + $gapicClient->createTimeSeries($formattedName, $timeSeries); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.MetricService/CreateTimeSeries', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getTimeSeries(); + $this->assertProtobufEquals($timeSeries, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createTimeSeriesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->projectName('[PROJECT]'); + $timeSeries = []; + try { + $gapicClient->createTimeSeries($formattedName, $timeSeries); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteMetricDescriptorTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->metricDescriptorName('[PROJECT]', '[METRIC_DESCRIPTOR]'); + $gapicClient->deleteMetricDescriptor($formattedName); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.MetricService/DeleteMetricDescriptor', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteMetricDescriptorExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->metricDescriptorName('[PROJECT]', '[METRIC_DESCRIPTOR]'); + try { + $gapicClient->deleteMetricDescriptor($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getMetricDescriptorTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $type = 'type3575610'; + $unit = 'unit3594628'; + $description = 'description-1724546052'; + $displayName = 'displayName1615086568'; + $expectedResponse = new MetricDescriptor(); + $expectedResponse->setName($name2); + $expectedResponse->setType($type); + $expectedResponse->setUnit($unit); + $expectedResponse->setDescription($description); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->metricDescriptorName('[PROJECT]', '[METRIC_DESCRIPTOR]'); + $response = $gapicClient->getMetricDescriptor($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.MetricService/GetMetricDescriptor', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getMetricDescriptorExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->metricDescriptorName('[PROJECT]', '[METRIC_DESCRIPTOR]'); + try { + $gapicClient->getMetricDescriptor($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getMonitoredResourceDescriptorTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $type = 'type3575610'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $expectedResponse = new MonitoredResourceDescriptor(); + $expectedResponse->setName($name2); + $expectedResponse->setType($type); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->monitoredResourceDescriptorName('[PROJECT]', '[MONITORED_RESOURCE_DESCRIPTOR]'); + $response = $gapicClient->getMonitoredResourceDescriptor($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.MetricService/GetMonitoredResourceDescriptor', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getMonitoredResourceDescriptorExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->monitoredResourceDescriptorName('[PROJECT]', '[MONITORED_RESOURCE_DESCRIPTOR]'); + try { + $gapicClient->getMonitoredResourceDescriptor($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listMetricDescriptorsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $metricDescriptorsElement = new MetricDescriptor(); + $metricDescriptors = [ + $metricDescriptorsElement, + ]; + $expectedResponse = new ListMetricDescriptorsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setMetricDescriptors($metricDescriptors); + $transport->addResponse($expectedResponse); + // Mock request + $name = 'name3373707'; + $response = $gapicClient->listMetricDescriptors($name); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getMetricDescriptors()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.MetricService/ListMetricDescriptors', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listMetricDescriptorsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $name = 'name3373707'; + try { + $gapicClient->listMetricDescriptors($name); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listMonitoredResourceDescriptorsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $resourceDescriptorsElement = new MonitoredResourceDescriptor(); + $resourceDescriptors = [ + $resourceDescriptorsElement, + ]; + $expectedResponse = new ListMonitoredResourceDescriptorsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setResourceDescriptors($resourceDescriptors); + $transport->addResponse($expectedResponse); + // Mock request + $name = 'name3373707'; + $response = $gapicClient->listMonitoredResourceDescriptors($name); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getResourceDescriptors()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.MetricService/ListMonitoredResourceDescriptors', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listMonitoredResourceDescriptorsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $name = 'name3373707'; + try { + $gapicClient->listMonitoredResourceDescriptors($name); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listTimeSeriesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $unit = 'unit3594628'; + $timeSeriesElement = new TimeSeries(); + $timeSeries = [ + $timeSeriesElement, + ]; + $expectedResponse = new ListTimeSeriesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setUnit($unit); + $expectedResponse->setTimeSeries($timeSeries); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->workspaceName('[PROJECT]'); + $filter = 'filter-1274492040'; + $interval = new TimeInterval(); + $view = TimeSeriesView::FULL; + $response = $gapicClient->listTimeSeries($formattedName, $filter, $interval, $view); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getTimeSeries()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.MetricService/ListTimeSeries', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getFilter(); + $this->assertProtobufEquals($filter, $actualValue); + $actualValue = $actualRequestObject->getInterval(); + $this->assertProtobufEquals($interval, $actualValue); + $actualValue = $actualRequestObject->getView(); + $this->assertProtobufEquals($view, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listTimeSeriesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->workspaceName('[PROJECT]'); + $filter = 'filter-1274492040'; + $interval = new TimeInterval(); + $view = TimeSeriesView::FULL; + try { + $gapicClient->listTimeSeries($formattedName, $filter, $interval, $view); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/Monitoring/v3/tests/Unit/V3/NotificationChannelServiceClientTest.php b/owl-bot-staging/Monitoring/v3/tests/Unit/V3/NotificationChannelServiceClientTest.php new file mode 100644 index 000000000000..9b115e176970 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/tests/Unit/V3/NotificationChannelServiceClientTest.php @@ -0,0 +1,716 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return NotificationChannelServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new NotificationChannelServiceClient($options); + } + + /** @test */ + public function createNotificationChannelTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $type = 'type3575610'; + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $expectedResponse = new NotificationChannel(); + $expectedResponse->setType($type); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $name = 'name3373707'; + $notificationChannel = new NotificationChannel(); + $response = $gapicClient->createNotificationChannel($name, $notificationChannel); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.NotificationChannelService/CreateNotificationChannel', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $actualValue = $actualRequestObject->getNotificationChannel(); + $this->assertProtobufEquals($notificationChannel, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createNotificationChannelExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $name = 'name3373707'; + $notificationChannel = new NotificationChannel(); + try { + $gapicClient->createNotificationChannel($name, $notificationChannel); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteNotificationChannelTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->notificationChannelName('[PROJECT]', '[NOTIFICATION_CHANNEL]'); + $gapicClient->deleteNotificationChannel($formattedName); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.NotificationChannelService/DeleteNotificationChannel', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteNotificationChannelExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->notificationChannelName('[PROJECT]', '[NOTIFICATION_CHANNEL]'); + try { + $gapicClient->deleteNotificationChannel($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getNotificationChannelTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $type = 'type3575610'; + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $expectedResponse = new NotificationChannel(); + $expectedResponse->setType($type); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->notificationChannelName('[PROJECT]', '[NOTIFICATION_CHANNEL]'); + $response = $gapicClient->getNotificationChannel($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.NotificationChannelService/GetNotificationChannel', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getNotificationChannelExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->notificationChannelName('[PROJECT]', '[NOTIFICATION_CHANNEL]'); + try { + $gapicClient->getNotificationChannel($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getNotificationChannelDescriptorTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $type = 'type3575610'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $expectedResponse = new NotificationChannelDescriptor(); + $expectedResponse->setName($name2); + $expectedResponse->setType($type); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->notificationChannelDescriptorName('[PROJECT]', '[CHANNEL_DESCRIPTOR]'); + $response = $gapicClient->getNotificationChannelDescriptor($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.NotificationChannelService/GetNotificationChannelDescriptor', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getNotificationChannelDescriptorExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->notificationChannelDescriptorName('[PROJECT]', '[CHANNEL_DESCRIPTOR]'); + try { + $gapicClient->getNotificationChannelDescriptor($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getNotificationChannelVerificationCodeTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $code = 'code3059181'; + $expectedResponse = new GetNotificationChannelVerificationCodeResponse(); + $expectedResponse->setCode($code); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->notificationChannelName('[PROJECT]', '[NOTIFICATION_CHANNEL]'); + $response = $gapicClient->getNotificationChannelVerificationCode($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.NotificationChannelService/GetNotificationChannelVerificationCode', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getNotificationChannelVerificationCodeExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->notificationChannelName('[PROJECT]', '[NOTIFICATION_CHANNEL]'); + try { + $gapicClient->getNotificationChannelVerificationCode($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listNotificationChannelDescriptorsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $channelDescriptorsElement = new NotificationChannelDescriptor(); + $channelDescriptors = [ + $channelDescriptorsElement, + ]; + $expectedResponse = new ListNotificationChannelDescriptorsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setChannelDescriptors($channelDescriptors); + $transport->addResponse($expectedResponse); + // Mock request + $name = 'name3373707'; + $response = $gapicClient->listNotificationChannelDescriptors($name); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getChannelDescriptors()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.NotificationChannelService/ListNotificationChannelDescriptors', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listNotificationChannelDescriptorsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $name = 'name3373707'; + try { + $gapicClient->listNotificationChannelDescriptors($name); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listNotificationChannelsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $totalSize = 705419236; + $notificationChannelsElement = new NotificationChannel(); + $notificationChannels = [ + $notificationChannelsElement, + ]; + $expectedResponse = new ListNotificationChannelsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTotalSize($totalSize); + $expectedResponse->setNotificationChannels($notificationChannels); + $transport->addResponse($expectedResponse); + // Mock request + $name = 'name3373707'; + $response = $gapicClient->listNotificationChannels($name); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getNotificationChannels()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.NotificationChannelService/ListNotificationChannels', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listNotificationChannelsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $name = 'name3373707'; + try { + $gapicClient->listNotificationChannels($name); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function sendNotificationChannelVerificationCodeTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->notificationChannelName('[PROJECT]', '[NOTIFICATION_CHANNEL]'); + $gapicClient->sendNotificationChannelVerificationCode($formattedName); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.NotificationChannelService/SendNotificationChannelVerificationCode', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function sendNotificationChannelVerificationCodeExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->notificationChannelName('[PROJECT]', '[NOTIFICATION_CHANNEL]'); + try { + $gapicClient->sendNotificationChannelVerificationCode($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateNotificationChannelTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $type = 'type3575610'; + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $expectedResponse = new NotificationChannel(); + $expectedResponse->setType($type); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $notificationChannel = new NotificationChannel(); + $response = $gapicClient->updateNotificationChannel($notificationChannel); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.NotificationChannelService/UpdateNotificationChannel', $actualFuncCall); + $actualValue = $actualRequestObject->getNotificationChannel(); + $this->assertProtobufEquals($notificationChannel, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateNotificationChannelExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $notificationChannel = new NotificationChannel(); + try { + $gapicClient->updateNotificationChannel($notificationChannel); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function verifyNotificationChannelTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $type = 'type3575610'; + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $expectedResponse = new NotificationChannel(); + $expectedResponse->setType($type); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->notificationChannelName('[PROJECT]', '[NOTIFICATION_CHANNEL]'); + $code = 'code3059181'; + $response = $gapicClient->verifyNotificationChannel($formattedName, $code); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.NotificationChannelService/VerifyNotificationChannel', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getCode(); + $this->assertProtobufEquals($code, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function verifyNotificationChannelExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->notificationChannelName('[PROJECT]', '[NOTIFICATION_CHANNEL]'); + $code = 'code3059181'; + try { + $gapicClient->verifyNotificationChannel($formattedName, $code); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/Monitoring/v3/tests/Unit/V3/QueryServiceClientTest.php b/owl-bot-staging/Monitoring/v3/tests/Unit/V3/QueryServiceClientTest.php new file mode 100644 index 000000000000..c64caa89013d --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/tests/Unit/V3/QueryServiceClientTest.php @@ -0,0 +1,134 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return QueryServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new QueryServiceClient($options); + } + + /** @test */ + public function queryTimeSeriesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $timeSeriesDataElement = new TimeSeriesData(); + $timeSeriesData = [ + $timeSeriesDataElement, + ]; + $expectedResponse = new QueryTimeSeriesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTimeSeriesData($timeSeriesData); + $transport->addResponse($expectedResponse); + // Mock request + $name = 'name3373707'; + $query = 'query107944136'; + $response = $gapicClient->queryTimeSeries($name, $query); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getTimeSeriesData()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.QueryService/QueryTimeSeries', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $actualValue = $actualRequestObject->getQuery(); + $this->assertProtobufEquals($query, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function queryTimeSeriesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $name = 'name3373707'; + $query = 'query107944136'; + try { + $gapicClient->queryTimeSeries($name, $query); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/Monitoring/v3/tests/Unit/V3/ServiceMonitoringServiceClientTest.php b/owl-bot-staging/Monitoring/v3/tests/Unit/V3/ServiceMonitoringServiceClientTest.php new file mode 100644 index 000000000000..7651f7245bce --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/tests/Unit/V3/ServiceMonitoringServiceClientTest.php @@ -0,0 +1,701 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return ServiceMonitoringServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new ServiceMonitoringServiceClient($options); + } + + /** @test */ + public function createServiceTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Service(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $parent = 'parent-995424086'; + $service = new Service(); + $response = $gapicClient->createService($parent, $service); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.ServiceMonitoringService/CreateService', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($parent, $actualValue); + $actualValue = $actualRequestObject->getService(); + $this->assertProtobufEquals($service, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createServiceExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $parent = 'parent-995424086'; + $service = new Service(); + try { + $gapicClient->createService($parent, $service); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createServiceLevelObjectiveTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $goal = 317825.0; + $expectedResponse = new ServiceLevelObjective(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setGoal($goal); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->serviceName('[PROJECT]', '[SERVICE]'); + $serviceLevelObjective = new ServiceLevelObjective(); + $response = $gapicClient->createServiceLevelObjective($formattedParent, $serviceLevelObjective); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.ServiceMonitoringService/CreateServiceLevelObjective', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getServiceLevelObjective(); + $this->assertProtobufEquals($serviceLevelObjective, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createServiceLevelObjectiveExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->serviceName('[PROJECT]', '[SERVICE]'); + $serviceLevelObjective = new ServiceLevelObjective(); + try { + $gapicClient->createServiceLevelObjective($formattedParent, $serviceLevelObjective); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteServiceTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->serviceName('[PROJECT]', '[SERVICE]'); + $gapicClient->deleteService($formattedName); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.ServiceMonitoringService/DeleteService', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteServiceExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->serviceName('[PROJECT]', '[SERVICE]'); + try { + $gapicClient->deleteService($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteServiceLevelObjectiveTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->serviceLevelObjectiveName('[PROJECT]', '[SERVICE]', '[SERVICE_LEVEL_OBJECTIVE]'); + $gapicClient->deleteServiceLevelObjective($formattedName); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.ServiceMonitoringService/DeleteServiceLevelObjective', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteServiceLevelObjectiveExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->serviceLevelObjectiveName('[PROJECT]', '[SERVICE]', '[SERVICE_LEVEL_OBJECTIVE]'); + try { + $gapicClient->deleteServiceLevelObjective($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getServiceTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Service(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->serviceName('[PROJECT]', '[SERVICE]'); + $response = $gapicClient->getService($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.ServiceMonitoringService/GetService', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getServiceExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->serviceName('[PROJECT]', '[SERVICE]'); + try { + $gapicClient->getService($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getServiceLevelObjectiveTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $goal = 317825.0; + $expectedResponse = new ServiceLevelObjective(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setGoal($goal); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->serviceLevelObjectiveName('[PROJECT]', '[SERVICE]', '[SERVICE_LEVEL_OBJECTIVE]'); + $response = $gapicClient->getServiceLevelObjective($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.ServiceMonitoringService/GetServiceLevelObjective', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getServiceLevelObjectiveExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->serviceLevelObjectiveName('[PROJECT]', '[SERVICE]', '[SERVICE_LEVEL_OBJECTIVE]'); + try { + $gapicClient->getServiceLevelObjective($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listServiceLevelObjectivesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $serviceLevelObjectivesElement = new ServiceLevelObjective(); + $serviceLevelObjectives = [ + $serviceLevelObjectivesElement, + ]; + $expectedResponse = new ListServiceLevelObjectivesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setServiceLevelObjectives($serviceLevelObjectives); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->serviceName('[PROJECT]', '[SERVICE]'); + $response = $gapicClient->listServiceLevelObjectives($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getServiceLevelObjectives()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.ServiceMonitoringService/ListServiceLevelObjectives', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listServiceLevelObjectivesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->serviceName('[PROJECT]', '[SERVICE]'); + try { + $gapicClient->listServiceLevelObjectives($formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listServicesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $servicesElement = new Service(); + $services = [ + $servicesElement, + ]; + $expectedResponse = new ListServicesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setServices($services); + $transport->addResponse($expectedResponse); + // Mock request + $parent = 'parent-995424086'; + $response = $gapicClient->listServices($parent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getServices()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.ServiceMonitoringService/ListServices', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($parent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listServicesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $parent = 'parent-995424086'; + try { + $gapicClient->listServices($parent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateServiceTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Service(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $service = new Service(); + $response = $gapicClient->updateService($service); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.ServiceMonitoringService/UpdateService', $actualFuncCall); + $actualValue = $actualRequestObject->getService(); + $this->assertProtobufEquals($service, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateServiceExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $service = new Service(); + try { + $gapicClient->updateService($service); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateServiceLevelObjectiveTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $goal = 317825.0; + $expectedResponse = new ServiceLevelObjective(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setGoal($goal); + $transport->addResponse($expectedResponse); + // Mock request + $serviceLevelObjective = new ServiceLevelObjective(); + $response = $gapicClient->updateServiceLevelObjective($serviceLevelObjective); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.ServiceMonitoringService/UpdateServiceLevelObjective', $actualFuncCall); + $actualValue = $actualRequestObject->getServiceLevelObjective(); + $this->assertProtobufEquals($serviceLevelObjective, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateServiceLevelObjectiveExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $serviceLevelObjective = new ServiceLevelObjective(); + try { + $gapicClient->updateServiceLevelObjective($serviceLevelObjective); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/Monitoring/v3/tests/Unit/V3/SnoozeServiceClientTest.php b/owl-bot-staging/Monitoring/v3/tests/Unit/V3/SnoozeServiceClientTest.php new file mode 100644 index 000000000000..e446ff828d47 --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/tests/Unit/V3/SnoozeServiceClientTest.php @@ -0,0 +1,351 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return SnoozeServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new SnoozeServiceClient($options); + } + + /** @test */ + public function createSnoozeTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Snooze(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->workspaceName('[PROJECT]'); + $snooze = new Snooze(); + $snoozeCriteria = new Criteria(); + $snooze->setCriteria($snoozeCriteria); + $snoozeInterval = new TimeInterval(); + $snooze->setInterval($snoozeInterval); + $snoozeDisplayName = 'snoozeDisplayName-1956223833'; + $snooze->setDisplayName($snoozeDisplayName); + $response = $gapicClient->createSnooze($formattedParent, $snooze); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.SnoozeService/CreateSnooze', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getSnooze(); + $this->assertProtobufEquals($snooze, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createSnoozeExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->workspaceName('[PROJECT]'); + $snooze = new Snooze(); + $snoozeCriteria = new Criteria(); + $snooze->setCriteria($snoozeCriteria); + $snoozeInterval = new TimeInterval(); + $snooze->setInterval($snoozeInterval); + $snoozeDisplayName = 'snoozeDisplayName-1956223833'; + $snooze->setDisplayName($snoozeDisplayName); + try { + $gapicClient->createSnooze($formattedParent, $snooze); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getSnoozeTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Snooze(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->snoozeName('[PROJECT]', '[SNOOZE]'); + $response = $gapicClient->getSnooze($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.SnoozeService/GetSnooze', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getSnoozeExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->snoozeName('[PROJECT]', '[SNOOZE]'); + try { + $gapicClient->getSnooze($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listSnoozesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $snoozesElement = new Snooze(); + $snoozes = [ + $snoozesElement, + ]; + $expectedResponse = new ListSnoozesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setSnoozes($snoozes); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->workspaceName('[PROJECT]'); + $response = $gapicClient->listSnoozes($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getSnoozes()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.SnoozeService/ListSnoozes', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listSnoozesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->workspaceName('[PROJECT]'); + try { + $gapicClient->listSnoozes($formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateSnoozeTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Snooze(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $snooze = new Snooze(); + $snoozeCriteria = new Criteria(); + $snooze->setCriteria($snoozeCriteria); + $snoozeInterval = new TimeInterval(); + $snooze->setInterval($snoozeInterval); + $snoozeDisplayName = 'snoozeDisplayName-1956223833'; + $snooze->setDisplayName($snoozeDisplayName); + $updateMask = new FieldMask(); + $response = $gapicClient->updateSnooze($snooze, $updateMask); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.SnoozeService/UpdateSnooze', $actualFuncCall); + $actualValue = $actualRequestObject->getSnooze(); + $this->assertProtobufEquals($snooze, $actualValue); + $actualValue = $actualRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateSnoozeExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $snooze = new Snooze(); + $snoozeCriteria = new Criteria(); + $snooze->setCriteria($snoozeCriteria); + $snoozeInterval = new TimeInterval(); + $snooze->setInterval($snoozeInterval); + $snoozeDisplayName = 'snoozeDisplayName-1956223833'; + $snooze->setDisplayName($snoozeDisplayName); + $updateMask = new FieldMask(); + try { + $gapicClient->updateSnooze($snooze, $updateMask); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/Monitoring/v3/tests/Unit/V3/UptimeCheckServiceClientTest.php b/owl-bot-staging/Monitoring/v3/tests/Unit/V3/UptimeCheckServiceClientTest.php new file mode 100644 index 000000000000..40d14acd439f --- /dev/null +++ b/owl-bot-staging/Monitoring/v3/tests/Unit/V3/UptimeCheckServiceClientTest.php @@ -0,0 +1,450 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return UptimeCheckServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new UptimeCheckServiceClient($options); + } + + /** @test */ + public function createUptimeCheckConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $isInternal = true; + $expectedResponse = new UptimeCheckConfig(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setIsInternal($isInternal); + $transport->addResponse($expectedResponse); + // Mock request + $parent = 'parent-995424086'; + $uptimeCheckConfig = new UptimeCheckConfig(); + $response = $gapicClient->createUptimeCheckConfig($parent, $uptimeCheckConfig); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.UptimeCheckService/CreateUptimeCheckConfig', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($parent, $actualValue); + $actualValue = $actualRequestObject->getUptimeCheckConfig(); + $this->assertProtobufEquals($uptimeCheckConfig, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createUptimeCheckConfigExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $parent = 'parent-995424086'; + $uptimeCheckConfig = new UptimeCheckConfig(); + try { + $gapicClient->createUptimeCheckConfig($parent, $uptimeCheckConfig); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteUptimeCheckConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->uptimeCheckConfigName('[PROJECT]', '[UPTIME_CHECK_CONFIG]'); + $gapicClient->deleteUptimeCheckConfig($formattedName); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.UptimeCheckService/DeleteUptimeCheckConfig', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteUptimeCheckConfigExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->uptimeCheckConfigName('[PROJECT]', '[UPTIME_CHECK_CONFIG]'); + try { + $gapicClient->deleteUptimeCheckConfig($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getUptimeCheckConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $isInternal = true; + $expectedResponse = new UptimeCheckConfig(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setIsInternal($isInternal); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->uptimeCheckConfigName('[PROJECT]', '[UPTIME_CHECK_CONFIG]'); + $response = $gapicClient->getUptimeCheckConfig($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.UptimeCheckService/GetUptimeCheckConfig', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getUptimeCheckConfigExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->uptimeCheckConfigName('[PROJECT]', '[UPTIME_CHECK_CONFIG]'); + try { + $gapicClient->getUptimeCheckConfig($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listUptimeCheckConfigsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $totalSize = 705419236; + $uptimeCheckConfigsElement = new UptimeCheckConfig(); + $uptimeCheckConfigs = [ + $uptimeCheckConfigsElement, + ]; + $expectedResponse = new ListUptimeCheckConfigsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTotalSize($totalSize); + $expectedResponse->setUptimeCheckConfigs($uptimeCheckConfigs); + $transport->addResponse($expectedResponse); + // Mock request + $parent = 'parent-995424086'; + $response = $gapicClient->listUptimeCheckConfigs($parent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getUptimeCheckConfigs()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.UptimeCheckService/ListUptimeCheckConfigs', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($parent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listUptimeCheckConfigsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $parent = 'parent-995424086'; + try { + $gapicClient->listUptimeCheckConfigs($parent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listUptimeCheckIpsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $uptimeCheckIpsElement = new UptimeCheckIp(); + $uptimeCheckIps = [ + $uptimeCheckIpsElement, + ]; + $expectedResponse = new ListUptimeCheckIpsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setUptimeCheckIps($uptimeCheckIps); + $transport->addResponse($expectedResponse); + $response = $gapicClient->listUptimeCheckIps(); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getUptimeCheckIps()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.UptimeCheckService/ListUptimeCheckIps', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listUptimeCheckIpsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + try { + $gapicClient->listUptimeCheckIps(); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateUptimeCheckConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $isInternal = true; + $expectedResponse = new UptimeCheckConfig(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setIsInternal($isInternal); + $transport->addResponse($expectedResponse); + // Mock request + $uptimeCheckConfig = new UptimeCheckConfig(); + $response = $gapicClient->updateUptimeCheckConfig($uptimeCheckConfig); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.monitoring.v3.UptimeCheckService/UpdateUptimeCheckConfig', $actualFuncCall); + $actualValue = $actualRequestObject->getUptimeCheckConfig(); + $this->assertProtobufEquals($uptimeCheckConfig, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateUptimeCheckConfigExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $uptimeCheckConfig = new UptimeCheckConfig(); + try { + $gapicClient->updateUptimeCheckConfig($uptimeCheckConfig); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/NetApp/v1/proto/src/GPBMetadata/Google/Cloud/Netapp/V1/ActiveDirectory.php b/owl-bot-staging/NetApp/v1/proto/src/GPBMetadata/Google/Cloud/Netapp/V1/ActiveDirectory.php new file mode 100644 index 0000000000000000000000000000000000000000..bdc4c8460eec8625daac151cb7b8f2029d3a12c4 GIT binary patch literal 3025 zcmb_e-A)@v6s|FL%$R^#61pKtv!SVQsA_^ zEQo7#2ZlHy1`7ibIDuz$qh61Mh7+7I>XFbijM~1@+CMVtwdT=7Fy%oMI>a*iLD2U| z#qom3t@uP>#wzFQ73>IlPHdNk#1TO_FcmUFK0YIyVTTxv_V!aycd@{oh63sANRUoT zfpng&ZzAM)m~*45z-lQLdW8)5V^PM@b3}jHub5X*rPAuL0d)-dz=8q+q%8T z2gJZPq`|)Lkn&?A#+15`SO5fU8L3xo$qDe$Y5IbMKK42_!kv&Zcvl-#Evrw&kV$z` zewH&5rzJy@>>F248J;;a8_lsvrCERZj%#yPJ__0 zMz0!yTxEJdl0aVDYDkB=^(p43*S~RSdqg1(1U_Sz+o}+(eMJ+(tFAlbcNfyJJY+=j zvx@#$Kx^-mhuTuCZmP63L+$GbQ|h{1^cr+7`+)91>sX86#7k*}f-`5yHkne}P)yMzis=#tRx z4)mNnS@|i0?qA_4XMxX&wu7{Z8i#j)+u3q)qqAyW&aXM?@P}yLCohCO=Av|aMq5P1 z$PWp2PH@*F;CB|h`Uc%;kO}q%DR-M_S~iyn=Fs(+Tlot@vjg`DGT~wh|GuHwMWqS8 z1}Z}Dz}9va(m^xO;v|qw-8iyJW91ik%Q1t-devJ#2Xd8MWv^naxUrnZEKOf?Sm5!+ z|JMsvzDM_J#3NU__kNLleFM!;#1QIYJU4*Gf(9HoD&DrN(j*jbb1-aFl7p;PMLF5a zWkP1ka~o?ZXA^y7GSAIJX%s^&qP!cNVd}@l7jrv{ra1*zRef3sWnG`^d07du{GO~6 zVRvc3Z5EOqeWBkNN$;Y?AnaqGzJyU2z=X0R7;Jh$Rniig!-U(!cftXaVtoeA3)*c| zh`5|*@Om`Df@20V_c=5Ky*N6)k4jzaoJPzJm|Pixkn6LuD5ZZH?Jiv6p26VZA`vc) zgb$F$i4%oX492W)judX8*;CiCPXaEKJ9El$=u+~OGJRhChFAJMZcC@R{hW#u+jB9~ zOCT)Be&HrlSw3+=Spcq7fp*yUso&Q%rTP(CO31JQ-U)mkRunMe`l6EWpuC5>#N+xc zaIv`YzkhKl2=MU*`ygSc;LH&N~!dr_Q_ zGuG4>nU$9)r_u)^ws3ev zXc-3K6%pFLHPHy#a+PamzT1fFH62ngN&7*%yuxsW{WYGqthWmGs#2?GpNU1DY=kpq_obRr8 zd#E%*>Pw~exi9?;mHI{c*iVp`zT_k1sk6Ixh7d?lc;UP|zuDQ}{APB(`OZJ`VUcbz zmjxzgLpnI6{D@IM@VIAr4jn|J5eum0jeXl;fktV4kM8buXrtcjJVa>dMS;b1dgytF z4y#&@7Y(Z}jiPP5J|H%`ppo(_(b1Rog+Mp~=nOmW1{;1hls+p}m9U zH2}*o!;sdb3wQ|>|NLm+*cJ`B$?@Nk9rkV4=C}V-gccP!L$Scc==w_J+QdrbaeSq1fyNTMXOc)XTJc9pb zVDSc`BXi0~lgiYTGPRTC`TH^0^zCX86QXoFpNLti7DZ4U39kENymoByAO=q?cyc#o zQ2sXuIVD_j52l3fODUSFiQhOrP) z%cYF)Nge<>@tkPP`cY^evi{(dv#>OUdl`jVhr&QsQJ8oQ(IdN?5;TvNCzK9uBH$XB&4Vy*vK*mE1xEmuw*Yv|9kC$#s?BW}P!ot029@)Z=UfFS{W!EtFC;f0m?B=#f$+C*F`WF2yjIbcp$%F_%2o+N-vGDs-imc|X2 z2d9L>taW7CZa>6gKj#zhWX0$FQz%>n6d-fVPE~@*9mt-TPNZ_1*VC)1@))u*h2%51 zx8E^3jed7`ztz}iZZ;eB;w|zCOmDOsMyI*ERZO9Se7Ci|XVk^dG|592_v$Z-8DUp% zY&WFcl-Ovr+k5R|R%~=zb>$#e{u-u4?#QQ5?7V1QJ`5nYW9)W~ZFSWC#`8wKyNz+A z_1{ykjbBsOrBsQLbdd5Nn8m~D%lPZ8>Ub9RW6#C4?O1BT(#Ll1}-L6p(E@17eWy2Aunn^a{uVAu`^yHf?7dcvL)t@ zR_gl|)u)no0XyoUmyA`|WO1@mz0)78B_DsK=eFb|rO8Q3+hyGFeeGcRpJbyK&sbu} z!mS=oS+CRg6-d`5O4rq%t{*H9a?J4Qp*ZWjSvr;#lA0XViG%LZBqB`9hnPfd|5 zIdrQA-nU(J(;w)%+X6*DpsRjG*7=04dS^%}w56}n3sX8yN<=ozADoK*hY`~u3=KLUn{>t-?qVx=Dy6(+!Yy` z$1+3nd~+MXv<%-TWtpia6TxdB_;Z66rX@Z%IR33NUuQPs%&^#ZxRo8!F)W{Ag1f$* zz&1H^Y$5_qY?H1(C1FnCyXrc)^&K)OsV2}sB$|gdr=D$C%?kBRkGb6OYUrwIUCM_T ziZAO=qh&=p)*}^@MNN_!TYK{P`r789&p9!t&On~ zoQeop!OAnp#na^=bxHeSW0VJwzA~(U$~I)RL27KRZ6HRd)~f z4y%>fd&(3{?$)cN#^Le)Y(mLG8eb}(&nAVTQa!3lLrNH`_4-MDc0w4=YLze|t^JgE zTlz5pg@~FVe8@^)MI|oAQBd{})UT+?{o?EB>AGk+CQ71Xaes=`KYp=-#GnI(c`qd@C(9m#Qb!glaAM>p5E$*Vp8}a0V|_Q^j%~nRd!$|4jNXE zy%Q&YEZ~)gFk{nixgIM_NMu%-hg@JIQOpaWVOVWyJzMx0;W~41#-O9xfQl7JqttRq zp;3x8yz9cQ|7YG5&S1GhEjqfWf6a~ZZwNeU#C!N#o{K|J6LU>1@x@jsvyn&(h3Ptj z84g7U$GA|3+}8Hs;n(ESzMR)oIj^b5l$TsrJ>UFmU}#2@oEYWM)WlitZE`sb(li;R oX`xNi&No{bc{zN%HoVzC3@4-5ASD!@nIncM=^2hX*KiH+56PT%_y7O^ literal 0 HcmV?d00001 diff --git a/owl-bot-staging/NetApp/v1/proto/src/GPBMetadata/Google/Cloud/Netapp/V1/BackupVault.php b/owl-bot-staging/NetApp/v1/proto/src/GPBMetadata/Google/Cloud/Netapp/V1/BackupVault.php new file mode 100644 index 0000000000000000000000000000000000000000..283d37baeecce8db835e1b172f832ff9a443a496 GIT binary patch literal 2445 zcmbtW(QXO=3$?&3{MB-HZ4&fK|Y?mctvo%!||Kj*MX+RR}d z6>LmKS45mM!aY~GrfZW?FqtrqnC>OFZ06~NG>^#PQJ=J$o&G~~_1(ZTnL*B6_snKB z({_V#&0&IaUYl;!M%26r_;5-CTj&ZEz@eAS=hS4R-EBO_rDH1SpsfG~dlF!9r~n41 zTRQ-zO?{s<6ws-}fmcBA$Agh=nZy@V;NK(5A6kwjENWXnVIsR^LT#U+|IM|Nz%hm8 zIz&1gIVP)ANr)-eKH@GWzDweWx{?dzVbE~|^Bigqn#?yniwoE5;!?vnV`9#roT*f! zZ6%yFA(b#j!?+RTE)ib9lDiY)F%fvqj*43X%;sN%1$@=HHQ2Y9J#MgbI<;KSFs`$@ z2KkU{k3|Q#wAY*twd-^0Uo5}l+_!I`1O&b0i+$A*Jb7wGgxAO8IlucT!^)fy$ zXC10b>rcBEF4dJ(^-!w%bgT3rf}q^0c@Zt4WJ|HSm4HzSwTWbWc!|kJD?W{!=PN{< zVYs0DdIjJ({>>%g~EzyoV&eU)fWeTf>vX<8EuO zv)^eo3m<9gu(sE0)%%^pb|IzZAd7?Mi$Yo&nyrJDGGwHo)$1Mg3Mu<~ z+xpKbco-da$Sa<+uVZ7YCHU0#kf-mNDg4^2=xbK9T@zc3>)>4cIg1*b>PI*~O0>Dz zXY1iGG;Ze;qjDGSwwXxm*keBgSPI%#@93fWrk?)0zPUui<=;|p|G@H-n0^fU4XkqN zF-Jr)i(s`Sh}eJ}r)O;FV>eZT%xW5dniB2>bCkYvS^?HvZ_K>m=ql3AZCIUHHg-zX z4r;0VIt9g>@%bG2WSRlDlGOPar_|f#5_;3_!ySkHD29ocWZ~pAlyu-=C79=QWXnRx zU>JX57<;Nb7Lflxc=`nHBr_OVW5t##>9qC~A}xeBU{sXLq$jI0T|S0lli3VQ{QCNf z5BEPS=2xWRgyW^V2o<|XplqtUDcvmUBJ<|2;=GZkJc#9vQTaFiNI?lp@dL-+C?wMF z%ImnBdbu6;qPRz59iO@J!vjkj-yUJL^U+TH@q7ASTfH)L^~%r>nW%HFpKkpX8wSz) zLq0&zG{6_g+w_Cb$uN|cVT3lrINchpsinternalAddGeneratedFile( + ' +øb +1google/cloud/netapp/v1/cloud_netapp_service.protogoogle.cloud.netapp.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto-google/cloud/netapp/v1/active_directory.proto#google/cloud/netapp/v1/backup.proto*google/cloud/netapp/v1/backup_policy.proto)google/cloud/netapp/v1/backup_vault.proto google/cloud/netapp/v1/kms.proto(google/cloud/netapp/v1/replication.proto%google/cloud/netapp/v1/snapshot.proto)google/cloud/netapp/v1/storage_pool.proto#google/cloud/netapp/v1/volume.proto#google/longrunning/operations.protogoogle/protobuf/empty.protogoogle/protobuf/timestamp.proto"€ +OperationMetadata4 + create_time ( 2.google.protobuf.TimestampBàA1 +end_time ( 2.google.protobuf.TimestampBàA +target ( BàA +verb ( BàA +status_message ( BàA# +requested_cancellation (BàA + api_version ( BàA2ìY +NetApp¸ +ListStoragePools/.google.cloud.netapp.v1.ListStoragePoolsRequest0.google.cloud.netapp.v1.ListStoragePoolsResponse"AÚAparent‚Óä“20/v1/{parent=projects/*/locations/*}/storagePoolsö +CreateStoragePool0.google.cloud.netapp.v1.CreateStoragePoolRequest.google.longrunning.Operation"ÊA + StoragePoolOperationMetadataÚA#parent,storage_pool,storage_pool_id‚Óä“@"0/v1/{parent=projects/*/locations/*}/storagePools: storage_pool¥ +GetStoragePool-.google.cloud.netapp.v1.GetStoragePoolRequest#.google.cloud.netapp.v1.StoragePool"?ÚAname‚Óä“20/v1/{name=projects/*/locations/*/storagePools/*}ø +UpdateStoragePool0.google.cloud.netapp.v1.UpdateStoragePoolRequest.google.longrunning.Operation"‘ÊA + StoragePoolOperationMetadataÚAstorage_pool,update_mask‚Óä“M2=/v1/{storage_pool.name=projects/*/locations/*/storagePools/*}: storage_poolÒ +DeleteStoragePool0.google.cloud.netapp.v1.DeleteStoragePoolRequest.google.longrunning.Operation"lÊA* +google.protobuf.EmptyOperationMetadataÚAname‚Óä“2*0/v1/{name=projects/*/locations/*/storagePools/*}× +SwitchActiveReplicaZone6.google.cloud.netapp.v1.SwitchActiveReplicaZoneRequest.google.longrunning.Operation"eÊA + StoragePoolOperationMetadata‚Óä“<"7/v1/{name=projects/*/locations/*/storagePools/*}:switch:*¤ + ListVolumes*.google.cloud.netapp.v1.ListVolumesRequest+.google.cloud.netapp.v1.ListVolumesResponse"<ÚAparent‚Óä“-+/v1/{parent=projects/*/locations/*}/volumes‘ + GetVolume(.google.cloud.netapp.v1.GetVolumeRequest.google.cloud.netapp.v1.Volume":ÚAname‚Óä“-+/v1/{name=projects/*/locations/*/volumes/*}Ï + CreateVolume+.google.cloud.netapp.v1.CreateVolumeRequest.google.longrunning.Operation"sÊA +VolumeOperationMetadataÚAparent,volume,volume_id‚Óä“5"+/v1/{parent=projects/*/locations/*}/volumes:volumeÑ + UpdateVolume+.google.cloud.netapp.v1.UpdateVolumeRequest.google.longrunning.Operation"uÊA +VolumeOperationMetadataÚAvolume,update_mask‚Óä“<22/v1/{volume.name=projects/*/locations/*/volumes/*}:volumeà + DeleteVolume+.google.cloud.netapp.v1.DeleteVolumeRequest.google.longrunning.Operation"gÊA* +google.protobuf.EmptyOperationMetadataÚAname‚Óä“-*+/v1/{name=projects/*/locations/*/volumes/*}· + RevertVolume+.google.cloud.netapp.v1.RevertVolumeRequest.google.longrunning.Operation"[ÊA +VolumeOperationMetadata‚Óä“7"2/v1/{name=projects/*/locations/*/volumes/*}:revert:*¶ + ListSnapshots,.google.cloud.netapp.v1.ListSnapshotsRequest-.google.cloud.netapp.v1.ListSnapshotsResponse"HÚAparent‚Óä“97/v1/{parent=projects/*/locations/*/volumes/*}/snapshots£ + GetSnapshot*.google.cloud.netapp.v1.GetSnapshotRequest .google.cloud.netapp.v1.Snapshot"FÚAname‚Óä“97/v1/{name=projects/*/locations/*/volumes/*/snapshots/*}è +CreateSnapshot-.google.cloud.netapp.v1.CreateSnapshotRequest.google.longrunning.Operation"‡ÊA +SnapshotOperationMetadataÚAparent,snapshot,snapshot_id‚Óä“C"7/v1/{parent=projects/*/locations/*/volumes/*}/snapshots:snapshotÓ +DeleteSnapshot-.google.cloud.netapp.v1.DeleteSnapshotRequest.google.longrunning.Operation"sÊA* +google.protobuf.EmptyOperationMetadataÚAname‚Óä“9*7/v1/{name=projects/*/locations/*/volumes/*/snapshots/*}ê +UpdateSnapshot-.google.cloud.netapp.v1.UpdateSnapshotRequest.google.longrunning.Operation"‰ÊA +SnapshotOperationMetadataÚAsnapshot,update_mask‚Óä“L2@/v1/{snapshot.name=projects/*/locations/*/volumes/*/snapshots/*}:snapshotÌ +ListActiveDirectories4.google.cloud.netapp.v1.ListActiveDirectoriesRequest5.google.cloud.netapp.v1.ListActiveDirectoriesResponse"FÚAparent‚Óä“75/v1/{parent=projects/*/locations/*}/activeDirectories¶ +GetActiveDirectory1.google.cloud.netapp.v1.GetActiveDirectoryRequest\'.google.cloud.netapp.v1.ActiveDirectory"DÚAname‚Óä“75/v1/{name=projects/*/locations/*/activeDirectories/*}“ +CreateActiveDirectory4.google.cloud.netapp.v1.CreateActiveDirectoryRequest.google.longrunning.Operation"¤ÊA$ +ActiveDirectoryOperationMetadataÚA+parent,active_directory,active_directory_id‚Óä“I"5/v1/{parent=projects/*/locations/*}/activeDirectories:active_directory• +UpdateActiveDirectory4.google.cloud.netapp.v1.UpdateActiveDirectoryRequest.google.longrunning.Operation"¦ÊA$ +ActiveDirectoryOperationMetadataÚAactive_directory,update_mask‚Óä“Z2F/v1/{active_directory.name=projects/*/locations/*/activeDirectories/*}:active_directoryß +DeleteActiveDirectory4.google.cloud.netapp.v1.DeleteActiveDirectoryRequest.google.longrunning.Operation"qÊA* +google.protobuf.EmptyOperationMetadataÚAname‚Óä“7*5/v1/{name=projects/*/locations/*/activeDirectories/*}° +ListKmsConfigs-.google.cloud.netapp.v1.ListKmsConfigsRequest..google.cloud.netapp.v1.ListKmsConfigsResponse"?ÚAparent‚Óä“0./v1/{parent=projects/*/locations/*}/kmsConfigsè +CreateKmsConfig..google.cloud.netapp.v1.CreateKmsConfigRequest.google.longrunning.Operation"…ÊA + KmsConfigOperationMetadataÚAparent,kms_config,kms_config_id‚Óä“<"./v1/{parent=projects/*/locations/*}/kmsConfigs: +kms_config + GetKmsConfig+.google.cloud.netapp.v1.GetKmsConfigRequest!.google.cloud.netapp.v1.KmsConfig"=ÚAname‚Óä“0./v1/{name=projects/*/locations/*/kmsConfigs/*}ê +UpdateKmsConfig..google.cloud.netapp.v1.UpdateKmsConfigRequest.google.longrunning.Operation"‡ÊA + KmsConfigOperationMetadataÚAkms_config,update_mask‚Óä“G29/v1/{kms_config.name=projects/*/locations/*/kmsConfigs/*}: +kms_config +EncryptVolumes-.google.cloud.netapp.v1.EncryptVolumesRequest.google.longrunning.Operation"bÊA + KmsConfigOperationMetadata‚Óä“;"6/v1/{name=projects/*/locations/*/kmsConfigs/*}:encrypt:*´ +VerifyKmsConfig..google.cloud.netapp.v1.VerifyKmsConfigRequest/.google.cloud.netapp.v1.VerifyKmsConfigResponse"@‚Óä“:"5/v1/{name=projects/*/locations/*/kmsConfigs/*}:verify:*Ì +DeleteKmsConfig..google.cloud.netapp.v1.DeleteKmsConfigRequest.google.longrunning.Operation"jÊA* +google.protobuf.EmptyOperationMetadataÚAname‚Óä“0*./v1/{name=projects/*/locations/*/kmsConfigs/*} +ListReplications/.google.cloud.netapp.v1.ListReplicationsRequest0.google.cloud.netapp.v1.ListReplicationsResponse"KÚAparent‚Óä“<:/v1/{parent=projects/*/locations/*/volumes/*}/replications¯ +GetReplication-.google.cloud.netapp.v1.GetReplicationRequest#.google.cloud.netapp.v1.Replication"IÚAname‚Óä“<:/v1/{name=projects/*/locations/*/volumes/*/replications/*}ý +CreateReplication0.google.cloud.netapp.v1.CreateReplicationRequest.google.longrunning.Operation"–ÊA + ReplicationOperationMetadataÚA!parent,replication,replication_id‚Óä“I":/v1/{parent=projects/*/locations/*/volumes/*}/replications: replicationÜ +DeleteReplication0.google.cloud.netapp.v1.DeleteReplicationRequest.google.longrunning.Operation"vÊA* +google.protobuf.EmptyOperationMetadataÚAname‚Óä“<*:/v1/{name=projects/*/locations/*/volumes/*/replications/*}ÿ +UpdateReplication0.google.cloud.netapp.v1.UpdateReplicationRequest.google.longrunning.Operation"˜ÊA + ReplicationOperationMetadataÚAreplication,update_mask‚Óä“U2F/v1/{replication.name=projects/*/locations/*/volumes/*/replications/*}: replicationÏ +StopReplication..google.cloud.netapp.v1.StopReplicationRequest.google.longrunning.Operation"mÊA + ReplicationOperationMetadata‚Óä“D"?/v1/{name=projects/*/locations/*/volumes/*/replications/*}:stop:*Õ +ResumeReplication0.google.cloud.netapp.v1.ResumeReplicationRequest.google.longrunning.Operation"oÊA + ReplicationOperationMetadata‚Óä“F"A/v1/{name=projects/*/locations/*/volumes/*/replications/*}:resume:*ó +ReverseReplicationDirection:.google.cloud.netapp.v1.ReverseReplicationDirectionRequest.google.longrunning.Operation"yÊA + ReplicationOperationMetadata‚Óä“P"K/v1/{name=projects/*/locations/*/volumes/*/replications/*}:reverseDirection:*Ý +EstablishPeering/.google.cloud.netapp.v1.EstablishPeeringRequest.google.longrunning.Operation"yÊA + ReplicationOperationMetadata‚Óä“P"K/v1/{name=projects/*/locations/*/volumes/*/replications/*}:establishPeering:*Ï +SyncReplication..google.cloud.netapp.v1.SyncReplicationRequest.google.longrunning.Operation"mÊA + ReplicationOperationMetadata‚Óä“D"?/v1/{name=projects/*/locations/*/volumes/*/replications/*}:sync:*ö +CreateBackupVault0.google.cloud.netapp.v1.CreateBackupVaultRequest.google.longrunning.Operation"ÊA + BackupVaultOperationMetadataÚA#parent,backup_vault,backup_vault_id‚Óä“@"0/v1/{parent=projects/*/locations/*}/backupVaults: backup_vault¥ +GetBackupVault-.google.cloud.netapp.v1.GetBackupVaultRequest#.google.cloud.netapp.v1.BackupVault"?ÚAname‚Óä“20/v1/{name=projects/*/locations/*/backupVaults/*}¸ +ListBackupVaults/.google.cloud.netapp.v1.ListBackupVaultsRequest0.google.cloud.netapp.v1.ListBackupVaultsResponse"AÚAparent‚Óä“20/v1/{parent=projects/*/locations/*}/backupVaultsø +UpdateBackupVault0.google.cloud.netapp.v1.UpdateBackupVaultRequest.google.longrunning.Operation"‘ÊA + BackupVaultOperationMetadataÚAbackup_vault,update_mask‚Óä“M2=/v1/{backup_vault.name=projects/*/locations/*/backupVaults/*}: backup_vaultÒ +DeleteBackupVault0.google.cloud.netapp.v1.DeleteBackupVaultRequest.google.longrunning.Operation"lÊA* +google.protobuf.EmptyOperationMetadataÚAname‚Óä“2*0/v1/{name=projects/*/locations/*/backupVaults/*}ß + CreateBackup+.google.cloud.netapp.v1.CreateBackupRequest.google.longrunning.Operation"‚ÊA +BackupOperationMetadataÚAparent,backup,backup_id‚Óä“D":/v1/{parent=projects/*/locations/*/backupVaults/*}/backups:backup  + GetBackup(.google.cloud.netapp.v1.GetBackupRequest.google.cloud.netapp.v1.Backup"IÚAname‚Óä“<:/v1/{name=projects/*/locations/*/backupVaults/*/backups/*}³ + ListBackups*.google.cloud.netapp.v1.ListBackupsRequest+.google.cloud.netapp.v1.ListBackupsResponse"KÚAparent‚Óä“<:/v1/{parent=projects/*/locations/*/backupVaults/*}/backupsÒ + DeleteBackup+.google.cloud.netapp.v1.DeleteBackupRequest.google.longrunning.Operation"vÊA* +google.protobuf.EmptyOperationMetadataÚAname‚Óä“<*:/v1/{name=projects/*/locations/*/backupVaults/*/backups/*}á + UpdateBackup+.google.cloud.netapp.v1.UpdateBackupRequest.google.longrunning.Operation"„ÊA +BackupOperationMetadataÚAbackup,update_mask‚Óä“K2A/v1/{backup.name=projects/*/locations/*/backupVaults/*/backups/*}:backupþ +CreateBackupPolicy1.google.cloud.netapp.v1.CreateBackupPolicyRequest.google.longrunning.Operation"•ÊA! + BackupPolicyOperationMetadataÚA%parent,backup_policy,backup_policy_id‚Óä“C"2/v1/{parent=projects/*/locations/*}/backupPolicies: backup_policyª +GetBackupPolicy..google.cloud.netapp.v1.GetBackupPolicyRequest$.google.cloud.netapp.v1.BackupPolicy"AÚAname‚Óä“42/v1/{name=projects/*/locations/*/backupPolicies/*}À +ListBackupPolicies1.google.cloud.netapp.v1.ListBackupPoliciesRequest2.google.cloud.netapp.v1.ListBackupPoliciesResponse"CÚAparent‚Óä“42/v1/{parent=projects/*/locations/*}/backupPolicies€ +UpdateBackupPolicy1.google.cloud.netapp.v1.UpdateBackupPolicyRequest.google.longrunning.Operation"—ÊA! + BackupPolicyOperationMetadataÚAbackup_policy,update_mask‚Óä“Q2@/v1/{backup_policy.name=projects/*/locations/*/backupPolicies/*}: backup_policyÖ +DeleteBackupPolicy1.google.cloud.netapp.v1.DeleteBackupPolicyRequest.google.longrunning.Operation"nÊA* +google.protobuf.EmptyOperationMetadataÚAname‚Óä“4*2/v1/{name=projects/*/locations/*/backupPolicies/*}IÊAnetapp.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformBŠ +com.google.cloud.netapp.v1BCloudNetappServiceProtoPZ2cloud.google.com/go/netapp/apiv1/netapppb;netapppbªGoogle.Cloud.NetApp.V1ÊGoogle\\Cloud\\NetApp\\V1êGoogle::Cloud::NetApp::V1êAN +compute.googleapis.com/Network,projects/{project}/global/networks/{network}bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/GPBMetadata/Google/Cloud/Netapp/V1/Common.php b/owl-bot-staging/NetApp/v1/proto/src/GPBMetadata/Google/Cloud/Netapp/V1/Common.php new file mode 100644 index 0000000000000000000000000000000000000000..8cb63d596909b5e28725ee7adc0a9dd328d9c669 GIT binary patch literal 1126 zcma)5Z)?*)9JcMyd7Cpt7@H!VZm@1>O6R-GDQT0Iur>{CTDB1gX?pDr(%f;m6sGJe z_(24}h@ZmOehM$i(hawPd6Qi3d47MN=hGK@LBS4eqX;pdqX`^eLVkfDWrUM}gm9cp zr-;FT%qb2LQy|oP(CRtR&`sy9pvEL&0aD?NkXeXoK}eEGEkfL_%1aVFxC5s0@ zfNubbhbH3?2QcP77q49$ zdpN=z`yu`+sy~KPKa7!}-o;LnDBzexFeUV&09E&49y7)6QX;xNhD9-UIsnnUYepQg z$PZl|#R0>V6J`sjs?HE!jxGID-M>zohQm`>&1+QEJ4GHt&JuJxJA@4JghfYL-D!ZU z<(GTUs5FY*7DnNufiC<7CQMaty1EIHHTB^$zHULAOqLb5#5SwT9BIZq@O=gB{Kp#Q z%^aj;yH@gDD~tL&4@eynh{ceo*sXj5w&H|R!i2cI7_kKokQbr_3gfL3tW-A+ca{6Y zDT5r{Nx_ZEZ>@6Rf%V%z<=0?)VDv|3)9^aR$mn=OYhW8qvt=5(^hjOpV^Mt zvpna_HvUQS0z5Bj=xUbM7MV-(Gw`(8=?!)7q&twxjh`j(QW)WZMjLCn!ZXR)rSrpl zuEkWyyf!0+qkM{msq&H2@lo;dqrBP9Or&HcQiO>#N|jOlS8?H9+bi{#xN?QT{*Wk8+x>I5;dyLJ%R5wnDOu8DJV?yY>*3 zrt|^&1nnbqpQBe*AEMX$2)*h*Gq%YltP-W%;5q#NeDlrsAHI3%j$HJyT*o%{42t`5 zZz|IfmR--Gj_Fu(Z!#EQPd1&gODyauvRpfon@1g4t2H{$z|?mpo{3d?=r}_QmrTo< z^h-9ThU=Ejw@PPYU*XOWvW+qJUBkq3y;V7c9eslu-8#4HR+(M5$?dwQTRRAumf`#I z{@6zsNQR#~=~={-eQHqndro|v*n|?pB0mA{U3p+wJ_ft%dj}KSq{OjhW^iPixcEXA zKH1*qt^@bnl|v*gc6GRRw_#K4*@o4vVc+zKOC7HTTUB+4X+#*CDZU7fW$ws8E((mQ zdJW{ROuY%de7Y=qm`*%ikx7C+{(s#JvGMeVq5+Mo8OXv@N&N&@w*4AD@Kekem2l=S#+b^q%|Q( zg$q&h48^6P<64VRR>fDNJ0eCU+x6%NG85awhB-2N76ycIIRB3rTC2h&#gT{q&rTlQpF`J4pEH!M#Novx6`}bW zr|CAg;g)5D}XJ$JevK2~AiQ;b&7)I0W!5pEr8n*BPEO!-Z z6Rm2t=}ldF>R1y9_V6X{>JT8FVvh`_*WUK79x-}y&10a~57Ej98x|c+Ir}Nba9mnP z_r$D@JFhG4rK_~14reS{uzq8$AUPj#LaxX8t` z?w|y#9!%r0;)Ct(MyP`;d2Ajv$}!t7AcK0jwcdw9N-SSQu2=(^nLJu_mb7>bFOpf5 zs)ZFqUOy;*P(gD^9*(;xX&F5X{#STtZ{7^@fbZ9A>P;E3@35C*PQ`IRj*q=_Vq)De zO=kl6Egh}qH&N!YpA3ovg(3k;_fg{9uqGmVxyXNpz%?hjZRuMv9=7kGTCVAC&yYg z!5nDq_E9^VWJm04ul4FHt-7zbv}TQYS_!A2W75HW^;NlYpk-5lHeG8R!+`Bd^Yi!+ zU?H}6*r>O~ff@DZx8>=Lr9yfMiQ;=~QonQ&e9cOhV?wh8DYQndErWGf9$td$JB~_w=Faprg^AjLnmwnp}0XeDC(Wt+X+A3 zEUndf1E}x@P-$XXc3tIk>#uO38?=V3H-x1wG>31O)`gL(aw}C8YpQy>)l2e(`PoL) bGkhv~u1hT%3lU;2XwUdg(L~MA459x36kByb literal 0 HcmV?d00001 diff --git a/owl-bot-staging/NetApp/v1/proto/src/GPBMetadata/Google/Cloud/Netapp/V1/Replication.php b/owl-bot-staging/NetApp/v1/proto/src/GPBMetadata/Google/Cloud/Netapp/V1/Replication.php new file mode 100644 index 0000000000000000000000000000000000000000..f7ec4c4736ca48079b4f8aed99eec9340ac079d4 GIT binary patch literal 5576 zcmb_g&u-(!84o2}wm#XiOnYtF*=!lv#d?cGs+9m~v~jkQMcWE&NueYI8>nC@X>74e zlPpOYQ3IcPDbPa?Ezm>J7wD}$=K+cWz4ZZd&Lia1Z)QlDmZhxXjZW0e_iujR-I@~XPbAy1JgaLNQfF{+K^&=TUD>)poUA03Yf`n=l;m=y`7W}$ z*1+kKf^=zFmj=mo4QtTLnZ(m~AWay=B@m3DPk)lJ>gHADX$p5s8e z&J$ouprc2fa2qp$V^yo$Eo zKGKQNE0Ml-ty@l^aC@p-A=6kD;`?uAt}zF-&n;tcMP}DJg0noph(j+tfR!EiOmkm7 zfVZh*^m*EqJ(-tz|NT#O-`B-nZ{*q|On|+SGpK8x!q>a7H*4gJ8=NxBawN-hBzwKT zz2!^LY#sB3JA^08_RbXH*9>)^=!s9n@(Uw1*YlzE_k-LV?O)J{PyYMl9OIxrxwjKafT7hNUx<#y%ge5fu#suErm=n~o17!Z4 zghZ&ai>ok4y8{cQcq#f#aZx;gd0IXR3!G&BS%CFe5@kbTvNS>oWsi#6u*}%i9<~(S zaMLt|nCPf@1appMkTeaLWd4I$B!{#p$jWtm0qf3fds5wQpY#SOmxfd_|IrVW+wj?` z?1=aoEM4i;*(yhYMqDzVn?>ds;|pQ21q*$m8D4+LB4?3V&lC1TNOT=Cit9LPN#wsL zuKB@#31Sb6scy1DuJWRk24s$xb`kyWicjFNU*~wfV~KOKI85Yt+Yn2kDnbwFrV~u{ zPp2L5P7&f(ynvXYbqM-)Ns6M`Gl6r;IAqgvhGH5LcnsFku^*+Esr|eRb>N-*2UKm% z!63z9z)dHawNpa}CxrkVe&G6uwG{iNI7dDF93zy?Pyv1`KLEeaVWU6nIC@XD32}52 z)6D-xmrec_3*USXv&IOmt}>DTNF28E!b?FpN%%+nL4b5PDg767V*c5 zTtBTGqRLuTRcfc>rUJwowU%-yqoFI1D9a5rhf${@nLezABnDMN+yyBtwQ+bNms|HF zuR}^cmz9_5{?FC3O10IL8>j>IouIx`iUyvzT&&<{H1j6`5~1QDK8EyJg`%NO!gm?s zb+n+!5D_SjoEX86hzVF|G;8%b{)vhySZXT8YU2o@rSQ#(Tkxn^zs~jsFO#%DD#$m0B@V08LMwmAh zDg0IVw)kfO-kn^zLQW7HI8yzFbUiosmH%~<3z7!cg3p^AFO9gwKW@VJB3yND+sDn% zmO}sBd?NI(1hA<3C7iY2P}$1-O@Q@DSuJir+#PiAFsg3fc2+@LhXt&}SDM*ly_GdZ zLHq>P{8g2FY3t6A4=S{6zP2L>m=9p%bxIyB74q8w7D(}9 zh+#=3rsrGt49nto#T{`52dqNe)-H+a;-!zBVqV0kW=o#+ikQ6JW8^JbP7fSux3%9`+2hlAA;);JCO3 ziGhhNx7*h`I4eX^B&`~cj!77!0HTlX3`RacGel_Sj}dtLd%6&grb{kfWT|!Z-h0;r z(-br~2fgd!$QI`@t?GUpQ4hF%bg0T^IW};O_gFe|#rf!Qj3a=~dzWqDjef{HlE_aV z0XTJ?5!0R_ux34;5PT%QBRTU=^ztE_b3$<#VEhJQcmUxv_3t>d#0ND$Lhn+cET=$@ zrqoEL0qHU^aNL++@`J+yOMJS;E;19O;xOpX_4JC!LSj2A5llRwy|SPDaNH#NLQUc<<*5R^8E7XKS9vz z$fXs$S>g=^pDlUow>!^+kAFlqj@b)kmOX%FtHdkXcJ_S#Kfy-Zf4iiQm$=o&*UN7s xTb!v-U|fX)-zyZ(_d7B69P`1`(Tmc1{4p@}c1UkTdUwLRA*1B4dpB?c@PDl5>lXk3 literal 0 HcmV?d00001 diff --git a/owl-bot-staging/NetApp/v1/proto/src/GPBMetadata/Google/Cloud/Netapp/V1/Snapshot.php b/owl-bot-staging/NetApp/v1/proto/src/GPBMetadata/Google/Cloud/Netapp/V1/Snapshot.php new file mode 100644 index 0000000000000000000000000000000000000000..fb279f1d753015767dedc4420b28f018900c0d08 GIT binary patch literal 2434 zcmbVOPj4GV6ld+&#N(!<3u#>+U@)b1QM;?86`)N6vSZgW${)*dB7rPfp&R;moJ^-Q#%_2Nc|MITj9c4yYkPp(t?uAsfU+=&UFzWdFx>a4 z?fPLdu>;CU6xqkiHVa6^4nl58j|c_ih_Z;d6nA>fO)#4fPKF%`9) zT7Qg{PhtBY3L)b)ti$OE5`chVH{di5h(Bym=Eh#c!?*{gjwFaSI2tY&5)ttVZMwUwYJ^H0c33_QKe4&aygl@-}Fn zrYCo8R7Qu~b(65e>+hIh2OgY1Cr8ocSa}3bzw%PT8mMy zQS%up>6&E_T)tjj!Pe#ESy@>3(0c*>k&n&=B7!TK@1t@O#FV%PWb9LjE)RQugUk-i zIMI|mM{}Y%{GSkX1tGQH479Wk8*r+F(f)2q@fT=b6CfGBM*ht_9G_W1Weps86Lk`D zrM8KdTGXc(W4u|;KSR#D5j4&VIX?%w<$_eHq_VtH)yJo0YGnni0>5d-wLj<3yrvzb zdH(!>k$KZW1p*#U8u2jfKlxL*~!n}->tTQRp3sm&Un8L>I$|87jW$+u)ydCiP zr1}(<&rQuT${*4bC2ey76^@CYC{{{N?n|TQqk>G`Ttatt28}^`w7a#_Yp-`-cH6DR zcgzwh^xKWrw~K~(3(c>?c+lPIEat?l)!t~!SzgR`do8s#C)c_=jphcpCfl;NHS*b3v=CC$8e2@!g7&j_ya$8uvr}+JJ5e4-VBpqw%U9{GPkp zkL%cj-X$Vh`*SY%&L`-OBp_mX>GTB_T5hGq!;2fP6TdH?_b literal 0 HcmV?d00001 diff --git a/owl-bot-staging/NetApp/v1/proto/src/GPBMetadata/Google/Cloud/Netapp/V1/StoragePool.php b/owl-bot-staging/NetApp/v1/proto/src/GPBMetadata/Google/Cloud/Netapp/V1/StoragePool.php new file mode 100644 index 0000000000000000000000000000000000000000..eae70ab7c3a2f2b596a51144027f635fb0fc5855 GIT binary patch literal 3337 zcmb_eUvJw~6rYo&Yi_!>b7|*QX!F{!ridkKKmt5A$iIb(u8opx(xyn(jdPP;>i8P_ zIwPz41QI;*Iraufds`u;&juh(`vH^J0rfoBmzA2K$yNzt-d z&@VcKW7jQ?cZxn|9v%|YWy~%}RD>KnBEE|)qBokAhoIWW9CsTMpj#CH-F*qreY|rQ zA>Cg7lBq{Gh*dN#FmpJNVxx2SJYhjNN-`W!BDPak00Ct&}!?jUe1PMM<% zg9FDR`E5PK6uP$rSFn#6HH9z058Yjd6VJhRw?=%+qb@KKbPQui_|${qB)=VfR>0AL zo)0-1##D&uQ^6R?p5gvHXUCCPjoJ^m(GyGL{Y4-socE3Un@t88tFivlE3UZcd zi$noDx78Z~>Q>ok#GLbgb?Q#Z`XTm@-ods*A%!>|xwCC$2=CmdQNYUm{xm)hAdT}= zj|%^8p+8p8_PO&{T?(?R(?9!qaxiw7r_02QTp{&4nky2bjvPvM| ziUSc=a|9lWG;TyNQw<)wAyn9CqSXfBiBf5i?*ed?`YF07s!mgMC7-QqzbvQzDsQ5j z5%~}nc>4ulR7}`!{HmaOaG(YbfiAw%|jpYAGOx{PkoGob-(`+ZR0Ca3 z_9P#;r}MeeW+8OKn^7$!oB`~X9P&Lk6BGsath$17f#VTu9pau%fOk5d-S{17RN;`5 z1jhg1yZ6yj@&+dDOAls+2UF^Ow2+iaAD-`e(thI?VExF2jy#L?CvZQ;V23853JZaIthNcI6wrrO*zQ_k?cf)N5$L!Z1WBpO{11 zlW|UmA|0)anH`LX`I?3(8>x|2!8q1n0o1Q39$A5D^&ZNIX+^X-I9n`jpULQS9z%_Q zf%tY>T^HpAZ)P7RIJJH462QpROskMRmaGR;^et^3B(t(-+S@}!4dwdLyoHgiWn(-= zt)V#^_XvCh$r>)6hwGlSs5{)72z&)v<0WW=&zN_lb|1SYaYXa!Yl~n%AKp#0Ss$Aoc7{Y-lDP8DHMB$=%bU1j3o`k{ zCE7Ab7fZL#a$$X{-U00}GPlv{&}Kbso7l35@0-}R*)w2pMKVZf%GVcuRuuIHQl-Si z0cQ|<;!$U)si!pI23}Zy=5r`O?Y&c`P&@Kyb$YaZ2jvn$RC6eOL?+<~QZJ*-7~4TO zQ?f?tGiBo#Wn_M;tLRF*Q|{EwNBiw&y}J8gw_aPmpk`5~RWH|`EGy~)ny*i=B~&v~b+=uv>;dAOK&-b~2d(8x#!t$t@(;>6 z2CZ6!?)fcbkzYKHo=%E3vtYM{u~j^dA5Y?qTI`u{p6vA}AI7a;3QM_2DBda>S~F)x ztMZ$I)*;o;hcg|OJRSCM<(nHLl!UnP$#hWhe_-9?#2%{*#2Lou7yU1A*~D}lo`h3o!*?BHy>|Jm${F^Wje8Y Ti&jLf8GE|6n-Ow literal 0 HcmV?d00001 diff --git a/owl-bot-staging/NetApp/v1/proto/src/GPBMetadata/Google/Cloud/Netapp/V1/Volume.php b/owl-bot-staging/NetApp/v1/proto/src/GPBMetadata/Google/Cloud/Netapp/V1/Volume.php new file mode 100644 index 0000000000000000000000000000000000000000..1fb7eb54dad79f6d17eb3ceb7763a09a1ac8b306 GIT binary patch literal 7713 zcmb^$O>Z05F%ghaJdvEvXM!aq~xd|uvn3g(pJme z?e0>J5*TQ2y%q(EHt3<}0zLF^^jGv)D~n^ZJhYG4ag_yc&G9t`Jq; z)?2$eGdc=8)y{Rx$>oN(8WOn{wQP2+?}t`rzOvu=urZak3RbUYnQwmTKnrx)=bC%= z7Pw6vjn310_SLwg`42wReLd$poq<|+(d0JOAe704v{^7 zyms41)@*&N%TW!T`bx zq$2<_e~5szue+Y`I=9Y#-ACz3Phr;99AMo@Am@kPy5Zf@#qu8hz;94ir<~#1eJUz;DwDpKw{{h^;+VvX( zgQrC4CoqRVFD>UxjuGzrc(d2}G~DF{Mc-q-I0kW}BA}(8;pLfguD6+Lpau;&j_B8j zuOWcR2=;bZuG3a z>8X~@s~J~LQsA3N;5i4b5-cYWmF_^QZ|YyFHgkHq>k^FxQVw118O$2mF++Px5#h~A zoC%xH?h|m)^qdR9AbLv2FO`tCyf`Gi0}BHm@+B{koQjJ15tYv5 zB_t6MN8bZ!a6m_QSQ}08LcWOrF#)g)vA)YXWDv`^Oa>8^6iB+P-FLXHxZVZE{}tR! zZofB?FCV(Wfdy$4>lt&7nPa&sGkFr}$g9JXk!z!aTnAfnuoac|Af;htdd}1#&$n

3i<-94O|jrdbGn06NSRR{BaXH9S>Fzryh|6I7-AIy77Ui&`CTL;m4&<< zy^XDp%9X$!>K=LI#&z-%7+n08Da3Ufl7{ABpbUbJoDMjRNNAV6zTxS%!O#FYwuQx} zE8iaipaFV1b1)zTAt^(5nP`Ab0WJKZ6ycXa3-bk~er1_VUPlUk9LKywOYaSrkR@#I zI+#DO%;M!4`9$j>LikRh!kyELV@L0VX;)(oRGx{QJ#&c62MKXVmzzn5FX&Dw9&3v<{9#k5&VxhcSF7Bk>k>W5@FXnfS zQW0q$Vg>wemMeRyDgJAxxL>4SQU2?owj=hY@t}CU*l1Sk9CU_2%ZXia@#vb3sPs<`xs?hS}#7$5IAn z^Y$t0p#74$B_?N|5`i~-XknHZlsi~>hlp^?OiZo{b~yBa1{o)E@{+N$FcIG3Uc<=? z0v}KzbH+XtdwlOSOoo^5iS5?INpA97APfj`A5Z{dK?NdAWK>ENM@H{VU}INMmS9mG zXDHK!KFbRYfS0eCN^19L%U3Df5>IBu5qXLop$xAllI`#2|!%*_*Sa%)+#a z$eDjcU|~%EKNx@5mf{hvYITJPyd9@Jg^iHOyn;liRpBEc(WChV0nTT{Z?)Su43Rx> z;t>nlFw*0jbYU1W=5^D>39Mi4(a0(D3s}5V2xCdLASRvziwu&Qw2BQXS_1Z`A`|=h z>>VCU#YX0vDVPt}oKgW6{IpHokM1YqxUz{o!RFvT)=;Zc~Cxy2W+${eUs>TKL8?e&GAq209 zyi@FpPI(wfsQ? zYsD$bt|9&@k6nFy=8sXheNA;NeFlke%OeJ^-!XLw)!Dqmw;7i8qJR|B9-4Ae6~`k1 zZMTiSiw&aKr$MaPM-Qic_q-?e$U{bPbz9Xs9TcjI_ArADlRtyRqXV)*MLQfQMfemg zJR1=6BpN$32V;jAjUAp%Qv5Z7yEKdVo-M{^5sUm_T7%BNT&q``)k1Z@F=hnV7gTl| zhflE6@IRkon=uDboYthGn=b%{MJhL^e4$WmG}Pu%ZM=jjf&@1mArJ{TZ&r*j_)7Y2IRcrgz!siX_k8ro`29& z+~EyhyHwylrO>AOADhX!$Rr{Am=oTKG2l?bI!Sl*fDvy>B`JRCe+{YbnwhMp(+U|DZp@ia-0;sNm$yaMgoogle.cloud.netapp.v1.AccessType + */ +class AccessType +{ + /** + * Unspecified Access Type + * + * Generated from protobuf enum ACCESS_TYPE_UNSPECIFIED = 0; + */ + const ACCESS_TYPE_UNSPECIFIED = 0; + /** + * Read Only + * + * Generated from protobuf enum READ_ONLY = 1; + */ + const READ_ONLY = 1; + /** + * Read Write + * + * Generated from protobuf enum READ_WRITE = 2; + */ + const READ_WRITE = 2; + /** + * None + * + * Generated from protobuf enum READ_NONE = 3; + */ + const READ_NONE = 3; + + private static $valueToName = [ + self::ACCESS_TYPE_UNSPECIFIED => 'ACCESS_TYPE_UNSPECIFIED', + self::READ_ONLY => 'READ_ONLY', + self::READ_WRITE => 'READ_WRITE', + self::READ_NONE => 'READ_NONE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ActiveDirectory.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ActiveDirectory.php new file mode 100644 index 000000000000..9176e1055524 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ActiveDirectory.php @@ -0,0 +1,827 @@ +google.cloud.netapp.v1.ActiveDirectory + */ +class ActiveDirectory extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The resource name of the active directory. + * Format: + * `projects/{project_number}/locations/{location_id}/activeDirectories/{active_directory_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Output only. Create time of the active directory. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The state of the AD. + * + * Generated from protobuf field .google.cloud.netapp.v1.ActiveDirectory.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Required. Name of the Active Directory domain + * + * Generated from protobuf field string domain = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $domain = ''; + /** + * The Active Directory site the service will limit Domain Controller + * discovery too. + * + * Generated from protobuf field string site = 5; + */ + protected $site = ''; + /** + * Required. Comma separated list of DNS server IP addresses for the Active + * Directory domain. + * + * Generated from protobuf field string dns = 6 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $dns = ''; + /** + * Required. NetBIOSPrefix is used as a prefix for SMB server name. + * + * Generated from protobuf field string net_bios_prefix = 7 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $net_bios_prefix = ''; + /** + * The Organizational Unit (OU) within the Windows Active Directory the user + * belongs to. + * + * Generated from protobuf field string organizational_unit = 8; + */ + protected $organizational_unit = ''; + /** + * If enabled, AES encryption will be enabled for SMB communication. + * + * Generated from protobuf field bool aes_encryption = 9; + */ + protected $aes_encryption = false; + /** + * Required. Username of the Active Directory domain administrator. + * + * Generated from protobuf field string username = 10 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $username = ''; + /** + * Required. Password of the Active Directory domain administrator. + * + * Generated from protobuf field string password = 11 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $password = ''; + /** + * Optional. Users to be added to the Built-in Backup Operator active + * directory group. + * + * Generated from protobuf field repeated string backup_operators = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $backup_operators; + /** + * Optional. Users to be added to the Built-in Admininstrators group. + * + * Generated from protobuf field repeated string administrators = 22 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $administrators; + /** + * Optional. Domain users to be given the SeSecurityPrivilege. + * + * Generated from protobuf field repeated string security_operators = 13 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $security_operators; + /** + * Name of the active directory machine. This optional parameter is used only + * while creating kerberos volume + * + * Generated from protobuf field string kdc_hostname = 14; + */ + protected $kdc_hostname = ''; + /** + * KDC server IP address for the active directory machine. + * + * Generated from protobuf field string kdc_ip = 15; + */ + protected $kdc_ip = ''; + /** + * If enabled, will allow access to local users and LDAP users. If access is + * needed for only LDAP users, it has to be disabled. + * + * Generated from protobuf field bool nfs_users_with_ldap = 16; + */ + protected $nfs_users_with_ldap = false; + /** + * Description of the active directory. + * + * Generated from protobuf field string description = 17; + */ + protected $description = ''; + /** + * Specifies whether or not the LDAP traffic needs to be signed. + * + * Generated from protobuf field bool ldap_signing = 18; + */ + protected $ldap_signing = false; + /** + * If enabled, traffic between the SMB server to Domain Controller (DC) will + * be encrypted. + * + * Generated from protobuf field bool encrypt_dc_connections = 19; + */ + protected $encrypt_dc_connections = false; + /** + * Labels for the active directory. + * + * Generated from protobuf field map labels = 20; + */ + private $labels; + /** + * Output only. The state details of the Active Directory. + * + * Generated from protobuf field string state_details = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state_details = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The resource name of the active directory. + * Format: + * `projects/{project_number}/locations/{location_id}/activeDirectories/{active_directory_id}`. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Create time of the active directory. + * @type int $state + * Output only. The state of the AD. + * @type string $domain + * Required. Name of the Active Directory domain + * @type string $site + * The Active Directory site the service will limit Domain Controller + * discovery too. + * @type string $dns + * Required. Comma separated list of DNS server IP addresses for the Active + * Directory domain. + * @type string $net_bios_prefix + * Required. NetBIOSPrefix is used as a prefix for SMB server name. + * @type string $organizational_unit + * The Organizational Unit (OU) within the Windows Active Directory the user + * belongs to. + * @type bool $aes_encryption + * If enabled, AES encryption will be enabled for SMB communication. + * @type string $username + * Required. Username of the Active Directory domain administrator. + * @type string $password + * Required. Password of the Active Directory domain administrator. + * @type array|\Google\Protobuf\Internal\RepeatedField $backup_operators + * Optional. Users to be added to the Built-in Backup Operator active + * directory group. + * @type array|\Google\Protobuf\Internal\RepeatedField $administrators + * Optional. Users to be added to the Built-in Admininstrators group. + * @type array|\Google\Protobuf\Internal\RepeatedField $security_operators + * Optional. Domain users to be given the SeSecurityPrivilege. + * @type string $kdc_hostname + * Name of the active directory machine. This optional parameter is used only + * while creating kerberos volume + * @type string $kdc_ip + * KDC server IP address for the active directory machine. + * @type bool $nfs_users_with_ldap + * If enabled, will allow access to local users and LDAP users. If access is + * needed for only LDAP users, it has to be disabled. + * @type string $description + * Description of the active directory. + * @type bool $ldap_signing + * Specifies whether or not the LDAP traffic needs to be signed. + * @type bool $encrypt_dc_connections + * If enabled, traffic between the SMB server to Domain Controller (DC) will + * be encrypted. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Labels for the active directory. + * @type string $state_details + * Output only. The state details of the Active Directory. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\ActiveDirectory::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The resource name of the active directory. + * Format: + * `projects/{project_number}/locations/{location_id}/activeDirectories/{active_directory_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The resource name of the active directory. + * Format: + * `projects/{project_number}/locations/{location_id}/activeDirectories/{active_directory_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. Create time of the active directory. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. Create time of the active directory. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The state of the AD. + * + * Generated from protobuf field .google.cloud.netapp.v1.ActiveDirectory.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The state of the AD. + * + * Generated from protobuf field .google.cloud.netapp.v1.ActiveDirectory.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetApp\V1\ActiveDirectory\State::class); + $this->state = $var; + + return $this; + } + + /** + * Required. Name of the Active Directory domain + * + * Generated from protobuf field string domain = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDomain() + { + return $this->domain; + } + + /** + * Required. Name of the Active Directory domain + * + * Generated from protobuf field string domain = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDomain($var) + { + GPBUtil::checkString($var, True); + $this->domain = $var; + + return $this; + } + + /** + * The Active Directory site the service will limit Domain Controller + * discovery too. + * + * Generated from protobuf field string site = 5; + * @return string + */ + public function getSite() + { + return $this->site; + } + + /** + * The Active Directory site the service will limit Domain Controller + * discovery too. + * + * Generated from protobuf field string site = 5; + * @param string $var + * @return $this + */ + public function setSite($var) + { + GPBUtil::checkString($var, True); + $this->site = $var; + + return $this; + } + + /** + * Required. Comma separated list of DNS server IP addresses for the Active + * Directory domain. + * + * Generated from protobuf field string dns = 6 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDns() + { + return $this->dns; + } + + /** + * Required. Comma separated list of DNS server IP addresses for the Active + * Directory domain. + * + * Generated from protobuf field string dns = 6 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDns($var) + { + GPBUtil::checkString($var, True); + $this->dns = $var; + + return $this; + } + + /** + * Required. NetBIOSPrefix is used as a prefix for SMB server name. + * + * Generated from protobuf field string net_bios_prefix = 7 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getNetBiosPrefix() + { + return $this->net_bios_prefix; + } + + /** + * Required. NetBIOSPrefix is used as a prefix for SMB server name. + * + * Generated from protobuf field string net_bios_prefix = 7 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setNetBiosPrefix($var) + { + GPBUtil::checkString($var, True); + $this->net_bios_prefix = $var; + + return $this; + } + + /** + * The Organizational Unit (OU) within the Windows Active Directory the user + * belongs to. + * + * Generated from protobuf field string organizational_unit = 8; + * @return string + */ + public function getOrganizationalUnit() + { + return $this->organizational_unit; + } + + /** + * The Organizational Unit (OU) within the Windows Active Directory the user + * belongs to. + * + * Generated from protobuf field string organizational_unit = 8; + * @param string $var + * @return $this + */ + public function setOrganizationalUnit($var) + { + GPBUtil::checkString($var, True); + $this->organizational_unit = $var; + + return $this; + } + + /** + * If enabled, AES encryption will be enabled for SMB communication. + * + * Generated from protobuf field bool aes_encryption = 9; + * @return bool + */ + public function getAesEncryption() + { + return $this->aes_encryption; + } + + /** + * If enabled, AES encryption will be enabled for SMB communication. + * + * Generated from protobuf field bool aes_encryption = 9; + * @param bool $var + * @return $this + */ + public function setAesEncryption($var) + { + GPBUtil::checkBool($var); + $this->aes_encryption = $var; + + return $this; + } + + /** + * Required. Username of the Active Directory domain administrator. + * + * Generated from protobuf field string username = 10 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getUsername() + { + return $this->username; + } + + /** + * Required. Username of the Active Directory domain administrator. + * + * Generated from protobuf field string username = 10 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setUsername($var) + { + GPBUtil::checkString($var, True); + $this->username = $var; + + return $this; + } + + /** + * Required. Password of the Active Directory domain administrator. + * + * Generated from protobuf field string password = 11 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPassword() + { + return $this->password; + } + + /** + * Required. Password of the Active Directory domain administrator. + * + * Generated from protobuf field string password = 11 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPassword($var) + { + GPBUtil::checkString($var, True); + $this->password = $var; + + return $this; + } + + /** + * Optional. Users to be added to the Built-in Backup Operator active + * directory group. + * + * Generated from protobuf field repeated string backup_operators = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getBackupOperators() + { + return $this->backup_operators; + } + + /** + * Optional. Users to be added to the Built-in Backup Operator active + * directory group. + * + * Generated from protobuf field repeated string backup_operators = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setBackupOperators($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->backup_operators = $arr; + + return $this; + } + + /** + * Optional. Users to be added to the Built-in Admininstrators group. + * + * Generated from protobuf field repeated string administrators = 22 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAdministrators() + { + return $this->administrators; + } + + /** + * Optional. Users to be added to the Built-in Admininstrators group. + * + * Generated from protobuf field repeated string administrators = 22 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAdministrators($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->administrators = $arr; + + return $this; + } + + /** + * Optional. Domain users to be given the SeSecurityPrivilege. + * + * Generated from protobuf field repeated string security_operators = 13 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSecurityOperators() + { + return $this->security_operators; + } + + /** + * Optional. Domain users to be given the SeSecurityPrivilege. + * + * Generated from protobuf field repeated string security_operators = 13 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSecurityOperators($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->security_operators = $arr; + + return $this; + } + + /** + * Name of the active directory machine. This optional parameter is used only + * while creating kerberos volume + * + * Generated from protobuf field string kdc_hostname = 14; + * @return string + */ + public function getKdcHostname() + { + return $this->kdc_hostname; + } + + /** + * Name of the active directory machine. This optional parameter is used only + * while creating kerberos volume + * + * Generated from protobuf field string kdc_hostname = 14; + * @param string $var + * @return $this + */ + public function setKdcHostname($var) + { + GPBUtil::checkString($var, True); + $this->kdc_hostname = $var; + + return $this; + } + + /** + * KDC server IP address for the active directory machine. + * + * Generated from protobuf field string kdc_ip = 15; + * @return string + */ + public function getKdcIp() + { + return $this->kdc_ip; + } + + /** + * KDC server IP address for the active directory machine. + * + * Generated from protobuf field string kdc_ip = 15; + * @param string $var + * @return $this + */ + public function setKdcIp($var) + { + GPBUtil::checkString($var, True); + $this->kdc_ip = $var; + + return $this; + } + + /** + * If enabled, will allow access to local users and LDAP users. If access is + * needed for only LDAP users, it has to be disabled. + * + * Generated from protobuf field bool nfs_users_with_ldap = 16; + * @return bool + */ + public function getNfsUsersWithLdap() + { + return $this->nfs_users_with_ldap; + } + + /** + * If enabled, will allow access to local users and LDAP users. If access is + * needed for only LDAP users, it has to be disabled. + * + * Generated from protobuf field bool nfs_users_with_ldap = 16; + * @param bool $var + * @return $this + */ + public function setNfsUsersWithLdap($var) + { + GPBUtil::checkBool($var); + $this->nfs_users_with_ldap = $var; + + return $this; + } + + /** + * Description of the active directory. + * + * Generated from protobuf field string description = 17; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Description of the active directory. + * + * Generated from protobuf field string description = 17; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Specifies whether or not the LDAP traffic needs to be signed. + * + * Generated from protobuf field bool ldap_signing = 18; + * @return bool + */ + public function getLdapSigning() + { + return $this->ldap_signing; + } + + /** + * Specifies whether or not the LDAP traffic needs to be signed. + * + * Generated from protobuf field bool ldap_signing = 18; + * @param bool $var + * @return $this + */ + public function setLdapSigning($var) + { + GPBUtil::checkBool($var); + $this->ldap_signing = $var; + + return $this; + } + + /** + * If enabled, traffic between the SMB server to Domain Controller (DC) will + * be encrypted. + * + * Generated from protobuf field bool encrypt_dc_connections = 19; + * @return bool + */ + public function getEncryptDcConnections() + { + return $this->encrypt_dc_connections; + } + + /** + * If enabled, traffic between the SMB server to Domain Controller (DC) will + * be encrypted. + * + * Generated from protobuf field bool encrypt_dc_connections = 19; + * @param bool $var + * @return $this + */ + public function setEncryptDcConnections($var) + { + GPBUtil::checkBool($var); + $this->encrypt_dc_connections = $var; + + return $this; + } + + /** + * Labels for the active directory. + * + * Generated from protobuf field map labels = 20; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Labels for the active directory. + * + * Generated from protobuf field map labels = 20; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Output only. The state details of the Active Directory. + * + * Generated from protobuf field string state_details = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getStateDetails() + { + return $this->state_details; + } + + /** + * Output only. The state details of the Active Directory. + * + * Generated from protobuf field string state_details = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setStateDetails($var) + { + GPBUtil::checkString($var, True); + $this->state_details = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ActiveDirectory/State.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ActiveDirectory/State.php new file mode 100644 index 000000000000..3a389d8644a2 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ActiveDirectory/State.php @@ -0,0 +1,99 @@ +google.cloud.netapp.v1.ActiveDirectory.State + */ +class State +{ + /** + * Unspecified Active Directory State + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Active Directory State is Creating + * + * Generated from protobuf enum CREATING = 1; + */ + const CREATING = 1; + /** + * Active Directory State is Ready + * + * Generated from protobuf enum READY = 2; + */ + const READY = 2; + /** + * Active Directory State is Updating + * + * Generated from protobuf enum UPDATING = 3; + */ + const UPDATING = 3; + /** + * Active Directory State is In use + * + * Generated from protobuf enum IN_USE = 4; + */ + const IN_USE = 4; + /** + * Active Directory State is Deleting + * + * Generated from protobuf enum DELETING = 5; + */ + const DELETING = 5; + /** + * Active Directory State is Error + * + * Generated from protobuf enum ERROR = 6; + */ + const ERROR = 6; + /** + * Active Directory State is Diagnosing. + * + * Generated from protobuf enum DIAGNOSING = 7; + */ + const DIAGNOSING = 7; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::CREATING => 'CREATING', + self::READY => 'READY', + self::UPDATING => 'UPDATING', + self::IN_USE => 'IN_USE', + self::DELETING => 'DELETING', + self::ERROR => 'ERROR', + self::DIAGNOSING => 'DIAGNOSING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\NetApp\V1\ActiveDirectory_State::class); + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Backup.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Backup.php new file mode 100644 index 000000000000..44d1e746525a --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Backup.php @@ -0,0 +1,441 @@ +google.cloud.netapp.v1.Backup + */ +class Backup extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The resource name of the backup. + * Format: + * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Output only. The backup state. + * + * Generated from protobuf field .google.cloud.netapp.v1.Backup.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * A description of the backup with 2048 characters or less. + * Requests with longer descriptions will be rejected. + * + * Generated from protobuf field string description = 3; + */ + protected $description = ''; + /** + * Output only. Size of the file system when the backup was created. When + * creating a new volume from the backup, the volume capacity will have to be + * at least as big. + * + * Generated from protobuf field int64 volume_usage_bytes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $volume_usage_bytes = 0; + /** + * Output only. Type of backup, manually created or created by a backup + * policy. + * + * Generated from protobuf field .google.cloud.netapp.v1.Backup.Type backup_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $backup_type = 0; + /** + * Volume full name of this backup belongs to. + * Format: + * `projects/{projects_id}/locations/{location}/volumes/{volume_id}` + * + * Generated from protobuf field string source_volume = 6 [(.google.api.resource_reference) = { + */ + protected $source_volume = ''; + /** + * If specified, backup will be created from the given snapshot. + * If not specified, there will be a new snapshot taken to initiate the backup + * creation. Format: + * `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}` + * + * Generated from protobuf field optional string source_snapshot = 7 [(.google.api.resource_reference) = { + */ + protected $source_snapshot = null; + /** + * Output only. The time when the backup was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Resource labels to represent user provided metadata. + * + * Generated from protobuf field map labels = 9; + */ + private $labels; + /** + * Output only. Total size of all backups in a chain in bytes = baseline + * backup size + sum(incremental backup size) + * + * Generated from protobuf field int64 chain_storage_bytes = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $chain_storage_bytes = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The resource name of the backup. + * Format: + * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}`. + * @type int $state + * Output only. The backup state. + * @type string $description + * A description of the backup with 2048 characters or less. + * Requests with longer descriptions will be rejected. + * @type int|string $volume_usage_bytes + * Output only. Size of the file system when the backup was created. When + * creating a new volume from the backup, the volume capacity will have to be + * at least as big. + * @type int $backup_type + * Output only. Type of backup, manually created or created by a backup + * policy. + * @type string $source_volume + * Volume full name of this backup belongs to. + * Format: + * `projects/{projects_id}/locations/{location}/volumes/{volume_id}` + * @type string $source_snapshot + * If specified, backup will be created from the given snapshot. + * If not specified, there will be a new snapshot taken to initiate the backup + * creation. Format: + * `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}` + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time when the backup was created. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Resource labels to represent user provided metadata. + * @type int|string $chain_storage_bytes + * Output only. Total size of all backups in a chain in bytes = baseline + * backup size + sum(incremental backup size) + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Backup::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The resource name of the backup. + * Format: + * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The resource name of the backup. + * Format: + * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The backup state. + * + * Generated from protobuf field .google.cloud.netapp.v1.Backup.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The backup state. + * + * Generated from protobuf field .google.cloud.netapp.v1.Backup.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetApp\V1\Backup\State::class); + $this->state = $var; + + return $this; + } + + /** + * A description of the backup with 2048 characters or less. + * Requests with longer descriptions will be rejected. + * + * Generated from protobuf field string description = 3; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * A description of the backup with 2048 characters or less. + * Requests with longer descriptions will be rejected. + * + * Generated from protobuf field string description = 3; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Output only. Size of the file system when the backup was created. When + * creating a new volume from the backup, the volume capacity will have to be + * at least as big. + * + * Generated from protobuf field int64 volume_usage_bytes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getVolumeUsageBytes() + { + return $this->volume_usage_bytes; + } + + /** + * Output only. Size of the file system when the backup was created. When + * creating a new volume from the backup, the volume capacity will have to be + * at least as big. + * + * Generated from protobuf field int64 volume_usage_bytes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setVolumeUsageBytes($var) + { + GPBUtil::checkInt64($var); + $this->volume_usage_bytes = $var; + + return $this; + } + + /** + * Output only. Type of backup, manually created or created by a backup + * policy. + * + * Generated from protobuf field .google.cloud.netapp.v1.Backup.Type backup_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getBackupType() + { + return $this->backup_type; + } + + /** + * Output only. Type of backup, manually created or created by a backup + * policy. + * + * Generated from protobuf field .google.cloud.netapp.v1.Backup.Type backup_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setBackupType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetApp\V1\Backup\Type::class); + $this->backup_type = $var; + + return $this; + } + + /** + * Volume full name of this backup belongs to. + * Format: + * `projects/{projects_id}/locations/{location}/volumes/{volume_id}` + * + * Generated from protobuf field string source_volume = 6 [(.google.api.resource_reference) = { + * @return string + */ + public function getSourceVolume() + { + return $this->source_volume; + } + + /** + * Volume full name of this backup belongs to. + * Format: + * `projects/{projects_id}/locations/{location}/volumes/{volume_id}` + * + * Generated from protobuf field string source_volume = 6 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setSourceVolume($var) + { + GPBUtil::checkString($var, True); + $this->source_volume = $var; + + return $this; + } + + /** + * If specified, backup will be created from the given snapshot. + * If not specified, there will be a new snapshot taken to initiate the backup + * creation. Format: + * `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}` + * + * Generated from protobuf field optional string source_snapshot = 7 [(.google.api.resource_reference) = { + * @return string + */ + public function getSourceSnapshot() + { + return isset($this->source_snapshot) ? $this->source_snapshot : ''; + } + + public function hasSourceSnapshot() + { + return isset($this->source_snapshot); + } + + public function clearSourceSnapshot() + { + unset($this->source_snapshot); + } + + /** + * If specified, backup will be created from the given snapshot. + * If not specified, there will be a new snapshot taken to initiate the backup + * creation. Format: + * `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}` + * + * Generated from protobuf field optional string source_snapshot = 7 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setSourceSnapshot($var) + { + GPBUtil::checkString($var, True); + $this->source_snapshot = $var; + + return $this; + } + + /** + * Output only. The time when the backup was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The time when the backup was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Resource labels to represent user provided metadata. + * + * Generated from protobuf field map labels = 9; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Resource labels to represent user provided metadata. + * + * Generated from protobuf field map labels = 9; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Output only. Total size of all backups in a chain in bytes = baseline + * backup size + sum(incremental backup size) + * + * Generated from protobuf field int64 chain_storage_bytes = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getChainStorageBytes() + { + return $this->chain_storage_bytes; + } + + /** + * Output only. Total size of all backups in a chain in bytes = baseline + * backup size + sum(incremental backup size) + * + * Generated from protobuf field int64 chain_storage_bytes = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setChainStorageBytes($var) + { + GPBUtil::checkInt64($var); + $this->chain_storage_bytes = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Backup/State.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Backup/State.php new file mode 100644 index 000000000000..f70f0dc677d5 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Backup/State.php @@ -0,0 +1,96 @@ +google.cloud.netapp.v1.Backup.State + */ +class State +{ + /** + * State not set. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Backup is being created. While in this state, the snapshot for the backup + * point-in-time may not have been created yet, and so the point-in-time may + * not have been fixed. + * + * Generated from protobuf enum CREATING = 1; + */ + const CREATING = 1; + /** + * Backup is being uploaded. While in this state, none of the writes to the + * volume will be included in the backup. + * + * Generated from protobuf enum UPLOADING = 2; + */ + const UPLOADING = 2; + /** + * Backup is available for use. + * + * Generated from protobuf enum READY = 3; + */ + const READY = 3; + /** + * Backup is being deleted. + * + * Generated from protobuf enum DELETING = 4; + */ + const DELETING = 4; + /** + * Backup is not valid and cannot be used for creating new volumes or + * restoring existing volumes. + * + * Generated from protobuf enum ERROR = 5; + */ + const ERROR = 5; + /** + * Backup is being updated. + * + * Generated from protobuf enum UPDATING = 6; + */ + const UPDATING = 6; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::CREATING => 'CREATING', + self::UPLOADING => 'UPLOADING', + self::READY => 'READY', + self::DELETING => 'DELETING', + self::ERROR => 'ERROR', + self::UPDATING => 'UPDATING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\NetApp\V1\Backup_State::class); + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Backup/Type.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Backup/Type.php new file mode 100644 index 000000000000..0ab607ae7d6d --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Backup/Type.php @@ -0,0 +1,64 @@ +google.cloud.netapp.v1.Backup.Type + */ +class Type +{ + /** + * Unspecified backup type. + * + * Generated from protobuf enum TYPE_UNSPECIFIED = 0; + */ + const TYPE_UNSPECIFIED = 0; + /** + * Manual backup type. + * + * Generated from protobuf enum MANUAL = 1; + */ + const MANUAL = 1; + /** + * Scheduled backup type. + * + * Generated from protobuf enum SCHEDULED = 2; + */ + const SCHEDULED = 2; + + private static $valueToName = [ + self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', + self::MANUAL => 'MANUAL', + self::SCHEDULED => 'SCHEDULED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Type::class, \Google\Cloud\NetApp\V1\Backup_Type::class); + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/BackupConfig.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/BackupConfig.php new file mode 100644 index 000000000000..93f0b682ab39 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/BackupConfig.php @@ -0,0 +1,209 @@ +google.cloud.netapp.v1.BackupConfig + */ +class BackupConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. When specified, schedule backups will be created based on the + * policy configuration. + * + * Generated from protobuf field repeated string backup_policies = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + private $backup_policies; + /** + * Optional. Name of backup vault. + * Format: + * projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id} + * + * Generated from protobuf field string backup_vault = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $backup_vault = ''; + /** + * Optional. When set to true, scheduled backup is enabled on the volume. + * This field should be nil when there's no backup policy attached. + * + * Generated from protobuf field optional bool scheduled_backup_enabled = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $scheduled_backup_enabled = null; + /** + * Output only. Total size of all backups in a chain in bytes = baseline + * backup size + sum(incremental backup size). + * + * Generated from protobuf field optional int64 backup_chain_bytes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $backup_chain_bytes = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $backup_policies + * Optional. When specified, schedule backups will be created based on the + * policy configuration. + * @type string $backup_vault + * Optional. Name of backup vault. + * Format: + * projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id} + * @type bool $scheduled_backup_enabled + * Optional. When set to true, scheduled backup is enabled on the volume. + * This field should be nil when there's no backup policy attached. + * @type int|string $backup_chain_bytes + * Output only. Total size of all backups in a chain in bytes = baseline + * backup size + sum(incremental backup size). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Volume::initOnce(); + parent::__construct($data); + } + + /** + * Optional. When specified, schedule backups will be created based on the + * policy configuration. + * + * Generated from protobuf field repeated string backup_policies = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getBackupPolicies() + { + return $this->backup_policies; + } + + /** + * Optional. When specified, schedule backups will be created based on the + * policy configuration. + * + * Generated from protobuf field repeated string backup_policies = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setBackupPolicies($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->backup_policies = $arr; + + return $this; + } + + /** + * Optional. Name of backup vault. + * Format: + * projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id} + * + * Generated from protobuf field string backup_vault = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getBackupVault() + { + return $this->backup_vault; + } + + /** + * Optional. Name of backup vault. + * Format: + * projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id} + * + * Generated from protobuf field string backup_vault = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setBackupVault($var) + { + GPBUtil::checkString($var, True); + $this->backup_vault = $var; + + return $this; + } + + /** + * Optional. When set to true, scheduled backup is enabled on the volume. + * This field should be nil when there's no backup policy attached. + * + * Generated from protobuf field optional bool scheduled_backup_enabled = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getScheduledBackupEnabled() + { + return isset($this->scheduled_backup_enabled) ? $this->scheduled_backup_enabled : false; + } + + public function hasScheduledBackupEnabled() + { + return isset($this->scheduled_backup_enabled); + } + + public function clearScheduledBackupEnabled() + { + unset($this->scheduled_backup_enabled); + } + + /** + * Optional. When set to true, scheduled backup is enabled on the volume. + * This field should be nil when there's no backup policy attached. + * + * Generated from protobuf field optional bool scheduled_backup_enabled = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setScheduledBackupEnabled($var) + { + GPBUtil::checkBool($var); + $this->scheduled_backup_enabled = $var; + + return $this; + } + + /** + * Output only. Total size of all backups in a chain in bytes = baseline + * backup size + sum(incremental backup size). + * + * Generated from protobuf field optional int64 backup_chain_bytes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getBackupChainBytes() + { + return isset($this->backup_chain_bytes) ? $this->backup_chain_bytes : 0; + } + + public function hasBackupChainBytes() + { + return isset($this->backup_chain_bytes); + } + + public function clearBackupChainBytes() + { + unset($this->backup_chain_bytes); + } + + /** + * Output only. Total size of all backups in a chain in bytes = baseline + * backup size + sum(incremental backup size). + * + * Generated from protobuf field optional int64 backup_chain_bytes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setBackupChainBytes($var) + { + GPBUtil::checkInt64($var); + $this->backup_chain_bytes = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/BackupPolicy.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/BackupPolicy.php new file mode 100644 index 000000000000..4da6f34e30a1 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/BackupPolicy.php @@ -0,0 +1,471 @@ +google.cloud.netapp.v1.BackupPolicy + */ +class BackupPolicy extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The resource name of the backup policy. + * Format: + * `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Number of daily backups to keep. Note that the minimum daily backup limit + * is 2. + * + * Generated from protobuf field optional int32 daily_backup_limit = 2; + */ + protected $daily_backup_limit = null; + /** + * Number of weekly backups to keep. Note that the sum of daily, weekly and + * monthly backups should be greater than 1. + * + * Generated from protobuf field optional int32 weekly_backup_limit = 3; + */ + protected $weekly_backup_limit = null; + /** + * Number of monthly backups to keep. Note that the sum of daily, weekly and + * monthly backups should be greater than 1. + * + * Generated from protobuf field optional int32 monthly_backup_limit = 4; + */ + protected $monthly_backup_limit = null; + /** + * Description of the backup policy. + * + * Generated from protobuf field optional string description = 5; + */ + protected $description = null; + /** + * If enabled, make backups automatically according to the schedules. + * This will be applied to all volumes that have this policy attached and + * enforced on volume level. If not specified, default is true. + * + * Generated from protobuf field optional bool enabled = 6; + */ + protected $enabled = null; + /** + * Output only. The total number of volumes assigned by this backup policy. + * + * Generated from protobuf field optional int32 assigned_volume_count = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $assigned_volume_count = null; + /** + * Output only. The time when the backup policy was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Resource labels to represent user provided metadata. + * + * Generated from protobuf field map labels = 9; + */ + private $labels; + /** + * Output only. The backup policy state. + * + * Generated from protobuf field .google.cloud.netapp.v1.BackupPolicy.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The resource name of the backup policy. + * Format: + * `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}`. + * @type int $daily_backup_limit + * Number of daily backups to keep. Note that the minimum daily backup limit + * is 2. + * @type int $weekly_backup_limit + * Number of weekly backups to keep. Note that the sum of daily, weekly and + * monthly backups should be greater than 1. + * @type int $monthly_backup_limit + * Number of monthly backups to keep. Note that the sum of daily, weekly and + * monthly backups should be greater than 1. + * @type string $description + * Description of the backup policy. + * @type bool $enabled + * If enabled, make backups automatically according to the schedules. + * This will be applied to all volumes that have this policy attached and + * enforced on volume level. If not specified, default is true. + * @type int $assigned_volume_count + * Output only. The total number of volumes assigned by this backup policy. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time when the backup policy was created. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Resource labels to represent user provided metadata. + * @type int $state + * Output only. The backup policy state. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\BackupPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The resource name of the backup policy. + * Format: + * `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The resource name of the backup policy. + * Format: + * `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Number of daily backups to keep. Note that the minimum daily backup limit + * is 2. + * + * Generated from protobuf field optional int32 daily_backup_limit = 2; + * @return int + */ + public function getDailyBackupLimit() + { + return isset($this->daily_backup_limit) ? $this->daily_backup_limit : 0; + } + + public function hasDailyBackupLimit() + { + return isset($this->daily_backup_limit); + } + + public function clearDailyBackupLimit() + { + unset($this->daily_backup_limit); + } + + /** + * Number of daily backups to keep. Note that the minimum daily backup limit + * is 2. + * + * Generated from protobuf field optional int32 daily_backup_limit = 2; + * @param int $var + * @return $this + */ + public function setDailyBackupLimit($var) + { + GPBUtil::checkInt32($var); + $this->daily_backup_limit = $var; + + return $this; + } + + /** + * Number of weekly backups to keep. Note that the sum of daily, weekly and + * monthly backups should be greater than 1. + * + * Generated from protobuf field optional int32 weekly_backup_limit = 3; + * @return int + */ + public function getWeeklyBackupLimit() + { + return isset($this->weekly_backup_limit) ? $this->weekly_backup_limit : 0; + } + + public function hasWeeklyBackupLimit() + { + return isset($this->weekly_backup_limit); + } + + public function clearWeeklyBackupLimit() + { + unset($this->weekly_backup_limit); + } + + /** + * Number of weekly backups to keep. Note that the sum of daily, weekly and + * monthly backups should be greater than 1. + * + * Generated from protobuf field optional int32 weekly_backup_limit = 3; + * @param int $var + * @return $this + */ + public function setWeeklyBackupLimit($var) + { + GPBUtil::checkInt32($var); + $this->weekly_backup_limit = $var; + + return $this; + } + + /** + * Number of monthly backups to keep. Note that the sum of daily, weekly and + * monthly backups should be greater than 1. + * + * Generated from protobuf field optional int32 monthly_backup_limit = 4; + * @return int + */ + public function getMonthlyBackupLimit() + { + return isset($this->monthly_backup_limit) ? $this->monthly_backup_limit : 0; + } + + public function hasMonthlyBackupLimit() + { + return isset($this->monthly_backup_limit); + } + + public function clearMonthlyBackupLimit() + { + unset($this->monthly_backup_limit); + } + + /** + * Number of monthly backups to keep. Note that the sum of daily, weekly and + * monthly backups should be greater than 1. + * + * Generated from protobuf field optional int32 monthly_backup_limit = 4; + * @param int $var + * @return $this + */ + public function setMonthlyBackupLimit($var) + { + GPBUtil::checkInt32($var); + $this->monthly_backup_limit = $var; + + return $this; + } + + /** + * Description of the backup policy. + * + * Generated from protobuf field optional string description = 5; + * @return string + */ + public function getDescription() + { + return isset($this->description) ? $this->description : ''; + } + + public function hasDescription() + { + return isset($this->description); + } + + public function clearDescription() + { + unset($this->description); + } + + /** + * Description of the backup policy. + * + * Generated from protobuf field optional string description = 5; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * If enabled, make backups automatically according to the schedules. + * This will be applied to all volumes that have this policy attached and + * enforced on volume level. If not specified, default is true. + * + * Generated from protobuf field optional bool enabled = 6; + * @return bool + */ + public function getEnabled() + { + return isset($this->enabled) ? $this->enabled : false; + } + + public function hasEnabled() + { + return isset($this->enabled); + } + + public function clearEnabled() + { + unset($this->enabled); + } + + /** + * If enabled, make backups automatically according to the schedules. + * This will be applied to all volumes that have this policy attached and + * enforced on volume level. If not specified, default is true. + * + * Generated from protobuf field optional bool enabled = 6; + * @param bool $var + * @return $this + */ + public function setEnabled($var) + { + GPBUtil::checkBool($var); + $this->enabled = $var; + + return $this; + } + + /** + * Output only. The total number of volumes assigned by this backup policy. + * + * Generated from protobuf field optional int32 assigned_volume_count = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getAssignedVolumeCount() + { + return isset($this->assigned_volume_count) ? $this->assigned_volume_count : 0; + } + + public function hasAssignedVolumeCount() + { + return isset($this->assigned_volume_count); + } + + public function clearAssignedVolumeCount() + { + unset($this->assigned_volume_count); + } + + /** + * Output only. The total number of volumes assigned by this backup policy. + * + * Generated from protobuf field optional int32 assigned_volume_count = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setAssignedVolumeCount($var) + { + GPBUtil::checkInt32($var); + $this->assigned_volume_count = $var; + + return $this; + } + + /** + * Output only. The time when the backup policy was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The time when the backup policy was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Resource labels to represent user provided metadata. + * + * Generated from protobuf field map labels = 9; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Resource labels to represent user provided metadata. + * + * Generated from protobuf field map labels = 9; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Output only. The backup policy state. + * + * Generated from protobuf field .google.cloud.netapp.v1.BackupPolicy.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The backup policy state. + * + * Generated from protobuf field .google.cloud.netapp.v1.BackupPolicy.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetApp\V1\BackupPolicy\State::class); + $this->state = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/BackupPolicy/State.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/BackupPolicy/State.php new file mode 100644 index 000000000000..db7d55ef4764 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/BackupPolicy/State.php @@ -0,0 +1,83 @@ +google.cloud.netapp.v1.BackupPolicy.State + */ +class State +{ + /** + * State not set. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * BackupPolicy is being created. + * + * Generated from protobuf enum CREATING = 1; + */ + const CREATING = 1; + /** + * BackupPolicy is available for use. + * + * Generated from protobuf enum READY = 2; + */ + const READY = 2; + /** + * BackupPolicy is being deleted. + * + * Generated from protobuf enum DELETING = 3; + */ + const DELETING = 3; + /** + * BackupPolicy is not valid and cannot be used. + * + * Generated from protobuf enum ERROR = 4; + */ + const ERROR = 4; + /** + * BackupPolicy is being updated. + * + * Generated from protobuf enum UPDATING = 5; + */ + const UPDATING = 5; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::CREATING => 'CREATING', + self::READY => 'READY', + self::DELETING => 'DELETING', + self::ERROR => 'ERROR', + self::UPDATING => 'UPDATING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\NetApp\V1\BackupPolicy_State::class); + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/BackupVault.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/BackupVault.php new file mode 100644 index 000000000000..c75d20e047a6 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/BackupVault.php @@ -0,0 +1,221 @@ +google.cloud.netapp.v1.BackupVault + */ +class BackupVault extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The resource name of the backup vault. + * Format: + * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Output only. The backup vault state. + * + * Generated from protobuf field .google.cloud.netapp.v1.BackupVault.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. Create time of the backup vault. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Description of the backup vault. + * + * Generated from protobuf field string description = 4; + */ + protected $description = ''; + /** + * Resource labels to represent user provided metadata. + * + * Generated from protobuf field map labels = 5; + */ + private $labels; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The resource name of the backup vault. + * Format: + * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`. + * @type int $state + * Output only. The backup vault state. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Create time of the backup vault. + * @type string $description + * Description of the backup vault. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Resource labels to represent user provided metadata. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\BackupVault::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The resource name of the backup vault. + * Format: + * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The resource name of the backup vault. + * Format: + * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The backup vault state. + * + * Generated from protobuf field .google.cloud.netapp.v1.BackupVault.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The backup vault state. + * + * Generated from protobuf field .google.cloud.netapp.v1.BackupVault.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetApp\V1\BackupVault\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. Create time of the backup vault. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. Create time of the backup vault. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Description of the backup vault. + * + * Generated from protobuf field string description = 4; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Description of the backup vault. + * + * Generated from protobuf field string description = 4; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Resource labels to represent user provided metadata. + * + * Generated from protobuf field map labels = 5; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Resource labels to represent user provided metadata. + * + * Generated from protobuf field map labels = 5; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/BackupVault/State.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/BackupVault/State.php new file mode 100644 index 000000000000..8fdad3c342b9 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/BackupVault/State.php @@ -0,0 +1,85 @@ +google.cloud.netapp.v1.BackupVault.State + */ +class State +{ + /** + * State not set. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * BackupVault is being created. + * + * Generated from protobuf enum CREATING = 1; + */ + const CREATING = 1; + /** + * BackupVault is available for use. + * + * Generated from protobuf enum READY = 2; + */ + const READY = 2; + /** + * BackupVault is being deleted. + * + * Generated from protobuf enum DELETING = 3; + */ + const DELETING = 3; + /** + * BackupVault is not valid and cannot be used. + * + * Generated from protobuf enum ERROR = 4; + */ + const ERROR = 4; + /** + * BackupVault is being updated. + * + * Generated from protobuf enum UPDATING = 5; + */ + const UPDATING = 5; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::CREATING => 'CREATING', + self::READY => 'READY', + self::DELETING => 'DELETING', + self::ERROR => 'ERROR', + self::UPDATING => 'UPDATING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\NetApp\V1\BackupVault_State::class); + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateActiveDirectoryRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateActiveDirectoryRequest.php new file mode 100644 index 000000000000..85f410d1b5f7 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateActiveDirectoryRequest.php @@ -0,0 +1,178 @@ +google.cloud.netapp.v1.CreateActiveDirectoryRequest + */ +class CreateActiveDirectoryRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Value for parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Fields of the to be created active directory. + * + * Generated from protobuf field .google.cloud.netapp.v1.ActiveDirectory active_directory = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $active_directory = null; + /** + * Required. ID of the active directory to create. Must be unique within the + * parent resource. Must contain only letters, numbers and hyphen, with the + * first character a letter , the last a letter or a number, and a 63 + * character maximum. + * + * Generated from protobuf field string active_directory_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $active_directory_id = ''; + + /** + * @param string $parent Required. Value for parent. Please see + * {@see NetAppClient::locationName()} for help formatting this field. + * @param \Google\Cloud\NetApp\V1\ActiveDirectory $activeDirectory Required. Fields of the to be created active directory. + * @param string $activeDirectoryId Required. ID of the active directory to create. Must be unique within the + * parent resource. Must contain only letters, numbers and hyphen, with the + * first character a letter , the last a letter or a number, and a 63 + * character maximum. + * + * @return \Google\Cloud\NetApp\V1\CreateActiveDirectoryRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\NetApp\V1\ActiveDirectory $activeDirectory, string $activeDirectoryId): self + { + return (new self()) + ->setParent($parent) + ->setActiveDirectory($activeDirectory) + ->setActiveDirectoryId($activeDirectoryId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Value for parent. + * @type \Google\Cloud\NetApp\V1\ActiveDirectory $active_directory + * Required. Fields of the to be created active directory. + * @type string $active_directory_id + * Required. ID of the active directory to create. Must be unique within the + * parent resource. Must contain only letters, numbers and hyphen, with the + * first character a letter , the last a letter or a number, and a 63 + * character maximum. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\ActiveDirectory::initOnce(); + parent::__construct($data); + } + + /** + * Required. Value for parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Value for parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. Fields of the to be created active directory. + * + * Generated from protobuf field .google.cloud.netapp.v1.ActiveDirectory active_directory = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetApp\V1\ActiveDirectory|null + */ + public function getActiveDirectory() + { + return $this->active_directory; + } + + public function hasActiveDirectory() + { + return isset($this->active_directory); + } + + public function clearActiveDirectory() + { + unset($this->active_directory); + } + + /** + * Required. Fields of the to be created active directory. + * + * Generated from protobuf field .google.cloud.netapp.v1.ActiveDirectory active_directory = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetApp\V1\ActiveDirectory $var + * @return $this + */ + public function setActiveDirectory($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetApp\V1\ActiveDirectory::class); + $this->active_directory = $var; + + return $this; + } + + /** + * Required. ID of the active directory to create. Must be unique within the + * parent resource. Must contain only letters, numbers and hyphen, with the + * first character a letter , the last a letter or a number, and a 63 + * character maximum. + * + * Generated from protobuf field string active_directory_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getActiveDirectoryId() + { + return $this->active_directory_id; + } + + /** + * Required. ID of the active directory to create. Must be unique within the + * parent resource. Must contain only letters, numbers and hyphen, with the + * first character a letter , the last a letter or a number, and a 63 + * character maximum. + * + * Generated from protobuf field string active_directory_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setActiveDirectoryId($var) + { + GPBUtil::checkString($var, True); + $this->active_directory_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateBackupPolicyRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateBackupPolicyRequest.php new file mode 100644 index 000000000000..3141db1c5cb2 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateBackupPolicyRequest.php @@ -0,0 +1,188 @@ +google.cloud.netapp.v1.CreateBackupPolicyRequest + */ +class CreateBackupPolicyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The location to create the backup policies of, in the format + * `projects/{project_id}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. A backupPolicy resource + * + * Generated from protobuf field .google.cloud.netapp.v1.BackupPolicy backup_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $backup_policy = null; + /** + * Required. The ID to use for the backup policy. + * The ID must be unique within the specified location. + * Must contain only letters, numbers and hyphen, with the first + * character a letter, the last a letter or a + * number, and a 63 character maximum. + * + * Generated from protobuf field string backup_policy_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $backup_policy_id = ''; + + /** + * @param string $parent Required. The location to create the backup policies of, in the format + * `projects/{project_id}/locations/{location}` + * Please see {@see NetAppClient::locationName()} for help formatting this field. + * @param \Google\Cloud\NetApp\V1\BackupPolicy $backupPolicy Required. A backupPolicy resource + * @param string $backupPolicyId Required. The ID to use for the backup policy. + * The ID must be unique within the specified location. + * Must contain only letters, numbers and hyphen, with the first + * character a letter, the last a letter or a + * number, and a 63 character maximum. + * + * @return \Google\Cloud\NetApp\V1\CreateBackupPolicyRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\NetApp\V1\BackupPolicy $backupPolicy, string $backupPolicyId): self + { + return (new self()) + ->setParent($parent) + ->setBackupPolicy($backupPolicy) + ->setBackupPolicyId($backupPolicyId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The location to create the backup policies of, in the format + * `projects/{project_id}/locations/{location}` + * @type \Google\Cloud\NetApp\V1\BackupPolicy $backup_policy + * Required. A backupPolicy resource + * @type string $backup_policy_id + * Required. The ID to use for the backup policy. + * The ID must be unique within the specified location. + * Must contain only letters, numbers and hyphen, with the first + * character a letter, the last a letter or a + * number, and a 63 character maximum. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\BackupPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. The location to create the backup policies of, in the format + * `projects/{project_id}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The location to create the backup policies of, in the format + * `projects/{project_id}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. A backupPolicy resource + * + * Generated from protobuf field .google.cloud.netapp.v1.BackupPolicy backup_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetApp\V1\BackupPolicy|null + */ + public function getBackupPolicy() + { + return $this->backup_policy; + } + + public function hasBackupPolicy() + { + return isset($this->backup_policy); + } + + public function clearBackupPolicy() + { + unset($this->backup_policy); + } + + /** + * Required. A backupPolicy resource + * + * Generated from protobuf field .google.cloud.netapp.v1.BackupPolicy backup_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetApp\V1\BackupPolicy $var + * @return $this + */ + public function setBackupPolicy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetApp\V1\BackupPolicy::class); + $this->backup_policy = $var; + + return $this; + } + + /** + * Required. The ID to use for the backup policy. + * The ID must be unique within the specified location. + * Must contain only letters, numbers and hyphen, with the first + * character a letter, the last a letter or a + * number, and a 63 character maximum. + * + * Generated from protobuf field string backup_policy_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getBackupPolicyId() + { + return $this->backup_policy_id; + } + + /** + * Required. The ID to use for the backup policy. + * The ID must be unique within the specified location. + * Must contain only letters, numbers and hyphen, with the first + * character a letter, the last a letter or a + * number, and a 63 character maximum. + * + * Generated from protobuf field string backup_policy_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setBackupPolicyId($var) + { + GPBUtil::checkString($var, True); + $this->backup_policy_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateBackupRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateBackupRequest.php new file mode 100644 index 000000000000..c596eeff07b0 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateBackupRequest.php @@ -0,0 +1,188 @@ +google.cloud.netapp.v1.CreateBackupRequest + */ +class CreateBackupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The NetApp backupVault to create the backups of, in the format + * `projects/*/locations/*/backupVaults/{backup_vault_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The ID to use for the backup. + * The ID must be unique within the specified backupVault. + * Must contain only letters, numbers and hyphen, with the first + * character a letter, the last a letter or a + * number, and a 63 character maximum. + * + * Generated from protobuf field string backup_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $backup_id = ''; + /** + * Required. A backup resource + * + * Generated from protobuf field .google.cloud.netapp.v1.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $backup = null; + + /** + * @param string $parent Required. The NetApp backupVault to create the backups of, in the format + * `projects/*/locations/*/backupVaults/{backup_vault_id}` + * Please see {@see NetAppClient::backupVaultName()} for help formatting this field. + * @param \Google\Cloud\NetApp\V1\Backup $backup Required. A backup resource + * @param string $backupId Required. The ID to use for the backup. + * The ID must be unique within the specified backupVault. + * Must contain only letters, numbers and hyphen, with the first + * character a letter, the last a letter or a + * number, and a 63 character maximum. + * + * @return \Google\Cloud\NetApp\V1\CreateBackupRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\NetApp\V1\Backup $backup, string $backupId): self + { + return (new self()) + ->setParent($parent) + ->setBackup($backup) + ->setBackupId($backupId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The NetApp backupVault to create the backups of, in the format + * `projects/*/locations/*/backupVaults/{backup_vault_id}` + * @type string $backup_id + * Required. The ID to use for the backup. + * The ID must be unique within the specified backupVault. + * Must contain only letters, numbers and hyphen, with the first + * character a letter, the last a letter or a + * number, and a 63 character maximum. + * @type \Google\Cloud\NetApp\V1\Backup $backup + * Required. A backup resource + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Backup::initOnce(); + parent::__construct($data); + } + + /** + * Required. The NetApp backupVault to create the backups of, in the format + * `projects/*/locations/*/backupVaults/{backup_vault_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The NetApp backupVault to create the backups of, in the format + * `projects/*/locations/*/backupVaults/{backup_vault_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The ID to use for the backup. + * The ID must be unique within the specified backupVault. + * Must contain only letters, numbers and hyphen, with the first + * character a letter, the last a letter or a + * number, and a 63 character maximum. + * + * Generated from protobuf field string backup_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getBackupId() + { + return $this->backup_id; + } + + /** + * Required. The ID to use for the backup. + * The ID must be unique within the specified backupVault. + * Must contain only letters, numbers and hyphen, with the first + * character a letter, the last a letter or a + * number, and a 63 character maximum. + * + * Generated from protobuf field string backup_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setBackupId($var) + { + GPBUtil::checkString($var, True); + $this->backup_id = $var; + + return $this; + } + + /** + * Required. A backup resource + * + * Generated from protobuf field .google.cloud.netapp.v1.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetApp\V1\Backup|null + */ + public function getBackup() + { + return $this->backup; + } + + public function hasBackup() + { + return isset($this->backup); + } + + public function clearBackup() + { + unset($this->backup); + } + + /** + * Required. A backup resource + * + * Generated from protobuf field .google.cloud.netapp.v1.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetApp\V1\Backup $var + * @return $this + */ + public function setBackup($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetApp\V1\Backup::class); + $this->backup = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateBackupVaultRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateBackupVaultRequest.php new file mode 100644 index 000000000000..ca894cae60dd --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateBackupVaultRequest.php @@ -0,0 +1,188 @@ +google.cloud.netapp.v1.CreateBackupVaultRequest + */ +class CreateBackupVaultRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The location to create the backup vaults, in the format + * `projects/{project_id}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The ID to use for the backupVault. + * The ID must be unique within the specified location. + * Must contain only letters, numbers and hyphen, with the first + * character a letter, the last a letter or a + * number, and a 63 character maximum. + * + * Generated from protobuf field string backup_vault_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $backup_vault_id = ''; + /** + * Required. A backupVault resource + * + * Generated from protobuf field .google.cloud.netapp.v1.BackupVault backup_vault = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $backup_vault = null; + + /** + * @param string $parent Required. The location to create the backup vaults, in the format + * `projects/{project_id}/locations/{location}` + * Please see {@see NetAppClient::locationName()} for help formatting this field. + * @param \Google\Cloud\NetApp\V1\BackupVault $backupVault Required. A backupVault resource + * @param string $backupVaultId Required. The ID to use for the backupVault. + * The ID must be unique within the specified location. + * Must contain only letters, numbers and hyphen, with the first + * character a letter, the last a letter or a + * number, and a 63 character maximum. + * + * @return \Google\Cloud\NetApp\V1\CreateBackupVaultRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\NetApp\V1\BackupVault $backupVault, string $backupVaultId): self + { + return (new self()) + ->setParent($parent) + ->setBackupVault($backupVault) + ->setBackupVaultId($backupVaultId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The location to create the backup vaults, in the format + * `projects/{project_id}/locations/{location}` + * @type string $backup_vault_id + * Required. The ID to use for the backupVault. + * The ID must be unique within the specified location. + * Must contain only letters, numbers and hyphen, with the first + * character a letter, the last a letter or a + * number, and a 63 character maximum. + * @type \Google\Cloud\NetApp\V1\BackupVault $backup_vault + * Required. A backupVault resource + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\BackupVault::initOnce(); + parent::__construct($data); + } + + /** + * Required. The location to create the backup vaults, in the format + * `projects/{project_id}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The location to create the backup vaults, in the format + * `projects/{project_id}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The ID to use for the backupVault. + * The ID must be unique within the specified location. + * Must contain only letters, numbers and hyphen, with the first + * character a letter, the last a letter or a + * number, and a 63 character maximum. + * + * Generated from protobuf field string backup_vault_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getBackupVaultId() + { + return $this->backup_vault_id; + } + + /** + * Required. The ID to use for the backupVault. + * The ID must be unique within the specified location. + * Must contain only letters, numbers and hyphen, with the first + * character a letter, the last a letter or a + * number, and a 63 character maximum. + * + * Generated from protobuf field string backup_vault_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setBackupVaultId($var) + { + GPBUtil::checkString($var, True); + $this->backup_vault_id = $var; + + return $this; + } + + /** + * Required. A backupVault resource + * + * Generated from protobuf field .google.cloud.netapp.v1.BackupVault backup_vault = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetApp\V1\BackupVault|null + */ + public function getBackupVault() + { + return $this->backup_vault; + } + + public function hasBackupVault() + { + return isset($this->backup_vault); + } + + public function clearBackupVault() + { + unset($this->backup_vault); + } + + /** + * Required. A backupVault resource + * + * Generated from protobuf field .google.cloud.netapp.v1.BackupVault backup_vault = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetApp\V1\BackupVault $var + * @return $this + */ + public function setBackupVault($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetApp\V1\BackupVault::class); + $this->backup_vault = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateKmsConfigRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateKmsConfigRequest.php new file mode 100644 index 000000000000..7de6031f29f5 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateKmsConfigRequest.php @@ -0,0 +1,178 @@ +google.cloud.netapp.v1.CreateKmsConfigRequest + */ +class CreateKmsConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Value for parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Id of the requesting KmsConfig. Must be unique within the parent + * resource. Must contain only letters, numbers and hyphen, with the first + * character a letter, the last a letter or a + * number, and a 63 character maximum. + * + * Generated from protobuf field string kms_config_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $kms_config_id = ''; + /** + * Required. The required parameters to create a new KmsConfig. + * + * Generated from protobuf field .google.cloud.netapp.v1.KmsConfig kms_config = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $kms_config = null; + + /** + * @param string $parent Required. Value for parent. Please see + * {@see NetAppClient::locationName()} for help formatting this field. + * @param \Google\Cloud\NetApp\V1\KmsConfig $kmsConfig Required. The required parameters to create a new KmsConfig. + * @param string $kmsConfigId Required. Id of the requesting KmsConfig. Must be unique within the parent + * resource. Must contain only letters, numbers and hyphen, with the first + * character a letter, the last a letter or a + * number, and a 63 character maximum. + * + * @return \Google\Cloud\NetApp\V1\CreateKmsConfigRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\NetApp\V1\KmsConfig $kmsConfig, string $kmsConfigId): self + { + return (new self()) + ->setParent($parent) + ->setKmsConfig($kmsConfig) + ->setKmsConfigId($kmsConfigId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Value for parent. + * @type string $kms_config_id + * Required. Id of the requesting KmsConfig. Must be unique within the parent + * resource. Must contain only letters, numbers and hyphen, with the first + * character a letter, the last a letter or a + * number, and a 63 character maximum. + * @type \Google\Cloud\NetApp\V1\KmsConfig $kms_config + * Required. The required parameters to create a new KmsConfig. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Kms::initOnce(); + parent::__construct($data); + } + + /** + * Required. Value for parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Value for parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. Id of the requesting KmsConfig. Must be unique within the parent + * resource. Must contain only letters, numbers and hyphen, with the first + * character a letter, the last a letter or a + * number, and a 63 character maximum. + * + * Generated from protobuf field string kms_config_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getKmsConfigId() + { + return $this->kms_config_id; + } + + /** + * Required. Id of the requesting KmsConfig. Must be unique within the parent + * resource. Must contain only letters, numbers and hyphen, with the first + * character a letter, the last a letter or a + * number, and a 63 character maximum. + * + * Generated from protobuf field string kms_config_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setKmsConfigId($var) + { + GPBUtil::checkString($var, True); + $this->kms_config_id = $var; + + return $this; + } + + /** + * Required. The required parameters to create a new KmsConfig. + * + * Generated from protobuf field .google.cloud.netapp.v1.KmsConfig kms_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetApp\V1\KmsConfig|null + */ + public function getKmsConfig() + { + return $this->kms_config; + } + + public function hasKmsConfig() + { + return isset($this->kms_config); + } + + public function clearKmsConfig() + { + unset($this->kms_config); + } + + /** + * Required. The required parameters to create a new KmsConfig. + * + * Generated from protobuf field .google.cloud.netapp.v1.KmsConfig kms_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetApp\V1\KmsConfig $var + * @return $this + */ + public function setKmsConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetApp\V1\KmsConfig::class); + $this->kms_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateReplicationRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateReplicationRequest.php new file mode 100644 index 000000000000..e47ad2bac9ce --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateReplicationRequest.php @@ -0,0 +1,183 @@ +google.cloud.netapp.v1.CreateReplicationRequest + */ +class CreateReplicationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The NetApp volume to create the replications of, in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. A replication resource + * + * Generated from protobuf field .google.cloud.netapp.v1.Replication replication = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $replication = null; + /** + * Required. ID of the replication to create. Must be unique within the parent + * resource. Must contain only letters, numbers and hyphen, with the first + * character a letter, the last a letter or a + * number, and a 63 character maximum. + * + * Generated from protobuf field string replication_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $replication_id = ''; + + /** + * @param string $parent Required. The NetApp volume to create the replications of, in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}` + * Please see {@see NetAppClient::volumeName()} for help formatting this field. + * @param \Google\Cloud\NetApp\V1\Replication $replication Required. A replication resource + * @param string $replicationId Required. ID of the replication to create. Must be unique within the parent + * resource. Must contain only letters, numbers and hyphen, with the first + * character a letter, the last a letter or a + * number, and a 63 character maximum. + * + * @return \Google\Cloud\NetApp\V1\CreateReplicationRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\NetApp\V1\Replication $replication, string $replicationId): self + { + return (new self()) + ->setParent($parent) + ->setReplication($replication) + ->setReplicationId($replicationId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The NetApp volume to create the replications of, in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}` + * @type \Google\Cloud\NetApp\V1\Replication $replication + * Required. A replication resource + * @type string $replication_id + * Required. ID of the replication to create. Must be unique within the parent + * resource. Must contain only letters, numbers and hyphen, with the first + * character a letter, the last a letter or a + * number, and a 63 character maximum. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Replication::initOnce(); + parent::__construct($data); + } + + /** + * Required. The NetApp volume to create the replications of, in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The NetApp volume to create the replications of, in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. A replication resource + * + * Generated from protobuf field .google.cloud.netapp.v1.Replication replication = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetApp\V1\Replication|null + */ + public function getReplication() + { + return $this->replication; + } + + public function hasReplication() + { + return isset($this->replication); + } + + public function clearReplication() + { + unset($this->replication); + } + + /** + * Required. A replication resource + * + * Generated from protobuf field .google.cloud.netapp.v1.Replication replication = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetApp\V1\Replication $var + * @return $this + */ + public function setReplication($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetApp\V1\Replication::class); + $this->replication = $var; + + return $this; + } + + /** + * Required. ID of the replication to create. Must be unique within the parent + * resource. Must contain only letters, numbers and hyphen, with the first + * character a letter, the last a letter or a + * number, and a 63 character maximum. + * + * Generated from protobuf field string replication_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getReplicationId() + { + return $this->replication_id; + } + + /** + * Required. ID of the replication to create. Must be unique within the parent + * resource. Must contain only letters, numbers and hyphen, with the first + * character a letter, the last a letter or a + * number, and a 63 character maximum. + * + * Generated from protobuf field string replication_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setReplicationId($var) + { + GPBUtil::checkString($var, True); + $this->replication_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateSnapshotRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateSnapshotRequest.php new file mode 100644 index 000000000000..0056836998ea --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateSnapshotRequest.php @@ -0,0 +1,183 @@ +google.cloud.netapp.v1.CreateSnapshotRequest + */ +class CreateSnapshotRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The NetApp volume to create the snapshots of, in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. A snapshot resource + * + * Generated from protobuf field .google.cloud.netapp.v1.Snapshot snapshot = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $snapshot = null; + /** + * Required. ID of the snapshot to create. Must be unique within the parent + * resource. Must contain only letters, numbers and hyphen, with the first + * character a letter, the last a letter or a + * number, and a 63 character maximum. + * + * Generated from protobuf field string snapshot_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $snapshot_id = ''; + + /** + * @param string $parent Required. The NetApp volume to create the snapshots of, in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}` + * Please see {@see NetAppClient::volumeName()} for help formatting this field. + * @param \Google\Cloud\NetApp\V1\Snapshot $snapshot Required. A snapshot resource + * @param string $snapshotId Required. ID of the snapshot to create. Must be unique within the parent + * resource. Must contain only letters, numbers and hyphen, with the first + * character a letter, the last a letter or a + * number, and a 63 character maximum. + * + * @return \Google\Cloud\NetApp\V1\CreateSnapshotRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\NetApp\V1\Snapshot $snapshot, string $snapshotId): self + { + return (new self()) + ->setParent($parent) + ->setSnapshot($snapshot) + ->setSnapshotId($snapshotId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The NetApp volume to create the snapshots of, in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}` + * @type \Google\Cloud\NetApp\V1\Snapshot $snapshot + * Required. A snapshot resource + * @type string $snapshot_id + * Required. ID of the snapshot to create. Must be unique within the parent + * resource. Must contain only letters, numbers and hyphen, with the first + * character a letter, the last a letter or a + * number, and a 63 character maximum. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Snapshot::initOnce(); + parent::__construct($data); + } + + /** + * Required. The NetApp volume to create the snapshots of, in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The NetApp volume to create the snapshots of, in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. A snapshot resource + * + * Generated from protobuf field .google.cloud.netapp.v1.Snapshot snapshot = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetApp\V1\Snapshot|null + */ + public function getSnapshot() + { + return $this->snapshot; + } + + public function hasSnapshot() + { + return isset($this->snapshot); + } + + public function clearSnapshot() + { + unset($this->snapshot); + } + + /** + * Required. A snapshot resource + * + * Generated from protobuf field .google.cloud.netapp.v1.Snapshot snapshot = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetApp\V1\Snapshot $var + * @return $this + */ + public function setSnapshot($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetApp\V1\Snapshot::class); + $this->snapshot = $var; + + return $this; + } + + /** + * Required. ID of the snapshot to create. Must be unique within the parent + * resource. Must contain only letters, numbers and hyphen, with the first + * character a letter, the last a letter or a + * number, and a 63 character maximum. + * + * Generated from protobuf field string snapshot_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getSnapshotId() + { + return $this->snapshot_id; + } + + /** + * Required. ID of the snapshot to create. Must be unique within the parent + * resource. Must contain only letters, numbers and hyphen, with the first + * character a letter, the last a letter or a + * number, and a 63 character maximum. + * + * Generated from protobuf field string snapshot_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setSnapshotId($var) + { + GPBUtil::checkString($var, True); + $this->snapshot_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateStoragePoolRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateStoragePoolRequest.php new file mode 100644 index 000000000000..3a318931d7d9 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateStoragePoolRequest.php @@ -0,0 +1,178 @@ +google.cloud.netapp.v1.CreateStoragePoolRequest + */ +class CreateStoragePoolRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Value for parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Id of the requesting storage pool. Must be unique within the + * parent resource. Must contain only letters, numbers and hyphen, with the + * first character a letter, the last a letter or a number, and a 63 character + * maximum. + * + * Generated from protobuf field string storage_pool_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $storage_pool_id = ''; + /** + * Required. The required parameters to create a new storage pool. + * + * Generated from protobuf field .google.cloud.netapp.v1.StoragePool storage_pool = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $storage_pool = null; + + /** + * @param string $parent Required. Value for parent. Please see + * {@see NetAppClient::locationName()} for help formatting this field. + * @param \Google\Cloud\NetApp\V1\StoragePool $storagePool Required. The required parameters to create a new storage pool. + * @param string $storagePoolId Required. Id of the requesting storage pool. Must be unique within the + * parent resource. Must contain only letters, numbers and hyphen, with the + * first character a letter, the last a letter or a number, and a 63 character + * maximum. + * + * @return \Google\Cloud\NetApp\V1\CreateStoragePoolRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\NetApp\V1\StoragePool $storagePool, string $storagePoolId): self + { + return (new self()) + ->setParent($parent) + ->setStoragePool($storagePool) + ->setStoragePoolId($storagePoolId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Value for parent. + * @type string $storage_pool_id + * Required. Id of the requesting storage pool. Must be unique within the + * parent resource. Must contain only letters, numbers and hyphen, with the + * first character a letter, the last a letter or a number, and a 63 character + * maximum. + * @type \Google\Cloud\NetApp\V1\StoragePool $storage_pool + * Required. The required parameters to create a new storage pool. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\StoragePool::initOnce(); + parent::__construct($data); + } + + /** + * Required. Value for parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Value for parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. Id of the requesting storage pool. Must be unique within the + * parent resource. Must contain only letters, numbers and hyphen, with the + * first character a letter, the last a letter or a number, and a 63 character + * maximum. + * + * Generated from protobuf field string storage_pool_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getStoragePoolId() + { + return $this->storage_pool_id; + } + + /** + * Required. Id of the requesting storage pool. Must be unique within the + * parent resource. Must contain only letters, numbers and hyphen, with the + * first character a letter, the last a letter or a number, and a 63 character + * maximum. + * + * Generated from protobuf field string storage_pool_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setStoragePoolId($var) + { + GPBUtil::checkString($var, True); + $this->storage_pool_id = $var; + + return $this; + } + + /** + * Required. The required parameters to create a new storage pool. + * + * Generated from protobuf field .google.cloud.netapp.v1.StoragePool storage_pool = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetApp\V1\StoragePool|null + */ + public function getStoragePool() + { + return $this->storage_pool; + } + + public function hasStoragePool() + { + return isset($this->storage_pool); + } + + public function clearStoragePool() + { + unset($this->storage_pool); + } + + /** + * Required. The required parameters to create a new storage pool. + * + * Generated from protobuf field .google.cloud.netapp.v1.StoragePool storage_pool = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetApp\V1\StoragePool $var + * @return $this + */ + public function setStoragePool($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetApp\V1\StoragePool::class); + $this->storage_pool = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateVolumeRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateVolumeRequest.php new file mode 100644 index 000000000000..835184512afe --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateVolumeRequest.php @@ -0,0 +1,178 @@ +google.cloud.netapp.v1.CreateVolumeRequest + */ +class CreateVolumeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Value for parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Id of the requesting volume. Must be unique within the parent + * resource. Must contain only letters, numbers and hyphen, with the first + * character a letter, the last a letter or a number, + * and a 63 character maximum. + * + * Generated from protobuf field string volume_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $volume_id = ''; + /** + * Required. The volume being created. + * + * Generated from protobuf field .google.cloud.netapp.v1.Volume volume = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $volume = null; + + /** + * @param string $parent Required. Value for parent. Please see + * {@see NetAppClient::locationName()} for help formatting this field. + * @param \Google\Cloud\NetApp\V1\Volume $volume Required. The volume being created. + * @param string $volumeId Required. Id of the requesting volume. Must be unique within the parent + * resource. Must contain only letters, numbers and hyphen, with the first + * character a letter, the last a letter or a number, + * and a 63 character maximum. + * + * @return \Google\Cloud\NetApp\V1\CreateVolumeRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\NetApp\V1\Volume $volume, string $volumeId): self + { + return (new self()) + ->setParent($parent) + ->setVolume($volume) + ->setVolumeId($volumeId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Value for parent. + * @type string $volume_id + * Required. Id of the requesting volume. Must be unique within the parent + * resource. Must contain only letters, numbers and hyphen, with the first + * character a letter, the last a letter or a number, + * and a 63 character maximum. + * @type \Google\Cloud\NetApp\V1\Volume $volume + * Required. The volume being created. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Volume::initOnce(); + parent::__construct($data); + } + + /** + * Required. Value for parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Value for parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. Id of the requesting volume. Must be unique within the parent + * resource. Must contain only letters, numbers and hyphen, with the first + * character a letter, the last a letter or a number, + * and a 63 character maximum. + * + * Generated from protobuf field string volume_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getVolumeId() + { + return $this->volume_id; + } + + /** + * Required. Id of the requesting volume. Must be unique within the parent + * resource. Must contain only letters, numbers and hyphen, with the first + * character a letter, the last a letter or a number, + * and a 63 character maximum. + * + * Generated from protobuf field string volume_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setVolumeId($var) + { + GPBUtil::checkString($var, True); + $this->volume_id = $var; + + return $this; + } + + /** + * Required. The volume being created. + * + * Generated from protobuf field .google.cloud.netapp.v1.Volume volume = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetApp\V1\Volume|null + */ + public function getVolume() + { + return $this->volume; + } + + public function hasVolume() + { + return isset($this->volume); + } + + public function clearVolume() + { + unset($this->volume); + } + + /** + * Required. The volume being created. + * + * Generated from protobuf field .google.cloud.netapp.v1.Volume volume = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetApp\V1\Volume $var + * @return $this + */ + public function setVolume($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetApp\V1\Volume::class); + $this->volume = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DailySchedule.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DailySchedule.php new file mode 100644 index 000000000000..fb07517b84df --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DailySchedule.php @@ -0,0 +1,169 @@ +google.cloud.netapp.v1.DailySchedule + */ +class DailySchedule extends \Google\Protobuf\Internal\Message +{ + /** + * The maximum number of Snapshots to keep for the hourly schedule + * + * Generated from protobuf field optional double snapshots_to_keep = 1; + */ + protected $snapshots_to_keep = null; + /** + * Set the minute of the hour to start the snapshot (0-59), defaults to the + * top of the hour (0). + * + * Generated from protobuf field optional double minute = 2; + */ + protected $minute = null; + /** + * Set the hour to start the snapshot (0-23), defaults to midnight (0). + * + * Generated from protobuf field optional double hour = 3; + */ + protected $hour = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $snapshots_to_keep + * The maximum number of Snapshots to keep for the hourly schedule + * @type float $minute + * Set the minute of the hour to start the snapshot (0-59), defaults to the + * top of the hour (0). + * @type float $hour + * Set the hour to start the snapshot (0-23), defaults to midnight (0). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Volume::initOnce(); + parent::__construct($data); + } + + /** + * The maximum number of Snapshots to keep for the hourly schedule + * + * Generated from protobuf field optional double snapshots_to_keep = 1; + * @return float + */ + public function getSnapshotsToKeep() + { + return isset($this->snapshots_to_keep) ? $this->snapshots_to_keep : 0.0; + } + + public function hasSnapshotsToKeep() + { + return isset($this->snapshots_to_keep); + } + + public function clearSnapshotsToKeep() + { + unset($this->snapshots_to_keep); + } + + /** + * The maximum number of Snapshots to keep for the hourly schedule + * + * Generated from protobuf field optional double snapshots_to_keep = 1; + * @param float $var + * @return $this + */ + public function setSnapshotsToKeep($var) + { + GPBUtil::checkDouble($var); + $this->snapshots_to_keep = $var; + + return $this; + } + + /** + * Set the minute of the hour to start the snapshot (0-59), defaults to the + * top of the hour (0). + * + * Generated from protobuf field optional double minute = 2; + * @return float + */ + public function getMinute() + { + return isset($this->minute) ? $this->minute : 0.0; + } + + public function hasMinute() + { + return isset($this->minute); + } + + public function clearMinute() + { + unset($this->minute); + } + + /** + * Set the minute of the hour to start the snapshot (0-59), defaults to the + * top of the hour (0). + * + * Generated from protobuf field optional double minute = 2; + * @param float $var + * @return $this + */ + public function setMinute($var) + { + GPBUtil::checkDouble($var); + $this->minute = $var; + + return $this; + } + + /** + * Set the hour to start the snapshot (0-23), defaults to midnight (0). + * + * Generated from protobuf field optional double hour = 3; + * @return float + */ + public function getHour() + { + return isset($this->hour) ? $this->hour : 0.0; + } + + public function hasHour() + { + return isset($this->hour); + } + + public function clearHour() + { + unset($this->hour); + } + + /** + * Set the hour to start the snapshot (0-23), defaults to midnight (0). + * + * Generated from protobuf field optional double hour = 3; + * @param float $var + * @return $this + */ + public function setHour($var) + { + GPBUtil::checkDouble($var); + $this->hour = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteActiveDirectoryRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteActiveDirectoryRequest.php new file mode 100644 index 000000000000..9f85f133b428 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteActiveDirectoryRequest.php @@ -0,0 +1,81 @@ +google.cloud.netapp.v1.DeleteActiveDirectoryRequest + */ +class DeleteActiveDirectoryRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the active directory. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Name of the active directory. Please see + * {@see NetAppClient::activeDirectoryName()} for help formatting this field. + * + * @return \Google\Cloud\NetApp\V1\DeleteActiveDirectoryRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the active directory. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\ActiveDirectory::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the active directory. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the active directory. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteBackupPolicyRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteBackupPolicyRequest.php new file mode 100644 index 000000000000..524eae53e7bf --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteBackupPolicyRequest.php @@ -0,0 +1,86 @@ +google.cloud.netapp.v1.DeleteBackupPolicyRequest + */ +class DeleteBackupPolicyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The backup policy resource name, in the format + * `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The backup policy resource name, in the format + * `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}` + * Please see {@see NetAppClient::backupPolicyName()} for help formatting this field. + * + * @return \Google\Cloud\NetApp\V1\DeleteBackupPolicyRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The backup policy resource name, in the format + * `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\BackupPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. The backup policy resource name, in the format + * `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The backup policy resource name, in the format + * `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteBackupRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteBackupRequest.php new file mode 100644 index 000000000000..3b976a408b57 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteBackupRequest.php @@ -0,0 +1,86 @@ +google.cloud.netapp.v1.DeleteBackupRequest + */ +class DeleteBackupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The backup resource name, in the format + * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The backup resource name, in the format + * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}` + * Please see {@see NetAppClient::backupName()} for help formatting this field. + * + * @return \Google\Cloud\NetApp\V1\DeleteBackupRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The backup resource name, in the format + * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Backup::initOnce(); + parent::__construct($data); + } + + /** + * Required. The backup resource name, in the format + * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The backup resource name, in the format + * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteBackupVaultRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteBackupVaultRequest.php new file mode 100644 index 000000000000..fa16dbed13a5 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteBackupVaultRequest.php @@ -0,0 +1,86 @@ +google.cloud.netapp.v1.DeleteBackupVaultRequest + */ +class DeleteBackupVaultRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The backupVault resource name, in the format + * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The backupVault resource name, in the format + * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}` + * Please see {@see NetAppClient::backupVaultName()} for help formatting this field. + * + * @return \Google\Cloud\NetApp\V1\DeleteBackupVaultRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The backupVault resource name, in the format + * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\BackupVault::initOnce(); + parent::__construct($data); + } + + /** + * Required. The backupVault resource name, in the format + * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The backupVault resource name, in the format + * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteKmsConfigRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteKmsConfigRequest.php new file mode 100644 index 000000000000..368fe489c48a --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteKmsConfigRequest.php @@ -0,0 +1,81 @@ +google.cloud.netapp.v1.DeleteKmsConfigRequest + */ +class DeleteKmsConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the KmsConfig. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Name of the KmsConfig. Please see + * {@see NetAppClient::kmsConfigName()} for help formatting this field. + * + * @return \Google\Cloud\NetApp\V1\DeleteKmsConfigRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the KmsConfig. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Kms::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the KmsConfig. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the KmsConfig. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteReplicationRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteReplicationRequest.php new file mode 100644 index 000000000000..e22c8d6c3e0a --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteReplicationRequest.php @@ -0,0 +1,86 @@ +google.cloud.netapp.v1.DeleteReplicationRequest + */ +class DeleteReplicationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The replication resource name, in the format + * `projects/*/locations/*/volumes/*/replications/{replication_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The replication resource name, in the format + * `projects/*/locations/*/volumes/*/replications/{replication_id}` + * Please see {@see NetAppClient::replicationName()} for help formatting this field. + * + * @return \Google\Cloud\NetApp\V1\DeleteReplicationRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The replication resource name, in the format + * `projects/*/locations/*/volumes/*/replications/{replication_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Replication::initOnce(); + parent::__construct($data); + } + + /** + * Required. The replication resource name, in the format + * `projects/*/locations/*/volumes/*/replications/{replication_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The replication resource name, in the format + * `projects/*/locations/*/volumes/*/replications/{replication_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteSnapshotRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteSnapshotRequest.php new file mode 100644 index 000000000000..90dfc2ca707f --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteSnapshotRequest.php @@ -0,0 +1,86 @@ +google.cloud.netapp.v1.DeleteSnapshotRequest + */ +class DeleteSnapshotRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The snapshot resource name, in the format + * `projects/*/locations/*/volumes/*/snapshots/{snapshot_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The snapshot resource name, in the format + * `projects/*/locations/*/volumes/*/snapshots/{snapshot_id}` + * Please see {@see NetAppClient::snapshotName()} for help formatting this field. + * + * @return \Google\Cloud\NetApp\V1\DeleteSnapshotRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The snapshot resource name, in the format + * `projects/*/locations/*/volumes/*/snapshots/{snapshot_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Snapshot::initOnce(); + parent::__construct($data); + } + + /** + * Required. The snapshot resource name, in the format + * `projects/*/locations/*/volumes/*/snapshots/{snapshot_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The snapshot resource name, in the format + * `projects/*/locations/*/volumes/*/snapshots/{snapshot_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteStoragePoolRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteStoragePoolRequest.php new file mode 100644 index 000000000000..44252d0f2869 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteStoragePoolRequest.php @@ -0,0 +1,81 @@ +google.cloud.netapp.v1.DeleteStoragePoolRequest + */ +class DeleteStoragePoolRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the storage pool + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Name of the storage pool + * Please see {@see NetAppClient::storagePoolName()} for help formatting this field. + * + * @return \Google\Cloud\NetApp\V1\DeleteStoragePoolRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the storage pool + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\StoragePool::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the storage pool + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the storage pool + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteVolumeRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteVolumeRequest.php new file mode 100644 index 000000000000..93bbaa37288f --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteVolumeRequest.php @@ -0,0 +1,123 @@ +google.cloud.netapp.v1.DeleteVolumeRequest + */ +class DeleteVolumeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the volume + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * If this field is set as true, CCFE will not block the volume resource + * deletion even if it has any snapshots resource. (Otherwise, the request + * will only work if the volume has no snapshots.) + * + * Generated from protobuf field bool force = 2; + */ + protected $force = false; + + /** + * @param string $name Required. Name of the volume + * Please see {@see NetAppClient::volumeName()} for help formatting this field. + * + * @return \Google\Cloud\NetApp\V1\DeleteVolumeRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the volume + * @type bool $force + * If this field is set as true, CCFE will not block the volume resource + * deletion even if it has any snapshots resource. (Otherwise, the request + * will only work if the volume has no snapshots.) + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Volume::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the volume + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the volume + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * If this field is set as true, CCFE will not block the volume resource + * deletion even if it has any snapshots resource. (Otherwise, the request + * will only work if the volume has no snapshots.) + * + * Generated from protobuf field bool force = 2; + * @return bool + */ + public function getForce() + { + return $this->force; + } + + /** + * If this field is set as true, CCFE will not block the volume resource + * deletion even if it has any snapshots resource. (Otherwise, the request + * will only work if the volume has no snapshots.) + * + * Generated from protobuf field bool force = 2; + * @param bool $var + * @return $this + */ + public function setForce($var) + { + GPBUtil::checkBool($var); + $this->force = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DestinationVolumeParameters.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DestinationVolumeParameters.php new file mode 100644 index 000000000000..c16912726bb3 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DestinationVolumeParameters.php @@ -0,0 +1,240 @@ +google.cloud.netapp.v1.DestinationVolumeParameters + */ +class DestinationVolumeParameters extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Existing destination StoragePool name. + * + * Generated from protobuf field string storage_pool = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $storage_pool = ''; + /** + * Desired destination volume resource id. If not specified, source volume's + * resource id will be used. + * This value must start with a lowercase letter followed by up to 62 + * lowercase letters, numbers, or hyphens, and cannot end with a hyphen. + * + * Generated from protobuf field string volume_id = 2; + */ + protected $volume_id = ''; + /** + * Destination volume's share name. If not specified, source volume's share + * name will be used. + * + * Generated from protobuf field string share_name = 3; + */ + protected $share_name = ''; + /** + * Description for the destination volume. + * + * Generated from protobuf field optional string description = 4; + */ + protected $description = null; + /** + * Optional. Tiering policy for the volume. + * + * Generated from protobuf field optional .google.cloud.netapp.v1.TieringPolicy tiering_policy = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $tiering_policy = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $storage_pool + * Required. Existing destination StoragePool name. + * @type string $volume_id + * Desired destination volume resource id. If not specified, source volume's + * resource id will be used. + * This value must start with a lowercase letter followed by up to 62 + * lowercase letters, numbers, or hyphens, and cannot end with a hyphen. + * @type string $share_name + * Destination volume's share name. If not specified, source volume's share + * name will be used. + * @type string $description + * Description for the destination volume. + * @type \Google\Cloud\NetApp\V1\TieringPolicy $tiering_policy + * Optional. Tiering policy for the volume. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Replication::initOnce(); + parent::__construct($data); + } + + /** + * Required. Existing destination StoragePool name. + * + * Generated from protobuf field string storage_pool = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getStoragePool() + { + return $this->storage_pool; + } + + /** + * Required. Existing destination StoragePool name. + * + * Generated from protobuf field string storage_pool = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setStoragePool($var) + { + GPBUtil::checkString($var, True); + $this->storage_pool = $var; + + return $this; + } + + /** + * Desired destination volume resource id. If not specified, source volume's + * resource id will be used. + * This value must start with a lowercase letter followed by up to 62 + * lowercase letters, numbers, or hyphens, and cannot end with a hyphen. + * + * Generated from protobuf field string volume_id = 2; + * @return string + */ + public function getVolumeId() + { + return $this->volume_id; + } + + /** + * Desired destination volume resource id. If not specified, source volume's + * resource id will be used. + * This value must start with a lowercase letter followed by up to 62 + * lowercase letters, numbers, or hyphens, and cannot end with a hyphen. + * + * Generated from protobuf field string volume_id = 2; + * @param string $var + * @return $this + */ + public function setVolumeId($var) + { + GPBUtil::checkString($var, True); + $this->volume_id = $var; + + return $this; + } + + /** + * Destination volume's share name. If not specified, source volume's share + * name will be used. + * + * Generated from protobuf field string share_name = 3; + * @return string + */ + public function getShareName() + { + return $this->share_name; + } + + /** + * Destination volume's share name. If not specified, source volume's share + * name will be used. + * + * Generated from protobuf field string share_name = 3; + * @param string $var + * @return $this + */ + public function setShareName($var) + { + GPBUtil::checkString($var, True); + $this->share_name = $var; + + return $this; + } + + /** + * Description for the destination volume. + * + * Generated from protobuf field optional string description = 4; + * @return string + */ + public function getDescription() + { + return isset($this->description) ? $this->description : ''; + } + + public function hasDescription() + { + return isset($this->description); + } + + public function clearDescription() + { + unset($this->description); + } + + /** + * Description for the destination volume. + * + * Generated from protobuf field optional string description = 4; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Optional. Tiering policy for the volume. + * + * Generated from protobuf field optional .google.cloud.netapp.v1.TieringPolicy tiering_policy = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\NetApp\V1\TieringPolicy|null + */ + public function getTieringPolicy() + { + return $this->tiering_policy; + } + + public function hasTieringPolicy() + { + return isset($this->tiering_policy); + } + + public function clearTieringPolicy() + { + unset($this->tiering_policy); + } + + /** + * Optional. Tiering policy for the volume. + * + * Generated from protobuf field optional .google.cloud.netapp.v1.TieringPolicy tiering_policy = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\NetApp\V1\TieringPolicy $var + * @return $this + */ + public function setTieringPolicy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetApp\V1\TieringPolicy::class); + $this->tiering_policy = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/EncryptVolumesRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/EncryptVolumesRequest.php new file mode 100644 index 000000000000..7a744422eb39 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/EncryptVolumesRequest.php @@ -0,0 +1,67 @@ +google.cloud.netapp.v1.EncryptVolumesRequest + */ +class EncryptVolumesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the KmsConfig. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the KmsConfig. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Kms::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the KmsConfig. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the KmsConfig. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/EncryptionType.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/EncryptionType.php new file mode 100644 index 000000000000..24cfc16d5a78 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/EncryptionType.php @@ -0,0 +1,61 @@ +google.cloud.netapp.v1.EncryptionType + */ +class EncryptionType +{ + /** + * The source of the encryption key is not specified. + * + * Generated from protobuf enum ENCRYPTION_TYPE_UNSPECIFIED = 0; + */ + const ENCRYPTION_TYPE_UNSPECIFIED = 0; + /** + * Google managed encryption key. + * + * Generated from protobuf enum SERVICE_MANAGED = 1; + */ + const SERVICE_MANAGED = 1; + /** + * Customer managed encryption key, which is stored in KMS. + * + * Generated from protobuf enum CLOUD_KMS = 2; + */ + const CLOUD_KMS = 2; + + private static $valueToName = [ + self::ENCRYPTION_TYPE_UNSPECIFIED => 'ENCRYPTION_TYPE_UNSPECIFIED', + self::SERVICE_MANAGED => 'SERVICE_MANAGED', + self::CLOUD_KMS => 'CLOUD_KMS', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/EstablishPeeringRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/EstablishPeeringRequest.php new file mode 100644 index 000000000000..637a539ee544 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/EstablishPeeringRequest.php @@ -0,0 +1,220 @@ +google.cloud.netapp.v1.EstablishPeeringRequest + */ +class EstablishPeeringRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the replication, in the format of + * projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. Name of the user's local source cluster to be peered with the + * destination cluster. + * + * Generated from protobuf field string peer_cluster_name = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $peer_cluster_name = ''; + /** + * Required. Name of the user's local source vserver svm to be peered with the + * destination vserver svm. + * + * Generated from protobuf field string peer_svm_name = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $peer_svm_name = ''; + /** + * Optional. List of IPv4 ip addresses to be used for peering. + * + * Generated from protobuf field repeated string peer_ip_addresses = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $peer_ip_addresses; + /** + * Required. Name of the user's local source volume to be peered with the + * destination volume. + * + * Generated from protobuf field string peer_volume_name = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $peer_volume_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the replication, in the format of + * projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. + * @type string $peer_cluster_name + * Required. Name of the user's local source cluster to be peered with the + * destination cluster. + * @type string $peer_svm_name + * Required. Name of the user's local source vserver svm to be peered with the + * destination vserver svm. + * @type array|\Google\Protobuf\Internal\RepeatedField $peer_ip_addresses + * Optional. List of IPv4 ip addresses to be used for peering. + * @type string $peer_volume_name + * Required. Name of the user's local source volume to be peered with the + * destination volume. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Replication::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the replication, in the format of + * projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the replication, in the format of + * projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. Name of the user's local source cluster to be peered with the + * destination cluster. + * + * Generated from protobuf field string peer_cluster_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPeerClusterName() + { + return $this->peer_cluster_name; + } + + /** + * Required. Name of the user's local source cluster to be peered with the + * destination cluster. + * + * Generated from protobuf field string peer_cluster_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPeerClusterName($var) + { + GPBUtil::checkString($var, True); + $this->peer_cluster_name = $var; + + return $this; + } + + /** + * Required. Name of the user's local source vserver svm to be peered with the + * destination vserver svm. + * + * Generated from protobuf field string peer_svm_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPeerSvmName() + { + return $this->peer_svm_name; + } + + /** + * Required. Name of the user's local source vserver svm to be peered with the + * destination vserver svm. + * + * Generated from protobuf field string peer_svm_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPeerSvmName($var) + { + GPBUtil::checkString($var, True); + $this->peer_svm_name = $var; + + return $this; + } + + /** + * Optional. List of IPv4 ip addresses to be used for peering. + * + * Generated from protobuf field repeated string peer_ip_addresses = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPeerIpAddresses() + { + return $this->peer_ip_addresses; + } + + /** + * Optional. List of IPv4 ip addresses to be used for peering. + * + * Generated from protobuf field repeated string peer_ip_addresses = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPeerIpAddresses($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->peer_ip_addresses = $arr; + + return $this; + } + + /** + * Required. Name of the user's local source volume to be peered with the + * destination volume. + * + * Generated from protobuf field string peer_volume_name = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPeerVolumeName() + { + return $this->peer_volume_name; + } + + /** + * Required. Name of the user's local source volume to be peered with the + * destination volume. + * + * Generated from protobuf field string peer_volume_name = 5 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPeerVolumeName($var) + { + GPBUtil::checkString($var, True); + $this->peer_volume_name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ExportPolicy.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ExportPolicy.php new file mode 100644 index 000000000000..7452cf250eba --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ExportPolicy.php @@ -0,0 +1,67 @@ +google.cloud.netapp.v1.ExportPolicy + */ +class ExportPolicy extends \Google\Protobuf\Internal\Message +{ + /** + * Required. List of export policy rules + * + * Generated from protobuf field repeated .google.cloud.netapp.v1.SimpleExportPolicyRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private $rules; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\NetApp\V1\SimpleExportPolicyRule>|\Google\Protobuf\Internal\RepeatedField $rules + * Required. List of export policy rules + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Volume::initOnce(); + parent::__construct($data); + } + + /** + * Required. List of export policy rules + * + * Generated from protobuf field repeated .google.cloud.netapp.v1.SimpleExportPolicyRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRules() + { + return $this->rules; + } + + /** + * Required. List of export policy rules + * + * Generated from protobuf field repeated .google.cloud.netapp.v1.SimpleExportPolicyRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Cloud\NetApp\V1\SimpleExportPolicyRule>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRules($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetApp\V1\SimpleExportPolicyRule::class); + $this->rules = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetActiveDirectoryRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetActiveDirectoryRequest.php new file mode 100644 index 000000000000..8125d94acc5a --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetActiveDirectoryRequest.php @@ -0,0 +1,81 @@ +google.cloud.netapp.v1.GetActiveDirectoryRequest + */ +class GetActiveDirectoryRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the active directory. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Name of the active directory. Please see + * {@see NetAppClient::activeDirectoryName()} for help formatting this field. + * + * @return \Google\Cloud\NetApp\V1\GetActiveDirectoryRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the active directory. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\ActiveDirectory::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the active directory. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the active directory. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetBackupPolicyRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetBackupPolicyRequest.php new file mode 100644 index 000000000000..afc95a636959 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetBackupPolicyRequest.php @@ -0,0 +1,86 @@ +google.cloud.netapp.v1.GetBackupPolicyRequest + */ +class GetBackupPolicyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The backupPolicy resource name, in the format + * `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The backupPolicy resource name, in the format + * `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}` + * Please see {@see NetAppClient::backupPolicyName()} for help formatting this field. + * + * @return \Google\Cloud\NetApp\V1\GetBackupPolicyRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The backupPolicy resource name, in the format + * `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\BackupPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. The backupPolicy resource name, in the format + * `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The backupPolicy resource name, in the format + * `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetBackupRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetBackupRequest.php new file mode 100644 index 000000000000..4f40eedc772b --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetBackupRequest.php @@ -0,0 +1,86 @@ +google.cloud.netapp.v1.GetBackupRequest + */ +class GetBackupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The backup resource name, in the format + * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The backup resource name, in the format + * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}` + * Please see {@see NetAppClient::backupName()} for help formatting this field. + * + * @return \Google\Cloud\NetApp\V1\GetBackupRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The backup resource name, in the format + * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Backup::initOnce(); + parent::__construct($data); + } + + /** + * Required. The backup resource name, in the format + * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The backup resource name, in the format + * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetBackupVaultRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetBackupVaultRequest.php new file mode 100644 index 000000000000..37d04bfb3d82 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetBackupVaultRequest.php @@ -0,0 +1,86 @@ +google.cloud.netapp.v1.GetBackupVaultRequest + */ +class GetBackupVaultRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The backupVault resource name, in the format + * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The backupVault resource name, in the format + * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}` + * Please see {@see NetAppClient::backupVaultName()} for help formatting this field. + * + * @return \Google\Cloud\NetApp\V1\GetBackupVaultRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The backupVault resource name, in the format + * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\BackupVault::initOnce(); + parent::__construct($data); + } + + /** + * Required. The backupVault resource name, in the format + * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The backupVault resource name, in the format + * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetKmsConfigRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetKmsConfigRequest.php new file mode 100644 index 000000000000..391aa6fbb72a --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetKmsConfigRequest.php @@ -0,0 +1,81 @@ +google.cloud.netapp.v1.GetKmsConfigRequest + */ +class GetKmsConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the KmsConfig + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Name of the KmsConfig + * Please see {@see NetAppClient::kmsConfigName()} for help formatting this field. + * + * @return \Google\Cloud\NetApp\V1\GetKmsConfigRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the KmsConfig + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Kms::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the KmsConfig + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the KmsConfig + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetReplicationRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetReplicationRequest.php new file mode 100644 index 000000000000..456237ad8ebb --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetReplicationRequest.php @@ -0,0 +1,86 @@ +google.cloud.netapp.v1.GetReplicationRequest + */ +class GetReplicationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The replication resource name, in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The replication resource name, in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}` + * Please see {@see NetAppClient::replicationName()} for help formatting this field. + * + * @return \Google\Cloud\NetApp\V1\GetReplicationRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The replication resource name, in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Replication::initOnce(); + parent::__construct($data); + } + + /** + * Required. The replication resource name, in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The replication resource name, in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetSnapshotRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetSnapshotRequest.php new file mode 100644 index 000000000000..6bb68cf6807a --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetSnapshotRequest.php @@ -0,0 +1,86 @@ +google.cloud.netapp.v1.GetSnapshotRequest + */ +class GetSnapshotRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The snapshot resource name, in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The snapshot resource name, in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}` + * Please see {@see NetAppClient::snapshotName()} for help formatting this field. + * + * @return \Google\Cloud\NetApp\V1\GetSnapshotRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The snapshot resource name, in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Snapshot::initOnce(); + parent::__construct($data); + } + + /** + * Required. The snapshot resource name, in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The snapshot resource name, in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetStoragePoolRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetStoragePoolRequest.php new file mode 100644 index 000000000000..43f77ba0f851 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetStoragePoolRequest.php @@ -0,0 +1,81 @@ +google.cloud.netapp.v1.GetStoragePoolRequest + */ +class GetStoragePoolRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the storage pool + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Name of the storage pool + * Please see {@see NetAppClient::storagePoolName()} for help formatting this field. + * + * @return \Google\Cloud\NetApp\V1\GetStoragePoolRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the storage pool + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\StoragePool::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the storage pool + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the storage pool + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetVolumeRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetVolumeRequest.php new file mode 100644 index 000000000000..fc00eb0d5379 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetVolumeRequest.php @@ -0,0 +1,81 @@ +google.cloud.netapp.v1.GetVolumeRequest + */ +class GetVolumeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the volume + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Name of the volume + * Please see {@see NetAppClient::volumeName()} for help formatting this field. + * + * @return \Google\Cloud\NetApp\V1\GetVolumeRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the volume + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Volume::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the volume + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the volume + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/HourlySchedule.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/HourlySchedule.php new file mode 100644 index 000000000000..262ca6d4df72 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/HourlySchedule.php @@ -0,0 +1,125 @@ +google.cloud.netapp.v1.HourlySchedule + */ +class HourlySchedule extends \Google\Protobuf\Internal\Message +{ + /** + * The maximum number of Snapshots to keep for the hourly schedule + * + * Generated from protobuf field optional double snapshots_to_keep = 1; + */ + protected $snapshots_to_keep = null; + /** + * Set the minute of the hour to start the snapshot (0-59), defaults to the + * top of the hour (0). + * + * Generated from protobuf field optional double minute = 2; + */ + protected $minute = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $snapshots_to_keep + * The maximum number of Snapshots to keep for the hourly schedule + * @type float $minute + * Set the minute of the hour to start the snapshot (0-59), defaults to the + * top of the hour (0). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Volume::initOnce(); + parent::__construct($data); + } + + /** + * The maximum number of Snapshots to keep for the hourly schedule + * + * Generated from protobuf field optional double snapshots_to_keep = 1; + * @return float + */ + public function getSnapshotsToKeep() + { + return isset($this->snapshots_to_keep) ? $this->snapshots_to_keep : 0.0; + } + + public function hasSnapshotsToKeep() + { + return isset($this->snapshots_to_keep); + } + + public function clearSnapshotsToKeep() + { + unset($this->snapshots_to_keep); + } + + /** + * The maximum number of Snapshots to keep for the hourly schedule + * + * Generated from protobuf field optional double snapshots_to_keep = 1; + * @param float $var + * @return $this + */ + public function setSnapshotsToKeep($var) + { + GPBUtil::checkDouble($var); + $this->snapshots_to_keep = $var; + + return $this; + } + + /** + * Set the minute of the hour to start the snapshot (0-59), defaults to the + * top of the hour (0). + * + * Generated from protobuf field optional double minute = 2; + * @return float + */ + public function getMinute() + { + return isset($this->minute) ? $this->minute : 0.0; + } + + public function hasMinute() + { + return isset($this->minute); + } + + public function clearMinute() + { + unset($this->minute); + } + + /** + * Set the minute of the hour to start the snapshot (0-59), defaults to the + * top of the hour (0). + * + * Generated from protobuf field optional double minute = 2; + * @param float $var + * @return $this + */ + public function setMinute($var) + { + GPBUtil::checkDouble($var); + $this->minute = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/HybridPeeringDetails.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/HybridPeeringDetails.php new file mode 100644 index 000000000000..ad8cfec53387 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/HybridPeeringDetails.php @@ -0,0 +1,187 @@ +google.cloud.netapp.v1.HybridPeeringDetails + */ +class HybridPeeringDetails extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. IP address of the subnet. + * + * Generated from protobuf field string subnet_ip = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $subnet_ip = ''; + /** + * Optional. Copy-paste-able commands to be used on user's ONTAP to accept + * peering requests. + * + * Generated from protobuf field string command = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $command = ''; + /** + * Optional. Expiration time for the peering command to be executed on user's + * ONTAP. + * + * Generated from protobuf field .google.protobuf.Timestamp command_expiry_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $command_expiry_time = null; + /** + * Optional. Temporary passphrase generated to accept cluster peering command. + * + * Generated from protobuf field string passphrase = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $passphrase = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $subnet_ip + * Optional. IP address of the subnet. + * @type string $command + * Optional. Copy-paste-able commands to be used on user's ONTAP to accept + * peering requests. + * @type \Google\Protobuf\Timestamp $command_expiry_time + * Optional. Expiration time for the peering command to be executed on user's + * ONTAP. + * @type string $passphrase + * Optional. Temporary passphrase generated to accept cluster peering command. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Replication::initOnce(); + parent::__construct($data); + } + + /** + * Optional. IP address of the subnet. + * + * Generated from protobuf field string subnet_ip = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getSubnetIp() + { + return $this->subnet_ip; + } + + /** + * Optional. IP address of the subnet. + * + * Generated from protobuf field string subnet_ip = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setSubnetIp($var) + { + GPBUtil::checkString($var, True); + $this->subnet_ip = $var; + + return $this; + } + + /** + * Optional. Copy-paste-able commands to be used on user's ONTAP to accept + * peering requests. + * + * Generated from protobuf field string command = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getCommand() + { + return $this->command; + } + + /** + * Optional. Copy-paste-able commands to be used on user's ONTAP to accept + * peering requests. + * + * Generated from protobuf field string command = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setCommand($var) + { + GPBUtil::checkString($var, True); + $this->command = $var; + + return $this; + } + + /** + * Optional. Expiration time for the peering command to be executed on user's + * ONTAP. + * + * Generated from protobuf field .google.protobuf.Timestamp command_expiry_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCommandExpiryTime() + { + return $this->command_expiry_time; + } + + public function hasCommandExpiryTime() + { + return isset($this->command_expiry_time); + } + + public function clearCommandExpiryTime() + { + unset($this->command_expiry_time); + } + + /** + * Optional. Expiration time for the peering command to be executed on user's + * ONTAP. + * + * Generated from protobuf field .google.protobuf.Timestamp command_expiry_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCommandExpiryTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->command_expiry_time = $var; + + return $this; + } + + /** + * Optional. Temporary passphrase generated to accept cluster peering command. + * + * Generated from protobuf field string passphrase = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPassphrase() + { + return $this->passphrase; + } + + /** + * Optional. Temporary passphrase generated to accept cluster peering command. + * + * Generated from protobuf field string passphrase = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPassphrase($var) + { + GPBUtil::checkString($var, True); + $this->passphrase = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/HybridReplicationParameters.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/HybridReplicationParameters.php new file mode 100644 index 000000000000..1f575f542813 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/HybridReplicationParameters.php @@ -0,0 +1,329 @@ +google.cloud.netapp.v1.HybridReplicationParameters + */ +class HybridReplicationParameters extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Desired Identifier (name) of the replication which will be created for this volume. + * Format: + * `projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}` + * + * Generated from protobuf field string replication = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $replication = ''; + /** + * Required. Name of the user's local source volume to be peered with the + * destination volume. + * + * Generated from protobuf field string peer_volume_name = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $peer_volume_name = ''; + /** + * Required. Name of the user's local source cluster to be peered with the + * destination cluster. + * + * Generated from protobuf field string peer_cluster_name = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $peer_cluster_name = ''; + /** + * Required. Name of the user's local source vserver svm to be peered with the + * destination vserver svm. + * + * Generated from protobuf field string peer_svm_name = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $peer_svm_name = ''; + /** + * Required. List of node ip addresses to be peered with. + * + * Generated from protobuf field repeated string peer_ip_addresses = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + private $peer_ip_addresses; + /** + * Optional. Name of source cluster location associated with the Hybrid + * replication. This is a free-form field for the display purpose only. + * + * Generated from protobuf field string cluster_location = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $cluster_location = ''; + /** + * Optional. Description of the replication. + * + * Generated from protobuf field string description = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Optional. Labels to be added to the replication as the key value pairs. + * + * Generated from protobuf field map labels = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $replication + * Required. Desired Identifier (name) of the replication which will be created for this volume. + * Format: + * `projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}` + * @type string $peer_volume_name + * Required. Name of the user's local source volume to be peered with the + * destination volume. + * @type string $peer_cluster_name + * Required. Name of the user's local source cluster to be peered with the + * destination cluster. + * @type string $peer_svm_name + * Required. Name of the user's local source vserver svm to be peered with the + * destination vserver svm. + * @type array|\Google\Protobuf\Internal\RepeatedField $peer_ip_addresses + * Required. List of node ip addresses to be peered with. + * @type string $cluster_location + * Optional. Name of source cluster location associated with the Hybrid + * replication. This is a free-form field for the display purpose only. + * @type string $description + * Optional. Description of the replication. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. Labels to be added to the replication as the key value pairs. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Volume::initOnce(); + parent::__construct($data); + } + + /** + * Required. Desired Identifier (name) of the replication which will be created for this volume. + * Format: + * `projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}` + * + * Generated from protobuf field string replication = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getReplication() + { + return $this->replication; + } + + /** + * Required. Desired Identifier (name) of the replication which will be created for this volume. + * Format: + * `projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}` + * + * Generated from protobuf field string replication = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setReplication($var) + { + GPBUtil::checkString($var, True); + $this->replication = $var; + + return $this; + } + + /** + * Required. Name of the user's local source volume to be peered with the + * destination volume. + * + * Generated from protobuf field string peer_volume_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPeerVolumeName() + { + return $this->peer_volume_name; + } + + /** + * Required. Name of the user's local source volume to be peered with the + * destination volume. + * + * Generated from protobuf field string peer_volume_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPeerVolumeName($var) + { + GPBUtil::checkString($var, True); + $this->peer_volume_name = $var; + + return $this; + } + + /** + * Required. Name of the user's local source cluster to be peered with the + * destination cluster. + * + * Generated from protobuf field string peer_cluster_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPeerClusterName() + { + return $this->peer_cluster_name; + } + + /** + * Required. Name of the user's local source cluster to be peered with the + * destination cluster. + * + * Generated from protobuf field string peer_cluster_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPeerClusterName($var) + { + GPBUtil::checkString($var, True); + $this->peer_cluster_name = $var; + + return $this; + } + + /** + * Required. Name of the user's local source vserver svm to be peered with the + * destination vserver svm. + * + * Generated from protobuf field string peer_svm_name = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPeerSvmName() + { + return $this->peer_svm_name; + } + + /** + * Required. Name of the user's local source vserver svm to be peered with the + * destination vserver svm. + * + * Generated from protobuf field string peer_svm_name = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPeerSvmName($var) + { + GPBUtil::checkString($var, True); + $this->peer_svm_name = $var; + + return $this; + } + + /** + * Required. List of node ip addresses to be peered with. + * + * Generated from protobuf field repeated string peer_ip_addresses = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPeerIpAddresses() + { + return $this->peer_ip_addresses; + } + + /** + * Required. List of node ip addresses to be peered with. + * + * Generated from protobuf field repeated string peer_ip_addresses = 5 [(.google.api.field_behavior) = REQUIRED]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPeerIpAddresses($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->peer_ip_addresses = $arr; + + return $this; + } + + /** + * Optional. Name of source cluster location associated with the Hybrid + * replication. This is a free-form field for the display purpose only. + * + * Generated from protobuf field string cluster_location = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getClusterLocation() + { + return $this->cluster_location; + } + + /** + * Optional. Name of source cluster location associated with the Hybrid + * replication. This is a free-form field for the display purpose only. + * + * Generated from protobuf field string cluster_location = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setClusterLocation($var) + { + GPBUtil::checkString($var, True); + $this->cluster_location = $var; + + return $this; + } + + /** + * Optional. Description of the replication. + * + * Generated from protobuf field string description = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. Description of the replication. + * + * Generated from protobuf field string description = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Optional. Labels to be added to the replication as the key value pairs. + * + * Generated from protobuf field map labels = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. Labels to be added to the replication as the key value pairs. + * + * Generated from protobuf field map labels = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/KmsConfig.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/KmsConfig.php new file mode 100644 index 000000000000..944e5aec0eb9 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/KmsConfig.php @@ -0,0 +1,361 @@ +google.cloud.netapp.v1.KmsConfig + */ +class KmsConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. Name of the KmsConfig. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Required. Customer managed crypto key resource full name. Format: + * projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{key}. + * + * Generated from protobuf field string crypto_key_name = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $crypto_key_name = ''; + /** + * Output only. State of the KmsConfig. + * + * Generated from protobuf field .google.cloud.netapp.v1.KmsConfig.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. State details of the KmsConfig. + * + * Generated from protobuf field string state_details = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state_details = ''; + /** + * Output only. Create time of the KmsConfig. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Description of the KmsConfig. + * + * Generated from protobuf field string description = 6; + */ + protected $description = ''; + /** + * Labels as key value pairs + * + * Generated from protobuf field map labels = 7; + */ + private $labels; + /** + * Output only. Instructions to provide the access to the customer provided + * encryption key. + * + * Generated from protobuf field string instructions = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $instructions = ''; + /** + * Output only. The Service account which will have access to the customer + * provided encryption key. + * + * Generated from protobuf field string service_account = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $service_account = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. Name of the KmsConfig. + * @type string $crypto_key_name + * Required. Customer managed crypto key resource full name. Format: + * projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{key}. + * @type int $state + * Output only. State of the KmsConfig. + * @type string $state_details + * Output only. State details of the KmsConfig. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Create time of the KmsConfig. + * @type string $description + * Description of the KmsConfig. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Labels as key value pairs + * @type string $instructions + * Output only. Instructions to provide the access to the customer provided + * encryption key. + * @type string $service_account + * Output only. The Service account which will have access to the customer + * provided encryption key. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Kms::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. Name of the KmsConfig. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. Name of the KmsConfig. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. Customer managed crypto key resource full name. Format: + * projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{key}. + * + * Generated from protobuf field string crypto_key_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getCryptoKeyName() + { + return $this->crypto_key_name; + } + + /** + * Required. Customer managed crypto key resource full name. Format: + * projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{key}. + * + * Generated from protobuf field string crypto_key_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setCryptoKeyName($var) + { + GPBUtil::checkString($var, True); + $this->crypto_key_name = $var; + + return $this; + } + + /** + * Output only. State of the KmsConfig. + * + * Generated from protobuf field .google.cloud.netapp.v1.KmsConfig.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. State of the KmsConfig. + * + * Generated from protobuf field .google.cloud.netapp.v1.KmsConfig.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetApp\V1\KmsConfig\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. State details of the KmsConfig. + * + * Generated from protobuf field string state_details = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getStateDetails() + { + return $this->state_details; + } + + /** + * Output only. State details of the KmsConfig. + * + * Generated from protobuf field string state_details = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setStateDetails($var) + { + GPBUtil::checkString($var, True); + $this->state_details = $var; + + return $this; + } + + /** + * Output only. Create time of the KmsConfig. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. Create time of the KmsConfig. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Description of the KmsConfig. + * + * Generated from protobuf field string description = 6; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Description of the KmsConfig. + * + * Generated from protobuf field string description = 6; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Labels as key value pairs + * + * Generated from protobuf field map labels = 7; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Labels as key value pairs + * + * Generated from protobuf field map labels = 7; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Output only. Instructions to provide the access to the customer provided + * encryption key. + * + * Generated from protobuf field string instructions = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getInstructions() + { + return $this->instructions; + } + + /** + * Output only. Instructions to provide the access to the customer provided + * encryption key. + * + * Generated from protobuf field string instructions = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setInstructions($var) + { + GPBUtil::checkString($var, True); + $this->instructions = $var; + + return $this; + } + + /** + * Output only. The Service account which will have access to the customer + * provided encryption key. + * + * Generated from protobuf field string service_account = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getServiceAccount() + { + return $this->service_account; + } + + /** + * Output only. The Service account which will have access to the customer + * provided encryption key. + * + * Generated from protobuf field string service_account = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setServiceAccount($var) + { + GPBUtil::checkString($var, True); + $this->service_account = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/KmsConfig/State.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/KmsConfig/State.php new file mode 100644 index 000000000000..be95b3617df0 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/KmsConfig/State.php @@ -0,0 +1,129 @@ +google.cloud.netapp.v1.KmsConfig.State + */ +class State +{ + /** + * Unspecified KmsConfig State + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * KmsConfig State is Ready + * + * Generated from protobuf enum READY = 1; + */ + const READY = 1; + /** + * KmsConfig State is Creating + * + * Generated from protobuf enum CREATING = 2; + */ + const CREATING = 2; + /** + * KmsConfig State is Deleting + * + * Generated from protobuf enum DELETING = 3; + */ + const DELETING = 3; + /** + * KmsConfig State is Updating + * + * Generated from protobuf enum UPDATING = 4; + */ + const UPDATING = 4; + /** + * KmsConfig State is In Use. + * + * Generated from protobuf enum IN_USE = 5; + */ + const IN_USE = 5; + /** + * KmsConfig State is Error + * + * Generated from protobuf enum ERROR = 6; + */ + const ERROR = 6; + /** + * KmsConfig State is Pending to verify crypto key access. + * + * Generated from protobuf enum KEY_CHECK_PENDING = 7; + */ + const KEY_CHECK_PENDING = 7; + /** + * KmsConfig State is Not accessbile by the SDE service account to the + * crypto key. + * + * Generated from protobuf enum KEY_NOT_REACHABLE = 8; + */ + const KEY_NOT_REACHABLE = 8; + /** + * KmsConfig State is Disabling. + * + * Generated from protobuf enum DISABLING = 9; + */ + const DISABLING = 9; + /** + * KmsConfig State is Disabled. + * + * Generated from protobuf enum DISABLED = 10; + */ + const DISABLED = 10; + /** + * KmsConfig State is Migrating. + * The existing volumes are migrating from SMEK to CMEK. + * + * Generated from protobuf enum MIGRATING = 11; + */ + const MIGRATING = 11; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::READY => 'READY', + self::CREATING => 'CREATING', + self::DELETING => 'DELETING', + self::UPDATING => 'UPDATING', + self::IN_USE => 'IN_USE', + self::ERROR => 'ERROR', + self::KEY_CHECK_PENDING => 'KEY_CHECK_PENDING', + self::KEY_NOT_REACHABLE => 'KEY_NOT_REACHABLE', + self::DISABLING => 'DISABLING', + self::DISABLED => 'DISABLED', + self::MIGRATING => 'MIGRATING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\NetApp\V1\KmsConfig_State::class); + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListActiveDirectoriesRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListActiveDirectoriesRequest.php new file mode 100644 index 000000000000..4a250718ad7d --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListActiveDirectoriesRequest.php @@ -0,0 +1,221 @@ +google.cloud.netapp.v1.ListActiveDirectoriesRequest + */ +class ListActiveDirectoriesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Parent value for ListActiveDirectoriesRequest + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, the server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * Filtering results + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + /** + * Hint for how to order the results + * + * Generated from protobuf field string order_by = 5; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. Parent value for ListActiveDirectoriesRequest + * Please see {@see NetAppClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\NetApp\V1\ListActiveDirectoriesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Parent value for ListActiveDirectoriesRequest + * @type int $page_size + * Requested page size. Server may return fewer items than requested. + * If unspecified, the server will pick an appropriate default. + * @type string $page_token + * A token identifying a page of results the server should return. + * @type string $filter + * Filtering results + * @type string $order_by + * Hint for how to order the results + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\ActiveDirectory::initOnce(); + parent::__construct($data); + } + + /** + * Required. Parent value for ListActiveDirectoriesRequest + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Parent value for ListActiveDirectoriesRequest + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, the server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, the server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Filtering results + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Filtering results + * + * Generated from protobuf field string filter = 4; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Hint for how to order the results + * + * Generated from protobuf field string order_by = 5; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Hint for how to order the results + * + * Generated from protobuf field string order_by = 5; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListActiveDirectoriesResponse.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListActiveDirectoriesResponse.php new file mode 100644 index 000000000000..3a969308213a --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListActiveDirectoriesResponse.php @@ -0,0 +1,135 @@ +google.cloud.netapp.v1.ListActiveDirectoriesResponse + */ +class ListActiveDirectoriesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of active directories. + * + * Generated from protobuf field repeated .google.cloud.netapp.v1.ActiveDirectory active_directories = 1; + */ + private $active_directories; + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\NetApp\V1\ActiveDirectory>|\Google\Protobuf\Internal\RepeatedField $active_directories + * The list of active directories. + * @type string $next_page_token + * A token identifying a page of results the server should return. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\ActiveDirectory::initOnce(); + parent::__construct($data); + } + + /** + * The list of active directories. + * + * Generated from protobuf field repeated .google.cloud.netapp.v1.ActiveDirectory active_directories = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getActiveDirectories() + { + return $this->active_directories; + } + + /** + * The list of active directories. + * + * Generated from protobuf field repeated .google.cloud.netapp.v1.ActiveDirectory active_directories = 1; + * @param array<\Google\Cloud\NetApp\V1\ActiveDirectory>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setActiveDirectories($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetApp\V1\ActiveDirectory::class); + $this->active_directories = $arr; + + return $this; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListBackupPoliciesRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListBackupPoliciesRequest.php new file mode 100644 index 000000000000..3c09f390e605 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListBackupPoliciesRequest.php @@ -0,0 +1,221 @@ +google.cloud.netapp.v1.ListBackupPoliciesRequest + */ +class ListBackupPoliciesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Parent value for ListBackupPoliciesRequest + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, the server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * Filtering results + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + /** + * Hint for how to order the results + * + * Generated from protobuf field string order_by = 5; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. Parent value for ListBackupPoliciesRequest + * Please see {@see NetAppClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\NetApp\V1\ListBackupPoliciesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Parent value for ListBackupPoliciesRequest + * @type int $page_size + * Requested page size. Server may return fewer items than requested. + * If unspecified, the server will pick an appropriate default. + * @type string $page_token + * A token identifying a page of results the server should return. + * @type string $filter + * Filtering results + * @type string $order_by + * Hint for how to order the results + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\BackupPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. Parent value for ListBackupPoliciesRequest + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Parent value for ListBackupPoliciesRequest + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, the server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, the server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Filtering results + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Filtering results + * + * Generated from protobuf field string filter = 4; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Hint for how to order the results + * + * Generated from protobuf field string order_by = 5; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Hint for how to order the results + * + * Generated from protobuf field string order_by = 5; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListBackupPoliciesResponse.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListBackupPoliciesResponse.php new file mode 100644 index 000000000000..4ba28b94e4f2 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListBackupPoliciesResponse.php @@ -0,0 +1,135 @@ +google.cloud.netapp.v1.ListBackupPoliciesResponse + */ +class ListBackupPoliciesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of backup policies. + * + * Generated from protobuf field repeated .google.cloud.netapp.v1.BackupPolicy backup_policies = 1; + */ + private $backup_policies; + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\NetApp\V1\BackupPolicy>|\Google\Protobuf\Internal\RepeatedField $backup_policies + * The list of backup policies. + * @type string $next_page_token + * A token identifying a page of results the server should return. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\BackupPolicy::initOnce(); + parent::__construct($data); + } + + /** + * The list of backup policies. + * + * Generated from protobuf field repeated .google.cloud.netapp.v1.BackupPolicy backup_policies = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getBackupPolicies() + { + return $this->backup_policies; + } + + /** + * The list of backup policies. + * + * Generated from protobuf field repeated .google.cloud.netapp.v1.BackupPolicy backup_policies = 1; + * @param array<\Google\Cloud\NetApp\V1\BackupPolicy>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setBackupPolicies($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetApp\V1\BackupPolicy::class); + $this->backup_policies = $arr; + + return $this; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListBackupVaultsRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListBackupVaultsRequest.php new file mode 100644 index 000000000000..b70bf899489e --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListBackupVaultsRequest.php @@ -0,0 +1,231 @@ +google.cloud.netapp.v1.ListBackupVaultsRequest + */ +class ListBackupVaultsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The location for which to retrieve backupVault information, + * in the format + * `projects/{project_id}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of items to return. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The next_page_token value to use if there are additional + * results to retrieve for this list request. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * Sort results. Supported values are "name", "name desc" or "" (unsorted). + * + * Generated from protobuf field string order_by = 4; + */ + protected $order_by = ''; + /** + * List filter. + * + * Generated from protobuf field string filter = 5; + */ + protected $filter = ''; + + /** + * @param string $parent Required. The location for which to retrieve backupVault information, + * in the format + * `projects/{project_id}/locations/{location}`. Please see + * {@see NetAppClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\NetApp\V1\ListBackupVaultsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The location for which to retrieve backupVault information, + * in the format + * `projects/{project_id}/locations/{location}`. + * @type int $page_size + * The maximum number of items to return. + * @type string $page_token + * The next_page_token value to use if there are additional + * results to retrieve for this list request. + * @type string $order_by + * Sort results. Supported values are "name", "name desc" or "" (unsorted). + * @type string $filter + * List filter. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\BackupVault::initOnce(); + parent::__construct($data); + } + + /** + * Required. The location for which to retrieve backupVault information, + * in the format + * `projects/{project_id}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The location for which to retrieve backupVault information, + * in the format + * `projects/{project_id}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The maximum number of items to return. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of items to return. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The next_page_token value to use if there are additional + * results to retrieve for this list request. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The next_page_token value to use if there are additional + * results to retrieve for this list request. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Sort results. Supported values are "name", "name desc" or "" (unsorted). + * + * Generated from protobuf field string order_by = 4; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Sort results. Supported values are "name", "name desc" or "" (unsorted). + * + * Generated from protobuf field string order_by = 4; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + + /** + * List filter. + * + * Generated from protobuf field string filter = 5; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * List filter. + * + * Generated from protobuf field string filter = 5; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListBackupVaultsResponse.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListBackupVaultsResponse.php new file mode 100644 index 000000000000..17aeb5e202f6 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListBackupVaultsResponse.php @@ -0,0 +1,139 @@ +google.cloud.netapp.v1.ListBackupVaultsResponse + */ +class ListBackupVaultsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of backupVaults in the project for the specified location. + * + * Generated from protobuf field repeated .google.cloud.netapp.v1.BackupVault backup_vaults = 1; + */ + private $backup_vaults; + /** + * The token you can use to retrieve the next page of results. Not returned + * if there are no more results in the list. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\NetApp\V1\BackupVault>|\Google\Protobuf\Internal\RepeatedField $backup_vaults + * A list of backupVaults in the project for the specified location. + * @type string $next_page_token + * The token you can use to retrieve the next page of results. Not returned + * if there are no more results in the list. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\BackupVault::initOnce(); + parent::__construct($data); + } + + /** + * A list of backupVaults in the project for the specified location. + * + * Generated from protobuf field repeated .google.cloud.netapp.v1.BackupVault backup_vaults = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getBackupVaults() + { + return $this->backup_vaults; + } + + /** + * A list of backupVaults in the project for the specified location. + * + * Generated from protobuf field repeated .google.cloud.netapp.v1.BackupVault backup_vaults = 1; + * @param array<\Google\Cloud\NetApp\V1\BackupVault>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setBackupVaults($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetApp\V1\BackupVault::class); + $this->backup_vaults = $arr; + + return $this; + } + + /** + * The token you can use to retrieve the next page of results. Not returned + * if there are no more results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * The token you can use to retrieve the next page of results. Not returned + * if there are no more results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListBackupsRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListBackupsRequest.php new file mode 100644 index 000000000000..8d3ddd06601e --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListBackupsRequest.php @@ -0,0 +1,281 @@ +google.cloud.netapp.v1.ListBackupsRequest + */ +class ListBackupsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The backupVault for which to retrieve backup information, + * in the format + * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`. + * To retrieve backup information for all locations, use "-" for the + * `{location}` value. + * To retrieve backup information for all backupVaults, use "-" for the + * `{backup_vault_id}` value. + * To retrieve backup information for a volume, use "-" for the + * `{backup_vault_id}` value and specify volume full name with the filter. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of items to return. The service may return fewer + * than this value. The maximum value + * is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The next_page_token value to use if there are additional + * results to retrieve for this list request. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * Sort results. Supported values are "name", "name desc" or "" (unsorted). + * + * Generated from protobuf field string order_by = 4; + */ + protected $order_by = ''; + /** + * The standard list filter. + * If specified, backups will be returned based on the attribute name that + * matches the filter expression. If empty, then no backups are filtered out. + * See https://google.aip.dev/160 + * + * Generated from protobuf field string filter = 5; + */ + protected $filter = ''; + + /** + * @param string $parent Required. The backupVault for which to retrieve backup information, + * in the format + * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`. + * To retrieve backup information for all locations, use "-" for the + * `{location}` value. + * To retrieve backup information for all backupVaults, use "-" for the + * `{backup_vault_id}` value. + * To retrieve backup information for a volume, use "-" for the + * `{backup_vault_id}` value and specify volume full name with the filter. Please see + * {@see NetAppClient::backupVaultName()} for help formatting this field. + * + * @return \Google\Cloud\NetApp\V1\ListBackupsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The backupVault for which to retrieve backup information, + * in the format + * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`. + * To retrieve backup information for all locations, use "-" for the + * `{location}` value. + * To retrieve backup information for all backupVaults, use "-" for the + * `{backup_vault_id}` value. + * To retrieve backup information for a volume, use "-" for the + * `{backup_vault_id}` value and specify volume full name with the filter. + * @type int $page_size + * The maximum number of items to return. The service may return fewer + * than this value. The maximum value + * is 1000; values above 1000 will be coerced to 1000. + * @type string $page_token + * The next_page_token value to use if there are additional + * results to retrieve for this list request. + * @type string $order_by + * Sort results. Supported values are "name", "name desc" or "" (unsorted). + * @type string $filter + * The standard list filter. + * If specified, backups will be returned based on the attribute name that + * matches the filter expression. If empty, then no backups are filtered out. + * See https://google.aip.dev/160 + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Backup::initOnce(); + parent::__construct($data); + } + + /** + * Required. The backupVault for which to retrieve backup information, + * in the format + * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`. + * To retrieve backup information for all locations, use "-" for the + * `{location}` value. + * To retrieve backup information for all backupVaults, use "-" for the + * `{backup_vault_id}` value. + * To retrieve backup information for a volume, use "-" for the + * `{backup_vault_id}` value and specify volume full name with the filter. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The backupVault for which to retrieve backup information, + * in the format + * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`. + * To retrieve backup information for all locations, use "-" for the + * `{location}` value. + * To retrieve backup information for all backupVaults, use "-" for the + * `{backup_vault_id}` value. + * To retrieve backup information for a volume, use "-" for the + * `{backup_vault_id}` value and specify volume full name with the filter. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The maximum number of items to return. The service may return fewer + * than this value. The maximum value + * is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of items to return. The service may return fewer + * than this value. The maximum value + * is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The next_page_token value to use if there are additional + * results to retrieve for this list request. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The next_page_token value to use if there are additional + * results to retrieve for this list request. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Sort results. Supported values are "name", "name desc" or "" (unsorted). + * + * Generated from protobuf field string order_by = 4; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Sort results. Supported values are "name", "name desc" or "" (unsorted). + * + * Generated from protobuf field string order_by = 4; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + + /** + * The standard list filter. + * If specified, backups will be returned based on the attribute name that + * matches the filter expression. If empty, then no backups are filtered out. + * See https://google.aip.dev/160 + * + * Generated from protobuf field string filter = 5; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * The standard list filter. + * If specified, backups will be returned based on the attribute name that + * matches the filter expression. If empty, then no backups are filtered out. + * See https://google.aip.dev/160 + * + * Generated from protobuf field string filter = 5; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListBackupsResponse.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListBackupsResponse.php new file mode 100644 index 000000000000..74b5007b5630 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListBackupsResponse.php @@ -0,0 +1,139 @@ +google.cloud.netapp.v1.ListBackupsResponse + */ +class ListBackupsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of backups in the project. + * + * Generated from protobuf field repeated .google.cloud.netapp.v1.Backup backups = 1; + */ + private $backups; + /** + * The token you can use to retrieve the next page of results. Not returned + * if there are no more results in the list. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\NetApp\V1\Backup>|\Google\Protobuf\Internal\RepeatedField $backups + * A list of backups in the project. + * @type string $next_page_token + * The token you can use to retrieve the next page of results. Not returned + * if there are no more results in the list. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Backup::initOnce(); + parent::__construct($data); + } + + /** + * A list of backups in the project. + * + * Generated from protobuf field repeated .google.cloud.netapp.v1.Backup backups = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getBackups() + { + return $this->backups; + } + + /** + * A list of backups in the project. + * + * Generated from protobuf field repeated .google.cloud.netapp.v1.Backup backups = 1; + * @param array<\Google\Cloud\NetApp\V1\Backup>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setBackups($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetApp\V1\Backup::class); + $this->backups = $arr; + + return $this; + } + + /** + * The token you can use to retrieve the next page of results. Not returned + * if there are no more results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * The token you can use to retrieve the next page of results. Not returned + * if there are no more results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListKmsConfigsRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListKmsConfigsRequest.php new file mode 100644 index 000000000000..425b86bdb4c0 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListKmsConfigsRequest.php @@ -0,0 +1,221 @@ +google.cloud.netapp.v1.ListKmsConfigsRequest + */ +class ListKmsConfigsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Parent value + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of items to return. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The next_page_token value to use if there are additional + * results to retrieve for this list request. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * Sort results. Supported values are "name", "name desc" or "" (unsorted). + * + * Generated from protobuf field string order_by = 4; + */ + protected $order_by = ''; + /** + * List filter. + * + * Generated from protobuf field string filter = 5; + */ + protected $filter = ''; + + /** + * @param string $parent Required. Parent value + * Please see {@see NetAppClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\NetApp\V1\ListKmsConfigsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Parent value + * @type int $page_size + * The maximum number of items to return. + * @type string $page_token + * The next_page_token value to use if there are additional + * results to retrieve for this list request. + * @type string $order_by + * Sort results. Supported values are "name", "name desc" or "" (unsorted). + * @type string $filter + * List filter. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Kms::initOnce(); + parent::__construct($data); + } + + /** + * Required. Parent value + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Parent value + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The maximum number of items to return. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of items to return. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The next_page_token value to use if there are additional + * results to retrieve for this list request. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The next_page_token value to use if there are additional + * results to retrieve for this list request. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Sort results. Supported values are "name", "name desc" or "" (unsorted). + * + * Generated from protobuf field string order_by = 4; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Sort results. Supported values are "name", "name desc" or "" (unsorted). + * + * Generated from protobuf field string order_by = 4; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + + /** + * List filter. + * + * Generated from protobuf field string filter = 5; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * List filter. + * + * Generated from protobuf field string filter = 5; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListKmsConfigsResponse.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListKmsConfigsResponse.php new file mode 100644 index 000000000000..fd81c2db6c4a --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListKmsConfigsResponse.php @@ -0,0 +1,135 @@ +google.cloud.netapp.v1.ListKmsConfigsResponse + */ +class ListKmsConfigsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of KmsConfigs + * + * Generated from protobuf field repeated .google.cloud.netapp.v1.KmsConfig kms_configs = 1; + */ + private $kms_configs; + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\NetApp\V1\KmsConfig>|\Google\Protobuf\Internal\RepeatedField $kms_configs + * The list of KmsConfigs + * @type string $next_page_token + * A token identifying a page of results the server should return. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Kms::initOnce(); + parent::__construct($data); + } + + /** + * The list of KmsConfigs + * + * Generated from protobuf field repeated .google.cloud.netapp.v1.KmsConfig kms_configs = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getKmsConfigs() + { + return $this->kms_configs; + } + + /** + * The list of KmsConfigs + * + * Generated from protobuf field repeated .google.cloud.netapp.v1.KmsConfig kms_configs = 1; + * @param array<\Google\Cloud\NetApp\V1\KmsConfig>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setKmsConfigs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetApp\V1\KmsConfig::class); + $this->kms_configs = $arr; + + return $this; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListReplicationsRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListReplicationsRequest.php new file mode 100644 index 000000000000..094c76678204 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListReplicationsRequest.php @@ -0,0 +1,231 @@ +google.cloud.netapp.v1.ListReplicationsRequest + */ +class ListReplicationsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The volume for which to retrieve replication information, + * in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of items to return. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The next_page_token value to use if there are additional + * results to retrieve for this list request. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * Sort results. Supported values are "name", "name desc" or "" (unsorted). + * + * Generated from protobuf field string order_by = 4; + */ + protected $order_by = ''; + /** + * List filter. + * + * Generated from protobuf field string filter = 5; + */ + protected $filter = ''; + + /** + * @param string $parent Required. The volume for which to retrieve replication information, + * in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}`. Please see + * {@see NetAppClient::volumeName()} for help formatting this field. + * + * @return \Google\Cloud\NetApp\V1\ListReplicationsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The volume for which to retrieve replication information, + * in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}`. + * @type int $page_size + * The maximum number of items to return. + * @type string $page_token + * The next_page_token value to use if there are additional + * results to retrieve for this list request. + * @type string $order_by + * Sort results. Supported values are "name", "name desc" or "" (unsorted). + * @type string $filter + * List filter. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Replication::initOnce(); + parent::__construct($data); + } + + /** + * Required. The volume for which to retrieve replication information, + * in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The volume for which to retrieve replication information, + * in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The maximum number of items to return. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of items to return. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The next_page_token value to use if there are additional + * results to retrieve for this list request. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The next_page_token value to use if there are additional + * results to retrieve for this list request. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Sort results. Supported values are "name", "name desc" or "" (unsorted). + * + * Generated from protobuf field string order_by = 4; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Sort results. Supported values are "name", "name desc" or "" (unsorted). + * + * Generated from protobuf field string order_by = 4; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + + /** + * List filter. + * + * Generated from protobuf field string filter = 5; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * List filter. + * + * Generated from protobuf field string filter = 5; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListReplicationsResponse.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListReplicationsResponse.php new file mode 100644 index 000000000000..49323c831c19 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListReplicationsResponse.php @@ -0,0 +1,139 @@ +google.cloud.netapp.v1.ListReplicationsResponse + */ +class ListReplicationsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of replications in the project for the specified volume. + * + * Generated from protobuf field repeated .google.cloud.netapp.v1.Replication replications = 1; + */ + private $replications; + /** + * The token you can use to retrieve the next page of results. Not returned + * if there are no more results in the list. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\NetApp\V1\Replication>|\Google\Protobuf\Internal\RepeatedField $replications + * A list of replications in the project for the specified volume. + * @type string $next_page_token + * The token you can use to retrieve the next page of results. Not returned + * if there are no more results in the list. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Replication::initOnce(); + parent::__construct($data); + } + + /** + * A list of replications in the project for the specified volume. + * + * Generated from protobuf field repeated .google.cloud.netapp.v1.Replication replications = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getReplications() + { + return $this->replications; + } + + /** + * A list of replications in the project for the specified volume. + * + * Generated from protobuf field repeated .google.cloud.netapp.v1.Replication replications = 1; + * @param array<\Google\Cloud\NetApp\V1\Replication>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setReplications($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetApp\V1\Replication::class); + $this->replications = $arr; + + return $this; + } + + /** + * The token you can use to retrieve the next page of results. Not returned + * if there are no more results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * The token you can use to retrieve the next page of results. Not returned + * if there are no more results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListSnapshotsRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListSnapshotsRequest.php new file mode 100644 index 000000000000..d2539ad77f88 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListSnapshotsRequest.php @@ -0,0 +1,231 @@ +google.cloud.netapp.v1.ListSnapshotsRequest + */ +class ListSnapshotsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The volume for which to retrieve snapshot information, + * in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of items to return. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The next_page_token value to use if there are additional + * results to retrieve for this list request. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * Sort results. Supported values are "name", "name desc" or "" (unsorted). + * + * Generated from protobuf field string order_by = 4; + */ + protected $order_by = ''; + /** + * List filter. + * + * Generated from protobuf field string filter = 5; + */ + protected $filter = ''; + + /** + * @param string $parent Required. The volume for which to retrieve snapshot information, + * in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}`. Please see + * {@see NetAppClient::volumeName()} for help formatting this field. + * + * @return \Google\Cloud\NetApp\V1\ListSnapshotsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The volume for which to retrieve snapshot information, + * in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}`. + * @type int $page_size + * The maximum number of items to return. + * @type string $page_token + * The next_page_token value to use if there are additional + * results to retrieve for this list request. + * @type string $order_by + * Sort results. Supported values are "name", "name desc" or "" (unsorted). + * @type string $filter + * List filter. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Snapshot::initOnce(); + parent::__construct($data); + } + + /** + * Required. The volume for which to retrieve snapshot information, + * in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The volume for which to retrieve snapshot information, + * in the format + * `projects/{project_id}/locations/{location}/volumes/{volume_id}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The maximum number of items to return. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of items to return. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The next_page_token value to use if there are additional + * results to retrieve for this list request. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The next_page_token value to use if there are additional + * results to retrieve for this list request. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Sort results. Supported values are "name", "name desc" or "" (unsorted). + * + * Generated from protobuf field string order_by = 4; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Sort results. Supported values are "name", "name desc" or "" (unsorted). + * + * Generated from protobuf field string order_by = 4; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + + /** + * List filter. + * + * Generated from protobuf field string filter = 5; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * List filter. + * + * Generated from protobuf field string filter = 5; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListSnapshotsResponse.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListSnapshotsResponse.php new file mode 100644 index 000000000000..78b8503f9656 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListSnapshotsResponse.php @@ -0,0 +1,139 @@ +google.cloud.netapp.v1.ListSnapshotsResponse + */ +class ListSnapshotsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of snapshots in the project for the specified volume. + * + * Generated from protobuf field repeated .google.cloud.netapp.v1.Snapshot snapshots = 1; + */ + private $snapshots; + /** + * The token you can use to retrieve the next page of results. Not returned + * if there are no more results in the list. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\NetApp\V1\Snapshot>|\Google\Protobuf\Internal\RepeatedField $snapshots + * A list of snapshots in the project for the specified volume. + * @type string $next_page_token + * The token you can use to retrieve the next page of results. Not returned + * if there are no more results in the list. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Snapshot::initOnce(); + parent::__construct($data); + } + + /** + * A list of snapshots in the project for the specified volume. + * + * Generated from protobuf field repeated .google.cloud.netapp.v1.Snapshot snapshots = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSnapshots() + { + return $this->snapshots; + } + + /** + * A list of snapshots in the project for the specified volume. + * + * Generated from protobuf field repeated .google.cloud.netapp.v1.Snapshot snapshots = 1; + * @param array<\Google\Cloud\NetApp\V1\Snapshot>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSnapshots($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetApp\V1\Snapshot::class); + $this->snapshots = $arr; + + return $this; + } + + /** + * The token you can use to retrieve the next page of results. Not returned + * if there are no more results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * The token you can use to retrieve the next page of results. Not returned + * if there are no more results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListStoragePoolsRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListStoragePoolsRequest.php new file mode 100644 index 000000000000..6569b9d2c4c5 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListStoragePoolsRequest.php @@ -0,0 +1,225 @@ +google.cloud.netapp.v1.ListStoragePoolsRequest + */ +class ListStoragePoolsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Parent value + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of items to return. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. The next_page_token value to use if there are additional + * results to retrieve for this list request. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. Sort results. Supported values are "name", "name desc" or "" + * (unsorted). + * + * Generated from protobuf field string order_by = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + /** + * Optional. List filter. + * + * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + + /** + * @param string $parent Required. Parent value + * Please see {@see NetAppClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\NetApp\V1\ListStoragePoolsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Parent value + * @type int $page_size + * Optional. The maximum number of items to return. + * @type string $page_token + * Optional. The next_page_token value to use if there are additional + * results to retrieve for this list request. + * @type string $order_by + * Optional. Sort results. Supported values are "name", "name desc" or "" + * (unsorted). + * @type string $filter + * Optional. List filter. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\StoragePool::initOnce(); + parent::__construct($data); + } + + /** + * Required. Parent value + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Parent value + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The maximum number of items to return. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of items to return. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. The next_page_token value to use if there are additional + * results to retrieve for this list request. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. The next_page_token value to use if there are additional + * results to retrieve for this list request. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. Sort results. Supported values are "name", "name desc" or "" + * (unsorted). + * + * Generated from protobuf field string order_by = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. Sort results. Supported values are "name", "name desc" or "" + * (unsorted). + * + * Generated from protobuf field string order_by = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + + /** + * Optional. List filter. + * + * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. List filter. + * + * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListStoragePoolsResponse.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListStoragePoolsResponse.php new file mode 100644 index 000000000000..2aa56a245d4d --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListStoragePoolsResponse.php @@ -0,0 +1,135 @@ +google.cloud.netapp.v1.ListStoragePoolsResponse + */ +class ListStoragePoolsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of StoragePools + * + * Generated from protobuf field repeated .google.cloud.netapp.v1.StoragePool storage_pools = 1; + */ + private $storage_pools; + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\NetApp\V1\StoragePool>|\Google\Protobuf\Internal\RepeatedField $storage_pools + * The list of StoragePools + * @type string $next_page_token + * A token identifying a page of results the server should return. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\StoragePool::initOnce(); + parent::__construct($data); + } + + /** + * The list of StoragePools + * + * Generated from protobuf field repeated .google.cloud.netapp.v1.StoragePool storage_pools = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getStoragePools() + { + return $this->storage_pools; + } + + /** + * The list of StoragePools + * + * Generated from protobuf field repeated .google.cloud.netapp.v1.StoragePool storage_pools = 1; + * @param array<\Google\Cloud\NetApp\V1\StoragePool>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setStoragePools($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetApp\V1\StoragePool::class); + $this->storage_pools = $arr; + + return $this; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListVolumesRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListVolumesRequest.php new file mode 100644 index 000000000000..68b888bed683 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListVolumesRequest.php @@ -0,0 +1,221 @@ +google.cloud.netapp.v1.ListVolumesRequest + */ +class ListVolumesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Parent value for ListVolumesRequest + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, the server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * Filtering results + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + /** + * Hint for how to order the results + * + * Generated from protobuf field string order_by = 5; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. Parent value for ListVolumesRequest + * Please see {@see NetAppClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\NetApp\V1\ListVolumesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Parent value for ListVolumesRequest + * @type int $page_size + * Requested page size. Server may return fewer items than requested. + * If unspecified, the server will pick an appropriate default. + * @type string $page_token + * A token identifying a page of results the server should return. + * @type string $filter + * Filtering results + * @type string $order_by + * Hint for how to order the results + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Volume::initOnce(); + parent::__construct($data); + } + + /** + * Required. Parent value for ListVolumesRequest + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Parent value for ListVolumesRequest + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, the server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, the server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Filtering results + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Filtering results + * + * Generated from protobuf field string filter = 4; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Hint for how to order the results + * + * Generated from protobuf field string order_by = 5; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Hint for how to order the results + * + * Generated from protobuf field string order_by = 5; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListVolumesResponse.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListVolumesResponse.php new file mode 100644 index 000000000000..077e3a87033c --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListVolumesResponse.php @@ -0,0 +1,135 @@ +google.cloud.netapp.v1.ListVolumesResponse + */ +class ListVolumesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of Volume + * + * Generated from protobuf field repeated .google.cloud.netapp.v1.Volume volumes = 1; + */ + private $volumes; + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\NetApp\V1\Volume>|\Google\Protobuf\Internal\RepeatedField $volumes + * The list of Volume + * @type string $next_page_token + * A token identifying a page of results the server should return. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Volume::initOnce(); + parent::__construct($data); + } + + /** + * The list of Volume + * + * Generated from protobuf field repeated .google.cloud.netapp.v1.Volume volumes = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getVolumes() + { + return $this->volumes; + } + + /** + * The list of Volume + * + * Generated from protobuf field repeated .google.cloud.netapp.v1.Volume volumes = 1; + * @param array<\Google\Cloud\NetApp\V1\Volume>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setVolumes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetApp\V1\Volume::class); + $this->volumes = $arr; + + return $this; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/LocationMetadata.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/LocationMetadata.php new file mode 100644 index 000000000000..1718fe1bb168 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/LocationMetadata.php @@ -0,0 +1,68 @@ +google.cloud.netapp.v1.LocationMetadata + */ +class LocationMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Supported service levels in a location. + * + * Generated from protobuf field repeated .google.cloud.netapp.v1.ServiceLevel supported_service_levels = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $supported_service_levels; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $supported_service_levels + * Output only. Supported service levels in a location. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Common::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Supported service levels in a location. + * + * Generated from protobuf field repeated .google.cloud.netapp.v1.ServiceLevel supported_service_levels = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSupportedServiceLevels() + { + return $this->supported_service_levels; + } + + /** + * Output only. Supported service levels in a location. + * + * Generated from protobuf field repeated .google.cloud.netapp.v1.ServiceLevel supported_service_levels = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSupportedServiceLevels($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\NetApp\V1\ServiceLevel::class); + $this->supported_service_levels = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/MonthlySchedule.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/MonthlySchedule.php new file mode 100644 index 000000000000..4cd932549523 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/MonthlySchedule.php @@ -0,0 +1,217 @@ +google.cloud.netapp.v1.MonthlySchedule + */ +class MonthlySchedule extends \Google\Protobuf\Internal\Message +{ + /** + * The maximum number of Snapshots to keep for the hourly schedule + * + * Generated from protobuf field optional double snapshots_to_keep = 1; + */ + protected $snapshots_to_keep = null; + /** + * Set the minute of the hour to start the snapshot (0-59), defaults to the + * top of the hour (0). + * + * Generated from protobuf field optional double minute = 2; + */ + protected $minute = null; + /** + * Set the hour to start the snapshot (0-23), defaults to midnight (0). + * + * Generated from protobuf field optional double hour = 3; + */ + protected $hour = null; + /** + * Set the day or days of the month to make a snapshot (1-31). Accepts a + * comma separated number of days. Defaults to '1'. + * + * Generated from protobuf field optional string days_of_month = 4; + */ + protected $days_of_month = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $snapshots_to_keep + * The maximum number of Snapshots to keep for the hourly schedule + * @type float $minute + * Set the minute of the hour to start the snapshot (0-59), defaults to the + * top of the hour (0). + * @type float $hour + * Set the hour to start the snapshot (0-23), defaults to midnight (0). + * @type string $days_of_month + * Set the day or days of the month to make a snapshot (1-31). Accepts a + * comma separated number of days. Defaults to '1'. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Volume::initOnce(); + parent::__construct($data); + } + + /** + * The maximum number of Snapshots to keep for the hourly schedule + * + * Generated from protobuf field optional double snapshots_to_keep = 1; + * @return float + */ + public function getSnapshotsToKeep() + { + return isset($this->snapshots_to_keep) ? $this->snapshots_to_keep : 0.0; + } + + public function hasSnapshotsToKeep() + { + return isset($this->snapshots_to_keep); + } + + public function clearSnapshotsToKeep() + { + unset($this->snapshots_to_keep); + } + + /** + * The maximum number of Snapshots to keep for the hourly schedule + * + * Generated from protobuf field optional double snapshots_to_keep = 1; + * @param float $var + * @return $this + */ + public function setSnapshotsToKeep($var) + { + GPBUtil::checkDouble($var); + $this->snapshots_to_keep = $var; + + return $this; + } + + /** + * Set the minute of the hour to start the snapshot (0-59), defaults to the + * top of the hour (0). + * + * Generated from protobuf field optional double minute = 2; + * @return float + */ + public function getMinute() + { + return isset($this->minute) ? $this->minute : 0.0; + } + + public function hasMinute() + { + return isset($this->minute); + } + + public function clearMinute() + { + unset($this->minute); + } + + /** + * Set the minute of the hour to start the snapshot (0-59), defaults to the + * top of the hour (0). + * + * Generated from protobuf field optional double minute = 2; + * @param float $var + * @return $this + */ + public function setMinute($var) + { + GPBUtil::checkDouble($var); + $this->minute = $var; + + return $this; + } + + /** + * Set the hour to start the snapshot (0-23), defaults to midnight (0). + * + * Generated from protobuf field optional double hour = 3; + * @return float + */ + public function getHour() + { + return isset($this->hour) ? $this->hour : 0.0; + } + + public function hasHour() + { + return isset($this->hour); + } + + public function clearHour() + { + unset($this->hour); + } + + /** + * Set the hour to start the snapshot (0-23), defaults to midnight (0). + * + * Generated from protobuf field optional double hour = 3; + * @param float $var + * @return $this + */ + public function setHour($var) + { + GPBUtil::checkDouble($var); + $this->hour = $var; + + return $this; + } + + /** + * Set the day or days of the month to make a snapshot (1-31). Accepts a + * comma separated number of days. Defaults to '1'. + * + * Generated from protobuf field optional string days_of_month = 4; + * @return string + */ + public function getDaysOfMonth() + { + return isset($this->days_of_month) ? $this->days_of_month : ''; + } + + public function hasDaysOfMonth() + { + return isset($this->days_of_month); + } + + public function clearDaysOfMonth() + { + unset($this->days_of_month); + } + + /** + * Set the day or days of the month to make a snapshot (1-31). Accepts a + * comma separated number of days. Defaults to '1'. + * + * Generated from protobuf field optional string days_of_month = 4; + * @param string $var + * @return $this + */ + public function setDaysOfMonth($var) + { + GPBUtil::checkString($var, True); + $this->days_of_month = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/MountOption.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/MountOption.php new file mode 100644 index 000000000000..7b70200e1081 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/MountOption.php @@ -0,0 +1,169 @@ +google.cloud.netapp.v1.MountOption + */ +class MountOption extends \Google\Protobuf\Internal\Message +{ + /** + * Export string + * + * Generated from protobuf field string export = 1; + */ + protected $export = ''; + /** + * Full export string + * + * Generated from protobuf field string export_full = 2; + */ + protected $export_full = ''; + /** + * Protocol to mount with. + * + * Generated from protobuf field .google.cloud.netapp.v1.Protocols protocol = 3; + */ + protected $protocol = 0; + /** + * Instructions for mounting + * + * Generated from protobuf field string instructions = 4; + */ + protected $instructions = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $export + * Export string + * @type string $export_full + * Full export string + * @type int $protocol + * Protocol to mount with. + * @type string $instructions + * Instructions for mounting + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Volume::initOnce(); + parent::__construct($data); + } + + /** + * Export string + * + * Generated from protobuf field string export = 1; + * @return string + */ + public function getExport() + { + return $this->export; + } + + /** + * Export string + * + * Generated from protobuf field string export = 1; + * @param string $var + * @return $this + */ + public function setExport($var) + { + GPBUtil::checkString($var, True); + $this->export = $var; + + return $this; + } + + /** + * Full export string + * + * Generated from protobuf field string export_full = 2; + * @return string + */ + public function getExportFull() + { + return $this->export_full; + } + + /** + * Full export string + * + * Generated from protobuf field string export_full = 2; + * @param string $var + * @return $this + */ + public function setExportFull($var) + { + GPBUtil::checkString($var, True); + $this->export_full = $var; + + return $this; + } + + /** + * Protocol to mount with. + * + * Generated from protobuf field .google.cloud.netapp.v1.Protocols protocol = 3; + * @return int + */ + public function getProtocol() + { + return $this->protocol; + } + + /** + * Protocol to mount with. + * + * Generated from protobuf field .google.cloud.netapp.v1.Protocols protocol = 3; + * @param int $var + * @return $this + */ + public function setProtocol($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetApp\V1\Protocols::class); + $this->protocol = $var; + + return $this; + } + + /** + * Instructions for mounting + * + * Generated from protobuf field string instructions = 4; + * @return string + */ + public function getInstructions() + { + return $this->instructions; + } + + /** + * Instructions for mounting + * + * Generated from protobuf field string instructions = 4; + * @param string $var + * @return $this + */ + public function setInstructions($var) + { + GPBUtil::checkString($var, True); + $this->instructions = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/OperationMetadata.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/OperationMetadata.php new file mode 100644 index 000000000000..58b129644ac9 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/OperationMetadata.php @@ -0,0 +1,307 @@ +google.cloud.netapp.v1.OperationMetadata + */ +class OperationMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $end_time = null; + /** + * Output only. Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $target = ''; + /** + * Output only. Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $verb = ''; + /** + * Output only. Human-readable status of the operation, if any. + * + * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $status_message = ''; + /** + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have been canceled successfully + * have [Operation.error][] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`. + * + * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $requested_cancellation = false; + /** + * Output only. API version used to start the operation. + * + * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $api_version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time the operation was created. + * @type \Google\Protobuf\Timestamp $end_time + * Output only. The time the operation finished running. + * @type string $target + * Output only. Server-defined resource path for the target of the operation. + * @type string $verb + * Output only. Name of the verb executed by the operation. + * @type string $status_message + * Output only. Human-readable status of the operation, if any. + * @type bool $requested_cancellation + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have been canceled successfully + * have [Operation.error][] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`. + * @type string $api_version + * Output only. API version used to start the operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\CloudNetappService::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEndTime() + { + return $this->end_time; + } + + public function hasEndTime() + { + return isset($this->end_time); + } + + public function clearEndTime() + { + unset($this->end_time); + } + + /** + * Output only. The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * Output only. Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getTarget() + { + return $this->target; + } + + /** + * Output only. Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setTarget($var) + { + GPBUtil::checkString($var, True); + $this->target = $var; + + return $this; + } + + /** + * Output only. Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getVerb() + { + return $this->verb; + } + + /** + * Output only. Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setVerb($var) + { + GPBUtil::checkString($var, True); + $this->verb = $var; + + return $this; + } + + /** + * Output only. Human-readable status of the operation, if any. + * + * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getStatusMessage() + { + return $this->status_message; + } + + /** + * Output only. Human-readable status of the operation, if any. + * + * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setStatusMessage($var) + { + GPBUtil::checkString($var, True); + $this->status_message = $var; + + return $this; + } + + /** + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have been canceled successfully + * have [Operation.error][] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`. + * + * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getRequestedCancellation() + { + return $this->requested_cancellation; + } + + /** + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have been canceled successfully + * have [Operation.error][] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`. + * + * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setRequestedCancellation($var) + { + GPBUtil::checkBool($var); + $this->requested_cancellation = $var; + + return $this; + } + + /** + * Output only. API version used to start the operation. + * + * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getApiVersion() + { + return $this->api_version; + } + + /** + * Output only. API version used to start the operation. + * + * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setApiVersion($var) + { + GPBUtil::checkString($var, True); + $this->api_version = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Protocols.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Protocols.php new file mode 100644 index 000000000000..bda324fe0c87 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Protocols.php @@ -0,0 +1,68 @@ +google.cloud.netapp.v1.Protocols + */ +class Protocols +{ + /** + * Unspecified protocol + * + * Generated from protobuf enum PROTOCOLS_UNSPECIFIED = 0; + */ + const PROTOCOLS_UNSPECIFIED = 0; + /** + * NFS V3 protocol + * + * Generated from protobuf enum NFSV3 = 1; + */ + const NFSV3 = 1; + /** + * NFS V4 protocol + * + * Generated from protobuf enum NFSV4 = 2; + */ + const NFSV4 = 2; + /** + * SMB protocol + * + * Generated from protobuf enum SMB = 3; + */ + const SMB = 3; + + private static $valueToName = [ + self::PROTOCOLS_UNSPECIFIED => 'PROTOCOLS_UNSPECIFIED', + self::NFSV3 => 'NFSV3', + self::NFSV4 => 'NFSV4', + self::SMB => 'SMB', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Replication.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Replication.php new file mode 100644 index 000000000000..3d6b2d73def4 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Replication.php @@ -0,0 +1,705 @@ +google.cloud.netapp.v1.Replication + */ +class Replication extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The resource name of the Replication. + * Format: + * `projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Output only. State of the replication. + * + * Generated from protobuf field .google.cloud.netapp.v1.Replication.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. State details of the replication. + * + * Generated from protobuf field string state_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state_details = ''; + /** + * Output only. Indicates whether this points to source or destination. + * + * Generated from protobuf field .google.cloud.netapp.v1.Replication.ReplicationRole role = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $role = 0; + /** + * Required. Indicates the schedule for replication. + * + * Generated from protobuf field .google.cloud.netapp.v1.Replication.ReplicationSchedule replication_schedule = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $replication_schedule = 0; + /** + * Output only. Indicates the state of mirroring. + * + * Generated from protobuf field .google.cloud.netapp.v1.Replication.MirrorState mirror_state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $mirror_state = 0; + /** + * Output only. Condition of the relationship. Can be one of the following: + * - true: The replication relationship is healthy. It has not missed the most + * recent scheduled transfer. + * - false: The replication relationship is not healthy. It has missed the + * most recent scheduled transfer. + * + * Generated from protobuf field optional bool healthy = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $healthy = null; + /** + * Output only. Replication create time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. Full name of destination volume resource. + * Example : "projects/{project}/locations/{location}/volumes/{volume_id}" + * + * Generated from protobuf field string destination_volume = 10 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $destination_volume = ''; + /** + * Output only. Replication transfer statistics. + * + * Generated from protobuf field .google.cloud.netapp.v1.TransferStats transfer_stats = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $transfer_stats = null; + /** + * Resource labels to represent user provided metadata. + * + * Generated from protobuf field map labels = 12; + */ + private $labels; + /** + * A description about this replication relationship. + * + * Generated from protobuf field optional string description = 13; + */ + protected $description = null; + /** + * Required. Input only. Destination volume parameters + * + * Generated from protobuf field .google.cloud.netapp.v1.DestinationVolumeParameters destination_volume_parameters = 14 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = REQUIRED]; + */ + protected $destination_volume_parameters = null; + /** + * Output only. Full name of source volume resource. + * Example : "projects/{project}/locations/{location}/volumes/{volume_id}" + * + * Generated from protobuf field string source_volume = 15 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $source_volume = ''; + /** + * Output only. Hybrid peering details. + * + * Generated from protobuf field .google.cloud.netapp.v1.HybridPeeringDetails hybrid_peering_details = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $hybrid_peering_details = null; + /** + * Optional. Location of the user cluster. + * + * Generated from protobuf field string cluster_location = 18 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $cluster_location = ''; + /** + * Output only. Type of the hybrid replication. + * + * Generated from protobuf field .google.cloud.netapp.v1.Replication.HybridReplicationType hybrid_replication_type = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $hybrid_replication_type = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The resource name of the Replication. + * Format: + * `projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}`. + * @type int $state + * Output only. State of the replication. + * @type string $state_details + * Output only. State details of the replication. + * @type int $role + * Output only. Indicates whether this points to source or destination. + * @type int $replication_schedule + * Required. Indicates the schedule for replication. + * @type int $mirror_state + * Output only. Indicates the state of mirroring. + * @type bool $healthy + * Output only. Condition of the relationship. Can be one of the following: + * - true: The replication relationship is healthy. It has not missed the most + * recent scheduled transfer. + * - false: The replication relationship is not healthy. It has missed the + * most recent scheduled transfer. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Replication create time. + * @type string $destination_volume + * Output only. Full name of destination volume resource. + * Example : "projects/{project}/locations/{location}/volumes/{volume_id}" + * @type \Google\Cloud\NetApp\V1\TransferStats $transfer_stats + * Output only. Replication transfer statistics. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Resource labels to represent user provided metadata. + * @type string $description + * A description about this replication relationship. + * @type \Google\Cloud\NetApp\V1\DestinationVolumeParameters $destination_volume_parameters + * Required. Input only. Destination volume parameters + * @type string $source_volume + * Output only. Full name of source volume resource. + * Example : "projects/{project}/locations/{location}/volumes/{volume_id}" + * @type \Google\Cloud\NetApp\V1\HybridPeeringDetails $hybrid_peering_details + * Output only. Hybrid peering details. + * @type string $cluster_location + * Optional. Location of the user cluster. + * @type int $hybrid_replication_type + * Output only. Type of the hybrid replication. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Replication::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The resource name of the Replication. + * Format: + * `projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The resource name of the Replication. + * Format: + * `projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. State of the replication. + * + * Generated from protobuf field .google.cloud.netapp.v1.Replication.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. State of the replication. + * + * Generated from protobuf field .google.cloud.netapp.v1.Replication.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetApp\V1\Replication\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. State details of the replication. + * + * Generated from protobuf field string state_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getStateDetails() + { + return $this->state_details; + } + + /** + * Output only. State details of the replication. + * + * Generated from protobuf field string state_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setStateDetails($var) + { + GPBUtil::checkString($var, True); + $this->state_details = $var; + + return $this; + } + + /** + * Output only. Indicates whether this points to source or destination. + * + * Generated from protobuf field .google.cloud.netapp.v1.Replication.ReplicationRole role = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getRole() + { + return $this->role; + } + + /** + * Output only. Indicates whether this points to source or destination. + * + * Generated from protobuf field .google.cloud.netapp.v1.Replication.ReplicationRole role = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setRole($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetApp\V1\Replication\ReplicationRole::class); + $this->role = $var; + + return $this; + } + + /** + * Required. Indicates the schedule for replication. + * + * Generated from protobuf field .google.cloud.netapp.v1.Replication.ReplicationSchedule replication_schedule = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getReplicationSchedule() + { + return $this->replication_schedule; + } + + /** + * Required. Indicates the schedule for replication. + * + * Generated from protobuf field .google.cloud.netapp.v1.Replication.ReplicationSchedule replication_schedule = 5 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setReplicationSchedule($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetApp\V1\Replication\ReplicationSchedule::class); + $this->replication_schedule = $var; + + return $this; + } + + /** + * Output only. Indicates the state of mirroring. + * + * Generated from protobuf field .google.cloud.netapp.v1.Replication.MirrorState mirror_state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getMirrorState() + { + return $this->mirror_state; + } + + /** + * Output only. Indicates the state of mirroring. + * + * Generated from protobuf field .google.cloud.netapp.v1.Replication.MirrorState mirror_state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setMirrorState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetApp\V1\Replication\MirrorState::class); + $this->mirror_state = $var; + + return $this; + } + + /** + * Output only. Condition of the relationship. Can be one of the following: + * - true: The replication relationship is healthy. It has not missed the most + * recent scheduled transfer. + * - false: The replication relationship is not healthy. It has missed the + * most recent scheduled transfer. + * + * Generated from protobuf field optional bool healthy = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getHealthy() + { + return isset($this->healthy) ? $this->healthy : false; + } + + public function hasHealthy() + { + return isset($this->healthy); + } + + public function clearHealthy() + { + unset($this->healthy); + } + + /** + * Output only. Condition of the relationship. Can be one of the following: + * - true: The replication relationship is healthy. It has not missed the most + * recent scheduled transfer. + * - false: The replication relationship is not healthy. It has missed the + * most recent scheduled transfer. + * + * Generated from protobuf field optional bool healthy = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setHealthy($var) + { + GPBUtil::checkBool($var); + $this->healthy = $var; + + return $this; + } + + /** + * Output only. Replication create time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. Replication create time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. Full name of destination volume resource. + * Example : "projects/{project}/locations/{location}/volumes/{volume_id}" + * + * Generated from protobuf field string destination_volume = 10 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getDestinationVolume() + { + return $this->destination_volume; + } + + /** + * Output only. Full name of destination volume resource. + * Example : "projects/{project}/locations/{location}/volumes/{volume_id}" + * + * Generated from protobuf field string destination_volume = 10 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setDestinationVolume($var) + { + GPBUtil::checkString($var, True); + $this->destination_volume = $var; + + return $this; + } + + /** + * Output only. Replication transfer statistics. + * + * Generated from protobuf field .google.cloud.netapp.v1.TransferStats transfer_stats = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\NetApp\V1\TransferStats|null + */ + public function getTransferStats() + { + return $this->transfer_stats; + } + + public function hasTransferStats() + { + return isset($this->transfer_stats); + } + + public function clearTransferStats() + { + unset($this->transfer_stats); + } + + /** + * Output only. Replication transfer statistics. + * + * Generated from protobuf field .google.cloud.netapp.v1.TransferStats transfer_stats = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\NetApp\V1\TransferStats $var + * @return $this + */ + public function setTransferStats($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetApp\V1\TransferStats::class); + $this->transfer_stats = $var; + + return $this; + } + + /** + * Resource labels to represent user provided metadata. + * + * Generated from protobuf field map labels = 12; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Resource labels to represent user provided metadata. + * + * Generated from protobuf field map labels = 12; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * A description about this replication relationship. + * + * Generated from protobuf field optional string description = 13; + * @return string + */ + public function getDescription() + { + return isset($this->description) ? $this->description : ''; + } + + public function hasDescription() + { + return isset($this->description); + } + + public function clearDescription() + { + unset($this->description); + } + + /** + * A description about this replication relationship. + * + * Generated from protobuf field optional string description = 13; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Required. Input only. Destination volume parameters + * + * Generated from protobuf field .google.cloud.netapp.v1.DestinationVolumeParameters destination_volume_parameters = 14 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetApp\V1\DestinationVolumeParameters|null + */ + public function getDestinationVolumeParameters() + { + return $this->destination_volume_parameters; + } + + public function hasDestinationVolumeParameters() + { + return isset($this->destination_volume_parameters); + } + + public function clearDestinationVolumeParameters() + { + unset($this->destination_volume_parameters); + } + + /** + * Required. Input only. Destination volume parameters + * + * Generated from protobuf field .google.cloud.netapp.v1.DestinationVolumeParameters destination_volume_parameters = 14 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetApp\V1\DestinationVolumeParameters $var + * @return $this + */ + public function setDestinationVolumeParameters($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetApp\V1\DestinationVolumeParameters::class); + $this->destination_volume_parameters = $var; + + return $this; + } + + /** + * Output only. Full name of source volume resource. + * Example : "projects/{project}/locations/{location}/volumes/{volume_id}" + * + * Generated from protobuf field string source_volume = 15 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getSourceVolume() + { + return $this->source_volume; + } + + /** + * Output only. Full name of source volume resource. + * Example : "projects/{project}/locations/{location}/volumes/{volume_id}" + * + * Generated from protobuf field string source_volume = 15 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setSourceVolume($var) + { + GPBUtil::checkString($var, True); + $this->source_volume = $var; + + return $this; + } + + /** + * Output only. Hybrid peering details. + * + * Generated from protobuf field .google.cloud.netapp.v1.HybridPeeringDetails hybrid_peering_details = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\NetApp\V1\HybridPeeringDetails|null + */ + public function getHybridPeeringDetails() + { + return $this->hybrid_peering_details; + } + + public function hasHybridPeeringDetails() + { + return isset($this->hybrid_peering_details); + } + + public function clearHybridPeeringDetails() + { + unset($this->hybrid_peering_details); + } + + /** + * Output only. Hybrid peering details. + * + * Generated from protobuf field .google.cloud.netapp.v1.HybridPeeringDetails hybrid_peering_details = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\NetApp\V1\HybridPeeringDetails $var + * @return $this + */ + public function setHybridPeeringDetails($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetApp\V1\HybridPeeringDetails::class); + $this->hybrid_peering_details = $var; + + return $this; + } + + /** + * Optional. Location of the user cluster. + * + * Generated from protobuf field string cluster_location = 18 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getClusterLocation() + { + return $this->cluster_location; + } + + /** + * Optional. Location of the user cluster. + * + * Generated from protobuf field string cluster_location = 18 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setClusterLocation($var) + { + GPBUtil::checkString($var, True); + $this->cluster_location = $var; + + return $this; + } + + /** + * Output only. Type of the hybrid replication. + * + * Generated from protobuf field .google.cloud.netapp.v1.Replication.HybridReplicationType hybrid_replication_type = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getHybridReplicationType() + { + return $this->hybrid_replication_type; + } + + /** + * Output only. Type of the hybrid replication. + * + * Generated from protobuf field .google.cloud.netapp.v1.Replication.HybridReplicationType hybrid_replication_type = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setHybridReplicationType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetApp\V1\Replication\HybridReplicationType::class); + $this->hybrid_replication_type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Replication/HybridReplicationType.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Replication/HybridReplicationType.php new file mode 100644 index 000000000000..bf912db51b2b --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Replication/HybridReplicationType.php @@ -0,0 +1,64 @@ +google.cloud.netapp.v1.Replication.HybridReplicationType + */ +class HybridReplicationType +{ + /** + * Unspecified hybrid replication type. + * + * Generated from protobuf enum HYBRID_REPLICATION_TYPE_UNSPECIFIED = 0; + */ + const HYBRID_REPLICATION_TYPE_UNSPECIFIED = 0; + /** + * Hybrid replication type for migration. + * + * Generated from protobuf enum MIGRATION = 1; + */ + const MIGRATION = 1; + /** + * Hybrid replication type for continuous replication. + * + * Generated from protobuf enum CONTINUOUS_REPLICATION = 2; + */ + const CONTINUOUS_REPLICATION = 2; + + private static $valueToName = [ + self::HYBRID_REPLICATION_TYPE_UNSPECIFIED => 'HYBRID_REPLICATION_TYPE_UNSPECIFIED', + self::MIGRATION => 'MIGRATION', + self::CONTINUOUS_REPLICATION => 'CONTINUOUS_REPLICATION', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(HybridReplicationType::class, \Google\Cloud\NetApp\V1\Replication_HybridReplicationType::class); + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Replication/MirrorState.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Replication/MirrorState.php new file mode 100644 index 000000000000..1243ed864099 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Replication/MirrorState.php @@ -0,0 +1,94 @@ +google.cloud.netapp.v1.Replication.MirrorState + */ +class MirrorState +{ + /** + * Unspecified MirrorState + * + * Generated from protobuf enum MIRROR_STATE_UNSPECIFIED = 0; + */ + const MIRROR_STATE_UNSPECIFIED = 0; + /** + * Destination volume is being prepared. + * + * Generated from protobuf enum PREPARING = 1; + */ + const PREPARING = 1; + /** + * Destination volume has been initialized and is ready to receive + * replication transfers. + * + * Generated from protobuf enum MIRRORED = 2; + */ + const MIRRORED = 2; + /** + * Destination volume is not receiving replication transfers. + * + * Generated from protobuf enum STOPPED = 3; + */ + const STOPPED = 3; + /** + * Incremental replication is in progress. + * + * Generated from protobuf enum TRANSFERRING = 4; + */ + const TRANSFERRING = 4; + /** + * Baseline replication is in progress. + * + * Generated from protobuf enum BASELINE_TRANSFERRING = 5; + */ + const BASELINE_TRANSFERRING = 5; + /** + * Replication is aborted. + * + * Generated from protobuf enum ABORTED = 6; + */ + const ABORTED = 6; + + private static $valueToName = [ + self::MIRROR_STATE_UNSPECIFIED => 'MIRROR_STATE_UNSPECIFIED', + self::PREPARING => 'PREPARING', + self::MIRRORED => 'MIRRORED', + self::STOPPED => 'STOPPED', + self::TRANSFERRING => 'TRANSFERRING', + self::BASELINE_TRANSFERRING => 'BASELINE_TRANSFERRING', + self::ABORTED => 'ABORTED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(MirrorState::class, \Google\Cloud\NetApp\V1\Replication_MirrorState::class); + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Replication/ReplicationRole.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Replication/ReplicationRole.php new file mode 100644 index 000000000000..ecd795ef02ef --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Replication/ReplicationRole.php @@ -0,0 +1,65 @@ +google.cloud.netapp.v1.Replication.ReplicationRole + */ +class ReplicationRole +{ + /** + * Unspecified replication role + * + * Generated from protobuf enum REPLICATION_ROLE_UNSPECIFIED = 0; + */ + const REPLICATION_ROLE_UNSPECIFIED = 0; + /** + * Indicates Source volume. + * + * Generated from protobuf enum SOURCE = 1; + */ + const SOURCE = 1; + /** + * Indicates Destination volume. + * + * Generated from protobuf enum DESTINATION = 2; + */ + const DESTINATION = 2; + + private static $valueToName = [ + self::REPLICATION_ROLE_UNSPECIFIED => 'REPLICATION_ROLE_UNSPECIFIED', + self::SOURCE => 'SOURCE', + self::DESTINATION => 'DESTINATION', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ReplicationRole::class, \Google\Cloud\NetApp\V1\Replication_ReplicationRole::class); + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Replication/ReplicationSchedule.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Replication/ReplicationSchedule.php new file mode 100644 index 000000000000..1846795c7b34 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Replication/ReplicationSchedule.php @@ -0,0 +1,73 @@ +google.cloud.netapp.v1.Replication.ReplicationSchedule + */ +class ReplicationSchedule +{ + /** + * Unspecified ReplicationSchedule + * + * Generated from protobuf enum REPLICATION_SCHEDULE_UNSPECIFIED = 0; + */ + const REPLICATION_SCHEDULE_UNSPECIFIED = 0; + /** + * Replication happens once every 10 minutes. + * + * Generated from protobuf enum EVERY_10_MINUTES = 1; + */ + const EVERY_10_MINUTES = 1; + /** + * Replication happens once every hour. + * + * Generated from protobuf enum HOURLY = 2; + */ + const HOURLY = 2; + /** + * Replication happens once every day. + * + * Generated from protobuf enum DAILY = 3; + */ + const DAILY = 3; + + private static $valueToName = [ + self::REPLICATION_SCHEDULE_UNSPECIFIED => 'REPLICATION_SCHEDULE_UNSPECIFIED', + self::EVERY_10_MINUTES => 'EVERY_10_MINUTES', + self::HOURLY => 'HOURLY', + self::DAILY => 'DAILY', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ReplicationSchedule::class, \Google\Cloud\NetApp\V1\Replication_ReplicationSchedule::class); + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Replication/State.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Replication/State.php new file mode 100644 index 000000000000..a83367709442 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Replication/State.php @@ -0,0 +1,100 @@ +google.cloud.netapp.v1.Replication.State + */ +class State +{ + /** + * Unspecified replication State + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Replication is creating. + * + * Generated from protobuf enum CREATING = 1; + */ + const CREATING = 1; + /** + * Replication is ready. + * + * Generated from protobuf enum READY = 2; + */ + const READY = 2; + /** + * Replication is updating. + * + * Generated from protobuf enum UPDATING = 3; + */ + const UPDATING = 3; + /** + * Replication is deleting. + * + * Generated from protobuf enum DELETING = 5; + */ + const DELETING = 5; + /** + * Replication is in error state. + * + * Generated from protobuf enum ERROR = 6; + */ + const ERROR = 6; + /** + * Replication is waiting for cluster peering to be established. + * + * Generated from protobuf enum PENDING_CLUSTER_PEERING = 8; + */ + const PENDING_CLUSTER_PEERING = 8; + /** + * Replication is waiting for SVM peering to be established. + * + * Generated from protobuf enum PENDING_SVM_PEERING = 9; + */ + const PENDING_SVM_PEERING = 9; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::CREATING => 'CREATING', + self::READY => 'READY', + self::UPDATING => 'UPDATING', + self::DELETING => 'DELETING', + self::ERROR => 'ERROR', + self::PENDING_CLUSTER_PEERING => 'PENDING_CLUSTER_PEERING', + self::PENDING_SVM_PEERING => 'PENDING_SVM_PEERING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\NetApp\V1\Replication_State::class); + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/RestoreParameters.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/RestoreParameters.php new file mode 100644 index 000000000000..4e7706a812ae --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/RestoreParameters.php @@ -0,0 +1,120 @@ +google.cloud.netapp.v1.RestoreParameters + */ +class RestoreParameters extends \Google\Protobuf\Internal\Message +{ + protected $source; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $source_snapshot + * Full name of the snapshot resource. + * Format: + * projects/{project}/locations/{location}/volumes/{volume}/snapshots/{snapshot} + * @type string $source_backup + * Full name of the backup resource. + * Format: + * projects/{project}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id} + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Volume::initOnce(); + parent::__construct($data); + } + + /** + * Full name of the snapshot resource. + * Format: + * projects/{project}/locations/{location}/volumes/{volume}/snapshots/{snapshot} + * + * Generated from protobuf field string source_snapshot = 1; + * @return string + */ + public function getSourceSnapshot() + { + return $this->readOneof(1); + } + + public function hasSourceSnapshot() + { + return $this->hasOneof(1); + } + + /** + * Full name of the snapshot resource. + * Format: + * projects/{project}/locations/{location}/volumes/{volume}/snapshots/{snapshot} + * + * Generated from protobuf field string source_snapshot = 1; + * @param string $var + * @return $this + */ + public function setSourceSnapshot($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Full name of the backup resource. + * Format: + * projects/{project}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id} + * + * Generated from protobuf field string source_backup = 2; + * @return string + */ + public function getSourceBackup() + { + return $this->readOneof(2); + } + + public function hasSourceBackup() + { + return $this->hasOneof(2); + } + + /** + * Full name of the backup resource. + * Format: + * projects/{project}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id} + * + * Generated from protobuf field string source_backup = 2; + * @param string $var + * @return $this + */ + public function setSourceBackup($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getSource() + { + return $this->whichOneof("source"); + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/RestrictedAction.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/RestrictedAction.php new file mode 100644 index 000000000000..7c9890392919 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/RestrictedAction.php @@ -0,0 +1,54 @@ +google.cloud.netapp.v1.RestrictedAction + */ +class RestrictedAction +{ + /** + * Unspecified restricted action + * + * Generated from protobuf enum RESTRICTED_ACTION_UNSPECIFIED = 0; + */ + const RESTRICTED_ACTION_UNSPECIFIED = 0; + /** + * Prevent volume from being deleted when mounted. + * + * Generated from protobuf enum DELETE = 1; + */ + const DELETE = 1; + + private static $valueToName = [ + self::RESTRICTED_ACTION_UNSPECIFIED => 'RESTRICTED_ACTION_UNSPECIFIED', + self::DELETE => 'DELETE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ResumeReplicationRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ResumeReplicationRequest.php new file mode 100644 index 000000000000..2217e1e454f9 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ResumeReplicationRequest.php @@ -0,0 +1,71 @@ +google.cloud.netapp.v1.ResumeReplicationRequest + */ +class ResumeReplicationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the replication, in the format of + * projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the replication, in the format of + * projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Replication::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the replication, in the format of + * projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the replication, in the format of + * projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ReverseReplicationDirectionRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ReverseReplicationDirectionRequest.php new file mode 100644 index 000000000000..6f01e9c79792 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ReverseReplicationDirectionRequest.php @@ -0,0 +1,72 @@ +google.cloud.netapp.v1.ReverseReplicationDirectionRequest + */ +class ReverseReplicationDirectionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the replication, in the format of + * projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the replication, in the format of + * projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Replication::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the replication, in the format of + * projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the replication, in the format of + * projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/RevertVolumeRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/RevertVolumeRequest.php new file mode 100644 index 000000000000..b767dafea3eb --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/RevertVolumeRequest.php @@ -0,0 +1,113 @@ +google.cloud.netapp.v1.RevertVolumeRequest + */ +class RevertVolumeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the volume, in the format of + * projects/{project_id}/locations/{location}/volumes/{volume_id}. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. The snapshot resource ID, in the format 'my-snapshot', where the + * specified ID is the {snapshot_id} of the fully qualified name like + * projects/{project_id}/locations/{location_id}/volumes/{volume_id}/snapshots/{snapshot_id} + * + * Generated from protobuf field string snapshot_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $snapshot_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the volume, in the format of + * projects/{project_id}/locations/{location}/volumes/{volume_id}. + * @type string $snapshot_id + * Required. The snapshot resource ID, in the format 'my-snapshot', where the + * specified ID is the {snapshot_id} of the fully qualified name like + * projects/{project_id}/locations/{location_id}/volumes/{volume_id}/snapshots/{snapshot_id} + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Volume::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the volume, in the format of + * projects/{project_id}/locations/{location}/volumes/{volume_id}. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the volume, in the format of + * projects/{project_id}/locations/{location}/volumes/{volume_id}. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. The snapshot resource ID, in the format 'my-snapshot', where the + * specified ID is the {snapshot_id} of the fully qualified name like + * projects/{project_id}/locations/{location_id}/volumes/{volume_id}/snapshots/{snapshot_id} + * + * Generated from protobuf field string snapshot_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getSnapshotId() + { + return $this->snapshot_id; + } + + /** + * Required. The snapshot resource ID, in the format 'my-snapshot', where the + * specified ID is the {snapshot_id} of the fully qualified name like + * projects/{project_id}/locations/{location_id}/volumes/{volume_id}/snapshots/{snapshot_id} + * + * Generated from protobuf field string snapshot_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setSnapshotId($var) + { + GPBUtil::checkString($var, True); + $this->snapshot_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/SMBSettings.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/SMBSettings.php new file mode 100644 index 000000000000..4f42ef7caabb --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/SMBSettings.php @@ -0,0 +1,111 @@ +google.cloud.netapp.v1.SMBSettings + */ +class SMBSettings +{ + /** + * Unspecified default option + * + * Generated from protobuf enum SMB_SETTINGS_UNSPECIFIED = 0; + */ + const SMB_SETTINGS_UNSPECIFIED = 0; + /** + * SMB setting encrypt data + * + * Generated from protobuf enum ENCRYPT_DATA = 1; + */ + const ENCRYPT_DATA = 1; + /** + * SMB setting browsable + * + * Generated from protobuf enum BROWSABLE = 2; + */ + const BROWSABLE = 2; + /** + * SMB setting notify change + * + * Generated from protobuf enum CHANGE_NOTIFY = 3; + */ + const CHANGE_NOTIFY = 3; + /** + * SMB setting not to notify change + * + * Generated from protobuf enum NON_BROWSABLE = 4; + */ + const NON_BROWSABLE = 4; + /** + * SMB setting oplocks + * + * Generated from protobuf enum OPLOCKS = 5; + */ + const OPLOCKS = 5; + /** + * SMB setting to show snapshots + * + * Generated from protobuf enum SHOW_SNAPSHOT = 6; + */ + const SHOW_SNAPSHOT = 6; + /** + * SMB setting to show previous versions + * + * Generated from protobuf enum SHOW_PREVIOUS_VERSIONS = 7; + */ + const SHOW_PREVIOUS_VERSIONS = 7; + /** + * SMB setting to access volume based on enumerartion + * + * Generated from protobuf enum ACCESS_BASED_ENUMERATION = 8; + */ + const ACCESS_BASED_ENUMERATION = 8; + /** + * Continuously available enumeration + * + * Generated from protobuf enum CONTINUOUSLY_AVAILABLE = 9; + */ + const CONTINUOUSLY_AVAILABLE = 9; + + private static $valueToName = [ + self::SMB_SETTINGS_UNSPECIFIED => 'SMB_SETTINGS_UNSPECIFIED', + self::ENCRYPT_DATA => 'ENCRYPT_DATA', + self::BROWSABLE => 'BROWSABLE', + self::CHANGE_NOTIFY => 'CHANGE_NOTIFY', + self::NON_BROWSABLE => 'NON_BROWSABLE', + self::OPLOCKS => 'OPLOCKS', + self::SHOW_SNAPSHOT => 'SHOW_SNAPSHOT', + self::SHOW_PREVIOUS_VERSIONS => 'SHOW_PREVIOUS_VERSIONS', + self::ACCESS_BASED_ENUMERATION => 'ACCESS_BASED_ENUMERATION', + self::CONTINUOUSLY_AVAILABLE => 'CONTINUOUSLY_AVAILABLE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/SecurityStyle.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/SecurityStyle.php new file mode 100644 index 000000000000..4fbb24d18d97 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/SecurityStyle.php @@ -0,0 +1,61 @@ +google.cloud.netapp.v1.SecurityStyle + */ +class SecurityStyle +{ + /** + * SecurityStyle is unspecified + * + * Generated from protobuf enum SECURITY_STYLE_UNSPECIFIED = 0; + */ + const SECURITY_STYLE_UNSPECIFIED = 0; + /** + * SecurityStyle uses NTFS + * + * Generated from protobuf enum NTFS = 1; + */ + const NTFS = 1; + /** + * SecurityStyle uses UNIX + * + * Generated from protobuf enum UNIX = 2; + */ + const UNIX = 2; + + private static $valueToName = [ + self::SECURITY_STYLE_UNSPECIFIED => 'SECURITY_STYLE_UNSPECIFIED', + self::NTFS => 'NTFS', + self::UNIX => 'UNIX', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ServiceLevel.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ServiceLevel.php new file mode 100644 index 000000000000..75c2df85fcfd --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ServiceLevel.php @@ -0,0 +1,75 @@ +google.cloud.netapp.v1.ServiceLevel + */ +class ServiceLevel +{ + /** + * Unspecified service level. + * + * Generated from protobuf enum SERVICE_LEVEL_UNSPECIFIED = 0; + */ + const SERVICE_LEVEL_UNSPECIFIED = 0; + /** + * Premium service level. + * + * Generated from protobuf enum PREMIUM = 1; + */ + const PREMIUM = 1; + /** + * Extreme service level. + * + * Generated from protobuf enum EXTREME = 2; + */ + const EXTREME = 2; + /** + * Standard service level. + * + * Generated from protobuf enum STANDARD = 3; + */ + const STANDARD = 3; + /** + * Flex service level. + * + * Generated from protobuf enum FLEX = 4; + */ + const FLEX = 4; + + private static $valueToName = [ + self::SERVICE_LEVEL_UNSPECIFIED => 'SERVICE_LEVEL_UNSPECIFIED', + self::PREMIUM => 'PREMIUM', + self::EXTREME => 'EXTREME', + self::STANDARD => 'STANDARD', + self::FLEX => 'FLEX', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/SimpleExportPolicyRule.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/SimpleExportPolicyRule.php new file mode 100644 index 000000000000..6008af6ff18d --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/SimpleExportPolicyRule.php @@ -0,0 +1,577 @@ +google.cloud.netapp.v1.SimpleExportPolicyRule + */ +class SimpleExportPolicyRule extends \Google\Protobuf\Internal\Message +{ + /** + * Comma separated list of allowed clients IP addresses + * + * Generated from protobuf field optional string allowed_clients = 1; + */ + protected $allowed_clients = null; + /** + * Whether Unix root access will be granted. + * + * Generated from protobuf field optional string has_root_access = 2; + */ + protected $has_root_access = null; + /** + * Access type (ReadWrite, ReadOnly, None) + * + * Generated from protobuf field optional .google.cloud.netapp.v1.AccessType access_type = 3; + */ + protected $access_type = null; + /** + * NFS V3 protocol. + * + * Generated from protobuf field optional bool nfsv3 = 4; + */ + protected $nfsv3 = null; + /** + * NFS V4 protocol. + * + * Generated from protobuf field optional bool nfsv4 = 5; + */ + protected $nfsv4 = null; + /** + * If enabled (true) the rule defines a read only access for clients matching + * the 'allowedClients' specification. It enables nfs clients to mount using + * 'authentication' kerberos security mode. + * + * Generated from protobuf field optional bool kerberos_5_read_only = 6; + */ + protected $kerberos_5_read_only = null; + /** + * If enabled (true) the rule defines read and write access for clients + * matching the 'allowedClients' specification. It enables nfs clients to + * mount using 'authentication' kerberos security mode. The + * 'kerberos5ReadOnly' value be ignored if this is enabled. + * + * Generated from protobuf field optional bool kerberos_5_read_write = 7; + */ + protected $kerberos_5_read_write = null; + /** + * If enabled (true) the rule defines a read only access for clients matching + * the 'allowedClients' specification. It enables nfs clients to mount using + * 'integrity' kerberos security mode. + * + * Generated from protobuf field optional bool kerberos_5i_read_only = 8; + */ + protected $kerberos_5i_read_only = null; + /** + * If enabled (true) the rule defines read and write access for clients + * matching the 'allowedClients' specification. It enables nfs clients to + * mount using 'integrity' kerberos security mode. The 'kerberos5iReadOnly' + * value be ignored if this is enabled. + * + * Generated from protobuf field optional bool kerberos_5i_read_write = 9; + */ + protected $kerberos_5i_read_write = null; + /** + * If enabled (true) the rule defines a read only access for clients matching + * the 'allowedClients' specification. It enables nfs clients to mount using + * 'privacy' kerberos security mode. + * + * Generated from protobuf field optional bool kerberos_5p_read_only = 10; + */ + protected $kerberos_5p_read_only = null; + /** + * If enabled (true) the rule defines read and write access for clients + * matching the 'allowedClients' specification. It enables nfs clients to + * mount using 'privacy' kerberos security mode. The 'kerberos5pReadOnly' + * value be ignored if this is enabled. + * + * Generated from protobuf field optional bool kerberos_5p_read_write = 11; + */ + protected $kerberos_5p_read_write = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $allowed_clients + * Comma separated list of allowed clients IP addresses + * @type string $has_root_access + * Whether Unix root access will be granted. + * @type int $access_type + * Access type (ReadWrite, ReadOnly, None) + * @type bool $nfsv3 + * NFS V3 protocol. + * @type bool $nfsv4 + * NFS V4 protocol. + * @type bool $kerberos_5_read_only + * If enabled (true) the rule defines a read only access for clients matching + * the 'allowedClients' specification. It enables nfs clients to mount using + * 'authentication' kerberos security mode. + * @type bool $kerberos_5_read_write + * If enabled (true) the rule defines read and write access for clients + * matching the 'allowedClients' specification. It enables nfs clients to + * mount using 'authentication' kerberos security mode. The + * 'kerberos5ReadOnly' value be ignored if this is enabled. + * @type bool $kerberos_5i_read_only + * If enabled (true) the rule defines a read only access for clients matching + * the 'allowedClients' specification. It enables nfs clients to mount using + * 'integrity' kerberos security mode. + * @type bool $kerberos_5i_read_write + * If enabled (true) the rule defines read and write access for clients + * matching the 'allowedClients' specification. It enables nfs clients to + * mount using 'integrity' kerberos security mode. The 'kerberos5iReadOnly' + * value be ignored if this is enabled. + * @type bool $kerberos_5p_read_only + * If enabled (true) the rule defines a read only access for clients matching + * the 'allowedClients' specification. It enables nfs clients to mount using + * 'privacy' kerberos security mode. + * @type bool $kerberos_5p_read_write + * If enabled (true) the rule defines read and write access for clients + * matching the 'allowedClients' specification. It enables nfs clients to + * mount using 'privacy' kerberos security mode. The 'kerberos5pReadOnly' + * value be ignored if this is enabled. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Volume::initOnce(); + parent::__construct($data); + } + + /** + * Comma separated list of allowed clients IP addresses + * + * Generated from protobuf field optional string allowed_clients = 1; + * @return string + */ + public function getAllowedClients() + { + return isset($this->allowed_clients) ? $this->allowed_clients : ''; + } + + public function hasAllowedClients() + { + return isset($this->allowed_clients); + } + + public function clearAllowedClients() + { + unset($this->allowed_clients); + } + + /** + * Comma separated list of allowed clients IP addresses + * + * Generated from protobuf field optional string allowed_clients = 1; + * @param string $var + * @return $this + */ + public function setAllowedClients($var) + { + GPBUtil::checkString($var, True); + $this->allowed_clients = $var; + + return $this; + } + + /** + * Whether Unix root access will be granted. + * + * Generated from protobuf field optional string has_root_access = 2; + * @return string + */ + public function getHasRootAccess() + { + return isset($this->has_root_access) ? $this->has_root_access : ''; + } + + public function hasHasRootAccess() + { + return isset($this->has_root_access); + } + + public function clearHasRootAccess() + { + unset($this->has_root_access); + } + + /** + * Whether Unix root access will be granted. + * + * Generated from protobuf field optional string has_root_access = 2; + * @param string $var + * @return $this + */ + public function setHasRootAccess($var) + { + GPBUtil::checkString($var, True); + $this->has_root_access = $var; + + return $this; + } + + /** + * Access type (ReadWrite, ReadOnly, None) + * + * Generated from protobuf field optional .google.cloud.netapp.v1.AccessType access_type = 3; + * @return int + */ + public function getAccessType() + { + return isset($this->access_type) ? $this->access_type : 0; + } + + public function hasAccessType() + { + return isset($this->access_type); + } + + public function clearAccessType() + { + unset($this->access_type); + } + + /** + * Access type (ReadWrite, ReadOnly, None) + * + * Generated from protobuf field optional .google.cloud.netapp.v1.AccessType access_type = 3; + * @param int $var + * @return $this + */ + public function setAccessType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetApp\V1\AccessType::class); + $this->access_type = $var; + + return $this; + } + + /** + * NFS V3 protocol. + * + * Generated from protobuf field optional bool nfsv3 = 4; + * @return bool + */ + public function getNfsv3() + { + return isset($this->nfsv3) ? $this->nfsv3 : false; + } + + public function hasNfsv3() + { + return isset($this->nfsv3); + } + + public function clearNfsv3() + { + unset($this->nfsv3); + } + + /** + * NFS V3 protocol. + * + * Generated from protobuf field optional bool nfsv3 = 4; + * @param bool $var + * @return $this + */ + public function setNfsv3($var) + { + GPBUtil::checkBool($var); + $this->nfsv3 = $var; + + return $this; + } + + /** + * NFS V4 protocol. + * + * Generated from protobuf field optional bool nfsv4 = 5; + * @return bool + */ + public function getNfsv4() + { + return isset($this->nfsv4) ? $this->nfsv4 : false; + } + + public function hasNfsv4() + { + return isset($this->nfsv4); + } + + public function clearNfsv4() + { + unset($this->nfsv4); + } + + /** + * NFS V4 protocol. + * + * Generated from protobuf field optional bool nfsv4 = 5; + * @param bool $var + * @return $this + */ + public function setNfsv4($var) + { + GPBUtil::checkBool($var); + $this->nfsv4 = $var; + + return $this; + } + + /** + * If enabled (true) the rule defines a read only access for clients matching + * the 'allowedClients' specification. It enables nfs clients to mount using + * 'authentication' kerberos security mode. + * + * Generated from protobuf field optional bool kerberos_5_read_only = 6; + * @return bool + */ + public function getKerberos5ReadOnly() + { + return isset($this->kerberos_5_read_only) ? $this->kerberos_5_read_only : false; + } + + public function hasKerberos5ReadOnly() + { + return isset($this->kerberos_5_read_only); + } + + public function clearKerberos5ReadOnly() + { + unset($this->kerberos_5_read_only); + } + + /** + * If enabled (true) the rule defines a read only access for clients matching + * the 'allowedClients' specification. It enables nfs clients to mount using + * 'authentication' kerberos security mode. + * + * Generated from protobuf field optional bool kerberos_5_read_only = 6; + * @param bool $var + * @return $this + */ + public function setKerberos5ReadOnly($var) + { + GPBUtil::checkBool($var); + $this->kerberos_5_read_only = $var; + + return $this; + } + + /** + * If enabled (true) the rule defines read and write access for clients + * matching the 'allowedClients' specification. It enables nfs clients to + * mount using 'authentication' kerberos security mode. The + * 'kerberos5ReadOnly' value be ignored if this is enabled. + * + * Generated from protobuf field optional bool kerberos_5_read_write = 7; + * @return bool + */ + public function getKerberos5ReadWrite() + { + return isset($this->kerberos_5_read_write) ? $this->kerberos_5_read_write : false; + } + + public function hasKerberos5ReadWrite() + { + return isset($this->kerberos_5_read_write); + } + + public function clearKerberos5ReadWrite() + { + unset($this->kerberos_5_read_write); + } + + /** + * If enabled (true) the rule defines read and write access for clients + * matching the 'allowedClients' specification. It enables nfs clients to + * mount using 'authentication' kerberos security mode. The + * 'kerberos5ReadOnly' value be ignored if this is enabled. + * + * Generated from protobuf field optional bool kerberos_5_read_write = 7; + * @param bool $var + * @return $this + */ + public function setKerberos5ReadWrite($var) + { + GPBUtil::checkBool($var); + $this->kerberos_5_read_write = $var; + + return $this; + } + + /** + * If enabled (true) the rule defines a read only access for clients matching + * the 'allowedClients' specification. It enables nfs clients to mount using + * 'integrity' kerberos security mode. + * + * Generated from protobuf field optional bool kerberos_5i_read_only = 8; + * @return bool + */ + public function getKerberos5IReadOnly() + { + return isset($this->kerberos_5i_read_only) ? $this->kerberos_5i_read_only : false; + } + + public function hasKerberos5IReadOnly() + { + return isset($this->kerberos_5i_read_only); + } + + public function clearKerberos5IReadOnly() + { + unset($this->kerberos_5i_read_only); + } + + /** + * If enabled (true) the rule defines a read only access for clients matching + * the 'allowedClients' specification. It enables nfs clients to mount using + * 'integrity' kerberos security mode. + * + * Generated from protobuf field optional bool kerberos_5i_read_only = 8; + * @param bool $var + * @return $this + */ + public function setKerberos5IReadOnly($var) + { + GPBUtil::checkBool($var); + $this->kerberos_5i_read_only = $var; + + return $this; + } + + /** + * If enabled (true) the rule defines read and write access for clients + * matching the 'allowedClients' specification. It enables nfs clients to + * mount using 'integrity' kerberos security mode. The 'kerberos5iReadOnly' + * value be ignored if this is enabled. + * + * Generated from protobuf field optional bool kerberos_5i_read_write = 9; + * @return bool + */ + public function getKerberos5IReadWrite() + { + return isset($this->kerberos_5i_read_write) ? $this->kerberos_5i_read_write : false; + } + + public function hasKerberos5IReadWrite() + { + return isset($this->kerberos_5i_read_write); + } + + public function clearKerberos5IReadWrite() + { + unset($this->kerberos_5i_read_write); + } + + /** + * If enabled (true) the rule defines read and write access for clients + * matching the 'allowedClients' specification. It enables nfs clients to + * mount using 'integrity' kerberos security mode. The 'kerberos5iReadOnly' + * value be ignored if this is enabled. + * + * Generated from protobuf field optional bool kerberos_5i_read_write = 9; + * @param bool $var + * @return $this + */ + public function setKerberos5IReadWrite($var) + { + GPBUtil::checkBool($var); + $this->kerberos_5i_read_write = $var; + + return $this; + } + + /** + * If enabled (true) the rule defines a read only access for clients matching + * the 'allowedClients' specification. It enables nfs clients to mount using + * 'privacy' kerberos security mode. + * + * Generated from protobuf field optional bool kerberos_5p_read_only = 10; + * @return bool + */ + public function getKerberos5PReadOnly() + { + return isset($this->kerberos_5p_read_only) ? $this->kerberos_5p_read_only : false; + } + + public function hasKerberos5PReadOnly() + { + return isset($this->kerberos_5p_read_only); + } + + public function clearKerberos5PReadOnly() + { + unset($this->kerberos_5p_read_only); + } + + /** + * If enabled (true) the rule defines a read only access for clients matching + * the 'allowedClients' specification. It enables nfs clients to mount using + * 'privacy' kerberos security mode. + * + * Generated from protobuf field optional bool kerberos_5p_read_only = 10; + * @param bool $var + * @return $this + */ + public function setKerberos5PReadOnly($var) + { + GPBUtil::checkBool($var); + $this->kerberos_5p_read_only = $var; + + return $this; + } + + /** + * If enabled (true) the rule defines read and write access for clients + * matching the 'allowedClients' specification. It enables nfs clients to + * mount using 'privacy' kerberos security mode. The 'kerberos5pReadOnly' + * value be ignored if this is enabled. + * + * Generated from protobuf field optional bool kerberos_5p_read_write = 11; + * @return bool + */ + public function getKerberos5PReadWrite() + { + return isset($this->kerberos_5p_read_write) ? $this->kerberos_5p_read_write : false; + } + + public function hasKerberos5PReadWrite() + { + return isset($this->kerberos_5p_read_write); + } + + public function clearKerberos5PReadWrite() + { + unset($this->kerberos_5p_read_write); + } + + /** + * If enabled (true) the rule defines read and write access for clients + * matching the 'allowedClients' specification. It enables nfs clients to + * mount using 'privacy' kerberos security mode. The 'kerberos5pReadOnly' + * value be ignored if this is enabled. + * + * Generated from protobuf field optional bool kerberos_5p_read_write = 11; + * @param bool $var + * @return $this + */ + public function setKerberos5PReadWrite($var) + { + GPBUtil::checkBool($var); + $this->kerberos_5p_read_write = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Snapshot.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Snapshot.php new file mode 100644 index 000000000000..bf48e9046ed6 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Snapshot.php @@ -0,0 +1,293 @@ +google.cloud.netapp.v1.Snapshot + */ +class Snapshot extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The resource name of the snapshot. + * Format: + * `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Output only. The snapshot state. + * + * Generated from protobuf field .google.cloud.netapp.v1.Snapshot.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. State details of the storage pool + * + * Generated from protobuf field string state_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state_details = ''; + /** + * A description of the snapshot with 2048 characters or less. + * Requests with longer descriptions will be rejected. + * + * Generated from protobuf field string description = 4; + */ + protected $description = ''; + /** + * Output only. Current storage usage for the snapshot in bytes. + * + * Generated from protobuf field double used_bytes = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $used_bytes = 0.0; + /** + * Output only. The time when the snapshot was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Resource labels to represent user provided metadata. + * + * Generated from protobuf field map labels = 7; + */ + private $labels; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The resource name of the snapshot. + * Format: + * `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}`. + * @type int $state + * Output only. The snapshot state. + * @type string $state_details + * Output only. State details of the storage pool + * @type string $description + * A description of the snapshot with 2048 characters or less. + * Requests with longer descriptions will be rejected. + * @type float $used_bytes + * Output only. Current storage usage for the snapshot in bytes. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time when the snapshot was created. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Resource labels to represent user provided metadata. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Snapshot::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The resource name of the snapshot. + * Format: + * `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The resource name of the snapshot. + * Format: + * `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The snapshot state. + * + * Generated from protobuf field .google.cloud.netapp.v1.Snapshot.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The snapshot state. + * + * Generated from protobuf field .google.cloud.netapp.v1.Snapshot.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetApp\V1\Snapshot\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. State details of the storage pool + * + * Generated from protobuf field string state_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getStateDetails() + { + return $this->state_details; + } + + /** + * Output only. State details of the storage pool + * + * Generated from protobuf field string state_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setStateDetails($var) + { + GPBUtil::checkString($var, True); + $this->state_details = $var; + + return $this; + } + + /** + * A description of the snapshot with 2048 characters or less. + * Requests with longer descriptions will be rejected. + * + * Generated from protobuf field string description = 4; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * A description of the snapshot with 2048 characters or less. + * Requests with longer descriptions will be rejected. + * + * Generated from protobuf field string description = 4; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Output only. Current storage usage for the snapshot in bytes. + * + * Generated from protobuf field double used_bytes = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return float + */ + public function getUsedBytes() + { + return $this->used_bytes; + } + + /** + * Output only. Current storage usage for the snapshot in bytes. + * + * Generated from protobuf field double used_bytes = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param float $var + * @return $this + */ + public function setUsedBytes($var) + { + GPBUtil::checkDouble($var); + $this->used_bytes = $var; + + return $this; + } + + /** + * Output only. The time when the snapshot was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The time when the snapshot was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Resource labels to represent user provided metadata. + * + * Generated from protobuf field map labels = 7; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Resource labels to represent user provided metadata. + * + * Generated from protobuf field map labels = 7; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Snapshot/State.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Snapshot/State.php new file mode 100644 index 000000000000..e23fe61b5729 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Snapshot/State.php @@ -0,0 +1,92 @@ +google.cloud.netapp.v1.Snapshot.State + */ +class State +{ + /** + * Unspecified Snapshot State + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Snapshot State is Ready + * + * Generated from protobuf enum READY = 1; + */ + const READY = 1; + /** + * Snapshot State is Creating + * + * Generated from protobuf enum CREATING = 2; + */ + const CREATING = 2; + /** + * Snapshot State is Deleting + * + * Generated from protobuf enum DELETING = 3; + */ + const DELETING = 3; + /** + * Snapshot State is Updating + * + * Generated from protobuf enum UPDATING = 4; + */ + const UPDATING = 4; + /** + * Snapshot State is Disabled + * + * Generated from protobuf enum DISABLED = 5; + */ + const DISABLED = 5; + /** + * Snapshot State is Error + * + * Generated from protobuf enum ERROR = 6; + */ + const ERROR = 6; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::READY => 'READY', + self::CREATING => 'CREATING', + self::DELETING => 'DELETING', + self::UPDATING => 'UPDATING', + self::DISABLED => 'DISABLED', + self::ERROR => 'ERROR', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\NetApp\V1\Snapshot_State::class); + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/SnapshotPolicy.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/SnapshotPolicy.php new file mode 100644 index 000000000000..bb19264c49e5 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/SnapshotPolicy.php @@ -0,0 +1,257 @@ +google.cloud.netapp.v1.SnapshotPolicy + */ +class SnapshotPolicy extends \Google\Protobuf\Internal\Message +{ + /** + * If enabled, make snapshots automatically according to the schedules. + * Default is false. + * + * Generated from protobuf field optional bool enabled = 1; + */ + protected $enabled = null; + /** + * Hourly schedule policy. + * + * Generated from protobuf field optional .google.cloud.netapp.v1.HourlySchedule hourly_schedule = 2; + */ + protected $hourly_schedule = null; + /** + * Daily schedule policy. + * + * Generated from protobuf field optional .google.cloud.netapp.v1.DailySchedule daily_schedule = 3; + */ + protected $daily_schedule = null; + /** + * Weekly schedule policy. + * + * Generated from protobuf field optional .google.cloud.netapp.v1.WeeklySchedule weekly_schedule = 4; + */ + protected $weekly_schedule = null; + /** + * Monthly schedule policy. + * + * Generated from protobuf field optional .google.cloud.netapp.v1.MonthlySchedule monthly_schedule = 5; + */ + protected $monthly_schedule = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $enabled + * If enabled, make snapshots automatically according to the schedules. + * Default is false. + * @type \Google\Cloud\NetApp\V1\HourlySchedule $hourly_schedule + * Hourly schedule policy. + * @type \Google\Cloud\NetApp\V1\DailySchedule $daily_schedule + * Daily schedule policy. + * @type \Google\Cloud\NetApp\V1\WeeklySchedule $weekly_schedule + * Weekly schedule policy. + * @type \Google\Cloud\NetApp\V1\MonthlySchedule $monthly_schedule + * Monthly schedule policy. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Volume::initOnce(); + parent::__construct($data); + } + + /** + * If enabled, make snapshots automatically according to the schedules. + * Default is false. + * + * Generated from protobuf field optional bool enabled = 1; + * @return bool + */ + public function getEnabled() + { + return isset($this->enabled) ? $this->enabled : false; + } + + public function hasEnabled() + { + return isset($this->enabled); + } + + public function clearEnabled() + { + unset($this->enabled); + } + + /** + * If enabled, make snapshots automatically according to the schedules. + * Default is false. + * + * Generated from protobuf field optional bool enabled = 1; + * @param bool $var + * @return $this + */ + public function setEnabled($var) + { + GPBUtil::checkBool($var); + $this->enabled = $var; + + return $this; + } + + /** + * Hourly schedule policy. + * + * Generated from protobuf field optional .google.cloud.netapp.v1.HourlySchedule hourly_schedule = 2; + * @return \Google\Cloud\NetApp\V1\HourlySchedule|null + */ + public function getHourlySchedule() + { + return $this->hourly_schedule; + } + + public function hasHourlySchedule() + { + return isset($this->hourly_schedule); + } + + public function clearHourlySchedule() + { + unset($this->hourly_schedule); + } + + /** + * Hourly schedule policy. + * + * Generated from protobuf field optional .google.cloud.netapp.v1.HourlySchedule hourly_schedule = 2; + * @param \Google\Cloud\NetApp\V1\HourlySchedule $var + * @return $this + */ + public function setHourlySchedule($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetApp\V1\HourlySchedule::class); + $this->hourly_schedule = $var; + + return $this; + } + + /** + * Daily schedule policy. + * + * Generated from protobuf field optional .google.cloud.netapp.v1.DailySchedule daily_schedule = 3; + * @return \Google\Cloud\NetApp\V1\DailySchedule|null + */ + public function getDailySchedule() + { + return $this->daily_schedule; + } + + public function hasDailySchedule() + { + return isset($this->daily_schedule); + } + + public function clearDailySchedule() + { + unset($this->daily_schedule); + } + + /** + * Daily schedule policy. + * + * Generated from protobuf field optional .google.cloud.netapp.v1.DailySchedule daily_schedule = 3; + * @param \Google\Cloud\NetApp\V1\DailySchedule $var + * @return $this + */ + public function setDailySchedule($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetApp\V1\DailySchedule::class); + $this->daily_schedule = $var; + + return $this; + } + + /** + * Weekly schedule policy. + * + * Generated from protobuf field optional .google.cloud.netapp.v1.WeeklySchedule weekly_schedule = 4; + * @return \Google\Cloud\NetApp\V1\WeeklySchedule|null + */ + public function getWeeklySchedule() + { + return $this->weekly_schedule; + } + + public function hasWeeklySchedule() + { + return isset($this->weekly_schedule); + } + + public function clearWeeklySchedule() + { + unset($this->weekly_schedule); + } + + /** + * Weekly schedule policy. + * + * Generated from protobuf field optional .google.cloud.netapp.v1.WeeklySchedule weekly_schedule = 4; + * @param \Google\Cloud\NetApp\V1\WeeklySchedule $var + * @return $this + */ + public function setWeeklySchedule($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetApp\V1\WeeklySchedule::class); + $this->weekly_schedule = $var; + + return $this; + } + + /** + * Monthly schedule policy. + * + * Generated from protobuf field optional .google.cloud.netapp.v1.MonthlySchedule monthly_schedule = 5; + * @return \Google\Cloud\NetApp\V1\MonthlySchedule|null + */ + public function getMonthlySchedule() + { + return $this->monthly_schedule; + } + + public function hasMonthlySchedule() + { + return isset($this->monthly_schedule); + } + + public function clearMonthlySchedule() + { + unset($this->monthly_schedule); + } + + /** + * Monthly schedule policy. + * + * Generated from protobuf field optional .google.cloud.netapp.v1.MonthlySchedule monthly_schedule = 5; + * @param \Google\Cloud\NetApp\V1\MonthlySchedule $var + * @return $this + */ + public function setMonthlySchedule($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetApp\V1\MonthlySchedule::class); + $this->monthly_schedule = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/StopReplicationRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/StopReplicationRequest.php new file mode 100644 index 000000000000..5b666e6fb64f --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/StopReplicationRequest.php @@ -0,0 +1,125 @@ +google.cloud.netapp.v1.StopReplicationRequest + */ +class StopReplicationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the replication, in the format of + * projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Indicates whether to stop replication forcefully while data transfer is in + * progress. + * Warning! if force is true, this will abort any current transfers + * and can lead to data loss due to partial transfer. + * If force is false, stop replication will fail while data transfer is in + * progress and you will need to retry later. + * + * Generated from protobuf field bool force = 2; + */ + protected $force = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the replication, in the format of + * projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. + * @type bool $force + * Indicates whether to stop replication forcefully while data transfer is in + * progress. + * Warning! if force is true, this will abort any current transfers + * and can lead to data loss due to partial transfer. + * If force is false, stop replication will fail while data transfer is in + * progress and you will need to retry later. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Replication::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the replication, in the format of + * projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the replication, in the format of + * projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Indicates whether to stop replication forcefully while data transfer is in + * progress. + * Warning! if force is true, this will abort any current transfers + * and can lead to data loss due to partial transfer. + * If force is false, stop replication will fail while data transfer is in + * progress and you will need to retry later. + * + * Generated from protobuf field bool force = 2; + * @return bool + */ + public function getForce() + { + return $this->force; + } + + /** + * Indicates whether to stop replication forcefully while data transfer is in + * progress. + * Warning! if force is true, this will abort any current transfers + * and can lead to data loss due to partial transfer. + * If force is false, stop replication will fail while data transfer is in + * progress and you will need to retry later. + * + * Generated from protobuf field bool force = 2; + * @param bool $var + * @return $this + */ + public function setForce($var) + { + GPBUtil::checkBool($var); + $this->force = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/StoragePool.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/StoragePool.php new file mode 100644 index 000000000000..6a36d1bae34c --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/StoragePool.php @@ -0,0 +1,766 @@ +google.cloud.netapp.v1.StoragePool + */ +class StoragePool extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. Name of the storage pool + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Required. Service level of the storage pool + * + * Generated from protobuf field .google.cloud.netapp.v1.ServiceLevel service_level = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $service_level = 0; + /** + * Required. Capacity in GIB of the pool + * + * Generated from protobuf field int64 capacity_gib = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $capacity_gib = 0; + /** + * Output only. Allocated size of all volumes in GIB in the storage pool + * + * Generated from protobuf field int64 volume_capacity_gib = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $volume_capacity_gib = 0; + /** + * Output only. Volume count of the storage pool + * + * Generated from protobuf field int32 volume_count = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $volume_count = 0; + /** + * Output only. State of the storage pool + * + * Generated from protobuf field .google.cloud.netapp.v1.StoragePool.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. State details of the storage pool + * + * Generated from protobuf field string state_details = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state_details = ''; + /** + * Output only. Create time of the storage pool + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Optional. Description of the storage pool + * + * Generated from protobuf field string description = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Optional. Labels as key value pairs + * + * Generated from protobuf field map labels = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Required. VPC Network name. + * Format: projects/{project}/global/networks/{network} + * + * Generated from protobuf field string network = 11 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $network = ''; + /** + * Optional. Specifies the Active Directory to be used for creating a SMB + * volume. + * + * Generated from protobuf field string active_directory = 12 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $active_directory = ''; + /** + * Optional. Specifies the KMS config to be used for volume encryption. + * + * Generated from protobuf field string kms_config = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $kms_config = ''; + /** + * Optional. Flag indicating if the pool is NFS LDAP enabled or not. + * + * Generated from protobuf field bool ldap_enabled = 14 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $ldap_enabled = false; + /** + * Optional. This field is not implemented. The values provided in this field + * are ignored. + * + * Generated from protobuf field string psa_range = 15 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $psa_range = ''; + /** + * Output only. Specifies the current pool encryption key source. + * + * Generated from protobuf field .google.cloud.netapp.v1.EncryptionType encryption_type = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $encryption_type = 0; + /** + * Deprecated. Used to allow SO pool to access AD or DNS server from other + * regions. + * + * Generated from protobuf field optional bool global_access_allowed = 17 [deprecated = true]; + * @deprecated + */ + protected $global_access_allowed = null; + /** + * Optional. True if the storage pool supports Auto Tiering enabled volumes. + * Default is false. Auto-tiering can be enabled after storage pool creation + * but it can't be disabled once enabled. + * + * Generated from protobuf field bool allow_auto_tiering = 18 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $allow_auto_tiering = false; + /** + * Optional. Specifies the replica zone for regional storagePool. + * + * Generated from protobuf field string replica_zone = 20 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $replica_zone = ''; + /** + * Optional. Specifies the active zone for regional storagePool. + * + * Generated from protobuf field string zone = 21 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $zone = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. Name of the storage pool + * @type int $service_level + * Required. Service level of the storage pool + * @type int|string $capacity_gib + * Required. Capacity in GIB of the pool + * @type int|string $volume_capacity_gib + * Output only. Allocated size of all volumes in GIB in the storage pool + * @type int $volume_count + * Output only. Volume count of the storage pool + * @type int $state + * Output only. State of the storage pool + * @type string $state_details + * Output only. State details of the storage pool + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Create time of the storage pool + * @type string $description + * Optional. Description of the storage pool + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. Labels as key value pairs + * @type string $network + * Required. VPC Network name. + * Format: projects/{project}/global/networks/{network} + * @type string $active_directory + * Optional. Specifies the Active Directory to be used for creating a SMB + * volume. + * @type string $kms_config + * Optional. Specifies the KMS config to be used for volume encryption. + * @type bool $ldap_enabled + * Optional. Flag indicating if the pool is NFS LDAP enabled or not. + * @type string $psa_range + * Optional. This field is not implemented. The values provided in this field + * are ignored. + * @type int $encryption_type + * Output only. Specifies the current pool encryption key source. + * @type bool $global_access_allowed + * Deprecated. Used to allow SO pool to access AD or DNS server from other + * regions. + * @type bool $allow_auto_tiering + * Optional. True if the storage pool supports Auto Tiering enabled volumes. + * Default is false. Auto-tiering can be enabled after storage pool creation + * but it can't be disabled once enabled. + * @type string $replica_zone + * Optional. Specifies the replica zone for regional storagePool. + * @type string $zone + * Optional. Specifies the active zone for regional storagePool. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\StoragePool::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. Name of the storage pool + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. Name of the storage pool + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. Service level of the storage pool + * + * Generated from protobuf field .google.cloud.netapp.v1.ServiceLevel service_level = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getServiceLevel() + { + return $this->service_level; + } + + /** + * Required. Service level of the storage pool + * + * Generated from protobuf field .google.cloud.netapp.v1.ServiceLevel service_level = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setServiceLevel($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetApp\V1\ServiceLevel::class); + $this->service_level = $var; + + return $this; + } + + /** + * Required. Capacity in GIB of the pool + * + * Generated from protobuf field int64 capacity_gib = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return int|string + */ + public function getCapacityGib() + { + return $this->capacity_gib; + } + + /** + * Required. Capacity in GIB of the pool + * + * Generated from protobuf field int64 capacity_gib = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param int|string $var + * @return $this + */ + public function setCapacityGib($var) + { + GPBUtil::checkInt64($var); + $this->capacity_gib = $var; + + return $this; + } + + /** + * Output only. Allocated size of all volumes in GIB in the storage pool + * + * Generated from protobuf field int64 volume_capacity_gib = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getVolumeCapacityGib() + { + return $this->volume_capacity_gib; + } + + /** + * Output only. Allocated size of all volumes in GIB in the storage pool + * + * Generated from protobuf field int64 volume_capacity_gib = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setVolumeCapacityGib($var) + { + GPBUtil::checkInt64($var); + $this->volume_capacity_gib = $var; + + return $this; + } + + /** + * Output only. Volume count of the storage pool + * + * Generated from protobuf field int32 volume_count = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getVolumeCount() + { + return $this->volume_count; + } + + /** + * Output only. Volume count of the storage pool + * + * Generated from protobuf field int32 volume_count = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setVolumeCount($var) + { + GPBUtil::checkInt32($var); + $this->volume_count = $var; + + return $this; + } + + /** + * Output only. State of the storage pool + * + * Generated from protobuf field .google.cloud.netapp.v1.StoragePool.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. State of the storage pool + * + * Generated from protobuf field .google.cloud.netapp.v1.StoragePool.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetApp\V1\StoragePool\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. State details of the storage pool + * + * Generated from protobuf field string state_details = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getStateDetails() + { + return $this->state_details; + } + + /** + * Output only. State details of the storage pool + * + * Generated from protobuf field string state_details = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setStateDetails($var) + { + GPBUtil::checkString($var, True); + $this->state_details = $var; + + return $this; + } + + /** + * Output only. Create time of the storage pool + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. Create time of the storage pool + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Optional. Description of the storage pool + * + * Generated from protobuf field string description = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. Description of the storage pool + * + * Generated from protobuf field string description = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Optional. Labels as key value pairs + * + * Generated from protobuf field map labels = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. Labels as key value pairs + * + * Generated from protobuf field map labels = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Required. VPC Network name. + * Format: projects/{project}/global/networks/{network} + * + * Generated from protobuf field string network = 11 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getNetwork() + { + return $this->network; + } + + /** + * Required. VPC Network name. + * Format: projects/{project}/global/networks/{network} + * + * Generated from protobuf field string network = 11 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setNetwork($var) + { + GPBUtil::checkString($var, True); + $this->network = $var; + + return $this; + } + + /** + * Optional. Specifies the Active Directory to be used for creating a SMB + * volume. + * + * Generated from protobuf field string active_directory = 12 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getActiveDirectory() + { + return $this->active_directory; + } + + /** + * Optional. Specifies the Active Directory to be used for creating a SMB + * volume. + * + * Generated from protobuf field string active_directory = 12 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setActiveDirectory($var) + { + GPBUtil::checkString($var, True); + $this->active_directory = $var; + + return $this; + } + + /** + * Optional. Specifies the KMS config to be used for volume encryption. + * + * Generated from protobuf field string kms_config = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getKmsConfig() + { + return $this->kms_config; + } + + /** + * Optional. Specifies the KMS config to be used for volume encryption. + * + * Generated from protobuf field string kms_config = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setKmsConfig($var) + { + GPBUtil::checkString($var, True); + $this->kms_config = $var; + + return $this; + } + + /** + * Optional. Flag indicating if the pool is NFS LDAP enabled or not. + * + * Generated from protobuf field bool ldap_enabled = 14 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getLdapEnabled() + { + return $this->ldap_enabled; + } + + /** + * Optional. Flag indicating if the pool is NFS LDAP enabled or not. + * + * Generated from protobuf field bool ldap_enabled = 14 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setLdapEnabled($var) + { + GPBUtil::checkBool($var); + $this->ldap_enabled = $var; + + return $this; + } + + /** + * Optional. This field is not implemented. The values provided in this field + * are ignored. + * + * Generated from protobuf field string psa_range = 15 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPsaRange() + { + return $this->psa_range; + } + + /** + * Optional. This field is not implemented. The values provided in this field + * are ignored. + * + * Generated from protobuf field string psa_range = 15 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPsaRange($var) + { + GPBUtil::checkString($var, True); + $this->psa_range = $var; + + return $this; + } + + /** + * Output only. Specifies the current pool encryption key source. + * + * Generated from protobuf field .google.cloud.netapp.v1.EncryptionType encryption_type = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getEncryptionType() + { + return $this->encryption_type; + } + + /** + * Output only. Specifies the current pool encryption key source. + * + * Generated from protobuf field .google.cloud.netapp.v1.EncryptionType encryption_type = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setEncryptionType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetApp\V1\EncryptionType::class); + $this->encryption_type = $var; + + return $this; + } + + /** + * Deprecated. Used to allow SO pool to access AD or DNS server from other + * regions. + * + * Generated from protobuf field optional bool global_access_allowed = 17 [deprecated = true]; + * @return bool + * @deprecated + */ + public function getGlobalAccessAllowed() + { + @trigger_error('global_access_allowed is deprecated.', E_USER_DEPRECATED); + return isset($this->global_access_allowed) ? $this->global_access_allowed : false; + } + + public function hasGlobalAccessAllowed() + { + @trigger_error('global_access_allowed is deprecated.', E_USER_DEPRECATED); + return isset($this->global_access_allowed); + } + + public function clearGlobalAccessAllowed() + { + @trigger_error('global_access_allowed is deprecated.', E_USER_DEPRECATED); + unset($this->global_access_allowed); + } + + /** + * Deprecated. Used to allow SO pool to access AD or DNS server from other + * regions. + * + * Generated from protobuf field optional bool global_access_allowed = 17 [deprecated = true]; + * @param bool $var + * @return $this + * @deprecated + */ + public function setGlobalAccessAllowed($var) + { + @trigger_error('global_access_allowed is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkBool($var); + $this->global_access_allowed = $var; + + return $this; + } + + /** + * Optional. True if the storage pool supports Auto Tiering enabled volumes. + * Default is false. Auto-tiering can be enabled after storage pool creation + * but it can't be disabled once enabled. + * + * Generated from protobuf field bool allow_auto_tiering = 18 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getAllowAutoTiering() + { + return $this->allow_auto_tiering; + } + + /** + * Optional. True if the storage pool supports Auto Tiering enabled volumes. + * Default is false. Auto-tiering can be enabled after storage pool creation + * but it can't be disabled once enabled. + * + * Generated from protobuf field bool allow_auto_tiering = 18 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setAllowAutoTiering($var) + { + GPBUtil::checkBool($var); + $this->allow_auto_tiering = $var; + + return $this; + } + + /** + * Optional. Specifies the replica zone for regional storagePool. + * + * Generated from protobuf field string replica_zone = 20 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getReplicaZone() + { + return $this->replica_zone; + } + + /** + * Optional. Specifies the replica zone for regional storagePool. + * + * Generated from protobuf field string replica_zone = 20 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setReplicaZone($var) + { + GPBUtil::checkString($var, True); + $this->replica_zone = $var; + + return $this; + } + + /** + * Optional. Specifies the active zone for regional storagePool. + * + * Generated from protobuf field string zone = 21 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getZone() + { + return $this->zone; + } + + /** + * Optional. Specifies the active zone for regional storagePool. + * + * Generated from protobuf field string zone = 21 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setZone($var) + { + GPBUtil::checkString($var, True); + $this->zone = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/StoragePool/State.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/StoragePool/State.php new file mode 100644 index 000000000000..54f30aa39562 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/StoragePool/State.php @@ -0,0 +1,99 @@ +google.cloud.netapp.v1.StoragePool.State + */ +class State +{ + /** + * Unspecified Storage Pool State + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Storage Pool State is Ready + * + * Generated from protobuf enum READY = 1; + */ + const READY = 1; + /** + * Storage Pool State is Creating + * + * Generated from protobuf enum CREATING = 2; + */ + const CREATING = 2; + /** + * Storage Pool State is Deleting + * + * Generated from protobuf enum DELETING = 3; + */ + const DELETING = 3; + /** + * Storage Pool State is Updating + * + * Generated from protobuf enum UPDATING = 4; + */ + const UPDATING = 4; + /** + * Storage Pool State is Restoring + * + * Generated from protobuf enum RESTORING = 5; + */ + const RESTORING = 5; + /** + * Storage Pool State is Disabled + * + * Generated from protobuf enum DISABLED = 6; + */ + const DISABLED = 6; + /** + * Storage Pool State is Error + * + * Generated from protobuf enum ERROR = 7; + */ + const ERROR = 7; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::READY => 'READY', + self::CREATING => 'CREATING', + self::DELETING => 'DELETING', + self::UPDATING => 'UPDATING', + self::RESTORING => 'RESTORING', + self::DISABLED => 'DISABLED', + self::ERROR => 'ERROR', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\NetApp\V1\StoragePool_State::class); + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/SwitchActiveReplicaZoneRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/SwitchActiveReplicaZoneRequest.php new file mode 100644 index 000000000000..bb834b099c23 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/SwitchActiveReplicaZoneRequest.php @@ -0,0 +1,68 @@ +google.cloud.netapp.v1.SwitchActiveReplicaZoneRequest + */ +class SwitchActiveReplicaZoneRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the storage pool + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the storage pool + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\StoragePool::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the storage pool + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the storage pool + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/SyncReplicationRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/SyncReplicationRequest.php new file mode 100644 index 000000000000..c76ab8329d9d --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/SyncReplicationRequest.php @@ -0,0 +1,71 @@ +google.cloud.netapp.v1.SyncReplicationRequest + */ +class SyncReplicationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the replication, in the format of + * projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the replication, in the format of + * projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Replication::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the replication, in the format of + * projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the replication, in the format of + * projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/TieringPolicy.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/TieringPolicy.php new file mode 100644 index 000000000000..26a4a16e0cba --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/TieringPolicy.php @@ -0,0 +1,129 @@ +google.cloud.netapp.v1.TieringPolicy + */ +class TieringPolicy extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Flag indicating if the volume has tiering policy enable/pause. + * Default is PAUSED. + * + * Generated from protobuf field optional .google.cloud.netapp.v1.TieringPolicy.TierAction tier_action = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $tier_action = null; + /** + * Optional. Time in days to mark the volume's data block as cold and make it + * eligible for tiering, can be range from 7-183. Default is 31. + * + * Generated from protobuf field optional int32 cooling_threshold_days = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $cooling_threshold_days = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $tier_action + * Optional. Flag indicating if the volume has tiering policy enable/pause. + * Default is PAUSED. + * @type int $cooling_threshold_days + * Optional. Time in days to mark the volume's data block as cold and make it + * eligible for tiering, can be range from 7-183. Default is 31. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Volume::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Flag indicating if the volume has tiering policy enable/pause. + * Default is PAUSED. + * + * Generated from protobuf field optional .google.cloud.netapp.v1.TieringPolicy.TierAction tier_action = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getTierAction() + { + return isset($this->tier_action) ? $this->tier_action : 0; + } + + public function hasTierAction() + { + return isset($this->tier_action); + } + + public function clearTierAction() + { + unset($this->tier_action); + } + + /** + * Optional. Flag indicating if the volume has tiering policy enable/pause. + * Default is PAUSED. + * + * Generated from protobuf field optional .google.cloud.netapp.v1.TieringPolicy.TierAction tier_action = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setTierAction($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetApp\V1\TieringPolicy\TierAction::class); + $this->tier_action = $var; + + return $this; + } + + /** + * Optional. Time in days to mark the volume's data block as cold and make it + * eligible for tiering, can be range from 7-183. Default is 31. + * + * Generated from protobuf field optional int32 cooling_threshold_days = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getCoolingThresholdDays() + { + return isset($this->cooling_threshold_days) ? $this->cooling_threshold_days : 0; + } + + public function hasCoolingThresholdDays() + { + return isset($this->cooling_threshold_days); + } + + public function clearCoolingThresholdDays() + { + unset($this->cooling_threshold_days); + } + + /** + * Optional. Time in days to mark the volume's data block as cold and make it + * eligible for tiering, can be range from 7-183. Default is 31. + * + * Generated from protobuf field optional int32 cooling_threshold_days = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setCoolingThresholdDays($var) + { + GPBUtil::checkInt32($var); + $this->cooling_threshold_days = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/TieringPolicy/TierAction.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/TieringPolicy/TierAction.php new file mode 100644 index 000000000000..81a17a01966a --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/TieringPolicy/TierAction.php @@ -0,0 +1,65 @@ +google.cloud.netapp.v1.TieringPolicy.TierAction + */ +class TierAction +{ + /** + * Unspecified. + * + * Generated from protobuf enum TIER_ACTION_UNSPECIFIED = 0; + */ + const TIER_ACTION_UNSPECIFIED = 0; + /** + * When tiering is enabled, new cold data will be tiered. + * + * Generated from protobuf enum ENABLED = 1; + */ + const ENABLED = 1; + /** + * When paused, tiering won't be performed on new data. Existing data stays + * tiered until accessed. + * + * Generated from protobuf enum PAUSED = 2; + */ + const PAUSED = 2; + + private static $valueToName = [ + self::TIER_ACTION_UNSPECIFIED => 'TIER_ACTION_UNSPECIFIED', + self::ENABLED => 'ENABLED', + self::PAUSED => 'PAUSED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(TierAction::class, \Google\Cloud\NetApp\V1\TieringPolicy_TierAction::class); + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/TransferStats.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/TransferStats.php new file mode 100644 index 000000000000..4459ecf16afc --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/TransferStats.php @@ -0,0 +1,393 @@ +google.cloud.netapp.v1.TransferStats + */ +class TransferStats extends \Google\Protobuf\Internal\Message +{ + /** + * Cumulative bytes trasferred so far for the replication relatinonship. + * + * Generated from protobuf field optional int64 transfer_bytes = 1; + */ + protected $transfer_bytes = null; + /** + * Cumulative time taken across all transfers for the replication + * relationship. + * + * Generated from protobuf field optional .google.protobuf.Duration total_transfer_duration = 2; + */ + protected $total_transfer_duration = null; + /** + * Last transfer size in bytes. + * + * Generated from protobuf field optional int64 last_transfer_bytes = 3; + */ + protected $last_transfer_bytes = null; + /** + * Time taken during last transfer. + * + * Generated from protobuf field optional .google.protobuf.Duration last_transfer_duration = 4; + */ + protected $last_transfer_duration = null; + /** + * Lag duration indicates the duration by which Destination region volume + * content lags behind the primary region volume content. + * + * Generated from protobuf field optional .google.protobuf.Duration lag_duration = 5; + */ + protected $lag_duration = null; + /** + * Time when progress was updated last. + * + * Generated from protobuf field optional .google.protobuf.Timestamp update_time = 6; + */ + protected $update_time = null; + /** + * Time when last transfer completed. + * + * Generated from protobuf field optional .google.protobuf.Timestamp last_transfer_end_time = 7; + */ + protected $last_transfer_end_time = null; + /** + * A message describing the cause of the last transfer failure. + * + * Generated from protobuf field optional string last_transfer_error = 8; + */ + protected $last_transfer_error = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $transfer_bytes + * Cumulative bytes trasferred so far for the replication relatinonship. + * @type \Google\Protobuf\Duration $total_transfer_duration + * Cumulative time taken across all transfers for the replication + * relationship. + * @type int|string $last_transfer_bytes + * Last transfer size in bytes. + * @type \Google\Protobuf\Duration $last_transfer_duration + * Time taken during last transfer. + * @type \Google\Protobuf\Duration $lag_duration + * Lag duration indicates the duration by which Destination region volume + * content lags behind the primary region volume content. + * @type \Google\Protobuf\Timestamp $update_time + * Time when progress was updated last. + * @type \Google\Protobuf\Timestamp $last_transfer_end_time + * Time when last transfer completed. + * @type string $last_transfer_error + * A message describing the cause of the last transfer failure. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Replication::initOnce(); + parent::__construct($data); + } + + /** + * Cumulative bytes trasferred so far for the replication relatinonship. + * + * Generated from protobuf field optional int64 transfer_bytes = 1; + * @return int|string + */ + public function getTransferBytes() + { + return isset($this->transfer_bytes) ? $this->transfer_bytes : 0; + } + + public function hasTransferBytes() + { + return isset($this->transfer_bytes); + } + + public function clearTransferBytes() + { + unset($this->transfer_bytes); + } + + /** + * Cumulative bytes trasferred so far for the replication relatinonship. + * + * Generated from protobuf field optional int64 transfer_bytes = 1; + * @param int|string $var + * @return $this + */ + public function setTransferBytes($var) + { + GPBUtil::checkInt64($var); + $this->transfer_bytes = $var; + + return $this; + } + + /** + * Cumulative time taken across all transfers for the replication + * relationship. + * + * Generated from protobuf field optional .google.protobuf.Duration total_transfer_duration = 2; + * @return \Google\Protobuf\Duration|null + */ + public function getTotalTransferDuration() + { + return $this->total_transfer_duration; + } + + public function hasTotalTransferDuration() + { + return isset($this->total_transfer_duration); + } + + public function clearTotalTransferDuration() + { + unset($this->total_transfer_duration); + } + + /** + * Cumulative time taken across all transfers for the replication + * relationship. + * + * Generated from protobuf field optional .google.protobuf.Duration total_transfer_duration = 2; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setTotalTransferDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->total_transfer_duration = $var; + + return $this; + } + + /** + * Last transfer size in bytes. + * + * Generated from protobuf field optional int64 last_transfer_bytes = 3; + * @return int|string + */ + public function getLastTransferBytes() + { + return isset($this->last_transfer_bytes) ? $this->last_transfer_bytes : 0; + } + + public function hasLastTransferBytes() + { + return isset($this->last_transfer_bytes); + } + + public function clearLastTransferBytes() + { + unset($this->last_transfer_bytes); + } + + /** + * Last transfer size in bytes. + * + * Generated from protobuf field optional int64 last_transfer_bytes = 3; + * @param int|string $var + * @return $this + */ + public function setLastTransferBytes($var) + { + GPBUtil::checkInt64($var); + $this->last_transfer_bytes = $var; + + return $this; + } + + /** + * Time taken during last transfer. + * + * Generated from protobuf field optional .google.protobuf.Duration last_transfer_duration = 4; + * @return \Google\Protobuf\Duration|null + */ + public function getLastTransferDuration() + { + return $this->last_transfer_duration; + } + + public function hasLastTransferDuration() + { + return isset($this->last_transfer_duration); + } + + public function clearLastTransferDuration() + { + unset($this->last_transfer_duration); + } + + /** + * Time taken during last transfer. + * + * Generated from protobuf field optional .google.protobuf.Duration last_transfer_duration = 4; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setLastTransferDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->last_transfer_duration = $var; + + return $this; + } + + /** + * Lag duration indicates the duration by which Destination region volume + * content lags behind the primary region volume content. + * + * Generated from protobuf field optional .google.protobuf.Duration lag_duration = 5; + * @return \Google\Protobuf\Duration|null + */ + public function getLagDuration() + { + return $this->lag_duration; + } + + public function hasLagDuration() + { + return isset($this->lag_duration); + } + + public function clearLagDuration() + { + unset($this->lag_duration); + } + + /** + * Lag duration indicates the duration by which Destination region volume + * content lags behind the primary region volume content. + * + * Generated from protobuf field optional .google.protobuf.Duration lag_duration = 5; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setLagDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->lag_duration = $var; + + return $this; + } + + /** + * Time when progress was updated last. + * + * Generated from protobuf field optional .google.protobuf.Timestamp update_time = 6; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Time when progress was updated last. + * + * Generated from protobuf field optional .google.protobuf.Timestamp update_time = 6; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Time when last transfer completed. + * + * Generated from protobuf field optional .google.protobuf.Timestamp last_transfer_end_time = 7; + * @return \Google\Protobuf\Timestamp|null + */ + public function getLastTransferEndTime() + { + return $this->last_transfer_end_time; + } + + public function hasLastTransferEndTime() + { + return isset($this->last_transfer_end_time); + } + + public function clearLastTransferEndTime() + { + unset($this->last_transfer_end_time); + } + + /** + * Time when last transfer completed. + * + * Generated from protobuf field optional .google.protobuf.Timestamp last_transfer_end_time = 7; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setLastTransferEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->last_transfer_end_time = $var; + + return $this; + } + + /** + * A message describing the cause of the last transfer failure. + * + * Generated from protobuf field optional string last_transfer_error = 8; + * @return string + */ + public function getLastTransferError() + { + return isset($this->last_transfer_error) ? $this->last_transfer_error : ''; + } + + public function hasLastTransferError() + { + return isset($this->last_transfer_error); + } + + public function clearLastTransferError() + { + unset($this->last_transfer_error); + } + + /** + * A message describing the cause of the last transfer failure. + * + * Generated from protobuf field optional string last_transfer_error = 8; + * @param string $var + * @return $this + */ + public function setLastTransferError($var) + { + GPBUtil::checkString($var, True); + $this->last_transfer_error = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateActiveDirectoryRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateActiveDirectoryRequest.php new file mode 100644 index 000000000000..aff58d48c9a2 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateActiveDirectoryRequest.php @@ -0,0 +1,156 @@ +google.cloud.netapp.v1.UpdateActiveDirectoryRequest + */ +class UpdateActiveDirectoryRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * Active Directory resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + /** + * Required. The volume being updated + * + * Generated from protobuf field .google.cloud.netapp.v1.ActiveDirectory active_directory = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $active_directory = null; + + /** + * @param \Google\Cloud\NetApp\V1\ActiveDirectory $activeDirectory Required. The volume being updated + * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the + * Active Directory resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * @return \Google\Cloud\NetApp\V1\UpdateActiveDirectoryRequest + * + * @experimental + */ + public static function build(\Google\Cloud\NetApp\V1\ActiveDirectory $activeDirectory, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setActiveDirectory($activeDirectory) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Required. Field mask is used to specify the fields to be overwritten in the + * Active Directory resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * @type \Google\Cloud\NetApp\V1\ActiveDirectory $active_directory + * Required. The volume being updated + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\ActiveDirectory::initOnce(); + parent::__construct($data); + } + + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * Active Directory resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * Active Directory resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Required. The volume being updated + * + * Generated from protobuf field .google.cloud.netapp.v1.ActiveDirectory active_directory = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetApp\V1\ActiveDirectory|null + */ + public function getActiveDirectory() + { + return $this->active_directory; + } + + public function hasActiveDirectory() + { + return isset($this->active_directory); + } + + public function clearActiveDirectory() + { + unset($this->active_directory); + } + + /** + * Required. The volume being updated + * + * Generated from protobuf field .google.cloud.netapp.v1.ActiveDirectory active_directory = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetApp\V1\ActiveDirectory $var + * @return $this + */ + public function setActiveDirectory($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetApp\V1\ActiveDirectory::class); + $this->active_directory = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateBackupPolicyRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateBackupPolicyRequest.php new file mode 100644 index 000000000000..e7e9619f9379 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateBackupPolicyRequest.php @@ -0,0 +1,156 @@ +google.cloud.netapp.v1.UpdateBackupPolicyRequest + */ +class UpdateBackupPolicyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * Backup Policy resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + /** + * Required. The backup policy being updated + * + * Generated from protobuf field .google.cloud.netapp.v1.BackupPolicy backup_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $backup_policy = null; + + /** + * @param \Google\Cloud\NetApp\V1\BackupPolicy $backupPolicy Required. The backup policy being updated + * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the + * Backup Policy resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * @return \Google\Cloud\NetApp\V1\UpdateBackupPolicyRequest + * + * @experimental + */ + public static function build(\Google\Cloud\NetApp\V1\BackupPolicy $backupPolicy, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setBackupPolicy($backupPolicy) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Required. Field mask is used to specify the fields to be overwritten in the + * Backup Policy resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * @type \Google\Cloud\NetApp\V1\BackupPolicy $backup_policy + * Required. The backup policy being updated + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\BackupPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * Backup Policy resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * Backup Policy resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Required. The backup policy being updated + * + * Generated from protobuf field .google.cloud.netapp.v1.BackupPolicy backup_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetApp\V1\BackupPolicy|null + */ + public function getBackupPolicy() + { + return $this->backup_policy; + } + + public function hasBackupPolicy() + { + return isset($this->backup_policy); + } + + public function clearBackupPolicy() + { + unset($this->backup_policy); + } + + /** + * Required. The backup policy being updated + * + * Generated from protobuf field .google.cloud.netapp.v1.BackupPolicy backup_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetApp\V1\BackupPolicy $var + * @return $this + */ + public function setBackupPolicy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetApp\V1\BackupPolicy::class); + $this->backup_policy = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateBackupRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateBackupRequest.php new file mode 100644 index 000000000000..423245df4e38 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateBackupRequest.php @@ -0,0 +1,156 @@ +google.cloud.netapp.v1.UpdateBackupRequest + */ +class UpdateBackupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * Backup resource to be updated. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + /** + * Required. The backup being updated + * + * Generated from protobuf field .google.cloud.netapp.v1.Backup backup = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $backup = null; + + /** + * @param \Google\Cloud\NetApp\V1\Backup $backup Required. The backup being updated + * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the + * Backup resource to be updated. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * @return \Google\Cloud\NetApp\V1\UpdateBackupRequest + * + * @experimental + */ + public static function build(\Google\Cloud\NetApp\V1\Backup $backup, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setBackup($backup) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Required. Field mask is used to specify the fields to be overwritten in the + * Backup resource to be updated. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * @type \Google\Cloud\NetApp\V1\Backup $backup + * Required. The backup being updated + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Backup::initOnce(); + parent::__construct($data); + } + + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * Backup resource to be updated. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * Backup resource to be updated. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Required. The backup being updated + * + * Generated from protobuf field .google.cloud.netapp.v1.Backup backup = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetApp\V1\Backup|null + */ + public function getBackup() + { + return $this->backup; + } + + public function hasBackup() + { + return isset($this->backup); + } + + public function clearBackup() + { + unset($this->backup); + } + + /** + * Required. The backup being updated + * + * Generated from protobuf field .google.cloud.netapp.v1.Backup backup = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetApp\V1\Backup $var + * @return $this + */ + public function setBackup($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetApp\V1\Backup::class); + $this->backup = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateBackupVaultRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateBackupVaultRequest.php new file mode 100644 index 000000000000..5ae79183eba2 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateBackupVaultRequest.php @@ -0,0 +1,156 @@ +google.cloud.netapp.v1.UpdateBackupVaultRequest + */ +class UpdateBackupVaultRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * Backup resource to be updated. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + /** + * Required. The backupVault being updated + * + * Generated from protobuf field .google.cloud.netapp.v1.BackupVault backup_vault = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $backup_vault = null; + + /** + * @param \Google\Cloud\NetApp\V1\BackupVault $backupVault Required. The backupVault being updated + * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the + * Backup resource to be updated. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * @return \Google\Cloud\NetApp\V1\UpdateBackupVaultRequest + * + * @experimental + */ + public static function build(\Google\Cloud\NetApp\V1\BackupVault $backupVault, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setBackupVault($backupVault) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Required. Field mask is used to specify the fields to be overwritten in the + * Backup resource to be updated. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * @type \Google\Cloud\NetApp\V1\BackupVault $backup_vault + * Required. The backupVault being updated + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\BackupVault::initOnce(); + parent::__construct($data); + } + + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * Backup resource to be updated. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * Backup resource to be updated. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Required. The backupVault being updated + * + * Generated from protobuf field .google.cloud.netapp.v1.BackupVault backup_vault = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetApp\V1\BackupVault|null + */ + public function getBackupVault() + { + return $this->backup_vault; + } + + public function hasBackupVault() + { + return isset($this->backup_vault); + } + + public function clearBackupVault() + { + unset($this->backup_vault); + } + + /** + * Required. The backupVault being updated + * + * Generated from protobuf field .google.cloud.netapp.v1.BackupVault backup_vault = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetApp\V1\BackupVault $var + * @return $this + */ + public function setBackupVault($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetApp\V1\BackupVault::class); + $this->backup_vault = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateKmsConfigRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateKmsConfigRequest.php new file mode 100644 index 000000000000..e7d21cc91040 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateKmsConfigRequest.php @@ -0,0 +1,156 @@ +google.cloud.netapp.v1.UpdateKmsConfigRequest + */ +class UpdateKmsConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * KmsConfig resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + /** + * Required. The KmsConfig being updated + * + * Generated from protobuf field .google.cloud.netapp.v1.KmsConfig kms_config = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $kms_config = null; + + /** + * @param \Google\Cloud\NetApp\V1\KmsConfig $kmsConfig Required. The KmsConfig being updated + * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the + * KmsConfig resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * @return \Google\Cloud\NetApp\V1\UpdateKmsConfigRequest + * + * @experimental + */ + public static function build(\Google\Cloud\NetApp\V1\KmsConfig $kmsConfig, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setKmsConfig($kmsConfig) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Required. Field mask is used to specify the fields to be overwritten in the + * KmsConfig resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * @type \Google\Cloud\NetApp\V1\KmsConfig $kms_config + * Required. The KmsConfig being updated + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Kms::initOnce(); + parent::__construct($data); + } + + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * KmsConfig resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * KmsConfig resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Required. The KmsConfig being updated + * + * Generated from protobuf field .google.cloud.netapp.v1.KmsConfig kms_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetApp\V1\KmsConfig|null + */ + public function getKmsConfig() + { + return $this->kms_config; + } + + public function hasKmsConfig() + { + return isset($this->kms_config); + } + + public function clearKmsConfig() + { + unset($this->kms_config); + } + + /** + * Required. The KmsConfig being updated + * + * Generated from protobuf field .google.cloud.netapp.v1.KmsConfig kms_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetApp\V1\KmsConfig $var + * @return $this + */ + public function setKmsConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetApp\V1\KmsConfig::class); + $this->kms_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateReplicationRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateReplicationRequest.php new file mode 100644 index 000000000000..74d52ea18a2a --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateReplicationRequest.php @@ -0,0 +1,141 @@ +google.cloud.netapp.v1.UpdateReplicationRequest + */ +class UpdateReplicationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Mask of fields to update. At least one path must be supplied in + * this field. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + /** + * Required. A replication resource + * + * Generated from protobuf field .google.cloud.netapp.v1.Replication replication = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $replication = null; + + /** + * @param \Google\Cloud\NetApp\V1\Replication $replication Required. A replication resource + * @param \Google\Protobuf\FieldMask $updateMask Required. Mask of fields to update. At least one path must be supplied in + * this field. + * + * @return \Google\Cloud\NetApp\V1\UpdateReplicationRequest + * + * @experimental + */ + public static function build(\Google\Cloud\NetApp\V1\Replication $replication, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setReplication($replication) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Required. Mask of fields to update. At least one path must be supplied in + * this field. + * @type \Google\Cloud\NetApp\V1\Replication $replication + * Required. A replication resource + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Replication::initOnce(); + parent::__construct($data); + } + + /** + * Required. Mask of fields to update. At least one path must be supplied in + * this field. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. Mask of fields to update. At least one path must be supplied in + * this field. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Required. A replication resource + * + * Generated from protobuf field .google.cloud.netapp.v1.Replication replication = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetApp\V1\Replication|null + */ + public function getReplication() + { + return $this->replication; + } + + public function hasReplication() + { + return isset($this->replication); + } + + public function clearReplication() + { + unset($this->replication); + } + + /** + * Required. A replication resource + * + * Generated from protobuf field .google.cloud.netapp.v1.Replication replication = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetApp\V1\Replication $var + * @return $this + */ + public function setReplication($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetApp\V1\Replication::class); + $this->replication = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateSnapshotRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateSnapshotRequest.php new file mode 100644 index 000000000000..245912940e92 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateSnapshotRequest.php @@ -0,0 +1,141 @@ +google.cloud.netapp.v1.UpdateSnapshotRequest + */ +class UpdateSnapshotRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Mask of fields to update. At least one path must be supplied in + * this field. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + /** + * Required. A snapshot resource + * + * Generated from protobuf field .google.cloud.netapp.v1.Snapshot snapshot = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $snapshot = null; + + /** + * @param \Google\Cloud\NetApp\V1\Snapshot $snapshot Required. A snapshot resource + * @param \Google\Protobuf\FieldMask $updateMask Required. Mask of fields to update. At least one path must be supplied in + * this field. + * + * @return \Google\Cloud\NetApp\V1\UpdateSnapshotRequest + * + * @experimental + */ + public static function build(\Google\Cloud\NetApp\V1\Snapshot $snapshot, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setSnapshot($snapshot) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Required. Mask of fields to update. At least one path must be supplied in + * this field. + * @type \Google\Cloud\NetApp\V1\Snapshot $snapshot + * Required. A snapshot resource + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Snapshot::initOnce(); + parent::__construct($data); + } + + /** + * Required. Mask of fields to update. At least one path must be supplied in + * this field. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. Mask of fields to update. At least one path must be supplied in + * this field. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Required. A snapshot resource + * + * Generated from protobuf field .google.cloud.netapp.v1.Snapshot snapshot = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetApp\V1\Snapshot|null + */ + public function getSnapshot() + { + return $this->snapshot; + } + + public function hasSnapshot() + { + return isset($this->snapshot); + } + + public function clearSnapshot() + { + unset($this->snapshot); + } + + /** + * Required. A snapshot resource + * + * Generated from protobuf field .google.cloud.netapp.v1.Snapshot snapshot = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetApp\V1\Snapshot $var + * @return $this + */ + public function setSnapshot($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetApp\V1\Snapshot::class); + $this->snapshot = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateStoragePoolRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateStoragePoolRequest.php new file mode 100644 index 000000000000..d6194402ffe3 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateStoragePoolRequest.php @@ -0,0 +1,156 @@ +google.cloud.netapp.v1.UpdateStoragePoolRequest + */ +class UpdateStoragePoolRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * StoragePool resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + /** + * Required. The pool being updated + * + * Generated from protobuf field .google.cloud.netapp.v1.StoragePool storage_pool = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $storage_pool = null; + + /** + * @param \Google\Cloud\NetApp\V1\StoragePool $storagePool Required. The pool being updated + * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the + * StoragePool resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * @return \Google\Cloud\NetApp\V1\UpdateStoragePoolRequest + * + * @experimental + */ + public static function build(\Google\Cloud\NetApp\V1\StoragePool $storagePool, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setStoragePool($storagePool) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Required. Field mask is used to specify the fields to be overwritten in the + * StoragePool resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * @type \Google\Cloud\NetApp\V1\StoragePool $storage_pool + * Required. The pool being updated + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\StoragePool::initOnce(); + parent::__construct($data); + } + + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * StoragePool resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * StoragePool resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Required. The pool being updated + * + * Generated from protobuf field .google.cloud.netapp.v1.StoragePool storage_pool = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetApp\V1\StoragePool|null + */ + public function getStoragePool() + { + return $this->storage_pool; + } + + public function hasStoragePool() + { + return isset($this->storage_pool); + } + + public function clearStoragePool() + { + unset($this->storage_pool); + } + + /** + * Required. The pool being updated + * + * Generated from protobuf field .google.cloud.netapp.v1.StoragePool storage_pool = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetApp\V1\StoragePool $var + * @return $this + */ + public function setStoragePool($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetApp\V1\StoragePool::class); + $this->storage_pool = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateVolumeRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateVolumeRequest.php new file mode 100644 index 000000000000..9ff480418046 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateVolumeRequest.php @@ -0,0 +1,156 @@ +google.cloud.netapp.v1.UpdateVolumeRequest + */ +class UpdateVolumeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * Volume resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + /** + * Required. The volume being updated + * + * Generated from protobuf field .google.cloud.netapp.v1.Volume volume = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $volume = null; + + /** + * @param \Google\Cloud\NetApp\V1\Volume $volume Required. The volume being updated + * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the + * Volume resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * @return \Google\Cloud\NetApp\V1\UpdateVolumeRequest + * + * @experimental + */ + public static function build(\Google\Cloud\NetApp\V1\Volume $volume, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setVolume($volume) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Required. Field mask is used to specify the fields to be overwritten in the + * Volume resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * @type \Google\Cloud\NetApp\V1\Volume $volume + * Required. The volume being updated + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Volume::initOnce(); + parent::__construct($data); + } + + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * Volume resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * Volume resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Required. The volume being updated + * + * Generated from protobuf field .google.cloud.netapp.v1.Volume volume = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetApp\V1\Volume|null + */ + public function getVolume() + { + return $this->volume; + } + + public function hasVolume() + { + return isset($this->volume); + } + + public function clearVolume() + { + unset($this->volume); + } + + /** + * Required. The volume being updated + * + * Generated from protobuf field .google.cloud.netapp.v1.Volume volume = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetApp\V1\Volume $var + * @return $this + */ + public function setVolume($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetApp\V1\Volume::class); + $this->volume = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/VerifyKmsConfigRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/VerifyKmsConfigRequest.php new file mode 100644 index 000000000000..cbdbf82d59b6 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/VerifyKmsConfigRequest.php @@ -0,0 +1,67 @@ +google.cloud.netapp.v1.VerifyKmsConfigRequest + */ +class VerifyKmsConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the KMS Config to be verified. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the KMS Config to be verified. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Kms::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the KMS Config to be verified. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the KMS Config to be verified. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/VerifyKmsConfigResponse.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/VerifyKmsConfigResponse.php new file mode 100644 index 000000000000..317111a10436 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/VerifyKmsConfigResponse.php @@ -0,0 +1,144 @@ +google.cloud.netapp.v1.VerifyKmsConfigResponse + */ +class VerifyKmsConfigResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. If the customer key configured correctly to the encrypt + * volume. + * + * Generated from protobuf field bool healthy = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $healthy = false; + /** + * Output only. Error message if config is not healthy. + * + * Generated from protobuf field string health_error = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $health_error = ''; + /** + * Output only. Instructions for the customers to provide the access to the + * encryption key. + * + * Generated from protobuf field string instructions = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $instructions = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $healthy + * Output only. If the customer key configured correctly to the encrypt + * volume. + * @type string $health_error + * Output only. Error message if config is not healthy. + * @type string $instructions + * Output only. Instructions for the customers to provide the access to the + * encryption key. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Kms::initOnce(); + parent::__construct($data); + } + + /** + * Output only. If the customer key configured correctly to the encrypt + * volume. + * + * Generated from protobuf field bool healthy = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getHealthy() + { + return $this->healthy; + } + + /** + * Output only. If the customer key configured correctly to the encrypt + * volume. + * + * Generated from protobuf field bool healthy = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setHealthy($var) + { + GPBUtil::checkBool($var); + $this->healthy = $var; + + return $this; + } + + /** + * Output only. Error message if config is not healthy. + * + * Generated from protobuf field string health_error = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getHealthError() + { + return $this->health_error; + } + + /** + * Output only. Error message if config is not healthy. + * + * Generated from protobuf field string health_error = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setHealthError($var) + { + GPBUtil::checkString($var, True); + $this->health_error = $var; + + return $this; + } + + /** + * Output only. Instructions for the customers to provide the access to the + * encryption key. + * + * Generated from protobuf field string instructions = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getInstructions() + { + return $this->instructions; + } + + /** + * Output only. Instructions for the customers to provide the access to the + * encryption key. + * + * Generated from protobuf field string instructions = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setInstructions($var) + { + GPBUtil::checkString($var, True); + $this->instructions = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Volume.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Volume.php new file mode 100644 index 000000000000..3c33402f966f --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Volume.php @@ -0,0 +1,1443 @@ +google.cloud.netapp.v1.Volume + */ +class Volume extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. Name of the volume + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Output only. State of the volume + * + * Generated from protobuf field .google.cloud.netapp.v1.Volume.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. State details of the volume + * + * Generated from protobuf field string state_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state_details = ''; + /** + * Output only. Create time of the volume + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Required. Share name of the volume + * + * Generated from protobuf field string share_name = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $share_name = ''; + /** + * Output only. This field is not implemented. The values provided in this + * field are ignored. + * + * Generated from protobuf field string psa_range = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $psa_range = ''; + /** + * Required. StoragePool name of the volume + * + * Generated from protobuf field string storage_pool = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $storage_pool = ''; + /** + * Output only. VPC Network name. + * Format: projects/{project}/global/networks/{network} + * + * Generated from protobuf field string network = 8 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $network = ''; + /** + * Output only. Service level of the volume + * + * Generated from protobuf field .google.cloud.netapp.v1.ServiceLevel service_level = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $service_level = 0; + /** + * Required. Capacity in GIB of the volume + * + * Generated from protobuf field int64 capacity_gib = 10 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $capacity_gib = 0; + /** + * Optional. Export policy of the volume + * + * Generated from protobuf field .google.cloud.netapp.v1.ExportPolicy export_policy = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $export_policy = null; + /** + * Required. Protocols required for the volume + * + * Generated from protobuf field repeated .google.cloud.netapp.v1.Protocols protocols = 12 [(.google.api.field_behavior) = REQUIRED]; + */ + private $protocols; + /** + * Optional. SMB share settings for the volume. + * + * Generated from protobuf field repeated .google.cloud.netapp.v1.SMBSettings smb_settings = 13 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $smb_settings; + /** + * Output only. Mount options of this volume + * + * Generated from protobuf field repeated .google.cloud.netapp.v1.MountOption mount_options = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $mount_options; + /** + * Optional. Default unix style permission (e.g. 777) the mount point will be + * created with. Applicable for NFS protocol types only. + * + * Generated from protobuf field string unix_permissions = 15 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $unix_permissions = ''; + /** + * Optional. Labels as key value pairs + * + * Generated from protobuf field map labels = 16 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Optional. Description of the volume + * + * Generated from protobuf field string description = 17 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Optional. SnapshotPolicy for a volume. + * + * Generated from protobuf field .google.cloud.netapp.v1.SnapshotPolicy snapshot_policy = 18 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $snapshot_policy = null; + /** + * Optional. Snap_reserve specifies percentage of volume storage reserved for + * snapshot storage. Default is 0 percent. + * + * Generated from protobuf field double snap_reserve = 19 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $snap_reserve = 0.0; + /** + * Optional. Snapshot_directory if enabled (true) the volume will contain a + * read-only .snapshot directory which provides access to each of the volume's + * snapshots. + * + * Generated from protobuf field bool snapshot_directory = 20 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $snapshot_directory = false; + /** + * Output only. Used capacity in GIB of the volume. This is computed + * periodically and it does not represent the realtime usage. + * + * Generated from protobuf field int64 used_gib = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $used_gib = 0; + /** + * Optional. Security Style of the Volume + * + * Generated from protobuf field .google.cloud.netapp.v1.SecurityStyle security_style = 22 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $security_style = 0; + /** + * Optional. Flag indicating if the volume is a kerberos volume or not, export + * policy rules control kerberos security modes (krb5, krb5i, krb5p). + * + * Generated from protobuf field bool kerberos_enabled = 23 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $kerberos_enabled = false; + /** + * Output only. Flag indicating if the volume is NFS LDAP enabled or not. + * + * Generated from protobuf field bool ldap_enabled = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $ldap_enabled = false; + /** + * Output only. Specifies the ActiveDirectory name of a SMB volume. + * + * Generated from protobuf field string active_directory = 25 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $active_directory = ''; + /** + * Optional. Specifies the source of the volume to be created from. + * + * Generated from protobuf field .google.cloud.netapp.v1.RestoreParameters restore_parameters = 26 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $restore_parameters = null; + /** + * Output only. Specifies the KMS config to be used for volume encryption. + * + * Generated from protobuf field string kms_config = 27 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $kms_config = ''; + /** + * Output only. Specified the current volume encryption key source. + * + * Generated from protobuf field .google.cloud.netapp.v1.EncryptionType encryption_type = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $encryption_type = 0; + /** + * Output only. Indicates whether the volume is part of a replication + * relationship. + * + * Generated from protobuf field bool has_replication = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $has_replication = false; + /** + * BackupConfig of the volume. + * + * Generated from protobuf field optional .google.cloud.netapp.v1.BackupConfig backup_config = 30; + */ + protected $backup_config = null; + /** + * Optional. List of actions that are restricted on this volume. + * + * Generated from protobuf field repeated .google.cloud.netapp.v1.RestrictedAction restricted_actions = 31 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $restricted_actions; + /** + * Optional. Flag indicating if the volume will be a large capacity volume or + * a regular volume. + * + * Generated from protobuf field bool large_capacity = 32 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $large_capacity = false; + /** + * Optional. Flag indicating if the volume will have an IP address per node + * for volumes supporting multiple IP endpoints. Only the volume with + * large_capacity will be allowed to have multiple endpoints. + * + * Generated from protobuf field bool multiple_endpoints = 33 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $multiple_endpoints = false; + /** + * Tiering policy for the volume. + * + * Generated from protobuf field optional .google.cloud.netapp.v1.TieringPolicy tiering_policy = 34; + */ + protected $tiering_policy = null; + /** + * Output only. Specifies the replica zone for regional volume. + * + * Generated from protobuf field string replica_zone = 36 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $replica_zone = ''; + /** + * Output only. Specifies the active zone for regional volume. + * + * Generated from protobuf field string zone = 37 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $zone = ''; + /** + * Output only. Size of the volume cold tier data in GiB. + * + * Generated from protobuf field int64 cold_tier_size_gib = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $cold_tier_size_gib = 0; + /** + * Optional. The Hybrid Replication parameters for the volume. + * + * Generated from protobuf field .google.cloud.netapp.v1.HybridReplicationParameters hybrid_replication_parameters = 40 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $hybrid_replication_parameters = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. Name of the volume + * @type int $state + * Output only. State of the volume + * @type string $state_details + * Output only. State details of the volume + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Create time of the volume + * @type string $share_name + * Required. Share name of the volume + * @type string $psa_range + * Output only. This field is not implemented. The values provided in this + * field are ignored. + * @type string $storage_pool + * Required. StoragePool name of the volume + * @type string $network + * Output only. VPC Network name. + * Format: projects/{project}/global/networks/{network} + * @type int $service_level + * Output only. Service level of the volume + * @type int|string $capacity_gib + * Required. Capacity in GIB of the volume + * @type \Google\Cloud\NetApp\V1\ExportPolicy $export_policy + * Optional. Export policy of the volume + * @type array|\Google\Protobuf\Internal\RepeatedField $protocols + * Required. Protocols required for the volume + * @type array|\Google\Protobuf\Internal\RepeatedField $smb_settings + * Optional. SMB share settings for the volume. + * @type array<\Google\Cloud\NetApp\V1\MountOption>|\Google\Protobuf\Internal\RepeatedField $mount_options + * Output only. Mount options of this volume + * @type string $unix_permissions + * Optional. Default unix style permission (e.g. 777) the mount point will be + * created with. Applicable for NFS protocol types only. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. Labels as key value pairs + * @type string $description + * Optional. Description of the volume + * @type \Google\Cloud\NetApp\V1\SnapshotPolicy $snapshot_policy + * Optional. SnapshotPolicy for a volume. + * @type float $snap_reserve + * Optional. Snap_reserve specifies percentage of volume storage reserved for + * snapshot storage. Default is 0 percent. + * @type bool $snapshot_directory + * Optional. Snapshot_directory if enabled (true) the volume will contain a + * read-only .snapshot directory which provides access to each of the volume's + * snapshots. + * @type int|string $used_gib + * Output only. Used capacity in GIB of the volume. This is computed + * periodically and it does not represent the realtime usage. + * @type int $security_style + * Optional. Security Style of the Volume + * @type bool $kerberos_enabled + * Optional. Flag indicating if the volume is a kerberos volume or not, export + * policy rules control kerberos security modes (krb5, krb5i, krb5p). + * @type bool $ldap_enabled + * Output only. Flag indicating if the volume is NFS LDAP enabled or not. + * @type string $active_directory + * Output only. Specifies the ActiveDirectory name of a SMB volume. + * @type \Google\Cloud\NetApp\V1\RestoreParameters $restore_parameters + * Optional. Specifies the source of the volume to be created from. + * @type string $kms_config + * Output only. Specifies the KMS config to be used for volume encryption. + * @type int $encryption_type + * Output only. Specified the current volume encryption key source. + * @type bool $has_replication + * Output only. Indicates whether the volume is part of a replication + * relationship. + * @type \Google\Cloud\NetApp\V1\BackupConfig $backup_config + * BackupConfig of the volume. + * @type array|\Google\Protobuf\Internal\RepeatedField $restricted_actions + * Optional. List of actions that are restricted on this volume. + * @type bool $large_capacity + * Optional. Flag indicating if the volume will be a large capacity volume or + * a regular volume. + * @type bool $multiple_endpoints + * Optional. Flag indicating if the volume will have an IP address per node + * for volumes supporting multiple IP endpoints. Only the volume with + * large_capacity will be allowed to have multiple endpoints. + * @type \Google\Cloud\NetApp\V1\TieringPolicy $tiering_policy + * Tiering policy for the volume. + * @type string $replica_zone + * Output only. Specifies the replica zone for regional volume. + * @type string $zone + * Output only. Specifies the active zone for regional volume. + * @type int|string $cold_tier_size_gib + * Output only. Size of the volume cold tier data in GiB. + * @type \Google\Cloud\NetApp\V1\HybridReplicationParameters $hybrid_replication_parameters + * Optional. The Hybrid Replication parameters for the volume. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Volume::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. Name of the volume + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. Name of the volume + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. State of the volume + * + * Generated from protobuf field .google.cloud.netapp.v1.Volume.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. State of the volume + * + * Generated from protobuf field .google.cloud.netapp.v1.Volume.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetApp\V1\Volume\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. State details of the volume + * + * Generated from protobuf field string state_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getStateDetails() + { + return $this->state_details; + } + + /** + * Output only. State details of the volume + * + * Generated from protobuf field string state_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setStateDetails($var) + { + GPBUtil::checkString($var, True); + $this->state_details = $var; + + return $this; + } + + /** + * Output only. Create time of the volume + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. Create time of the volume + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Required. Share name of the volume + * + * Generated from protobuf field string share_name = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getShareName() + { + return $this->share_name; + } + + /** + * Required. Share name of the volume + * + * Generated from protobuf field string share_name = 5 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setShareName($var) + { + GPBUtil::checkString($var, True); + $this->share_name = $var; + + return $this; + } + + /** + * Output only. This field is not implemented. The values provided in this + * field are ignored. + * + * Generated from protobuf field string psa_range = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getPsaRange() + { + return $this->psa_range; + } + + /** + * Output only. This field is not implemented. The values provided in this + * field are ignored. + * + * Generated from protobuf field string psa_range = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setPsaRange($var) + { + GPBUtil::checkString($var, True); + $this->psa_range = $var; + + return $this; + } + + /** + * Required. StoragePool name of the volume + * + * Generated from protobuf field string storage_pool = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getStoragePool() + { + return $this->storage_pool; + } + + /** + * Required. StoragePool name of the volume + * + * Generated from protobuf field string storage_pool = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setStoragePool($var) + { + GPBUtil::checkString($var, True); + $this->storage_pool = $var; + + return $this; + } + + /** + * Output only. VPC Network name. + * Format: projects/{project}/global/networks/{network} + * + * Generated from protobuf field string network = 8 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getNetwork() + { + return $this->network; + } + + /** + * Output only. VPC Network name. + * Format: projects/{project}/global/networks/{network} + * + * Generated from protobuf field string network = 8 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setNetwork($var) + { + GPBUtil::checkString($var, True); + $this->network = $var; + + return $this; + } + + /** + * Output only. Service level of the volume + * + * Generated from protobuf field .google.cloud.netapp.v1.ServiceLevel service_level = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getServiceLevel() + { + return $this->service_level; + } + + /** + * Output only. Service level of the volume + * + * Generated from protobuf field .google.cloud.netapp.v1.ServiceLevel service_level = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setServiceLevel($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetApp\V1\ServiceLevel::class); + $this->service_level = $var; + + return $this; + } + + /** + * Required. Capacity in GIB of the volume + * + * Generated from protobuf field int64 capacity_gib = 10 [(.google.api.field_behavior) = REQUIRED]; + * @return int|string + */ + public function getCapacityGib() + { + return $this->capacity_gib; + } + + /** + * Required. Capacity in GIB of the volume + * + * Generated from protobuf field int64 capacity_gib = 10 [(.google.api.field_behavior) = REQUIRED]; + * @param int|string $var + * @return $this + */ + public function setCapacityGib($var) + { + GPBUtil::checkInt64($var); + $this->capacity_gib = $var; + + return $this; + } + + /** + * Optional. Export policy of the volume + * + * Generated from protobuf field .google.cloud.netapp.v1.ExportPolicy export_policy = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\NetApp\V1\ExportPolicy|null + */ + public function getExportPolicy() + { + return $this->export_policy; + } + + public function hasExportPolicy() + { + return isset($this->export_policy); + } + + public function clearExportPolicy() + { + unset($this->export_policy); + } + + /** + * Optional. Export policy of the volume + * + * Generated from protobuf field .google.cloud.netapp.v1.ExportPolicy export_policy = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\NetApp\V1\ExportPolicy $var + * @return $this + */ + public function setExportPolicy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetApp\V1\ExportPolicy::class); + $this->export_policy = $var; + + return $this; + } + + /** + * Required. Protocols required for the volume + * + * Generated from protobuf field repeated .google.cloud.netapp.v1.Protocols protocols = 12 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getProtocols() + { + return $this->protocols; + } + + /** + * Required. Protocols required for the volume + * + * Generated from protobuf field repeated .google.cloud.netapp.v1.Protocols protocols = 12 [(.google.api.field_behavior) = REQUIRED]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setProtocols($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\NetApp\V1\Protocols::class); + $this->protocols = $arr; + + return $this; + } + + /** + * Optional. SMB share settings for the volume. + * + * Generated from protobuf field repeated .google.cloud.netapp.v1.SMBSettings smb_settings = 13 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSmbSettings() + { + return $this->smb_settings; + } + + /** + * Optional. SMB share settings for the volume. + * + * Generated from protobuf field repeated .google.cloud.netapp.v1.SMBSettings smb_settings = 13 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSmbSettings($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\NetApp\V1\SMBSettings::class); + $this->smb_settings = $arr; + + return $this; + } + + /** + * Output only. Mount options of this volume + * + * Generated from protobuf field repeated .google.cloud.netapp.v1.MountOption mount_options = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMountOptions() + { + return $this->mount_options; + } + + /** + * Output only. Mount options of this volume + * + * Generated from protobuf field repeated .google.cloud.netapp.v1.MountOption mount_options = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\NetApp\V1\MountOption>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMountOptions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetApp\V1\MountOption::class); + $this->mount_options = $arr; + + return $this; + } + + /** + * Optional. Default unix style permission (e.g. 777) the mount point will be + * created with. Applicable for NFS protocol types only. + * + * Generated from protobuf field string unix_permissions = 15 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getUnixPermissions() + { + return $this->unix_permissions; + } + + /** + * Optional. Default unix style permission (e.g. 777) the mount point will be + * created with. Applicable for NFS protocol types only. + * + * Generated from protobuf field string unix_permissions = 15 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setUnixPermissions($var) + { + GPBUtil::checkString($var, True); + $this->unix_permissions = $var; + + return $this; + } + + /** + * Optional. Labels as key value pairs + * + * Generated from protobuf field map labels = 16 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. Labels as key value pairs + * + * Generated from protobuf field map labels = 16 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Optional. Description of the volume + * + * Generated from protobuf field string description = 17 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. Description of the volume + * + * Generated from protobuf field string description = 17 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Optional. SnapshotPolicy for a volume. + * + * Generated from protobuf field .google.cloud.netapp.v1.SnapshotPolicy snapshot_policy = 18 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\NetApp\V1\SnapshotPolicy|null + */ + public function getSnapshotPolicy() + { + return $this->snapshot_policy; + } + + public function hasSnapshotPolicy() + { + return isset($this->snapshot_policy); + } + + public function clearSnapshotPolicy() + { + unset($this->snapshot_policy); + } + + /** + * Optional. SnapshotPolicy for a volume. + * + * Generated from protobuf field .google.cloud.netapp.v1.SnapshotPolicy snapshot_policy = 18 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\NetApp\V1\SnapshotPolicy $var + * @return $this + */ + public function setSnapshotPolicy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetApp\V1\SnapshotPolicy::class); + $this->snapshot_policy = $var; + + return $this; + } + + /** + * Optional. Snap_reserve specifies percentage of volume storage reserved for + * snapshot storage. Default is 0 percent. + * + * Generated from protobuf field double snap_reserve = 19 [(.google.api.field_behavior) = OPTIONAL]; + * @return float + */ + public function getSnapReserve() + { + return $this->snap_reserve; + } + + /** + * Optional. Snap_reserve specifies percentage of volume storage reserved for + * snapshot storage. Default is 0 percent. + * + * Generated from protobuf field double snap_reserve = 19 [(.google.api.field_behavior) = OPTIONAL]; + * @param float $var + * @return $this + */ + public function setSnapReserve($var) + { + GPBUtil::checkDouble($var); + $this->snap_reserve = $var; + + return $this; + } + + /** + * Optional. Snapshot_directory if enabled (true) the volume will contain a + * read-only .snapshot directory which provides access to each of the volume's + * snapshots. + * + * Generated from protobuf field bool snapshot_directory = 20 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getSnapshotDirectory() + { + return $this->snapshot_directory; + } + + /** + * Optional. Snapshot_directory if enabled (true) the volume will contain a + * read-only .snapshot directory which provides access to each of the volume's + * snapshots. + * + * Generated from protobuf field bool snapshot_directory = 20 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setSnapshotDirectory($var) + { + GPBUtil::checkBool($var); + $this->snapshot_directory = $var; + + return $this; + } + + /** + * Output only. Used capacity in GIB of the volume. This is computed + * periodically and it does not represent the realtime usage. + * + * Generated from protobuf field int64 used_gib = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getUsedGib() + { + return $this->used_gib; + } + + /** + * Output only. Used capacity in GIB of the volume. This is computed + * periodically and it does not represent the realtime usage. + * + * Generated from protobuf field int64 used_gib = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setUsedGib($var) + { + GPBUtil::checkInt64($var); + $this->used_gib = $var; + + return $this; + } + + /** + * Optional. Security Style of the Volume + * + * Generated from protobuf field .google.cloud.netapp.v1.SecurityStyle security_style = 22 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getSecurityStyle() + { + return $this->security_style; + } + + /** + * Optional. Security Style of the Volume + * + * Generated from protobuf field .google.cloud.netapp.v1.SecurityStyle security_style = 22 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setSecurityStyle($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetApp\V1\SecurityStyle::class); + $this->security_style = $var; + + return $this; + } + + /** + * Optional. Flag indicating if the volume is a kerberos volume or not, export + * policy rules control kerberos security modes (krb5, krb5i, krb5p). + * + * Generated from protobuf field bool kerberos_enabled = 23 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getKerberosEnabled() + { + return $this->kerberos_enabled; + } + + /** + * Optional. Flag indicating if the volume is a kerberos volume or not, export + * policy rules control kerberos security modes (krb5, krb5i, krb5p). + * + * Generated from protobuf field bool kerberos_enabled = 23 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setKerberosEnabled($var) + { + GPBUtil::checkBool($var); + $this->kerberos_enabled = $var; + + return $this; + } + + /** + * Output only. Flag indicating if the volume is NFS LDAP enabled or not. + * + * Generated from protobuf field bool ldap_enabled = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getLdapEnabled() + { + return $this->ldap_enabled; + } + + /** + * Output only. Flag indicating if the volume is NFS LDAP enabled or not. + * + * Generated from protobuf field bool ldap_enabled = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setLdapEnabled($var) + { + GPBUtil::checkBool($var); + $this->ldap_enabled = $var; + + return $this; + } + + /** + * Output only. Specifies the ActiveDirectory name of a SMB volume. + * + * Generated from protobuf field string active_directory = 25 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getActiveDirectory() + { + return $this->active_directory; + } + + /** + * Output only. Specifies the ActiveDirectory name of a SMB volume. + * + * Generated from protobuf field string active_directory = 25 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setActiveDirectory($var) + { + GPBUtil::checkString($var, True); + $this->active_directory = $var; + + return $this; + } + + /** + * Optional. Specifies the source of the volume to be created from. + * + * Generated from protobuf field .google.cloud.netapp.v1.RestoreParameters restore_parameters = 26 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\NetApp\V1\RestoreParameters|null + */ + public function getRestoreParameters() + { + return $this->restore_parameters; + } + + public function hasRestoreParameters() + { + return isset($this->restore_parameters); + } + + public function clearRestoreParameters() + { + unset($this->restore_parameters); + } + + /** + * Optional. Specifies the source of the volume to be created from. + * + * Generated from protobuf field .google.cloud.netapp.v1.RestoreParameters restore_parameters = 26 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\NetApp\V1\RestoreParameters $var + * @return $this + */ + public function setRestoreParameters($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetApp\V1\RestoreParameters::class); + $this->restore_parameters = $var; + + return $this; + } + + /** + * Output only. Specifies the KMS config to be used for volume encryption. + * + * Generated from protobuf field string kms_config = 27 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getKmsConfig() + { + return $this->kms_config; + } + + /** + * Output only. Specifies the KMS config to be used for volume encryption. + * + * Generated from protobuf field string kms_config = 27 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setKmsConfig($var) + { + GPBUtil::checkString($var, True); + $this->kms_config = $var; + + return $this; + } + + /** + * Output only. Specified the current volume encryption key source. + * + * Generated from protobuf field .google.cloud.netapp.v1.EncryptionType encryption_type = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getEncryptionType() + { + return $this->encryption_type; + } + + /** + * Output only. Specified the current volume encryption key source. + * + * Generated from protobuf field .google.cloud.netapp.v1.EncryptionType encryption_type = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setEncryptionType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetApp\V1\EncryptionType::class); + $this->encryption_type = $var; + + return $this; + } + + /** + * Output only. Indicates whether the volume is part of a replication + * relationship. + * + * Generated from protobuf field bool has_replication = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getHasReplication() + { + return $this->has_replication; + } + + /** + * Output only. Indicates whether the volume is part of a replication + * relationship. + * + * Generated from protobuf field bool has_replication = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setHasReplication($var) + { + GPBUtil::checkBool($var); + $this->has_replication = $var; + + return $this; + } + + /** + * BackupConfig of the volume. + * + * Generated from protobuf field optional .google.cloud.netapp.v1.BackupConfig backup_config = 30; + * @return \Google\Cloud\NetApp\V1\BackupConfig|null + */ + public function getBackupConfig() + { + return $this->backup_config; + } + + public function hasBackupConfig() + { + return isset($this->backup_config); + } + + public function clearBackupConfig() + { + unset($this->backup_config); + } + + /** + * BackupConfig of the volume. + * + * Generated from protobuf field optional .google.cloud.netapp.v1.BackupConfig backup_config = 30; + * @param \Google\Cloud\NetApp\V1\BackupConfig $var + * @return $this + */ + public function setBackupConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetApp\V1\BackupConfig::class); + $this->backup_config = $var; + + return $this; + } + + /** + * Optional. List of actions that are restricted on this volume. + * + * Generated from protobuf field repeated .google.cloud.netapp.v1.RestrictedAction restricted_actions = 31 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRestrictedActions() + { + return $this->restricted_actions; + } + + /** + * Optional. List of actions that are restricted on this volume. + * + * Generated from protobuf field repeated .google.cloud.netapp.v1.RestrictedAction restricted_actions = 31 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRestrictedActions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\NetApp\V1\RestrictedAction::class); + $this->restricted_actions = $arr; + + return $this; + } + + /** + * Optional. Flag indicating if the volume will be a large capacity volume or + * a regular volume. + * + * Generated from protobuf field bool large_capacity = 32 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getLargeCapacity() + { + return $this->large_capacity; + } + + /** + * Optional. Flag indicating if the volume will be a large capacity volume or + * a regular volume. + * + * Generated from protobuf field bool large_capacity = 32 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setLargeCapacity($var) + { + GPBUtil::checkBool($var); + $this->large_capacity = $var; + + return $this; + } + + /** + * Optional. Flag indicating if the volume will have an IP address per node + * for volumes supporting multiple IP endpoints. Only the volume with + * large_capacity will be allowed to have multiple endpoints. + * + * Generated from protobuf field bool multiple_endpoints = 33 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getMultipleEndpoints() + { + return $this->multiple_endpoints; + } + + /** + * Optional. Flag indicating if the volume will have an IP address per node + * for volumes supporting multiple IP endpoints. Only the volume with + * large_capacity will be allowed to have multiple endpoints. + * + * Generated from protobuf field bool multiple_endpoints = 33 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setMultipleEndpoints($var) + { + GPBUtil::checkBool($var); + $this->multiple_endpoints = $var; + + return $this; + } + + /** + * Tiering policy for the volume. + * + * Generated from protobuf field optional .google.cloud.netapp.v1.TieringPolicy tiering_policy = 34; + * @return \Google\Cloud\NetApp\V1\TieringPolicy|null + */ + public function getTieringPolicy() + { + return $this->tiering_policy; + } + + public function hasTieringPolicy() + { + return isset($this->tiering_policy); + } + + public function clearTieringPolicy() + { + unset($this->tiering_policy); + } + + /** + * Tiering policy for the volume. + * + * Generated from protobuf field optional .google.cloud.netapp.v1.TieringPolicy tiering_policy = 34; + * @param \Google\Cloud\NetApp\V1\TieringPolicy $var + * @return $this + */ + public function setTieringPolicy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetApp\V1\TieringPolicy::class); + $this->tiering_policy = $var; + + return $this; + } + + /** + * Output only. Specifies the replica zone for regional volume. + * + * Generated from protobuf field string replica_zone = 36 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getReplicaZone() + { + return $this->replica_zone; + } + + /** + * Output only. Specifies the replica zone for regional volume. + * + * Generated from protobuf field string replica_zone = 36 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setReplicaZone($var) + { + GPBUtil::checkString($var, True); + $this->replica_zone = $var; + + return $this; + } + + /** + * Output only. Specifies the active zone for regional volume. + * + * Generated from protobuf field string zone = 37 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getZone() + { + return $this->zone; + } + + /** + * Output only. Specifies the active zone for regional volume. + * + * Generated from protobuf field string zone = 37 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setZone($var) + { + GPBUtil::checkString($var, True); + $this->zone = $var; + + return $this; + } + + /** + * Output only. Size of the volume cold tier data in GiB. + * + * Generated from protobuf field int64 cold_tier_size_gib = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getColdTierSizeGib() + { + return $this->cold_tier_size_gib; + } + + /** + * Output only. Size of the volume cold tier data in GiB. + * + * Generated from protobuf field int64 cold_tier_size_gib = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setColdTierSizeGib($var) + { + GPBUtil::checkInt64($var); + $this->cold_tier_size_gib = $var; + + return $this; + } + + /** + * Optional. The Hybrid Replication parameters for the volume. + * + * Generated from protobuf field .google.cloud.netapp.v1.HybridReplicationParameters hybrid_replication_parameters = 40 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\NetApp\V1\HybridReplicationParameters|null + */ + public function getHybridReplicationParameters() + { + return $this->hybrid_replication_parameters; + } + + public function hasHybridReplicationParameters() + { + return isset($this->hybrid_replication_parameters); + } + + public function clearHybridReplicationParameters() + { + unset($this->hybrid_replication_parameters); + } + + /** + * Optional. The Hybrid Replication parameters for the volume. + * + * Generated from protobuf field .google.cloud.netapp.v1.HybridReplicationParameters hybrid_replication_parameters = 40 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\NetApp\V1\HybridReplicationParameters $var + * @return $this + */ + public function setHybridReplicationParameters($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetApp\V1\HybridReplicationParameters::class); + $this->hybrid_replication_parameters = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Volume/State.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Volume/State.php new file mode 100644 index 000000000000..8c26d9d33682 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Volume/State.php @@ -0,0 +1,115 @@ +google.cloud.netapp.v1.Volume.State + */ +class State +{ + /** + * Unspecified Volume State + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Volume State is Ready + * + * Generated from protobuf enum READY = 1; + */ + const READY = 1; + /** + * Volume State is Creating + * + * Generated from protobuf enum CREATING = 2; + */ + const CREATING = 2; + /** + * Volume State is Deleting + * + * Generated from protobuf enum DELETING = 3; + */ + const DELETING = 3; + /** + * Volume State is Updating + * + * Generated from protobuf enum UPDATING = 4; + */ + const UPDATING = 4; + /** + * Volume State is Restoring + * + * Generated from protobuf enum RESTORING = 5; + */ + const RESTORING = 5; + /** + * Volume State is Disabled + * + * Generated from protobuf enum DISABLED = 6; + */ + const DISABLED = 6; + /** + * Volume State is Error + * + * Generated from protobuf enum ERROR = 7; + */ + const ERROR = 7; + /** + * Volume State is Preparing. Note that this is different from CREATING + * where CREATING means the volume is being created, while PREPARING means + * the volume is created and now being prepared for the replication. + * + * Generated from protobuf enum PREPARING = 8; + */ + const PREPARING = 8; + /** + * Volume State is Read Only + * + * Generated from protobuf enum READ_ONLY = 9; + */ + const READ_ONLY = 9; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::READY => 'READY', + self::CREATING => 'CREATING', + self::DELETING => 'DELETING', + self::UPDATING => 'UPDATING', + self::RESTORING => 'RESTORING', + self::DISABLED => 'DISABLED', + self::ERROR => 'ERROR', + self::PREPARING => 'PREPARING', + self::READ_ONLY => 'READ_ONLY', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\NetApp\V1\Volume_State::class); + diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/WeeklySchedule.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/WeeklySchedule.php new file mode 100644 index 000000000000..8b126b6825cd --- /dev/null +++ b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/WeeklySchedule.php @@ -0,0 +1,218 @@ +google.cloud.netapp.v1.WeeklySchedule + */ +class WeeklySchedule extends \Google\Protobuf\Internal\Message +{ + /** + * The maximum number of Snapshots to keep for the hourly schedule + * + * Generated from protobuf field optional double snapshots_to_keep = 1; + */ + protected $snapshots_to_keep = null; + /** + * Set the minute of the hour to start the snapshot (0-59), defaults to the + * top of the hour (0). + * + * Generated from protobuf field optional double minute = 2; + */ + protected $minute = null; + /** + * Set the hour to start the snapshot (0-23), defaults to midnight (0). + * + * Generated from protobuf field optional double hour = 3; + */ + protected $hour = null; + /** + * Set the day or days of the week to make a snapshot. Accepts a comma + * separated days of the week. Defaults to 'Sunday'. + * + * Generated from protobuf field optional string day = 4; + */ + protected $day = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $snapshots_to_keep + * The maximum number of Snapshots to keep for the hourly schedule + * @type float $minute + * Set the minute of the hour to start the snapshot (0-59), defaults to the + * top of the hour (0). + * @type float $hour + * Set the hour to start the snapshot (0-23), defaults to midnight (0). + * @type string $day + * Set the day or days of the week to make a snapshot. Accepts a comma + * separated days of the week. Defaults to 'Sunday'. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Netapp\V1\Volume::initOnce(); + parent::__construct($data); + } + + /** + * The maximum number of Snapshots to keep for the hourly schedule + * + * Generated from protobuf field optional double snapshots_to_keep = 1; + * @return float + */ + public function getSnapshotsToKeep() + { + return isset($this->snapshots_to_keep) ? $this->snapshots_to_keep : 0.0; + } + + public function hasSnapshotsToKeep() + { + return isset($this->snapshots_to_keep); + } + + public function clearSnapshotsToKeep() + { + unset($this->snapshots_to_keep); + } + + /** + * The maximum number of Snapshots to keep for the hourly schedule + * + * Generated from protobuf field optional double snapshots_to_keep = 1; + * @param float $var + * @return $this + */ + public function setSnapshotsToKeep($var) + { + GPBUtil::checkDouble($var); + $this->snapshots_to_keep = $var; + + return $this; + } + + /** + * Set the minute of the hour to start the snapshot (0-59), defaults to the + * top of the hour (0). + * + * Generated from protobuf field optional double minute = 2; + * @return float + */ + public function getMinute() + { + return isset($this->minute) ? $this->minute : 0.0; + } + + public function hasMinute() + { + return isset($this->minute); + } + + public function clearMinute() + { + unset($this->minute); + } + + /** + * Set the minute of the hour to start the snapshot (0-59), defaults to the + * top of the hour (0). + * + * Generated from protobuf field optional double minute = 2; + * @param float $var + * @return $this + */ + public function setMinute($var) + { + GPBUtil::checkDouble($var); + $this->minute = $var; + + return $this; + } + + /** + * Set the hour to start the snapshot (0-23), defaults to midnight (0). + * + * Generated from protobuf field optional double hour = 3; + * @return float + */ + public function getHour() + { + return isset($this->hour) ? $this->hour : 0.0; + } + + public function hasHour() + { + return isset($this->hour); + } + + public function clearHour() + { + unset($this->hour); + } + + /** + * Set the hour to start the snapshot (0-23), defaults to midnight (0). + * + * Generated from protobuf field optional double hour = 3; + * @param float $var + * @return $this + */ + public function setHour($var) + { + GPBUtil::checkDouble($var); + $this->hour = $var; + + return $this; + } + + /** + * Set the day or days of the week to make a snapshot. Accepts a comma + * separated days of the week. Defaults to 'Sunday'. + * + * Generated from protobuf field optional string day = 4; + * @return string + */ + public function getDay() + { + return isset($this->day) ? $this->day : ''; + } + + public function hasDay() + { + return isset($this->day); + } + + public function clearDay() + { + unset($this->day); + } + + /** + * Set the day or days of the week to make a snapshot. Accepts a comma + * separated days of the week. Defaults to 'Sunday'. + * + * Generated from protobuf field optional string day = 4; + * @param string $var + * @return $this + */ + public function setDay($var) + { + GPBUtil::checkString($var, True); + $this->day = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_active_directory.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_active_directory.php new file mode 100644 index 000000000000..360838063eaa --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_active_directory.php @@ -0,0 +1,123 @@ +setDomain($activeDirectoryDomain) + ->setDns($activeDirectoryDns) + ->setNetBiosPrefix($activeDirectoryNetBiosPrefix) + ->setUsername($activeDirectoryUsername) + ->setPassword($activeDirectoryPassword); + $request = (new CreateActiveDirectoryRequest()) + ->setParent($formattedParent) + ->setActiveDirectory($activeDirectory) + ->setActiveDirectoryId($activeDirectoryId); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $netAppClient->createActiveDirectory($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var ActiveDirectory $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = NetAppClient::locationName('[PROJECT]', '[LOCATION]'); + $activeDirectoryDomain = '[DOMAIN]'; + $activeDirectoryDns = '[DNS]'; + $activeDirectoryNetBiosPrefix = '[NET_BIOS_PREFIX]'; + $activeDirectoryUsername = '[USERNAME]'; + $activeDirectoryPassword = '[PASSWORD]'; + $activeDirectoryId = '[ACTIVE_DIRECTORY_ID]'; + + create_active_directory_sample( + $formattedParent, + $activeDirectoryDomain, + $activeDirectoryDns, + $activeDirectoryNetBiosPrefix, + $activeDirectoryUsername, + $activeDirectoryPassword, + $activeDirectoryId + ); +} +// [END netapp_v1_generated_NetApp_CreateActiveDirectory_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_backup.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_backup.php new file mode 100644 index 000000000000..99e4154c3e3a --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_backup.php @@ -0,0 +1,96 @@ +setParent($formattedParent) + ->setBackupId($backupId) + ->setBackup($backup); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $netAppClient->createBackup($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Backup $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = NetAppClient::backupVaultName('[PROJECT]', '[LOCATION]', '[BACKUP_VAULT]'); + $backupId = '[BACKUP_ID]'; + + create_backup_sample($formattedParent, $backupId); +} +// [END netapp_v1_generated_NetApp_CreateBackup_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_backup_policy.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_backup_policy.php new file mode 100644 index 000000000000..fbf433a991d6 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_backup_policy.php @@ -0,0 +1,93 @@ +setParent($formattedParent) + ->setBackupPolicy($backupPolicy) + ->setBackupPolicyId($backupPolicyId); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $netAppClient->createBackupPolicy($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var BackupPolicy $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = NetAppClient::locationName('[PROJECT]', '[LOCATION]'); + $backupPolicyId = '[BACKUP_POLICY_ID]'; + + create_backup_policy_sample($formattedParent, $backupPolicyId); +} +// [END netapp_v1_generated_NetApp_CreateBackupPolicy_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_backup_vault.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_backup_vault.php new file mode 100644 index 000000000000..d679748843da --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_backup_vault.php @@ -0,0 +1,93 @@ +setParent($formattedParent) + ->setBackupVaultId($backupVaultId) + ->setBackupVault($backupVault); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $netAppClient->createBackupVault($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var BackupVault $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = NetAppClient::locationName('[PROJECT]', '[LOCATION]'); + $backupVaultId = '[BACKUP_VAULT_ID]'; + + create_backup_vault_sample($formattedParent, $backupVaultId); +} +// [END netapp_v1_generated_NetApp_CreateBackupVault_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_kms_config.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_kms_config.php new file mode 100644 index 000000000000..aea45fdee4ec --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_kms_config.php @@ -0,0 +1,98 @@ +setCryptoKeyName($kmsConfigCryptoKeyName); + $request = (new CreateKmsConfigRequest()) + ->setParent($formattedParent) + ->setKmsConfigId($kmsConfigId) + ->setKmsConfig($kmsConfig); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $netAppClient->createKmsConfig($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var KmsConfig $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = NetAppClient::locationName('[PROJECT]', '[LOCATION]'); + $kmsConfigId = '[KMS_CONFIG_ID]'; + $kmsConfigCryptoKeyName = '[CRYPTO_KEY_NAME]'; + + create_kms_config_sample($formattedParent, $kmsConfigId, $kmsConfigCryptoKeyName); +} +// [END netapp_v1_generated_NetApp_CreateKmsConfig_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_replication.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_replication.php new file mode 100644 index 000000000000..62b877f14aa7 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_replication.php @@ -0,0 +1,116 @@ +setStoragePool($formattedReplicationDestinationVolumeParametersStoragePool); + $replication = (new Replication()) + ->setReplicationSchedule($replicationReplicationSchedule) + ->setDestinationVolumeParameters($replicationDestinationVolumeParameters); + $request = (new CreateReplicationRequest()) + ->setParent($formattedParent) + ->setReplication($replication) + ->setReplicationId($replicationId); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $netAppClient->createReplication($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Replication $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = NetAppClient::volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); + $replicationReplicationSchedule = ReplicationSchedule::REPLICATION_SCHEDULE_UNSPECIFIED; + $formattedReplicationDestinationVolumeParametersStoragePool = NetAppClient::storagePoolName( + '[PROJECT]', + '[LOCATION]', + '[STORAGE_POOL]' + ); + $replicationId = '[REPLICATION_ID]'; + + create_replication_sample( + $formattedParent, + $replicationReplicationSchedule, + $formattedReplicationDestinationVolumeParametersStoragePool, + $replicationId + ); +} +// [END netapp_v1_generated_NetApp_CreateReplication_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_snapshot.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_snapshot.php new file mode 100644 index 000000000000..1c26d056b2e1 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_snapshot.php @@ -0,0 +1,92 @@ +setParent($formattedParent) + ->setSnapshot($snapshot) + ->setSnapshotId($snapshotId); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $netAppClient->createSnapshot($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Snapshot $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = NetAppClient::volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); + $snapshotId = '[SNAPSHOT_ID]'; + + create_snapshot_sample($formattedParent, $snapshotId); +} +// [END netapp_v1_generated_NetApp_CreateSnapshot_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_storage_pool.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_storage_pool.php new file mode 100644 index 000000000000..c301410c7fbf --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_storage_pool.php @@ -0,0 +1,114 @@ +setServiceLevel($storagePoolServiceLevel) + ->setCapacityGib($storagePoolCapacityGib) + ->setNetwork($formattedStoragePoolNetwork); + $request = (new CreateStoragePoolRequest()) + ->setParent($formattedParent) + ->setStoragePoolId($storagePoolId) + ->setStoragePool($storagePool); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $netAppClient->createStoragePool($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var StoragePool $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = NetAppClient::locationName('[PROJECT]', '[LOCATION]'); + $storagePoolId = '[STORAGE_POOL_ID]'; + $storagePoolServiceLevel = ServiceLevel::SERVICE_LEVEL_UNSPECIFIED; + $storagePoolCapacityGib = 0; + $formattedStoragePoolNetwork = NetAppClient::networkName('[PROJECT]', '[NETWORK]'); + + create_storage_pool_sample( + $formattedParent, + $storagePoolId, + $storagePoolServiceLevel, + $storagePoolCapacityGib, + $formattedStoragePoolNetwork + ); +} +// [END netapp_v1_generated_NetApp_CreateStoragePool_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_volume.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_volume.php new file mode 100644 index 000000000000..7af7fb7b6213 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_volume.php @@ -0,0 +1,123 @@ +setShareName($volumeShareName) + ->setStoragePool($formattedVolumeStoragePool) + ->setCapacityGib($volumeCapacityGib) + ->setProtocols($volumeProtocols); + $request = (new CreateVolumeRequest()) + ->setParent($formattedParent) + ->setVolumeId($volumeId) + ->setVolume($volume); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $netAppClient->createVolume($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Volume $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = NetAppClient::locationName('[PROJECT]', '[LOCATION]'); + $volumeId = '[VOLUME_ID]'; + $volumeShareName = '[SHARE_NAME]'; + $formattedVolumeStoragePool = NetAppClient::storagePoolName( + '[PROJECT]', + '[LOCATION]', + '[STORAGE_POOL]' + ); + $volumeCapacityGib = 0; + $volumeProtocolsElement = Protocols::PROTOCOLS_UNSPECIFIED; + + create_volume_sample( + $formattedParent, + $volumeId, + $volumeShareName, + $formattedVolumeStoragePool, + $volumeCapacityGib, + $volumeProtocolsElement + ); +} +// [END netapp_v1_generated_NetApp_CreateVolume_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_active_directory.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_active_directory.php new file mode 100644 index 000000000000..b4a0ff6a2a93 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_active_directory.php @@ -0,0 +1,80 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $netAppClient->deleteActiveDirectory($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NetAppClient::activeDirectoryName('[PROJECT]', '[LOCATION]', '[ACTIVE_DIRECTORY]'); + + delete_active_directory_sample($formattedName); +} +// [END netapp_v1_generated_NetApp_DeleteActiveDirectory_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_backup.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_backup.php new file mode 100644 index 000000000000..a3be0938a6c6 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_backup.php @@ -0,0 +1,81 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $netAppClient->deleteBackup($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NetAppClient::backupName('[PROJECT]', '[LOCATION]', '[BACKUP_VAULT]', '[BACKUP]'); + + delete_backup_sample($formattedName); +} +// [END netapp_v1_generated_NetApp_DeleteBackup_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_backup_policy.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_backup_policy.php new file mode 100644 index 000000000000..2bc2925d7fd3 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_backup_policy.php @@ -0,0 +1,81 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $netAppClient->deleteBackupPolicy($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NetAppClient::backupPolicyName('[PROJECT]', '[LOCATION]', '[BACKUP_POLICY]'); + + delete_backup_policy_sample($formattedName); +} +// [END netapp_v1_generated_NetApp_DeleteBackupPolicy_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_backup_vault.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_backup_vault.php new file mode 100644 index 000000000000..ebcb45572c0d --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_backup_vault.php @@ -0,0 +1,81 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $netAppClient->deleteBackupVault($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NetAppClient::backupVaultName('[PROJECT]', '[LOCATION]', '[BACKUP_VAULT]'); + + delete_backup_vault_sample($formattedName); +} +// [END netapp_v1_generated_NetApp_DeleteBackupVault_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_kms_config.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_kms_config.php new file mode 100644 index 000000000000..22e8dbaa4362 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_kms_config.php @@ -0,0 +1,80 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $netAppClient->deleteKmsConfig($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NetAppClient::kmsConfigName('[PROJECT]', '[LOCATION]', '[KMS_CONFIG]'); + + delete_kms_config_sample($formattedName); +} +// [END netapp_v1_generated_NetApp_DeleteKmsConfig_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_replication.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_replication.php new file mode 100644 index 000000000000..a9980d4e21c6 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_replication.php @@ -0,0 +1,86 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $netAppClient->deleteReplication($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NetAppClient::replicationName( + '[PROJECT]', + '[LOCATION]', + '[VOLUME]', + '[REPLICATION]' + ); + + delete_replication_sample($formattedName); +} +// [END netapp_v1_generated_NetApp_DeleteReplication_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_snapshot.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_snapshot.php new file mode 100644 index 000000000000..6b35b9b7f641 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_snapshot.php @@ -0,0 +1,81 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $netAppClient->deleteSnapshot($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NetAppClient::snapshotName('[PROJECT]', '[LOCATION]', '[VOLUME]', '[SNAPSHOT]'); + + delete_snapshot_sample($formattedName); +} +// [END netapp_v1_generated_NetApp_DeleteSnapshot_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_storage_pool.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_storage_pool.php new file mode 100644 index 000000000000..3307ad1739df --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_storage_pool.php @@ -0,0 +1,80 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $netAppClient->deleteStoragePool($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NetAppClient::storagePoolName('[PROJECT]', '[LOCATION]', '[STORAGE_POOL]'); + + delete_storage_pool_sample($formattedName); +} +// [END netapp_v1_generated_NetApp_DeleteStoragePool_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_volume.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_volume.php new file mode 100644 index 000000000000..fbe680b5f5f2 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_volume.php @@ -0,0 +1,80 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $netAppClient->deleteVolume($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NetAppClient::volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); + + delete_volume_sample($formattedName); +} +// [END netapp_v1_generated_NetApp_DeleteVolume_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/encrypt_volumes.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/encrypt_volumes.php new file mode 100644 index 000000000000..fbe35c32d359 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/encrypt_volumes.php @@ -0,0 +1,84 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $netAppClient->encryptVolumes($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var KmsConfig $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NetAppClient::kmsConfigName('[PROJECT]', '[LOCATION]', '[KMS_CONFIG]'); + + encrypt_volumes_sample($formattedName); +} +// [END netapp_v1_generated_NetApp_EncryptVolumes_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/establish_peering.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/establish_peering.php new file mode 100644 index 000000000000..be35f66b1e4d --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/establish_peering.php @@ -0,0 +1,105 @@ +setName($formattedName) + ->setPeerClusterName($peerClusterName) + ->setPeerSvmName($peerSvmName) + ->setPeerVolumeName($peerVolumeName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $netAppClient->establishPeering($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Replication $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NetAppClient::replicationName( + '[PROJECT]', + '[LOCATION]', + '[VOLUME]', + '[REPLICATION]' + ); + $peerClusterName = '[PEER_CLUSTER_NAME]'; + $peerSvmName = '[PEER_SVM_NAME]'; + $peerVolumeName = '[PEER_VOLUME_NAME]'; + + establish_peering_sample($formattedName, $peerClusterName, $peerSvmName, $peerVolumeName); +} +// [END netapp_v1_generated_NetApp_EstablishPeering_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_active_directory.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_active_directory.php new file mode 100644 index 000000000000..b3bedd34d954 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_active_directory.php @@ -0,0 +1,71 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var ActiveDirectory $response */ + $response = $netAppClient->getActiveDirectory($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NetAppClient::activeDirectoryName('[PROJECT]', '[LOCATION]', '[ACTIVE_DIRECTORY]'); + + get_active_directory_sample($formattedName); +} +// [END netapp_v1_generated_NetApp_GetActiveDirectory_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_backup.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_backup.php new file mode 100644 index 000000000000..e82ad8f83d81 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_backup.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Backup $response */ + $response = $netAppClient->getBackup($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NetAppClient::backupName('[PROJECT]', '[LOCATION]', '[BACKUP_VAULT]', '[BACKUP]'); + + get_backup_sample($formattedName); +} +// [END netapp_v1_generated_NetApp_GetBackup_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_backup_policy.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_backup_policy.php new file mode 100644 index 000000000000..d255b60a3689 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_backup_policy.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var BackupPolicy $response */ + $response = $netAppClient->getBackupPolicy($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NetAppClient::backupPolicyName('[PROJECT]', '[LOCATION]', '[BACKUP_POLICY]'); + + get_backup_policy_sample($formattedName); +} +// [END netapp_v1_generated_NetApp_GetBackupPolicy_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_backup_vault.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_backup_vault.php new file mode 100644 index 000000000000..ebfb08fa661c --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_backup_vault.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var BackupVault $response */ + $response = $netAppClient->getBackupVault($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NetAppClient::backupVaultName('[PROJECT]', '[LOCATION]', '[BACKUP_VAULT]'); + + get_backup_vault_sample($formattedName); +} +// [END netapp_v1_generated_NetApp_GetBackupVault_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_kms_config.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_kms_config.php new file mode 100644 index 000000000000..910476a88480 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_kms_config.php @@ -0,0 +1,71 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var KmsConfig $response */ + $response = $netAppClient->getKmsConfig($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NetAppClient::kmsConfigName('[PROJECT]', '[LOCATION]', '[KMS_CONFIG]'); + + get_kms_config_sample($formattedName); +} +// [END netapp_v1_generated_NetApp_GetKmsConfig_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_location.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_location.php new file mode 100644 index 000000000000..da552a232fbb --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_location.php @@ -0,0 +1,57 @@ +getLocation($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END netapp_v1_generated_NetApp_GetLocation_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_replication.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_replication.php new file mode 100644 index 000000000000..91b1aa4a238b --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_replication.php @@ -0,0 +1,77 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Replication $response */ + $response = $netAppClient->getReplication($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NetAppClient::replicationName( + '[PROJECT]', + '[LOCATION]', + '[VOLUME]', + '[REPLICATION]' + ); + + get_replication_sample($formattedName); +} +// [END netapp_v1_generated_NetApp_GetReplication_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_snapshot.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_snapshot.php new file mode 100644 index 000000000000..bbcc5660fac7 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_snapshot.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Snapshot $response */ + $response = $netAppClient->getSnapshot($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NetAppClient::snapshotName('[PROJECT]', '[LOCATION]', '[VOLUME]', '[SNAPSHOT]'); + + get_snapshot_sample($formattedName); +} +// [END netapp_v1_generated_NetApp_GetSnapshot_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_storage_pool.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_storage_pool.php new file mode 100644 index 000000000000..31e2d35f0341 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_storage_pool.php @@ -0,0 +1,71 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var StoragePool $response */ + $response = $netAppClient->getStoragePool($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NetAppClient::storagePoolName('[PROJECT]', '[LOCATION]', '[STORAGE_POOL]'); + + get_storage_pool_sample($formattedName); +} +// [END netapp_v1_generated_NetApp_GetStoragePool_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_volume.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_volume.php new file mode 100644 index 000000000000..d5598718a06b --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_volume.php @@ -0,0 +1,71 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Volume $response */ + $response = $netAppClient->getVolume($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NetAppClient::volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); + + get_volume_sample($formattedName); +} +// [END netapp_v1_generated_NetApp_GetVolume_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_active_directories.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_active_directories.php new file mode 100644 index 000000000000..6c11b9b031f1 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_active_directories.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $netAppClient->listActiveDirectories($request); + + /** @var ActiveDirectory $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = NetAppClient::locationName('[PROJECT]', '[LOCATION]'); + + list_active_directories_sample($formattedParent); +} +// [END netapp_v1_generated_NetApp_ListActiveDirectories_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_backup_policies.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_backup_policies.php new file mode 100644 index 000000000000..fe0b33a9dbad --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_backup_policies.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $netAppClient->listBackupPolicies($request); + + /** @var BackupPolicy $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = NetAppClient::locationName('[PROJECT]', '[LOCATION]'); + + list_backup_policies_sample($formattedParent); +} +// [END netapp_v1_generated_NetApp_ListBackupPolicies_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_backup_vaults.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_backup_vaults.php new file mode 100644 index 000000000000..51fca830aeff --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_backup_vaults.php @@ -0,0 +1,78 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $netAppClient->listBackupVaults($request); + + /** @var BackupVault $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = NetAppClient::locationName('[PROJECT]', '[LOCATION]'); + + list_backup_vaults_sample($formattedParent); +} +// [END netapp_v1_generated_NetApp_ListBackupVaults_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_backups.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_backups.php new file mode 100644 index 000000000000..9d686d904e64 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_backups.php @@ -0,0 +1,84 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $netAppClient->listBackups($request); + + /** @var Backup $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = NetAppClient::backupVaultName('[PROJECT]', '[LOCATION]', '[BACKUP_VAULT]'); + + list_backups_sample($formattedParent); +} +// [END netapp_v1_generated_NetApp_ListBackups_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_kms_configs.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_kms_configs.php new file mode 100644 index 000000000000..641b28b9f7a1 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_kms_configs.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $netAppClient->listKmsConfigs($request); + + /** @var KmsConfig $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = NetAppClient::locationName('[PROJECT]', '[LOCATION]'); + + list_kms_configs_sample($formattedParent); +} +// [END netapp_v1_generated_NetApp_ListKmsConfigs_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_locations.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_locations.php new file mode 100644 index 000000000000..34e95bff6562 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_locations.php @@ -0,0 +1,62 @@ +listLocations($request); + + /** @var Location $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END netapp_v1_generated_NetApp_ListLocations_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_replications.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_replications.php new file mode 100644 index 000000000000..98981f3ca891 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_replications.php @@ -0,0 +1,78 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $netAppClient->listReplications($request); + + /** @var Replication $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = NetAppClient::volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); + + list_replications_sample($formattedParent); +} +// [END netapp_v1_generated_NetApp_ListReplications_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_snapshots.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_snapshots.php new file mode 100644 index 000000000000..e88ad83cb1a8 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_snapshots.php @@ -0,0 +1,78 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $netAppClient->listSnapshots($request); + + /** @var Snapshot $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = NetAppClient::volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); + + list_snapshots_sample($formattedParent); +} +// [END netapp_v1_generated_NetApp_ListSnapshots_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_storage_pools.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_storage_pools.php new file mode 100644 index 000000000000..a700f8ae079f --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_storage_pools.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $netAppClient->listStoragePools($request); + + /** @var StoragePool $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = NetAppClient::locationName('[PROJECT]', '[LOCATION]'); + + list_storage_pools_sample($formattedParent); +} +// [END netapp_v1_generated_NetApp_ListStoragePools_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_volumes.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_volumes.php new file mode 100644 index 000000000000..bde278d49961 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_volumes.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $netAppClient->listVolumes($request); + + /** @var Volume $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = NetAppClient::locationName('[PROJECT]', '[LOCATION]'); + + list_volumes_sample($formattedParent); +} +// [END netapp_v1_generated_NetApp_ListVolumes_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/resume_replication.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/resume_replication.php new file mode 100644 index 000000000000..6494667234b3 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/resume_replication.php @@ -0,0 +1,89 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $netAppClient->resumeReplication($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Replication $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NetAppClient::replicationName( + '[PROJECT]', + '[LOCATION]', + '[VOLUME]', + '[REPLICATION]' + ); + + resume_replication_sample($formattedName); +} +// [END netapp_v1_generated_NetApp_ResumeReplication_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/reverse_replication_direction.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/reverse_replication_direction.php new file mode 100644 index 000000000000..970e1707c2e5 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/reverse_replication_direction.php @@ -0,0 +1,90 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $netAppClient->reverseReplicationDirection($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Replication $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NetAppClient::replicationName( + '[PROJECT]', + '[LOCATION]', + '[VOLUME]', + '[REPLICATION]' + ); + + reverse_replication_direction_sample($formattedName); +} +// [END netapp_v1_generated_NetApp_ReverseReplicationDirection_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/revert_volume.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/revert_volume.php new file mode 100644 index 000000000000..c5d4f3cf098d --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/revert_volume.php @@ -0,0 +1,91 @@ +setName($formattedName) + ->setSnapshotId($snapshotId); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $netAppClient->revertVolume($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Volume $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NetAppClient::volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); + $snapshotId = '[SNAPSHOT_ID]'; + + revert_volume_sample($formattedName, $snapshotId); +} +// [END netapp_v1_generated_NetApp_RevertVolume_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/stop_replication.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/stop_replication.php new file mode 100644 index 000000000000..6039951c757b --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/stop_replication.php @@ -0,0 +1,89 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $netAppClient->stopReplication($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Replication $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NetAppClient::replicationName( + '[PROJECT]', + '[LOCATION]', + '[VOLUME]', + '[REPLICATION]' + ); + + stop_replication_sample($formattedName); +} +// [END netapp_v1_generated_NetApp_StopReplication_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/switch_active_replica_zone.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/switch_active_replica_zone.php new file mode 100644 index 000000000000..e193a72329fb --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/switch_active_replica_zone.php @@ -0,0 +1,84 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $netAppClient->switchActiveReplicaZone($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var StoragePool $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NetAppClient::storagePoolName('[PROJECT]', '[LOCATION]', '[STORAGE_POOL]'); + + switch_active_replica_zone_sample($formattedName); +} +// [END netapp_v1_generated_NetApp_SwitchActiveReplicaZone_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/sync_replication.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/sync_replication.php new file mode 100644 index 000000000000..a5c56078ede4 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/sync_replication.php @@ -0,0 +1,90 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $netAppClient->syncReplication($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Replication $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NetAppClient::replicationName( + '[PROJECT]', + '[LOCATION]', + '[VOLUME]', + '[REPLICATION]' + ); + + sync_replication_sample($formattedName); +} +// [END netapp_v1_generated_NetApp_SyncReplication_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_active_directory.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_active_directory.php new file mode 100644 index 000000000000..8dfc7a9b3277 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_active_directory.php @@ -0,0 +1,111 @@ +setDomain($activeDirectoryDomain) + ->setDns($activeDirectoryDns) + ->setNetBiosPrefix($activeDirectoryNetBiosPrefix) + ->setUsername($activeDirectoryUsername) + ->setPassword($activeDirectoryPassword); + $request = (new UpdateActiveDirectoryRequest()) + ->setUpdateMask($updateMask) + ->setActiveDirectory($activeDirectory); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $netAppClient->updateActiveDirectory($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var ActiveDirectory $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $activeDirectoryDomain = '[DOMAIN]'; + $activeDirectoryDns = '[DNS]'; + $activeDirectoryNetBiosPrefix = '[NET_BIOS_PREFIX]'; + $activeDirectoryUsername = '[USERNAME]'; + $activeDirectoryPassword = '[PASSWORD]'; + + update_active_directory_sample( + $activeDirectoryDomain, + $activeDirectoryDns, + $activeDirectoryNetBiosPrefix, + $activeDirectoryUsername, + $activeDirectoryPassword + ); +} +// [END netapp_v1_generated_NetApp_UpdateActiveDirectory_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_backup.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_backup.php new file mode 100644 index 000000000000..5507ac77c7bd --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_backup.php @@ -0,0 +1,74 @@ +setUpdateMask($updateMask) + ->setBackup($backup); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $netAppClient->updateBackup($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Backup $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END netapp_v1_generated_NetApp_UpdateBackup_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_backup_policy.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_backup_policy.php new file mode 100644 index 000000000000..5758fb82d93f --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_backup_policy.php @@ -0,0 +1,74 @@ +setUpdateMask($updateMask) + ->setBackupPolicy($backupPolicy); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $netAppClient->updateBackupPolicy($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var BackupPolicy $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END netapp_v1_generated_NetApp_UpdateBackupPolicy_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_backup_vault.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_backup_vault.php new file mode 100644 index 000000000000..31be5bfad0cd --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_backup_vault.php @@ -0,0 +1,74 @@ +setUpdateMask($updateMask) + ->setBackupVault($backupVault); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $netAppClient->updateBackupVault($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var BackupVault $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END netapp_v1_generated_NetApp_UpdateBackupVault_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_kms_config.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_kms_config.php new file mode 100644 index 000000000000..6a15a2399065 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_kms_config.php @@ -0,0 +1,88 @@ +setCryptoKeyName($kmsConfigCryptoKeyName); + $request = (new UpdateKmsConfigRequest()) + ->setUpdateMask($updateMask) + ->setKmsConfig($kmsConfig); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $netAppClient->updateKmsConfig($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var KmsConfig $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $kmsConfigCryptoKeyName = '[CRYPTO_KEY_NAME]'; + + update_kms_config_sample($kmsConfigCryptoKeyName); +} +// [END netapp_v1_generated_NetApp_UpdateKmsConfig_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_replication.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_replication.php new file mode 100644 index 000000000000..7fa801ca481a --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_replication.php @@ -0,0 +1,104 @@ +setStoragePool($formattedReplicationDestinationVolumeParametersStoragePool); + $replication = (new Replication()) + ->setReplicationSchedule($replicationReplicationSchedule) + ->setDestinationVolumeParameters($replicationDestinationVolumeParameters); + $request = (new UpdateReplicationRequest()) + ->setUpdateMask($updateMask) + ->setReplication($replication); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $netAppClient->updateReplication($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Replication $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $replicationReplicationSchedule = ReplicationSchedule::REPLICATION_SCHEDULE_UNSPECIFIED; + $formattedReplicationDestinationVolumeParametersStoragePool = NetAppClient::storagePoolName( + '[PROJECT]', + '[LOCATION]', + '[STORAGE_POOL]' + ); + + update_replication_sample( + $replicationReplicationSchedule, + $formattedReplicationDestinationVolumeParametersStoragePool + ); +} +// [END netapp_v1_generated_NetApp_UpdateReplication_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_snapshot.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_snapshot.php new file mode 100644 index 000000000000..f5df91947284 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_snapshot.php @@ -0,0 +1,74 @@ +setUpdateMask($updateMask) + ->setSnapshot($snapshot); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $netAppClient->updateSnapshot($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Snapshot $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END netapp_v1_generated_NetApp_UpdateSnapshot_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_storage_pool.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_storage_pool.php new file mode 100644 index 000000000000..838ed04c11e1 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_storage_pool.php @@ -0,0 +1,103 @@ +setServiceLevel($storagePoolServiceLevel) + ->setCapacityGib($storagePoolCapacityGib) + ->setNetwork($formattedStoragePoolNetwork); + $request = (new UpdateStoragePoolRequest()) + ->setUpdateMask($updateMask) + ->setStoragePool($storagePool); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $netAppClient->updateStoragePool($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var StoragePool $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $storagePoolServiceLevel = ServiceLevel::SERVICE_LEVEL_UNSPECIFIED; + $storagePoolCapacityGib = 0; + $formattedStoragePoolNetwork = NetAppClient::networkName('[PROJECT]', '[NETWORK]'); + + update_storage_pool_sample( + $storagePoolServiceLevel, + $storagePoolCapacityGib, + $formattedStoragePoolNetwork + ); +} +// [END netapp_v1_generated_NetApp_UpdateStoragePool_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_volume.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_volume.php new file mode 100644 index 000000000000..a4958e603c2c --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_volume.php @@ -0,0 +1,112 @@ +setShareName($volumeShareName) + ->setStoragePool($formattedVolumeStoragePool) + ->setCapacityGib($volumeCapacityGib) + ->setProtocols($volumeProtocols); + $request = (new UpdateVolumeRequest()) + ->setUpdateMask($updateMask) + ->setVolume($volume); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $netAppClient->updateVolume($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Volume $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $volumeShareName = '[SHARE_NAME]'; + $formattedVolumeStoragePool = NetAppClient::storagePoolName( + '[PROJECT]', + '[LOCATION]', + '[STORAGE_POOL]' + ); + $volumeCapacityGib = 0; + $volumeProtocolsElement = Protocols::PROTOCOLS_UNSPECIFIED; + + update_volume_sample( + $volumeShareName, + $formattedVolumeStoragePool, + $volumeCapacityGib, + $volumeProtocolsElement + ); +} +// [END netapp_v1_generated_NetApp_UpdateVolume_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/verify_kms_config.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/verify_kms_config.php new file mode 100644 index 000000000000..351da5a758e9 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/verify_kms_config.php @@ -0,0 +1,71 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var VerifyKmsConfigResponse $response */ + $response = $netAppClient->verifyKmsConfig($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NetAppClient::kmsConfigName('[PROJECT]', '[LOCATION]', '[KMS_CONFIG]'); + + verify_kms_config_sample($formattedName); +} +// [END netapp_v1_generated_NetApp_VerifyKmsConfig_sync] diff --git a/owl-bot-staging/NetApp/v1/src/V1/Client/NetAppClient.php b/owl-bot-staging/NetApp/v1/src/V1/Client/NetAppClient.php new file mode 100644 index 000000000000..44de60fef903 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/src/V1/Client/NetAppClient.php @@ -0,0 +1,2060 @@ + createActiveDirectoryAsync(CreateActiveDirectoryRequest $request, array $optionalArgs = []) + * @method PromiseInterface createBackupAsync(CreateBackupRequest $request, array $optionalArgs = []) + * @method PromiseInterface createBackupPolicyAsync(CreateBackupPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface createBackupVaultAsync(CreateBackupVaultRequest $request, array $optionalArgs = []) + * @method PromiseInterface createKmsConfigAsync(CreateKmsConfigRequest $request, array $optionalArgs = []) + * @method PromiseInterface createReplicationAsync(CreateReplicationRequest $request, array $optionalArgs = []) + * @method PromiseInterface createSnapshotAsync(CreateSnapshotRequest $request, array $optionalArgs = []) + * @method PromiseInterface createStoragePoolAsync(CreateStoragePoolRequest $request, array $optionalArgs = []) + * @method PromiseInterface createVolumeAsync(CreateVolumeRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteActiveDirectoryAsync(DeleteActiveDirectoryRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteBackupAsync(DeleteBackupRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteBackupPolicyAsync(DeleteBackupPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteBackupVaultAsync(DeleteBackupVaultRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteKmsConfigAsync(DeleteKmsConfigRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteReplicationAsync(DeleteReplicationRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteSnapshotAsync(DeleteSnapshotRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteStoragePoolAsync(DeleteStoragePoolRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteVolumeAsync(DeleteVolumeRequest $request, array $optionalArgs = []) + * @method PromiseInterface encryptVolumesAsync(EncryptVolumesRequest $request, array $optionalArgs = []) + * @method PromiseInterface establishPeeringAsync(EstablishPeeringRequest $request, array $optionalArgs = []) + * @method PromiseInterface getActiveDirectoryAsync(GetActiveDirectoryRequest $request, array $optionalArgs = []) + * @method PromiseInterface getBackupAsync(GetBackupRequest $request, array $optionalArgs = []) + * @method PromiseInterface getBackupPolicyAsync(GetBackupPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface getBackupVaultAsync(GetBackupVaultRequest $request, array $optionalArgs = []) + * @method PromiseInterface getKmsConfigAsync(GetKmsConfigRequest $request, array $optionalArgs = []) + * @method PromiseInterface getReplicationAsync(GetReplicationRequest $request, array $optionalArgs = []) + * @method PromiseInterface getSnapshotAsync(GetSnapshotRequest $request, array $optionalArgs = []) + * @method PromiseInterface getStoragePoolAsync(GetStoragePoolRequest $request, array $optionalArgs = []) + * @method PromiseInterface getVolumeAsync(GetVolumeRequest $request, array $optionalArgs = []) + * @method PromiseInterface listActiveDirectoriesAsync(ListActiveDirectoriesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listBackupPoliciesAsync(ListBackupPoliciesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listBackupVaultsAsync(ListBackupVaultsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listBackupsAsync(ListBackupsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listKmsConfigsAsync(ListKmsConfigsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listReplicationsAsync(ListReplicationsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listSnapshotsAsync(ListSnapshotsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listStoragePoolsAsync(ListStoragePoolsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listVolumesAsync(ListVolumesRequest $request, array $optionalArgs = []) + * @method PromiseInterface resumeReplicationAsync(ResumeReplicationRequest $request, array $optionalArgs = []) + * @method PromiseInterface reverseReplicationDirectionAsync(ReverseReplicationDirectionRequest $request, array $optionalArgs = []) + * @method PromiseInterface revertVolumeAsync(RevertVolumeRequest $request, array $optionalArgs = []) + * @method PromiseInterface stopReplicationAsync(StopReplicationRequest $request, array $optionalArgs = []) + * @method PromiseInterface switchActiveReplicaZoneAsync(SwitchActiveReplicaZoneRequest $request, array $optionalArgs = []) + * @method PromiseInterface syncReplicationAsync(SyncReplicationRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateActiveDirectoryAsync(UpdateActiveDirectoryRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateBackupAsync(UpdateBackupRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateBackupPolicyAsync(UpdateBackupPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateBackupVaultAsync(UpdateBackupVaultRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateKmsConfigAsync(UpdateKmsConfigRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateReplicationAsync(UpdateReplicationRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateSnapshotAsync(UpdateSnapshotRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateStoragePoolAsync(UpdateStoragePoolRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateVolumeAsync(UpdateVolumeRequest $request, array $optionalArgs = []) + * @method PromiseInterface verifyKmsConfigAsync(VerifyKmsConfigRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + */ +final class NetAppClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.netapp.v1.NetApp'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'netapp.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'netapp.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/net_app_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/net_app_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/net_app_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/net_app_rest_client_config.php', + ], + ], + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Create the default operation client for the service. + * + * @param array $options ClientOptions for the client. + * + * @return OperationsClient + */ + private function createOperationsClient(array $options) + { + // Unset client-specific configuration options + unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); + + if (isset($options['operationsClient'])) { + return $options['operationsClient']; + } + + return new OperationsClient($options); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * active_directory resource. + * + * @param string $project + * @param string $location + * @param string $activeDirectory + * + * @return string The formatted active_directory resource. + */ + public static function activeDirectoryName(string $project, string $location, string $activeDirectory): string + { + return self::getPathTemplate('activeDirectory')->render([ + 'project' => $project, + 'location' => $location, + 'active_directory' => $activeDirectory, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a backup + * resource. + * + * @param string $project + * @param string $location + * @param string $backupVault + * @param string $backup + * + * @return string The formatted backup resource. + */ + public static function backupName(string $project, string $location, string $backupVault, string $backup): string + { + return self::getPathTemplate('backup')->render([ + 'project' => $project, + 'location' => $location, + 'backup_vault' => $backupVault, + 'backup' => $backup, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * backup_policy resource. + * + * @param string $project + * @param string $location + * @param string $backupPolicy + * + * @return string The formatted backup_policy resource. + */ + public static function backupPolicyName(string $project, string $location, string $backupPolicy): string + { + return self::getPathTemplate('backupPolicy')->render([ + 'project' => $project, + 'location' => $location, + 'backup_policy' => $backupPolicy, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a backup_vault + * resource. + * + * @param string $project + * @param string $location + * @param string $backupVault + * + * @return string The formatted backup_vault resource. + */ + public static function backupVaultName(string $project, string $location, string $backupVault): string + { + return self::getPathTemplate('backupVault')->render([ + 'project' => $project, + 'location' => $location, + 'backup_vault' => $backupVault, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a kms_config + * resource. + * + * @param string $project + * @param string $location + * @param string $kmsConfig + * + * @return string The formatted kms_config resource. + */ + public static function kmsConfigName(string $project, string $location, string $kmsConfig): string + { + return self::getPathTemplate('kmsConfig')->render([ + 'project' => $project, + 'location' => $location, + 'kms_config' => $kmsConfig, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a location + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted location resource. + */ + public static function locationName(string $project, string $location): string + { + return self::getPathTemplate('location')->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a network + * resource. + * + * @param string $project + * @param string $network + * + * @return string The formatted network resource. + */ + public static function networkName(string $project, string $network): string + { + return self::getPathTemplate('network')->render([ + 'project' => $project, + 'network' => $network, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a replication + * resource. + * + * @param string $project + * @param string $location + * @param string $volume + * @param string $replication + * + * @return string The formatted replication resource. + */ + public static function replicationName(string $project, string $location, string $volume, string $replication): string + { + return self::getPathTemplate('replication')->render([ + 'project' => $project, + 'location' => $location, + 'volume' => $volume, + 'replication' => $replication, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a snapshot + * resource. + * + * @param string $project + * @param string $location + * @param string $volume + * @param string $snapshot + * + * @return string The formatted snapshot resource. + */ + public static function snapshotName(string $project, string $location, string $volume, string $snapshot): string + { + return self::getPathTemplate('snapshot')->render([ + 'project' => $project, + 'location' => $location, + 'volume' => $volume, + 'snapshot' => $snapshot, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a storage_pool + * resource. + * + * @param string $project + * @param string $location + * @param string $storagePool + * + * @return string The formatted storage_pool resource. + */ + public static function storagePoolName(string $project, string $location, string $storagePool): string + { + return self::getPathTemplate('storagePool')->render([ + 'project' => $project, + 'location' => $location, + 'storage_pool' => $storagePool, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a volume + * resource. + * + * @param string $project + * @param string $location + * @param string $volume + * + * @return string The formatted volume resource. + */ + public static function volumeName(string $project, string $location, string $volume): string + { + return self::getPathTemplate('volume')->render([ + 'project' => $project, + 'location' => $location, + 'volume' => $volume, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - activeDirectory: projects/{project}/locations/{location}/activeDirectories/{active_directory} + * - backup: projects/{project}/locations/{location}/backupVaults/{backup_vault}/backups/{backup} + * - backupPolicy: projects/{project}/locations/{location}/backupPolicies/{backup_policy} + * - backupVault: projects/{project}/locations/{location}/backupVaults/{backup_vault} + * - kmsConfig: projects/{project}/locations/{location}/kmsConfigs/{kms_config} + * - location: projects/{project}/locations/{location} + * - network: projects/{project}/global/networks/{network} + * - replication: projects/{project}/locations/{location}/volumes/{volume}/replications/{replication} + * - snapshot: projects/{project}/locations/{location}/volumes/{volume}/snapshots/{snapshot} + * - storagePool: projects/{project}/locations/{location}/storagePools/{storage_pool} + * - volume: projects/{project}/locations/{location}/volumes/{volume} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'netapp.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * CreateActiveDirectory + * Creates the active directory specified in the request. + * + * The async variant is {@see NetAppClient::createActiveDirectoryAsync()} . + * + * @example samples/V1/NetAppClient/create_active_directory.php + * + * @param CreateActiveDirectoryRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createActiveDirectory(CreateActiveDirectoryRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateActiveDirectory', $request, $callOptions)->wait(); + } + + /** + * Creates a backup from the volume specified in the request + * The backup can be created from the given snapshot if specified in the + * request. If no snapshot specified, there'll be a new snapshot taken to + * initiate the backup creation. + * + * The async variant is {@see NetAppClient::createBackupAsync()} . + * + * @example samples/V1/NetAppClient/create_backup.php + * + * @param CreateBackupRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createBackup(CreateBackupRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateBackup', $request, $callOptions)->wait(); + } + + /** + * Creates new backup policy + * + * The async variant is {@see NetAppClient::createBackupPolicyAsync()} . + * + * @example samples/V1/NetAppClient/create_backup_policy.php + * + * @param CreateBackupPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createBackupPolicy(CreateBackupPolicyRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateBackupPolicy', $request, $callOptions)->wait(); + } + + /** + * Creates new backup vault + * + * The async variant is {@see NetAppClient::createBackupVaultAsync()} . + * + * @example samples/V1/NetAppClient/create_backup_vault.php + * + * @param CreateBackupVaultRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createBackupVault(CreateBackupVaultRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateBackupVault', $request, $callOptions)->wait(); + } + + /** + * Creates a new KMS config. + * + * The async variant is {@see NetAppClient::createKmsConfigAsync()} . + * + * @example samples/V1/NetAppClient/create_kms_config.php + * + * @param CreateKmsConfigRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createKmsConfig(CreateKmsConfigRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateKmsConfig', $request, $callOptions)->wait(); + } + + /** + * Create a new replication for a volume. + * + * The async variant is {@see NetAppClient::createReplicationAsync()} . + * + * @example samples/V1/NetAppClient/create_replication.php + * + * @param CreateReplicationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createReplication(CreateReplicationRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateReplication', $request, $callOptions)->wait(); + } + + /** + * Create a new snapshot for a volume. + * + * The async variant is {@see NetAppClient::createSnapshotAsync()} . + * + * @example samples/V1/NetAppClient/create_snapshot.php + * + * @param CreateSnapshotRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createSnapshot(CreateSnapshotRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateSnapshot', $request, $callOptions)->wait(); + } + + /** + * Creates a new storage pool. + * + * The async variant is {@see NetAppClient::createStoragePoolAsync()} . + * + * @example samples/V1/NetAppClient/create_storage_pool.php + * + * @param CreateStoragePoolRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createStoragePool(CreateStoragePoolRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateStoragePool', $request, $callOptions)->wait(); + } + + /** + * Creates a new Volume in a given project and location. + * + * The async variant is {@see NetAppClient::createVolumeAsync()} . + * + * @example samples/V1/NetAppClient/create_volume.php + * + * @param CreateVolumeRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createVolume(CreateVolumeRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateVolume', $request, $callOptions)->wait(); + } + + /** + * Delete the active directory specified in the request. + * + * The async variant is {@see NetAppClient::deleteActiveDirectoryAsync()} . + * + * @example samples/V1/NetAppClient/delete_active_directory.php + * + * @param DeleteActiveDirectoryRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteActiveDirectory(DeleteActiveDirectoryRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteActiveDirectory', $request, $callOptions)->wait(); + } + + /** + * Warning! This operation will permanently delete the backup. + * + * The async variant is {@see NetAppClient::deleteBackupAsync()} . + * + * @example samples/V1/NetAppClient/delete_backup.php + * + * @param DeleteBackupRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteBackup(DeleteBackupRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteBackup', $request, $callOptions)->wait(); + } + + /** + * Warning! This operation will permanently delete the backup policy. + * + * The async variant is {@see NetAppClient::deleteBackupPolicyAsync()} . + * + * @example samples/V1/NetAppClient/delete_backup_policy.php + * + * @param DeleteBackupPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteBackupPolicy(DeleteBackupPolicyRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteBackupPolicy', $request, $callOptions)->wait(); + } + + /** + * Warning! This operation will permanently delete the backup vault. + * + * The async variant is {@see NetAppClient::deleteBackupVaultAsync()} . + * + * @example samples/V1/NetAppClient/delete_backup_vault.php + * + * @param DeleteBackupVaultRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteBackupVault(DeleteBackupVaultRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteBackupVault', $request, $callOptions)->wait(); + } + + /** + * Warning! This operation will permanently delete the Kms config. + * + * The async variant is {@see NetAppClient::deleteKmsConfigAsync()} . + * + * @example samples/V1/NetAppClient/delete_kms_config.php + * + * @param DeleteKmsConfigRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteKmsConfig(DeleteKmsConfigRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteKmsConfig', $request, $callOptions)->wait(); + } + + /** + * Deletes a replication. + * + * The async variant is {@see NetAppClient::deleteReplicationAsync()} . + * + * @example samples/V1/NetAppClient/delete_replication.php + * + * @param DeleteReplicationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteReplication(DeleteReplicationRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteReplication', $request, $callOptions)->wait(); + } + + /** + * Deletes a snapshot. + * + * The async variant is {@see NetAppClient::deleteSnapshotAsync()} . + * + * @example samples/V1/NetAppClient/delete_snapshot.php + * + * @param DeleteSnapshotRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteSnapshot(DeleteSnapshotRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteSnapshot', $request, $callOptions)->wait(); + } + + /** + * Warning! This operation will permanently delete the storage pool. + * + * The async variant is {@see NetAppClient::deleteStoragePoolAsync()} . + * + * @example samples/V1/NetAppClient/delete_storage_pool.php + * + * @param DeleteStoragePoolRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteStoragePool(DeleteStoragePoolRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteStoragePool', $request, $callOptions)->wait(); + } + + /** + * Deletes a single Volume. + * + * The async variant is {@see NetAppClient::deleteVolumeAsync()} . + * + * @example samples/V1/NetAppClient/delete_volume.php + * + * @param DeleteVolumeRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteVolume(DeleteVolumeRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteVolume', $request, $callOptions)->wait(); + } + + /** + * Encrypt the existing volumes without CMEK encryption with the desired the + * KMS config for the whole region. + * + * The async variant is {@see NetAppClient::encryptVolumesAsync()} . + * + * @example samples/V1/NetAppClient/encrypt_volumes.php + * + * @param EncryptVolumesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function encryptVolumes(EncryptVolumesRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('EncryptVolumes', $request, $callOptions)->wait(); + } + + /** + * Establish replication peering. + * + * The async variant is {@see NetAppClient::establishPeeringAsync()} . + * + * @example samples/V1/NetAppClient/establish_peering.php + * + * @param EstablishPeeringRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function establishPeering(EstablishPeeringRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('EstablishPeering', $request, $callOptions)->wait(); + } + + /** + * Describes a specified active directory. + * + * The async variant is {@see NetAppClient::getActiveDirectoryAsync()} . + * + * @example samples/V1/NetAppClient/get_active_directory.php + * + * @param GetActiveDirectoryRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ActiveDirectory + * + * @throws ApiException Thrown if the API call fails. + */ + public function getActiveDirectory(GetActiveDirectoryRequest $request, array $callOptions = []): ActiveDirectory + { + return $this->startApiCall('GetActiveDirectory', $request, $callOptions)->wait(); + } + + /** + * Returns the description of the specified backup + * + * The async variant is {@see NetAppClient::getBackupAsync()} . + * + * @example samples/V1/NetAppClient/get_backup.php + * + * @param GetBackupRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Backup + * + * @throws ApiException Thrown if the API call fails. + */ + public function getBackup(GetBackupRequest $request, array $callOptions = []): Backup + { + return $this->startApiCall('GetBackup', $request, $callOptions)->wait(); + } + + /** + * Returns the description of the specified backup policy by backup_policy_id. + * + * The async variant is {@see NetAppClient::getBackupPolicyAsync()} . + * + * @example samples/V1/NetAppClient/get_backup_policy.php + * + * @param GetBackupPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return BackupPolicy + * + * @throws ApiException Thrown if the API call fails. + */ + public function getBackupPolicy(GetBackupPolicyRequest $request, array $callOptions = []): BackupPolicy + { + return $this->startApiCall('GetBackupPolicy', $request, $callOptions)->wait(); + } + + /** + * Returns the description of the specified backup vault + * + * The async variant is {@see NetAppClient::getBackupVaultAsync()} . + * + * @example samples/V1/NetAppClient/get_backup_vault.php + * + * @param GetBackupVaultRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return BackupVault + * + * @throws ApiException Thrown if the API call fails. + */ + public function getBackupVault(GetBackupVaultRequest $request, array $callOptions = []): BackupVault + { + return $this->startApiCall('GetBackupVault', $request, $callOptions)->wait(); + } + + /** + * Returns the description of the specified KMS config by kms_config_id. + * + * The async variant is {@see NetAppClient::getKmsConfigAsync()} . + * + * @example samples/V1/NetAppClient/get_kms_config.php + * + * @param GetKmsConfigRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return KmsConfig + * + * @throws ApiException Thrown if the API call fails. + */ + public function getKmsConfig(GetKmsConfigRequest $request, array $callOptions = []): KmsConfig + { + return $this->startApiCall('GetKmsConfig', $request, $callOptions)->wait(); + } + + /** + * Describe a replication for a volume. + * + * The async variant is {@see NetAppClient::getReplicationAsync()} . + * + * @example samples/V1/NetAppClient/get_replication.php + * + * @param GetReplicationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Replication + * + * @throws ApiException Thrown if the API call fails. + */ + public function getReplication(GetReplicationRequest $request, array $callOptions = []): Replication + { + return $this->startApiCall('GetReplication', $request, $callOptions)->wait(); + } + + /** + * Describe a snapshot for a volume. + * + * The async variant is {@see NetAppClient::getSnapshotAsync()} . + * + * @example samples/V1/NetAppClient/get_snapshot.php + * + * @param GetSnapshotRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Snapshot + * + * @throws ApiException Thrown if the API call fails. + */ + public function getSnapshot(GetSnapshotRequest $request, array $callOptions = []): Snapshot + { + return $this->startApiCall('GetSnapshot', $request, $callOptions)->wait(); + } + + /** + * Returns the description of the specified storage pool by poolId. + * + * The async variant is {@see NetAppClient::getStoragePoolAsync()} . + * + * @example samples/V1/NetAppClient/get_storage_pool.php + * + * @param GetStoragePoolRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return StoragePool + * + * @throws ApiException Thrown if the API call fails. + */ + public function getStoragePool(GetStoragePoolRequest $request, array $callOptions = []): StoragePool + { + return $this->startApiCall('GetStoragePool', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single Volume. + * + * The async variant is {@see NetAppClient::getVolumeAsync()} . + * + * @example samples/V1/NetAppClient/get_volume.php + * + * @param GetVolumeRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Volume + * + * @throws ApiException Thrown if the API call fails. + */ + public function getVolume(GetVolumeRequest $request, array $callOptions = []): Volume + { + return $this->startApiCall('GetVolume', $request, $callOptions)->wait(); + } + + /** + * Lists active directories. + * + * The async variant is {@see NetAppClient::listActiveDirectoriesAsync()} . + * + * @example samples/V1/NetAppClient/list_active_directories.php + * + * @param ListActiveDirectoriesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listActiveDirectories(ListActiveDirectoriesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListActiveDirectories', $request, $callOptions); + } + + /** + * Returns list of all available backup policies. + * + * The async variant is {@see NetAppClient::listBackupPoliciesAsync()} . + * + * @example samples/V1/NetAppClient/list_backup_policies.php + * + * @param ListBackupPoliciesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listBackupPolicies(ListBackupPoliciesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListBackupPolicies', $request, $callOptions); + } + + /** + * Returns list of all available backup vaults. + * + * The async variant is {@see NetAppClient::listBackupVaultsAsync()} . + * + * @example samples/V1/NetAppClient/list_backup_vaults.php + * + * @param ListBackupVaultsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listBackupVaults(ListBackupVaultsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListBackupVaults', $request, $callOptions); + } + + /** + * Returns descriptions of all backups for a backupVault. + * + * The async variant is {@see NetAppClient::listBackupsAsync()} . + * + * @example samples/V1/NetAppClient/list_backups.php + * + * @param ListBackupsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listBackups(ListBackupsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListBackups', $request, $callOptions); + } + + /** + * Returns descriptions of all KMS configs owned by the caller. + * + * The async variant is {@see NetAppClient::listKmsConfigsAsync()} . + * + * @example samples/V1/NetAppClient/list_kms_configs.php + * + * @param ListKmsConfigsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listKmsConfigs(ListKmsConfigsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListKmsConfigs', $request, $callOptions); + } + + /** + * Returns descriptions of all replications for a volume. + * + * The async variant is {@see NetAppClient::listReplicationsAsync()} . + * + * @example samples/V1/NetAppClient/list_replications.php + * + * @param ListReplicationsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listReplications(ListReplicationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListReplications', $request, $callOptions); + } + + /** + * Returns descriptions of all snapshots for a volume. + * + * The async variant is {@see NetAppClient::listSnapshotsAsync()} . + * + * @example samples/V1/NetAppClient/list_snapshots.php + * + * @param ListSnapshotsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listSnapshots(ListSnapshotsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListSnapshots', $request, $callOptions); + } + + /** + * Returns descriptions of all storage pools owned by the caller. + * + * The async variant is {@see NetAppClient::listStoragePoolsAsync()} . + * + * @example samples/V1/NetAppClient/list_storage_pools.php + * + * @param ListStoragePoolsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listStoragePools(ListStoragePoolsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListStoragePools', $request, $callOptions); + } + + /** + * Lists Volumes in a given project. + * + * The async variant is {@see NetAppClient::listVolumesAsync()} . + * + * @example samples/V1/NetAppClient/list_volumes.php + * + * @param ListVolumesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listVolumes(ListVolumesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListVolumes', $request, $callOptions); + } + + /** + * Resume Cross Region Replication. + * + * The async variant is {@see NetAppClient::resumeReplicationAsync()} . + * + * @example samples/V1/NetAppClient/resume_replication.php + * + * @param ResumeReplicationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function resumeReplication(ResumeReplicationRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('ResumeReplication', $request, $callOptions)->wait(); + } + + /** + * Reverses direction of replication. Source becomes destination and + * destination becomes source. + * + * The async variant is {@see NetAppClient::reverseReplicationDirectionAsync()} . + * + * @example samples/V1/NetAppClient/reverse_replication_direction.php + * + * @param ReverseReplicationDirectionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function reverseReplicationDirection(ReverseReplicationDirectionRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('ReverseReplicationDirection', $request, $callOptions)->wait(); + } + + /** + * Revert an existing volume to a specified snapshot. + * Warning! This operation will permanently revert all changes made after the + * snapshot was created. + * + * The async variant is {@see NetAppClient::revertVolumeAsync()} . + * + * @example samples/V1/NetAppClient/revert_volume.php + * + * @param RevertVolumeRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function revertVolume(RevertVolumeRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('RevertVolume', $request, $callOptions)->wait(); + } + + /** + * Stop Cross Region Replication. + * + * The async variant is {@see NetAppClient::stopReplicationAsync()} . + * + * @example samples/V1/NetAppClient/stop_replication.php + * + * @param StopReplicationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function stopReplication(StopReplicationRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('StopReplication', $request, $callOptions)->wait(); + } + + /** + * This operation will switch the active/replica zone for a regional + * storagePool. + * + * The async variant is {@see NetAppClient::switchActiveReplicaZoneAsync()} . + * + * @example samples/V1/NetAppClient/switch_active_replica_zone.php + * + * @param SwitchActiveReplicaZoneRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function switchActiveReplicaZone(SwitchActiveReplicaZoneRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('SwitchActiveReplicaZone', $request, $callOptions)->wait(); + } + + /** + * Syncs the replication. This will invoke one time volume data transfer from + * source to destination. + * + * The async variant is {@see NetAppClient::syncReplicationAsync()} . + * + * @example samples/V1/NetAppClient/sync_replication.php + * + * @param SyncReplicationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function syncReplication(SyncReplicationRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('SyncReplication', $request, $callOptions)->wait(); + } + + /** + * Update the parameters of an active directories. + * + * The async variant is {@see NetAppClient::updateActiveDirectoryAsync()} . + * + * @example samples/V1/NetAppClient/update_active_directory.php + * + * @param UpdateActiveDirectoryRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateActiveDirectory(UpdateActiveDirectoryRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateActiveDirectory', $request, $callOptions)->wait(); + } + + /** + * Update backup with full spec. + * + * The async variant is {@see NetAppClient::updateBackupAsync()} . + * + * @example samples/V1/NetAppClient/update_backup.php + * + * @param UpdateBackupRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateBackup(UpdateBackupRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateBackup', $request, $callOptions)->wait(); + } + + /** + * Updates settings of a specific backup policy. + * + * The async variant is {@see NetAppClient::updateBackupPolicyAsync()} . + * + * @example samples/V1/NetAppClient/update_backup_policy.php + * + * @param UpdateBackupPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateBackupPolicy(UpdateBackupPolicyRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateBackupPolicy', $request, $callOptions)->wait(); + } + + /** + * Updates the settings of a specific backup vault. + * + * The async variant is {@see NetAppClient::updateBackupVaultAsync()} . + * + * @example samples/V1/NetAppClient/update_backup_vault.php + * + * @param UpdateBackupVaultRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateBackupVault(UpdateBackupVaultRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateBackupVault', $request, $callOptions)->wait(); + } + + /** + * Updates the Kms config properties with the full spec + * + * The async variant is {@see NetAppClient::updateKmsConfigAsync()} . + * + * @example samples/V1/NetAppClient/update_kms_config.php + * + * @param UpdateKmsConfigRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateKmsConfig(UpdateKmsConfigRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateKmsConfig', $request, $callOptions)->wait(); + } + + /** + * Updates the settings of a specific replication. + * + * The async variant is {@see NetAppClient::updateReplicationAsync()} . + * + * @example samples/V1/NetAppClient/update_replication.php + * + * @param UpdateReplicationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateReplication(UpdateReplicationRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateReplication', $request, $callOptions)->wait(); + } + + /** + * Updates the settings of a specific snapshot. + * + * The async variant is {@see NetAppClient::updateSnapshotAsync()} . + * + * @example samples/V1/NetAppClient/update_snapshot.php + * + * @param UpdateSnapshotRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateSnapshot(UpdateSnapshotRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateSnapshot', $request, $callOptions)->wait(); + } + + /** + * Updates the storage pool properties with the full spec + * + * The async variant is {@see NetAppClient::updateStoragePoolAsync()} . + * + * @example samples/V1/NetAppClient/update_storage_pool.php + * + * @param UpdateStoragePoolRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateStoragePool(UpdateStoragePoolRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateStoragePool', $request, $callOptions)->wait(); + } + + /** + * Updates the parameters of a single Volume. + * + * The async variant is {@see NetAppClient::updateVolumeAsync()} . + * + * @example samples/V1/NetAppClient/update_volume.php + * + * @param UpdateVolumeRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateVolume(UpdateVolumeRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateVolume', $request, $callOptions)->wait(); + } + + /** + * Verifies KMS config reachability. + * + * The async variant is {@see NetAppClient::verifyKmsConfigAsync()} . + * + * @example samples/V1/NetAppClient/verify_kms_config.php + * + * @param VerifyKmsConfigRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return VerifyKmsConfigResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function verifyKmsConfig(VerifyKmsConfigRequest $request, array $callOptions = []): VerifyKmsConfigResponse + { + return $this->startApiCall('VerifyKmsConfig', $request, $callOptions)->wait(); + } + + /** + * Gets information about a location. + * + * The async variant is {@see NetAppClient::getLocationAsync()} . + * + * @example samples/V1/NetAppClient/get_location.php + * + * @param GetLocationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Location + * + * @throws ApiException Thrown if the API call fails. + */ + public function getLocation(GetLocationRequest $request, array $callOptions = []): Location + { + return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * The async variant is {@see NetAppClient::listLocationsAsync()} . + * + * @example samples/V1/NetAppClient/list_locations.php + * + * @param ListLocationsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListLocations', $request, $callOptions); + } +} diff --git a/owl-bot-staging/NetApp/v1/src/V1/gapic_metadata.json b/owl-bot-staging/NetApp/v1/src/V1/gapic_metadata.json new file mode 100644 index 000000000000..3e8c0b03c7b4 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/src/V1/gapic_metadata.json @@ -0,0 +1,298 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.cloud.netapp.v1", + "libraryPackage": "Google\\Cloud\\NetApp\\V1", + "services": { + "NetApp": { + "clients": { + "grpc": { + "libraryClient": "NetAppGapicClient", + "rpcs": { + "CreateActiveDirectory": { + "methods": [ + "createActiveDirectory" + ] + }, + "CreateBackup": { + "methods": [ + "createBackup" + ] + }, + "CreateBackupPolicy": { + "methods": [ + "createBackupPolicy" + ] + }, + "CreateBackupVault": { + "methods": [ + "createBackupVault" + ] + }, + "CreateKmsConfig": { + "methods": [ + "createKmsConfig" + ] + }, + "CreateReplication": { + "methods": [ + "createReplication" + ] + }, + "CreateSnapshot": { + "methods": [ + "createSnapshot" + ] + }, + "CreateStoragePool": { + "methods": [ + "createStoragePool" + ] + }, + "CreateVolume": { + "methods": [ + "createVolume" + ] + }, + "DeleteActiveDirectory": { + "methods": [ + "deleteActiveDirectory" + ] + }, + "DeleteBackup": { + "methods": [ + "deleteBackup" + ] + }, + "DeleteBackupPolicy": { + "methods": [ + "deleteBackupPolicy" + ] + }, + "DeleteBackupVault": { + "methods": [ + "deleteBackupVault" + ] + }, + "DeleteKmsConfig": { + "methods": [ + "deleteKmsConfig" + ] + }, + "DeleteReplication": { + "methods": [ + "deleteReplication" + ] + }, + "DeleteSnapshot": { + "methods": [ + "deleteSnapshot" + ] + }, + "DeleteStoragePool": { + "methods": [ + "deleteStoragePool" + ] + }, + "DeleteVolume": { + "methods": [ + "deleteVolume" + ] + }, + "EncryptVolumes": { + "methods": [ + "encryptVolumes" + ] + }, + "EstablishPeering": { + "methods": [ + "establishPeering" + ] + }, + "GetActiveDirectory": { + "methods": [ + "getActiveDirectory" + ] + }, + "GetBackup": { + "methods": [ + "getBackup" + ] + }, + "GetBackupPolicy": { + "methods": [ + "getBackupPolicy" + ] + }, + "GetBackupVault": { + "methods": [ + "getBackupVault" + ] + }, + "GetKmsConfig": { + "methods": [ + "getKmsConfig" + ] + }, + "GetReplication": { + "methods": [ + "getReplication" + ] + }, + "GetSnapshot": { + "methods": [ + "getSnapshot" + ] + }, + "GetStoragePool": { + "methods": [ + "getStoragePool" + ] + }, + "GetVolume": { + "methods": [ + "getVolume" + ] + }, + "ListActiveDirectories": { + "methods": [ + "listActiveDirectories" + ] + }, + "ListBackupPolicies": { + "methods": [ + "listBackupPolicies" + ] + }, + "ListBackupVaults": { + "methods": [ + "listBackupVaults" + ] + }, + "ListBackups": { + "methods": [ + "listBackups" + ] + }, + "ListKmsConfigs": { + "methods": [ + "listKmsConfigs" + ] + }, + "ListReplications": { + "methods": [ + "listReplications" + ] + }, + "ListSnapshots": { + "methods": [ + "listSnapshots" + ] + }, + "ListStoragePools": { + "methods": [ + "listStoragePools" + ] + }, + "ListVolumes": { + "methods": [ + "listVolumes" + ] + }, + "ResumeReplication": { + "methods": [ + "resumeReplication" + ] + }, + "ReverseReplicationDirection": { + "methods": [ + "reverseReplicationDirection" + ] + }, + "RevertVolume": { + "methods": [ + "revertVolume" + ] + }, + "StopReplication": { + "methods": [ + "stopReplication" + ] + }, + "SwitchActiveReplicaZone": { + "methods": [ + "switchActiveReplicaZone" + ] + }, + "SyncReplication": { + "methods": [ + "syncReplication" + ] + }, + "UpdateActiveDirectory": { + "methods": [ + "updateActiveDirectory" + ] + }, + "UpdateBackup": { + "methods": [ + "updateBackup" + ] + }, + "UpdateBackupPolicy": { + "methods": [ + "updateBackupPolicy" + ] + }, + "UpdateBackupVault": { + "methods": [ + "updateBackupVault" + ] + }, + "UpdateKmsConfig": { + "methods": [ + "updateKmsConfig" + ] + }, + "UpdateReplication": { + "methods": [ + "updateReplication" + ] + }, + "UpdateSnapshot": { + "methods": [ + "updateSnapshot" + ] + }, + "UpdateStoragePool": { + "methods": [ + "updateStoragePool" + ] + }, + "UpdateVolume": { + "methods": [ + "updateVolume" + ] + }, + "VerifyKmsConfig": { + "methods": [ + "verifyKmsConfig" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/NetApp/v1/src/V1/resources/net_app_client_config.json b/owl-bot-staging/NetApp/v1/src/V1/resources/net_app_client_config.json new file mode 100644 index 000000000000..3e5b75036741 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/src/V1/resources/net_app_client_config.json @@ -0,0 +1,324 @@ +{ + "interfaces": { + "google.cloud.netapp.v1.NetApp": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE" + ], + "no_retry_1_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 10000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "CreateActiveDirectory": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateBackup": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateBackupPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateBackupVault": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateKmsConfig": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateReplication": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateSnapshot": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateStoragePool": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateVolume": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteActiveDirectory": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteBackup": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteBackupPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteBackupVault": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteKmsConfig": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteReplication": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteSnapshot": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteStoragePool": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteVolume": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "EncryptVolumes": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "EstablishPeering": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetActiveDirectory": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetBackup": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetBackupPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetBackupVault": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetKmsConfig": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetReplication": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetSnapshot": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetStoragePool": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetVolume": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListActiveDirectories": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListBackupPolicies": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListBackupVaults": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListBackups": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListKmsConfigs": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListReplications": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListSnapshots": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListStoragePools": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListVolumes": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ResumeReplication": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ReverseReplicationDirection": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "RevertVolume": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "StopReplication": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "SwitchActiveReplicaZone": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "SyncReplication": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpdateActiveDirectory": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateBackup": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateBackupPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateBackupVault": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateKmsConfig": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateReplication": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateSnapshot": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateStoragePool": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateVolume": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "VerifyKmsConfig": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetLocation": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListLocations": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } + } + } +} diff --git a/owl-bot-staging/NetApp/v1/src/V1/resources/net_app_descriptor_config.php b/owl-bot-staging/NetApp/v1/src/V1/resources/net_app_descriptor_config.php new file mode 100644 index 000000000000..f57b74f7d6d9 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/src/V1/resources/net_app_descriptor_config.php @@ -0,0 +1,1049 @@ + [ + 'google.cloud.netapp.v1.NetApp' => [ + 'CreateActiveDirectory' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetApp\V1\ActiveDirectory', + 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateBackup' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetApp\V1\Backup', + 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateBackupPolicy' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetApp\V1\BackupPolicy', + 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateBackupVault' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetApp\V1\BackupVault', + 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateKmsConfig' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetApp\V1\KmsConfig', + 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateReplication' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetApp\V1\Replication', + 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateSnapshot' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetApp\V1\Snapshot', + 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateStoragePool' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetApp\V1\StoragePool', + 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateVolume' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetApp\V1\Volume', + 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteActiveDirectory' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteBackup' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteBackupPolicy' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteBackupVault' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteKmsConfig' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteReplication' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteSnapshot' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteStoragePool' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteVolume' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'EncryptVolumes' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetApp\V1\KmsConfig', + 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'EstablishPeering' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetApp\V1\Replication', + 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ResumeReplication' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetApp\V1\Replication', + 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ReverseReplicationDirection' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetApp\V1\Replication', + 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'RevertVolume' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetApp\V1\Volume', + 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'StopReplication' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetApp\V1\Replication', + 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'SwitchActiveReplicaZone' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetApp\V1\StoragePool', + 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'SyncReplication' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetApp\V1\Replication', + 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UpdateActiveDirectory' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetApp\V1\ActiveDirectory', + 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'active_directory.name', + 'fieldAccessors' => [ + 'getActiveDirectory', + 'getName', + ], + ], + ], + ], + 'UpdateBackup' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetApp\V1\Backup', + 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'backup.name', + 'fieldAccessors' => [ + 'getBackup', + 'getName', + ], + ], + ], + ], + 'UpdateBackupPolicy' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetApp\V1\BackupPolicy', + 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'backup_policy.name', + 'fieldAccessors' => [ + 'getBackupPolicy', + 'getName', + ], + ], + ], + ], + 'UpdateBackupVault' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetApp\V1\BackupVault', + 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'backup_vault.name', + 'fieldAccessors' => [ + 'getBackupVault', + 'getName', + ], + ], + ], + ], + 'UpdateKmsConfig' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetApp\V1\KmsConfig', + 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'kms_config.name', + 'fieldAccessors' => [ + 'getKmsConfig', + 'getName', + ], + ], + ], + ], + 'UpdateReplication' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetApp\V1\Replication', + 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'replication.name', + 'fieldAccessors' => [ + 'getReplication', + 'getName', + ], + ], + ], + ], + 'UpdateSnapshot' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetApp\V1\Snapshot', + 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'snapshot.name', + 'fieldAccessors' => [ + 'getSnapshot', + 'getName', + ], + ], + ], + ], + 'UpdateStoragePool' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetApp\V1\StoragePool', + 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'storage_pool.name', + 'fieldAccessors' => [ + 'getStoragePool', + 'getName', + ], + ], + ], + ], + 'UpdateVolume' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetApp\V1\Volume', + 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'volume.name', + 'fieldAccessors' => [ + 'getVolume', + 'getName', + ], + ], + ], + ], + 'GetActiveDirectory' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\NetApp\V1\ActiveDirectory', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetBackup' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\NetApp\V1\Backup', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetBackupPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\NetApp\V1\BackupPolicy', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetBackupVault' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\NetApp\V1\BackupVault', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetKmsConfig' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\NetApp\V1\KmsConfig', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetReplication' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\NetApp\V1\Replication', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetSnapshot' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\NetApp\V1\Snapshot', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetStoragePool' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\NetApp\V1\StoragePool', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetVolume' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\NetApp\V1\Volume', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListActiveDirectories' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getActiveDirectories', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\NetApp\V1\ListActiveDirectoriesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListBackupPolicies' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getBackupPolicies', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\NetApp\V1\ListBackupPoliciesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListBackupVaults' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getBackupVaults', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\NetApp\V1\ListBackupVaultsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListBackups' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getBackups', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\NetApp\V1\ListBackupsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListKmsConfigs' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getKmsConfigs', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\NetApp\V1\ListKmsConfigsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListReplications' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getReplications', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\NetApp\V1\ListReplicationsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListSnapshots' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getSnapshots', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\NetApp\V1\ListSnapshotsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListStoragePools' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getStoragePools', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\NetApp\V1\ListStoragePoolsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListVolumes' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getVolumes', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\NetApp\V1\ListVolumesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'VerifyKmsConfig' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\NetApp\V1\VerifyKmsConfigResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetLocation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Location\Location', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'templateMap' => [ + 'activeDirectory' => 'projects/{project}/locations/{location}/activeDirectories/{active_directory}', + 'backup' => 'projects/{project}/locations/{location}/backupVaults/{backup_vault}/backups/{backup}', + 'backupPolicy' => 'projects/{project}/locations/{location}/backupPolicies/{backup_policy}', + 'backupVault' => 'projects/{project}/locations/{location}/backupVaults/{backup_vault}', + 'kmsConfig' => 'projects/{project}/locations/{location}/kmsConfigs/{kms_config}', + 'location' => 'projects/{project}/locations/{location}', + 'network' => 'projects/{project}/global/networks/{network}', + 'replication' => 'projects/{project}/locations/{location}/volumes/{volume}/replications/{replication}', + 'snapshot' => 'projects/{project}/locations/{location}/volumes/{volume}/snapshots/{snapshot}', + 'storagePool' => 'projects/{project}/locations/{location}/storagePools/{storage_pool}', + 'volume' => 'projects/{project}/locations/{location}/volumes/{volume}', + ], + ], + ], +]; diff --git a/owl-bot-staging/NetApp/v1/src/V1/resources/net_app_rest_client_config.php b/owl-bot-staging/NetApp/v1/src/V1/resources/net_app_rest_client_config.php new file mode 100644 index 000000000000..05f75ec17cd5 --- /dev/null +++ b/owl-bot-staging/NetApp/v1/src/V1/resources/net_app_rest_client_config.php @@ -0,0 +1,784 @@ + [ + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.cloud.netapp.v1.NetApp' => [ + 'CreateActiveDirectory' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/activeDirectories', + 'body' => 'active_directory', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'active_directory_id', + ], + ], + 'CreateBackup' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/backupVaults/*}/backups', + 'body' => 'backup', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'backup_id', + ], + ], + 'CreateBackupPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/backupPolicies', + 'body' => 'backup_policy', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'backup_policy_id', + ], + ], + 'CreateBackupVault' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/backupVaults', + 'body' => 'backup_vault', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'backup_vault_id', + ], + ], + 'CreateKmsConfig' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/kmsConfigs', + 'body' => 'kms_config', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'kms_config_id', + ], + ], + 'CreateReplication' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/volumes/*}/replications', + 'body' => 'replication', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'replication_id', + ], + ], + 'CreateSnapshot' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/volumes/*}/snapshots', + 'body' => 'snapshot', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'snapshot_id', + ], + ], + 'CreateStoragePool' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/storagePools', + 'body' => 'storage_pool', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'storage_pool_id', + ], + ], + 'CreateVolume' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/volumes', + 'body' => 'volume', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'volume_id', + ], + ], + 'DeleteActiveDirectory' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/activeDirectories/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteBackup' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/backupVaults/*/backups/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteBackupPolicy' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/backupPolicies/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteBackupVault' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/backupVaults/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteKmsConfig' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/kmsConfigs/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteReplication' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/volumes/*/replications/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteSnapshot' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/volumes/*/snapshots/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteStoragePool' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/storagePools/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteVolume' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/volumes/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'EncryptVolumes' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/kmsConfigs/*}:encrypt', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'EstablishPeering' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/volumes/*/replications/*}:establishPeering', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetActiveDirectory' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/activeDirectories/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetBackup' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/backupVaults/*/backups/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetBackupPolicy' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/backupPolicies/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetBackupVault' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/backupVaults/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetKmsConfig' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/kmsConfigs/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetReplication' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/volumes/*/replications/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetSnapshot' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/volumes/*/snapshots/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetStoragePool' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/storagePools/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetVolume' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/volumes/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListActiveDirectories' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/activeDirectories', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListBackupPolicies' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/backupPolicies', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListBackupVaults' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/backupVaults', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListBackups' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/backupVaults/*}/backups', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListKmsConfigs' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/kmsConfigs', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListReplications' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/volumes/*}/replications', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListSnapshots' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/volumes/*}/snapshots', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListStoragePools' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/storagePools', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListVolumes' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/volumes', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ResumeReplication' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/volumes/*/replications/*}:resume', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ReverseReplicationDirection' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/volumes/*/replications/*}:reverseDirection', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'RevertVolume' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/volumes/*}:revert', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'StopReplication' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/volumes/*/replications/*}:stop', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'SwitchActiveReplicaZone' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/storagePools/*}:switch', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'SyncReplication' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/volumes/*/replications/*}:sync', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'UpdateActiveDirectory' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{active_directory.name=projects/*/locations/*/activeDirectories/*}', + 'body' => 'active_directory', + 'placeholders' => [ + 'active_directory.name' => [ + 'getters' => [ + 'getActiveDirectory', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdateBackup' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{backup.name=projects/*/locations/*/backupVaults/*/backups/*}', + 'body' => 'backup', + 'placeholders' => [ + 'backup.name' => [ + 'getters' => [ + 'getBackup', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdateBackupPolicy' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{backup_policy.name=projects/*/locations/*/backupPolicies/*}', + 'body' => 'backup_policy', + 'placeholders' => [ + 'backup_policy.name' => [ + 'getters' => [ + 'getBackupPolicy', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdateBackupVault' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{backup_vault.name=projects/*/locations/*/backupVaults/*}', + 'body' => 'backup_vault', + 'placeholders' => [ + 'backup_vault.name' => [ + 'getters' => [ + 'getBackupVault', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdateKmsConfig' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{kms_config.name=projects/*/locations/*/kmsConfigs/*}', + 'body' => 'kms_config', + 'placeholders' => [ + 'kms_config.name' => [ + 'getters' => [ + 'getKmsConfig', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdateReplication' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{replication.name=projects/*/locations/*/volumes/*/replications/*}', + 'body' => 'replication', + 'placeholders' => [ + 'replication.name' => [ + 'getters' => [ + 'getReplication', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdateSnapshot' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{snapshot.name=projects/*/locations/*/volumes/*/snapshots/*}', + 'body' => 'snapshot', + 'placeholders' => [ + 'snapshot.name' => [ + 'getters' => [ + 'getSnapshot', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdateStoragePool' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{storage_pool.name=projects/*/locations/*/storagePools/*}', + 'body' => 'storage_pool', + 'placeholders' => [ + 'storage_pool.name' => [ + 'getters' => [ + 'getStoragePool', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdateVolume' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{volume.name=projects/*/locations/*/volumes/*}', + 'body' => 'volume', + 'placeholders' => [ + 'volume.name' => [ + 'getters' => [ + 'getVolume', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'VerifyKmsConfig' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/kmsConfigs/*}:verify', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/NetApp/v1/tests/Unit/V1/Client/NetAppClientTest.php b/owl-bot-staging/NetApp/v1/tests/Unit/V1/Client/NetAppClientTest.php new file mode 100644 index 000000000000..3f2bd4899e0d --- /dev/null +++ b/owl-bot-staging/NetApp/v1/tests/Unit/V1/Client/NetAppClientTest.php @@ -0,0 +1,6873 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return NetAppClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new NetAppClient($options); + } + + /** @test */ + public function createActiveDirectoryTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createActiveDirectoryTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $domain = 'domain-1326197564'; + $site = 'site3530567'; + $dns = 'dns99625'; + $netBiosPrefix = 'netBiosPrefix865554756'; + $organizationalUnit = 'organizationalUnit-694432635'; + $aesEncryption = false; + $username = 'username-265713450'; + $password = 'password1216985755'; + $kdcHostname = 'kdcHostname-863813976'; + $kdcIp = 'kdcIp-1136252068'; + $nfsUsersWithLdap = false; + $description = 'description-1724546052'; + $ldapSigning = false; + $encryptDcConnections = false; + $stateDetails = 'stateDetails632437908'; + $expectedResponse = new ActiveDirectory(); + $expectedResponse->setName($name); + $expectedResponse->setDomain($domain); + $expectedResponse->setSite($site); + $expectedResponse->setDns($dns); + $expectedResponse->setNetBiosPrefix($netBiosPrefix); + $expectedResponse->setOrganizationalUnit($organizationalUnit); + $expectedResponse->setAesEncryption($aesEncryption); + $expectedResponse->setUsername($username); + $expectedResponse->setPassword($password); + $expectedResponse->setKdcHostname($kdcHostname); + $expectedResponse->setKdcIp($kdcIp); + $expectedResponse->setNfsUsersWithLdap($nfsUsersWithLdap); + $expectedResponse->setDescription($description); + $expectedResponse->setLdapSigning($ldapSigning); + $expectedResponse->setEncryptDcConnections($encryptDcConnections); + $expectedResponse->setStateDetails($stateDetails); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createActiveDirectoryTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $activeDirectory = new ActiveDirectory(); + $activeDirectoryDomain = 'activeDirectoryDomain1710368171'; + $activeDirectory->setDomain($activeDirectoryDomain); + $activeDirectoryDns = 'activeDirectoryDns1090270626'; + $activeDirectory->setDns($activeDirectoryDns); + $activeDirectoryNetBiosPrefix = 'activeDirectoryNetBiosPrefix-1870358125'; + $activeDirectory->setNetBiosPrefix($activeDirectoryNetBiosPrefix); + $activeDirectoryUsername = 'activeDirectoryUsername1591163901'; + $activeDirectory->setUsername($activeDirectoryUsername); + $activeDirectoryPassword = 'activeDirectoryPassword-1221104190'; + $activeDirectory->setPassword($activeDirectoryPassword); + $activeDirectoryId = 'activeDirectoryId1363092678'; + $request = (new CreateActiveDirectoryRequest()) + ->setParent($formattedParent) + ->setActiveDirectory($activeDirectory) + ->setActiveDirectoryId($activeDirectoryId); + $response = $gapicClient->createActiveDirectory($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/CreateActiveDirectory', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getActiveDirectory(); + $this->assertProtobufEquals($activeDirectory, $actualValue); + $actualValue = $actualApiRequestObject->getActiveDirectoryId(); + $this->assertProtobufEquals($activeDirectoryId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createActiveDirectoryTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createActiveDirectoryExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createActiveDirectoryTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $activeDirectory = new ActiveDirectory(); + $activeDirectoryDomain = 'activeDirectoryDomain1710368171'; + $activeDirectory->setDomain($activeDirectoryDomain); + $activeDirectoryDns = 'activeDirectoryDns1090270626'; + $activeDirectory->setDns($activeDirectoryDns); + $activeDirectoryNetBiosPrefix = 'activeDirectoryNetBiosPrefix-1870358125'; + $activeDirectory->setNetBiosPrefix($activeDirectoryNetBiosPrefix); + $activeDirectoryUsername = 'activeDirectoryUsername1591163901'; + $activeDirectory->setUsername($activeDirectoryUsername); + $activeDirectoryPassword = 'activeDirectoryPassword-1221104190'; + $activeDirectory->setPassword($activeDirectoryPassword); + $activeDirectoryId = 'activeDirectoryId1363092678'; + $request = (new CreateActiveDirectoryRequest()) + ->setParent($formattedParent) + ->setActiveDirectory($activeDirectory) + ->setActiveDirectoryId($activeDirectoryId); + $response = $gapicClient->createActiveDirectory($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createActiveDirectoryTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createBackupTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createBackupTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $volumeUsageBytes = 962433704; + $sourceVolume = 'sourceVolume327497662'; + $sourceSnapshot = 'sourceSnapshot-947679896'; + $chainStorageBytes = 1614651561; + $expectedResponse = new Backup(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setVolumeUsageBytes($volumeUsageBytes); + $expectedResponse->setSourceVolume($sourceVolume); + $expectedResponse->setSourceSnapshot($sourceSnapshot); + $expectedResponse->setChainStorageBytes($chainStorageBytes); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createBackupTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->backupVaultName('[PROJECT]', '[LOCATION]', '[BACKUP_VAULT]'); + $backupId = 'backupId1355353272'; + $backup = new Backup(); + $request = (new CreateBackupRequest()) + ->setParent($formattedParent) + ->setBackupId($backupId) + ->setBackup($backup); + $response = $gapicClient->createBackup($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/CreateBackup', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getBackupId(); + $this->assertProtobufEquals($backupId, $actualValue); + $actualValue = $actualApiRequestObject->getBackup(); + $this->assertProtobufEquals($backup, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createBackupTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createBackupExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createBackupTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->backupVaultName('[PROJECT]', '[LOCATION]', '[BACKUP_VAULT]'); + $backupId = 'backupId1355353272'; + $backup = new Backup(); + $request = (new CreateBackupRequest()) + ->setParent($formattedParent) + ->setBackupId($backupId) + ->setBackup($backup); + $response = $gapicClient->createBackup($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createBackupTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createBackupPolicyTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createBackupPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $dailyBackupLimit = 532629348; + $weeklyBackupLimit = 2075144708; + $monthlyBackupLimit = 1253809680; + $description = 'description-1724546052'; + $enabled = false; + $assignedVolumeCount = 396892795; + $expectedResponse = new BackupPolicy(); + $expectedResponse->setName($name); + $expectedResponse->setDailyBackupLimit($dailyBackupLimit); + $expectedResponse->setWeeklyBackupLimit($weeklyBackupLimit); + $expectedResponse->setMonthlyBackupLimit($monthlyBackupLimit); + $expectedResponse->setDescription($description); + $expectedResponse->setEnabled($enabled); + $expectedResponse->setAssignedVolumeCount($assignedVolumeCount); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createBackupPolicyTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $backupPolicy = new BackupPolicy(); + $backupPolicyId = 'backupPolicyId-1316025077'; + $request = (new CreateBackupPolicyRequest()) + ->setParent($formattedParent) + ->setBackupPolicy($backupPolicy) + ->setBackupPolicyId($backupPolicyId); + $response = $gapicClient->createBackupPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/CreateBackupPolicy', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getBackupPolicy(); + $this->assertProtobufEquals($backupPolicy, $actualValue); + $actualValue = $actualApiRequestObject->getBackupPolicyId(); + $this->assertProtobufEquals($backupPolicyId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createBackupPolicyTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createBackupPolicyExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createBackupPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $backupPolicy = new BackupPolicy(); + $backupPolicyId = 'backupPolicyId-1316025077'; + $request = (new CreateBackupPolicyRequest()) + ->setParent($formattedParent) + ->setBackupPolicy($backupPolicy) + ->setBackupPolicyId($backupPolicyId); + $response = $gapicClient->createBackupPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createBackupPolicyTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createBackupVaultTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createBackupVaultTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $expectedResponse = new BackupVault(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createBackupVaultTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $backupVaultId = 'backupVaultId467030053'; + $backupVault = new BackupVault(); + $request = (new CreateBackupVaultRequest()) + ->setParent($formattedParent) + ->setBackupVaultId($backupVaultId) + ->setBackupVault($backupVault); + $response = $gapicClient->createBackupVault($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/CreateBackupVault', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getBackupVaultId(); + $this->assertProtobufEquals($backupVaultId, $actualValue); + $actualValue = $actualApiRequestObject->getBackupVault(); + $this->assertProtobufEquals($backupVault, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createBackupVaultTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createBackupVaultExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createBackupVaultTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $backupVaultId = 'backupVaultId467030053'; + $backupVault = new BackupVault(); + $request = (new CreateBackupVaultRequest()) + ->setParent($formattedParent) + ->setBackupVaultId($backupVaultId) + ->setBackupVault($backupVault); + $response = $gapicClient->createBackupVault($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createBackupVaultTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createKmsConfigTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createKmsConfigTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $cryptoKeyName = 'cryptoKeyName-184663511'; + $stateDetails = 'stateDetails632437908'; + $description = 'description-1724546052'; + $instructions = 'instructions757376421'; + $serviceAccount = 'serviceAccount-1948028253'; + $expectedResponse = new KmsConfig(); + $expectedResponse->setName($name); + $expectedResponse->setCryptoKeyName($cryptoKeyName); + $expectedResponse->setStateDetails($stateDetails); + $expectedResponse->setDescription($description); + $expectedResponse->setInstructions($instructions); + $expectedResponse->setServiceAccount($serviceAccount); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createKmsConfigTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $kmsConfigId = 'kmsConfigId1366390730'; + $kmsConfig = new KmsConfig(); + $kmsConfigCryptoKeyName = 'kmsConfigCryptoKeyName2110252630'; + $kmsConfig->setCryptoKeyName($kmsConfigCryptoKeyName); + $request = (new CreateKmsConfigRequest()) + ->setParent($formattedParent) + ->setKmsConfigId($kmsConfigId) + ->setKmsConfig($kmsConfig); + $response = $gapicClient->createKmsConfig($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/CreateKmsConfig', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getKmsConfigId(); + $this->assertProtobufEquals($kmsConfigId, $actualValue); + $actualValue = $actualApiRequestObject->getKmsConfig(); + $this->assertProtobufEquals($kmsConfig, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createKmsConfigTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createKmsConfigExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createKmsConfigTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $kmsConfigId = 'kmsConfigId1366390730'; + $kmsConfig = new KmsConfig(); + $kmsConfigCryptoKeyName = 'kmsConfigCryptoKeyName2110252630'; + $kmsConfig->setCryptoKeyName($kmsConfigCryptoKeyName); + $request = (new CreateKmsConfigRequest()) + ->setParent($formattedParent) + ->setKmsConfigId($kmsConfigId) + ->setKmsConfig($kmsConfig); + $response = $gapicClient->createKmsConfig($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createKmsConfigTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createReplicationTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createReplicationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $stateDetails = 'stateDetails632437908'; + $healthy = false; + $destinationVolume = 'destinationVolume-1177512853'; + $description = 'description-1724546052'; + $sourceVolume = 'sourceVolume327497662'; + $clusterLocation = 'clusterLocation-44738470'; + $expectedResponse = new Replication(); + $expectedResponse->setName($name); + $expectedResponse->setStateDetails($stateDetails); + $expectedResponse->setHealthy($healthy); + $expectedResponse->setDestinationVolume($destinationVolume); + $expectedResponse->setDescription($description); + $expectedResponse->setSourceVolume($sourceVolume); + $expectedResponse->setClusterLocation($clusterLocation); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createReplicationTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); + $replication = new Replication(); + $replicationReplicationSchedule = ReplicationSchedule::REPLICATION_SCHEDULE_UNSPECIFIED; + $replication->setReplicationSchedule($replicationReplicationSchedule); + $replicationDestinationVolumeParameters = new DestinationVolumeParameters(); + $destinationVolumeParametersStoragePool = $gapicClient->storagePoolName('[PROJECT]', '[LOCATION]', '[STORAGE_POOL]'); + $replicationDestinationVolumeParameters->setStoragePool($destinationVolumeParametersStoragePool); + $replication->setDestinationVolumeParameters($replicationDestinationVolumeParameters); + $replicationId = 'replicationId1935722094'; + $request = (new CreateReplicationRequest()) + ->setParent($formattedParent) + ->setReplication($replication) + ->setReplicationId($replicationId); + $response = $gapicClient->createReplication($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/CreateReplication', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getReplication(); + $this->assertProtobufEquals($replication, $actualValue); + $actualValue = $actualApiRequestObject->getReplicationId(); + $this->assertProtobufEquals($replicationId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createReplicationTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createReplicationExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createReplicationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); + $replication = new Replication(); + $replicationReplicationSchedule = ReplicationSchedule::REPLICATION_SCHEDULE_UNSPECIFIED; + $replication->setReplicationSchedule($replicationReplicationSchedule); + $replicationDestinationVolumeParameters = new DestinationVolumeParameters(); + $destinationVolumeParametersStoragePool = $gapicClient->storagePoolName('[PROJECT]', '[LOCATION]', '[STORAGE_POOL]'); + $replicationDestinationVolumeParameters->setStoragePool($destinationVolumeParametersStoragePool); + $replication->setDestinationVolumeParameters($replicationDestinationVolumeParameters); + $replicationId = 'replicationId1935722094'; + $request = (new CreateReplicationRequest()) + ->setParent($formattedParent) + ->setReplication($replication) + ->setReplicationId($replicationId); + $response = $gapicClient->createReplication($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createReplicationTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createSnapshotTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createSnapshotTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $stateDetails = 'stateDetails632437908'; + $description = 'description-1724546052'; + $usedBytes = -1.91584322E8; + $expectedResponse = new Snapshot(); + $expectedResponse->setName($name); + $expectedResponse->setStateDetails($stateDetails); + $expectedResponse->setDescription($description); + $expectedResponse->setUsedBytes($usedBytes); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createSnapshotTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); + $snapshot = new Snapshot(); + $snapshotId = 'snapshotId-168585866'; + $request = (new CreateSnapshotRequest()) + ->setParent($formattedParent) + ->setSnapshot($snapshot) + ->setSnapshotId($snapshotId); + $response = $gapicClient->createSnapshot($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/CreateSnapshot', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getSnapshot(); + $this->assertProtobufEquals($snapshot, $actualValue); + $actualValue = $actualApiRequestObject->getSnapshotId(); + $this->assertProtobufEquals($snapshotId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createSnapshotTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createSnapshotExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createSnapshotTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); + $snapshot = new Snapshot(); + $snapshotId = 'snapshotId-168585866'; + $request = (new CreateSnapshotRequest()) + ->setParent($formattedParent) + ->setSnapshot($snapshot) + ->setSnapshotId($snapshotId); + $response = $gapicClient->createSnapshot($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createSnapshotTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createStoragePoolTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createStoragePoolTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $capacityGib = 498394811; + $volumeCapacityGib = 643777472; + $volumeCount = 1362665558; + $stateDetails = 'stateDetails632437908'; + $description = 'description-1724546052'; + $network = 'network1843485230'; + $activeDirectory = 'activeDirectory475662452'; + $kmsConfig = 'kmsConfig917255152'; + $ldapEnabled = false; + $psaRange = 'psaRange1004849276'; + $globalAccessAllowed = false; + $allowAutoTiering = true; + $replicaZone = 'replicaZone1404354259'; + $zone = 'zone3744684'; + $expectedResponse = new StoragePool(); + $expectedResponse->setName($name); + $expectedResponse->setCapacityGib($capacityGib); + $expectedResponse->setVolumeCapacityGib($volumeCapacityGib); + $expectedResponse->setVolumeCount($volumeCount); + $expectedResponse->setStateDetails($stateDetails); + $expectedResponse->setDescription($description); + $expectedResponse->setNetwork($network); + $expectedResponse->setActiveDirectory($activeDirectory); + $expectedResponse->setKmsConfig($kmsConfig); + $expectedResponse->setLdapEnabled($ldapEnabled); + $expectedResponse->setPsaRange($psaRange); + $expectedResponse->setGlobalAccessAllowed($globalAccessAllowed); + $expectedResponse->setAllowAutoTiering($allowAutoTiering); + $expectedResponse->setReplicaZone($replicaZone); + $expectedResponse->setZone($zone); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createStoragePoolTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $storagePoolId = 'storagePoolId909234778'; + $storagePool = new StoragePool(); + $storagePoolServiceLevel = ServiceLevel::SERVICE_LEVEL_UNSPECIFIED; + $storagePool->setServiceLevel($storagePoolServiceLevel); + $storagePoolCapacityGib = 1260910865; + $storagePool->setCapacityGib($storagePoolCapacityGib); + $storagePoolNetwork = $gapicClient->networkName('[PROJECT]', '[NETWORK]'); + $storagePool->setNetwork($storagePoolNetwork); + $request = (new CreateStoragePoolRequest()) + ->setParent($formattedParent) + ->setStoragePoolId($storagePoolId) + ->setStoragePool($storagePool); + $response = $gapicClient->createStoragePool($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/CreateStoragePool', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getStoragePoolId(); + $this->assertProtobufEquals($storagePoolId, $actualValue); + $actualValue = $actualApiRequestObject->getStoragePool(); + $this->assertProtobufEquals($storagePool, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createStoragePoolTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createStoragePoolExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createStoragePoolTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $storagePoolId = 'storagePoolId909234778'; + $storagePool = new StoragePool(); + $storagePoolServiceLevel = ServiceLevel::SERVICE_LEVEL_UNSPECIFIED; + $storagePool->setServiceLevel($storagePoolServiceLevel); + $storagePoolCapacityGib = 1260910865; + $storagePool->setCapacityGib($storagePoolCapacityGib); + $storagePoolNetwork = $gapicClient->networkName('[PROJECT]', '[NETWORK]'); + $storagePool->setNetwork($storagePoolNetwork); + $request = (new CreateStoragePoolRequest()) + ->setParent($formattedParent) + ->setStoragePoolId($storagePoolId) + ->setStoragePool($storagePool); + $response = $gapicClient->createStoragePool($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createStoragePoolTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createVolumeTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createVolumeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $stateDetails = 'stateDetails632437908'; + $shareName = 'shareName-1788152085'; + $psaRange = 'psaRange1004849276'; + $storagePool = 'storagePool897344352'; + $network = 'network1843485230'; + $capacityGib = 498394811; + $unixPermissions = 'unixPermissions1137975373'; + $description = 'description-1724546052'; + $snapReserve = -1.42958764E8; + $snapshotDirectory = true; + $usedGib = 279083970; + $kerberosEnabled = false; + $ldapEnabled = false; + $activeDirectory = 'activeDirectory475662452'; + $kmsConfig = 'kmsConfig917255152'; + $hasReplication = false; + $largeCapacity = true; + $multipleEndpoints = false; + $replicaZone = 'replicaZone1404354259'; + $zone = 'zone3744684'; + $coldTierSizeGib = 212809252; + $expectedResponse = new Volume(); + $expectedResponse->setName($name); + $expectedResponse->setStateDetails($stateDetails); + $expectedResponse->setShareName($shareName); + $expectedResponse->setPsaRange($psaRange); + $expectedResponse->setStoragePool($storagePool); + $expectedResponse->setNetwork($network); + $expectedResponse->setCapacityGib($capacityGib); + $expectedResponse->setUnixPermissions($unixPermissions); + $expectedResponse->setDescription($description); + $expectedResponse->setSnapReserve($snapReserve); + $expectedResponse->setSnapshotDirectory($snapshotDirectory); + $expectedResponse->setUsedGib($usedGib); + $expectedResponse->setKerberosEnabled($kerberosEnabled); + $expectedResponse->setLdapEnabled($ldapEnabled); + $expectedResponse->setActiveDirectory($activeDirectory); + $expectedResponse->setKmsConfig($kmsConfig); + $expectedResponse->setHasReplication($hasReplication); + $expectedResponse->setLargeCapacity($largeCapacity); + $expectedResponse->setMultipleEndpoints($multipleEndpoints); + $expectedResponse->setReplicaZone($replicaZone); + $expectedResponse->setZone($zone); + $expectedResponse->setColdTierSizeGib($coldTierSizeGib); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createVolumeTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $volumeId = 'volumeId-2128282528'; + $volume = new Volume(); + $volumeShareName = 'volumeShareName1564593424'; + $volume->setShareName($volumeShareName); + $volumeStoragePool = $gapicClient->storagePoolName('[PROJECT]', '[LOCATION]', '[STORAGE_POOL]'); + $volume->setStoragePool($volumeStoragePool); + $volumeCapacityGib = 1491387092; + $volume->setCapacityGib($volumeCapacityGib); + $volumeProtocols = []; + $volume->setProtocols($volumeProtocols); + $request = (new CreateVolumeRequest()) + ->setParent($formattedParent) + ->setVolumeId($volumeId) + ->setVolume($volume); + $response = $gapicClient->createVolume($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/CreateVolume', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getVolumeId(); + $this->assertProtobufEquals($volumeId, $actualValue); + $actualValue = $actualApiRequestObject->getVolume(); + $this->assertProtobufEquals($volume, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createVolumeTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createVolumeExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createVolumeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $volumeId = 'volumeId-2128282528'; + $volume = new Volume(); + $volumeShareName = 'volumeShareName1564593424'; + $volume->setShareName($volumeShareName); + $volumeStoragePool = $gapicClient->storagePoolName('[PROJECT]', '[LOCATION]', '[STORAGE_POOL]'); + $volume->setStoragePool($volumeStoragePool); + $volumeCapacityGib = 1491387092; + $volume->setCapacityGib($volumeCapacityGib); + $volumeProtocols = []; + $volume->setProtocols($volumeProtocols); + $request = (new CreateVolumeRequest()) + ->setParent($formattedParent) + ->setVolumeId($volumeId) + ->setVolume($volume); + $response = $gapicClient->createVolume($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createVolumeTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteActiveDirectoryTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteActiveDirectoryTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteActiveDirectoryTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->activeDirectoryName('[PROJECT]', '[LOCATION]', '[ACTIVE_DIRECTORY]'); + $request = (new DeleteActiveDirectoryRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteActiveDirectory($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/DeleteActiveDirectory', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteActiveDirectoryTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteActiveDirectoryExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteActiveDirectoryTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->activeDirectoryName('[PROJECT]', '[LOCATION]', '[ACTIVE_DIRECTORY]'); + $request = (new DeleteActiveDirectoryRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteActiveDirectory($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteActiveDirectoryTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteBackupTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteBackupTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteBackupTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP_VAULT]', '[BACKUP]'); + $request = (new DeleteBackupRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteBackup($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/DeleteBackup', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteBackupTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteBackupExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteBackupTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP_VAULT]', '[BACKUP]'); + $request = (new DeleteBackupRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteBackup($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteBackupTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteBackupPolicyTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteBackupPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteBackupPolicyTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->backupPolicyName('[PROJECT]', '[LOCATION]', '[BACKUP_POLICY]'); + $request = (new DeleteBackupPolicyRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteBackupPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/DeleteBackupPolicy', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteBackupPolicyTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteBackupPolicyExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteBackupPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->backupPolicyName('[PROJECT]', '[LOCATION]', '[BACKUP_POLICY]'); + $request = (new DeleteBackupPolicyRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteBackupPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteBackupPolicyTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteBackupVaultTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteBackupVaultTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteBackupVaultTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->backupVaultName('[PROJECT]', '[LOCATION]', '[BACKUP_VAULT]'); + $request = (new DeleteBackupVaultRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteBackupVault($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/DeleteBackupVault', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteBackupVaultTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteBackupVaultExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteBackupVaultTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->backupVaultName('[PROJECT]', '[LOCATION]', '[BACKUP_VAULT]'); + $request = (new DeleteBackupVaultRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteBackupVault($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteBackupVaultTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteKmsConfigTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteKmsConfigTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteKmsConfigTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->kmsConfigName('[PROJECT]', '[LOCATION]', '[KMS_CONFIG]'); + $request = (new DeleteKmsConfigRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteKmsConfig($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/DeleteKmsConfig', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteKmsConfigTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteKmsConfigExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteKmsConfigTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->kmsConfigName('[PROJECT]', '[LOCATION]', '[KMS_CONFIG]'); + $request = (new DeleteKmsConfigRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteKmsConfig($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteKmsConfigTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteReplicationTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteReplicationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteReplicationTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->replicationName('[PROJECT]', '[LOCATION]', '[VOLUME]', '[REPLICATION]'); + $request = (new DeleteReplicationRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteReplication($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/DeleteReplication', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteReplicationTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteReplicationExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteReplicationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->replicationName('[PROJECT]', '[LOCATION]', '[VOLUME]', '[REPLICATION]'); + $request = (new DeleteReplicationRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteReplication($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteReplicationTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteSnapshotTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteSnapshotTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteSnapshotTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->snapshotName('[PROJECT]', '[LOCATION]', '[VOLUME]', '[SNAPSHOT]'); + $request = (new DeleteSnapshotRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteSnapshot($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/DeleteSnapshot', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteSnapshotTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteSnapshotExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteSnapshotTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->snapshotName('[PROJECT]', '[LOCATION]', '[VOLUME]', '[SNAPSHOT]'); + $request = (new DeleteSnapshotRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteSnapshot($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteSnapshotTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteStoragePoolTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteStoragePoolTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteStoragePoolTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->storagePoolName('[PROJECT]', '[LOCATION]', '[STORAGE_POOL]'); + $request = (new DeleteStoragePoolRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteStoragePool($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/DeleteStoragePool', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteStoragePoolTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteStoragePoolExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteStoragePoolTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->storagePoolName('[PROJECT]', '[LOCATION]', '[STORAGE_POOL]'); + $request = (new DeleteStoragePoolRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteStoragePool($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteStoragePoolTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteVolumeTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteVolumeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteVolumeTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); + $request = (new DeleteVolumeRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteVolume($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/DeleteVolume', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteVolumeTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteVolumeExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteVolumeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); + $request = (new DeleteVolumeRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteVolume($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteVolumeTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function encryptVolumesTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/encryptVolumesTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $cryptoKeyName = 'cryptoKeyName-184663511'; + $stateDetails = 'stateDetails632437908'; + $description = 'description-1724546052'; + $instructions = 'instructions757376421'; + $serviceAccount = 'serviceAccount-1948028253'; + $expectedResponse = new KmsConfig(); + $expectedResponse->setName($name2); + $expectedResponse->setCryptoKeyName($cryptoKeyName); + $expectedResponse->setStateDetails($stateDetails); + $expectedResponse->setDescription($description); + $expectedResponse->setInstructions($instructions); + $expectedResponse->setServiceAccount($serviceAccount); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/encryptVolumesTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->kmsConfigName('[PROJECT]', '[LOCATION]', '[KMS_CONFIG]'); + $request = (new EncryptVolumesRequest()) + ->setName($formattedName); + $response = $gapicClient->encryptVolumes($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/EncryptVolumes', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/encryptVolumesTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function encryptVolumesExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/encryptVolumesTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->kmsConfigName('[PROJECT]', '[LOCATION]', '[KMS_CONFIG]'); + $request = (new EncryptVolumesRequest()) + ->setName($formattedName); + $response = $gapicClient->encryptVolumes($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/encryptVolumesTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function establishPeeringTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/establishPeeringTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $stateDetails = 'stateDetails632437908'; + $healthy = false; + $destinationVolume = 'destinationVolume-1177512853'; + $description = 'description-1724546052'; + $sourceVolume = 'sourceVolume327497662'; + $clusterLocation = 'clusterLocation-44738470'; + $expectedResponse = new Replication(); + $expectedResponse->setName($name2); + $expectedResponse->setStateDetails($stateDetails); + $expectedResponse->setHealthy($healthy); + $expectedResponse->setDestinationVolume($destinationVolume); + $expectedResponse->setDescription($description); + $expectedResponse->setSourceVolume($sourceVolume); + $expectedResponse->setClusterLocation($clusterLocation); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/establishPeeringTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->replicationName('[PROJECT]', '[LOCATION]', '[VOLUME]', '[REPLICATION]'); + $peerClusterName = 'peerClusterName-1759308435'; + $peerSvmName = 'peerSvmName-1166928515'; + $peerVolumeName = 'peerVolumeName486635827'; + $request = (new EstablishPeeringRequest()) + ->setName($formattedName) + ->setPeerClusterName($peerClusterName) + ->setPeerSvmName($peerSvmName) + ->setPeerVolumeName($peerVolumeName); + $response = $gapicClient->establishPeering($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/EstablishPeering', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualApiRequestObject->getPeerClusterName(); + $this->assertProtobufEquals($peerClusterName, $actualValue); + $actualValue = $actualApiRequestObject->getPeerSvmName(); + $this->assertProtobufEquals($peerSvmName, $actualValue); + $actualValue = $actualApiRequestObject->getPeerVolumeName(); + $this->assertProtobufEquals($peerVolumeName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/establishPeeringTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function establishPeeringExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/establishPeeringTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->replicationName('[PROJECT]', '[LOCATION]', '[VOLUME]', '[REPLICATION]'); + $peerClusterName = 'peerClusterName-1759308435'; + $peerSvmName = 'peerSvmName-1166928515'; + $peerVolumeName = 'peerVolumeName486635827'; + $request = (new EstablishPeeringRequest()) + ->setName($formattedName) + ->setPeerClusterName($peerClusterName) + ->setPeerSvmName($peerSvmName) + ->setPeerVolumeName($peerVolumeName); + $response = $gapicClient->establishPeering($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/establishPeeringTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getActiveDirectoryTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $domain = 'domain-1326197564'; + $site = 'site3530567'; + $dns = 'dns99625'; + $netBiosPrefix = 'netBiosPrefix865554756'; + $organizationalUnit = 'organizationalUnit-694432635'; + $aesEncryption = false; + $username = 'username-265713450'; + $password = 'password1216985755'; + $kdcHostname = 'kdcHostname-863813976'; + $kdcIp = 'kdcIp-1136252068'; + $nfsUsersWithLdap = false; + $description = 'description-1724546052'; + $ldapSigning = false; + $encryptDcConnections = false; + $stateDetails = 'stateDetails632437908'; + $expectedResponse = new ActiveDirectory(); + $expectedResponse->setName($name2); + $expectedResponse->setDomain($domain); + $expectedResponse->setSite($site); + $expectedResponse->setDns($dns); + $expectedResponse->setNetBiosPrefix($netBiosPrefix); + $expectedResponse->setOrganizationalUnit($organizationalUnit); + $expectedResponse->setAesEncryption($aesEncryption); + $expectedResponse->setUsername($username); + $expectedResponse->setPassword($password); + $expectedResponse->setKdcHostname($kdcHostname); + $expectedResponse->setKdcIp($kdcIp); + $expectedResponse->setNfsUsersWithLdap($nfsUsersWithLdap); + $expectedResponse->setDescription($description); + $expectedResponse->setLdapSigning($ldapSigning); + $expectedResponse->setEncryptDcConnections($encryptDcConnections); + $expectedResponse->setStateDetails($stateDetails); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->activeDirectoryName('[PROJECT]', '[LOCATION]', '[ACTIVE_DIRECTORY]'); + $request = (new GetActiveDirectoryRequest()) + ->setName($formattedName); + $response = $gapicClient->getActiveDirectory($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/GetActiveDirectory', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getActiveDirectoryExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->activeDirectoryName('[PROJECT]', '[LOCATION]', '[ACTIVE_DIRECTORY]'); + $request = (new GetActiveDirectoryRequest()) + ->setName($formattedName); + try { + $gapicClient->getActiveDirectory($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getBackupTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $volumeUsageBytes = 962433704; + $sourceVolume = 'sourceVolume327497662'; + $sourceSnapshot = 'sourceSnapshot-947679896'; + $chainStorageBytes = 1614651561; + $expectedResponse = new Backup(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setVolumeUsageBytes($volumeUsageBytes); + $expectedResponse->setSourceVolume($sourceVolume); + $expectedResponse->setSourceSnapshot($sourceSnapshot); + $expectedResponse->setChainStorageBytes($chainStorageBytes); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP_VAULT]', '[BACKUP]'); + $request = (new GetBackupRequest()) + ->setName($formattedName); + $response = $gapicClient->getBackup($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/GetBackup', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getBackupExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP_VAULT]', '[BACKUP]'); + $request = (new GetBackupRequest()) + ->setName($formattedName); + try { + $gapicClient->getBackup($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getBackupPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $dailyBackupLimit = 532629348; + $weeklyBackupLimit = 2075144708; + $monthlyBackupLimit = 1253809680; + $description = 'description-1724546052'; + $enabled = false; + $assignedVolumeCount = 396892795; + $expectedResponse = new BackupPolicy(); + $expectedResponse->setName($name2); + $expectedResponse->setDailyBackupLimit($dailyBackupLimit); + $expectedResponse->setWeeklyBackupLimit($weeklyBackupLimit); + $expectedResponse->setMonthlyBackupLimit($monthlyBackupLimit); + $expectedResponse->setDescription($description); + $expectedResponse->setEnabled($enabled); + $expectedResponse->setAssignedVolumeCount($assignedVolumeCount); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->backupPolicyName('[PROJECT]', '[LOCATION]', '[BACKUP_POLICY]'); + $request = (new GetBackupPolicyRequest()) + ->setName($formattedName); + $response = $gapicClient->getBackupPolicy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/GetBackupPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getBackupPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->backupPolicyName('[PROJECT]', '[LOCATION]', '[BACKUP_POLICY]'); + $request = (new GetBackupPolicyRequest()) + ->setName($formattedName); + try { + $gapicClient->getBackupPolicy($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getBackupVaultTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $expectedResponse = new BackupVault(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->backupVaultName('[PROJECT]', '[LOCATION]', '[BACKUP_VAULT]'); + $request = (new GetBackupVaultRequest()) + ->setName($formattedName); + $response = $gapicClient->getBackupVault($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/GetBackupVault', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getBackupVaultExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->backupVaultName('[PROJECT]', '[LOCATION]', '[BACKUP_VAULT]'); + $request = (new GetBackupVaultRequest()) + ->setName($formattedName); + try { + $gapicClient->getBackupVault($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getKmsConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $cryptoKeyName = 'cryptoKeyName-184663511'; + $stateDetails = 'stateDetails632437908'; + $description = 'description-1724546052'; + $instructions = 'instructions757376421'; + $serviceAccount = 'serviceAccount-1948028253'; + $expectedResponse = new KmsConfig(); + $expectedResponse->setName($name2); + $expectedResponse->setCryptoKeyName($cryptoKeyName); + $expectedResponse->setStateDetails($stateDetails); + $expectedResponse->setDescription($description); + $expectedResponse->setInstructions($instructions); + $expectedResponse->setServiceAccount($serviceAccount); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->kmsConfigName('[PROJECT]', '[LOCATION]', '[KMS_CONFIG]'); + $request = (new GetKmsConfigRequest()) + ->setName($formattedName); + $response = $gapicClient->getKmsConfig($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/GetKmsConfig', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getKmsConfigExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->kmsConfigName('[PROJECT]', '[LOCATION]', '[KMS_CONFIG]'); + $request = (new GetKmsConfigRequest()) + ->setName($formattedName); + try { + $gapicClient->getKmsConfig($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getReplicationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $stateDetails = 'stateDetails632437908'; + $healthy = false; + $destinationVolume = 'destinationVolume-1177512853'; + $description = 'description-1724546052'; + $sourceVolume = 'sourceVolume327497662'; + $clusterLocation = 'clusterLocation-44738470'; + $expectedResponse = new Replication(); + $expectedResponse->setName($name2); + $expectedResponse->setStateDetails($stateDetails); + $expectedResponse->setHealthy($healthy); + $expectedResponse->setDestinationVolume($destinationVolume); + $expectedResponse->setDescription($description); + $expectedResponse->setSourceVolume($sourceVolume); + $expectedResponse->setClusterLocation($clusterLocation); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->replicationName('[PROJECT]', '[LOCATION]', '[VOLUME]', '[REPLICATION]'); + $request = (new GetReplicationRequest()) + ->setName($formattedName); + $response = $gapicClient->getReplication($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/GetReplication', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getReplicationExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->replicationName('[PROJECT]', '[LOCATION]', '[VOLUME]', '[REPLICATION]'); + $request = (new GetReplicationRequest()) + ->setName($formattedName); + try { + $gapicClient->getReplication($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getSnapshotTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $stateDetails = 'stateDetails632437908'; + $description = 'description-1724546052'; + $usedBytes = -1.91584322E8; + $expectedResponse = new Snapshot(); + $expectedResponse->setName($name2); + $expectedResponse->setStateDetails($stateDetails); + $expectedResponse->setDescription($description); + $expectedResponse->setUsedBytes($usedBytes); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->snapshotName('[PROJECT]', '[LOCATION]', '[VOLUME]', '[SNAPSHOT]'); + $request = (new GetSnapshotRequest()) + ->setName($formattedName); + $response = $gapicClient->getSnapshot($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/GetSnapshot', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getSnapshotExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->snapshotName('[PROJECT]', '[LOCATION]', '[VOLUME]', '[SNAPSHOT]'); + $request = (new GetSnapshotRequest()) + ->setName($formattedName); + try { + $gapicClient->getSnapshot($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getStoragePoolTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $capacityGib = 498394811; + $volumeCapacityGib = 643777472; + $volumeCount = 1362665558; + $stateDetails = 'stateDetails632437908'; + $description = 'description-1724546052'; + $network = 'network1843485230'; + $activeDirectory = 'activeDirectory475662452'; + $kmsConfig = 'kmsConfig917255152'; + $ldapEnabled = false; + $psaRange = 'psaRange1004849276'; + $globalAccessAllowed = false; + $allowAutoTiering = true; + $replicaZone = 'replicaZone1404354259'; + $zone = 'zone3744684'; + $expectedResponse = new StoragePool(); + $expectedResponse->setName($name2); + $expectedResponse->setCapacityGib($capacityGib); + $expectedResponse->setVolumeCapacityGib($volumeCapacityGib); + $expectedResponse->setVolumeCount($volumeCount); + $expectedResponse->setStateDetails($stateDetails); + $expectedResponse->setDescription($description); + $expectedResponse->setNetwork($network); + $expectedResponse->setActiveDirectory($activeDirectory); + $expectedResponse->setKmsConfig($kmsConfig); + $expectedResponse->setLdapEnabled($ldapEnabled); + $expectedResponse->setPsaRange($psaRange); + $expectedResponse->setGlobalAccessAllowed($globalAccessAllowed); + $expectedResponse->setAllowAutoTiering($allowAutoTiering); + $expectedResponse->setReplicaZone($replicaZone); + $expectedResponse->setZone($zone); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->storagePoolName('[PROJECT]', '[LOCATION]', '[STORAGE_POOL]'); + $request = (new GetStoragePoolRequest()) + ->setName($formattedName); + $response = $gapicClient->getStoragePool($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/GetStoragePool', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getStoragePoolExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->storagePoolName('[PROJECT]', '[LOCATION]', '[STORAGE_POOL]'); + $request = (new GetStoragePoolRequest()) + ->setName($formattedName); + try { + $gapicClient->getStoragePool($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getVolumeTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $stateDetails = 'stateDetails632437908'; + $shareName = 'shareName-1788152085'; + $psaRange = 'psaRange1004849276'; + $storagePool = 'storagePool897344352'; + $network = 'network1843485230'; + $capacityGib = 498394811; + $unixPermissions = 'unixPermissions1137975373'; + $description = 'description-1724546052'; + $snapReserve = -1.42958764E8; + $snapshotDirectory = true; + $usedGib = 279083970; + $kerberosEnabled = false; + $ldapEnabled = false; + $activeDirectory = 'activeDirectory475662452'; + $kmsConfig = 'kmsConfig917255152'; + $hasReplication = false; + $largeCapacity = true; + $multipleEndpoints = false; + $replicaZone = 'replicaZone1404354259'; + $zone = 'zone3744684'; + $coldTierSizeGib = 212809252; + $expectedResponse = new Volume(); + $expectedResponse->setName($name2); + $expectedResponse->setStateDetails($stateDetails); + $expectedResponse->setShareName($shareName); + $expectedResponse->setPsaRange($psaRange); + $expectedResponse->setStoragePool($storagePool); + $expectedResponse->setNetwork($network); + $expectedResponse->setCapacityGib($capacityGib); + $expectedResponse->setUnixPermissions($unixPermissions); + $expectedResponse->setDescription($description); + $expectedResponse->setSnapReserve($snapReserve); + $expectedResponse->setSnapshotDirectory($snapshotDirectory); + $expectedResponse->setUsedGib($usedGib); + $expectedResponse->setKerberosEnabled($kerberosEnabled); + $expectedResponse->setLdapEnabled($ldapEnabled); + $expectedResponse->setActiveDirectory($activeDirectory); + $expectedResponse->setKmsConfig($kmsConfig); + $expectedResponse->setHasReplication($hasReplication); + $expectedResponse->setLargeCapacity($largeCapacity); + $expectedResponse->setMultipleEndpoints($multipleEndpoints); + $expectedResponse->setReplicaZone($replicaZone); + $expectedResponse->setZone($zone); + $expectedResponse->setColdTierSizeGib($coldTierSizeGib); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); + $request = (new GetVolumeRequest()) + ->setName($formattedName); + $response = $gapicClient->getVolume($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/GetVolume', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getVolumeExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); + $request = (new GetVolumeRequest()) + ->setName($formattedName); + try { + $gapicClient->getVolume($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listActiveDirectoriesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $activeDirectoriesElement = new ActiveDirectory(); + $activeDirectories = [ + $activeDirectoriesElement, + ]; + $expectedResponse = new ListActiveDirectoriesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setActiveDirectories($activeDirectories); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListActiveDirectoriesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listActiveDirectories($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getActiveDirectories()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/ListActiveDirectories', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listActiveDirectoriesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListActiveDirectoriesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listActiveDirectories($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listBackupPoliciesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $backupPoliciesElement = new BackupPolicy(); + $backupPolicies = [ + $backupPoliciesElement, + ]; + $expectedResponse = new ListBackupPoliciesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setBackupPolicies($backupPolicies); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListBackupPoliciesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listBackupPolicies($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getBackupPolicies()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/ListBackupPolicies', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listBackupPoliciesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListBackupPoliciesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listBackupPolicies($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listBackupVaultsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $backupVaultsElement = new BackupVault(); + $backupVaults = [ + $backupVaultsElement, + ]; + $expectedResponse = new ListBackupVaultsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setBackupVaults($backupVaults); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListBackupVaultsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listBackupVaults($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getBackupVaults()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/ListBackupVaults', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listBackupVaultsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListBackupVaultsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listBackupVaults($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listBackupsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $backupsElement = new Backup(); + $backups = [ + $backupsElement, + ]; + $expectedResponse = new ListBackupsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setBackups($backups); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->backupVaultName('[PROJECT]', '[LOCATION]', '[BACKUP_VAULT]'); + $request = (new ListBackupsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listBackups($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getBackups()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/ListBackups', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listBackupsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->backupVaultName('[PROJECT]', '[LOCATION]', '[BACKUP_VAULT]'); + $request = (new ListBackupsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listBackups($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listKmsConfigsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $kmsConfigsElement = new KmsConfig(); + $kmsConfigs = [ + $kmsConfigsElement, + ]; + $expectedResponse = new ListKmsConfigsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setKmsConfigs($kmsConfigs); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListKmsConfigsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listKmsConfigs($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getKmsConfigs()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/ListKmsConfigs', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listKmsConfigsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListKmsConfigsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listKmsConfigs($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listReplicationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $replicationsElement = new Replication(); + $replications = [ + $replicationsElement, + ]; + $expectedResponse = new ListReplicationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setReplications($replications); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); + $request = (new ListReplicationsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listReplications($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getReplications()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/ListReplications', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listReplicationsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); + $request = (new ListReplicationsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listReplications($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listSnapshotsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $snapshotsElement = new Snapshot(); + $snapshots = [ + $snapshotsElement, + ]; + $expectedResponse = new ListSnapshotsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setSnapshots($snapshots); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); + $request = (new ListSnapshotsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listSnapshots($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getSnapshots()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/ListSnapshots', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listSnapshotsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); + $request = (new ListSnapshotsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listSnapshots($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listStoragePoolsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $storagePoolsElement = new StoragePool(); + $storagePools = [ + $storagePoolsElement, + ]; + $expectedResponse = new ListStoragePoolsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setStoragePools($storagePools); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListStoragePoolsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listStoragePools($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getStoragePools()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/ListStoragePools', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listStoragePoolsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListStoragePoolsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listStoragePools($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listVolumesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $volumesElement = new Volume(); + $volumes = [ + $volumesElement, + ]; + $expectedResponse = new ListVolumesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setVolumes($volumes); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListVolumesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listVolumes($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getVolumes()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/ListVolumes', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listVolumesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListVolumesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listVolumes($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function resumeReplicationTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/resumeReplicationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $stateDetails = 'stateDetails632437908'; + $healthy = false; + $destinationVolume = 'destinationVolume-1177512853'; + $description = 'description-1724546052'; + $sourceVolume = 'sourceVolume327497662'; + $clusterLocation = 'clusterLocation-44738470'; + $expectedResponse = new Replication(); + $expectedResponse->setName($name2); + $expectedResponse->setStateDetails($stateDetails); + $expectedResponse->setHealthy($healthy); + $expectedResponse->setDestinationVolume($destinationVolume); + $expectedResponse->setDescription($description); + $expectedResponse->setSourceVolume($sourceVolume); + $expectedResponse->setClusterLocation($clusterLocation); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/resumeReplicationTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->replicationName('[PROJECT]', '[LOCATION]', '[VOLUME]', '[REPLICATION]'); + $request = (new ResumeReplicationRequest()) + ->setName($formattedName); + $response = $gapicClient->resumeReplication($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/ResumeReplication', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/resumeReplicationTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function resumeReplicationExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/resumeReplicationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->replicationName('[PROJECT]', '[LOCATION]', '[VOLUME]', '[REPLICATION]'); + $request = (new ResumeReplicationRequest()) + ->setName($formattedName); + $response = $gapicClient->resumeReplication($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/resumeReplicationTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function reverseReplicationDirectionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/reverseReplicationDirectionTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $stateDetails = 'stateDetails632437908'; + $healthy = false; + $destinationVolume = 'destinationVolume-1177512853'; + $description = 'description-1724546052'; + $sourceVolume = 'sourceVolume327497662'; + $clusterLocation = 'clusterLocation-44738470'; + $expectedResponse = new Replication(); + $expectedResponse->setName($name2); + $expectedResponse->setStateDetails($stateDetails); + $expectedResponse->setHealthy($healthy); + $expectedResponse->setDestinationVolume($destinationVolume); + $expectedResponse->setDescription($description); + $expectedResponse->setSourceVolume($sourceVolume); + $expectedResponse->setClusterLocation($clusterLocation); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/reverseReplicationDirectionTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->replicationName('[PROJECT]', '[LOCATION]', '[VOLUME]', '[REPLICATION]'); + $request = (new ReverseReplicationDirectionRequest()) + ->setName($formattedName); + $response = $gapicClient->reverseReplicationDirection($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/ReverseReplicationDirection', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/reverseReplicationDirectionTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function reverseReplicationDirectionExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/reverseReplicationDirectionTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->replicationName('[PROJECT]', '[LOCATION]', '[VOLUME]', '[REPLICATION]'); + $request = (new ReverseReplicationDirectionRequest()) + ->setName($formattedName); + $response = $gapicClient->reverseReplicationDirection($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/reverseReplicationDirectionTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function revertVolumeTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/revertVolumeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $stateDetails = 'stateDetails632437908'; + $shareName = 'shareName-1788152085'; + $psaRange = 'psaRange1004849276'; + $storagePool = 'storagePool897344352'; + $network = 'network1843485230'; + $capacityGib = 498394811; + $unixPermissions = 'unixPermissions1137975373'; + $description = 'description-1724546052'; + $snapReserve = -1.42958764E8; + $snapshotDirectory = true; + $usedGib = 279083970; + $kerberosEnabled = false; + $ldapEnabled = false; + $activeDirectory = 'activeDirectory475662452'; + $kmsConfig = 'kmsConfig917255152'; + $hasReplication = false; + $largeCapacity = true; + $multipleEndpoints = false; + $replicaZone = 'replicaZone1404354259'; + $zone = 'zone3744684'; + $coldTierSizeGib = 212809252; + $expectedResponse = new Volume(); + $expectedResponse->setName($name2); + $expectedResponse->setStateDetails($stateDetails); + $expectedResponse->setShareName($shareName); + $expectedResponse->setPsaRange($psaRange); + $expectedResponse->setStoragePool($storagePool); + $expectedResponse->setNetwork($network); + $expectedResponse->setCapacityGib($capacityGib); + $expectedResponse->setUnixPermissions($unixPermissions); + $expectedResponse->setDescription($description); + $expectedResponse->setSnapReserve($snapReserve); + $expectedResponse->setSnapshotDirectory($snapshotDirectory); + $expectedResponse->setUsedGib($usedGib); + $expectedResponse->setKerberosEnabled($kerberosEnabled); + $expectedResponse->setLdapEnabled($ldapEnabled); + $expectedResponse->setActiveDirectory($activeDirectory); + $expectedResponse->setKmsConfig($kmsConfig); + $expectedResponse->setHasReplication($hasReplication); + $expectedResponse->setLargeCapacity($largeCapacity); + $expectedResponse->setMultipleEndpoints($multipleEndpoints); + $expectedResponse->setReplicaZone($replicaZone); + $expectedResponse->setZone($zone); + $expectedResponse->setColdTierSizeGib($coldTierSizeGib); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/revertVolumeTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); + $snapshotId = 'snapshotId-168585866'; + $request = (new RevertVolumeRequest()) + ->setName($formattedName) + ->setSnapshotId($snapshotId); + $response = $gapicClient->revertVolume($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/RevertVolume', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualApiRequestObject->getSnapshotId(); + $this->assertProtobufEquals($snapshotId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/revertVolumeTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function revertVolumeExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/revertVolumeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); + $snapshotId = 'snapshotId-168585866'; + $request = (new RevertVolumeRequest()) + ->setName($formattedName) + ->setSnapshotId($snapshotId); + $response = $gapicClient->revertVolume($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/revertVolumeTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function stopReplicationTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/stopReplicationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $stateDetails = 'stateDetails632437908'; + $healthy = false; + $destinationVolume = 'destinationVolume-1177512853'; + $description = 'description-1724546052'; + $sourceVolume = 'sourceVolume327497662'; + $clusterLocation = 'clusterLocation-44738470'; + $expectedResponse = new Replication(); + $expectedResponse->setName($name2); + $expectedResponse->setStateDetails($stateDetails); + $expectedResponse->setHealthy($healthy); + $expectedResponse->setDestinationVolume($destinationVolume); + $expectedResponse->setDescription($description); + $expectedResponse->setSourceVolume($sourceVolume); + $expectedResponse->setClusterLocation($clusterLocation); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/stopReplicationTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->replicationName('[PROJECT]', '[LOCATION]', '[VOLUME]', '[REPLICATION]'); + $request = (new StopReplicationRequest()) + ->setName($formattedName); + $response = $gapicClient->stopReplication($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/StopReplication', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/stopReplicationTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function stopReplicationExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/stopReplicationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->replicationName('[PROJECT]', '[LOCATION]', '[VOLUME]', '[REPLICATION]'); + $request = (new StopReplicationRequest()) + ->setName($formattedName); + $response = $gapicClient->stopReplication($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/stopReplicationTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function switchActiveReplicaZoneTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/switchActiveReplicaZoneTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $capacityGib = 498394811; + $volumeCapacityGib = 643777472; + $volumeCount = 1362665558; + $stateDetails = 'stateDetails632437908'; + $description = 'description-1724546052'; + $network = 'network1843485230'; + $activeDirectory = 'activeDirectory475662452'; + $kmsConfig = 'kmsConfig917255152'; + $ldapEnabled = false; + $psaRange = 'psaRange1004849276'; + $globalAccessAllowed = false; + $allowAutoTiering = true; + $replicaZone = 'replicaZone1404354259'; + $zone = 'zone3744684'; + $expectedResponse = new StoragePool(); + $expectedResponse->setName($name2); + $expectedResponse->setCapacityGib($capacityGib); + $expectedResponse->setVolumeCapacityGib($volumeCapacityGib); + $expectedResponse->setVolumeCount($volumeCount); + $expectedResponse->setStateDetails($stateDetails); + $expectedResponse->setDescription($description); + $expectedResponse->setNetwork($network); + $expectedResponse->setActiveDirectory($activeDirectory); + $expectedResponse->setKmsConfig($kmsConfig); + $expectedResponse->setLdapEnabled($ldapEnabled); + $expectedResponse->setPsaRange($psaRange); + $expectedResponse->setGlobalAccessAllowed($globalAccessAllowed); + $expectedResponse->setAllowAutoTiering($allowAutoTiering); + $expectedResponse->setReplicaZone($replicaZone); + $expectedResponse->setZone($zone); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/switchActiveReplicaZoneTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->storagePoolName('[PROJECT]', '[LOCATION]', '[STORAGE_POOL]'); + $request = (new SwitchActiveReplicaZoneRequest()) + ->setName($formattedName); + $response = $gapicClient->switchActiveReplicaZone($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/SwitchActiveReplicaZone', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/switchActiveReplicaZoneTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function switchActiveReplicaZoneExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/switchActiveReplicaZoneTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->storagePoolName('[PROJECT]', '[LOCATION]', '[STORAGE_POOL]'); + $request = (new SwitchActiveReplicaZoneRequest()) + ->setName($formattedName); + $response = $gapicClient->switchActiveReplicaZone($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/switchActiveReplicaZoneTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function syncReplicationTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/syncReplicationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $stateDetails = 'stateDetails632437908'; + $healthy = false; + $destinationVolume = 'destinationVolume-1177512853'; + $description = 'description-1724546052'; + $sourceVolume = 'sourceVolume327497662'; + $clusterLocation = 'clusterLocation-44738470'; + $expectedResponse = new Replication(); + $expectedResponse->setName($name2); + $expectedResponse->setStateDetails($stateDetails); + $expectedResponse->setHealthy($healthy); + $expectedResponse->setDestinationVolume($destinationVolume); + $expectedResponse->setDescription($description); + $expectedResponse->setSourceVolume($sourceVolume); + $expectedResponse->setClusterLocation($clusterLocation); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/syncReplicationTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->replicationName('[PROJECT]', '[LOCATION]', '[VOLUME]', '[REPLICATION]'); + $request = (new SyncReplicationRequest()) + ->setName($formattedName); + $response = $gapicClient->syncReplication($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/SyncReplication', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/syncReplicationTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function syncReplicationExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/syncReplicationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->replicationName('[PROJECT]', '[LOCATION]', '[VOLUME]', '[REPLICATION]'); + $request = (new SyncReplicationRequest()) + ->setName($formattedName); + $response = $gapicClient->syncReplication($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/syncReplicationTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateActiveDirectoryTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateActiveDirectoryTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $domain = 'domain-1326197564'; + $site = 'site3530567'; + $dns = 'dns99625'; + $netBiosPrefix = 'netBiosPrefix865554756'; + $organizationalUnit = 'organizationalUnit-694432635'; + $aesEncryption = false; + $username = 'username-265713450'; + $password = 'password1216985755'; + $kdcHostname = 'kdcHostname-863813976'; + $kdcIp = 'kdcIp-1136252068'; + $nfsUsersWithLdap = false; + $description = 'description-1724546052'; + $ldapSigning = false; + $encryptDcConnections = false; + $stateDetails = 'stateDetails632437908'; + $expectedResponse = new ActiveDirectory(); + $expectedResponse->setName($name); + $expectedResponse->setDomain($domain); + $expectedResponse->setSite($site); + $expectedResponse->setDns($dns); + $expectedResponse->setNetBiosPrefix($netBiosPrefix); + $expectedResponse->setOrganizationalUnit($organizationalUnit); + $expectedResponse->setAesEncryption($aesEncryption); + $expectedResponse->setUsername($username); + $expectedResponse->setPassword($password); + $expectedResponse->setKdcHostname($kdcHostname); + $expectedResponse->setKdcIp($kdcIp); + $expectedResponse->setNfsUsersWithLdap($nfsUsersWithLdap); + $expectedResponse->setDescription($description); + $expectedResponse->setLdapSigning($ldapSigning); + $expectedResponse->setEncryptDcConnections($encryptDcConnections); + $expectedResponse->setStateDetails($stateDetails); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateActiveDirectoryTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $updateMask = new FieldMask(); + $activeDirectory = new ActiveDirectory(); + $activeDirectoryDomain = 'activeDirectoryDomain1710368171'; + $activeDirectory->setDomain($activeDirectoryDomain); + $activeDirectoryDns = 'activeDirectoryDns1090270626'; + $activeDirectory->setDns($activeDirectoryDns); + $activeDirectoryNetBiosPrefix = 'activeDirectoryNetBiosPrefix-1870358125'; + $activeDirectory->setNetBiosPrefix($activeDirectoryNetBiosPrefix); + $activeDirectoryUsername = 'activeDirectoryUsername1591163901'; + $activeDirectory->setUsername($activeDirectoryUsername); + $activeDirectoryPassword = 'activeDirectoryPassword-1221104190'; + $activeDirectory->setPassword($activeDirectoryPassword); + $request = (new UpdateActiveDirectoryRequest()) + ->setUpdateMask($updateMask) + ->setActiveDirectory($activeDirectory); + $response = $gapicClient->updateActiveDirectory($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/UpdateActiveDirectory', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $actualValue = $actualApiRequestObject->getActiveDirectory(); + $this->assertProtobufEquals($activeDirectory, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateActiveDirectoryTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateActiveDirectoryExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateActiveDirectoryTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $updateMask = new FieldMask(); + $activeDirectory = new ActiveDirectory(); + $activeDirectoryDomain = 'activeDirectoryDomain1710368171'; + $activeDirectory->setDomain($activeDirectoryDomain); + $activeDirectoryDns = 'activeDirectoryDns1090270626'; + $activeDirectory->setDns($activeDirectoryDns); + $activeDirectoryNetBiosPrefix = 'activeDirectoryNetBiosPrefix-1870358125'; + $activeDirectory->setNetBiosPrefix($activeDirectoryNetBiosPrefix); + $activeDirectoryUsername = 'activeDirectoryUsername1591163901'; + $activeDirectory->setUsername($activeDirectoryUsername); + $activeDirectoryPassword = 'activeDirectoryPassword-1221104190'; + $activeDirectory->setPassword($activeDirectoryPassword); + $request = (new UpdateActiveDirectoryRequest()) + ->setUpdateMask($updateMask) + ->setActiveDirectory($activeDirectory); + $response = $gapicClient->updateActiveDirectory($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateActiveDirectoryTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateBackupTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateBackupTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $volumeUsageBytes = 962433704; + $sourceVolume = 'sourceVolume327497662'; + $sourceSnapshot = 'sourceSnapshot-947679896'; + $chainStorageBytes = 1614651561; + $expectedResponse = new Backup(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setVolumeUsageBytes($volumeUsageBytes); + $expectedResponse->setSourceVolume($sourceVolume); + $expectedResponse->setSourceSnapshot($sourceSnapshot); + $expectedResponse->setChainStorageBytes($chainStorageBytes); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateBackupTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $updateMask = new FieldMask(); + $backup = new Backup(); + $request = (new UpdateBackupRequest()) + ->setUpdateMask($updateMask) + ->setBackup($backup); + $response = $gapicClient->updateBackup($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/UpdateBackup', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $actualValue = $actualApiRequestObject->getBackup(); + $this->assertProtobufEquals($backup, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateBackupTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateBackupExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateBackupTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $updateMask = new FieldMask(); + $backup = new Backup(); + $request = (new UpdateBackupRequest()) + ->setUpdateMask($updateMask) + ->setBackup($backup); + $response = $gapicClient->updateBackup($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateBackupTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateBackupPolicyTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateBackupPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $dailyBackupLimit = 532629348; + $weeklyBackupLimit = 2075144708; + $monthlyBackupLimit = 1253809680; + $description = 'description-1724546052'; + $enabled = false; + $assignedVolumeCount = 396892795; + $expectedResponse = new BackupPolicy(); + $expectedResponse->setName($name); + $expectedResponse->setDailyBackupLimit($dailyBackupLimit); + $expectedResponse->setWeeklyBackupLimit($weeklyBackupLimit); + $expectedResponse->setMonthlyBackupLimit($monthlyBackupLimit); + $expectedResponse->setDescription($description); + $expectedResponse->setEnabled($enabled); + $expectedResponse->setAssignedVolumeCount($assignedVolumeCount); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateBackupPolicyTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $updateMask = new FieldMask(); + $backupPolicy = new BackupPolicy(); + $request = (new UpdateBackupPolicyRequest()) + ->setUpdateMask($updateMask) + ->setBackupPolicy($backupPolicy); + $response = $gapicClient->updateBackupPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/UpdateBackupPolicy', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $actualValue = $actualApiRequestObject->getBackupPolicy(); + $this->assertProtobufEquals($backupPolicy, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateBackupPolicyTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateBackupPolicyExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateBackupPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $updateMask = new FieldMask(); + $backupPolicy = new BackupPolicy(); + $request = (new UpdateBackupPolicyRequest()) + ->setUpdateMask($updateMask) + ->setBackupPolicy($backupPolicy); + $response = $gapicClient->updateBackupPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateBackupPolicyTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateBackupVaultTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateBackupVaultTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $expectedResponse = new BackupVault(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateBackupVaultTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $updateMask = new FieldMask(); + $backupVault = new BackupVault(); + $request = (new UpdateBackupVaultRequest()) + ->setUpdateMask($updateMask) + ->setBackupVault($backupVault); + $response = $gapicClient->updateBackupVault($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/UpdateBackupVault', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $actualValue = $actualApiRequestObject->getBackupVault(); + $this->assertProtobufEquals($backupVault, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateBackupVaultTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateBackupVaultExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateBackupVaultTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $updateMask = new FieldMask(); + $backupVault = new BackupVault(); + $request = (new UpdateBackupVaultRequest()) + ->setUpdateMask($updateMask) + ->setBackupVault($backupVault); + $response = $gapicClient->updateBackupVault($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateBackupVaultTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateKmsConfigTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateKmsConfigTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $cryptoKeyName = 'cryptoKeyName-184663511'; + $stateDetails = 'stateDetails632437908'; + $description = 'description-1724546052'; + $instructions = 'instructions757376421'; + $serviceAccount = 'serviceAccount-1948028253'; + $expectedResponse = new KmsConfig(); + $expectedResponse->setName($name); + $expectedResponse->setCryptoKeyName($cryptoKeyName); + $expectedResponse->setStateDetails($stateDetails); + $expectedResponse->setDescription($description); + $expectedResponse->setInstructions($instructions); + $expectedResponse->setServiceAccount($serviceAccount); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateKmsConfigTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $updateMask = new FieldMask(); + $kmsConfig = new KmsConfig(); + $kmsConfigCryptoKeyName = 'kmsConfigCryptoKeyName2110252630'; + $kmsConfig->setCryptoKeyName($kmsConfigCryptoKeyName); + $request = (new UpdateKmsConfigRequest()) + ->setUpdateMask($updateMask) + ->setKmsConfig($kmsConfig); + $response = $gapicClient->updateKmsConfig($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/UpdateKmsConfig', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $actualValue = $actualApiRequestObject->getKmsConfig(); + $this->assertProtobufEquals($kmsConfig, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateKmsConfigTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateKmsConfigExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateKmsConfigTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $updateMask = new FieldMask(); + $kmsConfig = new KmsConfig(); + $kmsConfigCryptoKeyName = 'kmsConfigCryptoKeyName2110252630'; + $kmsConfig->setCryptoKeyName($kmsConfigCryptoKeyName); + $request = (new UpdateKmsConfigRequest()) + ->setUpdateMask($updateMask) + ->setKmsConfig($kmsConfig); + $response = $gapicClient->updateKmsConfig($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateKmsConfigTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateReplicationTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateReplicationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $stateDetails = 'stateDetails632437908'; + $healthy = false; + $destinationVolume = 'destinationVolume-1177512853'; + $description = 'description-1724546052'; + $sourceVolume = 'sourceVolume327497662'; + $clusterLocation = 'clusterLocation-44738470'; + $expectedResponse = new Replication(); + $expectedResponse->setName($name); + $expectedResponse->setStateDetails($stateDetails); + $expectedResponse->setHealthy($healthy); + $expectedResponse->setDestinationVolume($destinationVolume); + $expectedResponse->setDescription($description); + $expectedResponse->setSourceVolume($sourceVolume); + $expectedResponse->setClusterLocation($clusterLocation); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateReplicationTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $updateMask = new FieldMask(); + $replication = new Replication(); + $replicationReplicationSchedule = ReplicationSchedule::REPLICATION_SCHEDULE_UNSPECIFIED; + $replication->setReplicationSchedule($replicationReplicationSchedule); + $replicationDestinationVolumeParameters = new DestinationVolumeParameters(); + $destinationVolumeParametersStoragePool = $gapicClient->storagePoolName('[PROJECT]', '[LOCATION]', '[STORAGE_POOL]'); + $replicationDestinationVolumeParameters->setStoragePool($destinationVolumeParametersStoragePool); + $replication->setDestinationVolumeParameters($replicationDestinationVolumeParameters); + $request = (new UpdateReplicationRequest()) + ->setUpdateMask($updateMask) + ->setReplication($replication); + $response = $gapicClient->updateReplication($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/UpdateReplication', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $actualValue = $actualApiRequestObject->getReplication(); + $this->assertProtobufEquals($replication, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateReplicationTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateReplicationExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateReplicationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $updateMask = new FieldMask(); + $replication = new Replication(); + $replicationReplicationSchedule = ReplicationSchedule::REPLICATION_SCHEDULE_UNSPECIFIED; + $replication->setReplicationSchedule($replicationReplicationSchedule); + $replicationDestinationVolumeParameters = new DestinationVolumeParameters(); + $destinationVolumeParametersStoragePool = $gapicClient->storagePoolName('[PROJECT]', '[LOCATION]', '[STORAGE_POOL]'); + $replicationDestinationVolumeParameters->setStoragePool($destinationVolumeParametersStoragePool); + $replication->setDestinationVolumeParameters($replicationDestinationVolumeParameters); + $request = (new UpdateReplicationRequest()) + ->setUpdateMask($updateMask) + ->setReplication($replication); + $response = $gapicClient->updateReplication($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateReplicationTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateSnapshotTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateSnapshotTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $stateDetails = 'stateDetails632437908'; + $description = 'description-1724546052'; + $usedBytes = -1.91584322E8; + $expectedResponse = new Snapshot(); + $expectedResponse->setName($name); + $expectedResponse->setStateDetails($stateDetails); + $expectedResponse->setDescription($description); + $expectedResponse->setUsedBytes($usedBytes); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateSnapshotTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $updateMask = new FieldMask(); + $snapshot = new Snapshot(); + $request = (new UpdateSnapshotRequest()) + ->setUpdateMask($updateMask) + ->setSnapshot($snapshot); + $response = $gapicClient->updateSnapshot($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/UpdateSnapshot', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $actualValue = $actualApiRequestObject->getSnapshot(); + $this->assertProtobufEquals($snapshot, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateSnapshotTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateSnapshotExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateSnapshotTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $updateMask = new FieldMask(); + $snapshot = new Snapshot(); + $request = (new UpdateSnapshotRequest()) + ->setUpdateMask($updateMask) + ->setSnapshot($snapshot); + $response = $gapicClient->updateSnapshot($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateSnapshotTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateStoragePoolTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateStoragePoolTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $capacityGib = 498394811; + $volumeCapacityGib = 643777472; + $volumeCount = 1362665558; + $stateDetails = 'stateDetails632437908'; + $description = 'description-1724546052'; + $network = 'network1843485230'; + $activeDirectory = 'activeDirectory475662452'; + $kmsConfig = 'kmsConfig917255152'; + $ldapEnabled = false; + $psaRange = 'psaRange1004849276'; + $globalAccessAllowed = false; + $allowAutoTiering = true; + $replicaZone = 'replicaZone1404354259'; + $zone = 'zone3744684'; + $expectedResponse = new StoragePool(); + $expectedResponse->setName($name); + $expectedResponse->setCapacityGib($capacityGib); + $expectedResponse->setVolumeCapacityGib($volumeCapacityGib); + $expectedResponse->setVolumeCount($volumeCount); + $expectedResponse->setStateDetails($stateDetails); + $expectedResponse->setDescription($description); + $expectedResponse->setNetwork($network); + $expectedResponse->setActiveDirectory($activeDirectory); + $expectedResponse->setKmsConfig($kmsConfig); + $expectedResponse->setLdapEnabled($ldapEnabled); + $expectedResponse->setPsaRange($psaRange); + $expectedResponse->setGlobalAccessAllowed($globalAccessAllowed); + $expectedResponse->setAllowAutoTiering($allowAutoTiering); + $expectedResponse->setReplicaZone($replicaZone); + $expectedResponse->setZone($zone); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateStoragePoolTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $updateMask = new FieldMask(); + $storagePool = new StoragePool(); + $storagePoolServiceLevel = ServiceLevel::SERVICE_LEVEL_UNSPECIFIED; + $storagePool->setServiceLevel($storagePoolServiceLevel); + $storagePoolCapacityGib = 1260910865; + $storagePool->setCapacityGib($storagePoolCapacityGib); + $storagePoolNetwork = $gapicClient->networkName('[PROJECT]', '[NETWORK]'); + $storagePool->setNetwork($storagePoolNetwork); + $request = (new UpdateStoragePoolRequest()) + ->setUpdateMask($updateMask) + ->setStoragePool($storagePool); + $response = $gapicClient->updateStoragePool($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/UpdateStoragePool', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $actualValue = $actualApiRequestObject->getStoragePool(); + $this->assertProtobufEquals($storagePool, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateStoragePoolTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateStoragePoolExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateStoragePoolTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $updateMask = new FieldMask(); + $storagePool = new StoragePool(); + $storagePoolServiceLevel = ServiceLevel::SERVICE_LEVEL_UNSPECIFIED; + $storagePool->setServiceLevel($storagePoolServiceLevel); + $storagePoolCapacityGib = 1260910865; + $storagePool->setCapacityGib($storagePoolCapacityGib); + $storagePoolNetwork = $gapicClient->networkName('[PROJECT]', '[NETWORK]'); + $storagePool->setNetwork($storagePoolNetwork); + $request = (new UpdateStoragePoolRequest()) + ->setUpdateMask($updateMask) + ->setStoragePool($storagePool); + $response = $gapicClient->updateStoragePool($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateStoragePoolTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateVolumeTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateVolumeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $stateDetails = 'stateDetails632437908'; + $shareName = 'shareName-1788152085'; + $psaRange = 'psaRange1004849276'; + $storagePool = 'storagePool897344352'; + $network = 'network1843485230'; + $capacityGib = 498394811; + $unixPermissions = 'unixPermissions1137975373'; + $description = 'description-1724546052'; + $snapReserve = -1.42958764E8; + $snapshotDirectory = true; + $usedGib = 279083970; + $kerberosEnabled = false; + $ldapEnabled = false; + $activeDirectory = 'activeDirectory475662452'; + $kmsConfig = 'kmsConfig917255152'; + $hasReplication = false; + $largeCapacity = true; + $multipleEndpoints = false; + $replicaZone = 'replicaZone1404354259'; + $zone = 'zone3744684'; + $coldTierSizeGib = 212809252; + $expectedResponse = new Volume(); + $expectedResponse->setName($name); + $expectedResponse->setStateDetails($stateDetails); + $expectedResponse->setShareName($shareName); + $expectedResponse->setPsaRange($psaRange); + $expectedResponse->setStoragePool($storagePool); + $expectedResponse->setNetwork($network); + $expectedResponse->setCapacityGib($capacityGib); + $expectedResponse->setUnixPermissions($unixPermissions); + $expectedResponse->setDescription($description); + $expectedResponse->setSnapReserve($snapReserve); + $expectedResponse->setSnapshotDirectory($snapshotDirectory); + $expectedResponse->setUsedGib($usedGib); + $expectedResponse->setKerberosEnabled($kerberosEnabled); + $expectedResponse->setLdapEnabled($ldapEnabled); + $expectedResponse->setActiveDirectory($activeDirectory); + $expectedResponse->setKmsConfig($kmsConfig); + $expectedResponse->setHasReplication($hasReplication); + $expectedResponse->setLargeCapacity($largeCapacity); + $expectedResponse->setMultipleEndpoints($multipleEndpoints); + $expectedResponse->setReplicaZone($replicaZone); + $expectedResponse->setZone($zone); + $expectedResponse->setColdTierSizeGib($coldTierSizeGib); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateVolumeTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $updateMask = new FieldMask(); + $volume = new Volume(); + $volumeShareName = 'volumeShareName1564593424'; + $volume->setShareName($volumeShareName); + $volumeStoragePool = $gapicClient->storagePoolName('[PROJECT]', '[LOCATION]', '[STORAGE_POOL]'); + $volume->setStoragePool($volumeStoragePool); + $volumeCapacityGib = 1491387092; + $volume->setCapacityGib($volumeCapacityGib); + $volumeProtocols = []; + $volume->setProtocols($volumeProtocols); + $request = (new UpdateVolumeRequest()) + ->setUpdateMask($updateMask) + ->setVolume($volume); + $response = $gapicClient->updateVolume($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/UpdateVolume', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $actualValue = $actualApiRequestObject->getVolume(); + $this->assertProtobufEquals($volume, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateVolumeTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateVolumeExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateVolumeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $updateMask = new FieldMask(); + $volume = new Volume(); + $volumeShareName = 'volumeShareName1564593424'; + $volume->setShareName($volumeShareName); + $volumeStoragePool = $gapicClient->storagePoolName('[PROJECT]', '[LOCATION]', '[STORAGE_POOL]'); + $volume->setStoragePool($volumeStoragePool); + $volumeCapacityGib = 1491387092; + $volume->setCapacityGib($volumeCapacityGib); + $volumeProtocols = []; + $volume->setProtocols($volumeProtocols); + $request = (new UpdateVolumeRequest()) + ->setUpdateMask($updateMask) + ->setVolume($volume); + $response = $gapicClient->updateVolume($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateVolumeTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function verifyKmsConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $healthy = false; + $healthError = 'healthError847905381'; + $instructions = 'instructions757376421'; + $expectedResponse = new VerifyKmsConfigResponse(); + $expectedResponse->setHealthy($healthy); + $expectedResponse->setHealthError($healthError); + $expectedResponse->setInstructions($instructions); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->kmsConfigName('[PROJECT]', '[LOCATION]', '[KMS_CONFIG]'); + $request = (new VerifyKmsConfigRequest()) + ->setName($formattedName); + $response = $gapicClient->verifyKmsConfig($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/VerifyKmsConfig', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function verifyKmsConfigExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->kmsConfigName('[PROJECT]', '[LOCATION]', '[KMS_CONFIG]'); + $request = (new VerifyKmsConfigRequest()) + ->setName($formattedName); + try { + $gapicClient->verifyKmsConfig($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $locationId = 'locationId552319461'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Location(); + $expectedResponse->setName($name2); + $expectedResponse->setLocationId($locationId); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + $request = new GetLocationRequest(); + $response = $gapicClient->getLocation($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new GetLocationRequest(); + try { + $gapicClient->getLocation($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $locationsElement = new Location(); + $locations = [ + $locationsElement, + ]; + $expectedResponse = new ListLocationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setLocations($locations); + $transport->addResponse($expectedResponse); + $request = new ListLocationsRequest(); + $response = $gapicClient->listLocations($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new ListLocationsRequest(); + try { + $gapicClient->listLocations($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createActiveDirectoryAsyncTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createActiveDirectoryTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $domain = 'domain-1326197564'; + $site = 'site3530567'; + $dns = 'dns99625'; + $netBiosPrefix = 'netBiosPrefix865554756'; + $organizationalUnit = 'organizationalUnit-694432635'; + $aesEncryption = false; + $username = 'username-265713450'; + $password = 'password1216985755'; + $kdcHostname = 'kdcHostname-863813976'; + $kdcIp = 'kdcIp-1136252068'; + $nfsUsersWithLdap = false; + $description = 'description-1724546052'; + $ldapSigning = false; + $encryptDcConnections = false; + $stateDetails = 'stateDetails632437908'; + $expectedResponse = new ActiveDirectory(); + $expectedResponse->setName($name); + $expectedResponse->setDomain($domain); + $expectedResponse->setSite($site); + $expectedResponse->setDns($dns); + $expectedResponse->setNetBiosPrefix($netBiosPrefix); + $expectedResponse->setOrganizationalUnit($organizationalUnit); + $expectedResponse->setAesEncryption($aesEncryption); + $expectedResponse->setUsername($username); + $expectedResponse->setPassword($password); + $expectedResponse->setKdcHostname($kdcHostname); + $expectedResponse->setKdcIp($kdcIp); + $expectedResponse->setNfsUsersWithLdap($nfsUsersWithLdap); + $expectedResponse->setDescription($description); + $expectedResponse->setLdapSigning($ldapSigning); + $expectedResponse->setEncryptDcConnections($encryptDcConnections); + $expectedResponse->setStateDetails($stateDetails); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createActiveDirectoryTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $activeDirectory = new ActiveDirectory(); + $activeDirectoryDomain = 'activeDirectoryDomain1710368171'; + $activeDirectory->setDomain($activeDirectoryDomain); + $activeDirectoryDns = 'activeDirectoryDns1090270626'; + $activeDirectory->setDns($activeDirectoryDns); + $activeDirectoryNetBiosPrefix = 'activeDirectoryNetBiosPrefix-1870358125'; + $activeDirectory->setNetBiosPrefix($activeDirectoryNetBiosPrefix); + $activeDirectoryUsername = 'activeDirectoryUsername1591163901'; + $activeDirectory->setUsername($activeDirectoryUsername); + $activeDirectoryPassword = 'activeDirectoryPassword-1221104190'; + $activeDirectory->setPassword($activeDirectoryPassword); + $activeDirectoryId = 'activeDirectoryId1363092678'; + $request = (new CreateActiveDirectoryRequest()) + ->setParent($formattedParent) + ->setActiveDirectory($activeDirectory) + ->setActiveDirectoryId($activeDirectoryId); + $response = $gapicClient->createActiveDirectoryAsync($request)->wait(); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.netapp.v1.NetApp/CreateActiveDirectory', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getActiveDirectory(); + $this->assertProtobufEquals($activeDirectory, $actualValue); + $actualValue = $actualApiRequestObject->getActiveDirectoryId(); + $this->assertProtobufEquals($activeDirectoryId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createActiveDirectoryTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } +} diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/GPBMetadata/Google/Cloud/Networkconnectivity/V1/Common.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/GPBMetadata/Google/Cloud/Networkconnectivity/V1/Common.php new file mode 100644 index 000000000000..605cecbc47c5 --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/proto/src/GPBMetadata/Google/Cloud/Networkconnectivity/V1/Common.php @@ -0,0 +1,40 @@ +internalAddGeneratedFile( + ' +û +0google/cloud/networkconnectivity/v1/common.proto#google.cloud.networkconnectivity.v1google/api/resource.protogoogle/protobuf/timestamp.proto"€ +OperationMetadata4 + create_time ( 2.google.protobuf.TimestampBàA1 +end_time ( 2.google.protobuf.TimestampBàA +target ( BàA +verb ( BàA +status_message ( BàA# +requested_cancellation (BàA + api_version ( BàABÚ +\'com.google.cloud.networkconnectivity.v1B CommonProtoPZYcloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb;networkconnectivitypbª#Google.Cloud.NetworkConnectivity.V1Ê#Google\\Cloud\\NetworkConnectivity\\V1ê&Google::Cloud::NetworkConnectivity::V1êAz +-compute.googleapis.com/InterconnectAttachmentIprojects/{project}/regions/{region}/interconnectAttachments/{resource_id}êAR +compute.googleapis.com/Network0projects/{project}/global/networks/{resource_id}bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/GPBMetadata/Google/Cloud/Networkconnectivity/V1/Hub.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/GPBMetadata/Google/Cloud/Networkconnectivity/V1/Hub.php new file mode 100644 index 0000000000000000000000000000000000000000..cc94b2a47ae0425cbc4db33a3b58a2e11979b322 GIT binary patch literal 19414 zcmdTsOKc-Yc1uyxNW~d_YJRl*qkFvem^(vyIJS3&^RZi0kA`bWq)AG%iUssiWJ~G{ z#cp>uHI`?UAR8c91VJuAkV|q15+p!wiyQ*vkj3VZU?<52*xg_OAA&^^a1rFGa>Ezw&B|KhLM^t&n_BXy;=9_Yx9U?t-z41E$v6L zwsP$jA&pkubyN2{>*O&>!GCsVy=691u2=Wq<8{;3&9>>8^_KY=aC9fNQE#~h!0jKq z(P;yDRy)N2O6`Vm`K=Vk$;Q5JTOffuDW9w|6AB1qt=RSqr(JKY%^7aPF>TLs$}lva z-!!~Hl&z;Ro^i!=NO>H_J$P=tYQdlljiL(O3O!(+hKOt3kxzHJYN zMRmV=*A&XFHk*Mi-visf9B3cY#W%@Mem6$0MzVT(i4V`9lgJEk5}BQAGZzKUx^03t zVQR^J#>}gs2OCWH^mUZX;{3H5U(ke;GXF9BsqOiV;4$!3fV^K0ZMC;V6lN6Qt8*n0eD=EET&v zJ{$j~IzrzeiH2iqg5> z4yWQU%{%@yhplo32+u4anAY~3U3!)zn!=faQ6)zhFZ2Q#@3hTNI)-jGlVd)6ae9}G zFh^=6$Kkh$Tv}?zDudvRYUH$Ibv&?ReaCLNNrHrDrO;G3;7YkbU*Kp!T=n&q;U*J+ z1{WYs7s(mdwjLU~+u7c(JG;r#D9me8Q&bsbl>>5uizH!N5aV|BZL4V{&mh}!^p+8B z5x^L#82yM$+Mxf2r+XIQv^IB>6Nv7*6m4aMtqD+$@+CryPi@QbblYttCjr|SKDht2 z@5f>@S4kqg&28@of)mvcVm5cC%%z*IO*>famb<-s~BY(7U86zfMSKIo~Gnj$;Zly7Wv< zkylvS)A0-;nP6&>nb7x1&M`jen2yoZH!MeQ8;^9?WcFk6PnOi^o>OnTkVNUI5iVLI z3Mj7pAVEfOwZCj5zSn2O?@1{Gl76%q-y(64esUBPV|+FP{^^-|S$c`zCnK9+takDu zg1-$q{7g-g%Muzg&)`7eY0GRsgeBUs+qwtwoB66~z?R6pE5+slg0I-^8V9Bi$*Te- z21}9V>UGbnH@3DRV!26*_-7;F$D~rAQoERFo4h6_19l+q)a$n0GV746LYfP15Wcv{ zvp8KL!gNgW4M+8H6@656B_yu~s5EBs$#ch$S3}qd_Y#}rMZpJ{YO~V-PQdvF6U^WQ zcOr057HC%N-idmmMgq_ZpBzLD=An)eH5SMzh^a2**2(i2FrpX21bv1xOL^HpLkwgePEt25|3lc0Hn8@9dN0|v>$rJzuog}9qV|44A z!a>t>*lADZ;q2LWXhpIWko!&1w4bQnjoViua1z+|<`7B@<M`rW7MF1ae<@4H;l`-d*>zQiDlt`!9W3ypv9q;607#TXeu#KB6V(lguJmuC-y zJfi2>EZ3EQI#14+w%#zCjt&V0m?Y-=R3*dcK?tseoCo28@;wM$CFk14r=GrL**z|q zZyV&i+!7$TZ`r-Rc!YNIiqQxz6X`olGnwLzQ=ys9abp0<23k3!@+@pXvH`h@T(ZHP z%6T&8I}S|wMd*Q_Z3n6(PzS^0JiiuOOGf4V$|kA zSp#P3iJV;0Am+i9*`GD=SwA7EVAcZ?qvRASyIfu*<{X?D;gnHb$#2J=s=pN@-;i)7 zu)RQL>4WFxO1P8p{mY*6qhT__Q`9ec2j3q<g+5{?X&>{TX zQ__TVIiW9+b0K-?K5B>*P?%7DKSm}OOxFX=b}O)Lg<2rJNk;9u13MNTO=jQvr8@LX zy#!khe-|zC$6)WfARa(C9Je7egpKZJJUtwNRFB|K9@H<|JUOHjWOT!9!BzvxL)>YP zSxysj$n{-bijA}SQl|~+ zdt-}bZ9p572vlk24JHp?9JhN)X|PoVVMuRPmA{HX0*qz15Xuus_$(O(A+XvP^1u{z zi01ibniuD!1;b%462j^gu<#5it_Nzr@<%}VGM4^Aly}R4tSX5LGAK<6D$?AL1bsYr zI1zn8o)uF}GBszk49^IWccQfdMG1={kZ(-+haqxKs3V5-z*J5;-y~)hdSFn)_gL+&c9}THtuRjcaMipgTwdLQ^Id_9TV?lGj*Hvof~df-b(_fDJvL|i ziZHnCQT{DP}WkW; z1m;hG1D?S2aB#d7CZLihF(;(58vvATLU|g~L*xlpuTLnUROT-s@bNtk^VUr6zQUX= zmno2OTt%H7m+|=`>s%kzAt6=Cg?^%8HkLBn^tFdoz7n#>zKm~$DTN-_@-DiTY{Y7;QbU)8$bGy}whT2bTt~cD zBNb*8uz3s-h&KokTHlWLcqI3x({j{UiQTOT7e0|kv@~P|U6lS5(bPAC~6wg0GxnSR+_;oT2@qkZ0KKu1&szR`BbU^<^aFk9J zGIMal1jd#zdW$5&2gN*8ya8vZ&m>wj6ms5dH(H%0q$1ncqk@MgF4UexvrbI;&lq`` zvopBV?9vZ-a7$k@0R<0k^f=QX7~9Fn%={ z|JRVh`pp9Ldbr;Q^a+yYqg#GJpNvnrK8Z#mp-))N;d}Rx&h?JLsv{q>NY27uxZ4H+ zHvABx0c)Ydb0<*lC>i{Zhe(pIEbNaFYxg7$c73P(HV)n+2+YE{*3rz?z&Z_Q$AnfB zXiR}tHqoM8sUMK3Kp;M~xSgJjVCsXHCM5O)mxc?T zonR;}a`7N#zC$K=OvmfgTlzMXlFhckiwd)^KT}^LuO8?UpeO@vI;=hpN4WK76PoD! z=7|QlQc+U(+u*?nr~NXaz5#8V9T*Q2#i5!Y*InsjyvKnRjZBNfw2)dv?srrE6wJuS z;~zNET-b~x-TsYUm(KSPQZ09f2MiV)#*`m`n-gRnw2;@rM9VGS7fbWsKnxNz9}q#_ z50iYH5cI_|@Mk0Bbd@AmZ|(evy{h8*f3FF~}s2>hj&~uI5w8ZA}pV;Ay@O`|s{NA*SiapeDF{ zfoPvg@7jT+D7=1#X>WHU6yA(RsbwG;sQ;PmljF|s18HT_nxNKmMi_;dr5MxTC8b$t)v$gO3QOl@P#v=DioJ5 zlC%C3{1gv{(k(KMZkK5=J2k45mKlQ8azE}1ghCrV)S`=vYGqZgF3&D$HNXsWvfry3 zl!xa+PljN}d1h{PNnI=!bi_IpPs84E1eK4TC)3rM3RCs=A40ET0Se++0gti%LKSM< zD;iY8;mMq~py87^^rDZeg@RVbKgZagyhV{!&d1r<^EM$)%DxO>gVMjBM|=-|*mK5mCAOxhh&7zW1~L_`RVly~=JTKIUBz-ENHZ zzIz0Fc#(iY4m8S}253&o@$;w%8lI#TICE0m+C_9skj}E^c#rh$TnH#xls6Fs3BfB)5A+|n2OM@gs!FWlAV13f$ zeE+2{ym?5c2dr2~-O_xKWO<_h93y9hJ!6=6soa5X4~)-N-dDRrZ;w+V8-pe-1&zKl+pm8vbyfaLHsA z&x~${rS4ODuqvgqz$4UfvfzFH1@2^o4pga}yh0E@y+?T9_7im`xIs3+qR$H-jFer$ ze| zC>qcGu&`F_Z1)S}xsFY~0nh&g8XP)_*E$b}0QmVG#GMapt-c=g#jdUGT84Sj1OIHRA7&T*WLpCMDZ zgeIV|=j3@t?nr4Lu;6l`mrGyoq`BM+vq_;#hGi94L6O(HaG_^LPVW#z(ZYIngT5C@ z?=~Im{s&F_JE3WaG>WEifasd$!-+M3JUhIN_8Ez=2AmiA??Fm|Ge|mQo>Cx$&&m<0 z(swbX;ByQLHq%JYzLY}C-NqHdr-!5z;VXsdERJTGV4h!IpILdL!i}tbFGUh*w12tc zr)p-)^K3Vt%|3ecsPADGu6Atk_bXksTXhfmRJUjUHcr;wgkvX}e0+B7erFwy2R*AC z`;}F`w-TE}z>wXv2EMilXoLF50NU;KTLXXni=j*N_!_57fxX5lv&7jhgx&>}S-JMa zAGIdl_T<0rDLifs-uLu$=nal8pGSQ8`~ZacJPcI7Bhheh8x9%!-x%Q-o9snCaPbqr z>}BCa0phAZ`%Ux(o6Wta>Vu;X`Q8~Y!)I0-HU^K`$6hu#U(Y`FzwWJ%0+eT6e=~T= d&K3SbsL=bPSee{x40v}Gj^yun+9P{}{4d--PHO-F literal 0 HcmV?d00001 diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/GPBMetadata/Google/Cloud/Networkconnectivity/V1/PolicyBasedRouting.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/GPBMetadata/Google/Cloud/Networkconnectivity/V1/PolicyBasedRouting.php new file mode 100644 index 0000000000000000000000000000000000000000..fd12e2e50a40d76de4d2c629182857b345a3baf4 GIT binary patch literal 5510 zcmb_g&2uA170<{Y*e$S~c6qHRn=p}+tar(du#*&^U2hnDtXITqDYC5;psK0Ss3i{` z%?vXw8?)sDQ2Yh(55O@8ioauTgbTH&P;d$d4&1oF>yMe$N@GVW#}})n`+fBL{oZ@s z@BT;rv5z*?UE-3!q@<&^&sBO%R6p>jXL*j=9(21TP%W?T+YSjdRV~-l{o0{gDOV5Q z0@2VL1Qsc%J41HMi~|WI1LSs&%ft$dosPZuA7H z@aGTOU{?*PN#Wnyc4*kHO>NV$e+ehvQM;xS5>PX~w>xmbea}^yK+Uzt=51BzWP9KC zJ&4eb8hKe~L4$y`sxBpgYdWnm39Z2PsTb5?YoX91G!8ZUvUyvYW$Ns%x+#1t6vmv~ zQE4zB!`4+bAaoG8_qg9o!A1P5l@LSSw_CdFdMpZ_8x{)B&-7fyWr8KgCN6zBnTIxU zIz@79p4wjUa-t0)X*IEvS23hj^7?(xo!o^z&+P>R*9CgEYCg-1my1|T1c0H^_v!iM zreo1V8}fmgeLq>2bMNj0TQW`WbYfyXghbtpslbSF3w@qL53ZM?ctgl*Jj1nw4A)M# zvg^`_>Dy2W7-vL&XTLqP&}GCh+L9S^!)rqu0tvrd`mS8MvbI2l0*s}E^fm812Qu%) zK*~+8OSQZJLE7dCgGw$&{>Ff4}C*sT4tVqefJAJ^~fi{#u{8;y+U|f~H;{=3S0yK7OD`r0+eA(9 zM*)8XL9=(!jbwh~RWu)v9t(WTC?)$p1O+3%pmct1{~nG=kdPKq-&b-+XqGt*$gX~>H}dajh((odQy(hwH#sdGSM(9;%1(mA3#FkAE0^P3|ONRsd}4N!wvLS?1yAf ze2P8kAe4kf9~fYSaOvj_Vh&@3_$TU}5LZwGFU56pmZdFTK?`2cfo9e|7j-%J2L-)x ziIbrZ7i)qWXm$L|q8O#OKb(r=Ks?cXha6^IZV{?idf-CuvyRQS!w3!)FV{oaT{0HN zD2mk=8t6S9!w;w8MDE`Zj1up>qnJg;t^rvNt&PXgusa++UQts}nDF=>j^(tW=Eakh z@Ia7`8RT4G3rg-caN;s?2ql-D`0ESrh!-4i?#1>$7SL-W_MrhEkl@s|2>zFX))Fa- zC%dd9%1S`9#fb=fi3*V+xsRXeGLe7%*MI&lbsrblc;Jc1?VY&J+!?Dc7jlLWzw$|l z|E8eT1h(UkCUP`EGCJvWshX=k)A>s1FEKUePmS|4%OwSAK-WyNGginxCJUI2-HE=H^BtHI+f^H;d z=Y#=E7M?I*r%&}eXidKKfW>?or11#=P72x(P40+DOhuDy^QoTu>W==ot{qeAhlPCp z?CeZJA2&*KK##@r?ym2cwCe@^;_p+abqih<5lyaoI~3Q)>rtJBpsxJn$3ifA0>d+< z=OxYv!5gRp2}kkU_Y%K;mfG0mBSNjjMughF7!j6+29H{E>uI#BB`1l|C~google.cloud.networkconnectivity.v1.AcceptHubSpokeRequest + */ +class AcceptHubSpokeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the hub into which to accept the spoke. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. The URI of the spoke to accept into the hub. + * + * Generated from protobuf field string spoke_uri = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $spoke_uri = ''; + /** + * Optional. A request ID to identify requests. Specify a unique request ID so + * that if you must retry your request, the server knows to ignore the request + * if it has already been completed. The server guarantees that a request + * doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check to see whether the original operation + * was received. If it was, the server ignores the second request. This + * behavior prevents clients from mistakenly creating duplicate commitments. + * The request ID must be a valid UUID, with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param string $name Required. The name of the hub into which to accept the spoke. Please see + * {@see HubServiceClient::hubName()} for help formatting this field. + * @param string $spokeUri Required. The URI of the spoke to accept into the hub. Please see + * {@see HubServiceClient::spokeName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkConnectivity\V1\AcceptHubSpokeRequest + * + * @experimental + */ + public static function build(string $name, string $spokeUri): self + { + return (new self()) + ->setName($name) + ->setSpokeUri($spokeUri); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the hub into which to accept the spoke. + * @type string $spoke_uri + * Required. The URI of the spoke to accept into the hub. + * @type string $request_id + * Optional. A request ID to identify requests. Specify a unique request ID so + * that if you must retry your request, the server knows to ignore the request + * if it has already been completed. The server guarantees that a request + * doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check to see whether the original operation + * was received. If it was, the server ignores the second request. This + * behavior prevents clients from mistakenly creating duplicate commitments. + * The request ID must be a valid UUID, with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the hub into which to accept the spoke. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the hub into which to accept the spoke. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. The URI of the spoke to accept into the hub. + * + * Generated from protobuf field string spoke_uri = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getSpokeUri() + { + return $this->spoke_uri; + } + + /** + * Required. The URI of the spoke to accept into the hub. + * + * Generated from protobuf field string spoke_uri = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setSpokeUri($var) + { + GPBUtil::checkString($var, True); + $this->spoke_uri = $var; + + return $this; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID so + * that if you must retry your request, the server knows to ignore the request + * if it has already been completed. The server guarantees that a request + * doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check to see whether the original operation + * was received. If it was, the server ignores the second request. This + * behavior prevents clients from mistakenly creating duplicate commitments. + * The request ID must be a valid UUID, with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID so + * that if you must retry your request, the server knows to ignore the request + * if it has already been completed. The server guarantees that a request + * doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check to see whether the original operation + * was received. If it was, the server ignores the second request. This + * behavior prevents clients from mistakenly creating duplicate commitments. + * The request ID must be a valid UUID, with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/AcceptHubSpokeResponse.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/AcceptHubSpokeResponse.php new file mode 100644 index 000000000000..48fe6468b2b9 --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/AcceptHubSpokeResponse.php @@ -0,0 +1,78 @@ +google.cloud.networkconnectivity.v1.AcceptHubSpokeResponse + */ +class AcceptHubSpokeResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The spoke that was operated on. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.Spoke spoke = 1; + */ + protected $spoke = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\NetworkConnectivity\V1\Spoke $spoke + * The spoke that was operated on. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); + parent::__construct($data); + } + + /** + * The spoke that was operated on. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.Spoke spoke = 1; + * @return \Google\Cloud\NetworkConnectivity\V1\Spoke|null + */ + public function getSpoke() + { + return $this->spoke; + } + + public function hasSpoke() + { + return isset($this->spoke); + } + + public function clearSpoke() + { + unset($this->spoke); + } + + /** + * The spoke that was operated on. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.Spoke spoke = 1; + * @param \Google\Cloud\NetworkConnectivity\V1\Spoke $var + * @return $this + */ + public function setSpoke($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkConnectivity\V1\Spoke::class); + $this->spoke = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/AutoAccept.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/AutoAccept.php new file mode 100644 index 000000000000..902bb3e0eb89 --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/AutoAccept.php @@ -0,0 +1,81 @@ +google.cloud.networkconnectivity.v1.AutoAccept + */ +class AutoAccept extends \Google\Protobuf\Internal\Message +{ + /** + * A list of project ids or project numbers for which you want + * to enable auto-accept. The auto-accept setting is applied to + * spokes being created or updated in these projects. + * + * Generated from protobuf field repeated string auto_accept_projects = 1; + */ + private $auto_accept_projects; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $auto_accept_projects + * A list of project ids or project numbers for which you want + * to enable auto-accept. The auto-accept setting is applied to + * spokes being created or updated in these projects. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); + parent::__construct($data); + } + + /** + * A list of project ids or project numbers for which you want + * to enable auto-accept. The auto-accept setting is applied to + * spokes being created or updated in these projects. + * + * Generated from protobuf field repeated string auto_accept_projects = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAutoAcceptProjects() + { + return $this->auto_accept_projects; + } + + /** + * A list of project ids or project numbers for which you want + * to enable auto-accept. The auto-accept setting is applied to + * spokes being created or updated in these projects. + * + * Generated from protobuf field repeated string auto_accept_projects = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAutoAcceptProjects($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->auto_accept_projects = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/CreateHubRequest.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/CreateHubRequest.php new file mode 100644 index 000000000000..94e90f9d1b6c --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/CreateHubRequest.php @@ -0,0 +1,243 @@ +google.cloud.networkconnectivity.v1.CreateHubRequest + */ +class CreateHubRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. A unique identifier for the hub. + * + * Generated from protobuf field string hub_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $hub_id = ''; + /** + * Required. The initial values for a new hub. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.Hub hub = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $hub = null; + /** + * Optional. A request ID to identify requests. Specify a unique request ID so + * that if you must retry your request, the server knows to ignore the request + * if it has already been completed. The server guarantees that a request + * doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check to see whether the original operation + * was received. If it was, the server ignores the second request. This + * behavior prevents clients from mistakenly creating duplicate commitments. + * The request ID must be a valid UUID, with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param string $parent Required. The parent resource. Please see + * {@see HubServiceClient::locationName()} for help formatting this field. + * @param \Google\Cloud\NetworkConnectivity\V1\Hub $hub Required. The initial values for a new hub. + * @param string $hubId Required. A unique identifier for the hub. + * + * @return \Google\Cloud\NetworkConnectivity\V1\CreateHubRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\NetworkConnectivity\V1\Hub $hub, string $hubId): self + { + return (new self()) + ->setParent($parent) + ->setHub($hub) + ->setHubId($hubId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource. + * @type string $hub_id + * Required. A unique identifier for the hub. + * @type \Google\Cloud\NetworkConnectivity\V1\Hub $hub + * Required. The initial values for a new hub. + * @type string $request_id + * Optional. A request ID to identify requests. Specify a unique request ID so + * that if you must retry your request, the server knows to ignore the request + * if it has already been completed. The server guarantees that a request + * doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check to see whether the original operation + * was received. If it was, the server ignores the second request. This + * behavior prevents clients from mistakenly creating duplicate commitments. + * The request ID must be a valid UUID, with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. A unique identifier for the hub. + * + * Generated from protobuf field string hub_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getHubId() + { + return $this->hub_id; + } + + /** + * Required. A unique identifier for the hub. + * + * Generated from protobuf field string hub_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setHubId($var) + { + GPBUtil::checkString($var, True); + $this->hub_id = $var; + + return $this; + } + + /** + * Required. The initial values for a new hub. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.Hub hub = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetworkConnectivity\V1\Hub|null + */ + public function getHub() + { + return $this->hub; + } + + public function hasHub() + { + return isset($this->hub); + } + + public function clearHub() + { + unset($this->hub); + } + + /** + * Required. The initial values for a new hub. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.Hub hub = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetworkConnectivity\V1\Hub $var + * @return $this + */ + public function setHub($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkConnectivity\V1\Hub::class); + $this->hub = $var; + + return $this; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID so + * that if you must retry your request, the server knows to ignore the request + * if it has already been completed. The server guarantees that a request + * doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check to see whether the original operation + * was received. If it was, the server ignores the second request. This + * behavior prevents clients from mistakenly creating duplicate commitments. + * The request ID must be a valid UUID, with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID so + * that if you must retry your request, the server knows to ignore the request + * if it has already been completed. The server guarantees that a request + * doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check to see whether the original operation + * was received. If it was, the server ignores the second request. This + * behavior prevents clients from mistakenly creating duplicate commitments. + * The request ID must be a valid UUID, with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/CreatePolicyBasedRouteRequest.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/CreatePolicyBasedRouteRequest.php new file mode 100644 index 000000000000..39cc389b0596 --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/CreatePolicyBasedRouteRequest.php @@ -0,0 +1,237 @@ +google.cloud.networkconnectivity.v1.CreatePolicyBasedRouteRequest + */ +class CreatePolicyBasedRouteRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource's name of the PolicyBasedRoute. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Unique id for the Policy Based Route to create. + * + * Generated from protobuf field string policy_based_route_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $policy_based_route_id = ''; + /** + * Required. Initial values for a new Policy Based Route. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.PolicyBasedRoute policy_based_route = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $policy_based_route = null; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param string $parent Required. The parent resource's name of the PolicyBasedRoute. Please see + * {@see PolicyBasedRoutingServiceClient::locationName()} for help formatting this field. + * @param \Google\Cloud\NetworkConnectivity\V1\PolicyBasedRoute $policyBasedRoute Required. Initial values for a new Policy Based Route. + * @param string $policyBasedRouteId Required. Unique id for the Policy Based Route to create. + * + * @return \Google\Cloud\NetworkConnectivity\V1\CreatePolicyBasedRouteRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\NetworkConnectivity\V1\PolicyBasedRoute $policyBasedRoute, string $policyBasedRouteId): self + { + return (new self()) + ->setParent($parent) + ->setPolicyBasedRoute($policyBasedRoute) + ->setPolicyBasedRouteId($policyBasedRouteId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource's name of the PolicyBasedRoute. + * @type string $policy_based_route_id + * Required. Unique id for the Policy Based Route to create. + * @type \Google\Cloud\NetworkConnectivity\V1\PolicyBasedRoute $policy_based_route + * Required. Initial values for a new Policy Based Route. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkconnectivity\V1\PolicyBasedRouting::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource's name of the PolicyBasedRoute. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource's name of the PolicyBasedRoute. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. Unique id for the Policy Based Route to create. + * + * Generated from protobuf field string policy_based_route_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPolicyBasedRouteId() + { + return $this->policy_based_route_id; + } + + /** + * Required. Unique id for the Policy Based Route to create. + * + * Generated from protobuf field string policy_based_route_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPolicyBasedRouteId($var) + { + GPBUtil::checkString($var, True); + $this->policy_based_route_id = $var; + + return $this; + } + + /** + * Required. Initial values for a new Policy Based Route. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.PolicyBasedRoute policy_based_route = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetworkConnectivity\V1\PolicyBasedRoute|null + */ + public function getPolicyBasedRoute() + { + return $this->policy_based_route; + } + + public function hasPolicyBasedRoute() + { + return isset($this->policy_based_route); + } + + public function clearPolicyBasedRoute() + { + unset($this->policy_based_route); + } + + /** + * Required. Initial values for a new Policy Based Route. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.PolicyBasedRoute policy_based_route = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetworkConnectivity\V1\PolicyBasedRoute $var + * @return $this + */ + public function setPolicyBasedRoute($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkConnectivity\V1\PolicyBasedRoute::class); + $this->policy_based_route = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/CreateSpokeRequest.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/CreateSpokeRequest.php new file mode 100644 index 000000000000..ac28e3725546 --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/CreateSpokeRequest.php @@ -0,0 +1,242 @@ +google.cloud.networkconnectivity.v1.CreateSpokeRequest + */ +class CreateSpokeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Unique id for the spoke to create. + * + * Generated from protobuf field string spoke_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $spoke_id = ''; + /** + * Required. The initial values for a new spoke. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.Spoke spoke = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $spoke = null; + /** + * Optional. A request ID to identify requests. Specify a unique request ID so + * that if you must retry your request, the server knows to ignore the request + * if it has already been completed. The server guarantees that a request + * doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check to see whether the original operation + * was received. If it was, the server ignores the second request. This + * behavior prevents clients from mistakenly creating duplicate commitments. + * The request ID must be a valid UUID, with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param string $parent Required. The parent resource. Please see + * {@see HubServiceClient::locationName()} for help formatting this field. + * @param \Google\Cloud\NetworkConnectivity\V1\Spoke $spoke Required. The initial values for a new spoke. + * @param string $spokeId Required. Unique id for the spoke to create. + * + * @return \Google\Cloud\NetworkConnectivity\V1\CreateSpokeRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\NetworkConnectivity\V1\Spoke $spoke, string $spokeId): self + { + return (new self()) + ->setParent($parent) + ->setSpoke($spoke) + ->setSpokeId($spokeId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource. + * @type string $spoke_id + * Required. Unique id for the spoke to create. + * @type \Google\Cloud\NetworkConnectivity\V1\Spoke $spoke + * Required. The initial values for a new spoke. + * @type string $request_id + * Optional. A request ID to identify requests. Specify a unique request ID so + * that if you must retry your request, the server knows to ignore the request + * if it has already been completed. The server guarantees that a request + * doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check to see whether the original operation + * was received. If it was, the server ignores the second request. This + * behavior prevents clients from mistakenly creating duplicate commitments. + * The request ID must be a valid UUID, with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. Unique id for the spoke to create. + * + * Generated from protobuf field string spoke_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getSpokeId() + { + return $this->spoke_id; + } + + /** + * Required. Unique id for the spoke to create. + * + * Generated from protobuf field string spoke_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setSpokeId($var) + { + GPBUtil::checkString($var, True); + $this->spoke_id = $var; + + return $this; + } + + /** + * Required. The initial values for a new spoke. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.Spoke spoke = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetworkConnectivity\V1\Spoke|null + */ + public function getSpoke() + { + return $this->spoke; + } + + public function hasSpoke() + { + return isset($this->spoke); + } + + public function clearSpoke() + { + unset($this->spoke); + } + + /** + * Required. The initial values for a new spoke. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.Spoke spoke = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetworkConnectivity\V1\Spoke $var + * @return $this + */ + public function setSpoke($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkConnectivity\V1\Spoke::class); + $this->spoke = $var; + + return $this; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID so + * that if you must retry your request, the server knows to ignore the request + * if it has already been completed. The server guarantees that a request + * doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check to see whether the original operation + * was received. If it was, the server ignores the second request. This + * behavior prevents clients from mistakenly creating duplicate commitments. + * The request ID must be a valid UUID, with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID so + * that if you must retry your request, the server knows to ignore the request + * if it has already been completed. The server guarantees that a request + * doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check to see whether the original operation + * was received. If it was, the server ignores the second request. This + * behavior prevents clients from mistakenly creating duplicate commitments. + * The request ID must be a valid UUID, with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/DeleteHubRequest.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/DeleteHubRequest.php new file mode 100644 index 000000000000..c9c7d31d1486 --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/DeleteHubRequest.php @@ -0,0 +1,160 @@ +google.cloud.networkconnectivity.v1.DeleteHubRequest + */ +class DeleteHubRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the hub to delete. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. A request ID to identify requests. Specify a unique request ID so + * that if you must retry your request, the server knows to ignore the request + * if it has already been completed. The server guarantees that a request + * doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check to see whether the original operation + * was received. If it was, the server ignores the second request. This + * behavior prevents clients from mistakenly creating duplicate commitments. + * The request ID must be a valid UUID, with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param string $name Required. The name of the hub to delete. Please see + * {@see HubServiceClient::hubName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkConnectivity\V1\DeleteHubRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the hub to delete. + * @type string $request_id + * Optional. A request ID to identify requests. Specify a unique request ID so + * that if you must retry your request, the server knows to ignore the request + * if it has already been completed. The server guarantees that a request + * doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check to see whether the original operation + * was received. If it was, the server ignores the second request. This + * behavior prevents clients from mistakenly creating duplicate commitments. + * The request ID must be a valid UUID, with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the hub to delete. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the hub to delete. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID so + * that if you must retry your request, the server knows to ignore the request + * if it has already been completed. The server guarantees that a request + * doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check to see whether the original operation + * was received. If it was, the server ignores the second request. This + * behavior prevents clients from mistakenly creating duplicate commitments. + * The request ID must be a valid UUID, with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID so + * that if you must retry your request, the server knows to ignore the request + * if it has already been completed. The server guarantees that a request + * doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check to see whether the original operation + * was received. If it was, the server ignores the second request. This + * behavior prevents clients from mistakenly creating duplicate commitments. + * The request ID must be a valid UUID, with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/DeletePolicyBasedRouteRequest.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/DeletePolicyBasedRouteRequest.php new file mode 100644 index 000000000000..ee4a3805d495 --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/DeletePolicyBasedRouteRequest.php @@ -0,0 +1,155 @@ +google.cloud.networkconnectivity.v1.DeletePolicyBasedRouteRequest + */ +class DeletePolicyBasedRouteRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the PolicyBasedRoute resource to delete. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param string $name Required. Name of the PolicyBasedRoute resource to delete. Please see + * {@see PolicyBasedRoutingServiceClient::policyBasedRouteName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkConnectivity\V1\DeletePolicyBasedRouteRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the PolicyBasedRoute resource to delete. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkconnectivity\V1\PolicyBasedRouting::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the PolicyBasedRoute resource to delete. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the PolicyBasedRoute resource to delete. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/DeleteSpokeRequest.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/DeleteSpokeRequest.php new file mode 100644 index 000000000000..647e4efa1128 --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/DeleteSpokeRequest.php @@ -0,0 +1,160 @@ +google.cloud.networkconnectivity.v1.DeleteSpokeRequest + */ +class DeleteSpokeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the spoke to delete. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. A request ID to identify requests. Specify a unique request ID so + * that if you must retry your request, the server knows to ignore the request + * if it has already been completed. The server guarantees that a request + * doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check to see whether the original operation + * was received. If it was, the server ignores the second request. This + * behavior prevents clients from mistakenly creating duplicate commitments. + * The request ID must be a valid UUID, with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param string $name Required. The name of the spoke to delete. Please see + * {@see HubServiceClient::spokeName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkConnectivity\V1\DeleteSpokeRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the spoke to delete. + * @type string $request_id + * Optional. A request ID to identify requests. Specify a unique request ID so + * that if you must retry your request, the server knows to ignore the request + * if it has already been completed. The server guarantees that a request + * doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check to see whether the original operation + * was received. If it was, the server ignores the second request. This + * behavior prevents clients from mistakenly creating duplicate commitments. + * The request ID must be a valid UUID, with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the spoke to delete. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the spoke to delete. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID so + * that if you must retry your request, the server knows to ignore the request + * if it has already been completed. The server guarantees that a request + * doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check to see whether the original operation + * was received. If it was, the server ignores the second request. This + * behavior prevents clients from mistakenly creating duplicate commitments. + * The request ID must be a valid UUID, with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID so + * that if you must retry your request, the server knows to ignore the request + * if it has already been completed. The server guarantees that a request + * doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check to see whether the original operation + * was received. If it was, the server ignores the second request. This + * behavior prevents clients from mistakenly creating duplicate commitments. + * The request ID must be a valid UUID, with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/GetGroupRequest.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/GetGroupRequest.php new file mode 100644 index 000000000000..b81f16b129b7 --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/GetGroupRequest.php @@ -0,0 +1,82 @@ +google.cloud.networkconnectivity.v1.GetGroupRequest + */ +class GetGroupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the route table resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the route table resource. Please see + * {@see HubServiceClient::groupName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkConnectivity\V1\GetGroupRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the route table resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the route table resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the route table resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/GetHubRequest.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/GetHubRequest.php new file mode 100644 index 000000000000..71dba213b11a --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/GetHubRequest.php @@ -0,0 +1,83 @@ +google.cloud.networkconnectivity.v1.GetHubRequest + */ +class GetHubRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the hub resource to get. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the hub resource to get. Please see + * {@see HubServiceClient::hubName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkConnectivity\V1\GetHubRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the hub resource to get. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the hub resource to get. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the hub resource to get. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/GetPolicyBasedRouteRequest.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/GetPolicyBasedRouteRequest.php new file mode 100644 index 000000000000..c86de4e35afd --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/GetPolicyBasedRouteRequest.php @@ -0,0 +1,81 @@ +google.cloud.networkconnectivity.v1.GetPolicyBasedRouteRequest + */ +class GetPolicyBasedRouteRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the PolicyBasedRoute resource to get. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Name of the PolicyBasedRoute resource to get. Please see + * {@see PolicyBasedRoutingServiceClient::policyBasedRouteName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkConnectivity\V1\GetPolicyBasedRouteRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the PolicyBasedRoute resource to get. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkconnectivity\V1\PolicyBasedRouting::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the PolicyBasedRoute resource to get. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the PolicyBasedRoute resource to get. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/GetRouteRequest.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/GetRouteRequest.php new file mode 100644 index 000000000000..beaedda82648 --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/GetRouteRequest.php @@ -0,0 +1,82 @@ +google.cloud.networkconnectivity.v1.GetRouteRequest + */ +class GetRouteRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the route resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the route resource. Please see + * {@see HubServiceClient::hubRouteName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkConnectivity\V1\GetRouteRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the route resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the route resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the route resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/GetRouteTableRequest.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/GetRouteTableRequest.php new file mode 100644 index 000000000000..bea2175034fb --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/GetRouteTableRequest.php @@ -0,0 +1,82 @@ +google.cloud.networkconnectivity.v1.GetRouteTableRequest + */ +class GetRouteTableRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the route table resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the route table resource. Please see + * {@see HubServiceClient::routeTableName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkConnectivity\V1\GetRouteTableRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the route table resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the route table resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the route table resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/GetSpokeRequest.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/GetSpokeRequest.php new file mode 100644 index 000000000000..bd9bbd634b42 --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/GetSpokeRequest.php @@ -0,0 +1,82 @@ +google.cloud.networkconnectivity.v1.GetSpokeRequest + */ +class GetSpokeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the spoke resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the spoke resource. Please see + * {@see HubServiceClient::spokeName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkConnectivity\V1\GetSpokeRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the spoke resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the spoke resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the spoke resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/Group.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/Group.php new file mode 100644 index 000000000000..b13397c41ba0 --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/Group.php @@ -0,0 +1,405 @@ +google.cloud.networkconnectivity.v1.Group + */ +class Group extends \Google\Protobuf\Internal\Message +{ + /** + * Immutable. The name of the group. Group names must be unique. They + * use the following form: + * `projects/{project_number}/locations/global/hubs/{hub}/groups/{group_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $name = ''; + /** + * Output only. The time the group was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The time the group was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Optional. Labels in key-value pair format. For more information about + * labels, see [Requirements for + * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements). + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Optional. The description of the group. + * + * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Output only. The Google-generated UUID for the group. This value is unique + * across all group resources. If a group is deleted and + * another with the same name is created, the new route table is assigned + * a different unique_id. + * + * Generated from protobuf field string uid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $uid = ''; + /** + * Output only. The current lifecycle state of this group. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Optional. The auto-accept setting for this group. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.AutoAccept auto_accept = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $auto_accept = null; + /** + * Output only. The name of the route table that corresponds to this group. + * They use the following form: + * `projects/{project_number}/locations/global/hubs/{hub_id}/routeTables/{route_table_id}` + * + * Generated from protobuf field string route_table = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $route_table = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Immutable. The name of the group. Group names must be unique. They + * use the following form: + * `projects/{project_number}/locations/global/hubs/{hub}/groups/{group_id}` + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time the group was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The time the group was last updated. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. Labels in key-value pair format. For more information about + * labels, see [Requirements for + * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements). + * @type string $description + * Optional. The description of the group. + * @type string $uid + * Output only. The Google-generated UUID for the group. This value is unique + * across all group resources. If a group is deleted and + * another with the same name is created, the new route table is assigned + * a different unique_id. + * @type int $state + * Output only. The current lifecycle state of this group. + * @type \Google\Cloud\NetworkConnectivity\V1\AutoAccept $auto_accept + * Optional. The auto-accept setting for this group. + * @type string $route_table + * Output only. The name of the route table that corresponds to this group. + * They use the following form: + * `projects/{project_number}/locations/global/hubs/{hub_id}/routeTables/{route_table_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); + parent::__construct($data); + } + + /** + * Immutable. The name of the group. Group names must be unique. They + * use the following form: + * `projects/{project_number}/locations/global/hubs/{hub}/groups/{group_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Immutable. The name of the group. Group names must be unique. They + * use the following form: + * `projects/{project_number}/locations/global/hubs/{hub}/groups/{group_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The time the group was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The time the group was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The time the group was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The time the group was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Optional. Labels in key-value pair format. For more information about + * labels, see [Requirements for + * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements). + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. Labels in key-value pair format. For more information about + * labels, see [Requirements for + * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements). + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Optional. The description of the group. + * + * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. The description of the group. + * + * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Output only. The Google-generated UUID for the group. This value is unique + * across all group resources. If a group is deleted and + * another with the same name is created, the new route table is assigned + * a different unique_id. + * + * Generated from protobuf field string uid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * Output only. The Google-generated UUID for the group. This value is unique + * across all group resources. If a group is deleted and + * another with the same name is created, the new route table is assigned + * a different unique_id. + * + * Generated from protobuf field string uid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setUid($var) + { + GPBUtil::checkString($var, True); + $this->uid = $var; + + return $this; + } + + /** + * Output only. The current lifecycle state of this group. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The current lifecycle state of this group. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetworkConnectivity\V1\State::class); + $this->state = $var; + + return $this; + } + + /** + * Optional. The auto-accept setting for this group. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.AutoAccept auto_accept = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\NetworkConnectivity\V1\AutoAccept|null + */ + public function getAutoAccept() + { + return $this->auto_accept; + } + + public function hasAutoAccept() + { + return isset($this->auto_accept); + } + + public function clearAutoAccept() + { + unset($this->auto_accept); + } + + /** + * Optional. The auto-accept setting for this group. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.AutoAccept auto_accept = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\NetworkConnectivity\V1\AutoAccept $var + * @return $this + */ + public function setAutoAccept($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkConnectivity\V1\AutoAccept::class); + $this->auto_accept = $var; + + return $this; + } + + /** + * Output only. The name of the route table that corresponds to this group. + * They use the following form: + * `projects/{project_number}/locations/global/hubs/{hub_id}/routeTables/{route_table_id}` + * + * Generated from protobuf field string route_table = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getRouteTable() + { + return $this->route_table; + } + + /** + * Output only. The name of the route table that corresponds to this group. + * They use the following form: + * `projects/{project_number}/locations/global/hubs/{hub_id}/routeTables/{route_table_id}` + * + * Generated from protobuf field string route_table = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setRouteTable($var) + { + GPBUtil::checkString($var, True); + $this->route_table = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/Hub.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/Hub.php new file mode 100644 index 000000000000..b6c849960ad8 --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/Hub.php @@ -0,0 +1,620 @@ +google.cloud.networkconnectivity.v1.Hub + */ +class Hub extends \Google\Protobuf\Internal\Message +{ + /** + * Immutable. The name of the hub. Hub names must be unique. They use the + * following form: + * `projects/{project_number}/locations/global/hubs/{hub_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $name = ''; + /** + * Output only. The time the hub was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The time the hub was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Optional labels in key-value pair format. For more information about + * labels, see [Requirements for + * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements). + * + * Generated from protobuf field map labels = 4; + */ + private $labels; + /** + * An optional description of the hub. + * + * Generated from protobuf field string description = 5; + */ + protected $description = ''; + /** + * Output only. The Google-generated UUID for the hub. This value is unique + * across all hub resources. If a hub is deleted and another with the same + * name is created, the new hub is assigned a different unique_id. + * + * Generated from protobuf field string unique_id = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $unique_id = ''; + /** + * Output only. The current lifecycle state of this hub. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * The VPC networks associated with this hub's spokes. + * This field is read-only. Network Connectivity Center automatically + * populates it based on the set of spokes attached to the hub. + * + * Generated from protobuf field repeated .google.cloud.networkconnectivity.v1.RoutingVPC routing_vpcs = 10; + */ + private $routing_vpcs; + /** + * Output only. The route tables that belong to this hub. They use the + * following form: + * `projects/{project_number}/locations/global/hubs/{hub_id}/routeTables/{route_table_id}` + * This field is read-only. Network Connectivity Center automatically + * populates it based on the route tables nested under the hub. + * + * Generated from protobuf field repeated string route_tables = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $route_tables; + /** + * Output only. A summary of the spokes associated with a hub. The + * summary includes a count of spokes according to type + * and according to state. If any spokes are inactive, + * the summary also lists the reasons they are inactive, + * including a count for each reason. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.SpokeSummary spoke_summary = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $spoke_summary = null; + /** + * Optional. The policy mode of this hub. This field can be either + * PRESET or CUSTOM. If unspecified, the + * policy_mode defaults to PRESET. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.PolicyMode policy_mode = 13 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $policy_mode = 0; + /** + * Optional. The topology implemented in this hub. Currently, this field is + * only used when policy_mode = PRESET. The available preset topologies are + * MESH and STAR. If preset_topology is unspecified and policy_mode = PRESET, + * the preset_topology defaults to MESH. When policy_mode = CUSTOM, + * the preset_topology is set to PRESET_TOPOLOGY_UNSPECIFIED. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.PresetTopology preset_topology = 14 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $preset_topology = 0; + /** + * Optional. Whether Private Service Connect transitivity is enabled for the + * hub. If true, Private Service Connect endpoints in VPC spokes attached to + * the hub are made accessible to other VPC spokes attached to the hub. + * The default value is false. + * + * Generated from protobuf field optional bool export_psc = 15 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $export_psc = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Immutable. The name of the hub. Hub names must be unique. They use the + * following form: + * `projects/{project_number}/locations/global/hubs/{hub_id}` + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time the hub was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The time the hub was last updated. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional labels in key-value pair format. For more information about + * labels, see [Requirements for + * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements). + * @type string $description + * An optional description of the hub. + * @type string $unique_id + * Output only. The Google-generated UUID for the hub. This value is unique + * across all hub resources. If a hub is deleted and another with the same + * name is created, the new hub is assigned a different unique_id. + * @type int $state + * Output only. The current lifecycle state of this hub. + * @type array<\Google\Cloud\NetworkConnectivity\V1\RoutingVPC>|\Google\Protobuf\Internal\RepeatedField $routing_vpcs + * The VPC networks associated with this hub's spokes. + * This field is read-only. Network Connectivity Center automatically + * populates it based on the set of spokes attached to the hub. + * @type array|\Google\Protobuf\Internal\RepeatedField $route_tables + * Output only. The route tables that belong to this hub. They use the + * following form: + * `projects/{project_number}/locations/global/hubs/{hub_id}/routeTables/{route_table_id}` + * This field is read-only. Network Connectivity Center automatically + * populates it based on the route tables nested under the hub. + * @type \Google\Cloud\NetworkConnectivity\V1\SpokeSummary $spoke_summary + * Output only. A summary of the spokes associated with a hub. The + * summary includes a count of spokes according to type + * and according to state. If any spokes are inactive, + * the summary also lists the reasons they are inactive, + * including a count for each reason. + * @type int $policy_mode + * Optional. The policy mode of this hub. This field can be either + * PRESET or CUSTOM. If unspecified, the + * policy_mode defaults to PRESET. + * @type int $preset_topology + * Optional. The topology implemented in this hub. Currently, this field is + * only used when policy_mode = PRESET. The available preset topologies are + * MESH and STAR. If preset_topology is unspecified and policy_mode = PRESET, + * the preset_topology defaults to MESH. When policy_mode = CUSTOM, + * the preset_topology is set to PRESET_TOPOLOGY_UNSPECIFIED. + * @type bool $export_psc + * Optional. Whether Private Service Connect transitivity is enabled for the + * hub. If true, Private Service Connect endpoints in VPC spokes attached to + * the hub are made accessible to other VPC spokes attached to the hub. + * The default value is false. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); + parent::__construct($data); + } + + /** + * Immutable. The name of the hub. Hub names must be unique. They use the + * following form: + * `projects/{project_number}/locations/global/hubs/{hub_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Immutable. The name of the hub. Hub names must be unique. They use the + * following form: + * `projects/{project_number}/locations/global/hubs/{hub_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The time the hub was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The time the hub was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The time the hub was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The time the hub was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Optional labels in key-value pair format. For more information about + * labels, see [Requirements for + * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements). + * + * Generated from protobuf field map labels = 4; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional labels in key-value pair format. For more information about + * labels, see [Requirements for + * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements). + * + * Generated from protobuf field map labels = 4; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * An optional description of the hub. + * + * Generated from protobuf field string description = 5; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * An optional description of the hub. + * + * Generated from protobuf field string description = 5; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Output only. The Google-generated UUID for the hub. This value is unique + * across all hub resources. If a hub is deleted and another with the same + * name is created, the new hub is assigned a different unique_id. + * + * Generated from protobuf field string unique_id = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUniqueId() + { + return $this->unique_id; + } + + /** + * Output only. The Google-generated UUID for the hub. This value is unique + * across all hub resources. If a hub is deleted and another with the same + * name is created, the new hub is assigned a different unique_id. + * + * Generated from protobuf field string unique_id = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setUniqueId($var) + { + GPBUtil::checkString($var, True); + $this->unique_id = $var; + + return $this; + } + + /** + * Output only. The current lifecycle state of this hub. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The current lifecycle state of this hub. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetworkConnectivity\V1\State::class); + $this->state = $var; + + return $this; + } + + /** + * The VPC networks associated with this hub's spokes. + * This field is read-only. Network Connectivity Center automatically + * populates it based on the set of spokes attached to the hub. + * + * Generated from protobuf field repeated .google.cloud.networkconnectivity.v1.RoutingVPC routing_vpcs = 10; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRoutingVpcs() + { + return $this->routing_vpcs; + } + + /** + * The VPC networks associated with this hub's spokes. + * This field is read-only. Network Connectivity Center automatically + * populates it based on the set of spokes attached to the hub. + * + * Generated from protobuf field repeated .google.cloud.networkconnectivity.v1.RoutingVPC routing_vpcs = 10; + * @param array<\Google\Cloud\NetworkConnectivity\V1\RoutingVPC>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRoutingVpcs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkConnectivity\V1\RoutingVPC::class); + $this->routing_vpcs = $arr; + + return $this; + } + + /** + * Output only. The route tables that belong to this hub. They use the + * following form: + * `projects/{project_number}/locations/global/hubs/{hub_id}/routeTables/{route_table_id}` + * This field is read-only. Network Connectivity Center automatically + * populates it based on the route tables nested under the hub. + * + * Generated from protobuf field repeated string route_tables = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRouteTables() + { + return $this->route_tables; + } + + /** + * Output only. The route tables that belong to this hub. They use the + * following form: + * `projects/{project_number}/locations/global/hubs/{hub_id}/routeTables/{route_table_id}` + * This field is read-only. Network Connectivity Center automatically + * populates it based on the route tables nested under the hub. + * + * Generated from protobuf field repeated string route_tables = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRouteTables($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->route_tables = $arr; + + return $this; + } + + /** + * Output only. A summary of the spokes associated with a hub. The + * summary includes a count of spokes according to type + * and according to state. If any spokes are inactive, + * the summary also lists the reasons they are inactive, + * including a count for each reason. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.SpokeSummary spoke_summary = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\NetworkConnectivity\V1\SpokeSummary|null + */ + public function getSpokeSummary() + { + return $this->spoke_summary; + } + + public function hasSpokeSummary() + { + return isset($this->spoke_summary); + } + + public function clearSpokeSummary() + { + unset($this->spoke_summary); + } + + /** + * Output only. A summary of the spokes associated with a hub. The + * summary includes a count of spokes according to type + * and according to state. If any spokes are inactive, + * the summary also lists the reasons they are inactive, + * including a count for each reason. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.SpokeSummary spoke_summary = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\NetworkConnectivity\V1\SpokeSummary $var + * @return $this + */ + public function setSpokeSummary($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkConnectivity\V1\SpokeSummary::class); + $this->spoke_summary = $var; + + return $this; + } + + /** + * Optional. The policy mode of this hub. This field can be either + * PRESET or CUSTOM. If unspecified, the + * policy_mode defaults to PRESET. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.PolicyMode policy_mode = 13 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPolicyMode() + { + return $this->policy_mode; + } + + /** + * Optional. The policy mode of this hub. This field can be either + * PRESET or CUSTOM. If unspecified, the + * policy_mode defaults to PRESET. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.PolicyMode policy_mode = 13 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPolicyMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetworkConnectivity\V1\PolicyMode::class); + $this->policy_mode = $var; + + return $this; + } + + /** + * Optional. The topology implemented in this hub. Currently, this field is + * only used when policy_mode = PRESET. The available preset topologies are + * MESH and STAR. If preset_topology is unspecified and policy_mode = PRESET, + * the preset_topology defaults to MESH. When policy_mode = CUSTOM, + * the preset_topology is set to PRESET_TOPOLOGY_UNSPECIFIED. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.PresetTopology preset_topology = 14 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPresetTopology() + { + return $this->preset_topology; + } + + /** + * Optional. The topology implemented in this hub. Currently, this field is + * only used when policy_mode = PRESET. The available preset topologies are + * MESH and STAR. If preset_topology is unspecified and policy_mode = PRESET, + * the preset_topology defaults to MESH. When policy_mode = CUSTOM, + * the preset_topology is set to PRESET_TOPOLOGY_UNSPECIFIED. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.PresetTopology preset_topology = 14 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPresetTopology($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetworkConnectivity\V1\PresetTopology::class); + $this->preset_topology = $var; + + return $this; + } + + /** + * Optional. Whether Private Service Connect transitivity is enabled for the + * hub. If true, Private Service Connect endpoints in VPC spokes attached to + * the hub are made accessible to other VPC spokes attached to the hub. + * The default value is false. + * + * Generated from protobuf field optional bool export_psc = 15 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getExportPsc() + { + return isset($this->export_psc) ? $this->export_psc : false; + } + + public function hasExportPsc() + { + return isset($this->export_psc); + } + + public function clearExportPsc() + { + unset($this->export_psc); + } + + /** + * Optional. Whether Private Service Connect transitivity is enabled for the + * hub. If true, Private Service Connect endpoints in VPC spokes attached to + * the hub are made accessible to other VPC spokes attached to the hub. + * The default value is false. + * + * Generated from protobuf field optional bool export_psc = 15 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setExportPsc($var) + { + GPBUtil::checkBool($var); + $this->export_psc = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/HubStatusEntry.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/HubStatusEntry.php new file mode 100644 index 000000000000..b4bc5e82a6ab --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/HubStatusEntry.php @@ -0,0 +1,158 @@ +google.cloud.networkconnectivity.v1.HubStatusEntry + */ +class HubStatusEntry extends \Google\Protobuf\Internal\Message +{ + /** + * The number of propagated Private Service Connect connections with this + * status. If the `group_by` field was not set in the request message, the + * value of this field is 1. + * + * Generated from protobuf field int32 count = 1; + */ + protected $count = 0; + /** + * The fields that this entry is grouped by. This has the same value as the + * `group_by` field in the request message. + * + * Generated from protobuf field string group_by = 2; + */ + protected $group_by = ''; + /** + * The Private Service Connect propagation status. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.PscPropagationStatus psc_propagation_status = 3; + */ + protected $psc_propagation_status = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $count + * The number of propagated Private Service Connect connections with this + * status. If the `group_by` field was not set in the request message, the + * value of this field is 1. + * @type string $group_by + * The fields that this entry is grouped by. This has the same value as the + * `group_by` field in the request message. + * @type \Google\Cloud\NetworkConnectivity\V1\PscPropagationStatus $psc_propagation_status + * The Private Service Connect propagation status. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); + parent::__construct($data); + } + + /** + * The number of propagated Private Service Connect connections with this + * status. If the `group_by` field was not set in the request message, the + * value of this field is 1. + * + * Generated from protobuf field int32 count = 1; + * @return int + */ + public function getCount() + { + return $this->count; + } + + /** + * The number of propagated Private Service Connect connections with this + * status. If the `group_by` field was not set in the request message, the + * value of this field is 1. + * + * Generated from protobuf field int32 count = 1; + * @param int $var + * @return $this + */ + public function setCount($var) + { + GPBUtil::checkInt32($var); + $this->count = $var; + + return $this; + } + + /** + * The fields that this entry is grouped by. This has the same value as the + * `group_by` field in the request message. + * + * Generated from protobuf field string group_by = 2; + * @return string + */ + public function getGroupBy() + { + return $this->group_by; + } + + /** + * The fields that this entry is grouped by. This has the same value as the + * `group_by` field in the request message. + * + * Generated from protobuf field string group_by = 2; + * @param string $var + * @return $this + */ + public function setGroupBy($var) + { + GPBUtil::checkString($var, True); + $this->group_by = $var; + + return $this; + } + + /** + * The Private Service Connect propagation status. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.PscPropagationStatus psc_propagation_status = 3; + * @return \Google\Cloud\NetworkConnectivity\V1\PscPropagationStatus|null + */ + public function getPscPropagationStatus() + { + return $this->psc_propagation_status; + } + + public function hasPscPropagationStatus() + { + return isset($this->psc_propagation_status); + } + + public function clearPscPropagationStatus() + { + unset($this->psc_propagation_status); + } + + /** + * The Private Service Connect propagation status. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.PscPropagationStatus psc_propagation_status = 3; + * @param \Google\Cloud\NetworkConnectivity\V1\PscPropagationStatus $var + * @return $this + */ + public function setPscPropagationStatus($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkConnectivity\V1\PscPropagationStatus::class); + $this->psc_propagation_status = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/LinkedInterconnectAttachments.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/LinkedInterconnectAttachments.php new file mode 100644 index 000000000000..4d4ccdaf5b9d --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/LinkedInterconnectAttachments.php @@ -0,0 +1,188 @@ +google.cloud.networkconnectivity.v1.LinkedInterconnectAttachments + */ +class LinkedInterconnectAttachments extends \Google\Protobuf\Internal\Message +{ + /** + * The URIs of linked interconnect attachment resources + * + * Generated from protobuf field repeated string uris = 1 [(.google.api.resource_reference) = { + */ + private $uris; + /** + * A value that controls whether site-to-site data transfer is enabled for + * these resources. Data transfer is available only in [supported + * locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations). + * + * Generated from protobuf field bool site_to_site_data_transfer = 2; + */ + protected $site_to_site_data_transfer = false; + /** + * Output only. The VPC network where these VLAN attachments are located. + * + * Generated from protobuf field string vpc_network = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $vpc_network = ''; + /** + * Optional. IP ranges allowed to be included during import from hub (does not + * control transit connectivity). The only allowed value for now is + * "ALL_IPV4_RANGES". + * + * Generated from protobuf field repeated string include_import_ranges = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $include_import_ranges; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $uris + * The URIs of linked interconnect attachment resources + * @type bool $site_to_site_data_transfer + * A value that controls whether site-to-site data transfer is enabled for + * these resources. Data transfer is available only in [supported + * locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations). + * @type string $vpc_network + * Output only. The VPC network where these VLAN attachments are located. + * @type array|\Google\Protobuf\Internal\RepeatedField $include_import_ranges + * Optional. IP ranges allowed to be included during import from hub (does not + * control transit connectivity). The only allowed value for now is + * "ALL_IPV4_RANGES". + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); + parent::__construct($data); + } + + /** + * The URIs of linked interconnect attachment resources + * + * Generated from protobuf field repeated string uris = 1 [(.google.api.resource_reference) = { + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUris() + { + return $this->uris; + } + + /** + * The URIs of linked interconnect attachment resources + * + * Generated from protobuf field repeated string uris = 1 [(.google.api.resource_reference) = { + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUris($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->uris = $arr; + + return $this; + } + + /** + * A value that controls whether site-to-site data transfer is enabled for + * these resources. Data transfer is available only in [supported + * locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations). + * + * Generated from protobuf field bool site_to_site_data_transfer = 2; + * @return bool + */ + public function getSiteToSiteDataTransfer() + { + return $this->site_to_site_data_transfer; + } + + /** + * A value that controls whether site-to-site data transfer is enabled for + * these resources. Data transfer is available only in [supported + * locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations). + * + * Generated from protobuf field bool site_to_site_data_transfer = 2; + * @param bool $var + * @return $this + */ + public function setSiteToSiteDataTransfer($var) + { + GPBUtil::checkBool($var); + $this->site_to_site_data_transfer = $var; + + return $this; + } + + /** + * Output only. The VPC network where these VLAN attachments are located. + * + * Generated from protobuf field string vpc_network = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getVpcNetwork() + { + return $this->vpc_network; + } + + /** + * Output only. The VPC network where these VLAN attachments are located. + * + * Generated from protobuf field string vpc_network = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setVpcNetwork($var) + { + GPBUtil::checkString($var, True); + $this->vpc_network = $var; + + return $this; + } + + /** + * Optional. IP ranges allowed to be included during import from hub (does not + * control transit connectivity). The only allowed value for now is + * "ALL_IPV4_RANGES". + * + * Generated from protobuf field repeated string include_import_ranges = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getIncludeImportRanges() + { + return $this->include_import_ranges; + } + + /** + * Optional. IP ranges allowed to be included during import from hub (does not + * control transit connectivity). The only allowed value for now is + * "ALL_IPV4_RANGES". + * + * Generated from protobuf field repeated string include_import_ranges = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setIncludeImportRanges($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->include_import_ranges = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/LinkedProducerVpcNetwork.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/LinkedProducerVpcNetwork.php new file mode 100644 index 000000000000..bdf9e96486cf --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/LinkedProducerVpcNetwork.php @@ -0,0 +1,247 @@ +google.cloud.networkconnectivity.v1.LinkedProducerVpcNetwork + */ +class LinkedProducerVpcNetwork extends \Google\Protobuf\Internal\Message +{ + /** + * Immutable. The URI of the Service Consumer VPC that the Producer VPC is + * peered with. + * + * Generated from protobuf field string network = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + */ + protected $network = ''; + /** + * Output only. The Service Consumer Network spoke. + * + * Generated from protobuf field string service_consumer_vpc_spoke = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $service_consumer_vpc_spoke = ''; + /** + * Immutable. The name of the VPC peering between the Service Consumer VPC and + * the Producer VPC (defined in the Tenant project) which is added to the NCC + * hub. This peering must be in ACTIVE state. + * + * Generated from protobuf field string peering = 2 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $peering = ''; + /** + * Output only. The URI of the Producer VPC. + * + * Generated from protobuf field string producer_network = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $producer_network = ''; + /** + * Optional. IP ranges encompassing the subnets to be excluded from peering. + * + * Generated from protobuf field repeated string exclude_export_ranges = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $exclude_export_ranges; + /** + * Optional. IP ranges allowed to be included from peering. + * + * Generated from protobuf field repeated string include_export_ranges = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $include_export_ranges; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $network + * Immutable. The URI of the Service Consumer VPC that the Producer VPC is + * peered with. + * @type string $service_consumer_vpc_spoke + * Output only. The Service Consumer Network spoke. + * @type string $peering + * Immutable. The name of the VPC peering between the Service Consumer VPC and + * the Producer VPC (defined in the Tenant project) which is added to the NCC + * hub. This peering must be in ACTIVE state. + * @type string $producer_network + * Output only. The URI of the Producer VPC. + * @type array|\Google\Protobuf\Internal\RepeatedField $exclude_export_ranges + * Optional. IP ranges encompassing the subnets to be excluded from peering. + * @type array|\Google\Protobuf\Internal\RepeatedField $include_export_ranges + * Optional. IP ranges allowed to be included from peering. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); + parent::__construct($data); + } + + /** + * Immutable. The URI of the Service Consumer VPC that the Producer VPC is + * peered with. + * + * Generated from protobuf field string network = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + * @return string + */ + public function getNetwork() + { + return $this->network; + } + + /** + * Immutable. The URI of the Service Consumer VPC that the Producer VPC is + * peered with. + * + * Generated from protobuf field string network = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setNetwork($var) + { + GPBUtil::checkString($var, True); + $this->network = $var; + + return $this; + } + + /** + * Output only. The Service Consumer Network spoke. + * + * Generated from protobuf field string service_consumer_vpc_spoke = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getServiceConsumerVpcSpoke() + { + return $this->service_consumer_vpc_spoke; + } + + /** + * Output only. The Service Consumer Network spoke. + * + * Generated from protobuf field string service_consumer_vpc_spoke = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setServiceConsumerVpcSpoke($var) + { + GPBUtil::checkString($var, True); + $this->service_consumer_vpc_spoke = $var; + + return $this; + } + + /** + * Immutable. The name of the VPC peering between the Service Consumer VPC and + * the Producer VPC (defined in the Tenant project) which is added to the NCC + * hub. This peering must be in ACTIVE state. + * + * Generated from protobuf field string peering = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getPeering() + { + return $this->peering; + } + + /** + * Immutable. The name of the VPC peering between the Service Consumer VPC and + * the Producer VPC (defined in the Tenant project) which is added to the NCC + * hub. This peering must be in ACTIVE state. + * + * Generated from protobuf field string peering = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * @param string $var + * @return $this + */ + public function setPeering($var) + { + GPBUtil::checkString($var, True); + $this->peering = $var; + + return $this; + } + + /** + * Output only. The URI of the Producer VPC. + * + * Generated from protobuf field string producer_network = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getProducerNetwork() + { + return $this->producer_network; + } + + /** + * Output only. The URI of the Producer VPC. + * + * Generated from protobuf field string producer_network = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setProducerNetwork($var) + { + GPBUtil::checkString($var, True); + $this->producer_network = $var; + + return $this; + } + + /** + * Optional. IP ranges encompassing the subnets to be excluded from peering. + * + * Generated from protobuf field repeated string exclude_export_ranges = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getExcludeExportRanges() + { + return $this->exclude_export_ranges; + } + + /** + * Optional. IP ranges encompassing the subnets to be excluded from peering. + * + * Generated from protobuf field repeated string exclude_export_ranges = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setExcludeExportRanges($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->exclude_export_ranges = $arr; + + return $this; + } + + /** + * Optional. IP ranges allowed to be included from peering. + * + * Generated from protobuf field repeated string include_export_ranges = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getIncludeExportRanges() + { + return $this->include_export_ranges; + } + + /** + * Optional. IP ranges allowed to be included from peering. + * + * Generated from protobuf field repeated string include_export_ranges = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setIncludeExportRanges($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->include_export_ranges = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/LinkedRouterApplianceInstances.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/LinkedRouterApplianceInstances.php new file mode 100644 index 000000000000..b014d55b68c9 --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/LinkedRouterApplianceInstances.php @@ -0,0 +1,192 @@ +google.cloud.networkconnectivity.v1.LinkedRouterApplianceInstances + */ +class LinkedRouterApplianceInstances extends \Google\Protobuf\Internal\Message +{ + /** + * The list of router appliance instances. + * + * Generated from protobuf field repeated .google.cloud.networkconnectivity.v1.RouterApplianceInstance instances = 1; + */ + private $instances; + /** + * A value that controls whether site-to-site data transfer is enabled for + * these resources. Data transfer is available only in [supported + * locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations). + * + * Generated from protobuf field bool site_to_site_data_transfer = 2; + */ + protected $site_to_site_data_transfer = false; + /** + * Output only. The VPC network where these router appliance instances are + * located. + * + * Generated from protobuf field string vpc_network = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $vpc_network = ''; + /** + * Optional. IP ranges allowed to be included during import from hub (does not + * control transit connectivity). The only allowed value for now is + * "ALL_IPV4_RANGES". + * + * Generated from protobuf field repeated string include_import_ranges = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $include_import_ranges; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\NetworkConnectivity\V1\RouterApplianceInstance>|\Google\Protobuf\Internal\RepeatedField $instances + * The list of router appliance instances. + * @type bool $site_to_site_data_transfer + * A value that controls whether site-to-site data transfer is enabled for + * these resources. Data transfer is available only in [supported + * locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations). + * @type string $vpc_network + * Output only. The VPC network where these router appliance instances are + * located. + * @type array|\Google\Protobuf\Internal\RepeatedField $include_import_ranges + * Optional. IP ranges allowed to be included during import from hub (does not + * control transit connectivity). The only allowed value for now is + * "ALL_IPV4_RANGES". + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); + parent::__construct($data); + } + + /** + * The list of router appliance instances. + * + * Generated from protobuf field repeated .google.cloud.networkconnectivity.v1.RouterApplianceInstance instances = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getInstances() + { + return $this->instances; + } + + /** + * The list of router appliance instances. + * + * Generated from protobuf field repeated .google.cloud.networkconnectivity.v1.RouterApplianceInstance instances = 1; + * @param array<\Google\Cloud\NetworkConnectivity\V1\RouterApplianceInstance>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setInstances($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkConnectivity\V1\RouterApplianceInstance::class); + $this->instances = $arr; + + return $this; + } + + /** + * A value that controls whether site-to-site data transfer is enabled for + * these resources. Data transfer is available only in [supported + * locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations). + * + * Generated from protobuf field bool site_to_site_data_transfer = 2; + * @return bool + */ + public function getSiteToSiteDataTransfer() + { + return $this->site_to_site_data_transfer; + } + + /** + * A value that controls whether site-to-site data transfer is enabled for + * these resources. Data transfer is available only in [supported + * locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations). + * + * Generated from protobuf field bool site_to_site_data_transfer = 2; + * @param bool $var + * @return $this + */ + public function setSiteToSiteDataTransfer($var) + { + GPBUtil::checkBool($var); + $this->site_to_site_data_transfer = $var; + + return $this; + } + + /** + * Output only. The VPC network where these router appliance instances are + * located. + * + * Generated from protobuf field string vpc_network = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getVpcNetwork() + { + return $this->vpc_network; + } + + /** + * Output only. The VPC network where these router appliance instances are + * located. + * + * Generated from protobuf field string vpc_network = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setVpcNetwork($var) + { + GPBUtil::checkString($var, True); + $this->vpc_network = $var; + + return $this; + } + + /** + * Optional. IP ranges allowed to be included during import from hub (does not + * control transit connectivity). The only allowed value for now is + * "ALL_IPV4_RANGES". + * + * Generated from protobuf field repeated string include_import_ranges = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getIncludeImportRanges() + { + return $this->include_import_ranges; + } + + /** + * Optional. IP ranges allowed to be included during import from hub (does not + * control transit connectivity). The only allowed value for now is + * "ALL_IPV4_RANGES". + * + * Generated from protobuf field repeated string include_import_ranges = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setIncludeImportRanges($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->include_import_ranges = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/LinkedVpcNetwork.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/LinkedVpcNetwork.php new file mode 100644 index 000000000000..69ef64e53839 --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/LinkedVpcNetwork.php @@ -0,0 +1,177 @@ +google.cloud.networkconnectivity.v1.LinkedVpcNetwork + */ +class LinkedVpcNetwork extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The URI of the VPC network resource. + * + * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $uri = ''; + /** + * Optional. IP ranges encompassing the subnets to be excluded from peering. + * + * Generated from protobuf field repeated string exclude_export_ranges = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $exclude_export_ranges; + /** + * Optional. IP ranges allowed to be included from peering. + * + * Generated from protobuf field repeated string include_export_ranges = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $include_export_ranges; + /** + * Output only. The list of Producer VPC spokes that this VPC spoke is a + * service consumer VPC spoke for. These producer VPCs are connected through + * VPC peering to this spoke's backing VPC network. + * + * Generated from protobuf field repeated string producer_vpc_spokes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + private $producer_vpc_spokes; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $uri + * Required. The URI of the VPC network resource. + * @type array|\Google\Protobuf\Internal\RepeatedField $exclude_export_ranges + * Optional. IP ranges encompassing the subnets to be excluded from peering. + * @type array|\Google\Protobuf\Internal\RepeatedField $include_export_ranges + * Optional. IP ranges allowed to be included from peering. + * @type array|\Google\Protobuf\Internal\RepeatedField $producer_vpc_spokes + * Output only. The list of Producer VPC spokes that this VPC spoke is a + * service consumer VPC spoke for. These producer VPCs are connected through + * VPC peering to this spoke's backing VPC network. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); + parent::__construct($data); + } + + /** + * Required. The URI of the VPC network resource. + * + * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * Required. The URI of the VPC network resource. + * + * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setUri($var) + { + GPBUtil::checkString($var, True); + $this->uri = $var; + + return $this; + } + + /** + * Optional. IP ranges encompassing the subnets to be excluded from peering. + * + * Generated from protobuf field repeated string exclude_export_ranges = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getExcludeExportRanges() + { + return $this->exclude_export_ranges; + } + + /** + * Optional. IP ranges encompassing the subnets to be excluded from peering. + * + * Generated from protobuf field repeated string exclude_export_ranges = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setExcludeExportRanges($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->exclude_export_ranges = $arr; + + return $this; + } + + /** + * Optional. IP ranges allowed to be included from peering. + * + * Generated from protobuf field repeated string include_export_ranges = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getIncludeExportRanges() + { + return $this->include_export_ranges; + } + + /** + * Optional. IP ranges allowed to be included from peering. + * + * Generated from protobuf field repeated string include_export_ranges = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setIncludeExportRanges($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->include_export_ranges = $arr; + + return $this; + } + + /** + * Output only. The list of Producer VPC spokes that this VPC spoke is a + * service consumer VPC spoke for. These producer VPCs are connected through + * VPC peering to this spoke's backing VPC network. + * + * Generated from protobuf field repeated string producer_vpc_spokes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getProducerVpcSpokes() + { + return $this->producer_vpc_spokes; + } + + /** + * Output only. The list of Producer VPC spokes that this VPC spoke is a + * service consumer VPC spoke for. These producer VPCs are connected through + * VPC peering to this spoke's backing VPC network. + * + * Generated from protobuf field repeated string producer_vpc_spokes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setProducerVpcSpokes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->producer_vpc_spokes = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/LinkedVpnTunnels.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/LinkedVpnTunnels.php new file mode 100644 index 000000000000..7a91b8dd5fe5 --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/LinkedVpnTunnels.php @@ -0,0 +1,188 @@ +google.cloud.networkconnectivity.v1.LinkedVpnTunnels + */ +class LinkedVpnTunnels extends \Google\Protobuf\Internal\Message +{ + /** + * The URIs of linked VPN tunnel resources. + * + * Generated from protobuf field repeated string uris = 1 [(.google.api.resource_reference) = { + */ + private $uris; + /** + * A value that controls whether site-to-site data transfer is enabled for + * these resources. Data transfer is available only in [supported + * locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations). + * + * Generated from protobuf field bool site_to_site_data_transfer = 2; + */ + protected $site_to_site_data_transfer = false; + /** + * Output only. The VPC network where these VPN tunnels are located. + * + * Generated from protobuf field string vpc_network = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $vpc_network = ''; + /** + * Optional. IP ranges allowed to be included during import from hub (does not + * control transit connectivity). The only allowed value for now is + * "ALL_IPV4_RANGES". + * + * Generated from protobuf field repeated string include_import_ranges = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $include_import_ranges; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $uris + * The URIs of linked VPN tunnel resources. + * @type bool $site_to_site_data_transfer + * A value that controls whether site-to-site data transfer is enabled for + * these resources. Data transfer is available only in [supported + * locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations). + * @type string $vpc_network + * Output only. The VPC network where these VPN tunnels are located. + * @type array|\Google\Protobuf\Internal\RepeatedField $include_import_ranges + * Optional. IP ranges allowed to be included during import from hub (does not + * control transit connectivity). The only allowed value for now is + * "ALL_IPV4_RANGES". + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); + parent::__construct($data); + } + + /** + * The URIs of linked VPN tunnel resources. + * + * Generated from protobuf field repeated string uris = 1 [(.google.api.resource_reference) = { + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUris() + { + return $this->uris; + } + + /** + * The URIs of linked VPN tunnel resources. + * + * Generated from protobuf field repeated string uris = 1 [(.google.api.resource_reference) = { + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUris($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->uris = $arr; + + return $this; + } + + /** + * A value that controls whether site-to-site data transfer is enabled for + * these resources. Data transfer is available only in [supported + * locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations). + * + * Generated from protobuf field bool site_to_site_data_transfer = 2; + * @return bool + */ + public function getSiteToSiteDataTransfer() + { + return $this->site_to_site_data_transfer; + } + + /** + * A value that controls whether site-to-site data transfer is enabled for + * these resources. Data transfer is available only in [supported + * locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations). + * + * Generated from protobuf field bool site_to_site_data_transfer = 2; + * @param bool $var + * @return $this + */ + public function setSiteToSiteDataTransfer($var) + { + GPBUtil::checkBool($var); + $this->site_to_site_data_transfer = $var; + + return $this; + } + + /** + * Output only. The VPC network where these VPN tunnels are located. + * + * Generated from protobuf field string vpc_network = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getVpcNetwork() + { + return $this->vpc_network; + } + + /** + * Output only. The VPC network where these VPN tunnels are located. + * + * Generated from protobuf field string vpc_network = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setVpcNetwork($var) + { + GPBUtil::checkString($var, True); + $this->vpc_network = $var; + + return $this; + } + + /** + * Optional. IP ranges allowed to be included during import from hub (does not + * control transit connectivity). The only allowed value for now is + * "ALL_IPV4_RANGES". + * + * Generated from protobuf field repeated string include_import_ranges = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getIncludeImportRanges() + { + return $this->include_import_ranges; + } + + /** + * Optional. IP ranges allowed to be included during import from hub (does not + * control transit connectivity). The only allowed value for now is + * "ALL_IPV4_RANGES". + * + * Generated from protobuf field repeated string include_import_ranges = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setIncludeImportRanges($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->include_import_ranges = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListGroupsRequest.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListGroupsRequest.php new file mode 100644 index 000000000000..085e83e39803 --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListGroupsRequest.php @@ -0,0 +1,219 @@ +google.cloud.networkconnectivity.v1.ListGroupsRequest + */ +class ListGroupsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource's name. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of results to return per page. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The page token. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * An expression that filters the list of results. + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + /** + * Sort the results by a certain order. + * + * Generated from protobuf field string order_by = 5; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The parent resource's name. Please see + * {@see HubServiceClient::hubName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkConnectivity\V1\ListGroupsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource's name. + * @type int $page_size + * The maximum number of results to return per page. + * @type string $page_token + * The page token. + * @type string $filter + * An expression that filters the list of results. + * @type string $order_by + * Sort the results by a certain order. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource's name. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource's name. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The maximum number of results to return per page. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of results to return per page. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The page token. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The page token. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * An expression that filters the list of results. + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * An expression that filters the list of results. + * + * Generated from protobuf field string filter = 4; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Sort the results by a certain order. + * + * Generated from protobuf field string order_by = 5; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Sort the results by a certain order. + * + * Generated from protobuf field string order_by = 5; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListGroupsResponse.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListGroupsResponse.php new file mode 100644 index 000000000000..46f49f57e807 --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListGroupsResponse.php @@ -0,0 +1,145 @@ +google.cloud.networkconnectivity.v1.ListGroupsResponse + */ +class ListGroupsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The requested groups. + * + * Generated from protobuf field repeated .google.cloud.networkconnectivity.v1.Group groups = 1; + */ + private $groups; + /** + * The token for the next page of the response. To see more results, + * use this value as the page_token for your next request. If this value + * is empty, there are no more results. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Hubs that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\NetworkConnectivity\V1\Group>|\Google\Protobuf\Internal\RepeatedField $groups + * The requested groups. + * @type string $next_page_token + * The token for the next page of the response. To see more results, + * use this value as the page_token for your next request. If this value + * is empty, there are no more results. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Hubs that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); + parent::__construct($data); + } + + /** + * The requested groups. + * + * Generated from protobuf field repeated .google.cloud.networkconnectivity.v1.Group groups = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getGroups() + { + return $this->groups; + } + + /** + * The requested groups. + * + * Generated from protobuf field repeated .google.cloud.networkconnectivity.v1.Group groups = 1; + * @param array<\Google\Cloud\NetworkConnectivity\V1\Group>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setGroups($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkConnectivity\V1\Group::class); + $this->groups = $arr; + + return $this; + } + + /** + * The token for the next page of the response. To see more results, + * use this value as the page_token for your next request. If this value + * is empty, there are no more results. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * The token for the next page of the response. To see more results, + * use this value as the page_token for your next request. If this value + * is empty, there are no more results. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Hubs that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Hubs that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListHubSpokesRequest.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListHubSpokesRequest.php new file mode 100644 index 000000000000..62c06d3b7a07 --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListHubSpokesRequest.php @@ -0,0 +1,322 @@ +google.cloud.networkconnectivity.v1.ListHubSpokesRequest + */ +class ListHubSpokesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the hub. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * A list of locations. + * Specify one of the following: `[global]`, a single region (for + * example, `[us-central1]`), or a combination of + * values (for example, `[global, us-central1, us-west1]`). + * If the spoke_locations field is populated, the list of results + * includes only spokes in the specified location. + * If the spoke_locations field is not populated, the list of results + * includes spokes in all locations. + * + * Generated from protobuf field repeated string spoke_locations = 2; + */ + private $spoke_locations; + /** + * The maximum number of results to return per page. + * + * Generated from protobuf field int32 page_size = 3; + */ + protected $page_size = 0; + /** + * The page token. + * + * Generated from protobuf field string page_token = 4; + */ + protected $page_token = ''; + /** + * An expression that filters the list of results. + * + * Generated from protobuf field string filter = 5; + */ + protected $filter = ''; + /** + * Sort the results by name or create_time. + * + * Generated from protobuf field string order_by = 6; + */ + protected $order_by = ''; + /** + * The view of the spoke to return. + * The view that you use determines which spoke fields are included in the + * response. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.ListHubSpokesRequest.SpokeView view = 7; + */ + protected $view = 0; + + /** + * @param string $name Required. The name of the hub. Please see + * {@see HubServiceClient::hubName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkConnectivity\V1\ListHubSpokesRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the hub. + * @type array|\Google\Protobuf\Internal\RepeatedField $spoke_locations + * A list of locations. + * Specify one of the following: `[global]`, a single region (for + * example, `[us-central1]`), or a combination of + * values (for example, `[global, us-central1, us-west1]`). + * If the spoke_locations field is populated, the list of results + * includes only spokes in the specified location. + * If the spoke_locations field is not populated, the list of results + * includes spokes in all locations. + * @type int $page_size + * The maximum number of results to return per page. + * @type string $page_token + * The page token. + * @type string $filter + * An expression that filters the list of results. + * @type string $order_by + * Sort the results by name or create_time. + * @type int $view + * The view of the spoke to return. + * The view that you use determines which spoke fields are included in the + * response. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the hub. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the hub. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * A list of locations. + * Specify one of the following: `[global]`, a single region (for + * example, `[us-central1]`), or a combination of + * values (for example, `[global, us-central1, us-west1]`). + * If the spoke_locations field is populated, the list of results + * includes only spokes in the specified location. + * If the spoke_locations field is not populated, the list of results + * includes spokes in all locations. + * + * Generated from protobuf field repeated string spoke_locations = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSpokeLocations() + { + return $this->spoke_locations; + } + + /** + * A list of locations. + * Specify one of the following: `[global]`, a single region (for + * example, `[us-central1]`), or a combination of + * values (for example, `[global, us-central1, us-west1]`). + * If the spoke_locations field is populated, the list of results + * includes only spokes in the specified location. + * If the spoke_locations field is not populated, the list of results + * includes spokes in all locations. + * + * Generated from protobuf field repeated string spoke_locations = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSpokeLocations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->spoke_locations = $arr; + + return $this; + } + + /** + * The maximum number of results to return per page. + * + * Generated from protobuf field int32 page_size = 3; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of results to return per page. + * + * Generated from protobuf field int32 page_size = 3; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The page token. + * + * Generated from protobuf field string page_token = 4; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The page token. + * + * Generated from protobuf field string page_token = 4; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * An expression that filters the list of results. + * + * Generated from protobuf field string filter = 5; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * An expression that filters the list of results. + * + * Generated from protobuf field string filter = 5; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Sort the results by name or create_time. + * + * Generated from protobuf field string order_by = 6; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Sort the results by name or create_time. + * + * Generated from protobuf field string order_by = 6; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + + /** + * The view of the spoke to return. + * The view that you use determines which spoke fields are included in the + * response. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.ListHubSpokesRequest.SpokeView view = 7; + * @return int + */ + public function getView() + { + return $this->view; + } + + /** + * The view of the spoke to return. + * The view that you use determines which spoke fields are included in the + * response. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.ListHubSpokesRequest.SpokeView view = 7; + * @param int $var + * @return $this + */ + public function setView($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetworkConnectivity\V1\ListHubSpokesRequest\SpokeView::class); + $this->view = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListHubSpokesRequest/SpokeView.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListHubSpokesRequest/SpokeView.php new file mode 100644 index 000000000000..2c01fda36de9 --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListHubSpokesRequest/SpokeView.php @@ -0,0 +1,68 @@ +google.cloud.networkconnectivity.v1.ListHubSpokesRequest.SpokeView + */ +class SpokeView +{ + /** + * The spoke view is unspecified. When the spoke view is unspecified, the + * API returns the same fields as the `BASIC` view. + * + * Generated from protobuf enum SPOKE_VIEW_UNSPECIFIED = 0; + */ + const SPOKE_VIEW_UNSPECIFIED = 0; + /** + * Includes `name`, `create_time`, `hub`, `unique_id`, `state`, `reasons`, + * and `spoke_type`. This is the default value. + * + * Generated from protobuf enum BASIC = 1; + */ + const BASIC = 1; + /** + * Includes all spoke fields except `labels`. + * You can use the `DETAILED` view only when you set the `spoke_locations` + * field to `[global]`. + * + * Generated from protobuf enum DETAILED = 2; + */ + const DETAILED = 2; + + private static $valueToName = [ + self::SPOKE_VIEW_UNSPECIFIED => 'SPOKE_VIEW_UNSPECIFIED', + self::BASIC => 'BASIC', + self::DETAILED => 'DETAILED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SpokeView::class, \Google\Cloud\NetworkConnectivity\V1\ListHubSpokesRequest_SpokeView::class); + diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListHubSpokesResponse.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListHubSpokesResponse.php new file mode 100644 index 000000000000..0cfab298026e --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListHubSpokesResponse.php @@ -0,0 +1,152 @@ +google.cloud.networkconnectivity.v1.ListHubSpokesResponse + */ +class ListHubSpokesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The requested spokes. + * The spoke fields can be partially populated based on the `view` field in + * the request message. + * + * Generated from protobuf field repeated .google.cloud.networkconnectivity.v1.Spoke spokes = 1; + */ + private $spokes; + /** + * The token for the next page of the response. To see more results, + * use this value as the page_token for your next request. If this value + * is empty, there are no more results. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\NetworkConnectivity\V1\Spoke>|\Google\Protobuf\Internal\RepeatedField $spokes + * The requested spokes. + * The spoke fields can be partially populated based on the `view` field in + * the request message. + * @type string $next_page_token + * The token for the next page of the response. To see more results, + * use this value as the page_token for your next request. If this value + * is empty, there are no more results. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); + parent::__construct($data); + } + + /** + * The requested spokes. + * The spoke fields can be partially populated based on the `view` field in + * the request message. + * + * Generated from protobuf field repeated .google.cloud.networkconnectivity.v1.Spoke spokes = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSpokes() + { + return $this->spokes; + } + + /** + * The requested spokes. + * The spoke fields can be partially populated based on the `view` field in + * the request message. + * + * Generated from protobuf field repeated .google.cloud.networkconnectivity.v1.Spoke spokes = 1; + * @param array<\Google\Cloud\NetworkConnectivity\V1\Spoke>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSpokes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkConnectivity\V1\Spoke::class); + $this->spokes = $arr; + + return $this; + } + + /** + * The token for the next page of the response. To see more results, + * use this value as the page_token for your next request. If this value + * is empty, there are no more results. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * The token for the next page of the response. To see more results, + * use this value as the page_token for your next request. If this value + * is empty, there are no more results. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListHubsRequest.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListHubsRequest.php new file mode 100644 index 000000000000..e7c1d8cb3332 --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListHubsRequest.php @@ -0,0 +1,219 @@ +google.cloud.networkconnectivity.v1.ListHubsRequest + */ +class ListHubsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource's name. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of results per page to return. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The page token. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * An expression that filters the list of results. + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + /** + * Sort the results by a certain order. + * + * Generated from protobuf field string order_by = 5; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The parent resource's name. Please see + * {@see HubServiceClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkConnectivity\V1\ListHubsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource's name. + * @type int $page_size + * The maximum number of results per page to return. + * @type string $page_token + * The page token. + * @type string $filter + * An expression that filters the list of results. + * @type string $order_by + * Sort the results by a certain order. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource's name. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource's name. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The maximum number of results per page to return. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of results per page to return. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The page token. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The page token. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * An expression that filters the list of results. + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * An expression that filters the list of results. + * + * Generated from protobuf field string filter = 4; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Sort the results by a certain order. + * + * Generated from protobuf field string order_by = 5; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Sort the results by a certain order. + * + * Generated from protobuf field string order_by = 5; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListHubsResponse.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListHubsResponse.php new file mode 100644 index 000000000000..bf9e4e2a2c5a --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListHubsResponse.php @@ -0,0 +1,145 @@ +google.cloud.networkconnectivity.v1.ListHubsResponse + */ +class ListHubsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The requested hubs. + * + * Generated from protobuf field repeated .google.cloud.networkconnectivity.v1.Hub hubs = 1; + */ + private $hubs; + /** + * The token for the next page of the response. To see more results, + * use this value as the page_token for your next request. If this value + * is empty, there are no more results. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\NetworkConnectivity\V1\Hub>|\Google\Protobuf\Internal\RepeatedField $hubs + * The requested hubs. + * @type string $next_page_token + * The token for the next page of the response. To see more results, + * use this value as the page_token for your next request. If this value + * is empty, there are no more results. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); + parent::__construct($data); + } + + /** + * The requested hubs. + * + * Generated from protobuf field repeated .google.cloud.networkconnectivity.v1.Hub hubs = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getHubs() + { + return $this->hubs; + } + + /** + * The requested hubs. + * + * Generated from protobuf field repeated .google.cloud.networkconnectivity.v1.Hub hubs = 1; + * @param array<\Google\Cloud\NetworkConnectivity\V1\Hub>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setHubs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkConnectivity\V1\Hub::class); + $this->hubs = $arr; + + return $this; + } + + /** + * The token for the next page of the response. To see more results, + * use this value as the page_token for your next request. If this value + * is empty, there are no more results. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * The token for the next page of the response. To see more results, + * use this value as the page_token for your next request. If this value + * is empty, there are no more results. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListPolicyBasedRoutesRequest.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListPolicyBasedRoutesRequest.php new file mode 100644 index 000000000000..e8db9931970a --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListPolicyBasedRoutesRequest.php @@ -0,0 +1,217 @@ +google.cloud.networkconnectivity.v1.ListPolicyBasedRoutesRequest + */ +class ListPolicyBasedRoutesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource's name. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of results per page that should be returned. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The page token. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * A filter expression that filters the results listed in the response. + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + /** + * Sort the results by a certain order. + * + * Generated from protobuf field string order_by = 5; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The parent resource's name. Please see + * {@see PolicyBasedRoutingServiceClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkConnectivity\V1\ListPolicyBasedRoutesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource's name. + * @type int $page_size + * The maximum number of results per page that should be returned. + * @type string $page_token + * The page token. + * @type string $filter + * A filter expression that filters the results listed in the response. + * @type string $order_by + * Sort the results by a certain order. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkconnectivity\V1\PolicyBasedRouting::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource's name. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource's name. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The maximum number of results per page that should be returned. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of results per page that should be returned. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The page token. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The page token. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * A filter expression that filters the results listed in the response. + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * A filter expression that filters the results listed in the response. + * + * Generated from protobuf field string filter = 4; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Sort the results by a certain order. + * + * Generated from protobuf field string order_by = 5; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Sort the results by a certain order. + * + * Generated from protobuf field string order_by = 5; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListPolicyBasedRoutesResponse.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListPolicyBasedRoutesResponse.php new file mode 100644 index 000000000000..b339ada59758 --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListPolicyBasedRoutesResponse.php @@ -0,0 +1,139 @@ +google.cloud.networkconnectivity.v1.ListPolicyBasedRoutesResponse + */ +class ListPolicyBasedRoutesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Policy based routes to be returned. + * + * Generated from protobuf field repeated .google.cloud.networkconnectivity.v1.PolicyBasedRoute policy_based_routes = 1; + */ + private $policy_based_routes; + /** + * The next pagination token in the List response. It should be used as + * page_token for the following request. An empty value means no more result. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\NetworkConnectivity\V1\PolicyBasedRoute>|\Google\Protobuf\Internal\RepeatedField $policy_based_routes + * Policy based routes to be returned. + * @type string $next_page_token + * The next pagination token in the List response. It should be used as + * page_token for the following request. An empty value means no more result. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkconnectivity\V1\PolicyBasedRouting::initOnce(); + parent::__construct($data); + } + + /** + * Policy based routes to be returned. + * + * Generated from protobuf field repeated .google.cloud.networkconnectivity.v1.PolicyBasedRoute policy_based_routes = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPolicyBasedRoutes() + { + return $this->policy_based_routes; + } + + /** + * Policy based routes to be returned. + * + * Generated from protobuf field repeated .google.cloud.networkconnectivity.v1.PolicyBasedRoute policy_based_routes = 1; + * @param array<\Google\Cloud\NetworkConnectivity\V1\PolicyBasedRoute>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPolicyBasedRoutes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkConnectivity\V1\PolicyBasedRoute::class); + $this->policy_based_routes = $arr; + + return $this; + } + + /** + * The next pagination token in the List response. It should be used as + * page_token for the following request. An empty value means no more result. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * The next pagination token in the List response. It should be used as + * page_token for the following request. An empty value means no more result. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListRouteTablesRequest.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListRouteTablesRequest.php new file mode 100644 index 000000000000..b0611b5da8e4 --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListRouteTablesRequest.php @@ -0,0 +1,219 @@ +google.cloud.networkconnectivity.v1.ListRouteTablesRequest + */ +class ListRouteTablesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource's name. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of results to return per page. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The page token. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * An expression that filters the list of results. + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + /** + * Sort the results by a certain order. + * + * Generated from protobuf field string order_by = 5; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The parent resource's name. Please see + * {@see HubServiceClient::hubName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkConnectivity\V1\ListRouteTablesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource's name. + * @type int $page_size + * The maximum number of results to return per page. + * @type string $page_token + * The page token. + * @type string $filter + * An expression that filters the list of results. + * @type string $order_by + * Sort the results by a certain order. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource's name. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource's name. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The maximum number of results to return per page. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of results to return per page. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The page token. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The page token. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * An expression that filters the list of results. + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * An expression that filters the list of results. + * + * Generated from protobuf field string filter = 4; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Sort the results by a certain order. + * + * Generated from protobuf field string order_by = 5; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Sort the results by a certain order. + * + * Generated from protobuf field string order_by = 5; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListRouteTablesResponse.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListRouteTablesResponse.php new file mode 100644 index 000000000000..3e25d8233472 --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListRouteTablesResponse.php @@ -0,0 +1,145 @@ +google.cloud.networkconnectivity.v1.ListRouteTablesResponse + */ +class ListRouteTablesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The requested route tables. + * + * Generated from protobuf field repeated .google.cloud.networkconnectivity.v1.RouteTable route_tables = 1; + */ + private $route_tables; + /** + * The token for the next page of the response. To see more results, + * use this value as the page_token for your next request. If this value + * is empty, there are no more results. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Hubs that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\NetworkConnectivity\V1\RouteTable>|\Google\Protobuf\Internal\RepeatedField $route_tables + * The requested route tables. + * @type string $next_page_token + * The token for the next page of the response. To see more results, + * use this value as the page_token for your next request. If this value + * is empty, there are no more results. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Hubs that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); + parent::__construct($data); + } + + /** + * The requested route tables. + * + * Generated from protobuf field repeated .google.cloud.networkconnectivity.v1.RouteTable route_tables = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRouteTables() + { + return $this->route_tables; + } + + /** + * The requested route tables. + * + * Generated from protobuf field repeated .google.cloud.networkconnectivity.v1.RouteTable route_tables = 1; + * @param array<\Google\Cloud\NetworkConnectivity\V1\RouteTable>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRouteTables($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkConnectivity\V1\RouteTable::class); + $this->route_tables = $arr; + + return $this; + } + + /** + * The token for the next page of the response. To see more results, + * use this value as the page_token for your next request. If this value + * is empty, there are no more results. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * The token for the next page of the response. To see more results, + * use this value as the page_token for your next request. If this value + * is empty, there are no more results. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Hubs that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Hubs that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListRoutesRequest.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListRoutesRequest.php new file mode 100644 index 000000000000..3a72b0a33561 --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListRoutesRequest.php @@ -0,0 +1,219 @@ +google.cloud.networkconnectivity.v1.ListRoutesRequest + */ +class ListRoutesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource's name. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of results to return per page. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The page token. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * An expression that filters the list of results. + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + /** + * Sort the results by a certain order. + * + * Generated from protobuf field string order_by = 5; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The parent resource's name. Please see + * {@see HubServiceClient::routeTableName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkConnectivity\V1\ListRoutesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource's name. + * @type int $page_size + * The maximum number of results to return per page. + * @type string $page_token + * The page token. + * @type string $filter + * An expression that filters the list of results. + * @type string $order_by + * Sort the results by a certain order. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource's name. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource's name. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The maximum number of results to return per page. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of results to return per page. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The page token. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The page token. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * An expression that filters the list of results. + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * An expression that filters the list of results. + * + * Generated from protobuf field string filter = 4; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Sort the results by a certain order. + * + * Generated from protobuf field string order_by = 5; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Sort the results by a certain order. + * + * Generated from protobuf field string order_by = 5; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListRoutesResponse.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListRoutesResponse.php new file mode 100644 index 000000000000..dd5886f2dfed --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListRoutesResponse.php @@ -0,0 +1,145 @@ +google.cloud.networkconnectivity.v1.ListRoutesResponse + */ +class ListRoutesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The requested routes. + * + * Generated from protobuf field repeated .google.cloud.networkconnectivity.v1.Route routes = 1; + */ + private $routes; + /** + * The token for the next page of the response. To see more results, + * use this value as the page_token for your next request. If this value + * is empty, there are no more results. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * RouteTables that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\NetworkConnectivity\V1\Route>|\Google\Protobuf\Internal\RepeatedField $routes + * The requested routes. + * @type string $next_page_token + * The token for the next page of the response. To see more results, + * use this value as the page_token for your next request. If this value + * is empty, there are no more results. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * RouteTables that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); + parent::__construct($data); + } + + /** + * The requested routes. + * + * Generated from protobuf field repeated .google.cloud.networkconnectivity.v1.Route routes = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRoutes() + { + return $this->routes; + } + + /** + * The requested routes. + * + * Generated from protobuf field repeated .google.cloud.networkconnectivity.v1.Route routes = 1; + * @param array<\Google\Cloud\NetworkConnectivity\V1\Route>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRoutes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkConnectivity\V1\Route::class); + $this->routes = $arr; + + return $this; + } + + /** + * The token for the next page of the response. To see more results, + * use this value as the page_token for your next request. If this value + * is empty, there are no more results. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * The token for the next page of the response. To see more results, + * use this value as the page_token for your next request. If this value + * is empty, there are no more results. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * RouteTables that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * RouteTables that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListSpokesRequest.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListSpokesRequest.php new file mode 100644 index 000000000000..cd61a254e3ed --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListSpokesRequest.php @@ -0,0 +1,218 @@ +google.cloud.networkconnectivity.v1.ListSpokesRequest + */ +class ListSpokesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of results to return per page. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The page token. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * An expression that filters the list of results. + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + /** + * Sort the results by a certain order. + * + * Generated from protobuf field string order_by = 5; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The parent resource. Please see + * {@see HubServiceClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkConnectivity\V1\ListSpokesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource. + * @type int $page_size + * The maximum number of results to return per page. + * @type string $page_token + * The page token. + * @type string $filter + * An expression that filters the list of results. + * @type string $order_by + * Sort the results by a certain order. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The maximum number of results to return per page. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of results to return per page. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The page token. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The page token. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * An expression that filters the list of results. + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * An expression that filters the list of results. + * + * Generated from protobuf field string filter = 4; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Sort the results by a certain order. + * + * Generated from protobuf field string order_by = 5; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Sort the results by a certain order. + * + * Generated from protobuf field string order_by = 5; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListSpokesResponse.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListSpokesResponse.php new file mode 100644 index 000000000000..f5ce899c5452 --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListSpokesResponse.php @@ -0,0 +1,144 @@ +google.cloud.networkconnectivity.v1.ListSpokesResponse + */ +class ListSpokesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The requested spokes. + * + * Generated from protobuf field repeated .google.cloud.networkconnectivity.v1.Spoke spokes = 1; + */ + private $spokes; + /** + * The token for the next page of the response. To see more results, + * use this value as the page_token for your next request. If this value + * is empty, there are no more results. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\NetworkConnectivity\V1\Spoke>|\Google\Protobuf\Internal\RepeatedField $spokes + * The requested spokes. + * @type string $next_page_token + * The token for the next page of the response. To see more results, + * use this value as the page_token for your next request. If this value + * is empty, there are no more results. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); + parent::__construct($data); + } + + /** + * The requested spokes. + * + * Generated from protobuf field repeated .google.cloud.networkconnectivity.v1.Spoke spokes = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSpokes() + { + return $this->spokes; + } + + /** + * The requested spokes. + * + * Generated from protobuf field repeated .google.cloud.networkconnectivity.v1.Spoke spokes = 1; + * @param array<\Google\Cloud\NetworkConnectivity\V1\Spoke>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSpokes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkConnectivity\V1\Spoke::class); + $this->spokes = $arr; + + return $this; + } + + /** + * The token for the next page of the response. To see more results, + * use this value as the page_token for your next request. If this value + * is empty, there are no more results. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * The token for the next page of the response. To see more results, + * use this value as the page_token for your next request. If this value + * is empty, there are no more results. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/LocationFeature.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/LocationFeature.php new file mode 100644 index 000000000000..892573fec480 --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/LocationFeature.php @@ -0,0 +1,61 @@ +google.cloud.networkconnectivity.v1.LocationFeature + */ +class LocationFeature +{ + /** + * No publicly supported feature in this location + * + * Generated from protobuf enum LOCATION_FEATURE_UNSPECIFIED = 0; + */ + const LOCATION_FEATURE_UNSPECIFIED = 0; + /** + * Site-to-cloud spokes are supported in this location + * + * Generated from protobuf enum SITE_TO_CLOUD_SPOKES = 1; + */ + const SITE_TO_CLOUD_SPOKES = 1; + /** + * Site-to-site spokes are supported in this location + * + * Generated from protobuf enum SITE_TO_SITE_SPOKES = 2; + */ + const SITE_TO_SITE_SPOKES = 2; + + private static $valueToName = [ + self::LOCATION_FEATURE_UNSPECIFIED => 'LOCATION_FEATURE_UNSPECIFIED', + self::SITE_TO_CLOUD_SPOKES => 'SITE_TO_CLOUD_SPOKES', + self::SITE_TO_SITE_SPOKES => 'SITE_TO_SITE_SPOKES', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/LocationMetadata.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/LocationMetadata.php new file mode 100644 index 000000000000..bce4d8e03bb8 --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/LocationMetadata.php @@ -0,0 +1,67 @@ +google.cloud.networkconnectivity.v1.LocationMetadata + */ +class LocationMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * List of supported features + * + * Generated from protobuf field repeated .google.cloud.networkconnectivity.v1.LocationFeature location_features = 1; + */ + private $location_features; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $location_features + * List of supported features + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); + parent::__construct($data); + } + + /** + * List of supported features + * + * Generated from protobuf field repeated .google.cloud.networkconnectivity.v1.LocationFeature location_features = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getLocationFeatures() + { + return $this->location_features; + } + + /** + * List of supported features + * + * Generated from protobuf field repeated .google.cloud.networkconnectivity.v1.LocationFeature location_features = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setLocationFeatures($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\NetworkConnectivity\V1\LocationFeature::class); + $this->location_features = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/NextHopInterconnectAttachment.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/NextHopInterconnectAttachment.php new file mode 100644 index 000000000000..2a2c6b219e0d --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/NextHopInterconnectAttachment.php @@ -0,0 +1,147 @@ +google.cloud.networkconnectivity.v1.NextHopInterconnectAttachment + */ +class NextHopInterconnectAttachment extends \Google\Protobuf\Internal\Message +{ + /** + * The URI of the interconnect attachment resource. + * + * Generated from protobuf field string uri = 1 [(.google.api.resource_reference) = { + */ + protected $uri = ''; + /** + * The VPC network where this interconnect attachment is located. + * + * Generated from protobuf field string vpc_network = 2 [(.google.api.resource_reference) = { + */ + protected $vpc_network = ''; + /** + * Indicates whether site-to-site data transfer is allowed for this + * interconnect attachment resource. Data transfer is available only in + * [supported + * locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations). + * + * Generated from protobuf field bool site_to_site_data_transfer = 3; + */ + protected $site_to_site_data_transfer = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $uri + * The URI of the interconnect attachment resource. + * @type string $vpc_network + * The VPC network where this interconnect attachment is located. + * @type bool $site_to_site_data_transfer + * Indicates whether site-to-site data transfer is allowed for this + * interconnect attachment resource. Data transfer is available only in + * [supported + * locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); + parent::__construct($data); + } + + /** + * The URI of the interconnect attachment resource. + * + * Generated from protobuf field string uri = 1 [(.google.api.resource_reference) = { + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * The URI of the interconnect attachment resource. + * + * Generated from protobuf field string uri = 1 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setUri($var) + { + GPBUtil::checkString($var, True); + $this->uri = $var; + + return $this; + } + + /** + * The VPC network where this interconnect attachment is located. + * + * Generated from protobuf field string vpc_network = 2 [(.google.api.resource_reference) = { + * @return string + */ + public function getVpcNetwork() + { + return $this->vpc_network; + } + + /** + * The VPC network where this interconnect attachment is located. + * + * Generated from protobuf field string vpc_network = 2 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setVpcNetwork($var) + { + GPBUtil::checkString($var, True); + $this->vpc_network = $var; + + return $this; + } + + /** + * Indicates whether site-to-site data transfer is allowed for this + * interconnect attachment resource. Data transfer is available only in + * [supported + * locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations). + * + * Generated from protobuf field bool site_to_site_data_transfer = 3; + * @return bool + */ + public function getSiteToSiteDataTransfer() + { + return $this->site_to_site_data_transfer; + } + + /** + * Indicates whether site-to-site data transfer is allowed for this + * interconnect attachment resource. Data transfer is available only in + * [supported + * locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations). + * + * Generated from protobuf field bool site_to_site_data_transfer = 3; + * @param bool $var + * @return $this + */ + public function setSiteToSiteDataTransfer($var) + { + GPBUtil::checkBool($var); + $this->site_to_site_data_transfer = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/NextHopRouterApplianceInstance.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/NextHopRouterApplianceInstance.php new file mode 100644 index 000000000000..f54c72306457 --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/NextHopRouterApplianceInstance.php @@ -0,0 +1,143 @@ +google.cloud.networkconnectivity.v1.NextHopRouterApplianceInstance + */ +class NextHopRouterApplianceInstance extends \Google\Protobuf\Internal\Message +{ + /** + * The URI of the Router appliance instance. + * + * Generated from protobuf field string uri = 1 [(.google.api.resource_reference) = { + */ + protected $uri = ''; + /** + * The VPC network where this VM is located. + * + * Generated from protobuf field string vpc_network = 2 [(.google.api.resource_reference) = { + */ + protected $vpc_network = ''; + /** + * Indicates whether site-to-site data transfer is allowed for this Router + * appliance instance resource. Data transfer is available only in [supported + * locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations). + * + * Generated from protobuf field bool site_to_site_data_transfer = 3; + */ + protected $site_to_site_data_transfer = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $uri + * The URI of the Router appliance instance. + * @type string $vpc_network + * The VPC network where this VM is located. + * @type bool $site_to_site_data_transfer + * Indicates whether site-to-site data transfer is allowed for this Router + * appliance instance resource. Data transfer is available only in [supported + * locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); + parent::__construct($data); + } + + /** + * The URI of the Router appliance instance. + * + * Generated from protobuf field string uri = 1 [(.google.api.resource_reference) = { + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * The URI of the Router appliance instance. + * + * Generated from protobuf field string uri = 1 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setUri($var) + { + GPBUtil::checkString($var, True); + $this->uri = $var; + + return $this; + } + + /** + * The VPC network where this VM is located. + * + * Generated from protobuf field string vpc_network = 2 [(.google.api.resource_reference) = { + * @return string + */ + public function getVpcNetwork() + { + return $this->vpc_network; + } + + /** + * The VPC network where this VM is located. + * + * Generated from protobuf field string vpc_network = 2 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setVpcNetwork($var) + { + GPBUtil::checkString($var, True); + $this->vpc_network = $var; + + return $this; + } + + /** + * Indicates whether site-to-site data transfer is allowed for this Router + * appliance instance resource. Data transfer is available only in [supported + * locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations). + * + * Generated from protobuf field bool site_to_site_data_transfer = 3; + * @return bool + */ + public function getSiteToSiteDataTransfer() + { + return $this->site_to_site_data_transfer; + } + + /** + * Indicates whether site-to-site data transfer is allowed for this Router + * appliance instance resource. Data transfer is available only in [supported + * locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations). + * + * Generated from protobuf field bool site_to_site_data_transfer = 3; + * @param bool $var + * @return $this + */ + public function setSiteToSiteDataTransfer($var) + { + GPBUtil::checkBool($var); + $this->site_to_site_data_transfer = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/NextHopVPNTunnel.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/NextHopVPNTunnel.php new file mode 100644 index 000000000000..87bc17cab869 --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/NextHopVPNTunnel.php @@ -0,0 +1,143 @@ +google.cloud.networkconnectivity.v1.NextHopVPNTunnel + */ +class NextHopVPNTunnel extends \Google\Protobuf\Internal\Message +{ + /** + * The URI of the VPN tunnel resource. + * + * Generated from protobuf field string uri = 1 [(.google.api.resource_reference) = { + */ + protected $uri = ''; + /** + * The VPC network where this VPN tunnel is located. + * + * Generated from protobuf field string vpc_network = 2 [(.google.api.resource_reference) = { + */ + protected $vpc_network = ''; + /** + * Indicates whether site-to-site data transfer is allowed for this VPN tunnel + * resource. Data transfer is available only in [supported + * locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations). + * + * Generated from protobuf field bool site_to_site_data_transfer = 3; + */ + protected $site_to_site_data_transfer = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $uri + * The URI of the VPN tunnel resource. + * @type string $vpc_network + * The VPC network where this VPN tunnel is located. + * @type bool $site_to_site_data_transfer + * Indicates whether site-to-site data transfer is allowed for this VPN tunnel + * resource. Data transfer is available only in [supported + * locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); + parent::__construct($data); + } + + /** + * The URI of the VPN tunnel resource. + * + * Generated from protobuf field string uri = 1 [(.google.api.resource_reference) = { + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * The URI of the VPN tunnel resource. + * + * Generated from protobuf field string uri = 1 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setUri($var) + { + GPBUtil::checkString($var, True); + $this->uri = $var; + + return $this; + } + + /** + * The VPC network where this VPN tunnel is located. + * + * Generated from protobuf field string vpc_network = 2 [(.google.api.resource_reference) = { + * @return string + */ + public function getVpcNetwork() + { + return $this->vpc_network; + } + + /** + * The VPC network where this VPN tunnel is located. + * + * Generated from protobuf field string vpc_network = 2 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setVpcNetwork($var) + { + GPBUtil::checkString($var, True); + $this->vpc_network = $var; + + return $this; + } + + /** + * Indicates whether site-to-site data transfer is allowed for this VPN tunnel + * resource. Data transfer is available only in [supported + * locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations). + * + * Generated from protobuf field bool site_to_site_data_transfer = 3; + * @return bool + */ + public function getSiteToSiteDataTransfer() + { + return $this->site_to_site_data_transfer; + } + + /** + * Indicates whether site-to-site data transfer is allowed for this VPN tunnel + * resource. Data transfer is available only in [supported + * locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations). + * + * Generated from protobuf field bool site_to_site_data_transfer = 3; + * @param bool $var + * @return $this + */ + public function setSiteToSiteDataTransfer($var) + { + GPBUtil::checkBool($var); + $this->site_to_site_data_transfer = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/NextHopVpcNetwork.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/NextHopVpcNetwork.php new file mode 100644 index 000000000000..925d449792c9 --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/NextHopVpcNetwork.php @@ -0,0 +1,65 @@ +google.cloud.networkconnectivity.v1.NextHopVpcNetwork + */ +class NextHopVpcNetwork extends \Google\Protobuf\Internal\Message +{ + /** + * The URI of the VPC network resource + * + * Generated from protobuf field string uri = 1 [(.google.api.resource_reference) = { + */ + protected $uri = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $uri + * The URI of the VPC network resource + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); + parent::__construct($data); + } + + /** + * The URI of the VPC network resource + * + * Generated from protobuf field string uri = 1 [(.google.api.resource_reference) = { + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * The URI of the VPC network resource + * + * Generated from protobuf field string uri = 1 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setUri($var) + { + GPBUtil::checkString($var, True); + $this->uri = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/OperationMetadata.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/OperationMetadata.php new file mode 100644 index 000000000000..95de1b39336b --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/OperationMetadata.php @@ -0,0 +1,307 @@ +google.cloud.networkconnectivity.v1.OperationMetadata + */ +class OperationMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $end_time = null; + /** + * Output only. Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $target = ''; + /** + * Output only. Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $verb = ''; + /** + * Output only. Human-readable status of the operation, if any. + * + * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $status_message = ''; + /** + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have been cancelled successfully + * have [Operation.error][] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`. + * + * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $requested_cancellation = false; + /** + * Output only. API version used to start the operation. + * + * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $api_version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time the operation was created. + * @type \Google\Protobuf\Timestamp $end_time + * Output only. The time the operation finished running. + * @type string $target + * Output only. Server-defined resource path for the target of the operation. + * @type string $verb + * Output only. Name of the verb executed by the operation. + * @type string $status_message + * Output only. Human-readable status of the operation, if any. + * @type bool $requested_cancellation + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have been cancelled successfully + * have [Operation.error][] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`. + * @type string $api_version + * Output only. API version used to start the operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Common::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEndTime() + { + return $this->end_time; + } + + public function hasEndTime() + { + return isset($this->end_time); + } + + public function clearEndTime() + { + unset($this->end_time); + } + + /** + * Output only. The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * Output only. Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getTarget() + { + return $this->target; + } + + /** + * Output only. Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setTarget($var) + { + GPBUtil::checkString($var, True); + $this->target = $var; + + return $this; + } + + /** + * Output only. Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getVerb() + { + return $this->verb; + } + + /** + * Output only. Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setVerb($var) + { + GPBUtil::checkString($var, True); + $this->verb = $var; + + return $this; + } + + /** + * Output only. Human-readable status of the operation, if any. + * + * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getStatusMessage() + { + return $this->status_message; + } + + /** + * Output only. Human-readable status of the operation, if any. + * + * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setStatusMessage($var) + { + GPBUtil::checkString($var, True); + $this->status_message = $var; + + return $this; + } + + /** + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have been cancelled successfully + * have [Operation.error][] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`. + * + * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getRequestedCancellation() + { + return $this->requested_cancellation; + } + + /** + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have been cancelled successfully + * have [Operation.error][] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`. + * + * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setRequestedCancellation($var) + { + GPBUtil::checkBool($var); + $this->requested_cancellation = $var; + + return $this; + } + + /** + * Output only. API version used to start the operation. + * + * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getApiVersion() + { + return $this->api_version; + } + + /** + * Output only. API version used to start the operation. + * + * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setApiVersion($var) + { + GPBUtil::checkString($var, True); + $this->api_version = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/PolicyBasedRoute.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/PolicyBasedRoute.php new file mode 100644 index 000000000000..c8c841af24f3 --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/PolicyBasedRoute.php @@ -0,0 +1,636 @@ +google.cloud.networkconnectivity.v1.PolicyBasedRoute + */ +class PolicyBasedRoute extends \Google\Protobuf\Internal\Message +{ + /** + * Immutable. A unique name of the resource in the form of + * `projects/{project_number}/locations/global/PolicyBasedRoutes/{policy_based_route_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $name = ''; + /** + * Output only. Time when the PolicyBasedRoute was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. Time when the PolicyBasedRoute was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * User-defined labels. + * + * Generated from protobuf field map labels = 4; + */ + private $labels; + /** + * Optional. An optional description of this resource. Provide this field when + * you create the resource. + * + * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Required. Fully-qualified URL of the network that this route applies to. + * e.g. projects/my-project/global/networks/my-network. + * + * Generated from protobuf field string network = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $network = ''; + /** + * Required. The filter to match L4 traffic. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.PolicyBasedRoute.Filter filter = 10 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $filter = null; + /** + * Optional. The priority of this policy based route. Priority is used to + * break ties in cases where there are more than one matching policy based + * routes found. In cases where multiple policy based routes are matched, the + * one with the lowest-numbered priority value wins. The default value is + * 1000. The priority value must be from 1 to 65535, inclusive. + * + * Generated from protobuf field int32 priority = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $priority = 0; + /** + * Output only. If potential misconfigurations are detected for this route, + * this field will be populated with warning messages. + * + * Generated from protobuf field repeated .google.cloud.networkconnectivity.v1.PolicyBasedRoute.Warnings warnings = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $warnings; + /** + * Output only. Server-defined fully-qualified URL for this resource. + * + * Generated from protobuf field string self_link = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $self_link = ''; + /** + * Output only. Type of this resource. Always + * networkconnectivity#policyBasedRoute for Policy Based Route resources. + * + * Generated from protobuf field string kind = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $kind = ''; + protected $target; + protected $next_hop; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\NetworkConnectivity\V1\PolicyBasedRoute\VirtualMachine $virtual_machine + * Optional. VM instances to which this policy based route applies to. + * @type \Google\Cloud\NetworkConnectivity\V1\PolicyBasedRoute\InterconnectAttachment $interconnect_attachment + * Optional. The interconnect attachments to which this route applies to. + * @type string $next_hop_ilb_ip + * Optional. The IP of a global access enabled L4 ILB that should be the + * next hop to handle matching packets. For this version, only + * next_hop_ilb_ip is supported. + * @type int $next_hop_other_routes + * Optional. Other routes that will be referenced to determine the next hop + * of the packet. + * @type string $name + * Immutable. A unique name of the resource in the form of + * `projects/{project_number}/locations/global/PolicyBasedRoutes/{policy_based_route_id}` + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Time when the PolicyBasedRoute was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. Time when the PolicyBasedRoute was updated. + * @type array|\Google\Protobuf\Internal\MapField $labels + * User-defined labels. + * @type string $description + * Optional. An optional description of this resource. Provide this field when + * you create the resource. + * @type string $network + * Required. Fully-qualified URL of the network that this route applies to. + * e.g. projects/my-project/global/networks/my-network. + * @type \Google\Cloud\NetworkConnectivity\V1\PolicyBasedRoute\Filter $filter + * Required. The filter to match L4 traffic. + * @type int $priority + * Optional. The priority of this policy based route. Priority is used to + * break ties in cases where there are more than one matching policy based + * routes found. In cases where multiple policy based routes are matched, the + * one with the lowest-numbered priority value wins. The default value is + * 1000. The priority value must be from 1 to 65535, inclusive. + * @type array<\Google\Cloud\NetworkConnectivity\V1\PolicyBasedRoute\Warnings>|\Google\Protobuf\Internal\RepeatedField $warnings + * Output only. If potential misconfigurations are detected for this route, + * this field will be populated with warning messages. + * @type string $self_link + * Output only. Server-defined fully-qualified URL for this resource. + * @type string $kind + * Output only. Type of this resource. Always + * networkconnectivity#policyBasedRoute for Policy Based Route resources. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkconnectivity\V1\PolicyBasedRouting::initOnce(); + parent::__construct($data); + } + + /** + * Optional. VM instances to which this policy based route applies to. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.PolicyBasedRoute.VirtualMachine virtual_machine = 18 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\NetworkConnectivity\V1\PolicyBasedRoute\VirtualMachine|null + */ + public function getVirtualMachine() + { + return $this->readOneof(18); + } + + public function hasVirtualMachine() + { + return $this->hasOneof(18); + } + + /** + * Optional. VM instances to which this policy based route applies to. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.PolicyBasedRoute.VirtualMachine virtual_machine = 18 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\NetworkConnectivity\V1\PolicyBasedRoute\VirtualMachine $var + * @return $this + */ + public function setVirtualMachine($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkConnectivity\V1\PolicyBasedRoute\VirtualMachine::class); + $this->writeOneof(18, $var); + + return $this; + } + + /** + * Optional. The interconnect attachments to which this route applies to. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.PolicyBasedRoute.InterconnectAttachment interconnect_attachment = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\NetworkConnectivity\V1\PolicyBasedRoute\InterconnectAttachment|null + */ + public function getInterconnectAttachment() + { + return $this->readOneof(9); + } + + public function hasInterconnectAttachment() + { + return $this->hasOneof(9); + } + + /** + * Optional. The interconnect attachments to which this route applies to. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.PolicyBasedRoute.InterconnectAttachment interconnect_attachment = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\NetworkConnectivity\V1\PolicyBasedRoute\InterconnectAttachment $var + * @return $this + */ + public function setInterconnectAttachment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkConnectivity\V1\PolicyBasedRoute\InterconnectAttachment::class); + $this->writeOneof(9, $var); + + return $this; + } + + /** + * Optional. The IP of a global access enabled L4 ILB that should be the + * next hop to handle matching packets. For this version, only + * next_hop_ilb_ip is supported. + * + * Generated from protobuf field string next_hop_ilb_ip = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getNextHopIlbIp() + { + return $this->readOneof(12); + } + + public function hasNextHopIlbIp() + { + return $this->hasOneof(12); + } + + /** + * Optional. The IP of a global access enabled L4 ILB that should be the + * next hop to handle matching packets. For this version, only + * next_hop_ilb_ip is supported. + * + * Generated from protobuf field string next_hop_ilb_ip = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setNextHopIlbIp($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(12, $var); + + return $this; + } + + /** + * Optional. Other routes that will be referenced to determine the next hop + * of the packet. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.PolicyBasedRoute.OtherRoutes next_hop_other_routes = 21 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getNextHopOtherRoutes() + { + return $this->readOneof(21); + } + + public function hasNextHopOtherRoutes() + { + return $this->hasOneof(21); + } + + /** + * Optional. Other routes that will be referenced to determine the next hop + * of the packet. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.PolicyBasedRoute.OtherRoutes next_hop_other_routes = 21 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setNextHopOtherRoutes($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetworkConnectivity\V1\PolicyBasedRoute\OtherRoutes::class); + $this->writeOneof(21, $var); + + return $this; + } + + /** + * Immutable. A unique name of the resource in the form of + * `projects/{project_number}/locations/global/PolicyBasedRoutes/{policy_based_route_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Immutable. A unique name of the resource in the form of + * `projects/{project_number}/locations/global/PolicyBasedRoutes/{policy_based_route_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. Time when the PolicyBasedRoute was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. Time when the PolicyBasedRoute was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. Time when the PolicyBasedRoute was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. Time when the PolicyBasedRoute was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * User-defined labels. + * + * Generated from protobuf field map labels = 4; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * User-defined labels. + * + * Generated from protobuf field map labels = 4; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Optional. An optional description of this resource. Provide this field when + * you create the resource. + * + * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. An optional description of this resource. Provide this field when + * you create the resource. + * + * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Required. Fully-qualified URL of the network that this route applies to. + * e.g. projects/my-project/global/networks/my-network. + * + * Generated from protobuf field string network = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getNetwork() + { + return $this->network; + } + + /** + * Required. Fully-qualified URL of the network that this route applies to. + * e.g. projects/my-project/global/networks/my-network. + * + * Generated from protobuf field string network = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setNetwork($var) + { + GPBUtil::checkString($var, True); + $this->network = $var; + + return $this; + } + + /** + * Required. The filter to match L4 traffic. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.PolicyBasedRoute.Filter filter = 10 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetworkConnectivity\V1\PolicyBasedRoute\Filter|null + */ + public function getFilter() + { + return $this->filter; + } + + public function hasFilter() + { + return isset($this->filter); + } + + public function clearFilter() + { + unset($this->filter); + } + + /** + * Required. The filter to match L4 traffic. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.PolicyBasedRoute.Filter filter = 10 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetworkConnectivity\V1\PolicyBasedRoute\Filter $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkConnectivity\V1\PolicyBasedRoute\Filter::class); + $this->filter = $var; + + return $this; + } + + /** + * Optional. The priority of this policy based route. Priority is used to + * break ties in cases where there are more than one matching policy based + * routes found. In cases where multiple policy based routes are matched, the + * one with the lowest-numbered priority value wins. The default value is + * 1000. The priority value must be from 1 to 65535, inclusive. + * + * Generated from protobuf field int32 priority = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPriority() + { + return $this->priority; + } + + /** + * Optional. The priority of this policy based route. Priority is used to + * break ties in cases where there are more than one matching policy based + * routes found. In cases where multiple policy based routes are matched, the + * one with the lowest-numbered priority value wins. The default value is + * 1000. The priority value must be from 1 to 65535, inclusive. + * + * Generated from protobuf field int32 priority = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPriority($var) + { + GPBUtil::checkInt32($var); + $this->priority = $var; + + return $this; + } + + /** + * Output only. If potential misconfigurations are detected for this route, + * this field will be populated with warning messages. + * + * Generated from protobuf field repeated .google.cloud.networkconnectivity.v1.PolicyBasedRoute.Warnings warnings = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getWarnings() + { + return $this->warnings; + } + + /** + * Output only. If potential misconfigurations are detected for this route, + * this field will be populated with warning messages. + * + * Generated from protobuf field repeated .google.cloud.networkconnectivity.v1.PolicyBasedRoute.Warnings warnings = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\NetworkConnectivity\V1\PolicyBasedRoute\Warnings>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setWarnings($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkConnectivity\V1\PolicyBasedRoute\Warnings::class); + $this->warnings = $arr; + + return $this; + } + + /** + * Output only. Server-defined fully-qualified URL for this resource. + * + * Generated from protobuf field string self_link = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getSelfLink() + { + return $this->self_link; + } + + /** + * Output only. Server-defined fully-qualified URL for this resource. + * + * Generated from protobuf field string self_link = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setSelfLink($var) + { + GPBUtil::checkString($var, True); + $this->self_link = $var; + + return $this; + } + + /** + * Output only. Type of this resource. Always + * networkconnectivity#policyBasedRoute for Policy Based Route resources. + * + * Generated from protobuf field string kind = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * Output only. Type of this resource. Always + * networkconnectivity#policyBasedRoute for Policy Based Route resources. + * + * Generated from protobuf field string kind = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * @return string + */ + public function getTarget() + { + return $this->whichOneof("target"); + } + + /** + * @return string + */ + public function getNextHop() + { + return $this->whichOneof("next_hop"); + } + +} + diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/PolicyBasedRoute/Filter.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/PolicyBasedRoute/Filter.php new file mode 100644 index 000000000000..96851bab4477 --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/PolicyBasedRoute/Filter.php @@ -0,0 +1,192 @@ +google.cloud.networkconnectivity.v1.PolicyBasedRoute.Filter + */ +class Filter extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The IP protocol that this policy based route applies to. Valid + * values are 'TCP', 'UDP', and 'ALL'. Default is 'ALL'. + * + * Generated from protobuf field string ip_protocol = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $ip_protocol = ''; + /** + * Optional. The source IP range of outgoing packets that this policy based + * route applies to. Default is "0.0.0.0/0" if protocol version is IPv4. + * + * Generated from protobuf field string src_range = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $src_range = ''; + /** + * Optional. The destination IP range of outgoing packets that this policy + * based route applies to. Default is "0.0.0.0/0" if protocol version is + * IPv4. + * + * Generated from protobuf field string dest_range = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $dest_range = ''; + /** + * Required. Internet protocol versions this policy based route applies to. + * For this version, only IPV4 is supported. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.PolicyBasedRoute.Filter.ProtocolVersion protocol_version = 6 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $protocol_version = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $ip_protocol + * Optional. The IP protocol that this policy based route applies to. Valid + * values are 'TCP', 'UDP', and 'ALL'. Default is 'ALL'. + * @type string $src_range + * Optional. The source IP range of outgoing packets that this policy based + * route applies to. Default is "0.0.0.0/0" if protocol version is IPv4. + * @type string $dest_range + * Optional. The destination IP range of outgoing packets that this policy + * based route applies to. Default is "0.0.0.0/0" if protocol version is + * IPv4. + * @type int $protocol_version + * Required. Internet protocol versions this policy based route applies to. + * For this version, only IPV4 is supported. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkconnectivity\V1\PolicyBasedRouting::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The IP protocol that this policy based route applies to. Valid + * values are 'TCP', 'UDP', and 'ALL'. Default is 'ALL'. + * + * Generated from protobuf field string ip_protocol = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getIpProtocol() + { + return $this->ip_protocol; + } + + /** + * Optional. The IP protocol that this policy based route applies to. Valid + * values are 'TCP', 'UDP', and 'ALL'. Default is 'ALL'. + * + * Generated from protobuf field string ip_protocol = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setIpProtocol($var) + { + GPBUtil::checkString($var, True); + $this->ip_protocol = $var; + + return $this; + } + + /** + * Optional. The source IP range of outgoing packets that this policy based + * route applies to. Default is "0.0.0.0/0" if protocol version is IPv4. + * + * Generated from protobuf field string src_range = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getSrcRange() + { + return $this->src_range; + } + + /** + * Optional. The source IP range of outgoing packets that this policy based + * route applies to. Default is "0.0.0.0/0" if protocol version is IPv4. + * + * Generated from protobuf field string src_range = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setSrcRange($var) + { + GPBUtil::checkString($var, True); + $this->src_range = $var; + + return $this; + } + + /** + * Optional. The destination IP range of outgoing packets that this policy + * based route applies to. Default is "0.0.0.0/0" if protocol version is + * IPv4. + * + * Generated from protobuf field string dest_range = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDestRange() + { + return $this->dest_range; + } + + /** + * Optional. The destination IP range of outgoing packets that this policy + * based route applies to. Default is "0.0.0.0/0" if protocol version is + * IPv4. + * + * Generated from protobuf field string dest_range = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDestRange($var) + { + GPBUtil::checkString($var, True); + $this->dest_range = $var; + + return $this; + } + + /** + * Required. Internet protocol versions this policy based route applies to. + * For this version, only IPV4 is supported. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.PolicyBasedRoute.Filter.ProtocolVersion protocol_version = 6 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getProtocolVersion() + { + return $this->protocol_version; + } + + /** + * Required. Internet protocol versions this policy based route applies to. + * For this version, only IPV4 is supported. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.PolicyBasedRoute.Filter.ProtocolVersion protocol_version = 6 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setProtocolVersion($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetworkConnectivity\V1\PolicyBasedRoute\Filter\ProtocolVersion::class); + $this->protocol_version = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Filter::class, \Google\Cloud\NetworkConnectivity\V1\PolicyBasedRoute_Filter::class); + diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/PolicyBasedRoute/Filter/ProtocolVersion.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/PolicyBasedRoute/Filter/ProtocolVersion.php new file mode 100644 index 000000000000..72918016a089 --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/PolicyBasedRoute/Filter/ProtocolVersion.php @@ -0,0 +1,57 @@ +google.cloud.networkconnectivity.v1.PolicyBasedRoute.Filter.ProtocolVersion + */ +class ProtocolVersion +{ + /** + * Default value. + * + * Generated from protobuf enum PROTOCOL_VERSION_UNSPECIFIED = 0; + */ + const PROTOCOL_VERSION_UNSPECIFIED = 0; + /** + * The PBR is for IPv4 internet protocol traffic. + * + * Generated from protobuf enum IPV4 = 1; + */ + const IPV4 = 1; + + private static $valueToName = [ + self::PROTOCOL_VERSION_UNSPECIFIED => 'PROTOCOL_VERSION_UNSPECIFIED', + self::IPV4 => 'IPV4', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ProtocolVersion::class, \Google\Cloud\NetworkConnectivity\V1\PolicyBasedRoute_Filter_ProtocolVersion::class); + diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/PolicyBasedRoute/InterconnectAttachment.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/PolicyBasedRoute/InterconnectAttachment.php new file mode 100644 index 000000000000..1b199374c88e --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/PolicyBasedRoute/InterconnectAttachment.php @@ -0,0 +1,74 @@ +google.cloud.networkconnectivity.v1.PolicyBasedRoute.InterconnectAttachment + */ +class InterconnectAttachment extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Cloud region to install this policy based route on interconnect + * attachment. Use `all` to install it on all interconnect attachments. + * + * Generated from protobuf field string region = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $region = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $region + * Optional. Cloud region to install this policy based route on interconnect + * attachment. Use `all` to install it on all interconnect attachments. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkconnectivity\V1\PolicyBasedRouting::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Cloud region to install this policy based route on interconnect + * attachment. Use `all` to install it on all interconnect attachments. + * + * Generated from protobuf field string region = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRegion() + { + return $this->region; + } + + /** + * Optional. Cloud region to install this policy based route on interconnect + * attachment. Use `all` to install it on all interconnect attachments. + * + * Generated from protobuf field string region = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRegion($var) + { + GPBUtil::checkString($var, True); + $this->region = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(InterconnectAttachment::class, \Google\Cloud\NetworkConnectivity\V1\PolicyBasedRoute_InterconnectAttachment::class); + diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/PolicyBasedRoute/OtherRoutes.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/PolicyBasedRoute/OtherRoutes.php new file mode 100644 index 000000000000..a85797f988b2 --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/PolicyBasedRoute/OtherRoutes.php @@ -0,0 +1,60 @@ +google.cloud.networkconnectivity.v1.PolicyBasedRoute.OtherRoutes + */ +class OtherRoutes +{ + /** + * Default value. + * + * Generated from protobuf enum OTHER_ROUTES_UNSPECIFIED = 0; + */ + const OTHER_ROUTES_UNSPECIFIED = 0; + /** + * Use the routes from the default routing tables (system-generated routes, + * custom routes, peering route) to determine the next hop. This will + * effectively exclude matching packets being applied on other PBRs with a + * lower priority. + * + * Generated from protobuf enum DEFAULT_ROUTING = 1; + */ + const DEFAULT_ROUTING = 1; + + private static $valueToName = [ + self::OTHER_ROUTES_UNSPECIFIED => 'OTHER_ROUTES_UNSPECIFIED', + self::DEFAULT_ROUTING => 'DEFAULT_ROUTING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(OtherRoutes::class, \Google\Cloud\NetworkConnectivity\V1\PolicyBasedRoute_OtherRoutes::class); + diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/PolicyBasedRoute/VirtualMachine.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/PolicyBasedRoute/VirtualMachine.php new file mode 100644 index 000000000000..47ae79b35b98 --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/PolicyBasedRoute/VirtualMachine.php @@ -0,0 +1,78 @@ +google.cloud.networkconnectivity.v1.PolicyBasedRoute.VirtualMachine + */ +class VirtualMachine extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. A list of VM instance tags to which this policy based route + * applies to. VM instances that have ANY of tags specified here will + * install this PBR. + * + * Generated from protobuf field repeated string tags = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $tags; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $tags + * Optional. A list of VM instance tags to which this policy based route + * applies to. VM instances that have ANY of tags specified here will + * install this PBR. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkconnectivity\V1\PolicyBasedRouting::initOnce(); + parent::__construct($data); + } + + /** + * Optional. A list of VM instance tags to which this policy based route + * applies to. VM instances that have ANY of tags specified here will + * install this PBR. + * + * Generated from protobuf field repeated string tags = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTags() + { + return $this->tags; + } + + /** + * Optional. A list of VM instance tags to which this policy based route + * applies to. VM instances that have ANY of tags specified here will + * install this PBR. + * + * Generated from protobuf field repeated string tags = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTags($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->tags = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(VirtualMachine::class, \Google\Cloud\NetworkConnectivity\V1\PolicyBasedRoute_VirtualMachine::class); + diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/PolicyBasedRoute/Warnings.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/PolicyBasedRoute/Warnings.php new file mode 100644 index 000000000000..51e7b0be9636 --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/PolicyBasedRoute/Warnings.php @@ -0,0 +1,158 @@ +google.cloud.networkconnectivity.v1.PolicyBasedRoute.Warnings + */ +class Warnings extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. A warning code, if applicable. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.PolicyBasedRoute.Warnings.Code code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $code = 0; + /** + * Output only. Metadata about this warning in key: value format. The key + * should provides more detail on the warning being returned. For example, + * for warnings where there are no results in a list request for a + * particular zone, this key might be scope and the key value might be the + * zone name. Other examples might be a key indicating a deprecated resource + * and a suggested replacement. + * + * Generated from protobuf field map data = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $data; + /** + * Output only. A human-readable description of the warning code. + * + * Generated from protobuf field string warning_message = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $warning_message = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $code + * Output only. A warning code, if applicable. + * @type array|\Google\Protobuf\Internal\MapField $data + * Output only. Metadata about this warning in key: value format. The key + * should provides more detail on the warning being returned. For example, + * for warnings where there are no results in a list request for a + * particular zone, this key might be scope and the key value might be the + * zone name. Other examples might be a key indicating a deprecated resource + * and a suggested replacement. + * @type string $warning_message + * Output only. A human-readable description of the warning code. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkconnectivity\V1\PolicyBasedRouting::initOnce(); + parent::__construct($data); + } + + /** + * Output only. A warning code, if applicable. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.PolicyBasedRoute.Warnings.Code code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getCode() + { + return $this->code; + } + + /** + * Output only. A warning code, if applicable. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.PolicyBasedRoute.Warnings.Code code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setCode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetworkConnectivity\V1\PolicyBasedRoute\Warnings\Code::class); + $this->code = $var; + + return $this; + } + + /** + * Output only. Metadata about this warning in key: value format. The key + * should provides more detail on the warning being returned. For example, + * for warnings where there are no results in a list request for a + * particular zone, this key might be scope and the key value might be the + * zone name. Other examples might be a key indicating a deprecated resource + * and a suggested replacement. + * + * Generated from protobuf field map data = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getData() + { + return $this->data; + } + + /** + * Output only. Metadata about this warning in key: value format. The key + * should provides more detail on the warning being returned. For example, + * for warnings where there are no results in a list request for a + * particular zone, this key might be scope and the key value might be the + * zone name. Other examples might be a key indicating a deprecated resource + * and a suggested replacement. + * + * Generated from protobuf field map data = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setData($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->data = $arr; + + return $this; + } + + /** + * Output only. A human-readable description of the warning code. + * + * Generated from protobuf field string warning_message = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getWarningMessage() + { + return $this->warning_message; + } + + /** + * Output only. A human-readable description of the warning code. + * + * Generated from protobuf field string warning_message = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setWarningMessage($var) + { + GPBUtil::checkString($var, True); + $this->warning_message = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Warnings::class, \Google\Cloud\NetworkConnectivity\V1\PolicyBasedRoute_Warnings::class); + diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/PolicyBasedRoute/Warnings/Code.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/PolicyBasedRoute/Warnings/Code.php new file mode 100644 index 000000000000..6d1ed38b0417 --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/PolicyBasedRoute/Warnings/Code.php @@ -0,0 +1,68 @@ +google.cloud.networkconnectivity.v1.PolicyBasedRoute.Warnings.Code + */ +class Code +{ + /** + * Default value. + * + * Generated from protobuf enum WARNING_UNSPECIFIED = 0; + */ + const WARNING_UNSPECIFIED = 0; + /** + * The policy based route is not active and functioning. Common causes are + * the dependent network was deleted or the resource project was turned + * off. + * + * Generated from protobuf enum RESOURCE_NOT_ACTIVE = 1; + */ + const RESOURCE_NOT_ACTIVE = 1; + /** + * The policy based route is being modified (e.g. created/deleted) at this + * time. + * + * Generated from protobuf enum RESOURCE_BEING_MODIFIED = 2; + */ + const RESOURCE_BEING_MODIFIED = 2; + + private static $valueToName = [ + self::WARNING_UNSPECIFIED => 'WARNING_UNSPECIFIED', + self::RESOURCE_NOT_ACTIVE => 'RESOURCE_NOT_ACTIVE', + self::RESOURCE_BEING_MODIFIED => 'RESOURCE_BEING_MODIFIED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Code::class, \Google\Cloud\NetworkConnectivity\V1\PolicyBasedRoute_Warnings_Code::class); + diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/PolicyMode.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/PolicyMode.php new file mode 100644 index 000000000000..ac11aeace43b --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/PolicyMode.php @@ -0,0 +1,55 @@ +google.cloud.networkconnectivity.v1.PolicyMode + */ +class PolicyMode +{ + /** + * Policy mode is unspecified. It defaults to PRESET + * with preset_topology = MESH. + * + * Generated from protobuf enum POLICY_MODE_UNSPECIFIED = 0; + */ + const POLICY_MODE_UNSPECIFIED = 0; + /** + * Hub uses one of the preset topologies. + * + * Generated from protobuf enum PRESET = 1; + */ + const PRESET = 1; + + private static $valueToName = [ + self::POLICY_MODE_UNSPECIFIED => 'POLICY_MODE_UNSPECIFIED', + self::PRESET => 'PRESET', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/PresetTopology.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/PresetTopology.php new file mode 100644 index 000000000000..bc5ed8fb2706 --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/PresetTopology.php @@ -0,0 +1,65 @@ +google.cloud.networkconnectivity.v1.PresetTopology + */ +class PresetTopology +{ + /** + * Preset topology is unspecified. When policy_mode = PRESET, + * it defaults to MESH. + * + * Generated from protobuf enum PRESET_TOPOLOGY_UNSPECIFIED = 0; + */ + const PRESET_TOPOLOGY_UNSPECIFIED = 0; + /** + * Mesh topology is implemented. Group `default` is automatically created. + * All spokes in the hub are added to group `default`. + * + * Generated from protobuf enum MESH = 2; + */ + const MESH = 2; + /** + * Star topology is implemented. Two groups, `center` and `edge`, are + * automatically created along with hub creation. Spokes have to join one of + * the groups during creation. + * + * Generated from protobuf enum STAR = 3; + */ + const STAR = 3; + + private static $valueToName = [ + self::PRESET_TOPOLOGY_UNSPECIFIED => 'PRESET_TOPOLOGY_UNSPECIFIED', + self::MESH => 'MESH', + self::STAR => 'STAR', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/PscPropagationStatus.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/PscPropagationStatus.php new file mode 100644 index 000000000000..97115d1eefe5 --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/PscPropagationStatus.php @@ -0,0 +1,276 @@ +google.cloud.networkconnectivity.v1.PscPropagationStatus + */ +class PscPropagationStatus extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the spoke that the source forwarding rule belongs to. + * + * Generated from protobuf field string source_spoke = 1; + */ + protected $source_spoke = ''; + /** + * The name of the group that the source spoke belongs to. + * + * Generated from protobuf field string source_group = 2; + */ + protected $source_group = ''; + /** + * The name of the forwarding rule exported to the hub. + * + * Generated from protobuf field string source_forwarding_rule = 3; + */ + protected $source_forwarding_rule = ''; + /** + * The name of the spoke that the source forwarding rule propagates to. + * + * Generated from protobuf field string target_spoke = 4; + */ + protected $target_spoke = ''; + /** + * The name of the group that the target spoke belongs to. + * + * Generated from protobuf field string target_group = 5; + */ + protected $target_group = ''; + /** + * The propagation status. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.PscPropagationStatus.Code code = 6; + */ + protected $code = 0; + /** + * The human-readable summary of the Private Service Connect connection + * propagation status. + * + * Generated from protobuf field string message = 7; + */ + protected $message = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $source_spoke + * The name of the spoke that the source forwarding rule belongs to. + * @type string $source_group + * The name of the group that the source spoke belongs to. + * @type string $source_forwarding_rule + * The name of the forwarding rule exported to the hub. + * @type string $target_spoke + * The name of the spoke that the source forwarding rule propagates to. + * @type string $target_group + * The name of the group that the target spoke belongs to. + * @type int $code + * The propagation status. + * @type string $message + * The human-readable summary of the Private Service Connect connection + * propagation status. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); + parent::__construct($data); + } + + /** + * The name of the spoke that the source forwarding rule belongs to. + * + * Generated from protobuf field string source_spoke = 1; + * @return string + */ + public function getSourceSpoke() + { + return $this->source_spoke; + } + + /** + * The name of the spoke that the source forwarding rule belongs to. + * + * Generated from protobuf field string source_spoke = 1; + * @param string $var + * @return $this + */ + public function setSourceSpoke($var) + { + GPBUtil::checkString($var, True); + $this->source_spoke = $var; + + return $this; + } + + /** + * The name of the group that the source spoke belongs to. + * + * Generated from protobuf field string source_group = 2; + * @return string + */ + public function getSourceGroup() + { + return $this->source_group; + } + + /** + * The name of the group that the source spoke belongs to. + * + * Generated from protobuf field string source_group = 2; + * @param string $var + * @return $this + */ + public function setSourceGroup($var) + { + GPBUtil::checkString($var, True); + $this->source_group = $var; + + return $this; + } + + /** + * The name of the forwarding rule exported to the hub. + * + * Generated from protobuf field string source_forwarding_rule = 3; + * @return string + */ + public function getSourceForwardingRule() + { + return $this->source_forwarding_rule; + } + + /** + * The name of the forwarding rule exported to the hub. + * + * Generated from protobuf field string source_forwarding_rule = 3; + * @param string $var + * @return $this + */ + public function setSourceForwardingRule($var) + { + GPBUtil::checkString($var, True); + $this->source_forwarding_rule = $var; + + return $this; + } + + /** + * The name of the spoke that the source forwarding rule propagates to. + * + * Generated from protobuf field string target_spoke = 4; + * @return string + */ + public function getTargetSpoke() + { + return $this->target_spoke; + } + + /** + * The name of the spoke that the source forwarding rule propagates to. + * + * Generated from protobuf field string target_spoke = 4; + * @param string $var + * @return $this + */ + public function setTargetSpoke($var) + { + GPBUtil::checkString($var, True); + $this->target_spoke = $var; + + return $this; + } + + /** + * The name of the group that the target spoke belongs to. + * + * Generated from protobuf field string target_group = 5; + * @return string + */ + public function getTargetGroup() + { + return $this->target_group; + } + + /** + * The name of the group that the target spoke belongs to. + * + * Generated from protobuf field string target_group = 5; + * @param string $var + * @return $this + */ + public function setTargetGroup($var) + { + GPBUtil::checkString($var, True); + $this->target_group = $var; + + return $this; + } + + /** + * The propagation status. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.PscPropagationStatus.Code code = 6; + * @return int + */ + public function getCode() + { + return $this->code; + } + + /** + * The propagation status. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.PscPropagationStatus.Code code = 6; + * @param int $var + * @return $this + */ + public function setCode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetworkConnectivity\V1\PscPropagationStatus\Code::class); + $this->code = $var; + + return $this; + } + + /** + * The human-readable summary of the Private Service Connect connection + * propagation status. + * + * Generated from protobuf field string message = 7; + * @return string + */ + public function getMessage() + { + return $this->message; + } + + /** + * The human-readable summary of the Private Service Connect connection + * propagation status. + * + * Generated from protobuf field string message = 7; + * @param string $var + * @return $this + */ + public function setMessage($var) + { + GPBUtil::checkString($var, True); + $this->message = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/PscPropagationStatus/Code.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/PscPropagationStatus/Code.php new file mode 100644 index 000000000000..ac929c1c2300 --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/PscPropagationStatus/Code.php @@ -0,0 +1,103 @@ +google.cloud.networkconnectivity.v1.PscPropagationStatus.Code + */ +class Code +{ + /** + * The code is unspecified. + * + * Generated from protobuf enum CODE_UNSPECIFIED = 0; + */ + const CODE_UNSPECIFIED = 0; + /** + * The propagated Private Service Connect connection is ready. + * + * Generated from protobuf enum READY = 1; + */ + const READY = 1; + /** + * The Private Service Connect connection is propagating. This is a + * transient state. + * + * Generated from protobuf enum PROPAGATING = 2; + */ + const PROPAGATING = 2; + /** + * The Private Service Connect connection propagation failed because the VPC + * network or the project of the target spoke has exceeded the connection + * limit set by the producer. + * + * Generated from protobuf enum ERROR_PRODUCER_PROPAGATED_CONNECTION_LIMIT_EXCEEDED = 3; + */ + const ERROR_PRODUCER_PROPAGATED_CONNECTION_LIMIT_EXCEEDED = 3; + /** + * The Private Service Connect connection propagation failed because the NAT + * IP subnet space has been exhausted. It is equivalent to the `Needs + * attention` status of the Private Service Connect connection. See + * https://cloud.google.com/vpc/docs/about-accessing-vpc-hosted-services-endpoints#connection-statuses. + * + * Generated from protobuf enum ERROR_PRODUCER_NAT_IP_SPACE_EXHAUSTED = 4; + */ + const ERROR_PRODUCER_NAT_IP_SPACE_EXHAUSTED = 4; + /** + * The Private Service Connect connection propagation failed because the + * `PSC_ILB_CONSUMER_FORWARDING_RULES_PER_PRODUCER_NETWORK` quota in the + * producer VPC network has been exceeded. + * + * Generated from protobuf enum ERROR_PRODUCER_QUOTA_EXCEEDED = 5; + */ + const ERROR_PRODUCER_QUOTA_EXCEEDED = 5; + /** + * The Private Service Connect connection propagation failed because the + * `PSC_PROPAGATED_CONNECTIONS_PER_VPC_NETWORK` quota in the consumer + * VPC network has been exceeded. + * + * Generated from protobuf enum ERROR_CONSUMER_QUOTA_EXCEEDED = 6; + */ + const ERROR_CONSUMER_QUOTA_EXCEEDED = 6; + + private static $valueToName = [ + self::CODE_UNSPECIFIED => 'CODE_UNSPECIFIED', + self::READY => 'READY', + self::PROPAGATING => 'PROPAGATING', + self::ERROR_PRODUCER_PROPAGATED_CONNECTION_LIMIT_EXCEEDED => 'ERROR_PRODUCER_PROPAGATED_CONNECTION_LIMIT_EXCEEDED', + self::ERROR_PRODUCER_NAT_IP_SPACE_EXHAUSTED => 'ERROR_PRODUCER_NAT_IP_SPACE_EXHAUSTED', + self::ERROR_PRODUCER_QUOTA_EXCEEDED => 'ERROR_PRODUCER_QUOTA_EXCEEDED', + self::ERROR_CONSUMER_QUOTA_EXCEEDED => 'ERROR_CONSUMER_QUOTA_EXCEEDED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Code::class, \Google\Cloud\NetworkConnectivity\V1\PscPropagationStatus_Code::class); + diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/QueryHubStatusRequest.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/QueryHubStatusRequest.php new file mode 100644 index 000000000000..b03702611276 --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/QueryHubStatusRequest.php @@ -0,0 +1,348 @@ +google.cloud.networkconnectivity.v1.QueryHubStatusRequest + */ +class QueryHubStatusRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the hub. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. The maximum number of results to return per page. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. The page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. An expression that filters the list of results. + * The filter can be used to filter the results by the following fields: + * * `psc_propagation_status.source_spoke` + * * `psc_propagation_status.source_group` + * * `psc_propagation_status.source_forwarding_rule` + * * `psc_propagation_status.target_spoke` + * * `psc_propagation_status.target_group` + * * `psc_propagation_status.code` + * * `psc_propagation_status.message` + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. Sort the results in ascending order by the specified fields. + * A comma-separated list of any of these fields: + * * `psc_propagation_status.source_spoke` + * * `psc_propagation_status.source_group` + * * `psc_propagation_status.source_forwarding_rule` + * * `psc_propagation_status.target_spoke` + * * `psc_propagation_status.target_group` + * * `psc_propagation_status.code` + * If `group_by` is set, the value of the `order_by` field must be the + * same as or a subset of the `group_by` field. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + /** + * Optional. Aggregate the results by the specified fields. + * A comma-separated list of any of these fields: + * * `psc_propagation_status.source_spoke` + * * `psc_propagation_status.source_group` + * * `psc_propagation_status.source_forwarding_rule` + * * `psc_propagation_status.target_spoke` + * * `psc_propagation_status.target_group` + * * `psc_propagation_status.code` + * + * Generated from protobuf field string group_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $group_by = ''; + + /** + * @param string $name Required. The name of the hub. Please see + * {@see HubServiceClient::hubName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkConnectivity\V1\QueryHubStatusRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the hub. + * @type int $page_size + * Optional. The maximum number of results to return per page. + * @type string $page_token + * Optional. The page token. + * @type string $filter + * Optional. An expression that filters the list of results. + * The filter can be used to filter the results by the following fields: + * * `psc_propagation_status.source_spoke` + * * `psc_propagation_status.source_group` + * * `psc_propagation_status.source_forwarding_rule` + * * `psc_propagation_status.target_spoke` + * * `psc_propagation_status.target_group` + * * `psc_propagation_status.code` + * * `psc_propagation_status.message` + * @type string $order_by + * Optional. Sort the results in ascending order by the specified fields. + * A comma-separated list of any of these fields: + * * `psc_propagation_status.source_spoke` + * * `psc_propagation_status.source_group` + * * `psc_propagation_status.source_forwarding_rule` + * * `psc_propagation_status.target_spoke` + * * `psc_propagation_status.target_group` + * * `psc_propagation_status.code` + * If `group_by` is set, the value of the `order_by` field must be the + * same as or a subset of the `group_by` field. + * @type string $group_by + * Optional. Aggregate the results by the specified fields. + * A comma-separated list of any of these fields: + * * `psc_propagation_status.source_spoke` + * * `psc_propagation_status.source_group` + * * `psc_propagation_status.source_forwarding_rule` + * * `psc_propagation_status.target_spoke` + * * `psc_propagation_status.target_group` + * * `psc_propagation_status.code` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the hub. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the hub. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. The maximum number of results to return per page. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of results to return per page. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. The page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. The page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. An expression that filters the list of results. + * The filter can be used to filter the results by the following fields: + * * `psc_propagation_status.source_spoke` + * * `psc_propagation_status.source_group` + * * `psc_propagation_status.source_forwarding_rule` + * * `psc_propagation_status.target_spoke` + * * `psc_propagation_status.target_group` + * * `psc_propagation_status.code` + * * `psc_propagation_status.message` + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. An expression that filters the list of results. + * The filter can be used to filter the results by the following fields: + * * `psc_propagation_status.source_spoke` + * * `psc_propagation_status.source_group` + * * `psc_propagation_status.source_forwarding_rule` + * * `psc_propagation_status.target_spoke` + * * `psc_propagation_status.target_group` + * * `psc_propagation_status.code` + * * `psc_propagation_status.message` + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Optional. Sort the results in ascending order by the specified fields. + * A comma-separated list of any of these fields: + * * `psc_propagation_status.source_spoke` + * * `psc_propagation_status.source_group` + * * `psc_propagation_status.source_forwarding_rule` + * * `psc_propagation_status.target_spoke` + * * `psc_propagation_status.target_group` + * * `psc_propagation_status.code` + * If `group_by` is set, the value of the `order_by` field must be the + * same as or a subset of the `group_by` field. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. Sort the results in ascending order by the specified fields. + * A comma-separated list of any of these fields: + * * `psc_propagation_status.source_spoke` + * * `psc_propagation_status.source_group` + * * `psc_propagation_status.source_forwarding_rule` + * * `psc_propagation_status.target_spoke` + * * `psc_propagation_status.target_group` + * * `psc_propagation_status.code` + * If `group_by` is set, the value of the `order_by` field must be the + * same as or a subset of the `group_by` field. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + + /** + * Optional. Aggregate the results by the specified fields. + * A comma-separated list of any of these fields: + * * `psc_propagation_status.source_spoke` + * * `psc_propagation_status.source_group` + * * `psc_propagation_status.source_forwarding_rule` + * * `psc_propagation_status.target_spoke` + * * `psc_propagation_status.target_group` + * * `psc_propagation_status.code` + * + * Generated from protobuf field string group_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getGroupBy() + { + return $this->group_by; + } + + /** + * Optional. Aggregate the results by the specified fields. + * A comma-separated list of any of these fields: + * * `psc_propagation_status.source_spoke` + * * `psc_propagation_status.source_group` + * * `psc_propagation_status.source_forwarding_rule` + * * `psc_propagation_status.target_spoke` + * * `psc_propagation_status.target_group` + * * `psc_propagation_status.code` + * + * Generated from protobuf field string group_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setGroupBy($var) + { + GPBUtil::checkString($var, True); + $this->group_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/QueryHubStatusResponse.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/QueryHubStatusResponse.php new file mode 100644 index 000000000000..6d24361a01e5 --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/QueryHubStatusResponse.php @@ -0,0 +1,110 @@ +google.cloud.networkconnectivity.v1.QueryHubStatusResponse + */ +class QueryHubStatusResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of hub status. + * + * Generated from protobuf field repeated .google.cloud.networkconnectivity.v1.HubStatusEntry hub_status_entries = 1; + */ + private $hub_status_entries; + /** + * The token for the next page of the response. To see more results, + * use this value as the page_token for your next request. If this value + * is empty, there are no more results. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\NetworkConnectivity\V1\HubStatusEntry>|\Google\Protobuf\Internal\RepeatedField $hub_status_entries + * The list of hub status. + * @type string $next_page_token + * The token for the next page of the response. To see more results, + * use this value as the page_token for your next request. If this value + * is empty, there are no more results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); + parent::__construct($data); + } + + /** + * The list of hub status. + * + * Generated from protobuf field repeated .google.cloud.networkconnectivity.v1.HubStatusEntry hub_status_entries = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getHubStatusEntries() + { + return $this->hub_status_entries; + } + + /** + * The list of hub status. + * + * Generated from protobuf field repeated .google.cloud.networkconnectivity.v1.HubStatusEntry hub_status_entries = 1; + * @param array<\Google\Cloud\NetworkConnectivity\V1\HubStatusEntry>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setHubStatusEntries($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkConnectivity\V1\HubStatusEntry::class); + $this->hub_status_entries = $arr; + + return $this; + } + + /** + * The token for the next page of the response. To see more results, + * use this value as the page_token for your next request. If this value + * is empty, there are no more results. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * The token for the next page of the response. To see more results, + * use this value as the page_token for your next request. If this value + * is empty, there are no more results. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/RejectHubSpokeRequest.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/RejectHubSpokeRequest.php new file mode 100644 index 000000000000..5dc16ed99792 --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/RejectHubSpokeRequest.php @@ -0,0 +1,231 @@ +google.cloud.networkconnectivity.v1.RejectHubSpokeRequest + */ +class RejectHubSpokeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the hub from which to reject the spoke. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. The URI of the spoke to reject from the hub. + * + * Generated from protobuf field string spoke_uri = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $spoke_uri = ''; + /** + * Optional. A request ID to identify requests. Specify a unique request ID so + * that if you must retry your request, the server knows to ignore the request + * if it has already been completed. The server guarantees that a request + * doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check to see whether the original operation + * was received. If it was, the server ignores the second request. This + * behavior prevents clients from mistakenly creating duplicate commitments. + * The request ID must be a valid UUID, with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + /** + * Optional. Additional information provided by the hub administrator. + * + * Generated from protobuf field string details = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $details = ''; + + /** + * @param string $name Required. The name of the hub from which to reject the spoke. Please see + * {@see HubServiceClient::hubName()} for help formatting this field. + * @param string $spokeUri Required. The URI of the spoke to reject from the hub. Please see + * {@see HubServiceClient::spokeName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkConnectivity\V1\RejectHubSpokeRequest + * + * @experimental + */ + public static function build(string $name, string $spokeUri): self + { + return (new self()) + ->setName($name) + ->setSpokeUri($spokeUri); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the hub from which to reject the spoke. + * @type string $spoke_uri + * Required. The URI of the spoke to reject from the hub. + * @type string $request_id + * Optional. A request ID to identify requests. Specify a unique request ID so + * that if you must retry your request, the server knows to ignore the request + * if it has already been completed. The server guarantees that a request + * doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check to see whether the original operation + * was received. If it was, the server ignores the second request. This + * behavior prevents clients from mistakenly creating duplicate commitments. + * The request ID must be a valid UUID, with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @type string $details + * Optional. Additional information provided by the hub administrator. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the hub from which to reject the spoke. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the hub from which to reject the spoke. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. The URI of the spoke to reject from the hub. + * + * Generated from protobuf field string spoke_uri = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getSpokeUri() + { + return $this->spoke_uri; + } + + /** + * Required. The URI of the spoke to reject from the hub. + * + * Generated from protobuf field string spoke_uri = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setSpokeUri($var) + { + GPBUtil::checkString($var, True); + $this->spoke_uri = $var; + + return $this; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID so + * that if you must retry your request, the server knows to ignore the request + * if it has already been completed. The server guarantees that a request + * doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check to see whether the original operation + * was received. If it was, the server ignores the second request. This + * behavior prevents clients from mistakenly creating duplicate commitments. + * The request ID must be a valid UUID, with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID so + * that if you must retry your request, the server knows to ignore the request + * if it has already been completed. The server guarantees that a request + * doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check to see whether the original operation + * was received. If it was, the server ignores the second request. This + * behavior prevents clients from mistakenly creating duplicate commitments. + * The request ID must be a valid UUID, with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + + /** + * Optional. Additional information provided by the hub administrator. + * + * Generated from protobuf field string details = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDetails() + { + return $this->details; + } + + /** + * Optional. Additional information provided by the hub administrator. + * + * Generated from protobuf field string details = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDetails($var) + { + GPBUtil::checkString($var, True); + $this->details = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/RejectHubSpokeResponse.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/RejectHubSpokeResponse.php new file mode 100644 index 000000000000..6a01f4ea38ee --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/RejectHubSpokeResponse.php @@ -0,0 +1,78 @@ +google.cloud.networkconnectivity.v1.RejectHubSpokeResponse + */ +class RejectHubSpokeResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The spoke that was operated on. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.Spoke spoke = 1; + */ + protected $spoke = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\NetworkConnectivity\V1\Spoke $spoke + * The spoke that was operated on. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); + parent::__construct($data); + } + + /** + * The spoke that was operated on. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.Spoke spoke = 1; + * @return \Google\Cloud\NetworkConnectivity\V1\Spoke|null + */ + public function getSpoke() + { + return $this->spoke; + } + + public function hasSpoke() + { + return isset($this->spoke); + } + + public function clearSpoke() + { + unset($this->spoke); + } + + /** + * The spoke that was operated on. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.Spoke spoke = 1; + * @param \Google\Cloud\NetworkConnectivity\V1\Spoke $var + * @return $this + */ + public function setSpoke($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkConnectivity\V1\Spoke::class); + $this->spoke = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/Route.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/Route.php new file mode 100644 index 000000000000..141de04fc5fd --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/Route.php @@ -0,0 +1,694 @@ +google.cloud.networkconnectivity.v1.Route + */ +class Route extends \Google\Protobuf\Internal\Message +{ + /** + * Immutable. The name of the route. Route names must be unique. Route names + * use the following form: + * `projects/{project_number}/locations/global/hubs/{hub}/routeTables/{route_table_id}/routes/{route_id}` + * + * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $name = ''; + /** + * Output only. The time the route was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The time the route was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * The destination IP address range. + * + * Generated from protobuf field string ip_cidr_range = 1; + */ + protected $ip_cidr_range = ''; + /** + * Output only. The route's type. Its type is determined by the properties of + * its IP address range. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.RouteType type = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $type = 0; + /** + * Immutable. The destination VPC network for packets on this route. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.NextHopVpcNetwork next_hop_vpc_network = 2 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $next_hop_vpc_network = null; + /** + * Optional labels in key-value pair format. For more information about + * labels, see [Requirements for + * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements). + * + * Generated from protobuf field map labels = 6; + */ + private $labels; + /** + * An optional description of the route. + * + * Generated from protobuf field string description = 7; + */ + protected $description = ''; + /** + * Output only. The Google-generated UUID for the route. This value is unique + * across all Network Connectivity Center route resources. If a + * route is deleted and another with the same name is created, + * the new route is assigned a different `uid`. + * + * Generated from protobuf field string uid = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $uid = ''; + /** + * Output only. The current lifecycle state of the route. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Immutable. The spoke that this route leads to. + * Example: projects/12345/locations/global/spokes/SPOKE + * + * Generated from protobuf field string spoke = 11 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + */ + protected $spoke = ''; + /** + * Output only. The origin location of the route. + * Uses the following form: "projects/{project}/locations/{location}" + * Example: projects/1234/locations/us-central1 + * + * Generated from protobuf field string location = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $location = ''; + /** + * Output only. The priority of this route. Priority is used to break ties in + * cases where a destination matches more than one route. In these cases the + * route with the lowest-numbered priority value wins. + * + * Generated from protobuf field int64 priority = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $priority = 0; + /** + * Immutable. The next-hop VPN tunnel for packets on this route. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.NextHopVPNTunnel next_hop_vpn_tunnel = 14 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $next_hop_vpn_tunnel = null; + /** + * Immutable. The next-hop Router appliance instance for packets on this + * route. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.NextHopRouterApplianceInstance next_hop_router_appliance_instance = 15 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $next_hop_router_appliance_instance = null; + /** + * Immutable. The next-hop VLAN attachment for packets on this route. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.NextHopInterconnectAttachment next_hop_interconnect_attachment = 16 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $next_hop_interconnect_attachment = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Immutable. The name of the route. Route names must be unique. Route names + * use the following form: + * `projects/{project_number}/locations/global/hubs/{hub}/routeTables/{route_table_id}/routes/{route_id}` + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time the route was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The time the route was last updated. + * @type string $ip_cidr_range + * The destination IP address range. + * @type int $type + * Output only. The route's type. Its type is determined by the properties of + * its IP address range. + * @type \Google\Cloud\NetworkConnectivity\V1\NextHopVpcNetwork $next_hop_vpc_network + * Immutable. The destination VPC network for packets on this route. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional labels in key-value pair format. For more information about + * labels, see [Requirements for + * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements). + * @type string $description + * An optional description of the route. + * @type string $uid + * Output only. The Google-generated UUID for the route. This value is unique + * across all Network Connectivity Center route resources. If a + * route is deleted and another with the same name is created, + * the new route is assigned a different `uid`. + * @type int $state + * Output only. The current lifecycle state of the route. + * @type string $spoke + * Immutable. The spoke that this route leads to. + * Example: projects/12345/locations/global/spokes/SPOKE + * @type string $location + * Output only. The origin location of the route. + * Uses the following form: "projects/{project}/locations/{location}" + * Example: projects/1234/locations/us-central1 + * @type int|string $priority + * Output only. The priority of this route. Priority is used to break ties in + * cases where a destination matches more than one route. In these cases the + * route with the lowest-numbered priority value wins. + * @type \Google\Cloud\NetworkConnectivity\V1\NextHopVPNTunnel $next_hop_vpn_tunnel + * Immutable. The next-hop VPN tunnel for packets on this route. + * @type \Google\Cloud\NetworkConnectivity\V1\NextHopRouterApplianceInstance $next_hop_router_appliance_instance + * Immutable. The next-hop Router appliance instance for packets on this + * route. + * @type \Google\Cloud\NetworkConnectivity\V1\NextHopInterconnectAttachment $next_hop_interconnect_attachment + * Immutable. The next-hop VLAN attachment for packets on this route. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); + parent::__construct($data); + } + + /** + * Immutable. The name of the route. Route names must be unique. Route names + * use the following form: + * `projects/{project_number}/locations/global/hubs/{hub}/routeTables/{route_table_id}/routes/{route_id}` + * + * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Immutable. The name of the route. Route names must be unique. Route names + * use the following form: + * `projects/{project_number}/locations/global/hubs/{hub}/routeTables/{route_table_id}/routes/{route_id}` + * + * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The time the route was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The time the route was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The time the route was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The time the route was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * The destination IP address range. + * + * Generated from protobuf field string ip_cidr_range = 1; + * @return string + */ + public function getIpCidrRange() + { + return $this->ip_cidr_range; + } + + /** + * The destination IP address range. + * + * Generated from protobuf field string ip_cidr_range = 1; + * @param string $var + * @return $this + */ + public function setIpCidrRange($var) + { + GPBUtil::checkString($var, True); + $this->ip_cidr_range = $var; + + return $this; + } + + /** + * Output only. The route's type. Its type is determined by the properties of + * its IP address range. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.RouteType type = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Output only. The route's type. Its type is determined by the properties of + * its IP address range. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.RouteType type = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetworkConnectivity\V1\RouteType::class); + $this->type = $var; + + return $this; + } + + /** + * Immutable. The destination VPC network for packets on this route. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.NextHopVpcNetwork next_hop_vpc_network = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * @return \Google\Cloud\NetworkConnectivity\V1\NextHopVpcNetwork|null + */ + public function getNextHopVpcNetwork() + { + return $this->next_hop_vpc_network; + } + + public function hasNextHopVpcNetwork() + { + return isset($this->next_hop_vpc_network); + } + + public function clearNextHopVpcNetwork() + { + unset($this->next_hop_vpc_network); + } + + /** + * Immutable. The destination VPC network for packets on this route. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.NextHopVpcNetwork next_hop_vpc_network = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * @param \Google\Cloud\NetworkConnectivity\V1\NextHopVpcNetwork $var + * @return $this + */ + public function setNextHopVpcNetwork($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkConnectivity\V1\NextHopVpcNetwork::class); + $this->next_hop_vpc_network = $var; + + return $this; + } + + /** + * Optional labels in key-value pair format. For more information about + * labels, see [Requirements for + * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements). + * + * Generated from protobuf field map labels = 6; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional labels in key-value pair format. For more information about + * labels, see [Requirements for + * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements). + * + * Generated from protobuf field map labels = 6; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * An optional description of the route. + * + * Generated from protobuf field string description = 7; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * An optional description of the route. + * + * Generated from protobuf field string description = 7; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Output only. The Google-generated UUID for the route. This value is unique + * across all Network Connectivity Center route resources. If a + * route is deleted and another with the same name is created, + * the new route is assigned a different `uid`. + * + * Generated from protobuf field string uid = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * Output only. The Google-generated UUID for the route. This value is unique + * across all Network Connectivity Center route resources. If a + * route is deleted and another with the same name is created, + * the new route is assigned a different `uid`. + * + * Generated from protobuf field string uid = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setUid($var) + { + GPBUtil::checkString($var, True); + $this->uid = $var; + + return $this; + } + + /** + * Output only. The current lifecycle state of the route. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The current lifecycle state of the route. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetworkConnectivity\V1\State::class); + $this->state = $var; + + return $this; + } + + /** + * Immutable. The spoke that this route leads to. + * Example: projects/12345/locations/global/spokes/SPOKE + * + * Generated from protobuf field string spoke = 11 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + * @return string + */ + public function getSpoke() + { + return $this->spoke; + } + + /** + * Immutable. The spoke that this route leads to. + * Example: projects/12345/locations/global/spokes/SPOKE + * + * Generated from protobuf field string spoke = 11 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setSpoke($var) + { + GPBUtil::checkString($var, True); + $this->spoke = $var; + + return $this; + } + + /** + * Output only. The origin location of the route. + * Uses the following form: "projects/{project}/locations/{location}" + * Example: projects/1234/locations/us-central1 + * + * Generated from protobuf field string location = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getLocation() + { + return $this->location; + } + + /** + * Output only. The origin location of the route. + * Uses the following form: "projects/{project}/locations/{location}" + * Example: projects/1234/locations/us-central1 + * + * Generated from protobuf field string location = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setLocation($var) + { + GPBUtil::checkString($var, True); + $this->location = $var; + + return $this; + } + + /** + * Output only. The priority of this route. Priority is used to break ties in + * cases where a destination matches more than one route. In these cases the + * route with the lowest-numbered priority value wins. + * + * Generated from protobuf field int64 priority = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getPriority() + { + return $this->priority; + } + + /** + * Output only. The priority of this route. Priority is used to break ties in + * cases where a destination matches more than one route. In these cases the + * route with the lowest-numbered priority value wins. + * + * Generated from protobuf field int64 priority = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setPriority($var) + { + GPBUtil::checkInt64($var); + $this->priority = $var; + + return $this; + } + + /** + * Immutable. The next-hop VPN tunnel for packets on this route. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.NextHopVPNTunnel next_hop_vpn_tunnel = 14 [(.google.api.field_behavior) = IMMUTABLE]; + * @return \Google\Cloud\NetworkConnectivity\V1\NextHopVPNTunnel|null + */ + public function getNextHopVpnTunnel() + { + return $this->next_hop_vpn_tunnel; + } + + public function hasNextHopVpnTunnel() + { + return isset($this->next_hop_vpn_tunnel); + } + + public function clearNextHopVpnTunnel() + { + unset($this->next_hop_vpn_tunnel); + } + + /** + * Immutable. The next-hop VPN tunnel for packets on this route. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.NextHopVPNTunnel next_hop_vpn_tunnel = 14 [(.google.api.field_behavior) = IMMUTABLE]; + * @param \Google\Cloud\NetworkConnectivity\V1\NextHopVPNTunnel $var + * @return $this + */ + public function setNextHopVpnTunnel($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkConnectivity\V1\NextHopVPNTunnel::class); + $this->next_hop_vpn_tunnel = $var; + + return $this; + } + + /** + * Immutable. The next-hop Router appliance instance for packets on this + * route. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.NextHopRouterApplianceInstance next_hop_router_appliance_instance = 15 [(.google.api.field_behavior) = IMMUTABLE]; + * @return \Google\Cloud\NetworkConnectivity\V1\NextHopRouterApplianceInstance|null + */ + public function getNextHopRouterApplianceInstance() + { + return $this->next_hop_router_appliance_instance; + } + + public function hasNextHopRouterApplianceInstance() + { + return isset($this->next_hop_router_appliance_instance); + } + + public function clearNextHopRouterApplianceInstance() + { + unset($this->next_hop_router_appliance_instance); + } + + /** + * Immutable. The next-hop Router appliance instance for packets on this + * route. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.NextHopRouterApplianceInstance next_hop_router_appliance_instance = 15 [(.google.api.field_behavior) = IMMUTABLE]; + * @param \Google\Cloud\NetworkConnectivity\V1\NextHopRouterApplianceInstance $var + * @return $this + */ + public function setNextHopRouterApplianceInstance($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkConnectivity\V1\NextHopRouterApplianceInstance::class); + $this->next_hop_router_appliance_instance = $var; + + return $this; + } + + /** + * Immutable. The next-hop VLAN attachment for packets on this route. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.NextHopInterconnectAttachment next_hop_interconnect_attachment = 16 [(.google.api.field_behavior) = IMMUTABLE]; + * @return \Google\Cloud\NetworkConnectivity\V1\NextHopInterconnectAttachment|null + */ + public function getNextHopInterconnectAttachment() + { + return $this->next_hop_interconnect_attachment; + } + + public function hasNextHopInterconnectAttachment() + { + return isset($this->next_hop_interconnect_attachment); + } + + public function clearNextHopInterconnectAttachment() + { + unset($this->next_hop_interconnect_attachment); + } + + /** + * Immutable. The next-hop VLAN attachment for packets on this route. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.NextHopInterconnectAttachment next_hop_interconnect_attachment = 16 [(.google.api.field_behavior) = IMMUTABLE]; + * @param \Google\Cloud\NetworkConnectivity\V1\NextHopInterconnectAttachment $var + * @return $this + */ + public function setNextHopInterconnectAttachment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkConnectivity\V1\NextHopInterconnectAttachment::class); + $this->next_hop_interconnect_attachment = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/RouteTable.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/RouteTable.php new file mode 100644 index 000000000000..c48d43791198 --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/RouteTable.php @@ -0,0 +1,317 @@ +google.cloud.networkconnectivity.v1.RouteTable + */ +class RouteTable extends \Google\Protobuf\Internal\Message +{ + /** + * Immutable. The name of the route table. Route table names must be unique. + * They use the following form: + * `projects/{project_number}/locations/global/hubs/{hub}/routeTables/{route_table_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $name = ''; + /** + * Output only. The time the route table was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The time the route table was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Optional labels in key-value pair format. For more information about + * labels, see [Requirements for + * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements). + * + * Generated from protobuf field map labels = 4; + */ + private $labels; + /** + * An optional description of the route table. + * + * Generated from protobuf field string description = 5; + */ + protected $description = ''; + /** + * Output only. The Google-generated UUID for the route table. This value is + * unique across all route table resources. If a route table is deleted and + * another with the same name is created, the new route table is assigned + * a different `uid`. + * + * Generated from protobuf field string uid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $uid = ''; + /** + * Output only. The current lifecycle state of this route table. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Immutable. The name of the route table. Route table names must be unique. + * They use the following form: + * `projects/{project_number}/locations/global/hubs/{hub}/routeTables/{route_table_id}` + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time the route table was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The time the route table was last updated. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional labels in key-value pair format. For more information about + * labels, see [Requirements for + * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements). + * @type string $description + * An optional description of the route table. + * @type string $uid + * Output only. The Google-generated UUID for the route table. This value is + * unique across all route table resources. If a route table is deleted and + * another with the same name is created, the new route table is assigned + * a different `uid`. + * @type int $state + * Output only. The current lifecycle state of this route table. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); + parent::__construct($data); + } + + /** + * Immutable. The name of the route table. Route table names must be unique. + * They use the following form: + * `projects/{project_number}/locations/global/hubs/{hub}/routeTables/{route_table_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Immutable. The name of the route table. Route table names must be unique. + * They use the following form: + * `projects/{project_number}/locations/global/hubs/{hub}/routeTables/{route_table_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The time the route table was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The time the route table was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The time the route table was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The time the route table was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Optional labels in key-value pair format. For more information about + * labels, see [Requirements for + * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements). + * + * Generated from protobuf field map labels = 4; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional labels in key-value pair format. For more information about + * labels, see [Requirements for + * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements). + * + * Generated from protobuf field map labels = 4; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * An optional description of the route table. + * + * Generated from protobuf field string description = 5; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * An optional description of the route table. + * + * Generated from protobuf field string description = 5; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Output only. The Google-generated UUID for the route table. This value is + * unique across all route table resources. If a route table is deleted and + * another with the same name is created, the new route table is assigned + * a different `uid`. + * + * Generated from protobuf field string uid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * Output only. The Google-generated UUID for the route table. This value is + * unique across all route table resources. If a route table is deleted and + * another with the same name is created, the new route table is assigned + * a different `uid`. + * + * Generated from protobuf field string uid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setUid($var) + { + GPBUtil::checkString($var, True); + $this->uid = $var; + + return $this; + } + + /** + * Output only. The current lifecycle state of this route table. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The current lifecycle state of this route table. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetworkConnectivity\V1\State::class); + $this->state = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/RouteType.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/RouteType.php new file mode 100644 index 000000000000..4f4fd0bc2186 --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/RouteType.php @@ -0,0 +1,72 @@ +google.cloud.networkconnectivity.v1.RouteType + */ +class RouteType +{ + /** + * No route type information specified + * + * Generated from protobuf enum ROUTE_TYPE_UNSPECIFIED = 0; + */ + const ROUTE_TYPE_UNSPECIFIED = 0; + /** + * The route leads to a destination within the primary address range of the + * VPC network's subnet. + * + * Generated from protobuf enum VPC_PRIMARY_SUBNET = 1; + */ + const VPC_PRIMARY_SUBNET = 1; + /** + * The route leads to a destination within the secondary address range of the + * VPC network's subnet. + * + * Generated from protobuf enum VPC_SECONDARY_SUBNET = 2; + */ + const VPC_SECONDARY_SUBNET = 2; + /** + * The route leads to a destination in a dynamic route. Dynamic routes are + * derived from Border Gateway Protocol (BGP) advertisements received from an + * NCC hybrid spoke. + * + * Generated from protobuf enum DYNAMIC_ROUTE = 3; + */ + const DYNAMIC_ROUTE = 3; + + private static $valueToName = [ + self::ROUTE_TYPE_UNSPECIFIED => 'ROUTE_TYPE_UNSPECIFIED', + self::VPC_PRIMARY_SUBNET => 'VPC_PRIMARY_SUBNET', + self::VPC_SECONDARY_SUBNET => 'VPC_SECONDARY_SUBNET', + self::DYNAMIC_ROUTE => 'DYNAMIC_ROUTE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/RouterApplianceInstance.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/RouterApplianceInstance.php new file mode 100644 index 000000000000..97d6be00b42d --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/RouterApplianceInstance.php @@ -0,0 +1,104 @@ +google.cloud.networkconnectivity.v1.RouterApplianceInstance + */ +class RouterApplianceInstance extends \Google\Protobuf\Internal\Message +{ + /** + * The URI of the VM. + * + * Generated from protobuf field string virtual_machine = 1 [(.google.api.resource_reference) = { + */ + protected $virtual_machine = ''; + /** + * The IP address on the VM to use for peering. + * + * Generated from protobuf field string ip_address = 3; + */ + protected $ip_address = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $virtual_machine + * The URI of the VM. + * @type string $ip_address + * The IP address on the VM to use for peering. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); + parent::__construct($data); + } + + /** + * The URI of the VM. + * + * Generated from protobuf field string virtual_machine = 1 [(.google.api.resource_reference) = { + * @return string + */ + public function getVirtualMachine() + { + return $this->virtual_machine; + } + + /** + * The URI of the VM. + * + * Generated from protobuf field string virtual_machine = 1 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setVirtualMachine($var) + { + GPBUtil::checkString($var, True); + $this->virtual_machine = $var; + + return $this; + } + + /** + * The IP address on the VM to use for peering. + * + * Generated from protobuf field string ip_address = 3; + * @return string + */ + public function getIpAddress() + { + return $this->ip_address; + } + + /** + * The IP address on the VM to use for peering. + * + * Generated from protobuf field string ip_address = 3; + * @param string $var + * @return $this + */ + public function setIpAddress($var) + { + GPBUtil::checkString($var, True); + $this->ip_address = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/RoutingVPC.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/RoutingVPC.php new file mode 100644 index 000000000000..2ef9e562490d --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/RoutingVPC.php @@ -0,0 +1,118 @@ +google.cloud.networkconnectivity.v1.RoutingVPC + */ +class RoutingVPC extends \Google\Protobuf\Internal\Message +{ + /** + * The URI of the VPC network. + * + * Generated from protobuf field string uri = 1 [(.google.api.resource_reference) = { + */ + protected $uri = ''; + /** + * Output only. If true, indicates that this VPC network is currently + * associated with spokes that use the data transfer feature (spokes where the + * site_to_site_data_transfer field is set to true). If you create new spokes + * that use data transfer, they must be associated with this VPC network. At + * most, one VPC network will have this field set to true. + * + * Generated from protobuf field bool required_for_new_site_to_site_data_transfer_spokes = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $required_for_new_site_to_site_data_transfer_spokes = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $uri + * The URI of the VPC network. + * @type bool $required_for_new_site_to_site_data_transfer_spokes + * Output only. If true, indicates that this VPC network is currently + * associated with spokes that use the data transfer feature (spokes where the + * site_to_site_data_transfer field is set to true). If you create new spokes + * that use data transfer, they must be associated with this VPC network. At + * most, one VPC network will have this field set to true. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); + parent::__construct($data); + } + + /** + * The URI of the VPC network. + * + * Generated from protobuf field string uri = 1 [(.google.api.resource_reference) = { + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * The URI of the VPC network. + * + * Generated from protobuf field string uri = 1 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setUri($var) + { + GPBUtil::checkString($var, True); + $this->uri = $var; + + return $this; + } + + /** + * Output only. If true, indicates that this VPC network is currently + * associated with spokes that use the data transfer feature (spokes where the + * site_to_site_data_transfer field is set to true). If you create new spokes + * that use data transfer, they must be associated with this VPC network. At + * most, one VPC network will have this field set to true. + * + * Generated from protobuf field bool required_for_new_site_to_site_data_transfer_spokes = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getRequiredForNewSiteToSiteDataTransferSpokes() + { + return $this->required_for_new_site_to_site_data_transfer_spokes; + } + + /** + * Output only. If true, indicates that this VPC network is currently + * associated with spokes that use the data transfer feature (spokes where the + * site_to_site_data_transfer field is set to true). If you create new spokes + * that use data transfer, they must be associated with this VPC network. At + * most, one VPC network will have this field set to true. + * + * Generated from protobuf field bool required_for_new_site_to_site_data_transfer_spokes = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setRequiredForNewSiteToSiteDataTransferSpokes($var) + { + GPBUtil::checkBool($var); + $this->required_for_new_site_to_site_data_transfer_spokes = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/Spoke.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/Spoke.php new file mode 100644 index 000000000000..839f405f7bba --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/Spoke.php @@ -0,0 +1,682 @@ +google.cloud.networkconnectivity.v1.Spoke + */ +class Spoke extends \Google\Protobuf\Internal\Message +{ + /** + * Immutable. The name of the spoke. Spoke names must be unique. They use the + * following form: + * `projects/{project_number}/locations/{region}/spokes/{spoke_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $name = ''; + /** + * Output only. The time the spoke was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The time the spoke was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Optional labels in key-value pair format. For more information about + * labels, see [Requirements for + * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements). + * + * Generated from protobuf field map labels = 4; + */ + private $labels; + /** + * An optional description of the spoke. + * + * Generated from protobuf field string description = 5; + */ + protected $description = ''; + /** + * Immutable. The name of the hub that this spoke is attached to. + * + * Generated from protobuf field string hub = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + */ + protected $hub = ''; + /** + * Optional. The name of the group that this spoke is associated with. + * + * Generated from protobuf field string group = 23 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $group = ''; + /** + * VPN tunnels that are associated with the spoke. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.LinkedVpnTunnels linked_vpn_tunnels = 17; + */ + protected $linked_vpn_tunnels = null; + /** + * VLAN attachments that are associated with the spoke. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.LinkedInterconnectAttachments linked_interconnect_attachments = 18; + */ + protected $linked_interconnect_attachments = null; + /** + * Router appliance instances that are associated with the spoke. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.LinkedRouterApplianceInstances linked_router_appliance_instances = 19; + */ + protected $linked_router_appliance_instances = null; + /** + * Optional. VPC network that is associated with the spoke. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.LinkedVpcNetwork linked_vpc_network = 20 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $linked_vpc_network = null; + /** + * Optional. The linked producer VPC that is associated with the spoke. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.LinkedProducerVpcNetwork linked_producer_vpc_network = 26 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $linked_producer_vpc_network = null; + /** + * Output only. The Google-generated UUID for the spoke. This value is unique + * across all spoke resources. If a spoke is deleted and another with the same + * name is created, the new spoke is assigned a different `unique_id`. + * + * Generated from protobuf field string unique_id = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $unique_id = ''; + /** + * Output only. The current lifecycle state of this spoke. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.State state = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. The reasons for current state of the spoke. Only present when + * the spoke is in the `INACTIVE` state. + * + * Generated from protobuf field repeated .google.cloud.networkconnectivity.v1.Spoke.StateReason reasons = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $reasons; + /** + * Output only. The type of resource associated with the spoke. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.SpokeType spoke_type = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $spoke_type = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Immutable. The name of the spoke. Spoke names must be unique. They use the + * following form: + * `projects/{project_number}/locations/{region}/spokes/{spoke_id}` + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time the spoke was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The time the spoke was last updated. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional labels in key-value pair format. For more information about + * labels, see [Requirements for + * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements). + * @type string $description + * An optional description of the spoke. + * @type string $hub + * Immutable. The name of the hub that this spoke is attached to. + * @type string $group + * Optional. The name of the group that this spoke is associated with. + * @type \Google\Cloud\NetworkConnectivity\V1\LinkedVpnTunnels $linked_vpn_tunnels + * VPN tunnels that are associated with the spoke. + * @type \Google\Cloud\NetworkConnectivity\V1\LinkedInterconnectAttachments $linked_interconnect_attachments + * VLAN attachments that are associated with the spoke. + * @type \Google\Cloud\NetworkConnectivity\V1\LinkedRouterApplianceInstances $linked_router_appliance_instances + * Router appliance instances that are associated with the spoke. + * @type \Google\Cloud\NetworkConnectivity\V1\LinkedVpcNetwork $linked_vpc_network + * Optional. VPC network that is associated with the spoke. + * @type \Google\Cloud\NetworkConnectivity\V1\LinkedProducerVpcNetwork $linked_producer_vpc_network + * Optional. The linked producer VPC that is associated with the spoke. + * @type string $unique_id + * Output only. The Google-generated UUID for the spoke. This value is unique + * across all spoke resources. If a spoke is deleted and another with the same + * name is created, the new spoke is assigned a different `unique_id`. + * @type int $state + * Output only. The current lifecycle state of this spoke. + * @type array<\Google\Cloud\NetworkConnectivity\V1\Spoke\StateReason>|\Google\Protobuf\Internal\RepeatedField $reasons + * Output only. The reasons for current state of the spoke. Only present when + * the spoke is in the `INACTIVE` state. + * @type int $spoke_type + * Output only. The type of resource associated with the spoke. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); + parent::__construct($data); + } + + /** + * Immutable. The name of the spoke. Spoke names must be unique. They use the + * following form: + * `projects/{project_number}/locations/{region}/spokes/{spoke_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Immutable. The name of the spoke. Spoke names must be unique. They use the + * following form: + * `projects/{project_number}/locations/{region}/spokes/{spoke_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The time the spoke was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The time the spoke was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The time the spoke was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The time the spoke was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Optional labels in key-value pair format. For more information about + * labels, see [Requirements for + * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements). + * + * Generated from protobuf field map labels = 4; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional labels in key-value pair format. For more information about + * labels, see [Requirements for + * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements). + * + * Generated from protobuf field map labels = 4; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * An optional description of the spoke. + * + * Generated from protobuf field string description = 5; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * An optional description of the spoke. + * + * Generated from protobuf field string description = 5; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Immutable. The name of the hub that this spoke is attached to. + * + * Generated from protobuf field string hub = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + * @return string + */ + public function getHub() + { + return $this->hub; + } + + /** + * Immutable. The name of the hub that this spoke is attached to. + * + * Generated from protobuf field string hub = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setHub($var) + { + GPBUtil::checkString($var, True); + $this->hub = $var; + + return $this; + } + + /** + * Optional. The name of the group that this spoke is associated with. + * + * Generated from protobuf field string group = 23 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getGroup() + { + return $this->group; + } + + /** + * Optional. The name of the group that this spoke is associated with. + * + * Generated from protobuf field string group = 23 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setGroup($var) + { + GPBUtil::checkString($var, True); + $this->group = $var; + + return $this; + } + + /** + * VPN tunnels that are associated with the spoke. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.LinkedVpnTunnels linked_vpn_tunnels = 17; + * @return \Google\Cloud\NetworkConnectivity\V1\LinkedVpnTunnels|null + */ + public function getLinkedVpnTunnels() + { + return $this->linked_vpn_tunnels; + } + + public function hasLinkedVpnTunnels() + { + return isset($this->linked_vpn_tunnels); + } + + public function clearLinkedVpnTunnels() + { + unset($this->linked_vpn_tunnels); + } + + /** + * VPN tunnels that are associated with the spoke. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.LinkedVpnTunnels linked_vpn_tunnels = 17; + * @param \Google\Cloud\NetworkConnectivity\V1\LinkedVpnTunnels $var + * @return $this + */ + public function setLinkedVpnTunnels($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkConnectivity\V1\LinkedVpnTunnels::class); + $this->linked_vpn_tunnels = $var; + + return $this; + } + + /** + * VLAN attachments that are associated with the spoke. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.LinkedInterconnectAttachments linked_interconnect_attachments = 18; + * @return \Google\Cloud\NetworkConnectivity\V1\LinkedInterconnectAttachments|null + */ + public function getLinkedInterconnectAttachments() + { + return $this->linked_interconnect_attachments; + } + + public function hasLinkedInterconnectAttachments() + { + return isset($this->linked_interconnect_attachments); + } + + public function clearLinkedInterconnectAttachments() + { + unset($this->linked_interconnect_attachments); + } + + /** + * VLAN attachments that are associated with the spoke. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.LinkedInterconnectAttachments linked_interconnect_attachments = 18; + * @param \Google\Cloud\NetworkConnectivity\V1\LinkedInterconnectAttachments $var + * @return $this + */ + public function setLinkedInterconnectAttachments($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkConnectivity\V1\LinkedInterconnectAttachments::class); + $this->linked_interconnect_attachments = $var; + + return $this; + } + + /** + * Router appliance instances that are associated with the spoke. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.LinkedRouterApplianceInstances linked_router_appliance_instances = 19; + * @return \Google\Cloud\NetworkConnectivity\V1\LinkedRouterApplianceInstances|null + */ + public function getLinkedRouterApplianceInstances() + { + return $this->linked_router_appliance_instances; + } + + public function hasLinkedRouterApplianceInstances() + { + return isset($this->linked_router_appliance_instances); + } + + public function clearLinkedRouterApplianceInstances() + { + unset($this->linked_router_appliance_instances); + } + + /** + * Router appliance instances that are associated with the spoke. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.LinkedRouterApplianceInstances linked_router_appliance_instances = 19; + * @param \Google\Cloud\NetworkConnectivity\V1\LinkedRouterApplianceInstances $var + * @return $this + */ + public function setLinkedRouterApplianceInstances($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkConnectivity\V1\LinkedRouterApplianceInstances::class); + $this->linked_router_appliance_instances = $var; + + return $this; + } + + /** + * Optional. VPC network that is associated with the spoke. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.LinkedVpcNetwork linked_vpc_network = 20 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\NetworkConnectivity\V1\LinkedVpcNetwork|null + */ + public function getLinkedVpcNetwork() + { + return $this->linked_vpc_network; + } + + public function hasLinkedVpcNetwork() + { + return isset($this->linked_vpc_network); + } + + public function clearLinkedVpcNetwork() + { + unset($this->linked_vpc_network); + } + + /** + * Optional. VPC network that is associated with the spoke. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.LinkedVpcNetwork linked_vpc_network = 20 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\NetworkConnectivity\V1\LinkedVpcNetwork $var + * @return $this + */ + public function setLinkedVpcNetwork($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkConnectivity\V1\LinkedVpcNetwork::class); + $this->linked_vpc_network = $var; + + return $this; + } + + /** + * Optional. The linked producer VPC that is associated with the spoke. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.LinkedProducerVpcNetwork linked_producer_vpc_network = 26 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\NetworkConnectivity\V1\LinkedProducerVpcNetwork|null + */ + public function getLinkedProducerVpcNetwork() + { + return $this->linked_producer_vpc_network; + } + + public function hasLinkedProducerVpcNetwork() + { + return isset($this->linked_producer_vpc_network); + } + + public function clearLinkedProducerVpcNetwork() + { + unset($this->linked_producer_vpc_network); + } + + /** + * Optional. The linked producer VPC that is associated with the spoke. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.LinkedProducerVpcNetwork linked_producer_vpc_network = 26 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\NetworkConnectivity\V1\LinkedProducerVpcNetwork $var + * @return $this + */ + public function setLinkedProducerVpcNetwork($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkConnectivity\V1\LinkedProducerVpcNetwork::class); + $this->linked_producer_vpc_network = $var; + + return $this; + } + + /** + * Output only. The Google-generated UUID for the spoke. This value is unique + * across all spoke resources. If a spoke is deleted and another with the same + * name is created, the new spoke is assigned a different `unique_id`. + * + * Generated from protobuf field string unique_id = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUniqueId() + { + return $this->unique_id; + } + + /** + * Output only. The Google-generated UUID for the spoke. This value is unique + * across all spoke resources. If a spoke is deleted and another with the same + * name is created, the new spoke is assigned a different `unique_id`. + * + * Generated from protobuf field string unique_id = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setUniqueId($var) + { + GPBUtil::checkString($var, True); + $this->unique_id = $var; + + return $this; + } + + /** + * Output only. The current lifecycle state of this spoke. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.State state = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The current lifecycle state of this spoke. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.State state = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetworkConnectivity\V1\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. The reasons for current state of the spoke. Only present when + * the spoke is in the `INACTIVE` state. + * + * Generated from protobuf field repeated .google.cloud.networkconnectivity.v1.Spoke.StateReason reasons = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getReasons() + { + return $this->reasons; + } + + /** + * Output only. The reasons for current state of the spoke. Only present when + * the spoke is in the `INACTIVE` state. + * + * Generated from protobuf field repeated .google.cloud.networkconnectivity.v1.Spoke.StateReason reasons = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\NetworkConnectivity\V1\Spoke\StateReason>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setReasons($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkConnectivity\V1\Spoke\StateReason::class); + $this->reasons = $arr; + + return $this; + } + + /** + * Output only. The type of resource associated with the spoke. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.SpokeType spoke_type = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getSpokeType() + { + return $this->spoke_type; + } + + /** + * Output only. The type of resource associated with the spoke. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.SpokeType spoke_type = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setSpokeType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetworkConnectivity\V1\SpokeType::class); + $this->spoke_type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/Spoke/StateReason.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/Spoke/StateReason.php new file mode 100644 index 000000000000..05de662c4ed7 --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/Spoke/StateReason.php @@ -0,0 +1,138 @@ +google.cloud.networkconnectivity.v1.Spoke.StateReason + */ +class StateReason extends \Google\Protobuf\Internal\Message +{ + /** + * The code associated with this reason. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.Spoke.StateReason.Code code = 1; + */ + protected $code = 0; + /** + * Human-readable details about this reason. + * + * Generated from protobuf field string message = 2; + */ + protected $message = ''; + /** + * Additional information provided by the user in the RejectSpoke call. + * + * Generated from protobuf field string user_details = 3; + */ + protected $user_details = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $code + * The code associated with this reason. + * @type string $message + * Human-readable details about this reason. + * @type string $user_details + * Additional information provided by the user in the RejectSpoke call. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); + parent::__construct($data); + } + + /** + * The code associated with this reason. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.Spoke.StateReason.Code code = 1; + * @return int + */ + public function getCode() + { + return $this->code; + } + + /** + * The code associated with this reason. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.Spoke.StateReason.Code code = 1; + * @param int $var + * @return $this + */ + public function setCode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetworkConnectivity\V1\Spoke\StateReason\Code::class); + $this->code = $var; + + return $this; + } + + /** + * Human-readable details about this reason. + * + * Generated from protobuf field string message = 2; + * @return string + */ + public function getMessage() + { + return $this->message; + } + + /** + * Human-readable details about this reason. + * + * Generated from protobuf field string message = 2; + * @param string $var + * @return $this + */ + public function setMessage($var) + { + GPBUtil::checkString($var, True); + $this->message = $var; + + return $this; + } + + /** + * Additional information provided by the user in the RejectSpoke call. + * + * Generated from protobuf field string user_details = 3; + * @return string + */ + public function getUserDetails() + { + return $this->user_details; + } + + /** + * Additional information provided by the user in the RejectSpoke call. + * + * Generated from protobuf field string user_details = 3; + * @param string $var + * @return $this + */ + public function setUserDetails($var) + { + GPBUtil::checkString($var, True); + $this->user_details = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(StateReason::class, \Google\Cloud\NetworkConnectivity\V1\Spoke_StateReason::class); + diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/Spoke/StateReason/Code.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/Spoke/StateReason/Code.php new file mode 100644 index 000000000000..dd6c8c0e1b53 --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/Spoke/StateReason/Code.php @@ -0,0 +1,79 @@ +google.cloud.networkconnectivity.v1.Spoke.StateReason.Code + */ +class Code +{ + /** + * No information available. + * + * Generated from protobuf enum CODE_UNSPECIFIED = 0; + */ + const CODE_UNSPECIFIED = 0; + /** + * The proposed spoke is pending review. + * + * Generated from protobuf enum PENDING_REVIEW = 1; + */ + const PENDING_REVIEW = 1; + /** + * The proposed spoke has been rejected by the hub administrator. + * + * Generated from protobuf enum REJECTED = 2; + */ + const REJECTED = 2; + /** + * The spoke has been deactivated internally. + * + * Generated from protobuf enum PAUSED = 3; + */ + const PAUSED = 3; + /** + * Network Connectivity Center encountered errors while accepting + * the spoke. + * + * Generated from protobuf enum FAILED = 4; + */ + const FAILED = 4; + + private static $valueToName = [ + self::CODE_UNSPECIFIED => 'CODE_UNSPECIFIED', + self::PENDING_REVIEW => 'PENDING_REVIEW', + self::REJECTED => 'REJECTED', + self::PAUSED => 'PAUSED', + self::FAILED => 'FAILED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Code::class, \Google\Cloud\NetworkConnectivity\V1\Spoke_StateReason_Code::class); + diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/SpokeSummary.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/SpokeSummary.php new file mode 100644 index 000000000000..8fbaff13fdbf --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/SpokeSummary.php @@ -0,0 +1,151 @@ +google.cloud.networkconnectivity.v1.SpokeSummary + */ +class SpokeSummary extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Counts the number of spokes of each type that are + * associated with a specific hub. + * + * Generated from protobuf field repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount spoke_type_counts = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $spoke_type_counts; + /** + * Output only. Counts the number of spokes that are in each state + * and associated with a given hub. + * + * Generated from protobuf field repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount spoke_state_counts = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $spoke_state_counts; + /** + * Output only. Counts the number of spokes that are inactive for each + * possible reason and associated with a given hub. + * + * Generated from protobuf field repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount spoke_state_reason_counts = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $spoke_state_reason_counts; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\NetworkConnectivity\V1\SpokeSummary\SpokeTypeCount>|\Google\Protobuf\Internal\RepeatedField $spoke_type_counts + * Output only. Counts the number of spokes of each type that are + * associated with a specific hub. + * @type array<\Google\Cloud\NetworkConnectivity\V1\SpokeSummary\SpokeStateCount>|\Google\Protobuf\Internal\RepeatedField $spoke_state_counts + * Output only. Counts the number of spokes that are in each state + * and associated with a given hub. + * @type array<\Google\Cloud\NetworkConnectivity\V1\SpokeSummary\SpokeStateReasonCount>|\Google\Protobuf\Internal\RepeatedField $spoke_state_reason_counts + * Output only. Counts the number of spokes that are inactive for each + * possible reason and associated with a given hub. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Counts the number of spokes of each type that are + * associated with a specific hub. + * + * Generated from protobuf field repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount spoke_type_counts = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSpokeTypeCounts() + { + return $this->spoke_type_counts; + } + + /** + * Output only. Counts the number of spokes of each type that are + * associated with a specific hub. + * + * Generated from protobuf field repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount spoke_type_counts = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\NetworkConnectivity\V1\SpokeSummary\SpokeTypeCount>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSpokeTypeCounts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkConnectivity\V1\SpokeSummary\SpokeTypeCount::class); + $this->spoke_type_counts = $arr; + + return $this; + } + + /** + * Output only. Counts the number of spokes that are in each state + * and associated with a given hub. + * + * Generated from protobuf field repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount spoke_state_counts = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSpokeStateCounts() + { + return $this->spoke_state_counts; + } + + /** + * Output only. Counts the number of spokes that are in each state + * and associated with a given hub. + * + * Generated from protobuf field repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount spoke_state_counts = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\NetworkConnectivity\V1\SpokeSummary\SpokeStateCount>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSpokeStateCounts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkConnectivity\V1\SpokeSummary\SpokeStateCount::class); + $this->spoke_state_counts = $arr; + + return $this; + } + + /** + * Output only. Counts the number of spokes that are inactive for each + * possible reason and associated with a given hub. + * + * Generated from protobuf field repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount spoke_state_reason_counts = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSpokeStateReasonCounts() + { + return $this->spoke_state_reason_counts; + } + + /** + * Output only. Counts the number of spokes that are inactive for each + * possible reason and associated with a given hub. + * + * Generated from protobuf field repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount spoke_state_reason_counts = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\NetworkConnectivity\V1\SpokeSummary\SpokeStateReasonCount>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSpokeStateReasonCounts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkConnectivity\V1\SpokeSummary\SpokeStateReasonCount::class); + $this->spoke_state_reason_counts = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/SpokeSummary/SpokeStateCount.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/SpokeSummary/SpokeStateCount.php new file mode 100644 index 000000000000..259b5c409586 --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/SpokeSummary/SpokeStateCount.php @@ -0,0 +1,109 @@ +google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount + */ +class SpokeStateCount extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The state of the spokes. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. The total number of spokes that are in this state + * and associated with a given hub. + * + * Generated from protobuf field int64 count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $state + * Output only. The state of the spokes. + * @type int|string $count + * Output only. The total number of spokes that are in this state + * and associated with a given hub. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The state of the spokes. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The state of the spokes. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetworkConnectivity\V1\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. The total number of spokes that are in this state + * and associated with a given hub. + * + * Generated from protobuf field int64 count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getCount() + { + return $this->count; + } + + /** + * Output only. The total number of spokes that are in this state + * and associated with a given hub. + * + * Generated from protobuf field int64 count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setCount($var) + { + GPBUtil::checkInt64($var); + $this->count = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SpokeStateCount::class, \Google\Cloud\NetworkConnectivity\V1\SpokeSummary_SpokeStateCount::class); + diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/SpokeSummary/SpokeStateReasonCount.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/SpokeSummary/SpokeStateReasonCount.php new file mode 100644 index 000000000000..c06c8e1e020d --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/SpokeSummary/SpokeStateReasonCount.php @@ -0,0 +1,108 @@ +google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount + */ +class SpokeStateReasonCount extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The reason that a spoke is inactive. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.Spoke.StateReason.Code state_reason_code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state_reason_code = 0; + /** + * Output only. The total number of spokes that are inactive for a + * particular reason and associated with a given hub. + * + * Generated from protobuf field int64 count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $state_reason_code + * Output only. The reason that a spoke is inactive. + * @type int|string $count + * Output only. The total number of spokes that are inactive for a + * particular reason and associated with a given hub. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The reason that a spoke is inactive. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.Spoke.StateReason.Code state_reason_code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getStateReasonCode() + { + return $this->state_reason_code; + } + + /** + * Output only. The reason that a spoke is inactive. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.Spoke.StateReason.Code state_reason_code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setStateReasonCode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetworkConnectivity\V1\Spoke\StateReason\Code::class); + $this->state_reason_code = $var; + + return $this; + } + + /** + * Output only. The total number of spokes that are inactive for a + * particular reason and associated with a given hub. + * + * Generated from protobuf field int64 count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getCount() + { + return $this->count; + } + + /** + * Output only. The total number of spokes that are inactive for a + * particular reason and associated with a given hub. + * + * Generated from protobuf field int64 count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setCount($var) + { + GPBUtil::checkInt64($var); + $this->count = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SpokeStateReasonCount::class, \Google\Cloud\NetworkConnectivity\V1\SpokeSummary_SpokeStateReasonCount::class); + diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/SpokeSummary/SpokeTypeCount.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/SpokeSummary/SpokeTypeCount.php new file mode 100644 index 000000000000..3e70871d3ccd --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/SpokeSummary/SpokeTypeCount.php @@ -0,0 +1,110 @@ +google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount + */ +class SpokeTypeCount extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The type of the spokes. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.SpokeType spoke_type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $spoke_type = 0; + /** + * Output only. The total number of spokes of this type that are + * associated with the hub. + * + * Generated from protobuf field int64 count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $spoke_type + * Output only. The type of the spokes. + * @type int|string $count + * Output only. The total number of spokes of this type that are + * associated with the hub. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The type of the spokes. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.SpokeType spoke_type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getSpokeType() + { + return $this->spoke_type; + } + + /** + * Output only. The type of the spokes. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.SpokeType spoke_type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setSpokeType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetworkConnectivity\V1\SpokeType::class); + $this->spoke_type = $var; + + return $this; + } + + /** + * Output only. The total number of spokes of this type that are + * associated with the hub. + * + * Generated from protobuf field int64 count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getCount() + { + return $this->count; + } + + /** + * Output only. The total number of spokes of this type that are + * associated with the hub. + * + * Generated from protobuf field int64 count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setCount($var) + { + GPBUtil::checkInt64($var); + $this->count = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SpokeTypeCount::class, \Google\Cloud\NetworkConnectivity\V1\SpokeSummary_SpokeTypeCount::class); + diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/SpokeType.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/SpokeType.php new file mode 100644 index 000000000000..259ac3a1d64c --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/SpokeType.php @@ -0,0 +1,83 @@ +google.cloud.networkconnectivity.v1.SpokeType + */ +class SpokeType +{ + /** + * Unspecified spoke type. + * + * Generated from protobuf enum SPOKE_TYPE_UNSPECIFIED = 0; + */ + const SPOKE_TYPE_UNSPECIFIED = 0; + /** + * Spokes associated with VPN tunnels. + * + * Generated from protobuf enum VPN_TUNNEL = 1; + */ + const VPN_TUNNEL = 1; + /** + * Spokes associated with VLAN attachments. + * + * Generated from protobuf enum INTERCONNECT_ATTACHMENT = 2; + */ + const INTERCONNECT_ATTACHMENT = 2; + /** + * Spokes associated with router appliance instances. + * + * Generated from protobuf enum ROUTER_APPLIANCE = 3; + */ + const ROUTER_APPLIANCE = 3; + /** + * Spokes associated with VPC networks. + * + * Generated from protobuf enum VPC_NETWORK = 4; + */ + const VPC_NETWORK = 4; + /** + * Spokes that are backed by a producer VPC network. + * + * Generated from protobuf enum PRODUCER_VPC_NETWORK = 7; + */ + const PRODUCER_VPC_NETWORK = 7; + + private static $valueToName = [ + self::SPOKE_TYPE_UNSPECIFIED => 'SPOKE_TYPE_UNSPECIFIED', + self::VPN_TUNNEL => 'VPN_TUNNEL', + self::INTERCONNECT_ATTACHMENT => 'INTERCONNECT_ATTACHMENT', + self::ROUTER_APPLIANCE => 'ROUTER_APPLIANCE', + self::VPC_NETWORK => 'VPC_NETWORK', + self::PRODUCER_VPC_NETWORK => 'PRODUCER_VPC_NETWORK', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/State.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/State.php new file mode 100644 index 000000000000..7150b775ecb7 --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/State.php @@ -0,0 +1,105 @@ +google.cloud.networkconnectivity.v1.State + */ +class State +{ + /** + * No state information available + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The resource's create operation is in progress. + * + * Generated from protobuf enum CREATING = 1; + */ + const CREATING = 1; + /** + * The resource is active + * + * Generated from protobuf enum ACTIVE = 2; + */ + const ACTIVE = 2; + /** + * The resource's delete operation is in progress. + * + * Generated from protobuf enum DELETING = 3; + */ + const DELETING = 3; + /** + * The resource's accept operation is in progress. + * + * Generated from protobuf enum ACCEPTING = 8; + */ + const ACCEPTING = 8; + /** + * The resource's reject operation is in progress. + * + * Generated from protobuf enum REJECTING = 9; + */ + const REJECTING = 9; + /** + * The resource's update operation is in progress. + * + * Generated from protobuf enum UPDATING = 6; + */ + const UPDATING = 6; + /** + * The resource is inactive. + * + * Generated from protobuf enum INACTIVE = 7; + */ + const INACTIVE = 7; + /** + * The hub associated with this spoke resource has been deleted. + * This state applies to spoke resources only. + * + * Generated from protobuf enum OBSOLETE = 10; + */ + const OBSOLETE = 10; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::CREATING => 'CREATING', + self::ACTIVE => 'ACTIVE', + self::DELETING => 'DELETING', + self::ACCEPTING => 'ACCEPTING', + self::REJECTING => 'REJECTING', + self::UPDATING => 'UPDATING', + self::INACTIVE => 'INACTIVE', + self::OBSOLETE => 'OBSOLETE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/UpdateGroupRequest.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/UpdateGroupRequest.php new file mode 100644 index 000000000000..9d995629f967 --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/UpdateGroupRequest.php @@ -0,0 +1,236 @@ +google.cloud.networkconnectivity.v1.UpdateGroupRequest + */ +class UpdateGroupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. In the case of an update to an existing group, field mask is used + * to specify the fields to be overwritten. The fields specified in the + * update_mask are relative to the resource, not the full request. A field is + * overwritten if it is in the mask. If the user does not provide a mask, then + * all fields are overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $update_mask = null; + /** + * Required. The state that the group should be in after the update. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.Group group = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $group = null; + /** + * Optional. A request ID to identify requests. Specify a unique request ID so + * that if you must retry your request, the server knows to ignore the request + * if it has already been completed. The server guarantees that a request + * doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check to see whether the original operation + * was received. If it was, the server ignores the second request. This + * behavior prevents clients from mistakenly creating duplicate commitments. + * The request ID must be a valid UUID, with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param \Google\Cloud\NetworkConnectivity\V1\Group $group Required. The state that the group should be in after the update. + * @param \Google\Protobuf\FieldMask $updateMask Optional. In the case of an update to an existing group, field mask is used + * to specify the fields to be overwritten. The fields specified in the + * update_mask are relative to the resource, not the full request. A field is + * overwritten if it is in the mask. If the user does not provide a mask, then + * all fields are overwritten. + * + * @return \Google\Cloud\NetworkConnectivity\V1\UpdateGroupRequest + * + * @experimental + */ + public static function build(\Google\Cloud\NetworkConnectivity\V1\Group $group, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setGroup($group) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Optional. In the case of an update to an existing group, field mask is used + * to specify the fields to be overwritten. The fields specified in the + * update_mask are relative to the resource, not the full request. A field is + * overwritten if it is in the mask. If the user does not provide a mask, then + * all fields are overwritten. + * @type \Google\Cloud\NetworkConnectivity\V1\Group $group + * Required. The state that the group should be in after the update. + * @type string $request_id + * Optional. A request ID to identify requests. Specify a unique request ID so + * that if you must retry your request, the server knows to ignore the request + * if it has already been completed. The server guarantees that a request + * doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check to see whether the original operation + * was received. If it was, the server ignores the second request. This + * behavior prevents clients from mistakenly creating duplicate commitments. + * The request ID must be a valid UUID, with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); + parent::__construct($data); + } + + /** + * Optional. In the case of an update to an existing group, field mask is used + * to specify the fields to be overwritten. The fields specified in the + * update_mask are relative to the resource, not the full request. A field is + * overwritten if it is in the mask. If the user does not provide a mask, then + * all fields are overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Optional. In the case of an update to an existing group, field mask is used + * to specify the fields to be overwritten. The fields specified in the + * update_mask are relative to the resource, not the full request. A field is + * overwritten if it is in the mask. If the user does not provide a mask, then + * all fields are overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Required. The state that the group should be in after the update. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.Group group = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetworkConnectivity\V1\Group|null + */ + public function getGroup() + { + return $this->group; + } + + public function hasGroup() + { + return isset($this->group); + } + + public function clearGroup() + { + unset($this->group); + } + + /** + * Required. The state that the group should be in after the update. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.Group group = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetworkConnectivity\V1\Group $var + * @return $this + */ + public function setGroup($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkConnectivity\V1\Group::class); + $this->group = $var; + + return $this; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID so + * that if you must retry your request, the server knows to ignore the request + * if it has already been completed. The server guarantees that a request + * doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check to see whether the original operation + * was received. If it was, the server ignores the second request. This + * behavior prevents clients from mistakenly creating duplicate commitments. + * The request ID must be a valid UUID, with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID so + * that if you must retry your request, the server knows to ignore the request + * if it has already been completed. The server guarantees that a request + * doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check to see whether the original operation + * was received. If it was, the server ignores the second request. This + * behavior prevents clients from mistakenly creating duplicate commitments. + * The request ID must be a valid UUID, with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/UpdateHubRequest.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/UpdateHubRequest.php new file mode 100644 index 000000000000..17e009bf5bd7 --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/UpdateHubRequest.php @@ -0,0 +1,236 @@ +google.cloud.networkconnectivity.v1.UpdateHubRequest + */ +class UpdateHubRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. In the case of an update to an existing hub, field mask is used + * to specify the fields to be overwritten. The fields specified in the + * update_mask are relative to the resource, not the full request. A field is + * overwritten if it is in the mask. If the user does not provide a mask, then + * all fields are overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $update_mask = null; + /** + * Required. The state that the hub should be in after the update. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.Hub hub = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $hub = null; + /** + * Optional. A request ID to identify requests. Specify a unique request ID so + * that if you must retry your request, the server knows to ignore the request + * if it has already been completed. The server guarantees that a request + * doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check to see whether the original operation + * was received. If it was, the server ignores the second request. This + * behavior prevents clients from mistakenly creating duplicate commitments. + * The request ID must be a valid UUID, with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param \Google\Cloud\NetworkConnectivity\V1\Hub $hub Required. The state that the hub should be in after the update. + * @param \Google\Protobuf\FieldMask $updateMask Optional. In the case of an update to an existing hub, field mask is used + * to specify the fields to be overwritten. The fields specified in the + * update_mask are relative to the resource, not the full request. A field is + * overwritten if it is in the mask. If the user does not provide a mask, then + * all fields are overwritten. + * + * @return \Google\Cloud\NetworkConnectivity\V1\UpdateHubRequest + * + * @experimental + */ + public static function build(\Google\Cloud\NetworkConnectivity\V1\Hub $hub, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setHub($hub) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Optional. In the case of an update to an existing hub, field mask is used + * to specify the fields to be overwritten. The fields specified in the + * update_mask are relative to the resource, not the full request. A field is + * overwritten if it is in the mask. If the user does not provide a mask, then + * all fields are overwritten. + * @type \Google\Cloud\NetworkConnectivity\V1\Hub $hub + * Required. The state that the hub should be in after the update. + * @type string $request_id + * Optional. A request ID to identify requests. Specify a unique request ID so + * that if you must retry your request, the server knows to ignore the request + * if it has already been completed. The server guarantees that a request + * doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check to see whether the original operation + * was received. If it was, the server ignores the second request. This + * behavior prevents clients from mistakenly creating duplicate commitments. + * The request ID must be a valid UUID, with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); + parent::__construct($data); + } + + /** + * Optional. In the case of an update to an existing hub, field mask is used + * to specify the fields to be overwritten. The fields specified in the + * update_mask are relative to the resource, not the full request. A field is + * overwritten if it is in the mask. If the user does not provide a mask, then + * all fields are overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Optional. In the case of an update to an existing hub, field mask is used + * to specify the fields to be overwritten. The fields specified in the + * update_mask are relative to the resource, not the full request. A field is + * overwritten if it is in the mask. If the user does not provide a mask, then + * all fields are overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Required. The state that the hub should be in after the update. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.Hub hub = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetworkConnectivity\V1\Hub|null + */ + public function getHub() + { + return $this->hub; + } + + public function hasHub() + { + return isset($this->hub); + } + + public function clearHub() + { + unset($this->hub); + } + + /** + * Required. The state that the hub should be in after the update. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.Hub hub = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetworkConnectivity\V1\Hub $var + * @return $this + */ + public function setHub($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkConnectivity\V1\Hub::class); + $this->hub = $var; + + return $this; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID so + * that if you must retry your request, the server knows to ignore the request + * if it has already been completed. The server guarantees that a request + * doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check to see whether the original operation + * was received. If it was, the server ignores the second request. This + * behavior prevents clients from mistakenly creating duplicate commitments. + * The request ID must be a valid UUID, with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID so + * that if you must retry your request, the server knows to ignore the request + * if it has already been completed. The server guarantees that a request + * doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check to see whether the original operation + * was received. If it was, the server ignores the second request. This + * behavior prevents clients from mistakenly creating duplicate commitments. + * The request ID must be a valid UUID, with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/UpdateSpokeRequest.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/UpdateSpokeRequest.php new file mode 100644 index 000000000000..ee50dce1145a --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/UpdateSpokeRequest.php @@ -0,0 +1,236 @@ +google.cloud.networkconnectivity.v1.UpdateSpokeRequest + */ +class UpdateSpokeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. In the case of an update to an existing spoke, field mask is used + * to specify the fields to be overwritten. The fields specified in the + * update_mask are relative to the resource, not the full request. A field is + * overwritten if it is in the mask. If the user does not provide a mask, then + * all fields are overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $update_mask = null; + /** + * Required. The state that the spoke should be in after the update. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.Spoke spoke = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $spoke = null; + /** + * Optional. A request ID to identify requests. Specify a unique request ID so + * that if you must retry your request, the server knows to ignore the request + * if it has already been completed. The server guarantees that a request + * doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check to see whether the original operation + * was received. If it was, the server ignores the second request. This + * behavior prevents clients from mistakenly creating duplicate commitments. + * The request ID must be a valid UUID, with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param \Google\Cloud\NetworkConnectivity\V1\Spoke $spoke Required. The state that the spoke should be in after the update. + * @param \Google\Protobuf\FieldMask $updateMask Optional. In the case of an update to an existing spoke, field mask is used + * to specify the fields to be overwritten. The fields specified in the + * update_mask are relative to the resource, not the full request. A field is + * overwritten if it is in the mask. If the user does not provide a mask, then + * all fields are overwritten. + * + * @return \Google\Cloud\NetworkConnectivity\V1\UpdateSpokeRequest + * + * @experimental + */ + public static function build(\Google\Cloud\NetworkConnectivity\V1\Spoke $spoke, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setSpoke($spoke) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Optional. In the case of an update to an existing spoke, field mask is used + * to specify the fields to be overwritten. The fields specified in the + * update_mask are relative to the resource, not the full request. A field is + * overwritten if it is in the mask. If the user does not provide a mask, then + * all fields are overwritten. + * @type \Google\Cloud\NetworkConnectivity\V1\Spoke $spoke + * Required. The state that the spoke should be in after the update. + * @type string $request_id + * Optional. A request ID to identify requests. Specify a unique request ID so + * that if you must retry your request, the server knows to ignore the request + * if it has already been completed. The server guarantees that a request + * doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check to see whether the original operation + * was received. If it was, the server ignores the second request. This + * behavior prevents clients from mistakenly creating duplicate commitments. + * The request ID must be a valid UUID, with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); + parent::__construct($data); + } + + /** + * Optional. In the case of an update to an existing spoke, field mask is used + * to specify the fields to be overwritten. The fields specified in the + * update_mask are relative to the resource, not the full request. A field is + * overwritten if it is in the mask. If the user does not provide a mask, then + * all fields are overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Optional. In the case of an update to an existing spoke, field mask is used + * to specify the fields to be overwritten. The fields specified in the + * update_mask are relative to the resource, not the full request. A field is + * overwritten if it is in the mask. If the user does not provide a mask, then + * all fields are overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Required. The state that the spoke should be in after the update. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.Spoke spoke = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetworkConnectivity\V1\Spoke|null + */ + public function getSpoke() + { + return $this->spoke; + } + + public function hasSpoke() + { + return isset($this->spoke); + } + + public function clearSpoke() + { + unset($this->spoke); + } + + /** + * Required. The state that the spoke should be in after the update. + * + * Generated from protobuf field .google.cloud.networkconnectivity.v1.Spoke spoke = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetworkConnectivity\V1\Spoke $var + * @return $this + */ + public function setSpoke($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkConnectivity\V1\Spoke::class); + $this->spoke = $var; + + return $this; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID so + * that if you must retry your request, the server knows to ignore the request + * if it has already been completed. The server guarantees that a request + * doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check to see whether the original operation + * was received. If it was, the server ignores the second request. This + * behavior prevents clients from mistakenly creating duplicate commitments. + * The request ID must be a valid UUID, with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A request ID to identify requests. Specify a unique request ID so + * that if you must retry your request, the server knows to ignore the request + * if it has already been completed. The server guarantees that a request + * doesn't result in creation of duplicate commitments for at least 60 + * minutes. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check to see whether the original operation + * was received. If it was, the server ignores the second request. This + * behavior prevents clients from mistakenly creating duplicate commitments. + * The request ID must be a valid UUID, with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/accept_hub_spoke.php b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/accept_hub_spoke.php new file mode 100644 index 000000000000..cfa6ad8e734e --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/accept_hub_spoke.php @@ -0,0 +1,88 @@ +setName($formattedName) + ->setSpokeUri($formattedSpokeUri); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $hubServiceClient->acceptHubSpoke($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var AcceptHubSpokeResponse $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = HubServiceClient::hubName('[PROJECT]', '[HUB]'); + $formattedSpokeUri = HubServiceClient::spokeName('[PROJECT]', '[LOCATION]', '[SPOKE]'); + + accept_hub_spoke_sample($formattedName, $formattedSpokeUri); +} +// [END networkconnectivity_v1_generated_HubService_AcceptHubSpoke_sync] diff --git a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/create_hub.php b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/create_hub.php new file mode 100644 index 000000000000..ee735dc229f4 --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/create_hub.php @@ -0,0 +1,88 @@ +setParent($formattedParent) + ->setHubId($hubId) + ->setHub($hub); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $hubServiceClient->createHub($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Hub $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = HubServiceClient::locationName('[PROJECT]', '[LOCATION]'); + $hubId = '[HUB_ID]'; + + create_hub_sample($formattedParent, $hubId); +} +// [END networkconnectivity_v1_generated_HubService_CreateHub_sync] diff --git a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/create_spoke.php b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/create_spoke.php new file mode 100644 index 000000000000..2d1e5233f0e4 --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/create_spoke.php @@ -0,0 +1,88 @@ +setParent($formattedParent) + ->setSpokeId($spokeId) + ->setSpoke($spoke); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $hubServiceClient->createSpoke($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Spoke $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = HubServiceClient::locationName('[PROJECT]', '[LOCATION]'); + $spokeId = '[SPOKE_ID]'; + + create_spoke_sample($formattedParent, $spokeId); +} +// [END networkconnectivity_v1_generated_HubService_CreateSpoke_sync] diff --git a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/delete_hub.php b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/delete_hub.php new file mode 100644 index 000000000000..d5743264c678 --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/delete_hub.php @@ -0,0 +1,80 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $hubServiceClient->deleteHub($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = HubServiceClient::hubName('[PROJECT]', '[HUB]'); + + delete_hub_sample($formattedName); +} +// [END networkconnectivity_v1_generated_HubService_DeleteHub_sync] diff --git a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/delete_spoke.php b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/delete_spoke.php new file mode 100644 index 000000000000..0973d4a3bdef --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/delete_spoke.php @@ -0,0 +1,80 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $hubServiceClient->deleteSpoke($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = HubServiceClient::spokeName('[PROJECT]', '[LOCATION]', '[SPOKE]'); + + delete_spoke_sample($formattedName); +} +// [END networkconnectivity_v1_generated_HubService_DeleteSpoke_sync] diff --git a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/get_group.php b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/get_group.php new file mode 100644 index 000000000000..213b3b239611 --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/get_group.php @@ -0,0 +1,71 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Group $response */ + $response = $hubServiceClient->getGroup($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = HubServiceClient::groupName('[PROJECT]', '[HUB]', '[GROUP]'); + + get_group_sample($formattedName); +} +// [END networkconnectivity_v1_generated_HubService_GetGroup_sync] diff --git a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/get_hub.php b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/get_hub.php new file mode 100644 index 000000000000..013cd4af6571 --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/get_hub.php @@ -0,0 +1,71 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Hub $response */ + $response = $hubServiceClient->getHub($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = HubServiceClient::hubName('[PROJECT]', '[HUB]'); + + get_hub_sample($formattedName); +} +// [END networkconnectivity_v1_generated_HubService_GetHub_sync] diff --git a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/get_iam_policy.php b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/get_iam_policy.php new file mode 100644 index 000000000000..6b0d6d62e6ae --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/get_iam_policy.php @@ -0,0 +1,72 @@ +setResource($resource); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $hubServiceClient->getIamPolicy($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + + get_iam_policy_sample($resource); +} +// [END networkconnectivity_v1_generated_HubService_GetIamPolicy_sync] diff --git a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/get_location.php b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/get_location.php new file mode 100644 index 000000000000..4433077b71b1 --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/get_location.php @@ -0,0 +1,57 @@ +getLocation($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END networkconnectivity_v1_generated_HubService_GetLocation_sync] diff --git a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/get_route.php b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/get_route.php new file mode 100644 index 000000000000..949a84a3fca1 --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/get_route.php @@ -0,0 +1,71 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Route $response */ + $response = $hubServiceClient->getRoute($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = HubServiceClient::hubRouteName('[PROJECT]', '[HUB]', '[ROUTE_TABLE]', '[ROUTE]'); + + get_route_sample($formattedName); +} +// [END networkconnectivity_v1_generated_HubService_GetRoute_sync] diff --git a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/get_route_table.php b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/get_route_table.php new file mode 100644 index 000000000000..4c9ed73913a6 --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/get_route_table.php @@ -0,0 +1,71 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var RouteTable $response */ + $response = $hubServiceClient->getRouteTable($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = HubServiceClient::routeTableName('[PROJECT]', '[HUB]', '[ROUTE_TABLE]'); + + get_route_table_sample($formattedName); +} +// [END networkconnectivity_v1_generated_HubService_GetRouteTable_sync] diff --git a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/get_spoke.php b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/get_spoke.php new file mode 100644 index 000000000000..a6dd1dec8400 --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/get_spoke.php @@ -0,0 +1,71 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Spoke $response */ + $response = $hubServiceClient->getSpoke($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = HubServiceClient::spokeName('[PROJECT]', '[LOCATION]', '[SPOKE]'); + + get_spoke_sample($formattedName); +} +// [END networkconnectivity_v1_generated_HubService_GetSpoke_sync] diff --git a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/list_groups.php b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/list_groups.php new file mode 100644 index 000000000000..a479e7595269 --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/list_groups.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $hubServiceClient->listGroups($request); + + /** @var Group $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = HubServiceClient::hubName('[PROJECT]', '[HUB]'); + + list_groups_sample($formattedParent); +} +// [END networkconnectivity_v1_generated_HubService_ListGroups_sync] diff --git a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/list_hub_spokes.php b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/list_hub_spokes.php new file mode 100644 index 000000000000..a0eb0a48862f --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/list_hub_spokes.php @@ -0,0 +1,78 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $hubServiceClient->listHubSpokes($request); + + /** @var Spoke $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = HubServiceClient::hubName('[PROJECT]', '[HUB]'); + + list_hub_spokes_sample($formattedName); +} +// [END networkconnectivity_v1_generated_HubService_ListHubSpokes_sync] diff --git a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/list_hubs.php b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/list_hubs.php new file mode 100644 index 000000000000..20aabe5bd2ff --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/list_hubs.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $hubServiceClient->listHubs($request); + + /** @var Hub $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = HubServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + list_hubs_sample($formattedParent); +} +// [END networkconnectivity_v1_generated_HubService_ListHubs_sync] diff --git a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/list_locations.php b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/list_locations.php new file mode 100644 index 000000000000..468f1045ebef --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/list_locations.php @@ -0,0 +1,62 @@ +listLocations($request); + + /** @var Location $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END networkconnectivity_v1_generated_HubService_ListLocations_sync] diff --git a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/list_route_tables.php b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/list_route_tables.php new file mode 100644 index 000000000000..1f9354f25f8f --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/list_route_tables.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $hubServiceClient->listRouteTables($request); + + /** @var RouteTable $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = HubServiceClient::hubName('[PROJECT]', '[HUB]'); + + list_route_tables_sample($formattedParent); +} +// [END networkconnectivity_v1_generated_HubService_ListRouteTables_sync] diff --git a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/list_routes.php b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/list_routes.php new file mode 100644 index 000000000000..01bd9120ca1d --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/list_routes.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $hubServiceClient->listRoutes($request); + + /** @var Route $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = HubServiceClient::routeTableName('[PROJECT]', '[HUB]', '[ROUTE_TABLE]'); + + list_routes_sample($formattedParent); +} +// [END networkconnectivity_v1_generated_HubService_ListRoutes_sync] diff --git a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/list_spokes.php b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/list_spokes.php new file mode 100644 index 000000000000..029f836e46c5 --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/list_spokes.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $hubServiceClient->listSpokes($request); + + /** @var Spoke $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = HubServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + list_spokes_sample($formattedParent); +} +// [END networkconnectivity_v1_generated_HubService_ListSpokes_sync] diff --git a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/query_hub_status.php b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/query_hub_status.php new file mode 100644 index 000000000000..d2b8662793f7 --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/query_hub_status.php @@ -0,0 +1,77 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $hubServiceClient->queryHubStatus($request); + + /** @var HubStatusEntry $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = HubServiceClient::hubName('[PROJECT]', '[HUB]'); + + query_hub_status_sample($formattedName); +} +// [END networkconnectivity_v1_generated_HubService_QueryHubStatus_sync] diff --git a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/reject_hub_spoke.php b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/reject_hub_spoke.php new file mode 100644 index 000000000000..d2a899f91c8c --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/reject_hub_spoke.php @@ -0,0 +1,90 @@ +setName($formattedName) + ->setSpokeUri($formattedSpokeUri); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $hubServiceClient->rejectHubSpoke($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var RejectHubSpokeResponse $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = HubServiceClient::hubName('[PROJECT]', '[HUB]'); + $formattedSpokeUri = HubServiceClient::spokeName('[PROJECT]', '[LOCATION]', '[SPOKE]'); + + reject_hub_spoke_sample($formattedName, $formattedSpokeUri); +} +// [END networkconnectivity_v1_generated_HubService_RejectHubSpoke_sync] diff --git a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/set_iam_policy.php b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/set_iam_policy.php new file mode 100644 index 000000000000..eec7c2e038f6 --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/set_iam_policy.php @@ -0,0 +1,77 @@ +setResource($resource) + ->setPolicy($policy); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $hubServiceClient->setIamPolicy($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + + set_iam_policy_sample($resource); +} +// [END networkconnectivity_v1_generated_HubService_SetIamPolicy_sync] diff --git a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/test_iam_permissions.php b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/test_iam_permissions.php new file mode 100644 index 000000000000..5246dabfd46a --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/test_iam_permissions.php @@ -0,0 +1,84 @@ +setResource($resource) + ->setPermissions($permissions); + + // Call the API and handle any network failures. + try { + /** @var TestIamPermissionsResponse $response */ + $response = $hubServiceClient->testIamPermissions($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + $permissionsElement = '[PERMISSIONS]'; + + test_iam_permissions_sample($resource, $permissionsElement); +} +// [END networkconnectivity_v1_generated_HubService_TestIamPermissions_sync] diff --git a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/update_group.php b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/update_group.php new file mode 100644 index 000000000000..ddda479d7372 --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/update_group.php @@ -0,0 +1,71 @@ +setGroup($group); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $hubServiceClient->updateGroup($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Group $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END networkconnectivity_v1_generated_HubService_UpdateGroup_sync] diff --git a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/update_hub.php b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/update_hub.php new file mode 100644 index 000000000000..808d67ae2de5 --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/update_hub.php @@ -0,0 +1,72 @@ +setHub($hub); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $hubServiceClient->updateHub($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Hub $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END networkconnectivity_v1_generated_HubService_UpdateHub_sync] diff --git a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/update_spoke.php b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/update_spoke.php new file mode 100644 index 000000000000..0f33c890de08 --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/update_spoke.php @@ -0,0 +1,71 @@ +setSpoke($spoke); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $hubServiceClient->updateSpoke($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Spoke $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END networkconnectivity_v1_generated_HubService_UpdateSpoke_sync] diff --git a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/PolicyBasedRoutingServiceClient/create_policy_based_route.php b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/PolicyBasedRoutingServiceClient/create_policy_based_route.php new file mode 100644 index 000000000000..384feebf2f1a --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/PolicyBasedRoutingServiceClient/create_policy_based_route.php @@ -0,0 +1,113 @@ +setProtocolVersion($policyBasedRouteFilterProtocolVersion); + $policyBasedRoute = (new PolicyBasedRoute()) + ->setNetwork($formattedPolicyBasedRouteNetwork) + ->setFilter($policyBasedRouteFilter); + $request = (new CreatePolicyBasedRouteRequest()) + ->setParent($formattedParent) + ->setPolicyBasedRouteId($policyBasedRouteId) + ->setPolicyBasedRoute($policyBasedRoute); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $policyBasedRoutingServiceClient->createPolicyBasedRoute($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var PolicyBasedRoute $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = PolicyBasedRoutingServiceClient::locationName('[PROJECT]', '[LOCATION]'); + $policyBasedRouteId = '[POLICY_BASED_ROUTE_ID]'; + $formattedPolicyBasedRouteNetwork = PolicyBasedRoutingServiceClient::networkName( + '[PROJECT]', + '[RESOURCE_ID]' + ); + $policyBasedRouteFilterProtocolVersion = ProtocolVersion::PROTOCOL_VERSION_UNSPECIFIED; + + create_policy_based_route_sample( + $formattedParent, + $policyBasedRouteId, + $formattedPolicyBasedRouteNetwork, + $policyBasedRouteFilterProtocolVersion + ); +} +// [END networkconnectivity_v1_generated_PolicyBasedRoutingService_CreatePolicyBasedRoute_sync] diff --git a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/PolicyBasedRoutingServiceClient/delete_policy_based_route.php b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/PolicyBasedRoutingServiceClient/delete_policy_based_route.php new file mode 100644 index 000000000000..13d9c7af90cb --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/PolicyBasedRoutingServiceClient/delete_policy_based_route.php @@ -0,0 +1,83 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $policyBasedRoutingServiceClient->deletePolicyBasedRoute($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = PolicyBasedRoutingServiceClient::policyBasedRouteName( + '[PROJECT]', + '[POLICY_BASED_ROUTE]' + ); + + delete_policy_based_route_sample($formattedName); +} +// [END networkconnectivity_v1_generated_PolicyBasedRoutingService_DeletePolicyBasedRoute_sync] diff --git a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/PolicyBasedRoutingServiceClient/get_iam_policy.php b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/PolicyBasedRoutingServiceClient/get_iam_policy.php new file mode 100644 index 000000000000..9545cedfe2e5 --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/PolicyBasedRoutingServiceClient/get_iam_policy.php @@ -0,0 +1,72 @@ +setResource($resource); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $policyBasedRoutingServiceClient->getIamPolicy($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + + get_iam_policy_sample($resource); +} +// [END networkconnectivity_v1_generated_PolicyBasedRoutingService_GetIamPolicy_sync] diff --git a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/PolicyBasedRoutingServiceClient/get_location.php b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/PolicyBasedRoutingServiceClient/get_location.php new file mode 100644 index 000000000000..0c2a0f44a2f0 --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/PolicyBasedRoutingServiceClient/get_location.php @@ -0,0 +1,57 @@ +getLocation($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END networkconnectivity_v1_generated_PolicyBasedRoutingService_GetLocation_sync] diff --git a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/PolicyBasedRoutingServiceClient/get_policy_based_route.php b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/PolicyBasedRoutingServiceClient/get_policy_based_route.php new file mode 100644 index 000000000000..aefb84686f98 --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/PolicyBasedRoutingServiceClient/get_policy_based_route.php @@ -0,0 +1,74 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var PolicyBasedRoute $response */ + $response = $policyBasedRoutingServiceClient->getPolicyBasedRoute($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = PolicyBasedRoutingServiceClient::policyBasedRouteName( + '[PROJECT]', + '[POLICY_BASED_ROUTE]' + ); + + get_policy_based_route_sample($formattedName); +} +// [END networkconnectivity_v1_generated_PolicyBasedRoutingService_GetPolicyBasedRoute_sync] diff --git a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/PolicyBasedRoutingServiceClient/list_locations.php b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/PolicyBasedRoutingServiceClient/list_locations.php new file mode 100644 index 000000000000..888add0b93bd --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/PolicyBasedRoutingServiceClient/list_locations.php @@ -0,0 +1,62 @@ +listLocations($request); + + /** @var Location $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END networkconnectivity_v1_generated_PolicyBasedRoutingService_ListLocations_sync] diff --git a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/PolicyBasedRoutingServiceClient/list_policy_based_routes.php b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/PolicyBasedRoutingServiceClient/list_policy_based_routes.php new file mode 100644 index 000000000000..e422c41f7199 --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/PolicyBasedRoutingServiceClient/list_policy_based_routes.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $policyBasedRoutingServiceClient->listPolicyBasedRoutes($request); + + /** @var PolicyBasedRoute $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = PolicyBasedRoutingServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + list_policy_based_routes_sample($formattedParent); +} +// [END networkconnectivity_v1_generated_PolicyBasedRoutingService_ListPolicyBasedRoutes_sync] diff --git a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/PolicyBasedRoutingServiceClient/set_iam_policy.php b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/PolicyBasedRoutingServiceClient/set_iam_policy.php new file mode 100644 index 000000000000..816615b0fc4f --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/PolicyBasedRoutingServiceClient/set_iam_policy.php @@ -0,0 +1,77 @@ +setResource($resource) + ->setPolicy($policy); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $policyBasedRoutingServiceClient->setIamPolicy($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + + set_iam_policy_sample($resource); +} +// [END networkconnectivity_v1_generated_PolicyBasedRoutingService_SetIamPolicy_sync] diff --git a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/PolicyBasedRoutingServiceClient/test_iam_permissions.php b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/PolicyBasedRoutingServiceClient/test_iam_permissions.php new file mode 100644 index 000000000000..53f7df6b74a0 --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/PolicyBasedRoutingServiceClient/test_iam_permissions.php @@ -0,0 +1,84 @@ +setResource($resource) + ->setPermissions($permissions); + + // Call the API and handle any network failures. + try { + /** @var TestIamPermissionsResponse $response */ + $response = $policyBasedRoutingServiceClient->testIamPermissions($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + $permissionsElement = '[PERMISSIONS]'; + + test_iam_permissions_sample($resource, $permissionsElement); +} +// [END networkconnectivity_v1_generated_PolicyBasedRoutingService_TestIamPermissions_sync] diff --git a/owl-bot-staging/NetworkConnectivity/v1/src/V1/Client/HubServiceClient.php b/owl-bot-staging/NetworkConnectivity/v1/src/V1/Client/HubServiceClient.php new file mode 100644 index 000000000000..a8da4029a111 --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/src/V1/Client/HubServiceClient.php @@ -0,0 +1,1203 @@ + acceptHubSpokeAsync(AcceptHubSpokeRequest $request, array $optionalArgs = []) + * @method PromiseInterface createHubAsync(CreateHubRequest $request, array $optionalArgs = []) + * @method PromiseInterface createSpokeAsync(CreateSpokeRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteHubAsync(DeleteHubRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteSpokeAsync(DeleteSpokeRequest $request, array $optionalArgs = []) + * @method PromiseInterface getGroupAsync(GetGroupRequest $request, array $optionalArgs = []) + * @method PromiseInterface getHubAsync(GetHubRequest $request, array $optionalArgs = []) + * @method PromiseInterface getRouteAsync(GetRouteRequest $request, array $optionalArgs = []) + * @method PromiseInterface getRouteTableAsync(GetRouteTableRequest $request, array $optionalArgs = []) + * @method PromiseInterface getSpokeAsync(GetSpokeRequest $request, array $optionalArgs = []) + * @method PromiseInterface listGroupsAsync(ListGroupsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listHubSpokesAsync(ListHubSpokesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listHubsAsync(ListHubsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listRouteTablesAsync(ListRouteTablesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listRoutesAsync(ListRoutesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listSpokesAsync(ListSpokesRequest $request, array $optionalArgs = []) + * @method PromiseInterface queryHubStatusAsync(QueryHubStatusRequest $request, array $optionalArgs = []) + * @method PromiseInterface rejectHubSpokeAsync(RejectHubSpokeRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateGroupAsync(UpdateGroupRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateHubAsync(UpdateHubRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateSpokeAsync(UpdateSpokeRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) + */ +final class HubServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.networkconnectivity.v1.HubService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'networkconnectivity.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'networkconnectivity.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/hub_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/hub_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/hub_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/hub_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Create the default operation client for the service. + * + * @param array $options ClientOptions for the client. + * + * @return OperationsClient + */ + private function createOperationsClient(array $options) + { + // Unset client-specific configuration options + unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); + + if (isset($options['operationsClient'])) { + return $options['operationsClient']; + } + + return new OperationsClient($options); + } + + /** + * Formats a string containing the fully-qualified path to represent a group + * resource. + * + * @param string $project + * @param string $hub + * @param string $group + * + * @return string The formatted group resource. + */ + public static function groupName(string $project, string $hub, string $group): string + { + return self::getPathTemplate('group')->render([ + 'project' => $project, + 'hub' => $hub, + 'group' => $group, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a hub + * resource. + * + * @param string $project + * @param string $hub + * + * @return string The formatted hub resource. + */ + public static function hubName(string $project, string $hub): string + { + return self::getPathTemplate('hub')->render([ + 'project' => $project, + 'hub' => $hub, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a hub_route + * resource. + * + * @param string $project + * @param string $hub + * @param string $routeTable + * @param string $route + * + * @return string The formatted hub_route resource. + */ + public static function hubRouteName(string $project, string $hub, string $routeTable, string $route): string + { + return self::getPathTemplate('hubRoute')->render([ + 'project' => $project, + 'hub' => $hub, + 'route_table' => $routeTable, + 'route' => $route, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a instance + * resource. + * + * @param string $project + * @param string $zone + * @param string $instance + * + * @return string The formatted instance resource. + */ + public static function instanceName(string $project, string $zone, string $instance): string + { + return self::getPathTemplate('instance')->render([ + 'project' => $project, + 'zone' => $zone, + 'instance' => $instance, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * interconnect_attachment resource. + * + * @param string $project + * @param string $region + * @param string $resourceId + * + * @return string The formatted interconnect_attachment resource. + */ + public static function interconnectAttachmentName(string $project, string $region, string $resourceId): string + { + return self::getPathTemplate('interconnectAttachment')->render([ + 'project' => $project, + 'region' => $region, + 'resource_id' => $resourceId, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a location + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted location resource. + */ + public static function locationName(string $project, string $location): string + { + return self::getPathTemplate('location')->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a network + * resource. + * + * @param string $project + * @param string $resourceId + * + * @return string The formatted network resource. + */ + public static function networkName(string $project, string $resourceId): string + { + return self::getPathTemplate('network')->render([ + 'project' => $project, + 'resource_id' => $resourceId, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a route_table + * resource. + * + * @param string $project + * @param string $hub + * @param string $routeTable + * + * @return string The formatted route_table resource. + */ + public static function routeTableName(string $project, string $hub, string $routeTable): string + { + return self::getPathTemplate('routeTable')->render([ + 'project' => $project, + 'hub' => $hub, + 'route_table' => $routeTable, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a spoke + * resource. + * + * @param string $project + * @param string $location + * @param string $spoke + * + * @return string The formatted spoke resource. + */ + public static function spokeName(string $project, string $location, string $spoke): string + { + return self::getPathTemplate('spoke')->render([ + 'project' => $project, + 'location' => $location, + 'spoke' => $spoke, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a vpn_tunnel + * resource. + * + * @param string $project + * @param string $region + * @param string $resourceId + * + * @return string The formatted vpn_tunnel resource. + */ + public static function vpnTunnelName(string $project, string $region, string $resourceId): string + { + return self::getPathTemplate('vpnTunnel')->render([ + 'project' => $project, + 'region' => $region, + 'resource_id' => $resourceId, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - group: projects/{project}/locations/global/hubs/{hub}/groups/{group} + * - hub: projects/{project}/locations/global/hubs/{hub} + * - hubRoute: projects/{project}/locations/global/hubs/{hub}/routeTables/{route_table}/routes/{route} + * - instance: projects/{project}/zones/{zone}/instances/{instance} + * - interconnectAttachment: projects/{project}/regions/{region}/interconnectAttachments/{resource_id} + * - location: projects/{project}/locations/{location} + * - network: projects/{project}/global/networks/{resource_id} + * - routeTable: projects/{project}/locations/global/hubs/{hub}/routeTables/{route_table} + * - spoke: projects/{project}/locations/{location}/spokes/{spoke} + * - vpnTunnel: projects/{project}/regions/{region}/vpnTunnels/{resource_id} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'networkconnectivity.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Accepts a proposal to attach a Network Connectivity Center spoke + * to a hub. + * + * The async variant is {@see HubServiceClient::acceptHubSpokeAsync()} . + * + * @example samples/V1/HubServiceClient/accept_hub_spoke.php + * + * @param AcceptHubSpokeRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function acceptHubSpoke(AcceptHubSpokeRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('AcceptHubSpoke', $request, $callOptions)->wait(); + } + + /** + * Creates a new Network Connectivity Center hub in the specified project. + * + * The async variant is {@see HubServiceClient::createHubAsync()} . + * + * @example samples/V1/HubServiceClient/create_hub.php + * + * @param CreateHubRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createHub(CreateHubRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateHub', $request, $callOptions)->wait(); + } + + /** + * Creates a Network Connectivity Center spoke. + * + * The async variant is {@see HubServiceClient::createSpokeAsync()} . + * + * @example samples/V1/HubServiceClient/create_spoke.php + * + * @param CreateSpokeRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createSpoke(CreateSpokeRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateSpoke', $request, $callOptions)->wait(); + } + + /** + * Deletes a Network Connectivity Center hub. + * + * The async variant is {@see HubServiceClient::deleteHubAsync()} . + * + * @example samples/V1/HubServiceClient/delete_hub.php + * + * @param DeleteHubRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteHub(DeleteHubRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteHub', $request, $callOptions)->wait(); + } + + /** + * Deletes a Network Connectivity Center spoke. + * + * The async variant is {@see HubServiceClient::deleteSpokeAsync()} . + * + * @example samples/V1/HubServiceClient/delete_spoke.php + * + * @param DeleteSpokeRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteSpoke(DeleteSpokeRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteSpoke', $request, $callOptions)->wait(); + } + + /** + * Gets details about a Network Connectivity Center group. + * + * The async variant is {@see HubServiceClient::getGroupAsync()} . + * + * @example samples/V1/HubServiceClient/get_group.php + * + * @param GetGroupRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Group + * + * @throws ApiException Thrown if the API call fails. + */ + public function getGroup(GetGroupRequest $request, array $callOptions = []): Group + { + return $this->startApiCall('GetGroup', $request, $callOptions)->wait(); + } + + /** + * Gets details about a Network Connectivity Center hub. + * + * The async variant is {@see HubServiceClient::getHubAsync()} . + * + * @example samples/V1/HubServiceClient/get_hub.php + * + * @param GetHubRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Hub + * + * @throws ApiException Thrown if the API call fails. + */ + public function getHub(GetHubRequest $request, array $callOptions = []): Hub + { + return $this->startApiCall('GetHub', $request, $callOptions)->wait(); + } + + /** + * Gets details about the specified route. + * + * The async variant is {@see HubServiceClient::getRouteAsync()} . + * + * @example samples/V1/HubServiceClient/get_route.php + * + * @param GetRouteRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Route + * + * @throws ApiException Thrown if the API call fails. + */ + public function getRoute(GetRouteRequest $request, array $callOptions = []): Route + { + return $this->startApiCall('GetRoute', $request, $callOptions)->wait(); + } + + /** + * Gets details about a Network Connectivity Center route table. + * + * The async variant is {@see HubServiceClient::getRouteTableAsync()} . + * + * @example samples/V1/HubServiceClient/get_route_table.php + * + * @param GetRouteTableRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return RouteTable + * + * @throws ApiException Thrown if the API call fails. + */ + public function getRouteTable(GetRouteTableRequest $request, array $callOptions = []): RouteTable + { + return $this->startApiCall('GetRouteTable', $request, $callOptions)->wait(); + } + + /** + * Gets details about a Network Connectivity Center spoke. + * + * The async variant is {@see HubServiceClient::getSpokeAsync()} . + * + * @example samples/V1/HubServiceClient/get_spoke.php + * + * @param GetSpokeRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Spoke + * + * @throws ApiException Thrown if the API call fails. + */ + public function getSpoke(GetSpokeRequest $request, array $callOptions = []): Spoke + { + return $this->startApiCall('GetSpoke', $request, $callOptions)->wait(); + } + + /** + * Lists groups in a given hub. + * + * The async variant is {@see HubServiceClient::listGroupsAsync()} . + * + * @example samples/V1/HubServiceClient/list_groups.php + * + * @param ListGroupsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listGroups(ListGroupsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListGroups', $request, $callOptions); + } + + /** + * Lists the Network Connectivity Center spokes associated with a + * specified hub and location. The list includes both spokes that are attached + * to the hub and spokes that have been proposed but not yet accepted. + * + * The async variant is {@see HubServiceClient::listHubSpokesAsync()} . + * + * @example samples/V1/HubServiceClient/list_hub_spokes.php + * + * @param ListHubSpokesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listHubSpokes(ListHubSpokesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListHubSpokes', $request, $callOptions); + } + + /** + * Lists the Network Connectivity Center hubs associated with a given project. + * + * The async variant is {@see HubServiceClient::listHubsAsync()} . + * + * @example samples/V1/HubServiceClient/list_hubs.php + * + * @param ListHubsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listHubs(ListHubsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListHubs', $request, $callOptions); + } + + /** + * Lists route tables in a given hub. + * + * The async variant is {@see HubServiceClient::listRouteTablesAsync()} . + * + * @example samples/V1/HubServiceClient/list_route_tables.php + * + * @param ListRouteTablesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listRouteTables(ListRouteTablesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListRouteTables', $request, $callOptions); + } + + /** + * Lists routes in a given route table. + * + * The async variant is {@see HubServiceClient::listRoutesAsync()} . + * + * @example samples/V1/HubServiceClient/list_routes.php + * + * @param ListRoutesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listRoutes(ListRoutesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListRoutes', $request, $callOptions); + } + + /** + * Lists the Network Connectivity Center spokes in a specified project and + * location. + * + * The async variant is {@see HubServiceClient::listSpokesAsync()} . + * + * @example samples/V1/HubServiceClient/list_spokes.php + * + * @param ListSpokesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listSpokes(ListSpokesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListSpokes', $request, $callOptions); + } + + /** + * Query the Private Service Connect propagation status of a Network + * Connectivity Center hub. + * + * The async variant is {@see HubServiceClient::queryHubStatusAsync()} . + * + * @example samples/V1/HubServiceClient/query_hub_status.php + * + * @param QueryHubStatusRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function queryHubStatus(QueryHubStatusRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('QueryHubStatus', $request, $callOptions); + } + + /** + * Rejects a Network Connectivity Center spoke from being attached to a hub. + * If the spoke was previously in the `ACTIVE` state, it + * transitions to the `INACTIVE` state and is no longer able to + * connect to other spokes that are attached to the hub. + * + * The async variant is {@see HubServiceClient::rejectHubSpokeAsync()} . + * + * @example samples/V1/HubServiceClient/reject_hub_spoke.php + * + * @param RejectHubSpokeRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function rejectHubSpoke(RejectHubSpokeRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('RejectHubSpoke', $request, $callOptions)->wait(); + } + + /** + * Updates the parameters of a Network Connectivity Center group. + * + * The async variant is {@see HubServiceClient::updateGroupAsync()} . + * + * @example samples/V1/HubServiceClient/update_group.php + * + * @param UpdateGroupRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateGroup(UpdateGroupRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateGroup', $request, $callOptions)->wait(); + } + + /** + * Updates the description and/or labels of a Network Connectivity Center + * hub. + * + * The async variant is {@see HubServiceClient::updateHubAsync()} . + * + * @example samples/V1/HubServiceClient/update_hub.php + * + * @param UpdateHubRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateHub(UpdateHubRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateHub', $request, $callOptions)->wait(); + } + + /** + * Updates the parameters of a Network Connectivity Center spoke. + * + * The async variant is {@see HubServiceClient::updateSpokeAsync()} . + * + * @example samples/V1/HubServiceClient/update_spoke.php + * + * @param UpdateSpokeRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateSpoke(UpdateSpokeRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateSpoke', $request, $callOptions)->wait(); + } + + /** + * Gets information about a location. + * + * The async variant is {@see HubServiceClient::getLocationAsync()} . + * + * @example samples/V1/HubServiceClient/get_location.php + * + * @param GetLocationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Location + * + * @throws ApiException Thrown if the API call fails. + */ + public function getLocation(GetLocationRequest $request, array $callOptions = []): Location + { + return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * The async variant is {@see HubServiceClient::listLocationsAsync()} . + * + * @example samples/V1/HubServiceClient/list_locations.php + * + * @param ListLocationsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListLocations', $request, $callOptions); + } + + /** + * Gets the access control policy for a resource. Returns an empty policy + if the resource exists and does not have a policy set. + * + * The async variant is {@see HubServiceClient::getIamPolicyAsync()} . + * + * @example samples/V1/HubServiceClient/get_iam_policy.php + * + * @param GetIamPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * Sets the access control policy on the specified resource. Replaces + any existing policy. + + Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` + errors. + * + * The async variant is {@see HubServiceClient::setIamPolicyAsync()} . + * + * @example samples/V1/HubServiceClient/set_iam_policy.php + * + * @param SetIamPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * Returns permissions that a caller has on the specified resource. If the + resource does not exist, this will return an empty set of + permissions, not a `NOT_FOUND` error. + + Note: This operation is designed to be used for building + permission-aware UIs and command-line tools, not for authorization + checking. This operation may "fail open" without warning. + * + * The async variant is {@see HubServiceClient::testIamPermissionsAsync()} . + * + * @example samples/V1/HubServiceClient/test_iam_permissions.php + * + * @param TestIamPermissionsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return TestIamPermissionsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse + { + return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/NetworkConnectivity/v1/src/V1/Client/PolicyBasedRoutingServiceClient.php b/owl-bot-staging/NetworkConnectivity/v1/src/V1/Client/PolicyBasedRoutingServiceClient.php new file mode 100644 index 000000000000..e171929c6d56 --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/src/V1/Client/PolicyBasedRoutingServiceClient.php @@ -0,0 +1,580 @@ + createPolicyBasedRouteAsync(CreatePolicyBasedRouteRequest $request, array $optionalArgs = []) + * @method PromiseInterface deletePolicyBasedRouteAsync(DeletePolicyBasedRouteRequest $request, array $optionalArgs = []) + * @method PromiseInterface getPolicyBasedRouteAsync(GetPolicyBasedRouteRequest $request, array $optionalArgs = []) + * @method PromiseInterface listPolicyBasedRoutesAsync(ListPolicyBasedRoutesRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) + */ +final class PolicyBasedRoutingServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.networkconnectivity.v1.PolicyBasedRoutingService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'networkconnectivity.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'networkconnectivity.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/policy_based_routing_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/policy_based_routing_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/policy_based_routing_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/policy_based_routing_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Create the default operation client for the service. + * + * @param array $options ClientOptions for the client. + * + * @return OperationsClient + */ + private function createOperationsClient(array $options) + { + // Unset client-specific configuration options + unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); + + if (isset($options['operationsClient'])) { + return $options['operationsClient']; + } + + return new OperationsClient($options); + } + + /** + * Formats a string containing the fully-qualified path to represent a location + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted location resource. + */ + public static function locationName(string $project, string $location): string + { + return self::getPathTemplate('location')->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a network + * resource. + * + * @param string $project + * @param string $resourceId + * + * @return string The formatted network resource. + */ + public static function networkName(string $project, string $resourceId): string + { + return self::getPathTemplate('network')->render([ + 'project' => $project, + 'resource_id' => $resourceId, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * policy_based_route resource. + * + * @param string $project + * @param string $policyBasedRoute + * + * @return string The formatted policy_based_route resource. + */ + public static function policyBasedRouteName(string $project, string $policyBasedRoute): string + { + return self::getPathTemplate('policyBasedRoute')->render([ + 'project' => $project, + 'policy_based_route' => $policyBasedRoute, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - location: projects/{project}/locations/{location} + * - network: projects/{project}/global/networks/{resource_id} + * - policyBasedRoute: projects/{project}/locations/global/PolicyBasedRoutes/{policy_based_route} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'networkconnectivity.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Creates a new PolicyBasedRoute in a given project and location. + * + * The async variant is + * {@see PolicyBasedRoutingServiceClient::createPolicyBasedRouteAsync()} . + * + * @example samples/V1/PolicyBasedRoutingServiceClient/create_policy_based_route.php + * + * @param CreatePolicyBasedRouteRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createPolicyBasedRoute(CreatePolicyBasedRouteRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreatePolicyBasedRoute', $request, $callOptions)->wait(); + } + + /** + * Deletes a single PolicyBasedRoute. + * + * The async variant is + * {@see PolicyBasedRoutingServiceClient::deletePolicyBasedRouteAsync()} . + * + * @example samples/V1/PolicyBasedRoutingServiceClient/delete_policy_based_route.php + * + * @param DeletePolicyBasedRouteRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deletePolicyBasedRoute(DeletePolicyBasedRouteRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeletePolicyBasedRoute', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single PolicyBasedRoute. + * + * The async variant is + * {@see PolicyBasedRoutingServiceClient::getPolicyBasedRouteAsync()} . + * + * @example samples/V1/PolicyBasedRoutingServiceClient/get_policy_based_route.php + * + * @param GetPolicyBasedRouteRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PolicyBasedRoute + * + * @throws ApiException Thrown if the API call fails. + */ + public function getPolicyBasedRoute(GetPolicyBasedRouteRequest $request, array $callOptions = []): PolicyBasedRoute + { + return $this->startApiCall('GetPolicyBasedRoute', $request, $callOptions)->wait(); + } + + /** + * Lists PolicyBasedRoutes in a given project and location. + * + * The async variant is + * {@see PolicyBasedRoutingServiceClient::listPolicyBasedRoutesAsync()} . + * + * @example samples/V1/PolicyBasedRoutingServiceClient/list_policy_based_routes.php + * + * @param ListPolicyBasedRoutesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listPolicyBasedRoutes(ListPolicyBasedRoutesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListPolicyBasedRoutes', $request, $callOptions); + } + + /** + * Gets information about a location. + * + * The async variant is {@see PolicyBasedRoutingServiceClient::getLocationAsync()} + * . + * + * @example samples/V1/PolicyBasedRoutingServiceClient/get_location.php + * + * @param GetLocationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Location + * + * @throws ApiException Thrown if the API call fails. + */ + public function getLocation(GetLocationRequest $request, array $callOptions = []): Location + { + return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * The async variant is + * {@see PolicyBasedRoutingServiceClient::listLocationsAsync()} . + * + * @example samples/V1/PolicyBasedRoutingServiceClient/list_locations.php + * + * @param ListLocationsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListLocations', $request, $callOptions); + } + + /** + * Gets the access control policy for a resource. Returns an empty policy + if the resource exists and does not have a policy set. + * + * The async variant is {@see PolicyBasedRoutingServiceClient::getIamPolicyAsync()} + * . + * + * @example samples/V1/PolicyBasedRoutingServiceClient/get_iam_policy.php + * + * @param GetIamPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * Sets the access control policy on the specified resource. Replaces + any existing policy. + + Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` + errors. + * + * The async variant is {@see PolicyBasedRoutingServiceClient::setIamPolicyAsync()} + * . + * + * @example samples/V1/PolicyBasedRoutingServiceClient/set_iam_policy.php + * + * @param SetIamPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * Returns permissions that a caller has on the specified resource. If the + resource does not exist, this will return an empty set of + permissions, not a `NOT_FOUND` error. + + Note: This operation is designed to be used for building + permission-aware UIs and command-line tools, not for authorization + checking. This operation may "fail open" without warning. + * + * The async variant is + * {@see PolicyBasedRoutingServiceClient::testIamPermissionsAsync()} . + * + * @example samples/V1/PolicyBasedRoutingServiceClient/test_iam_permissions.php + * + * @param TestIamPermissionsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return TestIamPermissionsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse + { + return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/NetworkConnectivity/v1/src/V1/gapic_metadata.json b/owl-bot-staging/NetworkConnectivity/v1/src/V1/gapic_metadata.json new file mode 100644 index 000000000000..2525c2d62829 --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/src/V1/gapic_metadata.json @@ -0,0 +1,202 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.cloud.networkconnectivity.v1", + "libraryPackage": "Google\\Cloud\\NetworkConnectivity\\V1", + "services": { + "HubService": { + "clients": { + "grpc": { + "libraryClient": "HubServiceGapicClient", + "rpcs": { + "AcceptHubSpoke": { + "methods": [ + "acceptHubSpoke" + ] + }, + "CreateHub": { + "methods": [ + "createHub" + ] + }, + "CreateSpoke": { + "methods": [ + "createSpoke" + ] + }, + "DeleteHub": { + "methods": [ + "deleteHub" + ] + }, + "DeleteSpoke": { + "methods": [ + "deleteSpoke" + ] + }, + "GetGroup": { + "methods": [ + "getGroup" + ] + }, + "GetHub": { + "methods": [ + "getHub" + ] + }, + "GetRoute": { + "methods": [ + "getRoute" + ] + }, + "GetRouteTable": { + "methods": [ + "getRouteTable" + ] + }, + "GetSpoke": { + "methods": [ + "getSpoke" + ] + }, + "ListGroups": { + "methods": [ + "listGroups" + ] + }, + "ListHubSpokes": { + "methods": [ + "listHubSpokes" + ] + }, + "ListHubs": { + "methods": [ + "listHubs" + ] + }, + "ListRouteTables": { + "methods": [ + "listRouteTables" + ] + }, + "ListRoutes": { + "methods": [ + "listRoutes" + ] + }, + "ListSpokes": { + "methods": [ + "listSpokes" + ] + }, + "QueryHubStatus": { + "methods": [ + "queryHubStatus" + ] + }, + "RejectHubSpoke": { + "methods": [ + "rejectHubSpoke" + ] + }, + "UpdateGroup": { + "methods": [ + "updateGroup" + ] + }, + "UpdateHub": { + "methods": [ + "updateHub" + ] + }, + "UpdateSpoke": { + "methods": [ + "updateSpoke" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + } + } + } + } + }, + "PolicyBasedRoutingService": { + "clients": { + "grpc": { + "libraryClient": "PolicyBasedRoutingServiceGapicClient", + "rpcs": { + "CreatePolicyBasedRoute": { + "methods": [ + "createPolicyBasedRoute" + ] + }, + "DeletePolicyBasedRoute": { + "methods": [ + "deletePolicyBasedRoute" + ] + }, + "GetPolicyBasedRoute": { + "methods": [ + "getPolicyBasedRoute" + ] + }, + "ListPolicyBasedRoutes": { + "methods": [ + "listPolicyBasedRoutes" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/NetworkConnectivity/v1/src/V1/resources/hub_service_client_config.json b/owl-bot-staging/NetworkConnectivity/v1/src/V1/resources/hub_service_client_config.json new file mode 100644 index 000000000000..7194f4dfd22f --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/src/V1/resources/hub_service_client_config.json @@ -0,0 +1,174 @@ +{ + "interfaces": { + "google.cloud.networkconnectivity.v1.HubService": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE" + ], + "no_retry_1_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 10000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "AcceptHubSpoke": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "CreateHub": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateSpoke": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteHub": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteSpoke": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetGroup": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetHub": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetRoute": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetRouteTable": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetSpoke": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListGroups": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListHubSpokes": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListHubs": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListRouteTables": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListRoutes": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListSpokes": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "QueryHubStatus": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "RejectHubSpoke": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateGroup": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateHub": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateSpoke": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetLocation": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListLocations": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "SetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "TestIamPermissions": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/NetworkConnectivity/v1/src/V1/resources/hub_service_descriptor_config.php b/owl-bot-staging/NetworkConnectivity/v1/src/V1/resources/hub_service_descriptor_config.php new file mode 100644 index 000000000000..3d8593713266 --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/src/V1/resources/hub_service_descriptor_config.php @@ -0,0 +1,487 @@ + [ + 'google.cloud.networkconnectivity.v1.HubService' => [ + 'AcceptHubSpoke' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkConnectivity\V1\AcceptHubSpokeResponse', + 'metadataReturnType' => '\Google\Cloud\NetworkConnectivity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'CreateHub' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkConnectivity\V1\Hub', + 'metadataReturnType' => '\Google\Cloud\NetworkConnectivity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateSpoke' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkConnectivity\V1\Spoke', + 'metadataReturnType' => '\Google\Cloud\NetworkConnectivity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteHub' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\NetworkConnectivity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteSpoke' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\NetworkConnectivity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'RejectHubSpoke' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkConnectivity\V1\RejectHubSpokeResponse', + 'metadataReturnType' => '\Google\Cloud\NetworkConnectivity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UpdateGroup' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkConnectivity\V1\Group', + 'metadataReturnType' => '\Google\Cloud\NetworkConnectivity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'group.name', + 'fieldAccessors' => [ + 'getGroup', + 'getName', + ], + ], + ], + ], + 'UpdateHub' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkConnectivity\V1\Hub', + 'metadataReturnType' => '\Google\Cloud\NetworkConnectivity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'hub.name', + 'fieldAccessors' => [ + 'getHub', + 'getName', + ], + ], + ], + ], + 'UpdateSpoke' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkConnectivity\V1\Spoke', + 'metadataReturnType' => '\Google\Cloud\NetworkConnectivity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'spoke.name', + 'fieldAccessors' => [ + 'getSpoke', + 'getName', + ], + ], + ], + ], + 'GetGroup' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\NetworkConnectivity\V1\Group', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetHub' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\NetworkConnectivity\V1\Hub', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetRoute' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\NetworkConnectivity\V1\Route', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetRouteTable' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\NetworkConnectivity\V1\RouteTable', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetSpoke' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\NetworkConnectivity\V1\Spoke', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListGroups' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getGroups', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\NetworkConnectivity\V1\ListGroupsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListHubSpokes' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getSpokes', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\NetworkConnectivity\V1\ListHubSpokesResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListHubs' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getHubs', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\NetworkConnectivity\V1\ListHubsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListRouteTables' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getRouteTables', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\NetworkConnectivity\V1\ListRouteTablesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListRoutes' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getRoutes', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\NetworkConnectivity\V1\ListRoutesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListSpokes' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getSpokes', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\NetworkConnectivity\V1\ListSpokesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'QueryHubStatus' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getHubStatusEntries', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\NetworkConnectivity\V1\QueryHubStatusResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetLocation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Location\Location', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'GetIamPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'SetIamPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'TestIamPermissions' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'templateMap' => [ + 'group' => 'projects/{project}/locations/global/hubs/{hub}/groups/{group}', + 'hub' => 'projects/{project}/locations/global/hubs/{hub}', + 'hubRoute' => 'projects/{project}/locations/global/hubs/{hub}/routeTables/{route_table}/routes/{route}', + 'instance' => 'projects/{project}/zones/{zone}/instances/{instance}', + 'interconnectAttachment' => 'projects/{project}/regions/{region}/interconnectAttachments/{resource_id}', + 'location' => 'projects/{project}/locations/{location}', + 'network' => 'projects/{project}/global/networks/{resource_id}', + 'routeTable' => 'projects/{project}/locations/global/hubs/{hub}/routeTables/{route_table}', + 'spoke' => 'projects/{project}/locations/{location}/spokes/{spoke}', + 'vpnTunnel' => 'projects/{project}/regions/{region}/vpnTunnels/{resource_id}', + ], + ], + ], +]; diff --git a/owl-bot-staging/NetworkConnectivity/v1/src/V1/resources/hub_service_rest_client_config.php b/owl-bot-staging/NetworkConnectivity/v1/src/V1/resources/hub_service_rest_client_config.php new file mode 100644 index 000000000000..93730e459cfc --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/src/V1/resources/hub_service_rest_client_config.php @@ -0,0 +1,432 @@ + [ + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.cloud.networkconnectivity.v1.HubService' => [ + 'AcceptHubSpoke' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/global/hubs/*}:acceptSpoke', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'CreateHub' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/global}/hubs', + 'body' => 'hub', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'hub_id', + ], + ], + 'CreateSpoke' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/spokes', + 'body' => 'spoke', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'spoke_id', + ], + ], + 'DeleteHub' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/global/hubs/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteSpoke' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/spokes/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetGroup' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/global/hubs/*/groups/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetHub' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/global/hubs/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetRoute' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/global/hubs/*/routeTables/*/routes/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetRouteTable' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/global/hubs/*/routeTables/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetSpoke' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/spokes/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListGroups' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/global/hubs/*}/groups', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListHubSpokes' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/global/hubs/*}:listSpokes', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListHubs' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/global}/hubs', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListRouteTables' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/global/hubs/*}/routeTables', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListRoutes' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/global/hubs/*/routeTables/*}/routes', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListSpokes' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/spokes', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'QueryHubStatus' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/global/hubs/*}:queryStatus', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'RejectHubSpoke' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/global/hubs/*}:rejectSpoke', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'UpdateGroup' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{group.name=projects/*/locations/global/hubs/*/groups/*}', + 'body' => 'group', + 'placeholders' => [ + 'group.name' => [ + 'getters' => [ + 'getGroup', + 'getName', + ], + ], + ], + ], + 'UpdateHub' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{hub.name=projects/*/locations/global/hubs/*}', + 'body' => 'hub', + 'placeholders' => [ + 'hub.name' => [ + 'getters' => [ + 'getHub', + 'getName', + ], + ], + ], + ], + 'UpdateSpoke' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{spoke.name=projects/*/locations/*/spokes/*}', + 'body' => 'spoke', + 'placeholders' => [ + 'spoke.name' => [ + 'getters' => [ + 'getSpoke', + 'getName', + ], + ], + ], + ], + ], + 'google.iam.v1.IAMPolicy' => [ + 'GetIamPolicy' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/global/hubs/*}:getIamPolicy', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/global/hubs/*/groups/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/spokes/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/global/policyBasedRoutes/*}:getIamPolicy', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'SetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/global/hubs/*}:setIamPolicy', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/global/hubs/*/groups/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/spokes/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/global/policyBasedRoutes/*}:setIamPolicy', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'TestIamPermissions' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/global/hubs/*}:testIamPermissions', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/global/hubs/*/groups/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/spokes/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/global/policyBasedRoutes/*}:testIamPermissions', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/NetworkConnectivity/v1/src/V1/resources/policy_based_routing_service_client_config.json b/owl-bot-staging/NetworkConnectivity/v1/src/V1/resources/policy_based_routing_service_client_config.json new file mode 100644 index 000000000000..f15e176fb5db --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/src/V1/resources/policy_based_routing_service_client_config.json @@ -0,0 +1,89 @@ +{ + "interfaces": { + "google.cloud.networkconnectivity.v1.PolicyBasedRoutingService": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE" + ], + "no_retry_1_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 10000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "CreatePolicyBasedRoute": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeletePolicyBasedRoute": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetPolicyBasedRoute": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListPolicyBasedRoutes": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetLocation": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListLocations": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "SetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "TestIamPermissions": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/NetworkConnectivity/v1/src/V1/resources/policy_based_routing_service_descriptor_config.php b/owl-bot-staging/NetworkConnectivity/v1/src/V1/resources/policy_based_routing_service_descriptor_config.php new file mode 100644 index 000000000000..43fb2ee993b3 --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/src/V1/resources/policy_based_routing_service_descriptor_config.php @@ -0,0 +1,176 @@ + [ + 'google.cloud.networkconnectivity.v1.PolicyBasedRoutingService' => [ + 'CreatePolicyBasedRoute' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkConnectivity\V1\PolicyBasedRoute', + 'metadataReturnType' => '\Google\Cloud\NetworkConnectivity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeletePolicyBasedRoute' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\NetworkConnectivity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetPolicyBasedRoute' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\NetworkConnectivity\V1\PolicyBasedRoute', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListPolicyBasedRoutes' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getPolicyBasedRoutes', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\NetworkConnectivity\V1\ListPolicyBasedRoutesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'GetLocation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Location\Location', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'GetIamPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'SetIamPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'TestIamPermissions' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'templateMap' => [ + 'location' => 'projects/{project}/locations/{location}', + 'network' => 'projects/{project}/global/networks/{resource_id}', + 'policyBasedRoute' => 'projects/{project}/locations/global/PolicyBasedRoutes/{policy_based_route}', + ], + ], + ], +]; diff --git a/owl-bot-staging/NetworkConnectivity/v1/src/V1/resources/policy_based_routing_service_rest_client_config.php b/owl-bot-staging/NetworkConnectivity/v1/src/V1/resources/policy_based_routing_service_rest_client_config.php new file mode 100644 index 000000000000..185f9fcd591a --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/src/V1/resources/policy_based_routing_service_rest_client_config.php @@ -0,0 +1,233 @@ + [ + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.cloud.networkconnectivity.v1.PolicyBasedRoutingService' => [ + 'CreatePolicyBasedRoute' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/global}/policyBasedRoutes', + 'body' => 'policy_based_route', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'policy_based_route_id', + ], + ], + 'DeletePolicyBasedRoute' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/global/policyBasedRoutes/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetPolicyBasedRoute' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/global/policyBasedRoutes/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListPolicyBasedRoutes' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/global}/policyBasedRoutes', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + ], + 'google.iam.v1.IAMPolicy' => [ + 'GetIamPolicy' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/global/hubs/*}:getIamPolicy', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/global/hubs/*/groups/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/spokes/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/global/policyBasedRoutes/*}:getIamPolicy', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'SetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/global/hubs/*}:setIamPolicy', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/global/hubs/*/groups/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/spokes/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/global/policyBasedRoutes/*}:setIamPolicy', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'TestIamPermissions' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/global/hubs/*}:testIamPermissions', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/global/hubs/*/groups/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/spokes/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/global/policyBasedRoutes/*}:testIamPermissions', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/NetworkConnectivity/v1/tests/Unit/V1/Client/HubServiceClientTest.php b/owl-bot-staging/NetworkConnectivity/v1/tests/Unit/V1/Client/HubServiceClientTest.php new file mode 100644 index 000000000000..8089a7f377cc --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/tests/Unit/V1/Client/HubServiceClientTest.php @@ -0,0 +1,2537 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return HubServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new HubServiceClient($options); + } + + /** @test */ + public function acceptHubSpokeTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/acceptHubSpokeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new AcceptHubSpokeResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/acceptHubSpokeTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->hubName('[PROJECT]', '[HUB]'); + $formattedSpokeUri = $gapicClient->spokeName('[PROJECT]', '[LOCATION]', '[SPOKE]'); + $request = (new AcceptHubSpokeRequest()) + ->setName($formattedName) + ->setSpokeUri($formattedSpokeUri); + $response = $gapicClient->acceptHubSpoke($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networkconnectivity.v1.HubService/AcceptHubSpoke', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualApiRequestObject->getSpokeUri(); + $this->assertProtobufEquals($formattedSpokeUri, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/acceptHubSpokeTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function acceptHubSpokeExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/acceptHubSpokeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->hubName('[PROJECT]', '[HUB]'); + $formattedSpokeUri = $gapicClient->spokeName('[PROJECT]', '[LOCATION]', '[SPOKE]'); + $request = (new AcceptHubSpokeRequest()) + ->setName($formattedName) + ->setSpokeUri($formattedSpokeUri); + $response = $gapicClient->acceptHubSpoke($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/acceptHubSpokeTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createHubTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createHubTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $uniqueId = 'uniqueId-538310583'; + $exportPsc = false; + $expectedResponse = new Hub(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setUniqueId($uniqueId); + $expectedResponse->setExportPsc($exportPsc); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createHubTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $hubId = 'hubId-1206469467'; + $hub = new Hub(); + $request = (new CreateHubRequest()) + ->setParent($formattedParent) + ->setHubId($hubId) + ->setHub($hub); + $response = $gapicClient->createHub($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networkconnectivity.v1.HubService/CreateHub', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getHubId(); + $this->assertProtobufEquals($hubId, $actualValue); + $actualValue = $actualApiRequestObject->getHub(); + $this->assertProtobufEquals($hub, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createHubTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createHubExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createHubTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $hubId = 'hubId-1206469467'; + $hub = new Hub(); + $request = (new CreateHubRequest()) + ->setParent($formattedParent) + ->setHubId($hubId) + ->setHub($hub); + $response = $gapicClient->createHub($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createHubTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createSpokeTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createSpokeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $hub = 'hub103669'; + $group = 'group98629247'; + $uniqueId = 'uniqueId-538310583'; + $expectedResponse = new Spoke(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setHub($hub); + $expectedResponse->setGroup($group); + $expectedResponse->setUniqueId($uniqueId); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createSpokeTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $spokeId = 'spokeId-1839321170'; + $spoke = new Spoke(); + $request = (new CreateSpokeRequest()) + ->setParent($formattedParent) + ->setSpokeId($spokeId) + ->setSpoke($spoke); + $response = $gapicClient->createSpoke($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networkconnectivity.v1.HubService/CreateSpoke', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getSpokeId(); + $this->assertProtobufEquals($spokeId, $actualValue); + $actualValue = $actualApiRequestObject->getSpoke(); + $this->assertProtobufEquals($spoke, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createSpokeTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createSpokeExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createSpokeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $spokeId = 'spokeId-1839321170'; + $spoke = new Spoke(); + $request = (new CreateSpokeRequest()) + ->setParent($formattedParent) + ->setSpokeId($spokeId) + ->setSpoke($spoke); + $response = $gapicClient->createSpoke($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createSpokeTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteHubTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteHubTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteHubTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->hubName('[PROJECT]', '[HUB]'); + $request = (new DeleteHubRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteHub($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networkconnectivity.v1.HubService/DeleteHub', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteHubTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteHubExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteHubTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->hubName('[PROJECT]', '[HUB]'); + $request = (new DeleteHubRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteHub($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteHubTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteSpokeTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteSpokeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteSpokeTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->spokeName('[PROJECT]', '[LOCATION]', '[SPOKE]'); + $request = (new DeleteSpokeRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteSpoke($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networkconnectivity.v1.HubService/DeleteSpoke', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteSpokeTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteSpokeExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteSpokeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->spokeName('[PROJECT]', '[LOCATION]', '[SPOKE]'); + $request = (new DeleteSpokeRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteSpoke($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteSpokeTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getGroupTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $uid = 'uid115792'; + $routeTable = 'routeTable-1769949608'; + $expectedResponse = new Group(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setUid($uid); + $expectedResponse->setRouteTable($routeTable); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->groupName('[PROJECT]', '[HUB]', '[GROUP]'); + $request = (new GetGroupRequest()) + ->setName($formattedName); + $response = $gapicClient->getGroup($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networkconnectivity.v1.HubService/GetGroup', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getGroupExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->groupName('[PROJECT]', '[HUB]', '[GROUP]'); + $request = (new GetGroupRequest()) + ->setName($formattedName); + try { + $gapicClient->getGroup($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getHubTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $uniqueId = 'uniqueId-538310583'; + $exportPsc = false; + $expectedResponse = new Hub(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setUniqueId($uniqueId); + $expectedResponse->setExportPsc($exportPsc); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->hubName('[PROJECT]', '[HUB]'); + $request = (new GetHubRequest()) + ->setName($formattedName); + $response = $gapicClient->getHub($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networkconnectivity.v1.HubService/GetHub', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getHubExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->hubName('[PROJECT]', '[HUB]'); + $request = (new GetHubRequest()) + ->setName($formattedName); + try { + $gapicClient->getHub($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getRouteTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $ipCidrRange = 'ipCidrRange-2049366326'; + $description = 'description-1724546052'; + $uid = 'uid115792'; + $spoke = 'spoke109651596'; + $location = 'location1901043637'; + $priority = 1165461084; + $expectedResponse = new Route(); + $expectedResponse->setName($name2); + $expectedResponse->setIpCidrRange($ipCidrRange); + $expectedResponse->setDescription($description); + $expectedResponse->setUid($uid); + $expectedResponse->setSpoke($spoke); + $expectedResponse->setLocation($location); + $expectedResponse->setPriority($priority); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->hubRouteName('[PROJECT]', '[HUB]', '[ROUTE_TABLE]', '[ROUTE]'); + $request = (new GetRouteRequest()) + ->setName($formattedName); + $response = $gapicClient->getRoute($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networkconnectivity.v1.HubService/GetRoute', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getRouteExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->hubRouteName('[PROJECT]', '[HUB]', '[ROUTE_TABLE]', '[ROUTE]'); + $request = (new GetRouteRequest()) + ->setName($formattedName); + try { + $gapicClient->getRoute($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getRouteTableTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $uid = 'uid115792'; + $expectedResponse = new RouteTable(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setUid($uid); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->routeTableName('[PROJECT]', '[HUB]', '[ROUTE_TABLE]'); + $request = (new GetRouteTableRequest()) + ->setName($formattedName); + $response = $gapicClient->getRouteTable($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networkconnectivity.v1.HubService/GetRouteTable', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getRouteTableExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->routeTableName('[PROJECT]', '[HUB]', '[ROUTE_TABLE]'); + $request = (new GetRouteTableRequest()) + ->setName($formattedName); + try { + $gapicClient->getRouteTable($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getSpokeTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $hub = 'hub103669'; + $group = 'group98629247'; + $uniqueId = 'uniqueId-538310583'; + $expectedResponse = new Spoke(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setHub($hub); + $expectedResponse->setGroup($group); + $expectedResponse->setUniqueId($uniqueId); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->spokeName('[PROJECT]', '[LOCATION]', '[SPOKE]'); + $request = (new GetSpokeRequest()) + ->setName($formattedName); + $response = $gapicClient->getSpoke($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networkconnectivity.v1.HubService/GetSpoke', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getSpokeExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->spokeName('[PROJECT]', '[LOCATION]', '[SPOKE]'); + $request = (new GetSpokeRequest()) + ->setName($formattedName); + try { + $gapicClient->getSpoke($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listGroupsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $groupsElement = new Group(); + $groups = [ + $groupsElement, + ]; + $expectedResponse = new ListGroupsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setGroups($groups); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->hubName('[PROJECT]', '[HUB]'); + $request = (new ListGroupsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listGroups($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getGroups()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networkconnectivity.v1.HubService/ListGroups', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listGroupsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->hubName('[PROJECT]', '[HUB]'); + $request = (new ListGroupsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listGroups($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listHubSpokesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $spokesElement = new Spoke(); + $spokes = [ + $spokesElement, + ]; + $expectedResponse = new ListHubSpokesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setSpokes($spokes); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->hubName('[PROJECT]', '[HUB]'); + $request = (new ListHubSpokesRequest()) + ->setName($formattedName); + $response = $gapicClient->listHubSpokes($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getSpokes()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networkconnectivity.v1.HubService/ListHubSpokes', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listHubSpokesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->hubName('[PROJECT]', '[HUB]'); + $request = (new ListHubSpokesRequest()) + ->setName($formattedName); + try { + $gapicClient->listHubSpokes($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listHubsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $hubsElement = new Hub(); + $hubs = [ + $hubsElement, + ]; + $expectedResponse = new ListHubsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setHubs($hubs); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListHubsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listHubs($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getHubs()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networkconnectivity.v1.HubService/ListHubs', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listHubsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListHubsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listHubs($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listRouteTablesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $routeTablesElement = new RouteTable(); + $routeTables = [ + $routeTablesElement, + ]; + $expectedResponse = new ListRouteTablesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setRouteTables($routeTables); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->hubName('[PROJECT]', '[HUB]'); + $request = (new ListRouteTablesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listRouteTables($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getRouteTables()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networkconnectivity.v1.HubService/ListRouteTables', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listRouteTablesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->hubName('[PROJECT]', '[HUB]'); + $request = (new ListRouteTablesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listRouteTables($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listRoutesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $routesElement = new Route(); + $routes = [ + $routesElement, + ]; + $expectedResponse = new ListRoutesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setRoutes($routes); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->routeTableName('[PROJECT]', '[HUB]', '[ROUTE_TABLE]'); + $request = (new ListRoutesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listRoutes($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getRoutes()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networkconnectivity.v1.HubService/ListRoutes', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listRoutesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->routeTableName('[PROJECT]', '[HUB]', '[ROUTE_TABLE]'); + $request = (new ListRoutesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listRoutes($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listSpokesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $spokesElement = new Spoke(); + $spokes = [ + $spokesElement, + ]; + $expectedResponse = new ListSpokesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setSpokes($spokes); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListSpokesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listSpokes($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getSpokes()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networkconnectivity.v1.HubService/ListSpokes', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listSpokesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListSpokesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listSpokes($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function queryHubStatusTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $hubStatusEntriesElement = new HubStatusEntry(); + $hubStatusEntries = [ + $hubStatusEntriesElement, + ]; + $expectedResponse = new QueryHubStatusResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setHubStatusEntries($hubStatusEntries); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->hubName('[PROJECT]', '[HUB]'); + $request = (new QueryHubStatusRequest()) + ->setName($formattedName); + $response = $gapicClient->queryHubStatus($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getHubStatusEntries()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networkconnectivity.v1.HubService/QueryHubStatus', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function queryHubStatusExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->hubName('[PROJECT]', '[HUB]'); + $request = (new QueryHubStatusRequest()) + ->setName($formattedName); + try { + $gapicClient->queryHubStatus($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function rejectHubSpokeTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/rejectHubSpokeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new RejectHubSpokeResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/rejectHubSpokeTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->hubName('[PROJECT]', '[HUB]'); + $formattedSpokeUri = $gapicClient->spokeName('[PROJECT]', '[LOCATION]', '[SPOKE]'); + $request = (new RejectHubSpokeRequest()) + ->setName($formattedName) + ->setSpokeUri($formattedSpokeUri); + $response = $gapicClient->rejectHubSpoke($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networkconnectivity.v1.HubService/RejectHubSpoke', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualApiRequestObject->getSpokeUri(); + $this->assertProtobufEquals($formattedSpokeUri, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/rejectHubSpokeTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function rejectHubSpokeExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/rejectHubSpokeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->hubName('[PROJECT]', '[HUB]'); + $formattedSpokeUri = $gapicClient->spokeName('[PROJECT]', '[LOCATION]', '[SPOKE]'); + $request = (new RejectHubSpokeRequest()) + ->setName($formattedName) + ->setSpokeUri($formattedSpokeUri); + $response = $gapicClient->rejectHubSpoke($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/rejectHubSpokeTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateGroupTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateGroupTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $uid = 'uid115792'; + $routeTable = 'routeTable-1769949608'; + $expectedResponse = new Group(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setUid($uid); + $expectedResponse->setRouteTable($routeTable); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateGroupTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $group = new Group(); + $request = (new UpdateGroupRequest()) + ->setGroup($group); + $response = $gapicClient->updateGroup($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networkconnectivity.v1.HubService/UpdateGroup', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getGroup(); + $this->assertProtobufEquals($group, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateGroupTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateGroupExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateGroupTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $group = new Group(); + $request = (new UpdateGroupRequest()) + ->setGroup($group); + $response = $gapicClient->updateGroup($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateGroupTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateHubTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateHubTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $uniqueId = 'uniqueId-538310583'; + $exportPsc = false; + $expectedResponse = new Hub(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setUniqueId($uniqueId); + $expectedResponse->setExportPsc($exportPsc); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateHubTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $hub = new Hub(); + $request = (new UpdateHubRequest()) + ->setHub($hub); + $response = $gapicClient->updateHub($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networkconnectivity.v1.HubService/UpdateHub', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getHub(); + $this->assertProtobufEquals($hub, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateHubTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateHubExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateHubTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $hub = new Hub(); + $request = (new UpdateHubRequest()) + ->setHub($hub); + $response = $gapicClient->updateHub($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateHubTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateSpokeTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateSpokeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $hub = 'hub103669'; + $group = 'group98629247'; + $uniqueId = 'uniqueId-538310583'; + $expectedResponse = new Spoke(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setHub($hub); + $expectedResponse->setGroup($group); + $expectedResponse->setUniqueId($uniqueId); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateSpokeTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $spoke = new Spoke(); + $request = (new UpdateSpokeRequest()) + ->setSpoke($spoke); + $response = $gapicClient->updateSpoke($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networkconnectivity.v1.HubService/UpdateSpoke', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getSpoke(); + $this->assertProtobufEquals($spoke, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateSpokeTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateSpokeExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateSpokeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $spoke = new Spoke(); + $request = (new UpdateSpokeRequest()) + ->setSpoke($spoke); + $response = $gapicClient->updateSpoke($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateSpokeTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getLocationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $locationId = 'locationId552319461'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Location(); + $expectedResponse->setName($name2); + $expectedResponse->setLocationId($locationId); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + $request = new GetLocationRequest(); + $response = $gapicClient->getLocation($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new GetLocationRequest(); + try { + $gapicClient->getLocation($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $locationsElement = new Location(); + $locations = [ + $locationsElement, + ]; + $expectedResponse = new ListLocationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setLocations($locations); + $transport->addResponse($expectedResponse); + $request = new ListLocationsRequest(); + $response = $gapicClient->listLocations($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new ListLocationsRequest(); + try { + $gapicClient->listLocations($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $request = (new GetIamPolicyRequest()) + ->setResource($resource); + $response = $gapicClient->getIamPolicy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $request = (new GetIamPolicyRequest()) + ->setResource($resource); + try { + $gapicClient->getIamPolicy($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $request = (new SetIamPolicyRequest()) + ->setResource($resource) + ->setPolicy($policy); + $response = $gapicClient->setIamPolicy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPolicy(); + $this->assertProtobufEquals($policy, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $request = (new SetIamPolicyRequest()) + ->setResource($resource) + ->setPolicy($policy); + try { + $gapicClient->setIamPolicy($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new TestIamPermissionsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $request = (new TestIamPermissionsRequest()) + ->setResource($resource) + ->setPermissions($permissions); + $response = $gapicClient->testIamPermissions($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPermissions(); + $this->assertProtobufEquals($permissions, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $request = (new TestIamPermissionsRequest()) + ->setResource($resource) + ->setPermissions($permissions); + try { + $gapicClient->testIamPermissions($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function acceptHubSpokeAsyncTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/acceptHubSpokeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new AcceptHubSpokeResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/acceptHubSpokeTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->hubName('[PROJECT]', '[HUB]'); + $formattedSpokeUri = $gapicClient->spokeName('[PROJECT]', '[LOCATION]', '[SPOKE]'); + $request = (new AcceptHubSpokeRequest()) + ->setName($formattedName) + ->setSpokeUri($formattedSpokeUri); + $response = $gapicClient->acceptHubSpokeAsync($request)->wait(); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networkconnectivity.v1.HubService/AcceptHubSpoke', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualApiRequestObject->getSpokeUri(); + $this->assertProtobufEquals($formattedSpokeUri, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/acceptHubSpokeTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } +} diff --git a/owl-bot-staging/NetworkConnectivity/v1/tests/Unit/V1/Client/PolicyBasedRoutingServiceClientTest.php b/owl-bot-staging/NetworkConnectivity/v1/tests/Unit/V1/Client/PolicyBasedRoutingServiceClientTest.php new file mode 100644 index 000000000000..fcea95db91e9 --- /dev/null +++ b/owl-bot-staging/NetworkConnectivity/v1/tests/Unit/V1/Client/PolicyBasedRoutingServiceClientTest.php @@ -0,0 +1,932 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return PolicyBasedRoutingServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new PolicyBasedRoutingServiceClient($options); + } + + /** @test */ + public function createPolicyBasedRouteTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createPolicyBasedRouteTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $nextHopIlbIp = 'nextHopIlbIp-1739392183'; + $name = 'name3373707'; + $description = 'description-1724546052'; + $network = 'network1843485230'; + $priority = 1165461084; + $selfLink = 'selfLink-1691268851'; + $kind = 'kind3292052'; + $expectedResponse = new PolicyBasedRoute(); + $expectedResponse->setNextHopIlbIp($nextHopIlbIp); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setNetwork($network); + $expectedResponse->setPriority($priority); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setKind($kind); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createPolicyBasedRouteTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $policyBasedRouteId = 'policyBasedRouteId-103152502'; + $policyBasedRoute = new PolicyBasedRoute(); + $policyBasedRouteNetwork = $gapicClient->networkName('[PROJECT]', '[RESOURCE_ID]'); + $policyBasedRoute->setNetwork($policyBasedRouteNetwork); + $policyBasedRouteFilter = new Filter(); + $filterProtocolVersion = ProtocolVersion::PROTOCOL_VERSION_UNSPECIFIED; + $policyBasedRouteFilter->setProtocolVersion($filterProtocolVersion); + $policyBasedRoute->setFilter($policyBasedRouteFilter); + $request = (new CreatePolicyBasedRouteRequest()) + ->setParent($formattedParent) + ->setPolicyBasedRouteId($policyBasedRouteId) + ->setPolicyBasedRoute($policyBasedRoute); + $response = $gapicClient->createPolicyBasedRoute($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networkconnectivity.v1.PolicyBasedRoutingService/CreatePolicyBasedRoute', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getPolicyBasedRouteId(); + $this->assertProtobufEquals($policyBasedRouteId, $actualValue); + $actualValue = $actualApiRequestObject->getPolicyBasedRoute(); + $this->assertProtobufEquals($policyBasedRoute, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createPolicyBasedRouteTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createPolicyBasedRouteExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createPolicyBasedRouteTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $policyBasedRouteId = 'policyBasedRouteId-103152502'; + $policyBasedRoute = new PolicyBasedRoute(); + $policyBasedRouteNetwork = $gapicClient->networkName('[PROJECT]', '[RESOURCE_ID]'); + $policyBasedRoute->setNetwork($policyBasedRouteNetwork); + $policyBasedRouteFilter = new Filter(); + $filterProtocolVersion = ProtocolVersion::PROTOCOL_VERSION_UNSPECIFIED; + $policyBasedRouteFilter->setProtocolVersion($filterProtocolVersion); + $policyBasedRoute->setFilter($policyBasedRouteFilter); + $request = (new CreatePolicyBasedRouteRequest()) + ->setParent($formattedParent) + ->setPolicyBasedRouteId($policyBasedRouteId) + ->setPolicyBasedRoute($policyBasedRoute); + $response = $gapicClient->createPolicyBasedRoute($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createPolicyBasedRouteTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deletePolicyBasedRouteTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deletePolicyBasedRouteTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deletePolicyBasedRouteTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->policyBasedRouteName('[PROJECT]', '[POLICY_BASED_ROUTE]'); + $request = (new DeletePolicyBasedRouteRequest()) + ->setName($formattedName); + $response = $gapicClient->deletePolicyBasedRoute($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networkconnectivity.v1.PolicyBasedRoutingService/DeletePolicyBasedRoute', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deletePolicyBasedRouteTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deletePolicyBasedRouteExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deletePolicyBasedRouteTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->policyBasedRouteName('[PROJECT]', '[POLICY_BASED_ROUTE]'); + $request = (new DeletePolicyBasedRouteRequest()) + ->setName($formattedName); + $response = $gapicClient->deletePolicyBasedRoute($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deletePolicyBasedRouteTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getPolicyBasedRouteTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextHopIlbIp = 'nextHopIlbIp-1739392183'; + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $network = 'network1843485230'; + $priority = 1165461084; + $selfLink = 'selfLink-1691268851'; + $kind = 'kind3292052'; + $expectedResponse = new PolicyBasedRoute(); + $expectedResponse->setNextHopIlbIp($nextHopIlbIp); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setNetwork($network); + $expectedResponse->setPriority($priority); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setKind($kind); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->policyBasedRouteName('[PROJECT]', '[POLICY_BASED_ROUTE]'); + $request = (new GetPolicyBasedRouteRequest()) + ->setName($formattedName); + $response = $gapicClient->getPolicyBasedRoute($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networkconnectivity.v1.PolicyBasedRoutingService/GetPolicyBasedRoute', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getPolicyBasedRouteExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->policyBasedRouteName('[PROJECT]', '[POLICY_BASED_ROUTE]'); + $request = (new GetPolicyBasedRouteRequest()) + ->setName($formattedName); + try { + $gapicClient->getPolicyBasedRoute($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listPolicyBasedRoutesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $policyBasedRoutesElement = new PolicyBasedRoute(); + $policyBasedRoutes = [ + $policyBasedRoutesElement, + ]; + $expectedResponse = new ListPolicyBasedRoutesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setPolicyBasedRoutes($policyBasedRoutes); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListPolicyBasedRoutesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listPolicyBasedRoutes($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getPolicyBasedRoutes()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networkconnectivity.v1.PolicyBasedRoutingService/ListPolicyBasedRoutes', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listPolicyBasedRoutesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListPolicyBasedRoutesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listPolicyBasedRoutes($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $locationId = 'locationId552319461'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Location(); + $expectedResponse->setName($name2); + $expectedResponse->setLocationId($locationId); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + $request = new GetLocationRequest(); + $response = $gapicClient->getLocation($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new GetLocationRequest(); + try { + $gapicClient->getLocation($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $locationsElement = new Location(); + $locations = [ + $locationsElement, + ]; + $expectedResponse = new ListLocationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setLocations($locations); + $transport->addResponse($expectedResponse); + $request = new ListLocationsRequest(); + $response = $gapicClient->listLocations($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new ListLocationsRequest(); + try { + $gapicClient->listLocations($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $request = (new GetIamPolicyRequest()) + ->setResource($resource); + $response = $gapicClient->getIamPolicy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $request = (new GetIamPolicyRequest()) + ->setResource($resource); + try { + $gapicClient->getIamPolicy($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $request = (new SetIamPolicyRequest()) + ->setResource($resource) + ->setPolicy($policy); + $response = $gapicClient->setIamPolicy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPolicy(); + $this->assertProtobufEquals($policy, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $request = (new SetIamPolicyRequest()) + ->setResource($resource) + ->setPolicy($policy); + try { + $gapicClient->setIamPolicy($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new TestIamPermissionsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $request = (new TestIamPermissionsRequest()) + ->setResource($resource) + ->setPermissions($permissions); + $response = $gapicClient->testIamPermissions($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPermissions(); + $this->assertProtobufEquals($permissions, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $request = (new TestIamPermissionsRequest()) + ->setResource($resource) + ->setPermissions($permissions); + try { + $gapicClient->testIamPermissions($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createPolicyBasedRouteAsyncTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createPolicyBasedRouteTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $nextHopIlbIp = 'nextHopIlbIp-1739392183'; + $name = 'name3373707'; + $description = 'description-1724546052'; + $network = 'network1843485230'; + $priority = 1165461084; + $selfLink = 'selfLink-1691268851'; + $kind = 'kind3292052'; + $expectedResponse = new PolicyBasedRoute(); + $expectedResponse->setNextHopIlbIp($nextHopIlbIp); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setNetwork($network); + $expectedResponse->setPriority($priority); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setKind($kind); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createPolicyBasedRouteTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $policyBasedRouteId = 'policyBasedRouteId-103152502'; + $policyBasedRoute = new PolicyBasedRoute(); + $policyBasedRouteNetwork = $gapicClient->networkName('[PROJECT]', '[RESOURCE_ID]'); + $policyBasedRoute->setNetwork($policyBasedRouteNetwork); + $policyBasedRouteFilter = new Filter(); + $filterProtocolVersion = ProtocolVersion::PROTOCOL_VERSION_UNSPECIFIED; + $policyBasedRouteFilter->setProtocolVersion($filterProtocolVersion); + $policyBasedRoute->setFilter($policyBasedRouteFilter); + $request = (new CreatePolicyBasedRouteRequest()) + ->setParent($formattedParent) + ->setPolicyBasedRouteId($policyBasedRouteId) + ->setPolicyBasedRoute($policyBasedRoute); + $response = $gapicClient->createPolicyBasedRouteAsync($request)->wait(); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networkconnectivity.v1.PolicyBasedRoutingService/CreatePolicyBasedRoute', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getPolicyBasedRouteId(); + $this->assertProtobufEquals($policyBasedRouteId, $actualValue); + $actualValue = $actualApiRequestObject->getPolicyBasedRoute(); + $this->assertProtobufEquals($policyBasedRoute, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createPolicyBasedRouteTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } +} diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/GPBMetadata/Google/Cloud/Networkmanagement/V1/ConnectivityTest.php b/owl-bot-staging/NetworkManagement/v1/proto/src/GPBMetadata/Google/Cloud/Networkmanagement/V1/ConnectivityTest.php new file mode 100644 index 0000000000000000000000000000000000000000..0161d6dc7f450cf7a5891a2e56dbfed4d70d4cc2 GIT binary patch literal 4939 zcmcIoTXWmS6%MKUp+r%u*rt^>h8ee(r!_fJGHpuRNk9^kIi*O3gygEjnJow`DZ~%} z<06mh(M%uvTl&x+()YG+oj&J3bf#w)07X(%Lc3GFP*|M(&e?PQu+P7C&s_LSI%GEU zw162>|56IhnB;m+;OLGe^~1q{d6Mp&yQamwq9oN?QnRH>O0BLw#I3#)dO9mhL&q6f ztfX5`Xq0Rgymh?S=bEhz**UX=(#2j$cWj&Kfq7vDmo#90P!w7KZ0(%+uBJ2Tuw6M~ zfo5od);kn{y($OnHKzf4CwtETbW8JnsX7L%A}+iG3IE)%Z<)H}2U>tXk4&GMwi%e3 zW&RNl`a&9Lmd_C6rtBcJ(N4#f_=c9Pv)w0Bgvn(exehw!g_Ky>=DtEd_3C!OJX^DR zHRkJ{=?0G1M$vM4$bylF`O5B-SS^P$2hwh2W4V08$QM%Jg=}2ABzY_dJ^Pukn*&^p z{_D-~pX{2w1Cv=sg`H^^rsI{%*QdG$xovBQ#Q~ms*X;r8sU8M-e*GiIswO5#pq;z( z@9nsHuZxin{n>j&5TAZ!#vzjpV-%qSO!VE6Pq~L5!#^ItZ$3D~$-`)CQ4~ka=$dPmyx8Yaee68_am4|5Y%KmD78k{ZX;}&q@5KW5Vgb+9OFZ#HKYCI4>k8zi zYl&>ZBCpSUN=ognRTlm&uaa%Z7;%PUk>u0-4fzI^qfE&!;B#jG7sW`;4;;Fv*oNz1 z2smt-C;~PxZLC*>UHm|p9IT3?WB1B03DfeB^O(ik8^t%@VGr{2%hCcGeIM2h(|0ZH zl8QsFaCvUc0%^grrS+NR=T}iQv;XxR=b3h1u^|u?JMb>a7m(3ChE`A>kUWUv?Ifs4 zw2Gr#kIcYbp^N=6-j$he*C~9As`N9hZ(6+D8rW1#Jj%M*{;Ndk?fF>jjBT$)yA!`` zqOEo+M=HUHsow$#Qg20e)#{IepEV7@T~*`K5P!d|nm)xdy9A4H5LC z=~B%wuzmQkrR%WhI$j_QT_RW+ri~Sk15Fg^8o39X1IK%-c?OTC7g{X8fyZAX-@)Cf z7c|g3oMU+&?CkzGa|AoFtava|(LoKWz!Ayx@}obeQltPm%h3#qN9Cq@)HFmIM1}Y= z#br)`Ov(h8F3a;g$nJkWhb;|MP>JzX+#0D*bLbr)!`Fg{;T0mt3#&JX#}nU?W;jfQeW>g=_?sP>r}B$a9=! zvMh7uhNmj9Th~~PK*+bK2^n!Ul@1{}XsJ#!o?7E5oIf*dFHAKdHp^XK4VG0dV zZ+R~b;sBk{?!*`)4V$nM*OC|mYvc&l;{_@r&l`Jo|JUzxoMuEJdGvX$#O215ZJCE; z=MmhQ?NF@!&@-co+UY%p{H>0;A$jWo$0ZBjLT22!pFqB;sIOX`-%|CotE`-p5p=CInPu|zI~(|EJlYSQt=bm0;{o>g_^=TJCkbzaGxTD^HlJI4)$s&eO0 zQKz)5!)m?RRpn+?K^0rD(P+svT9F%krISl@Gfvv5RaTW(@@Z~?tiVFMTg@$2?!!Gg zyLVK!VT(?dv1wH9!1mN4k8t7dY1p1IgfJ79vB8B_AOe!ze=$c6%)r3`$3aL5GFT$! z0KZ81ROVbJv;PBAnLLCg=6Q}6(;SkhM>bWA2q*axmIWd6k$-UNu$#z;s+r0Eih>#! zG+2)9x(lSEbdMX;f!Tnyjv`lI%9RF>42I#jdA*Rv*|a7fRqBVwt>bQP5nKNHakHkV zO6REF#Qa$*Jcq3Y(g|C?Y%~0Dvjb$i2(#iwPr|E91lt)WOejUqP2F>R;hBZP8EnV9 zYo?C_yB~6{M!tpZL_EepR6d0G@xPek_%}={{A(GqlXQVovWd{oL&+u~it*$BG5EiO zjMm4QOLZ;unP^|x{puVpm~E-dv8o)3AdU4gUYx`B8P$<91%lu%5hOEysOvcQ2cb3b zp0~CoasV4FrrJ2429B6+nf=lnRwXUDj@vK*BkmW68_6**n0XlGth~|T6a11$C_iOG zjIWQ~AR<8dH39zB9A-{APceq95u@xpf%WlcB>h|GEbtuHL2j(sR6~v#b@#%bQm`?Z zBA>!eyVI(OZuueg_*1wamuJ0ES5IlZS#34D^{%QkRqUG6^|@FW!d7g-Sm-~42ZP+7FX@Me;>xEe zre-l7iASS5q~gim-x8T#d@qz-3|&k0@Mh@y^rHx>Tozd6@(r+Z`DCxZjHMJfpFbXb c?Ef;lZW+6s;UCDRKI3LaNJjT3S8xUJU-^1GbpQYW literal 0 HcmV?d00001 diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/GPBMetadata/Google/Cloud/Networkmanagement/V1/Reachability.php b/owl-bot-staging/NetworkManagement/v1/proto/src/GPBMetadata/Google/Cloud/Networkmanagement/V1/Reachability.php new file mode 100644 index 000000000000..20446620128e --- /dev/null +++ b/owl-bot-staging/NetworkManagement/v1/proto/src/GPBMetadata/Google/Cloud/Networkmanagement/V1/Reachability.php @@ -0,0 +1,84 @@ +internalAddGeneratedFile( + ' +à +4google/cloud/networkmanagement/v1/reachability.proto!google.cloud.networkmanagement.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto9google/cloud/networkmanagement/v1/connectivity_test.proto#google/longrunning/operations.protogoogle/protobuf/empty.proto google/protobuf/field_mask.protogoogle/protobuf/timestamp.proto"¬ +ListConnectivityTestsRequestC +parent ( B3àAúA- ++cloudresourcemanager.googleapis.com/Project + page_size ( + +page_token (  +filter (  +order_by ( "• +ListConnectivityTestsResponseF + resources ( 23.google.cloud.networkmanagement.v1.ConnectivityTest +next_page_token (  + unreachable ( "e +GetConnectivityTestRequestG +name ( B9àAúA3 +1networkmanagement.googleapis.com/ConnectivityTest"Æ +CreateConnectivityTestRequestC +parent ( B3àAúA- ++cloudresourcemanager.googleapis.com/Project +test_id ( BàAJ +resource ( 23.google.cloud.networkmanagement.v1.ConnectivityTestBàA"¡ +UpdateConnectivityTestRequest4 + update_mask ( 2.google.protobuf.FieldMaskBàAJ +resource ( 23.google.cloud.networkmanagement.v1.ConnectivityTestBàA"h +DeleteConnectivityTestRequestG +name ( B9àAúA3 +1networkmanagement.googleapis.com/ConnectivityTest"g +RerunConnectivityTestRequestG +name ( B9àAúA3 +1networkmanagement.googleapis.com/ConnectivityTest"Ö +OperationMetadata/ + create_time ( 2.google.protobuf.Timestamp, +end_time ( 2.google.protobuf.Timestamp +target (  +verb (  + status_detail (  +cancel_requested ( + api_version ( 2– +ReachabilityServiceç +ListConnectivityTests?.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest@.google.cloud.networkmanagement.v1.ListConnectivityTestsResponse"KÚAparent‚Óä“<:/v1/{parent=projects/*/locations/global}/connectivityTestsÔ +GetConnectivityTest=.google.cloud.networkmanagement.v1.GetConnectivityTestRequest3.google.cloud.networkmanagement.v1.ConnectivityTest"IÚAname‚Óä“<:/v1/{name=projects/*/locations/global/connectivityTests/*}¬ +CreateConnectivityTest@.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest.google.longrunning.Operation"°ÊAG +2google.cloud.networkmanagement.v1.ConnectivityTestOperationMetadataÚAparent,test_id,resource‚Óä“F":/v1/{parent=projects/*/locations/global}/connectivityTests:resource² +UpdateConnectivityTest@.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest.google.longrunning.Operation"¶ÊAG +2google.cloud.networkmanagement.v1.ConnectivityTestOperationMetadataÚAupdate_mask,resource‚Óä“O2C/v1/{resource.name=projects/*/locations/global/connectivityTests/*}:resource +RerunConnectivityTest?.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest.google.longrunning.Operation"•ÊAG +2google.cloud.networkmanagement.v1.ConnectivityTestOperationMetadata‚Óä“E"@/v1/{name=projects/*/locations/global/connectivityTests/*}:rerun:*ñ +DeleteConnectivityTest@.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest.google.longrunning.Operation"vÊA* +google.protobuf.EmptyOperationMetadataÚAname‚Óä“<*:/v1/{name=projects/*/locations/global/connectivityTests/*}TÊA networkmanagement.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformB‡ +%com.google.cloud.networkmanagement.v1BReachabilityServiceProtoPZScloud.google.com/go/networkmanagement/apiv1/networkmanagementpb;networkmanagementpbª!Google.Cloud.NetworkManagement.V1Ê!Google\\Cloud\\NetworkManagement\\V1ê$Google::Cloud::NetworkManagement::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/GPBMetadata/Google/Cloud/Networkmanagement/V1/Trace.php b/owl-bot-staging/NetworkManagement/v1/proto/src/GPBMetadata/Google/Cloud/Networkmanagement/V1/Trace.php new file mode 100644 index 0000000000000000000000000000000000000000..ee6ae38809db3e085a585c6f82c9435d2130466a GIT binary patch literal 17481 zcmbtcO^h4KbvEZu!DB z+q=<4(_OD#y?XWDtM}LZ@Vld@BXK8N_6PpBJN1vUPhMoFPyOs@Je&@D!_(}Ov*Tlb zob3&tjrynlcsrXdHL~?aJL{CH?c10-8J>-M{%-bUI6OJ^@ApoJXGix3{`9lq_|s?I zLHERe<`1U#pFg-i9d~>FHe(iI(0%4lMtG4eHw*jzw0qQ@b`Q&pdk~C!0ck|&>*Du* zGbP^nQX*mBmf+hgLEAGDwEg_S)-{E(JL=y*rmf-AV|Y8khFyXWY0w9qSxroXdB)gCU2ICZ@FxEFc^^Eej@?GJt;Pr>0+Y7SP^T_M+5H!hx}RhMMf~T2MMqp zj0R;nNnzR(f-p_b1_S>zv&M+No(xf&=O{civGIJ=^Lj(z>B0JCUSU-4CPLLK>S+pF zUYtAfPy5gPab}(IY$w1|k~2aSis_k+#3&TA6$;2=_sMWP&1^D)B(j(%cs2b4vBYY3 zo@c+6WCzevHMuD^PKVti?@9NRv~rxW7)ug<)-bQ2rV+NnLM8>N22Yg<&0I*#5Ow1! zq980MpZeajE{xzfV>6Z{!cuE7g5PhpRh;kn58zL|he>UHL z=%v4yvZn&=&ef=WB4G`5?}B1jCXvC(Iq(pMpu;6)TTk5+_ZKvGM5rl#~a>L zu1Uzm?r7xsgOmQi_n;~hx;8E+W@3Ica(M26oEoB)WRA}U-q?TMXS7!mqh(Uvvw^Fo zDzx7gi-YbobCvPDnc$4;U9Cs1uyA4h_=Pquw9PHX^L_$6aM6DJLfIG0ROEajwj$~U zJ?njnn?rgB*BJY50_>))6(kC^0*-qEI|y&rdvXTc)68|onnV~|a$R#0;SzoiSh>Ljbw!J;K zvF}yuc&Ha0D>XCFcHFwtwifIg;;J#D+-Q_*j@NSBgDU1-vu}zmW4P&74`@+LebjIt zT8s8o@rp4Ho8j%}TR?8TV&4`wjG9b0OClk~R>mbcpkN*M z*66hR!lU?EMGb3W@oe1Zm?3Rn5NVFlju9Sn2#}_@K)C`Q!BHT>FLf;E^+y~A@Js*4 zGPI?a72JJR3~e15cCtVduowXwrk(;w*sIold*G zr<4X@0>~Rq=bno-!`(=-wJl*k>rQ)5{UdL3_5{co8wD_Fin#Pxf8>q3gA-qEbW^O1 z{S&%HcsseDE{kCQwo7K>ET-Kt z(gdEt%Uj}#dKqKs1Uw~XW3kZ?DUKH$Nu)Wb<7egox$$ZH@KD$~AmgaRo4y$N94u_^ zd@sS}W-?`4KTs6X2AGHa2?QWSR|kg5aKs2} zVoee^=?x)I6dY~tByrnAbo^I~rYBLhP+=)VNJBCLhCgpHqtf}PH!|cY1-nD zos)*a)JsyqWy052L5Qh@Fmsb}FIB%cN%5|kOg?tMh z!#Nl{kuO25+f{n@bAPu$w?!zFxJB!51H4M3IgezxHNkMT3A$lj!WY`NU4S%N!Ryd7 zHQy>?;Yz`=2wURoG(+h6^#MM#W zb3Ex!He9dby_MZF9>@!x0u8n8=jRmYsv*O{ISpqDyI=X>2sWl^o?NArGFE;nWmwp+%Nk$ z%1@&UFb&ISM`L#Oc-eQ<{$=1TMg2=@xo?P9$Ol#8fQkW(Jvm;S^-SmfYDrjTI8Sl1 z{YiYyDY;N2TAMqi1kw{nxNW{*DY-7Jr+)Wz`qYCT+xwKQGD)ZOn=4{fWhN%zG1VNB zxB=!ODl1`k#JbLL@E+(OHg~@JRra7zGWl>{HQL~c&HYX)%1VZWYZ#3Z=eUM2w9@v$ z#cCIuUZ+H=fh$5;oZ#gGiGHQsZc2rLDnK)62I~(r0gtU#O+7B>j>VcuHL?LJMxCdV zSWl1Yz&k~OF|r|L7-ht>HK-z>)QccDvY7kt1#xj6_Y=fvQ*kXK2!ZR4Tqf!vpa-V8sZGDWaF)hi~@TXI|C&`(Z>y-(*rFB5d` zM9+)uSZN=;Fq&U9Lq)FuyMKWRm&Y@ZXgjC#0DZ{O#a7$*Z>(}Z6pa5K(6jBUD1(*;QiQt zHk|rFrAM02tKvfRJ;mmd9t=fM(NGX+ezB2t#X9+wbf#=3WU%mI02iO* zB-V^-mhA-BrM!8P)D4aK+ikw*ND?8@GF~8KEtzmVBJC`Ah1Gxk`9J*A>cZ+0GIjAZ zwiLmaUZyODx&K)ZD{58b`jnlF=9kySYG621Ha}4ok2A?pzef5wVLq6svgag$m&qlc zpEzCN*aJD$&=rzF1%WG{h)Uy|M)H6%s+3vTjHPM?$1Jh*^%?=j636SD=bX(JZ-n$m zQpB5(r^|{!ovzRq(0Rfi%W7L>2cxO%3%P$sU}Tgrzmn`2^Zy^Rllx`r3xxpMuA@Jk z0xUaTm^s=7QvXPBMUka2iUUiW4kV0!Obd^$6}0TG?mW%GtxFe%@-xsW$w374&qJ%s~Jq*E>fpPA{}K7 zG<5WixCS#u9UT+zS${Gi<2~}n{3o)UG2dy$({e~(bm|Z5jYsvM zCX-^`7z3I&i#!0^P;Yoa@*Q#YIevdrT<+BA(CQ^5!AedGwjL=0B*#~I{5I-DjgDJ% zP(~>=8-Vn{dvCANLCruW?E!)dem~zv{Dbm`gw|o_I%9cF+%!V6jc=3T zU~}~Tv6BTGY0CM!2;W4q31C^992rGlwdv(cB`&+reya62;a4aaGqU_8r%tuDCFE&d zn|TeMcv4=$JgP9j{b`}3@{V|8E-cJd$OH|3Rv-HHz}wmP!1p z^@Dt^TJqopclMon8^s~mB+6tuUc1pinFa+5Hkg4A@3<~1CW5ru$cv&z0z+*a3K)mf z4wuO+`!$gx^?oP|F4co-`>}N6$tTpQRn$|EFafKjWJvlADY9+kbq~U_rQ)9fks&`s zhZQsPuM+yeC7l`GB15N#9xTwk9ta=TDHh2=f?~4F z!C>INlHwQU0y*m_Up{i7ih&hhA@d>!^lfMyBC7-`QjJQpZ<6%HU;`}+jr3bo6p4Xp zXU>bR{$SqfD&dN?>(K4$e%?jJx@qm$+v3d_+PH9nRoZe`?~+8t;KOt)?+lj@q?W7b z)_YVPih;+`b3~#no%IcSM{H}Z>plqSq{8A6<=nzhZ63U@Ex+|PDV9M5+0Ysa_%*H` zhqS+AAHFW`7=W&`-#|aaEaWy-_4QgXw|jflA}ueiEd1qjWEeDnQa)AnGNfwNeouUT zKGZ=q4<}fssU!M-pL5y9EwAM_P4-hucVO`KsG!j}Z-aANBkLR=1)sGDwNRV?mUu5v zfdZJw)v{;;NhfK{JOXO>$gyigQn*pnN3e-{Jxm#0EvoM$GI)(jm!aLAi{LtSPsD60 z=>(j3UZ5oJBJ_HEf|(7G;?-H%XuBZ*8#y zY&cs=pXijRuZ^S_f9p`-4I+|+le}p-E~O6jGZ|ruSFSbC=cKjr>nvq)_&C-3om#uv zgzrQVYRh_`I;X-T)5{sIk+n-?L+r@)m$g>3azUyHRx4M&-Od*)?1_JyctvAiBGet{ zN?tQD0()rYsmfTgzK5o%yOqZU7d|{~k1k(Ta#g{yinpw95*K2S@*bNH|E*94&4dOM z;5zxzW3;!?Z5J~+=4Ldntyf9CqjtWMM|&Gxx72E-D$j?nlM61HNKC@Gx_g|Kb&s+J zbkS3evDQHQ)d%FT#Fn3Lv#jqBXp{hb(dYMsN-7e$Tq&7r~aP&>)FKs(d2tS3O-%b}#FaaM z#QKBh{qb->y{=Lia%Ev1jG~`BB|$#JpWJ^gqWeaECSiXhmbhLg3q(miY*aJ1xj1iD z!em(}rfhOQ=#(4c8%tF~3d9?)2mWWqYZenqxD#|Nmm;fU7^5k%F3#0*0|bWZV-Lr>L<4qL467$kczqMyRpJx_fEK}!#u0Q4~+M%5NwdlbsIwU%;! zfcAps><2B8LZ<9{nmH+Xsxv1g&vpJuNhO(oQu2i7oD?1J+>@fSefder1I9VdJt=w0 zI4PseTQ>E?#FRUqbN{s@uFUDe;EtYkv1D}0k`EI;hQ^j}sKHUc%#f-6j)!f`uix>7=mu%lu;Q?^EK|oc0hCkb;!pit?391%{Q*9&g6~mDxzHO=^<;q`g=+=@2&ReN(W+>_~<9cW( zTaJ0u}Ba>o^Kw+64|bx=_+;)~{oofgwhtcsjfOc?zmTDSA|r%4#BXH$+rnLmYIm1$?e5MX+uc2Q@MML%VcvZ` g`00kXgoogle.cloud.networkmanagement.v1.AbortInfo + */ +class AbortInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Causes that the analysis is aborted. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.AbortInfo.Cause cause = 1; + */ + protected $cause = 0; + /** + * URI of the resource that caused the abort. + * + * Generated from protobuf field string resource_uri = 2; + */ + protected $resource_uri = ''; + /** + * IP address that caused the abort. + * + * Generated from protobuf field string ip_address = 4 [(.google.api.field_info) = { + */ + protected $ip_address = ''; + /** + * List of project IDs the user specified in the request but lacks access to. + * In this case, analysis is aborted with the PERMISSION_DENIED cause. + * + * Generated from protobuf field repeated string projects_missing_permission = 3; + */ + private $projects_missing_permission; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $cause + * Causes that the analysis is aborted. + * @type string $resource_uri + * URI of the resource that caused the abort. + * @type string $ip_address + * IP address that caused the abort. + * @type array|\Google\Protobuf\Internal\RepeatedField $projects_missing_permission + * List of project IDs the user specified in the request but lacks access to. + * In this case, analysis is aborted with the PERMISSION_DENIED cause. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkmanagement\V1\Trace::initOnce(); + parent::__construct($data); + } + + /** + * Causes that the analysis is aborted. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.AbortInfo.Cause cause = 1; + * @return int + */ + public function getCause() + { + return $this->cause; + } + + /** + * Causes that the analysis is aborted. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.AbortInfo.Cause cause = 1; + * @param int $var + * @return $this + */ + public function setCause($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetworkManagement\V1\AbortInfo\Cause::class); + $this->cause = $var; + + return $this; + } + + /** + * URI of the resource that caused the abort. + * + * Generated from protobuf field string resource_uri = 2; + * @return string + */ + public function getResourceUri() + { + return $this->resource_uri; + } + + /** + * URI of the resource that caused the abort. + * + * Generated from protobuf field string resource_uri = 2; + * @param string $var + * @return $this + */ + public function setResourceUri($var) + { + GPBUtil::checkString($var, True); + $this->resource_uri = $var; + + return $this; + } + + /** + * IP address that caused the abort. + * + * Generated from protobuf field string ip_address = 4 [(.google.api.field_info) = { + * @return string + */ + public function getIpAddress() + { + return $this->ip_address; + } + + /** + * IP address that caused the abort. + * + * Generated from protobuf field string ip_address = 4 [(.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setIpAddress($var) + { + GPBUtil::checkString($var, True); + $this->ip_address = $var; + + return $this; + } + + /** + * List of project IDs the user specified in the request but lacks access to. + * In this case, analysis is aborted with the PERMISSION_DENIED cause. + * + * Generated from protobuf field repeated string projects_missing_permission = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getProjectsMissingPermission() + { + return $this->projects_missing_permission; + } + + /** + * List of project IDs the user specified in the request but lacks access to. + * In this case, analysis is aborted with the PERMISSION_DENIED cause. + * + * Generated from protobuf field repeated string projects_missing_permission = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setProjectsMissingPermission($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->projects_missing_permission = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/AbortInfo/Cause.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/AbortInfo/Cause.php new file mode 100644 index 000000000000..1c962a2f7dc8 --- /dev/null +++ b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/AbortInfo/Cause.php @@ -0,0 +1,327 @@ +google.cloud.networkmanagement.v1.AbortInfo.Cause + */ +class Cause +{ + /** + * Cause is unspecified. + * + * Generated from protobuf enum CAUSE_UNSPECIFIED = 0; + */ + const CAUSE_UNSPECIFIED = 0; + /** + * Aborted due to unknown network. Deprecated, not used in the new tests. + * + * Generated from protobuf enum UNKNOWN_NETWORK = 1 [deprecated = true]; + */ + const UNKNOWN_NETWORK = 1; + /** + * Aborted because no project information can be derived from the test + * input. Deprecated, not used in the new tests. + * + * Generated from protobuf enum UNKNOWN_PROJECT = 3 [deprecated = true]; + */ + const UNKNOWN_PROJECT = 3; + /** + * Aborted because traffic is sent from a public IP to an instance without + * an external IP. Deprecated, not used in the new tests. + * + * Generated from protobuf enum NO_EXTERNAL_IP = 7 [deprecated = true]; + */ + const NO_EXTERNAL_IP = 7; + /** + * Aborted because none of the traces matches destination information + * specified in the input test request. Deprecated, not used in the new + * tests. + * + * Generated from protobuf enum UNINTENDED_DESTINATION = 8 [deprecated = true]; + */ + const UNINTENDED_DESTINATION = 8; + /** + * Aborted because the source endpoint could not be found. Deprecated, not + * used in the new tests. + * + * Generated from protobuf enum SOURCE_ENDPOINT_NOT_FOUND = 11 [deprecated = true]; + */ + const SOURCE_ENDPOINT_NOT_FOUND = 11; + /** + * Aborted because the source network does not match the source endpoint. + * Deprecated, not used in the new tests. + * + * Generated from protobuf enum MISMATCHED_SOURCE_NETWORK = 12 [deprecated = true]; + */ + const MISMATCHED_SOURCE_NETWORK = 12; + /** + * Aborted because the destination endpoint could not be found. Deprecated, + * not used in the new tests. + * + * Generated from protobuf enum DESTINATION_ENDPOINT_NOT_FOUND = 13 [deprecated = true]; + */ + const DESTINATION_ENDPOINT_NOT_FOUND = 13; + /** + * Aborted because the destination network does not match the destination + * endpoint. Deprecated, not used in the new tests. + * + * Generated from protobuf enum MISMATCHED_DESTINATION_NETWORK = 14 [deprecated = true]; + */ + const MISMATCHED_DESTINATION_NETWORK = 14; + /** + * Aborted because no endpoint with the packet's destination IP address is + * found. + * + * Generated from protobuf enum UNKNOWN_IP = 2; + */ + const UNKNOWN_IP = 2; + /** + * Aborted because no endpoint with the packet's destination IP is found in + * the Google-managed project. + * + * Generated from protobuf enum GOOGLE_MANAGED_SERVICE_UNKNOWN_IP = 32; + */ + const GOOGLE_MANAGED_SERVICE_UNKNOWN_IP = 32; + /** + * Aborted because the source IP address doesn't belong to any of the + * subnets of the source VPC network. + * + * Generated from protobuf enum SOURCE_IP_ADDRESS_NOT_IN_SOURCE_NETWORK = 23; + */ + const SOURCE_IP_ADDRESS_NOT_IN_SOURCE_NETWORK = 23; + /** + * Aborted because user lacks permission to access all or part of the + * network configurations required to run the test. + * + * Generated from protobuf enum PERMISSION_DENIED = 4; + */ + const PERMISSION_DENIED = 4; + /** + * Aborted because user lacks permission to access Cloud NAT configs + * required to run the test. + * + * Generated from protobuf enum PERMISSION_DENIED_NO_CLOUD_NAT_CONFIGS = 28; + */ + const PERMISSION_DENIED_NO_CLOUD_NAT_CONFIGS = 28; + /** + * Aborted because user lacks permission to access Network endpoint group + * endpoint configs required to run the test. + * + * Generated from protobuf enum PERMISSION_DENIED_NO_NEG_ENDPOINT_CONFIGS = 29; + */ + const PERMISSION_DENIED_NO_NEG_ENDPOINT_CONFIGS = 29; + /** + * Aborted because user lacks permission to access Cloud Router configs + * required to run the test. + * + * Generated from protobuf enum PERMISSION_DENIED_NO_CLOUD_ROUTER_CONFIGS = 36; + */ + const PERMISSION_DENIED_NO_CLOUD_ROUTER_CONFIGS = 36; + /** + * Aborted because no valid source or destination endpoint is derived from + * the input test request. + * + * Generated from protobuf enum NO_SOURCE_LOCATION = 5; + */ + const NO_SOURCE_LOCATION = 5; + /** + * Aborted because the source or destination endpoint specified in + * the request is invalid. Some examples: + * - The request might contain malformed resource URI, project ID, or IP + * address. + * - The request might contain inconsistent information (for example, the + * request might include both the instance and the network, but the instance + * might not have a NIC in that network). + * + * Generated from protobuf enum INVALID_ARGUMENT = 6; + */ + const INVALID_ARGUMENT = 6; + /** + * Aborted because the number of steps in the trace exceeds a certain + * limit. It might be caused by a routing loop. + * + * Generated from protobuf enum TRACE_TOO_LONG = 9; + */ + const TRACE_TOO_LONG = 9; + /** + * Aborted due to internal server error. + * + * Generated from protobuf enum INTERNAL_ERROR = 10; + */ + const INTERNAL_ERROR = 10; + /** + * Aborted because the test scenario is not supported. + * + * Generated from protobuf enum UNSUPPORTED = 15; + */ + const UNSUPPORTED = 15; + /** + * Aborted because the source and destination resources have no common IP + * version. + * + * Generated from protobuf enum MISMATCHED_IP_VERSION = 16; + */ + const MISMATCHED_IP_VERSION = 16; + /** + * Aborted because the connection between the control plane and the node of + * the source cluster is initiated by the node and managed by the + * Konnectivity proxy. + * + * Generated from protobuf enum GKE_KONNECTIVITY_PROXY_UNSUPPORTED = 17; + */ + const GKE_KONNECTIVITY_PROXY_UNSUPPORTED = 17; + /** + * Aborted because expected resource configuration was missing. + * + * Generated from protobuf enum RESOURCE_CONFIG_NOT_FOUND = 18; + */ + const RESOURCE_CONFIG_NOT_FOUND = 18; + /** + * Aborted because expected VM instance configuration was missing. + * + * Generated from protobuf enum VM_INSTANCE_CONFIG_NOT_FOUND = 24; + */ + const VM_INSTANCE_CONFIG_NOT_FOUND = 24; + /** + * Aborted because expected network configuration was missing. + * + * Generated from protobuf enum NETWORK_CONFIG_NOT_FOUND = 25; + */ + const NETWORK_CONFIG_NOT_FOUND = 25; + /** + * Aborted because expected firewall configuration was missing. + * + * Generated from protobuf enum FIREWALL_CONFIG_NOT_FOUND = 26; + */ + const FIREWALL_CONFIG_NOT_FOUND = 26; + /** + * Aborted because expected route configuration was missing. + * + * Generated from protobuf enum ROUTE_CONFIG_NOT_FOUND = 27; + */ + const ROUTE_CONFIG_NOT_FOUND = 27; + /** + * Aborted because a PSC endpoint selection for the Google-managed service + * is ambiguous (several PSC endpoints satisfy test input). + * + * Generated from protobuf enum GOOGLE_MANAGED_SERVICE_AMBIGUOUS_PSC_ENDPOINT = 19; + */ + const GOOGLE_MANAGED_SERVICE_AMBIGUOUS_PSC_ENDPOINT = 19; + /** + * Aborted because tests with a PSC-based Cloud SQL instance as a source are + * not supported. + * + * Generated from protobuf enum SOURCE_PSC_CLOUD_SQL_UNSUPPORTED = 20; + */ + const SOURCE_PSC_CLOUD_SQL_UNSUPPORTED = 20; + /** + * Aborted because tests with a Redis Cluster as a source are not supported. + * + * Generated from protobuf enum SOURCE_REDIS_CLUSTER_UNSUPPORTED = 34; + */ + const SOURCE_REDIS_CLUSTER_UNSUPPORTED = 34; + /** + * Aborted because tests with a Redis Instance as a source are not + * supported. + * + * Generated from protobuf enum SOURCE_REDIS_INSTANCE_UNSUPPORTED = 35; + */ + const SOURCE_REDIS_INSTANCE_UNSUPPORTED = 35; + /** + * Aborted because tests with a forwarding rule as a source are not + * supported. + * + * Generated from protobuf enum SOURCE_FORWARDING_RULE_UNSUPPORTED = 21; + */ + const SOURCE_FORWARDING_RULE_UNSUPPORTED = 21; + /** + * Aborted because one of the endpoints is a non-routable IP address + * (loopback, link-local, etc). + * + * Generated from protobuf enum NON_ROUTABLE_IP_ADDRESS = 22; + */ + const NON_ROUTABLE_IP_ADDRESS = 22; + /** + * Aborted due to an unknown issue in the Google-managed project. + * + * Generated from protobuf enum UNKNOWN_ISSUE_IN_GOOGLE_MANAGED_PROJECT = 30; + */ + const UNKNOWN_ISSUE_IN_GOOGLE_MANAGED_PROJECT = 30; + /** + * Aborted due to an unsupported configuration of the Google-managed + * project. + * + * Generated from protobuf enum UNSUPPORTED_GOOGLE_MANAGED_PROJECT_CONFIG = 31; + */ + const UNSUPPORTED_GOOGLE_MANAGED_PROJECT_CONFIG = 31; + + private static $valueToName = [ + self::CAUSE_UNSPECIFIED => 'CAUSE_UNSPECIFIED', + self::UNKNOWN_NETWORK => 'UNKNOWN_NETWORK', + self::UNKNOWN_PROJECT => 'UNKNOWN_PROJECT', + self::NO_EXTERNAL_IP => 'NO_EXTERNAL_IP', + self::UNINTENDED_DESTINATION => 'UNINTENDED_DESTINATION', + self::SOURCE_ENDPOINT_NOT_FOUND => 'SOURCE_ENDPOINT_NOT_FOUND', + self::MISMATCHED_SOURCE_NETWORK => 'MISMATCHED_SOURCE_NETWORK', + self::DESTINATION_ENDPOINT_NOT_FOUND => 'DESTINATION_ENDPOINT_NOT_FOUND', + self::MISMATCHED_DESTINATION_NETWORK => 'MISMATCHED_DESTINATION_NETWORK', + self::UNKNOWN_IP => 'UNKNOWN_IP', + self::GOOGLE_MANAGED_SERVICE_UNKNOWN_IP => 'GOOGLE_MANAGED_SERVICE_UNKNOWN_IP', + self::SOURCE_IP_ADDRESS_NOT_IN_SOURCE_NETWORK => 'SOURCE_IP_ADDRESS_NOT_IN_SOURCE_NETWORK', + self::PERMISSION_DENIED => 'PERMISSION_DENIED', + self::PERMISSION_DENIED_NO_CLOUD_NAT_CONFIGS => 'PERMISSION_DENIED_NO_CLOUD_NAT_CONFIGS', + self::PERMISSION_DENIED_NO_NEG_ENDPOINT_CONFIGS => 'PERMISSION_DENIED_NO_NEG_ENDPOINT_CONFIGS', + self::PERMISSION_DENIED_NO_CLOUD_ROUTER_CONFIGS => 'PERMISSION_DENIED_NO_CLOUD_ROUTER_CONFIGS', + self::NO_SOURCE_LOCATION => 'NO_SOURCE_LOCATION', + self::INVALID_ARGUMENT => 'INVALID_ARGUMENT', + self::TRACE_TOO_LONG => 'TRACE_TOO_LONG', + self::INTERNAL_ERROR => 'INTERNAL_ERROR', + self::UNSUPPORTED => 'UNSUPPORTED', + self::MISMATCHED_IP_VERSION => 'MISMATCHED_IP_VERSION', + self::GKE_KONNECTIVITY_PROXY_UNSUPPORTED => 'GKE_KONNECTIVITY_PROXY_UNSUPPORTED', + self::RESOURCE_CONFIG_NOT_FOUND => 'RESOURCE_CONFIG_NOT_FOUND', + self::VM_INSTANCE_CONFIG_NOT_FOUND => 'VM_INSTANCE_CONFIG_NOT_FOUND', + self::NETWORK_CONFIG_NOT_FOUND => 'NETWORK_CONFIG_NOT_FOUND', + self::FIREWALL_CONFIG_NOT_FOUND => 'FIREWALL_CONFIG_NOT_FOUND', + self::ROUTE_CONFIG_NOT_FOUND => 'ROUTE_CONFIG_NOT_FOUND', + self::GOOGLE_MANAGED_SERVICE_AMBIGUOUS_PSC_ENDPOINT => 'GOOGLE_MANAGED_SERVICE_AMBIGUOUS_PSC_ENDPOINT', + self::SOURCE_PSC_CLOUD_SQL_UNSUPPORTED => 'SOURCE_PSC_CLOUD_SQL_UNSUPPORTED', + self::SOURCE_REDIS_CLUSTER_UNSUPPORTED => 'SOURCE_REDIS_CLUSTER_UNSUPPORTED', + self::SOURCE_REDIS_INSTANCE_UNSUPPORTED => 'SOURCE_REDIS_INSTANCE_UNSUPPORTED', + self::SOURCE_FORWARDING_RULE_UNSUPPORTED => 'SOURCE_FORWARDING_RULE_UNSUPPORTED', + self::NON_ROUTABLE_IP_ADDRESS => 'NON_ROUTABLE_IP_ADDRESS', + self::UNKNOWN_ISSUE_IN_GOOGLE_MANAGED_PROJECT => 'UNKNOWN_ISSUE_IN_GOOGLE_MANAGED_PROJECT', + self::UNSUPPORTED_GOOGLE_MANAGED_PROJECT_CONFIG => 'UNSUPPORTED_GOOGLE_MANAGED_PROJECT_CONFIG', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Cause::class, \Google\Cloud\NetworkManagement\V1\AbortInfo_Cause::class); + diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/AppEngineVersionInfo.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/AppEngineVersionInfo.php new file mode 100644 index 000000000000..070e54ea76de --- /dev/null +++ b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/AppEngineVersionInfo.php @@ -0,0 +1,169 @@ +google.cloud.networkmanagement.v1.AppEngineVersionInfo + */ +class AppEngineVersionInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Name of an App Engine version. + * + * Generated from protobuf field string display_name = 1; + */ + protected $display_name = ''; + /** + * URI of an App Engine version. + * + * Generated from protobuf field string uri = 2; + */ + protected $uri = ''; + /** + * Runtime of the App Engine version. + * + * Generated from protobuf field string runtime = 3; + */ + protected $runtime = ''; + /** + * App Engine execution environment for a version. + * + * Generated from protobuf field string environment = 4; + */ + protected $environment = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $display_name + * Name of an App Engine version. + * @type string $uri + * URI of an App Engine version. + * @type string $runtime + * Runtime of the App Engine version. + * @type string $environment + * App Engine execution environment for a version. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkmanagement\V1\Trace::initOnce(); + parent::__construct($data); + } + + /** + * Name of an App Engine version. + * + * Generated from protobuf field string display_name = 1; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Name of an App Engine version. + * + * Generated from protobuf field string display_name = 1; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * URI of an App Engine version. + * + * Generated from protobuf field string uri = 2; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * URI of an App Engine version. + * + * Generated from protobuf field string uri = 2; + * @param string $var + * @return $this + */ + public function setUri($var) + { + GPBUtil::checkString($var, True); + $this->uri = $var; + + return $this; + } + + /** + * Runtime of the App Engine version. + * + * Generated from protobuf field string runtime = 3; + * @return string + */ + public function getRuntime() + { + return $this->runtime; + } + + /** + * Runtime of the App Engine version. + * + * Generated from protobuf field string runtime = 3; + * @param string $var + * @return $this + */ + public function setRuntime($var) + { + GPBUtil::checkString($var, True); + $this->runtime = $var; + + return $this; + } + + /** + * App Engine execution environment for a version. + * + * Generated from protobuf field string environment = 4; + * @return string + */ + public function getEnvironment() + { + return $this->environment; + } + + /** + * App Engine execution environment for a version. + * + * Generated from protobuf field string environment = 4; + * @param string $var + * @return $this + */ + public function setEnvironment($var) + { + GPBUtil::checkString($var, True); + $this->environment = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/CloudFunctionInfo.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/CloudFunctionInfo.php new file mode 100644 index 000000000000..0706272a11a9 --- /dev/null +++ b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/CloudFunctionInfo.php @@ -0,0 +1,169 @@ +google.cloud.networkmanagement.v1.CloudFunctionInfo + */ +class CloudFunctionInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Name of a Cloud Function. + * + * Generated from protobuf field string display_name = 1; + */ + protected $display_name = ''; + /** + * URI of a Cloud Function. + * + * Generated from protobuf field string uri = 2; + */ + protected $uri = ''; + /** + * Location in which the Cloud Function is deployed. + * + * Generated from protobuf field string location = 3; + */ + protected $location = ''; + /** + * Latest successfully deployed version id of the Cloud Function. + * + * Generated from protobuf field int64 version_id = 4; + */ + protected $version_id = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $display_name + * Name of a Cloud Function. + * @type string $uri + * URI of a Cloud Function. + * @type string $location + * Location in which the Cloud Function is deployed. + * @type int|string $version_id + * Latest successfully deployed version id of the Cloud Function. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkmanagement\V1\Trace::initOnce(); + parent::__construct($data); + } + + /** + * Name of a Cloud Function. + * + * Generated from protobuf field string display_name = 1; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Name of a Cloud Function. + * + * Generated from protobuf field string display_name = 1; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * URI of a Cloud Function. + * + * Generated from protobuf field string uri = 2; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * URI of a Cloud Function. + * + * Generated from protobuf field string uri = 2; + * @param string $var + * @return $this + */ + public function setUri($var) + { + GPBUtil::checkString($var, True); + $this->uri = $var; + + return $this; + } + + /** + * Location in which the Cloud Function is deployed. + * + * Generated from protobuf field string location = 3; + * @return string + */ + public function getLocation() + { + return $this->location; + } + + /** + * Location in which the Cloud Function is deployed. + * + * Generated from protobuf field string location = 3; + * @param string $var + * @return $this + */ + public function setLocation($var) + { + GPBUtil::checkString($var, True); + $this->location = $var; + + return $this; + } + + /** + * Latest successfully deployed version id of the Cloud Function. + * + * Generated from protobuf field int64 version_id = 4; + * @return int|string + */ + public function getVersionId() + { + return $this->version_id; + } + + /** + * Latest successfully deployed version id of the Cloud Function. + * + * Generated from protobuf field int64 version_id = 4; + * @param int|string $var + * @return $this + */ + public function setVersionId($var) + { + GPBUtil::checkInt64($var); + $this->version_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/CloudRunRevisionInfo.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/CloudRunRevisionInfo.php new file mode 100644 index 000000000000..4848d1718d60 --- /dev/null +++ b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/CloudRunRevisionInfo.php @@ -0,0 +1,169 @@ +google.cloud.networkmanagement.v1.CloudRunRevisionInfo + */ +class CloudRunRevisionInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Name of a Cloud Run revision. + * + * Generated from protobuf field string display_name = 1; + */ + protected $display_name = ''; + /** + * URI of a Cloud Run revision. + * + * Generated from protobuf field string uri = 2; + */ + protected $uri = ''; + /** + * Location in which this revision is deployed. + * + * Generated from protobuf field string location = 4; + */ + protected $location = ''; + /** + * URI of Cloud Run service this revision belongs to. + * + * Generated from protobuf field string service_uri = 5; + */ + protected $service_uri = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $display_name + * Name of a Cloud Run revision. + * @type string $uri + * URI of a Cloud Run revision. + * @type string $location + * Location in which this revision is deployed. + * @type string $service_uri + * URI of Cloud Run service this revision belongs to. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkmanagement\V1\Trace::initOnce(); + parent::__construct($data); + } + + /** + * Name of a Cloud Run revision. + * + * Generated from protobuf field string display_name = 1; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Name of a Cloud Run revision. + * + * Generated from protobuf field string display_name = 1; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * URI of a Cloud Run revision. + * + * Generated from protobuf field string uri = 2; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * URI of a Cloud Run revision. + * + * Generated from protobuf field string uri = 2; + * @param string $var + * @return $this + */ + public function setUri($var) + { + GPBUtil::checkString($var, True); + $this->uri = $var; + + return $this; + } + + /** + * Location in which this revision is deployed. + * + * Generated from protobuf field string location = 4; + * @return string + */ + public function getLocation() + { + return $this->location; + } + + /** + * Location in which this revision is deployed. + * + * Generated from protobuf field string location = 4; + * @param string $var + * @return $this + */ + public function setLocation($var) + { + GPBUtil::checkString($var, True); + $this->location = $var; + + return $this; + } + + /** + * URI of Cloud Run service this revision belongs to. + * + * Generated from protobuf field string service_uri = 5; + * @return string + */ + public function getServiceUri() + { + return $this->service_uri; + } + + /** + * URI of Cloud Run service this revision belongs to. + * + * Generated from protobuf field string service_uri = 5; + * @param string $var + * @return $this + */ + public function setServiceUri($var) + { + GPBUtil::checkString($var, True); + $this->service_uri = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/CloudSQLInstanceInfo.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/CloudSQLInstanceInfo.php new file mode 100644 index 000000000000..6dc47236ce8f --- /dev/null +++ b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/CloudSQLInstanceInfo.php @@ -0,0 +1,241 @@ +google.cloud.networkmanagement.v1.CloudSQLInstanceInfo + */ +class CloudSQLInstanceInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Name of a Cloud SQL instance. + * + * Generated from protobuf field string display_name = 1; + */ + protected $display_name = ''; + /** + * URI of a Cloud SQL instance. + * + * Generated from protobuf field string uri = 2; + */ + protected $uri = ''; + /** + * URI of a Cloud SQL instance network or empty string if the instance does + * not have one. + * + * Generated from protobuf field string network_uri = 4; + */ + protected $network_uri = ''; + /** + * Internal IP address of a Cloud SQL instance. + * + * Generated from protobuf field string internal_ip = 5; + */ + protected $internal_ip = ''; + /** + * External IP address of a Cloud SQL instance. + * + * Generated from protobuf field string external_ip = 6; + */ + protected $external_ip = ''; + /** + * Region in which the Cloud SQL instance is running. + * + * Generated from protobuf field string region = 7; + */ + protected $region = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $display_name + * Name of a Cloud SQL instance. + * @type string $uri + * URI of a Cloud SQL instance. + * @type string $network_uri + * URI of a Cloud SQL instance network or empty string if the instance does + * not have one. + * @type string $internal_ip + * Internal IP address of a Cloud SQL instance. + * @type string $external_ip + * External IP address of a Cloud SQL instance. + * @type string $region + * Region in which the Cloud SQL instance is running. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkmanagement\V1\Trace::initOnce(); + parent::__construct($data); + } + + /** + * Name of a Cloud SQL instance. + * + * Generated from protobuf field string display_name = 1; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Name of a Cloud SQL instance. + * + * Generated from protobuf field string display_name = 1; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * URI of a Cloud SQL instance. + * + * Generated from protobuf field string uri = 2; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * URI of a Cloud SQL instance. + * + * Generated from protobuf field string uri = 2; + * @param string $var + * @return $this + */ + public function setUri($var) + { + GPBUtil::checkString($var, True); + $this->uri = $var; + + return $this; + } + + /** + * URI of a Cloud SQL instance network or empty string if the instance does + * not have one. + * + * Generated from protobuf field string network_uri = 4; + * @return string + */ + public function getNetworkUri() + { + return $this->network_uri; + } + + /** + * URI of a Cloud SQL instance network or empty string if the instance does + * not have one. + * + * Generated from protobuf field string network_uri = 4; + * @param string $var + * @return $this + */ + public function setNetworkUri($var) + { + GPBUtil::checkString($var, True); + $this->network_uri = $var; + + return $this; + } + + /** + * Internal IP address of a Cloud SQL instance. + * + * Generated from protobuf field string internal_ip = 5; + * @return string + */ + public function getInternalIp() + { + return $this->internal_ip; + } + + /** + * Internal IP address of a Cloud SQL instance. + * + * Generated from protobuf field string internal_ip = 5; + * @param string $var + * @return $this + */ + public function setInternalIp($var) + { + GPBUtil::checkString($var, True); + $this->internal_ip = $var; + + return $this; + } + + /** + * External IP address of a Cloud SQL instance. + * + * Generated from protobuf field string external_ip = 6; + * @return string + */ + public function getExternalIp() + { + return $this->external_ip; + } + + /** + * External IP address of a Cloud SQL instance. + * + * Generated from protobuf field string external_ip = 6; + * @param string $var + * @return $this + */ + public function setExternalIp($var) + { + GPBUtil::checkString($var, True); + $this->external_ip = $var; + + return $this; + } + + /** + * Region in which the Cloud SQL instance is running. + * + * Generated from protobuf field string region = 7; + * @return string + */ + public function getRegion() + { + return $this->region; + } + + /** + * Region in which the Cloud SQL instance is running. + * + * Generated from protobuf field string region = 7; + * @param string $var + * @return $this + */ + public function setRegion($var) + { + GPBUtil::checkString($var, True); + $this->region = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ConnectivityTest.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ConnectivityTest.php new file mode 100644 index 000000000000..9885cd7ca58e --- /dev/null +++ b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ConnectivityTest.php @@ -0,0 +1,781 @@ +google.cloud.networkmanagement.v1.ConnectivityTest + */ +class ConnectivityTest extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. Unique name of the resource using the form: + * `projects/{project_id}/locations/global/connectivityTests/{test_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * The user-supplied description of the Connectivity Test. + * Maximum of 512 characters. + * + * Generated from protobuf field string description = 2; + */ + protected $description = ''; + /** + * Required. Source specification of the Connectivity Test. + * You can use a combination of source IP address, virtual machine + * (VM) instance, or Compute Engine network to uniquely identify + * the source location. + * Examples: + * If the source IP address is an internal IP address within a Google Cloud + * Virtual Private Cloud (VPC) network, then you must also specify the VPC + * network. Otherwise, specify the VM instance, which already contains its + * internal IP address and VPC network information. + * If the source of the test is within an on-premises network, then you must + * provide the destination VPC network. + * If the source endpoint is a Compute Engine VM instance with multiple + * network interfaces, the instance itself is not sufficient to identify the + * endpoint. So, you must also specify the source IP address or VPC network. + * A reachability analysis proceeds even if the source location is + * ambiguous. However, the test result may include endpoints that you don't + * intend to test. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.Endpoint source = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $source = null; + /** + * Required. Destination specification of the Connectivity Test. + * You can use a combination of destination IP address, Compute Engine + * VM instance, or VPC network to uniquely identify the destination + * location. + * Even if the destination IP address is not unique, the source IP + * location is unique. Usually, the analysis can infer the destination + * endpoint from route information. + * If the destination you specify is a VM instance and the instance has + * multiple network interfaces, then you must also specify either + * a destination IP address or VPC network to identify the destination + * interface. + * A reachability analysis proceeds even if the destination location is + * ambiguous. However, the result can include endpoints that you don't + * intend to test. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.Endpoint destination = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $destination = null; + /** + * IP Protocol of the test. When not provided, "TCP" is assumed. + * + * Generated from protobuf field string protocol = 5; + */ + protected $protocol = ''; + /** + * Other projects that may be relevant for reachability analysis. + * This is applicable to scenarios where a test can cross project boundaries. + * + * Generated from protobuf field repeated string related_projects = 6; + */ + private $related_projects; + /** + * Output only. The display name of a Connectivity Test. + * + * Generated from protobuf field string display_name = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $display_name = ''; + /** + * Resource labels to represent user-provided metadata. + * + * Generated from protobuf field map labels = 8; + */ + private $labels; + /** + * Output only. The time the test was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The time the test's configuration was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Output only. The reachability details of this test from the latest run. + * The details are updated when creating a new test, updating an + * existing test, or triggering a one-time rerun of an existing test. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.ReachabilityDetails reachability_details = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $reachability_details = null; + /** + * Output only. The probing details of this test from the latest run, present + * for applicable tests only. The details are updated when creating a new + * test, updating an existing test, or triggering a one-time rerun of an + * existing test. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.ProbingDetails probing_details = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $probing_details = null; + /** + * Whether run analysis for the return path from destination to source. + * Default value is false. + * + * Generated from protobuf field bool round_trip = 15; + */ + protected $round_trip = false; + /** + * Output only. The reachability details of this test from the latest run for + * the return path. The details are updated when creating a new test, + * updating an existing test, or triggering a one-time rerun of an existing + * test. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.ReachabilityDetails return_reachability_details = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $return_reachability_details = null; + /** + * Whether the test should skip firewall checking. + * If not provided, we assume false. + * + * Generated from protobuf field bool bypass_firewall_checks = 17; + */ + protected $bypass_firewall_checks = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. Unique name of the resource using the form: + * `projects/{project_id}/locations/global/connectivityTests/{test_id}` + * @type string $description + * The user-supplied description of the Connectivity Test. + * Maximum of 512 characters. + * @type \Google\Cloud\NetworkManagement\V1\Endpoint $source + * Required. Source specification of the Connectivity Test. + * You can use a combination of source IP address, virtual machine + * (VM) instance, or Compute Engine network to uniquely identify + * the source location. + * Examples: + * If the source IP address is an internal IP address within a Google Cloud + * Virtual Private Cloud (VPC) network, then you must also specify the VPC + * network. Otherwise, specify the VM instance, which already contains its + * internal IP address and VPC network information. + * If the source of the test is within an on-premises network, then you must + * provide the destination VPC network. + * If the source endpoint is a Compute Engine VM instance with multiple + * network interfaces, the instance itself is not sufficient to identify the + * endpoint. So, you must also specify the source IP address or VPC network. + * A reachability analysis proceeds even if the source location is + * ambiguous. However, the test result may include endpoints that you don't + * intend to test. + * @type \Google\Cloud\NetworkManagement\V1\Endpoint $destination + * Required. Destination specification of the Connectivity Test. + * You can use a combination of destination IP address, Compute Engine + * VM instance, or VPC network to uniquely identify the destination + * location. + * Even if the destination IP address is not unique, the source IP + * location is unique. Usually, the analysis can infer the destination + * endpoint from route information. + * If the destination you specify is a VM instance and the instance has + * multiple network interfaces, then you must also specify either + * a destination IP address or VPC network to identify the destination + * interface. + * A reachability analysis proceeds even if the destination location is + * ambiguous. However, the result can include endpoints that you don't + * intend to test. + * @type string $protocol + * IP Protocol of the test. When not provided, "TCP" is assumed. + * @type array|\Google\Protobuf\Internal\RepeatedField $related_projects + * Other projects that may be relevant for reachability analysis. + * This is applicable to scenarios where a test can cross project boundaries. + * @type string $display_name + * Output only. The display name of a Connectivity Test. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Resource labels to represent user-provided metadata. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time the test was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The time the test's configuration was updated. + * @type \Google\Cloud\NetworkManagement\V1\ReachabilityDetails $reachability_details + * Output only. The reachability details of this test from the latest run. + * The details are updated when creating a new test, updating an + * existing test, or triggering a one-time rerun of an existing test. + * @type \Google\Cloud\NetworkManagement\V1\ProbingDetails $probing_details + * Output only. The probing details of this test from the latest run, present + * for applicable tests only. The details are updated when creating a new + * test, updating an existing test, or triggering a one-time rerun of an + * existing test. + * @type bool $round_trip + * Whether run analysis for the return path from destination to source. + * Default value is false. + * @type \Google\Cloud\NetworkManagement\V1\ReachabilityDetails $return_reachability_details + * Output only. The reachability details of this test from the latest run for + * the return path. The details are updated when creating a new test, + * updating an existing test, or triggering a one-time rerun of an existing + * test. + * @type bool $bypass_firewall_checks + * Whether the test should skip firewall checking. + * If not provided, we assume false. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkmanagement\V1\ConnectivityTest::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. Unique name of the resource using the form: + * `projects/{project_id}/locations/global/connectivityTests/{test_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. Unique name of the resource using the form: + * `projects/{project_id}/locations/global/connectivityTests/{test_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The user-supplied description of the Connectivity Test. + * Maximum of 512 characters. + * + * Generated from protobuf field string description = 2; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * The user-supplied description of the Connectivity Test. + * Maximum of 512 characters. + * + * Generated from protobuf field string description = 2; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Required. Source specification of the Connectivity Test. + * You can use a combination of source IP address, virtual machine + * (VM) instance, or Compute Engine network to uniquely identify + * the source location. + * Examples: + * If the source IP address is an internal IP address within a Google Cloud + * Virtual Private Cloud (VPC) network, then you must also specify the VPC + * network. Otherwise, specify the VM instance, which already contains its + * internal IP address and VPC network information. + * If the source of the test is within an on-premises network, then you must + * provide the destination VPC network. + * If the source endpoint is a Compute Engine VM instance with multiple + * network interfaces, the instance itself is not sufficient to identify the + * endpoint. So, you must also specify the source IP address or VPC network. + * A reachability analysis proceeds even if the source location is + * ambiguous. However, the test result may include endpoints that you don't + * intend to test. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.Endpoint source = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetworkManagement\V1\Endpoint|null + */ + public function getSource() + { + return $this->source; + } + + public function hasSource() + { + return isset($this->source); + } + + public function clearSource() + { + unset($this->source); + } + + /** + * Required. Source specification of the Connectivity Test. + * You can use a combination of source IP address, virtual machine + * (VM) instance, or Compute Engine network to uniquely identify + * the source location. + * Examples: + * If the source IP address is an internal IP address within a Google Cloud + * Virtual Private Cloud (VPC) network, then you must also specify the VPC + * network. Otherwise, specify the VM instance, which already contains its + * internal IP address and VPC network information. + * If the source of the test is within an on-premises network, then you must + * provide the destination VPC network. + * If the source endpoint is a Compute Engine VM instance with multiple + * network interfaces, the instance itself is not sufficient to identify the + * endpoint. So, you must also specify the source IP address or VPC network. + * A reachability analysis proceeds even if the source location is + * ambiguous. However, the test result may include endpoints that you don't + * intend to test. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.Endpoint source = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetworkManagement\V1\Endpoint $var + * @return $this + */ + public function setSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\Endpoint::class); + $this->source = $var; + + return $this; + } + + /** + * Required. Destination specification of the Connectivity Test. + * You can use a combination of destination IP address, Compute Engine + * VM instance, or VPC network to uniquely identify the destination + * location. + * Even if the destination IP address is not unique, the source IP + * location is unique. Usually, the analysis can infer the destination + * endpoint from route information. + * If the destination you specify is a VM instance and the instance has + * multiple network interfaces, then you must also specify either + * a destination IP address or VPC network to identify the destination + * interface. + * A reachability analysis proceeds even if the destination location is + * ambiguous. However, the result can include endpoints that you don't + * intend to test. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.Endpoint destination = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetworkManagement\V1\Endpoint|null + */ + public function getDestination() + { + return $this->destination; + } + + public function hasDestination() + { + return isset($this->destination); + } + + public function clearDestination() + { + unset($this->destination); + } + + /** + * Required. Destination specification of the Connectivity Test. + * You can use a combination of destination IP address, Compute Engine + * VM instance, or VPC network to uniquely identify the destination + * location. + * Even if the destination IP address is not unique, the source IP + * location is unique. Usually, the analysis can infer the destination + * endpoint from route information. + * If the destination you specify is a VM instance and the instance has + * multiple network interfaces, then you must also specify either + * a destination IP address or VPC network to identify the destination + * interface. + * A reachability analysis proceeds even if the destination location is + * ambiguous. However, the result can include endpoints that you don't + * intend to test. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.Endpoint destination = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetworkManagement\V1\Endpoint $var + * @return $this + */ + public function setDestination($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\Endpoint::class); + $this->destination = $var; + + return $this; + } + + /** + * IP Protocol of the test. When not provided, "TCP" is assumed. + * + * Generated from protobuf field string protocol = 5; + * @return string + */ + public function getProtocol() + { + return $this->protocol; + } + + /** + * IP Protocol of the test. When not provided, "TCP" is assumed. + * + * Generated from protobuf field string protocol = 5; + * @param string $var + * @return $this + */ + public function setProtocol($var) + { + GPBUtil::checkString($var, True); + $this->protocol = $var; + + return $this; + } + + /** + * Other projects that may be relevant for reachability analysis. + * This is applicable to scenarios where a test can cross project boundaries. + * + * Generated from protobuf field repeated string related_projects = 6; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRelatedProjects() + { + return $this->related_projects; + } + + /** + * Other projects that may be relevant for reachability analysis. + * This is applicable to scenarios where a test can cross project boundaries. + * + * Generated from protobuf field repeated string related_projects = 6; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRelatedProjects($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->related_projects = $arr; + + return $this; + } + + /** + * Output only. The display name of a Connectivity Test. + * + * Generated from protobuf field string display_name = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Output only. The display name of a Connectivity Test. + * + * Generated from protobuf field string display_name = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Resource labels to represent user-provided metadata. + * + * Generated from protobuf field map labels = 8; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Resource labels to represent user-provided metadata. + * + * Generated from protobuf field map labels = 8; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Output only. The time the test was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The time the test was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The time the test's configuration was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The time the test's configuration was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Output only. The reachability details of this test from the latest run. + * The details are updated when creating a new test, updating an + * existing test, or triggering a one-time rerun of an existing test. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.ReachabilityDetails reachability_details = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\NetworkManagement\V1\ReachabilityDetails|null + */ + public function getReachabilityDetails() + { + return $this->reachability_details; + } + + public function hasReachabilityDetails() + { + return isset($this->reachability_details); + } + + public function clearReachabilityDetails() + { + unset($this->reachability_details); + } + + /** + * Output only. The reachability details of this test from the latest run. + * The details are updated when creating a new test, updating an + * existing test, or triggering a one-time rerun of an existing test. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.ReachabilityDetails reachability_details = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\NetworkManagement\V1\ReachabilityDetails $var + * @return $this + */ + public function setReachabilityDetails($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\ReachabilityDetails::class); + $this->reachability_details = $var; + + return $this; + } + + /** + * Output only. The probing details of this test from the latest run, present + * for applicable tests only. The details are updated when creating a new + * test, updating an existing test, or triggering a one-time rerun of an + * existing test. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.ProbingDetails probing_details = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\NetworkManagement\V1\ProbingDetails|null + */ + public function getProbingDetails() + { + return $this->probing_details; + } + + public function hasProbingDetails() + { + return isset($this->probing_details); + } + + public function clearProbingDetails() + { + unset($this->probing_details); + } + + /** + * Output only. The probing details of this test from the latest run, present + * for applicable tests only. The details are updated when creating a new + * test, updating an existing test, or triggering a one-time rerun of an + * existing test. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.ProbingDetails probing_details = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\NetworkManagement\V1\ProbingDetails $var + * @return $this + */ + public function setProbingDetails($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\ProbingDetails::class); + $this->probing_details = $var; + + return $this; + } + + /** + * Whether run analysis for the return path from destination to source. + * Default value is false. + * + * Generated from protobuf field bool round_trip = 15; + * @return bool + */ + public function getRoundTrip() + { + return $this->round_trip; + } + + /** + * Whether run analysis for the return path from destination to source. + * Default value is false. + * + * Generated from protobuf field bool round_trip = 15; + * @param bool $var + * @return $this + */ + public function setRoundTrip($var) + { + GPBUtil::checkBool($var); + $this->round_trip = $var; + + return $this; + } + + /** + * Output only. The reachability details of this test from the latest run for + * the return path. The details are updated when creating a new test, + * updating an existing test, or triggering a one-time rerun of an existing + * test. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.ReachabilityDetails return_reachability_details = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\NetworkManagement\V1\ReachabilityDetails|null + */ + public function getReturnReachabilityDetails() + { + return $this->return_reachability_details; + } + + public function hasReturnReachabilityDetails() + { + return isset($this->return_reachability_details); + } + + public function clearReturnReachabilityDetails() + { + unset($this->return_reachability_details); + } + + /** + * Output only. The reachability details of this test from the latest run for + * the return path. The details are updated when creating a new test, + * updating an existing test, or triggering a one-time rerun of an existing + * test. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.ReachabilityDetails return_reachability_details = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\NetworkManagement\V1\ReachabilityDetails $var + * @return $this + */ + public function setReturnReachabilityDetails($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\ReachabilityDetails::class); + $this->return_reachability_details = $var; + + return $this; + } + + /** + * Whether the test should skip firewall checking. + * If not provided, we assume false. + * + * Generated from protobuf field bool bypass_firewall_checks = 17; + * @return bool + */ + public function getBypassFirewallChecks() + { + return $this->bypass_firewall_checks; + } + + /** + * Whether the test should skip firewall checking. + * If not provided, we assume false. + * + * Generated from protobuf field bool bypass_firewall_checks = 17; + * @param bool $var + * @return $this + */ + public function setBypassFirewallChecks($var) + { + GPBUtil::checkBool($var); + $this->bypass_firewall_checks = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/CreateConnectivityTestRequest.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/CreateConnectivityTestRequest.php new file mode 100644 index 000000000000..1fdd275480d8 --- /dev/null +++ b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/CreateConnectivityTestRequest.php @@ -0,0 +1,199 @@ +google.cloud.networkmanagement.v1.CreateConnectivityTestRequest + */ +class CreateConnectivityTestRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource of the Connectivity Test to create: + * `projects/{project_id}/locations/global` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The logical name of the Connectivity Test in your project + * with the following restrictions: + * * Must contain only lowercase letters, numbers, and hyphens. + * * Must start with a letter. + * * Must be between 1-40 characters. + * * Must end with a number or a letter. + * * Must be unique within the customer project + * + * Generated from protobuf field string test_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $test_id = ''; + /** + * Required. A `ConnectivityTest` resource + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.ConnectivityTest resource = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $resource = null; + + /** + * @param string $parent Required. The parent resource of the Connectivity Test to create: + * `projects/{project_id}/locations/global` + * Please see {@see ReachabilityServiceClient::projectName()} for help formatting this field. + * @param string $testId Required. The logical name of the Connectivity Test in your project + * with the following restrictions: + * + * * Must contain only lowercase letters, numbers, and hyphens. + * * Must start with a letter. + * * Must be between 1-40 characters. + * * Must end with a number or a letter. + * * Must be unique within the customer project + * @param \Google\Cloud\NetworkManagement\V1\ConnectivityTest $resource Required. A `ConnectivityTest` resource + * + * @return \Google\Cloud\NetworkManagement\V1\CreateConnectivityTestRequest + * + * @experimental + */ + public static function build(string $parent, string $testId, \Google\Cloud\NetworkManagement\V1\ConnectivityTest $resource): self + { + return (new self()) + ->setParent($parent) + ->setTestId($testId) + ->setResource($resource); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource of the Connectivity Test to create: + * `projects/{project_id}/locations/global` + * @type string $test_id + * Required. The logical name of the Connectivity Test in your project + * with the following restrictions: + * * Must contain only lowercase letters, numbers, and hyphens. + * * Must start with a letter. + * * Must be between 1-40 characters. + * * Must end with a number or a letter. + * * Must be unique within the customer project + * @type \Google\Cloud\NetworkManagement\V1\ConnectivityTest $resource + * Required. A `ConnectivityTest` resource + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkmanagement\V1\Reachability::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource of the Connectivity Test to create: + * `projects/{project_id}/locations/global` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource of the Connectivity Test to create: + * `projects/{project_id}/locations/global` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The logical name of the Connectivity Test in your project + * with the following restrictions: + * * Must contain only lowercase letters, numbers, and hyphens. + * * Must start with a letter. + * * Must be between 1-40 characters. + * * Must end with a number or a letter. + * * Must be unique within the customer project + * + * Generated from protobuf field string test_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getTestId() + { + return $this->test_id; + } + + /** + * Required. The logical name of the Connectivity Test in your project + * with the following restrictions: + * * Must contain only lowercase letters, numbers, and hyphens. + * * Must start with a letter. + * * Must be between 1-40 characters. + * * Must end with a number or a letter. + * * Must be unique within the customer project + * + * Generated from protobuf field string test_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setTestId($var) + { + GPBUtil::checkString($var, True); + $this->test_id = $var; + + return $this; + } + + /** + * Required. A `ConnectivityTest` resource + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.ConnectivityTest resource = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetworkManagement\V1\ConnectivityTest|null + */ + public function getResource() + { + return $this->resource; + } + + public function hasResource() + { + return isset($this->resource); + } + + public function clearResource() + { + unset($this->resource); + } + + /** + * Required. A `ConnectivityTest` resource + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.ConnectivityTest resource = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetworkManagement\V1\ConnectivityTest $var + * @return $this + */ + public function setResource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\ConnectivityTest::class); + $this->resource = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/DeleteConnectivityTestRequest.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/DeleteConnectivityTestRequest.php new file mode 100644 index 000000000000..32c0612f03aa --- /dev/null +++ b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/DeleteConnectivityTestRequest.php @@ -0,0 +1,86 @@ +google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest + */ +class DeleteConnectivityTestRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Connectivity Test resource name using the form: + * `projects/{project_id}/locations/global/connectivityTests/{test_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Connectivity Test resource name using the form: + * `projects/{project_id}/locations/global/connectivityTests/{test_id}` + * Please see {@see ReachabilityServiceClient::connectivityTestName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkManagement\V1\DeleteConnectivityTestRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Connectivity Test resource name using the form: + * `projects/{project_id}/locations/global/connectivityTests/{test_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkmanagement\V1\Reachability::initOnce(); + parent::__construct($data); + } + + /** + * Required. Connectivity Test resource name using the form: + * `projects/{project_id}/locations/global/connectivityTests/{test_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Connectivity Test resource name using the form: + * `projects/{project_id}/locations/global/connectivityTests/{test_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/DeliverInfo.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/DeliverInfo.php new file mode 100644 index 000000000000..c21cb8450cb3 --- /dev/null +++ b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/DeliverInfo.php @@ -0,0 +1,207 @@ +google.cloud.networkmanagement.v1.DeliverInfo + */ +class DeliverInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Target type where the packet is delivered to. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.DeliverInfo.Target target = 1; + */ + protected $target = 0; + /** + * URI of the resource that the packet is delivered to. + * + * Generated from protobuf field string resource_uri = 2; + */ + protected $resource_uri = ''; + /** + * IP address of the target (if applicable). + * + * Generated from protobuf field string ip_address = 3 [(.google.api.field_info) = { + */ + protected $ip_address = ''; + /** + * Name of the Cloud Storage Bucket the packet is delivered to (if + * applicable). + * + * Generated from protobuf field string storage_bucket = 4; + */ + protected $storage_bucket = ''; + /** + * PSC Google API target the packet is delivered to (if applicable). + * + * Generated from protobuf field string psc_google_api_target = 5; + */ + protected $psc_google_api_target = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $target + * Target type where the packet is delivered to. + * @type string $resource_uri + * URI of the resource that the packet is delivered to. + * @type string $ip_address + * IP address of the target (if applicable). + * @type string $storage_bucket + * Name of the Cloud Storage Bucket the packet is delivered to (if + * applicable). + * @type string $psc_google_api_target + * PSC Google API target the packet is delivered to (if applicable). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkmanagement\V1\Trace::initOnce(); + parent::__construct($data); + } + + /** + * Target type where the packet is delivered to. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.DeliverInfo.Target target = 1; + * @return int + */ + public function getTarget() + { + return $this->target; + } + + /** + * Target type where the packet is delivered to. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.DeliverInfo.Target target = 1; + * @param int $var + * @return $this + */ + public function setTarget($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetworkManagement\V1\DeliverInfo\Target::class); + $this->target = $var; + + return $this; + } + + /** + * URI of the resource that the packet is delivered to. + * + * Generated from protobuf field string resource_uri = 2; + * @return string + */ + public function getResourceUri() + { + return $this->resource_uri; + } + + /** + * URI of the resource that the packet is delivered to. + * + * Generated from protobuf field string resource_uri = 2; + * @param string $var + * @return $this + */ + public function setResourceUri($var) + { + GPBUtil::checkString($var, True); + $this->resource_uri = $var; + + return $this; + } + + /** + * IP address of the target (if applicable). + * + * Generated from protobuf field string ip_address = 3 [(.google.api.field_info) = { + * @return string + */ + public function getIpAddress() + { + return $this->ip_address; + } + + /** + * IP address of the target (if applicable). + * + * Generated from protobuf field string ip_address = 3 [(.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setIpAddress($var) + { + GPBUtil::checkString($var, True); + $this->ip_address = $var; + + return $this; + } + + /** + * Name of the Cloud Storage Bucket the packet is delivered to (if + * applicable). + * + * Generated from protobuf field string storage_bucket = 4; + * @return string + */ + public function getStorageBucket() + { + return $this->storage_bucket; + } + + /** + * Name of the Cloud Storage Bucket the packet is delivered to (if + * applicable). + * + * Generated from protobuf field string storage_bucket = 4; + * @param string $var + * @return $this + */ + public function setStorageBucket($var) + { + GPBUtil::checkString($var, True); + $this->storage_bucket = $var; + + return $this; + } + + /** + * PSC Google API target the packet is delivered to (if applicable). + * + * Generated from protobuf field string psc_google_api_target = 5; + * @return string + */ + public function getPscGoogleApiTarget() + { + return $this->psc_google_api_target; + } + + /** + * PSC Google API target the packet is delivered to (if applicable). + * + * Generated from protobuf field string psc_google_api_target = 5; + * @param string $var + * @return $this + */ + public function setPscGoogleApiTarget($var) + { + GPBUtil::checkString($var, True); + $this->psc_google_api_target = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/DeliverInfo/Target.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/DeliverInfo/Target.php new file mode 100644 index 000000000000..4264db7ba3ae --- /dev/null +++ b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/DeliverInfo/Target.php @@ -0,0 +1,172 @@ +google.cloud.networkmanagement.v1.DeliverInfo.Target + */ +class Target +{ + /** + * Target not specified. + * + * Generated from protobuf enum TARGET_UNSPECIFIED = 0; + */ + const TARGET_UNSPECIFIED = 0; + /** + * Target is a Compute Engine instance. + * + * Generated from protobuf enum INSTANCE = 1; + */ + const INSTANCE = 1; + /** + * Target is the internet. + * + * Generated from protobuf enum INTERNET = 2; + */ + const INTERNET = 2; + /** + * Target is a Google API. + * + * Generated from protobuf enum GOOGLE_API = 3; + */ + const GOOGLE_API = 3; + /** + * Target is a Google Kubernetes Engine cluster master. + * + * Generated from protobuf enum GKE_MASTER = 4; + */ + const GKE_MASTER = 4; + /** + * Target is a Cloud SQL instance. + * + * Generated from protobuf enum CLOUD_SQL_INSTANCE = 5; + */ + const CLOUD_SQL_INSTANCE = 5; + /** + * Target is a published service that uses [Private Service + * Connect](https://cloud.google.com/vpc/docs/configure-private-service-connect-services). + * + * Generated from protobuf enum PSC_PUBLISHED_SERVICE = 6; + */ + const PSC_PUBLISHED_SERVICE = 6; + /** + * Target is Google APIs that use [Private Service + * Connect](https://cloud.google.com/vpc/docs/configure-private-service-connect-apis). + * + * Generated from protobuf enum PSC_GOOGLE_API = 7; + */ + const PSC_GOOGLE_API = 7; + /** + * Target is a VPC-SC that uses [Private Service + * Connect](https://cloud.google.com/vpc/docs/configure-private-service-connect-apis). + * + * Generated from protobuf enum PSC_VPC_SC = 8; + */ + const PSC_VPC_SC = 8; + /** + * Target is a serverless network endpoint group. + * + * Generated from protobuf enum SERVERLESS_NEG = 9; + */ + const SERVERLESS_NEG = 9; + /** + * Target is a Cloud Storage bucket. + * + * Generated from protobuf enum STORAGE_BUCKET = 10; + */ + const STORAGE_BUCKET = 10; + /** + * Target is a private network. Used only for return traces. + * + * Generated from protobuf enum PRIVATE_NETWORK = 11; + */ + const PRIVATE_NETWORK = 11; + /** + * Target is a Cloud Function. Used only for return traces. + * + * Generated from protobuf enum CLOUD_FUNCTION = 12; + */ + const CLOUD_FUNCTION = 12; + /** + * Target is a App Engine service version. Used only for return traces. + * + * Generated from protobuf enum APP_ENGINE_VERSION = 13; + */ + const APP_ENGINE_VERSION = 13; + /** + * Target is a Cloud Run revision. Used only for return traces. + * + * Generated from protobuf enum CLOUD_RUN_REVISION = 14; + */ + const CLOUD_RUN_REVISION = 14; + /** + * Target is a Google-managed service. Used only for return traces. + * + * Generated from protobuf enum GOOGLE_MANAGED_SERVICE = 15; + */ + const GOOGLE_MANAGED_SERVICE = 15; + /** + * Target is a Redis Instance. + * + * Generated from protobuf enum REDIS_INSTANCE = 16; + */ + const REDIS_INSTANCE = 16; + /** + * Target is a Redis Cluster. + * + * Generated from protobuf enum REDIS_CLUSTER = 17; + */ + const REDIS_CLUSTER = 17; + + private static $valueToName = [ + self::TARGET_UNSPECIFIED => 'TARGET_UNSPECIFIED', + self::INSTANCE => 'INSTANCE', + self::INTERNET => 'INTERNET', + self::GOOGLE_API => 'GOOGLE_API', + self::GKE_MASTER => 'GKE_MASTER', + self::CLOUD_SQL_INSTANCE => 'CLOUD_SQL_INSTANCE', + self::PSC_PUBLISHED_SERVICE => 'PSC_PUBLISHED_SERVICE', + self::PSC_GOOGLE_API => 'PSC_GOOGLE_API', + self::PSC_VPC_SC => 'PSC_VPC_SC', + self::SERVERLESS_NEG => 'SERVERLESS_NEG', + self::STORAGE_BUCKET => 'STORAGE_BUCKET', + self::PRIVATE_NETWORK => 'PRIVATE_NETWORK', + self::CLOUD_FUNCTION => 'CLOUD_FUNCTION', + self::APP_ENGINE_VERSION => 'APP_ENGINE_VERSION', + self::CLOUD_RUN_REVISION => 'CLOUD_RUN_REVISION', + self::GOOGLE_MANAGED_SERVICE => 'GOOGLE_MANAGED_SERVICE', + self::REDIS_INSTANCE => 'REDIS_INSTANCE', + self::REDIS_CLUSTER => 'REDIS_CLUSTER', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Target::class, \Google\Cloud\NetworkManagement\V1\DeliverInfo_Target::class); + diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/DropInfo.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/DropInfo.php new file mode 100644 index 000000000000..b8cb02168001 --- /dev/null +++ b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/DropInfo.php @@ -0,0 +1,203 @@ +google.cloud.networkmanagement.v1.DropInfo + */ +class DropInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Cause that the packet is dropped. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.DropInfo.Cause cause = 1; + */ + protected $cause = 0; + /** + * URI of the resource that caused the drop. + * + * Generated from protobuf field string resource_uri = 2; + */ + protected $resource_uri = ''; + /** + * Source IP address of the dropped packet (if relevant). + * + * Generated from protobuf field string source_ip = 3; + */ + protected $source_ip = ''; + /** + * Destination IP address of the dropped packet (if relevant). + * + * Generated from protobuf field string destination_ip = 4; + */ + protected $destination_ip = ''; + /** + * Region of the dropped packet (if relevant). + * + * Generated from protobuf field string region = 5; + */ + protected $region = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $cause + * Cause that the packet is dropped. + * @type string $resource_uri + * URI of the resource that caused the drop. + * @type string $source_ip + * Source IP address of the dropped packet (if relevant). + * @type string $destination_ip + * Destination IP address of the dropped packet (if relevant). + * @type string $region + * Region of the dropped packet (if relevant). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkmanagement\V1\Trace::initOnce(); + parent::__construct($data); + } + + /** + * Cause that the packet is dropped. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.DropInfo.Cause cause = 1; + * @return int + */ + public function getCause() + { + return $this->cause; + } + + /** + * Cause that the packet is dropped. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.DropInfo.Cause cause = 1; + * @param int $var + * @return $this + */ + public function setCause($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetworkManagement\V1\DropInfo\Cause::class); + $this->cause = $var; + + return $this; + } + + /** + * URI of the resource that caused the drop. + * + * Generated from protobuf field string resource_uri = 2; + * @return string + */ + public function getResourceUri() + { + return $this->resource_uri; + } + + /** + * URI of the resource that caused the drop. + * + * Generated from protobuf field string resource_uri = 2; + * @param string $var + * @return $this + */ + public function setResourceUri($var) + { + GPBUtil::checkString($var, True); + $this->resource_uri = $var; + + return $this; + } + + /** + * Source IP address of the dropped packet (if relevant). + * + * Generated from protobuf field string source_ip = 3; + * @return string + */ + public function getSourceIp() + { + return $this->source_ip; + } + + /** + * Source IP address of the dropped packet (if relevant). + * + * Generated from protobuf field string source_ip = 3; + * @param string $var + * @return $this + */ + public function setSourceIp($var) + { + GPBUtil::checkString($var, True); + $this->source_ip = $var; + + return $this; + } + + /** + * Destination IP address of the dropped packet (if relevant). + * + * Generated from protobuf field string destination_ip = 4; + * @return string + */ + public function getDestinationIp() + { + return $this->destination_ip; + } + + /** + * Destination IP address of the dropped packet (if relevant). + * + * Generated from protobuf field string destination_ip = 4; + * @param string $var + * @return $this + */ + public function setDestinationIp($var) + { + GPBUtil::checkString($var, True); + $this->destination_ip = $var; + + return $this; + } + + /** + * Region of the dropped packet (if relevant). + * + * Generated from protobuf field string region = 5; + * @return string + */ + public function getRegion() + { + return $this->region; + } + + /** + * Region of the dropped packet (if relevant). + * + * Generated from protobuf field string region = 5; + * @param string $var + * @return $this + */ + public function setRegion($var) + { + GPBUtil::checkString($var, True); + $this->region = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/DropInfo/Cause.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/DropInfo/Cause.php new file mode 100644 index 000000000000..213b40fcbb9a --- /dev/null +++ b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/DropInfo/Cause.php @@ -0,0 +1,711 @@ +google.cloud.networkmanagement.v1.DropInfo.Cause + */ +class Cause +{ + /** + * Cause is unspecified. + * + * Generated from protobuf enum CAUSE_UNSPECIFIED = 0; + */ + const CAUSE_UNSPECIFIED = 0; + /** + * Destination external address cannot be resolved to a known target. If + * the address is used in a Google Cloud project, provide the project ID + * as test input. + * + * Generated from protobuf enum UNKNOWN_EXTERNAL_ADDRESS = 1; + */ + const UNKNOWN_EXTERNAL_ADDRESS = 1; + /** + * A Compute Engine instance can only send or receive a packet with a + * foreign IP address if ip_forward is enabled. + * + * Generated from protobuf enum FOREIGN_IP_DISALLOWED = 2; + */ + const FOREIGN_IP_DISALLOWED = 2; + /** + * Dropped due to a firewall rule, unless allowed due to connection + * tracking. + * + * Generated from protobuf enum FIREWALL_RULE = 3; + */ + const FIREWALL_RULE = 3; + /** + * Dropped due to no matching routes. + * + * Generated from protobuf enum NO_ROUTE = 4; + */ + const NO_ROUTE = 4; + /** + * Dropped due to invalid route. Route's next hop is a blackhole. + * + * Generated from protobuf enum ROUTE_BLACKHOLE = 5; + */ + const ROUTE_BLACKHOLE = 5; + /** + * Packet is sent to a wrong (unintended) network. Example: you trace a + * packet from VM1:Network1 to VM2:Network2, however, the route configured + * in Network1 sends the packet destined for VM2's IP address to Network3. + * + * Generated from protobuf enum ROUTE_WRONG_NETWORK = 6; + */ + const ROUTE_WRONG_NETWORK = 6; + /** + * Route's next hop IP address cannot be resolved to a GCP resource. + * + * Generated from protobuf enum ROUTE_NEXT_HOP_IP_ADDRESS_NOT_RESOLVED = 42; + */ + const ROUTE_NEXT_HOP_IP_ADDRESS_NOT_RESOLVED = 42; + /** + * Route's next hop resource is not found. + * + * Generated from protobuf enum ROUTE_NEXT_HOP_RESOURCE_NOT_FOUND = 43; + */ + const ROUTE_NEXT_HOP_RESOURCE_NOT_FOUND = 43; + /** + * Route's next hop instance doesn't have a NIC in the route's network. + * + * Generated from protobuf enum ROUTE_NEXT_HOP_INSTANCE_WRONG_NETWORK = 49; + */ + const ROUTE_NEXT_HOP_INSTANCE_WRONG_NETWORK = 49; + /** + * Route's next hop IP address is not a primary IP address of the next hop + * instance. + * + * Generated from protobuf enum ROUTE_NEXT_HOP_INSTANCE_NON_PRIMARY_IP = 50; + */ + const ROUTE_NEXT_HOP_INSTANCE_NON_PRIMARY_IP = 50; + /** + * Route's next hop forwarding rule doesn't match next hop IP address. + * + * Generated from protobuf enum ROUTE_NEXT_HOP_FORWARDING_RULE_IP_MISMATCH = 51; + */ + const ROUTE_NEXT_HOP_FORWARDING_RULE_IP_MISMATCH = 51; + /** + * Route's next hop VPN tunnel is down (does not have valid IKE SAs). + * + * Generated from protobuf enum ROUTE_NEXT_HOP_VPN_TUNNEL_NOT_ESTABLISHED = 52; + */ + const ROUTE_NEXT_HOP_VPN_TUNNEL_NOT_ESTABLISHED = 52; + /** + * Route's next hop forwarding rule type is invalid (it's not a forwarding + * rule of the internal passthrough load balancer). + * + * Generated from protobuf enum ROUTE_NEXT_HOP_FORWARDING_RULE_TYPE_INVALID = 53; + */ + const ROUTE_NEXT_HOP_FORWARDING_RULE_TYPE_INVALID = 53; + /** + * Packet is sent from the Internet to the private IPv6 address. + * + * Generated from protobuf enum NO_ROUTE_FROM_INTERNET_TO_PRIVATE_IPV6_ADDRESS = 44; + */ + const NO_ROUTE_FROM_INTERNET_TO_PRIVATE_IPV6_ADDRESS = 44; + /** + * The packet does not match a policy-based VPN tunnel local selector. + * + * Generated from protobuf enum VPN_TUNNEL_LOCAL_SELECTOR_MISMATCH = 45; + */ + const VPN_TUNNEL_LOCAL_SELECTOR_MISMATCH = 45; + /** + * The packet does not match a policy-based VPN tunnel remote selector. + * + * Generated from protobuf enum VPN_TUNNEL_REMOTE_SELECTOR_MISMATCH = 46; + */ + const VPN_TUNNEL_REMOTE_SELECTOR_MISMATCH = 46; + /** + * Packet with internal destination address sent to the internet gateway. + * + * Generated from protobuf enum PRIVATE_TRAFFIC_TO_INTERNET = 7; + */ + const PRIVATE_TRAFFIC_TO_INTERNET = 7; + /** + * Instance with only an internal IP address tries to access Google API and + * services, but private Google access is not enabled in the subnet. + * + * Generated from protobuf enum PRIVATE_GOOGLE_ACCESS_DISALLOWED = 8; + */ + const PRIVATE_GOOGLE_ACCESS_DISALLOWED = 8; + /** + * Source endpoint tries to access Google API and services through the VPN + * tunnel to another network, but Private Google Access needs to be enabled + * in the source endpoint network. + * + * Generated from protobuf enum PRIVATE_GOOGLE_ACCESS_VIA_VPN_TUNNEL_UNSUPPORTED = 47; + */ + const PRIVATE_GOOGLE_ACCESS_VIA_VPN_TUNNEL_UNSUPPORTED = 47; + /** + * Instance with only an internal IP address tries to access external hosts, + * but Cloud NAT is not enabled in the subnet, unless special configurations + * on a VM allow this connection. + * + * Generated from protobuf enum NO_EXTERNAL_ADDRESS = 9; + */ + const NO_EXTERNAL_ADDRESS = 9; + /** + * Destination internal address cannot be resolved to a known target. If + * this is a shared VPC scenario, verify if the service project ID is + * provided as test input. Otherwise, verify if the IP address is being + * used in the project. + * + * Generated from protobuf enum UNKNOWN_INTERNAL_ADDRESS = 10; + */ + const UNKNOWN_INTERNAL_ADDRESS = 10; + /** + * Forwarding rule's protocol and ports do not match the packet header. + * + * Generated from protobuf enum FORWARDING_RULE_MISMATCH = 11; + */ + const FORWARDING_RULE_MISMATCH = 11; + /** + * Forwarding rule does not have backends configured. + * + * Generated from protobuf enum FORWARDING_RULE_NO_INSTANCES = 12; + */ + const FORWARDING_RULE_NO_INSTANCES = 12; + /** + * Firewalls block the health check probes to the backends and cause + * the backends to be unavailable for traffic from the load balancer. + * For more details, see [Health check firewall + * rules](https://cloud.google.com/load-balancing/docs/health-checks#firewall_rules). + * + * Generated from protobuf enum FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK = 13; + */ + const FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK = 13; + /** + * Packet is sent from or to a Compute Engine instance that is not in a + * running state. + * + * Generated from protobuf enum INSTANCE_NOT_RUNNING = 14; + */ + const INSTANCE_NOT_RUNNING = 14; + /** + * Packet sent from or to a GKE cluster that is not in running state. + * + * Generated from protobuf enum GKE_CLUSTER_NOT_RUNNING = 27; + */ + const GKE_CLUSTER_NOT_RUNNING = 27; + /** + * Packet sent from or to a Cloud SQL instance that is not in running state. + * + * Generated from protobuf enum CLOUD_SQL_INSTANCE_NOT_RUNNING = 28; + */ + const CLOUD_SQL_INSTANCE_NOT_RUNNING = 28; + /** + * Packet sent from or to a Redis Instance that is not in running state. + * + * Generated from protobuf enum REDIS_INSTANCE_NOT_RUNNING = 68; + */ + const REDIS_INSTANCE_NOT_RUNNING = 68; + /** + * Packet sent from or to a Redis Cluster that is not in running state. + * + * Generated from protobuf enum REDIS_CLUSTER_NOT_RUNNING = 69; + */ + const REDIS_CLUSTER_NOT_RUNNING = 69; + /** + * The type of traffic is blocked and the user cannot configure a firewall + * rule to enable it. See [Always blocked + * traffic](https://cloud.google.com/vpc/docs/firewalls#blockedtraffic) for + * more details. + * + * Generated from protobuf enum TRAFFIC_TYPE_BLOCKED = 15; + */ + const TRAFFIC_TYPE_BLOCKED = 15; + /** + * Access to Google Kubernetes Engine cluster master's endpoint is not + * authorized. See [Access to the cluster + * endpoints](https://cloud.google.com/kubernetes-engine/docs/how-to/private-clusters#access_to_the_cluster_endpoints) + * for more details. + * + * Generated from protobuf enum GKE_MASTER_UNAUTHORIZED_ACCESS = 16; + */ + const GKE_MASTER_UNAUTHORIZED_ACCESS = 16; + /** + * Access to the Cloud SQL instance endpoint is not authorized. + * See [Authorizing with authorized + * networks](https://cloud.google.com/sql/docs/mysql/authorize-networks) for + * more details. + * + * Generated from protobuf enum CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS = 17; + */ + const CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS = 17; + /** + * Packet was dropped inside Google Kubernetes Engine Service. + * + * Generated from protobuf enum DROPPED_INSIDE_GKE_SERVICE = 18; + */ + const DROPPED_INSIDE_GKE_SERVICE = 18; + /** + * Packet was dropped inside Cloud SQL Service. + * + * Generated from protobuf enum DROPPED_INSIDE_CLOUD_SQL_SERVICE = 19; + */ + const DROPPED_INSIDE_CLOUD_SQL_SERVICE = 19; + /** + * Packet was dropped because there is no peering between the originating + * network and the Google Managed Services Network. + * + * Generated from protobuf enum GOOGLE_MANAGED_SERVICE_NO_PEERING = 20; + */ + const GOOGLE_MANAGED_SERVICE_NO_PEERING = 20; + /** + * Packet was dropped because the Google-managed service uses Private + * Service Connect (PSC), but the PSC endpoint is not found in the project. + * + * Generated from protobuf enum GOOGLE_MANAGED_SERVICE_NO_PSC_ENDPOINT = 38; + */ + const GOOGLE_MANAGED_SERVICE_NO_PSC_ENDPOINT = 38; + /** + * Packet was dropped because the GKE cluster uses Private Service Connect + * (PSC), but the PSC endpoint is not found in the project. + * + * Generated from protobuf enum GKE_PSC_ENDPOINT_MISSING = 36; + */ + const GKE_PSC_ENDPOINT_MISSING = 36; + /** + * Packet was dropped because the Cloud SQL instance has neither a private + * nor a public IP address. + * + * Generated from protobuf enum CLOUD_SQL_INSTANCE_NO_IP_ADDRESS = 21; + */ + const CLOUD_SQL_INSTANCE_NO_IP_ADDRESS = 21; + /** + * Packet was dropped because a GKE cluster private endpoint is + * unreachable from a region different from the cluster's region. + * + * Generated from protobuf enum GKE_CONTROL_PLANE_REGION_MISMATCH = 30; + */ + const GKE_CONTROL_PLANE_REGION_MISMATCH = 30; + /** + * Packet sent from a public GKE cluster control plane to a private + * IP address. + * + * Generated from protobuf enum PUBLIC_GKE_CONTROL_PLANE_TO_PRIVATE_DESTINATION = 31; + */ + const PUBLIC_GKE_CONTROL_PLANE_TO_PRIVATE_DESTINATION = 31; + /** + * Packet was dropped because there is no route from a GKE cluster + * control plane to a destination network. + * + * Generated from protobuf enum GKE_CONTROL_PLANE_NO_ROUTE = 32; + */ + const GKE_CONTROL_PLANE_NO_ROUTE = 32; + /** + * Packet sent from a Cloud SQL instance to an external IP address is not + * allowed. The Cloud SQL instance is not configured to send packets to + * external IP addresses. + * + * Generated from protobuf enum CLOUD_SQL_INSTANCE_NOT_CONFIGURED_FOR_EXTERNAL_TRAFFIC = 33; + */ + const CLOUD_SQL_INSTANCE_NOT_CONFIGURED_FOR_EXTERNAL_TRAFFIC = 33; + /** + * Packet sent from a Cloud SQL instance with only a public IP address to a + * private IP address. + * + * Generated from protobuf enum PUBLIC_CLOUD_SQL_INSTANCE_TO_PRIVATE_DESTINATION = 34; + */ + const PUBLIC_CLOUD_SQL_INSTANCE_TO_PRIVATE_DESTINATION = 34; + /** + * Packet was dropped because there is no route from a Cloud SQL + * instance to a destination network. + * + * Generated from protobuf enum CLOUD_SQL_INSTANCE_NO_ROUTE = 35; + */ + const CLOUD_SQL_INSTANCE_NO_ROUTE = 35; + /** + * Packet was dropped because the Cloud SQL instance requires all + * connections to use Cloud SQL connectors and to target the Cloud SQL proxy + * port (3307). + * + * Generated from protobuf enum CLOUD_SQL_CONNECTOR_REQUIRED = 63; + */ + const CLOUD_SQL_CONNECTOR_REQUIRED = 63; + /** + * Packet could be dropped because the Cloud Function is not in an active + * status. + * + * Generated from protobuf enum CLOUD_FUNCTION_NOT_ACTIVE = 22; + */ + const CLOUD_FUNCTION_NOT_ACTIVE = 22; + /** + * Packet could be dropped because no VPC connector is set. + * + * Generated from protobuf enum VPC_CONNECTOR_NOT_SET = 23; + */ + const VPC_CONNECTOR_NOT_SET = 23; + /** + * Packet could be dropped because the VPC connector is not in a running + * state. + * + * Generated from protobuf enum VPC_CONNECTOR_NOT_RUNNING = 24; + */ + const VPC_CONNECTOR_NOT_RUNNING = 24; + /** + * Packet could be dropped because the traffic from the serverless service + * to the VPC connector is not allowed. + * + * Generated from protobuf enum VPC_CONNECTOR_SERVERLESS_TRAFFIC_BLOCKED = 60; + */ + const VPC_CONNECTOR_SERVERLESS_TRAFFIC_BLOCKED = 60; + /** + * Packet could be dropped because the health check traffic to the VPC + * connector is not allowed. + * + * Generated from protobuf enum VPC_CONNECTOR_HEALTH_CHECK_TRAFFIC_BLOCKED = 61; + */ + const VPC_CONNECTOR_HEALTH_CHECK_TRAFFIC_BLOCKED = 61; + /** + * Packet could be dropped because it was sent from a different region + * to a regional forwarding without global access. + * + * Generated from protobuf enum FORWARDING_RULE_REGION_MISMATCH = 25; + */ + const FORWARDING_RULE_REGION_MISMATCH = 25; + /** + * The Private Service Connect endpoint is in a project that is not approved + * to connect to the service. + * + * Generated from protobuf enum PSC_CONNECTION_NOT_ACCEPTED = 26; + */ + const PSC_CONNECTION_NOT_ACCEPTED = 26; + /** + * The packet is sent to the Private Service Connect endpoint over the + * peering, but [it's not + * supported](https://cloud.google.com/vpc/docs/configure-private-service-connect-services#on-premises). + * + * Generated from protobuf enum PSC_ENDPOINT_ACCESSED_FROM_PEERED_NETWORK = 41; + */ + const PSC_ENDPOINT_ACCESSED_FROM_PEERED_NETWORK = 41; + /** + * The packet is sent to the Private Service Connect backend (network + * endpoint group), but the producer PSC forwarding rule does not have + * global access enabled. + * + * Generated from protobuf enum PSC_NEG_PRODUCER_ENDPOINT_NO_GLOBAL_ACCESS = 48; + */ + const PSC_NEG_PRODUCER_ENDPOINT_NO_GLOBAL_ACCESS = 48; + /** + * The packet is sent to the Private Service Connect backend (network + * endpoint group), but the producer PSC forwarding rule has multiple ports + * specified. + * + * Generated from protobuf enum PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS = 54; + */ + const PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS = 54; + /** + * The packet is sent to the Private Service Connect backend (network + * endpoint group) targeting a Cloud SQL service attachment, but this + * configuration is not supported. + * + * Generated from protobuf enum CLOUD_SQL_PSC_NEG_UNSUPPORTED = 58; + */ + const CLOUD_SQL_PSC_NEG_UNSUPPORTED = 58; + /** + * No NAT subnets are defined for the PSC service attachment. + * + * Generated from protobuf enum NO_NAT_SUBNETS_FOR_PSC_SERVICE_ATTACHMENT = 57; + */ + const NO_NAT_SUBNETS_FOR_PSC_SERVICE_ATTACHMENT = 57; + /** + * PSC endpoint is accessed via NCC, but PSC transitivity configuration is + * not yet propagated. + * + * Generated from protobuf enum PSC_TRANSITIVITY_NOT_PROPAGATED = 64; + */ + const PSC_TRANSITIVITY_NOT_PROPAGATED = 64; + /** + * The packet sent from the hybrid NEG proxy matches a non-dynamic route, + * but such a configuration is not supported. + * + * Generated from protobuf enum HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED = 55; + */ + const HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED = 55; + /** + * The packet sent from the hybrid NEG proxy matches a dynamic route with a + * next hop in a different region, but such a configuration is not + * supported. + * + * Generated from protobuf enum HYBRID_NEG_NON_LOCAL_DYNAMIC_ROUTE_MATCHED = 56; + */ + const HYBRID_NEG_NON_LOCAL_DYNAMIC_ROUTE_MATCHED = 56; + /** + * Packet sent from a Cloud Run revision that is not ready. + * + * Generated from protobuf enum CLOUD_RUN_REVISION_NOT_READY = 29; + */ + const CLOUD_RUN_REVISION_NOT_READY = 29; + /** + * Packet was dropped inside Private Service Connect service producer. + * + * Generated from protobuf enum DROPPED_INSIDE_PSC_SERVICE_PRODUCER = 37; + */ + const DROPPED_INSIDE_PSC_SERVICE_PRODUCER = 37; + /** + * Packet sent to a load balancer, which requires a proxy-only subnet and + * the subnet is not found. + * + * Generated from protobuf enum LOAD_BALANCER_HAS_NO_PROXY_SUBNET = 39; + */ + const LOAD_BALANCER_HAS_NO_PROXY_SUBNET = 39; + /** + * Packet sent to Cloud Nat without active NAT IPs. + * + * Generated from protobuf enum CLOUD_NAT_NO_ADDRESSES = 40; + */ + const CLOUD_NAT_NO_ADDRESSES = 40; + /** + * Packet is stuck in a routing loop. + * + * Generated from protobuf enum ROUTING_LOOP = 59; + */ + const ROUTING_LOOP = 59; + /** + * Packet is dropped inside a Google-managed service due to being delivered + * in return trace to an endpoint that doesn't match the endpoint the packet + * was sent from in forward trace. Used only for return traces. + * + * Generated from protobuf enum DROPPED_INSIDE_GOOGLE_MANAGED_SERVICE = 62; + */ + const DROPPED_INSIDE_GOOGLE_MANAGED_SERVICE = 62; + /** + * Packet is dropped due to a load balancer backend instance not having a + * network interface in the network expected by the load balancer. + * + * Generated from protobuf enum LOAD_BALANCER_BACKEND_INVALID_NETWORK = 65; + */ + const LOAD_BALANCER_BACKEND_INVALID_NETWORK = 65; + /** + * Packet is dropped due to a backend service named port not being defined + * on the instance group level. + * + * Generated from protobuf enum BACKEND_SERVICE_NAMED_PORT_NOT_DEFINED = 66; + */ + const BACKEND_SERVICE_NAMED_PORT_NOT_DEFINED = 66; + /** + * Packet is dropped due to a destination IP range being part of a Private + * NAT IP range. + * + * Generated from protobuf enum DESTINATION_IS_PRIVATE_NAT_IP_RANGE = 67; + */ + const DESTINATION_IS_PRIVATE_NAT_IP_RANGE = 67; + /** + * Generic drop cause for a packet being dropped inside a Redis Instance + * service project. + * + * Generated from protobuf enum DROPPED_INSIDE_REDIS_INSTANCE_SERVICE = 70; + */ + const DROPPED_INSIDE_REDIS_INSTANCE_SERVICE = 70; + /** + * Packet is dropped due to an unsupported port being used to connect to a + * Redis Instance. Port 6379 should be used to connect to a Redis Instance. + * + * Generated from protobuf enum REDIS_INSTANCE_UNSUPPORTED_PORT = 71; + */ + const REDIS_INSTANCE_UNSUPPORTED_PORT = 71; + /** + * Packet is dropped due to connecting from PUPI address to a PSA based + * Redis Instance. + * + * Generated from protobuf enum REDIS_INSTANCE_CONNECTING_FROM_PUPI_ADDRESS = 72; + */ + const REDIS_INSTANCE_CONNECTING_FROM_PUPI_ADDRESS = 72; + /** + * Packet is dropped due to no route to the destination network. + * + * Generated from protobuf enum REDIS_INSTANCE_NO_ROUTE_TO_DESTINATION_NETWORK = 73; + */ + const REDIS_INSTANCE_NO_ROUTE_TO_DESTINATION_NETWORK = 73; + /** + * Redis Instance does not have an external IP address. + * + * Generated from protobuf enum REDIS_INSTANCE_NO_EXTERNAL_IP = 74; + */ + const REDIS_INSTANCE_NO_EXTERNAL_IP = 74; + /** + * Packet is dropped due to an unsupported protocol being used to connect to + * a Redis Instance. Only TCP connections are accepted by a Redis Instance. + * + * Generated from protobuf enum REDIS_INSTANCE_UNSUPPORTED_PROTOCOL = 78; + */ + const REDIS_INSTANCE_UNSUPPORTED_PROTOCOL = 78; + /** + * Generic drop cause for a packet being dropped inside a Redis Cluster + * service project. + * + * Generated from protobuf enum DROPPED_INSIDE_REDIS_CLUSTER_SERVICE = 75; + */ + const DROPPED_INSIDE_REDIS_CLUSTER_SERVICE = 75; + /** + * Packet is dropped due to an unsupported port being used to connect to a + * Redis Cluster. Ports 6379 and 11000 to 13047 should be used to connect to + * a Redis Cluster. + * + * Generated from protobuf enum REDIS_CLUSTER_UNSUPPORTED_PORT = 76; + */ + const REDIS_CLUSTER_UNSUPPORTED_PORT = 76; + /** + * Redis Cluster does not have an external IP address. + * + * Generated from protobuf enum REDIS_CLUSTER_NO_EXTERNAL_IP = 77; + */ + const REDIS_CLUSTER_NO_EXTERNAL_IP = 77; + /** + * Packet is dropped due to an unsupported protocol being used to connect to + * a Redis Cluster. Only TCP connections are accepted by a Redis Cluster. + * + * Generated from protobuf enum REDIS_CLUSTER_UNSUPPORTED_PROTOCOL = 79; + */ + const REDIS_CLUSTER_UNSUPPORTED_PROTOCOL = 79; + /** + * Packet from the non-GCP (on-prem) or unknown GCP network is dropped due + * to the destination IP address not belonging to any IP prefix advertised + * via BGP by the Cloud Router. + * + * Generated from protobuf enum NO_ADVERTISED_ROUTE_TO_GCP_DESTINATION = 80; + */ + const NO_ADVERTISED_ROUTE_TO_GCP_DESTINATION = 80; + /** + * Packet from the non-GCP (on-prem) or unknown GCP network is dropped due + * to the destination IP address not belonging to any IP prefix included to + * the local traffic selector of the VPN tunnel. + * + * Generated from protobuf enum NO_TRAFFIC_SELECTOR_TO_GCP_DESTINATION = 81; + */ + const NO_TRAFFIC_SELECTOR_TO_GCP_DESTINATION = 81; + /** + * Packet from the unknown peered network is dropped due to no known route + * from the source network to the destination IP address. + * + * Generated from protobuf enum NO_KNOWN_ROUTE_FROM_PEERED_NETWORK_TO_DESTINATION = 82; + */ + const NO_KNOWN_ROUTE_FROM_PEERED_NETWORK_TO_DESTINATION = 82; + /** + * Sending packets processed by the Private NAT Gateways to the Private + * Service Connect endpoints is not supported. + * + * Generated from protobuf enum PRIVATE_NAT_TO_PSC_ENDPOINT_UNSUPPORTED = 83; + */ + const PRIVATE_NAT_TO_PSC_ENDPOINT_UNSUPPORTED = 83; + + private static $valueToName = [ + self::CAUSE_UNSPECIFIED => 'CAUSE_UNSPECIFIED', + self::UNKNOWN_EXTERNAL_ADDRESS => 'UNKNOWN_EXTERNAL_ADDRESS', + self::FOREIGN_IP_DISALLOWED => 'FOREIGN_IP_DISALLOWED', + self::FIREWALL_RULE => 'FIREWALL_RULE', + self::NO_ROUTE => 'NO_ROUTE', + self::ROUTE_BLACKHOLE => 'ROUTE_BLACKHOLE', + self::ROUTE_WRONG_NETWORK => 'ROUTE_WRONG_NETWORK', + self::ROUTE_NEXT_HOP_IP_ADDRESS_NOT_RESOLVED => 'ROUTE_NEXT_HOP_IP_ADDRESS_NOT_RESOLVED', + self::ROUTE_NEXT_HOP_RESOURCE_NOT_FOUND => 'ROUTE_NEXT_HOP_RESOURCE_NOT_FOUND', + self::ROUTE_NEXT_HOP_INSTANCE_WRONG_NETWORK => 'ROUTE_NEXT_HOP_INSTANCE_WRONG_NETWORK', + self::ROUTE_NEXT_HOP_INSTANCE_NON_PRIMARY_IP => 'ROUTE_NEXT_HOP_INSTANCE_NON_PRIMARY_IP', + self::ROUTE_NEXT_HOP_FORWARDING_RULE_IP_MISMATCH => 'ROUTE_NEXT_HOP_FORWARDING_RULE_IP_MISMATCH', + self::ROUTE_NEXT_HOP_VPN_TUNNEL_NOT_ESTABLISHED => 'ROUTE_NEXT_HOP_VPN_TUNNEL_NOT_ESTABLISHED', + self::ROUTE_NEXT_HOP_FORWARDING_RULE_TYPE_INVALID => 'ROUTE_NEXT_HOP_FORWARDING_RULE_TYPE_INVALID', + self::NO_ROUTE_FROM_INTERNET_TO_PRIVATE_IPV6_ADDRESS => 'NO_ROUTE_FROM_INTERNET_TO_PRIVATE_IPV6_ADDRESS', + self::VPN_TUNNEL_LOCAL_SELECTOR_MISMATCH => 'VPN_TUNNEL_LOCAL_SELECTOR_MISMATCH', + self::VPN_TUNNEL_REMOTE_SELECTOR_MISMATCH => 'VPN_TUNNEL_REMOTE_SELECTOR_MISMATCH', + self::PRIVATE_TRAFFIC_TO_INTERNET => 'PRIVATE_TRAFFIC_TO_INTERNET', + self::PRIVATE_GOOGLE_ACCESS_DISALLOWED => 'PRIVATE_GOOGLE_ACCESS_DISALLOWED', + self::PRIVATE_GOOGLE_ACCESS_VIA_VPN_TUNNEL_UNSUPPORTED => 'PRIVATE_GOOGLE_ACCESS_VIA_VPN_TUNNEL_UNSUPPORTED', + self::NO_EXTERNAL_ADDRESS => 'NO_EXTERNAL_ADDRESS', + self::UNKNOWN_INTERNAL_ADDRESS => 'UNKNOWN_INTERNAL_ADDRESS', + self::FORWARDING_RULE_MISMATCH => 'FORWARDING_RULE_MISMATCH', + self::FORWARDING_RULE_NO_INSTANCES => 'FORWARDING_RULE_NO_INSTANCES', + self::FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK => 'FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK', + self::INSTANCE_NOT_RUNNING => 'INSTANCE_NOT_RUNNING', + self::GKE_CLUSTER_NOT_RUNNING => 'GKE_CLUSTER_NOT_RUNNING', + self::CLOUD_SQL_INSTANCE_NOT_RUNNING => 'CLOUD_SQL_INSTANCE_NOT_RUNNING', + self::REDIS_INSTANCE_NOT_RUNNING => 'REDIS_INSTANCE_NOT_RUNNING', + self::REDIS_CLUSTER_NOT_RUNNING => 'REDIS_CLUSTER_NOT_RUNNING', + self::TRAFFIC_TYPE_BLOCKED => 'TRAFFIC_TYPE_BLOCKED', + self::GKE_MASTER_UNAUTHORIZED_ACCESS => 'GKE_MASTER_UNAUTHORIZED_ACCESS', + self::CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS => 'CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS', + self::DROPPED_INSIDE_GKE_SERVICE => 'DROPPED_INSIDE_GKE_SERVICE', + self::DROPPED_INSIDE_CLOUD_SQL_SERVICE => 'DROPPED_INSIDE_CLOUD_SQL_SERVICE', + self::GOOGLE_MANAGED_SERVICE_NO_PEERING => 'GOOGLE_MANAGED_SERVICE_NO_PEERING', + self::GOOGLE_MANAGED_SERVICE_NO_PSC_ENDPOINT => 'GOOGLE_MANAGED_SERVICE_NO_PSC_ENDPOINT', + self::GKE_PSC_ENDPOINT_MISSING => 'GKE_PSC_ENDPOINT_MISSING', + self::CLOUD_SQL_INSTANCE_NO_IP_ADDRESS => 'CLOUD_SQL_INSTANCE_NO_IP_ADDRESS', + self::GKE_CONTROL_PLANE_REGION_MISMATCH => 'GKE_CONTROL_PLANE_REGION_MISMATCH', + self::PUBLIC_GKE_CONTROL_PLANE_TO_PRIVATE_DESTINATION => 'PUBLIC_GKE_CONTROL_PLANE_TO_PRIVATE_DESTINATION', + self::GKE_CONTROL_PLANE_NO_ROUTE => 'GKE_CONTROL_PLANE_NO_ROUTE', + self::CLOUD_SQL_INSTANCE_NOT_CONFIGURED_FOR_EXTERNAL_TRAFFIC => 'CLOUD_SQL_INSTANCE_NOT_CONFIGURED_FOR_EXTERNAL_TRAFFIC', + self::PUBLIC_CLOUD_SQL_INSTANCE_TO_PRIVATE_DESTINATION => 'PUBLIC_CLOUD_SQL_INSTANCE_TO_PRIVATE_DESTINATION', + self::CLOUD_SQL_INSTANCE_NO_ROUTE => 'CLOUD_SQL_INSTANCE_NO_ROUTE', + self::CLOUD_SQL_CONNECTOR_REQUIRED => 'CLOUD_SQL_CONNECTOR_REQUIRED', + self::CLOUD_FUNCTION_NOT_ACTIVE => 'CLOUD_FUNCTION_NOT_ACTIVE', + self::VPC_CONNECTOR_NOT_SET => 'VPC_CONNECTOR_NOT_SET', + self::VPC_CONNECTOR_NOT_RUNNING => 'VPC_CONNECTOR_NOT_RUNNING', + self::VPC_CONNECTOR_SERVERLESS_TRAFFIC_BLOCKED => 'VPC_CONNECTOR_SERVERLESS_TRAFFIC_BLOCKED', + self::VPC_CONNECTOR_HEALTH_CHECK_TRAFFIC_BLOCKED => 'VPC_CONNECTOR_HEALTH_CHECK_TRAFFIC_BLOCKED', + self::FORWARDING_RULE_REGION_MISMATCH => 'FORWARDING_RULE_REGION_MISMATCH', + self::PSC_CONNECTION_NOT_ACCEPTED => 'PSC_CONNECTION_NOT_ACCEPTED', + self::PSC_ENDPOINT_ACCESSED_FROM_PEERED_NETWORK => 'PSC_ENDPOINT_ACCESSED_FROM_PEERED_NETWORK', + self::PSC_NEG_PRODUCER_ENDPOINT_NO_GLOBAL_ACCESS => 'PSC_NEG_PRODUCER_ENDPOINT_NO_GLOBAL_ACCESS', + self::PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS => 'PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS', + self::CLOUD_SQL_PSC_NEG_UNSUPPORTED => 'CLOUD_SQL_PSC_NEG_UNSUPPORTED', + self::NO_NAT_SUBNETS_FOR_PSC_SERVICE_ATTACHMENT => 'NO_NAT_SUBNETS_FOR_PSC_SERVICE_ATTACHMENT', + self::PSC_TRANSITIVITY_NOT_PROPAGATED => 'PSC_TRANSITIVITY_NOT_PROPAGATED', + self::HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED => 'HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED', + self::HYBRID_NEG_NON_LOCAL_DYNAMIC_ROUTE_MATCHED => 'HYBRID_NEG_NON_LOCAL_DYNAMIC_ROUTE_MATCHED', + self::CLOUD_RUN_REVISION_NOT_READY => 'CLOUD_RUN_REVISION_NOT_READY', + self::DROPPED_INSIDE_PSC_SERVICE_PRODUCER => 'DROPPED_INSIDE_PSC_SERVICE_PRODUCER', + self::LOAD_BALANCER_HAS_NO_PROXY_SUBNET => 'LOAD_BALANCER_HAS_NO_PROXY_SUBNET', + self::CLOUD_NAT_NO_ADDRESSES => 'CLOUD_NAT_NO_ADDRESSES', + self::ROUTING_LOOP => 'ROUTING_LOOP', + self::DROPPED_INSIDE_GOOGLE_MANAGED_SERVICE => 'DROPPED_INSIDE_GOOGLE_MANAGED_SERVICE', + self::LOAD_BALANCER_BACKEND_INVALID_NETWORK => 'LOAD_BALANCER_BACKEND_INVALID_NETWORK', + self::BACKEND_SERVICE_NAMED_PORT_NOT_DEFINED => 'BACKEND_SERVICE_NAMED_PORT_NOT_DEFINED', + self::DESTINATION_IS_PRIVATE_NAT_IP_RANGE => 'DESTINATION_IS_PRIVATE_NAT_IP_RANGE', + self::DROPPED_INSIDE_REDIS_INSTANCE_SERVICE => 'DROPPED_INSIDE_REDIS_INSTANCE_SERVICE', + self::REDIS_INSTANCE_UNSUPPORTED_PORT => 'REDIS_INSTANCE_UNSUPPORTED_PORT', + self::REDIS_INSTANCE_CONNECTING_FROM_PUPI_ADDRESS => 'REDIS_INSTANCE_CONNECTING_FROM_PUPI_ADDRESS', + self::REDIS_INSTANCE_NO_ROUTE_TO_DESTINATION_NETWORK => 'REDIS_INSTANCE_NO_ROUTE_TO_DESTINATION_NETWORK', + self::REDIS_INSTANCE_NO_EXTERNAL_IP => 'REDIS_INSTANCE_NO_EXTERNAL_IP', + self::REDIS_INSTANCE_UNSUPPORTED_PROTOCOL => 'REDIS_INSTANCE_UNSUPPORTED_PROTOCOL', + self::DROPPED_INSIDE_REDIS_CLUSTER_SERVICE => 'DROPPED_INSIDE_REDIS_CLUSTER_SERVICE', + self::REDIS_CLUSTER_UNSUPPORTED_PORT => 'REDIS_CLUSTER_UNSUPPORTED_PORT', + self::REDIS_CLUSTER_NO_EXTERNAL_IP => 'REDIS_CLUSTER_NO_EXTERNAL_IP', + self::REDIS_CLUSTER_UNSUPPORTED_PROTOCOL => 'REDIS_CLUSTER_UNSUPPORTED_PROTOCOL', + self::NO_ADVERTISED_ROUTE_TO_GCP_DESTINATION => 'NO_ADVERTISED_ROUTE_TO_GCP_DESTINATION', + self::NO_TRAFFIC_SELECTOR_TO_GCP_DESTINATION => 'NO_TRAFFIC_SELECTOR_TO_GCP_DESTINATION', + self::NO_KNOWN_ROUTE_FROM_PEERED_NETWORK_TO_DESTINATION => 'NO_KNOWN_ROUTE_FROM_PEERED_NETWORK_TO_DESTINATION', + self::PRIVATE_NAT_TO_PSC_ENDPOINT_UNSUPPORTED => 'PRIVATE_NAT_TO_PSC_ENDPOINT_UNSUPPORTED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Cause::class, \Google\Cloud\NetworkManagement\V1\DropInfo_Cause::class); + diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Endpoint.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Endpoint.php new file mode 100644 index 000000000000..eea02063830d --- /dev/null +++ b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Endpoint.php @@ -0,0 +1,805 @@ +google.cloud.networkmanagement.v1.Endpoint + */ +class Endpoint extends \Google\Protobuf\Internal\Message +{ + /** + * The IP address of the endpoint, which can be an external or internal IP. + * + * Generated from protobuf field string ip_address = 1; + */ + protected $ip_address = ''; + /** + * The IP protocol port of the endpoint. + * Only applicable when protocol is TCP or UDP. + * + * Generated from protobuf field int32 port = 2; + */ + protected $port = 0; + /** + * A Compute Engine instance URI. + * + * Generated from protobuf field string instance = 3; + */ + protected $instance = ''; + /** + * A forwarding rule and its corresponding IP address represent the frontend + * configuration of a Google Cloud load balancer. Forwarding rules are also + * used for protocol forwarding, Private Service Connect and other network + * services to provide forwarding information in the control plane. Format: + * projects/{project}/global/forwardingRules/{id} or + * projects/{project}/regions/{region}/forwardingRules/{id} + * + * Generated from protobuf field string forwarding_rule = 13; + */ + protected $forwarding_rule = ''; + /** + * Output only. Specifies the type of the target of the forwarding rule. + * + * Generated from protobuf field optional .google.cloud.networkmanagement.v1.Endpoint.ForwardingRuleTarget forwarding_rule_target = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $forwarding_rule_target = null; + /** + * Output only. ID of the load balancer the forwarding rule points to. Empty + * for forwarding rules not related to load balancers. + * + * Generated from protobuf field optional string load_balancer_id = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $load_balancer_id = null; + /** + * Output only. Type of the load balancer the forwarding rule points to. + * + * Generated from protobuf field optional .google.cloud.networkmanagement.v1.LoadBalancerType load_balancer_type = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $load_balancer_type = null; + /** + * A cluster URI for [Google Kubernetes Engine cluster control + * plane](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture). + * + * Generated from protobuf field string gke_master_cluster = 7; + */ + protected $gke_master_cluster = ''; + /** + * DNS endpoint of [Google Kubernetes Engine cluster control + * plane](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture). + * Requires gke_master_cluster to be set, can't be used simultaneoulsly with + * ip_address or network. Applicable only to destination endpoint. + * + * Generated from protobuf field string fqdn = 19; + */ + protected $fqdn = ''; + /** + * A [Cloud SQL](https://cloud.google.com/sql) instance URI. + * + * Generated from protobuf field string cloud_sql_instance = 8; + */ + protected $cloud_sql_instance = ''; + /** + * A [Redis Instance](https://cloud.google.com/memorystore/docs/redis) + * URI. + * + * Generated from protobuf field string redis_instance = 17; + */ + protected $redis_instance = ''; + /** + * A [Redis Cluster](https://cloud.google.com/memorystore/docs/cluster) + * URI. + * + * Generated from protobuf field string redis_cluster = 18; + */ + protected $redis_cluster = ''; + /** + * A [Cloud Function](https://cloud.google.com/functions). + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint cloud_function = 10; + */ + protected $cloud_function = null; + /** + * An [App Engine](https://cloud.google.com/appengine) [service + * version](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions). + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint app_engine_version = 11; + */ + protected $app_engine_version = null; + /** + * A [Cloud Run](https://cloud.google.com/run) + * [revision](https://cloud.google.com/run/docs/reference/rest/v1/namespaces.revisions/get) + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint cloud_run_revision = 12; + */ + protected $cloud_run_revision = null; + /** + * A Compute Engine network URI. + * + * Generated from protobuf field string network = 4; + */ + protected $network = ''; + /** + * Type of the network where the endpoint is located. + * Applicable only to source endpoint, as destination network type can be + * inferred from the source. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.Endpoint.NetworkType network_type = 5; + */ + protected $network_type = 0; + /** + * Project ID where the endpoint is located. + * The Project ID can be derived from the URI if you provide a VM instance or + * network URI. + * The following are two cases where you must provide the project ID: + * 1. Only the IP address is specified, and the IP address is within a Google + * Cloud project. + * 2. When you are using Shared VPC and the IP address that you provide is + * from the service project. In this case, the network that the IP address + * resides in is defined in the host project. + * + * Generated from protobuf field string project_id = 6; + */ + protected $project_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $ip_address + * The IP address of the endpoint, which can be an external or internal IP. + * @type int $port + * The IP protocol port of the endpoint. + * Only applicable when protocol is TCP or UDP. + * @type string $instance + * A Compute Engine instance URI. + * @type string $forwarding_rule + * A forwarding rule and its corresponding IP address represent the frontend + * configuration of a Google Cloud load balancer. Forwarding rules are also + * used for protocol forwarding, Private Service Connect and other network + * services to provide forwarding information in the control plane. Format: + * projects/{project}/global/forwardingRules/{id} or + * projects/{project}/regions/{region}/forwardingRules/{id} + * @type int $forwarding_rule_target + * Output only. Specifies the type of the target of the forwarding rule. + * @type string $load_balancer_id + * Output only. ID of the load balancer the forwarding rule points to. Empty + * for forwarding rules not related to load balancers. + * @type int $load_balancer_type + * Output only. Type of the load balancer the forwarding rule points to. + * @type string $gke_master_cluster + * A cluster URI for [Google Kubernetes Engine cluster control + * plane](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture). + * @type string $fqdn + * DNS endpoint of [Google Kubernetes Engine cluster control + * plane](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture). + * Requires gke_master_cluster to be set, can't be used simultaneoulsly with + * ip_address or network. Applicable only to destination endpoint. + * @type string $cloud_sql_instance + * A [Cloud SQL](https://cloud.google.com/sql) instance URI. + * @type string $redis_instance + * A [Redis Instance](https://cloud.google.com/memorystore/docs/redis) + * URI. + * @type string $redis_cluster + * A [Redis Cluster](https://cloud.google.com/memorystore/docs/cluster) + * URI. + * @type \Google\Cloud\NetworkManagement\V1\Endpoint\CloudFunctionEndpoint $cloud_function + * A [Cloud Function](https://cloud.google.com/functions). + * @type \Google\Cloud\NetworkManagement\V1\Endpoint\AppEngineVersionEndpoint $app_engine_version + * An [App Engine](https://cloud.google.com/appengine) [service + * version](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions). + * @type \Google\Cloud\NetworkManagement\V1\Endpoint\CloudRunRevisionEndpoint $cloud_run_revision + * A [Cloud Run](https://cloud.google.com/run) + * [revision](https://cloud.google.com/run/docs/reference/rest/v1/namespaces.revisions/get) + * @type string $network + * A Compute Engine network URI. + * @type int $network_type + * Type of the network where the endpoint is located. + * Applicable only to source endpoint, as destination network type can be + * inferred from the source. + * @type string $project_id + * Project ID where the endpoint is located. + * The Project ID can be derived from the URI if you provide a VM instance or + * network URI. + * The following are two cases where you must provide the project ID: + * 1. Only the IP address is specified, and the IP address is within a Google + * Cloud project. + * 2. When you are using Shared VPC and the IP address that you provide is + * from the service project. In this case, the network that the IP address + * resides in is defined in the host project. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkmanagement\V1\ConnectivityTest::initOnce(); + parent::__construct($data); + } + + /** + * The IP address of the endpoint, which can be an external or internal IP. + * + * Generated from protobuf field string ip_address = 1; + * @return string + */ + public function getIpAddress() + { + return $this->ip_address; + } + + /** + * The IP address of the endpoint, which can be an external or internal IP. + * + * Generated from protobuf field string ip_address = 1; + * @param string $var + * @return $this + */ + public function setIpAddress($var) + { + GPBUtil::checkString($var, True); + $this->ip_address = $var; + + return $this; + } + + /** + * The IP protocol port of the endpoint. + * Only applicable when protocol is TCP or UDP. + * + * Generated from protobuf field int32 port = 2; + * @return int + */ + public function getPort() + { + return $this->port; + } + + /** + * The IP protocol port of the endpoint. + * Only applicable when protocol is TCP or UDP. + * + * Generated from protobuf field int32 port = 2; + * @param int $var + * @return $this + */ + public function setPort($var) + { + GPBUtil::checkInt32($var); + $this->port = $var; + + return $this; + } + + /** + * A Compute Engine instance URI. + * + * Generated from protobuf field string instance = 3; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * A Compute Engine instance URI. + * + * Generated from protobuf field string instance = 3; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * A forwarding rule and its corresponding IP address represent the frontend + * configuration of a Google Cloud load balancer. Forwarding rules are also + * used for protocol forwarding, Private Service Connect and other network + * services to provide forwarding information in the control plane. Format: + * projects/{project}/global/forwardingRules/{id} or + * projects/{project}/regions/{region}/forwardingRules/{id} + * + * Generated from protobuf field string forwarding_rule = 13; + * @return string + */ + public function getForwardingRule() + { + return $this->forwarding_rule; + } + + /** + * A forwarding rule and its corresponding IP address represent the frontend + * configuration of a Google Cloud load balancer. Forwarding rules are also + * used for protocol forwarding, Private Service Connect and other network + * services to provide forwarding information in the control plane. Format: + * projects/{project}/global/forwardingRules/{id} or + * projects/{project}/regions/{region}/forwardingRules/{id} + * + * Generated from protobuf field string forwarding_rule = 13; + * @param string $var + * @return $this + */ + public function setForwardingRule($var) + { + GPBUtil::checkString($var, True); + $this->forwarding_rule = $var; + + return $this; + } + + /** + * Output only. Specifies the type of the target of the forwarding rule. + * + * Generated from protobuf field optional .google.cloud.networkmanagement.v1.Endpoint.ForwardingRuleTarget forwarding_rule_target = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getForwardingRuleTarget() + { + return isset($this->forwarding_rule_target) ? $this->forwarding_rule_target : 0; + } + + public function hasForwardingRuleTarget() + { + return isset($this->forwarding_rule_target); + } + + public function clearForwardingRuleTarget() + { + unset($this->forwarding_rule_target); + } + + /** + * Output only. Specifies the type of the target of the forwarding rule. + * + * Generated from protobuf field optional .google.cloud.networkmanagement.v1.Endpoint.ForwardingRuleTarget forwarding_rule_target = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setForwardingRuleTarget($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetworkManagement\V1\Endpoint\ForwardingRuleTarget::class); + $this->forwarding_rule_target = $var; + + return $this; + } + + /** + * Output only. ID of the load balancer the forwarding rule points to. Empty + * for forwarding rules not related to load balancers. + * + * Generated from protobuf field optional string load_balancer_id = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getLoadBalancerId() + { + return isset($this->load_balancer_id) ? $this->load_balancer_id : ''; + } + + public function hasLoadBalancerId() + { + return isset($this->load_balancer_id); + } + + public function clearLoadBalancerId() + { + unset($this->load_balancer_id); + } + + /** + * Output only. ID of the load balancer the forwarding rule points to. Empty + * for forwarding rules not related to load balancers. + * + * Generated from protobuf field optional string load_balancer_id = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setLoadBalancerId($var) + { + GPBUtil::checkString($var, True); + $this->load_balancer_id = $var; + + return $this; + } + + /** + * Output only. Type of the load balancer the forwarding rule points to. + * + * Generated from protobuf field optional .google.cloud.networkmanagement.v1.LoadBalancerType load_balancer_type = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getLoadBalancerType() + { + return isset($this->load_balancer_type) ? $this->load_balancer_type : 0; + } + + public function hasLoadBalancerType() + { + return isset($this->load_balancer_type); + } + + public function clearLoadBalancerType() + { + unset($this->load_balancer_type); + } + + /** + * Output only. Type of the load balancer the forwarding rule points to. + * + * Generated from protobuf field optional .google.cloud.networkmanagement.v1.LoadBalancerType load_balancer_type = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setLoadBalancerType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetworkManagement\V1\LoadBalancerType::class); + $this->load_balancer_type = $var; + + return $this; + } + + /** + * A cluster URI for [Google Kubernetes Engine cluster control + * plane](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture). + * + * Generated from protobuf field string gke_master_cluster = 7; + * @return string + */ + public function getGkeMasterCluster() + { + return $this->gke_master_cluster; + } + + /** + * A cluster URI for [Google Kubernetes Engine cluster control + * plane](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture). + * + * Generated from protobuf field string gke_master_cluster = 7; + * @param string $var + * @return $this + */ + public function setGkeMasterCluster($var) + { + GPBUtil::checkString($var, True); + $this->gke_master_cluster = $var; + + return $this; + } + + /** + * DNS endpoint of [Google Kubernetes Engine cluster control + * plane](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture). + * Requires gke_master_cluster to be set, can't be used simultaneoulsly with + * ip_address or network. Applicable only to destination endpoint. + * + * Generated from protobuf field string fqdn = 19; + * @return string + */ + public function getFqdn() + { + return $this->fqdn; + } + + /** + * DNS endpoint of [Google Kubernetes Engine cluster control + * plane](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture). + * Requires gke_master_cluster to be set, can't be used simultaneoulsly with + * ip_address or network. Applicable only to destination endpoint. + * + * Generated from protobuf field string fqdn = 19; + * @param string $var + * @return $this + */ + public function setFqdn($var) + { + GPBUtil::checkString($var, True); + $this->fqdn = $var; + + return $this; + } + + /** + * A [Cloud SQL](https://cloud.google.com/sql) instance URI. + * + * Generated from protobuf field string cloud_sql_instance = 8; + * @return string + */ + public function getCloudSqlInstance() + { + return $this->cloud_sql_instance; + } + + /** + * A [Cloud SQL](https://cloud.google.com/sql) instance URI. + * + * Generated from protobuf field string cloud_sql_instance = 8; + * @param string $var + * @return $this + */ + public function setCloudSqlInstance($var) + { + GPBUtil::checkString($var, True); + $this->cloud_sql_instance = $var; + + return $this; + } + + /** + * A [Redis Instance](https://cloud.google.com/memorystore/docs/redis) + * URI. + * + * Generated from protobuf field string redis_instance = 17; + * @return string + */ + public function getRedisInstance() + { + return $this->redis_instance; + } + + /** + * A [Redis Instance](https://cloud.google.com/memorystore/docs/redis) + * URI. + * + * Generated from protobuf field string redis_instance = 17; + * @param string $var + * @return $this + */ + public function setRedisInstance($var) + { + GPBUtil::checkString($var, True); + $this->redis_instance = $var; + + return $this; + } + + /** + * A [Redis Cluster](https://cloud.google.com/memorystore/docs/cluster) + * URI. + * + * Generated from protobuf field string redis_cluster = 18; + * @return string + */ + public function getRedisCluster() + { + return $this->redis_cluster; + } + + /** + * A [Redis Cluster](https://cloud.google.com/memorystore/docs/cluster) + * URI. + * + * Generated from protobuf field string redis_cluster = 18; + * @param string $var + * @return $this + */ + public function setRedisCluster($var) + { + GPBUtil::checkString($var, True); + $this->redis_cluster = $var; + + return $this; + } + + /** + * A [Cloud Function](https://cloud.google.com/functions). + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint cloud_function = 10; + * @return \Google\Cloud\NetworkManagement\V1\Endpoint\CloudFunctionEndpoint|null + */ + public function getCloudFunction() + { + return $this->cloud_function; + } + + public function hasCloudFunction() + { + return isset($this->cloud_function); + } + + public function clearCloudFunction() + { + unset($this->cloud_function); + } + + /** + * A [Cloud Function](https://cloud.google.com/functions). + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint cloud_function = 10; + * @param \Google\Cloud\NetworkManagement\V1\Endpoint\CloudFunctionEndpoint $var + * @return $this + */ + public function setCloudFunction($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\Endpoint\CloudFunctionEndpoint::class); + $this->cloud_function = $var; + + return $this; + } + + /** + * An [App Engine](https://cloud.google.com/appengine) [service + * version](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions). + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint app_engine_version = 11; + * @return \Google\Cloud\NetworkManagement\V1\Endpoint\AppEngineVersionEndpoint|null + */ + public function getAppEngineVersion() + { + return $this->app_engine_version; + } + + public function hasAppEngineVersion() + { + return isset($this->app_engine_version); + } + + public function clearAppEngineVersion() + { + unset($this->app_engine_version); + } + + /** + * An [App Engine](https://cloud.google.com/appengine) [service + * version](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions). + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint app_engine_version = 11; + * @param \Google\Cloud\NetworkManagement\V1\Endpoint\AppEngineVersionEndpoint $var + * @return $this + */ + public function setAppEngineVersion($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\Endpoint\AppEngineVersionEndpoint::class); + $this->app_engine_version = $var; + + return $this; + } + + /** + * A [Cloud Run](https://cloud.google.com/run) + * [revision](https://cloud.google.com/run/docs/reference/rest/v1/namespaces.revisions/get) + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint cloud_run_revision = 12; + * @return \Google\Cloud\NetworkManagement\V1\Endpoint\CloudRunRevisionEndpoint|null + */ + public function getCloudRunRevision() + { + return $this->cloud_run_revision; + } + + public function hasCloudRunRevision() + { + return isset($this->cloud_run_revision); + } + + public function clearCloudRunRevision() + { + unset($this->cloud_run_revision); + } + + /** + * A [Cloud Run](https://cloud.google.com/run) + * [revision](https://cloud.google.com/run/docs/reference/rest/v1/namespaces.revisions/get) + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint cloud_run_revision = 12; + * @param \Google\Cloud\NetworkManagement\V1\Endpoint\CloudRunRevisionEndpoint $var + * @return $this + */ + public function setCloudRunRevision($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\Endpoint\CloudRunRevisionEndpoint::class); + $this->cloud_run_revision = $var; + + return $this; + } + + /** + * A Compute Engine network URI. + * + * Generated from protobuf field string network = 4; + * @return string + */ + public function getNetwork() + { + return $this->network; + } + + /** + * A Compute Engine network URI. + * + * Generated from protobuf field string network = 4; + * @param string $var + * @return $this + */ + public function setNetwork($var) + { + GPBUtil::checkString($var, True); + $this->network = $var; + + return $this; + } + + /** + * Type of the network where the endpoint is located. + * Applicable only to source endpoint, as destination network type can be + * inferred from the source. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.Endpoint.NetworkType network_type = 5; + * @return int + */ + public function getNetworkType() + { + return $this->network_type; + } + + /** + * Type of the network where the endpoint is located. + * Applicable only to source endpoint, as destination network type can be + * inferred from the source. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.Endpoint.NetworkType network_type = 5; + * @param int $var + * @return $this + */ + public function setNetworkType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetworkManagement\V1\Endpoint\NetworkType::class); + $this->network_type = $var; + + return $this; + } + + /** + * Project ID where the endpoint is located. + * The Project ID can be derived from the URI if you provide a VM instance or + * network URI. + * The following are two cases where you must provide the project ID: + * 1. Only the IP address is specified, and the IP address is within a Google + * Cloud project. + * 2. When you are using Shared VPC and the IP address that you provide is + * from the service project. In this case, the network that the IP address + * resides in is defined in the host project. + * + * Generated from protobuf field string project_id = 6; + * @return string + */ + public function getProjectId() + { + return $this->project_id; + } + + /** + * Project ID where the endpoint is located. + * The Project ID can be derived from the URI if you provide a VM instance or + * network URI. + * The following are two cases where you must provide the project ID: + * 1. Only the IP address is specified, and the IP address is within a Google + * Cloud project. + * 2. When you are using Shared VPC and the IP address that you provide is + * from the service project. In this case, the network that the IP address + * resides in is defined in the host project. + * + * Generated from protobuf field string project_id = 6; + * @param string $var + * @return $this + */ + public function setProjectId($var) + { + GPBUtil::checkString($var, True); + $this->project_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Endpoint/AppEngineVersionEndpoint.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Endpoint/AppEngineVersionEndpoint.php new file mode 100644 index 000000000000..00601e729f56 --- /dev/null +++ b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Endpoint/AppEngineVersionEndpoint.php @@ -0,0 +1,78 @@ +google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint + */ +class AppEngineVersionEndpoint extends \Google\Protobuf\Internal\Message +{ + /** + * An [App Engine](https://cloud.google.com/appengine) [service + * version](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions) + * name. + * + * Generated from protobuf field string uri = 1; + */ + protected $uri = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $uri + * An [App Engine](https://cloud.google.com/appengine) [service + * version](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions) + * name. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkmanagement\V1\ConnectivityTest::initOnce(); + parent::__construct($data); + } + + /** + * An [App Engine](https://cloud.google.com/appengine) [service + * version](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions) + * name. + * + * Generated from protobuf field string uri = 1; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * An [App Engine](https://cloud.google.com/appengine) [service + * version](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions) + * name. + * + * Generated from protobuf field string uri = 1; + * @param string $var + * @return $this + */ + public function setUri($var) + { + GPBUtil::checkString($var, True); + $this->uri = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(AppEngineVersionEndpoint::class, \Google\Cloud\NetworkManagement\V1\Endpoint_AppEngineVersionEndpoint::class); + diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Endpoint/CloudFunctionEndpoint.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Endpoint/CloudFunctionEndpoint.php new file mode 100644 index 000000000000..dfc3b0f413a5 --- /dev/null +++ b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Endpoint/CloudFunctionEndpoint.php @@ -0,0 +1,70 @@ +google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint + */ +class CloudFunctionEndpoint extends \Google\Protobuf\Internal\Message +{ + /** + * A [Cloud Function](https://cloud.google.com/functions) name. + * + * Generated from protobuf field string uri = 1; + */ + protected $uri = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $uri + * A [Cloud Function](https://cloud.google.com/functions) name. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkmanagement\V1\ConnectivityTest::initOnce(); + parent::__construct($data); + } + + /** + * A [Cloud Function](https://cloud.google.com/functions) name. + * + * Generated from protobuf field string uri = 1; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * A [Cloud Function](https://cloud.google.com/functions) name. + * + * Generated from protobuf field string uri = 1; + * @param string $var + * @return $this + */ + public function setUri($var) + { + GPBUtil::checkString($var, True); + $this->uri = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(CloudFunctionEndpoint::class, \Google\Cloud\NetworkManagement\V1\Endpoint_CloudFunctionEndpoint::class); + diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Endpoint/CloudRunRevisionEndpoint.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Endpoint/CloudRunRevisionEndpoint.php new file mode 100644 index 000000000000..4b4c40adef9c --- /dev/null +++ b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Endpoint/CloudRunRevisionEndpoint.php @@ -0,0 +1,82 @@ +google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint + */ +class CloudRunRevisionEndpoint extends \Google\Protobuf\Internal\Message +{ + /** + * A [Cloud Run](https://cloud.google.com/run) + * [revision](https://cloud.google.com/run/docs/reference/rest/v1/namespaces.revisions/get) + * URI. The format is: + * projects/{project}/locations/{location}/revisions/{revision} + * + * Generated from protobuf field string uri = 1; + */ + protected $uri = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $uri + * A [Cloud Run](https://cloud.google.com/run) + * [revision](https://cloud.google.com/run/docs/reference/rest/v1/namespaces.revisions/get) + * URI. The format is: + * projects/{project}/locations/{location}/revisions/{revision} + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkmanagement\V1\ConnectivityTest::initOnce(); + parent::__construct($data); + } + + /** + * A [Cloud Run](https://cloud.google.com/run) + * [revision](https://cloud.google.com/run/docs/reference/rest/v1/namespaces.revisions/get) + * URI. The format is: + * projects/{project}/locations/{location}/revisions/{revision} + * + * Generated from protobuf field string uri = 1; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * A [Cloud Run](https://cloud.google.com/run) + * [revision](https://cloud.google.com/run/docs/reference/rest/v1/namespaces.revisions/get) + * URI. The format is: + * projects/{project}/locations/{location}/revisions/{revision} + * + * Generated from protobuf field string uri = 1; + * @param string $var + * @return $this + */ + public function setUri($var) + { + GPBUtil::checkString($var, True); + $this->uri = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(CloudRunRevisionEndpoint::class, \Google\Cloud\NetworkManagement\V1\Endpoint_CloudRunRevisionEndpoint::class); + diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Endpoint/ForwardingRuleTarget.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Endpoint/ForwardingRuleTarget.php new file mode 100644 index 000000000000..7f8ffa54e280 --- /dev/null +++ b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Endpoint/ForwardingRuleTarget.php @@ -0,0 +1,79 @@ +google.cloud.networkmanagement.v1.Endpoint.ForwardingRuleTarget + */ +class ForwardingRuleTarget +{ + /** + * Forwarding rule target is unknown. + * + * Generated from protobuf enum FORWARDING_RULE_TARGET_UNSPECIFIED = 0; + */ + const FORWARDING_RULE_TARGET_UNSPECIFIED = 0; + /** + * Compute Engine instance for protocol forwarding. + * + * Generated from protobuf enum INSTANCE = 1; + */ + const INSTANCE = 1; + /** + * Load Balancer. The specific type can be found from [load_balancer_type] + * [google.cloud.networkmanagement.v1.Endpoint.load_balancer_type]. + * + * Generated from protobuf enum LOAD_BALANCER = 2; + */ + const LOAD_BALANCER = 2; + /** + * Classic Cloud VPN Gateway. + * + * Generated from protobuf enum VPN_GATEWAY = 3; + */ + const VPN_GATEWAY = 3; + /** + * Forwarding Rule is a Private Service Connect endpoint. + * + * Generated from protobuf enum PSC = 4; + */ + const PSC = 4; + + private static $valueToName = [ + self::FORWARDING_RULE_TARGET_UNSPECIFIED => 'FORWARDING_RULE_TARGET_UNSPECIFIED', + self::INSTANCE => 'INSTANCE', + self::LOAD_BALANCER => 'LOAD_BALANCER', + self::VPN_GATEWAY => 'VPN_GATEWAY', + self::PSC => 'PSC', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ForwardingRuleTarget::class, \Google\Cloud\NetworkManagement\V1\Endpoint_ForwardingRuleTarget::class); + diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Endpoint/NetworkType.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Endpoint/NetworkType.php new file mode 100644 index 000000000000..cdd595a94e5e --- /dev/null +++ b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Endpoint/NetworkType.php @@ -0,0 +1,69 @@ +google.cloud.networkmanagement.v1.Endpoint.NetworkType + */ +class NetworkType +{ + /** + * Default type if unspecified. + * + * Generated from protobuf enum NETWORK_TYPE_UNSPECIFIED = 0; + */ + const NETWORK_TYPE_UNSPECIFIED = 0; + /** + * A network hosted within Google Cloud. + * To receive more detailed output, specify the URI for the source or + * destination network. + * + * Generated from protobuf enum GCP_NETWORK = 1; + */ + const GCP_NETWORK = 1; + /** + * A network hosted outside of Google Cloud. + * This can be an on-premises network, or a network hosted by another cloud + * provider. + * + * Generated from protobuf enum NON_GCP_NETWORK = 2; + */ + const NON_GCP_NETWORK = 2; + + private static $valueToName = [ + self::NETWORK_TYPE_UNSPECIFIED => 'NETWORK_TYPE_UNSPECIFIED', + self::GCP_NETWORK => 'GCP_NETWORK', + self::NON_GCP_NETWORK => 'NON_GCP_NETWORK', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(NetworkType::class, \Google\Cloud\NetworkManagement\V1\Endpoint_NetworkType::class); + diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/EndpointInfo.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/EndpointInfo.php new file mode 100644 index 000000000000..d87bc1cea5b2 --- /dev/null +++ b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/EndpointInfo.php @@ -0,0 +1,307 @@ +google.cloud.networkmanagement.v1.EndpointInfo + */ +class EndpointInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Source IP address. + * + * Generated from protobuf field string source_ip = 1; + */ + protected $source_ip = ''; + /** + * Destination IP address. + * + * Generated from protobuf field string destination_ip = 2; + */ + protected $destination_ip = ''; + /** + * IP protocol in string format, for example: "TCP", "UDP", "ICMP". + * + * Generated from protobuf field string protocol = 3; + */ + protected $protocol = ''; + /** + * Source port. Only valid when protocol is TCP or UDP. + * + * Generated from protobuf field int32 source_port = 4; + */ + protected $source_port = 0; + /** + * Destination port. Only valid when protocol is TCP or UDP. + * + * Generated from protobuf field int32 destination_port = 5; + */ + protected $destination_port = 0; + /** + * URI of the network where this packet originates from. + * + * Generated from protobuf field string source_network_uri = 6; + */ + protected $source_network_uri = ''; + /** + * URI of the network where this packet is sent to. + * + * Generated from protobuf field string destination_network_uri = 7; + */ + protected $destination_network_uri = ''; + /** + * URI of the source telemetry agent this packet originates from. + * + * Generated from protobuf field string source_agent_uri = 8; + */ + protected $source_agent_uri = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $source_ip + * Source IP address. + * @type string $destination_ip + * Destination IP address. + * @type string $protocol + * IP protocol in string format, for example: "TCP", "UDP", "ICMP". + * @type int $source_port + * Source port. Only valid when protocol is TCP or UDP. + * @type int $destination_port + * Destination port. Only valid when protocol is TCP or UDP. + * @type string $source_network_uri + * URI of the network where this packet originates from. + * @type string $destination_network_uri + * URI of the network where this packet is sent to. + * @type string $source_agent_uri + * URI of the source telemetry agent this packet originates from. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkmanagement\V1\Trace::initOnce(); + parent::__construct($data); + } + + /** + * Source IP address. + * + * Generated from protobuf field string source_ip = 1; + * @return string + */ + public function getSourceIp() + { + return $this->source_ip; + } + + /** + * Source IP address. + * + * Generated from protobuf field string source_ip = 1; + * @param string $var + * @return $this + */ + public function setSourceIp($var) + { + GPBUtil::checkString($var, True); + $this->source_ip = $var; + + return $this; + } + + /** + * Destination IP address. + * + * Generated from protobuf field string destination_ip = 2; + * @return string + */ + public function getDestinationIp() + { + return $this->destination_ip; + } + + /** + * Destination IP address. + * + * Generated from protobuf field string destination_ip = 2; + * @param string $var + * @return $this + */ + public function setDestinationIp($var) + { + GPBUtil::checkString($var, True); + $this->destination_ip = $var; + + return $this; + } + + /** + * IP protocol in string format, for example: "TCP", "UDP", "ICMP". + * + * Generated from protobuf field string protocol = 3; + * @return string + */ + public function getProtocol() + { + return $this->protocol; + } + + /** + * IP protocol in string format, for example: "TCP", "UDP", "ICMP". + * + * Generated from protobuf field string protocol = 3; + * @param string $var + * @return $this + */ + public function setProtocol($var) + { + GPBUtil::checkString($var, True); + $this->protocol = $var; + + return $this; + } + + /** + * Source port. Only valid when protocol is TCP or UDP. + * + * Generated from protobuf field int32 source_port = 4; + * @return int + */ + public function getSourcePort() + { + return $this->source_port; + } + + /** + * Source port. Only valid when protocol is TCP or UDP. + * + * Generated from protobuf field int32 source_port = 4; + * @param int $var + * @return $this + */ + public function setSourcePort($var) + { + GPBUtil::checkInt32($var); + $this->source_port = $var; + + return $this; + } + + /** + * Destination port. Only valid when protocol is TCP or UDP. + * + * Generated from protobuf field int32 destination_port = 5; + * @return int + */ + public function getDestinationPort() + { + return $this->destination_port; + } + + /** + * Destination port. Only valid when protocol is TCP or UDP. + * + * Generated from protobuf field int32 destination_port = 5; + * @param int $var + * @return $this + */ + public function setDestinationPort($var) + { + GPBUtil::checkInt32($var); + $this->destination_port = $var; + + return $this; + } + + /** + * URI of the network where this packet originates from. + * + * Generated from protobuf field string source_network_uri = 6; + * @return string + */ + public function getSourceNetworkUri() + { + return $this->source_network_uri; + } + + /** + * URI of the network where this packet originates from. + * + * Generated from protobuf field string source_network_uri = 6; + * @param string $var + * @return $this + */ + public function setSourceNetworkUri($var) + { + GPBUtil::checkString($var, True); + $this->source_network_uri = $var; + + return $this; + } + + /** + * URI of the network where this packet is sent to. + * + * Generated from protobuf field string destination_network_uri = 7; + * @return string + */ + public function getDestinationNetworkUri() + { + return $this->destination_network_uri; + } + + /** + * URI of the network where this packet is sent to. + * + * Generated from protobuf field string destination_network_uri = 7; + * @param string $var + * @return $this + */ + public function setDestinationNetworkUri($var) + { + GPBUtil::checkString($var, True); + $this->destination_network_uri = $var; + + return $this; + } + + /** + * URI of the source telemetry agent this packet originates from. + * + * Generated from protobuf field string source_agent_uri = 8; + * @return string + */ + public function getSourceAgentUri() + { + return $this->source_agent_uri; + } + + /** + * URI of the source telemetry agent this packet originates from. + * + * Generated from protobuf field string source_agent_uri = 8; + * @param string $var + * @return $this + */ + public function setSourceAgentUri($var) + { + GPBUtil::checkString($var, True); + $this->source_agent_uri = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/FirewallInfo.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/FirewallInfo.php new file mode 100644 index 000000000000..7f3337c1308b --- /dev/null +++ b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/FirewallInfo.php @@ -0,0 +1,440 @@ +google.cloud.networkmanagement.v1.FirewallInfo + */ +class FirewallInfo extends \Google\Protobuf\Internal\Message +{ + /** + * The display name of the firewall rule. This field might be empty for + * firewall policy rules. + * + * Generated from protobuf field string display_name = 1; + */ + protected $display_name = ''; + /** + * The URI of the firewall rule. This field is not applicable to implied + * VPC firewall rules. + * + * Generated from protobuf field string uri = 2; + */ + protected $uri = ''; + /** + * Possible values: INGRESS, EGRESS + * + * Generated from protobuf field string direction = 3; + */ + protected $direction = ''; + /** + * Possible values: ALLOW, DENY, APPLY_SECURITY_PROFILE_GROUP + * + * Generated from protobuf field string action = 4; + */ + protected $action = ''; + /** + * The priority of the firewall rule. + * + * Generated from protobuf field int32 priority = 5; + */ + protected $priority = 0; + /** + * The URI of the VPC network that the firewall rule is associated with. + * This field is not applicable to hierarchical firewall policy rules. + * + * Generated from protobuf field string network_uri = 6; + */ + protected $network_uri = ''; + /** + * The target tags defined by the VPC firewall rule. This field is not + * applicable to firewall policy rules. + * + * Generated from protobuf field repeated string target_tags = 7; + */ + private $target_tags; + /** + * The target service accounts specified by the firewall rule. + * + * Generated from protobuf field repeated string target_service_accounts = 8; + */ + private $target_service_accounts; + /** + * The name of the firewall policy that this rule is associated with. + * This field is not applicable to VPC firewall rules and implied VPC firewall + * rules. + * + * Generated from protobuf field string policy = 9; + */ + protected $policy = ''; + /** + * The URI of the firewall policy that this rule is associated with. + * This field is not applicable to VPC firewall rules and implied VPC firewall + * rules. + * + * Generated from protobuf field string policy_uri = 11; + */ + protected $policy_uri = ''; + /** + * The firewall rule's type. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType firewall_rule_type = 10; + */ + protected $firewall_rule_type = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $display_name + * The display name of the firewall rule. This field might be empty for + * firewall policy rules. + * @type string $uri + * The URI of the firewall rule. This field is not applicable to implied + * VPC firewall rules. + * @type string $direction + * Possible values: INGRESS, EGRESS + * @type string $action + * Possible values: ALLOW, DENY, APPLY_SECURITY_PROFILE_GROUP + * @type int $priority + * The priority of the firewall rule. + * @type string $network_uri + * The URI of the VPC network that the firewall rule is associated with. + * This field is not applicable to hierarchical firewall policy rules. + * @type array|\Google\Protobuf\Internal\RepeatedField $target_tags + * The target tags defined by the VPC firewall rule. This field is not + * applicable to firewall policy rules. + * @type array|\Google\Protobuf\Internal\RepeatedField $target_service_accounts + * The target service accounts specified by the firewall rule. + * @type string $policy + * The name of the firewall policy that this rule is associated with. + * This field is not applicable to VPC firewall rules and implied VPC firewall + * rules. + * @type string $policy_uri + * The URI of the firewall policy that this rule is associated with. + * This field is not applicable to VPC firewall rules and implied VPC firewall + * rules. + * @type int $firewall_rule_type + * The firewall rule's type. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkmanagement\V1\Trace::initOnce(); + parent::__construct($data); + } + + /** + * The display name of the firewall rule. This field might be empty for + * firewall policy rules. + * + * Generated from protobuf field string display_name = 1; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * The display name of the firewall rule. This field might be empty for + * firewall policy rules. + * + * Generated from protobuf field string display_name = 1; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * The URI of the firewall rule. This field is not applicable to implied + * VPC firewall rules. + * + * Generated from protobuf field string uri = 2; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * The URI of the firewall rule. This field is not applicable to implied + * VPC firewall rules. + * + * Generated from protobuf field string uri = 2; + * @param string $var + * @return $this + */ + public function setUri($var) + { + GPBUtil::checkString($var, True); + $this->uri = $var; + + return $this; + } + + /** + * Possible values: INGRESS, EGRESS + * + * Generated from protobuf field string direction = 3; + * @return string + */ + public function getDirection() + { + return $this->direction; + } + + /** + * Possible values: INGRESS, EGRESS + * + * Generated from protobuf field string direction = 3; + * @param string $var + * @return $this + */ + public function setDirection($var) + { + GPBUtil::checkString($var, True); + $this->direction = $var; + + return $this; + } + + /** + * Possible values: ALLOW, DENY, APPLY_SECURITY_PROFILE_GROUP + * + * Generated from protobuf field string action = 4; + * @return string + */ + public function getAction() + { + return $this->action; + } + + /** + * Possible values: ALLOW, DENY, APPLY_SECURITY_PROFILE_GROUP + * + * Generated from protobuf field string action = 4; + * @param string $var + * @return $this + */ + public function setAction($var) + { + GPBUtil::checkString($var, True); + $this->action = $var; + + return $this; + } + + /** + * The priority of the firewall rule. + * + * Generated from protobuf field int32 priority = 5; + * @return int + */ + public function getPriority() + { + return $this->priority; + } + + /** + * The priority of the firewall rule. + * + * Generated from protobuf field int32 priority = 5; + * @param int $var + * @return $this + */ + public function setPriority($var) + { + GPBUtil::checkInt32($var); + $this->priority = $var; + + return $this; + } + + /** + * The URI of the VPC network that the firewall rule is associated with. + * This field is not applicable to hierarchical firewall policy rules. + * + * Generated from protobuf field string network_uri = 6; + * @return string + */ + public function getNetworkUri() + { + return $this->network_uri; + } + + /** + * The URI of the VPC network that the firewall rule is associated with. + * This field is not applicable to hierarchical firewall policy rules. + * + * Generated from protobuf field string network_uri = 6; + * @param string $var + * @return $this + */ + public function setNetworkUri($var) + { + GPBUtil::checkString($var, True); + $this->network_uri = $var; + + return $this; + } + + /** + * The target tags defined by the VPC firewall rule. This field is not + * applicable to firewall policy rules. + * + * Generated from protobuf field repeated string target_tags = 7; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTargetTags() + { + return $this->target_tags; + } + + /** + * The target tags defined by the VPC firewall rule. This field is not + * applicable to firewall policy rules. + * + * Generated from protobuf field repeated string target_tags = 7; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTargetTags($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->target_tags = $arr; + + return $this; + } + + /** + * The target service accounts specified by the firewall rule. + * + * Generated from protobuf field repeated string target_service_accounts = 8; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTargetServiceAccounts() + { + return $this->target_service_accounts; + } + + /** + * The target service accounts specified by the firewall rule. + * + * Generated from protobuf field repeated string target_service_accounts = 8; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTargetServiceAccounts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->target_service_accounts = $arr; + + return $this; + } + + /** + * The name of the firewall policy that this rule is associated with. + * This field is not applicable to VPC firewall rules and implied VPC firewall + * rules. + * + * Generated from protobuf field string policy = 9; + * @return string + */ + public function getPolicy() + { + return $this->policy; + } + + /** + * The name of the firewall policy that this rule is associated with. + * This field is not applicable to VPC firewall rules and implied VPC firewall + * rules. + * + * Generated from protobuf field string policy = 9; + * @param string $var + * @return $this + */ + public function setPolicy($var) + { + GPBUtil::checkString($var, True); + $this->policy = $var; + + return $this; + } + + /** + * The URI of the firewall policy that this rule is associated with. + * This field is not applicable to VPC firewall rules and implied VPC firewall + * rules. + * + * Generated from protobuf field string policy_uri = 11; + * @return string + */ + public function getPolicyUri() + { + return $this->policy_uri; + } + + /** + * The URI of the firewall policy that this rule is associated with. + * This field is not applicable to VPC firewall rules and implied VPC firewall + * rules. + * + * Generated from protobuf field string policy_uri = 11; + * @param string $var + * @return $this + */ + public function setPolicyUri($var) + { + GPBUtil::checkString($var, True); + $this->policy_uri = $var; + + return $this; + } + + /** + * The firewall rule's type. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType firewall_rule_type = 10; + * @return int + */ + public function getFirewallRuleType() + { + return $this->firewall_rule_type; + } + + /** + * The firewall rule's type. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType firewall_rule_type = 10; + * @param int $var + * @return $this + */ + public function setFirewallRuleType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetworkManagement\V1\FirewallInfo\FirewallRuleType::class); + $this->firewall_rule_type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/FirewallInfo/FirewallRuleType.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/FirewallInfo/FirewallRuleType.php new file mode 100644 index 000000000000..c167afa5d089 --- /dev/null +++ b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/FirewallInfo/FirewallRuleType.php @@ -0,0 +1,125 @@ +google.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType + */ +class FirewallRuleType +{ + /** + * Unspecified type. + * + * Generated from protobuf enum FIREWALL_RULE_TYPE_UNSPECIFIED = 0; + */ + const FIREWALL_RULE_TYPE_UNSPECIFIED = 0; + /** + * Hierarchical firewall policy rule. For details, see + * [Hierarchical firewall policies + * overview](https://cloud.google.com/vpc/docs/firewall-policies). + * + * Generated from protobuf enum HIERARCHICAL_FIREWALL_POLICY_RULE = 1; + */ + const HIERARCHICAL_FIREWALL_POLICY_RULE = 1; + /** + * VPC firewall rule. For details, see + * [VPC firewall rules + * overview](https://cloud.google.com/vpc/docs/firewalls). + * + * Generated from protobuf enum VPC_FIREWALL_RULE = 2; + */ + const VPC_FIREWALL_RULE = 2; + /** + * Implied VPC firewall rule. For details, see + * [Implied + * rules](https://cloud.google.com/vpc/docs/firewalls#default_firewall_rules). + * + * Generated from protobuf enum IMPLIED_VPC_FIREWALL_RULE = 3; + */ + const IMPLIED_VPC_FIREWALL_RULE = 3; + /** + * Implicit firewall rules that are managed by serverless VPC access to + * allow ingress access. They are not visible in the Google Cloud console. + * For details, see [VPC connector's implicit + * rules](https://cloud.google.com/functions/docs/networking/connecting-vpc#restrict-access). + * + * Generated from protobuf enum SERVERLESS_VPC_ACCESS_MANAGED_FIREWALL_RULE = 4; + */ + const SERVERLESS_VPC_ACCESS_MANAGED_FIREWALL_RULE = 4; + /** + * Global network firewall policy rule. + * For details, see [Network firewall + * policies](https://cloud.google.com/vpc/docs/network-firewall-policies). + * + * Generated from protobuf enum NETWORK_FIREWALL_POLICY_RULE = 5; + */ + const NETWORK_FIREWALL_POLICY_RULE = 5; + /** + * Regional network firewall policy rule. + * For details, see [Regional network firewall + * policies](https://cloud.google.com/firewall/docs/regional-firewall-policies). + * + * Generated from protobuf enum NETWORK_REGIONAL_FIREWALL_POLICY_RULE = 6; + */ + const NETWORK_REGIONAL_FIREWALL_POLICY_RULE = 6; + /** + * Firewall policy rule containing attributes not yet supported in + * Connectivity tests. Firewall analysis is skipped if such a rule can + * potentially be matched. Please see the [list of unsupported + * configurations](https://cloud.google.com/network-intelligence-center/docs/connectivity-tests/concepts/overview#unsupported-configs). + * + * Generated from protobuf enum UNSUPPORTED_FIREWALL_POLICY_RULE = 100; + */ + const UNSUPPORTED_FIREWALL_POLICY_RULE = 100; + /** + * Tracking state for response traffic created when request traffic goes + * through allow firewall rule. + * For details, see [firewall rules + * specifications](https://cloud.google.com/firewall/docs/firewalls#specifications) + * + * Generated from protobuf enum TRACKING_STATE = 101; + */ + const TRACKING_STATE = 101; + + private static $valueToName = [ + self::FIREWALL_RULE_TYPE_UNSPECIFIED => 'FIREWALL_RULE_TYPE_UNSPECIFIED', + self::HIERARCHICAL_FIREWALL_POLICY_RULE => 'HIERARCHICAL_FIREWALL_POLICY_RULE', + self::VPC_FIREWALL_RULE => 'VPC_FIREWALL_RULE', + self::IMPLIED_VPC_FIREWALL_RULE => 'IMPLIED_VPC_FIREWALL_RULE', + self::SERVERLESS_VPC_ACCESS_MANAGED_FIREWALL_RULE => 'SERVERLESS_VPC_ACCESS_MANAGED_FIREWALL_RULE', + self::NETWORK_FIREWALL_POLICY_RULE => 'NETWORK_FIREWALL_POLICY_RULE', + self::NETWORK_REGIONAL_FIREWALL_POLICY_RULE => 'NETWORK_REGIONAL_FIREWALL_POLICY_RULE', + self::UNSUPPORTED_FIREWALL_POLICY_RULE => 'UNSUPPORTED_FIREWALL_POLICY_RULE', + self::TRACKING_STATE => 'TRACKING_STATE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(FirewallRuleType::class, \Google\Cloud\NetworkManagement\V1\FirewallInfo_FirewallRuleType::class); + diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ForwardInfo.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ForwardInfo.php new file mode 100644 index 000000000000..f2c3ac4705a2 --- /dev/null +++ b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ForwardInfo.php @@ -0,0 +1,135 @@ +google.cloud.networkmanagement.v1.ForwardInfo + */ +class ForwardInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Target type where this packet is forwarded to. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.ForwardInfo.Target target = 1; + */ + protected $target = 0; + /** + * URI of the resource that the packet is forwarded to. + * + * Generated from protobuf field string resource_uri = 2; + */ + protected $resource_uri = ''; + /** + * IP address of the target (if applicable). + * + * Generated from protobuf field string ip_address = 3 [(.google.api.field_info) = { + */ + protected $ip_address = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $target + * Target type where this packet is forwarded to. + * @type string $resource_uri + * URI of the resource that the packet is forwarded to. + * @type string $ip_address + * IP address of the target (if applicable). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkmanagement\V1\Trace::initOnce(); + parent::__construct($data); + } + + /** + * Target type where this packet is forwarded to. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.ForwardInfo.Target target = 1; + * @return int + */ + public function getTarget() + { + return $this->target; + } + + /** + * Target type where this packet is forwarded to. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.ForwardInfo.Target target = 1; + * @param int $var + * @return $this + */ + public function setTarget($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetworkManagement\V1\ForwardInfo\Target::class); + $this->target = $var; + + return $this; + } + + /** + * URI of the resource that the packet is forwarded to. + * + * Generated from protobuf field string resource_uri = 2; + * @return string + */ + public function getResourceUri() + { + return $this->resource_uri; + } + + /** + * URI of the resource that the packet is forwarded to. + * + * Generated from protobuf field string resource_uri = 2; + * @param string $var + * @return $this + */ + public function setResourceUri($var) + { + GPBUtil::checkString($var, True); + $this->resource_uri = $var; + + return $this; + } + + /** + * IP address of the target (if applicable). + * + * Generated from protobuf field string ip_address = 3 [(.google.api.field_info) = { + * @return string + */ + public function getIpAddress() + { + return $this->ip_address; + } + + /** + * IP address of the target (if applicable). + * + * Generated from protobuf field string ip_address = 3 [(.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setIpAddress($var) + { + GPBUtil::checkString($var, True); + $this->ip_address = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ForwardInfo/Target.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ForwardInfo/Target.php new file mode 100644 index 000000000000..eb8e65ec9c58 --- /dev/null +++ b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ForwardInfo/Target.php @@ -0,0 +1,113 @@ +google.cloud.networkmanagement.v1.ForwardInfo.Target + */ +class Target +{ + /** + * Target not specified. + * + * Generated from protobuf enum TARGET_UNSPECIFIED = 0; + */ + const TARGET_UNSPECIFIED = 0; + /** + * Forwarded to a VPC peering network. + * + * Generated from protobuf enum PEERING_VPC = 1; + */ + const PEERING_VPC = 1; + /** + * Forwarded to a Cloud VPN gateway. + * + * Generated from protobuf enum VPN_GATEWAY = 2; + */ + const VPN_GATEWAY = 2; + /** + * Forwarded to a Cloud Interconnect connection. + * + * Generated from protobuf enum INTERCONNECT = 3; + */ + const INTERCONNECT = 3; + /** + * Forwarded to a Google Kubernetes Engine Container cluster master. + * + * Generated from protobuf enum GKE_MASTER = 4 [deprecated = true]; + */ + const GKE_MASTER = 4; + /** + * Forwarded to the next hop of a custom route imported from a peering VPC. + * + * Generated from protobuf enum IMPORTED_CUSTOM_ROUTE_NEXT_HOP = 5; + */ + const IMPORTED_CUSTOM_ROUTE_NEXT_HOP = 5; + /** + * Forwarded to a Cloud SQL instance. + * + * Generated from protobuf enum CLOUD_SQL_INSTANCE = 6 [deprecated = true]; + */ + const CLOUD_SQL_INSTANCE = 6; + /** + * Forwarded to a VPC network in another project. + * + * Generated from protobuf enum ANOTHER_PROJECT = 7; + */ + const ANOTHER_PROJECT = 7; + /** + * Forwarded to an NCC Hub. + * + * Generated from protobuf enum NCC_HUB = 8; + */ + const NCC_HUB = 8; + /** + * Forwarded to a router appliance. + * + * Generated from protobuf enum ROUTER_APPLIANCE = 9; + */ + const ROUTER_APPLIANCE = 9; + + private static $valueToName = [ + self::TARGET_UNSPECIFIED => 'TARGET_UNSPECIFIED', + self::PEERING_VPC => 'PEERING_VPC', + self::VPN_GATEWAY => 'VPN_GATEWAY', + self::INTERCONNECT => 'INTERCONNECT', + self::GKE_MASTER => 'GKE_MASTER', + self::IMPORTED_CUSTOM_ROUTE_NEXT_HOP => 'IMPORTED_CUSTOM_ROUTE_NEXT_HOP', + self::CLOUD_SQL_INSTANCE => 'CLOUD_SQL_INSTANCE', + self::ANOTHER_PROJECT => 'ANOTHER_PROJECT', + self::NCC_HUB => 'NCC_HUB', + self::ROUTER_APPLIANCE => 'ROUTER_APPLIANCE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Target::class, \Google\Cloud\NetworkManagement\V1\ForwardInfo_Target::class); + diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ForwardingRuleInfo.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ForwardingRuleInfo.php new file mode 100644 index 000000000000..831116bed4ee --- /dev/null +++ b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ForwardingRuleInfo.php @@ -0,0 +1,415 @@ +google.cloud.networkmanagement.v1.ForwardingRuleInfo + */ +class ForwardingRuleInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Name of the forwarding rule. + * + * Generated from protobuf field string display_name = 1; + */ + protected $display_name = ''; + /** + * URI of the forwarding rule. + * + * Generated from protobuf field string uri = 2; + */ + protected $uri = ''; + /** + * Protocol defined in the forwarding rule that matches the packet. + * + * Generated from protobuf field string matched_protocol = 3; + */ + protected $matched_protocol = ''; + /** + * Port range defined in the forwarding rule that matches the packet. + * + * Generated from protobuf field string matched_port_range = 6; + */ + protected $matched_port_range = ''; + /** + * VIP of the forwarding rule. + * + * Generated from protobuf field string vip = 4; + */ + protected $vip = ''; + /** + * Target type of the forwarding rule. + * + * Generated from protobuf field string target = 5; + */ + protected $target = ''; + /** + * Network URI. + * + * Generated from protobuf field string network_uri = 7; + */ + protected $network_uri = ''; + /** + * Region of the forwarding rule. Set only for regional forwarding rules. + * + * Generated from protobuf field string region = 8; + */ + protected $region = ''; + /** + * Name of the load balancer the forwarding rule belongs to. Empty for + * forwarding rules not related to load balancers (like PSC forwarding rules). + * + * Generated from protobuf field string load_balancer_name = 9; + */ + protected $load_balancer_name = ''; + /** + * URI of the PSC service attachment this forwarding rule targets (if + * applicable). + * + * Generated from protobuf field string psc_service_attachment_uri = 10; + */ + protected $psc_service_attachment_uri = ''; + /** + * PSC Google API target this forwarding rule targets (if applicable). + * + * Generated from protobuf field string psc_google_api_target = 11; + */ + protected $psc_google_api_target = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $display_name + * Name of the forwarding rule. + * @type string $uri + * URI of the forwarding rule. + * @type string $matched_protocol + * Protocol defined in the forwarding rule that matches the packet. + * @type string $matched_port_range + * Port range defined in the forwarding rule that matches the packet. + * @type string $vip + * VIP of the forwarding rule. + * @type string $target + * Target type of the forwarding rule. + * @type string $network_uri + * Network URI. + * @type string $region + * Region of the forwarding rule. Set only for regional forwarding rules. + * @type string $load_balancer_name + * Name of the load balancer the forwarding rule belongs to. Empty for + * forwarding rules not related to load balancers (like PSC forwarding rules). + * @type string $psc_service_attachment_uri + * URI of the PSC service attachment this forwarding rule targets (if + * applicable). + * @type string $psc_google_api_target + * PSC Google API target this forwarding rule targets (if applicable). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkmanagement\V1\Trace::initOnce(); + parent::__construct($data); + } + + /** + * Name of the forwarding rule. + * + * Generated from protobuf field string display_name = 1; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Name of the forwarding rule. + * + * Generated from protobuf field string display_name = 1; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * URI of the forwarding rule. + * + * Generated from protobuf field string uri = 2; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * URI of the forwarding rule. + * + * Generated from protobuf field string uri = 2; + * @param string $var + * @return $this + */ + public function setUri($var) + { + GPBUtil::checkString($var, True); + $this->uri = $var; + + return $this; + } + + /** + * Protocol defined in the forwarding rule that matches the packet. + * + * Generated from protobuf field string matched_protocol = 3; + * @return string + */ + public function getMatchedProtocol() + { + return $this->matched_protocol; + } + + /** + * Protocol defined in the forwarding rule that matches the packet. + * + * Generated from protobuf field string matched_protocol = 3; + * @param string $var + * @return $this + */ + public function setMatchedProtocol($var) + { + GPBUtil::checkString($var, True); + $this->matched_protocol = $var; + + return $this; + } + + /** + * Port range defined in the forwarding rule that matches the packet. + * + * Generated from protobuf field string matched_port_range = 6; + * @return string + */ + public function getMatchedPortRange() + { + return $this->matched_port_range; + } + + /** + * Port range defined in the forwarding rule that matches the packet. + * + * Generated from protobuf field string matched_port_range = 6; + * @param string $var + * @return $this + */ + public function setMatchedPortRange($var) + { + GPBUtil::checkString($var, True); + $this->matched_port_range = $var; + + return $this; + } + + /** + * VIP of the forwarding rule. + * + * Generated from protobuf field string vip = 4; + * @return string + */ + public function getVip() + { + return $this->vip; + } + + /** + * VIP of the forwarding rule. + * + * Generated from protobuf field string vip = 4; + * @param string $var + * @return $this + */ + public function setVip($var) + { + GPBUtil::checkString($var, True); + $this->vip = $var; + + return $this; + } + + /** + * Target type of the forwarding rule. + * + * Generated from protobuf field string target = 5; + * @return string + */ + public function getTarget() + { + return $this->target; + } + + /** + * Target type of the forwarding rule. + * + * Generated from protobuf field string target = 5; + * @param string $var + * @return $this + */ + public function setTarget($var) + { + GPBUtil::checkString($var, True); + $this->target = $var; + + return $this; + } + + /** + * Network URI. + * + * Generated from protobuf field string network_uri = 7; + * @return string + */ + public function getNetworkUri() + { + return $this->network_uri; + } + + /** + * Network URI. + * + * Generated from protobuf field string network_uri = 7; + * @param string $var + * @return $this + */ + public function setNetworkUri($var) + { + GPBUtil::checkString($var, True); + $this->network_uri = $var; + + return $this; + } + + /** + * Region of the forwarding rule. Set only for regional forwarding rules. + * + * Generated from protobuf field string region = 8; + * @return string + */ + public function getRegion() + { + return $this->region; + } + + /** + * Region of the forwarding rule. Set only for regional forwarding rules. + * + * Generated from protobuf field string region = 8; + * @param string $var + * @return $this + */ + public function setRegion($var) + { + GPBUtil::checkString($var, True); + $this->region = $var; + + return $this; + } + + /** + * Name of the load balancer the forwarding rule belongs to. Empty for + * forwarding rules not related to load balancers (like PSC forwarding rules). + * + * Generated from protobuf field string load_balancer_name = 9; + * @return string + */ + public function getLoadBalancerName() + { + return $this->load_balancer_name; + } + + /** + * Name of the load balancer the forwarding rule belongs to. Empty for + * forwarding rules not related to load balancers (like PSC forwarding rules). + * + * Generated from protobuf field string load_balancer_name = 9; + * @param string $var + * @return $this + */ + public function setLoadBalancerName($var) + { + GPBUtil::checkString($var, True); + $this->load_balancer_name = $var; + + return $this; + } + + /** + * URI of the PSC service attachment this forwarding rule targets (if + * applicable). + * + * Generated from protobuf field string psc_service_attachment_uri = 10; + * @return string + */ + public function getPscServiceAttachmentUri() + { + return $this->psc_service_attachment_uri; + } + + /** + * URI of the PSC service attachment this forwarding rule targets (if + * applicable). + * + * Generated from protobuf field string psc_service_attachment_uri = 10; + * @param string $var + * @return $this + */ + public function setPscServiceAttachmentUri($var) + { + GPBUtil::checkString($var, True); + $this->psc_service_attachment_uri = $var; + + return $this; + } + + /** + * PSC Google API target this forwarding rule targets (if applicable). + * + * Generated from protobuf field string psc_google_api_target = 11; + * @return string + */ + public function getPscGoogleApiTarget() + { + return $this->psc_google_api_target; + } + + /** + * PSC Google API target this forwarding rule targets (if applicable). + * + * Generated from protobuf field string psc_google_api_target = 11; + * @param string $var + * @return $this + */ + public function setPscGoogleApiTarget($var) + { + GPBUtil::checkString($var, True); + $this->psc_google_api_target = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/GKEMasterInfo.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/GKEMasterInfo.php new file mode 100644 index 000000000000..d3b1ea0afb97 --- /dev/null +++ b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/GKEMasterInfo.php @@ -0,0 +1,204 @@ +google.cloud.networkmanagement.v1.GKEMasterInfo + */ +class GKEMasterInfo extends \Google\Protobuf\Internal\Message +{ + /** + * URI of a GKE cluster. + * + * Generated from protobuf field string cluster_uri = 2; + */ + protected $cluster_uri = ''; + /** + * URI of a GKE cluster network. + * + * Generated from protobuf field string cluster_network_uri = 4; + */ + protected $cluster_network_uri = ''; + /** + * Internal IP address of a GKE cluster control plane. + * + * Generated from protobuf field string internal_ip = 5; + */ + protected $internal_ip = ''; + /** + * External IP address of a GKE cluster control plane. + * + * Generated from protobuf field string external_ip = 6; + */ + protected $external_ip = ''; + /** + * DNS endpoint of a GKE cluster control plane. + * + * Generated from protobuf field string dns_endpoint = 7; + */ + protected $dns_endpoint = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $cluster_uri + * URI of a GKE cluster. + * @type string $cluster_network_uri + * URI of a GKE cluster network. + * @type string $internal_ip + * Internal IP address of a GKE cluster control plane. + * @type string $external_ip + * External IP address of a GKE cluster control plane. + * @type string $dns_endpoint + * DNS endpoint of a GKE cluster control plane. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkmanagement\V1\Trace::initOnce(); + parent::__construct($data); + } + + /** + * URI of a GKE cluster. + * + * Generated from protobuf field string cluster_uri = 2; + * @return string + */ + public function getClusterUri() + { + return $this->cluster_uri; + } + + /** + * URI of a GKE cluster. + * + * Generated from protobuf field string cluster_uri = 2; + * @param string $var + * @return $this + */ + public function setClusterUri($var) + { + GPBUtil::checkString($var, True); + $this->cluster_uri = $var; + + return $this; + } + + /** + * URI of a GKE cluster network. + * + * Generated from protobuf field string cluster_network_uri = 4; + * @return string + */ + public function getClusterNetworkUri() + { + return $this->cluster_network_uri; + } + + /** + * URI of a GKE cluster network. + * + * Generated from protobuf field string cluster_network_uri = 4; + * @param string $var + * @return $this + */ + public function setClusterNetworkUri($var) + { + GPBUtil::checkString($var, True); + $this->cluster_network_uri = $var; + + return $this; + } + + /** + * Internal IP address of a GKE cluster control plane. + * + * Generated from protobuf field string internal_ip = 5; + * @return string + */ + public function getInternalIp() + { + return $this->internal_ip; + } + + /** + * Internal IP address of a GKE cluster control plane. + * + * Generated from protobuf field string internal_ip = 5; + * @param string $var + * @return $this + */ + public function setInternalIp($var) + { + GPBUtil::checkString($var, True); + $this->internal_ip = $var; + + return $this; + } + + /** + * External IP address of a GKE cluster control plane. + * + * Generated from protobuf field string external_ip = 6; + * @return string + */ + public function getExternalIp() + { + return $this->external_ip; + } + + /** + * External IP address of a GKE cluster control plane. + * + * Generated from protobuf field string external_ip = 6; + * @param string $var + * @return $this + */ + public function setExternalIp($var) + { + GPBUtil::checkString($var, True); + $this->external_ip = $var; + + return $this; + } + + /** + * DNS endpoint of a GKE cluster control plane. + * + * Generated from protobuf field string dns_endpoint = 7; + * @return string + */ + public function getDnsEndpoint() + { + return $this->dns_endpoint; + } + + /** + * DNS endpoint of a GKE cluster control plane. + * + * Generated from protobuf field string dns_endpoint = 7; + * @param string $var + * @return $this + */ + public function setDnsEndpoint($var) + { + GPBUtil::checkString($var, True); + $this->dns_endpoint = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/GetConnectivityTestRequest.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/GetConnectivityTestRequest.php new file mode 100644 index 000000000000..dcd27f465a8a --- /dev/null +++ b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/GetConnectivityTestRequest.php @@ -0,0 +1,86 @@ +google.cloud.networkmanagement.v1.GetConnectivityTestRequest + */ +class GetConnectivityTestRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. `ConnectivityTest` resource name using the form: + * `projects/{project_id}/locations/global/connectivityTests/{test_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. `ConnectivityTest` resource name using the form: + * `projects/{project_id}/locations/global/connectivityTests/{test_id}` + * Please see {@see ReachabilityServiceClient::connectivityTestName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkManagement\V1\GetConnectivityTestRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. `ConnectivityTest` resource name using the form: + * `projects/{project_id}/locations/global/connectivityTests/{test_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkmanagement\V1\Reachability::initOnce(); + parent::__construct($data); + } + + /** + * Required. `ConnectivityTest` resource name using the form: + * `projects/{project_id}/locations/global/connectivityTests/{test_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. `ConnectivityTest` resource name using the form: + * `projects/{project_id}/locations/global/connectivityTests/{test_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/GoogleServiceInfo.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/GoogleServiceInfo.php new file mode 100644 index 000000000000..d402ca6ee52f --- /dev/null +++ b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/GoogleServiceInfo.php @@ -0,0 +1,105 @@ +google.cloud.networkmanagement.v1.GoogleServiceInfo + */ +class GoogleServiceInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Source IP address. + * + * Generated from protobuf field string source_ip = 1; + */ + protected $source_ip = ''; + /** + * Recognized type of a Google Service. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.GoogleServiceInfo.GoogleServiceType google_service_type = 2; + */ + protected $google_service_type = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $source_ip + * Source IP address. + * @type int $google_service_type + * Recognized type of a Google Service. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkmanagement\V1\Trace::initOnce(); + parent::__construct($data); + } + + /** + * Source IP address. + * + * Generated from protobuf field string source_ip = 1; + * @return string + */ + public function getSourceIp() + { + return $this->source_ip; + } + + /** + * Source IP address. + * + * Generated from protobuf field string source_ip = 1; + * @param string $var + * @return $this + */ + public function setSourceIp($var) + { + GPBUtil::checkString($var, True); + $this->source_ip = $var; + + return $this; + } + + /** + * Recognized type of a Google Service. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.GoogleServiceInfo.GoogleServiceType google_service_type = 2; + * @return int + */ + public function getGoogleServiceType() + { + return $this->google_service_type; + } + + /** + * Recognized type of a Google Service. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.GoogleServiceInfo.GoogleServiceType google_service_type = 2; + * @param int $var + * @return $this + */ + public function setGoogleServiceType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetworkManagement\V1\GoogleServiceInfo\GoogleServiceType::class); + $this->google_service_type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/GoogleServiceInfo/GoogleServiceType.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/GoogleServiceInfo/GoogleServiceType.php new file mode 100644 index 000000000000..5d379eb881e6 --- /dev/null +++ b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/GoogleServiceInfo/GoogleServiceType.php @@ -0,0 +1,101 @@ +google.cloud.networkmanagement.v1.GoogleServiceInfo.GoogleServiceType + */ +class GoogleServiceType +{ + /** + * Unspecified Google Service. + * + * Generated from protobuf enum GOOGLE_SERVICE_TYPE_UNSPECIFIED = 0; + */ + const GOOGLE_SERVICE_TYPE_UNSPECIFIED = 0; + /** + * Identity aware proxy. + * https://cloud.google.com/iap/docs/using-tcp-forwarding + * + * Generated from protobuf enum IAP = 1; + */ + const IAP = 1; + /** + * One of two services sharing IP ranges: + * * Load Balancer proxy + * * Centralized Health Check prober + * https://cloud.google.com/load-balancing/docs/firewall-rules + * + * Generated from protobuf enum GFE_PROXY_OR_HEALTH_CHECK_PROBER = 2; + */ + const GFE_PROXY_OR_HEALTH_CHECK_PROBER = 2; + /** + * Connectivity from Cloud DNS to forwarding targets or alternate name + * servers that use private routing. + * https://cloud.google.com/dns/docs/zones/forwarding-zones#firewall-rules + * https://cloud.google.com/dns/docs/policies#firewall-rules + * + * Generated from protobuf enum CLOUD_DNS = 3; + */ + const CLOUD_DNS = 3; + /** + * private.googleapis.com and restricted.googleapis.com + * + * Generated from protobuf enum GOOGLE_API = 4; + */ + const GOOGLE_API = 4; + /** + * Google API via Private Service Connect. + * https://cloud.google.com/vpc/docs/configure-private-service-connect-apis + * + * Generated from protobuf enum GOOGLE_API_PSC = 5; + */ + const GOOGLE_API_PSC = 5; + /** + * Google API via VPC Service Controls. + * https://cloud.google.com/vpc/docs/configure-private-service-connect-apis + * + * Generated from protobuf enum GOOGLE_API_VPC_SC = 6; + */ + const GOOGLE_API_VPC_SC = 6; + + private static $valueToName = [ + self::GOOGLE_SERVICE_TYPE_UNSPECIFIED => 'GOOGLE_SERVICE_TYPE_UNSPECIFIED', + self::IAP => 'IAP', + self::GFE_PROXY_OR_HEALTH_CHECK_PROBER => 'GFE_PROXY_OR_HEALTH_CHECK_PROBER', + self::CLOUD_DNS => 'CLOUD_DNS', + self::GOOGLE_API => 'GOOGLE_API', + self::GOOGLE_API_PSC => 'GOOGLE_API_PSC', + self::GOOGLE_API_VPC_SC => 'GOOGLE_API_VPC_SC', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(GoogleServiceType::class, \Google\Cloud\NetworkManagement\V1\GoogleServiceInfo_GoogleServiceType::class); + diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/InstanceInfo.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/InstanceInfo.php new file mode 100644 index 000000000000..a4e9c57509fd --- /dev/null +++ b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/InstanceInfo.php @@ -0,0 +1,344 @@ +google.cloud.networkmanagement.v1.InstanceInfo + */ +class InstanceInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Name of a Compute Engine instance. + * + * Generated from protobuf field string display_name = 1; + */ + protected $display_name = ''; + /** + * URI of a Compute Engine instance. + * + * Generated from protobuf field string uri = 2; + */ + protected $uri = ''; + /** + * Name of the network interface of a Compute Engine instance. + * + * Generated from protobuf field string interface = 3; + */ + protected $interface = ''; + /** + * URI of a Compute Engine network. + * + * Generated from protobuf field string network_uri = 4; + */ + protected $network_uri = ''; + /** + * Internal IP address of the network interface. + * + * Generated from protobuf field string internal_ip = 5; + */ + protected $internal_ip = ''; + /** + * External IP address of the network interface. + * + * Generated from protobuf field string external_ip = 6; + */ + protected $external_ip = ''; + /** + * Network tags configured on the instance. + * + * Generated from protobuf field repeated string network_tags = 7; + */ + private $network_tags; + /** + * Service account authorized for the instance. + * + * Generated from protobuf field string service_account = 8 [deprecated = true]; + * @deprecated + */ + protected $service_account = ''; + /** + * URI of the PSC network attachment the NIC is attached to (if relevant). + * + * Generated from protobuf field string psc_network_attachment_uri = 9; + */ + protected $psc_network_attachment_uri = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $display_name + * Name of a Compute Engine instance. + * @type string $uri + * URI of a Compute Engine instance. + * @type string $interface + * Name of the network interface of a Compute Engine instance. + * @type string $network_uri + * URI of a Compute Engine network. + * @type string $internal_ip + * Internal IP address of the network interface. + * @type string $external_ip + * External IP address of the network interface. + * @type array|\Google\Protobuf\Internal\RepeatedField $network_tags + * Network tags configured on the instance. + * @type string $service_account + * Service account authorized for the instance. + * @type string $psc_network_attachment_uri + * URI of the PSC network attachment the NIC is attached to (if relevant). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkmanagement\V1\Trace::initOnce(); + parent::__construct($data); + } + + /** + * Name of a Compute Engine instance. + * + * Generated from protobuf field string display_name = 1; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Name of a Compute Engine instance. + * + * Generated from protobuf field string display_name = 1; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * URI of a Compute Engine instance. + * + * Generated from protobuf field string uri = 2; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * URI of a Compute Engine instance. + * + * Generated from protobuf field string uri = 2; + * @param string $var + * @return $this + */ + public function setUri($var) + { + GPBUtil::checkString($var, True); + $this->uri = $var; + + return $this; + } + + /** + * Name of the network interface of a Compute Engine instance. + * + * Generated from protobuf field string interface = 3; + * @return string + */ + public function getInterface() + { + return $this->interface; + } + + /** + * Name of the network interface of a Compute Engine instance. + * + * Generated from protobuf field string interface = 3; + * @param string $var + * @return $this + */ + public function setInterface($var) + { + GPBUtil::checkString($var, True); + $this->interface = $var; + + return $this; + } + + /** + * URI of a Compute Engine network. + * + * Generated from protobuf field string network_uri = 4; + * @return string + */ + public function getNetworkUri() + { + return $this->network_uri; + } + + /** + * URI of a Compute Engine network. + * + * Generated from protobuf field string network_uri = 4; + * @param string $var + * @return $this + */ + public function setNetworkUri($var) + { + GPBUtil::checkString($var, True); + $this->network_uri = $var; + + return $this; + } + + /** + * Internal IP address of the network interface. + * + * Generated from protobuf field string internal_ip = 5; + * @return string + */ + public function getInternalIp() + { + return $this->internal_ip; + } + + /** + * Internal IP address of the network interface. + * + * Generated from protobuf field string internal_ip = 5; + * @param string $var + * @return $this + */ + public function setInternalIp($var) + { + GPBUtil::checkString($var, True); + $this->internal_ip = $var; + + return $this; + } + + /** + * External IP address of the network interface. + * + * Generated from protobuf field string external_ip = 6; + * @return string + */ + public function getExternalIp() + { + return $this->external_ip; + } + + /** + * External IP address of the network interface. + * + * Generated from protobuf field string external_ip = 6; + * @param string $var + * @return $this + */ + public function setExternalIp($var) + { + GPBUtil::checkString($var, True); + $this->external_ip = $var; + + return $this; + } + + /** + * Network tags configured on the instance. + * + * Generated from protobuf field repeated string network_tags = 7; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNetworkTags() + { + return $this->network_tags; + } + + /** + * Network tags configured on the instance. + * + * Generated from protobuf field repeated string network_tags = 7; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNetworkTags($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->network_tags = $arr; + + return $this; + } + + /** + * Service account authorized for the instance. + * + * Generated from protobuf field string service_account = 8 [deprecated = true]; + * @return string + * @deprecated + */ + public function getServiceAccount() + { + @trigger_error('service_account is deprecated.', E_USER_DEPRECATED); + return $this->service_account; + } + + /** + * Service account authorized for the instance. + * + * Generated from protobuf field string service_account = 8 [deprecated = true]; + * @param string $var + * @return $this + * @deprecated + */ + public function setServiceAccount($var) + { + @trigger_error('service_account is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkString($var, True); + $this->service_account = $var; + + return $this; + } + + /** + * URI of the PSC network attachment the NIC is attached to (if relevant). + * + * Generated from protobuf field string psc_network_attachment_uri = 9; + * @return string + */ + public function getPscNetworkAttachmentUri() + { + return $this->psc_network_attachment_uri; + } + + /** + * URI of the PSC network attachment the NIC is attached to (if relevant). + * + * Generated from protobuf field string psc_network_attachment_uri = 9; + * @param string $var + * @return $this + */ + public function setPscNetworkAttachmentUri($var) + { + GPBUtil::checkString($var, True); + $this->psc_network_attachment_uri = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LatencyDistribution.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LatencyDistribution.php new file mode 100644 index 000000000000..0c62df4ba113 --- /dev/null +++ b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LatencyDistribution.php @@ -0,0 +1,67 @@ +google.cloud.networkmanagement.v1.LatencyDistribution + */ +class LatencyDistribution extends \Google\Protobuf\Internal\Message +{ + /** + * Representative latency percentiles. + * + * Generated from protobuf field repeated .google.cloud.networkmanagement.v1.LatencyPercentile latency_percentiles = 1; + */ + private $latency_percentiles; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\NetworkManagement\V1\LatencyPercentile>|\Google\Protobuf\Internal\RepeatedField $latency_percentiles + * Representative latency percentiles. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkmanagement\V1\ConnectivityTest::initOnce(); + parent::__construct($data); + } + + /** + * Representative latency percentiles. + * + * Generated from protobuf field repeated .google.cloud.networkmanagement.v1.LatencyPercentile latency_percentiles = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getLatencyPercentiles() + { + return $this->latency_percentiles; + } + + /** + * Representative latency percentiles. + * + * Generated from protobuf field repeated .google.cloud.networkmanagement.v1.LatencyPercentile latency_percentiles = 1; + * @param array<\Google\Cloud\NetworkManagement\V1\LatencyPercentile>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setLatencyPercentiles($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkManagement\V1\LatencyPercentile::class); + $this->latency_percentiles = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LatencyPercentile.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LatencyPercentile.php new file mode 100644 index 000000000000..850e7f81bad8 --- /dev/null +++ b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LatencyPercentile.php @@ -0,0 +1,109 @@ +google.cloud.networkmanagement.v1.LatencyPercentile + */ +class LatencyPercentile extends \Google\Protobuf\Internal\Message +{ + /** + * Percentage of samples this data point applies to. + * + * Generated from protobuf field int32 percent = 1; + */ + protected $percent = 0; + /** + * percent-th percentile of latency observed, in microseconds. + * Fraction of percent/100 of samples have latency lower or + * equal to the value of this field. + * + * Generated from protobuf field int64 latency_micros = 2; + */ + protected $latency_micros = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $percent + * Percentage of samples this data point applies to. + * @type int|string $latency_micros + * percent-th percentile of latency observed, in microseconds. + * Fraction of percent/100 of samples have latency lower or + * equal to the value of this field. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkmanagement\V1\ConnectivityTest::initOnce(); + parent::__construct($data); + } + + /** + * Percentage of samples this data point applies to. + * + * Generated from protobuf field int32 percent = 1; + * @return int + */ + public function getPercent() + { + return $this->percent; + } + + /** + * Percentage of samples this data point applies to. + * + * Generated from protobuf field int32 percent = 1; + * @param int $var + * @return $this + */ + public function setPercent($var) + { + GPBUtil::checkInt32($var); + $this->percent = $var; + + return $this; + } + + /** + * percent-th percentile of latency observed, in microseconds. + * Fraction of percent/100 of samples have latency lower or + * equal to the value of this field. + * + * Generated from protobuf field int64 latency_micros = 2; + * @return int|string + */ + public function getLatencyMicros() + { + return $this->latency_micros; + } + + /** + * percent-th percentile of latency observed, in microseconds. + * Fraction of percent/100 of samples have latency lower or + * equal to the value of this field. + * + * Generated from protobuf field int64 latency_micros = 2; + * @param int|string $var + * @return $this + */ + public function setLatencyMicros($var) + { + GPBUtil::checkInt64($var); + $this->latency_micros = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ListConnectivityTestsRequest.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ListConnectivityTestsRequest.php new file mode 100644 index 000000000000..60845fff13b3 --- /dev/null +++ b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ListConnectivityTestsRequest.php @@ -0,0 +1,282 @@ +google.cloud.networkmanagement.v1.ListConnectivityTestsRequest + */ +class ListConnectivityTestsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource of the Connectivity Tests: + * `projects/{project_id}/locations/global` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Number of `ConnectivityTests` to return. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * Page token from an earlier query, as returned in `next_page_token`. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * Lists the `ConnectivityTests` that match the filter expression. A filter + * expression filters the resources listed in the response. The expression + * must be of the form ` ` where operators: `<`, `>`, + * `<=`, + * `>=`, + * `!=`, `=`, `:` are supported (colon `:` represents a HAS operator which is + * roughly synonymous with equality). can refer to a proto or JSON + * field, or a synthetic field. Field names can be camelCase or snake_case. + * Examples: + * - Filter by name: + * name = "projects/proj-1/locations/global/connectivityTests/test-1 + * - Filter by labels: + * - Resources that have a key called `foo` + * labels.foo:* + * - Resources that have a key called `foo` whose value is `bar` + * labels.foo = bar + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + /** + * Field to use to sort the list. + * + * Generated from protobuf field string order_by = 5; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The parent resource of the Connectivity Tests: + * `projects/{project_id}/locations/global` + * Please see {@see ReachabilityServiceClient::projectName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkManagement\V1\ListConnectivityTestsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource of the Connectivity Tests: + * `projects/{project_id}/locations/global` + * @type int $page_size + * Number of `ConnectivityTests` to return. + * @type string $page_token + * Page token from an earlier query, as returned in `next_page_token`. + * @type string $filter + * Lists the `ConnectivityTests` that match the filter expression. A filter + * expression filters the resources listed in the response. The expression + * must be of the form ` ` where operators: `<`, `>`, + * `<=`, + * `>=`, + * `!=`, `=`, `:` are supported (colon `:` represents a HAS operator which is + * roughly synonymous with equality). can refer to a proto or JSON + * field, or a synthetic field. Field names can be camelCase or snake_case. + * Examples: + * - Filter by name: + * name = "projects/proj-1/locations/global/connectivityTests/test-1 + * - Filter by labels: + * - Resources that have a key called `foo` + * labels.foo:* + * - Resources that have a key called `foo` whose value is `bar` + * labels.foo = bar + * @type string $order_by + * Field to use to sort the list. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkmanagement\V1\Reachability::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource of the Connectivity Tests: + * `projects/{project_id}/locations/global` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource of the Connectivity Tests: + * `projects/{project_id}/locations/global` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Number of `ConnectivityTests` to return. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Number of `ConnectivityTests` to return. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Page token from an earlier query, as returned in `next_page_token`. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Page token from an earlier query, as returned in `next_page_token`. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Lists the `ConnectivityTests` that match the filter expression. A filter + * expression filters the resources listed in the response. The expression + * must be of the form ` ` where operators: `<`, `>`, + * `<=`, + * `>=`, + * `!=`, `=`, `:` are supported (colon `:` represents a HAS operator which is + * roughly synonymous with equality). can refer to a proto or JSON + * field, or a synthetic field. Field names can be camelCase or snake_case. + * Examples: + * - Filter by name: + * name = "projects/proj-1/locations/global/connectivityTests/test-1 + * - Filter by labels: + * - Resources that have a key called `foo` + * labels.foo:* + * - Resources that have a key called `foo` whose value is `bar` + * labels.foo = bar + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Lists the `ConnectivityTests` that match the filter expression. A filter + * expression filters the resources listed in the response. The expression + * must be of the form ` ` where operators: `<`, `>`, + * `<=`, + * `>=`, + * `!=`, `=`, `:` are supported (colon `:` represents a HAS operator which is + * roughly synonymous with equality). can refer to a proto or JSON + * field, or a synthetic field. Field names can be camelCase or snake_case. + * Examples: + * - Filter by name: + * name = "projects/proj-1/locations/global/connectivityTests/test-1 + * - Filter by labels: + * - Resources that have a key called `foo` + * labels.foo:* + * - Resources that have a key called `foo` whose value is `bar` + * labels.foo = bar + * + * Generated from protobuf field string filter = 4; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Field to use to sort the list. + * + * Generated from protobuf field string order_by = 5; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Field to use to sort the list. + * + * Generated from protobuf field string order_by = 5; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ListConnectivityTestsResponse.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ListConnectivityTestsResponse.php new file mode 100644 index 000000000000..c026cd03326a --- /dev/null +++ b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ListConnectivityTestsResponse.php @@ -0,0 +1,135 @@ +google.cloud.networkmanagement.v1.ListConnectivityTestsResponse + */ +class ListConnectivityTestsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * List of Connectivity Tests. + * + * Generated from protobuf field repeated .google.cloud.networkmanagement.v1.ConnectivityTest resources = 1; + */ + private $resources; + /** + * Page token to fetch the next set of Connectivity Tests. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached (when querying all locations with `-`). + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\NetworkManagement\V1\ConnectivityTest>|\Google\Protobuf\Internal\RepeatedField $resources + * List of Connectivity Tests. + * @type string $next_page_token + * Page token to fetch the next set of Connectivity Tests. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached (when querying all locations with `-`). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkmanagement\V1\Reachability::initOnce(); + parent::__construct($data); + } + + /** + * List of Connectivity Tests. + * + * Generated from protobuf field repeated .google.cloud.networkmanagement.v1.ConnectivityTest resources = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getResources() + { + return $this->resources; + } + + /** + * List of Connectivity Tests. + * + * Generated from protobuf field repeated .google.cloud.networkmanagement.v1.ConnectivityTest resources = 1; + * @param array<\Google\Cloud\NetworkManagement\V1\ConnectivityTest>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setResources($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkManagement\V1\ConnectivityTest::class); + $this->resources = $arr; + + return $this; + } + + /** + * Page token to fetch the next set of Connectivity Tests. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Page token to fetch the next set of Connectivity Tests. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Locations that could not be reached (when querying all locations with `-`). + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached (when querying all locations with `-`). + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LoadBalancerBackend.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LoadBalancerBackend.php new file mode 100644 index 000000000000..b4b0114164fb --- /dev/null +++ b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LoadBalancerBackend.php @@ -0,0 +1,203 @@ +google.cloud.networkmanagement.v1.LoadBalancerBackend + */ +class LoadBalancerBackend extends \Google\Protobuf\Internal\Message +{ + /** + * Name of a Compute Engine instance or network endpoint. + * + * Generated from protobuf field string display_name = 1; + */ + protected $display_name = ''; + /** + * URI of a Compute Engine instance or network endpoint. + * + * Generated from protobuf field string uri = 2; + */ + protected $uri = ''; + /** + * State of the health check firewall configuration. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState health_check_firewall_state = 3; + */ + protected $health_check_firewall_state = 0; + /** + * A list of firewall rule URIs allowing probes from health check IP ranges. + * + * Generated from protobuf field repeated string health_check_allowing_firewall_rules = 4; + */ + private $health_check_allowing_firewall_rules; + /** + * A list of firewall rule URIs blocking probes from health check IP ranges. + * + * Generated from protobuf field repeated string health_check_blocking_firewall_rules = 5; + */ + private $health_check_blocking_firewall_rules; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $display_name + * Name of a Compute Engine instance or network endpoint. + * @type string $uri + * URI of a Compute Engine instance or network endpoint. + * @type int $health_check_firewall_state + * State of the health check firewall configuration. + * @type array|\Google\Protobuf\Internal\RepeatedField $health_check_allowing_firewall_rules + * A list of firewall rule URIs allowing probes from health check IP ranges. + * @type array|\Google\Protobuf\Internal\RepeatedField $health_check_blocking_firewall_rules + * A list of firewall rule URIs blocking probes from health check IP ranges. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkmanagement\V1\Trace::initOnce(); + parent::__construct($data); + } + + /** + * Name of a Compute Engine instance or network endpoint. + * + * Generated from protobuf field string display_name = 1; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Name of a Compute Engine instance or network endpoint. + * + * Generated from protobuf field string display_name = 1; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * URI of a Compute Engine instance or network endpoint. + * + * Generated from protobuf field string uri = 2; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * URI of a Compute Engine instance or network endpoint. + * + * Generated from protobuf field string uri = 2; + * @param string $var + * @return $this + */ + public function setUri($var) + { + GPBUtil::checkString($var, True); + $this->uri = $var; + + return $this; + } + + /** + * State of the health check firewall configuration. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState health_check_firewall_state = 3; + * @return int + */ + public function getHealthCheckFirewallState() + { + return $this->health_check_firewall_state; + } + + /** + * State of the health check firewall configuration. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState health_check_firewall_state = 3; + * @param int $var + * @return $this + */ + public function setHealthCheckFirewallState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetworkManagement\V1\LoadBalancerBackend\HealthCheckFirewallState::class); + $this->health_check_firewall_state = $var; + + return $this; + } + + /** + * A list of firewall rule URIs allowing probes from health check IP ranges. + * + * Generated from protobuf field repeated string health_check_allowing_firewall_rules = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getHealthCheckAllowingFirewallRules() + { + return $this->health_check_allowing_firewall_rules; + } + + /** + * A list of firewall rule URIs allowing probes from health check IP ranges. + * + * Generated from protobuf field repeated string health_check_allowing_firewall_rules = 4; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setHealthCheckAllowingFirewallRules($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->health_check_allowing_firewall_rules = $arr; + + return $this; + } + + /** + * A list of firewall rule URIs blocking probes from health check IP ranges. + * + * Generated from protobuf field repeated string health_check_blocking_firewall_rules = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getHealthCheckBlockingFirewallRules() + { + return $this->health_check_blocking_firewall_rules; + } + + /** + * A list of firewall rule URIs blocking probes from health check IP ranges. + * + * Generated from protobuf field repeated string health_check_blocking_firewall_rules = 5; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setHealthCheckBlockingFirewallRules($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->health_check_blocking_firewall_rules = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LoadBalancerBackend/HealthCheckFirewallState.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LoadBalancerBackend/HealthCheckFirewallState.php new file mode 100644 index 000000000000..ebf941b4b52e --- /dev/null +++ b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LoadBalancerBackend/HealthCheckFirewallState.php @@ -0,0 +1,69 @@ +google.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState + */ +class HealthCheckFirewallState +{ + /** + * State is unspecified. Default state if not populated. + * + * Generated from protobuf enum HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED = 0; + */ + const HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED = 0; + /** + * There are configured firewall rules to allow health check probes to the + * backend. + * + * Generated from protobuf enum CONFIGURED = 1; + */ + const CONFIGURED = 1; + /** + * There are firewall rules configured to allow partial health check ranges + * or block all health check ranges. + * If a health check probe is sent from denied IP ranges, + * the health check to the backend will fail. Then, the backend will be + * marked unhealthy and will not receive traffic sent to the load balancer. + * + * Generated from protobuf enum MISCONFIGURED = 2; + */ + const MISCONFIGURED = 2; + + private static $valueToName = [ + self::HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED => 'HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED', + self::CONFIGURED => 'CONFIGURED', + self::MISCONFIGURED => 'MISCONFIGURED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(HealthCheckFirewallState::class, \Google\Cloud\NetworkManagement\V1\LoadBalancerBackend_HealthCheckFirewallState::class); + diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LoadBalancerBackendInfo.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LoadBalancerBackendInfo.php new file mode 100644 index 000000000000..0fb0d2efa27b --- /dev/null +++ b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LoadBalancerBackendInfo.php @@ -0,0 +1,409 @@ +google.cloud.networkmanagement.v1.LoadBalancerBackendInfo + */ +class LoadBalancerBackendInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Display name of the backend. For example, it might be an instance name for + * the instance group backends, or an IP address and port for zonal network + * endpoint group backends. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * URI of the backend instance (if applicable). Populated for instance group + * backends, and zonal NEG backends. + * + * Generated from protobuf field string instance_uri = 2; + */ + protected $instance_uri = ''; + /** + * URI of the backend service this backend belongs to (if applicable). + * + * Generated from protobuf field string backend_service_uri = 3; + */ + protected $backend_service_uri = ''; + /** + * URI of the instance group this backend belongs to (if applicable). + * + * Generated from protobuf field string instance_group_uri = 4; + */ + protected $instance_group_uri = ''; + /** + * URI of the network endpoint group this backend belongs to (if applicable). + * + * Generated from protobuf field string network_endpoint_group_uri = 5; + */ + protected $network_endpoint_group_uri = ''; + /** + * URI of the backend bucket this backend targets (if applicable). + * + * Generated from protobuf field string backend_bucket_uri = 8; + */ + protected $backend_bucket_uri = ''; + /** + * URI of the PSC service attachment this PSC NEG backend targets (if + * applicable). + * + * Generated from protobuf field string psc_service_attachment_uri = 9; + */ + protected $psc_service_attachment_uri = ''; + /** + * PSC Google API target this PSC NEG backend targets (if applicable). + * + * Generated from protobuf field string psc_google_api_target = 10; + */ + protected $psc_google_api_target = ''; + /** + * URI of the health check attached to this backend (if applicable). + * + * Generated from protobuf field string health_check_uri = 6; + */ + protected $health_check_uri = ''; + /** + * Output only. Health check firewalls configuration state for the backend. + * This is a result of the static firewall analysis (verifying that health + * check traffic from required IP ranges to the backend is allowed or not). + * The backend might still be unhealthy even if these firewalls are + * configured. Please refer to the documentation for more information: + * https://cloud.google.com/load-balancing/docs/firewall-rules + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigState health_check_firewalls_config_state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $health_check_firewalls_config_state = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Display name of the backend. For example, it might be an instance name for + * the instance group backends, or an IP address and port for zonal network + * endpoint group backends. + * @type string $instance_uri + * URI of the backend instance (if applicable). Populated for instance group + * backends, and zonal NEG backends. + * @type string $backend_service_uri + * URI of the backend service this backend belongs to (if applicable). + * @type string $instance_group_uri + * URI of the instance group this backend belongs to (if applicable). + * @type string $network_endpoint_group_uri + * URI of the network endpoint group this backend belongs to (if applicable). + * @type string $backend_bucket_uri + * URI of the backend bucket this backend targets (if applicable). + * @type string $psc_service_attachment_uri + * URI of the PSC service attachment this PSC NEG backend targets (if + * applicable). + * @type string $psc_google_api_target + * PSC Google API target this PSC NEG backend targets (if applicable). + * @type string $health_check_uri + * URI of the health check attached to this backend (if applicable). + * @type int $health_check_firewalls_config_state + * Output only. Health check firewalls configuration state for the backend. + * This is a result of the static firewall analysis (verifying that health + * check traffic from required IP ranges to the backend is allowed or not). + * The backend might still be unhealthy even if these firewalls are + * configured. Please refer to the documentation for more information: + * https://cloud.google.com/load-balancing/docs/firewall-rules + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkmanagement\V1\Trace::initOnce(); + parent::__construct($data); + } + + /** + * Display name of the backend. For example, it might be an instance name for + * the instance group backends, or an IP address and port for zonal network + * endpoint group backends. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Display name of the backend. For example, it might be an instance name for + * the instance group backends, or an IP address and port for zonal network + * endpoint group backends. + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * URI of the backend instance (if applicable). Populated for instance group + * backends, and zonal NEG backends. + * + * Generated from protobuf field string instance_uri = 2; + * @return string + */ + public function getInstanceUri() + { + return $this->instance_uri; + } + + /** + * URI of the backend instance (if applicable). Populated for instance group + * backends, and zonal NEG backends. + * + * Generated from protobuf field string instance_uri = 2; + * @param string $var + * @return $this + */ + public function setInstanceUri($var) + { + GPBUtil::checkString($var, True); + $this->instance_uri = $var; + + return $this; + } + + /** + * URI of the backend service this backend belongs to (if applicable). + * + * Generated from protobuf field string backend_service_uri = 3; + * @return string + */ + public function getBackendServiceUri() + { + return $this->backend_service_uri; + } + + /** + * URI of the backend service this backend belongs to (if applicable). + * + * Generated from protobuf field string backend_service_uri = 3; + * @param string $var + * @return $this + */ + public function setBackendServiceUri($var) + { + GPBUtil::checkString($var, True); + $this->backend_service_uri = $var; + + return $this; + } + + /** + * URI of the instance group this backend belongs to (if applicable). + * + * Generated from protobuf field string instance_group_uri = 4; + * @return string + */ + public function getInstanceGroupUri() + { + return $this->instance_group_uri; + } + + /** + * URI of the instance group this backend belongs to (if applicable). + * + * Generated from protobuf field string instance_group_uri = 4; + * @param string $var + * @return $this + */ + public function setInstanceGroupUri($var) + { + GPBUtil::checkString($var, True); + $this->instance_group_uri = $var; + + return $this; + } + + /** + * URI of the network endpoint group this backend belongs to (if applicable). + * + * Generated from protobuf field string network_endpoint_group_uri = 5; + * @return string + */ + public function getNetworkEndpointGroupUri() + { + return $this->network_endpoint_group_uri; + } + + /** + * URI of the network endpoint group this backend belongs to (if applicable). + * + * Generated from protobuf field string network_endpoint_group_uri = 5; + * @param string $var + * @return $this + */ + public function setNetworkEndpointGroupUri($var) + { + GPBUtil::checkString($var, True); + $this->network_endpoint_group_uri = $var; + + return $this; + } + + /** + * URI of the backend bucket this backend targets (if applicable). + * + * Generated from protobuf field string backend_bucket_uri = 8; + * @return string + */ + public function getBackendBucketUri() + { + return $this->backend_bucket_uri; + } + + /** + * URI of the backend bucket this backend targets (if applicable). + * + * Generated from protobuf field string backend_bucket_uri = 8; + * @param string $var + * @return $this + */ + public function setBackendBucketUri($var) + { + GPBUtil::checkString($var, True); + $this->backend_bucket_uri = $var; + + return $this; + } + + /** + * URI of the PSC service attachment this PSC NEG backend targets (if + * applicable). + * + * Generated from protobuf field string psc_service_attachment_uri = 9; + * @return string + */ + public function getPscServiceAttachmentUri() + { + return $this->psc_service_attachment_uri; + } + + /** + * URI of the PSC service attachment this PSC NEG backend targets (if + * applicable). + * + * Generated from protobuf field string psc_service_attachment_uri = 9; + * @param string $var + * @return $this + */ + public function setPscServiceAttachmentUri($var) + { + GPBUtil::checkString($var, True); + $this->psc_service_attachment_uri = $var; + + return $this; + } + + /** + * PSC Google API target this PSC NEG backend targets (if applicable). + * + * Generated from protobuf field string psc_google_api_target = 10; + * @return string + */ + public function getPscGoogleApiTarget() + { + return $this->psc_google_api_target; + } + + /** + * PSC Google API target this PSC NEG backend targets (if applicable). + * + * Generated from protobuf field string psc_google_api_target = 10; + * @param string $var + * @return $this + */ + public function setPscGoogleApiTarget($var) + { + GPBUtil::checkString($var, True); + $this->psc_google_api_target = $var; + + return $this; + } + + /** + * URI of the health check attached to this backend (if applicable). + * + * Generated from protobuf field string health_check_uri = 6; + * @return string + */ + public function getHealthCheckUri() + { + return $this->health_check_uri; + } + + /** + * URI of the health check attached to this backend (if applicable). + * + * Generated from protobuf field string health_check_uri = 6; + * @param string $var + * @return $this + */ + public function setHealthCheckUri($var) + { + GPBUtil::checkString($var, True); + $this->health_check_uri = $var; + + return $this; + } + + /** + * Output only. Health check firewalls configuration state for the backend. + * This is a result of the static firewall analysis (verifying that health + * check traffic from required IP ranges to the backend is allowed or not). + * The backend might still be unhealthy even if these firewalls are + * configured. Please refer to the documentation for more information: + * https://cloud.google.com/load-balancing/docs/firewall-rules + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigState health_check_firewalls_config_state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getHealthCheckFirewallsConfigState() + { + return $this->health_check_firewalls_config_state; + } + + /** + * Output only. Health check firewalls configuration state for the backend. + * This is a result of the static firewall analysis (verifying that health + * check traffic from required IP ranges to the backend is allowed or not). + * The backend might still be unhealthy even if these firewalls are + * configured. Please refer to the documentation for more information: + * https://cloud.google.com/load-balancing/docs/firewall-rules + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigState health_check_firewalls_config_state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setHealthCheckFirewallsConfigState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetworkManagement\V1\LoadBalancerBackendInfo\HealthCheckFirewallsConfigState::class); + $this->health_check_firewalls_config_state = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LoadBalancerBackendInfo/HealthCheckFirewallsConfigState.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LoadBalancerBackendInfo/HealthCheckFirewallsConfigState.php new file mode 100644 index 000000000000..4ca34e3878b2 --- /dev/null +++ b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LoadBalancerBackendInfo/HealthCheckFirewallsConfigState.php @@ -0,0 +1,86 @@ +google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigState + */ +class HealthCheckFirewallsConfigState +{ + /** + * Configuration state unspecified. It usually means that the backend has + * no health check attached, or there was an unexpected configuration error + * preventing Connectivity tests from verifying health check configuration. + * + * Generated from protobuf enum HEALTH_CHECK_FIREWALLS_CONFIG_STATE_UNSPECIFIED = 0; + */ + const HEALTH_CHECK_FIREWALLS_CONFIG_STATE_UNSPECIFIED = 0; + /** + * Firewall rules (policies) allowing health check traffic from all required + * IP ranges to the backend are configured. + * + * Generated from protobuf enum FIREWALLS_CONFIGURED = 1; + */ + const FIREWALLS_CONFIGURED = 1; + /** + * Firewall rules (policies) allow health check traffic only from a part of + * required IP ranges. + * + * Generated from protobuf enum FIREWALLS_PARTIALLY_CONFIGURED = 2; + */ + const FIREWALLS_PARTIALLY_CONFIGURED = 2; + /** + * Firewall rules (policies) deny health check traffic from all required + * IP ranges to the backend. + * + * Generated from protobuf enum FIREWALLS_NOT_CONFIGURED = 3; + */ + const FIREWALLS_NOT_CONFIGURED = 3; + /** + * The network contains firewall rules of unsupported types, so Connectivity + * tests were not able to verify health check configuration status. Please + * refer to the documentation for the list of unsupported configurations: + * https://cloud.google.com/network-intelligence-center/docs/connectivity-tests/concepts/overview#unsupported-configs + * + * Generated from protobuf enum FIREWALLS_UNSUPPORTED = 4; + */ + const FIREWALLS_UNSUPPORTED = 4; + + private static $valueToName = [ + self::HEALTH_CHECK_FIREWALLS_CONFIG_STATE_UNSPECIFIED => 'HEALTH_CHECK_FIREWALLS_CONFIG_STATE_UNSPECIFIED', + self::FIREWALLS_CONFIGURED => 'FIREWALLS_CONFIGURED', + self::FIREWALLS_PARTIALLY_CONFIGURED => 'FIREWALLS_PARTIALLY_CONFIGURED', + self::FIREWALLS_NOT_CONFIGURED => 'FIREWALLS_NOT_CONFIGURED', + self::FIREWALLS_UNSUPPORTED => 'FIREWALLS_UNSUPPORTED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(HealthCheckFirewallsConfigState::class, \Google\Cloud\NetworkManagement\V1\LoadBalancerBackendInfo_HealthCheckFirewallsConfigState::class); + diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LoadBalancerInfo.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LoadBalancerInfo.php new file mode 100644 index 000000000000..a2d316979dcf --- /dev/null +++ b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LoadBalancerInfo.php @@ -0,0 +1,216 @@ +google.cloud.networkmanagement.v1.LoadBalancerInfo + */ +class LoadBalancerInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Type of the load balancer. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType load_balancer_type = 1; + */ + protected $load_balancer_type = 0; + /** + * URI of the health check for the load balancer. Deprecated and no longer + * populated as different load balancer backends might have different health + * checks. + * + * Generated from protobuf field string health_check_uri = 2 [deprecated = true]; + * @deprecated + */ + protected $health_check_uri = ''; + /** + * Information for the loadbalancer backends. + * + * Generated from protobuf field repeated .google.cloud.networkmanagement.v1.LoadBalancerBackend backends = 3; + */ + private $backends; + /** + * Type of load balancer's backend configuration. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType backend_type = 4; + */ + protected $backend_type = 0; + /** + * Backend configuration URI. + * + * Generated from protobuf field string backend_uri = 5; + */ + protected $backend_uri = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $load_balancer_type + * Type of the load balancer. + * @type string $health_check_uri + * URI of the health check for the load balancer. Deprecated and no longer + * populated as different load balancer backends might have different health + * checks. + * @type array<\Google\Cloud\NetworkManagement\V1\LoadBalancerBackend>|\Google\Protobuf\Internal\RepeatedField $backends + * Information for the loadbalancer backends. + * @type int $backend_type + * Type of load balancer's backend configuration. + * @type string $backend_uri + * Backend configuration URI. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkmanagement\V1\Trace::initOnce(); + parent::__construct($data); + } + + /** + * Type of the load balancer. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType load_balancer_type = 1; + * @return int + */ + public function getLoadBalancerType() + { + return $this->load_balancer_type; + } + + /** + * Type of the load balancer. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType load_balancer_type = 1; + * @param int $var + * @return $this + */ + public function setLoadBalancerType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetworkManagement\V1\LoadBalancerInfo\LoadBalancerType::class); + $this->load_balancer_type = $var; + + return $this; + } + + /** + * URI of the health check for the load balancer. Deprecated and no longer + * populated as different load balancer backends might have different health + * checks. + * + * Generated from protobuf field string health_check_uri = 2 [deprecated = true]; + * @return string + * @deprecated + */ + public function getHealthCheckUri() + { + @trigger_error('health_check_uri is deprecated.', E_USER_DEPRECATED); + return $this->health_check_uri; + } + + /** + * URI of the health check for the load balancer. Deprecated and no longer + * populated as different load balancer backends might have different health + * checks. + * + * Generated from protobuf field string health_check_uri = 2 [deprecated = true]; + * @param string $var + * @return $this + * @deprecated + */ + public function setHealthCheckUri($var) + { + @trigger_error('health_check_uri is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkString($var, True); + $this->health_check_uri = $var; + + return $this; + } + + /** + * Information for the loadbalancer backends. + * + * Generated from protobuf field repeated .google.cloud.networkmanagement.v1.LoadBalancerBackend backends = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getBackends() + { + return $this->backends; + } + + /** + * Information for the loadbalancer backends. + * + * Generated from protobuf field repeated .google.cloud.networkmanagement.v1.LoadBalancerBackend backends = 3; + * @param array<\Google\Cloud\NetworkManagement\V1\LoadBalancerBackend>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setBackends($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkManagement\V1\LoadBalancerBackend::class); + $this->backends = $arr; + + return $this; + } + + /** + * Type of load balancer's backend configuration. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType backend_type = 4; + * @return int + */ + public function getBackendType() + { + return $this->backend_type; + } + + /** + * Type of load balancer's backend configuration. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType backend_type = 4; + * @param int $var + * @return $this + */ + public function setBackendType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetworkManagement\V1\LoadBalancerInfo\BackendType::class); + $this->backend_type = $var; + + return $this; + } + + /** + * Backend configuration URI. + * + * Generated from protobuf field string backend_uri = 5; + * @return string + */ + public function getBackendUri() + { + return $this->backend_uri; + } + + /** + * Backend configuration URI. + * + * Generated from protobuf field string backend_uri = 5; + * @param string $var + * @return $this + */ + public function setBackendUri($var) + { + GPBUtil::checkString($var, True); + $this->backend_uri = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LoadBalancerInfo/BackendType.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LoadBalancerInfo/BackendType.php new file mode 100644 index 000000000000..6b984fd67be6 --- /dev/null +++ b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LoadBalancerInfo/BackendType.php @@ -0,0 +1,71 @@ +google.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType + */ +class BackendType +{ + /** + * Type is unspecified. + * + * Generated from protobuf enum BACKEND_TYPE_UNSPECIFIED = 0; + */ + const BACKEND_TYPE_UNSPECIFIED = 0; + /** + * Backend Service as the load balancer's backend. + * + * Generated from protobuf enum BACKEND_SERVICE = 1; + */ + const BACKEND_SERVICE = 1; + /** + * Target Pool as the load balancer's backend. + * + * Generated from protobuf enum TARGET_POOL = 2; + */ + const TARGET_POOL = 2; + /** + * Target Instance as the load balancer's backend. + * + * Generated from protobuf enum TARGET_INSTANCE = 3; + */ + const TARGET_INSTANCE = 3; + + private static $valueToName = [ + self::BACKEND_TYPE_UNSPECIFIED => 'BACKEND_TYPE_UNSPECIFIED', + self::BACKEND_SERVICE => 'BACKEND_SERVICE', + self::TARGET_POOL => 'TARGET_POOL', + self::TARGET_INSTANCE => 'TARGET_INSTANCE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(BackendType::class, \Google\Cloud\NetworkManagement\V1\LoadBalancerInfo_BackendType::class); + diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LoadBalancerInfo/LoadBalancerType.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LoadBalancerInfo/LoadBalancerType.php new file mode 100644 index 000000000000..ee000a238478 --- /dev/null +++ b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LoadBalancerInfo/LoadBalancerType.php @@ -0,0 +1,85 @@ +google.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType + */ +class LoadBalancerType +{ + /** + * Type is unspecified. + * + * Generated from protobuf enum LOAD_BALANCER_TYPE_UNSPECIFIED = 0; + */ + const LOAD_BALANCER_TYPE_UNSPECIFIED = 0; + /** + * Internal TCP/UDP load balancer. + * + * Generated from protobuf enum INTERNAL_TCP_UDP = 1; + */ + const INTERNAL_TCP_UDP = 1; + /** + * Network TCP/UDP load balancer. + * + * Generated from protobuf enum NETWORK_TCP_UDP = 2; + */ + const NETWORK_TCP_UDP = 2; + /** + * HTTP(S) proxy load balancer. + * + * Generated from protobuf enum HTTP_PROXY = 3; + */ + const HTTP_PROXY = 3; + /** + * TCP proxy load balancer. + * + * Generated from protobuf enum TCP_PROXY = 4; + */ + const TCP_PROXY = 4; + /** + * SSL proxy load balancer. + * + * Generated from protobuf enum SSL_PROXY = 5; + */ + const SSL_PROXY = 5; + + private static $valueToName = [ + self::LOAD_BALANCER_TYPE_UNSPECIFIED => 'LOAD_BALANCER_TYPE_UNSPECIFIED', + self::INTERNAL_TCP_UDP => 'INTERNAL_TCP_UDP', + self::NETWORK_TCP_UDP => 'NETWORK_TCP_UDP', + self::HTTP_PROXY => 'HTTP_PROXY', + self::TCP_PROXY => 'TCP_PROXY', + self::SSL_PROXY => 'SSL_PROXY', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(LoadBalancerType::class, \Google\Cloud\NetworkManagement\V1\LoadBalancerInfo_LoadBalancerType::class); + diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LoadBalancerType.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LoadBalancerType.php new file mode 100644 index 000000000000..12dcb4c5e14b --- /dev/null +++ b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LoadBalancerType.php @@ -0,0 +1,120 @@ +google.cloud.networkmanagement.v1.LoadBalancerType + */ +class LoadBalancerType +{ + /** + * Forwarding rule points to a different target than a load balancer or a + * load balancer type is unknown. + * + * Generated from protobuf enum LOAD_BALANCER_TYPE_UNSPECIFIED = 0; + */ + const LOAD_BALANCER_TYPE_UNSPECIFIED = 0; + /** + * Global external HTTP(S) load balancer. + * + * Generated from protobuf enum HTTPS_ADVANCED_LOAD_BALANCER = 1; + */ + const HTTPS_ADVANCED_LOAD_BALANCER = 1; + /** + * Global external HTTP(S) load balancer (classic) + * + * Generated from protobuf enum HTTPS_LOAD_BALANCER = 2; + */ + const HTTPS_LOAD_BALANCER = 2; + /** + * Regional external HTTP(S) load balancer. + * + * Generated from protobuf enum REGIONAL_HTTPS_LOAD_BALANCER = 3; + */ + const REGIONAL_HTTPS_LOAD_BALANCER = 3; + /** + * Internal HTTP(S) load balancer. + * + * Generated from protobuf enum INTERNAL_HTTPS_LOAD_BALANCER = 4; + */ + const INTERNAL_HTTPS_LOAD_BALANCER = 4; + /** + * External SSL proxy load balancer. + * + * Generated from protobuf enum SSL_PROXY_LOAD_BALANCER = 5; + */ + const SSL_PROXY_LOAD_BALANCER = 5; + /** + * External TCP proxy load balancer. + * + * Generated from protobuf enum TCP_PROXY_LOAD_BALANCER = 6; + */ + const TCP_PROXY_LOAD_BALANCER = 6; + /** + * Internal regional TCP proxy load balancer. + * + * Generated from protobuf enum INTERNAL_TCP_PROXY_LOAD_BALANCER = 7; + */ + const INTERNAL_TCP_PROXY_LOAD_BALANCER = 7; + /** + * External TCP/UDP Network load balancer. + * + * Generated from protobuf enum NETWORK_LOAD_BALANCER = 8; + */ + const NETWORK_LOAD_BALANCER = 8; + /** + * Target-pool based external TCP/UDP Network load balancer. + * + * Generated from protobuf enum LEGACY_NETWORK_LOAD_BALANCER = 9; + */ + const LEGACY_NETWORK_LOAD_BALANCER = 9; + /** + * Internal TCP/UDP load balancer. + * + * Generated from protobuf enum TCP_UDP_INTERNAL_LOAD_BALANCER = 10; + */ + const TCP_UDP_INTERNAL_LOAD_BALANCER = 10; + + private static $valueToName = [ + self::LOAD_BALANCER_TYPE_UNSPECIFIED => 'LOAD_BALANCER_TYPE_UNSPECIFIED', + self::HTTPS_ADVANCED_LOAD_BALANCER => 'HTTPS_ADVANCED_LOAD_BALANCER', + self::HTTPS_LOAD_BALANCER => 'HTTPS_LOAD_BALANCER', + self::REGIONAL_HTTPS_LOAD_BALANCER => 'REGIONAL_HTTPS_LOAD_BALANCER', + self::INTERNAL_HTTPS_LOAD_BALANCER => 'INTERNAL_HTTPS_LOAD_BALANCER', + self::SSL_PROXY_LOAD_BALANCER => 'SSL_PROXY_LOAD_BALANCER', + self::TCP_PROXY_LOAD_BALANCER => 'TCP_PROXY_LOAD_BALANCER', + self::INTERNAL_TCP_PROXY_LOAD_BALANCER => 'INTERNAL_TCP_PROXY_LOAD_BALANCER', + self::NETWORK_LOAD_BALANCER => 'NETWORK_LOAD_BALANCER', + self::LEGACY_NETWORK_LOAD_BALANCER => 'LEGACY_NETWORK_LOAD_BALANCER', + self::TCP_UDP_INTERNAL_LOAD_BALANCER => 'TCP_UDP_INTERNAL_LOAD_BALANCER', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/NatInfo.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/NatInfo.php new file mode 100644 index 000000000000..0b290c387878 --- /dev/null +++ b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/NatInfo.php @@ -0,0 +1,483 @@ +google.cloud.networkmanagement.v1.NatInfo + */ +class NatInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Type of NAT. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.NatInfo.Type type = 1; + */ + protected $type = 0; + /** + * IP protocol in string format, for example: "TCP", "UDP", "ICMP". + * + * Generated from protobuf field string protocol = 2; + */ + protected $protocol = ''; + /** + * URI of the network where NAT translation takes place. + * + * Generated from protobuf field string network_uri = 3; + */ + protected $network_uri = ''; + /** + * Source IP address before NAT translation. + * + * Generated from protobuf field string old_source_ip = 4; + */ + protected $old_source_ip = ''; + /** + * Source IP address after NAT translation. + * + * Generated from protobuf field string new_source_ip = 5; + */ + protected $new_source_ip = ''; + /** + * Destination IP address before NAT translation. + * + * Generated from protobuf field string old_destination_ip = 6; + */ + protected $old_destination_ip = ''; + /** + * Destination IP address after NAT translation. + * + * Generated from protobuf field string new_destination_ip = 7; + */ + protected $new_destination_ip = ''; + /** + * Source port before NAT translation. Only valid when protocol is TCP or UDP. + * + * Generated from protobuf field int32 old_source_port = 8; + */ + protected $old_source_port = 0; + /** + * Source port after NAT translation. Only valid when protocol is TCP or UDP. + * + * Generated from protobuf field int32 new_source_port = 9; + */ + protected $new_source_port = 0; + /** + * Destination port before NAT translation. Only valid when protocol is TCP or + * UDP. + * + * Generated from protobuf field int32 old_destination_port = 10; + */ + protected $old_destination_port = 0; + /** + * Destination port after NAT translation. Only valid when protocol is TCP or + * UDP. + * + * Generated from protobuf field int32 new_destination_port = 11; + */ + protected $new_destination_port = 0; + /** + * Uri of the Cloud Router. Only valid when type is CLOUD_NAT. + * + * Generated from protobuf field string router_uri = 12; + */ + protected $router_uri = ''; + /** + * The name of Cloud NAT Gateway. Only valid when type is CLOUD_NAT. + * + * Generated from protobuf field string nat_gateway_name = 13; + */ + protected $nat_gateway_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $type + * Type of NAT. + * @type string $protocol + * IP protocol in string format, for example: "TCP", "UDP", "ICMP". + * @type string $network_uri + * URI of the network where NAT translation takes place. + * @type string $old_source_ip + * Source IP address before NAT translation. + * @type string $new_source_ip + * Source IP address after NAT translation. + * @type string $old_destination_ip + * Destination IP address before NAT translation. + * @type string $new_destination_ip + * Destination IP address after NAT translation. + * @type int $old_source_port + * Source port before NAT translation. Only valid when protocol is TCP or UDP. + * @type int $new_source_port + * Source port after NAT translation. Only valid when protocol is TCP or UDP. + * @type int $old_destination_port + * Destination port before NAT translation. Only valid when protocol is TCP or + * UDP. + * @type int $new_destination_port + * Destination port after NAT translation. Only valid when protocol is TCP or + * UDP. + * @type string $router_uri + * Uri of the Cloud Router. Only valid when type is CLOUD_NAT. + * @type string $nat_gateway_name + * The name of Cloud NAT Gateway. Only valid when type is CLOUD_NAT. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkmanagement\V1\Trace::initOnce(); + parent::__construct($data); + } + + /** + * Type of NAT. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.NatInfo.Type type = 1; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Type of NAT. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.NatInfo.Type type = 1; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetworkManagement\V1\NatInfo\Type::class); + $this->type = $var; + + return $this; + } + + /** + * IP protocol in string format, for example: "TCP", "UDP", "ICMP". + * + * Generated from protobuf field string protocol = 2; + * @return string + */ + public function getProtocol() + { + return $this->protocol; + } + + /** + * IP protocol in string format, for example: "TCP", "UDP", "ICMP". + * + * Generated from protobuf field string protocol = 2; + * @param string $var + * @return $this + */ + public function setProtocol($var) + { + GPBUtil::checkString($var, True); + $this->protocol = $var; + + return $this; + } + + /** + * URI of the network where NAT translation takes place. + * + * Generated from protobuf field string network_uri = 3; + * @return string + */ + public function getNetworkUri() + { + return $this->network_uri; + } + + /** + * URI of the network where NAT translation takes place. + * + * Generated from protobuf field string network_uri = 3; + * @param string $var + * @return $this + */ + public function setNetworkUri($var) + { + GPBUtil::checkString($var, True); + $this->network_uri = $var; + + return $this; + } + + /** + * Source IP address before NAT translation. + * + * Generated from protobuf field string old_source_ip = 4; + * @return string + */ + public function getOldSourceIp() + { + return $this->old_source_ip; + } + + /** + * Source IP address before NAT translation. + * + * Generated from protobuf field string old_source_ip = 4; + * @param string $var + * @return $this + */ + public function setOldSourceIp($var) + { + GPBUtil::checkString($var, True); + $this->old_source_ip = $var; + + return $this; + } + + /** + * Source IP address after NAT translation. + * + * Generated from protobuf field string new_source_ip = 5; + * @return string + */ + public function getNewSourceIp() + { + return $this->new_source_ip; + } + + /** + * Source IP address after NAT translation. + * + * Generated from protobuf field string new_source_ip = 5; + * @param string $var + * @return $this + */ + public function setNewSourceIp($var) + { + GPBUtil::checkString($var, True); + $this->new_source_ip = $var; + + return $this; + } + + /** + * Destination IP address before NAT translation. + * + * Generated from protobuf field string old_destination_ip = 6; + * @return string + */ + public function getOldDestinationIp() + { + return $this->old_destination_ip; + } + + /** + * Destination IP address before NAT translation. + * + * Generated from protobuf field string old_destination_ip = 6; + * @param string $var + * @return $this + */ + public function setOldDestinationIp($var) + { + GPBUtil::checkString($var, True); + $this->old_destination_ip = $var; + + return $this; + } + + /** + * Destination IP address after NAT translation. + * + * Generated from protobuf field string new_destination_ip = 7; + * @return string + */ + public function getNewDestinationIp() + { + return $this->new_destination_ip; + } + + /** + * Destination IP address after NAT translation. + * + * Generated from protobuf field string new_destination_ip = 7; + * @param string $var + * @return $this + */ + public function setNewDestinationIp($var) + { + GPBUtil::checkString($var, True); + $this->new_destination_ip = $var; + + return $this; + } + + /** + * Source port before NAT translation. Only valid when protocol is TCP or UDP. + * + * Generated from protobuf field int32 old_source_port = 8; + * @return int + */ + public function getOldSourcePort() + { + return $this->old_source_port; + } + + /** + * Source port before NAT translation. Only valid when protocol is TCP or UDP. + * + * Generated from protobuf field int32 old_source_port = 8; + * @param int $var + * @return $this + */ + public function setOldSourcePort($var) + { + GPBUtil::checkInt32($var); + $this->old_source_port = $var; + + return $this; + } + + /** + * Source port after NAT translation. Only valid when protocol is TCP or UDP. + * + * Generated from protobuf field int32 new_source_port = 9; + * @return int + */ + public function getNewSourcePort() + { + return $this->new_source_port; + } + + /** + * Source port after NAT translation. Only valid when protocol is TCP or UDP. + * + * Generated from protobuf field int32 new_source_port = 9; + * @param int $var + * @return $this + */ + public function setNewSourcePort($var) + { + GPBUtil::checkInt32($var); + $this->new_source_port = $var; + + return $this; + } + + /** + * Destination port before NAT translation. Only valid when protocol is TCP or + * UDP. + * + * Generated from protobuf field int32 old_destination_port = 10; + * @return int + */ + public function getOldDestinationPort() + { + return $this->old_destination_port; + } + + /** + * Destination port before NAT translation. Only valid when protocol is TCP or + * UDP. + * + * Generated from protobuf field int32 old_destination_port = 10; + * @param int $var + * @return $this + */ + public function setOldDestinationPort($var) + { + GPBUtil::checkInt32($var); + $this->old_destination_port = $var; + + return $this; + } + + /** + * Destination port after NAT translation. Only valid when protocol is TCP or + * UDP. + * + * Generated from protobuf field int32 new_destination_port = 11; + * @return int + */ + public function getNewDestinationPort() + { + return $this->new_destination_port; + } + + /** + * Destination port after NAT translation. Only valid when protocol is TCP or + * UDP. + * + * Generated from protobuf field int32 new_destination_port = 11; + * @param int $var + * @return $this + */ + public function setNewDestinationPort($var) + { + GPBUtil::checkInt32($var); + $this->new_destination_port = $var; + + return $this; + } + + /** + * Uri of the Cloud Router. Only valid when type is CLOUD_NAT. + * + * Generated from protobuf field string router_uri = 12; + * @return string + */ + public function getRouterUri() + { + return $this->router_uri; + } + + /** + * Uri of the Cloud Router. Only valid when type is CLOUD_NAT. + * + * Generated from protobuf field string router_uri = 12; + * @param string $var + * @return $this + */ + public function setRouterUri($var) + { + GPBUtil::checkString($var, True); + $this->router_uri = $var; + + return $this; + } + + /** + * The name of Cloud NAT Gateway. Only valid when type is CLOUD_NAT. + * + * Generated from protobuf field string nat_gateway_name = 13; + * @return string + */ + public function getNatGatewayName() + { + return $this->nat_gateway_name; + } + + /** + * The name of Cloud NAT Gateway. Only valid when type is CLOUD_NAT. + * + * Generated from protobuf field string nat_gateway_name = 13; + * @param string $var + * @return $this + */ + public function setNatGatewayName($var) + { + GPBUtil::checkString($var, True); + $this->nat_gateway_name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/NatInfo/Type.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/NatInfo/Type.php new file mode 100644 index 000000000000..ef9862445568 --- /dev/null +++ b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/NatInfo/Type.php @@ -0,0 +1,78 @@ +google.cloud.networkmanagement.v1.NatInfo.Type + */ +class Type +{ + /** + * Type is unspecified. + * + * Generated from protobuf enum TYPE_UNSPECIFIED = 0; + */ + const TYPE_UNSPECIFIED = 0; + /** + * From Compute Engine instance's internal address to external address. + * + * Generated from protobuf enum INTERNAL_TO_EXTERNAL = 1; + */ + const INTERNAL_TO_EXTERNAL = 1; + /** + * From Compute Engine instance's external address to internal address. + * + * Generated from protobuf enum EXTERNAL_TO_INTERNAL = 2; + */ + const EXTERNAL_TO_INTERNAL = 2; + /** + * Cloud NAT Gateway. + * + * Generated from protobuf enum CLOUD_NAT = 3; + */ + const CLOUD_NAT = 3; + /** + * Private service connect NAT. + * + * Generated from protobuf enum PRIVATE_SERVICE_CONNECT = 4; + */ + const PRIVATE_SERVICE_CONNECT = 4; + + private static $valueToName = [ + self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', + self::INTERNAL_TO_EXTERNAL => 'INTERNAL_TO_EXTERNAL', + self::EXTERNAL_TO_INTERNAL => 'EXTERNAL_TO_INTERNAL', + self::CLOUD_NAT => 'CLOUD_NAT', + self::PRIVATE_SERVICE_CONNECT => 'PRIVATE_SERVICE_CONNECT', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Type::class, \Google\Cloud\NetworkManagement\V1\NatInfo_Type::class); + diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/NetworkInfo.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/NetworkInfo.php new file mode 100644 index 000000000000..d148d0ea4fcb --- /dev/null +++ b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/NetworkInfo.php @@ -0,0 +1,204 @@ +google.cloud.networkmanagement.v1.NetworkInfo + */ +class NetworkInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Name of a Compute Engine network. + * + * Generated from protobuf field string display_name = 1; + */ + protected $display_name = ''; + /** + * URI of a Compute Engine network. + * + * Generated from protobuf field string uri = 2; + */ + protected $uri = ''; + /** + * URI of the subnet matching the source IP address of the test. + * + * Generated from protobuf field string matched_subnet_uri = 5; + */ + protected $matched_subnet_uri = ''; + /** + * The IP range of the subnet matching the source IP address of the test. + * + * Generated from protobuf field string matched_ip_range = 4; + */ + protected $matched_ip_range = ''; + /** + * The region of the subnet matching the source IP address of the test. + * + * Generated from protobuf field string region = 6; + */ + protected $region = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $display_name + * Name of a Compute Engine network. + * @type string $uri + * URI of a Compute Engine network. + * @type string $matched_subnet_uri + * URI of the subnet matching the source IP address of the test. + * @type string $matched_ip_range + * The IP range of the subnet matching the source IP address of the test. + * @type string $region + * The region of the subnet matching the source IP address of the test. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkmanagement\V1\Trace::initOnce(); + parent::__construct($data); + } + + /** + * Name of a Compute Engine network. + * + * Generated from protobuf field string display_name = 1; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Name of a Compute Engine network. + * + * Generated from protobuf field string display_name = 1; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * URI of a Compute Engine network. + * + * Generated from protobuf field string uri = 2; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * URI of a Compute Engine network. + * + * Generated from protobuf field string uri = 2; + * @param string $var + * @return $this + */ + public function setUri($var) + { + GPBUtil::checkString($var, True); + $this->uri = $var; + + return $this; + } + + /** + * URI of the subnet matching the source IP address of the test. + * + * Generated from protobuf field string matched_subnet_uri = 5; + * @return string + */ + public function getMatchedSubnetUri() + { + return $this->matched_subnet_uri; + } + + /** + * URI of the subnet matching the source IP address of the test. + * + * Generated from protobuf field string matched_subnet_uri = 5; + * @param string $var + * @return $this + */ + public function setMatchedSubnetUri($var) + { + GPBUtil::checkString($var, True); + $this->matched_subnet_uri = $var; + + return $this; + } + + /** + * The IP range of the subnet matching the source IP address of the test. + * + * Generated from protobuf field string matched_ip_range = 4; + * @return string + */ + public function getMatchedIpRange() + { + return $this->matched_ip_range; + } + + /** + * The IP range of the subnet matching the source IP address of the test. + * + * Generated from protobuf field string matched_ip_range = 4; + * @param string $var + * @return $this + */ + public function setMatchedIpRange($var) + { + GPBUtil::checkString($var, True); + $this->matched_ip_range = $var; + + return $this; + } + + /** + * The region of the subnet matching the source IP address of the test. + * + * Generated from protobuf field string region = 6; + * @return string + */ + public function getRegion() + { + return $this->region; + } + + /** + * The region of the subnet matching the source IP address of the test. + * + * Generated from protobuf field string region = 6; + * @param string $var + * @return $this + */ + public function setRegion($var) + { + GPBUtil::checkString($var, True); + $this->region = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/OperationMetadata.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/OperationMetadata.php new file mode 100644 index 000000000000..c063a6d1f374 --- /dev/null +++ b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/OperationMetadata.php @@ -0,0 +1,295 @@ +google.cloud.networkmanagement.v1.OperationMetadata + */ +class OperationMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; + */ + protected $create_time = null; + /** + * The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + */ + protected $end_time = null; + /** + * Target of the operation - for example + * projects/project-1/locations/global/connectivityTests/test-1 + * + * Generated from protobuf field string target = 3; + */ + protected $target = ''; + /** + * Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4; + */ + protected $verb = ''; + /** + * Human-readable status of the operation, if any. + * + * Generated from protobuf field string status_detail = 5; + */ + protected $status_detail = ''; + /** + * Specifies if cancellation was requested for the operation. + * + * Generated from protobuf field bool cancel_requested = 6; + */ + protected $cancel_requested = false; + /** + * API version. + * + * Generated from protobuf field string api_version = 7; + */ + protected $api_version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $create_time + * The time the operation was created. + * @type \Google\Protobuf\Timestamp $end_time + * The time the operation finished running. + * @type string $target + * Target of the operation - for example + * projects/project-1/locations/global/connectivityTests/test-1 + * @type string $verb + * Name of the verb executed by the operation. + * @type string $status_detail + * Human-readable status of the operation, if any. + * @type bool $cancel_requested + * Specifies if cancellation was requested for the operation. + * @type string $api_version + * API version. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkmanagement\V1\Reachability::initOnce(); + parent::__construct($data); + } + + /** + * The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEndTime() + { + return $this->end_time; + } + + public function hasEndTime() + { + return isset($this->end_time); + } + + public function clearEndTime() + { + unset($this->end_time); + } + + /** + * The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * Target of the operation - for example + * projects/project-1/locations/global/connectivityTests/test-1 + * + * Generated from protobuf field string target = 3; + * @return string + */ + public function getTarget() + { + return $this->target; + } + + /** + * Target of the operation - for example + * projects/project-1/locations/global/connectivityTests/test-1 + * + * Generated from protobuf field string target = 3; + * @param string $var + * @return $this + */ + public function setTarget($var) + { + GPBUtil::checkString($var, True); + $this->target = $var; + + return $this; + } + + /** + * Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4; + * @return string + */ + public function getVerb() + { + return $this->verb; + } + + /** + * Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4; + * @param string $var + * @return $this + */ + public function setVerb($var) + { + GPBUtil::checkString($var, True); + $this->verb = $var; + + return $this; + } + + /** + * Human-readable status of the operation, if any. + * + * Generated from protobuf field string status_detail = 5; + * @return string + */ + public function getStatusDetail() + { + return $this->status_detail; + } + + /** + * Human-readable status of the operation, if any. + * + * Generated from protobuf field string status_detail = 5; + * @param string $var + * @return $this + */ + public function setStatusDetail($var) + { + GPBUtil::checkString($var, True); + $this->status_detail = $var; + + return $this; + } + + /** + * Specifies if cancellation was requested for the operation. + * + * Generated from protobuf field bool cancel_requested = 6; + * @return bool + */ + public function getCancelRequested() + { + return $this->cancel_requested; + } + + /** + * Specifies if cancellation was requested for the operation. + * + * Generated from protobuf field bool cancel_requested = 6; + * @param bool $var + * @return $this + */ + public function setCancelRequested($var) + { + GPBUtil::checkBool($var); + $this->cancel_requested = $var; + + return $this; + } + + /** + * API version. + * + * Generated from protobuf field string api_version = 7; + * @return string + */ + public function getApiVersion() + { + return $this->api_version; + } + + /** + * API version. + * + * Generated from protobuf field string api_version = 7; + * @param string $var + * @return $this + */ + public function setApiVersion($var) + { + GPBUtil::checkString($var, True); + $this->api_version = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ProbingDetails.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ProbingDetails.php new file mode 100644 index 000000000000..254b6271a30e --- /dev/null +++ b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ProbingDetails.php @@ -0,0 +1,417 @@ +google.cloud.networkmanagement.v1.ProbingDetails + */ +class ProbingDetails extends \Google\Protobuf\Internal\Message +{ + /** + * The overall result of active probing. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.ProbingDetails.ProbingResult result = 1; + */ + protected $result = 0; + /** + * The time that reachability was assessed through active probing. + * + * Generated from protobuf field .google.protobuf.Timestamp verify_time = 2; + */ + protected $verify_time = null; + /** + * Details about an internal failure or the cancellation of active probing. + * + * Generated from protobuf field .google.rpc.Status error = 3; + */ + protected $error = null; + /** + * The reason probing was aborted. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.ProbingDetails.ProbingAbortCause abort_cause = 4; + */ + protected $abort_cause = 0; + /** + * Number of probes sent. + * + * Generated from protobuf field int32 sent_probe_count = 5; + */ + protected $sent_probe_count = 0; + /** + * Number of probes that reached the destination. + * + * Generated from protobuf field int32 successful_probe_count = 6; + */ + protected $successful_probe_count = 0; + /** + * The source and destination endpoints derived from the test input and used + * for active probing. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.EndpointInfo endpoint_info = 7; + */ + protected $endpoint_info = null; + /** + * Latency as measured by active probing in one direction: + * from the source to the destination endpoint. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.LatencyDistribution probing_latency = 8; + */ + protected $probing_latency = null; + /** + * The EdgeLocation from which a packet destined for/originating from the + * internet will egress/ingress the Google network. + * This will only be populated for a connectivity test which has an internet + * destination/source address. + * The absence of this field *must not* be used as an indication that the + * destination/source is part of the Google network. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation destination_egress_location = 9; + */ + protected $destination_egress_location = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $result + * The overall result of active probing. + * @type \Google\Protobuf\Timestamp $verify_time + * The time that reachability was assessed through active probing. + * @type \Google\Rpc\Status $error + * Details about an internal failure or the cancellation of active probing. + * @type int $abort_cause + * The reason probing was aborted. + * @type int $sent_probe_count + * Number of probes sent. + * @type int $successful_probe_count + * Number of probes that reached the destination. + * @type \Google\Cloud\NetworkManagement\V1\EndpointInfo $endpoint_info + * The source and destination endpoints derived from the test input and used + * for active probing. + * @type \Google\Cloud\NetworkManagement\V1\LatencyDistribution $probing_latency + * Latency as measured by active probing in one direction: + * from the source to the destination endpoint. + * @type \Google\Cloud\NetworkManagement\V1\ProbingDetails\EdgeLocation $destination_egress_location + * The EdgeLocation from which a packet destined for/originating from the + * internet will egress/ingress the Google network. + * This will only be populated for a connectivity test which has an internet + * destination/source address. + * The absence of this field *must not* be used as an indication that the + * destination/source is part of the Google network. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkmanagement\V1\ConnectivityTest::initOnce(); + parent::__construct($data); + } + + /** + * The overall result of active probing. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.ProbingDetails.ProbingResult result = 1; + * @return int + */ + public function getResult() + { + return $this->result; + } + + /** + * The overall result of active probing. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.ProbingDetails.ProbingResult result = 1; + * @param int $var + * @return $this + */ + public function setResult($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetworkManagement\V1\ProbingDetails\ProbingResult::class); + $this->result = $var; + + return $this; + } + + /** + * The time that reachability was assessed through active probing. + * + * Generated from protobuf field .google.protobuf.Timestamp verify_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getVerifyTime() + { + return $this->verify_time; + } + + public function hasVerifyTime() + { + return isset($this->verify_time); + } + + public function clearVerifyTime() + { + unset($this->verify_time); + } + + /** + * The time that reachability was assessed through active probing. + * + * Generated from protobuf field .google.protobuf.Timestamp verify_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setVerifyTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->verify_time = $var; + + return $this; + } + + /** + * Details about an internal failure or the cancellation of active probing. + * + * Generated from protobuf field .google.rpc.Status error = 3; + * @return \Google\Rpc\Status|null + */ + public function getError() + { + return $this->error; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * Details about an internal failure or the cancellation of active probing. + * + * Generated from protobuf field .google.rpc.Status error = 3; + * @param \Google\Rpc\Status $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \Google\Rpc\Status::class); + $this->error = $var; + + return $this; + } + + /** + * The reason probing was aborted. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.ProbingDetails.ProbingAbortCause abort_cause = 4; + * @return int + */ + public function getAbortCause() + { + return $this->abort_cause; + } + + /** + * The reason probing was aborted. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.ProbingDetails.ProbingAbortCause abort_cause = 4; + * @param int $var + * @return $this + */ + public function setAbortCause($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetworkManagement\V1\ProbingDetails\ProbingAbortCause::class); + $this->abort_cause = $var; + + return $this; + } + + /** + * Number of probes sent. + * + * Generated from protobuf field int32 sent_probe_count = 5; + * @return int + */ + public function getSentProbeCount() + { + return $this->sent_probe_count; + } + + /** + * Number of probes sent. + * + * Generated from protobuf field int32 sent_probe_count = 5; + * @param int $var + * @return $this + */ + public function setSentProbeCount($var) + { + GPBUtil::checkInt32($var); + $this->sent_probe_count = $var; + + return $this; + } + + /** + * Number of probes that reached the destination. + * + * Generated from protobuf field int32 successful_probe_count = 6; + * @return int + */ + public function getSuccessfulProbeCount() + { + return $this->successful_probe_count; + } + + /** + * Number of probes that reached the destination. + * + * Generated from protobuf field int32 successful_probe_count = 6; + * @param int $var + * @return $this + */ + public function setSuccessfulProbeCount($var) + { + GPBUtil::checkInt32($var); + $this->successful_probe_count = $var; + + return $this; + } + + /** + * The source and destination endpoints derived from the test input and used + * for active probing. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.EndpointInfo endpoint_info = 7; + * @return \Google\Cloud\NetworkManagement\V1\EndpointInfo|null + */ + public function getEndpointInfo() + { + return $this->endpoint_info; + } + + public function hasEndpointInfo() + { + return isset($this->endpoint_info); + } + + public function clearEndpointInfo() + { + unset($this->endpoint_info); + } + + /** + * The source and destination endpoints derived from the test input and used + * for active probing. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.EndpointInfo endpoint_info = 7; + * @param \Google\Cloud\NetworkManagement\V1\EndpointInfo $var + * @return $this + */ + public function setEndpointInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\EndpointInfo::class); + $this->endpoint_info = $var; + + return $this; + } + + /** + * Latency as measured by active probing in one direction: + * from the source to the destination endpoint. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.LatencyDistribution probing_latency = 8; + * @return \Google\Cloud\NetworkManagement\V1\LatencyDistribution|null + */ + public function getProbingLatency() + { + return $this->probing_latency; + } + + public function hasProbingLatency() + { + return isset($this->probing_latency); + } + + public function clearProbingLatency() + { + unset($this->probing_latency); + } + + /** + * Latency as measured by active probing in one direction: + * from the source to the destination endpoint. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.LatencyDistribution probing_latency = 8; + * @param \Google\Cloud\NetworkManagement\V1\LatencyDistribution $var + * @return $this + */ + public function setProbingLatency($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\LatencyDistribution::class); + $this->probing_latency = $var; + + return $this; + } + + /** + * The EdgeLocation from which a packet destined for/originating from the + * internet will egress/ingress the Google network. + * This will only be populated for a connectivity test which has an internet + * destination/source address. + * The absence of this field *must not* be used as an indication that the + * destination/source is part of the Google network. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation destination_egress_location = 9; + * @return \Google\Cloud\NetworkManagement\V1\ProbingDetails\EdgeLocation|null + */ + public function getDestinationEgressLocation() + { + return $this->destination_egress_location; + } + + public function hasDestinationEgressLocation() + { + return isset($this->destination_egress_location); + } + + public function clearDestinationEgressLocation() + { + unset($this->destination_egress_location); + } + + /** + * The EdgeLocation from which a packet destined for/originating from the + * internet will egress/ingress the Google network. + * This will only be populated for a connectivity test which has an internet + * destination/source address. + * The absence of this field *must not* be used as an indication that the + * destination/source is part of the Google network. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation destination_egress_location = 9; + * @param \Google\Cloud\NetworkManagement\V1\ProbingDetails\EdgeLocation $var + * @return $this + */ + public function setDestinationEgressLocation($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\ProbingDetails\EdgeLocation::class); + $this->destination_egress_location = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ProbingDetails/EdgeLocation.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ProbingDetails/EdgeLocation.php new file mode 100644 index 000000000000..b2c41ea9e303 --- /dev/null +++ b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ProbingDetails/EdgeLocation.php @@ -0,0 +1,71 @@ +google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation + */ +class EdgeLocation extends \Google\Protobuf\Internal\Message +{ + /** + * Name of the metropolitan area. + * + * Generated from protobuf field string metropolitan_area = 1; + */ + protected $metropolitan_area = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $metropolitan_area + * Name of the metropolitan area. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkmanagement\V1\ConnectivityTest::initOnce(); + parent::__construct($data); + } + + /** + * Name of the metropolitan area. + * + * Generated from protobuf field string metropolitan_area = 1; + * @return string + */ + public function getMetropolitanArea() + { + return $this->metropolitan_area; + } + + /** + * Name of the metropolitan area. + * + * Generated from protobuf field string metropolitan_area = 1; + * @param string $var + * @return $this + */ + public function setMetropolitanArea($var) + { + GPBUtil::checkString($var, True); + $this->metropolitan_area = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(EdgeLocation::class, \Google\Cloud\NetworkManagement\V1\ProbingDetails_EdgeLocation::class); + diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ProbingDetails/ProbingAbortCause.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ProbingDetails/ProbingAbortCause.php new file mode 100644 index 000000000000..a35527cc41eb --- /dev/null +++ b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ProbingDetails/ProbingAbortCause.php @@ -0,0 +1,65 @@ +google.cloud.networkmanagement.v1.ProbingDetails.ProbingAbortCause + */ +class ProbingAbortCause +{ + /** + * No reason was specified. + * + * Generated from protobuf enum PROBING_ABORT_CAUSE_UNSPECIFIED = 0; + */ + const PROBING_ABORT_CAUSE_UNSPECIFIED = 0; + /** + * The user lacks permission to access some of the + * network resources required to run the test. + * + * Generated from protobuf enum PERMISSION_DENIED = 1; + */ + const PERMISSION_DENIED = 1; + /** + * No valid source endpoint could be derived from the request. + * + * Generated from protobuf enum NO_SOURCE_LOCATION = 2; + */ + const NO_SOURCE_LOCATION = 2; + + private static $valueToName = [ + self::PROBING_ABORT_CAUSE_UNSPECIFIED => 'PROBING_ABORT_CAUSE_UNSPECIFIED', + self::PERMISSION_DENIED => 'PERMISSION_DENIED', + self::NO_SOURCE_LOCATION => 'NO_SOURCE_LOCATION', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ProbingAbortCause::class, \Google\Cloud\NetworkManagement\V1\ProbingDetails_ProbingAbortCause::class); + diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ProbingDetails/ProbingResult.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ProbingDetails/ProbingResult.php new file mode 100644 index 000000000000..567ea2be878f --- /dev/null +++ b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ProbingDetails/ProbingResult.php @@ -0,0 +1,82 @@ +google.cloud.networkmanagement.v1.ProbingDetails.ProbingResult + */ +class ProbingResult +{ + /** + * No result was specified. + * + * Generated from protobuf enum PROBING_RESULT_UNSPECIFIED = 0; + */ + const PROBING_RESULT_UNSPECIFIED = 0; + /** + * At least 95% of packets reached the destination. + * + * Generated from protobuf enum REACHABLE = 1; + */ + const REACHABLE = 1; + /** + * No packets reached the destination. + * + * Generated from protobuf enum UNREACHABLE = 2; + */ + const UNREACHABLE = 2; + /** + * Less than 95% of packets reached the destination. + * + * Generated from protobuf enum REACHABILITY_INCONSISTENT = 3; + */ + const REACHABILITY_INCONSISTENT = 3; + /** + * Reachability could not be determined. Possible reasons are: + * * The user lacks permission to access some of the network resources + * required to run the test. + * * No valid source endpoint could be derived from the request. + * * An internal error occurred. + * + * Generated from protobuf enum UNDETERMINED = 4; + */ + const UNDETERMINED = 4; + + private static $valueToName = [ + self::PROBING_RESULT_UNSPECIFIED => 'PROBING_RESULT_UNSPECIFIED', + self::REACHABLE => 'REACHABLE', + self::UNREACHABLE => 'UNREACHABLE', + self::REACHABILITY_INCONSISTENT => 'REACHABILITY_INCONSISTENT', + self::UNDETERMINED => 'UNDETERMINED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ProbingResult::class, \Google\Cloud\NetworkManagement\V1\ProbingDetails_ProbingResult::class); + diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ProxyConnectionInfo.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ProxyConnectionInfo.php new file mode 100644 index 000000000000..feb1c10943c7 --- /dev/null +++ b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ProxyConnectionInfo.php @@ -0,0 +1,419 @@ +google.cloud.networkmanagement.v1.ProxyConnectionInfo + */ +class ProxyConnectionInfo extends \Google\Protobuf\Internal\Message +{ + /** + * IP protocol in string format, for example: "TCP", "UDP", "ICMP". + * + * Generated from protobuf field string protocol = 1; + */ + protected $protocol = ''; + /** + * Source IP address of an original connection. + * + * Generated from protobuf field string old_source_ip = 2; + */ + protected $old_source_ip = ''; + /** + * Source IP address of a new connection. + * + * Generated from protobuf field string new_source_ip = 3; + */ + protected $new_source_ip = ''; + /** + * Destination IP address of an original connection + * + * Generated from protobuf field string old_destination_ip = 4; + */ + protected $old_destination_ip = ''; + /** + * Destination IP address of a new connection. + * + * Generated from protobuf field string new_destination_ip = 5; + */ + protected $new_destination_ip = ''; + /** + * Source port of an original connection. Only valid when protocol is TCP or + * UDP. + * + * Generated from protobuf field int32 old_source_port = 6; + */ + protected $old_source_port = 0; + /** + * Source port of a new connection. Only valid when protocol is TCP or UDP. + * + * Generated from protobuf field int32 new_source_port = 7; + */ + protected $new_source_port = 0; + /** + * Destination port of an original connection. Only valid when protocol is TCP + * or UDP. + * + * Generated from protobuf field int32 old_destination_port = 8; + */ + protected $old_destination_port = 0; + /** + * Destination port of a new connection. Only valid when protocol is TCP or + * UDP. + * + * Generated from protobuf field int32 new_destination_port = 9; + */ + protected $new_destination_port = 0; + /** + * Uri of proxy subnet. + * + * Generated from protobuf field string subnet_uri = 10; + */ + protected $subnet_uri = ''; + /** + * URI of the network where connection is proxied. + * + * Generated from protobuf field string network_uri = 11; + */ + protected $network_uri = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $protocol + * IP protocol in string format, for example: "TCP", "UDP", "ICMP". + * @type string $old_source_ip + * Source IP address of an original connection. + * @type string $new_source_ip + * Source IP address of a new connection. + * @type string $old_destination_ip + * Destination IP address of an original connection + * @type string $new_destination_ip + * Destination IP address of a new connection. + * @type int $old_source_port + * Source port of an original connection. Only valid when protocol is TCP or + * UDP. + * @type int $new_source_port + * Source port of a new connection. Only valid when protocol is TCP or UDP. + * @type int $old_destination_port + * Destination port of an original connection. Only valid when protocol is TCP + * or UDP. + * @type int $new_destination_port + * Destination port of a new connection. Only valid when protocol is TCP or + * UDP. + * @type string $subnet_uri + * Uri of proxy subnet. + * @type string $network_uri + * URI of the network where connection is proxied. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkmanagement\V1\Trace::initOnce(); + parent::__construct($data); + } + + /** + * IP protocol in string format, for example: "TCP", "UDP", "ICMP". + * + * Generated from protobuf field string protocol = 1; + * @return string + */ + public function getProtocol() + { + return $this->protocol; + } + + /** + * IP protocol in string format, for example: "TCP", "UDP", "ICMP". + * + * Generated from protobuf field string protocol = 1; + * @param string $var + * @return $this + */ + public function setProtocol($var) + { + GPBUtil::checkString($var, True); + $this->protocol = $var; + + return $this; + } + + /** + * Source IP address of an original connection. + * + * Generated from protobuf field string old_source_ip = 2; + * @return string + */ + public function getOldSourceIp() + { + return $this->old_source_ip; + } + + /** + * Source IP address of an original connection. + * + * Generated from protobuf field string old_source_ip = 2; + * @param string $var + * @return $this + */ + public function setOldSourceIp($var) + { + GPBUtil::checkString($var, True); + $this->old_source_ip = $var; + + return $this; + } + + /** + * Source IP address of a new connection. + * + * Generated from protobuf field string new_source_ip = 3; + * @return string + */ + public function getNewSourceIp() + { + return $this->new_source_ip; + } + + /** + * Source IP address of a new connection. + * + * Generated from protobuf field string new_source_ip = 3; + * @param string $var + * @return $this + */ + public function setNewSourceIp($var) + { + GPBUtil::checkString($var, True); + $this->new_source_ip = $var; + + return $this; + } + + /** + * Destination IP address of an original connection + * + * Generated from protobuf field string old_destination_ip = 4; + * @return string + */ + public function getOldDestinationIp() + { + return $this->old_destination_ip; + } + + /** + * Destination IP address of an original connection + * + * Generated from protobuf field string old_destination_ip = 4; + * @param string $var + * @return $this + */ + public function setOldDestinationIp($var) + { + GPBUtil::checkString($var, True); + $this->old_destination_ip = $var; + + return $this; + } + + /** + * Destination IP address of a new connection. + * + * Generated from protobuf field string new_destination_ip = 5; + * @return string + */ + public function getNewDestinationIp() + { + return $this->new_destination_ip; + } + + /** + * Destination IP address of a new connection. + * + * Generated from protobuf field string new_destination_ip = 5; + * @param string $var + * @return $this + */ + public function setNewDestinationIp($var) + { + GPBUtil::checkString($var, True); + $this->new_destination_ip = $var; + + return $this; + } + + /** + * Source port of an original connection. Only valid when protocol is TCP or + * UDP. + * + * Generated from protobuf field int32 old_source_port = 6; + * @return int + */ + public function getOldSourcePort() + { + return $this->old_source_port; + } + + /** + * Source port of an original connection. Only valid when protocol is TCP or + * UDP. + * + * Generated from protobuf field int32 old_source_port = 6; + * @param int $var + * @return $this + */ + public function setOldSourcePort($var) + { + GPBUtil::checkInt32($var); + $this->old_source_port = $var; + + return $this; + } + + /** + * Source port of a new connection. Only valid when protocol is TCP or UDP. + * + * Generated from protobuf field int32 new_source_port = 7; + * @return int + */ + public function getNewSourcePort() + { + return $this->new_source_port; + } + + /** + * Source port of a new connection. Only valid when protocol is TCP or UDP. + * + * Generated from protobuf field int32 new_source_port = 7; + * @param int $var + * @return $this + */ + public function setNewSourcePort($var) + { + GPBUtil::checkInt32($var); + $this->new_source_port = $var; + + return $this; + } + + /** + * Destination port of an original connection. Only valid when protocol is TCP + * or UDP. + * + * Generated from protobuf field int32 old_destination_port = 8; + * @return int + */ + public function getOldDestinationPort() + { + return $this->old_destination_port; + } + + /** + * Destination port of an original connection. Only valid when protocol is TCP + * or UDP. + * + * Generated from protobuf field int32 old_destination_port = 8; + * @param int $var + * @return $this + */ + public function setOldDestinationPort($var) + { + GPBUtil::checkInt32($var); + $this->old_destination_port = $var; + + return $this; + } + + /** + * Destination port of a new connection. Only valid when protocol is TCP or + * UDP. + * + * Generated from protobuf field int32 new_destination_port = 9; + * @return int + */ + public function getNewDestinationPort() + { + return $this->new_destination_port; + } + + /** + * Destination port of a new connection. Only valid when protocol is TCP or + * UDP. + * + * Generated from protobuf field int32 new_destination_port = 9; + * @param int $var + * @return $this + */ + public function setNewDestinationPort($var) + { + GPBUtil::checkInt32($var); + $this->new_destination_port = $var; + + return $this; + } + + /** + * Uri of proxy subnet. + * + * Generated from protobuf field string subnet_uri = 10; + * @return string + */ + public function getSubnetUri() + { + return $this->subnet_uri; + } + + /** + * Uri of proxy subnet. + * + * Generated from protobuf field string subnet_uri = 10; + * @param string $var + * @return $this + */ + public function setSubnetUri($var) + { + GPBUtil::checkString($var, True); + $this->subnet_uri = $var; + + return $this; + } + + /** + * URI of the network where connection is proxied. + * + * Generated from protobuf field string network_uri = 11; + * @return string + */ + public function getNetworkUri() + { + return $this->network_uri; + } + + /** + * URI of the network where connection is proxied. + * + * Generated from protobuf field string network_uri = 11; + * @param string $var + * @return $this + */ + public function setNetworkUri($var) + { + GPBUtil::checkString($var, True); + $this->network_uri = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ReachabilityDetails.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ReachabilityDetails.php new file mode 100644 index 000000000000..487aecd9228d --- /dev/null +++ b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ReachabilityDetails.php @@ -0,0 +1,197 @@ +google.cloud.networkmanagement.v1.ReachabilityDetails + */ +class ReachabilityDetails extends \Google\Protobuf\Internal\Message +{ + /** + * The overall result of the test's configuration analysis. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.ReachabilityDetails.Result result = 1; + */ + protected $result = 0; + /** + * The time of the configuration analysis. + * + * Generated from protobuf field .google.protobuf.Timestamp verify_time = 2; + */ + protected $verify_time = null; + /** + * The details of a failure or a cancellation of reachability analysis. + * + * Generated from protobuf field .google.rpc.Status error = 3; + */ + protected $error = null; + /** + * Result may contain a list of traces if a test has multiple possible + * paths in the network, such as when destination endpoint is a load balancer + * with multiple backends. + * + * Generated from protobuf field repeated .google.cloud.networkmanagement.v1.Trace traces = 5; + */ + private $traces; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $result + * The overall result of the test's configuration analysis. + * @type \Google\Protobuf\Timestamp $verify_time + * The time of the configuration analysis. + * @type \Google\Rpc\Status $error + * The details of a failure or a cancellation of reachability analysis. + * @type array<\Google\Cloud\NetworkManagement\V1\Trace>|\Google\Protobuf\Internal\RepeatedField $traces + * Result may contain a list of traces if a test has multiple possible + * paths in the network, such as when destination endpoint is a load balancer + * with multiple backends. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkmanagement\V1\ConnectivityTest::initOnce(); + parent::__construct($data); + } + + /** + * The overall result of the test's configuration analysis. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.ReachabilityDetails.Result result = 1; + * @return int + */ + public function getResult() + { + return $this->result; + } + + /** + * The overall result of the test's configuration analysis. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.ReachabilityDetails.Result result = 1; + * @param int $var + * @return $this + */ + public function setResult($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetworkManagement\V1\ReachabilityDetails\Result::class); + $this->result = $var; + + return $this; + } + + /** + * The time of the configuration analysis. + * + * Generated from protobuf field .google.protobuf.Timestamp verify_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getVerifyTime() + { + return $this->verify_time; + } + + public function hasVerifyTime() + { + return isset($this->verify_time); + } + + public function clearVerifyTime() + { + unset($this->verify_time); + } + + /** + * The time of the configuration analysis. + * + * Generated from protobuf field .google.protobuf.Timestamp verify_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setVerifyTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->verify_time = $var; + + return $this; + } + + /** + * The details of a failure or a cancellation of reachability analysis. + * + * Generated from protobuf field .google.rpc.Status error = 3; + * @return \Google\Rpc\Status|null + */ + public function getError() + { + return $this->error; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * The details of a failure or a cancellation of reachability analysis. + * + * Generated from protobuf field .google.rpc.Status error = 3; + * @param \Google\Rpc\Status $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \Google\Rpc\Status::class); + $this->error = $var; + + return $this; + } + + /** + * Result may contain a list of traces if a test has multiple possible + * paths in the network, such as when destination endpoint is a load balancer + * with multiple backends. + * + * Generated from protobuf field repeated .google.cloud.networkmanagement.v1.Trace traces = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTraces() + { + return $this->traces; + } + + /** + * Result may contain a list of traces if a test has multiple possible + * paths in the network, such as when destination endpoint is a load balancer + * with multiple backends. + * + * Generated from protobuf field repeated .google.cloud.networkmanagement.v1.Trace traces = 5; + * @param array<\Google\Cloud\NetworkManagement\V1\Trace>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTraces($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkManagement\V1\Trace::class); + $this->traces = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ReachabilityDetails/Result.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ReachabilityDetails/Result.php new file mode 100644 index 000000000000..5b4ca4a91831 --- /dev/null +++ b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ReachabilityDetails/Result.php @@ -0,0 +1,94 @@ +google.cloud.networkmanagement.v1.ReachabilityDetails.Result + */ +class Result +{ + /** + * No result was specified. + * + * Generated from protobuf enum RESULT_UNSPECIFIED = 0; + */ + const RESULT_UNSPECIFIED = 0; + /** + * Possible scenarios are: + * * The configuration analysis determined that a packet originating from + * the source is expected to reach the destination. + * * The analysis didn't complete because the user lacks permission for + * some of the resources in the trace. However, at the time the user's + * permission became insufficient, the trace had been successful so far. + * + * Generated from protobuf enum REACHABLE = 1; + */ + const REACHABLE = 1; + /** + * A packet originating from the source is expected to be dropped before + * reaching the destination. + * + * Generated from protobuf enum UNREACHABLE = 2; + */ + const UNREACHABLE = 2; + /** + * The source and destination endpoints do not uniquely identify + * the test location in the network, and the reachability result contains + * multiple traces. For some traces, a packet could be delivered, and for + * others, it would not be. This result is also assigned to + * configuration analysis of return path if on its own it should be + * REACHABLE, but configuration analysis of forward path is AMBIGUOUS. + * + * Generated from protobuf enum AMBIGUOUS = 4; + */ + const AMBIGUOUS = 4; + /** + * The configuration analysis did not complete. Possible reasons are: + * * A permissions error occurred--for example, the user might not have + * read permission for all of the resources named in the test. + * * An internal error occurred. + * * The analyzer received an invalid or unsupported argument or was unable + * to identify a known endpoint. + * + * Generated from protobuf enum UNDETERMINED = 5; + */ + const UNDETERMINED = 5; + + private static $valueToName = [ + self::RESULT_UNSPECIFIED => 'RESULT_UNSPECIFIED', + self::REACHABLE => 'REACHABLE', + self::UNREACHABLE => 'UNREACHABLE', + self::AMBIGUOUS => 'AMBIGUOUS', + self::UNDETERMINED => 'UNDETERMINED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Result::class, \Google\Cloud\NetworkManagement\V1\ReachabilityDetails_Result::class); + diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/RedisClusterInfo.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/RedisClusterInfo.php new file mode 100644 index 000000000000..f0d07036a9fe --- /dev/null +++ b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/RedisClusterInfo.php @@ -0,0 +1,249 @@ +google.cloud.networkmanagement.v1.RedisClusterInfo + */ +class RedisClusterInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Name of a Redis Cluster. + * + * Generated from protobuf field string display_name = 1; + */ + protected $display_name = ''; + /** + * URI of a Redis Cluster in format + * "projects/{project_id}/locations/{location}/clusters/{cluster_id}" + * + * Generated from protobuf field string uri = 2; + */ + protected $uri = ''; + /** + * URI of a Redis Cluster network in format + * "projects/{project_id}/global/networks/{network_id}". + * + * Generated from protobuf field string network_uri = 3; + */ + protected $network_uri = ''; + /** + * Discovery endpoint IP address of a Redis Cluster. + * + * Generated from protobuf field string discovery_endpoint_ip_address = 4 [(.google.api.field_info) = { + */ + protected $discovery_endpoint_ip_address = ''; + /** + * Secondary endpoint IP address of a Redis Cluster. + * + * Generated from protobuf field string secondary_endpoint_ip_address = 5 [(.google.api.field_info) = { + */ + protected $secondary_endpoint_ip_address = ''; + /** + * Name of the region in which the Redis Cluster is defined. For example, + * "us-central1". + * + * Generated from protobuf field string location = 6; + */ + protected $location = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $display_name + * Name of a Redis Cluster. + * @type string $uri + * URI of a Redis Cluster in format + * "projects/{project_id}/locations/{location}/clusters/{cluster_id}" + * @type string $network_uri + * URI of a Redis Cluster network in format + * "projects/{project_id}/global/networks/{network_id}". + * @type string $discovery_endpoint_ip_address + * Discovery endpoint IP address of a Redis Cluster. + * @type string $secondary_endpoint_ip_address + * Secondary endpoint IP address of a Redis Cluster. + * @type string $location + * Name of the region in which the Redis Cluster is defined. For example, + * "us-central1". + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkmanagement\V1\Trace::initOnce(); + parent::__construct($data); + } + + /** + * Name of a Redis Cluster. + * + * Generated from protobuf field string display_name = 1; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Name of a Redis Cluster. + * + * Generated from protobuf field string display_name = 1; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * URI of a Redis Cluster in format + * "projects/{project_id}/locations/{location}/clusters/{cluster_id}" + * + * Generated from protobuf field string uri = 2; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * URI of a Redis Cluster in format + * "projects/{project_id}/locations/{location}/clusters/{cluster_id}" + * + * Generated from protobuf field string uri = 2; + * @param string $var + * @return $this + */ + public function setUri($var) + { + GPBUtil::checkString($var, True); + $this->uri = $var; + + return $this; + } + + /** + * URI of a Redis Cluster network in format + * "projects/{project_id}/global/networks/{network_id}". + * + * Generated from protobuf field string network_uri = 3; + * @return string + */ + public function getNetworkUri() + { + return $this->network_uri; + } + + /** + * URI of a Redis Cluster network in format + * "projects/{project_id}/global/networks/{network_id}". + * + * Generated from protobuf field string network_uri = 3; + * @param string $var + * @return $this + */ + public function setNetworkUri($var) + { + GPBUtil::checkString($var, True); + $this->network_uri = $var; + + return $this; + } + + /** + * Discovery endpoint IP address of a Redis Cluster. + * + * Generated from protobuf field string discovery_endpoint_ip_address = 4 [(.google.api.field_info) = { + * @return string + */ + public function getDiscoveryEndpointIpAddress() + { + return $this->discovery_endpoint_ip_address; + } + + /** + * Discovery endpoint IP address of a Redis Cluster. + * + * Generated from protobuf field string discovery_endpoint_ip_address = 4 [(.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setDiscoveryEndpointIpAddress($var) + { + GPBUtil::checkString($var, True); + $this->discovery_endpoint_ip_address = $var; + + return $this; + } + + /** + * Secondary endpoint IP address of a Redis Cluster. + * + * Generated from protobuf field string secondary_endpoint_ip_address = 5 [(.google.api.field_info) = { + * @return string + */ + public function getSecondaryEndpointIpAddress() + { + return $this->secondary_endpoint_ip_address; + } + + /** + * Secondary endpoint IP address of a Redis Cluster. + * + * Generated from protobuf field string secondary_endpoint_ip_address = 5 [(.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setSecondaryEndpointIpAddress($var) + { + GPBUtil::checkString($var, True); + $this->secondary_endpoint_ip_address = $var; + + return $this; + } + + /** + * Name of the region in which the Redis Cluster is defined. For example, + * "us-central1". + * + * Generated from protobuf field string location = 6; + * @return string + */ + public function getLocation() + { + return $this->location; + } + + /** + * Name of the region in which the Redis Cluster is defined. For example, + * "us-central1". + * + * Generated from protobuf field string location = 6; + * @param string $var + * @return $this + */ + public function setLocation($var) + { + GPBUtil::checkString($var, True); + $this->location = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/RedisInstanceInfo.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/RedisInstanceInfo.php new file mode 100644 index 000000000000..7e8a8f9bf987 --- /dev/null +++ b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/RedisInstanceInfo.php @@ -0,0 +1,237 @@ +google.cloud.networkmanagement.v1.RedisInstanceInfo + */ +class RedisInstanceInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Name of a Cloud Redis Instance. + * + * Generated from protobuf field string display_name = 1; + */ + protected $display_name = ''; + /** + * URI of a Cloud Redis Instance. + * + * Generated from protobuf field string uri = 2; + */ + protected $uri = ''; + /** + * URI of a Cloud Redis Instance network. + * + * Generated from protobuf field string network_uri = 3; + */ + protected $network_uri = ''; + /** + * Primary endpoint IP address of a Cloud Redis Instance. + * + * Generated from protobuf field string primary_endpoint_ip = 4; + */ + protected $primary_endpoint_ip = ''; + /** + * Read endpoint IP address of a Cloud Redis Instance (if applicable). + * + * Generated from protobuf field string read_endpoint_ip = 5; + */ + protected $read_endpoint_ip = ''; + /** + * Region in which the Cloud Redis Instance is defined. + * + * Generated from protobuf field string region = 6; + */ + protected $region = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $display_name + * Name of a Cloud Redis Instance. + * @type string $uri + * URI of a Cloud Redis Instance. + * @type string $network_uri + * URI of a Cloud Redis Instance network. + * @type string $primary_endpoint_ip + * Primary endpoint IP address of a Cloud Redis Instance. + * @type string $read_endpoint_ip + * Read endpoint IP address of a Cloud Redis Instance (if applicable). + * @type string $region + * Region in which the Cloud Redis Instance is defined. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkmanagement\V1\Trace::initOnce(); + parent::__construct($data); + } + + /** + * Name of a Cloud Redis Instance. + * + * Generated from protobuf field string display_name = 1; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Name of a Cloud Redis Instance. + * + * Generated from protobuf field string display_name = 1; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * URI of a Cloud Redis Instance. + * + * Generated from protobuf field string uri = 2; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * URI of a Cloud Redis Instance. + * + * Generated from protobuf field string uri = 2; + * @param string $var + * @return $this + */ + public function setUri($var) + { + GPBUtil::checkString($var, True); + $this->uri = $var; + + return $this; + } + + /** + * URI of a Cloud Redis Instance network. + * + * Generated from protobuf field string network_uri = 3; + * @return string + */ + public function getNetworkUri() + { + return $this->network_uri; + } + + /** + * URI of a Cloud Redis Instance network. + * + * Generated from protobuf field string network_uri = 3; + * @param string $var + * @return $this + */ + public function setNetworkUri($var) + { + GPBUtil::checkString($var, True); + $this->network_uri = $var; + + return $this; + } + + /** + * Primary endpoint IP address of a Cloud Redis Instance. + * + * Generated from protobuf field string primary_endpoint_ip = 4; + * @return string + */ + public function getPrimaryEndpointIp() + { + return $this->primary_endpoint_ip; + } + + /** + * Primary endpoint IP address of a Cloud Redis Instance. + * + * Generated from protobuf field string primary_endpoint_ip = 4; + * @param string $var + * @return $this + */ + public function setPrimaryEndpointIp($var) + { + GPBUtil::checkString($var, True); + $this->primary_endpoint_ip = $var; + + return $this; + } + + /** + * Read endpoint IP address of a Cloud Redis Instance (if applicable). + * + * Generated from protobuf field string read_endpoint_ip = 5; + * @return string + */ + public function getReadEndpointIp() + { + return $this->read_endpoint_ip; + } + + /** + * Read endpoint IP address of a Cloud Redis Instance (if applicable). + * + * Generated from protobuf field string read_endpoint_ip = 5; + * @param string $var + * @return $this + */ + public function setReadEndpointIp($var) + { + GPBUtil::checkString($var, True); + $this->read_endpoint_ip = $var; + + return $this; + } + + /** + * Region in which the Cloud Redis Instance is defined. + * + * Generated from protobuf field string region = 6; + * @return string + */ + public function getRegion() + { + return $this->region; + } + + /** + * Region in which the Cloud Redis Instance is defined. + * + * Generated from protobuf field string region = 6; + * @param string $var + * @return $this + */ + public function setRegion($var) + { + GPBUtil::checkString($var, True); + $this->region = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/RerunConnectivityTestRequest.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/RerunConnectivityTestRequest.php new file mode 100644 index 000000000000..6a28cefac964 --- /dev/null +++ b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/RerunConnectivityTestRequest.php @@ -0,0 +1,71 @@ +google.cloud.networkmanagement.v1.RerunConnectivityTestRequest + */ +class RerunConnectivityTestRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Connectivity Test resource name using the form: + * `projects/{project_id}/locations/global/connectivityTests/{test_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Connectivity Test resource name using the form: + * `projects/{project_id}/locations/global/connectivityTests/{test_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkmanagement\V1\Reachability::initOnce(); + parent::__construct($data); + } + + /** + * Required. Connectivity Test resource name using the form: + * `projects/{project_id}/locations/global/connectivityTests/{test_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Connectivity Test resource name using the form: + * `projects/{project_id}/locations/global/connectivityTests/{test_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/RouteInfo.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/RouteInfo.php new file mode 100644 index 000000000000..e457ff0ffe52 --- /dev/null +++ b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/RouteInfo.php @@ -0,0 +1,735 @@ +google.cloud.networkmanagement.v1.RouteInfo + */ +class RouteInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Type of route. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.RouteInfo.RouteType route_type = 8; + */ + protected $route_type = 0; + /** + * Type of next hop. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.RouteInfo.NextHopType next_hop_type = 9; + */ + protected $next_hop_type = 0; + /** + * Indicates where route is applicable. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.RouteInfo.RouteScope route_scope = 14; + */ + protected $route_scope = 0; + /** + * Name of a route. + * + * Generated from protobuf field string display_name = 1; + */ + protected $display_name = ''; + /** + * URI of a route (if applicable). + * + * Generated from protobuf field string uri = 2; + */ + protected $uri = ''; + /** + * Region of the route (if applicable). + * + * Generated from protobuf field string region = 19; + */ + protected $region = ''; + /** + * Destination IP range of the route. + * + * Generated from protobuf field string dest_ip_range = 3; + */ + protected $dest_ip_range = ''; + /** + * Next hop of the route. + * + * Generated from protobuf field string next_hop = 4; + */ + protected $next_hop = ''; + /** + * URI of a Compute Engine network. NETWORK routes only. + * + * Generated from protobuf field string network_uri = 5; + */ + protected $network_uri = ''; + /** + * Priority of the route. + * + * Generated from protobuf field int32 priority = 6; + */ + protected $priority = 0; + /** + * Instance tags of the route. + * + * Generated from protobuf field repeated string instance_tags = 7; + */ + private $instance_tags; + /** + * Source IP address range of the route. Policy based routes only. + * + * Generated from protobuf field string src_ip_range = 10; + */ + protected $src_ip_range = ''; + /** + * Destination port ranges of the route. Policy based routes only. + * + * Generated from protobuf field repeated string dest_port_ranges = 11; + */ + private $dest_port_ranges; + /** + * Source port ranges of the route. Policy based routes only. + * + * Generated from protobuf field repeated string src_port_ranges = 12; + */ + private $src_port_ranges; + /** + * Protocols of the route. Policy based routes only. + * + * Generated from protobuf field repeated string protocols = 13; + */ + private $protocols; + /** + * URI of a NCC Hub. NCC_HUB routes only. + * + * Generated from protobuf field optional string ncc_hub_uri = 15; + */ + protected $ncc_hub_uri = null; + /** + * URI of a NCC Spoke. NCC_HUB routes only. + * + * Generated from protobuf field optional string ncc_spoke_uri = 16; + */ + protected $ncc_spoke_uri = null; + /** + * For advertised dynamic routes, the URI of the Cloud Router that advertised + * the corresponding IP prefix. + * + * Generated from protobuf field optional string advertised_route_source_router_uri = 17; + */ + protected $advertised_route_source_router_uri = null; + /** + * For advertised routes, the URI of their next hop, i.e. the URI of the + * hybrid endpoint (VPN tunnel, Interconnect attachment, NCC router appliance) + * the advertised prefix is advertised through, or URI of the source peered + * network. + * + * Generated from protobuf field optional string advertised_route_next_hop_uri = 18; + */ + protected $advertised_route_next_hop_uri = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $route_type + * Type of route. + * @type int $next_hop_type + * Type of next hop. + * @type int $route_scope + * Indicates where route is applicable. + * @type string $display_name + * Name of a route. + * @type string $uri + * URI of a route (if applicable). + * @type string $region + * Region of the route (if applicable). + * @type string $dest_ip_range + * Destination IP range of the route. + * @type string $next_hop + * Next hop of the route. + * @type string $network_uri + * URI of a Compute Engine network. NETWORK routes only. + * @type int $priority + * Priority of the route. + * @type array|\Google\Protobuf\Internal\RepeatedField $instance_tags + * Instance tags of the route. + * @type string $src_ip_range + * Source IP address range of the route. Policy based routes only. + * @type array|\Google\Protobuf\Internal\RepeatedField $dest_port_ranges + * Destination port ranges of the route. Policy based routes only. + * @type array|\Google\Protobuf\Internal\RepeatedField $src_port_ranges + * Source port ranges of the route. Policy based routes only. + * @type array|\Google\Protobuf\Internal\RepeatedField $protocols + * Protocols of the route. Policy based routes only. + * @type string $ncc_hub_uri + * URI of a NCC Hub. NCC_HUB routes only. + * @type string $ncc_spoke_uri + * URI of a NCC Spoke. NCC_HUB routes only. + * @type string $advertised_route_source_router_uri + * For advertised dynamic routes, the URI of the Cloud Router that advertised + * the corresponding IP prefix. + * @type string $advertised_route_next_hop_uri + * For advertised routes, the URI of their next hop, i.e. the URI of the + * hybrid endpoint (VPN tunnel, Interconnect attachment, NCC router appliance) + * the advertised prefix is advertised through, or URI of the source peered + * network. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkmanagement\V1\Trace::initOnce(); + parent::__construct($data); + } + + /** + * Type of route. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.RouteInfo.RouteType route_type = 8; + * @return int + */ + public function getRouteType() + { + return $this->route_type; + } + + /** + * Type of route. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.RouteInfo.RouteType route_type = 8; + * @param int $var + * @return $this + */ + public function setRouteType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetworkManagement\V1\RouteInfo\RouteType::class); + $this->route_type = $var; + + return $this; + } + + /** + * Type of next hop. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.RouteInfo.NextHopType next_hop_type = 9; + * @return int + */ + public function getNextHopType() + { + return $this->next_hop_type; + } + + /** + * Type of next hop. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.RouteInfo.NextHopType next_hop_type = 9; + * @param int $var + * @return $this + */ + public function setNextHopType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetworkManagement\V1\RouteInfo\NextHopType::class); + $this->next_hop_type = $var; + + return $this; + } + + /** + * Indicates where route is applicable. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.RouteInfo.RouteScope route_scope = 14; + * @return int + */ + public function getRouteScope() + { + return $this->route_scope; + } + + /** + * Indicates where route is applicable. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.RouteInfo.RouteScope route_scope = 14; + * @param int $var + * @return $this + */ + public function setRouteScope($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetworkManagement\V1\RouteInfo\RouteScope::class); + $this->route_scope = $var; + + return $this; + } + + /** + * Name of a route. + * + * Generated from protobuf field string display_name = 1; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Name of a route. + * + * Generated from protobuf field string display_name = 1; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * URI of a route (if applicable). + * + * Generated from protobuf field string uri = 2; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * URI of a route (if applicable). + * + * Generated from protobuf field string uri = 2; + * @param string $var + * @return $this + */ + public function setUri($var) + { + GPBUtil::checkString($var, True); + $this->uri = $var; + + return $this; + } + + /** + * Region of the route (if applicable). + * + * Generated from protobuf field string region = 19; + * @return string + */ + public function getRegion() + { + return $this->region; + } + + /** + * Region of the route (if applicable). + * + * Generated from protobuf field string region = 19; + * @param string $var + * @return $this + */ + public function setRegion($var) + { + GPBUtil::checkString($var, True); + $this->region = $var; + + return $this; + } + + /** + * Destination IP range of the route. + * + * Generated from protobuf field string dest_ip_range = 3; + * @return string + */ + public function getDestIpRange() + { + return $this->dest_ip_range; + } + + /** + * Destination IP range of the route. + * + * Generated from protobuf field string dest_ip_range = 3; + * @param string $var + * @return $this + */ + public function setDestIpRange($var) + { + GPBUtil::checkString($var, True); + $this->dest_ip_range = $var; + + return $this; + } + + /** + * Next hop of the route. + * + * Generated from protobuf field string next_hop = 4; + * @return string + */ + public function getNextHop() + { + return $this->next_hop; + } + + /** + * Next hop of the route. + * + * Generated from protobuf field string next_hop = 4; + * @param string $var + * @return $this + */ + public function setNextHop($var) + { + GPBUtil::checkString($var, True); + $this->next_hop = $var; + + return $this; + } + + /** + * URI of a Compute Engine network. NETWORK routes only. + * + * Generated from protobuf field string network_uri = 5; + * @return string + */ + public function getNetworkUri() + { + return $this->network_uri; + } + + /** + * URI of a Compute Engine network. NETWORK routes only. + * + * Generated from protobuf field string network_uri = 5; + * @param string $var + * @return $this + */ + public function setNetworkUri($var) + { + GPBUtil::checkString($var, True); + $this->network_uri = $var; + + return $this; + } + + /** + * Priority of the route. + * + * Generated from protobuf field int32 priority = 6; + * @return int + */ + public function getPriority() + { + return $this->priority; + } + + /** + * Priority of the route. + * + * Generated from protobuf field int32 priority = 6; + * @param int $var + * @return $this + */ + public function setPriority($var) + { + GPBUtil::checkInt32($var); + $this->priority = $var; + + return $this; + } + + /** + * Instance tags of the route. + * + * Generated from protobuf field repeated string instance_tags = 7; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getInstanceTags() + { + return $this->instance_tags; + } + + /** + * Instance tags of the route. + * + * Generated from protobuf field repeated string instance_tags = 7; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setInstanceTags($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->instance_tags = $arr; + + return $this; + } + + /** + * Source IP address range of the route. Policy based routes only. + * + * Generated from protobuf field string src_ip_range = 10; + * @return string + */ + public function getSrcIpRange() + { + return $this->src_ip_range; + } + + /** + * Source IP address range of the route. Policy based routes only. + * + * Generated from protobuf field string src_ip_range = 10; + * @param string $var + * @return $this + */ + public function setSrcIpRange($var) + { + GPBUtil::checkString($var, True); + $this->src_ip_range = $var; + + return $this; + } + + /** + * Destination port ranges of the route. Policy based routes only. + * + * Generated from protobuf field repeated string dest_port_ranges = 11; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDestPortRanges() + { + return $this->dest_port_ranges; + } + + /** + * Destination port ranges of the route. Policy based routes only. + * + * Generated from protobuf field repeated string dest_port_ranges = 11; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDestPortRanges($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->dest_port_ranges = $arr; + + return $this; + } + + /** + * Source port ranges of the route. Policy based routes only. + * + * Generated from protobuf field repeated string src_port_ranges = 12; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSrcPortRanges() + { + return $this->src_port_ranges; + } + + /** + * Source port ranges of the route. Policy based routes only. + * + * Generated from protobuf field repeated string src_port_ranges = 12; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSrcPortRanges($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->src_port_ranges = $arr; + + return $this; + } + + /** + * Protocols of the route. Policy based routes only. + * + * Generated from protobuf field repeated string protocols = 13; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getProtocols() + { + return $this->protocols; + } + + /** + * Protocols of the route. Policy based routes only. + * + * Generated from protobuf field repeated string protocols = 13; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setProtocols($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->protocols = $arr; + + return $this; + } + + /** + * URI of a NCC Hub. NCC_HUB routes only. + * + * Generated from protobuf field optional string ncc_hub_uri = 15; + * @return string + */ + public function getNccHubUri() + { + return isset($this->ncc_hub_uri) ? $this->ncc_hub_uri : ''; + } + + public function hasNccHubUri() + { + return isset($this->ncc_hub_uri); + } + + public function clearNccHubUri() + { + unset($this->ncc_hub_uri); + } + + /** + * URI of a NCC Hub. NCC_HUB routes only. + * + * Generated from protobuf field optional string ncc_hub_uri = 15; + * @param string $var + * @return $this + */ + public function setNccHubUri($var) + { + GPBUtil::checkString($var, True); + $this->ncc_hub_uri = $var; + + return $this; + } + + /** + * URI of a NCC Spoke. NCC_HUB routes only. + * + * Generated from protobuf field optional string ncc_spoke_uri = 16; + * @return string + */ + public function getNccSpokeUri() + { + return isset($this->ncc_spoke_uri) ? $this->ncc_spoke_uri : ''; + } + + public function hasNccSpokeUri() + { + return isset($this->ncc_spoke_uri); + } + + public function clearNccSpokeUri() + { + unset($this->ncc_spoke_uri); + } + + /** + * URI of a NCC Spoke. NCC_HUB routes only. + * + * Generated from protobuf field optional string ncc_spoke_uri = 16; + * @param string $var + * @return $this + */ + public function setNccSpokeUri($var) + { + GPBUtil::checkString($var, True); + $this->ncc_spoke_uri = $var; + + return $this; + } + + /** + * For advertised dynamic routes, the URI of the Cloud Router that advertised + * the corresponding IP prefix. + * + * Generated from protobuf field optional string advertised_route_source_router_uri = 17; + * @return string + */ + public function getAdvertisedRouteSourceRouterUri() + { + return isset($this->advertised_route_source_router_uri) ? $this->advertised_route_source_router_uri : ''; + } + + public function hasAdvertisedRouteSourceRouterUri() + { + return isset($this->advertised_route_source_router_uri); + } + + public function clearAdvertisedRouteSourceRouterUri() + { + unset($this->advertised_route_source_router_uri); + } + + /** + * For advertised dynamic routes, the URI of the Cloud Router that advertised + * the corresponding IP prefix. + * + * Generated from protobuf field optional string advertised_route_source_router_uri = 17; + * @param string $var + * @return $this + */ + public function setAdvertisedRouteSourceRouterUri($var) + { + GPBUtil::checkString($var, True); + $this->advertised_route_source_router_uri = $var; + + return $this; + } + + /** + * For advertised routes, the URI of their next hop, i.e. the URI of the + * hybrid endpoint (VPN tunnel, Interconnect attachment, NCC router appliance) + * the advertised prefix is advertised through, or URI of the source peered + * network. + * + * Generated from protobuf field optional string advertised_route_next_hop_uri = 18; + * @return string + */ + public function getAdvertisedRouteNextHopUri() + { + return isset($this->advertised_route_next_hop_uri) ? $this->advertised_route_next_hop_uri : ''; + } + + public function hasAdvertisedRouteNextHopUri() + { + return isset($this->advertised_route_next_hop_uri); + } + + public function clearAdvertisedRouteNextHopUri() + { + unset($this->advertised_route_next_hop_uri); + } + + /** + * For advertised routes, the URI of their next hop, i.e. the URI of the + * hybrid endpoint (VPN tunnel, Interconnect attachment, NCC router appliance) + * the advertised prefix is advertised through, or URI of the source peered + * network. + * + * Generated from protobuf field optional string advertised_route_next_hop_uri = 18; + * @param string $var + * @return $this + */ + public function setAdvertisedRouteNextHopUri($var) + { + GPBUtil::checkString($var, True); + $this->advertised_route_next_hop_uri = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/RouteInfo/NextHopType.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/RouteInfo/NextHopType.php new file mode 100644 index 000000000000..68b5c2112fd8 --- /dev/null +++ b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/RouteInfo/NextHopType.php @@ -0,0 +1,140 @@ +google.cloud.networkmanagement.v1.RouteInfo.NextHopType + */ +class NextHopType +{ + /** + * Unspecified type. Default value. + * + * Generated from protobuf enum NEXT_HOP_TYPE_UNSPECIFIED = 0; + */ + const NEXT_HOP_TYPE_UNSPECIFIED = 0; + /** + * Next hop is an IP address. + * + * Generated from protobuf enum NEXT_HOP_IP = 1; + */ + const NEXT_HOP_IP = 1; + /** + * Next hop is a Compute Engine instance. + * + * Generated from protobuf enum NEXT_HOP_INSTANCE = 2; + */ + const NEXT_HOP_INSTANCE = 2; + /** + * Next hop is a VPC network gateway. + * + * Generated from protobuf enum NEXT_HOP_NETWORK = 3; + */ + const NEXT_HOP_NETWORK = 3; + /** + * Next hop is a peering VPC. + * + * Generated from protobuf enum NEXT_HOP_PEERING = 4; + */ + const NEXT_HOP_PEERING = 4; + /** + * Next hop is an interconnect. + * + * Generated from protobuf enum NEXT_HOP_INTERCONNECT = 5; + */ + const NEXT_HOP_INTERCONNECT = 5; + /** + * Next hop is a VPN tunnel. + * + * Generated from protobuf enum NEXT_HOP_VPN_TUNNEL = 6; + */ + const NEXT_HOP_VPN_TUNNEL = 6; + /** + * Next hop is a VPN gateway. This scenario only happens when tracing + * connectivity from an on-premises network to Google Cloud through a VPN. + * The analysis simulates a packet departing from the on-premises network + * through a VPN tunnel and arriving at a Cloud VPN gateway. + * + * Generated from protobuf enum NEXT_HOP_VPN_GATEWAY = 7; + */ + const NEXT_HOP_VPN_GATEWAY = 7; + /** + * Next hop is an internet gateway. + * + * Generated from protobuf enum NEXT_HOP_INTERNET_GATEWAY = 8; + */ + const NEXT_HOP_INTERNET_GATEWAY = 8; + /** + * Next hop is blackhole; that is, the next hop either does not exist or is + * not running. + * + * Generated from protobuf enum NEXT_HOP_BLACKHOLE = 9; + */ + const NEXT_HOP_BLACKHOLE = 9; + /** + * Next hop is the forwarding rule of an Internal Load Balancer. + * + * Generated from protobuf enum NEXT_HOP_ILB = 10; + */ + const NEXT_HOP_ILB = 10; + /** + * Next hop is a + * [router appliance + * instance](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/ra-overview). + * + * Generated from protobuf enum NEXT_HOP_ROUTER_APPLIANCE = 11; + */ + const NEXT_HOP_ROUTER_APPLIANCE = 11; + /** + * Next hop is an NCC hub. + * + * Generated from protobuf enum NEXT_HOP_NCC_HUB = 12; + */ + const NEXT_HOP_NCC_HUB = 12; + + private static $valueToName = [ + self::NEXT_HOP_TYPE_UNSPECIFIED => 'NEXT_HOP_TYPE_UNSPECIFIED', + self::NEXT_HOP_IP => 'NEXT_HOP_IP', + self::NEXT_HOP_INSTANCE => 'NEXT_HOP_INSTANCE', + self::NEXT_HOP_NETWORK => 'NEXT_HOP_NETWORK', + self::NEXT_HOP_PEERING => 'NEXT_HOP_PEERING', + self::NEXT_HOP_INTERCONNECT => 'NEXT_HOP_INTERCONNECT', + self::NEXT_HOP_VPN_TUNNEL => 'NEXT_HOP_VPN_TUNNEL', + self::NEXT_HOP_VPN_GATEWAY => 'NEXT_HOP_VPN_GATEWAY', + self::NEXT_HOP_INTERNET_GATEWAY => 'NEXT_HOP_INTERNET_GATEWAY', + self::NEXT_HOP_BLACKHOLE => 'NEXT_HOP_BLACKHOLE', + self::NEXT_HOP_ILB => 'NEXT_HOP_ILB', + self::NEXT_HOP_ROUTER_APPLIANCE => 'NEXT_HOP_ROUTER_APPLIANCE', + self::NEXT_HOP_NCC_HUB => 'NEXT_HOP_NCC_HUB', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(NextHopType::class, \Google\Cloud\NetworkManagement\V1\RouteInfo_NextHopType::class); + diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/RouteInfo/RouteScope.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/RouteInfo/RouteScope.php new file mode 100644 index 000000000000..63ab17217fcb --- /dev/null +++ b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/RouteInfo/RouteScope.php @@ -0,0 +1,64 @@ +google.cloud.networkmanagement.v1.RouteInfo.RouteScope + */ +class RouteScope +{ + /** + * Unspecified scope. Default value. + * + * Generated from protobuf enum ROUTE_SCOPE_UNSPECIFIED = 0; + */ + const ROUTE_SCOPE_UNSPECIFIED = 0; + /** + * Route is applicable to packets in Network. + * + * Generated from protobuf enum NETWORK = 1; + */ + const NETWORK = 1; + /** + * Route is applicable to packets using NCC Hub's routing table. + * + * Generated from protobuf enum NCC_HUB = 2; + */ + const NCC_HUB = 2; + + private static $valueToName = [ + self::ROUTE_SCOPE_UNSPECIFIED => 'ROUTE_SCOPE_UNSPECIFIED', + self::NETWORK => 'NETWORK', + self::NCC_HUB => 'NCC_HUB', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(RouteScope::class, \Google\Cloud\NetworkManagement\V1\RouteInfo_RouteScope::class); + diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/RouteInfo/RouteType.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/RouteInfo/RouteType.php new file mode 100644 index 000000000000..11b80b17fb94 --- /dev/null +++ b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/RouteInfo/RouteType.php @@ -0,0 +1,112 @@ +google.cloud.networkmanagement.v1.RouteInfo.RouteType + */ +class RouteType +{ + /** + * Unspecified type. Default value. + * + * Generated from protobuf enum ROUTE_TYPE_UNSPECIFIED = 0; + */ + const ROUTE_TYPE_UNSPECIFIED = 0; + /** + * Route is a subnet route automatically created by the system. + * + * Generated from protobuf enum SUBNET = 1; + */ + const SUBNET = 1; + /** + * Static route created by the user, including the default route to the + * internet. + * + * Generated from protobuf enum STATIC = 2; + */ + const PBSTATIC = 2; + /** + * Dynamic route exchanged between BGP peers. + * + * Generated from protobuf enum DYNAMIC = 3; + */ + const DYNAMIC = 3; + /** + * A subnet route received from peering network. + * + * Generated from protobuf enum PEERING_SUBNET = 4; + */ + const PEERING_SUBNET = 4; + /** + * A static route received from peering network. + * + * Generated from protobuf enum PEERING_STATIC = 5; + */ + const PEERING_STATIC = 5; + /** + * A dynamic route received from peering network. + * + * Generated from protobuf enum PEERING_DYNAMIC = 6; + */ + const PEERING_DYNAMIC = 6; + /** + * Policy based route. + * + * Generated from protobuf enum POLICY_BASED = 7; + */ + const POLICY_BASED = 7; + /** + * Advertised route. Synthetic route which is used to transition from the + * StartFromPrivateNetwork state in Connectivity tests. + * + * Generated from protobuf enum ADVERTISED = 101; + */ + const ADVERTISED = 101; + + private static $valueToName = [ + self::ROUTE_TYPE_UNSPECIFIED => 'ROUTE_TYPE_UNSPECIFIED', + self::SUBNET => 'SUBNET', + self::PBSTATIC => 'STATIC', + self::DYNAMIC => 'DYNAMIC', + self::PEERING_SUBNET => 'PEERING_SUBNET', + self::PEERING_STATIC => 'PEERING_STATIC', + self::PEERING_DYNAMIC => 'PEERING_DYNAMIC', + self::POLICY_BASED => 'POLICY_BASED', + self::ADVERTISED => 'ADVERTISED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + $pbconst = __CLASS__. '::PB' . strtoupper($name); + if (!defined($pbconst)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($pbconst); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(RouteType::class, \Google\Cloud\NetworkManagement\V1\RouteInfo_RouteType::class); + diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ServerlessNegInfo.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ServerlessNegInfo.php new file mode 100644 index 000000000000..582fd758a26c --- /dev/null +++ b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ServerlessNegInfo.php @@ -0,0 +1,68 @@ +google.cloud.networkmanagement.v1.ServerlessNegInfo + */ +class ServerlessNegInfo extends \Google\Protobuf\Internal\Message +{ + /** + * URI of the serverless network endpoint group. + * + * Generated from protobuf field string neg_uri = 1; + */ + protected $neg_uri = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $neg_uri + * URI of the serverless network endpoint group. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkmanagement\V1\Trace::initOnce(); + parent::__construct($data); + } + + /** + * URI of the serverless network endpoint group. + * + * Generated from protobuf field string neg_uri = 1; + * @return string + */ + public function getNegUri() + { + return $this->neg_uri; + } + + /** + * URI of the serverless network endpoint group. + * + * Generated from protobuf field string neg_uri = 1; + * @param string $var + * @return $this + */ + public function setNegUri($var) + { + GPBUtil::checkString($var, True); + $this->neg_uri = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Step.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Step.php new file mode 100644 index 000000000000..80fb590eea88 --- /dev/null +++ b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Step.php @@ -0,0 +1,1090 @@ +google.cloud.networkmanagement.v1.Step + */ +class Step extends \Google\Protobuf\Internal\Message +{ + /** + * A description of the step. Usually this is a summary of the state. + * + * Generated from protobuf field string description = 1; + */ + protected $description = ''; + /** + * Each step is in one of the pre-defined states. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.Step.State state = 2; + */ + protected $state = 0; + /** + * This is a step that leads to the final state Drop. + * + * Generated from protobuf field bool causes_drop = 3; + */ + protected $causes_drop = false; + /** + * Project ID that contains the configuration this step is validating. + * + * Generated from protobuf field string project_id = 4; + */ + protected $project_id = ''; + protected $step_info; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $description + * A description of the step. Usually this is a summary of the state. + * @type int $state + * Each step is in one of the pre-defined states. + * @type bool $causes_drop + * This is a step that leads to the final state Drop. + * @type string $project_id + * Project ID that contains the configuration this step is validating. + * @type \Google\Cloud\NetworkManagement\V1\InstanceInfo $instance + * Display information of a Compute Engine instance. + * @type \Google\Cloud\NetworkManagement\V1\FirewallInfo $firewall + * Display information of a Compute Engine firewall rule. + * @type \Google\Cloud\NetworkManagement\V1\RouteInfo $route + * Display information of a Compute Engine route. + * @type \Google\Cloud\NetworkManagement\V1\EndpointInfo $endpoint + * Display information of the source and destination under analysis. + * The endpoint information in an intermediate state may differ with the + * initial input, as it might be modified by state like NAT, + * or Connection Proxy. + * @type \Google\Cloud\NetworkManagement\V1\GoogleServiceInfo $google_service + * Display information of a Google service + * @type \Google\Cloud\NetworkManagement\V1\ForwardingRuleInfo $forwarding_rule + * Display information of a Compute Engine forwarding rule. + * @type \Google\Cloud\NetworkManagement\V1\VpnGatewayInfo $vpn_gateway + * Display information of a Compute Engine VPN gateway. + * @type \Google\Cloud\NetworkManagement\V1\VpnTunnelInfo $vpn_tunnel + * Display information of a Compute Engine VPN tunnel. + * @type \Google\Cloud\NetworkManagement\V1\VpcConnectorInfo $vpc_connector + * Display information of a VPC connector. + * @type \Google\Cloud\NetworkManagement\V1\DeliverInfo $deliver + * Display information of the final state "deliver" and reason. + * @type \Google\Cloud\NetworkManagement\V1\ForwardInfo $forward + * Display information of the final state "forward" and reason. + * @type \Google\Cloud\NetworkManagement\V1\AbortInfo $abort + * Display information of the final state "abort" and reason. + * @type \Google\Cloud\NetworkManagement\V1\DropInfo $drop + * Display information of the final state "drop" and reason. + * @type \Google\Cloud\NetworkManagement\V1\LoadBalancerInfo $load_balancer + * Display information of the load balancers. Deprecated in favor of the + * `load_balancer_backend_info` field, not used in new tests. + * @type \Google\Cloud\NetworkManagement\V1\NetworkInfo $network + * Display information of a Google Cloud network. + * @type \Google\Cloud\NetworkManagement\V1\GKEMasterInfo $gke_master + * Display information of a Google Kubernetes Engine cluster master. + * @type \Google\Cloud\NetworkManagement\V1\CloudSQLInstanceInfo $cloud_sql_instance + * Display information of a Cloud SQL instance. + * @type \Google\Cloud\NetworkManagement\V1\RedisInstanceInfo $redis_instance + * Display information of a Redis Instance. + * @type \Google\Cloud\NetworkManagement\V1\RedisClusterInfo $redis_cluster + * Display information of a Redis Cluster. + * @type \Google\Cloud\NetworkManagement\V1\CloudFunctionInfo $cloud_function + * Display information of a Cloud Function. + * @type \Google\Cloud\NetworkManagement\V1\AppEngineVersionInfo $app_engine_version + * Display information of an App Engine service version. + * @type \Google\Cloud\NetworkManagement\V1\CloudRunRevisionInfo $cloud_run_revision + * Display information of a Cloud Run revision. + * @type \Google\Cloud\NetworkManagement\V1\NatInfo $nat + * Display information of a NAT. + * @type \Google\Cloud\NetworkManagement\V1\ProxyConnectionInfo $proxy_connection + * Display information of a ProxyConnection. + * @type \Google\Cloud\NetworkManagement\V1\LoadBalancerBackendInfo $load_balancer_backend_info + * Display information of a specific load balancer backend. + * @type \Google\Cloud\NetworkManagement\V1\StorageBucketInfo $storage_bucket + * Display information of a Storage Bucket. Used only for return traces. + * @type \Google\Cloud\NetworkManagement\V1\ServerlessNegInfo $serverless_neg + * Display information of a Serverless network endpoint group backend. Used + * only for return traces. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkmanagement\V1\Trace::initOnce(); + parent::__construct($data); + } + + /** + * A description of the step. Usually this is a summary of the state. + * + * Generated from protobuf field string description = 1; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * A description of the step. Usually this is a summary of the state. + * + * Generated from protobuf field string description = 1; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Each step is in one of the pre-defined states. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.Step.State state = 2; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Each step is in one of the pre-defined states. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.Step.State state = 2; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetworkManagement\V1\Step\State::class); + $this->state = $var; + + return $this; + } + + /** + * This is a step that leads to the final state Drop. + * + * Generated from protobuf field bool causes_drop = 3; + * @return bool + */ + public function getCausesDrop() + { + return $this->causes_drop; + } + + /** + * This is a step that leads to the final state Drop. + * + * Generated from protobuf field bool causes_drop = 3; + * @param bool $var + * @return $this + */ + public function setCausesDrop($var) + { + GPBUtil::checkBool($var); + $this->causes_drop = $var; + + return $this; + } + + /** + * Project ID that contains the configuration this step is validating. + * + * Generated from protobuf field string project_id = 4; + * @return string + */ + public function getProjectId() + { + return $this->project_id; + } + + /** + * Project ID that contains the configuration this step is validating. + * + * Generated from protobuf field string project_id = 4; + * @param string $var + * @return $this + */ + public function setProjectId($var) + { + GPBUtil::checkString($var, True); + $this->project_id = $var; + + return $this; + } + + /** + * Display information of a Compute Engine instance. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.InstanceInfo instance = 5; + * @return \Google\Cloud\NetworkManagement\V1\InstanceInfo|null + */ + public function getInstance() + { + return $this->readOneof(5); + } + + public function hasInstance() + { + return $this->hasOneof(5); + } + + /** + * Display information of a Compute Engine instance. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.InstanceInfo instance = 5; + * @param \Google\Cloud\NetworkManagement\V1\InstanceInfo $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\InstanceInfo::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Display information of a Compute Engine firewall rule. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.FirewallInfo firewall = 6; + * @return \Google\Cloud\NetworkManagement\V1\FirewallInfo|null + */ + public function getFirewall() + { + return $this->readOneof(6); + } + + public function hasFirewall() + { + return $this->hasOneof(6); + } + + /** + * Display information of a Compute Engine firewall rule. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.FirewallInfo firewall = 6; + * @param \Google\Cloud\NetworkManagement\V1\FirewallInfo $var + * @return $this + */ + public function setFirewall($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\FirewallInfo::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * Display information of a Compute Engine route. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.RouteInfo route = 7; + * @return \Google\Cloud\NetworkManagement\V1\RouteInfo|null + */ + public function getRoute() + { + return $this->readOneof(7); + } + + public function hasRoute() + { + return $this->hasOneof(7); + } + + /** + * Display information of a Compute Engine route. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.RouteInfo route = 7; + * @param \Google\Cloud\NetworkManagement\V1\RouteInfo $var + * @return $this + */ + public function setRoute($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\RouteInfo::class); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * Display information of the source and destination under analysis. + * The endpoint information in an intermediate state may differ with the + * initial input, as it might be modified by state like NAT, + * or Connection Proxy. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.EndpointInfo endpoint = 8; + * @return \Google\Cloud\NetworkManagement\V1\EndpointInfo|null + */ + public function getEndpoint() + { + return $this->readOneof(8); + } + + public function hasEndpoint() + { + return $this->hasOneof(8); + } + + /** + * Display information of the source and destination under analysis. + * The endpoint information in an intermediate state may differ with the + * initial input, as it might be modified by state like NAT, + * or Connection Proxy. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.EndpointInfo endpoint = 8; + * @param \Google\Cloud\NetworkManagement\V1\EndpointInfo $var + * @return $this + */ + public function setEndpoint($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\EndpointInfo::class); + $this->writeOneof(8, $var); + + return $this; + } + + /** + * Display information of a Google service + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.GoogleServiceInfo google_service = 24; + * @return \Google\Cloud\NetworkManagement\V1\GoogleServiceInfo|null + */ + public function getGoogleService() + { + return $this->readOneof(24); + } + + public function hasGoogleService() + { + return $this->hasOneof(24); + } + + /** + * Display information of a Google service + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.GoogleServiceInfo google_service = 24; + * @param \Google\Cloud\NetworkManagement\V1\GoogleServiceInfo $var + * @return $this + */ + public function setGoogleService($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\GoogleServiceInfo::class); + $this->writeOneof(24, $var); + + return $this; + } + + /** + * Display information of a Compute Engine forwarding rule. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.ForwardingRuleInfo forwarding_rule = 9; + * @return \Google\Cloud\NetworkManagement\V1\ForwardingRuleInfo|null + */ + public function getForwardingRule() + { + return $this->readOneof(9); + } + + public function hasForwardingRule() + { + return $this->hasOneof(9); + } + + /** + * Display information of a Compute Engine forwarding rule. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.ForwardingRuleInfo forwarding_rule = 9; + * @param \Google\Cloud\NetworkManagement\V1\ForwardingRuleInfo $var + * @return $this + */ + public function setForwardingRule($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\ForwardingRuleInfo::class); + $this->writeOneof(9, $var); + + return $this; + } + + /** + * Display information of a Compute Engine VPN gateway. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.VpnGatewayInfo vpn_gateway = 10; + * @return \Google\Cloud\NetworkManagement\V1\VpnGatewayInfo|null + */ + public function getVpnGateway() + { + return $this->readOneof(10); + } + + public function hasVpnGateway() + { + return $this->hasOneof(10); + } + + /** + * Display information of a Compute Engine VPN gateway. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.VpnGatewayInfo vpn_gateway = 10; + * @param \Google\Cloud\NetworkManagement\V1\VpnGatewayInfo $var + * @return $this + */ + public function setVpnGateway($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\VpnGatewayInfo::class); + $this->writeOneof(10, $var); + + return $this; + } + + /** + * Display information of a Compute Engine VPN tunnel. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.VpnTunnelInfo vpn_tunnel = 11; + * @return \Google\Cloud\NetworkManagement\V1\VpnTunnelInfo|null + */ + public function getVpnTunnel() + { + return $this->readOneof(11); + } + + public function hasVpnTunnel() + { + return $this->hasOneof(11); + } + + /** + * Display information of a Compute Engine VPN tunnel. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.VpnTunnelInfo vpn_tunnel = 11; + * @param \Google\Cloud\NetworkManagement\V1\VpnTunnelInfo $var + * @return $this + */ + public function setVpnTunnel($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\VpnTunnelInfo::class); + $this->writeOneof(11, $var); + + return $this; + } + + /** + * Display information of a VPC connector. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.VpcConnectorInfo vpc_connector = 21; + * @return \Google\Cloud\NetworkManagement\V1\VpcConnectorInfo|null + */ + public function getVpcConnector() + { + return $this->readOneof(21); + } + + public function hasVpcConnector() + { + return $this->hasOneof(21); + } + + /** + * Display information of a VPC connector. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.VpcConnectorInfo vpc_connector = 21; + * @param \Google\Cloud\NetworkManagement\V1\VpcConnectorInfo $var + * @return $this + */ + public function setVpcConnector($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\VpcConnectorInfo::class); + $this->writeOneof(21, $var); + + return $this; + } + + /** + * Display information of the final state "deliver" and reason. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.DeliverInfo deliver = 12; + * @return \Google\Cloud\NetworkManagement\V1\DeliverInfo|null + */ + public function getDeliver() + { + return $this->readOneof(12); + } + + public function hasDeliver() + { + return $this->hasOneof(12); + } + + /** + * Display information of the final state "deliver" and reason. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.DeliverInfo deliver = 12; + * @param \Google\Cloud\NetworkManagement\V1\DeliverInfo $var + * @return $this + */ + public function setDeliver($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\DeliverInfo::class); + $this->writeOneof(12, $var); + + return $this; + } + + /** + * Display information of the final state "forward" and reason. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.ForwardInfo forward = 13; + * @return \Google\Cloud\NetworkManagement\V1\ForwardInfo|null + */ + public function getForward() + { + return $this->readOneof(13); + } + + public function hasForward() + { + return $this->hasOneof(13); + } + + /** + * Display information of the final state "forward" and reason. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.ForwardInfo forward = 13; + * @param \Google\Cloud\NetworkManagement\V1\ForwardInfo $var + * @return $this + */ + public function setForward($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\ForwardInfo::class); + $this->writeOneof(13, $var); + + return $this; + } + + /** + * Display information of the final state "abort" and reason. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.AbortInfo abort = 14; + * @return \Google\Cloud\NetworkManagement\V1\AbortInfo|null + */ + public function getAbort() + { + return $this->readOneof(14); + } + + public function hasAbort() + { + return $this->hasOneof(14); + } + + /** + * Display information of the final state "abort" and reason. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.AbortInfo abort = 14; + * @param \Google\Cloud\NetworkManagement\V1\AbortInfo $var + * @return $this + */ + public function setAbort($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\AbortInfo::class); + $this->writeOneof(14, $var); + + return $this; + } + + /** + * Display information of the final state "drop" and reason. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.DropInfo drop = 15; + * @return \Google\Cloud\NetworkManagement\V1\DropInfo|null + */ + public function getDrop() + { + return $this->readOneof(15); + } + + public function hasDrop() + { + return $this->hasOneof(15); + } + + /** + * Display information of the final state "drop" and reason. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.DropInfo drop = 15; + * @param \Google\Cloud\NetworkManagement\V1\DropInfo $var + * @return $this + */ + public function setDrop($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\DropInfo::class); + $this->writeOneof(15, $var); + + return $this; + } + + /** + * Display information of the load balancers. Deprecated in favor of the + * `load_balancer_backend_info` field, not used in new tests. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.LoadBalancerInfo load_balancer = 16 [deprecated = true]; + * @return \Google\Cloud\NetworkManagement\V1\LoadBalancerInfo|null + * @deprecated + */ + public function getLoadBalancer() + { + @trigger_error('load_balancer is deprecated.', E_USER_DEPRECATED); + return $this->readOneof(16); + } + + public function hasLoadBalancer() + { + @trigger_error('load_balancer is deprecated.', E_USER_DEPRECATED); + return $this->hasOneof(16); + } + + /** + * Display information of the load balancers. Deprecated in favor of the + * `load_balancer_backend_info` field, not used in new tests. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.LoadBalancerInfo load_balancer = 16 [deprecated = true]; + * @param \Google\Cloud\NetworkManagement\V1\LoadBalancerInfo $var + * @return $this + * @deprecated + */ + public function setLoadBalancer($var) + { + @trigger_error('load_balancer is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\LoadBalancerInfo::class); + $this->writeOneof(16, $var); + + return $this; + } + + /** + * Display information of a Google Cloud network. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.NetworkInfo network = 17; + * @return \Google\Cloud\NetworkManagement\V1\NetworkInfo|null + */ + public function getNetwork() + { + return $this->readOneof(17); + } + + public function hasNetwork() + { + return $this->hasOneof(17); + } + + /** + * Display information of a Google Cloud network. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.NetworkInfo network = 17; + * @param \Google\Cloud\NetworkManagement\V1\NetworkInfo $var + * @return $this + */ + public function setNetwork($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\NetworkInfo::class); + $this->writeOneof(17, $var); + + return $this; + } + + /** + * Display information of a Google Kubernetes Engine cluster master. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.GKEMasterInfo gke_master = 18; + * @return \Google\Cloud\NetworkManagement\V1\GKEMasterInfo|null + */ + public function getGkeMaster() + { + return $this->readOneof(18); + } + + public function hasGkeMaster() + { + return $this->hasOneof(18); + } + + /** + * Display information of a Google Kubernetes Engine cluster master. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.GKEMasterInfo gke_master = 18; + * @param \Google\Cloud\NetworkManagement\V1\GKEMasterInfo $var + * @return $this + */ + public function setGkeMaster($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\GKEMasterInfo::class); + $this->writeOneof(18, $var); + + return $this; + } + + /** + * Display information of a Cloud SQL instance. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.CloudSQLInstanceInfo cloud_sql_instance = 19; + * @return \Google\Cloud\NetworkManagement\V1\CloudSQLInstanceInfo|null + */ + public function getCloudSqlInstance() + { + return $this->readOneof(19); + } + + public function hasCloudSqlInstance() + { + return $this->hasOneof(19); + } + + /** + * Display information of a Cloud SQL instance. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.CloudSQLInstanceInfo cloud_sql_instance = 19; + * @param \Google\Cloud\NetworkManagement\V1\CloudSQLInstanceInfo $var + * @return $this + */ + public function setCloudSqlInstance($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\CloudSQLInstanceInfo::class); + $this->writeOneof(19, $var); + + return $this; + } + + /** + * Display information of a Redis Instance. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.RedisInstanceInfo redis_instance = 30; + * @return \Google\Cloud\NetworkManagement\V1\RedisInstanceInfo|null + */ + public function getRedisInstance() + { + return $this->readOneof(30); + } + + public function hasRedisInstance() + { + return $this->hasOneof(30); + } + + /** + * Display information of a Redis Instance. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.RedisInstanceInfo redis_instance = 30; + * @param \Google\Cloud\NetworkManagement\V1\RedisInstanceInfo $var + * @return $this + */ + public function setRedisInstance($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\RedisInstanceInfo::class); + $this->writeOneof(30, $var); + + return $this; + } + + /** + * Display information of a Redis Cluster. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.RedisClusterInfo redis_cluster = 31; + * @return \Google\Cloud\NetworkManagement\V1\RedisClusterInfo|null + */ + public function getRedisCluster() + { + return $this->readOneof(31); + } + + public function hasRedisCluster() + { + return $this->hasOneof(31); + } + + /** + * Display information of a Redis Cluster. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.RedisClusterInfo redis_cluster = 31; + * @param \Google\Cloud\NetworkManagement\V1\RedisClusterInfo $var + * @return $this + */ + public function setRedisCluster($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\RedisClusterInfo::class); + $this->writeOneof(31, $var); + + return $this; + } + + /** + * Display information of a Cloud Function. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.CloudFunctionInfo cloud_function = 20; + * @return \Google\Cloud\NetworkManagement\V1\CloudFunctionInfo|null + */ + public function getCloudFunction() + { + return $this->readOneof(20); + } + + public function hasCloudFunction() + { + return $this->hasOneof(20); + } + + /** + * Display information of a Cloud Function. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.CloudFunctionInfo cloud_function = 20; + * @param \Google\Cloud\NetworkManagement\V1\CloudFunctionInfo $var + * @return $this + */ + public function setCloudFunction($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\CloudFunctionInfo::class); + $this->writeOneof(20, $var); + + return $this; + } + + /** + * Display information of an App Engine service version. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.AppEngineVersionInfo app_engine_version = 22; + * @return \Google\Cloud\NetworkManagement\V1\AppEngineVersionInfo|null + */ + public function getAppEngineVersion() + { + return $this->readOneof(22); + } + + public function hasAppEngineVersion() + { + return $this->hasOneof(22); + } + + /** + * Display information of an App Engine service version. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.AppEngineVersionInfo app_engine_version = 22; + * @param \Google\Cloud\NetworkManagement\V1\AppEngineVersionInfo $var + * @return $this + */ + public function setAppEngineVersion($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\AppEngineVersionInfo::class); + $this->writeOneof(22, $var); + + return $this; + } + + /** + * Display information of a Cloud Run revision. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.CloudRunRevisionInfo cloud_run_revision = 23; + * @return \Google\Cloud\NetworkManagement\V1\CloudRunRevisionInfo|null + */ + public function getCloudRunRevision() + { + return $this->readOneof(23); + } + + public function hasCloudRunRevision() + { + return $this->hasOneof(23); + } + + /** + * Display information of a Cloud Run revision. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.CloudRunRevisionInfo cloud_run_revision = 23; + * @param \Google\Cloud\NetworkManagement\V1\CloudRunRevisionInfo $var + * @return $this + */ + public function setCloudRunRevision($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\CloudRunRevisionInfo::class); + $this->writeOneof(23, $var); + + return $this; + } + + /** + * Display information of a NAT. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.NatInfo nat = 25; + * @return \Google\Cloud\NetworkManagement\V1\NatInfo|null + */ + public function getNat() + { + return $this->readOneof(25); + } + + public function hasNat() + { + return $this->hasOneof(25); + } + + /** + * Display information of a NAT. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.NatInfo nat = 25; + * @param \Google\Cloud\NetworkManagement\V1\NatInfo $var + * @return $this + */ + public function setNat($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\NatInfo::class); + $this->writeOneof(25, $var); + + return $this; + } + + /** + * Display information of a ProxyConnection. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.ProxyConnectionInfo proxy_connection = 26; + * @return \Google\Cloud\NetworkManagement\V1\ProxyConnectionInfo|null + */ + public function getProxyConnection() + { + return $this->readOneof(26); + } + + public function hasProxyConnection() + { + return $this->hasOneof(26); + } + + /** + * Display information of a ProxyConnection. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.ProxyConnectionInfo proxy_connection = 26; + * @param \Google\Cloud\NetworkManagement\V1\ProxyConnectionInfo $var + * @return $this + */ + public function setProxyConnection($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\ProxyConnectionInfo::class); + $this->writeOneof(26, $var); + + return $this; + } + + /** + * Display information of a specific load balancer backend. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.LoadBalancerBackendInfo load_balancer_backend_info = 27; + * @return \Google\Cloud\NetworkManagement\V1\LoadBalancerBackendInfo|null + */ + public function getLoadBalancerBackendInfo() + { + return $this->readOneof(27); + } + + public function hasLoadBalancerBackendInfo() + { + return $this->hasOneof(27); + } + + /** + * Display information of a specific load balancer backend. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.LoadBalancerBackendInfo load_balancer_backend_info = 27; + * @param \Google\Cloud\NetworkManagement\V1\LoadBalancerBackendInfo $var + * @return $this + */ + public function setLoadBalancerBackendInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\LoadBalancerBackendInfo::class); + $this->writeOneof(27, $var); + + return $this; + } + + /** + * Display information of a Storage Bucket. Used only for return traces. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.StorageBucketInfo storage_bucket = 28; + * @return \Google\Cloud\NetworkManagement\V1\StorageBucketInfo|null + */ + public function getStorageBucket() + { + return $this->readOneof(28); + } + + public function hasStorageBucket() + { + return $this->hasOneof(28); + } + + /** + * Display information of a Storage Bucket. Used only for return traces. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.StorageBucketInfo storage_bucket = 28; + * @param \Google\Cloud\NetworkManagement\V1\StorageBucketInfo $var + * @return $this + */ + public function setStorageBucket($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\StorageBucketInfo::class); + $this->writeOneof(28, $var); + + return $this; + } + + /** + * Display information of a Serverless network endpoint group backend. Used + * only for return traces. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.ServerlessNegInfo serverless_neg = 29; + * @return \Google\Cloud\NetworkManagement\V1\ServerlessNegInfo|null + */ + public function getServerlessNeg() + { + return $this->readOneof(29); + } + + public function hasServerlessNeg() + { + return $this->hasOneof(29); + } + + /** + * Display information of a Serverless network endpoint group backend. Used + * only for return traces. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.ServerlessNegInfo serverless_neg = 29; + * @param \Google\Cloud\NetworkManagement\V1\ServerlessNegInfo $var + * @return $this + */ + public function setServerlessNeg($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\ServerlessNegInfo::class); + $this->writeOneof(29, $var); + + return $this; + } + + /** + * @return string + */ + public function getStepInfo() + { + return $this->whichOneof("step_info"); + } + +} + diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Step/State.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Step/State.php new file mode 100644 index 000000000000..291d2e7875d6 --- /dev/null +++ b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Step/State.php @@ -0,0 +1,304 @@ +google.cloud.networkmanagement.v1.Step.State + */ +class State +{ + /** + * Unspecified state. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Initial state: packet originating from a Compute Engine instance. + * An InstanceInfo is populated with starting instance information. + * + * Generated from protobuf enum START_FROM_INSTANCE = 1; + */ + const START_FROM_INSTANCE = 1; + /** + * Initial state: packet originating from the internet. + * The endpoint information is populated. + * + * Generated from protobuf enum START_FROM_INTERNET = 2; + */ + const START_FROM_INTERNET = 2; + /** + * Initial state: packet originating from a Google service. + * The google_service information is populated. + * + * Generated from protobuf enum START_FROM_GOOGLE_SERVICE = 27; + */ + const START_FROM_GOOGLE_SERVICE = 27; + /** + * Initial state: packet originating from a VPC or on-premises network + * with internal source IP. + * If the source is a VPC network visible to the user, a NetworkInfo + * is populated with details of the network. + * + * Generated from protobuf enum START_FROM_PRIVATE_NETWORK = 3; + */ + const START_FROM_PRIVATE_NETWORK = 3; + /** + * Initial state: packet originating from a Google Kubernetes Engine cluster + * master. A GKEMasterInfo is populated with starting instance information. + * + * Generated from protobuf enum START_FROM_GKE_MASTER = 21; + */ + const START_FROM_GKE_MASTER = 21; + /** + * Initial state: packet originating from a Cloud SQL instance. + * A CloudSQLInstanceInfo is populated with starting instance information. + * + * Generated from protobuf enum START_FROM_CLOUD_SQL_INSTANCE = 22; + */ + const START_FROM_CLOUD_SQL_INSTANCE = 22; + /** + * Initial state: packet originating from a Redis instance. + * A RedisInstanceInfo is populated with starting instance information. + * + * Generated from protobuf enum START_FROM_REDIS_INSTANCE = 32; + */ + const START_FROM_REDIS_INSTANCE = 32; + /** + * Initial state: packet originating from a Redis Cluster. + * A RedisClusterInfo is populated with starting Cluster information. + * + * Generated from protobuf enum START_FROM_REDIS_CLUSTER = 33; + */ + const START_FROM_REDIS_CLUSTER = 33; + /** + * Initial state: packet originating from a Cloud Function. + * A CloudFunctionInfo is populated with starting function information. + * + * Generated from protobuf enum START_FROM_CLOUD_FUNCTION = 23; + */ + const START_FROM_CLOUD_FUNCTION = 23; + /** + * Initial state: packet originating from an App Engine service version. + * An AppEngineVersionInfo is populated with starting version information. + * + * Generated from protobuf enum START_FROM_APP_ENGINE_VERSION = 25; + */ + const START_FROM_APP_ENGINE_VERSION = 25; + /** + * Initial state: packet originating from a Cloud Run revision. + * A CloudRunRevisionInfo is populated with starting revision information. + * + * Generated from protobuf enum START_FROM_CLOUD_RUN_REVISION = 26; + */ + const START_FROM_CLOUD_RUN_REVISION = 26; + /** + * Initial state: packet originating from a Storage Bucket. Used only for + * return traces. + * The storage_bucket information is populated. + * + * Generated from protobuf enum START_FROM_STORAGE_BUCKET = 29; + */ + const START_FROM_STORAGE_BUCKET = 29; + /** + * Initial state: packet originating from a published service that uses + * Private Service Connect. Used only for return traces. + * + * Generated from protobuf enum START_FROM_PSC_PUBLISHED_SERVICE = 30; + */ + const START_FROM_PSC_PUBLISHED_SERVICE = 30; + /** + * Initial state: packet originating from a serverless network endpoint + * group backend. Used only for return traces. + * The serverless_neg information is populated. + * + * Generated from protobuf enum START_FROM_SERVERLESS_NEG = 31; + */ + const START_FROM_SERVERLESS_NEG = 31; + /** + * Config checking state: verify ingress firewall rule. + * + * Generated from protobuf enum APPLY_INGRESS_FIREWALL_RULE = 4; + */ + const APPLY_INGRESS_FIREWALL_RULE = 4; + /** + * Config checking state: verify egress firewall rule. + * + * Generated from protobuf enum APPLY_EGRESS_FIREWALL_RULE = 5; + */ + const APPLY_EGRESS_FIREWALL_RULE = 5; + /** + * Config checking state: verify route. + * + * Generated from protobuf enum APPLY_ROUTE = 6; + */ + const APPLY_ROUTE = 6; + /** + * Config checking state: match forwarding rule. + * + * Generated from protobuf enum APPLY_FORWARDING_RULE = 7; + */ + const APPLY_FORWARDING_RULE = 7; + /** + * Config checking state: verify load balancer backend configuration. + * + * Generated from protobuf enum ANALYZE_LOAD_BALANCER_BACKEND = 28; + */ + const ANALYZE_LOAD_BALANCER_BACKEND = 28; + /** + * Config checking state: packet sent or received under foreign IP + * address and allowed. + * + * Generated from protobuf enum SPOOFING_APPROVED = 8; + */ + const SPOOFING_APPROVED = 8; + /** + * Forwarding state: arriving at a Compute Engine instance. + * + * Generated from protobuf enum ARRIVE_AT_INSTANCE = 9; + */ + const ARRIVE_AT_INSTANCE = 9; + /** + * Forwarding state: arriving at a Compute Engine internal load balancer. + * + * Generated from protobuf enum ARRIVE_AT_INTERNAL_LOAD_BALANCER = 10 [deprecated = true]; + */ + const ARRIVE_AT_INTERNAL_LOAD_BALANCER = 10; + /** + * Forwarding state: arriving at a Compute Engine external load balancer. + * + * Generated from protobuf enum ARRIVE_AT_EXTERNAL_LOAD_BALANCER = 11 [deprecated = true]; + */ + const ARRIVE_AT_EXTERNAL_LOAD_BALANCER = 11; + /** + * Forwarding state: arriving at a Cloud VPN gateway. + * + * Generated from protobuf enum ARRIVE_AT_VPN_GATEWAY = 12; + */ + const ARRIVE_AT_VPN_GATEWAY = 12; + /** + * Forwarding state: arriving at a Cloud VPN tunnel. + * + * Generated from protobuf enum ARRIVE_AT_VPN_TUNNEL = 13; + */ + const ARRIVE_AT_VPN_TUNNEL = 13; + /** + * Forwarding state: arriving at a VPC connector. + * + * Generated from protobuf enum ARRIVE_AT_VPC_CONNECTOR = 24; + */ + const ARRIVE_AT_VPC_CONNECTOR = 24; + /** + * Transition state: packet header translated. + * + * Generated from protobuf enum NAT = 14; + */ + const NAT = 14; + /** + * Transition state: original connection is terminated and a new proxied + * connection is initiated. + * + * Generated from protobuf enum PROXY_CONNECTION = 15; + */ + const PROXY_CONNECTION = 15; + /** + * Final state: packet could be delivered. + * + * Generated from protobuf enum DELIVER = 16; + */ + const DELIVER = 16; + /** + * Final state: packet could be dropped. + * + * Generated from protobuf enum DROP = 17; + */ + const DROP = 17; + /** + * Final state: packet could be forwarded to a network with an unknown + * configuration. + * + * Generated from protobuf enum FORWARD = 18; + */ + const FORWARD = 18; + /** + * Final state: analysis is aborted. + * + * Generated from protobuf enum ABORT = 19; + */ + const ABORT = 19; + /** + * Special state: viewer of the test result does not have permission to + * see the configuration in this step. + * + * Generated from protobuf enum VIEWER_PERMISSION_MISSING = 20; + */ + const VIEWER_PERMISSION_MISSING = 20; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::START_FROM_INSTANCE => 'START_FROM_INSTANCE', + self::START_FROM_INTERNET => 'START_FROM_INTERNET', + self::START_FROM_GOOGLE_SERVICE => 'START_FROM_GOOGLE_SERVICE', + self::START_FROM_PRIVATE_NETWORK => 'START_FROM_PRIVATE_NETWORK', + self::START_FROM_GKE_MASTER => 'START_FROM_GKE_MASTER', + self::START_FROM_CLOUD_SQL_INSTANCE => 'START_FROM_CLOUD_SQL_INSTANCE', + self::START_FROM_REDIS_INSTANCE => 'START_FROM_REDIS_INSTANCE', + self::START_FROM_REDIS_CLUSTER => 'START_FROM_REDIS_CLUSTER', + self::START_FROM_CLOUD_FUNCTION => 'START_FROM_CLOUD_FUNCTION', + self::START_FROM_APP_ENGINE_VERSION => 'START_FROM_APP_ENGINE_VERSION', + self::START_FROM_CLOUD_RUN_REVISION => 'START_FROM_CLOUD_RUN_REVISION', + self::START_FROM_STORAGE_BUCKET => 'START_FROM_STORAGE_BUCKET', + self::START_FROM_PSC_PUBLISHED_SERVICE => 'START_FROM_PSC_PUBLISHED_SERVICE', + self::START_FROM_SERVERLESS_NEG => 'START_FROM_SERVERLESS_NEG', + self::APPLY_INGRESS_FIREWALL_RULE => 'APPLY_INGRESS_FIREWALL_RULE', + self::APPLY_EGRESS_FIREWALL_RULE => 'APPLY_EGRESS_FIREWALL_RULE', + self::APPLY_ROUTE => 'APPLY_ROUTE', + self::APPLY_FORWARDING_RULE => 'APPLY_FORWARDING_RULE', + self::ANALYZE_LOAD_BALANCER_BACKEND => 'ANALYZE_LOAD_BALANCER_BACKEND', + self::SPOOFING_APPROVED => 'SPOOFING_APPROVED', + self::ARRIVE_AT_INSTANCE => 'ARRIVE_AT_INSTANCE', + self::ARRIVE_AT_INTERNAL_LOAD_BALANCER => 'ARRIVE_AT_INTERNAL_LOAD_BALANCER', + self::ARRIVE_AT_EXTERNAL_LOAD_BALANCER => 'ARRIVE_AT_EXTERNAL_LOAD_BALANCER', + self::ARRIVE_AT_VPN_GATEWAY => 'ARRIVE_AT_VPN_GATEWAY', + self::ARRIVE_AT_VPN_TUNNEL => 'ARRIVE_AT_VPN_TUNNEL', + self::ARRIVE_AT_VPC_CONNECTOR => 'ARRIVE_AT_VPC_CONNECTOR', + self::NAT => 'NAT', + self::PROXY_CONNECTION => 'PROXY_CONNECTION', + self::DELIVER => 'DELIVER', + self::DROP => 'DROP', + self::FORWARD => 'FORWARD', + self::ABORT => 'ABORT', + self::VIEWER_PERMISSION_MISSING => 'VIEWER_PERMISSION_MISSING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\NetworkManagement\V1\Step_State::class); + diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/StorageBucketInfo.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/StorageBucketInfo.php new file mode 100644 index 000000000000..58b34cf98567 --- /dev/null +++ b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/StorageBucketInfo.php @@ -0,0 +1,67 @@ +google.cloud.networkmanagement.v1.StorageBucketInfo + */ +class StorageBucketInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud Storage Bucket name. + * + * Generated from protobuf field string bucket = 1; + */ + protected $bucket = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $bucket + * Cloud Storage Bucket name. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkmanagement\V1\Trace::initOnce(); + parent::__construct($data); + } + + /** + * Cloud Storage Bucket name. + * + * Generated from protobuf field string bucket = 1; + * @return string + */ + public function getBucket() + { + return $this->bucket; + } + + /** + * Cloud Storage Bucket name. + * + * Generated from protobuf field string bucket = 1; + * @param string $var + * @return $this + */ + public function setBucket($var) + { + GPBUtil::checkString($var, True); + $this->bucket = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Trace.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Trace.php new file mode 100644 index 000000000000..02548d666c07 --- /dev/null +++ b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Trace.php @@ -0,0 +1,190 @@ +google.cloud.networkmanagement.v1.Trace + */ +class Trace extends \Google\Protobuf\Internal\Message +{ + /** + * Derived from the source and destination endpoints definition specified by + * user request, and validated by the data plane model. + * If there are multiple traces starting from different source locations, then + * the endpoint_info may be different between traces. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.EndpointInfo endpoint_info = 1; + */ + protected $endpoint_info = null; + /** + * A trace of a test contains multiple steps from the initial state to the + * final state (delivered, dropped, forwarded, or aborted). + * The steps are ordered by the processing sequence within the simulated + * network state machine. It is critical to preserve the order of the steps + * and avoid reordering or sorting them. + * + * Generated from protobuf field repeated .google.cloud.networkmanagement.v1.Step steps = 2; + */ + private $steps; + /** + * ID of trace. For forward traces, this ID is unique for each trace. For + * return traces, it matches ID of associated forward trace. A single forward + * trace can be associated with none, one or more than one return trace. + * + * Generated from protobuf field int32 forward_trace_id = 4; + */ + protected $forward_trace_id = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\NetworkManagement\V1\EndpointInfo $endpoint_info + * Derived from the source and destination endpoints definition specified by + * user request, and validated by the data plane model. + * If there are multiple traces starting from different source locations, then + * the endpoint_info may be different between traces. + * @type array<\Google\Cloud\NetworkManagement\V1\Step>|\Google\Protobuf\Internal\RepeatedField $steps + * A trace of a test contains multiple steps from the initial state to the + * final state (delivered, dropped, forwarded, or aborted). + * The steps are ordered by the processing sequence within the simulated + * network state machine. It is critical to preserve the order of the steps + * and avoid reordering or sorting them. + * @type int $forward_trace_id + * ID of trace. For forward traces, this ID is unique for each trace. For + * return traces, it matches ID of associated forward trace. A single forward + * trace can be associated with none, one or more than one return trace. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkmanagement\V1\Trace::initOnce(); + parent::__construct($data); + } + + /** + * Derived from the source and destination endpoints definition specified by + * user request, and validated by the data plane model. + * If there are multiple traces starting from different source locations, then + * the endpoint_info may be different between traces. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.EndpointInfo endpoint_info = 1; + * @return \Google\Cloud\NetworkManagement\V1\EndpointInfo|null + */ + public function getEndpointInfo() + { + return $this->endpoint_info; + } + + public function hasEndpointInfo() + { + return isset($this->endpoint_info); + } + + public function clearEndpointInfo() + { + unset($this->endpoint_info); + } + + /** + * Derived from the source and destination endpoints definition specified by + * user request, and validated by the data plane model. + * If there are multiple traces starting from different source locations, then + * the endpoint_info may be different between traces. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.EndpointInfo endpoint_info = 1; + * @param \Google\Cloud\NetworkManagement\V1\EndpointInfo $var + * @return $this + */ + public function setEndpointInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\EndpointInfo::class); + $this->endpoint_info = $var; + + return $this; + } + + /** + * A trace of a test contains multiple steps from the initial state to the + * final state (delivered, dropped, forwarded, or aborted). + * The steps are ordered by the processing sequence within the simulated + * network state machine. It is critical to preserve the order of the steps + * and avoid reordering or sorting them. + * + * Generated from protobuf field repeated .google.cloud.networkmanagement.v1.Step steps = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSteps() + { + return $this->steps; + } + + /** + * A trace of a test contains multiple steps from the initial state to the + * final state (delivered, dropped, forwarded, or aborted). + * The steps are ordered by the processing sequence within the simulated + * network state machine. It is critical to preserve the order of the steps + * and avoid reordering or sorting them. + * + * Generated from protobuf field repeated .google.cloud.networkmanagement.v1.Step steps = 2; + * @param array<\Google\Cloud\NetworkManagement\V1\Step>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSteps($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkManagement\V1\Step::class); + $this->steps = $arr; + + return $this; + } + + /** + * ID of trace. For forward traces, this ID is unique for each trace. For + * return traces, it matches ID of associated forward trace. A single forward + * trace can be associated with none, one or more than one return trace. + * + * Generated from protobuf field int32 forward_trace_id = 4; + * @return int + */ + public function getForwardTraceId() + { + return $this->forward_trace_id; + } + + /** + * ID of trace. For forward traces, this ID is unique for each trace. For + * return traces, it matches ID of associated forward trace. A single forward + * trace can be associated with none, one or more than one return trace. + * + * Generated from protobuf field int32 forward_trace_id = 4; + * @param int $var + * @return $this + */ + public function setForwardTraceId($var) + { + GPBUtil::checkInt32($var); + $this->forward_trace_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/UpdateConnectivityTestRequest.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/UpdateConnectivityTestRequest.php new file mode 100644 index 000000000000..095a3a882e67 --- /dev/null +++ b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/UpdateConnectivityTestRequest.php @@ -0,0 +1,141 @@ +google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest + */ +class UpdateConnectivityTestRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Mask of fields to update. At least one path must be supplied in + * this field. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + /** + * Required. Only fields specified in update_mask are updated. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.ConnectivityTest resource = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $resource = null; + + /** + * @param \Google\Protobuf\FieldMask $updateMask Required. Mask of fields to update. At least one path must be supplied in + * this field. + * @param \Google\Cloud\NetworkManagement\V1\ConnectivityTest $resource Required. Only fields specified in update_mask are updated. + * + * @return \Google\Cloud\NetworkManagement\V1\UpdateConnectivityTestRequest + * + * @experimental + */ + public static function build(\Google\Protobuf\FieldMask $updateMask, \Google\Cloud\NetworkManagement\V1\ConnectivityTest $resource): self + { + return (new self()) + ->setUpdateMask($updateMask) + ->setResource($resource); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Required. Mask of fields to update. At least one path must be supplied in + * this field. + * @type \Google\Cloud\NetworkManagement\V1\ConnectivityTest $resource + * Required. Only fields specified in update_mask are updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkmanagement\V1\Reachability::initOnce(); + parent::__construct($data); + } + + /** + * Required. Mask of fields to update. At least one path must be supplied in + * this field. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. Mask of fields to update. At least one path must be supplied in + * this field. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Required. Only fields specified in update_mask are updated. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.ConnectivityTest resource = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetworkManagement\V1\ConnectivityTest|null + */ + public function getResource() + { + return $this->resource; + } + + public function hasResource() + { + return isset($this->resource); + } + + public function clearResource() + { + unset($this->resource); + } + + /** + * Required. Only fields specified in update_mask are updated. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.ConnectivityTest resource = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetworkManagement\V1\ConnectivityTest $var + * @return $this + */ + public function setResource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\ConnectivityTest::class); + $this->resource = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/VpcConnectorInfo.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/VpcConnectorInfo.php new file mode 100644 index 000000000000..c96a59d85686 --- /dev/null +++ b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/VpcConnectorInfo.php @@ -0,0 +1,135 @@ +google.cloud.networkmanagement.v1.VpcConnectorInfo + */ +class VpcConnectorInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Name of a VPC connector. + * + * Generated from protobuf field string display_name = 1; + */ + protected $display_name = ''; + /** + * URI of a VPC connector. + * + * Generated from protobuf field string uri = 2; + */ + protected $uri = ''; + /** + * Location in which the VPC connector is deployed. + * + * Generated from protobuf field string location = 3; + */ + protected $location = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $display_name + * Name of a VPC connector. + * @type string $uri + * URI of a VPC connector. + * @type string $location + * Location in which the VPC connector is deployed. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkmanagement\V1\Trace::initOnce(); + parent::__construct($data); + } + + /** + * Name of a VPC connector. + * + * Generated from protobuf field string display_name = 1; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Name of a VPC connector. + * + * Generated from protobuf field string display_name = 1; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * URI of a VPC connector. + * + * Generated from protobuf field string uri = 2; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * URI of a VPC connector. + * + * Generated from protobuf field string uri = 2; + * @param string $var + * @return $this + */ + public function setUri($var) + { + GPBUtil::checkString($var, True); + $this->uri = $var; + + return $this; + } + + /** + * Location in which the VPC connector is deployed. + * + * Generated from protobuf field string location = 3; + * @return string + */ + public function getLocation() + { + return $this->location; + } + + /** + * Location in which the VPC connector is deployed. + * + * Generated from protobuf field string location = 3; + * @param string $var + * @return $this + */ + public function setLocation($var) + { + GPBUtil::checkString($var, True); + $this->location = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/VpnGatewayInfo.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/VpnGatewayInfo.php new file mode 100644 index 000000000000..61f964197e52 --- /dev/null +++ b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/VpnGatewayInfo.php @@ -0,0 +1,245 @@ +google.cloud.networkmanagement.v1.VpnGatewayInfo + */ +class VpnGatewayInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Name of a VPN gateway. + * + * Generated from protobuf field string display_name = 1; + */ + protected $display_name = ''; + /** + * URI of a VPN gateway. + * + * Generated from protobuf field string uri = 2; + */ + protected $uri = ''; + /** + * URI of a Compute Engine network where the VPN gateway is configured. + * + * Generated from protobuf field string network_uri = 3; + */ + protected $network_uri = ''; + /** + * IP address of the VPN gateway. + * + * Generated from protobuf field string ip_address = 4; + */ + protected $ip_address = ''; + /** + * A VPN tunnel that is associated with this VPN gateway. + * There may be multiple VPN tunnels configured on a VPN gateway, and only + * the one relevant to the test is displayed. + * + * Generated from protobuf field string vpn_tunnel_uri = 5; + */ + protected $vpn_tunnel_uri = ''; + /** + * Name of a Google Cloud region where this VPN gateway is configured. + * + * Generated from protobuf field string region = 6; + */ + protected $region = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $display_name + * Name of a VPN gateway. + * @type string $uri + * URI of a VPN gateway. + * @type string $network_uri + * URI of a Compute Engine network where the VPN gateway is configured. + * @type string $ip_address + * IP address of the VPN gateway. + * @type string $vpn_tunnel_uri + * A VPN tunnel that is associated with this VPN gateway. + * There may be multiple VPN tunnels configured on a VPN gateway, and only + * the one relevant to the test is displayed. + * @type string $region + * Name of a Google Cloud region where this VPN gateway is configured. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkmanagement\V1\Trace::initOnce(); + parent::__construct($data); + } + + /** + * Name of a VPN gateway. + * + * Generated from protobuf field string display_name = 1; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Name of a VPN gateway. + * + * Generated from protobuf field string display_name = 1; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * URI of a VPN gateway. + * + * Generated from protobuf field string uri = 2; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * URI of a VPN gateway. + * + * Generated from protobuf field string uri = 2; + * @param string $var + * @return $this + */ + public function setUri($var) + { + GPBUtil::checkString($var, True); + $this->uri = $var; + + return $this; + } + + /** + * URI of a Compute Engine network where the VPN gateway is configured. + * + * Generated from protobuf field string network_uri = 3; + * @return string + */ + public function getNetworkUri() + { + return $this->network_uri; + } + + /** + * URI of a Compute Engine network where the VPN gateway is configured. + * + * Generated from protobuf field string network_uri = 3; + * @param string $var + * @return $this + */ + public function setNetworkUri($var) + { + GPBUtil::checkString($var, True); + $this->network_uri = $var; + + return $this; + } + + /** + * IP address of the VPN gateway. + * + * Generated from protobuf field string ip_address = 4; + * @return string + */ + public function getIpAddress() + { + return $this->ip_address; + } + + /** + * IP address of the VPN gateway. + * + * Generated from protobuf field string ip_address = 4; + * @param string $var + * @return $this + */ + public function setIpAddress($var) + { + GPBUtil::checkString($var, True); + $this->ip_address = $var; + + return $this; + } + + /** + * A VPN tunnel that is associated with this VPN gateway. + * There may be multiple VPN tunnels configured on a VPN gateway, and only + * the one relevant to the test is displayed. + * + * Generated from protobuf field string vpn_tunnel_uri = 5; + * @return string + */ + public function getVpnTunnelUri() + { + return $this->vpn_tunnel_uri; + } + + /** + * A VPN tunnel that is associated with this VPN gateway. + * There may be multiple VPN tunnels configured on a VPN gateway, and only + * the one relevant to the test is displayed. + * + * Generated from protobuf field string vpn_tunnel_uri = 5; + * @param string $var + * @return $this + */ + public function setVpnTunnelUri($var) + { + GPBUtil::checkString($var, True); + $this->vpn_tunnel_uri = $var; + + return $this; + } + + /** + * Name of a Google Cloud region where this VPN gateway is configured. + * + * Generated from protobuf field string region = 6; + * @return string + */ + public function getRegion() + { + return $this->region; + } + + /** + * Name of a Google Cloud region where this VPN gateway is configured. + * + * Generated from protobuf field string region = 6; + * @param string $var + * @return $this + */ + public function setRegion($var) + { + GPBUtil::checkString($var, True); + $this->region = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/VpnTunnelInfo.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/VpnTunnelInfo.php new file mode 100644 index 000000000000..8785392491d0 --- /dev/null +++ b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/VpnTunnelInfo.php @@ -0,0 +1,339 @@ +google.cloud.networkmanagement.v1.VpnTunnelInfo + */ +class VpnTunnelInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Name of a VPN tunnel. + * + * Generated from protobuf field string display_name = 1; + */ + protected $display_name = ''; + /** + * URI of a VPN tunnel. + * + * Generated from protobuf field string uri = 2; + */ + protected $uri = ''; + /** + * URI of the VPN gateway at local end of the tunnel. + * + * Generated from protobuf field string source_gateway = 3; + */ + protected $source_gateway = ''; + /** + * URI of a VPN gateway at remote end of the tunnel. + * + * Generated from protobuf field string remote_gateway = 4; + */ + protected $remote_gateway = ''; + /** + * Remote VPN gateway's IP address. + * + * Generated from protobuf field string remote_gateway_ip = 5; + */ + protected $remote_gateway_ip = ''; + /** + * Local VPN gateway's IP address. + * + * Generated from protobuf field string source_gateway_ip = 6; + */ + protected $source_gateway_ip = ''; + /** + * URI of a Compute Engine network where the VPN tunnel is configured. + * + * Generated from protobuf field string network_uri = 7; + */ + protected $network_uri = ''; + /** + * Name of a Google Cloud region where this VPN tunnel is configured. + * + * Generated from protobuf field string region = 8; + */ + protected $region = ''; + /** + * Type of the routing policy. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType routing_type = 9; + */ + protected $routing_type = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $display_name + * Name of a VPN tunnel. + * @type string $uri + * URI of a VPN tunnel. + * @type string $source_gateway + * URI of the VPN gateway at local end of the tunnel. + * @type string $remote_gateway + * URI of a VPN gateway at remote end of the tunnel. + * @type string $remote_gateway_ip + * Remote VPN gateway's IP address. + * @type string $source_gateway_ip + * Local VPN gateway's IP address. + * @type string $network_uri + * URI of a Compute Engine network where the VPN tunnel is configured. + * @type string $region + * Name of a Google Cloud region where this VPN tunnel is configured. + * @type int $routing_type + * Type of the routing policy. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkmanagement\V1\Trace::initOnce(); + parent::__construct($data); + } + + /** + * Name of a VPN tunnel. + * + * Generated from protobuf field string display_name = 1; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Name of a VPN tunnel. + * + * Generated from protobuf field string display_name = 1; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * URI of a VPN tunnel. + * + * Generated from protobuf field string uri = 2; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * URI of a VPN tunnel. + * + * Generated from protobuf field string uri = 2; + * @param string $var + * @return $this + */ + public function setUri($var) + { + GPBUtil::checkString($var, True); + $this->uri = $var; + + return $this; + } + + /** + * URI of the VPN gateway at local end of the tunnel. + * + * Generated from protobuf field string source_gateway = 3; + * @return string + */ + public function getSourceGateway() + { + return $this->source_gateway; + } + + /** + * URI of the VPN gateway at local end of the tunnel. + * + * Generated from protobuf field string source_gateway = 3; + * @param string $var + * @return $this + */ + public function setSourceGateway($var) + { + GPBUtil::checkString($var, True); + $this->source_gateway = $var; + + return $this; + } + + /** + * URI of a VPN gateway at remote end of the tunnel. + * + * Generated from protobuf field string remote_gateway = 4; + * @return string + */ + public function getRemoteGateway() + { + return $this->remote_gateway; + } + + /** + * URI of a VPN gateway at remote end of the tunnel. + * + * Generated from protobuf field string remote_gateway = 4; + * @param string $var + * @return $this + */ + public function setRemoteGateway($var) + { + GPBUtil::checkString($var, True); + $this->remote_gateway = $var; + + return $this; + } + + /** + * Remote VPN gateway's IP address. + * + * Generated from protobuf field string remote_gateway_ip = 5; + * @return string + */ + public function getRemoteGatewayIp() + { + return $this->remote_gateway_ip; + } + + /** + * Remote VPN gateway's IP address. + * + * Generated from protobuf field string remote_gateway_ip = 5; + * @param string $var + * @return $this + */ + public function setRemoteGatewayIp($var) + { + GPBUtil::checkString($var, True); + $this->remote_gateway_ip = $var; + + return $this; + } + + /** + * Local VPN gateway's IP address. + * + * Generated from protobuf field string source_gateway_ip = 6; + * @return string + */ + public function getSourceGatewayIp() + { + return $this->source_gateway_ip; + } + + /** + * Local VPN gateway's IP address. + * + * Generated from protobuf field string source_gateway_ip = 6; + * @param string $var + * @return $this + */ + public function setSourceGatewayIp($var) + { + GPBUtil::checkString($var, True); + $this->source_gateway_ip = $var; + + return $this; + } + + /** + * URI of a Compute Engine network where the VPN tunnel is configured. + * + * Generated from protobuf field string network_uri = 7; + * @return string + */ + public function getNetworkUri() + { + return $this->network_uri; + } + + /** + * URI of a Compute Engine network where the VPN tunnel is configured. + * + * Generated from protobuf field string network_uri = 7; + * @param string $var + * @return $this + */ + public function setNetworkUri($var) + { + GPBUtil::checkString($var, True); + $this->network_uri = $var; + + return $this; + } + + /** + * Name of a Google Cloud region where this VPN tunnel is configured. + * + * Generated from protobuf field string region = 8; + * @return string + */ + public function getRegion() + { + return $this->region; + } + + /** + * Name of a Google Cloud region where this VPN tunnel is configured. + * + * Generated from protobuf field string region = 8; + * @param string $var + * @return $this + */ + public function setRegion($var) + { + GPBUtil::checkString($var, True); + $this->region = $var; + + return $this; + } + + /** + * Type of the routing policy. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType routing_type = 9; + * @return int + */ + public function getRoutingType() + { + return $this->routing_type; + } + + /** + * Type of the routing policy. + * + * Generated from protobuf field .google.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType routing_type = 9; + * @param int $var + * @return $this + */ + public function setRoutingType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetworkManagement\V1\VpnTunnelInfo\RoutingType::class); + $this->routing_type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/VpnTunnelInfo/RoutingType.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/VpnTunnelInfo/RoutingType.php new file mode 100644 index 000000000000..2550fd4408aa --- /dev/null +++ b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/VpnTunnelInfo/RoutingType.php @@ -0,0 +1,72 @@ +google.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType + */ +class RoutingType +{ + /** + * Unspecified type. Default value. + * + * Generated from protobuf enum ROUTING_TYPE_UNSPECIFIED = 0; + */ + const ROUTING_TYPE_UNSPECIFIED = 0; + /** + * Route based VPN. + * + * Generated from protobuf enum ROUTE_BASED = 1; + */ + const ROUTE_BASED = 1; + /** + * Policy based routing. + * + * Generated from protobuf enum POLICY_BASED = 2; + */ + const POLICY_BASED = 2; + /** + * Dynamic (BGP) routing. + * + * Generated from protobuf enum DYNAMIC = 3; + */ + const DYNAMIC = 3; + + private static $valueToName = [ + self::ROUTING_TYPE_UNSPECIFIED => 'ROUTING_TYPE_UNSPECIFIED', + self::ROUTE_BASED => 'ROUTE_BASED', + self::POLICY_BASED => 'POLICY_BASED', + self::DYNAMIC => 'DYNAMIC', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(RoutingType::class, \Google\Cloud\NetworkManagement\V1\VpnTunnelInfo_RoutingType::class); + diff --git a/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/create_connectivity_test.php b/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/create_connectivity_test.php new file mode 100644 index 000000000000..83ef844fa379 --- /dev/null +++ b/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/create_connectivity_test.php @@ -0,0 +1,113 @@ +AMBIGUOUS. For more information, + * see the Connectivity Test documentation. + * + * @param string $formattedParent The parent resource of the Connectivity Test to create: + * `projects/{project_id}/locations/global` + * Please see {@see ReachabilityServiceClient::projectName()} for help formatting this field. + * @param string $testId The logical name of the Connectivity Test in your project + * with the following restrictions: + * + * * Must contain only lowercase letters, numbers, and hyphens. + * * Must start with a letter. + * * Must be between 1-40 characters. + * * Must end with a number or a letter. + * * Must be unique within the customer project + */ +function create_connectivity_test_sample(string $formattedParent, string $testId): void +{ + // Create a client. + $reachabilityServiceClient = new ReachabilityServiceClient(); + + // Prepare the request message. + $resourceSource = new Endpoint(); + $resourceDestination = new Endpoint(); + $resource = (new ConnectivityTest()) + ->setSource($resourceSource) + ->setDestination($resourceDestination); + $request = (new CreateConnectivityTestRequest()) + ->setParent($formattedParent) + ->setTestId($testId) + ->setResource($resource); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $reachabilityServiceClient->createConnectivityTest($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var ConnectivityTest $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = ReachabilityServiceClient::projectName('[PROJECT]'); + $testId = '[TEST_ID]'; + + create_connectivity_test_sample($formattedParent, $testId); +} +// [END networkmanagement_v1_generated_ReachabilityService_CreateConnectivityTest_sync] diff --git a/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/delete_connectivity_test.php b/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/delete_connectivity_test.php new file mode 100644 index 000000000000..1ffa29724401 --- /dev/null +++ b/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/delete_connectivity_test.php @@ -0,0 +1,81 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $reachabilityServiceClient->deleteConnectivityTest($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ReachabilityServiceClient::connectivityTestName('[PROJECT]', '[TEST]'); + + delete_connectivity_test_sample($formattedName); +} +// [END networkmanagement_v1_generated_ReachabilityService_DeleteConnectivityTest_sync] diff --git a/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/get_connectivity_test.php b/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/get_connectivity_test.php new file mode 100644 index 000000000000..1999744026dc --- /dev/null +++ b/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/get_connectivity_test.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var ConnectivityTest $response */ + $response = $reachabilityServiceClient->getConnectivityTest($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ReachabilityServiceClient::connectivityTestName('[PROJECT]', '[TEST]'); + + get_connectivity_test_sample($formattedName); +} +// [END networkmanagement_v1_generated_ReachabilityService_GetConnectivityTest_sync] diff --git a/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/get_iam_policy.php b/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/get_iam_policy.php new file mode 100644 index 000000000000..e4226170ac96 --- /dev/null +++ b/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/get_iam_policy.php @@ -0,0 +1,72 @@ +setResource($resource); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $reachabilityServiceClient->getIamPolicy($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + + get_iam_policy_sample($resource); +} +// [END networkmanagement_v1_generated_ReachabilityService_GetIamPolicy_sync] diff --git a/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/get_location.php b/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/get_location.php new file mode 100644 index 000000000000..e594c2cfd061 --- /dev/null +++ b/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/get_location.php @@ -0,0 +1,57 @@ +getLocation($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END networkmanagement_v1_generated_ReachabilityService_GetLocation_sync] diff --git a/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/list_connectivity_tests.php b/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/list_connectivity_tests.php new file mode 100644 index 000000000000..8ee577e167dd --- /dev/null +++ b/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/list_connectivity_tests.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $reachabilityServiceClient->listConnectivityTests($request); + + /** @var ConnectivityTest $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = ReachabilityServiceClient::projectName('[PROJECT]'); + + list_connectivity_tests_sample($formattedParent); +} +// [END networkmanagement_v1_generated_ReachabilityService_ListConnectivityTests_sync] diff --git a/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/list_locations.php b/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/list_locations.php new file mode 100644 index 000000000000..e91b67957674 --- /dev/null +++ b/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/list_locations.php @@ -0,0 +1,62 @@ +listLocations($request); + + /** @var Location $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END networkmanagement_v1_generated_ReachabilityService_ListLocations_sync] diff --git a/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/rerun_connectivity_test.php b/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/rerun_connectivity_test.php new file mode 100644 index 000000000000..1376f628e3f9 --- /dev/null +++ b/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/rerun_connectivity_test.php @@ -0,0 +1,95 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $reachabilityServiceClient->rerunConnectivityTest($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var ConnectivityTest $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ReachabilityServiceClient::connectivityTestName('[PROJECT]', '[TEST]'); + + rerun_connectivity_test_sample($formattedName); +} +// [END networkmanagement_v1_generated_ReachabilityService_RerunConnectivityTest_sync] diff --git a/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/set_iam_policy.php b/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/set_iam_policy.php new file mode 100644 index 000000000000..8a0d67908524 --- /dev/null +++ b/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/set_iam_policy.php @@ -0,0 +1,77 @@ +setResource($resource) + ->setPolicy($policy); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $reachabilityServiceClient->setIamPolicy($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + + set_iam_policy_sample($resource); +} +// [END networkmanagement_v1_generated_ReachabilityService_SetIamPolicy_sync] diff --git a/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/test_iam_permissions.php b/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/test_iam_permissions.php new file mode 100644 index 000000000000..000a79d492e0 --- /dev/null +++ b/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/test_iam_permissions.php @@ -0,0 +1,84 @@ +setResource($resource) + ->setPermissions($permissions); + + // Call the API and handle any network failures. + try { + /** @var TestIamPermissionsResponse $response */ + $response = $reachabilityServiceClient->testIamPermissions($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + $permissionsElement = '[PERMISSIONS]'; + + test_iam_permissions_sample($resource, $permissionsElement); +} +// [END networkmanagement_v1_generated_ReachabilityService_TestIamPermissions_sync] diff --git a/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/update_connectivity_test.php b/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/update_connectivity_test.php new file mode 100644 index 000000000000..a14b7457b4ba --- /dev/null +++ b/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/update_connectivity_test.php @@ -0,0 +1,92 @@ +UNKNOWN. + * + * If the endpoint specifications in `ConnectivityTest` are incomplete, the + * reachability result returns a value of `AMBIGUOUS`. See the documentation + * in `ConnectivityTest` for more details. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function update_connectivity_test_sample(): void +{ + // Create a client. + $reachabilityServiceClient = new ReachabilityServiceClient(); + + // Prepare the request message. + $updateMask = new FieldMask(); + $resourceSource = new Endpoint(); + $resourceDestination = new Endpoint(); + $resource = (new ConnectivityTest()) + ->setSource($resourceSource) + ->setDestination($resourceDestination); + $request = (new UpdateConnectivityTestRequest()) + ->setUpdateMask($updateMask) + ->setResource($resource); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $reachabilityServiceClient->updateConnectivityTest($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var ConnectivityTest $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END networkmanagement_v1_generated_ReachabilityService_UpdateConnectivityTest_sync] diff --git a/owl-bot-staging/NetworkManagement/v1/src/V1/Client/ReachabilityServiceClient.php b/owl-bot-staging/NetworkManagement/v1/src/V1/Client/ReachabilityServiceClient.php new file mode 100644 index 000000000000..5e746d2b25f9 --- /dev/null +++ b/owl-bot-staging/NetworkManagement/v1/src/V1/Client/ReachabilityServiceClient.php @@ -0,0 +1,656 @@ + createConnectivityTestAsync(CreateConnectivityTestRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteConnectivityTestAsync(DeleteConnectivityTestRequest $request, array $optionalArgs = []) + * @method PromiseInterface getConnectivityTestAsync(GetConnectivityTestRequest $request, array $optionalArgs = []) + * @method PromiseInterface listConnectivityTestsAsync(ListConnectivityTestsRequest $request, array $optionalArgs = []) + * @method PromiseInterface rerunConnectivityTestAsync(RerunConnectivityTestRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateConnectivityTestAsync(UpdateConnectivityTestRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) + */ +final class ReachabilityServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.networkmanagement.v1.ReachabilityService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'networkmanagement.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'networkmanagement.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/reachability_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/reachability_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/reachability_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/reachability_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Create the default operation client for the service. + * + * @param array $options ClientOptions for the client. + * + * @return OperationsClient + */ + private function createOperationsClient(array $options) + { + // Unset client-specific configuration options + unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); + + if (isset($options['operationsClient'])) { + return $options['operationsClient']; + } + + return new OperationsClient($options); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * connectivity_test resource. + * + * @param string $project + * @param string $test + * + * @return string The formatted connectivity_test resource. + */ + public static function connectivityTestName(string $project, string $test): string + { + return self::getPathTemplate('connectivityTest')->render([ + 'project' => $project, + 'test' => $test, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a project + * resource. + * + * @param string $project + * + * @return string The formatted project resource. + */ + public static function projectName(string $project): string + { + return self::getPathTemplate('project')->render([ + 'project' => $project, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - connectivityTest: projects/{project}/locations/global/connectivityTests/{test} + * - project: projects/{project} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'networkmanagement.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Creates a new Connectivity Test. + * After you create a test, the reachability analysis is performed as part + * of the long running operation, which completes when the analysis completes. + * + * If the endpoint specifications in `ConnectivityTest` are invalid + * (for example, containing non-existent resources in the network, or you + * don't have read permissions to the network configurations of listed + * projects), then the reachability result returns a value of `UNKNOWN`. + * + * If the endpoint specifications in `ConnectivityTest` are + * incomplete, the reachability result returns a value of + * AMBIGUOUS. For more information, + * see the Connectivity Test documentation. + * + * The async variant is + * {@see ReachabilityServiceClient::createConnectivityTestAsync()} . + * + * @example samples/V1/ReachabilityServiceClient/create_connectivity_test.php + * + * @param CreateConnectivityTestRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createConnectivityTest(CreateConnectivityTestRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateConnectivityTest', $request, $callOptions)->wait(); + } + + /** + * Deletes a specific `ConnectivityTest`. + * + * The async variant is + * {@see ReachabilityServiceClient::deleteConnectivityTestAsync()} . + * + * @example samples/V1/ReachabilityServiceClient/delete_connectivity_test.php + * + * @param DeleteConnectivityTestRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteConnectivityTest(DeleteConnectivityTestRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteConnectivityTest', $request, $callOptions)->wait(); + } + + /** + * Gets the details of a specific Connectivity Test. + * + * The async variant is + * {@see ReachabilityServiceClient::getConnectivityTestAsync()} . + * + * @example samples/V1/ReachabilityServiceClient/get_connectivity_test.php + * + * @param GetConnectivityTestRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ConnectivityTest + * + * @throws ApiException Thrown if the API call fails. + */ + public function getConnectivityTest(GetConnectivityTestRequest $request, array $callOptions = []): ConnectivityTest + { + return $this->startApiCall('GetConnectivityTest', $request, $callOptions)->wait(); + } + + /** + * Lists all Connectivity Tests owned by a project. + * + * The async variant is + * {@see ReachabilityServiceClient::listConnectivityTestsAsync()} . + * + * @example samples/V1/ReachabilityServiceClient/list_connectivity_tests.php + * + * @param ListConnectivityTestsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listConnectivityTests(ListConnectivityTestsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListConnectivityTests', $request, $callOptions); + } + + /** + * Rerun an existing `ConnectivityTest`. + * After the user triggers the rerun, the reachability analysis is performed + * as part of the long running operation, which completes when the analysis + * completes. + * + * Even though the test configuration remains the same, the reachability + * result may change due to underlying network configuration changes. + * + * If the endpoint specifications in `ConnectivityTest` become invalid (for + * example, specified resources are deleted in the network, or you lost + * read permissions to the network configurations of listed projects), then + * the reachability result returns a value of `UNKNOWN`. + * + * The async variant is + * {@see ReachabilityServiceClient::rerunConnectivityTestAsync()} . + * + * @example samples/V1/ReachabilityServiceClient/rerun_connectivity_test.php + * + * @param RerunConnectivityTestRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function rerunConnectivityTest(RerunConnectivityTestRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('RerunConnectivityTest', $request, $callOptions)->wait(); + } + + /** + * Updates the configuration of an existing `ConnectivityTest`. + * After you update a test, the reachability analysis is performed as part + * of the long running operation, which completes when the analysis completes. + * The Reachability state in the test resource is updated with the new result. + * + * If the endpoint specifications in `ConnectivityTest` are invalid + * (for example, they contain non-existent resources in the network, or the + * user does not have read permissions to the network configurations of + * listed projects), then the reachability result returns a value of + * UNKNOWN. + * + * If the endpoint specifications in `ConnectivityTest` are incomplete, the + * reachability result returns a value of `AMBIGUOUS`. See the documentation + * in `ConnectivityTest` for more details. + * + * The async variant is + * {@see ReachabilityServiceClient::updateConnectivityTestAsync()} . + * + * @example samples/V1/ReachabilityServiceClient/update_connectivity_test.php + * + * @param UpdateConnectivityTestRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateConnectivityTest(UpdateConnectivityTestRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateConnectivityTest', $request, $callOptions)->wait(); + } + + /** + * Gets information about a location. + * + * The async variant is {@see ReachabilityServiceClient::getLocationAsync()} . + * + * @example samples/V1/ReachabilityServiceClient/get_location.php + * + * @param GetLocationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Location + * + * @throws ApiException Thrown if the API call fails. + */ + public function getLocation(GetLocationRequest $request, array $callOptions = []): Location + { + return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * The async variant is {@see ReachabilityServiceClient::listLocationsAsync()} . + * + * @example samples/V1/ReachabilityServiceClient/list_locations.php + * + * @param ListLocationsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListLocations', $request, $callOptions); + } + + /** + * Gets the access control policy for a resource. Returns an empty policy + if the resource exists and does not have a policy set. + * + * The async variant is {@see ReachabilityServiceClient::getIamPolicyAsync()} . + * + * @example samples/V1/ReachabilityServiceClient/get_iam_policy.php + * + * @param GetIamPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * Sets the access control policy on the specified resource. Replaces + any existing policy. + + Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` + errors. + * + * The async variant is {@see ReachabilityServiceClient::setIamPolicyAsync()} . + * + * @example samples/V1/ReachabilityServiceClient/set_iam_policy.php + * + * @param SetIamPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * Returns permissions that a caller has on the specified resource. If the + resource does not exist, this will return an empty set of + permissions, not a `NOT_FOUND` error. + + Note: This operation is designed to be used for building + permission-aware UIs and command-line tools, not for authorization + checking. This operation may "fail open" without warning. + * + * The async variant is {@see ReachabilityServiceClient::testIamPermissionsAsync()} + * . + * + * @example samples/V1/ReachabilityServiceClient/test_iam_permissions.php + * + * @param TestIamPermissionsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return TestIamPermissionsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse + { + return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/NetworkManagement/v1/src/V1/gapic_metadata.json b/owl-bot-staging/NetworkManagement/v1/src/V1/gapic_metadata.json new file mode 100644 index 000000000000..9ff198a5359c --- /dev/null +++ b/owl-bot-staging/NetworkManagement/v1/src/V1/gapic_metadata.json @@ -0,0 +1,73 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.cloud.networkmanagement.v1", + "libraryPackage": "Google\\Cloud\\NetworkManagement\\V1", + "services": { + "ReachabilityService": { + "clients": { + "grpc": { + "libraryClient": "ReachabilityServiceGapicClient", + "rpcs": { + "CreateConnectivityTest": { + "methods": [ + "createConnectivityTest" + ] + }, + "DeleteConnectivityTest": { + "methods": [ + "deleteConnectivityTest" + ] + }, + "GetConnectivityTest": { + "methods": [ + "getConnectivityTest" + ] + }, + "ListConnectivityTests": { + "methods": [ + "listConnectivityTests" + ] + }, + "RerunConnectivityTest": { + "methods": [ + "rerunConnectivityTest" + ] + }, + "UpdateConnectivityTest": { + "methods": [ + "updateConnectivityTest" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/NetworkManagement/v1/src/V1/resources/reachability_service_client_config.json b/owl-bot-staging/NetworkManagement/v1/src/V1/resources/reachability_service_client_config.json new file mode 100644 index 000000000000..a3be86836334 --- /dev/null +++ b/owl-bot-staging/NetworkManagement/v1/src/V1/resources/reachability_service_client_config.json @@ -0,0 +1,87 @@ +{ + "interfaces": { + "google.cloud.networkmanagement.v1.ReachabilityService": { + "retry_codes": { + "no_retry_codes": [], + "no_retry_1_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "CreateConnectivityTest": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteConnectivityTest": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetConnectivityTest": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListConnectivityTests": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "RerunConnectivityTest": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateConnectivityTest": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetLocation": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListLocations": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "SetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "TestIamPermissions": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/NetworkManagement/v1/src/V1/resources/reachability_service_descriptor_config.php b/owl-bot-staging/NetworkManagement/v1/src/V1/resources/reachability_service_descriptor_config.php new file mode 100644 index 000000000000..5e5df79c8de4 --- /dev/null +++ b/owl-bot-staging/NetworkManagement/v1/src/V1/resources/reachability_service_descriptor_config.php @@ -0,0 +1,214 @@ + [ + 'google.cloud.networkmanagement.v1.ReachabilityService' => [ + 'CreateConnectivityTest' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkManagement\V1\ConnectivityTest', + 'metadataReturnType' => '\Google\Cloud\NetworkManagement\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteConnectivityTest' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\NetworkManagement\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'RerunConnectivityTest' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkManagement\V1\ConnectivityTest', + 'metadataReturnType' => '\Google\Cloud\NetworkManagement\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UpdateConnectivityTest' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkManagement\V1\ConnectivityTest', + 'metadataReturnType' => '\Google\Cloud\NetworkManagement\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'resource.name', + 'fieldAccessors' => [ + 'getResource', + 'getName', + ], + ], + ], + ], + 'GetConnectivityTest' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\NetworkManagement\V1\ConnectivityTest', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListConnectivityTests' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getResources', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\NetworkManagement\V1\ListConnectivityTestsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'GetLocation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Location\Location', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'GetIamPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'SetIamPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'TestIamPermissions' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'templateMap' => [ + 'connectivityTest' => 'projects/{project}/locations/global/connectivityTests/{test}', + 'project' => 'projects/{project}', + ], + ], + ], +]; diff --git a/owl-bot-staging/NetworkManagement/v1/src/V1/resources/reachability_service_rest_client_config.php b/owl-bot-staging/NetworkManagement/v1/src/V1/resources/reachability_service_rest_client_config.php new file mode 100644 index 000000000000..0d396f9a9e19 --- /dev/null +++ b/owl-bot-staging/NetworkManagement/v1/src/V1/resources/reachability_service_rest_client_config.php @@ -0,0 +1,213 @@ + [ + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.cloud.networkmanagement.v1.ReachabilityService' => [ + 'CreateConnectivityTest' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/global}/connectivityTests', + 'body' => 'resource', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'test_id', + ], + ], + 'DeleteConnectivityTest' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/global/connectivityTests/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetConnectivityTest' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/global/connectivityTests/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListConnectivityTests' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/global}/connectivityTests', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'RerunConnectivityTest' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/global/connectivityTests/*}:rerun', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'UpdateConnectivityTest' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{resource.name=projects/*/locations/global/connectivityTests/*}', + 'body' => 'resource', + 'placeholders' => [ + 'resource.name' => [ + 'getters' => [ + 'getResource', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + ], + 'google.iam.v1.IAMPolicy' => [ + 'GetIamPolicy' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/global/connectivityTests/*}:getIamPolicy', + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'SetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/global/connectivityTests/*}:setIamPolicy', + 'body' => '*', + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'TestIamPermissions' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/global/connectivityTests/*}:testIamPermissions', + 'body' => '*', + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/global/operations/*}:cancel', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/global/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/global/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/global}/operations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/NetworkManagement/v1/tests/Unit/V1/Client/ReachabilityServiceClientTest.php b/owl-bot-staging/NetworkManagement/v1/tests/Unit/V1/Client/ReachabilityServiceClientTest.php new file mode 100644 index 000000000000..d7b501615df8 --- /dev/null +++ b/owl-bot-staging/NetworkManagement/v1/tests/Unit/V1/Client/ReachabilityServiceClientTest.php @@ -0,0 +1,1202 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return ReachabilityServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new ReachabilityServiceClient($options); + } + + /** @test */ + public function createConnectivityTestTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createConnectivityTestTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $protocol = 'protocol-989163880'; + $displayName = 'displayName1615086568'; + $roundTrip = true; + $bypassFirewallChecks = false; + $expectedResponse = new ConnectivityTest(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setProtocol($protocol); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setRoundTrip($roundTrip); + $expectedResponse->setBypassFirewallChecks($bypassFirewallChecks); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createConnectivityTestTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $testId = 'testId-1422455832'; + $resource = new ConnectivityTest(); + $resourceSource = new Endpoint(); + $resource->setSource($resourceSource); + $resourceDestination = new Endpoint(); + $resource->setDestination($resourceDestination); + $request = (new CreateConnectivityTestRequest()) + ->setParent($formattedParent) + ->setTestId($testId) + ->setResource($resource); + $response = $gapicClient->createConnectivityTest($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networkmanagement.v1.ReachabilityService/CreateConnectivityTest', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getTestId(); + $this->assertProtobufEquals($testId, $actualValue); + $actualValue = $actualApiRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createConnectivityTestTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createConnectivityTestExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createConnectivityTestTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $testId = 'testId-1422455832'; + $resource = new ConnectivityTest(); + $resourceSource = new Endpoint(); + $resource->setSource($resourceSource); + $resourceDestination = new Endpoint(); + $resource->setDestination($resourceDestination); + $request = (new CreateConnectivityTestRequest()) + ->setParent($formattedParent) + ->setTestId($testId) + ->setResource($resource); + $response = $gapicClient->createConnectivityTest($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createConnectivityTestTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteConnectivityTestTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteConnectivityTestTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteConnectivityTestTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->connectivityTestName('[PROJECT]', '[TEST]'); + $request = (new DeleteConnectivityTestRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteConnectivityTest($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networkmanagement.v1.ReachabilityService/DeleteConnectivityTest', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteConnectivityTestTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteConnectivityTestExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteConnectivityTestTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->connectivityTestName('[PROJECT]', '[TEST]'); + $request = (new DeleteConnectivityTestRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteConnectivityTest($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteConnectivityTestTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getConnectivityTestTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $protocol = 'protocol-989163880'; + $displayName = 'displayName1615086568'; + $roundTrip = true; + $bypassFirewallChecks = false; + $expectedResponse = new ConnectivityTest(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setProtocol($protocol); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setRoundTrip($roundTrip); + $expectedResponse->setBypassFirewallChecks($bypassFirewallChecks); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->connectivityTestName('[PROJECT]', '[TEST]'); + $request = (new GetConnectivityTestRequest()) + ->setName($formattedName); + $response = $gapicClient->getConnectivityTest($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networkmanagement.v1.ReachabilityService/GetConnectivityTest', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getConnectivityTestExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->connectivityTestName('[PROJECT]', '[TEST]'); + $request = (new GetConnectivityTestRequest()) + ->setName($formattedName); + try { + $gapicClient->getConnectivityTest($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listConnectivityTestsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $resourcesElement = new ConnectivityTest(); + $resources = [ + $resourcesElement, + ]; + $expectedResponse = new ListConnectivityTestsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setResources($resources); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $request = (new ListConnectivityTestsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listConnectivityTests($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getResources()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networkmanagement.v1.ReachabilityService/ListConnectivityTests', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listConnectivityTestsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $request = (new ListConnectivityTestsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listConnectivityTests($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function rerunConnectivityTestTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/rerunConnectivityTestTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $protocol = 'protocol-989163880'; + $displayName = 'displayName1615086568'; + $roundTrip = true; + $bypassFirewallChecks = false; + $expectedResponse = new ConnectivityTest(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setProtocol($protocol); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setRoundTrip($roundTrip); + $expectedResponse->setBypassFirewallChecks($bypassFirewallChecks); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/rerunConnectivityTestTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->connectivityTestName('[PROJECT]', '[TEST]'); + $request = (new RerunConnectivityTestRequest()) + ->setName($formattedName); + $response = $gapicClient->rerunConnectivityTest($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networkmanagement.v1.ReachabilityService/RerunConnectivityTest', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/rerunConnectivityTestTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function rerunConnectivityTestExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/rerunConnectivityTestTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->connectivityTestName('[PROJECT]', '[TEST]'); + $request = (new RerunConnectivityTestRequest()) + ->setName($formattedName); + $response = $gapicClient->rerunConnectivityTest($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/rerunConnectivityTestTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateConnectivityTestTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateConnectivityTestTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $protocol = 'protocol-989163880'; + $displayName = 'displayName1615086568'; + $roundTrip = true; + $bypassFirewallChecks = false; + $expectedResponse = new ConnectivityTest(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setProtocol($protocol); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setRoundTrip($roundTrip); + $expectedResponse->setBypassFirewallChecks($bypassFirewallChecks); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateConnectivityTestTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $updateMask = new FieldMask(); + $resource = new ConnectivityTest(); + $resourceSource = new Endpoint(); + $resource->setSource($resourceSource); + $resourceDestination = new Endpoint(); + $resource->setDestination($resourceDestination); + $request = (new UpdateConnectivityTestRequest()) + ->setUpdateMask($updateMask) + ->setResource($resource); + $response = $gapicClient->updateConnectivityTest($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networkmanagement.v1.ReachabilityService/UpdateConnectivityTest', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $actualValue = $actualApiRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateConnectivityTestTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateConnectivityTestExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateConnectivityTestTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $updateMask = new FieldMask(); + $resource = new ConnectivityTest(); + $resourceSource = new Endpoint(); + $resource->setSource($resourceSource); + $resourceDestination = new Endpoint(); + $resource->setDestination($resourceDestination); + $request = (new UpdateConnectivityTestRequest()) + ->setUpdateMask($updateMask) + ->setResource($resource); + $response = $gapicClient->updateConnectivityTest($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateConnectivityTestTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getLocationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $locationId = 'locationId552319461'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Location(); + $expectedResponse->setName($name2); + $expectedResponse->setLocationId($locationId); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + $request = new GetLocationRequest(); + $response = $gapicClient->getLocation($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new GetLocationRequest(); + try { + $gapicClient->getLocation($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $locationsElement = new Location(); + $locations = [ + $locationsElement, + ]; + $expectedResponse = new ListLocationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setLocations($locations); + $transport->addResponse($expectedResponse); + $request = new ListLocationsRequest(); + $response = $gapicClient->listLocations($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new ListLocationsRequest(); + try { + $gapicClient->listLocations($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $request = (new GetIamPolicyRequest()) + ->setResource($resource); + $response = $gapicClient->getIamPolicy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $request = (new GetIamPolicyRequest()) + ->setResource($resource); + try { + $gapicClient->getIamPolicy($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $request = (new SetIamPolicyRequest()) + ->setResource($resource) + ->setPolicy($policy); + $response = $gapicClient->setIamPolicy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPolicy(); + $this->assertProtobufEquals($policy, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $request = (new SetIamPolicyRequest()) + ->setResource($resource) + ->setPolicy($policy); + try { + $gapicClient->setIamPolicy($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new TestIamPermissionsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $request = (new TestIamPermissionsRequest()) + ->setResource($resource) + ->setPermissions($permissions); + $response = $gapicClient->testIamPermissions($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPermissions(); + $this->assertProtobufEquals($permissions, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $request = (new TestIamPermissionsRequest()) + ->setResource($resource) + ->setPermissions($permissions); + try { + $gapicClient->testIamPermissions($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createConnectivityTestAsyncTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createConnectivityTestTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $protocol = 'protocol-989163880'; + $displayName = 'displayName1615086568'; + $roundTrip = true; + $bypassFirewallChecks = false; + $expectedResponse = new ConnectivityTest(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setProtocol($protocol); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setRoundTrip($roundTrip); + $expectedResponse->setBypassFirewallChecks($bypassFirewallChecks); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createConnectivityTestTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $testId = 'testId-1422455832'; + $resource = new ConnectivityTest(); + $resourceSource = new Endpoint(); + $resource->setSource($resourceSource); + $resourceDestination = new Endpoint(); + $resource->setDestination($resourceDestination); + $request = (new CreateConnectivityTestRequest()) + ->setParent($formattedParent) + ->setTestId($testId) + ->setResource($resource); + $response = $gapicClient->createConnectivityTestAsync($request)->wait(); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networkmanagement.v1.ReachabilityService/CreateConnectivityTest', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getTestId(); + $this->assertProtobufEquals($testId, $actualValue); + $actualValue = $actualApiRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createConnectivityTestTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } +} diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/AuthorizationPolicy.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/AuthorizationPolicy.php new file mode 100644 index 0000000000000000000000000000000000000000..e0bcb9d6fdf16f34c447f704182e9e3826697a04 GIT binary patch literal 3391 zcmb_fTW{k;6kexkN>5m}YpUH43GHlJX$ zWwTY^ctQvX_!qqG-{4p9yb?bEo;WjOyJ?!1Dr}yd@tp76zH{+sU-)ewCde9fX<%{M zBFzrrZA$#Wz<8&8I#aeH-u43a%Hqs(8@}f-yJJW-0IqdHL*KF~S*tE?QEs&? zZq?T$Vtq*<*0(Ps)(>Xp0c^(#LsIERu1a7y1A;$4YN8qva#U)QNftJk%Q&+f_6l8H zAcvL{QpCA>_b_s8VJHy-JFZQqrisE7cPD)hL$g2<6RRRx7^(V(%W2?RPJNk%cEEh@ z1y#Iinn#qUF%~CN)3I6s#}3Jqve7iJ7`Z@r5YcY!ganjFfjckl769kzQ@u|BD?Y2Q zGU~JzY1=wwUSOIRUR{7(C%Q}H6yI7Z4TsdaWrfGL*Od{;EC_*Lh1D=yx)iA`hCcX(kW;}n;Kml`m>VJ3y^Qc+(Y^nGRYfF zpM$&|P%QF>fG-T;oBV9ih&@Ym8)@7H-jI-rd@RRUDtkMreaJahlR9Bxm<*wsFB3J_ z1<>f@p0Oz*R$Lx*gfW_4g`6eJvXDbN-kY5t2(}_2RJgWaIEWk?7Dl9<&jteAMFeSJ z@s})Q#XtQ3MpV^=n4G~QAh3)**;4r;zU=vYv;bW7<(AtKWs;Q_G2{s#7!b zsaE;~a*CiBX1%gh+t}G|>~HT?SC%$bH&&L%?&za1T-n^*c`>Hx??85WW&5kKjQO+n zrt+f(v%S4Zl{dDf(7+j9?o(!Z4Qu~fYV)vs7C)VrF}I3g<+J4R{PGBwgO*VgvbyJQ zJlW4nKWIQUS;((yM4?^!U4+Ebk!-#dP?yIoY#LkGKa~l1oG1!Ht%F)!^|BW`w@yhE%V?gFarMp>g%j4MI39pnEQT$s1ip zN$!*we7HvYM5dF(W&KiPH)T}j21#z|FHFOdZ2MOek*a&%lZIHKJ_ws8;bEUpb{edu zNUlo$1&sH*6;Gvs!YzSIuhHLqIk0Z<_hP7tDJ;3yZxp8Mi|h>gbvBEf=4bzh%?^-d z>QGK^F!`-9V)1VcCa@L!7o!&oeXOa9MYpPby`|=OvK3)tIr6S7{aCZO_xCg;zd3*9 z@HM#2>a@RMu)vmu6e?1rnGk+vE>hb45@;#8;spAL1n@mZ;n5M)r%^o1rJeXinternalAddGeneratedFile( + ' +¯ +7google/cloud/networksecurity/v1/client_tls_policy.protogoogle.cloud.networksecurity.v1google/api/resource.proto)google/cloud/networksecurity/v1/tls.proto google/protobuf/field_mask.protogoogle/protobuf/timestamp.proto"ì +ClientTlsPolicy +name ( BàA + description ( BàA4 + create_time ( 2.google.protobuf.TimestampBàA4 + update_time ( 2.google.protobuf.TimestampBàAQ +labels ( 2<.google.cloud.networksecurity.v1.ClientTlsPolicy.LabelsEntryBàA +sni ( BàAU +client_certificate ( 24.google.cloud.networksecurity.v1.CertificateProviderBàAP +server_validation_ca ( 2-.google.cloud.networksecurity.v1.ValidationCABàA- + LabelsEntry +key (  +value ( :8:‚êA +.networksecurity.googleapis.com/ClientTlsPolicyMprojects/{project}/locations/{location}/clientTlsPolicies/{client_tls_policy}"€ +ListClientTlsPoliciesRequest9 +parent ( B)àAúA# +!locations.googleapis.com/Location + page_size ( + +page_token ( "‡ +ListClientTlsPoliciesResponseM +client_tls_policies ( 20.google.cloud.networksecurity.v1.ClientTlsPolicy +next_page_token ( "a +GetClientTlsPolicyRequestD +name ( B6àAúA0 +.networksecurity.googleapis.com/ClientTlsPolicy"Û +CreateClientTlsPolicyRequestF +parent ( B6àAúA0.networksecurity.googleapis.com/ClientTlsPolicy! +client_tls_policy_id ( BàAP +client_tls_policy ( 20.google.cloud.networksecurity.v1.ClientTlsPolicyBàA"¦ +UpdateClientTlsPolicyRequest4 + update_mask ( 2.google.protobuf.FieldMaskBàAP +client_tls_policy ( 20.google.cloud.networksecurity.v1.ClientTlsPolicyBàA"d +DeleteClientTlsPolicyRequestD +name ( B6àAúA0 +.networksecurity.googleapis.com/ClientTlsPolicyBõ +#com.google.cloud.networksecurity.v1BClientTlsPolicyProtoPZMcloud.google.com/go/networksecurity/apiv1/networksecuritypb;networksecuritypbªGoogle.Cloud.NetworkSecurity.V1ÊGoogle\\Cloud\\NetworkSecurity\\V1ê"Google::Cloud::NetworkSecurity::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/Common.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/Common.php new file mode 100644 index 000000000000..e25fa07630ca --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/Common.php @@ -0,0 +1,37 @@ +internalAddGeneratedFile( + ' +ê +,google/cloud/networksecurity/v1/common.protogoogle.cloud.networksecurity.v1google/protobuf/timestamp.proto"€ +OperationMetadata4 + create_time ( 2.google.protobuf.TimestampBàA1 +end_time ( 2.google.protobuf.TimestampBàA +target ( BàA +verb ( BàA +status_message ( BàA# +requested_cancellation (BàA + api_version ( BàABì +#com.google.cloud.networksecurity.v1B CommonProtoPZMcloud.google.com/go/networksecurity/apiv1/networksecuritypb;networksecuritypbªGoogle.Cloud.NetworkSecurity.V1ÊGoogle\\Cloud\\NetworkSecurity\\V1ê"Google::Cloud::NetworkSecurity::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/NetworkSecurity.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/NetworkSecurity.php new file mode 100644 index 000000000000..f1cb186679a8 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/NetworkSecurity.php @@ -0,0 +1,58 @@ +internalAddGeneratedFile( + ' +¯% +6google/cloud/networksecurity/v1/network_security.protogoogle.cloud.networksecurity.v1google/api/client.proto:google/cloud/networksecurity/v1/authorization_policy.proto7google/cloud/networksecurity/v1/client_tls_policy.proto7google/cloud/networksecurity/v1/server_tls_policy.proto#google/longrunning/operations.proto2ý +NetworkSecurityî +ListAuthorizationPoliciesA.google.cloud.networksecurity.v1.ListAuthorizationPoliciesRequestB.google.cloud.networksecurity.v1.ListAuthorizationPoliciesResponse"JÚAparent‚Óä“;9/v1/{parent=projects/*/locations/*}/authorizationPoliciesØ +GetAuthorizationPolicy>.google.cloud.networksecurity.v1.GetAuthorizationPolicyRequest4.google.cloud.networksecurity.v1.AuthorizationPolicy"HÚAname‚Óä“;9/v1/{name=projects/*/locations/*/authorizationPolicies/*}Ø +CreateAuthorizationPolicyA.google.cloud.networksecurity.v1.CreateAuthorizationPolicyRequest.google.longrunning.Operation"ØÊAH +AuthorizationPolicy1google.cloud.networksecurity.v1.OperationMetadataÚA3parent,authorization_policy,authorization_policy_id‚Óä“Q"9/v1/{parent=projects/*/locations/*}/authorizationPolicies:authorization_policyÚ +UpdateAuthorizationPolicyA.google.cloud.networksecurity.v1.UpdateAuthorizationPolicyRequest.google.longrunning.Operation"ÚÊAH +AuthorizationPolicy1google.cloud.networksecurity.v1.OperationMetadataÚA authorization_policy,update_mask‚Óä“f2N/v1/{authorization_policy.name=projects/*/locations/*/authorizationPolicies/*}:authorization_policy• +DeleteAuthorizationPolicyA.google.cloud.networksecurity.v1.DeleteAuthorizationPolicyRequest.google.longrunning.Operation"•ÊAJ +google.protobuf.Empty1google.cloud.networksecurity.v1.OperationMetadataÚAname‚Óä“;*9/v1/{name=projects/*/locations/*/authorizationPolicies/*}Þ +ListServerTlsPolicies=.google.cloud.networksecurity.v1.ListServerTlsPoliciesRequest>.google.cloud.networksecurity.v1.ListServerTlsPoliciesResponse"FÚAparent‚Óä“75/v1/{parent=projects/*/locations/*}/serverTlsPoliciesÈ +GetServerTlsPolicy:.google.cloud.networksecurity.v1.GetServerTlsPolicyRequest0.google.cloud.networksecurity.v1.ServerTlsPolicy"DÚAname‚Óä“75/v1/{name=projects/*/locations/*/serverTlsPolicies/*}¿ +CreateServerTlsPolicy=.google.cloud.networksecurity.v1.CreateServerTlsPolicyRequest.google.longrunning.Operation"ÇÊAD +ServerTlsPolicy1google.cloud.networksecurity.v1.OperationMetadataÚA-parent,server_tls_policy,server_tls_policy_id‚Óä“J"5/v1/{parent=projects/*/locations/*}/serverTlsPolicies:server_tls_policyÁ +UpdateServerTlsPolicy=.google.cloud.networksecurity.v1.UpdateServerTlsPolicyRequest.google.longrunning.Operation"ÉÊAD +ServerTlsPolicy1google.cloud.networksecurity.v1.OperationMetadataÚAserver_tls_policy,update_mask‚Óä“\\2G/v1/{server_tls_policy.name=projects/*/locations/*/serverTlsPolicies/*}:server_tls_policy‰ +DeleteServerTlsPolicy=.google.cloud.networksecurity.v1.DeleteServerTlsPolicyRequest.google.longrunning.Operation"‘ÊAJ +google.protobuf.Empty1google.cloud.networksecurity.v1.OperationMetadataÚAname‚Óä“7*5/v1/{name=projects/*/locations/*/serverTlsPolicies/*}Þ +ListClientTlsPolicies=.google.cloud.networksecurity.v1.ListClientTlsPoliciesRequest>.google.cloud.networksecurity.v1.ListClientTlsPoliciesResponse"FÚAparent‚Óä“75/v1/{parent=projects/*/locations/*}/clientTlsPoliciesÈ +GetClientTlsPolicy:.google.cloud.networksecurity.v1.GetClientTlsPolicyRequest0.google.cloud.networksecurity.v1.ClientTlsPolicy"DÚAname‚Óä“75/v1/{name=projects/*/locations/*/clientTlsPolicies/*}¿ +CreateClientTlsPolicy=.google.cloud.networksecurity.v1.CreateClientTlsPolicyRequest.google.longrunning.Operation"ÇÊAD +ClientTlsPolicy1google.cloud.networksecurity.v1.OperationMetadataÚA-parent,client_tls_policy,client_tls_policy_id‚Óä“J"5/v1/{parent=projects/*/locations/*}/clientTlsPolicies:client_tls_policyÁ +UpdateClientTlsPolicy=.google.cloud.networksecurity.v1.UpdateClientTlsPolicyRequest.google.longrunning.Operation"ÉÊAD +ClientTlsPolicy1google.cloud.networksecurity.v1.OperationMetadataÚAclient_tls_policy,update_mask‚Óä“\\2G/v1/{client_tls_policy.name=projects/*/locations/*/clientTlsPolicies/*}:client_tls_policy‰ +DeleteClientTlsPolicy=.google.cloud.networksecurity.v1.DeleteClientTlsPolicyRequest.google.longrunning.Operation"‘ÊAJ +google.protobuf.Empty1google.cloud.networksecurity.v1.OperationMetadataÚAname‚Óä“7*5/v1/{name=projects/*/locations/*/clientTlsPolicies/*}RÊAnetworksecurity.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformBß +#com.google.cloud.networksecurity.v1PZMcloud.google.com/go/networksecurity/apiv1/networksecuritypb;networksecuritypbªGoogle.Cloud.NetworkSecurity.V1ÊGoogle\\Cloud\\NetworkSecurity\\V1ê"Google::Cloud::NetworkSecurity::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/ServerTlsPolicy.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/ServerTlsPolicy.php new file mode 100644 index 000000000000..60b80b36eda1 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/ServerTlsPolicy.php @@ -0,0 +1,71 @@ +internalAddGeneratedFile( + ' +ý +7google/cloud/networksecurity/v1/server_tls_policy.protogoogle.cloud.networksecurity.v1google/api/resource.proto)google/cloud/networksecurity/v1/tls.proto google/protobuf/field_mask.protogoogle/protobuf/timestamp.proto"º +ServerTlsPolicy +name ( BàA + description ( 4 + create_time ( 2.google.protobuf.TimestampBàA4 + update_time ( 2.google.protobuf.TimestampBàAL +labels ( 2<.google.cloud.networksecurity.v1.ServerTlsPolicy.LabelsEntry + +allow_open (P +server_certificate ( 24.google.cloud.networksecurity.v1.CertificateProviderP + mtls_policy ( 2;.google.cloud.networksecurity.v1.ServerTlsPolicy.MTLSPolicyY + +MTLSPolicyK +client_validation_ca ( 2-.google.cloud.networksecurity.v1.ValidationCA- + LabelsEntry +key (  +value ( :8:‚êA +.networksecurity.googleapis.com/ServerTlsPolicyMprojects/{project}/locations/{location}/serverTlsPolicies/{server_tls_policy}"€ +ListServerTlsPoliciesRequest9 +parent ( B)àAúA# +!locations.googleapis.com/Location + page_size ( + +page_token ( "‡ +ListServerTlsPoliciesResponseM +server_tls_policies ( 20.google.cloud.networksecurity.v1.ServerTlsPolicy +next_page_token ( "a +GetServerTlsPolicyRequestD +name ( B6àAúA0 +.networksecurity.googleapis.com/ServerTlsPolicy"Û +CreateServerTlsPolicyRequestF +parent ( B6àAúA0.networksecurity.googleapis.com/ServerTlsPolicy! +server_tls_policy_id ( BàAP +server_tls_policy ( 20.google.cloud.networksecurity.v1.ServerTlsPolicyBàA"¦ +UpdateServerTlsPolicyRequest4 + update_mask ( 2.google.protobuf.FieldMaskBàAP +server_tls_policy ( 20.google.cloud.networksecurity.v1.ServerTlsPolicyBàA"d +DeleteServerTlsPolicyRequestD +name ( B6àAúA0 +.networksecurity.googleapis.com/ServerTlsPolicyBõ +#com.google.cloud.networksecurity.v1BServerTlsPolicyProtoPZMcloud.google.com/go/networksecurity/apiv1/networksecuritypb;networksecuritypbªGoogle.Cloud.NetworkSecurity.V1ÊGoogle\\Cloud\\NetworkSecurity\\V1ê"Google::Cloud::NetworkSecurity::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/Tls.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/Tls.php new file mode 100644 index 0000000000000000000000000000000000000000..e40948760b1b3445bf5629949c4a60db1904f917 GIT binary patch literal 1442 zcmdT^%Wl&^6m3#e!BB)07Oe!RLt3e+L>&colNOZpk#^BG5>*z+QZyOgBqOGt(RdtG zP=APjV95sY5p3ZrxPIh8Qz%=!v1Ofm?(5vM^V$pzS*I-s!Ey%y?Ojqg1Zu2yT4+Uk zala3i3VmUu0_#z_e@0Kw&gsGa@%b|hjdW}UFgnnBpr9(0j)Q6l?!C6}A`r2a?y@?n zRh^2wl$DT>UqEEI0NQFdPr&hjJMOnq0)HX0S@XQ6<~7R@*l?1s_U`7Rxo)J}$h zgYb_-2R7u&--k$8X`Hrggfcb&HyL5_r?Qo&P3UBwRreDn7)`Rwg-;jGN^1650Ca zm6p~rsF!ZvyS9CAR4ez2@TgMzQ>*K$bhW zLevBp^nW^w z=8pndM+doWvdz1A+v%~j3vW*{Esd9~FRBAQ=PTSuw3cgnGrjuUpHIcLR_ZTa>MvgI zFK=>#@;bGzV}zeu(Aa~<7#~gOXR(~oFqZN#c8!R!POZ0u+H(5k=H#TFXGcEc34ip1 M6q#M^6}ckh7o%wCd;kCd literal 0 HcmV?d00001 diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthorizationPolicy.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthorizationPolicy.php new file mode 100644 index 000000000000..f865e6de8be7 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthorizationPolicy.php @@ -0,0 +1,314 @@ +google.cloud.networksecurity.v1.AuthorizationPolicy + */ +class AuthorizationPolicy extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the AuthorizationPolicy resource. It matches pattern + * `projects/{project}/locations/{location}/authorizationPolicies/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * Optional. Free-text description of the resource. + * + * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Output only. The timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The timestamp when the resource was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Optional. Set of label tags associated with the AuthorizationPolicy resource. + * + * Generated from protobuf field map labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Required. The action to take when a rule match is found. Possible values + * are "ALLOW" or "DENY". + * + * Generated from protobuf field .google.cloud.networksecurity.v1.AuthorizationPolicy.Action action = 6 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $action = 0; + /** + * Optional. List of rules to match. Note that at least one of the rules must match in + * order for the action specified in the 'action' field to be taken. A rule is + * a match if there is a matching source and destination. If left blank, the + * action specified in the `action` field will be applied on every request. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule rules = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $rules; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the AuthorizationPolicy resource. It matches pattern + * `projects/{project}/locations/{location}/authorizationPolicies/`. + * @type string $description + * Optional. Free-text description of the resource. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The timestamp when the resource was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The timestamp when the resource was updated. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. Set of label tags associated with the AuthorizationPolicy resource. + * @type int $action + * Required. The action to take when a rule match is found. Possible values + * are "ALLOW" or "DENY". + * @type array<\Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy\Rule>|\Google\Protobuf\Internal\RepeatedField $rules + * Optional. List of rules to match. Note that at least one of the rules must match in + * order for the action specified in the 'action' field to be taken. A rule is + * a match if there is a matching source and destination. If left blank, the + * action specified in the `action` field will be applied on every request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\AuthorizationPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the AuthorizationPolicy resource. It matches pattern + * `projects/{project}/locations/{location}/authorizationPolicies/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the AuthorizationPolicy resource. It matches pattern + * `projects/{project}/locations/{location}/authorizationPolicies/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. Free-text description of the resource. + * + * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. Free-text description of the resource. + * + * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Output only. The timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The timestamp when the resource was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The timestamp when the resource was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Optional. Set of label tags associated with the AuthorizationPolicy resource. + * + * Generated from protobuf field map labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. Set of label tags associated with the AuthorizationPolicy resource. + * + * Generated from protobuf field map labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Required. The action to take when a rule match is found. Possible values + * are "ALLOW" or "DENY". + * + * Generated from protobuf field .google.cloud.networksecurity.v1.AuthorizationPolicy.Action action = 6 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getAction() + { + return $this->action; + } + + /** + * Required. The action to take when a rule match is found. Possible values + * are "ALLOW" or "DENY". + * + * Generated from protobuf field .google.cloud.networksecurity.v1.AuthorizationPolicy.Action action = 6 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setAction($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy\Action::class); + $this->action = $var; + + return $this; + } + + /** + * Optional. List of rules to match. Note that at least one of the rules must match in + * order for the action specified in the 'action' field to be taken. A rule is + * a match if there is a matching source and destination. If left blank, the + * action specified in the `action` field will be applied on every request. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule rules = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRules() + { + return $this->rules; + } + + /** + * Optional. List of rules to match. Note that at least one of the rules must match in + * order for the action specified in the 'action' field to be taken. A rule is + * a match if there is a matching source and destination. If left blank, the + * action specified in the `action` field will be applied on every request. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule rules = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy\Rule>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRules($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy\Rule::class); + $this->rules = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthorizationPolicy/Action.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthorizationPolicy/Action.php new file mode 100644 index 000000000000..0f5f8a546eb7 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthorizationPolicy/Action.php @@ -0,0 +1,66 @@ +google.cloud.networksecurity.v1.AuthorizationPolicy.Action + */ +class Action +{ + /** + * Default value. + * + * Generated from protobuf enum ACTION_UNSPECIFIED = 0; + */ + const ACTION_UNSPECIFIED = 0; + /** + * Grant access. + * + * Generated from protobuf enum ALLOW = 1; + */ + const ALLOW = 1; + /** + * Deny access. + * Deny rules should be avoided unless they are used to provide a default + * "deny all" fallback. + * + * Generated from protobuf enum DENY = 2; + */ + const DENY = 2; + + private static $valueToName = [ + self::ACTION_UNSPECIFIED => 'ACTION_UNSPECIFIED', + self::ALLOW => 'ALLOW', + self::DENY => 'DENY', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Action::class, \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy_Action::class); + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthorizationPolicy/Rule.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthorizationPolicy/Rule.php new file mode 100644 index 000000000000..00f7a6dbb253 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthorizationPolicy/Rule.php @@ -0,0 +1,132 @@ +google.cloud.networksecurity.v1.AuthorizationPolicy.Rule + */ +class Rule extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. List of attributes for the traffic source. All of the sources must match. + * A source is a match if both principals and ip_blocks match. If not set, + * the action specified in the 'action' field will be applied without any + * rule checks for the source. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Source sources = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $sources; + /** + * Optional. List of attributes for the traffic destination. All of the destinations + * must match. A destination is a match if a request matches all the + * specified hosts, ports, methods and headers. If not set, the + * action specified in the 'action' field will be applied without any rule + * checks for the destination. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Destination destinations = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $destinations; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy\Rule\Source>|\Google\Protobuf\Internal\RepeatedField $sources + * Optional. List of attributes for the traffic source. All of the sources must match. + * A source is a match if both principals and ip_blocks match. If not set, + * the action specified in the 'action' field will be applied without any + * rule checks for the source. + * @type array<\Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy\Rule\Destination>|\Google\Protobuf\Internal\RepeatedField $destinations + * Optional. List of attributes for the traffic destination. All of the destinations + * must match. A destination is a match if a request matches all the + * specified hosts, ports, methods and headers. If not set, the + * action specified in the 'action' field will be applied without any rule + * checks for the destination. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\AuthorizationPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Optional. List of attributes for the traffic source. All of the sources must match. + * A source is a match if both principals and ip_blocks match. If not set, + * the action specified in the 'action' field will be applied without any + * rule checks for the source. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Source sources = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSources() + { + return $this->sources; + } + + /** + * Optional. List of attributes for the traffic source. All of the sources must match. + * A source is a match if both principals and ip_blocks match. If not set, + * the action specified in the 'action' field will be applied without any + * rule checks for the source. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Source sources = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy\Rule\Source>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSources($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy\Rule\Source::class); + $this->sources = $arr; + + return $this; + } + + /** + * Optional. List of attributes for the traffic destination. All of the destinations + * must match. A destination is a match if a request matches all the + * specified hosts, ports, methods and headers. If not set, the + * action specified in the 'action' field will be applied without any rule + * checks for the destination. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Destination destinations = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDestinations() + { + return $this->destinations; + } + + /** + * Optional. List of attributes for the traffic destination. All of the destinations + * must match. A destination is a match if a request matches all the + * specified hosts, ports, methods and headers. If not set, the + * action specified in the 'action' field will be applied without any rule + * checks for the destination. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Destination destinations = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy\Rule\Destination>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDestinations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy\Rule\Destination::class); + $this->destinations = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Rule::class, \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy_Rule::class); + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthorizationPolicy/Rule/Destination.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthorizationPolicy/Rule/Destination.php new file mode 100644 index 000000000000..525242cc7ff9 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthorizationPolicy/Rule/Destination.php @@ -0,0 +1,214 @@ +google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Destination + */ +class Destination extends \Google\Protobuf\Internal\Message +{ + /** + * Required. List of host names to match. Matched against the ":authority" header in + * http requests. At least one host should match. Each host can be an + * exact match, or a prefix match (example "mydomain.*") or a suffix + * match (example "*.myorg.com") or a presence (any) match "*". + * + * Generated from protobuf field repeated string hosts = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private $hosts; + /** + * Required. List of destination ports to match. At least one port should match. + * + * Generated from protobuf field repeated uint32 ports = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $ports; + /** + * Optional. A list of HTTP methods to match. At least one method should + * match. Should not be set for gRPC services. + * + * Generated from protobuf field repeated string methods = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $methods; + /** + * Optional. Match against key:value pair in http header. Provides a flexible match + * based on HTTP headers, for potentially advanced use cases. At least one + * header should match. Avoid using header matches to make authorization + * decisions unless there is a strong guarantee that requests arrive + * through a trusted client or proxy. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatch http_header_match = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $http_header_match = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $hosts + * Required. List of host names to match. Matched against the ":authority" header in + * http requests. At least one host should match. Each host can be an + * exact match, or a prefix match (example "mydomain.*") or a suffix + * match (example "*.myorg.com") or a presence (any) match "*". + * @type array|\Google\Protobuf\Internal\RepeatedField $ports + * Required. List of destination ports to match. At least one port should match. + * @type array|\Google\Protobuf\Internal\RepeatedField $methods + * Optional. A list of HTTP methods to match. At least one method should + * match. Should not be set for gRPC services. + * @type \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy\Rule\Destination\HttpHeaderMatch $http_header_match + * Optional. Match against key:value pair in http header. Provides a flexible match + * based on HTTP headers, for potentially advanced use cases. At least one + * header should match. Avoid using header matches to make authorization + * decisions unless there is a strong guarantee that requests arrive + * through a trusted client or proxy. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\AuthorizationPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. List of host names to match. Matched against the ":authority" header in + * http requests. At least one host should match. Each host can be an + * exact match, or a prefix match (example "mydomain.*") or a suffix + * match (example "*.myorg.com") or a presence (any) match "*". + * + * Generated from protobuf field repeated string hosts = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getHosts() + { + return $this->hosts; + } + + /** + * Required. List of host names to match. Matched against the ":authority" header in + * http requests. At least one host should match. Each host can be an + * exact match, or a prefix match (example "mydomain.*") or a suffix + * match (example "*.myorg.com") or a presence (any) match "*". + * + * Generated from protobuf field repeated string hosts = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setHosts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->hosts = $arr; + + return $this; + } + + /** + * Required. List of destination ports to match. At least one port should match. + * + * Generated from protobuf field repeated uint32 ports = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPorts() + { + return $this->ports; + } + + /** + * Required. List of destination ports to match. At least one port should match. + * + * Generated from protobuf field repeated uint32 ports = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPorts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::UINT32); + $this->ports = $arr; + + return $this; + } + + /** + * Optional. A list of HTTP methods to match. At least one method should + * match. Should not be set for gRPC services. + * + * Generated from protobuf field repeated string methods = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMethods() + { + return $this->methods; + } + + /** + * Optional. A list of HTTP methods to match. At least one method should + * match. Should not be set for gRPC services. + * + * Generated from protobuf field repeated string methods = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMethods($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->methods = $arr; + + return $this; + } + + /** + * Optional. Match against key:value pair in http header. Provides a flexible match + * based on HTTP headers, for potentially advanced use cases. At least one + * header should match. Avoid using header matches to make authorization + * decisions unless there is a strong guarantee that requests arrive + * through a trusted client or proxy. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatch http_header_match = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy\Rule\Destination\HttpHeaderMatch|null + */ + public function getHttpHeaderMatch() + { + return $this->http_header_match; + } + + public function hasHttpHeaderMatch() + { + return isset($this->http_header_match); + } + + public function clearHttpHeaderMatch() + { + unset($this->http_header_match); + } + + /** + * Optional. Match against key:value pair in http header. Provides a flexible match + * based on HTTP headers, for potentially advanced use cases. At least one + * header should match. Avoid using header matches to make authorization + * decisions unless there is a strong guarantee that requests arrive + * through a trusted client or proxy. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatch http_header_match = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy\Rule\Destination\HttpHeaderMatch $var + * @return $this + */ + public function setHttpHeaderMatch($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy\Rule\Destination\HttpHeaderMatch::class); + $this->http_header_match = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Destination::class, \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy_Rule_Destination::class); + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthorizationPolicy/Rule/Destination/HttpHeaderMatch.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthorizationPolicy/Rule/Destination/HttpHeaderMatch.php new file mode 100644 index 000000000000..a5b39bc370f2 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthorizationPolicy/Rule/Destination/HttpHeaderMatch.php @@ -0,0 +1,142 @@ +google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatch + */ +class HttpHeaderMatch extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the HTTP header to match. For matching + * against the HTTP request's authority, use a headerMatch + * with the header name ":authority". For matching a + * request's method, use the headerName ":method". + * + * Generated from protobuf field string header_name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $header_name = ''; + protected $type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $regex_match + * Required. The value of the header must match the regular expression + * specified in regexMatch. For regular expression grammar, + * please see: en.cppreference.com/w/cpp/regex/ecmascript + * For matching against a port specified in the HTTP + * request, use a headerMatch with headerName set to Host + * and a regular expression that satisfies the RFC2616 Host + * header's port specifier. + * @type string $header_name + * Required. The name of the HTTP header to match. For matching + * against the HTTP request's authority, use a headerMatch + * with the header name ":authority". For matching a + * request's method, use the headerName ":method". + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\AuthorizationPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. The value of the header must match the regular expression + * specified in regexMatch. For regular expression grammar, + * please see: en.cppreference.com/w/cpp/regex/ecmascript + * For matching against a port specified in the HTTP + * request, use a headerMatch with headerName set to Host + * and a regular expression that satisfies the RFC2616 Host + * header's port specifier. + * + * Generated from protobuf field string regex_match = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getRegexMatch() + { + return $this->readOneof(2); + } + + public function hasRegexMatch() + { + return $this->hasOneof(2); + } + + /** + * Required. The value of the header must match the regular expression + * specified in regexMatch. For regular expression grammar, + * please see: en.cppreference.com/w/cpp/regex/ecmascript + * For matching against a port specified in the HTTP + * request, use a headerMatch with headerName set to Host + * and a regular expression that satisfies the RFC2616 Host + * header's port specifier. + * + * Generated from protobuf field string regex_match = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setRegexMatch($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Required. The name of the HTTP header to match. For matching + * against the HTTP request's authority, use a headerMatch + * with the header name ":authority". For matching a + * request's method, use the headerName ":method". + * + * Generated from protobuf field string header_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getHeaderName() + { + return $this->header_name; + } + + /** + * Required. The name of the HTTP header to match. For matching + * against the HTTP request's authority, use a headerMatch + * with the header name ":authority". For matching a + * request's method, use the headerName ":method". + * + * Generated from protobuf field string header_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setHeaderName($var) + { + GPBUtil::checkString($var, True); + $this->header_name = $var; + + return $this; + } + + /** + * @return string + */ + public function getType() + { + return $this->whichOneof("type"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(HttpHeaderMatch::class, \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy_Rule_Destination_HttpHeaderMatch::class); + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthorizationPolicy/Rule/Source.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthorizationPolicy/Rule/Source.php new file mode 100644 index 000000000000..41a7658703bd --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthorizationPolicy/Rule/Source.php @@ -0,0 +1,140 @@ +google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Source + */ +class Source extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. List of peer identities to match for authorization. At least one + * principal should match. Each peer can be an exact match, or a prefix + * match (example, "namespace/*") or a suffix match (example, + * "*/service-account") or a presence match "*". Authorization based on + * the principal name without certificate validation (configured by + * ServerTlsPolicy resource) is considered insecure. + * + * Generated from protobuf field repeated string principals = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $principals; + /** + * Optional. List of CIDR ranges to match based on source IP address. At least one + * IP block should match. Single IP (e.g., "1.2.3.4") and CIDR (e.g., + * "1.2.3.0/24") are supported. Authorization based on source IP alone + * should be avoided. The IP addresses of any load balancers or proxies + * should be considered untrusted. + * + * Generated from protobuf field repeated string ip_blocks = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $ip_blocks; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $principals + * Optional. List of peer identities to match for authorization. At least one + * principal should match. Each peer can be an exact match, or a prefix + * match (example, "namespace/*") or a suffix match (example, + * "*/service-account") or a presence match "*". Authorization based on + * the principal name without certificate validation (configured by + * ServerTlsPolicy resource) is considered insecure. + * @type array|\Google\Protobuf\Internal\RepeatedField $ip_blocks + * Optional. List of CIDR ranges to match based on source IP address. At least one + * IP block should match. Single IP (e.g., "1.2.3.4") and CIDR (e.g., + * "1.2.3.0/24") are supported. Authorization based on source IP alone + * should be avoided. The IP addresses of any load balancers or proxies + * should be considered untrusted. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\AuthorizationPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Optional. List of peer identities to match for authorization. At least one + * principal should match. Each peer can be an exact match, or a prefix + * match (example, "namespace/*") or a suffix match (example, + * "*/service-account") or a presence match "*". Authorization based on + * the principal name without certificate validation (configured by + * ServerTlsPolicy resource) is considered insecure. + * + * Generated from protobuf field repeated string principals = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPrincipals() + { + return $this->principals; + } + + /** + * Optional. List of peer identities to match for authorization. At least one + * principal should match. Each peer can be an exact match, or a prefix + * match (example, "namespace/*") or a suffix match (example, + * "*/service-account") or a presence match "*". Authorization based on + * the principal name without certificate validation (configured by + * ServerTlsPolicy resource) is considered insecure. + * + * Generated from protobuf field repeated string principals = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPrincipals($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->principals = $arr; + + return $this; + } + + /** + * Optional. List of CIDR ranges to match based on source IP address. At least one + * IP block should match. Single IP (e.g., "1.2.3.4") and CIDR (e.g., + * "1.2.3.0/24") are supported. Authorization based on source IP alone + * should be avoided. The IP addresses of any load balancers or proxies + * should be considered untrusted. + * + * Generated from protobuf field repeated string ip_blocks = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getIpBlocks() + { + return $this->ip_blocks; + } + + /** + * Optional. List of CIDR ranges to match based on source IP address. At least one + * IP block should match. Single IP (e.g., "1.2.3.4") and CIDR (e.g., + * "1.2.3.0/24") are supported. Authorization based on source IP alone + * should be avoided. The IP addresses of any load balancers or proxies + * should be considered untrusted. + * + * Generated from protobuf field repeated string ip_blocks = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setIpBlocks($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->ip_blocks = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Source::class, \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy_Rule_Source::class); + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CertificateProvider.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CertificateProvider.php new file mode 100644 index 000000000000..5678fa26bd93 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CertificateProvider.php @@ -0,0 +1,118 @@ +google.cloud.networksecurity.v1.CertificateProvider + */ +class CertificateProvider extends \Google\Protobuf\Internal\Message +{ + protected $type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\NetworkSecurity\V1\GrpcEndpoint $grpc_endpoint + * gRPC specific configuration to access the gRPC server to + * obtain the cert and private key. + * @type \Google\Cloud\NetworkSecurity\V1\CertificateProviderInstance $certificate_provider_instance + * The certificate provider instance specification that will be passed to + * the data plane, which will be used to load necessary credential + * information. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\Tls::initOnce(); + parent::__construct($data); + } + + /** + * gRPC specific configuration to access the gRPC server to + * obtain the cert and private key. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.GrpcEndpoint grpc_endpoint = 2; + * @return \Google\Cloud\NetworkSecurity\V1\GrpcEndpoint|null + */ + public function getGrpcEndpoint() + { + return $this->readOneof(2); + } + + public function hasGrpcEndpoint() + { + return $this->hasOneof(2); + } + + /** + * gRPC specific configuration to access the gRPC server to + * obtain the cert and private key. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.GrpcEndpoint grpc_endpoint = 2; + * @param \Google\Cloud\NetworkSecurity\V1\GrpcEndpoint $var + * @return $this + */ + public function setGrpcEndpoint($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\GrpcEndpoint::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * The certificate provider instance specification that will be passed to + * the data plane, which will be used to load necessary credential + * information. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.CertificateProviderInstance certificate_provider_instance = 3; + * @return \Google\Cloud\NetworkSecurity\V1\CertificateProviderInstance|null + */ + public function getCertificateProviderInstance() + { + return $this->readOneof(3); + } + + public function hasCertificateProviderInstance() + { + return $this->hasOneof(3); + } + + /** + * The certificate provider instance specification that will be passed to + * the data plane, which will be used to load necessary credential + * information. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.CertificateProviderInstance certificate_provider_instance = 3; + * @param \Google\Cloud\NetworkSecurity\V1\CertificateProviderInstance $var + * @return $this + */ + public function setCertificateProviderInstance($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\CertificateProviderInstance::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * @return string + */ + public function getType() + { + return $this->whichOneof("type"); + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CertificateProviderInstance.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CertificateProviderInstance.php new file mode 100644 index 000000000000..ccd059520027 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CertificateProviderInstance.php @@ -0,0 +1,78 @@ +google.cloud.networksecurity.v1.CertificateProviderInstance + */ +class CertificateProviderInstance extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Plugin instance name, used to locate and load CertificateProvider instance + * configuration. Set to "google_cloud_private_spiffe" to use Certificate + * Authority Service certificate provider instance. + * + * Generated from protobuf field string plugin_instance = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $plugin_instance = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $plugin_instance + * Required. Plugin instance name, used to locate and load CertificateProvider instance + * configuration. Set to "google_cloud_private_spiffe" to use Certificate + * Authority Service certificate provider instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\Tls::initOnce(); + parent::__construct($data); + } + + /** + * Required. Plugin instance name, used to locate and load CertificateProvider instance + * configuration. Set to "google_cloud_private_spiffe" to use Certificate + * Authority Service certificate provider instance. + * + * Generated from protobuf field string plugin_instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPluginInstance() + { + return $this->plugin_instance; + } + + /** + * Required. Plugin instance name, used to locate and load CertificateProvider instance + * configuration. Set to "google_cloud_private_spiffe" to use Certificate + * Authority Service certificate provider instance. + * + * Generated from protobuf field string plugin_instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPluginInstance($var) + { + GPBUtil::checkString($var, True); + $this->plugin_instance = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ClientTlsPolicy.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ClientTlsPolicy.php new file mode 100644 index 000000000000..8beb057fb1a7 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ClientTlsPolicy.php @@ -0,0 +1,357 @@ +google.cloud.networksecurity.v1.ClientTlsPolicy + */ +class ClientTlsPolicy extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the ClientTlsPolicy resource. It matches the pattern + * `projects/*/locations/{location}/clientTlsPolicies/{client_tls_policy}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * Optional. Free-text description of the resource. + * + * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Output only. The timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The timestamp when the resource was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Optional. Set of label tags associated with the resource. + * + * Generated from protobuf field map labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Optional. Server Name Indication string to present to the server during TLS + * handshake. E.g: "secure.example.com". + * + * Generated from protobuf field string sni = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $sni = ''; + /** + * Optional. Defines a mechanism to provision client identity (public and private keys) + * for peer to peer authentication. The presence of this dictates mTLS. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.CertificateProvider client_certificate = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $client_certificate = null; + /** + * Optional. Defines the mechanism to obtain the Certificate Authority certificate to + * validate the server certificate. If empty, client does not validate the + * server certificate. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.ValidationCA server_validation_ca = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $server_validation_ca; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the ClientTlsPolicy resource. It matches the pattern + * `projects/*/locations/{location}/clientTlsPolicies/{client_tls_policy}` + * @type string $description + * Optional. Free-text description of the resource. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The timestamp when the resource was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The timestamp when the resource was updated. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. Set of label tags associated with the resource. + * @type string $sni + * Optional. Server Name Indication string to present to the server during TLS + * handshake. E.g: "secure.example.com". + * @type \Google\Cloud\NetworkSecurity\V1\CertificateProvider $client_certificate + * Optional. Defines a mechanism to provision client identity (public and private keys) + * for peer to peer authentication. The presence of this dictates mTLS. + * @type array<\Google\Cloud\NetworkSecurity\V1\ValidationCA>|\Google\Protobuf\Internal\RepeatedField $server_validation_ca + * Optional. Defines the mechanism to obtain the Certificate Authority certificate to + * validate the server certificate. If empty, client does not validate the + * server certificate. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\ClientTlsPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the ClientTlsPolicy resource. It matches the pattern + * `projects/*/locations/{location}/clientTlsPolicies/{client_tls_policy}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the ClientTlsPolicy resource. It matches the pattern + * `projects/*/locations/{location}/clientTlsPolicies/{client_tls_policy}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. Free-text description of the resource. + * + * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. Free-text description of the resource. + * + * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Output only. The timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The timestamp when the resource was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The timestamp when the resource was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Optional. Set of label tags associated with the resource. + * + * Generated from protobuf field map labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. Set of label tags associated with the resource. + * + * Generated from protobuf field map labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Optional. Server Name Indication string to present to the server during TLS + * handshake. E.g: "secure.example.com". + * + * Generated from protobuf field string sni = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getSni() + { + return $this->sni; + } + + /** + * Optional. Server Name Indication string to present to the server during TLS + * handshake. E.g: "secure.example.com". + * + * Generated from protobuf field string sni = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setSni($var) + { + GPBUtil::checkString($var, True); + $this->sni = $var; + + return $this; + } + + /** + * Optional. Defines a mechanism to provision client identity (public and private keys) + * for peer to peer authentication. The presence of this dictates mTLS. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.CertificateProvider client_certificate = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\NetworkSecurity\V1\CertificateProvider|null + */ + public function getClientCertificate() + { + return $this->client_certificate; + } + + public function hasClientCertificate() + { + return isset($this->client_certificate); + } + + public function clearClientCertificate() + { + unset($this->client_certificate); + } + + /** + * Optional. Defines a mechanism to provision client identity (public and private keys) + * for peer to peer authentication. The presence of this dictates mTLS. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.CertificateProvider client_certificate = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\NetworkSecurity\V1\CertificateProvider $var + * @return $this + */ + public function setClientCertificate($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\CertificateProvider::class); + $this->client_certificate = $var; + + return $this; + } + + /** + * Optional. Defines the mechanism to obtain the Certificate Authority certificate to + * validate the server certificate. If empty, client does not validate the + * server certificate. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.ValidationCA server_validation_ca = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getServerValidationCa() + { + return $this->server_validation_ca; + } + + /** + * Optional. Defines the mechanism to obtain the Certificate Authority certificate to + * validate the server certificate. If empty, client does not validate the + * server certificate. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.ValidationCA server_validation_ca = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\NetworkSecurity\V1\ValidationCA>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setServerValidationCa($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkSecurity\V1\ValidationCA::class); + $this->server_validation_ca = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateAuthorizationPolicyRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateAuthorizationPolicyRequest.php new file mode 100644 index 000000000000..66a7be6c12fb --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateAuthorizationPolicyRequest.php @@ -0,0 +1,183 @@ +google.cloud.networksecurity.v1.CreateAuthorizationPolicyRequest + */ +class CreateAuthorizationPolicyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource of the AuthorizationPolicy. Must be in the + * format `projects/{project}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Short name of the AuthorizationPolicy resource to be created. + * This value should be 1-63 characters long, containing only + * letters, numbers, hyphens, and underscores, and should not start + * with a number. E.g. "authz_policy". + * + * Generated from protobuf field string authorization_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $authorization_policy_id = ''; + /** + * Required. AuthorizationPolicy resource to be created. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.AuthorizationPolicy authorization_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $authorization_policy = null; + + /** + * @param string $parent Required. The parent resource of the AuthorizationPolicy. Must be in the + * format `projects/{project}/locations/{location}`. Please see + * {@see NetworkSecurityClient::locationName()} for help formatting this field. + * @param \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy $authorizationPolicy Required. AuthorizationPolicy resource to be created. + * @param string $authorizationPolicyId Required. Short name of the AuthorizationPolicy resource to be created. + * This value should be 1-63 characters long, containing only + * letters, numbers, hyphens, and underscores, and should not start + * with a number. E.g. "authz_policy". + * + * @return \Google\Cloud\NetworkSecurity\V1\CreateAuthorizationPolicyRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy $authorizationPolicy, string $authorizationPolicyId): self + { + return (new self()) + ->setParent($parent) + ->setAuthorizationPolicy($authorizationPolicy) + ->setAuthorizationPolicyId($authorizationPolicyId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource of the AuthorizationPolicy. Must be in the + * format `projects/{project}/locations/{location}`. + * @type string $authorization_policy_id + * Required. Short name of the AuthorizationPolicy resource to be created. + * This value should be 1-63 characters long, containing only + * letters, numbers, hyphens, and underscores, and should not start + * with a number. E.g. "authz_policy". + * @type \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy $authorization_policy + * Required. AuthorizationPolicy resource to be created. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\AuthorizationPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource of the AuthorizationPolicy. Must be in the + * format `projects/{project}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource of the AuthorizationPolicy. Must be in the + * format `projects/{project}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. Short name of the AuthorizationPolicy resource to be created. + * This value should be 1-63 characters long, containing only + * letters, numbers, hyphens, and underscores, and should not start + * with a number. E.g. "authz_policy". + * + * Generated from protobuf field string authorization_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getAuthorizationPolicyId() + { + return $this->authorization_policy_id; + } + + /** + * Required. Short name of the AuthorizationPolicy resource to be created. + * This value should be 1-63 characters long, containing only + * letters, numbers, hyphens, and underscores, and should not start + * with a number. E.g. "authz_policy". + * + * Generated from protobuf field string authorization_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setAuthorizationPolicyId($var) + { + GPBUtil::checkString($var, True); + $this->authorization_policy_id = $var; + + return $this; + } + + /** + * Required. AuthorizationPolicy resource to be created. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.AuthorizationPolicy authorization_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy|null + */ + public function getAuthorizationPolicy() + { + return $this->authorization_policy; + } + + public function hasAuthorizationPolicy() + { + return isset($this->authorization_policy); + } + + public function clearAuthorizationPolicy() + { + unset($this->authorization_policy); + } + + /** + * Required. AuthorizationPolicy resource to be created. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.AuthorizationPolicy authorization_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy $var + * @return $this + */ + public function setAuthorizationPolicy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy::class); + $this->authorization_policy = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateClientTlsPolicyRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateClientTlsPolicyRequest.php new file mode 100644 index 000000000000..3d3def4d330b --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateClientTlsPolicyRequest.php @@ -0,0 +1,178 @@ +google.cloud.networksecurity.v1.CreateClientTlsPolicyRequest + */ +class CreateClientTlsPolicyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource of the ClientTlsPolicy. Must be in + * the format `projects/*/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Short name of the ClientTlsPolicy resource to be created. This value should + * be 1-63 characters long, containing only letters, numbers, hyphens, and + * underscores, and should not start with a number. E.g. "client_mtls_policy". + * + * Generated from protobuf field string client_tls_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $client_tls_policy_id = ''; + /** + * Required. ClientTlsPolicy resource to be created. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.ClientTlsPolicy client_tls_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $client_tls_policy = null; + + /** + * @param string $parent Required. The parent resource of the ClientTlsPolicy. Must be in + * the format `projects/*/locations/{location}`. Please see + * {@see NetworkSecurityClient::locationName()} for help formatting this field. + * @param \Google\Cloud\NetworkSecurity\V1\ClientTlsPolicy $clientTlsPolicy Required. ClientTlsPolicy resource to be created. + * @param string $clientTlsPolicyId Required. Short name of the ClientTlsPolicy resource to be created. This value should + * be 1-63 characters long, containing only letters, numbers, hyphens, and + * underscores, and should not start with a number. E.g. "client_mtls_policy". + * + * @return \Google\Cloud\NetworkSecurity\V1\CreateClientTlsPolicyRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\NetworkSecurity\V1\ClientTlsPolicy $clientTlsPolicy, string $clientTlsPolicyId): self + { + return (new self()) + ->setParent($parent) + ->setClientTlsPolicy($clientTlsPolicy) + ->setClientTlsPolicyId($clientTlsPolicyId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource of the ClientTlsPolicy. Must be in + * the format `projects/*/locations/{location}`. + * @type string $client_tls_policy_id + * Required. Short name of the ClientTlsPolicy resource to be created. This value should + * be 1-63 characters long, containing only letters, numbers, hyphens, and + * underscores, and should not start with a number. E.g. "client_mtls_policy". + * @type \Google\Cloud\NetworkSecurity\V1\ClientTlsPolicy $client_tls_policy + * Required. ClientTlsPolicy resource to be created. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\ClientTlsPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource of the ClientTlsPolicy. Must be in + * the format `projects/*/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource of the ClientTlsPolicy. Must be in + * the format `projects/*/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. Short name of the ClientTlsPolicy resource to be created. This value should + * be 1-63 characters long, containing only letters, numbers, hyphens, and + * underscores, and should not start with a number. E.g. "client_mtls_policy". + * + * Generated from protobuf field string client_tls_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getClientTlsPolicyId() + { + return $this->client_tls_policy_id; + } + + /** + * Required. Short name of the ClientTlsPolicy resource to be created. This value should + * be 1-63 characters long, containing only letters, numbers, hyphens, and + * underscores, and should not start with a number. E.g. "client_mtls_policy". + * + * Generated from protobuf field string client_tls_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setClientTlsPolicyId($var) + { + GPBUtil::checkString($var, True); + $this->client_tls_policy_id = $var; + + return $this; + } + + /** + * Required. ClientTlsPolicy resource to be created. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.ClientTlsPolicy client_tls_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetworkSecurity\V1\ClientTlsPolicy|null + */ + public function getClientTlsPolicy() + { + return $this->client_tls_policy; + } + + public function hasClientTlsPolicy() + { + return isset($this->client_tls_policy); + } + + public function clearClientTlsPolicy() + { + unset($this->client_tls_policy); + } + + /** + * Required. ClientTlsPolicy resource to be created. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.ClientTlsPolicy client_tls_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetworkSecurity\V1\ClientTlsPolicy $var + * @return $this + */ + public function setClientTlsPolicy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\ClientTlsPolicy::class); + $this->client_tls_policy = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateServerTlsPolicyRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateServerTlsPolicyRequest.php new file mode 100644 index 000000000000..f0b3382517ab --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateServerTlsPolicyRequest.php @@ -0,0 +1,178 @@ +google.cloud.networksecurity.v1.CreateServerTlsPolicyRequest + */ +class CreateServerTlsPolicyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource of the ServerTlsPolicy. Must be in + * the format `projects/*/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Short name of the ServerTlsPolicy resource to be created. This value should + * be 1-63 characters long, containing only letters, numbers, hyphens, and + * underscores, and should not start with a number. E.g. "server_mtls_policy". + * + * Generated from protobuf field string server_tls_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $server_tls_policy_id = ''; + /** + * Required. ServerTlsPolicy resource to be created. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.ServerTlsPolicy server_tls_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $server_tls_policy = null; + + /** + * @param string $parent Required. The parent resource of the ServerTlsPolicy. Must be in + * the format `projects/*/locations/{location}`. Please see + * {@see NetworkSecurityClient::locationName()} for help formatting this field. + * @param \Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy $serverTlsPolicy Required. ServerTlsPolicy resource to be created. + * @param string $serverTlsPolicyId Required. Short name of the ServerTlsPolicy resource to be created. This value should + * be 1-63 characters long, containing only letters, numbers, hyphens, and + * underscores, and should not start with a number. E.g. "server_mtls_policy". + * + * @return \Google\Cloud\NetworkSecurity\V1\CreateServerTlsPolicyRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy $serverTlsPolicy, string $serverTlsPolicyId): self + { + return (new self()) + ->setParent($parent) + ->setServerTlsPolicy($serverTlsPolicy) + ->setServerTlsPolicyId($serverTlsPolicyId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource of the ServerTlsPolicy. Must be in + * the format `projects/*/locations/{location}`. + * @type string $server_tls_policy_id + * Required. Short name of the ServerTlsPolicy resource to be created. This value should + * be 1-63 characters long, containing only letters, numbers, hyphens, and + * underscores, and should not start with a number. E.g. "server_mtls_policy". + * @type \Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy $server_tls_policy + * Required. ServerTlsPolicy resource to be created. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\ServerTlsPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource of the ServerTlsPolicy. Must be in + * the format `projects/*/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource of the ServerTlsPolicy. Must be in + * the format `projects/*/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. Short name of the ServerTlsPolicy resource to be created. This value should + * be 1-63 characters long, containing only letters, numbers, hyphens, and + * underscores, and should not start with a number. E.g. "server_mtls_policy". + * + * Generated from protobuf field string server_tls_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getServerTlsPolicyId() + { + return $this->server_tls_policy_id; + } + + /** + * Required. Short name of the ServerTlsPolicy resource to be created. This value should + * be 1-63 characters long, containing only letters, numbers, hyphens, and + * underscores, and should not start with a number. E.g. "server_mtls_policy". + * + * Generated from protobuf field string server_tls_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setServerTlsPolicyId($var) + { + GPBUtil::checkString($var, True); + $this->server_tls_policy_id = $var; + + return $this; + } + + /** + * Required. ServerTlsPolicy resource to be created. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.ServerTlsPolicy server_tls_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy|null + */ + public function getServerTlsPolicy() + { + return $this->server_tls_policy; + } + + public function hasServerTlsPolicy() + { + return isset($this->server_tls_policy); + } + + public function clearServerTlsPolicy() + { + unset($this->server_tls_policy); + } + + /** + * Required. ServerTlsPolicy resource to be created. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.ServerTlsPolicy server_tls_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy $var + * @return $this + */ + public function setServerTlsPolicy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy::class); + $this->server_tls_policy = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteAuthorizationPolicyRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteAuthorizationPolicyRequest.php new file mode 100644 index 000000000000..5a77695ce1e8 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteAuthorizationPolicyRequest.php @@ -0,0 +1,86 @@ +google.cloud.networksecurity.v1.DeleteAuthorizationPolicyRequest + */ +class DeleteAuthorizationPolicyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A name of the AuthorizationPolicy to delete. Must be in the format + * `projects/{project}/locations/{location}/authorizationPolicies/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. A name of the AuthorizationPolicy to delete. Must be in the format + * `projects/{project}/locations/{location}/authorizationPolicies/*`. Please see + * {@see NetworkSecurityClient::authorizationPolicyName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkSecurity\V1\DeleteAuthorizationPolicyRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. A name of the AuthorizationPolicy to delete. Must be in the format + * `projects/{project}/locations/{location}/authorizationPolicies/*`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\AuthorizationPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. A name of the AuthorizationPolicy to delete. Must be in the format + * `projects/{project}/locations/{location}/authorizationPolicies/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. A name of the AuthorizationPolicy to delete. Must be in the format + * `projects/{project}/locations/{location}/authorizationPolicies/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteClientTlsPolicyRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteClientTlsPolicyRequest.php new file mode 100644 index 000000000000..0c6c459b85a8 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteClientTlsPolicyRequest.php @@ -0,0 +1,86 @@ +google.cloud.networksecurity.v1.DeleteClientTlsPolicyRequest + */ +class DeleteClientTlsPolicyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A name of the ClientTlsPolicy to delete. Must be in + * the format `projects/*/locations/{location}/clientTlsPolicies/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. A name of the ClientTlsPolicy to delete. Must be in + * the format `projects/*/locations/{location}/clientTlsPolicies/*`. Please see + * {@see NetworkSecurityClient::clientTlsPolicyName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkSecurity\V1\DeleteClientTlsPolicyRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. A name of the ClientTlsPolicy to delete. Must be in + * the format `projects/*/locations/{location}/clientTlsPolicies/*`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\ClientTlsPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. A name of the ClientTlsPolicy to delete. Must be in + * the format `projects/*/locations/{location}/clientTlsPolicies/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. A name of the ClientTlsPolicy to delete. Must be in + * the format `projects/*/locations/{location}/clientTlsPolicies/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteServerTlsPolicyRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteServerTlsPolicyRequest.php new file mode 100644 index 000000000000..2382596f1242 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteServerTlsPolicyRequest.php @@ -0,0 +1,86 @@ +google.cloud.networksecurity.v1.DeleteServerTlsPolicyRequest + */ +class DeleteServerTlsPolicyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A name of the ServerTlsPolicy to delete. Must be in + * the format `projects/*/locations/{location}/serverTlsPolicies/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. A name of the ServerTlsPolicy to delete. Must be in + * the format `projects/*/locations/{location}/serverTlsPolicies/*`. Please see + * {@see NetworkSecurityClient::serverTlsPolicyName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkSecurity\V1\DeleteServerTlsPolicyRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. A name of the ServerTlsPolicy to delete. Must be in + * the format `projects/*/locations/{location}/serverTlsPolicies/*`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\ServerTlsPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. A name of the ServerTlsPolicy to delete. Must be in + * the format `projects/*/locations/{location}/serverTlsPolicies/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. A name of the ServerTlsPolicy to delete. Must be in + * the format `projects/*/locations/{location}/serverTlsPolicies/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetAuthorizationPolicyRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetAuthorizationPolicyRequest.php new file mode 100644 index 000000000000..27f763ad28d2 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetAuthorizationPolicyRequest.php @@ -0,0 +1,86 @@ +google.cloud.networksecurity.v1.GetAuthorizationPolicyRequest + */ +class GetAuthorizationPolicyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A name of the AuthorizationPolicy to get. Must be in the format + * `projects/{project}/locations/{location}/authorizationPolicies/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. A name of the AuthorizationPolicy to get. Must be in the format + * `projects/{project}/locations/{location}/authorizationPolicies/*`. Please see + * {@see NetworkSecurityClient::authorizationPolicyName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkSecurity\V1\GetAuthorizationPolicyRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. A name of the AuthorizationPolicy to get. Must be in the format + * `projects/{project}/locations/{location}/authorizationPolicies/*`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\AuthorizationPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. A name of the AuthorizationPolicy to get. Must be in the format + * `projects/{project}/locations/{location}/authorizationPolicies/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. A name of the AuthorizationPolicy to get. Must be in the format + * `projects/{project}/locations/{location}/authorizationPolicies/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetClientTlsPolicyRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetClientTlsPolicyRequest.php new file mode 100644 index 000000000000..90b8fe9b0751 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetClientTlsPolicyRequest.php @@ -0,0 +1,86 @@ +google.cloud.networksecurity.v1.GetClientTlsPolicyRequest + */ +class GetClientTlsPolicyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A name of the ClientTlsPolicy to get. Must be in the format + * `projects/*/locations/{location}/clientTlsPolicies/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. A name of the ClientTlsPolicy to get. Must be in the format + * `projects/*/locations/{location}/clientTlsPolicies/*`. Please see + * {@see NetworkSecurityClient::clientTlsPolicyName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkSecurity\V1\GetClientTlsPolicyRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. A name of the ClientTlsPolicy to get. Must be in the format + * `projects/*/locations/{location}/clientTlsPolicies/*`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\ClientTlsPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. A name of the ClientTlsPolicy to get. Must be in the format + * `projects/*/locations/{location}/clientTlsPolicies/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. A name of the ClientTlsPolicy to get. Must be in the format + * `projects/*/locations/{location}/clientTlsPolicies/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetServerTlsPolicyRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetServerTlsPolicyRequest.php new file mode 100644 index 000000000000..a79106ecdb46 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetServerTlsPolicyRequest.php @@ -0,0 +1,86 @@ +google.cloud.networksecurity.v1.GetServerTlsPolicyRequest + */ +class GetServerTlsPolicyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A name of the ServerTlsPolicy to get. Must be in the format + * `projects/*/locations/{location}/serverTlsPolicies/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. A name of the ServerTlsPolicy to get. Must be in the format + * `projects/*/locations/{location}/serverTlsPolicies/*`. Please see + * {@see NetworkSecurityClient::serverTlsPolicyName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkSecurity\V1\GetServerTlsPolicyRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. A name of the ServerTlsPolicy to get. Must be in the format + * `projects/*/locations/{location}/serverTlsPolicies/*`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\ServerTlsPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. A name of the ServerTlsPolicy to get. Must be in the format + * `projects/*/locations/{location}/serverTlsPolicies/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. A name of the ServerTlsPolicy to get. Must be in the format + * `projects/*/locations/{location}/serverTlsPolicies/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GrpcEndpoint.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GrpcEndpoint.php new file mode 100644 index 000000000000..34031be7a624 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GrpcEndpoint.php @@ -0,0 +1,71 @@ +google.cloud.networksecurity.v1.GrpcEndpoint + */ +class GrpcEndpoint extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The target URI of the gRPC endpoint. Only UDS path is supported, and + * should start with "unix:". + * + * Generated from protobuf field string target_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $target_uri = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $target_uri + * Required. The target URI of the gRPC endpoint. Only UDS path is supported, and + * should start with "unix:". + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\Tls::initOnce(); + parent::__construct($data); + } + + /** + * Required. The target URI of the gRPC endpoint. Only UDS path is supported, and + * should start with "unix:". + * + * Generated from protobuf field string target_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getTargetUri() + { + return $this->target_uri; + } + + /** + * Required. The target URI of the gRPC endpoint. Only UDS path is supported, and + * should start with "unix:". + * + * Generated from protobuf field string target_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setTargetUri($var) + { + GPBUtil::checkString($var, True); + $this->target_uri = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListAuthorizationPoliciesRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListAuthorizationPoliciesRequest.php new file mode 100644 index 000000000000..bcc6a41e53dd --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListAuthorizationPoliciesRequest.php @@ -0,0 +1,171 @@ +google.cloud.networksecurity.v1.ListAuthorizationPoliciesRequest + */ +class ListAuthorizationPoliciesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project and location from which the AuthorizationPolicies + * should be listed, specified in the format + * `projects/{project}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Maximum number of AuthorizationPolicies to return per call. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The value returned by the last + * `ListAuthorizationPoliciesResponse` Indicates that this is a + * continuation of a prior `ListAuthorizationPolicies` call, and + * that the system should return the next page of data. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The project and location from which the AuthorizationPolicies + * should be listed, specified in the format + * `projects/{project}/locations/{location}`. Please see + * {@see NetworkSecurityClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkSecurity\V1\ListAuthorizationPoliciesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The project and location from which the AuthorizationPolicies + * should be listed, specified in the format + * `projects/{project}/locations/{location}`. + * @type int $page_size + * Maximum number of AuthorizationPolicies to return per call. + * @type string $page_token + * The value returned by the last + * `ListAuthorizationPoliciesResponse` Indicates that this is a + * continuation of a prior `ListAuthorizationPolicies` call, and + * that the system should return the next page of data. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\AuthorizationPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project and location from which the AuthorizationPolicies + * should be listed, specified in the format + * `projects/{project}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The project and location from which the AuthorizationPolicies + * should be listed, specified in the format + * `projects/{project}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Maximum number of AuthorizationPolicies to return per call. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Maximum number of AuthorizationPolicies to return per call. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The value returned by the last + * `ListAuthorizationPoliciesResponse` Indicates that this is a + * continuation of a prior `ListAuthorizationPolicies` call, and + * that the system should return the next page of data. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The value returned by the last + * `ListAuthorizationPoliciesResponse` Indicates that this is a + * continuation of a prior `ListAuthorizationPolicies` call, and + * that the system should return the next page of data. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListAuthorizationPoliciesResponse.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListAuthorizationPoliciesResponse.php new file mode 100644 index 000000000000..729cad84d2b8 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListAuthorizationPoliciesResponse.php @@ -0,0 +1,109 @@ +google.cloud.networksecurity.v1.ListAuthorizationPoliciesResponse + */ +class ListAuthorizationPoliciesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * List of AuthorizationPolicies resources. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AuthorizationPolicy authorization_policies = 1; + */ + private $authorization_policies; + /** + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy>|\Google\Protobuf\Internal\RepeatedField $authorization_policies + * List of AuthorizationPolicies resources. + * @type string $next_page_token + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\AuthorizationPolicy::initOnce(); + parent::__construct($data); + } + + /** + * List of AuthorizationPolicies resources. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AuthorizationPolicy authorization_policies = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAuthorizationPolicies() + { + return $this->authorization_policies; + } + + /** + * List of AuthorizationPolicies resources. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AuthorizationPolicy authorization_policies = 1; + * @param array<\Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAuthorizationPolicies($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy::class); + $this->authorization_policies = $arr; + + return $this; + } + + /** + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListClientTlsPoliciesRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListClientTlsPoliciesRequest.php new file mode 100644 index 000000000000..b7d754f60f82 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListClientTlsPoliciesRequest.php @@ -0,0 +1,166 @@ +google.cloud.networksecurity.v1.ListClientTlsPoliciesRequest + */ +class ListClientTlsPoliciesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project and location from which the ClientTlsPolicies should + * be listed, specified in the format `projects/*/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Maximum number of ClientTlsPolicies to return per call. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The value returned by the last `ListClientTlsPoliciesResponse` + * Indicates that this is a continuation of a prior + * `ListClientTlsPolicies` call, and that the system + * should return the next page of data. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The project and location from which the ClientTlsPolicies should + * be listed, specified in the format `projects/*/locations/{location}`. Please see + * {@see NetworkSecurityClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkSecurity\V1\ListClientTlsPoliciesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The project and location from which the ClientTlsPolicies should + * be listed, specified in the format `projects/*/locations/{location}`. + * @type int $page_size + * Maximum number of ClientTlsPolicies to return per call. + * @type string $page_token + * The value returned by the last `ListClientTlsPoliciesResponse` + * Indicates that this is a continuation of a prior + * `ListClientTlsPolicies` call, and that the system + * should return the next page of data. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\ClientTlsPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project and location from which the ClientTlsPolicies should + * be listed, specified in the format `projects/*/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The project and location from which the ClientTlsPolicies should + * be listed, specified in the format `projects/*/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Maximum number of ClientTlsPolicies to return per call. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Maximum number of ClientTlsPolicies to return per call. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The value returned by the last `ListClientTlsPoliciesResponse` + * Indicates that this is a continuation of a prior + * `ListClientTlsPolicies` call, and that the system + * should return the next page of data. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The value returned by the last `ListClientTlsPoliciesResponse` + * Indicates that this is a continuation of a prior + * `ListClientTlsPolicies` call, and that the system + * should return the next page of data. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListClientTlsPoliciesResponse.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListClientTlsPoliciesResponse.php new file mode 100644 index 000000000000..a5b57f958e01 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListClientTlsPoliciesResponse.php @@ -0,0 +1,109 @@ +google.cloud.networksecurity.v1.ListClientTlsPoliciesResponse + */ +class ListClientTlsPoliciesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * List of ClientTlsPolicy resources. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.ClientTlsPolicy client_tls_policies = 1; + */ + private $client_tls_policies; + /** + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\NetworkSecurity\V1\ClientTlsPolicy>|\Google\Protobuf\Internal\RepeatedField $client_tls_policies + * List of ClientTlsPolicy resources. + * @type string $next_page_token + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\ClientTlsPolicy::initOnce(); + parent::__construct($data); + } + + /** + * List of ClientTlsPolicy resources. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.ClientTlsPolicy client_tls_policies = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getClientTlsPolicies() + { + return $this->client_tls_policies; + } + + /** + * List of ClientTlsPolicy resources. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.ClientTlsPolicy client_tls_policies = 1; + * @param array<\Google\Cloud\NetworkSecurity\V1\ClientTlsPolicy>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setClientTlsPolicies($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkSecurity\V1\ClientTlsPolicy::class); + $this->client_tls_policies = $arr; + + return $this; + } + + /** + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListServerTlsPoliciesRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListServerTlsPoliciesRequest.php new file mode 100644 index 000000000000..2d8e83a2f998 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListServerTlsPoliciesRequest.php @@ -0,0 +1,166 @@ +google.cloud.networksecurity.v1.ListServerTlsPoliciesRequest + */ +class ListServerTlsPoliciesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project and location from which the ServerTlsPolicies should + * be listed, specified in the format `projects/*/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Maximum number of ServerTlsPolicies to return per call. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The value returned by the last `ListServerTlsPoliciesResponse` + * Indicates that this is a continuation of a prior + * `ListServerTlsPolicies` call, and that the system + * should return the next page of data. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The project and location from which the ServerTlsPolicies should + * be listed, specified in the format `projects/*/locations/{location}`. Please see + * {@see NetworkSecurityClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkSecurity\V1\ListServerTlsPoliciesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The project and location from which the ServerTlsPolicies should + * be listed, specified in the format `projects/*/locations/{location}`. + * @type int $page_size + * Maximum number of ServerTlsPolicies to return per call. + * @type string $page_token + * The value returned by the last `ListServerTlsPoliciesResponse` + * Indicates that this is a continuation of a prior + * `ListServerTlsPolicies` call, and that the system + * should return the next page of data. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\ServerTlsPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project and location from which the ServerTlsPolicies should + * be listed, specified in the format `projects/*/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The project and location from which the ServerTlsPolicies should + * be listed, specified in the format `projects/*/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Maximum number of ServerTlsPolicies to return per call. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Maximum number of ServerTlsPolicies to return per call. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The value returned by the last `ListServerTlsPoliciesResponse` + * Indicates that this is a continuation of a prior + * `ListServerTlsPolicies` call, and that the system + * should return the next page of data. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The value returned by the last `ListServerTlsPoliciesResponse` + * Indicates that this is a continuation of a prior + * `ListServerTlsPolicies` call, and that the system + * should return the next page of data. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListServerTlsPoliciesResponse.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListServerTlsPoliciesResponse.php new file mode 100644 index 000000000000..1e9c223a096d --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListServerTlsPoliciesResponse.php @@ -0,0 +1,109 @@ +google.cloud.networksecurity.v1.ListServerTlsPoliciesResponse + */ +class ListServerTlsPoliciesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * List of ServerTlsPolicy resources. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.ServerTlsPolicy server_tls_policies = 1; + */ + private $server_tls_policies; + /** + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy>|\Google\Protobuf\Internal\RepeatedField $server_tls_policies + * List of ServerTlsPolicy resources. + * @type string $next_page_token + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\ServerTlsPolicy::initOnce(); + parent::__construct($data); + } + + /** + * List of ServerTlsPolicy resources. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.ServerTlsPolicy server_tls_policies = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getServerTlsPolicies() + { + return $this->server_tls_policies; + } + + /** + * List of ServerTlsPolicy resources. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.ServerTlsPolicy server_tls_policies = 1; + * @param array<\Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setServerTlsPolicies($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy::class); + $this->server_tls_policies = $arr; + + return $this; + } + + /** + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/OperationMetadata.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/OperationMetadata.php new file mode 100644 index 000000000000..c7ce8290e617 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/OperationMetadata.php @@ -0,0 +1,303 @@ +google.cloud.networksecurity.v1.OperationMetadata + */ +class OperationMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $end_time = null; + /** + * Output only. Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $target = ''; + /** + * Output only. Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $verb = ''; + /** + * Output only. Human-readable status of the operation, if any. + * + * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $status_message = ''; + /** + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have successfully been cancelled + * have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, + * corresponding to `Code.CANCELLED`. + * + * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $requested_cancellation = false; + /** + * Output only. API version used to start the operation. + * + * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $api_version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time the operation was created. + * @type \Google\Protobuf\Timestamp $end_time + * Output only. The time the operation finished running. + * @type string $target + * Output only. Server-defined resource path for the target of the operation. + * @type string $verb + * Output only. Name of the verb executed by the operation. + * @type string $status_message + * Output only. Human-readable status of the operation, if any. + * @type bool $requested_cancellation + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have successfully been cancelled + * have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, + * corresponding to `Code.CANCELLED`. + * @type string $api_version + * Output only. API version used to start the operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\Common::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEndTime() + { + return $this->end_time; + } + + public function hasEndTime() + { + return isset($this->end_time); + } + + public function clearEndTime() + { + unset($this->end_time); + } + + /** + * Output only. The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * Output only. Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getTarget() + { + return $this->target; + } + + /** + * Output only. Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setTarget($var) + { + GPBUtil::checkString($var, True); + $this->target = $var; + + return $this; + } + + /** + * Output only. Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getVerb() + { + return $this->verb; + } + + /** + * Output only. Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setVerb($var) + { + GPBUtil::checkString($var, True); + $this->verb = $var; + + return $this; + } + + /** + * Output only. Human-readable status of the operation, if any. + * + * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getStatusMessage() + { + return $this->status_message; + } + + /** + * Output only. Human-readable status of the operation, if any. + * + * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setStatusMessage($var) + { + GPBUtil::checkString($var, True); + $this->status_message = $var; + + return $this; + } + + /** + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have successfully been cancelled + * have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, + * corresponding to `Code.CANCELLED`. + * + * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getRequestedCancellation() + { + return $this->requested_cancellation; + } + + /** + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have successfully been cancelled + * have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, + * corresponding to `Code.CANCELLED`. + * + * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setRequestedCancellation($var) + { + GPBUtil::checkBool($var); + $this->requested_cancellation = $var; + + return $this; + } + + /** + * Output only. API version used to start the operation. + * + * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getApiVersion() + { + return $this->api_version; + } + + /** + * Output only. API version used to start the operation. + * + * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setApiVersion($var) + { + GPBUtil::checkString($var, True); + $this->api_version = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ServerTlsPolicy.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ServerTlsPolicy.php new file mode 100644 index 000000000000..3c2d7c1b7c04 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ServerTlsPolicy.php @@ -0,0 +1,403 @@ +google.cloud.networksecurity.v1.ServerTlsPolicy + */ +class ServerTlsPolicy extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the ServerTlsPolicy resource. It matches the pattern + * `projects/*/locations/{location}/serverTlsPolicies/{server_tls_policy}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * Free-text description of the resource. + * + * Generated from protobuf field string description = 2; + */ + protected $description = ''; + /** + * Output only. The timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The timestamp when the resource was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Set of label tags associated with the resource. + * + * Generated from protobuf field map labels = 5; + */ + private $labels; + /** + * Determines if server allows plaintext connections. If set to true, server + * allows plain text connections. By default, it is set to false. This setting + * is not exclusive of other encryption modes. For example, if `allow_open` + * and `mtls_policy` are set, server allows both plain text and mTLS + * connections. See documentation of other encryption modes to confirm + * compatibility. + * Consider using it if you wish to upgrade in place your deployment to TLS + * while having mixed TLS and non-TLS traffic reaching port :80. + * + * Generated from protobuf field bool allow_open = 6; + */ + protected $allow_open = false; + /** + * Defines a mechanism to provision server identity (public and private keys). + * Cannot be combined with `allow_open` as a permissive mode that allows both + * plain text and TLS is not supported. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.CertificateProvider server_certificate = 7; + */ + protected $server_certificate = null; + /** + * Defines a mechanism to provision peer validation certificates for peer to + * peer authentication (Mutual TLS - mTLS). If not specified, client + * certificate will not be requested. The connection is treated as TLS and not + * mTLS. If `allow_open` and `mtls_policy` are set, server allows both plain + * text and mTLS connections. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.ServerTlsPolicy.MTLSPolicy mtls_policy = 8; + */ + protected $mtls_policy = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the ServerTlsPolicy resource. It matches the pattern + * `projects/*/locations/{location}/serverTlsPolicies/{server_tls_policy}` + * @type string $description + * Free-text description of the resource. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The timestamp when the resource was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The timestamp when the resource was updated. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Set of label tags associated with the resource. + * @type bool $allow_open + * Determines if server allows plaintext connections. If set to true, server + * allows plain text connections. By default, it is set to false. This setting + * is not exclusive of other encryption modes. For example, if `allow_open` + * and `mtls_policy` are set, server allows both plain text and mTLS + * connections. See documentation of other encryption modes to confirm + * compatibility. + * Consider using it if you wish to upgrade in place your deployment to TLS + * while having mixed TLS and non-TLS traffic reaching port :80. + * @type \Google\Cloud\NetworkSecurity\V1\CertificateProvider $server_certificate + * Defines a mechanism to provision server identity (public and private keys). + * Cannot be combined with `allow_open` as a permissive mode that allows both + * plain text and TLS is not supported. + * @type \Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy\MTLSPolicy $mtls_policy + * Defines a mechanism to provision peer validation certificates for peer to + * peer authentication (Mutual TLS - mTLS). If not specified, client + * certificate will not be requested. The connection is treated as TLS and not + * mTLS. If `allow_open` and `mtls_policy` are set, server allows both plain + * text and mTLS connections. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\ServerTlsPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the ServerTlsPolicy resource. It matches the pattern + * `projects/*/locations/{location}/serverTlsPolicies/{server_tls_policy}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the ServerTlsPolicy resource. It matches the pattern + * `projects/*/locations/{location}/serverTlsPolicies/{server_tls_policy}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Free-text description of the resource. + * + * Generated from protobuf field string description = 2; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Free-text description of the resource. + * + * Generated from protobuf field string description = 2; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Output only. The timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The timestamp when the resource was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The timestamp when the resource was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Set of label tags associated with the resource. + * + * Generated from protobuf field map labels = 5; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Set of label tags associated with the resource. + * + * Generated from protobuf field map labels = 5; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Determines if server allows plaintext connections. If set to true, server + * allows plain text connections. By default, it is set to false. This setting + * is not exclusive of other encryption modes. For example, if `allow_open` + * and `mtls_policy` are set, server allows both plain text and mTLS + * connections. See documentation of other encryption modes to confirm + * compatibility. + * Consider using it if you wish to upgrade in place your deployment to TLS + * while having mixed TLS and non-TLS traffic reaching port :80. + * + * Generated from protobuf field bool allow_open = 6; + * @return bool + */ + public function getAllowOpen() + { + return $this->allow_open; + } + + /** + * Determines if server allows plaintext connections. If set to true, server + * allows plain text connections. By default, it is set to false. This setting + * is not exclusive of other encryption modes. For example, if `allow_open` + * and `mtls_policy` are set, server allows both plain text and mTLS + * connections. See documentation of other encryption modes to confirm + * compatibility. + * Consider using it if you wish to upgrade in place your deployment to TLS + * while having mixed TLS and non-TLS traffic reaching port :80. + * + * Generated from protobuf field bool allow_open = 6; + * @param bool $var + * @return $this + */ + public function setAllowOpen($var) + { + GPBUtil::checkBool($var); + $this->allow_open = $var; + + return $this; + } + + /** + * Defines a mechanism to provision server identity (public and private keys). + * Cannot be combined with `allow_open` as a permissive mode that allows both + * plain text and TLS is not supported. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.CertificateProvider server_certificate = 7; + * @return \Google\Cloud\NetworkSecurity\V1\CertificateProvider|null + */ + public function getServerCertificate() + { + return $this->server_certificate; + } + + public function hasServerCertificate() + { + return isset($this->server_certificate); + } + + public function clearServerCertificate() + { + unset($this->server_certificate); + } + + /** + * Defines a mechanism to provision server identity (public and private keys). + * Cannot be combined with `allow_open` as a permissive mode that allows both + * plain text and TLS is not supported. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.CertificateProvider server_certificate = 7; + * @param \Google\Cloud\NetworkSecurity\V1\CertificateProvider $var + * @return $this + */ + public function setServerCertificate($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\CertificateProvider::class); + $this->server_certificate = $var; + + return $this; + } + + /** + * Defines a mechanism to provision peer validation certificates for peer to + * peer authentication (Mutual TLS - mTLS). If not specified, client + * certificate will not be requested. The connection is treated as TLS and not + * mTLS. If `allow_open` and `mtls_policy` are set, server allows both plain + * text and mTLS connections. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.ServerTlsPolicy.MTLSPolicy mtls_policy = 8; + * @return \Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy\MTLSPolicy|null + */ + public function getMtlsPolicy() + { + return $this->mtls_policy; + } + + public function hasMtlsPolicy() + { + return isset($this->mtls_policy); + } + + public function clearMtlsPolicy() + { + unset($this->mtls_policy); + } + + /** + * Defines a mechanism to provision peer validation certificates for peer to + * peer authentication (Mutual TLS - mTLS). If not specified, client + * certificate will not be requested. The connection is treated as TLS and not + * mTLS. If `allow_open` and `mtls_policy` are set, server allows both plain + * text and mTLS connections. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.ServerTlsPolicy.MTLSPolicy mtls_policy = 8; + * @param \Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy\MTLSPolicy $var + * @return $this + */ + public function setMtlsPolicy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy\MTLSPolicy::class); + $this->mtls_policy = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ServerTlsPolicy/MTLSPolicy.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ServerTlsPolicy/MTLSPolicy.php new file mode 100644 index 000000000000..3bc9f9b8d37a --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ServerTlsPolicy/MTLSPolicy.php @@ -0,0 +1,74 @@ +google.cloud.networksecurity.v1.ServerTlsPolicy.MTLSPolicy + */ +class MTLSPolicy extends \Google\Protobuf\Internal\Message +{ + /** + * Defines the mechanism to obtain the Certificate Authority certificate to + * validate the client certificate. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.ValidationCA client_validation_ca = 1; + */ + private $client_validation_ca; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\NetworkSecurity\V1\ValidationCA>|\Google\Protobuf\Internal\RepeatedField $client_validation_ca + * Defines the mechanism to obtain the Certificate Authority certificate to + * validate the client certificate. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\ServerTlsPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Defines the mechanism to obtain the Certificate Authority certificate to + * validate the client certificate. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.ValidationCA client_validation_ca = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getClientValidationCa() + { + return $this->client_validation_ca; + } + + /** + * Defines the mechanism to obtain the Certificate Authority certificate to + * validate the client certificate. + * + * Generated from protobuf field repeated .google.cloud.networksecurity.v1.ValidationCA client_validation_ca = 1; + * @param array<\Google\Cloud\NetworkSecurity\V1\ValidationCA>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setClientValidationCa($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkSecurity\V1\ValidationCA::class); + $this->client_validation_ca = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(MTLSPolicy::class, \Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy_MTLSPolicy::class); + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateAuthorizationPolicyRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateAuthorizationPolicyRequest.php new file mode 100644 index 000000000000..664831a9e0ce --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateAuthorizationPolicyRequest.php @@ -0,0 +1,156 @@ +google.cloud.networksecurity.v1.UpdateAuthorizationPolicyRequest + */ +class UpdateAuthorizationPolicyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Field mask is used to specify the fields to be overwritten in the + * AuthorizationPolicy resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $update_mask = null; + /** + * Required. Updated AuthorizationPolicy resource. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.AuthorizationPolicy authorization_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $authorization_policy = null; + + /** + * @param \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy $authorizationPolicy Required. Updated AuthorizationPolicy resource. + * @param \Google\Protobuf\FieldMask $updateMask Optional. Field mask is used to specify the fields to be overwritten in the + * AuthorizationPolicy resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * @return \Google\Cloud\NetworkSecurity\V1\UpdateAuthorizationPolicyRequest + * + * @experimental + */ + public static function build(\Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy $authorizationPolicy, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setAuthorizationPolicy($authorizationPolicy) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Optional. Field mask is used to specify the fields to be overwritten in the + * AuthorizationPolicy resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * @type \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy $authorization_policy + * Required. Updated AuthorizationPolicy resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\AuthorizationPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Field mask is used to specify the fields to be overwritten in the + * AuthorizationPolicy resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Optional. Field mask is used to specify the fields to be overwritten in the + * AuthorizationPolicy resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Required. Updated AuthorizationPolicy resource. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.AuthorizationPolicy authorization_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy|null + */ + public function getAuthorizationPolicy() + { + return $this->authorization_policy; + } + + public function hasAuthorizationPolicy() + { + return isset($this->authorization_policy); + } + + public function clearAuthorizationPolicy() + { + unset($this->authorization_policy); + } + + /** + * Required. Updated AuthorizationPolicy resource. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.AuthorizationPolicy authorization_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy $var + * @return $this + */ + public function setAuthorizationPolicy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy::class); + $this->authorization_policy = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateClientTlsPolicyRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateClientTlsPolicyRequest.php new file mode 100644 index 000000000000..aa872a5d72f3 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateClientTlsPolicyRequest.php @@ -0,0 +1,161 @@ +google.cloud.networksecurity.v1.UpdateClientTlsPolicyRequest + */ +class UpdateClientTlsPolicyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Field mask is used to specify the fields to be overwritten in the + * ClientTlsPolicy resource by the update. The fields + * specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the + * mask. If the user does not provide a mask then all fields will be + * overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $update_mask = null; + /** + * Required. Updated ClientTlsPolicy resource. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.ClientTlsPolicy client_tls_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $client_tls_policy = null; + + /** + * @param \Google\Cloud\NetworkSecurity\V1\ClientTlsPolicy $clientTlsPolicy Required. Updated ClientTlsPolicy resource. + * @param \Google\Protobuf\FieldMask $updateMask Optional. Field mask is used to specify the fields to be overwritten in the + * ClientTlsPolicy resource by the update. The fields + * specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the + * mask. If the user does not provide a mask then all fields will be + * overwritten. + * + * @return \Google\Cloud\NetworkSecurity\V1\UpdateClientTlsPolicyRequest + * + * @experimental + */ + public static function build(\Google\Cloud\NetworkSecurity\V1\ClientTlsPolicy $clientTlsPolicy, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setClientTlsPolicy($clientTlsPolicy) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Optional. Field mask is used to specify the fields to be overwritten in the + * ClientTlsPolicy resource by the update. The fields + * specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the + * mask. If the user does not provide a mask then all fields will be + * overwritten. + * @type \Google\Cloud\NetworkSecurity\V1\ClientTlsPolicy $client_tls_policy + * Required. Updated ClientTlsPolicy resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\ClientTlsPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Field mask is used to specify the fields to be overwritten in the + * ClientTlsPolicy resource by the update. The fields + * specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the + * mask. If the user does not provide a mask then all fields will be + * overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Optional. Field mask is used to specify the fields to be overwritten in the + * ClientTlsPolicy resource by the update. The fields + * specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the + * mask. If the user does not provide a mask then all fields will be + * overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Required. Updated ClientTlsPolicy resource. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.ClientTlsPolicy client_tls_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetworkSecurity\V1\ClientTlsPolicy|null + */ + public function getClientTlsPolicy() + { + return $this->client_tls_policy; + } + + public function hasClientTlsPolicy() + { + return isset($this->client_tls_policy); + } + + public function clearClientTlsPolicy() + { + unset($this->client_tls_policy); + } + + /** + * Required. Updated ClientTlsPolicy resource. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.ClientTlsPolicy client_tls_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetworkSecurity\V1\ClientTlsPolicy $var + * @return $this + */ + public function setClientTlsPolicy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\ClientTlsPolicy::class); + $this->client_tls_policy = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateServerTlsPolicyRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateServerTlsPolicyRequest.php new file mode 100644 index 000000000000..e93610fbe81b --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateServerTlsPolicyRequest.php @@ -0,0 +1,161 @@ +google.cloud.networksecurity.v1.UpdateServerTlsPolicyRequest + */ +class UpdateServerTlsPolicyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Field mask is used to specify the fields to be overwritten in the + * ServerTlsPolicy resource by the update. The fields + * specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the + * mask. If the user does not provide a mask then all fields will be + * overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $update_mask = null; + /** + * Required. Updated ServerTlsPolicy resource. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.ServerTlsPolicy server_tls_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $server_tls_policy = null; + + /** + * @param \Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy $serverTlsPolicy Required. Updated ServerTlsPolicy resource. + * @param \Google\Protobuf\FieldMask $updateMask Optional. Field mask is used to specify the fields to be overwritten in the + * ServerTlsPolicy resource by the update. The fields + * specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the + * mask. If the user does not provide a mask then all fields will be + * overwritten. + * + * @return \Google\Cloud\NetworkSecurity\V1\UpdateServerTlsPolicyRequest + * + * @experimental + */ + public static function build(\Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy $serverTlsPolicy, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setServerTlsPolicy($serverTlsPolicy) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Optional. Field mask is used to specify the fields to be overwritten in the + * ServerTlsPolicy resource by the update. The fields + * specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the + * mask. If the user does not provide a mask then all fields will be + * overwritten. + * @type \Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy $server_tls_policy + * Required. Updated ServerTlsPolicy resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\ServerTlsPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Field mask is used to specify the fields to be overwritten in the + * ServerTlsPolicy resource by the update. The fields + * specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the + * mask. If the user does not provide a mask then all fields will be + * overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Optional. Field mask is used to specify the fields to be overwritten in the + * ServerTlsPolicy resource by the update. The fields + * specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the + * mask. If the user does not provide a mask then all fields will be + * overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Required. Updated ServerTlsPolicy resource. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.ServerTlsPolicy server_tls_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy|null + */ + public function getServerTlsPolicy() + { + return $this->server_tls_policy; + } + + public function hasServerTlsPolicy() + { + return isset($this->server_tls_policy); + } + + public function clearServerTlsPolicy() + { + unset($this->server_tls_policy); + } + + /** + * Required. Updated ServerTlsPolicy resource. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.ServerTlsPolicy server_tls_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy $var + * @return $this + */ + public function setServerTlsPolicy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy::class); + $this->server_tls_policy = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ValidationCA.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ValidationCA.php new file mode 100644 index 000000000000..83c8197bdee2 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ValidationCA.php @@ -0,0 +1,118 @@ +google.cloud.networksecurity.v1.ValidationCA + */ +class ValidationCA extends \Google\Protobuf\Internal\Message +{ + protected $type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\NetworkSecurity\V1\GrpcEndpoint $grpc_endpoint + * gRPC specific configuration to access the gRPC server to + * obtain the CA certificate. + * @type \Google\Cloud\NetworkSecurity\V1\CertificateProviderInstance $certificate_provider_instance + * The certificate provider instance specification that will be passed to + * the data plane, which will be used to load necessary credential + * information. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networksecurity\V1\Tls::initOnce(); + parent::__construct($data); + } + + /** + * gRPC specific configuration to access the gRPC server to + * obtain the CA certificate. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.GrpcEndpoint grpc_endpoint = 2; + * @return \Google\Cloud\NetworkSecurity\V1\GrpcEndpoint|null + */ + public function getGrpcEndpoint() + { + return $this->readOneof(2); + } + + public function hasGrpcEndpoint() + { + return $this->hasOneof(2); + } + + /** + * gRPC specific configuration to access the gRPC server to + * obtain the CA certificate. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.GrpcEndpoint grpc_endpoint = 2; + * @param \Google\Cloud\NetworkSecurity\V1\GrpcEndpoint $var + * @return $this + */ + public function setGrpcEndpoint($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\GrpcEndpoint::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * The certificate provider instance specification that will be passed to + * the data plane, which will be used to load necessary credential + * information. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.CertificateProviderInstance certificate_provider_instance = 3; + * @return \Google\Cloud\NetworkSecurity\V1\CertificateProviderInstance|null + */ + public function getCertificateProviderInstance() + { + return $this->readOneof(3); + } + + public function hasCertificateProviderInstance() + { + return $this->hasOneof(3); + } + + /** + * The certificate provider instance specification that will be passed to + * the data plane, which will be used to load necessary credential + * information. + * + * Generated from protobuf field .google.cloud.networksecurity.v1.CertificateProviderInstance certificate_provider_instance = 3; + * @param \Google\Cloud\NetworkSecurity\V1\CertificateProviderInstance $var + * @return $this + */ + public function setCertificateProviderInstance($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\CertificateProviderInstance::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * @return string + */ + public function getType() + { + return $this->whichOneof("type"); + } + +} + diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/create_authorization_policy.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/create_authorization_policy.php new file mode 100644 index 000000000000..8aab042afbcf --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/create_authorization_policy.php @@ -0,0 +1,110 @@ +`. + * @param int $authorizationPolicyAction The action to take when a rule match is found. Possible values + * are "ALLOW" or "DENY". + */ +function create_authorization_policy_sample( + string $formattedParent, + string $authorizationPolicyId, + string $authorizationPolicyName, + int $authorizationPolicyAction +): void { + // Create a client. + $networkSecurityClient = new NetworkSecurityClient(); + + // Prepare the request message. + $authorizationPolicy = (new AuthorizationPolicy()) + ->setName($authorizationPolicyName) + ->setAction($authorizationPolicyAction); + $request = (new CreateAuthorizationPolicyRequest()) + ->setParent($formattedParent) + ->setAuthorizationPolicyId($authorizationPolicyId) + ->setAuthorizationPolicy($authorizationPolicy); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $networkSecurityClient->createAuthorizationPolicy($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var AuthorizationPolicy $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = NetworkSecurityClient::locationName('[PROJECT]', '[LOCATION]'); + $authorizationPolicyId = '[AUTHORIZATION_POLICY_ID]'; + $authorizationPolicyName = '[NAME]'; + $authorizationPolicyAction = Action::ACTION_UNSPECIFIED; + + create_authorization_policy_sample( + $formattedParent, + $authorizationPolicyId, + $authorizationPolicyName, + $authorizationPolicyAction + ); +} +// [END networksecurity_v1_generated_NetworkSecurity_CreateAuthorizationPolicy_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/create_client_tls_policy.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/create_client_tls_policy.php new file mode 100644 index 000000000000..af2e77c799b6 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/create_client_tls_policy.php @@ -0,0 +1,98 @@ +setName($clientTlsPolicyName); + $request = (new CreateClientTlsPolicyRequest()) + ->setParent($formattedParent) + ->setClientTlsPolicyId($clientTlsPolicyId) + ->setClientTlsPolicy($clientTlsPolicy); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $networkSecurityClient->createClientTlsPolicy($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var ClientTlsPolicy $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = NetworkSecurityClient::locationName('[PROJECT]', '[LOCATION]'); + $clientTlsPolicyId = '[CLIENT_TLS_POLICY_ID]'; + $clientTlsPolicyName = '[NAME]'; + + create_client_tls_policy_sample($formattedParent, $clientTlsPolicyId, $clientTlsPolicyName); +} +// [END networksecurity_v1_generated_NetworkSecurity_CreateClientTlsPolicy_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/create_server_tls_policy.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/create_server_tls_policy.php new file mode 100644 index 000000000000..d242a080ffd8 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/create_server_tls_policy.php @@ -0,0 +1,98 @@ +setName($serverTlsPolicyName); + $request = (new CreateServerTlsPolicyRequest()) + ->setParent($formattedParent) + ->setServerTlsPolicyId($serverTlsPolicyId) + ->setServerTlsPolicy($serverTlsPolicy); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $networkSecurityClient->createServerTlsPolicy($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var ServerTlsPolicy $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = NetworkSecurityClient::locationName('[PROJECT]', '[LOCATION]'); + $serverTlsPolicyId = '[SERVER_TLS_POLICY_ID]'; + $serverTlsPolicyName = '[NAME]'; + + create_server_tls_policy_sample($formattedParent, $serverTlsPolicyId, $serverTlsPolicyName); +} +// [END networksecurity_v1_generated_NetworkSecurity_CreateServerTlsPolicy_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/delete_authorization_policy.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/delete_authorization_policy.php new file mode 100644 index 000000000000..a58f71e007df --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/delete_authorization_policy.php @@ -0,0 +1,85 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $networkSecurityClient->deleteAuthorizationPolicy($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NetworkSecurityClient::authorizationPolicyName( + '[PROJECT]', + '[LOCATION]', + '[AUTHORIZATION_POLICY]' + ); + + delete_authorization_policy_sample($formattedName); +} +// [END networksecurity_v1_generated_NetworkSecurity_DeleteAuthorizationPolicy_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/delete_client_tls_policy.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/delete_client_tls_policy.php new file mode 100644 index 000000000000..f85d452e25c7 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/delete_client_tls_policy.php @@ -0,0 +1,85 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $networkSecurityClient->deleteClientTlsPolicy($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NetworkSecurityClient::clientTlsPolicyName( + '[PROJECT]', + '[LOCATION]', + '[CLIENT_TLS_POLICY]' + ); + + delete_client_tls_policy_sample($formattedName); +} +// [END networksecurity_v1_generated_NetworkSecurity_DeleteClientTlsPolicy_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/delete_server_tls_policy.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/delete_server_tls_policy.php new file mode 100644 index 000000000000..9baab29369b1 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/delete_server_tls_policy.php @@ -0,0 +1,85 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $networkSecurityClient->deleteServerTlsPolicy($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NetworkSecurityClient::serverTlsPolicyName( + '[PROJECT]', + '[LOCATION]', + '[SERVER_TLS_POLICY]' + ); + + delete_server_tls_policy_sample($formattedName); +} +// [END networksecurity_v1_generated_NetworkSecurity_DeleteServerTlsPolicy_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_authorization_policy.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_authorization_policy.php new file mode 100644 index 000000000000..21e1b7b225f5 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_authorization_policy.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var AuthorizationPolicy $response */ + $response = $networkSecurityClient->getAuthorizationPolicy($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NetworkSecurityClient::authorizationPolicyName( + '[PROJECT]', + '[LOCATION]', + '[AUTHORIZATION_POLICY]' + ); + + get_authorization_policy_sample($formattedName); +} +// [END networksecurity_v1_generated_NetworkSecurity_GetAuthorizationPolicy_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_client_tls_policy.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_client_tls_policy.php new file mode 100644 index 000000000000..bb357c1e3519 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_client_tls_policy.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var ClientTlsPolicy $response */ + $response = $networkSecurityClient->getClientTlsPolicy($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NetworkSecurityClient::clientTlsPolicyName( + '[PROJECT]', + '[LOCATION]', + '[CLIENT_TLS_POLICY]' + ); + + get_client_tls_policy_sample($formattedName); +} +// [END networksecurity_v1_generated_NetworkSecurity_GetClientTlsPolicy_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_iam_policy.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_iam_policy.php new file mode 100644 index 000000000000..2ebfa35aa7e6 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_iam_policy.php @@ -0,0 +1,72 @@ +setResource($resource); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $networkSecurityClient->getIamPolicy($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + + get_iam_policy_sample($resource); +} +// [END networksecurity_v1_generated_NetworkSecurity_GetIamPolicy_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_location.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_location.php new file mode 100644 index 000000000000..db5c0113c76a --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_location.php @@ -0,0 +1,57 @@ +getLocation($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END networksecurity_v1_generated_NetworkSecurity_GetLocation_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_server_tls_policy.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_server_tls_policy.php new file mode 100644 index 000000000000..0a41bea6cc98 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_server_tls_policy.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var ServerTlsPolicy $response */ + $response = $networkSecurityClient->getServerTlsPolicy($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NetworkSecurityClient::serverTlsPolicyName( + '[PROJECT]', + '[LOCATION]', + '[SERVER_TLS_POLICY]' + ); + + get_server_tls_policy_sample($formattedName); +} +// [END networksecurity_v1_generated_NetworkSecurity_GetServerTlsPolicy_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_authorization_policies.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_authorization_policies.php new file mode 100644 index 000000000000..700bff4f8071 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_authorization_policies.php @@ -0,0 +1,78 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $networkSecurityClient->listAuthorizationPolicies($request); + + /** @var AuthorizationPolicy $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = NetworkSecurityClient::locationName('[PROJECT]', '[LOCATION]'); + + list_authorization_policies_sample($formattedParent); +} +// [END networksecurity_v1_generated_NetworkSecurity_ListAuthorizationPolicies_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_client_tls_policies.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_client_tls_policies.php new file mode 100644 index 000000000000..6a7041b1cdeb --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_client_tls_policies.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $networkSecurityClient->listClientTlsPolicies($request); + + /** @var ClientTlsPolicy $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = NetworkSecurityClient::locationName('[PROJECT]', '[LOCATION]'); + + list_client_tls_policies_sample($formattedParent); +} +// [END networksecurity_v1_generated_NetworkSecurity_ListClientTlsPolicies_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_locations.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_locations.php new file mode 100644 index 000000000000..cda36ef56eea --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_locations.php @@ -0,0 +1,62 @@ +listLocations($request); + + /** @var Location $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END networksecurity_v1_generated_NetworkSecurity_ListLocations_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_server_tls_policies.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_server_tls_policies.php new file mode 100644 index 000000000000..ae2ed36ab018 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_server_tls_policies.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $networkSecurityClient->listServerTlsPolicies($request); + + /** @var ServerTlsPolicy $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = NetworkSecurityClient::locationName('[PROJECT]', '[LOCATION]'); + + list_server_tls_policies_sample($formattedParent); +} +// [END networksecurity_v1_generated_NetworkSecurity_ListServerTlsPolicies_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/set_iam_policy.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/set_iam_policy.php new file mode 100644 index 000000000000..007d006d4b92 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/set_iam_policy.php @@ -0,0 +1,77 @@ +setResource($resource) + ->setPolicy($policy); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $networkSecurityClient->setIamPolicy($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + + set_iam_policy_sample($resource); +} +// [END networksecurity_v1_generated_NetworkSecurity_SetIamPolicy_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/test_iam_permissions.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/test_iam_permissions.php new file mode 100644 index 000000000000..a80ff52d18ad --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/test_iam_permissions.php @@ -0,0 +1,84 @@ +setResource($resource) + ->setPermissions($permissions); + + // Call the API and handle any network failures. + try { + /** @var TestIamPermissionsResponse $response */ + $response = $networkSecurityClient->testIamPermissions($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + $permissionsElement = '[PERMISSIONS]'; + + test_iam_permissions_sample($resource, $permissionsElement); +} +// [END networksecurity_v1_generated_NetworkSecurity_TestIamPermissions_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/update_authorization_policy.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/update_authorization_policy.php new file mode 100644 index 000000000000..254f14c4f0f9 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/update_authorization_policy.php @@ -0,0 +1,92 @@ +`. + * @param int $authorizationPolicyAction The action to take when a rule match is found. Possible values + * are "ALLOW" or "DENY". + */ +function update_authorization_policy_sample( + string $authorizationPolicyName, + int $authorizationPolicyAction +): void { + // Create a client. + $networkSecurityClient = new NetworkSecurityClient(); + + // Prepare the request message. + $authorizationPolicy = (new AuthorizationPolicy()) + ->setName($authorizationPolicyName) + ->setAction($authorizationPolicyAction); + $request = (new UpdateAuthorizationPolicyRequest()) + ->setAuthorizationPolicy($authorizationPolicy); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $networkSecurityClient->updateAuthorizationPolicy($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var AuthorizationPolicy $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $authorizationPolicyName = '[NAME]'; + $authorizationPolicyAction = Action::ACTION_UNSPECIFIED; + + update_authorization_policy_sample($authorizationPolicyName, $authorizationPolicyAction); +} +// [END networksecurity_v1_generated_NetworkSecurity_UpdateAuthorizationPolicy_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/update_client_tls_policy.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/update_client_tls_policy.php new file mode 100644 index 000000000000..e2578036f7ac --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/update_client_tls_policy.php @@ -0,0 +1,85 @@ +setName($clientTlsPolicyName); + $request = (new UpdateClientTlsPolicyRequest()) + ->setClientTlsPolicy($clientTlsPolicy); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $networkSecurityClient->updateClientTlsPolicy($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var ClientTlsPolicy $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $clientTlsPolicyName = '[NAME]'; + + update_client_tls_policy_sample($clientTlsPolicyName); +} +// [END networksecurity_v1_generated_NetworkSecurity_UpdateClientTlsPolicy_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/update_server_tls_policy.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/update_server_tls_policy.php new file mode 100644 index 000000000000..e0d71e30161f --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/update_server_tls_policy.php @@ -0,0 +1,85 @@ +setName($serverTlsPolicyName); + $request = (new UpdateServerTlsPolicyRequest()) + ->setServerTlsPolicy($serverTlsPolicy); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $networkSecurityClient->updateServerTlsPolicy($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var ServerTlsPolicy $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $serverTlsPolicyName = '[NAME]'; + + update_server_tls_policy_sample($serverTlsPolicyName); +} +// [END networksecurity_v1_generated_NetworkSecurity_UpdateServerTlsPolicy_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/src/V1/Client/NetworkSecurityClient.php b/owl-bot-staging/NetworkSecurity/v1/src/V1/Client/NetworkSecurityClient.php new file mode 100644 index 000000000000..e2149f4d8230 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/src/V1/Client/NetworkSecurityClient.php @@ -0,0 +1,919 @@ + createAuthorizationPolicyAsync(CreateAuthorizationPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface createClientTlsPolicyAsync(CreateClientTlsPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface createServerTlsPolicyAsync(CreateServerTlsPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteAuthorizationPolicyAsync(DeleteAuthorizationPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteClientTlsPolicyAsync(DeleteClientTlsPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteServerTlsPolicyAsync(DeleteServerTlsPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface getAuthorizationPolicyAsync(GetAuthorizationPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface getClientTlsPolicyAsync(GetClientTlsPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface getServerTlsPolicyAsync(GetServerTlsPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface listAuthorizationPoliciesAsync(ListAuthorizationPoliciesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listClientTlsPoliciesAsync(ListClientTlsPoliciesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listServerTlsPoliciesAsync(ListServerTlsPoliciesRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateAuthorizationPolicyAsync(UpdateAuthorizationPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateClientTlsPolicyAsync(UpdateClientTlsPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateServerTlsPolicyAsync(UpdateServerTlsPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) + */ +final class NetworkSecurityClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.networksecurity.v1.NetworkSecurity'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'networksecurity.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'networksecurity.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/network_security_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/network_security_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/network_security_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/network_security_rest_client_config.php', + ], + ], + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Create the default operation client for the service. + * + * @param array $options ClientOptions for the client. + * + * @return OperationsClient + */ + private function createOperationsClient(array $options) + { + // Unset client-specific configuration options + unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); + + if (isset($options['operationsClient'])) { + return $options['operationsClient']; + } + + return new OperationsClient($options); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * authorization_policy resource. + * + * @param string $project + * @param string $location + * @param string $authorizationPolicy + * + * @return string The formatted authorization_policy resource. + */ + public static function authorizationPolicyName(string $project, string $location, string $authorizationPolicy): string + { + return self::getPathTemplate('authorizationPolicy')->render([ + 'project' => $project, + 'location' => $location, + 'authorization_policy' => $authorizationPolicy, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * client_tls_policy resource. + * + * @param string $project + * @param string $location + * @param string $clientTlsPolicy + * + * @return string The formatted client_tls_policy resource. + */ + public static function clientTlsPolicyName(string $project, string $location, string $clientTlsPolicy): string + { + return self::getPathTemplate('clientTlsPolicy')->render([ + 'project' => $project, + 'location' => $location, + 'client_tls_policy' => $clientTlsPolicy, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a location + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted location resource. + */ + public static function locationName(string $project, string $location): string + { + return self::getPathTemplate('location')->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * server_tls_policy resource. + * + * @param string $project + * @param string $location + * @param string $serverTlsPolicy + * + * @return string The formatted server_tls_policy resource. + */ + public static function serverTlsPolicyName(string $project, string $location, string $serverTlsPolicy): string + { + return self::getPathTemplate('serverTlsPolicy')->render([ + 'project' => $project, + 'location' => $location, + 'server_tls_policy' => $serverTlsPolicy, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - authorizationPolicy: projects/{project}/locations/{location}/authorizationPolicies/{authorization_policy} + * - clientTlsPolicy: projects/{project}/locations/{location}/clientTlsPolicies/{client_tls_policy} + * - location: projects/{project}/locations/{location} + * - serverTlsPolicy: projects/{project}/locations/{location}/serverTlsPolicies/{server_tls_policy} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'networksecurity.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Creates a new AuthorizationPolicy in a given project and location. + * + * The async variant is + * {@see NetworkSecurityClient::createAuthorizationPolicyAsync()} . + * + * @example samples/V1/NetworkSecurityClient/create_authorization_policy.php + * + * @param CreateAuthorizationPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createAuthorizationPolicy(CreateAuthorizationPolicyRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateAuthorizationPolicy', $request, $callOptions)->wait(); + } + + /** + * Creates a new ClientTlsPolicy in a given project and location. + * + * The async variant is {@see NetworkSecurityClient::createClientTlsPolicyAsync()} + * . + * + * @example samples/V1/NetworkSecurityClient/create_client_tls_policy.php + * + * @param CreateClientTlsPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createClientTlsPolicy(CreateClientTlsPolicyRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateClientTlsPolicy', $request, $callOptions)->wait(); + } + + /** + * Creates a new ServerTlsPolicy in a given project and location. + * + * The async variant is {@see NetworkSecurityClient::createServerTlsPolicyAsync()} + * . + * + * @example samples/V1/NetworkSecurityClient/create_server_tls_policy.php + * + * @param CreateServerTlsPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createServerTlsPolicy(CreateServerTlsPolicyRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateServerTlsPolicy', $request, $callOptions)->wait(); + } + + /** + * Deletes a single AuthorizationPolicy. + * + * The async variant is + * {@see NetworkSecurityClient::deleteAuthorizationPolicyAsync()} . + * + * @example samples/V1/NetworkSecurityClient/delete_authorization_policy.php + * + * @param DeleteAuthorizationPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteAuthorizationPolicy(DeleteAuthorizationPolicyRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteAuthorizationPolicy', $request, $callOptions)->wait(); + } + + /** + * Deletes a single ClientTlsPolicy. + * + * The async variant is {@see NetworkSecurityClient::deleteClientTlsPolicyAsync()} + * . + * + * @example samples/V1/NetworkSecurityClient/delete_client_tls_policy.php + * + * @param DeleteClientTlsPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteClientTlsPolicy(DeleteClientTlsPolicyRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteClientTlsPolicy', $request, $callOptions)->wait(); + } + + /** + * Deletes a single ServerTlsPolicy. + * + * The async variant is {@see NetworkSecurityClient::deleteServerTlsPolicyAsync()} + * . + * + * @example samples/V1/NetworkSecurityClient/delete_server_tls_policy.php + * + * @param DeleteServerTlsPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteServerTlsPolicy(DeleteServerTlsPolicyRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteServerTlsPolicy', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single AuthorizationPolicy. + * + * The async variant is {@see NetworkSecurityClient::getAuthorizationPolicyAsync()} + * . + * + * @example samples/V1/NetworkSecurityClient/get_authorization_policy.php + * + * @param GetAuthorizationPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return AuthorizationPolicy + * + * @throws ApiException Thrown if the API call fails. + */ + public function getAuthorizationPolicy(GetAuthorizationPolicyRequest $request, array $callOptions = []): AuthorizationPolicy + { + return $this->startApiCall('GetAuthorizationPolicy', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single ClientTlsPolicy. + * + * The async variant is {@see NetworkSecurityClient::getClientTlsPolicyAsync()} . + * + * @example samples/V1/NetworkSecurityClient/get_client_tls_policy.php + * + * @param GetClientTlsPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ClientTlsPolicy + * + * @throws ApiException Thrown if the API call fails. + */ + public function getClientTlsPolicy(GetClientTlsPolicyRequest $request, array $callOptions = []): ClientTlsPolicy + { + return $this->startApiCall('GetClientTlsPolicy', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single ServerTlsPolicy. + * + * The async variant is {@see NetworkSecurityClient::getServerTlsPolicyAsync()} . + * + * @example samples/V1/NetworkSecurityClient/get_server_tls_policy.php + * + * @param GetServerTlsPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ServerTlsPolicy + * + * @throws ApiException Thrown if the API call fails. + */ + public function getServerTlsPolicy(GetServerTlsPolicyRequest $request, array $callOptions = []): ServerTlsPolicy + { + return $this->startApiCall('GetServerTlsPolicy', $request, $callOptions)->wait(); + } + + /** + * Lists AuthorizationPolicies in a given project and location. + * + * The async variant is + * {@see NetworkSecurityClient::listAuthorizationPoliciesAsync()} . + * + * @example samples/V1/NetworkSecurityClient/list_authorization_policies.php + * + * @param ListAuthorizationPoliciesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listAuthorizationPolicies(ListAuthorizationPoliciesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListAuthorizationPolicies', $request, $callOptions); + } + + /** + * Lists ClientTlsPolicies in a given project and location. + * + * The async variant is {@see NetworkSecurityClient::listClientTlsPoliciesAsync()} + * . + * + * @example samples/V1/NetworkSecurityClient/list_client_tls_policies.php + * + * @param ListClientTlsPoliciesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listClientTlsPolicies(ListClientTlsPoliciesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListClientTlsPolicies', $request, $callOptions); + } + + /** + * Lists ServerTlsPolicies in a given project and location. + * + * The async variant is {@see NetworkSecurityClient::listServerTlsPoliciesAsync()} + * . + * + * @example samples/V1/NetworkSecurityClient/list_server_tls_policies.php + * + * @param ListServerTlsPoliciesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listServerTlsPolicies(ListServerTlsPoliciesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListServerTlsPolicies', $request, $callOptions); + } + + /** + * Updates the parameters of a single AuthorizationPolicy. + * + * The async variant is + * {@see NetworkSecurityClient::updateAuthorizationPolicyAsync()} . + * + * @example samples/V1/NetworkSecurityClient/update_authorization_policy.php + * + * @param UpdateAuthorizationPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateAuthorizationPolicy(UpdateAuthorizationPolicyRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateAuthorizationPolicy', $request, $callOptions)->wait(); + } + + /** + * Updates the parameters of a single ClientTlsPolicy. + * + * The async variant is {@see NetworkSecurityClient::updateClientTlsPolicyAsync()} + * . + * + * @example samples/V1/NetworkSecurityClient/update_client_tls_policy.php + * + * @param UpdateClientTlsPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateClientTlsPolicy(UpdateClientTlsPolicyRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateClientTlsPolicy', $request, $callOptions)->wait(); + } + + /** + * Updates the parameters of a single ServerTlsPolicy. + * + * The async variant is {@see NetworkSecurityClient::updateServerTlsPolicyAsync()} + * . + * + * @example samples/V1/NetworkSecurityClient/update_server_tls_policy.php + * + * @param UpdateServerTlsPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateServerTlsPolicy(UpdateServerTlsPolicyRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateServerTlsPolicy', $request, $callOptions)->wait(); + } + + /** + * Gets information about a location. + * + * The async variant is {@see NetworkSecurityClient::getLocationAsync()} . + * + * @example samples/V1/NetworkSecurityClient/get_location.php + * + * @param GetLocationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Location + * + * @throws ApiException Thrown if the API call fails. + */ + public function getLocation(GetLocationRequest $request, array $callOptions = []): Location + { + return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * The async variant is {@see NetworkSecurityClient::listLocationsAsync()} . + * + * @example samples/V1/NetworkSecurityClient/list_locations.php + * + * @param ListLocationsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListLocations', $request, $callOptions); + } + + /** + * Gets the access control policy for a resource. Returns an empty policy + if the resource exists and does not have a policy set. + * + * The async variant is {@see NetworkSecurityClient::getIamPolicyAsync()} . + * + * @example samples/V1/NetworkSecurityClient/get_iam_policy.php + * + * @param GetIamPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * Sets the access control policy on the specified resource. Replaces + any existing policy. + + Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` + errors. + * + * The async variant is {@see NetworkSecurityClient::setIamPolicyAsync()} . + * + * @example samples/V1/NetworkSecurityClient/set_iam_policy.php + * + * @param SetIamPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * Returns permissions that a caller has on the specified resource. If the + resource does not exist, this will return an empty set of + permissions, not a `NOT_FOUND` error. + + Note: This operation is designed to be used for building + permission-aware UIs and command-line tools, not for authorization + checking. This operation may "fail open" without warning. + * + * The async variant is {@see NetworkSecurityClient::testIamPermissionsAsync()} . + * + * @example samples/V1/NetworkSecurityClient/test_iam_permissions.php + * + * @param TestIamPermissionsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return TestIamPermissionsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse + { + return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/NetworkSecurity/v1/src/V1/gapic_metadata.json b/owl-bot-staging/NetworkSecurity/v1/src/V1/gapic_metadata.json new file mode 100644 index 000000000000..b76db28952f1 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/src/V1/gapic_metadata.json @@ -0,0 +1,118 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.cloud.networksecurity.v1", + "libraryPackage": "Google\\Cloud\\NetworkSecurity\\V1", + "services": { + "NetworkSecurity": { + "clients": { + "grpc": { + "libraryClient": "NetworkSecurityGapicClient", + "rpcs": { + "CreateAuthorizationPolicy": { + "methods": [ + "createAuthorizationPolicy" + ] + }, + "CreateClientTlsPolicy": { + "methods": [ + "createClientTlsPolicy" + ] + }, + "CreateServerTlsPolicy": { + "methods": [ + "createServerTlsPolicy" + ] + }, + "DeleteAuthorizationPolicy": { + "methods": [ + "deleteAuthorizationPolicy" + ] + }, + "DeleteClientTlsPolicy": { + "methods": [ + "deleteClientTlsPolicy" + ] + }, + "DeleteServerTlsPolicy": { + "methods": [ + "deleteServerTlsPolicy" + ] + }, + "GetAuthorizationPolicy": { + "methods": [ + "getAuthorizationPolicy" + ] + }, + "GetClientTlsPolicy": { + "methods": [ + "getClientTlsPolicy" + ] + }, + "GetServerTlsPolicy": { + "methods": [ + "getServerTlsPolicy" + ] + }, + "ListAuthorizationPolicies": { + "methods": [ + "listAuthorizationPolicies" + ] + }, + "ListClientTlsPolicies": { + "methods": [ + "listClientTlsPolicies" + ] + }, + "ListServerTlsPolicies": { + "methods": [ + "listServerTlsPolicies" + ] + }, + "UpdateAuthorizationPolicy": { + "methods": [ + "updateAuthorizationPolicy" + ] + }, + "UpdateClientTlsPolicy": { + "methods": [ + "updateClientTlsPolicy" + ] + }, + "UpdateServerTlsPolicy": { + "methods": [ + "updateServerTlsPolicy" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/network_security_client_config.json b/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/network_security_client_config.json new file mode 100644 index 000000000000..b5df05cb5c82 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/network_security_client_config.json @@ -0,0 +1,132 @@ +{ + "interfaces": { + "google.cloud.networksecurity.v1.NetworkSecurity": { + "retry_codes": { + "no_retry_codes": [], + "no_retry_1_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "CreateAuthorizationPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateClientTlsPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateServerTlsPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteAuthorizationPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteClientTlsPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteServerTlsPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetAuthorizationPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetClientTlsPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetServerTlsPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListAuthorizationPolicies": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListClientTlsPolicies": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListServerTlsPolicies": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateAuthorizationPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateClientTlsPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateServerTlsPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetLocation": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListLocations": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "SetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "TestIamPermissions": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/network_security_descriptor_config.php b/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/network_security_descriptor_config.php new file mode 100644 index 000000000000..37aaa8d95d71 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/network_security_descriptor_config.php @@ -0,0 +1,377 @@ + [ + 'google.cloud.networksecurity.v1.NetworkSecurity' => [ + 'CreateAuthorizationPolicy' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateClientTlsPolicy' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\ClientTlsPolicy', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateServerTlsPolicy' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteAuthorizationPolicy' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteClientTlsPolicy' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteServerTlsPolicy' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UpdateAuthorizationPolicy' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'authorization_policy.name', + 'fieldAccessors' => [ + 'getAuthorizationPolicy', + 'getName', + ], + ], + ], + ], + 'UpdateClientTlsPolicy' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\ClientTlsPolicy', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'client_tls_policy.name', + 'fieldAccessors' => [ + 'getClientTlsPolicy', + 'getName', + ], + ], + ], + ], + 'UpdateServerTlsPolicy' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy', + 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'server_tls_policy.name', + 'fieldAccessors' => [ + 'getServerTlsPolicy', + 'getName', + ], + ], + ], + ], + 'GetAuthorizationPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetClientTlsPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\NetworkSecurity\V1\ClientTlsPolicy', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetServerTlsPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListAuthorizationPolicies' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getAuthorizationPolicies', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\NetworkSecurity\V1\ListAuthorizationPoliciesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListClientTlsPolicies' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getClientTlsPolicies', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\NetworkSecurity\V1\ListClientTlsPoliciesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListServerTlsPolicies' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getServerTlsPolicies', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\NetworkSecurity\V1\ListServerTlsPoliciesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'GetLocation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Location\Location', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'GetIamPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'SetIamPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'TestIamPermissions' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'templateMap' => [ + 'authorizationPolicy' => 'projects/{project}/locations/{location}/authorizationPolicies/{authorization_policy}', + 'clientTlsPolicy' => 'projects/{project}/locations/{location}/clientTlsPolicies/{client_tls_policy}', + 'location' => 'projects/{project}/locations/{location}', + 'serverTlsPolicy' => 'projects/{project}/locations/{location}/serverTlsPolicies/{server_tls_policy}', + ], + ], + ], +]; diff --git a/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/network_security_rest_client_config.php b/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/network_security_rest_client_config.php new file mode 100644 index 000000000000..0364328337cf --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/network_security_rest_client_config.php @@ -0,0 +1,354 @@ + [ + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.cloud.networksecurity.v1.NetworkSecurity' => [ + 'CreateAuthorizationPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/authorizationPolicies', + 'body' => 'authorization_policy', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'authorization_policy_id', + ], + ], + 'CreateClientTlsPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/clientTlsPolicies', + 'body' => 'client_tls_policy', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'client_tls_policy_id', + ], + ], + 'CreateServerTlsPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/serverTlsPolicies', + 'body' => 'server_tls_policy', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'server_tls_policy_id', + ], + ], + 'DeleteAuthorizationPolicy' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/authorizationPolicies/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteClientTlsPolicy' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/clientTlsPolicies/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteServerTlsPolicy' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/serverTlsPolicies/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetAuthorizationPolicy' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/authorizationPolicies/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetClientTlsPolicy' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/clientTlsPolicies/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetServerTlsPolicy' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/serverTlsPolicies/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListAuthorizationPolicies' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/authorizationPolicies', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListClientTlsPolicies' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/clientTlsPolicies', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListServerTlsPolicies' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/serverTlsPolicies', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateAuthorizationPolicy' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{authorization_policy.name=projects/*/locations/*/authorizationPolicies/*}', + 'body' => 'authorization_policy', + 'placeholders' => [ + 'authorization_policy.name' => [ + 'getters' => [ + 'getAuthorizationPolicy', + 'getName', + ], + ], + ], + ], + 'UpdateClientTlsPolicy' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{client_tls_policy.name=projects/*/locations/*/clientTlsPolicies/*}', + 'body' => 'client_tls_policy', + 'placeholders' => [ + 'client_tls_policy.name' => [ + 'getters' => [ + 'getClientTlsPolicy', + 'getName', + ], + ], + ], + ], + 'UpdateServerTlsPolicy' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{server_tls_policy.name=projects/*/locations/*/serverTlsPolicies/*}', + 'body' => 'server_tls_policy', + 'placeholders' => [ + 'server_tls_policy.name' => [ + 'getters' => [ + 'getServerTlsPolicy', + 'getName', + ], + ], + ], + ], + ], + 'google.iam.v1.IAMPolicy' => [ + 'GetIamPolicy' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authorizationPolicies/*}:getIamPolicy', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/serverTlsPolicies/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientTlsPolicies/*}:getIamPolicy', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'SetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authorizationPolicies/*}:setIamPolicy', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/serverTlsPolicies/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientTlsPolicies/*}:setIamPolicy', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'TestIamPermissions' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authorizationPolicies/*}:testIamPermissions', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/serverTlsPolicies/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientTlsPolicies/*}:testIamPermissions', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/NetworkSecurity/v1/tests/Unit/V1/Client/NetworkSecurityClientTest.php b/owl-bot-staging/NetworkSecurity/v1/tests/Unit/V1/Client/NetworkSecurityClientTest.php new file mode 100644 index 000000000000..d1106085d6f4 --- /dev/null +++ b/owl-bot-staging/NetworkSecurity/v1/tests/Unit/V1/Client/NetworkSecurityClientTest.php @@ -0,0 +1,2113 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return NetworkSecurityClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new NetworkSecurityClient($options); + } + + /** @test */ + public function createAuthorizationPolicyTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createAuthorizationPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $expectedResponse = new AuthorizationPolicy(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createAuthorizationPolicyTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $authorizationPolicyId = 'authorizationPolicyId-730349822'; + $authorizationPolicy = new AuthorizationPolicy(); + $authorizationPolicyName = 'authorizationPolicyName276096054'; + $authorizationPolicy->setName($authorizationPolicyName); + $authorizationPolicyAction = Action::ACTION_UNSPECIFIED; + $authorizationPolicy->setAction($authorizationPolicyAction); + $request = (new CreateAuthorizationPolicyRequest()) + ->setParent($formattedParent) + ->setAuthorizationPolicyId($authorizationPolicyId) + ->setAuthorizationPolicy($authorizationPolicy); + $response = $gapicClient->createAuthorizationPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/CreateAuthorizationPolicy', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getAuthorizationPolicyId(); + $this->assertProtobufEquals($authorizationPolicyId, $actualValue); + $actualValue = $actualApiRequestObject->getAuthorizationPolicy(); + $this->assertProtobufEquals($authorizationPolicy, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createAuthorizationPolicyTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createAuthorizationPolicyExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createAuthorizationPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $authorizationPolicyId = 'authorizationPolicyId-730349822'; + $authorizationPolicy = new AuthorizationPolicy(); + $authorizationPolicyName = 'authorizationPolicyName276096054'; + $authorizationPolicy->setName($authorizationPolicyName); + $authorizationPolicyAction = Action::ACTION_UNSPECIFIED; + $authorizationPolicy->setAction($authorizationPolicyAction); + $request = (new CreateAuthorizationPolicyRequest()) + ->setParent($formattedParent) + ->setAuthorizationPolicyId($authorizationPolicyId) + ->setAuthorizationPolicy($authorizationPolicy); + $response = $gapicClient->createAuthorizationPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createAuthorizationPolicyTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createClientTlsPolicyTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createClientTlsPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $sni = 'sni114030'; + $expectedResponse = new ClientTlsPolicy(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setSni($sni); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createClientTlsPolicyTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $clientTlsPolicyId = 'clientTlsPolicyId244525968'; + $clientTlsPolicy = new ClientTlsPolicy(); + $clientTlsPolicyName = 'clientTlsPolicyName-1176139731'; + $clientTlsPolicy->setName($clientTlsPolicyName); + $request = (new CreateClientTlsPolicyRequest()) + ->setParent($formattedParent) + ->setClientTlsPolicyId($clientTlsPolicyId) + ->setClientTlsPolicy($clientTlsPolicy); + $response = $gapicClient->createClientTlsPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/CreateClientTlsPolicy', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getClientTlsPolicyId(); + $this->assertProtobufEquals($clientTlsPolicyId, $actualValue); + $actualValue = $actualApiRequestObject->getClientTlsPolicy(); + $this->assertProtobufEquals($clientTlsPolicy, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createClientTlsPolicyTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createClientTlsPolicyExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createClientTlsPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $clientTlsPolicyId = 'clientTlsPolicyId244525968'; + $clientTlsPolicy = new ClientTlsPolicy(); + $clientTlsPolicyName = 'clientTlsPolicyName-1176139731'; + $clientTlsPolicy->setName($clientTlsPolicyName); + $request = (new CreateClientTlsPolicyRequest()) + ->setParent($formattedParent) + ->setClientTlsPolicyId($clientTlsPolicyId) + ->setClientTlsPolicy($clientTlsPolicy); + $response = $gapicClient->createClientTlsPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createClientTlsPolicyTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createServerTlsPolicyTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createServerTlsPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $allowOpen = true; + $expectedResponse = new ServerTlsPolicy(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setAllowOpen($allowOpen); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createServerTlsPolicyTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $serverTlsPolicyId = 'serverTlsPolicyId-1952910072'; + $serverTlsPolicy = new ServerTlsPolicy(); + $serverTlsPolicyName = 'serverTlsPolicyName415543221'; + $serverTlsPolicy->setName($serverTlsPolicyName); + $request = (new CreateServerTlsPolicyRequest()) + ->setParent($formattedParent) + ->setServerTlsPolicyId($serverTlsPolicyId) + ->setServerTlsPolicy($serverTlsPolicy); + $response = $gapicClient->createServerTlsPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/CreateServerTlsPolicy', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getServerTlsPolicyId(); + $this->assertProtobufEquals($serverTlsPolicyId, $actualValue); + $actualValue = $actualApiRequestObject->getServerTlsPolicy(); + $this->assertProtobufEquals($serverTlsPolicy, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createServerTlsPolicyTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createServerTlsPolicyExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createServerTlsPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $serverTlsPolicyId = 'serverTlsPolicyId-1952910072'; + $serverTlsPolicy = new ServerTlsPolicy(); + $serverTlsPolicyName = 'serverTlsPolicyName415543221'; + $serverTlsPolicy->setName($serverTlsPolicyName); + $request = (new CreateServerTlsPolicyRequest()) + ->setParent($formattedParent) + ->setServerTlsPolicyId($serverTlsPolicyId) + ->setServerTlsPolicy($serverTlsPolicy); + $response = $gapicClient->createServerTlsPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createServerTlsPolicyTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteAuthorizationPolicyTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteAuthorizationPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteAuthorizationPolicyTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->authorizationPolicyName('[PROJECT]', '[LOCATION]', '[AUTHORIZATION_POLICY]'); + $request = (new DeleteAuthorizationPolicyRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteAuthorizationPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/DeleteAuthorizationPolicy', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteAuthorizationPolicyTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteAuthorizationPolicyExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteAuthorizationPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->authorizationPolicyName('[PROJECT]', '[LOCATION]', '[AUTHORIZATION_POLICY]'); + $request = (new DeleteAuthorizationPolicyRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteAuthorizationPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteAuthorizationPolicyTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteClientTlsPolicyTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteClientTlsPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteClientTlsPolicyTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->clientTlsPolicyName('[PROJECT]', '[LOCATION]', '[CLIENT_TLS_POLICY]'); + $request = (new DeleteClientTlsPolicyRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteClientTlsPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/DeleteClientTlsPolicy', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteClientTlsPolicyTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteClientTlsPolicyExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteClientTlsPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->clientTlsPolicyName('[PROJECT]', '[LOCATION]', '[CLIENT_TLS_POLICY]'); + $request = (new DeleteClientTlsPolicyRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteClientTlsPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteClientTlsPolicyTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteServerTlsPolicyTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteServerTlsPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteServerTlsPolicyTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->serverTlsPolicyName('[PROJECT]', '[LOCATION]', '[SERVER_TLS_POLICY]'); + $request = (new DeleteServerTlsPolicyRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteServerTlsPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/DeleteServerTlsPolicy', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteServerTlsPolicyTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteServerTlsPolicyExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteServerTlsPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->serverTlsPolicyName('[PROJECT]', '[LOCATION]', '[SERVER_TLS_POLICY]'); + $request = (new DeleteServerTlsPolicyRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteServerTlsPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteServerTlsPolicyTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getAuthorizationPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $expectedResponse = new AuthorizationPolicy(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->authorizationPolicyName('[PROJECT]', '[LOCATION]', '[AUTHORIZATION_POLICY]'); + $request = (new GetAuthorizationPolicyRequest()) + ->setName($formattedName); + $response = $gapicClient->getAuthorizationPolicy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/GetAuthorizationPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAuthorizationPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->authorizationPolicyName('[PROJECT]', '[LOCATION]', '[AUTHORIZATION_POLICY]'); + $request = (new GetAuthorizationPolicyRequest()) + ->setName($formattedName); + try { + $gapicClient->getAuthorizationPolicy($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getClientTlsPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $sni = 'sni114030'; + $expectedResponse = new ClientTlsPolicy(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setSni($sni); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->clientTlsPolicyName('[PROJECT]', '[LOCATION]', '[CLIENT_TLS_POLICY]'); + $request = (new GetClientTlsPolicyRequest()) + ->setName($formattedName); + $response = $gapicClient->getClientTlsPolicy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/GetClientTlsPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getClientTlsPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->clientTlsPolicyName('[PROJECT]', '[LOCATION]', '[CLIENT_TLS_POLICY]'); + $request = (new GetClientTlsPolicyRequest()) + ->setName($formattedName); + try { + $gapicClient->getClientTlsPolicy($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getServerTlsPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $allowOpen = true; + $expectedResponse = new ServerTlsPolicy(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setAllowOpen($allowOpen); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->serverTlsPolicyName('[PROJECT]', '[LOCATION]', '[SERVER_TLS_POLICY]'); + $request = (new GetServerTlsPolicyRequest()) + ->setName($formattedName); + $response = $gapicClient->getServerTlsPolicy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/GetServerTlsPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getServerTlsPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->serverTlsPolicyName('[PROJECT]', '[LOCATION]', '[SERVER_TLS_POLICY]'); + $request = (new GetServerTlsPolicyRequest()) + ->setName($formattedName); + try { + $gapicClient->getServerTlsPolicy($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAuthorizationPoliciesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $authorizationPoliciesElement = new AuthorizationPolicy(); + $authorizationPolicies = [ + $authorizationPoliciesElement, + ]; + $expectedResponse = new ListAuthorizationPoliciesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setAuthorizationPolicies($authorizationPolicies); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListAuthorizationPoliciesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listAuthorizationPolicies($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getAuthorizationPolicies()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/ListAuthorizationPolicies', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAuthorizationPoliciesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListAuthorizationPoliciesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listAuthorizationPolicies($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listClientTlsPoliciesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $clientTlsPoliciesElement = new ClientTlsPolicy(); + $clientTlsPolicies = [ + $clientTlsPoliciesElement, + ]; + $expectedResponse = new ListClientTlsPoliciesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setClientTlsPolicies($clientTlsPolicies); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListClientTlsPoliciesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listClientTlsPolicies($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getClientTlsPolicies()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/ListClientTlsPolicies', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listClientTlsPoliciesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListClientTlsPoliciesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listClientTlsPolicies($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listServerTlsPoliciesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $serverTlsPoliciesElement = new ServerTlsPolicy(); + $serverTlsPolicies = [ + $serverTlsPoliciesElement, + ]; + $expectedResponse = new ListServerTlsPoliciesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setServerTlsPolicies($serverTlsPolicies); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListServerTlsPoliciesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listServerTlsPolicies($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getServerTlsPolicies()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/ListServerTlsPolicies', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listServerTlsPoliciesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListServerTlsPoliciesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listServerTlsPolicies($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateAuthorizationPolicyTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateAuthorizationPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $expectedResponse = new AuthorizationPolicy(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateAuthorizationPolicyTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $authorizationPolicy = new AuthorizationPolicy(); + $authorizationPolicyName = 'authorizationPolicyName276096054'; + $authorizationPolicy->setName($authorizationPolicyName); + $authorizationPolicyAction = Action::ACTION_UNSPECIFIED; + $authorizationPolicy->setAction($authorizationPolicyAction); + $request = (new UpdateAuthorizationPolicyRequest()) + ->setAuthorizationPolicy($authorizationPolicy); + $response = $gapicClient->updateAuthorizationPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/UpdateAuthorizationPolicy', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getAuthorizationPolicy(); + $this->assertProtobufEquals($authorizationPolicy, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateAuthorizationPolicyTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateAuthorizationPolicyExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateAuthorizationPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $authorizationPolicy = new AuthorizationPolicy(); + $authorizationPolicyName = 'authorizationPolicyName276096054'; + $authorizationPolicy->setName($authorizationPolicyName); + $authorizationPolicyAction = Action::ACTION_UNSPECIFIED; + $authorizationPolicy->setAction($authorizationPolicyAction); + $request = (new UpdateAuthorizationPolicyRequest()) + ->setAuthorizationPolicy($authorizationPolicy); + $response = $gapicClient->updateAuthorizationPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateAuthorizationPolicyTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateClientTlsPolicyTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateClientTlsPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $sni = 'sni114030'; + $expectedResponse = new ClientTlsPolicy(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setSni($sni); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateClientTlsPolicyTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $clientTlsPolicy = new ClientTlsPolicy(); + $clientTlsPolicyName = 'clientTlsPolicyName-1176139731'; + $clientTlsPolicy->setName($clientTlsPolicyName); + $request = (new UpdateClientTlsPolicyRequest()) + ->setClientTlsPolicy($clientTlsPolicy); + $response = $gapicClient->updateClientTlsPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/UpdateClientTlsPolicy', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getClientTlsPolicy(); + $this->assertProtobufEquals($clientTlsPolicy, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateClientTlsPolicyTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateClientTlsPolicyExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateClientTlsPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $clientTlsPolicy = new ClientTlsPolicy(); + $clientTlsPolicyName = 'clientTlsPolicyName-1176139731'; + $clientTlsPolicy->setName($clientTlsPolicyName); + $request = (new UpdateClientTlsPolicyRequest()) + ->setClientTlsPolicy($clientTlsPolicy); + $response = $gapicClient->updateClientTlsPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateClientTlsPolicyTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateServerTlsPolicyTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateServerTlsPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $allowOpen = true; + $expectedResponse = new ServerTlsPolicy(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setAllowOpen($allowOpen); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateServerTlsPolicyTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $serverTlsPolicy = new ServerTlsPolicy(); + $serverTlsPolicyName = 'serverTlsPolicyName415543221'; + $serverTlsPolicy->setName($serverTlsPolicyName); + $request = (new UpdateServerTlsPolicyRequest()) + ->setServerTlsPolicy($serverTlsPolicy); + $response = $gapicClient->updateServerTlsPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/UpdateServerTlsPolicy', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getServerTlsPolicy(); + $this->assertProtobufEquals($serverTlsPolicy, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateServerTlsPolicyTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateServerTlsPolicyExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateServerTlsPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $serverTlsPolicy = new ServerTlsPolicy(); + $serverTlsPolicyName = 'serverTlsPolicyName415543221'; + $serverTlsPolicy->setName($serverTlsPolicyName); + $request = (new UpdateServerTlsPolicyRequest()) + ->setServerTlsPolicy($serverTlsPolicy); + $response = $gapicClient->updateServerTlsPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateServerTlsPolicyTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getLocationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $locationId = 'locationId552319461'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Location(); + $expectedResponse->setName($name2); + $expectedResponse->setLocationId($locationId); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + $request = new GetLocationRequest(); + $response = $gapicClient->getLocation($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new GetLocationRequest(); + try { + $gapicClient->getLocation($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $locationsElement = new Location(); + $locations = [ + $locationsElement, + ]; + $expectedResponse = new ListLocationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setLocations($locations); + $transport->addResponse($expectedResponse); + $request = new ListLocationsRequest(); + $response = $gapicClient->listLocations($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new ListLocationsRequest(); + try { + $gapicClient->listLocations($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $request = (new GetIamPolicyRequest()) + ->setResource($resource); + $response = $gapicClient->getIamPolicy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $request = (new GetIamPolicyRequest()) + ->setResource($resource); + try { + $gapicClient->getIamPolicy($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $request = (new SetIamPolicyRequest()) + ->setResource($resource) + ->setPolicy($policy); + $response = $gapicClient->setIamPolicy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPolicy(); + $this->assertProtobufEquals($policy, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $request = (new SetIamPolicyRequest()) + ->setResource($resource) + ->setPolicy($policy); + try { + $gapicClient->setIamPolicy($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new TestIamPermissionsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $request = (new TestIamPermissionsRequest()) + ->setResource($resource) + ->setPermissions($permissions); + $response = $gapicClient->testIamPermissions($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPermissions(); + $this->assertProtobufEquals($permissions, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $request = (new TestIamPermissionsRequest()) + ->setResource($resource) + ->setPermissions($permissions); + try { + $gapicClient->testIamPermissions($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createAuthorizationPolicyAsyncTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createAuthorizationPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $expectedResponse = new AuthorizationPolicy(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createAuthorizationPolicyTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $authorizationPolicyId = 'authorizationPolicyId-730349822'; + $authorizationPolicy = new AuthorizationPolicy(); + $authorizationPolicyName = 'authorizationPolicyName276096054'; + $authorizationPolicy->setName($authorizationPolicyName); + $authorizationPolicyAction = Action::ACTION_UNSPECIFIED; + $authorizationPolicy->setAction($authorizationPolicyAction); + $request = (new CreateAuthorizationPolicyRequest()) + ->setParent($formattedParent) + ->setAuthorizationPolicyId($authorizationPolicyId) + ->setAuthorizationPolicy($authorizationPolicy); + $response = $gapicClient->createAuthorizationPolicyAsync($request)->wait(); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/CreateAuthorizationPolicy', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getAuthorizationPolicyId(); + $this->assertProtobufEquals($authorizationPolicyId, $actualValue); + $actualValue = $actualApiRequestObject->getAuthorizationPolicy(); + $this->assertProtobufEquals($authorizationPolicy, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createAuthorizationPolicyTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } +} diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/GPBMetadata/Google/Cloud/Networkservices/V1/Common.php b/owl-bot-staging/NetworkServices/v1/proto/src/GPBMetadata/Google/Cloud/Networkservices/V1/Common.php new file mode 100644 index 0000000000000000000000000000000000000000..ced22555a28e0bda23dd6e53811e2908d4937469 GIT binary patch literal 1930 zcmcIl+iu%N5RD|qiC3-TFhL@yD6*9UL8zeCpyz5FsBAY2?s=3QBzXlgwuqPl+FabiHajjRRLu7U0C;FmR!{ zg;UJL_F>3m{<}D5HBL$*%V7@!0X!hS-Gj*GG!%@FrKw@eKoo^czBIS8un8QU;%3Ux zFs_i?#e&ChK03x6M9hO7#XA8wE&ka{YG#Ji-lO1q9XKHi%D7>iWpxI!%(Y0&qOvK1 z%){lrsvu9kqgnc<=M~xRNo_O>ehJ%0==~ac{BJ~|JxHx}B_aKig!Dzbo*A^1hGZvN zA}5^6s_{!1-98KxCCjens?wgJs>?yD+ez$eC0uG&x9fTqEeF$!>^qge%!<}VHzDv+ zm-0Vzxr0^(;Zg;)igZ{@ac-lP1@K92;HwyR07P@0`GM!R)%(yrLA6%(VO+(j1`5wva zD=D*5nFlN}uq;hq53X6W8LyN!-dCg3~s^du`=KQG(onxtPs)blnB6SOSM z^K13rE9maBBkk7``g$1!M_x5~?t=DZIl6U`NK`A!>Q%R`{~>f# z@1pe!1&Or#2&Fwprlm?-X{xNr_NNC6;>RFaWoj!oD5_roQ3WqDdV;n_eaq~bmgx-5 zPJif(Oso6c>Ao0P{TBn%`QhMb-0u$d2L0Z~HSJ5ZmY$mjFE>i(UWdbta%UZVk!iyb z??UK&ETK&~@1Lgp-{sUw$h;*jGzL zS4%|CmdH`Ii1g$3AGw8{?U{Vh16vi+Vj$vE^GK}N)WL3?Mr;m!k_c$Hn S=cfK=C%&>w=kh5!Md%Y%t$Vuw literal 0 HcmV?d00001 diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/GPBMetadata/Google/Cloud/Networkservices/V1/Dep.php b/owl-bot-staging/NetworkServices/v1/proto/src/GPBMetadata/Google/Cloud/Networkservices/V1/Dep.php new file mode 100644 index 0000000000000000000000000000000000000000..42c11411c28f82972ec10af861f1f0e4e725d52b GIT binary patch literal 9040 zcmeHN&2QVt6))x3vB%v+nS5C5O=7N+MI0lMU}cLm%6hl7r8q`q*_9Pzw-8ED)W~K- zlU$Or*A0AVfue`)t>>Ql1#D5EK)dKa&_m%KT67N!!2I*DzS*G`J^G&4`qLs$c}6Kwr-npz13_ISJv%4 z$1sVTk>$dMT;8b4#ll+kbujhpmaCJzykpxtCduli-D+el;vd-VQ;)d&hEBZf{$jR4 zoJ`;qAxqmMo}=kRUfonqpZtMZvbbeEuY+6BoS%Lb0E7mI2u_THXt4L*Izwszc>Wf|5^ZNs5SG91VucM2_L zJNVS0DQtRi&+!jOFb(!(tGP z@WR|z5F%m?UTRDp1IG`BbsWwU_?*3q&UH?OUqk0~Vyff=2R5CC+ZN&Mza=ykdWeJI z3YyYd{;usB{$UV%0F8t%p|iYn!oowq)=<)GIgaf@omR;{FxN|+fw<1)7W&6UhgT0B zLIaU-7M-P=X1Dy*cmVmU!h_hTBXo*gO_l+XHx=X30KjCsnv|v#-+i%WOB~xB}CEo#?)oea8Pf z%9^&$%60ac_!Ay>@exeSy6Q8QLMn6NI$F3GGd732AEtjJq3b2X^SjsORml4-D28|q zO*onhNyr7_0qoPilzVuDP$3r`ZHK5Hw7Ef=j5CtWAQU|J?Wd5Wp>Rm}BARF#CbX^~ z7hFvwd>KvJE+nj4KMXX0r|b_TG}ki}&w&P$;0n+y1~3moqbhq(Fk*<5!87Q*1<SdT!f^oI#Fw-TsQ_uh)hPH}5* zqM0~kRiklI9ujyPU5XnOZ24&Lv*eyb$Ype;6Edz$L%I0#cYpWkWMWcE{~pNkBv9Ml zXq*T#Z72e^#|d)Sm@@A63W+rYqcAEiB$g8$A$?staw|6&P;tRM-7EtVfavHY=wqL(dv2il5d zC*Zg|c&Y5PWQEeD>})TS7t9D_y<9T-DE(^*U1fD8;!~*TYNSBk4+`WW9y+}LYI*#= zgs$}ngBQm#g0?}8fFw%e;?U_aWMS0NY)}|GK^7PnJCuYYJT!sQ-%OxuqA12sbZVQK z4qA-}nvrr?LC}*$5$DBlc);W8MocL@1|o=37>~hdg)lxCRt8Ten3y8?9SBAg!T4ZK zhdF%<;KC2-ky)Ho@hrMh+%A@@YW2O%qWYw~wOL$Qd$d+8BtHjz;rUAOD^H4BRrPUE zDHJPPNeL&>=f%V2jlz4$1QgF?rMR`ZQQj(sJU5oUGzn7_q?V8xYw#&mzcx#>hSUOf}w_>kkE`+1R?=jDn zdu-e8#GN%_AA&9i0Bxj4-S&L!!3KW}unDmp0k&SI1H$&J;b4D!mLMb8aBLLUSbU@&|V`Twd=6AV}{K1cCnc$}k97nje6kA{n8XgGz zM-YzK4s8J8h_w^J_P>?xVa~M?G^AY{@8d5Frj4Bi*~7n;(8ZV@4?h&i-}Blf#!3V? zd~1;|v}>Y>=H(j}2_*}P_@e~6B4n-eHSQ01yrGDxj~f0I()x{<<8~Y~vnNvMb{>DI z5Jnye8T@j3v>ndJw6pjpfRoU%p>c{g91y3U4T013ZZz&hmG5i0$3poc!1d9+&agdT zPb^X|By>dxSEtDUjEXlL5UKY^*1P))j4H#X&urybx&HFY@;@k94Y+0RCnw93(3fsfRo|4py3RyL{B8$#^gDL+EpiT&Mo9>&Zunxz*rnkjx7G8YEL@UxV-_*vo7$9*Yq*{=ta&VnmFo!6zdx5^3fp spAY=x^ASh+{PtpfBB)IFZiPQP-(jC*w0*(R^XrXZB>T$Z2pu8xAC@>P!2kdN literal 0 HcmV?d00001 diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/GPBMetadata/Google/Cloud/Networkservices/V1/EndpointPolicy.php b/owl-bot-staging/NetworkServices/v1/proto/src/GPBMetadata/Google/Cloud/Networkservices/V1/EndpointPolicy.php new file mode 100644 index 0000000000000000000000000000000000000000..6d16490baf6516f855ead7843eadb90caae3c517 GIT binary patch literal 3659 zcmb_fO>g5=6eVdpkQX{_4I@GasgF#h=}1#&S~>{16qK(<88wL~O{*!2upH;5HFa!b zzZ5c6V1dK}_!TVqDXiJBW8I%HE3V(O-8f0rq?&GOIrrndbMHI%`pd8FGaEg^C1Mgs zrKF8peN4{?wjGOFnq}ZtuhSt8)~v3r8^jSYF4SnE8h=flq>(n3_ z&9Hjyj7jJZmUHeB=R((ro4MG^5VLJtx=9t=GIXskvJ42BYL~dSsu5h0a}`3>wo27z zi3MxsySjmA;xVxJyWB)Wn#~vW@=>P3Fa|9+jZLlLiTWgPWCtgewt;I630}HW`VexqubPS zWH6PaQ$j;#y*C?A{Ip&;y@NM6MoAh2xreFKBg5G-b_ne`<}SnS1sH@+%?aFPZN0g# z6Qi9YXX=G+Ig)gJs_P&(xz>qa*r~m4DpoUZb-R{1efp4B2EU@Z=XdaJ=+IYG?b?%l zSuHoef_`L`%eLELq4uHAH$rMXq93DwAE4)VYH(qVyNT>xh$Htxyx3a(*pI8)ddBfd z=a*yk>1`?DRsyrWb#MdO#e%lXbiC>-UEt5R@Udh<3mTBb4bp$ShwewOl(2&4y(^lE z;n+qZH}_vQF6^MB<`7T|#q&?a;g{t0s^}jy2rh;d@Vw?cubvH;+xMEA&Pzu347EiJ zH#LvvAkA)&<|aPHD1PyPc^6IU^gSFg;RwyszD-gK0O0<1Zq|6w@C}H>NqL1nRD1Ny za`e|AJC^CoTZqNLt^r7gDlRdI2AY*ZEb7j!Q5)P_2IoWHmvfs!$+jUUXI8(?x^AAI= zZldH+zX(Y*cTW1e^@T;WaG@GK-tP%1{zWYPEfU7tL0Ct)SS`r4aQhP{c^Fe{0`i!#lv!;n9tS~xn6s9vK$kZP_k5)^U7hdeq5|C$EBaHvX^Kx zY#BaFM_VR}KzIT7?>i``o4NF#1{uTBSWm*c;BgSnW5%WqGx{>@GMi1)LHhR?dU&9_ zG?D^L>*V_$h^tUU_iWXH3i#^q9Ms`WHY3akc?BhG^^_p-(2Gac#?ViSPogM2`Sa0huQonOl20a>l;!5n3|IkFczGz&Hv|=MrfJrAj2q zNI&2sAJIymjTsA={s&0UGkJ|d3X;4f($|m>C9ALKZN|Q@@)fi+V!-M!JC{s!(tpCS zj+p*WKGyYk@CFuZs7XU5TnV_~OaRHp(X0jMAY15R0R)Yb$r#^8eRIDqphqC}w>4z$ zgD3{sTQ=p`Hx)kkf~^8(#;G;7Zo@o*jeA5m?AGqso4?{~CAMmdYAMg2kUrX(}aEeDxT(HB#Fh5q>(_91V-84Vs{#VjcFw~Xm5KINYsLtiO3 PexWc+{v9zu1BCtu@jv!t literal 0 HcmV?d00001 diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/GPBMetadata/Google/Cloud/Networkservices/V1/Gateway.php b/owl-bot-staging/NetworkServices/v1/proto/src/GPBMetadata/Google/Cloud/Networkservices/V1/Gateway.php new file mode 100644 index 0000000000000000000000000000000000000000..47966104bb94cfe9dd1bbd42fb30280ea9bcfbfc GIT binary patch literal 2567 zcmbtW!EW0|5Upg%iAHs6vu>mM&}@~UQGl9)(;Nyqb}PxWY9N+XTXv8_06|eJnH5d4 z+?7)`)gSardg*`kD|!wP^xjivmrKT$ZA3wI5wV$}{wJ@+@f(H0rl9;4`c)pjuU9qtA` z5e^5wLn{wSj45pIhXFFMMUu4If)pgAyXSKn`L@^Hq0EWgkOxs4O$}p6c}k@?sXSC+ z1)Mt|l{iPkxRT@+;nA30j7~^I`8e`7W!?f{nm%=}A*~j=-CdV@{W?9h&)pz0j5oJ> z19Fq=Ayt)}+bg9*M%}mBX#R+)Z^uO)aQiI0-dC1jecM%p*ZTdG-(A#WC1phL^8j8i z!TLK1QM((P>r%J+jBfSwjkV7eo*lZ?NO2U4crDSqlr-w1IuP_*XUK%IQ0Udvf+yFF z4a)!K;Fc1zwgNfP6{QTxR0{Qle`;CnGbk|X4J^;~N2R6Yd_j8*MJJ-z1eO3SW${h% z(VDLAl0?%}as`_78i&|t%4=ahuRU1w>>l-4DMuDC%;O}?O_b^CLi$tbX8Jsuhy*fP z35tEyG1zpad~%_T_C4hIB&4N9Jo@O-`rIKp=p?Z7ng;nWh&U@1G0S{R-=~mgPJpnt zWu!%Mt%RN{{I{fvbs946N|a)Zwi9Qaw$pUf|&P3w%6F9;eCB#j{~N zF{kC<;ghE>;|hu$(qG2dfZ8@JhIT}KuH>g9SO3*2+Po>PKq0h;)M7Yur5;5^Kpyd6 zME#ObTcJFH)yvUYh$&OefZHlVh6xCnRp!-zb_YK8>95?n5KJ^gq5LDPG;tuuH%~75 zGd)&eo(ut?e+;xi6>A>m^^(dz^*}PX->aR0!4;$odlBs{FqPE4C zyq)=JKb~R9Hvn5~7+hIiu>Ej0<{Tq7et*0J(?Wuo2&pqeTdrp13D+%#6u?rVG+I_!$@Ap1;AI&>m2X4r9 zVi8xRM3;AZGVK!CacydAwkhxU?KW{`&E9hilek4$Ufht^H@4*3;>y;?DC*h1tC6zY zvF(mYN}6f=ddVX6rS0x|#N9VE;+6JiN*&kH6xa4CDROWCOWh-$qiRI1H>zuds=7+m zR-NOt78p)z{U}cB*~}b(W~!bi*AcJD;NUgL_~-aLrlH9mRVn_vX?TiZ8Prfs<9jsg zvD{WokD&C)y=~vps9{?&6WFjcQn(`vOt$x?VRO)*Hmx!f5>hb7(`Uv zb557#-n;k22z*u1^~g0#7|(@>Oh)Z(`1?b+KWHFJ*M&rphko%`=oj~Aa@PV#)iFwL zz_3Vy+(*F@PYH~wk{-|)tcPh8t+$zTl|3XY*b$swigwVD5wRiv<7G%k$s%2XVU~B< zgq$d(t3&@(lF~G!Jz};M)3A24ZkS z!AuUMhWe9w3L~bvLrgC_EDzx^Uxde;MQSlJskq7oYZi5TOofD$g^V8LBnD(Q6`GV_ zrgm+Q^2(DP!IJ_C=3oTFs7t(Tnt%KhVcu14!HwhI6vm??y&{&x(i#d$U%^-h?R}~C zyex3>A{Q^fC+`uj3o&UKQm${}>7(5EhXWYTOJEa)xi52Xl90ht+O_pHm1Lxof`l+hEm)@2tn;N80UpNsO&r_0uGUNzO=`W&oajcD>6)Ksz(%$SRR(-eS%I- z6vjB>@`X2vM1CHI*%{ImnA&>Ls43g)n~mDS%F;@0aq5DUhE(l&WnpWIIZ$fW>f5W8 zrc!&}Xx272S2otClGRIaQ8{`>?#~2dmWiqp_q21*CLhs=a{I+5l;C8eVac zf$_*@(CUuu3SBd^=Z3B@uw`a#jzWqbBt3vk+jvEEC2qvE(1@r|haFldb``)OIJsF= z?TF%@;;_|87*}F&)d|QbhdXm<5Z8fK*)FAy!loJDDAtXoaw{=#y|lc&PnEqx8+ zu>cXGgXK^xpn2d)I!w1&OyRg01eN0OsNz*1Gdmypp^r{>S}=)IN-)ZrFwVQ!BUm3k z+r2^nEfqus%8YTTLE37Jb`F{QB?0NE-AGSibdR+d#zhqn!B9`lJg+AF;d zejSudTjM1TzlA>!_=Sh-hF^JOblGj?Apb)GK3Fw88VxXBlYHl6*}_3$#8F+$NS;jT z>U~}s?@IkEcL~xCrnBPVrAJgpNy0p5pQw#hRCK1i3)9Cn@ElAfBFzU)oa-8T_HO^4 zm9D}?i@c&r>`YE|ej6^=@nRJ67~1^g$UGWY+`l{We8Ms>WFJ_o=P-?p zg-~)rsdIX(`fmbmV4HtmJXI&7lN;>1-AH`1Cdy}U`Czkm$3F4QfO9#%G#pE1XJ_uj zmtT|D>-?RexWL{SitFN?A(%0|;*v literal 0 HcmV?d00001 diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/GPBMetadata/Google/Cloud/Networkservices/V1/HttpRoute.php b/owl-bot-staging/NetworkServices/v1/proto/src/GPBMetadata/Google/Cloud/Networkservices/V1/HttpRoute.php new file mode 100644 index 0000000000000000000000000000000000000000..0953f461d643b9f753622093ef5e65d24de80fb5 GIT binary patch literal 6027 zcmb_g&2!t<5f3R-78kNCL$*w@ZGy^4t*8xYF=?lzYbz8|h|^kwgUn z=mV&aW;E03q5nWyZhVS zx4&NY`#wC-)`&}}5fV$=JJG^E(R}KKp6NN--k{qhR5QH;-*yNsXj-kIZ8zFly|&T* zF^UG>fSRPN^*pcVkfP~$1FPtg@W`Y40ilPsNrK|xQn4R~zD~VCND3Srz%>p?;2S2< z)|x9@Bs44|G&*Y>r&DD(o$a$Yo##uB0ZhjT0&N}fS_}?80S*88gFVMKwIDP?{O@f$ z&~4WaZNstujMsXibqyyVD1C8nci@_#?YSBgXt*X>cvlmcZ13B?hh})9MT#|>vq9x5Jzelu+zjv8)^#e4P+#ydd#yi5uB4We* zf8T^`OcwPH++e)RrL@#Sc4h4AN?M(TY(Si@?%3{rPKnmX)Ep?53~lslE**VIsULu1 zQiAzHXNTp+@QYH)7o;5`O$xDZ*g0cNYTzTsrPPh&I1b8$eQ8q8U*Ul> zF5@i4^(#C)1B%^qJxX-b2uO}=rLMtEVbOpSELkv*cuM^Urq5k23hAc_e1D1cnTwiu zd2Wup4hq)X&~|yjK{8LuMnfM-ZHq4}ormxaYg|~*aV`t280J0(z>a88SWF!eyVnmz zMCAWA1`{n}*_4c`osqN{@t`x2eI1XBwJAiIn2Ays0f88tKW z|46~)8PFfWT&up*Y;5n;^=hM5*LSyfn)T|&>PEdb{f3I4w;IpuHN9DHZB@4G+wIMd z^;&(kvb))yPN`YQtTuMHYtw1uU3RBl*BkBidTV+Nl~vpIt!ATDX??7>u!n5btL^C< zY(0h=u4nT9NyFV$W8j1v?jO+?ScjS(ws|LN8!{Ggj1%q*rBqK~#>?;uH3r5|jXksv z4}<>$YK4L2pFu{z7eK*WNi2O-^|?s(xNb(Rl&S*w1iNcDGU zgFxoB%OpNc!<1yHXW7_5P_+SL0b#k2m9CXYfoqhmvp9tv67n*}01b=f)7J#V22B7W zBPluX4jFy0=3_peh!4Z$y-$Savn;V68qPqNCtFVcGR5}BIIr5f46xhUYzeBWKY$s| z>2nO`$(9uwnFj=~Ip6a>C@q4OT*hS%rmn2Qw{#qz=L@n^N}b;EZ_2+qEbwN?s&sOGa{P{>v0V z)uVyL#HP#;iqg5N!)%x3IDE0nB&Yk_ zr@THZrR4;mmnAp#1>C11Vx)2P1DOf1;4`&c>-lexV;EBBZ{%uP)b)*jD?9{vGhZh3nU@aXioS8+>6YAz!@947dUK^ z-sm#oqmfLcY6Qw&a7rnOk%mOif0lx5{G?D<8TatrfRq-cA_?k9|GEm}_y&m{k;(Wr z!ruIQpp3koSQG!h>Ok53rm_zUuXxbK&oXrx3ozqfQ2a#xIxRY$$(u}Ei+-N+Q5IJV zS9uAhEW@16|0MRDI zJ3l=$X^=O*zB}f>NWpBCPZ?r+M$oTs&OG+?@jz0y#Y<4mL#hD7Z?YUGFcg1?&;K2@ z-{sSe3)&CoAZ&~y3-!h6Njw!3GlH{PiE5KrtB+t7J5hYpUQp^ay|waf3LfBF>s9fz zG8LcPWP{XZ>cy65JLT|*jc9t_g#j{-Z*Ycuj>`Vt;|nYQOux0pC&+~=n;;jq#ROSC z^n$|krLUqL9XVuNzV(Ia+%|l%jbZ~<>yO#internalAddGeneratedFile( + ' +÷ +*google/cloud/networkservices/v1/mesh.protogoogle.cloud.networkservices.v1google/api/resource.proto google/protobuf/field_mask.protogoogle/protobuf/timestamp.proto"¯ +Mesh +name ( BàA + self_link ( BàA4 + create_time ( 2.google.protobuf.TimestampBàA4 + update_time ( 2.google.protobuf.TimestampBàAF +labels ( 21.google.cloud.networkservices.v1.Mesh.LabelsEntryBàA + description ( BàA +interception_port (BàA- + LabelsEntry +key (  +value ( :8:_êA\\ +#networkservices.googleapis.com/Mesh5projects/{project}/locations/{location}/meshes/{mesh}"w +ListMeshesRequest; +parent ( B+àAúA%#networkservices.googleapis.com/Mesh + page_size ( + +page_token ( "d +ListMeshesResponse5 +meshes ( 2%.google.cloud.networkservices.v1.Mesh +next_page_token ( "K +GetMeshRequest9 +name ( B+àAúA% +#networkservices.googleapis.com/Mesh"  +CreateMeshRequest; +parent ( B+àAúA%#networkservices.googleapis.com/Mesh +mesh_id ( BàA8 +mesh ( 2%.google.cloud.networkservices.v1.MeshBàA"ƒ +UpdateMeshRequest4 + update_mask ( 2.google.protobuf.FieldMaskBàA8 +mesh ( 2%.google.cloud.networkservices.v1.MeshBàA"N +DeleteMeshRequest9 +name ( B+àAúA% +#networkservices.googleapis.com/MeshBê +#com.google.cloud.networkservices.v1B MeshProtoPZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespbªGoogle.Cloud.NetworkServices.V1ÊGoogle\\Cloud\\NetworkServices\\V1ê"Google::Cloud::NetworkServices::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/GPBMetadata/Google/Cloud/Networkservices/V1/NetworkServices.php b/owl-bot-staging/NetworkServices/v1/proto/src/GPBMetadata/Google/Cloud/Networkservices/V1/NetworkServices.php new file mode 100644 index 000000000000..40934b680b86 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/GPBMetadata/Google/Cloud/Networkservices/V1/NetworkServices.php @@ -0,0 +1,110 @@ +internalAddGeneratedFile( + ' +¬N +6google/cloud/networkservices/v1/network_services.protogoogle.cloud.networkservices.v1google/api/client.proto5google/cloud/networkservices/v1/endpoint_policy.proto-google/cloud/networkservices/v1/gateway.proto0google/cloud/networkservices/v1/grpc_route.proto0google/cloud/networkservices/v1/http_route.proto*google/cloud/networkservices/v1/mesh.proto5google/cloud/networkservices/v1/service_binding.proto/google/cloud/networkservices/v1/tcp_route.proto/google/cloud/networkservices/v1/tls_route.proto#google/longrunning/operations.proto2™H +NetworkServicesÚ +ListEndpointPolicies<.google.cloud.networkservices.v1.ListEndpointPoliciesRequest=.google.cloud.networkservices.v1.ListEndpointPoliciesResponse"EÚAparent‚Óä“64/v1/{parent=projects/*/locations/*}/endpointPoliciesÄ +GetEndpointPolicy9.google.cloud.networkservices.v1.GetEndpointPolicyRequest/.google.cloud.networkservices.v1.EndpointPolicy"CÚAname‚Óä“64/v1/{name=projects/*/locations/*/endpointPolicies/*}µ +CreateEndpointPolicy<.google.cloud.networkservices.v1.CreateEndpointPolicyRequest.google.longrunning.Operation"¿ÊAC +EndpointPolicy1google.cloud.networkservices.v1.OperationMetadataÚA)parent,endpoint_policy,endpoint_policy_id‚Óä“G"4/v1/{parent=projects/*/locations/*}/endpointPolicies:endpoint_policy· +UpdateEndpointPolicy<.google.cloud.networkservices.v1.UpdateEndpointPolicyRequest.google.longrunning.Operation"ÁÊAC +EndpointPolicy1google.cloud.networkservices.v1.OperationMetadataÚAendpoint_policy,update_mask‚Óä“W2D/v1/{endpoint_policy.name=projects/*/locations/*/endpointPolicies/*}:endpoint_policy† +DeleteEndpointPolicy<.google.cloud.networkservices.v1.DeleteEndpointPolicyRequest.google.longrunning.Operation"ÊAJ +google.protobuf.Empty1google.cloud.networkservices.v1.OperationMetadataÚAname‚Óä“6*4/v1/{name=projects/*/locations/*/endpointPolicies/*}º + ListGateways4.google.cloud.networkservices.v1.ListGatewaysRequest5.google.cloud.networkservices.v1.ListGatewaysResponse"=ÚAparent‚Óä“.,/v1/{parent=projects/*/locations/*}/gateways§ + +GetGateway2.google.cloud.networkservices.v1.GetGatewayRequest(.google.cloud.networkservices.v1.Gateway";ÚAname‚Óä“.,/v1/{name=projects/*/locations/*/gateways/*}€ + CreateGateway5.google.cloud.networkservices.v1.CreateGatewayRequest.google.longrunning.Operation"˜ÊA< +Gateway1google.cloud.networkservices.v1.OperationMetadataÚAparent,gateway,gateway_id‚Óä“7",/v1/{parent=projects/*/locations/*}/gateways:gateway‚ + UpdateGateway5.google.cloud.networkservices.v1.UpdateGatewayRequest.google.longrunning.Operation"šÊA< +Gateway1google.cloud.networkservices.v1.OperationMetadataÚAgateway,update_mask‚Óä“?24/v1/{gateway.name=projects/*/locations/*/gateways/*}:gatewayð + DeleteGateway5.google.cloud.networkservices.v1.DeleteGatewayRequest.google.longrunning.Operation"ˆÊAJ +google.protobuf.Empty1google.cloud.networkservices.v1.OperationMetadataÚAname‚Óä“.*,/v1/{name=projects/*/locations/*/gateways/*} +ListGrpcRoutes6.google.cloud.networkservices.v1.ListGrpcRoutesRequest7.google.cloud.networkservices.v1.ListGrpcRoutesResponse"?ÚAparent‚Óä“0./v1/{parent=projects/*/locations/*}/grpcRoutes¯ + GetGrpcRoute4.google.cloud.networkservices.v1.GetGrpcRouteRequest*.google.cloud.networkservices.v1.GrpcRoute"=ÚAname‚Óä“0./v1/{name=projects/*/locations/*/grpcRoutes/*}‘ +CreateGrpcRoute7.google.cloud.networkservices.v1.CreateGrpcRouteRequest.google.longrunning.Operation"¥ÊA> + GrpcRoute1google.cloud.networkservices.v1.OperationMetadataÚAparent,grpc_route,grpc_route_id‚Óä“<"./v1/{parent=projects/*/locations/*}/grpcRoutes: +grpc_route“ +UpdateGrpcRoute7.google.cloud.networkservices.v1.UpdateGrpcRouteRequest.google.longrunning.Operation"§ÊA> + GrpcRoute1google.cloud.networkservices.v1.OperationMetadataÚAgrpc_route,update_mask‚Óä“G29/v1/{grpc_route.name=projects/*/locations/*/grpcRoutes/*}: +grpc_routeö +DeleteGrpcRoute7.google.cloud.networkservices.v1.DeleteGrpcRouteRequest.google.longrunning.Operation"ŠÊAJ +google.protobuf.Empty1google.cloud.networkservices.v1.OperationMetadataÚAname‚Óä“0*./v1/{name=projects/*/locations/*/grpcRoutes/*} +ListHttpRoutes6.google.cloud.networkservices.v1.ListHttpRoutesRequest7.google.cloud.networkservices.v1.ListHttpRoutesResponse"?ÚAparent‚Óä“0./v1/{parent=projects/*/locations/*}/httpRoutes¯ + GetHttpRoute4.google.cloud.networkservices.v1.GetHttpRouteRequest*.google.cloud.networkservices.v1.HttpRoute"=ÚAname‚Óä“0./v1/{name=projects/*/locations/*/httpRoutes/*}‘ +CreateHttpRoute7.google.cloud.networkservices.v1.CreateHttpRouteRequest.google.longrunning.Operation"¥ÊA> + HttpRoute1google.cloud.networkservices.v1.OperationMetadataÚAparent,http_route,http_route_id‚Óä“<"./v1/{parent=projects/*/locations/*}/httpRoutes: +http_route“ +UpdateHttpRoute7.google.cloud.networkservices.v1.UpdateHttpRouteRequest.google.longrunning.Operation"§ÊA> + HttpRoute1google.cloud.networkservices.v1.OperationMetadataÚAhttp_route,update_mask‚Óä“G29/v1/{http_route.name=projects/*/locations/*/httpRoutes/*}: +http_routeö +DeleteHttpRoute7.google.cloud.networkservices.v1.DeleteHttpRouteRequest.google.longrunning.Operation"ŠÊAJ +google.protobuf.Empty1google.cloud.networkservices.v1.OperationMetadataÚAname‚Óä“0*./v1/{name=projects/*/locations/*/httpRoutes/*}¾ + ListTcpRoutes5.google.cloud.networkservices.v1.ListTcpRoutesRequest6.google.cloud.networkservices.v1.ListTcpRoutesResponse">ÚAparent‚Óä“/-/v1/{parent=projects/*/locations/*}/tcpRoutes« + GetTcpRoute3.google.cloud.networkservices.v1.GetTcpRouteRequest).google.cloud.networkservices.v1.TcpRoute"<ÚAname‚Óä“/-/v1/{name=projects/*/locations/*/tcpRoutes/*}Š +CreateTcpRoute6.google.cloud.networkservices.v1.CreateTcpRouteRequest.google.longrunning.Operation" ÊA= +TcpRoute1google.cloud.networkservices.v1.OperationMetadataÚAparent,tcp_route,tcp_route_id‚Óä“:"-/v1/{parent=projects/*/locations/*}/tcpRoutes: tcp_routeŒ +UpdateTcpRoute6.google.cloud.networkservices.v1.UpdateTcpRouteRequest.google.longrunning.Operation"¢ÊA= +TcpRoute1google.cloud.networkservices.v1.OperationMetadataÚAtcp_route,update_mask‚Óä“D27/v1/{tcp_route.name=projects/*/locations/*/tcpRoutes/*}: tcp_routeó +DeleteTcpRoute6.google.cloud.networkservices.v1.DeleteTcpRouteRequest.google.longrunning.Operation"‰ÊAJ +google.protobuf.Empty1google.cloud.networkservices.v1.OperationMetadataÚAname‚Óä“/*-/v1/{name=projects/*/locations/*/tcpRoutes/*}¾ + ListTlsRoutes5.google.cloud.networkservices.v1.ListTlsRoutesRequest6.google.cloud.networkservices.v1.ListTlsRoutesResponse">ÚAparent‚Óä“/-/v1/{parent=projects/*/locations/*}/tlsRoutes« + GetTlsRoute3.google.cloud.networkservices.v1.GetTlsRouteRequest).google.cloud.networkservices.v1.TlsRoute"<ÚAname‚Óä“/-/v1/{name=projects/*/locations/*/tlsRoutes/*}Š +CreateTlsRoute6.google.cloud.networkservices.v1.CreateTlsRouteRequest.google.longrunning.Operation" ÊA= +TlsRoute1google.cloud.networkservices.v1.OperationMetadataÚAparent,tls_route,tls_route_id‚Óä“:"-/v1/{parent=projects/*/locations/*}/tlsRoutes: tls_routeŒ +UpdateTlsRoute6.google.cloud.networkservices.v1.UpdateTlsRouteRequest.google.longrunning.Operation"¢ÊA= +TlsRoute1google.cloud.networkservices.v1.OperationMetadataÚAtls_route,update_mask‚Óä“D27/v1/{tls_route.name=projects/*/locations/*/tlsRoutes/*}: tls_routeó +DeleteTlsRoute6.google.cloud.networkservices.v1.DeleteTlsRouteRequest.google.longrunning.Operation"‰ÊAJ +google.protobuf.Empty1google.cloud.networkservices.v1.OperationMetadataÚAname‚Óä“/*-/v1/{name=projects/*/locations/*/tlsRoutes/*}Ö +ListServiceBindings;.google.cloud.networkservices.v1.ListServiceBindingsRequest<.google.cloud.networkservices.v1.ListServiceBindingsResponse"DÚAparent‚Óä“53/v1/{parent=projects/*/locations/*}/serviceBindingsà +GetServiceBinding9.google.cloud.networkservices.v1.GetServiceBindingRequest/.google.cloud.networkservices.v1.ServiceBinding"BÚAname‚Óä“53/v1/{name=projects/*/locations/*/serviceBindings/*}´ +CreateServiceBinding<.google.cloud.networkservices.v1.CreateServiceBindingRequest.google.longrunning.Operation"¾ÊAC +ServiceBinding1google.cloud.networkservices.v1.OperationMetadataÚA)parent,service_binding,service_binding_id‚Óä“F"3/v1/{parent=projects/*/locations/*}/serviceBindings:service_binding… +DeleteServiceBinding<.google.cloud.networkservices.v1.DeleteServiceBindingRequest.google.longrunning.Operation"ÊAJ +google.protobuf.Empty1google.cloud.networkservices.v1.OperationMetadataÚAname‚Óä“5*3/v1/{name=projects/*/locations/*/serviceBindings/*}² + +ListMeshes2.google.cloud.networkservices.v1.ListMeshesRequest3.google.cloud.networkservices.v1.ListMeshesResponse";ÚAparent‚Óä“,*/v1/{parent=projects/*/locations/*}/meshesœ +GetMesh/.google.cloud.networkservices.v1.GetMeshRequest%.google.cloud.networkservices.v1.Mesh"9ÚAname‚Óä“,*/v1/{name=projects/*/locations/*/meshes/*}ì + +CreateMesh2.google.cloud.networkservices.v1.CreateMeshRequest.google.longrunning.Operation"ŠÊA9 +Mesh1google.cloud.networkservices.v1.OperationMetadataÚAparent,mesh,mesh_id‚Óä“2"*/v1/{parent=projects/*/locations/*}/meshes:meshî + +UpdateMesh2.google.cloud.networkservices.v1.UpdateMeshRequest.google.longrunning.Operation"ŒÊA9 +Mesh1google.cloud.networkservices.v1.OperationMetadataÚAmesh,update_mask‚Óä“72//v1/{mesh.name=projects/*/locations/*/meshes/*}:meshè + +DeleteMesh2.google.cloud.networkservices.v1.DeleteMeshRequest.google.longrunning.Operation"†ÊAJ +google.protobuf.Empty1google.cloud.networkservices.v1.OperationMetadataÚAname‚Óä“,**/v1/{name=projects/*/locations/*/meshes/*}RÊAnetworkservices.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformBß +#com.google.cloud.networkservices.v1PZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespbªGoogle.Cloud.NetworkServices.V1ÊGoogle\\Cloud\\NetworkServices\\V1ê"Google::Cloud::NetworkServices::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/GPBMetadata/Google/Cloud/Networkservices/V1/ServiceBinding.php b/owl-bot-staging/NetworkServices/v1/proto/src/GPBMetadata/Google/Cloud/Networkservices/V1/ServiceBinding.php new file mode 100644 index 000000000000..23a6be8c3ca8 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/GPBMetadata/Google/Cloud/Networkservices/V1/ServiceBinding.php @@ -0,0 +1,59 @@ +internalAddGeneratedFile( + ' +‚ +5google/cloud/networkservices/v1/service_binding.protogoogle.cloud.networkservices.v1google/api/resource.protogoogle/protobuf/timestamp.proto"¿ +ServiceBinding +name ( BàA + description ( BàA4 + create_time ( 2.google.protobuf.TimestampBàA4 + update_time ( 2.google.protobuf.TimestampBàA +service ( BàAP +labels ( 2;.google.cloud.networkservices.v1.ServiceBinding.LabelsEntryBàA- + LabelsEntry +key (  +value ( :8:}êAz +-networkservices.googleapis.com/ServiceBindingIprojects/{project}/locations/{location}/serviceBindings/{service_binding}"Š +ListServiceBindingsRequestE +parent ( B5àAúA/-networkservices.googleapis.com/ServiceBinding + page_size ( + +page_token ( " +ListServiceBindingsResponseI +service_bindings ( 2/.google.cloud.networkservices.v1.ServiceBinding +next_page_token ( "_ +GetServiceBindingRequestC +name ( B5àAúA/ +-networkservices.googleapis.com/ServiceBinding"Ô +CreateServiceBindingRequestE +parent ( B5àAúA/-networkservices.googleapis.com/ServiceBinding +service_binding_id ( BàAM +service_binding ( 2/.google.cloud.networkservices.v1.ServiceBindingBàA"b +DeleteServiceBindingRequestC +name ( B5àAúA/ +-networkservices.googleapis.com/ServiceBindingBô +#com.google.cloud.networkservices.v1BServiceBindingProtoPZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespbªGoogle.Cloud.NetworkServices.V1ÊGoogle\\Cloud\\NetworkServices\\V1ê"Google::Cloud::NetworkServices::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/GPBMetadata/Google/Cloud/Networkservices/V1/TcpRoute.php b/owl-bot-staging/NetworkServices/v1/proto/src/GPBMetadata/Google/Cloud/Networkservices/V1/TcpRoute.php new file mode 100644 index 000000000000..35505dfd4a1c --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/GPBMetadata/Google/Cloud/Networkservices/V1/TcpRoute.php @@ -0,0 +1,85 @@ +internalAddGeneratedFile( + ' +Ë +/google/cloud/networkservices/v1/tcp_route.protogoogle.cloud.networkservices.v1google/api/resource.proto google/protobuf/field_mask.protogoogle/protobuf/timestamp.proto"À +TcpRoute +name ( BàA + self_link ( BàA4 + create_time ( 2.google.protobuf.TimestampBàA4 + update_time ( 2.google.protobuf.TimestampBàA + description ( BàAG +rules ( 23.google.cloud.networkservices.v1.TcpRoute.RouteRuleBàA; +meshes ( B+àAúA% +#networkservices.googleapis.com/Mesh@ +gateways ( B.àAúA( +&networkservices.googleapis.com/GatewayJ +labels + ( 25.google.cloud.networkservices.v1.TcpRoute.LabelsEntryBàA£ + RouteRuleJ +matches ( 24.google.cloud.networkservices.v1.TcpRoute.RouteMatchBàAJ +action ( 25.google.cloud.networkservices.v1.TcpRoute.RouteActionBàA5 + +RouteMatch +address ( BàA +port ( BàA‡ + RouteActionU + destinations ( 2:.google.cloud.networkservices.v1.TcpRoute.RouteDestinationBàA! +original_destination (BàAl +RouteDestinationC + service_name ( B-àAúA\' +%compute.googleapis.com/BackendService +weight (BàA- + LabelsEntry +key (  +value ( :8:kêAh +\'networkservices.googleapis.com/TcpRoute=projects/{project}/locations/{location}/tcpRoutes/{tcp_route}"~ +ListTcpRoutesRequest? +parent ( B/àAúA)\'networkservices.googleapis.com/TcpRoute + page_size ( + +page_token ( "o +ListTcpRoutesResponse= + +tcp_routes ( 2).google.cloud.networkservices.v1.TcpRoute +next_page_token ( "S +GetTcpRouteRequest= +name ( B/àAúA) +\'networkservices.googleapis.com/TcpRoute"¶ +CreateTcpRouteRequest? +parent ( B/àAúA)\'networkservices.googleapis.com/TcpRoute + tcp_route_id ( BàAA + tcp_route ( 2).google.cloud.networkservices.v1.TcpRouteBàA" +UpdateTcpRouteRequest4 + update_mask ( 2.google.protobuf.FieldMaskBàAA + tcp_route ( 2).google.cloud.networkservices.v1.TcpRouteBàA"V +DeleteTcpRouteRequest= +name ( B/àAúA) +\'networkservices.googleapis.com/TcpRouteBã +#com.google.cloud.networkservices.v1B TcpRouteProtoPZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespbªGoogle.Cloud.NetworkServices.V1ÊGoogle\\Cloud\\NetworkServices\\V1ê"Google::Cloud::NetworkServices::V1êAr +%compute.googleapis.com/BackendServiceIprojects/{project}/locations/{location}/backendServices/{backend_service}bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/GPBMetadata/Google/Cloud/Networkservices/V1/TlsRoute.php b/owl-bot-staging/NetworkServices/v1/proto/src/GPBMetadata/Google/Cloud/Networkservices/V1/TlsRoute.php new file mode 100644 index 000000000000..1687a1119d3c --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/GPBMetadata/Google/Cloud/Networkservices/V1/TlsRoute.php @@ -0,0 +1,78 @@ +internalAddGeneratedFile( + ' +¸ +/google/cloud/networkservices/v1/tls_route.protogoogle.cloud.networkservices.v1google/api/resource.proto google/protobuf/field_mask.protogoogle/protobuf/timestamp.proto"¢ +TlsRoute +name ( BàA + self_link ( BàA4 + create_time ( 2.google.protobuf.TimestampBàA4 + update_time ( 2.google.protobuf.TimestampBàA + description ( BàAG +rules ( 23.google.cloud.networkservices.v1.TlsRoute.RouteRuleBàA; +meshes ( B+àAúA% +#networkservices.googleapis.com/Mesh@ +gateways ( B.àAúA( +&networkservices.googleapis.com/Gateway£ + RouteRuleJ +matches ( 24.google.cloud.networkservices.v1.TlsRoute.RouteMatchBàAJ +action ( 25.google.cloud.networkservices.v1.TlsRoute.RouteActionBàA6 + +RouteMatch +sni_host ( BàA +alpn ( BàAd + RouteActionU + destinations ( 2:.google.cloud.networkservices.v1.TlsRoute.RouteDestinationBàAl +RouteDestinationC + service_name ( B-àAúA\' +%compute.googleapis.com/BackendService +weight (BàA:kêAh +\'networkservices.googleapis.com/TlsRoute=projects/{project}/locations/{location}/tlsRoutes/{tls_route}"~ +ListTlsRoutesRequest? +parent ( B/àAúA)\'networkservices.googleapis.com/TlsRoute + page_size ( + +page_token ( "o +ListTlsRoutesResponse= + +tls_routes ( 2).google.cloud.networkservices.v1.TlsRoute +next_page_token ( "S +GetTlsRouteRequest= +name ( B/àAúA) +\'networkservices.googleapis.com/TlsRoute"¶ +CreateTlsRouteRequest? +parent ( B/àAúA)\'networkservices.googleapis.com/TlsRoute + tls_route_id ( BàAA + tls_route ( 2).google.cloud.networkservices.v1.TlsRouteBàA" +UpdateTlsRouteRequest4 + update_mask ( 2.google.protobuf.FieldMaskBàAA + tls_route ( 2).google.cloud.networkservices.v1.TlsRouteBàA"V +DeleteTlsRouteRequest= +name ( B/àAúA) +\'networkservices.googleapis.com/TlsRouteBî +#com.google.cloud.networkservices.v1B TlsRouteProtoPZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespbªGoogle.Cloud.NetworkServices.V1ÊGoogle\\Cloud\\NetworkServices\\V1ê"Google::Cloud::NetworkServices::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/CreateEndpointPolicyRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/CreateEndpointPolicyRequest.php new file mode 100644 index 000000000000..dfa74aa4713d --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/CreateEndpointPolicyRequest.php @@ -0,0 +1,173 @@ +google.cloud.networkservices.v1.CreateEndpointPolicyRequest + */ +class CreateEndpointPolicyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource of the EndpointPolicy. Must be in the + * format `projects/*/locations/global`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Short name of the EndpointPolicy resource to be created. + * E.g. "CustomECS". + * + * Generated from protobuf field string endpoint_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $endpoint_policy_id = ''; + /** + * Required. EndpointPolicy resource to be created. + * + * Generated from protobuf field .google.cloud.networkservices.v1.EndpointPolicy endpoint_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $endpoint_policy = null; + + /** + * @param string $parent Required. The parent resource of the EndpointPolicy. Must be in the + * format `projects/*/locations/global`. Please see + * {@see NetworkServicesClient::locationName()} for help formatting this field. + * @param \Google\Cloud\NetworkServices\V1\EndpointPolicy $endpointPolicy Required. EndpointPolicy resource to be created. + * @param string $endpointPolicyId Required. Short name of the EndpointPolicy resource to be created. + * E.g. "CustomECS". + * + * @return \Google\Cloud\NetworkServices\V1\CreateEndpointPolicyRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\NetworkServices\V1\EndpointPolicy $endpointPolicy, string $endpointPolicyId): self + { + return (new self()) + ->setParent($parent) + ->setEndpointPolicy($endpointPolicy) + ->setEndpointPolicyId($endpointPolicyId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource of the EndpointPolicy. Must be in the + * format `projects/*/locations/global`. + * @type string $endpoint_policy_id + * Required. Short name of the EndpointPolicy resource to be created. + * E.g. "CustomECS". + * @type \Google\Cloud\NetworkServices\V1\EndpointPolicy $endpoint_policy + * Required. EndpointPolicy resource to be created. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\EndpointPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource of the EndpointPolicy. Must be in the + * format `projects/*/locations/global`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource of the EndpointPolicy. Must be in the + * format `projects/*/locations/global`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. Short name of the EndpointPolicy resource to be created. + * E.g. "CustomECS". + * + * Generated from protobuf field string endpoint_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getEndpointPolicyId() + { + return $this->endpoint_policy_id; + } + + /** + * Required. Short name of the EndpointPolicy resource to be created. + * E.g. "CustomECS". + * + * Generated from protobuf field string endpoint_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setEndpointPolicyId($var) + { + GPBUtil::checkString($var, True); + $this->endpoint_policy_id = $var; + + return $this; + } + + /** + * Required. EndpointPolicy resource to be created. + * + * Generated from protobuf field .google.cloud.networkservices.v1.EndpointPolicy endpoint_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetworkServices\V1\EndpointPolicy|null + */ + public function getEndpointPolicy() + { + return $this->endpoint_policy; + } + + public function hasEndpointPolicy() + { + return isset($this->endpoint_policy); + } + + public function clearEndpointPolicy() + { + unset($this->endpoint_policy); + } + + /** + * Required. EndpointPolicy resource to be created. + * + * Generated from protobuf field .google.cloud.networkservices.v1.EndpointPolicy endpoint_policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetworkServices\V1\EndpointPolicy $var + * @return $this + */ + public function setEndpointPolicy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkServices\V1\EndpointPolicy::class); + $this->endpoint_policy = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/CreateGatewayRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/CreateGatewayRequest.php new file mode 100644 index 000000000000..a934d19f6d76 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/CreateGatewayRequest.php @@ -0,0 +1,168 @@ +google.cloud.networkservices.v1.CreateGatewayRequest + */ +class CreateGatewayRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource of the Gateway. Must be in the + * format `projects/*/locations/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Short name of the Gateway resource to be created. + * + * Generated from protobuf field string gateway_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $gateway_id = ''; + /** + * Required. Gateway resource to be created. + * + * Generated from protobuf field .google.cloud.networkservices.v1.Gateway gateway = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $gateway = null; + + /** + * @param string $parent Required. The parent resource of the Gateway. Must be in the + * format `projects/*/locations/*`. Please see + * {@see NetworkServicesClient::locationName()} for help formatting this field. + * @param \Google\Cloud\NetworkServices\V1\Gateway $gateway Required. Gateway resource to be created. + * @param string $gatewayId Required. Short name of the Gateway resource to be created. + * + * @return \Google\Cloud\NetworkServices\V1\CreateGatewayRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\NetworkServices\V1\Gateway $gateway, string $gatewayId): self + { + return (new self()) + ->setParent($parent) + ->setGateway($gateway) + ->setGatewayId($gatewayId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource of the Gateway. Must be in the + * format `projects/*/locations/*`. + * @type string $gateway_id + * Required. Short name of the Gateway resource to be created. + * @type \Google\Cloud\NetworkServices\V1\Gateway $gateway + * Required. Gateway resource to be created. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\Gateway::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource of the Gateway. Must be in the + * format `projects/*/locations/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource of the Gateway. Must be in the + * format `projects/*/locations/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. Short name of the Gateway resource to be created. + * + * Generated from protobuf field string gateway_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getGatewayId() + { + return $this->gateway_id; + } + + /** + * Required. Short name of the Gateway resource to be created. + * + * Generated from protobuf field string gateway_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setGatewayId($var) + { + GPBUtil::checkString($var, True); + $this->gateway_id = $var; + + return $this; + } + + /** + * Required. Gateway resource to be created. + * + * Generated from protobuf field .google.cloud.networkservices.v1.Gateway gateway = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetworkServices\V1\Gateway|null + */ + public function getGateway() + { + return $this->gateway; + } + + public function hasGateway() + { + return isset($this->gateway); + } + + public function clearGateway() + { + unset($this->gateway); + } + + /** + * Required. Gateway resource to be created. + * + * Generated from protobuf field .google.cloud.networkservices.v1.Gateway gateway = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetworkServices\V1\Gateway $var + * @return $this + */ + public function setGateway($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkServices\V1\Gateway::class); + $this->gateway = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/CreateGrpcRouteRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/CreateGrpcRouteRequest.php new file mode 100644 index 000000000000..bc0d25e92239 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/CreateGrpcRouteRequest.php @@ -0,0 +1,168 @@ +google.cloud.networkservices.v1.CreateGrpcRouteRequest + */ +class CreateGrpcRouteRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource of the GrpcRoute. Must be in the + * format `projects/*/locations/global`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Short name of the GrpcRoute resource to be created. + * + * Generated from protobuf field string grpc_route_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $grpc_route_id = ''; + /** + * Required. GrpcRoute resource to be created. + * + * Generated from protobuf field .google.cloud.networkservices.v1.GrpcRoute grpc_route = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $grpc_route = null; + + /** + * @param string $parent Required. The parent resource of the GrpcRoute. Must be in the + * format `projects/*/locations/global`. Please see + * {@see NetworkServicesClient::locationName()} for help formatting this field. + * @param \Google\Cloud\NetworkServices\V1\GrpcRoute $grpcRoute Required. GrpcRoute resource to be created. + * @param string $grpcRouteId Required. Short name of the GrpcRoute resource to be created. + * + * @return \Google\Cloud\NetworkServices\V1\CreateGrpcRouteRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\NetworkServices\V1\GrpcRoute $grpcRoute, string $grpcRouteId): self + { + return (new self()) + ->setParent($parent) + ->setGrpcRoute($grpcRoute) + ->setGrpcRouteId($grpcRouteId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource of the GrpcRoute. Must be in the + * format `projects/*/locations/global`. + * @type string $grpc_route_id + * Required. Short name of the GrpcRoute resource to be created. + * @type \Google\Cloud\NetworkServices\V1\GrpcRoute $grpc_route + * Required. GrpcRoute resource to be created. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\GrpcRoute::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource of the GrpcRoute. Must be in the + * format `projects/*/locations/global`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource of the GrpcRoute. Must be in the + * format `projects/*/locations/global`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. Short name of the GrpcRoute resource to be created. + * + * Generated from protobuf field string grpc_route_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getGrpcRouteId() + { + return $this->grpc_route_id; + } + + /** + * Required. Short name of the GrpcRoute resource to be created. + * + * Generated from protobuf field string grpc_route_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setGrpcRouteId($var) + { + GPBUtil::checkString($var, True); + $this->grpc_route_id = $var; + + return $this; + } + + /** + * Required. GrpcRoute resource to be created. + * + * Generated from protobuf field .google.cloud.networkservices.v1.GrpcRoute grpc_route = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetworkServices\V1\GrpcRoute|null + */ + public function getGrpcRoute() + { + return $this->grpc_route; + } + + public function hasGrpcRoute() + { + return isset($this->grpc_route); + } + + public function clearGrpcRoute() + { + unset($this->grpc_route); + } + + /** + * Required. GrpcRoute resource to be created. + * + * Generated from protobuf field .google.cloud.networkservices.v1.GrpcRoute grpc_route = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetworkServices\V1\GrpcRoute $var + * @return $this + */ + public function setGrpcRoute($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkServices\V1\GrpcRoute::class); + $this->grpc_route = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/CreateHttpRouteRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/CreateHttpRouteRequest.php new file mode 100644 index 000000000000..c513e3d6eecf --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/CreateHttpRouteRequest.php @@ -0,0 +1,168 @@ +google.cloud.networkservices.v1.CreateHttpRouteRequest + */ +class CreateHttpRouteRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource of the HttpRoute. Must be in the + * format `projects/*/locations/global`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Short name of the HttpRoute resource to be created. + * + * Generated from protobuf field string http_route_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $http_route_id = ''; + /** + * Required. HttpRoute resource to be created. + * + * Generated from protobuf field .google.cloud.networkservices.v1.HttpRoute http_route = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $http_route = null; + + /** + * @param string $parent Required. The parent resource of the HttpRoute. Must be in the + * format `projects/*/locations/global`. Please see + * {@see NetworkServicesClient::locationName()} for help formatting this field. + * @param \Google\Cloud\NetworkServices\V1\HttpRoute $httpRoute Required. HttpRoute resource to be created. + * @param string $httpRouteId Required. Short name of the HttpRoute resource to be created. + * + * @return \Google\Cloud\NetworkServices\V1\CreateHttpRouteRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\NetworkServices\V1\HttpRoute $httpRoute, string $httpRouteId): self + { + return (new self()) + ->setParent($parent) + ->setHttpRoute($httpRoute) + ->setHttpRouteId($httpRouteId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource of the HttpRoute. Must be in the + * format `projects/*/locations/global`. + * @type string $http_route_id + * Required. Short name of the HttpRoute resource to be created. + * @type \Google\Cloud\NetworkServices\V1\HttpRoute $http_route + * Required. HttpRoute resource to be created. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\HttpRoute::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource of the HttpRoute. Must be in the + * format `projects/*/locations/global`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource of the HttpRoute. Must be in the + * format `projects/*/locations/global`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. Short name of the HttpRoute resource to be created. + * + * Generated from protobuf field string http_route_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getHttpRouteId() + { + return $this->http_route_id; + } + + /** + * Required. Short name of the HttpRoute resource to be created. + * + * Generated from protobuf field string http_route_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setHttpRouteId($var) + { + GPBUtil::checkString($var, True); + $this->http_route_id = $var; + + return $this; + } + + /** + * Required. HttpRoute resource to be created. + * + * Generated from protobuf field .google.cloud.networkservices.v1.HttpRoute http_route = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetworkServices\V1\HttpRoute|null + */ + public function getHttpRoute() + { + return $this->http_route; + } + + public function hasHttpRoute() + { + return isset($this->http_route); + } + + public function clearHttpRoute() + { + unset($this->http_route); + } + + /** + * Required. HttpRoute resource to be created. + * + * Generated from protobuf field .google.cloud.networkservices.v1.HttpRoute http_route = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetworkServices\V1\HttpRoute $var + * @return $this + */ + public function setHttpRoute($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkServices\V1\HttpRoute::class); + $this->http_route = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/CreateLbRouteExtensionRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/CreateLbRouteExtensionRequest.php new file mode 100644 index 000000000000..c23c18e694bb --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/CreateLbRouteExtensionRequest.php @@ -0,0 +1,247 @@ +google.cloud.networkservices.v1.CreateLbRouteExtensionRequest + */ +class CreateLbRouteExtensionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource of the `LbRouteExtension` resource. Must be + * in the format `projects/{project}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. User-provided ID of the `LbRouteExtension` resource to be + * created. + * + * Generated from protobuf field string lb_route_extension_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $lb_route_extension_id = ''; + /** + * Required. `LbRouteExtension` resource to be created. + * + * Generated from protobuf field .google.cloud.networkservices.v1.LbRouteExtension lb_route_extension = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $lb_route_extension = null; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server can ignore + * the request if it has already been completed. The server guarantees + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, ignores the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param string $parent Required. The parent resource of the `LbRouteExtension` resource. Must be + * in the format `projects/{project}/locations/{location}`. Please see + * {@see DepServiceClient::locationName()} for help formatting this field. + * @param \Google\Cloud\NetworkServices\V1\LbRouteExtension $lbRouteExtension Required. `LbRouteExtension` resource to be created. + * @param string $lbRouteExtensionId Required. User-provided ID of the `LbRouteExtension` resource to be + * created. + * + * @return \Google\Cloud\NetworkServices\V1\CreateLbRouteExtensionRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\NetworkServices\V1\LbRouteExtension $lbRouteExtension, string $lbRouteExtensionId): self + { + return (new self()) + ->setParent($parent) + ->setLbRouteExtension($lbRouteExtension) + ->setLbRouteExtensionId($lbRouteExtensionId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource of the `LbRouteExtension` resource. Must be + * in the format `projects/{project}/locations/{location}`. + * @type string $lb_route_extension_id + * Required. User-provided ID of the `LbRouteExtension` resource to be + * created. + * @type \Google\Cloud\NetworkServices\V1\LbRouteExtension $lb_route_extension + * Required. `LbRouteExtension` resource to be created. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server can ignore + * the request if it has already been completed. The server guarantees + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, ignores the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\Dep::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource of the `LbRouteExtension` resource. Must be + * in the format `projects/{project}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource of the `LbRouteExtension` resource. Must be + * in the format `projects/{project}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. User-provided ID of the `LbRouteExtension` resource to be + * created. + * + * Generated from protobuf field string lb_route_extension_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getLbRouteExtensionId() + { + return $this->lb_route_extension_id; + } + + /** + * Required. User-provided ID of the `LbRouteExtension` resource to be + * created. + * + * Generated from protobuf field string lb_route_extension_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setLbRouteExtensionId($var) + { + GPBUtil::checkString($var, True); + $this->lb_route_extension_id = $var; + + return $this; + } + + /** + * Required. `LbRouteExtension` resource to be created. + * + * Generated from protobuf field .google.cloud.networkservices.v1.LbRouteExtension lb_route_extension = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetworkServices\V1\LbRouteExtension|null + */ + public function getLbRouteExtension() + { + return $this->lb_route_extension; + } + + public function hasLbRouteExtension() + { + return isset($this->lb_route_extension); + } + + public function clearLbRouteExtension() + { + unset($this->lb_route_extension); + } + + /** + * Required. `LbRouteExtension` resource to be created. + * + * Generated from protobuf field .google.cloud.networkservices.v1.LbRouteExtension lb_route_extension = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetworkServices\V1\LbRouteExtension $var + * @return $this + */ + public function setLbRouteExtension($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkServices\V1\LbRouteExtension::class); + $this->lb_route_extension = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server can ignore + * the request if it has already been completed. The server guarantees + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, ignores the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server can ignore + * the request if it has already been completed. The server guarantees + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, ignores the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/CreateLbTrafficExtensionRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/CreateLbTrafficExtensionRequest.php new file mode 100644 index 000000000000..750bdff5a36b --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/CreateLbTrafficExtensionRequest.php @@ -0,0 +1,247 @@ +google.cloud.networkservices.v1.CreateLbTrafficExtensionRequest + */ +class CreateLbTrafficExtensionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource of the `LbTrafficExtension` resource. Must be + * in the format `projects/{project}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. User-provided ID of the `LbTrafficExtension` resource to be + * created. + * + * Generated from protobuf field string lb_traffic_extension_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $lb_traffic_extension_id = ''; + /** + * Required. `LbTrafficExtension` resource to be created. + * + * Generated from protobuf field .google.cloud.networkservices.v1.LbTrafficExtension lb_traffic_extension = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $lb_traffic_extension = null; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server can ignore + * the request if it has already been completed. The server guarantees + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, ignores the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param string $parent Required. The parent resource of the `LbTrafficExtension` resource. Must be + * in the format `projects/{project}/locations/{location}`. Please see + * {@see DepServiceClient::locationName()} for help formatting this field. + * @param \Google\Cloud\NetworkServices\V1\LbTrafficExtension $lbTrafficExtension Required. `LbTrafficExtension` resource to be created. + * @param string $lbTrafficExtensionId Required. User-provided ID of the `LbTrafficExtension` resource to be + * created. + * + * @return \Google\Cloud\NetworkServices\V1\CreateLbTrafficExtensionRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\NetworkServices\V1\LbTrafficExtension $lbTrafficExtension, string $lbTrafficExtensionId): self + { + return (new self()) + ->setParent($parent) + ->setLbTrafficExtension($lbTrafficExtension) + ->setLbTrafficExtensionId($lbTrafficExtensionId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource of the `LbTrafficExtension` resource. Must be + * in the format `projects/{project}/locations/{location}`. + * @type string $lb_traffic_extension_id + * Required. User-provided ID of the `LbTrafficExtension` resource to be + * created. + * @type \Google\Cloud\NetworkServices\V1\LbTrafficExtension $lb_traffic_extension + * Required. `LbTrafficExtension` resource to be created. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server can ignore + * the request if it has already been completed. The server guarantees + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, ignores the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\Dep::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource of the `LbTrafficExtension` resource. Must be + * in the format `projects/{project}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource of the `LbTrafficExtension` resource. Must be + * in the format `projects/{project}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. User-provided ID of the `LbTrafficExtension` resource to be + * created. + * + * Generated from protobuf field string lb_traffic_extension_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getLbTrafficExtensionId() + { + return $this->lb_traffic_extension_id; + } + + /** + * Required. User-provided ID of the `LbTrafficExtension` resource to be + * created. + * + * Generated from protobuf field string lb_traffic_extension_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setLbTrafficExtensionId($var) + { + GPBUtil::checkString($var, True); + $this->lb_traffic_extension_id = $var; + + return $this; + } + + /** + * Required. `LbTrafficExtension` resource to be created. + * + * Generated from protobuf field .google.cloud.networkservices.v1.LbTrafficExtension lb_traffic_extension = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetworkServices\V1\LbTrafficExtension|null + */ + public function getLbTrafficExtension() + { + return $this->lb_traffic_extension; + } + + public function hasLbTrafficExtension() + { + return isset($this->lb_traffic_extension); + } + + public function clearLbTrafficExtension() + { + unset($this->lb_traffic_extension); + } + + /** + * Required. `LbTrafficExtension` resource to be created. + * + * Generated from protobuf field .google.cloud.networkservices.v1.LbTrafficExtension lb_traffic_extension = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetworkServices\V1\LbTrafficExtension $var + * @return $this + */ + public function setLbTrafficExtension($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkServices\V1\LbTrafficExtension::class); + $this->lb_traffic_extension = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server can ignore + * the request if it has already been completed. The server guarantees + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, ignores the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server can ignore + * the request if it has already been completed. The server guarantees + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, ignores the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/CreateMeshRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/CreateMeshRequest.php new file mode 100644 index 000000000000..592b91ab71bc --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/CreateMeshRequest.php @@ -0,0 +1,168 @@ +google.cloud.networkservices.v1.CreateMeshRequest + */ +class CreateMeshRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource of the Mesh. Must be in the + * format `projects/*/locations/global`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Short name of the Mesh resource to be created. + * + * Generated from protobuf field string mesh_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $mesh_id = ''; + /** + * Required. Mesh resource to be created. + * + * Generated from protobuf field .google.cloud.networkservices.v1.Mesh mesh = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $mesh = null; + + /** + * @param string $parent Required. The parent resource of the Mesh. Must be in the + * format `projects/*/locations/global`. Please see + * {@see NetworkServicesClient::locationName()} for help formatting this field. + * @param \Google\Cloud\NetworkServices\V1\Mesh $mesh Required. Mesh resource to be created. + * @param string $meshId Required. Short name of the Mesh resource to be created. + * + * @return \Google\Cloud\NetworkServices\V1\CreateMeshRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\NetworkServices\V1\Mesh $mesh, string $meshId): self + { + return (new self()) + ->setParent($parent) + ->setMesh($mesh) + ->setMeshId($meshId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource of the Mesh. Must be in the + * format `projects/*/locations/global`. + * @type string $mesh_id + * Required. Short name of the Mesh resource to be created. + * @type \Google\Cloud\NetworkServices\V1\Mesh $mesh + * Required. Mesh resource to be created. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\Mesh::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource of the Mesh. Must be in the + * format `projects/*/locations/global`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource of the Mesh. Must be in the + * format `projects/*/locations/global`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. Short name of the Mesh resource to be created. + * + * Generated from protobuf field string mesh_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getMeshId() + { + return $this->mesh_id; + } + + /** + * Required. Short name of the Mesh resource to be created. + * + * Generated from protobuf field string mesh_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setMeshId($var) + { + GPBUtil::checkString($var, True); + $this->mesh_id = $var; + + return $this; + } + + /** + * Required. Mesh resource to be created. + * + * Generated from protobuf field .google.cloud.networkservices.v1.Mesh mesh = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetworkServices\V1\Mesh|null + */ + public function getMesh() + { + return $this->mesh; + } + + public function hasMesh() + { + return isset($this->mesh); + } + + public function clearMesh() + { + unset($this->mesh); + } + + /** + * Required. Mesh resource to be created. + * + * Generated from protobuf field .google.cloud.networkservices.v1.Mesh mesh = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetworkServices\V1\Mesh $var + * @return $this + */ + public function setMesh($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkServices\V1\Mesh::class); + $this->mesh = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/CreateServiceBindingRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/CreateServiceBindingRequest.php new file mode 100644 index 000000000000..479d96d0052e --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/CreateServiceBindingRequest.php @@ -0,0 +1,168 @@ +google.cloud.networkservices.v1.CreateServiceBindingRequest + */ +class CreateServiceBindingRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource of the ServiceBinding. Must be in the + * format `projects/*/locations/global`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Short name of the ServiceBinding resource to be created. + * + * Generated from protobuf field string service_binding_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $service_binding_id = ''; + /** + * Required. ServiceBinding resource to be created. + * + * Generated from protobuf field .google.cloud.networkservices.v1.ServiceBinding service_binding = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $service_binding = null; + + /** + * @param string $parent Required. The parent resource of the ServiceBinding. Must be in the + * format `projects/*/locations/global`. Please see + * {@see NetworkServicesClient::locationName()} for help formatting this field. + * @param \Google\Cloud\NetworkServices\V1\ServiceBinding $serviceBinding Required. ServiceBinding resource to be created. + * @param string $serviceBindingId Required. Short name of the ServiceBinding resource to be created. + * + * @return \Google\Cloud\NetworkServices\V1\CreateServiceBindingRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\NetworkServices\V1\ServiceBinding $serviceBinding, string $serviceBindingId): self + { + return (new self()) + ->setParent($parent) + ->setServiceBinding($serviceBinding) + ->setServiceBindingId($serviceBindingId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource of the ServiceBinding. Must be in the + * format `projects/*/locations/global`. + * @type string $service_binding_id + * Required. Short name of the ServiceBinding resource to be created. + * @type \Google\Cloud\NetworkServices\V1\ServiceBinding $service_binding + * Required. ServiceBinding resource to be created. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\ServiceBinding::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource of the ServiceBinding. Must be in the + * format `projects/*/locations/global`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource of the ServiceBinding. Must be in the + * format `projects/*/locations/global`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. Short name of the ServiceBinding resource to be created. + * + * Generated from protobuf field string service_binding_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getServiceBindingId() + { + return $this->service_binding_id; + } + + /** + * Required. Short name of the ServiceBinding resource to be created. + * + * Generated from protobuf field string service_binding_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setServiceBindingId($var) + { + GPBUtil::checkString($var, True); + $this->service_binding_id = $var; + + return $this; + } + + /** + * Required. ServiceBinding resource to be created. + * + * Generated from protobuf field .google.cloud.networkservices.v1.ServiceBinding service_binding = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetworkServices\V1\ServiceBinding|null + */ + public function getServiceBinding() + { + return $this->service_binding; + } + + public function hasServiceBinding() + { + return isset($this->service_binding); + } + + public function clearServiceBinding() + { + unset($this->service_binding); + } + + /** + * Required. ServiceBinding resource to be created. + * + * Generated from protobuf field .google.cloud.networkservices.v1.ServiceBinding service_binding = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetworkServices\V1\ServiceBinding $var + * @return $this + */ + public function setServiceBinding($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkServices\V1\ServiceBinding::class); + $this->service_binding = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/CreateTcpRouteRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/CreateTcpRouteRequest.php new file mode 100644 index 000000000000..46a6bc15cd6a --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/CreateTcpRouteRequest.php @@ -0,0 +1,168 @@ +google.cloud.networkservices.v1.CreateTcpRouteRequest + */ +class CreateTcpRouteRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource of the TcpRoute. Must be in the + * format `projects/*/locations/global`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Short name of the TcpRoute resource to be created. + * + * Generated from protobuf field string tcp_route_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $tcp_route_id = ''; + /** + * Required. TcpRoute resource to be created. + * + * Generated from protobuf field .google.cloud.networkservices.v1.TcpRoute tcp_route = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $tcp_route = null; + + /** + * @param string $parent Required. The parent resource of the TcpRoute. Must be in the + * format `projects/*/locations/global`. Please see + * {@see NetworkServicesClient::locationName()} for help formatting this field. + * @param \Google\Cloud\NetworkServices\V1\TcpRoute $tcpRoute Required. TcpRoute resource to be created. + * @param string $tcpRouteId Required. Short name of the TcpRoute resource to be created. + * + * @return \Google\Cloud\NetworkServices\V1\CreateTcpRouteRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\NetworkServices\V1\TcpRoute $tcpRoute, string $tcpRouteId): self + { + return (new self()) + ->setParent($parent) + ->setTcpRoute($tcpRoute) + ->setTcpRouteId($tcpRouteId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource of the TcpRoute. Must be in the + * format `projects/*/locations/global`. + * @type string $tcp_route_id + * Required. Short name of the TcpRoute resource to be created. + * @type \Google\Cloud\NetworkServices\V1\TcpRoute $tcp_route + * Required. TcpRoute resource to be created. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\TcpRoute::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource of the TcpRoute. Must be in the + * format `projects/*/locations/global`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource of the TcpRoute. Must be in the + * format `projects/*/locations/global`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. Short name of the TcpRoute resource to be created. + * + * Generated from protobuf field string tcp_route_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getTcpRouteId() + { + return $this->tcp_route_id; + } + + /** + * Required. Short name of the TcpRoute resource to be created. + * + * Generated from protobuf field string tcp_route_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setTcpRouteId($var) + { + GPBUtil::checkString($var, True); + $this->tcp_route_id = $var; + + return $this; + } + + /** + * Required. TcpRoute resource to be created. + * + * Generated from protobuf field .google.cloud.networkservices.v1.TcpRoute tcp_route = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetworkServices\V1\TcpRoute|null + */ + public function getTcpRoute() + { + return $this->tcp_route; + } + + public function hasTcpRoute() + { + return isset($this->tcp_route); + } + + public function clearTcpRoute() + { + unset($this->tcp_route); + } + + /** + * Required. TcpRoute resource to be created. + * + * Generated from protobuf field .google.cloud.networkservices.v1.TcpRoute tcp_route = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetworkServices\V1\TcpRoute $var + * @return $this + */ + public function setTcpRoute($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkServices\V1\TcpRoute::class); + $this->tcp_route = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/CreateTlsRouteRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/CreateTlsRouteRequest.php new file mode 100644 index 000000000000..22f48cfb790f --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/CreateTlsRouteRequest.php @@ -0,0 +1,168 @@ +google.cloud.networkservices.v1.CreateTlsRouteRequest + */ +class CreateTlsRouteRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource of the TlsRoute. Must be in the + * format `projects/*/locations/global`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Short name of the TlsRoute resource to be created. + * + * Generated from protobuf field string tls_route_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $tls_route_id = ''; + /** + * Required. TlsRoute resource to be created. + * + * Generated from protobuf field .google.cloud.networkservices.v1.TlsRoute tls_route = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $tls_route = null; + + /** + * @param string $parent Required. The parent resource of the TlsRoute. Must be in the + * format `projects/*/locations/global`. Please see + * {@see NetworkServicesClient::locationName()} for help formatting this field. + * @param \Google\Cloud\NetworkServices\V1\TlsRoute $tlsRoute Required. TlsRoute resource to be created. + * @param string $tlsRouteId Required. Short name of the TlsRoute resource to be created. + * + * @return \Google\Cloud\NetworkServices\V1\CreateTlsRouteRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\NetworkServices\V1\TlsRoute $tlsRoute, string $tlsRouteId): self + { + return (new self()) + ->setParent($parent) + ->setTlsRoute($tlsRoute) + ->setTlsRouteId($tlsRouteId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource of the TlsRoute. Must be in the + * format `projects/*/locations/global`. + * @type string $tls_route_id + * Required. Short name of the TlsRoute resource to be created. + * @type \Google\Cloud\NetworkServices\V1\TlsRoute $tls_route + * Required. TlsRoute resource to be created. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\TlsRoute::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource of the TlsRoute. Must be in the + * format `projects/*/locations/global`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource of the TlsRoute. Must be in the + * format `projects/*/locations/global`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. Short name of the TlsRoute resource to be created. + * + * Generated from protobuf field string tls_route_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getTlsRouteId() + { + return $this->tls_route_id; + } + + /** + * Required. Short name of the TlsRoute resource to be created. + * + * Generated from protobuf field string tls_route_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setTlsRouteId($var) + { + GPBUtil::checkString($var, True); + $this->tls_route_id = $var; + + return $this; + } + + /** + * Required. TlsRoute resource to be created. + * + * Generated from protobuf field .google.cloud.networkservices.v1.TlsRoute tls_route = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetworkServices\V1\TlsRoute|null + */ + public function getTlsRoute() + { + return $this->tls_route; + } + + public function hasTlsRoute() + { + return isset($this->tls_route); + } + + public function clearTlsRoute() + { + unset($this->tls_route); + } + + /** + * Required. TlsRoute resource to be created. + * + * Generated from protobuf field .google.cloud.networkservices.v1.TlsRoute tls_route = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetworkServices\V1\TlsRoute $var + * @return $this + */ + public function setTlsRoute($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkServices\V1\TlsRoute::class); + $this->tls_route = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/DeleteEndpointPolicyRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/DeleteEndpointPolicyRequest.php new file mode 100644 index 000000000000..78d9db7d70b1 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/DeleteEndpointPolicyRequest.php @@ -0,0 +1,86 @@ +google.cloud.networkservices.v1.DeleteEndpointPolicyRequest + */ +class DeleteEndpointPolicyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A name of the EndpointPolicy to delete. Must be in the format + * `projects/*/locations/global/endpointPolicies/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. A name of the EndpointPolicy to delete. Must be in the format + * `projects/*/locations/global/endpointPolicies/*`. Please see + * {@see NetworkServicesClient::endpointPolicyName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkServices\V1\DeleteEndpointPolicyRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. A name of the EndpointPolicy to delete. Must be in the format + * `projects/*/locations/global/endpointPolicies/*`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\EndpointPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. A name of the EndpointPolicy to delete. Must be in the format + * `projects/*/locations/global/endpointPolicies/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. A name of the EndpointPolicy to delete. Must be in the format + * `projects/*/locations/global/endpointPolicies/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/DeleteGatewayRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/DeleteGatewayRequest.php new file mode 100644 index 000000000000..4bec0a3ce9eb --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/DeleteGatewayRequest.php @@ -0,0 +1,86 @@ +google.cloud.networkservices.v1.DeleteGatewayRequest + */ +class DeleteGatewayRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A name of the Gateway to delete. Must be in the format + * `projects/*/locations/*/gateways/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. A name of the Gateway to delete. Must be in the format + * `projects/*/locations/*/gateways/*`. Please see + * {@see NetworkServicesClient::gatewayName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkServices\V1\DeleteGatewayRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. A name of the Gateway to delete. Must be in the format + * `projects/*/locations/*/gateways/*`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\Gateway::initOnce(); + parent::__construct($data); + } + + /** + * Required. A name of the Gateway to delete. Must be in the format + * `projects/*/locations/*/gateways/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. A name of the Gateway to delete. Must be in the format + * `projects/*/locations/*/gateways/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/DeleteGrpcRouteRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/DeleteGrpcRouteRequest.php new file mode 100644 index 000000000000..bced7bb70ce5 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/DeleteGrpcRouteRequest.php @@ -0,0 +1,86 @@ +google.cloud.networkservices.v1.DeleteGrpcRouteRequest + */ +class DeleteGrpcRouteRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A name of the GrpcRoute to delete. Must be in the format + * `projects/*/locations/global/grpcRoutes/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. A name of the GrpcRoute to delete. Must be in the format + * `projects/*/locations/global/grpcRoutes/*`. Please see + * {@see NetworkServicesClient::grpcRouteName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkServices\V1\DeleteGrpcRouteRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. A name of the GrpcRoute to delete. Must be in the format + * `projects/*/locations/global/grpcRoutes/*`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\GrpcRoute::initOnce(); + parent::__construct($data); + } + + /** + * Required. A name of the GrpcRoute to delete. Must be in the format + * `projects/*/locations/global/grpcRoutes/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. A name of the GrpcRoute to delete. Must be in the format + * `projects/*/locations/global/grpcRoutes/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/DeleteHttpRouteRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/DeleteHttpRouteRequest.php new file mode 100644 index 000000000000..2d9d2972f122 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/DeleteHttpRouteRequest.php @@ -0,0 +1,86 @@ +google.cloud.networkservices.v1.DeleteHttpRouteRequest + */ +class DeleteHttpRouteRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A name of the HttpRoute to delete. Must be in the format + * `projects/*/locations/global/httpRoutes/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. A name of the HttpRoute to delete. Must be in the format + * `projects/*/locations/global/httpRoutes/*`. Please see + * {@see NetworkServicesClient::httpRouteName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkServices\V1\DeleteHttpRouteRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. A name of the HttpRoute to delete. Must be in the format + * `projects/*/locations/global/httpRoutes/*`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\HttpRoute::initOnce(); + parent::__construct($data); + } + + /** + * Required. A name of the HttpRoute to delete. Must be in the format + * `projects/*/locations/global/httpRoutes/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. A name of the HttpRoute to delete. Must be in the format + * `projects/*/locations/global/httpRoutes/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/DeleteLbRouteExtensionRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/DeleteLbRouteExtensionRequest.php new file mode 100644 index 000000000000..97d3ddce41ad --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/DeleteLbRouteExtensionRequest.php @@ -0,0 +1,165 @@ +google.cloud.networkservices.v1.DeleteLbRouteExtensionRequest + */ +class DeleteLbRouteExtensionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the `LbRouteExtension` resource to delete. Must be in + * the format + * `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server can ignore + * the request if it has already been completed. The server guarantees + * that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, ignores the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param string $name Required. The name of the `LbRouteExtension` resource to delete. Must be in + * the format + * `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}`. Please see + * {@see DepServiceClient::lbRouteExtensionName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkServices\V1\DeleteLbRouteExtensionRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the `LbRouteExtension` resource to delete. Must be in + * the format + * `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}`. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server can ignore + * the request if it has already been completed. The server guarantees + * that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, ignores the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\Dep::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the `LbRouteExtension` resource to delete. Must be in + * the format + * `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the `LbRouteExtension` resource to delete. Must be in + * the format + * `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server can ignore + * the request if it has already been completed. The server guarantees + * that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, ignores the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server can ignore + * the request if it has already been completed. The server guarantees + * that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, ignores the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/DeleteLbTrafficExtensionRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/DeleteLbTrafficExtensionRequest.php new file mode 100644 index 000000000000..ee2e63986c3f --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/DeleteLbTrafficExtensionRequest.php @@ -0,0 +1,165 @@ +google.cloud.networkservices.v1.DeleteLbTrafficExtensionRequest + */ +class DeleteLbTrafficExtensionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the `LbTrafficExtension` resource to delete. Must be + * in the format + * `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server can ignore + * the request if it has already been completed. The server guarantees + * that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, ignores the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param string $name Required. The name of the `LbTrafficExtension` resource to delete. Must be + * in the format + * `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}`. Please see + * {@see DepServiceClient::lbTrafficExtensionName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkServices\V1\DeleteLbTrafficExtensionRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the `LbTrafficExtension` resource to delete. Must be + * in the format + * `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}`. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server can ignore + * the request if it has already been completed. The server guarantees + * that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, ignores the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\Dep::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the `LbTrafficExtension` resource to delete. Must be + * in the format + * `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the `LbTrafficExtension` resource to delete. Must be + * in the format + * `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server can ignore + * the request if it has already been completed. The server guarantees + * that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, ignores the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server can ignore + * the request if it has already been completed. The server guarantees + * that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, ignores the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/DeleteMeshRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/DeleteMeshRequest.php new file mode 100644 index 000000000000..b7be12709d4b --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/DeleteMeshRequest.php @@ -0,0 +1,86 @@ +google.cloud.networkservices.v1.DeleteMeshRequest + */ +class DeleteMeshRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A name of the Mesh to delete. Must be in the format + * `projects/*/locations/global/meshes/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. A name of the Mesh to delete. Must be in the format + * `projects/*/locations/global/meshes/*`. Please see + * {@see NetworkServicesClient::meshName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkServices\V1\DeleteMeshRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. A name of the Mesh to delete. Must be in the format + * `projects/*/locations/global/meshes/*`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\Mesh::initOnce(); + parent::__construct($data); + } + + /** + * Required. A name of the Mesh to delete. Must be in the format + * `projects/*/locations/global/meshes/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. A name of the Mesh to delete. Must be in the format + * `projects/*/locations/global/meshes/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/DeleteServiceBindingRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/DeleteServiceBindingRequest.php new file mode 100644 index 000000000000..8a3ba9b8d09b --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/DeleteServiceBindingRequest.php @@ -0,0 +1,86 @@ +google.cloud.networkservices.v1.DeleteServiceBindingRequest + */ +class DeleteServiceBindingRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A name of the ServiceBinding to delete. Must be in the format + * `projects/*/locations/global/serviceBindings/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. A name of the ServiceBinding to delete. Must be in the format + * `projects/*/locations/global/serviceBindings/*`. Please see + * {@see NetworkServicesClient::serviceBindingName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkServices\V1\DeleteServiceBindingRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. A name of the ServiceBinding to delete. Must be in the format + * `projects/*/locations/global/serviceBindings/*`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\ServiceBinding::initOnce(); + parent::__construct($data); + } + + /** + * Required. A name of the ServiceBinding to delete. Must be in the format + * `projects/*/locations/global/serviceBindings/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. A name of the ServiceBinding to delete. Must be in the format + * `projects/*/locations/global/serviceBindings/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/DeleteTcpRouteRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/DeleteTcpRouteRequest.php new file mode 100644 index 000000000000..004019812ad5 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/DeleteTcpRouteRequest.php @@ -0,0 +1,86 @@ +google.cloud.networkservices.v1.DeleteTcpRouteRequest + */ +class DeleteTcpRouteRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A name of the TcpRoute to delete. Must be in the format + * `projects/*/locations/global/tcpRoutes/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. A name of the TcpRoute to delete. Must be in the format + * `projects/*/locations/global/tcpRoutes/*`. Please see + * {@see NetworkServicesClient::tcpRouteName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkServices\V1\DeleteTcpRouteRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. A name of the TcpRoute to delete. Must be in the format + * `projects/*/locations/global/tcpRoutes/*`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\TcpRoute::initOnce(); + parent::__construct($data); + } + + /** + * Required. A name of the TcpRoute to delete. Must be in the format + * `projects/*/locations/global/tcpRoutes/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. A name of the TcpRoute to delete. Must be in the format + * `projects/*/locations/global/tcpRoutes/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/DeleteTlsRouteRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/DeleteTlsRouteRequest.php new file mode 100644 index 000000000000..107c2d2bc37b --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/DeleteTlsRouteRequest.php @@ -0,0 +1,86 @@ +google.cloud.networkservices.v1.DeleteTlsRouteRequest + */ +class DeleteTlsRouteRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A name of the TlsRoute to delete. Must be in the format + * `projects/*/locations/global/tlsRoutes/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. A name of the TlsRoute to delete. Must be in the format + * `projects/*/locations/global/tlsRoutes/*`. Please see + * {@see NetworkServicesClient::tlsRouteName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkServices\V1\DeleteTlsRouteRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. A name of the TlsRoute to delete. Must be in the format + * `projects/*/locations/global/tlsRoutes/*`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\TlsRoute::initOnce(); + parent::__construct($data); + } + + /** + * Required. A name of the TlsRoute to delete. Must be in the format + * `projects/*/locations/global/tlsRoutes/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. A name of the TlsRoute to delete. Must be in the format + * `projects/*/locations/global/tlsRoutes/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/EndpointMatcher.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/EndpointMatcher.php new file mode 100644 index 000000000000..e03be7be44e8 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/EndpointMatcher.php @@ -0,0 +1,76 @@ +google.cloud.networkservices.v1.EndpointMatcher + */ +class EndpointMatcher extends \Google\Protobuf\Internal\Message +{ + protected $matcher_type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\NetworkServices\V1\EndpointMatcher\MetadataLabelMatcher $metadata_label_matcher + * The matcher is based on node metadata presented by xDS clients. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\Common::initOnce(); + parent::__construct($data); + } + + /** + * The matcher is based on node metadata presented by xDS clients. + * + * Generated from protobuf field .google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcher metadata_label_matcher = 1; + * @return \Google\Cloud\NetworkServices\V1\EndpointMatcher\MetadataLabelMatcher|null + */ + public function getMetadataLabelMatcher() + { + return $this->readOneof(1); + } + + public function hasMetadataLabelMatcher() + { + return $this->hasOneof(1); + } + + /** + * The matcher is based on node metadata presented by xDS clients. + * + * Generated from protobuf field .google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcher metadata_label_matcher = 1; + * @param \Google\Cloud\NetworkServices\V1\EndpointMatcher\MetadataLabelMatcher $var + * @return $this + */ + public function setMetadataLabelMatcher($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkServices\V1\EndpointMatcher\MetadataLabelMatcher::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * @return string + */ + public function getMatcherType() + { + return $this->whichOneof("matcher_type"); + } + +} + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/EndpointMatcher/MetadataLabelMatcher.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/EndpointMatcher/MetadataLabelMatcher.php new file mode 100644 index 000000000000..dd0d98126ecf --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/EndpointMatcher/MetadataLabelMatcher.php @@ -0,0 +1,196 @@ +google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcher + */ +class MetadataLabelMatcher extends \Google\Protobuf\Internal\Message +{ + /** + * Specifies how matching should be done. + * Supported values are: + * MATCH_ANY: At least one of the Labels specified in the + * matcher should match the metadata presented by xDS client. + * MATCH_ALL: The metadata presented by the xDS client should + * contain all of the labels specified here. + * The selection is determined based on the best match. For + * example, suppose there are three EndpointPolicy + * resources P1, P2 and P3 and if P1 has a the matcher as + * MATCH_ANY , P2 has MATCH_ALL , and P3 has + * MATCH_ALL . + * If a client with label connects, the config from P1 + * will be selected. + * If a client with label connects, the config from P2 + * will be selected. + * If a client with label connects, the config + * from P3 will be selected. + * If there is more than one best match, (for example, if a + * config P4 with selector exists and if a client with + * label connects), an error will be thrown. + * + * Generated from protobuf field .google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcher.MetadataLabelMatchCriteria metadata_label_match_criteria = 1; + */ + protected $metadata_label_match_criteria = 0; + /** + * The list of label value pairs that must match labels in the + * provided metadata based on filterMatchCriteria This list can + * have at most 64 entries. The list can be empty if the match + * criteria is MATCH_ANY, to specify a wildcard match (i.e this + * matches any client). + * + * Generated from protobuf field repeated .google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcher.MetadataLabels metadata_labels = 2; + */ + private $metadata_labels; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $metadata_label_match_criteria + * Specifies how matching should be done. + * Supported values are: + * MATCH_ANY: At least one of the Labels specified in the + * matcher should match the metadata presented by xDS client. + * MATCH_ALL: The metadata presented by the xDS client should + * contain all of the labels specified here. + * The selection is determined based on the best match. For + * example, suppose there are three EndpointPolicy + * resources P1, P2 and P3 and if P1 has a the matcher as + * MATCH_ANY , P2 has MATCH_ALL , and P3 has + * MATCH_ALL . + * If a client with label connects, the config from P1 + * will be selected. + * If a client with label connects, the config from P2 + * will be selected. + * If a client with label connects, the config + * from P3 will be selected. + * If there is more than one best match, (for example, if a + * config P4 with selector exists and if a client with + * label connects), an error will be thrown. + * @type array<\Google\Cloud\NetworkServices\V1\EndpointMatcher\MetadataLabelMatcher\MetadataLabels>|\Google\Protobuf\Internal\RepeatedField $metadata_labels + * The list of label value pairs that must match labels in the + * provided metadata based on filterMatchCriteria This list can + * have at most 64 entries. The list can be empty if the match + * criteria is MATCH_ANY, to specify a wildcard match (i.e this + * matches any client). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\Common::initOnce(); + parent::__construct($data); + } + + /** + * Specifies how matching should be done. + * Supported values are: + * MATCH_ANY: At least one of the Labels specified in the + * matcher should match the metadata presented by xDS client. + * MATCH_ALL: The metadata presented by the xDS client should + * contain all of the labels specified here. + * The selection is determined based on the best match. For + * example, suppose there are three EndpointPolicy + * resources P1, P2 and P3 and if P1 has a the matcher as + * MATCH_ANY , P2 has MATCH_ALL , and P3 has + * MATCH_ALL . + * If a client with label connects, the config from P1 + * will be selected. + * If a client with label connects, the config from P2 + * will be selected. + * If a client with label connects, the config + * from P3 will be selected. + * If there is more than one best match, (for example, if a + * config P4 with selector exists and if a client with + * label connects), an error will be thrown. + * + * Generated from protobuf field .google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcher.MetadataLabelMatchCriteria metadata_label_match_criteria = 1; + * @return int + */ + public function getMetadataLabelMatchCriteria() + { + return $this->metadata_label_match_criteria; + } + + /** + * Specifies how matching should be done. + * Supported values are: + * MATCH_ANY: At least one of the Labels specified in the + * matcher should match the metadata presented by xDS client. + * MATCH_ALL: The metadata presented by the xDS client should + * contain all of the labels specified here. + * The selection is determined based on the best match. For + * example, suppose there are three EndpointPolicy + * resources P1, P2 and P3 and if P1 has a the matcher as + * MATCH_ANY , P2 has MATCH_ALL , and P3 has + * MATCH_ALL . + * If a client with label connects, the config from P1 + * will be selected. + * If a client with label connects, the config from P2 + * will be selected. + * If a client with label connects, the config + * from P3 will be selected. + * If there is more than one best match, (for example, if a + * config P4 with selector exists and if a client with + * label connects), an error will be thrown. + * + * Generated from protobuf field .google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcher.MetadataLabelMatchCriteria metadata_label_match_criteria = 1; + * @param int $var + * @return $this + */ + public function setMetadataLabelMatchCriteria($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetworkServices\V1\EndpointMatcher\MetadataLabelMatcher\MetadataLabelMatchCriteria::class); + $this->metadata_label_match_criteria = $var; + + return $this; + } + + /** + * The list of label value pairs that must match labels in the + * provided metadata based on filterMatchCriteria This list can + * have at most 64 entries. The list can be empty if the match + * criteria is MATCH_ANY, to specify a wildcard match (i.e this + * matches any client). + * + * Generated from protobuf field repeated .google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcher.MetadataLabels metadata_labels = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMetadataLabels() + { + return $this->metadata_labels; + } + + /** + * The list of label value pairs that must match labels in the + * provided metadata based on filterMatchCriteria This list can + * have at most 64 entries. The list can be empty if the match + * criteria is MATCH_ANY, to specify a wildcard match (i.e this + * matches any client). + * + * Generated from protobuf field repeated .google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcher.MetadataLabels metadata_labels = 2; + * @param array<\Google\Cloud\NetworkServices\V1\EndpointMatcher\MetadataLabelMatcher\MetadataLabels>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMetadataLabels($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkServices\V1\EndpointMatcher\MetadataLabelMatcher\MetadataLabels::class); + $this->metadata_labels = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(MetadataLabelMatcher::class, \Google\Cloud\NetworkServices\V1\EndpointMatcher_MetadataLabelMatcher::class); + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/EndpointMatcher/MetadataLabelMatcher/MetadataLabelMatchCriteria.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/EndpointMatcher/MetadataLabelMatcher/MetadataLabelMatchCriteria.php new file mode 100644 index 000000000000..efc8ad586af8 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/EndpointMatcher/MetadataLabelMatcher/MetadataLabelMatchCriteria.php @@ -0,0 +1,66 @@ +google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcher.MetadataLabelMatchCriteria + */ +class MetadataLabelMatchCriteria +{ + /** + * Default value. Should not be used. + * + * Generated from protobuf enum METADATA_LABEL_MATCH_CRITERIA_UNSPECIFIED = 0; + */ + const METADATA_LABEL_MATCH_CRITERIA_UNSPECIFIED = 0; + /** + * At least one of the Labels specified in the matcher should match the + * metadata presented by xDS client. + * + * Generated from protobuf enum MATCH_ANY = 1; + */ + const MATCH_ANY = 1; + /** + * The metadata presented by the xDS client should contain all of the + * labels specified here. + * + * Generated from protobuf enum MATCH_ALL = 2; + */ + const MATCH_ALL = 2; + + private static $valueToName = [ + self::METADATA_LABEL_MATCH_CRITERIA_UNSPECIFIED => 'METADATA_LABEL_MATCH_CRITERIA_UNSPECIFIED', + self::MATCH_ANY => 'MATCH_ANY', + self::MATCH_ALL => 'MATCH_ALL', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(MetadataLabelMatchCriteria::class, \Google\Cloud\NetworkServices\V1\EndpointMatcher_MetadataLabelMatcher_MetadataLabelMatchCriteria::class); + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/EndpointMatcher/MetadataLabelMatcher/MetadataLabels.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/EndpointMatcher/MetadataLabelMatcher/MetadataLabels.php new file mode 100644 index 000000000000..46a7f1ae194f --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/EndpointMatcher/MetadataLabelMatcher/MetadataLabels.php @@ -0,0 +1,108 @@ +google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcher.MetadataLabels + */ +class MetadataLabels extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Label name presented as key in xDS Node Metadata. + * + * Generated from protobuf field string label_name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $label_name = ''; + /** + * Required. Label value presented as value corresponding to the above + * key, in xDS Node Metadata. + * + * Generated from protobuf field string label_value = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $label_value = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $label_name + * Required. Label name presented as key in xDS Node Metadata. + * @type string $label_value + * Required. Label value presented as value corresponding to the above + * key, in xDS Node Metadata. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\Common::initOnce(); + parent::__construct($data); + } + + /** + * Required. Label name presented as key in xDS Node Metadata. + * + * Generated from protobuf field string label_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getLabelName() + { + return $this->label_name; + } + + /** + * Required. Label name presented as key in xDS Node Metadata. + * + * Generated from protobuf field string label_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setLabelName($var) + { + GPBUtil::checkString($var, True); + $this->label_name = $var; + + return $this; + } + + /** + * Required. Label value presented as value corresponding to the above + * key, in xDS Node Metadata. + * + * Generated from protobuf field string label_value = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getLabelValue() + { + return $this->label_value; + } + + /** + * Required. Label value presented as value corresponding to the above + * key, in xDS Node Metadata. + * + * Generated from protobuf field string label_value = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setLabelValue($var) + { + GPBUtil::checkString($var, True); + $this->label_value = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(MetadataLabels::class, \Google\Cloud\NetworkServices\V1\EndpointMatcher_MetadataLabelMatcher_MetadataLabels::class); + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/EndpointPolicy.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/EndpointPolicy.php new file mode 100644 index 000000000000..1bde99da2ce8 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/EndpointPolicy.php @@ -0,0 +1,526 @@ +google.cloud.networkservices.v1.EndpointPolicy + */ +class EndpointPolicy extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the EndpointPolicy resource. It matches pattern + * `projects/{project}/locations/global/endpointPolicies/{endpoint_policy}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * Output only. The timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The timestamp when the resource was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Optional. Set of label tags associated with the EndpointPolicy resource. + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Required. The type of endpoint policy. This is primarily used to validate + * the configuration. + * + * Generated from protobuf field .google.cloud.networkservices.v1.EndpointPolicy.EndpointPolicyType type = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $type = 0; + /** + * Optional. This field specifies the URL of AuthorizationPolicy resource that + * applies authorization policies to the inbound traffic at the + * matched endpoints. Refer to Authorization. If this field is not + * specified, authorization is disabled(no authz checks) for this + * endpoint. + * + * Generated from protobuf field string authorization_policy = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $authorization_policy = ''; + /** + * Required. A matcher that selects endpoints to which the policies should be + * applied. + * + * Generated from protobuf field .google.cloud.networkservices.v1.EndpointMatcher endpoint_matcher = 9 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $endpoint_matcher = null; + /** + * Optional. Port selector for the (matched) endpoints. If no port selector is + * provided, the matched config is applied to all ports. + * + * Generated from protobuf field .google.cloud.networkservices.v1.TrafficPortSelector traffic_port_selector = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $traffic_port_selector = null; + /** + * Optional. A free-text description of the resource. Max length 1024 + * characters. + * + * Generated from protobuf field string description = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Optional. A URL referring to ServerTlsPolicy resource. ServerTlsPolicy is + * used to determine the authentication policy to be applied to terminate the + * inbound traffic at the identified backends. If this field is not set, + * authentication is disabled(open) for this endpoint. + * + * Generated from protobuf field string server_tls_policy = 12 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $server_tls_policy = ''; + /** + * Optional. A URL referring to a ClientTlsPolicy resource. ClientTlsPolicy + * can be set to specify the authentication for traffic from the proxy to the + * actual endpoints. More specifically, it is applied to the outgoing traffic + * from the proxy to the endpoint. This is typically used for sidecar model + * where the proxy identifies itself as endpoint to the control plane, with + * the connection between sidecar and endpoint requiring authentication. If + * this field is not set, authentication is disabled(open). Applicable only + * when EndpointPolicyType is SIDECAR_PROXY. + * + * Generated from protobuf field string client_tls_policy = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $client_tls_policy = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the EndpointPolicy resource. It matches pattern + * `projects/{project}/locations/global/endpointPolicies/{endpoint_policy}`. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The timestamp when the resource was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The timestamp when the resource was updated. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. Set of label tags associated with the EndpointPolicy resource. + * @type int $type + * Required. The type of endpoint policy. This is primarily used to validate + * the configuration. + * @type string $authorization_policy + * Optional. This field specifies the URL of AuthorizationPolicy resource that + * applies authorization policies to the inbound traffic at the + * matched endpoints. Refer to Authorization. If this field is not + * specified, authorization is disabled(no authz checks) for this + * endpoint. + * @type \Google\Cloud\NetworkServices\V1\EndpointMatcher $endpoint_matcher + * Required. A matcher that selects endpoints to which the policies should be + * applied. + * @type \Google\Cloud\NetworkServices\V1\TrafficPortSelector $traffic_port_selector + * Optional. Port selector for the (matched) endpoints. If no port selector is + * provided, the matched config is applied to all ports. + * @type string $description + * Optional. A free-text description of the resource. Max length 1024 + * characters. + * @type string $server_tls_policy + * Optional. A URL referring to ServerTlsPolicy resource. ServerTlsPolicy is + * used to determine the authentication policy to be applied to terminate the + * inbound traffic at the identified backends. If this field is not set, + * authentication is disabled(open) for this endpoint. + * @type string $client_tls_policy + * Optional. A URL referring to a ClientTlsPolicy resource. ClientTlsPolicy + * can be set to specify the authentication for traffic from the proxy to the + * actual endpoints. More specifically, it is applied to the outgoing traffic + * from the proxy to the endpoint. This is typically used for sidecar model + * where the proxy identifies itself as endpoint to the control plane, with + * the connection between sidecar and endpoint requiring authentication. If + * this field is not set, authentication is disabled(open). Applicable only + * when EndpointPolicyType is SIDECAR_PROXY. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\EndpointPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the EndpointPolicy resource. It matches pattern + * `projects/{project}/locations/global/endpointPolicies/{endpoint_policy}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the EndpointPolicy resource. It matches pattern + * `projects/{project}/locations/global/endpointPolicies/{endpoint_policy}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The timestamp when the resource was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The timestamp when the resource was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Optional. Set of label tags associated with the EndpointPolicy resource. + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. Set of label tags associated with the EndpointPolicy resource. + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Required. The type of endpoint policy. This is primarily used to validate + * the configuration. + * + * Generated from protobuf field .google.cloud.networkservices.v1.EndpointPolicy.EndpointPolicyType type = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Required. The type of endpoint policy. This is primarily used to validate + * the configuration. + * + * Generated from protobuf field .google.cloud.networkservices.v1.EndpointPolicy.EndpointPolicyType type = 5 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetworkServices\V1\EndpointPolicy\EndpointPolicyType::class); + $this->type = $var; + + return $this; + } + + /** + * Optional. This field specifies the URL of AuthorizationPolicy resource that + * applies authorization policies to the inbound traffic at the + * matched endpoints. Refer to Authorization. If this field is not + * specified, authorization is disabled(no authz checks) for this + * endpoint. + * + * Generated from protobuf field string authorization_policy = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getAuthorizationPolicy() + { + return $this->authorization_policy; + } + + /** + * Optional. This field specifies the URL of AuthorizationPolicy resource that + * applies authorization policies to the inbound traffic at the + * matched endpoints. Refer to Authorization. If this field is not + * specified, authorization is disabled(no authz checks) for this + * endpoint. + * + * Generated from protobuf field string authorization_policy = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setAuthorizationPolicy($var) + { + GPBUtil::checkString($var, True); + $this->authorization_policy = $var; + + return $this; + } + + /** + * Required. A matcher that selects endpoints to which the policies should be + * applied. + * + * Generated from protobuf field .google.cloud.networkservices.v1.EndpointMatcher endpoint_matcher = 9 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetworkServices\V1\EndpointMatcher|null + */ + public function getEndpointMatcher() + { + return $this->endpoint_matcher; + } + + public function hasEndpointMatcher() + { + return isset($this->endpoint_matcher); + } + + public function clearEndpointMatcher() + { + unset($this->endpoint_matcher); + } + + /** + * Required. A matcher that selects endpoints to which the policies should be + * applied. + * + * Generated from protobuf field .google.cloud.networkservices.v1.EndpointMatcher endpoint_matcher = 9 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetworkServices\V1\EndpointMatcher $var + * @return $this + */ + public function setEndpointMatcher($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkServices\V1\EndpointMatcher::class); + $this->endpoint_matcher = $var; + + return $this; + } + + /** + * Optional. Port selector for the (matched) endpoints. If no port selector is + * provided, the matched config is applied to all ports. + * + * Generated from protobuf field .google.cloud.networkservices.v1.TrafficPortSelector traffic_port_selector = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\NetworkServices\V1\TrafficPortSelector|null + */ + public function getTrafficPortSelector() + { + return $this->traffic_port_selector; + } + + public function hasTrafficPortSelector() + { + return isset($this->traffic_port_selector); + } + + public function clearTrafficPortSelector() + { + unset($this->traffic_port_selector); + } + + /** + * Optional. Port selector for the (matched) endpoints. If no port selector is + * provided, the matched config is applied to all ports. + * + * Generated from protobuf field .google.cloud.networkservices.v1.TrafficPortSelector traffic_port_selector = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\NetworkServices\V1\TrafficPortSelector $var + * @return $this + */ + public function setTrafficPortSelector($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkServices\V1\TrafficPortSelector::class); + $this->traffic_port_selector = $var; + + return $this; + } + + /** + * Optional. A free-text description of the resource. Max length 1024 + * characters. + * + * Generated from protobuf field string description = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. A free-text description of the resource. Max length 1024 + * characters. + * + * Generated from protobuf field string description = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Optional. A URL referring to ServerTlsPolicy resource. ServerTlsPolicy is + * used to determine the authentication policy to be applied to terminate the + * inbound traffic at the identified backends. If this field is not set, + * authentication is disabled(open) for this endpoint. + * + * Generated from protobuf field string server_tls_policy = 12 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getServerTlsPolicy() + { + return $this->server_tls_policy; + } + + /** + * Optional. A URL referring to ServerTlsPolicy resource. ServerTlsPolicy is + * used to determine the authentication policy to be applied to terminate the + * inbound traffic at the identified backends. If this field is not set, + * authentication is disabled(open) for this endpoint. + * + * Generated from protobuf field string server_tls_policy = 12 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setServerTlsPolicy($var) + { + GPBUtil::checkString($var, True); + $this->server_tls_policy = $var; + + return $this; + } + + /** + * Optional. A URL referring to a ClientTlsPolicy resource. ClientTlsPolicy + * can be set to specify the authentication for traffic from the proxy to the + * actual endpoints. More specifically, it is applied to the outgoing traffic + * from the proxy to the endpoint. This is typically used for sidecar model + * where the proxy identifies itself as endpoint to the control plane, with + * the connection between sidecar and endpoint requiring authentication. If + * this field is not set, authentication is disabled(open). Applicable only + * when EndpointPolicyType is SIDECAR_PROXY. + * + * Generated from protobuf field string client_tls_policy = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getClientTlsPolicy() + { + return $this->client_tls_policy; + } + + /** + * Optional. A URL referring to a ClientTlsPolicy resource. ClientTlsPolicy + * can be set to specify the authentication for traffic from the proxy to the + * actual endpoints. More specifically, it is applied to the outgoing traffic + * from the proxy to the endpoint. This is typically used for sidecar model + * where the proxy identifies itself as endpoint to the control plane, with + * the connection between sidecar and endpoint requiring authentication. If + * this field is not set, authentication is disabled(open). Applicable only + * when EndpointPolicyType is SIDECAR_PROXY. + * + * Generated from protobuf field string client_tls_policy = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setClientTlsPolicy($var) + { + GPBUtil::checkString($var, True); + $this->client_tls_policy = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/EndpointPolicy/EndpointPolicyType.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/EndpointPolicy/EndpointPolicyType.php new file mode 100644 index 000000000000..98d7dae9e798 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/EndpointPolicy/EndpointPolicyType.php @@ -0,0 +1,64 @@ +google.cloud.networkservices.v1.EndpointPolicy.EndpointPolicyType + */ +class EndpointPolicyType +{ + /** + * Default value. Must not be used. + * + * Generated from protobuf enum ENDPOINT_POLICY_TYPE_UNSPECIFIED = 0; + */ + const ENDPOINT_POLICY_TYPE_UNSPECIFIED = 0; + /** + * Represents a proxy deployed as a sidecar. + * + * Generated from protobuf enum SIDECAR_PROXY = 1; + */ + const SIDECAR_PROXY = 1; + /** + * Represents a proxyless gRPC backend. + * + * Generated from protobuf enum GRPC_SERVER = 2; + */ + const GRPC_SERVER = 2; + + private static $valueToName = [ + self::ENDPOINT_POLICY_TYPE_UNSPECIFIED => 'ENDPOINT_POLICY_TYPE_UNSPECIFIED', + self::SIDECAR_PROXY => 'SIDECAR_PROXY', + self::GRPC_SERVER => 'GRPC_SERVER', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(EndpointPolicyType::class, \Google\Cloud\NetworkServices\V1\EndpointPolicy_EndpointPolicyType::class); + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/EventType.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/EventType.php new file mode 100644 index 000000000000..fd2bd9ecfea8 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/EventType.php @@ -0,0 +1,95 @@ +google.cloud.networkservices.v1.EventType + */ +class EventType +{ + /** + * Unspecified value. Do not use. + * + * Generated from protobuf enum EVENT_TYPE_UNSPECIFIED = 0; + */ + const EVENT_TYPE_UNSPECIFIED = 0; + /** + * If included in `supported_events`, + * the extension is called when the HTTP request headers arrive. + * + * Generated from protobuf enum REQUEST_HEADERS = 1; + */ + const REQUEST_HEADERS = 1; + /** + * If included in `supported_events`, + * the extension is called when the HTTP request body arrives. + * + * Generated from protobuf enum REQUEST_BODY = 2; + */ + const REQUEST_BODY = 2; + /** + * If included in `supported_events`, + * the extension is called when the HTTP response headers arrive. + * + * Generated from protobuf enum RESPONSE_HEADERS = 3; + */ + const RESPONSE_HEADERS = 3; + /** + * If included in `supported_events`, + * the extension is called when the HTTP response body arrives. + * + * Generated from protobuf enum RESPONSE_BODY = 4; + */ + const RESPONSE_BODY = 4; + /** + * If included in `supported_events`, + * the extension is called when the HTTP request trailers arrives. + * + * Generated from protobuf enum REQUEST_TRAILERS = 5; + */ + const REQUEST_TRAILERS = 5; + /** + * If included in `supported_events`, + * the extension is called when the HTTP response trailers arrives. + * + * Generated from protobuf enum RESPONSE_TRAILERS = 6; + */ + const RESPONSE_TRAILERS = 6; + + private static $valueToName = [ + self::EVENT_TYPE_UNSPECIFIED => 'EVENT_TYPE_UNSPECIFIED', + self::REQUEST_HEADERS => 'REQUEST_HEADERS', + self::REQUEST_BODY => 'REQUEST_BODY', + self::RESPONSE_HEADERS => 'RESPONSE_HEADERS', + self::RESPONSE_BODY => 'RESPONSE_BODY', + self::REQUEST_TRAILERS => 'REQUEST_TRAILERS', + self::RESPONSE_TRAILERS => 'RESPONSE_TRAILERS', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ExtensionChain.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ExtensionChain.php new file mode 100644 index 000000000000..4da12b6f0838 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ExtensionChain.php @@ -0,0 +1,182 @@ +google.cloud.networkservices.v1.ExtensionChain + */ +class ExtensionChain extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name for this extension chain. + * The name is logged as part of the HTTP request logs. + * The name must conform with RFC-1034, is restricted to lower-cased letters, + * numbers and hyphens, and can have a maximum length of 63 characters. + * Additionally, the first character must be a letter and the last a letter or + * a number. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * Required. Conditions under which this chain is invoked for a request. + * + * Generated from protobuf field .google.cloud.networkservices.v1.ExtensionChain.MatchCondition match_condition = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $match_condition = null; + /** + * Required. A set of extensions to execute for the matching request. + * At least one extension is required. + * Up to 3 extensions can be defined for each extension chain + * for `LbTrafficExtension` resource. + * `LbRouteExtension` chains are limited to 1 extension per extension chain. + * + * Generated from protobuf field repeated .google.cloud.networkservices.v1.ExtensionChain.Extension extensions = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + private $extensions; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name for this extension chain. + * The name is logged as part of the HTTP request logs. + * The name must conform with RFC-1034, is restricted to lower-cased letters, + * numbers and hyphens, and can have a maximum length of 63 characters. + * Additionally, the first character must be a letter and the last a letter or + * a number. + * @type \Google\Cloud\NetworkServices\V1\ExtensionChain\MatchCondition $match_condition + * Required. Conditions under which this chain is invoked for a request. + * @type array<\Google\Cloud\NetworkServices\V1\ExtensionChain\Extension>|\Google\Protobuf\Internal\RepeatedField $extensions + * Required. A set of extensions to execute for the matching request. + * At least one extension is required. + * Up to 3 extensions can be defined for each extension chain + * for `LbTrafficExtension` resource. + * `LbRouteExtension` chains are limited to 1 extension per extension chain. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\Dep::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name for this extension chain. + * The name is logged as part of the HTTP request logs. + * The name must conform with RFC-1034, is restricted to lower-cased letters, + * numbers and hyphens, and can have a maximum length of 63 characters. + * Additionally, the first character must be a letter and the last a letter or + * a number. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name for this extension chain. + * The name is logged as part of the HTTP request logs. + * The name must conform with RFC-1034, is restricted to lower-cased letters, + * numbers and hyphens, and can have a maximum length of 63 characters. + * Additionally, the first character must be a letter and the last a letter or + * a number. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. Conditions under which this chain is invoked for a request. + * + * Generated from protobuf field .google.cloud.networkservices.v1.ExtensionChain.MatchCondition match_condition = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetworkServices\V1\ExtensionChain\MatchCondition|null + */ + public function getMatchCondition() + { + return $this->match_condition; + } + + public function hasMatchCondition() + { + return isset($this->match_condition); + } + + public function clearMatchCondition() + { + unset($this->match_condition); + } + + /** + * Required. Conditions under which this chain is invoked for a request. + * + * Generated from protobuf field .google.cloud.networkservices.v1.ExtensionChain.MatchCondition match_condition = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetworkServices\V1\ExtensionChain\MatchCondition $var + * @return $this + */ + public function setMatchCondition($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkServices\V1\ExtensionChain\MatchCondition::class); + $this->match_condition = $var; + + return $this; + } + + /** + * Required. A set of extensions to execute for the matching request. + * At least one extension is required. + * Up to 3 extensions can be defined for each extension chain + * for `LbTrafficExtension` resource. + * `LbRouteExtension` chains are limited to 1 extension per extension chain. + * + * Generated from protobuf field repeated .google.cloud.networkservices.v1.ExtensionChain.Extension extensions = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getExtensions() + { + return $this->extensions; + } + + /** + * Required. A set of extensions to execute for the matching request. + * At least one extension is required. + * Up to 3 extensions can be defined for each extension chain + * for `LbTrafficExtension` resource. + * `LbRouteExtension` chains are limited to 1 extension per extension chain. + * + * Generated from protobuf field repeated .google.cloud.networkservices.v1.ExtensionChain.Extension extensions = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Cloud\NetworkServices\V1\ExtensionChain\Extension>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setExtensions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkServices\V1\ExtensionChain\Extension::class); + $this->extensions = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ExtensionChain/Extension.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ExtensionChain/Extension.php new file mode 100644 index 000000000000..d2820bcd18b7 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ExtensionChain/Extension.php @@ -0,0 +1,416 @@ +google.cloud.networkservices.v1.ExtensionChain.Extension + */ +class Extension extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name for this extension. + * The name is logged as part of the HTTP request logs. + * The name must conform with RFC-1034, is restricted to lower-cased + * letters, numbers and hyphens, and can have a maximum length of 63 + * characters. Additionally, the first character must be a letter and the + * last a letter or a number. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * Optional. The `:authority` header in the gRPC request sent from Envoy + * to the extension service. + * Required for Callout extensions. + * + * Generated from protobuf field string authority = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $authority = ''; + /** + * Required. The reference to the service that runs the extension. + * Currently only callout extensions are supported here. + * To configure a callout extension, `service` must be a fully-qualified + * reference + * to a [backend + * service](https://cloud.google.com/compute/docs/reference/rest/v1/backendServices) + * in the format: + * `https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/backendServices/{backendService}` + * or + * `https://www.googleapis.com/compute/v1/projects/{project}/global/backendServices/{backendService}`. + * + * Generated from protobuf field string service = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $service = ''; + /** + * Optional. A set of events during request or response processing for which + * this extension is called. This field is required for the + * `LbTrafficExtension` resource. It must not be set for the + * `LbRouteExtension` resource. + * + * Generated from protobuf field repeated .google.cloud.networkservices.v1.EventType supported_events = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $supported_events; + /** + * Optional. Specifies the timeout for each individual message on the + * stream. The timeout must be between 10-1000 milliseconds. Required for + * Callout extensions. + * + * Generated from protobuf field .google.protobuf.Duration timeout = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $timeout = null; + /** + * Optional. Determines how the proxy behaves if the call to the extension + * fails or times out. + * When set to `TRUE`, request or response processing continues without + * error. Any subsequent extensions in the extension chain are also + * executed. When set to `FALSE` or the default setting of `FALSE` is used, + * one of the following happens: + * * If response headers have not been delivered to the downstream client, + * a generic 500 error is returned to the client. The error response can be + * tailored by configuring a custom error response in the load balancer. + * * If response headers have been delivered, then the HTTP stream to the + * downstream client is reset. + * + * Generated from protobuf field bool fail_open = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $fail_open = false; + /** + * Optional. List of the HTTP headers to forward to the extension + * (from the client or backend). If omitted, all headers are sent. + * Each element is a string indicating the header name. + * + * Generated from protobuf field repeated string forward_headers = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $forward_headers; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name for this extension. + * The name is logged as part of the HTTP request logs. + * The name must conform with RFC-1034, is restricted to lower-cased + * letters, numbers and hyphens, and can have a maximum length of 63 + * characters. Additionally, the first character must be a letter and the + * last a letter or a number. + * @type string $authority + * Optional. The `:authority` header in the gRPC request sent from Envoy + * to the extension service. + * Required for Callout extensions. + * @type string $service + * Required. The reference to the service that runs the extension. + * Currently only callout extensions are supported here. + * To configure a callout extension, `service` must be a fully-qualified + * reference + * to a [backend + * service](https://cloud.google.com/compute/docs/reference/rest/v1/backendServices) + * in the format: + * `https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/backendServices/{backendService}` + * or + * `https://www.googleapis.com/compute/v1/projects/{project}/global/backendServices/{backendService}`. + * @type array|\Google\Protobuf\Internal\RepeatedField $supported_events + * Optional. A set of events during request or response processing for which + * this extension is called. This field is required for the + * `LbTrafficExtension` resource. It must not be set for the + * `LbRouteExtension` resource. + * @type \Google\Protobuf\Duration $timeout + * Optional. Specifies the timeout for each individual message on the + * stream. The timeout must be between 10-1000 milliseconds. Required for + * Callout extensions. + * @type bool $fail_open + * Optional. Determines how the proxy behaves if the call to the extension + * fails or times out. + * When set to `TRUE`, request or response processing continues without + * error. Any subsequent extensions in the extension chain are also + * executed. When set to `FALSE` or the default setting of `FALSE` is used, + * one of the following happens: + * * If response headers have not been delivered to the downstream client, + * a generic 500 error is returned to the client. The error response can be + * tailored by configuring a custom error response in the load balancer. + * * If response headers have been delivered, then the HTTP stream to the + * downstream client is reset. + * @type array|\Google\Protobuf\Internal\RepeatedField $forward_headers + * Optional. List of the HTTP headers to forward to the extension + * (from the client or backend). If omitted, all headers are sent. + * Each element is a string indicating the header name. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\Dep::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name for this extension. + * The name is logged as part of the HTTP request logs. + * The name must conform with RFC-1034, is restricted to lower-cased + * letters, numbers and hyphens, and can have a maximum length of 63 + * characters. Additionally, the first character must be a letter and the + * last a letter or a number. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name for this extension. + * The name is logged as part of the HTTP request logs. + * The name must conform with RFC-1034, is restricted to lower-cased + * letters, numbers and hyphens, and can have a maximum length of 63 + * characters. Additionally, the first character must be a letter and the + * last a letter or a number. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. The `:authority` header in the gRPC request sent from Envoy + * to the extension service. + * Required for Callout extensions. + * + * Generated from protobuf field string authority = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getAuthority() + { + return $this->authority; + } + + /** + * Optional. The `:authority` header in the gRPC request sent from Envoy + * to the extension service. + * Required for Callout extensions. + * + * Generated from protobuf field string authority = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setAuthority($var) + { + GPBUtil::checkString($var, True); + $this->authority = $var; + + return $this; + } + + /** + * Required. The reference to the service that runs the extension. + * Currently only callout extensions are supported here. + * To configure a callout extension, `service` must be a fully-qualified + * reference + * to a [backend + * service](https://cloud.google.com/compute/docs/reference/rest/v1/backendServices) + * in the format: + * `https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/backendServices/{backendService}` + * or + * `https://www.googleapis.com/compute/v1/projects/{project}/global/backendServices/{backendService}`. + * + * Generated from protobuf field string service = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getService() + { + return $this->service; + } + + /** + * Required. The reference to the service that runs the extension. + * Currently only callout extensions are supported here. + * To configure a callout extension, `service` must be a fully-qualified + * reference + * to a [backend + * service](https://cloud.google.com/compute/docs/reference/rest/v1/backendServices) + * in the format: + * `https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/backendServices/{backendService}` + * or + * `https://www.googleapis.com/compute/v1/projects/{project}/global/backendServices/{backendService}`. + * + * Generated from protobuf field string service = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setService($var) + { + GPBUtil::checkString($var, True); + $this->service = $var; + + return $this; + } + + /** + * Optional. A set of events during request or response processing for which + * this extension is called. This field is required for the + * `LbTrafficExtension` resource. It must not be set for the + * `LbRouteExtension` resource. + * + * Generated from protobuf field repeated .google.cloud.networkservices.v1.EventType supported_events = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSupportedEvents() + { + return $this->supported_events; + } + + /** + * Optional. A set of events during request or response processing for which + * this extension is called. This field is required for the + * `LbTrafficExtension` resource. It must not be set for the + * `LbRouteExtension` resource. + * + * Generated from protobuf field repeated .google.cloud.networkservices.v1.EventType supported_events = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSupportedEvents($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\NetworkServices\V1\EventType::class); + $this->supported_events = $arr; + + return $this; + } + + /** + * Optional. Specifies the timeout for each individual message on the + * stream. The timeout must be between 10-1000 milliseconds. Required for + * Callout extensions. + * + * Generated from protobuf field .google.protobuf.Duration timeout = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Duration|null + */ + public function getTimeout() + { + return $this->timeout; + } + + public function hasTimeout() + { + return isset($this->timeout); + } + + public function clearTimeout() + { + unset($this->timeout); + } + + /** + * Optional. Specifies the timeout for each individual message on the + * stream. The timeout must be between 10-1000 milliseconds. Required for + * Callout extensions. + * + * Generated from protobuf field .google.protobuf.Duration timeout = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setTimeout($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->timeout = $var; + + return $this; + } + + /** + * Optional. Determines how the proxy behaves if the call to the extension + * fails or times out. + * When set to `TRUE`, request or response processing continues without + * error. Any subsequent extensions in the extension chain are also + * executed. When set to `FALSE` or the default setting of `FALSE` is used, + * one of the following happens: + * * If response headers have not been delivered to the downstream client, + * a generic 500 error is returned to the client. The error response can be + * tailored by configuring a custom error response in the load balancer. + * * If response headers have been delivered, then the HTTP stream to the + * downstream client is reset. + * + * Generated from protobuf field bool fail_open = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getFailOpen() + { + return $this->fail_open; + } + + /** + * Optional. Determines how the proxy behaves if the call to the extension + * fails or times out. + * When set to `TRUE`, request or response processing continues without + * error. Any subsequent extensions in the extension chain are also + * executed. When set to `FALSE` or the default setting of `FALSE` is used, + * one of the following happens: + * * If response headers have not been delivered to the downstream client, + * a generic 500 error is returned to the client. The error response can be + * tailored by configuring a custom error response in the load balancer. + * * If response headers have been delivered, then the HTTP stream to the + * downstream client is reset. + * + * Generated from protobuf field bool fail_open = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setFailOpen($var) + { + GPBUtil::checkBool($var); + $this->fail_open = $var; + + return $this; + } + + /** + * Optional. List of the HTTP headers to forward to the extension + * (from the client or backend). If omitted, all headers are sent. + * Each element is a string indicating the header name. + * + * Generated from protobuf field repeated string forward_headers = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getForwardHeaders() + { + return $this->forward_headers; + } + + /** + * Optional. List of the HTTP headers to forward to the extension + * (from the client or backend). If omitted, all headers are sent. + * Each element is a string indicating the header name. + * + * Generated from protobuf field repeated string forward_headers = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setForwardHeaders($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->forward_headers = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Extension::class, \Google\Cloud\NetworkServices\V1\ExtensionChain_Extension::class); + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ExtensionChain/MatchCondition.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ExtensionChain/MatchCondition.php new file mode 100644 index 000000000000..b6cffb76dc23 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ExtensionChain/MatchCondition.php @@ -0,0 +1,82 @@ +google.cloud.networkservices.v1.ExtensionChain.MatchCondition + */ +class MatchCondition extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A Common Expression Language (CEL) expression that is used to + * match requests for which the extension chain is executed. + * For more information, see [CEL matcher language + * reference](https://cloud.google.com/service-extensions/docs/cel-matcher-language-reference). + * + * Generated from protobuf field string cel_expression = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $cel_expression = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $cel_expression + * Required. A Common Expression Language (CEL) expression that is used to + * match requests for which the extension chain is executed. + * For more information, see [CEL matcher language + * reference](https://cloud.google.com/service-extensions/docs/cel-matcher-language-reference). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\Dep::initOnce(); + parent::__construct($data); + } + + /** + * Required. A Common Expression Language (CEL) expression that is used to + * match requests for which the extension chain is executed. + * For more information, see [CEL matcher language + * reference](https://cloud.google.com/service-extensions/docs/cel-matcher-language-reference). + * + * Generated from protobuf field string cel_expression = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getCelExpression() + { + return $this->cel_expression; + } + + /** + * Required. A Common Expression Language (CEL) expression that is used to + * match requests for which the extension chain is executed. + * For more information, see [CEL matcher language + * reference](https://cloud.google.com/service-extensions/docs/cel-matcher-language-reference). + * + * Generated from protobuf field string cel_expression = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setCelExpression($var) + { + GPBUtil::checkString($var, True); + $this->cel_expression = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(MatchCondition::class, \Google\Cloud\NetworkServices\V1\ExtensionChain_MatchCondition::class); + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/Gateway.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/Gateway.php new file mode 100644 index 000000000000..234827599ae4 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/Gateway.php @@ -0,0 +1,444 @@ +google.cloud.networkservices.v1.Gateway + */ +class Gateway extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the Gateway resource. It matches pattern + * `projects/*/locations/*/gateways/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * Output only. Server-defined URL of this resource + * + * Generated from protobuf field string self_link = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $self_link = ''; + /** + * Output only. The timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The timestamp when the resource was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Optional. Set of label tags associated with the Gateway resource. + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Optional. A free-text description of the resource. Max length 1024 + * characters. + * + * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Immutable. The type of the customer managed gateway. + * This field is required. If unspecified, an error is returned. + * + * Generated from protobuf field .google.cloud.networkservices.v1.Gateway.Type type = 6 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $type = 0; + /** + * Required. One or more ports that the Gateway must receive traffic on. The + * proxy binds to the ports specified. Gateway listen on 0.0.0.0 on the ports + * specified below. + * + * Generated from protobuf field repeated int32 ports = 11 [(.google.api.field_behavior) = REQUIRED]; + */ + private $ports; + /** + * Required. Immutable. Scope determines how configuration across multiple + * Gateway instances are merged. The configuration for multiple Gateway + * instances with the same scope will be merged as presented as a single + * coniguration to the proxy/load balancer. + * Max length 64 characters. + * Scope should start with a letter and can only have letters, numbers, + * hyphens. + * + * Generated from protobuf field string scope = 8 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + */ + protected $scope = ''; + /** + * Optional. A fully-qualified ServerTLSPolicy URL reference. Specifies how + * TLS traffic is terminated. If empty, TLS termination is disabled. + * + * Generated from protobuf field string server_tls_policy = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $server_tls_policy = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the Gateway resource. It matches pattern + * `projects/*/locations/*/gateways/`. + * @type string $self_link + * Output only. Server-defined URL of this resource + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The timestamp when the resource was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The timestamp when the resource was updated. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. Set of label tags associated with the Gateway resource. + * @type string $description + * Optional. A free-text description of the resource. Max length 1024 + * characters. + * @type int $type + * Immutable. The type of the customer managed gateway. + * This field is required. If unspecified, an error is returned. + * @type array|\Google\Protobuf\Internal\RepeatedField $ports + * Required. One or more ports that the Gateway must receive traffic on. The + * proxy binds to the ports specified. Gateway listen on 0.0.0.0 on the ports + * specified below. + * @type string $scope + * Required. Immutable. Scope determines how configuration across multiple + * Gateway instances are merged. The configuration for multiple Gateway + * instances with the same scope will be merged as presented as a single + * coniguration to the proxy/load balancer. + * Max length 64 characters. + * Scope should start with a letter and can only have letters, numbers, + * hyphens. + * @type string $server_tls_policy + * Optional. A fully-qualified ServerTLSPolicy URL reference. Specifies how + * TLS traffic is terminated. If empty, TLS termination is disabled. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\Gateway::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the Gateway resource. It matches pattern + * `projects/*/locations/*/gateways/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the Gateway resource. It matches pattern + * `projects/*/locations/*/gateways/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. Server-defined URL of this resource + * + * Generated from protobuf field string self_link = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getSelfLink() + { + return $this->self_link; + } + + /** + * Output only. Server-defined URL of this resource + * + * Generated from protobuf field string self_link = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setSelfLink($var) + { + GPBUtil::checkString($var, True); + $this->self_link = $var; + + return $this; + } + + /** + * Output only. The timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The timestamp when the resource was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The timestamp when the resource was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Optional. Set of label tags associated with the Gateway resource. + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. Set of label tags associated with the Gateway resource. + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Optional. A free-text description of the resource. Max length 1024 + * characters. + * + * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. A free-text description of the resource. Max length 1024 + * characters. + * + * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Immutable. The type of the customer managed gateway. + * This field is required. If unspecified, an error is returned. + * + * Generated from protobuf field .google.cloud.networkservices.v1.Gateway.Type type = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Immutable. The type of the customer managed gateway. + * This field is required. If unspecified, an error is returned. + * + * Generated from protobuf field .google.cloud.networkservices.v1.Gateway.Type type = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetworkServices\V1\Gateway\Type::class); + $this->type = $var; + + return $this; + } + + /** + * Required. One or more ports that the Gateway must receive traffic on. The + * proxy binds to the ports specified. Gateway listen on 0.0.0.0 on the ports + * specified below. + * + * Generated from protobuf field repeated int32 ports = 11 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPorts() + { + return $this->ports; + } + + /** + * Required. One or more ports that the Gateway must receive traffic on. The + * proxy binds to the ports specified. Gateway listen on 0.0.0.0 on the ports + * specified below. + * + * Generated from protobuf field repeated int32 ports = 11 [(.google.api.field_behavior) = REQUIRED]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPorts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); + $this->ports = $arr; + + return $this; + } + + /** + * Required. Immutable. Scope determines how configuration across multiple + * Gateway instances are merged. The configuration for multiple Gateway + * instances with the same scope will be merged as presented as a single + * coniguration to the proxy/load balancer. + * Max length 64 characters. + * Scope should start with a letter and can only have letters, numbers, + * hyphens. + * + * Generated from protobuf field string scope = 8 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getScope() + { + return $this->scope; + } + + /** + * Required. Immutable. Scope determines how configuration across multiple + * Gateway instances are merged. The configuration for multiple Gateway + * instances with the same scope will be merged as presented as a single + * coniguration to the proxy/load balancer. + * Max length 64 characters. + * Scope should start with a letter and can only have letters, numbers, + * hyphens. + * + * Generated from protobuf field string scope = 8 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * @param string $var + * @return $this + */ + public function setScope($var) + { + GPBUtil::checkString($var, True); + $this->scope = $var; + + return $this; + } + + /** + * Optional. A fully-qualified ServerTLSPolicy URL reference. Specifies how + * TLS traffic is terminated. If empty, TLS termination is disabled. + * + * Generated from protobuf field string server_tls_policy = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getServerTlsPolicy() + { + return $this->server_tls_policy; + } + + /** + * Optional. A fully-qualified ServerTLSPolicy URL reference. Specifies how + * TLS traffic is terminated. If empty, TLS termination is disabled. + * + * Generated from protobuf field string server_tls_policy = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setServerTlsPolicy($var) + { + GPBUtil::checkString($var, True); + $this->server_tls_policy = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/Gateway/Type.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/Gateway/Type.php new file mode 100644 index 000000000000..94d7aa0e2f27 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/Gateway/Type.php @@ -0,0 +1,68 @@ +google.cloud.networkservices.v1.Gateway.Type + */ +class Type +{ + /** + * The type of the customer managed gateway is unspecified. + * + * Generated from protobuf enum TYPE_UNSPECIFIED = 0; + */ + const TYPE_UNSPECIFIED = 0; + /** + * The type of the customer managed gateway is TrafficDirector Open + * Mesh. + * + * Generated from protobuf enum OPEN_MESH = 1; + */ + const OPEN_MESH = 1; + /** + * The type of the customer managed gateway is SecureWebGateway (SWG). + * + * Generated from protobuf enum SECURE_WEB_GATEWAY = 2; + */ + const SECURE_WEB_GATEWAY = 2; + + private static $valueToName = [ + self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', + self::OPEN_MESH => 'OPEN_MESH', + self::SECURE_WEB_GATEWAY => 'SECURE_WEB_GATEWAY', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Type::class, \Google\Cloud\NetworkServices\V1\Gateway_Type::class); + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GetEndpointPolicyRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GetEndpointPolicyRequest.php new file mode 100644 index 000000000000..c16edadac31e --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GetEndpointPolicyRequest.php @@ -0,0 +1,86 @@ +google.cloud.networkservices.v1.GetEndpointPolicyRequest + */ +class GetEndpointPolicyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A name of the EndpointPolicy to get. Must be in the format + * `projects/*/locations/global/endpointPolicies/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. A name of the EndpointPolicy to get. Must be in the format + * `projects/*/locations/global/endpointPolicies/*`. Please see + * {@see NetworkServicesClient::endpointPolicyName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkServices\V1\GetEndpointPolicyRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. A name of the EndpointPolicy to get. Must be in the format + * `projects/*/locations/global/endpointPolicies/*`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\EndpointPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. A name of the EndpointPolicy to get. Must be in the format + * `projects/*/locations/global/endpointPolicies/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. A name of the EndpointPolicy to get. Must be in the format + * `projects/*/locations/global/endpointPolicies/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GetGatewayRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GetGatewayRequest.php new file mode 100644 index 000000000000..5c9c39116dcf --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GetGatewayRequest.php @@ -0,0 +1,86 @@ +google.cloud.networkservices.v1.GetGatewayRequest + */ +class GetGatewayRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A name of the Gateway to get. Must be in the format + * `projects/*/locations/*/gateways/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. A name of the Gateway to get. Must be in the format + * `projects/*/locations/*/gateways/*`. Please see + * {@see NetworkServicesClient::gatewayName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkServices\V1\GetGatewayRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. A name of the Gateway to get. Must be in the format + * `projects/*/locations/*/gateways/*`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\Gateway::initOnce(); + parent::__construct($data); + } + + /** + * Required. A name of the Gateway to get. Must be in the format + * `projects/*/locations/*/gateways/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. A name of the Gateway to get. Must be in the format + * `projects/*/locations/*/gateways/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GetGrpcRouteRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GetGrpcRouteRequest.php new file mode 100644 index 000000000000..c668d636f16f --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GetGrpcRouteRequest.php @@ -0,0 +1,86 @@ +google.cloud.networkservices.v1.GetGrpcRouteRequest + */ +class GetGrpcRouteRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A name of the GrpcRoute to get. Must be in the format + * `projects/*/locations/global/grpcRoutes/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. A name of the GrpcRoute to get. Must be in the format + * `projects/*/locations/global/grpcRoutes/*`. Please see + * {@see NetworkServicesClient::grpcRouteName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkServices\V1\GetGrpcRouteRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. A name of the GrpcRoute to get. Must be in the format + * `projects/*/locations/global/grpcRoutes/*`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\GrpcRoute::initOnce(); + parent::__construct($data); + } + + /** + * Required. A name of the GrpcRoute to get. Must be in the format + * `projects/*/locations/global/grpcRoutes/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. A name of the GrpcRoute to get. Must be in the format + * `projects/*/locations/global/grpcRoutes/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GetHttpRouteRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GetHttpRouteRequest.php new file mode 100644 index 000000000000..5b99dbcaa7d9 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GetHttpRouteRequest.php @@ -0,0 +1,86 @@ +google.cloud.networkservices.v1.GetHttpRouteRequest + */ +class GetHttpRouteRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A name of the HttpRoute to get. Must be in the format + * `projects/*/locations/global/httpRoutes/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. A name of the HttpRoute to get. Must be in the format + * `projects/*/locations/global/httpRoutes/*`. Please see + * {@see NetworkServicesClient::httpRouteName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkServices\V1\GetHttpRouteRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. A name of the HttpRoute to get. Must be in the format + * `projects/*/locations/global/httpRoutes/*`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\HttpRoute::initOnce(); + parent::__construct($data); + } + + /** + * Required. A name of the HttpRoute to get. Must be in the format + * `projects/*/locations/global/httpRoutes/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. A name of the HttpRoute to get. Must be in the format + * `projects/*/locations/global/httpRoutes/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GetLbRouteExtensionRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GetLbRouteExtensionRequest.php new file mode 100644 index 000000000000..42db13d6da9d --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GetLbRouteExtensionRequest.php @@ -0,0 +1,91 @@ +google.cloud.networkservices.v1.GetLbRouteExtensionRequest + */ +class GetLbRouteExtensionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A name of the `LbRouteExtension` resource to get. Must be in the + * format + * `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. A name of the `LbRouteExtension` resource to get. Must be in the + * format + * `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}`. Please see + * {@see DepServiceClient::lbRouteExtensionName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkServices\V1\GetLbRouteExtensionRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. A name of the `LbRouteExtension` resource to get. Must be in the + * format + * `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\Dep::initOnce(); + parent::__construct($data); + } + + /** + * Required. A name of the `LbRouteExtension` resource to get. Must be in the + * format + * `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. A name of the `LbRouteExtension` resource to get. Must be in the + * format + * `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GetLbTrafficExtensionRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GetLbTrafficExtensionRequest.php new file mode 100644 index 000000000000..eebf6df47dc9 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GetLbTrafficExtensionRequest.php @@ -0,0 +1,91 @@ +google.cloud.networkservices.v1.GetLbTrafficExtensionRequest + */ +class GetLbTrafficExtensionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A name of the `LbTrafficExtension` resource to get. Must be in + * the format + * `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. A name of the `LbTrafficExtension` resource to get. Must be in + * the format + * `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}`. Please see + * {@see DepServiceClient::lbTrafficExtensionName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkServices\V1\GetLbTrafficExtensionRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. A name of the `LbTrafficExtension` resource to get. Must be in + * the format + * `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\Dep::initOnce(); + parent::__construct($data); + } + + /** + * Required. A name of the `LbTrafficExtension` resource to get. Must be in + * the format + * `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. A name of the `LbTrafficExtension` resource to get. Must be in + * the format + * `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GetMeshRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GetMeshRequest.php new file mode 100644 index 000000000000..ae35fe07d164 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GetMeshRequest.php @@ -0,0 +1,86 @@ +google.cloud.networkservices.v1.GetMeshRequest + */ +class GetMeshRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A name of the Mesh to get. Must be in the format + * `projects/*/locations/global/meshes/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. A name of the Mesh to get. Must be in the format + * `projects/*/locations/global/meshes/*`. Please see + * {@see NetworkServicesClient::meshName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkServices\V1\GetMeshRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. A name of the Mesh to get. Must be in the format + * `projects/*/locations/global/meshes/*`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\Mesh::initOnce(); + parent::__construct($data); + } + + /** + * Required. A name of the Mesh to get. Must be in the format + * `projects/*/locations/global/meshes/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. A name of the Mesh to get. Must be in the format + * `projects/*/locations/global/meshes/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GetServiceBindingRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GetServiceBindingRequest.php new file mode 100644 index 000000000000..f84ff9576bac --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GetServiceBindingRequest.php @@ -0,0 +1,86 @@ +google.cloud.networkservices.v1.GetServiceBindingRequest + */ +class GetServiceBindingRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A name of the ServiceBinding to get. Must be in the format + * `projects/*/locations/global/serviceBindings/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. A name of the ServiceBinding to get. Must be in the format + * `projects/*/locations/global/serviceBindings/*`. Please see + * {@see NetworkServicesClient::serviceBindingName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkServices\V1\GetServiceBindingRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. A name of the ServiceBinding to get. Must be in the format + * `projects/*/locations/global/serviceBindings/*`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\ServiceBinding::initOnce(); + parent::__construct($data); + } + + /** + * Required. A name of the ServiceBinding to get. Must be in the format + * `projects/*/locations/global/serviceBindings/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. A name of the ServiceBinding to get. Must be in the format + * `projects/*/locations/global/serviceBindings/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GetTcpRouteRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GetTcpRouteRequest.php new file mode 100644 index 000000000000..94c302d6af56 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GetTcpRouteRequest.php @@ -0,0 +1,86 @@ +google.cloud.networkservices.v1.GetTcpRouteRequest + */ +class GetTcpRouteRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A name of the TcpRoute to get. Must be in the format + * `projects/*/locations/global/tcpRoutes/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. A name of the TcpRoute to get. Must be in the format + * `projects/*/locations/global/tcpRoutes/*`. Please see + * {@see NetworkServicesClient::tcpRouteName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkServices\V1\GetTcpRouteRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. A name of the TcpRoute to get. Must be in the format + * `projects/*/locations/global/tcpRoutes/*`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\TcpRoute::initOnce(); + parent::__construct($data); + } + + /** + * Required. A name of the TcpRoute to get. Must be in the format + * `projects/*/locations/global/tcpRoutes/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. A name of the TcpRoute to get. Must be in the format + * `projects/*/locations/global/tcpRoutes/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GetTlsRouteRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GetTlsRouteRequest.php new file mode 100644 index 000000000000..327101152fdd --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GetTlsRouteRequest.php @@ -0,0 +1,86 @@ +google.cloud.networkservices.v1.GetTlsRouteRequest + */ +class GetTlsRouteRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A name of the TlsRoute to get. Must be in the format + * `projects/*/locations/global/tlsRoutes/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. A name of the TlsRoute to get. Must be in the format + * `projects/*/locations/global/tlsRoutes/*`. Please see + * {@see NetworkServicesClient::tlsRouteName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkServices\V1\GetTlsRouteRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. A name of the TlsRoute to get. Must be in the format + * `projects/*/locations/global/tlsRoutes/*`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\TlsRoute::initOnce(); + parent::__construct($data); + } + + /** + * Required. A name of the TlsRoute to get. Must be in the format + * `projects/*/locations/global/tlsRoutes/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. A name of the TlsRoute to get. Must be in the format + * `projects/*/locations/global/tlsRoutes/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute.php new file mode 100644 index 000000000000..2404004aec76 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute.php @@ -0,0 +1,534 @@ +google.cloud.networkservices.v1.GrpcRoute + */ +class GrpcRoute extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the GrpcRoute resource. It matches pattern + * `projects/*/locations/global/grpcRoutes/` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * Output only. Server-defined URL of this resource + * + * Generated from protobuf field string self_link = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $self_link = ''; + /** + * Output only. The timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The timestamp when the resource was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Optional. Set of label tags associated with the GrpcRoute resource. + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Optional. A free-text description of the resource. Max length 1024 + * characters. + * + * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Required. Service hostnames with an optional port for which this route + * describes traffic. + * Format: [:] + * Hostname is the fully qualified domain name of a network host. This matches + * the RFC 1123 definition of a hostname with 2 notable exceptions: + * - IPs are not allowed. + * - A hostname may be prefixed with a wildcard label (`*.`). The wildcard + * label must appear by itself as the first label. + * Hostname can be "precise" which is a domain name without the terminating + * dot of a network host (e.g. `foo.example.com`) or "wildcard", which is a + * domain name prefixed with a single wildcard label (e.g. `*.example.com`). + * Note that as per RFC1035 and RFC1123, a label must consist of lower case + * alphanumeric characters or '-', and must start and end with an alphanumeric + * character. No other punctuation is allowed. + * The routes associated with a Mesh or Gateway must have unique hostnames. If + * you attempt to attach multiple routes with conflicting hostnames, the + * configuration will be rejected. + * For example, while it is acceptable for routes for the hostnames + * `*.foo.bar.com` and `*.bar.com` to be associated with the same route, it is + * not possible to associate two routes both with `*.bar.com` or both with + * `bar.com`. + * If a port is specified, then gRPC clients must use the channel URI with the + * port to match this rule (i.e. "xds:///service:123"), otherwise they must + * supply the URI without a port (i.e. "xds:///service"). + * + * Generated from protobuf field repeated string hostnames = 6 [(.google.api.field_behavior) = REQUIRED]; + */ + private $hostnames; + /** + * Optional. Meshes defines a list of meshes this GrpcRoute is attached to, as + * one of the routing rules to route the requests served by the mesh. + * Each mesh reference should match the pattern: + * `projects/*/locations/global/meshes/` + * + * Generated from protobuf field repeated string meshes = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + private $meshes; + /** + * Optional. Gateways defines a list of gateways this GrpcRoute is attached + * to, as one of the routing rules to route the requests served by the + * gateway. + * Each gateway reference should match the pattern: + * `projects/*/locations/global/gateways/` + * + * Generated from protobuf field repeated string gateways = 10 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + private $gateways; + /** + * Required. A list of detailed rules defining how to route traffic. + * Within a single GrpcRoute, the GrpcRoute.RouteAction associated with the + * first matching GrpcRoute.RouteRule will be executed. At least one rule + * must be supplied. + * + * Generated from protobuf field repeated .google.cloud.networkservices.v1.GrpcRoute.RouteRule rules = 7 [(.google.api.field_behavior) = REQUIRED]; + */ + private $rules; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the GrpcRoute resource. It matches pattern + * `projects/*/locations/global/grpcRoutes/` + * @type string $self_link + * Output only. Server-defined URL of this resource + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The timestamp when the resource was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The timestamp when the resource was updated. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. Set of label tags associated with the GrpcRoute resource. + * @type string $description + * Optional. A free-text description of the resource. Max length 1024 + * characters. + * @type array|\Google\Protobuf\Internal\RepeatedField $hostnames + * Required. Service hostnames with an optional port for which this route + * describes traffic. + * Format: [:] + * Hostname is the fully qualified domain name of a network host. This matches + * the RFC 1123 definition of a hostname with 2 notable exceptions: + * - IPs are not allowed. + * - A hostname may be prefixed with a wildcard label (`*.`). The wildcard + * label must appear by itself as the first label. + * Hostname can be "precise" which is a domain name without the terminating + * dot of a network host (e.g. `foo.example.com`) or "wildcard", which is a + * domain name prefixed with a single wildcard label (e.g. `*.example.com`). + * Note that as per RFC1035 and RFC1123, a label must consist of lower case + * alphanumeric characters or '-', and must start and end with an alphanumeric + * character. No other punctuation is allowed. + * The routes associated with a Mesh or Gateway must have unique hostnames. If + * you attempt to attach multiple routes with conflicting hostnames, the + * configuration will be rejected. + * For example, while it is acceptable for routes for the hostnames + * `*.foo.bar.com` and `*.bar.com` to be associated with the same route, it is + * not possible to associate two routes both with `*.bar.com` or both with + * `bar.com`. + * If a port is specified, then gRPC clients must use the channel URI with the + * port to match this rule (i.e. "xds:///service:123"), otherwise they must + * supply the URI without a port (i.e. "xds:///service"). + * @type array|\Google\Protobuf\Internal\RepeatedField $meshes + * Optional. Meshes defines a list of meshes this GrpcRoute is attached to, as + * one of the routing rules to route the requests served by the mesh. + * Each mesh reference should match the pattern: + * `projects/*/locations/global/meshes/` + * @type array|\Google\Protobuf\Internal\RepeatedField $gateways + * Optional. Gateways defines a list of gateways this GrpcRoute is attached + * to, as one of the routing rules to route the requests served by the + * gateway. + * Each gateway reference should match the pattern: + * `projects/*/locations/global/gateways/` + * @type array<\Google\Cloud\NetworkServices\V1\GrpcRoute\RouteRule>|\Google\Protobuf\Internal\RepeatedField $rules + * Required. A list of detailed rules defining how to route traffic. + * Within a single GrpcRoute, the GrpcRoute.RouteAction associated with the + * first matching GrpcRoute.RouteRule will be executed. At least one rule + * must be supplied. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\GrpcRoute::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the GrpcRoute resource. It matches pattern + * `projects/*/locations/global/grpcRoutes/` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the GrpcRoute resource. It matches pattern + * `projects/*/locations/global/grpcRoutes/` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. Server-defined URL of this resource + * + * Generated from protobuf field string self_link = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getSelfLink() + { + return $this->self_link; + } + + /** + * Output only. Server-defined URL of this resource + * + * Generated from protobuf field string self_link = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setSelfLink($var) + { + GPBUtil::checkString($var, True); + $this->self_link = $var; + + return $this; + } + + /** + * Output only. The timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The timestamp when the resource was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The timestamp when the resource was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Optional. Set of label tags associated with the GrpcRoute resource. + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. Set of label tags associated with the GrpcRoute resource. + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Optional. A free-text description of the resource. Max length 1024 + * characters. + * + * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. A free-text description of the resource. Max length 1024 + * characters. + * + * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Required. Service hostnames with an optional port for which this route + * describes traffic. + * Format: [:] + * Hostname is the fully qualified domain name of a network host. This matches + * the RFC 1123 definition of a hostname with 2 notable exceptions: + * - IPs are not allowed. + * - A hostname may be prefixed with a wildcard label (`*.`). The wildcard + * label must appear by itself as the first label. + * Hostname can be "precise" which is a domain name without the terminating + * dot of a network host (e.g. `foo.example.com`) or "wildcard", which is a + * domain name prefixed with a single wildcard label (e.g. `*.example.com`). + * Note that as per RFC1035 and RFC1123, a label must consist of lower case + * alphanumeric characters or '-', and must start and end with an alphanumeric + * character. No other punctuation is allowed. + * The routes associated with a Mesh or Gateway must have unique hostnames. If + * you attempt to attach multiple routes with conflicting hostnames, the + * configuration will be rejected. + * For example, while it is acceptable for routes for the hostnames + * `*.foo.bar.com` and `*.bar.com` to be associated with the same route, it is + * not possible to associate two routes both with `*.bar.com` or both with + * `bar.com`. + * If a port is specified, then gRPC clients must use the channel URI with the + * port to match this rule (i.e. "xds:///service:123"), otherwise they must + * supply the URI without a port (i.e. "xds:///service"). + * + * Generated from protobuf field repeated string hostnames = 6 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getHostnames() + { + return $this->hostnames; + } + + /** + * Required. Service hostnames with an optional port for which this route + * describes traffic. + * Format: [:] + * Hostname is the fully qualified domain name of a network host. This matches + * the RFC 1123 definition of a hostname with 2 notable exceptions: + * - IPs are not allowed. + * - A hostname may be prefixed with a wildcard label (`*.`). The wildcard + * label must appear by itself as the first label. + * Hostname can be "precise" which is a domain name without the terminating + * dot of a network host (e.g. `foo.example.com`) or "wildcard", which is a + * domain name prefixed with a single wildcard label (e.g. `*.example.com`). + * Note that as per RFC1035 and RFC1123, a label must consist of lower case + * alphanumeric characters or '-', and must start and end with an alphanumeric + * character. No other punctuation is allowed. + * The routes associated with a Mesh or Gateway must have unique hostnames. If + * you attempt to attach multiple routes with conflicting hostnames, the + * configuration will be rejected. + * For example, while it is acceptable for routes for the hostnames + * `*.foo.bar.com` and `*.bar.com` to be associated with the same route, it is + * not possible to associate two routes both with `*.bar.com` or both with + * `bar.com`. + * If a port is specified, then gRPC clients must use the channel URI with the + * port to match this rule (i.e. "xds:///service:123"), otherwise they must + * supply the URI without a port (i.e. "xds:///service"). + * + * Generated from protobuf field repeated string hostnames = 6 [(.google.api.field_behavior) = REQUIRED]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setHostnames($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->hostnames = $arr; + + return $this; + } + + /** + * Optional. Meshes defines a list of meshes this GrpcRoute is attached to, as + * one of the routing rules to route the requests served by the mesh. + * Each mesh reference should match the pattern: + * `projects/*/locations/global/meshes/` + * + * Generated from protobuf field repeated string meshes = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMeshes() + { + return $this->meshes; + } + + /** + * Optional. Meshes defines a list of meshes this GrpcRoute is attached to, as + * one of the routing rules to route the requests served by the mesh. + * Each mesh reference should match the pattern: + * `projects/*/locations/global/meshes/` + * + * Generated from protobuf field repeated string meshes = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMeshes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->meshes = $arr; + + return $this; + } + + /** + * Optional. Gateways defines a list of gateways this GrpcRoute is attached + * to, as one of the routing rules to route the requests served by the + * gateway. + * Each gateway reference should match the pattern: + * `projects/*/locations/global/gateways/` + * + * Generated from protobuf field repeated string gateways = 10 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getGateways() + { + return $this->gateways; + } + + /** + * Optional. Gateways defines a list of gateways this GrpcRoute is attached + * to, as one of the routing rules to route the requests served by the + * gateway. + * Each gateway reference should match the pattern: + * `projects/*/locations/global/gateways/` + * + * Generated from protobuf field repeated string gateways = 10 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setGateways($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->gateways = $arr; + + return $this; + } + + /** + * Required. A list of detailed rules defining how to route traffic. + * Within a single GrpcRoute, the GrpcRoute.RouteAction associated with the + * first matching GrpcRoute.RouteRule will be executed. At least one rule + * must be supplied. + * + * Generated from protobuf field repeated .google.cloud.networkservices.v1.GrpcRoute.RouteRule rules = 7 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRules() + { + return $this->rules; + } + + /** + * Required. A list of detailed rules defining how to route traffic. + * Within a single GrpcRoute, the GrpcRoute.RouteAction associated with the + * first matching GrpcRoute.RouteRule will be executed. At least one rule + * must be supplied. + * + * Generated from protobuf field repeated .google.cloud.networkservices.v1.GrpcRoute.RouteRule rules = 7 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Cloud\NetworkServices\V1\GrpcRoute\RouteRule>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRules($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkServices\V1\GrpcRoute\RouteRule::class); + $this->rules = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute/Destination.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute/Destination.php new file mode 100644 index 000000000000..97af98df7e7b --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute/Destination.php @@ -0,0 +1,165 @@ +google.cloud.networkservices.v1.GrpcRoute.Destination + */ +class Destination extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Specifies the proportion of requests forwarded to the backend + * referenced by the serviceName field. This is computed as: + * - weight/Sum(weights in this destination list). + * For non-zero values, there may be some epsilon from the exact proportion + * defined here depending on the precision an implementation supports. + * If only one serviceName is specified and it has a weight greater than 0, + * 100% of the traffic is forwarded to that backend. + * If weights are specified for any one service name, they need to be + * specified for all of them. + * If weights are unspecified for all services, then, traffic is distributed + * in equal proportions to all of them. + * + * Generated from protobuf field optional int32 weight = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $weight = null; + protected $destination_type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $service_name + * Required. The URL of a destination service to which to route traffic. + * Must refer to either a BackendService or ServiceDirectoryService. + * @type int $weight + * Optional. Specifies the proportion of requests forwarded to the backend + * referenced by the serviceName field. This is computed as: + * - weight/Sum(weights in this destination list). + * For non-zero values, there may be some epsilon from the exact proportion + * defined here depending on the precision an implementation supports. + * If only one serviceName is specified and it has a weight greater than 0, + * 100% of the traffic is forwarded to that backend. + * If weights are specified for any one service name, they need to be + * specified for all of them. + * If weights are unspecified for all services, then, traffic is distributed + * in equal proportions to all of them. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\GrpcRoute::initOnce(); + parent::__construct($data); + } + + /** + * Required. The URL of a destination service to which to route traffic. + * Must refer to either a BackendService or ServiceDirectoryService. + * + * Generated from protobuf field string service_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getServiceName() + { + return $this->readOneof(1); + } + + public function hasServiceName() + { + return $this->hasOneof(1); + } + + /** + * Required. The URL of a destination service to which to route traffic. + * Must refer to either a BackendService or ServiceDirectoryService. + * + * Generated from protobuf field string service_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setServiceName($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Optional. Specifies the proportion of requests forwarded to the backend + * referenced by the serviceName field. This is computed as: + * - weight/Sum(weights in this destination list). + * For non-zero values, there may be some epsilon from the exact proportion + * defined here depending on the precision an implementation supports. + * If only one serviceName is specified and it has a weight greater than 0, + * 100% of the traffic is forwarded to that backend. + * If weights are specified for any one service name, they need to be + * specified for all of them. + * If weights are unspecified for all services, then, traffic is distributed + * in equal proportions to all of them. + * + * Generated from protobuf field optional int32 weight = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getWeight() + { + return isset($this->weight) ? $this->weight : 0; + } + + public function hasWeight() + { + return isset($this->weight); + } + + public function clearWeight() + { + unset($this->weight); + } + + /** + * Optional. Specifies the proportion of requests forwarded to the backend + * referenced by the serviceName field. This is computed as: + * - weight/Sum(weights in this destination list). + * For non-zero values, there may be some epsilon from the exact proportion + * defined here depending on the precision an implementation supports. + * If only one serviceName is specified and it has a weight greater than 0, + * 100% of the traffic is forwarded to that backend. + * If weights are specified for any one service name, they need to be + * specified for all of them. + * If weights are unspecified for all services, then, traffic is distributed + * in equal proportions to all of them. + * + * Generated from protobuf field optional int32 weight = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setWeight($var) + { + GPBUtil::checkInt32($var); + $this->weight = $var; + + return $this; + } + + /** + * @return string + */ + public function getDestinationType() + { + return $this->whichOneof("destination_type"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Destination::class, \Google\Cloud\NetworkServices\V1\GrpcRoute_Destination::class); + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute/FaultInjectionPolicy.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute/FaultInjectionPolicy.php new file mode 100644 index 000000000000..57b6a7b3da3a --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute/FaultInjectionPolicy.php @@ -0,0 +1,129 @@ +google.cloud.networkservices.v1.GrpcRoute.FaultInjectionPolicy + */ +class FaultInjectionPolicy extends \Google\Protobuf\Internal\Message +{ + /** + * The specification for injecting delay to client requests. + * + * Generated from protobuf field optional .google.cloud.networkservices.v1.GrpcRoute.FaultInjectionPolicy.Delay delay = 1; + */ + protected $delay = null; + /** + * The specification for aborting to client requests. + * + * Generated from protobuf field optional .google.cloud.networkservices.v1.GrpcRoute.FaultInjectionPolicy.Abort abort = 2; + */ + protected $abort = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\NetworkServices\V1\GrpcRoute\FaultInjectionPolicy\Delay $delay + * The specification for injecting delay to client requests. + * @type \Google\Cloud\NetworkServices\V1\GrpcRoute\FaultInjectionPolicy\Abort $abort + * The specification for aborting to client requests. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\GrpcRoute::initOnce(); + parent::__construct($data); + } + + /** + * The specification for injecting delay to client requests. + * + * Generated from protobuf field optional .google.cloud.networkservices.v1.GrpcRoute.FaultInjectionPolicy.Delay delay = 1; + * @return \Google\Cloud\NetworkServices\V1\GrpcRoute\FaultInjectionPolicy\Delay|null + */ + public function getDelay() + { + return $this->delay; + } + + public function hasDelay() + { + return isset($this->delay); + } + + public function clearDelay() + { + unset($this->delay); + } + + /** + * The specification for injecting delay to client requests. + * + * Generated from protobuf field optional .google.cloud.networkservices.v1.GrpcRoute.FaultInjectionPolicy.Delay delay = 1; + * @param \Google\Cloud\NetworkServices\V1\GrpcRoute\FaultInjectionPolicy\Delay $var + * @return $this + */ + public function setDelay($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkServices\V1\GrpcRoute\FaultInjectionPolicy\Delay::class); + $this->delay = $var; + + return $this; + } + + /** + * The specification for aborting to client requests. + * + * Generated from protobuf field optional .google.cloud.networkservices.v1.GrpcRoute.FaultInjectionPolicy.Abort abort = 2; + * @return \Google\Cloud\NetworkServices\V1\GrpcRoute\FaultInjectionPolicy\Abort|null + */ + public function getAbort() + { + return $this->abort; + } + + public function hasAbort() + { + return isset($this->abort); + } + + public function clearAbort() + { + unset($this->abort); + } + + /** + * The specification for aborting to client requests. + * + * Generated from protobuf field optional .google.cloud.networkservices.v1.GrpcRoute.FaultInjectionPolicy.Abort abort = 2; + * @param \Google\Cloud\NetworkServices\V1\GrpcRoute\FaultInjectionPolicy\Abort $var + * @return $this + */ + public function setAbort($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkServices\V1\GrpcRoute\FaultInjectionPolicy\Abort::class); + $this->abort = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(FaultInjectionPolicy::class, \Google\Cloud\NetworkServices\V1\GrpcRoute_FaultInjectionPolicy::class); + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute/FaultInjectionPolicy/Abort.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute/FaultInjectionPolicy/Abort.php new file mode 100644 index 000000000000..fbbfc30a96a4 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute/FaultInjectionPolicy/Abort.php @@ -0,0 +1,133 @@ +google.cloud.networkservices.v1.GrpcRoute.FaultInjectionPolicy.Abort + */ +class Abort extends \Google\Protobuf\Internal\Message +{ + /** + * The HTTP status code used to abort the request. + * The value must be between 200 and 599 inclusive. + * + * Generated from protobuf field optional int32 http_status = 1; + */ + protected $http_status = null; + /** + * The percentage of traffic which will be aborted. + * The value must be between [0, 100] + * + * Generated from protobuf field optional int32 percentage = 2; + */ + protected $percentage = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $http_status + * The HTTP status code used to abort the request. + * The value must be between 200 and 599 inclusive. + * @type int $percentage + * The percentage of traffic which will be aborted. + * The value must be between [0, 100] + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\GrpcRoute::initOnce(); + parent::__construct($data); + } + + /** + * The HTTP status code used to abort the request. + * The value must be between 200 and 599 inclusive. + * + * Generated from protobuf field optional int32 http_status = 1; + * @return int + */ + public function getHttpStatus() + { + return isset($this->http_status) ? $this->http_status : 0; + } + + public function hasHttpStatus() + { + return isset($this->http_status); + } + + public function clearHttpStatus() + { + unset($this->http_status); + } + + /** + * The HTTP status code used to abort the request. + * The value must be between 200 and 599 inclusive. + * + * Generated from protobuf field optional int32 http_status = 1; + * @param int $var + * @return $this + */ + public function setHttpStatus($var) + { + GPBUtil::checkInt32($var); + $this->http_status = $var; + + return $this; + } + + /** + * The percentage of traffic which will be aborted. + * The value must be between [0, 100] + * + * Generated from protobuf field optional int32 percentage = 2; + * @return int + */ + public function getPercentage() + { + return isset($this->percentage) ? $this->percentage : 0; + } + + public function hasPercentage() + { + return isset($this->percentage); + } + + public function clearPercentage() + { + unset($this->percentage); + } + + /** + * The percentage of traffic which will be aborted. + * The value must be between [0, 100] + * + * Generated from protobuf field optional int32 percentage = 2; + * @param int $var + * @return $this + */ + public function setPercentage($var) + { + GPBUtil::checkInt32($var); + $this->percentage = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Abort::class, \Google\Cloud\NetworkServices\V1\GrpcRoute_FaultInjectionPolicy_Abort::class); + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute/FaultInjectionPolicy/Delay.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute/FaultInjectionPolicy/Delay.php new file mode 100644 index 000000000000..e36e4c35da19 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute/FaultInjectionPolicy/Delay.php @@ -0,0 +1,129 @@ +google.cloud.networkservices.v1.GrpcRoute.FaultInjectionPolicy.Delay + */ +class Delay extends \Google\Protobuf\Internal\Message +{ + /** + * Specify a fixed delay before forwarding the request. + * + * Generated from protobuf field optional .google.protobuf.Duration fixed_delay = 1; + */ + protected $fixed_delay = null; + /** + * The percentage of traffic on which delay will be injected. + * The value must be between [0, 100] + * + * Generated from protobuf field optional int32 percentage = 2; + */ + protected $percentage = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Duration $fixed_delay + * Specify a fixed delay before forwarding the request. + * @type int $percentage + * The percentage of traffic on which delay will be injected. + * The value must be between [0, 100] + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\GrpcRoute::initOnce(); + parent::__construct($data); + } + + /** + * Specify a fixed delay before forwarding the request. + * + * Generated from protobuf field optional .google.protobuf.Duration fixed_delay = 1; + * @return \Google\Protobuf\Duration|null + */ + public function getFixedDelay() + { + return $this->fixed_delay; + } + + public function hasFixedDelay() + { + return isset($this->fixed_delay); + } + + public function clearFixedDelay() + { + unset($this->fixed_delay); + } + + /** + * Specify a fixed delay before forwarding the request. + * + * Generated from protobuf field optional .google.protobuf.Duration fixed_delay = 1; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setFixedDelay($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->fixed_delay = $var; + + return $this; + } + + /** + * The percentage of traffic on which delay will be injected. + * The value must be between [0, 100] + * + * Generated from protobuf field optional int32 percentage = 2; + * @return int + */ + public function getPercentage() + { + return isset($this->percentage) ? $this->percentage : 0; + } + + public function hasPercentage() + { + return isset($this->percentage); + } + + public function clearPercentage() + { + unset($this->percentage); + } + + /** + * The percentage of traffic on which delay will be injected. + * The value must be between [0, 100] + * + * Generated from protobuf field optional int32 percentage = 2; + * @param int $var + * @return $this + */ + public function setPercentage($var) + { + GPBUtil::checkInt32($var); + $this->percentage = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Delay::class, \Google\Cloud\NetworkServices\V1\GrpcRoute_FaultInjectionPolicy_Delay::class); + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute/HeaderMatch.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute/HeaderMatch.php new file mode 100644 index 000000000000..f66b13869032 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute/HeaderMatch.php @@ -0,0 +1,142 @@ +google.cloud.networkservices.v1.GrpcRoute.HeaderMatch + */ +class HeaderMatch extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Specifies how to match against the value of the header. If not + * specified, a default value of EXACT is used. + * + * Generated from protobuf field .google.cloud.networkservices.v1.GrpcRoute.HeaderMatch.Type type = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $type = 0; + /** + * Required. The key of the header. + * + * Generated from protobuf field string key = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $key = ''; + /** + * Required. The value of the header. + * + * Generated from protobuf field string value = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $value = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $type + * Optional. Specifies how to match against the value of the header. If not + * specified, a default value of EXACT is used. + * @type string $key + * Required. The key of the header. + * @type string $value + * Required. The value of the header. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\GrpcRoute::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Specifies how to match against the value of the header. If not + * specified, a default value of EXACT is used. + * + * Generated from protobuf field .google.cloud.networkservices.v1.GrpcRoute.HeaderMatch.Type type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Optional. Specifies how to match against the value of the header. If not + * specified, a default value of EXACT is used. + * + * Generated from protobuf field .google.cloud.networkservices.v1.GrpcRoute.HeaderMatch.Type type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetworkServices\V1\GrpcRoute\HeaderMatch\Type::class); + $this->type = $var; + + return $this; + } + + /** + * Required. The key of the header. + * + * Generated from protobuf field string key = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getKey() + { + return $this->key; + } + + /** + * Required. The key of the header. + * + * Generated from protobuf field string key = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setKey($var) + { + GPBUtil::checkString($var, True); + $this->key = $var; + + return $this; + } + + /** + * Required. The value of the header. + * + * Generated from protobuf field string value = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getValue() + { + return $this->value; + } + + /** + * Required. The value of the header. + * + * Generated from protobuf field string value = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setValue($var) + { + GPBUtil::checkString($var, True); + $this->value = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(HeaderMatch::class, \Google\Cloud\NetworkServices\V1\GrpcRoute_HeaderMatch::class); + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute/HeaderMatch/Type.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute/HeaderMatch/Type.php new file mode 100644 index 000000000000..488ce2d6f01c --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute/HeaderMatch/Type.php @@ -0,0 +1,65 @@ +google.cloud.networkservices.v1.GrpcRoute.HeaderMatch.Type + */ +class Type +{ + /** + * Unspecified. + * + * Generated from protobuf enum TYPE_UNSPECIFIED = 0; + */ + const TYPE_UNSPECIFIED = 0; + /** + * Will only match the exact value provided. + * + * Generated from protobuf enum EXACT = 1; + */ + const EXACT = 1; + /** + * Will match paths conforming to the prefix specified by value. RE2 + * syntax is supported. + * + * Generated from protobuf enum REGULAR_EXPRESSION = 2; + */ + const REGULAR_EXPRESSION = 2; + + private static $valueToName = [ + self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', + self::EXACT => 'EXACT', + self::REGULAR_EXPRESSION => 'REGULAR_EXPRESSION', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Type::class, \Google\Cloud\NetworkServices\V1\GrpcRoute_HeaderMatch_Type::class); + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute/MethodMatch.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute/MethodMatch.php new file mode 100644 index 000000000000..6fe009dd5e9e --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute/MethodMatch.php @@ -0,0 +1,202 @@ +google.cloud.networkservices.v1.GrpcRoute.MethodMatch + */ +class MethodMatch extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Specifies how to match against the name. If not specified, a + * default value of "EXACT" is used. + * + * Generated from protobuf field .google.cloud.networkservices.v1.GrpcRoute.MethodMatch.Type type = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $type = 0; + /** + * Required. Name of the service to match against. If unspecified, will + * match all services. + * + * Generated from protobuf field string grpc_service = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $grpc_service = ''; + /** + * Required. Name of the method to match against. If unspecified, will match + * all methods. + * + * Generated from protobuf field string grpc_method = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $grpc_method = ''; + /** + * Optional. Specifies that matches are case sensitive. The default value + * is true. case_sensitive must not be used with a type of + * REGULAR_EXPRESSION. + * + * Generated from protobuf field optional bool case_sensitive = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $case_sensitive = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $type + * Optional. Specifies how to match against the name. If not specified, a + * default value of "EXACT" is used. + * @type string $grpc_service + * Required. Name of the service to match against. If unspecified, will + * match all services. + * @type string $grpc_method + * Required. Name of the method to match against. If unspecified, will match + * all methods. + * @type bool $case_sensitive + * Optional. Specifies that matches are case sensitive. The default value + * is true. case_sensitive must not be used with a type of + * REGULAR_EXPRESSION. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\GrpcRoute::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Specifies how to match against the name. If not specified, a + * default value of "EXACT" is used. + * + * Generated from protobuf field .google.cloud.networkservices.v1.GrpcRoute.MethodMatch.Type type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Optional. Specifies how to match against the name. If not specified, a + * default value of "EXACT" is used. + * + * Generated from protobuf field .google.cloud.networkservices.v1.GrpcRoute.MethodMatch.Type type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetworkServices\V1\GrpcRoute\MethodMatch\Type::class); + $this->type = $var; + + return $this; + } + + /** + * Required. Name of the service to match against. If unspecified, will + * match all services. + * + * Generated from protobuf field string grpc_service = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getGrpcService() + { + return $this->grpc_service; + } + + /** + * Required. Name of the service to match against. If unspecified, will + * match all services. + * + * Generated from protobuf field string grpc_service = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setGrpcService($var) + { + GPBUtil::checkString($var, True); + $this->grpc_service = $var; + + return $this; + } + + /** + * Required. Name of the method to match against. If unspecified, will match + * all methods. + * + * Generated from protobuf field string grpc_method = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getGrpcMethod() + { + return $this->grpc_method; + } + + /** + * Required. Name of the method to match against. If unspecified, will match + * all methods. + * + * Generated from protobuf field string grpc_method = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setGrpcMethod($var) + { + GPBUtil::checkString($var, True); + $this->grpc_method = $var; + + return $this; + } + + /** + * Optional. Specifies that matches are case sensitive. The default value + * is true. case_sensitive must not be used with a type of + * REGULAR_EXPRESSION. + * + * Generated from protobuf field optional bool case_sensitive = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getCaseSensitive() + { + return isset($this->case_sensitive) ? $this->case_sensitive : false; + } + + public function hasCaseSensitive() + { + return isset($this->case_sensitive); + } + + public function clearCaseSensitive() + { + unset($this->case_sensitive); + } + + /** + * Optional. Specifies that matches are case sensitive. The default value + * is true. case_sensitive must not be used with a type of + * REGULAR_EXPRESSION. + * + * Generated from protobuf field optional bool case_sensitive = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setCaseSensitive($var) + { + GPBUtil::checkBool($var); + $this->case_sensitive = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(MethodMatch::class, \Google\Cloud\NetworkServices\V1\GrpcRoute_MethodMatch::class); + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute/MethodMatch/Type.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute/MethodMatch/Type.php new file mode 100644 index 000000000000..cbef63937f7f --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute/MethodMatch/Type.php @@ -0,0 +1,65 @@ +google.cloud.networkservices.v1.GrpcRoute.MethodMatch.Type + */ +class Type +{ + /** + * Unspecified. + * + * Generated from protobuf enum TYPE_UNSPECIFIED = 0; + */ + const TYPE_UNSPECIFIED = 0; + /** + * Will only match the exact name provided. + * + * Generated from protobuf enum EXACT = 1; + */ + const EXACT = 1; + /** + * Will interpret grpc_method and grpc_service as regexes. RE2 syntax is + * supported. + * + * Generated from protobuf enum REGULAR_EXPRESSION = 2; + */ + const REGULAR_EXPRESSION = 2; + + private static $valueToName = [ + self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', + self::EXACT => 'EXACT', + self::REGULAR_EXPRESSION => 'REGULAR_EXPRESSION', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Type::class, \Google\Cloud\NetworkServices\V1\GrpcRoute_MethodMatch_Type::class); + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute/RetryPolicy.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute/RetryPolicy.php new file mode 100644 index 000000000000..cd34c9523201 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute/RetryPolicy.php @@ -0,0 +1,168 @@ +google.cloud.networkservices.v1.GrpcRoute.RetryPolicy + */ +class RetryPolicy extends \Google\Protobuf\Internal\Message +{ + /** + * - connect-failure: Router will retry on failures connecting to Backend + * Services, for example due to connection timeouts. + * - refused-stream: Router will retry if the backend service resets the + * stream + * with a REFUSED_STREAM error code. This reset type indicates that it is + * safe to retry. + * - cancelled: Router will retry if the gRPC status code in the response + * header + * is set to cancelled + * - deadline-exceeded: Router will retry if the gRPC status code in the + * response + * header is set to deadline-exceeded + * - resource-exhausted: Router will retry if the gRPC status code in the + * response header is set to resource-exhausted + * - unavailable: Router will retry if the gRPC status code in the response + * header is set to unavailable + * + * Generated from protobuf field repeated string retry_conditions = 1; + */ + private $retry_conditions; + /** + * Specifies the allowed number of retries. This number must be > 0. If not + * specified, default to 1. + * + * Generated from protobuf field uint32 num_retries = 2; + */ + protected $num_retries = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $retry_conditions + * - connect-failure: Router will retry on failures connecting to Backend + * Services, for example due to connection timeouts. + * - refused-stream: Router will retry if the backend service resets the + * stream + * with a REFUSED_STREAM error code. This reset type indicates that it is + * safe to retry. + * - cancelled: Router will retry if the gRPC status code in the response + * header + * is set to cancelled + * - deadline-exceeded: Router will retry if the gRPC status code in the + * response + * header is set to deadline-exceeded + * - resource-exhausted: Router will retry if the gRPC status code in the + * response header is set to resource-exhausted + * - unavailable: Router will retry if the gRPC status code in the response + * header is set to unavailable + * @type int $num_retries + * Specifies the allowed number of retries. This number must be > 0. If not + * specified, default to 1. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\GrpcRoute::initOnce(); + parent::__construct($data); + } + + /** + * - connect-failure: Router will retry on failures connecting to Backend + * Services, for example due to connection timeouts. + * - refused-stream: Router will retry if the backend service resets the + * stream + * with a REFUSED_STREAM error code. This reset type indicates that it is + * safe to retry. + * - cancelled: Router will retry if the gRPC status code in the response + * header + * is set to cancelled + * - deadline-exceeded: Router will retry if the gRPC status code in the + * response + * header is set to deadline-exceeded + * - resource-exhausted: Router will retry if the gRPC status code in the + * response header is set to resource-exhausted + * - unavailable: Router will retry if the gRPC status code in the response + * header is set to unavailable + * + * Generated from protobuf field repeated string retry_conditions = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRetryConditions() + { + return $this->retry_conditions; + } + + /** + * - connect-failure: Router will retry on failures connecting to Backend + * Services, for example due to connection timeouts. + * - refused-stream: Router will retry if the backend service resets the + * stream + * with a REFUSED_STREAM error code. This reset type indicates that it is + * safe to retry. + * - cancelled: Router will retry if the gRPC status code in the response + * header + * is set to cancelled + * - deadline-exceeded: Router will retry if the gRPC status code in the + * response + * header is set to deadline-exceeded + * - resource-exhausted: Router will retry if the gRPC status code in the + * response header is set to resource-exhausted + * - unavailable: Router will retry if the gRPC status code in the response + * header is set to unavailable + * + * Generated from protobuf field repeated string retry_conditions = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRetryConditions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->retry_conditions = $arr; + + return $this; + } + + /** + * Specifies the allowed number of retries. This number must be > 0. If not + * specified, default to 1. + * + * Generated from protobuf field uint32 num_retries = 2; + * @return int + */ + public function getNumRetries() + { + return $this->num_retries; + } + + /** + * Specifies the allowed number of retries. This number must be > 0. If not + * specified, default to 1. + * + * Generated from protobuf field uint32 num_retries = 2; + * @param int $var + * @return $this + */ + public function setNumRetries($var) + { + GPBUtil::checkUint32($var); + $this->num_retries = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(RetryPolicy::class, \Google\Cloud\NetworkServices\V1\GrpcRoute_RetryPolicy::class); + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute/RouteAction.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute/RouteAction.php new file mode 100644 index 000000000000..dfc6a40eb1b7 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute/RouteAction.php @@ -0,0 +1,250 @@ +google.cloud.networkservices.v1.GrpcRoute.RouteAction + */ +class RouteAction extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The destination services to which traffic should be forwarded. + * If multiple destinations are specified, traffic will be split between + * Backend Service(s) according to the weight field of these destinations. + * + * Generated from protobuf field repeated .google.cloud.networkservices.v1.GrpcRoute.Destination destinations = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $destinations; + /** + * Optional. The specification for fault injection introduced into traffic to test the + * resiliency of clients to destination service failure. As part of fault + * injection, when clients send requests to a destination, delays can be + * introduced on a percentage of requests before sending those requests to + * the destination service. Similarly requests from clients can be aborted + * by for a percentage of requests. + * timeout and retry_policy will be ignored by clients that are configured + * with a fault_injection_policy + * + * Generated from protobuf field .google.cloud.networkservices.v1.GrpcRoute.FaultInjectionPolicy fault_injection_policy = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $fault_injection_policy = null; + /** + * Optional. Specifies the timeout for selected route. Timeout is computed + * from the time the request has been fully processed (i.e. end of stream) + * up until the response has been completely processed. Timeout includes all + * retries. + * + * Generated from protobuf field .google.protobuf.Duration timeout = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $timeout = null; + /** + * Optional. Specifies the retry policy associated with this route. + * + * Generated from protobuf field .google.cloud.networkservices.v1.GrpcRoute.RetryPolicy retry_policy = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $retry_policy = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\NetworkServices\V1\GrpcRoute\Destination>|\Google\Protobuf\Internal\RepeatedField $destinations + * Optional. The destination services to which traffic should be forwarded. + * If multiple destinations are specified, traffic will be split between + * Backend Service(s) according to the weight field of these destinations. + * @type \Google\Cloud\NetworkServices\V1\GrpcRoute\FaultInjectionPolicy $fault_injection_policy + * Optional. The specification for fault injection introduced into traffic to test the + * resiliency of clients to destination service failure. As part of fault + * injection, when clients send requests to a destination, delays can be + * introduced on a percentage of requests before sending those requests to + * the destination service. Similarly requests from clients can be aborted + * by for a percentage of requests. + * timeout and retry_policy will be ignored by clients that are configured + * with a fault_injection_policy + * @type \Google\Protobuf\Duration $timeout + * Optional. Specifies the timeout for selected route. Timeout is computed + * from the time the request has been fully processed (i.e. end of stream) + * up until the response has been completely processed. Timeout includes all + * retries. + * @type \Google\Cloud\NetworkServices\V1\GrpcRoute\RetryPolicy $retry_policy + * Optional. Specifies the retry policy associated with this route. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\GrpcRoute::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The destination services to which traffic should be forwarded. + * If multiple destinations are specified, traffic will be split between + * Backend Service(s) according to the weight field of these destinations. + * + * Generated from protobuf field repeated .google.cloud.networkservices.v1.GrpcRoute.Destination destinations = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDestinations() + { + return $this->destinations; + } + + /** + * Optional. The destination services to which traffic should be forwarded. + * If multiple destinations are specified, traffic will be split between + * Backend Service(s) according to the weight field of these destinations. + * + * Generated from protobuf field repeated .google.cloud.networkservices.v1.GrpcRoute.Destination destinations = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\NetworkServices\V1\GrpcRoute\Destination>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDestinations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkServices\V1\GrpcRoute\Destination::class); + $this->destinations = $arr; + + return $this; + } + + /** + * Optional. The specification for fault injection introduced into traffic to test the + * resiliency of clients to destination service failure. As part of fault + * injection, when clients send requests to a destination, delays can be + * introduced on a percentage of requests before sending those requests to + * the destination service. Similarly requests from clients can be aborted + * by for a percentage of requests. + * timeout and retry_policy will be ignored by clients that are configured + * with a fault_injection_policy + * + * Generated from protobuf field .google.cloud.networkservices.v1.GrpcRoute.FaultInjectionPolicy fault_injection_policy = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\NetworkServices\V1\GrpcRoute\FaultInjectionPolicy|null + */ + public function getFaultInjectionPolicy() + { + return $this->fault_injection_policy; + } + + public function hasFaultInjectionPolicy() + { + return isset($this->fault_injection_policy); + } + + public function clearFaultInjectionPolicy() + { + unset($this->fault_injection_policy); + } + + /** + * Optional. The specification for fault injection introduced into traffic to test the + * resiliency of clients to destination service failure. As part of fault + * injection, when clients send requests to a destination, delays can be + * introduced on a percentage of requests before sending those requests to + * the destination service. Similarly requests from clients can be aborted + * by for a percentage of requests. + * timeout and retry_policy will be ignored by clients that are configured + * with a fault_injection_policy + * + * Generated from protobuf field .google.cloud.networkservices.v1.GrpcRoute.FaultInjectionPolicy fault_injection_policy = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\NetworkServices\V1\GrpcRoute\FaultInjectionPolicy $var + * @return $this + */ + public function setFaultInjectionPolicy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkServices\V1\GrpcRoute\FaultInjectionPolicy::class); + $this->fault_injection_policy = $var; + + return $this; + } + + /** + * Optional. Specifies the timeout for selected route. Timeout is computed + * from the time the request has been fully processed (i.e. end of stream) + * up until the response has been completely processed. Timeout includes all + * retries. + * + * Generated from protobuf field .google.protobuf.Duration timeout = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Duration|null + */ + public function getTimeout() + { + return $this->timeout; + } + + public function hasTimeout() + { + return isset($this->timeout); + } + + public function clearTimeout() + { + unset($this->timeout); + } + + /** + * Optional. Specifies the timeout for selected route. Timeout is computed + * from the time the request has been fully processed (i.e. end of stream) + * up until the response has been completely processed. Timeout includes all + * retries. + * + * Generated from protobuf field .google.protobuf.Duration timeout = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setTimeout($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->timeout = $var; + + return $this; + } + + /** + * Optional. Specifies the retry policy associated with this route. + * + * Generated from protobuf field .google.cloud.networkservices.v1.GrpcRoute.RetryPolicy retry_policy = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\NetworkServices\V1\GrpcRoute\RetryPolicy|null + */ + public function getRetryPolicy() + { + return $this->retry_policy; + } + + public function hasRetryPolicy() + { + return isset($this->retry_policy); + } + + public function clearRetryPolicy() + { + unset($this->retry_policy); + } + + /** + * Optional. Specifies the retry policy associated with this route. + * + * Generated from protobuf field .google.cloud.networkservices.v1.GrpcRoute.RetryPolicy retry_policy = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\NetworkServices\V1\GrpcRoute\RetryPolicy $var + * @return $this + */ + public function setRetryPolicy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkServices\V1\GrpcRoute\RetryPolicy::class); + $this->retry_policy = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(RouteAction::class, \Google\Cloud\NetworkServices\V1\GrpcRoute_RouteAction::class); + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute/RouteMatch.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute/RouteMatch.php new file mode 100644 index 000000000000..4dd41c36b91b --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute/RouteMatch.php @@ -0,0 +1,119 @@ +google.cloud.networkservices.v1.GrpcRoute.RouteMatch + */ +class RouteMatch extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. A gRPC method to match against. If this field is empty or + * omitted, will match all methods. + * + * Generated from protobuf field optional .google.cloud.networkservices.v1.GrpcRoute.MethodMatch method = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $method = null; + /** + * Optional. Specifies a collection of headers to match. + * + * Generated from protobuf field repeated .google.cloud.networkservices.v1.GrpcRoute.HeaderMatch headers = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $headers; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\NetworkServices\V1\GrpcRoute\MethodMatch $method + * Optional. A gRPC method to match against. If this field is empty or + * omitted, will match all methods. + * @type array<\Google\Cloud\NetworkServices\V1\GrpcRoute\HeaderMatch>|\Google\Protobuf\Internal\RepeatedField $headers + * Optional. Specifies a collection of headers to match. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\GrpcRoute::initOnce(); + parent::__construct($data); + } + + /** + * Optional. A gRPC method to match against. If this field is empty or + * omitted, will match all methods. + * + * Generated from protobuf field optional .google.cloud.networkservices.v1.GrpcRoute.MethodMatch method = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\NetworkServices\V1\GrpcRoute\MethodMatch|null + */ + public function getMethod() + { + return $this->method; + } + + public function hasMethod() + { + return isset($this->method); + } + + public function clearMethod() + { + unset($this->method); + } + + /** + * Optional. A gRPC method to match against. If this field is empty or + * omitted, will match all methods. + * + * Generated from protobuf field optional .google.cloud.networkservices.v1.GrpcRoute.MethodMatch method = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\NetworkServices\V1\GrpcRoute\MethodMatch $var + * @return $this + */ + public function setMethod($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkServices\V1\GrpcRoute\MethodMatch::class); + $this->method = $var; + + return $this; + } + + /** + * Optional. Specifies a collection of headers to match. + * + * Generated from protobuf field repeated .google.cloud.networkservices.v1.GrpcRoute.HeaderMatch headers = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getHeaders() + { + return $this->headers; + } + + /** + * Optional. Specifies a collection of headers to match. + * + * Generated from protobuf field repeated .google.cloud.networkservices.v1.GrpcRoute.HeaderMatch headers = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\NetworkServices\V1\GrpcRoute\HeaderMatch>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setHeaders($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkServices\V1\GrpcRoute\HeaderMatch::class); + $this->headers = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(RouteMatch::class, \Google\Cloud\NetworkServices\V1\GrpcRoute_RouteMatch::class); + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute/RouteRule.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute/RouteRule.php new file mode 100644 index 000000000000..c1eb735a0ee0 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute/RouteRule.php @@ -0,0 +1,130 @@ +google.cloud.networkservices.v1.GrpcRoute.RouteRule + */ +class RouteRule extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Matches define conditions used for matching the rule against + * incoming gRPC requests. Each match is independent, i.e. this rule will be + * matched if ANY one of the matches is satisfied. If no matches field is + * specified, this rule will unconditionally match traffic. + * + * Generated from protobuf field repeated .google.cloud.networkservices.v1.GrpcRoute.RouteMatch matches = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $matches; + /** + * Required. A detailed rule defining how to route traffic. This field is + * required. + * + * Generated from protobuf field .google.cloud.networkservices.v1.GrpcRoute.RouteAction action = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $action = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\NetworkServices\V1\GrpcRoute\RouteMatch>|\Google\Protobuf\Internal\RepeatedField $matches + * Optional. Matches define conditions used for matching the rule against + * incoming gRPC requests. Each match is independent, i.e. this rule will be + * matched if ANY one of the matches is satisfied. If no matches field is + * specified, this rule will unconditionally match traffic. + * @type \Google\Cloud\NetworkServices\V1\GrpcRoute\RouteAction $action + * Required. A detailed rule defining how to route traffic. This field is + * required. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\GrpcRoute::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Matches define conditions used for matching the rule against + * incoming gRPC requests. Each match is independent, i.e. this rule will be + * matched if ANY one of the matches is satisfied. If no matches field is + * specified, this rule will unconditionally match traffic. + * + * Generated from protobuf field repeated .google.cloud.networkservices.v1.GrpcRoute.RouteMatch matches = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMatches() + { + return $this->matches; + } + + /** + * Optional. Matches define conditions used for matching the rule against + * incoming gRPC requests. Each match is independent, i.e. this rule will be + * matched if ANY one of the matches is satisfied. If no matches field is + * specified, this rule will unconditionally match traffic. + * + * Generated from protobuf field repeated .google.cloud.networkservices.v1.GrpcRoute.RouteMatch matches = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\NetworkServices\V1\GrpcRoute\RouteMatch>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMatches($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkServices\V1\GrpcRoute\RouteMatch::class); + $this->matches = $arr; + + return $this; + } + + /** + * Required. A detailed rule defining how to route traffic. This field is + * required. + * + * Generated from protobuf field .google.cloud.networkservices.v1.GrpcRoute.RouteAction action = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetworkServices\V1\GrpcRoute\RouteAction|null + */ + public function getAction() + { + return $this->action; + } + + public function hasAction() + { + return isset($this->action); + } + + public function clearAction() + { + unset($this->action); + } + + /** + * Required. A detailed rule defining how to route traffic. This field is + * required. + * + * Generated from protobuf field .google.cloud.networkservices.v1.GrpcRoute.RouteAction action = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetworkServices\V1\GrpcRoute\RouteAction $var + * @return $this + */ + public function setAction($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkServices\V1\GrpcRoute\RouteAction::class); + $this->action = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(RouteRule::class, \Google\Cloud\NetworkServices\V1\GrpcRoute_RouteRule::class); + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute.php new file mode 100644 index 000000000000..7663ee89f61e --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute.php @@ -0,0 +1,518 @@ +google.cloud.networkservices.v1.HttpRoute + */ +class HttpRoute extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the HttpRoute resource. It matches pattern + * `projects/*/locations/global/httpRoutes/http_route_name>`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * Output only. Server-defined URL of this resource + * + * Generated from protobuf field string self_link = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $self_link = ''; + /** + * Optional. A free-text description of the resource. Max length 1024 + * characters. + * + * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Output only. The timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The timestamp when the resource was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Required. Hostnames define a set of hosts that should match against the + * HTTP host header to select a HttpRoute to process the request. Hostname is + * the fully qualified domain name of a network host, as defined by RFC 1123 + * with the exception that: + * - IPs are not allowed. + * - A hostname may be prefixed with a wildcard label (`*.`). The wildcard + * label must appear by itself as the first label. + * Hostname can be "precise" which is a domain name without the terminating + * dot of a network host (e.g. `foo.example.com`) or "wildcard", which is a + * domain name prefixed with a single wildcard label (e.g. `*.example.com`). + * Note that as per RFC1035 and RFC1123, a label must consist of lower case + * alphanumeric characters or '-', and must start and end with an alphanumeric + * character. No other punctuation is allowed. + * The routes associated with a Mesh or Gateways must have unique hostnames. + * If you attempt to attach multiple routes with conflicting hostnames, + * the configuration will be rejected. + * For example, while it is acceptable for routes for the hostnames + * `*.foo.bar.com` and `*.bar.com` to be associated with the same Mesh (or + * Gateways under the same scope), it is not possible to associate two routes + * both with `*.bar.com` or both with `bar.com`. + * + * Generated from protobuf field repeated string hostnames = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + private $hostnames; + /** + * Optional. Meshes defines a list of meshes this HttpRoute is attached to, as + * one of the routing rules to route the requests served by the mesh. + * Each mesh reference should match the pattern: + * `projects/*/locations/global/meshes/` + * The attached Mesh should be of a type SIDECAR + * + * Generated from protobuf field repeated string meshes = 8 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + private $meshes; + /** + * Optional. Gateways defines a list of gateways this HttpRoute is attached + * to, as one of the routing rules to route the requests served by the + * gateway. + * Each gateway reference should match the pattern: + * `projects/*/locations/global/gateways/` + * + * Generated from protobuf field repeated string gateways = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + private $gateways; + /** + * Optional. Set of label tags associated with the HttpRoute resource. + * + * Generated from protobuf field map labels = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Required. Rules that define how traffic is routed and handled. + * Rules will be matched sequentially based on the RouteMatch specified for + * the rule. + * + * Generated from protobuf field repeated .google.cloud.networkservices.v1.HttpRoute.RouteRule rules = 6 [(.google.api.field_behavior) = REQUIRED]; + */ + private $rules; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the HttpRoute resource. It matches pattern + * `projects/*/locations/global/httpRoutes/http_route_name>`. + * @type string $self_link + * Output only. Server-defined URL of this resource + * @type string $description + * Optional. A free-text description of the resource. Max length 1024 + * characters. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The timestamp when the resource was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The timestamp when the resource was updated. + * @type array|\Google\Protobuf\Internal\RepeatedField $hostnames + * Required. Hostnames define a set of hosts that should match against the + * HTTP host header to select a HttpRoute to process the request. Hostname is + * the fully qualified domain name of a network host, as defined by RFC 1123 + * with the exception that: + * - IPs are not allowed. + * - A hostname may be prefixed with a wildcard label (`*.`). The wildcard + * label must appear by itself as the first label. + * Hostname can be "precise" which is a domain name without the terminating + * dot of a network host (e.g. `foo.example.com`) or "wildcard", which is a + * domain name prefixed with a single wildcard label (e.g. `*.example.com`). + * Note that as per RFC1035 and RFC1123, a label must consist of lower case + * alphanumeric characters or '-', and must start and end with an alphanumeric + * character. No other punctuation is allowed. + * The routes associated with a Mesh or Gateways must have unique hostnames. + * If you attempt to attach multiple routes with conflicting hostnames, + * the configuration will be rejected. + * For example, while it is acceptable for routes for the hostnames + * `*.foo.bar.com` and `*.bar.com` to be associated with the same Mesh (or + * Gateways under the same scope), it is not possible to associate two routes + * both with `*.bar.com` or both with `bar.com`. + * @type array|\Google\Protobuf\Internal\RepeatedField $meshes + * Optional. Meshes defines a list of meshes this HttpRoute is attached to, as + * one of the routing rules to route the requests served by the mesh. + * Each mesh reference should match the pattern: + * `projects/*/locations/global/meshes/` + * The attached Mesh should be of a type SIDECAR + * @type array|\Google\Protobuf\Internal\RepeatedField $gateways + * Optional. Gateways defines a list of gateways this HttpRoute is attached + * to, as one of the routing rules to route the requests served by the + * gateway. + * Each gateway reference should match the pattern: + * `projects/*/locations/global/gateways/` + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. Set of label tags associated with the HttpRoute resource. + * @type array<\Google\Cloud\NetworkServices\V1\HttpRoute\RouteRule>|\Google\Protobuf\Internal\RepeatedField $rules + * Required. Rules that define how traffic is routed and handled. + * Rules will be matched sequentially based on the RouteMatch specified for + * the rule. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\HttpRoute::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the HttpRoute resource. It matches pattern + * `projects/*/locations/global/httpRoutes/http_route_name>`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the HttpRoute resource. It matches pattern + * `projects/*/locations/global/httpRoutes/http_route_name>`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. Server-defined URL of this resource + * + * Generated from protobuf field string self_link = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getSelfLink() + { + return $this->self_link; + } + + /** + * Output only. Server-defined URL of this resource + * + * Generated from protobuf field string self_link = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setSelfLink($var) + { + GPBUtil::checkString($var, True); + $this->self_link = $var; + + return $this; + } + + /** + * Optional. A free-text description of the resource. Max length 1024 + * characters. + * + * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. A free-text description of the resource. Max length 1024 + * characters. + * + * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Output only. The timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The timestamp when the resource was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The timestamp when the resource was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Required. Hostnames define a set of hosts that should match against the + * HTTP host header to select a HttpRoute to process the request. Hostname is + * the fully qualified domain name of a network host, as defined by RFC 1123 + * with the exception that: + * - IPs are not allowed. + * - A hostname may be prefixed with a wildcard label (`*.`). The wildcard + * label must appear by itself as the first label. + * Hostname can be "precise" which is a domain name without the terminating + * dot of a network host (e.g. `foo.example.com`) or "wildcard", which is a + * domain name prefixed with a single wildcard label (e.g. `*.example.com`). + * Note that as per RFC1035 and RFC1123, a label must consist of lower case + * alphanumeric characters or '-', and must start and end with an alphanumeric + * character. No other punctuation is allowed. + * The routes associated with a Mesh or Gateways must have unique hostnames. + * If you attempt to attach multiple routes with conflicting hostnames, + * the configuration will be rejected. + * For example, while it is acceptable for routes for the hostnames + * `*.foo.bar.com` and `*.bar.com` to be associated with the same Mesh (or + * Gateways under the same scope), it is not possible to associate two routes + * both with `*.bar.com` or both with `bar.com`. + * + * Generated from protobuf field repeated string hostnames = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getHostnames() + { + return $this->hostnames; + } + + /** + * Required. Hostnames define a set of hosts that should match against the + * HTTP host header to select a HttpRoute to process the request. Hostname is + * the fully qualified domain name of a network host, as defined by RFC 1123 + * with the exception that: + * - IPs are not allowed. + * - A hostname may be prefixed with a wildcard label (`*.`). The wildcard + * label must appear by itself as the first label. + * Hostname can be "precise" which is a domain name without the terminating + * dot of a network host (e.g. `foo.example.com`) or "wildcard", which is a + * domain name prefixed with a single wildcard label (e.g. `*.example.com`). + * Note that as per RFC1035 and RFC1123, a label must consist of lower case + * alphanumeric characters or '-', and must start and end with an alphanumeric + * character. No other punctuation is allowed. + * The routes associated with a Mesh or Gateways must have unique hostnames. + * If you attempt to attach multiple routes with conflicting hostnames, + * the configuration will be rejected. + * For example, while it is acceptable for routes for the hostnames + * `*.foo.bar.com` and `*.bar.com` to be associated with the same Mesh (or + * Gateways under the same scope), it is not possible to associate two routes + * both with `*.bar.com` or both with `bar.com`. + * + * Generated from protobuf field repeated string hostnames = 5 [(.google.api.field_behavior) = REQUIRED]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setHostnames($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->hostnames = $arr; + + return $this; + } + + /** + * Optional. Meshes defines a list of meshes this HttpRoute is attached to, as + * one of the routing rules to route the requests served by the mesh. + * Each mesh reference should match the pattern: + * `projects/*/locations/global/meshes/` + * The attached Mesh should be of a type SIDECAR + * + * Generated from protobuf field repeated string meshes = 8 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMeshes() + { + return $this->meshes; + } + + /** + * Optional. Meshes defines a list of meshes this HttpRoute is attached to, as + * one of the routing rules to route the requests served by the mesh. + * Each mesh reference should match the pattern: + * `projects/*/locations/global/meshes/` + * The attached Mesh should be of a type SIDECAR + * + * Generated from protobuf field repeated string meshes = 8 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMeshes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->meshes = $arr; + + return $this; + } + + /** + * Optional. Gateways defines a list of gateways this HttpRoute is attached + * to, as one of the routing rules to route the requests served by the + * gateway. + * Each gateway reference should match the pattern: + * `projects/*/locations/global/gateways/` + * + * Generated from protobuf field repeated string gateways = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getGateways() + { + return $this->gateways; + } + + /** + * Optional. Gateways defines a list of gateways this HttpRoute is attached + * to, as one of the routing rules to route the requests served by the + * gateway. + * Each gateway reference should match the pattern: + * `projects/*/locations/global/gateways/` + * + * Generated from protobuf field repeated string gateways = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setGateways($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->gateways = $arr; + + return $this; + } + + /** + * Optional. Set of label tags associated with the HttpRoute resource. + * + * Generated from protobuf field map labels = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. Set of label tags associated with the HttpRoute resource. + * + * Generated from protobuf field map labels = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Required. Rules that define how traffic is routed and handled. + * Rules will be matched sequentially based on the RouteMatch specified for + * the rule. + * + * Generated from protobuf field repeated .google.cloud.networkservices.v1.HttpRoute.RouteRule rules = 6 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRules() + { + return $this->rules; + } + + /** + * Required. Rules that define how traffic is routed and handled. + * Rules will be matched sequentially based on the RouteMatch specified for + * the rule. + * + * Generated from protobuf field repeated .google.cloud.networkservices.v1.HttpRoute.RouteRule rules = 6 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Cloud\NetworkServices\V1\HttpRoute\RouteRule>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRules($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkServices\V1\HttpRoute\RouteRule::class); + $this->rules = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/CorsPolicy.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/CorsPolicy.php new file mode 100644 index 000000000000..5d4f95014991 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/CorsPolicy.php @@ -0,0 +1,344 @@ +google.cloud.networkservices.v1.HttpRoute.CorsPolicy + */ +class CorsPolicy extends \Google\Protobuf\Internal\Message +{ + /** + * Specifies the list of origins that will be allowed to do CORS requests. + * An origin is allowed if it matches either an item in allow_origins or + * an item in allow_origin_regexes. + * + * Generated from protobuf field repeated string allow_origins = 1; + */ + private $allow_origins; + /** + * Specifies the regular expression patterns that match allowed origins. For + * regular expression grammar, please see + * https://github.com/google/re2/wiki/Syntax. + * + * Generated from protobuf field repeated string allow_origin_regexes = 2; + */ + private $allow_origin_regexes; + /** + * Specifies the content for Access-Control-Allow-Methods header. + * + * Generated from protobuf field repeated string allow_methods = 3; + */ + private $allow_methods; + /** + * Specifies the content for Access-Control-Allow-Headers header. + * + * Generated from protobuf field repeated string allow_headers = 4; + */ + private $allow_headers; + /** + * Specifies the content for Access-Control-Expose-Headers header. + * + * Generated from protobuf field repeated string expose_headers = 5; + */ + private $expose_headers; + /** + * Specifies how long result of a preflight request can be cached in + * seconds. This translates to the Access-Control-Max-Age header. + * + * Generated from protobuf field string max_age = 6; + */ + protected $max_age = ''; + /** + * In response to a preflight request, setting this to true indicates that + * the actual request can include user credentials. This translates to the + * Access-Control-Allow-Credentials header. + * Default value is false. + * + * Generated from protobuf field bool allow_credentials = 7; + */ + protected $allow_credentials = false; + /** + * If true, the CORS policy is disabled. The default value is false, which + * indicates that the CORS policy is in effect. + * + * Generated from protobuf field bool disabled = 8; + */ + protected $disabled = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $allow_origins + * Specifies the list of origins that will be allowed to do CORS requests. + * An origin is allowed if it matches either an item in allow_origins or + * an item in allow_origin_regexes. + * @type array|\Google\Protobuf\Internal\RepeatedField $allow_origin_regexes + * Specifies the regular expression patterns that match allowed origins. For + * regular expression grammar, please see + * https://github.com/google/re2/wiki/Syntax. + * @type array|\Google\Protobuf\Internal\RepeatedField $allow_methods + * Specifies the content for Access-Control-Allow-Methods header. + * @type array|\Google\Protobuf\Internal\RepeatedField $allow_headers + * Specifies the content for Access-Control-Allow-Headers header. + * @type array|\Google\Protobuf\Internal\RepeatedField $expose_headers + * Specifies the content for Access-Control-Expose-Headers header. + * @type string $max_age + * Specifies how long result of a preflight request can be cached in + * seconds. This translates to the Access-Control-Max-Age header. + * @type bool $allow_credentials + * In response to a preflight request, setting this to true indicates that + * the actual request can include user credentials. This translates to the + * Access-Control-Allow-Credentials header. + * Default value is false. + * @type bool $disabled + * If true, the CORS policy is disabled. The default value is false, which + * indicates that the CORS policy is in effect. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\HttpRoute::initOnce(); + parent::__construct($data); + } + + /** + * Specifies the list of origins that will be allowed to do CORS requests. + * An origin is allowed if it matches either an item in allow_origins or + * an item in allow_origin_regexes. + * + * Generated from protobuf field repeated string allow_origins = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAllowOrigins() + { + return $this->allow_origins; + } + + /** + * Specifies the list of origins that will be allowed to do CORS requests. + * An origin is allowed if it matches either an item in allow_origins or + * an item in allow_origin_regexes. + * + * Generated from protobuf field repeated string allow_origins = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAllowOrigins($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->allow_origins = $arr; + + return $this; + } + + /** + * Specifies the regular expression patterns that match allowed origins. For + * regular expression grammar, please see + * https://github.com/google/re2/wiki/Syntax. + * + * Generated from protobuf field repeated string allow_origin_regexes = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAllowOriginRegexes() + { + return $this->allow_origin_regexes; + } + + /** + * Specifies the regular expression patterns that match allowed origins. For + * regular expression grammar, please see + * https://github.com/google/re2/wiki/Syntax. + * + * Generated from protobuf field repeated string allow_origin_regexes = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAllowOriginRegexes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->allow_origin_regexes = $arr; + + return $this; + } + + /** + * Specifies the content for Access-Control-Allow-Methods header. + * + * Generated from protobuf field repeated string allow_methods = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAllowMethods() + { + return $this->allow_methods; + } + + /** + * Specifies the content for Access-Control-Allow-Methods header. + * + * Generated from protobuf field repeated string allow_methods = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAllowMethods($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->allow_methods = $arr; + + return $this; + } + + /** + * Specifies the content for Access-Control-Allow-Headers header. + * + * Generated from protobuf field repeated string allow_headers = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAllowHeaders() + { + return $this->allow_headers; + } + + /** + * Specifies the content for Access-Control-Allow-Headers header. + * + * Generated from protobuf field repeated string allow_headers = 4; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAllowHeaders($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->allow_headers = $arr; + + return $this; + } + + /** + * Specifies the content for Access-Control-Expose-Headers header. + * + * Generated from protobuf field repeated string expose_headers = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getExposeHeaders() + { + return $this->expose_headers; + } + + /** + * Specifies the content for Access-Control-Expose-Headers header. + * + * Generated from protobuf field repeated string expose_headers = 5; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setExposeHeaders($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->expose_headers = $arr; + + return $this; + } + + /** + * Specifies how long result of a preflight request can be cached in + * seconds. This translates to the Access-Control-Max-Age header. + * + * Generated from protobuf field string max_age = 6; + * @return string + */ + public function getMaxAge() + { + return $this->max_age; + } + + /** + * Specifies how long result of a preflight request can be cached in + * seconds. This translates to the Access-Control-Max-Age header. + * + * Generated from protobuf field string max_age = 6; + * @param string $var + * @return $this + */ + public function setMaxAge($var) + { + GPBUtil::checkString($var, True); + $this->max_age = $var; + + return $this; + } + + /** + * In response to a preflight request, setting this to true indicates that + * the actual request can include user credentials. This translates to the + * Access-Control-Allow-Credentials header. + * Default value is false. + * + * Generated from protobuf field bool allow_credentials = 7; + * @return bool + */ + public function getAllowCredentials() + { + return $this->allow_credentials; + } + + /** + * In response to a preflight request, setting this to true indicates that + * the actual request can include user credentials. This translates to the + * Access-Control-Allow-Credentials header. + * Default value is false. + * + * Generated from protobuf field bool allow_credentials = 7; + * @param bool $var + * @return $this + */ + public function setAllowCredentials($var) + { + GPBUtil::checkBool($var); + $this->allow_credentials = $var; + + return $this; + } + + /** + * If true, the CORS policy is disabled. The default value is false, which + * indicates that the CORS policy is in effect. + * + * Generated from protobuf field bool disabled = 8; + * @return bool + */ + public function getDisabled() + { + return $this->disabled; + } + + /** + * If true, the CORS policy is disabled. The default value is false, which + * indicates that the CORS policy is in effect. + * + * Generated from protobuf field bool disabled = 8; + * @param bool $var + * @return $this + */ + public function setDisabled($var) + { + GPBUtil::checkBool($var); + $this->disabled = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(CorsPolicy::class, \Google\Cloud\NetworkServices\V1\HttpRoute_CorsPolicy::class); + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/Destination.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/Destination.php new file mode 100644 index 000000000000..95357636b4b1 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/Destination.php @@ -0,0 +1,144 @@ +google.cloud.networkservices.v1.HttpRoute.Destination + */ +class Destination extends \Google\Protobuf\Internal\Message +{ + /** + * The URL of a BackendService to route traffic to. + * + * Generated from protobuf field string service_name = 1 [(.google.api.resource_reference) = { + */ + protected $service_name = ''; + /** + * Specifies the proportion of requests forwarded to the backend referenced + * by the serviceName field. This is computed as: + * - weight/Sum(weights in this destination list). + * For non-zero values, there may be some epsilon from the exact proportion + * defined here depending on the precision an implementation supports. + * If only one serviceName is specified and it has a weight greater than 0, + * 100% of the traffic is forwarded to that backend. + * If weights are specified for any one service name, they need to be + * specified for all of them. + * If weights are unspecified for all services, then, traffic is distributed + * in equal proportions to all of them. + * + * Generated from protobuf field int32 weight = 2; + */ + protected $weight = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $service_name + * The URL of a BackendService to route traffic to. + * @type int $weight + * Specifies the proportion of requests forwarded to the backend referenced + * by the serviceName field. This is computed as: + * - weight/Sum(weights in this destination list). + * For non-zero values, there may be some epsilon from the exact proportion + * defined here depending on the precision an implementation supports. + * If only one serviceName is specified and it has a weight greater than 0, + * 100% of the traffic is forwarded to that backend. + * If weights are specified for any one service name, they need to be + * specified for all of them. + * If weights are unspecified for all services, then, traffic is distributed + * in equal proportions to all of them. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\HttpRoute::initOnce(); + parent::__construct($data); + } + + /** + * The URL of a BackendService to route traffic to. + * + * Generated from protobuf field string service_name = 1 [(.google.api.resource_reference) = { + * @return string + */ + public function getServiceName() + { + return $this->service_name; + } + + /** + * The URL of a BackendService to route traffic to. + * + * Generated from protobuf field string service_name = 1 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setServiceName($var) + { + GPBUtil::checkString($var, True); + $this->service_name = $var; + + return $this; + } + + /** + * Specifies the proportion of requests forwarded to the backend referenced + * by the serviceName field. This is computed as: + * - weight/Sum(weights in this destination list). + * For non-zero values, there may be some epsilon from the exact proportion + * defined here depending on the precision an implementation supports. + * If only one serviceName is specified and it has a weight greater than 0, + * 100% of the traffic is forwarded to that backend. + * If weights are specified for any one service name, they need to be + * specified for all of them. + * If weights are unspecified for all services, then, traffic is distributed + * in equal proportions to all of them. + * + * Generated from protobuf field int32 weight = 2; + * @return int + */ + public function getWeight() + { + return $this->weight; + } + + /** + * Specifies the proportion of requests forwarded to the backend referenced + * by the serviceName field. This is computed as: + * - weight/Sum(weights in this destination list). + * For non-zero values, there may be some epsilon from the exact proportion + * defined here depending on the precision an implementation supports. + * If only one serviceName is specified and it has a weight greater than 0, + * 100% of the traffic is forwarded to that backend. + * If weights are specified for any one service name, they need to be + * specified for all of them. + * If weights are unspecified for all services, then, traffic is distributed + * in equal proportions to all of them. + * + * Generated from protobuf field int32 weight = 2; + * @param int $var + * @return $this + */ + public function setWeight($var) + { + GPBUtil::checkInt32($var); + $this->weight = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Destination::class, \Google\Cloud\NetworkServices\V1\HttpRoute_Destination::class); + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/FaultInjectionPolicy.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/FaultInjectionPolicy.php new file mode 100644 index 000000000000..359d7b636738 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/FaultInjectionPolicy.php @@ -0,0 +1,129 @@ +google.cloud.networkservices.v1.HttpRoute.FaultInjectionPolicy + */ +class FaultInjectionPolicy extends \Google\Protobuf\Internal\Message +{ + /** + * The specification for injecting delay to client requests. + * + * Generated from protobuf field .google.cloud.networkservices.v1.HttpRoute.FaultInjectionPolicy.Delay delay = 1; + */ + protected $delay = null; + /** + * The specification for aborting to client requests. + * + * Generated from protobuf field .google.cloud.networkservices.v1.HttpRoute.FaultInjectionPolicy.Abort abort = 2; + */ + protected $abort = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\NetworkServices\V1\HttpRoute\FaultInjectionPolicy\Delay $delay + * The specification for injecting delay to client requests. + * @type \Google\Cloud\NetworkServices\V1\HttpRoute\FaultInjectionPolicy\Abort $abort + * The specification for aborting to client requests. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\HttpRoute::initOnce(); + parent::__construct($data); + } + + /** + * The specification for injecting delay to client requests. + * + * Generated from protobuf field .google.cloud.networkservices.v1.HttpRoute.FaultInjectionPolicy.Delay delay = 1; + * @return \Google\Cloud\NetworkServices\V1\HttpRoute\FaultInjectionPolicy\Delay|null + */ + public function getDelay() + { + return $this->delay; + } + + public function hasDelay() + { + return isset($this->delay); + } + + public function clearDelay() + { + unset($this->delay); + } + + /** + * The specification for injecting delay to client requests. + * + * Generated from protobuf field .google.cloud.networkservices.v1.HttpRoute.FaultInjectionPolicy.Delay delay = 1; + * @param \Google\Cloud\NetworkServices\V1\HttpRoute\FaultInjectionPolicy\Delay $var + * @return $this + */ + public function setDelay($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkServices\V1\HttpRoute\FaultInjectionPolicy\Delay::class); + $this->delay = $var; + + return $this; + } + + /** + * The specification for aborting to client requests. + * + * Generated from protobuf field .google.cloud.networkservices.v1.HttpRoute.FaultInjectionPolicy.Abort abort = 2; + * @return \Google\Cloud\NetworkServices\V1\HttpRoute\FaultInjectionPolicy\Abort|null + */ + public function getAbort() + { + return $this->abort; + } + + public function hasAbort() + { + return isset($this->abort); + } + + public function clearAbort() + { + unset($this->abort); + } + + /** + * The specification for aborting to client requests. + * + * Generated from protobuf field .google.cloud.networkservices.v1.HttpRoute.FaultInjectionPolicy.Abort abort = 2; + * @param \Google\Cloud\NetworkServices\V1\HttpRoute\FaultInjectionPolicy\Abort $var + * @return $this + */ + public function setAbort($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkServices\V1\HttpRoute\FaultInjectionPolicy\Abort::class); + $this->abort = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(FaultInjectionPolicy::class, \Google\Cloud\NetworkServices\V1\HttpRoute_FaultInjectionPolicy::class); + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/FaultInjectionPolicy/Abort.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/FaultInjectionPolicy/Abort.php new file mode 100644 index 000000000000..f190f0610d77 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/FaultInjectionPolicy/Abort.php @@ -0,0 +1,113 @@ +google.cloud.networkservices.v1.HttpRoute.FaultInjectionPolicy.Abort + */ +class Abort extends \Google\Protobuf\Internal\Message +{ + /** + * The HTTP status code used to abort the request. + * The value must be between 200 and 599 inclusive. + * + * Generated from protobuf field int32 http_status = 1; + */ + protected $http_status = 0; + /** + * The percentage of traffic which will be aborted. + * The value must be between [0, 100] + * + * Generated from protobuf field int32 percentage = 2; + */ + protected $percentage = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $http_status + * The HTTP status code used to abort the request. + * The value must be between 200 and 599 inclusive. + * @type int $percentage + * The percentage of traffic which will be aborted. + * The value must be between [0, 100] + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\HttpRoute::initOnce(); + parent::__construct($data); + } + + /** + * The HTTP status code used to abort the request. + * The value must be between 200 and 599 inclusive. + * + * Generated from protobuf field int32 http_status = 1; + * @return int + */ + public function getHttpStatus() + { + return $this->http_status; + } + + /** + * The HTTP status code used to abort the request. + * The value must be between 200 and 599 inclusive. + * + * Generated from protobuf field int32 http_status = 1; + * @param int $var + * @return $this + */ + public function setHttpStatus($var) + { + GPBUtil::checkInt32($var); + $this->http_status = $var; + + return $this; + } + + /** + * The percentage of traffic which will be aborted. + * The value must be between [0, 100] + * + * Generated from protobuf field int32 percentage = 2; + * @return int + */ + public function getPercentage() + { + return $this->percentage; + } + + /** + * The percentage of traffic which will be aborted. + * The value must be between [0, 100] + * + * Generated from protobuf field int32 percentage = 2; + * @param int $var + * @return $this + */ + public function setPercentage($var) + { + GPBUtil::checkInt32($var); + $this->percentage = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Abort::class, \Google\Cloud\NetworkServices\V1\HttpRoute_FaultInjectionPolicy_Abort::class); + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/FaultInjectionPolicy/Delay.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/FaultInjectionPolicy/Delay.php new file mode 100644 index 000000000000..3fb9852742e7 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/FaultInjectionPolicy/Delay.php @@ -0,0 +1,119 @@ +google.cloud.networkservices.v1.HttpRoute.FaultInjectionPolicy.Delay + */ +class Delay extends \Google\Protobuf\Internal\Message +{ + /** + * Specify a fixed delay before forwarding the request. + * + * Generated from protobuf field .google.protobuf.Duration fixed_delay = 1; + */ + protected $fixed_delay = null; + /** + * The percentage of traffic on which delay will be injected. + * The value must be between [0, 100] + * + * Generated from protobuf field int32 percentage = 2; + */ + protected $percentage = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Duration $fixed_delay + * Specify a fixed delay before forwarding the request. + * @type int $percentage + * The percentage of traffic on which delay will be injected. + * The value must be between [0, 100] + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\HttpRoute::initOnce(); + parent::__construct($data); + } + + /** + * Specify a fixed delay before forwarding the request. + * + * Generated from protobuf field .google.protobuf.Duration fixed_delay = 1; + * @return \Google\Protobuf\Duration|null + */ + public function getFixedDelay() + { + return $this->fixed_delay; + } + + public function hasFixedDelay() + { + return isset($this->fixed_delay); + } + + public function clearFixedDelay() + { + unset($this->fixed_delay); + } + + /** + * Specify a fixed delay before forwarding the request. + * + * Generated from protobuf field .google.protobuf.Duration fixed_delay = 1; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setFixedDelay($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->fixed_delay = $var; + + return $this; + } + + /** + * The percentage of traffic on which delay will be injected. + * The value must be between [0, 100] + * + * Generated from protobuf field int32 percentage = 2; + * @return int + */ + public function getPercentage() + { + return $this->percentage; + } + + /** + * The percentage of traffic on which delay will be injected. + * The value must be between [0, 100] + * + * Generated from protobuf field int32 percentage = 2; + * @param int $var + * @return $this + */ + public function setPercentage($var) + { + GPBUtil::checkInt32($var); + $this->percentage = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Delay::class, \Google\Cloud\NetworkServices\V1\HttpRoute_FaultInjectionPolicy_Delay::class); + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/HeaderMatch.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/HeaderMatch.php new file mode 100644 index 000000000000..9bb4ffab022a --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/HeaderMatch.php @@ -0,0 +1,330 @@ +google.cloud.networkservices.v1.HttpRoute.HeaderMatch + */ +class HeaderMatch extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the HTTP header to match against. + * + * Generated from protobuf field string header = 1; + */ + protected $header = ''; + /** + * If specified, the match result will be inverted before checking. Default + * value is set to false. + * + * Generated from protobuf field bool invert_match = 8; + */ + protected $invert_match = false; + protected $MatchType; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $exact_match + * The value of the header should match exactly the content of + * exact_match. + * @type string $regex_match + * The value of the header must match the regular expression specified in + * regex_match. For regular expression grammar, please see: + * https://github.com/google/re2/wiki/Syntax + * @type string $prefix_match + * The value of the header must start with the contents of prefix_match. + * @type bool $present_match + * A header with header_name must exist. The match takes place whether or + * not the header has a value. + * @type string $suffix_match + * The value of the header must end with the contents of suffix_match. + * @type \Google\Cloud\NetworkServices\V1\HttpRoute\HeaderMatch\IntegerRange $range_match + * If specified, the rule will match if the request header value is within + * the range. + * @type string $header + * The name of the HTTP header to match against. + * @type bool $invert_match + * If specified, the match result will be inverted before checking. Default + * value is set to false. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\HttpRoute::initOnce(); + parent::__construct($data); + } + + /** + * The value of the header should match exactly the content of + * exact_match. + * + * Generated from protobuf field string exact_match = 2; + * @return string + */ + public function getExactMatch() + { + return $this->readOneof(2); + } + + public function hasExactMatch() + { + return $this->hasOneof(2); + } + + /** + * The value of the header should match exactly the content of + * exact_match. + * + * Generated from protobuf field string exact_match = 2; + * @param string $var + * @return $this + */ + public function setExactMatch($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * The value of the header must match the regular expression specified in + * regex_match. For regular expression grammar, please see: + * https://github.com/google/re2/wiki/Syntax + * + * Generated from protobuf field string regex_match = 3; + * @return string + */ + public function getRegexMatch() + { + return $this->readOneof(3); + } + + public function hasRegexMatch() + { + return $this->hasOneof(3); + } + + /** + * The value of the header must match the regular expression specified in + * regex_match. For regular expression grammar, please see: + * https://github.com/google/re2/wiki/Syntax + * + * Generated from protobuf field string regex_match = 3; + * @param string $var + * @return $this + */ + public function setRegexMatch($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * The value of the header must start with the contents of prefix_match. + * + * Generated from protobuf field string prefix_match = 4; + * @return string + */ + public function getPrefixMatch() + { + return $this->readOneof(4); + } + + public function hasPrefixMatch() + { + return $this->hasOneof(4); + } + + /** + * The value of the header must start with the contents of prefix_match. + * + * Generated from protobuf field string prefix_match = 4; + * @param string $var + * @return $this + */ + public function setPrefixMatch($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * A header with header_name must exist. The match takes place whether or + * not the header has a value. + * + * Generated from protobuf field bool present_match = 5; + * @return bool + */ + public function getPresentMatch() + { + return $this->readOneof(5); + } + + public function hasPresentMatch() + { + return $this->hasOneof(5); + } + + /** + * A header with header_name must exist. The match takes place whether or + * not the header has a value. + * + * Generated from protobuf field bool present_match = 5; + * @param bool $var + * @return $this + */ + public function setPresentMatch($var) + { + GPBUtil::checkBool($var); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * The value of the header must end with the contents of suffix_match. + * + * Generated from protobuf field string suffix_match = 6; + * @return string + */ + public function getSuffixMatch() + { + return $this->readOneof(6); + } + + public function hasSuffixMatch() + { + return $this->hasOneof(6); + } + + /** + * The value of the header must end with the contents of suffix_match. + * + * Generated from protobuf field string suffix_match = 6; + * @param string $var + * @return $this + */ + public function setSuffixMatch($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * If specified, the rule will match if the request header value is within + * the range. + * + * Generated from protobuf field .google.cloud.networkservices.v1.HttpRoute.HeaderMatch.IntegerRange range_match = 7; + * @return \Google\Cloud\NetworkServices\V1\HttpRoute\HeaderMatch\IntegerRange|null + */ + public function getRangeMatch() + { + return $this->readOneof(7); + } + + public function hasRangeMatch() + { + return $this->hasOneof(7); + } + + /** + * If specified, the rule will match if the request header value is within + * the range. + * + * Generated from protobuf field .google.cloud.networkservices.v1.HttpRoute.HeaderMatch.IntegerRange range_match = 7; + * @param \Google\Cloud\NetworkServices\V1\HttpRoute\HeaderMatch\IntegerRange $var + * @return $this + */ + public function setRangeMatch($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkServices\V1\HttpRoute\HeaderMatch\IntegerRange::class); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * The name of the HTTP header to match against. + * + * Generated from protobuf field string header = 1; + * @return string + */ + public function getHeader() + { + return $this->header; + } + + /** + * The name of the HTTP header to match against. + * + * Generated from protobuf field string header = 1; + * @param string $var + * @return $this + */ + public function setHeader($var) + { + GPBUtil::checkString($var, True); + $this->header = $var; + + return $this; + } + + /** + * If specified, the match result will be inverted before checking. Default + * value is set to false. + * + * Generated from protobuf field bool invert_match = 8; + * @return bool + */ + public function getInvertMatch() + { + return $this->invert_match; + } + + /** + * If specified, the match result will be inverted before checking. Default + * value is set to false. + * + * Generated from protobuf field bool invert_match = 8; + * @param bool $var + * @return $this + */ + public function setInvertMatch($var) + { + GPBUtil::checkBool($var); + $this->invert_match = $var; + + return $this; + } + + /** + * @return string + */ + public function getMatchType() + { + return $this->whichOneof("MatchType"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(HeaderMatch::class, \Google\Cloud\NetworkServices\V1\HttpRoute_HeaderMatch::class); + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/HeaderMatch/IntegerRange.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/HeaderMatch/IntegerRange.php new file mode 100644 index 000000000000..553192944963 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/HeaderMatch/IntegerRange.php @@ -0,0 +1,104 @@ +google.cloud.networkservices.v1.HttpRoute.HeaderMatch.IntegerRange + */ +class IntegerRange extends \Google\Protobuf\Internal\Message +{ + /** + * Start of the range (inclusive) + * + * Generated from protobuf field int32 start = 1; + */ + protected $start = 0; + /** + * End of the range (exclusive) + * + * Generated from protobuf field int32 end = 2; + */ + protected $end = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $start + * Start of the range (inclusive) + * @type int $end + * End of the range (exclusive) + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\HttpRoute::initOnce(); + parent::__construct($data); + } + + /** + * Start of the range (inclusive) + * + * Generated from protobuf field int32 start = 1; + * @return int + */ + public function getStart() + { + return $this->start; + } + + /** + * Start of the range (inclusive) + * + * Generated from protobuf field int32 start = 1; + * @param int $var + * @return $this + */ + public function setStart($var) + { + GPBUtil::checkInt32($var); + $this->start = $var; + + return $this; + } + + /** + * End of the range (exclusive) + * + * Generated from protobuf field int32 end = 2; + * @return int + */ + public function getEnd() + { + return $this->end; + } + + /** + * End of the range (exclusive) + * + * Generated from protobuf field int32 end = 2; + * @param int $var + * @return $this + */ + public function setEnd($var) + { + GPBUtil::checkInt32($var); + $this->end = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(IntegerRange::class, \Google\Cloud\NetworkServices\V1\HttpRoute_HeaderMatch_IntegerRange::class); + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/HeaderModifier.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/HeaderModifier.php new file mode 100644 index 000000000000..236b99df598d --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/HeaderModifier.php @@ -0,0 +1,147 @@ +google.cloud.networkservices.v1.HttpRoute.HeaderModifier + */ +class HeaderModifier extends \Google\Protobuf\Internal\Message +{ + /** + * Completely overwrite/replace the headers with given map where key is the + * name of the header, value is the value of the header. + * + * Generated from protobuf field map set = 1; + */ + private $set; + /** + * Add the headers with given map where key is the name of the header, value + * is the value of the header. + * + * Generated from protobuf field map add = 2; + */ + private $add; + /** + * Remove headers (matching by header names) specified in the list. + * + * Generated from protobuf field repeated string remove = 3; + */ + private $remove; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\MapField $set + * Completely overwrite/replace the headers with given map where key is the + * name of the header, value is the value of the header. + * @type array|\Google\Protobuf\Internal\MapField $add + * Add the headers with given map where key is the name of the header, value + * is the value of the header. + * @type array|\Google\Protobuf\Internal\RepeatedField $remove + * Remove headers (matching by header names) specified in the list. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\HttpRoute::initOnce(); + parent::__construct($data); + } + + /** + * Completely overwrite/replace the headers with given map where key is the + * name of the header, value is the value of the header. + * + * Generated from protobuf field map set = 1; + * @return \Google\Protobuf\Internal\MapField + */ + public function getSet() + { + return $this->set; + } + + /** + * Completely overwrite/replace the headers with given map where key is the + * name of the header, value is the value of the header. + * + * Generated from protobuf field map set = 1; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setSet($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->set = $arr; + + return $this; + } + + /** + * Add the headers with given map where key is the name of the header, value + * is the value of the header. + * + * Generated from protobuf field map add = 2; + * @return \Google\Protobuf\Internal\MapField + */ + public function getAdd() + { + return $this->add; + } + + /** + * Add the headers with given map where key is the name of the header, value + * is the value of the header. + * + * Generated from protobuf field map add = 2; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setAdd($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->add = $arr; + + return $this; + } + + /** + * Remove headers (matching by header names) specified in the list. + * + * Generated from protobuf field repeated string remove = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRemove() + { + return $this->remove; + } + + /** + * Remove headers (matching by header names) specified in the list. + * + * Generated from protobuf field repeated string remove = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRemove($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->remove = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(HeaderModifier::class, \Google\Cloud\NetworkServices\V1\HttpRoute_HeaderModifier::class); + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/QueryParameterMatch.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/QueryParameterMatch.php new file mode 100644 index 000000000000..498cf9ce46be --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/QueryParameterMatch.php @@ -0,0 +1,202 @@ +google.cloud.networkservices.v1.HttpRoute.QueryParameterMatch + */ +class QueryParameterMatch extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the query parameter to match. + * + * Generated from protobuf field string query_parameter = 1; + */ + protected $query_parameter = ''; + protected $MatchType; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $exact_match + * The value of the query parameter must exactly match the contents of + * exact_match. + * Only one of exact_match, regex_match, or present_match must be set. + * @type string $regex_match + * The value of the query parameter must match the regular expression + * specified by regex_match. For regular expression grammar, please see + * https://github.com/google/re2/wiki/Syntax + * Only one of exact_match, regex_match, or present_match must be set. + * @type bool $present_match + * Specifies that the QueryParameterMatcher matches if request contains + * query parameter, irrespective of whether the parameter has a value or + * not. + * Only one of exact_match, regex_match, or present_match must be set. + * @type string $query_parameter + * The name of the query parameter to match. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\HttpRoute::initOnce(); + parent::__construct($data); + } + + /** + * The value of the query parameter must exactly match the contents of + * exact_match. + * Only one of exact_match, regex_match, or present_match must be set. + * + * Generated from protobuf field string exact_match = 2; + * @return string + */ + public function getExactMatch() + { + return $this->readOneof(2); + } + + public function hasExactMatch() + { + return $this->hasOneof(2); + } + + /** + * The value of the query parameter must exactly match the contents of + * exact_match. + * Only one of exact_match, regex_match, or present_match must be set. + * + * Generated from protobuf field string exact_match = 2; + * @param string $var + * @return $this + */ + public function setExactMatch($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * The value of the query parameter must match the regular expression + * specified by regex_match. For regular expression grammar, please see + * https://github.com/google/re2/wiki/Syntax + * Only one of exact_match, regex_match, or present_match must be set. + * + * Generated from protobuf field string regex_match = 3; + * @return string + */ + public function getRegexMatch() + { + return $this->readOneof(3); + } + + public function hasRegexMatch() + { + return $this->hasOneof(3); + } + + /** + * The value of the query parameter must match the regular expression + * specified by regex_match. For regular expression grammar, please see + * https://github.com/google/re2/wiki/Syntax + * Only one of exact_match, regex_match, or present_match must be set. + * + * Generated from protobuf field string regex_match = 3; + * @param string $var + * @return $this + */ + public function setRegexMatch($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Specifies that the QueryParameterMatcher matches if request contains + * query parameter, irrespective of whether the parameter has a value or + * not. + * Only one of exact_match, regex_match, or present_match must be set. + * + * Generated from protobuf field bool present_match = 4; + * @return bool + */ + public function getPresentMatch() + { + return $this->readOneof(4); + } + + public function hasPresentMatch() + { + return $this->hasOneof(4); + } + + /** + * Specifies that the QueryParameterMatcher matches if request contains + * query parameter, irrespective of whether the parameter has a value or + * not. + * Only one of exact_match, regex_match, or present_match must be set. + * + * Generated from protobuf field bool present_match = 4; + * @param bool $var + * @return $this + */ + public function setPresentMatch($var) + { + GPBUtil::checkBool($var); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * The name of the query parameter to match. + * + * Generated from protobuf field string query_parameter = 1; + * @return string + */ + public function getQueryParameter() + { + return $this->query_parameter; + } + + /** + * The name of the query parameter to match. + * + * Generated from protobuf field string query_parameter = 1; + * @param string $var + * @return $this + */ + public function setQueryParameter($var) + { + GPBUtil::checkString($var, True); + $this->query_parameter = $var; + + return $this; + } + + /** + * @return string + */ + public function getMatchType() + { + return $this->whichOneof("MatchType"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(QueryParameterMatch::class, \Google\Cloud\NetworkServices\V1\HttpRoute_QueryParameterMatch::class); + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/Redirect.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/Redirect.php new file mode 100644 index 000000000000..044a694184e1 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/Redirect.php @@ -0,0 +1,330 @@ +google.cloud.networkservices.v1.HttpRoute.Redirect + */ +class Redirect extends \Google\Protobuf\Internal\Message +{ + /** + * The host that will be used in the redirect response instead of the one + * that was supplied in the request. + * + * Generated from protobuf field string host_redirect = 1; + */ + protected $host_redirect = ''; + /** + * The path that will be used in the redirect response instead of the one + * that was supplied in the request. + * path_redirect can not be supplied together with prefix_redirect. Supply + * one alone or neither. If neither is supplied, the path of the original + * request will be used for the redirect. + * + * Generated from protobuf field string path_redirect = 2; + */ + protected $path_redirect = ''; + /** + * Indicates that during redirection, the matched prefix (or path) should be + * swapped with this value. This option allows URLs be dynamically created + * based on the request. + * + * Generated from protobuf field string prefix_rewrite = 3; + */ + protected $prefix_rewrite = ''; + /** + * The HTTP Status code to use for the redirect. + * + * Generated from protobuf field .google.cloud.networkservices.v1.HttpRoute.Redirect.ResponseCode response_code = 4; + */ + protected $response_code = 0; + /** + * If set to true, the URL scheme in the redirected request is set to https. + * If set to false, the URL scheme of the redirected request will remain the + * same as that of the request. + * The default is set to false. + * + * Generated from protobuf field bool https_redirect = 5; + */ + protected $https_redirect = false; + /** + * if set to true, any accompanying query portion of the original URL is + * removed prior to redirecting the request. If set to false, the query + * portion of the original URL is retained. + * The default is set to false. + * + * Generated from protobuf field bool strip_query = 6; + */ + protected $strip_query = false; + /** + * The port that will be used in the redirected request instead of the one + * that was supplied in the request. + * + * Generated from protobuf field int32 port_redirect = 7; + */ + protected $port_redirect = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $host_redirect + * The host that will be used in the redirect response instead of the one + * that was supplied in the request. + * @type string $path_redirect + * The path that will be used in the redirect response instead of the one + * that was supplied in the request. + * path_redirect can not be supplied together with prefix_redirect. Supply + * one alone or neither. If neither is supplied, the path of the original + * request will be used for the redirect. + * @type string $prefix_rewrite + * Indicates that during redirection, the matched prefix (or path) should be + * swapped with this value. This option allows URLs be dynamically created + * based on the request. + * @type int $response_code + * The HTTP Status code to use for the redirect. + * @type bool $https_redirect + * If set to true, the URL scheme in the redirected request is set to https. + * If set to false, the URL scheme of the redirected request will remain the + * same as that of the request. + * The default is set to false. + * @type bool $strip_query + * if set to true, any accompanying query portion of the original URL is + * removed prior to redirecting the request. If set to false, the query + * portion of the original URL is retained. + * The default is set to false. + * @type int $port_redirect + * The port that will be used in the redirected request instead of the one + * that was supplied in the request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\HttpRoute::initOnce(); + parent::__construct($data); + } + + /** + * The host that will be used in the redirect response instead of the one + * that was supplied in the request. + * + * Generated from protobuf field string host_redirect = 1; + * @return string + */ + public function getHostRedirect() + { + return $this->host_redirect; + } + + /** + * The host that will be used in the redirect response instead of the one + * that was supplied in the request. + * + * Generated from protobuf field string host_redirect = 1; + * @param string $var + * @return $this + */ + public function setHostRedirect($var) + { + GPBUtil::checkString($var, True); + $this->host_redirect = $var; + + return $this; + } + + /** + * The path that will be used in the redirect response instead of the one + * that was supplied in the request. + * path_redirect can not be supplied together with prefix_redirect. Supply + * one alone or neither. If neither is supplied, the path of the original + * request will be used for the redirect. + * + * Generated from protobuf field string path_redirect = 2; + * @return string + */ + public function getPathRedirect() + { + return $this->path_redirect; + } + + /** + * The path that will be used in the redirect response instead of the one + * that was supplied in the request. + * path_redirect can not be supplied together with prefix_redirect. Supply + * one alone or neither. If neither is supplied, the path of the original + * request will be used for the redirect. + * + * Generated from protobuf field string path_redirect = 2; + * @param string $var + * @return $this + */ + public function setPathRedirect($var) + { + GPBUtil::checkString($var, True); + $this->path_redirect = $var; + + return $this; + } + + /** + * Indicates that during redirection, the matched prefix (or path) should be + * swapped with this value. This option allows URLs be dynamically created + * based on the request. + * + * Generated from protobuf field string prefix_rewrite = 3; + * @return string + */ + public function getPrefixRewrite() + { + return $this->prefix_rewrite; + } + + /** + * Indicates that during redirection, the matched prefix (or path) should be + * swapped with this value. This option allows URLs be dynamically created + * based on the request. + * + * Generated from protobuf field string prefix_rewrite = 3; + * @param string $var + * @return $this + */ + public function setPrefixRewrite($var) + { + GPBUtil::checkString($var, True); + $this->prefix_rewrite = $var; + + return $this; + } + + /** + * The HTTP Status code to use for the redirect. + * + * Generated from protobuf field .google.cloud.networkservices.v1.HttpRoute.Redirect.ResponseCode response_code = 4; + * @return int + */ + public function getResponseCode() + { + return $this->response_code; + } + + /** + * The HTTP Status code to use for the redirect. + * + * Generated from protobuf field .google.cloud.networkservices.v1.HttpRoute.Redirect.ResponseCode response_code = 4; + * @param int $var + * @return $this + */ + public function setResponseCode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetworkServices\V1\HttpRoute\Redirect\ResponseCode::class); + $this->response_code = $var; + + return $this; + } + + /** + * If set to true, the URL scheme in the redirected request is set to https. + * If set to false, the URL scheme of the redirected request will remain the + * same as that of the request. + * The default is set to false. + * + * Generated from protobuf field bool https_redirect = 5; + * @return bool + */ + public function getHttpsRedirect() + { + return $this->https_redirect; + } + + /** + * If set to true, the URL scheme in the redirected request is set to https. + * If set to false, the URL scheme of the redirected request will remain the + * same as that of the request. + * The default is set to false. + * + * Generated from protobuf field bool https_redirect = 5; + * @param bool $var + * @return $this + */ + public function setHttpsRedirect($var) + { + GPBUtil::checkBool($var); + $this->https_redirect = $var; + + return $this; + } + + /** + * if set to true, any accompanying query portion of the original URL is + * removed prior to redirecting the request. If set to false, the query + * portion of the original URL is retained. + * The default is set to false. + * + * Generated from protobuf field bool strip_query = 6; + * @return bool + */ + public function getStripQuery() + { + return $this->strip_query; + } + + /** + * if set to true, any accompanying query portion of the original URL is + * removed prior to redirecting the request. If set to false, the query + * portion of the original URL is retained. + * The default is set to false. + * + * Generated from protobuf field bool strip_query = 6; + * @param bool $var + * @return $this + */ + public function setStripQuery($var) + { + GPBUtil::checkBool($var); + $this->strip_query = $var; + + return $this; + } + + /** + * The port that will be used in the redirected request instead of the one + * that was supplied in the request. + * + * Generated from protobuf field int32 port_redirect = 7; + * @return int + */ + public function getPortRedirect() + { + return $this->port_redirect; + } + + /** + * The port that will be used in the redirected request instead of the one + * that was supplied in the request. + * + * Generated from protobuf field int32 port_redirect = 7; + * @param int $var + * @return $this + */ + public function setPortRedirect($var) + { + GPBUtil::checkInt32($var); + $this->port_redirect = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Redirect::class, \Google\Cloud\NetworkServices\V1\HttpRoute_Redirect::class); + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/Redirect/ResponseCode.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/Redirect/ResponseCode.php new file mode 100644 index 000000000000..15f341d6c08f --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/Redirect/ResponseCode.php @@ -0,0 +1,85 @@ +google.cloud.networkservices.v1.HttpRoute.Redirect.ResponseCode + */ +class ResponseCode +{ + /** + * Default value + * + * Generated from protobuf enum RESPONSE_CODE_UNSPECIFIED = 0; + */ + const RESPONSE_CODE_UNSPECIFIED = 0; + /** + * Corresponds to 301. + * + * Generated from protobuf enum MOVED_PERMANENTLY_DEFAULT = 1; + */ + const MOVED_PERMANENTLY_DEFAULT = 1; + /** + * Corresponds to 302. + * + * Generated from protobuf enum FOUND = 2; + */ + const FOUND = 2; + /** + * Corresponds to 303. + * + * Generated from protobuf enum SEE_OTHER = 3; + */ + const SEE_OTHER = 3; + /** + * Corresponds to 307. In this case, the request method will be retained. + * + * Generated from protobuf enum TEMPORARY_REDIRECT = 4; + */ + const TEMPORARY_REDIRECT = 4; + /** + * Corresponds to 308. In this case, the request method will be retained. + * + * Generated from protobuf enum PERMANENT_REDIRECT = 5; + */ + const PERMANENT_REDIRECT = 5; + + private static $valueToName = [ + self::RESPONSE_CODE_UNSPECIFIED => 'RESPONSE_CODE_UNSPECIFIED', + self::MOVED_PERMANENTLY_DEFAULT => 'MOVED_PERMANENTLY_DEFAULT', + self::FOUND => 'FOUND', + self::SEE_OTHER => 'SEE_OTHER', + self::TEMPORARY_REDIRECT => 'TEMPORARY_REDIRECT', + self::PERMANENT_REDIRECT => 'PERMANENT_REDIRECT', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ResponseCode::class, \Google\Cloud\NetworkServices\V1\HttpRoute_Redirect_ResponseCode::class); + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/RequestMirrorPolicy.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/RequestMirrorPolicy.php new file mode 100644 index 000000000000..706091e03e04 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/RequestMirrorPolicy.php @@ -0,0 +1,87 @@ +google.cloud.networkservices.v1.HttpRoute.RequestMirrorPolicy + */ +class RequestMirrorPolicy extends \Google\Protobuf\Internal\Message +{ + /** + * The destination the requests will be mirrored to. The weight of the + * destination will be ignored. + * + * Generated from protobuf field .google.cloud.networkservices.v1.HttpRoute.Destination destination = 1; + */ + protected $destination = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\NetworkServices\V1\HttpRoute\Destination $destination + * The destination the requests will be mirrored to. The weight of the + * destination will be ignored. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\HttpRoute::initOnce(); + parent::__construct($data); + } + + /** + * The destination the requests will be mirrored to. The weight of the + * destination will be ignored. + * + * Generated from protobuf field .google.cloud.networkservices.v1.HttpRoute.Destination destination = 1; + * @return \Google\Cloud\NetworkServices\V1\HttpRoute\Destination|null + */ + public function getDestination() + { + return $this->destination; + } + + public function hasDestination() + { + return isset($this->destination); + } + + public function clearDestination() + { + unset($this->destination); + } + + /** + * The destination the requests will be mirrored to. The weight of the + * destination will be ignored. + * + * Generated from protobuf field .google.cloud.networkservices.v1.HttpRoute.Destination destination = 1; + * @param \Google\Cloud\NetworkServices\V1\HttpRoute\Destination $var + * @return $this + */ + public function setDestination($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkServices\V1\HttpRoute\Destination::class); + $this->destination = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(RequestMirrorPolicy::class, \Google\Cloud\NetworkServices\V1\HttpRoute_RequestMirrorPolicy::class); + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/RetryPolicy.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/RetryPolicy.php new file mode 100644 index 000000000000..eafe92344ce6 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/RetryPolicy.php @@ -0,0 +1,216 @@ +google.cloud.networkservices.v1.HttpRoute.RetryPolicy + */ +class RetryPolicy extends \Google\Protobuf\Internal\Message +{ + /** + * Specifies one or more conditions when this retry policy applies. Valid + * values are: + * 5xx: Proxy will attempt a retry if the destination service responds + * with any 5xx response code, of if the destination service does not + * respond at all, example: disconnect, reset, read timeout, connection + * failure and refused streams. + * gateway-error: Similar to 5xx, but only applies to response codes 502, + * 503, 504. + * reset: Proxy will attempt a retry if the destination service does not + * respond at all (disconnect/reset/read timeout) + * connect-failure: Proxy will retry on failures connecting to destination + * for example due to connection timeouts. + * retriable-4xx: Proxy will retry fro retriable 4xx response codes. + * Currently the only retriable error supported is 409. + * refused-stream: Proxy will retry if the destination resets the stream + * with a REFUSED_STREAM error code. This reset type indicates that it + * is safe to retry. + * + * Generated from protobuf field repeated string retry_conditions = 1; + */ + private $retry_conditions; + /** + * Specifies the allowed number of retries. This number must be > 0. If not + * specified, default to 1. + * + * Generated from protobuf field int32 num_retries = 2; + */ + protected $num_retries = 0; + /** + * Specifies a non-zero timeout per retry attempt. + * + * Generated from protobuf field .google.protobuf.Duration per_try_timeout = 3; + */ + protected $per_try_timeout = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $retry_conditions + * Specifies one or more conditions when this retry policy applies. Valid + * values are: + * 5xx: Proxy will attempt a retry if the destination service responds + * with any 5xx response code, of if the destination service does not + * respond at all, example: disconnect, reset, read timeout, connection + * failure and refused streams. + * gateway-error: Similar to 5xx, but only applies to response codes 502, + * 503, 504. + * reset: Proxy will attempt a retry if the destination service does not + * respond at all (disconnect/reset/read timeout) + * connect-failure: Proxy will retry on failures connecting to destination + * for example due to connection timeouts. + * retriable-4xx: Proxy will retry fro retriable 4xx response codes. + * Currently the only retriable error supported is 409. + * refused-stream: Proxy will retry if the destination resets the stream + * with a REFUSED_STREAM error code. This reset type indicates that it + * is safe to retry. + * @type int $num_retries + * Specifies the allowed number of retries. This number must be > 0. If not + * specified, default to 1. + * @type \Google\Protobuf\Duration $per_try_timeout + * Specifies a non-zero timeout per retry attempt. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\HttpRoute::initOnce(); + parent::__construct($data); + } + + /** + * Specifies one or more conditions when this retry policy applies. Valid + * values are: + * 5xx: Proxy will attempt a retry if the destination service responds + * with any 5xx response code, of if the destination service does not + * respond at all, example: disconnect, reset, read timeout, connection + * failure and refused streams. + * gateway-error: Similar to 5xx, but only applies to response codes 502, + * 503, 504. + * reset: Proxy will attempt a retry if the destination service does not + * respond at all (disconnect/reset/read timeout) + * connect-failure: Proxy will retry on failures connecting to destination + * for example due to connection timeouts. + * retriable-4xx: Proxy will retry fro retriable 4xx response codes. + * Currently the only retriable error supported is 409. + * refused-stream: Proxy will retry if the destination resets the stream + * with a REFUSED_STREAM error code. This reset type indicates that it + * is safe to retry. + * + * Generated from protobuf field repeated string retry_conditions = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRetryConditions() + { + return $this->retry_conditions; + } + + /** + * Specifies one or more conditions when this retry policy applies. Valid + * values are: + * 5xx: Proxy will attempt a retry if the destination service responds + * with any 5xx response code, of if the destination service does not + * respond at all, example: disconnect, reset, read timeout, connection + * failure and refused streams. + * gateway-error: Similar to 5xx, but only applies to response codes 502, + * 503, 504. + * reset: Proxy will attempt a retry if the destination service does not + * respond at all (disconnect/reset/read timeout) + * connect-failure: Proxy will retry on failures connecting to destination + * for example due to connection timeouts. + * retriable-4xx: Proxy will retry fro retriable 4xx response codes. + * Currently the only retriable error supported is 409. + * refused-stream: Proxy will retry if the destination resets the stream + * with a REFUSED_STREAM error code. This reset type indicates that it + * is safe to retry. + * + * Generated from protobuf field repeated string retry_conditions = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRetryConditions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->retry_conditions = $arr; + + return $this; + } + + /** + * Specifies the allowed number of retries. This number must be > 0. If not + * specified, default to 1. + * + * Generated from protobuf field int32 num_retries = 2; + * @return int + */ + public function getNumRetries() + { + return $this->num_retries; + } + + /** + * Specifies the allowed number of retries. This number must be > 0. If not + * specified, default to 1. + * + * Generated from protobuf field int32 num_retries = 2; + * @param int $var + * @return $this + */ + public function setNumRetries($var) + { + GPBUtil::checkInt32($var); + $this->num_retries = $var; + + return $this; + } + + /** + * Specifies a non-zero timeout per retry attempt. + * + * Generated from protobuf field .google.protobuf.Duration per_try_timeout = 3; + * @return \Google\Protobuf\Duration|null + */ + public function getPerTryTimeout() + { + return $this->per_try_timeout; + } + + public function hasPerTryTimeout() + { + return isset($this->per_try_timeout); + } + + public function clearPerTryTimeout() + { + unset($this->per_try_timeout); + } + + /** + * Specifies a non-zero timeout per retry attempt. + * + * Generated from protobuf field .google.protobuf.Duration per_try_timeout = 3; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setPerTryTimeout($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->per_try_timeout = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(RetryPolicy::class, \Google\Cloud\NetworkServices\V1\HttpRoute_RetryPolicy::class); + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/RouteAction.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/RouteAction.php new file mode 100644 index 000000000000..863e7c5acd62 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/RouteAction.php @@ -0,0 +1,546 @@ +google.cloud.networkservices.v1.HttpRoute.RouteAction + */ +class RouteAction extends \Google\Protobuf\Internal\Message +{ + /** + * The destination to which traffic should be forwarded. + * + * Generated from protobuf field repeated .google.cloud.networkservices.v1.HttpRoute.Destination destinations = 1; + */ + private $destinations; + /** + * If set, the request is directed as configured by this field. + * + * Generated from protobuf field .google.cloud.networkservices.v1.HttpRoute.Redirect redirect = 2; + */ + protected $redirect = null; + /** + * The specification for fault injection introduced into traffic to test the + * resiliency of clients to backend service failure. As part of fault + * injection, when clients send requests to a backend service, delays can be + * introduced on a percentage of requests before sending those requests to + * the backend service. Similarly requests from clients can be aborted for a + * percentage of requests. + * timeout and retry_policy will be ignored by clients that are configured + * with a fault_injection_policy + * + * Generated from protobuf field .google.cloud.networkservices.v1.HttpRoute.FaultInjectionPolicy fault_injection_policy = 4; + */ + protected $fault_injection_policy = null; + /** + * The specification for modifying the headers of a matching request prior + * to delivery of the request to the destination. If HeaderModifiers are set + * on both the Destination and the RouteAction, they will be merged. + * Conflicts between the two will not be resolved on the configuration. + * + * Generated from protobuf field .google.cloud.networkservices.v1.HttpRoute.HeaderModifier request_header_modifier = 5; + */ + protected $request_header_modifier = null; + /** + * The specification for modifying the headers of a response prior to + * sending the response back to the client. If HeaderModifiers are set + * on both the Destination and the RouteAction, they will be merged. + * Conflicts between the two will not be resolved on the configuration. + * + * Generated from protobuf field .google.cloud.networkservices.v1.HttpRoute.HeaderModifier response_header_modifier = 6; + */ + protected $response_header_modifier = null; + /** + * The specification for rewrite URL before forwarding requests to the + * destination. + * + * Generated from protobuf field .google.cloud.networkservices.v1.HttpRoute.URLRewrite url_rewrite = 7; + */ + protected $url_rewrite = null; + /** + * Specifies the timeout for selected route. Timeout is computed from the + * time the request has been fully processed (i.e. end of stream) up until + * the response has been completely processed. Timeout includes all retries. + * + * Generated from protobuf field .google.protobuf.Duration timeout = 8; + */ + protected $timeout = null; + /** + * Specifies the retry policy associated with this route. + * + * Generated from protobuf field .google.cloud.networkservices.v1.HttpRoute.RetryPolicy retry_policy = 9; + */ + protected $retry_policy = null; + /** + * Specifies the policy on how requests intended for the routes destination + * are shadowed to a separate mirrored destination. Proxy will not wait for + * the shadow destination to respond before returning the response. Prior to + * sending traffic to the shadow service, the host/authority header is + * suffixed with -shadow. + * + * Generated from protobuf field .google.cloud.networkservices.v1.HttpRoute.RequestMirrorPolicy request_mirror_policy = 10; + */ + protected $request_mirror_policy = null; + /** + * The specification for allowing client side cross-origin requests. + * + * Generated from protobuf field .google.cloud.networkservices.v1.HttpRoute.CorsPolicy cors_policy = 11; + */ + protected $cors_policy = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\NetworkServices\V1\HttpRoute\Destination>|\Google\Protobuf\Internal\RepeatedField $destinations + * The destination to which traffic should be forwarded. + * @type \Google\Cloud\NetworkServices\V1\HttpRoute\Redirect $redirect + * If set, the request is directed as configured by this field. + * @type \Google\Cloud\NetworkServices\V1\HttpRoute\FaultInjectionPolicy $fault_injection_policy + * The specification for fault injection introduced into traffic to test the + * resiliency of clients to backend service failure. As part of fault + * injection, when clients send requests to a backend service, delays can be + * introduced on a percentage of requests before sending those requests to + * the backend service. Similarly requests from clients can be aborted for a + * percentage of requests. + * timeout and retry_policy will be ignored by clients that are configured + * with a fault_injection_policy + * @type \Google\Cloud\NetworkServices\V1\HttpRoute\HeaderModifier $request_header_modifier + * The specification for modifying the headers of a matching request prior + * to delivery of the request to the destination. If HeaderModifiers are set + * on both the Destination and the RouteAction, they will be merged. + * Conflicts between the two will not be resolved on the configuration. + * @type \Google\Cloud\NetworkServices\V1\HttpRoute\HeaderModifier $response_header_modifier + * The specification for modifying the headers of a response prior to + * sending the response back to the client. If HeaderModifiers are set + * on both the Destination and the RouteAction, they will be merged. + * Conflicts between the two will not be resolved on the configuration. + * @type \Google\Cloud\NetworkServices\V1\HttpRoute\URLRewrite $url_rewrite + * The specification for rewrite URL before forwarding requests to the + * destination. + * @type \Google\Protobuf\Duration $timeout + * Specifies the timeout for selected route. Timeout is computed from the + * time the request has been fully processed (i.e. end of stream) up until + * the response has been completely processed. Timeout includes all retries. + * @type \Google\Cloud\NetworkServices\V1\HttpRoute\RetryPolicy $retry_policy + * Specifies the retry policy associated with this route. + * @type \Google\Cloud\NetworkServices\V1\HttpRoute\RequestMirrorPolicy $request_mirror_policy + * Specifies the policy on how requests intended for the routes destination + * are shadowed to a separate mirrored destination. Proxy will not wait for + * the shadow destination to respond before returning the response. Prior to + * sending traffic to the shadow service, the host/authority header is + * suffixed with -shadow. + * @type \Google\Cloud\NetworkServices\V1\HttpRoute\CorsPolicy $cors_policy + * The specification for allowing client side cross-origin requests. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\HttpRoute::initOnce(); + parent::__construct($data); + } + + /** + * The destination to which traffic should be forwarded. + * + * Generated from protobuf field repeated .google.cloud.networkservices.v1.HttpRoute.Destination destinations = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDestinations() + { + return $this->destinations; + } + + /** + * The destination to which traffic should be forwarded. + * + * Generated from protobuf field repeated .google.cloud.networkservices.v1.HttpRoute.Destination destinations = 1; + * @param array<\Google\Cloud\NetworkServices\V1\HttpRoute\Destination>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDestinations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkServices\V1\HttpRoute\Destination::class); + $this->destinations = $arr; + + return $this; + } + + /** + * If set, the request is directed as configured by this field. + * + * Generated from protobuf field .google.cloud.networkservices.v1.HttpRoute.Redirect redirect = 2; + * @return \Google\Cloud\NetworkServices\V1\HttpRoute\Redirect|null + */ + public function getRedirect() + { + return $this->redirect; + } + + public function hasRedirect() + { + return isset($this->redirect); + } + + public function clearRedirect() + { + unset($this->redirect); + } + + /** + * If set, the request is directed as configured by this field. + * + * Generated from protobuf field .google.cloud.networkservices.v1.HttpRoute.Redirect redirect = 2; + * @param \Google\Cloud\NetworkServices\V1\HttpRoute\Redirect $var + * @return $this + */ + public function setRedirect($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkServices\V1\HttpRoute\Redirect::class); + $this->redirect = $var; + + return $this; + } + + /** + * The specification for fault injection introduced into traffic to test the + * resiliency of clients to backend service failure. As part of fault + * injection, when clients send requests to a backend service, delays can be + * introduced on a percentage of requests before sending those requests to + * the backend service. Similarly requests from clients can be aborted for a + * percentage of requests. + * timeout and retry_policy will be ignored by clients that are configured + * with a fault_injection_policy + * + * Generated from protobuf field .google.cloud.networkservices.v1.HttpRoute.FaultInjectionPolicy fault_injection_policy = 4; + * @return \Google\Cloud\NetworkServices\V1\HttpRoute\FaultInjectionPolicy|null + */ + public function getFaultInjectionPolicy() + { + return $this->fault_injection_policy; + } + + public function hasFaultInjectionPolicy() + { + return isset($this->fault_injection_policy); + } + + public function clearFaultInjectionPolicy() + { + unset($this->fault_injection_policy); + } + + /** + * The specification for fault injection introduced into traffic to test the + * resiliency of clients to backend service failure. As part of fault + * injection, when clients send requests to a backend service, delays can be + * introduced on a percentage of requests before sending those requests to + * the backend service. Similarly requests from clients can be aborted for a + * percentage of requests. + * timeout and retry_policy will be ignored by clients that are configured + * with a fault_injection_policy + * + * Generated from protobuf field .google.cloud.networkservices.v1.HttpRoute.FaultInjectionPolicy fault_injection_policy = 4; + * @param \Google\Cloud\NetworkServices\V1\HttpRoute\FaultInjectionPolicy $var + * @return $this + */ + public function setFaultInjectionPolicy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkServices\V1\HttpRoute\FaultInjectionPolicy::class); + $this->fault_injection_policy = $var; + + return $this; + } + + /** + * The specification for modifying the headers of a matching request prior + * to delivery of the request to the destination. If HeaderModifiers are set + * on both the Destination and the RouteAction, they will be merged. + * Conflicts between the two will not be resolved on the configuration. + * + * Generated from protobuf field .google.cloud.networkservices.v1.HttpRoute.HeaderModifier request_header_modifier = 5; + * @return \Google\Cloud\NetworkServices\V1\HttpRoute\HeaderModifier|null + */ + public function getRequestHeaderModifier() + { + return $this->request_header_modifier; + } + + public function hasRequestHeaderModifier() + { + return isset($this->request_header_modifier); + } + + public function clearRequestHeaderModifier() + { + unset($this->request_header_modifier); + } + + /** + * The specification for modifying the headers of a matching request prior + * to delivery of the request to the destination. If HeaderModifiers are set + * on both the Destination and the RouteAction, they will be merged. + * Conflicts between the two will not be resolved on the configuration. + * + * Generated from protobuf field .google.cloud.networkservices.v1.HttpRoute.HeaderModifier request_header_modifier = 5; + * @param \Google\Cloud\NetworkServices\V1\HttpRoute\HeaderModifier $var + * @return $this + */ + public function setRequestHeaderModifier($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkServices\V1\HttpRoute\HeaderModifier::class); + $this->request_header_modifier = $var; + + return $this; + } + + /** + * The specification for modifying the headers of a response prior to + * sending the response back to the client. If HeaderModifiers are set + * on both the Destination and the RouteAction, they will be merged. + * Conflicts between the two will not be resolved on the configuration. + * + * Generated from protobuf field .google.cloud.networkservices.v1.HttpRoute.HeaderModifier response_header_modifier = 6; + * @return \Google\Cloud\NetworkServices\V1\HttpRoute\HeaderModifier|null + */ + public function getResponseHeaderModifier() + { + return $this->response_header_modifier; + } + + public function hasResponseHeaderModifier() + { + return isset($this->response_header_modifier); + } + + public function clearResponseHeaderModifier() + { + unset($this->response_header_modifier); + } + + /** + * The specification for modifying the headers of a response prior to + * sending the response back to the client. If HeaderModifiers are set + * on both the Destination and the RouteAction, they will be merged. + * Conflicts between the two will not be resolved on the configuration. + * + * Generated from protobuf field .google.cloud.networkservices.v1.HttpRoute.HeaderModifier response_header_modifier = 6; + * @param \Google\Cloud\NetworkServices\V1\HttpRoute\HeaderModifier $var + * @return $this + */ + public function setResponseHeaderModifier($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkServices\V1\HttpRoute\HeaderModifier::class); + $this->response_header_modifier = $var; + + return $this; + } + + /** + * The specification for rewrite URL before forwarding requests to the + * destination. + * + * Generated from protobuf field .google.cloud.networkservices.v1.HttpRoute.URLRewrite url_rewrite = 7; + * @return \Google\Cloud\NetworkServices\V1\HttpRoute\URLRewrite|null + */ + public function getUrlRewrite() + { + return $this->url_rewrite; + } + + public function hasUrlRewrite() + { + return isset($this->url_rewrite); + } + + public function clearUrlRewrite() + { + unset($this->url_rewrite); + } + + /** + * The specification for rewrite URL before forwarding requests to the + * destination. + * + * Generated from protobuf field .google.cloud.networkservices.v1.HttpRoute.URLRewrite url_rewrite = 7; + * @param \Google\Cloud\NetworkServices\V1\HttpRoute\URLRewrite $var + * @return $this + */ + public function setUrlRewrite($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkServices\V1\HttpRoute\URLRewrite::class); + $this->url_rewrite = $var; + + return $this; + } + + /** + * Specifies the timeout for selected route. Timeout is computed from the + * time the request has been fully processed (i.e. end of stream) up until + * the response has been completely processed. Timeout includes all retries. + * + * Generated from protobuf field .google.protobuf.Duration timeout = 8; + * @return \Google\Protobuf\Duration|null + */ + public function getTimeout() + { + return $this->timeout; + } + + public function hasTimeout() + { + return isset($this->timeout); + } + + public function clearTimeout() + { + unset($this->timeout); + } + + /** + * Specifies the timeout for selected route. Timeout is computed from the + * time the request has been fully processed (i.e. end of stream) up until + * the response has been completely processed. Timeout includes all retries. + * + * Generated from protobuf field .google.protobuf.Duration timeout = 8; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setTimeout($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->timeout = $var; + + return $this; + } + + /** + * Specifies the retry policy associated with this route. + * + * Generated from protobuf field .google.cloud.networkservices.v1.HttpRoute.RetryPolicy retry_policy = 9; + * @return \Google\Cloud\NetworkServices\V1\HttpRoute\RetryPolicy|null + */ + public function getRetryPolicy() + { + return $this->retry_policy; + } + + public function hasRetryPolicy() + { + return isset($this->retry_policy); + } + + public function clearRetryPolicy() + { + unset($this->retry_policy); + } + + /** + * Specifies the retry policy associated with this route. + * + * Generated from protobuf field .google.cloud.networkservices.v1.HttpRoute.RetryPolicy retry_policy = 9; + * @param \Google\Cloud\NetworkServices\V1\HttpRoute\RetryPolicy $var + * @return $this + */ + public function setRetryPolicy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkServices\V1\HttpRoute\RetryPolicy::class); + $this->retry_policy = $var; + + return $this; + } + + /** + * Specifies the policy on how requests intended for the routes destination + * are shadowed to a separate mirrored destination. Proxy will not wait for + * the shadow destination to respond before returning the response. Prior to + * sending traffic to the shadow service, the host/authority header is + * suffixed with -shadow. + * + * Generated from protobuf field .google.cloud.networkservices.v1.HttpRoute.RequestMirrorPolicy request_mirror_policy = 10; + * @return \Google\Cloud\NetworkServices\V1\HttpRoute\RequestMirrorPolicy|null + */ + public function getRequestMirrorPolicy() + { + return $this->request_mirror_policy; + } + + public function hasRequestMirrorPolicy() + { + return isset($this->request_mirror_policy); + } + + public function clearRequestMirrorPolicy() + { + unset($this->request_mirror_policy); + } + + /** + * Specifies the policy on how requests intended for the routes destination + * are shadowed to a separate mirrored destination. Proxy will not wait for + * the shadow destination to respond before returning the response. Prior to + * sending traffic to the shadow service, the host/authority header is + * suffixed with -shadow. + * + * Generated from protobuf field .google.cloud.networkservices.v1.HttpRoute.RequestMirrorPolicy request_mirror_policy = 10; + * @param \Google\Cloud\NetworkServices\V1\HttpRoute\RequestMirrorPolicy $var + * @return $this + */ + public function setRequestMirrorPolicy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkServices\V1\HttpRoute\RequestMirrorPolicy::class); + $this->request_mirror_policy = $var; + + return $this; + } + + /** + * The specification for allowing client side cross-origin requests. + * + * Generated from protobuf field .google.cloud.networkservices.v1.HttpRoute.CorsPolicy cors_policy = 11; + * @return \Google\Cloud\NetworkServices\V1\HttpRoute\CorsPolicy|null + */ + public function getCorsPolicy() + { + return $this->cors_policy; + } + + public function hasCorsPolicy() + { + return isset($this->cors_policy); + } + + public function clearCorsPolicy() + { + unset($this->cors_policy); + } + + /** + * The specification for allowing client side cross-origin requests. + * + * Generated from protobuf field .google.cloud.networkservices.v1.HttpRoute.CorsPolicy cors_policy = 11; + * @param \Google\Cloud\NetworkServices\V1\HttpRoute\CorsPolicy $var + * @return $this + */ + public function setCorsPolicy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkServices\V1\HttpRoute\CorsPolicy::class); + $this->cors_policy = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(RouteAction::class, \Google\Cloud\NetworkServices\V1\HttpRoute_RouteAction::class); + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/RouteMatch.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/RouteMatch.php new file mode 100644 index 000000000000..b8df819973f3 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/RouteMatch.php @@ -0,0 +1,290 @@ +google.cloud.networkservices.v1.HttpRoute.RouteMatch + */ +class RouteMatch extends \Google\Protobuf\Internal\Message +{ + /** + * Specifies if prefix_match and full_path_match matches are case sensitive. + * The default value is false. + * + * Generated from protobuf field bool ignore_case = 4; + */ + protected $ignore_case = false; + /** + * Specifies a list of HTTP request headers to match against. ALL of the + * supplied headers must be matched. + * + * Generated from protobuf field repeated .google.cloud.networkservices.v1.HttpRoute.HeaderMatch headers = 5; + */ + private $headers; + /** + * Specifies a list of query parameters to match against. ALL of the query + * parameters must be matched. + * + * Generated from protobuf field repeated .google.cloud.networkservices.v1.HttpRoute.QueryParameterMatch query_parameters = 6; + */ + private $query_parameters; + protected $PathMatch; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $full_path_match + * The HTTP request path value should exactly match this value. + * Only one of full_path_match, prefix_match, or regex_match should be + * used. + * @type string $prefix_match + * The HTTP request path value must begin with specified prefix_match. + * prefix_match must begin with a /. + * Only one of full_path_match, prefix_match, or regex_match should be + * used. + * @type string $regex_match + * The HTTP request path value must satisfy the regular expression + * specified by regex_match after removing any query parameters and anchor + * supplied with the original URL. For regular expression grammar, please + * see https://github.com/google/re2/wiki/Syntax + * Only one of full_path_match, prefix_match, or regex_match should be + * used. + * @type bool $ignore_case + * Specifies if prefix_match and full_path_match matches are case sensitive. + * The default value is false. + * @type array<\Google\Cloud\NetworkServices\V1\HttpRoute\HeaderMatch>|\Google\Protobuf\Internal\RepeatedField $headers + * Specifies a list of HTTP request headers to match against. ALL of the + * supplied headers must be matched. + * @type array<\Google\Cloud\NetworkServices\V1\HttpRoute\QueryParameterMatch>|\Google\Protobuf\Internal\RepeatedField $query_parameters + * Specifies a list of query parameters to match against. ALL of the query + * parameters must be matched. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\HttpRoute::initOnce(); + parent::__construct($data); + } + + /** + * The HTTP request path value should exactly match this value. + * Only one of full_path_match, prefix_match, or regex_match should be + * used. + * + * Generated from protobuf field string full_path_match = 1; + * @return string + */ + public function getFullPathMatch() + { + return $this->readOneof(1); + } + + public function hasFullPathMatch() + { + return $this->hasOneof(1); + } + + /** + * The HTTP request path value should exactly match this value. + * Only one of full_path_match, prefix_match, or regex_match should be + * used. + * + * Generated from protobuf field string full_path_match = 1; + * @param string $var + * @return $this + */ + public function setFullPathMatch($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * The HTTP request path value must begin with specified prefix_match. + * prefix_match must begin with a /. + * Only one of full_path_match, prefix_match, or regex_match should be + * used. + * + * Generated from protobuf field string prefix_match = 2; + * @return string + */ + public function getPrefixMatch() + { + return $this->readOneof(2); + } + + public function hasPrefixMatch() + { + return $this->hasOneof(2); + } + + /** + * The HTTP request path value must begin with specified prefix_match. + * prefix_match must begin with a /. + * Only one of full_path_match, prefix_match, or regex_match should be + * used. + * + * Generated from protobuf field string prefix_match = 2; + * @param string $var + * @return $this + */ + public function setPrefixMatch($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * The HTTP request path value must satisfy the regular expression + * specified by regex_match after removing any query parameters and anchor + * supplied with the original URL. For regular expression grammar, please + * see https://github.com/google/re2/wiki/Syntax + * Only one of full_path_match, prefix_match, or regex_match should be + * used. + * + * Generated from protobuf field string regex_match = 3; + * @return string + */ + public function getRegexMatch() + { + return $this->readOneof(3); + } + + public function hasRegexMatch() + { + return $this->hasOneof(3); + } + + /** + * The HTTP request path value must satisfy the regular expression + * specified by regex_match after removing any query parameters and anchor + * supplied with the original URL. For regular expression grammar, please + * see https://github.com/google/re2/wiki/Syntax + * Only one of full_path_match, prefix_match, or regex_match should be + * used. + * + * Generated from protobuf field string regex_match = 3; + * @param string $var + * @return $this + */ + public function setRegexMatch($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Specifies if prefix_match and full_path_match matches are case sensitive. + * The default value is false. + * + * Generated from protobuf field bool ignore_case = 4; + * @return bool + */ + public function getIgnoreCase() + { + return $this->ignore_case; + } + + /** + * Specifies if prefix_match and full_path_match matches are case sensitive. + * The default value is false. + * + * Generated from protobuf field bool ignore_case = 4; + * @param bool $var + * @return $this + */ + public function setIgnoreCase($var) + { + GPBUtil::checkBool($var); + $this->ignore_case = $var; + + return $this; + } + + /** + * Specifies a list of HTTP request headers to match against. ALL of the + * supplied headers must be matched. + * + * Generated from protobuf field repeated .google.cloud.networkservices.v1.HttpRoute.HeaderMatch headers = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getHeaders() + { + return $this->headers; + } + + /** + * Specifies a list of HTTP request headers to match against. ALL of the + * supplied headers must be matched. + * + * Generated from protobuf field repeated .google.cloud.networkservices.v1.HttpRoute.HeaderMatch headers = 5; + * @param array<\Google\Cloud\NetworkServices\V1\HttpRoute\HeaderMatch>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setHeaders($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkServices\V1\HttpRoute\HeaderMatch::class); + $this->headers = $arr; + + return $this; + } + + /** + * Specifies a list of query parameters to match against. ALL of the query + * parameters must be matched. + * + * Generated from protobuf field repeated .google.cloud.networkservices.v1.HttpRoute.QueryParameterMatch query_parameters = 6; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getQueryParameters() + { + return $this->query_parameters; + } + + /** + * Specifies a list of query parameters to match against. ALL of the query + * parameters must be matched. + * + * Generated from protobuf field repeated .google.cloud.networkservices.v1.HttpRoute.QueryParameterMatch query_parameters = 6; + * @param array<\Google\Cloud\NetworkServices\V1\HttpRoute\QueryParameterMatch>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setQueryParameters($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkServices\V1\HttpRoute\QueryParameterMatch::class); + $this->query_parameters = $arr; + + return $this; + } + + /** + * @return string + */ + public function getPathMatch() + { + return $this->whichOneof("PathMatch"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(RouteMatch::class, \Google\Cloud\NetworkServices\V1\HttpRoute_RouteMatch::class); + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/RouteRule.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/RouteRule.php new file mode 100644 index 000000000000..c81a5486d91d --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/RouteRule.php @@ -0,0 +1,139 @@ +google.cloud.networkservices.v1.HttpRoute.RouteRule + */ +class RouteRule extends \Google\Protobuf\Internal\Message +{ + /** + * A list of matches define conditions used for matching the rule against + * incoming HTTP requests. Each match is independent, i.e. this rule will be + * matched if ANY one of the matches is satisfied. + * If no matches field is specified, this rule will unconditionally match + * traffic. + * If a default rule is desired to be configured, add a rule with no matches + * specified to the end of the rules list. + * + * Generated from protobuf field repeated .google.cloud.networkservices.v1.HttpRoute.RouteMatch matches = 1; + */ + private $matches; + /** + * The detailed rule defining how to route matched traffic. + * + * Generated from protobuf field .google.cloud.networkservices.v1.HttpRoute.RouteAction action = 2; + */ + protected $action = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\NetworkServices\V1\HttpRoute\RouteMatch>|\Google\Protobuf\Internal\RepeatedField $matches + * A list of matches define conditions used for matching the rule against + * incoming HTTP requests. Each match is independent, i.e. this rule will be + * matched if ANY one of the matches is satisfied. + * If no matches field is specified, this rule will unconditionally match + * traffic. + * If a default rule is desired to be configured, add a rule with no matches + * specified to the end of the rules list. + * @type \Google\Cloud\NetworkServices\V1\HttpRoute\RouteAction $action + * The detailed rule defining how to route matched traffic. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\HttpRoute::initOnce(); + parent::__construct($data); + } + + /** + * A list of matches define conditions used for matching the rule against + * incoming HTTP requests. Each match is independent, i.e. this rule will be + * matched if ANY one of the matches is satisfied. + * If no matches field is specified, this rule will unconditionally match + * traffic. + * If a default rule is desired to be configured, add a rule with no matches + * specified to the end of the rules list. + * + * Generated from protobuf field repeated .google.cloud.networkservices.v1.HttpRoute.RouteMatch matches = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMatches() + { + return $this->matches; + } + + /** + * A list of matches define conditions used for matching the rule against + * incoming HTTP requests. Each match is independent, i.e. this rule will be + * matched if ANY one of the matches is satisfied. + * If no matches field is specified, this rule will unconditionally match + * traffic. + * If a default rule is desired to be configured, add a rule with no matches + * specified to the end of the rules list. + * + * Generated from protobuf field repeated .google.cloud.networkservices.v1.HttpRoute.RouteMatch matches = 1; + * @param array<\Google\Cloud\NetworkServices\V1\HttpRoute\RouteMatch>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMatches($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkServices\V1\HttpRoute\RouteMatch::class); + $this->matches = $arr; + + return $this; + } + + /** + * The detailed rule defining how to route matched traffic. + * + * Generated from protobuf field .google.cloud.networkservices.v1.HttpRoute.RouteAction action = 2; + * @return \Google\Cloud\NetworkServices\V1\HttpRoute\RouteAction|null + */ + public function getAction() + { + return $this->action; + } + + public function hasAction() + { + return isset($this->action); + } + + public function clearAction() + { + unset($this->action); + } + + /** + * The detailed rule defining how to route matched traffic. + * + * Generated from protobuf field .google.cloud.networkservices.v1.HttpRoute.RouteAction action = 2; + * @param \Google\Cloud\NetworkServices\V1\HttpRoute\RouteAction $var + * @return $this + */ + public function setAction($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkServices\V1\HttpRoute\RouteAction::class); + $this->action = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(RouteRule::class, \Google\Cloud\NetworkServices\V1\HttpRoute_RouteRule::class); + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/URLRewrite.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/URLRewrite.php new file mode 100644 index 000000000000..a5668baf2c48 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/URLRewrite.php @@ -0,0 +1,113 @@ +google.cloud.networkservices.v1.HttpRoute.URLRewrite + */ +class URLRewrite extends \Google\Protobuf\Internal\Message +{ + /** + * Prior to forwarding the request to the selected destination, the matching + * portion of the requests path is replaced by this value. + * + * Generated from protobuf field string path_prefix_rewrite = 1; + */ + protected $path_prefix_rewrite = ''; + /** + * Prior to forwarding the request to the selected destination, the requests + * host header is replaced by this value. + * + * Generated from protobuf field string host_rewrite = 2; + */ + protected $host_rewrite = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $path_prefix_rewrite + * Prior to forwarding the request to the selected destination, the matching + * portion of the requests path is replaced by this value. + * @type string $host_rewrite + * Prior to forwarding the request to the selected destination, the requests + * host header is replaced by this value. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\HttpRoute::initOnce(); + parent::__construct($data); + } + + /** + * Prior to forwarding the request to the selected destination, the matching + * portion of the requests path is replaced by this value. + * + * Generated from protobuf field string path_prefix_rewrite = 1; + * @return string + */ + public function getPathPrefixRewrite() + { + return $this->path_prefix_rewrite; + } + + /** + * Prior to forwarding the request to the selected destination, the matching + * portion of the requests path is replaced by this value. + * + * Generated from protobuf field string path_prefix_rewrite = 1; + * @param string $var + * @return $this + */ + public function setPathPrefixRewrite($var) + { + GPBUtil::checkString($var, True); + $this->path_prefix_rewrite = $var; + + return $this; + } + + /** + * Prior to forwarding the request to the selected destination, the requests + * host header is replaced by this value. + * + * Generated from protobuf field string host_rewrite = 2; + * @return string + */ + public function getHostRewrite() + { + return $this->host_rewrite; + } + + /** + * Prior to forwarding the request to the selected destination, the requests + * host header is replaced by this value. + * + * Generated from protobuf field string host_rewrite = 2; + * @param string $var + * @return $this + */ + public function setHostRewrite($var) + { + GPBUtil::checkString($var, True); + $this->host_rewrite = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(URLRewrite::class, \Google\Cloud\NetworkServices\V1\HttpRoute_URLRewrite::class); + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/LbRouteExtension.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/LbRouteExtension.php new file mode 100644 index 000000000000..9609aa638c89 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/LbRouteExtension.php @@ -0,0 +1,462 @@ +google.cloud.networkservices.v1.LbRouteExtension + */ +class LbRouteExtension extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Identifier. Name of the `LbRouteExtension` resource in the + * following format: + * `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Output only. The timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The timestamp when the resource was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Optional. A human-readable description of the resource. + * + * Generated from protobuf field string description = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Optional. Set of labels associated with the `LbRouteExtension` resource. + * The format must comply with [the requirements for + * labels](https://cloud.google.com/compute/docs/labeling-resources#requirements) + * for Google Cloud resources. + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Required. A list of references to the forwarding rules to which this + * service extension is attached to. At least one forwarding rule is required. + * There can be only one `LbRouteExtension` resource per forwarding rule. + * + * Generated from protobuf field repeated string forwarding_rules = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + private $forwarding_rules; + /** + * Required. A set of ordered extension chains that contain the match + * conditions and extensions to execute. Match conditions for each extension + * chain are evaluated in sequence for a given request. The first extension + * chain that has a condition that matches the request is executed. + * Any subsequent extension chains do not execute. + * Limited to 5 extension chains per resource. + * + * Generated from protobuf field repeated .google.cloud.networkservices.v1.ExtensionChain extension_chains = 7 [(.google.api.field_behavior) = REQUIRED]; + */ + private $extension_chains; + /** + * Required. All backend services and forwarding rules referenced by this + * extension must share the same load balancing scheme. Supported values: + * `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. For more information, refer to + * [Choosing a load + * balancer](https://cloud.google.com/load-balancing/docs/backend-service). + * + * Generated from protobuf field .google.cloud.networkservices.v1.LoadBalancingScheme load_balancing_scheme = 8 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $load_balancing_scheme = 0; + /** + * Optional. The metadata provided here is included as part of the + * `metadata_context` (of type `google.protobuf.Struct`) in the + * `ProcessingRequest` message sent to the extension + * server. The metadata is available under the namespace + * `com.google.lb_route_extension.`. + * The following variables are supported in the metadata Struct: + * `{forwarding_rule_id}` - substituted with the forwarding rule's fully + * qualified resource name. + * + * Generated from protobuf field .google.protobuf.Struct metadata = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $metadata = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Identifier. Name of the `LbRouteExtension` resource in the + * following format: + * `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}`. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The timestamp when the resource was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The timestamp when the resource was updated. + * @type string $description + * Optional. A human-readable description of the resource. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. Set of labels associated with the `LbRouteExtension` resource. + * The format must comply with [the requirements for + * labels](https://cloud.google.com/compute/docs/labeling-resources#requirements) + * for Google Cloud resources. + * @type array|\Google\Protobuf\Internal\RepeatedField $forwarding_rules + * Required. A list of references to the forwarding rules to which this + * service extension is attached to. At least one forwarding rule is required. + * There can be only one `LbRouteExtension` resource per forwarding rule. + * @type array<\Google\Cloud\NetworkServices\V1\ExtensionChain>|\Google\Protobuf\Internal\RepeatedField $extension_chains + * Required. A set of ordered extension chains that contain the match + * conditions and extensions to execute. Match conditions for each extension + * chain are evaluated in sequence for a given request. The first extension + * chain that has a condition that matches the request is executed. + * Any subsequent extension chains do not execute. + * Limited to 5 extension chains per resource. + * @type int $load_balancing_scheme + * Required. All backend services and forwarding rules referenced by this + * extension must share the same load balancing scheme. Supported values: + * `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. For more information, refer to + * [Choosing a load + * balancer](https://cloud.google.com/load-balancing/docs/backend-service). + * @type \Google\Protobuf\Struct $metadata + * Optional. The metadata provided here is included as part of the + * `metadata_context` (of type `google.protobuf.Struct`) in the + * `ProcessingRequest` message sent to the extension + * server. The metadata is available under the namespace + * `com.google.lb_route_extension.`. + * The following variables are supported in the metadata Struct: + * `{forwarding_rule_id}` - substituted with the forwarding rule's fully + * qualified resource name. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\Dep::initOnce(); + parent::__construct($data); + } + + /** + * Required. Identifier. Name of the `LbRouteExtension` resource in the + * following format: + * `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Identifier. Name of the `LbRouteExtension` resource in the + * following format: + * `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The timestamp when the resource was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The timestamp when the resource was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Optional. A human-readable description of the resource. + * + * Generated from protobuf field string description = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. A human-readable description of the resource. + * + * Generated from protobuf field string description = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Optional. Set of labels associated with the `LbRouteExtension` resource. + * The format must comply with [the requirements for + * labels](https://cloud.google.com/compute/docs/labeling-resources#requirements) + * for Google Cloud resources. + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. Set of labels associated with the `LbRouteExtension` resource. + * The format must comply with [the requirements for + * labels](https://cloud.google.com/compute/docs/labeling-resources#requirements) + * for Google Cloud resources. + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Required. A list of references to the forwarding rules to which this + * service extension is attached to. At least one forwarding rule is required. + * There can be only one `LbRouteExtension` resource per forwarding rule. + * + * Generated from protobuf field repeated string forwarding_rules = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getForwardingRules() + { + return $this->forwarding_rules; + } + + /** + * Required. A list of references to the forwarding rules to which this + * service extension is attached to. At least one forwarding rule is required. + * There can be only one `LbRouteExtension` resource per forwarding rule. + * + * Generated from protobuf field repeated string forwarding_rules = 5 [(.google.api.field_behavior) = REQUIRED]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setForwardingRules($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->forwarding_rules = $arr; + + return $this; + } + + /** + * Required. A set of ordered extension chains that contain the match + * conditions and extensions to execute. Match conditions for each extension + * chain are evaluated in sequence for a given request. The first extension + * chain that has a condition that matches the request is executed. + * Any subsequent extension chains do not execute. + * Limited to 5 extension chains per resource. + * + * Generated from protobuf field repeated .google.cloud.networkservices.v1.ExtensionChain extension_chains = 7 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getExtensionChains() + { + return $this->extension_chains; + } + + /** + * Required. A set of ordered extension chains that contain the match + * conditions and extensions to execute. Match conditions for each extension + * chain are evaluated in sequence for a given request. The first extension + * chain that has a condition that matches the request is executed. + * Any subsequent extension chains do not execute. + * Limited to 5 extension chains per resource. + * + * Generated from protobuf field repeated .google.cloud.networkservices.v1.ExtensionChain extension_chains = 7 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Cloud\NetworkServices\V1\ExtensionChain>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setExtensionChains($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkServices\V1\ExtensionChain::class); + $this->extension_chains = $arr; + + return $this; + } + + /** + * Required. All backend services and forwarding rules referenced by this + * extension must share the same load balancing scheme. Supported values: + * `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. For more information, refer to + * [Choosing a load + * balancer](https://cloud.google.com/load-balancing/docs/backend-service). + * + * Generated from protobuf field .google.cloud.networkservices.v1.LoadBalancingScheme load_balancing_scheme = 8 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getLoadBalancingScheme() + { + return $this->load_balancing_scheme; + } + + /** + * Required. All backend services and forwarding rules referenced by this + * extension must share the same load balancing scheme. Supported values: + * `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. For more information, refer to + * [Choosing a load + * balancer](https://cloud.google.com/load-balancing/docs/backend-service). + * + * Generated from protobuf field .google.cloud.networkservices.v1.LoadBalancingScheme load_balancing_scheme = 8 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setLoadBalancingScheme($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetworkServices\V1\LoadBalancingScheme::class); + $this->load_balancing_scheme = $var; + + return $this; + } + + /** + * Optional. The metadata provided here is included as part of the + * `metadata_context` (of type `google.protobuf.Struct`) in the + * `ProcessingRequest` message sent to the extension + * server. The metadata is available under the namespace + * `com.google.lb_route_extension.`. + * The following variables are supported in the metadata Struct: + * `{forwarding_rule_id}` - substituted with the forwarding rule's fully + * qualified resource name. + * + * Generated from protobuf field .google.protobuf.Struct metadata = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Struct|null + */ + public function getMetadata() + { + return $this->metadata; + } + + public function hasMetadata() + { + return isset($this->metadata); + } + + public function clearMetadata() + { + unset($this->metadata); + } + + /** + * Optional. The metadata provided here is included as part of the + * `metadata_context` (of type `google.protobuf.Struct`) in the + * `ProcessingRequest` message sent to the extension + * server. The metadata is available under the namespace + * `com.google.lb_route_extension.`. + * The following variables are supported in the metadata Struct: + * `{forwarding_rule_id}` - substituted with the forwarding rule's fully + * qualified resource name. + * + * Generated from protobuf field .google.protobuf.Struct metadata = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Struct $var + * @return $this + */ + public function setMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); + $this->metadata = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/LbTrafficExtension.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/LbTrafficExtension.php new file mode 100644 index 000000000000..250a492185ab --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/LbTrafficExtension.php @@ -0,0 +1,460 @@ +google.cloud.networkservices.v1.LbTrafficExtension + */ +class LbTrafficExtension extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Identifier. Name of the `LbTrafficExtension` resource in the + * following format: + * `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Output only. The timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The timestamp when the resource was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Optional. A human-readable description of the resource. + * + * Generated from protobuf field string description = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Optional. Set of labels associated with the `LbTrafficExtension` resource. + * The format must comply with [the requirements for + * labels](https://cloud.google.com/compute/docs/labeling-resources#requirements) + * for Google Cloud resources. + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Required. A list of references to the forwarding rules to which this + * service extension is attached to. At least one forwarding rule is required. + * There can be only one `LBTrafficExtension` resource per forwarding rule. + * + * Generated from protobuf field repeated string forwarding_rules = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + private $forwarding_rules; + /** + * Required. A set of ordered extension chains that contain the match + * conditions and extensions to execute. Match conditions for each extension + * chain are evaluated in sequence for a given request. The first extension + * chain that has a condition that matches the request is executed. + * Any subsequent extension chains do not execute. + * Limited to 5 extension chains per resource. + * + * Generated from protobuf field repeated .google.cloud.networkservices.v1.ExtensionChain extension_chains = 7 [(.google.api.field_behavior) = REQUIRED]; + */ + private $extension_chains; + /** + * Required. All backend services and forwarding rules referenced by this + * extension must share the same load balancing scheme. Supported values: + * `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. For more information, refer to + * [Choosing a load + * balancer](https://cloud.google.com/load-balancing/docs/backend-service). + * + * Generated from protobuf field .google.cloud.networkservices.v1.LoadBalancingScheme load_balancing_scheme = 8 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $load_balancing_scheme = 0; + /** + * Optional. The metadata provided here is included in the + * `ProcessingRequest.metadata_context.filter_metadata` map field. The + * metadata is available under the key + * `com.google.lb_traffic_extension.`. + * The following variables are supported in the metadata: + * `{forwarding_rule_id}` - substituted with the forwarding rule's fully + * qualified resource name. + * + * Generated from protobuf field .google.protobuf.Struct metadata = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $metadata = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Identifier. Name of the `LbTrafficExtension` resource in the + * following format: + * `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}`. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The timestamp when the resource was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The timestamp when the resource was updated. + * @type string $description + * Optional. A human-readable description of the resource. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. Set of labels associated with the `LbTrafficExtension` resource. + * The format must comply with [the requirements for + * labels](https://cloud.google.com/compute/docs/labeling-resources#requirements) + * for Google Cloud resources. + * @type array|\Google\Protobuf\Internal\RepeatedField $forwarding_rules + * Required. A list of references to the forwarding rules to which this + * service extension is attached to. At least one forwarding rule is required. + * There can be only one `LBTrafficExtension` resource per forwarding rule. + * @type array<\Google\Cloud\NetworkServices\V1\ExtensionChain>|\Google\Protobuf\Internal\RepeatedField $extension_chains + * Required. A set of ordered extension chains that contain the match + * conditions and extensions to execute. Match conditions for each extension + * chain are evaluated in sequence for a given request. The first extension + * chain that has a condition that matches the request is executed. + * Any subsequent extension chains do not execute. + * Limited to 5 extension chains per resource. + * @type int $load_balancing_scheme + * Required. All backend services and forwarding rules referenced by this + * extension must share the same load balancing scheme. Supported values: + * `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. For more information, refer to + * [Choosing a load + * balancer](https://cloud.google.com/load-balancing/docs/backend-service). + * @type \Google\Protobuf\Struct $metadata + * Optional. The metadata provided here is included in the + * `ProcessingRequest.metadata_context.filter_metadata` map field. The + * metadata is available under the key + * `com.google.lb_traffic_extension.`. + * The following variables are supported in the metadata: + * `{forwarding_rule_id}` - substituted with the forwarding rule's fully + * qualified resource name. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\Dep::initOnce(); + parent::__construct($data); + } + + /** + * Required. Identifier. Name of the `LbTrafficExtension` resource in the + * following format: + * `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Identifier. Name of the `LbTrafficExtension` resource in the + * following format: + * `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The timestamp when the resource was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The timestamp when the resource was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Optional. A human-readable description of the resource. + * + * Generated from protobuf field string description = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. A human-readable description of the resource. + * + * Generated from protobuf field string description = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Optional. Set of labels associated with the `LbTrafficExtension` resource. + * The format must comply with [the requirements for + * labels](https://cloud.google.com/compute/docs/labeling-resources#requirements) + * for Google Cloud resources. + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. Set of labels associated with the `LbTrafficExtension` resource. + * The format must comply with [the requirements for + * labels](https://cloud.google.com/compute/docs/labeling-resources#requirements) + * for Google Cloud resources. + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Required. A list of references to the forwarding rules to which this + * service extension is attached to. At least one forwarding rule is required. + * There can be only one `LBTrafficExtension` resource per forwarding rule. + * + * Generated from protobuf field repeated string forwarding_rules = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getForwardingRules() + { + return $this->forwarding_rules; + } + + /** + * Required. A list of references to the forwarding rules to which this + * service extension is attached to. At least one forwarding rule is required. + * There can be only one `LBTrafficExtension` resource per forwarding rule. + * + * Generated from protobuf field repeated string forwarding_rules = 5 [(.google.api.field_behavior) = REQUIRED]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setForwardingRules($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->forwarding_rules = $arr; + + return $this; + } + + /** + * Required. A set of ordered extension chains that contain the match + * conditions and extensions to execute. Match conditions for each extension + * chain are evaluated in sequence for a given request. The first extension + * chain that has a condition that matches the request is executed. + * Any subsequent extension chains do not execute. + * Limited to 5 extension chains per resource. + * + * Generated from protobuf field repeated .google.cloud.networkservices.v1.ExtensionChain extension_chains = 7 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getExtensionChains() + { + return $this->extension_chains; + } + + /** + * Required. A set of ordered extension chains that contain the match + * conditions and extensions to execute. Match conditions for each extension + * chain are evaluated in sequence for a given request. The first extension + * chain that has a condition that matches the request is executed. + * Any subsequent extension chains do not execute. + * Limited to 5 extension chains per resource. + * + * Generated from protobuf field repeated .google.cloud.networkservices.v1.ExtensionChain extension_chains = 7 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Cloud\NetworkServices\V1\ExtensionChain>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setExtensionChains($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkServices\V1\ExtensionChain::class); + $this->extension_chains = $arr; + + return $this; + } + + /** + * Required. All backend services and forwarding rules referenced by this + * extension must share the same load balancing scheme. Supported values: + * `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. For more information, refer to + * [Choosing a load + * balancer](https://cloud.google.com/load-balancing/docs/backend-service). + * + * Generated from protobuf field .google.cloud.networkservices.v1.LoadBalancingScheme load_balancing_scheme = 8 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getLoadBalancingScheme() + { + return $this->load_balancing_scheme; + } + + /** + * Required. All backend services and forwarding rules referenced by this + * extension must share the same load balancing scheme. Supported values: + * `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. For more information, refer to + * [Choosing a load + * balancer](https://cloud.google.com/load-balancing/docs/backend-service). + * + * Generated from protobuf field .google.cloud.networkservices.v1.LoadBalancingScheme load_balancing_scheme = 8 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setLoadBalancingScheme($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\NetworkServices\V1\LoadBalancingScheme::class); + $this->load_balancing_scheme = $var; + + return $this; + } + + /** + * Optional. The metadata provided here is included in the + * `ProcessingRequest.metadata_context.filter_metadata` map field. The + * metadata is available under the key + * `com.google.lb_traffic_extension.`. + * The following variables are supported in the metadata: + * `{forwarding_rule_id}` - substituted with the forwarding rule's fully + * qualified resource name. + * + * Generated from protobuf field .google.protobuf.Struct metadata = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Struct|null + */ + public function getMetadata() + { + return $this->metadata; + } + + public function hasMetadata() + { + return isset($this->metadata); + } + + public function clearMetadata() + { + unset($this->metadata); + } + + /** + * Optional. The metadata provided here is included in the + * `ProcessingRequest.metadata_context.filter_metadata` map field. The + * metadata is available under the key + * `com.google.lb_traffic_extension.`. + * The following variables are supported in the metadata: + * `{forwarding_rule_id}` - substituted with the forwarding rule's fully + * qualified resource name. + * + * Generated from protobuf field .google.protobuf.Struct metadata = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Struct $var + * @return $this + */ + public function setMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); + $this->metadata = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListEndpointPoliciesRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListEndpointPoliciesRequest.php new file mode 100644 index 000000000000..9c5c3580e4e3 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListEndpointPoliciesRequest.php @@ -0,0 +1,166 @@ +google.cloud.networkservices.v1.ListEndpointPoliciesRequest + */ +class ListEndpointPoliciesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project and location from which the EndpointPolicies should + * be listed, specified in the format `projects/*/locations/global`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Maximum number of EndpointPolicies to return per call. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The value returned by the last `ListEndpointPoliciesResponse` + * Indicates that this is a continuation of a prior + * `ListEndpointPolicies` call, and that the system should return the + * next page of data. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The project and location from which the EndpointPolicies should + * be listed, specified in the format `projects/*/locations/global`. Please see + * {@see NetworkServicesClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkServices\V1\ListEndpointPoliciesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The project and location from which the EndpointPolicies should + * be listed, specified in the format `projects/*/locations/global`. + * @type int $page_size + * Maximum number of EndpointPolicies to return per call. + * @type string $page_token + * The value returned by the last `ListEndpointPoliciesResponse` + * Indicates that this is a continuation of a prior + * `ListEndpointPolicies` call, and that the system should return the + * next page of data. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\EndpointPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project and location from which the EndpointPolicies should + * be listed, specified in the format `projects/*/locations/global`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The project and location from which the EndpointPolicies should + * be listed, specified in the format `projects/*/locations/global`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Maximum number of EndpointPolicies to return per call. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Maximum number of EndpointPolicies to return per call. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The value returned by the last `ListEndpointPoliciesResponse` + * Indicates that this is a continuation of a prior + * `ListEndpointPolicies` call, and that the system should return the + * next page of data. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The value returned by the last `ListEndpointPoliciesResponse` + * Indicates that this is a continuation of a prior + * `ListEndpointPolicies` call, and that the system should return the + * next page of data. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListEndpointPoliciesResponse.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListEndpointPoliciesResponse.php new file mode 100644 index 000000000000..05c64b8047f8 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListEndpointPoliciesResponse.php @@ -0,0 +1,109 @@ +google.cloud.networkservices.v1.ListEndpointPoliciesResponse + */ +class ListEndpointPoliciesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * List of EndpointPolicy resources. + * + * Generated from protobuf field repeated .google.cloud.networkservices.v1.EndpointPolicy endpoint_policies = 1; + */ + private $endpoint_policies; + /** + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\NetworkServices\V1\EndpointPolicy>|\Google\Protobuf\Internal\RepeatedField $endpoint_policies + * List of EndpointPolicy resources. + * @type string $next_page_token + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\EndpointPolicy::initOnce(); + parent::__construct($data); + } + + /** + * List of EndpointPolicy resources. + * + * Generated from protobuf field repeated .google.cloud.networkservices.v1.EndpointPolicy endpoint_policies = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEndpointPolicies() + { + return $this->endpoint_policies; + } + + /** + * List of EndpointPolicy resources. + * + * Generated from protobuf field repeated .google.cloud.networkservices.v1.EndpointPolicy endpoint_policies = 1; + * @param array<\Google\Cloud\NetworkServices\V1\EndpointPolicy>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEndpointPolicies($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkServices\V1\EndpointPolicy::class); + $this->endpoint_policies = $arr; + + return $this; + } + + /** + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListGatewaysRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListGatewaysRequest.php new file mode 100644 index 000000000000..a38b600672fa --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListGatewaysRequest.php @@ -0,0 +1,162 @@ +google.cloud.networkservices.v1.ListGatewaysRequest + */ +class ListGatewaysRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project and location from which the Gateways should be + * listed, specified in the format `projects/*/locations/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Maximum number of Gateways to return per call. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The value returned by the last `ListGatewaysResponse` + * Indicates that this is a continuation of a prior `ListGateways` call, + * and that the system should return the next page of data. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The project and location from which the Gateways should be + * listed, specified in the format `projects/*/locations/*`. Please see + * {@see NetworkServicesClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkServices\V1\ListGatewaysRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The project and location from which the Gateways should be + * listed, specified in the format `projects/*/locations/*`. + * @type int $page_size + * Maximum number of Gateways to return per call. + * @type string $page_token + * The value returned by the last `ListGatewaysResponse` + * Indicates that this is a continuation of a prior `ListGateways` call, + * and that the system should return the next page of data. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\Gateway::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project and location from which the Gateways should be + * listed, specified in the format `projects/*/locations/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The project and location from which the Gateways should be + * listed, specified in the format `projects/*/locations/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Maximum number of Gateways to return per call. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Maximum number of Gateways to return per call. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The value returned by the last `ListGatewaysResponse` + * Indicates that this is a continuation of a prior `ListGateways` call, + * and that the system should return the next page of data. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The value returned by the last `ListGatewaysResponse` + * Indicates that this is a continuation of a prior `ListGateways` call, + * and that the system should return the next page of data. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListGatewaysResponse.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListGatewaysResponse.php new file mode 100644 index 000000000000..4e2ad9ad2a55 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListGatewaysResponse.php @@ -0,0 +1,109 @@ +google.cloud.networkservices.v1.ListGatewaysResponse + */ +class ListGatewaysResponse extends \Google\Protobuf\Internal\Message +{ + /** + * List of Gateway resources. + * + * Generated from protobuf field repeated .google.cloud.networkservices.v1.Gateway gateways = 1; + */ + private $gateways; + /** + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\NetworkServices\V1\Gateway>|\Google\Protobuf\Internal\RepeatedField $gateways + * List of Gateway resources. + * @type string $next_page_token + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\Gateway::initOnce(); + parent::__construct($data); + } + + /** + * List of Gateway resources. + * + * Generated from protobuf field repeated .google.cloud.networkservices.v1.Gateway gateways = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getGateways() + { + return $this->gateways; + } + + /** + * List of Gateway resources. + * + * Generated from protobuf field repeated .google.cloud.networkservices.v1.Gateway gateways = 1; + * @param array<\Google\Cloud\NetworkServices\V1\Gateway>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setGateways($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkServices\V1\Gateway::class); + $this->gateways = $arr; + + return $this; + } + + /** + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListGrpcRoutesRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListGrpcRoutesRequest.php new file mode 100644 index 000000000000..ddf47f2dcb9f --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListGrpcRoutesRequest.php @@ -0,0 +1,162 @@ +google.cloud.networkservices.v1.ListGrpcRoutesRequest + */ +class ListGrpcRoutesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project and location from which the GrpcRoutes should be + * listed, specified in the format `projects/*/locations/global`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Maximum number of GrpcRoutes to return per call. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The value returned by the last `ListGrpcRoutesResponse` + * Indicates that this is a continuation of a prior `ListGrpcRoutes` call, + * and that the system should return the next page of data. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The project and location from which the GrpcRoutes should be + * listed, specified in the format `projects/*/locations/global`. Please see + * {@see NetworkServicesClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkServices\V1\ListGrpcRoutesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The project and location from which the GrpcRoutes should be + * listed, specified in the format `projects/*/locations/global`. + * @type int $page_size + * Maximum number of GrpcRoutes to return per call. + * @type string $page_token + * The value returned by the last `ListGrpcRoutesResponse` + * Indicates that this is a continuation of a prior `ListGrpcRoutes` call, + * and that the system should return the next page of data. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\GrpcRoute::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project and location from which the GrpcRoutes should be + * listed, specified in the format `projects/*/locations/global`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The project and location from which the GrpcRoutes should be + * listed, specified in the format `projects/*/locations/global`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Maximum number of GrpcRoutes to return per call. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Maximum number of GrpcRoutes to return per call. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The value returned by the last `ListGrpcRoutesResponse` + * Indicates that this is a continuation of a prior `ListGrpcRoutes` call, + * and that the system should return the next page of data. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The value returned by the last `ListGrpcRoutesResponse` + * Indicates that this is a continuation of a prior `ListGrpcRoutes` call, + * and that the system should return the next page of data. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListGrpcRoutesResponse.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListGrpcRoutesResponse.php new file mode 100644 index 000000000000..25ae1ebe88f6 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListGrpcRoutesResponse.php @@ -0,0 +1,109 @@ +google.cloud.networkservices.v1.ListGrpcRoutesResponse + */ +class ListGrpcRoutesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * List of GrpcRoute resources. + * + * Generated from protobuf field repeated .google.cloud.networkservices.v1.GrpcRoute grpc_routes = 1; + */ + private $grpc_routes; + /** + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\NetworkServices\V1\GrpcRoute>|\Google\Protobuf\Internal\RepeatedField $grpc_routes + * List of GrpcRoute resources. + * @type string $next_page_token + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\GrpcRoute::initOnce(); + parent::__construct($data); + } + + /** + * List of GrpcRoute resources. + * + * Generated from protobuf field repeated .google.cloud.networkservices.v1.GrpcRoute grpc_routes = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getGrpcRoutes() + { + return $this->grpc_routes; + } + + /** + * List of GrpcRoute resources. + * + * Generated from protobuf field repeated .google.cloud.networkservices.v1.GrpcRoute grpc_routes = 1; + * @param array<\Google\Cloud\NetworkServices\V1\GrpcRoute>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setGrpcRoutes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkServices\V1\GrpcRoute::class); + $this->grpc_routes = $arr; + + return $this; + } + + /** + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListHttpRoutesRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListHttpRoutesRequest.php new file mode 100644 index 000000000000..6a3b4554a25c --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListHttpRoutesRequest.php @@ -0,0 +1,162 @@ +google.cloud.networkservices.v1.ListHttpRoutesRequest + */ +class ListHttpRoutesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project and location from which the HttpRoutes should be + * listed, specified in the format `projects/*/locations/global`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Maximum number of HttpRoutes to return per call. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The value returned by the last `ListHttpRoutesResponse` + * Indicates that this is a continuation of a prior `ListHttpRoutes` call, + * and that the system should return the next page of data. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The project and location from which the HttpRoutes should be + * listed, specified in the format `projects/*/locations/global`. Please see + * {@see NetworkServicesClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkServices\V1\ListHttpRoutesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The project and location from which the HttpRoutes should be + * listed, specified in the format `projects/*/locations/global`. + * @type int $page_size + * Maximum number of HttpRoutes to return per call. + * @type string $page_token + * The value returned by the last `ListHttpRoutesResponse` + * Indicates that this is a continuation of a prior `ListHttpRoutes` call, + * and that the system should return the next page of data. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\HttpRoute::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project and location from which the HttpRoutes should be + * listed, specified in the format `projects/*/locations/global`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The project and location from which the HttpRoutes should be + * listed, specified in the format `projects/*/locations/global`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Maximum number of HttpRoutes to return per call. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Maximum number of HttpRoutes to return per call. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The value returned by the last `ListHttpRoutesResponse` + * Indicates that this is a continuation of a prior `ListHttpRoutes` call, + * and that the system should return the next page of data. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The value returned by the last `ListHttpRoutesResponse` + * Indicates that this is a continuation of a prior `ListHttpRoutes` call, + * and that the system should return the next page of data. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListHttpRoutesResponse.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListHttpRoutesResponse.php new file mode 100644 index 000000000000..121684e24a3e --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListHttpRoutesResponse.php @@ -0,0 +1,109 @@ +google.cloud.networkservices.v1.ListHttpRoutesResponse + */ +class ListHttpRoutesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * List of HttpRoute resources. + * + * Generated from protobuf field repeated .google.cloud.networkservices.v1.HttpRoute http_routes = 1; + */ + private $http_routes; + /** + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\NetworkServices\V1\HttpRoute>|\Google\Protobuf\Internal\RepeatedField $http_routes + * List of HttpRoute resources. + * @type string $next_page_token + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\HttpRoute::initOnce(); + parent::__construct($data); + } + + /** + * List of HttpRoute resources. + * + * Generated from protobuf field repeated .google.cloud.networkservices.v1.HttpRoute http_routes = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getHttpRoutes() + { + return $this->http_routes; + } + + /** + * List of HttpRoute resources. + * + * Generated from protobuf field repeated .google.cloud.networkservices.v1.HttpRoute http_routes = 1; + * @param array<\Google\Cloud\NetworkServices\V1\HttpRoute>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setHttpRoutes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkServices\V1\HttpRoute::class); + $this->http_routes = $arr; + + return $this; + } + + /** + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListLbRouteExtensionsRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListLbRouteExtensionsRequest.php new file mode 100644 index 000000000000..050aaac97ca2 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListLbRouteExtensionsRequest.php @@ -0,0 +1,231 @@ +google.cloud.networkservices.v1.ListLbRouteExtensionsRequest + */ +class ListLbRouteExtensionsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project and location from which the `LbRouteExtension` + * resources are listed, specified in the following format: + * `projects/{project}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Requested page size. The server might return fewer items than + * requested. If unspecified, the server picks an appropriate default. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A token identifying a page of results that the server returns. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. Filtering results. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. Hint for how to order the results. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The project and location from which the `LbRouteExtension` + * resources are listed, specified in the following format: + * `projects/{project}/locations/{location}`. Please see + * {@see DepServiceClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkServices\V1\ListLbRouteExtensionsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The project and location from which the `LbRouteExtension` + * resources are listed, specified in the following format: + * `projects/{project}/locations/{location}`. + * @type int $page_size + * Optional. Requested page size. The server might return fewer items than + * requested. If unspecified, the server picks an appropriate default. + * @type string $page_token + * Optional. A token identifying a page of results that the server returns. + * @type string $filter + * Optional. Filtering results. + * @type string $order_by + * Optional. Hint for how to order the results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\Dep::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project and location from which the `LbRouteExtension` + * resources are listed, specified in the following format: + * `projects/{project}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The project and location from which the `LbRouteExtension` + * resources are listed, specified in the following format: + * `projects/{project}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. Requested page size. The server might return fewer items than + * requested. If unspecified, the server picks an appropriate default. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. Requested page size. The server might return fewer items than + * requested. If unspecified, the server picks an appropriate default. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. A token identifying a page of results that the server returns. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A token identifying a page of results that the server returns. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. Filtering results. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. Filtering results. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Optional. Hint for how to order the results. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. Hint for how to order the results. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListLbRouteExtensionsResponse.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListLbRouteExtensionsResponse.php new file mode 100644 index 000000000000..eefc0f3e2d60 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListLbRouteExtensionsResponse.php @@ -0,0 +1,135 @@ +google.cloud.networkservices.v1.ListLbRouteExtensionsResponse + */ +class ListLbRouteExtensionsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of `LbRouteExtension` resources. + * + * Generated from protobuf field repeated .google.cloud.networkservices.v1.LbRouteExtension lb_route_extensions = 1; + */ + private $lb_route_extensions; + /** + * A token identifying a page of results that the server returns. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\NetworkServices\V1\LbRouteExtension>|\Google\Protobuf\Internal\RepeatedField $lb_route_extensions + * The list of `LbRouteExtension` resources. + * @type string $next_page_token + * A token identifying a page of results that the server returns. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\Dep::initOnce(); + parent::__construct($data); + } + + /** + * The list of `LbRouteExtension` resources. + * + * Generated from protobuf field repeated .google.cloud.networkservices.v1.LbRouteExtension lb_route_extensions = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getLbRouteExtensions() + { + return $this->lb_route_extensions; + } + + /** + * The list of `LbRouteExtension` resources. + * + * Generated from protobuf field repeated .google.cloud.networkservices.v1.LbRouteExtension lb_route_extensions = 1; + * @param array<\Google\Cloud\NetworkServices\V1\LbRouteExtension>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setLbRouteExtensions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkServices\V1\LbRouteExtension::class); + $this->lb_route_extensions = $arr; + + return $this; + } + + /** + * A token identifying a page of results that the server returns. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token identifying a page of results that the server returns. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListLbTrafficExtensionsRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListLbTrafficExtensionsRequest.php new file mode 100644 index 000000000000..c8e8eaf2dfea --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListLbTrafficExtensionsRequest.php @@ -0,0 +1,231 @@ +google.cloud.networkservices.v1.ListLbTrafficExtensionsRequest + */ +class ListLbTrafficExtensionsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project and location from which the `LbTrafficExtension` + * resources are listed, specified in the following format: + * `projects/{project}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Requested page size. The server might return fewer items than + * requested. If unspecified, the server picks an appropriate default. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A token identifying a page of results that the server returns. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. Filtering results. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. Hint for how to order the results. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The project and location from which the `LbTrafficExtension` + * resources are listed, specified in the following format: + * `projects/{project}/locations/{location}`. Please see + * {@see DepServiceClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkServices\V1\ListLbTrafficExtensionsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The project and location from which the `LbTrafficExtension` + * resources are listed, specified in the following format: + * `projects/{project}/locations/{location}`. + * @type int $page_size + * Optional. Requested page size. The server might return fewer items than + * requested. If unspecified, the server picks an appropriate default. + * @type string $page_token + * Optional. A token identifying a page of results that the server returns. + * @type string $filter + * Optional. Filtering results. + * @type string $order_by + * Optional. Hint for how to order the results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\Dep::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project and location from which the `LbTrafficExtension` + * resources are listed, specified in the following format: + * `projects/{project}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The project and location from which the `LbTrafficExtension` + * resources are listed, specified in the following format: + * `projects/{project}/locations/{location}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. Requested page size. The server might return fewer items than + * requested. If unspecified, the server picks an appropriate default. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. Requested page size. The server might return fewer items than + * requested. If unspecified, the server picks an appropriate default. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. A token identifying a page of results that the server returns. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A token identifying a page of results that the server returns. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. Filtering results. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. Filtering results. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Optional. Hint for how to order the results. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. Hint for how to order the results. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListLbTrafficExtensionsResponse.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListLbTrafficExtensionsResponse.php new file mode 100644 index 000000000000..f87a63f11b09 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListLbTrafficExtensionsResponse.php @@ -0,0 +1,135 @@ +google.cloud.networkservices.v1.ListLbTrafficExtensionsResponse + */ +class ListLbTrafficExtensionsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of `LbTrafficExtension` resources. + * + * Generated from protobuf field repeated .google.cloud.networkservices.v1.LbTrafficExtension lb_traffic_extensions = 1; + */ + private $lb_traffic_extensions; + /** + * A token identifying a page of results that the server returns. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\NetworkServices\V1\LbTrafficExtension>|\Google\Protobuf\Internal\RepeatedField $lb_traffic_extensions + * The list of `LbTrafficExtension` resources. + * @type string $next_page_token + * A token identifying a page of results that the server returns. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\Dep::initOnce(); + parent::__construct($data); + } + + /** + * The list of `LbTrafficExtension` resources. + * + * Generated from protobuf field repeated .google.cloud.networkservices.v1.LbTrafficExtension lb_traffic_extensions = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getLbTrafficExtensions() + { + return $this->lb_traffic_extensions; + } + + /** + * The list of `LbTrafficExtension` resources. + * + * Generated from protobuf field repeated .google.cloud.networkservices.v1.LbTrafficExtension lb_traffic_extensions = 1; + * @param array<\Google\Cloud\NetworkServices\V1\LbTrafficExtension>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setLbTrafficExtensions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkServices\V1\LbTrafficExtension::class); + $this->lb_traffic_extensions = $arr; + + return $this; + } + + /** + * A token identifying a page of results that the server returns. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token identifying a page of results that the server returns. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListMeshesRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListMeshesRequest.php new file mode 100644 index 000000000000..88d0ba55df31 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListMeshesRequest.php @@ -0,0 +1,162 @@ +google.cloud.networkservices.v1.ListMeshesRequest + */ +class ListMeshesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project and location from which the Meshes should be + * listed, specified in the format `projects/*/locations/global`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Maximum number of Meshes to return per call. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The value returned by the last `ListMeshesResponse` + * Indicates that this is a continuation of a prior `ListMeshes` call, + * and that the system should return the next page of data. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The project and location from which the Meshes should be + * listed, specified in the format `projects/*/locations/global`. Please see + * {@see NetworkServicesClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkServices\V1\ListMeshesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The project and location from which the Meshes should be + * listed, specified in the format `projects/*/locations/global`. + * @type int $page_size + * Maximum number of Meshes to return per call. + * @type string $page_token + * The value returned by the last `ListMeshesResponse` + * Indicates that this is a continuation of a prior `ListMeshes` call, + * and that the system should return the next page of data. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\Mesh::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project and location from which the Meshes should be + * listed, specified in the format `projects/*/locations/global`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The project and location from which the Meshes should be + * listed, specified in the format `projects/*/locations/global`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Maximum number of Meshes to return per call. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Maximum number of Meshes to return per call. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The value returned by the last `ListMeshesResponse` + * Indicates that this is a continuation of a prior `ListMeshes` call, + * and that the system should return the next page of data. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The value returned by the last `ListMeshesResponse` + * Indicates that this is a continuation of a prior `ListMeshes` call, + * and that the system should return the next page of data. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListMeshesResponse.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListMeshesResponse.php new file mode 100644 index 000000000000..4fc4bf9fd178 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListMeshesResponse.php @@ -0,0 +1,109 @@ +google.cloud.networkservices.v1.ListMeshesResponse + */ +class ListMeshesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * List of Mesh resources. + * + * Generated from protobuf field repeated .google.cloud.networkservices.v1.Mesh meshes = 1; + */ + private $meshes; + /** + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\NetworkServices\V1\Mesh>|\Google\Protobuf\Internal\RepeatedField $meshes + * List of Mesh resources. + * @type string $next_page_token + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\Mesh::initOnce(); + parent::__construct($data); + } + + /** + * List of Mesh resources. + * + * Generated from protobuf field repeated .google.cloud.networkservices.v1.Mesh meshes = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMeshes() + { + return $this->meshes; + } + + /** + * List of Mesh resources. + * + * Generated from protobuf field repeated .google.cloud.networkservices.v1.Mesh meshes = 1; + * @param array<\Google\Cloud\NetworkServices\V1\Mesh>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMeshes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkServices\V1\Mesh::class); + $this->meshes = $arr; + + return $this; + } + + /** + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListServiceBindingsRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListServiceBindingsRequest.php new file mode 100644 index 000000000000..c165f3df88a8 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListServiceBindingsRequest.php @@ -0,0 +1,162 @@ +google.cloud.networkservices.v1.ListServiceBindingsRequest + */ +class ListServiceBindingsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project and location from which the ServiceBindings should be + * listed, specified in the format `projects/*/locations/global`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Maximum number of ServiceBindings to return per call. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The value returned by the last `ListServiceBindingsResponse` + * Indicates that this is a continuation of a prior `ListRouters` call, + * and that the system should return the next page of data. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The project and location from which the ServiceBindings should be + * listed, specified in the format `projects/*/locations/global`. Please see + * {@see NetworkServicesClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkServices\V1\ListServiceBindingsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The project and location from which the ServiceBindings should be + * listed, specified in the format `projects/*/locations/global`. + * @type int $page_size + * Maximum number of ServiceBindings to return per call. + * @type string $page_token + * The value returned by the last `ListServiceBindingsResponse` + * Indicates that this is a continuation of a prior `ListRouters` call, + * and that the system should return the next page of data. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\ServiceBinding::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project and location from which the ServiceBindings should be + * listed, specified in the format `projects/*/locations/global`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The project and location from which the ServiceBindings should be + * listed, specified in the format `projects/*/locations/global`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Maximum number of ServiceBindings to return per call. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Maximum number of ServiceBindings to return per call. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The value returned by the last `ListServiceBindingsResponse` + * Indicates that this is a continuation of a prior `ListRouters` call, + * and that the system should return the next page of data. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The value returned by the last `ListServiceBindingsResponse` + * Indicates that this is a continuation of a prior `ListRouters` call, + * and that the system should return the next page of data. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListServiceBindingsResponse.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListServiceBindingsResponse.php new file mode 100644 index 000000000000..e1ebc8bef520 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListServiceBindingsResponse.php @@ -0,0 +1,109 @@ +google.cloud.networkservices.v1.ListServiceBindingsResponse + */ +class ListServiceBindingsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * List of ServiceBinding resources. + * + * Generated from protobuf field repeated .google.cloud.networkservices.v1.ServiceBinding service_bindings = 1; + */ + private $service_bindings; + /** + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\NetworkServices\V1\ServiceBinding>|\Google\Protobuf\Internal\RepeatedField $service_bindings + * List of ServiceBinding resources. + * @type string $next_page_token + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\ServiceBinding::initOnce(); + parent::__construct($data); + } + + /** + * List of ServiceBinding resources. + * + * Generated from protobuf field repeated .google.cloud.networkservices.v1.ServiceBinding service_bindings = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getServiceBindings() + { + return $this->service_bindings; + } + + /** + * List of ServiceBinding resources. + * + * Generated from protobuf field repeated .google.cloud.networkservices.v1.ServiceBinding service_bindings = 1; + * @param array<\Google\Cloud\NetworkServices\V1\ServiceBinding>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setServiceBindings($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkServices\V1\ServiceBinding::class); + $this->service_bindings = $arr; + + return $this; + } + + /** + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListTcpRoutesRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListTcpRoutesRequest.php new file mode 100644 index 000000000000..54a6448de8af --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListTcpRoutesRequest.php @@ -0,0 +1,162 @@ +google.cloud.networkservices.v1.ListTcpRoutesRequest + */ +class ListTcpRoutesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project and location from which the TcpRoutes should be + * listed, specified in the format `projects/*/locations/global`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Maximum number of TcpRoutes to return per call. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The value returned by the last `ListTcpRoutesResponse` + * Indicates that this is a continuation of a prior `ListTcpRoutes` call, + * and that the system should return the next page of data. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The project and location from which the TcpRoutes should be + * listed, specified in the format `projects/*/locations/global`. Please see + * {@see NetworkServicesClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkServices\V1\ListTcpRoutesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The project and location from which the TcpRoutes should be + * listed, specified in the format `projects/*/locations/global`. + * @type int $page_size + * Maximum number of TcpRoutes to return per call. + * @type string $page_token + * The value returned by the last `ListTcpRoutesResponse` + * Indicates that this is a continuation of a prior `ListTcpRoutes` call, + * and that the system should return the next page of data. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\TcpRoute::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project and location from which the TcpRoutes should be + * listed, specified in the format `projects/*/locations/global`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The project and location from which the TcpRoutes should be + * listed, specified in the format `projects/*/locations/global`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Maximum number of TcpRoutes to return per call. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Maximum number of TcpRoutes to return per call. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The value returned by the last `ListTcpRoutesResponse` + * Indicates that this is a continuation of a prior `ListTcpRoutes` call, + * and that the system should return the next page of data. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The value returned by the last `ListTcpRoutesResponse` + * Indicates that this is a continuation of a prior `ListTcpRoutes` call, + * and that the system should return the next page of data. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListTcpRoutesResponse.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListTcpRoutesResponse.php new file mode 100644 index 000000000000..ed511f17c5f4 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListTcpRoutesResponse.php @@ -0,0 +1,109 @@ +google.cloud.networkservices.v1.ListTcpRoutesResponse + */ +class ListTcpRoutesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * List of TcpRoute resources. + * + * Generated from protobuf field repeated .google.cloud.networkservices.v1.TcpRoute tcp_routes = 1; + */ + private $tcp_routes; + /** + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\NetworkServices\V1\TcpRoute>|\Google\Protobuf\Internal\RepeatedField $tcp_routes + * List of TcpRoute resources. + * @type string $next_page_token + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\TcpRoute::initOnce(); + parent::__construct($data); + } + + /** + * List of TcpRoute resources. + * + * Generated from protobuf field repeated .google.cloud.networkservices.v1.TcpRoute tcp_routes = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTcpRoutes() + { + return $this->tcp_routes; + } + + /** + * List of TcpRoute resources. + * + * Generated from protobuf field repeated .google.cloud.networkservices.v1.TcpRoute tcp_routes = 1; + * @param array<\Google\Cloud\NetworkServices\V1\TcpRoute>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTcpRoutes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkServices\V1\TcpRoute::class); + $this->tcp_routes = $arr; + + return $this; + } + + /** + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListTlsRoutesRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListTlsRoutesRequest.php new file mode 100644 index 000000000000..f8209d936e49 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListTlsRoutesRequest.php @@ -0,0 +1,162 @@ +google.cloud.networkservices.v1.ListTlsRoutesRequest + */ +class ListTlsRoutesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project and location from which the TlsRoutes should be + * listed, specified in the format `projects/*/locations/global`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Maximum number of TlsRoutes to return per call. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The value returned by the last `ListTlsRoutesResponse` + * Indicates that this is a continuation of a prior `ListTlsRoutes` call, + * and that the system should return the next page of data. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The project and location from which the TlsRoutes should be + * listed, specified in the format `projects/*/locations/global`. Please see + * {@see NetworkServicesClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\NetworkServices\V1\ListTlsRoutesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The project and location from which the TlsRoutes should be + * listed, specified in the format `projects/*/locations/global`. + * @type int $page_size + * Maximum number of TlsRoutes to return per call. + * @type string $page_token + * The value returned by the last `ListTlsRoutesResponse` + * Indicates that this is a continuation of a prior `ListTlsRoutes` call, + * and that the system should return the next page of data. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\TlsRoute::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project and location from which the TlsRoutes should be + * listed, specified in the format `projects/*/locations/global`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The project and location from which the TlsRoutes should be + * listed, specified in the format `projects/*/locations/global`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Maximum number of TlsRoutes to return per call. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Maximum number of TlsRoutes to return per call. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The value returned by the last `ListTlsRoutesResponse` + * Indicates that this is a continuation of a prior `ListTlsRoutes` call, + * and that the system should return the next page of data. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The value returned by the last `ListTlsRoutesResponse` + * Indicates that this is a continuation of a prior `ListTlsRoutes` call, + * and that the system should return the next page of data. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListTlsRoutesResponse.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListTlsRoutesResponse.php new file mode 100644 index 000000000000..baf951142c4e --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListTlsRoutesResponse.php @@ -0,0 +1,109 @@ +google.cloud.networkservices.v1.ListTlsRoutesResponse + */ +class ListTlsRoutesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * List of TlsRoute resources. + * + * Generated from protobuf field repeated .google.cloud.networkservices.v1.TlsRoute tls_routes = 1; + */ + private $tls_routes; + /** + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\NetworkServices\V1\TlsRoute>|\Google\Protobuf\Internal\RepeatedField $tls_routes + * List of TlsRoute resources. + * @type string $next_page_token + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\TlsRoute::initOnce(); + parent::__construct($data); + } + + /** + * List of TlsRoute resources. + * + * Generated from protobuf field repeated .google.cloud.networkservices.v1.TlsRoute tls_routes = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTlsRoutes() + { + return $this->tls_routes; + } + + /** + * List of TlsRoute resources. + * + * Generated from protobuf field repeated .google.cloud.networkservices.v1.TlsRoute tls_routes = 1; + * @param array<\Google\Cloud\NetworkServices\V1\TlsRoute>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTlsRoutes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkServices\V1\TlsRoute::class); + $this->tls_routes = $arr; + + return $this; + } + + /** + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * If there might be more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/LoadBalancingScheme.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/LoadBalancingScheme.php new file mode 100644 index 000000000000..263ab38300d8 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/LoadBalancingScheme.php @@ -0,0 +1,65 @@ +google.cloud.networkservices.v1.LoadBalancingScheme + */ +class LoadBalancingScheme +{ + /** + * Default value. Do not use. + * + * Generated from protobuf enum LOAD_BALANCING_SCHEME_UNSPECIFIED = 0; + */ + const LOAD_BALANCING_SCHEME_UNSPECIFIED = 0; + /** + * Signifies that this is used for Internal HTTP(S) Load Balancing. + * + * Generated from protobuf enum INTERNAL_MANAGED = 1; + */ + const INTERNAL_MANAGED = 1; + /** + * Signifies that this is used for External Managed HTTP(S) Load + * Balancing. + * + * Generated from protobuf enum EXTERNAL_MANAGED = 2; + */ + const EXTERNAL_MANAGED = 2; + + private static $valueToName = [ + self::LOAD_BALANCING_SCHEME_UNSPECIFIED => 'LOAD_BALANCING_SCHEME_UNSPECIFIED', + self::INTERNAL_MANAGED => 'INTERNAL_MANAGED', + self::EXTERNAL_MANAGED => 'EXTERNAL_MANAGED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/Mesh.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/Mesh.php new file mode 100644 index 000000000000..14d967fcf671 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/Mesh.php @@ -0,0 +1,321 @@ +google.cloud.networkservices.v1.Mesh + */ +class Mesh extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the Mesh resource. It matches pattern + * `projects/*/locations/global/meshes/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * Output only. Server-defined URL of this resource + * + * Generated from protobuf field string self_link = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $self_link = ''; + /** + * Output only. The timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The timestamp when the resource was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Optional. Set of label tags associated with the Mesh resource. + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Optional. A free-text description of the resource. Max length 1024 + * characters. + * + * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Optional. If set to a valid TCP port (1-65535), instructs the SIDECAR proxy + * to listen on the specified port of localhost (127.0.0.1) address. The + * SIDECAR proxy will expect all traffic to be redirected to this port + * regardless of its actual ip:port destination. If unset, a port '15001' is + * used as the interception port. This is applicable only for sidecar proxy + * deployments. + * + * Generated from protobuf field int32 interception_port = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $interception_port = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the Mesh resource. It matches pattern + * `projects/*/locations/global/meshes/`. + * @type string $self_link + * Output only. Server-defined URL of this resource + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The timestamp when the resource was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The timestamp when the resource was updated. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. Set of label tags associated with the Mesh resource. + * @type string $description + * Optional. A free-text description of the resource. Max length 1024 + * characters. + * @type int $interception_port + * Optional. If set to a valid TCP port (1-65535), instructs the SIDECAR proxy + * to listen on the specified port of localhost (127.0.0.1) address. The + * SIDECAR proxy will expect all traffic to be redirected to this port + * regardless of its actual ip:port destination. If unset, a port '15001' is + * used as the interception port. This is applicable only for sidecar proxy + * deployments. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\Mesh::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the Mesh resource. It matches pattern + * `projects/*/locations/global/meshes/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the Mesh resource. It matches pattern + * `projects/*/locations/global/meshes/`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. Server-defined URL of this resource + * + * Generated from protobuf field string self_link = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getSelfLink() + { + return $this->self_link; + } + + /** + * Output only. Server-defined URL of this resource + * + * Generated from protobuf field string self_link = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setSelfLink($var) + { + GPBUtil::checkString($var, True); + $this->self_link = $var; + + return $this; + } + + /** + * Output only. The timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The timestamp when the resource was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The timestamp when the resource was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Optional. Set of label tags associated with the Mesh resource. + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. Set of label tags associated with the Mesh resource. + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Optional. A free-text description of the resource. Max length 1024 + * characters. + * + * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. A free-text description of the resource. Max length 1024 + * characters. + * + * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Optional. If set to a valid TCP port (1-65535), instructs the SIDECAR proxy + * to listen on the specified port of localhost (127.0.0.1) address. The + * SIDECAR proxy will expect all traffic to be redirected to this port + * regardless of its actual ip:port destination. If unset, a port '15001' is + * used as the interception port. This is applicable only for sidecar proxy + * deployments. + * + * Generated from protobuf field int32 interception_port = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getInterceptionPort() + { + return $this->interception_port; + } + + /** + * Optional. If set to a valid TCP port (1-65535), instructs the SIDECAR proxy + * to listen on the specified port of localhost (127.0.0.1) address. The + * SIDECAR proxy will expect all traffic to be redirected to this port + * regardless of its actual ip:port destination. If unset, a port '15001' is + * used as the interception port. This is applicable only for sidecar proxy + * deployments. + * + * Generated from protobuf field int32 interception_port = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setInterceptionPort($var) + { + GPBUtil::checkInt32($var); + $this->interception_port = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/OperationMetadata.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/OperationMetadata.php new file mode 100644 index 000000000000..36e7066401a5 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/OperationMetadata.php @@ -0,0 +1,307 @@ +google.cloud.networkservices.v1.OperationMetadata + */ +class OperationMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $end_time = null; + /** + * Output only. Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $target = ''; + /** + * Output only. Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $verb = ''; + /** + * Output only. Human-readable status of the operation, if any. + * + * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $status_message = ''; + /** + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have successfully been cancelled + * have [Operation.error][] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`. + * + * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $requested_cancellation = false; + /** + * Output only. API version used to start the operation. + * + * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $api_version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time the operation was created. + * @type \Google\Protobuf\Timestamp $end_time + * Output only. The time the operation finished running. + * @type string $target + * Output only. Server-defined resource path for the target of the operation. + * @type string $verb + * Output only. Name of the verb executed by the operation. + * @type string $status_message + * Output only. Human-readable status of the operation, if any. + * @type bool $requested_cancellation + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have successfully been cancelled + * have [Operation.error][] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`. + * @type string $api_version + * Output only. API version used to start the operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\Common::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEndTime() + { + return $this->end_time; + } + + public function hasEndTime() + { + return isset($this->end_time); + } + + public function clearEndTime() + { + unset($this->end_time); + } + + /** + * Output only. The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * Output only. Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getTarget() + { + return $this->target; + } + + /** + * Output only. Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setTarget($var) + { + GPBUtil::checkString($var, True); + $this->target = $var; + + return $this; + } + + /** + * Output only. Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getVerb() + { + return $this->verb; + } + + /** + * Output only. Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setVerb($var) + { + GPBUtil::checkString($var, True); + $this->verb = $var; + + return $this; + } + + /** + * Output only. Human-readable status of the operation, if any. + * + * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getStatusMessage() + { + return $this->status_message; + } + + /** + * Output only. Human-readable status of the operation, if any. + * + * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setStatusMessage($var) + { + GPBUtil::checkString($var, True); + $this->status_message = $var; + + return $this; + } + + /** + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have successfully been cancelled + * have [Operation.error][] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`. + * + * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getRequestedCancellation() + { + return $this->requested_cancellation; + } + + /** + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have successfully been cancelled + * have [Operation.error][] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`. + * + * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setRequestedCancellation($var) + { + GPBUtil::checkBool($var); + $this->requested_cancellation = $var; + + return $this; + } + + /** + * Output only. API version used to start the operation. + * + * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getApiVersion() + { + return $this->api_version; + } + + /** + * Output only. API version used to start the operation. + * + * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setApiVersion($var) + { + GPBUtil::checkString($var, True); + $this->api_version = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ServiceBinding.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ServiceBinding.php new file mode 100644 index 000000000000..93e657a35992 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ServiceBinding.php @@ -0,0 +1,270 @@ +google.cloud.networkservices.v1.ServiceBinding + */ +class ServiceBinding extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the ServiceBinding resource. It matches pattern + * `projects/*/locations/global/serviceBindings/service_binding_name`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * Optional. A free-text description of the resource. Max length 1024 + * characters. + * + * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Output only. The timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The timestamp when the resource was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Required. The full service directory service name of the format + * /projects/*/locations/*/namespaces/*/services/* + * + * Generated from protobuf field string service = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $service = ''; + /** + * Optional. Set of label tags associated with the ServiceBinding resource. + * + * Generated from protobuf field map labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the ServiceBinding resource. It matches pattern + * `projects/*/locations/global/serviceBindings/service_binding_name`. + * @type string $description + * Optional. A free-text description of the resource. Max length 1024 + * characters. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The timestamp when the resource was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The timestamp when the resource was updated. + * @type string $service + * Required. The full service directory service name of the format + * /projects/*/locations/*/namespaces/*/services/* + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. Set of label tags associated with the ServiceBinding resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\ServiceBinding::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the ServiceBinding resource. It matches pattern + * `projects/*/locations/global/serviceBindings/service_binding_name`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the ServiceBinding resource. It matches pattern + * `projects/*/locations/global/serviceBindings/service_binding_name`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. A free-text description of the resource. Max length 1024 + * characters. + * + * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. A free-text description of the resource. Max length 1024 + * characters. + * + * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Output only. The timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The timestamp when the resource was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The timestamp when the resource was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Required. The full service directory service name of the format + * /projects/*/locations/*/namespaces/*/services/* + * + * Generated from protobuf field string service = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getService() + { + return $this->service; + } + + /** + * Required. The full service directory service name of the format + * /projects/*/locations/*/namespaces/*/services/* + * + * Generated from protobuf field string service = 5 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setService($var) + { + GPBUtil::checkString($var, True); + $this->service = $var; + + return $this; + } + + /** + * Optional. Set of label tags associated with the ServiceBinding resource. + * + * Generated from protobuf field map labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. Set of label tags associated with the ServiceBinding resource. + * + * Generated from protobuf field map labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/TcpRoute.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/TcpRoute.php new file mode 100644 index 000000000000..00624114cb2f --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/TcpRoute.php @@ -0,0 +1,404 @@ +google.cloud.networkservices.v1.TcpRoute + */ +class TcpRoute extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the TcpRoute resource. It matches pattern + * `projects/*/locations/global/tcpRoutes/tcp_route_name>`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * Output only. Server-defined URL of this resource + * + * Generated from protobuf field string self_link = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $self_link = ''; + /** + * Output only. The timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The timestamp when the resource was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Optional. A free-text description of the resource. Max length 1024 + * characters. + * + * Generated from protobuf field string description = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Required. Rules that define how traffic is routed and handled. At least one + * RouteRule must be supplied. If there are multiple rules then the action + * taken will be the first rule to match. + * + * Generated from protobuf field repeated .google.cloud.networkservices.v1.TcpRoute.RouteRule rules = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + private $rules; + /** + * Optional. Meshes defines a list of meshes this TcpRoute is attached to, as + * one of the routing rules to route the requests served by the mesh. + * Each mesh reference should match the pattern: + * `projects/*/locations/global/meshes/` + * The attached Mesh should be of a type SIDECAR + * + * Generated from protobuf field repeated string meshes = 8 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + private $meshes; + /** + * Optional. Gateways defines a list of gateways this TcpRoute is attached to, + * as one of the routing rules to route the requests served by the gateway. + * Each gateway reference should match the pattern: + * `projects/*/locations/global/gateways/` + * + * Generated from protobuf field repeated string gateways = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + private $gateways; + /** + * Optional. Set of label tags associated with the TcpRoute resource. + * + * Generated from protobuf field map labels = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the TcpRoute resource. It matches pattern + * `projects/*/locations/global/tcpRoutes/tcp_route_name>`. + * @type string $self_link + * Output only. Server-defined URL of this resource + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The timestamp when the resource was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The timestamp when the resource was updated. + * @type string $description + * Optional. A free-text description of the resource. Max length 1024 + * characters. + * @type array<\Google\Cloud\NetworkServices\V1\TcpRoute\RouteRule>|\Google\Protobuf\Internal\RepeatedField $rules + * Required. Rules that define how traffic is routed and handled. At least one + * RouteRule must be supplied. If there are multiple rules then the action + * taken will be the first rule to match. + * @type array|\Google\Protobuf\Internal\RepeatedField $meshes + * Optional. Meshes defines a list of meshes this TcpRoute is attached to, as + * one of the routing rules to route the requests served by the mesh. + * Each mesh reference should match the pattern: + * `projects/*/locations/global/meshes/` + * The attached Mesh should be of a type SIDECAR + * @type array|\Google\Protobuf\Internal\RepeatedField $gateways + * Optional. Gateways defines a list of gateways this TcpRoute is attached to, + * as one of the routing rules to route the requests served by the gateway. + * Each gateway reference should match the pattern: + * `projects/*/locations/global/gateways/` + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. Set of label tags associated with the TcpRoute resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\TcpRoute::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the TcpRoute resource. It matches pattern + * `projects/*/locations/global/tcpRoutes/tcp_route_name>`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the TcpRoute resource. It matches pattern + * `projects/*/locations/global/tcpRoutes/tcp_route_name>`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. Server-defined URL of this resource + * + * Generated from protobuf field string self_link = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getSelfLink() + { + return $this->self_link; + } + + /** + * Output only. Server-defined URL of this resource + * + * Generated from protobuf field string self_link = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setSelfLink($var) + { + GPBUtil::checkString($var, True); + $this->self_link = $var; + + return $this; + } + + /** + * Output only. The timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The timestamp when the resource was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The timestamp when the resource was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Optional. A free-text description of the resource. Max length 1024 + * characters. + * + * Generated from protobuf field string description = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. A free-text description of the resource. Max length 1024 + * characters. + * + * Generated from protobuf field string description = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Required. Rules that define how traffic is routed and handled. At least one + * RouteRule must be supplied. If there are multiple rules then the action + * taken will be the first rule to match. + * + * Generated from protobuf field repeated .google.cloud.networkservices.v1.TcpRoute.RouteRule rules = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRules() + { + return $this->rules; + } + + /** + * Required. Rules that define how traffic is routed and handled. At least one + * RouteRule must be supplied. If there are multiple rules then the action + * taken will be the first rule to match. + * + * Generated from protobuf field repeated .google.cloud.networkservices.v1.TcpRoute.RouteRule rules = 5 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Cloud\NetworkServices\V1\TcpRoute\RouteRule>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRules($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkServices\V1\TcpRoute\RouteRule::class); + $this->rules = $arr; + + return $this; + } + + /** + * Optional. Meshes defines a list of meshes this TcpRoute is attached to, as + * one of the routing rules to route the requests served by the mesh. + * Each mesh reference should match the pattern: + * `projects/*/locations/global/meshes/` + * The attached Mesh should be of a type SIDECAR + * + * Generated from protobuf field repeated string meshes = 8 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMeshes() + { + return $this->meshes; + } + + /** + * Optional. Meshes defines a list of meshes this TcpRoute is attached to, as + * one of the routing rules to route the requests served by the mesh. + * Each mesh reference should match the pattern: + * `projects/*/locations/global/meshes/` + * The attached Mesh should be of a type SIDECAR + * + * Generated from protobuf field repeated string meshes = 8 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMeshes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->meshes = $arr; + + return $this; + } + + /** + * Optional. Gateways defines a list of gateways this TcpRoute is attached to, + * as one of the routing rules to route the requests served by the gateway. + * Each gateway reference should match the pattern: + * `projects/*/locations/global/gateways/` + * + * Generated from protobuf field repeated string gateways = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getGateways() + { + return $this->gateways; + } + + /** + * Optional. Gateways defines a list of gateways this TcpRoute is attached to, + * as one of the routing rules to route the requests served by the gateway. + * Each gateway reference should match the pattern: + * `projects/*/locations/global/gateways/` + * + * Generated from protobuf field repeated string gateways = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setGateways($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->gateways = $arr; + + return $this; + } + + /** + * Optional. Set of label tags associated with the TcpRoute resource. + * + * Generated from protobuf field map labels = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. Set of label tags associated with the TcpRoute resource. + * + * Generated from protobuf field map labels = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/TcpRoute/RouteAction.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/TcpRoute/RouteAction.php new file mode 100644 index 000000000000..b2e0e11f070f --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/TcpRoute/RouteAction.php @@ -0,0 +1,120 @@ +google.cloud.networkservices.v1.TcpRoute.RouteAction + */ +class RouteAction extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The destination services to which traffic should be forwarded. + * At least one destination service is required. Only one of route + * destination or original destination can be set. + * + * Generated from protobuf field repeated .google.cloud.networkservices.v1.TcpRoute.RouteDestination destinations = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $destinations; + /** + * Optional. If true, Router will use the destination IP and port of the + * original connection as the destination of the request. Default is false. + * Only one of route destinations or original destination can be set. + * + * Generated from protobuf field bool original_destination = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $original_destination = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\NetworkServices\V1\TcpRoute\RouteDestination>|\Google\Protobuf\Internal\RepeatedField $destinations + * Optional. The destination services to which traffic should be forwarded. + * At least one destination service is required. Only one of route + * destination or original destination can be set. + * @type bool $original_destination + * Optional. If true, Router will use the destination IP and port of the + * original connection as the destination of the request. Default is false. + * Only one of route destinations or original destination can be set. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\TcpRoute::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The destination services to which traffic should be forwarded. + * At least one destination service is required. Only one of route + * destination or original destination can be set. + * + * Generated from protobuf field repeated .google.cloud.networkservices.v1.TcpRoute.RouteDestination destinations = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDestinations() + { + return $this->destinations; + } + + /** + * Optional. The destination services to which traffic should be forwarded. + * At least one destination service is required. Only one of route + * destination or original destination can be set. + * + * Generated from protobuf field repeated .google.cloud.networkservices.v1.TcpRoute.RouteDestination destinations = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\NetworkServices\V1\TcpRoute\RouteDestination>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDestinations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkServices\V1\TcpRoute\RouteDestination::class); + $this->destinations = $arr; + + return $this; + } + + /** + * Optional. If true, Router will use the destination IP and port of the + * original connection as the destination of the request. Default is false. + * Only one of route destinations or original destination can be set. + * + * Generated from protobuf field bool original_destination = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getOriginalDestination() + { + return $this->original_destination; + } + + /** + * Optional. If true, Router will use the destination IP and port of the + * original connection as the destination of the request. Default is false. + * Only one of route destinations or original destination can be set. + * + * Generated from protobuf field bool original_destination = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setOriginalDestination($var) + { + GPBUtil::checkBool($var); + $this->original_destination = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(RouteAction::class, \Google\Cloud\NetworkServices\V1\TcpRoute_RouteAction::class); + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/TcpRoute/RouteDestination.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/TcpRoute/RouteDestination.php new file mode 100644 index 000000000000..e663cca2b90f --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/TcpRoute/RouteDestination.php @@ -0,0 +1,144 @@ +google.cloud.networkservices.v1.TcpRoute.RouteDestination + */ +class RouteDestination extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The URL of a BackendService to route traffic to. + * + * Generated from protobuf field string service_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $service_name = ''; + /** + * Optional. Specifies the proportion of requests forwarded to the backend + * referenced by the serviceName field. This is computed as: + * - weight/Sum(weights in this destination list). + * For non-zero values, there may be some epsilon from the exact proportion + * defined here depending on the precision an implementation supports. + * If only one serviceName is specified and it has a weight greater than 0, + * 100% of the traffic is forwarded to that backend. + * If weights are specified for any one service name, they need to be + * specified for all of them. + * If weights are unspecified for all services, then, traffic is distributed + * in equal proportions to all of them. + * + * Generated from protobuf field int32 weight = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $weight = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $service_name + * Required. The URL of a BackendService to route traffic to. + * @type int $weight + * Optional. Specifies the proportion of requests forwarded to the backend + * referenced by the serviceName field. This is computed as: + * - weight/Sum(weights in this destination list). + * For non-zero values, there may be some epsilon from the exact proportion + * defined here depending on the precision an implementation supports. + * If only one serviceName is specified and it has a weight greater than 0, + * 100% of the traffic is forwarded to that backend. + * If weights are specified for any one service name, they need to be + * specified for all of them. + * If weights are unspecified for all services, then, traffic is distributed + * in equal proportions to all of them. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\TcpRoute::initOnce(); + parent::__construct($data); + } + + /** + * Required. The URL of a BackendService to route traffic to. + * + * Generated from protobuf field string service_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getServiceName() + { + return $this->service_name; + } + + /** + * Required. The URL of a BackendService to route traffic to. + * + * Generated from protobuf field string service_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setServiceName($var) + { + GPBUtil::checkString($var, True); + $this->service_name = $var; + + return $this; + } + + /** + * Optional. Specifies the proportion of requests forwarded to the backend + * referenced by the serviceName field. This is computed as: + * - weight/Sum(weights in this destination list). + * For non-zero values, there may be some epsilon from the exact proportion + * defined here depending on the precision an implementation supports. + * If only one serviceName is specified and it has a weight greater than 0, + * 100% of the traffic is forwarded to that backend. + * If weights are specified for any one service name, they need to be + * specified for all of them. + * If weights are unspecified for all services, then, traffic is distributed + * in equal proportions to all of them. + * + * Generated from protobuf field int32 weight = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getWeight() + { + return $this->weight; + } + + /** + * Optional. Specifies the proportion of requests forwarded to the backend + * referenced by the serviceName field. This is computed as: + * - weight/Sum(weights in this destination list). + * For non-zero values, there may be some epsilon from the exact proportion + * defined here depending on the precision an implementation supports. + * If only one serviceName is specified and it has a weight greater than 0, + * 100% of the traffic is forwarded to that backend. + * If weights are specified for any one service name, they need to be + * specified for all of them. + * If weights are unspecified for all services, then, traffic is distributed + * in equal proportions to all of them. + * + * Generated from protobuf field int32 weight = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setWeight($var) + { + GPBUtil::checkInt32($var); + $this->weight = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(RouteDestination::class, \Google\Cloud\NetworkServices\V1\TcpRoute_RouteDestination::class); + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/TcpRoute/RouteMatch.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/TcpRoute/RouteMatch.php new file mode 100644 index 000000000000..a084049f5c79 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/TcpRoute/RouteMatch.php @@ -0,0 +1,139 @@ +google.cloud.networkservices.v1.TcpRoute.RouteMatch + */ +class RouteMatch extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Must be specified in the CIDR range format. A CIDR range + * consists of an IP Address and a prefix length to construct the subnet + * mask. By default, the prefix length is 32 (i.e. matches a single IP + * address). Only IPV4 addresses are supported. + * Examples: + * "10.0.0.1" - matches against this exact IP address. + * "10.0.0.0/8" - matches against any IP address within the 10.0.0.0 subnet + * and 255.255.255.0 mask. + * "0.0.0.0/0" - matches against any IP address'. + * + * Generated from protobuf field string address = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $address = ''; + /** + * Required. Specifies the destination port to match against. + * + * Generated from protobuf field string port = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $port = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $address + * Required. Must be specified in the CIDR range format. A CIDR range + * consists of an IP Address and a prefix length to construct the subnet + * mask. By default, the prefix length is 32 (i.e. matches a single IP + * address). Only IPV4 addresses are supported. + * Examples: + * "10.0.0.1" - matches against this exact IP address. + * "10.0.0.0/8" - matches against any IP address within the 10.0.0.0 subnet + * and 255.255.255.0 mask. + * "0.0.0.0/0" - matches against any IP address'. + * @type string $port + * Required. Specifies the destination port to match against. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\TcpRoute::initOnce(); + parent::__construct($data); + } + + /** + * Required. Must be specified in the CIDR range format. A CIDR range + * consists of an IP Address and a prefix length to construct the subnet + * mask. By default, the prefix length is 32 (i.e. matches a single IP + * address). Only IPV4 addresses are supported. + * Examples: + * "10.0.0.1" - matches against this exact IP address. + * "10.0.0.0/8" - matches against any IP address within the 10.0.0.0 subnet + * and 255.255.255.0 mask. + * "0.0.0.0/0" - matches against any IP address'. + * + * Generated from protobuf field string address = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getAddress() + { + return $this->address; + } + + /** + * Required. Must be specified in the CIDR range format. A CIDR range + * consists of an IP Address and a prefix length to construct the subnet + * mask. By default, the prefix length is 32 (i.e. matches a single IP + * address). Only IPV4 addresses are supported. + * Examples: + * "10.0.0.1" - matches against this exact IP address. + * "10.0.0.0/8" - matches against any IP address within the 10.0.0.0 subnet + * and 255.255.255.0 mask. + * "0.0.0.0/0" - matches against any IP address'. + * + * Generated from protobuf field string address = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setAddress($var) + { + GPBUtil::checkString($var, True); + $this->address = $var; + + return $this; + } + + /** + * Required. Specifies the destination port to match against. + * + * Generated from protobuf field string port = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPort() + { + return $this->port; + } + + /** + * Required. Specifies the destination port to match against. + * + * Generated from protobuf field string port = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPort($var) + { + GPBUtil::checkString($var, True); + $this->port = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(RouteMatch::class, \Google\Cloud\NetworkServices\V1\TcpRoute_RouteMatch::class); + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/TcpRoute/RouteRule.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/TcpRoute/RouteRule.php new file mode 100644 index 000000000000..9653ee3d112e --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/TcpRoute/RouteRule.php @@ -0,0 +1,127 @@ +google.cloud.networkservices.v1.TcpRoute.RouteRule + */ +class RouteRule extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. RouteMatch defines the predicate used to match requests to a + * given action. Multiple match types are "OR"ed for evaluation. If no + * routeMatch field is specified, this rule will unconditionally match + * traffic. + * + * Generated from protobuf field repeated .google.cloud.networkservices.v1.TcpRoute.RouteMatch matches = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $matches; + /** + * Required. The detailed rule defining how to route matched traffic. + * + * Generated from protobuf field .google.cloud.networkservices.v1.TcpRoute.RouteAction action = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $action = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\NetworkServices\V1\TcpRoute\RouteMatch>|\Google\Protobuf\Internal\RepeatedField $matches + * Optional. RouteMatch defines the predicate used to match requests to a + * given action. Multiple match types are "OR"ed for evaluation. If no + * routeMatch field is specified, this rule will unconditionally match + * traffic. + * @type \Google\Cloud\NetworkServices\V1\TcpRoute\RouteAction $action + * Required. The detailed rule defining how to route matched traffic. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\TcpRoute::initOnce(); + parent::__construct($data); + } + + /** + * Optional. RouteMatch defines the predicate used to match requests to a + * given action. Multiple match types are "OR"ed for evaluation. If no + * routeMatch field is specified, this rule will unconditionally match + * traffic. + * + * Generated from protobuf field repeated .google.cloud.networkservices.v1.TcpRoute.RouteMatch matches = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMatches() + { + return $this->matches; + } + + /** + * Optional. RouteMatch defines the predicate used to match requests to a + * given action. Multiple match types are "OR"ed for evaluation. If no + * routeMatch field is specified, this rule will unconditionally match + * traffic. + * + * Generated from protobuf field repeated .google.cloud.networkservices.v1.TcpRoute.RouteMatch matches = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\NetworkServices\V1\TcpRoute\RouteMatch>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMatches($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkServices\V1\TcpRoute\RouteMatch::class); + $this->matches = $arr; + + return $this; + } + + /** + * Required. The detailed rule defining how to route matched traffic. + * + * Generated from protobuf field .google.cloud.networkservices.v1.TcpRoute.RouteAction action = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetworkServices\V1\TcpRoute\RouteAction|null + */ + public function getAction() + { + return $this->action; + } + + public function hasAction() + { + return isset($this->action); + } + + public function clearAction() + { + unset($this->action); + } + + /** + * Required. The detailed rule defining how to route matched traffic. + * + * Generated from protobuf field .google.cloud.networkservices.v1.TcpRoute.RouteAction action = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetworkServices\V1\TcpRoute\RouteAction $var + * @return $this + */ + public function setAction($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkServices\V1\TcpRoute\RouteAction::class); + $this->action = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(RouteRule::class, \Google\Cloud\NetworkServices\V1\TcpRoute_RouteRule::class); + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/TlsRoute.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/TlsRoute.php new file mode 100644 index 000000000000..9d44cf7d5e26 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/TlsRoute.php @@ -0,0 +1,370 @@ +google.cloud.networkservices.v1.TlsRoute + */ +class TlsRoute extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the TlsRoute resource. It matches pattern + * `projects/*/locations/global/tlsRoutes/tls_route_name>`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * Output only. Server-defined URL of this resource + * + * Generated from protobuf field string self_link = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $self_link = ''; + /** + * Output only. The timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The timestamp when the resource was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Optional. A free-text description of the resource. Max length 1024 + * characters. + * + * Generated from protobuf field string description = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Required. Rules that define how traffic is routed and handled. At least one + * RouteRule must be supplied. If there are multiple rules then the action + * taken will be the first rule to match. + * + * Generated from protobuf field repeated .google.cloud.networkservices.v1.TlsRoute.RouteRule rules = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + private $rules; + /** + * Optional. Meshes defines a list of meshes this TlsRoute is attached to, as + * one of the routing rules to route the requests served by the mesh. + * Each mesh reference should match the pattern: + * `projects/*/locations/global/meshes/` + * The attached Mesh should be of a type SIDECAR + * + * Generated from protobuf field repeated string meshes = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + private $meshes; + /** + * Optional. Gateways defines a list of gateways this TlsRoute is attached to, + * as one of the routing rules to route the requests served by the gateway. + * Each gateway reference should match the pattern: + * `projects/*/locations/global/gateways/` + * + * Generated from protobuf field repeated string gateways = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + private $gateways; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the TlsRoute resource. It matches pattern + * `projects/*/locations/global/tlsRoutes/tls_route_name>`. + * @type string $self_link + * Output only. Server-defined URL of this resource + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The timestamp when the resource was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The timestamp when the resource was updated. + * @type string $description + * Optional. A free-text description of the resource. Max length 1024 + * characters. + * @type array<\Google\Cloud\NetworkServices\V1\TlsRoute\RouteRule>|\Google\Protobuf\Internal\RepeatedField $rules + * Required. Rules that define how traffic is routed and handled. At least one + * RouteRule must be supplied. If there are multiple rules then the action + * taken will be the first rule to match. + * @type array|\Google\Protobuf\Internal\RepeatedField $meshes + * Optional. Meshes defines a list of meshes this TlsRoute is attached to, as + * one of the routing rules to route the requests served by the mesh. + * Each mesh reference should match the pattern: + * `projects/*/locations/global/meshes/` + * The attached Mesh should be of a type SIDECAR + * @type array|\Google\Protobuf\Internal\RepeatedField $gateways + * Optional. Gateways defines a list of gateways this TlsRoute is attached to, + * as one of the routing rules to route the requests served by the gateway. + * Each gateway reference should match the pattern: + * `projects/*/locations/global/gateways/` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\TlsRoute::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the TlsRoute resource. It matches pattern + * `projects/*/locations/global/tlsRoutes/tls_route_name>`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the TlsRoute resource. It matches pattern + * `projects/*/locations/global/tlsRoutes/tls_route_name>`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. Server-defined URL of this resource + * + * Generated from protobuf field string self_link = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getSelfLink() + { + return $this->self_link; + } + + /** + * Output only. Server-defined URL of this resource + * + * Generated from protobuf field string self_link = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setSelfLink($var) + { + GPBUtil::checkString($var, True); + $this->self_link = $var; + + return $this; + } + + /** + * Output only. The timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The timestamp when the resource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The timestamp when the resource was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The timestamp when the resource was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Optional. A free-text description of the resource. Max length 1024 + * characters. + * + * Generated from protobuf field string description = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. A free-text description of the resource. Max length 1024 + * characters. + * + * Generated from protobuf field string description = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Required. Rules that define how traffic is routed and handled. At least one + * RouteRule must be supplied. If there are multiple rules then the action + * taken will be the first rule to match. + * + * Generated from protobuf field repeated .google.cloud.networkservices.v1.TlsRoute.RouteRule rules = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRules() + { + return $this->rules; + } + + /** + * Required. Rules that define how traffic is routed and handled. At least one + * RouteRule must be supplied. If there are multiple rules then the action + * taken will be the first rule to match. + * + * Generated from protobuf field repeated .google.cloud.networkservices.v1.TlsRoute.RouteRule rules = 5 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Cloud\NetworkServices\V1\TlsRoute\RouteRule>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRules($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkServices\V1\TlsRoute\RouteRule::class); + $this->rules = $arr; + + return $this; + } + + /** + * Optional. Meshes defines a list of meshes this TlsRoute is attached to, as + * one of the routing rules to route the requests served by the mesh. + * Each mesh reference should match the pattern: + * `projects/*/locations/global/meshes/` + * The attached Mesh should be of a type SIDECAR + * + * Generated from protobuf field repeated string meshes = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMeshes() + { + return $this->meshes; + } + + /** + * Optional. Meshes defines a list of meshes this TlsRoute is attached to, as + * one of the routing rules to route the requests served by the mesh. + * Each mesh reference should match the pattern: + * `projects/*/locations/global/meshes/` + * The attached Mesh should be of a type SIDECAR + * + * Generated from protobuf field repeated string meshes = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMeshes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->meshes = $arr; + + return $this; + } + + /** + * Optional. Gateways defines a list of gateways this TlsRoute is attached to, + * as one of the routing rules to route the requests served by the gateway. + * Each gateway reference should match the pattern: + * `projects/*/locations/global/gateways/` + * + * Generated from protobuf field repeated string gateways = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getGateways() + { + return $this->gateways; + } + + /** + * Optional. Gateways defines a list of gateways this TlsRoute is attached to, + * as one of the routing rules to route the requests served by the gateway. + * Each gateway reference should match the pattern: + * `projects/*/locations/global/gateways/` + * + * Generated from protobuf field repeated string gateways = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setGateways($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->gateways = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/TlsRoute/RouteAction.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/TlsRoute/RouteAction.php new file mode 100644 index 000000000000..a59aab54d550 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/TlsRoute/RouteAction.php @@ -0,0 +1,74 @@ +google.cloud.networkservices.v1.TlsRoute.RouteAction + */ +class RouteAction extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The destination services to which traffic should be forwarded. + * At least one destination service is required. + * + * Generated from protobuf field repeated .google.cloud.networkservices.v1.TlsRoute.RouteDestination destinations = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private $destinations; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\NetworkServices\V1\TlsRoute\RouteDestination>|\Google\Protobuf\Internal\RepeatedField $destinations + * Required. The destination services to which traffic should be forwarded. + * At least one destination service is required. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\TlsRoute::initOnce(); + parent::__construct($data); + } + + /** + * Required. The destination services to which traffic should be forwarded. + * At least one destination service is required. + * + * Generated from protobuf field repeated .google.cloud.networkservices.v1.TlsRoute.RouteDestination destinations = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDestinations() + { + return $this->destinations; + } + + /** + * Required. The destination services to which traffic should be forwarded. + * At least one destination service is required. + * + * Generated from protobuf field repeated .google.cloud.networkservices.v1.TlsRoute.RouteDestination destinations = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Cloud\NetworkServices\V1\TlsRoute\RouteDestination>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDestinations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkServices\V1\TlsRoute\RouteDestination::class); + $this->destinations = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(RouteAction::class, \Google\Cloud\NetworkServices\V1\TlsRoute_RouteAction::class); + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/TlsRoute/RouteDestination.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/TlsRoute/RouteDestination.php new file mode 100644 index 000000000000..804ee9ad6ef1 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/TlsRoute/RouteDestination.php @@ -0,0 +1,116 @@ +google.cloud.networkservices.v1.TlsRoute.RouteDestination + */ +class RouteDestination extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The URL of a BackendService to route traffic to. + * + * Generated from protobuf field string service_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $service_name = ''; + /** + * Optional. Specifies the proportion of requests forwareded to the backend + * referenced by the service_name field. This is computed as: + * - weight/Sum(weights in destinations) + * Weights in all destinations does not need to sum up to 100. + * + * Generated from protobuf field int32 weight = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $weight = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $service_name + * Required. The URL of a BackendService to route traffic to. + * @type int $weight + * Optional. Specifies the proportion of requests forwareded to the backend + * referenced by the service_name field. This is computed as: + * - weight/Sum(weights in destinations) + * Weights in all destinations does not need to sum up to 100. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\TlsRoute::initOnce(); + parent::__construct($data); + } + + /** + * Required. The URL of a BackendService to route traffic to. + * + * Generated from protobuf field string service_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getServiceName() + { + return $this->service_name; + } + + /** + * Required. The URL of a BackendService to route traffic to. + * + * Generated from protobuf field string service_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setServiceName($var) + { + GPBUtil::checkString($var, True); + $this->service_name = $var; + + return $this; + } + + /** + * Optional. Specifies the proportion of requests forwareded to the backend + * referenced by the service_name field. This is computed as: + * - weight/Sum(weights in destinations) + * Weights in all destinations does not need to sum up to 100. + * + * Generated from protobuf field int32 weight = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getWeight() + { + return $this->weight; + } + + /** + * Optional. Specifies the proportion of requests forwareded to the backend + * referenced by the service_name field. This is computed as: + * - weight/Sum(weights in destinations) + * Weights in all destinations does not need to sum up to 100. + * + * Generated from protobuf field int32 weight = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setWeight($var) + { + GPBUtil::checkInt32($var); + $this->weight = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(RouteDestination::class, \Google\Cloud\NetworkServices\V1\TlsRoute_RouteDestination::class); + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/TlsRoute/RouteMatch.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/TlsRoute/RouteMatch.php new file mode 100644 index 000000000000..a9c60595ff5f --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/TlsRoute/RouteMatch.php @@ -0,0 +1,147 @@ +google.cloud.networkservices.v1.TlsRoute.RouteMatch + */ +class RouteMatch extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. SNI (server name indicator) to match against. + * SNI will be matched against all wildcard domains, i.e. `www.example.com` + * will be first matched against `www.example.com`, then `*.example.com`, + * then `*.com.` + * Partial wildcards are not supported, and values like *w.example.com are + * invalid. + * At least one of sni_host and alpn is required. + * Up to 5 sni hosts across all matches can be set. + * + * Generated from protobuf field repeated string sni_host = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $sni_host; + /** + * Optional. ALPN (Application-Layer Protocol Negotiation) to match against. + * Examples: "http/1.1", "h2". + * At least one of sni_host and alpn is required. + * Up to 5 alpns across all matches can be set. + * + * Generated from protobuf field repeated string alpn = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $alpn; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $sni_host + * Optional. SNI (server name indicator) to match against. + * SNI will be matched against all wildcard domains, i.e. `www.example.com` + * will be first matched against `www.example.com`, then `*.example.com`, + * then `*.com.` + * Partial wildcards are not supported, and values like *w.example.com are + * invalid. + * At least one of sni_host and alpn is required. + * Up to 5 sni hosts across all matches can be set. + * @type array|\Google\Protobuf\Internal\RepeatedField $alpn + * Optional. ALPN (Application-Layer Protocol Negotiation) to match against. + * Examples: "http/1.1", "h2". + * At least one of sni_host and alpn is required. + * Up to 5 alpns across all matches can be set. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\TlsRoute::initOnce(); + parent::__construct($data); + } + + /** + * Optional. SNI (server name indicator) to match against. + * SNI will be matched against all wildcard domains, i.e. `www.example.com` + * will be first matched against `www.example.com`, then `*.example.com`, + * then `*.com.` + * Partial wildcards are not supported, and values like *w.example.com are + * invalid. + * At least one of sni_host and alpn is required. + * Up to 5 sni hosts across all matches can be set. + * + * Generated from protobuf field repeated string sni_host = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSniHost() + { + return $this->sni_host; + } + + /** + * Optional. SNI (server name indicator) to match against. + * SNI will be matched against all wildcard domains, i.e. `www.example.com` + * will be first matched against `www.example.com`, then `*.example.com`, + * then `*.com.` + * Partial wildcards are not supported, and values like *w.example.com are + * invalid. + * At least one of sni_host and alpn is required. + * Up to 5 sni hosts across all matches can be set. + * + * Generated from protobuf field repeated string sni_host = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSniHost($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->sni_host = $arr; + + return $this; + } + + /** + * Optional. ALPN (Application-Layer Protocol Negotiation) to match against. + * Examples: "http/1.1", "h2". + * At least one of sni_host and alpn is required. + * Up to 5 alpns across all matches can be set. + * + * Generated from protobuf field repeated string alpn = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAlpn() + { + return $this->alpn; + } + + /** + * Optional. ALPN (Application-Layer Protocol Negotiation) to match against. + * Examples: "http/1.1", "h2". + * At least one of sni_host and alpn is required. + * Up to 5 alpns across all matches can be set. + * + * Generated from protobuf field repeated string alpn = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAlpn($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->alpn = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(RouteMatch::class, \Google\Cloud\NetworkServices\V1\TlsRoute_RouteMatch::class); + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/TlsRoute/RouteRule.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/TlsRoute/RouteRule.php new file mode 100644 index 000000000000..639817fa9d0d --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/TlsRoute/RouteRule.php @@ -0,0 +1,119 @@ +google.cloud.networkservices.v1.TlsRoute.RouteRule + */ +class RouteRule extends \Google\Protobuf\Internal\Message +{ + /** + * Required. RouteMatch defines the predicate used to match requests to a + * given action. Multiple match types are "OR"ed for evaluation. + * + * Generated from protobuf field repeated .google.cloud.networkservices.v1.TlsRoute.RouteMatch matches = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private $matches; + /** + * Required. The detailed rule defining how to route matched traffic. + * + * Generated from protobuf field .google.cloud.networkservices.v1.TlsRoute.RouteAction action = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $action = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\NetworkServices\V1\TlsRoute\RouteMatch>|\Google\Protobuf\Internal\RepeatedField $matches + * Required. RouteMatch defines the predicate used to match requests to a + * given action. Multiple match types are "OR"ed for evaluation. + * @type \Google\Cloud\NetworkServices\V1\TlsRoute\RouteAction $action + * Required. The detailed rule defining how to route matched traffic. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\TlsRoute::initOnce(); + parent::__construct($data); + } + + /** + * Required. RouteMatch defines the predicate used to match requests to a + * given action. Multiple match types are "OR"ed for evaluation. + * + * Generated from protobuf field repeated .google.cloud.networkservices.v1.TlsRoute.RouteMatch matches = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMatches() + { + return $this->matches; + } + + /** + * Required. RouteMatch defines the predicate used to match requests to a + * given action. Multiple match types are "OR"ed for evaluation. + * + * Generated from protobuf field repeated .google.cloud.networkservices.v1.TlsRoute.RouteMatch matches = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Cloud\NetworkServices\V1\TlsRoute\RouteMatch>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMatches($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkServices\V1\TlsRoute\RouteMatch::class); + $this->matches = $arr; + + return $this; + } + + /** + * Required. The detailed rule defining how to route matched traffic. + * + * Generated from protobuf field .google.cloud.networkservices.v1.TlsRoute.RouteAction action = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetworkServices\V1\TlsRoute\RouteAction|null + */ + public function getAction() + { + return $this->action; + } + + public function hasAction() + { + return isset($this->action); + } + + public function clearAction() + { + unset($this->action); + } + + /** + * Required. The detailed rule defining how to route matched traffic. + * + * Generated from protobuf field .google.cloud.networkservices.v1.TlsRoute.RouteAction action = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetworkServices\V1\TlsRoute\RouteAction $var + * @return $this + */ + public function setAction($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkServices\V1\TlsRoute\RouteAction::class); + $this->action = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(RouteRule::class, \Google\Cloud\NetworkServices\V1\TlsRoute_RouteRule::class); + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/TrafficPortSelector.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/TrafficPortSelector.php new file mode 100644 index 000000000000..409d32c196e4 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/TrafficPortSelector.php @@ -0,0 +1,79 @@ +google.cloud.networkservices.v1.TrafficPortSelector + */ +class TrafficPortSelector extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. A list of ports. Can be port numbers or port range + * (example, [80-90] specifies all ports from 80 to 90, including + * 80 and 90) or named ports or * to specify all ports. If the + * list is empty, all ports are selected. + * + * Generated from protobuf field repeated string ports = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $ports; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $ports + * Optional. A list of ports. Can be port numbers or port range + * (example, [80-90] specifies all ports from 80 to 90, including + * 80 and 90) or named ports or * to specify all ports. If the + * list is empty, all ports are selected. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\Common::initOnce(); + parent::__construct($data); + } + + /** + * Optional. A list of ports. Can be port numbers or port range + * (example, [80-90] specifies all ports from 80 to 90, including + * 80 and 90) or named ports or * to specify all ports. If the + * list is empty, all ports are selected. + * + * Generated from protobuf field repeated string ports = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPorts() + { + return $this->ports; + } + + /** + * Optional. A list of ports. Can be port numbers or port range + * (example, [80-90] specifies all ports from 80 to 90, including + * 80 and 90) or named ports or * to specify all ports. If the + * list is empty, all ports are selected. + * + * Generated from protobuf field repeated string ports = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPorts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->ports = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/UpdateEndpointPolicyRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/UpdateEndpointPolicyRequest.php new file mode 100644 index 000000000000..f33c3d157691 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/UpdateEndpointPolicyRequest.php @@ -0,0 +1,156 @@ +google.cloud.networkservices.v1.UpdateEndpointPolicyRequest + */ +class UpdateEndpointPolicyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Field mask is used to specify the fields to be overwritten in the + * EndpointPolicy resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $update_mask = null; + /** + * Required. Updated EndpointPolicy resource. + * + * Generated from protobuf field .google.cloud.networkservices.v1.EndpointPolicy endpoint_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $endpoint_policy = null; + + /** + * @param \Google\Cloud\NetworkServices\V1\EndpointPolicy $endpointPolicy Required. Updated EndpointPolicy resource. + * @param \Google\Protobuf\FieldMask $updateMask Optional. Field mask is used to specify the fields to be overwritten in the + * EndpointPolicy resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * @return \Google\Cloud\NetworkServices\V1\UpdateEndpointPolicyRequest + * + * @experimental + */ + public static function build(\Google\Cloud\NetworkServices\V1\EndpointPolicy $endpointPolicy, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setEndpointPolicy($endpointPolicy) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Optional. Field mask is used to specify the fields to be overwritten in the + * EndpointPolicy resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * @type \Google\Cloud\NetworkServices\V1\EndpointPolicy $endpoint_policy + * Required. Updated EndpointPolicy resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\EndpointPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Field mask is used to specify the fields to be overwritten in the + * EndpointPolicy resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Optional. Field mask is used to specify the fields to be overwritten in the + * EndpointPolicy resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Required. Updated EndpointPolicy resource. + * + * Generated from protobuf field .google.cloud.networkservices.v1.EndpointPolicy endpoint_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetworkServices\V1\EndpointPolicy|null + */ + public function getEndpointPolicy() + { + return $this->endpoint_policy; + } + + public function hasEndpointPolicy() + { + return isset($this->endpoint_policy); + } + + public function clearEndpointPolicy() + { + unset($this->endpoint_policy); + } + + /** + * Required. Updated EndpointPolicy resource. + * + * Generated from protobuf field .google.cloud.networkservices.v1.EndpointPolicy endpoint_policy = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetworkServices\V1\EndpointPolicy $var + * @return $this + */ + public function setEndpointPolicy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkServices\V1\EndpointPolicy::class); + $this->endpoint_policy = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/UpdateGatewayRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/UpdateGatewayRequest.php new file mode 100644 index 000000000000..843926a5faea --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/UpdateGatewayRequest.php @@ -0,0 +1,156 @@ +google.cloud.networkservices.v1.UpdateGatewayRequest + */ +class UpdateGatewayRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Field mask is used to specify the fields to be overwritten in the + * Gateway resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $update_mask = null; + /** + * Required. Updated Gateway resource. + * + * Generated from protobuf field .google.cloud.networkservices.v1.Gateway gateway = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $gateway = null; + + /** + * @param \Google\Cloud\NetworkServices\V1\Gateway $gateway Required. Updated Gateway resource. + * @param \Google\Protobuf\FieldMask $updateMask Optional. Field mask is used to specify the fields to be overwritten in the + * Gateway resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * @return \Google\Cloud\NetworkServices\V1\UpdateGatewayRequest + * + * @experimental + */ + public static function build(\Google\Cloud\NetworkServices\V1\Gateway $gateway, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setGateway($gateway) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Optional. Field mask is used to specify the fields to be overwritten in the + * Gateway resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * @type \Google\Cloud\NetworkServices\V1\Gateway $gateway + * Required. Updated Gateway resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\Gateway::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Field mask is used to specify the fields to be overwritten in the + * Gateway resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Optional. Field mask is used to specify the fields to be overwritten in the + * Gateway resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Required. Updated Gateway resource. + * + * Generated from protobuf field .google.cloud.networkservices.v1.Gateway gateway = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetworkServices\V1\Gateway|null + */ + public function getGateway() + { + return $this->gateway; + } + + public function hasGateway() + { + return isset($this->gateway); + } + + public function clearGateway() + { + unset($this->gateway); + } + + /** + * Required. Updated Gateway resource. + * + * Generated from protobuf field .google.cloud.networkservices.v1.Gateway gateway = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetworkServices\V1\Gateway $var + * @return $this + */ + public function setGateway($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkServices\V1\Gateway::class); + $this->gateway = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/UpdateGrpcRouteRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/UpdateGrpcRouteRequest.php new file mode 100644 index 000000000000..c0b1c553d481 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/UpdateGrpcRouteRequest.php @@ -0,0 +1,156 @@ +google.cloud.networkservices.v1.UpdateGrpcRouteRequest + */ +class UpdateGrpcRouteRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Field mask is used to specify the fields to be overwritten in the + * GrpcRoute resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $update_mask = null; + /** + * Required. Updated GrpcRoute resource. + * + * Generated from protobuf field .google.cloud.networkservices.v1.GrpcRoute grpc_route = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $grpc_route = null; + + /** + * @param \Google\Cloud\NetworkServices\V1\GrpcRoute $grpcRoute Required. Updated GrpcRoute resource. + * @param \Google\Protobuf\FieldMask $updateMask Optional. Field mask is used to specify the fields to be overwritten in the + * GrpcRoute resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * @return \Google\Cloud\NetworkServices\V1\UpdateGrpcRouteRequest + * + * @experimental + */ + public static function build(\Google\Cloud\NetworkServices\V1\GrpcRoute $grpcRoute, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setGrpcRoute($grpcRoute) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Optional. Field mask is used to specify the fields to be overwritten in the + * GrpcRoute resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * @type \Google\Cloud\NetworkServices\V1\GrpcRoute $grpc_route + * Required. Updated GrpcRoute resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\GrpcRoute::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Field mask is used to specify the fields to be overwritten in the + * GrpcRoute resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Optional. Field mask is used to specify the fields to be overwritten in the + * GrpcRoute resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Required. Updated GrpcRoute resource. + * + * Generated from protobuf field .google.cloud.networkservices.v1.GrpcRoute grpc_route = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetworkServices\V1\GrpcRoute|null + */ + public function getGrpcRoute() + { + return $this->grpc_route; + } + + public function hasGrpcRoute() + { + return isset($this->grpc_route); + } + + public function clearGrpcRoute() + { + unset($this->grpc_route); + } + + /** + * Required. Updated GrpcRoute resource. + * + * Generated from protobuf field .google.cloud.networkservices.v1.GrpcRoute grpc_route = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetworkServices\V1\GrpcRoute $var + * @return $this + */ + public function setGrpcRoute($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkServices\V1\GrpcRoute::class); + $this->grpc_route = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/UpdateHttpRouteRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/UpdateHttpRouteRequest.php new file mode 100644 index 000000000000..183df9d0f1f0 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/UpdateHttpRouteRequest.php @@ -0,0 +1,156 @@ +google.cloud.networkservices.v1.UpdateHttpRouteRequest + */ +class UpdateHttpRouteRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Field mask is used to specify the fields to be overwritten in the + * HttpRoute resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $update_mask = null; + /** + * Required. Updated HttpRoute resource. + * + * Generated from protobuf field .google.cloud.networkservices.v1.HttpRoute http_route = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $http_route = null; + + /** + * @param \Google\Cloud\NetworkServices\V1\HttpRoute $httpRoute Required. Updated HttpRoute resource. + * @param \Google\Protobuf\FieldMask $updateMask Optional. Field mask is used to specify the fields to be overwritten in the + * HttpRoute resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * @return \Google\Cloud\NetworkServices\V1\UpdateHttpRouteRequest + * + * @experimental + */ + public static function build(\Google\Cloud\NetworkServices\V1\HttpRoute $httpRoute, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setHttpRoute($httpRoute) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Optional. Field mask is used to specify the fields to be overwritten in the + * HttpRoute resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * @type \Google\Cloud\NetworkServices\V1\HttpRoute $http_route + * Required. Updated HttpRoute resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\HttpRoute::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Field mask is used to specify the fields to be overwritten in the + * HttpRoute resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Optional. Field mask is used to specify the fields to be overwritten in the + * HttpRoute resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Required. Updated HttpRoute resource. + * + * Generated from protobuf field .google.cloud.networkservices.v1.HttpRoute http_route = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetworkServices\V1\HttpRoute|null + */ + public function getHttpRoute() + { + return $this->http_route; + } + + public function hasHttpRoute() + { + return isset($this->http_route); + } + + public function clearHttpRoute() + { + unset($this->http_route); + } + + /** + * Required. Updated HttpRoute resource. + * + * Generated from protobuf field .google.cloud.networkservices.v1.HttpRoute http_route = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetworkServices\V1\HttpRoute $var + * @return $this + */ + public function setHttpRoute($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkServices\V1\HttpRoute::class); + $this->http_route = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/UpdateLbRouteExtensionRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/UpdateLbRouteExtensionRequest.php new file mode 100644 index 000000000000..cc4045456b2f --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/UpdateLbRouteExtensionRequest.php @@ -0,0 +1,230 @@ +google.cloud.networkservices.v1.UpdateLbRouteExtensionRequest + */ +class UpdateLbRouteExtensionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Used to specify the fields to be overwritten in the + * `LbRouteExtension` resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field is overwritten if it is in the mask. If the + * user does not specify a mask, then all fields are overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $update_mask = null; + /** + * Required. `LbRouteExtension` resource being updated. + * + * Generated from protobuf field .google.cloud.networkservices.v1.LbRouteExtension lb_route_extension = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $lb_route_extension = null; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server can ignore + * the request if it has already been completed. The server guarantees + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, ignores the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param \Google\Cloud\NetworkServices\V1\LbRouteExtension $lbRouteExtension Required. `LbRouteExtension` resource being updated. + * @param \Google\Protobuf\FieldMask $updateMask Optional. Used to specify the fields to be overwritten in the + * `LbRouteExtension` resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field is overwritten if it is in the mask. If the + * user does not specify a mask, then all fields are overwritten. + * + * @return \Google\Cloud\NetworkServices\V1\UpdateLbRouteExtensionRequest + * + * @experimental + */ + public static function build(\Google\Cloud\NetworkServices\V1\LbRouteExtension $lbRouteExtension, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setLbRouteExtension($lbRouteExtension) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Optional. Used to specify the fields to be overwritten in the + * `LbRouteExtension` resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field is overwritten if it is in the mask. If the + * user does not specify a mask, then all fields are overwritten. + * @type \Google\Cloud\NetworkServices\V1\LbRouteExtension $lb_route_extension + * Required. `LbRouteExtension` resource being updated. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server can ignore + * the request if it has already been completed. The server guarantees + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, ignores the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\Dep::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Used to specify the fields to be overwritten in the + * `LbRouteExtension` resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field is overwritten if it is in the mask. If the + * user does not specify a mask, then all fields are overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Optional. Used to specify the fields to be overwritten in the + * `LbRouteExtension` resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field is overwritten if it is in the mask. If the + * user does not specify a mask, then all fields are overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Required. `LbRouteExtension` resource being updated. + * + * Generated from protobuf field .google.cloud.networkservices.v1.LbRouteExtension lb_route_extension = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetworkServices\V1\LbRouteExtension|null + */ + public function getLbRouteExtension() + { + return $this->lb_route_extension; + } + + public function hasLbRouteExtension() + { + return isset($this->lb_route_extension); + } + + public function clearLbRouteExtension() + { + unset($this->lb_route_extension); + } + + /** + * Required. `LbRouteExtension` resource being updated. + * + * Generated from protobuf field .google.cloud.networkservices.v1.LbRouteExtension lb_route_extension = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetworkServices\V1\LbRouteExtension $var + * @return $this + */ + public function setLbRouteExtension($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkServices\V1\LbRouteExtension::class); + $this->lb_route_extension = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server can ignore + * the request if it has already been completed. The server guarantees + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, ignores the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server can ignore + * the request if it has already been completed. The server guarantees + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, ignores the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/UpdateLbTrafficExtensionRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/UpdateLbTrafficExtensionRequest.php new file mode 100644 index 000000000000..61e7550161c1 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/UpdateLbTrafficExtensionRequest.php @@ -0,0 +1,230 @@ +google.cloud.networkservices.v1.UpdateLbTrafficExtensionRequest + */ +class UpdateLbTrafficExtensionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Used to specify the fields to be overwritten in the + * `LbTrafficExtension` resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field is overwritten if it is in the mask. If the + * user does not specify a mask, then all fields are overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $update_mask = null; + /** + * Required. `LbTrafficExtension` resource being updated. + * + * Generated from protobuf field .google.cloud.networkservices.v1.LbTrafficExtension lb_traffic_extension = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $lb_traffic_extension = null; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server can ignore + * the request if it has already been completed. The server guarantees + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, ignores the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param \Google\Cloud\NetworkServices\V1\LbTrafficExtension $lbTrafficExtension Required. `LbTrafficExtension` resource being updated. + * @param \Google\Protobuf\FieldMask $updateMask Optional. Used to specify the fields to be overwritten in the + * `LbTrafficExtension` resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field is overwritten if it is in the mask. If the + * user does not specify a mask, then all fields are overwritten. + * + * @return \Google\Cloud\NetworkServices\V1\UpdateLbTrafficExtensionRequest + * + * @experimental + */ + public static function build(\Google\Cloud\NetworkServices\V1\LbTrafficExtension $lbTrafficExtension, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setLbTrafficExtension($lbTrafficExtension) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Optional. Used to specify the fields to be overwritten in the + * `LbTrafficExtension` resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field is overwritten if it is in the mask. If the + * user does not specify a mask, then all fields are overwritten. + * @type \Google\Cloud\NetworkServices\V1\LbTrafficExtension $lb_traffic_extension + * Required. `LbTrafficExtension` resource being updated. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server can ignore + * the request if it has already been completed. The server guarantees + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, ignores the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\Dep::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Used to specify the fields to be overwritten in the + * `LbTrafficExtension` resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field is overwritten if it is in the mask. If the + * user does not specify a mask, then all fields are overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Optional. Used to specify the fields to be overwritten in the + * `LbTrafficExtension` resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field is overwritten if it is in the mask. If the + * user does not specify a mask, then all fields are overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Required. `LbTrafficExtension` resource being updated. + * + * Generated from protobuf field .google.cloud.networkservices.v1.LbTrafficExtension lb_traffic_extension = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetworkServices\V1\LbTrafficExtension|null + */ + public function getLbTrafficExtension() + { + return $this->lb_traffic_extension; + } + + public function hasLbTrafficExtension() + { + return isset($this->lb_traffic_extension); + } + + public function clearLbTrafficExtension() + { + unset($this->lb_traffic_extension); + } + + /** + * Required. `LbTrafficExtension` resource being updated. + * + * Generated from protobuf field .google.cloud.networkservices.v1.LbTrafficExtension lb_traffic_extension = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetworkServices\V1\LbTrafficExtension $var + * @return $this + */ + public function setLbTrafficExtension($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkServices\V1\LbTrafficExtension::class); + $this->lb_traffic_extension = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server can ignore + * the request if it has already been completed. The server guarantees + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, ignores the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server can ignore + * the request if it has already been completed. The server guarantees + * that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, ignores the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/UpdateMeshRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/UpdateMeshRequest.php new file mode 100644 index 000000000000..d3395efe3cad --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/UpdateMeshRequest.php @@ -0,0 +1,156 @@ +google.cloud.networkservices.v1.UpdateMeshRequest + */ +class UpdateMeshRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Field mask is used to specify the fields to be overwritten in the + * Mesh resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $update_mask = null; + /** + * Required. Updated Mesh resource. + * + * Generated from protobuf field .google.cloud.networkservices.v1.Mesh mesh = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $mesh = null; + + /** + * @param \Google\Cloud\NetworkServices\V1\Mesh $mesh Required. Updated Mesh resource. + * @param \Google\Protobuf\FieldMask $updateMask Optional. Field mask is used to specify the fields to be overwritten in the + * Mesh resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * @return \Google\Cloud\NetworkServices\V1\UpdateMeshRequest + * + * @experimental + */ + public static function build(\Google\Cloud\NetworkServices\V1\Mesh $mesh, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setMesh($mesh) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Optional. Field mask is used to specify the fields to be overwritten in the + * Mesh resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * @type \Google\Cloud\NetworkServices\V1\Mesh $mesh + * Required. Updated Mesh resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\Mesh::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Field mask is used to specify the fields to be overwritten in the + * Mesh resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Optional. Field mask is used to specify the fields to be overwritten in the + * Mesh resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Required. Updated Mesh resource. + * + * Generated from protobuf field .google.cloud.networkservices.v1.Mesh mesh = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetworkServices\V1\Mesh|null + */ + public function getMesh() + { + return $this->mesh; + } + + public function hasMesh() + { + return isset($this->mesh); + } + + public function clearMesh() + { + unset($this->mesh); + } + + /** + * Required. Updated Mesh resource. + * + * Generated from protobuf field .google.cloud.networkservices.v1.Mesh mesh = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetworkServices\V1\Mesh $var + * @return $this + */ + public function setMesh($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkServices\V1\Mesh::class); + $this->mesh = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/UpdateTcpRouteRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/UpdateTcpRouteRequest.php new file mode 100644 index 000000000000..217a1be3a5f8 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/UpdateTcpRouteRequest.php @@ -0,0 +1,156 @@ +google.cloud.networkservices.v1.UpdateTcpRouteRequest + */ +class UpdateTcpRouteRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Field mask is used to specify the fields to be overwritten in the + * TcpRoute resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $update_mask = null; + /** + * Required. Updated TcpRoute resource. + * + * Generated from protobuf field .google.cloud.networkservices.v1.TcpRoute tcp_route = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $tcp_route = null; + + /** + * @param \Google\Cloud\NetworkServices\V1\TcpRoute $tcpRoute Required. Updated TcpRoute resource. + * @param \Google\Protobuf\FieldMask $updateMask Optional. Field mask is used to specify the fields to be overwritten in the + * TcpRoute resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * @return \Google\Cloud\NetworkServices\V1\UpdateTcpRouteRequest + * + * @experimental + */ + public static function build(\Google\Cloud\NetworkServices\V1\TcpRoute $tcpRoute, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setTcpRoute($tcpRoute) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Optional. Field mask is used to specify the fields to be overwritten in the + * TcpRoute resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * @type \Google\Cloud\NetworkServices\V1\TcpRoute $tcp_route + * Required. Updated TcpRoute resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\TcpRoute::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Field mask is used to specify the fields to be overwritten in the + * TcpRoute resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Optional. Field mask is used to specify the fields to be overwritten in the + * TcpRoute resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Required. Updated TcpRoute resource. + * + * Generated from protobuf field .google.cloud.networkservices.v1.TcpRoute tcp_route = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetworkServices\V1\TcpRoute|null + */ + public function getTcpRoute() + { + return $this->tcp_route; + } + + public function hasTcpRoute() + { + return isset($this->tcp_route); + } + + public function clearTcpRoute() + { + unset($this->tcp_route); + } + + /** + * Required. Updated TcpRoute resource. + * + * Generated from protobuf field .google.cloud.networkservices.v1.TcpRoute tcp_route = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetworkServices\V1\TcpRoute $var + * @return $this + */ + public function setTcpRoute($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkServices\V1\TcpRoute::class); + $this->tcp_route = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/UpdateTlsRouteRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/UpdateTlsRouteRequest.php new file mode 100644 index 000000000000..ce62c4f6a851 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/UpdateTlsRouteRequest.php @@ -0,0 +1,156 @@ +google.cloud.networkservices.v1.UpdateTlsRouteRequest + */ +class UpdateTlsRouteRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Field mask is used to specify the fields to be overwritten in the + * TlsRoute resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $update_mask = null; + /** + * Required. Updated TlsRoute resource. + * + * Generated from protobuf field .google.cloud.networkservices.v1.TlsRoute tls_route = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $tls_route = null; + + /** + * @param \Google\Cloud\NetworkServices\V1\TlsRoute $tlsRoute Required. Updated TlsRoute resource. + * @param \Google\Protobuf\FieldMask $updateMask Optional. Field mask is used to specify the fields to be overwritten in the + * TlsRoute resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * @return \Google\Cloud\NetworkServices\V1\UpdateTlsRouteRequest + * + * @experimental + */ + public static function build(\Google\Cloud\NetworkServices\V1\TlsRoute $tlsRoute, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setTlsRoute($tlsRoute) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Optional. Field mask is used to specify the fields to be overwritten in the + * TlsRoute resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * @type \Google\Cloud\NetworkServices\V1\TlsRoute $tls_route + * Required. Updated TlsRoute resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Networkservices\V1\TlsRoute::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Field mask is used to specify the fields to be overwritten in the + * TlsRoute resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Optional. Field mask is used to specify the fields to be overwritten in the + * TlsRoute resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Required. Updated TlsRoute resource. + * + * Generated from protobuf field .google.cloud.networkservices.v1.TlsRoute tls_route = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\NetworkServices\V1\TlsRoute|null + */ + public function getTlsRoute() + { + return $this->tls_route; + } + + public function hasTlsRoute() + { + return isset($this->tls_route); + } + + public function clearTlsRoute() + { + unset($this->tls_route); + } + + /** + * Required. Updated TlsRoute resource. + * + * Generated from protobuf field .google.cloud.networkservices.v1.TlsRoute tls_route = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\NetworkServices\V1\TlsRoute $var + * @return $this + */ + public function setTlsRoute($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\NetworkServices\V1\TlsRoute::class); + $this->tls_route = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/create_lb_route_extension.php b/owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/create_lb_route_extension.php new file mode 100644 index 000000000000..a716c00416a3 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/create_lb_route_extension.php @@ -0,0 +1,176 @@ +setCelExpression($lbRouteExtensionExtensionChainsMatchConditionCelExpression); + $extension = (new Extension()) + ->setName($lbRouteExtensionExtensionChainsExtensionsName) + ->setService($lbRouteExtensionExtensionChainsExtensionsService); + $lbRouteExtensionExtensionChainsExtensions = [$extension,]; + $extensionChain = (new ExtensionChain()) + ->setName($lbRouteExtensionExtensionChainsName) + ->setMatchCondition($lbRouteExtensionExtensionChainsMatchCondition) + ->setExtensions($lbRouteExtensionExtensionChainsExtensions); + $lbRouteExtensionExtensionChains = [$extensionChain,]; + $lbRouteExtension = (new LbRouteExtension()) + ->setName($lbRouteExtensionName) + ->setForwardingRules($lbRouteExtensionForwardingRules) + ->setExtensionChains($lbRouteExtensionExtensionChains) + ->setLoadBalancingScheme($lbRouteExtensionLoadBalancingScheme); + $request = (new CreateLbRouteExtensionRequest()) + ->setParent($formattedParent) + ->setLbRouteExtensionId($lbRouteExtensionId) + ->setLbRouteExtension($lbRouteExtension); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $depServiceClient->createLbRouteExtension($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var LbRouteExtension $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = DepServiceClient::locationName('[PROJECT]', '[LOCATION]'); + $lbRouteExtensionId = '[LB_ROUTE_EXTENSION_ID]'; + $lbRouteExtensionName = '[NAME]'; + $lbRouteExtensionForwardingRulesElement = '[FORWARDING_RULES]'; + $lbRouteExtensionExtensionChainsName = '[NAME]'; + $lbRouteExtensionExtensionChainsMatchConditionCelExpression = '[CEL_EXPRESSION]'; + $lbRouteExtensionExtensionChainsExtensionsName = '[NAME]'; + $lbRouteExtensionExtensionChainsExtensionsService = '[SERVICE]'; + $lbRouteExtensionLoadBalancingScheme = LoadBalancingScheme::LOAD_BALANCING_SCHEME_UNSPECIFIED; + + create_lb_route_extension_sample( + $formattedParent, + $lbRouteExtensionId, + $lbRouteExtensionName, + $lbRouteExtensionForwardingRulesElement, + $lbRouteExtensionExtensionChainsName, + $lbRouteExtensionExtensionChainsMatchConditionCelExpression, + $lbRouteExtensionExtensionChainsExtensionsName, + $lbRouteExtensionExtensionChainsExtensionsService, + $lbRouteExtensionLoadBalancingScheme + ); +} +// [END networkservices_v1_generated_DepService_CreateLbRouteExtension_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/create_lb_traffic_extension.php b/owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/create_lb_traffic_extension.php new file mode 100644 index 000000000000..339156557e5e --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/create_lb_traffic_extension.php @@ -0,0 +1,177 @@ +setCelExpression($lbTrafficExtensionExtensionChainsMatchConditionCelExpression); + $extension = (new Extension()) + ->setName($lbTrafficExtensionExtensionChainsExtensionsName) + ->setService($lbTrafficExtensionExtensionChainsExtensionsService); + $lbTrafficExtensionExtensionChainsExtensions = [$extension,]; + $extensionChain = (new ExtensionChain()) + ->setName($lbTrafficExtensionExtensionChainsName) + ->setMatchCondition($lbTrafficExtensionExtensionChainsMatchCondition) + ->setExtensions($lbTrafficExtensionExtensionChainsExtensions); + $lbTrafficExtensionExtensionChains = [$extensionChain,]; + $lbTrafficExtension = (new LbTrafficExtension()) + ->setName($lbTrafficExtensionName) + ->setForwardingRules($lbTrafficExtensionForwardingRules) + ->setExtensionChains($lbTrafficExtensionExtensionChains) + ->setLoadBalancingScheme($lbTrafficExtensionLoadBalancingScheme); + $request = (new CreateLbTrafficExtensionRequest()) + ->setParent($formattedParent) + ->setLbTrafficExtensionId($lbTrafficExtensionId) + ->setLbTrafficExtension($lbTrafficExtension); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $depServiceClient->createLbTrafficExtension($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var LbTrafficExtension $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = DepServiceClient::locationName('[PROJECT]', '[LOCATION]'); + $lbTrafficExtensionId = '[LB_TRAFFIC_EXTENSION_ID]'; + $lbTrafficExtensionName = '[NAME]'; + $lbTrafficExtensionForwardingRulesElement = '[FORWARDING_RULES]'; + $lbTrafficExtensionExtensionChainsName = '[NAME]'; + $lbTrafficExtensionExtensionChainsMatchConditionCelExpression = '[CEL_EXPRESSION]'; + $lbTrafficExtensionExtensionChainsExtensionsName = '[NAME]'; + $lbTrafficExtensionExtensionChainsExtensionsService = '[SERVICE]'; + $lbTrafficExtensionLoadBalancingScheme = LoadBalancingScheme::LOAD_BALANCING_SCHEME_UNSPECIFIED; + + create_lb_traffic_extension_sample( + $formattedParent, + $lbTrafficExtensionId, + $lbTrafficExtensionName, + $lbTrafficExtensionForwardingRulesElement, + $lbTrafficExtensionExtensionChainsName, + $lbTrafficExtensionExtensionChainsMatchConditionCelExpression, + $lbTrafficExtensionExtensionChainsExtensionsName, + $lbTrafficExtensionExtensionChainsExtensionsService, + $lbTrafficExtensionLoadBalancingScheme + ); +} +// [END networkservices_v1_generated_DepService_CreateLbTrafficExtension_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/delete_lb_route_extension.php b/owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/delete_lb_route_extension.php new file mode 100644 index 000000000000..4cf15b782b0d --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/delete_lb_route_extension.php @@ -0,0 +1,86 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $depServiceClient->deleteLbRouteExtension($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = DepServiceClient::lbRouteExtensionName( + '[PROJECT]', + '[LOCATION]', + '[LB_ROUTE_EXTENSION]' + ); + + delete_lb_route_extension_sample($formattedName); +} +// [END networkservices_v1_generated_DepService_DeleteLbRouteExtension_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/delete_lb_traffic_extension.php b/owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/delete_lb_traffic_extension.php new file mode 100644 index 000000000000..4e02416bad2b --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/delete_lb_traffic_extension.php @@ -0,0 +1,86 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $depServiceClient->deleteLbTrafficExtension($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = DepServiceClient::lbTrafficExtensionName( + '[PROJECT]', + '[LOCATION]', + '[LB_TRAFFIC_EXTENSION]' + ); + + delete_lb_traffic_extension_sample($formattedName); +} +// [END networkservices_v1_generated_DepService_DeleteLbTrafficExtension_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/get_iam_policy.php b/owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/get_iam_policy.php new file mode 100644 index 000000000000..9832fc979d5e --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/get_iam_policy.php @@ -0,0 +1,72 @@ +setResource($resource); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $depServiceClient->getIamPolicy($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + + get_iam_policy_sample($resource); +} +// [END networkservices_v1_generated_DepService_GetIamPolicy_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/get_lb_route_extension.php b/owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/get_lb_route_extension.php new file mode 100644 index 000000000000..4e412ec7df38 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/get_lb_route_extension.php @@ -0,0 +1,77 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var LbRouteExtension $response */ + $response = $depServiceClient->getLbRouteExtension($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = DepServiceClient::lbRouteExtensionName( + '[PROJECT]', + '[LOCATION]', + '[LB_ROUTE_EXTENSION]' + ); + + get_lb_route_extension_sample($formattedName); +} +// [END networkservices_v1_generated_DepService_GetLbRouteExtension_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/get_lb_traffic_extension.php b/owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/get_lb_traffic_extension.php new file mode 100644 index 000000000000..aef664e5735a --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/get_lb_traffic_extension.php @@ -0,0 +1,77 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var LbTrafficExtension $response */ + $response = $depServiceClient->getLbTrafficExtension($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = DepServiceClient::lbTrafficExtensionName( + '[PROJECT]', + '[LOCATION]', + '[LB_TRAFFIC_EXTENSION]' + ); + + get_lb_traffic_extension_sample($formattedName); +} +// [END networkservices_v1_generated_DepService_GetLbTrafficExtension_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/get_location.php b/owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/get_location.php new file mode 100644 index 000000000000..81207391a882 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/get_location.php @@ -0,0 +1,57 @@ +getLocation($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END networkservices_v1_generated_DepService_GetLocation_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/list_lb_route_extensions.php b/owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/list_lb_route_extensions.php new file mode 100644 index 000000000000..16186e72a2d5 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/list_lb_route_extensions.php @@ -0,0 +1,78 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $depServiceClient->listLbRouteExtensions($request); + + /** @var LbRouteExtension $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = DepServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + list_lb_route_extensions_sample($formattedParent); +} +// [END networkservices_v1_generated_DepService_ListLbRouteExtensions_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/list_lb_traffic_extensions.php b/owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/list_lb_traffic_extensions.php new file mode 100644 index 000000000000..e9e8dc69c70a --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/list_lb_traffic_extensions.php @@ -0,0 +1,78 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $depServiceClient->listLbTrafficExtensions($request); + + /** @var LbTrafficExtension $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = DepServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + list_lb_traffic_extensions_sample($formattedParent); +} +// [END networkservices_v1_generated_DepService_ListLbTrafficExtensions_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/list_locations.php b/owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/list_locations.php new file mode 100644 index 000000000000..e59d3adb5090 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/list_locations.php @@ -0,0 +1,62 @@ +listLocations($request); + + /** @var Location $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END networkservices_v1_generated_DepService_ListLocations_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/set_iam_policy.php b/owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/set_iam_policy.php new file mode 100644 index 000000000000..0d46ca464538 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/set_iam_policy.php @@ -0,0 +1,77 @@ +setResource($resource) + ->setPolicy($policy); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $depServiceClient->setIamPolicy($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + + set_iam_policy_sample($resource); +} +// [END networkservices_v1_generated_DepService_SetIamPolicy_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/test_iam_permissions.php b/owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/test_iam_permissions.php new file mode 100644 index 000000000000..39b69eb6f9c8 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/test_iam_permissions.php @@ -0,0 +1,84 @@ +setResource($resource) + ->setPermissions($permissions); + + // Call the API and handle any network failures. + try { + /** @var TestIamPermissionsResponse $response */ + $response = $depServiceClient->testIamPermissions($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + $permissionsElement = '[PERMISSIONS]'; + + test_iam_permissions_sample($resource, $permissionsElement); +} +// [END networkservices_v1_generated_DepService_TestIamPermissions_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/update_lb_route_extension.php b/owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/update_lb_route_extension.php new file mode 100644 index 000000000000..7f1bc725487b --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/update_lb_route_extension.php @@ -0,0 +1,163 @@ +setCelExpression($lbRouteExtensionExtensionChainsMatchConditionCelExpression); + $extension = (new Extension()) + ->setName($lbRouteExtensionExtensionChainsExtensionsName) + ->setService($lbRouteExtensionExtensionChainsExtensionsService); + $lbRouteExtensionExtensionChainsExtensions = [$extension,]; + $extensionChain = (new ExtensionChain()) + ->setName($lbRouteExtensionExtensionChainsName) + ->setMatchCondition($lbRouteExtensionExtensionChainsMatchCondition) + ->setExtensions($lbRouteExtensionExtensionChainsExtensions); + $lbRouteExtensionExtensionChains = [$extensionChain,]; + $lbRouteExtension = (new LbRouteExtension()) + ->setName($lbRouteExtensionName) + ->setForwardingRules($lbRouteExtensionForwardingRules) + ->setExtensionChains($lbRouteExtensionExtensionChains) + ->setLoadBalancingScheme($lbRouteExtensionLoadBalancingScheme); + $request = (new UpdateLbRouteExtensionRequest()) + ->setLbRouteExtension($lbRouteExtension); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $depServiceClient->updateLbRouteExtension($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var LbRouteExtension $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $lbRouteExtensionName = '[NAME]'; + $lbRouteExtensionForwardingRulesElement = '[FORWARDING_RULES]'; + $lbRouteExtensionExtensionChainsName = '[NAME]'; + $lbRouteExtensionExtensionChainsMatchConditionCelExpression = '[CEL_EXPRESSION]'; + $lbRouteExtensionExtensionChainsExtensionsName = '[NAME]'; + $lbRouteExtensionExtensionChainsExtensionsService = '[SERVICE]'; + $lbRouteExtensionLoadBalancingScheme = LoadBalancingScheme::LOAD_BALANCING_SCHEME_UNSPECIFIED; + + update_lb_route_extension_sample( + $lbRouteExtensionName, + $lbRouteExtensionForwardingRulesElement, + $lbRouteExtensionExtensionChainsName, + $lbRouteExtensionExtensionChainsMatchConditionCelExpression, + $lbRouteExtensionExtensionChainsExtensionsName, + $lbRouteExtensionExtensionChainsExtensionsService, + $lbRouteExtensionLoadBalancingScheme + ); +} +// [END networkservices_v1_generated_DepService_UpdateLbRouteExtension_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/update_lb_traffic_extension.php b/owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/update_lb_traffic_extension.php new file mode 100644 index 000000000000..3d958ffd3f08 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/update_lb_traffic_extension.php @@ -0,0 +1,163 @@ +setCelExpression($lbTrafficExtensionExtensionChainsMatchConditionCelExpression); + $extension = (new Extension()) + ->setName($lbTrafficExtensionExtensionChainsExtensionsName) + ->setService($lbTrafficExtensionExtensionChainsExtensionsService); + $lbTrafficExtensionExtensionChainsExtensions = [$extension,]; + $extensionChain = (new ExtensionChain()) + ->setName($lbTrafficExtensionExtensionChainsName) + ->setMatchCondition($lbTrafficExtensionExtensionChainsMatchCondition) + ->setExtensions($lbTrafficExtensionExtensionChainsExtensions); + $lbTrafficExtensionExtensionChains = [$extensionChain,]; + $lbTrafficExtension = (new LbTrafficExtension()) + ->setName($lbTrafficExtensionName) + ->setForwardingRules($lbTrafficExtensionForwardingRules) + ->setExtensionChains($lbTrafficExtensionExtensionChains) + ->setLoadBalancingScheme($lbTrafficExtensionLoadBalancingScheme); + $request = (new UpdateLbTrafficExtensionRequest()) + ->setLbTrafficExtension($lbTrafficExtension); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $depServiceClient->updateLbTrafficExtension($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var LbTrafficExtension $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $lbTrafficExtensionName = '[NAME]'; + $lbTrafficExtensionForwardingRulesElement = '[FORWARDING_RULES]'; + $lbTrafficExtensionExtensionChainsName = '[NAME]'; + $lbTrafficExtensionExtensionChainsMatchConditionCelExpression = '[CEL_EXPRESSION]'; + $lbTrafficExtensionExtensionChainsExtensionsName = '[NAME]'; + $lbTrafficExtensionExtensionChainsExtensionsService = '[SERVICE]'; + $lbTrafficExtensionLoadBalancingScheme = LoadBalancingScheme::LOAD_BALANCING_SCHEME_UNSPECIFIED; + + update_lb_traffic_extension_sample( + $lbTrafficExtensionName, + $lbTrafficExtensionForwardingRulesElement, + $lbTrafficExtensionExtensionChainsName, + $lbTrafficExtensionExtensionChainsMatchConditionCelExpression, + $lbTrafficExtensionExtensionChainsExtensionsName, + $lbTrafficExtensionExtensionChainsExtensionsService, + $lbTrafficExtensionLoadBalancingScheme + ); +} +// [END networkservices_v1_generated_DepService_UpdateLbTrafficExtension_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/create_endpoint_policy.php b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/create_endpoint_policy.php new file mode 100644 index 000000000000..a08bbf2e9130 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/create_endpoint_policy.php @@ -0,0 +1,111 @@ +setName($endpointPolicyName) + ->setType($endpointPolicyType) + ->setEndpointMatcher($endpointPolicyEndpointMatcher); + $request = (new CreateEndpointPolicyRequest()) + ->setParent($formattedParent) + ->setEndpointPolicyId($endpointPolicyId) + ->setEndpointPolicy($endpointPolicy); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $networkServicesClient->createEndpointPolicy($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var EndpointPolicy $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = NetworkServicesClient::locationName('[PROJECT]', '[LOCATION]'); + $endpointPolicyId = '[ENDPOINT_POLICY_ID]'; + $endpointPolicyName = '[NAME]'; + $endpointPolicyType = EndpointPolicyType::ENDPOINT_POLICY_TYPE_UNSPECIFIED; + + create_endpoint_policy_sample( + $formattedParent, + $endpointPolicyId, + $endpointPolicyName, + $endpointPolicyType + ); +} +// [END networkservices_v1_generated_NetworkServices_CreateEndpointPolicy_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/create_gateway.php b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/create_gateway.php new file mode 100644 index 000000000000..53d9241884f8 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/create_gateway.php @@ -0,0 +1,120 @@ +`. + * @param int $gatewayPortsElement One or more ports that the Gateway must receive traffic on. The + * proxy binds to the ports specified. Gateway listen on 0.0.0.0 on the ports + * specified below. + * @param string $gatewayScope Immutable. Scope determines how configuration across multiple + * Gateway instances are merged. The configuration for multiple Gateway + * instances with the same scope will be merged as presented as a single + * coniguration to the proxy/load balancer. + * + * Max length 64 characters. + * Scope should start with a letter and can only have letters, numbers, + * hyphens. + */ +function create_gateway_sample( + string $formattedParent, + string $gatewayId, + string $gatewayName, + int $gatewayPortsElement, + string $gatewayScope +): void { + // Create a client. + $networkServicesClient = new NetworkServicesClient(); + + // Prepare the request message. + $gatewayPorts = [$gatewayPortsElement,]; + $gateway = (new Gateway()) + ->setName($gatewayName) + ->setPorts($gatewayPorts) + ->setScope($gatewayScope); + $request = (new CreateGatewayRequest()) + ->setParent($formattedParent) + ->setGatewayId($gatewayId) + ->setGateway($gateway); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $networkServicesClient->createGateway($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Gateway $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = NetworkServicesClient::locationName('[PROJECT]', '[LOCATION]'); + $gatewayId = '[GATEWAY_ID]'; + $gatewayName = '[NAME]'; + $gatewayPortsElement = 0; + $gatewayScope = '[SCOPE]'; + + create_gateway_sample( + $formattedParent, + $gatewayId, + $gatewayName, + $gatewayPortsElement, + $gatewayScope + ); +} +// [END networkservices_v1_generated_NetworkServices_CreateGateway_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/create_grpc_route.php b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/create_grpc_route.php new file mode 100644 index 000000000000..3b447df5c8bc --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/create_grpc_route.php @@ -0,0 +1,143 @@ +` + * @param string $grpcRouteHostnamesElement Service hostnames with an optional port for which this route + * describes traffic. + * + * Format: [:] + * + * Hostname is the fully qualified domain name of a network host. This matches + * the RFC 1123 definition of a hostname with 2 notable exceptions: + * - IPs are not allowed. + * - A hostname may be prefixed with a wildcard label (`*.`). The wildcard + * label must appear by itself as the first label. + * + * Hostname can be "precise" which is a domain name without the terminating + * dot of a network host (e.g. `foo.example.com`) or "wildcard", which is a + * domain name prefixed with a single wildcard label (e.g. `*.example.com`). + * + * Note that as per RFC1035 and RFC1123, a label must consist of lower case + * alphanumeric characters or '-', and must start and end with an alphanumeric + * character. No other punctuation is allowed. + * + * The routes associated with a Mesh or Gateway must have unique hostnames. If + * you attempt to attach multiple routes with conflicting hostnames, the + * configuration will be rejected. + * + * For example, while it is acceptable for routes for the hostnames + * `*.foo.bar.com` and `*.bar.com` to be associated with the same route, it is + * not possible to associate two routes both with `*.bar.com` or both with + * `bar.com`. + * + * If a port is specified, then gRPC clients must use the channel URI with the + * port to match this rule (i.e. "xds:///service:123"), otherwise they must + * supply the URI without a port (i.e. "xds:///service"). + */ +function create_grpc_route_sample( + string $formattedParent, + string $grpcRouteId, + string $grpcRouteName, + string $grpcRouteHostnamesElement +): void { + // Create a client. + $networkServicesClient = new NetworkServicesClient(); + + // Prepare the request message. + $grpcRouteHostnames = [$grpcRouteHostnamesElement,]; + $grpcRouteRulesAction = new RouteAction(); + $routeRule = (new RouteRule()) + ->setAction($grpcRouteRulesAction); + $grpcRouteRules = [$routeRule,]; + $grpcRoute = (new GrpcRoute()) + ->setName($grpcRouteName) + ->setHostnames($grpcRouteHostnames) + ->setRules($grpcRouteRules); + $request = (new CreateGrpcRouteRequest()) + ->setParent($formattedParent) + ->setGrpcRouteId($grpcRouteId) + ->setGrpcRoute($grpcRoute); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $networkServicesClient->createGrpcRoute($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var GrpcRoute $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = NetworkServicesClient::locationName('[PROJECT]', '[LOCATION]'); + $grpcRouteId = '[GRPC_ROUTE_ID]'; + $grpcRouteName = '[NAME]'; + $grpcRouteHostnamesElement = '[HOSTNAMES]'; + + create_grpc_route_sample( + $formattedParent, + $grpcRouteId, + $grpcRouteName, + $grpcRouteHostnamesElement + ); +} +// [END networkservices_v1_generated_NetworkServices_CreateGrpcRoute_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/create_http_route.php b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/create_http_route.php new file mode 100644 index 000000000000..3af6b03cba9d --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/create_http_route.php @@ -0,0 +1,132 @@ +`. + * @param string $httpRouteHostnamesElement Hostnames define a set of hosts that should match against the + * HTTP host header to select a HttpRoute to process the request. Hostname is + * the fully qualified domain name of a network host, as defined by RFC 1123 + * with the exception that: + * - IPs are not allowed. + * - A hostname may be prefixed with a wildcard label (`*.`). The wildcard + * label must appear by itself as the first label. + * + * Hostname can be "precise" which is a domain name without the terminating + * dot of a network host (e.g. `foo.example.com`) or "wildcard", which is a + * domain name prefixed with a single wildcard label (e.g. `*.example.com`). + * + * Note that as per RFC1035 and RFC1123, a label must consist of lower case + * alphanumeric characters or '-', and must start and end with an alphanumeric + * character. No other punctuation is allowed. + * + * The routes associated with a Mesh or Gateways must have unique hostnames. + * If you attempt to attach multiple routes with conflicting hostnames, + * the configuration will be rejected. + * + * For example, while it is acceptable for routes for the hostnames + * `*.foo.bar.com` and `*.bar.com` to be associated with the same Mesh (or + * Gateways under the same scope), it is not possible to associate two routes + * both with `*.bar.com` or both with `bar.com`. + */ +function create_http_route_sample( + string $formattedParent, + string $httpRouteId, + string $httpRouteName, + string $httpRouteHostnamesElement +): void { + // Create a client. + $networkServicesClient = new NetworkServicesClient(); + + // Prepare the request message. + $httpRouteHostnames = [$httpRouteHostnamesElement,]; + $httpRouteRules = [new RouteRule()]; + $httpRoute = (new HttpRoute()) + ->setName($httpRouteName) + ->setHostnames($httpRouteHostnames) + ->setRules($httpRouteRules); + $request = (new CreateHttpRouteRequest()) + ->setParent($formattedParent) + ->setHttpRouteId($httpRouteId) + ->setHttpRoute($httpRoute); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $networkServicesClient->createHttpRoute($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var HttpRoute $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = NetworkServicesClient::locationName('[PROJECT]', '[LOCATION]'); + $httpRouteId = '[HTTP_ROUTE_ID]'; + $httpRouteName = '[NAME]'; + $httpRouteHostnamesElement = '[HOSTNAMES]'; + + create_http_route_sample( + $formattedParent, + $httpRouteId, + $httpRouteName, + $httpRouteHostnamesElement + ); +} +// [END networkservices_v1_generated_NetworkServices_CreateHttpRoute_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/create_mesh.php b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/create_mesh.php new file mode 100644 index 000000000000..2a31c542d016 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/create_mesh.php @@ -0,0 +1,93 @@ +`. + */ +function create_mesh_sample(string $formattedParent, string $meshId, string $meshName): void +{ + // Create a client. + $networkServicesClient = new NetworkServicesClient(); + + // Prepare the request message. + $mesh = (new Mesh()) + ->setName($meshName); + $request = (new CreateMeshRequest()) + ->setParent($formattedParent) + ->setMeshId($meshId) + ->setMesh($mesh); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $networkServicesClient->createMesh($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Mesh $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = NetworkServicesClient::locationName('[PROJECT]', '[LOCATION]'); + $meshId = '[MESH_ID]'; + $meshName = '[NAME]'; + + create_mesh_sample($formattedParent, $meshId, $meshName); +} +// [END networkservices_v1_generated_NetworkServices_CreateMesh_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/create_service_binding.php b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/create_service_binding.php new file mode 100644 index 000000000000..acdc290edfec --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/create_service_binding.php @@ -0,0 +1,106 @@ +setName($serviceBindingName) + ->setService($serviceBindingService); + $request = (new CreateServiceBindingRequest()) + ->setParent($formattedParent) + ->setServiceBindingId($serviceBindingId) + ->setServiceBinding($serviceBinding); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $networkServicesClient->createServiceBinding($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var ServiceBinding $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = NetworkServicesClient::locationName('[PROJECT]', '[LOCATION]'); + $serviceBindingId = '[SERVICE_BINDING_ID]'; + $serviceBindingName = '[NAME]'; + $serviceBindingService = '[SERVICE]'; + + create_service_binding_sample( + $formattedParent, + $serviceBindingId, + $serviceBindingName, + $serviceBindingService + ); +} +// [END networkservices_v1_generated_NetworkServices_CreateServiceBinding_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/create_tcp_route.php b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/create_tcp_route.php new file mode 100644 index 000000000000..58d1dc8d5841 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/create_tcp_route.php @@ -0,0 +1,103 @@ +`. + */ +function create_tcp_route_sample( + string $formattedParent, + string $tcpRouteId, + string $tcpRouteName +): void { + // Create a client. + $networkServicesClient = new NetworkServicesClient(); + + // Prepare the request message. + $tcpRouteRulesAction = new RouteAction(); + $routeRule = (new RouteRule()) + ->setAction($tcpRouteRulesAction); + $tcpRouteRules = [$routeRule,]; + $tcpRoute = (new TcpRoute()) + ->setName($tcpRouteName) + ->setRules($tcpRouteRules); + $request = (new CreateTcpRouteRequest()) + ->setParent($formattedParent) + ->setTcpRouteId($tcpRouteId) + ->setTcpRoute($tcpRoute); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $networkServicesClient->createTcpRoute($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var TcpRoute $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = NetworkServicesClient::locationName('[PROJECT]', '[LOCATION]'); + $tcpRouteId = '[TCP_ROUTE_ID]'; + $tcpRouteName = '[NAME]'; + + create_tcp_route_sample($formattedParent, $tcpRouteId, $tcpRouteName); +} +// [END networkservices_v1_generated_NetworkServices_CreateTcpRoute_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/create_tls_route.php b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/create_tls_route.php new file mode 100644 index 000000000000..fd15f0e7108a --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/create_tls_route.php @@ -0,0 +1,124 @@ +`. + * @param string $formattedTlsRouteRulesActionDestinationsServiceName The URL of a BackendService to route traffic to. Please see + * {@see NetworkServicesClient::backendServiceName()} for help formatting this field. + */ +function create_tls_route_sample( + string $formattedParent, + string $tlsRouteId, + string $tlsRouteName, + string $formattedTlsRouteRulesActionDestinationsServiceName +): void { + // Create a client. + $networkServicesClient = new NetworkServicesClient(); + + // Prepare the request message. + $tlsRouteRulesMatches = [new RouteMatch()]; + $routeDestination = (new RouteDestination()) + ->setServiceName($formattedTlsRouteRulesActionDestinationsServiceName); + $tlsRouteRulesActionDestinations = [$routeDestination,]; + $tlsRouteRulesAction = (new RouteAction()) + ->setDestinations($tlsRouteRulesActionDestinations); + $routeRule = (new RouteRule()) + ->setMatches($tlsRouteRulesMatches) + ->setAction($tlsRouteRulesAction); + $tlsRouteRules = [$routeRule,]; + $tlsRoute = (new TlsRoute()) + ->setName($tlsRouteName) + ->setRules($tlsRouteRules); + $request = (new CreateTlsRouteRequest()) + ->setParent($formattedParent) + ->setTlsRouteId($tlsRouteId) + ->setTlsRoute($tlsRoute); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $networkServicesClient->createTlsRoute($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var TlsRoute $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = NetworkServicesClient::locationName('[PROJECT]', '[LOCATION]'); + $tlsRouteId = '[TLS_ROUTE_ID]'; + $tlsRouteName = '[NAME]'; + $formattedTlsRouteRulesActionDestinationsServiceName = NetworkServicesClient::backendServiceName( + '[PROJECT]', + '[LOCATION]', + '[BACKEND_SERVICE]' + ); + + create_tls_route_sample( + $formattedParent, + $tlsRouteId, + $tlsRouteName, + $formattedTlsRouteRulesActionDestinationsServiceName + ); +} +// [END networkservices_v1_generated_NetworkServices_CreateTlsRoute_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/delete_endpoint_policy.php b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/delete_endpoint_policy.php new file mode 100644 index 000000000000..21aa166606a1 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/delete_endpoint_policy.php @@ -0,0 +1,85 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $networkServicesClient->deleteEndpointPolicy($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NetworkServicesClient::endpointPolicyName( + '[PROJECT]', + '[LOCATION]', + '[ENDPOINT_POLICY]' + ); + + delete_endpoint_policy_sample($formattedName); +} +// [END networkservices_v1_generated_NetworkServices_DeleteEndpointPolicy_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/delete_gateway.php b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/delete_gateway.php new file mode 100644 index 000000000000..9243f92a4482 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/delete_gateway.php @@ -0,0 +1,81 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $networkServicesClient->deleteGateway($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NetworkServicesClient::gatewayName('[PROJECT]', '[LOCATION]', '[GATEWAY]'); + + delete_gateway_sample($formattedName); +} +// [END networkservices_v1_generated_NetworkServices_DeleteGateway_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/delete_grpc_route.php b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/delete_grpc_route.php new file mode 100644 index 000000000000..8e0fbf43f063 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/delete_grpc_route.php @@ -0,0 +1,81 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $networkServicesClient->deleteGrpcRoute($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NetworkServicesClient::grpcRouteName('[PROJECT]', '[LOCATION]', '[GRPC_ROUTE]'); + + delete_grpc_route_sample($formattedName); +} +// [END networkservices_v1_generated_NetworkServices_DeleteGrpcRoute_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/delete_http_route.php b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/delete_http_route.php new file mode 100644 index 000000000000..1025e1ed8414 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/delete_http_route.php @@ -0,0 +1,81 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $networkServicesClient->deleteHttpRoute($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NetworkServicesClient::httpRouteName('[PROJECT]', '[LOCATION]', '[HTTP_ROUTE]'); + + delete_http_route_sample($formattedName); +} +// [END networkservices_v1_generated_NetworkServices_DeleteHttpRoute_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/delete_mesh.php b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/delete_mesh.php new file mode 100644 index 000000000000..0cc75a1cc66f --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/delete_mesh.php @@ -0,0 +1,81 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $networkServicesClient->deleteMesh($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NetworkServicesClient::meshName('[PROJECT]', '[LOCATION]', '[MESH]'); + + delete_mesh_sample($formattedName); +} +// [END networkservices_v1_generated_NetworkServices_DeleteMesh_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/delete_service_binding.php b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/delete_service_binding.php new file mode 100644 index 000000000000..fa3f76daeb3c --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/delete_service_binding.php @@ -0,0 +1,85 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $networkServicesClient->deleteServiceBinding($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NetworkServicesClient::serviceBindingName( + '[PROJECT]', + '[LOCATION]', + '[SERVICE_BINDING]' + ); + + delete_service_binding_sample($formattedName); +} +// [END networkservices_v1_generated_NetworkServices_DeleteServiceBinding_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/delete_tcp_route.php b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/delete_tcp_route.php new file mode 100644 index 000000000000..b2665659f782 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/delete_tcp_route.php @@ -0,0 +1,81 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $networkServicesClient->deleteTcpRoute($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NetworkServicesClient::tcpRouteName('[PROJECT]', '[LOCATION]', '[TCP_ROUTE]'); + + delete_tcp_route_sample($formattedName); +} +// [END networkservices_v1_generated_NetworkServices_DeleteTcpRoute_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/delete_tls_route.php b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/delete_tls_route.php new file mode 100644 index 000000000000..fc163b20db69 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/delete_tls_route.php @@ -0,0 +1,81 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $networkServicesClient->deleteTlsRoute($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NetworkServicesClient::tlsRouteName('[PROJECT]', '[LOCATION]', '[TLS_ROUTE]'); + + delete_tls_route_sample($formattedName); +} +// [END networkservices_v1_generated_NetworkServices_DeleteTlsRoute_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/get_endpoint_policy.php b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/get_endpoint_policy.php new file mode 100644 index 000000000000..dd6ee4b3123e --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/get_endpoint_policy.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var EndpointPolicy $response */ + $response = $networkServicesClient->getEndpointPolicy($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NetworkServicesClient::endpointPolicyName( + '[PROJECT]', + '[LOCATION]', + '[ENDPOINT_POLICY]' + ); + + get_endpoint_policy_sample($formattedName); +} +// [END networkservices_v1_generated_NetworkServices_GetEndpointPolicy_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/get_gateway.php b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/get_gateway.php new file mode 100644 index 000000000000..72248e7ae0e1 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/get_gateway.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Gateway $response */ + $response = $networkServicesClient->getGateway($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NetworkServicesClient::gatewayName('[PROJECT]', '[LOCATION]', '[GATEWAY]'); + + get_gateway_sample($formattedName); +} +// [END networkservices_v1_generated_NetworkServices_GetGateway_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/get_grpc_route.php b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/get_grpc_route.php new file mode 100644 index 000000000000..c4291a78065d --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/get_grpc_route.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var GrpcRoute $response */ + $response = $networkServicesClient->getGrpcRoute($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NetworkServicesClient::grpcRouteName('[PROJECT]', '[LOCATION]', '[GRPC_ROUTE]'); + + get_grpc_route_sample($formattedName); +} +// [END networkservices_v1_generated_NetworkServices_GetGrpcRoute_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/get_http_route.php b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/get_http_route.php new file mode 100644 index 000000000000..f96e9556d53e --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/get_http_route.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var HttpRoute $response */ + $response = $networkServicesClient->getHttpRoute($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NetworkServicesClient::httpRouteName('[PROJECT]', '[LOCATION]', '[HTTP_ROUTE]'); + + get_http_route_sample($formattedName); +} +// [END networkservices_v1_generated_NetworkServices_GetHttpRoute_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/get_iam_policy.php b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/get_iam_policy.php new file mode 100644 index 000000000000..d6c6cdf8d8bf --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/get_iam_policy.php @@ -0,0 +1,72 @@ +setResource($resource); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $networkServicesClient->getIamPolicy($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + + get_iam_policy_sample($resource); +} +// [END networkservices_v1_generated_NetworkServices_GetIamPolicy_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/get_location.php b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/get_location.php new file mode 100644 index 000000000000..34b662d77f10 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/get_location.php @@ -0,0 +1,57 @@ +getLocation($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END networkservices_v1_generated_NetworkServices_GetLocation_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/get_mesh.php b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/get_mesh.php new file mode 100644 index 000000000000..556f0075b79d --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/get_mesh.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Mesh $response */ + $response = $networkServicesClient->getMesh($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NetworkServicesClient::meshName('[PROJECT]', '[LOCATION]', '[MESH]'); + + get_mesh_sample($formattedName); +} +// [END networkservices_v1_generated_NetworkServices_GetMesh_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/get_service_binding.php b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/get_service_binding.php new file mode 100644 index 000000000000..89a73a29f6c5 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/get_service_binding.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var ServiceBinding $response */ + $response = $networkServicesClient->getServiceBinding($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NetworkServicesClient::serviceBindingName( + '[PROJECT]', + '[LOCATION]', + '[SERVICE_BINDING]' + ); + + get_service_binding_sample($formattedName); +} +// [END networkservices_v1_generated_NetworkServices_GetServiceBinding_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/get_tcp_route.php b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/get_tcp_route.php new file mode 100644 index 000000000000..dc5e487b9a95 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/get_tcp_route.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var TcpRoute $response */ + $response = $networkServicesClient->getTcpRoute($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NetworkServicesClient::tcpRouteName('[PROJECT]', '[LOCATION]', '[TCP_ROUTE]'); + + get_tcp_route_sample($formattedName); +} +// [END networkservices_v1_generated_NetworkServices_GetTcpRoute_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/get_tls_route.php b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/get_tls_route.php new file mode 100644 index 000000000000..91b87307f61a --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/get_tls_route.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var TlsRoute $response */ + $response = $networkServicesClient->getTlsRoute($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NetworkServicesClient::tlsRouteName('[PROJECT]', '[LOCATION]', '[TLS_ROUTE]'); + + get_tls_route_sample($formattedName); +} +// [END networkservices_v1_generated_NetworkServices_GetTlsRoute_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/list_endpoint_policies.php b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/list_endpoint_policies.php new file mode 100644 index 000000000000..b0cfae488ffc --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/list_endpoint_policies.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $networkServicesClient->listEndpointPolicies($request); + + /** @var EndpointPolicy $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = NetworkServicesClient::locationName('[PROJECT]', '[LOCATION]'); + + list_endpoint_policies_sample($formattedParent); +} +// [END networkservices_v1_generated_NetworkServices_ListEndpointPolicies_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/list_gateways.php b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/list_gateways.php new file mode 100644 index 000000000000..403719c5013e --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/list_gateways.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $networkServicesClient->listGateways($request); + + /** @var Gateway $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = NetworkServicesClient::locationName('[PROJECT]', '[LOCATION]'); + + list_gateways_sample($formattedParent); +} +// [END networkservices_v1_generated_NetworkServices_ListGateways_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/list_grpc_routes.php b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/list_grpc_routes.php new file mode 100644 index 000000000000..fb8f6926291e --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/list_grpc_routes.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $networkServicesClient->listGrpcRoutes($request); + + /** @var GrpcRoute $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = NetworkServicesClient::locationName('[PROJECT]', '[LOCATION]'); + + list_grpc_routes_sample($formattedParent); +} +// [END networkservices_v1_generated_NetworkServices_ListGrpcRoutes_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/list_http_routes.php b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/list_http_routes.php new file mode 100644 index 000000000000..da2023ae07df --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/list_http_routes.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $networkServicesClient->listHttpRoutes($request); + + /** @var HttpRoute $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = NetworkServicesClient::locationName('[PROJECT]', '[LOCATION]'); + + list_http_routes_sample($formattedParent); +} +// [END networkservices_v1_generated_NetworkServices_ListHttpRoutes_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/list_locations.php b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/list_locations.php new file mode 100644 index 000000000000..0a1a7a1f1e3f --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/list_locations.php @@ -0,0 +1,62 @@ +listLocations($request); + + /** @var Location $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END networkservices_v1_generated_NetworkServices_ListLocations_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/list_meshes.php b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/list_meshes.php new file mode 100644 index 000000000000..34f29c274347 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/list_meshes.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $networkServicesClient->listMeshes($request); + + /** @var Mesh $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = NetworkServicesClient::locationName('[PROJECT]', '[LOCATION]'); + + list_meshes_sample($formattedParent); +} +// [END networkservices_v1_generated_NetworkServices_ListMeshes_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/list_service_bindings.php b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/list_service_bindings.php new file mode 100644 index 000000000000..a86408bd6943 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/list_service_bindings.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $networkServicesClient->listServiceBindings($request); + + /** @var ServiceBinding $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = NetworkServicesClient::locationName('[PROJECT]', '[LOCATION]'); + + list_service_bindings_sample($formattedParent); +} +// [END networkservices_v1_generated_NetworkServices_ListServiceBindings_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/list_tcp_routes.php b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/list_tcp_routes.php new file mode 100644 index 000000000000..1655f17e99d1 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/list_tcp_routes.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $networkServicesClient->listTcpRoutes($request); + + /** @var TcpRoute $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = NetworkServicesClient::locationName('[PROJECT]', '[LOCATION]'); + + list_tcp_routes_sample($formattedParent); +} +// [END networkservices_v1_generated_NetworkServices_ListTcpRoutes_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/list_tls_routes.php b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/list_tls_routes.php new file mode 100644 index 000000000000..2ea399d74385 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/list_tls_routes.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $networkServicesClient->listTlsRoutes($request); + + /** @var TlsRoute $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = NetworkServicesClient::locationName('[PROJECT]', '[LOCATION]'); + + list_tls_routes_sample($formattedParent); +} +// [END networkservices_v1_generated_NetworkServices_ListTlsRoutes_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/set_iam_policy.php b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/set_iam_policy.php new file mode 100644 index 000000000000..360d9e41c521 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/set_iam_policy.php @@ -0,0 +1,77 @@ +setResource($resource) + ->setPolicy($policy); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $networkServicesClient->setIamPolicy($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + + set_iam_policy_sample($resource); +} +// [END networkservices_v1_generated_NetworkServices_SetIamPolicy_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/test_iam_permissions.php b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/test_iam_permissions.php new file mode 100644 index 000000000000..18aad4d95f00 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/test_iam_permissions.php @@ -0,0 +1,84 @@ +setResource($resource) + ->setPermissions($permissions); + + // Call the API and handle any network failures. + try { + /** @var TestIamPermissionsResponse $response */ + $response = $networkServicesClient->testIamPermissions($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + $permissionsElement = '[PERMISSIONS]'; + + test_iam_permissions_sample($resource, $permissionsElement); +} +// [END networkservices_v1_generated_NetworkServices_TestIamPermissions_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/update_endpoint_policy.php b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/update_endpoint_policy.php new file mode 100644 index 000000000000..15b809ac404f --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/update_endpoint_policy.php @@ -0,0 +1,93 @@ +setName($endpointPolicyName) + ->setType($endpointPolicyType) + ->setEndpointMatcher($endpointPolicyEndpointMatcher); + $request = (new UpdateEndpointPolicyRequest()) + ->setEndpointPolicy($endpointPolicy); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $networkServicesClient->updateEndpointPolicy($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var EndpointPolicy $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $endpointPolicyName = '[NAME]'; + $endpointPolicyType = EndpointPolicyType::ENDPOINT_POLICY_TYPE_UNSPECIFIED; + + update_endpoint_policy_sample($endpointPolicyName, $endpointPolicyType); +} +// [END networkservices_v1_generated_NetworkServices_UpdateEndpointPolicy_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/update_gateway.php b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/update_gateway.php new file mode 100644 index 000000000000..d86d940c7619 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/update_gateway.php @@ -0,0 +1,104 @@ +`. + * @param int $gatewayPortsElement One or more ports that the Gateway must receive traffic on. The + * proxy binds to the ports specified. Gateway listen on 0.0.0.0 on the ports + * specified below. + * @param string $gatewayScope Immutable. Scope determines how configuration across multiple + * Gateway instances are merged. The configuration for multiple Gateway + * instances with the same scope will be merged as presented as a single + * coniguration to the proxy/load balancer. + * + * Max length 64 characters. + * Scope should start with a letter and can only have letters, numbers, + * hyphens. + */ +function update_gateway_sample( + string $gatewayName, + int $gatewayPortsElement, + string $gatewayScope +): void { + // Create a client. + $networkServicesClient = new NetworkServicesClient(); + + // Prepare the request message. + $gatewayPorts = [$gatewayPortsElement,]; + $gateway = (new Gateway()) + ->setName($gatewayName) + ->setPorts($gatewayPorts) + ->setScope($gatewayScope); + $request = (new UpdateGatewayRequest()) + ->setGateway($gateway); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $networkServicesClient->updateGateway($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Gateway $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $gatewayName = '[NAME]'; + $gatewayPortsElement = 0; + $gatewayScope = '[SCOPE]'; + + update_gateway_sample($gatewayName, $gatewayPortsElement, $gatewayScope); +} +// [END networkservices_v1_generated_NetworkServices_UpdateGateway_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/update_grpc_route.php b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/update_grpc_route.php new file mode 100644 index 000000000000..cb1507ecafa9 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/update_grpc_route.php @@ -0,0 +1,126 @@ +` + * @param string $grpcRouteHostnamesElement Service hostnames with an optional port for which this route + * describes traffic. + * + * Format: [:] + * + * Hostname is the fully qualified domain name of a network host. This matches + * the RFC 1123 definition of a hostname with 2 notable exceptions: + * - IPs are not allowed. + * - A hostname may be prefixed with a wildcard label (`*.`). The wildcard + * label must appear by itself as the first label. + * + * Hostname can be "precise" which is a domain name without the terminating + * dot of a network host (e.g. `foo.example.com`) or "wildcard", which is a + * domain name prefixed with a single wildcard label (e.g. `*.example.com`). + * + * Note that as per RFC1035 and RFC1123, a label must consist of lower case + * alphanumeric characters or '-', and must start and end with an alphanumeric + * character. No other punctuation is allowed. + * + * The routes associated with a Mesh or Gateway must have unique hostnames. If + * you attempt to attach multiple routes with conflicting hostnames, the + * configuration will be rejected. + * + * For example, while it is acceptable for routes for the hostnames + * `*.foo.bar.com` and `*.bar.com` to be associated with the same route, it is + * not possible to associate two routes both with `*.bar.com` or both with + * `bar.com`. + * + * If a port is specified, then gRPC clients must use the channel URI with the + * port to match this rule (i.e. "xds:///service:123"), otherwise they must + * supply the URI without a port (i.e. "xds:///service"). + */ +function update_grpc_route_sample(string $grpcRouteName, string $grpcRouteHostnamesElement): void +{ + // Create a client. + $networkServicesClient = new NetworkServicesClient(); + + // Prepare the request message. + $grpcRouteHostnames = [$grpcRouteHostnamesElement,]; + $grpcRouteRulesAction = new RouteAction(); + $routeRule = (new RouteRule()) + ->setAction($grpcRouteRulesAction); + $grpcRouteRules = [$routeRule,]; + $grpcRoute = (new GrpcRoute()) + ->setName($grpcRouteName) + ->setHostnames($grpcRouteHostnames) + ->setRules($grpcRouteRules); + $request = (new UpdateGrpcRouteRequest()) + ->setGrpcRoute($grpcRoute); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $networkServicesClient->updateGrpcRoute($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var GrpcRoute $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $grpcRouteName = '[NAME]'; + $grpcRouteHostnamesElement = '[HOSTNAMES]'; + + update_grpc_route_sample($grpcRouteName, $grpcRouteHostnamesElement); +} +// [END networkservices_v1_generated_NetworkServices_UpdateGrpcRoute_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/update_http_route.php b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/update_http_route.php new file mode 100644 index 000000000000..eac28fb201f4 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/update_http_route.php @@ -0,0 +1,115 @@ +`. + * @param string $httpRouteHostnamesElement Hostnames define a set of hosts that should match against the + * HTTP host header to select a HttpRoute to process the request. Hostname is + * the fully qualified domain name of a network host, as defined by RFC 1123 + * with the exception that: + * - IPs are not allowed. + * - A hostname may be prefixed with a wildcard label (`*.`). The wildcard + * label must appear by itself as the first label. + * + * Hostname can be "precise" which is a domain name without the terminating + * dot of a network host (e.g. `foo.example.com`) or "wildcard", which is a + * domain name prefixed with a single wildcard label (e.g. `*.example.com`). + * + * Note that as per RFC1035 and RFC1123, a label must consist of lower case + * alphanumeric characters or '-', and must start and end with an alphanumeric + * character. No other punctuation is allowed. + * + * The routes associated with a Mesh or Gateways must have unique hostnames. + * If you attempt to attach multiple routes with conflicting hostnames, + * the configuration will be rejected. + * + * For example, while it is acceptable for routes for the hostnames + * `*.foo.bar.com` and `*.bar.com` to be associated with the same Mesh (or + * Gateways under the same scope), it is not possible to associate two routes + * both with `*.bar.com` or both with `bar.com`. + */ +function update_http_route_sample(string $httpRouteName, string $httpRouteHostnamesElement): void +{ + // Create a client. + $networkServicesClient = new NetworkServicesClient(); + + // Prepare the request message. + $httpRouteHostnames = [$httpRouteHostnamesElement,]; + $httpRouteRules = [new RouteRule()]; + $httpRoute = (new HttpRoute()) + ->setName($httpRouteName) + ->setHostnames($httpRouteHostnames) + ->setRules($httpRouteRules); + $request = (new UpdateHttpRouteRequest()) + ->setHttpRoute($httpRoute); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $networkServicesClient->updateHttpRoute($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var HttpRoute $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $httpRouteName = '[NAME]'; + $httpRouteHostnamesElement = '[HOSTNAMES]'; + + update_http_route_sample($httpRouteName, $httpRouteHostnamesElement); +} +// [END networkservices_v1_generated_NetworkServices_UpdateHttpRoute_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/update_mesh.php b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/update_mesh.php new file mode 100644 index 000000000000..aad5960d1742 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/update_mesh.php @@ -0,0 +1,85 @@ +`. + */ +function update_mesh_sample(string $meshName): void +{ + // Create a client. + $networkServicesClient = new NetworkServicesClient(); + + // Prepare the request message. + $mesh = (new Mesh()) + ->setName($meshName); + $request = (new UpdateMeshRequest()) + ->setMesh($mesh); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $networkServicesClient->updateMesh($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Mesh $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $meshName = '[NAME]'; + + update_mesh_sample($meshName); +} +// [END networkservices_v1_generated_NetworkServices_UpdateMesh_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/update_tcp_route.php b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/update_tcp_route.php new file mode 100644 index 000000000000..8f9c6a326f2d --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/update_tcp_route.php @@ -0,0 +1,92 @@ +`. + */ +function update_tcp_route_sample(string $tcpRouteName): void +{ + // Create a client. + $networkServicesClient = new NetworkServicesClient(); + + // Prepare the request message. + $tcpRouteRulesAction = new RouteAction(); + $routeRule = (new RouteRule()) + ->setAction($tcpRouteRulesAction); + $tcpRouteRules = [$routeRule,]; + $tcpRoute = (new TcpRoute()) + ->setName($tcpRouteName) + ->setRules($tcpRouteRules); + $request = (new UpdateTcpRouteRequest()) + ->setTcpRoute($tcpRoute); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $networkServicesClient->updateTcpRoute($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var TcpRoute $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $tcpRouteName = '[NAME]'; + + update_tcp_route_sample($tcpRouteName); +} +// [END networkservices_v1_generated_NetworkServices_UpdateTcpRoute_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/update_tls_route.php b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/update_tls_route.php new file mode 100644 index 000000000000..50f4c2b95eec --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/update_tls_route.php @@ -0,0 +1,109 @@ +`. + * @param string $formattedTlsRouteRulesActionDestinationsServiceName The URL of a BackendService to route traffic to. Please see + * {@see NetworkServicesClient::backendServiceName()} for help formatting this field. + */ +function update_tls_route_sample( + string $tlsRouteName, + string $formattedTlsRouteRulesActionDestinationsServiceName +): void { + // Create a client. + $networkServicesClient = new NetworkServicesClient(); + + // Prepare the request message. + $tlsRouteRulesMatches = [new RouteMatch()]; + $routeDestination = (new RouteDestination()) + ->setServiceName($formattedTlsRouteRulesActionDestinationsServiceName); + $tlsRouteRulesActionDestinations = [$routeDestination,]; + $tlsRouteRulesAction = (new RouteAction()) + ->setDestinations($tlsRouteRulesActionDestinations); + $routeRule = (new RouteRule()) + ->setMatches($tlsRouteRulesMatches) + ->setAction($tlsRouteRulesAction); + $tlsRouteRules = [$routeRule,]; + $tlsRoute = (new TlsRoute()) + ->setName($tlsRouteName) + ->setRules($tlsRouteRules); + $request = (new UpdateTlsRouteRequest()) + ->setTlsRoute($tlsRoute); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $networkServicesClient->updateTlsRoute($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var TlsRoute $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $tlsRouteName = '[NAME]'; + $formattedTlsRouteRulesActionDestinationsServiceName = NetworkServicesClient::backendServiceName( + '[PROJECT]', + '[LOCATION]', + '[BACKEND_SERVICE]' + ); + + update_tls_route_sample($tlsRouteName, $formattedTlsRouteRulesActionDestinationsServiceName); +} +// [END networkservices_v1_generated_NetworkServices_UpdateTlsRoute_sync] diff --git a/owl-bot-staging/NetworkServices/v1/src/V1/Client/DepServiceClient.php b/owl-bot-staging/NetworkServices/v1/src/V1/Client/DepServiceClient.php new file mode 100644 index 000000000000..fa881f493d29 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/src/V1/Client/DepServiceClient.php @@ -0,0 +1,744 @@ + createLbRouteExtensionAsync(CreateLbRouteExtensionRequest $request, array $optionalArgs = []) + * @method PromiseInterface createLbTrafficExtensionAsync(CreateLbTrafficExtensionRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteLbRouteExtensionAsync(DeleteLbRouteExtensionRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteLbTrafficExtensionAsync(DeleteLbTrafficExtensionRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLbRouteExtensionAsync(GetLbRouteExtensionRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLbTrafficExtensionAsync(GetLbTrafficExtensionRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLbRouteExtensionsAsync(ListLbRouteExtensionsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLbTrafficExtensionsAsync(ListLbTrafficExtensionsRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateLbRouteExtensionAsync(UpdateLbRouteExtensionRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateLbTrafficExtensionAsync(UpdateLbTrafficExtensionRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) + */ +final class DepServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.networkservices.v1.DepService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'networkservices.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'networkservices.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/dep_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/dep_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/dep_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/dep_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Create the default operation client for the service. + * + * @param array $options ClientOptions for the client. + * + * @return OperationsClient + */ + private function createOperationsClient(array $options) + { + // Unset client-specific configuration options + unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); + + if (isset($options['operationsClient'])) { + return $options['operationsClient']; + } + + return new OperationsClient($options); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * lb_route_extension resource. + * + * @param string $project + * @param string $location + * @param string $lbRouteExtension + * + * @return string The formatted lb_route_extension resource. + */ + public static function lbRouteExtensionName(string $project, string $location, string $lbRouteExtension): string + { + return self::getPathTemplate('lbRouteExtension')->render([ + 'project' => $project, + 'location' => $location, + 'lb_route_extension' => $lbRouteExtension, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * lb_traffic_extension resource. + * + * @param string $project + * @param string $location + * @param string $lbTrafficExtension + * + * @return string The formatted lb_traffic_extension resource. + */ + public static function lbTrafficExtensionName(string $project, string $location, string $lbTrafficExtension): string + { + return self::getPathTemplate('lbTrafficExtension')->render([ + 'project' => $project, + 'location' => $location, + 'lb_traffic_extension' => $lbTrafficExtension, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a location + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted location resource. + */ + public static function locationName(string $project, string $location): string + { + return self::getPathTemplate('location')->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - lbRouteExtension: projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension} + * - lbTrafficExtension: projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension} + * - location: projects/{project}/locations/{location} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'networkservices.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Creates a new `LbRouteExtension` resource in a given project and location. + * + * The async variant is {@see DepServiceClient::createLbRouteExtensionAsync()} . + * + * @example samples/V1/DepServiceClient/create_lb_route_extension.php + * + * @param CreateLbRouteExtensionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createLbRouteExtension(CreateLbRouteExtensionRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateLbRouteExtension', $request, $callOptions)->wait(); + } + + /** + * Creates a new `LbTrafficExtension` resource in a given project and + * location. + * + * The async variant is {@see DepServiceClient::createLbTrafficExtensionAsync()} . + * + * @example samples/V1/DepServiceClient/create_lb_traffic_extension.php + * + * @param CreateLbTrafficExtensionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createLbTrafficExtension(CreateLbTrafficExtensionRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateLbTrafficExtension', $request, $callOptions)->wait(); + } + + /** + * Deletes the specified `LbRouteExtension` resource. + * + * The async variant is {@see DepServiceClient::deleteLbRouteExtensionAsync()} . + * + * @example samples/V1/DepServiceClient/delete_lb_route_extension.php + * + * @param DeleteLbRouteExtensionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteLbRouteExtension(DeleteLbRouteExtensionRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteLbRouteExtension', $request, $callOptions)->wait(); + } + + /** + * Deletes the specified `LbTrafficExtension` resource. + * + * The async variant is {@see DepServiceClient::deleteLbTrafficExtensionAsync()} . + * + * @example samples/V1/DepServiceClient/delete_lb_traffic_extension.php + * + * @param DeleteLbTrafficExtensionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteLbTrafficExtension(DeleteLbTrafficExtensionRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteLbTrafficExtension', $request, $callOptions)->wait(); + } + + /** + * Gets details of the specified `LbRouteExtension` resource. + * + * The async variant is {@see DepServiceClient::getLbRouteExtensionAsync()} . + * + * @example samples/V1/DepServiceClient/get_lb_route_extension.php + * + * @param GetLbRouteExtensionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return LbRouteExtension + * + * @throws ApiException Thrown if the API call fails. + */ + public function getLbRouteExtension(GetLbRouteExtensionRequest $request, array $callOptions = []): LbRouteExtension + { + return $this->startApiCall('GetLbRouteExtension', $request, $callOptions)->wait(); + } + + /** + * Gets details of the specified `LbTrafficExtension` resource. + * + * The async variant is {@see DepServiceClient::getLbTrafficExtensionAsync()} . + * + * @example samples/V1/DepServiceClient/get_lb_traffic_extension.php + * + * @param GetLbTrafficExtensionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return LbTrafficExtension + * + * @throws ApiException Thrown if the API call fails. + */ + public function getLbTrafficExtension(GetLbTrafficExtensionRequest $request, array $callOptions = []): LbTrafficExtension + { + return $this->startApiCall('GetLbTrafficExtension', $request, $callOptions)->wait(); + } + + /** + * Lists `LbRouteExtension` resources in a given project and location. + * + * The async variant is {@see DepServiceClient::listLbRouteExtensionsAsync()} . + * + * @example samples/V1/DepServiceClient/list_lb_route_extensions.php + * + * @param ListLbRouteExtensionsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listLbRouteExtensions(ListLbRouteExtensionsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListLbRouteExtensions', $request, $callOptions); + } + + /** + * Lists `LbTrafficExtension` resources in a given project and location. + * + * The async variant is {@see DepServiceClient::listLbTrafficExtensionsAsync()} . + * + * @example samples/V1/DepServiceClient/list_lb_traffic_extensions.php + * + * @param ListLbTrafficExtensionsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listLbTrafficExtensions(ListLbTrafficExtensionsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListLbTrafficExtensions', $request, $callOptions); + } + + /** + * Updates the parameters of the specified `LbRouteExtension` resource. + * + * The async variant is {@see DepServiceClient::updateLbRouteExtensionAsync()} . + * + * @example samples/V1/DepServiceClient/update_lb_route_extension.php + * + * @param UpdateLbRouteExtensionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateLbRouteExtension(UpdateLbRouteExtensionRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateLbRouteExtension', $request, $callOptions)->wait(); + } + + /** + * Updates the parameters of the specified `LbTrafficExtension` resource. + * + * The async variant is {@see DepServiceClient::updateLbTrafficExtensionAsync()} . + * + * @example samples/V1/DepServiceClient/update_lb_traffic_extension.php + * + * @param UpdateLbTrafficExtensionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateLbTrafficExtension(UpdateLbTrafficExtensionRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateLbTrafficExtension', $request, $callOptions)->wait(); + } + + /** + * Gets information about a location. + * + * The async variant is {@see DepServiceClient::getLocationAsync()} . + * + * @example samples/V1/DepServiceClient/get_location.php + * + * @param GetLocationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Location + * + * @throws ApiException Thrown if the API call fails. + */ + public function getLocation(GetLocationRequest $request, array $callOptions = []): Location + { + return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * The async variant is {@see DepServiceClient::listLocationsAsync()} . + * + * @example samples/V1/DepServiceClient/list_locations.php + * + * @param ListLocationsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListLocations', $request, $callOptions); + } + + /** + * Gets the access control policy for a resource. Returns an empty policy + if the resource exists and does not have a policy set. + * + * The async variant is {@see DepServiceClient::getIamPolicyAsync()} . + * + * @example samples/V1/DepServiceClient/get_iam_policy.php + * + * @param GetIamPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * Sets the access control policy on the specified resource. Replaces + any existing policy. + + Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` + errors. + * + * The async variant is {@see DepServiceClient::setIamPolicyAsync()} . + * + * @example samples/V1/DepServiceClient/set_iam_policy.php + * + * @param SetIamPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * Returns permissions that a caller has on the specified resource. If the + resource does not exist, this will return an empty set of + permissions, not a `NOT_FOUND` error. + + Note: This operation is designed to be used for building + permission-aware UIs and command-line tools, not for authorization + checking. This operation may "fail open" without warning. + * + * The async variant is {@see DepServiceClient::testIamPermissionsAsync()} . + * + * @example samples/V1/DepServiceClient/test_iam_permissions.php + * + * @param TestIamPermissionsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return TestIamPermissionsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse + { + return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/NetworkServices/v1/src/V1/Client/NetworkServicesClient.php b/owl-bot-staging/NetworkServices/v1/src/V1/Client/NetworkServicesClient.php new file mode 100644 index 000000000000..25824901c198 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/src/V1/Client/NetworkServicesClient.php @@ -0,0 +1,1761 @@ + createEndpointPolicyAsync(CreateEndpointPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface createGatewayAsync(CreateGatewayRequest $request, array $optionalArgs = []) + * @method PromiseInterface createGrpcRouteAsync(CreateGrpcRouteRequest $request, array $optionalArgs = []) + * @method PromiseInterface createHttpRouteAsync(CreateHttpRouteRequest $request, array $optionalArgs = []) + * @method PromiseInterface createMeshAsync(CreateMeshRequest $request, array $optionalArgs = []) + * @method PromiseInterface createServiceBindingAsync(CreateServiceBindingRequest $request, array $optionalArgs = []) + * @method PromiseInterface createTcpRouteAsync(CreateTcpRouteRequest $request, array $optionalArgs = []) + * @method PromiseInterface createTlsRouteAsync(CreateTlsRouteRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteEndpointPolicyAsync(DeleteEndpointPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteGatewayAsync(DeleteGatewayRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteGrpcRouteAsync(DeleteGrpcRouteRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteHttpRouteAsync(DeleteHttpRouteRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteMeshAsync(DeleteMeshRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteServiceBindingAsync(DeleteServiceBindingRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteTcpRouteAsync(DeleteTcpRouteRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteTlsRouteAsync(DeleteTlsRouteRequest $request, array $optionalArgs = []) + * @method PromiseInterface getEndpointPolicyAsync(GetEndpointPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface getGatewayAsync(GetGatewayRequest $request, array $optionalArgs = []) + * @method PromiseInterface getGrpcRouteAsync(GetGrpcRouteRequest $request, array $optionalArgs = []) + * @method PromiseInterface getHttpRouteAsync(GetHttpRouteRequest $request, array $optionalArgs = []) + * @method PromiseInterface getMeshAsync(GetMeshRequest $request, array $optionalArgs = []) + * @method PromiseInterface getServiceBindingAsync(GetServiceBindingRequest $request, array $optionalArgs = []) + * @method PromiseInterface getTcpRouteAsync(GetTcpRouteRequest $request, array $optionalArgs = []) + * @method PromiseInterface getTlsRouteAsync(GetTlsRouteRequest $request, array $optionalArgs = []) + * @method PromiseInterface listEndpointPoliciesAsync(ListEndpointPoliciesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listGatewaysAsync(ListGatewaysRequest $request, array $optionalArgs = []) + * @method PromiseInterface listGrpcRoutesAsync(ListGrpcRoutesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listHttpRoutesAsync(ListHttpRoutesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listMeshesAsync(ListMeshesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listServiceBindingsAsync(ListServiceBindingsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listTcpRoutesAsync(ListTcpRoutesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listTlsRoutesAsync(ListTlsRoutesRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateEndpointPolicyAsync(UpdateEndpointPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateGatewayAsync(UpdateGatewayRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateGrpcRouteAsync(UpdateGrpcRouteRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateHttpRouteAsync(UpdateHttpRouteRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateMeshAsync(UpdateMeshRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateTcpRouteAsync(UpdateTcpRouteRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateTlsRouteAsync(UpdateTlsRouteRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) + */ +final class NetworkServicesClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.networkservices.v1.NetworkServices'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'networkservices.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'networkservices.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/network_services_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/network_services_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/network_services_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/network_services_rest_client_config.php', + ], + ], + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Create the default operation client for the service. + * + * @param array $options ClientOptions for the client. + * + * @return OperationsClient + */ + private function createOperationsClient(array $options) + { + // Unset client-specific configuration options + unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); + + if (isset($options['operationsClient'])) { + return $options['operationsClient']; + } + + return new OperationsClient($options); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * authorization_policy resource. + * + * @param string $project + * @param string $location + * @param string $authorizationPolicy + * + * @return string The formatted authorization_policy resource. + */ + public static function authorizationPolicyName(string $project, string $location, string $authorizationPolicy): string + { + return self::getPathTemplate('authorizationPolicy')->render([ + 'project' => $project, + 'location' => $location, + 'authorization_policy' => $authorizationPolicy, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * backend_service resource. + * + * @param string $project + * @param string $location + * @param string $backendService + * + * @return string The formatted backend_service resource. + */ + public static function backendServiceName(string $project, string $location, string $backendService): string + { + return self::getPathTemplate('backendService')->render([ + 'project' => $project, + 'location' => $location, + 'backend_service' => $backendService, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * client_tls_policy resource. + * + * @param string $project + * @param string $location + * @param string $clientTlsPolicy + * + * @return string The formatted client_tls_policy resource. + */ + public static function clientTlsPolicyName(string $project, string $location, string $clientTlsPolicy): string + { + return self::getPathTemplate('clientTlsPolicy')->render([ + 'project' => $project, + 'location' => $location, + 'client_tls_policy' => $clientTlsPolicy, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * endpoint_policy resource. + * + * @param string $project + * @param string $location + * @param string $endpointPolicy + * + * @return string The formatted endpoint_policy resource. + */ + public static function endpointPolicyName(string $project, string $location, string $endpointPolicy): string + { + return self::getPathTemplate('endpointPolicy')->render([ + 'project' => $project, + 'location' => $location, + 'endpoint_policy' => $endpointPolicy, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a gateway + * resource. + * + * @param string $project + * @param string $location + * @param string $gateway + * + * @return string The formatted gateway resource. + */ + public static function gatewayName(string $project, string $location, string $gateway): string + { + return self::getPathTemplate('gateway')->render([ + 'project' => $project, + 'location' => $location, + 'gateway' => $gateway, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a grpc_route + * resource. + * + * @param string $project + * @param string $location + * @param string $grpcRoute + * + * @return string The formatted grpc_route resource. + */ + public static function grpcRouteName(string $project, string $location, string $grpcRoute): string + { + return self::getPathTemplate('grpcRoute')->render([ + 'project' => $project, + 'location' => $location, + 'grpc_route' => $grpcRoute, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a http_route + * resource. + * + * @param string $project + * @param string $location + * @param string $httpRoute + * + * @return string The formatted http_route resource. + */ + public static function httpRouteName(string $project, string $location, string $httpRoute): string + { + return self::getPathTemplate('httpRoute')->render([ + 'project' => $project, + 'location' => $location, + 'http_route' => $httpRoute, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a location + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted location resource. + */ + public static function locationName(string $project, string $location): string + { + return self::getPathTemplate('location')->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a mesh + * resource. + * + * @param string $project + * @param string $location + * @param string $mesh + * + * @return string The formatted mesh resource. + */ + public static function meshName(string $project, string $location, string $mesh): string + { + return self::getPathTemplate('mesh')->render([ + 'project' => $project, + 'location' => $location, + 'mesh' => $mesh, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * server_tls_policy resource. + * + * @param string $project + * @param string $location + * @param string $serverTlsPolicy + * + * @return string The formatted server_tls_policy resource. + */ + public static function serverTlsPolicyName(string $project, string $location, string $serverTlsPolicy): string + { + return self::getPathTemplate('serverTlsPolicy')->render([ + 'project' => $project, + 'location' => $location, + 'server_tls_policy' => $serverTlsPolicy, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * service_binding resource. + * + * @param string $project + * @param string $location + * @param string $serviceBinding + * + * @return string The formatted service_binding resource. + */ + public static function serviceBindingName(string $project, string $location, string $serviceBinding): string + { + return self::getPathTemplate('serviceBinding')->render([ + 'project' => $project, + 'location' => $location, + 'service_binding' => $serviceBinding, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a tcp_route + * resource. + * + * @param string $project + * @param string $location + * @param string $tcpRoute + * + * @return string The formatted tcp_route resource. + */ + public static function tcpRouteName(string $project, string $location, string $tcpRoute): string + { + return self::getPathTemplate('tcpRoute')->render([ + 'project' => $project, + 'location' => $location, + 'tcp_route' => $tcpRoute, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a tls_route + * resource. + * + * @param string $project + * @param string $location + * @param string $tlsRoute + * + * @return string The formatted tls_route resource. + */ + public static function tlsRouteName(string $project, string $location, string $tlsRoute): string + { + return self::getPathTemplate('tlsRoute')->render([ + 'project' => $project, + 'location' => $location, + 'tls_route' => $tlsRoute, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - authorizationPolicy: projects/{project}/locations/{location}/authorizationPolicies/{authorization_policy} + * - backendService: projects/{project}/locations/{location}/backendServices/{backend_service} + * - clientTlsPolicy: projects/{project}/locations/{location}/clientTlsPolicies/{client_tls_policy} + * - endpointPolicy: projects/{project}/locations/{location}/endpointPolicies/{endpoint_policy} + * - gateway: projects/{project}/locations/{location}/gateways/{gateway} + * - grpcRoute: projects/{project}/locations/{location}/grpcRoutes/{grpc_route} + * - httpRoute: projects/{project}/locations/{location}/httpRoutes/{http_route} + * - location: projects/{project}/locations/{location} + * - mesh: projects/{project}/locations/{location}/meshes/{mesh} + * - serverTlsPolicy: projects/{project}/locations/{location}/serverTlsPolicies/{server_tls_policy} + * - serviceBinding: projects/{project}/locations/{location}/serviceBindings/{service_binding} + * - tcpRoute: projects/{project}/locations/{location}/tcpRoutes/{tcp_route} + * - tlsRoute: projects/{project}/locations/{location}/tlsRoutes/{tls_route} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'networkservices.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Creates a new EndpointPolicy in a given project and location. + * + * The async variant is {@see NetworkServicesClient::createEndpointPolicyAsync()} . + * + * @example samples/V1/NetworkServicesClient/create_endpoint_policy.php + * + * @param CreateEndpointPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createEndpointPolicy(CreateEndpointPolicyRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateEndpointPolicy', $request, $callOptions)->wait(); + } + + /** + * Creates a new Gateway in a given project and location. + * + * The async variant is {@see NetworkServicesClient::createGatewayAsync()} . + * + * @example samples/V1/NetworkServicesClient/create_gateway.php + * + * @param CreateGatewayRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createGateway(CreateGatewayRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateGateway', $request, $callOptions)->wait(); + } + + /** + * Creates a new GrpcRoute in a given project and location. + * + * The async variant is {@see NetworkServicesClient::createGrpcRouteAsync()} . + * + * @example samples/V1/NetworkServicesClient/create_grpc_route.php + * + * @param CreateGrpcRouteRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createGrpcRoute(CreateGrpcRouteRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateGrpcRoute', $request, $callOptions)->wait(); + } + + /** + * Creates a new HttpRoute in a given project and location. + * + * The async variant is {@see NetworkServicesClient::createHttpRouteAsync()} . + * + * @example samples/V1/NetworkServicesClient/create_http_route.php + * + * @param CreateHttpRouteRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createHttpRoute(CreateHttpRouteRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateHttpRoute', $request, $callOptions)->wait(); + } + + /** + * Creates a new Mesh in a given project and location. + * + * The async variant is {@see NetworkServicesClient::createMeshAsync()} . + * + * @example samples/V1/NetworkServicesClient/create_mesh.php + * + * @param CreateMeshRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createMesh(CreateMeshRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateMesh', $request, $callOptions)->wait(); + } + + /** + * Creates a new ServiceBinding in a given project and location. + * + * The async variant is {@see NetworkServicesClient::createServiceBindingAsync()} . + * + * @example samples/V1/NetworkServicesClient/create_service_binding.php + * + * @param CreateServiceBindingRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createServiceBinding(CreateServiceBindingRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateServiceBinding', $request, $callOptions)->wait(); + } + + /** + * Creates a new TcpRoute in a given project and location. + * + * The async variant is {@see NetworkServicesClient::createTcpRouteAsync()} . + * + * @example samples/V1/NetworkServicesClient/create_tcp_route.php + * + * @param CreateTcpRouteRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createTcpRoute(CreateTcpRouteRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateTcpRoute', $request, $callOptions)->wait(); + } + + /** + * Creates a new TlsRoute in a given project and location. + * + * The async variant is {@see NetworkServicesClient::createTlsRouteAsync()} . + * + * @example samples/V1/NetworkServicesClient/create_tls_route.php + * + * @param CreateTlsRouteRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createTlsRoute(CreateTlsRouteRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateTlsRoute', $request, $callOptions)->wait(); + } + + /** + * Deletes a single EndpointPolicy. + * + * The async variant is {@see NetworkServicesClient::deleteEndpointPolicyAsync()} . + * + * @example samples/V1/NetworkServicesClient/delete_endpoint_policy.php + * + * @param DeleteEndpointPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteEndpointPolicy(DeleteEndpointPolicyRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteEndpointPolicy', $request, $callOptions)->wait(); + } + + /** + * Deletes a single Gateway. + * + * The async variant is {@see NetworkServicesClient::deleteGatewayAsync()} . + * + * @example samples/V1/NetworkServicesClient/delete_gateway.php + * + * @param DeleteGatewayRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteGateway(DeleteGatewayRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteGateway', $request, $callOptions)->wait(); + } + + /** + * Deletes a single GrpcRoute. + * + * The async variant is {@see NetworkServicesClient::deleteGrpcRouteAsync()} . + * + * @example samples/V1/NetworkServicesClient/delete_grpc_route.php + * + * @param DeleteGrpcRouteRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteGrpcRoute(DeleteGrpcRouteRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteGrpcRoute', $request, $callOptions)->wait(); + } + + /** + * Deletes a single HttpRoute. + * + * The async variant is {@see NetworkServicesClient::deleteHttpRouteAsync()} . + * + * @example samples/V1/NetworkServicesClient/delete_http_route.php + * + * @param DeleteHttpRouteRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteHttpRoute(DeleteHttpRouteRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteHttpRoute', $request, $callOptions)->wait(); + } + + /** + * Deletes a single Mesh. + * + * The async variant is {@see NetworkServicesClient::deleteMeshAsync()} . + * + * @example samples/V1/NetworkServicesClient/delete_mesh.php + * + * @param DeleteMeshRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteMesh(DeleteMeshRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteMesh', $request, $callOptions)->wait(); + } + + /** + * Deletes a single ServiceBinding. + * + * The async variant is {@see NetworkServicesClient::deleteServiceBindingAsync()} . + * + * @example samples/V1/NetworkServicesClient/delete_service_binding.php + * + * @param DeleteServiceBindingRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteServiceBinding(DeleteServiceBindingRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteServiceBinding', $request, $callOptions)->wait(); + } + + /** + * Deletes a single TcpRoute. + * + * The async variant is {@see NetworkServicesClient::deleteTcpRouteAsync()} . + * + * @example samples/V1/NetworkServicesClient/delete_tcp_route.php + * + * @param DeleteTcpRouteRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteTcpRoute(DeleteTcpRouteRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteTcpRoute', $request, $callOptions)->wait(); + } + + /** + * Deletes a single TlsRoute. + * + * The async variant is {@see NetworkServicesClient::deleteTlsRouteAsync()} . + * + * @example samples/V1/NetworkServicesClient/delete_tls_route.php + * + * @param DeleteTlsRouteRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteTlsRoute(DeleteTlsRouteRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteTlsRoute', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single EndpointPolicy. + * + * The async variant is {@see NetworkServicesClient::getEndpointPolicyAsync()} . + * + * @example samples/V1/NetworkServicesClient/get_endpoint_policy.php + * + * @param GetEndpointPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return EndpointPolicy + * + * @throws ApiException Thrown if the API call fails. + */ + public function getEndpointPolicy(GetEndpointPolicyRequest $request, array $callOptions = []): EndpointPolicy + { + return $this->startApiCall('GetEndpointPolicy', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single Gateway. + * + * The async variant is {@see NetworkServicesClient::getGatewayAsync()} . + * + * @example samples/V1/NetworkServicesClient/get_gateway.php + * + * @param GetGatewayRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Gateway + * + * @throws ApiException Thrown if the API call fails. + */ + public function getGateway(GetGatewayRequest $request, array $callOptions = []): Gateway + { + return $this->startApiCall('GetGateway', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single GrpcRoute. + * + * The async variant is {@see NetworkServicesClient::getGrpcRouteAsync()} . + * + * @example samples/V1/NetworkServicesClient/get_grpc_route.php + * + * @param GetGrpcRouteRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return GrpcRoute + * + * @throws ApiException Thrown if the API call fails. + */ + public function getGrpcRoute(GetGrpcRouteRequest $request, array $callOptions = []): GrpcRoute + { + return $this->startApiCall('GetGrpcRoute', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single HttpRoute. + * + * The async variant is {@see NetworkServicesClient::getHttpRouteAsync()} . + * + * @example samples/V1/NetworkServicesClient/get_http_route.php + * + * @param GetHttpRouteRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return HttpRoute + * + * @throws ApiException Thrown if the API call fails. + */ + public function getHttpRoute(GetHttpRouteRequest $request, array $callOptions = []): HttpRoute + { + return $this->startApiCall('GetHttpRoute', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single Mesh. + * + * The async variant is {@see NetworkServicesClient::getMeshAsync()} . + * + * @example samples/V1/NetworkServicesClient/get_mesh.php + * + * @param GetMeshRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Mesh + * + * @throws ApiException Thrown if the API call fails. + */ + public function getMesh(GetMeshRequest $request, array $callOptions = []): Mesh + { + return $this->startApiCall('GetMesh', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single ServiceBinding. + * + * The async variant is {@see NetworkServicesClient::getServiceBindingAsync()} . + * + * @example samples/V1/NetworkServicesClient/get_service_binding.php + * + * @param GetServiceBindingRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ServiceBinding + * + * @throws ApiException Thrown if the API call fails. + */ + public function getServiceBinding(GetServiceBindingRequest $request, array $callOptions = []): ServiceBinding + { + return $this->startApiCall('GetServiceBinding', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single TcpRoute. + * + * The async variant is {@see NetworkServicesClient::getTcpRouteAsync()} . + * + * @example samples/V1/NetworkServicesClient/get_tcp_route.php + * + * @param GetTcpRouteRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return TcpRoute + * + * @throws ApiException Thrown if the API call fails. + */ + public function getTcpRoute(GetTcpRouteRequest $request, array $callOptions = []): TcpRoute + { + return $this->startApiCall('GetTcpRoute', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single TlsRoute. + * + * The async variant is {@see NetworkServicesClient::getTlsRouteAsync()} . + * + * @example samples/V1/NetworkServicesClient/get_tls_route.php + * + * @param GetTlsRouteRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return TlsRoute + * + * @throws ApiException Thrown if the API call fails. + */ + public function getTlsRoute(GetTlsRouteRequest $request, array $callOptions = []): TlsRoute + { + return $this->startApiCall('GetTlsRoute', $request, $callOptions)->wait(); + } + + /** + * Lists EndpointPolicies in a given project and location. + * + * The async variant is {@see NetworkServicesClient::listEndpointPoliciesAsync()} . + * + * @example samples/V1/NetworkServicesClient/list_endpoint_policies.php + * + * @param ListEndpointPoliciesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listEndpointPolicies(ListEndpointPoliciesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListEndpointPolicies', $request, $callOptions); + } + + /** + * Lists Gateways in a given project and location. + * + * The async variant is {@see NetworkServicesClient::listGatewaysAsync()} . + * + * @example samples/V1/NetworkServicesClient/list_gateways.php + * + * @param ListGatewaysRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listGateways(ListGatewaysRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListGateways', $request, $callOptions); + } + + /** + * Lists GrpcRoutes in a given project and location. + * + * The async variant is {@see NetworkServicesClient::listGrpcRoutesAsync()} . + * + * @example samples/V1/NetworkServicesClient/list_grpc_routes.php + * + * @param ListGrpcRoutesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listGrpcRoutes(ListGrpcRoutesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListGrpcRoutes', $request, $callOptions); + } + + /** + * Lists HttpRoute in a given project and location. + * + * The async variant is {@see NetworkServicesClient::listHttpRoutesAsync()} . + * + * @example samples/V1/NetworkServicesClient/list_http_routes.php + * + * @param ListHttpRoutesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listHttpRoutes(ListHttpRoutesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListHttpRoutes', $request, $callOptions); + } + + /** + * Lists Meshes in a given project and location. + * + * The async variant is {@see NetworkServicesClient::listMeshesAsync()} . + * + * @example samples/V1/NetworkServicesClient/list_meshes.php + * + * @param ListMeshesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listMeshes(ListMeshesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListMeshes', $request, $callOptions); + } + + /** + * Lists ServiceBinding in a given project and location. + * + * The async variant is {@see NetworkServicesClient::listServiceBindingsAsync()} . + * + * @example samples/V1/NetworkServicesClient/list_service_bindings.php + * + * @param ListServiceBindingsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listServiceBindings(ListServiceBindingsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListServiceBindings', $request, $callOptions); + } + + /** + * Lists TcpRoute in a given project and location. + * + * The async variant is {@see NetworkServicesClient::listTcpRoutesAsync()} . + * + * @example samples/V1/NetworkServicesClient/list_tcp_routes.php + * + * @param ListTcpRoutesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listTcpRoutes(ListTcpRoutesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListTcpRoutes', $request, $callOptions); + } + + /** + * Lists TlsRoute in a given project and location. + * + * The async variant is {@see NetworkServicesClient::listTlsRoutesAsync()} . + * + * @example samples/V1/NetworkServicesClient/list_tls_routes.php + * + * @param ListTlsRoutesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listTlsRoutes(ListTlsRoutesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListTlsRoutes', $request, $callOptions); + } + + /** + * Updates the parameters of a single EndpointPolicy. + * + * The async variant is {@see NetworkServicesClient::updateEndpointPolicyAsync()} . + * + * @example samples/V1/NetworkServicesClient/update_endpoint_policy.php + * + * @param UpdateEndpointPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateEndpointPolicy(UpdateEndpointPolicyRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateEndpointPolicy', $request, $callOptions)->wait(); + } + + /** + * Updates the parameters of a single Gateway. + * + * The async variant is {@see NetworkServicesClient::updateGatewayAsync()} . + * + * @example samples/V1/NetworkServicesClient/update_gateway.php + * + * @param UpdateGatewayRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateGateway(UpdateGatewayRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateGateway', $request, $callOptions)->wait(); + } + + /** + * Updates the parameters of a single GrpcRoute. + * + * The async variant is {@see NetworkServicesClient::updateGrpcRouteAsync()} . + * + * @example samples/V1/NetworkServicesClient/update_grpc_route.php + * + * @param UpdateGrpcRouteRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateGrpcRoute(UpdateGrpcRouteRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateGrpcRoute', $request, $callOptions)->wait(); + } + + /** + * Updates the parameters of a single HttpRoute. + * + * The async variant is {@see NetworkServicesClient::updateHttpRouteAsync()} . + * + * @example samples/V1/NetworkServicesClient/update_http_route.php + * + * @param UpdateHttpRouteRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateHttpRoute(UpdateHttpRouteRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateHttpRoute', $request, $callOptions)->wait(); + } + + /** + * Updates the parameters of a single Mesh. + * + * The async variant is {@see NetworkServicesClient::updateMeshAsync()} . + * + * @example samples/V1/NetworkServicesClient/update_mesh.php + * + * @param UpdateMeshRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateMesh(UpdateMeshRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateMesh', $request, $callOptions)->wait(); + } + + /** + * Updates the parameters of a single TcpRoute. + * + * The async variant is {@see NetworkServicesClient::updateTcpRouteAsync()} . + * + * @example samples/V1/NetworkServicesClient/update_tcp_route.php + * + * @param UpdateTcpRouteRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateTcpRoute(UpdateTcpRouteRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateTcpRoute', $request, $callOptions)->wait(); + } + + /** + * Updates the parameters of a single TlsRoute. + * + * The async variant is {@see NetworkServicesClient::updateTlsRouteAsync()} . + * + * @example samples/V1/NetworkServicesClient/update_tls_route.php + * + * @param UpdateTlsRouteRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateTlsRoute(UpdateTlsRouteRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateTlsRoute', $request, $callOptions)->wait(); + } + + /** + * Gets information about a location. + * + * The async variant is {@see NetworkServicesClient::getLocationAsync()} . + * + * @example samples/V1/NetworkServicesClient/get_location.php + * + * @param GetLocationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Location + * + * @throws ApiException Thrown if the API call fails. + */ + public function getLocation(GetLocationRequest $request, array $callOptions = []): Location + { + return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * The async variant is {@see NetworkServicesClient::listLocationsAsync()} . + * + * @example samples/V1/NetworkServicesClient/list_locations.php + * + * @param ListLocationsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListLocations', $request, $callOptions); + } + + /** + * Gets the access control policy for a resource. Returns an empty policy + if the resource exists and does not have a policy set. + * + * The async variant is {@see NetworkServicesClient::getIamPolicyAsync()} . + * + * @example samples/V1/NetworkServicesClient/get_iam_policy.php + * + * @param GetIamPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * Sets the access control policy on the specified resource. Replaces + any existing policy. + + Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` + errors. + * + * The async variant is {@see NetworkServicesClient::setIamPolicyAsync()} . + * + * @example samples/V1/NetworkServicesClient/set_iam_policy.php + * + * @param SetIamPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * Returns permissions that a caller has on the specified resource. If the + resource does not exist, this will return an empty set of + permissions, not a `NOT_FOUND` error. + + Note: This operation is designed to be used for building + permission-aware UIs and command-line tools, not for authorization + checking. This operation may "fail open" without warning. + * + * The async variant is {@see NetworkServicesClient::testIamPermissionsAsync()} . + * + * @example samples/V1/NetworkServicesClient/test_iam_permissions.php + * + * @param TestIamPermissionsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return TestIamPermissionsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse + { + return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/NetworkServices/v1/src/V1/gapic_metadata.json b/owl-bot-staging/NetworkServices/v1/src/V1/gapic_metadata.json new file mode 100644 index 000000000000..6242fe95cd6a --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/src/V1/gapic_metadata.json @@ -0,0 +1,322 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.cloud.networkservices.v1", + "libraryPackage": "Google\\Cloud\\NetworkServices\\V1", + "services": { + "DepService": { + "clients": { + "grpc": { + "libraryClient": "DepServiceGapicClient", + "rpcs": { + "CreateLbRouteExtension": { + "methods": [ + "createLbRouteExtension" + ] + }, + "CreateLbTrafficExtension": { + "methods": [ + "createLbTrafficExtension" + ] + }, + "DeleteLbRouteExtension": { + "methods": [ + "deleteLbRouteExtension" + ] + }, + "DeleteLbTrafficExtension": { + "methods": [ + "deleteLbTrafficExtension" + ] + }, + "GetLbRouteExtension": { + "methods": [ + "getLbRouteExtension" + ] + }, + "GetLbTrafficExtension": { + "methods": [ + "getLbTrafficExtension" + ] + }, + "ListLbRouteExtensions": { + "methods": [ + "listLbRouteExtensions" + ] + }, + "ListLbTrafficExtensions": { + "methods": [ + "listLbTrafficExtensions" + ] + }, + "UpdateLbRouteExtension": { + "methods": [ + "updateLbRouteExtension" + ] + }, + "UpdateLbTrafficExtension": { + "methods": [ + "updateLbTrafficExtension" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + } + } + } + } + }, + "NetworkServices": { + "clients": { + "grpc": { + "libraryClient": "NetworkServicesGapicClient", + "rpcs": { + "CreateEndpointPolicy": { + "methods": [ + "createEndpointPolicy" + ] + }, + "CreateGateway": { + "methods": [ + "createGateway" + ] + }, + "CreateGrpcRoute": { + "methods": [ + "createGrpcRoute" + ] + }, + "CreateHttpRoute": { + "methods": [ + "createHttpRoute" + ] + }, + "CreateMesh": { + "methods": [ + "createMesh" + ] + }, + "CreateServiceBinding": { + "methods": [ + "createServiceBinding" + ] + }, + "CreateTcpRoute": { + "methods": [ + "createTcpRoute" + ] + }, + "CreateTlsRoute": { + "methods": [ + "createTlsRoute" + ] + }, + "DeleteEndpointPolicy": { + "methods": [ + "deleteEndpointPolicy" + ] + }, + "DeleteGateway": { + "methods": [ + "deleteGateway" + ] + }, + "DeleteGrpcRoute": { + "methods": [ + "deleteGrpcRoute" + ] + }, + "DeleteHttpRoute": { + "methods": [ + "deleteHttpRoute" + ] + }, + "DeleteMesh": { + "methods": [ + "deleteMesh" + ] + }, + "DeleteServiceBinding": { + "methods": [ + "deleteServiceBinding" + ] + }, + "DeleteTcpRoute": { + "methods": [ + "deleteTcpRoute" + ] + }, + "DeleteTlsRoute": { + "methods": [ + "deleteTlsRoute" + ] + }, + "GetEndpointPolicy": { + "methods": [ + "getEndpointPolicy" + ] + }, + "GetGateway": { + "methods": [ + "getGateway" + ] + }, + "GetGrpcRoute": { + "methods": [ + "getGrpcRoute" + ] + }, + "GetHttpRoute": { + "methods": [ + "getHttpRoute" + ] + }, + "GetMesh": { + "methods": [ + "getMesh" + ] + }, + "GetServiceBinding": { + "methods": [ + "getServiceBinding" + ] + }, + "GetTcpRoute": { + "methods": [ + "getTcpRoute" + ] + }, + "GetTlsRoute": { + "methods": [ + "getTlsRoute" + ] + }, + "ListEndpointPolicies": { + "methods": [ + "listEndpointPolicies" + ] + }, + "ListGateways": { + "methods": [ + "listGateways" + ] + }, + "ListGrpcRoutes": { + "methods": [ + "listGrpcRoutes" + ] + }, + "ListHttpRoutes": { + "methods": [ + "listHttpRoutes" + ] + }, + "ListMeshes": { + "methods": [ + "listMeshes" + ] + }, + "ListServiceBindings": { + "methods": [ + "listServiceBindings" + ] + }, + "ListTcpRoutes": { + "methods": [ + "listTcpRoutes" + ] + }, + "ListTlsRoutes": { + "methods": [ + "listTlsRoutes" + ] + }, + "UpdateEndpointPolicy": { + "methods": [ + "updateEndpointPolicy" + ] + }, + "UpdateGateway": { + "methods": [ + "updateGateway" + ] + }, + "UpdateGrpcRoute": { + "methods": [ + "updateGrpcRoute" + ] + }, + "UpdateHttpRoute": { + "methods": [ + "updateHttpRoute" + ] + }, + "UpdateMesh": { + "methods": [ + "updateMesh" + ] + }, + "UpdateTcpRoute": { + "methods": [ + "updateTcpRoute" + ] + }, + "UpdateTlsRoute": { + "methods": [ + "updateTlsRoute" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/NetworkServices/v1/src/V1/resources/dep_service_client_config.json b/owl-bot-staging/NetworkServices/v1/src/V1/resources/dep_service_client_config.json new file mode 100644 index 000000000000..dad488e147d4 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/src/V1/resources/dep_service_client_config.json @@ -0,0 +1,107 @@ +{ + "interfaces": { + "google.cloud.networkservices.v1.DepService": { + "retry_codes": { + "no_retry_codes": [], + "no_retry_1_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "CreateLbRouteExtension": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateLbTrafficExtension": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteLbRouteExtension": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteLbTrafficExtension": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetLbRouteExtension": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetLbTrafficExtension": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListLbRouteExtensions": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListLbTrafficExtensions": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateLbRouteExtension": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateLbTrafficExtension": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetLocation": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListLocations": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "SetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "TestIamPermissions": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/NetworkServices/v1/src/V1/resources/dep_service_descriptor_config.php b/owl-bot-staging/NetworkServices/v1/src/V1/resources/dep_service_descriptor_config.php new file mode 100644 index 000000000000..41dbb1f04eb9 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/src/V1/resources/dep_service_descriptor_config.php @@ -0,0 +1,286 @@ + [ + 'google.cloud.networkservices.v1.DepService' => [ + 'CreateLbRouteExtension' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkServices\V1\LbRouteExtension', + 'metadataReturnType' => '\Google\Cloud\NetworkServices\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateLbTrafficExtension' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkServices\V1\LbTrafficExtension', + 'metadataReturnType' => '\Google\Cloud\NetworkServices\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteLbRouteExtension' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\NetworkServices\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteLbTrafficExtension' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\NetworkServices\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UpdateLbRouteExtension' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkServices\V1\LbRouteExtension', + 'metadataReturnType' => '\Google\Cloud\NetworkServices\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'lb_route_extension.name', + 'fieldAccessors' => [ + 'getLbRouteExtension', + 'getName', + ], + ], + ], + ], + 'UpdateLbTrafficExtension' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkServices\V1\LbTrafficExtension', + 'metadataReturnType' => '\Google\Cloud\NetworkServices\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'lb_traffic_extension.name', + 'fieldAccessors' => [ + 'getLbTrafficExtension', + 'getName', + ], + ], + ], + ], + 'GetLbRouteExtension' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\NetworkServices\V1\LbRouteExtension', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetLbTrafficExtension' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\NetworkServices\V1\LbTrafficExtension', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListLbRouteExtensions' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLbRouteExtensions', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\NetworkServices\V1\ListLbRouteExtensionsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListLbTrafficExtensions' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLbTrafficExtensions', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\NetworkServices\V1\ListLbTrafficExtensionsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'GetLocation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Location\Location', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'GetIamPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'SetIamPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'TestIamPermissions' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'templateMap' => [ + 'lbRouteExtension' => 'projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}', + 'lbTrafficExtension' => 'projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}', + 'location' => 'projects/{project}/locations/{location}', + ], + ], + ], +]; diff --git a/owl-bot-staging/NetworkServices/v1/src/V1/resources/dep_service_rest_client_config.php b/owl-bot-staging/NetworkServices/v1/src/V1/resources/dep_service_rest_client_config.php new file mode 100644 index 000000000000..00779b775bb0 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/src/V1/resources/dep_service_rest_client_config.php @@ -0,0 +1,349 @@ + [ + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.cloud.networkservices.v1.DepService' => [ + 'CreateLbRouteExtension' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/lbRouteExtensions', + 'body' => 'lb_route_extension', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'lb_route_extension_id', + ], + ], + 'CreateLbTrafficExtension' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/lbTrafficExtensions', + 'body' => 'lb_traffic_extension', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'lb_traffic_extension_id', + ], + ], + 'DeleteLbRouteExtension' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/lbRouteExtensions/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteLbTrafficExtension' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/lbTrafficExtensions/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetLbRouteExtension' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/lbRouteExtensions/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetLbTrafficExtension' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/lbTrafficExtensions/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLbRouteExtensions' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/lbRouteExtensions', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListLbTrafficExtensions' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/lbTrafficExtensions', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateLbRouteExtension' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{lb_route_extension.name=projects/*/locations/*/lbRouteExtensions/*}', + 'body' => 'lb_route_extension', + 'placeholders' => [ + 'lb_route_extension.name' => [ + 'getters' => [ + 'getLbRouteExtension', + 'getName', + ], + ], + ], + ], + 'UpdateLbTrafficExtension' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{lb_traffic_extension.name=projects/*/locations/*/lbTrafficExtensions/*}', + 'body' => 'lb_traffic_extension', + 'placeholders' => [ + 'lb_traffic_extension.name' => [ + 'getters' => [ + 'getLbTrafficExtension', + 'getName', + ], + ], + ], + ], + ], + 'google.iam.v1.IAMPolicy' => [ + 'GetIamPolicy' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/edgeCacheKeysets/*}:getIamPolicy', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/edgeCacheOrigins/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/edgeCacheServices/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/endpointPolicies/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/serviceBindings/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/meshes/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/gateways/*}:getIamPolicy', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'SetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/edgeCacheKeysets/*}:setIamPolicy', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/edgeCacheOrigins/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/edgeCacheServices/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/endpointPolicies/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/serviceBindings/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/meshes/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/gateways/*}:setIamPolicy', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'TestIamPermissions' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/edgeCacheKeysets/*}:testIamPermissions', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/edgeCacheOrigins/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/edgeCacheServices/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/endpointPolicies/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/serviceBindings/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/meshes/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/gateways/*}:testIamPermissions', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/NetworkServices/v1/src/V1/resources/network_services_client_config.json b/owl-bot-staging/NetworkServices/v1/src/V1/resources/network_services_client_config.json new file mode 100644 index 000000000000..39cf35750a4b --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/src/V1/resources/network_services_client_config.json @@ -0,0 +1,252 @@ +{ + "interfaces": { + "google.cloud.networkservices.v1.NetworkServices": { + "retry_codes": { + "no_retry_codes": [], + "no_retry_1_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "CreateEndpointPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateGateway": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateGrpcRoute": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateHttpRoute": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateMesh": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateServiceBinding": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateTcpRoute": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateTlsRoute": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteEndpointPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteGateway": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteGrpcRoute": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteHttpRoute": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteMesh": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteServiceBinding": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteTcpRoute": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteTlsRoute": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetEndpointPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetGateway": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetGrpcRoute": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetHttpRoute": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetMesh": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetServiceBinding": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetTcpRoute": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetTlsRoute": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListEndpointPolicies": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListGateways": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListGrpcRoutes": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListHttpRoutes": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListMeshes": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListServiceBindings": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListTcpRoutes": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListTlsRoutes": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateEndpointPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateGateway": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateGrpcRoute": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateHttpRoute": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateMesh": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateTcpRoute": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateTlsRoute": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetLocation": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListLocations": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "SetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "TestIamPermissions": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/NetworkServices/v1/src/V1/resources/network_services_descriptor_config.php b/owl-bot-staging/NetworkServices/v1/src/V1/resources/network_services_descriptor_config.php new file mode 100644 index 000000000000..809f6071f19b --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/src/V1/resources/network_services_descriptor_config.php @@ -0,0 +1,816 @@ + [ + 'google.cloud.networkservices.v1.NetworkServices' => [ + 'CreateEndpointPolicy' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkServices\V1\EndpointPolicy', + 'metadataReturnType' => '\Google\Cloud\NetworkServices\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateGateway' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkServices\V1\Gateway', + 'metadataReturnType' => '\Google\Cloud\NetworkServices\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateGrpcRoute' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkServices\V1\GrpcRoute', + 'metadataReturnType' => '\Google\Cloud\NetworkServices\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateHttpRoute' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkServices\V1\HttpRoute', + 'metadataReturnType' => '\Google\Cloud\NetworkServices\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateMesh' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkServices\V1\Mesh', + 'metadataReturnType' => '\Google\Cloud\NetworkServices\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateServiceBinding' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkServices\V1\ServiceBinding', + 'metadataReturnType' => '\Google\Cloud\NetworkServices\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateTcpRoute' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkServices\V1\TcpRoute', + 'metadataReturnType' => '\Google\Cloud\NetworkServices\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateTlsRoute' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkServices\V1\TlsRoute', + 'metadataReturnType' => '\Google\Cloud\NetworkServices\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteEndpointPolicy' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\NetworkServices\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteGateway' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\NetworkServices\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteGrpcRoute' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\NetworkServices\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteHttpRoute' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\NetworkServices\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteMesh' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\NetworkServices\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteServiceBinding' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\NetworkServices\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteTcpRoute' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\NetworkServices\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteTlsRoute' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\NetworkServices\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UpdateEndpointPolicy' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkServices\V1\EndpointPolicy', + 'metadataReturnType' => '\Google\Cloud\NetworkServices\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'endpoint_policy.name', + 'fieldAccessors' => [ + 'getEndpointPolicy', + 'getName', + ], + ], + ], + ], + 'UpdateGateway' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkServices\V1\Gateway', + 'metadataReturnType' => '\Google\Cloud\NetworkServices\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'gateway.name', + 'fieldAccessors' => [ + 'getGateway', + 'getName', + ], + ], + ], + ], + 'UpdateGrpcRoute' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkServices\V1\GrpcRoute', + 'metadataReturnType' => '\Google\Cloud\NetworkServices\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'grpc_route.name', + 'fieldAccessors' => [ + 'getGrpcRoute', + 'getName', + ], + ], + ], + ], + 'UpdateHttpRoute' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkServices\V1\HttpRoute', + 'metadataReturnType' => '\Google\Cloud\NetworkServices\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'http_route.name', + 'fieldAccessors' => [ + 'getHttpRoute', + 'getName', + ], + ], + ], + ], + 'UpdateMesh' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkServices\V1\Mesh', + 'metadataReturnType' => '\Google\Cloud\NetworkServices\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'mesh.name', + 'fieldAccessors' => [ + 'getMesh', + 'getName', + ], + ], + ], + ], + 'UpdateTcpRoute' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkServices\V1\TcpRoute', + 'metadataReturnType' => '\Google\Cloud\NetworkServices\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'tcp_route.name', + 'fieldAccessors' => [ + 'getTcpRoute', + 'getName', + ], + ], + ], + ], + 'UpdateTlsRoute' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\NetworkServices\V1\TlsRoute', + 'metadataReturnType' => '\Google\Cloud\NetworkServices\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'tls_route.name', + 'fieldAccessors' => [ + 'getTlsRoute', + 'getName', + ], + ], + ], + ], + 'GetEndpointPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\NetworkServices\V1\EndpointPolicy', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetGateway' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\NetworkServices\V1\Gateway', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetGrpcRoute' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\NetworkServices\V1\GrpcRoute', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetHttpRoute' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\NetworkServices\V1\HttpRoute', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetMesh' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\NetworkServices\V1\Mesh', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetServiceBinding' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\NetworkServices\V1\ServiceBinding', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetTcpRoute' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\NetworkServices\V1\TcpRoute', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetTlsRoute' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\NetworkServices\V1\TlsRoute', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListEndpointPolicies' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getEndpointPolicies', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\NetworkServices\V1\ListEndpointPoliciesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListGateways' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getGateways', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\NetworkServices\V1\ListGatewaysResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListGrpcRoutes' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getGrpcRoutes', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\NetworkServices\V1\ListGrpcRoutesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListHttpRoutes' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getHttpRoutes', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\NetworkServices\V1\ListHttpRoutesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListMeshes' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getMeshes', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\NetworkServices\V1\ListMeshesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListServiceBindings' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getServiceBindings', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\NetworkServices\V1\ListServiceBindingsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListTcpRoutes' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getTcpRoutes', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\NetworkServices\V1\ListTcpRoutesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListTlsRoutes' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getTlsRoutes', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\NetworkServices\V1\ListTlsRoutesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'GetLocation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Location\Location', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'GetIamPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'SetIamPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'TestIamPermissions' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'templateMap' => [ + 'authorizationPolicy' => 'projects/{project}/locations/{location}/authorizationPolicies/{authorization_policy}', + 'backendService' => 'projects/{project}/locations/{location}/backendServices/{backend_service}', + 'clientTlsPolicy' => 'projects/{project}/locations/{location}/clientTlsPolicies/{client_tls_policy}', + 'endpointPolicy' => 'projects/{project}/locations/{location}/endpointPolicies/{endpoint_policy}', + 'gateway' => 'projects/{project}/locations/{location}/gateways/{gateway}', + 'grpcRoute' => 'projects/{project}/locations/{location}/grpcRoutes/{grpc_route}', + 'httpRoute' => 'projects/{project}/locations/{location}/httpRoutes/{http_route}', + 'location' => 'projects/{project}/locations/{location}', + 'mesh' => 'projects/{project}/locations/{location}/meshes/{mesh}', + 'serverTlsPolicy' => 'projects/{project}/locations/{location}/serverTlsPolicies/{server_tls_policy}', + 'serviceBinding' => 'projects/{project}/locations/{location}/serviceBindings/{service_binding}', + 'tcpRoute' => 'projects/{project}/locations/{location}/tcpRoutes/{tcp_route}', + 'tlsRoute' => 'projects/{project}/locations/{location}/tlsRoutes/{tls_route}', + ], + ], + ], +]; diff --git a/owl-bot-staging/NetworkServices/v1/src/V1/resources/network_services_rest_client_config.php b/owl-bot-staging/NetworkServices/v1/src/V1/resources/network_services_rest_client_config.php new file mode 100644 index 000000000000..ca9776abdda5 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/src/V1/resources/network_services_rest_client_config.php @@ -0,0 +1,702 @@ + [ + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.cloud.networkservices.v1.NetworkServices' => [ + 'CreateEndpointPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/endpointPolicies', + 'body' => 'endpoint_policy', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'endpoint_policy_id', + ], + ], + 'CreateGateway' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/gateways', + 'body' => 'gateway', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'gateway_id', + ], + ], + 'CreateGrpcRoute' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/grpcRoutes', + 'body' => 'grpc_route', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'grpc_route_id', + ], + ], + 'CreateHttpRoute' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/httpRoutes', + 'body' => 'http_route', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'http_route_id', + ], + ], + 'CreateMesh' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/meshes', + 'body' => 'mesh', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'mesh_id', + ], + ], + 'CreateServiceBinding' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/serviceBindings', + 'body' => 'service_binding', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'service_binding_id', + ], + ], + 'CreateTcpRoute' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/tcpRoutes', + 'body' => 'tcp_route', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'tcp_route_id', + ], + ], + 'CreateTlsRoute' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/tlsRoutes', + 'body' => 'tls_route', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'tls_route_id', + ], + ], + 'DeleteEndpointPolicy' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/endpointPolicies/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteGateway' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/gateways/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteGrpcRoute' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/grpcRoutes/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteHttpRoute' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/httpRoutes/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteMesh' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/meshes/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteServiceBinding' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/serviceBindings/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteTcpRoute' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tcpRoutes/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteTlsRoute' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tlsRoutes/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetEndpointPolicy' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/endpointPolicies/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetGateway' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/gateways/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetGrpcRoute' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/grpcRoutes/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetHttpRoute' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/httpRoutes/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetMesh' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/meshes/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetServiceBinding' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/serviceBindings/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetTcpRoute' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tcpRoutes/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetTlsRoute' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tlsRoutes/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListEndpointPolicies' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/endpointPolicies', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListGateways' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/gateways', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListGrpcRoutes' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/grpcRoutes', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListHttpRoutes' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/httpRoutes', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListMeshes' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/meshes', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListServiceBindings' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/serviceBindings', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListTcpRoutes' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/tcpRoutes', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListTlsRoutes' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/tlsRoutes', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateEndpointPolicy' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{endpoint_policy.name=projects/*/locations/*/endpointPolicies/*}', + 'body' => 'endpoint_policy', + 'placeholders' => [ + 'endpoint_policy.name' => [ + 'getters' => [ + 'getEndpointPolicy', + 'getName', + ], + ], + ], + ], + 'UpdateGateway' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{gateway.name=projects/*/locations/*/gateways/*}', + 'body' => 'gateway', + 'placeholders' => [ + 'gateway.name' => [ + 'getters' => [ + 'getGateway', + 'getName', + ], + ], + ], + ], + 'UpdateGrpcRoute' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{grpc_route.name=projects/*/locations/*/grpcRoutes/*}', + 'body' => 'grpc_route', + 'placeholders' => [ + 'grpc_route.name' => [ + 'getters' => [ + 'getGrpcRoute', + 'getName', + ], + ], + ], + ], + 'UpdateHttpRoute' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{http_route.name=projects/*/locations/*/httpRoutes/*}', + 'body' => 'http_route', + 'placeholders' => [ + 'http_route.name' => [ + 'getters' => [ + 'getHttpRoute', + 'getName', + ], + ], + ], + ], + 'UpdateMesh' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{mesh.name=projects/*/locations/*/meshes/*}', + 'body' => 'mesh', + 'placeholders' => [ + 'mesh.name' => [ + 'getters' => [ + 'getMesh', + 'getName', + ], + ], + ], + ], + 'UpdateTcpRoute' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{tcp_route.name=projects/*/locations/*/tcpRoutes/*}', + 'body' => 'tcp_route', + 'placeholders' => [ + 'tcp_route.name' => [ + 'getters' => [ + 'getTcpRoute', + 'getName', + ], + ], + ], + ], + 'UpdateTlsRoute' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{tls_route.name=projects/*/locations/*/tlsRoutes/*}', + 'body' => 'tls_route', + 'placeholders' => [ + 'tls_route.name' => [ + 'getters' => [ + 'getTlsRoute', + 'getName', + ], + ], + ], + ], + ], + 'google.iam.v1.IAMPolicy' => [ + 'GetIamPolicy' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/edgeCacheKeysets/*}:getIamPolicy', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/edgeCacheOrigins/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/edgeCacheServices/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/endpointPolicies/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/serviceBindings/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/meshes/*}:getIamPolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/gateways/*}:getIamPolicy', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'SetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/edgeCacheKeysets/*}:setIamPolicy', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/edgeCacheOrigins/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/edgeCacheServices/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/endpointPolicies/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/serviceBindings/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/meshes/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/gateways/*}:setIamPolicy', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'TestIamPermissions' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/edgeCacheKeysets/*}:testIamPermissions', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/edgeCacheOrigins/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/edgeCacheServices/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/endpointPolicies/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/serviceBindings/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/meshes/*}:testIamPermissions', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/gateways/*}:testIamPermissions', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/NetworkServices/v1/tests/Unit/V1/Client/DepServiceClientTest.php b/owl-bot-staging/NetworkServices/v1/tests/Unit/V1/Client/DepServiceClientTest.php new file mode 100644 index 000000000000..f695dae0e7b6 --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/tests/Unit/V1/Client/DepServiceClientTest.php @@ -0,0 +1,1609 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return DepServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new DepServiceClient($options); + } + + /** @test */ + public function createLbRouteExtensionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createLbRouteExtensionTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $expectedResponse = new LbRouteExtension(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createLbRouteExtensionTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $lbRouteExtensionId = 'lbRouteExtensionId1673910458'; + $lbRouteExtension = new LbRouteExtension(); + $lbRouteExtensionName = 'lbRouteExtensionName-498882633'; + $lbRouteExtension->setName($lbRouteExtensionName); + $lbRouteExtensionForwardingRules = []; + $lbRouteExtension->setForwardingRules($lbRouteExtensionForwardingRules); + $lbRouteExtensionExtensionChains = []; + $lbRouteExtension->setExtensionChains($lbRouteExtensionExtensionChains); + $lbRouteExtensionLoadBalancingScheme = LoadBalancingScheme::LOAD_BALANCING_SCHEME_UNSPECIFIED; + $lbRouteExtension->setLoadBalancingScheme($lbRouteExtensionLoadBalancingScheme); + $request = (new CreateLbRouteExtensionRequest()) + ->setParent($formattedParent) + ->setLbRouteExtensionId($lbRouteExtensionId) + ->setLbRouteExtension($lbRouteExtension); + $response = $gapicClient->createLbRouteExtension($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networkservices.v1.DepService/CreateLbRouteExtension', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getLbRouteExtensionId(); + $this->assertProtobufEquals($lbRouteExtensionId, $actualValue); + $actualValue = $actualApiRequestObject->getLbRouteExtension(); + $this->assertProtobufEquals($lbRouteExtension, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createLbRouteExtensionTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createLbRouteExtensionExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createLbRouteExtensionTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $lbRouteExtensionId = 'lbRouteExtensionId1673910458'; + $lbRouteExtension = new LbRouteExtension(); + $lbRouteExtensionName = 'lbRouteExtensionName-498882633'; + $lbRouteExtension->setName($lbRouteExtensionName); + $lbRouteExtensionForwardingRules = []; + $lbRouteExtension->setForwardingRules($lbRouteExtensionForwardingRules); + $lbRouteExtensionExtensionChains = []; + $lbRouteExtension->setExtensionChains($lbRouteExtensionExtensionChains); + $lbRouteExtensionLoadBalancingScheme = LoadBalancingScheme::LOAD_BALANCING_SCHEME_UNSPECIFIED; + $lbRouteExtension->setLoadBalancingScheme($lbRouteExtensionLoadBalancingScheme); + $request = (new CreateLbRouteExtensionRequest()) + ->setParent($formattedParent) + ->setLbRouteExtensionId($lbRouteExtensionId) + ->setLbRouteExtension($lbRouteExtension); + $response = $gapicClient->createLbRouteExtension($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createLbRouteExtensionTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createLbTrafficExtensionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createLbTrafficExtensionTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $expectedResponse = new LbTrafficExtension(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createLbTrafficExtensionTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $lbTrafficExtensionId = 'lbTrafficExtensionId1573377862'; + $lbTrafficExtension = new LbTrafficExtension(); + $lbTrafficExtensionName = 'lbTrafficExtensionName1872015107'; + $lbTrafficExtension->setName($lbTrafficExtensionName); + $lbTrafficExtensionForwardingRules = []; + $lbTrafficExtension->setForwardingRules($lbTrafficExtensionForwardingRules); + $lbTrafficExtensionExtensionChains = []; + $lbTrafficExtension->setExtensionChains($lbTrafficExtensionExtensionChains); + $lbTrafficExtensionLoadBalancingScheme = LoadBalancingScheme::LOAD_BALANCING_SCHEME_UNSPECIFIED; + $lbTrafficExtension->setLoadBalancingScheme($lbTrafficExtensionLoadBalancingScheme); + $request = (new CreateLbTrafficExtensionRequest()) + ->setParent($formattedParent) + ->setLbTrafficExtensionId($lbTrafficExtensionId) + ->setLbTrafficExtension($lbTrafficExtension); + $response = $gapicClient->createLbTrafficExtension($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networkservices.v1.DepService/CreateLbTrafficExtension', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getLbTrafficExtensionId(); + $this->assertProtobufEquals($lbTrafficExtensionId, $actualValue); + $actualValue = $actualApiRequestObject->getLbTrafficExtension(); + $this->assertProtobufEquals($lbTrafficExtension, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createLbTrafficExtensionTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createLbTrafficExtensionExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createLbTrafficExtensionTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $lbTrafficExtensionId = 'lbTrafficExtensionId1573377862'; + $lbTrafficExtension = new LbTrafficExtension(); + $lbTrafficExtensionName = 'lbTrafficExtensionName1872015107'; + $lbTrafficExtension->setName($lbTrafficExtensionName); + $lbTrafficExtensionForwardingRules = []; + $lbTrafficExtension->setForwardingRules($lbTrafficExtensionForwardingRules); + $lbTrafficExtensionExtensionChains = []; + $lbTrafficExtension->setExtensionChains($lbTrafficExtensionExtensionChains); + $lbTrafficExtensionLoadBalancingScheme = LoadBalancingScheme::LOAD_BALANCING_SCHEME_UNSPECIFIED; + $lbTrafficExtension->setLoadBalancingScheme($lbTrafficExtensionLoadBalancingScheme); + $request = (new CreateLbTrafficExtensionRequest()) + ->setParent($formattedParent) + ->setLbTrafficExtensionId($lbTrafficExtensionId) + ->setLbTrafficExtension($lbTrafficExtension); + $response = $gapicClient->createLbTrafficExtension($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createLbTrafficExtensionTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteLbRouteExtensionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteLbRouteExtensionTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteLbRouteExtensionTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->lbRouteExtensionName('[PROJECT]', '[LOCATION]', '[LB_ROUTE_EXTENSION]'); + $request = (new DeleteLbRouteExtensionRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteLbRouteExtension($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networkservices.v1.DepService/DeleteLbRouteExtension', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteLbRouteExtensionTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteLbRouteExtensionExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteLbRouteExtensionTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->lbRouteExtensionName('[PROJECT]', '[LOCATION]', '[LB_ROUTE_EXTENSION]'); + $request = (new DeleteLbRouteExtensionRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteLbRouteExtension($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteLbRouteExtensionTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteLbTrafficExtensionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteLbTrafficExtensionTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteLbTrafficExtensionTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->lbTrafficExtensionName('[PROJECT]', '[LOCATION]', '[LB_TRAFFIC_EXTENSION]'); + $request = (new DeleteLbTrafficExtensionRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteLbTrafficExtension($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networkservices.v1.DepService/DeleteLbTrafficExtension', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteLbTrafficExtensionTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteLbTrafficExtensionExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteLbTrafficExtensionTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->lbTrafficExtensionName('[PROJECT]', '[LOCATION]', '[LB_TRAFFIC_EXTENSION]'); + $request = (new DeleteLbTrafficExtensionRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteLbTrafficExtension($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteLbTrafficExtensionTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getLbRouteExtensionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $expectedResponse = new LbRouteExtension(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->lbRouteExtensionName('[PROJECT]', '[LOCATION]', '[LB_ROUTE_EXTENSION]'); + $request = (new GetLbRouteExtensionRequest()) + ->setName($formattedName); + $response = $gapicClient->getLbRouteExtension($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networkservices.v1.DepService/GetLbRouteExtension', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLbRouteExtensionExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->lbRouteExtensionName('[PROJECT]', '[LOCATION]', '[LB_ROUTE_EXTENSION]'); + $request = (new GetLbRouteExtensionRequest()) + ->setName($formattedName); + try { + $gapicClient->getLbRouteExtension($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLbTrafficExtensionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $expectedResponse = new LbTrafficExtension(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->lbTrafficExtensionName('[PROJECT]', '[LOCATION]', '[LB_TRAFFIC_EXTENSION]'); + $request = (new GetLbTrafficExtensionRequest()) + ->setName($formattedName); + $response = $gapicClient->getLbTrafficExtension($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networkservices.v1.DepService/GetLbTrafficExtension', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLbTrafficExtensionExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->lbTrafficExtensionName('[PROJECT]', '[LOCATION]', '[LB_TRAFFIC_EXTENSION]'); + $request = (new GetLbTrafficExtensionRequest()) + ->setName($formattedName); + try { + $gapicClient->getLbTrafficExtension($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLbRouteExtensionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $lbRouteExtensionsElement = new LbRouteExtension(); + $lbRouteExtensions = [ + $lbRouteExtensionsElement, + ]; + $expectedResponse = new ListLbRouteExtensionsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setLbRouteExtensions($lbRouteExtensions); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListLbRouteExtensionsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listLbRouteExtensions($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getLbRouteExtensions()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networkservices.v1.DepService/ListLbRouteExtensions', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLbRouteExtensionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListLbRouteExtensionsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listLbRouteExtensions($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLbTrafficExtensionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $lbTrafficExtensionsElement = new LbTrafficExtension(); + $lbTrafficExtensions = [ + $lbTrafficExtensionsElement, + ]; + $expectedResponse = new ListLbTrafficExtensionsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setLbTrafficExtensions($lbTrafficExtensions); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListLbTrafficExtensionsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listLbTrafficExtensions($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getLbTrafficExtensions()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networkservices.v1.DepService/ListLbTrafficExtensions', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLbTrafficExtensionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListLbTrafficExtensionsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listLbTrafficExtensions($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateLbRouteExtensionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateLbRouteExtensionTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $expectedResponse = new LbRouteExtension(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateLbRouteExtensionTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $lbRouteExtension = new LbRouteExtension(); + $lbRouteExtensionName = 'lbRouteExtensionName-498882633'; + $lbRouteExtension->setName($lbRouteExtensionName); + $lbRouteExtensionForwardingRules = []; + $lbRouteExtension->setForwardingRules($lbRouteExtensionForwardingRules); + $lbRouteExtensionExtensionChains = []; + $lbRouteExtension->setExtensionChains($lbRouteExtensionExtensionChains); + $lbRouteExtensionLoadBalancingScheme = LoadBalancingScheme::LOAD_BALANCING_SCHEME_UNSPECIFIED; + $lbRouteExtension->setLoadBalancingScheme($lbRouteExtensionLoadBalancingScheme); + $request = (new UpdateLbRouteExtensionRequest()) + ->setLbRouteExtension($lbRouteExtension); + $response = $gapicClient->updateLbRouteExtension($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networkservices.v1.DepService/UpdateLbRouteExtension', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getLbRouteExtension(); + $this->assertProtobufEquals($lbRouteExtension, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateLbRouteExtensionTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateLbRouteExtensionExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateLbRouteExtensionTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $lbRouteExtension = new LbRouteExtension(); + $lbRouteExtensionName = 'lbRouteExtensionName-498882633'; + $lbRouteExtension->setName($lbRouteExtensionName); + $lbRouteExtensionForwardingRules = []; + $lbRouteExtension->setForwardingRules($lbRouteExtensionForwardingRules); + $lbRouteExtensionExtensionChains = []; + $lbRouteExtension->setExtensionChains($lbRouteExtensionExtensionChains); + $lbRouteExtensionLoadBalancingScheme = LoadBalancingScheme::LOAD_BALANCING_SCHEME_UNSPECIFIED; + $lbRouteExtension->setLoadBalancingScheme($lbRouteExtensionLoadBalancingScheme); + $request = (new UpdateLbRouteExtensionRequest()) + ->setLbRouteExtension($lbRouteExtension); + $response = $gapicClient->updateLbRouteExtension($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateLbRouteExtensionTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateLbTrafficExtensionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateLbTrafficExtensionTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $expectedResponse = new LbTrafficExtension(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateLbTrafficExtensionTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $lbTrafficExtension = new LbTrafficExtension(); + $lbTrafficExtensionName = 'lbTrafficExtensionName1872015107'; + $lbTrafficExtension->setName($lbTrafficExtensionName); + $lbTrafficExtensionForwardingRules = []; + $lbTrafficExtension->setForwardingRules($lbTrafficExtensionForwardingRules); + $lbTrafficExtensionExtensionChains = []; + $lbTrafficExtension->setExtensionChains($lbTrafficExtensionExtensionChains); + $lbTrafficExtensionLoadBalancingScheme = LoadBalancingScheme::LOAD_BALANCING_SCHEME_UNSPECIFIED; + $lbTrafficExtension->setLoadBalancingScheme($lbTrafficExtensionLoadBalancingScheme); + $request = (new UpdateLbTrafficExtensionRequest()) + ->setLbTrafficExtension($lbTrafficExtension); + $response = $gapicClient->updateLbTrafficExtension($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networkservices.v1.DepService/UpdateLbTrafficExtension', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getLbTrafficExtension(); + $this->assertProtobufEquals($lbTrafficExtension, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateLbTrafficExtensionTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateLbTrafficExtensionExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateLbTrafficExtensionTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $lbTrafficExtension = new LbTrafficExtension(); + $lbTrafficExtensionName = 'lbTrafficExtensionName1872015107'; + $lbTrafficExtension->setName($lbTrafficExtensionName); + $lbTrafficExtensionForwardingRules = []; + $lbTrafficExtension->setForwardingRules($lbTrafficExtensionForwardingRules); + $lbTrafficExtensionExtensionChains = []; + $lbTrafficExtension->setExtensionChains($lbTrafficExtensionExtensionChains); + $lbTrafficExtensionLoadBalancingScheme = LoadBalancingScheme::LOAD_BALANCING_SCHEME_UNSPECIFIED; + $lbTrafficExtension->setLoadBalancingScheme($lbTrafficExtensionLoadBalancingScheme); + $request = (new UpdateLbTrafficExtensionRequest()) + ->setLbTrafficExtension($lbTrafficExtension); + $response = $gapicClient->updateLbTrafficExtension($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateLbTrafficExtensionTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getLocationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $locationId = 'locationId552319461'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Location(); + $expectedResponse->setName($name2); + $expectedResponse->setLocationId($locationId); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + $request = new GetLocationRequest(); + $response = $gapicClient->getLocation($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new GetLocationRequest(); + try { + $gapicClient->getLocation($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $locationsElement = new Location(); + $locations = [ + $locationsElement, + ]; + $expectedResponse = new ListLocationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setLocations($locations); + $transport->addResponse($expectedResponse); + $request = new ListLocationsRequest(); + $response = $gapicClient->listLocations($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new ListLocationsRequest(); + try { + $gapicClient->listLocations($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $request = (new GetIamPolicyRequest()) + ->setResource($resource); + $response = $gapicClient->getIamPolicy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $request = (new GetIamPolicyRequest()) + ->setResource($resource); + try { + $gapicClient->getIamPolicy($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $request = (new SetIamPolicyRequest()) + ->setResource($resource) + ->setPolicy($policy); + $response = $gapicClient->setIamPolicy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPolicy(); + $this->assertProtobufEquals($policy, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $request = (new SetIamPolicyRequest()) + ->setResource($resource) + ->setPolicy($policy); + try { + $gapicClient->setIamPolicy($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new TestIamPermissionsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $request = (new TestIamPermissionsRequest()) + ->setResource($resource) + ->setPermissions($permissions); + $response = $gapicClient->testIamPermissions($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPermissions(); + $this->assertProtobufEquals($permissions, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $request = (new TestIamPermissionsRequest()) + ->setResource($resource) + ->setPermissions($permissions); + try { + $gapicClient->testIamPermissions($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createLbRouteExtensionAsyncTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createLbRouteExtensionTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $expectedResponse = new LbRouteExtension(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createLbRouteExtensionTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $lbRouteExtensionId = 'lbRouteExtensionId1673910458'; + $lbRouteExtension = new LbRouteExtension(); + $lbRouteExtensionName = 'lbRouteExtensionName-498882633'; + $lbRouteExtension->setName($lbRouteExtensionName); + $lbRouteExtensionForwardingRules = []; + $lbRouteExtension->setForwardingRules($lbRouteExtensionForwardingRules); + $lbRouteExtensionExtensionChains = []; + $lbRouteExtension->setExtensionChains($lbRouteExtensionExtensionChains); + $lbRouteExtensionLoadBalancingScheme = LoadBalancingScheme::LOAD_BALANCING_SCHEME_UNSPECIFIED; + $lbRouteExtension->setLoadBalancingScheme($lbRouteExtensionLoadBalancingScheme); + $request = (new CreateLbRouteExtensionRequest()) + ->setParent($formattedParent) + ->setLbRouteExtensionId($lbRouteExtensionId) + ->setLbRouteExtension($lbRouteExtension); + $response = $gapicClient->createLbRouteExtensionAsync($request)->wait(); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networkservices.v1.DepService/CreateLbRouteExtension', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getLbRouteExtensionId(); + $this->assertProtobufEquals($lbRouteExtensionId, $actualValue); + $actualValue = $actualApiRequestObject->getLbRouteExtension(); + $this->assertProtobufEquals($lbRouteExtension, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createLbRouteExtensionTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } +} diff --git a/owl-bot-staging/NetworkServices/v1/tests/Unit/V1/Client/NetworkServicesClientTest.php b/owl-bot-staging/NetworkServices/v1/tests/Unit/V1/Client/NetworkServicesClientTest.php new file mode 100644 index 000000000000..0032e21ee36e --- /dev/null +++ b/owl-bot-staging/NetworkServices/v1/tests/Unit/V1/Client/NetworkServicesClientTest.php @@ -0,0 +1,4812 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return NetworkServicesClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new NetworkServicesClient($options); + } + + /** @test */ + public function createEndpointPolicyTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createEndpointPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $authorizationPolicy = 'authorizationPolicy-1576667208'; + $description = 'description-1724546052'; + $serverTlsPolicy = 'serverTlsPolicy1906438002'; + $clientTlsPolicy = 'clientTlsPolicy-611416598'; + $expectedResponse = new EndpointPolicy(); + $expectedResponse->setName($name); + $expectedResponse->setAuthorizationPolicy($authorizationPolicy); + $expectedResponse->setDescription($description); + $expectedResponse->setServerTlsPolicy($serverTlsPolicy); + $expectedResponse->setClientTlsPolicy($clientTlsPolicy); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createEndpointPolicyTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $endpointPolicyId = 'endpointPolicyId-969914082'; + $endpointPolicy = new EndpointPolicy(); + $endpointPolicyName = 'endpointPolicyName36531794'; + $endpointPolicy->setName($endpointPolicyName); + $endpointPolicyType = EndpointPolicyType::ENDPOINT_POLICY_TYPE_UNSPECIFIED; + $endpointPolicy->setType($endpointPolicyType); + $endpointPolicyEndpointMatcher = new EndpointMatcher(); + $endpointPolicy->setEndpointMatcher($endpointPolicyEndpointMatcher); + $request = (new CreateEndpointPolicyRequest()) + ->setParent($formattedParent) + ->setEndpointPolicyId($endpointPolicyId) + ->setEndpointPolicy($endpointPolicy); + $response = $gapicClient->createEndpointPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networkservices.v1.NetworkServices/CreateEndpointPolicy', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getEndpointPolicyId(); + $this->assertProtobufEquals($endpointPolicyId, $actualValue); + $actualValue = $actualApiRequestObject->getEndpointPolicy(); + $this->assertProtobufEquals($endpointPolicy, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createEndpointPolicyTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createEndpointPolicyExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createEndpointPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $endpointPolicyId = 'endpointPolicyId-969914082'; + $endpointPolicy = new EndpointPolicy(); + $endpointPolicyName = 'endpointPolicyName36531794'; + $endpointPolicy->setName($endpointPolicyName); + $endpointPolicyType = EndpointPolicyType::ENDPOINT_POLICY_TYPE_UNSPECIFIED; + $endpointPolicy->setType($endpointPolicyType); + $endpointPolicyEndpointMatcher = new EndpointMatcher(); + $endpointPolicy->setEndpointMatcher($endpointPolicyEndpointMatcher); + $request = (new CreateEndpointPolicyRequest()) + ->setParent($formattedParent) + ->setEndpointPolicyId($endpointPolicyId) + ->setEndpointPolicy($endpointPolicy); + $response = $gapicClient->createEndpointPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createEndpointPolicyTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createGatewayTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createGatewayTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $selfLink = 'selfLink-1691268851'; + $description = 'description-1724546052'; + $scope = 'scope109264468'; + $serverTlsPolicy = 'serverTlsPolicy1906438002'; + $expectedResponse = new Gateway(); + $expectedResponse->setName($name); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setDescription($description); + $expectedResponse->setScope($scope); + $expectedResponse->setServerTlsPolicy($serverTlsPolicy); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createGatewayTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $gatewayId = 'gatewayId955798774'; + $gateway = new Gateway(); + $gatewayName = 'gatewayName-435522833'; + $gateway->setName($gatewayName); + $gatewayPorts = []; + $gateway->setPorts($gatewayPorts); + $gatewayScope = 'gatewayScope-611626384'; + $gateway->setScope($gatewayScope); + $request = (new CreateGatewayRequest()) + ->setParent($formattedParent) + ->setGatewayId($gatewayId) + ->setGateway($gateway); + $response = $gapicClient->createGateway($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networkservices.v1.NetworkServices/CreateGateway', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getGatewayId(); + $this->assertProtobufEquals($gatewayId, $actualValue); + $actualValue = $actualApiRequestObject->getGateway(); + $this->assertProtobufEquals($gateway, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createGatewayTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createGatewayExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createGatewayTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $gatewayId = 'gatewayId955798774'; + $gateway = new Gateway(); + $gatewayName = 'gatewayName-435522833'; + $gateway->setName($gatewayName); + $gatewayPorts = []; + $gateway->setPorts($gatewayPorts); + $gatewayScope = 'gatewayScope-611626384'; + $gateway->setScope($gatewayScope); + $request = (new CreateGatewayRequest()) + ->setParent($formattedParent) + ->setGatewayId($gatewayId) + ->setGateway($gateway); + $response = $gapicClient->createGateway($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createGatewayTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createGrpcRouteTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createGrpcRouteTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $selfLink = 'selfLink-1691268851'; + $description = 'description-1724546052'; + $expectedResponse = new GrpcRoute(); + $expectedResponse->setName($name); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createGrpcRouteTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $grpcRouteId = 'grpcRouteId100668882'; + $grpcRoute = new GrpcRoute(); + $grpcRouteName = 'grpcRouteName-2118800906'; + $grpcRoute->setName($grpcRouteName); + $grpcRouteHostnames = []; + $grpcRoute->setHostnames($grpcRouteHostnames); + $grpcRouteRules = []; + $grpcRoute->setRules($grpcRouteRules); + $request = (new CreateGrpcRouteRequest()) + ->setParent($formattedParent) + ->setGrpcRouteId($grpcRouteId) + ->setGrpcRoute($grpcRoute); + $response = $gapicClient->createGrpcRoute($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networkservices.v1.NetworkServices/CreateGrpcRoute', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getGrpcRouteId(); + $this->assertProtobufEquals($grpcRouteId, $actualValue); + $actualValue = $actualApiRequestObject->getGrpcRoute(); + $this->assertProtobufEquals($grpcRoute, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createGrpcRouteTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createGrpcRouteExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createGrpcRouteTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $grpcRouteId = 'grpcRouteId100668882'; + $grpcRoute = new GrpcRoute(); + $grpcRouteName = 'grpcRouteName-2118800906'; + $grpcRoute->setName($grpcRouteName); + $grpcRouteHostnames = []; + $grpcRoute->setHostnames($grpcRouteHostnames); + $grpcRouteRules = []; + $grpcRoute->setRules($grpcRouteRules); + $request = (new CreateGrpcRouteRequest()) + ->setParent($formattedParent) + ->setGrpcRouteId($grpcRouteId) + ->setGrpcRoute($grpcRoute); + $response = $gapicClient->createGrpcRoute($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createGrpcRouteTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createHttpRouteTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createHttpRouteTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $selfLink = 'selfLink-1691268851'; + $description = 'description-1724546052'; + $expectedResponse = new HttpRoute(); + $expectedResponse->setName($name); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createHttpRouteTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $httpRouteId = 'httpRouteId-1087115096'; + $httpRoute = new HttpRoute(); + $httpRouteName = 'httpRouteName988382412'; + $httpRoute->setName($httpRouteName); + $httpRouteHostnames = []; + $httpRoute->setHostnames($httpRouteHostnames); + $httpRouteRules = []; + $httpRoute->setRules($httpRouteRules); + $request = (new CreateHttpRouteRequest()) + ->setParent($formattedParent) + ->setHttpRouteId($httpRouteId) + ->setHttpRoute($httpRoute); + $response = $gapicClient->createHttpRoute($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networkservices.v1.NetworkServices/CreateHttpRoute', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getHttpRouteId(); + $this->assertProtobufEquals($httpRouteId, $actualValue); + $actualValue = $actualApiRequestObject->getHttpRoute(); + $this->assertProtobufEquals($httpRoute, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createHttpRouteTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createHttpRouteExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createHttpRouteTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $httpRouteId = 'httpRouteId-1087115096'; + $httpRoute = new HttpRoute(); + $httpRouteName = 'httpRouteName988382412'; + $httpRoute->setName($httpRouteName); + $httpRouteHostnames = []; + $httpRoute->setHostnames($httpRouteHostnames); + $httpRouteRules = []; + $httpRoute->setRules($httpRouteRules); + $request = (new CreateHttpRouteRequest()) + ->setParent($formattedParent) + ->setHttpRouteId($httpRouteId) + ->setHttpRoute($httpRoute); + $response = $gapicClient->createHttpRoute($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createHttpRouteTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createMeshTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createMeshTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $selfLink = 'selfLink-1691268851'; + $description = 'description-1724546052'; + $interceptionPort = 537115930; + $expectedResponse = new Mesh(); + $expectedResponse->setName($name); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setDescription($description); + $expectedResponse->setInterceptionPort($interceptionPort); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createMeshTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $meshId = 'meshId954595501'; + $mesh = new Mesh(); + $meshName = 'meshName-472824296'; + $mesh->setName($meshName); + $request = (new CreateMeshRequest()) + ->setParent($formattedParent) + ->setMeshId($meshId) + ->setMesh($mesh); + $response = $gapicClient->createMesh($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networkservices.v1.NetworkServices/CreateMesh', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getMeshId(); + $this->assertProtobufEquals($meshId, $actualValue); + $actualValue = $actualApiRequestObject->getMesh(); + $this->assertProtobufEquals($mesh, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createMeshTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createMeshExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createMeshTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $meshId = 'meshId954595501'; + $mesh = new Mesh(); + $meshName = 'meshName-472824296'; + $mesh->setName($meshName); + $request = (new CreateMeshRequest()) + ->setParent($formattedParent) + ->setMeshId($meshId) + ->setMesh($mesh); + $response = $gapicClient->createMesh($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createMeshTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createServiceBindingTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createServiceBindingTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $service = 'service1984153269'; + $expectedResponse = new ServiceBinding(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setService($service); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createServiceBindingTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $serviceBindingId = 'serviceBindingId-2088291105'; + $serviceBinding = new ServiceBinding(); + $serviceBindingName = 'serviceBindingName985981115'; + $serviceBinding->setName($serviceBindingName); + $serviceBindingService = 'serviceBindingService344355461'; + $serviceBinding->setService($serviceBindingService); + $request = (new CreateServiceBindingRequest()) + ->setParent($formattedParent) + ->setServiceBindingId($serviceBindingId) + ->setServiceBinding($serviceBinding); + $response = $gapicClient->createServiceBinding($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networkservices.v1.NetworkServices/CreateServiceBinding', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getServiceBindingId(); + $this->assertProtobufEquals($serviceBindingId, $actualValue); + $actualValue = $actualApiRequestObject->getServiceBinding(); + $this->assertProtobufEquals($serviceBinding, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createServiceBindingTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createServiceBindingExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createServiceBindingTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $serviceBindingId = 'serviceBindingId-2088291105'; + $serviceBinding = new ServiceBinding(); + $serviceBindingName = 'serviceBindingName985981115'; + $serviceBinding->setName($serviceBindingName); + $serviceBindingService = 'serviceBindingService344355461'; + $serviceBinding->setService($serviceBindingService); + $request = (new CreateServiceBindingRequest()) + ->setParent($formattedParent) + ->setServiceBindingId($serviceBindingId) + ->setServiceBinding($serviceBinding); + $response = $gapicClient->createServiceBinding($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createServiceBindingTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createTcpRouteTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createTcpRouteTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $selfLink = 'selfLink-1691268851'; + $description = 'description-1724546052'; + $expectedResponse = new TcpRoute(); + $expectedResponse->setName($name); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createTcpRouteTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $tcpRouteId = 'tcpRouteId-154571409'; + $tcpRoute = new TcpRoute(); + $tcpRouteName = 'tcpRouteName1920926099'; + $tcpRoute->setName($tcpRouteName); + $tcpRouteRules = []; + $tcpRoute->setRules($tcpRouteRules); + $request = (new CreateTcpRouteRequest()) + ->setParent($formattedParent) + ->setTcpRouteId($tcpRouteId) + ->setTcpRoute($tcpRoute); + $response = $gapicClient->createTcpRoute($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networkservices.v1.NetworkServices/CreateTcpRoute', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getTcpRouteId(); + $this->assertProtobufEquals($tcpRouteId, $actualValue); + $actualValue = $actualApiRequestObject->getTcpRoute(); + $this->assertProtobufEquals($tcpRoute, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createTcpRouteTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createTcpRouteExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createTcpRouteTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $tcpRouteId = 'tcpRouteId-154571409'; + $tcpRoute = new TcpRoute(); + $tcpRouteName = 'tcpRouteName1920926099'; + $tcpRoute->setName($tcpRouteName); + $tcpRouteRules = []; + $tcpRoute->setRules($tcpRouteRules); + $request = (new CreateTcpRouteRequest()) + ->setParent($formattedParent) + ->setTcpRouteId($tcpRouteId) + ->setTcpRoute($tcpRoute); + $response = $gapicClient->createTcpRoute($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createTcpRouteTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createTlsRouteTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createTlsRouteTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $selfLink = 'selfLink-1691268851'; + $description = 'description-1724546052'; + $expectedResponse = new TlsRoute(); + $expectedResponse->setName($name); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createTlsRouteTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $tlsRouteId = 'tlsRouteId263195029'; + $tlsRoute = new TlsRoute(); + $tlsRouteName = 'tlsRouteName-1956274759'; + $tlsRoute->setName($tlsRouteName); + $tlsRouteRules = []; + $tlsRoute->setRules($tlsRouteRules); + $request = (new CreateTlsRouteRequest()) + ->setParent($formattedParent) + ->setTlsRouteId($tlsRouteId) + ->setTlsRoute($tlsRoute); + $response = $gapicClient->createTlsRoute($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networkservices.v1.NetworkServices/CreateTlsRoute', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getTlsRouteId(); + $this->assertProtobufEquals($tlsRouteId, $actualValue); + $actualValue = $actualApiRequestObject->getTlsRoute(); + $this->assertProtobufEquals($tlsRoute, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createTlsRouteTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createTlsRouteExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createTlsRouteTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $tlsRouteId = 'tlsRouteId263195029'; + $tlsRoute = new TlsRoute(); + $tlsRouteName = 'tlsRouteName-1956274759'; + $tlsRoute->setName($tlsRouteName); + $tlsRouteRules = []; + $tlsRoute->setRules($tlsRouteRules); + $request = (new CreateTlsRouteRequest()) + ->setParent($formattedParent) + ->setTlsRouteId($tlsRouteId) + ->setTlsRoute($tlsRoute); + $response = $gapicClient->createTlsRoute($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createTlsRouteTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteEndpointPolicyTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteEndpointPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteEndpointPolicyTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->endpointPolicyName('[PROJECT]', '[LOCATION]', '[ENDPOINT_POLICY]'); + $request = (new DeleteEndpointPolicyRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteEndpointPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networkservices.v1.NetworkServices/DeleteEndpointPolicy', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteEndpointPolicyTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteEndpointPolicyExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteEndpointPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->endpointPolicyName('[PROJECT]', '[LOCATION]', '[ENDPOINT_POLICY]'); + $request = (new DeleteEndpointPolicyRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteEndpointPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteEndpointPolicyTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteGatewayTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteGatewayTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteGatewayTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->gatewayName('[PROJECT]', '[LOCATION]', '[GATEWAY]'); + $request = (new DeleteGatewayRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteGateway($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networkservices.v1.NetworkServices/DeleteGateway', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteGatewayTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteGatewayExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteGatewayTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->gatewayName('[PROJECT]', '[LOCATION]', '[GATEWAY]'); + $request = (new DeleteGatewayRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteGateway($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteGatewayTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteGrpcRouteTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteGrpcRouteTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteGrpcRouteTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->grpcRouteName('[PROJECT]', '[LOCATION]', '[GRPC_ROUTE]'); + $request = (new DeleteGrpcRouteRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteGrpcRoute($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networkservices.v1.NetworkServices/DeleteGrpcRoute', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteGrpcRouteTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteGrpcRouteExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteGrpcRouteTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->grpcRouteName('[PROJECT]', '[LOCATION]', '[GRPC_ROUTE]'); + $request = (new DeleteGrpcRouteRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteGrpcRoute($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteGrpcRouteTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteHttpRouteTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteHttpRouteTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteHttpRouteTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->httpRouteName('[PROJECT]', '[LOCATION]', '[HTTP_ROUTE]'); + $request = (new DeleteHttpRouteRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteHttpRoute($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networkservices.v1.NetworkServices/DeleteHttpRoute', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteHttpRouteTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteHttpRouteExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteHttpRouteTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->httpRouteName('[PROJECT]', '[LOCATION]', '[HTTP_ROUTE]'); + $request = (new DeleteHttpRouteRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteHttpRoute($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteHttpRouteTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteMeshTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteMeshTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteMeshTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->meshName('[PROJECT]', '[LOCATION]', '[MESH]'); + $request = (new DeleteMeshRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteMesh($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networkservices.v1.NetworkServices/DeleteMesh', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteMeshTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteMeshExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteMeshTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->meshName('[PROJECT]', '[LOCATION]', '[MESH]'); + $request = (new DeleteMeshRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteMesh($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteMeshTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteServiceBindingTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteServiceBindingTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteServiceBindingTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->serviceBindingName('[PROJECT]', '[LOCATION]', '[SERVICE_BINDING]'); + $request = (new DeleteServiceBindingRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteServiceBinding($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networkservices.v1.NetworkServices/DeleteServiceBinding', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteServiceBindingTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteServiceBindingExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteServiceBindingTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->serviceBindingName('[PROJECT]', '[LOCATION]', '[SERVICE_BINDING]'); + $request = (new DeleteServiceBindingRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteServiceBinding($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteServiceBindingTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteTcpRouteTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteTcpRouteTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteTcpRouteTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->tcpRouteName('[PROJECT]', '[LOCATION]', '[TCP_ROUTE]'); + $request = (new DeleteTcpRouteRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteTcpRoute($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networkservices.v1.NetworkServices/DeleteTcpRoute', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteTcpRouteTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteTcpRouteExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteTcpRouteTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->tcpRouteName('[PROJECT]', '[LOCATION]', '[TCP_ROUTE]'); + $request = (new DeleteTcpRouteRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteTcpRoute($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteTcpRouteTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteTlsRouteTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteTlsRouteTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteTlsRouteTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->tlsRouteName('[PROJECT]', '[LOCATION]', '[TLS_ROUTE]'); + $request = (new DeleteTlsRouteRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteTlsRoute($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networkservices.v1.NetworkServices/DeleteTlsRoute', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteTlsRouteTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteTlsRouteExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteTlsRouteTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->tlsRouteName('[PROJECT]', '[LOCATION]', '[TLS_ROUTE]'); + $request = (new DeleteTlsRouteRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteTlsRoute($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteTlsRouteTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getEndpointPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $authorizationPolicy = 'authorizationPolicy-1576667208'; + $description = 'description-1724546052'; + $serverTlsPolicy = 'serverTlsPolicy1906438002'; + $clientTlsPolicy = 'clientTlsPolicy-611416598'; + $expectedResponse = new EndpointPolicy(); + $expectedResponse->setName($name2); + $expectedResponse->setAuthorizationPolicy($authorizationPolicy); + $expectedResponse->setDescription($description); + $expectedResponse->setServerTlsPolicy($serverTlsPolicy); + $expectedResponse->setClientTlsPolicy($clientTlsPolicy); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->endpointPolicyName('[PROJECT]', '[LOCATION]', '[ENDPOINT_POLICY]'); + $request = (new GetEndpointPolicyRequest()) + ->setName($formattedName); + $response = $gapicClient->getEndpointPolicy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networkservices.v1.NetworkServices/GetEndpointPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getEndpointPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->endpointPolicyName('[PROJECT]', '[LOCATION]', '[ENDPOINT_POLICY]'); + $request = (new GetEndpointPolicyRequest()) + ->setName($formattedName); + try { + $gapicClient->getEndpointPolicy($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getGatewayTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $selfLink = 'selfLink-1691268851'; + $description = 'description-1724546052'; + $scope = 'scope109264468'; + $serverTlsPolicy = 'serverTlsPolicy1906438002'; + $expectedResponse = new Gateway(); + $expectedResponse->setName($name2); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setDescription($description); + $expectedResponse->setScope($scope); + $expectedResponse->setServerTlsPolicy($serverTlsPolicy); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->gatewayName('[PROJECT]', '[LOCATION]', '[GATEWAY]'); + $request = (new GetGatewayRequest()) + ->setName($formattedName); + $response = $gapicClient->getGateway($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networkservices.v1.NetworkServices/GetGateway', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getGatewayExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->gatewayName('[PROJECT]', '[LOCATION]', '[GATEWAY]'); + $request = (new GetGatewayRequest()) + ->setName($formattedName); + try { + $gapicClient->getGateway($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getGrpcRouteTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $selfLink = 'selfLink-1691268851'; + $description = 'description-1724546052'; + $expectedResponse = new GrpcRoute(); + $expectedResponse->setName($name2); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->grpcRouteName('[PROJECT]', '[LOCATION]', '[GRPC_ROUTE]'); + $request = (new GetGrpcRouteRequest()) + ->setName($formattedName); + $response = $gapicClient->getGrpcRoute($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networkservices.v1.NetworkServices/GetGrpcRoute', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getGrpcRouteExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->grpcRouteName('[PROJECT]', '[LOCATION]', '[GRPC_ROUTE]'); + $request = (new GetGrpcRouteRequest()) + ->setName($formattedName); + try { + $gapicClient->getGrpcRoute($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getHttpRouteTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $selfLink = 'selfLink-1691268851'; + $description = 'description-1724546052'; + $expectedResponse = new HttpRoute(); + $expectedResponse->setName($name2); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->httpRouteName('[PROJECT]', '[LOCATION]', '[HTTP_ROUTE]'); + $request = (new GetHttpRouteRequest()) + ->setName($formattedName); + $response = $gapicClient->getHttpRoute($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networkservices.v1.NetworkServices/GetHttpRoute', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getHttpRouteExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->httpRouteName('[PROJECT]', '[LOCATION]', '[HTTP_ROUTE]'); + $request = (new GetHttpRouteRequest()) + ->setName($formattedName); + try { + $gapicClient->getHttpRoute($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getMeshTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $selfLink = 'selfLink-1691268851'; + $description = 'description-1724546052'; + $interceptionPort = 537115930; + $expectedResponse = new Mesh(); + $expectedResponse->setName($name2); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setDescription($description); + $expectedResponse->setInterceptionPort($interceptionPort); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->meshName('[PROJECT]', '[LOCATION]', '[MESH]'); + $request = (new GetMeshRequest()) + ->setName($formattedName); + $response = $gapicClient->getMesh($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networkservices.v1.NetworkServices/GetMesh', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getMeshExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->meshName('[PROJECT]', '[LOCATION]', '[MESH]'); + $request = (new GetMeshRequest()) + ->setName($formattedName); + try { + $gapicClient->getMesh($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getServiceBindingTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $service = 'service1984153269'; + $expectedResponse = new ServiceBinding(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setService($service); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->serviceBindingName('[PROJECT]', '[LOCATION]', '[SERVICE_BINDING]'); + $request = (new GetServiceBindingRequest()) + ->setName($formattedName); + $response = $gapicClient->getServiceBinding($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networkservices.v1.NetworkServices/GetServiceBinding', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getServiceBindingExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->serviceBindingName('[PROJECT]', '[LOCATION]', '[SERVICE_BINDING]'); + $request = (new GetServiceBindingRequest()) + ->setName($formattedName); + try { + $gapicClient->getServiceBinding($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getTcpRouteTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $selfLink = 'selfLink-1691268851'; + $description = 'description-1724546052'; + $expectedResponse = new TcpRoute(); + $expectedResponse->setName($name2); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->tcpRouteName('[PROJECT]', '[LOCATION]', '[TCP_ROUTE]'); + $request = (new GetTcpRouteRequest()) + ->setName($formattedName); + $response = $gapicClient->getTcpRoute($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networkservices.v1.NetworkServices/GetTcpRoute', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getTcpRouteExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->tcpRouteName('[PROJECT]', '[LOCATION]', '[TCP_ROUTE]'); + $request = (new GetTcpRouteRequest()) + ->setName($formattedName); + try { + $gapicClient->getTcpRoute($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getTlsRouteTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $selfLink = 'selfLink-1691268851'; + $description = 'description-1724546052'; + $expectedResponse = new TlsRoute(); + $expectedResponse->setName($name2); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->tlsRouteName('[PROJECT]', '[LOCATION]', '[TLS_ROUTE]'); + $request = (new GetTlsRouteRequest()) + ->setName($formattedName); + $response = $gapicClient->getTlsRoute($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networkservices.v1.NetworkServices/GetTlsRoute', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getTlsRouteExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->tlsRouteName('[PROJECT]', '[LOCATION]', '[TLS_ROUTE]'); + $request = (new GetTlsRouteRequest()) + ->setName($formattedName); + try { + $gapicClient->getTlsRoute($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listEndpointPoliciesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $endpointPoliciesElement = new EndpointPolicy(); + $endpointPolicies = [ + $endpointPoliciesElement, + ]; + $expectedResponse = new ListEndpointPoliciesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setEndpointPolicies($endpointPolicies); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListEndpointPoliciesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listEndpointPolicies($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getEndpointPolicies()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networkservices.v1.NetworkServices/ListEndpointPolicies', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listEndpointPoliciesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListEndpointPoliciesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listEndpointPolicies($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listGatewaysTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $gatewaysElement = new Gateway(); + $gateways = [ + $gatewaysElement, + ]; + $expectedResponse = new ListGatewaysResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setGateways($gateways); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListGatewaysRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listGateways($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getGateways()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networkservices.v1.NetworkServices/ListGateways', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listGatewaysExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListGatewaysRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listGateways($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listGrpcRoutesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $grpcRoutesElement = new GrpcRoute(); + $grpcRoutes = [ + $grpcRoutesElement, + ]; + $expectedResponse = new ListGrpcRoutesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setGrpcRoutes($grpcRoutes); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListGrpcRoutesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listGrpcRoutes($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getGrpcRoutes()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networkservices.v1.NetworkServices/ListGrpcRoutes', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listGrpcRoutesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListGrpcRoutesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listGrpcRoutes($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listHttpRoutesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $httpRoutesElement = new HttpRoute(); + $httpRoutes = [ + $httpRoutesElement, + ]; + $expectedResponse = new ListHttpRoutesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setHttpRoutes($httpRoutes); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListHttpRoutesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listHttpRoutes($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getHttpRoutes()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networkservices.v1.NetworkServices/ListHttpRoutes', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listHttpRoutesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListHttpRoutesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listHttpRoutes($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listMeshesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $meshesElement = new Mesh(); + $meshes = [ + $meshesElement, + ]; + $expectedResponse = new ListMeshesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setMeshes($meshes); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListMeshesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listMeshes($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getMeshes()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networkservices.v1.NetworkServices/ListMeshes', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listMeshesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListMeshesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listMeshes($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listServiceBindingsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $serviceBindingsElement = new ServiceBinding(); + $serviceBindings = [ + $serviceBindingsElement, + ]; + $expectedResponse = new ListServiceBindingsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setServiceBindings($serviceBindings); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListServiceBindingsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listServiceBindings($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getServiceBindings()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networkservices.v1.NetworkServices/ListServiceBindings', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listServiceBindingsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListServiceBindingsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listServiceBindings($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listTcpRoutesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $tcpRoutesElement = new TcpRoute(); + $tcpRoutes = [ + $tcpRoutesElement, + ]; + $expectedResponse = new ListTcpRoutesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTcpRoutes($tcpRoutes); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListTcpRoutesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listTcpRoutes($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getTcpRoutes()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networkservices.v1.NetworkServices/ListTcpRoutes', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listTcpRoutesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListTcpRoutesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listTcpRoutes($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listTlsRoutesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $tlsRoutesElement = new TlsRoute(); + $tlsRoutes = [ + $tlsRoutesElement, + ]; + $expectedResponse = new ListTlsRoutesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTlsRoutes($tlsRoutes); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListTlsRoutesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listTlsRoutes($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getTlsRoutes()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networkservices.v1.NetworkServices/ListTlsRoutes', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listTlsRoutesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListTlsRoutesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listTlsRoutes($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateEndpointPolicyTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateEndpointPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $authorizationPolicy = 'authorizationPolicy-1576667208'; + $description = 'description-1724546052'; + $serverTlsPolicy = 'serverTlsPolicy1906438002'; + $clientTlsPolicy = 'clientTlsPolicy-611416598'; + $expectedResponse = new EndpointPolicy(); + $expectedResponse->setName($name); + $expectedResponse->setAuthorizationPolicy($authorizationPolicy); + $expectedResponse->setDescription($description); + $expectedResponse->setServerTlsPolicy($serverTlsPolicy); + $expectedResponse->setClientTlsPolicy($clientTlsPolicy); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateEndpointPolicyTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $endpointPolicy = new EndpointPolicy(); + $endpointPolicyName = 'endpointPolicyName36531794'; + $endpointPolicy->setName($endpointPolicyName); + $endpointPolicyType = EndpointPolicyType::ENDPOINT_POLICY_TYPE_UNSPECIFIED; + $endpointPolicy->setType($endpointPolicyType); + $endpointPolicyEndpointMatcher = new EndpointMatcher(); + $endpointPolicy->setEndpointMatcher($endpointPolicyEndpointMatcher); + $request = (new UpdateEndpointPolicyRequest()) + ->setEndpointPolicy($endpointPolicy); + $response = $gapicClient->updateEndpointPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networkservices.v1.NetworkServices/UpdateEndpointPolicy', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getEndpointPolicy(); + $this->assertProtobufEquals($endpointPolicy, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateEndpointPolicyTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateEndpointPolicyExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateEndpointPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $endpointPolicy = new EndpointPolicy(); + $endpointPolicyName = 'endpointPolicyName36531794'; + $endpointPolicy->setName($endpointPolicyName); + $endpointPolicyType = EndpointPolicyType::ENDPOINT_POLICY_TYPE_UNSPECIFIED; + $endpointPolicy->setType($endpointPolicyType); + $endpointPolicyEndpointMatcher = new EndpointMatcher(); + $endpointPolicy->setEndpointMatcher($endpointPolicyEndpointMatcher); + $request = (new UpdateEndpointPolicyRequest()) + ->setEndpointPolicy($endpointPolicy); + $response = $gapicClient->updateEndpointPolicy($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateEndpointPolicyTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateGatewayTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateGatewayTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $selfLink = 'selfLink-1691268851'; + $description = 'description-1724546052'; + $scope = 'scope109264468'; + $serverTlsPolicy = 'serverTlsPolicy1906438002'; + $expectedResponse = new Gateway(); + $expectedResponse->setName($name); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setDescription($description); + $expectedResponse->setScope($scope); + $expectedResponse->setServerTlsPolicy($serverTlsPolicy); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateGatewayTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $gateway = new Gateway(); + $gatewayName = 'gatewayName-435522833'; + $gateway->setName($gatewayName); + $gatewayPorts = []; + $gateway->setPorts($gatewayPorts); + $gatewayScope = 'gatewayScope-611626384'; + $gateway->setScope($gatewayScope); + $request = (new UpdateGatewayRequest()) + ->setGateway($gateway); + $response = $gapicClient->updateGateway($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networkservices.v1.NetworkServices/UpdateGateway', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getGateway(); + $this->assertProtobufEquals($gateway, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateGatewayTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateGatewayExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateGatewayTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $gateway = new Gateway(); + $gatewayName = 'gatewayName-435522833'; + $gateway->setName($gatewayName); + $gatewayPorts = []; + $gateway->setPorts($gatewayPorts); + $gatewayScope = 'gatewayScope-611626384'; + $gateway->setScope($gatewayScope); + $request = (new UpdateGatewayRequest()) + ->setGateway($gateway); + $response = $gapicClient->updateGateway($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateGatewayTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateGrpcRouteTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateGrpcRouteTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $selfLink = 'selfLink-1691268851'; + $description = 'description-1724546052'; + $expectedResponse = new GrpcRoute(); + $expectedResponse->setName($name); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateGrpcRouteTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $grpcRoute = new GrpcRoute(); + $grpcRouteName = 'grpcRouteName-2118800906'; + $grpcRoute->setName($grpcRouteName); + $grpcRouteHostnames = []; + $grpcRoute->setHostnames($grpcRouteHostnames); + $grpcRouteRules = []; + $grpcRoute->setRules($grpcRouteRules); + $request = (new UpdateGrpcRouteRequest()) + ->setGrpcRoute($grpcRoute); + $response = $gapicClient->updateGrpcRoute($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networkservices.v1.NetworkServices/UpdateGrpcRoute', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getGrpcRoute(); + $this->assertProtobufEquals($grpcRoute, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateGrpcRouteTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateGrpcRouteExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateGrpcRouteTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $grpcRoute = new GrpcRoute(); + $grpcRouteName = 'grpcRouteName-2118800906'; + $grpcRoute->setName($grpcRouteName); + $grpcRouteHostnames = []; + $grpcRoute->setHostnames($grpcRouteHostnames); + $grpcRouteRules = []; + $grpcRoute->setRules($grpcRouteRules); + $request = (new UpdateGrpcRouteRequest()) + ->setGrpcRoute($grpcRoute); + $response = $gapicClient->updateGrpcRoute($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateGrpcRouteTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateHttpRouteTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateHttpRouteTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $selfLink = 'selfLink-1691268851'; + $description = 'description-1724546052'; + $expectedResponse = new HttpRoute(); + $expectedResponse->setName($name); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateHttpRouteTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $httpRoute = new HttpRoute(); + $httpRouteName = 'httpRouteName988382412'; + $httpRoute->setName($httpRouteName); + $httpRouteHostnames = []; + $httpRoute->setHostnames($httpRouteHostnames); + $httpRouteRules = []; + $httpRoute->setRules($httpRouteRules); + $request = (new UpdateHttpRouteRequest()) + ->setHttpRoute($httpRoute); + $response = $gapicClient->updateHttpRoute($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networkservices.v1.NetworkServices/UpdateHttpRoute', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getHttpRoute(); + $this->assertProtobufEquals($httpRoute, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateHttpRouteTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateHttpRouteExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateHttpRouteTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $httpRoute = new HttpRoute(); + $httpRouteName = 'httpRouteName988382412'; + $httpRoute->setName($httpRouteName); + $httpRouteHostnames = []; + $httpRoute->setHostnames($httpRouteHostnames); + $httpRouteRules = []; + $httpRoute->setRules($httpRouteRules); + $request = (new UpdateHttpRouteRequest()) + ->setHttpRoute($httpRoute); + $response = $gapicClient->updateHttpRoute($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateHttpRouteTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateMeshTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateMeshTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $selfLink = 'selfLink-1691268851'; + $description = 'description-1724546052'; + $interceptionPort = 537115930; + $expectedResponse = new Mesh(); + $expectedResponse->setName($name); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setDescription($description); + $expectedResponse->setInterceptionPort($interceptionPort); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateMeshTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $mesh = new Mesh(); + $meshName = 'meshName-472824296'; + $mesh->setName($meshName); + $request = (new UpdateMeshRequest()) + ->setMesh($mesh); + $response = $gapicClient->updateMesh($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networkservices.v1.NetworkServices/UpdateMesh', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getMesh(); + $this->assertProtobufEquals($mesh, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateMeshTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateMeshExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateMeshTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $mesh = new Mesh(); + $meshName = 'meshName-472824296'; + $mesh->setName($meshName); + $request = (new UpdateMeshRequest()) + ->setMesh($mesh); + $response = $gapicClient->updateMesh($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateMeshTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateTcpRouteTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateTcpRouteTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $selfLink = 'selfLink-1691268851'; + $description = 'description-1724546052'; + $expectedResponse = new TcpRoute(); + $expectedResponse->setName($name); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateTcpRouteTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $tcpRoute = new TcpRoute(); + $tcpRouteName = 'tcpRouteName1920926099'; + $tcpRoute->setName($tcpRouteName); + $tcpRouteRules = []; + $tcpRoute->setRules($tcpRouteRules); + $request = (new UpdateTcpRouteRequest()) + ->setTcpRoute($tcpRoute); + $response = $gapicClient->updateTcpRoute($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networkservices.v1.NetworkServices/UpdateTcpRoute', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getTcpRoute(); + $this->assertProtobufEquals($tcpRoute, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateTcpRouteTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateTcpRouteExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateTcpRouteTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $tcpRoute = new TcpRoute(); + $tcpRouteName = 'tcpRouteName1920926099'; + $tcpRoute->setName($tcpRouteName); + $tcpRouteRules = []; + $tcpRoute->setRules($tcpRouteRules); + $request = (new UpdateTcpRouteRequest()) + ->setTcpRoute($tcpRoute); + $response = $gapicClient->updateTcpRoute($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateTcpRouteTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateTlsRouteTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateTlsRouteTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $selfLink = 'selfLink-1691268851'; + $description = 'description-1724546052'; + $expectedResponse = new TlsRoute(); + $expectedResponse->setName($name); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateTlsRouteTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $tlsRoute = new TlsRoute(); + $tlsRouteName = 'tlsRouteName-1956274759'; + $tlsRoute->setName($tlsRouteName); + $tlsRouteRules = []; + $tlsRoute->setRules($tlsRouteRules); + $request = (new UpdateTlsRouteRequest()) + ->setTlsRoute($tlsRoute); + $response = $gapicClient->updateTlsRoute($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networkservices.v1.NetworkServices/UpdateTlsRoute', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getTlsRoute(); + $this->assertProtobufEquals($tlsRoute, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateTlsRouteTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateTlsRouteExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateTlsRouteTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $tlsRoute = new TlsRoute(); + $tlsRouteName = 'tlsRouteName-1956274759'; + $tlsRoute->setName($tlsRouteName); + $tlsRouteRules = []; + $tlsRoute->setRules($tlsRouteRules); + $request = (new UpdateTlsRouteRequest()) + ->setTlsRoute($tlsRoute); + $response = $gapicClient->updateTlsRoute($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateTlsRouteTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getLocationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $locationId = 'locationId552319461'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Location(); + $expectedResponse->setName($name2); + $expectedResponse->setLocationId($locationId); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + $request = new GetLocationRequest(); + $response = $gapicClient->getLocation($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new GetLocationRequest(); + try { + $gapicClient->getLocation($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $locationsElement = new Location(); + $locations = [ + $locationsElement, + ]; + $expectedResponse = new ListLocationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setLocations($locations); + $transport->addResponse($expectedResponse); + $request = new ListLocationsRequest(); + $response = $gapicClient->listLocations($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new ListLocationsRequest(); + try { + $gapicClient->listLocations($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $request = (new GetIamPolicyRequest()) + ->setResource($resource); + $response = $gapicClient->getIamPolicy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $request = (new GetIamPolicyRequest()) + ->setResource($resource); + try { + $gapicClient->getIamPolicy($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $request = (new SetIamPolicyRequest()) + ->setResource($resource) + ->setPolicy($policy); + $response = $gapicClient->setIamPolicy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPolicy(); + $this->assertProtobufEquals($policy, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $request = (new SetIamPolicyRequest()) + ->setResource($resource) + ->setPolicy($policy); + try { + $gapicClient->setIamPolicy($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new TestIamPermissionsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $request = (new TestIamPermissionsRequest()) + ->setResource($resource) + ->setPermissions($permissions); + $response = $gapicClient->testIamPermissions($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPermissions(); + $this->assertProtobufEquals($permissions, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $request = (new TestIamPermissionsRequest()) + ->setResource($resource) + ->setPermissions($permissions); + try { + $gapicClient->testIamPermissions($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createEndpointPolicyAsyncTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createEndpointPolicyTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $authorizationPolicy = 'authorizationPolicy-1576667208'; + $description = 'description-1724546052'; + $serverTlsPolicy = 'serverTlsPolicy1906438002'; + $clientTlsPolicy = 'clientTlsPolicy-611416598'; + $expectedResponse = new EndpointPolicy(); + $expectedResponse->setName($name); + $expectedResponse->setAuthorizationPolicy($authorizationPolicy); + $expectedResponse->setDescription($description); + $expectedResponse->setServerTlsPolicy($serverTlsPolicy); + $expectedResponse->setClientTlsPolicy($clientTlsPolicy); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createEndpointPolicyTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $endpointPolicyId = 'endpointPolicyId-969914082'; + $endpointPolicy = new EndpointPolicy(); + $endpointPolicyName = 'endpointPolicyName36531794'; + $endpointPolicy->setName($endpointPolicyName); + $endpointPolicyType = EndpointPolicyType::ENDPOINT_POLICY_TYPE_UNSPECIFIED; + $endpointPolicy->setType($endpointPolicyType); + $endpointPolicyEndpointMatcher = new EndpointMatcher(); + $endpointPolicy->setEndpointMatcher($endpointPolicyEndpointMatcher); + $request = (new CreateEndpointPolicyRequest()) + ->setParent($formattedParent) + ->setEndpointPolicyId($endpointPolicyId) + ->setEndpointPolicy($endpointPolicy); + $response = $gapicClient->createEndpointPolicyAsync($request)->wait(); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.networkservices.v1.NetworkServices/CreateEndpointPolicy', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getEndpointPolicyId(); + $this->assertProtobufEquals($endpointPolicyId, $actualValue); + $actualValue = $actualApiRequestObject->getEndpointPolicy(); + $this->assertProtobufEquals($endpointPolicy, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createEndpointPolicyTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } +} diff --git a/owl-bot-staging/Notebooks/v1/proto/src/GPBMetadata/Google/Cloud/Notebooks/V1/DiagnosticConfig.php b/owl-bot-staging/Notebooks/v1/proto/src/GPBMetadata/Google/Cloud/Notebooks/V1/DiagnosticConfig.php new file mode 100644 index 000000000000..50f02d8fca10 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/GPBMetadata/Google/Cloud/Notebooks/V1/DiagnosticConfig.php @@ -0,0 +1,35 @@ +internalAddGeneratedFile( + ' +Ž +1google/cloud/notebooks/v1/diagnostic_config.protogoogle.cloud.notebooks.v1"¾ +DiagnosticConfig + +gcs_bucket ( BàA + relative_path ( BàA +repair_flag_enabled (BàA( +packet_capture_flag_enabled (BàA) +copy_home_files_flag_enabled (BàABu +com.google.cloud.notebooks.v1BDiagnosticConfigProtoPZ;cloud.google.com/go/notebooks/apiv1/notebookspb;notebookspbbproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/GPBMetadata/Google/Cloud/Notebooks/V1/Environment.php b/owl-bot-staging/Notebooks/v1/proto/src/GPBMetadata/Google/Cloud/Notebooks/V1/Environment.php new file mode 100644 index 0000000000000000000000000000000000000000..815e9b0bbb2bfd9f1598eb12d331ebf71bbaa18a GIT binary patch literal 1607 zcmb7EU2oGc6kS_bH+SNrL(mNnrc7EVSfT>jL&`wyx^;V?tI((rid4CY+ZmGBa-2$K z>Kng?KZ3-s;CT}N0mu1h&^82pX>@(h@xA9>pI2|#DFaVn2YZ+!fo(XPLUD>A<5WBC~_AH9^mZl z5OOR6?ln~1A;B#DGB1&=$%uJCuw%FIDVh+<4P)Nboa8F#I~-5(pHZnCCqzzCAeUW! zqmps^HHk%Q+IFhZf!wEB+Ev)&Cit}op8m%omDi$VO>Lc)Zk;x%ug6C^VnpY0f6@A_ zKZ>tV%P426i=>Gtq58D|N|{wF-v-yhjjiNhuD0AN{A?D=cfg8GeCD9(Kpo}7qw*>! z+3{M)&8iesa0e_++yQaX7*`f$r1ZS1U0Ju*caOr%!-aAi+_b1C5Rq>)h8Gol>o4%V z1d*`Z2dj+wVjzdaMZgBp(pHvKX)i&^;#fZXK`23GS<$a2^oc%NI%L(m@!`Dr9&F6j zj+&7|`?H= zPM?oJ>UI~bL?k2R5@#As;c%f<1lLu(x&vnISSmBJl^K`; F@EhZ=3E%(# literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Notebooks/v1/proto/src/GPBMetadata/Google/Cloud/Notebooks/V1/Event.php b/owl-bot-staging/Notebooks/v1/proto/src/GPBMetadata/Google/Cloud/Notebooks/V1/Event.php new file mode 100644 index 0000000000000000000000000000000000000000..0208536c47c1f3e82cfea6fe66f6371811b73561 GIT binary patch literal 1205 zcma)5?QYXB6r~><)a9ef4^%24%otjSSfY(TQ%XT;n{Ac0tYTpjD5!E1w=+v)%W*0d zw0GfYcn%%~$7!=l+XVTMFP(Glx!32u|Hv*Fcm)q}ggFv8fTKAS7Z@^51@&nNN6C1M zIrQn2kq~no!rm!#PF-mC`tD0fjcLMtY{ChplMowzNRz;bsK6siFJoi2Yv37^5+B9_3HjJ0 z@sLDB5EPOhvV%4pqcFyjc@sNMB3}?1!IW?s`M9|aGtCsc$*AnO4VQKX=@8@qynZAw zk5K6KaO`u!1myz>HO&bY`RLL=&Fw|mRE~^cGxKPgH%zvn;0a!>4k5=P;ZaNZP6e*= zH}95VS&VoG1cyNfU!WPG+%&Jdx)!;Onm6VWc^U#u+3j34kev@?(Y_S~dAA2L4b9wN z>UInKDudVm6$9;A2Gdnq^gJ#4Y`5`Zp`h|2hi{0b$1Fk{zl&f^r9m@5m19P^7^awd z0T!Coy@tNfUJB@WliEHgi#fyfqC`I4d$UB|bfK#P+1-^4tqbl4GOQ$w>m^u{Wp@5a z?qzs85`5k%{jmxS9Xwq9sZ~Mg63>tJ8S5 Xl_%zHmj9J?xpP$%G7Iz-xB}oWsTq6k literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Notebooks/v1/proto/src/GPBMetadata/Google/Cloud/Notebooks/V1/Execution.php b/owl-bot-staging/Notebooks/v1/proto/src/GPBMetadata/Google/Cloud/Notebooks/V1/Execution.php new file mode 100644 index 0000000000000000000000000000000000000000..1ff8869b94e5b18ea6e9571ea0f67c5967c690c0 GIT binary patch literal 3375 zcmbVOTT|Oc6pk^*_?UpB(A05nDoq-~BzAC^PR5j^vMoR<7{`{GG~=m8me-&lOB!9= zP==Sz^mp{N|EYb*OyBYo`qZ;4SvDA2s9&tzJ?GnV&VJ|e?F;+RhOhW7ViHI7NSE&% z^WGuhZO8H~%`*6o-|G>F*Q~y+8^p=;e07hn?a91YmEBApcP*e2O2#7uD-aH^&e z%rh0KrD&Gf(+{$7JWCh1u6f@f>G}vHjPNQ9j@yPAL+ud5%}(=i1b%ic;2owanx1pa zeFC?2)Al`O7=ERP@0v|8U+@s^_f#D#i=y|{1ETnjo}FQbpTix?_s*(XMi+ydWanAP z*s7!UUFBHq8v*PrJK+G>3Bl00*%aIR7#3XO40Mes7(UB4y)3YUO_+Uab%F?|ac91` zb}eULS{)f*hx-w3(-MWO(Uh^<=MXYod~q$vYKT*(?lC8}Z*U4M4v6ECcZ#ZyUvTq( zT(Hl81nJBL$hIS_T*OdZn`qg27M&N6_K4|PPRCN6ZgzogmRJ53+7IBqs#E6oET3QBMRUN?CAR{z!*4DP z@gs5^-ggrc1J&@uDo~nw7Rx<`^mwNIhxpP7q@oJL<={@UBJ7BYEQt-JRcqG8inJ+- z)yxep1&OlIlq#7RHxJO1g<4f;RF&1t6n7I+^@g}BwRUkCr%NWOY}H$t>CsZgWda{z zrqXK4d%KyLrN3g3z4Wva^cos}ep6mU7tR9+6ac7a=%TV;%*;gJ zPczA-?;trW2U%ErxmUi(0}R@}*pS87iXfrsb1+*KWTD>Jt7N9i8JMTlXjDL!en~(o z>J?a+IWnAZ6ff*Oj3VjcqwBDcy9Lv9#tOPhIsRUVb9Z5`tGk%g#|k^5O(hi^VR7h& z^9+te*cE6iT7$Ia5Nv+f^AL&F^mH*dv|`vl^U(+pK%tgzW2p?aXtBS7)^kYE`G~OM zKVMuK-ZI(SN1Zj_q#D7kpTgoqH=&Iv=opKTq+zGchqVi)v-DdG5)6X!0P{dTPe$ay ztCrZptciuGQ5PCgZ40TFhGe5vtI-9^lV%HfEml!I zgljxbQW)`dU25PW#bsbls!6gW>_~5@G?aQD1PzvktK64l`mZ#M8X-V)7o3n$^% zX~D2G9EvToa5DTl9nIk=7!mEX{AUb4!@_=f(984DU3EGM*JE$igQpozK-d-ztg)dV zjl{V>GTrX1k9~g-j;`2WxbnYvhE9xJ8|!1ZKejsU%pitmJ$(>On~#Etdu%|bEuH4PnqPnwr?BuNIIDe2F#TVd+eAa<`yNX){yFrj-=Go&O;>i?1^iziZrzC z;fR%tkv-{`EZb)%wteQ6&i6{D<@vg0up$Qqu=FwW9Nl2jVRQd2^Yy;&>%Bux->VXR zuO89&x_d7HjFIknk{aT`Paxr+GdUTVhJ@HY{(EeCnrWH7sgKM*p&qZKfj;sW5??<% zm{^8y+LlBF4U}y6sT5$+*~gBJdcTq)iJD{zG(%6deCAsEs8?g2;hK(byG=Y=sSKGv zH6X3*J`LFtoH>wo0~sroYeK$~e0Rd;xl5AE{E2J5>ZeF)Zb^P z`nhSlmC8)38OWzdTP*b7(p1+S)Kjc;)3vQJv;5_`PtDpfF&un->@23`?)dt(85&>i z_ouc#z=+(PT8C`)1pe|6c9#uB;ZAU}$b+^x4cg-QUOwC^>5f@)Ln8$Nod5FE_-tm0 z@bH81FpqtVqLLq}8yqP7Ck9*S1?HY(9NU&W7?A%ig!dpCw&hL6Ohf+Bw&q_rOpHmf z-E8@J@sr{g7a$fpNV=c+w;U64kT_!(VjN-8!O9k_p6jCt^TdRd2p0<)B#B1YhFs@e zQ_+s=?WR&y4^*X=`%DlZTW@GBrLDBOaz|~{b1`8HHst!dON((qgzb>7dTA$7_}e{5 zMOiIuLXs*2SB^`S5Pl1(^RZ@*^&#WJX3B*dbncE-I{E!)LJc<1cD`<6RSU@zsB5PD z^ak>3L=mCfg)PVSd<}!s^(T%NB)yms5bnW7RPQwV1M>I8 z)ySer;d9s^SDFUXbi=SGmM^YxxJR&aWdqsS4*KIkL>&|E!1`D>PEo5M3{nx>xbS-r z5RhSo*0C&UsQthkifKHMDgWjMr6cPXR@8pxSl#(QSk0g!R{0q#3AQX7lX+~PGi`cO zyo)DNfiO+j;3_lAa4#Gx2jT{oro61;%9Jud+=jKYv8PeC=MahKRZ{pCR)~)$-oxO^ zly{d!4?L@b=$%r_VSQ}57$ew0qlmkYOfu!lGJx$6BMP1%?1)7SE6zHaD(LW<>4=+T zBg!6H!;vRL>;&gxr zFp+BFV0wjA;!;%kA7Jx(36#-c%k|qRi0A7l@0|ipueMA1LB*arZX*BpI3%e`VY|%e z6W`YQSh%s!Qd>_6>yV_1#m}bbNT2bB!J8wsu{5OzuM<&`p_Y^oTCh394(@BVrw!25 z6Z9drCd%-oqKQN*9uh*sI|%57Td-nUefA?ZF=DX^X+DSzaC#3r7m9m^M?~I?aI#3@ zP|hq5S*Iz?Nu9CX54uQ@nEb-PI|1M27Up$7e;=|}_#^ey1L?d4JBzCZbsJ{sCnKhL z%s|C8ZoOV83B z?-bocJkq51rAZ}C#R|LdwHYK$HXOJ(=$tusM2E@A)Vp97VmC%$_a3iemoy zpjwA&UyCZk54xbrV!{t^7C(#%NX}Wz}ttv_lf5tK6Ru5$L z2)`4Bm#{kJB*;}7Q?HD%h;-aMY{@kRk=7yAY8)Ny%hflzc>Zh1%=dsyFf|7b$Hd?R zGY_Y9CH_q;UxHhg>-{ef6#g8?ad|d(@p>V_JsDLwQd)AS(b5*o-8hZcyJ}69wT{w0 zlC?MAJVVLRPM21jd(WPsEv_ziX*of2`sLFva>;9pofo;4YXC9 zl&}GrmU5`JJ4%ZdsHQ>t7;iZB8vTYK9Qkhq%oGerQDx=cMeEem_M1g+Mc8IdLv`vk zxkXWpR-uJ9g>strB`quzUZ&4BspL6n=f2z7ye^8IF}7_is`0o<1+^|1$<( zAkwF+&i<{4Nt51fnz8pUgQ6MTl~IhLJ@-I`!r>d$RAlGm<=ppQ<981EyHt@sdlc)@ zyHv5e_pfNL7d~3ey;|Y3)z9&J0coYeX)Bc}ai!ATJ6YxP%kwAG_lvKBx1hPFBOI;q SX=}l=5kDC`?tFxg0RIC%rsL}X literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Notebooks/v1/proto/src/GPBMetadata/Google/Cloud/Notebooks/V1/InstanceConfig.php b/owl-bot-staging/Notebooks/v1/proto/src/GPBMetadata/Google/Cloud/Notebooks/V1/InstanceConfig.php new file mode 100644 index 000000000000..3b49f1edbedb --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/GPBMetadata/Google/Cloud/Notebooks/V1/InstanceConfig.php @@ -0,0 +1,30 @@ +internalAddGeneratedFile( + ' +ø +/google/cloud/notebooks/v1/instance_config.protogoogle.cloud.notebooks.v1"U +InstanceConfig! +notebook_upgrade_schedule (  +enable_health_monitoring (BÊ +com.google.cloud.notebooks.v1BInstanceConfigProtoPZ;cloud.google.com/go/notebooks/apiv1/notebookspb;notebookspbªGoogle.Cloud.Notebooks.V1ÊGoogle\\Cloud\\Notebooks\\V1êGoogle::Cloud::Notebooks::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/GPBMetadata/Google/Cloud/Notebooks/V1/ManagedService.php b/owl-bot-staging/Notebooks/v1/proto/src/GPBMetadata/Google/Cloud/Notebooks/V1/ManagedService.php new file mode 100644 index 000000000000..6b55c034699c --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/GPBMetadata/Google/Cloud/Notebooks/V1/ManagedService.php @@ -0,0 +1,131 @@ +internalAddGeneratedFile( + ' +ù\' +/google/cloud/notebooks/v1/managed_service.protogoogle.cloud.notebooks.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto1google/cloud/notebooks/v1/diagnostic_config.proto%google/cloud/notebooks/v1/event.proto\'google/cloud/notebooks/v1/runtime.proto#google/longrunning/operations.proto google/protobuf/field_mask.protogoogle/protobuf/timestamp.proto"v +ListRuntimesRequest8 +parent ( B(àAúA" notebooks.googleapis.com/Runtime + page_size ( + +page_token ( "z +ListRuntimesResponse4 +runtimes ( 2".google.cloud.notebooks.v1.Runtime +next_page_token (  + unreachable ( "K +GetRuntimeRequest6 +name ( B(àAúA" + notebooks.googleapis.com/Runtime"· +CreateRuntimeRequest8 +parent ( B(àAúA" + notebooks.googleapis.com/Runtime + +runtime_id ( BàA8 +runtime ( 2".google.cloud.notebooks.v1.RuntimeBàA + +request_id ( "b +DeleteRuntimeRequest6 +name ( B(àAúA" + notebooks.googleapis.com/Runtime + +request_id ( "< +StartRuntimeRequest +name ( BàA + +request_id ( "; +StopRuntimeRequest +name ( BàA + +request_id ( "¤ +SwitchRuntimeRequest +name ( BàA + machine_type ( O +accelerator_config ( 23.google.cloud.notebooks.v1.RuntimeAcceleratorConfig + +request_id ( "< +ResetRuntimeRequest +name ( BàA + +request_id ( "> +UpgradeRuntimeRequest +name ( BàA + +request_id ( " +ReportRuntimeEventRequest6 +name ( B(àAúA" + notebooks.googleapis.com/Runtime +vm_id ( BàA4 +event ( 2 .google.cloud.notebooks.v1.EventBàA"š +UpdateRuntimeRequest8 +runtime ( 2".google.cloud.notebooks.v1.RuntimeBàA4 + update_mask ( 2.google.protobuf.FieldMaskBàA + +request_id ( "p +"RefreshRuntimeTokenInternalRequest6 +name ( B(àAúA" + notebooks.googleapis.com/Runtime +vm_id ( BàA"q +#RefreshRuntimeTokenInternalResponse + access_token ( 4 + expire_time ( 2.google.protobuf.TimestampBàA" +DiagnoseRuntimeRequest6 +name ( B(àAúA" + notebooks.googleapis.com/RuntimeK +diagnostic_config ( 2+.google.cloud.notebooks.v1.DiagnosticConfigBàA2Ò +ManagedNotebookService® + ListRuntimes..google.cloud.notebooks.v1.ListRuntimesRequest/.google.cloud.notebooks.v1.ListRuntimesResponse"=ÚAparent‚Óä“.,/v1/{parent=projects/*/locations/*}/runtimes› + +GetRuntime,.google.cloud.notebooks.v1.GetRuntimeRequest".google.cloud.notebooks.v1.Runtime";ÚAname‚Óä“.,/v1/{name=projects/*/locations/*/runtimes/*}Ù + CreateRuntime/.google.cloud.notebooks.v1.CreateRuntimeRequest.google.longrunning.Operation"xÊA +RuntimeOperationMetadataÚAparent,runtime_id,runtime‚Óä“7",/v1/{parent=projects/*/locations/*}/runtimes:runtimeÛ + UpdateRuntime/.google.cloud.notebooks.v1.UpdateRuntimeRequest.google.longrunning.Operation"zÊA +RuntimeOperationMetadataÚAruntime,update_mask‚Óä“?24/v1/{runtime.name=projects/*/locations/*/runtimes/*}:runtimeÉ + DeleteRuntime/.google.cloud.notebooks.v1.DeleteRuntimeRequest.google.longrunning.Operation"hÊA* +google.protobuf.EmptyOperationMetadataÚAname‚Óä“.*,/v1/{name=projects/*/locations/*/runtimes/*}Â + StartRuntime..google.cloud.notebooks.v1.StartRuntimeRequest.google.longrunning.Operation"cÊA +RuntimeOperationMetadataÚAname‚Óä“7"2/v1/{name=projects/*/locations/*/runtimes/*}:start:*¿ + StopRuntime-.google.cloud.notebooks.v1.StopRuntimeRequest.google.longrunning.Operation"bÊA +RuntimeOperationMetadataÚAname‚Óä“6"1/v1/{name=projects/*/locations/*/runtimes/*}:stop:*Å + SwitchRuntime/.google.cloud.notebooks.v1.SwitchRuntimeRequest.google.longrunning.Operation"dÊA +RuntimeOperationMetadataÚAname‚Óä“8"3/v1/{name=projects/*/locations/*/runtimes/*}:switch:*Â + ResetRuntime..google.cloud.notebooks.v1.ResetRuntimeRequest.google.longrunning.Operation"cÊA +RuntimeOperationMetadataÚAname‚Óä“7"2/v1/{name=projects/*/locations/*/runtimes/*}:reset:*È +UpgradeRuntime0.google.cloud.notebooks.v1.UpgradeRuntimeRequest.google.longrunning.Operation"eÊA +RuntimeOperationMetadataÚAname‚Óä“9"4/v1/{name=projects/*/locations/*/runtimes/*}:upgrade:*Ô +ReportRuntimeEvent4.google.cloud.notebooks.v1.ReportRuntimeEventRequest.google.longrunning.Operation"iÊA +RuntimeOperationMetadataÚAname‚Óä“="8/v1/{name=projects/*/locations/*/runtimes/*}:reportEvent:*þ +RefreshRuntimeTokenInternal=.google.cloud.notebooks.v1.RefreshRuntimeTokenInternalRequest>.google.cloud.notebooks.v1.RefreshRuntimeTokenInternalResponse"`ÚA +name,vm_id‚Óä“M"H/v1/{name=projects/*/locations/*/runtimes/*}:refreshRuntimeTokenInternal:*Ý +DiagnoseRuntime1.google.cloud.notebooks.v1.DiagnoseRuntimeRequest.google.longrunning.Operation"xÊA +RuntimeOperationMetadataÚAname,diagnostic_config‚Óä“:"5/v1/{name=projects/*/locations/*/runtimes/*}:diagnose:*LÊAnotebooks.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformBÌ +com.google.cloud.notebooks.v1BManagedNotebooksProtoPZ;cloud.google.com/go/notebooks/apiv1/notebookspb;notebookspbªGoogle.Cloud.Notebooks.V1ÊGoogle\\Cloud\\Notebooks\\V1êGoogle::Cloud::Notebooks::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/GPBMetadata/Google/Cloud/Notebooks/V1/Runtime.php b/owl-bot-staging/Notebooks/v1/proto/src/GPBMetadata/Google/Cloud/Notebooks/V1/Runtime.php new file mode 100644 index 0000000000000000000000000000000000000000..016bc8df1f3e82c590538b695ef23d0ebb615923 GIT binary patch literal 6123 zcmbVQTW=f36*fs-$U|MImE}^h-E3$FmXUZ+#G>swvwW>vLRRV!6pEtfR?V-)qA zz%^-J?Kn=SOLJz|3EDZ^@oCF(j=kK;M$Qdv-|EpU#{{sA9`*W$N!6WN@eTEjw&5EG zJ6!x=n~5J(Lh*y<#&ZC(Yj~bo7clT0sQA|pT3yRjJ>T&0-$TnImTmc#(Y3zCQ@m6U zjjl&g_Tt*Zz&3r$u~jBewN1MISQVIT?Zdub?Niq_x(6ldnXc9M z9k+%{^Z5?-2j*iV>yPEO49+@K*M*Mx`~@Xns=gc0(cM+mrGDVr&$-?V;B4@9aEZAJ zee2+rMZ4`HJu*%#$Ia)5ry7D>C0eJ_dpDN4=%0hKePX$e-J`aD^W6t#)iE;AK)wFu zvfLe?e_=`E7uxNCtzTh0t`DrkZ1o8K^%xEw-7pfBRk1M3LpD1I+3d;2nw-iReJkfm zBZ>H3`}AsfI<$mb{E=MDLm#6k#}a`bS1ic7#d0GZQ6uY#V(j0Am{Nj8 zG_D^QUD7kmBg>}gD9$D~A7`&rKHC%$Z-l_^E#(DFvlyi57|Jeeu1}Dax?~${z0g5} zxg%AztX6cx3yPVxs$+CiNkx1Erqo?y4EbGVq$HzR%0_$N)l!pI{reKX*N|V@0B^sj4}_2{n}2w zP+}`*8LC#%bgi(by<;Qs%zH?Vcv`s!>D_W+Pv0e%sfZhi*|(@6gRX=>qslK}xv*2N z=mhHv(JCmuw}%SF*l~vw_5BJz&Q#v`sqi(Z!^9OSfjR4Cv0mlEyvm~&{zy&V%Y7%m z&T?JH#KPg&I2L}Mg@p>oTv2PziVH9&zlnd^r#`aMjsMLdBQ zHn+ndxX3Trt01x?pgKY+=rYscVU8N{+>d3xkHX^lbt>E|Y;U8}>IJ=8C;Hpk`PfK9 zs?yX-T7l^0#$JKEe)c34S&POa%(`PUwT&lFFj&qHH`#DZS%$^&)ms=o=LhvI45RY^ z1qLv~f>5vRljbG{Q~3Qf6=&Wb1J<`l^Q%TGp{&Bn*aXv$Pr(J5nvh9m9zd#Wo9=0! zIa#`A5oV8j9yz9`f?_j&k3nJ&1EE{8ykjK|Nh9zb(nhZ$S27lki)=+=#%4yCUk>5o zHa)RSN;qXRVwIHr4wgCray)T7a)`tbVEsr>sWBw&{Dg=Y=n=-o4g;xruLOipM1g6` zZqsi#Z%&Ib9hQcj59u4O(eu)R4!3TypEhWlYFw6~PGK!d@S1yweHv%R1S?O+xO+N2 zJnIU?u?eHLheu4{5v2*{V5;Y|X&Tr{WdUYHmyu5L-#E*&WRCq>`vg{GGK?P>Nobf% ziOdf%SRI(?yvodVZP}HfyN3ldqTGQ*8=Wh>#7ZYuF@iBQ$HzTv7fGkZD`SiuJ)-PO z5w4^tb}xU9A+s#1SP~11?!!#iXwj~R&SSyw+n;Fzc3rFKq*&f9G&QW=<4qj~8HOe) zH_P?6LIfiZ>wT&ERb{VQC=pCja(+d$co$a5RiRW&!2%fz64vO1G06^GT!tlb{_sVB zIFU!rd>?@YX;9e^D{o=JJN10pBVkV+;eqhtdY?#$Y=g_oUjv$pt!;sFaq3#O3*dg} z^CNakrfrRdKHm8yBVjT~8+p{kN=S3U|(3|HAtY+bFr2n_$>+1;lwX z|4G2@%O+TH|JK3V<%n8XBITWvx4uKYqRK9$%rJq8#WL7K24Yq1Lv#KG7F&G&VWD=+ z2`ahyaKfPmEdaAmRCx_cbkOC6rV)3_PbZ+9?+ke*RS2X#8726ZB*G-b6#dk*378Y( zOl+Wo!pfh#GlbCM+WGW)XjbvY?i&L2Hq6@8fA6@*!_JIVrWr42;RL5q+4LZvg%2sj z>J!KAo^saYJ#B==fNylX^gMb}N|=xm&8*?$owpVE=;#IR=+Xp*FN?4&Z|@2Nm|<=! zI>eDL_%mR7k%Ld_w=M-o!r<}))QD0W^jj&8`TRo_9%-wDr7IA(EmI`J66W8+=C3~# zvtpTHM;O6syM%WG>YmUxbBAl#9hz1USQ@_$!01RMSbCXf{BJ&V$08yOYwTJQ5`&So zU%~CmymB3_uH|5U%;47wd|;FM1H^YY;)tE;oO0I*&cb?#<%UCqW6SoKF?+I`GIgg-`r@;U<2zr gPah3lIX@FG#v>2R$W!$WrR8C&{*s*Rt1$ zi}DBkntoBA`xV{w4Wtk$dC9J4&Rou%osXZrk%!*kGjPGTIM}#tJ+L8)E zgK4-NeAjZ!1_Z>X9%p`AxK^t};2DAPOSzJymEq_Bm*X0%)u|$nG514woE>8yc<8&e zsBRfxlAX*a_|iRUo>Fk^I*hDq%KU2ep{s`=v!LG~ncv)~=>eI|8z7-1bpG5Ksa-0> zz^$?OG&UN>+fOv1UbpRx=~JP{a>k8hY9IYsLFIXcsBFcaY9v`TldO7uxSg0Z%cGi~ zP!!8|yD~dIq&y_9uM^iu_d-D$Pn(S$c7Ny5YN~3bh?eBbC@tWH@>)IjSI;S1Xx*lP z=UBJB$h7!idVvadB11uZDJLz;2b7mmgVK_?K0m6cGdon%v}#8Jl$U6O_{{C4Z?%+< z0v6Glthsl`TqrF^pWdSa@j+mE(o$Lx9}7p@X{NMQHJfYPi9m&(c;^Xfbw1P=q-31- zIE)1oqPevQe2}J`9-o>CvYTL(1}geMz~#LxU{FFhCu-lDCs5SI?hVSPbQL>Yz1!?v zwmR+RiE(N)8=KFR0$ORd^!mBDEGP&qxAn`8I4>&eXtiNY&z;2X`Z&+iS31}T1g(Ye1IiRImX_J$AQZTM(;N;OmR#Nv!RnPaL<7ZTzRDuyh&kKCh=) z&kQrOPTeXJs!&geOC=5ni31k|;=+LgLU2NYfI#BUB?75P98fP@5C=|tZ{GW6XJ=>M z&f2NSCHBnseee5y?|a|B=ed2y-m%HW>;g5ZqkFWP-P+H3J2Y!MmSLd$TeGZMo#rcbt5MCHmPfZN>w%l!o65V? z*)u9M=gTC-)OV?C>lK<^Se>~~J-w=XdTGIDFU>Oc(lWA_-k7>YNTsg3Zg!oEA@7qc z{IeTdb)%AXJ>7%&AP4VmiC6*If#{?X=qsv*H<+nPm(sW`&Ml$#R*D z_L6M@>gg;hw8{(tMkpLGB|4+280Mt z-?igy;h)i~uNdM)7OU0Z0N#ZlH69!pc7QIEk0~i#P8gn)vz#zjVSy+Y#IfAo)Yusz zL$?hGbL{N!kT&+&(2H$$K+0R&P_xRZ`?^vOlVhIlKsw0u z1MQ$PM2_rHXDf5W|80~EvqaEv%i!CtUZa_#{__iD)S+K%fWOmfxxxZKz3v~J%rSUB zpqwIUaGNqna^W;(p7EJRe8p@FjzDIBJyF-lvrC5SVGwcGxJ+O_X6p|4stX>kA^s!JdO%GMKz&3`M`XG-WErZwOa{>-T#(xjX1s`IY(F?T zR7yERPMGvvuN+#5tv<*=HcZ%>%8tHOr?7lKKq_4($^s1_A)=Gy2rD5%c+?M4BPFN0<EA!u$$xr3+UQVB|v8AE!trWYHyk zi`Ii95@XC2a;)ytz*5Y+??{&FBsa%bnKwOWf9xtrhkjMkr2hfk=Ps-qCr9`6dV_D> zpw@RIrT!vC)K=?Y5L@)lqm?Wh6TUP*J@QYIUB9eR& z)#XuS@u2E*aR=A;+kw98J1m3KYGSu6l}N@FOwfezB2J_~;i;Mg7Os_Ms2I9!J@fsb!LF9b98Sv z5`#C$z^>>D{X~#1%t*}Fak(6x81BA#a=hh1R}bDN=N4Tw&!$~-^eSb^3DI02C$TyV zc0H7nl$$N__;V5nLO6!tl=>by-(hKSYFN5#YUHmvz>=$Y7!(UUxjsvV@Pz@};m7nr zm(D(x%a4E_jVBS^_I+g1uBXE7B7%CRf)wq%F1zt;ShL!I_p>7CTStu$Iip~+#zH$kM>=P zWySunDRP3Z89eXmSr17%q^5F?WbVxump1N|*EfnA^X1Lu_0{>=#k-61b0ePtVbAcl zZ;hlNQw(k{b;?`&yj{hf5Cwy7!W*C`#8w_%LDmzZfFAwezTXleGde-9hXwi7RV=RX z$)P3wAZSISA`h{9(6G8aywHkGzsvg*$-v#u3yui^? z;JaGHcPISn;Sy0hRuA(iusp9LQb(jhD)Kp z-DoMTdN2+Qenv%bd3rLTdm9xIG%EBk`v}v3z{U|jzD)*$SHh7KS>N~Mi3UlF8i5tj ztfJanU05s5&6hXcT8&mzP#odgyKBY!^KY)Ky$-e2Fd_JOWqqVi86iXX`|Rdi5vr;a zu!;~1h1STC!q2Xg6U*YNO59E{ClkC{G}MgvMf_Iiqqz0w|s(A*@;=SjEC^A68Pw(_rusQa=VhJ?UqqFuXF(0bdohCf;6sxw&sPLXq5%lIjq@=8~D z@r(&!HWI;HDZF+NnDLr1*uRBqu+X966KF+tH_%3%5a3oKfVT_Rdjklkk1Ng4e3FV@ z8Q?_EA51ILUH1@UdkY^T?Ct^`*hLav^5f>+La{f9+*MmNVqkv<39ohTD@}N>WjT?4~!%o zk8Q}$Q)DPSF;{XDcMB6H)c-4q^uMkadez^unfh!4TE_U&4QQcE2;fuN0EgW@Fa(cN zL}{P)D=$g5p`AP-mU5!axT(I>+h#ca-3SBoS7?-DXZ*@_37%LEge0r1IxvdJwdzN% z*OYr4jp%5CTa6?Ix@Ned17mk2%I_iZgc=1t?v^H=Hfn?=+us-_0cknhZ4{L|z3o%2 zdD|sa|5b{dh>W3?DalSnXc0`8fc(`&Zl|fA?+s3a5B-_n`AtS-HZN~7BE$)i^wwk~ zO(U8kv|&*G4*gPedM6TGq&Ug|Oty{PTNM}M7T?V+ykDyG0C=?p(OUtxYQdBTxkk(qX&A%~PHi^OTUHlcAq+s&Yr|d1tinrH%3z0N!>5BL&_@oe+5az%_MY zf`ja3Lvh-O1N`pO#()y>$i`^wW{uJ_wpRe%V#g%SV zD=DIo6{b-Rai$@)gl`b8DY-?a{Ba=C$D1(&J*L({1q|i@6=ovt2EpfB5jBsEmU@MAIAI4*xRk zsttc!zim0YGY~P(!yl=2E~00K@ovxcKTKIoed!jzg%J}o_9t#NEA*`!tOwU_fr|Fl zt^r;Qf8&;$^*=2Mgy-IvdW`Q%;sdzQ7jWgoogle.cloud.notebooks.v1.ContainerImage + */ +class ContainerImage extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The path to the container image repository. For example: + * `gcr.io/{project_id}/{image_name}` + * + * Generated from protobuf field string repository = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $repository = ''; + /** + * The tag of the container image. If not specified, this defaults + * to the latest tag. + * + * Generated from protobuf field string tag = 2; + */ + protected $tag = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $repository + * Required. The path to the container image repository. For example: + * `gcr.io/{project_id}/{image_name}` + * @type string $tag + * The tag of the container image. If not specified, this defaults + * to the latest tag. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V1\Environment::initOnce(); + parent::__construct($data); + } + + /** + * Required. The path to the container image repository. For example: + * `gcr.io/{project_id}/{image_name}` + * + * Generated from protobuf field string repository = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getRepository() + { + return $this->repository; + } + + /** + * Required. The path to the container image repository. For example: + * `gcr.io/{project_id}/{image_name}` + * + * Generated from protobuf field string repository = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setRepository($var) + { + GPBUtil::checkString($var, True); + $this->repository = $var; + + return $this; + } + + /** + * The tag of the container image. If not specified, this defaults + * to the latest tag. + * + * Generated from protobuf field string tag = 2; + * @return string + */ + public function getTag() + { + return $this->tag; + } + + /** + * The tag of the container image. If not specified, this defaults + * to the latest tag. + * + * Generated from protobuf field string tag = 2; + * @param string $var + * @return $this + */ + public function setTag($var) + { + GPBUtil::checkString($var, True); + $this->tag = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/CreateEnvironmentRequest.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/CreateEnvironmentRequest.php new file mode 100644 index 000000000000..ec9ffc493c20 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/CreateEnvironmentRequest.php @@ -0,0 +1,177 @@ +google.cloud.notebooks.v1.CreateEnvironmentRequest + */ +class CreateEnvironmentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Format: `projects/{project_id}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $parent = ''; + /** + * Required. User-defined unique ID of this environment. The `environment_id` must + * be 1 to 63 characters long and contain only lowercase letters, + * numeric characters, and dashes. The first character must be a lowercase + * letter and the last character cannot be a dash. + * + * Generated from protobuf field string environment_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $environment_id = ''; + /** + * Required. The environment to be created. + * + * Generated from protobuf field .google.cloud.notebooks.v1.Environment environment = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $environment = null; + + /** + * @param string $parent Required. Format: `projects/{project_id}/locations/{location}` + * @param \Google\Cloud\Notebooks\V1\Environment $environment Required. The environment to be created. + * @param string $environmentId Required. User-defined unique ID of this environment. The `environment_id` must + * be 1 to 63 characters long and contain only lowercase letters, + * numeric characters, and dashes. The first character must be a lowercase + * letter and the last character cannot be a dash. + * + * @return \Google\Cloud\Notebooks\V1\CreateEnvironmentRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Notebooks\V1\Environment $environment, string $environmentId): self + { + return (new self()) + ->setParent($parent) + ->setEnvironment($environment) + ->setEnvironmentId($environmentId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Format: `projects/{project_id}/locations/{location}` + * @type string $environment_id + * Required. User-defined unique ID of this environment. The `environment_id` must + * be 1 to 63 characters long and contain only lowercase letters, + * numeric characters, and dashes. The first character must be a lowercase + * letter and the last character cannot be a dash. + * @type \Google\Cloud\Notebooks\V1\Environment $environment + * Required. The environment to be created. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. Format: `projects/{project_id}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Format: `projects/{project_id}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. User-defined unique ID of this environment. The `environment_id` must + * be 1 to 63 characters long and contain only lowercase letters, + * numeric characters, and dashes. The first character must be a lowercase + * letter and the last character cannot be a dash. + * + * Generated from protobuf field string environment_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getEnvironmentId() + { + return $this->environment_id; + } + + /** + * Required. User-defined unique ID of this environment. The `environment_id` must + * be 1 to 63 characters long and contain only lowercase letters, + * numeric characters, and dashes. The first character must be a lowercase + * letter and the last character cannot be a dash. + * + * Generated from protobuf field string environment_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setEnvironmentId($var) + { + GPBUtil::checkString($var, True); + $this->environment_id = $var; + + return $this; + } + + /** + * Required. The environment to be created. + * + * Generated from protobuf field .google.cloud.notebooks.v1.Environment environment = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Notebooks\V1\Environment|null + */ + public function getEnvironment() + { + return $this->environment; + } + + public function hasEnvironment() + { + return isset($this->environment); + } + + public function clearEnvironment() + { + unset($this->environment); + } + + /** + * Required. The environment to be created. + * + * Generated from protobuf field .google.cloud.notebooks.v1.Environment environment = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Notebooks\V1\Environment $var + * @return $this + */ + public function setEnvironment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V1\Environment::class); + $this->environment = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/CreateExecutionRequest.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/CreateExecutionRequest.php new file mode 100644 index 000000000000..1a9830086a8e --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/CreateExecutionRequest.php @@ -0,0 +1,168 @@ +google.cloud.notebooks.v1.CreateExecutionRequest + */ +class CreateExecutionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Format: + * `parent=projects/{project_id}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. User-defined unique ID of this execution. + * + * Generated from protobuf field string execution_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $execution_id = ''; + /** + * Required. The execution to be created. + * + * Generated from protobuf field .google.cloud.notebooks.v1.Execution execution = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $execution = null; + + /** + * @param string $parent Required. Format: + * `parent=projects/{project_id}/locations/{location}` + * Please see {@see NotebookServiceClient::executionName()} for help formatting this field. + * @param \Google\Cloud\Notebooks\V1\Execution $execution Required. The execution to be created. + * @param string $executionId Required. User-defined unique ID of this execution. + * + * @return \Google\Cloud\Notebooks\V1\CreateExecutionRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Notebooks\V1\Execution $execution, string $executionId): self + { + return (new self()) + ->setParent($parent) + ->setExecution($execution) + ->setExecutionId($executionId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Format: + * `parent=projects/{project_id}/locations/{location}` + * @type string $execution_id + * Required. User-defined unique ID of this execution. + * @type \Google\Cloud\Notebooks\V1\Execution $execution + * Required. The execution to be created. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. Format: + * `parent=projects/{project_id}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Format: + * `parent=projects/{project_id}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. User-defined unique ID of this execution. + * + * Generated from protobuf field string execution_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getExecutionId() + { + return $this->execution_id; + } + + /** + * Required. User-defined unique ID of this execution. + * + * Generated from protobuf field string execution_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setExecutionId($var) + { + GPBUtil::checkString($var, True); + $this->execution_id = $var; + + return $this; + } + + /** + * Required. The execution to be created. + * + * Generated from protobuf field .google.cloud.notebooks.v1.Execution execution = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Notebooks\V1\Execution|null + */ + public function getExecution() + { + return $this->execution; + } + + public function hasExecution() + { + return isset($this->execution); + } + + public function clearExecution() + { + unset($this->execution); + } + + /** + * Required. The execution to be created. + * + * Generated from protobuf field .google.cloud.notebooks.v1.Execution execution = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Notebooks\V1\Execution $var + * @return $this + */ + public function setExecution($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V1\Execution::class); + $this->execution = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/CreateInstanceRequest.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/CreateInstanceRequest.php new file mode 100644 index 000000000000..939cf437387c --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/CreateInstanceRequest.php @@ -0,0 +1,167 @@ +google.cloud.notebooks.v1.CreateInstanceRequest + */ +class CreateInstanceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Format: + * `parent=projects/{project_id}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $parent = ''; + /** + * Required. User-defined unique ID of this instance. + * + * Generated from protobuf field string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $instance_id = ''; + /** + * Required. The instance to be created. + * + * Generated from protobuf field .google.cloud.notebooks.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $instance = null; + + /** + * @param string $parent Required. Format: + * `parent=projects/{project_id}/locations/{location}` + * @param \Google\Cloud\Notebooks\V1\Instance $instance Required. The instance to be created. + * @param string $instanceId Required. User-defined unique ID of this instance. + * + * @return \Google\Cloud\Notebooks\V1\CreateInstanceRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Notebooks\V1\Instance $instance, string $instanceId): self + { + return (new self()) + ->setParent($parent) + ->setInstance($instance) + ->setInstanceId($instanceId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Format: + * `parent=projects/{project_id}/locations/{location}` + * @type string $instance_id + * Required. User-defined unique ID of this instance. + * @type \Google\Cloud\Notebooks\V1\Instance $instance + * Required. The instance to be created. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. Format: + * `parent=projects/{project_id}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Format: + * `parent=projects/{project_id}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. User-defined unique ID of this instance. + * + * Generated from protobuf field string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getInstanceId() + { + return $this->instance_id; + } + + /** + * Required. User-defined unique ID of this instance. + * + * Generated from protobuf field string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setInstanceId($var) + { + GPBUtil::checkString($var, True); + $this->instance_id = $var; + + return $this; + } + + /** + * Required. The instance to be created. + * + * Generated from protobuf field .google.cloud.notebooks.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Notebooks\V1\Instance|null + */ + public function getInstance() + { + return $this->instance; + } + + public function hasInstance() + { + return isset($this->instance); + } + + public function clearInstance() + { + unset($this->instance); + } + + /** + * Required. The instance to be created. + * + * Generated from protobuf field .google.cloud.notebooks.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Notebooks\V1\Instance $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V1\Instance::class); + $this->instance = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/CreateRuntimeRequest.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/CreateRuntimeRequest.php new file mode 100644 index 000000000000..e243650c684a --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/CreateRuntimeRequest.php @@ -0,0 +1,202 @@ +google.cloud.notebooks.v1.CreateRuntimeRequest + */ +class CreateRuntimeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Format: + * `parent=projects/{project_id}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. User-defined unique ID of this Runtime. + * + * Generated from protobuf field string runtime_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $runtime_id = ''; + /** + * Required. The Runtime to be created. + * + * Generated from protobuf field .google.cloud.notebooks.v1.Runtime runtime = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $runtime = null; + /** + * Idempotent request UUID. + * + * Generated from protobuf field string request_id = 4; + */ + protected $request_id = ''; + + /** + * @param string $parent Required. Format: + * `parent=projects/{project_id}/locations/{location}` + * Please see {@see ManagedNotebookServiceClient::runtimeName()} for help formatting this field. + * @param string $runtimeId Required. User-defined unique ID of this Runtime. + * @param \Google\Cloud\Notebooks\V1\Runtime $runtime Required. The Runtime to be created. + * + * @return \Google\Cloud\Notebooks\V1\CreateRuntimeRequest + * + * @experimental + */ + public static function build(string $parent, string $runtimeId, \Google\Cloud\Notebooks\V1\Runtime $runtime): self + { + return (new self()) + ->setParent($parent) + ->setRuntimeId($runtimeId) + ->setRuntime($runtime); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Format: + * `parent=projects/{project_id}/locations/{location}` + * @type string $runtime_id + * Required. User-defined unique ID of this Runtime. + * @type \Google\Cloud\Notebooks\V1\Runtime $runtime + * Required. The Runtime to be created. + * @type string $request_id + * Idempotent request UUID. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V1\ManagedService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Format: + * `parent=projects/{project_id}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Format: + * `parent=projects/{project_id}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. User-defined unique ID of this Runtime. + * + * Generated from protobuf field string runtime_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getRuntimeId() + { + return $this->runtime_id; + } + + /** + * Required. User-defined unique ID of this Runtime. + * + * Generated from protobuf field string runtime_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setRuntimeId($var) + { + GPBUtil::checkString($var, True); + $this->runtime_id = $var; + + return $this; + } + + /** + * Required. The Runtime to be created. + * + * Generated from protobuf field .google.cloud.notebooks.v1.Runtime runtime = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Notebooks\V1\Runtime|null + */ + public function getRuntime() + { + return $this->runtime; + } + + public function hasRuntime() + { + return isset($this->runtime); + } + + public function clearRuntime() + { + unset($this->runtime); + } + + /** + * Required. The Runtime to be created. + * + * Generated from protobuf field .google.cloud.notebooks.v1.Runtime runtime = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Notebooks\V1\Runtime $var + * @return $this + */ + public function setRuntime($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V1\Runtime::class); + $this->runtime = $var; + + return $this; + } + + /** + * Idempotent request UUID. + * + * Generated from protobuf field string request_id = 4; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Idempotent request UUID. + * + * Generated from protobuf field string request_id = 4; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/CreateScheduleRequest.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/CreateScheduleRequest.php new file mode 100644 index 000000000000..888985827ce4 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/CreateScheduleRequest.php @@ -0,0 +1,168 @@ +google.cloud.notebooks.v1.CreateScheduleRequest + */ +class CreateScheduleRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Format: + * `parent=projects/{project_id}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. User-defined unique ID of this schedule. + * + * Generated from protobuf field string schedule_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $schedule_id = ''; + /** + * Required. The schedule to be created. + * + * Generated from protobuf field .google.cloud.notebooks.v1.Schedule schedule = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $schedule = null; + + /** + * @param string $parent Required. Format: + * `parent=projects/{project_id}/locations/{location}` + * Please see {@see NotebookServiceClient::scheduleName()} for help formatting this field. + * @param \Google\Cloud\Notebooks\V1\Schedule $schedule Required. The schedule to be created. + * @param string $scheduleId Required. User-defined unique ID of this schedule. + * + * @return \Google\Cloud\Notebooks\V1\CreateScheduleRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Notebooks\V1\Schedule $schedule, string $scheduleId): self + { + return (new self()) + ->setParent($parent) + ->setSchedule($schedule) + ->setScheduleId($scheduleId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Format: + * `parent=projects/{project_id}/locations/{location}` + * @type string $schedule_id + * Required. User-defined unique ID of this schedule. + * @type \Google\Cloud\Notebooks\V1\Schedule $schedule + * Required. The schedule to be created. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. Format: + * `parent=projects/{project_id}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Format: + * `parent=projects/{project_id}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. User-defined unique ID of this schedule. + * + * Generated from protobuf field string schedule_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getScheduleId() + { + return $this->schedule_id; + } + + /** + * Required. User-defined unique ID of this schedule. + * + * Generated from protobuf field string schedule_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setScheduleId($var) + { + GPBUtil::checkString($var, True); + $this->schedule_id = $var; + + return $this; + } + + /** + * Required. The schedule to be created. + * + * Generated from protobuf field .google.cloud.notebooks.v1.Schedule schedule = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Notebooks\V1\Schedule|null + */ + public function getSchedule() + { + return $this->schedule; + } + + public function hasSchedule() + { + return isset($this->schedule); + } + + public function clearSchedule() + { + unset($this->schedule); + } + + /** + * Required. The schedule to be created. + * + * Generated from protobuf field .google.cloud.notebooks.v1.Schedule schedule = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Notebooks\V1\Schedule $var + * @return $this + */ + public function setSchedule($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V1\Schedule::class); + $this->schedule = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/DeleteEnvironmentRequest.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/DeleteEnvironmentRequest.php new file mode 100644 index 000000000000..5e6b4395d2c5 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/DeleteEnvironmentRequest.php @@ -0,0 +1,85 @@ +google.cloud.notebooks.v1.DeleteEnvironmentRequest + */ +class DeleteEnvironmentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/environments/{environment_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + + /** + * @param string $name Required. Format: + * `projects/{project_id}/locations/{location}/environments/{environment_id}` + * + * @return \Google\Cloud\Notebooks\V1\DeleteEnvironmentRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Format: + * `projects/{project_id}/locations/{location}/environments/{environment_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/environments/{environment_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/environments/{environment_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/DeleteExecutionRequest.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/DeleteExecutionRequest.php new file mode 100644 index 000000000000..6435f7ee1ac0 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/DeleteExecutionRequest.php @@ -0,0 +1,86 @@ +google.cloud.notebooks.v1.DeleteExecutionRequest + */ +class DeleteExecutionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/executions/{execution_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Format: + * `projects/{project_id}/locations/{location}/executions/{execution_id}` + * Please see {@see NotebookServiceClient::executionName()} for help formatting this field. + * + * @return \Google\Cloud\Notebooks\V1\DeleteExecutionRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Format: + * `projects/{project_id}/locations/{location}/executions/{execution_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/executions/{execution_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/executions/{execution_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/DeleteInstanceRequest.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/DeleteInstanceRequest.php new file mode 100644 index 000000000000..0cfd481b0578 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/DeleteInstanceRequest.php @@ -0,0 +1,85 @@ +google.cloud.notebooks.v1.DeleteInstanceRequest + */ +class DeleteInstanceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + + /** + * @param string $name Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * + * @return \Google\Cloud\Notebooks\V1\DeleteInstanceRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/DeleteRuntimeRequest.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/DeleteRuntimeRequest.php new file mode 100644 index 000000000000..0235ff0c569f --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/DeleteRuntimeRequest.php @@ -0,0 +1,120 @@ +google.cloud.notebooks.v1.DeleteRuntimeRequest + */ +class DeleteRuntimeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Idempotent request UUID. + * + * Generated from protobuf field string request_id = 2; + */ + protected $request_id = ''; + + /** + * @param string $name Required. Format: + * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` + * Please see {@see ManagedNotebookServiceClient::runtimeName()} for help formatting this field. + * + * @return \Google\Cloud\Notebooks\V1\DeleteRuntimeRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Format: + * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` + * @type string $request_id + * Idempotent request UUID. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V1\ManagedService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Idempotent request UUID. + * + * Generated from protobuf field string request_id = 2; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Idempotent request UUID. + * + * Generated from protobuf field string request_id = 2; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/DeleteScheduleRequest.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/DeleteScheduleRequest.php new file mode 100644 index 000000000000..b39703383d85 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/DeleteScheduleRequest.php @@ -0,0 +1,86 @@ +google.cloud.notebooks.v1.DeleteScheduleRequest + */ +class DeleteScheduleRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/schedules/{schedule_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Format: + * `projects/{project_id}/locations/{location}/schedules/{schedule_id}` + * Please see {@see NotebookServiceClient::scheduleName()} for help formatting this field. + * + * @return \Google\Cloud\Notebooks\V1\DeleteScheduleRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Format: + * `projects/{project_id}/locations/{location}/schedules/{schedule_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/schedules/{schedule_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/schedules/{schedule_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/DiagnoseInstanceRequest.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/DiagnoseInstanceRequest.php new file mode 100644 index 000000000000..3d75ec3995b2 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/DiagnoseInstanceRequest.php @@ -0,0 +1,132 @@ +google.cloud.notebooks.v1.DiagnoseInstanceRequest + */ +class DiagnoseInstanceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. Defines flags that are used to run the diagnostic tool + * + * Generated from protobuf field .google.cloud.notebooks.v1.DiagnosticConfig diagnostic_config = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $diagnostic_config = null; + + /** + * @param string $name Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * Please see {@see NotebookServiceClient::instanceName()} for help formatting this field. + * @param \Google\Cloud\Notebooks\V1\DiagnosticConfig $diagnosticConfig Required. Defines flags that are used to run the diagnostic tool + * + * @return \Google\Cloud\Notebooks\V1\DiagnoseInstanceRequest + * + * @experimental + */ + public static function build(string $name, \Google\Cloud\Notebooks\V1\DiagnosticConfig $diagnosticConfig): self + { + return (new self()) + ->setName($name) + ->setDiagnosticConfig($diagnosticConfig); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * @type \Google\Cloud\Notebooks\V1\DiagnosticConfig $diagnostic_config + * Required. Defines flags that are used to run the diagnostic tool + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. Defines flags that are used to run the diagnostic tool + * + * Generated from protobuf field .google.cloud.notebooks.v1.DiagnosticConfig diagnostic_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Notebooks\V1\DiagnosticConfig|null + */ + public function getDiagnosticConfig() + { + return $this->diagnostic_config; + } + + public function hasDiagnosticConfig() + { + return isset($this->diagnostic_config); + } + + public function clearDiagnosticConfig() + { + unset($this->diagnostic_config); + } + + /** + * Required. Defines flags that are used to run the diagnostic tool + * + * Generated from protobuf field .google.cloud.notebooks.v1.DiagnosticConfig diagnostic_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Notebooks\V1\DiagnosticConfig $var + * @return $this + */ + public function setDiagnosticConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V1\DiagnosticConfig::class); + $this->diagnostic_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/DiagnoseRuntimeRequest.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/DiagnoseRuntimeRequest.php new file mode 100644 index 000000000000..3a76ddd8406b --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/DiagnoseRuntimeRequest.php @@ -0,0 +1,132 @@ +google.cloud.notebooks.v1.DiagnoseRuntimeRequest + */ +class DiagnoseRuntimeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/runtimes/{runtimes_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. Defines flags that are used to run the diagnostic tool + * + * Generated from protobuf field .google.cloud.notebooks.v1.DiagnosticConfig diagnostic_config = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $diagnostic_config = null; + + /** + * @param string $name Required. Format: + * `projects/{project_id}/locations/{location}/runtimes/{runtimes_id}` + * Please see {@see ManagedNotebookServiceClient::runtimeName()} for help formatting this field. + * @param \Google\Cloud\Notebooks\V1\DiagnosticConfig $diagnosticConfig Required. Defines flags that are used to run the diagnostic tool + * + * @return \Google\Cloud\Notebooks\V1\DiagnoseRuntimeRequest + * + * @experimental + */ + public static function build(string $name, \Google\Cloud\Notebooks\V1\DiagnosticConfig $diagnosticConfig): self + { + return (new self()) + ->setName($name) + ->setDiagnosticConfig($diagnosticConfig); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Format: + * `projects/{project_id}/locations/{location}/runtimes/{runtimes_id}` + * @type \Google\Cloud\Notebooks\V1\DiagnosticConfig $diagnostic_config + * Required. Defines flags that are used to run the diagnostic tool + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V1\ManagedService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/runtimes/{runtimes_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/runtimes/{runtimes_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. Defines flags that are used to run the diagnostic tool + * + * Generated from protobuf field .google.cloud.notebooks.v1.DiagnosticConfig diagnostic_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Notebooks\V1\DiagnosticConfig|null + */ + public function getDiagnosticConfig() + { + return $this->diagnostic_config; + } + + public function hasDiagnosticConfig() + { + return isset($this->diagnostic_config); + } + + public function clearDiagnosticConfig() + { + unset($this->diagnostic_config); + } + + /** + * Required. Defines flags that are used to run the diagnostic tool + * + * Generated from protobuf field .google.cloud.notebooks.v1.DiagnosticConfig diagnostic_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Notebooks\V1\DiagnosticConfig $var + * @return $this + */ + public function setDiagnosticConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V1\DiagnosticConfig::class); + $this->diagnostic_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/DiagnosticConfig.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/DiagnosticConfig.php new file mode 100644 index 000000000000..9e051f4082f2 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/DiagnosticConfig.php @@ -0,0 +1,263 @@ +google.cloud.notebooks.v1.DiagnosticConfig + */ +class DiagnosticConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Required. User Cloud Storage bucket location (REQUIRED). + * Must be formatted with path prefix (`gs://$GCS_BUCKET`). + * Permissions: + * User Managed Notebooks: + * - storage.buckets.writer: Must be given to the project's service account + * attached to VM. + * Google Managed Notebooks: + * - storage.buckets.writer: Must be given to the project's service account or + * user credentials attached to VM depending on authentication mode. + * Cloud Storage bucket Log file will be written to + * `gs://$GCS_BUCKET/$RELATIVE_PATH/$VM_DATE_$TIME.tar.gz` + * + * Generated from protobuf field string gcs_bucket = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $gcs_bucket = ''; + /** + * Optional. Defines the relative storage path in the Cloud Storage bucket + * where the diagnostic logs will be written: Default path will be the root + * directory of the Cloud Storage bucket + * (`gs://$GCS_BUCKET/$DATE_$TIME.tar.gz`) + * Example of full path where Log file will be written: + * `gs://$GCS_BUCKET/$RELATIVE_PATH/` + * + * Generated from protobuf field string relative_path = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $relative_path = ''; + /** + * Optional. Enables flag to repair service for instance + * + * Generated from protobuf field bool repair_flag_enabled = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $repair_flag_enabled = false; + /** + * Optional. Enables flag to capture packets from the instance for 30 seconds + * + * Generated from protobuf field bool packet_capture_flag_enabled = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $packet_capture_flag_enabled = false; + /** + * Optional. Enables flag to copy all `/home/jupyter` folder contents + * + * Generated from protobuf field bool copy_home_files_flag_enabled = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $copy_home_files_flag_enabled = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $gcs_bucket + * Required. User Cloud Storage bucket location (REQUIRED). + * Must be formatted with path prefix (`gs://$GCS_BUCKET`). + * Permissions: + * User Managed Notebooks: + * - storage.buckets.writer: Must be given to the project's service account + * attached to VM. + * Google Managed Notebooks: + * - storage.buckets.writer: Must be given to the project's service account or + * user credentials attached to VM depending on authentication mode. + * Cloud Storage bucket Log file will be written to + * `gs://$GCS_BUCKET/$RELATIVE_PATH/$VM_DATE_$TIME.tar.gz` + * @type string $relative_path + * Optional. Defines the relative storage path in the Cloud Storage bucket + * where the diagnostic logs will be written: Default path will be the root + * directory of the Cloud Storage bucket + * (`gs://$GCS_BUCKET/$DATE_$TIME.tar.gz`) + * Example of full path where Log file will be written: + * `gs://$GCS_BUCKET/$RELATIVE_PATH/` + * @type bool $repair_flag_enabled + * Optional. Enables flag to repair service for instance + * @type bool $packet_capture_flag_enabled + * Optional. Enables flag to capture packets from the instance for 30 seconds + * @type bool $copy_home_files_flag_enabled + * Optional. Enables flag to copy all `/home/jupyter` folder contents + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V1\DiagnosticConfig::initOnce(); + parent::__construct($data); + } + + /** + * Required. User Cloud Storage bucket location (REQUIRED). + * Must be formatted with path prefix (`gs://$GCS_BUCKET`). + * Permissions: + * User Managed Notebooks: + * - storage.buckets.writer: Must be given to the project's service account + * attached to VM. + * Google Managed Notebooks: + * - storage.buckets.writer: Must be given to the project's service account or + * user credentials attached to VM depending on authentication mode. + * Cloud Storage bucket Log file will be written to + * `gs://$GCS_BUCKET/$RELATIVE_PATH/$VM_DATE_$TIME.tar.gz` + * + * Generated from protobuf field string gcs_bucket = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getGcsBucket() + { + return $this->gcs_bucket; + } + + /** + * Required. User Cloud Storage bucket location (REQUIRED). + * Must be formatted with path prefix (`gs://$GCS_BUCKET`). + * Permissions: + * User Managed Notebooks: + * - storage.buckets.writer: Must be given to the project's service account + * attached to VM. + * Google Managed Notebooks: + * - storage.buckets.writer: Must be given to the project's service account or + * user credentials attached to VM depending on authentication mode. + * Cloud Storage bucket Log file will be written to + * `gs://$GCS_BUCKET/$RELATIVE_PATH/$VM_DATE_$TIME.tar.gz` + * + * Generated from protobuf field string gcs_bucket = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setGcsBucket($var) + { + GPBUtil::checkString($var, True); + $this->gcs_bucket = $var; + + return $this; + } + + /** + * Optional. Defines the relative storage path in the Cloud Storage bucket + * where the diagnostic logs will be written: Default path will be the root + * directory of the Cloud Storage bucket + * (`gs://$GCS_BUCKET/$DATE_$TIME.tar.gz`) + * Example of full path where Log file will be written: + * `gs://$GCS_BUCKET/$RELATIVE_PATH/` + * + * Generated from protobuf field string relative_path = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRelativePath() + { + return $this->relative_path; + } + + /** + * Optional. Defines the relative storage path in the Cloud Storage bucket + * where the diagnostic logs will be written: Default path will be the root + * directory of the Cloud Storage bucket + * (`gs://$GCS_BUCKET/$DATE_$TIME.tar.gz`) + * Example of full path where Log file will be written: + * `gs://$GCS_BUCKET/$RELATIVE_PATH/` + * + * Generated from protobuf field string relative_path = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRelativePath($var) + { + GPBUtil::checkString($var, True); + $this->relative_path = $var; + + return $this; + } + + /** + * Optional. Enables flag to repair service for instance + * + * Generated from protobuf field bool repair_flag_enabled = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getRepairFlagEnabled() + { + return $this->repair_flag_enabled; + } + + /** + * Optional. Enables flag to repair service for instance + * + * Generated from protobuf field bool repair_flag_enabled = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setRepairFlagEnabled($var) + { + GPBUtil::checkBool($var); + $this->repair_flag_enabled = $var; + + return $this; + } + + /** + * Optional. Enables flag to capture packets from the instance for 30 seconds + * + * Generated from protobuf field bool packet_capture_flag_enabled = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getPacketCaptureFlagEnabled() + { + return $this->packet_capture_flag_enabled; + } + + /** + * Optional. Enables flag to capture packets from the instance for 30 seconds + * + * Generated from protobuf field bool packet_capture_flag_enabled = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setPacketCaptureFlagEnabled($var) + { + GPBUtil::checkBool($var); + $this->packet_capture_flag_enabled = $var; + + return $this; + } + + /** + * Optional. Enables flag to copy all `/home/jupyter` folder contents + * + * Generated from protobuf field bool copy_home_files_flag_enabled = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getCopyHomeFilesFlagEnabled() + { + return $this->copy_home_files_flag_enabled; + } + + /** + * Optional. Enables flag to copy all `/home/jupyter` folder contents + * + * Generated from protobuf field bool copy_home_files_flag_enabled = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setCopyHomeFilesFlagEnabled($var) + { + GPBUtil::checkBool($var); + $this->copy_home_files_flag_enabled = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/EncryptionConfig.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/EncryptionConfig.php new file mode 100644 index 000000000000..0c4d23f850e9 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/EncryptionConfig.php @@ -0,0 +1,80 @@ +google.cloud.notebooks.v1.EncryptionConfig + */ +class EncryptionConfig extends \Google\Protobuf\Internal\Message +{ + /** + * The Cloud KMS resource identifier of the customer-managed encryption key + * used to protect a resource, such as a disks. It has the following + * format: + * `projects/{PROJECT_ID}/locations/{REGION}/keyRings/{KEY_RING_NAME}/cryptoKeys/{KEY_NAME}` + * + * Generated from protobuf field string kms_key = 1; + */ + protected $kms_key = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kms_key + * The Cloud KMS resource identifier of the customer-managed encryption key + * used to protect a resource, such as a disks. It has the following + * format: + * `projects/{PROJECT_ID}/locations/{REGION}/keyRings/{KEY_RING_NAME}/cryptoKeys/{KEY_NAME}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V1\Runtime::initOnce(); + parent::__construct($data); + } + + /** + * The Cloud KMS resource identifier of the customer-managed encryption key + * used to protect a resource, such as a disks. It has the following + * format: + * `projects/{PROJECT_ID}/locations/{REGION}/keyRings/{KEY_RING_NAME}/cryptoKeys/{KEY_NAME}` + * + * Generated from protobuf field string kms_key = 1; + * @return string + */ + public function getKmsKey() + { + return $this->kms_key; + } + + /** + * The Cloud KMS resource identifier of the customer-managed encryption key + * used to protect a resource, such as a disks. It has the following + * format: + * `projects/{PROJECT_ID}/locations/{REGION}/keyRings/{KEY_RING_NAME}/cryptoKeys/{KEY_NAME}` + * + * Generated from protobuf field string kms_key = 1; + * @param string $var + * @return $this + */ + public function setKmsKey($var) + { + GPBUtil::checkString($var, True); + $this->kms_key = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Environment.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Environment.php new file mode 100644 index 000000000000..acba5f6f762f --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Environment.php @@ -0,0 +1,305 @@ +google.cloud.notebooks.v1.Environment + */ +class Environment extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Name of this environment. + * Format: + * `projects/{project_id}/locations/{location}/environments/{environment_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Display name of this environment for the UI. + * + * Generated from protobuf field string display_name = 2; + */ + protected $display_name = ''; + /** + * A brief description of this environment. + * + * Generated from protobuf field string description = 3; + */ + protected $description = ''; + /** + * Path to a Bash script that automatically runs after a notebook instance + * fully boots up. The path must be a URL or + * Cloud Storage path. Example: `"gs://path-to-file/file-name"` + * + * Generated from protobuf field string post_startup_script = 8; + */ + protected $post_startup_script = ''; + /** + * Output only. The time at which this environment was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + protected $image_type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. Name of this environment. + * Format: + * `projects/{project_id}/locations/{location}/environments/{environment_id}` + * @type string $display_name + * Display name of this environment for the UI. + * @type string $description + * A brief description of this environment. + * @type \Google\Cloud\Notebooks\V1\VmImage $vm_image + * Use a Compute Engine VM image to start the notebook instance. + * @type \Google\Cloud\Notebooks\V1\ContainerImage $container_image + * Use a container image to start the notebook instance. + * @type string $post_startup_script + * Path to a Bash script that automatically runs after a notebook instance + * fully boots up. The path must be a URL or + * Cloud Storage path. Example: `"gs://path-to-file/file-name"` + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time at which this environment was created. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V1\Environment::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Name of this environment. + * Format: + * `projects/{project_id}/locations/{location}/environments/{environment_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. Name of this environment. + * Format: + * `projects/{project_id}/locations/{location}/environments/{environment_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Display name of this environment for the UI. + * + * Generated from protobuf field string display_name = 2; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Display name of this environment for the UI. + * + * Generated from protobuf field string display_name = 2; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * A brief description of this environment. + * + * Generated from protobuf field string description = 3; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * A brief description of this environment. + * + * Generated from protobuf field string description = 3; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Use a Compute Engine VM image to start the notebook instance. + * + * Generated from protobuf field .google.cloud.notebooks.v1.VmImage vm_image = 6; + * @return \Google\Cloud\Notebooks\V1\VmImage|null + */ + public function getVmImage() + { + return $this->readOneof(6); + } + + public function hasVmImage() + { + return $this->hasOneof(6); + } + + /** + * Use a Compute Engine VM image to start the notebook instance. + * + * Generated from protobuf field .google.cloud.notebooks.v1.VmImage vm_image = 6; + * @param \Google\Cloud\Notebooks\V1\VmImage $var + * @return $this + */ + public function setVmImage($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V1\VmImage::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * Use a container image to start the notebook instance. + * + * Generated from protobuf field .google.cloud.notebooks.v1.ContainerImage container_image = 7; + * @return \Google\Cloud\Notebooks\V1\ContainerImage|null + */ + public function getContainerImage() + { + return $this->readOneof(7); + } + + public function hasContainerImage() + { + return $this->hasOneof(7); + } + + /** + * Use a container image to start the notebook instance. + * + * Generated from protobuf field .google.cloud.notebooks.v1.ContainerImage container_image = 7; + * @param \Google\Cloud\Notebooks\V1\ContainerImage $var + * @return $this + */ + public function setContainerImage($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V1\ContainerImage::class); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * Path to a Bash script that automatically runs after a notebook instance + * fully boots up. The path must be a URL or + * Cloud Storage path. Example: `"gs://path-to-file/file-name"` + * + * Generated from protobuf field string post_startup_script = 8; + * @return string + */ + public function getPostStartupScript() + { + return $this->post_startup_script; + } + + /** + * Path to a Bash script that automatically runs after a notebook instance + * fully boots up. The path must be a URL or + * Cloud Storage path. Example: `"gs://path-to-file/file-name"` + * + * Generated from protobuf field string post_startup_script = 8; + * @param string $var + * @return $this + */ + public function setPostStartupScript($var) + { + GPBUtil::checkString($var, True); + $this->post_startup_script = $var; + + return $this; + } + + /** + * Output only. The time at which this environment was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The time at which this environment was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * @return string + */ + public function getImageType() + { + return $this->whichOneof("image_type"); + } + +} + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Event.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Event.php new file mode 100644 index 000000000000..e283621af63c --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Event.php @@ -0,0 +1,145 @@ +google.cloud.notebooks.v1.Event + */ +class Event extends \Google\Protobuf\Internal\Message +{ + /** + * Event report time. + * + * Generated from protobuf field .google.protobuf.Timestamp report_time = 1; + */ + protected $report_time = null; + /** + * Event type. + * + * Generated from protobuf field .google.cloud.notebooks.v1.Event.EventType type = 2; + */ + protected $type = 0; + /** + * Optional. Event details. This field is used to pass event information. + * + * Generated from protobuf field map details = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $details; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $report_time + * Event report time. + * @type int $type + * Event type. + * @type array|\Google\Protobuf\Internal\MapField $details + * Optional. Event details. This field is used to pass event information. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V1\Event::initOnce(); + parent::__construct($data); + } + + /** + * Event report time. + * + * Generated from protobuf field .google.protobuf.Timestamp report_time = 1; + * @return \Google\Protobuf\Timestamp|null + */ + public function getReportTime() + { + return $this->report_time; + } + + public function hasReportTime() + { + return isset($this->report_time); + } + + public function clearReportTime() + { + unset($this->report_time); + } + + /** + * Event report time. + * + * Generated from protobuf field .google.protobuf.Timestamp report_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setReportTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->report_time = $var; + + return $this; + } + + /** + * Event type. + * + * Generated from protobuf field .google.cloud.notebooks.v1.Event.EventType type = 2; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Event type. + * + * Generated from protobuf field .google.cloud.notebooks.v1.Event.EventType type = 2; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Notebooks\V1\Event\EventType::class); + $this->type = $var; + + return $this; + } + + /** + * Optional. Event details. This field is used to pass event information. + * + * Generated from protobuf field map details = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getDetails() + { + return $this->details; + } + + /** + * Optional. Event details. This field is used to pass event information. + * + * Generated from protobuf field map details = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setDetails($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->details = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Event/EventType.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Event/EventType.php new file mode 100644 index 000000000000..40fde28d60fd --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Event/EventType.php @@ -0,0 +1,84 @@ +google.cloud.notebooks.v1.Event.EventType + */ +class EventType +{ + /** + * Event is not specified. + * + * Generated from protobuf enum EVENT_TYPE_UNSPECIFIED = 0; + */ + const EVENT_TYPE_UNSPECIFIED = 0; + /** + * The instance / runtime is idle + * + * Generated from protobuf enum IDLE = 1; + */ + const IDLE = 1; + /** + * The instance / runtime is available. + * This event indicates that instance / runtime underlying compute is + * operational. + * + * Generated from protobuf enum HEARTBEAT = 2; + */ + const HEARTBEAT = 2; + /** + * The instance / runtime health is available. + * This event indicates that instance / runtime health information. + * + * Generated from protobuf enum HEALTH = 3; + */ + const HEALTH = 3; + /** + * The instance / runtime is available. + * This event allows instance / runtime to send Host maintenance + * information to Control Plane. + * https://cloud.google.com/compute/docs/gpus/gpu-host-maintenance + * + * Generated from protobuf enum MAINTENANCE = 4; + */ + const MAINTENANCE = 4; + + private static $valueToName = [ + self::EVENT_TYPE_UNSPECIFIED => 'EVENT_TYPE_UNSPECIFIED', + self::IDLE => 'IDLE', + self::HEARTBEAT => 'HEARTBEAT', + self::HEALTH => 'HEALTH', + self::MAINTENANCE => 'MAINTENANCE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(EventType::class, \Google\Cloud\Notebooks\V1\Event_EventType::class); + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Execution.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Execution.php new file mode 100644 index 000000000000..df7bc7abdea9 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Execution.php @@ -0,0 +1,377 @@ +google.cloud.notebooks.v1.Execution + */ +class Execution extends \Google\Protobuf\Internal\Message +{ + /** + * execute metadata including name, hardware spec, region, labels, etc. + * + * Generated from protobuf field .google.cloud.notebooks.v1.ExecutionTemplate execution_template = 1; + */ + protected $execution_template = null; + /** + * Output only. The resource name of the execute. Format: + * `projects/{project_id}/locations/{location}/executions/{execution_id}` + * + * Generated from protobuf field string name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. Name used for UI purposes. + * Name can only contain alphanumeric characters and underscores '_'. + * + * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $display_name = ''; + /** + * A brief description of this execution. + * + * Generated from protobuf field string description = 4; + */ + protected $description = ''; + /** + * Output only. Time the Execution was instantiated. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. Time the Execution was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Output only. State of the underlying AI Platform job. + * + * Generated from protobuf field .google.cloud.notebooks.v1.Execution.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output notebook file generated by this execution + * + * Generated from protobuf field string output_notebook_file = 8; + */ + protected $output_notebook_file = ''; + /** + * Output only. The URI of the external job used to execute the notebook. + * + * Generated from protobuf field string job_uri = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $job_uri = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Notebooks\V1\ExecutionTemplate $execution_template + * execute metadata including name, hardware spec, region, labels, etc. + * @type string $name + * Output only. The resource name of the execute. Format: + * `projects/{project_id}/locations/{location}/executions/{execution_id}` + * @type string $display_name + * Output only. Name used for UI purposes. + * Name can only contain alphanumeric characters and underscores '_'. + * @type string $description + * A brief description of this execution. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Time the Execution was instantiated. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. Time the Execution was last updated. + * @type int $state + * Output only. State of the underlying AI Platform job. + * @type string $output_notebook_file + * Output notebook file generated by this execution + * @type string $job_uri + * Output only. The URI of the external job used to execute the notebook. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V1\Execution::initOnce(); + parent::__construct($data); + } + + /** + * execute metadata including name, hardware spec, region, labels, etc. + * + * Generated from protobuf field .google.cloud.notebooks.v1.ExecutionTemplate execution_template = 1; + * @return \Google\Cloud\Notebooks\V1\ExecutionTemplate|null + */ + public function getExecutionTemplate() + { + return $this->execution_template; + } + + public function hasExecutionTemplate() + { + return isset($this->execution_template); + } + + public function clearExecutionTemplate() + { + unset($this->execution_template); + } + + /** + * execute metadata including name, hardware spec, region, labels, etc. + * + * Generated from protobuf field .google.cloud.notebooks.v1.ExecutionTemplate execution_template = 1; + * @param \Google\Cloud\Notebooks\V1\ExecutionTemplate $var + * @return $this + */ + public function setExecutionTemplate($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V1\ExecutionTemplate::class); + $this->execution_template = $var; + + return $this; + } + + /** + * Output only. The resource name of the execute. Format: + * `projects/{project_id}/locations/{location}/executions/{execution_id}` + * + * Generated from protobuf field string name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The resource name of the execute. Format: + * `projects/{project_id}/locations/{location}/executions/{execution_id}` + * + * Generated from protobuf field string name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. Name used for UI purposes. + * Name can only contain alphanumeric characters and underscores '_'. + * + * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Output only. Name used for UI purposes. + * Name can only contain alphanumeric characters and underscores '_'. + * + * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * A brief description of this execution. + * + * Generated from protobuf field string description = 4; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * A brief description of this execution. + * + * Generated from protobuf field string description = 4; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Output only. Time the Execution was instantiated. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. Time the Execution was instantiated. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. Time the Execution was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. Time the Execution was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Output only. State of the underlying AI Platform job. + * + * Generated from protobuf field .google.cloud.notebooks.v1.Execution.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. State of the underlying AI Platform job. + * + * Generated from protobuf field .google.cloud.notebooks.v1.Execution.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Notebooks\V1\Execution\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output notebook file generated by this execution + * + * Generated from protobuf field string output_notebook_file = 8; + * @return string + */ + public function getOutputNotebookFile() + { + return $this->output_notebook_file; + } + + /** + * Output notebook file generated by this execution + * + * Generated from protobuf field string output_notebook_file = 8; + * @param string $var + * @return $this + */ + public function setOutputNotebookFile($var) + { + GPBUtil::checkString($var, True); + $this->output_notebook_file = $var; + + return $this; + } + + /** + * Output only. The URI of the external job used to execute the notebook. + * + * Generated from protobuf field string job_uri = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getJobUri() + { + return $this->job_uri; + } + + /** + * Output only. The URI of the external job used to execute the notebook. + * + * Generated from protobuf field string job_uri = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setJobUri($var) + { + GPBUtil::checkString($var, True); + $this->job_uri = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Execution/State.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Execution/State.php new file mode 100644 index 000000000000..5aee6d68273a --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Execution/State.php @@ -0,0 +1,117 @@ +google.cloud.notebooks.v1.Execution.State + */ +class State +{ + /** + * The job state is unspecified. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The job has been just created and processing has not yet begun. + * + * Generated from protobuf enum QUEUED = 1; + */ + const QUEUED = 1; + /** + * The service is preparing to execution the job. + * + * Generated from protobuf enum PREPARING = 2; + */ + const PREPARING = 2; + /** + * The job is in progress. + * + * Generated from protobuf enum RUNNING = 3; + */ + const RUNNING = 3; + /** + * The job completed successfully. + * + * Generated from protobuf enum SUCCEEDED = 4; + */ + const SUCCEEDED = 4; + /** + * The job failed. + * `error_message` should contain the details of the failure. + * + * Generated from protobuf enum FAILED = 5; + */ + const FAILED = 5; + /** + * The job is being cancelled. + * `error_message` should describe the reason for the cancellation. + * + * Generated from protobuf enum CANCELLING = 6; + */ + const CANCELLING = 6; + /** + * The job has been cancelled. + * `error_message` should describe the reason for the cancellation. + * + * Generated from protobuf enum CANCELLED = 7; + */ + const CANCELLED = 7; + /** + * The job has become expired (relevant to Vertex AI jobs) + * https://cloud.google.com/vertex-ai/docs/reference/rest/v1/JobState + * + * Generated from protobuf enum EXPIRED = 9; + */ + const EXPIRED = 9; + /** + * The Execution is being created. + * + * Generated from protobuf enum INITIALIZING = 10; + */ + const INITIALIZING = 10; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::QUEUED => 'QUEUED', + self::PREPARING => 'PREPARING', + self::RUNNING => 'RUNNING', + self::SUCCEEDED => 'SUCCEEDED', + self::FAILED => 'FAILED', + self::CANCELLING => 'CANCELLING', + self::CANCELLED => 'CANCELLED', + self::EXPIRED => 'EXPIRED', + self::INITIALIZING => 'INITIALIZING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\Notebooks\V1\Execution_State::class); + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ExecutionTemplate.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ExecutionTemplate.php new file mode 100644 index 000000000000..ef49f88b9317 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ExecutionTemplate.php @@ -0,0 +1,829 @@ +google.cloud.notebooks.v1.ExecutionTemplate + */ +class ExecutionTemplate extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Scale tier of the hardware used for notebook execution. + * DEPRECATED Will be discontinued. As right now only CUSTOM is supported. + * + * Generated from protobuf field .google.cloud.notebooks.v1.ExecutionTemplate.ScaleTier scale_tier = 1 [deprecated = true, (.google.api.field_behavior) = REQUIRED]; + * @deprecated + */ + protected $scale_tier = 0; + /** + * Specifies the type of virtual machine to use for your training + * job's master worker. You must specify this field when `scaleTier` is set to + * `CUSTOM`. + * You can use certain Compute Engine machine types directly in this field. + * The following types are supported: + * - `n1-standard-4` + * - `n1-standard-8` + * - `n1-standard-16` + * - `n1-standard-32` + * - `n1-standard-64` + * - `n1-standard-96` + * - `n1-highmem-2` + * - `n1-highmem-4` + * - `n1-highmem-8` + * - `n1-highmem-16` + * - `n1-highmem-32` + * - `n1-highmem-64` + * - `n1-highmem-96` + * - `n1-highcpu-16` + * - `n1-highcpu-32` + * - `n1-highcpu-64` + * - `n1-highcpu-96` + * Alternatively, you can use the following legacy machine types: + * - `standard` + * - `large_model` + * - `complex_model_s` + * - `complex_model_m` + * - `complex_model_l` + * - `standard_gpu` + * - `complex_model_m_gpu` + * - `complex_model_l_gpu` + * - `standard_p100` + * - `complex_model_m_p100` + * - `standard_v100` + * - `large_model_v100` + * - `complex_model_m_v100` + * - `complex_model_l_v100` + * Finally, if you want to use a TPU for training, specify `cloud_tpu` in this + * field. Learn more about the [special configuration options for training + * with + * TPU](https://cloud.google.com/ai-platform/training/docs/using-tpus#configuring_a_custom_tpu_machine). + * + * Generated from protobuf field string master_type = 2; + */ + protected $master_type = ''; + /** + * Configuration (count and accelerator type) for hardware running notebook + * execution. + * + * Generated from protobuf field .google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig accelerator_config = 3; + */ + protected $accelerator_config = null; + /** + * Labels for execution. + * If execution is scheduled, a field included will be 'nbs-scheduled'. + * Otherwise, it is an immediate execution, and an included field will be + * 'nbs-immediate'. Use fields to efficiently index between various types of + * executions. + * + * Generated from protobuf field map labels = 4; + */ + private $labels; + /** + * Path to the notebook file to execute. + * Must be in a Google Cloud Storage bucket. + * Format: `gs://{bucket_name}/{folder}/{notebook_file_name}` + * Ex: `gs://notebook_user/scheduled_notebooks/sentiment_notebook.ipynb` + * + * Generated from protobuf field string input_notebook_file = 5; + */ + protected $input_notebook_file = ''; + /** + * Container Image URI to a DLVM + * Example: 'gcr.io/deeplearning-platform-release/base-cu100' + * More examples can be found at: + * https://cloud.google.com/ai-platform/deep-learning-containers/docs/choosing-container + * + * Generated from protobuf field string container_image_uri = 6; + */ + protected $container_image_uri = ''; + /** + * Path to the notebook folder to write to. + * Must be in a Google Cloud Storage bucket path. + * Format: `gs://{bucket_name}/{folder}` + * Ex: `gs://notebook_user/scheduled_notebooks` + * + * Generated from protobuf field string output_notebook_folder = 7; + */ + protected $output_notebook_folder = ''; + /** + * Parameters to be overridden in the notebook during execution. + * Ref https://papermill.readthedocs.io/en/latest/usage-parameterize.html on + * how to specifying parameters in the input notebook and pass them here + * in an YAML file. + * Ex: `gs://notebook_user/scheduled_notebooks/sentiment_notebook_params.yaml` + * + * Generated from protobuf field string params_yaml_file = 8; + */ + protected $params_yaml_file = ''; + /** + * Parameters used within the 'input_notebook_file' notebook. + * + * Generated from protobuf field string parameters = 9; + */ + protected $parameters = ''; + /** + * The email address of a service account to use when running the execution. + * You must have the `iam.serviceAccounts.actAs` permission for the specified + * service account. + * + * Generated from protobuf field string service_account = 10; + */ + protected $service_account = ''; + /** + * The type of Job to be used on this execution. + * + * Generated from protobuf field .google.cloud.notebooks.v1.ExecutionTemplate.JobType job_type = 11; + */ + protected $job_type = 0; + /** + * Name of the kernel spec to use. This must be specified if the + * kernel spec name on the execution target does not match the name in the + * input notebook file. + * + * Generated from protobuf field string kernel_spec = 14; + */ + protected $kernel_spec = ''; + /** + * The name of a Vertex AI [Tensorboard] resource to which this execution + * will upload Tensorboard logs. + * Format: + * `projects/{project}/locations/{location}/tensorboards/{tensorboard}` + * + * Generated from protobuf field string tensorboard = 15 [(.google.api.resource_reference) = { + */ + protected $tensorboard = ''; + protected $job_parameters; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $scale_tier + * Required. Scale tier of the hardware used for notebook execution. + * DEPRECATED Will be discontinued. As right now only CUSTOM is supported. + * @type string $master_type + * Specifies the type of virtual machine to use for your training + * job's master worker. You must specify this field when `scaleTier` is set to + * `CUSTOM`. + * You can use certain Compute Engine machine types directly in this field. + * The following types are supported: + * - `n1-standard-4` + * - `n1-standard-8` + * - `n1-standard-16` + * - `n1-standard-32` + * - `n1-standard-64` + * - `n1-standard-96` + * - `n1-highmem-2` + * - `n1-highmem-4` + * - `n1-highmem-8` + * - `n1-highmem-16` + * - `n1-highmem-32` + * - `n1-highmem-64` + * - `n1-highmem-96` + * - `n1-highcpu-16` + * - `n1-highcpu-32` + * - `n1-highcpu-64` + * - `n1-highcpu-96` + * Alternatively, you can use the following legacy machine types: + * - `standard` + * - `large_model` + * - `complex_model_s` + * - `complex_model_m` + * - `complex_model_l` + * - `standard_gpu` + * - `complex_model_m_gpu` + * - `complex_model_l_gpu` + * - `standard_p100` + * - `complex_model_m_p100` + * - `standard_v100` + * - `large_model_v100` + * - `complex_model_m_v100` + * - `complex_model_l_v100` + * Finally, if you want to use a TPU for training, specify `cloud_tpu` in this + * field. Learn more about the [special configuration options for training + * with + * TPU](https://cloud.google.com/ai-platform/training/docs/using-tpus#configuring_a_custom_tpu_machine). + * @type \Google\Cloud\Notebooks\V1\ExecutionTemplate\SchedulerAcceleratorConfig $accelerator_config + * Configuration (count and accelerator type) for hardware running notebook + * execution. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Labels for execution. + * If execution is scheduled, a field included will be 'nbs-scheduled'. + * Otherwise, it is an immediate execution, and an included field will be + * 'nbs-immediate'. Use fields to efficiently index between various types of + * executions. + * @type string $input_notebook_file + * Path to the notebook file to execute. + * Must be in a Google Cloud Storage bucket. + * Format: `gs://{bucket_name}/{folder}/{notebook_file_name}` + * Ex: `gs://notebook_user/scheduled_notebooks/sentiment_notebook.ipynb` + * @type string $container_image_uri + * Container Image URI to a DLVM + * Example: 'gcr.io/deeplearning-platform-release/base-cu100' + * More examples can be found at: + * https://cloud.google.com/ai-platform/deep-learning-containers/docs/choosing-container + * @type string $output_notebook_folder + * Path to the notebook folder to write to. + * Must be in a Google Cloud Storage bucket path. + * Format: `gs://{bucket_name}/{folder}` + * Ex: `gs://notebook_user/scheduled_notebooks` + * @type string $params_yaml_file + * Parameters to be overridden in the notebook during execution. + * Ref https://papermill.readthedocs.io/en/latest/usage-parameterize.html on + * how to specifying parameters in the input notebook and pass them here + * in an YAML file. + * Ex: `gs://notebook_user/scheduled_notebooks/sentiment_notebook_params.yaml` + * @type string $parameters + * Parameters used within the 'input_notebook_file' notebook. + * @type string $service_account + * The email address of a service account to use when running the execution. + * You must have the `iam.serviceAccounts.actAs` permission for the specified + * service account. + * @type int $job_type + * The type of Job to be used on this execution. + * @type \Google\Cloud\Notebooks\V1\ExecutionTemplate\DataprocParameters $dataproc_parameters + * Parameters used in Dataproc JobType executions. + * @type \Google\Cloud\Notebooks\V1\ExecutionTemplate\VertexAIParameters $vertex_ai_parameters + * Parameters used in Vertex AI JobType executions. + * @type string $kernel_spec + * Name of the kernel spec to use. This must be specified if the + * kernel spec name on the execution target does not match the name in the + * input notebook file. + * @type string $tensorboard + * The name of a Vertex AI [Tensorboard] resource to which this execution + * will upload Tensorboard logs. + * Format: + * `projects/{project}/locations/{location}/tensorboards/{tensorboard}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V1\Execution::initOnce(); + parent::__construct($data); + } + + /** + * Required. Scale tier of the hardware used for notebook execution. + * DEPRECATED Will be discontinued. As right now only CUSTOM is supported. + * + * Generated from protobuf field .google.cloud.notebooks.v1.ExecutionTemplate.ScaleTier scale_tier = 1 [deprecated = true, (.google.api.field_behavior) = REQUIRED]; + * @return int + * @deprecated + */ + public function getScaleTier() + { + @trigger_error('scale_tier is deprecated.', E_USER_DEPRECATED); + return $this->scale_tier; + } + + /** + * Required. Scale tier of the hardware used for notebook execution. + * DEPRECATED Will be discontinued. As right now only CUSTOM is supported. + * + * Generated from protobuf field .google.cloud.notebooks.v1.ExecutionTemplate.ScaleTier scale_tier = 1 [deprecated = true, (.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + * @deprecated + */ + public function setScaleTier($var) + { + @trigger_error('scale_tier is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkEnum($var, \Google\Cloud\Notebooks\V1\ExecutionTemplate\ScaleTier::class); + $this->scale_tier = $var; + + return $this; + } + + /** + * Specifies the type of virtual machine to use for your training + * job's master worker. You must specify this field when `scaleTier` is set to + * `CUSTOM`. + * You can use certain Compute Engine machine types directly in this field. + * The following types are supported: + * - `n1-standard-4` + * - `n1-standard-8` + * - `n1-standard-16` + * - `n1-standard-32` + * - `n1-standard-64` + * - `n1-standard-96` + * - `n1-highmem-2` + * - `n1-highmem-4` + * - `n1-highmem-8` + * - `n1-highmem-16` + * - `n1-highmem-32` + * - `n1-highmem-64` + * - `n1-highmem-96` + * - `n1-highcpu-16` + * - `n1-highcpu-32` + * - `n1-highcpu-64` + * - `n1-highcpu-96` + * Alternatively, you can use the following legacy machine types: + * - `standard` + * - `large_model` + * - `complex_model_s` + * - `complex_model_m` + * - `complex_model_l` + * - `standard_gpu` + * - `complex_model_m_gpu` + * - `complex_model_l_gpu` + * - `standard_p100` + * - `complex_model_m_p100` + * - `standard_v100` + * - `large_model_v100` + * - `complex_model_m_v100` + * - `complex_model_l_v100` + * Finally, if you want to use a TPU for training, specify `cloud_tpu` in this + * field. Learn more about the [special configuration options for training + * with + * TPU](https://cloud.google.com/ai-platform/training/docs/using-tpus#configuring_a_custom_tpu_machine). + * + * Generated from protobuf field string master_type = 2; + * @return string + */ + public function getMasterType() + { + return $this->master_type; + } + + /** + * Specifies the type of virtual machine to use for your training + * job's master worker. You must specify this field when `scaleTier` is set to + * `CUSTOM`. + * You can use certain Compute Engine machine types directly in this field. + * The following types are supported: + * - `n1-standard-4` + * - `n1-standard-8` + * - `n1-standard-16` + * - `n1-standard-32` + * - `n1-standard-64` + * - `n1-standard-96` + * - `n1-highmem-2` + * - `n1-highmem-4` + * - `n1-highmem-8` + * - `n1-highmem-16` + * - `n1-highmem-32` + * - `n1-highmem-64` + * - `n1-highmem-96` + * - `n1-highcpu-16` + * - `n1-highcpu-32` + * - `n1-highcpu-64` + * - `n1-highcpu-96` + * Alternatively, you can use the following legacy machine types: + * - `standard` + * - `large_model` + * - `complex_model_s` + * - `complex_model_m` + * - `complex_model_l` + * - `standard_gpu` + * - `complex_model_m_gpu` + * - `complex_model_l_gpu` + * - `standard_p100` + * - `complex_model_m_p100` + * - `standard_v100` + * - `large_model_v100` + * - `complex_model_m_v100` + * - `complex_model_l_v100` + * Finally, if you want to use a TPU for training, specify `cloud_tpu` in this + * field. Learn more about the [special configuration options for training + * with + * TPU](https://cloud.google.com/ai-platform/training/docs/using-tpus#configuring_a_custom_tpu_machine). + * + * Generated from protobuf field string master_type = 2; + * @param string $var + * @return $this + */ + public function setMasterType($var) + { + GPBUtil::checkString($var, True); + $this->master_type = $var; + + return $this; + } + + /** + * Configuration (count and accelerator type) for hardware running notebook + * execution. + * + * Generated from protobuf field .google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig accelerator_config = 3; + * @return \Google\Cloud\Notebooks\V1\ExecutionTemplate\SchedulerAcceleratorConfig|null + */ + public function getAcceleratorConfig() + { + return $this->accelerator_config; + } + + public function hasAcceleratorConfig() + { + return isset($this->accelerator_config); + } + + public function clearAcceleratorConfig() + { + unset($this->accelerator_config); + } + + /** + * Configuration (count and accelerator type) for hardware running notebook + * execution. + * + * Generated from protobuf field .google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig accelerator_config = 3; + * @param \Google\Cloud\Notebooks\V1\ExecutionTemplate\SchedulerAcceleratorConfig $var + * @return $this + */ + public function setAcceleratorConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V1\ExecutionTemplate\SchedulerAcceleratorConfig::class); + $this->accelerator_config = $var; + + return $this; + } + + /** + * Labels for execution. + * If execution is scheduled, a field included will be 'nbs-scheduled'. + * Otherwise, it is an immediate execution, and an included field will be + * 'nbs-immediate'. Use fields to efficiently index between various types of + * executions. + * + * Generated from protobuf field map labels = 4; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Labels for execution. + * If execution is scheduled, a field included will be 'nbs-scheduled'. + * Otherwise, it is an immediate execution, and an included field will be + * 'nbs-immediate'. Use fields to efficiently index between various types of + * executions. + * + * Generated from protobuf field map labels = 4; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Path to the notebook file to execute. + * Must be in a Google Cloud Storage bucket. + * Format: `gs://{bucket_name}/{folder}/{notebook_file_name}` + * Ex: `gs://notebook_user/scheduled_notebooks/sentiment_notebook.ipynb` + * + * Generated from protobuf field string input_notebook_file = 5; + * @return string + */ + public function getInputNotebookFile() + { + return $this->input_notebook_file; + } + + /** + * Path to the notebook file to execute. + * Must be in a Google Cloud Storage bucket. + * Format: `gs://{bucket_name}/{folder}/{notebook_file_name}` + * Ex: `gs://notebook_user/scheduled_notebooks/sentiment_notebook.ipynb` + * + * Generated from protobuf field string input_notebook_file = 5; + * @param string $var + * @return $this + */ + public function setInputNotebookFile($var) + { + GPBUtil::checkString($var, True); + $this->input_notebook_file = $var; + + return $this; + } + + /** + * Container Image URI to a DLVM + * Example: 'gcr.io/deeplearning-platform-release/base-cu100' + * More examples can be found at: + * https://cloud.google.com/ai-platform/deep-learning-containers/docs/choosing-container + * + * Generated from protobuf field string container_image_uri = 6; + * @return string + */ + public function getContainerImageUri() + { + return $this->container_image_uri; + } + + /** + * Container Image URI to a DLVM + * Example: 'gcr.io/deeplearning-platform-release/base-cu100' + * More examples can be found at: + * https://cloud.google.com/ai-platform/deep-learning-containers/docs/choosing-container + * + * Generated from protobuf field string container_image_uri = 6; + * @param string $var + * @return $this + */ + public function setContainerImageUri($var) + { + GPBUtil::checkString($var, True); + $this->container_image_uri = $var; + + return $this; + } + + /** + * Path to the notebook folder to write to. + * Must be in a Google Cloud Storage bucket path. + * Format: `gs://{bucket_name}/{folder}` + * Ex: `gs://notebook_user/scheduled_notebooks` + * + * Generated from protobuf field string output_notebook_folder = 7; + * @return string + */ + public function getOutputNotebookFolder() + { + return $this->output_notebook_folder; + } + + /** + * Path to the notebook folder to write to. + * Must be in a Google Cloud Storage bucket path. + * Format: `gs://{bucket_name}/{folder}` + * Ex: `gs://notebook_user/scheduled_notebooks` + * + * Generated from protobuf field string output_notebook_folder = 7; + * @param string $var + * @return $this + */ + public function setOutputNotebookFolder($var) + { + GPBUtil::checkString($var, True); + $this->output_notebook_folder = $var; + + return $this; + } + + /** + * Parameters to be overridden in the notebook during execution. + * Ref https://papermill.readthedocs.io/en/latest/usage-parameterize.html on + * how to specifying parameters in the input notebook and pass them here + * in an YAML file. + * Ex: `gs://notebook_user/scheduled_notebooks/sentiment_notebook_params.yaml` + * + * Generated from protobuf field string params_yaml_file = 8; + * @return string + */ + public function getParamsYamlFile() + { + return $this->params_yaml_file; + } + + /** + * Parameters to be overridden in the notebook during execution. + * Ref https://papermill.readthedocs.io/en/latest/usage-parameterize.html on + * how to specifying parameters in the input notebook and pass them here + * in an YAML file. + * Ex: `gs://notebook_user/scheduled_notebooks/sentiment_notebook_params.yaml` + * + * Generated from protobuf field string params_yaml_file = 8; + * @param string $var + * @return $this + */ + public function setParamsYamlFile($var) + { + GPBUtil::checkString($var, True); + $this->params_yaml_file = $var; + + return $this; + } + + /** + * Parameters used within the 'input_notebook_file' notebook. + * + * Generated from protobuf field string parameters = 9; + * @return string + */ + public function getParameters() + { + return $this->parameters; + } + + /** + * Parameters used within the 'input_notebook_file' notebook. + * + * Generated from protobuf field string parameters = 9; + * @param string $var + * @return $this + */ + public function setParameters($var) + { + GPBUtil::checkString($var, True); + $this->parameters = $var; + + return $this; + } + + /** + * The email address of a service account to use when running the execution. + * You must have the `iam.serviceAccounts.actAs` permission for the specified + * service account. + * + * Generated from protobuf field string service_account = 10; + * @return string + */ + public function getServiceAccount() + { + return $this->service_account; + } + + /** + * The email address of a service account to use when running the execution. + * You must have the `iam.serviceAccounts.actAs` permission for the specified + * service account. + * + * Generated from protobuf field string service_account = 10; + * @param string $var + * @return $this + */ + public function setServiceAccount($var) + { + GPBUtil::checkString($var, True); + $this->service_account = $var; + + return $this; + } + + /** + * The type of Job to be used on this execution. + * + * Generated from protobuf field .google.cloud.notebooks.v1.ExecutionTemplate.JobType job_type = 11; + * @return int + */ + public function getJobType() + { + return $this->job_type; + } + + /** + * The type of Job to be used on this execution. + * + * Generated from protobuf field .google.cloud.notebooks.v1.ExecutionTemplate.JobType job_type = 11; + * @param int $var + * @return $this + */ + public function setJobType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Notebooks\V1\ExecutionTemplate\JobType::class); + $this->job_type = $var; + + return $this; + } + + /** + * Parameters used in Dataproc JobType executions. + * + * Generated from protobuf field .google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters dataproc_parameters = 12; + * @return \Google\Cloud\Notebooks\V1\ExecutionTemplate\DataprocParameters|null + */ + public function getDataprocParameters() + { + return $this->readOneof(12); + } + + public function hasDataprocParameters() + { + return $this->hasOneof(12); + } + + /** + * Parameters used in Dataproc JobType executions. + * + * Generated from protobuf field .google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters dataproc_parameters = 12; + * @param \Google\Cloud\Notebooks\V1\ExecutionTemplate\DataprocParameters $var + * @return $this + */ + public function setDataprocParameters($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V1\ExecutionTemplate\DataprocParameters::class); + $this->writeOneof(12, $var); + + return $this; + } + + /** + * Parameters used in Vertex AI JobType executions. + * + * Generated from protobuf field .google.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters vertex_ai_parameters = 13; + * @return \Google\Cloud\Notebooks\V1\ExecutionTemplate\VertexAIParameters|null + */ + public function getVertexAiParameters() + { + return $this->readOneof(13); + } + + public function hasVertexAiParameters() + { + return $this->hasOneof(13); + } + + /** + * Parameters used in Vertex AI JobType executions. + * + * Generated from protobuf field .google.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters vertex_ai_parameters = 13; + * @param \Google\Cloud\Notebooks\V1\ExecutionTemplate\VertexAIParameters $var + * @return $this + */ + public function setVertexAiParameters($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V1\ExecutionTemplate\VertexAIParameters::class); + $this->writeOneof(13, $var); + + return $this; + } + + /** + * Name of the kernel spec to use. This must be specified if the + * kernel spec name on the execution target does not match the name in the + * input notebook file. + * + * Generated from protobuf field string kernel_spec = 14; + * @return string + */ + public function getKernelSpec() + { + return $this->kernel_spec; + } + + /** + * Name of the kernel spec to use. This must be specified if the + * kernel spec name on the execution target does not match the name in the + * input notebook file. + * + * Generated from protobuf field string kernel_spec = 14; + * @param string $var + * @return $this + */ + public function setKernelSpec($var) + { + GPBUtil::checkString($var, True); + $this->kernel_spec = $var; + + return $this; + } + + /** + * The name of a Vertex AI [Tensorboard] resource to which this execution + * will upload Tensorboard logs. + * Format: + * `projects/{project}/locations/{location}/tensorboards/{tensorboard}` + * + * Generated from protobuf field string tensorboard = 15 [(.google.api.resource_reference) = { + * @return string + */ + public function getTensorboard() + { + return $this->tensorboard; + } + + /** + * The name of a Vertex AI [Tensorboard] resource to which this execution + * will upload Tensorboard logs. + * Format: + * `projects/{project}/locations/{location}/tensorboards/{tensorboard}` + * + * Generated from protobuf field string tensorboard = 15 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setTensorboard($var) + { + GPBUtil::checkString($var, True); + $this->tensorboard = $var; + + return $this; + } + + /** + * @return string + */ + public function getJobParameters() + { + return $this->whichOneof("job_parameters"); + } + +} + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ExecutionTemplate/DataprocParameters.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ExecutionTemplate/DataprocParameters.php new file mode 100644 index 000000000000..24e9b73605c2 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ExecutionTemplate/DataprocParameters.php @@ -0,0 +1,74 @@ +google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters + */ +class DataprocParameters extends \Google\Protobuf\Internal\Message +{ + /** + * URI for cluster used to run Dataproc execution. + * Format: `projects/{PROJECT_ID}/regions/{REGION}/clusters/{CLUSTER_NAME}` + * + * Generated from protobuf field string cluster = 1; + */ + protected $cluster = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $cluster + * URI for cluster used to run Dataproc execution. + * Format: `projects/{PROJECT_ID}/regions/{REGION}/clusters/{CLUSTER_NAME}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V1\Execution::initOnce(); + parent::__construct($data); + } + + /** + * URI for cluster used to run Dataproc execution. + * Format: `projects/{PROJECT_ID}/regions/{REGION}/clusters/{CLUSTER_NAME}` + * + * Generated from protobuf field string cluster = 1; + * @return string + */ + public function getCluster() + { + return $this->cluster; + } + + /** + * URI for cluster used to run Dataproc execution. + * Format: `projects/{PROJECT_ID}/regions/{REGION}/clusters/{CLUSTER_NAME}` + * + * Generated from protobuf field string cluster = 1; + * @param string $var + * @return $this + */ + public function setCluster($var) + { + GPBUtil::checkString($var, True); + $this->cluster = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(DataprocParameters::class, \Google\Cloud\Notebooks\V1\ExecutionTemplate_DataprocParameters::class); + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ExecutionTemplate/JobType.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ExecutionTemplate/JobType.php new file mode 100644 index 000000000000..7977f67eb20a --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ExecutionTemplate/JobType.php @@ -0,0 +1,66 @@ +google.cloud.notebooks.v1.ExecutionTemplate.JobType + */ +class JobType +{ + /** + * No type specified. + * + * Generated from protobuf enum JOB_TYPE_UNSPECIFIED = 0; + */ + const JOB_TYPE_UNSPECIFIED = 0; + /** + * Custom Job in `aiplatform.googleapis.com`. + * Default value for an execution. + * + * Generated from protobuf enum VERTEX_AI = 1; + */ + const VERTEX_AI = 1; + /** + * Run execution on a cluster with Dataproc as a job. + * https://cloud.google.com/dataproc/docs/reference/rest/v1/projects.regions.jobs + * + * Generated from protobuf enum DATAPROC = 2; + */ + const DATAPROC = 2; + + private static $valueToName = [ + self::JOB_TYPE_UNSPECIFIED => 'JOB_TYPE_UNSPECIFIED', + self::VERTEX_AI => 'VERTEX_AI', + self::DATAPROC => 'DATAPROC', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(JobType::class, \Google\Cloud\Notebooks\V1\ExecutionTemplate_JobType::class); + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ExecutionTemplate/ScaleTier.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ExecutionTemplate/ScaleTier.php new file mode 100644 index 000000000000..be85f68c19bd --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ExecutionTemplate/ScaleTier.php @@ -0,0 +1,99 @@ +google.cloud.notebooks.v1.ExecutionTemplate.ScaleTier + */ +class ScaleTier +{ + /** + * Unspecified Scale Tier. + * + * Generated from protobuf enum SCALE_TIER_UNSPECIFIED = 0; + */ + const SCALE_TIER_UNSPECIFIED = 0; + /** + * A single worker instance. This tier is suitable for learning how to use + * Cloud ML, and for experimenting with new models using small datasets. + * + * Generated from protobuf enum BASIC = 1; + */ + const BASIC = 1; + /** + * Many workers and a few parameter servers. + * + * Generated from protobuf enum STANDARD_1 = 2; + */ + const STANDARD_1 = 2; + /** + * A large number of workers with many parameter servers. + * + * Generated from protobuf enum PREMIUM_1 = 3; + */ + const PREMIUM_1 = 3; + /** + * A single worker instance with a K80 GPU. + * + * Generated from protobuf enum BASIC_GPU = 4; + */ + const BASIC_GPU = 4; + /** + * A single worker instance with a Cloud TPU. + * + * Generated from protobuf enum BASIC_TPU = 5; + */ + const BASIC_TPU = 5; + /** + * The CUSTOM tier is not a set tier, but rather enables you to use your + * own cluster specification. When you use this tier, set values to + * configure your processing cluster according to these guidelines: + * * You _must_ set `ExecutionTemplate.masterType` to specify the type + * of machine to use for your master node. This is the only required + * setting. + * + * Generated from protobuf enum CUSTOM = 6; + */ + const CUSTOM = 6; + + private static $valueToName = [ + self::SCALE_TIER_UNSPECIFIED => 'SCALE_TIER_UNSPECIFIED', + self::BASIC => 'BASIC', + self::STANDARD_1 => 'STANDARD_1', + self::PREMIUM_1 => 'PREMIUM_1', + self::BASIC_GPU => 'BASIC_GPU', + self::BASIC_TPU => 'BASIC_TPU', + self::CUSTOM => 'CUSTOM', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ScaleTier::class, \Google\Cloud\Notebooks\V1\ExecutionTemplate_ScaleTier::class); + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ExecutionTemplate/SchedulerAcceleratorConfig.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ExecutionTemplate/SchedulerAcceleratorConfig.php new file mode 100644 index 000000000000..1cceb92e601a --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ExecutionTemplate/SchedulerAcceleratorConfig.php @@ -0,0 +1,107 @@ +google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig + */ +class SchedulerAcceleratorConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Type of this accelerator. + * + * Generated from protobuf field .google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorType type = 1; + */ + protected $type = 0; + /** + * Count of cores of this accelerator. + * + * Generated from protobuf field int64 core_count = 2; + */ + protected $core_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $type + * Type of this accelerator. + * @type int|string $core_count + * Count of cores of this accelerator. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V1\Execution::initOnce(); + parent::__construct($data); + } + + /** + * Type of this accelerator. + * + * Generated from protobuf field .google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorType type = 1; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Type of this accelerator. + * + * Generated from protobuf field .google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorType type = 1; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Notebooks\V1\ExecutionTemplate\SchedulerAcceleratorType::class); + $this->type = $var; + + return $this; + } + + /** + * Count of cores of this accelerator. + * + * Generated from protobuf field int64 core_count = 2; + * @return int|string + */ + public function getCoreCount() + { + return $this->core_count; + } + + /** + * Count of cores of this accelerator. + * + * Generated from protobuf field int64 core_count = 2; + * @param int|string $var + * @return $this + */ + public function setCoreCount($var) + { + GPBUtil::checkInt64($var); + $this->core_count = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SchedulerAcceleratorConfig::class, \Google\Cloud\Notebooks\V1\ExecutionTemplate_SchedulerAcceleratorConfig::class); + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ExecutionTemplate/SchedulerAcceleratorType.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ExecutionTemplate/SchedulerAcceleratorType.php new file mode 100644 index 000000000000..63a5af02a0c9 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ExecutionTemplate/SchedulerAcceleratorType.php @@ -0,0 +1,106 @@ +google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorType + */ +class SchedulerAcceleratorType +{ + /** + * Unspecified accelerator type. Default to no GPU. + * + * Generated from protobuf enum SCHEDULER_ACCELERATOR_TYPE_UNSPECIFIED = 0; + */ + const SCHEDULER_ACCELERATOR_TYPE_UNSPECIFIED = 0; + /** + * Nvidia Tesla K80 GPU. + * + * Generated from protobuf enum NVIDIA_TESLA_K80 = 1; + */ + const NVIDIA_TESLA_K80 = 1; + /** + * Nvidia Tesla P100 GPU. + * + * Generated from protobuf enum NVIDIA_TESLA_P100 = 2; + */ + const NVIDIA_TESLA_P100 = 2; + /** + * Nvidia Tesla V100 GPU. + * + * Generated from protobuf enum NVIDIA_TESLA_V100 = 3; + */ + const NVIDIA_TESLA_V100 = 3; + /** + * Nvidia Tesla P4 GPU. + * + * Generated from protobuf enum NVIDIA_TESLA_P4 = 4; + */ + const NVIDIA_TESLA_P4 = 4; + /** + * Nvidia Tesla T4 GPU. + * + * Generated from protobuf enum NVIDIA_TESLA_T4 = 5; + */ + const NVIDIA_TESLA_T4 = 5; + /** + * Nvidia Tesla A100 GPU. + * + * Generated from protobuf enum NVIDIA_TESLA_A100 = 10; + */ + const NVIDIA_TESLA_A100 = 10; + /** + * TPU v2. + * + * Generated from protobuf enum TPU_V2 = 6; + */ + const TPU_V2 = 6; + /** + * TPU v3. + * + * Generated from protobuf enum TPU_V3 = 7; + */ + const TPU_V3 = 7; + + private static $valueToName = [ + self::SCHEDULER_ACCELERATOR_TYPE_UNSPECIFIED => 'SCHEDULER_ACCELERATOR_TYPE_UNSPECIFIED', + self::NVIDIA_TESLA_K80 => 'NVIDIA_TESLA_K80', + self::NVIDIA_TESLA_P100 => 'NVIDIA_TESLA_P100', + self::NVIDIA_TESLA_V100 => 'NVIDIA_TESLA_V100', + self::NVIDIA_TESLA_P4 => 'NVIDIA_TESLA_P4', + self::NVIDIA_TESLA_T4 => 'NVIDIA_TESLA_T4', + self::NVIDIA_TESLA_A100 => 'NVIDIA_TESLA_A100', + self::TPU_V2 => 'TPU_V2', + self::TPU_V3 => 'TPU_V3', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SchedulerAcceleratorType::class, \Google\Cloud\Notebooks\V1\ExecutionTemplate_SchedulerAcceleratorType::class); + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ExecutionTemplate/VertexAIParameters.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ExecutionTemplate/VertexAIParameters.php new file mode 100644 index 000000000000..4b950b16d390 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ExecutionTemplate/VertexAIParameters.php @@ -0,0 +1,148 @@ +google.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters + */ +class VertexAIParameters extends \Google\Protobuf\Internal\Message +{ + /** + * The full name of the Compute Engine + * [network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks) + * to which the Job should be peered. For example, + * `projects/12345/global/networks/myVPC`. + * [Format](https://cloud.google.com/compute/docs/reference/rest/v1/networks/insert) + * is of the form `projects/{project}/global/networks/{network}`. + * Where `{project}` is a project number, as in `12345`, and `{network}` is + * a network name. + * Private services access must already be configured for the network. If + * left unspecified, the job is not peered with any network. + * + * Generated from protobuf field string network = 1; + */ + protected $network = ''; + /** + * Environment variables. + * At most 100 environment variables can be specified and unique. + * Example: `GCP_BUCKET=gs://my-bucket/samples/` + * + * Generated from protobuf field map env = 2; + */ + private $env; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $network + * The full name of the Compute Engine + * [network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks) + * to which the Job should be peered. For example, + * `projects/12345/global/networks/myVPC`. + * [Format](https://cloud.google.com/compute/docs/reference/rest/v1/networks/insert) + * is of the form `projects/{project}/global/networks/{network}`. + * Where `{project}` is a project number, as in `12345`, and `{network}` is + * a network name. + * Private services access must already be configured for the network. If + * left unspecified, the job is not peered with any network. + * @type array|\Google\Protobuf\Internal\MapField $env + * Environment variables. + * At most 100 environment variables can be specified and unique. + * Example: `GCP_BUCKET=gs://my-bucket/samples/` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V1\Execution::initOnce(); + parent::__construct($data); + } + + /** + * The full name of the Compute Engine + * [network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks) + * to which the Job should be peered. For example, + * `projects/12345/global/networks/myVPC`. + * [Format](https://cloud.google.com/compute/docs/reference/rest/v1/networks/insert) + * is of the form `projects/{project}/global/networks/{network}`. + * Where `{project}` is a project number, as in `12345`, and `{network}` is + * a network name. + * Private services access must already be configured for the network. If + * left unspecified, the job is not peered with any network. + * + * Generated from protobuf field string network = 1; + * @return string + */ + public function getNetwork() + { + return $this->network; + } + + /** + * The full name of the Compute Engine + * [network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks) + * to which the Job should be peered. For example, + * `projects/12345/global/networks/myVPC`. + * [Format](https://cloud.google.com/compute/docs/reference/rest/v1/networks/insert) + * is of the form `projects/{project}/global/networks/{network}`. + * Where `{project}` is a project number, as in `12345`, and `{network}` is + * a network name. + * Private services access must already be configured for the network. If + * left unspecified, the job is not peered with any network. + * + * Generated from protobuf field string network = 1; + * @param string $var + * @return $this + */ + public function setNetwork($var) + { + GPBUtil::checkString($var, True); + $this->network = $var; + + return $this; + } + + /** + * Environment variables. + * At most 100 environment variables can be specified and unique. + * Example: `GCP_BUCKET=gs://my-bucket/samples/` + * + * Generated from protobuf field map env = 2; + * @return \Google\Protobuf\Internal\MapField + */ + public function getEnv() + { + return $this->env; + } + + /** + * Environment variables. + * At most 100 environment variables can be specified and unique. + * Example: `GCP_BUCKET=gs://my-bucket/samples/` + * + * Generated from protobuf field map env = 2; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setEnv($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->env = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(VertexAIParameters::class, \Google\Cloud\Notebooks\V1\ExecutionTemplate_VertexAIParameters::class); + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/GetEnvironmentRequest.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/GetEnvironmentRequest.php new file mode 100644 index 000000000000..62e81c7994b0 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/GetEnvironmentRequest.php @@ -0,0 +1,85 @@ +google.cloud.notebooks.v1.GetEnvironmentRequest + */ +class GetEnvironmentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/environments/{environment_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + + /** + * @param string $name Required. Format: + * `projects/{project_id}/locations/{location}/environments/{environment_id}` + * + * @return \Google\Cloud\Notebooks\V1\GetEnvironmentRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Format: + * `projects/{project_id}/locations/{location}/environments/{environment_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/environments/{environment_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/environments/{environment_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/GetExecutionRequest.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/GetExecutionRequest.php new file mode 100644 index 000000000000..b4da531db6e5 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/GetExecutionRequest.php @@ -0,0 +1,86 @@ +google.cloud.notebooks.v1.GetExecutionRequest + */ +class GetExecutionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/executions/{execution_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Format: + * `projects/{project_id}/locations/{location}/executions/{execution_id}` + * Please see {@see NotebookServiceClient::executionName()} for help formatting this field. + * + * @return \Google\Cloud\Notebooks\V1\GetExecutionRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Format: + * `projects/{project_id}/locations/{location}/executions/{execution_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/executions/{execution_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/executions/{execution_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/GetInstanceHealthRequest.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/GetInstanceHealthRequest.php new file mode 100644 index 000000000000..362418036f21 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/GetInstanceHealthRequest.php @@ -0,0 +1,86 @@ +google.cloud.notebooks.v1.GetInstanceHealthRequest + */ +class GetInstanceHealthRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * Please see {@see NotebookServiceClient::instanceName()} for help formatting this field. + * + * @return \Google\Cloud\Notebooks\V1\GetInstanceHealthRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/GetInstanceHealthResponse.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/GetInstanceHealthResponse.php new file mode 100644 index 000000000000..70d662501f62 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/GetInstanceHealthResponse.php @@ -0,0 +1,133 @@ +google.cloud.notebooks.v1.GetInstanceHealthResponse + */ +class GetInstanceHealthResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Runtime health_state. + * + * Generated from protobuf field .google.cloud.notebooks.v1.GetInstanceHealthResponse.HealthState health_state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $health_state = 0; + /** + * Output only. Additional information about instance health. + * Example: + * healthInfo": { + * "docker_proxy_agent_status": "1", + * "docker_status": "1", + * "jupyterlab_api_status": "-1", + * "jupyterlab_status": "-1", + * "updated": "2020-10-18 09:40:03.573409" + * } + * + * Generated from protobuf field map health_info = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $health_info; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $health_state + * Output only. Runtime health_state. + * @type array|\Google\Protobuf\Internal\MapField $health_info + * Output only. Additional information about instance health. + * Example: + * healthInfo": { + * "docker_proxy_agent_status": "1", + * "docker_status": "1", + * "jupyterlab_api_status": "-1", + * "jupyterlab_status": "-1", + * "updated": "2020-10-18 09:40:03.573409" + * } + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Runtime health_state. + * + * Generated from protobuf field .google.cloud.notebooks.v1.GetInstanceHealthResponse.HealthState health_state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getHealthState() + { + return $this->health_state; + } + + /** + * Output only. Runtime health_state. + * + * Generated from protobuf field .google.cloud.notebooks.v1.GetInstanceHealthResponse.HealthState health_state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setHealthState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Notebooks\V1\GetInstanceHealthResponse\HealthState::class); + $this->health_state = $var; + + return $this; + } + + /** + * Output only. Additional information about instance health. + * Example: + * healthInfo": { + * "docker_proxy_agent_status": "1", + * "docker_status": "1", + * "jupyterlab_api_status": "-1", + * "jupyterlab_status": "-1", + * "updated": "2020-10-18 09:40:03.573409" + * } + * + * Generated from protobuf field map health_info = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getHealthInfo() + { + return $this->health_info; + } + + /** + * Output only. Additional information about instance health. + * Example: + * healthInfo": { + * "docker_proxy_agent_status": "1", + * "docker_status": "1", + * "jupyterlab_api_status": "-1", + * "jupyterlab_status": "-1", + * "updated": "2020-10-18 09:40:03.573409" + * } + * + * Generated from protobuf field map health_info = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setHealthInfo($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->health_info = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/GetInstanceHealthResponse/HealthState.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/GetInstanceHealthResponse/HealthState.php new file mode 100644 index 000000000000..5ecda3012ea2 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/GetInstanceHealthResponse/HealthState.php @@ -0,0 +1,84 @@ +google.cloud.notebooks.v1.GetInstanceHealthResponse.HealthState + */ +class HealthState +{ + /** + * The instance substate is unknown. + * + * Generated from protobuf enum HEALTH_STATE_UNSPECIFIED = 0; + */ + const HEALTH_STATE_UNSPECIFIED = 0; + /** + * The instance is known to be in an healthy state + * (for example, critical daemons are running) + * Applies to ACTIVE state. + * + * Generated from protobuf enum HEALTHY = 1; + */ + const HEALTHY = 1; + /** + * The instance is known to be in an unhealthy state + * (for example, critical daemons are not running) + * Applies to ACTIVE state. + * + * Generated from protobuf enum UNHEALTHY = 2; + */ + const UNHEALTHY = 2; + /** + * The instance has not installed health monitoring agent. + * Applies to ACTIVE state. + * + * Generated from protobuf enum AGENT_NOT_INSTALLED = 3; + */ + const AGENT_NOT_INSTALLED = 3; + /** + * The instance health monitoring agent is not running. + * Applies to ACTIVE state. + * + * Generated from protobuf enum AGENT_NOT_RUNNING = 4; + */ + const AGENT_NOT_RUNNING = 4; + + private static $valueToName = [ + self::HEALTH_STATE_UNSPECIFIED => 'HEALTH_STATE_UNSPECIFIED', + self::HEALTHY => 'HEALTHY', + self::UNHEALTHY => 'UNHEALTHY', + self::AGENT_NOT_INSTALLED => 'AGENT_NOT_INSTALLED', + self::AGENT_NOT_RUNNING => 'AGENT_NOT_RUNNING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(HealthState::class, \Google\Cloud\Notebooks\V1\GetInstanceHealthResponse_HealthState::class); + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/GetInstanceRequest.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/GetInstanceRequest.php new file mode 100644 index 000000000000..4f5d9539fda5 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/GetInstanceRequest.php @@ -0,0 +1,85 @@ +google.cloud.notebooks.v1.GetInstanceRequest + */ +class GetInstanceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + + /** + * @param string $name Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * + * @return \Google\Cloud\Notebooks\V1\GetInstanceRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/GetRuntimeRequest.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/GetRuntimeRequest.php new file mode 100644 index 000000000000..3bf80c4ed391 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/GetRuntimeRequest.php @@ -0,0 +1,86 @@ +google.cloud.notebooks.v1.GetRuntimeRequest + */ +class GetRuntimeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Format: + * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` + * Please see {@see ManagedNotebookServiceClient::runtimeName()} for help formatting this field. + * + * @return \Google\Cloud\Notebooks\V1\GetRuntimeRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Format: + * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V1\ManagedService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/GetScheduleRequest.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/GetScheduleRequest.php new file mode 100644 index 000000000000..46cef98735dd --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/GetScheduleRequest.php @@ -0,0 +1,86 @@ +google.cloud.notebooks.v1.GetScheduleRequest + */ +class GetScheduleRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/schedules/{schedule_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Format: + * `projects/{project_id}/locations/{location}/schedules/{schedule_id}` + * Please see {@see NotebookServiceClient::scheduleName()} for help formatting this field. + * + * @return \Google\Cloud\Notebooks\V1\GetScheduleRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Format: + * `projects/{project_id}/locations/{location}/schedules/{schedule_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/schedules/{schedule_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/schedules/{schedule_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance.php new file mode 100644 index 000000000000..accb7b274f41 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance.php @@ -0,0 +1,1522 @@ +google.cloud.notebooks.v1.Instance + */ +class Instance extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The name of this notebook instance. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Path to a Bash script that automatically runs after a notebook instance + * fully boots up. The path must be a URL or + * Cloud Storage path (`gs://path-to-file/file-name`). + * + * Generated from protobuf field string post_startup_script = 4; + */ + protected $post_startup_script = ''; + /** + * Output only. The proxy endpoint that is used to access the Jupyter notebook. + * + * Generated from protobuf field string proxy_uri = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $proxy_uri = ''; + /** + * Input only. The owner of this instance after creation. Format: `alias@example.com` + * Currently supports one owner only. If not specified, all of the service + * account users of your VM instance's service account can use + * the instance. + * + * Generated from protobuf field repeated string instance_owners = 6 [(.google.api.field_behavior) = INPUT_ONLY]; + */ + private $instance_owners; + /** + * The service account on this instance, giving access to other Google + * Cloud services. + * You can use any service account within the same project, but you + * must have the service account user permission to use the instance. + * If not specified, the [Compute Engine default service + * account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account) + * is used. + * + * Generated from protobuf field string service_account = 7; + */ + protected $service_account = ''; + /** + * Optional. The URIs of service account scopes to be included in + * Compute Engine instances. + * If not specified, the following + * [scopes](https://cloud.google.com/compute/docs/access/service-accounts#accesscopesiam) + * are defined: + * - https://www.googleapis.com/auth/cloud-platform + * - https://www.googleapis.com/auth/userinfo.email + * If not using default scopes, you need at least: + * https://www.googleapis.com/auth/compute + * + * Generated from protobuf field repeated string service_account_scopes = 31 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $service_account_scopes; + /** + * Required. The [Compute Engine machine + * type](https://cloud.google.com/compute/docs/machine-types) of this + * instance. + * + * Generated from protobuf field string machine_type = 8 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $machine_type = ''; + /** + * The hardware accelerator used on this instance. If you use + * accelerators, make sure that your configuration has + * [enough vCPUs and memory to support the `machine_type` you have + * selected](https://cloud.google.com/compute/docs/gpus/#gpus-list). + * + * Generated from protobuf field .google.cloud.notebooks.v1.Instance.AcceleratorConfig accelerator_config = 9; + */ + protected $accelerator_config = null; + /** + * Output only. The state of this instance. + * + * Generated from protobuf field .google.cloud.notebooks.v1.Instance.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Whether the end user authorizes Google Cloud to install GPU driver + * on this instance. + * If this field is empty or set to false, the GPU driver won't be installed. + * Only applicable to instances with GPUs. + * + * Generated from protobuf field bool install_gpu_driver = 11; + */ + protected $install_gpu_driver = false; + /** + * Specify a custom Cloud Storage path where the GPU driver is stored. + * If not specified, we'll automatically choose from official GPU drivers. + * + * Generated from protobuf field string custom_gpu_driver_path = 12; + */ + protected $custom_gpu_driver_path = ''; + /** + * Input only. The type of the boot disk attached to this instance, defaults to + * standard persistent disk (`PD_STANDARD`). + * + * Generated from protobuf field .google.cloud.notebooks.v1.Instance.DiskType boot_disk_type = 13 [(.google.api.field_behavior) = INPUT_ONLY]; + */ + protected $boot_disk_type = 0; + /** + * Input only. The size of the boot disk in GB attached to this instance, up to a maximum + * of 64000 GB (64 TB). The minimum recommended value is 100 GB. If not + * specified, this defaults to 100. + * + * Generated from protobuf field int64 boot_disk_size_gb = 14 [(.google.api.field_behavior) = INPUT_ONLY]; + */ + protected $boot_disk_size_gb = 0; + /** + * Input only. The type of the data disk attached to this instance, defaults to + * standard persistent disk (`PD_STANDARD`). + * + * Generated from protobuf field .google.cloud.notebooks.v1.Instance.DiskType data_disk_type = 25 [(.google.api.field_behavior) = INPUT_ONLY]; + */ + protected $data_disk_type = 0; + /** + * Input only. The size of the data disk in GB attached to this instance, up to a maximum + * of 64000 GB (64 TB). You can choose the size of the data disk based on how + * big your notebooks and data are. If not specified, this defaults to 100. + * + * Generated from protobuf field int64 data_disk_size_gb = 26 [(.google.api.field_behavior) = INPUT_ONLY]; + */ + protected $data_disk_size_gb = 0; + /** + * Input only. If true, the data disk will not be auto deleted when deleting the instance. + * + * Generated from protobuf field bool no_remove_data_disk = 27 [(.google.api.field_behavior) = INPUT_ONLY]; + */ + protected $no_remove_data_disk = false; + /** + * Input only. Disk encryption method used on the boot and data disks, defaults to GMEK. + * + * Generated from protobuf field .google.cloud.notebooks.v1.Instance.DiskEncryption disk_encryption = 15 [(.google.api.field_behavior) = INPUT_ONLY]; + */ + protected $disk_encryption = 0; + /** + * Input only. The KMS key used to encrypt the disks, only applicable if disk_encryption + * is CMEK. + * Format: + * `projects/{project_id}/locations/{location}/keyRings/{key_ring_id}/cryptoKeys/{key_id}` + * Learn more about [using your own encryption keys](/kms/docs/quickstart). + * + * Generated from protobuf field string kms_key = 16 [(.google.api.field_behavior) = INPUT_ONLY]; + */ + protected $kms_key = ''; + /** + * Output only. Attached disks to notebook instance. + * + * Generated from protobuf field repeated .google.cloud.notebooks.v1.Instance.Disk disks = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $disks; + /** + * Optional. Shielded VM configuration. + * [Images using supported Shielded VM + * features](https://cloud.google.com/compute/docs/instances/modifying-shielded-vm). + * + * Generated from protobuf field .google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig shielded_instance_config = 30 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $shielded_instance_config = null; + /** + * If true, no public IP will be assigned to this instance. + * + * Generated from protobuf field bool no_public_ip = 17; + */ + protected $no_public_ip = false; + /** + * If true, the notebook instance will not register with the proxy. + * + * Generated from protobuf field bool no_proxy_access = 18; + */ + protected $no_proxy_access = false; + /** + * The name of the VPC that this instance is in. + * Format: + * `projects/{project_id}/global/networks/{network_id}` + * + * Generated from protobuf field string network = 19; + */ + protected $network = ''; + /** + * The name of the subnet that this instance is in. + * Format: + * `projects/{project_id}/regions/{region}/subnetworks/{subnetwork_id}` + * + * Generated from protobuf field string subnet = 20; + */ + protected $subnet = ''; + /** + * Labels to apply to this instance. + * These can be later modified by the setLabels method. + * + * Generated from protobuf field map labels = 21; + */ + private $labels; + /** + * Custom metadata to apply to this instance. + * + * Generated from protobuf field map metadata = 22; + */ + private $metadata; + /** + * Optional. The Compute Engine tags to add to runtime (see [Tagging + * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)). + * + * Generated from protobuf field repeated string tags = 32 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $tags; + /** + * The upgrade history of this instance. + * + * Generated from protobuf field repeated .google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry upgrade_history = 29; + */ + private $upgrade_history; + /** + * Optional. The type of vNIC to be used on this interface. This may be gVNIC or + * VirtioNet. + * + * Generated from protobuf field .google.cloud.notebooks.v1.Instance.NicType nic_type = 33 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $nic_type = 0; + /** + * Optional. The optional reservation affinity. Setting this field will apply + * the specified [Zonal Compute + * Reservation](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources) + * to this notebook instance. + * + * Generated from protobuf field .google.cloud.notebooks.v1.ReservationAffinity reservation_affinity = 34 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $reservation_affinity = null; + /** + * Output only. Email address of entity that sent original CreateInstance request. + * + * Generated from protobuf field string creator = 36 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $creator = ''; + /** + * Optional. Flag to enable ip forwarding or not, default false/off. + * https://cloud.google.com/vpc/docs/using-routes#canipforward + * + * Generated from protobuf field bool can_ip_forward = 39 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $can_ip_forward = false; + /** + * Output only. Instance creation time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. Instance update time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + protected $environment; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The name of this notebook instance. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * @type \Google\Cloud\Notebooks\V1\VmImage $vm_image + * Use a Compute Engine VM image to start the notebook instance. + * @type \Google\Cloud\Notebooks\V1\ContainerImage $container_image + * Use a container image to start the notebook instance. + * @type string $post_startup_script + * Path to a Bash script that automatically runs after a notebook instance + * fully boots up. The path must be a URL or + * Cloud Storage path (`gs://path-to-file/file-name`). + * @type string $proxy_uri + * Output only. The proxy endpoint that is used to access the Jupyter notebook. + * @type array|\Google\Protobuf\Internal\RepeatedField $instance_owners + * Input only. The owner of this instance after creation. Format: `alias@example.com` + * Currently supports one owner only. If not specified, all of the service + * account users of your VM instance's service account can use + * the instance. + * @type string $service_account + * The service account on this instance, giving access to other Google + * Cloud services. + * You can use any service account within the same project, but you + * must have the service account user permission to use the instance. + * If not specified, the [Compute Engine default service + * account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account) + * is used. + * @type array|\Google\Protobuf\Internal\RepeatedField $service_account_scopes + * Optional. The URIs of service account scopes to be included in + * Compute Engine instances. + * If not specified, the following + * [scopes](https://cloud.google.com/compute/docs/access/service-accounts#accesscopesiam) + * are defined: + * - https://www.googleapis.com/auth/cloud-platform + * - https://www.googleapis.com/auth/userinfo.email + * If not using default scopes, you need at least: + * https://www.googleapis.com/auth/compute + * @type string $machine_type + * Required. The [Compute Engine machine + * type](https://cloud.google.com/compute/docs/machine-types) of this + * instance. + * @type \Google\Cloud\Notebooks\V1\Instance\AcceleratorConfig $accelerator_config + * The hardware accelerator used on this instance. If you use + * accelerators, make sure that your configuration has + * [enough vCPUs and memory to support the `machine_type` you have + * selected](https://cloud.google.com/compute/docs/gpus/#gpus-list). + * @type int $state + * Output only. The state of this instance. + * @type bool $install_gpu_driver + * Whether the end user authorizes Google Cloud to install GPU driver + * on this instance. + * If this field is empty or set to false, the GPU driver won't be installed. + * Only applicable to instances with GPUs. + * @type string $custom_gpu_driver_path + * Specify a custom Cloud Storage path where the GPU driver is stored. + * If not specified, we'll automatically choose from official GPU drivers. + * @type int $boot_disk_type + * Input only. The type of the boot disk attached to this instance, defaults to + * standard persistent disk (`PD_STANDARD`). + * @type int|string $boot_disk_size_gb + * Input only. The size of the boot disk in GB attached to this instance, up to a maximum + * of 64000 GB (64 TB). The minimum recommended value is 100 GB. If not + * specified, this defaults to 100. + * @type int $data_disk_type + * Input only. The type of the data disk attached to this instance, defaults to + * standard persistent disk (`PD_STANDARD`). + * @type int|string $data_disk_size_gb + * Input only. The size of the data disk in GB attached to this instance, up to a maximum + * of 64000 GB (64 TB). You can choose the size of the data disk based on how + * big your notebooks and data are. If not specified, this defaults to 100. + * @type bool $no_remove_data_disk + * Input only. If true, the data disk will not be auto deleted when deleting the instance. + * @type int $disk_encryption + * Input only. Disk encryption method used on the boot and data disks, defaults to GMEK. + * @type string $kms_key + * Input only. The KMS key used to encrypt the disks, only applicable if disk_encryption + * is CMEK. + * Format: + * `projects/{project_id}/locations/{location}/keyRings/{key_ring_id}/cryptoKeys/{key_id}` + * Learn more about [using your own encryption keys](/kms/docs/quickstart). + * @type array<\Google\Cloud\Notebooks\V1\Instance\Disk>|\Google\Protobuf\Internal\RepeatedField $disks + * Output only. Attached disks to notebook instance. + * @type \Google\Cloud\Notebooks\V1\Instance\ShieldedInstanceConfig $shielded_instance_config + * Optional. Shielded VM configuration. + * [Images using supported Shielded VM + * features](https://cloud.google.com/compute/docs/instances/modifying-shielded-vm). + * @type bool $no_public_ip + * If true, no public IP will be assigned to this instance. + * @type bool $no_proxy_access + * If true, the notebook instance will not register with the proxy. + * @type string $network + * The name of the VPC that this instance is in. + * Format: + * `projects/{project_id}/global/networks/{network_id}` + * @type string $subnet + * The name of the subnet that this instance is in. + * Format: + * `projects/{project_id}/regions/{region}/subnetworks/{subnetwork_id}` + * @type array|\Google\Protobuf\Internal\MapField $labels + * Labels to apply to this instance. + * These can be later modified by the setLabels method. + * @type array|\Google\Protobuf\Internal\MapField $metadata + * Custom metadata to apply to this instance. + * @type array|\Google\Protobuf\Internal\RepeatedField $tags + * Optional. The Compute Engine tags to add to runtime (see [Tagging + * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)). + * @type array<\Google\Cloud\Notebooks\V1\Instance\UpgradeHistoryEntry>|\Google\Protobuf\Internal\RepeatedField $upgrade_history + * The upgrade history of this instance. + * @type int $nic_type + * Optional. The type of vNIC to be used on this interface. This may be gVNIC or + * VirtioNet. + * @type \Google\Cloud\Notebooks\V1\ReservationAffinity $reservation_affinity + * Optional. The optional reservation affinity. Setting this field will apply + * the specified [Zonal Compute + * Reservation](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources) + * to this notebook instance. + * @type string $creator + * Output only. Email address of entity that sent original CreateInstance request. + * @type bool $can_ip_forward + * Optional. Flag to enable ip forwarding or not, default false/off. + * https://cloud.google.com/vpc/docs/using-routes#canipforward + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Instance creation time. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. Instance update time. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V1\Instance::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The name of this notebook instance. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The name of this notebook instance. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Use a Compute Engine VM image to start the notebook instance. + * + * Generated from protobuf field .google.cloud.notebooks.v1.VmImage vm_image = 2; + * @return \Google\Cloud\Notebooks\V1\VmImage|null + */ + public function getVmImage() + { + return $this->readOneof(2); + } + + public function hasVmImage() + { + return $this->hasOneof(2); + } + + /** + * Use a Compute Engine VM image to start the notebook instance. + * + * Generated from protobuf field .google.cloud.notebooks.v1.VmImage vm_image = 2; + * @param \Google\Cloud\Notebooks\V1\VmImage $var + * @return $this + */ + public function setVmImage($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V1\VmImage::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Use a container image to start the notebook instance. + * + * Generated from protobuf field .google.cloud.notebooks.v1.ContainerImage container_image = 3; + * @return \Google\Cloud\Notebooks\V1\ContainerImage|null + */ + public function getContainerImage() + { + return $this->readOneof(3); + } + + public function hasContainerImage() + { + return $this->hasOneof(3); + } + + /** + * Use a container image to start the notebook instance. + * + * Generated from protobuf field .google.cloud.notebooks.v1.ContainerImage container_image = 3; + * @param \Google\Cloud\Notebooks\V1\ContainerImage $var + * @return $this + */ + public function setContainerImage($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V1\ContainerImage::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Path to a Bash script that automatically runs after a notebook instance + * fully boots up. The path must be a URL or + * Cloud Storage path (`gs://path-to-file/file-name`). + * + * Generated from protobuf field string post_startup_script = 4; + * @return string + */ + public function getPostStartupScript() + { + return $this->post_startup_script; + } + + /** + * Path to a Bash script that automatically runs after a notebook instance + * fully boots up. The path must be a URL or + * Cloud Storage path (`gs://path-to-file/file-name`). + * + * Generated from protobuf field string post_startup_script = 4; + * @param string $var + * @return $this + */ + public function setPostStartupScript($var) + { + GPBUtil::checkString($var, True); + $this->post_startup_script = $var; + + return $this; + } + + /** + * Output only. The proxy endpoint that is used to access the Jupyter notebook. + * + * Generated from protobuf field string proxy_uri = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getProxyUri() + { + return $this->proxy_uri; + } + + /** + * Output only. The proxy endpoint that is used to access the Jupyter notebook. + * + * Generated from protobuf field string proxy_uri = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setProxyUri($var) + { + GPBUtil::checkString($var, True); + $this->proxy_uri = $var; + + return $this; + } + + /** + * Input only. The owner of this instance after creation. Format: `alias@example.com` + * Currently supports one owner only. If not specified, all of the service + * account users of your VM instance's service account can use + * the instance. + * + * Generated from protobuf field repeated string instance_owners = 6 [(.google.api.field_behavior) = INPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getInstanceOwners() + { + return $this->instance_owners; + } + + /** + * Input only. The owner of this instance after creation. Format: `alias@example.com` + * Currently supports one owner only. If not specified, all of the service + * account users of your VM instance's service account can use + * the instance. + * + * Generated from protobuf field repeated string instance_owners = 6 [(.google.api.field_behavior) = INPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setInstanceOwners($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->instance_owners = $arr; + + return $this; + } + + /** + * The service account on this instance, giving access to other Google + * Cloud services. + * You can use any service account within the same project, but you + * must have the service account user permission to use the instance. + * If not specified, the [Compute Engine default service + * account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account) + * is used. + * + * Generated from protobuf field string service_account = 7; + * @return string + */ + public function getServiceAccount() + { + return $this->service_account; + } + + /** + * The service account on this instance, giving access to other Google + * Cloud services. + * You can use any service account within the same project, but you + * must have the service account user permission to use the instance. + * If not specified, the [Compute Engine default service + * account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account) + * is used. + * + * Generated from protobuf field string service_account = 7; + * @param string $var + * @return $this + */ + public function setServiceAccount($var) + { + GPBUtil::checkString($var, True); + $this->service_account = $var; + + return $this; + } + + /** + * Optional. The URIs of service account scopes to be included in + * Compute Engine instances. + * If not specified, the following + * [scopes](https://cloud.google.com/compute/docs/access/service-accounts#accesscopesiam) + * are defined: + * - https://www.googleapis.com/auth/cloud-platform + * - https://www.googleapis.com/auth/userinfo.email + * If not using default scopes, you need at least: + * https://www.googleapis.com/auth/compute + * + * Generated from protobuf field repeated string service_account_scopes = 31 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getServiceAccountScopes() + { + return $this->service_account_scopes; + } + + /** + * Optional. The URIs of service account scopes to be included in + * Compute Engine instances. + * If not specified, the following + * [scopes](https://cloud.google.com/compute/docs/access/service-accounts#accesscopesiam) + * are defined: + * - https://www.googleapis.com/auth/cloud-platform + * - https://www.googleapis.com/auth/userinfo.email + * If not using default scopes, you need at least: + * https://www.googleapis.com/auth/compute + * + * Generated from protobuf field repeated string service_account_scopes = 31 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setServiceAccountScopes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->service_account_scopes = $arr; + + return $this; + } + + /** + * Required. The [Compute Engine machine + * type](https://cloud.google.com/compute/docs/machine-types) of this + * instance. + * + * Generated from protobuf field string machine_type = 8 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getMachineType() + { + return $this->machine_type; + } + + /** + * Required. The [Compute Engine machine + * type](https://cloud.google.com/compute/docs/machine-types) of this + * instance. + * + * Generated from protobuf field string machine_type = 8 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setMachineType($var) + { + GPBUtil::checkString($var, True); + $this->machine_type = $var; + + return $this; + } + + /** + * The hardware accelerator used on this instance. If you use + * accelerators, make sure that your configuration has + * [enough vCPUs and memory to support the `machine_type` you have + * selected](https://cloud.google.com/compute/docs/gpus/#gpus-list). + * + * Generated from protobuf field .google.cloud.notebooks.v1.Instance.AcceleratorConfig accelerator_config = 9; + * @return \Google\Cloud\Notebooks\V1\Instance\AcceleratorConfig|null + */ + public function getAcceleratorConfig() + { + return $this->accelerator_config; + } + + public function hasAcceleratorConfig() + { + return isset($this->accelerator_config); + } + + public function clearAcceleratorConfig() + { + unset($this->accelerator_config); + } + + /** + * The hardware accelerator used on this instance. If you use + * accelerators, make sure that your configuration has + * [enough vCPUs and memory to support the `machine_type` you have + * selected](https://cloud.google.com/compute/docs/gpus/#gpus-list). + * + * Generated from protobuf field .google.cloud.notebooks.v1.Instance.AcceleratorConfig accelerator_config = 9; + * @param \Google\Cloud\Notebooks\V1\Instance\AcceleratorConfig $var + * @return $this + */ + public function setAcceleratorConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V1\Instance\AcceleratorConfig::class); + $this->accelerator_config = $var; + + return $this; + } + + /** + * Output only. The state of this instance. + * + * Generated from protobuf field .google.cloud.notebooks.v1.Instance.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The state of this instance. + * + * Generated from protobuf field .google.cloud.notebooks.v1.Instance.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Notebooks\V1\Instance\State::class); + $this->state = $var; + + return $this; + } + + /** + * Whether the end user authorizes Google Cloud to install GPU driver + * on this instance. + * If this field is empty or set to false, the GPU driver won't be installed. + * Only applicable to instances with GPUs. + * + * Generated from protobuf field bool install_gpu_driver = 11; + * @return bool + */ + public function getInstallGpuDriver() + { + return $this->install_gpu_driver; + } + + /** + * Whether the end user authorizes Google Cloud to install GPU driver + * on this instance. + * If this field is empty or set to false, the GPU driver won't be installed. + * Only applicable to instances with GPUs. + * + * Generated from protobuf field bool install_gpu_driver = 11; + * @param bool $var + * @return $this + */ + public function setInstallGpuDriver($var) + { + GPBUtil::checkBool($var); + $this->install_gpu_driver = $var; + + return $this; + } + + /** + * Specify a custom Cloud Storage path where the GPU driver is stored. + * If not specified, we'll automatically choose from official GPU drivers. + * + * Generated from protobuf field string custom_gpu_driver_path = 12; + * @return string + */ + public function getCustomGpuDriverPath() + { + return $this->custom_gpu_driver_path; + } + + /** + * Specify a custom Cloud Storage path where the GPU driver is stored. + * If not specified, we'll automatically choose from official GPU drivers. + * + * Generated from protobuf field string custom_gpu_driver_path = 12; + * @param string $var + * @return $this + */ + public function setCustomGpuDriverPath($var) + { + GPBUtil::checkString($var, True); + $this->custom_gpu_driver_path = $var; + + return $this; + } + + /** + * Input only. The type of the boot disk attached to this instance, defaults to + * standard persistent disk (`PD_STANDARD`). + * + * Generated from protobuf field .google.cloud.notebooks.v1.Instance.DiskType boot_disk_type = 13 [(.google.api.field_behavior) = INPUT_ONLY]; + * @return int + */ + public function getBootDiskType() + { + return $this->boot_disk_type; + } + + /** + * Input only. The type of the boot disk attached to this instance, defaults to + * standard persistent disk (`PD_STANDARD`). + * + * Generated from protobuf field .google.cloud.notebooks.v1.Instance.DiskType boot_disk_type = 13 [(.google.api.field_behavior) = INPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setBootDiskType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Notebooks\V1\Instance\DiskType::class); + $this->boot_disk_type = $var; + + return $this; + } + + /** + * Input only. The size of the boot disk in GB attached to this instance, up to a maximum + * of 64000 GB (64 TB). The minimum recommended value is 100 GB. If not + * specified, this defaults to 100. + * + * Generated from protobuf field int64 boot_disk_size_gb = 14 [(.google.api.field_behavior) = INPUT_ONLY]; + * @return int|string + */ + public function getBootDiskSizeGb() + { + return $this->boot_disk_size_gb; + } + + /** + * Input only. The size of the boot disk in GB attached to this instance, up to a maximum + * of 64000 GB (64 TB). The minimum recommended value is 100 GB. If not + * specified, this defaults to 100. + * + * Generated from protobuf field int64 boot_disk_size_gb = 14 [(.google.api.field_behavior) = INPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setBootDiskSizeGb($var) + { + GPBUtil::checkInt64($var); + $this->boot_disk_size_gb = $var; + + return $this; + } + + /** + * Input only. The type of the data disk attached to this instance, defaults to + * standard persistent disk (`PD_STANDARD`). + * + * Generated from protobuf field .google.cloud.notebooks.v1.Instance.DiskType data_disk_type = 25 [(.google.api.field_behavior) = INPUT_ONLY]; + * @return int + */ + public function getDataDiskType() + { + return $this->data_disk_type; + } + + /** + * Input only. The type of the data disk attached to this instance, defaults to + * standard persistent disk (`PD_STANDARD`). + * + * Generated from protobuf field .google.cloud.notebooks.v1.Instance.DiskType data_disk_type = 25 [(.google.api.field_behavior) = INPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setDataDiskType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Notebooks\V1\Instance\DiskType::class); + $this->data_disk_type = $var; + + return $this; + } + + /** + * Input only. The size of the data disk in GB attached to this instance, up to a maximum + * of 64000 GB (64 TB). You can choose the size of the data disk based on how + * big your notebooks and data are. If not specified, this defaults to 100. + * + * Generated from protobuf field int64 data_disk_size_gb = 26 [(.google.api.field_behavior) = INPUT_ONLY]; + * @return int|string + */ + public function getDataDiskSizeGb() + { + return $this->data_disk_size_gb; + } + + /** + * Input only. The size of the data disk in GB attached to this instance, up to a maximum + * of 64000 GB (64 TB). You can choose the size of the data disk based on how + * big your notebooks and data are. If not specified, this defaults to 100. + * + * Generated from protobuf field int64 data_disk_size_gb = 26 [(.google.api.field_behavior) = INPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setDataDiskSizeGb($var) + { + GPBUtil::checkInt64($var); + $this->data_disk_size_gb = $var; + + return $this; + } + + /** + * Input only. If true, the data disk will not be auto deleted when deleting the instance. + * + * Generated from protobuf field bool no_remove_data_disk = 27 [(.google.api.field_behavior) = INPUT_ONLY]; + * @return bool + */ + public function getNoRemoveDataDisk() + { + return $this->no_remove_data_disk; + } + + /** + * Input only. If true, the data disk will not be auto deleted when deleting the instance. + * + * Generated from protobuf field bool no_remove_data_disk = 27 [(.google.api.field_behavior) = INPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setNoRemoveDataDisk($var) + { + GPBUtil::checkBool($var); + $this->no_remove_data_disk = $var; + + return $this; + } + + /** + * Input only. Disk encryption method used on the boot and data disks, defaults to GMEK. + * + * Generated from protobuf field .google.cloud.notebooks.v1.Instance.DiskEncryption disk_encryption = 15 [(.google.api.field_behavior) = INPUT_ONLY]; + * @return int + */ + public function getDiskEncryption() + { + return $this->disk_encryption; + } + + /** + * Input only. Disk encryption method used on the boot and data disks, defaults to GMEK. + * + * Generated from protobuf field .google.cloud.notebooks.v1.Instance.DiskEncryption disk_encryption = 15 [(.google.api.field_behavior) = INPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setDiskEncryption($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Notebooks\V1\Instance\DiskEncryption::class); + $this->disk_encryption = $var; + + return $this; + } + + /** + * Input only. The KMS key used to encrypt the disks, only applicable if disk_encryption + * is CMEK. + * Format: + * `projects/{project_id}/locations/{location}/keyRings/{key_ring_id}/cryptoKeys/{key_id}` + * Learn more about [using your own encryption keys](/kms/docs/quickstart). + * + * Generated from protobuf field string kms_key = 16 [(.google.api.field_behavior) = INPUT_ONLY]; + * @return string + */ + public function getKmsKey() + { + return $this->kms_key; + } + + /** + * Input only. The KMS key used to encrypt the disks, only applicable if disk_encryption + * is CMEK. + * Format: + * `projects/{project_id}/locations/{location}/keyRings/{key_ring_id}/cryptoKeys/{key_id}` + * Learn more about [using your own encryption keys](/kms/docs/quickstart). + * + * Generated from protobuf field string kms_key = 16 [(.google.api.field_behavior) = INPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setKmsKey($var) + { + GPBUtil::checkString($var, True); + $this->kms_key = $var; + + return $this; + } + + /** + * Output only. Attached disks to notebook instance. + * + * Generated from protobuf field repeated .google.cloud.notebooks.v1.Instance.Disk disks = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDisks() + { + return $this->disks; + } + + /** + * Output only. Attached disks to notebook instance. + * + * Generated from protobuf field repeated .google.cloud.notebooks.v1.Instance.Disk disks = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\Notebooks\V1\Instance\Disk>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDisks($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Notebooks\V1\Instance\Disk::class); + $this->disks = $arr; + + return $this; + } + + /** + * Optional. Shielded VM configuration. + * [Images using supported Shielded VM + * features](https://cloud.google.com/compute/docs/instances/modifying-shielded-vm). + * + * Generated from protobuf field .google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig shielded_instance_config = 30 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Notebooks\V1\Instance\ShieldedInstanceConfig|null + */ + public function getShieldedInstanceConfig() + { + return $this->shielded_instance_config; + } + + public function hasShieldedInstanceConfig() + { + return isset($this->shielded_instance_config); + } + + public function clearShieldedInstanceConfig() + { + unset($this->shielded_instance_config); + } + + /** + * Optional. Shielded VM configuration. + * [Images using supported Shielded VM + * features](https://cloud.google.com/compute/docs/instances/modifying-shielded-vm). + * + * Generated from protobuf field .google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig shielded_instance_config = 30 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Notebooks\V1\Instance\ShieldedInstanceConfig $var + * @return $this + */ + public function setShieldedInstanceConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V1\Instance\ShieldedInstanceConfig::class); + $this->shielded_instance_config = $var; + + return $this; + } + + /** + * If true, no public IP will be assigned to this instance. + * + * Generated from protobuf field bool no_public_ip = 17; + * @return bool + */ + public function getNoPublicIp() + { + return $this->no_public_ip; + } + + /** + * If true, no public IP will be assigned to this instance. + * + * Generated from protobuf field bool no_public_ip = 17; + * @param bool $var + * @return $this + */ + public function setNoPublicIp($var) + { + GPBUtil::checkBool($var); + $this->no_public_ip = $var; + + return $this; + } + + /** + * If true, the notebook instance will not register with the proxy. + * + * Generated from protobuf field bool no_proxy_access = 18; + * @return bool + */ + public function getNoProxyAccess() + { + return $this->no_proxy_access; + } + + /** + * If true, the notebook instance will not register with the proxy. + * + * Generated from protobuf field bool no_proxy_access = 18; + * @param bool $var + * @return $this + */ + public function setNoProxyAccess($var) + { + GPBUtil::checkBool($var); + $this->no_proxy_access = $var; + + return $this; + } + + /** + * The name of the VPC that this instance is in. + * Format: + * `projects/{project_id}/global/networks/{network_id}` + * + * Generated from protobuf field string network = 19; + * @return string + */ + public function getNetwork() + { + return $this->network; + } + + /** + * The name of the VPC that this instance is in. + * Format: + * `projects/{project_id}/global/networks/{network_id}` + * + * Generated from protobuf field string network = 19; + * @param string $var + * @return $this + */ + public function setNetwork($var) + { + GPBUtil::checkString($var, True); + $this->network = $var; + + return $this; + } + + /** + * The name of the subnet that this instance is in. + * Format: + * `projects/{project_id}/regions/{region}/subnetworks/{subnetwork_id}` + * + * Generated from protobuf field string subnet = 20; + * @return string + */ + public function getSubnet() + { + return $this->subnet; + } + + /** + * The name of the subnet that this instance is in. + * Format: + * `projects/{project_id}/regions/{region}/subnetworks/{subnetwork_id}` + * + * Generated from protobuf field string subnet = 20; + * @param string $var + * @return $this + */ + public function setSubnet($var) + { + GPBUtil::checkString($var, True); + $this->subnet = $var; + + return $this; + } + + /** + * Labels to apply to this instance. + * These can be later modified by the setLabels method. + * + * Generated from protobuf field map labels = 21; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Labels to apply to this instance. + * These can be later modified by the setLabels method. + * + * Generated from protobuf field map labels = 21; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Custom metadata to apply to this instance. + * + * Generated from protobuf field map metadata = 22; + * @return \Google\Protobuf\Internal\MapField + */ + public function getMetadata() + { + return $this->metadata; + } + + /** + * Custom metadata to apply to this instance. + * + * Generated from protobuf field map metadata = 22; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setMetadata($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->metadata = $arr; + + return $this; + } + + /** + * Optional. The Compute Engine tags to add to runtime (see [Tagging + * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)). + * + * Generated from protobuf field repeated string tags = 32 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTags() + { + return $this->tags; + } + + /** + * Optional. The Compute Engine tags to add to runtime (see [Tagging + * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)). + * + * Generated from protobuf field repeated string tags = 32 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTags($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->tags = $arr; + + return $this; + } + + /** + * The upgrade history of this instance. + * + * Generated from protobuf field repeated .google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry upgrade_history = 29; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUpgradeHistory() + { + return $this->upgrade_history; + } + + /** + * The upgrade history of this instance. + * + * Generated from protobuf field repeated .google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry upgrade_history = 29; + * @param array<\Google\Cloud\Notebooks\V1\Instance\UpgradeHistoryEntry>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUpgradeHistory($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Notebooks\V1\Instance\UpgradeHistoryEntry::class); + $this->upgrade_history = $arr; + + return $this; + } + + /** + * Optional. The type of vNIC to be used on this interface. This may be gVNIC or + * VirtioNet. + * + * Generated from protobuf field .google.cloud.notebooks.v1.Instance.NicType nic_type = 33 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getNicType() + { + return $this->nic_type; + } + + /** + * Optional. The type of vNIC to be used on this interface. This may be gVNIC or + * VirtioNet. + * + * Generated from protobuf field .google.cloud.notebooks.v1.Instance.NicType nic_type = 33 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setNicType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Notebooks\V1\Instance\NicType::class); + $this->nic_type = $var; + + return $this; + } + + /** + * Optional. The optional reservation affinity. Setting this field will apply + * the specified [Zonal Compute + * Reservation](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources) + * to this notebook instance. + * + * Generated from protobuf field .google.cloud.notebooks.v1.ReservationAffinity reservation_affinity = 34 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Notebooks\V1\ReservationAffinity|null + */ + public function getReservationAffinity() + { + return $this->reservation_affinity; + } + + public function hasReservationAffinity() + { + return isset($this->reservation_affinity); + } + + public function clearReservationAffinity() + { + unset($this->reservation_affinity); + } + + /** + * Optional. The optional reservation affinity. Setting this field will apply + * the specified [Zonal Compute + * Reservation](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources) + * to this notebook instance. + * + * Generated from protobuf field .google.cloud.notebooks.v1.ReservationAffinity reservation_affinity = 34 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Notebooks\V1\ReservationAffinity $var + * @return $this + */ + public function setReservationAffinity($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V1\ReservationAffinity::class); + $this->reservation_affinity = $var; + + return $this; + } + + /** + * Output only. Email address of entity that sent original CreateInstance request. + * + * Generated from protobuf field string creator = 36 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getCreator() + { + return $this->creator; + } + + /** + * Output only. Email address of entity that sent original CreateInstance request. + * + * Generated from protobuf field string creator = 36 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setCreator($var) + { + GPBUtil::checkString($var, True); + $this->creator = $var; + + return $this; + } + + /** + * Optional. Flag to enable ip forwarding or not, default false/off. + * https://cloud.google.com/vpc/docs/using-routes#canipforward + * + * Generated from protobuf field bool can_ip_forward = 39 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getCanIpForward() + { + return $this->can_ip_forward; + } + + /** + * Optional. Flag to enable ip forwarding or not, default false/off. + * https://cloud.google.com/vpc/docs/using-routes#canipforward + * + * Generated from protobuf field bool can_ip_forward = 39 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setCanIpForward($var) + { + GPBUtil::checkBool($var); + $this->can_ip_forward = $var; + + return $this; + } + + /** + * Output only. Instance creation time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. Instance creation time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. Instance update time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. Instance update time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * @return string + */ + public function getEnvironment() + { + return $this->whichOneof("environment"); + } + +} + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance/AcceleratorConfig.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance/AcceleratorConfig.php new file mode 100644 index 000000000000..03690da04700 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance/AcceleratorConfig.php @@ -0,0 +1,107 @@ +google.cloud.notebooks.v1.Instance.AcceleratorConfig + */ +class AcceleratorConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Type of this accelerator. + * + * Generated from protobuf field .google.cloud.notebooks.v1.Instance.AcceleratorType type = 1; + */ + protected $type = 0; + /** + * Count of cores of this accelerator. + * + * Generated from protobuf field int64 core_count = 2; + */ + protected $core_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $type + * Type of this accelerator. + * @type int|string $core_count + * Count of cores of this accelerator. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V1\Instance::initOnce(); + parent::__construct($data); + } + + /** + * Type of this accelerator. + * + * Generated from protobuf field .google.cloud.notebooks.v1.Instance.AcceleratorType type = 1; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Type of this accelerator. + * + * Generated from protobuf field .google.cloud.notebooks.v1.Instance.AcceleratorType type = 1; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Notebooks\V1\Instance\AcceleratorType::class); + $this->type = $var; + + return $this; + } + + /** + * Count of cores of this accelerator. + * + * Generated from protobuf field int64 core_count = 2; + * @return int|string + */ + public function getCoreCount() + { + return $this->core_count; + } + + /** + * Count of cores of this accelerator. + * + * Generated from protobuf field int64 core_count = 2; + * @param int|string $var + * @return $this + */ + public function setCoreCount($var) + { + GPBUtil::checkInt64($var); + $this->core_count = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(AcceleratorConfig::class, \Google\Cloud\Notebooks\V1\Instance_AcceleratorConfig::class); + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance/AcceleratorType.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance/AcceleratorType.php new file mode 100644 index 000000000000..9831175c0a2b --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance/AcceleratorType.php @@ -0,0 +1,128 @@ +google.cloud.notebooks.v1.Instance.AcceleratorType + */ +class AcceleratorType +{ + /** + * Accelerator type is not specified. + * + * Generated from protobuf enum ACCELERATOR_TYPE_UNSPECIFIED = 0; + */ + const ACCELERATOR_TYPE_UNSPECIFIED = 0; + /** + * Accelerator type is Nvidia Tesla K80. + * + * Generated from protobuf enum NVIDIA_TESLA_K80 = 1; + */ + const NVIDIA_TESLA_K80 = 1; + /** + * Accelerator type is Nvidia Tesla P100. + * + * Generated from protobuf enum NVIDIA_TESLA_P100 = 2; + */ + const NVIDIA_TESLA_P100 = 2; + /** + * Accelerator type is Nvidia Tesla V100. + * + * Generated from protobuf enum NVIDIA_TESLA_V100 = 3; + */ + const NVIDIA_TESLA_V100 = 3; + /** + * Accelerator type is Nvidia Tesla P4. + * + * Generated from protobuf enum NVIDIA_TESLA_P4 = 4; + */ + const NVIDIA_TESLA_P4 = 4; + /** + * Accelerator type is Nvidia Tesla T4. + * + * Generated from protobuf enum NVIDIA_TESLA_T4 = 5; + */ + const NVIDIA_TESLA_T4 = 5; + /** + * Accelerator type is Nvidia Tesla A100. + * + * Generated from protobuf enum NVIDIA_TESLA_A100 = 11; + */ + const NVIDIA_TESLA_A100 = 11; + /** + * Accelerator type is NVIDIA Tesla T4 Virtual Workstations. + * + * Generated from protobuf enum NVIDIA_TESLA_T4_VWS = 8; + */ + const NVIDIA_TESLA_T4_VWS = 8; + /** + * Accelerator type is NVIDIA Tesla P100 Virtual Workstations. + * + * Generated from protobuf enum NVIDIA_TESLA_P100_VWS = 9; + */ + const NVIDIA_TESLA_P100_VWS = 9; + /** + * Accelerator type is NVIDIA Tesla P4 Virtual Workstations. + * + * Generated from protobuf enum NVIDIA_TESLA_P4_VWS = 10; + */ + const NVIDIA_TESLA_P4_VWS = 10; + /** + * (Coming soon) Accelerator type is TPU V2. + * + * Generated from protobuf enum TPU_V2 = 6; + */ + const TPU_V2 = 6; + /** + * (Coming soon) Accelerator type is TPU V3. + * + * Generated from protobuf enum TPU_V3 = 7; + */ + const TPU_V3 = 7; + + private static $valueToName = [ + self::ACCELERATOR_TYPE_UNSPECIFIED => 'ACCELERATOR_TYPE_UNSPECIFIED', + self::NVIDIA_TESLA_K80 => 'NVIDIA_TESLA_K80', + self::NVIDIA_TESLA_P100 => 'NVIDIA_TESLA_P100', + self::NVIDIA_TESLA_V100 => 'NVIDIA_TESLA_V100', + self::NVIDIA_TESLA_P4 => 'NVIDIA_TESLA_P4', + self::NVIDIA_TESLA_T4 => 'NVIDIA_TESLA_T4', + self::NVIDIA_TESLA_A100 => 'NVIDIA_TESLA_A100', + self::NVIDIA_TESLA_T4_VWS => 'NVIDIA_TESLA_T4_VWS', + self::NVIDIA_TESLA_P100_VWS => 'NVIDIA_TESLA_P100_VWS', + self::NVIDIA_TESLA_P4_VWS => 'NVIDIA_TESLA_P4_VWS', + self::TPU_V2 => 'TPU_V2', + self::TPU_V3 => 'TPU_V3', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(AcceleratorType::class, \Google\Cloud\Notebooks\V1\Instance_AcceleratorType::class); + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance/Disk.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance/Disk.php new file mode 100644 index 000000000000..b6b53e111ba1 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance/Disk.php @@ -0,0 +1,568 @@ +google.cloud.notebooks.v1.Instance.Disk + */ +class Disk extends \Google\Protobuf\Internal\Message +{ + /** + * Indicates whether the disk will be auto-deleted when the instance is + * deleted (but not when the disk is detached from the instance). + * + * Generated from protobuf field bool auto_delete = 1; + */ + protected $auto_delete = false; + /** + * Indicates that this is a boot disk. The virtual machine will use the + * first partition of the disk for its root filesystem. + * + * Generated from protobuf field bool boot = 2; + */ + protected $boot = false; + /** + * Indicates a unique device name of your choice that is reflected into the + * `/dev/disk/by-id/google-*` tree of a Linux operating system running + * within the instance. This name can be used to reference the device for + * mounting, resizing, and so on, from within the instance. + * If not specified, the server chooses a default device name to apply to + * this disk, in the form persistent-disk-x, where x is a number assigned by + * Google Compute Engine.This field is only applicable for persistent disks. + * + * Generated from protobuf field string device_name = 3; + */ + protected $device_name = ''; + /** + * Indicates the size of the disk in base-2 GB. + * + * Generated from protobuf field int64 disk_size_gb = 4; + */ + protected $disk_size_gb = 0; + /** + * Indicates a list of features to enable on the guest operating system. + * Applicable only for bootable images. Read Enabling guest operating + * system features to see a list of available options. + * + * Generated from protobuf field repeated .google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature guest_os_features = 5; + */ + private $guest_os_features; + /** + * A zero-based index to this disk, where 0 is reserved for the + * boot disk. If you have many disks attached to an instance, each disk + * would have a unique index number. + * + * Generated from protobuf field int64 index = 6; + */ + protected $index = 0; + /** + * Indicates the disk interface to use for attaching this disk, which is + * either SCSI or NVME. The default is SCSI. Persistent disks must always + * use SCSI and the request will fail if you attempt to attach a persistent + * disk in any other format than SCSI. Local SSDs can use either NVME or + * SCSI. For performance characteristics of SCSI over NVMe, see Local SSD + * performance. + * Valid values: + * * `NVME` + * * `SCSI` + * + * Generated from protobuf field string interface = 7; + */ + protected $interface = ''; + /** + * Type of the resource. Always compute#attachedDisk for attached + * disks. + * + * Generated from protobuf field string kind = 8; + */ + protected $kind = ''; + /** + * A list of publicly visible licenses. Reserved for Google's use. + * A License represents billing and aggregate usage data for public + * and marketplace images. + * + * Generated from protobuf field repeated string licenses = 9; + */ + private $licenses; + /** + * The mode in which to attach this disk, either `READ_WRITE` or + * `READ_ONLY`. If not specified, the default is to attach the disk in + * `READ_WRITE` mode. Valid values: + * * `READ_ONLY` + * * `READ_WRITE` + * + * Generated from protobuf field string mode = 10; + */ + protected $mode = ''; + /** + * Indicates a valid partial or full URL to an existing Persistent Disk + * resource. + * + * Generated from protobuf field string source = 11; + */ + protected $source = ''; + /** + * Indicates the type of the disk, either `SCRATCH` or `PERSISTENT`. + * Valid values: + * * `PERSISTENT` + * * `SCRATCH` + * + * Generated from protobuf field string type = 12; + */ + protected $type = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $auto_delete + * Indicates whether the disk will be auto-deleted when the instance is + * deleted (but not when the disk is detached from the instance). + * @type bool $boot + * Indicates that this is a boot disk. The virtual machine will use the + * first partition of the disk for its root filesystem. + * @type string $device_name + * Indicates a unique device name of your choice that is reflected into the + * `/dev/disk/by-id/google-*` tree of a Linux operating system running + * within the instance. This name can be used to reference the device for + * mounting, resizing, and so on, from within the instance. + * If not specified, the server chooses a default device name to apply to + * this disk, in the form persistent-disk-x, where x is a number assigned by + * Google Compute Engine.This field is only applicable for persistent disks. + * @type int|string $disk_size_gb + * Indicates the size of the disk in base-2 GB. + * @type array<\Google\Cloud\Notebooks\V1\Instance\Disk\GuestOsFeature>|\Google\Protobuf\Internal\RepeatedField $guest_os_features + * Indicates a list of features to enable on the guest operating system. + * Applicable only for bootable images. Read Enabling guest operating + * system features to see a list of available options. + * @type int|string $index + * A zero-based index to this disk, where 0 is reserved for the + * boot disk. If you have many disks attached to an instance, each disk + * would have a unique index number. + * @type string $interface + * Indicates the disk interface to use for attaching this disk, which is + * either SCSI or NVME. The default is SCSI. Persistent disks must always + * use SCSI and the request will fail if you attempt to attach a persistent + * disk in any other format than SCSI. Local SSDs can use either NVME or + * SCSI. For performance characteristics of SCSI over NVMe, see Local SSD + * performance. + * Valid values: + * * `NVME` + * * `SCSI` + * @type string $kind + * Type of the resource. Always compute#attachedDisk for attached + * disks. + * @type array|\Google\Protobuf\Internal\RepeatedField $licenses + * A list of publicly visible licenses. Reserved for Google's use. + * A License represents billing and aggregate usage data for public + * and marketplace images. + * @type string $mode + * The mode in which to attach this disk, either `READ_WRITE` or + * `READ_ONLY`. If not specified, the default is to attach the disk in + * `READ_WRITE` mode. Valid values: + * * `READ_ONLY` + * * `READ_WRITE` + * @type string $source + * Indicates a valid partial or full URL to an existing Persistent Disk + * resource. + * @type string $type + * Indicates the type of the disk, either `SCRATCH` or `PERSISTENT`. + * Valid values: + * * `PERSISTENT` + * * `SCRATCH` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V1\Instance::initOnce(); + parent::__construct($data); + } + + /** + * Indicates whether the disk will be auto-deleted when the instance is + * deleted (but not when the disk is detached from the instance). + * + * Generated from protobuf field bool auto_delete = 1; + * @return bool + */ + public function getAutoDelete() + { + return $this->auto_delete; + } + + /** + * Indicates whether the disk will be auto-deleted when the instance is + * deleted (but not when the disk is detached from the instance). + * + * Generated from protobuf field bool auto_delete = 1; + * @param bool $var + * @return $this + */ + public function setAutoDelete($var) + { + GPBUtil::checkBool($var); + $this->auto_delete = $var; + + return $this; + } + + /** + * Indicates that this is a boot disk. The virtual machine will use the + * first partition of the disk for its root filesystem. + * + * Generated from protobuf field bool boot = 2; + * @return bool + */ + public function getBoot() + { + return $this->boot; + } + + /** + * Indicates that this is a boot disk. The virtual machine will use the + * first partition of the disk for its root filesystem. + * + * Generated from protobuf field bool boot = 2; + * @param bool $var + * @return $this + */ + public function setBoot($var) + { + GPBUtil::checkBool($var); + $this->boot = $var; + + return $this; + } + + /** + * Indicates a unique device name of your choice that is reflected into the + * `/dev/disk/by-id/google-*` tree of a Linux operating system running + * within the instance. This name can be used to reference the device for + * mounting, resizing, and so on, from within the instance. + * If not specified, the server chooses a default device name to apply to + * this disk, in the form persistent-disk-x, where x is a number assigned by + * Google Compute Engine.This field is only applicable for persistent disks. + * + * Generated from protobuf field string device_name = 3; + * @return string + */ + public function getDeviceName() + { + return $this->device_name; + } + + /** + * Indicates a unique device name of your choice that is reflected into the + * `/dev/disk/by-id/google-*` tree of a Linux operating system running + * within the instance. This name can be used to reference the device for + * mounting, resizing, and so on, from within the instance. + * If not specified, the server chooses a default device name to apply to + * this disk, in the form persistent-disk-x, where x is a number assigned by + * Google Compute Engine.This field is only applicable for persistent disks. + * + * Generated from protobuf field string device_name = 3; + * @param string $var + * @return $this + */ + public function setDeviceName($var) + { + GPBUtil::checkString($var, True); + $this->device_name = $var; + + return $this; + } + + /** + * Indicates the size of the disk in base-2 GB. + * + * Generated from protobuf field int64 disk_size_gb = 4; + * @return int|string + */ + public function getDiskSizeGb() + { + return $this->disk_size_gb; + } + + /** + * Indicates the size of the disk in base-2 GB. + * + * Generated from protobuf field int64 disk_size_gb = 4; + * @param int|string $var + * @return $this + */ + public function setDiskSizeGb($var) + { + GPBUtil::checkInt64($var); + $this->disk_size_gb = $var; + + return $this; + } + + /** + * Indicates a list of features to enable on the guest operating system. + * Applicable only for bootable images. Read Enabling guest operating + * system features to see a list of available options. + * + * Generated from protobuf field repeated .google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature guest_os_features = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getGuestOsFeatures() + { + return $this->guest_os_features; + } + + /** + * Indicates a list of features to enable on the guest operating system. + * Applicable only for bootable images. Read Enabling guest operating + * system features to see a list of available options. + * + * Generated from protobuf field repeated .google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature guest_os_features = 5; + * @param array<\Google\Cloud\Notebooks\V1\Instance\Disk\GuestOsFeature>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setGuestOsFeatures($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Notebooks\V1\Instance\Disk\GuestOsFeature::class); + $this->guest_os_features = $arr; + + return $this; + } + + /** + * A zero-based index to this disk, where 0 is reserved for the + * boot disk. If you have many disks attached to an instance, each disk + * would have a unique index number. + * + * Generated from protobuf field int64 index = 6; + * @return int|string + */ + public function getIndex() + { + return $this->index; + } + + /** + * A zero-based index to this disk, where 0 is reserved for the + * boot disk. If you have many disks attached to an instance, each disk + * would have a unique index number. + * + * Generated from protobuf field int64 index = 6; + * @param int|string $var + * @return $this + */ + public function setIndex($var) + { + GPBUtil::checkInt64($var); + $this->index = $var; + + return $this; + } + + /** + * Indicates the disk interface to use for attaching this disk, which is + * either SCSI or NVME. The default is SCSI. Persistent disks must always + * use SCSI and the request will fail if you attempt to attach a persistent + * disk in any other format than SCSI. Local SSDs can use either NVME or + * SCSI. For performance characteristics of SCSI over NVMe, see Local SSD + * performance. + * Valid values: + * * `NVME` + * * `SCSI` + * + * Generated from protobuf field string interface = 7; + * @return string + */ + public function getInterface() + { + return $this->interface; + } + + /** + * Indicates the disk interface to use for attaching this disk, which is + * either SCSI or NVME. The default is SCSI. Persistent disks must always + * use SCSI and the request will fail if you attempt to attach a persistent + * disk in any other format than SCSI. Local SSDs can use either NVME or + * SCSI. For performance characteristics of SCSI over NVMe, see Local SSD + * performance. + * Valid values: + * * `NVME` + * * `SCSI` + * + * Generated from protobuf field string interface = 7; + * @param string $var + * @return $this + */ + public function setInterface($var) + { + GPBUtil::checkString($var, True); + $this->interface = $var; + + return $this; + } + + /** + * Type of the resource. Always compute#attachedDisk for attached + * disks. + * + * Generated from protobuf field string kind = 8; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * Type of the resource. Always compute#attachedDisk for attached + * disks. + * + * Generated from protobuf field string kind = 8; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * A list of publicly visible licenses. Reserved for Google's use. + * A License represents billing and aggregate usage data for public + * and marketplace images. + * + * Generated from protobuf field repeated string licenses = 9; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getLicenses() + { + return $this->licenses; + } + + /** + * A list of publicly visible licenses. Reserved for Google's use. + * A License represents billing and aggregate usage data for public + * and marketplace images. + * + * Generated from protobuf field repeated string licenses = 9; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setLicenses($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->licenses = $arr; + + return $this; + } + + /** + * The mode in which to attach this disk, either `READ_WRITE` or + * `READ_ONLY`. If not specified, the default is to attach the disk in + * `READ_WRITE` mode. Valid values: + * * `READ_ONLY` + * * `READ_WRITE` + * + * Generated from protobuf field string mode = 10; + * @return string + */ + public function getMode() + { + return $this->mode; + } + + /** + * The mode in which to attach this disk, either `READ_WRITE` or + * `READ_ONLY`. If not specified, the default is to attach the disk in + * `READ_WRITE` mode. Valid values: + * * `READ_ONLY` + * * `READ_WRITE` + * + * Generated from protobuf field string mode = 10; + * @param string $var + * @return $this + */ + public function setMode($var) + { + GPBUtil::checkString($var, True); + $this->mode = $var; + + return $this; + } + + /** + * Indicates a valid partial or full URL to an existing Persistent Disk + * resource. + * + * Generated from protobuf field string source = 11; + * @return string + */ + public function getSource() + { + return $this->source; + } + + /** + * Indicates a valid partial or full URL to an existing Persistent Disk + * resource. + * + * Generated from protobuf field string source = 11; + * @param string $var + * @return $this + */ + public function setSource($var) + { + GPBUtil::checkString($var, True); + $this->source = $var; + + return $this; + } + + /** + * Indicates the type of the disk, either `SCRATCH` or `PERSISTENT`. + * Valid values: + * * `PERSISTENT` + * * `SCRATCH` + * + * Generated from protobuf field string type = 12; + * @return string + */ + public function getType() + { + return $this->type; + } + + /** + * Indicates the type of the disk, either `SCRATCH` or `PERSISTENT`. + * Valid values: + * * `PERSISTENT` + * * `SCRATCH` + * + * Generated from protobuf field string type = 12; + * @param string $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkString($var, True); + $this->type = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Disk::class, \Google\Cloud\Notebooks\V1\Instance_Disk::class); + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance/Disk/GuestOsFeature.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance/Disk/GuestOsFeature.php new file mode 100644 index 000000000000..cd6cf2cc820e --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance/Disk/GuestOsFeature.php @@ -0,0 +1,102 @@ +google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature + */ +class GuestOsFeature extends \Google\Protobuf\Internal\Message +{ + /** + * The ID of a supported feature. Read Enabling guest operating system + * features to see a list of available options. + * Valid values: + * * `FEATURE_TYPE_UNSPECIFIED` + * * `MULTI_IP_SUBNET` + * * `SECURE_BOOT` + * * `UEFI_COMPATIBLE` + * * `VIRTIO_SCSI_MULTIQUEUE` + * * `WINDOWS` + * + * Generated from protobuf field string type = 1; + */ + protected $type = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $type + * The ID of a supported feature. Read Enabling guest operating system + * features to see a list of available options. + * Valid values: + * * `FEATURE_TYPE_UNSPECIFIED` + * * `MULTI_IP_SUBNET` + * * `SECURE_BOOT` + * * `UEFI_COMPATIBLE` + * * `VIRTIO_SCSI_MULTIQUEUE` + * * `WINDOWS` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V1\Instance::initOnce(); + parent::__construct($data); + } + + /** + * The ID of a supported feature. Read Enabling guest operating system + * features to see a list of available options. + * Valid values: + * * `FEATURE_TYPE_UNSPECIFIED` + * * `MULTI_IP_SUBNET` + * * `SECURE_BOOT` + * * `UEFI_COMPATIBLE` + * * `VIRTIO_SCSI_MULTIQUEUE` + * * `WINDOWS` + * + * Generated from protobuf field string type = 1; + * @return string + */ + public function getType() + { + return $this->type; + } + + /** + * The ID of a supported feature. Read Enabling guest operating system + * features to see a list of available options. + * Valid values: + * * `FEATURE_TYPE_UNSPECIFIED` + * * `MULTI_IP_SUBNET` + * * `SECURE_BOOT` + * * `UEFI_COMPATIBLE` + * * `VIRTIO_SCSI_MULTIQUEUE` + * * `WINDOWS` + * + * Generated from protobuf field string type = 1; + * @param string $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkString($var, True); + $this->type = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(GuestOsFeature::class, \Google\Cloud\Notebooks\V1\Instance_Disk_GuestOsFeature::class); + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance/DiskEncryption.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance/DiskEncryption.php new file mode 100644 index 000000000000..ed653659e11e --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance/DiskEncryption.php @@ -0,0 +1,64 @@ +google.cloud.notebooks.v1.Instance.DiskEncryption + */ +class DiskEncryption +{ + /** + * Disk encryption is not specified. + * + * Generated from protobuf enum DISK_ENCRYPTION_UNSPECIFIED = 0; + */ + const DISK_ENCRYPTION_UNSPECIFIED = 0; + /** + * Use Google managed encryption keys to encrypt the boot disk. + * + * Generated from protobuf enum GMEK = 1; + */ + const GMEK = 1; + /** + * Use customer managed encryption keys to encrypt the boot disk. + * + * Generated from protobuf enum CMEK = 2; + */ + const CMEK = 2; + + private static $valueToName = [ + self::DISK_ENCRYPTION_UNSPECIFIED => 'DISK_ENCRYPTION_UNSPECIFIED', + self::GMEK => 'GMEK', + self::CMEK => 'CMEK', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(DiskEncryption::class, \Google\Cloud\Notebooks\V1\Instance_DiskEncryption::class); + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance/DiskType.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance/DiskType.php new file mode 100644 index 000000000000..268219224d84 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance/DiskType.php @@ -0,0 +1,78 @@ +google.cloud.notebooks.v1.Instance.DiskType + */ +class DiskType +{ + /** + * Disk type not set. + * + * Generated from protobuf enum DISK_TYPE_UNSPECIFIED = 0; + */ + const DISK_TYPE_UNSPECIFIED = 0; + /** + * Standard persistent disk type. + * + * Generated from protobuf enum PD_STANDARD = 1; + */ + const PD_STANDARD = 1; + /** + * SSD persistent disk type. + * + * Generated from protobuf enum PD_SSD = 2; + */ + const PD_SSD = 2; + /** + * Balanced persistent disk type. + * + * Generated from protobuf enum PD_BALANCED = 3; + */ + const PD_BALANCED = 3; + /** + * Extreme persistent disk type. + * + * Generated from protobuf enum PD_EXTREME = 4; + */ + const PD_EXTREME = 4; + + private static $valueToName = [ + self::DISK_TYPE_UNSPECIFIED => 'DISK_TYPE_UNSPECIFIED', + self::PD_STANDARD => 'PD_STANDARD', + self::PD_SSD => 'PD_SSD', + self::PD_BALANCED => 'PD_BALANCED', + self::PD_EXTREME => 'PD_EXTREME', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(DiskType::class, \Google\Cloud\Notebooks\V1\Instance_DiskType::class); + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance/NicType.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance/NicType.php new file mode 100644 index 000000000000..c2da464bc534 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance/NicType.php @@ -0,0 +1,65 @@ +google.cloud.notebooks.v1.Instance.NicType + */ +class NicType +{ + /** + * No type specified. + * + * Generated from protobuf enum UNSPECIFIED_NIC_TYPE = 0; + */ + const UNSPECIFIED_NIC_TYPE = 0; + /** + * VIRTIO + * + * Generated from protobuf enum VIRTIO_NET = 1; + */ + const VIRTIO_NET = 1; + /** + * GVNIC + * + * Generated from protobuf enum GVNIC = 2; + */ + const GVNIC = 2; + + private static $valueToName = [ + self::UNSPECIFIED_NIC_TYPE => 'UNSPECIFIED_NIC_TYPE', + self::VIRTIO_NET => 'VIRTIO_NET', + self::GVNIC => 'GVNIC', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(NicType::class, \Google\Cloud\Notebooks\V1\Instance_NicType::class); + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance/ShieldedInstanceConfig.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance/ShieldedInstanceConfig.php new file mode 100644 index 000000000000..f98e6dc4ca98 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance/ShieldedInstanceConfig.php @@ -0,0 +1,169 @@ +google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig + */ +class ShieldedInstanceConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Defines whether the instance has Secure Boot enabled. + * Secure Boot helps ensure that the system only runs authentic software by + * verifying the digital signature of all boot components, and halting the + * boot process if signature verification fails. Disabled by default. + * + * Generated from protobuf field bool enable_secure_boot = 1; + */ + protected $enable_secure_boot = false; + /** + * Defines whether the instance has the vTPM enabled. Enabled by default. + * + * Generated from protobuf field bool enable_vtpm = 2; + */ + protected $enable_vtpm = false; + /** + * Defines whether the instance has integrity monitoring enabled. + * Enables monitoring and attestation of the boot integrity of the instance. + * The attestation is performed against the integrity policy baseline. This + * baseline is initially derived from the implicitly trusted boot image when + * the instance is created. Enabled by default. + * + * Generated from protobuf field bool enable_integrity_monitoring = 3; + */ + protected $enable_integrity_monitoring = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $enable_secure_boot + * Defines whether the instance has Secure Boot enabled. + * Secure Boot helps ensure that the system only runs authentic software by + * verifying the digital signature of all boot components, and halting the + * boot process if signature verification fails. Disabled by default. + * @type bool $enable_vtpm + * Defines whether the instance has the vTPM enabled. Enabled by default. + * @type bool $enable_integrity_monitoring + * Defines whether the instance has integrity monitoring enabled. + * Enables monitoring and attestation of the boot integrity of the instance. + * The attestation is performed against the integrity policy baseline. This + * baseline is initially derived from the implicitly trusted boot image when + * the instance is created. Enabled by default. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V1\Instance::initOnce(); + parent::__construct($data); + } + + /** + * Defines whether the instance has Secure Boot enabled. + * Secure Boot helps ensure that the system only runs authentic software by + * verifying the digital signature of all boot components, and halting the + * boot process if signature verification fails. Disabled by default. + * + * Generated from protobuf field bool enable_secure_boot = 1; + * @return bool + */ + public function getEnableSecureBoot() + { + return $this->enable_secure_boot; + } + + /** + * Defines whether the instance has Secure Boot enabled. + * Secure Boot helps ensure that the system only runs authentic software by + * verifying the digital signature of all boot components, and halting the + * boot process if signature verification fails. Disabled by default. + * + * Generated from protobuf field bool enable_secure_boot = 1; + * @param bool $var + * @return $this + */ + public function setEnableSecureBoot($var) + { + GPBUtil::checkBool($var); + $this->enable_secure_boot = $var; + + return $this; + } + + /** + * Defines whether the instance has the vTPM enabled. Enabled by default. + * + * Generated from protobuf field bool enable_vtpm = 2; + * @return bool + */ + public function getEnableVtpm() + { + return $this->enable_vtpm; + } + + /** + * Defines whether the instance has the vTPM enabled. Enabled by default. + * + * Generated from protobuf field bool enable_vtpm = 2; + * @param bool $var + * @return $this + */ + public function setEnableVtpm($var) + { + GPBUtil::checkBool($var); + $this->enable_vtpm = $var; + + return $this; + } + + /** + * Defines whether the instance has integrity monitoring enabled. + * Enables monitoring and attestation of the boot integrity of the instance. + * The attestation is performed against the integrity policy baseline. This + * baseline is initially derived from the implicitly trusted boot image when + * the instance is created. Enabled by default. + * + * Generated from protobuf field bool enable_integrity_monitoring = 3; + * @return bool + */ + public function getEnableIntegrityMonitoring() + { + return $this->enable_integrity_monitoring; + } + + /** + * Defines whether the instance has integrity monitoring enabled. + * Enables monitoring and attestation of the boot integrity of the instance. + * The attestation is performed against the integrity policy baseline. This + * baseline is initially derived from the implicitly trusted boot image when + * the instance is created. Enabled by default. + * + * Generated from protobuf field bool enable_integrity_monitoring = 3; + * @param bool $var + * @return $this + */ + public function setEnableIntegrityMonitoring($var) + { + GPBUtil::checkBool($var); + $this->enable_integrity_monitoring = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ShieldedInstanceConfig::class, \Google\Cloud\Notebooks\V1\Instance_ShieldedInstanceConfig::class); + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance/State.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance/State.php new file mode 100644 index 000000000000..7787b107121a --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance/State.php @@ -0,0 +1,128 @@ +google.cloud.notebooks.v1.Instance.State + */ +class State +{ + /** + * State is not specified. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The control logic is starting the instance. + * + * Generated from protobuf enum STARTING = 1; + */ + const STARTING = 1; + /** + * The control logic is installing required frameworks and registering the + * instance with notebook proxy + * + * Generated from protobuf enum PROVISIONING = 2; + */ + const PROVISIONING = 2; + /** + * The instance is running. + * + * Generated from protobuf enum ACTIVE = 3; + */ + const ACTIVE = 3; + /** + * The control logic is stopping the instance. + * + * Generated from protobuf enum STOPPING = 4; + */ + const STOPPING = 4; + /** + * The instance is stopped. + * + * Generated from protobuf enum STOPPED = 5; + */ + const STOPPED = 5; + /** + * The instance is deleted. + * + * Generated from protobuf enum DELETED = 6; + */ + const DELETED = 6; + /** + * The instance is upgrading. + * + * Generated from protobuf enum UPGRADING = 7; + */ + const UPGRADING = 7; + /** + * The instance is being created. + * + * Generated from protobuf enum INITIALIZING = 8; + */ + const INITIALIZING = 8; + /** + * The instance is getting registered. + * + * Generated from protobuf enum REGISTERING = 9; + */ + const REGISTERING = 9; + /** + * The instance is suspending. + * + * Generated from protobuf enum SUSPENDING = 10; + */ + const SUSPENDING = 10; + /** + * The instance is suspended. + * + * Generated from protobuf enum SUSPENDED = 11; + */ + const SUSPENDED = 11; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::STARTING => 'STARTING', + self::PROVISIONING => 'PROVISIONING', + self::ACTIVE => 'ACTIVE', + self::STOPPING => 'STOPPING', + self::STOPPED => 'STOPPED', + self::DELETED => 'DELETED', + self::UPGRADING => 'UPGRADING', + self::INITIALIZING => 'INITIALIZING', + self::REGISTERING => 'REGISTERING', + self::SUSPENDING => 'SUSPENDING', + self::SUSPENDED => 'SUSPENDED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\Notebooks\V1\Instance_State::class); + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance/UpgradeHistoryEntry.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance/UpgradeHistoryEntry.php new file mode 100644 index 000000000000..92cf695b5a6a --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance/UpgradeHistoryEntry.php @@ -0,0 +1,391 @@ +google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry + */ +class UpgradeHistoryEntry extends \Google\Protobuf\Internal\Message +{ + /** + * The snapshot of the boot disk of this notebook instance before upgrade. + * + * Generated from protobuf field string snapshot = 1; + */ + protected $snapshot = ''; + /** + * The VM image before this instance upgrade. + * + * Generated from protobuf field string vm_image = 2; + */ + protected $vm_image = ''; + /** + * The container image before this instance upgrade. + * + * Generated from protobuf field string container_image = 3; + */ + protected $container_image = ''; + /** + * The framework of this notebook instance. + * + * Generated from protobuf field string framework = 4; + */ + protected $framework = ''; + /** + * The version of the notebook instance before this upgrade. + * + * Generated from protobuf field string version = 5; + */ + protected $version = ''; + /** + * The state of this instance upgrade history entry. + * + * Generated from protobuf field .google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.State state = 6; + */ + protected $state = 0; + /** + * The time that this instance upgrade history entry is created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 7; + */ + protected $create_time = null; + /** + * Target VM Image. Format: `ainotebooks-vm/project/image-name/name`. + * + * Generated from protobuf field string target_image = 8 [deprecated = true]; + * @deprecated + */ + protected $target_image = ''; + /** + * Action. Rolloback or Upgrade. + * + * Generated from protobuf field .google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Action action = 9; + */ + protected $action = 0; + /** + * Target VM Version, like m63. + * + * Generated from protobuf field string target_version = 10; + */ + protected $target_version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $snapshot + * The snapshot of the boot disk of this notebook instance before upgrade. + * @type string $vm_image + * The VM image before this instance upgrade. + * @type string $container_image + * The container image before this instance upgrade. + * @type string $framework + * The framework of this notebook instance. + * @type string $version + * The version of the notebook instance before this upgrade. + * @type int $state + * The state of this instance upgrade history entry. + * @type \Google\Protobuf\Timestamp $create_time + * The time that this instance upgrade history entry is created. + * @type string $target_image + * Target VM Image. Format: `ainotebooks-vm/project/image-name/name`. + * @type int $action + * Action. Rolloback or Upgrade. + * @type string $target_version + * Target VM Version, like m63. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V1\Instance::initOnce(); + parent::__construct($data); + } + + /** + * The snapshot of the boot disk of this notebook instance before upgrade. + * + * Generated from protobuf field string snapshot = 1; + * @return string + */ + public function getSnapshot() + { + return $this->snapshot; + } + + /** + * The snapshot of the boot disk of this notebook instance before upgrade. + * + * Generated from protobuf field string snapshot = 1; + * @param string $var + * @return $this + */ + public function setSnapshot($var) + { + GPBUtil::checkString($var, True); + $this->snapshot = $var; + + return $this; + } + + /** + * The VM image before this instance upgrade. + * + * Generated from protobuf field string vm_image = 2; + * @return string + */ + public function getVmImage() + { + return $this->vm_image; + } + + /** + * The VM image before this instance upgrade. + * + * Generated from protobuf field string vm_image = 2; + * @param string $var + * @return $this + */ + public function setVmImage($var) + { + GPBUtil::checkString($var, True); + $this->vm_image = $var; + + return $this; + } + + /** + * The container image before this instance upgrade. + * + * Generated from protobuf field string container_image = 3; + * @return string + */ + public function getContainerImage() + { + return $this->container_image; + } + + /** + * The container image before this instance upgrade. + * + * Generated from protobuf field string container_image = 3; + * @param string $var + * @return $this + */ + public function setContainerImage($var) + { + GPBUtil::checkString($var, True); + $this->container_image = $var; + + return $this; + } + + /** + * The framework of this notebook instance. + * + * Generated from protobuf field string framework = 4; + * @return string + */ + public function getFramework() + { + return $this->framework; + } + + /** + * The framework of this notebook instance. + * + * Generated from protobuf field string framework = 4; + * @param string $var + * @return $this + */ + public function setFramework($var) + { + GPBUtil::checkString($var, True); + $this->framework = $var; + + return $this; + } + + /** + * The version of the notebook instance before this upgrade. + * + * Generated from protobuf field string version = 5; + * @return string + */ + public function getVersion() + { + return $this->version; + } + + /** + * The version of the notebook instance before this upgrade. + * + * Generated from protobuf field string version = 5; + * @param string $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkString($var, True); + $this->version = $var; + + return $this; + } + + /** + * The state of this instance upgrade history entry. + * + * Generated from protobuf field .google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.State state = 6; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * The state of this instance upgrade history entry. + * + * Generated from protobuf field .google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.State state = 6; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Notebooks\V1\Instance\UpgradeHistoryEntry\State::class); + $this->state = $var; + + return $this; + } + + /** + * The time that this instance upgrade history entry is created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 7; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * The time that this instance upgrade history entry is created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 7; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Target VM Image. Format: `ainotebooks-vm/project/image-name/name`. + * + * Generated from protobuf field string target_image = 8 [deprecated = true]; + * @return string + * @deprecated + */ + public function getTargetImage() + { + @trigger_error('target_image is deprecated.', E_USER_DEPRECATED); + return $this->target_image; + } + + /** + * Target VM Image. Format: `ainotebooks-vm/project/image-name/name`. + * + * Generated from protobuf field string target_image = 8 [deprecated = true]; + * @param string $var + * @return $this + * @deprecated + */ + public function setTargetImage($var) + { + @trigger_error('target_image is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkString($var, True); + $this->target_image = $var; + + return $this; + } + + /** + * Action. Rolloback or Upgrade. + * + * Generated from protobuf field .google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Action action = 9; + * @return int + */ + public function getAction() + { + return $this->action; + } + + /** + * Action. Rolloback or Upgrade. + * + * Generated from protobuf field .google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Action action = 9; + * @param int $var + * @return $this + */ + public function setAction($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Notebooks\V1\Instance\UpgradeHistoryEntry\Action::class); + $this->action = $var; + + return $this; + } + + /** + * Target VM Version, like m63. + * + * Generated from protobuf field string target_version = 10; + * @return string + */ + public function getTargetVersion() + { + return $this->target_version; + } + + /** + * Target VM Version, like m63. + * + * Generated from protobuf field string target_version = 10; + * @param string $var + * @return $this + */ + public function setTargetVersion($var) + { + GPBUtil::checkString($var, True); + $this->target_version = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(UpgradeHistoryEntry::class, \Google\Cloud\Notebooks\V1\Instance_UpgradeHistoryEntry::class); + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance/UpgradeHistoryEntry/Action.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance/UpgradeHistoryEntry/Action.php new file mode 100644 index 000000000000..6dc76ab38872 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance/UpgradeHistoryEntry/Action.php @@ -0,0 +1,64 @@ +google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Action + */ +class Action +{ + /** + * Operation is not specified. + * + * Generated from protobuf enum ACTION_UNSPECIFIED = 0; + */ + const ACTION_UNSPECIFIED = 0; + /** + * Upgrade. + * + * Generated from protobuf enum UPGRADE = 1; + */ + const UPGRADE = 1; + /** + * Rollback. + * + * Generated from protobuf enum ROLLBACK = 2; + */ + const ROLLBACK = 2; + + private static $valueToName = [ + self::ACTION_UNSPECIFIED => 'ACTION_UNSPECIFIED', + self::UPGRADE => 'UPGRADE', + self::ROLLBACK => 'ROLLBACK', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Action::class, \Google\Cloud\Notebooks\V1\Instance_UpgradeHistoryEntry_Action::class); + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance/UpgradeHistoryEntry/State.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance/UpgradeHistoryEntry/State.php new file mode 100644 index 000000000000..911247394eb3 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance/UpgradeHistoryEntry/State.php @@ -0,0 +1,71 @@ +google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.State + */ +class State +{ + /** + * State is not specified. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The instance upgrade is started. + * + * Generated from protobuf enum STARTED = 1; + */ + const STARTED = 1; + /** + * The instance upgrade is succeeded. + * + * Generated from protobuf enum SUCCEEDED = 2; + */ + const SUCCEEDED = 2; + /** + * The instance upgrade is failed. + * + * Generated from protobuf enum FAILED = 3; + */ + const FAILED = 3; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::STARTED => 'STARTED', + self::SUCCEEDED => 'SUCCEEDED', + self::FAILED => 'FAILED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\Notebooks\V1\Instance_UpgradeHistoryEntry_State::class); + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/InstanceConfig.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/InstanceConfig.php new file mode 100644 index 000000000000..cda436e61847 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/InstanceConfig.php @@ -0,0 +1,105 @@ +google.cloud.notebooks.v1.InstanceConfig + */ +class InstanceConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Cron expression in UTC timezone, used to schedule instance auto upgrade. + * Please follow the [cron format](https://en.wikipedia.org/wiki/Cron). + * + * Generated from protobuf field string notebook_upgrade_schedule = 1; + */ + protected $notebook_upgrade_schedule = ''; + /** + * Verifies core internal services are running. + * + * Generated from protobuf field bool enable_health_monitoring = 2; + */ + protected $enable_health_monitoring = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $notebook_upgrade_schedule + * Cron expression in UTC timezone, used to schedule instance auto upgrade. + * Please follow the [cron format](https://en.wikipedia.org/wiki/Cron). + * @type bool $enable_health_monitoring + * Verifies core internal services are running. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V1\InstanceConfig::initOnce(); + parent::__construct($data); + } + + /** + * Cron expression in UTC timezone, used to schedule instance auto upgrade. + * Please follow the [cron format](https://en.wikipedia.org/wiki/Cron). + * + * Generated from protobuf field string notebook_upgrade_schedule = 1; + * @return string + */ + public function getNotebookUpgradeSchedule() + { + return $this->notebook_upgrade_schedule; + } + + /** + * Cron expression in UTC timezone, used to schedule instance auto upgrade. + * Please follow the [cron format](https://en.wikipedia.org/wiki/Cron). + * + * Generated from protobuf field string notebook_upgrade_schedule = 1; + * @param string $var + * @return $this + */ + public function setNotebookUpgradeSchedule($var) + { + GPBUtil::checkString($var, True); + $this->notebook_upgrade_schedule = $var; + + return $this; + } + + /** + * Verifies core internal services are running. + * + * Generated from protobuf field bool enable_health_monitoring = 2; + * @return bool + */ + public function getEnableHealthMonitoring() + { + return $this->enable_health_monitoring; + } + + /** + * Verifies core internal services are running. + * + * Generated from protobuf field bool enable_health_monitoring = 2; + * @param bool $var + * @return $this + */ + public function setEnableHealthMonitoring($var) + { + GPBUtil::checkBool($var); + $this->enable_health_monitoring = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/IsInstanceUpgradeableRequest.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/IsInstanceUpgradeableRequest.php new file mode 100644 index 000000000000..8bf9e2313d97 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/IsInstanceUpgradeableRequest.php @@ -0,0 +1,109 @@ +google.cloud.notebooks.v1.IsInstanceUpgradeableRequest + */ +class IsInstanceUpgradeableRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * + * Generated from protobuf field string notebook_instance = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $notebook_instance = ''; + /** + * Optional. The optional UpgradeType. Setting this field will search for additional + * compute images to upgrade this instance. + * + * Generated from protobuf field .google.cloud.notebooks.v1.UpgradeType type = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $type = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $notebook_instance + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * @type int $type + * Optional. The optional UpgradeType. Setting this field will search for additional + * compute images to upgrade this instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * + * Generated from protobuf field string notebook_instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getNotebookInstance() + { + return $this->notebook_instance; + } + + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * + * Generated from protobuf field string notebook_instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setNotebookInstance($var) + { + GPBUtil::checkString($var, True); + $this->notebook_instance = $var; + + return $this; + } + + /** + * Optional. The optional UpgradeType. Setting this field will search for additional + * compute images to upgrade this instance. + * + * Generated from protobuf field .google.cloud.notebooks.v1.UpgradeType type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Optional. The optional UpgradeType. Setting this field will search for additional + * compute images to upgrade this instance. + * + * Generated from protobuf field .google.cloud.notebooks.v1.UpgradeType type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Notebooks\V1\UpgradeType::class); + $this->type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/IsInstanceUpgradeableResponse.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/IsInstanceUpgradeableResponse.php new file mode 100644 index 000000000000..397995bcd0c7 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/IsInstanceUpgradeableResponse.php @@ -0,0 +1,181 @@ +google.cloud.notebooks.v1.IsInstanceUpgradeableResponse + */ +class IsInstanceUpgradeableResponse extends \Google\Protobuf\Internal\Message +{ + /** + * If an instance is upgradeable. + * + * Generated from protobuf field bool upgradeable = 1; + */ + protected $upgradeable = false; + /** + * The version this instance will be upgraded to if calling the upgrade + * endpoint. This field will only be populated if field upgradeable is true. + * + * Generated from protobuf field string upgrade_version = 2; + */ + protected $upgrade_version = ''; + /** + * Additional information about upgrade. + * + * Generated from protobuf field string upgrade_info = 3; + */ + protected $upgrade_info = ''; + /** + * The new image self link this instance will be upgraded to if calling the + * upgrade endpoint. This field will only be populated if field upgradeable + * is true. + * + * Generated from protobuf field string upgrade_image = 4; + */ + protected $upgrade_image = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $upgradeable + * If an instance is upgradeable. + * @type string $upgrade_version + * The version this instance will be upgraded to if calling the upgrade + * endpoint. This field will only be populated if field upgradeable is true. + * @type string $upgrade_info + * Additional information about upgrade. + * @type string $upgrade_image + * The new image self link this instance will be upgraded to if calling the + * upgrade endpoint. This field will only be populated if field upgradeable + * is true. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * If an instance is upgradeable. + * + * Generated from protobuf field bool upgradeable = 1; + * @return bool + */ + public function getUpgradeable() + { + return $this->upgradeable; + } + + /** + * If an instance is upgradeable. + * + * Generated from protobuf field bool upgradeable = 1; + * @param bool $var + * @return $this + */ + public function setUpgradeable($var) + { + GPBUtil::checkBool($var); + $this->upgradeable = $var; + + return $this; + } + + /** + * The version this instance will be upgraded to if calling the upgrade + * endpoint. This field will only be populated if field upgradeable is true. + * + * Generated from protobuf field string upgrade_version = 2; + * @return string + */ + public function getUpgradeVersion() + { + return $this->upgrade_version; + } + + /** + * The version this instance will be upgraded to if calling the upgrade + * endpoint. This field will only be populated if field upgradeable is true. + * + * Generated from protobuf field string upgrade_version = 2; + * @param string $var + * @return $this + */ + public function setUpgradeVersion($var) + { + GPBUtil::checkString($var, True); + $this->upgrade_version = $var; + + return $this; + } + + /** + * Additional information about upgrade. + * + * Generated from protobuf field string upgrade_info = 3; + * @return string + */ + public function getUpgradeInfo() + { + return $this->upgrade_info; + } + + /** + * Additional information about upgrade. + * + * Generated from protobuf field string upgrade_info = 3; + * @param string $var + * @return $this + */ + public function setUpgradeInfo($var) + { + GPBUtil::checkString($var, True); + $this->upgrade_info = $var; + + return $this; + } + + /** + * The new image self link this instance will be upgraded to if calling the + * upgrade endpoint. This field will only be populated if field upgradeable + * is true. + * + * Generated from protobuf field string upgrade_image = 4; + * @return string + */ + public function getUpgradeImage() + { + return $this->upgrade_image; + } + + /** + * The new image self link this instance will be upgraded to if calling the + * upgrade endpoint. This field will only be populated if field upgradeable + * is true. + * + * Generated from protobuf field string upgrade_image = 4; + * @param string $var + * @return $this + */ + public function setUpgradeImage($var) + { + GPBUtil::checkString($var, True); + $this->upgrade_image = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ListEnvironmentsRequest.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ListEnvironmentsRequest.php new file mode 100644 index 000000000000..9ccab752a6a3 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ListEnvironmentsRequest.php @@ -0,0 +1,152 @@ +google.cloud.notebooks.v1.ListEnvironmentsRequest + */ +class ListEnvironmentsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Format: `projects/{project_id}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $parent = ''; + /** + * Maximum return size of the list call. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A previous returned page token that can be used to continue listing from + * the last result. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. Format: `projects/{project_id}/locations/{location}` + * + * @return \Google\Cloud\Notebooks\V1\ListEnvironmentsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Format: `projects/{project_id}/locations/{location}` + * @type int $page_size + * Maximum return size of the list call. + * @type string $page_token + * A previous returned page token that can be used to continue listing from + * the last result. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. Format: `projects/{project_id}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Format: `projects/{project_id}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Maximum return size of the list call. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Maximum return size of the list call. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A previous returned page token that can be used to continue listing from + * the last result. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A previous returned page token that can be used to continue listing from + * the last result. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ListEnvironmentsResponse.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ListEnvironmentsResponse.php new file mode 100644 index 000000000000..9b06c1ea14f6 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ListEnvironmentsResponse.php @@ -0,0 +1,139 @@ +google.cloud.notebooks.v1.ListEnvironmentsResponse + */ +class ListEnvironmentsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of returned environments. + * + * Generated from protobuf field repeated .google.cloud.notebooks.v1.Environment environments = 1; + */ + private $environments; + /** + * A page token that can be used to continue listing from the last result + * in the next list call. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Notebooks\V1\Environment>|\Google\Protobuf\Internal\RepeatedField $environments + * A list of returned environments. + * @type string $next_page_token + * A page token that can be used to continue listing from the last result + * in the next list call. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * A list of returned environments. + * + * Generated from protobuf field repeated .google.cloud.notebooks.v1.Environment environments = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEnvironments() + { + return $this->environments; + } + + /** + * A list of returned environments. + * + * Generated from protobuf field repeated .google.cloud.notebooks.v1.Environment environments = 1; + * @param array<\Google\Cloud\Notebooks\V1\Environment>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEnvironments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Notebooks\V1\Environment::class); + $this->environments = $arr; + + return $this; + } + + /** + * A page token that can be used to continue listing from the last result + * in the next list call. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A page token that can be used to continue listing from the last result + * in the next list call. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ListExecutionsRequest.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ListExecutionsRequest.php new file mode 100644 index 000000000000..d77a6a1ed25b --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ListExecutionsRequest.php @@ -0,0 +1,234 @@ +google.cloud.notebooks.v1.ListExecutionsRequest + */ +class ListExecutionsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Format: + * `parent=projects/{project_id}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Maximum return size of the list call. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A previous returned page token that can be used to continue listing + * from the last result. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * Filter applied to resulting executions. Currently only supports filtering + * executions by a specified `schedule_id`. + * Format: `schedule_id=` + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + /** + * Sort by field. + * + * Generated from protobuf field string order_by = 5; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. Format: + * `parent=projects/{project_id}/locations/{location}` + * Please see {@see NotebookServiceClient::executionName()} for help formatting this field. + * + * @return \Google\Cloud\Notebooks\V1\ListExecutionsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Format: + * `parent=projects/{project_id}/locations/{location}` + * @type int $page_size + * Maximum return size of the list call. + * @type string $page_token + * A previous returned page token that can be used to continue listing + * from the last result. + * @type string $filter + * Filter applied to resulting executions. Currently only supports filtering + * executions by a specified `schedule_id`. + * Format: `schedule_id=` + * @type string $order_by + * Sort by field. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. Format: + * `parent=projects/{project_id}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Format: + * `parent=projects/{project_id}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Maximum return size of the list call. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Maximum return size of the list call. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A previous returned page token that can be used to continue listing + * from the last result. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A previous returned page token that can be used to continue listing + * from the last result. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Filter applied to resulting executions. Currently only supports filtering + * executions by a specified `schedule_id`. + * Format: `schedule_id=` + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Filter applied to resulting executions. Currently only supports filtering + * executions by a specified `schedule_id`. + * Format: `schedule_id=` + * + * Generated from protobuf field string filter = 4; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Sort by field. + * + * Generated from protobuf field string order_by = 5; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Sort by field. + * + * Generated from protobuf field string order_by = 5; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ListExecutionsResponse.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ListExecutionsResponse.php new file mode 100644 index 000000000000..368324e19d2f --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ListExecutionsResponse.php @@ -0,0 +1,147 @@ +google.cloud.notebooks.v1.ListExecutionsResponse + */ +class ListExecutionsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of returned instances. + * + * Generated from protobuf field repeated .google.cloud.notebooks.v1.Execution executions = 1; + */ + private $executions; + /** + * Page token that can be used to continue listing from the last result in the + * next list call. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Executions IDs that could not be reached. For example: + * ['projects/{project_id}/location/{location}/executions/imagenet_test1', + * 'projects/{project_id}/location/{location}/executions/classifier_train1'] + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Notebooks\V1\Execution>|\Google\Protobuf\Internal\RepeatedField $executions + * A list of returned instances. + * @type string $next_page_token + * Page token that can be used to continue listing from the last result in the + * next list call. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Executions IDs that could not be reached. For example: + * ['projects/{project_id}/location/{location}/executions/imagenet_test1', + * 'projects/{project_id}/location/{location}/executions/classifier_train1'] + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * A list of returned instances. + * + * Generated from protobuf field repeated .google.cloud.notebooks.v1.Execution executions = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getExecutions() + { + return $this->executions; + } + + /** + * A list of returned instances. + * + * Generated from protobuf field repeated .google.cloud.notebooks.v1.Execution executions = 1; + * @param array<\Google\Cloud\Notebooks\V1\Execution>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setExecutions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Notebooks\V1\Execution::class); + $this->executions = $arr; + + return $this; + } + + /** + * Page token that can be used to continue listing from the last result in the + * next list call. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Page token that can be used to continue listing from the last result in the + * next list call. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Executions IDs that could not be reached. For example: + * ['projects/{project_id}/location/{location}/executions/imagenet_test1', + * 'projects/{project_id}/location/{location}/executions/classifier_train1'] + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Executions IDs that could not be reached. For example: + * ['projects/{project_id}/location/{location}/executions/imagenet_test1', + * 'projects/{project_id}/location/{location}/executions/classifier_train1'] + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ListInstancesRequest.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ListInstancesRequest.php new file mode 100644 index 000000000000..22cb60a12a02 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ListInstancesRequest.php @@ -0,0 +1,157 @@ +google.cloud.notebooks.v1.ListInstancesRequest + */ +class ListInstancesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Format: + * `parent=projects/{project_id}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $parent = ''; + /** + * Maximum return size of the list call. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A previous returned page token that can be used to continue listing + * from the last result. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. Format: + * `parent=projects/{project_id}/locations/{location}` + * + * @return \Google\Cloud\Notebooks\V1\ListInstancesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Format: + * `parent=projects/{project_id}/locations/{location}` + * @type int $page_size + * Maximum return size of the list call. + * @type string $page_token + * A previous returned page token that can be used to continue listing + * from the last result. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. Format: + * `parent=projects/{project_id}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Format: + * `parent=projects/{project_id}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Maximum return size of the list call. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Maximum return size of the list call. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A previous returned page token that can be used to continue listing + * from the last result. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A previous returned page token that can be used to continue listing + * from the last result. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ListInstancesResponse.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ListInstancesResponse.php new file mode 100644 index 000000000000..f621f82fdf0f --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ListInstancesResponse.php @@ -0,0 +1,147 @@ +google.cloud.notebooks.v1.ListInstancesResponse + */ +class ListInstancesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of returned instances. + * + * Generated from protobuf field repeated .google.cloud.notebooks.v1.Instance instances = 1; + */ + private $instances; + /** + * Page token that can be used to continue listing from the last result in the + * next list call. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached. For example, + * `['us-west1-a', 'us-central1-b']`. + * A ListInstancesResponse will only contain either instances or unreachables, + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Notebooks\V1\Instance>|\Google\Protobuf\Internal\RepeatedField $instances + * A list of returned instances. + * @type string $next_page_token + * Page token that can be used to continue listing from the last result in the + * next list call. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached. For example, + * `['us-west1-a', 'us-central1-b']`. + * A ListInstancesResponse will only contain either instances or unreachables, + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * A list of returned instances. + * + * Generated from protobuf field repeated .google.cloud.notebooks.v1.Instance instances = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getInstances() + { + return $this->instances; + } + + /** + * A list of returned instances. + * + * Generated from protobuf field repeated .google.cloud.notebooks.v1.Instance instances = 1; + * @param array<\Google\Cloud\Notebooks\V1\Instance>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setInstances($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Notebooks\V1\Instance::class); + $this->instances = $arr; + + return $this; + } + + /** + * Page token that can be used to continue listing from the last result in the + * next list call. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Page token that can be used to continue listing from the last result in the + * next list call. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Locations that could not be reached. For example, + * `['us-west1-a', 'us-central1-b']`. + * A ListInstancesResponse will only contain either instances or unreachables, + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. For example, + * `['us-west1-a', 'us-central1-b']`. + * A ListInstancesResponse will only contain either instances or unreachables, + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ListRuntimesRequest.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ListRuntimesRequest.php new file mode 100644 index 000000000000..8e6cda6cbd5b --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ListRuntimesRequest.php @@ -0,0 +1,158 @@ +google.cloud.notebooks.v1.ListRuntimesRequest + */ +class ListRuntimesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Format: + * `parent=projects/{project_id}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Maximum return size of the list call. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A previous returned page token that can be used to continue listing + * from the last result. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. Format: + * `parent=projects/{project_id}/locations/{location}` + * Please see {@see ManagedNotebookServiceClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\Notebooks\V1\ListRuntimesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Format: + * `parent=projects/{project_id}/locations/{location}` + * @type int $page_size + * Maximum return size of the list call. + * @type string $page_token + * A previous returned page token that can be used to continue listing + * from the last result. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V1\ManagedService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Format: + * `parent=projects/{project_id}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Format: + * `parent=projects/{project_id}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Maximum return size of the list call. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Maximum return size of the list call. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A previous returned page token that can be used to continue listing + * from the last result. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A previous returned page token that can be used to continue listing + * from the last result. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ListRuntimesResponse.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ListRuntimesResponse.php new file mode 100644 index 000000000000..c2339d4e4dfb --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ListRuntimesResponse.php @@ -0,0 +1,147 @@ +google.cloud.notebooks.v1.ListRuntimesResponse + */ +class ListRuntimesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of returned Runtimes. + * + * Generated from protobuf field repeated .google.cloud.notebooks.v1.Runtime runtimes = 1; + */ + private $runtimes; + /** + * Page token that can be used to continue listing from the last result in the + * next list call. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached. For example, + * `['us-west1', 'us-central1']`. + * A ListRuntimesResponse will only contain either runtimes or unreachables, + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Notebooks\V1\Runtime>|\Google\Protobuf\Internal\RepeatedField $runtimes + * A list of returned Runtimes. + * @type string $next_page_token + * Page token that can be used to continue listing from the last result in the + * next list call. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached. For example, + * `['us-west1', 'us-central1']`. + * A ListRuntimesResponse will only contain either runtimes or unreachables, + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V1\ManagedService::initOnce(); + parent::__construct($data); + } + + /** + * A list of returned Runtimes. + * + * Generated from protobuf field repeated .google.cloud.notebooks.v1.Runtime runtimes = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRuntimes() + { + return $this->runtimes; + } + + /** + * A list of returned Runtimes. + * + * Generated from protobuf field repeated .google.cloud.notebooks.v1.Runtime runtimes = 1; + * @param array<\Google\Cloud\Notebooks\V1\Runtime>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRuntimes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Notebooks\V1\Runtime::class); + $this->runtimes = $arr; + + return $this; + } + + /** + * Page token that can be used to continue listing from the last result in the + * next list call. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Page token that can be used to continue listing from the last result in the + * next list call. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Locations that could not be reached. For example, + * `['us-west1', 'us-central1']`. + * A ListRuntimesResponse will only contain either runtimes or unreachables, + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. For example, + * `['us-west1', 'us-central1']`. + * A ListRuntimesResponse will only contain either runtimes or unreachables, + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ListSchedulesRequest.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ListSchedulesRequest.php new file mode 100644 index 000000000000..7fb6ed52536e --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ListSchedulesRequest.php @@ -0,0 +1,226 @@ +google.cloud.notebooks.v1.ListSchedulesRequest + */ +class ListSchedulesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Format: + * `parent=projects/{project_id}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Maximum return size of the list call. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A previous returned page token that can be used to continue listing + * from the last result. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * Filter applied to resulting schedules. + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + /** + * Field to order results by. + * + * Generated from protobuf field string order_by = 5; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. Format: + * `parent=projects/{project_id}/locations/{location}` + * Please see {@see NotebookServiceClient::scheduleName()} for help formatting this field. + * + * @return \Google\Cloud\Notebooks\V1\ListSchedulesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Format: + * `parent=projects/{project_id}/locations/{location}` + * @type int $page_size + * Maximum return size of the list call. + * @type string $page_token + * A previous returned page token that can be used to continue listing + * from the last result. + * @type string $filter + * Filter applied to resulting schedules. + * @type string $order_by + * Field to order results by. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. Format: + * `parent=projects/{project_id}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Format: + * `parent=projects/{project_id}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Maximum return size of the list call. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Maximum return size of the list call. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A previous returned page token that can be used to continue listing + * from the last result. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A previous returned page token that can be used to continue listing + * from the last result. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Filter applied to resulting schedules. + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Filter applied to resulting schedules. + * + * Generated from protobuf field string filter = 4; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Field to order results by. + * + * Generated from protobuf field string order_by = 5; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Field to order results by. + * + * Generated from protobuf field string order_by = 5; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ListSchedulesResponse.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ListSchedulesResponse.php new file mode 100644 index 000000000000..21f314072c1d --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ListSchedulesResponse.php @@ -0,0 +1,147 @@ +google.cloud.notebooks.v1.ListSchedulesResponse + */ +class ListSchedulesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of returned instances. + * + * Generated from protobuf field repeated .google.cloud.notebooks.v1.Schedule schedules = 1; + */ + private $schedules; + /** + * Page token that can be used to continue listing from the last result in the + * next list call. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Schedules that could not be reached. For example: + * ['projects/{project_id}/location/{location}/schedules/monthly_digest', + * 'projects/{project_id}/location/{location}/schedules/weekly_sentiment'] + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Notebooks\V1\Schedule>|\Google\Protobuf\Internal\RepeatedField $schedules + * A list of returned instances. + * @type string $next_page_token + * Page token that can be used to continue listing from the last result in the + * next list call. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Schedules that could not be reached. For example: + * ['projects/{project_id}/location/{location}/schedules/monthly_digest', + * 'projects/{project_id}/location/{location}/schedules/weekly_sentiment'] + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * A list of returned instances. + * + * Generated from protobuf field repeated .google.cloud.notebooks.v1.Schedule schedules = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSchedules() + { + return $this->schedules; + } + + /** + * A list of returned instances. + * + * Generated from protobuf field repeated .google.cloud.notebooks.v1.Schedule schedules = 1; + * @param array<\Google\Cloud\Notebooks\V1\Schedule>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSchedules($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Notebooks\V1\Schedule::class); + $this->schedules = $arr; + + return $this; + } + + /** + * Page token that can be used to continue listing from the last result in the + * next list call. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Page token that can be used to continue listing from the last result in the + * next list call. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Schedules that could not be reached. For example: + * ['projects/{project_id}/location/{location}/schedules/monthly_digest', + * 'projects/{project_id}/location/{location}/schedules/weekly_sentiment'] + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Schedules that could not be reached. For example: + * ['projects/{project_id}/location/{location}/schedules/monthly_digest', + * 'projects/{project_id}/location/{location}/schedules/weekly_sentiment'] + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/LocalDisk.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/LocalDisk.php new file mode 100644 index 000000000000..97bb2321a01a --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/LocalDisk.php @@ -0,0 +1,583 @@ +google.cloud.notebooks.v1.LocalDisk + */ +class LocalDisk extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Output only. Specifies whether the disk will be auto-deleted when the + * instance is deleted (but not when the disk is detached from the instance). + * + * Generated from protobuf field bool auto_delete = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $auto_delete = false; + /** + * Optional. Output only. Indicates that this is a boot disk. The virtual machine + * will use the first partition of the disk for its root filesystem. + * + * Generated from protobuf field bool boot = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $boot = false; + /** + * Optional. Output only. Specifies a unique device name + * of your choice that is reflected into the + * `/dev/disk/by-id/google-*` tree of a Linux operating system running within + * the instance. This name can be used to reference the device for mounting, + * resizing, and so on, from within the instance. + * If not specified, the server chooses a default device name to apply to this + * disk, in the form persistent-disk-x, where x is a number assigned by Google + * Compute Engine. This field is only applicable for persistent disks. + * + * Generated from protobuf field string device_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $device_name = ''; + /** + * Output only. Indicates a list of features to enable on the guest operating system. + * Applicable only for bootable images. Read Enabling guest operating + * system features to see a list of available options. + * + * Generated from protobuf field repeated .google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature guest_os_features = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $guest_os_features; + /** + * Output only. A zero-based index to this disk, where 0 is reserved for the + * boot disk. If you have many disks attached to an instance, each disk would + * have a unique index number. + * + * Generated from protobuf field int32 index = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $index = 0; + /** + * Input only. Specifies the parameters for a new disk that will be created + * alongside the new instance. Use initialization parameters to create boot + * disks or local SSDs attached to the new instance. + * This property is mutually exclusive with the source property; you can only + * define one or the other, but not both. + * + * Generated from protobuf field .google.cloud.notebooks.v1.LocalDiskInitializeParams initialize_params = 6 [(.google.api.field_behavior) = INPUT_ONLY]; + */ + protected $initialize_params = null; + /** + * Specifies the disk interface to use for attaching this disk, which is + * either SCSI or NVME. The default is SCSI. Persistent disks must always use + * SCSI and the request will fail if you attempt to attach a persistent disk + * in any other format than SCSI. Local SSDs can use either NVME or SCSI. For + * performance characteristics of SCSI over NVMe, see Local SSD performance. + * Valid values: + * * `NVME` + * * `SCSI` + * + * Generated from protobuf field string interface = 7; + */ + protected $interface = ''; + /** + * Output only. Type of the resource. Always compute#attachedDisk for attached disks. + * + * Generated from protobuf field string kind = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $kind = ''; + /** + * Output only. Any valid publicly visible licenses. + * + * Generated from protobuf field repeated string licenses = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $licenses; + /** + * The mode in which to attach this disk, either `READ_WRITE` or `READ_ONLY`. + * If not specified, the default is to attach the disk in `READ_WRITE` mode. + * Valid values: + * * `READ_ONLY` + * * `READ_WRITE` + * + * Generated from protobuf field string mode = 10; + */ + protected $mode = ''; + /** + * Specifies a valid partial or full URL to an existing Persistent Disk + * resource. + * + * Generated from protobuf field string source = 11; + */ + protected $source = ''; + /** + * Specifies the type of the disk, either `SCRATCH` or `PERSISTENT`. If not + * specified, the default is `PERSISTENT`. + * Valid values: + * * `PERSISTENT` + * * `SCRATCH` + * + * Generated from protobuf field string type = 12; + */ + protected $type = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $auto_delete + * Optional. Output only. Specifies whether the disk will be auto-deleted when the + * instance is deleted (but not when the disk is detached from the instance). + * @type bool $boot + * Optional. Output only. Indicates that this is a boot disk. The virtual machine + * will use the first partition of the disk for its root filesystem. + * @type string $device_name + * Optional. Output only. Specifies a unique device name + * of your choice that is reflected into the + * `/dev/disk/by-id/google-*` tree of a Linux operating system running within + * the instance. This name can be used to reference the device for mounting, + * resizing, and so on, from within the instance. + * If not specified, the server chooses a default device name to apply to this + * disk, in the form persistent-disk-x, where x is a number assigned by Google + * Compute Engine. This field is only applicable for persistent disks. + * @type array<\Google\Cloud\Notebooks\V1\LocalDisk\RuntimeGuestOsFeature>|\Google\Protobuf\Internal\RepeatedField $guest_os_features + * Output only. Indicates a list of features to enable on the guest operating system. + * Applicable only for bootable images. Read Enabling guest operating + * system features to see a list of available options. + * @type int $index + * Output only. A zero-based index to this disk, where 0 is reserved for the + * boot disk. If you have many disks attached to an instance, each disk would + * have a unique index number. + * @type \Google\Cloud\Notebooks\V1\LocalDiskInitializeParams $initialize_params + * Input only. Specifies the parameters for a new disk that will be created + * alongside the new instance. Use initialization parameters to create boot + * disks or local SSDs attached to the new instance. + * This property is mutually exclusive with the source property; you can only + * define one or the other, but not both. + * @type string $interface + * Specifies the disk interface to use for attaching this disk, which is + * either SCSI or NVME. The default is SCSI. Persistent disks must always use + * SCSI and the request will fail if you attempt to attach a persistent disk + * in any other format than SCSI. Local SSDs can use either NVME or SCSI. For + * performance characteristics of SCSI over NVMe, see Local SSD performance. + * Valid values: + * * `NVME` + * * `SCSI` + * @type string $kind + * Output only. Type of the resource. Always compute#attachedDisk for attached disks. + * @type array|\Google\Protobuf\Internal\RepeatedField $licenses + * Output only. Any valid publicly visible licenses. + * @type string $mode + * The mode in which to attach this disk, either `READ_WRITE` or `READ_ONLY`. + * If not specified, the default is to attach the disk in `READ_WRITE` mode. + * Valid values: + * * `READ_ONLY` + * * `READ_WRITE` + * @type string $source + * Specifies a valid partial or full URL to an existing Persistent Disk + * resource. + * @type string $type + * Specifies the type of the disk, either `SCRATCH` or `PERSISTENT`. If not + * specified, the default is `PERSISTENT`. + * Valid values: + * * `PERSISTENT` + * * `SCRATCH` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V1\Runtime::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Output only. Specifies whether the disk will be auto-deleted when the + * instance is deleted (but not when the disk is detached from the instance). + * + * Generated from protobuf field bool auto_delete = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getAutoDelete() + { + return $this->auto_delete; + } + + /** + * Optional. Output only. Specifies whether the disk will be auto-deleted when the + * instance is deleted (but not when the disk is detached from the instance). + * + * Generated from protobuf field bool auto_delete = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setAutoDelete($var) + { + GPBUtil::checkBool($var); + $this->auto_delete = $var; + + return $this; + } + + /** + * Optional. Output only. Indicates that this is a boot disk. The virtual machine + * will use the first partition of the disk for its root filesystem. + * + * Generated from protobuf field bool boot = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getBoot() + { + return $this->boot; + } + + /** + * Optional. Output only. Indicates that this is a boot disk. The virtual machine + * will use the first partition of the disk for its root filesystem. + * + * Generated from protobuf field bool boot = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setBoot($var) + { + GPBUtil::checkBool($var); + $this->boot = $var; + + return $this; + } + + /** + * Optional. Output only. Specifies a unique device name + * of your choice that is reflected into the + * `/dev/disk/by-id/google-*` tree of a Linux operating system running within + * the instance. This name can be used to reference the device for mounting, + * resizing, and so on, from within the instance. + * If not specified, the server chooses a default device name to apply to this + * disk, in the form persistent-disk-x, where x is a number assigned by Google + * Compute Engine. This field is only applicable for persistent disks. + * + * Generated from protobuf field string device_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDeviceName() + { + return $this->device_name; + } + + /** + * Optional. Output only. Specifies a unique device name + * of your choice that is reflected into the + * `/dev/disk/by-id/google-*` tree of a Linux operating system running within + * the instance. This name can be used to reference the device for mounting, + * resizing, and so on, from within the instance. + * If not specified, the server chooses a default device name to apply to this + * disk, in the form persistent-disk-x, where x is a number assigned by Google + * Compute Engine. This field is only applicable for persistent disks. + * + * Generated from protobuf field string device_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setDeviceName($var) + { + GPBUtil::checkString($var, True); + $this->device_name = $var; + + return $this; + } + + /** + * Output only. Indicates a list of features to enable on the guest operating system. + * Applicable only for bootable images. Read Enabling guest operating + * system features to see a list of available options. + * + * Generated from protobuf field repeated .google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature guest_os_features = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getGuestOsFeatures() + { + return $this->guest_os_features; + } + + /** + * Output only. Indicates a list of features to enable on the guest operating system. + * Applicable only for bootable images. Read Enabling guest operating + * system features to see a list of available options. + * + * Generated from protobuf field repeated .google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature guest_os_features = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\Notebooks\V1\LocalDisk\RuntimeGuestOsFeature>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setGuestOsFeatures($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Notebooks\V1\LocalDisk\RuntimeGuestOsFeature::class); + $this->guest_os_features = $arr; + + return $this; + } + + /** + * Output only. A zero-based index to this disk, where 0 is reserved for the + * boot disk. If you have many disks attached to an instance, each disk would + * have a unique index number. + * + * Generated from protobuf field int32 index = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getIndex() + { + return $this->index; + } + + /** + * Output only. A zero-based index to this disk, where 0 is reserved for the + * boot disk. If you have many disks attached to an instance, each disk would + * have a unique index number. + * + * Generated from protobuf field int32 index = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setIndex($var) + { + GPBUtil::checkInt32($var); + $this->index = $var; + + return $this; + } + + /** + * Input only. Specifies the parameters for a new disk that will be created + * alongside the new instance. Use initialization parameters to create boot + * disks or local SSDs attached to the new instance. + * This property is mutually exclusive with the source property; you can only + * define one or the other, but not both. + * + * Generated from protobuf field .google.cloud.notebooks.v1.LocalDiskInitializeParams initialize_params = 6 [(.google.api.field_behavior) = INPUT_ONLY]; + * @return \Google\Cloud\Notebooks\V1\LocalDiskInitializeParams|null + */ + public function getInitializeParams() + { + return $this->initialize_params; + } + + public function hasInitializeParams() + { + return isset($this->initialize_params); + } + + public function clearInitializeParams() + { + unset($this->initialize_params); + } + + /** + * Input only. Specifies the parameters for a new disk that will be created + * alongside the new instance. Use initialization parameters to create boot + * disks or local SSDs attached to the new instance. + * This property is mutually exclusive with the source property; you can only + * define one or the other, but not both. + * + * Generated from protobuf field .google.cloud.notebooks.v1.LocalDiskInitializeParams initialize_params = 6 [(.google.api.field_behavior) = INPUT_ONLY]; + * @param \Google\Cloud\Notebooks\V1\LocalDiskInitializeParams $var + * @return $this + */ + public function setInitializeParams($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V1\LocalDiskInitializeParams::class); + $this->initialize_params = $var; + + return $this; + } + + /** + * Specifies the disk interface to use for attaching this disk, which is + * either SCSI or NVME. The default is SCSI. Persistent disks must always use + * SCSI and the request will fail if you attempt to attach a persistent disk + * in any other format than SCSI. Local SSDs can use either NVME or SCSI. For + * performance characteristics of SCSI over NVMe, see Local SSD performance. + * Valid values: + * * `NVME` + * * `SCSI` + * + * Generated from protobuf field string interface = 7; + * @return string + */ + public function getInterface() + { + return $this->interface; + } + + /** + * Specifies the disk interface to use for attaching this disk, which is + * either SCSI or NVME. The default is SCSI. Persistent disks must always use + * SCSI and the request will fail if you attempt to attach a persistent disk + * in any other format than SCSI. Local SSDs can use either NVME or SCSI. For + * performance characteristics of SCSI over NVMe, see Local SSD performance. + * Valid values: + * * `NVME` + * * `SCSI` + * + * Generated from protobuf field string interface = 7; + * @param string $var + * @return $this + */ + public function setInterface($var) + { + GPBUtil::checkString($var, True); + $this->interface = $var; + + return $this; + } + + /** + * Output only. Type of the resource. Always compute#attachedDisk for attached disks. + * + * Generated from protobuf field string kind = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getKind() + { + return $this->kind; + } + + /** + * Output only. Type of the resource. Always compute#attachedDisk for attached disks. + * + * Generated from protobuf field string kind = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * Output only. Any valid publicly visible licenses. + * + * Generated from protobuf field repeated string licenses = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getLicenses() + { + return $this->licenses; + } + + /** + * Output only. Any valid publicly visible licenses. + * + * Generated from protobuf field repeated string licenses = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setLicenses($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->licenses = $arr; + + return $this; + } + + /** + * The mode in which to attach this disk, either `READ_WRITE` or `READ_ONLY`. + * If not specified, the default is to attach the disk in `READ_WRITE` mode. + * Valid values: + * * `READ_ONLY` + * * `READ_WRITE` + * + * Generated from protobuf field string mode = 10; + * @return string + */ + public function getMode() + { + return $this->mode; + } + + /** + * The mode in which to attach this disk, either `READ_WRITE` or `READ_ONLY`. + * If not specified, the default is to attach the disk in `READ_WRITE` mode. + * Valid values: + * * `READ_ONLY` + * * `READ_WRITE` + * + * Generated from protobuf field string mode = 10; + * @param string $var + * @return $this + */ + public function setMode($var) + { + GPBUtil::checkString($var, True); + $this->mode = $var; + + return $this; + } + + /** + * Specifies a valid partial or full URL to an existing Persistent Disk + * resource. + * + * Generated from protobuf field string source = 11; + * @return string + */ + public function getSource() + { + return $this->source; + } + + /** + * Specifies a valid partial or full URL to an existing Persistent Disk + * resource. + * + * Generated from protobuf field string source = 11; + * @param string $var + * @return $this + */ + public function setSource($var) + { + GPBUtil::checkString($var, True); + $this->source = $var; + + return $this; + } + + /** + * Specifies the type of the disk, either `SCRATCH` or `PERSISTENT`. If not + * specified, the default is `PERSISTENT`. + * Valid values: + * * `PERSISTENT` + * * `SCRATCH` + * + * Generated from protobuf field string type = 12; + * @return string + */ + public function getType() + { + return $this->type; + } + + /** + * Specifies the type of the disk, either `SCRATCH` or `PERSISTENT`. If not + * specified, the default is `PERSISTENT`. + * Valid values: + * * `PERSISTENT` + * * `SCRATCH` + * + * Generated from protobuf field string type = 12; + * @param string $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkString($var, True); + $this->type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/LocalDisk/RuntimeGuestOsFeature.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/LocalDisk/RuntimeGuestOsFeature.php new file mode 100644 index 000000000000..bb75c0045509 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/LocalDisk/RuntimeGuestOsFeature.php @@ -0,0 +1,111 @@ +google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature + */ +class RuntimeGuestOsFeature extends \Google\Protobuf\Internal\Message +{ + /** + * The ID of a supported feature. Read [Enabling guest operating system + * features](https://cloud.google.com/compute/docs/images/create-delete-deprecate-private-images#guest-os-features) + * to see a list of available options. + * Valid values: + * * `FEATURE_TYPE_UNSPECIFIED` + * * `MULTI_IP_SUBNET` + * * `SECURE_BOOT` + * * `UEFI_COMPATIBLE` + * * `VIRTIO_SCSI_MULTIQUEUE` + * * `WINDOWS` + * + * Generated from protobuf field string type = 1; + */ + protected $type = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $type + * The ID of a supported feature. Read [Enabling guest operating system + * features](https://cloud.google.com/compute/docs/images/create-delete-deprecate-private-images#guest-os-features) + * to see a list of available options. + * Valid values: + * * `FEATURE_TYPE_UNSPECIFIED` + * * `MULTI_IP_SUBNET` + * * `SECURE_BOOT` + * * `UEFI_COMPATIBLE` + * * `VIRTIO_SCSI_MULTIQUEUE` + * * `WINDOWS` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V1\Runtime::initOnce(); + parent::__construct($data); + } + + /** + * The ID of a supported feature. Read [Enabling guest operating system + * features](https://cloud.google.com/compute/docs/images/create-delete-deprecate-private-images#guest-os-features) + * to see a list of available options. + * Valid values: + * * `FEATURE_TYPE_UNSPECIFIED` + * * `MULTI_IP_SUBNET` + * * `SECURE_BOOT` + * * `UEFI_COMPATIBLE` + * * `VIRTIO_SCSI_MULTIQUEUE` + * * `WINDOWS` + * + * Generated from protobuf field string type = 1; + * @return string + */ + public function getType() + { + return $this->type; + } + + /** + * The ID of a supported feature. Read [Enabling guest operating system + * features](https://cloud.google.com/compute/docs/images/create-delete-deprecate-private-images#guest-os-features) + * to see a list of available options. + * Valid values: + * * `FEATURE_TYPE_UNSPECIFIED` + * * `MULTI_IP_SUBNET` + * * `SECURE_BOOT` + * * `UEFI_COMPATIBLE` + * * `VIRTIO_SCSI_MULTIQUEUE` + * * `WINDOWS` + * + * Generated from protobuf field string type = 1; + * @param string $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkString($var, True); + $this->type = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(RuntimeGuestOsFeature::class, \Google\Cloud\Notebooks\V1\LocalDisk_RuntimeGuestOsFeature::class); + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/LocalDiskInitializeParams.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/LocalDiskInitializeParams.php new file mode 100644 index 000000000000..f731a6094b6b --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/LocalDiskInitializeParams.php @@ -0,0 +1,231 @@ +google.cloud.notebooks.v1.LocalDiskInitializeParams + */ +class LocalDiskInitializeParams extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Provide this property when creating the disk. + * + * Generated from protobuf field string description = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Optional. Specifies the disk name. If not specified, the default is to use the name + * of the instance. If the disk with the instance name exists already in the + * given zone/region, a new name will be automatically generated. + * + * Generated from protobuf field string disk_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $disk_name = ''; + /** + * Optional. Specifies the size of the disk in base-2 GB. If not specified, the disk + * will be the same size as the image (usually 10GB). If specified, the size + * must be equal to or larger than 10GB. Default 100 GB. + * + * Generated from protobuf field int64 disk_size_gb = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $disk_size_gb = 0; + /** + * Input only. The type of the boot disk attached to this instance, defaults to + * standard persistent disk (`PD_STANDARD`). + * + * Generated from protobuf field .google.cloud.notebooks.v1.LocalDiskInitializeParams.DiskType disk_type = 4 [(.google.api.field_behavior) = INPUT_ONLY]; + */ + protected $disk_type = 0; + /** + * Optional. Labels to apply to this disk. These can be later modified by the + * disks.setLabels method. This field is only applicable for persistent disks. + * + * Generated from protobuf field map labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $description + * Optional. Provide this property when creating the disk. + * @type string $disk_name + * Optional. Specifies the disk name. If not specified, the default is to use the name + * of the instance. If the disk with the instance name exists already in the + * given zone/region, a new name will be automatically generated. + * @type int|string $disk_size_gb + * Optional. Specifies the size of the disk in base-2 GB. If not specified, the disk + * will be the same size as the image (usually 10GB). If specified, the size + * must be equal to or larger than 10GB. Default 100 GB. + * @type int $disk_type + * Input only. The type of the boot disk attached to this instance, defaults to + * standard persistent disk (`PD_STANDARD`). + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. Labels to apply to this disk. These can be later modified by the + * disks.setLabels method. This field is only applicable for persistent disks. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V1\Runtime::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Provide this property when creating the disk. + * + * Generated from protobuf field string description = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. Provide this property when creating the disk. + * + * Generated from protobuf field string description = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Optional. Specifies the disk name. If not specified, the default is to use the name + * of the instance. If the disk with the instance name exists already in the + * given zone/region, a new name will be automatically generated. + * + * Generated from protobuf field string disk_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDiskName() + { + return $this->disk_name; + } + + /** + * Optional. Specifies the disk name. If not specified, the default is to use the name + * of the instance. If the disk with the instance name exists already in the + * given zone/region, a new name will be automatically generated. + * + * Generated from protobuf field string disk_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDiskName($var) + { + GPBUtil::checkString($var, True); + $this->disk_name = $var; + + return $this; + } + + /** + * Optional. Specifies the size of the disk in base-2 GB. If not specified, the disk + * will be the same size as the image (usually 10GB). If specified, the size + * must be equal to or larger than 10GB. Default 100 GB. + * + * Generated from protobuf field int64 disk_size_gb = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string + */ + public function getDiskSizeGb() + { + return $this->disk_size_gb; + } + + /** + * Optional. Specifies the size of the disk in base-2 GB. If not specified, the disk + * will be the same size as the image (usually 10GB). If specified, the size + * must be equal to or larger than 10GB. Default 100 GB. + * + * Generated from protobuf field int64 disk_size_gb = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string $var + * @return $this + */ + public function setDiskSizeGb($var) + { + GPBUtil::checkInt64($var); + $this->disk_size_gb = $var; + + return $this; + } + + /** + * Input only. The type of the boot disk attached to this instance, defaults to + * standard persistent disk (`PD_STANDARD`). + * + * Generated from protobuf field .google.cloud.notebooks.v1.LocalDiskInitializeParams.DiskType disk_type = 4 [(.google.api.field_behavior) = INPUT_ONLY]; + * @return int + */ + public function getDiskType() + { + return $this->disk_type; + } + + /** + * Input only. The type of the boot disk attached to this instance, defaults to + * standard persistent disk (`PD_STANDARD`). + * + * Generated from protobuf field .google.cloud.notebooks.v1.LocalDiskInitializeParams.DiskType disk_type = 4 [(.google.api.field_behavior) = INPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setDiskType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Notebooks\V1\LocalDiskInitializeParams\DiskType::class); + $this->disk_type = $var; + + return $this; + } + + /** + * Optional. Labels to apply to this disk. These can be later modified by the + * disks.setLabels method. This field is only applicable for persistent disks. + * + * Generated from protobuf field map labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. Labels to apply to this disk. These can be later modified by the + * disks.setLabels method. This field is only applicable for persistent disks. + * + * Generated from protobuf field map labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/LocalDiskInitializeParams/DiskType.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/LocalDiskInitializeParams/DiskType.php new file mode 100644 index 000000000000..8c1eaa5a9195 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/LocalDiskInitializeParams/DiskType.php @@ -0,0 +1,78 @@ +google.cloud.notebooks.v1.LocalDiskInitializeParams.DiskType + */ +class DiskType +{ + /** + * Disk type not set. + * + * Generated from protobuf enum DISK_TYPE_UNSPECIFIED = 0; + */ + const DISK_TYPE_UNSPECIFIED = 0; + /** + * Standard persistent disk type. + * + * Generated from protobuf enum PD_STANDARD = 1; + */ + const PD_STANDARD = 1; + /** + * SSD persistent disk type. + * + * Generated from protobuf enum PD_SSD = 2; + */ + const PD_SSD = 2; + /** + * Balanced persistent disk type. + * + * Generated from protobuf enum PD_BALANCED = 3; + */ + const PD_BALANCED = 3; + /** + * Extreme persistent disk type. + * + * Generated from protobuf enum PD_EXTREME = 4; + */ + const PD_EXTREME = 4; + + private static $valueToName = [ + self::DISK_TYPE_UNSPECIFIED => 'DISK_TYPE_UNSPECIFIED', + self::PD_STANDARD => 'PD_STANDARD', + self::PD_SSD => 'PD_SSD', + self::PD_BALANCED => 'PD_BALANCED', + self::PD_EXTREME => 'PD_EXTREME', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(DiskType::class, \Google\Cloud\Notebooks\V1\LocalDiskInitializeParams_DiskType::class); + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/OperationMetadata.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/OperationMetadata.php new file mode 100644 index 000000000000..49db986749ec --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/OperationMetadata.php @@ -0,0 +1,337 @@ +google.cloud.notebooks.v1.OperationMetadata + */ +class OperationMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; + */ + protected $create_time = null; + /** + * The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + */ + protected $end_time = null; + /** + * Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3; + */ + protected $target = ''; + /** + * Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4; + */ + protected $verb = ''; + /** + * Human-readable status of the operation, if any. + * + * Generated from protobuf field string status_message = 5; + */ + protected $status_message = ''; + /** + * Identifies whether the user has requested cancellation + * of the operation. Operations that have successfully been cancelled + * have [Operation.error][] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to `Code.CANCELLED`. + * + * Generated from protobuf field bool requested_cancellation = 6; + */ + protected $requested_cancellation = false; + /** + * API version used to start the operation. + * + * Generated from protobuf field string api_version = 7; + */ + protected $api_version = ''; + /** + * API endpoint name of this operation. + * + * Generated from protobuf field string endpoint = 8; + */ + protected $endpoint = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $create_time + * The time the operation was created. + * @type \Google\Protobuf\Timestamp $end_time + * The time the operation finished running. + * @type string $target + * Server-defined resource path for the target of the operation. + * @type string $verb + * Name of the verb executed by the operation. + * @type string $status_message + * Human-readable status of the operation, if any. + * @type bool $requested_cancellation + * Identifies whether the user has requested cancellation + * of the operation. Operations that have successfully been cancelled + * have [Operation.error][] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to `Code.CANCELLED`. + * @type string $api_version + * API version used to start the operation. + * @type string $endpoint + * API endpoint name of this operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEndTime() + { + return $this->end_time; + } + + public function hasEndTime() + { + return isset($this->end_time); + } + + public function clearEndTime() + { + unset($this->end_time); + } + + /** + * The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3; + * @return string + */ + public function getTarget() + { + return $this->target; + } + + /** + * Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3; + * @param string $var + * @return $this + */ + public function setTarget($var) + { + GPBUtil::checkString($var, True); + $this->target = $var; + + return $this; + } + + /** + * Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4; + * @return string + */ + public function getVerb() + { + return $this->verb; + } + + /** + * Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4; + * @param string $var + * @return $this + */ + public function setVerb($var) + { + GPBUtil::checkString($var, True); + $this->verb = $var; + + return $this; + } + + /** + * Human-readable status of the operation, if any. + * + * Generated from protobuf field string status_message = 5; + * @return string + */ + public function getStatusMessage() + { + return $this->status_message; + } + + /** + * Human-readable status of the operation, if any. + * + * Generated from protobuf field string status_message = 5; + * @param string $var + * @return $this + */ + public function setStatusMessage($var) + { + GPBUtil::checkString($var, True); + $this->status_message = $var; + + return $this; + } + + /** + * Identifies whether the user has requested cancellation + * of the operation. Operations that have successfully been cancelled + * have [Operation.error][] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to `Code.CANCELLED`. + * + * Generated from protobuf field bool requested_cancellation = 6; + * @return bool + */ + public function getRequestedCancellation() + { + return $this->requested_cancellation; + } + + /** + * Identifies whether the user has requested cancellation + * of the operation. Operations that have successfully been cancelled + * have [Operation.error][] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to `Code.CANCELLED`. + * + * Generated from protobuf field bool requested_cancellation = 6; + * @param bool $var + * @return $this + */ + public function setRequestedCancellation($var) + { + GPBUtil::checkBool($var); + $this->requested_cancellation = $var; + + return $this; + } + + /** + * API version used to start the operation. + * + * Generated from protobuf field string api_version = 7; + * @return string + */ + public function getApiVersion() + { + return $this->api_version; + } + + /** + * API version used to start the operation. + * + * Generated from protobuf field string api_version = 7; + * @param string $var + * @return $this + */ + public function setApiVersion($var) + { + GPBUtil::checkString($var, True); + $this->api_version = $var; + + return $this; + } + + /** + * API endpoint name of this operation. + * + * Generated from protobuf field string endpoint = 8; + * @return string + */ + public function getEndpoint() + { + return $this->endpoint; + } + + /** + * API endpoint name of this operation. + * + * Generated from protobuf field string endpoint = 8; + * @param string $var + * @return $this + */ + public function setEndpoint($var) + { + GPBUtil::checkString($var, True); + $this->endpoint = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/RefreshRuntimeTokenInternalRequest.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/RefreshRuntimeTokenInternalRequest.php new file mode 100644 index 000000000000..6662c576c620 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/RefreshRuntimeTokenInternalRequest.php @@ -0,0 +1,127 @@ +google.cloud.notebooks.v1.RefreshRuntimeTokenInternalRequest + */ +class RefreshRuntimeTokenInternalRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. The VM hardware token for authenticating the VM. + * https://cloud.google.com/compute/docs/instances/verifying-instance-identity + * + * Generated from protobuf field string vm_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $vm_id = ''; + + /** + * @param string $name Required. Format: + * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` + * Please see {@see ManagedNotebookServiceClient::runtimeName()} for help formatting this field. + * @param string $vmId Required. The VM hardware token for authenticating the VM. + * https://cloud.google.com/compute/docs/instances/verifying-instance-identity + * + * @return \Google\Cloud\Notebooks\V1\RefreshRuntimeTokenInternalRequest + * + * @experimental + */ + public static function build(string $name, string $vmId): self + { + return (new self()) + ->setName($name) + ->setVmId($vmId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Format: + * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` + * @type string $vm_id + * Required. The VM hardware token for authenticating the VM. + * https://cloud.google.com/compute/docs/instances/verifying-instance-identity + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V1\ManagedService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. The VM hardware token for authenticating the VM. + * https://cloud.google.com/compute/docs/instances/verifying-instance-identity + * + * Generated from protobuf field string vm_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getVmId() + { + return $this->vm_id; + } + + /** + * Required. The VM hardware token for authenticating the VM. + * https://cloud.google.com/compute/docs/instances/verifying-instance-identity + * + * Generated from protobuf field string vm_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setVmId($var) + { + GPBUtil::checkString($var, True); + $this->vm_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/RefreshRuntimeTokenInternalResponse.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/RefreshRuntimeTokenInternalResponse.php new file mode 100644 index 000000000000..a9e31bde51a9 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/RefreshRuntimeTokenInternalResponse.php @@ -0,0 +1,111 @@ +google.cloud.notebooks.v1.RefreshRuntimeTokenInternalResponse + */ +class RefreshRuntimeTokenInternalResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The OAuth 2.0 access token. + * + * Generated from protobuf field string access_token = 1; + */ + protected $access_token = ''; + /** + * Output only. Token expiration time. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $expire_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $access_token + * The OAuth 2.0 access token. + * @type \Google\Protobuf\Timestamp $expire_time + * Output only. Token expiration time. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V1\ManagedService::initOnce(); + parent::__construct($data); + } + + /** + * The OAuth 2.0 access token. + * + * Generated from protobuf field string access_token = 1; + * @return string + */ + public function getAccessToken() + { + return $this->access_token; + } + + /** + * The OAuth 2.0 access token. + * + * Generated from protobuf field string access_token = 1; + * @param string $var + * @return $this + */ + public function setAccessToken($var) + { + GPBUtil::checkString($var, True); + $this->access_token = $var; + + return $this; + } + + /** + * Output only. Token expiration time. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getExpireTime() + { + return $this->expire_time; + } + + public function hasExpireTime() + { + return isset($this->expire_time); + } + + public function clearExpireTime() + { + unset($this->expire_time); + } + + /** + * Output only. Token expiration time. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setExpireTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->expire_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/RegisterInstanceRequest.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/RegisterInstanceRequest.php new file mode 100644 index 000000000000..96eb12f68d0b --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/RegisterInstanceRequest.php @@ -0,0 +1,117 @@ +google.cloud.notebooks.v1.RegisterInstanceRequest + */ +class RegisterInstanceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Format: + * `parent=projects/{project_id}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $parent = ''; + /** + * Required. User defined unique ID of this instance. The `instance_id` must + * be 1 to 63 characters long and contain only lowercase letters, + * numeric characters, and dashes. The first character must be a lowercase + * letter and the last character cannot be a dash. + * + * Generated from protobuf field string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $instance_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Format: + * `parent=projects/{project_id}/locations/{location}` + * @type string $instance_id + * Required. User defined unique ID of this instance. The `instance_id` must + * be 1 to 63 characters long and contain only lowercase letters, + * numeric characters, and dashes. The first character must be a lowercase + * letter and the last character cannot be a dash. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. Format: + * `parent=projects/{project_id}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Format: + * `parent=projects/{project_id}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. User defined unique ID of this instance. The `instance_id` must + * be 1 to 63 characters long and contain only lowercase letters, + * numeric characters, and dashes. The first character must be a lowercase + * letter and the last character cannot be a dash. + * + * Generated from protobuf field string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getInstanceId() + { + return $this->instance_id; + } + + /** + * Required. User defined unique ID of this instance. The `instance_id` must + * be 1 to 63 characters long and contain only lowercase letters, + * numeric characters, and dashes. The first character must be a lowercase + * letter and the last character cannot be a dash. + * + * Generated from protobuf field string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setInstanceId($var) + { + GPBUtil::checkString($var, True); + $this->instance_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ReportInstanceInfoRequest.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ReportInstanceInfoRequest.php new file mode 100644 index 000000000000..8fbf0ac26d2d --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ReportInstanceInfoRequest.php @@ -0,0 +1,147 @@ +google.cloud.notebooks.v1.ReportInstanceInfoRequest + */ +class ReportInstanceInfoRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * Required. The VM hardware token for authenticating the VM. + * https://cloud.google.com/compute/docs/instances/verifying-instance-identity + * + * Generated from protobuf field string vm_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $vm_id = ''; + /** + * The metadata reported to Notebooks API. This will be merged to the instance + * metadata store + * + * Generated from protobuf field map metadata = 3; + */ + private $metadata; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * @type string $vm_id + * Required. The VM hardware token for authenticating the VM. + * https://cloud.google.com/compute/docs/instances/verifying-instance-identity + * @type array|\Google\Protobuf\Internal\MapField $metadata + * The metadata reported to Notebooks API. This will be merged to the instance + * metadata store + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. The VM hardware token for authenticating the VM. + * https://cloud.google.com/compute/docs/instances/verifying-instance-identity + * + * Generated from protobuf field string vm_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getVmId() + { + return $this->vm_id; + } + + /** + * Required. The VM hardware token for authenticating the VM. + * https://cloud.google.com/compute/docs/instances/verifying-instance-identity + * + * Generated from protobuf field string vm_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setVmId($var) + { + GPBUtil::checkString($var, True); + $this->vm_id = $var; + + return $this; + } + + /** + * The metadata reported to Notebooks API. This will be merged to the instance + * metadata store + * + * Generated from protobuf field map metadata = 3; + * @return \Google\Protobuf\Internal\MapField + */ + public function getMetadata() + { + return $this->metadata; + } + + /** + * The metadata reported to Notebooks API. This will be merged to the instance + * metadata store + * + * Generated from protobuf field map metadata = 3; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setMetadata($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->metadata = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ReportRuntimeEventRequest.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ReportRuntimeEventRequest.php new file mode 100644 index 000000000000..8d785cdc3c76 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ReportRuntimeEventRequest.php @@ -0,0 +1,168 @@ +google.cloud.notebooks.v1.ReportRuntimeEventRequest + */ +class ReportRuntimeEventRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. The VM hardware token for authenticating the VM. + * https://cloud.google.com/compute/docs/instances/verifying-instance-identity + * + * Generated from protobuf field string vm_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $vm_id = ''; + /** + * Required. The Event to be reported. + * + * Generated from protobuf field .google.cloud.notebooks.v1.Event event = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $event = null; + + /** + * @param string $name Required. Format: + * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` + * Please see {@see ManagedNotebookServiceClient::runtimeName()} for help formatting this field. + * + * @return \Google\Cloud\Notebooks\V1\ReportRuntimeEventRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Format: + * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` + * @type string $vm_id + * Required. The VM hardware token for authenticating the VM. + * https://cloud.google.com/compute/docs/instances/verifying-instance-identity + * @type \Google\Cloud\Notebooks\V1\Event $event + * Required. The Event to be reported. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V1\ManagedService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. The VM hardware token for authenticating the VM. + * https://cloud.google.com/compute/docs/instances/verifying-instance-identity + * + * Generated from protobuf field string vm_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getVmId() + { + return $this->vm_id; + } + + /** + * Required. The VM hardware token for authenticating the VM. + * https://cloud.google.com/compute/docs/instances/verifying-instance-identity + * + * Generated from protobuf field string vm_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setVmId($var) + { + GPBUtil::checkString($var, True); + $this->vm_id = $var; + + return $this; + } + + /** + * Required. The Event to be reported. + * + * Generated from protobuf field .google.cloud.notebooks.v1.Event event = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Notebooks\V1\Event|null + */ + public function getEvent() + { + return $this->event; + } + + public function hasEvent() + { + return isset($this->event); + } + + public function clearEvent() + { + unset($this->event); + } + + /** + * Required. The Event to be reported. + * + * Generated from protobuf field .google.cloud.notebooks.v1.Event event = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Notebooks\V1\Event $var + * @return $this + */ + public function setEvent($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V1\Event::class); + $this->event = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ReservationAffinity.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ReservationAffinity.php new file mode 100644 index 000000000000..b22aec5c428f --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ReservationAffinity.php @@ -0,0 +1,135 @@ +google.cloud.notebooks.v1.ReservationAffinity + */ +class ReservationAffinity extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Type of reservation to consume + * + * Generated from protobuf field .google.cloud.notebooks.v1.ReservationAffinity.Type consume_reservation_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $consume_reservation_type = 0; + /** + * Optional. Corresponds to the label key of reservation resource. + * + * Generated from protobuf field string key = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $key = ''; + /** + * Optional. Corresponds to the label values of reservation resource. + * + * Generated from protobuf field repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $values; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $consume_reservation_type + * Optional. Type of reservation to consume + * @type string $key + * Optional. Corresponds to the label key of reservation resource. + * @type array|\Google\Protobuf\Internal\RepeatedField $values + * Optional. Corresponds to the label values of reservation resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V1\Instance::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Type of reservation to consume + * + * Generated from protobuf field .google.cloud.notebooks.v1.ReservationAffinity.Type consume_reservation_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getConsumeReservationType() + { + return $this->consume_reservation_type; + } + + /** + * Optional. Type of reservation to consume + * + * Generated from protobuf field .google.cloud.notebooks.v1.ReservationAffinity.Type consume_reservation_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setConsumeReservationType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Notebooks\V1\ReservationAffinity\Type::class); + $this->consume_reservation_type = $var; + + return $this; + } + + /** + * Optional. Corresponds to the label key of reservation resource. + * + * Generated from protobuf field string key = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getKey() + { + return $this->key; + } + + /** + * Optional. Corresponds to the label key of reservation resource. + * + * Generated from protobuf field string key = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setKey($var) + { + GPBUtil::checkString($var, True); + $this->key = $var; + + return $this; + } + + /** + * Optional. Corresponds to the label values of reservation resource. + * + * Generated from protobuf field repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getValues() + { + return $this->values; + } + + /** + * Optional. Corresponds to the label values of reservation resource. + * + * Generated from protobuf field repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setValues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->values = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ReservationAffinity/Type.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ReservationAffinity/Type.php new file mode 100644 index 000000000000..af2ee3dd3de4 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ReservationAffinity/Type.php @@ -0,0 +1,72 @@ +google.cloud.notebooks.v1.ReservationAffinity.Type + */ +class Type +{ + /** + * Default type. + * + * Generated from protobuf enum TYPE_UNSPECIFIED = 0; + */ + const TYPE_UNSPECIFIED = 0; + /** + * Do not consume from any allocated capacity. + * + * Generated from protobuf enum NO_RESERVATION = 1; + */ + const NO_RESERVATION = 1; + /** + * Consume any reservation available. + * + * Generated from protobuf enum ANY_RESERVATION = 2; + */ + const ANY_RESERVATION = 2; + /** + * Must consume from a specific reservation. Must specify key value fields + * for specifying the reservations. + * + * Generated from protobuf enum SPECIFIC_RESERVATION = 3; + */ + const SPECIFIC_RESERVATION = 3; + + private static $valueToName = [ + self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', + self::NO_RESERVATION => 'NO_RESERVATION', + self::ANY_RESERVATION => 'ANY_RESERVATION', + self::SPECIFIC_RESERVATION => 'SPECIFIC_RESERVATION', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Type::class, \Google\Cloud\Notebooks\V1\ReservationAffinity_Type::class); + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ResetInstanceRequest.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ResetInstanceRequest.php new file mode 100644 index 000000000000..e9c2bf7e8038 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ResetInstanceRequest.php @@ -0,0 +1,71 @@ +google.cloud.notebooks.v1.ResetInstanceRequest + */ +class ResetInstanceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ResetRuntimeRequest.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ResetRuntimeRequest.php new file mode 100644 index 000000000000..61cbd7275467 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ResetRuntimeRequest.php @@ -0,0 +1,119 @@ +google.cloud.notebooks.v1.ResetRuntimeRequest + */ +class ResetRuntimeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * Idempotent request UUID. + * + * Generated from protobuf field string request_id = 2; + */ + protected $request_id = ''; + + /** + * @param string $name Required. Format: + * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` + * + * @return \Google\Cloud\Notebooks\V1\ResetRuntimeRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Format: + * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` + * @type string $request_id + * Idempotent request UUID. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V1\ManagedService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Idempotent request UUID. + * + * Generated from protobuf field string request_id = 2; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Idempotent request UUID. + * + * Generated from protobuf field string request_id = 2; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/RollbackInstanceRequest.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/RollbackInstanceRequest.php new file mode 100644 index 000000000000..f9491707036b --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/RollbackInstanceRequest.php @@ -0,0 +1,109 @@ +google.cloud.notebooks.v1.RollbackInstanceRequest + */ +class RollbackInstanceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * Required. The snapshot for rollback. + * Example: `projects/test-project/global/snapshots/krwlzipynril`. + * + * Generated from protobuf field string target_snapshot = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $target_snapshot = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * @type string $target_snapshot + * Required. The snapshot for rollback. + * Example: `projects/test-project/global/snapshots/krwlzipynril`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. The snapshot for rollback. + * Example: `projects/test-project/global/snapshots/krwlzipynril`. + * + * Generated from protobuf field string target_snapshot = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getTargetSnapshot() + { + return $this->target_snapshot; + } + + /** + * Required. The snapshot for rollback. + * Example: `projects/test-project/global/snapshots/krwlzipynril`. + * + * Generated from protobuf field string target_snapshot = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setTargetSnapshot($var) + { + GPBUtil::checkString($var, True); + $this->target_snapshot = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Runtime.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Runtime.php new file mode 100644 index 000000000000..1911c7430ba6 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Runtime.php @@ -0,0 +1,409 @@ +google.cloud.notebooks.v1.Runtime + */ +class Runtime extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The resource name of the runtime. + * Format: + * `projects/{project}/locations/{location}/runtimes/{runtimeId}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. Runtime state. + * + * Generated from protobuf field .google.cloud.notebooks.v1.Runtime.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. Runtime health_state. + * + * Generated from protobuf field .google.cloud.notebooks.v1.Runtime.HealthState health_state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $health_state = 0; + /** + * The config settings for accessing runtime. + * + * Generated from protobuf field .google.cloud.notebooks.v1.RuntimeAccessConfig access_config = 5; + */ + protected $access_config = null; + /** + * The config settings for software inside the runtime. + * + * Generated from protobuf field .google.cloud.notebooks.v1.RuntimeSoftwareConfig software_config = 6; + */ + protected $software_config = null; + /** + * Output only. Contains Runtime daemon metrics such as Service status and JupyterLab + * stats. + * + * Generated from protobuf field .google.cloud.notebooks.v1.RuntimeMetrics metrics = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $metrics = null; + /** + * Output only. Runtime creation time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. Runtime update time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + protected $runtime_type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The resource name of the runtime. + * Format: + * `projects/{project}/locations/{location}/runtimes/{runtimeId}` + * @type \Google\Cloud\Notebooks\V1\VirtualMachine $virtual_machine + * Use a Compute Engine VM image to start the managed notebook instance. + * @type int $state + * Output only. Runtime state. + * @type int $health_state + * Output only. Runtime health_state. + * @type \Google\Cloud\Notebooks\V1\RuntimeAccessConfig $access_config + * The config settings for accessing runtime. + * @type \Google\Cloud\Notebooks\V1\RuntimeSoftwareConfig $software_config + * The config settings for software inside the runtime. + * @type \Google\Cloud\Notebooks\V1\RuntimeMetrics $metrics + * Output only. Contains Runtime daemon metrics such as Service status and JupyterLab + * stats. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Runtime creation time. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. Runtime update time. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V1\Runtime::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The resource name of the runtime. + * Format: + * `projects/{project}/locations/{location}/runtimes/{runtimeId}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The resource name of the runtime. + * Format: + * `projects/{project}/locations/{location}/runtimes/{runtimeId}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Use a Compute Engine VM image to start the managed notebook instance. + * + * Generated from protobuf field .google.cloud.notebooks.v1.VirtualMachine virtual_machine = 2; + * @return \Google\Cloud\Notebooks\V1\VirtualMachine|null + */ + public function getVirtualMachine() + { + return $this->readOneof(2); + } + + public function hasVirtualMachine() + { + return $this->hasOneof(2); + } + + /** + * Use a Compute Engine VM image to start the managed notebook instance. + * + * Generated from protobuf field .google.cloud.notebooks.v1.VirtualMachine virtual_machine = 2; + * @param \Google\Cloud\Notebooks\V1\VirtualMachine $var + * @return $this + */ + public function setVirtualMachine($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V1\VirtualMachine::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Output only. Runtime state. + * + * Generated from protobuf field .google.cloud.notebooks.v1.Runtime.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. Runtime state. + * + * Generated from protobuf field .google.cloud.notebooks.v1.Runtime.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Notebooks\V1\Runtime\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. Runtime health_state. + * + * Generated from protobuf field .google.cloud.notebooks.v1.Runtime.HealthState health_state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getHealthState() + { + return $this->health_state; + } + + /** + * Output only. Runtime health_state. + * + * Generated from protobuf field .google.cloud.notebooks.v1.Runtime.HealthState health_state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setHealthState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Notebooks\V1\Runtime\HealthState::class); + $this->health_state = $var; + + return $this; + } + + /** + * The config settings for accessing runtime. + * + * Generated from protobuf field .google.cloud.notebooks.v1.RuntimeAccessConfig access_config = 5; + * @return \Google\Cloud\Notebooks\V1\RuntimeAccessConfig|null + */ + public function getAccessConfig() + { + return $this->access_config; + } + + public function hasAccessConfig() + { + return isset($this->access_config); + } + + public function clearAccessConfig() + { + unset($this->access_config); + } + + /** + * The config settings for accessing runtime. + * + * Generated from protobuf field .google.cloud.notebooks.v1.RuntimeAccessConfig access_config = 5; + * @param \Google\Cloud\Notebooks\V1\RuntimeAccessConfig $var + * @return $this + */ + public function setAccessConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V1\RuntimeAccessConfig::class); + $this->access_config = $var; + + return $this; + } + + /** + * The config settings for software inside the runtime. + * + * Generated from protobuf field .google.cloud.notebooks.v1.RuntimeSoftwareConfig software_config = 6; + * @return \Google\Cloud\Notebooks\V1\RuntimeSoftwareConfig|null + */ + public function getSoftwareConfig() + { + return $this->software_config; + } + + public function hasSoftwareConfig() + { + return isset($this->software_config); + } + + public function clearSoftwareConfig() + { + unset($this->software_config); + } + + /** + * The config settings for software inside the runtime. + * + * Generated from protobuf field .google.cloud.notebooks.v1.RuntimeSoftwareConfig software_config = 6; + * @param \Google\Cloud\Notebooks\V1\RuntimeSoftwareConfig $var + * @return $this + */ + public function setSoftwareConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V1\RuntimeSoftwareConfig::class); + $this->software_config = $var; + + return $this; + } + + /** + * Output only. Contains Runtime daemon metrics such as Service status and JupyterLab + * stats. + * + * Generated from protobuf field .google.cloud.notebooks.v1.RuntimeMetrics metrics = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Notebooks\V1\RuntimeMetrics|null + */ + public function getMetrics() + { + return $this->metrics; + } + + public function hasMetrics() + { + return isset($this->metrics); + } + + public function clearMetrics() + { + unset($this->metrics); + } + + /** + * Output only. Contains Runtime daemon metrics such as Service status and JupyterLab + * stats. + * + * Generated from protobuf field .google.cloud.notebooks.v1.RuntimeMetrics metrics = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Notebooks\V1\RuntimeMetrics $var + * @return $this + */ + public function setMetrics($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V1\RuntimeMetrics::class); + $this->metrics = $var; + + return $this; + } + + /** + * Output only. Runtime creation time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. Runtime creation time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. Runtime update time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. Runtime update time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * @return string + */ + public function getRuntimeType() + { + return $this->whichOneof("runtime_type"); + } + +} + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Runtime/HealthState.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Runtime/HealthState.php new file mode 100644 index 000000000000..9a0f048b360a --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Runtime/HealthState.php @@ -0,0 +1,84 @@ +google.cloud.notebooks.v1.Runtime.HealthState + */ +class HealthState +{ + /** + * The runtime substate is unknown. + * + * Generated from protobuf enum HEALTH_STATE_UNSPECIFIED = 0; + */ + const HEALTH_STATE_UNSPECIFIED = 0; + /** + * The runtime is known to be in an healthy state + * (for example, critical daemons are running) + * Applies to ACTIVE state. + * + * Generated from protobuf enum HEALTHY = 1; + */ + const HEALTHY = 1; + /** + * The runtime is known to be in an unhealthy state + * (for example, critical daemons are not running) + * Applies to ACTIVE state. + * + * Generated from protobuf enum UNHEALTHY = 2; + */ + const UNHEALTHY = 2; + /** + * The runtime has not installed health monitoring agent. + * Applies to ACTIVE state. + * + * Generated from protobuf enum AGENT_NOT_INSTALLED = 3; + */ + const AGENT_NOT_INSTALLED = 3; + /** + * The runtime health monitoring agent is not running. + * Applies to ACTIVE state. + * + * Generated from protobuf enum AGENT_NOT_RUNNING = 4; + */ + const AGENT_NOT_RUNNING = 4; + + private static $valueToName = [ + self::HEALTH_STATE_UNSPECIFIED => 'HEALTH_STATE_UNSPECIFIED', + self::HEALTHY => 'HEALTHY', + self::UNHEALTHY => 'UNHEALTHY', + self::AGENT_NOT_INSTALLED => 'AGENT_NOT_INSTALLED', + self::AGENT_NOT_RUNNING => 'AGENT_NOT_RUNNING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(HealthState::class, \Google\Cloud\Notebooks\V1\Runtime_HealthState::class); + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Runtime/State.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Runtime/State.php new file mode 100644 index 000000000000..a3e9c1f5c8f0 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Runtime/State.php @@ -0,0 +1,107 @@ +google.cloud.notebooks.v1.Runtime.State + */ +class State +{ + /** + * State is not specified. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The compute layer is starting the runtime. It is not ready for use. + * + * Generated from protobuf enum STARTING = 1; + */ + const STARTING = 1; + /** + * The compute layer is installing required frameworks and registering the + * runtime with notebook proxy. It cannot be used. + * + * Generated from protobuf enum PROVISIONING = 2; + */ + const PROVISIONING = 2; + /** + * The runtime is currently running. It is ready for use. + * + * Generated from protobuf enum ACTIVE = 3; + */ + const ACTIVE = 3; + /** + * The control logic is stopping the runtime. It cannot be used. + * + * Generated from protobuf enum STOPPING = 4; + */ + const STOPPING = 4; + /** + * The runtime is stopped. It cannot be used. + * + * Generated from protobuf enum STOPPED = 5; + */ + const STOPPED = 5; + /** + * The runtime is being deleted. It cannot be used. + * + * Generated from protobuf enum DELETING = 6; + */ + const DELETING = 6; + /** + * The runtime is upgrading. It cannot be used. + * + * Generated from protobuf enum UPGRADING = 7; + */ + const UPGRADING = 7; + /** + * The runtime is being created and set up. It is not ready for use. + * + * Generated from protobuf enum INITIALIZING = 8; + */ + const INITIALIZING = 8; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::STARTING => 'STARTING', + self::PROVISIONING => 'PROVISIONING', + self::ACTIVE => 'ACTIVE', + self::STOPPING => 'STOPPING', + self::STOPPED => 'STOPPED', + self::DELETING => 'DELETING', + self::UPGRADING => 'UPGRADING', + self::INITIALIZING => 'INITIALIZING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\Notebooks\V1\Runtime_State::class); + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/RuntimeAcceleratorConfig.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/RuntimeAcceleratorConfig.php new file mode 100644 index 000000000000..10aff3fbdc09 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/RuntimeAcceleratorConfig.php @@ -0,0 +1,111 @@ +google.cloud.notebooks.v1.RuntimeAcceleratorConfig + */ +class RuntimeAcceleratorConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Accelerator model. + * + * Generated from protobuf field .google.cloud.notebooks.v1.RuntimeAcceleratorConfig.AcceleratorType type = 1; + */ + protected $type = 0; + /** + * Count of cores of this accelerator. + * + * Generated from protobuf field int64 core_count = 2; + */ + protected $core_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $type + * Accelerator model. + * @type int|string $core_count + * Count of cores of this accelerator. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V1\Runtime::initOnce(); + parent::__construct($data); + } + + /** + * Accelerator model. + * + * Generated from protobuf field .google.cloud.notebooks.v1.RuntimeAcceleratorConfig.AcceleratorType type = 1; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Accelerator model. + * + * Generated from protobuf field .google.cloud.notebooks.v1.RuntimeAcceleratorConfig.AcceleratorType type = 1; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Notebooks\V1\RuntimeAcceleratorConfig\AcceleratorType::class); + $this->type = $var; + + return $this; + } + + /** + * Count of cores of this accelerator. + * + * Generated from protobuf field int64 core_count = 2; + * @return int|string + */ + public function getCoreCount() + { + return $this->core_count; + } + + /** + * Count of cores of this accelerator. + * + * Generated from protobuf field int64 core_count = 2; + * @param int|string $var + * @return $this + */ + public function setCoreCount($var) + { + GPBUtil::checkInt64($var); + $this->core_count = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/RuntimeAcceleratorConfig/AcceleratorType.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/RuntimeAcceleratorConfig/AcceleratorType.php new file mode 100644 index 000000000000..2804e7e85158 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/RuntimeAcceleratorConfig/AcceleratorType.php @@ -0,0 +1,127 @@ +google.cloud.notebooks.v1.RuntimeAcceleratorConfig.AcceleratorType + */ +class AcceleratorType +{ + /** + * Accelerator type is not specified. + * + * Generated from protobuf enum ACCELERATOR_TYPE_UNSPECIFIED = 0; + */ + const ACCELERATOR_TYPE_UNSPECIFIED = 0; + /** + * Accelerator type is Nvidia Tesla K80. + * + * Generated from protobuf enum NVIDIA_TESLA_K80 = 1 [deprecated = true]; + */ + const NVIDIA_TESLA_K80 = 1; + /** + * Accelerator type is Nvidia Tesla P100. + * + * Generated from protobuf enum NVIDIA_TESLA_P100 = 2; + */ + const NVIDIA_TESLA_P100 = 2; + /** + * Accelerator type is Nvidia Tesla V100. + * + * Generated from protobuf enum NVIDIA_TESLA_V100 = 3; + */ + const NVIDIA_TESLA_V100 = 3; + /** + * Accelerator type is Nvidia Tesla P4. + * + * Generated from protobuf enum NVIDIA_TESLA_P4 = 4; + */ + const NVIDIA_TESLA_P4 = 4; + /** + * Accelerator type is Nvidia Tesla T4. + * + * Generated from protobuf enum NVIDIA_TESLA_T4 = 5; + */ + const NVIDIA_TESLA_T4 = 5; + /** + * Accelerator type is Nvidia Tesla A100. + * + * Generated from protobuf enum NVIDIA_TESLA_A100 = 6; + */ + const NVIDIA_TESLA_A100 = 6; + /** + * (Coming soon) Accelerator type is TPU V2. + * + * Generated from protobuf enum TPU_V2 = 7; + */ + const TPU_V2 = 7; + /** + * (Coming soon) Accelerator type is TPU V3. + * + * Generated from protobuf enum TPU_V3 = 8; + */ + const TPU_V3 = 8; + /** + * Accelerator type is NVIDIA Tesla T4 Virtual Workstations. + * + * Generated from protobuf enum NVIDIA_TESLA_T4_VWS = 9; + */ + const NVIDIA_TESLA_T4_VWS = 9; + /** + * Accelerator type is NVIDIA Tesla P100 Virtual Workstations. + * + * Generated from protobuf enum NVIDIA_TESLA_P100_VWS = 10; + */ + const NVIDIA_TESLA_P100_VWS = 10; + /** + * Accelerator type is NVIDIA Tesla P4 Virtual Workstations. + * + * Generated from protobuf enum NVIDIA_TESLA_P4_VWS = 11; + */ + const NVIDIA_TESLA_P4_VWS = 11; + + private static $valueToName = [ + self::ACCELERATOR_TYPE_UNSPECIFIED => 'ACCELERATOR_TYPE_UNSPECIFIED', + self::NVIDIA_TESLA_K80 => 'NVIDIA_TESLA_K80', + self::NVIDIA_TESLA_P100 => 'NVIDIA_TESLA_P100', + self::NVIDIA_TESLA_V100 => 'NVIDIA_TESLA_V100', + self::NVIDIA_TESLA_P4 => 'NVIDIA_TESLA_P4', + self::NVIDIA_TESLA_T4 => 'NVIDIA_TESLA_T4', + self::NVIDIA_TESLA_A100 => 'NVIDIA_TESLA_A100', + self::TPU_V2 => 'TPU_V2', + self::TPU_V3 => 'TPU_V3', + self::NVIDIA_TESLA_T4_VWS => 'NVIDIA_TESLA_T4_VWS', + self::NVIDIA_TESLA_P100_VWS => 'NVIDIA_TESLA_P100_VWS', + self::NVIDIA_TESLA_P4_VWS => 'NVIDIA_TESLA_P4_VWS', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(AcceleratorType::class, \Google\Cloud\Notebooks\V1\RuntimeAcceleratorConfig_AcceleratorType::class); + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/RuntimeAccessConfig.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/RuntimeAccessConfig.php new file mode 100644 index 000000000000..48279d238329 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/RuntimeAccessConfig.php @@ -0,0 +1,139 @@ +google.cloud.notebooks.v1.RuntimeAccessConfig + */ +class RuntimeAccessConfig extends \Google\Protobuf\Internal\Message +{ + /** + * The type of access mode this instance. + * + * Generated from protobuf field .google.cloud.notebooks.v1.RuntimeAccessConfig.RuntimeAccessType access_type = 1; + */ + protected $access_type = 0; + /** + * The owner of this runtime after creation. Format: `alias@example.com` + * Currently supports one owner only. + * + * Generated from protobuf field string runtime_owner = 2; + */ + protected $runtime_owner = ''; + /** + * Output only. The proxy endpoint that is used to access the runtime. + * + * Generated from protobuf field string proxy_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $proxy_uri = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $access_type + * The type of access mode this instance. + * @type string $runtime_owner + * The owner of this runtime after creation. Format: `alias@example.com` + * Currently supports one owner only. + * @type string $proxy_uri + * Output only. The proxy endpoint that is used to access the runtime. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V1\Runtime::initOnce(); + parent::__construct($data); + } + + /** + * The type of access mode this instance. + * + * Generated from protobuf field .google.cloud.notebooks.v1.RuntimeAccessConfig.RuntimeAccessType access_type = 1; + * @return int + */ + public function getAccessType() + { + return $this->access_type; + } + + /** + * The type of access mode this instance. + * + * Generated from protobuf field .google.cloud.notebooks.v1.RuntimeAccessConfig.RuntimeAccessType access_type = 1; + * @param int $var + * @return $this + */ + public function setAccessType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Notebooks\V1\RuntimeAccessConfig\RuntimeAccessType::class); + $this->access_type = $var; + + return $this; + } + + /** + * The owner of this runtime after creation. Format: `alias@example.com` + * Currently supports one owner only. + * + * Generated from protobuf field string runtime_owner = 2; + * @return string + */ + public function getRuntimeOwner() + { + return $this->runtime_owner; + } + + /** + * The owner of this runtime after creation. Format: `alias@example.com` + * Currently supports one owner only. + * + * Generated from protobuf field string runtime_owner = 2; + * @param string $var + * @return $this + */ + public function setRuntimeOwner($var) + { + GPBUtil::checkString($var, True); + $this->runtime_owner = $var; + + return $this; + } + + /** + * Output only. The proxy endpoint that is used to access the runtime. + * + * Generated from protobuf field string proxy_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getProxyUri() + { + return $this->proxy_uri; + } + + /** + * Output only. The proxy endpoint that is used to access the runtime. + * + * Generated from protobuf field string proxy_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setProxyUri($var) + { + GPBUtil::checkString($var, True); + $this->proxy_uri = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/RuntimeAccessConfig/RuntimeAccessType.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/RuntimeAccessConfig/RuntimeAccessType.php new file mode 100644 index 000000000000..4893e511e971 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/RuntimeAccessConfig/RuntimeAccessType.php @@ -0,0 +1,68 @@ +google.cloud.notebooks.v1.RuntimeAccessConfig.RuntimeAccessType + */ +class RuntimeAccessType +{ + /** + * Unspecified access. + * + * Generated from protobuf enum RUNTIME_ACCESS_TYPE_UNSPECIFIED = 0; + */ + const RUNTIME_ACCESS_TYPE_UNSPECIFIED = 0; + /** + * Single user login. + * + * Generated from protobuf enum SINGLE_USER = 1; + */ + const SINGLE_USER = 1; + /** + * Service Account mode. + * In Service Account mode, Runtime creator will specify a SA that exists + * in the consumer project. Using Runtime Service Account field. + * Users accessing the Runtime need ActAs (Service Account User) permission. + * + * Generated from protobuf enum SERVICE_ACCOUNT = 2; + */ + const SERVICE_ACCOUNT = 2; + + private static $valueToName = [ + self::RUNTIME_ACCESS_TYPE_UNSPECIFIED => 'RUNTIME_ACCESS_TYPE_UNSPECIFIED', + self::SINGLE_USER => 'SINGLE_USER', + self::SERVICE_ACCOUNT => 'SERVICE_ACCOUNT', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(RuntimeAccessType::class, \Google\Cloud\Notebooks\V1\RuntimeAccessConfig_RuntimeAccessType::class); + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/RuntimeMetrics.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/RuntimeMetrics.php new file mode 100644 index 000000000000..32b134095fa0 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/RuntimeMetrics.php @@ -0,0 +1,67 @@ +google.cloud.notebooks.v1.RuntimeMetrics + */ +class RuntimeMetrics extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The system metrics. + * + * Generated from protobuf field map system_metrics = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $system_metrics; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\MapField $system_metrics + * Output only. The system metrics. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V1\Runtime::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The system metrics. + * + * Generated from protobuf field map system_metrics = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getSystemMetrics() + { + return $this->system_metrics; + } + + /** + * Output only. The system metrics. + * + * Generated from protobuf field map system_metrics = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setSystemMetrics($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->system_metrics = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/RuntimeShieldedInstanceConfig.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/RuntimeShieldedInstanceConfig.php new file mode 100644 index 000000000000..278de0fa9476 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/RuntimeShieldedInstanceConfig.php @@ -0,0 +1,166 @@ +google.cloud.notebooks.v1.RuntimeShieldedInstanceConfig + */ +class RuntimeShieldedInstanceConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Defines whether the instance has Secure Boot enabled. + * Secure Boot helps ensure that the system only runs authentic software by + * verifying the digital signature of all boot components, and halting the + * boot process if signature verification fails. Disabled by default. + * + * Generated from protobuf field bool enable_secure_boot = 1; + */ + protected $enable_secure_boot = false; + /** + * Defines whether the instance has the vTPM enabled. Enabled by default. + * + * Generated from protobuf field bool enable_vtpm = 2; + */ + protected $enable_vtpm = false; + /** + * Defines whether the instance has integrity monitoring enabled. + * Enables monitoring and attestation of the boot integrity of the instance. + * The attestation is performed against the integrity policy baseline. This + * baseline is initially derived from the implicitly trusted boot image when + * the instance is created. Enabled by default. + * + * Generated from protobuf field bool enable_integrity_monitoring = 3; + */ + protected $enable_integrity_monitoring = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $enable_secure_boot + * Defines whether the instance has Secure Boot enabled. + * Secure Boot helps ensure that the system only runs authentic software by + * verifying the digital signature of all boot components, and halting the + * boot process if signature verification fails. Disabled by default. + * @type bool $enable_vtpm + * Defines whether the instance has the vTPM enabled. Enabled by default. + * @type bool $enable_integrity_monitoring + * Defines whether the instance has integrity monitoring enabled. + * Enables monitoring and attestation of the boot integrity of the instance. + * The attestation is performed against the integrity policy baseline. This + * baseline is initially derived from the implicitly trusted boot image when + * the instance is created. Enabled by default. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V1\Runtime::initOnce(); + parent::__construct($data); + } + + /** + * Defines whether the instance has Secure Boot enabled. + * Secure Boot helps ensure that the system only runs authentic software by + * verifying the digital signature of all boot components, and halting the + * boot process if signature verification fails. Disabled by default. + * + * Generated from protobuf field bool enable_secure_boot = 1; + * @return bool + */ + public function getEnableSecureBoot() + { + return $this->enable_secure_boot; + } + + /** + * Defines whether the instance has Secure Boot enabled. + * Secure Boot helps ensure that the system only runs authentic software by + * verifying the digital signature of all boot components, and halting the + * boot process if signature verification fails. Disabled by default. + * + * Generated from protobuf field bool enable_secure_boot = 1; + * @param bool $var + * @return $this + */ + public function setEnableSecureBoot($var) + { + GPBUtil::checkBool($var); + $this->enable_secure_boot = $var; + + return $this; + } + + /** + * Defines whether the instance has the vTPM enabled. Enabled by default. + * + * Generated from protobuf field bool enable_vtpm = 2; + * @return bool + */ + public function getEnableVtpm() + { + return $this->enable_vtpm; + } + + /** + * Defines whether the instance has the vTPM enabled. Enabled by default. + * + * Generated from protobuf field bool enable_vtpm = 2; + * @param bool $var + * @return $this + */ + public function setEnableVtpm($var) + { + GPBUtil::checkBool($var); + $this->enable_vtpm = $var; + + return $this; + } + + /** + * Defines whether the instance has integrity monitoring enabled. + * Enables monitoring and attestation of the boot integrity of the instance. + * The attestation is performed against the integrity policy baseline. This + * baseline is initially derived from the implicitly trusted boot image when + * the instance is created. Enabled by default. + * + * Generated from protobuf field bool enable_integrity_monitoring = 3; + * @return bool + */ + public function getEnableIntegrityMonitoring() + { + return $this->enable_integrity_monitoring; + } + + /** + * Defines whether the instance has integrity monitoring enabled. + * Enables monitoring and attestation of the boot integrity of the instance. + * The attestation is performed against the integrity policy baseline. This + * baseline is initially derived from the implicitly trusted boot image when + * the instance is created. Enabled by default. + * + * Generated from protobuf field bool enable_integrity_monitoring = 3; + * @param bool $var + * @return $this + */ + public function setEnableIntegrityMonitoring($var) + { + GPBUtil::checkBool($var); + $this->enable_integrity_monitoring = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/RuntimeSoftwareConfig.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/RuntimeSoftwareConfig.php new file mode 100644 index 000000000000..6aff9234d908 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/RuntimeSoftwareConfig.php @@ -0,0 +1,528 @@ +google.cloud.notebooks.v1.RuntimeSoftwareConfig + */ +class RuntimeSoftwareConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Cron expression in UTC timezone, used to schedule instance auto upgrade. + * Please follow the [cron format](https://en.wikipedia.org/wiki/Cron). + * + * Generated from protobuf field string notebook_upgrade_schedule = 1; + */ + protected $notebook_upgrade_schedule = ''; + /** + * Verifies core internal services are running. + * Default: True + * + * Generated from protobuf field optional bool enable_health_monitoring = 2; + */ + protected $enable_health_monitoring = null; + /** + * Runtime will automatically shutdown after idle_shutdown_time. + * Default: True + * + * Generated from protobuf field optional bool idle_shutdown = 3; + */ + protected $idle_shutdown = null; + /** + * Time in minutes to wait before shutting down runtime. Default: 180 minutes + * + * Generated from protobuf field int32 idle_shutdown_timeout = 4; + */ + protected $idle_shutdown_timeout = 0; + /** + * Install Nvidia Driver automatically. + * Default: True + * + * Generated from protobuf field bool install_gpu_driver = 5; + */ + protected $install_gpu_driver = false; + /** + * Specify a custom Cloud Storage path where the GPU driver is stored. + * If not specified, we'll automatically choose from official GPU drivers. + * + * Generated from protobuf field string custom_gpu_driver_path = 6; + */ + protected $custom_gpu_driver_path = ''; + /** + * Path to a Bash script that automatically runs after a notebook instance + * fully boots up. The path must be a URL or + * Cloud Storage path (`gs://path-to-file/file-name`). + * + * Generated from protobuf field string post_startup_script = 7; + */ + protected $post_startup_script = ''; + /** + * Optional. Use a list of container images to use as Kernels in the notebook instance. + * + * Generated from protobuf field repeated .google.cloud.notebooks.v1.ContainerImage kernels = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $kernels; + /** + * Output only. Bool indicating whether an newer image is available in an image family. + * + * Generated from protobuf field optional bool upgradeable = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $upgradeable = null; + /** + * Behavior for the post startup script. + * + * Generated from protobuf field .google.cloud.notebooks.v1.RuntimeSoftwareConfig.PostStartupScriptBehavior post_startup_script_behavior = 10; + */ + protected $post_startup_script_behavior = 0; + /** + * Bool indicating whether JupyterLab terminal will be available or not. + * Default: False + * + * Generated from protobuf field optional bool disable_terminal = 11; + */ + protected $disable_terminal = null; + /** + * Output only. version of boot image such as M100, from release label of the image. + * + * Generated from protobuf field optional string version = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $version = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $notebook_upgrade_schedule + * Cron expression in UTC timezone, used to schedule instance auto upgrade. + * Please follow the [cron format](https://en.wikipedia.org/wiki/Cron). + * @type bool $enable_health_monitoring + * Verifies core internal services are running. + * Default: True + * @type bool $idle_shutdown + * Runtime will automatically shutdown after idle_shutdown_time. + * Default: True + * @type int $idle_shutdown_timeout + * Time in minutes to wait before shutting down runtime. Default: 180 minutes + * @type bool $install_gpu_driver + * Install Nvidia Driver automatically. + * Default: True + * @type string $custom_gpu_driver_path + * Specify a custom Cloud Storage path where the GPU driver is stored. + * If not specified, we'll automatically choose from official GPU drivers. + * @type string $post_startup_script + * Path to a Bash script that automatically runs after a notebook instance + * fully boots up. The path must be a URL or + * Cloud Storage path (`gs://path-to-file/file-name`). + * @type array<\Google\Cloud\Notebooks\V1\ContainerImage>|\Google\Protobuf\Internal\RepeatedField $kernels + * Optional. Use a list of container images to use as Kernels in the notebook instance. + * @type bool $upgradeable + * Output only. Bool indicating whether an newer image is available in an image family. + * @type int $post_startup_script_behavior + * Behavior for the post startup script. + * @type bool $disable_terminal + * Bool indicating whether JupyterLab terminal will be available or not. + * Default: False + * @type string $version + * Output only. version of boot image such as M100, from release label of the image. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V1\Runtime::initOnce(); + parent::__construct($data); + } + + /** + * Cron expression in UTC timezone, used to schedule instance auto upgrade. + * Please follow the [cron format](https://en.wikipedia.org/wiki/Cron). + * + * Generated from protobuf field string notebook_upgrade_schedule = 1; + * @return string + */ + public function getNotebookUpgradeSchedule() + { + return $this->notebook_upgrade_schedule; + } + + /** + * Cron expression in UTC timezone, used to schedule instance auto upgrade. + * Please follow the [cron format](https://en.wikipedia.org/wiki/Cron). + * + * Generated from protobuf field string notebook_upgrade_schedule = 1; + * @param string $var + * @return $this + */ + public function setNotebookUpgradeSchedule($var) + { + GPBUtil::checkString($var, True); + $this->notebook_upgrade_schedule = $var; + + return $this; + } + + /** + * Verifies core internal services are running. + * Default: True + * + * Generated from protobuf field optional bool enable_health_monitoring = 2; + * @return bool + */ + public function getEnableHealthMonitoring() + { + return isset($this->enable_health_monitoring) ? $this->enable_health_monitoring : false; + } + + public function hasEnableHealthMonitoring() + { + return isset($this->enable_health_monitoring); + } + + public function clearEnableHealthMonitoring() + { + unset($this->enable_health_monitoring); + } + + /** + * Verifies core internal services are running. + * Default: True + * + * Generated from protobuf field optional bool enable_health_monitoring = 2; + * @param bool $var + * @return $this + */ + public function setEnableHealthMonitoring($var) + { + GPBUtil::checkBool($var); + $this->enable_health_monitoring = $var; + + return $this; + } + + /** + * Runtime will automatically shutdown after idle_shutdown_time. + * Default: True + * + * Generated from protobuf field optional bool idle_shutdown = 3; + * @return bool + */ + public function getIdleShutdown() + { + return isset($this->idle_shutdown) ? $this->idle_shutdown : false; + } + + public function hasIdleShutdown() + { + return isset($this->idle_shutdown); + } + + public function clearIdleShutdown() + { + unset($this->idle_shutdown); + } + + /** + * Runtime will automatically shutdown after idle_shutdown_time. + * Default: True + * + * Generated from protobuf field optional bool idle_shutdown = 3; + * @param bool $var + * @return $this + */ + public function setIdleShutdown($var) + { + GPBUtil::checkBool($var); + $this->idle_shutdown = $var; + + return $this; + } + + /** + * Time in minutes to wait before shutting down runtime. Default: 180 minutes + * + * Generated from protobuf field int32 idle_shutdown_timeout = 4; + * @return int + */ + public function getIdleShutdownTimeout() + { + return $this->idle_shutdown_timeout; + } + + /** + * Time in minutes to wait before shutting down runtime. Default: 180 minutes + * + * Generated from protobuf field int32 idle_shutdown_timeout = 4; + * @param int $var + * @return $this + */ + public function setIdleShutdownTimeout($var) + { + GPBUtil::checkInt32($var); + $this->idle_shutdown_timeout = $var; + + return $this; + } + + /** + * Install Nvidia Driver automatically. + * Default: True + * + * Generated from protobuf field bool install_gpu_driver = 5; + * @return bool + */ + public function getInstallGpuDriver() + { + return $this->install_gpu_driver; + } + + /** + * Install Nvidia Driver automatically. + * Default: True + * + * Generated from protobuf field bool install_gpu_driver = 5; + * @param bool $var + * @return $this + */ + public function setInstallGpuDriver($var) + { + GPBUtil::checkBool($var); + $this->install_gpu_driver = $var; + + return $this; + } + + /** + * Specify a custom Cloud Storage path where the GPU driver is stored. + * If not specified, we'll automatically choose from official GPU drivers. + * + * Generated from protobuf field string custom_gpu_driver_path = 6; + * @return string + */ + public function getCustomGpuDriverPath() + { + return $this->custom_gpu_driver_path; + } + + /** + * Specify a custom Cloud Storage path where the GPU driver is stored. + * If not specified, we'll automatically choose from official GPU drivers. + * + * Generated from protobuf field string custom_gpu_driver_path = 6; + * @param string $var + * @return $this + */ + public function setCustomGpuDriverPath($var) + { + GPBUtil::checkString($var, True); + $this->custom_gpu_driver_path = $var; + + return $this; + } + + /** + * Path to a Bash script that automatically runs after a notebook instance + * fully boots up. The path must be a URL or + * Cloud Storage path (`gs://path-to-file/file-name`). + * + * Generated from protobuf field string post_startup_script = 7; + * @return string + */ + public function getPostStartupScript() + { + return $this->post_startup_script; + } + + /** + * Path to a Bash script that automatically runs after a notebook instance + * fully boots up. The path must be a URL or + * Cloud Storage path (`gs://path-to-file/file-name`). + * + * Generated from protobuf field string post_startup_script = 7; + * @param string $var + * @return $this + */ + public function setPostStartupScript($var) + { + GPBUtil::checkString($var, True); + $this->post_startup_script = $var; + + return $this; + } + + /** + * Optional. Use a list of container images to use as Kernels in the notebook instance. + * + * Generated from protobuf field repeated .google.cloud.notebooks.v1.ContainerImage kernels = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getKernels() + { + return $this->kernels; + } + + /** + * Optional. Use a list of container images to use as Kernels in the notebook instance. + * + * Generated from protobuf field repeated .google.cloud.notebooks.v1.ContainerImage kernels = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\Notebooks\V1\ContainerImage>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setKernels($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Notebooks\V1\ContainerImage::class); + $this->kernels = $arr; + + return $this; + } + + /** + * Output only. Bool indicating whether an newer image is available in an image family. + * + * Generated from protobuf field optional bool upgradeable = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getUpgradeable() + { + return isset($this->upgradeable) ? $this->upgradeable : false; + } + + public function hasUpgradeable() + { + return isset($this->upgradeable); + } + + public function clearUpgradeable() + { + unset($this->upgradeable); + } + + /** + * Output only. Bool indicating whether an newer image is available in an image family. + * + * Generated from protobuf field optional bool upgradeable = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setUpgradeable($var) + { + GPBUtil::checkBool($var); + $this->upgradeable = $var; + + return $this; + } + + /** + * Behavior for the post startup script. + * + * Generated from protobuf field .google.cloud.notebooks.v1.RuntimeSoftwareConfig.PostStartupScriptBehavior post_startup_script_behavior = 10; + * @return int + */ + public function getPostStartupScriptBehavior() + { + return $this->post_startup_script_behavior; + } + + /** + * Behavior for the post startup script. + * + * Generated from protobuf field .google.cloud.notebooks.v1.RuntimeSoftwareConfig.PostStartupScriptBehavior post_startup_script_behavior = 10; + * @param int $var + * @return $this + */ + public function setPostStartupScriptBehavior($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Notebooks\V1\RuntimeSoftwareConfig\PostStartupScriptBehavior::class); + $this->post_startup_script_behavior = $var; + + return $this; + } + + /** + * Bool indicating whether JupyterLab terminal will be available or not. + * Default: False + * + * Generated from protobuf field optional bool disable_terminal = 11; + * @return bool + */ + public function getDisableTerminal() + { + return isset($this->disable_terminal) ? $this->disable_terminal : false; + } + + public function hasDisableTerminal() + { + return isset($this->disable_terminal); + } + + public function clearDisableTerminal() + { + unset($this->disable_terminal); + } + + /** + * Bool indicating whether JupyterLab terminal will be available or not. + * Default: False + * + * Generated from protobuf field optional bool disable_terminal = 11; + * @param bool $var + * @return $this + */ + public function setDisableTerminal($var) + { + GPBUtil::checkBool($var); + $this->disable_terminal = $var; + + return $this; + } + + /** + * Output only. version of boot image such as M100, from release label of the image. + * + * Generated from protobuf field optional string version = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getVersion() + { + return isset($this->version) ? $this->version : ''; + } + + public function hasVersion() + { + return isset($this->version); + } + + public function clearVersion() + { + unset($this->version); + } + + /** + * Output only. version of boot image such as M100, from release label of the image. + * + * Generated from protobuf field optional string version = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkString($var, True); + $this->version = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/RuntimeSoftwareConfig/PostStartupScriptBehavior.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/RuntimeSoftwareConfig/PostStartupScriptBehavior.php new file mode 100644 index 000000000000..2f94ae4c207c --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/RuntimeSoftwareConfig/PostStartupScriptBehavior.php @@ -0,0 +1,64 @@ +google.cloud.notebooks.v1.RuntimeSoftwareConfig.PostStartupScriptBehavior + */ +class PostStartupScriptBehavior +{ + /** + * Unspecified post startup script behavior. Will run only once at creation. + * + * Generated from protobuf enum POST_STARTUP_SCRIPT_BEHAVIOR_UNSPECIFIED = 0; + */ + const POST_STARTUP_SCRIPT_BEHAVIOR_UNSPECIFIED = 0; + /** + * Runs the post startup script provided during creation at every start. + * + * Generated from protobuf enum RUN_EVERY_START = 1; + */ + const RUN_EVERY_START = 1; + /** + * Downloads and runs the provided post startup script at every start. + * + * Generated from protobuf enum DOWNLOAD_AND_RUN_EVERY_START = 2; + */ + const DOWNLOAD_AND_RUN_EVERY_START = 2; + + private static $valueToName = [ + self::POST_STARTUP_SCRIPT_BEHAVIOR_UNSPECIFIED => 'POST_STARTUP_SCRIPT_BEHAVIOR_UNSPECIFIED', + self::RUN_EVERY_START => 'RUN_EVERY_START', + self::DOWNLOAD_AND_RUN_EVERY_START => 'DOWNLOAD_AND_RUN_EVERY_START', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(PostStartupScriptBehavior::class, \Google\Cloud\Notebooks\V1\RuntimeSoftwareConfig_PostStartupScriptBehavior::class); + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Schedule.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Schedule.php new file mode 100644 index 000000000000..b71b84c1a035 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Schedule.php @@ -0,0 +1,448 @@ +google.cloud.notebooks.v1.Schedule + */ +class Schedule extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The name of this schedule. Format: + * `projects/{project_id}/locations/{location}/schedules/{schedule_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. Display name used for UI purposes. + * Name can only contain alphanumeric characters, hyphens `-`, + * and underscores `_`. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $display_name = ''; + /** + * A brief description of this environment. + * + * Generated from protobuf field string description = 3; + */ + protected $description = ''; + /** + * Generated from protobuf field .google.cloud.notebooks.v1.Schedule.State state = 4; + */ + protected $state = 0; + /** + * Cron-tab formatted schedule by which the job will execute. + * Format: minute, hour, day of month, month, day of week, + * e.g. `0 0 * * WED` = every Wednesday + * More examples: https://crontab.guru/examples.html + * + * Generated from protobuf field string cron_schedule = 5; + */ + protected $cron_schedule = ''; + /** + * Timezone on which the cron_schedule. + * The value of this field must be a time zone name from the tz database. + * TZ Database: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones + * Note that some time zones include a provision for daylight savings time. + * The rules for daylight saving time are determined by the chosen tz. + * For UTC use the string "utc". If a time zone is not specified, + * the default will be in UTC (also known as GMT). + * + * Generated from protobuf field string time_zone = 6; + */ + protected $time_zone = ''; + /** + * Output only. Time the schedule was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. Time the schedule was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Notebook Execution Template corresponding to this schedule. + * + * Generated from protobuf field .google.cloud.notebooks.v1.ExecutionTemplate execution_template = 9; + */ + protected $execution_template = null; + /** + * Output only. The most recent execution names triggered from this schedule and their + * corresponding states. + * + * Generated from protobuf field repeated .google.cloud.notebooks.v1.Execution recent_executions = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $recent_executions; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The name of this schedule. Format: + * `projects/{project_id}/locations/{location}/schedules/{schedule_id}` + * @type string $display_name + * Output only. Display name used for UI purposes. + * Name can only contain alphanumeric characters, hyphens `-`, + * and underscores `_`. + * @type string $description + * A brief description of this environment. + * @type int $state + * @type string $cron_schedule + * Cron-tab formatted schedule by which the job will execute. + * Format: minute, hour, day of month, month, day of week, + * e.g. `0 0 * * WED` = every Wednesday + * More examples: https://crontab.guru/examples.html + * @type string $time_zone + * Timezone on which the cron_schedule. + * The value of this field must be a time zone name from the tz database. + * TZ Database: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones + * Note that some time zones include a provision for daylight savings time. + * The rules for daylight saving time are determined by the chosen tz. + * For UTC use the string "utc". If a time zone is not specified, + * the default will be in UTC (also known as GMT). + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Time the schedule was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. Time the schedule was last updated. + * @type \Google\Cloud\Notebooks\V1\ExecutionTemplate $execution_template + * Notebook Execution Template corresponding to this schedule. + * @type array<\Google\Cloud\Notebooks\V1\Execution>|\Google\Protobuf\Internal\RepeatedField $recent_executions + * Output only. The most recent execution names triggered from this schedule and their + * corresponding states. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V1\Schedule::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The name of this schedule. Format: + * `projects/{project_id}/locations/{location}/schedules/{schedule_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The name of this schedule. Format: + * `projects/{project_id}/locations/{location}/schedules/{schedule_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. Display name used for UI purposes. + * Name can only contain alphanumeric characters, hyphens `-`, + * and underscores `_`. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Output only. Display name used for UI purposes. + * Name can only contain alphanumeric characters, hyphens `-`, + * and underscores `_`. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * A brief description of this environment. + * + * Generated from protobuf field string description = 3; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * A brief description of this environment. + * + * Generated from protobuf field string description = 3; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Generated from protobuf field .google.cloud.notebooks.v1.Schedule.State state = 4; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Generated from protobuf field .google.cloud.notebooks.v1.Schedule.State state = 4; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Notebooks\V1\Schedule\State::class); + $this->state = $var; + + return $this; + } + + /** + * Cron-tab formatted schedule by which the job will execute. + * Format: minute, hour, day of month, month, day of week, + * e.g. `0 0 * * WED` = every Wednesday + * More examples: https://crontab.guru/examples.html + * + * Generated from protobuf field string cron_schedule = 5; + * @return string + */ + public function getCronSchedule() + { + return $this->cron_schedule; + } + + /** + * Cron-tab formatted schedule by which the job will execute. + * Format: minute, hour, day of month, month, day of week, + * e.g. `0 0 * * WED` = every Wednesday + * More examples: https://crontab.guru/examples.html + * + * Generated from protobuf field string cron_schedule = 5; + * @param string $var + * @return $this + */ + public function setCronSchedule($var) + { + GPBUtil::checkString($var, True); + $this->cron_schedule = $var; + + return $this; + } + + /** + * Timezone on which the cron_schedule. + * The value of this field must be a time zone name from the tz database. + * TZ Database: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones + * Note that some time zones include a provision for daylight savings time. + * The rules for daylight saving time are determined by the chosen tz. + * For UTC use the string "utc". If a time zone is not specified, + * the default will be in UTC (also known as GMT). + * + * Generated from protobuf field string time_zone = 6; + * @return string + */ + public function getTimeZone() + { + return $this->time_zone; + } + + /** + * Timezone on which the cron_schedule. + * The value of this field must be a time zone name from the tz database. + * TZ Database: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones + * Note that some time zones include a provision for daylight savings time. + * The rules for daylight saving time are determined by the chosen tz. + * For UTC use the string "utc". If a time zone is not specified, + * the default will be in UTC (also known as GMT). + * + * Generated from protobuf field string time_zone = 6; + * @param string $var + * @return $this + */ + public function setTimeZone($var) + { + GPBUtil::checkString($var, True); + $this->time_zone = $var; + + return $this; + } + + /** + * Output only. Time the schedule was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. Time the schedule was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. Time the schedule was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. Time the schedule was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Notebook Execution Template corresponding to this schedule. + * + * Generated from protobuf field .google.cloud.notebooks.v1.ExecutionTemplate execution_template = 9; + * @return \Google\Cloud\Notebooks\V1\ExecutionTemplate|null + */ + public function getExecutionTemplate() + { + return $this->execution_template; + } + + public function hasExecutionTemplate() + { + return isset($this->execution_template); + } + + public function clearExecutionTemplate() + { + unset($this->execution_template); + } + + /** + * Notebook Execution Template corresponding to this schedule. + * + * Generated from protobuf field .google.cloud.notebooks.v1.ExecutionTemplate execution_template = 9; + * @param \Google\Cloud\Notebooks\V1\ExecutionTemplate $var + * @return $this + */ + public function setExecutionTemplate($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V1\ExecutionTemplate::class); + $this->execution_template = $var; + + return $this; + } + + /** + * Output only. The most recent execution names triggered from this schedule and their + * corresponding states. + * + * Generated from protobuf field repeated .google.cloud.notebooks.v1.Execution recent_executions = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRecentExecutions() + { + return $this->recent_executions; + } + + /** + * Output only. The most recent execution names triggered from this schedule and their + * corresponding states. + * + * Generated from protobuf field repeated .google.cloud.notebooks.v1.Execution recent_executions = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\Notebooks\V1\Execution>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRecentExecutions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Notebooks\V1\Execution::class); + $this->recent_executions = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Schedule/State.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Schedule/State.php new file mode 100644 index 000000000000..c75aef0bb897 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Schedule/State.php @@ -0,0 +1,97 @@ +google.cloud.notebooks.v1.Schedule.State + */ +class State +{ + /** + * Unspecified state. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The job is executing normally. + * + * Generated from protobuf enum ENABLED = 1; + */ + const ENABLED = 1; + /** + * The job is paused by the user. It will not execute. A user can + * intentionally pause the job using + * [PauseJobRequest][]. + * + * Generated from protobuf enum PAUSED = 2; + */ + const PAUSED = 2; + /** + * The job is disabled by the system due to error. The user + * cannot directly set a job to be disabled. + * + * Generated from protobuf enum DISABLED = 3; + */ + const DISABLED = 3; + /** + * The job state resulting from a failed [CloudScheduler.UpdateJob][] + * operation. To recover a job from this state, retry + * [CloudScheduler.UpdateJob][] until a successful response is received. + * + * Generated from protobuf enum UPDATE_FAILED = 4; + */ + const UPDATE_FAILED = 4; + /** + * The schedule resource is being created. + * + * Generated from protobuf enum INITIALIZING = 5; + */ + const INITIALIZING = 5; + /** + * The schedule resource is being deleted. + * + * Generated from protobuf enum DELETING = 6; + */ + const DELETING = 6; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::ENABLED => 'ENABLED', + self::PAUSED => 'PAUSED', + self::DISABLED => 'DISABLED', + self::UPDATE_FAILED => 'UPDATE_FAILED', + self::INITIALIZING => 'INITIALIZING', + self::DELETING => 'DELETING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\Notebooks\V1\Schedule_State::class); + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/SetInstanceAcceleratorRequest.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/SetInstanceAcceleratorRequest.php new file mode 100644 index 000000000000..a8991d313283 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/SetInstanceAcceleratorRequest.php @@ -0,0 +1,151 @@ +google.cloud.notebooks.v1.SetInstanceAcceleratorRequest + */ +class SetInstanceAcceleratorRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * Required. Type of this accelerator. + * + * Generated from protobuf field .google.cloud.notebooks.v1.Instance.AcceleratorType type = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $type = 0; + /** + * Required. Count of cores of this accelerator. Note that not all combinations + * of `type` and `core_count` are valid. Check [GPUs on + * Compute Engine](https://cloud.google.com/compute/docs/gpus/#gpus-list) to + * find a valid combination. TPUs are not supported. + * + * Generated from protobuf field int64 core_count = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $core_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * @type int $type + * Required. Type of this accelerator. + * @type int|string $core_count + * Required. Count of cores of this accelerator. Note that not all combinations + * of `type` and `core_count` are valid. Check [GPUs on + * Compute Engine](https://cloud.google.com/compute/docs/gpus/#gpus-list) to + * find a valid combination. TPUs are not supported. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. Type of this accelerator. + * + * Generated from protobuf field .google.cloud.notebooks.v1.Instance.AcceleratorType type = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Required. Type of this accelerator. + * + * Generated from protobuf field .google.cloud.notebooks.v1.Instance.AcceleratorType type = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Notebooks\V1\Instance\AcceleratorType::class); + $this->type = $var; + + return $this; + } + + /** + * Required. Count of cores of this accelerator. Note that not all combinations + * of `type` and `core_count` are valid. Check [GPUs on + * Compute Engine](https://cloud.google.com/compute/docs/gpus/#gpus-list) to + * find a valid combination. TPUs are not supported. + * + * Generated from protobuf field int64 core_count = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return int|string + */ + public function getCoreCount() + { + return $this->core_count; + } + + /** + * Required. Count of cores of this accelerator. Note that not all combinations + * of `type` and `core_count` are valid. Check [GPUs on + * Compute Engine](https://cloud.google.com/compute/docs/gpus/#gpus-list) to + * find a valid combination. TPUs are not supported. + * + * Generated from protobuf field int64 core_count = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param int|string $var + * @return $this + */ + public function setCoreCount($var) + { + GPBUtil::checkInt64($var); + $this->core_count = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/SetInstanceLabelsRequest.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/SetInstanceLabelsRequest.php new file mode 100644 index 000000000000..1b05aa04ab3c --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/SetInstanceLabelsRequest.php @@ -0,0 +1,109 @@ +google.cloud.notebooks.v1.SetInstanceLabelsRequest + */ +class SetInstanceLabelsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * Labels to apply to this instance. + * These can be later modified by the setLabels method + * + * Generated from protobuf field map labels = 2; + */ + private $labels; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * @type array|\Google\Protobuf\Internal\MapField $labels + * Labels to apply to this instance. + * These can be later modified by the setLabels method + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Labels to apply to this instance. + * These can be later modified by the setLabels method + * + * Generated from protobuf field map labels = 2; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Labels to apply to this instance. + * These can be later modified by the setLabels method + * + * Generated from protobuf field map labels = 2; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/SetInstanceMachineTypeRequest.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/SetInstanceMachineTypeRequest.php new file mode 100644 index 000000000000..0046af14c896 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/SetInstanceMachineTypeRequest.php @@ -0,0 +1,109 @@ +google.cloud.notebooks.v1.SetInstanceMachineTypeRequest + */ +class SetInstanceMachineTypeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * Required. The [Compute Engine machine + * type](https://cloud.google.com/compute/docs/machine-types). + * + * Generated from protobuf field string machine_type = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $machine_type = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * @type string $machine_type + * Required. The [Compute Engine machine + * type](https://cloud.google.com/compute/docs/machine-types). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. The [Compute Engine machine + * type](https://cloud.google.com/compute/docs/machine-types). + * + * Generated from protobuf field string machine_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getMachineType() + { + return $this->machine_type; + } + + /** + * Required. The [Compute Engine machine + * type](https://cloud.google.com/compute/docs/machine-types). + * + * Generated from protobuf field string machine_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setMachineType($var) + { + GPBUtil::checkString($var, True); + $this->machine_type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/StartInstanceRequest.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/StartInstanceRequest.php new file mode 100644 index 000000000000..fd0251b536cd --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/StartInstanceRequest.php @@ -0,0 +1,71 @@ +google.cloud.notebooks.v1.StartInstanceRequest + */ +class StartInstanceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/StartRuntimeRequest.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/StartRuntimeRequest.php new file mode 100644 index 000000000000..da0fff0d9c0f --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/StartRuntimeRequest.php @@ -0,0 +1,119 @@ +google.cloud.notebooks.v1.StartRuntimeRequest + */ +class StartRuntimeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * Idempotent request UUID. + * + * Generated from protobuf field string request_id = 2; + */ + protected $request_id = ''; + + /** + * @param string $name Required. Format: + * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` + * + * @return \Google\Cloud\Notebooks\V1\StartRuntimeRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Format: + * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` + * @type string $request_id + * Idempotent request UUID. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V1\ManagedService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Idempotent request UUID. + * + * Generated from protobuf field string request_id = 2; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Idempotent request UUID. + * + * Generated from protobuf field string request_id = 2; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/StopInstanceRequest.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/StopInstanceRequest.php new file mode 100644 index 000000000000..8ece20d7764e --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/StopInstanceRequest.php @@ -0,0 +1,71 @@ +google.cloud.notebooks.v1.StopInstanceRequest + */ +class StopInstanceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/StopRuntimeRequest.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/StopRuntimeRequest.php new file mode 100644 index 000000000000..9214951474e6 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/StopRuntimeRequest.php @@ -0,0 +1,119 @@ +google.cloud.notebooks.v1.StopRuntimeRequest + */ +class StopRuntimeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * Idempotent request UUID. + * + * Generated from protobuf field string request_id = 2; + */ + protected $request_id = ''; + + /** + * @param string $name Required. Format: + * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` + * + * @return \Google\Cloud\Notebooks\V1\StopRuntimeRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Format: + * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` + * @type string $request_id + * Idempotent request UUID. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V1\ManagedService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Idempotent request UUID. + * + * Generated from protobuf field string request_id = 2; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Idempotent request UUID. + * + * Generated from protobuf field string request_id = 2; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/SwitchRuntimeRequest.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/SwitchRuntimeRequest.php new file mode 100644 index 000000000000..7b9edc1008cc --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/SwitchRuntimeRequest.php @@ -0,0 +1,197 @@ +google.cloud.notebooks.v1.SwitchRuntimeRequest + */ +class SwitchRuntimeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * machine type. + * + * Generated from protobuf field string machine_type = 2; + */ + protected $machine_type = ''; + /** + * accelerator config. + * + * Generated from protobuf field .google.cloud.notebooks.v1.RuntimeAcceleratorConfig accelerator_config = 3; + */ + protected $accelerator_config = null; + /** + * Idempotent request UUID. + * + * Generated from protobuf field string request_id = 4; + */ + protected $request_id = ''; + + /** + * @param string $name Required. Format: + * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` + * + * @return \Google\Cloud\Notebooks\V1\SwitchRuntimeRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Format: + * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` + * @type string $machine_type + * machine type. + * @type \Google\Cloud\Notebooks\V1\RuntimeAcceleratorConfig $accelerator_config + * accelerator config. + * @type string $request_id + * Idempotent request UUID. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V1\ManagedService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * machine type. + * + * Generated from protobuf field string machine_type = 2; + * @return string + */ + public function getMachineType() + { + return $this->machine_type; + } + + /** + * machine type. + * + * Generated from protobuf field string machine_type = 2; + * @param string $var + * @return $this + */ + public function setMachineType($var) + { + GPBUtil::checkString($var, True); + $this->machine_type = $var; + + return $this; + } + + /** + * accelerator config. + * + * Generated from protobuf field .google.cloud.notebooks.v1.RuntimeAcceleratorConfig accelerator_config = 3; + * @return \Google\Cloud\Notebooks\V1\RuntimeAcceleratorConfig|null + */ + public function getAcceleratorConfig() + { + return $this->accelerator_config; + } + + public function hasAcceleratorConfig() + { + return isset($this->accelerator_config); + } + + public function clearAcceleratorConfig() + { + unset($this->accelerator_config); + } + + /** + * accelerator config. + * + * Generated from protobuf field .google.cloud.notebooks.v1.RuntimeAcceleratorConfig accelerator_config = 3; + * @param \Google\Cloud\Notebooks\V1\RuntimeAcceleratorConfig $var + * @return $this + */ + public function setAcceleratorConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V1\RuntimeAcceleratorConfig::class); + $this->accelerator_config = $var; + + return $this; + } + + /** + * Idempotent request UUID. + * + * Generated from protobuf field string request_id = 4; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Idempotent request UUID. + * + * Generated from protobuf field string request_id = 4; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/TriggerScheduleRequest.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/TriggerScheduleRequest.php new file mode 100644 index 000000000000..c3e6b514d541 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/TriggerScheduleRequest.php @@ -0,0 +1,71 @@ +google.cloud.notebooks.v1.TriggerScheduleRequest + */ +class TriggerScheduleRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Format: + * `parent=projects/{project_id}/locations/{location}/schedules/{schedule_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Format: + * `parent=projects/{project_id}/locations/{location}/schedules/{schedule_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. Format: + * `parent=projects/{project_id}/locations/{location}/schedules/{schedule_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Format: + * `parent=projects/{project_id}/locations/{location}/schedules/{schedule_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/UpdateInstanceConfigRequest.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/UpdateInstanceConfigRequest.php new file mode 100644 index 000000000000..2078a1ee9c1a --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/UpdateInstanceConfigRequest.php @@ -0,0 +1,115 @@ +google.cloud.notebooks.v1.UpdateInstanceConfigRequest + */ +class UpdateInstanceConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * The instance configurations to be updated. + * + * Generated from protobuf field .google.cloud.notebooks.v1.InstanceConfig config = 2; + */ + protected $config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * @type \Google\Cloud\Notebooks\V1\InstanceConfig $config + * The instance configurations to be updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The instance configurations to be updated. + * + * Generated from protobuf field .google.cloud.notebooks.v1.InstanceConfig config = 2; + * @return \Google\Cloud\Notebooks\V1\InstanceConfig|null + */ + public function getConfig() + { + return $this->config; + } + + public function hasConfig() + { + return isset($this->config); + } + + public function clearConfig() + { + unset($this->config); + } + + /** + * The instance configurations to be updated. + * + * Generated from protobuf field .google.cloud.notebooks.v1.InstanceConfig config = 2; + * @param \Google\Cloud\Notebooks\V1\InstanceConfig $var + * @return $this + */ + public function setConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V1\InstanceConfig::class); + $this->config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/UpdateInstanceMetadataItemsRequest.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/UpdateInstanceMetadataItemsRequest.php new file mode 100644 index 000000000000..397f1889d94f --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/UpdateInstanceMetadataItemsRequest.php @@ -0,0 +1,105 @@ +google.cloud.notebooks.v1.UpdateInstanceMetadataItemsRequest + */ +class UpdateInstanceMetadataItemsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * Metadata items to add/update for the instance. + * + * Generated from protobuf field map items = 2; + */ + private $items; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * @type array|\Google\Protobuf\Internal\MapField $items + * Metadata items to add/update for the instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Metadata items to add/update for the instance. + * + * Generated from protobuf field map items = 2; + * @return \Google\Protobuf\Internal\MapField + */ + public function getItems() + { + return $this->items; + } + + /** + * Metadata items to add/update for the instance. + * + * Generated from protobuf field map items = 2; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setItems($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->items = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/UpdateInstanceMetadataItemsResponse.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/UpdateInstanceMetadataItemsResponse.php new file mode 100644 index 000000000000..4ac62442669d --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/UpdateInstanceMetadataItemsResponse.php @@ -0,0 +1,67 @@ +google.cloud.notebooks.v1.UpdateInstanceMetadataItemsResponse + */ +class UpdateInstanceMetadataItemsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Map of items that were added/updated to/in the metadata. + * + * Generated from protobuf field map items = 1; + */ + private $items; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\MapField $items + * Map of items that were added/updated to/in the metadata. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Map of items that were added/updated to/in the metadata. + * + * Generated from protobuf field map items = 1; + * @return \Google\Protobuf\Internal\MapField + */ + public function getItems() + { + return $this->items; + } + + /** + * Map of items that were added/updated to/in the metadata. + * + * Generated from protobuf field map items = 1; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setItems($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->items = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/UpdateRuntimeRequest.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/UpdateRuntimeRequest.php new file mode 100644 index 000000000000..a91ad274204a --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/UpdateRuntimeRequest.php @@ -0,0 +1,268 @@ +google.cloud.notebooks.v1.UpdateRuntimeRequest + */ +class UpdateRuntimeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The Runtime to be updated. + * + * Generated from protobuf field .google.cloud.notebooks.v1.Runtime runtime = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $runtime = null; + /** + * Required. Specifies the path, relative to `Runtime`, of + * the field to update. For example, to change the software configuration + * kernels, the `update_mask` parameter would be + * specified as `software_config.kernels`, + * and the `PATCH` request body would specify the new value, as follows: + * { + * "software_config":{ + * "kernels": [{ + * 'repository': + * 'gcr.io/deeplearning-platform-release/pytorch-gpu', 'tag': + * 'latest' }], + * } + * } + * Currently, only the following fields can be updated: + * - `software_config.kernels` + * - `software_config.post_startup_script` + * - `software_config.custom_gpu_driver_path` + * - `software_config.idle_shutdown` + * - `software_config.idle_shutdown_timeout` + * - `software_config.disable_terminal` + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + /** + * Idempotent request UUID. + * + * Generated from protobuf field string request_id = 3; + */ + protected $request_id = ''; + + /** + * @param \Google\Cloud\Notebooks\V1\Runtime $runtime Required. The Runtime to be updated. + * @param \Google\Protobuf\FieldMask $updateMask Required. Specifies the path, relative to `Runtime`, of + * the field to update. For example, to change the software configuration + * kernels, the `update_mask` parameter would be + * specified as `software_config.kernels`, + * and the `PATCH` request body would specify the new value, as follows: + * + * { + * "software_config":{ + * "kernels": [{ + * 'repository': + * 'gcr.io/deeplearning-platform-release/pytorch-gpu', 'tag': + * 'latest' }], + * } + * } + * + * + * Currently, only the following fields can be updated: + * - `software_config.kernels` + * - `software_config.post_startup_script` + * - `software_config.custom_gpu_driver_path` + * - `software_config.idle_shutdown` + * - `software_config.idle_shutdown_timeout` + * - `software_config.disable_terminal` + * + * @return \Google\Cloud\Notebooks\V1\UpdateRuntimeRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Notebooks\V1\Runtime $runtime, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setRuntime($runtime) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Notebooks\V1\Runtime $runtime + * Required. The Runtime to be updated. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. Specifies the path, relative to `Runtime`, of + * the field to update. For example, to change the software configuration + * kernels, the `update_mask` parameter would be + * specified as `software_config.kernels`, + * and the `PATCH` request body would specify the new value, as follows: + * { + * "software_config":{ + * "kernels": [{ + * 'repository': + * 'gcr.io/deeplearning-platform-release/pytorch-gpu', 'tag': + * 'latest' }], + * } + * } + * Currently, only the following fields can be updated: + * - `software_config.kernels` + * - `software_config.post_startup_script` + * - `software_config.custom_gpu_driver_path` + * - `software_config.idle_shutdown` + * - `software_config.idle_shutdown_timeout` + * - `software_config.disable_terminal` + * @type string $request_id + * Idempotent request UUID. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V1\ManagedService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The Runtime to be updated. + * + * Generated from protobuf field .google.cloud.notebooks.v1.Runtime runtime = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Notebooks\V1\Runtime|null + */ + public function getRuntime() + { + return $this->runtime; + } + + public function hasRuntime() + { + return isset($this->runtime); + } + + public function clearRuntime() + { + unset($this->runtime); + } + + /** + * Required. The Runtime to be updated. + * + * Generated from protobuf field .google.cloud.notebooks.v1.Runtime runtime = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Notebooks\V1\Runtime $var + * @return $this + */ + public function setRuntime($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V1\Runtime::class); + $this->runtime = $var; + + return $this; + } + + /** + * Required. Specifies the path, relative to `Runtime`, of + * the field to update. For example, to change the software configuration + * kernels, the `update_mask` parameter would be + * specified as `software_config.kernels`, + * and the `PATCH` request body would specify the new value, as follows: + * { + * "software_config":{ + * "kernels": [{ + * 'repository': + * 'gcr.io/deeplearning-platform-release/pytorch-gpu', 'tag': + * 'latest' }], + * } + * } + * Currently, only the following fields can be updated: + * - `software_config.kernels` + * - `software_config.post_startup_script` + * - `software_config.custom_gpu_driver_path` + * - `software_config.idle_shutdown` + * - `software_config.idle_shutdown_timeout` + * - `software_config.disable_terminal` + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. Specifies the path, relative to `Runtime`, of + * the field to update. For example, to change the software configuration + * kernels, the `update_mask` parameter would be + * specified as `software_config.kernels`, + * and the `PATCH` request body would specify the new value, as follows: + * { + * "software_config":{ + * "kernels": [{ + * 'repository': + * 'gcr.io/deeplearning-platform-release/pytorch-gpu', 'tag': + * 'latest' }], + * } + * } + * Currently, only the following fields can be updated: + * - `software_config.kernels` + * - `software_config.post_startup_script` + * - `software_config.custom_gpu_driver_path` + * - `software_config.idle_shutdown` + * - `software_config.idle_shutdown_timeout` + * - `software_config.disable_terminal` + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Idempotent request UUID. + * + * Generated from protobuf field string request_id = 3; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Idempotent request UUID. + * + * Generated from protobuf field string request_id = 3; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/UpdateShieldedInstanceConfigRequest.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/UpdateShieldedInstanceConfigRequest.php new file mode 100644 index 000000000000..7c09308bcf3c --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/UpdateShieldedInstanceConfigRequest.php @@ -0,0 +1,116 @@ +google.cloud.notebooks.v1.UpdateShieldedInstanceConfigRequest + */ +class UpdateShieldedInstanceConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * ShieldedInstance configuration to be updated. + * + * Generated from protobuf field .google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig shielded_instance_config = 2; + */ + protected $shielded_instance_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * @type \Google\Cloud\Notebooks\V1\Instance\ShieldedInstanceConfig $shielded_instance_config + * ShieldedInstance configuration to be updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * ShieldedInstance configuration to be updated. + * + * Generated from protobuf field .google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig shielded_instance_config = 2; + * @return \Google\Cloud\Notebooks\V1\Instance\ShieldedInstanceConfig|null + */ + public function getShieldedInstanceConfig() + { + return $this->shielded_instance_config; + } + + public function hasShieldedInstanceConfig() + { + return isset($this->shielded_instance_config); + } + + public function clearShieldedInstanceConfig() + { + unset($this->shielded_instance_config); + } + + /** + * ShieldedInstance configuration to be updated. + * + * Generated from protobuf field .google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig shielded_instance_config = 2; + * @param \Google\Cloud\Notebooks\V1\Instance\ShieldedInstanceConfig $var + * @return $this + */ + public function setShieldedInstanceConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V1\Instance\ShieldedInstanceConfig::class); + $this->shielded_instance_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/UpgradeInstanceInternalRequest.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/UpgradeInstanceInternalRequest.php new file mode 100644 index 000000000000..583a3256c765 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/UpgradeInstanceInternalRequest.php @@ -0,0 +1,147 @@ +google.cloud.notebooks.v1.UpgradeInstanceInternalRequest + */ +class UpgradeInstanceInternalRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * Required. The VM hardware token for authenticating the VM. + * https://cloud.google.com/compute/docs/instances/verifying-instance-identity + * + * Generated from protobuf field string vm_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $vm_id = ''; + /** + * Optional. The optional UpgradeType. Setting this field will search for additional + * compute images to upgrade this instance. + * + * Generated from protobuf field .google.cloud.notebooks.v1.UpgradeType type = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $type = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * @type string $vm_id + * Required. The VM hardware token for authenticating the VM. + * https://cloud.google.com/compute/docs/instances/verifying-instance-identity + * @type int $type + * Optional. The optional UpgradeType. Setting this field will search for additional + * compute images to upgrade this instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. The VM hardware token for authenticating the VM. + * https://cloud.google.com/compute/docs/instances/verifying-instance-identity + * + * Generated from protobuf field string vm_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getVmId() + { + return $this->vm_id; + } + + /** + * Required. The VM hardware token for authenticating the VM. + * https://cloud.google.com/compute/docs/instances/verifying-instance-identity + * + * Generated from protobuf field string vm_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setVmId($var) + { + GPBUtil::checkString($var, True); + $this->vm_id = $var; + + return $this; + } + + /** + * Optional. The optional UpgradeType. Setting this field will search for additional + * compute images to upgrade this instance. + * + * Generated from protobuf field .google.cloud.notebooks.v1.UpgradeType type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Optional. The optional UpgradeType. Setting this field will search for additional + * compute images to upgrade this instance. + * + * Generated from protobuf field .google.cloud.notebooks.v1.UpgradeType type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Notebooks\V1\UpgradeType::class); + $this->type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/UpgradeInstanceRequest.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/UpgradeInstanceRequest.php new file mode 100644 index 000000000000..16e89def7081 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/UpgradeInstanceRequest.php @@ -0,0 +1,109 @@ +google.cloud.notebooks.v1.UpgradeInstanceRequest + */ +class UpgradeInstanceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * Optional. The optional UpgradeType. Setting this field will search for additional + * compute images to upgrade this instance. + * + * Generated from protobuf field .google.cloud.notebooks.v1.UpgradeType type = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $type = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * @type int $type + * Optional. The optional UpgradeType. Setting this field will search for additional + * compute images to upgrade this instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V1\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. The optional UpgradeType. Setting this field will search for additional + * compute images to upgrade this instance. + * + * Generated from protobuf field .google.cloud.notebooks.v1.UpgradeType type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Optional. The optional UpgradeType. Setting this field will search for additional + * compute images to upgrade this instance. + * + * Generated from protobuf field .google.cloud.notebooks.v1.UpgradeType type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Notebooks\V1\UpgradeType::class); + $this->type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/UpgradeRuntimeRequest.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/UpgradeRuntimeRequest.php new file mode 100644 index 000000000000..019158ec9b8d --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/UpgradeRuntimeRequest.php @@ -0,0 +1,121 @@ +google.cloud.notebooks.v1.UpgradeRuntimeRequest + */ +class UpgradeRuntimeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * Idempotent request UUID. + * + * Generated from protobuf field string request_id = 2; + */ + protected $request_id = ''; + + /** + * @param string $name Required. Format: + * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` + * + * @return \Google\Cloud\Notebooks\V1\UpgradeRuntimeRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Format: + * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` + * @type string $request_id + * Idempotent request UUID. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V1\ManagedService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Idempotent request UUID. + * + * Generated from protobuf field string request_id = 2; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Idempotent request UUID. + * + * Generated from protobuf field string request_id = 2; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/UpgradeType.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/UpgradeType.php new file mode 100644 index 000000000000..8026bbb702eb --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/UpgradeType.php @@ -0,0 +1,76 @@ +google.cloud.notebooks.v1.UpgradeType + */ +class UpgradeType +{ + /** + * Upgrade type is not specified. + * + * Generated from protobuf enum UPGRADE_TYPE_UNSPECIFIED = 0; + */ + const UPGRADE_TYPE_UNSPECIFIED = 0; + /** + * Upgrade ML framework. + * + * Generated from protobuf enum UPGRADE_FRAMEWORK = 1; + */ + const UPGRADE_FRAMEWORK = 1; + /** + * Upgrade Operating System. + * + * Generated from protobuf enum UPGRADE_OS = 2; + */ + const UPGRADE_OS = 2; + /** + * Upgrade CUDA. + * + * Generated from protobuf enum UPGRADE_CUDA = 3; + */ + const UPGRADE_CUDA = 3; + /** + * Upgrade All (OS, Framework and CUDA). + * + * Generated from protobuf enum UPGRADE_ALL = 4; + */ + const UPGRADE_ALL = 4; + + private static $valueToName = [ + self::UPGRADE_TYPE_UNSPECIFIED => 'UPGRADE_TYPE_UNSPECIFIED', + self::UPGRADE_FRAMEWORK => 'UPGRADE_FRAMEWORK', + self::UPGRADE_OS => 'UPGRADE_OS', + self::UPGRADE_CUDA => 'UPGRADE_CUDA', + self::UPGRADE_ALL => 'UPGRADE_ALL', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/VirtualMachine.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/VirtualMachine.php new file mode 100644 index 000000000000..7f76639f36dc --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/VirtualMachine.php @@ -0,0 +1,145 @@ +google.cloud.notebooks.v1.VirtualMachine + */ +class VirtualMachine extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The user-friendly name of the Managed Compute Engine instance. + * + * Generated from protobuf field string instance_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $instance_name = ''; + /** + * Output only. The unique identifier of the Managed Compute Engine instance. + * + * Generated from protobuf field string instance_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $instance_id = ''; + /** + * Virtual Machine configuration settings. + * + * Generated from protobuf field .google.cloud.notebooks.v1.VirtualMachineConfig virtual_machine_config = 3; + */ + protected $virtual_machine_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance_name + * Output only. The user-friendly name of the Managed Compute Engine instance. + * @type string $instance_id + * Output only. The unique identifier of the Managed Compute Engine instance. + * @type \Google\Cloud\Notebooks\V1\VirtualMachineConfig $virtual_machine_config + * Virtual Machine configuration settings. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V1\Runtime::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The user-friendly name of the Managed Compute Engine instance. + * + * Generated from protobuf field string instance_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getInstanceName() + { + return $this->instance_name; + } + + /** + * Output only. The user-friendly name of the Managed Compute Engine instance. + * + * Generated from protobuf field string instance_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setInstanceName($var) + { + GPBUtil::checkString($var, True); + $this->instance_name = $var; + + return $this; + } + + /** + * Output only. The unique identifier of the Managed Compute Engine instance. + * + * Generated from protobuf field string instance_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getInstanceId() + { + return $this->instance_id; + } + + /** + * Output only. The unique identifier of the Managed Compute Engine instance. + * + * Generated from protobuf field string instance_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setInstanceId($var) + { + GPBUtil::checkString($var, True); + $this->instance_id = $var; + + return $this; + } + + /** + * Virtual Machine configuration settings. + * + * Generated from protobuf field .google.cloud.notebooks.v1.VirtualMachineConfig virtual_machine_config = 3; + * @return \Google\Cloud\Notebooks\V1\VirtualMachineConfig|null + */ + public function getVirtualMachineConfig() + { + return $this->virtual_machine_config; + } + + public function hasVirtualMachineConfig() + { + return isset($this->virtual_machine_config); + } + + public function clearVirtualMachineConfig() + { + unset($this->virtual_machine_config); + } + + /** + * Virtual Machine configuration settings. + * + * Generated from protobuf field .google.cloud.notebooks.v1.VirtualMachineConfig virtual_machine_config = 3; + * @param \Google\Cloud\Notebooks\V1\VirtualMachineConfig $var + * @return $this + */ + public function setVirtualMachineConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V1\VirtualMachineConfig::class); + $this->virtual_machine_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/VirtualMachineConfig.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/VirtualMachineConfig.php new file mode 100644 index 000000000000..b4298431489c --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/VirtualMachineConfig.php @@ -0,0 +1,873 @@ +google.cloud.notebooks.v1.VirtualMachineConfig + */ +class VirtualMachineConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The zone where the virtual machine is located. + * If using regional request, the notebooks service will pick a location + * in the corresponding runtime region. + * On a get request, zone will always be present. Example: + * * `us-central1-b` + * + * Generated from protobuf field string zone = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $zone = ''; + /** + * Required. The Compute Engine machine type used for runtimes. + * Short name is valid. Examples: + * * `n1-standard-2` + * * `e2-standard-8` + * + * Generated from protobuf field string machine_type = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $machine_type = ''; + /** + * Optional. Use a list of container images to use as Kernels in the notebook instance. + * + * Generated from protobuf field repeated .google.cloud.notebooks.v1.ContainerImage container_images = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $container_images; + /** + * Required. Data disk option configuration settings. + * + * Generated from protobuf field .google.cloud.notebooks.v1.LocalDisk data_disk = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $data_disk = null; + /** + * Optional. Encryption settings for virtual machine data disk. + * + * Generated from protobuf field .google.cloud.notebooks.v1.EncryptionConfig encryption_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $encryption_config = null; + /** + * Optional. Shielded VM Instance configuration settings. + * + * Generated from protobuf field .google.cloud.notebooks.v1.RuntimeShieldedInstanceConfig shielded_instance_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $shielded_instance_config = null; + /** + * Optional. The Compute Engine accelerator configuration for this runtime. + * + * Generated from protobuf field .google.cloud.notebooks.v1.RuntimeAcceleratorConfig accelerator_config = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $accelerator_config = null; + /** + * Optional. The Compute Engine network to be used for machine + * communications. Cannot be specified with subnetwork. If neither + * `network` nor `subnet` is specified, the "default" network of + * the project is used, if it exists. + * A full URL or partial URI. Examples: + * * `https://www.googleapis.com/compute/v1/projects/[project_id]/global/networks/default` + * * `projects/[project_id]/global/networks/default` + * Runtimes are managed resources inside Google Infrastructure. + * Runtimes support the following network configurations: + * * Google Managed Network (Network & subnet are empty) + * * Consumer Project VPC (network & subnet are required). Requires + * configuring Private Service Access. + * * Shared VPC (network & subnet are required). Requires configuring Private + * Service Access. + * + * Generated from protobuf field string network = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $network = ''; + /** + * Optional. The Compute Engine subnetwork to be used for machine + * communications. Cannot be specified with network. + * A full URL or partial URI are valid. Examples: + * * `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/us-east1/subnetworks/sub0` + * * `projects/[project_id]/regions/us-east1/subnetworks/sub0` + * + * Generated from protobuf field string subnet = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $subnet = ''; + /** + * Optional. If true, runtime will only have internal IP + * addresses. By default, runtimes are not restricted to internal IP + * addresses, and will have ephemeral external IP addresses assigned to each + * vm. This `internal_ip_only` restriction can only be enabled for + * subnetwork enabled networks, and all dependencies must be + * configured to be accessible without external IP addresses. + * + * Generated from protobuf field bool internal_ip_only = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $internal_ip_only = false; + /** + * Optional. The Compute Engine tags to add to runtime (see [Tagging + * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)). + * + * Generated from protobuf field repeated string tags = 13 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $tags; + /** + * Output only. The Compute Engine guest attributes. (see + * [Project and instance + * guest + * attributes](https://cloud.google.com/compute/docs/storing-retrieving-metadata#guest_attributes)). + * + * Generated from protobuf field map guest_attributes = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $guest_attributes; + /** + * Optional. The Compute Engine metadata entries to add to virtual machine. (see + * [Project and instance + * metadata](https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)). + * + * Generated from protobuf field map metadata = 15 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $metadata; + /** + * Optional. The labels to associate with this runtime. + * Label **keys** must contain 1 to 63 characters, and must conform to + * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). + * Label **values** may be empty, but, if present, must contain 1 to 63 + * characters, and must conform to [RFC + * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be + * associated with a cluster. + * + * Generated from protobuf field map labels = 16 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Optional. The type of vNIC to be used on this interface. This may be gVNIC or + * VirtioNet. + * + * Generated from protobuf field .google.cloud.notebooks.v1.VirtualMachineConfig.NicType nic_type = 17 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $nic_type = 0; + /** + * Optional. Reserved IP Range name is used for VPC Peering. + * The subnetwork allocation will use the range *name* if it's assigned. + * Example: managed-notebooks-range-c + * PEERING_RANGE_NAME_3=managed-notebooks-range-c + * gcloud compute addresses create $PEERING_RANGE_NAME_3 \ + * --global \ + * --prefix-length=24 \ + * --description="Google Cloud Managed Notebooks Range 24 c" \ + * --network=$NETWORK \ + * --addresses=192.168.0.0 \ + * --purpose=VPC_PEERING + * Field value will be: `managed-notebooks-range-c` + * + * Generated from protobuf field string reserved_ip_range = 18 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $reserved_ip_range = ''; + /** + * Optional. Boot image metadata used for runtime upgradeability. + * + * Generated from protobuf field .google.cloud.notebooks.v1.VirtualMachineConfig.BootImage boot_image = 19 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $boot_image = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $zone + * Output only. The zone where the virtual machine is located. + * If using regional request, the notebooks service will pick a location + * in the corresponding runtime region. + * On a get request, zone will always be present. Example: + * * `us-central1-b` + * @type string $machine_type + * Required. The Compute Engine machine type used for runtimes. + * Short name is valid. Examples: + * * `n1-standard-2` + * * `e2-standard-8` + * @type array<\Google\Cloud\Notebooks\V1\ContainerImage>|\Google\Protobuf\Internal\RepeatedField $container_images + * Optional. Use a list of container images to use as Kernels in the notebook instance. + * @type \Google\Cloud\Notebooks\V1\LocalDisk $data_disk + * Required. Data disk option configuration settings. + * @type \Google\Cloud\Notebooks\V1\EncryptionConfig $encryption_config + * Optional. Encryption settings for virtual machine data disk. + * @type \Google\Cloud\Notebooks\V1\RuntimeShieldedInstanceConfig $shielded_instance_config + * Optional. Shielded VM Instance configuration settings. + * @type \Google\Cloud\Notebooks\V1\RuntimeAcceleratorConfig $accelerator_config + * Optional. The Compute Engine accelerator configuration for this runtime. + * @type string $network + * Optional. The Compute Engine network to be used for machine + * communications. Cannot be specified with subnetwork. If neither + * `network` nor `subnet` is specified, the "default" network of + * the project is used, if it exists. + * A full URL or partial URI. Examples: + * * `https://www.googleapis.com/compute/v1/projects/[project_id]/global/networks/default` + * * `projects/[project_id]/global/networks/default` + * Runtimes are managed resources inside Google Infrastructure. + * Runtimes support the following network configurations: + * * Google Managed Network (Network & subnet are empty) + * * Consumer Project VPC (network & subnet are required). Requires + * configuring Private Service Access. + * * Shared VPC (network & subnet are required). Requires configuring Private + * Service Access. + * @type string $subnet + * Optional. The Compute Engine subnetwork to be used for machine + * communications. Cannot be specified with network. + * A full URL or partial URI are valid. Examples: + * * `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/us-east1/subnetworks/sub0` + * * `projects/[project_id]/regions/us-east1/subnetworks/sub0` + * @type bool $internal_ip_only + * Optional. If true, runtime will only have internal IP + * addresses. By default, runtimes are not restricted to internal IP + * addresses, and will have ephemeral external IP addresses assigned to each + * vm. This `internal_ip_only` restriction can only be enabled for + * subnetwork enabled networks, and all dependencies must be + * configured to be accessible without external IP addresses. + * @type array|\Google\Protobuf\Internal\RepeatedField $tags + * Optional. The Compute Engine tags to add to runtime (see [Tagging + * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)). + * @type array|\Google\Protobuf\Internal\MapField $guest_attributes + * Output only. The Compute Engine guest attributes. (see + * [Project and instance + * guest + * attributes](https://cloud.google.com/compute/docs/storing-retrieving-metadata#guest_attributes)). + * @type array|\Google\Protobuf\Internal\MapField $metadata + * Optional. The Compute Engine metadata entries to add to virtual machine. (see + * [Project and instance + * metadata](https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)). + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. The labels to associate with this runtime. + * Label **keys** must contain 1 to 63 characters, and must conform to + * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). + * Label **values** may be empty, but, if present, must contain 1 to 63 + * characters, and must conform to [RFC + * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be + * associated with a cluster. + * @type int $nic_type + * Optional. The type of vNIC to be used on this interface. This may be gVNIC or + * VirtioNet. + * @type string $reserved_ip_range + * Optional. Reserved IP Range name is used for VPC Peering. + * The subnetwork allocation will use the range *name* if it's assigned. + * Example: managed-notebooks-range-c + * PEERING_RANGE_NAME_3=managed-notebooks-range-c + * gcloud compute addresses create $PEERING_RANGE_NAME_3 \ + * --global \ + * --prefix-length=24 \ + * --description="Google Cloud Managed Notebooks Range 24 c" \ + * --network=$NETWORK \ + * --addresses=192.168.0.0 \ + * --purpose=VPC_PEERING + * Field value will be: `managed-notebooks-range-c` + * @type \Google\Cloud\Notebooks\V1\VirtualMachineConfig\BootImage $boot_image + * Optional. Boot image metadata used for runtime upgradeability. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V1\Runtime::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The zone where the virtual machine is located. + * If using regional request, the notebooks service will pick a location + * in the corresponding runtime region. + * On a get request, zone will always be present. Example: + * * `us-central1-b` + * + * Generated from protobuf field string zone = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getZone() + { + return $this->zone; + } + + /** + * Output only. The zone where the virtual machine is located. + * If using regional request, the notebooks service will pick a location + * in the corresponding runtime region. + * On a get request, zone will always be present. Example: + * * `us-central1-b` + * + * Generated from protobuf field string zone = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setZone($var) + { + GPBUtil::checkString($var, True); + $this->zone = $var; + + return $this; + } + + /** + * Required. The Compute Engine machine type used for runtimes. + * Short name is valid. Examples: + * * `n1-standard-2` + * * `e2-standard-8` + * + * Generated from protobuf field string machine_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getMachineType() + { + return $this->machine_type; + } + + /** + * Required. The Compute Engine machine type used for runtimes. + * Short name is valid. Examples: + * * `n1-standard-2` + * * `e2-standard-8` + * + * Generated from protobuf field string machine_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setMachineType($var) + { + GPBUtil::checkString($var, True); + $this->machine_type = $var; + + return $this; + } + + /** + * Optional. Use a list of container images to use as Kernels in the notebook instance. + * + * Generated from protobuf field repeated .google.cloud.notebooks.v1.ContainerImage container_images = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getContainerImages() + { + return $this->container_images; + } + + /** + * Optional. Use a list of container images to use as Kernels in the notebook instance. + * + * Generated from protobuf field repeated .google.cloud.notebooks.v1.ContainerImage container_images = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\Notebooks\V1\ContainerImage>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setContainerImages($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Notebooks\V1\ContainerImage::class); + $this->container_images = $arr; + + return $this; + } + + /** + * Required. Data disk option configuration settings. + * + * Generated from protobuf field .google.cloud.notebooks.v1.LocalDisk data_disk = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Notebooks\V1\LocalDisk|null + */ + public function getDataDisk() + { + return $this->data_disk; + } + + public function hasDataDisk() + { + return isset($this->data_disk); + } + + public function clearDataDisk() + { + unset($this->data_disk); + } + + /** + * Required. Data disk option configuration settings. + * + * Generated from protobuf field .google.cloud.notebooks.v1.LocalDisk data_disk = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Notebooks\V1\LocalDisk $var + * @return $this + */ + public function setDataDisk($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V1\LocalDisk::class); + $this->data_disk = $var; + + return $this; + } + + /** + * Optional. Encryption settings for virtual machine data disk. + * + * Generated from protobuf field .google.cloud.notebooks.v1.EncryptionConfig encryption_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Notebooks\V1\EncryptionConfig|null + */ + public function getEncryptionConfig() + { + return $this->encryption_config; + } + + public function hasEncryptionConfig() + { + return isset($this->encryption_config); + } + + public function clearEncryptionConfig() + { + unset($this->encryption_config); + } + + /** + * Optional. Encryption settings for virtual machine data disk. + * + * Generated from protobuf field .google.cloud.notebooks.v1.EncryptionConfig encryption_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Notebooks\V1\EncryptionConfig $var + * @return $this + */ + public function setEncryptionConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V1\EncryptionConfig::class); + $this->encryption_config = $var; + + return $this; + } + + /** + * Optional. Shielded VM Instance configuration settings. + * + * Generated from protobuf field .google.cloud.notebooks.v1.RuntimeShieldedInstanceConfig shielded_instance_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Notebooks\V1\RuntimeShieldedInstanceConfig|null + */ + public function getShieldedInstanceConfig() + { + return $this->shielded_instance_config; + } + + public function hasShieldedInstanceConfig() + { + return isset($this->shielded_instance_config); + } + + public function clearShieldedInstanceConfig() + { + unset($this->shielded_instance_config); + } + + /** + * Optional. Shielded VM Instance configuration settings. + * + * Generated from protobuf field .google.cloud.notebooks.v1.RuntimeShieldedInstanceConfig shielded_instance_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Notebooks\V1\RuntimeShieldedInstanceConfig $var + * @return $this + */ + public function setShieldedInstanceConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V1\RuntimeShieldedInstanceConfig::class); + $this->shielded_instance_config = $var; + + return $this; + } + + /** + * Optional. The Compute Engine accelerator configuration for this runtime. + * + * Generated from protobuf field .google.cloud.notebooks.v1.RuntimeAcceleratorConfig accelerator_config = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Notebooks\V1\RuntimeAcceleratorConfig|null + */ + public function getAcceleratorConfig() + { + return $this->accelerator_config; + } + + public function hasAcceleratorConfig() + { + return isset($this->accelerator_config); + } + + public function clearAcceleratorConfig() + { + unset($this->accelerator_config); + } + + /** + * Optional. The Compute Engine accelerator configuration for this runtime. + * + * Generated from protobuf field .google.cloud.notebooks.v1.RuntimeAcceleratorConfig accelerator_config = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Notebooks\V1\RuntimeAcceleratorConfig $var + * @return $this + */ + public function setAcceleratorConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V1\RuntimeAcceleratorConfig::class); + $this->accelerator_config = $var; + + return $this; + } + + /** + * Optional. The Compute Engine network to be used for machine + * communications. Cannot be specified with subnetwork. If neither + * `network` nor `subnet` is specified, the "default" network of + * the project is used, if it exists. + * A full URL or partial URI. Examples: + * * `https://www.googleapis.com/compute/v1/projects/[project_id]/global/networks/default` + * * `projects/[project_id]/global/networks/default` + * Runtimes are managed resources inside Google Infrastructure. + * Runtimes support the following network configurations: + * * Google Managed Network (Network & subnet are empty) + * * Consumer Project VPC (network & subnet are required). Requires + * configuring Private Service Access. + * * Shared VPC (network & subnet are required). Requires configuring Private + * Service Access. + * + * Generated from protobuf field string network = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getNetwork() + { + return $this->network; + } + + /** + * Optional. The Compute Engine network to be used for machine + * communications. Cannot be specified with subnetwork. If neither + * `network` nor `subnet` is specified, the "default" network of + * the project is used, if it exists. + * A full URL or partial URI. Examples: + * * `https://www.googleapis.com/compute/v1/projects/[project_id]/global/networks/default` + * * `projects/[project_id]/global/networks/default` + * Runtimes are managed resources inside Google Infrastructure. + * Runtimes support the following network configurations: + * * Google Managed Network (Network & subnet are empty) + * * Consumer Project VPC (network & subnet are required). Requires + * configuring Private Service Access. + * * Shared VPC (network & subnet are required). Requires configuring Private + * Service Access. + * + * Generated from protobuf field string network = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setNetwork($var) + { + GPBUtil::checkString($var, True); + $this->network = $var; + + return $this; + } + + /** + * Optional. The Compute Engine subnetwork to be used for machine + * communications. Cannot be specified with network. + * A full URL or partial URI are valid. Examples: + * * `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/us-east1/subnetworks/sub0` + * * `projects/[project_id]/regions/us-east1/subnetworks/sub0` + * + * Generated from protobuf field string subnet = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getSubnet() + { + return $this->subnet; + } + + /** + * Optional. The Compute Engine subnetwork to be used for machine + * communications. Cannot be specified with network. + * A full URL or partial URI are valid. Examples: + * * `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/us-east1/subnetworks/sub0` + * * `projects/[project_id]/regions/us-east1/subnetworks/sub0` + * + * Generated from protobuf field string subnet = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setSubnet($var) + { + GPBUtil::checkString($var, True); + $this->subnet = $var; + + return $this; + } + + /** + * Optional. If true, runtime will only have internal IP + * addresses. By default, runtimes are not restricted to internal IP + * addresses, and will have ephemeral external IP addresses assigned to each + * vm. This `internal_ip_only` restriction can only be enabled for + * subnetwork enabled networks, and all dependencies must be + * configured to be accessible without external IP addresses. + * + * Generated from protobuf field bool internal_ip_only = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getInternalIpOnly() + { + return $this->internal_ip_only; + } + + /** + * Optional. If true, runtime will only have internal IP + * addresses. By default, runtimes are not restricted to internal IP + * addresses, and will have ephemeral external IP addresses assigned to each + * vm. This `internal_ip_only` restriction can only be enabled for + * subnetwork enabled networks, and all dependencies must be + * configured to be accessible without external IP addresses. + * + * Generated from protobuf field bool internal_ip_only = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setInternalIpOnly($var) + { + GPBUtil::checkBool($var); + $this->internal_ip_only = $var; + + return $this; + } + + /** + * Optional. The Compute Engine tags to add to runtime (see [Tagging + * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)). + * + * Generated from protobuf field repeated string tags = 13 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTags() + { + return $this->tags; + } + + /** + * Optional. The Compute Engine tags to add to runtime (see [Tagging + * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)). + * + * Generated from protobuf field repeated string tags = 13 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTags($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->tags = $arr; + + return $this; + } + + /** + * Output only. The Compute Engine guest attributes. (see + * [Project and instance + * guest + * attributes](https://cloud.google.com/compute/docs/storing-retrieving-metadata#guest_attributes)). + * + * Generated from protobuf field map guest_attributes = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getGuestAttributes() + { + return $this->guest_attributes; + } + + /** + * Output only. The Compute Engine guest attributes. (see + * [Project and instance + * guest + * attributes](https://cloud.google.com/compute/docs/storing-retrieving-metadata#guest_attributes)). + * + * Generated from protobuf field map guest_attributes = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setGuestAttributes($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->guest_attributes = $arr; + + return $this; + } + + /** + * Optional. The Compute Engine metadata entries to add to virtual machine. (see + * [Project and instance + * metadata](https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)). + * + * Generated from protobuf field map metadata = 15 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getMetadata() + { + return $this->metadata; + } + + /** + * Optional. The Compute Engine metadata entries to add to virtual machine. (see + * [Project and instance + * metadata](https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)). + * + * Generated from protobuf field map metadata = 15 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setMetadata($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->metadata = $arr; + + return $this; + } + + /** + * Optional. The labels to associate with this runtime. + * Label **keys** must contain 1 to 63 characters, and must conform to + * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). + * Label **values** may be empty, but, if present, must contain 1 to 63 + * characters, and must conform to [RFC + * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be + * associated with a cluster. + * + * Generated from protobuf field map labels = 16 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. The labels to associate with this runtime. + * Label **keys** must contain 1 to 63 characters, and must conform to + * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). + * Label **values** may be empty, but, if present, must contain 1 to 63 + * characters, and must conform to [RFC + * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be + * associated with a cluster. + * + * Generated from protobuf field map labels = 16 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Optional. The type of vNIC to be used on this interface. This may be gVNIC or + * VirtioNet. + * + * Generated from protobuf field .google.cloud.notebooks.v1.VirtualMachineConfig.NicType nic_type = 17 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getNicType() + { + return $this->nic_type; + } + + /** + * Optional. The type of vNIC to be used on this interface. This may be gVNIC or + * VirtioNet. + * + * Generated from protobuf field .google.cloud.notebooks.v1.VirtualMachineConfig.NicType nic_type = 17 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setNicType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Notebooks\V1\VirtualMachineConfig\NicType::class); + $this->nic_type = $var; + + return $this; + } + + /** + * Optional. Reserved IP Range name is used for VPC Peering. + * The subnetwork allocation will use the range *name* if it's assigned. + * Example: managed-notebooks-range-c + * PEERING_RANGE_NAME_3=managed-notebooks-range-c + * gcloud compute addresses create $PEERING_RANGE_NAME_3 \ + * --global \ + * --prefix-length=24 \ + * --description="Google Cloud Managed Notebooks Range 24 c" \ + * --network=$NETWORK \ + * --addresses=192.168.0.0 \ + * --purpose=VPC_PEERING + * Field value will be: `managed-notebooks-range-c` + * + * Generated from protobuf field string reserved_ip_range = 18 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getReservedIpRange() + { + return $this->reserved_ip_range; + } + + /** + * Optional. Reserved IP Range name is used for VPC Peering. + * The subnetwork allocation will use the range *name* if it's assigned. + * Example: managed-notebooks-range-c + * PEERING_RANGE_NAME_3=managed-notebooks-range-c + * gcloud compute addresses create $PEERING_RANGE_NAME_3 \ + * --global \ + * --prefix-length=24 \ + * --description="Google Cloud Managed Notebooks Range 24 c" \ + * --network=$NETWORK \ + * --addresses=192.168.0.0 \ + * --purpose=VPC_PEERING + * Field value will be: `managed-notebooks-range-c` + * + * Generated from protobuf field string reserved_ip_range = 18 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setReservedIpRange($var) + { + GPBUtil::checkString($var, True); + $this->reserved_ip_range = $var; + + return $this; + } + + /** + * Optional. Boot image metadata used for runtime upgradeability. + * + * Generated from protobuf field .google.cloud.notebooks.v1.VirtualMachineConfig.BootImage boot_image = 19 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Notebooks\V1\VirtualMachineConfig\BootImage|null + */ + public function getBootImage() + { + return $this->boot_image; + } + + public function hasBootImage() + { + return isset($this->boot_image); + } + + public function clearBootImage() + { + unset($this->boot_image); + } + + /** + * Optional. Boot image metadata used for runtime upgradeability. + * + * Generated from protobuf field .google.cloud.notebooks.v1.VirtualMachineConfig.BootImage boot_image = 19 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Notebooks\V1\VirtualMachineConfig\BootImage $var + * @return $this + */ + public function setBootImage($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V1\VirtualMachineConfig\BootImage::class); + $this->boot_image = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/VirtualMachineConfig/BootImage.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/VirtualMachineConfig/BootImage.php new file mode 100644 index 000000000000..62c028e84006 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/VirtualMachineConfig/BootImage.php @@ -0,0 +1,37 @@ +google.cloud.notebooks.v1.VirtualMachineConfig.BootImage + */ +class BootImage extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V1\Runtime::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(BootImage::class, \Google\Cloud\Notebooks\V1\VirtualMachineConfig_BootImage::class); + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/VirtualMachineConfig/NicType.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/VirtualMachineConfig/NicType.php new file mode 100644 index 000000000000..2432a9b28a55 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/VirtualMachineConfig/NicType.php @@ -0,0 +1,65 @@ +google.cloud.notebooks.v1.VirtualMachineConfig.NicType + */ +class NicType +{ + /** + * No type specified. + * + * Generated from protobuf enum UNSPECIFIED_NIC_TYPE = 0; + */ + const UNSPECIFIED_NIC_TYPE = 0; + /** + * VIRTIO + * + * Generated from protobuf enum VIRTIO_NET = 1; + */ + const VIRTIO_NET = 1; + /** + * GVNIC + * + * Generated from protobuf enum GVNIC = 2; + */ + const GVNIC = 2; + + private static $valueToName = [ + self::UNSPECIFIED_NIC_TYPE => 'UNSPECIFIED_NIC_TYPE', + self::VIRTIO_NET => 'VIRTIO_NET', + self::GVNIC => 'GVNIC', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(NicType::class, \Google\Cloud\Notebooks\V1\VirtualMachineConfig_NicType::class); + diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/VmImage.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/VmImage.php new file mode 100644 index 000000000000..e4c537d0a018 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/VmImage.php @@ -0,0 +1,150 @@ +google.cloud.notebooks.v1.VmImage + */ +class VmImage extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the Google Cloud project that this VM image belongs to. + * Format: `{project_id}` + * + * Generated from protobuf field string project = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $project = ''; + protected $image; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $project + * Required. The name of the Google Cloud project that this VM image belongs to. + * Format: `{project_id}` + * @type string $image_name + * Use VM image name to find the image. + * @type string $image_family + * Use this VM image family to find the image; the newest image in this + * family will be used. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V1\Environment::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the Google Cloud project that this VM image belongs to. + * Format: `{project_id}` + * + * Generated from protobuf field string project = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Required. The name of the Google Cloud project that this VM image belongs to. + * Format: `{project_id}` + * + * Generated from protobuf field string project = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Use VM image name to find the image. + * + * Generated from protobuf field string image_name = 2; + * @return string + */ + public function getImageName() + { + return $this->readOneof(2); + } + + public function hasImageName() + { + return $this->hasOneof(2); + } + + /** + * Use VM image name to find the image. + * + * Generated from protobuf field string image_name = 2; + * @param string $var + * @return $this + */ + public function setImageName($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Use this VM image family to find the image; the newest image in this + * family will be used. + * + * Generated from protobuf field string image_family = 3; + * @return string + */ + public function getImageFamily() + { + return $this->readOneof(3); + } + + public function hasImageFamily() + { + return $this->hasOneof(3); + } + + /** + * Use this VM image family to find the image; the newest image in this + * family will be used. + * + * Generated from protobuf field string image_family = 3; + * @param string $var + * @return $this + */ + public function setImageFamily($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * @return string + */ + public function getImage() + { + return $this->whichOneof("image"); + } + +} + diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/create_runtime.php b/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/create_runtime.php new file mode 100644 index 000000000000..642fc678aafc --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/create_runtime.php @@ -0,0 +1,93 @@ +setParent($formattedParent) + ->setRuntimeId($runtimeId) + ->setRuntime($runtime); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $managedNotebookServiceClient->createRuntime($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Runtime $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = ManagedNotebookServiceClient::runtimeName( + '[PROJECT]', + '[LOCATION]', + '[RUNTIME]' + ); + $runtimeId = '[RUNTIME_ID]'; + + create_runtime_sample($formattedParent, $runtimeId); +} +// [END notebooks_v1_generated_ManagedNotebookService_CreateRuntime_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/delete_runtime.php b/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/delete_runtime.php new file mode 100644 index 000000000000..d62ac63d47a9 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/delete_runtime.php @@ -0,0 +1,81 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $managedNotebookServiceClient->deleteRuntime($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ManagedNotebookServiceClient::runtimeName('[PROJECT]', '[LOCATION]', '[RUNTIME]'); + + delete_runtime_sample($formattedName); +} +// [END notebooks_v1_generated_ManagedNotebookService_DeleteRuntime_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/diagnose_runtime.php b/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/diagnose_runtime.php new file mode 100644 index 000000000000..b338b3ea5bfc --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/diagnose_runtime.php @@ -0,0 +1,102 @@ +setGcsBucket($diagnosticConfigGcsBucket); + $request = (new DiagnoseRuntimeRequest()) + ->setName($formattedName) + ->setDiagnosticConfig($diagnosticConfig); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $managedNotebookServiceClient->diagnoseRuntime($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Runtime $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ManagedNotebookServiceClient::runtimeName('[PROJECT]', '[LOCATION]', '[RUNTIME]'); + $diagnosticConfigGcsBucket = '[GCS_BUCKET]'; + + diagnose_runtime_sample($formattedName, $diagnosticConfigGcsBucket); +} +// [END notebooks_v1_generated_ManagedNotebookService_DiagnoseRuntime_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/get_iam_policy.php b/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/get_iam_policy.php new file mode 100644 index 000000000000..38dddd89e3dc --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/get_iam_policy.php @@ -0,0 +1,72 @@ +setResource($resource); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $managedNotebookServiceClient->getIamPolicy($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + + get_iam_policy_sample($resource); +} +// [END notebooks_v1_generated_ManagedNotebookService_GetIamPolicy_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/get_location.php b/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/get_location.php new file mode 100644 index 000000000000..1e354abd2ea3 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/get_location.php @@ -0,0 +1,57 @@ +getLocation($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END notebooks_v1_generated_ManagedNotebookService_GetLocation_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/get_runtime.php b/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/get_runtime.php new file mode 100644 index 000000000000..e36777b31947 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/get_runtime.php @@ -0,0 +1,73 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Runtime $response */ + $response = $managedNotebookServiceClient->getRuntime($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ManagedNotebookServiceClient::runtimeName('[PROJECT]', '[LOCATION]', '[RUNTIME]'); + + get_runtime_sample($formattedName); +} +// [END notebooks_v1_generated_ManagedNotebookService_GetRuntime_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/list_locations.php b/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/list_locations.php new file mode 100644 index 000000000000..74b6cff3ce49 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/list_locations.php @@ -0,0 +1,62 @@ +listLocations($request); + + /** @var Location $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END notebooks_v1_generated_ManagedNotebookService_ListLocations_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/list_runtimes.php b/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/list_runtimes.php new file mode 100644 index 000000000000..10e351405179 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/list_runtimes.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $managedNotebookServiceClient->listRuntimes($request); + + /** @var Runtime $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = ManagedNotebookServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + list_runtimes_sample($formattedParent); +} +// [END notebooks_v1_generated_ManagedNotebookService_ListRuntimes_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/refresh_runtime_token_internal.php b/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/refresh_runtime_token_internal.php new file mode 100644 index 000000000000..ca7cd48ef727 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/refresh_runtime_token_internal.php @@ -0,0 +1,77 @@ +setName($formattedName) + ->setVmId($vmId); + + // Call the API and handle any network failures. + try { + /** @var RefreshRuntimeTokenInternalResponse $response */ + $response = $managedNotebookServiceClient->refreshRuntimeTokenInternal($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ManagedNotebookServiceClient::runtimeName('[PROJECT]', '[LOCATION]', '[RUNTIME]'); + $vmId = '[VM_ID]'; + + refresh_runtime_token_internal_sample($formattedName, $vmId); +} +// [END notebooks_v1_generated_ManagedNotebookService_RefreshRuntimeTokenInternal_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/report_runtime_event.php b/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/report_runtime_event.php new file mode 100644 index 000000000000..765a729e9cab --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/report_runtime_event.php @@ -0,0 +1,91 @@ +setName($formattedName) + ->setVmId($vmId) + ->setEvent($event); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $managedNotebookServiceClient->reportRuntimeEvent($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Runtime $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ManagedNotebookServiceClient::runtimeName('[PROJECT]', '[LOCATION]', '[RUNTIME]'); + $vmId = '[VM_ID]'; + + report_runtime_event_sample($formattedName, $vmId); +} +// [END notebooks_v1_generated_ManagedNotebookService_ReportRuntimeEvent_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/reset_runtime.php b/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/reset_runtime.php new file mode 100644 index 000000000000..22cee58f6125 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/reset_runtime.php @@ -0,0 +1,83 @@ +setName($name); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $managedNotebookServiceClient->resetRuntime($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Runtime $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $name = '[NAME]'; + + reset_runtime_sample($name); +} +// [END notebooks_v1_generated_ManagedNotebookService_ResetRuntime_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/set_iam_policy.php b/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/set_iam_policy.php new file mode 100644 index 000000000000..ad98f14f8624 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/set_iam_policy.php @@ -0,0 +1,77 @@ +setResource($resource) + ->setPolicy($policy); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $managedNotebookServiceClient->setIamPolicy($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + + set_iam_policy_sample($resource); +} +// [END notebooks_v1_generated_ManagedNotebookService_SetIamPolicy_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/start_runtime.php b/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/start_runtime.php new file mode 100644 index 000000000000..06af3072b902 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/start_runtime.php @@ -0,0 +1,87 @@ +setName($name); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $managedNotebookServiceClient->startRuntime($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Runtime $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $name = '[NAME]'; + + start_runtime_sample($name); +} +// [END notebooks_v1_generated_ManagedNotebookService_StartRuntime_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/stop_runtime.php b/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/stop_runtime.php new file mode 100644 index 000000000000..8f4abc6986f4 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/stop_runtime.php @@ -0,0 +1,87 @@ +setName($name); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $managedNotebookServiceClient->stopRuntime($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Runtime $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $name = '[NAME]'; + + stop_runtime_sample($name); +} +// [END notebooks_v1_generated_ManagedNotebookService_StopRuntime_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/switch_runtime.php b/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/switch_runtime.php new file mode 100644 index 000000000000..0e62a84c02ab --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/switch_runtime.php @@ -0,0 +1,83 @@ +setName($name); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $managedNotebookServiceClient->switchRuntime($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Runtime $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $name = '[NAME]'; + + switch_runtime_sample($name); +} +// [END notebooks_v1_generated_ManagedNotebookService_SwitchRuntime_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/test_iam_permissions.php b/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/test_iam_permissions.php new file mode 100644 index 000000000000..3ec39b091919 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/test_iam_permissions.php @@ -0,0 +1,84 @@ +setResource($resource) + ->setPermissions($permissions); + + // Call the API and handle any network failures. + try { + /** @var TestIamPermissionsResponse $response */ + $response = $managedNotebookServiceClient->testIamPermissions($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + $permissionsElement = '[PERMISSIONS]'; + + test_iam_permissions_sample($resource, $permissionsElement); +} +// [END notebooks_v1_generated_ManagedNotebookService_TestIamPermissions_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/update_runtime.php b/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/update_runtime.php new file mode 100644 index 000000000000..9b433e65ba4f --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/update_runtime.php @@ -0,0 +1,74 @@ +setRuntime($runtime) + ->setUpdateMask($updateMask); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $managedNotebookServiceClient->updateRuntime($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Runtime $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END notebooks_v1_generated_ManagedNotebookService_UpdateRuntime_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/upgrade_runtime.php b/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/upgrade_runtime.php new file mode 100644 index 000000000000..1c21ed1eb5ed --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/upgrade_runtime.php @@ -0,0 +1,83 @@ +setName($name); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $managedNotebookServiceClient->upgradeRuntime($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Runtime $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $name = '[NAME]'; + + upgrade_runtime_sample($name); +} +// [END notebooks_v1_generated_ManagedNotebookService_UpgradeRuntime_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/create_environment.php b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/create_environment.php new file mode 100644 index 000000000000..ac86d6b739fe --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/create_environment.php @@ -0,0 +1,90 @@ +setParent($parent) + ->setEnvironmentId($environmentId) + ->setEnvironment($environment); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $notebookServiceClient->createEnvironment($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Environment $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $parent = '[PARENT]'; + $environmentId = '[ENVIRONMENT_ID]'; + + create_environment_sample($parent, $environmentId); +} +// [END notebooks_v1_generated_NotebookService_CreateEnvironment_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/create_execution.php b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/create_execution.php new file mode 100644 index 000000000000..6c4e2bee3f8d --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/create_execution.php @@ -0,0 +1,89 @@ +setParent($formattedParent) + ->setExecutionId($executionId) + ->setExecution($execution); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $notebookServiceClient->createExecution($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Execution $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = NotebookServiceClient::executionName('[PROJECT]', '[LOCATION]', '[EXECUTION]'); + $executionId = '[EXECUTION_ID]'; + + create_execution_sample($formattedParent, $executionId); +} +// [END notebooks_v1_generated_NotebookService_CreateExecution_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/create_instance.php b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/create_instance.php new file mode 100644 index 000000000000..c9e2140dd10e --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/create_instance.php @@ -0,0 +1,96 @@ +setMachineType($instanceMachineType); + $request = (new CreateInstanceRequest()) + ->setParent($parent) + ->setInstanceId($instanceId) + ->setInstance($instance); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $notebookServiceClient->createInstance($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Instance $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $parent = '[PARENT]'; + $instanceId = '[INSTANCE_ID]'; + $instanceMachineType = '[MACHINE_TYPE]'; + + create_instance_sample($parent, $instanceId, $instanceMachineType); +} +// [END notebooks_v1_generated_NotebookService_CreateInstance_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/create_schedule.php b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/create_schedule.php new file mode 100644 index 000000000000..37761fb78a10 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/create_schedule.php @@ -0,0 +1,89 @@ +setParent($formattedParent) + ->setScheduleId($scheduleId) + ->setSchedule($schedule); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $notebookServiceClient->createSchedule($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Schedule $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = NotebookServiceClient::scheduleName('[PROJECT]', '[LOCATION]', '[SCHEDULE]'); + $scheduleId = '[SCHEDULE_ID]'; + + create_schedule_sample($formattedParent, $scheduleId); +} +// [END notebooks_v1_generated_NotebookService_CreateSchedule_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/delete_environment.php b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/delete_environment.php new file mode 100644 index 000000000000..1fc2066499ad --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/delete_environment.php @@ -0,0 +1,80 @@ +setName($name); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $notebookServiceClient->deleteEnvironment($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $name = '[NAME]'; + + delete_environment_sample($name); +} +// [END notebooks_v1_generated_NotebookService_DeleteEnvironment_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/delete_execution.php b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/delete_execution.php new file mode 100644 index 000000000000..ea779350e05a --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/delete_execution.php @@ -0,0 +1,81 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $notebookServiceClient->deleteExecution($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NotebookServiceClient::executionName('[PROJECT]', '[LOCATION]', '[EXECUTION]'); + + delete_execution_sample($formattedName); +} +// [END notebooks_v1_generated_NotebookService_DeleteExecution_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/delete_instance.php b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/delete_instance.php new file mode 100644 index 000000000000..4ef4fd614520 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/delete_instance.php @@ -0,0 +1,80 @@ +setName($name); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $notebookServiceClient->deleteInstance($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $name = '[NAME]'; + + delete_instance_sample($name); +} +// [END notebooks_v1_generated_NotebookService_DeleteInstance_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/delete_schedule.php b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/delete_schedule.php new file mode 100644 index 000000000000..062f8d2c50d1 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/delete_schedule.php @@ -0,0 +1,81 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $notebookServiceClient->deleteSchedule($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NotebookServiceClient::scheduleName('[PROJECT]', '[LOCATION]', '[SCHEDULE]'); + + delete_schedule_sample($formattedName); +} +// [END notebooks_v1_generated_NotebookService_DeleteSchedule_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/diagnose_instance.php b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/diagnose_instance.php new file mode 100644 index 000000000000..2c39ba54b887 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/diagnose_instance.php @@ -0,0 +1,102 @@ +setGcsBucket($diagnosticConfigGcsBucket); + $request = (new DiagnoseInstanceRequest()) + ->setName($formattedName) + ->setDiagnosticConfig($diagnosticConfig); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $notebookServiceClient->diagnoseInstance($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Instance $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NotebookServiceClient::instanceName('[PROJECT]', '[INSTANCE]'); + $diagnosticConfigGcsBucket = '[GCS_BUCKET]'; + + diagnose_instance_sample($formattedName, $diagnosticConfigGcsBucket); +} +// [END notebooks_v1_generated_NotebookService_DiagnoseInstance_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/get_environment.php b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/get_environment.php new file mode 100644 index 000000000000..2dcb4f290792 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/get_environment.php @@ -0,0 +1,71 @@ +setName($name); + + // Call the API and handle any network failures. + try { + /** @var Environment $response */ + $response = $notebookServiceClient->getEnvironment($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $name = '[NAME]'; + + get_environment_sample($name); +} +// [END notebooks_v1_generated_NotebookService_GetEnvironment_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/get_execution.php b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/get_execution.php new file mode 100644 index 000000000000..530197452485 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/get_execution.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Execution $response */ + $response = $notebookServiceClient->getExecution($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NotebookServiceClient::executionName('[PROJECT]', '[LOCATION]', '[EXECUTION]'); + + get_execution_sample($formattedName); +} +// [END notebooks_v1_generated_NotebookService_GetExecution_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/get_iam_policy.php b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/get_iam_policy.php new file mode 100644 index 000000000000..72778be43a7a --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/get_iam_policy.php @@ -0,0 +1,72 @@ +setResource($resource); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $notebookServiceClient->getIamPolicy($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + + get_iam_policy_sample($resource); +} +// [END notebooks_v1_generated_NotebookService_GetIamPolicy_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/get_instance.php b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/get_instance.php new file mode 100644 index 000000000000..bdb38a65ae5d --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/get_instance.php @@ -0,0 +1,71 @@ +setName($name); + + // Call the API and handle any network failures. + try { + /** @var Instance $response */ + $response = $notebookServiceClient->getInstance($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $name = '[NAME]'; + + get_instance_sample($name); +} +// [END notebooks_v1_generated_NotebookService_GetInstance_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/get_instance_health.php b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/get_instance_health.php new file mode 100644 index 000000000000..7be999230850 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/get_instance_health.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var GetInstanceHealthResponse $response */ + $response = $notebookServiceClient->getInstanceHealth($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NotebookServiceClient::instanceName('[PROJECT]', '[INSTANCE]'); + + get_instance_health_sample($formattedName); +} +// [END notebooks_v1_generated_NotebookService_GetInstanceHealth_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/get_location.php b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/get_location.php new file mode 100644 index 000000000000..3433764feacd --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/get_location.php @@ -0,0 +1,57 @@ +getLocation($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END notebooks_v1_generated_NotebookService_GetLocation_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/get_schedule.php b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/get_schedule.php new file mode 100644 index 000000000000..17eb5a7d25e6 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/get_schedule.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Schedule $response */ + $response = $notebookServiceClient->getSchedule($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NotebookServiceClient::scheduleName('[PROJECT]', '[LOCATION]', '[SCHEDULE]'); + + get_schedule_sample($formattedName); +} +// [END notebooks_v1_generated_NotebookService_GetSchedule_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/is_instance_upgradeable.php b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/is_instance_upgradeable.php new file mode 100644 index 000000000000..2e79b7cecc80 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/is_instance_upgradeable.php @@ -0,0 +1,71 @@ +setNotebookInstance($notebookInstance); + + // Call the API and handle any network failures. + try { + /** @var IsInstanceUpgradeableResponse $response */ + $response = $notebookServiceClient->isInstanceUpgradeable($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $notebookInstance = '[NOTEBOOK_INSTANCE]'; + + is_instance_upgradeable_sample($notebookInstance); +} +// [END notebooks_v1_generated_NotebookService_IsInstanceUpgradeable_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/list_environments.php b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/list_environments.php new file mode 100644 index 000000000000..cc1ae0077a60 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/list_environments.php @@ -0,0 +1,75 @@ +setParent($parent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $notebookServiceClient->listEnvironments($request); + + /** @var Environment $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $parent = '[PARENT]'; + + list_environments_sample($parent); +} +// [END notebooks_v1_generated_NotebookService_ListEnvironments_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/list_executions.php b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/list_executions.php new file mode 100644 index 000000000000..2bb356b00a36 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/list_executions.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $notebookServiceClient->listExecutions($request); + + /** @var Execution $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = NotebookServiceClient::executionName('[PROJECT]', '[LOCATION]', '[EXECUTION]'); + + list_executions_sample($formattedParent); +} +// [END notebooks_v1_generated_NotebookService_ListExecutions_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/list_instances.php b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/list_instances.php new file mode 100644 index 000000000000..fd7f377060da --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/list_instances.php @@ -0,0 +1,76 @@ +setParent($parent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $notebookServiceClient->listInstances($request); + + /** @var Instance $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $parent = '[PARENT]'; + + list_instances_sample($parent); +} +// [END notebooks_v1_generated_NotebookService_ListInstances_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/list_locations.php b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/list_locations.php new file mode 100644 index 000000000000..ccaff781f693 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/list_locations.php @@ -0,0 +1,62 @@ +listLocations($request); + + /** @var Location $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END notebooks_v1_generated_NotebookService_ListLocations_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/list_schedules.php b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/list_schedules.php new file mode 100644 index 000000000000..e485b4414bb5 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/list_schedules.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $notebookServiceClient->listSchedules($request); + + /** @var Schedule $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = NotebookServiceClient::scheduleName('[PROJECT]', '[LOCATION]', '[SCHEDULE]'); + + list_schedules_sample($formattedParent); +} +// [END notebooks_v1_generated_NotebookService_ListSchedules_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/register_instance.php b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/register_instance.php new file mode 100644 index 000000000000..098a73ba6239 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/register_instance.php @@ -0,0 +1,92 @@ +setParent($parent) + ->setInstanceId($instanceId); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $notebookServiceClient->registerInstance($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Instance $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $parent = '[PARENT]'; + $instanceId = '[INSTANCE_ID]'; + + register_instance_sample($parent, $instanceId); +} +// [END notebooks_v1_generated_NotebookService_RegisterInstance_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/report_instance_info.php b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/report_instance_info.php new file mode 100644 index 000000000000..05521ca4c846 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/report_instance_info.php @@ -0,0 +1,90 @@ +setName($name) + ->setVmId($vmId); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $notebookServiceClient->reportInstanceInfo($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Instance $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $name = '[NAME]'; + $vmId = '[VM_ID]'; + + report_instance_info_sample($name, $vmId); +} +// [END notebooks_v1_generated_NotebookService_ReportInstanceInfo_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/reset_instance.php b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/reset_instance.php new file mode 100644 index 000000000000..c9c78a21a778 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/reset_instance.php @@ -0,0 +1,83 @@ +setName($name); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $notebookServiceClient->resetInstance($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Instance $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $name = '[NAME]'; + + reset_instance_sample($name); +} +// [END notebooks_v1_generated_NotebookService_ResetInstance_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/rollback_instance.php b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/rollback_instance.php new file mode 100644 index 000000000000..460edee8f928 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/rollback_instance.php @@ -0,0 +1,87 @@ +setName($name) + ->setTargetSnapshot($targetSnapshot); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $notebookServiceClient->rollbackInstance($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Instance $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $name = '[NAME]'; + $targetSnapshot = '[TARGET_SNAPSHOT]'; + + rollback_instance_sample($name, $targetSnapshot); +} +// [END notebooks_v1_generated_NotebookService_RollbackInstance_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/set_iam_policy.php b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/set_iam_policy.php new file mode 100644 index 000000000000..71b8e6f06e9d --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/set_iam_policy.php @@ -0,0 +1,77 @@ +setResource($resource) + ->setPolicy($policy); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $notebookServiceClient->setIamPolicy($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + + set_iam_policy_sample($resource); +} +// [END notebooks_v1_generated_NotebookService_SetIamPolicy_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/set_instance_accelerator.php b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/set_instance_accelerator.php new file mode 100644 index 000000000000..9eb8d490098b --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/set_instance_accelerator.php @@ -0,0 +1,93 @@ +setName($name) + ->setType($type) + ->setCoreCount($coreCount); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $notebookServiceClient->setInstanceAccelerator($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Instance $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $name = '[NAME]'; + $type = AcceleratorType::ACCELERATOR_TYPE_UNSPECIFIED; + $coreCount = 0; + + set_instance_accelerator_sample($name, $type, $coreCount); +} +// [END notebooks_v1_generated_NotebookService_SetInstanceAccelerator_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/set_instance_labels.php b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/set_instance_labels.php new file mode 100644 index 000000000000..4f0e0b7403f6 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/set_instance_labels.php @@ -0,0 +1,83 @@ +setName($name); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $notebookServiceClient->setInstanceLabels($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Instance $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $name = '[NAME]'; + + set_instance_labels_sample($name); +} +// [END notebooks_v1_generated_NotebookService_SetInstanceLabels_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/set_instance_machine_type.php b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/set_instance_machine_type.php new file mode 100644 index 000000000000..3de79607e2f9 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/set_instance_machine_type.php @@ -0,0 +1,87 @@ +setName($name) + ->setMachineType($machineType); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $notebookServiceClient->setInstanceMachineType($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Instance $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $name = '[NAME]'; + $machineType = '[MACHINE_TYPE]'; + + set_instance_machine_type_sample($name, $machineType); +} +// [END notebooks_v1_generated_NotebookService_SetInstanceMachineType_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/start_instance.php b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/start_instance.php new file mode 100644 index 000000000000..18326baad0b9 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/start_instance.php @@ -0,0 +1,83 @@ +setName($name); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $notebookServiceClient->startInstance($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Instance $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $name = '[NAME]'; + + start_instance_sample($name); +} +// [END notebooks_v1_generated_NotebookService_StartInstance_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/stop_instance.php b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/stop_instance.php new file mode 100644 index 000000000000..e8925768f320 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/stop_instance.php @@ -0,0 +1,83 @@ +setName($name); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $notebookServiceClient->stopInstance($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Instance $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $name = '[NAME]'; + + stop_instance_sample($name); +} +// [END notebooks_v1_generated_NotebookService_StopInstance_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/test_iam_permissions.php b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/test_iam_permissions.php new file mode 100644 index 000000000000..1013e1a0b04f --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/test_iam_permissions.php @@ -0,0 +1,84 @@ +setResource($resource) + ->setPermissions($permissions); + + // Call the API and handle any network failures. + try { + /** @var TestIamPermissionsResponse $response */ + $response = $notebookServiceClient->testIamPermissions($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + $permissionsElement = '[PERMISSIONS]'; + + test_iam_permissions_sample($resource, $permissionsElement); +} +// [END notebooks_v1_generated_NotebookService_TestIamPermissions_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/trigger_schedule.php b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/trigger_schedule.php new file mode 100644 index 000000000000..0cdcf946344e --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/trigger_schedule.php @@ -0,0 +1,84 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $notebookServiceClient->triggerSchedule($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Schedule $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NotebookServiceClient::scheduleName('[PROJECT]', '[LOCATION]', '[SCHEDULE]'); + + trigger_schedule_sample($formattedName); +} +// [END notebooks_v1_generated_NotebookService_TriggerSchedule_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/update_instance_config.php b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/update_instance_config.php new file mode 100644 index 000000000000..36a2aea7adea --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/update_instance_config.php @@ -0,0 +1,83 @@ +setName($name); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $notebookServiceClient->updateInstanceConfig($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Instance $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $name = '[NAME]'; + + update_instance_config_sample($name); +} +// [END notebooks_v1_generated_NotebookService_UpdateInstanceConfig_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/update_instance_metadata_items.php b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/update_instance_metadata_items.php new file mode 100644 index 000000000000..f772bc909edf --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/update_instance_metadata_items.php @@ -0,0 +1,71 @@ +setName($name); + + // Call the API and handle any network failures. + try { + /** @var UpdateInstanceMetadataItemsResponse $response */ + $response = $notebookServiceClient->updateInstanceMetadataItems($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $name = '[NAME]'; + + update_instance_metadata_items_sample($name); +} +// [END notebooks_v1_generated_NotebookService_UpdateInstanceMetadataItems_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/update_shielded_instance_config.php b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/update_shielded_instance_config.php new file mode 100644 index 000000000000..5be3ea2bb035 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/update_shielded_instance_config.php @@ -0,0 +1,83 @@ +setName($name); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $notebookServiceClient->updateShieldedInstanceConfig($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Instance $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $name = '[NAME]'; + + update_shielded_instance_config_sample($name); +} +// [END notebooks_v1_generated_NotebookService_UpdateShieldedInstanceConfig_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/upgrade_instance.php b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/upgrade_instance.php new file mode 100644 index 000000000000..7b459065e2f3 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/upgrade_instance.php @@ -0,0 +1,83 @@ +setName($name); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $notebookServiceClient->upgradeInstance($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Instance $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $name = '[NAME]'; + + upgrade_instance_sample($name); +} +// [END notebooks_v1_generated_NotebookService_UpgradeInstance_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/upgrade_instance_internal.php b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/upgrade_instance_internal.php new file mode 100644 index 000000000000..123dab178fab --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/upgrade_instance_internal.php @@ -0,0 +1,88 @@ +setName($name) + ->setVmId($vmId); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $notebookServiceClient->upgradeInstanceInternal($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Instance $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $name = '[NAME]'; + $vmId = '[VM_ID]'; + + upgrade_instance_internal_sample($name, $vmId); +} +// [END notebooks_v1_generated_NotebookService_UpgradeInstanceInternal_sync] diff --git a/owl-bot-staging/Notebooks/v1/src/V1/Client/ManagedNotebookServiceClient.php b/owl-bot-staging/Notebooks/v1/src/V1/Client/ManagedNotebookServiceClient.php new file mode 100644 index 000000000000..1be96d61bd2b --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/src/V1/Client/ManagedNotebookServiceClient.php @@ -0,0 +1,822 @@ + createRuntimeAsync(CreateRuntimeRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteRuntimeAsync(DeleteRuntimeRequest $request, array $optionalArgs = []) + * @method PromiseInterface diagnoseRuntimeAsync(DiagnoseRuntimeRequest $request, array $optionalArgs = []) + * @method PromiseInterface getRuntimeAsync(GetRuntimeRequest $request, array $optionalArgs = []) + * @method PromiseInterface listRuntimesAsync(ListRuntimesRequest $request, array $optionalArgs = []) + * @method PromiseInterface refreshRuntimeTokenInternalAsync(RefreshRuntimeTokenInternalRequest $request, array $optionalArgs = []) + * @method PromiseInterface reportRuntimeEventAsync(ReportRuntimeEventRequest $request, array $optionalArgs = []) + * @method PromiseInterface resetRuntimeAsync(ResetRuntimeRequest $request, array $optionalArgs = []) + * @method PromiseInterface startRuntimeAsync(StartRuntimeRequest $request, array $optionalArgs = []) + * @method PromiseInterface stopRuntimeAsync(StopRuntimeRequest $request, array $optionalArgs = []) + * @method PromiseInterface switchRuntimeAsync(SwitchRuntimeRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateRuntimeAsync(UpdateRuntimeRequest $request, array $optionalArgs = []) + * @method PromiseInterface upgradeRuntimeAsync(UpgradeRuntimeRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) + */ +final class ManagedNotebookServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.notebooks.v1.ManagedNotebookService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'notebooks.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'notebooks.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/managed_notebook_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/managed_notebook_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/managed_notebook_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/managed_notebook_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Create the default operation client for the service. + * + * @param array $options ClientOptions for the client. + * + * @return OperationsClient + */ + private function createOperationsClient(array $options) + { + // Unset client-specific configuration options + unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); + + if (isset($options['operationsClient'])) { + return $options['operationsClient']; + } + + return new OperationsClient($options); + } + + /** + * Formats a string containing the fully-qualified path to represent a location + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted location resource. + */ + public static function locationName(string $project, string $location): string + { + return self::getPathTemplate('location')->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a runtime + * resource. + * + * @param string $project + * @param string $location + * @param string $runtime + * + * @return string The formatted runtime resource. + */ + public static function runtimeName(string $project, string $location, string $runtime): string + { + return self::getPathTemplate('runtime')->render([ + 'project' => $project, + 'location' => $location, + 'runtime' => $runtime, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - location: projects/{project}/locations/{location} + * - runtime: projects/{project}/locations/{location}/runtimes/{runtime} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'notebooks.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Creates a new Runtime in a given project and location. + * + * The async variant is {@see ManagedNotebookServiceClient::createRuntimeAsync()} . + * + * @example samples/V1/ManagedNotebookServiceClient/create_runtime.php + * + * @param CreateRuntimeRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createRuntime(CreateRuntimeRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateRuntime', $request, $callOptions)->wait(); + } + + /** + * Deletes a single Runtime. + * + * The async variant is {@see ManagedNotebookServiceClient::deleteRuntimeAsync()} . + * + * @example samples/V1/ManagedNotebookServiceClient/delete_runtime.php + * + * @param DeleteRuntimeRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteRuntime(DeleteRuntimeRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteRuntime', $request, $callOptions)->wait(); + } + + /** + * Creates a Diagnostic File and runs Diagnostic Tool given a Runtime. + * + * The async variant is {@see ManagedNotebookServiceClient::diagnoseRuntimeAsync()} + * . + * + * @example samples/V1/ManagedNotebookServiceClient/diagnose_runtime.php + * + * @param DiagnoseRuntimeRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function diagnoseRuntime(DiagnoseRuntimeRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DiagnoseRuntime', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single Runtime. The location must be a regional endpoint + * rather than zonal. + * + * The async variant is {@see ManagedNotebookServiceClient::getRuntimeAsync()} . + * + * @example samples/V1/ManagedNotebookServiceClient/get_runtime.php + * + * @param GetRuntimeRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Runtime + * + * @throws ApiException Thrown if the API call fails. + */ + public function getRuntime(GetRuntimeRequest $request, array $callOptions = []): Runtime + { + return $this->startApiCall('GetRuntime', $request, $callOptions)->wait(); + } + + /** + * Lists Runtimes in a given project and location. + * + * The async variant is {@see ManagedNotebookServiceClient::listRuntimesAsync()} . + * + * @example samples/V1/ManagedNotebookServiceClient/list_runtimes.php + * + * @param ListRuntimesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listRuntimes(ListRuntimesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListRuntimes', $request, $callOptions); + } + + /** + * Gets an access token for the consumer service account that the customer + * attached to the runtime. Only accessible from the tenant instance. + * + * The async variant is + * {@see ManagedNotebookServiceClient::refreshRuntimeTokenInternalAsync()} . + * + * @example samples/V1/ManagedNotebookServiceClient/refresh_runtime_token_internal.php + * + * @param RefreshRuntimeTokenInternalRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return RefreshRuntimeTokenInternalResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function refreshRuntimeTokenInternal(RefreshRuntimeTokenInternalRequest $request, array $callOptions = []): RefreshRuntimeTokenInternalResponse + { + return $this->startApiCall('RefreshRuntimeTokenInternal', $request, $callOptions)->wait(); + } + + /** + * Report and process a runtime event. + * + * The async variant is + * {@see ManagedNotebookServiceClient::reportRuntimeEventAsync()} . + * + * @example samples/V1/ManagedNotebookServiceClient/report_runtime_event.php + * + * @param ReportRuntimeEventRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function reportRuntimeEvent(ReportRuntimeEventRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('ReportRuntimeEvent', $request, $callOptions)->wait(); + } + + /** + * Resets a Managed Notebook Runtime. + * + * The async variant is {@see ManagedNotebookServiceClient::resetRuntimeAsync()} . + * + * @example samples/V1/ManagedNotebookServiceClient/reset_runtime.php + * + * @param ResetRuntimeRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function resetRuntime(ResetRuntimeRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('ResetRuntime', $request, $callOptions)->wait(); + } + + /** + * Starts a Managed Notebook Runtime. + * Perform "Start" on GPU instances; "Resume" on CPU instances + * See: + * https://cloud.google.com/compute/docs/instances/stop-start-instance + * https://cloud.google.com/compute/docs/instances/suspend-resume-instance + * + * The async variant is {@see ManagedNotebookServiceClient::startRuntimeAsync()} . + * + * @example samples/V1/ManagedNotebookServiceClient/start_runtime.php + * + * @param StartRuntimeRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function startRuntime(StartRuntimeRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('StartRuntime', $request, $callOptions)->wait(); + } + + /** + * Stops a Managed Notebook Runtime. + * Perform "Stop" on GPU instances; "Suspend" on CPU instances + * See: + * https://cloud.google.com/compute/docs/instances/stop-start-instance + * https://cloud.google.com/compute/docs/instances/suspend-resume-instance + * + * The async variant is {@see ManagedNotebookServiceClient::stopRuntimeAsync()} . + * + * @example samples/V1/ManagedNotebookServiceClient/stop_runtime.php + * + * @param StopRuntimeRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function stopRuntime(StopRuntimeRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('StopRuntime', $request, $callOptions)->wait(); + } + + /** + * Switch a Managed Notebook Runtime. + * + * The async variant is {@see ManagedNotebookServiceClient::switchRuntimeAsync()} . + * + * @example samples/V1/ManagedNotebookServiceClient/switch_runtime.php + * + * @param SwitchRuntimeRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function switchRuntime(SwitchRuntimeRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('SwitchRuntime', $request, $callOptions)->wait(); + } + + /** + * Update Notebook Runtime configuration. + * + * The async variant is {@see ManagedNotebookServiceClient::updateRuntimeAsync()} . + * + * @example samples/V1/ManagedNotebookServiceClient/update_runtime.php + * + * @param UpdateRuntimeRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateRuntime(UpdateRuntimeRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateRuntime', $request, $callOptions)->wait(); + } + + /** + * Upgrades a Managed Notebook Runtime to the latest version. + * + * The async variant is {@see ManagedNotebookServiceClient::upgradeRuntimeAsync()} + * . + * + * @example samples/V1/ManagedNotebookServiceClient/upgrade_runtime.php + * + * @param UpgradeRuntimeRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function upgradeRuntime(UpgradeRuntimeRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpgradeRuntime', $request, $callOptions)->wait(); + } + + /** + * Gets information about a location. + * + * The async variant is {@see ManagedNotebookServiceClient::getLocationAsync()} . + * + * @example samples/V1/ManagedNotebookServiceClient/get_location.php + * + * @param GetLocationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Location + * + * @throws ApiException Thrown if the API call fails. + */ + public function getLocation(GetLocationRequest $request, array $callOptions = []): Location + { + return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * The async variant is {@see ManagedNotebookServiceClient::listLocationsAsync()} . + * + * @example samples/V1/ManagedNotebookServiceClient/list_locations.php + * + * @param ListLocationsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListLocations', $request, $callOptions); + } + + /** + * Gets the access control policy for a resource. Returns an empty policy + if the resource exists and does not have a policy set. + * + * The async variant is {@see ManagedNotebookServiceClient::getIamPolicyAsync()} . + * + * @example samples/V1/ManagedNotebookServiceClient/get_iam_policy.php + * + * @param GetIamPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * Sets the access control policy on the specified resource. Replaces + any existing policy. + + Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` + errors. + * + * The async variant is {@see ManagedNotebookServiceClient::setIamPolicyAsync()} . + * + * @example samples/V1/ManagedNotebookServiceClient/set_iam_policy.php + * + * @param SetIamPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * Returns permissions that a caller has on the specified resource. If the + resource does not exist, this will return an empty set of + permissions, not a `NOT_FOUND` error. + + Note: This operation is designed to be used for building + permission-aware UIs and command-line tools, not for authorization + checking. This operation may "fail open" without warning. + * + * The async variant is + * {@see ManagedNotebookServiceClient::testIamPermissionsAsync()} . + * + * @example samples/V1/ManagedNotebookServiceClient/test_iam_permissions.php + * + * @param TestIamPermissionsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return TestIamPermissionsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse + { + return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/Notebooks/v1/src/V1/Client/NotebookServiceClient.php b/owl-bot-staging/Notebooks/v1/src/V1/Client/NotebookServiceClient.php new file mode 100644 index 000000000000..7d7a07553e32 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/src/V1/Client/NotebookServiceClient.php @@ -0,0 +1,1471 @@ + createEnvironmentAsync(CreateEnvironmentRequest $request, array $optionalArgs = []) + * @method PromiseInterface createExecutionAsync(CreateExecutionRequest $request, array $optionalArgs = []) + * @method PromiseInterface createInstanceAsync(CreateInstanceRequest $request, array $optionalArgs = []) + * @method PromiseInterface createScheduleAsync(CreateScheduleRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteEnvironmentAsync(DeleteEnvironmentRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteExecutionAsync(DeleteExecutionRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteInstanceAsync(DeleteInstanceRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteScheduleAsync(DeleteScheduleRequest $request, array $optionalArgs = []) + * @method PromiseInterface diagnoseInstanceAsync(DiagnoseInstanceRequest $request, array $optionalArgs = []) + * @method PromiseInterface getEnvironmentAsync(GetEnvironmentRequest $request, array $optionalArgs = []) + * @method PromiseInterface getExecutionAsync(GetExecutionRequest $request, array $optionalArgs = []) + * @method PromiseInterface getInstanceAsync(GetInstanceRequest $request, array $optionalArgs = []) + * @method PromiseInterface getInstanceHealthAsync(GetInstanceHealthRequest $request, array $optionalArgs = []) + * @method PromiseInterface getScheduleAsync(GetScheduleRequest $request, array $optionalArgs = []) + * @method PromiseInterface isInstanceUpgradeableAsync(IsInstanceUpgradeableRequest $request, array $optionalArgs = []) + * @method PromiseInterface listEnvironmentsAsync(ListEnvironmentsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listExecutionsAsync(ListExecutionsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listInstancesAsync(ListInstancesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listSchedulesAsync(ListSchedulesRequest $request, array $optionalArgs = []) + * @method PromiseInterface registerInstanceAsync(RegisterInstanceRequest $request, array $optionalArgs = []) + * @method PromiseInterface reportInstanceInfoAsync(ReportInstanceInfoRequest $request, array $optionalArgs = []) + * @method PromiseInterface resetInstanceAsync(ResetInstanceRequest $request, array $optionalArgs = []) + * @method PromiseInterface rollbackInstanceAsync(RollbackInstanceRequest $request, array $optionalArgs = []) + * @method PromiseInterface setInstanceAcceleratorAsync(SetInstanceAcceleratorRequest $request, array $optionalArgs = []) + * @method PromiseInterface setInstanceLabelsAsync(SetInstanceLabelsRequest $request, array $optionalArgs = []) + * @method PromiseInterface setInstanceMachineTypeAsync(SetInstanceMachineTypeRequest $request, array $optionalArgs = []) + * @method PromiseInterface startInstanceAsync(StartInstanceRequest $request, array $optionalArgs = []) + * @method PromiseInterface stopInstanceAsync(StopInstanceRequest $request, array $optionalArgs = []) + * @method PromiseInterface triggerScheduleAsync(TriggerScheduleRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateInstanceConfigAsync(UpdateInstanceConfigRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateInstanceMetadataItemsAsync(UpdateInstanceMetadataItemsRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateShieldedInstanceConfigAsync(UpdateShieldedInstanceConfigRequest $request, array $optionalArgs = []) + * @method PromiseInterface upgradeInstanceAsync(UpgradeInstanceRequest $request, array $optionalArgs = []) + * @method PromiseInterface upgradeInstanceInternalAsync(UpgradeInstanceInternalRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) + */ +final class NotebookServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.notebooks.v1.NotebookService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'notebooks.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'notebooks.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/notebook_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/notebook_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/notebook_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/notebook_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Create the default operation client for the service. + * + * @param array $options ClientOptions for the client. + * + * @return OperationsClient + */ + private function createOperationsClient(array $options) + { + // Unset client-specific configuration options + unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); + + if (isset($options['operationsClient'])) { + return $options['operationsClient']; + } + + return new OperationsClient($options); + } + + /** + * Formats a string containing the fully-qualified path to represent a environment + * resource. + * + * @param string $project + * @param string $environment + * + * @return string The formatted environment resource. + */ + public static function environmentName(string $project, string $environment): string + { + return self::getPathTemplate('environment')->render([ + 'project' => $project, + 'environment' => $environment, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a execution + * resource. + * + * @param string $project + * @param string $location + * @param string $execution + * + * @return string The formatted execution resource. + */ + public static function executionName(string $project, string $location, string $execution): string + { + return self::getPathTemplate('execution')->render([ + 'project' => $project, + 'location' => $location, + 'execution' => $execution, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a instance + * resource. + * + * @param string $project + * @param string $instance + * + * @return string The formatted instance resource. + */ + public static function instanceName(string $project, string $instance): string + { + return self::getPathTemplate('instance')->render([ + 'project' => $project, + 'instance' => $instance, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a schedule + * resource. + * + * @param string $project + * @param string $location + * @param string $schedule + * + * @return string The formatted schedule resource. + */ + public static function scheduleName(string $project, string $location, string $schedule): string + { + return self::getPathTemplate('schedule')->render([ + 'project' => $project, + 'location' => $location, + 'schedule' => $schedule, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a tensorboard + * resource. + * + * @param string $project + * @param string $location + * @param string $tensorboard + * + * @return string The formatted tensorboard resource. + */ + public static function tensorboardName(string $project, string $location, string $tensorboard): string + { + return self::getPathTemplate('tensorboard')->render([ + 'project' => $project, + 'location' => $location, + 'tensorboard' => $tensorboard, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - environment: projects/{project}/environments/{environment} + * - execution: projects/{project}/location/{location}/executions/{execution} + * - instance: projects/{project}/instances/{instance} + * - schedule: projects/{project}/location/{location}/schedules/{schedule} + * - tensorboard: projects/{project}/locations/{location}/tensorboards/{tensorboard} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'notebooks.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Creates a new Environment. + * + * The async variant is {@see NotebookServiceClient::createEnvironmentAsync()} . + * + * @example samples/V1/NotebookServiceClient/create_environment.php + * + * @param CreateEnvironmentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createEnvironment(CreateEnvironmentRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateEnvironment', $request, $callOptions)->wait(); + } + + /** + * Creates a new Execution in a given project and location. + * + * The async variant is {@see NotebookServiceClient::createExecutionAsync()} . + * + * @example samples/V1/NotebookServiceClient/create_execution.php + * + * @param CreateExecutionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createExecution(CreateExecutionRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateExecution', $request, $callOptions)->wait(); + } + + /** + * Creates a new Instance in a given project and location. + * + * The async variant is {@see NotebookServiceClient::createInstanceAsync()} . + * + * @example samples/V1/NotebookServiceClient/create_instance.php + * + * @param CreateInstanceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createInstance(CreateInstanceRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateInstance', $request, $callOptions)->wait(); + } + + /** + * Creates a new Scheduled Notebook in a given project and location. + * + * The async variant is {@see NotebookServiceClient::createScheduleAsync()} . + * + * @example samples/V1/NotebookServiceClient/create_schedule.php + * + * @param CreateScheduleRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createSchedule(CreateScheduleRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateSchedule', $request, $callOptions)->wait(); + } + + /** + * Deletes a single Environment. + * + * The async variant is {@see NotebookServiceClient::deleteEnvironmentAsync()} . + * + * @example samples/V1/NotebookServiceClient/delete_environment.php + * + * @param DeleteEnvironmentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteEnvironment(DeleteEnvironmentRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteEnvironment', $request, $callOptions)->wait(); + } + + /** + * Deletes execution + * + * The async variant is {@see NotebookServiceClient::deleteExecutionAsync()} . + * + * @example samples/V1/NotebookServiceClient/delete_execution.php + * + * @param DeleteExecutionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteExecution(DeleteExecutionRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteExecution', $request, $callOptions)->wait(); + } + + /** + * Deletes a single Instance. + * + * The async variant is {@see NotebookServiceClient::deleteInstanceAsync()} . + * + * @example samples/V1/NotebookServiceClient/delete_instance.php + * + * @param DeleteInstanceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteInstance(DeleteInstanceRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteInstance', $request, $callOptions)->wait(); + } + + /** + * Deletes schedule and all underlying jobs + * + * The async variant is {@see NotebookServiceClient::deleteScheduleAsync()} . + * + * @example samples/V1/NotebookServiceClient/delete_schedule.php + * + * @param DeleteScheduleRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteSchedule(DeleteScheduleRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteSchedule', $request, $callOptions)->wait(); + } + + /** + * Creates a Diagnostic File and runs Diagnostic Tool given an Instance. + * + * The async variant is {@see NotebookServiceClient::diagnoseInstanceAsync()} . + * + * @example samples/V1/NotebookServiceClient/diagnose_instance.php + * + * @param DiagnoseInstanceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function diagnoseInstance(DiagnoseInstanceRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DiagnoseInstance', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single Environment. + * + * The async variant is {@see NotebookServiceClient::getEnvironmentAsync()} . + * + * @example samples/V1/NotebookServiceClient/get_environment.php + * + * @param GetEnvironmentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Environment + * + * @throws ApiException Thrown if the API call fails. + */ + public function getEnvironment(GetEnvironmentRequest $request, array $callOptions = []): Environment + { + return $this->startApiCall('GetEnvironment', $request, $callOptions)->wait(); + } + + /** + * Gets details of executions + * + * The async variant is {@see NotebookServiceClient::getExecutionAsync()} . + * + * @example samples/V1/NotebookServiceClient/get_execution.php + * + * @param GetExecutionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Execution + * + * @throws ApiException Thrown if the API call fails. + */ + public function getExecution(GetExecutionRequest $request, array $callOptions = []): Execution + { + return $this->startApiCall('GetExecution', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single Instance. + * + * The async variant is {@see NotebookServiceClient::getInstanceAsync()} . + * + * @example samples/V1/NotebookServiceClient/get_instance.php + * + * @param GetInstanceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Instance + * + * @throws ApiException Thrown if the API call fails. + */ + public function getInstance(GetInstanceRequest $request, array $callOptions = []): Instance + { + return $this->startApiCall('GetInstance', $request, $callOptions)->wait(); + } + + /** + * Check if a notebook instance is healthy. + * + * The async variant is {@see NotebookServiceClient::getInstanceHealthAsync()} . + * + * @example samples/V1/NotebookServiceClient/get_instance_health.php + * + * @param GetInstanceHealthRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return GetInstanceHealthResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function getInstanceHealth(GetInstanceHealthRequest $request, array $callOptions = []): GetInstanceHealthResponse + { + return $this->startApiCall('GetInstanceHealth', $request, $callOptions)->wait(); + } + + /** + * Gets details of schedule + * + * The async variant is {@see NotebookServiceClient::getScheduleAsync()} . + * + * @example samples/V1/NotebookServiceClient/get_schedule.php + * + * @param GetScheduleRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Schedule + * + * @throws ApiException Thrown if the API call fails. + */ + public function getSchedule(GetScheduleRequest $request, array $callOptions = []): Schedule + { + return $this->startApiCall('GetSchedule', $request, $callOptions)->wait(); + } + + /** + * Check if a notebook instance is upgradable. + * + * The async variant is {@see NotebookServiceClient::isInstanceUpgradeableAsync()} + * . + * + * @example samples/V1/NotebookServiceClient/is_instance_upgradeable.php + * + * @param IsInstanceUpgradeableRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return IsInstanceUpgradeableResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function isInstanceUpgradeable(IsInstanceUpgradeableRequest $request, array $callOptions = []): IsInstanceUpgradeableResponse + { + return $this->startApiCall('IsInstanceUpgradeable', $request, $callOptions)->wait(); + } + + /** + * Lists environments in a project. + * + * The async variant is {@see NotebookServiceClient::listEnvironmentsAsync()} . + * + * @example samples/V1/NotebookServiceClient/list_environments.php + * + * @param ListEnvironmentsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listEnvironments(ListEnvironmentsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListEnvironments', $request, $callOptions); + } + + /** + * Lists executions in a given project and location + * + * The async variant is {@see NotebookServiceClient::listExecutionsAsync()} . + * + * @example samples/V1/NotebookServiceClient/list_executions.php + * + * @param ListExecutionsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listExecutions(ListExecutionsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListExecutions', $request, $callOptions); + } + + /** + * Lists instances in a given project and location. + * + * The async variant is {@see NotebookServiceClient::listInstancesAsync()} . + * + * @example samples/V1/NotebookServiceClient/list_instances.php + * + * @param ListInstancesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listInstances(ListInstancesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListInstances', $request, $callOptions); + } + + /** + * Lists schedules in a given project and location. + * + * The async variant is {@see NotebookServiceClient::listSchedulesAsync()} . + * + * @example samples/V1/NotebookServiceClient/list_schedules.php + * + * @param ListSchedulesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listSchedules(ListSchedulesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListSchedules', $request, $callOptions); + } + + /** + * Registers an existing legacy notebook instance to the Notebooks API server. + * Legacy instances are instances created with the legacy Compute Engine + * calls. They are not manageable by the Notebooks API out of the box. This + * call makes these instances manageable by the Notebooks API. + * + * The async variant is {@see NotebookServiceClient::registerInstanceAsync()} . + * + * @example samples/V1/NotebookServiceClient/register_instance.php + * + * @param RegisterInstanceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function registerInstance(RegisterInstanceRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('RegisterInstance', $request, $callOptions)->wait(); + } + + /** + * Allows notebook instances to + * report their latest instance information to the Notebooks + * API server. The server will merge the reported information to + * the instance metadata store. Do not use this method directly. + * + * The async variant is {@see NotebookServiceClient::reportInstanceInfoAsync()} . + * + * @example samples/V1/NotebookServiceClient/report_instance_info.php + * + * @param ReportInstanceInfoRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function reportInstanceInfo(ReportInstanceInfoRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('ReportInstanceInfo', $request, $callOptions)->wait(); + } + + /** + * Resets a notebook instance. + * + * The async variant is {@see NotebookServiceClient::resetInstanceAsync()} . + * + * @example samples/V1/NotebookServiceClient/reset_instance.php + * + * @param ResetInstanceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function resetInstance(ResetInstanceRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('ResetInstance', $request, $callOptions)->wait(); + } + + /** + * Rollbacks a notebook instance to the previous version. + * + * The async variant is {@see NotebookServiceClient::rollbackInstanceAsync()} . + * + * @example samples/V1/NotebookServiceClient/rollback_instance.php + * + * @param RollbackInstanceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function rollbackInstance(RollbackInstanceRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('RollbackInstance', $request, $callOptions)->wait(); + } + + /** + * Updates the guest accelerators of a single Instance. + * + * The async variant is {@see NotebookServiceClient::setInstanceAcceleratorAsync()} + * . + * + * @example samples/V1/NotebookServiceClient/set_instance_accelerator.php + * + * @param SetInstanceAcceleratorRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function setInstanceAccelerator(SetInstanceAcceleratorRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('SetInstanceAccelerator', $request, $callOptions)->wait(); + } + + /** + * Replaces all the labels of an Instance. + * + * The async variant is {@see NotebookServiceClient::setInstanceLabelsAsync()} . + * + * @example samples/V1/NotebookServiceClient/set_instance_labels.php + * + * @param SetInstanceLabelsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function setInstanceLabels(SetInstanceLabelsRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('SetInstanceLabels', $request, $callOptions)->wait(); + } + + /** + * Updates the machine type of a single Instance. + * + * The async variant is {@see NotebookServiceClient::setInstanceMachineTypeAsync()} + * . + * + * @example samples/V1/NotebookServiceClient/set_instance_machine_type.php + * + * @param SetInstanceMachineTypeRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function setInstanceMachineType(SetInstanceMachineTypeRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('SetInstanceMachineType', $request, $callOptions)->wait(); + } + + /** + * Starts a notebook instance. + * + * The async variant is {@see NotebookServiceClient::startInstanceAsync()} . + * + * @example samples/V1/NotebookServiceClient/start_instance.php + * + * @param StartInstanceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function startInstance(StartInstanceRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('StartInstance', $request, $callOptions)->wait(); + } + + /** + * Stops a notebook instance. + * + * The async variant is {@see NotebookServiceClient::stopInstanceAsync()} . + * + * @example samples/V1/NotebookServiceClient/stop_instance.php + * + * @param StopInstanceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function stopInstance(StopInstanceRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('StopInstance', $request, $callOptions)->wait(); + } + + /** + * Triggers execution of an existing schedule. + * + * The async variant is {@see NotebookServiceClient::triggerScheduleAsync()} . + * + * @example samples/V1/NotebookServiceClient/trigger_schedule.php + * + * @param TriggerScheduleRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function triggerSchedule(TriggerScheduleRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('TriggerSchedule', $request, $callOptions)->wait(); + } + + /** + * Update Notebook Instance configurations. + * + * The async variant is {@see NotebookServiceClient::updateInstanceConfigAsync()} . + * + * @example samples/V1/NotebookServiceClient/update_instance_config.php + * + * @param UpdateInstanceConfigRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateInstanceConfig(UpdateInstanceConfigRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateInstanceConfig', $request, $callOptions)->wait(); + } + + /** + * Add/update metadata items for an instance. + * + * The async variant is + * {@see NotebookServiceClient::updateInstanceMetadataItemsAsync()} . + * + * @example samples/V1/NotebookServiceClient/update_instance_metadata_items.php + * + * @param UpdateInstanceMetadataItemsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return UpdateInstanceMetadataItemsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateInstanceMetadataItems(UpdateInstanceMetadataItemsRequest $request, array $callOptions = []): UpdateInstanceMetadataItemsResponse + { + return $this->startApiCall('UpdateInstanceMetadataItems', $request, $callOptions)->wait(); + } + + /** + * Updates the Shielded instance configuration of a single Instance. + * + * The async variant is + * {@see NotebookServiceClient::updateShieldedInstanceConfigAsync()} . + * + * @example samples/V1/NotebookServiceClient/update_shielded_instance_config.php + * + * @param UpdateShieldedInstanceConfigRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateShieldedInstanceConfig(UpdateShieldedInstanceConfigRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateShieldedInstanceConfig', $request, $callOptions)->wait(); + } + + /** + * Upgrades a notebook instance to the latest version. + * + * The async variant is {@see NotebookServiceClient::upgradeInstanceAsync()} . + * + * @example samples/V1/NotebookServiceClient/upgrade_instance.php + * + * @param UpgradeInstanceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function upgradeInstance(UpgradeInstanceRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpgradeInstance', $request, $callOptions)->wait(); + } + + /** + * Allows notebook instances to + * call this endpoint to upgrade themselves. Do not use this method directly. + * + * The async variant is + * {@see NotebookServiceClient::upgradeInstanceInternalAsync()} . + * + * @example samples/V1/NotebookServiceClient/upgrade_instance_internal.php + * + * @param UpgradeInstanceInternalRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function upgradeInstanceInternal(UpgradeInstanceInternalRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpgradeInstanceInternal', $request, $callOptions)->wait(); + } + + /** + * Gets information about a location. + * + * The async variant is {@see NotebookServiceClient::getLocationAsync()} . + * + * @example samples/V1/NotebookServiceClient/get_location.php + * + * @param GetLocationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Location + * + * @throws ApiException Thrown if the API call fails. + */ + public function getLocation(GetLocationRequest $request, array $callOptions = []): Location + { + return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * The async variant is {@see NotebookServiceClient::listLocationsAsync()} . + * + * @example samples/V1/NotebookServiceClient/list_locations.php + * + * @param ListLocationsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListLocations', $request, $callOptions); + } + + /** + * Gets the access control policy for a resource. Returns an empty policy + if the resource exists and does not have a policy set. + * + * The async variant is {@see NotebookServiceClient::getIamPolicyAsync()} . + * + * @example samples/V1/NotebookServiceClient/get_iam_policy.php + * + * @param GetIamPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * Sets the access control policy on the specified resource. Replaces + any existing policy. + + Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` + errors. + * + * The async variant is {@see NotebookServiceClient::setIamPolicyAsync()} . + * + * @example samples/V1/NotebookServiceClient/set_iam_policy.php + * + * @param SetIamPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * Returns permissions that a caller has on the specified resource. If the + resource does not exist, this will return an empty set of + permissions, not a `NOT_FOUND` error. + + Note: This operation is designed to be used for building + permission-aware UIs and command-line tools, not for authorization + checking. This operation may "fail open" without warning. + * + * The async variant is {@see NotebookServiceClient::testIamPermissionsAsync()} . + * + * @example samples/V1/NotebookServiceClient/test_iam_permissions.php + * + * @param TestIamPermissionsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return TestIamPermissionsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse + { + return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/Notebooks/v1/src/V1/gapic_metadata.json b/owl-bot-staging/Notebooks/v1/src/V1/gapic_metadata.json new file mode 100644 index 000000000000..3d59111ebb81 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/src/V1/gapic_metadata.json @@ -0,0 +1,312 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.cloud.notebooks.v1", + "libraryPackage": "Google\\Cloud\\Notebooks\\V1", + "services": { + "ManagedNotebookService": { + "clients": { + "grpc": { + "libraryClient": "ManagedNotebookServiceGapicClient", + "rpcs": { + "CreateRuntime": { + "methods": [ + "createRuntime" + ] + }, + "DeleteRuntime": { + "methods": [ + "deleteRuntime" + ] + }, + "DiagnoseRuntime": { + "methods": [ + "diagnoseRuntime" + ] + }, + "GetRuntime": { + "methods": [ + "getRuntime" + ] + }, + "ListRuntimes": { + "methods": [ + "listRuntimes" + ] + }, + "RefreshRuntimeTokenInternal": { + "methods": [ + "refreshRuntimeTokenInternal" + ] + }, + "ReportRuntimeEvent": { + "methods": [ + "reportRuntimeEvent" + ] + }, + "ResetRuntime": { + "methods": [ + "resetRuntime" + ] + }, + "StartRuntime": { + "methods": [ + "startRuntime" + ] + }, + "StopRuntime": { + "methods": [ + "stopRuntime" + ] + }, + "SwitchRuntime": { + "methods": [ + "switchRuntime" + ] + }, + "UpdateRuntime": { + "methods": [ + "updateRuntime" + ] + }, + "UpgradeRuntime": { + "methods": [ + "upgradeRuntime" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + } + } + } + } + }, + "NotebookService": { + "clients": { + "grpc": { + "libraryClient": "NotebookServiceGapicClient", + "rpcs": { + "CreateEnvironment": { + "methods": [ + "createEnvironment" + ] + }, + "CreateExecution": { + "methods": [ + "createExecution" + ] + }, + "CreateInstance": { + "methods": [ + "createInstance" + ] + }, + "CreateSchedule": { + "methods": [ + "createSchedule" + ] + }, + "DeleteEnvironment": { + "methods": [ + "deleteEnvironment" + ] + }, + "DeleteExecution": { + "methods": [ + "deleteExecution" + ] + }, + "DeleteInstance": { + "methods": [ + "deleteInstance" + ] + }, + "DeleteSchedule": { + "methods": [ + "deleteSchedule" + ] + }, + "DiagnoseInstance": { + "methods": [ + "diagnoseInstance" + ] + }, + "GetEnvironment": { + "methods": [ + "getEnvironment" + ] + }, + "GetExecution": { + "methods": [ + "getExecution" + ] + }, + "GetInstance": { + "methods": [ + "getInstance" + ] + }, + "GetInstanceHealth": { + "methods": [ + "getInstanceHealth" + ] + }, + "GetSchedule": { + "methods": [ + "getSchedule" + ] + }, + "IsInstanceUpgradeable": { + "methods": [ + "isInstanceUpgradeable" + ] + }, + "ListEnvironments": { + "methods": [ + "listEnvironments" + ] + }, + "ListExecutions": { + "methods": [ + "listExecutions" + ] + }, + "ListInstances": { + "methods": [ + "listInstances" + ] + }, + "ListSchedules": { + "methods": [ + "listSchedules" + ] + }, + "RegisterInstance": { + "methods": [ + "registerInstance" + ] + }, + "ReportInstanceInfo": { + "methods": [ + "reportInstanceInfo" + ] + }, + "ResetInstance": { + "methods": [ + "resetInstance" + ] + }, + "RollbackInstance": { + "methods": [ + "rollbackInstance" + ] + }, + "SetInstanceAccelerator": { + "methods": [ + "setInstanceAccelerator" + ] + }, + "SetInstanceLabels": { + "methods": [ + "setInstanceLabels" + ] + }, + "SetInstanceMachineType": { + "methods": [ + "setInstanceMachineType" + ] + }, + "StartInstance": { + "methods": [ + "startInstance" + ] + }, + "StopInstance": { + "methods": [ + "stopInstance" + ] + }, + "TriggerSchedule": { + "methods": [ + "triggerSchedule" + ] + }, + "UpdateInstanceConfig": { + "methods": [ + "updateInstanceConfig" + ] + }, + "UpdateInstanceMetadataItems": { + "methods": [ + "updateInstanceMetadataItems" + ] + }, + "UpdateShieldedInstanceConfig": { + "methods": [ + "updateShieldedInstanceConfig" + ] + }, + "UpgradeInstance": { + "methods": [ + "upgradeInstance" + ] + }, + "UpgradeInstanceInternal": { + "methods": [ + "upgradeInstanceInternal" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/Notebooks/v1/src/V1/resources/managed_notebook_service_client_config.json b/owl-bot-staging/Notebooks/v1/src/V1/resources/managed_notebook_service_client_config.json new file mode 100644 index 000000000000..e5ec07cbdb99 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/src/V1/resources/managed_notebook_service_client_config.json @@ -0,0 +1,134 @@ +{ + "interfaces": { + "google.cloud.notebooks.v1.ManagedNotebookService": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE" + ], + "no_retry_1_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "CreateRuntime": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteRuntime": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DiagnoseRuntime": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetRuntime": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListRuntimes": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "RefreshRuntimeTokenInternal": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ReportRuntimeEvent": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ResetRuntime": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "StartRuntime": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "StopRuntime": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "SwitchRuntime": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateRuntime": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpgradeRuntime": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetLocation": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListLocations": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "SetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "TestIamPermissions": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/Notebooks/v1/src/V1/resources/managed_notebook_service_descriptor_config.php b/owl-bot-staging/Notebooks/v1/src/V1/resources/managed_notebook_service_descriptor_config.php new file mode 100644 index 000000000000..6398bbee3ac6 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/src/V1/resources/managed_notebook_service_descriptor_config.php @@ -0,0 +1,340 @@ + [ + 'google.cloud.notebooks.v1.ManagedNotebookService' => [ + 'CreateRuntime' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Notebooks\V1\Runtime', + 'metadataReturnType' => '\Google\Cloud\Notebooks\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteRuntime' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\Notebooks\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DiagnoseRuntime' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Notebooks\V1\Runtime', + 'metadataReturnType' => '\Google\Cloud\Notebooks\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ReportRuntimeEvent' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Notebooks\V1\Runtime', + 'metadataReturnType' => '\Google\Cloud\Notebooks\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ResetRuntime' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Notebooks\V1\Runtime', + 'metadataReturnType' => '\Google\Cloud\Notebooks\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'StartRuntime' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Notebooks\V1\Runtime', + 'metadataReturnType' => '\Google\Cloud\Notebooks\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'StopRuntime' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Notebooks\V1\Runtime', + 'metadataReturnType' => '\Google\Cloud\Notebooks\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'SwitchRuntime' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Notebooks\V1\Runtime', + 'metadataReturnType' => '\Google\Cloud\Notebooks\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UpdateRuntime' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Notebooks\V1\Runtime', + 'metadataReturnType' => '\Google\Cloud\Notebooks\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'runtime.name', + 'fieldAccessors' => [ + 'getRuntime', + 'getName', + ], + ], + ], + ], + 'UpgradeRuntime' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Notebooks\V1\Runtime', + 'metadataReturnType' => '\Google\Cloud\Notebooks\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetRuntime' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Notebooks\V1\Runtime', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListRuntimes' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getRuntimes', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Notebooks\V1\ListRuntimesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'RefreshRuntimeTokenInternal' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Notebooks\V1\RefreshRuntimeTokenInternalResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetLocation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Location\Location', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'GetIamPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'SetIamPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'TestIamPermissions' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'templateMap' => [ + 'location' => 'projects/{project}/locations/{location}', + 'runtime' => 'projects/{project}/locations/{location}/runtimes/{runtime}', + ], + ], + ], +]; diff --git a/owl-bot-staging/Notebooks/v1/src/V1/resources/managed_notebook_service_rest_client_config.php b/owl-bot-staging/Notebooks/v1/src/V1/resources/managed_notebook_service_rest_client_config.php new file mode 100644 index 000000000000..8a16450224c1 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/src/V1/resources/managed_notebook_service_rest_client_config.php @@ -0,0 +1,317 @@ + [ + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.cloud.notebooks.v1.ManagedNotebookService' => [ + 'CreateRuntime' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/runtimes', + 'body' => 'runtime', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'runtime_id', + ], + ], + 'DeleteRuntime' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/runtimes/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DiagnoseRuntime' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/runtimes/*}:diagnose', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetRuntime' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/runtimes/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListRuntimes' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/runtimes', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'RefreshRuntimeTokenInternal' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/runtimes/*}:refreshRuntimeTokenInternal', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ReportRuntimeEvent' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/runtimes/*}:reportEvent', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ResetRuntime' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/runtimes/*}:reset', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'StartRuntime' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/runtimes/*}:start', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'StopRuntime' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/runtimes/*}:stop', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'SwitchRuntime' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/runtimes/*}:switch', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'UpdateRuntime' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{runtime.name=projects/*/locations/*/runtimes/*}', + 'body' => 'runtime', + 'placeholders' => [ + 'runtime.name' => [ + 'getters' => [ + 'getRuntime', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpgradeRuntime' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/runtimes/*}:upgrade', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.iam.v1.IAMPolicy' => [ + 'GetIamPolicy' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/instances/*}:getIamPolicy', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/runtimes/*}:getIamPolicy', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'SetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/instances/*}:setIamPolicy', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/runtimes/*}:setIamPolicy', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'TestIamPermissions' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/instances/*}:testIamPermissions', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/runtimes/*}:testIamPermissions', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Notebooks/v1/src/V1/resources/notebook_service_client_config.json b/owl-bot-staging/Notebooks/v1/src/V1/resources/notebook_service_client_config.json new file mode 100644 index 000000000000..d99ebdb4339e --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/src/V1/resources/notebook_service_client_config.json @@ -0,0 +1,239 @@ +{ + "interfaces": { + "google.cloud.notebooks.v1.NotebookService": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE" + ], + "no_retry_1_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "CreateEnvironment": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateExecution": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateInstance": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateSchedule": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteEnvironment": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteExecution": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteInstance": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteSchedule": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DiagnoseInstance": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetEnvironment": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetExecution": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetInstance": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetInstanceHealth": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetSchedule": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "IsInstanceUpgradeable": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListEnvironments": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListExecutions": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListInstances": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListSchedules": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "RegisterInstance": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ReportInstanceInfo": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ResetInstance": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "RollbackInstance": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "SetInstanceAccelerator": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "SetInstanceLabels": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "SetInstanceMachineType": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "StartInstance": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "StopInstance": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "TriggerSchedule": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateInstanceConfig": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateInstanceMetadataItems": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateShieldedInstanceConfig": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpgradeInstance": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpgradeInstanceInternal": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetLocation": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListLocations": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "SetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "TestIamPermissions": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/Notebooks/v1/src/V1/resources/notebook_service_descriptor_config.php b/owl-bot-staging/Notebooks/v1/src/V1/resources/notebook_service_descriptor_config.php new file mode 100644 index 000000000000..4bfb6bac1601 --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/src/V1/resources/notebook_service_descriptor_config.php @@ -0,0 +1,709 @@ + [ + 'google.cloud.notebooks.v1.NotebookService' => [ + 'CreateEnvironment' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Notebooks\V1\Environment', + 'metadataReturnType' => '\Google\Cloud\Notebooks\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateExecution' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Notebooks\V1\Execution', + 'metadataReturnType' => '\Google\Cloud\Notebooks\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateInstance' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Notebooks\V1\Instance', + 'metadataReturnType' => '\Google\Cloud\Notebooks\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateSchedule' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Notebooks\V1\Schedule', + 'metadataReturnType' => '\Google\Cloud\Notebooks\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteEnvironment' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\Notebooks\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteExecution' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\Notebooks\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteInstance' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\Notebooks\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteSchedule' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\Notebooks\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DiagnoseInstance' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Notebooks\V1\Instance', + 'metadataReturnType' => '\Google\Cloud\Notebooks\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'RegisterInstance' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Notebooks\V1\Instance', + 'metadataReturnType' => '\Google\Cloud\Notebooks\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ReportInstanceInfo' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Notebooks\V1\Instance', + 'metadataReturnType' => '\Google\Cloud\Notebooks\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ResetInstance' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Notebooks\V1\Instance', + 'metadataReturnType' => '\Google\Cloud\Notebooks\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'RollbackInstance' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Notebooks\V1\Instance', + 'metadataReturnType' => '\Google\Cloud\Notebooks\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'SetInstanceAccelerator' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Notebooks\V1\Instance', + 'metadataReturnType' => '\Google\Cloud\Notebooks\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'SetInstanceLabels' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Notebooks\V1\Instance', + 'metadataReturnType' => '\Google\Cloud\Notebooks\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'SetInstanceMachineType' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Notebooks\V1\Instance', + 'metadataReturnType' => '\Google\Cloud\Notebooks\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'StartInstance' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Notebooks\V1\Instance', + 'metadataReturnType' => '\Google\Cloud\Notebooks\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'StopInstance' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Notebooks\V1\Instance', + 'metadataReturnType' => '\Google\Cloud\Notebooks\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'TriggerSchedule' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Notebooks\V1\Schedule', + 'metadataReturnType' => '\Google\Cloud\Notebooks\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UpdateInstanceConfig' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Notebooks\V1\Instance', + 'metadataReturnType' => '\Google\Cloud\Notebooks\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UpdateShieldedInstanceConfig' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Notebooks\V1\Instance', + 'metadataReturnType' => '\Google\Cloud\Notebooks\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UpgradeInstance' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Notebooks\V1\Instance', + 'metadataReturnType' => '\Google\Cloud\Notebooks\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UpgradeInstanceInternal' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Notebooks\V1\Instance', + 'metadataReturnType' => '\Google\Cloud\Notebooks\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetEnvironment' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Notebooks\V1\Environment', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetExecution' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Notebooks\V1\Execution', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetInstance' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Notebooks\V1\Instance', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetInstanceHealth' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Notebooks\V1\GetInstanceHealthResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetSchedule' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Notebooks\V1\Schedule', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'IsInstanceUpgradeable' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Notebooks\V1\IsInstanceUpgradeableResponse', + 'headerParams' => [ + [ + 'keyName' => 'notebook_instance', + 'fieldAccessors' => [ + 'getNotebookInstance', + ], + ], + ], + ], + 'ListEnvironments' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getEnvironments', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Notebooks\V1\ListEnvironmentsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListExecutions' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getExecutions', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Notebooks\V1\ListExecutionsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListInstances' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getInstances', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Notebooks\V1\ListInstancesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListSchedules' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getSchedules', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Notebooks\V1\ListSchedulesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateInstanceMetadataItems' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Notebooks\V1\UpdateInstanceMetadataItemsResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetLocation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Location\Location', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'GetIamPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'SetIamPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'TestIamPermissions' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'templateMap' => [ + 'environment' => 'projects/{project}/environments/{environment}', + 'execution' => 'projects/{project}/location/{location}/executions/{execution}', + 'instance' => 'projects/{project}/instances/{instance}', + 'schedule' => 'projects/{project}/location/{location}/schedules/{schedule}', + 'tensorboard' => 'projects/{project}/locations/{location}/tensorboards/{tensorboard}', + ], + ], + ], +]; diff --git a/owl-bot-staging/Notebooks/v1/src/V1/resources/notebook_service_rest_client_config.php b/owl-bot-staging/Notebooks/v1/src/V1/resources/notebook_service_rest_client_config.php new file mode 100644 index 000000000000..ab6bb270a12e --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/src/V1/resources/notebook_service_rest_client_config.php @@ -0,0 +1,563 @@ + [ + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.cloud.notebooks.v1.NotebookService' => [ + 'CreateEnvironment' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/environments', + 'body' => 'environment', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'environment_id', + ], + ], + 'CreateExecution' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/executions', + 'body' => 'execution', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'execution_id', + ], + ], + 'CreateInstance' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/instances', + 'body' => 'instance', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'instance_id', + ], + ], + 'CreateSchedule' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/schedules', + 'body' => 'schedule', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'schedule_id', + ], + ], + 'DeleteEnvironment' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/environments/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteExecution' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/executions/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteInstance' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteSchedule' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/schedules/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DiagnoseInstance' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*}:diagnose', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetEnvironment' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/environments/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetExecution' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/executions/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetInstance' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetInstanceHealth' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*}:getInstanceHealth', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetSchedule' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/schedules/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'IsInstanceUpgradeable' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{notebook_instance=projects/*/locations/*/instances/*}:isUpgradeable', + 'placeholders' => [ + 'notebook_instance' => [ + 'getters' => [ + 'getNotebookInstance', + ], + ], + ], + ], + 'ListEnvironments' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/environments', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListExecutions' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/executions', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListInstances' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/instances', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListSchedules' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/schedules', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'RegisterInstance' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/instances:register', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ReportInstanceInfo' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*}:report', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ResetInstance' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*}:reset', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'RollbackInstance' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*}:rollback', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'SetInstanceAccelerator' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*}:setAccelerator', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'SetInstanceLabels' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*}:setLabels', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'SetInstanceMachineType' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*}:setMachineType', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'StartInstance' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*}:start', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'StopInstance' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*}:stop', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'TriggerSchedule' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/schedules/*}:trigger', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'UpdateInstanceConfig' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*}:updateConfig', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'UpdateInstanceMetadataItems' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*}:updateMetadataItems', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'UpdateShieldedInstanceConfig' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*}:updateShieldedInstanceConfig', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'UpgradeInstance' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*}:upgrade', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'UpgradeInstanceInternal' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*}:upgradeInternal', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.iam.v1.IAMPolicy' => [ + 'GetIamPolicy' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/instances/*}:getIamPolicy', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/runtimes/*}:getIamPolicy', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'SetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/instances/*}:setIamPolicy', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/runtimes/*}:setIamPolicy', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'TestIamPermissions' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/instances/*}:testIamPermissions', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/runtimes/*}:testIamPermissions', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Notebooks/v1/tests/Unit/V1/Client/ManagedNotebookServiceClientTest.php b/owl-bot-staging/Notebooks/v1/tests/Unit/V1/Client/ManagedNotebookServiceClientTest.php new file mode 100644 index 000000000000..561fca0d704c --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/tests/Unit/V1/Client/ManagedNotebookServiceClientTest.php @@ -0,0 +1,1971 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return ManagedNotebookServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new ManagedNotebookServiceClient($options); + } + + /** @test */ + public function createRuntimeTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createRuntimeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $expectedResponse = new Runtime(); + $expectedResponse->setName($name); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createRuntimeTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->runtimeName('[PROJECT]', '[LOCATION]', '[RUNTIME]'); + $runtimeId = 'runtimeId-529829150'; + $runtime = new Runtime(); + $request = (new CreateRuntimeRequest()) + ->setParent($formattedParent) + ->setRuntimeId($runtimeId) + ->setRuntime($runtime); + $response = $gapicClient->createRuntime($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.notebooks.v1.ManagedNotebookService/CreateRuntime', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getRuntimeId(); + $this->assertProtobufEquals($runtimeId, $actualValue); + $actualValue = $actualApiRequestObject->getRuntime(); + $this->assertProtobufEquals($runtime, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createRuntimeTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createRuntimeExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createRuntimeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->runtimeName('[PROJECT]', '[LOCATION]', '[RUNTIME]'); + $runtimeId = 'runtimeId-529829150'; + $runtime = new Runtime(); + $request = (new CreateRuntimeRequest()) + ->setParent($formattedParent) + ->setRuntimeId($runtimeId) + ->setRuntime($runtime); + $response = $gapicClient->createRuntime($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createRuntimeTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteRuntimeTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteRuntimeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteRuntimeTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->runtimeName('[PROJECT]', '[LOCATION]', '[RUNTIME]'); + $request = (new DeleteRuntimeRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteRuntime($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.notebooks.v1.ManagedNotebookService/DeleteRuntime', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteRuntimeTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteRuntimeExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteRuntimeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->runtimeName('[PROJECT]', '[LOCATION]', '[RUNTIME]'); + $request = (new DeleteRuntimeRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteRuntime($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteRuntimeTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function diagnoseRuntimeTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/diagnoseRuntimeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $expectedResponse = new Runtime(); + $expectedResponse->setName($name2); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/diagnoseRuntimeTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->runtimeName('[PROJECT]', '[LOCATION]', '[RUNTIME]'); + $diagnosticConfig = new DiagnosticConfig(); + $diagnosticConfigGcsBucket = 'diagnosticConfigGcsBucket-1116063720'; + $diagnosticConfig->setGcsBucket($diagnosticConfigGcsBucket); + $request = (new DiagnoseRuntimeRequest()) + ->setName($formattedName) + ->setDiagnosticConfig($diagnosticConfig); + $response = $gapicClient->diagnoseRuntime($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.notebooks.v1.ManagedNotebookService/DiagnoseRuntime', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualApiRequestObject->getDiagnosticConfig(); + $this->assertProtobufEquals($diagnosticConfig, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/diagnoseRuntimeTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function diagnoseRuntimeExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/diagnoseRuntimeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->runtimeName('[PROJECT]', '[LOCATION]', '[RUNTIME]'); + $diagnosticConfig = new DiagnosticConfig(); + $diagnosticConfigGcsBucket = 'diagnosticConfigGcsBucket-1116063720'; + $diagnosticConfig->setGcsBucket($diagnosticConfigGcsBucket); + $request = (new DiagnoseRuntimeRequest()) + ->setName($formattedName) + ->setDiagnosticConfig($diagnosticConfig); + $response = $gapicClient->diagnoseRuntime($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/diagnoseRuntimeTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getRuntimeTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new Runtime(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->runtimeName('[PROJECT]', '[LOCATION]', '[RUNTIME]'); + $request = (new GetRuntimeRequest()) + ->setName($formattedName); + $response = $gapicClient->getRuntime($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.notebooks.v1.ManagedNotebookService/GetRuntime', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getRuntimeExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->runtimeName('[PROJECT]', '[LOCATION]', '[RUNTIME]'); + $request = (new GetRuntimeRequest()) + ->setName($formattedName); + try { + $gapicClient->getRuntime($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listRuntimesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $runtimesElement = new Runtime(); + $runtimes = [ + $runtimesElement, + ]; + $expectedResponse = new ListRuntimesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setRuntimes($runtimes); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListRuntimesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listRuntimes($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getRuntimes()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.notebooks.v1.ManagedNotebookService/ListRuntimes', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listRuntimesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListRuntimesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listRuntimes($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function refreshRuntimeTokenInternalTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $accessToken = 'accessToken-1938933922'; + $expectedResponse = new RefreshRuntimeTokenInternalResponse(); + $expectedResponse->setAccessToken($accessToken); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->runtimeName('[PROJECT]', '[LOCATION]', '[RUNTIME]'); + $vmId = 'vmId112317347'; + $request = (new RefreshRuntimeTokenInternalRequest()) + ->setName($formattedName) + ->setVmId($vmId); + $response = $gapicClient->refreshRuntimeTokenInternal($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.notebooks.v1.ManagedNotebookService/RefreshRuntimeTokenInternal', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getVmId(); + $this->assertProtobufEquals($vmId, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function refreshRuntimeTokenInternalExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->runtimeName('[PROJECT]', '[LOCATION]', '[RUNTIME]'); + $vmId = 'vmId112317347'; + $request = (new RefreshRuntimeTokenInternalRequest()) + ->setName($formattedName) + ->setVmId($vmId); + try { + $gapicClient->refreshRuntimeTokenInternal($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function reportRuntimeEventTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/reportRuntimeEventTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $expectedResponse = new Runtime(); + $expectedResponse->setName($name2); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/reportRuntimeEventTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->runtimeName('[PROJECT]', '[LOCATION]', '[RUNTIME]'); + $vmId = 'vmId112317347'; + $event = new Event(); + $request = (new ReportRuntimeEventRequest()) + ->setName($formattedName) + ->setVmId($vmId) + ->setEvent($event); + $response = $gapicClient->reportRuntimeEvent($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.notebooks.v1.ManagedNotebookService/ReportRuntimeEvent', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualApiRequestObject->getVmId(); + $this->assertProtobufEquals($vmId, $actualValue); + $actualValue = $actualApiRequestObject->getEvent(); + $this->assertProtobufEquals($event, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/reportRuntimeEventTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function reportRuntimeEventExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/reportRuntimeEventTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->runtimeName('[PROJECT]', '[LOCATION]', '[RUNTIME]'); + $vmId = 'vmId112317347'; + $event = new Event(); + $request = (new ReportRuntimeEventRequest()) + ->setName($formattedName) + ->setVmId($vmId) + ->setEvent($event); + $response = $gapicClient->reportRuntimeEvent($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/reportRuntimeEventTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function resetRuntimeTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/resetRuntimeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $expectedResponse = new Runtime(); + $expectedResponse->setName($name2); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/resetRuntimeTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $name = 'name3373707'; + $request = (new ResetRuntimeRequest()) + ->setName($name); + $response = $gapicClient->resetRuntime($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.notebooks.v1.ManagedNotebookService/ResetRuntime', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/resetRuntimeTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function resetRuntimeExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/resetRuntimeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $name = 'name3373707'; + $request = (new ResetRuntimeRequest()) + ->setName($name); + $response = $gapicClient->resetRuntime($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/resetRuntimeTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function startRuntimeTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/startRuntimeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $expectedResponse = new Runtime(); + $expectedResponse->setName($name2); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/startRuntimeTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $name = 'name3373707'; + $request = (new StartRuntimeRequest()) + ->setName($name); + $response = $gapicClient->startRuntime($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.notebooks.v1.ManagedNotebookService/StartRuntime', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/startRuntimeTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function startRuntimeExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/startRuntimeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $name = 'name3373707'; + $request = (new StartRuntimeRequest()) + ->setName($name); + $response = $gapicClient->startRuntime($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/startRuntimeTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function stopRuntimeTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/stopRuntimeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $expectedResponse = new Runtime(); + $expectedResponse->setName($name2); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/stopRuntimeTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $name = 'name3373707'; + $request = (new StopRuntimeRequest()) + ->setName($name); + $response = $gapicClient->stopRuntime($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.notebooks.v1.ManagedNotebookService/StopRuntime', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/stopRuntimeTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function stopRuntimeExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/stopRuntimeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $name = 'name3373707'; + $request = (new StopRuntimeRequest()) + ->setName($name); + $response = $gapicClient->stopRuntime($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/stopRuntimeTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function switchRuntimeTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/switchRuntimeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $expectedResponse = new Runtime(); + $expectedResponse->setName($name2); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/switchRuntimeTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $name = 'name3373707'; + $request = (new SwitchRuntimeRequest()) + ->setName($name); + $response = $gapicClient->switchRuntime($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.notebooks.v1.ManagedNotebookService/SwitchRuntime', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/switchRuntimeTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function switchRuntimeExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/switchRuntimeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $name = 'name3373707'; + $request = (new SwitchRuntimeRequest()) + ->setName($name); + $response = $gapicClient->switchRuntime($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/switchRuntimeTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateRuntimeTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateRuntimeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $expectedResponse = new Runtime(); + $expectedResponse->setName($name); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateRuntimeTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $runtime = new Runtime(); + $updateMask = new FieldMask(); + $request = (new UpdateRuntimeRequest()) + ->setRuntime($runtime) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateRuntime($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.notebooks.v1.ManagedNotebookService/UpdateRuntime', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getRuntime(); + $this->assertProtobufEquals($runtime, $actualValue); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateRuntimeTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateRuntimeExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateRuntimeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $runtime = new Runtime(); + $updateMask = new FieldMask(); + $request = (new UpdateRuntimeRequest()) + ->setRuntime($runtime) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateRuntime($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateRuntimeTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function upgradeRuntimeTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/upgradeRuntimeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $expectedResponse = new Runtime(); + $expectedResponse->setName($name2); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/upgradeRuntimeTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $name = 'name3373707'; + $request = (new UpgradeRuntimeRequest()) + ->setName($name); + $response = $gapicClient->upgradeRuntime($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.notebooks.v1.ManagedNotebookService/UpgradeRuntime', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/upgradeRuntimeTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function upgradeRuntimeExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/upgradeRuntimeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $name = 'name3373707'; + $request = (new UpgradeRuntimeRequest()) + ->setName($name); + $response = $gapicClient->upgradeRuntime($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/upgradeRuntimeTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getLocationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $locationId = 'locationId552319461'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Location(); + $expectedResponse->setName($name2); + $expectedResponse->setLocationId($locationId); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + $request = new GetLocationRequest(); + $response = $gapicClient->getLocation($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new GetLocationRequest(); + try { + $gapicClient->getLocation($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $locationsElement = new Location(); + $locations = [ + $locationsElement, + ]; + $expectedResponse = new ListLocationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setLocations($locations); + $transport->addResponse($expectedResponse); + $request = new ListLocationsRequest(); + $response = $gapicClient->listLocations($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new ListLocationsRequest(); + try { + $gapicClient->listLocations($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $request = (new GetIamPolicyRequest()) + ->setResource($resource); + $response = $gapicClient->getIamPolicy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $request = (new GetIamPolicyRequest()) + ->setResource($resource); + try { + $gapicClient->getIamPolicy($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $request = (new SetIamPolicyRequest()) + ->setResource($resource) + ->setPolicy($policy); + $response = $gapicClient->setIamPolicy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPolicy(); + $this->assertProtobufEquals($policy, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $request = (new SetIamPolicyRequest()) + ->setResource($resource) + ->setPolicy($policy); + try { + $gapicClient->setIamPolicy($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new TestIamPermissionsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $request = (new TestIamPermissionsRequest()) + ->setResource($resource) + ->setPermissions($permissions); + $response = $gapicClient->testIamPermissions($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPermissions(); + $this->assertProtobufEquals($permissions, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $request = (new TestIamPermissionsRequest()) + ->setResource($resource) + ->setPermissions($permissions); + try { + $gapicClient->testIamPermissions($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createRuntimeAsyncTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createRuntimeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $expectedResponse = new Runtime(); + $expectedResponse->setName($name); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createRuntimeTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->runtimeName('[PROJECT]', '[LOCATION]', '[RUNTIME]'); + $runtimeId = 'runtimeId-529829150'; + $runtime = new Runtime(); + $request = (new CreateRuntimeRequest()) + ->setParent($formattedParent) + ->setRuntimeId($runtimeId) + ->setRuntime($runtime); + $response = $gapicClient->createRuntimeAsync($request)->wait(); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.notebooks.v1.ManagedNotebookService/CreateRuntime', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getRuntimeId(); + $this->assertProtobufEquals($runtimeId, $actualValue); + $actualValue = $actualApiRequestObject->getRuntime(); + $this->assertProtobufEquals($runtime, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createRuntimeTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } +} diff --git a/owl-bot-staging/Notebooks/v1/tests/Unit/V1/Client/NotebookServiceClientTest.php b/owl-bot-staging/Notebooks/v1/tests/Unit/V1/Client/NotebookServiceClientTest.php new file mode 100644 index 000000000000..48455ba3ee8a --- /dev/null +++ b/owl-bot-staging/Notebooks/v1/tests/Unit/V1/Client/NotebookServiceClientTest.php @@ -0,0 +1,4758 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return NotebookServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new NotebookServiceClient($options); + } + + /** @test */ + public function createEnvironmentTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createEnvironmentTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $postStartupScript = 'postStartupScript355382860'; + $expectedResponse = new Environment(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setPostStartupScript($postStartupScript); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createEnvironmentTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $parent = 'parent-995424086'; + $environmentId = 'environmentId608412359'; + $environment = new Environment(); + $request = (new CreateEnvironmentRequest()) + ->setParent($parent) + ->setEnvironmentId($environmentId) + ->setEnvironment($environment); + $response = $gapicClient->createEnvironment($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.notebooks.v1.NotebookService/CreateEnvironment', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($parent, $actualValue); + $actualValue = $actualApiRequestObject->getEnvironmentId(); + $this->assertProtobufEquals($environmentId, $actualValue); + $actualValue = $actualApiRequestObject->getEnvironment(); + $this->assertProtobufEquals($environment, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createEnvironmentTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createEnvironmentExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createEnvironmentTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $parent = 'parent-995424086'; + $environmentId = 'environmentId608412359'; + $environment = new Environment(); + $request = (new CreateEnvironmentRequest()) + ->setParent($parent) + ->setEnvironmentId($environmentId) + ->setEnvironment($environment); + $response = $gapicClient->createEnvironment($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createEnvironmentTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createExecutionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createExecutionTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $outputNotebookFile = 'outputNotebookFile-1905093982'; + $jobUri = 'jobUri-1437570582'; + $expectedResponse = new Execution(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setOutputNotebookFile($outputNotebookFile); + $expectedResponse->setJobUri($jobUri); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createExecutionTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->executionName('[PROJECT]', '[LOCATION]', '[EXECUTION]'); + $executionId = 'executionId-1217171550'; + $execution = new Execution(); + $request = (new CreateExecutionRequest()) + ->setParent($formattedParent) + ->setExecutionId($executionId) + ->setExecution($execution); + $response = $gapicClient->createExecution($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.notebooks.v1.NotebookService/CreateExecution', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getExecutionId(); + $this->assertProtobufEquals($executionId, $actualValue); + $actualValue = $actualApiRequestObject->getExecution(); + $this->assertProtobufEquals($execution, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createExecutionTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createExecutionExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createExecutionTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->executionName('[PROJECT]', '[LOCATION]', '[EXECUTION]'); + $executionId = 'executionId-1217171550'; + $execution = new Execution(); + $request = (new CreateExecutionRequest()) + ->setParent($formattedParent) + ->setExecutionId($executionId) + ->setExecution($execution); + $response = $gapicClient->createExecution($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createExecutionTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createInstanceTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createInstanceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $postStartupScript = 'postStartupScript355382860'; + $proxyUri = 'proxyUri-475670501'; + $serviceAccount = 'serviceAccount-1948028253'; + $machineType = 'machineType1838323762'; + $installGpuDriver = false; + $customGpuDriverPath = 'customGpuDriverPath1863223803'; + $bootDiskSizeGb = 1398920548; + $dataDiskSizeGb = 1668379732; + $noRemoveDataDisk = false; + $kmsKey = 'kmsKey-591635343'; + $noPublicIp = false; + $noProxyAccess = false; + $network = 'network1843485230'; + $subnet = 'subnet-891534499'; + $creator = 'creator1028554796'; + $canIpForward = true; + $expectedResponse = new Instance(); + $expectedResponse->setName($name); + $expectedResponse->setPostStartupScript($postStartupScript); + $expectedResponse->setProxyUri($proxyUri); + $expectedResponse->setServiceAccount($serviceAccount); + $expectedResponse->setMachineType($machineType); + $expectedResponse->setInstallGpuDriver($installGpuDriver); + $expectedResponse->setCustomGpuDriverPath($customGpuDriverPath); + $expectedResponse->setBootDiskSizeGb($bootDiskSizeGb); + $expectedResponse->setDataDiskSizeGb($dataDiskSizeGb); + $expectedResponse->setNoRemoveDataDisk($noRemoveDataDisk); + $expectedResponse->setKmsKey($kmsKey); + $expectedResponse->setNoPublicIp($noPublicIp); + $expectedResponse->setNoProxyAccess($noProxyAccess); + $expectedResponse->setNetwork($network); + $expectedResponse->setSubnet($subnet); + $expectedResponse->setCreator($creator); + $expectedResponse->setCanIpForward($canIpForward); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createInstanceTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $parent = 'parent-995424086'; + $instanceId = 'instanceId-2101995259'; + $instance = new Instance(); + $instanceMachineType = 'instanceMachineType-107765684'; + $instance->setMachineType($instanceMachineType); + $request = (new CreateInstanceRequest()) + ->setParent($parent) + ->setInstanceId($instanceId) + ->setInstance($instance); + $response = $gapicClient->createInstance($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.notebooks.v1.NotebookService/CreateInstance', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($parent, $actualValue); + $actualValue = $actualApiRequestObject->getInstanceId(); + $this->assertProtobufEquals($instanceId, $actualValue); + $actualValue = $actualApiRequestObject->getInstance(); + $this->assertProtobufEquals($instance, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createInstanceTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createInstanceExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createInstanceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $parent = 'parent-995424086'; + $instanceId = 'instanceId-2101995259'; + $instance = new Instance(); + $instanceMachineType = 'instanceMachineType-107765684'; + $instance->setMachineType($instanceMachineType); + $request = (new CreateInstanceRequest()) + ->setParent($parent) + ->setInstanceId($instanceId) + ->setInstance($instance); + $response = $gapicClient->createInstance($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createInstanceTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createScheduleTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createScheduleTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $cronSchedule = 'cronSchedule206244136'; + $timeZone = 'timeZone36848094'; + $expectedResponse = new Schedule(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setCronSchedule($cronSchedule); + $expectedResponse->setTimeZone($timeZone); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createScheduleTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->scheduleName('[PROJECT]', '[LOCATION]', '[SCHEDULE]'); + $scheduleId = 'scheduleId176047043'; + $schedule = new Schedule(); + $request = (new CreateScheduleRequest()) + ->setParent($formattedParent) + ->setScheduleId($scheduleId) + ->setSchedule($schedule); + $response = $gapicClient->createSchedule($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.notebooks.v1.NotebookService/CreateSchedule', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getScheduleId(); + $this->assertProtobufEquals($scheduleId, $actualValue); + $actualValue = $actualApiRequestObject->getSchedule(); + $this->assertProtobufEquals($schedule, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createScheduleTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createScheduleExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createScheduleTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->scheduleName('[PROJECT]', '[LOCATION]', '[SCHEDULE]'); + $scheduleId = 'scheduleId176047043'; + $schedule = new Schedule(); + $request = (new CreateScheduleRequest()) + ->setParent($formattedParent) + ->setScheduleId($scheduleId) + ->setSchedule($schedule); + $response = $gapicClient->createSchedule($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createScheduleTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteEnvironmentTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteEnvironmentTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteEnvironmentTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $name = 'name3373707'; + $request = (new DeleteEnvironmentRequest()) + ->setName($name); + $response = $gapicClient->deleteEnvironment($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.notebooks.v1.NotebookService/DeleteEnvironment', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteEnvironmentTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteEnvironmentExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteEnvironmentTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $name = 'name3373707'; + $request = (new DeleteEnvironmentRequest()) + ->setName($name); + $response = $gapicClient->deleteEnvironment($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteEnvironmentTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteExecutionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteExecutionTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteExecutionTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->executionName('[PROJECT]', '[LOCATION]', '[EXECUTION]'); + $request = (new DeleteExecutionRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteExecution($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.notebooks.v1.NotebookService/DeleteExecution', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteExecutionTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteExecutionExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteExecutionTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->executionName('[PROJECT]', '[LOCATION]', '[EXECUTION]'); + $request = (new DeleteExecutionRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteExecution($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteExecutionTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteInstanceTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteInstanceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteInstanceTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $name = 'name3373707'; + $request = (new DeleteInstanceRequest()) + ->setName($name); + $response = $gapicClient->deleteInstance($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.notebooks.v1.NotebookService/DeleteInstance', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteInstanceTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteInstanceExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteInstanceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $name = 'name3373707'; + $request = (new DeleteInstanceRequest()) + ->setName($name); + $response = $gapicClient->deleteInstance($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteInstanceTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteScheduleTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteScheduleTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteScheduleTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->scheduleName('[PROJECT]', '[LOCATION]', '[SCHEDULE]'); + $request = (new DeleteScheduleRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteSchedule($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.notebooks.v1.NotebookService/DeleteSchedule', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteScheduleTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteScheduleExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteScheduleTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->scheduleName('[PROJECT]', '[LOCATION]', '[SCHEDULE]'); + $request = (new DeleteScheduleRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteSchedule($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteScheduleTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function diagnoseInstanceTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/diagnoseInstanceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $postStartupScript = 'postStartupScript355382860'; + $proxyUri = 'proxyUri-475670501'; + $serviceAccount = 'serviceAccount-1948028253'; + $machineType = 'machineType1838323762'; + $installGpuDriver = false; + $customGpuDriverPath = 'customGpuDriverPath1863223803'; + $bootDiskSizeGb = 1398920548; + $dataDiskSizeGb = 1668379732; + $noRemoveDataDisk = false; + $kmsKey = 'kmsKey-591635343'; + $noPublicIp = false; + $noProxyAccess = false; + $network = 'network1843485230'; + $subnet = 'subnet-891534499'; + $creator = 'creator1028554796'; + $canIpForward = true; + $expectedResponse = new Instance(); + $expectedResponse->setName($name2); + $expectedResponse->setPostStartupScript($postStartupScript); + $expectedResponse->setProxyUri($proxyUri); + $expectedResponse->setServiceAccount($serviceAccount); + $expectedResponse->setMachineType($machineType); + $expectedResponse->setInstallGpuDriver($installGpuDriver); + $expectedResponse->setCustomGpuDriverPath($customGpuDriverPath); + $expectedResponse->setBootDiskSizeGb($bootDiskSizeGb); + $expectedResponse->setDataDiskSizeGb($dataDiskSizeGb); + $expectedResponse->setNoRemoveDataDisk($noRemoveDataDisk); + $expectedResponse->setKmsKey($kmsKey); + $expectedResponse->setNoPublicIp($noPublicIp); + $expectedResponse->setNoProxyAccess($noProxyAccess); + $expectedResponse->setNetwork($network); + $expectedResponse->setSubnet($subnet); + $expectedResponse->setCreator($creator); + $expectedResponse->setCanIpForward($canIpForward); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/diagnoseInstanceTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->instanceName('[PROJECT]', '[INSTANCE]'); + $diagnosticConfig = new DiagnosticConfig(); + $diagnosticConfigGcsBucket = 'diagnosticConfigGcsBucket-1116063720'; + $diagnosticConfig->setGcsBucket($diagnosticConfigGcsBucket); + $request = (new DiagnoseInstanceRequest()) + ->setName($formattedName) + ->setDiagnosticConfig($diagnosticConfig); + $response = $gapicClient->diagnoseInstance($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.notebooks.v1.NotebookService/DiagnoseInstance', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualApiRequestObject->getDiagnosticConfig(); + $this->assertProtobufEquals($diagnosticConfig, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/diagnoseInstanceTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function diagnoseInstanceExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/diagnoseInstanceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->instanceName('[PROJECT]', '[INSTANCE]'); + $diagnosticConfig = new DiagnosticConfig(); + $diagnosticConfigGcsBucket = 'diagnosticConfigGcsBucket-1116063720'; + $diagnosticConfig->setGcsBucket($diagnosticConfigGcsBucket); + $request = (new DiagnoseInstanceRequest()) + ->setName($formattedName) + ->setDiagnosticConfig($diagnosticConfig); + $response = $gapicClient->diagnoseInstance($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/diagnoseInstanceTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getEnvironmentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $postStartupScript = 'postStartupScript355382860'; + $expectedResponse = new Environment(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setPostStartupScript($postStartupScript); + $transport->addResponse($expectedResponse); + // Mock request + $name = 'name3373707'; + $request = (new GetEnvironmentRequest()) + ->setName($name); + $response = $gapicClient->getEnvironment($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.notebooks.v1.NotebookService/GetEnvironment', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getEnvironmentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $name = 'name3373707'; + $request = (new GetEnvironmentRequest()) + ->setName($name); + try { + $gapicClient->getEnvironment($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getExecutionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $outputNotebookFile = 'outputNotebookFile-1905093982'; + $jobUri = 'jobUri-1437570582'; + $expectedResponse = new Execution(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setOutputNotebookFile($outputNotebookFile); + $expectedResponse->setJobUri($jobUri); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->executionName('[PROJECT]', '[LOCATION]', '[EXECUTION]'); + $request = (new GetExecutionRequest()) + ->setName($formattedName); + $response = $gapicClient->getExecution($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.notebooks.v1.NotebookService/GetExecution', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getExecutionExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->executionName('[PROJECT]', '[LOCATION]', '[EXECUTION]'); + $request = (new GetExecutionRequest()) + ->setName($formattedName); + try { + $gapicClient->getExecution($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getInstanceTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $postStartupScript = 'postStartupScript355382860'; + $proxyUri = 'proxyUri-475670501'; + $serviceAccount = 'serviceAccount-1948028253'; + $machineType = 'machineType1838323762'; + $installGpuDriver = false; + $customGpuDriverPath = 'customGpuDriverPath1863223803'; + $bootDiskSizeGb = 1398920548; + $dataDiskSizeGb = 1668379732; + $noRemoveDataDisk = false; + $kmsKey = 'kmsKey-591635343'; + $noPublicIp = false; + $noProxyAccess = false; + $network = 'network1843485230'; + $subnet = 'subnet-891534499'; + $creator = 'creator1028554796'; + $canIpForward = true; + $expectedResponse = new Instance(); + $expectedResponse->setName($name2); + $expectedResponse->setPostStartupScript($postStartupScript); + $expectedResponse->setProxyUri($proxyUri); + $expectedResponse->setServiceAccount($serviceAccount); + $expectedResponse->setMachineType($machineType); + $expectedResponse->setInstallGpuDriver($installGpuDriver); + $expectedResponse->setCustomGpuDriverPath($customGpuDriverPath); + $expectedResponse->setBootDiskSizeGb($bootDiskSizeGb); + $expectedResponse->setDataDiskSizeGb($dataDiskSizeGb); + $expectedResponse->setNoRemoveDataDisk($noRemoveDataDisk); + $expectedResponse->setKmsKey($kmsKey); + $expectedResponse->setNoPublicIp($noPublicIp); + $expectedResponse->setNoProxyAccess($noProxyAccess); + $expectedResponse->setNetwork($network); + $expectedResponse->setSubnet($subnet); + $expectedResponse->setCreator($creator); + $expectedResponse->setCanIpForward($canIpForward); + $transport->addResponse($expectedResponse); + // Mock request + $name = 'name3373707'; + $request = (new GetInstanceRequest()) + ->setName($name); + $response = $gapicClient->getInstance($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.notebooks.v1.NotebookService/GetInstance', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getInstanceExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $name = 'name3373707'; + $request = (new GetInstanceRequest()) + ->setName($name); + try { + $gapicClient->getInstance($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getInstanceHealthTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GetInstanceHealthResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->instanceName('[PROJECT]', '[INSTANCE]'); + $request = (new GetInstanceHealthRequest()) + ->setName($formattedName); + $response = $gapicClient->getInstanceHealth($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.notebooks.v1.NotebookService/GetInstanceHealth', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getInstanceHealthExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->instanceName('[PROJECT]', '[INSTANCE]'); + $request = (new GetInstanceHealthRequest()) + ->setName($formattedName); + try { + $gapicClient->getInstanceHealth($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getScheduleTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $cronSchedule = 'cronSchedule206244136'; + $timeZone = 'timeZone36848094'; + $expectedResponse = new Schedule(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setCronSchedule($cronSchedule); + $expectedResponse->setTimeZone($timeZone); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->scheduleName('[PROJECT]', '[LOCATION]', '[SCHEDULE]'); + $request = (new GetScheduleRequest()) + ->setName($formattedName); + $response = $gapicClient->getSchedule($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.notebooks.v1.NotebookService/GetSchedule', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getScheduleExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->scheduleName('[PROJECT]', '[LOCATION]', '[SCHEDULE]'); + $request = (new GetScheduleRequest()) + ->setName($formattedName); + try { + $gapicClient->getSchedule($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function isInstanceUpgradeableTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $upgradeable = true; + $upgradeVersion = 'upgradeVersion1040155061'; + $upgradeInfo = 'upgradeInfo-1337232143'; + $upgradeImage = 'upgradeImage1495441784'; + $expectedResponse = new IsInstanceUpgradeableResponse(); + $expectedResponse->setUpgradeable($upgradeable); + $expectedResponse->setUpgradeVersion($upgradeVersion); + $expectedResponse->setUpgradeInfo($upgradeInfo); + $expectedResponse->setUpgradeImage($upgradeImage); + $transport->addResponse($expectedResponse); + // Mock request + $notebookInstance = 'notebookInstance-1078982023'; + $request = (new IsInstanceUpgradeableRequest()) + ->setNotebookInstance($notebookInstance); + $response = $gapicClient->isInstanceUpgradeable($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.notebooks.v1.NotebookService/IsInstanceUpgradeable', $actualFuncCall); + $actualValue = $actualRequestObject->getNotebookInstance(); + $this->assertProtobufEquals($notebookInstance, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function isInstanceUpgradeableExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $notebookInstance = 'notebookInstance-1078982023'; + $request = (new IsInstanceUpgradeableRequest()) + ->setNotebookInstance($notebookInstance); + try { + $gapicClient->isInstanceUpgradeable($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listEnvironmentsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $environmentsElement = new Environment(); + $environments = [ + $environmentsElement, + ]; + $expectedResponse = new ListEnvironmentsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setEnvironments($environments); + $transport->addResponse($expectedResponse); + // Mock request + $parent = 'parent-995424086'; + $request = (new ListEnvironmentsRequest()) + ->setParent($parent); + $response = $gapicClient->listEnvironments($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getEnvironments()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.notebooks.v1.NotebookService/ListEnvironments', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($parent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listEnvironmentsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $parent = 'parent-995424086'; + $request = (new ListEnvironmentsRequest()) + ->setParent($parent); + try { + $gapicClient->listEnvironments($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listExecutionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $executionsElement = new Execution(); + $executions = [ + $executionsElement, + ]; + $expectedResponse = new ListExecutionsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setExecutions($executions); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->executionName('[PROJECT]', '[LOCATION]', '[EXECUTION]'); + $request = (new ListExecutionsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listExecutions($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getExecutions()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.notebooks.v1.NotebookService/ListExecutions', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listExecutionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->executionName('[PROJECT]', '[LOCATION]', '[EXECUTION]'); + $request = (new ListExecutionsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listExecutions($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listInstancesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $instancesElement = new Instance(); + $instances = [ + $instancesElement, + ]; + $expectedResponse = new ListInstancesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setInstances($instances); + $transport->addResponse($expectedResponse); + // Mock request + $parent = 'parent-995424086'; + $request = (new ListInstancesRequest()) + ->setParent($parent); + $response = $gapicClient->listInstances($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getInstances()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.notebooks.v1.NotebookService/ListInstances', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($parent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listInstancesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $parent = 'parent-995424086'; + $request = (new ListInstancesRequest()) + ->setParent($parent); + try { + $gapicClient->listInstances($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listSchedulesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $schedulesElement = new Schedule(); + $schedules = [ + $schedulesElement, + ]; + $expectedResponse = new ListSchedulesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setSchedules($schedules); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->scheduleName('[PROJECT]', '[LOCATION]', '[SCHEDULE]'); + $request = (new ListSchedulesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listSchedules($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getSchedules()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.notebooks.v1.NotebookService/ListSchedules', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listSchedulesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->scheduleName('[PROJECT]', '[LOCATION]', '[SCHEDULE]'); + $request = (new ListSchedulesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listSchedules($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function registerInstanceTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/registerInstanceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $postStartupScript = 'postStartupScript355382860'; + $proxyUri = 'proxyUri-475670501'; + $serviceAccount = 'serviceAccount-1948028253'; + $machineType = 'machineType1838323762'; + $installGpuDriver = false; + $customGpuDriverPath = 'customGpuDriverPath1863223803'; + $bootDiskSizeGb = 1398920548; + $dataDiskSizeGb = 1668379732; + $noRemoveDataDisk = false; + $kmsKey = 'kmsKey-591635343'; + $noPublicIp = false; + $noProxyAccess = false; + $network = 'network1843485230'; + $subnet = 'subnet-891534499'; + $creator = 'creator1028554796'; + $canIpForward = true; + $expectedResponse = new Instance(); + $expectedResponse->setName($name); + $expectedResponse->setPostStartupScript($postStartupScript); + $expectedResponse->setProxyUri($proxyUri); + $expectedResponse->setServiceAccount($serviceAccount); + $expectedResponse->setMachineType($machineType); + $expectedResponse->setInstallGpuDriver($installGpuDriver); + $expectedResponse->setCustomGpuDriverPath($customGpuDriverPath); + $expectedResponse->setBootDiskSizeGb($bootDiskSizeGb); + $expectedResponse->setDataDiskSizeGb($dataDiskSizeGb); + $expectedResponse->setNoRemoveDataDisk($noRemoveDataDisk); + $expectedResponse->setKmsKey($kmsKey); + $expectedResponse->setNoPublicIp($noPublicIp); + $expectedResponse->setNoProxyAccess($noProxyAccess); + $expectedResponse->setNetwork($network); + $expectedResponse->setSubnet($subnet); + $expectedResponse->setCreator($creator); + $expectedResponse->setCanIpForward($canIpForward); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/registerInstanceTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $parent = 'parent-995424086'; + $instanceId = 'instanceId-2101995259'; + $request = (new RegisterInstanceRequest()) + ->setParent($parent) + ->setInstanceId($instanceId); + $response = $gapicClient->registerInstance($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.notebooks.v1.NotebookService/RegisterInstance', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($parent, $actualValue); + $actualValue = $actualApiRequestObject->getInstanceId(); + $this->assertProtobufEquals($instanceId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/registerInstanceTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function registerInstanceExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/registerInstanceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $parent = 'parent-995424086'; + $instanceId = 'instanceId-2101995259'; + $request = (new RegisterInstanceRequest()) + ->setParent($parent) + ->setInstanceId($instanceId); + $response = $gapicClient->registerInstance($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/registerInstanceTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function reportInstanceInfoTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/reportInstanceInfoTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $postStartupScript = 'postStartupScript355382860'; + $proxyUri = 'proxyUri-475670501'; + $serviceAccount = 'serviceAccount-1948028253'; + $machineType = 'machineType1838323762'; + $installGpuDriver = false; + $customGpuDriverPath = 'customGpuDriverPath1863223803'; + $bootDiskSizeGb = 1398920548; + $dataDiskSizeGb = 1668379732; + $noRemoveDataDisk = false; + $kmsKey = 'kmsKey-591635343'; + $noPublicIp = false; + $noProxyAccess = false; + $network = 'network1843485230'; + $subnet = 'subnet-891534499'; + $creator = 'creator1028554796'; + $canIpForward = true; + $expectedResponse = new Instance(); + $expectedResponse->setName($name2); + $expectedResponse->setPostStartupScript($postStartupScript); + $expectedResponse->setProxyUri($proxyUri); + $expectedResponse->setServiceAccount($serviceAccount); + $expectedResponse->setMachineType($machineType); + $expectedResponse->setInstallGpuDriver($installGpuDriver); + $expectedResponse->setCustomGpuDriverPath($customGpuDriverPath); + $expectedResponse->setBootDiskSizeGb($bootDiskSizeGb); + $expectedResponse->setDataDiskSizeGb($dataDiskSizeGb); + $expectedResponse->setNoRemoveDataDisk($noRemoveDataDisk); + $expectedResponse->setKmsKey($kmsKey); + $expectedResponse->setNoPublicIp($noPublicIp); + $expectedResponse->setNoProxyAccess($noProxyAccess); + $expectedResponse->setNetwork($network); + $expectedResponse->setSubnet($subnet); + $expectedResponse->setCreator($creator); + $expectedResponse->setCanIpForward($canIpForward); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/reportInstanceInfoTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $name = 'name3373707'; + $vmId = 'vmId112317347'; + $request = (new ReportInstanceInfoRequest()) + ->setName($name) + ->setVmId($vmId); + $response = $gapicClient->reportInstanceInfo($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.notebooks.v1.NotebookService/ReportInstanceInfo', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $actualValue = $actualApiRequestObject->getVmId(); + $this->assertProtobufEquals($vmId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/reportInstanceInfoTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function reportInstanceInfoExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/reportInstanceInfoTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $name = 'name3373707'; + $vmId = 'vmId112317347'; + $request = (new ReportInstanceInfoRequest()) + ->setName($name) + ->setVmId($vmId); + $response = $gapicClient->reportInstanceInfo($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/reportInstanceInfoTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function resetInstanceTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/resetInstanceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $postStartupScript = 'postStartupScript355382860'; + $proxyUri = 'proxyUri-475670501'; + $serviceAccount = 'serviceAccount-1948028253'; + $machineType = 'machineType1838323762'; + $installGpuDriver = false; + $customGpuDriverPath = 'customGpuDriverPath1863223803'; + $bootDiskSizeGb = 1398920548; + $dataDiskSizeGb = 1668379732; + $noRemoveDataDisk = false; + $kmsKey = 'kmsKey-591635343'; + $noPublicIp = false; + $noProxyAccess = false; + $network = 'network1843485230'; + $subnet = 'subnet-891534499'; + $creator = 'creator1028554796'; + $canIpForward = true; + $expectedResponse = new Instance(); + $expectedResponse->setName($name2); + $expectedResponse->setPostStartupScript($postStartupScript); + $expectedResponse->setProxyUri($proxyUri); + $expectedResponse->setServiceAccount($serviceAccount); + $expectedResponse->setMachineType($machineType); + $expectedResponse->setInstallGpuDriver($installGpuDriver); + $expectedResponse->setCustomGpuDriverPath($customGpuDriverPath); + $expectedResponse->setBootDiskSizeGb($bootDiskSizeGb); + $expectedResponse->setDataDiskSizeGb($dataDiskSizeGb); + $expectedResponse->setNoRemoveDataDisk($noRemoveDataDisk); + $expectedResponse->setKmsKey($kmsKey); + $expectedResponse->setNoPublicIp($noPublicIp); + $expectedResponse->setNoProxyAccess($noProxyAccess); + $expectedResponse->setNetwork($network); + $expectedResponse->setSubnet($subnet); + $expectedResponse->setCreator($creator); + $expectedResponse->setCanIpForward($canIpForward); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/resetInstanceTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $name = 'name3373707'; + $request = (new ResetInstanceRequest()) + ->setName($name); + $response = $gapicClient->resetInstance($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.notebooks.v1.NotebookService/ResetInstance', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/resetInstanceTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function resetInstanceExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/resetInstanceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $name = 'name3373707'; + $request = (new ResetInstanceRequest()) + ->setName($name); + $response = $gapicClient->resetInstance($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/resetInstanceTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function rollbackInstanceTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/rollbackInstanceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $postStartupScript = 'postStartupScript355382860'; + $proxyUri = 'proxyUri-475670501'; + $serviceAccount = 'serviceAccount-1948028253'; + $machineType = 'machineType1838323762'; + $installGpuDriver = false; + $customGpuDriverPath = 'customGpuDriverPath1863223803'; + $bootDiskSizeGb = 1398920548; + $dataDiskSizeGb = 1668379732; + $noRemoveDataDisk = false; + $kmsKey = 'kmsKey-591635343'; + $noPublicIp = false; + $noProxyAccess = false; + $network = 'network1843485230'; + $subnet = 'subnet-891534499'; + $creator = 'creator1028554796'; + $canIpForward = true; + $expectedResponse = new Instance(); + $expectedResponse->setName($name2); + $expectedResponse->setPostStartupScript($postStartupScript); + $expectedResponse->setProxyUri($proxyUri); + $expectedResponse->setServiceAccount($serviceAccount); + $expectedResponse->setMachineType($machineType); + $expectedResponse->setInstallGpuDriver($installGpuDriver); + $expectedResponse->setCustomGpuDriverPath($customGpuDriverPath); + $expectedResponse->setBootDiskSizeGb($bootDiskSizeGb); + $expectedResponse->setDataDiskSizeGb($dataDiskSizeGb); + $expectedResponse->setNoRemoveDataDisk($noRemoveDataDisk); + $expectedResponse->setKmsKey($kmsKey); + $expectedResponse->setNoPublicIp($noPublicIp); + $expectedResponse->setNoProxyAccess($noProxyAccess); + $expectedResponse->setNetwork($network); + $expectedResponse->setSubnet($subnet); + $expectedResponse->setCreator($creator); + $expectedResponse->setCanIpForward($canIpForward); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/rollbackInstanceTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $name = 'name3373707'; + $targetSnapshot = 'targetSnapshot556386482'; + $request = (new RollbackInstanceRequest()) + ->setName($name) + ->setTargetSnapshot($targetSnapshot); + $response = $gapicClient->rollbackInstance($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.notebooks.v1.NotebookService/RollbackInstance', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $actualValue = $actualApiRequestObject->getTargetSnapshot(); + $this->assertProtobufEquals($targetSnapshot, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/rollbackInstanceTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function rollbackInstanceExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/rollbackInstanceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $name = 'name3373707'; + $targetSnapshot = 'targetSnapshot556386482'; + $request = (new RollbackInstanceRequest()) + ->setName($name) + ->setTargetSnapshot($targetSnapshot); + $response = $gapicClient->rollbackInstance($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/rollbackInstanceTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function setInstanceAcceleratorTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/setInstanceAcceleratorTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $postStartupScript = 'postStartupScript355382860'; + $proxyUri = 'proxyUri-475670501'; + $serviceAccount = 'serviceAccount-1948028253'; + $machineType = 'machineType1838323762'; + $installGpuDriver = false; + $customGpuDriverPath = 'customGpuDriverPath1863223803'; + $bootDiskSizeGb = 1398920548; + $dataDiskSizeGb = 1668379732; + $noRemoveDataDisk = false; + $kmsKey = 'kmsKey-591635343'; + $noPublicIp = false; + $noProxyAccess = false; + $network = 'network1843485230'; + $subnet = 'subnet-891534499'; + $creator = 'creator1028554796'; + $canIpForward = true; + $expectedResponse = new Instance(); + $expectedResponse->setName($name2); + $expectedResponse->setPostStartupScript($postStartupScript); + $expectedResponse->setProxyUri($proxyUri); + $expectedResponse->setServiceAccount($serviceAccount); + $expectedResponse->setMachineType($machineType); + $expectedResponse->setInstallGpuDriver($installGpuDriver); + $expectedResponse->setCustomGpuDriverPath($customGpuDriverPath); + $expectedResponse->setBootDiskSizeGb($bootDiskSizeGb); + $expectedResponse->setDataDiskSizeGb($dataDiskSizeGb); + $expectedResponse->setNoRemoveDataDisk($noRemoveDataDisk); + $expectedResponse->setKmsKey($kmsKey); + $expectedResponse->setNoPublicIp($noPublicIp); + $expectedResponse->setNoProxyAccess($noProxyAccess); + $expectedResponse->setNetwork($network); + $expectedResponse->setSubnet($subnet); + $expectedResponse->setCreator($creator); + $expectedResponse->setCanIpForward($canIpForward); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/setInstanceAcceleratorTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $name = 'name3373707'; + $type = AcceleratorType::ACCELERATOR_TYPE_UNSPECIFIED; + $coreCount = 1963855761; + $request = (new SetInstanceAcceleratorRequest()) + ->setName($name) + ->setType($type) + ->setCoreCount($coreCount); + $response = $gapicClient->setInstanceAccelerator($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.notebooks.v1.NotebookService/SetInstanceAccelerator', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $actualValue = $actualApiRequestObject->getType(); + $this->assertProtobufEquals($type, $actualValue); + $actualValue = $actualApiRequestObject->getCoreCount(); + $this->assertProtobufEquals($coreCount, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/setInstanceAcceleratorTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function setInstanceAcceleratorExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/setInstanceAcceleratorTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $name = 'name3373707'; + $type = AcceleratorType::ACCELERATOR_TYPE_UNSPECIFIED; + $coreCount = 1963855761; + $request = (new SetInstanceAcceleratorRequest()) + ->setName($name) + ->setType($type) + ->setCoreCount($coreCount); + $response = $gapicClient->setInstanceAccelerator($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/setInstanceAcceleratorTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function setInstanceLabelsTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/setInstanceLabelsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $postStartupScript = 'postStartupScript355382860'; + $proxyUri = 'proxyUri-475670501'; + $serviceAccount = 'serviceAccount-1948028253'; + $machineType = 'machineType1838323762'; + $installGpuDriver = false; + $customGpuDriverPath = 'customGpuDriverPath1863223803'; + $bootDiskSizeGb = 1398920548; + $dataDiskSizeGb = 1668379732; + $noRemoveDataDisk = false; + $kmsKey = 'kmsKey-591635343'; + $noPublicIp = false; + $noProxyAccess = false; + $network = 'network1843485230'; + $subnet = 'subnet-891534499'; + $creator = 'creator1028554796'; + $canIpForward = true; + $expectedResponse = new Instance(); + $expectedResponse->setName($name2); + $expectedResponse->setPostStartupScript($postStartupScript); + $expectedResponse->setProxyUri($proxyUri); + $expectedResponse->setServiceAccount($serviceAccount); + $expectedResponse->setMachineType($machineType); + $expectedResponse->setInstallGpuDriver($installGpuDriver); + $expectedResponse->setCustomGpuDriverPath($customGpuDriverPath); + $expectedResponse->setBootDiskSizeGb($bootDiskSizeGb); + $expectedResponse->setDataDiskSizeGb($dataDiskSizeGb); + $expectedResponse->setNoRemoveDataDisk($noRemoveDataDisk); + $expectedResponse->setKmsKey($kmsKey); + $expectedResponse->setNoPublicIp($noPublicIp); + $expectedResponse->setNoProxyAccess($noProxyAccess); + $expectedResponse->setNetwork($network); + $expectedResponse->setSubnet($subnet); + $expectedResponse->setCreator($creator); + $expectedResponse->setCanIpForward($canIpForward); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/setInstanceLabelsTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $name = 'name3373707'; + $request = (new SetInstanceLabelsRequest()) + ->setName($name); + $response = $gapicClient->setInstanceLabels($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.notebooks.v1.NotebookService/SetInstanceLabels', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/setInstanceLabelsTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function setInstanceLabelsExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/setInstanceLabelsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $name = 'name3373707'; + $request = (new SetInstanceLabelsRequest()) + ->setName($name); + $response = $gapicClient->setInstanceLabels($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/setInstanceLabelsTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function setInstanceMachineTypeTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/setInstanceMachineTypeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $postStartupScript = 'postStartupScript355382860'; + $proxyUri = 'proxyUri-475670501'; + $serviceAccount = 'serviceAccount-1948028253'; + $machineType2 = 'machineType21397579621'; + $installGpuDriver = false; + $customGpuDriverPath = 'customGpuDriverPath1863223803'; + $bootDiskSizeGb = 1398920548; + $dataDiskSizeGb = 1668379732; + $noRemoveDataDisk = false; + $kmsKey = 'kmsKey-591635343'; + $noPublicIp = false; + $noProxyAccess = false; + $network = 'network1843485230'; + $subnet = 'subnet-891534499'; + $creator = 'creator1028554796'; + $canIpForward = true; + $expectedResponse = new Instance(); + $expectedResponse->setName($name2); + $expectedResponse->setPostStartupScript($postStartupScript); + $expectedResponse->setProxyUri($proxyUri); + $expectedResponse->setServiceAccount($serviceAccount); + $expectedResponse->setMachineType($machineType2); + $expectedResponse->setInstallGpuDriver($installGpuDriver); + $expectedResponse->setCustomGpuDriverPath($customGpuDriverPath); + $expectedResponse->setBootDiskSizeGb($bootDiskSizeGb); + $expectedResponse->setDataDiskSizeGb($dataDiskSizeGb); + $expectedResponse->setNoRemoveDataDisk($noRemoveDataDisk); + $expectedResponse->setKmsKey($kmsKey); + $expectedResponse->setNoPublicIp($noPublicIp); + $expectedResponse->setNoProxyAccess($noProxyAccess); + $expectedResponse->setNetwork($network); + $expectedResponse->setSubnet($subnet); + $expectedResponse->setCreator($creator); + $expectedResponse->setCanIpForward($canIpForward); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/setInstanceMachineTypeTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $name = 'name3373707'; + $machineType = 'machineType1838323762'; + $request = (new SetInstanceMachineTypeRequest()) + ->setName($name) + ->setMachineType($machineType); + $response = $gapicClient->setInstanceMachineType($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.notebooks.v1.NotebookService/SetInstanceMachineType', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $actualValue = $actualApiRequestObject->getMachineType(); + $this->assertProtobufEquals($machineType, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/setInstanceMachineTypeTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function setInstanceMachineTypeExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/setInstanceMachineTypeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $name = 'name3373707'; + $machineType = 'machineType1838323762'; + $request = (new SetInstanceMachineTypeRequest()) + ->setName($name) + ->setMachineType($machineType); + $response = $gapicClient->setInstanceMachineType($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/setInstanceMachineTypeTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function startInstanceTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/startInstanceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $postStartupScript = 'postStartupScript355382860'; + $proxyUri = 'proxyUri-475670501'; + $serviceAccount = 'serviceAccount-1948028253'; + $machineType = 'machineType1838323762'; + $installGpuDriver = false; + $customGpuDriverPath = 'customGpuDriverPath1863223803'; + $bootDiskSizeGb = 1398920548; + $dataDiskSizeGb = 1668379732; + $noRemoveDataDisk = false; + $kmsKey = 'kmsKey-591635343'; + $noPublicIp = false; + $noProxyAccess = false; + $network = 'network1843485230'; + $subnet = 'subnet-891534499'; + $creator = 'creator1028554796'; + $canIpForward = true; + $expectedResponse = new Instance(); + $expectedResponse->setName($name2); + $expectedResponse->setPostStartupScript($postStartupScript); + $expectedResponse->setProxyUri($proxyUri); + $expectedResponse->setServiceAccount($serviceAccount); + $expectedResponse->setMachineType($machineType); + $expectedResponse->setInstallGpuDriver($installGpuDriver); + $expectedResponse->setCustomGpuDriverPath($customGpuDriverPath); + $expectedResponse->setBootDiskSizeGb($bootDiskSizeGb); + $expectedResponse->setDataDiskSizeGb($dataDiskSizeGb); + $expectedResponse->setNoRemoveDataDisk($noRemoveDataDisk); + $expectedResponse->setKmsKey($kmsKey); + $expectedResponse->setNoPublicIp($noPublicIp); + $expectedResponse->setNoProxyAccess($noProxyAccess); + $expectedResponse->setNetwork($network); + $expectedResponse->setSubnet($subnet); + $expectedResponse->setCreator($creator); + $expectedResponse->setCanIpForward($canIpForward); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/startInstanceTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $name = 'name3373707'; + $request = (new StartInstanceRequest()) + ->setName($name); + $response = $gapicClient->startInstance($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.notebooks.v1.NotebookService/StartInstance', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/startInstanceTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function startInstanceExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/startInstanceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $name = 'name3373707'; + $request = (new StartInstanceRequest()) + ->setName($name); + $response = $gapicClient->startInstance($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/startInstanceTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function stopInstanceTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/stopInstanceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $postStartupScript = 'postStartupScript355382860'; + $proxyUri = 'proxyUri-475670501'; + $serviceAccount = 'serviceAccount-1948028253'; + $machineType = 'machineType1838323762'; + $installGpuDriver = false; + $customGpuDriverPath = 'customGpuDriverPath1863223803'; + $bootDiskSizeGb = 1398920548; + $dataDiskSizeGb = 1668379732; + $noRemoveDataDisk = false; + $kmsKey = 'kmsKey-591635343'; + $noPublicIp = false; + $noProxyAccess = false; + $network = 'network1843485230'; + $subnet = 'subnet-891534499'; + $creator = 'creator1028554796'; + $canIpForward = true; + $expectedResponse = new Instance(); + $expectedResponse->setName($name2); + $expectedResponse->setPostStartupScript($postStartupScript); + $expectedResponse->setProxyUri($proxyUri); + $expectedResponse->setServiceAccount($serviceAccount); + $expectedResponse->setMachineType($machineType); + $expectedResponse->setInstallGpuDriver($installGpuDriver); + $expectedResponse->setCustomGpuDriverPath($customGpuDriverPath); + $expectedResponse->setBootDiskSizeGb($bootDiskSizeGb); + $expectedResponse->setDataDiskSizeGb($dataDiskSizeGb); + $expectedResponse->setNoRemoveDataDisk($noRemoveDataDisk); + $expectedResponse->setKmsKey($kmsKey); + $expectedResponse->setNoPublicIp($noPublicIp); + $expectedResponse->setNoProxyAccess($noProxyAccess); + $expectedResponse->setNetwork($network); + $expectedResponse->setSubnet($subnet); + $expectedResponse->setCreator($creator); + $expectedResponse->setCanIpForward($canIpForward); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/stopInstanceTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $name = 'name3373707'; + $request = (new StopInstanceRequest()) + ->setName($name); + $response = $gapicClient->stopInstance($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.notebooks.v1.NotebookService/StopInstance', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/stopInstanceTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function stopInstanceExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/stopInstanceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $name = 'name3373707'; + $request = (new StopInstanceRequest()) + ->setName($name); + $response = $gapicClient->stopInstance($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/stopInstanceTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function triggerScheduleTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/triggerScheduleTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $cronSchedule = 'cronSchedule206244136'; + $timeZone = 'timeZone36848094'; + $expectedResponse = new Schedule(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setCronSchedule($cronSchedule); + $expectedResponse->setTimeZone($timeZone); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/triggerScheduleTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->scheduleName('[PROJECT]', '[LOCATION]', '[SCHEDULE]'); + $request = (new TriggerScheduleRequest()) + ->setName($formattedName); + $response = $gapicClient->triggerSchedule($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.notebooks.v1.NotebookService/TriggerSchedule', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/triggerScheduleTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function triggerScheduleExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/triggerScheduleTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->scheduleName('[PROJECT]', '[LOCATION]', '[SCHEDULE]'); + $request = (new TriggerScheduleRequest()) + ->setName($formattedName); + $response = $gapicClient->triggerSchedule($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/triggerScheduleTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateInstanceConfigTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateInstanceConfigTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $postStartupScript = 'postStartupScript355382860'; + $proxyUri = 'proxyUri-475670501'; + $serviceAccount = 'serviceAccount-1948028253'; + $machineType = 'machineType1838323762'; + $installGpuDriver = false; + $customGpuDriverPath = 'customGpuDriverPath1863223803'; + $bootDiskSizeGb = 1398920548; + $dataDiskSizeGb = 1668379732; + $noRemoveDataDisk = false; + $kmsKey = 'kmsKey-591635343'; + $noPublicIp = false; + $noProxyAccess = false; + $network = 'network1843485230'; + $subnet = 'subnet-891534499'; + $creator = 'creator1028554796'; + $canIpForward = true; + $expectedResponse = new Instance(); + $expectedResponse->setName($name2); + $expectedResponse->setPostStartupScript($postStartupScript); + $expectedResponse->setProxyUri($proxyUri); + $expectedResponse->setServiceAccount($serviceAccount); + $expectedResponse->setMachineType($machineType); + $expectedResponse->setInstallGpuDriver($installGpuDriver); + $expectedResponse->setCustomGpuDriverPath($customGpuDriverPath); + $expectedResponse->setBootDiskSizeGb($bootDiskSizeGb); + $expectedResponse->setDataDiskSizeGb($dataDiskSizeGb); + $expectedResponse->setNoRemoveDataDisk($noRemoveDataDisk); + $expectedResponse->setKmsKey($kmsKey); + $expectedResponse->setNoPublicIp($noPublicIp); + $expectedResponse->setNoProxyAccess($noProxyAccess); + $expectedResponse->setNetwork($network); + $expectedResponse->setSubnet($subnet); + $expectedResponse->setCreator($creator); + $expectedResponse->setCanIpForward($canIpForward); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateInstanceConfigTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $name = 'name3373707'; + $request = (new UpdateInstanceConfigRequest()) + ->setName($name); + $response = $gapicClient->updateInstanceConfig($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.notebooks.v1.NotebookService/UpdateInstanceConfig', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateInstanceConfigTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateInstanceConfigExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateInstanceConfigTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $name = 'name3373707'; + $request = (new UpdateInstanceConfigRequest()) + ->setName($name); + $response = $gapicClient->updateInstanceConfig($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateInstanceConfigTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateInstanceMetadataItemsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new UpdateInstanceMetadataItemsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $name = 'name3373707'; + $request = (new UpdateInstanceMetadataItemsRequest()) + ->setName($name); + $response = $gapicClient->updateInstanceMetadataItems($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.notebooks.v1.NotebookService/UpdateInstanceMetadataItems', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateInstanceMetadataItemsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $name = 'name3373707'; + $request = (new UpdateInstanceMetadataItemsRequest()) + ->setName($name); + try { + $gapicClient->updateInstanceMetadataItems($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateShieldedInstanceConfigTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateShieldedInstanceConfigTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $postStartupScript = 'postStartupScript355382860'; + $proxyUri = 'proxyUri-475670501'; + $serviceAccount = 'serviceAccount-1948028253'; + $machineType = 'machineType1838323762'; + $installGpuDriver = false; + $customGpuDriverPath = 'customGpuDriverPath1863223803'; + $bootDiskSizeGb = 1398920548; + $dataDiskSizeGb = 1668379732; + $noRemoveDataDisk = false; + $kmsKey = 'kmsKey-591635343'; + $noPublicIp = false; + $noProxyAccess = false; + $network = 'network1843485230'; + $subnet = 'subnet-891534499'; + $creator = 'creator1028554796'; + $canIpForward = true; + $expectedResponse = new Instance(); + $expectedResponse->setName($name2); + $expectedResponse->setPostStartupScript($postStartupScript); + $expectedResponse->setProxyUri($proxyUri); + $expectedResponse->setServiceAccount($serviceAccount); + $expectedResponse->setMachineType($machineType); + $expectedResponse->setInstallGpuDriver($installGpuDriver); + $expectedResponse->setCustomGpuDriverPath($customGpuDriverPath); + $expectedResponse->setBootDiskSizeGb($bootDiskSizeGb); + $expectedResponse->setDataDiskSizeGb($dataDiskSizeGb); + $expectedResponse->setNoRemoveDataDisk($noRemoveDataDisk); + $expectedResponse->setKmsKey($kmsKey); + $expectedResponse->setNoPublicIp($noPublicIp); + $expectedResponse->setNoProxyAccess($noProxyAccess); + $expectedResponse->setNetwork($network); + $expectedResponse->setSubnet($subnet); + $expectedResponse->setCreator($creator); + $expectedResponse->setCanIpForward($canIpForward); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateShieldedInstanceConfigTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $name = 'name3373707'; + $request = (new UpdateShieldedInstanceConfigRequest()) + ->setName($name); + $response = $gapicClient->updateShieldedInstanceConfig($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.notebooks.v1.NotebookService/UpdateShieldedInstanceConfig', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateShieldedInstanceConfigTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateShieldedInstanceConfigExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateShieldedInstanceConfigTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $name = 'name3373707'; + $request = (new UpdateShieldedInstanceConfigRequest()) + ->setName($name); + $response = $gapicClient->updateShieldedInstanceConfig($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateShieldedInstanceConfigTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function upgradeInstanceTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/upgradeInstanceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $postStartupScript = 'postStartupScript355382860'; + $proxyUri = 'proxyUri-475670501'; + $serviceAccount = 'serviceAccount-1948028253'; + $machineType = 'machineType1838323762'; + $installGpuDriver = false; + $customGpuDriverPath = 'customGpuDriverPath1863223803'; + $bootDiskSizeGb = 1398920548; + $dataDiskSizeGb = 1668379732; + $noRemoveDataDisk = false; + $kmsKey = 'kmsKey-591635343'; + $noPublicIp = false; + $noProxyAccess = false; + $network = 'network1843485230'; + $subnet = 'subnet-891534499'; + $creator = 'creator1028554796'; + $canIpForward = true; + $expectedResponse = new Instance(); + $expectedResponse->setName($name2); + $expectedResponse->setPostStartupScript($postStartupScript); + $expectedResponse->setProxyUri($proxyUri); + $expectedResponse->setServiceAccount($serviceAccount); + $expectedResponse->setMachineType($machineType); + $expectedResponse->setInstallGpuDriver($installGpuDriver); + $expectedResponse->setCustomGpuDriverPath($customGpuDriverPath); + $expectedResponse->setBootDiskSizeGb($bootDiskSizeGb); + $expectedResponse->setDataDiskSizeGb($dataDiskSizeGb); + $expectedResponse->setNoRemoveDataDisk($noRemoveDataDisk); + $expectedResponse->setKmsKey($kmsKey); + $expectedResponse->setNoPublicIp($noPublicIp); + $expectedResponse->setNoProxyAccess($noProxyAccess); + $expectedResponse->setNetwork($network); + $expectedResponse->setSubnet($subnet); + $expectedResponse->setCreator($creator); + $expectedResponse->setCanIpForward($canIpForward); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/upgradeInstanceTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $name = 'name3373707'; + $request = (new UpgradeInstanceRequest()) + ->setName($name); + $response = $gapicClient->upgradeInstance($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.notebooks.v1.NotebookService/UpgradeInstance', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/upgradeInstanceTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function upgradeInstanceExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/upgradeInstanceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $name = 'name3373707'; + $request = (new UpgradeInstanceRequest()) + ->setName($name); + $response = $gapicClient->upgradeInstance($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/upgradeInstanceTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function upgradeInstanceInternalTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/upgradeInstanceInternalTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $postStartupScript = 'postStartupScript355382860'; + $proxyUri = 'proxyUri-475670501'; + $serviceAccount = 'serviceAccount-1948028253'; + $machineType = 'machineType1838323762'; + $installGpuDriver = false; + $customGpuDriverPath = 'customGpuDriverPath1863223803'; + $bootDiskSizeGb = 1398920548; + $dataDiskSizeGb = 1668379732; + $noRemoveDataDisk = false; + $kmsKey = 'kmsKey-591635343'; + $noPublicIp = false; + $noProxyAccess = false; + $network = 'network1843485230'; + $subnet = 'subnet-891534499'; + $creator = 'creator1028554796'; + $canIpForward = true; + $expectedResponse = new Instance(); + $expectedResponse->setName($name2); + $expectedResponse->setPostStartupScript($postStartupScript); + $expectedResponse->setProxyUri($proxyUri); + $expectedResponse->setServiceAccount($serviceAccount); + $expectedResponse->setMachineType($machineType); + $expectedResponse->setInstallGpuDriver($installGpuDriver); + $expectedResponse->setCustomGpuDriverPath($customGpuDriverPath); + $expectedResponse->setBootDiskSizeGb($bootDiskSizeGb); + $expectedResponse->setDataDiskSizeGb($dataDiskSizeGb); + $expectedResponse->setNoRemoveDataDisk($noRemoveDataDisk); + $expectedResponse->setKmsKey($kmsKey); + $expectedResponse->setNoPublicIp($noPublicIp); + $expectedResponse->setNoProxyAccess($noProxyAccess); + $expectedResponse->setNetwork($network); + $expectedResponse->setSubnet($subnet); + $expectedResponse->setCreator($creator); + $expectedResponse->setCanIpForward($canIpForward); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/upgradeInstanceInternalTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $name = 'name3373707'; + $vmId = 'vmId112317347'; + $request = (new UpgradeInstanceInternalRequest()) + ->setName($name) + ->setVmId($vmId); + $response = $gapicClient->upgradeInstanceInternal($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.notebooks.v1.NotebookService/UpgradeInstanceInternal', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $actualValue = $actualApiRequestObject->getVmId(); + $this->assertProtobufEquals($vmId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/upgradeInstanceInternalTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function upgradeInstanceInternalExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/upgradeInstanceInternalTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $name = 'name3373707'; + $vmId = 'vmId112317347'; + $request = (new UpgradeInstanceInternalRequest()) + ->setName($name) + ->setVmId($vmId); + $response = $gapicClient->upgradeInstanceInternal($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/upgradeInstanceInternalTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getLocationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $locationId = 'locationId552319461'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Location(); + $expectedResponse->setName($name2); + $expectedResponse->setLocationId($locationId); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + $request = new GetLocationRequest(); + $response = $gapicClient->getLocation($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new GetLocationRequest(); + try { + $gapicClient->getLocation($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $locationsElement = new Location(); + $locations = [ + $locationsElement, + ]; + $expectedResponse = new ListLocationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setLocations($locations); + $transport->addResponse($expectedResponse); + $request = new ListLocationsRequest(); + $response = $gapicClient->listLocations($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new ListLocationsRequest(); + try { + $gapicClient->listLocations($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $request = (new GetIamPolicyRequest()) + ->setResource($resource); + $response = $gapicClient->getIamPolicy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $request = (new GetIamPolicyRequest()) + ->setResource($resource); + try { + $gapicClient->getIamPolicy($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $request = (new SetIamPolicyRequest()) + ->setResource($resource) + ->setPolicy($policy); + $response = $gapicClient->setIamPolicy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPolicy(); + $this->assertProtobufEquals($policy, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $request = (new SetIamPolicyRequest()) + ->setResource($resource) + ->setPolicy($policy); + try { + $gapicClient->setIamPolicy($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new TestIamPermissionsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $request = (new TestIamPermissionsRequest()) + ->setResource($resource) + ->setPermissions($permissions); + $response = $gapicClient->testIamPermissions($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPermissions(); + $this->assertProtobufEquals($permissions, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $request = (new TestIamPermissionsRequest()) + ->setResource($resource) + ->setPermissions($permissions); + try { + $gapicClient->testIamPermissions($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createEnvironmentAsyncTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createEnvironmentTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $postStartupScript = 'postStartupScript355382860'; + $expectedResponse = new Environment(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setPostStartupScript($postStartupScript); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createEnvironmentTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $parent = 'parent-995424086'; + $environmentId = 'environmentId608412359'; + $environment = new Environment(); + $request = (new CreateEnvironmentRequest()) + ->setParent($parent) + ->setEnvironmentId($environmentId) + ->setEnvironment($environment); + $response = $gapicClient->createEnvironmentAsync($request)->wait(); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.notebooks.v1.NotebookService/CreateEnvironment', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($parent, $actualValue); + $actualValue = $actualApiRequestObject->getEnvironmentId(); + $this->assertProtobufEquals($environmentId, $actualValue); + $actualValue = $actualApiRequestObject->getEnvironment(); + $this->assertProtobufEquals($environment, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createEnvironmentTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } +} diff --git a/owl-bot-staging/Notebooks/v2/proto/src/GPBMetadata/Google/Cloud/Notebooks/V2/DiagnosticConfig.php b/owl-bot-staging/Notebooks/v2/proto/src/GPBMetadata/Google/Cloud/Notebooks/V2/DiagnosticConfig.php new file mode 100644 index 000000000000..d6ac249f6025 --- /dev/null +++ b/owl-bot-staging/Notebooks/v2/proto/src/GPBMetadata/Google/Cloud/Notebooks/V2/DiagnosticConfig.php @@ -0,0 +1,35 @@ +internalAddGeneratedFile( + ' +ã +1google/cloud/notebooks/v2/diagnostic_config.protogoogle.cloud.notebooks.v2"» +DiagnosticConfig + +gcs_bucket ( BàA + relative_path ( BàA +enable_repair_flag (BàA\' +enable_packet_capture_flag (BàA( +enable_copy_home_files_flag (BàABÌ +com.google.cloud.notebooks.v2BDiagnosticConfigProtoPZ;cloud.google.com/go/notebooks/apiv2/notebookspb;notebookspbªGoogle.Cloud.Notebooks.V2ÊGoogle\\Cloud\\Notebooks\\V2êGoogle::Cloud::Notebooks::V2bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Notebooks/v2/proto/src/GPBMetadata/Google/Cloud/Notebooks/V2/Event.php b/owl-bot-staging/Notebooks/v2/proto/src/GPBMetadata/Google/Cloud/Notebooks/V2/Event.php new file mode 100644 index 0000000000000000000000000000000000000000..d1f43dcbf3cf94c932a049488ab7f123afc63617 GIT binary patch literal 1327 zcma)6(QeZ)6s7Gts0*wL651*dW(=)EER_lmD5apZ^}0%1R*g^z6sdAkx3iYUk>gY< zXy3s<@E5%D6}<4mSKv5pR%x3c4~di9bA0agx%ch+;4A>oV2AjGV?jo6IEUhlz<@Ks zT;{=HG#(QUT{aDTYM110OGE;1 zf!iZ#Tk3_IIhd0h?*Egaox~$w@VO!>>)`I{N395Q=VY!jC}{UUeulj$QCKjtZ!+5) z6qJ})hE@g-Q6E|M!2Z-jgOApS9%^+Dx~N^crQHE*-S!bGWh6`C5SgcT6Pb1?s{ybs zUytm=Qcl|d#bdK;*~l`j7Amc255UGTvdy+>n}gP&X?0L3-~5pQk7e86oLv(rP0CEY z%;$Pi!R5)aX?4O@1_2JJoCWDo2gCZx`g?Y(qeg(PMu47<0KH%Px%}rW=EKT>kQ3rh q_E7>g423m}6l@s%+HhU@;MH#G)t5=|^3Mf`BNr2*V5sr4E=}P#fs@M{x|n@x;c3j%PHoymq#+C5(btP^)8&ycXcZYis~P~b znwcDc(brv9DI28DaNuW9@XsE$`_xcePxtWW9(6TpQjh9=`V$87T3$)&=>>+qAVuNxxGd$NGp` zPBuG@Y6`-G`sM}oL&$eJ6OZ@sV7DeVn8o|>*CuTL>l2l3h^=XU`02^vr$?F8A0bFq ziTB=ePI&sdcVN|7c-4Mjy4$Po88j68e5&)S!4!A)Pny13_1Z>$Y0 zWH8I2W{+2w*qLg=db#$d*{I9_WjpYltL30}fF z*C(dojBUo$@-j!+{s$CwqEHC1uEXldz|~I3SYAPlSRhFKj=>Z#`ONyFU~>O47|v-I zL?T%1|3$Ji7sJ}IZmz-=eM&RP1B_<`Qatl;!KuuUgXjQJ<@=Cyh07Y^GM`;6;K)`yvnVn1 zQ3|9SL`MUSQ>o0-63?U-xa0FTS4D2Fz&eH^xYx&Eg|^rWjAMqa11KyL*2)?yTwZDM zg*6{ko(SR@0GolhvMaChL@ewWzX^r*TaaC!ZEyq#?J7%ElMbH>8>9k?2>r>%7@=e_Q97;Uai?Z1SL8S)b~E+=>bA1ny=4ApXT zU+lozoD)(UB8-E0PvPCOJkt9^e^SVXpN1y$zylQ$jFP5QCf$acrAqykrdEqb?`k-j zRL{&TQCKR!R$t+?f?q}U6@FkKRr|ckt}qU8!ML*y@mfi%H}cg|{-}fq04r>vUcw7m z2n+dxe6@(fQG^XgC{*7zj?~v`a;flJ2)@Lp!RM1xSPRaCPtmo|4>>U;1~Z&B*y&j_ z?*-ka_+*%jkajya^Zjf1Mw!17()^W>p1cy$&CJI@*7BbaGj9ldMEn`PB~-InuA9wH kl(X4proF=7CQt59=HQ27GM^dbKRd+ponq8Jg;RjP0UUG(lmGw# literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Notebooks/v2/proto/src/GPBMetadata/Google/Cloud/Notebooks/V2/Instance.php b/owl-bot-staging/Notebooks/v2/proto/src/GPBMetadata/Google/Cloud/Notebooks/V2/Instance.php new file mode 100644 index 0000000000000000000000000000000000000000..221db623c43c67d0211289da348f1231e681454c GIT binary patch literal 2907 zcma)8ZExCE6fTeuIHXDHb{)++)k&*0tyZJaPMVx%lL>@)qksZLT7_g?%mutUwq+Z- ztjgcmkJ!ikglV7lEBd+rVbadM*EXzqY4Roa?Kzy6=R7_yfAA(AJe2Fyp*{)eP#&Dh z;e^Vb?}o1F+VWsJ8c|<1-4oBUsjtX#wIw%OUAb1(yITki+^KI;RUW(U*rp}ZcBjLV zb#3AtyBOh)LyoyYh;LWJp5NuXB8VpW*w>7~elG?*f=M z2?AM~g=EfwN@QzaU?lXY~&(Y7Z-PLS~lhtLi+exsl7D zM>MM6wNd8_)UTVggHC(b|LG*BT?@Gol9NlYycW;Cx1!8z!(o!>1Ek|lk{Xt%$MDw% z>|B?J(mnA~;fz%h#wxS&W^`2|o>lUr3<>sbKDpff*rZ0l@(?|J5IyCzM*@|?I9Tyu z``--Q?s;RM4C$d2Ae~NYPUxRXpFu8gh!;%Uu$YolJNZiHy_RCfvlGKQA!Axh&yVlJ zy6HM0v9N`s+syp-F62i(Hr!j+e^XqVpWlI%8TA9~g5vW0^bnRAS7|YeXKUpb%B49{ zE^u7wFf4O6BfWrv=~LVqEb8J4+AEYdV|#H*l%)O)wJiMzS;AYhnBxw78w1W4=|TrI z4i@S90@gy}V{aO9p!p=w?E_fm&SFw;b-G%&X7rk!c5Poj&}-F=8&UyQ@c5{Uo0N1D z@}1uPeyvu;ZCV1z9%y<4*O~2I$co>T?t-N4clB2Dyro{dexy}vXlWI4N3BMqqV4~* zk>37&1#+>dNw;8$3FExr8EFsl38#3)3+0DbBqVM_9{%AC^eB&c{`J(D`c^TaL`Hf5 z>#-yo?ptI{fW*ik%d+paB}O#l2Ctp#&$+=W`af>SS9r3(g9fZm1;vet;5c$2gIrLq zz+b>E!K!sgTSLwb-V+%~gVhNob~rHvZ&``g%3ob!`;b3h@bDEBA`_M~a*M#ddwzw5 zxMYejr6Y>>t#I)p;uo$%eBLfo55I#^yR2RhwFP&ERzLEI^#-iAk6Ooi2fLr0aEV}Ia9rES zu%7R9TkSTxSrWp6J5-NlwyD+{HKsCIrZPe(*uxcORB!5CU2EvC*-1`X1L*Wnq?%Q> z&kI@Nd&I-jw@_H%wsaqghc&IyJv1)SH*x#3(6?SQ-lnC`;kH(s_Je@z(_lJa!j`Ml3tdjR_gN!S2HP zkMzAdpA{88iYU!^R#cA5|HOCwXpmf(Byp7dkiIXVs>-pdnt)aHxID-rr9$`l<7BM( ZTFhq);~bM2%e-Ke<1fX)bp~eu{{fr=c&-2d literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Notebooks/v2/proto/src/GPBMetadata/Google/Cloud/Notebooks/V2/Service.php b/owl-bot-staging/Notebooks/v2/proto/src/GPBMetadata/Google/Cloud/Notebooks/V2/Service.php new file mode 100644 index 000000000000..2989a2c79582 --- /dev/null +++ b/owl-bot-staging/Notebooks/v2/proto/src/GPBMetadata/Google/Cloud/Notebooks/V2/Service.php @@ -0,0 +1,123 @@ +internalAddGeneratedFile( + ' +Î& +\'google/cloud/notebooks/v2/service.protogoogle.cloud.notebooks.v2google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto1google/cloud/notebooks/v2/diagnostic_config.proto(google/cloud/notebooks/v2/instance.proto#google/longrunning/operations.protogoogle/protobuf/empty.proto google/protobuf/field_mask.protogoogle/protobuf/timestamp.proto"ï +OperationMetadata/ + create_time ( 2.google.protobuf.Timestamp, +end_time ( 2.google.protobuf.Timestamp +target (  +verb (  +status_message (  +requested_cancellation ( + api_version (  +endpoint ( "® +ListInstancesRequest9 +parent ( B)àAúA#!notebooks.googleapis.com/Instance + page_size (BàA + +page_token ( BàA +order_by ( BàA +filter ( BàA"} +ListInstancesResponse6 + instances ( 2#.google.cloud.notebooks.v2.Instance +next_page_token (  + unreachable ( "M +GetInstanceRequest7 +name ( B)àAúA# +!notebooks.googleapis.com/Instance"Á +CreateInstanceRequest9 +parent ( B)àAúA#!notebooks.googleapis.com/Instance + instance_id ( BàA: +instance ( 2#.google.cloud.notebooks.v2.InstanceBàA + +request_id ( BàA"¢ +UpdateInstanceRequest: +instance ( 2#.google.cloud.notebooks.v2.InstanceBàA4 + update_mask ( 2.google.protobuf.FieldMaskBàA + +request_id ( BàA"i +DeleteInstanceRequest7 +name ( B)àAúA# +!notebooks.googleapis.com/Instance + +request_id ( BàA") +StartInstanceRequest +name ( BàA"( +StopInstanceRequest +name ( BàA") +ResetInstanceRequest +name ( BàA"C +!CheckInstanceUpgradabilityRequest +notebook_instance ( BàA" +"CheckInstanceUpgradabilityResponse + upgradeable ( +upgrade_version (  + upgrade_info (  + upgrade_image ( "+ +UpgradeInstanceRequest +name ( BàA" +RollbackInstanceRequest7 +name ( B)àAúA# +!notebooks.googleapis.com/Instance +target_snapshot ( BàA + revision_id ( BàAàA"½ +DiagnoseInstanceRequest7 +name ( B)àAúA# +!notebooks.googleapis.com/InstanceK +diagnostic_config ( 2+.google.cloud.notebooks.v2.DiagnosticConfigBàA +timeout_minutes (BàA2ú +NotebookService² + ListInstances/.google.cloud.notebooks.v2.ListInstancesRequest0.google.cloud.notebooks.v2.ListInstancesResponse">ÚAparent‚Óä“/-/v2/{parent=projects/*/locations/*}/instancesŸ + GetInstance-.google.cloud.notebooks.v2.GetInstanceRequest#.google.cloud.notebooks.v2.Instance"<ÚAname‚Óä“/-/v2/{name=projects/*/locations/*/instances/*}à +CreateInstance0.google.cloud.notebooks.v2.CreateInstanceRequest.google.longrunning.Operation"}ÊA +InstanceOperationMetadataÚAparent,instance,instance_id‚Óä“9"-/v2/{parent=projects/*/locations/*}/instances:instanceâ +UpdateInstance0.google.cloud.notebooks.v2.UpdateInstanceRequest.google.longrunning.Operation"ÊA +InstanceOperationMetadataÚAinstance,update_mask‚Óä“B26/v2/{instance.name=projects/*/locations/*/instances/*}:instanceÌ +DeleteInstance0.google.cloud.notebooks.v2.DeleteInstanceRequest.google.longrunning.Operation"iÊA* +google.protobuf.EmptyOperationMetadataÚAname‚Óä“/*-/v2/{name=projects/*/locations/*/instances/*}¿ + StartInstance/.google.cloud.notebooks.v2.StartInstanceRequest.google.longrunning.Operation"^ÊA +InstanceOperationMetadata‚Óä“8"3/v2/{name=projects/*/locations/*/instances/*}:start:*¼ + StopInstance..google.cloud.notebooks.v2.StopInstanceRequest.google.longrunning.Operation"]ÊA +InstanceOperationMetadata‚Óä“7"2/v2/{name=projects/*/locations/*/instances/*}:stop:*¿ + ResetInstance/.google.cloud.notebooks.v2.ResetInstanceRequest.google.longrunning.Operation"^ÊA +InstanceOperationMetadata‚Óä“8"3/v2/{name=projects/*/locations/*/instances/*}:reset:*ð +CheckInstanceUpgradability<.google.cloud.notebooks.v2.CheckInstanceUpgradabilityRequest=.google.cloud.notebooks.v2.CheckInstanceUpgradabilityResponse"U‚Óä“OM/v2/{notebook_instance=projects/*/locations/*/instances/*}:checkUpgradabilityÅ +UpgradeInstance1.google.cloud.notebooks.v2.UpgradeInstanceRequest.google.longrunning.Operation"`ÊA +InstanceOperationMetadata‚Óä“:"5/v2/{name=projects/*/locations/*/instances/*}:upgrade:*È +RollbackInstance2.google.cloud.notebooks.v2.RollbackInstanceRequest.google.longrunning.Operation"aÊA +InstanceOperationMetadata‚Óä“;"6/v2/{name=projects/*/locations/*/instances/*}:rollback:*á +DiagnoseInstance2.google.cloud.notebooks.v2.DiagnoseInstanceRequest.google.longrunning.Operation"zÊA +InstanceOperationMetadataÚAname,diagnostic_config‚Óä“;"6/v2/{name=projects/*/locations/*/instances/*}:diagnose:*LÊAnotebooks.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformBÃ +com.google.cloud.notebooks.v2B ServiceProtoPZ;cloud.google.com/go/notebooks/apiv2/notebookspb;notebookspbªGoogle.Cloud.Notebooks.V2ÊGoogle\\Cloud\\Notebooks\\V2êGoogle::Cloud::Notebooks::V2bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/AcceleratorConfig.php b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/AcceleratorConfig.php new file mode 100644 index 000000000000..bef92e9d19fb --- /dev/null +++ b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/AcceleratorConfig.php @@ -0,0 +1,106 @@ +google.cloud.notebooks.v2.AcceleratorConfig + */ +class AcceleratorConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Type of this accelerator. + * + * Generated from protobuf field .google.cloud.notebooks.v2.AcceleratorConfig.AcceleratorType type = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $type = 0; + /** + * Optional. Count of cores of this accelerator. + * + * Generated from protobuf field int64 core_count = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $core_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $type + * Optional. Type of this accelerator. + * @type int|string $core_count + * Optional. Count of cores of this accelerator. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V2\GceSetup::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Type of this accelerator. + * + * Generated from protobuf field .google.cloud.notebooks.v2.AcceleratorConfig.AcceleratorType type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Optional. Type of this accelerator. + * + * Generated from protobuf field .google.cloud.notebooks.v2.AcceleratorConfig.AcceleratorType type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Notebooks\V2\AcceleratorConfig\AcceleratorType::class); + $this->type = $var; + + return $this; + } + + /** + * Optional. Count of cores of this accelerator. + * + * Generated from protobuf field int64 core_count = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string + */ + public function getCoreCount() + { + return $this->core_count; + } + + /** + * Optional. Count of cores of this accelerator. + * + * Generated from protobuf field int64 core_count = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string $var + * @return $this + */ + public function setCoreCount($var) + { + GPBUtil::checkInt64($var); + $this->core_count = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/AcceleratorConfig/AcceleratorType.php b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/AcceleratorConfig/AcceleratorType.php new file mode 100644 index 000000000000..c1f2b8471a7f --- /dev/null +++ b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/AcceleratorConfig/AcceleratorType.php @@ -0,0 +1,121 @@ +google.cloud.notebooks.v2.AcceleratorConfig.AcceleratorType + */ +class AcceleratorType +{ + /** + * Accelerator type is not specified. + * + * Generated from protobuf enum ACCELERATOR_TYPE_UNSPECIFIED = 0; + */ + const ACCELERATOR_TYPE_UNSPECIFIED = 0; + /** + * Accelerator type is Nvidia Tesla P100. + * + * Generated from protobuf enum NVIDIA_TESLA_P100 = 2; + */ + const NVIDIA_TESLA_P100 = 2; + /** + * Accelerator type is Nvidia Tesla V100. + * + * Generated from protobuf enum NVIDIA_TESLA_V100 = 3; + */ + const NVIDIA_TESLA_V100 = 3; + /** + * Accelerator type is Nvidia Tesla P4. + * + * Generated from protobuf enum NVIDIA_TESLA_P4 = 4; + */ + const NVIDIA_TESLA_P4 = 4; + /** + * Accelerator type is Nvidia Tesla T4. + * + * Generated from protobuf enum NVIDIA_TESLA_T4 = 5; + */ + const NVIDIA_TESLA_T4 = 5; + /** + * Accelerator type is Nvidia Tesla A100 - 40GB. + * + * Generated from protobuf enum NVIDIA_TESLA_A100 = 11; + */ + const NVIDIA_TESLA_A100 = 11; + /** + * Accelerator type is Nvidia Tesla A100 - 80GB. + * + * Generated from protobuf enum NVIDIA_A100_80GB = 12; + */ + const NVIDIA_A100_80GB = 12; + /** + * Accelerator type is Nvidia Tesla L4. + * + * Generated from protobuf enum NVIDIA_L4 = 13; + */ + const NVIDIA_L4 = 13; + /** + * Accelerator type is NVIDIA Tesla T4 Virtual Workstations. + * + * Generated from protobuf enum NVIDIA_TESLA_T4_VWS = 8; + */ + const NVIDIA_TESLA_T4_VWS = 8; + /** + * Accelerator type is NVIDIA Tesla P100 Virtual Workstations. + * + * Generated from protobuf enum NVIDIA_TESLA_P100_VWS = 9; + */ + const NVIDIA_TESLA_P100_VWS = 9; + /** + * Accelerator type is NVIDIA Tesla P4 Virtual Workstations. + * + * Generated from protobuf enum NVIDIA_TESLA_P4_VWS = 10; + */ + const NVIDIA_TESLA_P4_VWS = 10; + + private static $valueToName = [ + self::ACCELERATOR_TYPE_UNSPECIFIED => 'ACCELERATOR_TYPE_UNSPECIFIED', + self::NVIDIA_TESLA_P100 => 'NVIDIA_TESLA_P100', + self::NVIDIA_TESLA_V100 => 'NVIDIA_TESLA_V100', + self::NVIDIA_TESLA_P4 => 'NVIDIA_TESLA_P4', + self::NVIDIA_TESLA_T4 => 'NVIDIA_TESLA_T4', + self::NVIDIA_TESLA_A100 => 'NVIDIA_TESLA_A100', + self::NVIDIA_A100_80GB => 'NVIDIA_A100_80GB', + self::NVIDIA_L4 => 'NVIDIA_L4', + self::NVIDIA_TESLA_T4_VWS => 'NVIDIA_TESLA_T4_VWS', + self::NVIDIA_TESLA_P100_VWS => 'NVIDIA_TESLA_P100_VWS', + self::NVIDIA_TESLA_P4_VWS => 'NVIDIA_TESLA_P4_VWS', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(AcceleratorType::class, \Google\Cloud\Notebooks\V2\AcceleratorConfig_AcceleratorType::class); + diff --git a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/BootDisk.php b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/BootDisk.php new file mode 100644 index 000000000000..fde8f7d94633 --- /dev/null +++ b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/BootDisk.php @@ -0,0 +1,193 @@ +google.cloud.notebooks.v2.BootDisk + */ +class BootDisk extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The size of the boot disk in GB attached to this instance, up to + * a maximum of 64000 GB (64 TB). If not specified, this defaults to the + * recommended value of 150GB. + * + * Generated from protobuf field int64 disk_size_gb = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $disk_size_gb = 0; + /** + * Optional. Indicates the type of the disk. + * + * Generated from protobuf field .google.cloud.notebooks.v2.DiskType disk_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $disk_type = 0; + /** + * Optional. Input only. Disk encryption method used on the boot and data + * disks, defaults to GMEK. + * + * Generated from protobuf field .google.cloud.notebooks.v2.DiskEncryption disk_encryption = 3 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + */ + protected $disk_encryption = 0; + /** + * Optional. Input only. The KMS key used to encrypt the disks, only + * applicable if disk_encryption is CMEK. Format: + * `projects/{project_id}/locations/{location}/keyRings/{key_ring_id}/cryptoKeys/{key_id}` + * Learn more about using your own encryption keys. + * + * Generated from protobuf field string kms_key = 4 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + */ + protected $kms_key = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $disk_size_gb + * Optional. The size of the boot disk in GB attached to this instance, up to + * a maximum of 64000 GB (64 TB). If not specified, this defaults to the + * recommended value of 150GB. + * @type int $disk_type + * Optional. Indicates the type of the disk. + * @type int $disk_encryption + * Optional. Input only. Disk encryption method used on the boot and data + * disks, defaults to GMEK. + * @type string $kms_key + * Optional. Input only. The KMS key used to encrypt the disks, only + * applicable if disk_encryption is CMEK. Format: + * `projects/{project_id}/locations/{location}/keyRings/{key_ring_id}/cryptoKeys/{key_id}` + * Learn more about using your own encryption keys. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V2\GceSetup::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The size of the boot disk in GB attached to this instance, up to + * a maximum of 64000 GB (64 TB). If not specified, this defaults to the + * recommended value of 150GB. + * + * Generated from protobuf field int64 disk_size_gb = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string + */ + public function getDiskSizeGb() + { + return $this->disk_size_gb; + } + + /** + * Optional. The size of the boot disk in GB attached to this instance, up to + * a maximum of 64000 GB (64 TB). If not specified, this defaults to the + * recommended value of 150GB. + * + * Generated from protobuf field int64 disk_size_gb = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string $var + * @return $this + */ + public function setDiskSizeGb($var) + { + GPBUtil::checkInt64($var); + $this->disk_size_gb = $var; + + return $this; + } + + /** + * Optional. Indicates the type of the disk. + * + * Generated from protobuf field .google.cloud.notebooks.v2.DiskType disk_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getDiskType() + { + return $this->disk_type; + } + + /** + * Optional. Indicates the type of the disk. + * + * Generated from protobuf field .google.cloud.notebooks.v2.DiskType disk_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setDiskType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Notebooks\V2\DiskType::class); + $this->disk_type = $var; + + return $this; + } + + /** + * Optional. Input only. Disk encryption method used on the boot and data + * disks, defaults to GMEK. + * + * Generated from protobuf field .google.cloud.notebooks.v2.DiskEncryption disk_encryption = 3 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getDiskEncryption() + { + return $this->disk_encryption; + } + + /** + * Optional. Input only. Disk encryption method used on the boot and data + * disks, defaults to GMEK. + * + * Generated from protobuf field .google.cloud.notebooks.v2.DiskEncryption disk_encryption = 3 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setDiskEncryption($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Notebooks\V2\DiskEncryption::class); + $this->disk_encryption = $var; + + return $this; + } + + /** + * Optional. Input only. The KMS key used to encrypt the disks, only + * applicable if disk_encryption is CMEK. Format: + * `projects/{project_id}/locations/{location}/keyRings/{key_ring_id}/cryptoKeys/{key_id}` + * Learn more about using your own encryption keys. + * + * Generated from protobuf field string kms_key = 4 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getKmsKey() + { + return $this->kms_key; + } + + /** + * Optional. Input only. The KMS key used to encrypt the disks, only + * applicable if disk_encryption is CMEK. Format: + * `projects/{project_id}/locations/{location}/keyRings/{key_ring_id}/cryptoKeys/{key_id}` + * Learn more about using your own encryption keys. + * + * Generated from protobuf field string kms_key = 4 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setKmsKey($var) + { + GPBUtil::checkString($var, True); + $this->kms_key = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/CheckInstanceUpgradabilityRequest.php b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/CheckInstanceUpgradabilityRequest.php new file mode 100644 index 000000000000..14ad3c7b8c7b --- /dev/null +++ b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/CheckInstanceUpgradabilityRequest.php @@ -0,0 +1,71 @@ +google.cloud.notebooks.v2.CheckInstanceUpgradabilityRequest + */ +class CheckInstanceUpgradabilityRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * + * Generated from protobuf field string notebook_instance = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $notebook_instance = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $notebook_instance + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V2\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * + * Generated from protobuf field string notebook_instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getNotebookInstance() + { + return $this->notebook_instance; + } + + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * + * Generated from protobuf field string notebook_instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setNotebookInstance($var) + { + GPBUtil::checkString($var, True); + $this->notebook_instance = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/CheckInstanceUpgradabilityResponse.php b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/CheckInstanceUpgradabilityResponse.php new file mode 100644 index 000000000000..fa10bb6afe87 --- /dev/null +++ b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/CheckInstanceUpgradabilityResponse.php @@ -0,0 +1,181 @@ +google.cloud.notebooks.v2.CheckInstanceUpgradabilityResponse + */ +class CheckInstanceUpgradabilityResponse extends \Google\Protobuf\Internal\Message +{ + /** + * If an instance is upgradeable. + * + * Generated from protobuf field bool upgradeable = 1; + */ + protected $upgradeable = false; + /** + * The version this instance will be upgraded to if calling the upgrade + * endpoint. This field will only be populated if field upgradeable is true. + * + * Generated from protobuf field string upgrade_version = 2; + */ + protected $upgrade_version = ''; + /** + * Additional information about upgrade. + * + * Generated from protobuf field string upgrade_info = 3; + */ + protected $upgrade_info = ''; + /** + * The new image self link this instance will be upgraded to if calling the + * upgrade endpoint. This field will only be populated if field upgradeable + * is true. + * + * Generated from protobuf field string upgrade_image = 4; + */ + protected $upgrade_image = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $upgradeable + * If an instance is upgradeable. + * @type string $upgrade_version + * The version this instance will be upgraded to if calling the upgrade + * endpoint. This field will only be populated if field upgradeable is true. + * @type string $upgrade_info + * Additional information about upgrade. + * @type string $upgrade_image + * The new image self link this instance will be upgraded to if calling the + * upgrade endpoint. This field will only be populated if field upgradeable + * is true. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V2\Service::initOnce(); + parent::__construct($data); + } + + /** + * If an instance is upgradeable. + * + * Generated from protobuf field bool upgradeable = 1; + * @return bool + */ + public function getUpgradeable() + { + return $this->upgradeable; + } + + /** + * If an instance is upgradeable. + * + * Generated from protobuf field bool upgradeable = 1; + * @param bool $var + * @return $this + */ + public function setUpgradeable($var) + { + GPBUtil::checkBool($var); + $this->upgradeable = $var; + + return $this; + } + + /** + * The version this instance will be upgraded to if calling the upgrade + * endpoint. This field will only be populated if field upgradeable is true. + * + * Generated from protobuf field string upgrade_version = 2; + * @return string + */ + public function getUpgradeVersion() + { + return $this->upgrade_version; + } + + /** + * The version this instance will be upgraded to if calling the upgrade + * endpoint. This field will only be populated if field upgradeable is true. + * + * Generated from protobuf field string upgrade_version = 2; + * @param string $var + * @return $this + */ + public function setUpgradeVersion($var) + { + GPBUtil::checkString($var, True); + $this->upgrade_version = $var; + + return $this; + } + + /** + * Additional information about upgrade. + * + * Generated from protobuf field string upgrade_info = 3; + * @return string + */ + public function getUpgradeInfo() + { + return $this->upgrade_info; + } + + /** + * Additional information about upgrade. + * + * Generated from protobuf field string upgrade_info = 3; + * @param string $var + * @return $this + */ + public function setUpgradeInfo($var) + { + GPBUtil::checkString($var, True); + $this->upgrade_info = $var; + + return $this; + } + + /** + * The new image self link this instance will be upgraded to if calling the + * upgrade endpoint. This field will only be populated if field upgradeable + * is true. + * + * Generated from protobuf field string upgrade_image = 4; + * @return string + */ + public function getUpgradeImage() + { + return $this->upgrade_image; + } + + /** + * The new image self link this instance will be upgraded to if calling the + * upgrade endpoint. This field will only be populated if field upgradeable + * is true. + * + * Generated from protobuf field string upgrade_image = 4; + * @param string $var + * @return $this + */ + public function setUpgradeImage($var) + { + GPBUtil::checkString($var, True); + $this->upgrade_image = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/ContainerImage.php b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/ContainerImage.php new file mode 100644 index 000000000000..72e77b2eb0b6 --- /dev/null +++ b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/ContainerImage.php @@ -0,0 +1,110 @@ +google.cloud.notebooks.v2.ContainerImage + */ +class ContainerImage extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The path to the container image repository. For example: + * `gcr.io/{project_id}/{image_name}` + * + * Generated from protobuf field string repository = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $repository = ''; + /** + * Optional. The tag of the container image. If not specified, this defaults + * to the latest tag. + * + * Generated from protobuf field string tag = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $tag = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $repository + * Required. The path to the container image repository. For example: + * `gcr.io/{project_id}/{image_name}` + * @type string $tag + * Optional. The tag of the container image. If not specified, this defaults + * to the latest tag. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V2\GceSetup::initOnce(); + parent::__construct($data); + } + + /** + * Required. The path to the container image repository. For example: + * `gcr.io/{project_id}/{image_name}` + * + * Generated from protobuf field string repository = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getRepository() + { + return $this->repository; + } + + /** + * Required. The path to the container image repository. For example: + * `gcr.io/{project_id}/{image_name}` + * + * Generated from protobuf field string repository = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setRepository($var) + { + GPBUtil::checkString($var, True); + $this->repository = $var; + + return $this; + } + + /** + * Optional. The tag of the container image. If not specified, this defaults + * to the latest tag. + * + * Generated from protobuf field string tag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getTag() + { + return $this->tag; + } + + /** + * Optional. The tag of the container image. If not specified, this defaults + * to the latest tag. + * + * Generated from protobuf field string tag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setTag($var) + { + GPBUtil::checkString($var, True); + $this->tag = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/CreateInstanceRequest.php b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/CreateInstanceRequest.php new file mode 100644 index 000000000000..305567395f86 --- /dev/null +++ b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/CreateInstanceRequest.php @@ -0,0 +1,202 @@ +google.cloud.notebooks.v2.CreateInstanceRequest + */ +class CreateInstanceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Format: + * `parent=projects/{project_id}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. User-defined unique ID of this instance. + * + * Generated from protobuf field string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $instance_id = ''; + /** + * Required. The instance to be created. + * + * Generated from protobuf field .google.cloud.notebooks.v2.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $instance = null; + /** + * Optional. Idempotent request UUID. + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param string $parent Required. Format: + * `parent=projects/{project_id}/locations/{location}` + * Please see {@see NotebookServiceClient::locationName()} for help formatting this field. + * @param \Google\Cloud\Notebooks\V2\Instance $instance Required. The instance to be created. + * @param string $instanceId Required. User-defined unique ID of this instance. + * + * @return \Google\Cloud\Notebooks\V2\CreateInstanceRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Notebooks\V2\Instance $instance, string $instanceId): self + { + return (new self()) + ->setParent($parent) + ->setInstance($instance) + ->setInstanceId($instanceId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Format: + * `parent=projects/{project_id}/locations/{location}` + * @type string $instance_id + * Required. User-defined unique ID of this instance. + * @type \Google\Cloud\Notebooks\V2\Instance $instance + * Required. The instance to be created. + * @type string $request_id + * Optional. Idempotent request UUID. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V2\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. Format: + * `parent=projects/{project_id}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Format: + * `parent=projects/{project_id}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. User-defined unique ID of this instance. + * + * Generated from protobuf field string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getInstanceId() + { + return $this->instance_id; + } + + /** + * Required. User-defined unique ID of this instance. + * + * Generated from protobuf field string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setInstanceId($var) + { + GPBUtil::checkString($var, True); + $this->instance_id = $var; + + return $this; + } + + /** + * Required. The instance to be created. + * + * Generated from protobuf field .google.cloud.notebooks.v2.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Notebooks\V2\Instance|null + */ + public function getInstance() + { + return $this->instance; + } + + public function hasInstance() + { + return isset($this->instance); + } + + public function clearInstance() + { + unset($this->instance); + } + + /** + * Required. The instance to be created. + * + * Generated from protobuf field .google.cloud.notebooks.v2.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Notebooks\V2\Instance $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V2\Instance::class); + $this->instance = $var; + + return $this; + } + + /** + * Optional. Idempotent request UUID. + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. Idempotent request UUID. + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/DataDisk.php b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/DataDisk.php new file mode 100644 index 000000000000..670f178b50a0 --- /dev/null +++ b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/DataDisk.php @@ -0,0 +1,189 @@ +google.cloud.notebooks.v2.DataDisk + */ +class DataDisk extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The size of the disk in GB attached to this VM instance, up to a + * maximum of 64000 GB (64 TB). If not specified, this defaults to 100. + * + * Generated from protobuf field int64 disk_size_gb = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $disk_size_gb = 0; + /** + * Optional. Input only. Indicates the type of the disk. + * + * Generated from protobuf field .google.cloud.notebooks.v2.DiskType disk_type = 2 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + */ + protected $disk_type = 0; + /** + * Optional. Input only. Disk encryption method used on the boot and data + * disks, defaults to GMEK. + * + * Generated from protobuf field .google.cloud.notebooks.v2.DiskEncryption disk_encryption = 5 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + */ + protected $disk_encryption = 0; + /** + * Optional. Input only. The KMS key used to encrypt the disks, only + * applicable if disk_encryption is CMEK. Format: + * `projects/{project_id}/locations/{location}/keyRings/{key_ring_id}/cryptoKeys/{key_id}` + * Learn more about using your own encryption keys. + * + * Generated from protobuf field string kms_key = 6 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + */ + protected $kms_key = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $disk_size_gb + * Optional. The size of the disk in GB attached to this VM instance, up to a + * maximum of 64000 GB (64 TB). If not specified, this defaults to 100. + * @type int $disk_type + * Optional. Input only. Indicates the type of the disk. + * @type int $disk_encryption + * Optional. Input only. Disk encryption method used on the boot and data + * disks, defaults to GMEK. + * @type string $kms_key + * Optional. Input only. The KMS key used to encrypt the disks, only + * applicable if disk_encryption is CMEK. Format: + * `projects/{project_id}/locations/{location}/keyRings/{key_ring_id}/cryptoKeys/{key_id}` + * Learn more about using your own encryption keys. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V2\GceSetup::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The size of the disk in GB attached to this VM instance, up to a + * maximum of 64000 GB (64 TB). If not specified, this defaults to 100. + * + * Generated from protobuf field int64 disk_size_gb = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string + */ + public function getDiskSizeGb() + { + return $this->disk_size_gb; + } + + /** + * Optional. The size of the disk in GB attached to this VM instance, up to a + * maximum of 64000 GB (64 TB). If not specified, this defaults to 100. + * + * Generated from protobuf field int64 disk_size_gb = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string $var + * @return $this + */ + public function setDiskSizeGb($var) + { + GPBUtil::checkInt64($var); + $this->disk_size_gb = $var; + + return $this; + } + + /** + * Optional. Input only. Indicates the type of the disk. + * + * Generated from protobuf field .google.cloud.notebooks.v2.DiskType disk_type = 2 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getDiskType() + { + return $this->disk_type; + } + + /** + * Optional. Input only. Indicates the type of the disk. + * + * Generated from protobuf field .google.cloud.notebooks.v2.DiskType disk_type = 2 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setDiskType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Notebooks\V2\DiskType::class); + $this->disk_type = $var; + + return $this; + } + + /** + * Optional. Input only. Disk encryption method used on the boot and data + * disks, defaults to GMEK. + * + * Generated from protobuf field .google.cloud.notebooks.v2.DiskEncryption disk_encryption = 5 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getDiskEncryption() + { + return $this->disk_encryption; + } + + /** + * Optional. Input only. Disk encryption method used on the boot and data + * disks, defaults to GMEK. + * + * Generated from protobuf field .google.cloud.notebooks.v2.DiskEncryption disk_encryption = 5 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setDiskEncryption($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Notebooks\V2\DiskEncryption::class); + $this->disk_encryption = $var; + + return $this; + } + + /** + * Optional. Input only. The KMS key used to encrypt the disks, only + * applicable if disk_encryption is CMEK. Format: + * `projects/{project_id}/locations/{location}/keyRings/{key_ring_id}/cryptoKeys/{key_id}` + * Learn more about using your own encryption keys. + * + * Generated from protobuf field string kms_key = 6 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getKmsKey() + { + return $this->kms_key; + } + + /** + * Optional. Input only. The KMS key used to encrypt the disks, only + * applicable if disk_encryption is CMEK. Format: + * `projects/{project_id}/locations/{location}/keyRings/{key_ring_id}/cryptoKeys/{key_id}` + * Learn more about using your own encryption keys. + * + * Generated from protobuf field string kms_key = 6 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setKmsKey($var) + { + GPBUtil::checkString($var, True); + $this->kms_key = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/DeleteInstanceRequest.php b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/DeleteInstanceRequest.php new file mode 100644 index 000000000000..6eb1f755fd45 --- /dev/null +++ b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/DeleteInstanceRequest.php @@ -0,0 +1,120 @@ +google.cloud.notebooks.v2.DeleteInstanceRequest + */ +class DeleteInstanceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. Idempotent request UUID. + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param string $name Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * Please see {@see NotebookServiceClient::instanceName()} for help formatting this field. + * + * @return \Google\Cloud\Notebooks\V2\DeleteInstanceRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * @type string $request_id + * Optional. Idempotent request UUID. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V2\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. Idempotent request UUID. + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. Idempotent request UUID. + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/DiagnoseInstanceRequest.php b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/DiagnoseInstanceRequest.php new file mode 100644 index 000000000000..bf8021ecb723 --- /dev/null +++ b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/DiagnoseInstanceRequest.php @@ -0,0 +1,166 @@ +google.cloud.notebooks.v2.DiagnoseInstanceRequest + */ +class DiagnoseInstanceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. Defines flags that are used to run the diagnostic tool + * + * Generated from protobuf field .google.cloud.notebooks.v2.DiagnosticConfig diagnostic_config = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $diagnostic_config = null; + /** + * Optional. Maxmium amount of time in minutes before the operation times out. + * + * Generated from protobuf field int32 timeout_minutes = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $timeout_minutes = 0; + + /** + * @param string $name Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * Please see {@see NotebookServiceClient::instanceName()} for help formatting this field. + * @param \Google\Cloud\Notebooks\V2\DiagnosticConfig $diagnosticConfig Required. Defines flags that are used to run the diagnostic tool + * + * @return \Google\Cloud\Notebooks\V2\DiagnoseInstanceRequest + * + * @experimental + */ + public static function build(string $name, \Google\Cloud\Notebooks\V2\DiagnosticConfig $diagnosticConfig): self + { + return (new self()) + ->setName($name) + ->setDiagnosticConfig($diagnosticConfig); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * @type \Google\Cloud\Notebooks\V2\DiagnosticConfig $diagnostic_config + * Required. Defines flags that are used to run the diagnostic tool + * @type int $timeout_minutes + * Optional. Maxmium amount of time in minutes before the operation times out. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V2\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. Defines flags that are used to run the diagnostic tool + * + * Generated from protobuf field .google.cloud.notebooks.v2.DiagnosticConfig diagnostic_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Notebooks\V2\DiagnosticConfig|null + */ + public function getDiagnosticConfig() + { + return $this->diagnostic_config; + } + + public function hasDiagnosticConfig() + { + return isset($this->diagnostic_config); + } + + public function clearDiagnosticConfig() + { + unset($this->diagnostic_config); + } + + /** + * Required. Defines flags that are used to run the diagnostic tool + * + * Generated from protobuf field .google.cloud.notebooks.v2.DiagnosticConfig diagnostic_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Notebooks\V2\DiagnosticConfig $var + * @return $this + */ + public function setDiagnosticConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V2\DiagnosticConfig::class); + $this->diagnostic_config = $var; + + return $this; + } + + /** + * Optional. Maxmium amount of time in minutes before the operation times out. + * + * Generated from protobuf field int32 timeout_minutes = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getTimeoutMinutes() + { + return $this->timeout_minutes; + } + + /** + * Optional. Maxmium amount of time in minutes before the operation times out. + * + * Generated from protobuf field int32 timeout_minutes = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setTimeoutMinutes($var) + { + GPBUtil::checkInt32($var); + $this->timeout_minutes = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/DiagnosticConfig.php b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/DiagnosticConfig.php new file mode 100644 index 000000000000..23d388e99653 --- /dev/null +++ b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/DiagnosticConfig.php @@ -0,0 +1,259 @@ +google.cloud.notebooks.v2.DiagnosticConfig + */ +class DiagnosticConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Required. User Cloud Storage bucket location (REQUIRED). + * Must be formatted with path prefix (`gs://$GCS_BUCKET`). + * Permissions: + * User Managed Notebooks: + * - storage.buckets.writer: Must be given to the project's service account + * attached to VM. + * Google Managed Notebooks: + * - storage.buckets.writer: Must be given to the project's service account or + * user credentials attached to VM depending on authentication mode. + * Cloud Storage bucket Log file will be written to + * `gs://$GCS_BUCKET/$RELATIVE_PATH/$VM_DATE_$TIME.tar.gz` + * + * Generated from protobuf field string gcs_bucket = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $gcs_bucket = ''; + /** + * Optional. Defines the relative storage path in the Cloud Storage bucket + * where the diagnostic logs will be written: Default path will be the root + * directory of the Cloud Storage bucket + * (`gs://$GCS_BUCKET/$DATE_$TIME.tar.gz`) Example of full path where Log file + * will be written: `gs://$GCS_BUCKET/$RELATIVE_PATH/` + * + * Generated from protobuf field string relative_path = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $relative_path = ''; + /** + * Optional. Enables flag to repair service for instance + * + * Generated from protobuf field bool enable_repair_flag = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $enable_repair_flag = false; + /** + * Optional. Enables flag to capture packets from the instance for 30 seconds + * + * Generated from protobuf field bool enable_packet_capture_flag = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $enable_packet_capture_flag = false; + /** + * Optional. Enables flag to copy all `/home/jupyter` folder contents + * + * Generated from protobuf field bool enable_copy_home_files_flag = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $enable_copy_home_files_flag = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $gcs_bucket + * Required. User Cloud Storage bucket location (REQUIRED). + * Must be formatted with path prefix (`gs://$GCS_BUCKET`). + * Permissions: + * User Managed Notebooks: + * - storage.buckets.writer: Must be given to the project's service account + * attached to VM. + * Google Managed Notebooks: + * - storage.buckets.writer: Must be given to the project's service account or + * user credentials attached to VM depending on authentication mode. + * Cloud Storage bucket Log file will be written to + * `gs://$GCS_BUCKET/$RELATIVE_PATH/$VM_DATE_$TIME.tar.gz` + * @type string $relative_path + * Optional. Defines the relative storage path in the Cloud Storage bucket + * where the diagnostic logs will be written: Default path will be the root + * directory of the Cloud Storage bucket + * (`gs://$GCS_BUCKET/$DATE_$TIME.tar.gz`) Example of full path where Log file + * will be written: `gs://$GCS_BUCKET/$RELATIVE_PATH/` + * @type bool $enable_repair_flag + * Optional. Enables flag to repair service for instance + * @type bool $enable_packet_capture_flag + * Optional. Enables flag to capture packets from the instance for 30 seconds + * @type bool $enable_copy_home_files_flag + * Optional. Enables flag to copy all `/home/jupyter` folder contents + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V2\DiagnosticConfig::initOnce(); + parent::__construct($data); + } + + /** + * Required. User Cloud Storage bucket location (REQUIRED). + * Must be formatted with path prefix (`gs://$GCS_BUCKET`). + * Permissions: + * User Managed Notebooks: + * - storage.buckets.writer: Must be given to the project's service account + * attached to VM. + * Google Managed Notebooks: + * - storage.buckets.writer: Must be given to the project's service account or + * user credentials attached to VM depending on authentication mode. + * Cloud Storage bucket Log file will be written to + * `gs://$GCS_BUCKET/$RELATIVE_PATH/$VM_DATE_$TIME.tar.gz` + * + * Generated from protobuf field string gcs_bucket = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getGcsBucket() + { + return $this->gcs_bucket; + } + + /** + * Required. User Cloud Storage bucket location (REQUIRED). + * Must be formatted with path prefix (`gs://$GCS_BUCKET`). + * Permissions: + * User Managed Notebooks: + * - storage.buckets.writer: Must be given to the project's service account + * attached to VM. + * Google Managed Notebooks: + * - storage.buckets.writer: Must be given to the project's service account or + * user credentials attached to VM depending on authentication mode. + * Cloud Storage bucket Log file will be written to + * `gs://$GCS_BUCKET/$RELATIVE_PATH/$VM_DATE_$TIME.tar.gz` + * + * Generated from protobuf field string gcs_bucket = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setGcsBucket($var) + { + GPBUtil::checkString($var, True); + $this->gcs_bucket = $var; + + return $this; + } + + /** + * Optional. Defines the relative storage path in the Cloud Storage bucket + * where the diagnostic logs will be written: Default path will be the root + * directory of the Cloud Storage bucket + * (`gs://$GCS_BUCKET/$DATE_$TIME.tar.gz`) Example of full path where Log file + * will be written: `gs://$GCS_BUCKET/$RELATIVE_PATH/` + * + * Generated from protobuf field string relative_path = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRelativePath() + { + return $this->relative_path; + } + + /** + * Optional. Defines the relative storage path in the Cloud Storage bucket + * where the diagnostic logs will be written: Default path will be the root + * directory of the Cloud Storage bucket + * (`gs://$GCS_BUCKET/$DATE_$TIME.tar.gz`) Example of full path where Log file + * will be written: `gs://$GCS_BUCKET/$RELATIVE_PATH/` + * + * Generated from protobuf field string relative_path = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRelativePath($var) + { + GPBUtil::checkString($var, True); + $this->relative_path = $var; + + return $this; + } + + /** + * Optional. Enables flag to repair service for instance + * + * Generated from protobuf field bool enable_repair_flag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getEnableRepairFlag() + { + return $this->enable_repair_flag; + } + + /** + * Optional. Enables flag to repair service for instance + * + * Generated from protobuf field bool enable_repair_flag = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setEnableRepairFlag($var) + { + GPBUtil::checkBool($var); + $this->enable_repair_flag = $var; + + return $this; + } + + /** + * Optional. Enables flag to capture packets from the instance for 30 seconds + * + * Generated from protobuf field bool enable_packet_capture_flag = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getEnablePacketCaptureFlag() + { + return $this->enable_packet_capture_flag; + } + + /** + * Optional. Enables flag to capture packets from the instance for 30 seconds + * + * Generated from protobuf field bool enable_packet_capture_flag = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setEnablePacketCaptureFlag($var) + { + GPBUtil::checkBool($var); + $this->enable_packet_capture_flag = $var; + + return $this; + } + + /** + * Optional. Enables flag to copy all `/home/jupyter` folder contents + * + * Generated from protobuf field bool enable_copy_home_files_flag = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getEnableCopyHomeFilesFlag() + { + return $this->enable_copy_home_files_flag; + } + + /** + * Optional. Enables flag to copy all `/home/jupyter` folder contents + * + * Generated from protobuf field bool enable_copy_home_files_flag = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setEnableCopyHomeFilesFlag($var) + { + GPBUtil::checkBool($var); + $this->enable_copy_home_files_flag = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/DiskEncryption.php b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/DiskEncryption.php new file mode 100644 index 000000000000..279b7d57bf0a --- /dev/null +++ b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/DiskEncryption.php @@ -0,0 +1,61 @@ +google.cloud.notebooks.v2.DiskEncryption + */ +class DiskEncryption +{ + /** + * Disk encryption is not specified. + * + * Generated from protobuf enum DISK_ENCRYPTION_UNSPECIFIED = 0; + */ + const DISK_ENCRYPTION_UNSPECIFIED = 0; + /** + * Use Google managed encryption keys to encrypt the boot disk. + * + * Generated from protobuf enum GMEK = 1; + */ + const GMEK = 1; + /** + * Use customer managed encryption keys to encrypt the boot disk. + * + * Generated from protobuf enum CMEK = 2; + */ + const CMEK = 2; + + private static $valueToName = [ + self::DISK_ENCRYPTION_UNSPECIFIED => 'DISK_ENCRYPTION_UNSPECIFIED', + self::GMEK => 'GMEK', + self::CMEK => 'CMEK', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/DiskType.php b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/DiskType.php new file mode 100644 index 000000000000..791c8ff13d74 --- /dev/null +++ b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/DiskType.php @@ -0,0 +1,75 @@ +google.cloud.notebooks.v2.DiskType + */ +class DiskType +{ + /** + * Disk type not set. + * + * Generated from protobuf enum DISK_TYPE_UNSPECIFIED = 0; + */ + const DISK_TYPE_UNSPECIFIED = 0; + /** + * Standard persistent disk type. + * + * Generated from protobuf enum PD_STANDARD = 1; + */ + const PD_STANDARD = 1; + /** + * SSD persistent disk type. + * + * Generated from protobuf enum PD_SSD = 2; + */ + const PD_SSD = 2; + /** + * Balanced persistent disk type. + * + * Generated from protobuf enum PD_BALANCED = 3; + */ + const PD_BALANCED = 3; + /** + * Extreme persistent disk type. + * + * Generated from protobuf enum PD_EXTREME = 4; + */ + const PD_EXTREME = 4; + + private static $valueToName = [ + self::DISK_TYPE_UNSPECIFIED => 'DISK_TYPE_UNSPECIFIED', + self::PD_STANDARD => 'PD_STANDARD', + self::PD_SSD => 'PD_SSD', + self::PD_BALANCED => 'PD_BALANCED', + self::PD_EXTREME => 'PD_EXTREME', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/Event.php b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/Event.php new file mode 100644 index 000000000000..9214bd704974 --- /dev/null +++ b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/Event.php @@ -0,0 +1,145 @@ +google.cloud.notebooks.v2.Event + */ +class Event extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Event report time. + * + * Generated from protobuf field .google.protobuf.Timestamp report_time = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $report_time = null; + /** + * Optional. Event type. + * + * Generated from protobuf field .google.cloud.notebooks.v2.Event.EventType type = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $type = 0; + /** + * Optional. Event details. This field is used to pass event information. + * + * Generated from protobuf field map details = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $details; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $report_time + * Optional. Event report time. + * @type int $type + * Optional. Event type. + * @type array|\Google\Protobuf\Internal\MapField $details + * Optional. Event details. This field is used to pass event information. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V2\Event::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Event report time. + * + * Generated from protobuf field .google.protobuf.Timestamp report_time = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getReportTime() + { + return $this->report_time; + } + + public function hasReportTime() + { + return isset($this->report_time); + } + + public function clearReportTime() + { + unset($this->report_time); + } + + /** + * Optional. Event report time. + * + * Generated from protobuf field .google.protobuf.Timestamp report_time = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setReportTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->report_time = $var; + + return $this; + } + + /** + * Optional. Event type. + * + * Generated from protobuf field .google.cloud.notebooks.v2.Event.EventType type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Optional. Event type. + * + * Generated from protobuf field .google.cloud.notebooks.v2.Event.EventType type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Notebooks\V2\Event\EventType::class); + $this->type = $var; + + return $this; + } + + /** + * Optional. Event details. This field is used to pass event information. + * + * Generated from protobuf field map details = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getDetails() + { + return $this->details; + } + + /** + * Optional. Event details. This field is used to pass event information. + * + * Generated from protobuf field map details = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setDetails($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->details = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/Event/EventType.php b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/Event/EventType.php new file mode 100644 index 000000000000..d99ae420a4ac --- /dev/null +++ b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/Event/EventType.php @@ -0,0 +1,93 @@ +google.cloud.notebooks.v2.Event.EventType + */ +class EventType +{ + /** + * Event is not specified. + * + * Generated from protobuf enum EVENT_TYPE_UNSPECIFIED = 0; + */ + const EVENT_TYPE_UNSPECIFIED = 0; + /** + * The instance / runtime is idle + * + * Generated from protobuf enum IDLE = 1; + */ + const IDLE = 1; + /** + * The instance / runtime is available. + * This event indicates that instance / runtime underlying compute is + * operational. + * + * Generated from protobuf enum HEARTBEAT = 2; + */ + const HEARTBEAT = 2; + /** + * The instance / runtime health is available. + * This event indicates that instance / runtime health information. + * + * Generated from protobuf enum HEALTH = 3; + */ + const HEALTH = 3; + /** + * The instance / runtime is available. + * This event allows instance / runtime to send Host maintenance + * information to Control Plane. + * https://cloud.google.com/compute/docs/gpus/gpu-host-maintenance + * + * Generated from protobuf enum MAINTENANCE = 4; + */ + const MAINTENANCE = 4; + /** + * The instance / runtime is available. + * This event indicates that the instance had metadata that needs to be + * modified. + * + * Generated from protobuf enum METADATA_CHANGE = 5; + */ + const METADATA_CHANGE = 5; + + private static $valueToName = [ + self::EVENT_TYPE_UNSPECIFIED => 'EVENT_TYPE_UNSPECIFIED', + self::IDLE => 'IDLE', + self::HEARTBEAT => 'HEARTBEAT', + self::HEALTH => 'HEALTH', + self::MAINTENANCE => 'MAINTENANCE', + self::METADATA_CHANGE => 'METADATA_CHANGE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(EventType::class, \Google\Cloud\Notebooks\V2\Event_EventType::class); + diff --git a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/GPUDriverConfig.php b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/GPUDriverConfig.php new file mode 100644 index 000000000000..e7b276edeb92 --- /dev/null +++ b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/GPUDriverConfig.php @@ -0,0 +1,117 @@ +google.cloud.notebooks.v2.GPUDriverConfig + */ +class GPUDriverConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Whether the end user authorizes Google Cloud to install GPU + * driver on this VM instance. If this field is empty or set to false, the GPU + * driver won't be installed. Only applicable to instances with GPUs. + * + * Generated from protobuf field bool enable_gpu_driver = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $enable_gpu_driver = false; + /** + * Optional. Specify a custom Cloud Storage path where the GPU driver is + * stored. If not specified, we'll automatically choose from official GPU + * drivers. + * + * Generated from protobuf field string custom_gpu_driver_path = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $custom_gpu_driver_path = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $enable_gpu_driver + * Optional. Whether the end user authorizes Google Cloud to install GPU + * driver on this VM instance. If this field is empty or set to false, the GPU + * driver won't be installed. Only applicable to instances with GPUs. + * @type string $custom_gpu_driver_path + * Optional. Specify a custom Cloud Storage path where the GPU driver is + * stored. If not specified, we'll automatically choose from official GPU + * drivers. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V2\GceSetup::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Whether the end user authorizes Google Cloud to install GPU + * driver on this VM instance. If this field is empty or set to false, the GPU + * driver won't be installed. Only applicable to instances with GPUs. + * + * Generated from protobuf field bool enable_gpu_driver = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getEnableGpuDriver() + { + return $this->enable_gpu_driver; + } + + /** + * Optional. Whether the end user authorizes Google Cloud to install GPU + * driver on this VM instance. If this field is empty or set to false, the GPU + * driver won't be installed. Only applicable to instances with GPUs. + * + * Generated from protobuf field bool enable_gpu_driver = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setEnableGpuDriver($var) + { + GPBUtil::checkBool($var); + $this->enable_gpu_driver = $var; + + return $this; + } + + /** + * Optional. Specify a custom Cloud Storage path where the GPU driver is + * stored. If not specified, we'll automatically choose from official GPU + * drivers. + * + * Generated from protobuf field string custom_gpu_driver_path = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getCustomGpuDriverPath() + { + return $this->custom_gpu_driver_path; + } + + /** + * Optional. Specify a custom Cloud Storage path where the GPU driver is + * stored. If not specified, we'll automatically choose from official GPU + * drivers. + * + * Generated from protobuf field string custom_gpu_driver_path = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setCustomGpuDriverPath($var) + { + GPBUtil::checkString($var, True); + $this->custom_gpu_driver_path = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/GceSetup.php b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/GceSetup.php new file mode 100644 index 000000000000..4865a23b99cd --- /dev/null +++ b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/GceSetup.php @@ -0,0 +1,595 @@ +google.cloud.notebooks.v2.GceSetup + */ +class GceSetup extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The machine type of the VM instance. + * https://cloud.google.com/compute/docs/machine-resource + * + * Generated from protobuf field string machine_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $machine_type = ''; + /** + * Optional. The hardware accelerators used on this instance. If you use + * accelerators, make sure that your configuration has + * [enough vCPUs and memory to support the `machine_type` you have + * selected](https://cloud.google.com/compute/docs/gpus/#gpus-list). + * Currently supports only one accelerator configuration. + * + * Generated from protobuf field repeated .google.cloud.notebooks.v2.AcceleratorConfig accelerator_configs = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $accelerator_configs; + /** + * Optional. The service account that serves as an identity for the VM + * instance. Currently supports only one service account. + * + * Generated from protobuf field repeated .google.cloud.notebooks.v2.ServiceAccount service_accounts = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $service_accounts; + /** + * Optional. The boot disk for the VM. + * + * Generated from protobuf field .google.cloud.notebooks.v2.BootDisk boot_disk = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $boot_disk = null; + /** + * Optional. Data disks attached to the VM instance. + * Currently supports only one data disk. + * + * Generated from protobuf field repeated .google.cloud.notebooks.v2.DataDisk data_disks = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $data_disks; + /** + * Optional. Shielded VM configuration. + * [Images using supported Shielded VM + * features](https://cloud.google.com/compute/docs/instances/modifying-shielded-vm). + * + * Generated from protobuf field .google.cloud.notebooks.v2.ShieldedInstanceConfig shielded_instance_config = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $shielded_instance_config = null; + /** + * Optional. The network interfaces for the VM. + * Supports only one interface. + * + * Generated from protobuf field repeated .google.cloud.notebooks.v2.NetworkInterface network_interfaces = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $network_interfaces; + /** + * Optional. If true, no external IP will be assigned to this VM instance. + * + * Generated from protobuf field bool disable_public_ip = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $disable_public_ip = false; + /** + * Optional. The Compute Engine tags to add to runtime (see [Tagging + * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)). + * + * Generated from protobuf field repeated string tags = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $tags; + /** + * Optional. Custom metadata to apply to this instance. + * + * Generated from protobuf field map metadata = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $metadata; + /** + * Optional. Flag to enable ip forwarding or not, default false/off. + * https://cloud.google.com/vpc/docs/using-routes#canipforward + * + * Generated from protobuf field bool enable_ip_forwarding = 13 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $enable_ip_forwarding = false; + /** + * Optional. Configuration for GPU drivers. + * + * Generated from protobuf field .google.cloud.notebooks.v2.GPUDriverConfig gpu_driver_config = 14 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $gpu_driver_config = null; + protected $image; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $machine_type + * Optional. The machine type of the VM instance. + * https://cloud.google.com/compute/docs/machine-resource + * @type array<\Google\Cloud\Notebooks\V2\AcceleratorConfig>|\Google\Protobuf\Internal\RepeatedField $accelerator_configs + * Optional. The hardware accelerators used on this instance. If you use + * accelerators, make sure that your configuration has + * [enough vCPUs and memory to support the `machine_type` you have + * selected](https://cloud.google.com/compute/docs/gpus/#gpus-list). + * Currently supports only one accelerator configuration. + * @type array<\Google\Cloud\Notebooks\V2\ServiceAccount>|\Google\Protobuf\Internal\RepeatedField $service_accounts + * Optional. The service account that serves as an identity for the VM + * instance. Currently supports only one service account. + * @type \Google\Cloud\Notebooks\V2\VmImage $vm_image + * Optional. Use a Compute Engine VM image to start the notebook instance. + * @type \Google\Cloud\Notebooks\V2\ContainerImage $container_image + * Optional. Use a container image to start the notebook instance. + * @type \Google\Cloud\Notebooks\V2\BootDisk $boot_disk + * Optional. The boot disk for the VM. + * @type array<\Google\Cloud\Notebooks\V2\DataDisk>|\Google\Protobuf\Internal\RepeatedField $data_disks + * Optional. Data disks attached to the VM instance. + * Currently supports only one data disk. + * @type \Google\Cloud\Notebooks\V2\ShieldedInstanceConfig $shielded_instance_config + * Optional. Shielded VM configuration. + * [Images using supported Shielded VM + * features](https://cloud.google.com/compute/docs/instances/modifying-shielded-vm). + * @type array<\Google\Cloud\Notebooks\V2\NetworkInterface>|\Google\Protobuf\Internal\RepeatedField $network_interfaces + * Optional. The network interfaces for the VM. + * Supports only one interface. + * @type bool $disable_public_ip + * Optional. If true, no external IP will be assigned to this VM instance. + * @type array|\Google\Protobuf\Internal\RepeatedField $tags + * Optional. The Compute Engine tags to add to runtime (see [Tagging + * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)). + * @type array|\Google\Protobuf\Internal\MapField $metadata + * Optional. Custom metadata to apply to this instance. + * @type bool $enable_ip_forwarding + * Optional. Flag to enable ip forwarding or not, default false/off. + * https://cloud.google.com/vpc/docs/using-routes#canipforward + * @type \Google\Cloud\Notebooks\V2\GPUDriverConfig $gpu_driver_config + * Optional. Configuration for GPU drivers. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V2\GceSetup::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The machine type of the VM instance. + * https://cloud.google.com/compute/docs/machine-resource + * + * Generated from protobuf field string machine_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getMachineType() + { + return $this->machine_type; + } + + /** + * Optional. The machine type of the VM instance. + * https://cloud.google.com/compute/docs/machine-resource + * + * Generated from protobuf field string machine_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setMachineType($var) + { + GPBUtil::checkString($var, True); + $this->machine_type = $var; + + return $this; + } + + /** + * Optional. The hardware accelerators used on this instance. If you use + * accelerators, make sure that your configuration has + * [enough vCPUs and memory to support the `machine_type` you have + * selected](https://cloud.google.com/compute/docs/gpus/#gpus-list). + * Currently supports only one accelerator configuration. + * + * Generated from protobuf field repeated .google.cloud.notebooks.v2.AcceleratorConfig accelerator_configs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAcceleratorConfigs() + { + return $this->accelerator_configs; + } + + /** + * Optional. The hardware accelerators used on this instance. If you use + * accelerators, make sure that your configuration has + * [enough vCPUs and memory to support the `machine_type` you have + * selected](https://cloud.google.com/compute/docs/gpus/#gpus-list). + * Currently supports only one accelerator configuration. + * + * Generated from protobuf field repeated .google.cloud.notebooks.v2.AcceleratorConfig accelerator_configs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\Notebooks\V2\AcceleratorConfig>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAcceleratorConfigs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Notebooks\V2\AcceleratorConfig::class); + $this->accelerator_configs = $arr; + + return $this; + } + + /** + * Optional. The service account that serves as an identity for the VM + * instance. Currently supports only one service account. + * + * Generated from protobuf field repeated .google.cloud.notebooks.v2.ServiceAccount service_accounts = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getServiceAccounts() + { + return $this->service_accounts; + } + + /** + * Optional. The service account that serves as an identity for the VM + * instance. Currently supports only one service account. + * + * Generated from protobuf field repeated .google.cloud.notebooks.v2.ServiceAccount service_accounts = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\Notebooks\V2\ServiceAccount>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setServiceAccounts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Notebooks\V2\ServiceAccount::class); + $this->service_accounts = $arr; + + return $this; + } + + /** + * Optional. Use a Compute Engine VM image to start the notebook instance. + * + * Generated from protobuf field .google.cloud.notebooks.v2.VmImage vm_image = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Notebooks\V2\VmImage|null + */ + public function getVmImage() + { + return $this->readOneof(4); + } + + public function hasVmImage() + { + return $this->hasOneof(4); + } + + /** + * Optional. Use a Compute Engine VM image to start the notebook instance. + * + * Generated from protobuf field .google.cloud.notebooks.v2.VmImage vm_image = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Notebooks\V2\VmImage $var + * @return $this + */ + public function setVmImage($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V2\VmImage::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Optional. Use a container image to start the notebook instance. + * + * Generated from protobuf field .google.cloud.notebooks.v2.ContainerImage container_image = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Notebooks\V2\ContainerImage|null + */ + public function getContainerImage() + { + return $this->readOneof(5); + } + + public function hasContainerImage() + { + return $this->hasOneof(5); + } + + /** + * Optional. Use a container image to start the notebook instance. + * + * Generated from protobuf field .google.cloud.notebooks.v2.ContainerImage container_image = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Notebooks\V2\ContainerImage $var + * @return $this + */ + public function setContainerImage($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V2\ContainerImage::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Optional. The boot disk for the VM. + * + * Generated from protobuf field .google.cloud.notebooks.v2.BootDisk boot_disk = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Notebooks\V2\BootDisk|null + */ + public function getBootDisk() + { + return $this->boot_disk; + } + + public function hasBootDisk() + { + return isset($this->boot_disk); + } + + public function clearBootDisk() + { + unset($this->boot_disk); + } + + /** + * Optional. The boot disk for the VM. + * + * Generated from protobuf field .google.cloud.notebooks.v2.BootDisk boot_disk = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Notebooks\V2\BootDisk $var + * @return $this + */ + public function setBootDisk($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V2\BootDisk::class); + $this->boot_disk = $var; + + return $this; + } + + /** + * Optional. Data disks attached to the VM instance. + * Currently supports only one data disk. + * + * Generated from protobuf field repeated .google.cloud.notebooks.v2.DataDisk data_disks = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDataDisks() + { + return $this->data_disks; + } + + /** + * Optional. Data disks attached to the VM instance. + * Currently supports only one data disk. + * + * Generated from protobuf field repeated .google.cloud.notebooks.v2.DataDisk data_disks = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\Notebooks\V2\DataDisk>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDataDisks($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Notebooks\V2\DataDisk::class); + $this->data_disks = $arr; + + return $this; + } + + /** + * Optional. Shielded VM configuration. + * [Images using supported Shielded VM + * features](https://cloud.google.com/compute/docs/instances/modifying-shielded-vm). + * + * Generated from protobuf field .google.cloud.notebooks.v2.ShieldedInstanceConfig shielded_instance_config = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Notebooks\V2\ShieldedInstanceConfig|null + */ + public function getShieldedInstanceConfig() + { + return $this->shielded_instance_config; + } + + public function hasShieldedInstanceConfig() + { + return isset($this->shielded_instance_config); + } + + public function clearShieldedInstanceConfig() + { + unset($this->shielded_instance_config); + } + + /** + * Optional. Shielded VM configuration. + * [Images using supported Shielded VM + * features](https://cloud.google.com/compute/docs/instances/modifying-shielded-vm). + * + * Generated from protobuf field .google.cloud.notebooks.v2.ShieldedInstanceConfig shielded_instance_config = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Notebooks\V2\ShieldedInstanceConfig $var + * @return $this + */ + public function setShieldedInstanceConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V2\ShieldedInstanceConfig::class); + $this->shielded_instance_config = $var; + + return $this; + } + + /** + * Optional. The network interfaces for the VM. + * Supports only one interface. + * + * Generated from protobuf field repeated .google.cloud.notebooks.v2.NetworkInterface network_interfaces = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNetworkInterfaces() + { + return $this->network_interfaces; + } + + /** + * Optional. The network interfaces for the VM. + * Supports only one interface. + * + * Generated from protobuf field repeated .google.cloud.notebooks.v2.NetworkInterface network_interfaces = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\Notebooks\V2\NetworkInterface>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNetworkInterfaces($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Notebooks\V2\NetworkInterface::class); + $this->network_interfaces = $arr; + + return $this; + } + + /** + * Optional. If true, no external IP will be assigned to this VM instance. + * + * Generated from protobuf field bool disable_public_ip = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getDisablePublicIp() + { + return $this->disable_public_ip; + } + + /** + * Optional. If true, no external IP will be assigned to this VM instance. + * + * Generated from protobuf field bool disable_public_ip = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setDisablePublicIp($var) + { + GPBUtil::checkBool($var); + $this->disable_public_ip = $var; + + return $this; + } + + /** + * Optional. The Compute Engine tags to add to runtime (see [Tagging + * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)). + * + * Generated from protobuf field repeated string tags = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTags() + { + return $this->tags; + } + + /** + * Optional. The Compute Engine tags to add to runtime (see [Tagging + * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)). + * + * Generated from protobuf field repeated string tags = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTags($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->tags = $arr; + + return $this; + } + + /** + * Optional. Custom metadata to apply to this instance. + * + * Generated from protobuf field map metadata = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getMetadata() + { + return $this->metadata; + } + + /** + * Optional. Custom metadata to apply to this instance. + * + * Generated from protobuf field map metadata = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setMetadata($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->metadata = $arr; + + return $this; + } + + /** + * Optional. Flag to enable ip forwarding or not, default false/off. + * https://cloud.google.com/vpc/docs/using-routes#canipforward + * + * Generated from protobuf field bool enable_ip_forwarding = 13 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getEnableIpForwarding() + { + return $this->enable_ip_forwarding; + } + + /** + * Optional. Flag to enable ip forwarding or not, default false/off. + * https://cloud.google.com/vpc/docs/using-routes#canipforward + * + * Generated from protobuf field bool enable_ip_forwarding = 13 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setEnableIpForwarding($var) + { + GPBUtil::checkBool($var); + $this->enable_ip_forwarding = $var; + + return $this; + } + + /** + * Optional. Configuration for GPU drivers. + * + * Generated from protobuf field .google.cloud.notebooks.v2.GPUDriverConfig gpu_driver_config = 14 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Notebooks\V2\GPUDriverConfig|null + */ + public function getGpuDriverConfig() + { + return $this->gpu_driver_config; + } + + public function hasGpuDriverConfig() + { + return isset($this->gpu_driver_config); + } + + public function clearGpuDriverConfig() + { + unset($this->gpu_driver_config); + } + + /** + * Optional. Configuration for GPU drivers. + * + * Generated from protobuf field .google.cloud.notebooks.v2.GPUDriverConfig gpu_driver_config = 14 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Notebooks\V2\GPUDriverConfig $var + * @return $this + */ + public function setGpuDriverConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V2\GPUDriverConfig::class); + $this->gpu_driver_config = $var; + + return $this; + } + + /** + * @return string + */ + public function getImage() + { + return $this->whichOneof("image"); + } + +} + diff --git a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/GetInstanceRequest.php b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/GetInstanceRequest.php new file mode 100644 index 000000000000..c33d67eee7dd --- /dev/null +++ b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/GetInstanceRequest.php @@ -0,0 +1,86 @@ +google.cloud.notebooks.v2.GetInstanceRequest + */ +class GetInstanceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * Please see {@see NotebookServiceClient::instanceName()} for help formatting this field. + * + * @return \Google\Cloud\Notebooks\V2\GetInstanceRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V2\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/HealthState.php b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/HealthState.php new file mode 100644 index 000000000000..c40fc6741f0a --- /dev/null +++ b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/HealthState.php @@ -0,0 +1,81 @@ +google.cloud.notebooks.v2.HealthState + */ +class HealthState +{ + /** + * The instance substate is unknown. + * + * Generated from protobuf enum HEALTH_STATE_UNSPECIFIED = 0; + */ + const HEALTH_STATE_UNSPECIFIED = 0; + /** + * The instance is known to be in an healthy state + * (for example, critical daemons are running) + * Applies to ACTIVE state. + * + * Generated from protobuf enum HEALTHY = 1; + */ + const HEALTHY = 1; + /** + * The instance is known to be in an unhealthy state + * (for example, critical daemons are not running) + * Applies to ACTIVE state. + * + * Generated from protobuf enum UNHEALTHY = 2; + */ + const UNHEALTHY = 2; + /** + * The instance has not installed health monitoring agent. + * Applies to ACTIVE state. + * + * Generated from protobuf enum AGENT_NOT_INSTALLED = 3; + */ + const AGENT_NOT_INSTALLED = 3; + /** + * The instance health monitoring agent is not running. + * Applies to ACTIVE state. + * + * Generated from protobuf enum AGENT_NOT_RUNNING = 4; + */ + const AGENT_NOT_RUNNING = 4; + + private static $valueToName = [ + self::HEALTH_STATE_UNSPECIFIED => 'HEALTH_STATE_UNSPECIFIED', + self::HEALTHY => 'HEALTHY', + self::UNHEALTHY => 'UNHEALTHY', + self::AGENT_NOT_INSTALLED => 'AGENT_NOT_INSTALLED', + self::AGENT_NOT_RUNNING => 'AGENT_NOT_RUNNING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/Instance.php b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/Instance.php new file mode 100644 index 000000000000..fac652448bdc --- /dev/null +++ b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/Instance.php @@ -0,0 +1,604 @@ +google.cloud.notebooks.v2.Instance + */ +class Instance extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The name of this notebook instance. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. The proxy endpoint that is used to access the Jupyter + * notebook. + * + * Generated from protobuf field string proxy_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $proxy_uri = ''; + /** + * Optional. Input only. The owner of this instance after creation. Format: + * `alias@example.com` + * Currently supports one owner only. If not specified, all of the service + * account users of your VM instance's service account can use + * the instance. + * + * Generated from protobuf field repeated string instance_owners = 4 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + */ + private $instance_owners; + /** + * Output only. Email address of entity that sent original CreateInstance + * request. + * + * Generated from protobuf field string creator = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $creator = ''; + /** + * Output only. The state of this instance. + * + * Generated from protobuf field .google.cloud.notebooks.v2.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. The upgrade history of this instance. + * + * Generated from protobuf field repeated .google.cloud.notebooks.v2.UpgradeHistoryEntry upgrade_history = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $upgrade_history; + /** + * Output only. Unique ID of the resource. + * + * Generated from protobuf field string id = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $id = ''; + /** + * Output only. Instance health_state. + * + * Generated from protobuf field .google.cloud.notebooks.v2.HealthState health_state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $health_state = 0; + /** + * Output only. Additional information about instance health. + * Example: + * healthInfo": { + * "docker_proxy_agent_status": "1", + * "docker_status": "1", + * "jupyterlab_api_status": "-1", + * "jupyterlab_status": "-1", + * "updated": "2020-10-18 09:40:03.573409" + * } + * + * Generated from protobuf field map health_info = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $health_info; + /** + * Output only. Instance creation time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. Instance update time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Optional. If true, the notebook instance will not register with the proxy. + * + * Generated from protobuf field bool disable_proxy_access = 13 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $disable_proxy_access = false; + /** + * Optional. Labels to apply to this instance. + * These can be later modified by the UpdateInstance method. + * + * Generated from protobuf field map labels = 14 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + protected $infrastructure; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The name of this notebook instance. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * @type \Google\Cloud\Notebooks\V2\GceSetup $gce_setup + * Optional. Compute Engine setup for the notebook. Uses notebook-defined + * fields. + * @type string $proxy_uri + * Output only. The proxy endpoint that is used to access the Jupyter + * notebook. + * @type array|\Google\Protobuf\Internal\RepeatedField $instance_owners + * Optional. Input only. The owner of this instance after creation. Format: + * `alias@example.com` + * Currently supports one owner only. If not specified, all of the service + * account users of your VM instance's service account can use + * the instance. + * @type string $creator + * Output only. Email address of entity that sent original CreateInstance + * request. + * @type int $state + * Output only. The state of this instance. + * @type array<\Google\Cloud\Notebooks\V2\UpgradeHistoryEntry>|\Google\Protobuf\Internal\RepeatedField $upgrade_history + * Output only. The upgrade history of this instance. + * @type string $id + * Output only. Unique ID of the resource. + * @type int $health_state + * Output only. Instance health_state. + * @type array|\Google\Protobuf\Internal\MapField $health_info + * Output only. Additional information about instance health. + * Example: + * healthInfo": { + * "docker_proxy_agent_status": "1", + * "docker_status": "1", + * "jupyterlab_api_status": "-1", + * "jupyterlab_status": "-1", + * "updated": "2020-10-18 09:40:03.573409" + * } + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Instance creation time. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. Instance update time. + * @type bool $disable_proxy_access + * Optional. If true, the notebook instance will not register with the proxy. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. Labels to apply to this instance. + * These can be later modified by the UpdateInstance method. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V2\Instance::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The name of this notebook instance. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The name of this notebook instance. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. Compute Engine setup for the notebook. Uses notebook-defined + * fields. + * + * Generated from protobuf field .google.cloud.notebooks.v2.GceSetup gce_setup = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Notebooks\V2\GceSetup|null + */ + public function getGceSetup() + { + return $this->readOneof(2); + } + + public function hasGceSetup() + { + return $this->hasOneof(2); + } + + /** + * Optional. Compute Engine setup for the notebook. Uses notebook-defined + * fields. + * + * Generated from protobuf field .google.cloud.notebooks.v2.GceSetup gce_setup = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Notebooks\V2\GceSetup $var + * @return $this + */ + public function setGceSetup($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V2\GceSetup::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Output only. The proxy endpoint that is used to access the Jupyter + * notebook. + * + * Generated from protobuf field string proxy_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getProxyUri() + { + return $this->proxy_uri; + } + + /** + * Output only. The proxy endpoint that is used to access the Jupyter + * notebook. + * + * Generated from protobuf field string proxy_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setProxyUri($var) + { + GPBUtil::checkString($var, True); + $this->proxy_uri = $var; + + return $this; + } + + /** + * Optional. Input only. The owner of this instance after creation. Format: + * `alias@example.com` + * Currently supports one owner only. If not specified, all of the service + * account users of your VM instance's service account can use + * the instance. + * + * Generated from protobuf field repeated string instance_owners = 4 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getInstanceOwners() + { + return $this->instance_owners; + } + + /** + * Optional. Input only. The owner of this instance after creation. Format: + * `alias@example.com` + * Currently supports one owner only. If not specified, all of the service + * account users of your VM instance's service account can use + * the instance. + * + * Generated from protobuf field repeated string instance_owners = 4 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setInstanceOwners($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->instance_owners = $arr; + + return $this; + } + + /** + * Output only. Email address of entity that sent original CreateInstance + * request. + * + * Generated from protobuf field string creator = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getCreator() + { + return $this->creator; + } + + /** + * Output only. Email address of entity that sent original CreateInstance + * request. + * + * Generated from protobuf field string creator = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setCreator($var) + { + GPBUtil::checkString($var, True); + $this->creator = $var; + + return $this; + } + + /** + * Output only. The state of this instance. + * + * Generated from protobuf field .google.cloud.notebooks.v2.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The state of this instance. + * + * Generated from protobuf field .google.cloud.notebooks.v2.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Notebooks\V2\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. The upgrade history of this instance. + * + * Generated from protobuf field repeated .google.cloud.notebooks.v2.UpgradeHistoryEntry upgrade_history = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUpgradeHistory() + { + return $this->upgrade_history; + } + + /** + * Output only. The upgrade history of this instance. + * + * Generated from protobuf field repeated .google.cloud.notebooks.v2.UpgradeHistoryEntry upgrade_history = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\Notebooks\V2\UpgradeHistoryEntry>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUpgradeHistory($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Notebooks\V2\UpgradeHistoryEntry::class); + $this->upgrade_history = $arr; + + return $this; + } + + /** + * Output only. Unique ID of the resource. + * + * Generated from protobuf field string id = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * Output only. Unique ID of the resource. + * + * Generated from protobuf field string id = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkString($var, True); + $this->id = $var; + + return $this; + } + + /** + * Output only. Instance health_state. + * + * Generated from protobuf field .google.cloud.notebooks.v2.HealthState health_state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getHealthState() + { + return $this->health_state; + } + + /** + * Output only. Instance health_state. + * + * Generated from protobuf field .google.cloud.notebooks.v2.HealthState health_state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setHealthState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Notebooks\V2\HealthState::class); + $this->health_state = $var; + + return $this; + } + + /** + * Output only. Additional information about instance health. + * Example: + * healthInfo": { + * "docker_proxy_agent_status": "1", + * "docker_status": "1", + * "jupyterlab_api_status": "-1", + * "jupyterlab_status": "-1", + * "updated": "2020-10-18 09:40:03.573409" + * } + * + * Generated from protobuf field map health_info = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getHealthInfo() + { + return $this->health_info; + } + + /** + * Output only. Additional information about instance health. + * Example: + * healthInfo": { + * "docker_proxy_agent_status": "1", + * "docker_status": "1", + * "jupyterlab_api_status": "-1", + * "jupyterlab_status": "-1", + * "updated": "2020-10-18 09:40:03.573409" + * } + * + * Generated from protobuf field map health_info = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setHealthInfo($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->health_info = $arr; + + return $this; + } + + /** + * Output only. Instance creation time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. Instance creation time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. Instance update time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. Instance update time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Optional. If true, the notebook instance will not register with the proxy. + * + * Generated from protobuf field bool disable_proxy_access = 13 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getDisableProxyAccess() + { + return $this->disable_proxy_access; + } + + /** + * Optional. If true, the notebook instance will not register with the proxy. + * + * Generated from protobuf field bool disable_proxy_access = 13 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setDisableProxyAccess($var) + { + GPBUtil::checkBool($var); + $this->disable_proxy_access = $var; + + return $this; + } + + /** + * Optional. Labels to apply to this instance. + * These can be later modified by the UpdateInstance method. + * + * Generated from protobuf field map labels = 14 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. Labels to apply to this instance. + * These can be later modified by the UpdateInstance method. + * + * Generated from protobuf field map labels = 14 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * @return string + */ + public function getInfrastructure() + { + return $this->whichOneof("infrastructure"); + } + +} + diff --git a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/ListInstancesRequest.php b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/ListInstancesRequest.php new file mode 100644 index 000000000000..debdf1761f08 --- /dev/null +++ b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/ListInstancesRequest.php @@ -0,0 +1,230 @@ +google.cloud.notebooks.v2.ListInstancesRequest + */ +class ListInstancesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Format: + * `parent=projects/{project_id}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Maximum return size of the list call. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A previous returned page token that can be used to continue + * listing from the last result. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. Sort results. Supported values are "name", "name desc" or "" + * (unsorted). + * + * Generated from protobuf field string order_by = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + /** + * Optional. List filter. + * + * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + + /** + * @param string $parent Required. Format: + * `parent=projects/{project_id}/locations/{location}` + * Please see {@see NotebookServiceClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\Notebooks\V2\ListInstancesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Format: + * `parent=projects/{project_id}/locations/{location}` + * @type int $page_size + * Optional. Maximum return size of the list call. + * @type string $page_token + * Optional. A previous returned page token that can be used to continue + * listing from the last result. + * @type string $order_by + * Optional. Sort results. Supported values are "name", "name desc" or "" + * (unsorted). + * @type string $filter + * Optional. List filter. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V2\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. Format: + * `parent=projects/{project_id}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Format: + * `parent=projects/{project_id}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. Maximum return size of the list call. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. Maximum return size of the list call. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. A previous returned page token that can be used to continue + * listing from the last result. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A previous returned page token that can be used to continue + * listing from the last result. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. Sort results. Supported values are "name", "name desc" or "" + * (unsorted). + * + * Generated from protobuf field string order_by = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. Sort results. Supported values are "name", "name desc" or "" + * (unsorted). + * + * Generated from protobuf field string order_by = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + + /** + * Optional. List filter. + * + * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. List filter. + * + * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/ListInstancesResponse.php b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/ListInstancesResponse.php new file mode 100644 index 000000000000..0a01d401ae79 --- /dev/null +++ b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/ListInstancesResponse.php @@ -0,0 +1,147 @@ +google.cloud.notebooks.v2.ListInstancesResponse + */ +class ListInstancesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of returned instances. + * + * Generated from protobuf field repeated .google.cloud.notebooks.v2.Instance instances = 1; + */ + private $instances; + /** + * Page token that can be used to continue listing from the last result in the + * next list call. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached. For example, + * ['us-west1-a', 'us-central1-b']. + * A ListInstancesResponse will only contain either instances or unreachables, + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Notebooks\V2\Instance>|\Google\Protobuf\Internal\RepeatedField $instances + * A list of returned instances. + * @type string $next_page_token + * Page token that can be used to continue listing from the last result in the + * next list call. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable + * Locations that could not be reached. For example, + * ['us-west1-a', 'us-central1-b']. + * A ListInstancesResponse will only contain either instances or unreachables, + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V2\Service::initOnce(); + parent::__construct($data); + } + + /** + * A list of returned instances. + * + * Generated from protobuf field repeated .google.cloud.notebooks.v2.Instance instances = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getInstances() + { + return $this->instances; + } + + /** + * A list of returned instances. + * + * Generated from protobuf field repeated .google.cloud.notebooks.v2.Instance instances = 1; + * @param array<\Google\Cloud\Notebooks\V2\Instance>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setInstances($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Notebooks\V2\Instance::class); + $this->instances = $arr; + + return $this; + } + + /** + * Page token that can be used to continue listing from the last result in the + * next list call. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Page token that can be used to continue listing from the last result in the + * next list call. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Locations that could not be reached. For example, + * ['us-west1-a', 'us-central1-b']. + * A ListInstancesResponse will only contain either instances or unreachables, + * + * Generated from protobuf field repeated string unreachable = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. For example, + * ['us-west1-a', 'us-central1-b']. + * A ListInstancesResponse will only contain either instances or unreachables, + * + * Generated from protobuf field repeated string unreachable = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/NetworkInterface.php b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/NetworkInterface.php new file mode 100644 index 000000000000..66f44bc6a3bf --- /dev/null +++ b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/NetworkInterface.php @@ -0,0 +1,155 @@ +google.cloud.notebooks.v2.NetworkInterface + */ +class NetworkInterface extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The name of the VPC that this VM instance is in. + * Format: + * `projects/{project_id}/global/networks/{network_id}` + * + * Generated from protobuf field string network = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $network = ''; + /** + * Optional. The name of the subnet that this VM instance is in. + * Format: + * `projects/{project_id}/regions/{region}/subnetworks/{subnetwork_id}` + * + * Generated from protobuf field string subnet = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $subnet = ''; + /** + * Optional. The type of vNIC to be used on this interface. This may be gVNIC + * or VirtioNet. + * + * Generated from protobuf field .google.cloud.notebooks.v2.NetworkInterface.NicType nic_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $nic_type = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $network + * Optional. The name of the VPC that this VM instance is in. + * Format: + * `projects/{project_id}/global/networks/{network_id}` + * @type string $subnet + * Optional. The name of the subnet that this VM instance is in. + * Format: + * `projects/{project_id}/regions/{region}/subnetworks/{subnetwork_id}` + * @type int $nic_type + * Optional. The type of vNIC to be used on this interface. This may be gVNIC + * or VirtioNet. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V2\GceSetup::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The name of the VPC that this VM instance is in. + * Format: + * `projects/{project_id}/global/networks/{network_id}` + * + * Generated from protobuf field string network = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getNetwork() + { + return $this->network; + } + + /** + * Optional. The name of the VPC that this VM instance is in. + * Format: + * `projects/{project_id}/global/networks/{network_id}` + * + * Generated from protobuf field string network = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setNetwork($var) + { + GPBUtil::checkString($var, True); + $this->network = $var; + + return $this; + } + + /** + * Optional. The name of the subnet that this VM instance is in. + * Format: + * `projects/{project_id}/regions/{region}/subnetworks/{subnetwork_id}` + * + * Generated from protobuf field string subnet = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getSubnet() + { + return $this->subnet; + } + + /** + * Optional. The name of the subnet that this VM instance is in. + * Format: + * `projects/{project_id}/regions/{region}/subnetworks/{subnetwork_id}` + * + * Generated from protobuf field string subnet = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setSubnet($var) + { + GPBUtil::checkString($var, True); + $this->subnet = $var; + + return $this; + } + + /** + * Optional. The type of vNIC to be used on this interface. This may be gVNIC + * or VirtioNet. + * + * Generated from protobuf field .google.cloud.notebooks.v2.NetworkInterface.NicType nic_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getNicType() + { + return $this->nic_type; + } + + /** + * Optional. The type of vNIC to be used on this interface. This may be gVNIC + * or VirtioNet. + * + * Generated from protobuf field .google.cloud.notebooks.v2.NetworkInterface.NicType nic_type = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setNicType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Notebooks\V2\NetworkInterface\NicType::class); + $this->nic_type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/NetworkInterface/NicType.php b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/NetworkInterface/NicType.php new file mode 100644 index 000000000000..d8ddfee35971 --- /dev/null +++ b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/NetworkInterface/NicType.php @@ -0,0 +1,65 @@ +google.cloud.notebooks.v2.NetworkInterface.NicType + */ +class NicType +{ + /** + * No type specified. + * + * Generated from protobuf enum NIC_TYPE_UNSPECIFIED = 0; + */ + const NIC_TYPE_UNSPECIFIED = 0; + /** + * VIRTIO + * + * Generated from protobuf enum VIRTIO_NET = 1; + */ + const VIRTIO_NET = 1; + /** + * GVNIC + * + * Generated from protobuf enum GVNIC = 2; + */ + const GVNIC = 2; + + private static $valueToName = [ + self::NIC_TYPE_UNSPECIFIED => 'NIC_TYPE_UNSPECIFIED', + self::VIRTIO_NET => 'VIRTIO_NET', + self::GVNIC => 'GVNIC', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(NicType::class, \Google\Cloud\Notebooks\V2\NetworkInterface_NicType::class); + diff --git a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/OperationMetadata.php b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/OperationMetadata.php new file mode 100644 index 000000000000..501b362e7d4f --- /dev/null +++ b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/OperationMetadata.php @@ -0,0 +1,341 @@ +google.cloud.notebooks.v2.OperationMetadata + */ +class OperationMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; + */ + protected $create_time = null; + /** + * The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + */ + protected $end_time = null; + /** + * Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3; + */ + protected $target = ''; + /** + * Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4; + */ + protected $verb = ''; + /** + * Human-readable status of the operation, if any. + * + * Generated from protobuf field string status_message = 5; + */ + protected $status_message = ''; + /** + * Identifies whether the user has requested cancellation + * of the operation. Operations that have successfully been cancelled + * have [Operation.error][] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`. + * + * Generated from protobuf field bool requested_cancellation = 6; + */ + protected $requested_cancellation = false; + /** + * API version used to start the operation. + * + * Generated from protobuf field string api_version = 7; + */ + protected $api_version = ''; + /** + * API endpoint name of this operation. + * + * Generated from protobuf field string endpoint = 8; + */ + protected $endpoint = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $create_time + * The time the operation was created. + * @type \Google\Protobuf\Timestamp $end_time + * The time the operation finished running. + * @type string $target + * Server-defined resource path for the target of the operation. + * @type string $verb + * Name of the verb executed by the operation. + * @type string $status_message + * Human-readable status of the operation, if any. + * @type bool $requested_cancellation + * Identifies whether the user has requested cancellation + * of the operation. Operations that have successfully been cancelled + * have [Operation.error][] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`. + * @type string $api_version + * API version used to start the operation. + * @type string $endpoint + * API endpoint name of this operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V2\Service::initOnce(); + parent::__construct($data); + } + + /** + * The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEndTime() + { + return $this->end_time; + } + + public function hasEndTime() + { + return isset($this->end_time); + } + + public function clearEndTime() + { + unset($this->end_time); + } + + /** + * The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3; + * @return string + */ + public function getTarget() + { + return $this->target; + } + + /** + * Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3; + * @param string $var + * @return $this + */ + public function setTarget($var) + { + GPBUtil::checkString($var, True); + $this->target = $var; + + return $this; + } + + /** + * Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4; + * @return string + */ + public function getVerb() + { + return $this->verb; + } + + /** + * Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4; + * @param string $var + * @return $this + */ + public function setVerb($var) + { + GPBUtil::checkString($var, True); + $this->verb = $var; + + return $this; + } + + /** + * Human-readable status of the operation, if any. + * + * Generated from protobuf field string status_message = 5; + * @return string + */ + public function getStatusMessage() + { + return $this->status_message; + } + + /** + * Human-readable status of the operation, if any. + * + * Generated from protobuf field string status_message = 5; + * @param string $var + * @return $this + */ + public function setStatusMessage($var) + { + GPBUtil::checkString($var, True); + $this->status_message = $var; + + return $this; + } + + /** + * Identifies whether the user has requested cancellation + * of the operation. Operations that have successfully been cancelled + * have [Operation.error][] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`. + * + * Generated from protobuf field bool requested_cancellation = 6; + * @return bool + */ + public function getRequestedCancellation() + { + return $this->requested_cancellation; + } + + /** + * Identifies whether the user has requested cancellation + * of the operation. Operations that have successfully been cancelled + * have [Operation.error][] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`. + * + * Generated from protobuf field bool requested_cancellation = 6; + * @param bool $var + * @return $this + */ + public function setRequestedCancellation($var) + { + GPBUtil::checkBool($var); + $this->requested_cancellation = $var; + + return $this; + } + + /** + * API version used to start the operation. + * + * Generated from protobuf field string api_version = 7; + * @return string + */ + public function getApiVersion() + { + return $this->api_version; + } + + /** + * API version used to start the operation. + * + * Generated from protobuf field string api_version = 7; + * @param string $var + * @return $this + */ + public function setApiVersion($var) + { + GPBUtil::checkString($var, True); + $this->api_version = $var; + + return $this; + } + + /** + * API endpoint name of this operation. + * + * Generated from protobuf field string endpoint = 8; + * @return string + */ + public function getEndpoint() + { + return $this->endpoint; + } + + /** + * API endpoint name of this operation. + * + * Generated from protobuf field string endpoint = 8; + * @param string $var + * @return $this + */ + public function setEndpoint($var) + { + GPBUtil::checkString($var, True); + $this->endpoint = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/ResetInstanceRequest.php b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/ResetInstanceRequest.php new file mode 100644 index 000000000000..b76c5142315b --- /dev/null +++ b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/ResetInstanceRequest.php @@ -0,0 +1,71 @@ +google.cloud.notebooks.v2.ResetInstanceRequest + */ +class ResetInstanceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V2\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/RollbackInstanceRequest.php b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/RollbackInstanceRequest.php new file mode 100644 index 000000000000..77824123e24e --- /dev/null +++ b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/RollbackInstanceRequest.php @@ -0,0 +1,143 @@ +google.cloud.notebooks.v2.RollbackInstanceRequest + */ +class RollbackInstanceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. The snapshot for rollback. + * Example: "projects/test-project/global/snapshots/krwlzipynril". + * + * Generated from protobuf field string target_snapshot = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $target_snapshot = ''; + /** + * Required. Output only. Revision Id + * + * Generated from protobuf field string revision_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = REQUIRED]; + */ + protected $revision_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * @type string $target_snapshot + * Required. The snapshot for rollback. + * Example: "projects/test-project/global/snapshots/krwlzipynril". + * @type string $revision_id + * Required. Output only. Revision Id + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V2\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. The snapshot for rollback. + * Example: "projects/test-project/global/snapshots/krwlzipynril". + * + * Generated from protobuf field string target_snapshot = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getTargetSnapshot() + { + return $this->target_snapshot; + } + + /** + * Required. The snapshot for rollback. + * Example: "projects/test-project/global/snapshots/krwlzipynril". + * + * Generated from protobuf field string target_snapshot = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setTargetSnapshot($var) + { + GPBUtil::checkString($var, True); + $this->target_snapshot = $var; + + return $this; + } + + /** + * Required. Output only. Revision Id + * + * Generated from protobuf field string revision_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getRevisionId() + { + return $this->revision_id; + } + + /** + * Required. Output only. Revision Id + * + * Generated from protobuf field string revision_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setRevisionId($var) + { + GPBUtil::checkString($var, True); + $this->revision_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/ServiceAccount.php b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/ServiceAccount.php new file mode 100644 index 000000000000..8016666a9a2f --- /dev/null +++ b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/ServiceAccount.php @@ -0,0 +1,105 @@ +google.cloud.notebooks.v2.ServiceAccount + */ +class ServiceAccount extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Email address of the service account. + * + * Generated from protobuf field string email = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $email = ''; + /** + * Output only. The list of scopes to be made available for this service + * account. Set by the CLH to https://www.googleapis.com/auth/cloud-platform + * + * Generated from protobuf field repeated string scopes = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $scopes; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $email + * Optional. Email address of the service account. + * @type array|\Google\Protobuf\Internal\RepeatedField $scopes + * Output only. The list of scopes to be made available for this service + * account. Set by the CLH to https://www.googleapis.com/auth/cloud-platform + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V2\GceSetup::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Email address of the service account. + * + * Generated from protobuf field string email = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getEmail() + { + return $this->email; + } + + /** + * Optional. Email address of the service account. + * + * Generated from protobuf field string email = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setEmail($var) + { + GPBUtil::checkString($var, True); + $this->email = $var; + + return $this; + } + + /** + * Output only. The list of scopes to be made available for this service + * account. Set by the CLH to https://www.googleapis.com/auth/cloud-platform + * + * Generated from protobuf field repeated string scopes = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getScopes() + { + return $this->scopes; + } + + /** + * Output only. The list of scopes to be made available for this service + * account. Set by the CLH to https://www.googleapis.com/auth/cloud-platform + * + * Generated from protobuf field repeated string scopes = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setScopes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->scopes = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/ShieldedInstanceConfig.php b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/ShieldedInstanceConfig.php new file mode 100644 index 000000000000..911a41c87c93 --- /dev/null +++ b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/ShieldedInstanceConfig.php @@ -0,0 +1,170 @@ +google.cloud.notebooks.v2.ShieldedInstanceConfig + */ +class ShieldedInstanceConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Defines whether the VM instance has Secure Boot enabled. + * Secure Boot helps ensure that the system only runs authentic software by + * verifying the digital signature of all boot components, and halting the + * boot process if signature verification fails. Disabled by default. + * + * Generated from protobuf field bool enable_secure_boot = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $enable_secure_boot = false; + /** + * Optional. Defines whether the VM instance has the vTPM enabled. Enabled by + * default. + * + * Generated from protobuf field bool enable_vtpm = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $enable_vtpm = false; + /** + * Optional. Defines whether the VM instance has integrity monitoring enabled. + * Enables monitoring and attestation of the boot integrity of the VM + * instance. The attestation is performed against the integrity policy + * baseline. This baseline is initially derived from the implicitly trusted + * boot image when the VM instance is created. Enabled by default. + * + * Generated from protobuf field bool enable_integrity_monitoring = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $enable_integrity_monitoring = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $enable_secure_boot + * Optional. Defines whether the VM instance has Secure Boot enabled. + * Secure Boot helps ensure that the system only runs authentic software by + * verifying the digital signature of all boot components, and halting the + * boot process if signature verification fails. Disabled by default. + * @type bool $enable_vtpm + * Optional. Defines whether the VM instance has the vTPM enabled. Enabled by + * default. + * @type bool $enable_integrity_monitoring + * Optional. Defines whether the VM instance has integrity monitoring enabled. + * Enables monitoring and attestation of the boot integrity of the VM + * instance. The attestation is performed against the integrity policy + * baseline. This baseline is initially derived from the implicitly trusted + * boot image when the VM instance is created. Enabled by default. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V2\GceSetup::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Defines whether the VM instance has Secure Boot enabled. + * Secure Boot helps ensure that the system only runs authentic software by + * verifying the digital signature of all boot components, and halting the + * boot process if signature verification fails. Disabled by default. + * + * Generated from protobuf field bool enable_secure_boot = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getEnableSecureBoot() + { + return $this->enable_secure_boot; + } + + /** + * Optional. Defines whether the VM instance has Secure Boot enabled. + * Secure Boot helps ensure that the system only runs authentic software by + * verifying the digital signature of all boot components, and halting the + * boot process if signature verification fails. Disabled by default. + * + * Generated from protobuf field bool enable_secure_boot = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setEnableSecureBoot($var) + { + GPBUtil::checkBool($var); + $this->enable_secure_boot = $var; + + return $this; + } + + /** + * Optional. Defines whether the VM instance has the vTPM enabled. Enabled by + * default. + * + * Generated from protobuf field bool enable_vtpm = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getEnableVtpm() + { + return $this->enable_vtpm; + } + + /** + * Optional. Defines whether the VM instance has the vTPM enabled. Enabled by + * default. + * + * Generated from protobuf field bool enable_vtpm = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setEnableVtpm($var) + { + GPBUtil::checkBool($var); + $this->enable_vtpm = $var; + + return $this; + } + + /** + * Optional. Defines whether the VM instance has integrity monitoring enabled. + * Enables monitoring and attestation of the boot integrity of the VM + * instance. The attestation is performed against the integrity policy + * baseline. This baseline is initially derived from the implicitly trusted + * boot image when the VM instance is created. Enabled by default. + * + * Generated from protobuf field bool enable_integrity_monitoring = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getEnableIntegrityMonitoring() + { + return $this->enable_integrity_monitoring; + } + + /** + * Optional. Defines whether the VM instance has integrity monitoring enabled. + * Enables monitoring and attestation of the boot integrity of the VM + * instance. The attestation is performed against the integrity policy + * baseline. This baseline is initially derived from the implicitly trusted + * boot image when the VM instance is created. Enabled by default. + * + * Generated from protobuf field bool enable_integrity_monitoring = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setEnableIntegrityMonitoring($var) + { + GPBUtil::checkBool($var); + $this->enable_integrity_monitoring = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/StartInstanceRequest.php b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/StartInstanceRequest.php new file mode 100644 index 000000000000..41021273b9d3 --- /dev/null +++ b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/StartInstanceRequest.php @@ -0,0 +1,71 @@ +google.cloud.notebooks.v2.StartInstanceRequest + */ +class StartInstanceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V2\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/State.php b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/State.php new file mode 100644 index 000000000000..2a3e87827fa6 --- /dev/null +++ b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/State.php @@ -0,0 +1,118 @@ +google.cloud.notebooks.v2.State + */ +class State +{ + /** + * State is not specified. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The control logic is starting the instance. + * + * Generated from protobuf enum STARTING = 1; + */ + const STARTING = 1; + /** + * The control logic is installing required frameworks and registering the + * instance with notebook proxy + * + * Generated from protobuf enum PROVISIONING = 2; + */ + const PROVISIONING = 2; + /** + * The instance is running. + * + * Generated from protobuf enum ACTIVE = 3; + */ + const ACTIVE = 3; + /** + * The control logic is stopping the instance. + * + * Generated from protobuf enum STOPPING = 4; + */ + const STOPPING = 4; + /** + * The instance is stopped. + * + * Generated from protobuf enum STOPPED = 5; + */ + const STOPPED = 5; + /** + * The instance is deleted. + * + * Generated from protobuf enum DELETED = 6; + */ + const DELETED = 6; + /** + * The instance is upgrading. + * + * Generated from protobuf enum UPGRADING = 7; + */ + const UPGRADING = 7; + /** + * The instance is being created. + * + * Generated from protobuf enum INITIALIZING = 8; + */ + const INITIALIZING = 8; + /** + * The instance is suspending. + * + * Generated from protobuf enum SUSPENDING = 9; + */ + const SUSPENDING = 9; + /** + * The instance is suspended. + * + * Generated from protobuf enum SUSPENDED = 10; + */ + const SUSPENDED = 10; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::STARTING => 'STARTING', + self::PROVISIONING => 'PROVISIONING', + self::ACTIVE => 'ACTIVE', + self::STOPPING => 'STOPPING', + self::STOPPED => 'STOPPED', + self::DELETED => 'DELETED', + self::UPGRADING => 'UPGRADING', + self::INITIALIZING => 'INITIALIZING', + self::SUSPENDING => 'SUSPENDING', + self::SUSPENDED => 'SUSPENDED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/StopInstanceRequest.php b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/StopInstanceRequest.php new file mode 100644 index 000000000000..b3ae64046da9 --- /dev/null +++ b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/StopInstanceRequest.php @@ -0,0 +1,71 @@ +google.cloud.notebooks.v2.StopInstanceRequest + */ +class StopInstanceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V2\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/UpdateInstanceRequest.php b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/UpdateInstanceRequest.php new file mode 100644 index 000000000000..7ded465f5ce2 --- /dev/null +++ b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/UpdateInstanceRequest.php @@ -0,0 +1,170 @@ +google.cloud.notebooks.v2.UpdateInstanceRequest + */ +class UpdateInstanceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A representation of an instance. + * + * Generated from protobuf field .google.cloud.notebooks.v2.Instance instance = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $instance = null; + /** + * Required. Mask used to update an instance + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + /** + * Optional. Idempotent request UUID. + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param \Google\Cloud\Notebooks\V2\Instance $instance Required. A representation of an instance. + * @param \Google\Protobuf\FieldMask $updateMask Required. Mask used to update an instance + * + * @return \Google\Cloud\Notebooks\V2\UpdateInstanceRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Notebooks\V2\Instance $instance, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setInstance($instance) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Notebooks\V2\Instance $instance + * Required. A representation of an instance. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. Mask used to update an instance + * @type string $request_id + * Optional. Idempotent request UUID. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V2\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. A representation of an instance. + * + * Generated from protobuf field .google.cloud.notebooks.v2.Instance instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Notebooks\V2\Instance|null + */ + public function getInstance() + { + return $this->instance; + } + + public function hasInstance() + { + return isset($this->instance); + } + + public function clearInstance() + { + unset($this->instance); + } + + /** + * Required. A representation of an instance. + * + * Generated from protobuf field .google.cloud.notebooks.v2.Instance instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Notebooks\V2\Instance $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V2\Instance::class); + $this->instance = $var; + + return $this; + } + + /** + * Required. Mask used to update an instance + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. Mask used to update an instance + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Optional. Idempotent request UUID. + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. Idempotent request UUID. + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/UpgradeHistoryEntry.php b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/UpgradeHistoryEntry.php new file mode 100644 index 000000000000..01fdd5a03451 --- /dev/null +++ b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/UpgradeHistoryEntry.php @@ -0,0 +1,353 @@ +google.cloud.notebooks.v2.UpgradeHistoryEntry + */ +class UpgradeHistoryEntry extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The snapshot of the boot disk of this notebook instance before + * upgrade. + * + * Generated from protobuf field string snapshot = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $snapshot = ''; + /** + * Optional. The VM image before this instance upgrade. + * + * Generated from protobuf field string vm_image = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $vm_image = ''; + /** + * Optional. The container image before this instance upgrade. + * + * Generated from protobuf field string container_image = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $container_image = ''; + /** + * Optional. The framework of this notebook instance. + * + * Generated from protobuf field string framework = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $framework = ''; + /** + * Optional. The version of the notebook instance before this upgrade. + * + * Generated from protobuf field string version = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $version = ''; + /** + * Output only. The state of this instance upgrade history entry. + * + * Generated from protobuf field .google.cloud.notebooks.v2.UpgradeHistoryEntry.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Immutable. The time that this instance upgrade history entry is created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $create_time = null; + /** + * Optional. Action. Rolloback or Upgrade. + * + * Generated from protobuf field .google.cloud.notebooks.v2.UpgradeHistoryEntry.Action action = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $action = 0; + /** + * Optional. Target VM Version, like m63. + * + * Generated from protobuf field string target_version = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $target_version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $snapshot + * Optional. The snapshot of the boot disk of this notebook instance before + * upgrade. + * @type string $vm_image + * Optional. The VM image before this instance upgrade. + * @type string $container_image + * Optional. The container image before this instance upgrade. + * @type string $framework + * Optional. The framework of this notebook instance. + * @type string $version + * Optional. The version of the notebook instance before this upgrade. + * @type int $state + * Output only. The state of this instance upgrade history entry. + * @type \Google\Protobuf\Timestamp $create_time + * Immutable. The time that this instance upgrade history entry is created. + * @type int $action + * Optional. Action. Rolloback or Upgrade. + * @type string $target_version + * Optional. Target VM Version, like m63. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V2\Instance::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The snapshot of the boot disk of this notebook instance before + * upgrade. + * + * Generated from protobuf field string snapshot = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getSnapshot() + { + return $this->snapshot; + } + + /** + * Optional. The snapshot of the boot disk of this notebook instance before + * upgrade. + * + * Generated from protobuf field string snapshot = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setSnapshot($var) + { + GPBUtil::checkString($var, True); + $this->snapshot = $var; + + return $this; + } + + /** + * Optional. The VM image before this instance upgrade. + * + * Generated from protobuf field string vm_image = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getVmImage() + { + return $this->vm_image; + } + + /** + * Optional. The VM image before this instance upgrade. + * + * Generated from protobuf field string vm_image = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setVmImage($var) + { + GPBUtil::checkString($var, True); + $this->vm_image = $var; + + return $this; + } + + /** + * Optional. The container image before this instance upgrade. + * + * Generated from protobuf field string container_image = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getContainerImage() + { + return $this->container_image; + } + + /** + * Optional. The container image before this instance upgrade. + * + * Generated from protobuf field string container_image = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setContainerImage($var) + { + GPBUtil::checkString($var, True); + $this->container_image = $var; + + return $this; + } + + /** + * Optional. The framework of this notebook instance. + * + * Generated from protobuf field string framework = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFramework() + { + return $this->framework; + } + + /** + * Optional. The framework of this notebook instance. + * + * Generated from protobuf field string framework = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFramework($var) + { + GPBUtil::checkString($var, True); + $this->framework = $var; + + return $this; + } + + /** + * Optional. The version of the notebook instance before this upgrade. + * + * Generated from protobuf field string version = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getVersion() + { + return $this->version; + } + + /** + * Optional. The version of the notebook instance before this upgrade. + * + * Generated from protobuf field string version = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkString($var, True); + $this->version = $var; + + return $this; + } + + /** + * Output only. The state of this instance upgrade history entry. + * + * Generated from protobuf field .google.cloud.notebooks.v2.UpgradeHistoryEntry.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The state of this instance upgrade history entry. + * + * Generated from protobuf field .google.cloud.notebooks.v2.UpgradeHistoryEntry.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Notebooks\V2\UpgradeHistoryEntry\State::class); + $this->state = $var; + + return $this; + } + + /** + * Immutable. The time that this instance upgrade history entry is created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = IMMUTABLE]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Immutable. The time that this instance upgrade history entry is created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = IMMUTABLE]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Optional. Action. Rolloback or Upgrade. + * + * Generated from protobuf field .google.cloud.notebooks.v2.UpgradeHistoryEntry.Action action = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getAction() + { + return $this->action; + } + + /** + * Optional. Action. Rolloback or Upgrade. + * + * Generated from protobuf field .google.cloud.notebooks.v2.UpgradeHistoryEntry.Action action = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setAction($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Notebooks\V2\UpgradeHistoryEntry\Action::class); + $this->action = $var; + + return $this; + } + + /** + * Optional. Target VM Version, like m63. + * + * Generated from protobuf field string target_version = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getTargetVersion() + { + return $this->target_version; + } + + /** + * Optional. Target VM Version, like m63. + * + * Generated from protobuf field string target_version = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setTargetVersion($var) + { + GPBUtil::checkString($var, True); + $this->target_version = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/UpgradeHistoryEntry/Action.php b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/UpgradeHistoryEntry/Action.php new file mode 100644 index 000000000000..563ca0f0e2ef --- /dev/null +++ b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/UpgradeHistoryEntry/Action.php @@ -0,0 +1,64 @@ +google.cloud.notebooks.v2.UpgradeHistoryEntry.Action + */ +class Action +{ + /** + * Operation is not specified. + * + * Generated from protobuf enum ACTION_UNSPECIFIED = 0; + */ + const ACTION_UNSPECIFIED = 0; + /** + * Upgrade. + * + * Generated from protobuf enum UPGRADE = 1; + */ + const UPGRADE = 1; + /** + * Rollback. + * + * Generated from protobuf enum ROLLBACK = 2; + */ + const ROLLBACK = 2; + + private static $valueToName = [ + self::ACTION_UNSPECIFIED => 'ACTION_UNSPECIFIED', + self::UPGRADE => 'UPGRADE', + self::ROLLBACK => 'ROLLBACK', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Action::class, \Google\Cloud\Notebooks\V2\UpgradeHistoryEntry_Action::class); + diff --git a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/UpgradeHistoryEntry/State.php b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/UpgradeHistoryEntry/State.php new file mode 100644 index 000000000000..b1760831b649 --- /dev/null +++ b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/UpgradeHistoryEntry/State.php @@ -0,0 +1,71 @@ +google.cloud.notebooks.v2.UpgradeHistoryEntry.State + */ +class State +{ + /** + * State is not specified. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The instance upgrade is started. + * + * Generated from protobuf enum STARTED = 1; + */ + const STARTED = 1; + /** + * The instance upgrade is succeeded. + * + * Generated from protobuf enum SUCCEEDED = 2; + */ + const SUCCEEDED = 2; + /** + * The instance upgrade is failed. + * + * Generated from protobuf enum FAILED = 3; + */ + const FAILED = 3; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::STARTED => 'STARTED', + self::SUCCEEDED => 'SUCCEEDED', + self::FAILED => 'FAILED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\Notebooks\V2\UpgradeHistoryEntry_State::class); + diff --git a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/UpgradeInstanceRequest.php b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/UpgradeInstanceRequest.php new file mode 100644 index 000000000000..7335c3fdaa52 --- /dev/null +++ b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/UpgradeInstanceRequest.php @@ -0,0 +1,71 @@ +google.cloud.notebooks.v2.UpgradeInstanceRequest + */ +class UpgradeInstanceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V2\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Format: + * `projects/{project_id}/locations/{location}/instances/{instance_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/VmImage.php b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/VmImage.php new file mode 100644 index 000000000000..e1b2043b1087 --- /dev/null +++ b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/VmImage.php @@ -0,0 +1,150 @@ +google.cloud.notebooks.v2.VmImage + */ +class VmImage extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the Google Cloud project that this VM image belongs + * to. Format: `{project_id}` + * + * Generated from protobuf field string project = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $project = ''; + protected $image; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $project + * Required. The name of the Google Cloud project that this VM image belongs + * to. Format: `{project_id}` + * @type string $name + * Optional. Use VM image name to find the image. + * @type string $family + * Optional. Use this VM image family to find the image; the newest image in + * this family will be used. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Notebooks\V2\GceSetup::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the Google Cloud project that this VM image belongs + * to. Format: `{project_id}` + * + * Generated from protobuf field string project = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Required. The name of the Google Cloud project that this VM image belongs + * to. Format: `{project_id}` + * + * Generated from protobuf field string project = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Optional. Use VM image name to find the image. + * + * Generated from protobuf field string name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getName() + { + return $this->readOneof(2); + } + + public function hasName() + { + return $this->hasOneof(2); + } + + /** + * Optional. Use VM image name to find the image. + * + * Generated from protobuf field string name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Optional. Use this VM image family to find the image; the newest image in + * this family will be used. + * + * Generated from protobuf field string family = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFamily() + { + return $this->readOneof(3); + } + + public function hasFamily() + { + return $this->hasOneof(3); + } + + /** + * Optional. Use this VM image family to find the image; the newest image in + * this family will be used. + * + * Generated from protobuf field string family = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFamily($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * @return string + */ + public function getImage() + { + return $this->whichOneof("image"); + } + +} + diff --git a/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/check_instance_upgradability.php b/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/check_instance_upgradability.php new file mode 100644 index 000000000000..c5103127231e --- /dev/null +++ b/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/check_instance_upgradability.php @@ -0,0 +1,71 @@ +setNotebookInstance($notebookInstance); + + // Call the API and handle any network failures. + try { + /** @var CheckInstanceUpgradabilityResponse $response */ + $response = $notebookServiceClient->checkInstanceUpgradability($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $notebookInstance = '[NOTEBOOK_INSTANCE]'; + + check_instance_upgradability_sample($notebookInstance); +} +// [END notebooks_v2_generated_NotebookService_CheckInstanceUpgradability_sync] diff --git a/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/create_instance.php b/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/create_instance.php new file mode 100644 index 000000000000..29d7d630614e --- /dev/null +++ b/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/create_instance.php @@ -0,0 +1,89 @@ +setParent($formattedParent) + ->setInstanceId($instanceId) + ->setInstance($instance); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $notebookServiceClient->createInstance($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Instance $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = NotebookServiceClient::locationName('[PROJECT]', '[LOCATION]'); + $instanceId = '[INSTANCE_ID]'; + + create_instance_sample($formattedParent, $instanceId); +} +// [END notebooks_v2_generated_NotebookService_CreateInstance_sync] diff --git a/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/delete_instance.php b/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/delete_instance.php new file mode 100644 index 000000000000..36b6deb597c2 --- /dev/null +++ b/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/delete_instance.php @@ -0,0 +1,81 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $notebookServiceClient->deleteInstance($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NotebookServiceClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + + delete_instance_sample($formattedName); +} +// [END notebooks_v2_generated_NotebookService_DeleteInstance_sync] diff --git a/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/diagnose_instance.php b/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/diagnose_instance.php new file mode 100644 index 000000000000..188de47652ee --- /dev/null +++ b/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/diagnose_instance.php @@ -0,0 +1,102 @@ +setGcsBucket($diagnosticConfigGcsBucket); + $request = (new DiagnoseInstanceRequest()) + ->setName($formattedName) + ->setDiagnosticConfig($diagnosticConfig); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $notebookServiceClient->diagnoseInstance($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Instance $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NotebookServiceClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $diagnosticConfigGcsBucket = '[GCS_BUCKET]'; + + diagnose_instance_sample($formattedName, $diagnosticConfigGcsBucket); +} +// [END notebooks_v2_generated_NotebookService_DiagnoseInstance_sync] diff --git a/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/get_iam_policy.php b/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/get_iam_policy.php new file mode 100644 index 000000000000..fe98d25db90e --- /dev/null +++ b/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/get_iam_policy.php @@ -0,0 +1,72 @@ +setResource($resource); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $notebookServiceClient->getIamPolicy($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + + get_iam_policy_sample($resource); +} +// [END notebooks_v2_generated_NotebookService_GetIamPolicy_sync] diff --git a/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/get_instance.php b/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/get_instance.php new file mode 100644 index 000000000000..77d56d6d2529 --- /dev/null +++ b/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/get_instance.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Instance $response */ + $response = $notebookServiceClient->getInstance($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NotebookServiceClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + + get_instance_sample($formattedName); +} +// [END notebooks_v2_generated_NotebookService_GetInstance_sync] diff --git a/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/get_location.php b/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/get_location.php new file mode 100644 index 000000000000..e4fffc83196c --- /dev/null +++ b/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/get_location.php @@ -0,0 +1,57 @@ +getLocation($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END notebooks_v2_generated_NotebookService_GetLocation_sync] diff --git a/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/list_instances.php b/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/list_instances.php new file mode 100644 index 000000000000..4aaeb887ad69 --- /dev/null +++ b/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/list_instances.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $notebookServiceClient->listInstances($request); + + /** @var Instance $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = NotebookServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + list_instances_sample($formattedParent); +} +// [END notebooks_v2_generated_NotebookService_ListInstances_sync] diff --git a/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/list_locations.php b/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/list_locations.php new file mode 100644 index 000000000000..5b17097a0908 --- /dev/null +++ b/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/list_locations.php @@ -0,0 +1,62 @@ +listLocations($request); + + /** @var Location $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END notebooks_v2_generated_NotebookService_ListLocations_sync] diff --git a/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/reset_instance.php b/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/reset_instance.php new file mode 100644 index 000000000000..d19193397abc --- /dev/null +++ b/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/reset_instance.php @@ -0,0 +1,83 @@ +setName($name); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $notebookServiceClient->resetInstance($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Instance $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $name = '[NAME]'; + + reset_instance_sample($name); +} +// [END notebooks_v2_generated_NotebookService_ResetInstance_sync] diff --git a/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/rollback_instance.php b/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/rollback_instance.php new file mode 100644 index 000000000000..8e0e74dbc651 --- /dev/null +++ b/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/rollback_instance.php @@ -0,0 +1,94 @@ +setName($formattedName) + ->setTargetSnapshot($targetSnapshot) + ->setRevisionId($revisionId); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $notebookServiceClient->rollbackInstance($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Instance $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NotebookServiceClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $targetSnapshot = '[TARGET_SNAPSHOT]'; + $revisionId = '[REVISION_ID]'; + + rollback_instance_sample($formattedName, $targetSnapshot, $revisionId); +} +// [END notebooks_v2_generated_NotebookService_RollbackInstance_sync] diff --git a/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/set_iam_policy.php b/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/set_iam_policy.php new file mode 100644 index 000000000000..87352e35233c --- /dev/null +++ b/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/set_iam_policy.php @@ -0,0 +1,77 @@ +setResource($resource) + ->setPolicy($policy); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $notebookServiceClient->setIamPolicy($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + + set_iam_policy_sample($resource); +} +// [END notebooks_v2_generated_NotebookService_SetIamPolicy_sync] diff --git a/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/start_instance.php b/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/start_instance.php new file mode 100644 index 000000000000..904dde7fe569 --- /dev/null +++ b/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/start_instance.php @@ -0,0 +1,83 @@ +setName($name); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $notebookServiceClient->startInstance($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Instance $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $name = '[NAME]'; + + start_instance_sample($name); +} +// [END notebooks_v2_generated_NotebookService_StartInstance_sync] diff --git a/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/stop_instance.php b/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/stop_instance.php new file mode 100644 index 000000000000..d77777e9afb8 --- /dev/null +++ b/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/stop_instance.php @@ -0,0 +1,83 @@ +setName($name); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $notebookServiceClient->stopInstance($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Instance $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $name = '[NAME]'; + + stop_instance_sample($name); +} +// [END notebooks_v2_generated_NotebookService_StopInstance_sync] diff --git a/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/test_iam_permissions.php b/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/test_iam_permissions.php new file mode 100644 index 000000000000..7a87de458106 --- /dev/null +++ b/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/test_iam_permissions.php @@ -0,0 +1,84 @@ +setResource($resource) + ->setPermissions($permissions); + + // Call the API and handle any network failures. + try { + /** @var TestIamPermissionsResponse $response */ + $response = $notebookServiceClient->testIamPermissions($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + $permissionsElement = '[PERMISSIONS]'; + + test_iam_permissions_sample($resource, $permissionsElement); +} +// [END notebooks_v2_generated_NotebookService_TestIamPermissions_sync] diff --git a/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/update_instance.php b/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/update_instance.php new file mode 100644 index 000000000000..36d1de28baab --- /dev/null +++ b/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/update_instance.php @@ -0,0 +1,74 @@ +setInstance($instance) + ->setUpdateMask($updateMask); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $notebookServiceClient->updateInstance($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Instance $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END notebooks_v2_generated_NotebookService_UpdateInstance_sync] diff --git a/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/upgrade_instance.php b/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/upgrade_instance.php new file mode 100644 index 000000000000..ad762b17b778 --- /dev/null +++ b/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/upgrade_instance.php @@ -0,0 +1,83 @@ +setName($name); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $notebookServiceClient->upgradeInstance($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Instance $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $name = '[NAME]'; + + upgrade_instance_sample($name); +} +// [END notebooks_v2_generated_NotebookService_UpgradeInstance_sync] diff --git a/owl-bot-staging/Notebooks/v2/src/V2/Client/NotebookServiceClient.php b/owl-bot-staging/Notebooks/v2/src/V2/Client/NotebookServiceClient.php new file mode 100644 index 000000000000..1726bc4528aa --- /dev/null +++ b/owl-bot-staging/Notebooks/v2/src/V2/Client/NotebookServiceClient.php @@ -0,0 +1,780 @@ + checkInstanceUpgradabilityAsync(CheckInstanceUpgradabilityRequest $request, array $optionalArgs = []) + * @method PromiseInterface createInstanceAsync(CreateInstanceRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteInstanceAsync(DeleteInstanceRequest $request, array $optionalArgs = []) + * @method PromiseInterface diagnoseInstanceAsync(DiagnoseInstanceRequest $request, array $optionalArgs = []) + * @method PromiseInterface getInstanceAsync(GetInstanceRequest $request, array $optionalArgs = []) + * @method PromiseInterface listInstancesAsync(ListInstancesRequest $request, array $optionalArgs = []) + * @method PromiseInterface resetInstanceAsync(ResetInstanceRequest $request, array $optionalArgs = []) + * @method PromiseInterface rollbackInstanceAsync(RollbackInstanceRequest $request, array $optionalArgs = []) + * @method PromiseInterface startInstanceAsync(StartInstanceRequest $request, array $optionalArgs = []) + * @method PromiseInterface stopInstanceAsync(StopInstanceRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateInstanceAsync(UpdateInstanceRequest $request, array $optionalArgs = []) + * @method PromiseInterface upgradeInstanceAsync(UpgradeInstanceRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) + */ +final class NotebookServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.notebooks.v2.NotebookService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'notebooks.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'notebooks.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/notebook_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/notebook_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/notebook_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/notebook_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Create the default operation client for the service. + * + * @param array $options ClientOptions for the client. + * + * @return OperationsClient + */ + private function createOperationsClient(array $options) + { + // Unset client-specific configuration options + unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); + + if (isset($options['operationsClient'])) { + return $options['operationsClient']; + } + + return new OperationsClient($options); + } + + /** + * Formats a string containing the fully-qualified path to represent a instance + * resource. + * + * @param string $project + * @param string $location + * @param string $instance + * + * @return string The formatted instance resource. + */ + public static function instanceName(string $project, string $location, string $instance): string + { + return self::getPathTemplate('instance')->render([ + 'project' => $project, + 'location' => $location, + 'instance' => $instance, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a location + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted location resource. + */ + public static function locationName(string $project, string $location): string + { + return self::getPathTemplate('location')->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - instance: projects/{project}/locations/{location}/instances/{instance} + * - location: projects/{project}/locations/{location} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'notebooks.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Checks whether a notebook instance is upgradable. + * + * The async variant is + * {@see NotebookServiceClient::checkInstanceUpgradabilityAsync()} . + * + * @example samples/V2/NotebookServiceClient/check_instance_upgradability.php + * + * @param CheckInstanceUpgradabilityRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return CheckInstanceUpgradabilityResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function checkInstanceUpgradability(CheckInstanceUpgradabilityRequest $request, array $callOptions = []): CheckInstanceUpgradabilityResponse + { + return $this->startApiCall('CheckInstanceUpgradability', $request, $callOptions)->wait(); + } + + /** + * Creates a new Instance in a given project and location. + * + * The async variant is {@see NotebookServiceClient::createInstanceAsync()} . + * + * @example samples/V2/NotebookServiceClient/create_instance.php + * + * @param CreateInstanceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createInstance(CreateInstanceRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateInstance', $request, $callOptions)->wait(); + } + + /** + * Deletes a single Instance. + * + * The async variant is {@see NotebookServiceClient::deleteInstanceAsync()} . + * + * @example samples/V2/NotebookServiceClient/delete_instance.php + * + * @param DeleteInstanceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteInstance(DeleteInstanceRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteInstance', $request, $callOptions)->wait(); + } + + /** + * Creates a Diagnostic File and runs Diagnostic Tool given an Instance. + * + * The async variant is {@see NotebookServiceClient::diagnoseInstanceAsync()} . + * + * @example samples/V2/NotebookServiceClient/diagnose_instance.php + * + * @param DiagnoseInstanceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function diagnoseInstance(DiagnoseInstanceRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DiagnoseInstance', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single Instance. + * + * The async variant is {@see NotebookServiceClient::getInstanceAsync()} . + * + * @example samples/V2/NotebookServiceClient/get_instance.php + * + * @param GetInstanceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Instance + * + * @throws ApiException Thrown if the API call fails. + */ + public function getInstance(GetInstanceRequest $request, array $callOptions = []): Instance + { + return $this->startApiCall('GetInstance', $request, $callOptions)->wait(); + } + + /** + * Lists instances in a given project and location. + * + * The async variant is {@see NotebookServiceClient::listInstancesAsync()} . + * + * @example samples/V2/NotebookServiceClient/list_instances.php + * + * @param ListInstancesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listInstances(ListInstancesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListInstances', $request, $callOptions); + } + + /** + * Resets a notebook instance. + * + * The async variant is {@see NotebookServiceClient::resetInstanceAsync()} . + * + * @example samples/V2/NotebookServiceClient/reset_instance.php + * + * @param ResetInstanceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function resetInstance(ResetInstanceRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('ResetInstance', $request, $callOptions)->wait(); + } + + /** + * Rollbacks a notebook instance to the previous version. + * + * The async variant is {@see NotebookServiceClient::rollbackInstanceAsync()} . + * + * @example samples/V2/NotebookServiceClient/rollback_instance.php + * + * @param RollbackInstanceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function rollbackInstance(RollbackInstanceRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('RollbackInstance', $request, $callOptions)->wait(); + } + + /** + * Starts a notebook instance. + * + * The async variant is {@see NotebookServiceClient::startInstanceAsync()} . + * + * @example samples/V2/NotebookServiceClient/start_instance.php + * + * @param StartInstanceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function startInstance(StartInstanceRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('StartInstance', $request, $callOptions)->wait(); + } + + /** + * Stops a notebook instance. + * + * The async variant is {@see NotebookServiceClient::stopInstanceAsync()} . + * + * @example samples/V2/NotebookServiceClient/stop_instance.php + * + * @param StopInstanceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function stopInstance(StopInstanceRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('StopInstance', $request, $callOptions)->wait(); + } + + /** + * UpdateInstance updates an Instance. + * + * The async variant is {@see NotebookServiceClient::updateInstanceAsync()} . + * + * @example samples/V2/NotebookServiceClient/update_instance.php + * + * @param UpdateInstanceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateInstance(UpdateInstanceRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateInstance', $request, $callOptions)->wait(); + } + + /** + * Upgrades a notebook instance to the latest version. + * + * The async variant is {@see NotebookServiceClient::upgradeInstanceAsync()} . + * + * @example samples/V2/NotebookServiceClient/upgrade_instance.php + * + * @param UpgradeInstanceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function upgradeInstance(UpgradeInstanceRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpgradeInstance', $request, $callOptions)->wait(); + } + + /** + * Gets information about a location. + * + * The async variant is {@see NotebookServiceClient::getLocationAsync()} . + * + * @example samples/V2/NotebookServiceClient/get_location.php + * + * @param GetLocationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Location + * + * @throws ApiException Thrown if the API call fails. + */ + public function getLocation(GetLocationRequest $request, array $callOptions = []): Location + { + return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * The async variant is {@see NotebookServiceClient::listLocationsAsync()} . + * + * @example samples/V2/NotebookServiceClient/list_locations.php + * + * @param ListLocationsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListLocations', $request, $callOptions); + } + + /** + * Gets the access control policy for a resource. Returns an empty policy + if the resource exists and does not have a policy set. + * + * The async variant is {@see NotebookServiceClient::getIamPolicyAsync()} . + * + * @example samples/V2/NotebookServiceClient/get_iam_policy.php + * + * @param GetIamPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * Sets the access control policy on the specified resource. Replaces + any existing policy. + + Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` + errors. + * + * The async variant is {@see NotebookServiceClient::setIamPolicyAsync()} . + * + * @example samples/V2/NotebookServiceClient/set_iam_policy.php + * + * @param SetIamPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * Returns permissions that a caller has on the specified resource. If the + resource does not exist, this will return an empty set of + permissions, not a `NOT_FOUND` error. + + Note: This operation is designed to be used for building + permission-aware UIs and command-line tools, not for authorization + checking. This operation may "fail open" without warning. + * + * The async variant is {@see NotebookServiceClient::testIamPermissionsAsync()} . + * + * @example samples/V2/NotebookServiceClient/test_iam_permissions.php + * + * @param TestIamPermissionsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return TestIamPermissionsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse + { + return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/Notebooks/v2/src/V2/gapic_metadata.json b/owl-bot-staging/Notebooks/v2/src/V2/gapic_metadata.json new file mode 100644 index 000000000000..317ec3e3b9e9 --- /dev/null +++ b/owl-bot-staging/Notebooks/v2/src/V2/gapic_metadata.json @@ -0,0 +1,103 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.cloud.notebooks.v2", + "libraryPackage": "Google\\Cloud\\Notebooks\\V2", + "services": { + "NotebookService": { + "clients": { + "grpc": { + "libraryClient": "NotebookServiceGapicClient", + "rpcs": { + "CheckInstanceUpgradability": { + "methods": [ + "checkInstanceUpgradability" + ] + }, + "CreateInstance": { + "methods": [ + "createInstance" + ] + }, + "DeleteInstance": { + "methods": [ + "deleteInstance" + ] + }, + "DiagnoseInstance": { + "methods": [ + "diagnoseInstance" + ] + }, + "GetInstance": { + "methods": [ + "getInstance" + ] + }, + "ListInstances": { + "methods": [ + "listInstances" + ] + }, + "ResetInstance": { + "methods": [ + "resetInstance" + ] + }, + "RollbackInstance": { + "methods": [ + "rollbackInstance" + ] + }, + "StartInstance": { + "methods": [ + "startInstance" + ] + }, + "StopInstance": { + "methods": [ + "stopInstance" + ] + }, + "UpdateInstance": { + "methods": [ + "updateInstance" + ] + }, + "UpgradeInstance": { + "methods": [ + "upgradeInstance" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/Notebooks/v2/src/V2/resources/notebook_service_client_config.json b/owl-bot-staging/Notebooks/v2/src/V2/resources/notebook_service_client_config.json new file mode 100644 index 000000000000..48d5fad231d9 --- /dev/null +++ b/owl-bot-staging/Notebooks/v2/src/V2/resources/notebook_service_client_config.json @@ -0,0 +1,129 @@ +{ + "interfaces": { + "google.cloud.notebooks.v2.NotebookService": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE" + ], + "no_retry_1_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "CheckInstanceUpgradability": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "CreateInstance": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteInstance": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DiagnoseInstance": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetInstance": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListInstances": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ResetInstance": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "RollbackInstance": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "StartInstance": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "StopInstance": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateInstance": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpgradeInstance": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetLocation": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListLocations": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "SetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "TestIamPermissions": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/Notebooks/v2/src/V2/resources/notebook_service_descriptor_config.php b/owl-bot-staging/Notebooks/v2/src/V2/resources/notebook_service_descriptor_config.php new file mode 100644 index 000000000000..185207fc5d5a --- /dev/null +++ b/owl-bot-staging/Notebooks/v2/src/V2/resources/notebook_service_descriptor_config.php @@ -0,0 +1,321 @@ + [ + 'google.cloud.notebooks.v2.NotebookService' => [ + 'CreateInstance' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Notebooks\V2\Instance', + 'metadataReturnType' => '\Google\Cloud\Notebooks\V2\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteInstance' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\Notebooks\V2\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DiagnoseInstance' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Notebooks\V2\Instance', + 'metadataReturnType' => '\Google\Cloud\Notebooks\V2\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ResetInstance' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Notebooks\V2\Instance', + 'metadataReturnType' => '\Google\Cloud\Notebooks\V2\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'RollbackInstance' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Notebooks\V2\Instance', + 'metadataReturnType' => '\Google\Cloud\Notebooks\V2\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'StartInstance' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Notebooks\V2\Instance', + 'metadataReturnType' => '\Google\Cloud\Notebooks\V2\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'StopInstance' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Notebooks\V2\Instance', + 'metadataReturnType' => '\Google\Cloud\Notebooks\V2\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UpdateInstance' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Notebooks\V2\Instance', + 'metadataReturnType' => '\Google\Cloud\Notebooks\V2\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'instance.name', + 'fieldAccessors' => [ + 'getInstance', + 'getName', + ], + ], + ], + ], + 'UpgradeInstance' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Notebooks\V2\Instance', + 'metadataReturnType' => '\Google\Cloud\Notebooks\V2\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'CheckInstanceUpgradability' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Notebooks\V2\CheckInstanceUpgradabilityResponse', + 'headerParams' => [ + [ + 'keyName' => 'notebook_instance', + 'fieldAccessors' => [ + 'getNotebookInstance', + ], + ], + ], + ], + 'GetInstance' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Notebooks\V2\Instance', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListInstances' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getInstances', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Notebooks\V2\ListInstancesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'GetLocation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Location\Location', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'GetIamPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'SetIamPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'TestIamPermissions' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'templateMap' => [ + 'instance' => 'projects/{project}/locations/{location}/instances/{instance}', + 'location' => 'projects/{project}/locations/{location}', + ], + ], + ], +]; diff --git a/owl-bot-staging/Notebooks/v2/src/V2/resources/notebook_service_rest_client_config.php b/owl-bot-staging/Notebooks/v2/src/V2/resources/notebook_service_rest_client_config.php new file mode 100644 index 000000000000..36b52b12ea7a --- /dev/null +++ b/owl-bot-staging/Notebooks/v2/src/V2/resources/notebook_service_rest_client_config.php @@ -0,0 +1,284 @@ + [ + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.cloud.notebooks.v2.NotebookService' => [ + 'CheckInstanceUpgradability' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{notebook_instance=projects/*/locations/*/instances/*}:checkUpgradability', + 'placeholders' => [ + 'notebook_instance' => [ + 'getters' => [ + 'getNotebookInstance', + ], + ], + ], + ], + 'CreateInstance' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/instances', + 'body' => 'instance', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'instance_id', + ], + ], + 'DeleteInstance' => [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/instances/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DiagnoseInstance' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/instances/*}:diagnose', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetInstance' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/instances/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListInstances' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/instances', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ResetInstance' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/instances/*}:reset', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'RollbackInstance' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/instances/*}:rollback', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'StartInstance' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/instances/*}:start', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'StopInstance' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/instances/*}:stop', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'UpdateInstance' => [ + 'method' => 'patch', + 'uriTemplate' => '/v2/{instance.name=projects/*/locations/*/instances/*}', + 'body' => 'instance', + 'placeholders' => [ + 'instance.name' => [ + 'getters' => [ + 'getInstance', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpgradeInstance' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/instances/*}:upgrade', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.iam.v1.IAMPolicy' => [ + 'GetIamPolicy' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{resource=projects/*/locations/*/instances/*}:getIamPolicy', + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'SetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{resource=projects/*/locations/*/instances/*}:setIamPolicy', + 'body' => '*', + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'TestIamPermissions' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{resource=projects/*/locations/*/instances/*}:testIamPermissions', + 'body' => '*', + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}:cancel', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*}/operations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Notebooks/v2/tests/Unit/V2/Client/NotebookServiceClientTest.php b/owl-bot-staging/Notebooks/v2/tests/Unit/V2/Client/NotebookServiceClientTest.php new file mode 100644 index 000000000000..ca8f29ac3b5a --- /dev/null +++ b/owl-bot-staging/Notebooks/v2/tests/Unit/V2/Client/NotebookServiceClientTest.php @@ -0,0 +1,1879 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return NotebookServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new NotebookServiceClient($options); + } + + /** @test */ + public function checkInstanceUpgradabilityTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $upgradeable = true; + $upgradeVersion = 'upgradeVersion1040155061'; + $upgradeInfo = 'upgradeInfo-1337232143'; + $upgradeImage = 'upgradeImage1495441784'; + $expectedResponse = new CheckInstanceUpgradabilityResponse(); + $expectedResponse->setUpgradeable($upgradeable); + $expectedResponse->setUpgradeVersion($upgradeVersion); + $expectedResponse->setUpgradeInfo($upgradeInfo); + $expectedResponse->setUpgradeImage($upgradeImage); + $transport->addResponse($expectedResponse); + // Mock request + $notebookInstance = 'notebookInstance-1078982023'; + $request = (new CheckInstanceUpgradabilityRequest()) + ->setNotebookInstance($notebookInstance); + $response = $gapicClient->checkInstanceUpgradability($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.notebooks.v2.NotebookService/CheckInstanceUpgradability', $actualFuncCall); + $actualValue = $actualRequestObject->getNotebookInstance(); + $this->assertProtobufEquals($notebookInstance, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function checkInstanceUpgradabilityExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $notebookInstance = 'notebookInstance-1078982023'; + $request = (new CheckInstanceUpgradabilityRequest()) + ->setNotebookInstance($notebookInstance); + try { + $gapicClient->checkInstanceUpgradability($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createInstanceTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createInstanceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $proxyUri = 'proxyUri-475670501'; + $creator = 'creator1028554796'; + $id = 'id3355'; + $disableProxyAccess = true; + $expectedResponse = new Instance(); + $expectedResponse->setName($name); + $expectedResponse->setProxyUri($proxyUri); + $expectedResponse->setCreator($creator); + $expectedResponse->setId($id); + $expectedResponse->setDisableProxyAccess($disableProxyAccess); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createInstanceTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $instanceId = 'instanceId-2101995259'; + $instance = new Instance(); + $request = (new CreateInstanceRequest()) + ->setParent($formattedParent) + ->setInstanceId($instanceId) + ->setInstance($instance); + $response = $gapicClient->createInstance($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.notebooks.v2.NotebookService/CreateInstance', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getInstanceId(); + $this->assertProtobufEquals($instanceId, $actualValue); + $actualValue = $actualApiRequestObject->getInstance(); + $this->assertProtobufEquals($instance, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createInstanceTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createInstanceExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createInstanceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $instanceId = 'instanceId-2101995259'; + $instance = new Instance(); + $request = (new CreateInstanceRequest()) + ->setParent($formattedParent) + ->setInstanceId($instanceId) + ->setInstance($instance); + $response = $gapicClient->createInstance($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createInstanceTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteInstanceTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteInstanceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteInstanceTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new DeleteInstanceRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteInstance($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.notebooks.v2.NotebookService/DeleteInstance', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteInstanceTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteInstanceExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteInstanceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new DeleteInstanceRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteInstance($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteInstanceTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function diagnoseInstanceTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/diagnoseInstanceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $proxyUri = 'proxyUri-475670501'; + $creator = 'creator1028554796'; + $id = 'id3355'; + $disableProxyAccess = true; + $expectedResponse = new Instance(); + $expectedResponse->setName($name2); + $expectedResponse->setProxyUri($proxyUri); + $expectedResponse->setCreator($creator); + $expectedResponse->setId($id); + $expectedResponse->setDisableProxyAccess($disableProxyAccess); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/diagnoseInstanceTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $diagnosticConfig = new DiagnosticConfig(); + $diagnosticConfigGcsBucket = 'diagnosticConfigGcsBucket-1116063720'; + $diagnosticConfig->setGcsBucket($diagnosticConfigGcsBucket); + $request = (new DiagnoseInstanceRequest()) + ->setName($formattedName) + ->setDiagnosticConfig($diagnosticConfig); + $response = $gapicClient->diagnoseInstance($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.notebooks.v2.NotebookService/DiagnoseInstance', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualApiRequestObject->getDiagnosticConfig(); + $this->assertProtobufEquals($diagnosticConfig, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/diagnoseInstanceTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function diagnoseInstanceExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/diagnoseInstanceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $diagnosticConfig = new DiagnosticConfig(); + $diagnosticConfigGcsBucket = 'diagnosticConfigGcsBucket-1116063720'; + $diagnosticConfig->setGcsBucket($diagnosticConfigGcsBucket); + $request = (new DiagnoseInstanceRequest()) + ->setName($formattedName) + ->setDiagnosticConfig($diagnosticConfig); + $response = $gapicClient->diagnoseInstance($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/diagnoseInstanceTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getInstanceTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $proxyUri = 'proxyUri-475670501'; + $creator = 'creator1028554796'; + $id = 'id3355'; + $disableProxyAccess = true; + $expectedResponse = new Instance(); + $expectedResponse->setName($name2); + $expectedResponse->setProxyUri($proxyUri); + $expectedResponse->setCreator($creator); + $expectedResponse->setId($id); + $expectedResponse->setDisableProxyAccess($disableProxyAccess); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new GetInstanceRequest()) + ->setName($formattedName); + $response = $gapicClient->getInstance($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.notebooks.v2.NotebookService/GetInstance', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getInstanceExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new GetInstanceRequest()) + ->setName($formattedName); + try { + $gapicClient->getInstance($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listInstancesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $instancesElement = new Instance(); + $instances = [ + $instancesElement, + ]; + $expectedResponse = new ListInstancesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setInstances($instances); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListInstancesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listInstances($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getInstances()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.notebooks.v2.NotebookService/ListInstances', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listInstancesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListInstancesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listInstances($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function resetInstanceTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/resetInstanceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $proxyUri = 'proxyUri-475670501'; + $creator = 'creator1028554796'; + $id = 'id3355'; + $disableProxyAccess = true; + $expectedResponse = new Instance(); + $expectedResponse->setName($name2); + $expectedResponse->setProxyUri($proxyUri); + $expectedResponse->setCreator($creator); + $expectedResponse->setId($id); + $expectedResponse->setDisableProxyAccess($disableProxyAccess); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/resetInstanceTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $name = 'name3373707'; + $request = (new ResetInstanceRequest()) + ->setName($name); + $response = $gapicClient->resetInstance($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.notebooks.v2.NotebookService/ResetInstance', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/resetInstanceTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function resetInstanceExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/resetInstanceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $name = 'name3373707'; + $request = (new ResetInstanceRequest()) + ->setName($name); + $response = $gapicClient->resetInstance($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/resetInstanceTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function rollbackInstanceTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/rollbackInstanceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $proxyUri = 'proxyUri-475670501'; + $creator = 'creator1028554796'; + $id = 'id3355'; + $disableProxyAccess = true; + $expectedResponse = new Instance(); + $expectedResponse->setName($name2); + $expectedResponse->setProxyUri($proxyUri); + $expectedResponse->setCreator($creator); + $expectedResponse->setId($id); + $expectedResponse->setDisableProxyAccess($disableProxyAccess); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/rollbackInstanceTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $targetSnapshot = 'targetSnapshot556386482'; + $revisionId = 'revisionId513861631'; + $request = (new RollbackInstanceRequest()) + ->setName($formattedName) + ->setTargetSnapshot($targetSnapshot) + ->setRevisionId($revisionId); + $response = $gapicClient->rollbackInstance($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.notebooks.v2.NotebookService/RollbackInstance', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualApiRequestObject->getTargetSnapshot(); + $this->assertProtobufEquals($targetSnapshot, $actualValue); + $actualValue = $actualApiRequestObject->getRevisionId(); + $this->assertProtobufEquals($revisionId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/rollbackInstanceTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function rollbackInstanceExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/rollbackInstanceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $targetSnapshot = 'targetSnapshot556386482'; + $revisionId = 'revisionId513861631'; + $request = (new RollbackInstanceRequest()) + ->setName($formattedName) + ->setTargetSnapshot($targetSnapshot) + ->setRevisionId($revisionId); + $response = $gapicClient->rollbackInstance($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/rollbackInstanceTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function startInstanceTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/startInstanceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $proxyUri = 'proxyUri-475670501'; + $creator = 'creator1028554796'; + $id = 'id3355'; + $disableProxyAccess = true; + $expectedResponse = new Instance(); + $expectedResponse->setName($name2); + $expectedResponse->setProxyUri($proxyUri); + $expectedResponse->setCreator($creator); + $expectedResponse->setId($id); + $expectedResponse->setDisableProxyAccess($disableProxyAccess); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/startInstanceTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $name = 'name3373707'; + $request = (new StartInstanceRequest()) + ->setName($name); + $response = $gapicClient->startInstance($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.notebooks.v2.NotebookService/StartInstance', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/startInstanceTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function startInstanceExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/startInstanceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $name = 'name3373707'; + $request = (new StartInstanceRequest()) + ->setName($name); + $response = $gapicClient->startInstance($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/startInstanceTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function stopInstanceTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/stopInstanceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $proxyUri = 'proxyUri-475670501'; + $creator = 'creator1028554796'; + $id = 'id3355'; + $disableProxyAccess = true; + $expectedResponse = new Instance(); + $expectedResponse->setName($name2); + $expectedResponse->setProxyUri($proxyUri); + $expectedResponse->setCreator($creator); + $expectedResponse->setId($id); + $expectedResponse->setDisableProxyAccess($disableProxyAccess); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/stopInstanceTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $name = 'name3373707'; + $request = (new StopInstanceRequest()) + ->setName($name); + $response = $gapicClient->stopInstance($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.notebooks.v2.NotebookService/StopInstance', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/stopInstanceTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function stopInstanceExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/stopInstanceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $name = 'name3373707'; + $request = (new StopInstanceRequest()) + ->setName($name); + $response = $gapicClient->stopInstance($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/stopInstanceTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateInstanceTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateInstanceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $proxyUri = 'proxyUri-475670501'; + $creator = 'creator1028554796'; + $id = 'id3355'; + $disableProxyAccess = true; + $expectedResponse = new Instance(); + $expectedResponse->setName($name); + $expectedResponse->setProxyUri($proxyUri); + $expectedResponse->setCreator($creator); + $expectedResponse->setId($id); + $expectedResponse->setDisableProxyAccess($disableProxyAccess); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateInstanceTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $instance = new Instance(); + $updateMask = new FieldMask(); + $request = (new UpdateInstanceRequest()) + ->setInstance($instance) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateInstance($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.notebooks.v2.NotebookService/UpdateInstance', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getInstance(); + $this->assertProtobufEquals($instance, $actualValue); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateInstanceTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateInstanceExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateInstanceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $instance = new Instance(); + $updateMask = new FieldMask(); + $request = (new UpdateInstanceRequest()) + ->setInstance($instance) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateInstance($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateInstanceTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function upgradeInstanceTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/upgradeInstanceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $proxyUri = 'proxyUri-475670501'; + $creator = 'creator1028554796'; + $id = 'id3355'; + $disableProxyAccess = true; + $expectedResponse = new Instance(); + $expectedResponse->setName($name2); + $expectedResponse->setProxyUri($proxyUri); + $expectedResponse->setCreator($creator); + $expectedResponse->setId($id); + $expectedResponse->setDisableProxyAccess($disableProxyAccess); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/upgradeInstanceTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $name = 'name3373707'; + $request = (new UpgradeInstanceRequest()) + ->setName($name); + $response = $gapicClient->upgradeInstance($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.notebooks.v2.NotebookService/UpgradeInstance', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/upgradeInstanceTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function upgradeInstanceExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/upgradeInstanceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $name = 'name3373707'; + $request = (new UpgradeInstanceRequest()) + ->setName($name); + $response = $gapicClient->upgradeInstance($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/upgradeInstanceTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getLocationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $locationId = 'locationId552319461'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Location(); + $expectedResponse->setName($name2); + $expectedResponse->setLocationId($locationId); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + $request = new GetLocationRequest(); + $response = $gapicClient->getLocation($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new GetLocationRequest(); + try { + $gapicClient->getLocation($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $locationsElement = new Location(); + $locations = [ + $locationsElement, + ]; + $expectedResponse = new ListLocationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setLocations($locations); + $transport->addResponse($expectedResponse); + $request = new ListLocationsRequest(); + $response = $gapicClient->listLocations($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new ListLocationsRequest(); + try { + $gapicClient->listLocations($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $request = (new GetIamPolicyRequest()) + ->setResource($resource); + $response = $gapicClient->getIamPolicy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $request = (new GetIamPolicyRequest()) + ->setResource($resource); + try { + $gapicClient->getIamPolicy($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $request = (new SetIamPolicyRequest()) + ->setResource($resource) + ->setPolicy($policy); + $response = $gapicClient->setIamPolicy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPolicy(); + $this->assertProtobufEquals($policy, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $request = (new SetIamPolicyRequest()) + ->setResource($resource) + ->setPolicy($policy); + try { + $gapicClient->setIamPolicy($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new TestIamPermissionsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $request = (new TestIamPermissionsRequest()) + ->setResource($resource) + ->setPermissions($permissions); + $response = $gapicClient->testIamPermissions($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPermissions(); + $this->assertProtobufEquals($permissions, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $request = (new TestIamPermissionsRequest()) + ->setResource($resource) + ->setPermissions($permissions); + try { + $gapicClient->testIamPermissions($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function checkInstanceUpgradabilityAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $upgradeable = true; + $upgradeVersion = 'upgradeVersion1040155061'; + $upgradeInfo = 'upgradeInfo-1337232143'; + $upgradeImage = 'upgradeImage1495441784'; + $expectedResponse = new CheckInstanceUpgradabilityResponse(); + $expectedResponse->setUpgradeable($upgradeable); + $expectedResponse->setUpgradeVersion($upgradeVersion); + $expectedResponse->setUpgradeInfo($upgradeInfo); + $expectedResponse->setUpgradeImage($upgradeImage); + $transport->addResponse($expectedResponse); + // Mock request + $notebookInstance = 'notebookInstance-1078982023'; + $request = (new CheckInstanceUpgradabilityRequest()) + ->setNotebookInstance($notebookInstance); + $response = $gapicClient->checkInstanceUpgradabilityAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.notebooks.v2.NotebookService/CheckInstanceUpgradability', $actualFuncCall); + $actualValue = $actualRequestObject->getNotebookInstance(); + $this->assertProtobufEquals($notebookInstance, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/Optimization/v1/proto/src/GPBMetadata/Google/Cloud/Optimization/V1/AsyncModel.php b/owl-bot-staging/Optimization/v1/proto/src/GPBMetadata/Google/Cloud/Optimization/V1/AsyncModel.php new file mode 100644 index 0000000000000000000000000000000000000000..2746ec6deb03bfaa8fa3002b7b2e6bb93a221158 GIT binary patch literal 1677 zcmbtU+iuf95N(p)GNBhNA*upm36+|n;;2R9AthAKl^~i#O~M1R6m6VMx{~9y>~*CU z^)vVcp7<%A_zrg0v6IrM2$3h-nRDjM%$a$2>R!0;64i-AJj}@u4XzNsAjtI?XBM;3 zAQ+8^hb%U6sZBf`p-KxiTU}JGG`cSY)MtTbkpdbsHnvILvRN?9Gndl|y~dm}Cx3aA z$NrUL^(SmdY+X?UICw&Q7h43?+odzY@ep%t))k9cmMms#j>Y_ZbOK=6*!Phk+0G;x zd<7(aZZNQ^g?ug&T4;~@edn;IhZE1iwpk&*3YE z0y3W+A&>CDb54|QNpKTCnG2d`xYVpsVh>B?0$)<*6$-PeW+aQCabaC5ro!>WU5r%? zdHtSF%QuF@xZ0YqM=sVU)$YTuHPHXf7uwS>UROTS=Y6DK9_>D#vMCRVLF9$aLcO7_ zvfmPrX*h1c%ghhQ)j;?;6W?kGi7zylFEicK6TWhOywQk&o0yn(?yv7m$)G+ zobhF!K{~Eq+lEx&QKc(gO8qpF*(_|{7O)`ZM-sHzibkugRbfS%pD4P`D?$t{5L?h2P=_+ zhn=p`t@eA(PPw_L7!?wew!H*=W|c6WRu(JH2wbTCIrxlJd1|G|SabpTuiQ z16ZvY4f(wM>J(sR80`r>t{7dTUu&J88QniJti$rhPOB;C1wp5KE>k5-;#`UA996n- zZ%SLUcB)lxC%#m|$Y|ZzBtK@i?>2U+INkFr=nhV9zYbPaXW#6{i+>oNvAL@!r$wy= O7f(focj*Rh0Dc2hSQUc+ literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Optimization/v1/proto/src/GPBMetadata/Google/Cloud/Optimization/V1/FleetRouting.php b/owl-bot-staging/Optimization/v1/proto/src/GPBMetadata/Google/Cloud/Optimization/V1/FleetRouting.php new file mode 100644 index 0000000000000000000000000000000000000000..1efcb19516f8b5cf90b2b65ef71c6b3f917e3c0a GIT binary patch literal 18781 zcmeHPNo*r$b~d&1QETedVlBtd2n404+U2nGQHWVsD;&n1@}0!)wqnOt%l1anA`OD;Jk$oKxGSVd7qsy)sr zeQB}kfA9bQ_rLwUzdrhQ^QcL8lb_mkyJfZQYI6TH**>z9%~qq`s5ENH{m#LG-AYy( z$4#eZx6;XEZZo;DSx)A2h4LMMx{Xe&Vy`3*8;!%7y;!L=I@QHSv+W!^-?!RMqrP~u zw0Kan?Y7x!blOh+FfEW1)vaUOZCVvO`RP`6-ELb|t8MLlD)8*BGM>FnAD+G4r4NZJ zHOqCAYm9GOqN5*B691Z={hCurx@}BaNxtH^rc-y?j#YEMk8ORNJg{o64FqS$9(3vz zUTBg5HtQAp{)42%$zxw>Hb91tlX_uWOc_vRuTXE>t-4j)%h_(Ft+OBd4KKoAzP;D>}Bfp z22-I?cUM-rd+MS%4{){S*!A|sVAdSFR?XT+)``<-4G-G)c=s~yX}z-EsM?_7unR9X z>W8gPy$;3#yD%4DY~$W}<~kB~_^Cb6vI9amab{n-5aJC>; zd<-aNmp=(d(Qg~+l0?I3jctm#w$-W}Nu(13>BldERA3P}OLW_*|CU{W1u+ktmfJS5 za47pmT_}CqjZY>=L8u|O&zjvfzDqYfq#n8ov|77mK`i1^f}-z-ue_j^1qz7uta|Xq zXLPk?AGB=u$gINpI5k%R)xO|K?Yu~Q9al*={j9YYt zcjHv;7ACf;CiZo3;8fx<@j5|9v(fB;Pi?c=sGZiFI_Nkp-rb{H-a9}6iJ*0N*o+wV z9;K~Xt?>-=whnFV(yB5R{NXkopcN}_bzo%qpd9yUd{)5SrmG#-HV}Phf^&-FX_j)oQfd z_&COlKZ@{}85$RKi7((;6w-Cuzqb>+X1Z;=>7&7AUPN{z9!Wi+7!H;tM6lrk&E)cH znVn+UENvEd^Ybqmc(j`-7IK+#-rU?MKADdguTV0VFXvZz(0bl1Y^>!or9!rtH%pHS zTkH9aa%p}f^(9fM%iuTYS}C8|UVUV)Z|3sm&PHh~zgk!;;}I>mPn~8HLhUNWrhDy%(5B|yhGzmG}df3Cx~>@?P_(O9q~3Zpd_5Z8_!dnmHrEGqFC21L3XPGZORQThgnTEq78SXH zacQ&OrG>*JbF5}p!^ z?FZq=HB~qqD+ExS8c!$@oP%wo)3Vt?cjGf+?e7kco!$2L$H8x-4b+168qaPA^2lnAp7&bWl(`^N}f)qzY8qm*f^)p(|z zjRE>Txaj^E)7y<_#&x&}%C;%dvkry2izZfSlt;WlQO%%w@{r(bmL_1F;hhQ{9!dOD zgl2na7N?jDSe$y*el9ewQUh3wdgH=ju0dP0PK9GMg>_C#R~Kx@P{KS*XBO&Fzw&_z z^=K^9T;t%tMS!69piJxeTgcARw2G+2R9WayBllU!?gY_3?~XbjFw*0C}Ct2#>C%5XgVaZhT5v zdR!s;RmSTpw4huYAFPbr2g1HX)5lJ|dtlOPh8!4Y2ogVu(4{^bLpH!*Z1RXaCXm}0 zfYbO6#o2I)n5`GXpfrS_!wQ_)>{YrfVv8R8m-_8#n$mJ=Pyoan?`_Bg0*#s}OsP!babr>t|lEj0$K@e~cUN(tSx+ zv)%A?irKQko$QPt3jvdF){r`v*^P+QDWCNPv-U-Hp$9CA&4ebTzJt_(INQJ)*w0rJ zb8;dS1ER%%T@?9>Xg7@K6h+j4?sX39jg}2d$=Qxon$+hvDhyLP{QOoelm?vk>E|7* z-p2pJBK`R|O$T`FO`5k_EeCGDS!+~8hC%4?*zzTfp523V(P|g#hmav}_%rKN_^v{E z$Cd~9osZRMW08!ijg%mg@*tR=Qfh_1Q)c}D-lWWP!%sR*W5S(c9*i2F(6l(NXJ9V2 z!OVWK<@+H zFH!7-)rausWF+ZhD$a>T{Y)ftbT7h0Ce5FjJP=1BXWNYXCrh&pH)A97~wU`lC%j?<0)MZI^Cx-q0F{u zc6og`p6D}Ay2lS^havSN7}P$`IhR-1SlwLT%9IP)La|VO(l0@Ghi;){X>R4W*EYA; z^Eos7#4Kfyo!iYnDy$asNZGwgDIQYT2)r;$g>_^TGaLEMof49VBdLEIK_*Zo!+7z2 zul{wq%gzj({BFWbMkg>fTq|TPugRCBI1~v&MMM+bbdMx3+sdc`c2Vd!;*i8;MKimc zAD+0r^`(7(3!?r>gywplAw0gho&S8Nu$|{bXg^}!qU&LVOwsLLB4$AP!s=%`TPpu4 zPc2AjjLGGTh28x26FF)$)u35X2*6q$RGC^XsxdL^q~Rbf)u&Y@v)R?C!kwf8Z11C44@JNlW?`~?#CvCv+mM=^5 zIyd9tkQvM2aonT0Vhn9W&Ern3?KEq)aDY#dJR^9%RZ>fIF(aTyO~`ckTTFr zw4c!y&=aGqnl@D?tKXR?e`HJt;MDMwR=ecWuH#zh4Od7;ZvI6O*9 z*Y^sbW6J|V1x=@%DgulBp}5JZCKlTsoL65QXTe*hN|q@{`I+@z!|IXsJhR0OE0RxB~)eO@KTj6i%@w#ag2!ezSd&ArBf*WX#E_rucQS@V(c< zRget8Ij`gu=xzYe@7dqP?Jh!liadz5~d8UeV=2;8Nyx9x*ZN?XLS?fQ@ zfrx|Qrs;6-z3|=ih7$$us{puI;V$R2S=j~f%KX{az?=B{5sG@UXI!Bv4&ZqfVNXV7 zx|zeN#sTcRe#d5Q6gKjvCu|)wCYjcL12Li=DvVqNg|$n4XrjtJ14`qXfxH#M^O8g{ zO0;l>ASze&!blTKH04bIe;bJqNd~CZ@2+F$wXbmVT4&4x_>X^WG26dpI)Q_m^h3*_m-An;X+a*Ei8 zKx!6#4qYdoa~L=(wkMLh(?q5Rloh}9(9|EX)>Mv*bV9BXF(y?R;Uz0ebWF? znM0UsrM^DLlNL;i9M^0$=xE9$-Gv-YC`jbqty9$`cfNv5{Z53Y9_#Gp3Qc(tpHwLW z!nmT!fIfN&%^FkaTtGR~sY>$T85$b6zs+oL1OT^(`F4uaRC*SX9!YJ}ltu)Tj=hn@>b?1@8FFi7GZD6{Ksw{>QQ_kyT*Sc#jM{ zy2mVq+r)QhUc&{9Q#e$HCPaj&`(~HI*;FSa#l~cs9o?;*z*6c>_lOJ#W`cOS+R?a6 zH;ybe`^IgN0L#`A?jRLaoUSZZk(f)<&bx0GUW zc*kEy#;7p*lYXjPg&uC`F6zN^*!f=*GnU)N$ zQwYSevhgCEU89AwcmoNTwO|5f$X*O1Bk z(L|NTrKt~|u#}Fl6TXNkNc=-Y=aJYZ2HGeF%HcJd^Mbky3gB5Tlmhs5xKNn2B~*X; z%81V`37m1CcKZJrqq*L@9T?^}gm)Mjxv$$pMYn`mX%PKn$IuUs{OzDl?C7~}wKH0+|n zr8<*D>?#BQ6f*r|0_kOBhtA#*nkCxU^mQBDrI&O0^~^@j%zv?(&*w_|ow=IX%B-S| zVSWVNVoR%;4emv#HE!E(kr2eBt6S(766&J}zwJHXoPfCyZ-!N$-MpiK|kZk8z=DQe1%2WDguo z>R-lb;p`O}STQurBXM}lDH`pd$*VIgn&bU!=OEY5IAfF8cMJ1(|Bq}XET8nZJj?e@ z7|ZiL2iXd?CG(Ne)JW%Uz$MZ%=ayc#p8E{fdhim_O1Na7#n#nhBJc=a=i>e`d7bNs zW`gqul-{q?uwCq`(w|OHBILH}*Sg@>_a>k0$i3iAzGLnY(2d%nb@jREy431@K;PH- z8-z~QXt&{SO00<=kJ06RFN|Y^pi-&oiAp-Fn0^3LRmCxmCVdqIlpa|A8qGLk2Z@r)VP)@-Demq zUJ31Gc{W(RFeA7TeOW4=H5eG6i5u{^yz_7w+WAa_n&|Dlac+@5`SOj2l68g zALCvt-@JDhA1>+&1OEPMr6Io~Bfssi5_$OL!_>Y0aA(IFe>g(M*=vo)fSBhjgx>Bg ztrUD;yGVPVE=m1m7#bL>8>m;K7018=jEc+X&=cC2EB>OQJej@ zEIw}oI8C9xz3kZqKM!v4_jtAad@aO)7xEcNS hYu?vY-jJW<@qNJu=_fRI^!a*^7%9K9^A&wX^uH*A;#&X! literal 0 HcmV?d00001 diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/AggregatedMetrics.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/AggregatedMetrics.php new file mode 100644 index 000000000000..22976ce6c208 --- /dev/null +++ b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/AggregatedMetrics.php @@ -0,0 +1,554 @@ +google.cloud.optimization.v1.AggregatedMetrics + */ +class AggregatedMetrics extends \Google\Protobuf\Internal\Message +{ + /** + * Number of shipments performed. Note that a pickup and delivery pair only + * counts once. + * + * Generated from protobuf field int32 performed_shipment_count = 1; + */ + protected $performed_shipment_count = 0; + /** + * Total travel duration for a route or a solution. + * + * Generated from protobuf field .google.protobuf.Duration travel_duration = 2; + */ + protected $travel_duration = null; + /** + * Total wait duration for a route or a solution. + * + * Generated from protobuf field .google.protobuf.Duration wait_duration = 3; + */ + protected $wait_duration = null; + /** + * Total delay duration for a route or a solution. + * + * Generated from protobuf field .google.protobuf.Duration delay_duration = 4; + */ + protected $delay_duration = null; + /** + * Total break duration for a route or a solution. + * + * Generated from protobuf field .google.protobuf.Duration break_duration = 5; + */ + protected $break_duration = null; + /** + * Total visit duration for a route or a solution. + * + * Generated from protobuf field .google.protobuf.Duration visit_duration = 6; + */ + protected $visit_duration = null; + /** + * The total duration should be equal to the sum of all durations above. + * For routes, it also corresponds to: + * [ShipmentRoute.vehicle_end_time][google.cloud.optimization.v1.ShipmentRoute.vehicle_end_time] + * `-` + * [ShipmentRoute.vehicle_start_time][google.cloud.optimization.v1.ShipmentRoute.vehicle_start_time] + * + * Generated from protobuf field .google.protobuf.Duration total_duration = 7; + */ + protected $total_duration = null; + /** + * Total travel distance for a route or a solution. + * + * Generated from protobuf field double travel_distance_meters = 8; + */ + protected $travel_distance_meters = 0.0; + /** + * Maximum load achieved over the entire route (resp. solution), for each of + * the quantities on this route (resp. solution), computed as the maximum over + * all + * [Transition.vehicle_loads][google.cloud.optimization.v1.ShipmentRoute.Transition.vehicle_loads] + * (resp. + * [ShipmentRoute.metrics.max_loads][google.cloud.optimization.v1.AggregatedMetrics.max_loads]. + * + * Generated from protobuf field map max_loads = 9; + */ + private $max_loads; + /** + * Deprecated: Use + * [ShipmentRoute.route_costs][google.cloud.optimization.v1.ShipmentRoute.route_costs] + * and + * [OptimizeToursResponse.Metrics.costs][google.cloud.optimization.v1.OptimizeToursResponse.Metrics.costs] + * instead. + * + * Generated from protobuf field map costs = 10 [deprecated = true]; + * @deprecated + */ + private $costs; + /** + * Deprecated: Use + * [ShipmentRoute.route_total_cost][google.cloud.optimization.v1.ShipmentRoute.route_total_cost] + * and + * [OptimizeToursResponse.Metrics.total_cost][google.cloud.optimization.v1.OptimizeToursResponse.Metrics.total_cost] + * instead. + * + * Generated from protobuf field double total_cost = 11 [deprecated = true]; + * @deprecated + */ + protected $total_cost = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $performed_shipment_count + * Number of shipments performed. Note that a pickup and delivery pair only + * counts once. + * @type \Google\Protobuf\Duration $travel_duration + * Total travel duration for a route or a solution. + * @type \Google\Protobuf\Duration $wait_duration + * Total wait duration for a route or a solution. + * @type \Google\Protobuf\Duration $delay_duration + * Total delay duration for a route or a solution. + * @type \Google\Protobuf\Duration $break_duration + * Total break duration for a route or a solution. + * @type \Google\Protobuf\Duration $visit_duration + * Total visit duration for a route or a solution. + * @type \Google\Protobuf\Duration $total_duration + * The total duration should be equal to the sum of all durations above. + * For routes, it also corresponds to: + * [ShipmentRoute.vehicle_end_time][google.cloud.optimization.v1.ShipmentRoute.vehicle_end_time] + * `-` + * [ShipmentRoute.vehicle_start_time][google.cloud.optimization.v1.ShipmentRoute.vehicle_start_time] + * @type float $travel_distance_meters + * Total travel distance for a route or a solution. + * @type array|\Google\Protobuf\Internal\MapField $max_loads + * Maximum load achieved over the entire route (resp. solution), for each of + * the quantities on this route (resp. solution), computed as the maximum over + * all + * [Transition.vehicle_loads][google.cloud.optimization.v1.ShipmentRoute.Transition.vehicle_loads] + * (resp. + * [ShipmentRoute.metrics.max_loads][google.cloud.optimization.v1.AggregatedMetrics.max_loads]. + * @type array|\Google\Protobuf\Internal\MapField $costs + * Deprecated: Use + * [ShipmentRoute.route_costs][google.cloud.optimization.v1.ShipmentRoute.route_costs] + * and + * [OptimizeToursResponse.Metrics.costs][google.cloud.optimization.v1.OptimizeToursResponse.Metrics.costs] + * instead. + * @type float $total_cost + * Deprecated: Use + * [ShipmentRoute.route_total_cost][google.cloud.optimization.v1.ShipmentRoute.route_total_cost] + * and + * [OptimizeToursResponse.Metrics.total_cost][google.cloud.optimization.v1.OptimizeToursResponse.Metrics.total_cost] + * instead. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); + parent::__construct($data); + } + + /** + * Number of shipments performed. Note that a pickup and delivery pair only + * counts once. + * + * Generated from protobuf field int32 performed_shipment_count = 1; + * @return int + */ + public function getPerformedShipmentCount() + { + return $this->performed_shipment_count; + } + + /** + * Number of shipments performed. Note that a pickup and delivery pair only + * counts once. + * + * Generated from protobuf field int32 performed_shipment_count = 1; + * @param int $var + * @return $this + */ + public function setPerformedShipmentCount($var) + { + GPBUtil::checkInt32($var); + $this->performed_shipment_count = $var; + + return $this; + } + + /** + * Total travel duration for a route or a solution. + * + * Generated from protobuf field .google.protobuf.Duration travel_duration = 2; + * @return \Google\Protobuf\Duration|null + */ + public function getTravelDuration() + { + return $this->travel_duration; + } + + public function hasTravelDuration() + { + return isset($this->travel_duration); + } + + public function clearTravelDuration() + { + unset($this->travel_duration); + } + + /** + * Total travel duration for a route or a solution. + * + * Generated from protobuf field .google.protobuf.Duration travel_duration = 2; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setTravelDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->travel_duration = $var; + + return $this; + } + + /** + * Total wait duration for a route or a solution. + * + * Generated from protobuf field .google.protobuf.Duration wait_duration = 3; + * @return \Google\Protobuf\Duration|null + */ + public function getWaitDuration() + { + return $this->wait_duration; + } + + public function hasWaitDuration() + { + return isset($this->wait_duration); + } + + public function clearWaitDuration() + { + unset($this->wait_duration); + } + + /** + * Total wait duration for a route or a solution. + * + * Generated from protobuf field .google.protobuf.Duration wait_duration = 3; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setWaitDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->wait_duration = $var; + + return $this; + } + + /** + * Total delay duration for a route or a solution. + * + * Generated from protobuf field .google.protobuf.Duration delay_duration = 4; + * @return \Google\Protobuf\Duration|null + */ + public function getDelayDuration() + { + return $this->delay_duration; + } + + public function hasDelayDuration() + { + return isset($this->delay_duration); + } + + public function clearDelayDuration() + { + unset($this->delay_duration); + } + + /** + * Total delay duration for a route or a solution. + * + * Generated from protobuf field .google.protobuf.Duration delay_duration = 4; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setDelayDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->delay_duration = $var; + + return $this; + } + + /** + * Total break duration for a route or a solution. + * + * Generated from protobuf field .google.protobuf.Duration break_duration = 5; + * @return \Google\Protobuf\Duration|null + */ + public function getBreakDuration() + { + return $this->break_duration; + } + + public function hasBreakDuration() + { + return isset($this->break_duration); + } + + public function clearBreakDuration() + { + unset($this->break_duration); + } + + /** + * Total break duration for a route or a solution. + * + * Generated from protobuf field .google.protobuf.Duration break_duration = 5; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setBreakDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->break_duration = $var; + + return $this; + } + + /** + * Total visit duration for a route or a solution. + * + * Generated from protobuf field .google.protobuf.Duration visit_duration = 6; + * @return \Google\Protobuf\Duration|null + */ + public function getVisitDuration() + { + return $this->visit_duration; + } + + public function hasVisitDuration() + { + return isset($this->visit_duration); + } + + public function clearVisitDuration() + { + unset($this->visit_duration); + } + + /** + * Total visit duration for a route or a solution. + * + * Generated from protobuf field .google.protobuf.Duration visit_duration = 6; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setVisitDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->visit_duration = $var; + + return $this; + } + + /** + * The total duration should be equal to the sum of all durations above. + * For routes, it also corresponds to: + * [ShipmentRoute.vehicle_end_time][google.cloud.optimization.v1.ShipmentRoute.vehicle_end_time] + * `-` + * [ShipmentRoute.vehicle_start_time][google.cloud.optimization.v1.ShipmentRoute.vehicle_start_time] + * + * Generated from protobuf field .google.protobuf.Duration total_duration = 7; + * @return \Google\Protobuf\Duration|null + */ + public function getTotalDuration() + { + return $this->total_duration; + } + + public function hasTotalDuration() + { + return isset($this->total_duration); + } + + public function clearTotalDuration() + { + unset($this->total_duration); + } + + /** + * The total duration should be equal to the sum of all durations above. + * For routes, it also corresponds to: + * [ShipmentRoute.vehicle_end_time][google.cloud.optimization.v1.ShipmentRoute.vehicle_end_time] + * `-` + * [ShipmentRoute.vehicle_start_time][google.cloud.optimization.v1.ShipmentRoute.vehicle_start_time] + * + * Generated from protobuf field .google.protobuf.Duration total_duration = 7; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setTotalDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->total_duration = $var; + + return $this; + } + + /** + * Total travel distance for a route or a solution. + * + * Generated from protobuf field double travel_distance_meters = 8; + * @return float + */ + public function getTravelDistanceMeters() + { + return $this->travel_distance_meters; + } + + /** + * Total travel distance for a route or a solution. + * + * Generated from protobuf field double travel_distance_meters = 8; + * @param float $var + * @return $this + */ + public function setTravelDistanceMeters($var) + { + GPBUtil::checkDouble($var); + $this->travel_distance_meters = $var; + + return $this; + } + + /** + * Maximum load achieved over the entire route (resp. solution), for each of + * the quantities on this route (resp. solution), computed as the maximum over + * all + * [Transition.vehicle_loads][google.cloud.optimization.v1.ShipmentRoute.Transition.vehicle_loads] + * (resp. + * [ShipmentRoute.metrics.max_loads][google.cloud.optimization.v1.AggregatedMetrics.max_loads]. + * + * Generated from protobuf field map max_loads = 9; + * @return \Google\Protobuf\Internal\MapField + */ + public function getMaxLoads() + { + return $this->max_loads; + } + + /** + * Maximum load achieved over the entire route (resp. solution), for each of + * the quantities on this route (resp. solution), computed as the maximum over + * all + * [Transition.vehicle_loads][google.cloud.optimization.v1.ShipmentRoute.Transition.vehicle_loads] + * (resp. + * [ShipmentRoute.metrics.max_loads][google.cloud.optimization.v1.AggregatedMetrics.max_loads]. + * + * Generated from protobuf field map max_loads = 9; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setMaxLoads($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\ShipmentRoute\VehicleLoad::class); + $this->max_loads = $arr; + + return $this; + } + + /** + * Deprecated: Use + * [ShipmentRoute.route_costs][google.cloud.optimization.v1.ShipmentRoute.route_costs] + * and + * [OptimizeToursResponse.Metrics.costs][google.cloud.optimization.v1.OptimizeToursResponse.Metrics.costs] + * instead. + * + * Generated from protobuf field map costs = 10 [deprecated = true]; + * @return \Google\Protobuf\Internal\MapField + * @deprecated + */ + public function getCosts() + { + @trigger_error('costs is deprecated.', E_USER_DEPRECATED); + return $this->costs; + } + + /** + * Deprecated: Use + * [ShipmentRoute.route_costs][google.cloud.optimization.v1.ShipmentRoute.route_costs] + * and + * [OptimizeToursResponse.Metrics.costs][google.cloud.optimization.v1.OptimizeToursResponse.Metrics.costs] + * instead. + * + * Generated from protobuf field map costs = 10 [deprecated = true]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + * @deprecated + */ + public function setCosts($var) + { + @trigger_error('costs is deprecated.', E_USER_DEPRECATED); + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::DOUBLE); + $this->costs = $arr; + + return $this; + } + + /** + * Deprecated: Use + * [ShipmentRoute.route_total_cost][google.cloud.optimization.v1.ShipmentRoute.route_total_cost] + * and + * [OptimizeToursResponse.Metrics.total_cost][google.cloud.optimization.v1.OptimizeToursResponse.Metrics.total_cost] + * instead. + * + * Generated from protobuf field double total_cost = 11 [deprecated = true]; + * @return float + * @deprecated + */ + public function getTotalCost() + { + @trigger_error('total_cost is deprecated.', E_USER_DEPRECATED); + return $this->total_cost; + } + + /** + * Deprecated: Use + * [ShipmentRoute.route_total_cost][google.cloud.optimization.v1.ShipmentRoute.route_total_cost] + * and + * [OptimizeToursResponse.Metrics.total_cost][google.cloud.optimization.v1.OptimizeToursResponse.Metrics.total_cost] + * instead. + * + * Generated from protobuf field double total_cost = 11 [deprecated = true]; + * @param float $var + * @return $this + * @deprecated + */ + public function setTotalCost($var) + { + @trigger_error('total_cost is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkDouble($var); + $this->total_cost = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/AsyncModelMetadata.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/AsyncModelMetadata.php new file mode 100644 index 000000000000..a2578dd38100 --- /dev/null +++ b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/AsyncModelMetadata.php @@ -0,0 +1,193 @@ +google.cloud.optimization.v1.AsyncModelMetadata + */ +class AsyncModelMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The state of the current operation. + * + * Generated from protobuf field .google.cloud.optimization.v1.AsyncModelMetadata.State state = 1; + */ + protected $state = 0; + /** + * A message providing more details about the current state of the operation. + * For example, the error message if the operation is failed. + * + * Generated from protobuf field string state_message = 2; + */ + protected $state_message = ''; + /** + * The creation time of the operation. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; + */ + protected $create_time = null; + /** + * The last update time of the operation. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4; + */ + protected $update_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $state + * The state of the current operation. + * @type string $state_message + * A message providing more details about the current state of the operation. + * For example, the error message if the operation is failed. + * @type \Google\Protobuf\Timestamp $create_time + * The creation time of the operation. + * @type \Google\Protobuf\Timestamp $update_time + * The last update time of the operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Optimization\V1\AsyncModel::initOnce(); + parent::__construct($data); + } + + /** + * The state of the current operation. + * + * Generated from protobuf field .google.cloud.optimization.v1.AsyncModelMetadata.State state = 1; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * The state of the current operation. + * + * Generated from protobuf field .google.cloud.optimization.v1.AsyncModelMetadata.State state = 1; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Optimization\V1\AsyncModelMetadata\State::class); + $this->state = $var; + + return $this; + } + + /** + * A message providing more details about the current state of the operation. + * For example, the error message if the operation is failed. + * + * Generated from protobuf field string state_message = 2; + * @return string + */ + public function getStateMessage() + { + return $this->state_message; + } + + /** + * A message providing more details about the current state of the operation. + * For example, the error message if the operation is failed. + * + * Generated from protobuf field string state_message = 2; + * @param string $var + * @return $this + */ + public function setStateMessage($var) + { + GPBUtil::checkString($var, True); + $this->state_message = $var; + + return $this; + } + + /** + * The creation time of the operation. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * The creation time of the operation. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * The last update time of the operation. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * The last update time of the operation. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/AsyncModelMetadata/State.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/AsyncModelMetadata/State.php new file mode 100644 index 000000000000..72004fd5de80 --- /dev/null +++ b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/AsyncModelMetadata/State.php @@ -0,0 +1,78 @@ +google.cloud.optimization.v1.AsyncModelMetadata.State + */ +class State +{ + /** + * The default value. This value is used if the state is omitted. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Request is being processed. + * + * Generated from protobuf enum RUNNING = 1; + */ + const RUNNING = 1; + /** + * The operation completed successfully. + * + * Generated from protobuf enum SUCCEEDED = 2; + */ + const SUCCEEDED = 2; + /** + * The operation was cancelled. + * + * Generated from protobuf enum CANCELLED = 3; + */ + const CANCELLED = 3; + /** + * The operation has failed. + * + * Generated from protobuf enum FAILED = 4; + */ + const FAILED = 4; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::RUNNING => 'RUNNING', + self::SUCCEEDED => 'SUCCEEDED', + self::CANCELLED => 'CANCELLED', + self::FAILED => 'FAILED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\Optimization\V1\AsyncModelMetadata_State::class); + diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/BatchOptimizeToursRequest.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/BatchOptimizeToursRequest.php new file mode 100644 index 000000000000..a1c21c85233e --- /dev/null +++ b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/BatchOptimizeToursRequest.php @@ -0,0 +1,117 @@ +google.cloud.optimization.v1.BatchOptimizeToursRequest + */ +class BatchOptimizeToursRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Target project and location to make a call. + * Format: `projects/{project-id}/locations/{location-id}`. + * If no location is specified, a region will be chosen automatically. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $parent = ''; + /** + * Required. Input/Output information each purchase model, such as file paths + * and data formats. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.BatchOptimizeToursRequest.AsyncModelConfig model_configs = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $model_configs; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Target project and location to make a call. + * Format: `projects/{project-id}/locations/{location-id}`. + * If no location is specified, a region will be chosen automatically. + * @type array<\Google\Cloud\Optimization\V1\BatchOptimizeToursRequest\AsyncModelConfig>|\Google\Protobuf\Internal\RepeatedField $model_configs + * Required. Input/Output information each purchase model, such as file paths + * and data formats. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); + parent::__construct($data); + } + + /** + * Required. Target project and location to make a call. + * Format: `projects/{project-id}/locations/{location-id}`. + * If no location is specified, a region will be chosen automatically. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Target project and location to make a call. + * Format: `projects/{project-id}/locations/{location-id}`. + * If no location is specified, a region will be chosen automatically. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. Input/Output information each purchase model, such as file paths + * and data formats. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.BatchOptimizeToursRequest.AsyncModelConfig model_configs = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getModelConfigs() + { + return $this->model_configs; + } + + /** + * Required. Input/Output information each purchase model, such as file paths + * and data formats. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.BatchOptimizeToursRequest.AsyncModelConfig model_configs = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Cloud\Optimization\V1\BatchOptimizeToursRequest\AsyncModelConfig>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setModelConfigs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\BatchOptimizeToursRequest\AsyncModelConfig::class); + $this->model_configs = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/BatchOptimizeToursRequest/AsyncModelConfig.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/BatchOptimizeToursRequest/AsyncModelConfig.php new file mode 100644 index 000000000000..b2479e9efec5 --- /dev/null +++ b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/BatchOptimizeToursRequest/AsyncModelConfig.php @@ -0,0 +1,224 @@ +google.cloud.optimization.v1.BatchOptimizeToursRequest.AsyncModelConfig + */ +class AsyncModelConfig extends \Google\Protobuf\Internal\Message +{ + /** + * User defined model name, can be used as alias by users to keep track of + * models. + * + * Generated from protobuf field string display_name = 1; + */ + protected $display_name = ''; + /** + * Required. Information about the input model. + * + * Generated from protobuf field .google.cloud.optimization.v1.InputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $input_config = null; + /** + * Required. The desired output location information. + * + * Generated from protobuf field .google.cloud.optimization.v1.OutputConfig output_config = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $output_config = null; + /** + * If this is set, the model will be solved in the checkpoint mode. In this + * mode, the input model can have a deadline longer than 30 mins without the + * risk of interruption. The model will be solved in multiple short-running + * stages. Each stage generates an intermediate checkpoint + * and stores it in the user's Cloud Storage buckets. The checkpoint + * mode should be preferred over + * allow_large_deadline_despite_interruption_risk since it prevents the risk + * of interruption. + * + * Generated from protobuf field bool enable_checkpoints = 4; + */ + protected $enable_checkpoints = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $display_name + * User defined model name, can be used as alias by users to keep track of + * models. + * @type \Google\Cloud\Optimization\V1\InputConfig $input_config + * Required. Information about the input model. + * @type \Google\Cloud\Optimization\V1\OutputConfig $output_config + * Required. The desired output location information. + * @type bool $enable_checkpoints + * If this is set, the model will be solved in the checkpoint mode. In this + * mode, the input model can have a deadline longer than 30 mins without the + * risk of interruption. The model will be solved in multiple short-running + * stages. Each stage generates an intermediate checkpoint + * and stores it in the user's Cloud Storage buckets. The checkpoint + * mode should be preferred over + * allow_large_deadline_despite_interruption_risk since it prevents the risk + * of interruption. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); + parent::__construct($data); + } + + /** + * User defined model name, can be used as alias by users to keep track of + * models. + * + * Generated from protobuf field string display_name = 1; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * User defined model name, can be used as alias by users to keep track of + * models. + * + * Generated from protobuf field string display_name = 1; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Required. Information about the input model. + * + * Generated from protobuf field .google.cloud.optimization.v1.InputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Optimization\V1\InputConfig|null + */ + public function getInputConfig() + { + return $this->input_config; + } + + public function hasInputConfig() + { + return isset($this->input_config); + } + + public function clearInputConfig() + { + unset($this->input_config); + } + + /** + * Required. Information about the input model. + * + * Generated from protobuf field .google.cloud.optimization.v1.InputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Optimization\V1\InputConfig $var + * @return $this + */ + public function setInputConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Optimization\V1\InputConfig::class); + $this->input_config = $var; + + return $this; + } + + /** + * Required. The desired output location information. + * + * Generated from protobuf field .google.cloud.optimization.v1.OutputConfig output_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Optimization\V1\OutputConfig|null + */ + public function getOutputConfig() + { + return $this->output_config; + } + + public function hasOutputConfig() + { + return isset($this->output_config); + } + + public function clearOutputConfig() + { + unset($this->output_config); + } + + /** + * Required. The desired output location information. + * + * Generated from protobuf field .google.cloud.optimization.v1.OutputConfig output_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Optimization\V1\OutputConfig $var + * @return $this + */ + public function setOutputConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Optimization\V1\OutputConfig::class); + $this->output_config = $var; + + return $this; + } + + /** + * If this is set, the model will be solved in the checkpoint mode. In this + * mode, the input model can have a deadline longer than 30 mins without the + * risk of interruption. The model will be solved in multiple short-running + * stages. Each stage generates an intermediate checkpoint + * and stores it in the user's Cloud Storage buckets. The checkpoint + * mode should be preferred over + * allow_large_deadline_despite_interruption_risk since it prevents the risk + * of interruption. + * + * Generated from protobuf field bool enable_checkpoints = 4; + * @return bool + */ + public function getEnableCheckpoints() + { + return $this->enable_checkpoints; + } + + /** + * If this is set, the model will be solved in the checkpoint mode. In this + * mode, the input model can have a deadline longer than 30 mins without the + * risk of interruption. The model will be solved in multiple short-running + * stages. Each stage generates an intermediate checkpoint + * and stores it in the user's Cloud Storage buckets. The checkpoint + * mode should be preferred over + * allow_large_deadline_despite_interruption_risk since it prevents the risk + * of interruption. + * + * Generated from protobuf field bool enable_checkpoints = 4; + * @param bool $var + * @return $this + */ + public function setEnableCheckpoints($var) + { + GPBUtil::checkBool($var); + $this->enable_checkpoints = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(AsyncModelConfig::class, \Google\Cloud\Optimization\V1\BatchOptimizeToursRequest_AsyncModelConfig::class); + diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/BatchOptimizeToursResponse.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/BatchOptimizeToursResponse.php new file mode 100644 index 000000000000..bafba7b88603 --- /dev/null +++ b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/BatchOptimizeToursResponse.php @@ -0,0 +1,34 @@ +google.cloud.optimization.v1.BatchOptimizeToursResponse + */ +class BatchOptimizeToursResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/BreakRule.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/BreakRule.php new file mode 100644 index 000000000000..b284a82824c1 --- /dev/null +++ b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/BreakRule.php @@ -0,0 +1,113 @@ +google.cloud.optimization.v1.BreakRule + */ +class BreakRule extends \Google\Protobuf\Internal\Message +{ + /** + * Sequence of breaks. See the `BreakRequest` message. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.BreakRule.BreakRequest break_requests = 1; + */ + private $break_requests; + /** + * Several `FrequencyConstraint` may apply. They must all be satisfied by + * the `BreakRequest`s of this `BreakRule`. See `FrequencyConstraint`. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.BreakRule.FrequencyConstraint frequency_constraints = 2; + */ + private $frequency_constraints; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Optimization\V1\BreakRule\BreakRequest>|\Google\Protobuf\Internal\RepeatedField $break_requests + * Sequence of breaks. See the `BreakRequest` message. + * @type array<\Google\Cloud\Optimization\V1\BreakRule\FrequencyConstraint>|\Google\Protobuf\Internal\RepeatedField $frequency_constraints + * Several `FrequencyConstraint` may apply. They must all be satisfied by + * the `BreakRequest`s of this `BreakRule`. See `FrequencyConstraint`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); + parent::__construct($data); + } + + /** + * Sequence of breaks. See the `BreakRequest` message. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.BreakRule.BreakRequest break_requests = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getBreakRequests() + { + return $this->break_requests; + } + + /** + * Sequence of breaks. See the `BreakRequest` message. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.BreakRule.BreakRequest break_requests = 1; + * @param array<\Google\Cloud\Optimization\V1\BreakRule\BreakRequest>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setBreakRequests($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\BreakRule\BreakRequest::class); + $this->break_requests = $arr; + + return $this; + } + + /** + * Several `FrequencyConstraint` may apply. They must all be satisfied by + * the `BreakRequest`s of this `BreakRule`. See `FrequencyConstraint`. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.BreakRule.FrequencyConstraint frequency_constraints = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFrequencyConstraints() + { + return $this->frequency_constraints; + } + + /** + * Several `FrequencyConstraint` may apply. They must all be satisfied by + * the `BreakRequest`s of this `BreakRule`. See `FrequencyConstraint`. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.BreakRule.FrequencyConstraint frequency_constraints = 2; + * @param array<\Google\Cloud\Optimization\V1\BreakRule\FrequencyConstraint>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFrequencyConstraints($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\BreakRule\FrequencyConstraint::class); + $this->frequency_constraints = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/BreakRule/BreakRequest.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/BreakRule/BreakRequest.php new file mode 100644 index 000000000000..1519bc5e0923 --- /dev/null +++ b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/BreakRule/BreakRequest.php @@ -0,0 +1,172 @@ +google.cloud.optimization.v1.BreakRule.BreakRequest + */ +class BreakRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Lower bound (inclusive) on the start of the break. + * + * Generated from protobuf field .google.protobuf.Timestamp earliest_start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $earliest_start_time = null; + /** + * Required. Upper bound (inclusive) on the start of the break. + * + * Generated from protobuf field .google.protobuf.Timestamp latest_start_time = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $latest_start_time = null; + /** + * Required. Minimum duration of the break. Must be positive. + * + * Generated from protobuf field .google.protobuf.Duration min_duration = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $min_duration = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $earliest_start_time + * Required. Lower bound (inclusive) on the start of the break. + * @type \Google\Protobuf\Timestamp $latest_start_time + * Required. Upper bound (inclusive) on the start of the break. + * @type \Google\Protobuf\Duration $min_duration + * Required. Minimum duration of the break. Must be positive. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); + parent::__construct($data); + } + + /** + * Required. Lower bound (inclusive) on the start of the break. + * + * Generated from protobuf field .google.protobuf.Timestamp earliest_start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEarliestStartTime() + { + return $this->earliest_start_time; + } + + public function hasEarliestStartTime() + { + return isset($this->earliest_start_time); + } + + public function clearEarliestStartTime() + { + unset($this->earliest_start_time); + } + + /** + * Required. Lower bound (inclusive) on the start of the break. + * + * Generated from protobuf field .google.protobuf.Timestamp earliest_start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEarliestStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->earliest_start_time = $var; + + return $this; + } + + /** + * Required. Upper bound (inclusive) on the start of the break. + * + * Generated from protobuf field .google.protobuf.Timestamp latest_start_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getLatestStartTime() + { + return $this->latest_start_time; + } + + public function hasLatestStartTime() + { + return isset($this->latest_start_time); + } + + public function clearLatestStartTime() + { + unset($this->latest_start_time); + } + + /** + * Required. Upper bound (inclusive) on the start of the break. + * + * Generated from protobuf field .google.protobuf.Timestamp latest_start_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setLatestStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->latest_start_time = $var; + + return $this; + } + + /** + * Required. Minimum duration of the break. Must be positive. + * + * Generated from protobuf field .google.protobuf.Duration min_duration = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Duration|null + */ + public function getMinDuration() + { + return $this->min_duration; + } + + public function hasMinDuration() + { + return isset($this->min_duration); + } + + public function clearMinDuration() + { + unset($this->min_duration); + } + + /** + * Required. Minimum duration of the break. Must be positive. + * + * Generated from protobuf field .google.protobuf.Duration min_duration = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setMinDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->min_duration = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(BreakRequest::class, \Google\Cloud\Optimization\V1\BreakRule_BreakRequest::class); + diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/BreakRule/FrequencyConstraint.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/BreakRule/FrequencyConstraint.php new file mode 100644 index 000000000000..6c2a3960a6a0 --- /dev/null +++ b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/BreakRule/FrequencyConstraint.php @@ -0,0 +1,166 @@ +google.cloud.optimization.v1.BreakRule.FrequencyConstraint + */ +class FrequencyConstraint extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Minimum break duration for this constraint. Nonnegative. + * See description of `FrequencyConstraint`. + * + * Generated from protobuf field .google.protobuf.Duration min_break_duration = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $min_break_duration = null; + /** + * Required. Maximum allowed span of any interval of time in the route that + * does not include at least partially a break of `duration >= + * min_break_duration`. Must be positive. + * + * Generated from protobuf field .google.protobuf.Duration max_inter_break_duration = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $max_inter_break_duration = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Duration $min_break_duration + * Required. Minimum break duration for this constraint. Nonnegative. + * See description of `FrequencyConstraint`. + * @type \Google\Protobuf\Duration $max_inter_break_duration + * Required. Maximum allowed span of any interval of time in the route that + * does not include at least partially a break of `duration >= + * min_break_duration`. Must be positive. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); + parent::__construct($data); + } + + /** + * Required. Minimum break duration for this constraint. Nonnegative. + * See description of `FrequencyConstraint`. + * + * Generated from protobuf field .google.protobuf.Duration min_break_duration = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Duration|null + */ + public function getMinBreakDuration() + { + return $this->min_break_duration; + } + + public function hasMinBreakDuration() + { + return isset($this->min_break_duration); + } + + public function clearMinBreakDuration() + { + unset($this->min_break_duration); + } + + /** + * Required. Minimum break duration for this constraint. Nonnegative. + * See description of `FrequencyConstraint`. + * + * Generated from protobuf field .google.protobuf.Duration min_break_duration = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setMinBreakDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->min_break_duration = $var; + + return $this; + } + + /** + * Required. Maximum allowed span of any interval of time in the route that + * does not include at least partially a break of `duration >= + * min_break_duration`. Must be positive. + * + * Generated from protobuf field .google.protobuf.Duration max_inter_break_duration = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Duration|null + */ + public function getMaxInterBreakDuration() + { + return $this->max_inter_break_duration; + } + + public function hasMaxInterBreakDuration() + { + return isset($this->max_inter_break_duration); + } + + public function clearMaxInterBreakDuration() + { + unset($this->max_inter_break_duration); + } + + /** + * Required. Maximum allowed span of any interval of time in the route that + * does not include at least partially a break of `duration >= + * min_break_duration`. Must be positive. + * + * Generated from protobuf field .google.protobuf.Duration max_inter_break_duration = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setMaxInterBreakDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->max_inter_break_duration = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(FrequencyConstraint::class, \Google\Cloud\Optimization\V1\BreakRule_FrequencyConstraint::class); + diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/CapacityQuantity.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/CapacityQuantity.php new file mode 100644 index 000000000000..a9c5183dc909 --- /dev/null +++ b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/CapacityQuantity.php @@ -0,0 +1,90 @@ +google.cloud.optimization.v1.CapacityQuantity + */ +class CapacityQuantity extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string type = 1; + */ + protected $type = ''; + /** + * Generated from protobuf field int64 value = 2; + */ + protected $value = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $type + * @type int|string $value + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string type = 1; + * @return string + */ + public function getType() + { + return $this->type; + } + + /** + * Generated from protobuf field string type = 1; + * @param string $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkString($var, True); + $this->type = $var; + + return $this; + } + + /** + * Generated from protobuf field int64 value = 2; + * @return int|string + */ + public function getValue() + { + return $this->value; + } + + /** + * Generated from protobuf field int64 value = 2; + * @param int|string $var + * @return $this + */ + public function setValue($var) + { + GPBUtil::checkInt64($var); + $this->value = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/CapacityQuantityInterval.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/CapacityQuantityInterval.php new file mode 100644 index 000000000000..020743277a3d --- /dev/null +++ b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/CapacityQuantityInterval.php @@ -0,0 +1,137 @@ +google.cloud.optimization.v1.CapacityQuantityInterval + */ +class CapacityQuantityInterval extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string type = 1; + */ + protected $type = ''; + /** + * Generated from protobuf field optional int64 min_value = 2; + */ + protected $min_value = null; + /** + * Generated from protobuf field optional int64 max_value = 3; + */ + protected $max_value = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $type + * @type int|string $min_value + * @type int|string $max_value + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string type = 1; + * @return string + */ + public function getType() + { + return $this->type; + } + + /** + * Generated from protobuf field string type = 1; + * @param string $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkString($var, True); + $this->type = $var; + + return $this; + } + + /** + * Generated from protobuf field optional int64 min_value = 2; + * @return int|string + */ + public function getMinValue() + { + return isset($this->min_value) ? $this->min_value : 0; + } + + public function hasMinValue() + { + return isset($this->min_value); + } + + public function clearMinValue() + { + unset($this->min_value); + } + + /** + * Generated from protobuf field optional int64 min_value = 2; + * @param int|string $var + * @return $this + */ + public function setMinValue($var) + { + GPBUtil::checkInt64($var); + $this->min_value = $var; + + return $this; + } + + /** + * Generated from protobuf field optional int64 max_value = 3; + * @return int|string + */ + public function getMaxValue() + { + return isset($this->max_value) ? $this->max_value : 0; + } + + public function hasMaxValue() + { + return isset($this->max_value); + } + + public function clearMaxValue() + { + unset($this->max_value); + } + + /** + * Generated from protobuf field optional int64 max_value = 3; + * @param int|string $var + * @return $this + */ + public function setMaxValue($var) + { + GPBUtil::checkInt64($var); + $this->max_value = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/DataFormat.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/DataFormat.php new file mode 100644 index 000000000000..9e77bfe52a85 --- /dev/null +++ b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/DataFormat.php @@ -0,0 +1,61 @@ +google.cloud.optimization.v1.DataFormat + */ +class DataFormat +{ + /** + * Default value. + * + * Generated from protobuf enum DATA_FORMAT_UNSPECIFIED = 0; + */ + const DATA_FORMAT_UNSPECIFIED = 0; + /** + * Input data in json format. + * + * Generated from protobuf enum JSON = 1; + */ + const JSON = 1; + /** + * Input data in string format. + * + * Generated from protobuf enum STRING = 2; + */ + const STRING = 2; + + private static $valueToName = [ + self::DATA_FORMAT_UNSPECIFIED => 'DATA_FORMAT_UNSPECIFIED', + self::JSON => 'JSON', + self::STRING => 'STRING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/DistanceLimit.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/DistanceLimit.php new file mode 100644 index 000000000000..70ad9af40a26 --- /dev/null +++ b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/DistanceLimit.php @@ -0,0 +1,284 @@ +google.cloud.optimization.v1.DistanceLimit + */ +class DistanceLimit extends \Google\Protobuf\Internal\Message +{ + /** + * A hard limit constraining the distance to be at most max_meters. The limit + * must be nonnegative. + * + * Generated from protobuf field optional int64 max_meters = 1; + */ + protected $max_meters = null; + /** + * A soft limit not enforcing a maximum distance limit, but when violated + * results in a cost which adds up to other costs defined in the model, + * with the same unit. + * If defined soft_max_meters must be less than max_meters and must be + * nonnegative. + * + * Generated from protobuf field optional int64 soft_max_meters = 2; + */ + protected $soft_max_meters = null; + /** + * Cost per kilometer incurred, increasing up to `soft_max_meters`, with + * formula: + * ``` + * min(distance_meters, soft_max_meters) / 1000.0 * + * cost_per_kilometer_below_soft_max. + * ``` + * This cost is not supported in `route_distance_limit`. + * + * Generated from protobuf field optional double cost_per_kilometer_below_soft_max = 4; + */ + protected $cost_per_kilometer_below_soft_max = null; + /** + * Cost per kilometer incurred if distance is above `soft_max_meters` limit. + * The additional cost is 0 if the distance is under the limit, otherwise the + * formula used to compute the cost is the following: + * ``` + * (distance_meters - soft_max_meters) / 1000.0 * + * cost_per_kilometer_above_soft_max. + * ``` + * The cost must be nonnegative. + * + * Generated from protobuf field optional double cost_per_kilometer_above_soft_max = 3; + */ + protected $cost_per_kilometer_above_soft_max = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $max_meters + * A hard limit constraining the distance to be at most max_meters. The limit + * must be nonnegative. + * @type int|string $soft_max_meters + * A soft limit not enforcing a maximum distance limit, but when violated + * results in a cost which adds up to other costs defined in the model, + * with the same unit. + * If defined soft_max_meters must be less than max_meters and must be + * nonnegative. + * @type float $cost_per_kilometer_below_soft_max + * Cost per kilometer incurred, increasing up to `soft_max_meters`, with + * formula: + * ``` + * min(distance_meters, soft_max_meters) / 1000.0 * + * cost_per_kilometer_below_soft_max. + * ``` + * This cost is not supported in `route_distance_limit`. + * @type float $cost_per_kilometer_above_soft_max + * Cost per kilometer incurred if distance is above `soft_max_meters` limit. + * The additional cost is 0 if the distance is under the limit, otherwise the + * formula used to compute the cost is the following: + * ``` + * (distance_meters - soft_max_meters) / 1000.0 * + * cost_per_kilometer_above_soft_max. + * ``` + * The cost must be nonnegative. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); + parent::__construct($data); + } + + /** + * A hard limit constraining the distance to be at most max_meters. The limit + * must be nonnegative. + * + * Generated from protobuf field optional int64 max_meters = 1; + * @return int|string + */ + public function getMaxMeters() + { + return isset($this->max_meters) ? $this->max_meters : 0; + } + + public function hasMaxMeters() + { + return isset($this->max_meters); + } + + public function clearMaxMeters() + { + unset($this->max_meters); + } + + /** + * A hard limit constraining the distance to be at most max_meters. The limit + * must be nonnegative. + * + * Generated from protobuf field optional int64 max_meters = 1; + * @param int|string $var + * @return $this + */ + public function setMaxMeters($var) + { + GPBUtil::checkInt64($var); + $this->max_meters = $var; + + return $this; + } + + /** + * A soft limit not enforcing a maximum distance limit, but when violated + * results in a cost which adds up to other costs defined in the model, + * with the same unit. + * If defined soft_max_meters must be less than max_meters and must be + * nonnegative. + * + * Generated from protobuf field optional int64 soft_max_meters = 2; + * @return int|string + */ + public function getSoftMaxMeters() + { + return isset($this->soft_max_meters) ? $this->soft_max_meters : 0; + } + + public function hasSoftMaxMeters() + { + return isset($this->soft_max_meters); + } + + public function clearSoftMaxMeters() + { + unset($this->soft_max_meters); + } + + /** + * A soft limit not enforcing a maximum distance limit, but when violated + * results in a cost which adds up to other costs defined in the model, + * with the same unit. + * If defined soft_max_meters must be less than max_meters and must be + * nonnegative. + * + * Generated from protobuf field optional int64 soft_max_meters = 2; + * @param int|string $var + * @return $this + */ + public function setSoftMaxMeters($var) + { + GPBUtil::checkInt64($var); + $this->soft_max_meters = $var; + + return $this; + } + + /** + * Cost per kilometer incurred, increasing up to `soft_max_meters`, with + * formula: + * ``` + * min(distance_meters, soft_max_meters) / 1000.0 * + * cost_per_kilometer_below_soft_max. + * ``` + * This cost is not supported in `route_distance_limit`. + * + * Generated from protobuf field optional double cost_per_kilometer_below_soft_max = 4; + * @return float + */ + public function getCostPerKilometerBelowSoftMax() + { + return isset($this->cost_per_kilometer_below_soft_max) ? $this->cost_per_kilometer_below_soft_max : 0.0; + } + + public function hasCostPerKilometerBelowSoftMax() + { + return isset($this->cost_per_kilometer_below_soft_max); + } + + public function clearCostPerKilometerBelowSoftMax() + { + unset($this->cost_per_kilometer_below_soft_max); + } + + /** + * Cost per kilometer incurred, increasing up to `soft_max_meters`, with + * formula: + * ``` + * min(distance_meters, soft_max_meters) / 1000.0 * + * cost_per_kilometer_below_soft_max. + * ``` + * This cost is not supported in `route_distance_limit`. + * + * Generated from protobuf field optional double cost_per_kilometer_below_soft_max = 4; + * @param float $var + * @return $this + */ + public function setCostPerKilometerBelowSoftMax($var) + { + GPBUtil::checkDouble($var); + $this->cost_per_kilometer_below_soft_max = $var; + + return $this; + } + + /** + * Cost per kilometer incurred if distance is above `soft_max_meters` limit. + * The additional cost is 0 if the distance is under the limit, otherwise the + * formula used to compute the cost is the following: + * ``` + * (distance_meters - soft_max_meters) / 1000.0 * + * cost_per_kilometer_above_soft_max. + * ``` + * The cost must be nonnegative. + * + * Generated from protobuf field optional double cost_per_kilometer_above_soft_max = 3; + * @return float + */ + public function getCostPerKilometerAboveSoftMax() + { + return isset($this->cost_per_kilometer_above_soft_max) ? $this->cost_per_kilometer_above_soft_max : 0.0; + } + + public function hasCostPerKilometerAboveSoftMax() + { + return isset($this->cost_per_kilometer_above_soft_max); + } + + public function clearCostPerKilometerAboveSoftMax() + { + unset($this->cost_per_kilometer_above_soft_max); + } + + /** + * Cost per kilometer incurred if distance is above `soft_max_meters` limit. + * The additional cost is 0 if the distance is under the limit, otherwise the + * formula used to compute the cost is the following: + * ``` + * (distance_meters - soft_max_meters) / 1000.0 * + * cost_per_kilometer_above_soft_max. + * ``` + * The cost must be nonnegative. + * + * Generated from protobuf field optional double cost_per_kilometer_above_soft_max = 3; + * @param float $var + * @return $this + */ + public function setCostPerKilometerAboveSoftMax($var) + { + GPBUtil::checkDouble($var); + $this->cost_per_kilometer_above_soft_max = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/GcsDestination.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/GcsDestination.php new file mode 100644 index 000000000000..3ccb29cfd250 --- /dev/null +++ b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/GcsDestination.php @@ -0,0 +1,67 @@ +google.cloud.optimization.v1.GcsDestination + */ +class GcsDestination extends \Google\Protobuf\Internal\Message +{ + /** + * Required. URI of the Google Cloud Storage location. + * + * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $uri = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $uri + * Required. URI of the Google Cloud Storage location. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Optimization\V1\AsyncModel::initOnce(); + parent::__construct($data); + } + + /** + * Required. URI of the Google Cloud Storage location. + * + * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * Required. URI of the Google Cloud Storage location. + * + * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setUri($var) + { + GPBUtil::checkString($var, True); + $this->uri = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/GcsSource.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/GcsSource.php new file mode 100644 index 000000000000..9ddec1cbc0f7 --- /dev/null +++ b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/GcsSource.php @@ -0,0 +1,67 @@ +google.cloud.optimization.v1.GcsSource + */ +class GcsSource extends \Google\Protobuf\Internal\Message +{ + /** + * Required. URI of the Google Cloud Storage location. + * + * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $uri = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $uri + * Required. URI of the Google Cloud Storage location. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Optimization\V1\AsyncModel::initOnce(); + parent::__construct($data); + } + + /** + * Required. URI of the Google Cloud Storage location. + * + * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * Required. URI of the Google Cloud Storage location. + * + * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setUri($var) + { + GPBUtil::checkString($var, True); + $this->uri = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/InjectedSolutionConstraint.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/InjectedSolutionConstraint.php new file mode 100644 index 000000000000..24875c1d2acd --- /dev/null +++ b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/InjectedSolutionConstraint.php @@ -0,0 +1,156 @@ +google.cloud.optimization.v1.InjectedSolutionConstraint + */ +class InjectedSolutionConstraint extends \Google\Protobuf\Internal\Message +{ + /** + * Routes of the solution to inject. Some routes may be omitted from the + * original solution. The routes and skipped shipments must satisfy the basic + * validity assumptions listed for `injected_first_solution_routes`. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.ShipmentRoute routes = 1; + */ + private $routes; + /** + * Skipped shipments of the solution to inject. Some may be omitted from the + * original solution. See the `routes` field. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.SkippedShipment skipped_shipments = 2; + */ + private $skipped_shipments; + /** + * For zero or more groups of vehicles, specifies when and how much to relax + * constraints. If this field is empty, all non-empty vehicle routes are + * fully constrained. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation constraint_relaxations = 3; + */ + private $constraint_relaxations; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Optimization\V1\ShipmentRoute>|\Google\Protobuf\Internal\RepeatedField $routes + * Routes of the solution to inject. Some routes may be omitted from the + * original solution. The routes and skipped shipments must satisfy the basic + * validity assumptions listed for `injected_first_solution_routes`. + * @type array<\Google\Cloud\Optimization\V1\SkippedShipment>|\Google\Protobuf\Internal\RepeatedField $skipped_shipments + * Skipped shipments of the solution to inject. Some may be omitted from the + * original solution. See the `routes` field. + * @type array<\Google\Cloud\Optimization\V1\InjectedSolutionConstraint\ConstraintRelaxation>|\Google\Protobuf\Internal\RepeatedField $constraint_relaxations + * For zero or more groups of vehicles, specifies when and how much to relax + * constraints. If this field is empty, all non-empty vehicle routes are + * fully constrained. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); + parent::__construct($data); + } + + /** + * Routes of the solution to inject. Some routes may be omitted from the + * original solution. The routes and skipped shipments must satisfy the basic + * validity assumptions listed for `injected_first_solution_routes`. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.ShipmentRoute routes = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRoutes() + { + return $this->routes; + } + + /** + * Routes of the solution to inject. Some routes may be omitted from the + * original solution. The routes and skipped shipments must satisfy the basic + * validity assumptions listed for `injected_first_solution_routes`. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.ShipmentRoute routes = 1; + * @param array<\Google\Cloud\Optimization\V1\ShipmentRoute>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRoutes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\ShipmentRoute::class); + $this->routes = $arr; + + return $this; + } + + /** + * Skipped shipments of the solution to inject. Some may be omitted from the + * original solution. See the `routes` field. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.SkippedShipment skipped_shipments = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSkippedShipments() + { + return $this->skipped_shipments; + } + + /** + * Skipped shipments of the solution to inject. Some may be omitted from the + * original solution. See the `routes` field. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.SkippedShipment skipped_shipments = 2; + * @param array<\Google\Cloud\Optimization\V1\SkippedShipment>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSkippedShipments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\SkippedShipment::class); + $this->skipped_shipments = $arr; + + return $this; + } + + /** + * For zero or more groups of vehicles, specifies when and how much to relax + * constraints. If this field is empty, all non-empty vehicle routes are + * fully constrained. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation constraint_relaxations = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getConstraintRelaxations() + { + return $this->constraint_relaxations; + } + + /** + * For zero or more groups of vehicles, specifies when and how much to relax + * constraints. If this field is empty, all non-empty vehicle routes are + * fully constrained. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation constraint_relaxations = 3; + * @param array<\Google\Cloud\Optimization\V1\InjectedSolutionConstraint\ConstraintRelaxation>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setConstraintRelaxations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\InjectedSolutionConstraint\ConstraintRelaxation::class); + $this->constraint_relaxations = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/InjectedSolutionConstraint/ConstraintRelaxation.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/InjectedSolutionConstraint/ConstraintRelaxation.php new file mode 100644 index 000000000000..0a9ea36e234a --- /dev/null +++ b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/InjectedSolutionConstraint/ConstraintRelaxation.php @@ -0,0 +1,151 @@ +google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation + */ +class ConstraintRelaxation extends \Google\Protobuf\Internal\Message +{ + /** + * All the visit constraint relaxations that will apply to visits on + * routes with vehicles in `vehicle_indices`. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.Relaxation relaxations = 1; + */ + private $relaxations; + /** + * Specifies the vehicle indices to which the visit constraint + * `relaxations` apply. If empty, this is considered the default and the + * `relaxations` apply to all vehicles that are not specified in other + * `constraint_relaxations`. There can be at most one default, i.e., at + * most one constraint relaxation field is allowed empty + * `vehicle_indices`. A vehicle index can only be listed once, even within + * several `constraint_relaxations`. + * A vehicle index is mapped the same as + * [ShipmentRoute.vehicle_index][google.cloud.optimization.v1.ShipmentRoute.vehicle_index], + * if `interpret_injected_solutions_using_labels` is true (see `fields` + * comment). + * + * Generated from protobuf field repeated int32 vehicle_indices = 2; + */ + private $vehicle_indices; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Optimization\V1\InjectedSolutionConstraint\ConstraintRelaxation\Relaxation>|\Google\Protobuf\Internal\RepeatedField $relaxations + * All the visit constraint relaxations that will apply to visits on + * routes with vehicles in `vehicle_indices`. + * @type array|\Google\Protobuf\Internal\RepeatedField $vehicle_indices + * Specifies the vehicle indices to which the visit constraint + * `relaxations` apply. If empty, this is considered the default and the + * `relaxations` apply to all vehicles that are not specified in other + * `constraint_relaxations`. There can be at most one default, i.e., at + * most one constraint relaxation field is allowed empty + * `vehicle_indices`. A vehicle index can only be listed once, even within + * several `constraint_relaxations`. + * A vehicle index is mapped the same as + * [ShipmentRoute.vehicle_index][google.cloud.optimization.v1.ShipmentRoute.vehicle_index], + * if `interpret_injected_solutions_using_labels` is true (see `fields` + * comment). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); + parent::__construct($data); + } + + /** + * All the visit constraint relaxations that will apply to visits on + * routes with vehicles in `vehicle_indices`. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.Relaxation relaxations = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRelaxations() + { + return $this->relaxations; + } + + /** + * All the visit constraint relaxations that will apply to visits on + * routes with vehicles in `vehicle_indices`. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.Relaxation relaxations = 1; + * @param array<\Google\Cloud\Optimization\V1\InjectedSolutionConstraint\ConstraintRelaxation\Relaxation>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRelaxations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\InjectedSolutionConstraint\ConstraintRelaxation\Relaxation::class); + $this->relaxations = $arr; + + return $this; + } + + /** + * Specifies the vehicle indices to which the visit constraint + * `relaxations` apply. If empty, this is considered the default and the + * `relaxations` apply to all vehicles that are not specified in other + * `constraint_relaxations`. There can be at most one default, i.e., at + * most one constraint relaxation field is allowed empty + * `vehicle_indices`. A vehicle index can only be listed once, even within + * several `constraint_relaxations`. + * A vehicle index is mapped the same as + * [ShipmentRoute.vehicle_index][google.cloud.optimization.v1.ShipmentRoute.vehicle_index], + * if `interpret_injected_solutions_using_labels` is true (see `fields` + * comment). + * + * Generated from protobuf field repeated int32 vehicle_indices = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getVehicleIndices() + { + return $this->vehicle_indices; + } + + /** + * Specifies the vehicle indices to which the visit constraint + * `relaxations` apply. If empty, this is considered the default and the + * `relaxations` apply to all vehicles that are not specified in other + * `constraint_relaxations`. There can be at most one default, i.e., at + * most one constraint relaxation field is allowed empty + * `vehicle_indices`. A vehicle index can only be listed once, even within + * several `constraint_relaxations`. + * A vehicle index is mapped the same as + * [ShipmentRoute.vehicle_index][google.cloud.optimization.v1.ShipmentRoute.vehicle_index], + * if `interpret_injected_solutions_using_labels` is true (see `fields` + * comment). + * + * Generated from protobuf field repeated int32 vehicle_indices = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setVehicleIndices($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); + $this->vehicle_indices = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ConstraintRelaxation::class, \Google\Cloud\Optimization\V1\InjectedSolutionConstraint_ConstraintRelaxation::class); + diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/InjectedSolutionConstraint/ConstraintRelaxation/Relaxation.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/InjectedSolutionConstraint/ConstraintRelaxation/Relaxation.php new file mode 100644 index 000000000000..751a516bfd34 --- /dev/null +++ b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/InjectedSolutionConstraint/ConstraintRelaxation/Relaxation.php @@ -0,0 +1,204 @@ += relaxations(i).threshold_time` AND + * * `j + 1 >= relaxations(i).threshold_visit_count` + * Similarly, the vehicle start is relaxed to `relaxations(i).level` if it + * satisfies: + * * `vehicle_start_time >= relaxations(i).threshold_time` AND + * * `relaxations(i).threshold_visit_count == 0` + * and the vehicle end is relaxed to `relaxations(i).level` if it satisfies: + * * `vehicle_end_time >= relaxations(i).threshold_time` AND + * * `route.visits_size() + 1 >= relaxations(i).threshold_visit_count` + * To apply a relaxation level if a visit meets the `threshold_visit_count` + * OR the `threshold_time` add two `relaxations` with the same `level`: + * one with only `threshold_visit_count` set and the other with only + * `threshold_time` set. If a visit satisfies the conditions of multiple + * `relaxations`, the most relaxed level applies. As a result, from the + * vehicle start through the route visits in order to the vehicle end, the + * relaxation level becomes more relaxed: i.e., the relaxation level is + * non-decreasing as the route progresses. + * The timing and sequence of route visits that do not satisfy the + * threshold conditions of any `relaxations` are fully constrained + * and no visits may be inserted into these sequences. Also, if a + * vehicle start or end does not satisfy the conditions of any + * relaxation the time is fixed, unless the vehicle is empty. + * + * Generated from protobuf message google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.Relaxation + */ +class Relaxation extends \Google\Protobuf\Internal\Message +{ + /** + * The constraint relaxation level that applies when the conditions + * at or after `threshold_time` AND at least `threshold_visit_count` are + * satisfied. + * + * Generated from protobuf field .google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.Relaxation.Level level = 1; + */ + protected $level = 0; + /** + * The time at or after which the relaxation `level` may be applied. + * + * Generated from protobuf field .google.protobuf.Timestamp threshold_time = 2; + */ + protected $threshold_time = null; + /** + * The number of visits at or after which the relaxation `level` may be + * applied. If `threshold_visit_count` is 0 (or unset), the `level` may be + * applied directly at the vehicle start. + * If it is `route.visits_size() + 1`, the `level` may only be applied to + * the vehicle end. If it is more than `route.visits_size() + 1`, + * `level` is not applied at all for that route. + * + * Generated from protobuf field int32 threshold_visit_count = 3; + */ + protected $threshold_visit_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $level + * The constraint relaxation level that applies when the conditions + * at or after `threshold_time` AND at least `threshold_visit_count` are + * satisfied. + * @type \Google\Protobuf\Timestamp $threshold_time + * The time at or after which the relaxation `level` may be applied. + * @type int $threshold_visit_count + * The number of visits at or after which the relaxation `level` may be + * applied. If `threshold_visit_count` is 0 (or unset), the `level` may be + * applied directly at the vehicle start. + * If it is `route.visits_size() + 1`, the `level` may only be applied to + * the vehicle end. If it is more than `route.visits_size() + 1`, + * `level` is not applied at all for that route. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); + parent::__construct($data); + } + + /** + * The constraint relaxation level that applies when the conditions + * at or after `threshold_time` AND at least `threshold_visit_count` are + * satisfied. + * + * Generated from protobuf field .google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.Relaxation.Level level = 1; + * @return int + */ + public function getLevel() + { + return $this->level; + } + + /** + * The constraint relaxation level that applies when the conditions + * at or after `threshold_time` AND at least `threshold_visit_count` are + * satisfied. + * + * Generated from protobuf field .google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.Relaxation.Level level = 1; + * @param int $var + * @return $this + */ + public function setLevel($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Optimization\V1\InjectedSolutionConstraint\ConstraintRelaxation\Relaxation\Level::class); + $this->level = $var; + + return $this; + } + + /** + * The time at or after which the relaxation `level` may be applied. + * + * Generated from protobuf field .google.protobuf.Timestamp threshold_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getThresholdTime() + { + return $this->threshold_time; + } + + public function hasThresholdTime() + { + return isset($this->threshold_time); + } + + public function clearThresholdTime() + { + unset($this->threshold_time); + } + + /** + * The time at or after which the relaxation `level` may be applied. + * + * Generated from protobuf field .google.protobuf.Timestamp threshold_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setThresholdTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->threshold_time = $var; + + return $this; + } + + /** + * The number of visits at or after which the relaxation `level` may be + * applied. If `threshold_visit_count` is 0 (or unset), the `level` may be + * applied directly at the vehicle start. + * If it is `route.visits_size() + 1`, the `level` may only be applied to + * the vehicle end. If it is more than `route.visits_size() + 1`, + * `level` is not applied at all for that route. + * + * Generated from protobuf field int32 threshold_visit_count = 3; + * @return int + */ + public function getThresholdVisitCount() + { + return $this->threshold_visit_count; + } + + /** + * The number of visits at or after which the relaxation `level` may be + * applied. If `threshold_visit_count` is 0 (or unset), the `level` may be + * applied directly at the vehicle start. + * If it is `route.visits_size() + 1`, the `level` may only be applied to + * the vehicle end. If it is more than `route.visits_size() + 1`, + * `level` is not applied at all for that route. + * + * Generated from protobuf field int32 threshold_visit_count = 3; + * @param int $var + * @return $this + */ + public function setThresholdVisitCount($var) + { + GPBUtil::checkInt32($var); + $this->threshold_visit_count = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Relaxation::class, \Google\Cloud\Optimization\V1\InjectedSolutionConstraint_ConstraintRelaxation_Relaxation::class); + diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/InjectedSolutionConstraint/ConstraintRelaxation/Relaxation/Level.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/InjectedSolutionConstraint/ConstraintRelaxation/Relaxation/Level.php new file mode 100644 index 000000000000..7f06698f5872 --- /dev/null +++ b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/InjectedSolutionConstraint/ConstraintRelaxation/Relaxation/Level.php @@ -0,0 +1,83 @@ +google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.Relaxation.Level + */ +class Level +{ + /** + * Implicit default relaxation level: no constraints are relaxed, + * i.e., all visits are fully constrained. + * This value must not be explicitly used in `level`. + * + * Generated from protobuf enum LEVEL_UNSPECIFIED = 0; + */ + const LEVEL_UNSPECIFIED = 0; + /** + * Visit start times and vehicle start/end times will be relaxed, but + * each visit remains bound to the same vehicle and the visit sequence + * must be observed: no visit can be inserted between them or before + * them. + * + * Generated from protobuf enum RELAX_VISIT_TIMES_AFTER_THRESHOLD = 1; + */ + const RELAX_VISIT_TIMES_AFTER_THRESHOLD = 1; + /** + * Same as `RELAX_VISIT_TIMES_AFTER_THRESHOLD`, but the visit sequence + * is also relaxed: visits can only be performed by this vehicle, but + * can potentially become unperformed. + * + * Generated from protobuf enum RELAX_VISIT_TIMES_AND_SEQUENCE_AFTER_THRESHOLD = 2; + */ + const RELAX_VISIT_TIMES_AND_SEQUENCE_AFTER_THRESHOLD = 2; + /** + * Same as `RELAX_VISIT_TIMES_AND_SEQUENCE_AFTER_THRESHOLD`, but the + * vehicle is also relaxed: visits are completely free at or after the + * threshold time and can potentially become unperformed. + * + * Generated from protobuf enum RELAX_ALL_AFTER_THRESHOLD = 3; + */ + const RELAX_ALL_AFTER_THRESHOLD = 3; + + private static $valueToName = [ + self::LEVEL_UNSPECIFIED => 'LEVEL_UNSPECIFIED', + self::RELAX_VISIT_TIMES_AFTER_THRESHOLD => 'RELAX_VISIT_TIMES_AFTER_THRESHOLD', + self::RELAX_VISIT_TIMES_AND_SEQUENCE_AFTER_THRESHOLD => 'RELAX_VISIT_TIMES_AND_SEQUENCE_AFTER_THRESHOLD', + self::RELAX_ALL_AFTER_THRESHOLD => 'RELAX_ALL_AFTER_THRESHOLD', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Level::class, \Google\Cloud\Optimization\V1\InjectedSolutionConstraint_ConstraintRelaxation_Relaxation_Level::class); + diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/InputConfig.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/InputConfig.php new file mode 100644 index 000000000000..b6c65c213d2a --- /dev/null +++ b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/InputConfig.php @@ -0,0 +1,112 @@ +google.cloud.optimization.v1.InputConfig + */ +class InputConfig extends \Google\Protobuf\Internal\Message +{ + /** + * The input data format that used to store the model in Cloud Storage. + * + * Generated from protobuf field .google.cloud.optimization.v1.DataFormat data_format = 2; + */ + protected $data_format = 0; + protected $source; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Optimization\V1\GcsSource $gcs_source + * The Google Cloud Storage location to read the input from. This must be a + * single file. + * @type int $data_format + * The input data format that used to store the model in Cloud Storage. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Optimization\V1\AsyncModel::initOnce(); + parent::__construct($data); + } + + /** + * The Google Cloud Storage location to read the input from. This must be a + * single file. + * + * Generated from protobuf field .google.cloud.optimization.v1.GcsSource gcs_source = 1; + * @return \Google\Cloud\Optimization\V1\GcsSource|null + */ + public function getGcsSource() + { + return $this->readOneof(1); + } + + public function hasGcsSource() + { + return $this->hasOneof(1); + } + + /** + * The Google Cloud Storage location to read the input from. This must be a + * single file. + * + * Generated from protobuf field .google.cloud.optimization.v1.GcsSource gcs_source = 1; + * @param \Google\Cloud\Optimization\V1\GcsSource $var + * @return $this + */ + public function setGcsSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Optimization\V1\GcsSource::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * The input data format that used to store the model in Cloud Storage. + * + * Generated from protobuf field .google.cloud.optimization.v1.DataFormat data_format = 2; + * @return int + */ + public function getDataFormat() + { + return $this->data_format; + } + + /** + * The input data format that used to store the model in Cloud Storage. + * + * Generated from protobuf field .google.cloud.optimization.v1.DataFormat data_format = 2; + * @param int $var + * @return $this + */ + public function setDataFormat($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Optimization\V1\DataFormat::class); + $this->data_format = $var; + + return $this; + } + + /** + * @return string + */ + public function getSource() + { + return $this->whichOneof("source"); + } + +} + diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/Location.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/Location.php new file mode 100644 index 000000000000..cb4cfc3a20de --- /dev/null +++ b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/Location.php @@ -0,0 +1,133 @@ +google.cloud.optimization.v1.Location + */ +class Location extends \Google\Protobuf\Internal\Message +{ + /** + * The waypoint's geographic coordinates. + * + * Generated from protobuf field .google.type.LatLng lat_lng = 1; + */ + protected $lat_lng = null; + /** + * The compass heading associated with the direction of the flow of traffic. + * This value is used to specify the side of the road to use for pickup and + * drop-off. Heading values can be from 0 to 360, where 0 specifies a heading + * of due North, 90 specifies a heading of due East, etc. + * + * Generated from protobuf field optional int32 heading = 2; + */ + protected $heading = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Type\LatLng $lat_lng + * The waypoint's geographic coordinates. + * @type int $heading + * The compass heading associated with the direction of the flow of traffic. + * This value is used to specify the side of the road to use for pickup and + * drop-off. Heading values can be from 0 to 360, where 0 specifies a heading + * of due North, 90 specifies a heading of due East, etc. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); + parent::__construct($data); + } + + /** + * The waypoint's geographic coordinates. + * + * Generated from protobuf field .google.type.LatLng lat_lng = 1; + * @return \Google\Type\LatLng|null + */ + public function getLatLng() + { + return $this->lat_lng; + } + + public function hasLatLng() + { + return isset($this->lat_lng); + } + + public function clearLatLng() + { + unset($this->lat_lng); + } + + /** + * The waypoint's geographic coordinates. + * + * Generated from protobuf field .google.type.LatLng lat_lng = 1; + * @param \Google\Type\LatLng $var + * @return $this + */ + public function setLatLng($var) + { + GPBUtil::checkMessage($var, \Google\Type\LatLng::class); + $this->lat_lng = $var; + + return $this; + } + + /** + * The compass heading associated with the direction of the flow of traffic. + * This value is used to specify the side of the road to use for pickup and + * drop-off. Heading values can be from 0 to 360, where 0 specifies a heading + * of due North, 90 specifies a heading of due East, etc. + * + * Generated from protobuf field optional int32 heading = 2; + * @return int + */ + public function getHeading() + { + return isset($this->heading) ? $this->heading : 0; + } + + public function hasHeading() + { + return isset($this->heading); + } + + public function clearHeading() + { + unset($this->heading); + } + + /** + * The compass heading associated with the direction of the flow of traffic. + * This value is used to specify the side of the road to use for pickup and + * drop-off. Heading values can be from 0 to 360, where 0 specifies a heading + * of due North, 90 specifies a heading of due East, etc. + * + * Generated from protobuf field optional int32 heading = 2; + * @param int $var + * @return $this + */ + public function setHeading($var) + { + GPBUtil::checkInt32($var); + $this->heading = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/OptimizeToursRequest.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/OptimizeToursRequest.php new file mode 100644 index 000000000000..97f382a04375 --- /dev/null +++ b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/OptimizeToursRequest.php @@ -0,0 +1,1237 @@ +google.cloud.optimization.v1.OptimizeToursRequest + */ +class OptimizeToursRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Target project and location to make a call. + * Format: `projects/{project-id}/locations/{location-id}`. + * If no location is specified, a region will be chosen automatically. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $parent = ''; + /** + * If this timeout is set, the server returns a response before the timeout + * period has elapsed or the server deadline for synchronous requests is + * reached, whichever is sooner. + * For asynchronous requests, the server will generate a solution (if + * possible) before the timeout has elapsed. + * + * Generated from protobuf field .google.protobuf.Duration timeout = 2; + */ + protected $timeout = null; + /** + * Shipment model to solve. + * + * Generated from protobuf field .google.cloud.optimization.v1.ShipmentModel model = 3; + */ + protected $model = null; + /** + * By default, the solving mode is `DEFAULT_SOLVE` (0). + * + * Generated from protobuf field .google.cloud.optimization.v1.OptimizeToursRequest.SolvingMode solving_mode = 4; + */ + protected $solving_mode = 0; + /** + * Search mode used to solve the request. + * + * Generated from protobuf field .google.cloud.optimization.v1.OptimizeToursRequest.SearchMode search_mode = 6; + */ + protected $search_mode = 0; + /** + * Guide the optimization algorithm in finding a first solution that is + * similar to a previous solution. + * The model is constrained when the first solution is built. + * Any shipments not performed on a route are implicitly skipped in the first + * solution, but they may be performed in successive solutions. + * The solution must satisfy some basic validity assumptions: + * * for all routes, `vehicle_index` must be in range and not be duplicated. + * * for all visits, `shipment_index` and `visit_request_index` must be + * in range. + * * a shipment may only be referenced on one route. + * * the pickup of a pickup-delivery shipment must be performed before + * the delivery. + * * no more than one pickup alternative or delivery alternative of + * a shipment may be performed. + * * for all routes, times are increasing (i.e., `vehicle_start_time + * <= visits[0].start_time <= visits[1].start_time ... + * <= vehicle_end_time`). + * * a shipment may only be performed on a vehicle that is allowed. A + * vehicle is allowed if + * [Shipment.allowed_vehicle_indices][google.cloud.optimization.v1.Shipment.allowed_vehicle_indices] + * is empty or its `vehicle_index` is included in + * [Shipment.allowed_vehicle_indices][google.cloud.optimization.v1.Shipment.allowed_vehicle_indices]. + * If the injected solution is not feasible, a validation error is not + * necessarily returned and an error indicating infeasibility may be returned + * instead. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.ShipmentRoute injected_first_solution_routes = 7; + */ + private $injected_first_solution_routes; + /** + * Constrain the optimization algorithm to find a final solution that is + * similar to a previous solution. For example, this may be used to freeze + * portions of routes which have already been completed or which are to be + * completed but must not be modified. + * If the injected solution is not feasible, a validation error is not + * necessarily returned and an error indicating infeasibility may be returned + * instead. + * + * Generated from protobuf field .google.cloud.optimization.v1.InjectedSolutionConstraint injected_solution_constraint = 8; + */ + protected $injected_solution_constraint = null; + /** + * If non-empty, the given routes will be refreshed, without modifying their + * underlying sequence of visits or travel times: only other details will be + * updated. This does not solve the model. + * As of 2020/11, this only populates the polylines of non-empty routes and + * requires that `populate_polylines` is true. + * The `route_polyline` fields of the passed-in routes may be inconsistent + * with route `transitions`. + * This field must not be used together with `injected_first_solution_routes` + * or `injected_solution_constraint`. + * `Shipment.ignore` and `Vehicle.ignore` have no effect on the behavior. + * Polylines are still populated between all visits in all non-empty routes + * regardless of whether the related shipments or vehicles are ignored. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.ShipmentRoute refresh_details_routes = 9; + */ + private $refresh_details_routes; + /** + * If true: + * * uses + * [ShipmentRoute.vehicle_label][google.cloud.optimization.v1.ShipmentRoute.vehicle_label] + * instead of `vehicle_index` to + * match routes in an injected solution with vehicles in the request; + * reuses the mapping of original + * [ShipmentRoute.vehicle_index][google.cloud.optimization.v1.ShipmentRoute.vehicle_index] + * to new + * [ShipmentRoute.vehicle_index][google.cloud.optimization.v1.ShipmentRoute.vehicle_index] + * to update + * [ConstraintRelaxation.vehicle_indices][google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.vehicle_indices] + * if non-empty, but the mapping must be unambiguous (i.e., multiple + * `ShipmentRoute`s must not share the same original `vehicle_index`). + * * uses + * [ShipmentRoute.Visit.shipment_label][google.cloud.optimization.v1.ShipmentRoute.Visit.shipment_label] + * instead of `shipment_index` + * to match visits in an injected solution with shipments in the request; + * * uses + * [SkippedShipment.label][google.cloud.optimization.v1.SkippedShipment.label] + * instead of + * [SkippedShipment.index][google.cloud.optimization.v1.SkippedShipment.index] + * to + * match skipped shipments in the injected solution with request + * shipments. + * This interpretation applies to the `injected_first_solution_routes`, + * `injected_solution_constraint`, and `refresh_details_routes` fields. + * It can be used when shipment or vehicle indices in the request have + * changed since the solution was created, perhaps because shipments or + * vehicles have been removed from or added to the request. + * If true, labels in the following categories must appear at most once in + * their category: + * * [Vehicle.label][google.cloud.optimization.v1.Vehicle.label] in the + * request; + * * [Shipment.label][google.cloud.optimization.v1.Shipment.label] in the + * request; + * * [ShipmentRoute.vehicle_label][google.cloud.optimization.v1.ShipmentRoute.vehicle_label] in the injected solution; + * * [SkippedShipment.label][google.cloud.optimization.v1.SkippedShipment.label] and [ShipmentRoute.Visit.shipment_label][google.cloud.optimization.v1.ShipmentRoute.Visit.shipment_label] in + * the injected solution (except pickup/delivery visit pairs, whose + * `shipment_label` must appear twice). + * If a `vehicle_label` in the injected solution does not correspond to a + * request vehicle, the corresponding route is removed from the solution + * along with its visits. If a `shipment_label` in the injected solution does + * not correspond to a request shipment, the corresponding visit is removed + * from the solution. If a + * [SkippedShipment.label][google.cloud.optimization.v1.SkippedShipment.label] + * in the injected solution does not correspond to a request shipment, the + * `SkippedShipment` is removed from the solution. + * Removing route visits or entire routes from an injected solution may + * have an effect on the implied constraints, which may lead to change in + * solution, validation errors, or infeasibility. + * NOTE: The caller must ensure that each + * [Vehicle.label][google.cloud.optimization.v1.Vehicle.label] (resp. + * [Shipment.label][google.cloud.optimization.v1.Shipment.label]) uniquely + * identifies a vehicle (resp. shipment) entity used across the two relevant + * requests: the past request that produced the `OptimizeToursResponse` used + * in the injected solution and the current request that includes the injected + * solution. The uniqueness checks described above are not enough to guarantee + * this requirement. + * + * Generated from protobuf field bool interpret_injected_solutions_using_labels = 10; + */ + protected $interpret_injected_solutions_using_labels = false; + /** + * Consider traffic estimation in calculating `ShipmentRoute` fields + * [Transition.travel_duration][google.cloud.optimization.v1.ShipmentRoute.Transition.travel_duration], + * [Visit.start_time][google.cloud.optimization.v1.ShipmentRoute.Visit.start_time], + * and `vehicle_end_time`; in setting the + * [ShipmentRoute.has_traffic_infeasibilities][google.cloud.optimization.v1.ShipmentRoute.has_traffic_infeasibilities] + * field, and in calculating the + * [OptimizeToursResponse.total_cost][google.cloud.optimization.v1.OptimizeToursResponse.total_cost] + * field. + * + * Generated from protobuf field bool consider_road_traffic = 11; + */ + protected $consider_road_traffic = false; + /** + * If true, polylines will be populated in response `ShipmentRoute`s. + * + * Generated from protobuf field bool populate_polylines = 12; + */ + protected $populate_polylines = false; + /** + * If true, polylines will be populated in response + * [ShipmentRoute.transitions][google.cloud.optimization.v1.ShipmentRoute.transitions]. + * Note that in this case, the polylines will also be populated in the + * deprecated `travel_steps`. + * + * Generated from protobuf field bool populate_transition_polylines = 13; + */ + protected $populate_transition_polylines = false; + /** + * If this is set, then the request can have a deadline + * (see https://grpc.io/blog/deadlines) of up to 60 minutes. + * Otherwise, the maximum deadline is only 30 minutes. + * Note that long-lived requests have a significantly larger (but still small) + * risk of interruption. + * + * Generated from protobuf field bool allow_large_deadline_despite_interruption_risk = 14; + */ + protected $allow_large_deadline_despite_interruption_risk = false; + /** + * If true, travel distances will be computed using geodesic distances instead + * of Google Maps distances, and travel times will be computed using geodesic + * distances with a speed defined by `geodesic_meters_per_second`. + * + * Generated from protobuf field bool use_geodesic_distances = 15; + */ + protected $use_geodesic_distances = false; + /** + * When `use_geodesic_distances` is true, this field must be set and defines + * the speed applied to compute travel times. Its value must be at least 1.0 + * meters/seconds. + * + * Generated from protobuf field optional double geodesic_meters_per_second = 16; + */ + protected $geodesic_meters_per_second = null; + /** + * Truncates the number of validation errors returned. These errors are + * typically attached to an INVALID_ARGUMENT error payload as a BadRequest + * error detail (https://cloud.google.com/apis/design/errors#error_details), + * unless solving_mode=VALIDATE_ONLY: see the + * [OptimizeToursResponse.validation_errors][google.cloud.optimization.v1.OptimizeToursResponse.validation_errors] + * field. + * This defaults to 100 and is capped at 10,000. + * + * Generated from protobuf field optional int32 max_validation_errors = 5; + */ + protected $max_validation_errors = null; + /** + * Label that may be used to identify this request, reported back in the + * [OptimizeToursResponse.request_label][google.cloud.optimization.v1.OptimizeToursResponse.request_label]. + * + * Generated from protobuf field string label = 17; + */ + protected $label = ''; + /** + * Deprecated: Use + * [OptimizeToursRequest.populate_transition_polylines][google.cloud.optimization.v1.OptimizeToursRequest.populate_transition_polylines] + * instead. If true, polylines will be populated in response + * [ShipmentRoute.transitions][google.cloud.optimization.v1.ShipmentRoute.transitions]. + * Note that in this case, the polylines will also be populated in the + * deprecated `travel_steps`. + * + * Generated from protobuf field bool populate_travel_step_polylines = 20 [deprecated = true]; + * @deprecated + */ + protected $populate_travel_step_polylines = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Target project and location to make a call. + * Format: `projects/{project-id}/locations/{location-id}`. + * If no location is specified, a region will be chosen automatically. + * @type \Google\Protobuf\Duration $timeout + * If this timeout is set, the server returns a response before the timeout + * period has elapsed or the server deadline for synchronous requests is + * reached, whichever is sooner. + * For asynchronous requests, the server will generate a solution (if + * possible) before the timeout has elapsed. + * @type \Google\Cloud\Optimization\V1\ShipmentModel $model + * Shipment model to solve. + * @type int $solving_mode + * By default, the solving mode is `DEFAULT_SOLVE` (0). + * @type int $search_mode + * Search mode used to solve the request. + * @type array<\Google\Cloud\Optimization\V1\ShipmentRoute>|\Google\Protobuf\Internal\RepeatedField $injected_first_solution_routes + * Guide the optimization algorithm in finding a first solution that is + * similar to a previous solution. + * The model is constrained when the first solution is built. + * Any shipments not performed on a route are implicitly skipped in the first + * solution, but they may be performed in successive solutions. + * The solution must satisfy some basic validity assumptions: + * * for all routes, `vehicle_index` must be in range and not be duplicated. + * * for all visits, `shipment_index` and `visit_request_index` must be + * in range. + * * a shipment may only be referenced on one route. + * * the pickup of a pickup-delivery shipment must be performed before + * the delivery. + * * no more than one pickup alternative or delivery alternative of + * a shipment may be performed. + * * for all routes, times are increasing (i.e., `vehicle_start_time + * <= visits[0].start_time <= visits[1].start_time ... + * <= vehicle_end_time`). + * * a shipment may only be performed on a vehicle that is allowed. A + * vehicle is allowed if + * [Shipment.allowed_vehicle_indices][google.cloud.optimization.v1.Shipment.allowed_vehicle_indices] + * is empty or its `vehicle_index` is included in + * [Shipment.allowed_vehicle_indices][google.cloud.optimization.v1.Shipment.allowed_vehicle_indices]. + * If the injected solution is not feasible, a validation error is not + * necessarily returned and an error indicating infeasibility may be returned + * instead. + * @type \Google\Cloud\Optimization\V1\InjectedSolutionConstraint $injected_solution_constraint + * Constrain the optimization algorithm to find a final solution that is + * similar to a previous solution. For example, this may be used to freeze + * portions of routes which have already been completed or which are to be + * completed but must not be modified. + * If the injected solution is not feasible, a validation error is not + * necessarily returned and an error indicating infeasibility may be returned + * instead. + * @type array<\Google\Cloud\Optimization\V1\ShipmentRoute>|\Google\Protobuf\Internal\RepeatedField $refresh_details_routes + * If non-empty, the given routes will be refreshed, without modifying their + * underlying sequence of visits or travel times: only other details will be + * updated. This does not solve the model. + * As of 2020/11, this only populates the polylines of non-empty routes and + * requires that `populate_polylines` is true. + * The `route_polyline` fields of the passed-in routes may be inconsistent + * with route `transitions`. + * This field must not be used together with `injected_first_solution_routes` + * or `injected_solution_constraint`. + * `Shipment.ignore` and `Vehicle.ignore` have no effect on the behavior. + * Polylines are still populated between all visits in all non-empty routes + * regardless of whether the related shipments or vehicles are ignored. + * @type bool $interpret_injected_solutions_using_labels + * If true: + * * uses + * [ShipmentRoute.vehicle_label][google.cloud.optimization.v1.ShipmentRoute.vehicle_label] + * instead of `vehicle_index` to + * match routes in an injected solution with vehicles in the request; + * reuses the mapping of original + * [ShipmentRoute.vehicle_index][google.cloud.optimization.v1.ShipmentRoute.vehicle_index] + * to new + * [ShipmentRoute.vehicle_index][google.cloud.optimization.v1.ShipmentRoute.vehicle_index] + * to update + * [ConstraintRelaxation.vehicle_indices][google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.vehicle_indices] + * if non-empty, but the mapping must be unambiguous (i.e., multiple + * `ShipmentRoute`s must not share the same original `vehicle_index`). + * * uses + * [ShipmentRoute.Visit.shipment_label][google.cloud.optimization.v1.ShipmentRoute.Visit.shipment_label] + * instead of `shipment_index` + * to match visits in an injected solution with shipments in the request; + * * uses + * [SkippedShipment.label][google.cloud.optimization.v1.SkippedShipment.label] + * instead of + * [SkippedShipment.index][google.cloud.optimization.v1.SkippedShipment.index] + * to + * match skipped shipments in the injected solution with request + * shipments. + * This interpretation applies to the `injected_first_solution_routes`, + * `injected_solution_constraint`, and `refresh_details_routes` fields. + * It can be used when shipment or vehicle indices in the request have + * changed since the solution was created, perhaps because shipments or + * vehicles have been removed from or added to the request. + * If true, labels in the following categories must appear at most once in + * their category: + * * [Vehicle.label][google.cloud.optimization.v1.Vehicle.label] in the + * request; + * * [Shipment.label][google.cloud.optimization.v1.Shipment.label] in the + * request; + * * [ShipmentRoute.vehicle_label][google.cloud.optimization.v1.ShipmentRoute.vehicle_label] in the injected solution; + * * [SkippedShipment.label][google.cloud.optimization.v1.SkippedShipment.label] and [ShipmentRoute.Visit.shipment_label][google.cloud.optimization.v1.ShipmentRoute.Visit.shipment_label] in + * the injected solution (except pickup/delivery visit pairs, whose + * `shipment_label` must appear twice). + * If a `vehicle_label` in the injected solution does not correspond to a + * request vehicle, the corresponding route is removed from the solution + * along with its visits. If a `shipment_label` in the injected solution does + * not correspond to a request shipment, the corresponding visit is removed + * from the solution. If a + * [SkippedShipment.label][google.cloud.optimization.v1.SkippedShipment.label] + * in the injected solution does not correspond to a request shipment, the + * `SkippedShipment` is removed from the solution. + * Removing route visits or entire routes from an injected solution may + * have an effect on the implied constraints, which may lead to change in + * solution, validation errors, or infeasibility. + * NOTE: The caller must ensure that each + * [Vehicle.label][google.cloud.optimization.v1.Vehicle.label] (resp. + * [Shipment.label][google.cloud.optimization.v1.Shipment.label]) uniquely + * identifies a vehicle (resp. shipment) entity used across the two relevant + * requests: the past request that produced the `OptimizeToursResponse` used + * in the injected solution and the current request that includes the injected + * solution. The uniqueness checks described above are not enough to guarantee + * this requirement. + * @type bool $consider_road_traffic + * Consider traffic estimation in calculating `ShipmentRoute` fields + * [Transition.travel_duration][google.cloud.optimization.v1.ShipmentRoute.Transition.travel_duration], + * [Visit.start_time][google.cloud.optimization.v1.ShipmentRoute.Visit.start_time], + * and `vehicle_end_time`; in setting the + * [ShipmentRoute.has_traffic_infeasibilities][google.cloud.optimization.v1.ShipmentRoute.has_traffic_infeasibilities] + * field, and in calculating the + * [OptimizeToursResponse.total_cost][google.cloud.optimization.v1.OptimizeToursResponse.total_cost] + * field. + * @type bool $populate_polylines + * If true, polylines will be populated in response `ShipmentRoute`s. + * @type bool $populate_transition_polylines + * If true, polylines will be populated in response + * [ShipmentRoute.transitions][google.cloud.optimization.v1.ShipmentRoute.transitions]. + * Note that in this case, the polylines will also be populated in the + * deprecated `travel_steps`. + * @type bool $allow_large_deadline_despite_interruption_risk + * If this is set, then the request can have a deadline + * (see https://grpc.io/blog/deadlines) of up to 60 minutes. + * Otherwise, the maximum deadline is only 30 minutes. + * Note that long-lived requests have a significantly larger (but still small) + * risk of interruption. + * @type bool $use_geodesic_distances + * If true, travel distances will be computed using geodesic distances instead + * of Google Maps distances, and travel times will be computed using geodesic + * distances with a speed defined by `geodesic_meters_per_second`. + * @type float $geodesic_meters_per_second + * When `use_geodesic_distances` is true, this field must be set and defines + * the speed applied to compute travel times. Its value must be at least 1.0 + * meters/seconds. + * @type int $max_validation_errors + * Truncates the number of validation errors returned. These errors are + * typically attached to an INVALID_ARGUMENT error payload as a BadRequest + * error detail (https://cloud.google.com/apis/design/errors#error_details), + * unless solving_mode=VALIDATE_ONLY: see the + * [OptimizeToursResponse.validation_errors][google.cloud.optimization.v1.OptimizeToursResponse.validation_errors] + * field. + * This defaults to 100 and is capped at 10,000. + * @type string $label + * Label that may be used to identify this request, reported back in the + * [OptimizeToursResponse.request_label][google.cloud.optimization.v1.OptimizeToursResponse.request_label]. + * @type bool $populate_travel_step_polylines + * Deprecated: Use + * [OptimizeToursRequest.populate_transition_polylines][google.cloud.optimization.v1.OptimizeToursRequest.populate_transition_polylines] + * instead. If true, polylines will be populated in response + * [ShipmentRoute.transitions][google.cloud.optimization.v1.ShipmentRoute.transitions]. + * Note that in this case, the polylines will also be populated in the + * deprecated `travel_steps`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); + parent::__construct($data); + } + + /** + * Required. Target project and location to make a call. + * Format: `projects/{project-id}/locations/{location-id}`. + * If no location is specified, a region will be chosen automatically. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Target project and location to make a call. + * Format: `projects/{project-id}/locations/{location-id}`. + * If no location is specified, a region will be chosen automatically. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * If this timeout is set, the server returns a response before the timeout + * period has elapsed or the server deadline for synchronous requests is + * reached, whichever is sooner. + * For asynchronous requests, the server will generate a solution (if + * possible) before the timeout has elapsed. + * + * Generated from protobuf field .google.protobuf.Duration timeout = 2; + * @return \Google\Protobuf\Duration|null + */ + public function getTimeout() + { + return $this->timeout; + } + + public function hasTimeout() + { + return isset($this->timeout); + } + + public function clearTimeout() + { + unset($this->timeout); + } + + /** + * If this timeout is set, the server returns a response before the timeout + * period has elapsed or the server deadline for synchronous requests is + * reached, whichever is sooner. + * For asynchronous requests, the server will generate a solution (if + * possible) before the timeout has elapsed. + * + * Generated from protobuf field .google.protobuf.Duration timeout = 2; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setTimeout($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->timeout = $var; + + return $this; + } + + /** + * Shipment model to solve. + * + * Generated from protobuf field .google.cloud.optimization.v1.ShipmentModel model = 3; + * @return \Google\Cloud\Optimization\V1\ShipmentModel|null + */ + public function getModel() + { + return $this->model; + } + + public function hasModel() + { + return isset($this->model); + } + + public function clearModel() + { + unset($this->model); + } + + /** + * Shipment model to solve. + * + * Generated from protobuf field .google.cloud.optimization.v1.ShipmentModel model = 3; + * @param \Google\Cloud\Optimization\V1\ShipmentModel $var + * @return $this + */ + public function setModel($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Optimization\V1\ShipmentModel::class); + $this->model = $var; + + return $this; + } + + /** + * By default, the solving mode is `DEFAULT_SOLVE` (0). + * + * Generated from protobuf field .google.cloud.optimization.v1.OptimizeToursRequest.SolvingMode solving_mode = 4; + * @return int + */ + public function getSolvingMode() + { + return $this->solving_mode; + } + + /** + * By default, the solving mode is `DEFAULT_SOLVE` (0). + * + * Generated from protobuf field .google.cloud.optimization.v1.OptimizeToursRequest.SolvingMode solving_mode = 4; + * @param int $var + * @return $this + */ + public function setSolvingMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Optimization\V1\OptimizeToursRequest\SolvingMode::class); + $this->solving_mode = $var; + + return $this; + } + + /** + * Search mode used to solve the request. + * + * Generated from protobuf field .google.cloud.optimization.v1.OptimizeToursRequest.SearchMode search_mode = 6; + * @return int + */ + public function getSearchMode() + { + return $this->search_mode; + } + + /** + * Search mode used to solve the request. + * + * Generated from protobuf field .google.cloud.optimization.v1.OptimizeToursRequest.SearchMode search_mode = 6; + * @param int $var + * @return $this + */ + public function setSearchMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Optimization\V1\OptimizeToursRequest\SearchMode::class); + $this->search_mode = $var; + + return $this; + } + + /** + * Guide the optimization algorithm in finding a first solution that is + * similar to a previous solution. + * The model is constrained when the first solution is built. + * Any shipments not performed on a route are implicitly skipped in the first + * solution, but they may be performed in successive solutions. + * The solution must satisfy some basic validity assumptions: + * * for all routes, `vehicle_index` must be in range and not be duplicated. + * * for all visits, `shipment_index` and `visit_request_index` must be + * in range. + * * a shipment may only be referenced on one route. + * * the pickup of a pickup-delivery shipment must be performed before + * the delivery. + * * no more than one pickup alternative or delivery alternative of + * a shipment may be performed. + * * for all routes, times are increasing (i.e., `vehicle_start_time + * <= visits[0].start_time <= visits[1].start_time ... + * <= vehicle_end_time`). + * * a shipment may only be performed on a vehicle that is allowed. A + * vehicle is allowed if + * [Shipment.allowed_vehicle_indices][google.cloud.optimization.v1.Shipment.allowed_vehicle_indices] + * is empty or its `vehicle_index` is included in + * [Shipment.allowed_vehicle_indices][google.cloud.optimization.v1.Shipment.allowed_vehicle_indices]. + * If the injected solution is not feasible, a validation error is not + * necessarily returned and an error indicating infeasibility may be returned + * instead. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.ShipmentRoute injected_first_solution_routes = 7; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getInjectedFirstSolutionRoutes() + { + return $this->injected_first_solution_routes; + } + + /** + * Guide the optimization algorithm in finding a first solution that is + * similar to a previous solution. + * The model is constrained when the first solution is built. + * Any shipments not performed on a route are implicitly skipped in the first + * solution, but they may be performed in successive solutions. + * The solution must satisfy some basic validity assumptions: + * * for all routes, `vehicle_index` must be in range and not be duplicated. + * * for all visits, `shipment_index` and `visit_request_index` must be + * in range. + * * a shipment may only be referenced on one route. + * * the pickup of a pickup-delivery shipment must be performed before + * the delivery. + * * no more than one pickup alternative or delivery alternative of + * a shipment may be performed. + * * for all routes, times are increasing (i.e., `vehicle_start_time + * <= visits[0].start_time <= visits[1].start_time ... + * <= vehicle_end_time`). + * * a shipment may only be performed on a vehicle that is allowed. A + * vehicle is allowed if + * [Shipment.allowed_vehicle_indices][google.cloud.optimization.v1.Shipment.allowed_vehicle_indices] + * is empty or its `vehicle_index` is included in + * [Shipment.allowed_vehicle_indices][google.cloud.optimization.v1.Shipment.allowed_vehicle_indices]. + * If the injected solution is not feasible, a validation error is not + * necessarily returned and an error indicating infeasibility may be returned + * instead. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.ShipmentRoute injected_first_solution_routes = 7; + * @param array<\Google\Cloud\Optimization\V1\ShipmentRoute>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setInjectedFirstSolutionRoutes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\ShipmentRoute::class); + $this->injected_first_solution_routes = $arr; + + return $this; + } + + /** + * Constrain the optimization algorithm to find a final solution that is + * similar to a previous solution. For example, this may be used to freeze + * portions of routes which have already been completed or which are to be + * completed but must not be modified. + * If the injected solution is not feasible, a validation error is not + * necessarily returned and an error indicating infeasibility may be returned + * instead. + * + * Generated from protobuf field .google.cloud.optimization.v1.InjectedSolutionConstraint injected_solution_constraint = 8; + * @return \Google\Cloud\Optimization\V1\InjectedSolutionConstraint|null + */ + public function getInjectedSolutionConstraint() + { + return $this->injected_solution_constraint; + } + + public function hasInjectedSolutionConstraint() + { + return isset($this->injected_solution_constraint); + } + + public function clearInjectedSolutionConstraint() + { + unset($this->injected_solution_constraint); + } + + /** + * Constrain the optimization algorithm to find a final solution that is + * similar to a previous solution. For example, this may be used to freeze + * portions of routes which have already been completed or which are to be + * completed but must not be modified. + * If the injected solution is not feasible, a validation error is not + * necessarily returned and an error indicating infeasibility may be returned + * instead. + * + * Generated from protobuf field .google.cloud.optimization.v1.InjectedSolutionConstraint injected_solution_constraint = 8; + * @param \Google\Cloud\Optimization\V1\InjectedSolutionConstraint $var + * @return $this + */ + public function setInjectedSolutionConstraint($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Optimization\V1\InjectedSolutionConstraint::class); + $this->injected_solution_constraint = $var; + + return $this; + } + + /** + * If non-empty, the given routes will be refreshed, without modifying their + * underlying sequence of visits or travel times: only other details will be + * updated. This does not solve the model. + * As of 2020/11, this only populates the polylines of non-empty routes and + * requires that `populate_polylines` is true. + * The `route_polyline` fields of the passed-in routes may be inconsistent + * with route `transitions`. + * This field must not be used together with `injected_first_solution_routes` + * or `injected_solution_constraint`. + * `Shipment.ignore` and `Vehicle.ignore` have no effect on the behavior. + * Polylines are still populated between all visits in all non-empty routes + * regardless of whether the related shipments or vehicles are ignored. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.ShipmentRoute refresh_details_routes = 9; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRefreshDetailsRoutes() + { + return $this->refresh_details_routes; + } + + /** + * If non-empty, the given routes will be refreshed, without modifying their + * underlying sequence of visits or travel times: only other details will be + * updated. This does not solve the model. + * As of 2020/11, this only populates the polylines of non-empty routes and + * requires that `populate_polylines` is true. + * The `route_polyline` fields of the passed-in routes may be inconsistent + * with route `transitions`. + * This field must not be used together with `injected_first_solution_routes` + * or `injected_solution_constraint`. + * `Shipment.ignore` and `Vehicle.ignore` have no effect on the behavior. + * Polylines are still populated between all visits in all non-empty routes + * regardless of whether the related shipments or vehicles are ignored. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.ShipmentRoute refresh_details_routes = 9; + * @param array<\Google\Cloud\Optimization\V1\ShipmentRoute>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRefreshDetailsRoutes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\ShipmentRoute::class); + $this->refresh_details_routes = $arr; + + return $this; + } + + /** + * If true: + * * uses + * [ShipmentRoute.vehicle_label][google.cloud.optimization.v1.ShipmentRoute.vehicle_label] + * instead of `vehicle_index` to + * match routes in an injected solution with vehicles in the request; + * reuses the mapping of original + * [ShipmentRoute.vehicle_index][google.cloud.optimization.v1.ShipmentRoute.vehicle_index] + * to new + * [ShipmentRoute.vehicle_index][google.cloud.optimization.v1.ShipmentRoute.vehicle_index] + * to update + * [ConstraintRelaxation.vehicle_indices][google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.vehicle_indices] + * if non-empty, but the mapping must be unambiguous (i.e., multiple + * `ShipmentRoute`s must not share the same original `vehicle_index`). + * * uses + * [ShipmentRoute.Visit.shipment_label][google.cloud.optimization.v1.ShipmentRoute.Visit.shipment_label] + * instead of `shipment_index` + * to match visits in an injected solution with shipments in the request; + * * uses + * [SkippedShipment.label][google.cloud.optimization.v1.SkippedShipment.label] + * instead of + * [SkippedShipment.index][google.cloud.optimization.v1.SkippedShipment.index] + * to + * match skipped shipments in the injected solution with request + * shipments. + * This interpretation applies to the `injected_first_solution_routes`, + * `injected_solution_constraint`, and `refresh_details_routes` fields. + * It can be used when shipment or vehicle indices in the request have + * changed since the solution was created, perhaps because shipments or + * vehicles have been removed from or added to the request. + * If true, labels in the following categories must appear at most once in + * their category: + * * [Vehicle.label][google.cloud.optimization.v1.Vehicle.label] in the + * request; + * * [Shipment.label][google.cloud.optimization.v1.Shipment.label] in the + * request; + * * [ShipmentRoute.vehicle_label][google.cloud.optimization.v1.ShipmentRoute.vehicle_label] in the injected solution; + * * [SkippedShipment.label][google.cloud.optimization.v1.SkippedShipment.label] and [ShipmentRoute.Visit.shipment_label][google.cloud.optimization.v1.ShipmentRoute.Visit.shipment_label] in + * the injected solution (except pickup/delivery visit pairs, whose + * `shipment_label` must appear twice). + * If a `vehicle_label` in the injected solution does not correspond to a + * request vehicle, the corresponding route is removed from the solution + * along with its visits. If a `shipment_label` in the injected solution does + * not correspond to a request shipment, the corresponding visit is removed + * from the solution. If a + * [SkippedShipment.label][google.cloud.optimization.v1.SkippedShipment.label] + * in the injected solution does not correspond to a request shipment, the + * `SkippedShipment` is removed from the solution. + * Removing route visits or entire routes from an injected solution may + * have an effect on the implied constraints, which may lead to change in + * solution, validation errors, or infeasibility. + * NOTE: The caller must ensure that each + * [Vehicle.label][google.cloud.optimization.v1.Vehicle.label] (resp. + * [Shipment.label][google.cloud.optimization.v1.Shipment.label]) uniquely + * identifies a vehicle (resp. shipment) entity used across the two relevant + * requests: the past request that produced the `OptimizeToursResponse` used + * in the injected solution and the current request that includes the injected + * solution. The uniqueness checks described above are not enough to guarantee + * this requirement. + * + * Generated from protobuf field bool interpret_injected_solutions_using_labels = 10; + * @return bool + */ + public function getInterpretInjectedSolutionsUsingLabels() + { + return $this->interpret_injected_solutions_using_labels; + } + + /** + * If true: + * * uses + * [ShipmentRoute.vehicle_label][google.cloud.optimization.v1.ShipmentRoute.vehicle_label] + * instead of `vehicle_index` to + * match routes in an injected solution with vehicles in the request; + * reuses the mapping of original + * [ShipmentRoute.vehicle_index][google.cloud.optimization.v1.ShipmentRoute.vehicle_index] + * to new + * [ShipmentRoute.vehicle_index][google.cloud.optimization.v1.ShipmentRoute.vehicle_index] + * to update + * [ConstraintRelaxation.vehicle_indices][google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.vehicle_indices] + * if non-empty, but the mapping must be unambiguous (i.e., multiple + * `ShipmentRoute`s must not share the same original `vehicle_index`). + * * uses + * [ShipmentRoute.Visit.shipment_label][google.cloud.optimization.v1.ShipmentRoute.Visit.shipment_label] + * instead of `shipment_index` + * to match visits in an injected solution with shipments in the request; + * * uses + * [SkippedShipment.label][google.cloud.optimization.v1.SkippedShipment.label] + * instead of + * [SkippedShipment.index][google.cloud.optimization.v1.SkippedShipment.index] + * to + * match skipped shipments in the injected solution with request + * shipments. + * This interpretation applies to the `injected_first_solution_routes`, + * `injected_solution_constraint`, and `refresh_details_routes` fields. + * It can be used when shipment or vehicle indices in the request have + * changed since the solution was created, perhaps because shipments or + * vehicles have been removed from or added to the request. + * If true, labels in the following categories must appear at most once in + * their category: + * * [Vehicle.label][google.cloud.optimization.v1.Vehicle.label] in the + * request; + * * [Shipment.label][google.cloud.optimization.v1.Shipment.label] in the + * request; + * * [ShipmentRoute.vehicle_label][google.cloud.optimization.v1.ShipmentRoute.vehicle_label] in the injected solution; + * * [SkippedShipment.label][google.cloud.optimization.v1.SkippedShipment.label] and [ShipmentRoute.Visit.shipment_label][google.cloud.optimization.v1.ShipmentRoute.Visit.shipment_label] in + * the injected solution (except pickup/delivery visit pairs, whose + * `shipment_label` must appear twice). + * If a `vehicle_label` in the injected solution does not correspond to a + * request vehicle, the corresponding route is removed from the solution + * along with its visits. If a `shipment_label` in the injected solution does + * not correspond to a request shipment, the corresponding visit is removed + * from the solution. If a + * [SkippedShipment.label][google.cloud.optimization.v1.SkippedShipment.label] + * in the injected solution does not correspond to a request shipment, the + * `SkippedShipment` is removed from the solution. + * Removing route visits or entire routes from an injected solution may + * have an effect on the implied constraints, which may lead to change in + * solution, validation errors, or infeasibility. + * NOTE: The caller must ensure that each + * [Vehicle.label][google.cloud.optimization.v1.Vehicle.label] (resp. + * [Shipment.label][google.cloud.optimization.v1.Shipment.label]) uniquely + * identifies a vehicle (resp. shipment) entity used across the two relevant + * requests: the past request that produced the `OptimizeToursResponse` used + * in the injected solution and the current request that includes the injected + * solution. The uniqueness checks described above are not enough to guarantee + * this requirement. + * + * Generated from protobuf field bool interpret_injected_solutions_using_labels = 10; + * @param bool $var + * @return $this + */ + public function setInterpretInjectedSolutionsUsingLabels($var) + { + GPBUtil::checkBool($var); + $this->interpret_injected_solutions_using_labels = $var; + + return $this; + } + + /** + * Consider traffic estimation in calculating `ShipmentRoute` fields + * [Transition.travel_duration][google.cloud.optimization.v1.ShipmentRoute.Transition.travel_duration], + * [Visit.start_time][google.cloud.optimization.v1.ShipmentRoute.Visit.start_time], + * and `vehicle_end_time`; in setting the + * [ShipmentRoute.has_traffic_infeasibilities][google.cloud.optimization.v1.ShipmentRoute.has_traffic_infeasibilities] + * field, and in calculating the + * [OptimizeToursResponse.total_cost][google.cloud.optimization.v1.OptimizeToursResponse.total_cost] + * field. + * + * Generated from protobuf field bool consider_road_traffic = 11; + * @return bool + */ + public function getConsiderRoadTraffic() + { + return $this->consider_road_traffic; + } + + /** + * Consider traffic estimation in calculating `ShipmentRoute` fields + * [Transition.travel_duration][google.cloud.optimization.v1.ShipmentRoute.Transition.travel_duration], + * [Visit.start_time][google.cloud.optimization.v1.ShipmentRoute.Visit.start_time], + * and `vehicle_end_time`; in setting the + * [ShipmentRoute.has_traffic_infeasibilities][google.cloud.optimization.v1.ShipmentRoute.has_traffic_infeasibilities] + * field, and in calculating the + * [OptimizeToursResponse.total_cost][google.cloud.optimization.v1.OptimizeToursResponse.total_cost] + * field. + * + * Generated from protobuf field bool consider_road_traffic = 11; + * @param bool $var + * @return $this + */ + public function setConsiderRoadTraffic($var) + { + GPBUtil::checkBool($var); + $this->consider_road_traffic = $var; + + return $this; + } + + /** + * If true, polylines will be populated in response `ShipmentRoute`s. + * + * Generated from protobuf field bool populate_polylines = 12; + * @return bool + */ + public function getPopulatePolylines() + { + return $this->populate_polylines; + } + + /** + * If true, polylines will be populated in response `ShipmentRoute`s. + * + * Generated from protobuf field bool populate_polylines = 12; + * @param bool $var + * @return $this + */ + public function setPopulatePolylines($var) + { + GPBUtil::checkBool($var); + $this->populate_polylines = $var; + + return $this; + } + + /** + * If true, polylines will be populated in response + * [ShipmentRoute.transitions][google.cloud.optimization.v1.ShipmentRoute.transitions]. + * Note that in this case, the polylines will also be populated in the + * deprecated `travel_steps`. + * + * Generated from protobuf field bool populate_transition_polylines = 13; + * @return bool + */ + public function getPopulateTransitionPolylines() + { + return $this->populate_transition_polylines; + } + + /** + * If true, polylines will be populated in response + * [ShipmentRoute.transitions][google.cloud.optimization.v1.ShipmentRoute.transitions]. + * Note that in this case, the polylines will also be populated in the + * deprecated `travel_steps`. + * + * Generated from protobuf field bool populate_transition_polylines = 13; + * @param bool $var + * @return $this + */ + public function setPopulateTransitionPolylines($var) + { + GPBUtil::checkBool($var); + $this->populate_transition_polylines = $var; + + return $this; + } + + /** + * If this is set, then the request can have a deadline + * (see https://grpc.io/blog/deadlines) of up to 60 minutes. + * Otherwise, the maximum deadline is only 30 minutes. + * Note that long-lived requests have a significantly larger (but still small) + * risk of interruption. + * + * Generated from protobuf field bool allow_large_deadline_despite_interruption_risk = 14; + * @return bool + */ + public function getAllowLargeDeadlineDespiteInterruptionRisk() + { + return $this->allow_large_deadline_despite_interruption_risk; + } + + /** + * If this is set, then the request can have a deadline + * (see https://grpc.io/blog/deadlines) of up to 60 minutes. + * Otherwise, the maximum deadline is only 30 minutes. + * Note that long-lived requests have a significantly larger (but still small) + * risk of interruption. + * + * Generated from protobuf field bool allow_large_deadline_despite_interruption_risk = 14; + * @param bool $var + * @return $this + */ + public function setAllowLargeDeadlineDespiteInterruptionRisk($var) + { + GPBUtil::checkBool($var); + $this->allow_large_deadline_despite_interruption_risk = $var; + + return $this; + } + + /** + * If true, travel distances will be computed using geodesic distances instead + * of Google Maps distances, and travel times will be computed using geodesic + * distances with a speed defined by `geodesic_meters_per_second`. + * + * Generated from protobuf field bool use_geodesic_distances = 15; + * @return bool + */ + public function getUseGeodesicDistances() + { + return $this->use_geodesic_distances; + } + + /** + * If true, travel distances will be computed using geodesic distances instead + * of Google Maps distances, and travel times will be computed using geodesic + * distances with a speed defined by `geodesic_meters_per_second`. + * + * Generated from protobuf field bool use_geodesic_distances = 15; + * @param bool $var + * @return $this + */ + public function setUseGeodesicDistances($var) + { + GPBUtil::checkBool($var); + $this->use_geodesic_distances = $var; + + return $this; + } + + /** + * When `use_geodesic_distances` is true, this field must be set and defines + * the speed applied to compute travel times. Its value must be at least 1.0 + * meters/seconds. + * + * Generated from protobuf field optional double geodesic_meters_per_second = 16; + * @return float + */ + public function getGeodesicMetersPerSecond() + { + return isset($this->geodesic_meters_per_second) ? $this->geodesic_meters_per_second : 0.0; + } + + public function hasGeodesicMetersPerSecond() + { + return isset($this->geodesic_meters_per_second); + } + + public function clearGeodesicMetersPerSecond() + { + unset($this->geodesic_meters_per_second); + } + + /** + * When `use_geodesic_distances` is true, this field must be set and defines + * the speed applied to compute travel times. Its value must be at least 1.0 + * meters/seconds. + * + * Generated from protobuf field optional double geodesic_meters_per_second = 16; + * @param float $var + * @return $this + */ + public function setGeodesicMetersPerSecond($var) + { + GPBUtil::checkDouble($var); + $this->geodesic_meters_per_second = $var; + + return $this; + } + + /** + * Truncates the number of validation errors returned. These errors are + * typically attached to an INVALID_ARGUMENT error payload as a BadRequest + * error detail (https://cloud.google.com/apis/design/errors#error_details), + * unless solving_mode=VALIDATE_ONLY: see the + * [OptimizeToursResponse.validation_errors][google.cloud.optimization.v1.OptimizeToursResponse.validation_errors] + * field. + * This defaults to 100 and is capped at 10,000. + * + * Generated from protobuf field optional int32 max_validation_errors = 5; + * @return int + */ + public function getMaxValidationErrors() + { + return isset($this->max_validation_errors) ? $this->max_validation_errors : 0; + } + + public function hasMaxValidationErrors() + { + return isset($this->max_validation_errors); + } + + public function clearMaxValidationErrors() + { + unset($this->max_validation_errors); + } + + /** + * Truncates the number of validation errors returned. These errors are + * typically attached to an INVALID_ARGUMENT error payload as a BadRequest + * error detail (https://cloud.google.com/apis/design/errors#error_details), + * unless solving_mode=VALIDATE_ONLY: see the + * [OptimizeToursResponse.validation_errors][google.cloud.optimization.v1.OptimizeToursResponse.validation_errors] + * field. + * This defaults to 100 and is capped at 10,000. + * + * Generated from protobuf field optional int32 max_validation_errors = 5; + * @param int $var + * @return $this + */ + public function setMaxValidationErrors($var) + { + GPBUtil::checkInt32($var); + $this->max_validation_errors = $var; + + return $this; + } + + /** + * Label that may be used to identify this request, reported back in the + * [OptimizeToursResponse.request_label][google.cloud.optimization.v1.OptimizeToursResponse.request_label]. + * + * Generated from protobuf field string label = 17; + * @return string + */ + public function getLabel() + { + return $this->label; + } + + /** + * Label that may be used to identify this request, reported back in the + * [OptimizeToursResponse.request_label][google.cloud.optimization.v1.OptimizeToursResponse.request_label]. + * + * Generated from protobuf field string label = 17; + * @param string $var + * @return $this + */ + public function setLabel($var) + { + GPBUtil::checkString($var, True); + $this->label = $var; + + return $this; + } + + /** + * Deprecated: Use + * [OptimizeToursRequest.populate_transition_polylines][google.cloud.optimization.v1.OptimizeToursRequest.populate_transition_polylines] + * instead. If true, polylines will be populated in response + * [ShipmentRoute.transitions][google.cloud.optimization.v1.ShipmentRoute.transitions]. + * Note that in this case, the polylines will also be populated in the + * deprecated `travel_steps`. + * + * Generated from protobuf field bool populate_travel_step_polylines = 20 [deprecated = true]; + * @return bool + * @deprecated + */ + public function getPopulateTravelStepPolylines() + { + @trigger_error('populate_travel_step_polylines is deprecated.', E_USER_DEPRECATED); + return $this->populate_travel_step_polylines; + } + + /** + * Deprecated: Use + * [OptimizeToursRequest.populate_transition_polylines][google.cloud.optimization.v1.OptimizeToursRequest.populate_transition_polylines] + * instead. If true, polylines will be populated in response + * [ShipmentRoute.transitions][google.cloud.optimization.v1.ShipmentRoute.transitions]. + * Note that in this case, the polylines will also be populated in the + * deprecated `travel_steps`. + * + * Generated from protobuf field bool populate_travel_step_polylines = 20 [deprecated = true]; + * @param bool $var + * @return $this + * @deprecated + */ + public function setPopulateTravelStepPolylines($var) + { + @trigger_error('populate_travel_step_polylines is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkBool($var); + $this->populate_travel_step_polylines = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/OptimizeToursRequest/SearchMode.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/OptimizeToursRequest/SearchMode.php new file mode 100644 index 000000000000..45c8c781f948 --- /dev/null +++ b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/OptimizeToursRequest/SearchMode.php @@ -0,0 +1,65 @@ +google.cloud.optimization.v1.OptimizeToursRequest.SearchMode + */ +class SearchMode +{ + /** + * Unspecified search mode, equivalent to `RETURN_FAST`. + * + * Generated from protobuf enum SEARCH_MODE_UNSPECIFIED = 0; + */ + const SEARCH_MODE_UNSPECIFIED = 0; + /** + * Stop the search after finding the first good solution. + * + * Generated from protobuf enum RETURN_FAST = 1; + */ + const RETURN_FAST = 1; + /** + * Spend all the available time to search for better solutions. + * + * Generated from protobuf enum CONSUME_ALL_AVAILABLE_TIME = 2; + */ + const CONSUME_ALL_AVAILABLE_TIME = 2; + + private static $valueToName = [ + self::SEARCH_MODE_UNSPECIFIED => 'SEARCH_MODE_UNSPECIFIED', + self::RETURN_FAST => 'RETURN_FAST', + self::CONSUME_ALL_AVAILABLE_TIME => 'CONSUME_ALL_AVAILABLE_TIME', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SearchMode::class, \Google\Cloud\Optimization\V1\OptimizeToursRequest_SearchMode::class); + diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/OptimizeToursRequest/SolvingMode.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/OptimizeToursRequest/SolvingMode.php new file mode 100644 index 000000000000..432442abb9eb --- /dev/null +++ b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/OptimizeToursRequest/SolvingMode.php @@ -0,0 +1,83 @@ +google.cloud.optimization.v1.OptimizeToursRequest.SolvingMode + */ +class SolvingMode +{ + /** + * Solve the model. + * + * Generated from protobuf enum DEFAULT_SOLVE = 0; + */ + const DEFAULT_SOLVE = 0; + /** + * Only validates the model without solving it: populates as many + * [OptimizeToursResponse.validation_errors][google.cloud.optimization.v1.OptimizeToursResponse.validation_errors] + * as possible. + * + * Generated from protobuf enum VALIDATE_ONLY = 1; + */ + const VALIDATE_ONLY = 1; + /** + * Only populates + * [OptimizeToursResponse.validation_errors][google.cloud.optimization.v1.OptimizeToursResponse.validation_errors] + * or + * [OptimizeToursResponse.skipped_shipments][google.cloud.optimization.v1.OptimizeToursResponse.skipped_shipments], + * and doesn't actually solve the rest of the request (`status` and `routes` + * are unset in the response). + * If infeasibilities in `injected_solution_constraint` routes are detected + * they are populated in the + * [OptimizeToursResponse.validation_errors][google.cloud.optimization.v1.OptimizeToursResponse.validation_errors] + * field and + * [OptimizeToursResponse.skipped_shipments][google.cloud.optimization.v1.OptimizeToursResponse.skipped_shipments] + * is left empty. + * *IMPORTANT*: not all infeasible shipments are returned here, but only the + * ones that are detected as infeasible during preprocessing. + * + * Generated from protobuf enum DETECT_SOME_INFEASIBLE_SHIPMENTS = 2; + */ + const DETECT_SOME_INFEASIBLE_SHIPMENTS = 2; + + private static $valueToName = [ + self::DEFAULT_SOLVE => 'DEFAULT_SOLVE', + self::VALIDATE_ONLY => 'VALIDATE_ONLY', + self::DETECT_SOME_INFEASIBLE_SHIPMENTS => 'DETECT_SOME_INFEASIBLE_SHIPMENTS', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SolvingMode::class, \Google\Cloud\Optimization\V1\OptimizeToursRequest_SolvingMode::class); + diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/OptimizeToursResponse.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/OptimizeToursResponse.php new file mode 100644 index 000000000000..14b27b295c28 --- /dev/null +++ b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/OptimizeToursResponse.php @@ -0,0 +1,294 @@ +google.cloud.optimization.v1.OptimizeToursResponse + */ +class OptimizeToursResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Routes computed for each vehicle; the i-th route corresponds to the i-th + * vehicle in the model. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.ShipmentRoute routes = 1; + */ + private $routes; + /** + * Copy of the + * [OptimizeToursRequest.label][google.cloud.optimization.v1.OptimizeToursRequest.label], + * if a label was specified in the request. + * + * Generated from protobuf field string request_label = 3; + */ + protected $request_label = ''; + /** + * The list of all shipments skipped. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.SkippedShipment skipped_shipments = 4; + */ + private $skipped_shipments; + /** + * List of all the validation errors that we were able to detect + * independently. See the "MULTIPLE ERRORS" explanation for the + * [OptimizeToursValidationError][google.cloud.optimization.v1.OptimizeToursValidationError] + * message. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.OptimizeToursValidationError validation_errors = 5; + */ + private $validation_errors; + /** + * Duration, distance and usage metrics for this solution. + * + * Generated from protobuf field .google.cloud.optimization.v1.OptimizeToursResponse.Metrics metrics = 6; + */ + protected $metrics = null; + /** + * Deprecated: Use + * [Metrics.total_cost][google.cloud.optimization.v1.OptimizeToursResponse.Metrics.total_cost] + * instead. Total cost of the solution. This takes into account all costs: + * costs per per hour and travel hour, fixed vehicle costs, unperformed + * shipment penalty costs, global duration cost, etc. + * + * Generated from protobuf field double total_cost = 2 [deprecated = true]; + * @deprecated + */ + protected $total_cost = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Optimization\V1\ShipmentRoute>|\Google\Protobuf\Internal\RepeatedField $routes + * Routes computed for each vehicle; the i-th route corresponds to the i-th + * vehicle in the model. + * @type string $request_label + * Copy of the + * [OptimizeToursRequest.label][google.cloud.optimization.v1.OptimizeToursRequest.label], + * if a label was specified in the request. + * @type array<\Google\Cloud\Optimization\V1\SkippedShipment>|\Google\Protobuf\Internal\RepeatedField $skipped_shipments + * The list of all shipments skipped. + * @type array<\Google\Cloud\Optimization\V1\OptimizeToursValidationError>|\Google\Protobuf\Internal\RepeatedField $validation_errors + * List of all the validation errors that we were able to detect + * independently. See the "MULTIPLE ERRORS" explanation for the + * [OptimizeToursValidationError][google.cloud.optimization.v1.OptimizeToursValidationError] + * message. + * @type \Google\Cloud\Optimization\V1\OptimizeToursResponse\Metrics $metrics + * Duration, distance and usage metrics for this solution. + * @type float $total_cost + * Deprecated: Use + * [Metrics.total_cost][google.cloud.optimization.v1.OptimizeToursResponse.Metrics.total_cost] + * instead. Total cost of the solution. This takes into account all costs: + * costs per per hour and travel hour, fixed vehicle costs, unperformed + * shipment penalty costs, global duration cost, etc. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); + parent::__construct($data); + } + + /** + * Routes computed for each vehicle; the i-th route corresponds to the i-th + * vehicle in the model. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.ShipmentRoute routes = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRoutes() + { + return $this->routes; + } + + /** + * Routes computed for each vehicle; the i-th route corresponds to the i-th + * vehicle in the model. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.ShipmentRoute routes = 1; + * @param array<\Google\Cloud\Optimization\V1\ShipmentRoute>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRoutes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\ShipmentRoute::class); + $this->routes = $arr; + + return $this; + } + + /** + * Copy of the + * [OptimizeToursRequest.label][google.cloud.optimization.v1.OptimizeToursRequest.label], + * if a label was specified in the request. + * + * Generated from protobuf field string request_label = 3; + * @return string + */ + public function getRequestLabel() + { + return $this->request_label; + } + + /** + * Copy of the + * [OptimizeToursRequest.label][google.cloud.optimization.v1.OptimizeToursRequest.label], + * if a label was specified in the request. + * + * Generated from protobuf field string request_label = 3; + * @param string $var + * @return $this + */ + public function setRequestLabel($var) + { + GPBUtil::checkString($var, True); + $this->request_label = $var; + + return $this; + } + + /** + * The list of all shipments skipped. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.SkippedShipment skipped_shipments = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSkippedShipments() + { + return $this->skipped_shipments; + } + + /** + * The list of all shipments skipped. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.SkippedShipment skipped_shipments = 4; + * @param array<\Google\Cloud\Optimization\V1\SkippedShipment>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSkippedShipments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\SkippedShipment::class); + $this->skipped_shipments = $arr; + + return $this; + } + + /** + * List of all the validation errors that we were able to detect + * independently. See the "MULTIPLE ERRORS" explanation for the + * [OptimizeToursValidationError][google.cloud.optimization.v1.OptimizeToursValidationError] + * message. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.OptimizeToursValidationError validation_errors = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getValidationErrors() + { + return $this->validation_errors; + } + + /** + * List of all the validation errors that we were able to detect + * independently. See the "MULTIPLE ERRORS" explanation for the + * [OptimizeToursValidationError][google.cloud.optimization.v1.OptimizeToursValidationError] + * message. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.OptimizeToursValidationError validation_errors = 5; + * @param array<\Google\Cloud\Optimization\V1\OptimizeToursValidationError>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setValidationErrors($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\OptimizeToursValidationError::class); + $this->validation_errors = $arr; + + return $this; + } + + /** + * Duration, distance and usage metrics for this solution. + * + * Generated from protobuf field .google.cloud.optimization.v1.OptimizeToursResponse.Metrics metrics = 6; + * @return \Google\Cloud\Optimization\V1\OptimizeToursResponse\Metrics|null + */ + public function getMetrics() + { + return $this->metrics; + } + + public function hasMetrics() + { + return isset($this->metrics); + } + + public function clearMetrics() + { + unset($this->metrics); + } + + /** + * Duration, distance and usage metrics for this solution. + * + * Generated from protobuf field .google.cloud.optimization.v1.OptimizeToursResponse.Metrics metrics = 6; + * @param \Google\Cloud\Optimization\V1\OptimizeToursResponse\Metrics $var + * @return $this + */ + public function setMetrics($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Optimization\V1\OptimizeToursResponse\Metrics::class); + $this->metrics = $var; + + return $this; + } + + /** + * Deprecated: Use + * [Metrics.total_cost][google.cloud.optimization.v1.OptimizeToursResponse.Metrics.total_cost] + * instead. Total cost of the solution. This takes into account all costs: + * costs per per hour and travel hour, fixed vehicle costs, unperformed + * shipment penalty costs, global duration cost, etc. + * + * Generated from protobuf field double total_cost = 2 [deprecated = true]; + * @return float + * @deprecated + */ + public function getTotalCost() + { + @trigger_error('total_cost is deprecated.', E_USER_DEPRECATED); + return $this->total_cost; + } + + /** + * Deprecated: Use + * [Metrics.total_cost][google.cloud.optimization.v1.OptimizeToursResponse.Metrics.total_cost] + * instead. Total cost of the solution. This takes into account all costs: + * costs per per hour and travel hour, fixed vehicle costs, unperformed + * shipment penalty costs, global duration cost, etc. + * + * Generated from protobuf field double total_cost = 2 [deprecated = true]; + * @param float $var + * @return $this + * @deprecated + */ + public function setTotalCost($var) + { + @trigger_error('total_cost is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkDouble($var); + $this->total_cost = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/OptimizeToursResponse/Metrics.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/OptimizeToursResponse/Metrics.php new file mode 100644 index 000000000000..b4e2c006dd75 --- /dev/null +++ b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/OptimizeToursResponse/Metrics.php @@ -0,0 +1,372 @@ +google.cloud.optimization.v1.OptimizeToursResponse.Metrics + */ +class Metrics extends \Google\Protobuf\Internal\Message +{ + /** + * Aggregated over the routes. Each metric is the sum (or max, for loads) + * over all + * [ShipmentRoute.metrics][google.cloud.optimization.v1.ShipmentRoute.metrics] + * fields of the same name. + * + * Generated from protobuf field .google.cloud.optimization.v1.AggregatedMetrics aggregated_route_metrics = 1; + */ + protected $aggregated_route_metrics = null; + /** + * Number of mandatory shipments skipped. + * + * Generated from protobuf field int32 skipped_mandatory_shipment_count = 2; + */ + protected $skipped_mandatory_shipment_count = 0; + /** + * Number of vehicles used. Note: if a vehicle route is empty and + * [Vehicle.used_if_route_is_empty][google.cloud.optimization.v1.Vehicle.used_if_route_is_empty] + * is true, the vehicle is considered used. + * + * Generated from protobuf field int32 used_vehicle_count = 3; + */ + protected $used_vehicle_count = 0; + /** + * The earliest start time for a used vehicle, computed as the minimum over + * all used vehicles of + * [ShipmentRoute.vehicle_start_time][google.cloud.optimization.v1.ShipmentRoute.vehicle_start_time]. + * + * Generated from protobuf field .google.protobuf.Timestamp earliest_vehicle_start_time = 4; + */ + protected $earliest_vehicle_start_time = null; + /** + * The latest end time for a used vehicle, computed as the maximum over all + * used vehicles of + * [ShipmentRoute.vehicle_end_time][google.cloud.optimization.v1.ShipmentRoute.vehicle_end_time]. + * + * Generated from protobuf field .google.protobuf.Timestamp latest_vehicle_end_time = 5; + */ + protected $latest_vehicle_end_time = null; + /** + * Cost of the solution, broken down by cost-related request fields. + * The keys are proto paths, relative to the input OptimizeToursRequest, + * e.g. "model.shipments.pickups.cost", and the values are the total cost + * generated by the corresponding cost field, aggregated over the whole + * solution. In other words, costs["model.shipments.pickups.cost"] is the + * sum of all pickup costs over the solution. All costs defined in the model + * are reported in detail here with the exception of costs related to + * TransitionAttributes that are only reported in an aggregated way as of + * 2022/01. + * + * Generated from protobuf field map costs = 10; + */ + private $costs; + /** + * Total cost of the solution. The sum of all values in the costs map. + * + * Generated from protobuf field double total_cost = 6; + */ + protected $total_cost = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Optimization\V1\AggregatedMetrics $aggregated_route_metrics + * Aggregated over the routes. Each metric is the sum (or max, for loads) + * over all + * [ShipmentRoute.metrics][google.cloud.optimization.v1.ShipmentRoute.metrics] + * fields of the same name. + * @type int $skipped_mandatory_shipment_count + * Number of mandatory shipments skipped. + * @type int $used_vehicle_count + * Number of vehicles used. Note: if a vehicle route is empty and + * [Vehicle.used_if_route_is_empty][google.cloud.optimization.v1.Vehicle.used_if_route_is_empty] + * is true, the vehicle is considered used. + * @type \Google\Protobuf\Timestamp $earliest_vehicle_start_time + * The earliest start time for a used vehicle, computed as the minimum over + * all used vehicles of + * [ShipmentRoute.vehicle_start_time][google.cloud.optimization.v1.ShipmentRoute.vehicle_start_time]. + * @type \Google\Protobuf\Timestamp $latest_vehicle_end_time + * The latest end time for a used vehicle, computed as the maximum over all + * used vehicles of + * [ShipmentRoute.vehicle_end_time][google.cloud.optimization.v1.ShipmentRoute.vehicle_end_time]. + * @type array|\Google\Protobuf\Internal\MapField $costs + * Cost of the solution, broken down by cost-related request fields. + * The keys are proto paths, relative to the input OptimizeToursRequest, + * e.g. "model.shipments.pickups.cost", and the values are the total cost + * generated by the corresponding cost field, aggregated over the whole + * solution. In other words, costs["model.shipments.pickups.cost"] is the + * sum of all pickup costs over the solution. All costs defined in the model + * are reported in detail here with the exception of costs related to + * TransitionAttributes that are only reported in an aggregated way as of + * 2022/01. + * @type float $total_cost + * Total cost of the solution. The sum of all values in the costs map. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); + parent::__construct($data); + } + + /** + * Aggregated over the routes. Each metric is the sum (or max, for loads) + * over all + * [ShipmentRoute.metrics][google.cloud.optimization.v1.ShipmentRoute.metrics] + * fields of the same name. + * + * Generated from protobuf field .google.cloud.optimization.v1.AggregatedMetrics aggregated_route_metrics = 1; + * @return \Google\Cloud\Optimization\V1\AggregatedMetrics|null + */ + public function getAggregatedRouteMetrics() + { + return $this->aggregated_route_metrics; + } + + public function hasAggregatedRouteMetrics() + { + return isset($this->aggregated_route_metrics); + } + + public function clearAggregatedRouteMetrics() + { + unset($this->aggregated_route_metrics); + } + + /** + * Aggregated over the routes. Each metric is the sum (or max, for loads) + * over all + * [ShipmentRoute.metrics][google.cloud.optimization.v1.ShipmentRoute.metrics] + * fields of the same name. + * + * Generated from protobuf field .google.cloud.optimization.v1.AggregatedMetrics aggregated_route_metrics = 1; + * @param \Google\Cloud\Optimization\V1\AggregatedMetrics $var + * @return $this + */ + public function setAggregatedRouteMetrics($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Optimization\V1\AggregatedMetrics::class); + $this->aggregated_route_metrics = $var; + + return $this; + } + + /** + * Number of mandatory shipments skipped. + * + * Generated from protobuf field int32 skipped_mandatory_shipment_count = 2; + * @return int + */ + public function getSkippedMandatoryShipmentCount() + { + return $this->skipped_mandatory_shipment_count; + } + + /** + * Number of mandatory shipments skipped. + * + * Generated from protobuf field int32 skipped_mandatory_shipment_count = 2; + * @param int $var + * @return $this + */ + public function setSkippedMandatoryShipmentCount($var) + { + GPBUtil::checkInt32($var); + $this->skipped_mandatory_shipment_count = $var; + + return $this; + } + + /** + * Number of vehicles used. Note: if a vehicle route is empty and + * [Vehicle.used_if_route_is_empty][google.cloud.optimization.v1.Vehicle.used_if_route_is_empty] + * is true, the vehicle is considered used. + * + * Generated from protobuf field int32 used_vehicle_count = 3; + * @return int + */ + public function getUsedVehicleCount() + { + return $this->used_vehicle_count; + } + + /** + * Number of vehicles used. Note: if a vehicle route is empty and + * [Vehicle.used_if_route_is_empty][google.cloud.optimization.v1.Vehicle.used_if_route_is_empty] + * is true, the vehicle is considered used. + * + * Generated from protobuf field int32 used_vehicle_count = 3; + * @param int $var + * @return $this + */ + public function setUsedVehicleCount($var) + { + GPBUtil::checkInt32($var); + $this->used_vehicle_count = $var; + + return $this; + } + + /** + * The earliest start time for a used vehicle, computed as the minimum over + * all used vehicles of + * [ShipmentRoute.vehicle_start_time][google.cloud.optimization.v1.ShipmentRoute.vehicle_start_time]. + * + * Generated from protobuf field .google.protobuf.Timestamp earliest_vehicle_start_time = 4; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEarliestVehicleStartTime() + { + return $this->earliest_vehicle_start_time; + } + + public function hasEarliestVehicleStartTime() + { + return isset($this->earliest_vehicle_start_time); + } + + public function clearEarliestVehicleStartTime() + { + unset($this->earliest_vehicle_start_time); + } + + /** + * The earliest start time for a used vehicle, computed as the minimum over + * all used vehicles of + * [ShipmentRoute.vehicle_start_time][google.cloud.optimization.v1.ShipmentRoute.vehicle_start_time]. + * + * Generated from protobuf field .google.protobuf.Timestamp earliest_vehicle_start_time = 4; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEarliestVehicleStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->earliest_vehicle_start_time = $var; + + return $this; + } + + /** + * The latest end time for a used vehicle, computed as the maximum over all + * used vehicles of + * [ShipmentRoute.vehicle_end_time][google.cloud.optimization.v1.ShipmentRoute.vehicle_end_time]. + * + * Generated from protobuf field .google.protobuf.Timestamp latest_vehicle_end_time = 5; + * @return \Google\Protobuf\Timestamp|null + */ + public function getLatestVehicleEndTime() + { + return $this->latest_vehicle_end_time; + } + + public function hasLatestVehicleEndTime() + { + return isset($this->latest_vehicle_end_time); + } + + public function clearLatestVehicleEndTime() + { + unset($this->latest_vehicle_end_time); + } + + /** + * The latest end time for a used vehicle, computed as the maximum over all + * used vehicles of + * [ShipmentRoute.vehicle_end_time][google.cloud.optimization.v1.ShipmentRoute.vehicle_end_time]. + * + * Generated from protobuf field .google.protobuf.Timestamp latest_vehicle_end_time = 5; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setLatestVehicleEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->latest_vehicle_end_time = $var; + + return $this; + } + + /** + * Cost of the solution, broken down by cost-related request fields. + * The keys are proto paths, relative to the input OptimizeToursRequest, + * e.g. "model.shipments.pickups.cost", and the values are the total cost + * generated by the corresponding cost field, aggregated over the whole + * solution. In other words, costs["model.shipments.pickups.cost"] is the + * sum of all pickup costs over the solution. All costs defined in the model + * are reported in detail here with the exception of costs related to + * TransitionAttributes that are only reported in an aggregated way as of + * 2022/01. + * + * Generated from protobuf field map costs = 10; + * @return \Google\Protobuf\Internal\MapField + */ + public function getCosts() + { + return $this->costs; + } + + /** + * Cost of the solution, broken down by cost-related request fields. + * The keys are proto paths, relative to the input OptimizeToursRequest, + * e.g. "model.shipments.pickups.cost", and the values are the total cost + * generated by the corresponding cost field, aggregated over the whole + * solution. In other words, costs["model.shipments.pickups.cost"] is the + * sum of all pickup costs over the solution. All costs defined in the model + * are reported in detail here with the exception of costs related to + * TransitionAttributes that are only reported in an aggregated way as of + * 2022/01. + * + * Generated from protobuf field map costs = 10; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setCosts($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::DOUBLE); + $this->costs = $arr; + + return $this; + } + + /** + * Total cost of the solution. The sum of all values in the costs map. + * + * Generated from protobuf field double total_cost = 6; + * @return float + */ + public function getTotalCost() + { + return $this->total_cost; + } + + /** + * Total cost of the solution. The sum of all values in the costs map. + * + * Generated from protobuf field double total_cost = 6; + * @param float $var + * @return $this + */ + public function setTotalCost($var) + { + GPBUtil::checkDouble($var); + $this->total_cost = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Metrics::class, \Google\Cloud\Optimization\V1\OptimizeToursResponse_Metrics::class); + diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/OptimizeToursValidationError.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/OptimizeToursValidationError.php new file mode 100644 index 000000000000..bb7ec123e7f8 --- /dev/null +++ b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/OptimizeToursValidationError.php @@ -0,0 +1,1207 @@ +google.cloud.optimization.v1.OptimizeToursValidationError + */ +class OptimizeToursValidationError extends \Google\Protobuf\Internal\Message +{ + /** + * A validation error is defined by the pair (`code`, `display_name`) which + * are always present. + * Other fields (below) provide more context about the error. + * *MULTIPLE ERRORS*: + * When there are multiple errors, the validation process tries to output + * several of them. Much like a compiler, this is an imperfect process. Some + * validation errors will be "fatal", meaning that they stop the entire + * validation process. This is the case for `display_name="UNSPECIFIED"` + * errors, among others. Some may cause the validation process to skip other + * errors. + * *STABILITY*: + * `code` and `display_name` should be very stable. But new codes and + * display names may appear over time, which may cause a given (invalid) + * request to yield a different (`code`, `display_name`) pair because the new + * error hid the old one (see "MULTIPLE ERRORS"). + * *REFERENCE*: A list of all (code, name) pairs: + * * UNSPECIFIED = 0; + * * VALIDATION_TIMEOUT_ERROR = 10; Validation couldn't be completed within + * the deadline. + * * REQUEST_OPTIONS_ERROR = 12; + * * REQUEST_OPTIONS_INVALID_SOLVING_MODE = 1201; + * * REQUEST_OPTIONS_INVALID_MAX_VALIDATION_ERRORS = 1203; + * * REQUEST_OPTIONS_INVALID_GEODESIC_METERS_PER_SECOND = 1204; + * * REQUEST_OPTIONS_GEODESIC_METERS_PER_SECOND_TOO_SMALL = 1205; + * * REQUEST_OPTIONS_MISSING_GEODESIC_METERS_PER_SECOND = 1206; + * * REQUEST_OPTIONS_POPULATE_PATHFINDER_TRIPS_AND_GEODESIC_DISTANCE + * = 1207; + * * REQUEST_OPTIONS_COST_MODEL_OPTIONS_AND_GEODESIC_DISTANCE = 1208; + * * REQUEST_OPTIONS_TRAVEL_MODE_INCOMPATIBLE_WITH_TRAFFIC = 1211; + * * REQUEST_OPTIONS_MULTIPLE_TRAFFIC_FLAVORS = 1212; + * * REQUEST_OPTIONS_INVALID_TRAFFIC_FLAVOR = 1213; + * * REQUEST_OPTIONS_TRAFFIC_ENABLED_WITHOUT_GLOBAL_START_TIME = 1214; + * * REQUEST_OPTIONS_TRAFFIC_ENABLED_WITH_PRECEDENCES = 1215; + * * REQUEST_OPTIONS_TRAFFIC_PREFILL_MODE_INVALID = 1216; + * * REQUEST_OPTIONS_TRAFFIC_PREFILL_ENABLED_WITHOUT_TRAFFIC = 1217; + * * INJECTED_SOLUTION_ERROR = 20; + * * INJECTED_SOLUTION_MISSING_LABEL = 2000; + * * INJECTED_SOLUTION_DUPLICATE_LABEL = 2001; + * * INJECTED_SOLUTION_AMBIGUOUS_INDEX = 2002; + * * INJECTED_SOLUTION_INFEASIBLE_AFTER_GETTING_TRAVEL_TIMES = 2003; + * * INJECTED_SOLUTION_TRANSITION_INCONSISTENT_WITH_ACTUAL_TRAVEL = 2004; + * * INJECTED_SOLUTION_CONCURRENT_SOLUTION_TYPES = 2005; + * * INJECTED_SOLUTION_MORE_THAN_ONE_PER_TYPE = 2006; + * * INJECTED_SOLUTION_REFRESH_WITHOUT_POPULATE = 2008; + * * INJECTED_SOLUTION_CONSTRAINED_ROUTE_PORTION_INFEASIBLE = 2010; + * * SHIPMENT_MODEL_ERROR = 22; + * * SHIPMENT_MODEL_TOO_LARGE = 2200; + * * SHIPMENT_MODEL_TOO_MANY_CAPACITY_TYPES = 2201; + * * SHIPMENT_MODEL_GLOBAL_START_TIME_NEGATIVE_OR_NAN = 2202; + * * SHIPMENT_MODEL_GLOBAL_END_TIME_TOO_LARGE_OR_NAN = 2203; + * * SHIPMENT_MODEL_GLOBAL_START_TIME_AFTER_GLOBAL_END_TIME = 2204; + * * SHIPMENT_MODEL_GLOBAL_DURATION_TOO_LONG = 2205; + * * SHIPMENT_MODEL_MAX_ACTIVE_VEHICLES_NOT_POSITIVE = 2206; + * * SHIPMENT_MODEL_DURATION_MATRIX_TOO_LARGE = 2207; + * * INDEX_ERROR = 24; + * * TAG_ERROR = 26; + * * TIME_WINDOW_ERROR = 28; + * * TIME_WINDOW_INVALID_START_TIME = 2800; + * * TIME_WINDOW_INVALID_END_TIME = 2801; + * * TIME_WINDOW_INVALID_SOFT_START_TIME = 2802; + * * TIME_WINDOW_INVALID_SOFT_END_TIME = 2803; + * * TIME_WINDOW_OUTSIDE_GLOBAL_TIME_WINDOW = 2804; + * * TIME_WINDOW_START_TIME_AFTER_END_TIME = 2805; + * * TIME_WINDOW_INVALID_COST_PER_HOUR_BEFORE_SOFT_START_TIME = 2806; + * * TIME_WINDOW_INVALID_COST_PER_HOUR_AFTER_SOFT_END_TIME = 2807; + * * TIME_WINDOW_COST_BEFORE_SOFT_START_TIME_WITHOUT_SOFT_START_TIME + * = 2808; + * * TIME_WINDOW_COST_AFTER_SOFT_END_TIME_WITHOUT_SOFT_END_TIME = 2809; + * * TIME_WINDOW_SOFT_START_TIME_WITHOUT_COST_BEFORE_SOFT_START_TIME + * = 2810; + * * TIME_WINDOW_SOFT_END_TIME_WITHOUT_COST_AFTER_SOFT_END_TIME = 2811; + * * TIME_WINDOW_OVERLAPPING_ADJACENT_OR_EARLIER_THAN_PREVIOUS = 2812; + * * TIME_WINDOW_START_TIME_AFTER_SOFT_START_TIME = 2813; + * * TIME_WINDOW_SOFT_START_TIME_AFTER_END_TIME = 2814; + * * TIME_WINDOW_START_TIME_AFTER_SOFT_END_TIME = 2815; + * * TIME_WINDOW_SOFT_END_TIME_AFTER_END_TIME = 2816; + * * TIME_WINDOW_COST_BEFORE_SOFT_START_TIME_SET_AND_MULTIPLE_WINDOWS + * = 2817; + * * TIME_WINDOW_COST_AFTER_SOFT_END_TIME_SET_AND_MULTIPLE_WINDOWS = 2818; + * * TRANSITION_ATTRIBUTES_ERROR = 30; + * * TRANSITION_ATTRIBUTES_INVALID_COST = 3000; + * * TRANSITION_ATTRIBUTES_INVALID_COST_PER_KILOMETER = 3001; + * * TRANSITION_ATTRIBUTES_DUPLICATE_TAG_PAIR = 3002; + * * TRANSITION_ATTRIBUTES_DISTANCE_LIMIT_MAX_METERS_UNSUPPORTED = 3003; + * * TRANSITION_ATTRIBUTES_UNSPECIFIED_SOURCE_TAGS = 3004; + * * TRANSITION_ATTRIBUTES_CONFLICTING_SOURCE_TAGS_FIELDS = 3005; + * * TRANSITION_ATTRIBUTES_UNSPECIFIED_DESTINATION_TAGS = 3006; + * * TRANSITION_ATTRIBUTES_CONFLICTING_DESTINATION_TAGS_FIELDS = 3007; + * * TRANSITION_ATTRIBUTES_DELAY_DURATION_NEGATIVE_OR_NAN = 3008; + * * TRANSITION_ATTRIBUTES_DELAY_DURATION_EXCEEDS_GLOBAL_DURATION = 3009; + * * AMOUNT_ERROR = 31; + * * AMOUNT_NEGATIVE_VALUE = 3100; + * * LOAD_LIMIT_ERROR = 33; + * * LOAD_LIMIT_INVALID_COST_ABOVE_SOFT_MAX = 3303; + * * LOAD_LIMIT_SOFT_MAX_WITHOUT_COST_ABOVE_SOFT_MAX = 3304; + * * LOAD_LIMIT_COST_ABOVE_SOFT_MAX_WITHOUT_SOFT_MAX = 3305; + * * LOAD_LIMIT_NEGATIVE_SOFT_MAX = 3306; + * * LOAD_LIMIT_MIXED_DEMAND_TYPE = 3307; + * * LOAD_LIMIT_MAX_LOAD_NEGATIVE_VALUE = 3308; + * * LOAD_LIMIT_SOFT_MAX_ABOVE_MAX = 3309; + * * INTERVAL_ERROR = 34; + * * INTERVAL_MIN_EXCEEDS_MAX = 3401; + * * INTERVAL_NEGATIVE_MIN = 3402; + * * INTERVAL_NEGATIVE_MAX = 3403; + * * INTERVAL_MIN_EXCEEDS_CAPACITY = 3404; + * * INTERVAL_MAX_EXCEEDS_CAPACITY = 3405; + * * DISTANCE_LIMIT_ERROR = 36; + * * DISTANCE_LIMIT_INVALID_COST_AFTER_SOFT_MAX = 3601; + * * DISTANCE_LIMIT_SOFT_MAX_WITHOUT_COST_AFTER_SOFT_MAX = 3602; + * * DISTANCE_LIMIT_COST_AFTER_SOFT_MAX_WITHOUT_SOFT_MAX = 3603; + * * DISTANCE_LIMIT_NEGATIVE_MAX = 3604; + * * DISTANCE_LIMIT_NEGATIVE_SOFT_MAX = 3605; + * * DISTANCE_LIMIT_SOFT_MAX_LARGER_THAN_MAX = 3606; + * * DURATION_LIMIT_ERROR = 38; + * * DURATION_LIMIT_MAX_DURATION_NEGATIVE_OR_NAN = 3800; + * * DURATION_LIMIT_SOFT_MAX_DURATION_NEGATIVE_OR_NAN = 3801; + * * DURATION_LIMIT_INVALID_COST_PER_HOUR_AFTER_SOFT_MAX = 3802; + * * DURATION_LIMIT_SOFT_MAX_WITHOUT_COST_AFTER_SOFT_MAX = 3803; + * * DURATION_LIMIT_COST_AFTER_SOFT_MAX_WITHOUT_SOFT_MAX = 3804; + * * DURATION_LIMIT_QUADRATIC_SOFT_MAX_DURATION_NEGATIVE_OR_NAN = 3805; + * * DURATION_LIMIT_INVALID_COST_AFTER_QUADRATIC_SOFT_MAX = 3806; + * * DURATION_LIMIT_QUADRATIC_SOFT_MAX_WITHOUT_COST_PER_SQUARE_HOUR + * = 3807; + * * DURATION_LIMIT_COST_PER_SQUARE_HOUR_WITHOUT_QUADRATIC_SOFT_MAX + * = 3808; + * * DURATION_LIMIT_QUADRATIC_SOFT_MAX_WITHOUT_MAX = 3809; + * * DURATION_LIMIT_SOFT_MAX_LARGER_THAN_MAX = 3810; + * * DURATION_LIMIT_QUADRATIC_SOFT_MAX_LARGER_THAN_MAX = 3811; + * * DURATION_LIMIT_DIFF_BETWEEN_MAX_AND_QUADRATIC_SOFT_MAX_TOO_LARGE + * = 3812; + * * DURATION_LIMIT_MAX_DURATION_EXCEEDS_GLOBAL_DURATION = 3813; + * * DURATION_LIMIT_SOFT_MAX_DURATION_EXCEEDS_GLOBAL_DURATION = 3814; + * * DURATION_LIMIT_QUADRATIC_SOFT_MAX_DURATION_EXCEEDS_GLOBAL_DURATION + * = 3815; + * * SHIPMENT_ERROR = 40; + * * SHIPMENT_PD_LIMIT_WITHOUT_PICKUP_AND_DELIVERY = 4014; + * * SHIPMENT_PD_ABSOLUTE_DETOUR_LIMIT_DURATION_NEGATIVE_OR_NAN = 4000; + * * SHIPMENT_PD_ABSOLUTE_DETOUR_LIMIT_DURATION_EXCEEDS_GLOBAL_DURATION + * = 4001; + * * SHIPMENT_PD_RELATIVE_DETOUR_LIMIT_INVALID = 4015; + * * SHIPMENT_PD_DETOUR_LIMIT_AND_EXTRA_VISIT_DURATION = 4016; + * * SHIPMENT_PD_TIME_LIMIT_DURATION_NEGATIVE_OR_NAN = 4002; + * * SHIPMENT_PD_TIME_LIMIT_DURATION_EXCEEDS_GLOBAL_DURATION = 4003; + * * SHIPMENT_EMPTY_SHIPMENT_TYPE = 4004; + * * SHIPMENT_NO_PICKUP_NO_DELIVERY = 4005; + * * SHIPMENT_INVALID_PENALTY_COST = 4006; + * * SHIPMENT_ALLOWED_VEHICLE_INDEX_OUT_OF_BOUNDS = 4007; + * * SHIPMENT_DUPLICATE_ALLOWED_VEHICLE_INDEX = 4008; + * * SHIPMENT_INCONSISTENT_COST_FOR_VEHICLE_SIZE_WITHOUT_INDEX = 4009; + * * SHIPMENT_INCONSISTENT_COST_FOR_VEHICLE_SIZE_WITH_INDEX = 4010; + * * SHIPMENT_INVALID_COST_FOR_VEHICLE = 4011; + * * SHIPMENT_COST_FOR_VEHICLE_INDEX_OUT_OF_BOUNDS = 4012; + * * SHIPMENT_DUPLICATE_COST_FOR_VEHICLE_INDEX = 4013; + * * VEHICLE_ERROR = 42; + * * VEHICLE_EMPTY_REQUIRED_OPERATOR_TYPE = 4200; + * * VEHICLE_DUPLICATE_REQUIRED_OPERATOR_TYPE = 4201; + * * VEHICLE_NO_OPERATOR_WITH_REQUIRED_OPERATOR_TYPE = 4202; + * * VEHICLE_EMPTY_START_TAG = 4203; + * * VEHICLE_DUPLICATE_START_TAG = 4204; + * * VEHICLE_EMPTY_END_TAG = 4205; + * * VEHICLE_DUPLICATE_END_TAG = 4206; + * * VEHICLE_EXTRA_VISIT_DURATION_NEGATIVE_OR_NAN = 4207; + * * VEHICLE_EXTRA_VISIT_DURATION_EXCEEDS_GLOBAL_DURATION = 4208; + * * VEHICLE_EXTRA_VISIT_DURATION_EMPTY_KEY = 4209; + * * VEHICLE_FIRST_SHIPMENT_INDEX_OUT_OF_BOUNDS = 4210; + * * VEHICLE_FIRST_SHIPMENT_IGNORED = 4211; + * * VEHICLE_FIRST_SHIPMENT_NOT_BOUND = 4212; + * * VEHICLE_LAST_SHIPMENT_INDEX_OUT_OF_BOUNDS = 4213; + * * VEHICLE_LAST_SHIPMENT_IGNORED = 4214; + * * VEHICLE_LAST_SHIPMENT_NOT_BOUND = 4215; + * * VEHICLE_IGNORED_WITH_USED_IF_ROUTE_IS_EMPTY = 4216; + * * VEHICLE_INVALID_COST_PER_KILOMETER = 4217; + * * VEHICLE_INVALID_COST_PER_HOUR = 4218; + * * VEHICLE_INVALID_COST_PER_TRAVELED_HOUR = 4219; + * * VEHICLE_INVALID_FIXED_COST = 4220; + * * VEHICLE_INVALID_TRAVEL_DURATION_MULTIPLE = 4221; + * * VEHICLE_TRAVEL_DURATION_MULTIPLE_WITH_SHIPMENT_PD_DETOUR_LIMITS + * = 4223; + * * VEHICLE_MATRIX_INDEX_WITH_SHIPMENT_PD_DETOUR_LIMITS = 4224; + * * VEHICLE_MINIMUM_DURATION_LONGER_THAN_DURATION_LIMIT = 4222; + * * VISIT_REQUEST_ERROR = 44; + * * VISIT_REQUEST_EMPTY_TAG = 4400; + * * VISIT_REQUEST_DUPLICATE_TAG = 4401; + * * VISIT_REQUEST_DURATION_NEGATIVE_OR_NAN = 4404; + * * VISIT_REQUEST_DURATION_EXCEEDS_GLOBAL_DURATION = 4405; + * * PRECEDENCE_ERROR = 46; + * * PRECEDENCE_RULE_MISSING_FIRST_INDEX = 4600; + * * PRECEDENCE_RULE_MISSING_SECOND_INDEX = 4601; + * * PRECEDENCE_RULE_FIRST_INDEX_OUT_OF_BOUNDS = 4602; + * * PRECEDENCE_RULE_SECOND_INDEX_OUT_OF_BOUNDS = 4603; + * * PRECEDENCE_RULE_DUPLICATE_INDEX = 4604; + * * PRECEDENCE_RULE_INEXISTENT_FIRST_VISIT_REQUEST = 4605; + * * PRECEDENCE_RULE_INEXISTENT_SECOND_VISIT_REQUEST = 4606; + * * BREAK_ERROR = 48; + * * BREAK_RULE_EMPTY = 4800; + * * BREAK_REQUEST_UNSPECIFIED_DURATION = 4801; + * * BREAK_REQUEST_UNSPECIFIED_EARLIEST_START_TIME = 4802; + * * BREAK_REQUEST_UNSPECIFIED_LATEST_START_TIME = 4803; + * * BREAK_REQUEST_DURATION_NEGATIVE_OR_NAN = 4804; = 4804; + * * BREAK_REQUEST_LATEST_START_TIME_BEFORE_EARLIEST_START_TIME = 4805; + * * BREAK_REQUEST_EARLIEST_START_TIME_BEFORE_GLOBAL_START_TIME = 4806; + * * BREAK_REQUEST_LATEST_END_TIME_AFTER_GLOBAL_END_TIME = 4807; + * * BREAK_REQUEST_NON_SCHEDULABLE = 4808; + * * BREAK_FREQUENCY_MAX_INTER_BREAK_DURATION_NEGATIVE_OR_NAN = 4809; + * * BREAK_FREQUENCY_MIN_BREAK_DURATION_NEGATIVE_OR_NAN = 4810; + * * BREAK_FREQUENCY_MIN_BREAK_DURATION_EXCEEDS_GLOBAL_DURATION = 4811; + * * BREAK_FREQUENCY_MAX_INTER_BREAK_DURATION_EXCEEDS_GLOBAL_DURATION + * = 4812; + * * BREAK_REQUEST_DURATION_EXCEEDS_GLOBAL_DURATION = 4813; + * * BREAK_FREQUENCY_MISSING_MAX_INTER_BREAK_DURATION = 4814; + * * BREAK_FREQUENCY_MISSING_MIN_BREAK_DURATION = 4815; + * * SHIPMENT_TYPE_INCOMPATIBILITY_ERROR = 50; + * * SHIPMENT_TYPE_INCOMPATIBILITY_EMPTY_TYPE = 5001; + * * SHIPMENT_TYPE_INCOMPATIBILITY_LESS_THAN_TWO_TYPES = 5002; + * * SHIPMENT_TYPE_INCOMPATIBILITY_DUPLICATE_TYPE = 5003; + * * SHIPMENT_TYPE_INCOMPATIBILITY_INVALID_INCOMPATIBILITY_MODE = 5004; + * * SHIPMENT_TYPE_INCOMPATIBILITY_TOO_MANY_INCOMPATIBILITIES = 5005; + * * SHIPMENT_TYPE_REQUIREMENT_ERROR = 52; + * * SHIPMENT_TYPE_REQUIREMENT_NO_REQUIRED_TYPE = 52001; + * * SHIPMENT_TYPE_REQUIREMENT_NO_DEPENDENT_TYPE = 52002; + * * SHIPMENT_TYPE_REQUIREMENT_INVALID_REQUIREMENT_MODE = 52003; + * * SHIPMENT_TYPE_REQUIREMENT_TOO_MANY_REQUIREMENTS = 52004; + * * SHIPMENT_TYPE_REQUIREMENT_EMPTY_REQUIRED_TYPE = 52005; + * * SHIPMENT_TYPE_REQUIREMENT_DUPLICATE_REQUIRED_TYPE = 52006; + * * SHIPMENT_TYPE_REQUIREMENT_NO_REQUIRED_TYPE_FOUND = 52007; + * * SHIPMENT_TYPE_REQUIREMENT_EMPTY_DEPENDENT_TYPE = 52008; + * * SHIPMENT_TYPE_REQUIREMENT_DUPLICATE_DEPENDENT_TYPE = 52009; + * * SHIPMENT_TYPE_REQUIREMENT_SELF_DEPENDENT_TYPE = 52010; + * * SHIPMENT_TYPE_REQUIREMENT_GRAPH_HAS_CYCLES = 52011; + * * VEHICLE_OPERATOR_ERROR = 54; + * * VEHICLE_OPERATOR_EMPTY_TYPE = 5400; + * * VEHICLE_OPERATOR_MULTIPLE_START_TIME_WINDOWS = 5401; + * * VEHICLE_OPERATOR_SOFT_START_TIME_WINDOW = 5402; + * * VEHICLE_OPERATOR_MULTIPLE_END_TIME_WINDOWS = 5403; + * * VEHICLE_OPERATOR_SOFT_END_TIME_WINDOW = 5404; + * * DURATION_SECONDS_MATRIX_ERROR = 56; + * * DURATION_SECONDS_MATRIX_DURATION_NEGATIVE_OR_NAN = 5600; + * * DURATION_SECONDS_MATRIX_DURATION_EXCEEDS_GLOBAL_DURATION = 5601; + * + * Generated from protobuf field int32 code = 1; + */ + protected $code = 0; + /** + * The error display name. + * + * Generated from protobuf field string display_name = 2; + */ + protected $display_name = ''; + /** + * An error context may involve 0, 1 (most of the time) or more fields. For + * example, referring to vehicle #4 and shipment #2's first pickup can be + * done as follows: + * ``` + * fields { name: "vehicles" index: 4} + * fields { name: "shipments" index: 2 sub_field {name: "pickups" index: 0} } + * ``` + * Note, however, that the cardinality of `fields` should not change for a + * given error code. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.OptimizeToursValidationError.FieldReference fields = 3; + */ + private $fields; + /** + * Human-readable string describing the error. There is a 1:1 mapping + * between `code` and `error_message` (when code != "UNSPECIFIED"). + * *STABILITY*: Not stable: the error message associated to a given `code` may + * change (hopefully to clarify it) over time. Please rely on the + * `display_name` and `code` instead. + * + * Generated from protobuf field string error_message = 4; + */ + protected $error_message = ''; + /** + * May contain the value(s) of the field(s). This is not always available. You + * should absolutely not rely on it and use it only for manual model + * debugging. + * + * Generated from protobuf field string offending_values = 5; + */ + protected $offending_values = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $code + * A validation error is defined by the pair (`code`, `display_name`) which + * are always present. + * Other fields (below) provide more context about the error. + * *MULTIPLE ERRORS*: + * When there are multiple errors, the validation process tries to output + * several of them. Much like a compiler, this is an imperfect process. Some + * validation errors will be "fatal", meaning that they stop the entire + * validation process. This is the case for `display_name="UNSPECIFIED"` + * errors, among others. Some may cause the validation process to skip other + * errors. + * *STABILITY*: + * `code` and `display_name` should be very stable. But new codes and + * display names may appear over time, which may cause a given (invalid) + * request to yield a different (`code`, `display_name`) pair because the new + * error hid the old one (see "MULTIPLE ERRORS"). + * *REFERENCE*: A list of all (code, name) pairs: + * * UNSPECIFIED = 0; + * * VALIDATION_TIMEOUT_ERROR = 10; Validation couldn't be completed within + * the deadline. + * * REQUEST_OPTIONS_ERROR = 12; + * * REQUEST_OPTIONS_INVALID_SOLVING_MODE = 1201; + * * REQUEST_OPTIONS_INVALID_MAX_VALIDATION_ERRORS = 1203; + * * REQUEST_OPTIONS_INVALID_GEODESIC_METERS_PER_SECOND = 1204; + * * REQUEST_OPTIONS_GEODESIC_METERS_PER_SECOND_TOO_SMALL = 1205; + * * REQUEST_OPTIONS_MISSING_GEODESIC_METERS_PER_SECOND = 1206; + * * REQUEST_OPTIONS_POPULATE_PATHFINDER_TRIPS_AND_GEODESIC_DISTANCE + * = 1207; + * * REQUEST_OPTIONS_COST_MODEL_OPTIONS_AND_GEODESIC_DISTANCE = 1208; + * * REQUEST_OPTIONS_TRAVEL_MODE_INCOMPATIBLE_WITH_TRAFFIC = 1211; + * * REQUEST_OPTIONS_MULTIPLE_TRAFFIC_FLAVORS = 1212; + * * REQUEST_OPTIONS_INVALID_TRAFFIC_FLAVOR = 1213; + * * REQUEST_OPTIONS_TRAFFIC_ENABLED_WITHOUT_GLOBAL_START_TIME = 1214; + * * REQUEST_OPTIONS_TRAFFIC_ENABLED_WITH_PRECEDENCES = 1215; + * * REQUEST_OPTIONS_TRAFFIC_PREFILL_MODE_INVALID = 1216; + * * REQUEST_OPTIONS_TRAFFIC_PREFILL_ENABLED_WITHOUT_TRAFFIC = 1217; + * * INJECTED_SOLUTION_ERROR = 20; + * * INJECTED_SOLUTION_MISSING_LABEL = 2000; + * * INJECTED_SOLUTION_DUPLICATE_LABEL = 2001; + * * INJECTED_SOLUTION_AMBIGUOUS_INDEX = 2002; + * * INJECTED_SOLUTION_INFEASIBLE_AFTER_GETTING_TRAVEL_TIMES = 2003; + * * INJECTED_SOLUTION_TRANSITION_INCONSISTENT_WITH_ACTUAL_TRAVEL = 2004; + * * INJECTED_SOLUTION_CONCURRENT_SOLUTION_TYPES = 2005; + * * INJECTED_SOLUTION_MORE_THAN_ONE_PER_TYPE = 2006; + * * INJECTED_SOLUTION_REFRESH_WITHOUT_POPULATE = 2008; + * * INJECTED_SOLUTION_CONSTRAINED_ROUTE_PORTION_INFEASIBLE = 2010; + * * SHIPMENT_MODEL_ERROR = 22; + * * SHIPMENT_MODEL_TOO_LARGE = 2200; + * * SHIPMENT_MODEL_TOO_MANY_CAPACITY_TYPES = 2201; + * * SHIPMENT_MODEL_GLOBAL_START_TIME_NEGATIVE_OR_NAN = 2202; + * * SHIPMENT_MODEL_GLOBAL_END_TIME_TOO_LARGE_OR_NAN = 2203; + * * SHIPMENT_MODEL_GLOBAL_START_TIME_AFTER_GLOBAL_END_TIME = 2204; + * * SHIPMENT_MODEL_GLOBAL_DURATION_TOO_LONG = 2205; + * * SHIPMENT_MODEL_MAX_ACTIVE_VEHICLES_NOT_POSITIVE = 2206; + * * SHIPMENT_MODEL_DURATION_MATRIX_TOO_LARGE = 2207; + * * INDEX_ERROR = 24; + * * TAG_ERROR = 26; + * * TIME_WINDOW_ERROR = 28; + * * TIME_WINDOW_INVALID_START_TIME = 2800; + * * TIME_WINDOW_INVALID_END_TIME = 2801; + * * TIME_WINDOW_INVALID_SOFT_START_TIME = 2802; + * * TIME_WINDOW_INVALID_SOFT_END_TIME = 2803; + * * TIME_WINDOW_OUTSIDE_GLOBAL_TIME_WINDOW = 2804; + * * TIME_WINDOW_START_TIME_AFTER_END_TIME = 2805; + * * TIME_WINDOW_INVALID_COST_PER_HOUR_BEFORE_SOFT_START_TIME = 2806; + * * TIME_WINDOW_INVALID_COST_PER_HOUR_AFTER_SOFT_END_TIME = 2807; + * * TIME_WINDOW_COST_BEFORE_SOFT_START_TIME_WITHOUT_SOFT_START_TIME + * = 2808; + * * TIME_WINDOW_COST_AFTER_SOFT_END_TIME_WITHOUT_SOFT_END_TIME = 2809; + * * TIME_WINDOW_SOFT_START_TIME_WITHOUT_COST_BEFORE_SOFT_START_TIME + * = 2810; + * * TIME_WINDOW_SOFT_END_TIME_WITHOUT_COST_AFTER_SOFT_END_TIME = 2811; + * * TIME_WINDOW_OVERLAPPING_ADJACENT_OR_EARLIER_THAN_PREVIOUS = 2812; + * * TIME_WINDOW_START_TIME_AFTER_SOFT_START_TIME = 2813; + * * TIME_WINDOW_SOFT_START_TIME_AFTER_END_TIME = 2814; + * * TIME_WINDOW_START_TIME_AFTER_SOFT_END_TIME = 2815; + * * TIME_WINDOW_SOFT_END_TIME_AFTER_END_TIME = 2816; + * * TIME_WINDOW_COST_BEFORE_SOFT_START_TIME_SET_AND_MULTIPLE_WINDOWS + * = 2817; + * * TIME_WINDOW_COST_AFTER_SOFT_END_TIME_SET_AND_MULTIPLE_WINDOWS = 2818; + * * TRANSITION_ATTRIBUTES_ERROR = 30; + * * TRANSITION_ATTRIBUTES_INVALID_COST = 3000; + * * TRANSITION_ATTRIBUTES_INVALID_COST_PER_KILOMETER = 3001; + * * TRANSITION_ATTRIBUTES_DUPLICATE_TAG_PAIR = 3002; + * * TRANSITION_ATTRIBUTES_DISTANCE_LIMIT_MAX_METERS_UNSUPPORTED = 3003; + * * TRANSITION_ATTRIBUTES_UNSPECIFIED_SOURCE_TAGS = 3004; + * * TRANSITION_ATTRIBUTES_CONFLICTING_SOURCE_TAGS_FIELDS = 3005; + * * TRANSITION_ATTRIBUTES_UNSPECIFIED_DESTINATION_TAGS = 3006; + * * TRANSITION_ATTRIBUTES_CONFLICTING_DESTINATION_TAGS_FIELDS = 3007; + * * TRANSITION_ATTRIBUTES_DELAY_DURATION_NEGATIVE_OR_NAN = 3008; + * * TRANSITION_ATTRIBUTES_DELAY_DURATION_EXCEEDS_GLOBAL_DURATION = 3009; + * * AMOUNT_ERROR = 31; + * * AMOUNT_NEGATIVE_VALUE = 3100; + * * LOAD_LIMIT_ERROR = 33; + * * LOAD_LIMIT_INVALID_COST_ABOVE_SOFT_MAX = 3303; + * * LOAD_LIMIT_SOFT_MAX_WITHOUT_COST_ABOVE_SOFT_MAX = 3304; + * * LOAD_LIMIT_COST_ABOVE_SOFT_MAX_WITHOUT_SOFT_MAX = 3305; + * * LOAD_LIMIT_NEGATIVE_SOFT_MAX = 3306; + * * LOAD_LIMIT_MIXED_DEMAND_TYPE = 3307; + * * LOAD_LIMIT_MAX_LOAD_NEGATIVE_VALUE = 3308; + * * LOAD_LIMIT_SOFT_MAX_ABOVE_MAX = 3309; + * * INTERVAL_ERROR = 34; + * * INTERVAL_MIN_EXCEEDS_MAX = 3401; + * * INTERVAL_NEGATIVE_MIN = 3402; + * * INTERVAL_NEGATIVE_MAX = 3403; + * * INTERVAL_MIN_EXCEEDS_CAPACITY = 3404; + * * INTERVAL_MAX_EXCEEDS_CAPACITY = 3405; + * * DISTANCE_LIMIT_ERROR = 36; + * * DISTANCE_LIMIT_INVALID_COST_AFTER_SOFT_MAX = 3601; + * * DISTANCE_LIMIT_SOFT_MAX_WITHOUT_COST_AFTER_SOFT_MAX = 3602; + * * DISTANCE_LIMIT_COST_AFTER_SOFT_MAX_WITHOUT_SOFT_MAX = 3603; + * * DISTANCE_LIMIT_NEGATIVE_MAX = 3604; + * * DISTANCE_LIMIT_NEGATIVE_SOFT_MAX = 3605; + * * DISTANCE_LIMIT_SOFT_MAX_LARGER_THAN_MAX = 3606; + * * DURATION_LIMIT_ERROR = 38; + * * DURATION_LIMIT_MAX_DURATION_NEGATIVE_OR_NAN = 3800; + * * DURATION_LIMIT_SOFT_MAX_DURATION_NEGATIVE_OR_NAN = 3801; + * * DURATION_LIMIT_INVALID_COST_PER_HOUR_AFTER_SOFT_MAX = 3802; + * * DURATION_LIMIT_SOFT_MAX_WITHOUT_COST_AFTER_SOFT_MAX = 3803; + * * DURATION_LIMIT_COST_AFTER_SOFT_MAX_WITHOUT_SOFT_MAX = 3804; + * * DURATION_LIMIT_QUADRATIC_SOFT_MAX_DURATION_NEGATIVE_OR_NAN = 3805; + * * DURATION_LIMIT_INVALID_COST_AFTER_QUADRATIC_SOFT_MAX = 3806; + * * DURATION_LIMIT_QUADRATIC_SOFT_MAX_WITHOUT_COST_PER_SQUARE_HOUR + * = 3807; + * * DURATION_LIMIT_COST_PER_SQUARE_HOUR_WITHOUT_QUADRATIC_SOFT_MAX + * = 3808; + * * DURATION_LIMIT_QUADRATIC_SOFT_MAX_WITHOUT_MAX = 3809; + * * DURATION_LIMIT_SOFT_MAX_LARGER_THAN_MAX = 3810; + * * DURATION_LIMIT_QUADRATIC_SOFT_MAX_LARGER_THAN_MAX = 3811; + * * DURATION_LIMIT_DIFF_BETWEEN_MAX_AND_QUADRATIC_SOFT_MAX_TOO_LARGE + * = 3812; + * * DURATION_LIMIT_MAX_DURATION_EXCEEDS_GLOBAL_DURATION = 3813; + * * DURATION_LIMIT_SOFT_MAX_DURATION_EXCEEDS_GLOBAL_DURATION = 3814; + * * DURATION_LIMIT_QUADRATIC_SOFT_MAX_DURATION_EXCEEDS_GLOBAL_DURATION + * = 3815; + * * SHIPMENT_ERROR = 40; + * * SHIPMENT_PD_LIMIT_WITHOUT_PICKUP_AND_DELIVERY = 4014; + * * SHIPMENT_PD_ABSOLUTE_DETOUR_LIMIT_DURATION_NEGATIVE_OR_NAN = 4000; + * * SHIPMENT_PD_ABSOLUTE_DETOUR_LIMIT_DURATION_EXCEEDS_GLOBAL_DURATION + * = 4001; + * * SHIPMENT_PD_RELATIVE_DETOUR_LIMIT_INVALID = 4015; + * * SHIPMENT_PD_DETOUR_LIMIT_AND_EXTRA_VISIT_DURATION = 4016; + * * SHIPMENT_PD_TIME_LIMIT_DURATION_NEGATIVE_OR_NAN = 4002; + * * SHIPMENT_PD_TIME_LIMIT_DURATION_EXCEEDS_GLOBAL_DURATION = 4003; + * * SHIPMENT_EMPTY_SHIPMENT_TYPE = 4004; + * * SHIPMENT_NO_PICKUP_NO_DELIVERY = 4005; + * * SHIPMENT_INVALID_PENALTY_COST = 4006; + * * SHIPMENT_ALLOWED_VEHICLE_INDEX_OUT_OF_BOUNDS = 4007; + * * SHIPMENT_DUPLICATE_ALLOWED_VEHICLE_INDEX = 4008; + * * SHIPMENT_INCONSISTENT_COST_FOR_VEHICLE_SIZE_WITHOUT_INDEX = 4009; + * * SHIPMENT_INCONSISTENT_COST_FOR_VEHICLE_SIZE_WITH_INDEX = 4010; + * * SHIPMENT_INVALID_COST_FOR_VEHICLE = 4011; + * * SHIPMENT_COST_FOR_VEHICLE_INDEX_OUT_OF_BOUNDS = 4012; + * * SHIPMENT_DUPLICATE_COST_FOR_VEHICLE_INDEX = 4013; + * * VEHICLE_ERROR = 42; + * * VEHICLE_EMPTY_REQUIRED_OPERATOR_TYPE = 4200; + * * VEHICLE_DUPLICATE_REQUIRED_OPERATOR_TYPE = 4201; + * * VEHICLE_NO_OPERATOR_WITH_REQUIRED_OPERATOR_TYPE = 4202; + * * VEHICLE_EMPTY_START_TAG = 4203; + * * VEHICLE_DUPLICATE_START_TAG = 4204; + * * VEHICLE_EMPTY_END_TAG = 4205; + * * VEHICLE_DUPLICATE_END_TAG = 4206; + * * VEHICLE_EXTRA_VISIT_DURATION_NEGATIVE_OR_NAN = 4207; + * * VEHICLE_EXTRA_VISIT_DURATION_EXCEEDS_GLOBAL_DURATION = 4208; + * * VEHICLE_EXTRA_VISIT_DURATION_EMPTY_KEY = 4209; + * * VEHICLE_FIRST_SHIPMENT_INDEX_OUT_OF_BOUNDS = 4210; + * * VEHICLE_FIRST_SHIPMENT_IGNORED = 4211; + * * VEHICLE_FIRST_SHIPMENT_NOT_BOUND = 4212; + * * VEHICLE_LAST_SHIPMENT_INDEX_OUT_OF_BOUNDS = 4213; + * * VEHICLE_LAST_SHIPMENT_IGNORED = 4214; + * * VEHICLE_LAST_SHIPMENT_NOT_BOUND = 4215; + * * VEHICLE_IGNORED_WITH_USED_IF_ROUTE_IS_EMPTY = 4216; + * * VEHICLE_INVALID_COST_PER_KILOMETER = 4217; + * * VEHICLE_INVALID_COST_PER_HOUR = 4218; + * * VEHICLE_INVALID_COST_PER_TRAVELED_HOUR = 4219; + * * VEHICLE_INVALID_FIXED_COST = 4220; + * * VEHICLE_INVALID_TRAVEL_DURATION_MULTIPLE = 4221; + * * VEHICLE_TRAVEL_DURATION_MULTIPLE_WITH_SHIPMENT_PD_DETOUR_LIMITS + * = 4223; + * * VEHICLE_MATRIX_INDEX_WITH_SHIPMENT_PD_DETOUR_LIMITS = 4224; + * * VEHICLE_MINIMUM_DURATION_LONGER_THAN_DURATION_LIMIT = 4222; + * * VISIT_REQUEST_ERROR = 44; + * * VISIT_REQUEST_EMPTY_TAG = 4400; + * * VISIT_REQUEST_DUPLICATE_TAG = 4401; + * * VISIT_REQUEST_DURATION_NEGATIVE_OR_NAN = 4404; + * * VISIT_REQUEST_DURATION_EXCEEDS_GLOBAL_DURATION = 4405; + * * PRECEDENCE_ERROR = 46; + * * PRECEDENCE_RULE_MISSING_FIRST_INDEX = 4600; + * * PRECEDENCE_RULE_MISSING_SECOND_INDEX = 4601; + * * PRECEDENCE_RULE_FIRST_INDEX_OUT_OF_BOUNDS = 4602; + * * PRECEDENCE_RULE_SECOND_INDEX_OUT_OF_BOUNDS = 4603; + * * PRECEDENCE_RULE_DUPLICATE_INDEX = 4604; + * * PRECEDENCE_RULE_INEXISTENT_FIRST_VISIT_REQUEST = 4605; + * * PRECEDENCE_RULE_INEXISTENT_SECOND_VISIT_REQUEST = 4606; + * * BREAK_ERROR = 48; + * * BREAK_RULE_EMPTY = 4800; + * * BREAK_REQUEST_UNSPECIFIED_DURATION = 4801; + * * BREAK_REQUEST_UNSPECIFIED_EARLIEST_START_TIME = 4802; + * * BREAK_REQUEST_UNSPECIFIED_LATEST_START_TIME = 4803; + * * BREAK_REQUEST_DURATION_NEGATIVE_OR_NAN = 4804; = 4804; + * * BREAK_REQUEST_LATEST_START_TIME_BEFORE_EARLIEST_START_TIME = 4805; + * * BREAK_REQUEST_EARLIEST_START_TIME_BEFORE_GLOBAL_START_TIME = 4806; + * * BREAK_REQUEST_LATEST_END_TIME_AFTER_GLOBAL_END_TIME = 4807; + * * BREAK_REQUEST_NON_SCHEDULABLE = 4808; + * * BREAK_FREQUENCY_MAX_INTER_BREAK_DURATION_NEGATIVE_OR_NAN = 4809; + * * BREAK_FREQUENCY_MIN_BREAK_DURATION_NEGATIVE_OR_NAN = 4810; + * * BREAK_FREQUENCY_MIN_BREAK_DURATION_EXCEEDS_GLOBAL_DURATION = 4811; + * * BREAK_FREQUENCY_MAX_INTER_BREAK_DURATION_EXCEEDS_GLOBAL_DURATION + * = 4812; + * * BREAK_REQUEST_DURATION_EXCEEDS_GLOBAL_DURATION = 4813; + * * BREAK_FREQUENCY_MISSING_MAX_INTER_BREAK_DURATION = 4814; + * * BREAK_FREQUENCY_MISSING_MIN_BREAK_DURATION = 4815; + * * SHIPMENT_TYPE_INCOMPATIBILITY_ERROR = 50; + * * SHIPMENT_TYPE_INCOMPATIBILITY_EMPTY_TYPE = 5001; + * * SHIPMENT_TYPE_INCOMPATIBILITY_LESS_THAN_TWO_TYPES = 5002; + * * SHIPMENT_TYPE_INCOMPATIBILITY_DUPLICATE_TYPE = 5003; + * * SHIPMENT_TYPE_INCOMPATIBILITY_INVALID_INCOMPATIBILITY_MODE = 5004; + * * SHIPMENT_TYPE_INCOMPATIBILITY_TOO_MANY_INCOMPATIBILITIES = 5005; + * * SHIPMENT_TYPE_REQUIREMENT_ERROR = 52; + * * SHIPMENT_TYPE_REQUIREMENT_NO_REQUIRED_TYPE = 52001; + * * SHIPMENT_TYPE_REQUIREMENT_NO_DEPENDENT_TYPE = 52002; + * * SHIPMENT_TYPE_REQUIREMENT_INVALID_REQUIREMENT_MODE = 52003; + * * SHIPMENT_TYPE_REQUIREMENT_TOO_MANY_REQUIREMENTS = 52004; + * * SHIPMENT_TYPE_REQUIREMENT_EMPTY_REQUIRED_TYPE = 52005; + * * SHIPMENT_TYPE_REQUIREMENT_DUPLICATE_REQUIRED_TYPE = 52006; + * * SHIPMENT_TYPE_REQUIREMENT_NO_REQUIRED_TYPE_FOUND = 52007; + * * SHIPMENT_TYPE_REQUIREMENT_EMPTY_DEPENDENT_TYPE = 52008; + * * SHIPMENT_TYPE_REQUIREMENT_DUPLICATE_DEPENDENT_TYPE = 52009; + * * SHIPMENT_TYPE_REQUIREMENT_SELF_DEPENDENT_TYPE = 52010; + * * SHIPMENT_TYPE_REQUIREMENT_GRAPH_HAS_CYCLES = 52011; + * * VEHICLE_OPERATOR_ERROR = 54; + * * VEHICLE_OPERATOR_EMPTY_TYPE = 5400; + * * VEHICLE_OPERATOR_MULTIPLE_START_TIME_WINDOWS = 5401; + * * VEHICLE_OPERATOR_SOFT_START_TIME_WINDOW = 5402; + * * VEHICLE_OPERATOR_MULTIPLE_END_TIME_WINDOWS = 5403; + * * VEHICLE_OPERATOR_SOFT_END_TIME_WINDOW = 5404; + * * DURATION_SECONDS_MATRIX_ERROR = 56; + * * DURATION_SECONDS_MATRIX_DURATION_NEGATIVE_OR_NAN = 5600; + * * DURATION_SECONDS_MATRIX_DURATION_EXCEEDS_GLOBAL_DURATION = 5601; + * @type string $display_name + * The error display name. + * @type array<\Google\Cloud\Optimization\V1\OptimizeToursValidationError\FieldReference>|\Google\Protobuf\Internal\RepeatedField $fields + * An error context may involve 0, 1 (most of the time) or more fields. For + * example, referring to vehicle #4 and shipment #2's first pickup can be + * done as follows: + * ``` + * fields { name: "vehicles" index: 4} + * fields { name: "shipments" index: 2 sub_field {name: "pickups" index: 0} } + * ``` + * Note, however, that the cardinality of `fields` should not change for a + * given error code. + * @type string $error_message + * Human-readable string describing the error. There is a 1:1 mapping + * between `code` and `error_message` (when code != "UNSPECIFIED"). + * *STABILITY*: Not stable: the error message associated to a given `code` may + * change (hopefully to clarify it) over time. Please rely on the + * `display_name` and `code` instead. + * @type string $offending_values + * May contain the value(s) of the field(s). This is not always available. You + * should absolutely not rely on it and use it only for manual model + * debugging. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); + parent::__construct($data); + } + + /** + * A validation error is defined by the pair (`code`, `display_name`) which + * are always present. + * Other fields (below) provide more context about the error. + * *MULTIPLE ERRORS*: + * When there are multiple errors, the validation process tries to output + * several of them. Much like a compiler, this is an imperfect process. Some + * validation errors will be "fatal", meaning that they stop the entire + * validation process. This is the case for `display_name="UNSPECIFIED"` + * errors, among others. Some may cause the validation process to skip other + * errors. + * *STABILITY*: + * `code` and `display_name` should be very stable. But new codes and + * display names may appear over time, which may cause a given (invalid) + * request to yield a different (`code`, `display_name`) pair because the new + * error hid the old one (see "MULTIPLE ERRORS"). + * *REFERENCE*: A list of all (code, name) pairs: + * * UNSPECIFIED = 0; + * * VALIDATION_TIMEOUT_ERROR = 10; Validation couldn't be completed within + * the deadline. + * * REQUEST_OPTIONS_ERROR = 12; + * * REQUEST_OPTIONS_INVALID_SOLVING_MODE = 1201; + * * REQUEST_OPTIONS_INVALID_MAX_VALIDATION_ERRORS = 1203; + * * REQUEST_OPTIONS_INVALID_GEODESIC_METERS_PER_SECOND = 1204; + * * REQUEST_OPTIONS_GEODESIC_METERS_PER_SECOND_TOO_SMALL = 1205; + * * REQUEST_OPTIONS_MISSING_GEODESIC_METERS_PER_SECOND = 1206; + * * REQUEST_OPTIONS_POPULATE_PATHFINDER_TRIPS_AND_GEODESIC_DISTANCE + * = 1207; + * * REQUEST_OPTIONS_COST_MODEL_OPTIONS_AND_GEODESIC_DISTANCE = 1208; + * * REQUEST_OPTIONS_TRAVEL_MODE_INCOMPATIBLE_WITH_TRAFFIC = 1211; + * * REQUEST_OPTIONS_MULTIPLE_TRAFFIC_FLAVORS = 1212; + * * REQUEST_OPTIONS_INVALID_TRAFFIC_FLAVOR = 1213; + * * REQUEST_OPTIONS_TRAFFIC_ENABLED_WITHOUT_GLOBAL_START_TIME = 1214; + * * REQUEST_OPTIONS_TRAFFIC_ENABLED_WITH_PRECEDENCES = 1215; + * * REQUEST_OPTIONS_TRAFFIC_PREFILL_MODE_INVALID = 1216; + * * REQUEST_OPTIONS_TRAFFIC_PREFILL_ENABLED_WITHOUT_TRAFFIC = 1217; + * * INJECTED_SOLUTION_ERROR = 20; + * * INJECTED_SOLUTION_MISSING_LABEL = 2000; + * * INJECTED_SOLUTION_DUPLICATE_LABEL = 2001; + * * INJECTED_SOLUTION_AMBIGUOUS_INDEX = 2002; + * * INJECTED_SOLUTION_INFEASIBLE_AFTER_GETTING_TRAVEL_TIMES = 2003; + * * INJECTED_SOLUTION_TRANSITION_INCONSISTENT_WITH_ACTUAL_TRAVEL = 2004; + * * INJECTED_SOLUTION_CONCURRENT_SOLUTION_TYPES = 2005; + * * INJECTED_SOLUTION_MORE_THAN_ONE_PER_TYPE = 2006; + * * INJECTED_SOLUTION_REFRESH_WITHOUT_POPULATE = 2008; + * * INJECTED_SOLUTION_CONSTRAINED_ROUTE_PORTION_INFEASIBLE = 2010; + * * SHIPMENT_MODEL_ERROR = 22; + * * SHIPMENT_MODEL_TOO_LARGE = 2200; + * * SHIPMENT_MODEL_TOO_MANY_CAPACITY_TYPES = 2201; + * * SHIPMENT_MODEL_GLOBAL_START_TIME_NEGATIVE_OR_NAN = 2202; + * * SHIPMENT_MODEL_GLOBAL_END_TIME_TOO_LARGE_OR_NAN = 2203; + * * SHIPMENT_MODEL_GLOBAL_START_TIME_AFTER_GLOBAL_END_TIME = 2204; + * * SHIPMENT_MODEL_GLOBAL_DURATION_TOO_LONG = 2205; + * * SHIPMENT_MODEL_MAX_ACTIVE_VEHICLES_NOT_POSITIVE = 2206; + * * SHIPMENT_MODEL_DURATION_MATRIX_TOO_LARGE = 2207; + * * INDEX_ERROR = 24; + * * TAG_ERROR = 26; + * * TIME_WINDOW_ERROR = 28; + * * TIME_WINDOW_INVALID_START_TIME = 2800; + * * TIME_WINDOW_INVALID_END_TIME = 2801; + * * TIME_WINDOW_INVALID_SOFT_START_TIME = 2802; + * * TIME_WINDOW_INVALID_SOFT_END_TIME = 2803; + * * TIME_WINDOW_OUTSIDE_GLOBAL_TIME_WINDOW = 2804; + * * TIME_WINDOW_START_TIME_AFTER_END_TIME = 2805; + * * TIME_WINDOW_INVALID_COST_PER_HOUR_BEFORE_SOFT_START_TIME = 2806; + * * TIME_WINDOW_INVALID_COST_PER_HOUR_AFTER_SOFT_END_TIME = 2807; + * * TIME_WINDOW_COST_BEFORE_SOFT_START_TIME_WITHOUT_SOFT_START_TIME + * = 2808; + * * TIME_WINDOW_COST_AFTER_SOFT_END_TIME_WITHOUT_SOFT_END_TIME = 2809; + * * TIME_WINDOW_SOFT_START_TIME_WITHOUT_COST_BEFORE_SOFT_START_TIME + * = 2810; + * * TIME_WINDOW_SOFT_END_TIME_WITHOUT_COST_AFTER_SOFT_END_TIME = 2811; + * * TIME_WINDOW_OVERLAPPING_ADJACENT_OR_EARLIER_THAN_PREVIOUS = 2812; + * * TIME_WINDOW_START_TIME_AFTER_SOFT_START_TIME = 2813; + * * TIME_WINDOW_SOFT_START_TIME_AFTER_END_TIME = 2814; + * * TIME_WINDOW_START_TIME_AFTER_SOFT_END_TIME = 2815; + * * TIME_WINDOW_SOFT_END_TIME_AFTER_END_TIME = 2816; + * * TIME_WINDOW_COST_BEFORE_SOFT_START_TIME_SET_AND_MULTIPLE_WINDOWS + * = 2817; + * * TIME_WINDOW_COST_AFTER_SOFT_END_TIME_SET_AND_MULTIPLE_WINDOWS = 2818; + * * TRANSITION_ATTRIBUTES_ERROR = 30; + * * TRANSITION_ATTRIBUTES_INVALID_COST = 3000; + * * TRANSITION_ATTRIBUTES_INVALID_COST_PER_KILOMETER = 3001; + * * TRANSITION_ATTRIBUTES_DUPLICATE_TAG_PAIR = 3002; + * * TRANSITION_ATTRIBUTES_DISTANCE_LIMIT_MAX_METERS_UNSUPPORTED = 3003; + * * TRANSITION_ATTRIBUTES_UNSPECIFIED_SOURCE_TAGS = 3004; + * * TRANSITION_ATTRIBUTES_CONFLICTING_SOURCE_TAGS_FIELDS = 3005; + * * TRANSITION_ATTRIBUTES_UNSPECIFIED_DESTINATION_TAGS = 3006; + * * TRANSITION_ATTRIBUTES_CONFLICTING_DESTINATION_TAGS_FIELDS = 3007; + * * TRANSITION_ATTRIBUTES_DELAY_DURATION_NEGATIVE_OR_NAN = 3008; + * * TRANSITION_ATTRIBUTES_DELAY_DURATION_EXCEEDS_GLOBAL_DURATION = 3009; + * * AMOUNT_ERROR = 31; + * * AMOUNT_NEGATIVE_VALUE = 3100; + * * LOAD_LIMIT_ERROR = 33; + * * LOAD_LIMIT_INVALID_COST_ABOVE_SOFT_MAX = 3303; + * * LOAD_LIMIT_SOFT_MAX_WITHOUT_COST_ABOVE_SOFT_MAX = 3304; + * * LOAD_LIMIT_COST_ABOVE_SOFT_MAX_WITHOUT_SOFT_MAX = 3305; + * * LOAD_LIMIT_NEGATIVE_SOFT_MAX = 3306; + * * LOAD_LIMIT_MIXED_DEMAND_TYPE = 3307; + * * LOAD_LIMIT_MAX_LOAD_NEGATIVE_VALUE = 3308; + * * LOAD_LIMIT_SOFT_MAX_ABOVE_MAX = 3309; + * * INTERVAL_ERROR = 34; + * * INTERVAL_MIN_EXCEEDS_MAX = 3401; + * * INTERVAL_NEGATIVE_MIN = 3402; + * * INTERVAL_NEGATIVE_MAX = 3403; + * * INTERVAL_MIN_EXCEEDS_CAPACITY = 3404; + * * INTERVAL_MAX_EXCEEDS_CAPACITY = 3405; + * * DISTANCE_LIMIT_ERROR = 36; + * * DISTANCE_LIMIT_INVALID_COST_AFTER_SOFT_MAX = 3601; + * * DISTANCE_LIMIT_SOFT_MAX_WITHOUT_COST_AFTER_SOFT_MAX = 3602; + * * DISTANCE_LIMIT_COST_AFTER_SOFT_MAX_WITHOUT_SOFT_MAX = 3603; + * * DISTANCE_LIMIT_NEGATIVE_MAX = 3604; + * * DISTANCE_LIMIT_NEGATIVE_SOFT_MAX = 3605; + * * DISTANCE_LIMIT_SOFT_MAX_LARGER_THAN_MAX = 3606; + * * DURATION_LIMIT_ERROR = 38; + * * DURATION_LIMIT_MAX_DURATION_NEGATIVE_OR_NAN = 3800; + * * DURATION_LIMIT_SOFT_MAX_DURATION_NEGATIVE_OR_NAN = 3801; + * * DURATION_LIMIT_INVALID_COST_PER_HOUR_AFTER_SOFT_MAX = 3802; + * * DURATION_LIMIT_SOFT_MAX_WITHOUT_COST_AFTER_SOFT_MAX = 3803; + * * DURATION_LIMIT_COST_AFTER_SOFT_MAX_WITHOUT_SOFT_MAX = 3804; + * * DURATION_LIMIT_QUADRATIC_SOFT_MAX_DURATION_NEGATIVE_OR_NAN = 3805; + * * DURATION_LIMIT_INVALID_COST_AFTER_QUADRATIC_SOFT_MAX = 3806; + * * DURATION_LIMIT_QUADRATIC_SOFT_MAX_WITHOUT_COST_PER_SQUARE_HOUR + * = 3807; + * * DURATION_LIMIT_COST_PER_SQUARE_HOUR_WITHOUT_QUADRATIC_SOFT_MAX + * = 3808; + * * DURATION_LIMIT_QUADRATIC_SOFT_MAX_WITHOUT_MAX = 3809; + * * DURATION_LIMIT_SOFT_MAX_LARGER_THAN_MAX = 3810; + * * DURATION_LIMIT_QUADRATIC_SOFT_MAX_LARGER_THAN_MAX = 3811; + * * DURATION_LIMIT_DIFF_BETWEEN_MAX_AND_QUADRATIC_SOFT_MAX_TOO_LARGE + * = 3812; + * * DURATION_LIMIT_MAX_DURATION_EXCEEDS_GLOBAL_DURATION = 3813; + * * DURATION_LIMIT_SOFT_MAX_DURATION_EXCEEDS_GLOBAL_DURATION = 3814; + * * DURATION_LIMIT_QUADRATIC_SOFT_MAX_DURATION_EXCEEDS_GLOBAL_DURATION + * = 3815; + * * SHIPMENT_ERROR = 40; + * * SHIPMENT_PD_LIMIT_WITHOUT_PICKUP_AND_DELIVERY = 4014; + * * SHIPMENT_PD_ABSOLUTE_DETOUR_LIMIT_DURATION_NEGATIVE_OR_NAN = 4000; + * * SHIPMENT_PD_ABSOLUTE_DETOUR_LIMIT_DURATION_EXCEEDS_GLOBAL_DURATION + * = 4001; + * * SHIPMENT_PD_RELATIVE_DETOUR_LIMIT_INVALID = 4015; + * * SHIPMENT_PD_DETOUR_LIMIT_AND_EXTRA_VISIT_DURATION = 4016; + * * SHIPMENT_PD_TIME_LIMIT_DURATION_NEGATIVE_OR_NAN = 4002; + * * SHIPMENT_PD_TIME_LIMIT_DURATION_EXCEEDS_GLOBAL_DURATION = 4003; + * * SHIPMENT_EMPTY_SHIPMENT_TYPE = 4004; + * * SHIPMENT_NO_PICKUP_NO_DELIVERY = 4005; + * * SHIPMENT_INVALID_PENALTY_COST = 4006; + * * SHIPMENT_ALLOWED_VEHICLE_INDEX_OUT_OF_BOUNDS = 4007; + * * SHIPMENT_DUPLICATE_ALLOWED_VEHICLE_INDEX = 4008; + * * SHIPMENT_INCONSISTENT_COST_FOR_VEHICLE_SIZE_WITHOUT_INDEX = 4009; + * * SHIPMENT_INCONSISTENT_COST_FOR_VEHICLE_SIZE_WITH_INDEX = 4010; + * * SHIPMENT_INVALID_COST_FOR_VEHICLE = 4011; + * * SHIPMENT_COST_FOR_VEHICLE_INDEX_OUT_OF_BOUNDS = 4012; + * * SHIPMENT_DUPLICATE_COST_FOR_VEHICLE_INDEX = 4013; + * * VEHICLE_ERROR = 42; + * * VEHICLE_EMPTY_REQUIRED_OPERATOR_TYPE = 4200; + * * VEHICLE_DUPLICATE_REQUIRED_OPERATOR_TYPE = 4201; + * * VEHICLE_NO_OPERATOR_WITH_REQUIRED_OPERATOR_TYPE = 4202; + * * VEHICLE_EMPTY_START_TAG = 4203; + * * VEHICLE_DUPLICATE_START_TAG = 4204; + * * VEHICLE_EMPTY_END_TAG = 4205; + * * VEHICLE_DUPLICATE_END_TAG = 4206; + * * VEHICLE_EXTRA_VISIT_DURATION_NEGATIVE_OR_NAN = 4207; + * * VEHICLE_EXTRA_VISIT_DURATION_EXCEEDS_GLOBAL_DURATION = 4208; + * * VEHICLE_EXTRA_VISIT_DURATION_EMPTY_KEY = 4209; + * * VEHICLE_FIRST_SHIPMENT_INDEX_OUT_OF_BOUNDS = 4210; + * * VEHICLE_FIRST_SHIPMENT_IGNORED = 4211; + * * VEHICLE_FIRST_SHIPMENT_NOT_BOUND = 4212; + * * VEHICLE_LAST_SHIPMENT_INDEX_OUT_OF_BOUNDS = 4213; + * * VEHICLE_LAST_SHIPMENT_IGNORED = 4214; + * * VEHICLE_LAST_SHIPMENT_NOT_BOUND = 4215; + * * VEHICLE_IGNORED_WITH_USED_IF_ROUTE_IS_EMPTY = 4216; + * * VEHICLE_INVALID_COST_PER_KILOMETER = 4217; + * * VEHICLE_INVALID_COST_PER_HOUR = 4218; + * * VEHICLE_INVALID_COST_PER_TRAVELED_HOUR = 4219; + * * VEHICLE_INVALID_FIXED_COST = 4220; + * * VEHICLE_INVALID_TRAVEL_DURATION_MULTIPLE = 4221; + * * VEHICLE_TRAVEL_DURATION_MULTIPLE_WITH_SHIPMENT_PD_DETOUR_LIMITS + * = 4223; + * * VEHICLE_MATRIX_INDEX_WITH_SHIPMENT_PD_DETOUR_LIMITS = 4224; + * * VEHICLE_MINIMUM_DURATION_LONGER_THAN_DURATION_LIMIT = 4222; + * * VISIT_REQUEST_ERROR = 44; + * * VISIT_REQUEST_EMPTY_TAG = 4400; + * * VISIT_REQUEST_DUPLICATE_TAG = 4401; + * * VISIT_REQUEST_DURATION_NEGATIVE_OR_NAN = 4404; + * * VISIT_REQUEST_DURATION_EXCEEDS_GLOBAL_DURATION = 4405; + * * PRECEDENCE_ERROR = 46; + * * PRECEDENCE_RULE_MISSING_FIRST_INDEX = 4600; + * * PRECEDENCE_RULE_MISSING_SECOND_INDEX = 4601; + * * PRECEDENCE_RULE_FIRST_INDEX_OUT_OF_BOUNDS = 4602; + * * PRECEDENCE_RULE_SECOND_INDEX_OUT_OF_BOUNDS = 4603; + * * PRECEDENCE_RULE_DUPLICATE_INDEX = 4604; + * * PRECEDENCE_RULE_INEXISTENT_FIRST_VISIT_REQUEST = 4605; + * * PRECEDENCE_RULE_INEXISTENT_SECOND_VISIT_REQUEST = 4606; + * * BREAK_ERROR = 48; + * * BREAK_RULE_EMPTY = 4800; + * * BREAK_REQUEST_UNSPECIFIED_DURATION = 4801; + * * BREAK_REQUEST_UNSPECIFIED_EARLIEST_START_TIME = 4802; + * * BREAK_REQUEST_UNSPECIFIED_LATEST_START_TIME = 4803; + * * BREAK_REQUEST_DURATION_NEGATIVE_OR_NAN = 4804; = 4804; + * * BREAK_REQUEST_LATEST_START_TIME_BEFORE_EARLIEST_START_TIME = 4805; + * * BREAK_REQUEST_EARLIEST_START_TIME_BEFORE_GLOBAL_START_TIME = 4806; + * * BREAK_REQUEST_LATEST_END_TIME_AFTER_GLOBAL_END_TIME = 4807; + * * BREAK_REQUEST_NON_SCHEDULABLE = 4808; + * * BREAK_FREQUENCY_MAX_INTER_BREAK_DURATION_NEGATIVE_OR_NAN = 4809; + * * BREAK_FREQUENCY_MIN_BREAK_DURATION_NEGATIVE_OR_NAN = 4810; + * * BREAK_FREQUENCY_MIN_BREAK_DURATION_EXCEEDS_GLOBAL_DURATION = 4811; + * * BREAK_FREQUENCY_MAX_INTER_BREAK_DURATION_EXCEEDS_GLOBAL_DURATION + * = 4812; + * * BREAK_REQUEST_DURATION_EXCEEDS_GLOBAL_DURATION = 4813; + * * BREAK_FREQUENCY_MISSING_MAX_INTER_BREAK_DURATION = 4814; + * * BREAK_FREQUENCY_MISSING_MIN_BREAK_DURATION = 4815; + * * SHIPMENT_TYPE_INCOMPATIBILITY_ERROR = 50; + * * SHIPMENT_TYPE_INCOMPATIBILITY_EMPTY_TYPE = 5001; + * * SHIPMENT_TYPE_INCOMPATIBILITY_LESS_THAN_TWO_TYPES = 5002; + * * SHIPMENT_TYPE_INCOMPATIBILITY_DUPLICATE_TYPE = 5003; + * * SHIPMENT_TYPE_INCOMPATIBILITY_INVALID_INCOMPATIBILITY_MODE = 5004; + * * SHIPMENT_TYPE_INCOMPATIBILITY_TOO_MANY_INCOMPATIBILITIES = 5005; + * * SHIPMENT_TYPE_REQUIREMENT_ERROR = 52; + * * SHIPMENT_TYPE_REQUIREMENT_NO_REQUIRED_TYPE = 52001; + * * SHIPMENT_TYPE_REQUIREMENT_NO_DEPENDENT_TYPE = 52002; + * * SHIPMENT_TYPE_REQUIREMENT_INVALID_REQUIREMENT_MODE = 52003; + * * SHIPMENT_TYPE_REQUIREMENT_TOO_MANY_REQUIREMENTS = 52004; + * * SHIPMENT_TYPE_REQUIREMENT_EMPTY_REQUIRED_TYPE = 52005; + * * SHIPMENT_TYPE_REQUIREMENT_DUPLICATE_REQUIRED_TYPE = 52006; + * * SHIPMENT_TYPE_REQUIREMENT_NO_REQUIRED_TYPE_FOUND = 52007; + * * SHIPMENT_TYPE_REQUIREMENT_EMPTY_DEPENDENT_TYPE = 52008; + * * SHIPMENT_TYPE_REQUIREMENT_DUPLICATE_DEPENDENT_TYPE = 52009; + * * SHIPMENT_TYPE_REQUIREMENT_SELF_DEPENDENT_TYPE = 52010; + * * SHIPMENT_TYPE_REQUIREMENT_GRAPH_HAS_CYCLES = 52011; + * * VEHICLE_OPERATOR_ERROR = 54; + * * VEHICLE_OPERATOR_EMPTY_TYPE = 5400; + * * VEHICLE_OPERATOR_MULTIPLE_START_TIME_WINDOWS = 5401; + * * VEHICLE_OPERATOR_SOFT_START_TIME_WINDOW = 5402; + * * VEHICLE_OPERATOR_MULTIPLE_END_TIME_WINDOWS = 5403; + * * VEHICLE_OPERATOR_SOFT_END_TIME_WINDOW = 5404; + * * DURATION_SECONDS_MATRIX_ERROR = 56; + * * DURATION_SECONDS_MATRIX_DURATION_NEGATIVE_OR_NAN = 5600; + * * DURATION_SECONDS_MATRIX_DURATION_EXCEEDS_GLOBAL_DURATION = 5601; + * + * Generated from protobuf field int32 code = 1; + * @return int + */ + public function getCode() + { + return $this->code; + } + + /** + * A validation error is defined by the pair (`code`, `display_name`) which + * are always present. + * Other fields (below) provide more context about the error. + * *MULTIPLE ERRORS*: + * When there are multiple errors, the validation process tries to output + * several of them. Much like a compiler, this is an imperfect process. Some + * validation errors will be "fatal", meaning that they stop the entire + * validation process. This is the case for `display_name="UNSPECIFIED"` + * errors, among others. Some may cause the validation process to skip other + * errors. + * *STABILITY*: + * `code` and `display_name` should be very stable. But new codes and + * display names may appear over time, which may cause a given (invalid) + * request to yield a different (`code`, `display_name`) pair because the new + * error hid the old one (see "MULTIPLE ERRORS"). + * *REFERENCE*: A list of all (code, name) pairs: + * * UNSPECIFIED = 0; + * * VALIDATION_TIMEOUT_ERROR = 10; Validation couldn't be completed within + * the deadline. + * * REQUEST_OPTIONS_ERROR = 12; + * * REQUEST_OPTIONS_INVALID_SOLVING_MODE = 1201; + * * REQUEST_OPTIONS_INVALID_MAX_VALIDATION_ERRORS = 1203; + * * REQUEST_OPTIONS_INVALID_GEODESIC_METERS_PER_SECOND = 1204; + * * REQUEST_OPTIONS_GEODESIC_METERS_PER_SECOND_TOO_SMALL = 1205; + * * REQUEST_OPTIONS_MISSING_GEODESIC_METERS_PER_SECOND = 1206; + * * REQUEST_OPTIONS_POPULATE_PATHFINDER_TRIPS_AND_GEODESIC_DISTANCE + * = 1207; + * * REQUEST_OPTIONS_COST_MODEL_OPTIONS_AND_GEODESIC_DISTANCE = 1208; + * * REQUEST_OPTIONS_TRAVEL_MODE_INCOMPATIBLE_WITH_TRAFFIC = 1211; + * * REQUEST_OPTIONS_MULTIPLE_TRAFFIC_FLAVORS = 1212; + * * REQUEST_OPTIONS_INVALID_TRAFFIC_FLAVOR = 1213; + * * REQUEST_OPTIONS_TRAFFIC_ENABLED_WITHOUT_GLOBAL_START_TIME = 1214; + * * REQUEST_OPTIONS_TRAFFIC_ENABLED_WITH_PRECEDENCES = 1215; + * * REQUEST_OPTIONS_TRAFFIC_PREFILL_MODE_INVALID = 1216; + * * REQUEST_OPTIONS_TRAFFIC_PREFILL_ENABLED_WITHOUT_TRAFFIC = 1217; + * * INJECTED_SOLUTION_ERROR = 20; + * * INJECTED_SOLUTION_MISSING_LABEL = 2000; + * * INJECTED_SOLUTION_DUPLICATE_LABEL = 2001; + * * INJECTED_SOLUTION_AMBIGUOUS_INDEX = 2002; + * * INJECTED_SOLUTION_INFEASIBLE_AFTER_GETTING_TRAVEL_TIMES = 2003; + * * INJECTED_SOLUTION_TRANSITION_INCONSISTENT_WITH_ACTUAL_TRAVEL = 2004; + * * INJECTED_SOLUTION_CONCURRENT_SOLUTION_TYPES = 2005; + * * INJECTED_SOLUTION_MORE_THAN_ONE_PER_TYPE = 2006; + * * INJECTED_SOLUTION_REFRESH_WITHOUT_POPULATE = 2008; + * * INJECTED_SOLUTION_CONSTRAINED_ROUTE_PORTION_INFEASIBLE = 2010; + * * SHIPMENT_MODEL_ERROR = 22; + * * SHIPMENT_MODEL_TOO_LARGE = 2200; + * * SHIPMENT_MODEL_TOO_MANY_CAPACITY_TYPES = 2201; + * * SHIPMENT_MODEL_GLOBAL_START_TIME_NEGATIVE_OR_NAN = 2202; + * * SHIPMENT_MODEL_GLOBAL_END_TIME_TOO_LARGE_OR_NAN = 2203; + * * SHIPMENT_MODEL_GLOBAL_START_TIME_AFTER_GLOBAL_END_TIME = 2204; + * * SHIPMENT_MODEL_GLOBAL_DURATION_TOO_LONG = 2205; + * * SHIPMENT_MODEL_MAX_ACTIVE_VEHICLES_NOT_POSITIVE = 2206; + * * SHIPMENT_MODEL_DURATION_MATRIX_TOO_LARGE = 2207; + * * INDEX_ERROR = 24; + * * TAG_ERROR = 26; + * * TIME_WINDOW_ERROR = 28; + * * TIME_WINDOW_INVALID_START_TIME = 2800; + * * TIME_WINDOW_INVALID_END_TIME = 2801; + * * TIME_WINDOW_INVALID_SOFT_START_TIME = 2802; + * * TIME_WINDOW_INVALID_SOFT_END_TIME = 2803; + * * TIME_WINDOW_OUTSIDE_GLOBAL_TIME_WINDOW = 2804; + * * TIME_WINDOW_START_TIME_AFTER_END_TIME = 2805; + * * TIME_WINDOW_INVALID_COST_PER_HOUR_BEFORE_SOFT_START_TIME = 2806; + * * TIME_WINDOW_INVALID_COST_PER_HOUR_AFTER_SOFT_END_TIME = 2807; + * * TIME_WINDOW_COST_BEFORE_SOFT_START_TIME_WITHOUT_SOFT_START_TIME + * = 2808; + * * TIME_WINDOW_COST_AFTER_SOFT_END_TIME_WITHOUT_SOFT_END_TIME = 2809; + * * TIME_WINDOW_SOFT_START_TIME_WITHOUT_COST_BEFORE_SOFT_START_TIME + * = 2810; + * * TIME_WINDOW_SOFT_END_TIME_WITHOUT_COST_AFTER_SOFT_END_TIME = 2811; + * * TIME_WINDOW_OVERLAPPING_ADJACENT_OR_EARLIER_THAN_PREVIOUS = 2812; + * * TIME_WINDOW_START_TIME_AFTER_SOFT_START_TIME = 2813; + * * TIME_WINDOW_SOFT_START_TIME_AFTER_END_TIME = 2814; + * * TIME_WINDOW_START_TIME_AFTER_SOFT_END_TIME = 2815; + * * TIME_WINDOW_SOFT_END_TIME_AFTER_END_TIME = 2816; + * * TIME_WINDOW_COST_BEFORE_SOFT_START_TIME_SET_AND_MULTIPLE_WINDOWS + * = 2817; + * * TIME_WINDOW_COST_AFTER_SOFT_END_TIME_SET_AND_MULTIPLE_WINDOWS = 2818; + * * TRANSITION_ATTRIBUTES_ERROR = 30; + * * TRANSITION_ATTRIBUTES_INVALID_COST = 3000; + * * TRANSITION_ATTRIBUTES_INVALID_COST_PER_KILOMETER = 3001; + * * TRANSITION_ATTRIBUTES_DUPLICATE_TAG_PAIR = 3002; + * * TRANSITION_ATTRIBUTES_DISTANCE_LIMIT_MAX_METERS_UNSUPPORTED = 3003; + * * TRANSITION_ATTRIBUTES_UNSPECIFIED_SOURCE_TAGS = 3004; + * * TRANSITION_ATTRIBUTES_CONFLICTING_SOURCE_TAGS_FIELDS = 3005; + * * TRANSITION_ATTRIBUTES_UNSPECIFIED_DESTINATION_TAGS = 3006; + * * TRANSITION_ATTRIBUTES_CONFLICTING_DESTINATION_TAGS_FIELDS = 3007; + * * TRANSITION_ATTRIBUTES_DELAY_DURATION_NEGATIVE_OR_NAN = 3008; + * * TRANSITION_ATTRIBUTES_DELAY_DURATION_EXCEEDS_GLOBAL_DURATION = 3009; + * * AMOUNT_ERROR = 31; + * * AMOUNT_NEGATIVE_VALUE = 3100; + * * LOAD_LIMIT_ERROR = 33; + * * LOAD_LIMIT_INVALID_COST_ABOVE_SOFT_MAX = 3303; + * * LOAD_LIMIT_SOFT_MAX_WITHOUT_COST_ABOVE_SOFT_MAX = 3304; + * * LOAD_LIMIT_COST_ABOVE_SOFT_MAX_WITHOUT_SOFT_MAX = 3305; + * * LOAD_LIMIT_NEGATIVE_SOFT_MAX = 3306; + * * LOAD_LIMIT_MIXED_DEMAND_TYPE = 3307; + * * LOAD_LIMIT_MAX_LOAD_NEGATIVE_VALUE = 3308; + * * LOAD_LIMIT_SOFT_MAX_ABOVE_MAX = 3309; + * * INTERVAL_ERROR = 34; + * * INTERVAL_MIN_EXCEEDS_MAX = 3401; + * * INTERVAL_NEGATIVE_MIN = 3402; + * * INTERVAL_NEGATIVE_MAX = 3403; + * * INTERVAL_MIN_EXCEEDS_CAPACITY = 3404; + * * INTERVAL_MAX_EXCEEDS_CAPACITY = 3405; + * * DISTANCE_LIMIT_ERROR = 36; + * * DISTANCE_LIMIT_INVALID_COST_AFTER_SOFT_MAX = 3601; + * * DISTANCE_LIMIT_SOFT_MAX_WITHOUT_COST_AFTER_SOFT_MAX = 3602; + * * DISTANCE_LIMIT_COST_AFTER_SOFT_MAX_WITHOUT_SOFT_MAX = 3603; + * * DISTANCE_LIMIT_NEGATIVE_MAX = 3604; + * * DISTANCE_LIMIT_NEGATIVE_SOFT_MAX = 3605; + * * DISTANCE_LIMIT_SOFT_MAX_LARGER_THAN_MAX = 3606; + * * DURATION_LIMIT_ERROR = 38; + * * DURATION_LIMIT_MAX_DURATION_NEGATIVE_OR_NAN = 3800; + * * DURATION_LIMIT_SOFT_MAX_DURATION_NEGATIVE_OR_NAN = 3801; + * * DURATION_LIMIT_INVALID_COST_PER_HOUR_AFTER_SOFT_MAX = 3802; + * * DURATION_LIMIT_SOFT_MAX_WITHOUT_COST_AFTER_SOFT_MAX = 3803; + * * DURATION_LIMIT_COST_AFTER_SOFT_MAX_WITHOUT_SOFT_MAX = 3804; + * * DURATION_LIMIT_QUADRATIC_SOFT_MAX_DURATION_NEGATIVE_OR_NAN = 3805; + * * DURATION_LIMIT_INVALID_COST_AFTER_QUADRATIC_SOFT_MAX = 3806; + * * DURATION_LIMIT_QUADRATIC_SOFT_MAX_WITHOUT_COST_PER_SQUARE_HOUR + * = 3807; + * * DURATION_LIMIT_COST_PER_SQUARE_HOUR_WITHOUT_QUADRATIC_SOFT_MAX + * = 3808; + * * DURATION_LIMIT_QUADRATIC_SOFT_MAX_WITHOUT_MAX = 3809; + * * DURATION_LIMIT_SOFT_MAX_LARGER_THAN_MAX = 3810; + * * DURATION_LIMIT_QUADRATIC_SOFT_MAX_LARGER_THAN_MAX = 3811; + * * DURATION_LIMIT_DIFF_BETWEEN_MAX_AND_QUADRATIC_SOFT_MAX_TOO_LARGE + * = 3812; + * * DURATION_LIMIT_MAX_DURATION_EXCEEDS_GLOBAL_DURATION = 3813; + * * DURATION_LIMIT_SOFT_MAX_DURATION_EXCEEDS_GLOBAL_DURATION = 3814; + * * DURATION_LIMIT_QUADRATIC_SOFT_MAX_DURATION_EXCEEDS_GLOBAL_DURATION + * = 3815; + * * SHIPMENT_ERROR = 40; + * * SHIPMENT_PD_LIMIT_WITHOUT_PICKUP_AND_DELIVERY = 4014; + * * SHIPMENT_PD_ABSOLUTE_DETOUR_LIMIT_DURATION_NEGATIVE_OR_NAN = 4000; + * * SHIPMENT_PD_ABSOLUTE_DETOUR_LIMIT_DURATION_EXCEEDS_GLOBAL_DURATION + * = 4001; + * * SHIPMENT_PD_RELATIVE_DETOUR_LIMIT_INVALID = 4015; + * * SHIPMENT_PD_DETOUR_LIMIT_AND_EXTRA_VISIT_DURATION = 4016; + * * SHIPMENT_PD_TIME_LIMIT_DURATION_NEGATIVE_OR_NAN = 4002; + * * SHIPMENT_PD_TIME_LIMIT_DURATION_EXCEEDS_GLOBAL_DURATION = 4003; + * * SHIPMENT_EMPTY_SHIPMENT_TYPE = 4004; + * * SHIPMENT_NO_PICKUP_NO_DELIVERY = 4005; + * * SHIPMENT_INVALID_PENALTY_COST = 4006; + * * SHIPMENT_ALLOWED_VEHICLE_INDEX_OUT_OF_BOUNDS = 4007; + * * SHIPMENT_DUPLICATE_ALLOWED_VEHICLE_INDEX = 4008; + * * SHIPMENT_INCONSISTENT_COST_FOR_VEHICLE_SIZE_WITHOUT_INDEX = 4009; + * * SHIPMENT_INCONSISTENT_COST_FOR_VEHICLE_SIZE_WITH_INDEX = 4010; + * * SHIPMENT_INVALID_COST_FOR_VEHICLE = 4011; + * * SHIPMENT_COST_FOR_VEHICLE_INDEX_OUT_OF_BOUNDS = 4012; + * * SHIPMENT_DUPLICATE_COST_FOR_VEHICLE_INDEX = 4013; + * * VEHICLE_ERROR = 42; + * * VEHICLE_EMPTY_REQUIRED_OPERATOR_TYPE = 4200; + * * VEHICLE_DUPLICATE_REQUIRED_OPERATOR_TYPE = 4201; + * * VEHICLE_NO_OPERATOR_WITH_REQUIRED_OPERATOR_TYPE = 4202; + * * VEHICLE_EMPTY_START_TAG = 4203; + * * VEHICLE_DUPLICATE_START_TAG = 4204; + * * VEHICLE_EMPTY_END_TAG = 4205; + * * VEHICLE_DUPLICATE_END_TAG = 4206; + * * VEHICLE_EXTRA_VISIT_DURATION_NEGATIVE_OR_NAN = 4207; + * * VEHICLE_EXTRA_VISIT_DURATION_EXCEEDS_GLOBAL_DURATION = 4208; + * * VEHICLE_EXTRA_VISIT_DURATION_EMPTY_KEY = 4209; + * * VEHICLE_FIRST_SHIPMENT_INDEX_OUT_OF_BOUNDS = 4210; + * * VEHICLE_FIRST_SHIPMENT_IGNORED = 4211; + * * VEHICLE_FIRST_SHIPMENT_NOT_BOUND = 4212; + * * VEHICLE_LAST_SHIPMENT_INDEX_OUT_OF_BOUNDS = 4213; + * * VEHICLE_LAST_SHIPMENT_IGNORED = 4214; + * * VEHICLE_LAST_SHIPMENT_NOT_BOUND = 4215; + * * VEHICLE_IGNORED_WITH_USED_IF_ROUTE_IS_EMPTY = 4216; + * * VEHICLE_INVALID_COST_PER_KILOMETER = 4217; + * * VEHICLE_INVALID_COST_PER_HOUR = 4218; + * * VEHICLE_INVALID_COST_PER_TRAVELED_HOUR = 4219; + * * VEHICLE_INVALID_FIXED_COST = 4220; + * * VEHICLE_INVALID_TRAVEL_DURATION_MULTIPLE = 4221; + * * VEHICLE_TRAVEL_DURATION_MULTIPLE_WITH_SHIPMENT_PD_DETOUR_LIMITS + * = 4223; + * * VEHICLE_MATRIX_INDEX_WITH_SHIPMENT_PD_DETOUR_LIMITS = 4224; + * * VEHICLE_MINIMUM_DURATION_LONGER_THAN_DURATION_LIMIT = 4222; + * * VISIT_REQUEST_ERROR = 44; + * * VISIT_REQUEST_EMPTY_TAG = 4400; + * * VISIT_REQUEST_DUPLICATE_TAG = 4401; + * * VISIT_REQUEST_DURATION_NEGATIVE_OR_NAN = 4404; + * * VISIT_REQUEST_DURATION_EXCEEDS_GLOBAL_DURATION = 4405; + * * PRECEDENCE_ERROR = 46; + * * PRECEDENCE_RULE_MISSING_FIRST_INDEX = 4600; + * * PRECEDENCE_RULE_MISSING_SECOND_INDEX = 4601; + * * PRECEDENCE_RULE_FIRST_INDEX_OUT_OF_BOUNDS = 4602; + * * PRECEDENCE_RULE_SECOND_INDEX_OUT_OF_BOUNDS = 4603; + * * PRECEDENCE_RULE_DUPLICATE_INDEX = 4604; + * * PRECEDENCE_RULE_INEXISTENT_FIRST_VISIT_REQUEST = 4605; + * * PRECEDENCE_RULE_INEXISTENT_SECOND_VISIT_REQUEST = 4606; + * * BREAK_ERROR = 48; + * * BREAK_RULE_EMPTY = 4800; + * * BREAK_REQUEST_UNSPECIFIED_DURATION = 4801; + * * BREAK_REQUEST_UNSPECIFIED_EARLIEST_START_TIME = 4802; + * * BREAK_REQUEST_UNSPECIFIED_LATEST_START_TIME = 4803; + * * BREAK_REQUEST_DURATION_NEGATIVE_OR_NAN = 4804; = 4804; + * * BREAK_REQUEST_LATEST_START_TIME_BEFORE_EARLIEST_START_TIME = 4805; + * * BREAK_REQUEST_EARLIEST_START_TIME_BEFORE_GLOBAL_START_TIME = 4806; + * * BREAK_REQUEST_LATEST_END_TIME_AFTER_GLOBAL_END_TIME = 4807; + * * BREAK_REQUEST_NON_SCHEDULABLE = 4808; + * * BREAK_FREQUENCY_MAX_INTER_BREAK_DURATION_NEGATIVE_OR_NAN = 4809; + * * BREAK_FREQUENCY_MIN_BREAK_DURATION_NEGATIVE_OR_NAN = 4810; + * * BREAK_FREQUENCY_MIN_BREAK_DURATION_EXCEEDS_GLOBAL_DURATION = 4811; + * * BREAK_FREQUENCY_MAX_INTER_BREAK_DURATION_EXCEEDS_GLOBAL_DURATION + * = 4812; + * * BREAK_REQUEST_DURATION_EXCEEDS_GLOBAL_DURATION = 4813; + * * BREAK_FREQUENCY_MISSING_MAX_INTER_BREAK_DURATION = 4814; + * * BREAK_FREQUENCY_MISSING_MIN_BREAK_DURATION = 4815; + * * SHIPMENT_TYPE_INCOMPATIBILITY_ERROR = 50; + * * SHIPMENT_TYPE_INCOMPATIBILITY_EMPTY_TYPE = 5001; + * * SHIPMENT_TYPE_INCOMPATIBILITY_LESS_THAN_TWO_TYPES = 5002; + * * SHIPMENT_TYPE_INCOMPATIBILITY_DUPLICATE_TYPE = 5003; + * * SHIPMENT_TYPE_INCOMPATIBILITY_INVALID_INCOMPATIBILITY_MODE = 5004; + * * SHIPMENT_TYPE_INCOMPATIBILITY_TOO_MANY_INCOMPATIBILITIES = 5005; + * * SHIPMENT_TYPE_REQUIREMENT_ERROR = 52; + * * SHIPMENT_TYPE_REQUIREMENT_NO_REQUIRED_TYPE = 52001; + * * SHIPMENT_TYPE_REQUIREMENT_NO_DEPENDENT_TYPE = 52002; + * * SHIPMENT_TYPE_REQUIREMENT_INVALID_REQUIREMENT_MODE = 52003; + * * SHIPMENT_TYPE_REQUIREMENT_TOO_MANY_REQUIREMENTS = 52004; + * * SHIPMENT_TYPE_REQUIREMENT_EMPTY_REQUIRED_TYPE = 52005; + * * SHIPMENT_TYPE_REQUIREMENT_DUPLICATE_REQUIRED_TYPE = 52006; + * * SHIPMENT_TYPE_REQUIREMENT_NO_REQUIRED_TYPE_FOUND = 52007; + * * SHIPMENT_TYPE_REQUIREMENT_EMPTY_DEPENDENT_TYPE = 52008; + * * SHIPMENT_TYPE_REQUIREMENT_DUPLICATE_DEPENDENT_TYPE = 52009; + * * SHIPMENT_TYPE_REQUIREMENT_SELF_DEPENDENT_TYPE = 52010; + * * SHIPMENT_TYPE_REQUIREMENT_GRAPH_HAS_CYCLES = 52011; + * * VEHICLE_OPERATOR_ERROR = 54; + * * VEHICLE_OPERATOR_EMPTY_TYPE = 5400; + * * VEHICLE_OPERATOR_MULTIPLE_START_TIME_WINDOWS = 5401; + * * VEHICLE_OPERATOR_SOFT_START_TIME_WINDOW = 5402; + * * VEHICLE_OPERATOR_MULTIPLE_END_TIME_WINDOWS = 5403; + * * VEHICLE_OPERATOR_SOFT_END_TIME_WINDOW = 5404; + * * DURATION_SECONDS_MATRIX_ERROR = 56; + * * DURATION_SECONDS_MATRIX_DURATION_NEGATIVE_OR_NAN = 5600; + * * DURATION_SECONDS_MATRIX_DURATION_EXCEEDS_GLOBAL_DURATION = 5601; + * + * Generated from protobuf field int32 code = 1; + * @param int $var + * @return $this + */ + public function setCode($var) + { + GPBUtil::checkInt32($var); + $this->code = $var; + + return $this; + } + + /** + * The error display name. + * + * Generated from protobuf field string display_name = 2; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * The error display name. + * + * Generated from protobuf field string display_name = 2; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * An error context may involve 0, 1 (most of the time) or more fields. For + * example, referring to vehicle #4 and shipment #2's first pickup can be + * done as follows: + * ``` + * fields { name: "vehicles" index: 4} + * fields { name: "shipments" index: 2 sub_field {name: "pickups" index: 0} } + * ``` + * Note, however, that the cardinality of `fields` should not change for a + * given error code. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.OptimizeToursValidationError.FieldReference fields = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFields() + { + return $this->fields; + } + + /** + * An error context may involve 0, 1 (most of the time) or more fields. For + * example, referring to vehicle #4 and shipment #2's first pickup can be + * done as follows: + * ``` + * fields { name: "vehicles" index: 4} + * fields { name: "shipments" index: 2 sub_field {name: "pickups" index: 0} } + * ``` + * Note, however, that the cardinality of `fields` should not change for a + * given error code. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.OptimizeToursValidationError.FieldReference fields = 3; + * @param array<\Google\Cloud\Optimization\V1\OptimizeToursValidationError\FieldReference>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFields($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\OptimizeToursValidationError\FieldReference::class); + $this->fields = $arr; + + return $this; + } + + /** + * Human-readable string describing the error. There is a 1:1 mapping + * between `code` and `error_message` (when code != "UNSPECIFIED"). + * *STABILITY*: Not stable: the error message associated to a given `code` may + * change (hopefully to clarify it) over time. Please rely on the + * `display_name` and `code` instead. + * + * Generated from protobuf field string error_message = 4; + * @return string + */ + public function getErrorMessage() + { + return $this->error_message; + } + + /** + * Human-readable string describing the error. There is a 1:1 mapping + * between `code` and `error_message` (when code != "UNSPECIFIED"). + * *STABILITY*: Not stable: the error message associated to a given `code` may + * change (hopefully to clarify it) over time. Please rely on the + * `display_name` and `code` instead. + * + * Generated from protobuf field string error_message = 4; + * @param string $var + * @return $this + */ + public function setErrorMessage($var) + { + GPBUtil::checkString($var, True); + $this->error_message = $var; + + return $this; + } + + /** + * May contain the value(s) of the field(s). This is not always available. You + * should absolutely not rely on it and use it only for manual model + * debugging. + * + * Generated from protobuf field string offending_values = 5; + * @return string + */ + public function getOffendingValues() + { + return $this->offending_values; + } + + /** + * May contain the value(s) of the field(s). This is not always available. You + * should absolutely not rely on it and use it only for manual model + * debugging. + * + * Generated from protobuf field string offending_values = 5; + * @param string $var + * @return $this + */ + public function setOffendingValues($var) + { + GPBUtil::checkString($var, True); + $this->offending_values = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/OptimizeToursValidationError/FieldReference.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/OptimizeToursValidationError/FieldReference.php new file mode 100644 index 000000000000..6054ab294a5e --- /dev/null +++ b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/OptimizeToursValidationError/FieldReference.php @@ -0,0 +1,197 @@ +google.cloud.optimization.v1.OptimizeToursValidationError.FieldReference + */ +class FieldReference extends \Google\Protobuf\Internal\Message +{ + /** + * Name of the field, e.g., "vehicles". + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Recursively nested sub-field, if needed. + * + * Generated from protobuf field .google.cloud.optimization.v1.OptimizeToursValidationError.FieldReference sub_field = 3; + */ + protected $sub_field = null; + protected $index_or_key; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Name of the field, e.g., "vehicles". + * @type int $index + * Index of the field if repeated. + * @type string $key + * Key if the field is a map. + * @type \Google\Cloud\Optimization\V1\OptimizeToursValidationError\FieldReference $sub_field + * Recursively nested sub-field, if needed. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); + parent::__construct($data); + } + + /** + * Name of the field, e.g., "vehicles". + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Name of the field, e.g., "vehicles". + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Index of the field if repeated. + * + * Generated from protobuf field int32 index = 2; + * @return int + */ + public function getIndex() + { + return $this->readOneof(2); + } + + public function hasIndex() + { + return $this->hasOneof(2); + } + + /** + * Index of the field if repeated. + * + * Generated from protobuf field int32 index = 2; + * @param int $var + * @return $this + */ + public function setIndex($var) + { + GPBUtil::checkInt32($var); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Key if the field is a map. + * + * Generated from protobuf field string key = 4; + * @return string + */ + public function getKey() + { + return $this->readOneof(4); + } + + public function hasKey() + { + return $this->hasOneof(4); + } + + /** + * Key if the field is a map. + * + * Generated from protobuf field string key = 4; + * @param string $var + * @return $this + */ + public function setKey($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Recursively nested sub-field, if needed. + * + * Generated from protobuf field .google.cloud.optimization.v1.OptimizeToursValidationError.FieldReference sub_field = 3; + * @return \Google\Cloud\Optimization\V1\OptimizeToursValidationError\FieldReference|null + */ + public function getSubField() + { + return $this->sub_field; + } + + public function hasSubField() + { + return isset($this->sub_field); + } + + public function clearSubField() + { + unset($this->sub_field); + } + + /** + * Recursively nested sub-field, if needed. + * + * Generated from protobuf field .google.cloud.optimization.v1.OptimizeToursValidationError.FieldReference sub_field = 3; + * @param \Google\Cloud\Optimization\V1\OptimizeToursValidationError\FieldReference $var + * @return $this + */ + public function setSubField($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Optimization\V1\OptimizeToursValidationError\FieldReference::class); + $this->sub_field = $var; + + return $this; + } + + /** + * @return string + */ + public function getIndexOrKey() + { + return $this->whichOneof("index_or_key"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(FieldReference::class, \Google\Cloud\Optimization\V1\OptimizeToursValidationError_FieldReference::class); + diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/OutputConfig.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/OutputConfig.php new file mode 100644 index 000000000000..b8b6565a9842 --- /dev/null +++ b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/OutputConfig.php @@ -0,0 +1,109 @@ +google.cloud.optimization.v1.OutputConfig + */ +class OutputConfig extends \Google\Protobuf\Internal\Message +{ + /** + * The output data format that used to store the results in Cloud Storage. + * + * Generated from protobuf field .google.cloud.optimization.v1.DataFormat data_format = 2; + */ + protected $data_format = 0; + protected $destination; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Optimization\V1\GcsDestination $gcs_destination + * The Google Cloud Storage location to write the output to. + * @type int $data_format + * The output data format that used to store the results in Cloud Storage. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Optimization\V1\AsyncModel::initOnce(); + parent::__construct($data); + } + + /** + * The Google Cloud Storage location to write the output to. + * + * Generated from protobuf field .google.cloud.optimization.v1.GcsDestination gcs_destination = 1; + * @return \Google\Cloud\Optimization\V1\GcsDestination|null + */ + public function getGcsDestination() + { + return $this->readOneof(1); + } + + public function hasGcsDestination() + { + return $this->hasOneof(1); + } + + /** + * The Google Cloud Storage location to write the output to. + * + * Generated from protobuf field .google.cloud.optimization.v1.GcsDestination gcs_destination = 1; + * @param \Google\Cloud\Optimization\V1\GcsDestination $var + * @return $this + */ + public function setGcsDestination($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Optimization\V1\GcsDestination::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * The output data format that used to store the results in Cloud Storage. + * + * Generated from protobuf field .google.cloud.optimization.v1.DataFormat data_format = 2; + * @return int + */ + public function getDataFormat() + { + return $this->data_format; + } + + /** + * The output data format that used to store the results in Cloud Storage. + * + * Generated from protobuf field .google.cloud.optimization.v1.DataFormat data_format = 2; + * @param int $var + * @return $this + */ + public function setDataFormat($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Optimization\V1\DataFormat::class); + $this->data_format = $var; + + return $this; + } + + /** + * @return string + */ + public function getDestination() + { + return $this->whichOneof("destination"); + } + +} + diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/RouteModifiers.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/RouteModifiers.php new file mode 100644 index 000000000000..0a3309db7946 --- /dev/null +++ b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/RouteModifiers.php @@ -0,0 +1,204 @@ +google.cloud.optimization.v1.RouteModifiers + */ +class RouteModifiers extends \Google\Protobuf\Internal\Message +{ + /** + * Specifies whether to avoid toll roads where reasonable. Preference will be + * given to routes not containing toll roads. Applies only to motorized travel + * modes. + * + * Generated from protobuf field bool avoid_tolls = 2; + */ + protected $avoid_tolls = false; + /** + * Specifies whether to avoid highways where reasonable. Preference will be + * given to routes not containing highways. Applies only to motorized travel + * modes. + * + * Generated from protobuf field bool avoid_highways = 3; + */ + protected $avoid_highways = false; + /** + * Specifies whether to avoid ferries where reasonable. Preference will be + * given to routes not containing travel by ferries. Applies only to motorized + * travel modes. + * + * Generated from protobuf field bool avoid_ferries = 4; + */ + protected $avoid_ferries = false; + /** + * Optional. Specifies whether to avoid navigating indoors where reasonable. + * Preference will be given to routes not containing indoor navigation. + * Applies only to the `WALKING` travel mode. + * + * Generated from protobuf field bool avoid_indoor = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $avoid_indoor = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $avoid_tolls + * Specifies whether to avoid toll roads where reasonable. Preference will be + * given to routes not containing toll roads. Applies only to motorized travel + * modes. + * @type bool $avoid_highways + * Specifies whether to avoid highways where reasonable. Preference will be + * given to routes not containing highways. Applies only to motorized travel + * modes. + * @type bool $avoid_ferries + * Specifies whether to avoid ferries where reasonable. Preference will be + * given to routes not containing travel by ferries. Applies only to motorized + * travel modes. + * @type bool $avoid_indoor + * Optional. Specifies whether to avoid navigating indoors where reasonable. + * Preference will be given to routes not containing indoor navigation. + * Applies only to the `WALKING` travel mode. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); + parent::__construct($data); + } + + /** + * Specifies whether to avoid toll roads where reasonable. Preference will be + * given to routes not containing toll roads. Applies only to motorized travel + * modes. + * + * Generated from protobuf field bool avoid_tolls = 2; + * @return bool + */ + public function getAvoidTolls() + { + return $this->avoid_tolls; + } + + /** + * Specifies whether to avoid toll roads where reasonable. Preference will be + * given to routes not containing toll roads. Applies only to motorized travel + * modes. + * + * Generated from protobuf field bool avoid_tolls = 2; + * @param bool $var + * @return $this + */ + public function setAvoidTolls($var) + { + GPBUtil::checkBool($var); + $this->avoid_tolls = $var; + + return $this; + } + + /** + * Specifies whether to avoid highways where reasonable. Preference will be + * given to routes not containing highways. Applies only to motorized travel + * modes. + * + * Generated from protobuf field bool avoid_highways = 3; + * @return bool + */ + public function getAvoidHighways() + { + return $this->avoid_highways; + } + + /** + * Specifies whether to avoid highways where reasonable. Preference will be + * given to routes not containing highways. Applies only to motorized travel + * modes. + * + * Generated from protobuf field bool avoid_highways = 3; + * @param bool $var + * @return $this + */ + public function setAvoidHighways($var) + { + GPBUtil::checkBool($var); + $this->avoid_highways = $var; + + return $this; + } + + /** + * Specifies whether to avoid ferries where reasonable. Preference will be + * given to routes not containing travel by ferries. Applies only to motorized + * travel modes. + * + * Generated from protobuf field bool avoid_ferries = 4; + * @return bool + */ + public function getAvoidFerries() + { + return $this->avoid_ferries; + } + + /** + * Specifies whether to avoid ferries where reasonable. Preference will be + * given to routes not containing travel by ferries. Applies only to motorized + * travel modes. + * + * Generated from protobuf field bool avoid_ferries = 4; + * @param bool $var + * @return $this + */ + public function setAvoidFerries($var) + { + GPBUtil::checkBool($var); + $this->avoid_ferries = $var; + + return $this; + } + + /** + * Optional. Specifies whether to avoid navigating indoors where reasonable. + * Preference will be given to routes not containing indoor navigation. + * Applies only to the `WALKING` travel mode. + * + * Generated from protobuf field bool avoid_indoor = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getAvoidIndoor() + { + return $this->avoid_indoor; + } + + /** + * Optional. Specifies whether to avoid navigating indoors where reasonable. + * Preference will be given to routes not containing indoor navigation. + * Applies only to the `WALKING` travel mode. + * + * Generated from protobuf field bool avoid_indoor = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setAvoidIndoor($var) + { + GPBUtil::checkBool($var); + $this->avoid_indoor = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/Shipment.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/Shipment.php new file mode 100644 index 000000000000..652069078d66 --- /dev/null +++ b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/Shipment.php @@ -0,0 +1,850 @@ +google.cloud.optimization.v1.Shipment + */ +class Shipment extends \Google\Protobuf\Internal\Message +{ + /** + * Set of pickup alternatives associated to the shipment. If not specified, + * the vehicle only needs to visit a location corresponding to the deliveries. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.Shipment.VisitRequest pickups = 1; + */ + private $pickups; + /** + * Set of delivery alternatives associated to the shipment. If not specified, + * the vehicle only needs to visit a location corresponding to the pickups. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.Shipment.VisitRequest deliveries = 2; + */ + private $deliveries; + /** + * Load demands of the shipment (for example weight, volume, number of + * pallets etc). The keys in the map should be identifiers describing the type + * of the corresponding load, ideally also including the units. + * For example: "weight_kg", "volume_gallons", "pallet_count", etc. + * If a given key does not appear in the map, the corresponding load is + * considered as null. + * + * Generated from protobuf field map load_demands = 14; + */ + private $load_demands; + /** + * If the shipment is not completed, this penalty is added to the overall + * cost of the routes. A shipment is considered completed if one of its pickup + * and delivery alternatives is visited. The cost may be expressed in the + * same unit used for all other cost-related fields in the model and must be + * positive. + * *IMPORTANT*: If this penalty is not specified, it is considered infinite, + * i.e. the shipment must be completed. + * + * Generated from protobuf field optional double penalty_cost = 4; + */ + protected $penalty_cost = null; + /** + * The set of vehicles that may perform this shipment. If empty, all vehicles + * may perform it. Vehicles are given by their index in the `ShipmentModel`'s + * `vehicles` list. + * + * Generated from protobuf field repeated int32 allowed_vehicle_indices = 5; + */ + private $allowed_vehicle_indices; + /** + * Specifies the cost that is incurred when this shipment is delivered by each + * vehicle. If specified, it must have EITHER: + * * the same number of elements as `costs_per_vehicle_indices`. + * `costs_per_vehicle[i]` corresponds to vehicle + * `costs_per_vehicle_indices[i]` of the model. + * * the same number of elements as there are vehicles in the model. The + * i-th element corresponds to vehicle #i of the model. + * These costs must be in the same unit as `penalty_cost` and must not be + * negative. Leave this field empty, if there are no such costs. + * + * Generated from protobuf field repeated double costs_per_vehicle = 6; + */ + private $costs_per_vehicle; + /** + * Indices of the vehicles to which `costs_per_vehicle` applies. If non-empty, + * it must have the same number of elements as `costs_per_vehicle`. A vehicle + * index may not be specified more than once. If a vehicle is excluded from + * `costs_per_vehicle_indices`, its cost is zero. + * + * Generated from protobuf field repeated int32 costs_per_vehicle_indices = 7; + */ + private $costs_per_vehicle_indices; + /** + * Specifies the maximum relative detour time compared to the shortest path + * from pickup to delivery. If specified, it must be nonnegative, and the + * shipment must contain at least a pickup and a delivery. + * For example, let t be the shortest time taken to go from the selected + * pickup alternative directly to the selected delivery alternative. Then + * setting `pickup_to_delivery_relative_detour_limit` enforces: + * ``` + * start_time(delivery) - start_time(pickup) <= + * std::ceil(t * (1.0 + pickup_to_delivery_relative_detour_limit)) + * ``` + * If both relative and absolute limits are specified on the same shipment, + * the more constraining limit is used for each possible pickup/delivery pair. + * As of 2017/10, detours are only supported when travel durations do not + * depend on vehicles. + * + * Generated from protobuf field optional double pickup_to_delivery_relative_detour_limit = 8; + */ + protected $pickup_to_delivery_relative_detour_limit = null; + /** + * Specifies the maximum absolute detour time compared to the shortest path + * from pickup to delivery. If specified, it must be nonnegative, and the + * shipment must contain at least a pickup and a delivery. + * For example, let t be the shortest time taken to go from the selected + * pickup alternative directly to the selected delivery alternative. Then + * setting `pickup_to_delivery_absolute_detour_limit` enforces: + * ``` + * start_time(delivery) - start_time(pickup) <= + * t + pickup_to_delivery_absolute_detour_limit + * ``` + * If both relative and absolute limits are specified on the same shipment, + * the more constraining limit is used for each possible pickup/delivery pair. + * As of 2017/10, detours are only supported when travel durations do not + * depend on vehicles. + * + * Generated from protobuf field .google.protobuf.Duration pickup_to_delivery_absolute_detour_limit = 9; + */ + protected $pickup_to_delivery_absolute_detour_limit = null; + /** + * Specifies the maximum duration from start of pickup to start of delivery of + * a shipment. If specified, it must be nonnegative, and the shipment must + * contain at least a pickup and a delivery. This does not depend on which + * alternatives are selected for pickup and delivery, nor on vehicle speed. + * This can be specified alongside maximum detour constraints: the solution + * will respect both specifications. + * + * Generated from protobuf field .google.protobuf.Duration pickup_to_delivery_time_limit = 10; + */ + protected $pickup_to_delivery_time_limit = null; + /** + * Non-empty string specifying a "type" for this shipment. + * This feature can be used to define incompatibilities or requirements + * between `shipment_types` (see `shipment_type_incompatibilities` and + * `shipment_type_requirements` in `ShipmentModel`). + * Differs from `visit_types` which is specified for a single visit: All + * pickup/deliveries belonging to the same shipment share the same + * `shipment_type`. + * + * Generated from protobuf field string shipment_type = 11; + */ + protected $shipment_type = ''; + /** + * Specifies a label for this shipment. This label is reported in the response + * in the `shipment_label` of the corresponding + * [ShipmentRoute.Visit][google.cloud.optimization.v1.ShipmentRoute.Visit]. + * + * Generated from protobuf field string label = 12; + */ + protected $label = ''; + /** + * If true, skip this shipment, but don't apply a `penalty_cost`. + * Ignoring a shipment results in a validation error when there are any + * `shipment_type_requirements` in the model. + * Ignoring a shipment that is performed in `injected_first_solution_routes` + * or `injected_solution_constraint` is permitted; the solver removes the + * related pickup/delivery visits from the performing route. + * `precedence_rules` that reference ignored shipments will also be ignored. + * + * Generated from protobuf field bool ignore = 13; + */ + protected $ignore = false; + /** + * Deprecated: Use + * [Shipment.load_demands][google.cloud.optimization.v1.Shipment.load_demands] + * instead. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.CapacityQuantity demands = 3 [deprecated = true]; + * @deprecated + */ + private $demands; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Optimization\V1\Shipment\VisitRequest>|\Google\Protobuf\Internal\RepeatedField $pickups + * Set of pickup alternatives associated to the shipment. If not specified, + * the vehicle only needs to visit a location corresponding to the deliveries. + * @type array<\Google\Cloud\Optimization\V1\Shipment\VisitRequest>|\Google\Protobuf\Internal\RepeatedField $deliveries + * Set of delivery alternatives associated to the shipment. If not specified, + * the vehicle only needs to visit a location corresponding to the pickups. + * @type array|\Google\Protobuf\Internal\MapField $load_demands + * Load demands of the shipment (for example weight, volume, number of + * pallets etc). The keys in the map should be identifiers describing the type + * of the corresponding load, ideally also including the units. + * For example: "weight_kg", "volume_gallons", "pallet_count", etc. + * If a given key does not appear in the map, the corresponding load is + * considered as null. + * @type float $penalty_cost + * If the shipment is not completed, this penalty is added to the overall + * cost of the routes. A shipment is considered completed if one of its pickup + * and delivery alternatives is visited. The cost may be expressed in the + * same unit used for all other cost-related fields in the model and must be + * positive. + * *IMPORTANT*: If this penalty is not specified, it is considered infinite, + * i.e. the shipment must be completed. + * @type array|\Google\Protobuf\Internal\RepeatedField $allowed_vehicle_indices + * The set of vehicles that may perform this shipment. If empty, all vehicles + * may perform it. Vehicles are given by their index in the `ShipmentModel`'s + * `vehicles` list. + * @type array|\Google\Protobuf\Internal\RepeatedField $costs_per_vehicle + * Specifies the cost that is incurred when this shipment is delivered by each + * vehicle. If specified, it must have EITHER: + * * the same number of elements as `costs_per_vehicle_indices`. + * `costs_per_vehicle[i]` corresponds to vehicle + * `costs_per_vehicle_indices[i]` of the model. + * * the same number of elements as there are vehicles in the model. The + * i-th element corresponds to vehicle #i of the model. + * These costs must be in the same unit as `penalty_cost` and must not be + * negative. Leave this field empty, if there are no such costs. + * @type array|\Google\Protobuf\Internal\RepeatedField $costs_per_vehicle_indices + * Indices of the vehicles to which `costs_per_vehicle` applies. If non-empty, + * it must have the same number of elements as `costs_per_vehicle`. A vehicle + * index may not be specified more than once. If a vehicle is excluded from + * `costs_per_vehicle_indices`, its cost is zero. + * @type float $pickup_to_delivery_relative_detour_limit + * Specifies the maximum relative detour time compared to the shortest path + * from pickup to delivery. If specified, it must be nonnegative, and the + * shipment must contain at least a pickup and a delivery. + * For example, let t be the shortest time taken to go from the selected + * pickup alternative directly to the selected delivery alternative. Then + * setting `pickup_to_delivery_relative_detour_limit` enforces: + * ``` + * start_time(delivery) - start_time(pickup) <= + * std::ceil(t * (1.0 + pickup_to_delivery_relative_detour_limit)) + * ``` + * If both relative and absolute limits are specified on the same shipment, + * the more constraining limit is used for each possible pickup/delivery pair. + * As of 2017/10, detours are only supported when travel durations do not + * depend on vehicles. + * @type \Google\Protobuf\Duration $pickup_to_delivery_absolute_detour_limit + * Specifies the maximum absolute detour time compared to the shortest path + * from pickup to delivery. If specified, it must be nonnegative, and the + * shipment must contain at least a pickup and a delivery. + * For example, let t be the shortest time taken to go from the selected + * pickup alternative directly to the selected delivery alternative. Then + * setting `pickup_to_delivery_absolute_detour_limit` enforces: + * ``` + * start_time(delivery) - start_time(pickup) <= + * t + pickup_to_delivery_absolute_detour_limit + * ``` + * If both relative and absolute limits are specified on the same shipment, + * the more constraining limit is used for each possible pickup/delivery pair. + * As of 2017/10, detours are only supported when travel durations do not + * depend on vehicles. + * @type \Google\Protobuf\Duration $pickup_to_delivery_time_limit + * Specifies the maximum duration from start of pickup to start of delivery of + * a shipment. If specified, it must be nonnegative, and the shipment must + * contain at least a pickup and a delivery. This does not depend on which + * alternatives are selected for pickup and delivery, nor on vehicle speed. + * This can be specified alongside maximum detour constraints: the solution + * will respect both specifications. + * @type string $shipment_type + * Non-empty string specifying a "type" for this shipment. + * This feature can be used to define incompatibilities or requirements + * between `shipment_types` (see `shipment_type_incompatibilities` and + * `shipment_type_requirements` in `ShipmentModel`). + * Differs from `visit_types` which is specified for a single visit: All + * pickup/deliveries belonging to the same shipment share the same + * `shipment_type`. + * @type string $label + * Specifies a label for this shipment. This label is reported in the response + * in the `shipment_label` of the corresponding + * [ShipmentRoute.Visit][google.cloud.optimization.v1.ShipmentRoute.Visit]. + * @type bool $ignore + * If true, skip this shipment, but don't apply a `penalty_cost`. + * Ignoring a shipment results in a validation error when there are any + * `shipment_type_requirements` in the model. + * Ignoring a shipment that is performed in `injected_first_solution_routes` + * or `injected_solution_constraint` is permitted; the solver removes the + * related pickup/delivery visits from the performing route. + * `precedence_rules` that reference ignored shipments will also be ignored. + * @type array<\Google\Cloud\Optimization\V1\CapacityQuantity>|\Google\Protobuf\Internal\RepeatedField $demands + * Deprecated: Use + * [Shipment.load_demands][google.cloud.optimization.v1.Shipment.load_demands] + * instead. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); + parent::__construct($data); + } + + /** + * Set of pickup alternatives associated to the shipment. If not specified, + * the vehicle only needs to visit a location corresponding to the deliveries. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.Shipment.VisitRequest pickups = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPickups() + { + return $this->pickups; + } + + /** + * Set of pickup alternatives associated to the shipment. If not specified, + * the vehicle only needs to visit a location corresponding to the deliveries. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.Shipment.VisitRequest pickups = 1; + * @param array<\Google\Cloud\Optimization\V1\Shipment\VisitRequest>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPickups($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\Shipment\VisitRequest::class); + $this->pickups = $arr; + + return $this; + } + + /** + * Set of delivery alternatives associated to the shipment. If not specified, + * the vehicle only needs to visit a location corresponding to the pickups. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.Shipment.VisitRequest deliveries = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDeliveries() + { + return $this->deliveries; + } + + /** + * Set of delivery alternatives associated to the shipment. If not specified, + * the vehicle only needs to visit a location corresponding to the pickups. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.Shipment.VisitRequest deliveries = 2; + * @param array<\Google\Cloud\Optimization\V1\Shipment\VisitRequest>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDeliveries($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\Shipment\VisitRequest::class); + $this->deliveries = $arr; + + return $this; + } + + /** + * Load demands of the shipment (for example weight, volume, number of + * pallets etc). The keys in the map should be identifiers describing the type + * of the corresponding load, ideally also including the units. + * For example: "weight_kg", "volume_gallons", "pallet_count", etc. + * If a given key does not appear in the map, the corresponding load is + * considered as null. + * + * Generated from protobuf field map load_demands = 14; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLoadDemands() + { + return $this->load_demands; + } + + /** + * Load demands of the shipment (for example weight, volume, number of + * pallets etc). The keys in the map should be identifiers describing the type + * of the corresponding load, ideally also including the units. + * For example: "weight_kg", "volume_gallons", "pallet_count", etc. + * If a given key does not appear in the map, the corresponding load is + * considered as null. + * + * Generated from protobuf field map load_demands = 14; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLoadDemands($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\Shipment\Load::class); + $this->load_demands = $arr; + + return $this; + } + + /** + * If the shipment is not completed, this penalty is added to the overall + * cost of the routes. A shipment is considered completed if one of its pickup + * and delivery alternatives is visited. The cost may be expressed in the + * same unit used for all other cost-related fields in the model and must be + * positive. + * *IMPORTANT*: If this penalty is not specified, it is considered infinite, + * i.e. the shipment must be completed. + * + * Generated from protobuf field optional double penalty_cost = 4; + * @return float + */ + public function getPenaltyCost() + { + return isset($this->penalty_cost) ? $this->penalty_cost : 0.0; + } + + public function hasPenaltyCost() + { + return isset($this->penalty_cost); + } + + public function clearPenaltyCost() + { + unset($this->penalty_cost); + } + + /** + * If the shipment is not completed, this penalty is added to the overall + * cost of the routes. A shipment is considered completed if one of its pickup + * and delivery alternatives is visited. The cost may be expressed in the + * same unit used for all other cost-related fields in the model and must be + * positive. + * *IMPORTANT*: If this penalty is not specified, it is considered infinite, + * i.e. the shipment must be completed. + * + * Generated from protobuf field optional double penalty_cost = 4; + * @param float $var + * @return $this + */ + public function setPenaltyCost($var) + { + GPBUtil::checkDouble($var); + $this->penalty_cost = $var; + + return $this; + } + + /** + * The set of vehicles that may perform this shipment. If empty, all vehicles + * may perform it. Vehicles are given by their index in the `ShipmentModel`'s + * `vehicles` list. + * + * Generated from protobuf field repeated int32 allowed_vehicle_indices = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAllowedVehicleIndices() + { + return $this->allowed_vehicle_indices; + } + + /** + * The set of vehicles that may perform this shipment. If empty, all vehicles + * may perform it. Vehicles are given by their index in the `ShipmentModel`'s + * `vehicles` list. + * + * Generated from protobuf field repeated int32 allowed_vehicle_indices = 5; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAllowedVehicleIndices($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); + $this->allowed_vehicle_indices = $arr; + + return $this; + } + + /** + * Specifies the cost that is incurred when this shipment is delivered by each + * vehicle. If specified, it must have EITHER: + * * the same number of elements as `costs_per_vehicle_indices`. + * `costs_per_vehicle[i]` corresponds to vehicle + * `costs_per_vehicle_indices[i]` of the model. + * * the same number of elements as there are vehicles in the model. The + * i-th element corresponds to vehicle #i of the model. + * These costs must be in the same unit as `penalty_cost` and must not be + * negative. Leave this field empty, if there are no such costs. + * + * Generated from protobuf field repeated double costs_per_vehicle = 6; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCostsPerVehicle() + { + return $this->costs_per_vehicle; + } + + /** + * Specifies the cost that is incurred when this shipment is delivered by each + * vehicle. If specified, it must have EITHER: + * * the same number of elements as `costs_per_vehicle_indices`. + * `costs_per_vehicle[i]` corresponds to vehicle + * `costs_per_vehicle_indices[i]` of the model. + * * the same number of elements as there are vehicles in the model. The + * i-th element corresponds to vehicle #i of the model. + * These costs must be in the same unit as `penalty_cost` and must not be + * negative. Leave this field empty, if there are no such costs. + * + * Generated from protobuf field repeated double costs_per_vehicle = 6; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCostsPerVehicle($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::DOUBLE); + $this->costs_per_vehicle = $arr; + + return $this; + } + + /** + * Indices of the vehicles to which `costs_per_vehicle` applies. If non-empty, + * it must have the same number of elements as `costs_per_vehicle`. A vehicle + * index may not be specified more than once. If a vehicle is excluded from + * `costs_per_vehicle_indices`, its cost is zero. + * + * Generated from protobuf field repeated int32 costs_per_vehicle_indices = 7; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCostsPerVehicleIndices() + { + return $this->costs_per_vehicle_indices; + } + + /** + * Indices of the vehicles to which `costs_per_vehicle` applies. If non-empty, + * it must have the same number of elements as `costs_per_vehicle`. A vehicle + * index may not be specified more than once. If a vehicle is excluded from + * `costs_per_vehicle_indices`, its cost is zero. + * + * Generated from protobuf field repeated int32 costs_per_vehicle_indices = 7; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCostsPerVehicleIndices($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); + $this->costs_per_vehicle_indices = $arr; + + return $this; + } + + /** + * Specifies the maximum relative detour time compared to the shortest path + * from pickup to delivery. If specified, it must be nonnegative, and the + * shipment must contain at least a pickup and a delivery. + * For example, let t be the shortest time taken to go from the selected + * pickup alternative directly to the selected delivery alternative. Then + * setting `pickup_to_delivery_relative_detour_limit` enforces: + * ``` + * start_time(delivery) - start_time(pickup) <= + * std::ceil(t * (1.0 + pickup_to_delivery_relative_detour_limit)) + * ``` + * If both relative and absolute limits are specified on the same shipment, + * the more constraining limit is used for each possible pickup/delivery pair. + * As of 2017/10, detours are only supported when travel durations do not + * depend on vehicles. + * + * Generated from protobuf field optional double pickup_to_delivery_relative_detour_limit = 8; + * @return float + */ + public function getPickupToDeliveryRelativeDetourLimit() + { + return isset($this->pickup_to_delivery_relative_detour_limit) ? $this->pickup_to_delivery_relative_detour_limit : 0.0; + } + + public function hasPickupToDeliveryRelativeDetourLimit() + { + return isset($this->pickup_to_delivery_relative_detour_limit); + } + + public function clearPickupToDeliveryRelativeDetourLimit() + { + unset($this->pickup_to_delivery_relative_detour_limit); + } + + /** + * Specifies the maximum relative detour time compared to the shortest path + * from pickup to delivery. If specified, it must be nonnegative, and the + * shipment must contain at least a pickup and a delivery. + * For example, let t be the shortest time taken to go from the selected + * pickup alternative directly to the selected delivery alternative. Then + * setting `pickup_to_delivery_relative_detour_limit` enforces: + * ``` + * start_time(delivery) - start_time(pickup) <= + * std::ceil(t * (1.0 + pickup_to_delivery_relative_detour_limit)) + * ``` + * If both relative and absolute limits are specified on the same shipment, + * the more constraining limit is used for each possible pickup/delivery pair. + * As of 2017/10, detours are only supported when travel durations do not + * depend on vehicles. + * + * Generated from protobuf field optional double pickup_to_delivery_relative_detour_limit = 8; + * @param float $var + * @return $this + */ + public function setPickupToDeliveryRelativeDetourLimit($var) + { + GPBUtil::checkDouble($var); + $this->pickup_to_delivery_relative_detour_limit = $var; + + return $this; + } + + /** + * Specifies the maximum absolute detour time compared to the shortest path + * from pickup to delivery. If specified, it must be nonnegative, and the + * shipment must contain at least a pickup and a delivery. + * For example, let t be the shortest time taken to go from the selected + * pickup alternative directly to the selected delivery alternative. Then + * setting `pickup_to_delivery_absolute_detour_limit` enforces: + * ``` + * start_time(delivery) - start_time(pickup) <= + * t + pickup_to_delivery_absolute_detour_limit + * ``` + * If both relative and absolute limits are specified on the same shipment, + * the more constraining limit is used for each possible pickup/delivery pair. + * As of 2017/10, detours are only supported when travel durations do not + * depend on vehicles. + * + * Generated from protobuf field .google.protobuf.Duration pickup_to_delivery_absolute_detour_limit = 9; + * @return \Google\Protobuf\Duration|null + */ + public function getPickupToDeliveryAbsoluteDetourLimit() + { + return $this->pickup_to_delivery_absolute_detour_limit; + } + + public function hasPickupToDeliveryAbsoluteDetourLimit() + { + return isset($this->pickup_to_delivery_absolute_detour_limit); + } + + public function clearPickupToDeliveryAbsoluteDetourLimit() + { + unset($this->pickup_to_delivery_absolute_detour_limit); + } + + /** + * Specifies the maximum absolute detour time compared to the shortest path + * from pickup to delivery. If specified, it must be nonnegative, and the + * shipment must contain at least a pickup and a delivery. + * For example, let t be the shortest time taken to go from the selected + * pickup alternative directly to the selected delivery alternative. Then + * setting `pickup_to_delivery_absolute_detour_limit` enforces: + * ``` + * start_time(delivery) - start_time(pickup) <= + * t + pickup_to_delivery_absolute_detour_limit + * ``` + * If both relative and absolute limits are specified on the same shipment, + * the more constraining limit is used for each possible pickup/delivery pair. + * As of 2017/10, detours are only supported when travel durations do not + * depend on vehicles. + * + * Generated from protobuf field .google.protobuf.Duration pickup_to_delivery_absolute_detour_limit = 9; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setPickupToDeliveryAbsoluteDetourLimit($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->pickup_to_delivery_absolute_detour_limit = $var; + + return $this; + } + + /** + * Specifies the maximum duration from start of pickup to start of delivery of + * a shipment. If specified, it must be nonnegative, and the shipment must + * contain at least a pickup and a delivery. This does not depend on which + * alternatives are selected for pickup and delivery, nor on vehicle speed. + * This can be specified alongside maximum detour constraints: the solution + * will respect both specifications. + * + * Generated from protobuf field .google.protobuf.Duration pickup_to_delivery_time_limit = 10; + * @return \Google\Protobuf\Duration|null + */ + public function getPickupToDeliveryTimeLimit() + { + return $this->pickup_to_delivery_time_limit; + } + + public function hasPickupToDeliveryTimeLimit() + { + return isset($this->pickup_to_delivery_time_limit); + } + + public function clearPickupToDeliveryTimeLimit() + { + unset($this->pickup_to_delivery_time_limit); + } + + /** + * Specifies the maximum duration from start of pickup to start of delivery of + * a shipment. If specified, it must be nonnegative, and the shipment must + * contain at least a pickup and a delivery. This does not depend on which + * alternatives are selected for pickup and delivery, nor on vehicle speed. + * This can be specified alongside maximum detour constraints: the solution + * will respect both specifications. + * + * Generated from protobuf field .google.protobuf.Duration pickup_to_delivery_time_limit = 10; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setPickupToDeliveryTimeLimit($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->pickup_to_delivery_time_limit = $var; + + return $this; + } + + /** + * Non-empty string specifying a "type" for this shipment. + * This feature can be used to define incompatibilities or requirements + * between `shipment_types` (see `shipment_type_incompatibilities` and + * `shipment_type_requirements` in `ShipmentModel`). + * Differs from `visit_types` which is specified for a single visit: All + * pickup/deliveries belonging to the same shipment share the same + * `shipment_type`. + * + * Generated from protobuf field string shipment_type = 11; + * @return string + */ + public function getShipmentType() + { + return $this->shipment_type; + } + + /** + * Non-empty string specifying a "type" for this shipment. + * This feature can be used to define incompatibilities or requirements + * between `shipment_types` (see `shipment_type_incompatibilities` and + * `shipment_type_requirements` in `ShipmentModel`). + * Differs from `visit_types` which is specified for a single visit: All + * pickup/deliveries belonging to the same shipment share the same + * `shipment_type`. + * + * Generated from protobuf field string shipment_type = 11; + * @param string $var + * @return $this + */ + public function setShipmentType($var) + { + GPBUtil::checkString($var, True); + $this->shipment_type = $var; + + return $this; + } + + /** + * Specifies a label for this shipment. This label is reported in the response + * in the `shipment_label` of the corresponding + * [ShipmentRoute.Visit][google.cloud.optimization.v1.ShipmentRoute.Visit]. + * + * Generated from protobuf field string label = 12; + * @return string + */ + public function getLabel() + { + return $this->label; + } + + /** + * Specifies a label for this shipment. This label is reported in the response + * in the `shipment_label` of the corresponding + * [ShipmentRoute.Visit][google.cloud.optimization.v1.ShipmentRoute.Visit]. + * + * Generated from protobuf field string label = 12; + * @param string $var + * @return $this + */ + public function setLabel($var) + { + GPBUtil::checkString($var, True); + $this->label = $var; + + return $this; + } + + /** + * If true, skip this shipment, but don't apply a `penalty_cost`. + * Ignoring a shipment results in a validation error when there are any + * `shipment_type_requirements` in the model. + * Ignoring a shipment that is performed in `injected_first_solution_routes` + * or `injected_solution_constraint` is permitted; the solver removes the + * related pickup/delivery visits from the performing route. + * `precedence_rules` that reference ignored shipments will also be ignored. + * + * Generated from protobuf field bool ignore = 13; + * @return bool + */ + public function getIgnore() + { + return $this->ignore; + } + + /** + * If true, skip this shipment, but don't apply a `penalty_cost`. + * Ignoring a shipment results in a validation error when there are any + * `shipment_type_requirements` in the model. + * Ignoring a shipment that is performed in `injected_first_solution_routes` + * or `injected_solution_constraint` is permitted; the solver removes the + * related pickup/delivery visits from the performing route. + * `precedence_rules` that reference ignored shipments will also be ignored. + * + * Generated from protobuf field bool ignore = 13; + * @param bool $var + * @return $this + */ + public function setIgnore($var) + { + GPBUtil::checkBool($var); + $this->ignore = $var; + + return $this; + } + + /** + * Deprecated: Use + * [Shipment.load_demands][google.cloud.optimization.v1.Shipment.load_demands] + * instead. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.CapacityQuantity demands = 3 [deprecated = true]; + * @return \Google\Protobuf\Internal\RepeatedField + * @deprecated + */ + public function getDemands() + { + @trigger_error('demands is deprecated.', E_USER_DEPRECATED); + return $this->demands; + } + + /** + * Deprecated: Use + * [Shipment.load_demands][google.cloud.optimization.v1.Shipment.load_demands] + * instead. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.CapacityQuantity demands = 3 [deprecated = true]; + * @param array<\Google\Cloud\Optimization\V1\CapacityQuantity>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + * @deprecated + */ + public function setDemands($var) + { + @trigger_error('demands is deprecated.', E_USER_DEPRECATED); + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\CapacityQuantity::class); + $this->demands = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/Shipment/Load.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/Shipment/Load.php new file mode 100644 index 000000000000..cd27300e83b7 --- /dev/null +++ b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/Shipment/Load.php @@ -0,0 +1,81 @@ +google.cloud.optimization.v1.Shipment.Load + */ +class Load extends \Google\Protobuf\Internal\Message +{ + /** + * The amount by which the load of the vehicle performing the corresponding + * visit will vary. Since it is an integer, users are advised to choose an + * appropriate unit to avoid loss of precision. Must be ≥ 0. + * + * Generated from protobuf field int64 amount = 2; + */ + protected $amount = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $amount + * The amount by which the load of the vehicle performing the corresponding + * visit will vary. Since it is an integer, users are advised to choose an + * appropriate unit to avoid loss of precision. Must be ≥ 0. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); + parent::__construct($data); + } + + /** + * The amount by which the load of the vehicle performing the corresponding + * visit will vary. Since it is an integer, users are advised to choose an + * appropriate unit to avoid loss of precision. Must be ≥ 0. + * + * Generated from protobuf field int64 amount = 2; + * @return int|string + */ + public function getAmount() + { + return $this->amount; + } + + /** + * The amount by which the load of the vehicle performing the corresponding + * visit will vary. Since it is an integer, users are advised to choose an + * appropriate unit to avoid loss of precision. Must be ≥ 0. + * + * Generated from protobuf field int64 amount = 2; + * @param int|string $var + * @return $this + */ + public function setAmount($var) + { + GPBUtil::checkInt64($var); + $this->amount = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Load::class, \Google\Cloud\Optimization\V1\Shipment_Load::class); + diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/Shipment/VisitRequest.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/Shipment/VisitRequest.php new file mode 100644 index 000000000000..e21379e56c9c --- /dev/null +++ b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/Shipment/VisitRequest.php @@ -0,0 +1,658 @@ +google.cloud.optimization.v1.Shipment.VisitRequest + */ +class VisitRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The geo-location where the vehicle arrives when performing this + * `VisitRequest`. If the shipment model has duration distance matrices, + * `arrival_location` must not be specified. + * + * Generated from protobuf field .google.type.LatLng arrival_location = 1; + */ + protected $arrival_location = null; + /** + * The waypoint where the vehicle arrives when performing this + * `VisitRequest`. If the shipment model has duration distance matrices, + * `arrival_waypoint` must not be specified. + * + * Generated from protobuf field .google.cloud.optimization.v1.Waypoint arrival_waypoint = 2; + */ + protected $arrival_waypoint = null; + /** + * The geo-location where the vehicle departs after completing this + * `VisitRequest`. Can be omitted if it is the same as `arrival_location`. + * If the shipment model has duration distance matrices, + * `departure_location` must not be specified. + * + * Generated from protobuf field .google.type.LatLng departure_location = 3; + */ + protected $departure_location = null; + /** + * The waypoint where the vehicle departs after completing this + * `VisitRequest`. Can be omitted if it is the same as `arrival_waypoint`. + * If the shipment model has duration distance matrices, + * `departure_waypoint` must not be specified. + * + * Generated from protobuf field .google.cloud.optimization.v1.Waypoint departure_waypoint = 4; + */ + protected $departure_waypoint = null; + /** + * Specifies tags attached to the visit request. + * Empty or duplicate strings are not allowed. + * + * Generated from protobuf field repeated string tags = 5; + */ + private $tags; + /** + * Time windows which constrain the arrival time at a visit. + * Note that a vehicle may depart outside of the arrival time window, i.e. + * arrival time + duration do not need to be inside a time window. This can + * result in waiting time if the vehicle arrives before + * [TimeWindow.start_time][google.cloud.optimization.v1.TimeWindow.start_time]. + * The absence of `TimeWindow` means that the vehicle can perform this visit + * at any time. + * Time windows must be disjoint, i.e. no time window must overlap with or + * be adjacent to another, and they must be in increasing order. + * `cost_per_hour_after_soft_end_time` and `soft_end_time` can only + * be set if there is a single time window. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.TimeWindow time_windows = 6; + */ + private $time_windows; + /** + * Duration of the visit, i.e. time spent by the vehicle between arrival + * and departure (to be added to the possible waiting time; see + * `time_windows`). + * + * Generated from protobuf field .google.protobuf.Duration duration = 7; + */ + protected $duration = null; + /** + * Cost to service this visit request on a vehicle route. This can be used + * to pay different costs for each alternative pickup or delivery of a + * shipment. This cost must be in the same unit as `Shipment.penalty_cost` + * and must not be negative. + * + * Generated from protobuf field double cost = 8; + */ + protected $cost = 0.0; + /** + * Load demands of this visit request. This is just like + * [Shipment.load_demands][google.cloud.optimization.v1.Shipment.load_demands] + * field, except that it only applies to this + * [VisitRequest][google.cloud.optimization.v1.Shipment.VisitRequest] + * instead of the whole [Shipment][google.cloud.optimization.v1.Shipment]. + * The demands listed here are added to the demands listed in + * [Shipment.load_demands][google.cloud.optimization.v1.Shipment.load_demands]. + * + * Generated from protobuf field map load_demands = 12; + */ + private $load_demands; + /** + * Specifies the types of the visit. This may be used to allocate additional + * time required for a vehicle to complete this visit (see + * [Vehicle.extra_visit_duration_for_visit_type][google.cloud.optimization.v1.Vehicle.extra_visit_duration_for_visit_type]). + * A type can only appear once. + * + * Generated from protobuf field repeated string visit_types = 10; + */ + private $visit_types; + /** + * Specifies a label for this `VisitRequest`. This label is reported in the + * response as `visit_label` in the corresponding + * [ShipmentRoute.Visit][google.cloud.optimization.v1.ShipmentRoute.Visit]. + * + * Generated from protobuf field string label = 11; + */ + protected $label = ''; + /** + * Deprecated: Use + * [VisitRequest.load_demands][google.cloud.optimization.v1.Shipment.VisitRequest.load_demands] + * instead. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.CapacityQuantity demands = 9 [deprecated = true]; + * @deprecated + */ + private $demands; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Type\LatLng $arrival_location + * The geo-location where the vehicle arrives when performing this + * `VisitRequest`. If the shipment model has duration distance matrices, + * `arrival_location` must not be specified. + * @type \Google\Cloud\Optimization\V1\Waypoint $arrival_waypoint + * The waypoint where the vehicle arrives when performing this + * `VisitRequest`. If the shipment model has duration distance matrices, + * `arrival_waypoint` must not be specified. + * @type \Google\Type\LatLng $departure_location + * The geo-location where the vehicle departs after completing this + * `VisitRequest`. Can be omitted if it is the same as `arrival_location`. + * If the shipment model has duration distance matrices, + * `departure_location` must not be specified. + * @type \Google\Cloud\Optimization\V1\Waypoint $departure_waypoint + * The waypoint where the vehicle departs after completing this + * `VisitRequest`. Can be omitted if it is the same as `arrival_waypoint`. + * If the shipment model has duration distance matrices, + * `departure_waypoint` must not be specified. + * @type array|\Google\Protobuf\Internal\RepeatedField $tags + * Specifies tags attached to the visit request. + * Empty or duplicate strings are not allowed. + * @type array<\Google\Cloud\Optimization\V1\TimeWindow>|\Google\Protobuf\Internal\RepeatedField $time_windows + * Time windows which constrain the arrival time at a visit. + * Note that a vehicle may depart outside of the arrival time window, i.e. + * arrival time + duration do not need to be inside a time window. This can + * result in waiting time if the vehicle arrives before + * [TimeWindow.start_time][google.cloud.optimization.v1.TimeWindow.start_time]. + * The absence of `TimeWindow` means that the vehicle can perform this visit + * at any time. + * Time windows must be disjoint, i.e. no time window must overlap with or + * be adjacent to another, and they must be in increasing order. + * `cost_per_hour_after_soft_end_time` and `soft_end_time` can only + * be set if there is a single time window. + * @type \Google\Protobuf\Duration $duration + * Duration of the visit, i.e. time spent by the vehicle between arrival + * and departure (to be added to the possible waiting time; see + * `time_windows`). + * @type float $cost + * Cost to service this visit request on a vehicle route. This can be used + * to pay different costs for each alternative pickup or delivery of a + * shipment. This cost must be in the same unit as `Shipment.penalty_cost` + * and must not be negative. + * @type array|\Google\Protobuf\Internal\MapField $load_demands + * Load demands of this visit request. This is just like + * [Shipment.load_demands][google.cloud.optimization.v1.Shipment.load_demands] + * field, except that it only applies to this + * [VisitRequest][google.cloud.optimization.v1.Shipment.VisitRequest] + * instead of the whole [Shipment][google.cloud.optimization.v1.Shipment]. + * The demands listed here are added to the demands listed in + * [Shipment.load_demands][google.cloud.optimization.v1.Shipment.load_demands]. + * @type array|\Google\Protobuf\Internal\RepeatedField $visit_types + * Specifies the types of the visit. This may be used to allocate additional + * time required for a vehicle to complete this visit (see + * [Vehicle.extra_visit_duration_for_visit_type][google.cloud.optimization.v1.Vehicle.extra_visit_duration_for_visit_type]). + * A type can only appear once. + * @type string $label + * Specifies a label for this `VisitRequest`. This label is reported in the + * response as `visit_label` in the corresponding + * [ShipmentRoute.Visit][google.cloud.optimization.v1.ShipmentRoute.Visit]. + * @type array<\Google\Cloud\Optimization\V1\CapacityQuantity>|\Google\Protobuf\Internal\RepeatedField $demands + * Deprecated: Use + * [VisitRequest.load_demands][google.cloud.optimization.v1.Shipment.VisitRequest.load_demands] + * instead. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); + parent::__construct($data); + } + + /** + * The geo-location where the vehicle arrives when performing this + * `VisitRequest`. If the shipment model has duration distance matrices, + * `arrival_location` must not be specified. + * + * Generated from protobuf field .google.type.LatLng arrival_location = 1; + * @return \Google\Type\LatLng|null + */ + public function getArrivalLocation() + { + return $this->arrival_location; + } + + public function hasArrivalLocation() + { + return isset($this->arrival_location); + } + + public function clearArrivalLocation() + { + unset($this->arrival_location); + } + + /** + * The geo-location where the vehicle arrives when performing this + * `VisitRequest`. If the shipment model has duration distance matrices, + * `arrival_location` must not be specified. + * + * Generated from protobuf field .google.type.LatLng arrival_location = 1; + * @param \Google\Type\LatLng $var + * @return $this + */ + public function setArrivalLocation($var) + { + GPBUtil::checkMessage($var, \Google\Type\LatLng::class); + $this->arrival_location = $var; + + return $this; + } + + /** + * The waypoint where the vehicle arrives when performing this + * `VisitRequest`. If the shipment model has duration distance matrices, + * `arrival_waypoint` must not be specified. + * + * Generated from protobuf field .google.cloud.optimization.v1.Waypoint arrival_waypoint = 2; + * @return \Google\Cloud\Optimization\V1\Waypoint|null + */ + public function getArrivalWaypoint() + { + return $this->arrival_waypoint; + } + + public function hasArrivalWaypoint() + { + return isset($this->arrival_waypoint); + } + + public function clearArrivalWaypoint() + { + unset($this->arrival_waypoint); + } + + /** + * The waypoint where the vehicle arrives when performing this + * `VisitRequest`. If the shipment model has duration distance matrices, + * `arrival_waypoint` must not be specified. + * + * Generated from protobuf field .google.cloud.optimization.v1.Waypoint arrival_waypoint = 2; + * @param \Google\Cloud\Optimization\V1\Waypoint $var + * @return $this + */ + public function setArrivalWaypoint($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Optimization\V1\Waypoint::class); + $this->arrival_waypoint = $var; + + return $this; + } + + /** + * The geo-location where the vehicle departs after completing this + * `VisitRequest`. Can be omitted if it is the same as `arrival_location`. + * If the shipment model has duration distance matrices, + * `departure_location` must not be specified. + * + * Generated from protobuf field .google.type.LatLng departure_location = 3; + * @return \Google\Type\LatLng|null + */ + public function getDepartureLocation() + { + return $this->departure_location; + } + + public function hasDepartureLocation() + { + return isset($this->departure_location); + } + + public function clearDepartureLocation() + { + unset($this->departure_location); + } + + /** + * The geo-location where the vehicle departs after completing this + * `VisitRequest`. Can be omitted if it is the same as `arrival_location`. + * If the shipment model has duration distance matrices, + * `departure_location` must not be specified. + * + * Generated from protobuf field .google.type.LatLng departure_location = 3; + * @param \Google\Type\LatLng $var + * @return $this + */ + public function setDepartureLocation($var) + { + GPBUtil::checkMessage($var, \Google\Type\LatLng::class); + $this->departure_location = $var; + + return $this; + } + + /** + * The waypoint where the vehicle departs after completing this + * `VisitRequest`. Can be omitted if it is the same as `arrival_waypoint`. + * If the shipment model has duration distance matrices, + * `departure_waypoint` must not be specified. + * + * Generated from protobuf field .google.cloud.optimization.v1.Waypoint departure_waypoint = 4; + * @return \Google\Cloud\Optimization\V1\Waypoint|null + */ + public function getDepartureWaypoint() + { + return $this->departure_waypoint; + } + + public function hasDepartureWaypoint() + { + return isset($this->departure_waypoint); + } + + public function clearDepartureWaypoint() + { + unset($this->departure_waypoint); + } + + /** + * The waypoint where the vehicle departs after completing this + * `VisitRequest`. Can be omitted if it is the same as `arrival_waypoint`. + * If the shipment model has duration distance matrices, + * `departure_waypoint` must not be specified. + * + * Generated from protobuf field .google.cloud.optimization.v1.Waypoint departure_waypoint = 4; + * @param \Google\Cloud\Optimization\V1\Waypoint $var + * @return $this + */ + public function setDepartureWaypoint($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Optimization\V1\Waypoint::class); + $this->departure_waypoint = $var; + + return $this; + } + + /** + * Specifies tags attached to the visit request. + * Empty or duplicate strings are not allowed. + * + * Generated from protobuf field repeated string tags = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTags() + { + return $this->tags; + } + + /** + * Specifies tags attached to the visit request. + * Empty or duplicate strings are not allowed. + * + * Generated from protobuf field repeated string tags = 5; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTags($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->tags = $arr; + + return $this; + } + + /** + * Time windows which constrain the arrival time at a visit. + * Note that a vehicle may depart outside of the arrival time window, i.e. + * arrival time + duration do not need to be inside a time window. This can + * result in waiting time if the vehicle arrives before + * [TimeWindow.start_time][google.cloud.optimization.v1.TimeWindow.start_time]. + * The absence of `TimeWindow` means that the vehicle can perform this visit + * at any time. + * Time windows must be disjoint, i.e. no time window must overlap with or + * be adjacent to another, and they must be in increasing order. + * `cost_per_hour_after_soft_end_time` and `soft_end_time` can only + * be set if there is a single time window. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.TimeWindow time_windows = 6; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTimeWindows() + { + return $this->time_windows; + } + + /** + * Time windows which constrain the arrival time at a visit. + * Note that a vehicle may depart outside of the arrival time window, i.e. + * arrival time + duration do not need to be inside a time window. This can + * result in waiting time if the vehicle arrives before + * [TimeWindow.start_time][google.cloud.optimization.v1.TimeWindow.start_time]. + * The absence of `TimeWindow` means that the vehicle can perform this visit + * at any time. + * Time windows must be disjoint, i.e. no time window must overlap with or + * be adjacent to another, and they must be in increasing order. + * `cost_per_hour_after_soft_end_time` and `soft_end_time` can only + * be set if there is a single time window. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.TimeWindow time_windows = 6; + * @param array<\Google\Cloud\Optimization\V1\TimeWindow>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTimeWindows($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\TimeWindow::class); + $this->time_windows = $arr; + + return $this; + } + + /** + * Duration of the visit, i.e. time spent by the vehicle between arrival + * and departure (to be added to the possible waiting time; see + * `time_windows`). + * + * Generated from protobuf field .google.protobuf.Duration duration = 7; + * @return \Google\Protobuf\Duration|null + */ + public function getDuration() + { + return $this->duration; + } + + public function hasDuration() + { + return isset($this->duration); + } + + public function clearDuration() + { + unset($this->duration); + } + + /** + * Duration of the visit, i.e. time spent by the vehicle between arrival + * and departure (to be added to the possible waiting time; see + * `time_windows`). + * + * Generated from protobuf field .google.protobuf.Duration duration = 7; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->duration = $var; + + return $this; + } + + /** + * Cost to service this visit request on a vehicle route. This can be used + * to pay different costs for each alternative pickup or delivery of a + * shipment. This cost must be in the same unit as `Shipment.penalty_cost` + * and must not be negative. + * + * Generated from protobuf field double cost = 8; + * @return float + */ + public function getCost() + { + return $this->cost; + } + + /** + * Cost to service this visit request on a vehicle route. This can be used + * to pay different costs for each alternative pickup or delivery of a + * shipment. This cost must be in the same unit as `Shipment.penalty_cost` + * and must not be negative. + * + * Generated from protobuf field double cost = 8; + * @param float $var + * @return $this + */ + public function setCost($var) + { + GPBUtil::checkDouble($var); + $this->cost = $var; + + return $this; + } + + /** + * Load demands of this visit request. This is just like + * [Shipment.load_demands][google.cloud.optimization.v1.Shipment.load_demands] + * field, except that it only applies to this + * [VisitRequest][google.cloud.optimization.v1.Shipment.VisitRequest] + * instead of the whole [Shipment][google.cloud.optimization.v1.Shipment]. + * The demands listed here are added to the demands listed in + * [Shipment.load_demands][google.cloud.optimization.v1.Shipment.load_demands]. + * + * Generated from protobuf field map load_demands = 12; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLoadDemands() + { + return $this->load_demands; + } + + /** + * Load demands of this visit request. This is just like + * [Shipment.load_demands][google.cloud.optimization.v1.Shipment.load_demands] + * field, except that it only applies to this + * [VisitRequest][google.cloud.optimization.v1.Shipment.VisitRequest] + * instead of the whole [Shipment][google.cloud.optimization.v1.Shipment]. + * The demands listed here are added to the demands listed in + * [Shipment.load_demands][google.cloud.optimization.v1.Shipment.load_demands]. + * + * Generated from protobuf field map load_demands = 12; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLoadDemands($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\Shipment\Load::class); + $this->load_demands = $arr; + + return $this; + } + + /** + * Specifies the types of the visit. This may be used to allocate additional + * time required for a vehicle to complete this visit (see + * [Vehicle.extra_visit_duration_for_visit_type][google.cloud.optimization.v1.Vehicle.extra_visit_duration_for_visit_type]). + * A type can only appear once. + * + * Generated from protobuf field repeated string visit_types = 10; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getVisitTypes() + { + return $this->visit_types; + } + + /** + * Specifies the types of the visit. This may be used to allocate additional + * time required for a vehicle to complete this visit (see + * [Vehicle.extra_visit_duration_for_visit_type][google.cloud.optimization.v1.Vehicle.extra_visit_duration_for_visit_type]). + * A type can only appear once. + * + * Generated from protobuf field repeated string visit_types = 10; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setVisitTypes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->visit_types = $arr; + + return $this; + } + + /** + * Specifies a label for this `VisitRequest`. This label is reported in the + * response as `visit_label` in the corresponding + * [ShipmentRoute.Visit][google.cloud.optimization.v1.ShipmentRoute.Visit]. + * + * Generated from protobuf field string label = 11; + * @return string + */ + public function getLabel() + { + return $this->label; + } + + /** + * Specifies a label for this `VisitRequest`. This label is reported in the + * response as `visit_label` in the corresponding + * [ShipmentRoute.Visit][google.cloud.optimization.v1.ShipmentRoute.Visit]. + * + * Generated from protobuf field string label = 11; + * @param string $var + * @return $this + */ + public function setLabel($var) + { + GPBUtil::checkString($var, True); + $this->label = $var; + + return $this; + } + + /** + * Deprecated: Use + * [VisitRequest.load_demands][google.cloud.optimization.v1.Shipment.VisitRequest.load_demands] + * instead. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.CapacityQuantity demands = 9 [deprecated = true]; + * @return \Google\Protobuf\Internal\RepeatedField + * @deprecated + */ + public function getDemands() + { + @trigger_error('demands is deprecated.', E_USER_DEPRECATED); + return $this->demands; + } + + /** + * Deprecated: Use + * [VisitRequest.load_demands][google.cloud.optimization.v1.Shipment.VisitRequest.load_demands] + * instead. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.CapacityQuantity demands = 9 [deprecated = true]; + * @param array<\Google\Cloud\Optimization\V1\CapacityQuantity>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + * @deprecated + */ + public function setDemands($var) + { + @trigger_error('demands is deprecated.', E_USER_DEPRECATED); + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\CapacityQuantity::class); + $this->demands = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(VisitRequest::class, \Google\Cloud\Optimization\V1\Shipment_VisitRequest::class); + diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentModel.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentModel.php new file mode 100644 index 000000000000..058949f5a9bd --- /dev/null +++ b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentModel.php @@ -0,0 +1,1057 @@ +google.cloud.optimization.v1.ShipmentModel + */ +class ShipmentModel extends \Google\Protobuf\Internal\Message +{ + /** + * Set of shipments which must be performed in the model. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.Shipment shipments = 1; + */ + private $shipments; + /** + * Set of vehicles which can be used to perform visits. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.Vehicle vehicles = 2; + */ + private $vehicles; + /** + * Constrains the maximum number of active vehicles. A vehicle is active if + * its route performs at least one shipment. This can be used to limit the + * number of routes in the case where there are fewer drivers than + * vehicles and that the fleet of vehicles is heterogeneous. The optimization + * will then select the best subset of vehicles to use. + * Must be strictly positive. + * + * Generated from protobuf field optional int32 max_active_vehicles = 4; + */ + protected $max_active_vehicles = null; + /** + * Global start and end time of the model: no times outside of this range + * can be considered valid. + * The model's time span must be less than a year, i.e. the `global_end_time` + * and the `global_start_time` must be within 31536000 seconds of each other. + * When using `cost_per_*hour` fields, you might want to set this window to a + * smaller interval to increase performance (eg. if you model a single day, + * you should set the global time limits to that day). + * If unset, 00:00:00 UTC, January 1, 1970 (i.e. seconds: 0, nanos: 0) is used + * as default. + * + * Generated from protobuf field .google.protobuf.Timestamp global_start_time = 5; + */ + protected $global_start_time = null; + /** + * If unset, 00:00:00 UTC, January 1, 1971 (i.e. seconds: 31536000, nanos: 0) + * is used as default. + * + * Generated from protobuf field .google.protobuf.Timestamp global_end_time = 6; + */ + protected $global_end_time = null; + /** + * The "global duration" of the overall plan is the difference between the + * earliest effective start time and the latest effective end time of + * all vehicles. Users can assign a cost per hour to that quantity to try + * and optimize for earliest job completion, for example. This cost must be in + * the same unit as + * [Shipment.penalty_cost][google.cloud.optimization.v1.Shipment.penalty_cost]. + * + * Generated from protobuf field double global_duration_cost_per_hour = 7; + */ + protected $global_duration_cost_per_hour = 0.0; + /** + * Specifies duration and distance matrices used in the model. If this field + * is empty, Google Maps or geodesic distances will be used instead, depending + * on the value of the `use_geodesic_distances` field. If it is not empty, + * `use_geodesic_distances` cannot be true and neither + * `duration_distance_matrix_src_tags` nor `duration_distance_matrix_dst_tags` + * can be empty. + * Usage examples: + * * There are two locations: locA and locB. + * * 1 vehicle starting its route at locA and ending it at locA. + * * 1 pickup visit request at locB. + * ``` + * model { + * vehicles { start_tags: "locA" end_tags: "locA" } + * shipments { pickups { tags: "locB" } } + * duration_distance_matrix_src_tags: "locA" + * duration_distance_matrix_src_tags: "locB" + * duration_distance_matrix_dst_tags: "locA" + * duration_distance_matrix_dst_tags: "locB" + * duration_distance_matrices { + * rows { # from: locA + * durations { seconds: 0 } meters: 0 # to: locA + * durations { seconds: 100 } meters: 1000 # to: locB + * } + * rows { # from: locB + * durations { seconds: 102 } meters: 990 # to: locA + * durations { seconds: 0 } meters: 0 # to: locB + * } + * } + * } + * ``` + * * There are three locations: locA, locB and locC. + * * 1 vehicle starting its route at locA and ending it at locB, using + * matrix "fast". + * * 1 vehicle starting its route at locB and ending it at locB, using + * matrix "slow". + * * 1 vehicle starting its route at locB and ending it at locB, using + * matrix "fast". + * * 1 pickup visit request at locC. + * ``` + * model { + * vehicles { start_tags: "locA" end_tags: "locB" start_tags: "fast" } + * vehicles { start_tags: "locB" end_tags: "locB" start_tags: "slow" } + * vehicles { start_tags: "locB" end_tags: "locB" start_tags: "fast" } + * shipments { pickups { tags: "locC" } } + * duration_distance_matrix_src_tags: "locA" + * duration_distance_matrix_src_tags: "locB" + * duration_distance_matrix_src_tags: "locC" + * duration_distance_matrix_dst_tags: "locB" + * duration_distance_matrix_dst_tags: "locC" + * duration_distance_matrices { + * vehicle_start_tag: "fast" + * rows { # from: locA + * durations { seconds: 1000 } meters: 2000 # to: locB + * durations { seconds: 600 } meters: 1000 # to: locC + * } + * rows { # from: locB + * durations { seconds: 0 } meters: 0 # to: locB + * durations { seconds: 700 } meters: 1200 # to: locC + * } + * rows { # from: locC + * durations { seconds: 702 } meters: 1190 # to: locB + * durations { seconds: 0 } meters: 0 # to: locC + * } + * } + * duration_distance_matrices { + * vehicle_start_tag: "slow" + * rows { # from: locA + * durations { seconds: 1800 } meters: 2001 # to: locB + * durations { seconds: 900 } meters: 1002 # to: locC + * } + * rows { # from: locB + * durations { seconds: 0 } meters: 0 # to: locB + * durations { seconds: 1000 } meters: 1202 # to: locC + * } + * rows { # from: locC + * durations { seconds: 1001 } meters: 1195 # to: locB + * durations { seconds: 0 } meters: 0 # to: locC + * } + * } + * } + * ``` + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix duration_distance_matrices = 8; + */ + private $duration_distance_matrices; + /** + * Tags defining the sources of the duration and distance matrices; + * `duration_distance_matrices(i).rows(j)` defines durations and distances + * from visits with tag `duration_distance_matrix_src_tags(j)` to other visits + * in matrix i. + * Tags correspond to + * [VisitRequest.tags][google.cloud.optimization.v1.Shipment.VisitRequest.tags] + * or [Vehicle.start_tags][google.cloud.optimization.v1.Vehicle.start_tags]. + * A given `VisitRequest` or `Vehicle` must match exactly one tag in this + * field. Note that a `Vehicle`'s source, destination and matrix tags may be + * the same; similarly a `VisitRequest`'s source and destination tags may be + * the same. All tags must be different and cannot be empty strings. If this + * field is not empty, then `duration_distance_matrices` must not be empty. + * + * Generated from protobuf field repeated string duration_distance_matrix_src_tags = 9; + */ + private $duration_distance_matrix_src_tags; + /** + * Tags defining the destinations of the duration and distance matrices; + * `duration_distance_matrices(i).rows(j).durations(k)` (resp. + * `duration_distance_matrices(i).rows(j).meters(k))` defines the duration + * (resp. the distance) of the travel from visits with tag + * `duration_distance_matrix_src_tags(j)` to visits with tag + * `duration_distance_matrix_dst_tags(k)` in matrix i. + * Tags correspond to + * [VisitRequest.tags][google.cloud.optimization.v1.Shipment.VisitRequest.tags] + * or [Vehicle.start_tags][google.cloud.optimization.v1.Vehicle.start_tags]. + * A given `VisitRequest` or `Vehicle` must match exactly one tag in this + * field. Note that a `Vehicle`'s source, destination and matrix tags may be + * the same; similarly a `VisitRequest`'s source and destination tags may be + * the same. All tags must be different and cannot be empty strings. If this + * field is not empty, then `duration_distance_matrices` must not be empty. + * + * Generated from protobuf field repeated string duration_distance_matrix_dst_tags = 10; + */ + private $duration_distance_matrix_dst_tags; + /** + * Transition attributes added to the model. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.TransitionAttributes transition_attributes = 11; + */ + private $transition_attributes; + /** + * Sets of incompatible shipment_types (see `ShipmentTypeIncompatibility`). + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.ShipmentTypeIncompatibility shipment_type_incompatibilities = 12; + */ + private $shipment_type_incompatibilities; + /** + * Sets of `shipment_type` requirements (see `ShipmentTypeRequirement`). + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.ShipmentTypeRequirement shipment_type_requirements = 13; + */ + private $shipment_type_requirements; + /** + * Set of precedence rules which must be enforced in the model. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.ShipmentModel.PrecedenceRule precedence_rules = 14; + */ + private $precedence_rules; + /** + * Deprecated: No longer used. + * Set of break rules used in the model. + * Each vehicle specifies the `BreakRule` that applies to it via the + * [Vehicle.break_rule_indices][google.cloud.optimization.v1.Vehicle.break_rule_indices] + * field (which must be a singleton). + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule break_rules = 15 [deprecated = true]; + * @deprecated + */ + private $break_rules; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Optimization\V1\Shipment>|\Google\Protobuf\Internal\RepeatedField $shipments + * Set of shipments which must be performed in the model. + * @type array<\Google\Cloud\Optimization\V1\Vehicle>|\Google\Protobuf\Internal\RepeatedField $vehicles + * Set of vehicles which can be used to perform visits. + * @type int $max_active_vehicles + * Constrains the maximum number of active vehicles. A vehicle is active if + * its route performs at least one shipment. This can be used to limit the + * number of routes in the case where there are fewer drivers than + * vehicles and that the fleet of vehicles is heterogeneous. The optimization + * will then select the best subset of vehicles to use. + * Must be strictly positive. + * @type \Google\Protobuf\Timestamp $global_start_time + * Global start and end time of the model: no times outside of this range + * can be considered valid. + * The model's time span must be less than a year, i.e. the `global_end_time` + * and the `global_start_time` must be within 31536000 seconds of each other. + * When using `cost_per_*hour` fields, you might want to set this window to a + * smaller interval to increase performance (eg. if you model a single day, + * you should set the global time limits to that day). + * If unset, 00:00:00 UTC, January 1, 1970 (i.e. seconds: 0, nanos: 0) is used + * as default. + * @type \Google\Protobuf\Timestamp $global_end_time + * If unset, 00:00:00 UTC, January 1, 1971 (i.e. seconds: 31536000, nanos: 0) + * is used as default. + * @type float $global_duration_cost_per_hour + * The "global duration" of the overall plan is the difference between the + * earliest effective start time and the latest effective end time of + * all vehicles. Users can assign a cost per hour to that quantity to try + * and optimize for earliest job completion, for example. This cost must be in + * the same unit as + * [Shipment.penalty_cost][google.cloud.optimization.v1.Shipment.penalty_cost]. + * @type array<\Google\Cloud\Optimization\V1\ShipmentModel\DurationDistanceMatrix>|\Google\Protobuf\Internal\RepeatedField $duration_distance_matrices + * Specifies duration and distance matrices used in the model. If this field + * is empty, Google Maps or geodesic distances will be used instead, depending + * on the value of the `use_geodesic_distances` field. If it is not empty, + * `use_geodesic_distances` cannot be true and neither + * `duration_distance_matrix_src_tags` nor `duration_distance_matrix_dst_tags` + * can be empty. + * Usage examples: + * * There are two locations: locA and locB. + * * 1 vehicle starting its route at locA and ending it at locA. + * * 1 pickup visit request at locB. + * ``` + * model { + * vehicles { start_tags: "locA" end_tags: "locA" } + * shipments { pickups { tags: "locB" } } + * duration_distance_matrix_src_tags: "locA" + * duration_distance_matrix_src_tags: "locB" + * duration_distance_matrix_dst_tags: "locA" + * duration_distance_matrix_dst_tags: "locB" + * duration_distance_matrices { + * rows { # from: locA + * durations { seconds: 0 } meters: 0 # to: locA + * durations { seconds: 100 } meters: 1000 # to: locB + * } + * rows { # from: locB + * durations { seconds: 102 } meters: 990 # to: locA + * durations { seconds: 0 } meters: 0 # to: locB + * } + * } + * } + * ``` + * * There are three locations: locA, locB and locC. + * * 1 vehicle starting its route at locA and ending it at locB, using + * matrix "fast". + * * 1 vehicle starting its route at locB and ending it at locB, using + * matrix "slow". + * * 1 vehicle starting its route at locB and ending it at locB, using + * matrix "fast". + * * 1 pickup visit request at locC. + * ``` + * model { + * vehicles { start_tags: "locA" end_tags: "locB" start_tags: "fast" } + * vehicles { start_tags: "locB" end_tags: "locB" start_tags: "slow" } + * vehicles { start_tags: "locB" end_tags: "locB" start_tags: "fast" } + * shipments { pickups { tags: "locC" } } + * duration_distance_matrix_src_tags: "locA" + * duration_distance_matrix_src_tags: "locB" + * duration_distance_matrix_src_tags: "locC" + * duration_distance_matrix_dst_tags: "locB" + * duration_distance_matrix_dst_tags: "locC" + * duration_distance_matrices { + * vehicle_start_tag: "fast" + * rows { # from: locA + * durations { seconds: 1000 } meters: 2000 # to: locB + * durations { seconds: 600 } meters: 1000 # to: locC + * } + * rows { # from: locB + * durations { seconds: 0 } meters: 0 # to: locB + * durations { seconds: 700 } meters: 1200 # to: locC + * } + * rows { # from: locC + * durations { seconds: 702 } meters: 1190 # to: locB + * durations { seconds: 0 } meters: 0 # to: locC + * } + * } + * duration_distance_matrices { + * vehicle_start_tag: "slow" + * rows { # from: locA + * durations { seconds: 1800 } meters: 2001 # to: locB + * durations { seconds: 900 } meters: 1002 # to: locC + * } + * rows { # from: locB + * durations { seconds: 0 } meters: 0 # to: locB + * durations { seconds: 1000 } meters: 1202 # to: locC + * } + * rows { # from: locC + * durations { seconds: 1001 } meters: 1195 # to: locB + * durations { seconds: 0 } meters: 0 # to: locC + * } + * } + * } + * ``` + * @type array|\Google\Protobuf\Internal\RepeatedField $duration_distance_matrix_src_tags + * Tags defining the sources of the duration and distance matrices; + * `duration_distance_matrices(i).rows(j)` defines durations and distances + * from visits with tag `duration_distance_matrix_src_tags(j)` to other visits + * in matrix i. + * Tags correspond to + * [VisitRequest.tags][google.cloud.optimization.v1.Shipment.VisitRequest.tags] + * or [Vehicle.start_tags][google.cloud.optimization.v1.Vehicle.start_tags]. + * A given `VisitRequest` or `Vehicle` must match exactly one tag in this + * field. Note that a `Vehicle`'s source, destination and matrix tags may be + * the same; similarly a `VisitRequest`'s source and destination tags may be + * the same. All tags must be different and cannot be empty strings. If this + * field is not empty, then `duration_distance_matrices` must not be empty. + * @type array|\Google\Protobuf\Internal\RepeatedField $duration_distance_matrix_dst_tags + * Tags defining the destinations of the duration and distance matrices; + * `duration_distance_matrices(i).rows(j).durations(k)` (resp. + * `duration_distance_matrices(i).rows(j).meters(k))` defines the duration + * (resp. the distance) of the travel from visits with tag + * `duration_distance_matrix_src_tags(j)` to visits with tag + * `duration_distance_matrix_dst_tags(k)` in matrix i. + * Tags correspond to + * [VisitRequest.tags][google.cloud.optimization.v1.Shipment.VisitRequest.tags] + * or [Vehicle.start_tags][google.cloud.optimization.v1.Vehicle.start_tags]. + * A given `VisitRequest` or `Vehicle` must match exactly one tag in this + * field. Note that a `Vehicle`'s source, destination and matrix tags may be + * the same; similarly a `VisitRequest`'s source and destination tags may be + * the same. All tags must be different and cannot be empty strings. If this + * field is not empty, then `duration_distance_matrices` must not be empty. + * @type array<\Google\Cloud\Optimization\V1\TransitionAttributes>|\Google\Protobuf\Internal\RepeatedField $transition_attributes + * Transition attributes added to the model. + * @type array<\Google\Cloud\Optimization\V1\ShipmentTypeIncompatibility>|\Google\Protobuf\Internal\RepeatedField $shipment_type_incompatibilities + * Sets of incompatible shipment_types (see `ShipmentTypeIncompatibility`). + * @type array<\Google\Cloud\Optimization\V1\ShipmentTypeRequirement>|\Google\Protobuf\Internal\RepeatedField $shipment_type_requirements + * Sets of `shipment_type` requirements (see `ShipmentTypeRequirement`). + * @type array<\Google\Cloud\Optimization\V1\ShipmentModel\PrecedenceRule>|\Google\Protobuf\Internal\RepeatedField $precedence_rules + * Set of precedence rules which must be enforced in the model. + * @type array<\Google\Cloud\Optimization\V1\ShipmentModel\BreakRule>|\Google\Protobuf\Internal\RepeatedField $break_rules + * Deprecated: No longer used. + * Set of break rules used in the model. + * Each vehicle specifies the `BreakRule` that applies to it via the + * [Vehicle.break_rule_indices][google.cloud.optimization.v1.Vehicle.break_rule_indices] + * field (which must be a singleton). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); + parent::__construct($data); + } + + /** + * Set of shipments which must be performed in the model. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.Shipment shipments = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getShipments() + { + return $this->shipments; + } + + /** + * Set of shipments which must be performed in the model. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.Shipment shipments = 1; + * @param array<\Google\Cloud\Optimization\V1\Shipment>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setShipments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\Shipment::class); + $this->shipments = $arr; + + return $this; + } + + /** + * Set of vehicles which can be used to perform visits. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.Vehicle vehicles = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getVehicles() + { + return $this->vehicles; + } + + /** + * Set of vehicles which can be used to perform visits. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.Vehicle vehicles = 2; + * @param array<\Google\Cloud\Optimization\V1\Vehicle>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setVehicles($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\Vehicle::class); + $this->vehicles = $arr; + + return $this; + } + + /** + * Constrains the maximum number of active vehicles. A vehicle is active if + * its route performs at least one shipment. This can be used to limit the + * number of routes in the case where there are fewer drivers than + * vehicles and that the fleet of vehicles is heterogeneous. The optimization + * will then select the best subset of vehicles to use. + * Must be strictly positive. + * + * Generated from protobuf field optional int32 max_active_vehicles = 4; + * @return int + */ + public function getMaxActiveVehicles() + { + return isset($this->max_active_vehicles) ? $this->max_active_vehicles : 0; + } + + public function hasMaxActiveVehicles() + { + return isset($this->max_active_vehicles); + } + + public function clearMaxActiveVehicles() + { + unset($this->max_active_vehicles); + } + + /** + * Constrains the maximum number of active vehicles. A vehicle is active if + * its route performs at least one shipment. This can be used to limit the + * number of routes in the case where there are fewer drivers than + * vehicles and that the fleet of vehicles is heterogeneous. The optimization + * will then select the best subset of vehicles to use. + * Must be strictly positive. + * + * Generated from protobuf field optional int32 max_active_vehicles = 4; + * @param int $var + * @return $this + */ + public function setMaxActiveVehicles($var) + { + GPBUtil::checkInt32($var); + $this->max_active_vehicles = $var; + + return $this; + } + + /** + * Global start and end time of the model: no times outside of this range + * can be considered valid. + * The model's time span must be less than a year, i.e. the `global_end_time` + * and the `global_start_time` must be within 31536000 seconds of each other. + * When using `cost_per_*hour` fields, you might want to set this window to a + * smaller interval to increase performance (eg. if you model a single day, + * you should set the global time limits to that day). + * If unset, 00:00:00 UTC, January 1, 1970 (i.e. seconds: 0, nanos: 0) is used + * as default. + * + * Generated from protobuf field .google.protobuf.Timestamp global_start_time = 5; + * @return \Google\Protobuf\Timestamp|null + */ + public function getGlobalStartTime() + { + return $this->global_start_time; + } + + public function hasGlobalStartTime() + { + return isset($this->global_start_time); + } + + public function clearGlobalStartTime() + { + unset($this->global_start_time); + } + + /** + * Global start and end time of the model: no times outside of this range + * can be considered valid. + * The model's time span must be less than a year, i.e. the `global_end_time` + * and the `global_start_time` must be within 31536000 seconds of each other. + * When using `cost_per_*hour` fields, you might want to set this window to a + * smaller interval to increase performance (eg. if you model a single day, + * you should set the global time limits to that day). + * If unset, 00:00:00 UTC, January 1, 1970 (i.e. seconds: 0, nanos: 0) is used + * as default. + * + * Generated from protobuf field .google.protobuf.Timestamp global_start_time = 5; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setGlobalStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->global_start_time = $var; + + return $this; + } + + /** + * If unset, 00:00:00 UTC, January 1, 1971 (i.e. seconds: 31536000, nanos: 0) + * is used as default. + * + * Generated from protobuf field .google.protobuf.Timestamp global_end_time = 6; + * @return \Google\Protobuf\Timestamp|null + */ + public function getGlobalEndTime() + { + return $this->global_end_time; + } + + public function hasGlobalEndTime() + { + return isset($this->global_end_time); + } + + public function clearGlobalEndTime() + { + unset($this->global_end_time); + } + + /** + * If unset, 00:00:00 UTC, January 1, 1971 (i.e. seconds: 31536000, nanos: 0) + * is used as default. + * + * Generated from protobuf field .google.protobuf.Timestamp global_end_time = 6; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setGlobalEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->global_end_time = $var; + + return $this; + } + + /** + * The "global duration" of the overall plan is the difference between the + * earliest effective start time and the latest effective end time of + * all vehicles. Users can assign a cost per hour to that quantity to try + * and optimize for earliest job completion, for example. This cost must be in + * the same unit as + * [Shipment.penalty_cost][google.cloud.optimization.v1.Shipment.penalty_cost]. + * + * Generated from protobuf field double global_duration_cost_per_hour = 7; + * @return float + */ + public function getGlobalDurationCostPerHour() + { + return $this->global_duration_cost_per_hour; + } + + /** + * The "global duration" of the overall plan is the difference between the + * earliest effective start time and the latest effective end time of + * all vehicles. Users can assign a cost per hour to that quantity to try + * and optimize for earliest job completion, for example. This cost must be in + * the same unit as + * [Shipment.penalty_cost][google.cloud.optimization.v1.Shipment.penalty_cost]. + * + * Generated from protobuf field double global_duration_cost_per_hour = 7; + * @param float $var + * @return $this + */ + public function setGlobalDurationCostPerHour($var) + { + GPBUtil::checkDouble($var); + $this->global_duration_cost_per_hour = $var; + + return $this; + } + + /** + * Specifies duration and distance matrices used in the model. If this field + * is empty, Google Maps or geodesic distances will be used instead, depending + * on the value of the `use_geodesic_distances` field. If it is not empty, + * `use_geodesic_distances` cannot be true and neither + * `duration_distance_matrix_src_tags` nor `duration_distance_matrix_dst_tags` + * can be empty. + * Usage examples: + * * There are two locations: locA and locB. + * * 1 vehicle starting its route at locA and ending it at locA. + * * 1 pickup visit request at locB. + * ``` + * model { + * vehicles { start_tags: "locA" end_tags: "locA" } + * shipments { pickups { tags: "locB" } } + * duration_distance_matrix_src_tags: "locA" + * duration_distance_matrix_src_tags: "locB" + * duration_distance_matrix_dst_tags: "locA" + * duration_distance_matrix_dst_tags: "locB" + * duration_distance_matrices { + * rows { # from: locA + * durations { seconds: 0 } meters: 0 # to: locA + * durations { seconds: 100 } meters: 1000 # to: locB + * } + * rows { # from: locB + * durations { seconds: 102 } meters: 990 # to: locA + * durations { seconds: 0 } meters: 0 # to: locB + * } + * } + * } + * ``` + * * There are three locations: locA, locB and locC. + * * 1 vehicle starting its route at locA and ending it at locB, using + * matrix "fast". + * * 1 vehicle starting its route at locB and ending it at locB, using + * matrix "slow". + * * 1 vehicle starting its route at locB and ending it at locB, using + * matrix "fast". + * * 1 pickup visit request at locC. + * ``` + * model { + * vehicles { start_tags: "locA" end_tags: "locB" start_tags: "fast" } + * vehicles { start_tags: "locB" end_tags: "locB" start_tags: "slow" } + * vehicles { start_tags: "locB" end_tags: "locB" start_tags: "fast" } + * shipments { pickups { tags: "locC" } } + * duration_distance_matrix_src_tags: "locA" + * duration_distance_matrix_src_tags: "locB" + * duration_distance_matrix_src_tags: "locC" + * duration_distance_matrix_dst_tags: "locB" + * duration_distance_matrix_dst_tags: "locC" + * duration_distance_matrices { + * vehicle_start_tag: "fast" + * rows { # from: locA + * durations { seconds: 1000 } meters: 2000 # to: locB + * durations { seconds: 600 } meters: 1000 # to: locC + * } + * rows { # from: locB + * durations { seconds: 0 } meters: 0 # to: locB + * durations { seconds: 700 } meters: 1200 # to: locC + * } + * rows { # from: locC + * durations { seconds: 702 } meters: 1190 # to: locB + * durations { seconds: 0 } meters: 0 # to: locC + * } + * } + * duration_distance_matrices { + * vehicle_start_tag: "slow" + * rows { # from: locA + * durations { seconds: 1800 } meters: 2001 # to: locB + * durations { seconds: 900 } meters: 1002 # to: locC + * } + * rows { # from: locB + * durations { seconds: 0 } meters: 0 # to: locB + * durations { seconds: 1000 } meters: 1202 # to: locC + * } + * rows { # from: locC + * durations { seconds: 1001 } meters: 1195 # to: locB + * durations { seconds: 0 } meters: 0 # to: locC + * } + * } + * } + * ``` + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix duration_distance_matrices = 8; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDurationDistanceMatrices() + { + return $this->duration_distance_matrices; + } + + /** + * Specifies duration and distance matrices used in the model. If this field + * is empty, Google Maps or geodesic distances will be used instead, depending + * on the value of the `use_geodesic_distances` field. If it is not empty, + * `use_geodesic_distances` cannot be true and neither + * `duration_distance_matrix_src_tags` nor `duration_distance_matrix_dst_tags` + * can be empty. + * Usage examples: + * * There are two locations: locA and locB. + * * 1 vehicle starting its route at locA and ending it at locA. + * * 1 pickup visit request at locB. + * ``` + * model { + * vehicles { start_tags: "locA" end_tags: "locA" } + * shipments { pickups { tags: "locB" } } + * duration_distance_matrix_src_tags: "locA" + * duration_distance_matrix_src_tags: "locB" + * duration_distance_matrix_dst_tags: "locA" + * duration_distance_matrix_dst_tags: "locB" + * duration_distance_matrices { + * rows { # from: locA + * durations { seconds: 0 } meters: 0 # to: locA + * durations { seconds: 100 } meters: 1000 # to: locB + * } + * rows { # from: locB + * durations { seconds: 102 } meters: 990 # to: locA + * durations { seconds: 0 } meters: 0 # to: locB + * } + * } + * } + * ``` + * * There are three locations: locA, locB and locC. + * * 1 vehicle starting its route at locA and ending it at locB, using + * matrix "fast". + * * 1 vehicle starting its route at locB and ending it at locB, using + * matrix "slow". + * * 1 vehicle starting its route at locB and ending it at locB, using + * matrix "fast". + * * 1 pickup visit request at locC. + * ``` + * model { + * vehicles { start_tags: "locA" end_tags: "locB" start_tags: "fast" } + * vehicles { start_tags: "locB" end_tags: "locB" start_tags: "slow" } + * vehicles { start_tags: "locB" end_tags: "locB" start_tags: "fast" } + * shipments { pickups { tags: "locC" } } + * duration_distance_matrix_src_tags: "locA" + * duration_distance_matrix_src_tags: "locB" + * duration_distance_matrix_src_tags: "locC" + * duration_distance_matrix_dst_tags: "locB" + * duration_distance_matrix_dst_tags: "locC" + * duration_distance_matrices { + * vehicle_start_tag: "fast" + * rows { # from: locA + * durations { seconds: 1000 } meters: 2000 # to: locB + * durations { seconds: 600 } meters: 1000 # to: locC + * } + * rows { # from: locB + * durations { seconds: 0 } meters: 0 # to: locB + * durations { seconds: 700 } meters: 1200 # to: locC + * } + * rows { # from: locC + * durations { seconds: 702 } meters: 1190 # to: locB + * durations { seconds: 0 } meters: 0 # to: locC + * } + * } + * duration_distance_matrices { + * vehicle_start_tag: "slow" + * rows { # from: locA + * durations { seconds: 1800 } meters: 2001 # to: locB + * durations { seconds: 900 } meters: 1002 # to: locC + * } + * rows { # from: locB + * durations { seconds: 0 } meters: 0 # to: locB + * durations { seconds: 1000 } meters: 1202 # to: locC + * } + * rows { # from: locC + * durations { seconds: 1001 } meters: 1195 # to: locB + * durations { seconds: 0 } meters: 0 # to: locC + * } + * } + * } + * ``` + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix duration_distance_matrices = 8; + * @param array<\Google\Cloud\Optimization\V1\ShipmentModel\DurationDistanceMatrix>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDurationDistanceMatrices($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\ShipmentModel\DurationDistanceMatrix::class); + $this->duration_distance_matrices = $arr; + + return $this; + } + + /** + * Tags defining the sources of the duration and distance matrices; + * `duration_distance_matrices(i).rows(j)` defines durations and distances + * from visits with tag `duration_distance_matrix_src_tags(j)` to other visits + * in matrix i. + * Tags correspond to + * [VisitRequest.tags][google.cloud.optimization.v1.Shipment.VisitRequest.tags] + * or [Vehicle.start_tags][google.cloud.optimization.v1.Vehicle.start_tags]. + * A given `VisitRequest` or `Vehicle` must match exactly one tag in this + * field. Note that a `Vehicle`'s source, destination and matrix tags may be + * the same; similarly a `VisitRequest`'s source and destination tags may be + * the same. All tags must be different and cannot be empty strings. If this + * field is not empty, then `duration_distance_matrices` must not be empty. + * + * Generated from protobuf field repeated string duration_distance_matrix_src_tags = 9; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDurationDistanceMatrixSrcTags() + { + return $this->duration_distance_matrix_src_tags; + } + + /** + * Tags defining the sources of the duration and distance matrices; + * `duration_distance_matrices(i).rows(j)` defines durations and distances + * from visits with tag `duration_distance_matrix_src_tags(j)` to other visits + * in matrix i. + * Tags correspond to + * [VisitRequest.tags][google.cloud.optimization.v1.Shipment.VisitRequest.tags] + * or [Vehicle.start_tags][google.cloud.optimization.v1.Vehicle.start_tags]. + * A given `VisitRequest` or `Vehicle` must match exactly one tag in this + * field. Note that a `Vehicle`'s source, destination and matrix tags may be + * the same; similarly a `VisitRequest`'s source and destination tags may be + * the same. All tags must be different and cannot be empty strings. If this + * field is not empty, then `duration_distance_matrices` must not be empty. + * + * Generated from protobuf field repeated string duration_distance_matrix_src_tags = 9; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDurationDistanceMatrixSrcTags($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->duration_distance_matrix_src_tags = $arr; + + return $this; + } + + /** + * Tags defining the destinations of the duration and distance matrices; + * `duration_distance_matrices(i).rows(j).durations(k)` (resp. + * `duration_distance_matrices(i).rows(j).meters(k))` defines the duration + * (resp. the distance) of the travel from visits with tag + * `duration_distance_matrix_src_tags(j)` to visits with tag + * `duration_distance_matrix_dst_tags(k)` in matrix i. + * Tags correspond to + * [VisitRequest.tags][google.cloud.optimization.v1.Shipment.VisitRequest.tags] + * or [Vehicle.start_tags][google.cloud.optimization.v1.Vehicle.start_tags]. + * A given `VisitRequest` or `Vehicle` must match exactly one tag in this + * field. Note that a `Vehicle`'s source, destination and matrix tags may be + * the same; similarly a `VisitRequest`'s source and destination tags may be + * the same. All tags must be different and cannot be empty strings. If this + * field is not empty, then `duration_distance_matrices` must not be empty. + * + * Generated from protobuf field repeated string duration_distance_matrix_dst_tags = 10; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDurationDistanceMatrixDstTags() + { + return $this->duration_distance_matrix_dst_tags; + } + + /** + * Tags defining the destinations of the duration and distance matrices; + * `duration_distance_matrices(i).rows(j).durations(k)` (resp. + * `duration_distance_matrices(i).rows(j).meters(k))` defines the duration + * (resp. the distance) of the travel from visits with tag + * `duration_distance_matrix_src_tags(j)` to visits with tag + * `duration_distance_matrix_dst_tags(k)` in matrix i. + * Tags correspond to + * [VisitRequest.tags][google.cloud.optimization.v1.Shipment.VisitRequest.tags] + * or [Vehicle.start_tags][google.cloud.optimization.v1.Vehicle.start_tags]. + * A given `VisitRequest` or `Vehicle` must match exactly one tag in this + * field. Note that a `Vehicle`'s source, destination and matrix tags may be + * the same; similarly a `VisitRequest`'s source and destination tags may be + * the same. All tags must be different and cannot be empty strings. If this + * field is not empty, then `duration_distance_matrices` must not be empty. + * + * Generated from protobuf field repeated string duration_distance_matrix_dst_tags = 10; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDurationDistanceMatrixDstTags($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->duration_distance_matrix_dst_tags = $arr; + + return $this; + } + + /** + * Transition attributes added to the model. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.TransitionAttributes transition_attributes = 11; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTransitionAttributes() + { + return $this->transition_attributes; + } + + /** + * Transition attributes added to the model. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.TransitionAttributes transition_attributes = 11; + * @param array<\Google\Cloud\Optimization\V1\TransitionAttributes>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTransitionAttributes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\TransitionAttributes::class); + $this->transition_attributes = $arr; + + return $this; + } + + /** + * Sets of incompatible shipment_types (see `ShipmentTypeIncompatibility`). + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.ShipmentTypeIncompatibility shipment_type_incompatibilities = 12; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getShipmentTypeIncompatibilities() + { + return $this->shipment_type_incompatibilities; + } + + /** + * Sets of incompatible shipment_types (see `ShipmentTypeIncompatibility`). + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.ShipmentTypeIncompatibility shipment_type_incompatibilities = 12; + * @param array<\Google\Cloud\Optimization\V1\ShipmentTypeIncompatibility>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setShipmentTypeIncompatibilities($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\ShipmentTypeIncompatibility::class); + $this->shipment_type_incompatibilities = $arr; + + return $this; + } + + /** + * Sets of `shipment_type` requirements (see `ShipmentTypeRequirement`). + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.ShipmentTypeRequirement shipment_type_requirements = 13; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getShipmentTypeRequirements() + { + return $this->shipment_type_requirements; + } + + /** + * Sets of `shipment_type` requirements (see `ShipmentTypeRequirement`). + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.ShipmentTypeRequirement shipment_type_requirements = 13; + * @param array<\Google\Cloud\Optimization\V1\ShipmentTypeRequirement>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setShipmentTypeRequirements($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\ShipmentTypeRequirement::class); + $this->shipment_type_requirements = $arr; + + return $this; + } + + /** + * Set of precedence rules which must be enforced in the model. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.ShipmentModel.PrecedenceRule precedence_rules = 14; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPrecedenceRules() + { + return $this->precedence_rules; + } + + /** + * Set of precedence rules which must be enforced in the model. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.ShipmentModel.PrecedenceRule precedence_rules = 14; + * @param array<\Google\Cloud\Optimization\V1\ShipmentModel\PrecedenceRule>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPrecedenceRules($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\ShipmentModel\PrecedenceRule::class); + $this->precedence_rules = $arr; + + return $this; + } + + /** + * Deprecated: No longer used. + * Set of break rules used in the model. + * Each vehicle specifies the `BreakRule` that applies to it via the + * [Vehicle.break_rule_indices][google.cloud.optimization.v1.Vehicle.break_rule_indices] + * field (which must be a singleton). + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule break_rules = 15 [deprecated = true]; + * @return \Google\Protobuf\Internal\RepeatedField + * @deprecated + */ + public function getBreakRules() + { + @trigger_error('break_rules is deprecated.', E_USER_DEPRECATED); + return $this->break_rules; + } + + /** + * Deprecated: No longer used. + * Set of break rules used in the model. + * Each vehicle specifies the `BreakRule` that applies to it via the + * [Vehicle.break_rule_indices][google.cloud.optimization.v1.Vehicle.break_rule_indices] + * field (which must be a singleton). + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule break_rules = 15 [deprecated = true]; + * @param array<\Google\Cloud\Optimization\V1\ShipmentModel\BreakRule>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + * @deprecated + */ + public function setBreakRules($var) + { + @trigger_error('break_rules is deprecated.', E_USER_DEPRECATED); + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\ShipmentModel\BreakRule::class); + $this->break_rules = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentModel/BreakRule.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentModel/BreakRule.php new file mode 100644 index 000000000000..3559aee5e021 --- /dev/null +++ b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentModel/BreakRule.php @@ -0,0 +1,120 @@ +google.cloud.optimization.v1.ShipmentModel.BreakRule + */ +class BreakRule extends \Google\Protobuf\Internal\Message +{ + /** + * Sequence of breaks. See the `BreakRequest` message. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest break_requests = 1; + */ + private $break_requests; + /** + * Several `FrequencyConstraint` may apply. They must all be satisfied by + * the `BreakRequest`s of this `BreakRule`. See `FrequencyConstraint`. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint frequency_constraints = 2; + */ + private $frequency_constraints; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Optimization\V1\ShipmentModel\BreakRule\BreakRequest>|\Google\Protobuf\Internal\RepeatedField $break_requests + * Sequence of breaks. See the `BreakRequest` message. + * @type array<\Google\Cloud\Optimization\V1\ShipmentModel\BreakRule\FrequencyConstraint>|\Google\Protobuf\Internal\RepeatedField $frequency_constraints + * Several `FrequencyConstraint` may apply. They must all be satisfied by + * the `BreakRequest`s of this `BreakRule`. See `FrequencyConstraint`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); + parent::__construct($data); + } + + /** + * Sequence of breaks. See the `BreakRequest` message. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest break_requests = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getBreakRequests() + { + return $this->break_requests; + } + + /** + * Sequence of breaks. See the `BreakRequest` message. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest break_requests = 1; + * @param array<\Google\Cloud\Optimization\V1\ShipmentModel\BreakRule\BreakRequest>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setBreakRequests($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\ShipmentModel\BreakRule\BreakRequest::class); + $this->break_requests = $arr; + + return $this; + } + + /** + * Several `FrequencyConstraint` may apply. They must all be satisfied by + * the `BreakRequest`s of this `BreakRule`. See `FrequencyConstraint`. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint frequency_constraints = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFrequencyConstraints() + { + return $this->frequency_constraints; + } + + /** + * Several `FrequencyConstraint` may apply. They must all be satisfied by + * the `BreakRequest`s of this `BreakRule`. See `FrequencyConstraint`. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint frequency_constraints = 2; + * @param array<\Google\Cloud\Optimization\V1\ShipmentModel\BreakRule\FrequencyConstraint>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFrequencyConstraints($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\ShipmentModel\BreakRule\FrequencyConstraint::class); + $this->frequency_constraints = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(BreakRule::class, \Google\Cloud\Optimization\V1\ShipmentModel_BreakRule::class); + diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentModel/BreakRule/BreakRequest.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentModel/BreakRule/BreakRequest.php new file mode 100644 index 000000000000..67f86f1f4e7a --- /dev/null +++ b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentModel/BreakRule/BreakRequest.php @@ -0,0 +1,172 @@ +google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest + */ +class BreakRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Lower bound (inclusive) on the start of the break. + * + * Generated from protobuf field .google.protobuf.Timestamp earliest_start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $earliest_start_time = null; + /** + * Required. Upper bound (inclusive) on the start of the break. + * + * Generated from protobuf field .google.protobuf.Timestamp latest_start_time = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $latest_start_time = null; + /** + * Required. Minimum duration of the break. Must be positive. + * + * Generated from protobuf field .google.protobuf.Duration min_duration = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $min_duration = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $earliest_start_time + * Required. Lower bound (inclusive) on the start of the break. + * @type \Google\Protobuf\Timestamp $latest_start_time + * Required. Upper bound (inclusive) on the start of the break. + * @type \Google\Protobuf\Duration $min_duration + * Required. Minimum duration of the break. Must be positive. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); + parent::__construct($data); + } + + /** + * Required. Lower bound (inclusive) on the start of the break. + * + * Generated from protobuf field .google.protobuf.Timestamp earliest_start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEarliestStartTime() + { + return $this->earliest_start_time; + } + + public function hasEarliestStartTime() + { + return isset($this->earliest_start_time); + } + + public function clearEarliestStartTime() + { + unset($this->earliest_start_time); + } + + /** + * Required. Lower bound (inclusive) on the start of the break. + * + * Generated from protobuf field .google.protobuf.Timestamp earliest_start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEarliestStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->earliest_start_time = $var; + + return $this; + } + + /** + * Required. Upper bound (inclusive) on the start of the break. + * + * Generated from protobuf field .google.protobuf.Timestamp latest_start_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getLatestStartTime() + { + return $this->latest_start_time; + } + + public function hasLatestStartTime() + { + return isset($this->latest_start_time); + } + + public function clearLatestStartTime() + { + unset($this->latest_start_time); + } + + /** + * Required. Upper bound (inclusive) on the start of the break. + * + * Generated from protobuf field .google.protobuf.Timestamp latest_start_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setLatestStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->latest_start_time = $var; + + return $this; + } + + /** + * Required. Minimum duration of the break. Must be positive. + * + * Generated from protobuf field .google.protobuf.Duration min_duration = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Duration|null + */ + public function getMinDuration() + { + return $this->min_duration; + } + + public function hasMinDuration() + { + return isset($this->min_duration); + } + + public function clearMinDuration() + { + unset($this->min_duration); + } + + /** + * Required. Minimum duration of the break. Must be positive. + * + * Generated from protobuf field .google.protobuf.Duration min_duration = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setMinDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->min_duration = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(BreakRequest::class, \Google\Cloud\Optimization\V1\ShipmentModel_BreakRule_BreakRequest::class); + diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentModel/BreakRule/FrequencyConstraint.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentModel/BreakRule/FrequencyConstraint.php new file mode 100644 index 000000000000..39bf3659c306 --- /dev/null +++ b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentModel/BreakRule/FrequencyConstraint.php @@ -0,0 +1,166 @@ +google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint + */ +class FrequencyConstraint extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Minimum break duration for this constraint. Nonnegative. + * See description of `FrequencyConstraint`. + * + * Generated from protobuf field .google.protobuf.Duration min_break_duration = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $min_break_duration = null; + /** + * Required. Maximum allowed span of any interval of time in the route + * that does not include at least partially a break of `duration >= + * min_break_duration`. Must be positive. + * + * Generated from protobuf field .google.protobuf.Duration max_inter_break_duration = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $max_inter_break_duration = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Duration $min_break_duration + * Required. Minimum break duration for this constraint. Nonnegative. + * See description of `FrequencyConstraint`. + * @type \Google\Protobuf\Duration $max_inter_break_duration + * Required. Maximum allowed span of any interval of time in the route + * that does not include at least partially a break of `duration >= + * min_break_duration`. Must be positive. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); + parent::__construct($data); + } + + /** + * Required. Minimum break duration for this constraint. Nonnegative. + * See description of `FrequencyConstraint`. + * + * Generated from protobuf field .google.protobuf.Duration min_break_duration = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Duration|null + */ + public function getMinBreakDuration() + { + return $this->min_break_duration; + } + + public function hasMinBreakDuration() + { + return isset($this->min_break_duration); + } + + public function clearMinBreakDuration() + { + unset($this->min_break_duration); + } + + /** + * Required. Minimum break duration for this constraint. Nonnegative. + * See description of `FrequencyConstraint`. + * + * Generated from protobuf field .google.protobuf.Duration min_break_duration = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setMinBreakDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->min_break_duration = $var; + + return $this; + } + + /** + * Required. Maximum allowed span of any interval of time in the route + * that does not include at least partially a break of `duration >= + * min_break_duration`. Must be positive. + * + * Generated from protobuf field .google.protobuf.Duration max_inter_break_duration = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Duration|null + */ + public function getMaxInterBreakDuration() + { + return $this->max_inter_break_duration; + } + + public function hasMaxInterBreakDuration() + { + return isset($this->max_inter_break_duration); + } + + public function clearMaxInterBreakDuration() + { + unset($this->max_inter_break_duration); + } + + /** + * Required. Maximum allowed span of any interval of time in the route + * that does not include at least partially a break of `duration >= + * min_break_duration`. Must be positive. + * + * Generated from protobuf field .google.protobuf.Duration max_inter_break_duration = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setMaxInterBreakDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->max_inter_break_duration = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(FrequencyConstraint::class, \Google\Cloud\Optimization\V1\ShipmentModel_BreakRule_FrequencyConstraint::class); + diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentModel/DurationDistanceMatrix.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentModel/DurationDistanceMatrix.php new file mode 100644 index 000000000000..24e614413ac5 --- /dev/null +++ b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentModel/DurationDistanceMatrix.php @@ -0,0 +1,137 @@ +google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix + */ +class DurationDistanceMatrix extends \Google\Protobuf\Internal\Message +{ + /** + * Specifies the rows of the duration and distance matrix. It must have as + * many elements as + * [ShipmentModel.duration_distance_matrix_src_tags][google.cloud.optimization.v1.ShipmentModel.duration_distance_matrix_src_tags]. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row rows = 1; + */ + private $rows; + /** + * Tag defining to which vehicles this duration and distance matrix applies. + * If empty, this applies to all vehicles, and there can only be a single + * matrix. + * Each vehicle start must match exactly one matrix, i.e. exactly one of + * their `start_tags` field must match the `vehicle_start_tag` of a matrix + * (and of that matrix only). + * All matrices must have a different `vehicle_start_tag`. + * + * Generated from protobuf field string vehicle_start_tag = 2; + */ + protected $vehicle_start_tag = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Optimization\V1\ShipmentModel\DurationDistanceMatrix\Row>|\Google\Protobuf\Internal\RepeatedField $rows + * Specifies the rows of the duration and distance matrix. It must have as + * many elements as + * [ShipmentModel.duration_distance_matrix_src_tags][google.cloud.optimization.v1.ShipmentModel.duration_distance_matrix_src_tags]. + * @type string $vehicle_start_tag + * Tag defining to which vehicles this duration and distance matrix applies. + * If empty, this applies to all vehicles, and there can only be a single + * matrix. + * Each vehicle start must match exactly one matrix, i.e. exactly one of + * their `start_tags` field must match the `vehicle_start_tag` of a matrix + * (and of that matrix only). + * All matrices must have a different `vehicle_start_tag`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); + parent::__construct($data); + } + + /** + * Specifies the rows of the duration and distance matrix. It must have as + * many elements as + * [ShipmentModel.duration_distance_matrix_src_tags][google.cloud.optimization.v1.ShipmentModel.duration_distance_matrix_src_tags]. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row rows = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRows() + { + return $this->rows; + } + + /** + * Specifies the rows of the duration and distance matrix. It must have as + * many elements as + * [ShipmentModel.duration_distance_matrix_src_tags][google.cloud.optimization.v1.ShipmentModel.duration_distance_matrix_src_tags]. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row rows = 1; + * @param array<\Google\Cloud\Optimization\V1\ShipmentModel\DurationDistanceMatrix\Row>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRows($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\ShipmentModel\DurationDistanceMatrix\Row::class); + $this->rows = $arr; + + return $this; + } + + /** + * Tag defining to which vehicles this duration and distance matrix applies. + * If empty, this applies to all vehicles, and there can only be a single + * matrix. + * Each vehicle start must match exactly one matrix, i.e. exactly one of + * their `start_tags` field must match the `vehicle_start_tag` of a matrix + * (and of that matrix only). + * All matrices must have a different `vehicle_start_tag`. + * + * Generated from protobuf field string vehicle_start_tag = 2; + * @return string + */ + public function getVehicleStartTag() + { + return $this->vehicle_start_tag; + } + + /** + * Tag defining to which vehicles this duration and distance matrix applies. + * If empty, this applies to all vehicles, and there can only be a single + * matrix. + * Each vehicle start must match exactly one matrix, i.e. exactly one of + * their `start_tags` field must match the `vehicle_start_tag` of a matrix + * (and of that matrix only). + * All matrices must have a different `vehicle_start_tag`. + * + * Generated from protobuf field string vehicle_start_tag = 2; + * @param string $var + * @return $this + */ + public function setVehicleStartTag($var) + { + GPBUtil::checkString($var, True); + $this->vehicle_start_tag = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(DurationDistanceMatrix::class, \Google\Cloud\Optimization\V1\ShipmentModel_DurationDistanceMatrix::class); + diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentModel/DurationDistanceMatrix/Row.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentModel/DurationDistanceMatrix/Row.php new file mode 100644 index 000000000000..bbe790501808 --- /dev/null +++ b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentModel/DurationDistanceMatrix/Row.php @@ -0,0 +1,116 @@ +google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row + */ +class Row extends \Google\Protobuf\Internal\Message +{ + /** + * Duration values for a given row. It must have as many elements as + * [ShipmentModel.duration_distance_matrix_dst_tags][google.cloud.optimization.v1.ShipmentModel.duration_distance_matrix_dst_tags]. + * + * Generated from protobuf field repeated .google.protobuf.Duration durations = 1; + */ + private $durations; + /** + * Distance values for a given row. If no costs or constraints refer to + * distances in the model, this can be left empty; otherwise it must have + * as many elements as `durations`. + * + * Generated from protobuf field repeated double meters = 2; + */ + private $meters; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Protobuf\Duration>|\Google\Protobuf\Internal\RepeatedField $durations + * Duration values for a given row. It must have as many elements as + * [ShipmentModel.duration_distance_matrix_dst_tags][google.cloud.optimization.v1.ShipmentModel.duration_distance_matrix_dst_tags]. + * @type array|\Google\Protobuf\Internal\RepeatedField $meters + * Distance values for a given row. If no costs or constraints refer to + * distances in the model, this can be left empty; otherwise it must have + * as many elements as `durations`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); + parent::__construct($data); + } + + /** + * Duration values for a given row. It must have as many elements as + * [ShipmentModel.duration_distance_matrix_dst_tags][google.cloud.optimization.v1.ShipmentModel.duration_distance_matrix_dst_tags]. + * + * Generated from protobuf field repeated .google.protobuf.Duration durations = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDurations() + { + return $this->durations; + } + + /** + * Duration values for a given row. It must have as many elements as + * [ShipmentModel.duration_distance_matrix_dst_tags][google.cloud.optimization.v1.ShipmentModel.duration_distance_matrix_dst_tags]. + * + * Generated from protobuf field repeated .google.protobuf.Duration durations = 1; + * @param array<\Google\Protobuf\Duration>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDurations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Duration::class); + $this->durations = $arr; + + return $this; + } + + /** + * Distance values for a given row. If no costs or constraints refer to + * distances in the model, this can be left empty; otherwise it must have + * as many elements as `durations`. + * + * Generated from protobuf field repeated double meters = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMeters() + { + return $this->meters; + } + + /** + * Distance values for a given row. If no costs or constraints refer to + * distances in the model, this can be left empty; otherwise it must have + * as many elements as `durations`. + * + * Generated from protobuf field repeated double meters = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMeters($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::DOUBLE); + $this->meters = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Row::class, \Google\Cloud\Optimization\V1\ShipmentModel_DurationDistanceMatrix_Row::class); + diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentModel/PrecedenceRule.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentModel/PrecedenceRule.php new file mode 100644 index 000000000000..646693dcbc35 --- /dev/null +++ b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentModel/PrecedenceRule.php @@ -0,0 +1,243 @@ +google.cloud.optimization.v1.ShipmentModel.PrecedenceRule + */ +class PrecedenceRule extends \Google\Protobuf\Internal\Message +{ + /** + * Shipment index of the "first" event. This field must be specified. + * + * Generated from protobuf field optional int32 first_index = 1; + */ + protected $first_index = null; + /** + * Indicates if the "first" event is a delivery. + * + * Generated from protobuf field bool first_is_delivery = 3; + */ + protected $first_is_delivery = false; + /** + * Shipment index of the "second" event. This field must be specified. + * + * Generated from protobuf field optional int32 second_index = 2; + */ + protected $second_index = null; + /** + * Indicates if the "second" event is a delivery. + * + * Generated from protobuf field bool second_is_delivery = 4; + */ + protected $second_is_delivery = false; + /** + * The offset between the "first" and "second" event. It can be negative. + * + * Generated from protobuf field .google.protobuf.Duration offset_duration = 5; + */ + protected $offset_duration = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $first_index + * Shipment index of the "first" event. This field must be specified. + * @type bool $first_is_delivery + * Indicates if the "first" event is a delivery. + * @type int $second_index + * Shipment index of the "second" event. This field must be specified. + * @type bool $second_is_delivery + * Indicates if the "second" event is a delivery. + * @type \Google\Protobuf\Duration $offset_duration + * The offset between the "first" and "second" event. It can be negative. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); + parent::__construct($data); + } + + /** + * Shipment index of the "first" event. This field must be specified. + * + * Generated from protobuf field optional int32 first_index = 1; + * @return int + */ + public function getFirstIndex() + { + return isset($this->first_index) ? $this->first_index : 0; + } + + public function hasFirstIndex() + { + return isset($this->first_index); + } + + public function clearFirstIndex() + { + unset($this->first_index); + } + + /** + * Shipment index of the "first" event. This field must be specified. + * + * Generated from protobuf field optional int32 first_index = 1; + * @param int $var + * @return $this + */ + public function setFirstIndex($var) + { + GPBUtil::checkInt32($var); + $this->first_index = $var; + + return $this; + } + + /** + * Indicates if the "first" event is a delivery. + * + * Generated from protobuf field bool first_is_delivery = 3; + * @return bool + */ + public function getFirstIsDelivery() + { + return $this->first_is_delivery; + } + + /** + * Indicates if the "first" event is a delivery. + * + * Generated from protobuf field bool first_is_delivery = 3; + * @param bool $var + * @return $this + */ + public function setFirstIsDelivery($var) + { + GPBUtil::checkBool($var); + $this->first_is_delivery = $var; + + return $this; + } + + /** + * Shipment index of the "second" event. This field must be specified. + * + * Generated from protobuf field optional int32 second_index = 2; + * @return int + */ + public function getSecondIndex() + { + return isset($this->second_index) ? $this->second_index : 0; + } + + public function hasSecondIndex() + { + return isset($this->second_index); + } + + public function clearSecondIndex() + { + unset($this->second_index); + } + + /** + * Shipment index of the "second" event. This field must be specified. + * + * Generated from protobuf field optional int32 second_index = 2; + * @param int $var + * @return $this + */ + public function setSecondIndex($var) + { + GPBUtil::checkInt32($var); + $this->second_index = $var; + + return $this; + } + + /** + * Indicates if the "second" event is a delivery. + * + * Generated from protobuf field bool second_is_delivery = 4; + * @return bool + */ + public function getSecondIsDelivery() + { + return $this->second_is_delivery; + } + + /** + * Indicates if the "second" event is a delivery. + * + * Generated from protobuf field bool second_is_delivery = 4; + * @param bool $var + * @return $this + */ + public function setSecondIsDelivery($var) + { + GPBUtil::checkBool($var); + $this->second_is_delivery = $var; + + return $this; + } + + /** + * The offset between the "first" and "second" event. It can be negative. + * + * Generated from protobuf field .google.protobuf.Duration offset_duration = 5; + * @return \Google\Protobuf\Duration|null + */ + public function getOffsetDuration() + { + return $this->offset_duration; + } + + public function hasOffsetDuration() + { + return isset($this->offset_duration); + } + + public function clearOffsetDuration() + { + unset($this->offset_duration); + } + + /** + * The offset between the "first" and "second" event. It can be negative. + * + * Generated from protobuf field .google.protobuf.Duration offset_duration = 5; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setOffsetDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->offset_duration = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(PrecedenceRule::class, \Google\Cloud\Optimization\V1\ShipmentModel_PrecedenceRule::class); + diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentRoute.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentRoute.php new file mode 100644 index 000000000000..05da325cf562 --- /dev/null +++ b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentRoute.php @@ -0,0 +1,954 @@ + + * | TRANSITION[i] | VISIT[i] | + * | | | + * | * TRAVEL: the vehicle moves from | PERFORM the visit: | + * | VISIT[i-1].departure_location to | | + * | VISIT[i].arrival_location, which | * Spend some time: | + * | takes a given travel duration | the "visit duration". | + * | and distance | | + * | | * Load or unload | + * | * BREAKS: the driver may have | some quantities from the | + * | breaks (e.g. lunch break). | vehicle: the "demand". | + * | | | + * | * WAIT: the driver/vehicle does | | + * | nothing. This can happen for | | + * | many reasons, for example when | | + * | the vehicle reaches the next | | + * | event's destination before the | | + * | start of its time window | | + * | | | + * | * DELAY: *right before* the next | | + * | arrival. E.g. the vehicle and/or | | + * | driver spends time unloading. | | + * | | | + * ---+-------------------------------------+-----------------------------+--> + * ^ ^ ^ + * V[i-1].end V[i].start V[i].end + * ``` + * Lastly, here is how the TRAVEL, BREAKS, DELAY and WAIT can be arranged + * during a transition. + * * They don't overlap. + * * The DELAY is unique and *must* be a contiguous period of time right + * before the next visit (or vehicle end). Thus, it suffice to know the + * delay duration to know its start and end time. + * * The BREAKS are contiguous, non-overlapping periods of time. The + * response specifies the start time and duration of each break. + * * TRAVEL and WAIT are "preemptable": they can be interrupted several times + * during this transition. Clients can assume that travel happens "as soon as + * possible" and that "wait" fills the remaining time. + * A (complex) example: + * ``` + * TRANSITION[i] + * --++-----+-----------------------------------------------------------++--> + * || | | | | | | || + * || T | B | T | | B | | D || + * || r | r | r | W | r | W | e || + * || a | e | a | a | e | a | l || + * || v | a | v | i | a | i | a || + * || e | k | e | t | k | t | y || + * || l | | l | | | | || + * || | | | | | | || + * --++-----------------------------------------------------------------++--> + * ``` + * + * Generated from protobuf message google.cloud.optimization.v1.ShipmentRoute + */ +class ShipmentRoute extends \Google\Protobuf\Internal\Message +{ + /** + * Vehicle performing the route, identified by its index in the source + * `ShipmentModel`. + * + * Generated from protobuf field int32 vehicle_index = 1; + */ + protected $vehicle_index = 0; + /** + * Label of the vehicle performing this route, equal to + * `ShipmentModel.vehicles(vehicle_index).label`, if specified. + * + * Generated from protobuf field string vehicle_label = 2; + */ + protected $vehicle_label = ''; + /** + * Time at which the vehicle starts its route. + * + * Generated from protobuf field .google.protobuf.Timestamp vehicle_start_time = 5; + */ + protected $vehicle_start_time = null; + /** + * Time at which the vehicle finishes its route. + * + * Generated from protobuf field .google.protobuf.Timestamp vehicle_end_time = 6; + */ + protected $vehicle_end_time = null; + /** + * Ordered sequence of visits representing a route. + * visits[i] is the i-th visit in the route. + * If this field is empty, the vehicle is considered as unused. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.ShipmentRoute.Visit visits = 7; + */ + private $visits; + /** + * Ordered list of transitions for the route. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.ShipmentRoute.Transition transitions = 8; + */ + private $transitions; + /** + * When + * [OptimizeToursRequest.consider_road_traffic][google.cloud.optimization.v1.OptimizeToursRequest.consider_road_traffic], + * is set to true, this field indicates that inconsistencies in route timings + * are predicted using traffic-based travel duration estimates. There may be + * insufficient time to complete traffic-adjusted travel, delays, and breaks + * between visits, before the first visit, or after the last visit, while + * still satisfying the visit and vehicle time windows. For example, + * ``` + * start_time(previous_visit) + duration(previous_visit) + + * travel_duration(previous_visit, next_visit) > start_time(next_visit) + * ``` + * Arrival at next_visit will likely happen later than its current + * time window due the increased estimate of travel time + * `travel_duration(previous_visit, next_visit)` due to traffic. Also, a break + * may be forced to overlap with a visit due to an increase in travel time + * estimates and visit or break time window restrictions. + * + * Generated from protobuf field bool has_traffic_infeasibilities = 9; + */ + protected $has_traffic_infeasibilities = false; + /** + * The encoded polyline representation of the route. + * This field is only populated if + * [OptimizeToursRequest.populate_polylines][google.cloud.optimization.v1.OptimizeToursRequest.populate_polylines] + * is set to true. + * + * Generated from protobuf field .google.cloud.optimization.v1.ShipmentRoute.EncodedPolyline route_polyline = 10; + */ + protected $route_polyline = null; + /** + * Breaks scheduled for the vehicle performing this route. + * The `breaks` sequence represents time intervals, each starting at the + * corresponding `start_time` and lasting `duration` seconds. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.ShipmentRoute.Break breaks = 11; + */ + private $breaks; + /** + * Duration, distance and load metrics for this route. The fields of + * [AggregatedMetrics][google.cloud.optimization.v1.AggregatedMetrics] are + * summed over all + * [ShipmentRoute.transitions][google.cloud.optimization.v1.ShipmentRoute.transitions] + * or + * [ShipmentRoute.visits][google.cloud.optimization.v1.ShipmentRoute.visits], + * depending on the context. + * + * Generated from protobuf field .google.cloud.optimization.v1.AggregatedMetrics metrics = 12; + */ + protected $metrics = null; + /** + * Cost of the route, broken down by cost-related request fields. + * The keys are proto paths, relative to the input OptimizeToursRequest, e.g. + * "model.shipments.pickups.cost", and the values are the total cost + * generated by the corresponding cost field, aggregated over the whole route. + * In other words, costs["model.shipments.pickups.cost"] is the sum of all + * pickup costs over the route. All costs defined in the model are reported in + * detail here with the exception of costs related to TransitionAttributes + * that are only reported in an aggregated way as of 2022/01. + * + * Generated from protobuf field map route_costs = 17; + */ + private $route_costs; + /** + * Total cost of the route. The sum of all costs in the cost map. + * + * Generated from protobuf field double route_total_cost = 18; + */ + protected $route_total_cost = 0.0; + /** + * Deprecated: Use + * [Transition.vehicle_loads][google.cloud.optimization.v1.ShipmentRoute.Transition.vehicle_loads] + * instead. Vehicle loads upon arrival at its end location, for each type + * specified in + * [Vehicle.capacities][google.cloud.optimization.v1.Vehicle.capacities], + * `start_load_intervals`, `end_load_intervals` or demands. Exception: we omit + * loads for quantity types unconstrained by intervals and that don't have any + * non-zero demand on the route. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.CapacityQuantity end_loads = 13 [deprecated = true]; + * @deprecated + */ + private $end_loads; + /** + * Deprecated: Use + * [ShipmentRoute.transitions][google.cloud.optimization.v1.ShipmentRoute.transitions] + * instead. Ordered list of travel steps for the route. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.ShipmentRoute.TravelStep travel_steps = 14 [deprecated = true]; + * @deprecated + */ + private $travel_steps; + /** + * Deprecated: No longer used. + * This field will only be populated at the + * [ShipmentRoute.Visit][google.cloud.optimization.v1.ShipmentRoute.Visit] + * level. + * This field is the extra detour time due to the shipments visited on the + * route. + * It is equal to `vehicle_end_time` - `vehicle_start_time` - travel duration + * from the vehicle's start_location to its `end_location`. + * + * Generated from protobuf field .google.protobuf.Duration vehicle_detour = 15 [deprecated = true]; + * @deprecated + */ + protected $vehicle_detour = null; + /** + * Deprecated: Delay occurring before the vehicle end. See + * [TransitionAttributes.delay][google.cloud.optimization.v1.TransitionAttributes.delay]. + * + * Generated from protobuf field .google.cloud.optimization.v1.ShipmentRoute.Delay delay_before_vehicle_end = 16 [deprecated = true]; + * @deprecated + */ + protected $delay_before_vehicle_end = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $vehicle_index + * Vehicle performing the route, identified by its index in the source + * `ShipmentModel`. + * @type string $vehicle_label + * Label of the vehicle performing this route, equal to + * `ShipmentModel.vehicles(vehicle_index).label`, if specified. + * @type \Google\Protobuf\Timestamp $vehicle_start_time + * Time at which the vehicle starts its route. + * @type \Google\Protobuf\Timestamp $vehicle_end_time + * Time at which the vehicle finishes its route. + * @type array<\Google\Cloud\Optimization\V1\ShipmentRoute\Visit>|\Google\Protobuf\Internal\RepeatedField $visits + * Ordered sequence of visits representing a route. + * visits[i] is the i-th visit in the route. + * If this field is empty, the vehicle is considered as unused. + * @type array<\Google\Cloud\Optimization\V1\ShipmentRoute\Transition>|\Google\Protobuf\Internal\RepeatedField $transitions + * Ordered list of transitions for the route. + * @type bool $has_traffic_infeasibilities + * When + * [OptimizeToursRequest.consider_road_traffic][google.cloud.optimization.v1.OptimizeToursRequest.consider_road_traffic], + * is set to true, this field indicates that inconsistencies in route timings + * are predicted using traffic-based travel duration estimates. There may be + * insufficient time to complete traffic-adjusted travel, delays, and breaks + * between visits, before the first visit, or after the last visit, while + * still satisfying the visit and vehicle time windows. For example, + * ``` + * start_time(previous_visit) + duration(previous_visit) + + * travel_duration(previous_visit, next_visit) > start_time(next_visit) + * ``` + * Arrival at next_visit will likely happen later than its current + * time window due the increased estimate of travel time + * `travel_duration(previous_visit, next_visit)` due to traffic. Also, a break + * may be forced to overlap with a visit due to an increase in travel time + * estimates and visit or break time window restrictions. + * @type \Google\Cloud\Optimization\V1\ShipmentRoute\EncodedPolyline $route_polyline + * The encoded polyline representation of the route. + * This field is only populated if + * [OptimizeToursRequest.populate_polylines][google.cloud.optimization.v1.OptimizeToursRequest.populate_polylines] + * is set to true. + * @type array<\Google\Cloud\Optimization\V1\ShipmentRoute\PBBreak>|\Google\Protobuf\Internal\RepeatedField $breaks + * Breaks scheduled for the vehicle performing this route. + * The `breaks` sequence represents time intervals, each starting at the + * corresponding `start_time` and lasting `duration` seconds. + * @type \Google\Cloud\Optimization\V1\AggregatedMetrics $metrics + * Duration, distance and load metrics for this route. The fields of + * [AggregatedMetrics][google.cloud.optimization.v1.AggregatedMetrics] are + * summed over all + * [ShipmentRoute.transitions][google.cloud.optimization.v1.ShipmentRoute.transitions] + * or + * [ShipmentRoute.visits][google.cloud.optimization.v1.ShipmentRoute.visits], + * depending on the context. + * @type array|\Google\Protobuf\Internal\MapField $route_costs + * Cost of the route, broken down by cost-related request fields. + * The keys are proto paths, relative to the input OptimizeToursRequest, e.g. + * "model.shipments.pickups.cost", and the values are the total cost + * generated by the corresponding cost field, aggregated over the whole route. + * In other words, costs["model.shipments.pickups.cost"] is the sum of all + * pickup costs over the route. All costs defined in the model are reported in + * detail here with the exception of costs related to TransitionAttributes + * that are only reported in an aggregated way as of 2022/01. + * @type float $route_total_cost + * Total cost of the route. The sum of all costs in the cost map. + * @type array<\Google\Cloud\Optimization\V1\CapacityQuantity>|\Google\Protobuf\Internal\RepeatedField $end_loads + * Deprecated: Use + * [Transition.vehicle_loads][google.cloud.optimization.v1.ShipmentRoute.Transition.vehicle_loads] + * instead. Vehicle loads upon arrival at its end location, for each type + * specified in + * [Vehicle.capacities][google.cloud.optimization.v1.Vehicle.capacities], + * `start_load_intervals`, `end_load_intervals` or demands. Exception: we omit + * loads for quantity types unconstrained by intervals and that don't have any + * non-zero demand on the route. + * @type array<\Google\Cloud\Optimization\V1\ShipmentRoute\TravelStep>|\Google\Protobuf\Internal\RepeatedField $travel_steps + * Deprecated: Use + * [ShipmentRoute.transitions][google.cloud.optimization.v1.ShipmentRoute.transitions] + * instead. Ordered list of travel steps for the route. + * @type \Google\Protobuf\Duration $vehicle_detour + * Deprecated: No longer used. + * This field will only be populated at the + * [ShipmentRoute.Visit][google.cloud.optimization.v1.ShipmentRoute.Visit] + * level. + * This field is the extra detour time due to the shipments visited on the + * route. + * It is equal to `vehicle_end_time` - `vehicle_start_time` - travel duration + * from the vehicle's start_location to its `end_location`. + * @type \Google\Cloud\Optimization\V1\ShipmentRoute\Delay $delay_before_vehicle_end + * Deprecated: Delay occurring before the vehicle end. See + * [TransitionAttributes.delay][google.cloud.optimization.v1.TransitionAttributes.delay]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); + parent::__construct($data); + } + + /** + * Vehicle performing the route, identified by its index in the source + * `ShipmentModel`. + * + * Generated from protobuf field int32 vehicle_index = 1; + * @return int + */ + public function getVehicleIndex() + { + return $this->vehicle_index; + } + + /** + * Vehicle performing the route, identified by its index in the source + * `ShipmentModel`. + * + * Generated from protobuf field int32 vehicle_index = 1; + * @param int $var + * @return $this + */ + public function setVehicleIndex($var) + { + GPBUtil::checkInt32($var); + $this->vehicle_index = $var; + + return $this; + } + + /** + * Label of the vehicle performing this route, equal to + * `ShipmentModel.vehicles(vehicle_index).label`, if specified. + * + * Generated from protobuf field string vehicle_label = 2; + * @return string + */ + public function getVehicleLabel() + { + return $this->vehicle_label; + } + + /** + * Label of the vehicle performing this route, equal to + * `ShipmentModel.vehicles(vehicle_index).label`, if specified. + * + * Generated from protobuf field string vehicle_label = 2; + * @param string $var + * @return $this + */ + public function setVehicleLabel($var) + { + GPBUtil::checkString($var, True); + $this->vehicle_label = $var; + + return $this; + } + + /** + * Time at which the vehicle starts its route. + * + * Generated from protobuf field .google.protobuf.Timestamp vehicle_start_time = 5; + * @return \Google\Protobuf\Timestamp|null + */ + public function getVehicleStartTime() + { + return $this->vehicle_start_time; + } + + public function hasVehicleStartTime() + { + return isset($this->vehicle_start_time); + } + + public function clearVehicleStartTime() + { + unset($this->vehicle_start_time); + } + + /** + * Time at which the vehicle starts its route. + * + * Generated from protobuf field .google.protobuf.Timestamp vehicle_start_time = 5; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setVehicleStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->vehicle_start_time = $var; + + return $this; + } + + /** + * Time at which the vehicle finishes its route. + * + * Generated from protobuf field .google.protobuf.Timestamp vehicle_end_time = 6; + * @return \Google\Protobuf\Timestamp|null + */ + public function getVehicleEndTime() + { + return $this->vehicle_end_time; + } + + public function hasVehicleEndTime() + { + return isset($this->vehicle_end_time); + } + + public function clearVehicleEndTime() + { + unset($this->vehicle_end_time); + } + + /** + * Time at which the vehicle finishes its route. + * + * Generated from protobuf field .google.protobuf.Timestamp vehicle_end_time = 6; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setVehicleEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->vehicle_end_time = $var; + + return $this; + } + + /** + * Ordered sequence of visits representing a route. + * visits[i] is the i-th visit in the route. + * If this field is empty, the vehicle is considered as unused. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.ShipmentRoute.Visit visits = 7; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getVisits() + { + return $this->visits; + } + + /** + * Ordered sequence of visits representing a route. + * visits[i] is the i-th visit in the route. + * If this field is empty, the vehicle is considered as unused. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.ShipmentRoute.Visit visits = 7; + * @param array<\Google\Cloud\Optimization\V1\ShipmentRoute\Visit>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setVisits($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\ShipmentRoute\Visit::class); + $this->visits = $arr; + + return $this; + } + + /** + * Ordered list of transitions for the route. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.ShipmentRoute.Transition transitions = 8; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTransitions() + { + return $this->transitions; + } + + /** + * Ordered list of transitions for the route. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.ShipmentRoute.Transition transitions = 8; + * @param array<\Google\Cloud\Optimization\V1\ShipmentRoute\Transition>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTransitions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\ShipmentRoute\Transition::class); + $this->transitions = $arr; + + return $this; + } + + /** + * When + * [OptimizeToursRequest.consider_road_traffic][google.cloud.optimization.v1.OptimizeToursRequest.consider_road_traffic], + * is set to true, this field indicates that inconsistencies in route timings + * are predicted using traffic-based travel duration estimates. There may be + * insufficient time to complete traffic-adjusted travel, delays, and breaks + * between visits, before the first visit, or after the last visit, while + * still satisfying the visit and vehicle time windows. For example, + * ``` + * start_time(previous_visit) + duration(previous_visit) + + * travel_duration(previous_visit, next_visit) > start_time(next_visit) + * ``` + * Arrival at next_visit will likely happen later than its current + * time window due the increased estimate of travel time + * `travel_duration(previous_visit, next_visit)` due to traffic. Also, a break + * may be forced to overlap with a visit due to an increase in travel time + * estimates and visit or break time window restrictions. + * + * Generated from protobuf field bool has_traffic_infeasibilities = 9; + * @return bool + */ + public function getHasTrafficInfeasibilities() + { + return $this->has_traffic_infeasibilities; + } + + /** + * When + * [OptimizeToursRequest.consider_road_traffic][google.cloud.optimization.v1.OptimizeToursRequest.consider_road_traffic], + * is set to true, this field indicates that inconsistencies in route timings + * are predicted using traffic-based travel duration estimates. There may be + * insufficient time to complete traffic-adjusted travel, delays, and breaks + * between visits, before the first visit, or after the last visit, while + * still satisfying the visit and vehicle time windows. For example, + * ``` + * start_time(previous_visit) + duration(previous_visit) + + * travel_duration(previous_visit, next_visit) > start_time(next_visit) + * ``` + * Arrival at next_visit will likely happen later than its current + * time window due the increased estimate of travel time + * `travel_duration(previous_visit, next_visit)` due to traffic. Also, a break + * may be forced to overlap with a visit due to an increase in travel time + * estimates and visit or break time window restrictions. + * + * Generated from protobuf field bool has_traffic_infeasibilities = 9; + * @param bool $var + * @return $this + */ + public function setHasTrafficInfeasibilities($var) + { + GPBUtil::checkBool($var); + $this->has_traffic_infeasibilities = $var; + + return $this; + } + + /** + * The encoded polyline representation of the route. + * This field is only populated if + * [OptimizeToursRequest.populate_polylines][google.cloud.optimization.v1.OptimizeToursRequest.populate_polylines] + * is set to true. + * + * Generated from protobuf field .google.cloud.optimization.v1.ShipmentRoute.EncodedPolyline route_polyline = 10; + * @return \Google\Cloud\Optimization\V1\ShipmentRoute\EncodedPolyline|null + */ + public function getRoutePolyline() + { + return $this->route_polyline; + } + + public function hasRoutePolyline() + { + return isset($this->route_polyline); + } + + public function clearRoutePolyline() + { + unset($this->route_polyline); + } + + /** + * The encoded polyline representation of the route. + * This field is only populated if + * [OptimizeToursRequest.populate_polylines][google.cloud.optimization.v1.OptimizeToursRequest.populate_polylines] + * is set to true. + * + * Generated from protobuf field .google.cloud.optimization.v1.ShipmentRoute.EncodedPolyline route_polyline = 10; + * @param \Google\Cloud\Optimization\V1\ShipmentRoute\EncodedPolyline $var + * @return $this + */ + public function setRoutePolyline($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Optimization\V1\ShipmentRoute\EncodedPolyline::class); + $this->route_polyline = $var; + + return $this; + } + + /** + * Breaks scheduled for the vehicle performing this route. + * The `breaks` sequence represents time intervals, each starting at the + * corresponding `start_time` and lasting `duration` seconds. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.ShipmentRoute.Break breaks = 11; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getBreaks() + { + return $this->breaks; + } + + /** + * Breaks scheduled for the vehicle performing this route. + * The `breaks` sequence represents time intervals, each starting at the + * corresponding `start_time` and lasting `duration` seconds. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.ShipmentRoute.Break breaks = 11; + * @param array<\Google\Cloud\Optimization\V1\ShipmentRoute\PBBreak>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setBreaks($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\ShipmentRoute\PBBreak::class); + $this->breaks = $arr; + + return $this; + } + + /** + * Duration, distance and load metrics for this route. The fields of + * [AggregatedMetrics][google.cloud.optimization.v1.AggregatedMetrics] are + * summed over all + * [ShipmentRoute.transitions][google.cloud.optimization.v1.ShipmentRoute.transitions] + * or + * [ShipmentRoute.visits][google.cloud.optimization.v1.ShipmentRoute.visits], + * depending on the context. + * + * Generated from protobuf field .google.cloud.optimization.v1.AggregatedMetrics metrics = 12; + * @return \Google\Cloud\Optimization\V1\AggregatedMetrics|null + */ + public function getMetrics() + { + return $this->metrics; + } + + public function hasMetrics() + { + return isset($this->metrics); + } + + public function clearMetrics() + { + unset($this->metrics); + } + + /** + * Duration, distance and load metrics for this route. The fields of + * [AggregatedMetrics][google.cloud.optimization.v1.AggregatedMetrics] are + * summed over all + * [ShipmentRoute.transitions][google.cloud.optimization.v1.ShipmentRoute.transitions] + * or + * [ShipmentRoute.visits][google.cloud.optimization.v1.ShipmentRoute.visits], + * depending on the context. + * + * Generated from protobuf field .google.cloud.optimization.v1.AggregatedMetrics metrics = 12; + * @param \Google\Cloud\Optimization\V1\AggregatedMetrics $var + * @return $this + */ + public function setMetrics($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Optimization\V1\AggregatedMetrics::class); + $this->metrics = $var; + + return $this; + } + + /** + * Cost of the route, broken down by cost-related request fields. + * The keys are proto paths, relative to the input OptimizeToursRequest, e.g. + * "model.shipments.pickups.cost", and the values are the total cost + * generated by the corresponding cost field, aggregated over the whole route. + * In other words, costs["model.shipments.pickups.cost"] is the sum of all + * pickup costs over the route. All costs defined in the model are reported in + * detail here with the exception of costs related to TransitionAttributes + * that are only reported in an aggregated way as of 2022/01. + * + * Generated from protobuf field map route_costs = 17; + * @return \Google\Protobuf\Internal\MapField + */ + public function getRouteCosts() + { + return $this->route_costs; + } + + /** + * Cost of the route, broken down by cost-related request fields. + * The keys are proto paths, relative to the input OptimizeToursRequest, e.g. + * "model.shipments.pickups.cost", and the values are the total cost + * generated by the corresponding cost field, aggregated over the whole route. + * In other words, costs["model.shipments.pickups.cost"] is the sum of all + * pickup costs over the route. All costs defined in the model are reported in + * detail here with the exception of costs related to TransitionAttributes + * that are only reported in an aggregated way as of 2022/01. + * + * Generated from protobuf field map route_costs = 17; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setRouteCosts($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::DOUBLE); + $this->route_costs = $arr; + + return $this; + } + + /** + * Total cost of the route. The sum of all costs in the cost map. + * + * Generated from protobuf field double route_total_cost = 18; + * @return float + */ + public function getRouteTotalCost() + { + return $this->route_total_cost; + } + + /** + * Total cost of the route. The sum of all costs in the cost map. + * + * Generated from protobuf field double route_total_cost = 18; + * @param float $var + * @return $this + */ + public function setRouteTotalCost($var) + { + GPBUtil::checkDouble($var); + $this->route_total_cost = $var; + + return $this; + } + + /** + * Deprecated: Use + * [Transition.vehicle_loads][google.cloud.optimization.v1.ShipmentRoute.Transition.vehicle_loads] + * instead. Vehicle loads upon arrival at its end location, for each type + * specified in + * [Vehicle.capacities][google.cloud.optimization.v1.Vehicle.capacities], + * `start_load_intervals`, `end_load_intervals` or demands. Exception: we omit + * loads for quantity types unconstrained by intervals and that don't have any + * non-zero demand on the route. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.CapacityQuantity end_loads = 13 [deprecated = true]; + * @return \Google\Protobuf\Internal\RepeatedField + * @deprecated + */ + public function getEndLoads() + { + @trigger_error('end_loads is deprecated.', E_USER_DEPRECATED); + return $this->end_loads; + } + + /** + * Deprecated: Use + * [Transition.vehicle_loads][google.cloud.optimization.v1.ShipmentRoute.Transition.vehicle_loads] + * instead. Vehicle loads upon arrival at its end location, for each type + * specified in + * [Vehicle.capacities][google.cloud.optimization.v1.Vehicle.capacities], + * `start_load_intervals`, `end_load_intervals` or demands. Exception: we omit + * loads for quantity types unconstrained by intervals and that don't have any + * non-zero demand on the route. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.CapacityQuantity end_loads = 13 [deprecated = true]; + * @param array<\Google\Cloud\Optimization\V1\CapacityQuantity>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + * @deprecated + */ + public function setEndLoads($var) + { + @trigger_error('end_loads is deprecated.', E_USER_DEPRECATED); + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\CapacityQuantity::class); + $this->end_loads = $arr; + + return $this; + } + + /** + * Deprecated: Use + * [ShipmentRoute.transitions][google.cloud.optimization.v1.ShipmentRoute.transitions] + * instead. Ordered list of travel steps for the route. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.ShipmentRoute.TravelStep travel_steps = 14 [deprecated = true]; + * @return \Google\Protobuf\Internal\RepeatedField + * @deprecated + */ + public function getTravelSteps() + { + @trigger_error('travel_steps is deprecated.', E_USER_DEPRECATED); + return $this->travel_steps; + } + + /** + * Deprecated: Use + * [ShipmentRoute.transitions][google.cloud.optimization.v1.ShipmentRoute.transitions] + * instead. Ordered list of travel steps for the route. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.ShipmentRoute.TravelStep travel_steps = 14 [deprecated = true]; + * @param array<\Google\Cloud\Optimization\V1\ShipmentRoute\TravelStep>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + * @deprecated + */ + public function setTravelSteps($var) + { + @trigger_error('travel_steps is deprecated.', E_USER_DEPRECATED); + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\ShipmentRoute\TravelStep::class); + $this->travel_steps = $arr; + + return $this; + } + + /** + * Deprecated: No longer used. + * This field will only be populated at the + * [ShipmentRoute.Visit][google.cloud.optimization.v1.ShipmentRoute.Visit] + * level. + * This field is the extra detour time due to the shipments visited on the + * route. + * It is equal to `vehicle_end_time` - `vehicle_start_time` - travel duration + * from the vehicle's start_location to its `end_location`. + * + * Generated from protobuf field .google.protobuf.Duration vehicle_detour = 15 [deprecated = true]; + * @return \Google\Protobuf\Duration|null + * @deprecated + */ + public function getVehicleDetour() + { + @trigger_error('vehicle_detour is deprecated.', E_USER_DEPRECATED); + return $this->vehicle_detour; + } + + public function hasVehicleDetour() + { + @trigger_error('vehicle_detour is deprecated.', E_USER_DEPRECATED); + return isset($this->vehicle_detour); + } + + public function clearVehicleDetour() + { + @trigger_error('vehicle_detour is deprecated.', E_USER_DEPRECATED); + unset($this->vehicle_detour); + } + + /** + * Deprecated: No longer used. + * This field will only be populated at the + * [ShipmentRoute.Visit][google.cloud.optimization.v1.ShipmentRoute.Visit] + * level. + * This field is the extra detour time due to the shipments visited on the + * route. + * It is equal to `vehicle_end_time` - `vehicle_start_time` - travel duration + * from the vehicle's start_location to its `end_location`. + * + * Generated from protobuf field .google.protobuf.Duration vehicle_detour = 15 [deprecated = true]; + * @param \Google\Protobuf\Duration $var + * @return $this + * @deprecated + */ + public function setVehicleDetour($var) + { + @trigger_error('vehicle_detour is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->vehicle_detour = $var; + + return $this; + } + + /** + * Deprecated: Delay occurring before the vehicle end. See + * [TransitionAttributes.delay][google.cloud.optimization.v1.TransitionAttributes.delay]. + * + * Generated from protobuf field .google.cloud.optimization.v1.ShipmentRoute.Delay delay_before_vehicle_end = 16 [deprecated = true]; + * @return \Google\Cloud\Optimization\V1\ShipmentRoute\Delay|null + * @deprecated + */ + public function getDelayBeforeVehicleEnd() + { + @trigger_error('delay_before_vehicle_end is deprecated.', E_USER_DEPRECATED); + return $this->delay_before_vehicle_end; + } + + public function hasDelayBeforeVehicleEnd() + { + @trigger_error('delay_before_vehicle_end is deprecated.', E_USER_DEPRECATED); + return isset($this->delay_before_vehicle_end); + } + + public function clearDelayBeforeVehicleEnd() + { + @trigger_error('delay_before_vehicle_end is deprecated.', E_USER_DEPRECATED); + unset($this->delay_before_vehicle_end); + } + + /** + * Deprecated: Delay occurring before the vehicle end. See + * [TransitionAttributes.delay][google.cloud.optimization.v1.TransitionAttributes.delay]. + * + * Generated from protobuf field .google.cloud.optimization.v1.ShipmentRoute.Delay delay_before_vehicle_end = 16 [deprecated = true]; + * @param \Google\Cloud\Optimization\V1\ShipmentRoute\Delay $var + * @return $this + * @deprecated + */ + public function setDelayBeforeVehicleEnd($var) + { + @trigger_error('delay_before_vehicle_end is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkMessage($var, \Google\Cloud\Optimization\V1\ShipmentRoute\Delay::class); + $this->delay_before_vehicle_end = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentRoute/Delay.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentRoute/Delay.php new file mode 100644 index 000000000000..02ed72580a45 --- /dev/null +++ b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentRoute/Delay.php @@ -0,0 +1,128 @@ +google.cloud.optimization.v1.ShipmentRoute.Delay + */ +class Delay extends \Google\Protobuf\Internal\Message +{ + /** + * Start of the delay. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + */ + protected $start_time = null; + /** + * Duration of the delay. + * + * Generated from protobuf field .google.protobuf.Duration duration = 2; + */ + protected $duration = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $start_time + * Start of the delay. + * @type \Google\Protobuf\Duration $duration + * Duration of the delay. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); + parent::__construct($data); + } + + /** + * Start of the delay. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + * @return \Google\Protobuf\Timestamp|null + */ + public function getStartTime() + { + return $this->start_time; + } + + public function hasStartTime() + { + return isset($this->start_time); + } + + public function clearStartTime() + { + unset($this->start_time); + } + + /** + * Start of the delay. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * Duration of the delay. + * + * Generated from protobuf field .google.protobuf.Duration duration = 2; + * @return \Google\Protobuf\Duration|null + */ + public function getDuration() + { + return $this->duration; + } + + public function hasDuration() + { + return isset($this->duration); + } + + public function clearDuration() + { + unset($this->duration); + } + + /** + * Duration of the delay. + * + * Generated from protobuf field .google.protobuf.Duration duration = 2; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->duration = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Delay::class, \Google\Cloud\Optimization\V1\ShipmentRoute_Delay::class); + diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentRoute/EncodedPolyline.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentRoute/EncodedPolyline.php new file mode 100644 index 000000000000..4de0fee0843c --- /dev/null +++ b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentRoute/EncodedPolyline.php @@ -0,0 +1,73 @@ +google.cloud.optimization.v1.ShipmentRoute.EncodedPolyline + */ +class EncodedPolyline extends \Google\Protobuf\Internal\Message +{ + /** + * String representing encoded points of the polyline. + * + * Generated from protobuf field string points = 1; + */ + protected $points = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $points + * String representing encoded points of the polyline. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); + parent::__construct($data); + } + + /** + * String representing encoded points of the polyline. + * + * Generated from protobuf field string points = 1; + * @return string + */ + public function getPoints() + { + return $this->points; + } + + /** + * String representing encoded points of the polyline. + * + * Generated from protobuf field string points = 1; + * @param string $var + * @return $this + */ + public function setPoints($var) + { + GPBUtil::checkString($var, True); + $this->points = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(EncodedPolyline::class, \Google\Cloud\Optimization\V1\ShipmentRoute_EncodedPolyline::class); + diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentRoute/PBBreak.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentRoute/PBBreak.php new file mode 100644 index 000000000000..1a108699e4c5 --- /dev/null +++ b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentRoute/PBBreak.php @@ -0,0 +1,124 @@ +google.cloud.optimization.v1.ShipmentRoute.Break + */ +class PBBreak extends \Google\Protobuf\Internal\Message +{ + /** + * Start time of a break. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + */ + protected $start_time = null; + /** + * Duration of a break. + * + * Generated from protobuf field .google.protobuf.Duration duration = 2; + */ + protected $duration = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $start_time + * Start time of a break. + * @type \Google\Protobuf\Duration $duration + * Duration of a break. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); + parent::__construct($data); + } + + /** + * Start time of a break. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + * @return \Google\Protobuf\Timestamp|null + */ + public function getStartTime() + { + return $this->start_time; + } + + public function hasStartTime() + { + return isset($this->start_time); + } + + public function clearStartTime() + { + unset($this->start_time); + } + + /** + * Start time of a break. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * Duration of a break. + * + * Generated from protobuf field .google.protobuf.Duration duration = 2; + * @return \Google\Protobuf\Duration|null + */ + public function getDuration() + { + return $this->duration; + } + + public function hasDuration() + { + return isset($this->duration); + } + + public function clearDuration() + { + unset($this->duration); + } + + /** + * Duration of a break. + * + * Generated from protobuf field .google.protobuf.Duration duration = 2; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->duration = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(PBBreak::class, \Google\Cloud\Optimization\V1\ShipmentRoute_Break::class); + diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentRoute/Transition.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentRoute/Transition.php new file mode 100644 index 000000000000..1fa03752d95d --- /dev/null +++ b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentRoute/Transition.php @@ -0,0 +1,620 @@ +google.cloud.optimization.v1.ShipmentRoute.Transition + */ +class Transition extends \Google\Protobuf\Internal\Message +{ + /** + * Travel duration during this transition. + * + * Generated from protobuf field .google.protobuf.Duration travel_duration = 1; + */ + protected $travel_duration = null; + /** + * Distance traveled during the transition. + * + * Generated from protobuf field double travel_distance_meters = 2; + */ + protected $travel_distance_meters = 0.0; + /** + * When traffic is requested via + * [OptimizeToursRequest.consider_road_traffic] + * [google.cloud.optimization.v1.OptimizeToursRequest.consider_road_traffic], + * and the traffic info couldn't be retrieved for a `Transition`, this + * boolean is set to true. This may be temporary (rare hiccup in the + * realtime traffic servers) or permanent (no data for this location). + * + * Generated from protobuf field bool traffic_info_unavailable = 3; + */ + protected $traffic_info_unavailable = false; + /** + * Sum of the delay durations applied to this transition. If any, the delay + * starts exactly `delay_duration` seconds before the next event (visit or + * vehicle end). See + * [TransitionAttributes.delay][google.cloud.optimization.v1.TransitionAttributes.delay]. + * + * Generated from protobuf field .google.protobuf.Duration delay_duration = 4; + */ + protected $delay_duration = null; + /** + * Sum of the duration of the breaks occurring during this transition, if + * any. Details about each break's start time and duration are stored in + * [ShipmentRoute.breaks][google.cloud.optimization.v1.ShipmentRoute.breaks]. + * + * Generated from protobuf field .google.protobuf.Duration break_duration = 5; + */ + protected $break_duration = null; + /** + * Time spent waiting during this transition. Wait duration corresponds to + * idle time and does not include break time. Also note that this wait time + * may be split into several non-contiguous intervals. + * + * Generated from protobuf field .google.protobuf.Duration wait_duration = 6; + */ + protected $wait_duration = null; + /** + * Total duration of the transition, provided for convenience. It is equal + * to: + * * next visit `start_time` (or `vehicle_end_time` if this is the last + * transition) - this transition's `start_time`; + * * if `ShipmentRoute.has_traffic_infeasibilities` is false, the following + * additionally holds: `total_duration = travel_duration + delay_duration + * + break_duration + wait_duration`. + * + * Generated from protobuf field .google.protobuf.Duration total_duration = 7; + */ + protected $total_duration = null; + /** + * Start time of this transition. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 8; + */ + protected $start_time = null; + /** + * The encoded polyline representation of the route followed during the + * transition. + * This field is only populated if [populate_transition_polylines] + * [google.cloud.optimization.v1.OptimizeToursRequest.populate_transition_polylines] + * is set to true. + * + * Generated from protobuf field .google.cloud.optimization.v1.ShipmentRoute.EncodedPolyline route_polyline = 9; + */ + protected $route_polyline = null; + /** + * Vehicle loads during this transition, for each type that either appears + * in this vehicle's + * [Vehicle.load_limits][google.cloud.optimization.v1.Vehicle.load_limits], + * or that have non-zero + * [Shipment.load_demands][google.cloud.optimization.v1.Shipment.load_demands] + * on some shipment performed on this route. + * The loads during the first transition are the starting loads of the + * vehicle route. Then, after each visit, the visit's `load_demands` are + * either added or subtracted to get the next transition's loads, depending + * on whether the visit was a pickup or a delivery. + * + * Generated from protobuf field map vehicle_loads = 11; + */ + private $vehicle_loads; + /** + * Deprecated: Use + * [Transition.vehicle_loads][google.cloud.optimization.v1.ShipmentRoute.Transition.vehicle_loads] + * instead. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.CapacityQuantity loads = 10 [deprecated = true]; + * @deprecated + */ + private $loads; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Duration $travel_duration + * Travel duration during this transition. + * @type float $travel_distance_meters + * Distance traveled during the transition. + * @type bool $traffic_info_unavailable + * When traffic is requested via + * [OptimizeToursRequest.consider_road_traffic] + * [google.cloud.optimization.v1.OptimizeToursRequest.consider_road_traffic], + * and the traffic info couldn't be retrieved for a `Transition`, this + * boolean is set to true. This may be temporary (rare hiccup in the + * realtime traffic servers) or permanent (no data for this location). + * @type \Google\Protobuf\Duration $delay_duration + * Sum of the delay durations applied to this transition. If any, the delay + * starts exactly `delay_duration` seconds before the next event (visit or + * vehicle end). See + * [TransitionAttributes.delay][google.cloud.optimization.v1.TransitionAttributes.delay]. + * @type \Google\Protobuf\Duration $break_duration + * Sum of the duration of the breaks occurring during this transition, if + * any. Details about each break's start time and duration are stored in + * [ShipmentRoute.breaks][google.cloud.optimization.v1.ShipmentRoute.breaks]. + * @type \Google\Protobuf\Duration $wait_duration + * Time spent waiting during this transition. Wait duration corresponds to + * idle time and does not include break time. Also note that this wait time + * may be split into several non-contiguous intervals. + * @type \Google\Protobuf\Duration $total_duration + * Total duration of the transition, provided for convenience. It is equal + * to: + * * next visit `start_time` (or `vehicle_end_time` if this is the last + * transition) - this transition's `start_time`; + * * if `ShipmentRoute.has_traffic_infeasibilities` is false, the following + * additionally holds: `total_duration = travel_duration + delay_duration + * + break_duration + wait_duration`. + * @type \Google\Protobuf\Timestamp $start_time + * Start time of this transition. + * @type \Google\Cloud\Optimization\V1\ShipmentRoute\EncodedPolyline $route_polyline + * The encoded polyline representation of the route followed during the + * transition. + * This field is only populated if [populate_transition_polylines] + * [google.cloud.optimization.v1.OptimizeToursRequest.populate_transition_polylines] + * is set to true. + * @type array|\Google\Protobuf\Internal\MapField $vehicle_loads + * Vehicle loads during this transition, for each type that either appears + * in this vehicle's + * [Vehicle.load_limits][google.cloud.optimization.v1.Vehicle.load_limits], + * or that have non-zero + * [Shipment.load_demands][google.cloud.optimization.v1.Shipment.load_demands] + * on some shipment performed on this route. + * The loads during the first transition are the starting loads of the + * vehicle route. Then, after each visit, the visit's `load_demands` are + * either added or subtracted to get the next transition's loads, depending + * on whether the visit was a pickup or a delivery. + * @type array<\Google\Cloud\Optimization\V1\CapacityQuantity>|\Google\Protobuf\Internal\RepeatedField $loads + * Deprecated: Use + * [Transition.vehicle_loads][google.cloud.optimization.v1.ShipmentRoute.Transition.vehicle_loads] + * instead. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); + parent::__construct($data); + } + + /** + * Travel duration during this transition. + * + * Generated from protobuf field .google.protobuf.Duration travel_duration = 1; + * @return \Google\Protobuf\Duration|null + */ + public function getTravelDuration() + { + return $this->travel_duration; + } + + public function hasTravelDuration() + { + return isset($this->travel_duration); + } + + public function clearTravelDuration() + { + unset($this->travel_duration); + } + + /** + * Travel duration during this transition. + * + * Generated from protobuf field .google.protobuf.Duration travel_duration = 1; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setTravelDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->travel_duration = $var; + + return $this; + } + + /** + * Distance traveled during the transition. + * + * Generated from protobuf field double travel_distance_meters = 2; + * @return float + */ + public function getTravelDistanceMeters() + { + return $this->travel_distance_meters; + } + + /** + * Distance traveled during the transition. + * + * Generated from protobuf field double travel_distance_meters = 2; + * @param float $var + * @return $this + */ + public function setTravelDistanceMeters($var) + { + GPBUtil::checkDouble($var); + $this->travel_distance_meters = $var; + + return $this; + } + + /** + * When traffic is requested via + * [OptimizeToursRequest.consider_road_traffic] + * [google.cloud.optimization.v1.OptimizeToursRequest.consider_road_traffic], + * and the traffic info couldn't be retrieved for a `Transition`, this + * boolean is set to true. This may be temporary (rare hiccup in the + * realtime traffic servers) or permanent (no data for this location). + * + * Generated from protobuf field bool traffic_info_unavailable = 3; + * @return bool + */ + public function getTrafficInfoUnavailable() + { + return $this->traffic_info_unavailable; + } + + /** + * When traffic is requested via + * [OptimizeToursRequest.consider_road_traffic] + * [google.cloud.optimization.v1.OptimizeToursRequest.consider_road_traffic], + * and the traffic info couldn't be retrieved for a `Transition`, this + * boolean is set to true. This may be temporary (rare hiccup in the + * realtime traffic servers) or permanent (no data for this location). + * + * Generated from protobuf field bool traffic_info_unavailable = 3; + * @param bool $var + * @return $this + */ + public function setTrafficInfoUnavailable($var) + { + GPBUtil::checkBool($var); + $this->traffic_info_unavailable = $var; + + return $this; + } + + /** + * Sum of the delay durations applied to this transition. If any, the delay + * starts exactly `delay_duration` seconds before the next event (visit or + * vehicle end). See + * [TransitionAttributes.delay][google.cloud.optimization.v1.TransitionAttributes.delay]. + * + * Generated from protobuf field .google.protobuf.Duration delay_duration = 4; + * @return \Google\Protobuf\Duration|null + */ + public function getDelayDuration() + { + return $this->delay_duration; + } + + public function hasDelayDuration() + { + return isset($this->delay_duration); + } + + public function clearDelayDuration() + { + unset($this->delay_duration); + } + + /** + * Sum of the delay durations applied to this transition. If any, the delay + * starts exactly `delay_duration` seconds before the next event (visit or + * vehicle end). See + * [TransitionAttributes.delay][google.cloud.optimization.v1.TransitionAttributes.delay]. + * + * Generated from protobuf field .google.protobuf.Duration delay_duration = 4; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setDelayDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->delay_duration = $var; + + return $this; + } + + /** + * Sum of the duration of the breaks occurring during this transition, if + * any. Details about each break's start time and duration are stored in + * [ShipmentRoute.breaks][google.cloud.optimization.v1.ShipmentRoute.breaks]. + * + * Generated from protobuf field .google.protobuf.Duration break_duration = 5; + * @return \Google\Protobuf\Duration|null + */ + public function getBreakDuration() + { + return $this->break_duration; + } + + public function hasBreakDuration() + { + return isset($this->break_duration); + } + + public function clearBreakDuration() + { + unset($this->break_duration); + } + + /** + * Sum of the duration of the breaks occurring during this transition, if + * any. Details about each break's start time and duration are stored in + * [ShipmentRoute.breaks][google.cloud.optimization.v1.ShipmentRoute.breaks]. + * + * Generated from protobuf field .google.protobuf.Duration break_duration = 5; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setBreakDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->break_duration = $var; + + return $this; + } + + /** + * Time spent waiting during this transition. Wait duration corresponds to + * idle time and does not include break time. Also note that this wait time + * may be split into several non-contiguous intervals. + * + * Generated from protobuf field .google.protobuf.Duration wait_duration = 6; + * @return \Google\Protobuf\Duration|null + */ + public function getWaitDuration() + { + return $this->wait_duration; + } + + public function hasWaitDuration() + { + return isset($this->wait_duration); + } + + public function clearWaitDuration() + { + unset($this->wait_duration); + } + + /** + * Time spent waiting during this transition. Wait duration corresponds to + * idle time and does not include break time. Also note that this wait time + * may be split into several non-contiguous intervals. + * + * Generated from protobuf field .google.protobuf.Duration wait_duration = 6; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setWaitDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->wait_duration = $var; + + return $this; + } + + /** + * Total duration of the transition, provided for convenience. It is equal + * to: + * * next visit `start_time` (or `vehicle_end_time` if this is the last + * transition) - this transition's `start_time`; + * * if `ShipmentRoute.has_traffic_infeasibilities` is false, the following + * additionally holds: `total_duration = travel_duration + delay_duration + * + break_duration + wait_duration`. + * + * Generated from protobuf field .google.protobuf.Duration total_duration = 7; + * @return \Google\Protobuf\Duration|null + */ + public function getTotalDuration() + { + return $this->total_duration; + } + + public function hasTotalDuration() + { + return isset($this->total_duration); + } + + public function clearTotalDuration() + { + unset($this->total_duration); + } + + /** + * Total duration of the transition, provided for convenience. It is equal + * to: + * * next visit `start_time` (or `vehicle_end_time` if this is the last + * transition) - this transition's `start_time`; + * * if `ShipmentRoute.has_traffic_infeasibilities` is false, the following + * additionally holds: `total_duration = travel_duration + delay_duration + * + break_duration + wait_duration`. + * + * Generated from protobuf field .google.protobuf.Duration total_duration = 7; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setTotalDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->total_duration = $var; + + return $this; + } + + /** + * Start time of this transition. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 8; + * @return \Google\Protobuf\Timestamp|null + */ + public function getStartTime() + { + return $this->start_time; + } + + public function hasStartTime() + { + return isset($this->start_time); + } + + public function clearStartTime() + { + unset($this->start_time); + } + + /** + * Start time of this transition. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 8; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * The encoded polyline representation of the route followed during the + * transition. + * This field is only populated if [populate_transition_polylines] + * [google.cloud.optimization.v1.OptimizeToursRequest.populate_transition_polylines] + * is set to true. + * + * Generated from protobuf field .google.cloud.optimization.v1.ShipmentRoute.EncodedPolyline route_polyline = 9; + * @return \Google\Cloud\Optimization\V1\ShipmentRoute\EncodedPolyline|null + */ + public function getRoutePolyline() + { + return $this->route_polyline; + } + + public function hasRoutePolyline() + { + return isset($this->route_polyline); + } + + public function clearRoutePolyline() + { + unset($this->route_polyline); + } + + /** + * The encoded polyline representation of the route followed during the + * transition. + * This field is only populated if [populate_transition_polylines] + * [google.cloud.optimization.v1.OptimizeToursRequest.populate_transition_polylines] + * is set to true. + * + * Generated from protobuf field .google.cloud.optimization.v1.ShipmentRoute.EncodedPolyline route_polyline = 9; + * @param \Google\Cloud\Optimization\V1\ShipmentRoute\EncodedPolyline $var + * @return $this + */ + public function setRoutePolyline($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Optimization\V1\ShipmentRoute\EncodedPolyline::class); + $this->route_polyline = $var; + + return $this; + } + + /** + * Vehicle loads during this transition, for each type that either appears + * in this vehicle's + * [Vehicle.load_limits][google.cloud.optimization.v1.Vehicle.load_limits], + * or that have non-zero + * [Shipment.load_demands][google.cloud.optimization.v1.Shipment.load_demands] + * on some shipment performed on this route. + * The loads during the first transition are the starting loads of the + * vehicle route. Then, after each visit, the visit's `load_demands` are + * either added or subtracted to get the next transition's loads, depending + * on whether the visit was a pickup or a delivery. + * + * Generated from protobuf field map vehicle_loads = 11; + * @return \Google\Protobuf\Internal\MapField + */ + public function getVehicleLoads() + { + return $this->vehicle_loads; + } + + /** + * Vehicle loads during this transition, for each type that either appears + * in this vehicle's + * [Vehicle.load_limits][google.cloud.optimization.v1.Vehicle.load_limits], + * or that have non-zero + * [Shipment.load_demands][google.cloud.optimization.v1.Shipment.load_demands] + * on some shipment performed on this route. + * The loads during the first transition are the starting loads of the + * vehicle route. Then, after each visit, the visit's `load_demands` are + * either added or subtracted to get the next transition's loads, depending + * on whether the visit was a pickup or a delivery. + * + * Generated from protobuf field map vehicle_loads = 11; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setVehicleLoads($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\ShipmentRoute\VehicleLoad::class); + $this->vehicle_loads = $arr; + + return $this; + } + + /** + * Deprecated: Use + * [Transition.vehicle_loads][google.cloud.optimization.v1.ShipmentRoute.Transition.vehicle_loads] + * instead. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.CapacityQuantity loads = 10 [deprecated = true]; + * @return \Google\Protobuf\Internal\RepeatedField + * @deprecated + */ + public function getLoads() + { + @trigger_error('loads is deprecated.', E_USER_DEPRECATED); + return $this->loads; + } + + /** + * Deprecated: Use + * [Transition.vehicle_loads][google.cloud.optimization.v1.ShipmentRoute.Transition.vehicle_loads] + * instead. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.CapacityQuantity loads = 10 [deprecated = true]; + * @param array<\Google\Cloud\Optimization\V1\CapacityQuantity>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + * @deprecated + */ + public function setLoads($var) + { + @trigger_error('loads is deprecated.', E_USER_DEPRECATED); + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\CapacityQuantity::class); + $this->loads = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Transition::class, \Google\Cloud\Optimization\V1\ShipmentRoute_Transition::class); + diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentRoute/TravelStep.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentRoute/TravelStep.php new file mode 100644 index 000000000000..88fab128ce88 --- /dev/null +++ b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentRoute/TravelStep.php @@ -0,0 +1,236 @@ +google.cloud.optimization.v1.ShipmentRoute.TravelStep + */ +class TravelStep extends \Google\Protobuf\Internal\Message +{ + /** + * Duration of the travel step. + * + * Generated from protobuf field .google.protobuf.Duration duration = 1; + */ + protected $duration = null; + /** + * Distance traveled during the step. + * + * Generated from protobuf field double distance_meters = 2; + */ + protected $distance_meters = 0.0; + /** + * When traffic is requested via + * [OptimizeToursRequest.consider_road_traffic][google.cloud.optimization.v1.OptimizeToursRequest.consider_road_traffic], + * and the traffic info couldn't be retrieved for a TravelStep, this boolean + * is set to true. This may be temporary (rare hiccup in the realtime + * traffic servers) or permanent (no data for this location). + * + * Generated from protobuf field bool traffic_info_unavailable = 3; + */ + protected $traffic_info_unavailable = false; + /** + * The encoded polyline representation of the route followed during the + * step. + * This field is only populated if + * [OptimizeToursRequest.populate_travel_step_polylines][google.cloud.optimization.v1.OptimizeToursRequest.populate_travel_step_polylines] + * is set to true. + * + * Generated from protobuf field .google.cloud.optimization.v1.ShipmentRoute.EncodedPolyline route_polyline = 4; + */ + protected $route_polyline = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Duration $duration + * Duration of the travel step. + * @type float $distance_meters + * Distance traveled during the step. + * @type bool $traffic_info_unavailable + * When traffic is requested via + * [OptimizeToursRequest.consider_road_traffic][google.cloud.optimization.v1.OptimizeToursRequest.consider_road_traffic], + * and the traffic info couldn't be retrieved for a TravelStep, this boolean + * is set to true. This may be temporary (rare hiccup in the realtime + * traffic servers) or permanent (no data for this location). + * @type \Google\Cloud\Optimization\V1\ShipmentRoute\EncodedPolyline $route_polyline + * The encoded polyline representation of the route followed during the + * step. + * This field is only populated if + * [OptimizeToursRequest.populate_travel_step_polylines][google.cloud.optimization.v1.OptimizeToursRequest.populate_travel_step_polylines] + * is set to true. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); + parent::__construct($data); + } + + /** + * Duration of the travel step. + * + * Generated from protobuf field .google.protobuf.Duration duration = 1; + * @return \Google\Protobuf\Duration|null + */ + public function getDuration() + { + return $this->duration; + } + + public function hasDuration() + { + return isset($this->duration); + } + + public function clearDuration() + { + unset($this->duration); + } + + /** + * Duration of the travel step. + * + * Generated from protobuf field .google.protobuf.Duration duration = 1; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->duration = $var; + + return $this; + } + + /** + * Distance traveled during the step. + * + * Generated from protobuf field double distance_meters = 2; + * @return float + */ + public function getDistanceMeters() + { + return $this->distance_meters; + } + + /** + * Distance traveled during the step. + * + * Generated from protobuf field double distance_meters = 2; + * @param float $var + * @return $this + */ + public function setDistanceMeters($var) + { + GPBUtil::checkDouble($var); + $this->distance_meters = $var; + + return $this; + } + + /** + * When traffic is requested via + * [OptimizeToursRequest.consider_road_traffic][google.cloud.optimization.v1.OptimizeToursRequest.consider_road_traffic], + * and the traffic info couldn't be retrieved for a TravelStep, this boolean + * is set to true. This may be temporary (rare hiccup in the realtime + * traffic servers) or permanent (no data for this location). + * + * Generated from protobuf field bool traffic_info_unavailable = 3; + * @return bool + */ + public function getTrafficInfoUnavailable() + { + return $this->traffic_info_unavailable; + } + + /** + * When traffic is requested via + * [OptimizeToursRequest.consider_road_traffic][google.cloud.optimization.v1.OptimizeToursRequest.consider_road_traffic], + * and the traffic info couldn't be retrieved for a TravelStep, this boolean + * is set to true. This may be temporary (rare hiccup in the realtime + * traffic servers) or permanent (no data for this location). + * + * Generated from protobuf field bool traffic_info_unavailable = 3; + * @param bool $var + * @return $this + */ + public function setTrafficInfoUnavailable($var) + { + GPBUtil::checkBool($var); + $this->traffic_info_unavailable = $var; + + return $this; + } + + /** + * The encoded polyline representation of the route followed during the + * step. + * This field is only populated if + * [OptimizeToursRequest.populate_travel_step_polylines][google.cloud.optimization.v1.OptimizeToursRequest.populate_travel_step_polylines] + * is set to true. + * + * Generated from protobuf field .google.cloud.optimization.v1.ShipmentRoute.EncodedPolyline route_polyline = 4; + * @return \Google\Cloud\Optimization\V1\ShipmentRoute\EncodedPolyline|null + */ + public function getRoutePolyline() + { + return $this->route_polyline; + } + + public function hasRoutePolyline() + { + return isset($this->route_polyline); + } + + public function clearRoutePolyline() + { + unset($this->route_polyline); + } + + /** + * The encoded polyline representation of the route followed during the + * step. + * This field is only populated if + * [OptimizeToursRequest.populate_travel_step_polylines][google.cloud.optimization.v1.OptimizeToursRequest.populate_travel_step_polylines] + * is set to true. + * + * Generated from protobuf field .google.cloud.optimization.v1.ShipmentRoute.EncodedPolyline route_polyline = 4; + * @param \Google\Cloud\Optimization\V1\ShipmentRoute\EncodedPolyline $var + * @return $this + */ + public function setRoutePolyline($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Optimization\V1\ShipmentRoute\EncodedPolyline::class); + $this->route_polyline = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(TravelStep::class, \Google\Cloud\Optimization\V1\ShipmentRoute_TravelStep::class); + diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentRoute/VehicleLoad.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentRoute/VehicleLoad.php new file mode 100644 index 000000000000..022084ba07c1 --- /dev/null +++ b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentRoute/VehicleLoad.php @@ -0,0 +1,80 @@ +google.cloud.optimization.v1.ShipmentRoute.VehicleLoad + */ +class VehicleLoad extends \Google\Protobuf\Internal\Message +{ + /** + * The amount of load on the vehicle, for the given type. The unit of load + * is usually indicated by the type. See + * [Transition.vehicle_loads][google.cloud.optimization.v1.ShipmentRoute.Transition.vehicle_loads]. + * + * Generated from protobuf field int64 amount = 1; + */ + protected $amount = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $amount + * The amount of load on the vehicle, for the given type. The unit of load + * is usually indicated by the type. See + * [Transition.vehicle_loads][google.cloud.optimization.v1.ShipmentRoute.Transition.vehicle_loads]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); + parent::__construct($data); + } + + /** + * The amount of load on the vehicle, for the given type. The unit of load + * is usually indicated by the type. See + * [Transition.vehicle_loads][google.cloud.optimization.v1.ShipmentRoute.Transition.vehicle_loads]. + * + * Generated from protobuf field int64 amount = 1; + * @return int|string + */ + public function getAmount() + { + return $this->amount; + } + + /** + * The amount of load on the vehicle, for the given type. The unit of load + * is usually indicated by the type. See + * [Transition.vehicle_loads][google.cloud.optimization.v1.ShipmentRoute.Transition.vehicle_loads]. + * + * Generated from protobuf field int64 amount = 1; + * @param int|string $var + * @return $this + */ + public function setAmount($var) + { + GPBUtil::checkInt64($var); + $this->amount = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(VehicleLoad::class, \Google\Cloud\Optimization\V1\ShipmentRoute_VehicleLoad::class); + diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentRoute/Visit.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentRoute/Visit.php new file mode 100644 index 000000000000..fbca6c632c18 --- /dev/null +++ b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentRoute/Visit.php @@ -0,0 +1,606 @@ +google.cloud.optimization.v1.ShipmentRoute.Visit + */ +class Visit extends \Google\Protobuf\Internal\Message +{ + /** + * Index of the `shipments` field in the source + * [ShipmentModel][google.cloud.optimization.v1.ShipmentModel]. + * + * Generated from protobuf field int32 shipment_index = 1; + */ + protected $shipment_index = 0; + /** + * If true the visit corresponds to a pickup of a `Shipment`. Otherwise, it + * corresponds to a delivery. + * + * Generated from protobuf field bool is_pickup = 2; + */ + protected $is_pickup = false; + /** + * Index of `VisitRequest` in either the pickup or delivery field of the + * `Shipment` (see `is_pickup`). + * + * Generated from protobuf field int32 visit_request_index = 3; + */ + protected $visit_request_index = 0; + /** + * Time at which the visit starts. Note that the vehicle may arrive earlier + * than this at the visit location. Times are consistent with the + * `ShipmentModel`. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 4; + */ + protected $start_time = null; + /** + * Total visit load demand as the sum of the shipment and the visit request + * `load_demands`. The values are negative if the visit is a delivery. + * Demands are reported for the same types as the + * [Transition.loads][google.cloud.optimization.v1.ShipmentRoute.Transition] + * (see this field). + * + * Generated from protobuf field map load_demands = 11; + */ + private $load_demands; + /** + * Extra detour time due to the shipments visited on the route before the + * visit and to the potential waiting time induced by time windows. + * If the visit is a delivery, the detour is computed from the corresponding + * pickup visit and is equal to: + * ``` + * start_time(delivery) - start_time(pickup) + * - (duration(pickup) + travel duration from the pickup location + * to the delivery location). + * ``` + * Otherwise, it is computed from the vehicle `start_location` and is equal + * to: + * ``` + * start_time - vehicle_start_time - travel duration from + * the vehicle's `start_location` to the visit. + * ``` + * + * Generated from protobuf field .google.protobuf.Duration detour = 6; + */ + protected $detour = null; + /** + * Copy of the corresponding `Shipment.label`, if specified in the + * `Shipment`. + * + * Generated from protobuf field string shipment_label = 7; + */ + protected $shipment_label = ''; + /** + * Copy of the corresponding + * [VisitRequest.label][google.cloud.optimization.v1.Shipment.VisitRequest.label], + * if specified in the `VisitRequest`. + * + * Generated from protobuf field string visit_label = 8; + */ + protected $visit_label = ''; + /** + * Deprecated: Use + * [Transition.vehicle_loads][google.cloud.optimization.v1.ShipmentRoute.Transition.vehicle_loads] + * instead. Vehicle loads upon arrival at the visit location, for each type + * specified in + * [Vehicle.capacities][google.cloud.optimization.v1.Vehicle.capacities], + * `start_load_intervals`, `end_load_intervals` or `demands`. + * Exception: we omit loads for quantity types unconstrained by intervals + * and that don't have any non-zero demand on the route. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.CapacityQuantity arrival_loads = 9 [deprecated = true]; + * @deprecated + */ + private $arrival_loads; + /** + * Deprecated: Use + * [ShipmentRoute.Transition.delay_duration][google.cloud.optimization.v1.ShipmentRoute.Transition.delay_duration] + * instead. Delay occurring before the visit starts. + * + * Generated from protobuf field .google.cloud.optimization.v1.ShipmentRoute.Delay delay_before_start = 10 [deprecated = true]; + * @deprecated + */ + protected $delay_before_start = null; + /** + * Deprecated: Use + * [Visit.load_demands][google.cloud.optimization.v1.ShipmentRoute.Visit.load_demands] + * instead. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.CapacityQuantity demands = 5 [deprecated = true]; + * @deprecated + */ + private $demands; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $shipment_index + * Index of the `shipments` field in the source + * [ShipmentModel][google.cloud.optimization.v1.ShipmentModel]. + * @type bool $is_pickup + * If true the visit corresponds to a pickup of a `Shipment`. Otherwise, it + * corresponds to a delivery. + * @type int $visit_request_index + * Index of `VisitRequest` in either the pickup or delivery field of the + * `Shipment` (see `is_pickup`). + * @type \Google\Protobuf\Timestamp $start_time + * Time at which the visit starts. Note that the vehicle may arrive earlier + * than this at the visit location. Times are consistent with the + * `ShipmentModel`. + * @type array|\Google\Protobuf\Internal\MapField $load_demands + * Total visit load demand as the sum of the shipment and the visit request + * `load_demands`. The values are negative if the visit is a delivery. + * Demands are reported for the same types as the + * [Transition.loads][google.cloud.optimization.v1.ShipmentRoute.Transition] + * (see this field). + * @type \Google\Protobuf\Duration $detour + * Extra detour time due to the shipments visited on the route before the + * visit and to the potential waiting time induced by time windows. + * If the visit is a delivery, the detour is computed from the corresponding + * pickup visit and is equal to: + * ``` + * start_time(delivery) - start_time(pickup) + * - (duration(pickup) + travel duration from the pickup location + * to the delivery location). + * ``` + * Otherwise, it is computed from the vehicle `start_location` and is equal + * to: + * ``` + * start_time - vehicle_start_time - travel duration from + * the vehicle's `start_location` to the visit. + * ``` + * @type string $shipment_label + * Copy of the corresponding `Shipment.label`, if specified in the + * `Shipment`. + * @type string $visit_label + * Copy of the corresponding + * [VisitRequest.label][google.cloud.optimization.v1.Shipment.VisitRequest.label], + * if specified in the `VisitRequest`. + * @type array<\Google\Cloud\Optimization\V1\CapacityQuantity>|\Google\Protobuf\Internal\RepeatedField $arrival_loads + * Deprecated: Use + * [Transition.vehicle_loads][google.cloud.optimization.v1.ShipmentRoute.Transition.vehicle_loads] + * instead. Vehicle loads upon arrival at the visit location, for each type + * specified in + * [Vehicle.capacities][google.cloud.optimization.v1.Vehicle.capacities], + * `start_load_intervals`, `end_load_intervals` or `demands`. + * Exception: we omit loads for quantity types unconstrained by intervals + * and that don't have any non-zero demand on the route. + * @type \Google\Cloud\Optimization\V1\ShipmentRoute\Delay $delay_before_start + * Deprecated: Use + * [ShipmentRoute.Transition.delay_duration][google.cloud.optimization.v1.ShipmentRoute.Transition.delay_duration] + * instead. Delay occurring before the visit starts. + * @type array<\Google\Cloud\Optimization\V1\CapacityQuantity>|\Google\Protobuf\Internal\RepeatedField $demands + * Deprecated: Use + * [Visit.load_demands][google.cloud.optimization.v1.ShipmentRoute.Visit.load_demands] + * instead. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); + parent::__construct($data); + } + + /** + * Index of the `shipments` field in the source + * [ShipmentModel][google.cloud.optimization.v1.ShipmentModel]. + * + * Generated from protobuf field int32 shipment_index = 1; + * @return int + */ + public function getShipmentIndex() + { + return $this->shipment_index; + } + + /** + * Index of the `shipments` field in the source + * [ShipmentModel][google.cloud.optimization.v1.ShipmentModel]. + * + * Generated from protobuf field int32 shipment_index = 1; + * @param int $var + * @return $this + */ + public function setShipmentIndex($var) + { + GPBUtil::checkInt32($var); + $this->shipment_index = $var; + + return $this; + } + + /** + * If true the visit corresponds to a pickup of a `Shipment`. Otherwise, it + * corresponds to a delivery. + * + * Generated from protobuf field bool is_pickup = 2; + * @return bool + */ + public function getIsPickup() + { + return $this->is_pickup; + } + + /** + * If true the visit corresponds to a pickup of a `Shipment`. Otherwise, it + * corresponds to a delivery. + * + * Generated from protobuf field bool is_pickup = 2; + * @param bool $var + * @return $this + */ + public function setIsPickup($var) + { + GPBUtil::checkBool($var); + $this->is_pickup = $var; + + return $this; + } + + /** + * Index of `VisitRequest` in either the pickup or delivery field of the + * `Shipment` (see `is_pickup`). + * + * Generated from protobuf field int32 visit_request_index = 3; + * @return int + */ + public function getVisitRequestIndex() + { + return $this->visit_request_index; + } + + /** + * Index of `VisitRequest` in either the pickup or delivery field of the + * `Shipment` (see `is_pickup`). + * + * Generated from protobuf field int32 visit_request_index = 3; + * @param int $var + * @return $this + */ + public function setVisitRequestIndex($var) + { + GPBUtil::checkInt32($var); + $this->visit_request_index = $var; + + return $this; + } + + /** + * Time at which the visit starts. Note that the vehicle may arrive earlier + * than this at the visit location. Times are consistent with the + * `ShipmentModel`. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 4; + * @return \Google\Protobuf\Timestamp|null + */ + public function getStartTime() + { + return $this->start_time; + } + + public function hasStartTime() + { + return isset($this->start_time); + } + + public function clearStartTime() + { + unset($this->start_time); + } + + /** + * Time at which the visit starts. Note that the vehicle may arrive earlier + * than this at the visit location. Times are consistent with the + * `ShipmentModel`. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 4; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * Total visit load demand as the sum of the shipment and the visit request + * `load_demands`. The values are negative if the visit is a delivery. + * Demands are reported for the same types as the + * [Transition.loads][google.cloud.optimization.v1.ShipmentRoute.Transition] + * (see this field). + * + * Generated from protobuf field map load_demands = 11; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLoadDemands() + { + return $this->load_demands; + } + + /** + * Total visit load demand as the sum of the shipment and the visit request + * `load_demands`. The values are negative if the visit is a delivery. + * Demands are reported for the same types as the + * [Transition.loads][google.cloud.optimization.v1.ShipmentRoute.Transition] + * (see this field). + * + * Generated from protobuf field map load_demands = 11; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLoadDemands($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\Shipment\Load::class); + $this->load_demands = $arr; + + return $this; + } + + /** + * Extra detour time due to the shipments visited on the route before the + * visit and to the potential waiting time induced by time windows. + * If the visit is a delivery, the detour is computed from the corresponding + * pickup visit and is equal to: + * ``` + * start_time(delivery) - start_time(pickup) + * - (duration(pickup) + travel duration from the pickup location + * to the delivery location). + * ``` + * Otherwise, it is computed from the vehicle `start_location` and is equal + * to: + * ``` + * start_time - vehicle_start_time - travel duration from + * the vehicle's `start_location` to the visit. + * ``` + * + * Generated from protobuf field .google.protobuf.Duration detour = 6; + * @return \Google\Protobuf\Duration|null + */ + public function getDetour() + { + return $this->detour; + } + + public function hasDetour() + { + return isset($this->detour); + } + + public function clearDetour() + { + unset($this->detour); + } + + /** + * Extra detour time due to the shipments visited on the route before the + * visit and to the potential waiting time induced by time windows. + * If the visit is a delivery, the detour is computed from the corresponding + * pickup visit and is equal to: + * ``` + * start_time(delivery) - start_time(pickup) + * - (duration(pickup) + travel duration from the pickup location + * to the delivery location). + * ``` + * Otherwise, it is computed from the vehicle `start_location` and is equal + * to: + * ``` + * start_time - vehicle_start_time - travel duration from + * the vehicle's `start_location` to the visit. + * ``` + * + * Generated from protobuf field .google.protobuf.Duration detour = 6; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setDetour($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->detour = $var; + + return $this; + } + + /** + * Copy of the corresponding `Shipment.label`, if specified in the + * `Shipment`. + * + * Generated from protobuf field string shipment_label = 7; + * @return string + */ + public function getShipmentLabel() + { + return $this->shipment_label; + } + + /** + * Copy of the corresponding `Shipment.label`, if specified in the + * `Shipment`. + * + * Generated from protobuf field string shipment_label = 7; + * @param string $var + * @return $this + */ + public function setShipmentLabel($var) + { + GPBUtil::checkString($var, True); + $this->shipment_label = $var; + + return $this; + } + + /** + * Copy of the corresponding + * [VisitRequest.label][google.cloud.optimization.v1.Shipment.VisitRequest.label], + * if specified in the `VisitRequest`. + * + * Generated from protobuf field string visit_label = 8; + * @return string + */ + public function getVisitLabel() + { + return $this->visit_label; + } + + /** + * Copy of the corresponding + * [VisitRequest.label][google.cloud.optimization.v1.Shipment.VisitRequest.label], + * if specified in the `VisitRequest`. + * + * Generated from protobuf field string visit_label = 8; + * @param string $var + * @return $this + */ + public function setVisitLabel($var) + { + GPBUtil::checkString($var, True); + $this->visit_label = $var; + + return $this; + } + + /** + * Deprecated: Use + * [Transition.vehicle_loads][google.cloud.optimization.v1.ShipmentRoute.Transition.vehicle_loads] + * instead. Vehicle loads upon arrival at the visit location, for each type + * specified in + * [Vehicle.capacities][google.cloud.optimization.v1.Vehicle.capacities], + * `start_load_intervals`, `end_load_intervals` or `demands`. + * Exception: we omit loads for quantity types unconstrained by intervals + * and that don't have any non-zero demand on the route. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.CapacityQuantity arrival_loads = 9 [deprecated = true]; + * @return \Google\Protobuf\Internal\RepeatedField + * @deprecated + */ + public function getArrivalLoads() + { + @trigger_error('arrival_loads is deprecated.', E_USER_DEPRECATED); + return $this->arrival_loads; + } + + /** + * Deprecated: Use + * [Transition.vehicle_loads][google.cloud.optimization.v1.ShipmentRoute.Transition.vehicle_loads] + * instead. Vehicle loads upon arrival at the visit location, for each type + * specified in + * [Vehicle.capacities][google.cloud.optimization.v1.Vehicle.capacities], + * `start_load_intervals`, `end_load_intervals` or `demands`. + * Exception: we omit loads for quantity types unconstrained by intervals + * and that don't have any non-zero demand on the route. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.CapacityQuantity arrival_loads = 9 [deprecated = true]; + * @param array<\Google\Cloud\Optimization\V1\CapacityQuantity>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + * @deprecated + */ + public function setArrivalLoads($var) + { + @trigger_error('arrival_loads is deprecated.', E_USER_DEPRECATED); + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\CapacityQuantity::class); + $this->arrival_loads = $arr; + + return $this; + } + + /** + * Deprecated: Use + * [ShipmentRoute.Transition.delay_duration][google.cloud.optimization.v1.ShipmentRoute.Transition.delay_duration] + * instead. Delay occurring before the visit starts. + * + * Generated from protobuf field .google.cloud.optimization.v1.ShipmentRoute.Delay delay_before_start = 10 [deprecated = true]; + * @return \Google\Cloud\Optimization\V1\ShipmentRoute\Delay|null + * @deprecated + */ + public function getDelayBeforeStart() + { + @trigger_error('delay_before_start is deprecated.', E_USER_DEPRECATED); + return $this->delay_before_start; + } + + public function hasDelayBeforeStart() + { + @trigger_error('delay_before_start is deprecated.', E_USER_DEPRECATED); + return isset($this->delay_before_start); + } + + public function clearDelayBeforeStart() + { + @trigger_error('delay_before_start is deprecated.', E_USER_DEPRECATED); + unset($this->delay_before_start); + } + + /** + * Deprecated: Use + * [ShipmentRoute.Transition.delay_duration][google.cloud.optimization.v1.ShipmentRoute.Transition.delay_duration] + * instead. Delay occurring before the visit starts. + * + * Generated from protobuf field .google.cloud.optimization.v1.ShipmentRoute.Delay delay_before_start = 10 [deprecated = true]; + * @param \Google\Cloud\Optimization\V1\ShipmentRoute\Delay $var + * @return $this + * @deprecated + */ + public function setDelayBeforeStart($var) + { + @trigger_error('delay_before_start is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkMessage($var, \Google\Cloud\Optimization\V1\ShipmentRoute\Delay::class); + $this->delay_before_start = $var; + + return $this; + } + + /** + * Deprecated: Use + * [Visit.load_demands][google.cloud.optimization.v1.ShipmentRoute.Visit.load_demands] + * instead. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.CapacityQuantity demands = 5 [deprecated = true]; + * @return \Google\Protobuf\Internal\RepeatedField + * @deprecated + */ + public function getDemands() + { + @trigger_error('demands is deprecated.', E_USER_DEPRECATED); + return $this->demands; + } + + /** + * Deprecated: Use + * [Visit.load_demands][google.cloud.optimization.v1.ShipmentRoute.Visit.load_demands] + * instead. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.CapacityQuantity demands = 5 [deprecated = true]; + * @param array<\Google\Cloud\Optimization\V1\CapacityQuantity>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + * @deprecated + */ + public function setDemands($var) + { + @trigger_error('demands is deprecated.', E_USER_DEPRECATED); + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\CapacityQuantity::class); + $this->demands = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Visit::class, \Google\Cloud\Optimization\V1\ShipmentRoute_Visit::class); + diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentTypeIncompatibility.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentTypeIncompatibility.php new file mode 100644 index 000000000000..b42f828a6d3c --- /dev/null +++ b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentTypeIncompatibility.php @@ -0,0 +1,107 @@ +google.cloud.optimization.v1.ShipmentTypeIncompatibility + */ +class ShipmentTypeIncompatibility extends \Google\Protobuf\Internal\Message +{ + /** + * List of incompatible types. Two shipments having different `shipment_types` + * among those listed are "incompatible". + * + * Generated from protobuf field repeated string types = 1; + */ + private $types; + /** + * Mode applied to the incompatibility. + * + * Generated from protobuf field .google.cloud.optimization.v1.ShipmentTypeIncompatibility.IncompatibilityMode incompatibility_mode = 2; + */ + protected $incompatibility_mode = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $types + * List of incompatible types. Two shipments having different `shipment_types` + * among those listed are "incompatible". + * @type int $incompatibility_mode + * Mode applied to the incompatibility. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); + parent::__construct($data); + } + + /** + * List of incompatible types. Two shipments having different `shipment_types` + * among those listed are "incompatible". + * + * Generated from protobuf field repeated string types = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTypes() + { + return $this->types; + } + + /** + * List of incompatible types. Two shipments having different `shipment_types` + * among those listed are "incompatible". + * + * Generated from protobuf field repeated string types = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTypes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->types = $arr; + + return $this; + } + + /** + * Mode applied to the incompatibility. + * + * Generated from protobuf field .google.cloud.optimization.v1.ShipmentTypeIncompatibility.IncompatibilityMode incompatibility_mode = 2; + * @return int + */ + public function getIncompatibilityMode() + { + return $this->incompatibility_mode; + } + + /** + * Mode applied to the incompatibility. + * + * Generated from protobuf field .google.cloud.optimization.v1.ShipmentTypeIncompatibility.IncompatibilityMode incompatibility_mode = 2; + * @param int $var + * @return $this + */ + public function setIncompatibilityMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Optimization\V1\ShipmentTypeIncompatibility\IncompatibilityMode::class); + $this->incompatibility_mode = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentTypeIncompatibility/IncompatibilityMode.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentTypeIncompatibility/IncompatibilityMode.php new file mode 100644 index 000000000000..127c5c8ba17e --- /dev/null +++ b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentTypeIncompatibility/IncompatibilityMode.php @@ -0,0 +1,72 @@ +google.cloud.optimization.v1.ShipmentTypeIncompatibility.IncompatibilityMode + */ +class IncompatibilityMode +{ + /** + * Unspecified incompatibility mode. This value should never be used. + * + * Generated from protobuf enum INCOMPATIBILITY_MODE_UNSPECIFIED = 0; + */ + const INCOMPATIBILITY_MODE_UNSPECIFIED = 0; + /** + * In this mode, two shipments with incompatible types can never share the + * same vehicle. + * + * Generated from protobuf enum NOT_PERFORMED_BY_SAME_VEHICLE = 1; + */ + const NOT_PERFORMED_BY_SAME_VEHICLE = 1; + /** + * For two shipments with incompatible types with the + * `NOT_IN_SAME_VEHICLE_SIMULTANEOUSLY` incompatibility mode: + * * If both are pickups only (no deliveries) or deliveries only (no + * pickups), they cannot share the same vehicle at all. + * * If one of the shipments has a delivery and the other a pickup, the two + * shipments can share the same vehicle iff the former shipment is + * delivered before the latter is picked up. + * + * Generated from protobuf enum NOT_IN_SAME_VEHICLE_SIMULTANEOUSLY = 2; + */ + const NOT_IN_SAME_VEHICLE_SIMULTANEOUSLY = 2; + + private static $valueToName = [ + self::INCOMPATIBILITY_MODE_UNSPECIFIED => 'INCOMPATIBILITY_MODE_UNSPECIFIED', + self::NOT_PERFORMED_BY_SAME_VEHICLE => 'NOT_PERFORMED_BY_SAME_VEHICLE', + self::NOT_IN_SAME_VEHICLE_SIMULTANEOUSLY => 'NOT_IN_SAME_VEHICLE_SIMULTANEOUSLY', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(IncompatibilityMode::class, \Google\Cloud\Optimization\V1\ShipmentTypeIncompatibility_IncompatibilityMode::class); + diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentTypeRequirement.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentTypeRequirement.php new file mode 100644 index 000000000000..1b6005011b9b --- /dev/null +++ b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentTypeRequirement.php @@ -0,0 +1,156 @@ +google.cloud.optimization.v1.ShipmentTypeRequirement + */ +class ShipmentTypeRequirement extends \Google\Protobuf\Internal\Message +{ + /** + * List of alternative shipment types required by the + * `dependent_shipment_types`. + * + * Generated from protobuf field repeated string required_shipment_type_alternatives = 1; + */ + private $required_shipment_type_alternatives; + /** + * All shipments with a type in the `dependent_shipment_types` field require + * at least one shipment of type `required_shipment_type_alternatives` to be + * visited on the same route. + * NOTE: Chains of requirements such that a `shipment_type` depends on itself + * are not allowed. + * + * Generated from protobuf field repeated string dependent_shipment_types = 2; + */ + private $dependent_shipment_types; + /** + * Mode applied to the requirement. + * + * Generated from protobuf field .google.cloud.optimization.v1.ShipmentTypeRequirement.RequirementMode requirement_mode = 3; + */ + protected $requirement_mode = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $required_shipment_type_alternatives + * List of alternative shipment types required by the + * `dependent_shipment_types`. + * @type array|\Google\Protobuf\Internal\RepeatedField $dependent_shipment_types + * All shipments with a type in the `dependent_shipment_types` field require + * at least one shipment of type `required_shipment_type_alternatives` to be + * visited on the same route. + * NOTE: Chains of requirements such that a `shipment_type` depends on itself + * are not allowed. + * @type int $requirement_mode + * Mode applied to the requirement. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); + parent::__construct($data); + } + + /** + * List of alternative shipment types required by the + * `dependent_shipment_types`. + * + * Generated from protobuf field repeated string required_shipment_type_alternatives = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRequiredShipmentTypeAlternatives() + { + return $this->required_shipment_type_alternatives; + } + + /** + * List of alternative shipment types required by the + * `dependent_shipment_types`. + * + * Generated from protobuf field repeated string required_shipment_type_alternatives = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRequiredShipmentTypeAlternatives($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->required_shipment_type_alternatives = $arr; + + return $this; + } + + /** + * All shipments with a type in the `dependent_shipment_types` field require + * at least one shipment of type `required_shipment_type_alternatives` to be + * visited on the same route. + * NOTE: Chains of requirements such that a `shipment_type` depends on itself + * are not allowed. + * + * Generated from protobuf field repeated string dependent_shipment_types = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDependentShipmentTypes() + { + return $this->dependent_shipment_types; + } + + /** + * All shipments with a type in the `dependent_shipment_types` field require + * at least one shipment of type `required_shipment_type_alternatives` to be + * visited on the same route. + * NOTE: Chains of requirements such that a `shipment_type` depends on itself + * are not allowed. + * + * Generated from protobuf field repeated string dependent_shipment_types = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDependentShipmentTypes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->dependent_shipment_types = $arr; + + return $this; + } + + /** + * Mode applied to the requirement. + * + * Generated from protobuf field .google.cloud.optimization.v1.ShipmentTypeRequirement.RequirementMode requirement_mode = 3; + * @return int + */ + public function getRequirementMode() + { + return $this->requirement_mode; + } + + /** + * Mode applied to the requirement. + * + * Generated from protobuf field .google.cloud.optimization.v1.ShipmentTypeRequirement.RequirementMode requirement_mode = 3; + * @param int $var + * @return $this + */ + public function setRequirementMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Optimization\V1\ShipmentTypeRequirement\RequirementMode::class); + $this->requirement_mode = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentTypeRequirement/RequirementMode.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentTypeRequirement/RequirementMode.php new file mode 100644 index 000000000000..8c6df3589e36 --- /dev/null +++ b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentTypeRequirement/RequirementMode.php @@ -0,0 +1,80 @@ +google.cloud.optimization.v1.ShipmentTypeRequirement.RequirementMode + */ +class RequirementMode +{ + /** + * Unspecified requirement mode. This value should never be used. + * + * Generated from protobuf enum REQUIREMENT_MODE_UNSPECIFIED = 0; + */ + const REQUIREMENT_MODE_UNSPECIFIED = 0; + /** + * In this mode, all "dependent" shipments must share the same vehicle as at + * least one of their "required" shipments. + * + * Generated from protobuf enum PERFORMED_BY_SAME_VEHICLE = 1; + */ + const PERFORMED_BY_SAME_VEHICLE = 1; + /** + * With the `IN_SAME_VEHICLE_AT_PICKUP_TIME` mode, all "dependent" + * shipments need to have at least one "required" shipment on their vehicle + * at the time of their pickup. + * A "dependent" shipment pickup must therefore have either: + * * A delivery-only "required" shipment delivered on the route after, or + * * A "required" shipment picked up on the route before it, and if the + * "required" shipment has a delivery, this delivery must be performed + * after the "dependent" shipment's pickup. + * + * Generated from protobuf enum IN_SAME_VEHICLE_AT_PICKUP_TIME = 2; + */ + const IN_SAME_VEHICLE_AT_PICKUP_TIME = 2; + /** + * Same as before, except the "dependent" shipments need to have a + * "required" shipment on their vehicle at the time of their *delivery*. + * + * Generated from protobuf enum IN_SAME_VEHICLE_AT_DELIVERY_TIME = 3; + */ + const IN_SAME_VEHICLE_AT_DELIVERY_TIME = 3; + + private static $valueToName = [ + self::REQUIREMENT_MODE_UNSPECIFIED => 'REQUIREMENT_MODE_UNSPECIFIED', + self::PERFORMED_BY_SAME_VEHICLE => 'PERFORMED_BY_SAME_VEHICLE', + self::IN_SAME_VEHICLE_AT_PICKUP_TIME => 'IN_SAME_VEHICLE_AT_PICKUP_TIME', + self::IN_SAME_VEHICLE_AT_DELIVERY_TIME => 'IN_SAME_VEHICLE_AT_DELIVERY_TIME', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(RequirementMode::class, \Google\Cloud\Optimization\V1\ShipmentTypeRequirement_RequirementMode::class); + diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/SkippedShipment.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/SkippedShipment.php new file mode 100644 index 000000000000..90c4eeab9d8a --- /dev/null +++ b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/SkippedShipment.php @@ -0,0 +1,153 @@ +google.cloud.optimization.v1.SkippedShipment + */ +class SkippedShipment extends \Google\Protobuf\Internal\Message +{ + /** + * The index corresponds to the index of the shipment in the source + * `ShipmentModel`. + * + * Generated from protobuf field int32 index = 1; + */ + protected $index = 0; + /** + * Copy of the corresponding + * [Shipment.label][google.cloud.optimization.v1.Shipment.label], if specified + * in the `Shipment`. + * + * Generated from protobuf field string label = 2; + */ + protected $label = ''; + /** + * A list of reasons that explain why the shipment was skipped. See comment + * above `Reason`. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.SkippedShipment.Reason reasons = 3; + */ + private $reasons; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $index + * The index corresponds to the index of the shipment in the source + * `ShipmentModel`. + * @type string $label + * Copy of the corresponding + * [Shipment.label][google.cloud.optimization.v1.Shipment.label], if specified + * in the `Shipment`. + * @type array<\Google\Cloud\Optimization\V1\SkippedShipment\Reason>|\Google\Protobuf\Internal\RepeatedField $reasons + * A list of reasons that explain why the shipment was skipped. See comment + * above `Reason`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); + parent::__construct($data); + } + + /** + * The index corresponds to the index of the shipment in the source + * `ShipmentModel`. + * + * Generated from protobuf field int32 index = 1; + * @return int + */ + public function getIndex() + { + return $this->index; + } + + /** + * The index corresponds to the index of the shipment in the source + * `ShipmentModel`. + * + * Generated from protobuf field int32 index = 1; + * @param int $var + * @return $this + */ + public function setIndex($var) + { + GPBUtil::checkInt32($var); + $this->index = $var; + + return $this; + } + + /** + * Copy of the corresponding + * [Shipment.label][google.cloud.optimization.v1.Shipment.label], if specified + * in the `Shipment`. + * + * Generated from protobuf field string label = 2; + * @return string + */ + public function getLabel() + { + return $this->label; + } + + /** + * Copy of the corresponding + * [Shipment.label][google.cloud.optimization.v1.Shipment.label], if specified + * in the `Shipment`. + * + * Generated from protobuf field string label = 2; + * @param string $var + * @return $this + */ + public function setLabel($var) + { + GPBUtil::checkString($var, True); + $this->label = $var; + + return $this; + } + + /** + * A list of reasons that explain why the shipment was skipped. See comment + * above `Reason`. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.SkippedShipment.Reason reasons = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getReasons() + { + return $this->reasons; + } + + /** + * A list of reasons that explain why the shipment was skipped. See comment + * above `Reason`. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.SkippedShipment.Reason reasons = 3; + * @param array<\Google\Cloud\Optimization\V1\SkippedShipment\Reason>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setReasons($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\SkippedShipment\Reason::class); + $this->reasons = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/SkippedShipment/Reason.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/SkippedShipment/Reason.php new file mode 100644 index 000000000000..530f04abb7a8 --- /dev/null +++ b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/SkippedShipment/Reason.php @@ -0,0 +1,181 @@ +google.cloud.optimization.v1.SkippedShipment.Reason + */ +class Reason extends \Google\Protobuf\Internal\Message +{ + /** + * Refer to the comments of Code. + * + * Generated from protobuf field .google.cloud.optimization.v1.SkippedShipment.Reason.Code code = 1; + */ + protected $code = 0; + /** + * If the reason is related to a shipment-vehicle incompatibility, this + * field provides the index of one relevant vehicle. + * + * Generated from protobuf field optional int32 example_vehicle_index = 2; + */ + protected $example_vehicle_index = null; + /** + * If the reason code is `DEMAND_EXCEEDS_VEHICLE_CAPACITY`, documents one + * capacity type that is exceeded. + * + * Generated from protobuf field string example_exceeded_capacity_type = 3; + */ + protected $example_exceeded_capacity_type = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $code + * Refer to the comments of Code. + * @type int $example_vehicle_index + * If the reason is related to a shipment-vehicle incompatibility, this + * field provides the index of one relevant vehicle. + * @type string $example_exceeded_capacity_type + * If the reason code is `DEMAND_EXCEEDS_VEHICLE_CAPACITY`, documents one + * capacity type that is exceeded. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); + parent::__construct($data); + } + + /** + * Refer to the comments of Code. + * + * Generated from protobuf field .google.cloud.optimization.v1.SkippedShipment.Reason.Code code = 1; + * @return int + */ + public function getCode() + { + return $this->code; + } + + /** + * Refer to the comments of Code. + * + * Generated from protobuf field .google.cloud.optimization.v1.SkippedShipment.Reason.Code code = 1; + * @param int $var + * @return $this + */ + public function setCode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Optimization\V1\SkippedShipment\Reason\Code::class); + $this->code = $var; + + return $this; + } + + /** + * If the reason is related to a shipment-vehicle incompatibility, this + * field provides the index of one relevant vehicle. + * + * Generated from protobuf field optional int32 example_vehicle_index = 2; + * @return int + */ + public function getExampleVehicleIndex() + { + return isset($this->example_vehicle_index) ? $this->example_vehicle_index : 0; + } + + public function hasExampleVehicleIndex() + { + return isset($this->example_vehicle_index); + } + + public function clearExampleVehicleIndex() + { + unset($this->example_vehicle_index); + } + + /** + * If the reason is related to a shipment-vehicle incompatibility, this + * field provides the index of one relevant vehicle. + * + * Generated from protobuf field optional int32 example_vehicle_index = 2; + * @param int $var + * @return $this + */ + public function setExampleVehicleIndex($var) + { + GPBUtil::checkInt32($var); + $this->example_vehicle_index = $var; + + return $this; + } + + /** + * If the reason code is `DEMAND_EXCEEDS_VEHICLE_CAPACITY`, documents one + * capacity type that is exceeded. + * + * Generated from protobuf field string example_exceeded_capacity_type = 3; + * @return string + */ + public function getExampleExceededCapacityType() + { + return $this->example_exceeded_capacity_type; + } + + /** + * If the reason code is `DEMAND_EXCEEDS_VEHICLE_CAPACITY`, documents one + * capacity type that is exceeded. + * + * Generated from protobuf field string example_exceeded_capacity_type = 3; + * @param string $var + * @return $this + */ + public function setExampleExceededCapacityType($var) + { + GPBUtil::checkString($var, True); + $this->example_exceeded_capacity_type = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Reason::class, \Google\Cloud\Optimization\V1\SkippedShipment_Reason::class); + diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/SkippedShipment/Reason/Code.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/SkippedShipment/Reason/Code.php new file mode 100644 index 000000000000..0bed0964ff65 --- /dev/null +++ b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/SkippedShipment/Reason/Code.php @@ -0,0 +1,116 @@ +google.cloud.optimization.v1.SkippedShipment.Reason.Code + */ +class Code +{ + /** + * This should never be used. If we are unable to understand why a + * shipment was skipped, we simply return an empty set of reasons. + * + * Generated from protobuf enum CODE_UNSPECIFIED = 0; + */ + const CODE_UNSPECIFIED = 0; + /** + * There is no vehicle in the model making all shipments infeasible. + * + * Generated from protobuf enum NO_VEHICLE = 1; + */ + const NO_VEHICLE = 1; + /** + * The demand of the shipment exceeds a vehicle's capacity for some + * capacity types, one of which is `example_exceeded_capacity_type`. + * + * Generated from protobuf enum DEMAND_EXCEEDS_VEHICLE_CAPACITY = 2; + */ + const DEMAND_EXCEEDS_VEHICLE_CAPACITY = 2; + /** + * The minimum distance necessary to perform this shipment, i.e. from + * the vehicle's `start_location` to the shipment's pickup and/or delivery + * locations and to the vehicle's end location exceeds the vehicle's + * `route_distance_limit`. + * Note that for this computation we use the geodesic distances. + * + * Generated from protobuf enum CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DISTANCE_LIMIT = 3; + */ + const CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DISTANCE_LIMIT = 3; + /** + * The minimum time necessary to perform this shipment, including travel + * time, wait time and service time exceeds the vehicle's + * `route_duration_limit`. + * Note: travel time is computed in the best-case scenario, namely as + * geodesic distance x 36 m/s (roughly 130 km/hour). + * + * Generated from protobuf enum CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DURATION_LIMIT = 4; + */ + const CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DURATION_LIMIT = 4; + /** + * Same as above but we only compare minimum travel time and the + * vehicle's `travel_duration_limit`. + * + * Generated from protobuf enum CANNOT_BE_PERFORMED_WITHIN_VEHICLE_TRAVEL_DURATION_LIMIT = 5; + */ + const CANNOT_BE_PERFORMED_WITHIN_VEHICLE_TRAVEL_DURATION_LIMIT = 5; + /** + * The vehicle cannot perform this shipment in the best-case scenario + * (see `CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DURATION_LIMIT` for time + * computation) if it starts at its earliest start time: the total time + * would make the vehicle end after its latest end time. + * + * Generated from protobuf enum CANNOT_BE_PERFORMED_WITHIN_VEHICLE_TIME_WINDOWS = 6; + */ + const CANNOT_BE_PERFORMED_WITHIN_VEHICLE_TIME_WINDOWS = 6; + /** + * The `allowed_vehicle_indices` field of the shipment is not empty and + * this vehicle does not belong to it. + * + * Generated from protobuf enum VEHICLE_NOT_ALLOWED = 7; + */ + const VEHICLE_NOT_ALLOWED = 7; + + private static $valueToName = [ + self::CODE_UNSPECIFIED => 'CODE_UNSPECIFIED', + self::NO_VEHICLE => 'NO_VEHICLE', + self::DEMAND_EXCEEDS_VEHICLE_CAPACITY => 'DEMAND_EXCEEDS_VEHICLE_CAPACITY', + self::CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DISTANCE_LIMIT => 'CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DISTANCE_LIMIT', + self::CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DURATION_LIMIT => 'CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DURATION_LIMIT', + self::CANNOT_BE_PERFORMED_WITHIN_VEHICLE_TRAVEL_DURATION_LIMIT => 'CANNOT_BE_PERFORMED_WITHIN_VEHICLE_TRAVEL_DURATION_LIMIT', + self::CANNOT_BE_PERFORMED_WITHIN_VEHICLE_TIME_WINDOWS => 'CANNOT_BE_PERFORMED_WITHIN_VEHICLE_TIME_WINDOWS', + self::VEHICLE_NOT_ALLOWED => 'VEHICLE_NOT_ALLOWED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Code::class, \Google\Cloud\Optimization\V1\SkippedShipment_Reason_Code::class); + diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/TimeWindow.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/TimeWindow.php new file mode 100644 index 000000000000..33c8cc767a0b --- /dev/null +++ b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/TimeWindow.php @@ -0,0 +1,388 @@ +google.cloud.optimization.v1.TimeWindow + */ +class TimeWindow extends \Google\Protobuf\Internal\Message +{ + /** + * The hard time window start time. If unspecified it will be set to + * `ShipmentModel.global_start_time`. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + */ + protected $start_time = null; + /** + * The hard time window end time. If unspecified it will be set to + * `ShipmentModel.global_end_time`. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + */ + protected $end_time = null; + /** + * The soft start time of the time window. + * + * Generated from protobuf field .google.protobuf.Timestamp soft_start_time = 3; + */ + protected $soft_start_time = null; + /** + * The soft end time of the time window. + * + * Generated from protobuf field .google.protobuf.Timestamp soft_end_time = 4; + */ + protected $soft_end_time = null; + /** + * A cost per hour added to other costs in the model if the event occurs + * before soft_start_time, computed as: + * ``` + * max(0, soft_start_time - t.seconds) + * * cost_per_hour_before_soft_start_time / 3600, + * t being the time of the event. + * ``` + * This cost must be positive, and the field can only be set if + * soft_start_time has been set. + * + * Generated from protobuf field optional double cost_per_hour_before_soft_start_time = 5; + */ + protected $cost_per_hour_before_soft_start_time = null; + /** + * A cost per hour added to other costs in the model if the event occurs after + * `soft_end_time`, computed as: + * ``` + * max(0, t.seconds - soft_end_time.seconds) + * * cost_per_hour_after_soft_end_time / 3600, + * t being the time of the event. + * ``` + * This cost must be positive, and the field can only be set if + * `soft_end_time` has been set. + * + * Generated from protobuf field optional double cost_per_hour_after_soft_end_time = 6; + */ + protected $cost_per_hour_after_soft_end_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $start_time + * The hard time window start time. If unspecified it will be set to + * `ShipmentModel.global_start_time`. + * @type \Google\Protobuf\Timestamp $end_time + * The hard time window end time. If unspecified it will be set to + * `ShipmentModel.global_end_time`. + * @type \Google\Protobuf\Timestamp $soft_start_time + * The soft start time of the time window. + * @type \Google\Protobuf\Timestamp $soft_end_time + * The soft end time of the time window. + * @type float $cost_per_hour_before_soft_start_time + * A cost per hour added to other costs in the model if the event occurs + * before soft_start_time, computed as: + * ``` + * max(0, soft_start_time - t.seconds) + * * cost_per_hour_before_soft_start_time / 3600, + * t being the time of the event. + * ``` + * This cost must be positive, and the field can only be set if + * soft_start_time has been set. + * @type float $cost_per_hour_after_soft_end_time + * A cost per hour added to other costs in the model if the event occurs after + * `soft_end_time`, computed as: + * ``` + * max(0, t.seconds - soft_end_time.seconds) + * * cost_per_hour_after_soft_end_time / 3600, + * t being the time of the event. + * ``` + * This cost must be positive, and the field can only be set if + * `soft_end_time` has been set. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); + parent::__construct($data); + } + + /** + * The hard time window start time. If unspecified it will be set to + * `ShipmentModel.global_start_time`. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + * @return \Google\Protobuf\Timestamp|null + */ + public function getStartTime() + { + return $this->start_time; + } + + public function hasStartTime() + { + return isset($this->start_time); + } + + public function clearStartTime() + { + unset($this->start_time); + } + + /** + * The hard time window start time. If unspecified it will be set to + * `ShipmentModel.global_start_time`. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * The hard time window end time. If unspecified it will be set to + * `ShipmentModel.global_end_time`. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEndTime() + { + return $this->end_time; + } + + public function hasEndTime() + { + return isset($this->end_time); + } + + public function clearEndTime() + { + unset($this->end_time); + } + + /** + * The hard time window end time. If unspecified it will be set to + * `ShipmentModel.global_end_time`. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * The soft start time of the time window. + * + * Generated from protobuf field .google.protobuf.Timestamp soft_start_time = 3; + * @return \Google\Protobuf\Timestamp|null + */ + public function getSoftStartTime() + { + return $this->soft_start_time; + } + + public function hasSoftStartTime() + { + return isset($this->soft_start_time); + } + + public function clearSoftStartTime() + { + unset($this->soft_start_time); + } + + /** + * The soft start time of the time window. + * + * Generated from protobuf field .google.protobuf.Timestamp soft_start_time = 3; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setSoftStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->soft_start_time = $var; + + return $this; + } + + /** + * The soft end time of the time window. + * + * Generated from protobuf field .google.protobuf.Timestamp soft_end_time = 4; + * @return \Google\Protobuf\Timestamp|null + */ + public function getSoftEndTime() + { + return $this->soft_end_time; + } + + public function hasSoftEndTime() + { + return isset($this->soft_end_time); + } + + public function clearSoftEndTime() + { + unset($this->soft_end_time); + } + + /** + * The soft end time of the time window. + * + * Generated from protobuf field .google.protobuf.Timestamp soft_end_time = 4; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setSoftEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->soft_end_time = $var; + + return $this; + } + + /** + * A cost per hour added to other costs in the model if the event occurs + * before soft_start_time, computed as: + * ``` + * max(0, soft_start_time - t.seconds) + * * cost_per_hour_before_soft_start_time / 3600, + * t being the time of the event. + * ``` + * This cost must be positive, and the field can only be set if + * soft_start_time has been set. + * + * Generated from protobuf field optional double cost_per_hour_before_soft_start_time = 5; + * @return float + */ + public function getCostPerHourBeforeSoftStartTime() + { + return isset($this->cost_per_hour_before_soft_start_time) ? $this->cost_per_hour_before_soft_start_time : 0.0; + } + + public function hasCostPerHourBeforeSoftStartTime() + { + return isset($this->cost_per_hour_before_soft_start_time); + } + + public function clearCostPerHourBeforeSoftStartTime() + { + unset($this->cost_per_hour_before_soft_start_time); + } + + /** + * A cost per hour added to other costs in the model if the event occurs + * before soft_start_time, computed as: + * ``` + * max(0, soft_start_time - t.seconds) + * * cost_per_hour_before_soft_start_time / 3600, + * t being the time of the event. + * ``` + * This cost must be positive, and the field can only be set if + * soft_start_time has been set. + * + * Generated from protobuf field optional double cost_per_hour_before_soft_start_time = 5; + * @param float $var + * @return $this + */ + public function setCostPerHourBeforeSoftStartTime($var) + { + GPBUtil::checkDouble($var); + $this->cost_per_hour_before_soft_start_time = $var; + + return $this; + } + + /** + * A cost per hour added to other costs in the model if the event occurs after + * `soft_end_time`, computed as: + * ``` + * max(0, t.seconds - soft_end_time.seconds) + * * cost_per_hour_after_soft_end_time / 3600, + * t being the time of the event. + * ``` + * This cost must be positive, and the field can only be set if + * `soft_end_time` has been set. + * + * Generated from protobuf field optional double cost_per_hour_after_soft_end_time = 6; + * @return float + */ + public function getCostPerHourAfterSoftEndTime() + { + return isset($this->cost_per_hour_after_soft_end_time) ? $this->cost_per_hour_after_soft_end_time : 0.0; + } + + public function hasCostPerHourAfterSoftEndTime() + { + return isset($this->cost_per_hour_after_soft_end_time); + } + + public function clearCostPerHourAfterSoftEndTime() + { + unset($this->cost_per_hour_after_soft_end_time); + } + + /** + * A cost per hour added to other costs in the model if the event occurs after + * `soft_end_time`, computed as: + * ``` + * max(0, t.seconds - soft_end_time.seconds) + * * cost_per_hour_after_soft_end_time / 3600, + * t being the time of the event. + * ``` + * This cost must be positive, and the field can only be set if + * `soft_end_time` has been set. + * + * Generated from protobuf field optional double cost_per_hour_after_soft_end_time = 6; + * @param float $var + * @return $this + */ + public function setCostPerHourAfterSoftEndTime($var) + { + GPBUtil::checkDouble($var); + $this->cost_per_hour_after_soft_end_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/TransitionAttributes.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/TransitionAttributes.php new file mode 100644 index 000000000000..a5182bd35dfb --- /dev/null +++ b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/TransitionAttributes.php @@ -0,0 +1,408 @@ +google.cloud.optimization.v1.TransitionAttributes + */ +class TransitionAttributes extends \Google\Protobuf\Internal\Message +{ + /** + * Tags defining the set of (src->dst) transitions these attributes apply to. + * A source visit or vehicle start matches iff its + * [VisitRequest.tags][google.cloud.optimization.v1.Shipment.VisitRequest.tags] + * or [Vehicle.start_tags][google.cloud.optimization.v1.Vehicle.start_tags] + * either contains `src_tag` or does not contain `excluded_src_tag` (depending + * on which of these two fields is non-empty). + * + * Generated from protobuf field string src_tag = 1; + */ + protected $src_tag = ''; + /** + * See `src_tag`. Exactly one of `src_tag` and `excluded_src_tag` must be + * non-empty. + * + * Generated from protobuf field string excluded_src_tag = 2; + */ + protected $excluded_src_tag = ''; + /** + * A destination visit or vehicle end matches iff its + * [VisitRequest.tags][google.cloud.optimization.v1.Shipment.VisitRequest.tags] + * or [Vehicle.end_tags][google.cloud.optimization.v1.Vehicle.end_tags] either + * contains `dst_tag` or does not contain `excluded_dst_tag` (depending on + * which of these two fields is non-empty). + * + * Generated from protobuf field string dst_tag = 3; + */ + protected $dst_tag = ''; + /** + * See `dst_tag`. Exactly one of `dst_tag` and `excluded_dst_tag` must be + * non-empty. + * + * Generated from protobuf field string excluded_dst_tag = 4; + */ + protected $excluded_dst_tag = ''; + /** + * Specifies a cost for performing this transition. This is in the same unit + * as all other costs in the model and must not be negative. It is applied on + * top of all other existing costs. + * + * Generated from protobuf field double cost = 5; + */ + protected $cost = 0.0; + /** + * Specifies a cost per kilometer applied to the distance traveled while + * performing this transition. It adds up to any + * [Vehicle.cost_per_kilometer][google.cloud.optimization.v1.Vehicle.cost_per_kilometer] + * specified on vehicles. + * + * Generated from protobuf field double cost_per_kilometer = 6; + */ + protected $cost_per_kilometer = 0.0; + /** + * Specifies a limit on the distance traveled while performing this + * transition. + * As of 2021/06, only soft limits are supported. + * + * Generated from protobuf field .google.cloud.optimization.v1.DistanceLimit distance_limit = 7; + */ + protected $distance_limit = null; + /** + * Specifies a delay incurred when performing this transition. + * This delay always occurs *after* finishing the source visit and *before* + * starting the destination visit. + * + * Generated from protobuf field .google.protobuf.Duration delay = 8; + */ + protected $delay = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $src_tag + * Tags defining the set of (src->dst) transitions these attributes apply to. + * A source visit or vehicle start matches iff its + * [VisitRequest.tags][google.cloud.optimization.v1.Shipment.VisitRequest.tags] + * or [Vehicle.start_tags][google.cloud.optimization.v1.Vehicle.start_tags] + * either contains `src_tag` or does not contain `excluded_src_tag` (depending + * on which of these two fields is non-empty). + * @type string $excluded_src_tag + * See `src_tag`. Exactly one of `src_tag` and `excluded_src_tag` must be + * non-empty. + * @type string $dst_tag + * A destination visit or vehicle end matches iff its + * [VisitRequest.tags][google.cloud.optimization.v1.Shipment.VisitRequest.tags] + * or [Vehicle.end_tags][google.cloud.optimization.v1.Vehicle.end_tags] either + * contains `dst_tag` or does not contain `excluded_dst_tag` (depending on + * which of these two fields is non-empty). + * @type string $excluded_dst_tag + * See `dst_tag`. Exactly one of `dst_tag` and `excluded_dst_tag` must be + * non-empty. + * @type float $cost + * Specifies a cost for performing this transition. This is in the same unit + * as all other costs in the model and must not be negative. It is applied on + * top of all other existing costs. + * @type float $cost_per_kilometer + * Specifies a cost per kilometer applied to the distance traveled while + * performing this transition. It adds up to any + * [Vehicle.cost_per_kilometer][google.cloud.optimization.v1.Vehicle.cost_per_kilometer] + * specified on vehicles. + * @type \Google\Cloud\Optimization\V1\DistanceLimit $distance_limit + * Specifies a limit on the distance traveled while performing this + * transition. + * As of 2021/06, only soft limits are supported. + * @type \Google\Protobuf\Duration $delay + * Specifies a delay incurred when performing this transition. + * This delay always occurs *after* finishing the source visit and *before* + * starting the destination visit. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); + parent::__construct($data); + } + + /** + * Tags defining the set of (src->dst) transitions these attributes apply to. + * A source visit or vehicle start matches iff its + * [VisitRequest.tags][google.cloud.optimization.v1.Shipment.VisitRequest.tags] + * or [Vehicle.start_tags][google.cloud.optimization.v1.Vehicle.start_tags] + * either contains `src_tag` or does not contain `excluded_src_tag` (depending + * on which of these two fields is non-empty). + * + * Generated from protobuf field string src_tag = 1; + * @return string + */ + public function getSrcTag() + { + return $this->src_tag; + } + + /** + * Tags defining the set of (src->dst) transitions these attributes apply to. + * A source visit or vehicle start matches iff its + * [VisitRequest.tags][google.cloud.optimization.v1.Shipment.VisitRequest.tags] + * or [Vehicle.start_tags][google.cloud.optimization.v1.Vehicle.start_tags] + * either contains `src_tag` or does not contain `excluded_src_tag` (depending + * on which of these two fields is non-empty). + * + * Generated from protobuf field string src_tag = 1; + * @param string $var + * @return $this + */ + public function setSrcTag($var) + { + GPBUtil::checkString($var, True); + $this->src_tag = $var; + + return $this; + } + + /** + * See `src_tag`. Exactly one of `src_tag` and `excluded_src_tag` must be + * non-empty. + * + * Generated from protobuf field string excluded_src_tag = 2; + * @return string + */ + public function getExcludedSrcTag() + { + return $this->excluded_src_tag; + } + + /** + * See `src_tag`. Exactly one of `src_tag` and `excluded_src_tag` must be + * non-empty. + * + * Generated from protobuf field string excluded_src_tag = 2; + * @param string $var + * @return $this + */ + public function setExcludedSrcTag($var) + { + GPBUtil::checkString($var, True); + $this->excluded_src_tag = $var; + + return $this; + } + + /** + * A destination visit or vehicle end matches iff its + * [VisitRequest.tags][google.cloud.optimization.v1.Shipment.VisitRequest.tags] + * or [Vehicle.end_tags][google.cloud.optimization.v1.Vehicle.end_tags] either + * contains `dst_tag` or does not contain `excluded_dst_tag` (depending on + * which of these two fields is non-empty). + * + * Generated from protobuf field string dst_tag = 3; + * @return string + */ + public function getDstTag() + { + return $this->dst_tag; + } + + /** + * A destination visit or vehicle end matches iff its + * [VisitRequest.tags][google.cloud.optimization.v1.Shipment.VisitRequest.tags] + * or [Vehicle.end_tags][google.cloud.optimization.v1.Vehicle.end_tags] either + * contains `dst_tag` or does not contain `excluded_dst_tag` (depending on + * which of these two fields is non-empty). + * + * Generated from protobuf field string dst_tag = 3; + * @param string $var + * @return $this + */ + public function setDstTag($var) + { + GPBUtil::checkString($var, True); + $this->dst_tag = $var; + + return $this; + } + + /** + * See `dst_tag`. Exactly one of `dst_tag` and `excluded_dst_tag` must be + * non-empty. + * + * Generated from protobuf field string excluded_dst_tag = 4; + * @return string + */ + public function getExcludedDstTag() + { + return $this->excluded_dst_tag; + } + + /** + * See `dst_tag`. Exactly one of `dst_tag` and `excluded_dst_tag` must be + * non-empty. + * + * Generated from protobuf field string excluded_dst_tag = 4; + * @param string $var + * @return $this + */ + public function setExcludedDstTag($var) + { + GPBUtil::checkString($var, True); + $this->excluded_dst_tag = $var; + + return $this; + } + + /** + * Specifies a cost for performing this transition. This is in the same unit + * as all other costs in the model and must not be negative. It is applied on + * top of all other existing costs. + * + * Generated from protobuf field double cost = 5; + * @return float + */ + public function getCost() + { + return $this->cost; + } + + /** + * Specifies a cost for performing this transition. This is in the same unit + * as all other costs in the model and must not be negative. It is applied on + * top of all other existing costs. + * + * Generated from protobuf field double cost = 5; + * @param float $var + * @return $this + */ + public function setCost($var) + { + GPBUtil::checkDouble($var); + $this->cost = $var; + + return $this; + } + + /** + * Specifies a cost per kilometer applied to the distance traveled while + * performing this transition. It adds up to any + * [Vehicle.cost_per_kilometer][google.cloud.optimization.v1.Vehicle.cost_per_kilometer] + * specified on vehicles. + * + * Generated from protobuf field double cost_per_kilometer = 6; + * @return float + */ + public function getCostPerKilometer() + { + return $this->cost_per_kilometer; + } + + /** + * Specifies a cost per kilometer applied to the distance traveled while + * performing this transition. It adds up to any + * [Vehicle.cost_per_kilometer][google.cloud.optimization.v1.Vehicle.cost_per_kilometer] + * specified on vehicles. + * + * Generated from protobuf field double cost_per_kilometer = 6; + * @param float $var + * @return $this + */ + public function setCostPerKilometer($var) + { + GPBUtil::checkDouble($var); + $this->cost_per_kilometer = $var; + + return $this; + } + + /** + * Specifies a limit on the distance traveled while performing this + * transition. + * As of 2021/06, only soft limits are supported. + * + * Generated from protobuf field .google.cloud.optimization.v1.DistanceLimit distance_limit = 7; + * @return \Google\Cloud\Optimization\V1\DistanceLimit|null + */ + public function getDistanceLimit() + { + return $this->distance_limit; + } + + public function hasDistanceLimit() + { + return isset($this->distance_limit); + } + + public function clearDistanceLimit() + { + unset($this->distance_limit); + } + + /** + * Specifies a limit on the distance traveled while performing this + * transition. + * As of 2021/06, only soft limits are supported. + * + * Generated from protobuf field .google.cloud.optimization.v1.DistanceLimit distance_limit = 7; + * @param \Google\Cloud\Optimization\V1\DistanceLimit $var + * @return $this + */ + public function setDistanceLimit($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Optimization\V1\DistanceLimit::class); + $this->distance_limit = $var; + + return $this; + } + + /** + * Specifies a delay incurred when performing this transition. + * This delay always occurs *after* finishing the source visit and *before* + * starting the destination visit. + * + * Generated from protobuf field .google.protobuf.Duration delay = 8; + * @return \Google\Protobuf\Duration|null + */ + public function getDelay() + { + return $this->delay; + } + + public function hasDelay() + { + return isset($this->delay); + } + + public function clearDelay() + { + unset($this->delay); + } + + /** + * Specifies a delay incurred when performing this transition. + * This delay always occurs *after* finishing the source visit and *before* + * starting the destination visit. + * + * Generated from protobuf field .google.protobuf.Duration delay = 8; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setDelay($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->delay = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/Vehicle.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/Vehicle.php new file mode 100644 index 000000000000..90af4115a7c0 --- /dev/null +++ b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/Vehicle.php @@ -0,0 +1,1581 @@ +google.cloud.optimization.v1.Vehicle + */ +class Vehicle extends \Google\Protobuf\Internal\Message +{ + /** + * The travel mode which affects the roads usable by the vehicle and its + * speed. See also `travel_duration_multiple`. + * + * Generated from protobuf field .google.cloud.optimization.v1.Vehicle.TravelMode travel_mode = 1; + */ + protected $travel_mode = 0; + /** + * Optional. A set of conditions to satisfy that affect the way routes are + * calculated for the given vehicle. + * + * Generated from protobuf field .google.cloud.optimization.v1.RouteModifiers route_modifiers = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $route_modifiers = null; + /** + * Geographic location where the vehicle starts before picking up any + * shipments. If not specified, the vehicle starts at its first pickup. + * If the shipment model has duration and distance matrices, `start_location` + * must not be specified. + * + * Generated from protobuf field .google.type.LatLng start_location = 3; + */ + protected $start_location = null; + /** + * Waypoint representing a geographic location where the vehicle starts before + * picking up any shipments. If neither `start_waypoint` nor `start_location` + * is specified, the vehicle starts at its first pickup. + * If the shipment model has duration and distance matrices, `start_waypoint` + * must not be specified. + * + * Generated from protobuf field .google.cloud.optimization.v1.Waypoint start_waypoint = 4; + */ + protected $start_waypoint = null; + /** + * Geographic location where the vehicle ends after it has completed its last + * `VisitRequest`. If not specified the vehicle's `ShipmentRoute` ends + * immediately when it completes its last `VisitRequest`. + * If the shipment model has duration and distance matrices, `end_location` + * must not be specified. + * + * Generated from protobuf field .google.type.LatLng end_location = 5; + */ + protected $end_location = null; + /** + * Waypoint representing a geographic location where the vehicle ends after + * it has completed its last `VisitRequest`. If neither `end_waypoint` nor + * `end_location` is specified, the vehicle's `ShipmentRoute` ends immediately + * when it completes its last `VisitRequest`. + * If the shipment model has duration and distance matrices, `end_waypoint` + * must not be specified. + * + * Generated from protobuf field .google.cloud.optimization.v1.Waypoint end_waypoint = 6; + */ + protected $end_waypoint = null; + /** + * Specifies tags attached to the start of the vehicle's route. + * Empty or duplicate strings are not allowed. + * + * Generated from protobuf field repeated string start_tags = 7; + */ + private $start_tags; + /** + * Specifies tags attached to the end of the vehicle's route. + * Empty or duplicate strings are not allowed. + * + * Generated from protobuf field repeated string end_tags = 8; + */ + private $end_tags; + /** + * Time windows during which the vehicle may depart its start location. + * They must be within the global time limits (see + * [ShipmentModel.global_*][google.cloud.optimization.v1.ShipmentModel.global_start_time] + * fields). If unspecified, there is no limitation besides those global time + * limits. + * Time windows belonging to the same repeated field must be disjoint, i.e. no + * time window can overlap with or be adjacent to another, and they must be in + * chronological order. + * `cost_per_hour_after_soft_end_time` and `soft_end_time` can only be set if + * there is a single time window. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.TimeWindow start_time_windows = 9; + */ + private $start_time_windows; + /** + * Time windows during which the vehicle may arrive at its end location. + * They must be within the global time limits (see + * [ShipmentModel.global_*][google.cloud.optimization.v1.ShipmentModel.global_start_time] + * fields). If unspecified, there is no limitation besides those global time + * limits. + * Time windows belonging to the same repeated field must be disjoint, i.e. no + * time window can overlap with or be adjacent to another, and they must be in + * chronological order. + * `cost_per_hour_after_soft_end_time` and `soft_end_time` can only be set if + * there is a single time window. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.TimeWindow end_time_windows = 10; + */ + private $end_time_windows; + /** + * Specifies a multiplicative factor that can be used to increase or decrease + * travel times of this vehicle. For example, setting this to 2.0 means + * that this vehicle is slower and has travel times that are twice what they + * are for standard vehicles. This multiple does not affect visit durations. + * It does affect cost if `cost_per_hour` or `cost_per_traveled_hour` are + * specified. This must be in the range [0.001, 1000.0]. If unset, the vehicle + * is standard, and this multiple is considered 1.0. + * WARNING: Travel times will be rounded to the nearest second after this + * multiple is applied but before performing any numerical operations, thus, + * a small multiple may result in a loss of precision. + * See also `extra_visit_duration_for_visit_type` below. + * + * Generated from protobuf field optional double travel_duration_multiple = 11; + */ + protected $travel_duration_multiple = null; + /** + * Unloading policy enforced on the vehicle. + * + * Generated from protobuf field .google.cloud.optimization.v1.Vehicle.UnloadingPolicy unloading_policy = 12; + */ + protected $unloading_policy = 0; + /** + * Capacities of the vehicle (weight, volume, # of pallets for example). + * The keys in the map are the identifiers of the type of load, consistent + * with the keys of the + * [Shipment.load_demands][google.cloud.optimization.v1.Shipment.load_demands] + * field. If a given key is absent from this map, the corresponding capacity + * is considered to be limitless. + * + * Generated from protobuf field map load_limits = 30; + */ + private $load_limits; + /** + * Vehicle costs: all costs add up and must be in the same unit as + * [Shipment.penalty_cost][google.cloud.optimization.v1.Shipment.penalty_cost]. + * Cost per hour of the vehicle route. This cost is applied to the total time + * taken by the route, and includes travel time, waiting time, and visit time. + * Using `cost_per_hour` instead of just `cost_per_traveled_hour` may result + * in additional latency. + * + * Generated from protobuf field double cost_per_hour = 16; + */ + protected $cost_per_hour = 0.0; + /** + * Cost per traveled hour of the vehicle route. This cost is applied only to + * travel time taken by the route (i.e., that reported in + * [ShipmentRoute.transitions][google.cloud.optimization.v1.ShipmentRoute.transitions]), + * and excludes waiting time and visit time. + * + * Generated from protobuf field double cost_per_traveled_hour = 17; + */ + protected $cost_per_traveled_hour = 0.0; + /** + * Cost per kilometer of the vehicle route. This cost is applied to the + * distance reported in the + * [ShipmentRoute.transitions][google.cloud.optimization.v1.ShipmentRoute.transitions] + * and does not apply to any distance implicitly traveled from the + * `arrival_location` to the `departure_location` of a single `VisitRequest`. + * + * Generated from protobuf field double cost_per_kilometer = 18; + */ + protected $cost_per_kilometer = 0.0; + /** + * Fixed cost applied if this vehicle is used to handle a shipment. + * + * Generated from protobuf field double fixed_cost = 19; + */ + protected $fixed_cost = 0.0; + /** + * This field only applies to vehicles when their route does not serve any + * shipments. It indicates if the vehicle should be considered as used or not + * in this case. + * If true, the vehicle goes from its start to its end location even if it + * doesn't serve any shipments, and time and distance costs resulting from its + * start --> end travel are taken into account. + * Otherwise, it doesn't travel from its start to its end location, and no + * `break_rule` or delay (from `TransitionAttributes`) are scheduled for this + * vehicle. In this case, the vehicle's `ShipmentRoute` doesn't contain any + * information except for the vehicle index and label. + * + * Generated from protobuf field bool used_if_route_is_empty = 20; + */ + protected $used_if_route_is_empty = false; + /** + * Limit applied to the total duration of the vehicle's route. In a given + * `OptimizeToursResponse`, the route duration of a vehicle is the + * difference between its `vehicle_end_time` and `vehicle_start_time`. + * + * Generated from protobuf field .google.cloud.optimization.v1.Vehicle.DurationLimit route_duration_limit = 21; + */ + protected $route_duration_limit = null; + /** + * Limit applied to the travel duration of the vehicle's route. In a given + * `OptimizeToursResponse`, the route travel duration is the sum of all its + * [transitions.travel_duration][google.cloud.optimization.v1.ShipmentRoute.Transition.travel_duration]. + * + * Generated from protobuf field .google.cloud.optimization.v1.Vehicle.DurationLimit travel_duration_limit = 22; + */ + protected $travel_duration_limit = null; + /** + * Limit applied to the total distance of the vehicle's route. In a given + * `OptimizeToursResponse`, the route distance is the sum of all its + * [transitions.travel_distance_meters][google.cloud.optimization.v1.ShipmentRoute.Transition.travel_distance_meters]. + * + * Generated from protobuf field .google.cloud.optimization.v1.DistanceLimit route_distance_limit = 23; + */ + protected $route_distance_limit = null; + /** + * Specifies a map from visit_types strings to durations. The duration is time + * in addition to + * [VisitRequest.duration][google.cloud.optimization.v1.Shipment.VisitRequest.duration] + * to be taken at visits with the specified `visit_types`. This extra visit + * duration adds cost if `cost_per_hour` is specified. Keys (i.e. + * `visit_types`) cannot be empty strings. + * If a visit request has multiple types, a duration will be added for each + * type in the map. + * + * Generated from protobuf field map extra_visit_duration_for_visit_type = 24; + */ + private $extra_visit_duration_for_visit_type; + /** + * Describes the break schedule to be enforced on this vehicle. + * If empty, no breaks will be scheduled for this vehicle. + * + * Generated from protobuf field .google.cloud.optimization.v1.BreakRule break_rule = 25; + */ + protected $break_rule = null; + /** + * Specifies a label for this vehicle. This label is reported in the response + * as the `vehicle_label` of the corresponding + * [ShipmentRoute][google.cloud.optimization.v1.ShipmentRoute]. + * + * Generated from protobuf field string label = 27; + */ + protected $label = ''; + /** + * If true, `used_if_route_is_empty` must be false, and this vehicle will + * remain unused. + * If a shipment is performed by an ignored vehicle in + * `injected_first_solution_routes`, it is skipped in the first solution but + * is free to be performed in the response. + * If a shipment is performed by an ignored vehicle in + * `injected_solution_constraint` and any related pickup/delivery is + * constrained to remain on the vehicle (i.e., not relaxed to level + * `RELAX_ALL_AFTER_THRESHOLD`), it is skipped in the response. + * If a shipment has a non-empty `allowed_vehicle_indices` field and all of + * the allowed vehicles are ignored, it is skipped in the response. + * + * Generated from protobuf field bool ignore = 28; + */ + protected $ignore = false; + /** + * Deprecated: No longer used. + * Indices in the `break_rule` field in the source + * [ShipmentModel][google.cloud.optimization.v1.ShipmentModel]. They + * correspond to break rules enforced on the vehicle. + * As of 2018/03, at most one rule index per vehicle can be specified. + * + * Generated from protobuf field repeated int32 break_rule_indices = 29 [deprecated = true]; + * @deprecated + */ + private $break_rule_indices; + /** + * Deprecated: Use + * [Vehicle.load_limits][google.cloud.optimization.v1.Vehicle.load_limits] + * instead. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.CapacityQuantity capacities = 13 [deprecated = true]; + * @deprecated + */ + private $capacities; + /** + * Deprecated: Use + * [Vehicle.LoadLimit.start_load_interval][google.cloud.optimization.v1.Vehicle.LoadLimit.start_load_interval] + * instead. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.CapacityQuantityInterval start_load_intervals = 14 [deprecated = true]; + * @deprecated + */ + private $start_load_intervals; + /** + * Deprecated: Use + * [Vehicle.LoadLimit.end_load_interval][google.cloud.optimization.v1.Vehicle.LoadLimit.end_load_interval] + * instead. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.CapacityQuantityInterval end_load_intervals = 15 [deprecated = true]; + * @deprecated + */ + private $end_load_intervals; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $travel_mode + * The travel mode which affects the roads usable by the vehicle and its + * speed. See also `travel_duration_multiple`. + * @type \Google\Cloud\Optimization\V1\RouteModifiers $route_modifiers + * Optional. A set of conditions to satisfy that affect the way routes are + * calculated for the given vehicle. + * @type \Google\Type\LatLng $start_location + * Geographic location where the vehicle starts before picking up any + * shipments. If not specified, the vehicle starts at its first pickup. + * If the shipment model has duration and distance matrices, `start_location` + * must not be specified. + * @type \Google\Cloud\Optimization\V1\Waypoint $start_waypoint + * Waypoint representing a geographic location where the vehicle starts before + * picking up any shipments. If neither `start_waypoint` nor `start_location` + * is specified, the vehicle starts at its first pickup. + * If the shipment model has duration and distance matrices, `start_waypoint` + * must not be specified. + * @type \Google\Type\LatLng $end_location + * Geographic location where the vehicle ends after it has completed its last + * `VisitRequest`. If not specified the vehicle's `ShipmentRoute` ends + * immediately when it completes its last `VisitRequest`. + * If the shipment model has duration and distance matrices, `end_location` + * must not be specified. + * @type \Google\Cloud\Optimization\V1\Waypoint $end_waypoint + * Waypoint representing a geographic location where the vehicle ends after + * it has completed its last `VisitRequest`. If neither `end_waypoint` nor + * `end_location` is specified, the vehicle's `ShipmentRoute` ends immediately + * when it completes its last `VisitRequest`. + * If the shipment model has duration and distance matrices, `end_waypoint` + * must not be specified. + * @type array|\Google\Protobuf\Internal\RepeatedField $start_tags + * Specifies tags attached to the start of the vehicle's route. + * Empty or duplicate strings are not allowed. + * @type array|\Google\Protobuf\Internal\RepeatedField $end_tags + * Specifies tags attached to the end of the vehicle's route. + * Empty or duplicate strings are not allowed. + * @type array<\Google\Cloud\Optimization\V1\TimeWindow>|\Google\Protobuf\Internal\RepeatedField $start_time_windows + * Time windows during which the vehicle may depart its start location. + * They must be within the global time limits (see + * [ShipmentModel.global_*][google.cloud.optimization.v1.ShipmentModel.global_start_time] + * fields). If unspecified, there is no limitation besides those global time + * limits. + * Time windows belonging to the same repeated field must be disjoint, i.e. no + * time window can overlap with or be adjacent to another, and they must be in + * chronological order. + * `cost_per_hour_after_soft_end_time` and `soft_end_time` can only be set if + * there is a single time window. + * @type array<\Google\Cloud\Optimization\V1\TimeWindow>|\Google\Protobuf\Internal\RepeatedField $end_time_windows + * Time windows during which the vehicle may arrive at its end location. + * They must be within the global time limits (see + * [ShipmentModel.global_*][google.cloud.optimization.v1.ShipmentModel.global_start_time] + * fields). If unspecified, there is no limitation besides those global time + * limits. + * Time windows belonging to the same repeated field must be disjoint, i.e. no + * time window can overlap with or be adjacent to another, and they must be in + * chronological order. + * `cost_per_hour_after_soft_end_time` and `soft_end_time` can only be set if + * there is a single time window. + * @type float $travel_duration_multiple + * Specifies a multiplicative factor that can be used to increase or decrease + * travel times of this vehicle. For example, setting this to 2.0 means + * that this vehicle is slower and has travel times that are twice what they + * are for standard vehicles. This multiple does not affect visit durations. + * It does affect cost if `cost_per_hour` or `cost_per_traveled_hour` are + * specified. This must be in the range [0.001, 1000.0]. If unset, the vehicle + * is standard, and this multiple is considered 1.0. + * WARNING: Travel times will be rounded to the nearest second after this + * multiple is applied but before performing any numerical operations, thus, + * a small multiple may result in a loss of precision. + * See also `extra_visit_duration_for_visit_type` below. + * @type int $unloading_policy + * Unloading policy enforced on the vehicle. + * @type array|\Google\Protobuf\Internal\MapField $load_limits + * Capacities of the vehicle (weight, volume, # of pallets for example). + * The keys in the map are the identifiers of the type of load, consistent + * with the keys of the + * [Shipment.load_demands][google.cloud.optimization.v1.Shipment.load_demands] + * field. If a given key is absent from this map, the corresponding capacity + * is considered to be limitless. + * @type float $cost_per_hour + * Vehicle costs: all costs add up and must be in the same unit as + * [Shipment.penalty_cost][google.cloud.optimization.v1.Shipment.penalty_cost]. + * Cost per hour of the vehicle route. This cost is applied to the total time + * taken by the route, and includes travel time, waiting time, and visit time. + * Using `cost_per_hour` instead of just `cost_per_traveled_hour` may result + * in additional latency. + * @type float $cost_per_traveled_hour + * Cost per traveled hour of the vehicle route. This cost is applied only to + * travel time taken by the route (i.e., that reported in + * [ShipmentRoute.transitions][google.cloud.optimization.v1.ShipmentRoute.transitions]), + * and excludes waiting time and visit time. + * @type float $cost_per_kilometer + * Cost per kilometer of the vehicle route. This cost is applied to the + * distance reported in the + * [ShipmentRoute.transitions][google.cloud.optimization.v1.ShipmentRoute.transitions] + * and does not apply to any distance implicitly traveled from the + * `arrival_location` to the `departure_location` of a single `VisitRequest`. + * @type float $fixed_cost + * Fixed cost applied if this vehicle is used to handle a shipment. + * @type bool $used_if_route_is_empty + * This field only applies to vehicles when their route does not serve any + * shipments. It indicates if the vehicle should be considered as used or not + * in this case. + * If true, the vehicle goes from its start to its end location even if it + * doesn't serve any shipments, and time and distance costs resulting from its + * start --> end travel are taken into account. + * Otherwise, it doesn't travel from its start to its end location, and no + * `break_rule` or delay (from `TransitionAttributes`) are scheduled for this + * vehicle. In this case, the vehicle's `ShipmentRoute` doesn't contain any + * information except for the vehicle index and label. + * @type \Google\Cloud\Optimization\V1\Vehicle\DurationLimit $route_duration_limit + * Limit applied to the total duration of the vehicle's route. In a given + * `OptimizeToursResponse`, the route duration of a vehicle is the + * difference between its `vehicle_end_time` and `vehicle_start_time`. + * @type \Google\Cloud\Optimization\V1\Vehicle\DurationLimit $travel_duration_limit + * Limit applied to the travel duration of the vehicle's route. In a given + * `OptimizeToursResponse`, the route travel duration is the sum of all its + * [transitions.travel_duration][google.cloud.optimization.v1.ShipmentRoute.Transition.travel_duration]. + * @type \Google\Cloud\Optimization\V1\DistanceLimit $route_distance_limit + * Limit applied to the total distance of the vehicle's route. In a given + * `OptimizeToursResponse`, the route distance is the sum of all its + * [transitions.travel_distance_meters][google.cloud.optimization.v1.ShipmentRoute.Transition.travel_distance_meters]. + * @type array|\Google\Protobuf\Internal\MapField $extra_visit_duration_for_visit_type + * Specifies a map from visit_types strings to durations. The duration is time + * in addition to + * [VisitRequest.duration][google.cloud.optimization.v1.Shipment.VisitRequest.duration] + * to be taken at visits with the specified `visit_types`. This extra visit + * duration adds cost if `cost_per_hour` is specified. Keys (i.e. + * `visit_types`) cannot be empty strings. + * If a visit request has multiple types, a duration will be added for each + * type in the map. + * @type \Google\Cloud\Optimization\V1\BreakRule $break_rule + * Describes the break schedule to be enforced on this vehicle. + * If empty, no breaks will be scheduled for this vehicle. + * @type string $label + * Specifies a label for this vehicle. This label is reported in the response + * as the `vehicle_label` of the corresponding + * [ShipmentRoute][google.cloud.optimization.v1.ShipmentRoute]. + * @type bool $ignore + * If true, `used_if_route_is_empty` must be false, and this vehicle will + * remain unused. + * If a shipment is performed by an ignored vehicle in + * `injected_first_solution_routes`, it is skipped in the first solution but + * is free to be performed in the response. + * If a shipment is performed by an ignored vehicle in + * `injected_solution_constraint` and any related pickup/delivery is + * constrained to remain on the vehicle (i.e., not relaxed to level + * `RELAX_ALL_AFTER_THRESHOLD`), it is skipped in the response. + * If a shipment has a non-empty `allowed_vehicle_indices` field and all of + * the allowed vehicles are ignored, it is skipped in the response. + * @type array|\Google\Protobuf\Internal\RepeatedField $break_rule_indices + * Deprecated: No longer used. + * Indices in the `break_rule` field in the source + * [ShipmentModel][google.cloud.optimization.v1.ShipmentModel]. They + * correspond to break rules enforced on the vehicle. + * As of 2018/03, at most one rule index per vehicle can be specified. + * @type array<\Google\Cloud\Optimization\V1\CapacityQuantity>|\Google\Protobuf\Internal\RepeatedField $capacities + * Deprecated: Use + * [Vehicle.load_limits][google.cloud.optimization.v1.Vehicle.load_limits] + * instead. + * @type array<\Google\Cloud\Optimization\V1\CapacityQuantityInterval>|\Google\Protobuf\Internal\RepeatedField $start_load_intervals + * Deprecated: Use + * [Vehicle.LoadLimit.start_load_interval][google.cloud.optimization.v1.Vehicle.LoadLimit.start_load_interval] + * instead. + * @type array<\Google\Cloud\Optimization\V1\CapacityQuantityInterval>|\Google\Protobuf\Internal\RepeatedField $end_load_intervals + * Deprecated: Use + * [Vehicle.LoadLimit.end_load_interval][google.cloud.optimization.v1.Vehicle.LoadLimit.end_load_interval] + * instead. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); + parent::__construct($data); + } + + /** + * The travel mode which affects the roads usable by the vehicle and its + * speed. See also `travel_duration_multiple`. + * + * Generated from protobuf field .google.cloud.optimization.v1.Vehicle.TravelMode travel_mode = 1; + * @return int + */ + public function getTravelMode() + { + return $this->travel_mode; + } + + /** + * The travel mode which affects the roads usable by the vehicle and its + * speed. See also `travel_duration_multiple`. + * + * Generated from protobuf field .google.cloud.optimization.v1.Vehicle.TravelMode travel_mode = 1; + * @param int $var + * @return $this + */ + public function setTravelMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Optimization\V1\Vehicle\TravelMode::class); + $this->travel_mode = $var; + + return $this; + } + + /** + * Optional. A set of conditions to satisfy that affect the way routes are + * calculated for the given vehicle. + * + * Generated from protobuf field .google.cloud.optimization.v1.RouteModifiers route_modifiers = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Optimization\V1\RouteModifiers|null + */ + public function getRouteModifiers() + { + return $this->route_modifiers; + } + + public function hasRouteModifiers() + { + return isset($this->route_modifiers); + } + + public function clearRouteModifiers() + { + unset($this->route_modifiers); + } + + /** + * Optional. A set of conditions to satisfy that affect the way routes are + * calculated for the given vehicle. + * + * Generated from protobuf field .google.cloud.optimization.v1.RouteModifiers route_modifiers = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Optimization\V1\RouteModifiers $var + * @return $this + */ + public function setRouteModifiers($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Optimization\V1\RouteModifiers::class); + $this->route_modifiers = $var; + + return $this; + } + + /** + * Geographic location where the vehicle starts before picking up any + * shipments. If not specified, the vehicle starts at its first pickup. + * If the shipment model has duration and distance matrices, `start_location` + * must not be specified. + * + * Generated from protobuf field .google.type.LatLng start_location = 3; + * @return \Google\Type\LatLng|null + */ + public function getStartLocation() + { + return $this->start_location; + } + + public function hasStartLocation() + { + return isset($this->start_location); + } + + public function clearStartLocation() + { + unset($this->start_location); + } + + /** + * Geographic location where the vehicle starts before picking up any + * shipments. If not specified, the vehicle starts at its first pickup. + * If the shipment model has duration and distance matrices, `start_location` + * must not be specified. + * + * Generated from protobuf field .google.type.LatLng start_location = 3; + * @param \Google\Type\LatLng $var + * @return $this + */ + public function setStartLocation($var) + { + GPBUtil::checkMessage($var, \Google\Type\LatLng::class); + $this->start_location = $var; + + return $this; + } + + /** + * Waypoint representing a geographic location where the vehicle starts before + * picking up any shipments. If neither `start_waypoint` nor `start_location` + * is specified, the vehicle starts at its first pickup. + * If the shipment model has duration and distance matrices, `start_waypoint` + * must not be specified. + * + * Generated from protobuf field .google.cloud.optimization.v1.Waypoint start_waypoint = 4; + * @return \Google\Cloud\Optimization\V1\Waypoint|null + */ + public function getStartWaypoint() + { + return $this->start_waypoint; + } + + public function hasStartWaypoint() + { + return isset($this->start_waypoint); + } + + public function clearStartWaypoint() + { + unset($this->start_waypoint); + } + + /** + * Waypoint representing a geographic location where the vehicle starts before + * picking up any shipments. If neither `start_waypoint` nor `start_location` + * is specified, the vehicle starts at its first pickup. + * If the shipment model has duration and distance matrices, `start_waypoint` + * must not be specified. + * + * Generated from protobuf field .google.cloud.optimization.v1.Waypoint start_waypoint = 4; + * @param \Google\Cloud\Optimization\V1\Waypoint $var + * @return $this + */ + public function setStartWaypoint($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Optimization\V1\Waypoint::class); + $this->start_waypoint = $var; + + return $this; + } + + /** + * Geographic location where the vehicle ends after it has completed its last + * `VisitRequest`. If not specified the vehicle's `ShipmentRoute` ends + * immediately when it completes its last `VisitRequest`. + * If the shipment model has duration and distance matrices, `end_location` + * must not be specified. + * + * Generated from protobuf field .google.type.LatLng end_location = 5; + * @return \Google\Type\LatLng|null + */ + public function getEndLocation() + { + return $this->end_location; + } + + public function hasEndLocation() + { + return isset($this->end_location); + } + + public function clearEndLocation() + { + unset($this->end_location); + } + + /** + * Geographic location where the vehicle ends after it has completed its last + * `VisitRequest`. If not specified the vehicle's `ShipmentRoute` ends + * immediately when it completes its last `VisitRequest`. + * If the shipment model has duration and distance matrices, `end_location` + * must not be specified. + * + * Generated from protobuf field .google.type.LatLng end_location = 5; + * @param \Google\Type\LatLng $var + * @return $this + */ + public function setEndLocation($var) + { + GPBUtil::checkMessage($var, \Google\Type\LatLng::class); + $this->end_location = $var; + + return $this; + } + + /** + * Waypoint representing a geographic location where the vehicle ends after + * it has completed its last `VisitRequest`. If neither `end_waypoint` nor + * `end_location` is specified, the vehicle's `ShipmentRoute` ends immediately + * when it completes its last `VisitRequest`. + * If the shipment model has duration and distance matrices, `end_waypoint` + * must not be specified. + * + * Generated from protobuf field .google.cloud.optimization.v1.Waypoint end_waypoint = 6; + * @return \Google\Cloud\Optimization\V1\Waypoint|null + */ + public function getEndWaypoint() + { + return $this->end_waypoint; + } + + public function hasEndWaypoint() + { + return isset($this->end_waypoint); + } + + public function clearEndWaypoint() + { + unset($this->end_waypoint); + } + + /** + * Waypoint representing a geographic location where the vehicle ends after + * it has completed its last `VisitRequest`. If neither `end_waypoint` nor + * `end_location` is specified, the vehicle's `ShipmentRoute` ends immediately + * when it completes its last `VisitRequest`. + * If the shipment model has duration and distance matrices, `end_waypoint` + * must not be specified. + * + * Generated from protobuf field .google.cloud.optimization.v1.Waypoint end_waypoint = 6; + * @param \Google\Cloud\Optimization\V1\Waypoint $var + * @return $this + */ + public function setEndWaypoint($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Optimization\V1\Waypoint::class); + $this->end_waypoint = $var; + + return $this; + } + + /** + * Specifies tags attached to the start of the vehicle's route. + * Empty or duplicate strings are not allowed. + * + * Generated from protobuf field repeated string start_tags = 7; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getStartTags() + { + return $this->start_tags; + } + + /** + * Specifies tags attached to the start of the vehicle's route. + * Empty or duplicate strings are not allowed. + * + * Generated from protobuf field repeated string start_tags = 7; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setStartTags($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->start_tags = $arr; + + return $this; + } + + /** + * Specifies tags attached to the end of the vehicle's route. + * Empty or duplicate strings are not allowed. + * + * Generated from protobuf field repeated string end_tags = 8; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEndTags() + { + return $this->end_tags; + } + + /** + * Specifies tags attached to the end of the vehicle's route. + * Empty or duplicate strings are not allowed. + * + * Generated from protobuf field repeated string end_tags = 8; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEndTags($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->end_tags = $arr; + + return $this; + } + + /** + * Time windows during which the vehicle may depart its start location. + * They must be within the global time limits (see + * [ShipmentModel.global_*][google.cloud.optimization.v1.ShipmentModel.global_start_time] + * fields). If unspecified, there is no limitation besides those global time + * limits. + * Time windows belonging to the same repeated field must be disjoint, i.e. no + * time window can overlap with or be adjacent to another, and they must be in + * chronological order. + * `cost_per_hour_after_soft_end_time` and `soft_end_time` can only be set if + * there is a single time window. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.TimeWindow start_time_windows = 9; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getStartTimeWindows() + { + return $this->start_time_windows; + } + + /** + * Time windows during which the vehicle may depart its start location. + * They must be within the global time limits (see + * [ShipmentModel.global_*][google.cloud.optimization.v1.ShipmentModel.global_start_time] + * fields). If unspecified, there is no limitation besides those global time + * limits. + * Time windows belonging to the same repeated field must be disjoint, i.e. no + * time window can overlap with or be adjacent to another, and they must be in + * chronological order. + * `cost_per_hour_after_soft_end_time` and `soft_end_time` can only be set if + * there is a single time window. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.TimeWindow start_time_windows = 9; + * @param array<\Google\Cloud\Optimization\V1\TimeWindow>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setStartTimeWindows($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\TimeWindow::class); + $this->start_time_windows = $arr; + + return $this; + } + + /** + * Time windows during which the vehicle may arrive at its end location. + * They must be within the global time limits (see + * [ShipmentModel.global_*][google.cloud.optimization.v1.ShipmentModel.global_start_time] + * fields). If unspecified, there is no limitation besides those global time + * limits. + * Time windows belonging to the same repeated field must be disjoint, i.e. no + * time window can overlap with or be adjacent to another, and they must be in + * chronological order. + * `cost_per_hour_after_soft_end_time` and `soft_end_time` can only be set if + * there is a single time window. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.TimeWindow end_time_windows = 10; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEndTimeWindows() + { + return $this->end_time_windows; + } + + /** + * Time windows during which the vehicle may arrive at its end location. + * They must be within the global time limits (see + * [ShipmentModel.global_*][google.cloud.optimization.v1.ShipmentModel.global_start_time] + * fields). If unspecified, there is no limitation besides those global time + * limits. + * Time windows belonging to the same repeated field must be disjoint, i.e. no + * time window can overlap with or be adjacent to another, and they must be in + * chronological order. + * `cost_per_hour_after_soft_end_time` and `soft_end_time` can only be set if + * there is a single time window. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.TimeWindow end_time_windows = 10; + * @param array<\Google\Cloud\Optimization\V1\TimeWindow>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEndTimeWindows($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\TimeWindow::class); + $this->end_time_windows = $arr; + + return $this; + } + + /** + * Specifies a multiplicative factor that can be used to increase or decrease + * travel times of this vehicle. For example, setting this to 2.0 means + * that this vehicle is slower and has travel times that are twice what they + * are for standard vehicles. This multiple does not affect visit durations. + * It does affect cost if `cost_per_hour` or `cost_per_traveled_hour` are + * specified. This must be in the range [0.001, 1000.0]. If unset, the vehicle + * is standard, and this multiple is considered 1.0. + * WARNING: Travel times will be rounded to the nearest second after this + * multiple is applied but before performing any numerical operations, thus, + * a small multiple may result in a loss of precision. + * See also `extra_visit_duration_for_visit_type` below. + * + * Generated from protobuf field optional double travel_duration_multiple = 11; + * @return float + */ + public function getTravelDurationMultiple() + { + return isset($this->travel_duration_multiple) ? $this->travel_duration_multiple : 0.0; + } + + public function hasTravelDurationMultiple() + { + return isset($this->travel_duration_multiple); + } + + public function clearTravelDurationMultiple() + { + unset($this->travel_duration_multiple); + } + + /** + * Specifies a multiplicative factor that can be used to increase or decrease + * travel times of this vehicle. For example, setting this to 2.0 means + * that this vehicle is slower and has travel times that are twice what they + * are for standard vehicles. This multiple does not affect visit durations. + * It does affect cost if `cost_per_hour` or `cost_per_traveled_hour` are + * specified. This must be in the range [0.001, 1000.0]. If unset, the vehicle + * is standard, and this multiple is considered 1.0. + * WARNING: Travel times will be rounded to the nearest second after this + * multiple is applied but before performing any numerical operations, thus, + * a small multiple may result in a loss of precision. + * See also `extra_visit_duration_for_visit_type` below. + * + * Generated from protobuf field optional double travel_duration_multiple = 11; + * @param float $var + * @return $this + */ + public function setTravelDurationMultiple($var) + { + GPBUtil::checkDouble($var); + $this->travel_duration_multiple = $var; + + return $this; + } + + /** + * Unloading policy enforced on the vehicle. + * + * Generated from protobuf field .google.cloud.optimization.v1.Vehicle.UnloadingPolicy unloading_policy = 12; + * @return int + */ + public function getUnloadingPolicy() + { + return $this->unloading_policy; + } + + /** + * Unloading policy enforced on the vehicle. + * + * Generated from protobuf field .google.cloud.optimization.v1.Vehicle.UnloadingPolicy unloading_policy = 12; + * @param int $var + * @return $this + */ + public function setUnloadingPolicy($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Optimization\V1\Vehicle\UnloadingPolicy::class); + $this->unloading_policy = $var; + + return $this; + } + + /** + * Capacities of the vehicle (weight, volume, # of pallets for example). + * The keys in the map are the identifiers of the type of load, consistent + * with the keys of the + * [Shipment.load_demands][google.cloud.optimization.v1.Shipment.load_demands] + * field. If a given key is absent from this map, the corresponding capacity + * is considered to be limitless. + * + * Generated from protobuf field map load_limits = 30; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLoadLimits() + { + return $this->load_limits; + } + + /** + * Capacities of the vehicle (weight, volume, # of pallets for example). + * The keys in the map are the identifiers of the type of load, consistent + * with the keys of the + * [Shipment.load_demands][google.cloud.optimization.v1.Shipment.load_demands] + * field. If a given key is absent from this map, the corresponding capacity + * is considered to be limitless. + * + * Generated from protobuf field map load_limits = 30; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLoadLimits($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\Vehicle\LoadLimit::class); + $this->load_limits = $arr; + + return $this; + } + + /** + * Vehicle costs: all costs add up and must be in the same unit as + * [Shipment.penalty_cost][google.cloud.optimization.v1.Shipment.penalty_cost]. + * Cost per hour of the vehicle route. This cost is applied to the total time + * taken by the route, and includes travel time, waiting time, and visit time. + * Using `cost_per_hour` instead of just `cost_per_traveled_hour` may result + * in additional latency. + * + * Generated from protobuf field double cost_per_hour = 16; + * @return float + */ + public function getCostPerHour() + { + return $this->cost_per_hour; + } + + /** + * Vehicle costs: all costs add up and must be in the same unit as + * [Shipment.penalty_cost][google.cloud.optimization.v1.Shipment.penalty_cost]. + * Cost per hour of the vehicle route. This cost is applied to the total time + * taken by the route, and includes travel time, waiting time, and visit time. + * Using `cost_per_hour` instead of just `cost_per_traveled_hour` may result + * in additional latency. + * + * Generated from protobuf field double cost_per_hour = 16; + * @param float $var + * @return $this + */ + public function setCostPerHour($var) + { + GPBUtil::checkDouble($var); + $this->cost_per_hour = $var; + + return $this; + } + + /** + * Cost per traveled hour of the vehicle route. This cost is applied only to + * travel time taken by the route (i.e., that reported in + * [ShipmentRoute.transitions][google.cloud.optimization.v1.ShipmentRoute.transitions]), + * and excludes waiting time and visit time. + * + * Generated from protobuf field double cost_per_traveled_hour = 17; + * @return float + */ + public function getCostPerTraveledHour() + { + return $this->cost_per_traveled_hour; + } + + /** + * Cost per traveled hour of the vehicle route. This cost is applied only to + * travel time taken by the route (i.e., that reported in + * [ShipmentRoute.transitions][google.cloud.optimization.v1.ShipmentRoute.transitions]), + * and excludes waiting time and visit time. + * + * Generated from protobuf field double cost_per_traveled_hour = 17; + * @param float $var + * @return $this + */ + public function setCostPerTraveledHour($var) + { + GPBUtil::checkDouble($var); + $this->cost_per_traveled_hour = $var; + + return $this; + } + + /** + * Cost per kilometer of the vehicle route. This cost is applied to the + * distance reported in the + * [ShipmentRoute.transitions][google.cloud.optimization.v1.ShipmentRoute.transitions] + * and does not apply to any distance implicitly traveled from the + * `arrival_location` to the `departure_location` of a single `VisitRequest`. + * + * Generated from protobuf field double cost_per_kilometer = 18; + * @return float + */ + public function getCostPerKilometer() + { + return $this->cost_per_kilometer; + } + + /** + * Cost per kilometer of the vehicle route. This cost is applied to the + * distance reported in the + * [ShipmentRoute.transitions][google.cloud.optimization.v1.ShipmentRoute.transitions] + * and does not apply to any distance implicitly traveled from the + * `arrival_location` to the `departure_location` of a single `VisitRequest`. + * + * Generated from protobuf field double cost_per_kilometer = 18; + * @param float $var + * @return $this + */ + public function setCostPerKilometer($var) + { + GPBUtil::checkDouble($var); + $this->cost_per_kilometer = $var; + + return $this; + } + + /** + * Fixed cost applied if this vehicle is used to handle a shipment. + * + * Generated from protobuf field double fixed_cost = 19; + * @return float + */ + public function getFixedCost() + { + return $this->fixed_cost; + } + + /** + * Fixed cost applied if this vehicle is used to handle a shipment. + * + * Generated from protobuf field double fixed_cost = 19; + * @param float $var + * @return $this + */ + public function setFixedCost($var) + { + GPBUtil::checkDouble($var); + $this->fixed_cost = $var; + + return $this; + } + + /** + * This field only applies to vehicles when their route does not serve any + * shipments. It indicates if the vehicle should be considered as used or not + * in this case. + * If true, the vehicle goes from its start to its end location even if it + * doesn't serve any shipments, and time and distance costs resulting from its + * start --> end travel are taken into account. + * Otherwise, it doesn't travel from its start to its end location, and no + * `break_rule` or delay (from `TransitionAttributes`) are scheduled for this + * vehicle. In this case, the vehicle's `ShipmentRoute` doesn't contain any + * information except for the vehicle index and label. + * + * Generated from protobuf field bool used_if_route_is_empty = 20; + * @return bool + */ + public function getUsedIfRouteIsEmpty() + { + return $this->used_if_route_is_empty; + } + + /** + * This field only applies to vehicles when their route does not serve any + * shipments. It indicates if the vehicle should be considered as used or not + * in this case. + * If true, the vehicle goes from its start to its end location even if it + * doesn't serve any shipments, and time and distance costs resulting from its + * start --> end travel are taken into account. + * Otherwise, it doesn't travel from its start to its end location, and no + * `break_rule` or delay (from `TransitionAttributes`) are scheduled for this + * vehicle. In this case, the vehicle's `ShipmentRoute` doesn't contain any + * information except for the vehicle index and label. + * + * Generated from protobuf field bool used_if_route_is_empty = 20; + * @param bool $var + * @return $this + */ + public function setUsedIfRouteIsEmpty($var) + { + GPBUtil::checkBool($var); + $this->used_if_route_is_empty = $var; + + return $this; + } + + /** + * Limit applied to the total duration of the vehicle's route. In a given + * `OptimizeToursResponse`, the route duration of a vehicle is the + * difference between its `vehicle_end_time` and `vehicle_start_time`. + * + * Generated from protobuf field .google.cloud.optimization.v1.Vehicle.DurationLimit route_duration_limit = 21; + * @return \Google\Cloud\Optimization\V1\Vehicle\DurationLimit|null + */ + public function getRouteDurationLimit() + { + return $this->route_duration_limit; + } + + public function hasRouteDurationLimit() + { + return isset($this->route_duration_limit); + } + + public function clearRouteDurationLimit() + { + unset($this->route_duration_limit); + } + + /** + * Limit applied to the total duration of the vehicle's route. In a given + * `OptimizeToursResponse`, the route duration of a vehicle is the + * difference between its `vehicle_end_time` and `vehicle_start_time`. + * + * Generated from protobuf field .google.cloud.optimization.v1.Vehicle.DurationLimit route_duration_limit = 21; + * @param \Google\Cloud\Optimization\V1\Vehicle\DurationLimit $var + * @return $this + */ + public function setRouteDurationLimit($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Optimization\V1\Vehicle\DurationLimit::class); + $this->route_duration_limit = $var; + + return $this; + } + + /** + * Limit applied to the travel duration of the vehicle's route. In a given + * `OptimizeToursResponse`, the route travel duration is the sum of all its + * [transitions.travel_duration][google.cloud.optimization.v1.ShipmentRoute.Transition.travel_duration]. + * + * Generated from protobuf field .google.cloud.optimization.v1.Vehicle.DurationLimit travel_duration_limit = 22; + * @return \Google\Cloud\Optimization\V1\Vehicle\DurationLimit|null + */ + public function getTravelDurationLimit() + { + return $this->travel_duration_limit; + } + + public function hasTravelDurationLimit() + { + return isset($this->travel_duration_limit); + } + + public function clearTravelDurationLimit() + { + unset($this->travel_duration_limit); + } + + /** + * Limit applied to the travel duration of the vehicle's route. In a given + * `OptimizeToursResponse`, the route travel duration is the sum of all its + * [transitions.travel_duration][google.cloud.optimization.v1.ShipmentRoute.Transition.travel_duration]. + * + * Generated from protobuf field .google.cloud.optimization.v1.Vehicle.DurationLimit travel_duration_limit = 22; + * @param \Google\Cloud\Optimization\V1\Vehicle\DurationLimit $var + * @return $this + */ + public function setTravelDurationLimit($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Optimization\V1\Vehicle\DurationLimit::class); + $this->travel_duration_limit = $var; + + return $this; + } + + /** + * Limit applied to the total distance of the vehicle's route. In a given + * `OptimizeToursResponse`, the route distance is the sum of all its + * [transitions.travel_distance_meters][google.cloud.optimization.v1.ShipmentRoute.Transition.travel_distance_meters]. + * + * Generated from protobuf field .google.cloud.optimization.v1.DistanceLimit route_distance_limit = 23; + * @return \Google\Cloud\Optimization\V1\DistanceLimit|null + */ + public function getRouteDistanceLimit() + { + return $this->route_distance_limit; + } + + public function hasRouteDistanceLimit() + { + return isset($this->route_distance_limit); + } + + public function clearRouteDistanceLimit() + { + unset($this->route_distance_limit); + } + + /** + * Limit applied to the total distance of the vehicle's route. In a given + * `OptimizeToursResponse`, the route distance is the sum of all its + * [transitions.travel_distance_meters][google.cloud.optimization.v1.ShipmentRoute.Transition.travel_distance_meters]. + * + * Generated from protobuf field .google.cloud.optimization.v1.DistanceLimit route_distance_limit = 23; + * @param \Google\Cloud\Optimization\V1\DistanceLimit $var + * @return $this + */ + public function setRouteDistanceLimit($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Optimization\V1\DistanceLimit::class); + $this->route_distance_limit = $var; + + return $this; + } + + /** + * Specifies a map from visit_types strings to durations. The duration is time + * in addition to + * [VisitRequest.duration][google.cloud.optimization.v1.Shipment.VisitRequest.duration] + * to be taken at visits with the specified `visit_types`. This extra visit + * duration adds cost if `cost_per_hour` is specified. Keys (i.e. + * `visit_types`) cannot be empty strings. + * If a visit request has multiple types, a duration will be added for each + * type in the map. + * + * Generated from protobuf field map extra_visit_duration_for_visit_type = 24; + * @return \Google\Protobuf\Internal\MapField + */ + public function getExtraVisitDurationForVisitType() + { + return $this->extra_visit_duration_for_visit_type; + } + + /** + * Specifies a map from visit_types strings to durations. The duration is time + * in addition to + * [VisitRequest.duration][google.cloud.optimization.v1.Shipment.VisitRequest.duration] + * to be taken at visits with the specified `visit_types`. This extra visit + * duration adds cost if `cost_per_hour` is specified. Keys (i.e. + * `visit_types`) cannot be empty strings. + * If a visit request has multiple types, a duration will be added for each + * type in the map. + * + * Generated from protobuf field map extra_visit_duration_for_visit_type = 24; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setExtraVisitDurationForVisitType($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Duration::class); + $this->extra_visit_duration_for_visit_type = $arr; + + return $this; + } + + /** + * Describes the break schedule to be enforced on this vehicle. + * If empty, no breaks will be scheduled for this vehicle. + * + * Generated from protobuf field .google.cloud.optimization.v1.BreakRule break_rule = 25; + * @return \Google\Cloud\Optimization\V1\BreakRule|null + */ + public function getBreakRule() + { + return $this->break_rule; + } + + public function hasBreakRule() + { + return isset($this->break_rule); + } + + public function clearBreakRule() + { + unset($this->break_rule); + } + + /** + * Describes the break schedule to be enforced on this vehicle. + * If empty, no breaks will be scheduled for this vehicle. + * + * Generated from protobuf field .google.cloud.optimization.v1.BreakRule break_rule = 25; + * @param \Google\Cloud\Optimization\V1\BreakRule $var + * @return $this + */ + public function setBreakRule($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Optimization\V1\BreakRule::class); + $this->break_rule = $var; + + return $this; + } + + /** + * Specifies a label for this vehicle. This label is reported in the response + * as the `vehicle_label` of the corresponding + * [ShipmentRoute][google.cloud.optimization.v1.ShipmentRoute]. + * + * Generated from protobuf field string label = 27; + * @return string + */ + public function getLabel() + { + return $this->label; + } + + /** + * Specifies a label for this vehicle. This label is reported in the response + * as the `vehicle_label` of the corresponding + * [ShipmentRoute][google.cloud.optimization.v1.ShipmentRoute]. + * + * Generated from protobuf field string label = 27; + * @param string $var + * @return $this + */ + public function setLabel($var) + { + GPBUtil::checkString($var, True); + $this->label = $var; + + return $this; + } + + /** + * If true, `used_if_route_is_empty` must be false, and this vehicle will + * remain unused. + * If a shipment is performed by an ignored vehicle in + * `injected_first_solution_routes`, it is skipped in the first solution but + * is free to be performed in the response. + * If a shipment is performed by an ignored vehicle in + * `injected_solution_constraint` and any related pickup/delivery is + * constrained to remain on the vehicle (i.e., not relaxed to level + * `RELAX_ALL_AFTER_THRESHOLD`), it is skipped in the response. + * If a shipment has a non-empty `allowed_vehicle_indices` field and all of + * the allowed vehicles are ignored, it is skipped in the response. + * + * Generated from protobuf field bool ignore = 28; + * @return bool + */ + public function getIgnore() + { + return $this->ignore; + } + + /** + * If true, `used_if_route_is_empty` must be false, and this vehicle will + * remain unused. + * If a shipment is performed by an ignored vehicle in + * `injected_first_solution_routes`, it is skipped in the first solution but + * is free to be performed in the response. + * If a shipment is performed by an ignored vehicle in + * `injected_solution_constraint` and any related pickup/delivery is + * constrained to remain on the vehicle (i.e., not relaxed to level + * `RELAX_ALL_AFTER_THRESHOLD`), it is skipped in the response. + * If a shipment has a non-empty `allowed_vehicle_indices` field and all of + * the allowed vehicles are ignored, it is skipped in the response. + * + * Generated from protobuf field bool ignore = 28; + * @param bool $var + * @return $this + */ + public function setIgnore($var) + { + GPBUtil::checkBool($var); + $this->ignore = $var; + + return $this; + } + + /** + * Deprecated: No longer used. + * Indices in the `break_rule` field in the source + * [ShipmentModel][google.cloud.optimization.v1.ShipmentModel]. They + * correspond to break rules enforced on the vehicle. + * As of 2018/03, at most one rule index per vehicle can be specified. + * + * Generated from protobuf field repeated int32 break_rule_indices = 29 [deprecated = true]; + * @return \Google\Protobuf\Internal\RepeatedField + * @deprecated + */ + public function getBreakRuleIndices() + { + @trigger_error('break_rule_indices is deprecated.', E_USER_DEPRECATED); + return $this->break_rule_indices; + } + + /** + * Deprecated: No longer used. + * Indices in the `break_rule` field in the source + * [ShipmentModel][google.cloud.optimization.v1.ShipmentModel]. They + * correspond to break rules enforced on the vehicle. + * As of 2018/03, at most one rule index per vehicle can be specified. + * + * Generated from protobuf field repeated int32 break_rule_indices = 29 [deprecated = true]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + * @deprecated + */ + public function setBreakRuleIndices($var) + { + @trigger_error('break_rule_indices is deprecated.', E_USER_DEPRECATED); + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); + $this->break_rule_indices = $arr; + + return $this; + } + + /** + * Deprecated: Use + * [Vehicle.load_limits][google.cloud.optimization.v1.Vehicle.load_limits] + * instead. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.CapacityQuantity capacities = 13 [deprecated = true]; + * @return \Google\Protobuf\Internal\RepeatedField + * @deprecated + */ + public function getCapacities() + { + @trigger_error('capacities is deprecated.', E_USER_DEPRECATED); + return $this->capacities; + } + + /** + * Deprecated: Use + * [Vehicle.load_limits][google.cloud.optimization.v1.Vehicle.load_limits] + * instead. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.CapacityQuantity capacities = 13 [deprecated = true]; + * @param array<\Google\Cloud\Optimization\V1\CapacityQuantity>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + * @deprecated + */ + public function setCapacities($var) + { + @trigger_error('capacities is deprecated.', E_USER_DEPRECATED); + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\CapacityQuantity::class); + $this->capacities = $arr; + + return $this; + } + + /** + * Deprecated: Use + * [Vehicle.LoadLimit.start_load_interval][google.cloud.optimization.v1.Vehicle.LoadLimit.start_load_interval] + * instead. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.CapacityQuantityInterval start_load_intervals = 14 [deprecated = true]; + * @return \Google\Protobuf\Internal\RepeatedField + * @deprecated + */ + public function getStartLoadIntervals() + { + @trigger_error('start_load_intervals is deprecated.', E_USER_DEPRECATED); + return $this->start_load_intervals; + } + + /** + * Deprecated: Use + * [Vehicle.LoadLimit.start_load_interval][google.cloud.optimization.v1.Vehicle.LoadLimit.start_load_interval] + * instead. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.CapacityQuantityInterval start_load_intervals = 14 [deprecated = true]; + * @param array<\Google\Cloud\Optimization\V1\CapacityQuantityInterval>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + * @deprecated + */ + public function setStartLoadIntervals($var) + { + @trigger_error('start_load_intervals is deprecated.', E_USER_DEPRECATED); + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\CapacityQuantityInterval::class); + $this->start_load_intervals = $arr; + + return $this; + } + + /** + * Deprecated: Use + * [Vehicle.LoadLimit.end_load_interval][google.cloud.optimization.v1.Vehicle.LoadLimit.end_load_interval] + * instead. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.CapacityQuantityInterval end_load_intervals = 15 [deprecated = true]; + * @return \Google\Protobuf\Internal\RepeatedField + * @deprecated + */ + public function getEndLoadIntervals() + { + @trigger_error('end_load_intervals is deprecated.', E_USER_DEPRECATED); + return $this->end_load_intervals; + } + + /** + * Deprecated: Use + * [Vehicle.LoadLimit.end_load_interval][google.cloud.optimization.v1.Vehicle.LoadLimit.end_load_interval] + * instead. + * + * Generated from protobuf field repeated .google.cloud.optimization.v1.CapacityQuantityInterval end_load_intervals = 15 [deprecated = true]; + * @param array<\Google\Cloud\Optimization\V1\CapacityQuantityInterval>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + * @deprecated + */ + public function setEndLoadIntervals($var) + { + @trigger_error('end_load_intervals is deprecated.', E_USER_DEPRECATED); + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\CapacityQuantityInterval::class); + $this->end_load_intervals = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/Vehicle/DurationLimit.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/Vehicle/DurationLimit.php new file mode 100644 index 000000000000..0bfb4a37982b --- /dev/null +++ b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/Vehicle/DurationLimit.php @@ -0,0 +1,359 @@ +google.cloud.optimization.v1.Vehicle.DurationLimit + */ +class DurationLimit extends \Google\Protobuf\Internal\Message +{ + /** + * A hard limit constraining the duration to be at most max_duration. + * + * Generated from protobuf field .google.protobuf.Duration max_duration = 1; + */ + protected $max_duration = null; + /** + * A soft limit not enforcing a maximum duration limit, but when violated + * makes the route incur a cost. This cost adds up to other costs defined in + * the model, with the same unit. + * If defined, `soft_max_duration` must be nonnegative. If max_duration is + * also defined, `soft_max_duration` must be less than max_duration. + * + * Generated from protobuf field .google.protobuf.Duration soft_max_duration = 2; + */ + protected $soft_max_duration = null; + /** + * Cost per hour incurred if the `soft_max_duration` threshold is violated. + * The additional cost is 0 if the duration is under the threshold, + * otherwise the cost depends on the duration as follows: + * ``` + * cost_per_hour_after_soft_max * (duration - soft_max_duration) + * ``` + * The cost must be nonnegative. + * + * Generated from protobuf field optional double cost_per_hour_after_soft_max = 3; + */ + protected $cost_per_hour_after_soft_max = null; + /** + * A soft limit not enforcing a maximum duration limit, but when violated + * makes the route incur a cost, quadratic in the duration. This cost adds + * up to other costs defined in the model, with the same unit. + * If defined, `quadratic_soft_max_duration` must be nonnegative. If + * `max_duration` is also defined, `quadratic_soft_max_duration` must be + * less than `max_duration`, and the difference must be no larger than one + * day: + * `max_duration - quadratic_soft_max_duration <= 86400 seconds` + * + * Generated from protobuf field .google.protobuf.Duration quadratic_soft_max_duration = 4; + */ + protected $quadratic_soft_max_duration = null; + /** + * Cost per square hour incurred if the + * `quadratic_soft_max_duration` threshold is violated. + * The additional cost is 0 if the duration is under the threshold, + * otherwise the cost depends on the duration as follows: + * ``` + * cost_per_square_hour_after_quadratic_soft_max * + * (duration - quadratic_soft_max_duration)^2 + * ``` + * The cost must be nonnegative. + * + * Generated from protobuf field optional double cost_per_square_hour_after_quadratic_soft_max = 5; + */ + protected $cost_per_square_hour_after_quadratic_soft_max = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Duration $max_duration + * A hard limit constraining the duration to be at most max_duration. + * @type \Google\Protobuf\Duration $soft_max_duration + * A soft limit not enforcing a maximum duration limit, but when violated + * makes the route incur a cost. This cost adds up to other costs defined in + * the model, with the same unit. + * If defined, `soft_max_duration` must be nonnegative. If max_duration is + * also defined, `soft_max_duration` must be less than max_duration. + * @type float $cost_per_hour_after_soft_max + * Cost per hour incurred if the `soft_max_duration` threshold is violated. + * The additional cost is 0 if the duration is under the threshold, + * otherwise the cost depends on the duration as follows: + * ``` + * cost_per_hour_after_soft_max * (duration - soft_max_duration) + * ``` + * The cost must be nonnegative. + * @type \Google\Protobuf\Duration $quadratic_soft_max_duration + * A soft limit not enforcing a maximum duration limit, but when violated + * makes the route incur a cost, quadratic in the duration. This cost adds + * up to other costs defined in the model, with the same unit. + * If defined, `quadratic_soft_max_duration` must be nonnegative. If + * `max_duration` is also defined, `quadratic_soft_max_duration` must be + * less than `max_duration`, and the difference must be no larger than one + * day: + * `max_duration - quadratic_soft_max_duration <= 86400 seconds` + * @type float $cost_per_square_hour_after_quadratic_soft_max + * Cost per square hour incurred if the + * `quadratic_soft_max_duration` threshold is violated. + * The additional cost is 0 if the duration is under the threshold, + * otherwise the cost depends on the duration as follows: + * ``` + * cost_per_square_hour_after_quadratic_soft_max * + * (duration - quadratic_soft_max_duration)^2 + * ``` + * The cost must be nonnegative. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); + parent::__construct($data); + } + + /** + * A hard limit constraining the duration to be at most max_duration. + * + * Generated from protobuf field .google.protobuf.Duration max_duration = 1; + * @return \Google\Protobuf\Duration|null + */ + public function getMaxDuration() + { + return $this->max_duration; + } + + public function hasMaxDuration() + { + return isset($this->max_duration); + } + + public function clearMaxDuration() + { + unset($this->max_duration); + } + + /** + * A hard limit constraining the duration to be at most max_duration. + * + * Generated from protobuf field .google.protobuf.Duration max_duration = 1; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setMaxDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->max_duration = $var; + + return $this; + } + + /** + * A soft limit not enforcing a maximum duration limit, but when violated + * makes the route incur a cost. This cost adds up to other costs defined in + * the model, with the same unit. + * If defined, `soft_max_duration` must be nonnegative. If max_duration is + * also defined, `soft_max_duration` must be less than max_duration. + * + * Generated from protobuf field .google.protobuf.Duration soft_max_duration = 2; + * @return \Google\Protobuf\Duration|null + */ + public function getSoftMaxDuration() + { + return $this->soft_max_duration; + } + + public function hasSoftMaxDuration() + { + return isset($this->soft_max_duration); + } + + public function clearSoftMaxDuration() + { + unset($this->soft_max_duration); + } + + /** + * A soft limit not enforcing a maximum duration limit, but when violated + * makes the route incur a cost. This cost adds up to other costs defined in + * the model, with the same unit. + * If defined, `soft_max_duration` must be nonnegative. If max_duration is + * also defined, `soft_max_duration` must be less than max_duration. + * + * Generated from protobuf field .google.protobuf.Duration soft_max_duration = 2; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setSoftMaxDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->soft_max_duration = $var; + + return $this; + } + + /** + * Cost per hour incurred if the `soft_max_duration` threshold is violated. + * The additional cost is 0 if the duration is under the threshold, + * otherwise the cost depends on the duration as follows: + * ``` + * cost_per_hour_after_soft_max * (duration - soft_max_duration) + * ``` + * The cost must be nonnegative. + * + * Generated from protobuf field optional double cost_per_hour_after_soft_max = 3; + * @return float + */ + public function getCostPerHourAfterSoftMax() + { + return isset($this->cost_per_hour_after_soft_max) ? $this->cost_per_hour_after_soft_max : 0.0; + } + + public function hasCostPerHourAfterSoftMax() + { + return isset($this->cost_per_hour_after_soft_max); + } + + public function clearCostPerHourAfterSoftMax() + { + unset($this->cost_per_hour_after_soft_max); + } + + /** + * Cost per hour incurred if the `soft_max_duration` threshold is violated. + * The additional cost is 0 if the duration is under the threshold, + * otherwise the cost depends on the duration as follows: + * ``` + * cost_per_hour_after_soft_max * (duration - soft_max_duration) + * ``` + * The cost must be nonnegative. + * + * Generated from protobuf field optional double cost_per_hour_after_soft_max = 3; + * @param float $var + * @return $this + */ + public function setCostPerHourAfterSoftMax($var) + { + GPBUtil::checkDouble($var); + $this->cost_per_hour_after_soft_max = $var; + + return $this; + } + + /** + * A soft limit not enforcing a maximum duration limit, but when violated + * makes the route incur a cost, quadratic in the duration. This cost adds + * up to other costs defined in the model, with the same unit. + * If defined, `quadratic_soft_max_duration` must be nonnegative. If + * `max_duration` is also defined, `quadratic_soft_max_duration` must be + * less than `max_duration`, and the difference must be no larger than one + * day: + * `max_duration - quadratic_soft_max_duration <= 86400 seconds` + * + * Generated from protobuf field .google.protobuf.Duration quadratic_soft_max_duration = 4; + * @return \Google\Protobuf\Duration|null + */ + public function getQuadraticSoftMaxDuration() + { + return $this->quadratic_soft_max_duration; + } + + public function hasQuadraticSoftMaxDuration() + { + return isset($this->quadratic_soft_max_duration); + } + + public function clearQuadraticSoftMaxDuration() + { + unset($this->quadratic_soft_max_duration); + } + + /** + * A soft limit not enforcing a maximum duration limit, but when violated + * makes the route incur a cost, quadratic in the duration. This cost adds + * up to other costs defined in the model, with the same unit. + * If defined, `quadratic_soft_max_duration` must be nonnegative. If + * `max_duration` is also defined, `quadratic_soft_max_duration` must be + * less than `max_duration`, and the difference must be no larger than one + * day: + * `max_duration - quadratic_soft_max_duration <= 86400 seconds` + * + * Generated from protobuf field .google.protobuf.Duration quadratic_soft_max_duration = 4; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setQuadraticSoftMaxDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->quadratic_soft_max_duration = $var; + + return $this; + } + + /** + * Cost per square hour incurred if the + * `quadratic_soft_max_duration` threshold is violated. + * The additional cost is 0 if the duration is under the threshold, + * otherwise the cost depends on the duration as follows: + * ``` + * cost_per_square_hour_after_quadratic_soft_max * + * (duration - quadratic_soft_max_duration)^2 + * ``` + * The cost must be nonnegative. + * + * Generated from protobuf field optional double cost_per_square_hour_after_quadratic_soft_max = 5; + * @return float + */ + public function getCostPerSquareHourAfterQuadraticSoftMax() + { + return isset($this->cost_per_square_hour_after_quadratic_soft_max) ? $this->cost_per_square_hour_after_quadratic_soft_max : 0.0; + } + + public function hasCostPerSquareHourAfterQuadraticSoftMax() + { + return isset($this->cost_per_square_hour_after_quadratic_soft_max); + } + + public function clearCostPerSquareHourAfterQuadraticSoftMax() + { + unset($this->cost_per_square_hour_after_quadratic_soft_max); + } + + /** + * Cost per square hour incurred if the + * `quadratic_soft_max_duration` threshold is violated. + * The additional cost is 0 if the duration is under the threshold, + * otherwise the cost depends on the duration as follows: + * ``` + * cost_per_square_hour_after_quadratic_soft_max * + * (duration - quadratic_soft_max_duration)^2 + * ``` + * The cost must be nonnegative. + * + * Generated from protobuf field optional double cost_per_square_hour_after_quadratic_soft_max = 5; + * @param float $var + * @return $this + */ + public function setCostPerSquareHourAfterQuadraticSoftMax($var) + { + GPBUtil::checkDouble($var); + $this->cost_per_square_hour_after_quadratic_soft_max = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(DurationLimit::class, \Google\Cloud\Optimization\V1\Vehicle_DurationLimit::class); + diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/Vehicle/LoadLimit.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/Vehicle/LoadLimit.php new file mode 100644 index 000000000000..6f2a88d5ecac --- /dev/null +++ b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/Vehicle/LoadLimit.php @@ -0,0 +1,270 @@ +google.cloud.optimization.v1.Vehicle.LoadLimit + */ +class LoadLimit extends \Google\Protobuf\Internal\Message +{ + /** + * The maximum acceptable amount of load. + * + * Generated from protobuf field optional int64 max_load = 1; + */ + protected $max_load = null; + /** + * A soft limit of the load. See + * [cost_per_unit_above_soft_max][google.cloud.optimization.v1.Vehicle.LoadLimit.cost_per_unit_above_soft_max]. + * + * Generated from protobuf field int64 soft_max_load = 2; + */ + protected $soft_max_load = 0; + /** + * If the load ever exceeds + * [soft_max_load][google.cloud.optimization.v1.Vehicle.LoadLimit.soft_max_load] + * along this vehicle's route, the following cost penalty applies (only once + * per vehicle): (load - + * [soft_max_load][google.cloud.optimization.v1.Vehicle.LoadLimit.soft_max_load]) + * * [cost_per_unit_above_soft_max][google.cloud.optimization.v1.Vehicle.LoadLimit.cost_per_unit_above_soft_max]. All costs + * add up and must be in the same unit as + * [Shipment.penalty_cost][google.cloud.optimization.v1.Shipment.penalty_cost]. + * + * Generated from protobuf field double cost_per_unit_above_soft_max = 3; + */ + protected $cost_per_unit_above_soft_max = 0.0; + /** + * The acceptable load interval of the vehicle at the start of the route. + * + * Generated from protobuf field .google.cloud.optimization.v1.Vehicle.LoadLimit.Interval start_load_interval = 4; + */ + protected $start_load_interval = null; + /** + * The acceptable load interval of the vehicle at the end of the route. + * + * Generated from protobuf field .google.cloud.optimization.v1.Vehicle.LoadLimit.Interval end_load_interval = 5; + */ + protected $end_load_interval = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $max_load + * The maximum acceptable amount of load. + * @type int|string $soft_max_load + * A soft limit of the load. See + * [cost_per_unit_above_soft_max][google.cloud.optimization.v1.Vehicle.LoadLimit.cost_per_unit_above_soft_max]. + * @type float $cost_per_unit_above_soft_max + * If the load ever exceeds + * [soft_max_load][google.cloud.optimization.v1.Vehicle.LoadLimit.soft_max_load] + * along this vehicle's route, the following cost penalty applies (only once + * per vehicle): (load - + * [soft_max_load][google.cloud.optimization.v1.Vehicle.LoadLimit.soft_max_load]) + * * [cost_per_unit_above_soft_max][google.cloud.optimization.v1.Vehicle.LoadLimit.cost_per_unit_above_soft_max]. All costs + * add up and must be in the same unit as + * [Shipment.penalty_cost][google.cloud.optimization.v1.Shipment.penalty_cost]. + * @type \Google\Cloud\Optimization\V1\Vehicle\LoadLimit\Interval $start_load_interval + * The acceptable load interval of the vehicle at the start of the route. + * @type \Google\Cloud\Optimization\V1\Vehicle\LoadLimit\Interval $end_load_interval + * The acceptable load interval of the vehicle at the end of the route. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); + parent::__construct($data); + } + + /** + * The maximum acceptable amount of load. + * + * Generated from protobuf field optional int64 max_load = 1; + * @return int|string + */ + public function getMaxLoad() + { + return isset($this->max_load) ? $this->max_load : 0; + } + + public function hasMaxLoad() + { + return isset($this->max_load); + } + + public function clearMaxLoad() + { + unset($this->max_load); + } + + /** + * The maximum acceptable amount of load. + * + * Generated from protobuf field optional int64 max_load = 1; + * @param int|string $var + * @return $this + */ + public function setMaxLoad($var) + { + GPBUtil::checkInt64($var); + $this->max_load = $var; + + return $this; + } + + /** + * A soft limit of the load. See + * [cost_per_unit_above_soft_max][google.cloud.optimization.v1.Vehicle.LoadLimit.cost_per_unit_above_soft_max]. + * + * Generated from protobuf field int64 soft_max_load = 2; + * @return int|string + */ + public function getSoftMaxLoad() + { + return $this->soft_max_load; + } + + /** + * A soft limit of the load. See + * [cost_per_unit_above_soft_max][google.cloud.optimization.v1.Vehicle.LoadLimit.cost_per_unit_above_soft_max]. + * + * Generated from protobuf field int64 soft_max_load = 2; + * @param int|string $var + * @return $this + */ + public function setSoftMaxLoad($var) + { + GPBUtil::checkInt64($var); + $this->soft_max_load = $var; + + return $this; + } + + /** + * If the load ever exceeds + * [soft_max_load][google.cloud.optimization.v1.Vehicle.LoadLimit.soft_max_load] + * along this vehicle's route, the following cost penalty applies (only once + * per vehicle): (load - + * [soft_max_load][google.cloud.optimization.v1.Vehicle.LoadLimit.soft_max_load]) + * * [cost_per_unit_above_soft_max][google.cloud.optimization.v1.Vehicle.LoadLimit.cost_per_unit_above_soft_max]. All costs + * add up and must be in the same unit as + * [Shipment.penalty_cost][google.cloud.optimization.v1.Shipment.penalty_cost]. + * + * Generated from protobuf field double cost_per_unit_above_soft_max = 3; + * @return float + */ + public function getCostPerUnitAboveSoftMax() + { + return $this->cost_per_unit_above_soft_max; + } + + /** + * If the load ever exceeds + * [soft_max_load][google.cloud.optimization.v1.Vehicle.LoadLimit.soft_max_load] + * along this vehicle's route, the following cost penalty applies (only once + * per vehicle): (load - + * [soft_max_load][google.cloud.optimization.v1.Vehicle.LoadLimit.soft_max_load]) + * * [cost_per_unit_above_soft_max][google.cloud.optimization.v1.Vehicle.LoadLimit.cost_per_unit_above_soft_max]. All costs + * add up and must be in the same unit as + * [Shipment.penalty_cost][google.cloud.optimization.v1.Shipment.penalty_cost]. + * + * Generated from protobuf field double cost_per_unit_above_soft_max = 3; + * @param float $var + * @return $this + */ + public function setCostPerUnitAboveSoftMax($var) + { + GPBUtil::checkDouble($var); + $this->cost_per_unit_above_soft_max = $var; + + return $this; + } + + /** + * The acceptable load interval of the vehicle at the start of the route. + * + * Generated from protobuf field .google.cloud.optimization.v1.Vehicle.LoadLimit.Interval start_load_interval = 4; + * @return \Google\Cloud\Optimization\V1\Vehicle\LoadLimit\Interval|null + */ + public function getStartLoadInterval() + { + return $this->start_load_interval; + } + + public function hasStartLoadInterval() + { + return isset($this->start_load_interval); + } + + public function clearStartLoadInterval() + { + unset($this->start_load_interval); + } + + /** + * The acceptable load interval of the vehicle at the start of the route. + * + * Generated from protobuf field .google.cloud.optimization.v1.Vehicle.LoadLimit.Interval start_load_interval = 4; + * @param \Google\Cloud\Optimization\V1\Vehicle\LoadLimit\Interval $var + * @return $this + */ + public function setStartLoadInterval($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Optimization\V1\Vehicle\LoadLimit\Interval::class); + $this->start_load_interval = $var; + + return $this; + } + + /** + * The acceptable load interval of the vehicle at the end of the route. + * + * Generated from protobuf field .google.cloud.optimization.v1.Vehicle.LoadLimit.Interval end_load_interval = 5; + * @return \Google\Cloud\Optimization\V1\Vehicle\LoadLimit\Interval|null + */ + public function getEndLoadInterval() + { + return $this->end_load_interval; + } + + public function hasEndLoadInterval() + { + return isset($this->end_load_interval); + } + + public function clearEndLoadInterval() + { + unset($this->end_load_interval); + } + + /** + * The acceptable load interval of the vehicle at the end of the route. + * + * Generated from protobuf field .google.cloud.optimization.v1.Vehicle.LoadLimit.Interval end_load_interval = 5; + * @param \Google\Cloud\Optimization\V1\Vehicle\LoadLimit\Interval $var + * @return $this + */ + public function setEndLoadInterval($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Optimization\V1\Vehicle\LoadLimit\Interval::class); + $this->end_load_interval = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(LoadLimit::class, \Google\Cloud\Optimization\V1\Vehicle_LoadLimit::class); + diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/Vehicle/LoadLimit/Interval.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/Vehicle/LoadLimit/Interval.php new file mode 100644 index 000000000000..18061c0b196f --- /dev/null +++ b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/Vehicle/LoadLimit/Interval.php @@ -0,0 +1,150 @@ +google.cloud.optimization.v1.Vehicle.LoadLimit.Interval + */ +class Interval extends \Google\Protobuf\Internal\Message +{ + /** + * A minimum acceptable load. Must be ≥ 0. + * If they're both specified, + * [min][google.cloud.optimization.v1.Vehicle.LoadLimit.Interval.min] must + * be ≤ + * [max][google.cloud.optimization.v1.Vehicle.LoadLimit.Interval.max]. + * + * Generated from protobuf field int64 min = 1; + */ + protected $min = 0; + /** + * A maximum acceptable load. Must be ≥ 0. If unspecified, the maximum + * load is unrestricted by this message. + * If they're both specified, + * [min][google.cloud.optimization.v1.Vehicle.LoadLimit.Interval.min] must + * be ≤ + * [max][google.cloud.optimization.v1.Vehicle.LoadLimit.Interval.max]. + * + * Generated from protobuf field optional int64 max = 2; + */ + protected $max = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $min + * A minimum acceptable load. Must be ≥ 0. + * If they're both specified, + * [min][google.cloud.optimization.v1.Vehicle.LoadLimit.Interval.min] must + * be ≤ + * [max][google.cloud.optimization.v1.Vehicle.LoadLimit.Interval.max]. + * @type int|string $max + * A maximum acceptable load. Must be ≥ 0. If unspecified, the maximum + * load is unrestricted by this message. + * If they're both specified, + * [min][google.cloud.optimization.v1.Vehicle.LoadLimit.Interval.min] must + * be ≤ + * [max][google.cloud.optimization.v1.Vehicle.LoadLimit.Interval.max]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); + parent::__construct($data); + } + + /** + * A minimum acceptable load. Must be ≥ 0. + * If they're both specified, + * [min][google.cloud.optimization.v1.Vehicle.LoadLimit.Interval.min] must + * be ≤ + * [max][google.cloud.optimization.v1.Vehicle.LoadLimit.Interval.max]. + * + * Generated from protobuf field int64 min = 1; + * @return int|string + */ + public function getMin() + { + return $this->min; + } + + /** + * A minimum acceptable load. Must be ≥ 0. + * If they're both specified, + * [min][google.cloud.optimization.v1.Vehicle.LoadLimit.Interval.min] must + * be ≤ + * [max][google.cloud.optimization.v1.Vehicle.LoadLimit.Interval.max]. + * + * Generated from protobuf field int64 min = 1; + * @param int|string $var + * @return $this + */ + public function setMin($var) + { + GPBUtil::checkInt64($var); + $this->min = $var; + + return $this; + } + + /** + * A maximum acceptable load. Must be ≥ 0. If unspecified, the maximum + * load is unrestricted by this message. + * If they're both specified, + * [min][google.cloud.optimization.v1.Vehicle.LoadLimit.Interval.min] must + * be ≤ + * [max][google.cloud.optimization.v1.Vehicle.LoadLimit.Interval.max]. + * + * Generated from protobuf field optional int64 max = 2; + * @return int|string + */ + public function getMax() + { + return isset($this->max) ? $this->max : 0; + } + + public function hasMax() + { + return isset($this->max); + } + + public function clearMax() + { + unset($this->max); + } + + /** + * A maximum acceptable load. Must be ≥ 0. If unspecified, the maximum + * load is unrestricted by this message. + * If they're both specified, + * [min][google.cloud.optimization.v1.Vehicle.LoadLimit.Interval.min] must + * be ≤ + * [max][google.cloud.optimization.v1.Vehicle.LoadLimit.Interval.max]. + * + * Generated from protobuf field optional int64 max = 2; + * @param int|string $var + * @return $this + */ + public function setMax($var) + { + GPBUtil::checkInt64($var); + $this->max = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Interval::class, \Google\Cloud\Optimization\V1\Vehicle_LoadLimit_Interval::class); + diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/Vehicle/TravelMode.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/Vehicle/TravelMode.php new file mode 100644 index 000000000000..122a2cee877e --- /dev/null +++ b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/Vehicle/TravelMode.php @@ -0,0 +1,67 @@ +google.cloud.optimization.v1.Vehicle.TravelMode + */ +class TravelMode +{ + /** + * Unspecified travel mode, equivalent to `DRIVING`. + * + * Generated from protobuf enum TRAVEL_MODE_UNSPECIFIED = 0; + */ + const TRAVEL_MODE_UNSPECIFIED = 0; + /** + * Travel mode corresponding to driving directions (car, ...). + * + * Generated from protobuf enum DRIVING = 1; + */ + const DRIVING = 1; + /** + * Travel mode corresponding to walking directions. + * + * Generated from protobuf enum WALKING = 2; + */ + const WALKING = 2; + + private static $valueToName = [ + self::TRAVEL_MODE_UNSPECIFIED => 'TRAVEL_MODE_UNSPECIFIED', + self::DRIVING => 'DRIVING', + self::WALKING => 'WALKING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(TravelMode::class, \Google\Cloud\Optimization\V1\Vehicle_TravelMode::class); + diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/Vehicle/UnloadingPolicy.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/Vehicle/UnloadingPolicy.php new file mode 100644 index 000000000000..eaee7ca2ca7c --- /dev/null +++ b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/Vehicle/UnloadingPolicy.php @@ -0,0 +1,68 @@ +google.cloud.optimization.v1.Vehicle.UnloadingPolicy + */ +class UnloadingPolicy +{ + /** + * Unspecified unloading policy; deliveries must just occur after their + * corresponding pickups. + * + * Generated from protobuf enum UNLOADING_POLICY_UNSPECIFIED = 0; + */ + const UNLOADING_POLICY_UNSPECIFIED = 0; + /** + * Deliveries must occur in reverse order of pickups + * + * Generated from protobuf enum LAST_IN_FIRST_OUT = 1; + */ + const LAST_IN_FIRST_OUT = 1; + /** + * Deliveries must occur in the same order as pickups + * + * Generated from protobuf enum FIRST_IN_FIRST_OUT = 2; + */ + const FIRST_IN_FIRST_OUT = 2; + + private static $valueToName = [ + self::UNLOADING_POLICY_UNSPECIFIED => 'UNLOADING_POLICY_UNSPECIFIED', + self::LAST_IN_FIRST_OUT => 'LAST_IN_FIRST_OUT', + self::FIRST_IN_FIRST_OUT => 'FIRST_IN_FIRST_OUT', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(UnloadingPolicy::class, \Google\Cloud\Optimization\V1\Vehicle_UnloadingPolicy::class); + diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/Waypoint.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/Waypoint.php new file mode 100644 index 000000000000..3c51fbabc2fe --- /dev/null +++ b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/Waypoint.php @@ -0,0 +1,166 @@ +google.cloud.optimization.v1.Waypoint + */ +class Waypoint extends \Google\Protobuf\Internal\Message +{ + /** + * Indicates that the location of this waypoint is meant to have a preference + * for the vehicle to stop at a particular side of road. When you set this + * value, the route will pass through the location so that the vehicle can + * stop at the side of road that the location is biased towards from the + * center of the road. This option works only for the 'DRIVING' travel mode, + * and when the 'location_type' is set to 'location'. + * + * Generated from protobuf field bool side_of_road = 3; + */ + protected $side_of_road = false; + protected $location_type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Optimization\V1\Location $location + * A point specified using geographic coordinates, including an optional + * heading. + * @type string $place_id + * The POI Place ID associated with the waypoint. + * @type bool $side_of_road + * Indicates that the location of this waypoint is meant to have a preference + * for the vehicle to stop at a particular side of road. When you set this + * value, the route will pass through the location so that the vehicle can + * stop at the side of road that the location is biased towards from the + * center of the road. This option works only for the 'DRIVING' travel mode, + * and when the 'location_type' is set to 'location'. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); + parent::__construct($data); + } + + /** + * A point specified using geographic coordinates, including an optional + * heading. + * + * Generated from protobuf field .google.cloud.optimization.v1.Location location = 1; + * @return \Google\Cloud\Optimization\V1\Location|null + */ + public function getLocation() + { + return $this->readOneof(1); + } + + public function hasLocation() + { + return $this->hasOneof(1); + } + + /** + * A point specified using geographic coordinates, including an optional + * heading. + * + * Generated from protobuf field .google.cloud.optimization.v1.Location location = 1; + * @param \Google\Cloud\Optimization\V1\Location $var + * @return $this + */ + public function setLocation($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Optimization\V1\Location::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * The POI Place ID associated with the waypoint. + * + * Generated from protobuf field string place_id = 2; + * @return string + */ + public function getPlaceId() + { + return $this->readOneof(2); + } + + public function hasPlaceId() + { + return $this->hasOneof(2); + } + + /** + * The POI Place ID associated with the waypoint. + * + * Generated from protobuf field string place_id = 2; + * @param string $var + * @return $this + */ + public function setPlaceId($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Indicates that the location of this waypoint is meant to have a preference + * for the vehicle to stop at a particular side of road. When you set this + * value, the route will pass through the location so that the vehicle can + * stop at the side of road that the location is biased towards from the + * center of the road. This option works only for the 'DRIVING' travel mode, + * and when the 'location_type' is set to 'location'. + * + * Generated from protobuf field bool side_of_road = 3; + * @return bool + */ + public function getSideOfRoad() + { + return $this->side_of_road; + } + + /** + * Indicates that the location of this waypoint is meant to have a preference + * for the vehicle to stop at a particular side of road. When you set this + * value, the route will pass through the location so that the vehicle can + * stop at the side of road that the location is biased towards from the + * center of the road. This option works only for the 'DRIVING' travel mode, + * and when the 'location_type' is set to 'location'. + * + * Generated from protobuf field bool side_of_road = 3; + * @param bool $var + * @return $this + */ + public function setSideOfRoad($var) + { + GPBUtil::checkBool($var); + $this->side_of_road = $var; + + return $this; + } + + /** + * @return string + */ + public function getLocationType() + { + return $this->whichOneof("location_type"); + } + +} + diff --git a/owl-bot-staging/Optimization/v1/samples/V1/FleetRoutingClient/batch_optimize_tours.php b/owl-bot-staging/Optimization/v1/samples/V1/FleetRoutingClient/batch_optimize_tours.php new file mode 100644 index 000000000000..83ea8a5c60c2 --- /dev/null +++ b/owl-bot-staging/Optimization/v1/samples/V1/FleetRoutingClient/batch_optimize_tours.php @@ -0,0 +1,105 @@ +setInputConfig($modelConfigsInputConfig) + ->setOutputConfig($modelConfigsOutputConfig); + $modelConfigs = [$asyncModelConfig,]; + $request = (new BatchOptimizeToursRequest()) + ->setParent($parent) + ->setModelConfigs($modelConfigs); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $fleetRoutingClient->batchOptimizeTours($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var BatchOptimizeToursResponse $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $parent = '[PARENT]'; + + batch_optimize_tours_sample($parent); +} +// [END cloudoptimization_v1_generated_FleetRouting_BatchOptimizeTours_sync] diff --git a/owl-bot-staging/Optimization/v1/samples/V1/FleetRoutingClient/optimize_tours.php b/owl-bot-staging/Optimization/v1/samples/V1/FleetRoutingClient/optimize_tours.php new file mode 100644 index 000000000000..331506093b2d --- /dev/null +++ b/owl-bot-staging/Optimization/v1/samples/V1/FleetRoutingClient/optimize_tours.php @@ -0,0 +1,87 @@ +setParent($parent); + + // Call the API and handle any network failures. + try { + /** @var OptimizeToursResponse $response */ + $response = $fleetRoutingClient->optimizeTours($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $parent = '[PARENT]'; + + optimize_tours_sample($parent); +} +// [END cloudoptimization_v1_generated_FleetRouting_OptimizeTours_sync] diff --git a/owl-bot-staging/Optimization/v1/src/V1/Client/FleetRoutingClient.php b/owl-bot-staging/Optimization/v1/src/V1/Client/FleetRoutingClient.php new file mode 100644 index 000000000000..5f73931e2f21 --- /dev/null +++ b/owl-bot-staging/Optimization/v1/src/V1/Client/FleetRoutingClient.php @@ -0,0 +1,314 @@ + batchOptimizeToursAsync(BatchOptimizeToursRequest $request, array $optionalArgs = []) + * @method PromiseInterface optimizeToursAsync(OptimizeToursRequest $request, array $optionalArgs = []) + */ +final class FleetRoutingClient +{ + use GapicClientTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.optimization.v1.FleetRouting'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'cloudoptimization.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'cloudoptimization.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/fleet_routing_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/fleet_routing_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/fleet_routing_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/fleet_routing_rest_client_config.php', + ], + ], + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Create the default operation client for the service. + * + * @param array $options ClientOptions for the client. + * + * @return OperationsClient + */ + private function createOperationsClient(array $options) + { + // Unset client-specific configuration options + unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); + + if (isset($options['operationsClient'])) { + return $options['operationsClient']; + } + + return new OperationsClient($options); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'cloudoptimization.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Optimizes vehicle tours for one or more `OptimizeToursRequest` + * messages as a batch. + * + * This method is a Long Running Operation (LRO). The inputs for optimization + * (`OptimizeToursRequest` messages) and outputs (`OptimizeToursResponse` + * messages) are read/written from/to Cloud Storage in user-specified + * format. Like the `OptimizeTours` method, each `OptimizeToursRequest` + * contains a `ShipmentModel` and returns an `OptimizeToursResponse` + * containing `ShipmentRoute`s, which are a set of routes to be performed by + * vehicles minimizing the overall cost. + * + * The async variant is {@see FleetRoutingClient::batchOptimizeToursAsync()} . + * + * @example samples/V1/FleetRoutingClient/batch_optimize_tours.php + * + * @param BatchOptimizeToursRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function batchOptimizeTours(BatchOptimizeToursRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('BatchOptimizeTours', $request, $callOptions)->wait(); + } + + /** + * Sends an `OptimizeToursRequest` containing a `ShipmentModel` and returns an + * `OptimizeToursResponse` containing `ShipmentRoute`s, which are a set of + * routes to be performed by vehicles minimizing the overall cost. + * + * A `ShipmentModel` model consists mainly of `Shipment`s that need to be + * carried out and `Vehicle`s that can be used to transport the `Shipment`s. + * The `ShipmentRoute`s assign `Shipment`s to `Vehicle`s. More specifically, + * they assign a series of `Visit`s to each vehicle, where a `Visit` + * corresponds to a `VisitRequest`, which is a pickup or delivery for a + * `Shipment`. + * + * The goal is to provide an assignment of `ShipmentRoute`s to `Vehicle`s that + * minimizes the total cost where cost has many components defined in the + * `ShipmentModel`. + * + * The async variant is {@see FleetRoutingClient::optimizeToursAsync()} . + * + * @example samples/V1/FleetRoutingClient/optimize_tours.php + * + * @param OptimizeToursRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OptimizeToursResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function optimizeTours(OptimizeToursRequest $request, array $callOptions = []): OptimizeToursResponse + { + return $this->startApiCall('OptimizeTours', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/Optimization/v1/src/V1/gapic_metadata.json b/owl-bot-staging/Optimization/v1/src/V1/gapic_metadata.json new file mode 100644 index 000000000000..007133ea9599 --- /dev/null +++ b/owl-bot-staging/Optimization/v1/src/V1/gapic_metadata.json @@ -0,0 +1,28 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.cloud.optimization.v1", + "libraryPackage": "Google\\Cloud\\Optimization\\V1", + "services": { + "FleetRouting": { + "clients": { + "grpc": { + "libraryClient": "FleetRoutingGapicClient", + "rpcs": { + "BatchOptimizeTours": { + "methods": [ + "batchOptimizeTours" + ] + }, + "OptimizeTours": { + "methods": [ + "optimizeTours" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/Optimization/v1/src/V1/resources/fleet_routing_client_config.json b/owl-bot-staging/Optimization/v1/src/V1/resources/fleet_routing_client_config.json new file mode 100644 index 000000000000..b86bf37650c5 --- /dev/null +++ b/owl-bot-staging/Optimization/v1/src/V1/resources/fleet_routing_client_config.json @@ -0,0 +1,56 @@ +{ + "interfaces": { + "google.cloud.optimization.v1.FleetRouting": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE" + ], + "retry_policy_2_codes": [ + "UNAVAILABLE" + ] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 10000, + "initial_rpc_timeout_millis": 3600000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 3600000, + "total_timeout_millis": 3600000 + }, + "retry_policy_2_params": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 10000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "BatchOptimizeTours": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" + }, + "OptimizeTours": { + "timeout_millis": 3600000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/Optimization/v1/src/V1/resources/fleet_routing_descriptor_config.php b/owl-bot-staging/Optimization/v1/src/V1/resources/fleet_routing_descriptor_config.php new file mode 100644 index 000000000000..e640229844c2 --- /dev/null +++ b/owl-bot-staging/Optimization/v1/src/V1/resources/fleet_routing_descriptor_config.php @@ -0,0 +1,59 @@ + [ + 'google.cloud.optimization.v1.FleetRouting' => [ + 'BatchOptimizeTours' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Optimization\V1\BatchOptimizeToursResponse', + 'metadataReturnType' => '\Google\Cloud\Optimization\V1\AsyncModelMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'OptimizeTours' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Optimization\V1\OptimizeToursResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + ], + ], +]; diff --git a/owl-bot-staging/Optimization/v1/src/V1/resources/fleet_routing_rest_client_config.php b/owl-bot-staging/Optimization/v1/src/V1/resources/fleet_routing_rest_client_config.php new file mode 100644 index 000000000000..770f33a8d635 --- /dev/null +++ b/owl-bot-staging/Optimization/v1/src/V1/resources/fleet_routing_rest_client_config.php @@ -0,0 +1,86 @@ + [ + 'google.cloud.optimization.v1.FleetRouting' => [ + 'BatchOptimizeTours' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}:batchOptimizeTours', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*}:batchOptimizeTours', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'OptimizeTours' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}:optimizeTours', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*}:optimizeTours', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Optimization/v1/tests/Unit/V1/Client/FleetRoutingClientTest.php b/owl-bot-staging/Optimization/v1/tests/Unit/V1/Client/FleetRoutingClientTest.php new file mode 100644 index 000000000000..7a8102d9d6c3 --- /dev/null +++ b/owl-bot-staging/Optimization/v1/tests/Unit/V1/Client/FleetRoutingClientTest.php @@ -0,0 +1,329 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return FleetRoutingClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new FleetRoutingClient($options); + } + + /** @test */ + public function batchOptimizeToursTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/batchOptimizeToursTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new BatchOptimizeToursResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/batchOptimizeToursTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $parent = 'parent-995424086'; + $modelConfigs = []; + $request = (new BatchOptimizeToursRequest()) + ->setParent($parent) + ->setModelConfigs($modelConfigs); + $response = $gapicClient->batchOptimizeTours($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.optimization.v1.FleetRouting/BatchOptimizeTours', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($parent, $actualValue); + $actualValue = $actualApiRequestObject->getModelConfigs(); + $this->assertProtobufEquals($modelConfigs, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/batchOptimizeToursTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function batchOptimizeToursExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/batchOptimizeToursTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $parent = 'parent-995424086'; + $modelConfigs = []; + $request = (new BatchOptimizeToursRequest()) + ->setParent($parent) + ->setModelConfigs($modelConfigs); + $response = $gapicClient->batchOptimizeTours($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/batchOptimizeToursTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function optimizeToursTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $requestLabel = 'requestLabel1739091268'; + $totalCost = -7.0589032E7; + $expectedResponse = new OptimizeToursResponse(); + $expectedResponse->setRequestLabel($requestLabel); + $expectedResponse->setTotalCost($totalCost); + $transport->addResponse($expectedResponse); + // Mock request + $parent = 'parent-995424086'; + $request = (new OptimizeToursRequest()) + ->setParent($parent); + $response = $gapicClient->optimizeTours($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.optimization.v1.FleetRouting/OptimizeTours', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($parent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function optimizeToursExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $parent = 'parent-995424086'; + $request = (new OptimizeToursRequest()) + ->setParent($parent); + try { + $gapicClient->optimizeTours($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchOptimizeToursAsyncTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/batchOptimizeToursTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new BatchOptimizeToursResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/batchOptimizeToursTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $parent = 'parent-995424086'; + $modelConfigs = []; + $request = (new BatchOptimizeToursRequest()) + ->setParent($parent) + ->setModelConfigs($modelConfigs); + $response = $gapicClient->batchOptimizeToursAsync($request)->wait(); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.optimization.v1.FleetRouting/BatchOptimizeTours', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($parent, $actualValue); + $actualValue = $actualApiRequestObject->getModelConfigs(); + $this->assertProtobufEquals($modelConfigs, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/batchOptimizeToursTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } +} diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/GPBMetadata/Google/Cloud/Oracledatabase/V1/AutonomousDatabase.php b/owl-bot-staging/OracleDatabase/v1/proto/src/GPBMetadata/Google/Cloud/Oracledatabase/V1/AutonomousDatabase.php new file mode 100644 index 0000000000000000000000000000000000000000..e15e0496296feadfd8e3c67ddfcf402552bd1c18 GIT binary patch literal 10121 zcmc&)OLN;+mTrocEnU4~TZZHpO*@J0Bvh>K=_E?h2}D8?6N+H?kXtEbP#_6PXoCP7 z0F`KZyqKz4%)jVWZ!$Hr=*|3xuIm5L>)y?FR`Z>E@sdb|PBc~Hjm3MKIh`o z&j%+1_Bgj|I;Lj?W;fS9%LON9Zs56r+i~q&d)VulUasTz2bOJmgy)cL$70Q<&ItV*fuvhwma-@xSr9m&8`s`ZNoP=PG4*o!@zaizB}~wXt}_NFyf zUewOPQwr>K>C~R-&bOOtDa&$m*I_A@7If0X4pA1}x<+EJG zV2vaNDIJxa!1Nr$J}Q}h$Fl~3>(v0dwRLO;v3zOe>9de5p|g6qr-H|=tq~?a%LU%h zOjFP0JTn-2&L^C2Lhw5N>u8Mll!0}$W0`h$+dMH&E!W%HN^X@Px$J1&4AuL_r!LXg zQPJ)9UFXfI$6_rFVVKay&p6t&U|50CAH4b5=GnkJDj8>P?>p0c^%Kt#J-632&c>hP zmh=8^tk6!BZZ|fI9r)JMSdpaGci10y*+)OusiX(uWP!V5;k-K*PG79Ag_wuGf{XN1GX`#Tf27FulMsefb79<~Bbqh)Z6k zjl$?PVE!Qvx3u*?$z_4^H$NR^p~4ZUPT-vhq#v>yjv3$vujE;NgSY>t zO#P3NV-G0Y4+AqK0weJYSlXxxXp(Wq>UuJZ?mZ>_ip_OA6DdR|J;@9F;_DHYk@^ed zBHSg3gY5eIY%ax>G{>^9%rl`nX@O0j8uri>D%+a+D6{qF%-@y&%&-qG*t3vs%;l&w zrLV!j@61l%Z~P(r>-C21c6eaHTJ-1ZRGNy?3AT+m$Hcko_4Av_Y7Dw5jV|W@>j}Fz z%2J|WlBNrBCKj8O*4aX+0=?r7oq)?=N@xw{*BK14?wR2x8Sb>$e8g^%sp~$nk8y13 zKC+!2wB>6PK#tq;=LtxO&2`&48HVi|!uA(8pGV5PB&HNf+b_ct#LJXqG6pPW7g^VJ zxQ{GuRwg0&F-a97L8}6%xH8G=#6W?7^sD=301pX0KO@~^OOAeiS6DiCsvNsH@T^lZ zTGQzcTtsHw8YEVokshG^ce`DEh>yMwZWOhWfNC_J2F&@tL5 zjO0Z?%?SSAV-EopDQqnCQUcv!^C)Xf$A?-GGUa7#EpF~zNvsutkaC~UoW@ohbv zJ!ALUM(5RVfL(CP;SjSew~Huo=F1-gH1x{%Sq>r`8n!<4P1+vgp|=5^A!%i$x7nIu z^OywS$S@*LUQOV>X7k3t{9f;(X10(T?qF+f^VdIJG77K=(wpEEaRo--H@q{Q*!a%2 zd~^oz44<*^PTQ^Q23vx1jI5_rC5+E!68pwCZ*Kt z2OgZ$m+u4B+-7kSgQKPeV-HQGAy5hS|B)@Fs0=;m=m973#Z^eOfJfk0+5H}F8<~`6 zc3fQcOpl5%`5~va7Ez1Sa8y(aH22wZ-|V|Mh<*)%J8t`O4kx+wW~Ha>E&>$Uqb*GL zcxZUtIFvmCq%a5RBlfNUGrGqj?h$*$lioLAr)2lG>jRn9w*vWbLPKZE;v_7^>9%o& zw)})M|1(4d10o!aVV{gx+;M~D!#l!9bx}aT!+Dvb57FrHTfdcX^e-89FTAtm8}I-R zejdt~N8YyqySRA}$@a3WIBG0O>MvACsHG5pJwzWxqO5enmPD*DdWeGDhmPLiWWT%; zS<0gg;7oZMLN1Y_b{)EMP&@F-R}g*5X3LsA0tmu|CY_7-gWf8+co89oSJ&2 z8*0F|4`f35I$NW1T9kX31NheQNkBQ5qSA9t?!!ssfH6c+4$r6fm)YFFq`1^ZMDpc# zlR)!|E#qL{@~Jq`ZS&N$<@Y$ntCd2v7-@xY#*TckT#?@gu`uX?7tidW-8CQ2^9p%zzq=QDe3BAb#tx&q15mR z4)9(iD;3$gV}2hXsH3(;i0ns)coX<30OvL*HG$ISY&Bi&wQ(;;bdk!NA^42lN+Uom zFOF}&(eb>&mZIPkHWpHj-76_gWm{>eIt@C@T2*gV8#T39-YKi4tr7@k&=Rh0 z*UQyi{ZMPwb?s$U4}pOG=!o69q@GMK6=)uO65ihF9QRT)comQAZly>bX@ zbL>W4-ECErI?#97+NFs~dXGJ=Xho%>m&y&LfxGKK@D5Jez^U zw=04#h?D=~Of9fkl9kxYO1K0u6zyM=Zn7o8jaVZL(`0YqVsiF+zQkq_Q+TGsIP11n zQ>*&ER=OxBP^_y;N!O}exm-&4`LbSas*rq(EnP?_r5s74 zSuYoxxD{7ut6Ep%m8pD{Eu~^LWd=f9S9bulhwH1Cu&T70+P=~(7l9R;fuLJT1#BL& zlzq4@9WSW9C}}=hn~S5fBO*j z1$dzjwM14>En$^wG_>uaRy%}!QLv~gwZz1eur@!((sUGCC8pS9Pl~b;^xF6X9D5^IOAA% z38|3W#ff!FcwIJk;`)K!bG^P1a2YOcPV5pU@vsM!I~=260Cg@}K~Z@aHrGqo`srK+ z{LPSS<_%_2lZZnV9G@WFWAnZ#s%T!g(#(Bv^Q$ZBxzG?ele+bUE%;{`d3_&=l4kgC zFu0s_n+8Xk7N*A}8Z)8RI-&8Am`3yI<>KboSG`xW(tw+%5DO_v(NH}egJzN57tYxl z20H6St=eeqBbo2kHRR~?@oUyO@%| zL9{9zqTk&&VmTtu}DJ@eV2#Mfbfm$}S zYrJiv-T2iZoB!)rd7)rQO{FjuU9k-`O?VJX=5->sPMX(^9k`~X84p}Zgg-L}u z^HrFASEKkzqdL4BooT(7*cCx=gE5RFydZt0^9SgeQtRQEI8eazMc@tuykPpr;Gb`^ z`RHk%hIte&5CzpbbueQZK5B|872(DW6sZ*y<)o3$I9UcG08y>!;)SI+5O&th2sQq#kVFnA=sf~&j0Dgl2 zTGa&gjC6Q3W3WDbgNbkT^Mn?NO>gP-KGgFiEa?06Zc#ezl-RE_~8{g%&Yz4o>JXC z&xVBO=h;?mx2}|k&`s)BA)jKAvImLxmJp~Y`ENg`t}&kO_~#~s)HR|pgYt2K2ISR1 z?rb*x|GLKKRmPIHT9QI(TYst5zp7|x3P)1CRzWuBskrn~qkB2!Hd5{07v1+W#QLl5y%lfFZ=t{BY|XVi(}c^I*(>+>)=KE m`hW`5U%nH6xAUI(Tr2f;7s3n*yD?vOaY*s~)ob>evHt}Yuuu~K literal 0 HcmV?d00001 diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/GPBMetadata/Google/Cloud/Oracledatabase/V1/AutonomousDatabaseCharacterSet.php b/owl-bot-staging/OracleDatabase/v1/proto/src/GPBMetadata/Google/Cloud/Oracledatabase/V1/AutonomousDatabaseCharacterSet.php new file mode 100644 index 0000000000000000000000000000000000000000..7d1b0380150d0737d5944a2946a7f10355898c78 GIT binary patch literal 1639 zcmb_c&2G~`7{o~hWd$hsRC);8v{C~CTPZiU1v!Zmf*_6(Qwe0r+BlnJ!S!19x>Bif z=LvWS9)+jiTyfw9kXZjVNz-s4m#kN_^L^j!>>R!FrXJXZZR}znF+769bI7I`dOl^; zrVbp2<1zN3O;0`IU|)i;sl%>rK&{y^cKFeNhQ5szIH7dnVA*zPIFhN4YzL1JLqil` z`K%_RkWrVO(lD^HZOfh_j$_!j0?eeiBmgct#es)x4BNf>JIqi7H`_70*@)OpeSzIP zsT~4fJ17XCnpbJ2wHsND0cPL=K>qW>p+jsKFvR%Z9tkYs5=M|izHkAK;TSmq=9Jg5 zK4zis9>#q~1haf)u8>moh}k088P)L=oe}CQ z%GFd?BsU%HYzAF-V9NU;y4MITCM zwe3e~9pn+&PiIK1SNXaD%IggzJ_H+)Keq%ZRPWY{Kh;gq1LA^@Eq3nVtpW!;IMAi_ z-AL=pN%Q74IBit1C~kxM3l+DDSvSQ>AC#64i4{<8yjJ^a!_fNHKr<}kLr=5bcLzPK z(P?$GX6crA4{SD7L#?X=tt3QWUDfF5UG;6Lp!^mt)n5WQS`srEjq4alJRRiqqllmR z^ZtZw7RVRrY9>3>=1-8id@ozh=7M6?6XsBqzwsNAWcKv&6=o&LL3ur({zm{6KGZ+1 zufDr}=r{m+!pAp>88a_%u_kmmBDsz{B^M?3hKI`=-wWk-9EDOGg_0geVK$_6Qu~ns z%rq?1w9FtTkIT!#PC}w6F^i%s(kRMFZFrks6QeKo^QZbOiJZBFx-p$%WRf8>FazK( Dp-VEd literal 0 HcmV?d00001 diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/GPBMetadata/Google/Cloud/Oracledatabase/V1/AutonomousDbBackup.php b/owl-bot-staging/OracleDatabase/v1/proto/src/GPBMetadata/Google/Cloud/Oracledatabase/V1/AutonomousDbBackup.php new file mode 100644 index 0000000000000000000000000000000000000000..2d04a934634711619c2b9d633d217888bf79364c GIT binary patch literal 2777 zcmbVOOK;mo5Uw7!o-tU z(@q&57FfJle-^nFa8`$`hcRl}wIH_%_j_#IJ0U*fJ>S`qaSMQp;Zy5|@)bR+wQDik zEU`1%w_IP-Mp=zOZZkb(QGf4jH7rNd!me`K^=|ek%lQ0jD=J#iG>0|X#YtNqW+ifb z3V$xZSN9$<}ZDCKZE*B(V8Ijh*_0*~_w74mE~! zQ&wTtv;xnj16_Jd#U2yN_W&5Z$9!(FAeTnL%w|db?~4wHeTzB!=>PUFSZZmhA zDF62q^dPr9*KUUw#|4BMq&*4 zyc_631?^@=f=8glf+!)OFgsFs2#dDWVa5P&HQmG;%EEb{i{&Y$0}CU$U~`t6N9p|L zxA#2_qhqEX3B0g!%P0?NuQaZP68^4fqvZyh$xfVx&LoM$qbx6!1 z<_2V#V}>S+cQbhbfJyp1G*a$n^aj#=;IZ5is?Tp$+C;c8hZV^5Y0s7; zyo~sgY7_Y`OvvIXE3kOfEH*3p@%~YxvQyiwRm$0qlv&8^99D|W+I}^gPyi;2JI&fj zC7TqIa;098k`yw}l>CQAX`!}Ttkv;(Qm7p_$|1m1eizarBxM=0&DV{q&K6*%wvX=i zD*Mf19sOk>y?b1*qqjMjt{?1I^=9R8FPkd;m4G~+%MVnj^k9q_qSXhdhP#c#oA1J^ z#uSe?#;JRCDZ|SI_p-}m>9x16zW62iuqrn(Rc>PHf!xGm22)QqevK7c(XJLPYq3fT zx3%}l$03NONfb@H45Mi$8|_Isp)Z~eZ~o82?PqLR5=YB2ZdjD0X1LB=zy-j+NPvC2 literal 0 HcmV?d00001 diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/GPBMetadata/Google/Cloud/Oracledatabase/V1/AutonomousDbVersion.php b/owl-bot-staging/OracleDatabase/v1/proto/src/GPBMetadata/Google/Cloud/Oracledatabase/V1/AutonomousDbVersion.php new file mode 100644 index 000000000000..8b0e4dffb543 --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/GPBMetadata/Google/Cloud/Oracledatabase/V1/AutonomousDbVersion.php @@ -0,0 +1,36 @@ +internalAddGeneratedFile( + ' +‹ +:google/cloud/oracledatabase/v1/autonomous_db_version.protogoogle.cloud.oracledatabase.v1google/api/resource.proto8google/cloud/oracledatabase/v1/autonomous_database.proto"Ú +AutonomousDbVersion +name ( BàA +version ( BàAD + db_workload (2*.google.cloud.oracledatabase.v1.DBWorkloadBàA + workload_uri ( BàA:¸êA´ +1oracledatabase.googleapis.com/AutonomousDbVersionTprojects/{project}/locations/{location}/autonomousDbVersions/{autonomous_db_version}*autonomousDbVersions2autonomousDbVersionBò +"com.google.cloud.oracledatabase.v1BAutonomousDbVersionProtoPZJcloud.google.com/go/oracledatabase/apiv1/oracledatabasepb;oracledatabasepbªGoogle.Cloud.OracleDatabase.V1ÊGoogle\\Cloud\\OracleDatabase\\V1ê!Google::Cloud::OracleDatabase::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/GPBMetadata/Google/Cloud/Oracledatabase/V1/Common.php b/owl-bot-staging/OracleDatabase/v1/proto/src/GPBMetadata/Google/Cloud/Oracledatabase/V1/Common.php new file mode 100644 index 000000000000..8f8157a7009f --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/GPBMetadata/Google/Cloud/Oracledatabase/V1/Common.php @@ -0,0 +1,30 @@ +internalAddGeneratedFile( + ' +ä ++google/cloud/oracledatabase/v1/common.protogoogle.cloud.oracledatabase.v1"% +CustomerContact +email ( BàABå +"com.google.cloud.oracledatabase.v1B CommonProtoPZJcloud.google.com/go/oracledatabase/apiv1/oracledatabasepb;oracledatabasepbªGoogle.Cloud.OracleDatabase.V1ÊGoogle\\Cloud\\OracleDatabase\\V1ê!Google::Cloud::OracleDatabase::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/GPBMetadata/Google/Cloud/Oracledatabase/V1/DbNode.php b/owl-bot-staging/OracleDatabase/v1/proto/src/GPBMetadata/Google/Cloud/Oracledatabase/V1/DbNode.php new file mode 100644 index 0000000000000000000000000000000000000000..6a60fe7e86573220b03afaf4061edbd342acf122 GIT binary patch literal 1729 zcmb7E&2HO95H2N4mdB~95N+fBAlNttq7*4rxj+we-GZ`Yfk7e>mZC#JfZ)$cWDb*XTJGn_M7?k`{XKt`(!|4%3VPN z;yowgijssg!F(1GFPqIMCq7#wVMMt`NN+@jqY3Hv%*j0rOW zao3M%;0o7sQ`%m3+JWc9ETCEr3=q2unkKGK$-wG9rNWiI_8`Zw&n1REx`ts-JEs7C z_&Evrali7!MKI4x<033(?@A(JuK5oxNt^V z1xHCxlax@%S|7Edf@Wll_L48A)hggft4e^vYd^jO+Tgsx8RdLN96g zjBkv}Tk++0VOh8l1e-c9P!z2VGs*J-{MLX+@1h3vZsD!v+R?6SM_YD2{iH;5ld#Q8 zriGA>ey%{hkb`;~cBHBf6{58Ey4AmphH3(!-V(}1NYleAUhJQIrTup{t$@SlF5@JW zqW`MAG=5Rw_y)TI3yGx~j!3(tV%wPZN9v2T{h~ar+7a_nqAW(+`nW2_Wx6G(2&&><7-)p|7HsO|aIhvYdb2K!EgQlXs4|~ScFrOIRC;etc zy#ZlBFroZdqa3K97Cr!7(bDroTeUAz$MiOexR{8~jvCa{_1 zXxkqpc>o1V@#^gmGAvRS@9Vr3!D4xGKhd;KLfj*Qqp*w5(VS3b+htWH$#tQxasDbl z8KqnC&G#fPyc34YI*+6t7QLBhHFXYX?;6U)!`~0+MMKq8i zrm?gY$3-?&&V?S4K|EoIORWS_8(6}0zdW3IrSMnX3psb$q)6a$1Q#zhm*%~CaoqW< z3d|z6vNF|A8j!H;XVrWF01cAV3uqdPhU#WbH^6)Z?#$4Ix8hVCU2)-lguDS@HIrm@X9{W>XWj?*PRE_GW8nL&UkRr-!{zKV6$`9860=I$If=eybHG8oRo&DLie0wN252)EpSu+ zlSH-dKL*&5s{5Zhy0=%}yr3iF?T^_U7DFj@JEd3mx|FnB?dxh!{QawjUn`IMdaql0 zuUkXC*L(Tb!8&XISpeL8^XIF-fVgt^f2cgkNNiiP*!DV&ZJ)LM8*+{W{r1^%8@dF$nb^&W-wk8)~0linternalAddGeneratedFile( + ' +° +4google/cloud/oracledatabase/v1/db_system_shape.protogoogle.cloud.oracledatabase.v1google/api/resource.proto"Å + DbSystemShape +name ( BàA +shape ( BàA +min_node_count (BàA +max_node_count (BàA +min_storage_count (BàA +max_storage_count (BàA* +available_core_count_per_node (BàA) +available_memory_per_node_gb (BàA& +available_data_storage_tb (BàA$ +min_core_count_per_node + (BàA# +min_memory_per_node_gb (BàA, +min_db_node_storage_per_node_gb (BàA:šêA– ++oracledatabase.googleapis.com/DbSystemShapeHprojects/{project}/locations/{location}/dbSystemShapes/{db_system_shape}*dbSystemShapes2 dbSystemShapeBì +"com.google.cloud.oracledatabase.v1BDbSystemShapeProtoPZJcloud.google.com/go/oracledatabase/apiv1/oracledatabasepb;oracledatabasepbªGoogle.Cloud.OracleDatabase.V1ÊGoogle\\Cloud\\OracleDatabase\\V1ê!Google::Cloud::OracleDatabase::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/GPBMetadata/Google/Cloud/Oracledatabase/V1/Entitlement.php b/owl-bot-staging/OracleDatabase/v1/proto/src/GPBMetadata/Google/Cloud/Oracledatabase/V1/Entitlement.php new file mode 100644 index 0000000000000000000000000000000000000000..ca0d3439b8c4c862564ed545168126e307acd581 GIT binary patch literal 1722 zcmb7ET~pIQ6eTS%xF`crw4lQ*m675{YT+%2PQNJiqwPTH1CyCdnr_?GG@IFM7?tU} zmuk- z!iY&M*!0?MM4?G~4z>_gAS_g2rCNu@Lb<-qOI_ko6REI6NXJ5H(;{9gO{ig7sAVvt zX}BnTnn@#@VP>Ho|0)6;0Ndyx*D*{4OSRlP#0)=QD+wGe@8f9IF&wRt*#*F~4A+Il z5gs@LkpCR7X<-w(%wYVpfn6Qjm|?@hpZUG^VB4@<#Op8SwmsWqnAp%SsM;nHI;;8Aa9Xso%@DN>ODiDPq}XAE)_AI_b`Tp9>PJ#r;jum(Zo^d2qpDtL zat|` z_7aB|&$e2_d+u{}q=udOeQtv9bKv>^%0gZXDik3kWn4(gX=ZgLL^K?nreU{%qLM%3 zU_PP?c?nGW8cRq}O5MoCe`n|9L$EA>b;C4?XEVLUb%!lC5#u@Y+dIm?PgjI2vq5bk zD3$Mng^0R!+)Bg;2gc!O~GZTQBOz zm7`iQU*0bl3yV|oT_9)k`RZ|{uJgyKzb#kZ@VGP?&*tmpMsYDF127w|@sY3hC=Wt zj?C>~>Wd_C&^rU2m=uZY>3*I+%K+~{;(56TU{${oHFpmz4^N50EyMz?68v0r$Z)PmyeDc@Ay=m=I&(RM{KPmJU0-xQWc(C2)$crWPS}2w9u79 zTOOon+?UT|>j8+Wipit_o+!8 z!l))U`!efL*>)^usg@x(y;h4lvTAj0-JniJmJ3z6QmxCyLaBZiU0us_RGO39men?B zRy8b7%UTXm4XP1Fn#85q-d2{rA^cxOH(L(L2zmgMbg63-mCF0Ioib$t(%2VFja|;v zsE#o;j<+5Is0MLex#%;NI3c_P8GmfAY3Qo#GQ#lBy6)m~I@5`vzr{~`BDaX)QY4tf zwmeg1x@F4Tp=zphZ zNKdz%TyFSPLz0VJ4{5NaSN6JKry9Ffw`-YKUwx3)x{kVFq-$T@x8ApDqd@vr>oujX zKG3ghnXGfZkJ$Rnr+To_c}*Ma>mC-w#$YG-zTAgDlCb^Zl_1^reKMkYGUL^g>20M} z15RS=Str;Zzlc%~FIf&N7dIgQ-wD8?{!qYK7G^pCtOWpu>C9?jIs@a%s1Zq7$2X*Z zibG0>V6-M()Uk@XrP2~yXi_9M7kw1T{S|qi|1$!Q&M3^!5Q@vqpj@&SXGCgZ zAU{%-x!HHY(`nYQRP48wiSNS4Q~w+|R}KghGFQfqgn?R4KVK8(^L@8d7aP;R0<2#g z`*1h8AT1T8GZ17`?HF_d$5kqDG3gMbF5#WVBzOWTuXR(iUZd8yjJHB1i0_|l5t;JP z^F%oMvHt*Ze$@DaTG)Pe8O>GlmpS5$LV%Kl{2gMC)M!+?3DcNf#dD10ECw%1J|->0 ztZI8fb|L)g2+w?%yita>L}-giSnXZfwVb{Zrgbhf4jcmjrhGoM#iVsu(VB{BX_EQhJ(O~bLp!olJU?8Xpw82Cuc7ec;L9}`}tM!5N?a}%s`<9m3}5^sbM;>oI~*B4y+Au>7OGI7nLI2 zf~BK+zFt&bRE}!J-O^sESXlf>T7)aTVu0x_;JS>+g{)=nU0zmiz`Qj45)E+wH^AuLjN;zMu)QgpTWw)r5Dhe*O ze^@*^TAWV*5{IRUej&B^=}B?gr`UZ&Z(P_eUzW}Zn#o2~8<6_RZrq0{kw6!lY;0p; zTM8H9Q%9!E2MZsG<r_uXKrmoRS=rgn6*jd5sUGkqGab>*I%sRcA;WEo^5 z<%?P2&A~E72$qLMshh4CeS#=9LB<=+`B*$M@Nm&Yznu}p=^m_2Y|d~iq)m7*Dv*;> zrBFRVkrelehea-#ajl|+cV8UUtK|_03U&$RE7j3g(e!gv^~hIBpTKG@U*G)}MXZ#o zg|oy7m_Do?9QgW2iC3x>C43Rx`6mKtJeMy?^v<3CJhqrsi@bd1Z&El6;+WI6&fZgT z0>Z26_;6%5AD?~kTlDt6xTE^BW2P$ZsDpV4Jp?p@TWoNR4IvG@$G(r=^+|F$ t5qvH;PLsinternalAddGeneratedFile( + ' +ž +/google/cloud/oracledatabase/v1/gi_version.protogoogle.cloud.oracledatabase.v1google/api/resource.proto"¼ + GiVersion +name ( BàA +version ( BàA:…êA +\'oracledatabase.googleapis.com/GiVersion?projects/{project}/locations/{location}/giVersions/{gi_version}* +giVersions2 giVersionBè +"com.google.cloud.oracledatabase.v1BGiVersionProtoPZJcloud.google.com/go/oracledatabase/apiv1/oracledatabasepb;oracledatabasepbªGoogle.Cloud.OracleDatabase.V1ÊGoogle\\Cloud\\OracleDatabase\\V1ê!Google::Cloud::OracleDatabase::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/GPBMetadata/Google/Cloud/Oracledatabase/V1/LocationMetadata.php b/owl-bot-staging/OracleDatabase/v1/proto/src/GPBMetadata/Google/Cloud/Oracledatabase/V1/LocationMetadata.php new file mode 100644 index 000000000000..21f60a25d537 --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/GPBMetadata/Google/Cloud/Oracledatabase/V1/LocationMetadata.php @@ -0,0 +1,30 @@ +internalAddGeneratedFile( + ' +… +6google/cloud/oracledatabase/v1/location_metadata.protogoogle.cloud.oracledatabase.v1"1 +LocationMetadata +gcp_oracle_zones ( BàABï +"com.google.cloud.oracledatabase.v1BLocationMetadataProtoPZJcloud.google.com/go/oracledatabase/apiv1/oracledatabasepb;oracledatabasepbªGoogle.Cloud.OracleDatabase.V1ÊGoogle\\Cloud\\OracleDatabase\\V1ê!Google::Cloud::OracleDatabase::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/GPBMetadata/Google/Cloud/Oracledatabase/V1/Oracledatabase.php b/owl-bot-staging/OracleDatabase/v1/proto/src/GPBMetadata/Google/Cloud/Oracledatabase/V1/Oracledatabase.php new file mode 100644 index 000000000000..34be06d5bb94 --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/GPBMetadata/Google/Cloud/Oracledatabase/V1/Oracledatabase.php @@ -0,0 +1,236 @@ +internalAddGeneratedFile( + ' +‰a +3google/cloud/oracledatabase/v1/oracledatabase.protogoogle.cloud.oracledatabase.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/field_info.protogoogle/api/resource.proto8google/cloud/oracledatabase/v1/autonomous_database.protoFgoogle/cloud/oracledatabase/v1/autonomous_database_character_set.proto9google/cloud/oracledatabase/v1/autonomous_db_backup.proto:google/cloud/oracledatabase/v1/autonomous_db_version.proto,google/cloud/oracledatabase/v1/db_node.proto.google/cloud/oracledatabase/v1/db_server.proto4google/cloud/oracledatabase/v1/db_system_shape.proto0google/cloud/oracledatabase/v1/entitlement.proto2google/cloud/oracledatabase/v1/exadata_infra.proto/google/cloud/oracledatabase/v1/gi_version.proto/google/cloud/oracledatabase/v1/vm_cluster.proto#google/longrunning/operations.protogoogle/protobuf/empty.protogoogle/protobuf/timestamp.proto"« +&ListCloudExadataInfrastructuresRequestP +parent ( B@àAúA:8oracledatabase.googleapis.com/CloudExadataInfrastructure + page_size (BàA + +page_token ( BàA"¥ +\'ListCloudExadataInfrastructuresResponsea +cloud_exadata_infrastructures ( 2:.google.cloud.oracledatabase.v1.CloudExadataInfrastructure +next_page_token ( "v +$GetCloudExadataInfrastructureRequestN +name ( B@àAúA: +8oracledatabase.googleapis.com/CloudExadataInfrastructure"± +\'CreateCloudExadataInfrastructureRequestP +parent ( B@àAúA:8oracledatabase.googleapis.com/CloudExadataInfrastructure, +cloud_exadata_infrastructure_id ( BàAe +cloud_exadata_infrastructure ( 2:.google.cloud.oracledatabase.v1.CloudExadataInfrastructureBàA + +request_id ( B àAâŒÏ×"® +\'DeleteCloudExadataInfrastructureRequestN +name ( B@àAúA: +8oracledatabase.googleapis.com/CloudExadataInfrastructure + +request_id ( B àAâŒÏ× +force (BàA"¨ +ListCloudVmClustersRequestD +parent ( B4àAúA.,oracledatabase.googleapis.com/CloudVmCluster + page_size (BàA + +page_token ( BàA +filter ( BàA" +ListCloudVmClustersResponseI +cloud_vm_clusters ( 2..google.cloud.oracledatabase.v1.CloudVmCluster +next_page_token ( "^ +GetCloudVmClusterRequestB +name ( B4àAúA. +,oracledatabase.googleapis.com/CloudVmCluster"õ +CreateCloudVmClusterRequestD +parent ( B4àAúA.,oracledatabase.googleapis.com/CloudVmCluster +cloud_vm_cluster_id ( BàAM +cloud_vm_cluster ( 2..google.cloud.oracledatabase.v1.CloudVmClusterBàA + +request_id ( B àAâŒÏ×"– +DeleteCloudVmClusterRequestB +name ( B4àAúA. +,oracledatabase.googleapis.com/CloudVmCluster + +request_id ( B àAâŒÏ× +force (BàA" +ListEntitlementsRequestA +parent ( B1àAúA+)oracledatabase.googleapis.com/Entitlement + page_size (BàA + +page_token ( BàA"v +ListEntitlementsResponseA + entitlements ( 2+.google.cloud.oracledatabase.v1.Entitlement +next_page_token ( "‡ +ListDbServersRequest> +parent ( B.àAúA(&oracledatabase.googleapis.com/DbServer + page_size (BàA + +page_token ( BàA"n +ListDbServersResponse< + +db_servers ( 2(.google.cloud.oracledatabase.v1.DbServer +next_page_token ( "ƒ +ListDbNodesRequest< +parent ( B,àAúA&$oracledatabase.googleapis.com/DbNode + page_size (BàA + +page_token ( BàA"h +ListDbNodesResponse8 +db_nodes ( 2&.google.cloud.oracledatabase.v1.DbNode +next_page_token ( "‰ +ListGiVersionsRequest? +parent ( B/àAúA)\'oracledatabase.googleapis.com/GiVersion + page_size (BàA + +page_token ( BàA"q +ListGiVersionsResponse> + gi_versions ( 2).google.cloud.oracledatabase.v1.GiVersion +next_page_token ( "‘ +ListDbSystemShapesRequestC +parent ( B3àAúA-+oracledatabase.googleapis.com/DbSystemShape + page_size (BàA + +page_token ( BàA"~ +ListDbSystemShapesResponseG +db_system_shapes ( 2-.google.cloud.oracledatabase.v1.DbSystemShape +next_page_token ( "Ÿ +OperationMetadata4 + create_time ( 2.google.protobuf.TimestampBàA1 +end_time ( 2.google.protobuf.TimestampBàA +target ( BàA +verb ( BàA +status_message ( BàA# +requested_cancellation (BàA + api_version ( BàA +percent_complete (BàA"Ç +ListAutonomousDatabasesRequestH +parent ( B8àAúA20oracledatabase.googleapis.com/AutonomousDatabase + page_size (BàA + +page_token ( BàA +filter ( BàA +order_by ( BàA"Œ +ListAutonomousDatabasesResponseP +autonomous_databases ( 22.google.cloud.oracledatabase.v1.AutonomousDatabase +next_page_token ( "f +GetAutonomousDatabaseRequestF +name ( B8àAúA2 +0oracledatabase.googleapis.com/AutonomousDatabase"‡ +CreateAutonomousDatabaseRequestH +parent ( B8àAúA20oracledatabase.googleapis.com/AutonomousDatabase# +autonomous_database_id ( BàAT +autonomous_database ( 22.google.cloud.oracledatabase.v1.AutonomousDatabaseBàA + +request_id ( B àAâŒÏ×"Š +DeleteAutonomousDatabaseRequestF +name ( B8àAúA2 +0oracledatabase.googleapis.com/AutonomousDatabase + +request_id ( B àAâŒÏ×"¡ + RestoreAutonomousDatabaseRequestF +name ( B8àAúA2 +0oracledatabase.googleapis.com/AutonomousDatabase5 + restore_time ( 2.google.protobuf.TimestampBàA"ã +\'GenerateAutonomousDatabaseWalletRequestF +name ( B8àAúA2 +0oracledatabase.googleapis.com/AutonomousDatabase? +type (2,.google.cloud.oracledatabase.v1.GenerateTypeBàA + is_regional (BàA +password ( BàA"H +(GenerateAutonomousDatabaseWalletResponse +archive_content ( BàA" +ListAutonomousDbVersionsRequestI +parent ( B9àAúA31oracledatabase.googleapis.com/AutonomousDbVersion + page_size (BàA + +page_token ( BàA" + ListAutonomousDbVersionsResponseS +autonomous_db_versions ( 23.google.cloud.oracledatabase.v1.AutonomousDbVersion +next_page_token ( "È +*ListAutonomousDatabaseCharacterSetsRequestT +parent ( BDàAúA>.google.cloud.oracledatabase.v1.AutonomousDatabaseCharacterSet +next_page_token ( "¼ +$ListAutonomousDatabaseBackupsRequestN +parent ( B>àAúA86oracledatabase.googleapis.com/AutonomousDatabaseBackup +filter ( BàA + page_size (BàA + +page_token ( BàA"Ÿ +%ListAutonomousDatabaseBackupsResponse] +autonomous_database_backups ( 28.google.cloud.oracledatabase.v1.AutonomousDatabaseBackup +next_page_token ( 2Œ+ +OracleDatabase„ +ListCloudExadataInfrastructuresF.google.cloud.oracledatabase.v1.ListCloudExadataInfrastructuresRequestG.google.cloud.oracledatabase.v1.ListCloudExadataInfrastructuresResponse"PÚAparent‚Óä“A?/v1/{parent=projects/*/locations/*}/cloudExadataInfrastructuresñ +GetCloudExadataInfrastructureD.google.cloud.oracledatabase.v1.GetCloudExadataInfrastructureRequest:.google.cloud.oracledatabase.v1.CloudExadataInfrastructure"NÚAname‚Óä“A?/v1/{name=projects/*/locations/*/cloudExadataInfrastructures/*}ê + CreateCloudExadataInfrastructureG.google.cloud.oracledatabase.v1.CreateCloudExadataInfrastructureRequest.google.longrunning.Operation"ÝÊA/ +CloudExadataInfrastructureOperationMetadataÚACparent,cloud_exadata_infrastructure,cloud_exadata_infrastructure_id‚Óä“_"?/v1/{parent=projects/*/locations/*}/cloudExadataInfrastructures:cloud_exadata_infrastructure‡ + DeleteCloudExadataInfrastructureG.google.cloud.oracledatabase.v1.DeleteCloudExadataInfrastructureRequest.google.longrunning.Operation"{ÊA* +google.protobuf.EmptyOperationMetadataÚAname‚Óä“A*?/v1/{name=projects/*/locations/*/cloudExadataInfrastructures/*}Ô +ListCloudVmClusters:.google.cloud.oracledatabase.v1.ListCloudVmClustersRequest;.google.cloud.oracledatabase.v1.ListCloudVmClustersResponse"DÚAparent‚Óä“53/v1/{parent=projects/*/locations/*}/cloudVmClustersÁ +GetCloudVmCluster8.google.cloud.oracledatabase.v1.GetCloudVmClusterRequest..google.cloud.oracledatabase.v1.CloudVmCluster"BÚAname‚Óä“53/v1/{name=projects/*/locations/*/cloudVmClusters/*}– +CreateCloudVmCluster;.google.cloud.oracledatabase.v1.CreateCloudVmClusterRequest.google.longrunning.Operation"¡ÊA# +CloudVmClusterOperationMetadataÚA+parent,cloud_vm_cluster,cloud_vm_cluster_id‚Óä“G"3/v1/{parent=projects/*/locations/*}/cloudVmClusters:cloud_vm_clusterã +DeleteCloudVmCluster;.google.cloud.oracledatabase.v1.DeleteCloudVmClusterRequest.google.longrunning.Operation"oÊA* +google.protobuf.EmptyOperationMetadataÚAname‚Óä“5*3/v1/{name=projects/*/locations/*/cloudVmClusters/*}È +ListEntitlements7.google.cloud.oracledatabase.v1.ListEntitlementsRequest8.google.cloud.oracledatabase.v1.ListEntitlementsResponse"AÚAparent‚Óä“20/v1/{parent=projects/*/locations/*}/entitlementsÚ + ListDbServers4.google.cloud.oracledatabase.v1.ListDbServersRequest5.google.cloud.oracledatabase.v1.ListDbServersResponse"\\ÚAparent‚Óä“MK/v1/{parent=projects/*/locations/*/cloudExadataInfrastructures/*}/dbServersÆ + ListDbNodes2.google.cloud.oracledatabase.v1.ListDbNodesRequest3.google.cloud.oracledatabase.v1.ListDbNodesResponse"NÚAparent‚Óä“?=/v1/{parent=projects/*/locations/*/cloudVmClusters/*}/dbNodesÀ +ListGiVersions5.google.cloud.oracledatabase.v1.ListGiVersionsRequest6.google.cloud.oracledatabase.v1.ListGiVersionsResponse"?ÚAparent‚Óä“0./v1/{parent=projects/*/locations/*}/giVersionsÐ +ListDbSystemShapes9.google.cloud.oracledatabase.v1.ListDbSystemShapesRequest:.google.cloud.oracledatabase.v1.ListDbSystemShapesResponse"CÚAparent‚Óä“42/v1/{parent=projects/*/locations/*}/dbSystemShapesä +ListAutonomousDatabases>.google.cloud.oracledatabase.v1.ListAutonomousDatabasesRequest?.google.cloud.oracledatabase.v1.ListAutonomousDatabasesResponse"HÚAparent‚Óä“97/v1/{parent=projects/*/locations/*}/autonomousDatabasesÑ +GetAutonomousDatabase<.google.cloud.oracledatabase.v1.GetAutonomousDatabaseRequest2.google.cloud.oracledatabase.v1.AutonomousDatabase"FÚAname‚Óä“97/v1/{name=projects/*/locations/*/autonomousDatabases/*}¯ +CreateAutonomousDatabase?.google.cloud.oracledatabase.v1.CreateAutonomousDatabaseRequest.google.longrunning.Operation"²ÊA\' +AutonomousDatabaseOperationMetadataÚA1parent,autonomous_database,autonomous_database_id‚Óä“N"7/v1/{parent=projects/*/locations/*}/autonomousDatabases:autonomous_databaseï +DeleteAutonomousDatabase?.google.cloud.oracledatabase.v1.DeleteAutonomousDatabaseRequest.google.longrunning.Operation"sÊA* +google.protobuf.EmptyOperationMetadataÚAname‚Óä“9*7/v1/{name=projects/*/locations/*/autonomousDatabases/*}‡ +RestoreAutonomousDatabase@.google.cloud.oracledatabase.v1.RestoreAutonomousDatabaseRequest.google.longrunning.Operation"ˆÊA\' +AutonomousDatabaseOperationMetadataÚAname,restore_time‚Óä“D"?/v1/{name=projects/*/locations/*/autonomousDatabases/*}:restore:*© + GenerateAutonomousDatabaseWalletG.google.cloud.oracledatabase.v1.GenerateAutonomousDatabaseWalletRequestH.google.cloud.oracledatabase.v1.GenerateAutonomousDatabaseWalletResponse"rÚAname,type,is_regional,password‚Óä“K"F/v1/{name=projects/*/locations/*/autonomousDatabases/*}:generateWallet:*è +ListAutonomousDbVersions?.google.cloud.oracledatabase.v1.ListAutonomousDbVersionsRequest@.google.cloud.oracledatabase.v1.ListAutonomousDbVersionsResponse"IÚAparent‚Óä“:8/v1/{parent=projects/*/locations/*}/autonomousDbVersions” +#ListAutonomousDatabaseCharacterSetsJ.google.cloud.oracledatabase.v1.ListAutonomousDatabaseCharacterSetsRequestK.google.cloud.oracledatabase.v1.ListAutonomousDatabaseCharacterSetsResponse"TÚAparent‚Óä“EC/v1/{parent=projects/*/locations/*}/autonomousDatabaseCharacterSetsü +ListAutonomousDatabaseBackupsD.google.cloud.oracledatabase.v1.ListAutonomousDatabaseBackupsRequestE.google.cloud.oracledatabase.v1.ListAutonomousDatabaseBackupsResponse"NÚAparent‚Óä“?=/v1/{parent=projects/*/locations/*}/autonomousDatabaseBackupsQÊAoracledatabase.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformB¶ +"com.google.cloud.oracledatabase.v1B V1mainProtoPZJcloud.google.com/go/oracledatabase/apiv1/oracledatabasepb;oracledatabasepbªGoogle.Cloud.OracleDatabase.V1ÊGoogle\\Cloud\\OracleDatabase\\V1ê!Google::Cloud::OracleDatabase::V1êAN +compute.googleapis.com/Network,projects/{project}/global/networks/{network}bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/GPBMetadata/Google/Cloud/Oracledatabase/V1/VmCluster.php b/owl-bot-staging/OracleDatabase/v1/proto/src/GPBMetadata/Google/Cloud/Oracledatabase/V1/VmCluster.php new file mode 100644 index 0000000000000000000000000000000000000000..aaa29be08bb6421461b4ef2fb0003fb4104ffccc GIT binary patch literal 3650 zcmb7H-Ez}L6s~RZcM_Z+NDzU72q}aP*psxKGNRBrv13ewojOiBFz#$+Y2&EKT8&mt z2~6Ig_q}LmdfVxv^Z|O!H8XvIUiIv*WW^yFz&Fg!-HfEz}Y`ZTm6 z>KL5^Bif@z5VDBb%riRu-CY_QHtPkhN5g_)lp999(K0IKTI)Kha@G%RY8qX}x*jds z9_u?r7FxDP9V@ar7N^Di<>G#i*j}GU2qCcne5*%!VA<5DZmvF|ktM|2RSDBx6EN+@ z5KMb#`96T{S)3a?y)}gfufV`x(C>JzZScs7@Nd!O#P!|CwLJGF2KB($wLDHy`)%3X zzHdh^^9`ZU@NK$u+fbN7b}?X>ga=0A*QUq|=A>QoF%;kO+GWb^&Z}Ek|9!a3;vvg;s?@DyQ&lllDCCn-WK+k=P$*8R^S%HI6sQP^Vi}n$!Fw5Q3N8B z5DU!50ue@9M0U$a)!xECBaoLQA23-v2WLc2=ourkG_jg{T^iSZggN>`HU{!}H?%l1 z#70I?Ju8L2d0oo>S2E$=F~^l*^qCj1bBoeYMFG`@aI{M><+wcXtOFvA=Mv)??FvkH z?SLp~@{;*fpGtOf+IIjLctFF*rCcAyjmedJ1!efOY!-$iM)t(|BHE1BfKkutP><_l zMh@Z34}&XgNaczjg$D}obC|S4iiszpH2S!7ay~&#>Q)$#S7_x#9cL^l&d#oWem6~CTBmQvC%PmY4E=(SATbqR3 zb9$gCpq+)0eaq{|#Wu6|GUgwdH>KY)aOXYhof7LYM*0)ABVK$Je;pP*X5*-2KCUI7 zhiZ5a^l(dd1xaW3;iuDbDV15t4=*hIJ_Y(|WfrMrn7WkWIgP*+PHyUREE4vKBzAtK zoD@l-zulLoGO4hkz{GSB<;-dq0lF^Pry<91^&|Yg3loACirHr*H)a#F!WGGjXGnWR zCTs`J_lP=a2v&*fBS=%(sTpC#XAUJc>-&*xhY_Ww!3f{8FtD+NEjb~~?4TbD3tDEC z@MXyNXpe;lgyX?Qx*bWv7-lt{JC<)B=w}fizfw(-^T9PKBVKa=r_6i;I-dR^mR(ruh76mF z`c?<84SF8!jVm#9Sn$&$asMSE)2RqXyvKMX#uo`fy6e8sXK*(zOc!oAuGRHX!nHY( z(c{I&!+tVWspHJ|!8gB9f^t3lqB9w6&%7CI=Qf1IjbfH52!q#t_v)pQl>j{U%Ch`mk3SmFA$1T-Uj5u?`%qaO7m z0cZ@X`aDgm8|XLET|5)xyQ(@97n7~b!VfsE(*c7=q`pyGtJJqDr1f;OLbmH$o0YZN zdaY8P`AE9}Gs$kPzP7Pl#?_2A4|A){TD?l1Hny9j@qL}dLNnQgD&&WI1#@$`T-*AV zG%Mxpdbw0zdwR^sIGlM@t3E$Y904&2BtQfjh)(7 ztx-p3Q2i`Sly*wBjne8yWhSdl!T9!OxzrMyIc*vyTb1UMT3s!i(eePv0!B3=jIX0I zeve}6FFq;N>a9v0{jHE%ouH{|v$C}{Gq&(c24+v}B2Do4XsgnFEF2#U1#vBkhr&&` zv_~y3+9N%Nw{{k~es>@zZbq@(0?fKT5oB~Q__1_FEAW`1Yt*htXYS)Nu zW}ZD(voN{#;9aZBj=z5J%*O}N@QEFC?jK+HD|@vnA3y4BD>UTeN2E%;p$a?8egoogle.cloud.oracledatabase.v1.AllConnectionStrings + */ +class AllConnectionStrings extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The database service provides the highest level of resources + * to each SQL statement. + * + * Generated from protobuf field string high = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $high = ''; + /** + * Output only. The database service provides the least level of resources to + * each SQL statement. + * + * Generated from protobuf field string low = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $low = ''; + /** + * Output only. The database service provides a lower level of resources to + * each SQL statement. + * + * Generated from protobuf field string medium = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $medium = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $high + * Output only. The database service provides the highest level of resources + * to each SQL statement. + * @type string $low + * Output only. The database service provides the least level of resources to + * each SQL statement. + * @type string $medium + * Output only. The database service provides a lower level of resources to + * each SQL statement. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Oracledatabase\V1\AutonomousDatabase::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The database service provides the highest level of resources + * to each SQL statement. + * + * Generated from protobuf field string high = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getHigh() + { + return $this->high; + } + + /** + * Output only. The database service provides the highest level of resources + * to each SQL statement. + * + * Generated from protobuf field string high = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setHigh($var) + { + GPBUtil::checkString($var, True); + $this->high = $var; + + return $this; + } + + /** + * Output only. The database service provides the least level of resources to + * each SQL statement. + * + * Generated from protobuf field string low = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getLow() + { + return $this->low; + } + + /** + * Output only. The database service provides the least level of resources to + * each SQL statement. + * + * Generated from protobuf field string low = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setLow($var) + { + GPBUtil::checkString($var, True); + $this->low = $var; + + return $this; + } + + /** + * Output only. The database service provides a lower level of resources to + * each SQL statement. + * + * Generated from protobuf field string medium = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getMedium() + { + return $this->medium; + } + + /** + * Output only. The database service provides a lower level of resources to + * each SQL statement. + * + * Generated from protobuf field string medium = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setMedium($var) + { + GPBUtil::checkString($var, True); + $this->medium = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabase.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabase.php new file mode 100644 index 000000000000..fe496b5489b7 --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabase.php @@ -0,0 +1,422 @@ +google.cloud.oracledatabase.v1.AutonomousDatabase + */ +class AutonomousDatabase extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The name of the Autonomous Database resource in the following + * format: + * projects/{project}/locations/{region}/autonomousDatabases/{autonomous_database} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Optional. The name of the Autonomous Database. The database name must be + * unique in the project. The name must begin with a letter and can contain a + * maximum of 30 alphanumeric characters. + * + * Generated from protobuf field string database = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $database = ''; + /** + * Optional. The display name for the Autonomous Database. The name does not + * have to be unique within your project. + * + * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $display_name = ''; + /** + * Output only. The ID of the subscription entitlement associated with the + * Autonomous Database. + * + * Generated from protobuf field string entitlement_id = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $entitlement_id = ''; + /** + * Optional. The password for the default ADMIN user. + * + * Generated from protobuf field string admin_password = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $admin_password = ''; + /** + * Optional. The properties of the Autonomous Database. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseProperties properties = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $properties = null; + /** + * Optional. The labels or tags associated with the Autonomous Database. + * + * Generated from protobuf field map labels = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Required. The name of the VPC network used by the Autonomous Database in + * the following format: projects/{project}/global/networks/{network} + * + * Generated from protobuf field string network = 9 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $network = ''; + /** + * Required. The subnet CIDR range for the Autonmous Database. + * + * Generated from protobuf field string cidr = 10 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $cidr = ''; + /** + * Output only. The date and time that the Autonomous Database was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The name of the Autonomous Database resource in the following + * format: + * projects/{project}/locations/{region}/autonomousDatabases/{autonomous_database} + * @type string $database + * Optional. The name of the Autonomous Database. The database name must be + * unique in the project. The name must begin with a letter and can contain a + * maximum of 30 alphanumeric characters. + * @type string $display_name + * Optional. The display name for the Autonomous Database. The name does not + * have to be unique within your project. + * @type string $entitlement_id + * Output only. The ID of the subscription entitlement associated with the + * Autonomous Database. + * @type string $admin_password + * Optional. The password for the default ADMIN user. + * @type \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseProperties $properties + * Optional. The properties of the Autonomous Database. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. The labels or tags associated with the Autonomous Database. + * @type string $network + * Required. The name of the VPC network used by the Autonomous Database in + * the following format: projects/{project}/global/networks/{network} + * @type string $cidr + * Required. The subnet CIDR range for the Autonmous Database. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The date and time that the Autonomous Database was created. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Oracledatabase\V1\AutonomousDatabase::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The name of the Autonomous Database resource in the following + * format: + * projects/{project}/locations/{region}/autonomousDatabases/{autonomous_database} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The name of the Autonomous Database resource in the following + * format: + * projects/{project}/locations/{region}/autonomousDatabases/{autonomous_database} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. The name of the Autonomous Database. The database name must be + * unique in the project. The name must begin with a letter and can contain a + * maximum of 30 alphanumeric characters. + * + * Generated from protobuf field string database = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDatabase() + { + return $this->database; + } + + /** + * Optional. The name of the Autonomous Database. The database name must be + * unique in the project. The name must begin with a letter and can contain a + * maximum of 30 alphanumeric characters. + * + * Generated from protobuf field string database = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDatabase($var) + { + GPBUtil::checkString($var, True); + $this->database = $var; + + return $this; + } + + /** + * Optional. The display name for the Autonomous Database. The name does not + * have to be unique within your project. + * + * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Optional. The display name for the Autonomous Database. The name does not + * have to be unique within your project. + * + * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Output only. The ID of the subscription entitlement associated with the + * Autonomous Database. + * + * Generated from protobuf field string entitlement_id = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getEntitlementId() + { + return $this->entitlement_id; + } + + /** + * Output only. The ID of the subscription entitlement associated with the + * Autonomous Database. + * + * Generated from protobuf field string entitlement_id = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setEntitlementId($var) + { + GPBUtil::checkString($var, True); + $this->entitlement_id = $var; + + return $this; + } + + /** + * Optional. The password for the default ADMIN user. + * + * Generated from protobuf field string admin_password = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getAdminPassword() + { + return $this->admin_password; + } + + /** + * Optional. The password for the default ADMIN user. + * + * Generated from protobuf field string admin_password = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setAdminPassword($var) + { + GPBUtil::checkString($var, True); + $this->admin_password = $var; + + return $this; + } + + /** + * Optional. The properties of the Autonomous Database. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseProperties properties = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseProperties|null + */ + public function getProperties() + { + return $this->properties; + } + + public function hasProperties() + { + return isset($this->properties); + } + + public function clearProperties() + { + unset($this->properties); + } + + /** + * Optional. The properties of the Autonomous Database. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseProperties properties = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseProperties $var + * @return $this + */ + public function setProperties($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseProperties::class); + $this->properties = $var; + + return $this; + } + + /** + * Optional. The labels or tags associated with the Autonomous Database. + * + * Generated from protobuf field map labels = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. The labels or tags associated with the Autonomous Database. + * + * Generated from protobuf field map labels = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Required. The name of the VPC network used by the Autonomous Database in + * the following format: projects/{project}/global/networks/{network} + * + * Generated from protobuf field string network = 9 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getNetwork() + { + return $this->network; + } + + /** + * Required. The name of the VPC network used by the Autonomous Database in + * the following format: projects/{project}/global/networks/{network} + * + * Generated from protobuf field string network = 9 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setNetwork($var) + { + GPBUtil::checkString($var, True); + $this->network = $var; + + return $this; + } + + /** + * Required. The subnet CIDR range for the Autonmous Database. + * + * Generated from protobuf field string cidr = 10 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getCidr() + { + return $this->cidr; + } + + /** + * Required. The subnet CIDR range for the Autonmous Database. + * + * Generated from protobuf field string cidr = 10 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setCidr($var) + { + GPBUtil::checkString($var, True); + $this->cidr = $var; + + return $this; + } + + /** + * Output only. The date and time that the Autonomous Database was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The date and time that the Autonomous Database was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseApex.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseApex.php new file mode 100644 index 000000000000..72636fdbd348 --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseApex.php @@ -0,0 +1,102 @@ +google.cloud.oracledatabase.v1.AutonomousDatabaseApex + */ +class AutonomousDatabaseApex extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The Oracle APEX Application Development version. + * + * Generated from protobuf field string apex_version = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $apex_version = ''; + /** + * Output only. The Oracle REST Data Services (ORDS) version. + * + * Generated from protobuf field string ords_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $ords_version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $apex_version + * Output only. The Oracle APEX Application Development version. + * @type string $ords_version + * Output only. The Oracle REST Data Services (ORDS) version. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Oracledatabase\V1\AutonomousDatabase::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The Oracle APEX Application Development version. + * + * Generated from protobuf field string apex_version = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getApexVersion() + { + return $this->apex_version; + } + + /** + * Output only. The Oracle APEX Application Development version. + * + * Generated from protobuf field string apex_version = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setApexVersion($var) + { + GPBUtil::checkString($var, True); + $this->apex_version = $var; + + return $this; + } + + /** + * Output only. The Oracle REST Data Services (ORDS) version. + * + * Generated from protobuf field string ords_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getOrdsVersion() + { + return $this->ords_version; + } + + /** + * Output only. The Oracle REST Data Services (ORDS) version. + * + * Generated from protobuf field string ords_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setOrdsVersion($var) + { + GPBUtil::checkString($var, True); + $this->ords_version = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseBackup.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseBackup.php new file mode 100644 index 000000000000..a19e4245197b --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseBackup.php @@ -0,0 +1,234 @@ +google.cloud.oracledatabase.v1.AutonomousDatabaseBackup + */ +class AutonomousDatabaseBackup extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The name of the Autonomous Database Backup resource with the + * format: + * projects/{project}/locations/{region}/autonomousDatabaseBackups/{autonomous_database_backup} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Required. The name of the Autonomous Database resource for which the backup + * is being created. Format: + * projects/{project}/locations/{region}/autonomousDatabases/{autonomous_database} + * + * Generated from protobuf field string autonomous_database = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $autonomous_database = ''; + /** + * Optional. User friendly name for the Backup. The name does not have to be + * unique. + * + * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $display_name = ''; + /** + * Optional. Various properties of the backup. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseBackupProperties properties = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $properties = null; + /** + * Optional. labels or tags associated with the resource. + * + * Generated from protobuf field map labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The name of the Autonomous Database Backup resource with the + * format: + * projects/{project}/locations/{region}/autonomousDatabaseBackups/{autonomous_database_backup} + * @type string $autonomous_database + * Required. The name of the Autonomous Database resource for which the backup + * is being created. Format: + * projects/{project}/locations/{region}/autonomousDatabases/{autonomous_database} + * @type string $display_name + * Optional. User friendly name for the Backup. The name does not have to be + * unique. + * @type \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseBackupProperties $properties + * Optional. Various properties of the backup. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. labels or tags associated with the resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Oracledatabase\V1\AutonomousDbBackup::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The name of the Autonomous Database Backup resource with the + * format: + * projects/{project}/locations/{region}/autonomousDatabaseBackups/{autonomous_database_backup} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The name of the Autonomous Database Backup resource with the + * format: + * projects/{project}/locations/{region}/autonomousDatabaseBackups/{autonomous_database_backup} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. The name of the Autonomous Database resource for which the backup + * is being created. Format: + * projects/{project}/locations/{region}/autonomousDatabases/{autonomous_database} + * + * Generated from protobuf field string autonomous_database = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getAutonomousDatabase() + { + return $this->autonomous_database; + } + + /** + * Required. The name of the Autonomous Database resource for which the backup + * is being created. Format: + * projects/{project}/locations/{region}/autonomousDatabases/{autonomous_database} + * + * Generated from protobuf field string autonomous_database = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setAutonomousDatabase($var) + { + GPBUtil::checkString($var, True); + $this->autonomous_database = $var; + + return $this; + } + + /** + * Optional. User friendly name for the Backup. The name does not have to be + * unique. + * + * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Optional. User friendly name for the Backup. The name does not have to be + * unique. + * + * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Optional. Various properties of the backup. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseBackupProperties properties = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseBackupProperties|null + */ + public function getProperties() + { + return $this->properties; + } + + public function hasProperties() + { + return isset($this->properties); + } + + public function clearProperties() + { + unset($this->properties); + } + + /** + * Optional. Various properties of the backup. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseBackupProperties properties = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseBackupProperties $var + * @return $this + */ + public function setProperties($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseBackupProperties::class); + $this->properties = $var; + + return $this; + } + + /** + * Optional. labels or tags associated with the resource. + * + * Generated from protobuf field map labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. labels or tags associated with the resource. + * + * Generated from protobuf field map labels = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseBackupProperties.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseBackupProperties.php new file mode 100644 index 000000000000..ac444dd278f7 --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseBackupProperties.php @@ -0,0 +1,775 @@ +google.cloud.oracledatabase.v1.AutonomousDatabaseBackupProperties + */ +class AutonomousDatabaseBackupProperties extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. OCID of the Autonomous Database backup. + * https://docs.oracle.com/en-us/iaas/Content/General/Concepts/identifiers.htm#Oracle + * + * Generated from protobuf field string ocid = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $ocid = ''; + /** + * Optional. Retention period in days for the backup. + * + * Generated from protobuf field int32 retention_period_days = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $retention_period_days = 0; + /** + * Output only. The OCID of the compartment. + * + * Generated from protobuf field string compartment_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $compartment_id = ''; + /** + * Output only. The quantity of data in the database, in terabytes. + * + * Generated from protobuf field float database_size_tb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $database_size_tb = 0.0; + /** + * Output only. A valid Oracle Database version for Autonomous Database. + * + * Generated from protobuf field string db_version = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $db_version = ''; + /** + * Output only. Indicates if the backup is long term backup. + * + * Generated from protobuf field bool is_long_term_backup = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $is_long_term_backup = false; + /** + * Output only. Indicates if the backup is automatic or user initiated. + * + * Generated from protobuf field bool is_automatic_backup = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $is_automatic_backup = false; + /** + * Output only. Indicates if the backup can be used to restore the Autonomous + * Database. + * + * Generated from protobuf field bool is_restorable = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $is_restorable = false; + /** + * Optional. The OCID of the key store of Oracle Vault. + * + * Generated from protobuf field string key_store_id = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $key_store_id = ''; + /** + * Optional. The wallet name for Oracle Key Vault. + * + * Generated from protobuf field string key_store_wallet = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $key_store_wallet = ''; + /** + * Optional. The OCID of the key container that is used as the master + * encryption key in database transparent data encryption (TDE) operations. + * + * Generated from protobuf field string kms_key_id = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $kms_key_id = ''; + /** + * Optional. The OCID of the key container version that is used in database + * transparent data encryption (TDE) operations KMS Key can have multiple key + * versions. If none is specified, the current key version (latest) of the Key + * Id is used for the operation. Autonomous Database Serverless does not use + * key versions, hence is not applicable for Autonomous Database Serverless + * instances. + * + * Generated from protobuf field string kms_key_version_id = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $kms_key_version_id = ''; + /** + * Output only. Additional information about the current lifecycle state. + * + * Generated from protobuf field string lifecycle_details = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $lifecycle_details = ''; + /** + * Output only. The lifecycle state of the backup. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseBackupProperties.State lifecycle_state = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $lifecycle_state = 0; + /** + * Output only. The backup size in terabytes. + * + * Generated from protobuf field float size_tb = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $size_tb = 0.0; + /** + * Output only. Timestamp until when the backup will be available. + * + * Generated from protobuf field .google.protobuf.Timestamp available_till_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $available_till_time = null; + /** + * Output only. The date and time the backup completed. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $end_time = null; + /** + * Output only. The date and time the backup started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $start_time = null; + /** + * Output only. The type of the backup. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseBackupProperties.Type type = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $type = 0; + /** + * Optional. The OCID of the vault. + * + * Generated from protobuf field string vault_id = 20 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $vault_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $ocid + * Output only. OCID of the Autonomous Database backup. + * https://docs.oracle.com/en-us/iaas/Content/General/Concepts/identifiers.htm#Oracle + * @type int $retention_period_days + * Optional. Retention period in days for the backup. + * @type string $compartment_id + * Output only. The OCID of the compartment. + * @type float $database_size_tb + * Output only. The quantity of data in the database, in terabytes. + * @type string $db_version + * Output only. A valid Oracle Database version for Autonomous Database. + * @type bool $is_long_term_backup + * Output only. Indicates if the backup is long term backup. + * @type bool $is_automatic_backup + * Output only. Indicates if the backup is automatic or user initiated. + * @type bool $is_restorable + * Output only. Indicates if the backup can be used to restore the Autonomous + * Database. + * @type string $key_store_id + * Optional. The OCID of the key store of Oracle Vault. + * @type string $key_store_wallet + * Optional. The wallet name for Oracle Key Vault. + * @type string $kms_key_id + * Optional. The OCID of the key container that is used as the master + * encryption key in database transparent data encryption (TDE) operations. + * @type string $kms_key_version_id + * Optional. The OCID of the key container version that is used in database + * transparent data encryption (TDE) operations KMS Key can have multiple key + * versions. If none is specified, the current key version (latest) of the Key + * Id is used for the operation. Autonomous Database Serverless does not use + * key versions, hence is not applicable for Autonomous Database Serverless + * instances. + * @type string $lifecycle_details + * Output only. Additional information about the current lifecycle state. + * @type int $lifecycle_state + * Output only. The lifecycle state of the backup. + * @type float $size_tb + * Output only. The backup size in terabytes. + * @type \Google\Protobuf\Timestamp $available_till_time + * Output only. Timestamp until when the backup will be available. + * @type \Google\Protobuf\Timestamp $end_time + * Output only. The date and time the backup completed. + * @type \Google\Protobuf\Timestamp $start_time + * Output only. The date and time the backup started. + * @type int $type + * Output only. The type of the backup. + * @type string $vault_id + * Optional. The OCID of the vault. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Oracledatabase\V1\AutonomousDbBackup::initOnce(); + parent::__construct($data); + } + + /** + * Output only. OCID of the Autonomous Database backup. + * https://docs.oracle.com/en-us/iaas/Content/General/Concepts/identifiers.htm#Oracle + * + * Generated from protobuf field string ocid = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getOcid() + { + return $this->ocid; + } + + /** + * Output only. OCID of the Autonomous Database backup. + * https://docs.oracle.com/en-us/iaas/Content/General/Concepts/identifiers.htm#Oracle + * + * Generated from protobuf field string ocid = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setOcid($var) + { + GPBUtil::checkString($var, True); + $this->ocid = $var; + + return $this; + } + + /** + * Optional. Retention period in days for the backup. + * + * Generated from protobuf field int32 retention_period_days = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getRetentionPeriodDays() + { + return $this->retention_period_days; + } + + /** + * Optional. Retention period in days for the backup. + * + * Generated from protobuf field int32 retention_period_days = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setRetentionPeriodDays($var) + { + GPBUtil::checkInt32($var); + $this->retention_period_days = $var; + + return $this; + } + + /** + * Output only. The OCID of the compartment. + * + * Generated from protobuf field string compartment_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getCompartmentId() + { + return $this->compartment_id; + } + + /** + * Output only. The OCID of the compartment. + * + * Generated from protobuf field string compartment_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setCompartmentId($var) + { + GPBUtil::checkString($var, True); + $this->compartment_id = $var; + + return $this; + } + + /** + * Output only. The quantity of data in the database, in terabytes. + * + * Generated from protobuf field float database_size_tb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return float + */ + public function getDatabaseSizeTb() + { + return $this->database_size_tb; + } + + /** + * Output only. The quantity of data in the database, in terabytes. + * + * Generated from protobuf field float database_size_tb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param float $var + * @return $this + */ + public function setDatabaseSizeTb($var) + { + GPBUtil::checkFloat($var); + $this->database_size_tb = $var; + + return $this; + } + + /** + * Output only. A valid Oracle Database version for Autonomous Database. + * + * Generated from protobuf field string db_version = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDbVersion() + { + return $this->db_version; + } + + /** + * Output only. A valid Oracle Database version for Autonomous Database. + * + * Generated from protobuf field string db_version = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setDbVersion($var) + { + GPBUtil::checkString($var, True); + $this->db_version = $var; + + return $this; + } + + /** + * Output only. Indicates if the backup is long term backup. + * + * Generated from protobuf field bool is_long_term_backup = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getIsLongTermBackup() + { + return $this->is_long_term_backup; + } + + /** + * Output only. Indicates if the backup is long term backup. + * + * Generated from protobuf field bool is_long_term_backup = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setIsLongTermBackup($var) + { + GPBUtil::checkBool($var); + $this->is_long_term_backup = $var; + + return $this; + } + + /** + * Output only. Indicates if the backup is automatic or user initiated. + * + * Generated from protobuf field bool is_automatic_backup = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getIsAutomaticBackup() + { + return $this->is_automatic_backup; + } + + /** + * Output only. Indicates if the backup is automatic or user initiated. + * + * Generated from protobuf field bool is_automatic_backup = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setIsAutomaticBackup($var) + { + GPBUtil::checkBool($var); + $this->is_automatic_backup = $var; + + return $this; + } + + /** + * Output only. Indicates if the backup can be used to restore the Autonomous + * Database. + * + * Generated from protobuf field bool is_restorable = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getIsRestorable() + { + return $this->is_restorable; + } + + /** + * Output only. Indicates if the backup can be used to restore the Autonomous + * Database. + * + * Generated from protobuf field bool is_restorable = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setIsRestorable($var) + { + GPBUtil::checkBool($var); + $this->is_restorable = $var; + + return $this; + } + + /** + * Optional. The OCID of the key store of Oracle Vault. + * + * Generated from protobuf field string key_store_id = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getKeyStoreId() + { + return $this->key_store_id; + } + + /** + * Optional. The OCID of the key store of Oracle Vault. + * + * Generated from protobuf field string key_store_id = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setKeyStoreId($var) + { + GPBUtil::checkString($var, True); + $this->key_store_id = $var; + + return $this; + } + + /** + * Optional. The wallet name for Oracle Key Vault. + * + * Generated from protobuf field string key_store_wallet = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getKeyStoreWallet() + { + return $this->key_store_wallet; + } + + /** + * Optional. The wallet name for Oracle Key Vault. + * + * Generated from protobuf field string key_store_wallet = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setKeyStoreWallet($var) + { + GPBUtil::checkString($var, True); + $this->key_store_wallet = $var; + + return $this; + } + + /** + * Optional. The OCID of the key container that is used as the master + * encryption key in database transparent data encryption (TDE) operations. + * + * Generated from protobuf field string kms_key_id = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getKmsKeyId() + { + return $this->kms_key_id; + } + + /** + * Optional. The OCID of the key container that is used as the master + * encryption key in database transparent data encryption (TDE) operations. + * + * Generated from protobuf field string kms_key_id = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setKmsKeyId($var) + { + GPBUtil::checkString($var, True); + $this->kms_key_id = $var; + + return $this; + } + + /** + * Optional. The OCID of the key container version that is used in database + * transparent data encryption (TDE) operations KMS Key can have multiple key + * versions. If none is specified, the current key version (latest) of the Key + * Id is used for the operation. Autonomous Database Serverless does not use + * key versions, hence is not applicable for Autonomous Database Serverless + * instances. + * + * Generated from protobuf field string kms_key_version_id = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getKmsKeyVersionId() + { + return $this->kms_key_version_id; + } + + /** + * Optional. The OCID of the key container version that is used in database + * transparent data encryption (TDE) operations KMS Key can have multiple key + * versions. If none is specified, the current key version (latest) of the Key + * Id is used for the operation. Autonomous Database Serverless does not use + * key versions, hence is not applicable for Autonomous Database Serverless + * instances. + * + * Generated from protobuf field string kms_key_version_id = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setKmsKeyVersionId($var) + { + GPBUtil::checkString($var, True); + $this->kms_key_version_id = $var; + + return $this; + } + + /** + * Output only. Additional information about the current lifecycle state. + * + * Generated from protobuf field string lifecycle_details = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getLifecycleDetails() + { + return $this->lifecycle_details; + } + + /** + * Output only. Additional information about the current lifecycle state. + * + * Generated from protobuf field string lifecycle_details = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setLifecycleDetails($var) + { + GPBUtil::checkString($var, True); + $this->lifecycle_details = $var; + + return $this; + } + + /** + * Output only. The lifecycle state of the backup. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseBackupProperties.State lifecycle_state = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getLifecycleState() + { + return $this->lifecycle_state; + } + + /** + * Output only. The lifecycle state of the backup. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseBackupProperties.State lifecycle_state = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setLifecycleState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseBackupProperties\State::class); + $this->lifecycle_state = $var; + + return $this; + } + + /** + * Output only. The backup size in terabytes. + * + * Generated from protobuf field float size_tb = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return float + */ + public function getSizeTb() + { + return $this->size_tb; + } + + /** + * Output only. The backup size in terabytes. + * + * Generated from protobuf field float size_tb = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param float $var + * @return $this + */ + public function setSizeTb($var) + { + GPBUtil::checkFloat($var); + $this->size_tb = $var; + + return $this; + } + + /** + * Output only. Timestamp until when the backup will be available. + * + * Generated from protobuf field .google.protobuf.Timestamp available_till_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getAvailableTillTime() + { + return $this->available_till_time; + } + + public function hasAvailableTillTime() + { + return isset($this->available_till_time); + } + + public function clearAvailableTillTime() + { + unset($this->available_till_time); + } + + /** + * Output only. Timestamp until when the backup will be available. + * + * Generated from protobuf field .google.protobuf.Timestamp available_till_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setAvailableTillTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->available_till_time = $var; + + return $this; + } + + /** + * Output only. The date and time the backup completed. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEndTime() + { + return $this->end_time; + } + + public function hasEndTime() + { + return isset($this->end_time); + } + + public function clearEndTime() + { + unset($this->end_time); + } + + /** + * Output only. The date and time the backup completed. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * Output only. The date and time the backup started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getStartTime() + { + return $this->start_time; + } + + public function hasStartTime() + { + return isset($this->start_time); + } + + public function clearStartTime() + { + unset($this->start_time); + } + + /** + * Output only. The date and time the backup started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * Output only. The type of the backup. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseBackupProperties.Type type = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Output only. The type of the backup. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseBackupProperties.Type type = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseBackupProperties\Type::class); + $this->type = $var; + + return $this; + } + + /** + * Optional. The OCID of the vault. + * + * Generated from protobuf field string vault_id = 20 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getVaultId() + { + return $this->vault_id; + } + + /** + * Optional. The OCID of the vault. + * + * Generated from protobuf field string vault_id = 20 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setVaultId($var) + { + GPBUtil::checkString($var, True); + $this->vault_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseBackupProperties/State.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseBackupProperties/State.php new file mode 100644 index 000000000000..ea7dfe519e53 --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseBackupProperties/State.php @@ -0,0 +1,92 @@ +google.cloud.oracledatabase.v1.AutonomousDatabaseBackupProperties.State + */ +class State +{ + /** + * Default unspecified value. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Indicates that the resource is in creating state. + * + * Generated from protobuf enum CREATING = 1; + */ + const CREATING = 1; + /** + * Indicates that the resource is in active state. + * + * Generated from protobuf enum ACTIVE = 2; + */ + const ACTIVE = 2; + /** + * Indicates that the resource is in deleting state. + * + * Generated from protobuf enum DELETING = 3; + */ + const DELETING = 3; + /** + * Indicates that the resource is in deleted state. + * + * Generated from protobuf enum DELETED = 4; + */ + const DELETED = 4; + /** + * Indicates that the resource is in failed state. + * + * Generated from protobuf enum FAILED = 6; + */ + const FAILED = 6; + /** + * Indicates that the resource is in updating state. + * + * Generated from protobuf enum UPDATING = 7; + */ + const UPDATING = 7; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::CREATING => 'CREATING', + self::ACTIVE => 'ACTIVE', + self::DELETING => 'DELETING', + self::DELETED => 'DELETED', + self::FAILED => 'FAILED', + self::UPDATING => 'UPDATING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseBackupProperties_State::class); + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseBackupProperties/Type.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseBackupProperties/Type.php new file mode 100644 index 000000000000..4f5c2fd88ce8 --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseBackupProperties/Type.php @@ -0,0 +1,71 @@ +google.cloud.oracledatabase.v1.AutonomousDatabaseBackupProperties.Type + */ +class Type +{ + /** + * Default unspecified value. + * + * Generated from protobuf enum TYPE_UNSPECIFIED = 0; + */ + const TYPE_UNSPECIFIED = 0; + /** + * Incremental backups. + * + * Generated from protobuf enum INCREMENTAL = 1; + */ + const INCREMENTAL = 1; + /** + * Full backups. + * + * Generated from protobuf enum FULL = 2; + */ + const FULL = 2; + /** + * Long term backups. + * + * Generated from protobuf enum LONG_TERM = 3; + */ + const LONG_TERM = 3; + + private static $valueToName = [ + self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', + self::INCREMENTAL => 'INCREMENTAL', + self::FULL => 'FULL', + self::LONG_TERM => 'LONG_TERM', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Type::class, \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseBackupProperties_Type::class); + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseCharacterSet.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseCharacterSet.php new file mode 100644 index 000000000000..638716a2eaf4 --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseCharacterSet.php @@ -0,0 +1,148 @@ +google.cloud.oracledatabase.v1.AutonomousDatabaseCharacterSet + */ +class AutonomousDatabaseCharacterSet extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The name of the Autonomous Database Character Set resource in + * the following format: + * projects/{project}/locations/{region}/autonomousDatabaseCharacterSets/{autonomous_database_character_set} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Output only. The character set type for the Autonomous Database. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseCharacterSet.CharacterSetType character_set_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $character_set_type = 0; + /** + * Output only. The character set name for the Autonomous Database which is + * the ID in the resource name. + * + * Generated from protobuf field string character_set = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $character_set = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The name of the Autonomous Database Character Set resource in + * the following format: + * projects/{project}/locations/{region}/autonomousDatabaseCharacterSets/{autonomous_database_character_set} + * @type int $character_set_type + * Output only. The character set type for the Autonomous Database. + * @type string $character_set + * Output only. The character set name for the Autonomous Database which is + * the ID in the resource name. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Oracledatabase\V1\AutonomousDatabaseCharacterSet::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The name of the Autonomous Database Character Set resource in + * the following format: + * projects/{project}/locations/{region}/autonomousDatabaseCharacterSets/{autonomous_database_character_set} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The name of the Autonomous Database Character Set resource in + * the following format: + * projects/{project}/locations/{region}/autonomousDatabaseCharacterSets/{autonomous_database_character_set} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The character set type for the Autonomous Database. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseCharacterSet.CharacterSetType character_set_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getCharacterSetType() + { + return $this->character_set_type; + } + + /** + * Output only. The character set type for the Autonomous Database. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseCharacterSet.CharacterSetType character_set_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setCharacterSetType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseCharacterSet\CharacterSetType::class); + $this->character_set_type = $var; + + return $this; + } + + /** + * Output only. The character set name for the Autonomous Database which is + * the ID in the resource name. + * + * Generated from protobuf field string character_set = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getCharacterSet() + { + return $this->character_set; + } + + /** + * Output only. The character set name for the Autonomous Database which is + * the ID in the resource name. + * + * Generated from protobuf field string character_set = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setCharacterSet($var) + { + GPBUtil::checkString($var, True); + $this->character_set = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseCharacterSet/CharacterSetType.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseCharacterSet/CharacterSetType.php new file mode 100644 index 000000000000..fd0be0808cca --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseCharacterSet/CharacterSetType.php @@ -0,0 +1,64 @@ +google.cloud.oracledatabase.v1.AutonomousDatabaseCharacterSet.CharacterSetType + */ +class CharacterSetType +{ + /** + * Character set type is not specified. + * + * Generated from protobuf enum CHARACTER_SET_TYPE_UNSPECIFIED = 0; + */ + const CHARACTER_SET_TYPE_UNSPECIFIED = 0; + /** + * Character set type is set to database. + * + * Generated from protobuf enum DATABASE = 1; + */ + const DATABASE = 1; + /** + * Character set type is set to national. + * + * Generated from protobuf enum NATIONAL = 2; + */ + const NATIONAL = 2; + + private static $valueToName = [ + self::CHARACTER_SET_TYPE_UNSPECIFIED => 'CHARACTER_SET_TYPE_UNSPECIFIED', + self::DATABASE => 'DATABASE', + self::NATIONAL => 'NATIONAL', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(CharacterSetType::class, \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseCharacterSet_CharacterSetType::class); + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseConnectionStrings.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseConnectionStrings.php new file mode 100644 index 000000000000..3684fe56deea --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseConnectionStrings.php @@ -0,0 +1,276 @@ +google.cloud.oracledatabase.v1.AutonomousDatabaseConnectionStrings + */ +class AutonomousDatabaseConnectionStrings extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Returns all connection strings that can be used to connect to + * the Autonomous Database. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.AllConnectionStrings all_connection_strings = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $all_connection_strings = null; + /** + * Output only. The database service provides the least level of resources to + * each SQL statement, but supports the most number of concurrent SQL + * statements. + * + * Generated from protobuf field string dedicated = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $dedicated = ''; + /** + * Output only. The database service provides the highest level of resources + * to each SQL statement. + * + * Generated from protobuf field string high = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $high = ''; + /** + * Output only. The database service provides the least level of resources to + * each SQL statement. + * + * Generated from protobuf field string low = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $low = ''; + /** + * Output only. The database service provides a lower level of resources to + * each SQL statement. + * + * Generated from protobuf field string medium = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $medium = ''; + /** + * Output only. A list of connection string profiles to allow clients to + * group, filter, and select values based on the structured metadata. + * + * Generated from protobuf field repeated .google.cloud.oracledatabase.v1.DatabaseConnectionStringProfile profiles = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $profiles; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\OracleDatabase\V1\AllConnectionStrings $all_connection_strings + * Output only. Returns all connection strings that can be used to connect to + * the Autonomous Database. + * @type string $dedicated + * Output only. The database service provides the least level of resources to + * each SQL statement, but supports the most number of concurrent SQL + * statements. + * @type string $high + * Output only. The database service provides the highest level of resources + * to each SQL statement. + * @type string $low + * Output only. The database service provides the least level of resources to + * each SQL statement. + * @type string $medium + * Output only. The database service provides a lower level of resources to + * each SQL statement. + * @type array<\Google\Cloud\OracleDatabase\V1\DatabaseConnectionStringProfile>|\Google\Protobuf\Internal\RepeatedField $profiles + * Output only. A list of connection string profiles to allow clients to + * group, filter, and select values based on the structured metadata. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Oracledatabase\V1\AutonomousDatabase::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Returns all connection strings that can be used to connect to + * the Autonomous Database. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.AllConnectionStrings all_connection_strings = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\OracleDatabase\V1\AllConnectionStrings|null + */ + public function getAllConnectionStrings() + { + return $this->all_connection_strings; + } + + public function hasAllConnectionStrings() + { + return isset($this->all_connection_strings); + } + + public function clearAllConnectionStrings() + { + unset($this->all_connection_strings); + } + + /** + * Output only. Returns all connection strings that can be used to connect to + * the Autonomous Database. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.AllConnectionStrings all_connection_strings = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\OracleDatabase\V1\AllConnectionStrings $var + * @return $this + */ + public function setAllConnectionStrings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OracleDatabase\V1\AllConnectionStrings::class); + $this->all_connection_strings = $var; + + return $this; + } + + /** + * Output only. The database service provides the least level of resources to + * each SQL statement, but supports the most number of concurrent SQL + * statements. + * + * Generated from protobuf field string dedicated = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDedicated() + { + return $this->dedicated; + } + + /** + * Output only. The database service provides the least level of resources to + * each SQL statement, but supports the most number of concurrent SQL + * statements. + * + * Generated from protobuf field string dedicated = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setDedicated($var) + { + GPBUtil::checkString($var, True); + $this->dedicated = $var; + + return $this; + } + + /** + * Output only. The database service provides the highest level of resources + * to each SQL statement. + * + * Generated from protobuf field string high = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getHigh() + { + return $this->high; + } + + /** + * Output only. The database service provides the highest level of resources + * to each SQL statement. + * + * Generated from protobuf field string high = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setHigh($var) + { + GPBUtil::checkString($var, True); + $this->high = $var; + + return $this; + } + + /** + * Output only. The database service provides the least level of resources to + * each SQL statement. + * + * Generated from protobuf field string low = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getLow() + { + return $this->low; + } + + /** + * Output only. The database service provides the least level of resources to + * each SQL statement. + * + * Generated from protobuf field string low = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setLow($var) + { + GPBUtil::checkString($var, True); + $this->low = $var; + + return $this; + } + + /** + * Output only. The database service provides a lower level of resources to + * each SQL statement. + * + * Generated from protobuf field string medium = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getMedium() + { + return $this->medium; + } + + /** + * Output only. The database service provides a lower level of resources to + * each SQL statement. + * + * Generated from protobuf field string medium = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setMedium($var) + { + GPBUtil::checkString($var, True); + $this->medium = $var; + + return $this; + } + + /** + * Output only. A list of connection string profiles to allow clients to + * group, filter, and select values based on the structured metadata. + * + * Generated from protobuf field repeated .google.cloud.oracledatabase.v1.DatabaseConnectionStringProfile profiles = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getProfiles() + { + return $this->profiles; + } + + /** + * Output only. A list of connection string profiles to allow clients to + * group, filter, and select values based on the structured metadata. + * + * Generated from protobuf field repeated .google.cloud.oracledatabase.v1.DatabaseConnectionStringProfile profiles = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\OracleDatabase\V1\DatabaseConnectionStringProfile>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setProfiles($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\OracleDatabase\V1\DatabaseConnectionStringProfile::class); + $this->profiles = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseConnectionUrls.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseConnectionUrls.php new file mode 100644 index 000000000000..fe73d1ecf700 --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseConnectionUrls.php @@ -0,0 +1,327 @@ +google.cloud.oracledatabase.v1.AutonomousDatabaseConnectionUrls + */ +class AutonomousDatabaseConnectionUrls extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Oracle Application Express (APEX) URL. + * + * Generated from protobuf field string apex_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $apex_uri = ''; + /** + * Output only. The URL of the Database Transforms for the Autonomous + * Database. + * + * Generated from protobuf field string database_transforms_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $database_transforms_uri = ''; + /** + * Output only. The URL of the Graph Studio for the Autonomous Database. + * + * Generated from protobuf field string graph_studio_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $graph_studio_uri = ''; + /** + * Output only. The URL of the Oracle Machine Learning (OML) Notebook for the + * Autonomous Database. + * + * Generated from protobuf field string machine_learning_notebook_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $machine_learning_notebook_uri = ''; + /** + * Output only. The URL of Machine Learning user management the Autonomous + * Database. + * + * Generated from protobuf field string machine_learning_user_management_uri = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $machine_learning_user_management_uri = ''; + /** + * Output only. The URL of the MongoDB API for the Autonomous Database. + * + * Generated from protobuf field string mongo_db_uri = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $mongo_db_uri = ''; + /** + * Output only. The Oracle REST Data Services (ORDS) URL of the Web Access for + * the Autonomous Database. + * + * Generated from protobuf field string ords_uri = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $ords_uri = ''; + /** + * Output only. The URL of the Oracle SQL Developer Web for the Autonomous + * Database. + * + * Generated from protobuf field string sql_dev_web_uri = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $sql_dev_web_uri = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $apex_uri + * Output only. Oracle Application Express (APEX) URL. + * @type string $database_transforms_uri + * Output only. The URL of the Database Transforms for the Autonomous + * Database. + * @type string $graph_studio_uri + * Output only. The URL of the Graph Studio for the Autonomous Database. + * @type string $machine_learning_notebook_uri + * Output only. The URL of the Oracle Machine Learning (OML) Notebook for the + * Autonomous Database. + * @type string $machine_learning_user_management_uri + * Output only. The URL of Machine Learning user management the Autonomous + * Database. + * @type string $mongo_db_uri + * Output only. The URL of the MongoDB API for the Autonomous Database. + * @type string $ords_uri + * Output only. The Oracle REST Data Services (ORDS) URL of the Web Access for + * the Autonomous Database. + * @type string $sql_dev_web_uri + * Output only. The URL of the Oracle SQL Developer Web for the Autonomous + * Database. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Oracledatabase\V1\AutonomousDatabase::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Oracle Application Express (APEX) URL. + * + * Generated from protobuf field string apex_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getApexUri() + { + return $this->apex_uri; + } + + /** + * Output only. Oracle Application Express (APEX) URL. + * + * Generated from protobuf field string apex_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setApexUri($var) + { + GPBUtil::checkString($var, True); + $this->apex_uri = $var; + + return $this; + } + + /** + * Output only. The URL of the Database Transforms for the Autonomous + * Database. + * + * Generated from protobuf field string database_transforms_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDatabaseTransformsUri() + { + return $this->database_transforms_uri; + } + + /** + * Output only. The URL of the Database Transforms for the Autonomous + * Database. + * + * Generated from protobuf field string database_transforms_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setDatabaseTransformsUri($var) + { + GPBUtil::checkString($var, True); + $this->database_transforms_uri = $var; + + return $this; + } + + /** + * Output only. The URL of the Graph Studio for the Autonomous Database. + * + * Generated from protobuf field string graph_studio_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getGraphStudioUri() + { + return $this->graph_studio_uri; + } + + /** + * Output only. The URL of the Graph Studio for the Autonomous Database. + * + * Generated from protobuf field string graph_studio_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setGraphStudioUri($var) + { + GPBUtil::checkString($var, True); + $this->graph_studio_uri = $var; + + return $this; + } + + /** + * Output only. The URL of the Oracle Machine Learning (OML) Notebook for the + * Autonomous Database. + * + * Generated from protobuf field string machine_learning_notebook_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getMachineLearningNotebookUri() + { + return $this->machine_learning_notebook_uri; + } + + /** + * Output only. The URL of the Oracle Machine Learning (OML) Notebook for the + * Autonomous Database. + * + * Generated from protobuf field string machine_learning_notebook_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setMachineLearningNotebookUri($var) + { + GPBUtil::checkString($var, True); + $this->machine_learning_notebook_uri = $var; + + return $this; + } + + /** + * Output only. The URL of Machine Learning user management the Autonomous + * Database. + * + * Generated from protobuf field string machine_learning_user_management_uri = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getMachineLearningUserManagementUri() + { + return $this->machine_learning_user_management_uri; + } + + /** + * Output only. The URL of Machine Learning user management the Autonomous + * Database. + * + * Generated from protobuf field string machine_learning_user_management_uri = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setMachineLearningUserManagementUri($var) + { + GPBUtil::checkString($var, True); + $this->machine_learning_user_management_uri = $var; + + return $this; + } + + /** + * Output only. The URL of the MongoDB API for the Autonomous Database. + * + * Generated from protobuf field string mongo_db_uri = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getMongoDbUri() + { + return $this->mongo_db_uri; + } + + /** + * Output only. The URL of the MongoDB API for the Autonomous Database. + * + * Generated from protobuf field string mongo_db_uri = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setMongoDbUri($var) + { + GPBUtil::checkString($var, True); + $this->mongo_db_uri = $var; + + return $this; + } + + /** + * Output only. The Oracle REST Data Services (ORDS) URL of the Web Access for + * the Autonomous Database. + * + * Generated from protobuf field string ords_uri = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getOrdsUri() + { + return $this->ords_uri; + } + + /** + * Output only. The Oracle REST Data Services (ORDS) URL of the Web Access for + * the Autonomous Database. + * + * Generated from protobuf field string ords_uri = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setOrdsUri($var) + { + GPBUtil::checkString($var, True); + $this->ords_uri = $var; + + return $this; + } + + /** + * Output only. The URL of the Oracle SQL Developer Web for the Autonomous + * Database. + * + * Generated from protobuf field string sql_dev_web_uri = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getSqlDevWebUri() + { + return $this->sql_dev_web_uri; + } + + /** + * Output only. The URL of the Oracle SQL Developer Web for the Autonomous + * Database. + * + * Generated from protobuf field string sql_dev_web_uri = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setSqlDevWebUri($var) + { + GPBUtil::checkString($var, True); + $this->sql_dev_web_uri = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseProperties.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseProperties.php new file mode 100644 index 000000000000..84d85890f412 --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseProperties.php @@ -0,0 +1,2197 @@ +google.cloud.oracledatabase.v1.AutonomousDatabaseProperties + */ +class AutonomousDatabaseProperties extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. OCID of the Autonomous Database. + * https://docs.oracle.com/en-us/iaas/Content/General/Concepts/identifiers.htm#Oracle + * + * Generated from protobuf field string ocid = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $ocid = ''; + /** + * Optional. The number of compute servers for the Autonomous Database. + * + * Generated from protobuf field float compute_count = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $compute_count = 0.0; + /** + * Optional. The number of CPU cores to be made available to the database. + * + * Generated from protobuf field int32 cpu_core_count = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $cpu_core_count = 0; + /** + * Optional. The size of the data stored in the database, in terabytes. + * + * Generated from protobuf field int32 data_storage_size_tb = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $data_storage_size_tb = 0; + /** + * Optional. The size of the data stored in the database, in gigabytes. + * + * Generated from protobuf field int32 data_storage_size_gb = 63 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $data_storage_size_gb = 0; + /** + * Required. The workload type of the Autonomous Database. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.DBWorkload db_workload = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $db_workload = 0; + /** + * Optional. The edition of the Autonomous Databases. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.DatabaseEdition db_edition = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $db_edition = 0; + /** + * Optional. The character set for the Autonomous Database. The default is + * AL32UTF8. + * + * Generated from protobuf field string character_set = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $character_set = ''; + /** + * Optional. The national character set for the Autonomous Database. The + * default is AL16UTF16. + * + * Generated from protobuf field string n_character_set = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $n_character_set = ''; + /** + * Optional. The private endpoint IP address for the Autonomous Database. + * + * Generated from protobuf field string private_endpoint_ip = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $private_endpoint_ip = ''; + /** + * Optional. The private endpoint label for the Autonomous Database. + * + * Generated from protobuf field string private_endpoint_label = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $private_endpoint_label = ''; + /** + * Optional. The Oracle Database version for the Autonomous Database. + * + * Generated from protobuf field string db_version = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $db_version = ''; + /** + * Optional. This field indicates if auto scaling is enabled for the + * Autonomous Database CPU core count. + * + * Generated from protobuf field bool is_auto_scaling_enabled = 14 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $is_auto_scaling_enabled = false; + /** + * Optional. This field indicates if auto scaling is enabled for the + * Autonomous Database storage. + * + * Generated from protobuf field bool is_storage_auto_scaling_enabled = 15 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $is_storage_auto_scaling_enabled = false; + /** + * Required. The license type used for the Autonomous Database. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.LicenseType license_type = 16 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $license_type = 0; + /** + * Optional. The list of customer contacts. + * + * Generated from protobuf field repeated .google.cloud.oracledatabase.v1.CustomerContact customer_contacts = 17 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $customer_contacts; + /** + * Optional. The ID of the Oracle Cloud Infrastructure vault secret. + * + * Generated from protobuf field string secret_id = 18 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $secret_id = ''; + /** + * Optional. The ID of the Oracle Cloud Infrastructure vault. + * + * Generated from protobuf field string vault_id = 19 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $vault_id = ''; + /** + * Optional. The maintenance schedule of the Autonomous Database. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.MaintenanceScheduleType maintenance_schedule_type = 20 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $maintenance_schedule_type = 0; + /** + * Optional. This field specifies if the Autonomous Database requires mTLS + * connections. + * + * Generated from protobuf field bool mtls_connection_required = 34 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $mtls_connection_required = false; + /** + * Optional. The retention period for the Autonomous Database. This field is + * specified in days, can range from 1 day to 60 days, and has a default value + * of 60 days. + * + * Generated from protobuf field int32 backup_retention_period_days = 57 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $backup_retention_period_days = 0; + /** + * Output only. The amount of storage currently being used for user and system + * data, in terabytes. + * + * Generated from protobuf field double actual_used_data_storage_size_tb = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $actual_used_data_storage_size_tb = 0.0; + /** + * Output only. The amount of storage currently allocated for the database + * tables and billed for, rounded up in terabytes. + * + * Generated from protobuf field double allocated_storage_size_tb = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $allocated_storage_size_tb = 0.0; + /** + * Output only. The details for the Oracle APEX Application Development. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseApex apex_details = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $apex_details = null; + /** + * Output only. This field indicates the status of Data Guard and Access + * control for the Autonomous Database. The field's value is null if Data + * Guard is disabled or Access Control is disabled. The field's value is TRUE + * if both Data Guard and Access Control are enabled, and the Autonomous + * Database is using primary IP access control list (ACL) for standby. The + * field's value is FALSE if both Data Guard and Access Control are enabled, + * and the Autonomous Database is using a different IP access control list + * (ACL) for standby compared to primary. + * + * Generated from protobuf field optional bool are_primary_allowlisted_ips_used = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $are_primary_allowlisted_ips_used = null; + /** + * Output only. The details of the current lifestyle state of the Autonomous + * Database. + * + * Generated from protobuf field string lifecycle_details = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $lifecycle_details = ''; + /** + * Output only. The current lifecycle state of the Autonomous Database. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.State state = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. The Autonomous Container Database OCID. + * + * Generated from protobuf field string autonomous_container_database_id = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $autonomous_container_database_id = ''; + /** + * Output only. The list of available Oracle Database upgrade versions for an + * Autonomous Database. + * + * Generated from protobuf field repeated string available_upgrade_versions = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $available_upgrade_versions; + /** + * Output only. The connection strings used to connect to an Autonomous + * Database. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseConnectionStrings connection_strings = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $connection_strings = null; + /** + * Output only. The Oracle Connection URLs for an Autonomous Database. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseConnectionUrls connection_urls = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $connection_urls = null; + /** + * Output only. This field indicates the number of seconds of data loss during + * a Data Guard failover. + * + * Generated from protobuf field .google.protobuf.Duration failed_data_recovery_duration = 31 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $failed_data_recovery_duration = null; + /** + * Output only. The memory assigned to in-memory tables in an Autonomous + * Database. + * + * Generated from protobuf field int32 memory_table_gbs = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $memory_table_gbs = 0; + /** + * Output only. This field indicates whether the Autonomous Database has local + * (in-region) Data Guard enabled. + * + * Generated from protobuf field bool is_local_data_guard_enabled = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $is_local_data_guard_enabled = false; + /** + * Output only. This field indicates the maximum data loss limit for an + * Autonomous Database, in seconds. + * + * Generated from protobuf field int32 local_adg_auto_failover_max_data_loss_limit = 35 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $local_adg_auto_failover_max_data_loss_limit = 0; + /** + * Output only. The details of the Autonomous Data Guard standby database. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseStandbySummary local_standby_db = 36 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $local_standby_db = null; + /** + * Output only. The amount of memory enabled per ECPU, in gigabytes. + * + * Generated from protobuf field int32 memory_per_oracle_compute_unit_gbs = 37 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $memory_per_oracle_compute_unit_gbs = 0; + /** + * Output only. This field indicates the local disaster recovery (DR) type of + * an Autonomous Database. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.LocalDisasterRecoveryType local_disaster_recovery_type = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $local_disaster_recovery_type = 0; + /** + * Output only. The current state of the Data Safe registration for the + * Autonomous Database. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.DataSafeState data_safe_state = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $data_safe_state = 0; + /** + * Output only. The current state of database management for the Autonomous + * Database. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.DatabaseManagementState database_management_state = 40 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $database_management_state = 0; + /** + * Output only. This field indicates the current mode of the Autonomous + * Database. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.OpenMode open_mode = 41 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $open_mode = 0; + /** + * Output only. This field indicates the state of Operations Insights for the + * Autonomous Database. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.OperationsInsightsState operations_insights_state = 42 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $operations_insights_state = 0; + /** + * Output only. The list of OCIDs of standby databases located in Autonomous + * Data Guard remote regions that are associated with the source database. + * + * Generated from protobuf field repeated string peer_db_ids = 43 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $peer_db_ids; + /** + * Output only. The permission level of the Autonomous Database. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.PermissionLevel permission_level = 44 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $permission_level = 0; + /** + * Output only. The private endpoint for the Autonomous Database. + * + * Generated from protobuf field string private_endpoint = 45 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $private_endpoint = ''; + /** + * Output only. The refresh mode of the cloned Autonomous Database. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.RefreshableMode refreshable_mode = 46 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $refreshable_mode = 0; + /** + * Output only. The refresh State of the clone. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.RefreshableState refreshable_state = 47 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $refreshable_state = 0; + /** + * Output only. The Data Guard role of the Autonomous Database. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.Role role = 48 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $role = 0; + /** + * Output only. The list and details of the scheduled operations of the + * Autonomous Database. + * + * Generated from protobuf field repeated .google.cloud.oracledatabase.v1.ScheduledOperationDetails scheduled_operation_details = 64 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $scheduled_operation_details; + /** + * Output only. The SQL Web Developer URL for the Autonomous Database. + * + * Generated from protobuf field string sql_web_developer_url = 50 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $sql_web_developer_url = ''; + /** + * Output only. The list of available regions that can be used to create a + * clone for the Autonomous Database. + * + * Generated from protobuf field repeated string supported_clone_regions = 51 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $supported_clone_regions; + /** + * Output only. The storage space used by Autonomous Database, in gigabytes. + * + * Generated from protobuf field int32 used_data_storage_size_tbs = 53 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $used_data_storage_size_tbs = 0; + /** + * Output only. The Oracle Cloud Infrastructure link for the Autonomous + * Database. + * + * Generated from protobuf field string oci_url = 54 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $oci_url = ''; + /** + * Output only. The storage space used by automatic backups of Autonomous + * Database, in gigabytes. + * + * Generated from protobuf field float total_auto_backup_storage_size_gbs = 59 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $total_auto_backup_storage_size_gbs = 0.0; + /** + * Output only. The long term backup schedule of the Autonomous Database. + * + * Generated from protobuf field .google.protobuf.Timestamp next_long_term_backup_time = 60 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $next_long_term_backup_time = null; + /** + * Output only. The date and time when maintenance will begin. + * + * Generated from protobuf field .google.protobuf.Timestamp maintenance_begin_time = 65 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $maintenance_begin_time = null; + /** + * Output only. The date and time when maintenance will end. + * + * Generated from protobuf field .google.protobuf.Timestamp maintenance_end_time = 66 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $maintenance_end_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $ocid + * Output only. OCID of the Autonomous Database. + * https://docs.oracle.com/en-us/iaas/Content/General/Concepts/identifiers.htm#Oracle + * @type float $compute_count + * Optional. The number of compute servers for the Autonomous Database. + * @type int $cpu_core_count + * Optional. The number of CPU cores to be made available to the database. + * @type int $data_storage_size_tb + * Optional. The size of the data stored in the database, in terabytes. + * @type int $data_storage_size_gb + * Optional. The size of the data stored in the database, in gigabytes. + * @type int $db_workload + * Required. The workload type of the Autonomous Database. + * @type int $db_edition + * Optional. The edition of the Autonomous Databases. + * @type string $character_set + * Optional. The character set for the Autonomous Database. The default is + * AL32UTF8. + * @type string $n_character_set + * Optional. The national character set for the Autonomous Database. The + * default is AL16UTF16. + * @type string $private_endpoint_ip + * Optional. The private endpoint IP address for the Autonomous Database. + * @type string $private_endpoint_label + * Optional. The private endpoint label for the Autonomous Database. + * @type string $db_version + * Optional. The Oracle Database version for the Autonomous Database. + * @type bool $is_auto_scaling_enabled + * Optional. This field indicates if auto scaling is enabled for the + * Autonomous Database CPU core count. + * @type bool $is_storage_auto_scaling_enabled + * Optional. This field indicates if auto scaling is enabled for the + * Autonomous Database storage. + * @type int $license_type + * Required. The license type used for the Autonomous Database. + * @type array<\Google\Cloud\OracleDatabase\V1\CustomerContact>|\Google\Protobuf\Internal\RepeatedField $customer_contacts + * Optional. The list of customer contacts. + * @type string $secret_id + * Optional. The ID of the Oracle Cloud Infrastructure vault secret. + * @type string $vault_id + * Optional. The ID of the Oracle Cloud Infrastructure vault. + * @type int $maintenance_schedule_type + * Optional. The maintenance schedule of the Autonomous Database. + * @type bool $mtls_connection_required + * Optional. This field specifies if the Autonomous Database requires mTLS + * connections. + * @type int $backup_retention_period_days + * Optional. The retention period for the Autonomous Database. This field is + * specified in days, can range from 1 day to 60 days, and has a default value + * of 60 days. + * @type float $actual_used_data_storage_size_tb + * Output only. The amount of storage currently being used for user and system + * data, in terabytes. + * @type float $allocated_storage_size_tb + * Output only. The amount of storage currently allocated for the database + * tables and billed for, rounded up in terabytes. + * @type \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseApex $apex_details + * Output only. The details for the Oracle APEX Application Development. + * @type bool $are_primary_allowlisted_ips_used + * Output only. This field indicates the status of Data Guard and Access + * control for the Autonomous Database. The field's value is null if Data + * Guard is disabled or Access Control is disabled. The field's value is TRUE + * if both Data Guard and Access Control are enabled, and the Autonomous + * Database is using primary IP access control list (ACL) for standby. The + * field's value is FALSE if both Data Guard and Access Control are enabled, + * and the Autonomous Database is using a different IP access control list + * (ACL) for standby compared to primary. + * @type string $lifecycle_details + * Output only. The details of the current lifestyle state of the Autonomous + * Database. + * @type int $state + * Output only. The current lifecycle state of the Autonomous Database. + * @type string $autonomous_container_database_id + * Output only. The Autonomous Container Database OCID. + * @type array|\Google\Protobuf\Internal\RepeatedField $available_upgrade_versions + * Output only. The list of available Oracle Database upgrade versions for an + * Autonomous Database. + * @type \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseConnectionStrings $connection_strings + * Output only. The connection strings used to connect to an Autonomous + * Database. + * @type \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseConnectionUrls $connection_urls + * Output only. The Oracle Connection URLs for an Autonomous Database. + * @type \Google\Protobuf\Duration $failed_data_recovery_duration + * Output only. This field indicates the number of seconds of data loss during + * a Data Guard failover. + * @type int $memory_table_gbs + * Output only. The memory assigned to in-memory tables in an Autonomous + * Database. + * @type bool $is_local_data_guard_enabled + * Output only. This field indicates whether the Autonomous Database has local + * (in-region) Data Guard enabled. + * @type int $local_adg_auto_failover_max_data_loss_limit + * Output only. This field indicates the maximum data loss limit for an + * Autonomous Database, in seconds. + * @type \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseStandbySummary $local_standby_db + * Output only. The details of the Autonomous Data Guard standby database. + * @type int $memory_per_oracle_compute_unit_gbs + * Output only. The amount of memory enabled per ECPU, in gigabytes. + * @type int $local_disaster_recovery_type + * Output only. This field indicates the local disaster recovery (DR) type of + * an Autonomous Database. + * @type int $data_safe_state + * Output only. The current state of the Data Safe registration for the + * Autonomous Database. + * @type int $database_management_state + * Output only. The current state of database management for the Autonomous + * Database. + * @type int $open_mode + * Output only. This field indicates the current mode of the Autonomous + * Database. + * @type int $operations_insights_state + * Output only. This field indicates the state of Operations Insights for the + * Autonomous Database. + * @type array|\Google\Protobuf\Internal\RepeatedField $peer_db_ids + * Output only. The list of OCIDs of standby databases located in Autonomous + * Data Guard remote regions that are associated with the source database. + * @type int $permission_level + * Output only. The permission level of the Autonomous Database. + * @type string $private_endpoint + * Output only. The private endpoint for the Autonomous Database. + * @type int $refreshable_mode + * Output only. The refresh mode of the cloned Autonomous Database. + * @type int $refreshable_state + * Output only. The refresh State of the clone. + * @type int $role + * Output only. The Data Guard role of the Autonomous Database. + * @type array<\Google\Cloud\OracleDatabase\V1\ScheduledOperationDetails>|\Google\Protobuf\Internal\RepeatedField $scheduled_operation_details + * Output only. The list and details of the scheduled operations of the + * Autonomous Database. + * @type string $sql_web_developer_url + * Output only. The SQL Web Developer URL for the Autonomous Database. + * @type array|\Google\Protobuf\Internal\RepeatedField $supported_clone_regions + * Output only. The list of available regions that can be used to create a + * clone for the Autonomous Database. + * @type int $used_data_storage_size_tbs + * Output only. The storage space used by Autonomous Database, in gigabytes. + * @type string $oci_url + * Output only. The Oracle Cloud Infrastructure link for the Autonomous + * Database. + * @type float $total_auto_backup_storage_size_gbs + * Output only. The storage space used by automatic backups of Autonomous + * Database, in gigabytes. + * @type \Google\Protobuf\Timestamp $next_long_term_backup_time + * Output only. The long term backup schedule of the Autonomous Database. + * @type \Google\Protobuf\Timestamp $maintenance_begin_time + * Output only. The date and time when maintenance will begin. + * @type \Google\Protobuf\Timestamp $maintenance_end_time + * Output only. The date and time when maintenance will end. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Oracledatabase\V1\AutonomousDatabase::initOnce(); + parent::__construct($data); + } + + /** + * Output only. OCID of the Autonomous Database. + * https://docs.oracle.com/en-us/iaas/Content/General/Concepts/identifiers.htm#Oracle + * + * Generated from protobuf field string ocid = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getOcid() + { + return $this->ocid; + } + + /** + * Output only. OCID of the Autonomous Database. + * https://docs.oracle.com/en-us/iaas/Content/General/Concepts/identifiers.htm#Oracle + * + * Generated from protobuf field string ocid = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setOcid($var) + { + GPBUtil::checkString($var, True); + $this->ocid = $var; + + return $this; + } + + /** + * Optional. The number of compute servers for the Autonomous Database. + * + * Generated from protobuf field float compute_count = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return float + */ + public function getComputeCount() + { + return $this->compute_count; + } + + /** + * Optional. The number of compute servers for the Autonomous Database. + * + * Generated from protobuf field float compute_count = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param float $var + * @return $this + */ + public function setComputeCount($var) + { + GPBUtil::checkFloat($var); + $this->compute_count = $var; + + return $this; + } + + /** + * Optional. The number of CPU cores to be made available to the database. + * + * Generated from protobuf field int32 cpu_core_count = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getCpuCoreCount() + { + return $this->cpu_core_count; + } + + /** + * Optional. The number of CPU cores to be made available to the database. + * + * Generated from protobuf field int32 cpu_core_count = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setCpuCoreCount($var) + { + GPBUtil::checkInt32($var); + $this->cpu_core_count = $var; + + return $this; + } + + /** + * Optional. The size of the data stored in the database, in terabytes. + * + * Generated from protobuf field int32 data_storage_size_tb = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getDataStorageSizeTb() + { + return $this->data_storage_size_tb; + } + + /** + * Optional. The size of the data stored in the database, in terabytes. + * + * Generated from protobuf field int32 data_storage_size_tb = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setDataStorageSizeTb($var) + { + GPBUtil::checkInt32($var); + $this->data_storage_size_tb = $var; + + return $this; + } + + /** + * Optional. The size of the data stored in the database, in gigabytes. + * + * Generated from protobuf field int32 data_storage_size_gb = 63 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getDataStorageSizeGb() + { + return $this->data_storage_size_gb; + } + + /** + * Optional. The size of the data stored in the database, in gigabytes. + * + * Generated from protobuf field int32 data_storage_size_gb = 63 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setDataStorageSizeGb($var) + { + GPBUtil::checkInt32($var); + $this->data_storage_size_gb = $var; + + return $this; + } + + /** + * Required. The workload type of the Autonomous Database. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.DBWorkload db_workload = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getDbWorkload() + { + return $this->db_workload; + } + + /** + * Required. The workload type of the Autonomous Database. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.DBWorkload db_workload = 5 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setDbWorkload($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\OracleDatabase\V1\DBWorkload::class); + $this->db_workload = $var; + + return $this; + } + + /** + * Optional. The edition of the Autonomous Databases. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.DatabaseEdition db_edition = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getDbEdition() + { + return $this->db_edition; + } + + /** + * Optional. The edition of the Autonomous Databases. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.DatabaseEdition db_edition = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setDbEdition($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseProperties\DatabaseEdition::class); + $this->db_edition = $var; + + return $this; + } + + /** + * Optional. The character set for the Autonomous Database. The default is + * AL32UTF8. + * + * Generated from protobuf field string character_set = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getCharacterSet() + { + return $this->character_set; + } + + /** + * Optional. The character set for the Autonomous Database. The default is + * AL32UTF8. + * + * Generated from protobuf field string character_set = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setCharacterSet($var) + { + GPBUtil::checkString($var, True); + $this->character_set = $var; + + return $this; + } + + /** + * Optional. The national character set for the Autonomous Database. The + * default is AL16UTF16. + * + * Generated from protobuf field string n_character_set = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getNCharacterSet() + { + return $this->n_character_set; + } + + /** + * Optional. The national character set for the Autonomous Database. The + * default is AL16UTF16. + * + * Generated from protobuf field string n_character_set = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setNCharacterSet($var) + { + GPBUtil::checkString($var, True); + $this->n_character_set = $var; + + return $this; + } + + /** + * Optional. The private endpoint IP address for the Autonomous Database. + * + * Generated from protobuf field string private_endpoint_ip = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPrivateEndpointIp() + { + return $this->private_endpoint_ip; + } + + /** + * Optional. The private endpoint IP address for the Autonomous Database. + * + * Generated from protobuf field string private_endpoint_ip = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPrivateEndpointIp($var) + { + GPBUtil::checkString($var, True); + $this->private_endpoint_ip = $var; + + return $this; + } + + /** + * Optional. The private endpoint label for the Autonomous Database. + * + * Generated from protobuf field string private_endpoint_label = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPrivateEndpointLabel() + { + return $this->private_endpoint_label; + } + + /** + * Optional. The private endpoint label for the Autonomous Database. + * + * Generated from protobuf field string private_endpoint_label = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPrivateEndpointLabel($var) + { + GPBUtil::checkString($var, True); + $this->private_endpoint_label = $var; + + return $this; + } + + /** + * Optional. The Oracle Database version for the Autonomous Database. + * + * Generated from protobuf field string db_version = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDbVersion() + { + return $this->db_version; + } + + /** + * Optional. The Oracle Database version for the Autonomous Database. + * + * Generated from protobuf field string db_version = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDbVersion($var) + { + GPBUtil::checkString($var, True); + $this->db_version = $var; + + return $this; + } + + /** + * Optional. This field indicates if auto scaling is enabled for the + * Autonomous Database CPU core count. + * + * Generated from protobuf field bool is_auto_scaling_enabled = 14 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getIsAutoScalingEnabled() + { + return $this->is_auto_scaling_enabled; + } + + /** + * Optional. This field indicates if auto scaling is enabled for the + * Autonomous Database CPU core count. + * + * Generated from protobuf field bool is_auto_scaling_enabled = 14 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setIsAutoScalingEnabled($var) + { + GPBUtil::checkBool($var); + $this->is_auto_scaling_enabled = $var; + + return $this; + } + + /** + * Optional. This field indicates if auto scaling is enabled for the + * Autonomous Database storage. + * + * Generated from protobuf field bool is_storage_auto_scaling_enabled = 15 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getIsStorageAutoScalingEnabled() + { + return $this->is_storage_auto_scaling_enabled; + } + + /** + * Optional. This field indicates if auto scaling is enabled for the + * Autonomous Database storage. + * + * Generated from protobuf field bool is_storage_auto_scaling_enabled = 15 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setIsStorageAutoScalingEnabled($var) + { + GPBUtil::checkBool($var); + $this->is_storage_auto_scaling_enabled = $var; + + return $this; + } + + /** + * Required. The license type used for the Autonomous Database. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.LicenseType license_type = 16 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getLicenseType() + { + return $this->license_type; + } + + /** + * Required. The license type used for the Autonomous Database. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.LicenseType license_type = 16 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setLicenseType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseProperties\LicenseType::class); + $this->license_type = $var; + + return $this; + } + + /** + * Optional. The list of customer contacts. + * + * Generated from protobuf field repeated .google.cloud.oracledatabase.v1.CustomerContact customer_contacts = 17 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCustomerContacts() + { + return $this->customer_contacts; + } + + /** + * Optional. The list of customer contacts. + * + * Generated from protobuf field repeated .google.cloud.oracledatabase.v1.CustomerContact customer_contacts = 17 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\OracleDatabase\V1\CustomerContact>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCustomerContacts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\OracleDatabase\V1\CustomerContact::class); + $this->customer_contacts = $arr; + + return $this; + } + + /** + * Optional. The ID of the Oracle Cloud Infrastructure vault secret. + * + * Generated from protobuf field string secret_id = 18 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getSecretId() + { + return $this->secret_id; + } + + /** + * Optional. The ID of the Oracle Cloud Infrastructure vault secret. + * + * Generated from protobuf field string secret_id = 18 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setSecretId($var) + { + GPBUtil::checkString($var, True); + $this->secret_id = $var; + + return $this; + } + + /** + * Optional. The ID of the Oracle Cloud Infrastructure vault. + * + * Generated from protobuf field string vault_id = 19 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getVaultId() + { + return $this->vault_id; + } + + /** + * Optional. The ID of the Oracle Cloud Infrastructure vault. + * + * Generated from protobuf field string vault_id = 19 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setVaultId($var) + { + GPBUtil::checkString($var, True); + $this->vault_id = $var; + + return $this; + } + + /** + * Optional. The maintenance schedule of the Autonomous Database. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.MaintenanceScheduleType maintenance_schedule_type = 20 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getMaintenanceScheduleType() + { + return $this->maintenance_schedule_type; + } + + /** + * Optional. The maintenance schedule of the Autonomous Database. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.MaintenanceScheduleType maintenance_schedule_type = 20 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setMaintenanceScheduleType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseProperties\MaintenanceScheduleType::class); + $this->maintenance_schedule_type = $var; + + return $this; + } + + /** + * Optional. This field specifies if the Autonomous Database requires mTLS + * connections. + * + * Generated from protobuf field bool mtls_connection_required = 34 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getMtlsConnectionRequired() + { + return $this->mtls_connection_required; + } + + /** + * Optional. This field specifies if the Autonomous Database requires mTLS + * connections. + * + * Generated from protobuf field bool mtls_connection_required = 34 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setMtlsConnectionRequired($var) + { + GPBUtil::checkBool($var); + $this->mtls_connection_required = $var; + + return $this; + } + + /** + * Optional. The retention period for the Autonomous Database. This field is + * specified in days, can range from 1 day to 60 days, and has a default value + * of 60 days. + * + * Generated from protobuf field int32 backup_retention_period_days = 57 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getBackupRetentionPeriodDays() + { + return $this->backup_retention_period_days; + } + + /** + * Optional. The retention period for the Autonomous Database. This field is + * specified in days, can range from 1 day to 60 days, and has a default value + * of 60 days. + * + * Generated from protobuf field int32 backup_retention_period_days = 57 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setBackupRetentionPeriodDays($var) + { + GPBUtil::checkInt32($var); + $this->backup_retention_period_days = $var; + + return $this; + } + + /** + * Output only. The amount of storage currently being used for user and system + * data, in terabytes. + * + * Generated from protobuf field double actual_used_data_storage_size_tb = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return float + */ + public function getActualUsedDataStorageSizeTb() + { + return $this->actual_used_data_storage_size_tb; + } + + /** + * Output only. The amount of storage currently being used for user and system + * data, in terabytes. + * + * Generated from protobuf field double actual_used_data_storage_size_tb = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param float $var + * @return $this + */ + public function setActualUsedDataStorageSizeTb($var) + { + GPBUtil::checkDouble($var); + $this->actual_used_data_storage_size_tb = $var; + + return $this; + } + + /** + * Output only. The amount of storage currently allocated for the database + * tables and billed for, rounded up in terabytes. + * + * Generated from protobuf field double allocated_storage_size_tb = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return float + */ + public function getAllocatedStorageSizeTb() + { + return $this->allocated_storage_size_tb; + } + + /** + * Output only. The amount of storage currently allocated for the database + * tables and billed for, rounded up in terabytes. + * + * Generated from protobuf field double allocated_storage_size_tb = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param float $var + * @return $this + */ + public function setAllocatedStorageSizeTb($var) + { + GPBUtil::checkDouble($var); + $this->allocated_storage_size_tb = $var; + + return $this; + } + + /** + * Output only. The details for the Oracle APEX Application Development. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseApex apex_details = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseApex|null + */ + public function getApexDetails() + { + return $this->apex_details; + } + + public function hasApexDetails() + { + return isset($this->apex_details); + } + + public function clearApexDetails() + { + unset($this->apex_details); + } + + /** + * Output only. The details for the Oracle APEX Application Development. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseApex apex_details = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseApex $var + * @return $this + */ + public function setApexDetails($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseApex::class); + $this->apex_details = $var; + + return $this; + } + + /** + * Output only. This field indicates the status of Data Guard and Access + * control for the Autonomous Database. The field's value is null if Data + * Guard is disabled or Access Control is disabled. The field's value is TRUE + * if both Data Guard and Access Control are enabled, and the Autonomous + * Database is using primary IP access control list (ACL) for standby. The + * field's value is FALSE if both Data Guard and Access Control are enabled, + * and the Autonomous Database is using a different IP access control list + * (ACL) for standby compared to primary. + * + * Generated from protobuf field optional bool are_primary_allowlisted_ips_used = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getArePrimaryAllowlistedIpsUsed() + { + return isset($this->are_primary_allowlisted_ips_used) ? $this->are_primary_allowlisted_ips_used : false; + } + + public function hasArePrimaryAllowlistedIpsUsed() + { + return isset($this->are_primary_allowlisted_ips_used); + } + + public function clearArePrimaryAllowlistedIpsUsed() + { + unset($this->are_primary_allowlisted_ips_used); + } + + /** + * Output only. This field indicates the status of Data Guard and Access + * control for the Autonomous Database. The field's value is null if Data + * Guard is disabled or Access Control is disabled. The field's value is TRUE + * if both Data Guard and Access Control are enabled, and the Autonomous + * Database is using primary IP access control list (ACL) for standby. The + * field's value is FALSE if both Data Guard and Access Control are enabled, + * and the Autonomous Database is using a different IP access control list + * (ACL) for standby compared to primary. + * + * Generated from protobuf field optional bool are_primary_allowlisted_ips_used = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setArePrimaryAllowlistedIpsUsed($var) + { + GPBUtil::checkBool($var); + $this->are_primary_allowlisted_ips_used = $var; + + return $this; + } + + /** + * Output only. The details of the current lifestyle state of the Autonomous + * Database. + * + * Generated from protobuf field string lifecycle_details = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getLifecycleDetails() + { + return $this->lifecycle_details; + } + + /** + * Output only. The details of the current lifestyle state of the Autonomous + * Database. + * + * Generated from protobuf field string lifecycle_details = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setLifecycleDetails($var) + { + GPBUtil::checkString($var, True); + $this->lifecycle_details = $var; + + return $this; + } + + /** + * Output only. The current lifecycle state of the Autonomous Database. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.State state = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The current lifecycle state of the Autonomous Database. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.State state = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\OracleDatabase\V1\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. The Autonomous Container Database OCID. + * + * Generated from protobuf field string autonomous_container_database_id = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getAutonomousContainerDatabaseId() + { + return $this->autonomous_container_database_id; + } + + /** + * Output only. The Autonomous Container Database OCID. + * + * Generated from protobuf field string autonomous_container_database_id = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setAutonomousContainerDatabaseId($var) + { + GPBUtil::checkString($var, True); + $this->autonomous_container_database_id = $var; + + return $this; + } + + /** + * Output only. The list of available Oracle Database upgrade versions for an + * Autonomous Database. + * + * Generated from protobuf field repeated string available_upgrade_versions = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAvailableUpgradeVersions() + { + return $this->available_upgrade_versions; + } + + /** + * Output only. The list of available Oracle Database upgrade versions for an + * Autonomous Database. + * + * Generated from protobuf field repeated string available_upgrade_versions = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAvailableUpgradeVersions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->available_upgrade_versions = $arr; + + return $this; + } + + /** + * Output only. The connection strings used to connect to an Autonomous + * Database. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseConnectionStrings connection_strings = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseConnectionStrings|null + */ + public function getConnectionStrings() + { + return $this->connection_strings; + } + + public function hasConnectionStrings() + { + return isset($this->connection_strings); + } + + public function clearConnectionStrings() + { + unset($this->connection_strings); + } + + /** + * Output only. The connection strings used to connect to an Autonomous + * Database. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseConnectionStrings connection_strings = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseConnectionStrings $var + * @return $this + */ + public function setConnectionStrings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseConnectionStrings::class); + $this->connection_strings = $var; + + return $this; + } + + /** + * Output only. The Oracle Connection URLs for an Autonomous Database. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseConnectionUrls connection_urls = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseConnectionUrls|null + */ + public function getConnectionUrls() + { + return $this->connection_urls; + } + + public function hasConnectionUrls() + { + return isset($this->connection_urls); + } + + public function clearConnectionUrls() + { + unset($this->connection_urls); + } + + /** + * Output only. The Oracle Connection URLs for an Autonomous Database. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseConnectionUrls connection_urls = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseConnectionUrls $var + * @return $this + */ + public function setConnectionUrls($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseConnectionUrls::class); + $this->connection_urls = $var; + + return $this; + } + + /** + * Output only. This field indicates the number of seconds of data loss during + * a Data Guard failover. + * + * Generated from protobuf field .google.protobuf.Duration failed_data_recovery_duration = 31 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Duration|null + */ + public function getFailedDataRecoveryDuration() + { + return $this->failed_data_recovery_duration; + } + + public function hasFailedDataRecoveryDuration() + { + return isset($this->failed_data_recovery_duration); + } + + public function clearFailedDataRecoveryDuration() + { + unset($this->failed_data_recovery_duration); + } + + /** + * Output only. This field indicates the number of seconds of data loss during + * a Data Guard failover. + * + * Generated from protobuf field .google.protobuf.Duration failed_data_recovery_duration = 31 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setFailedDataRecoveryDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->failed_data_recovery_duration = $var; + + return $this; + } + + /** + * Output only. The memory assigned to in-memory tables in an Autonomous + * Database. + * + * Generated from protobuf field int32 memory_table_gbs = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getMemoryTableGbs() + { + return $this->memory_table_gbs; + } + + /** + * Output only. The memory assigned to in-memory tables in an Autonomous + * Database. + * + * Generated from protobuf field int32 memory_table_gbs = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setMemoryTableGbs($var) + { + GPBUtil::checkInt32($var); + $this->memory_table_gbs = $var; + + return $this; + } + + /** + * Output only. This field indicates whether the Autonomous Database has local + * (in-region) Data Guard enabled. + * + * Generated from protobuf field bool is_local_data_guard_enabled = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getIsLocalDataGuardEnabled() + { + return $this->is_local_data_guard_enabled; + } + + /** + * Output only. This field indicates whether the Autonomous Database has local + * (in-region) Data Guard enabled. + * + * Generated from protobuf field bool is_local_data_guard_enabled = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setIsLocalDataGuardEnabled($var) + { + GPBUtil::checkBool($var); + $this->is_local_data_guard_enabled = $var; + + return $this; + } + + /** + * Output only. This field indicates the maximum data loss limit for an + * Autonomous Database, in seconds. + * + * Generated from protobuf field int32 local_adg_auto_failover_max_data_loss_limit = 35 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getLocalAdgAutoFailoverMaxDataLossLimit() + { + return $this->local_adg_auto_failover_max_data_loss_limit; + } + + /** + * Output only. This field indicates the maximum data loss limit for an + * Autonomous Database, in seconds. + * + * Generated from protobuf field int32 local_adg_auto_failover_max_data_loss_limit = 35 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setLocalAdgAutoFailoverMaxDataLossLimit($var) + { + GPBUtil::checkInt32($var); + $this->local_adg_auto_failover_max_data_loss_limit = $var; + + return $this; + } + + /** + * Output only. The details of the Autonomous Data Guard standby database. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseStandbySummary local_standby_db = 36 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseStandbySummary|null + */ + public function getLocalStandbyDb() + { + return $this->local_standby_db; + } + + public function hasLocalStandbyDb() + { + return isset($this->local_standby_db); + } + + public function clearLocalStandbyDb() + { + unset($this->local_standby_db); + } + + /** + * Output only. The details of the Autonomous Data Guard standby database. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseStandbySummary local_standby_db = 36 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseStandbySummary $var + * @return $this + */ + public function setLocalStandbyDb($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseStandbySummary::class); + $this->local_standby_db = $var; + + return $this; + } + + /** + * Output only. The amount of memory enabled per ECPU, in gigabytes. + * + * Generated from protobuf field int32 memory_per_oracle_compute_unit_gbs = 37 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getMemoryPerOracleComputeUnitGbs() + { + return $this->memory_per_oracle_compute_unit_gbs; + } + + /** + * Output only. The amount of memory enabled per ECPU, in gigabytes. + * + * Generated from protobuf field int32 memory_per_oracle_compute_unit_gbs = 37 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setMemoryPerOracleComputeUnitGbs($var) + { + GPBUtil::checkInt32($var); + $this->memory_per_oracle_compute_unit_gbs = $var; + + return $this; + } + + /** + * Output only. This field indicates the local disaster recovery (DR) type of + * an Autonomous Database. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.LocalDisasterRecoveryType local_disaster_recovery_type = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getLocalDisasterRecoveryType() + { + return $this->local_disaster_recovery_type; + } + + /** + * Output only. This field indicates the local disaster recovery (DR) type of + * an Autonomous Database. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.LocalDisasterRecoveryType local_disaster_recovery_type = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setLocalDisasterRecoveryType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseProperties\LocalDisasterRecoveryType::class); + $this->local_disaster_recovery_type = $var; + + return $this; + } + + /** + * Output only. The current state of the Data Safe registration for the + * Autonomous Database. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.DataSafeState data_safe_state = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getDataSafeState() + { + return $this->data_safe_state; + } + + /** + * Output only. The current state of the Data Safe registration for the + * Autonomous Database. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.DataSafeState data_safe_state = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setDataSafeState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseProperties\DataSafeState::class); + $this->data_safe_state = $var; + + return $this; + } + + /** + * Output only. The current state of database management for the Autonomous + * Database. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.DatabaseManagementState database_management_state = 40 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getDatabaseManagementState() + { + return $this->database_management_state; + } + + /** + * Output only. The current state of database management for the Autonomous + * Database. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.DatabaseManagementState database_management_state = 40 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setDatabaseManagementState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseProperties\DatabaseManagementState::class); + $this->database_management_state = $var; + + return $this; + } + + /** + * Output only. This field indicates the current mode of the Autonomous + * Database. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.OpenMode open_mode = 41 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getOpenMode() + { + return $this->open_mode; + } + + /** + * Output only. This field indicates the current mode of the Autonomous + * Database. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.OpenMode open_mode = 41 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setOpenMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseProperties\OpenMode::class); + $this->open_mode = $var; + + return $this; + } + + /** + * Output only. This field indicates the state of Operations Insights for the + * Autonomous Database. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.OperationsInsightsState operations_insights_state = 42 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getOperationsInsightsState() + { + return $this->operations_insights_state; + } + + /** + * Output only. This field indicates the state of Operations Insights for the + * Autonomous Database. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.OperationsInsightsState operations_insights_state = 42 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setOperationsInsightsState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\OracleDatabase\V1\OperationsInsightsState::class); + $this->operations_insights_state = $var; + + return $this; + } + + /** + * Output only. The list of OCIDs of standby databases located in Autonomous + * Data Guard remote regions that are associated with the source database. + * + * Generated from protobuf field repeated string peer_db_ids = 43 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPeerDbIds() + { + return $this->peer_db_ids; + } + + /** + * Output only. The list of OCIDs of standby databases located in Autonomous + * Data Guard remote regions that are associated with the source database. + * + * Generated from protobuf field repeated string peer_db_ids = 43 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPeerDbIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->peer_db_ids = $arr; + + return $this; + } + + /** + * Output only. The permission level of the Autonomous Database. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.PermissionLevel permission_level = 44 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getPermissionLevel() + { + return $this->permission_level; + } + + /** + * Output only. The permission level of the Autonomous Database. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.PermissionLevel permission_level = 44 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setPermissionLevel($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseProperties\PermissionLevel::class); + $this->permission_level = $var; + + return $this; + } + + /** + * Output only. The private endpoint for the Autonomous Database. + * + * Generated from protobuf field string private_endpoint = 45 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getPrivateEndpoint() + { + return $this->private_endpoint; + } + + /** + * Output only. The private endpoint for the Autonomous Database. + * + * Generated from protobuf field string private_endpoint = 45 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setPrivateEndpoint($var) + { + GPBUtil::checkString($var, True); + $this->private_endpoint = $var; + + return $this; + } + + /** + * Output only. The refresh mode of the cloned Autonomous Database. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.RefreshableMode refreshable_mode = 46 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getRefreshableMode() + { + return $this->refreshable_mode; + } + + /** + * Output only. The refresh mode of the cloned Autonomous Database. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.RefreshableMode refreshable_mode = 46 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setRefreshableMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseProperties\RefreshableMode::class); + $this->refreshable_mode = $var; + + return $this; + } + + /** + * Output only. The refresh State of the clone. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.RefreshableState refreshable_state = 47 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getRefreshableState() + { + return $this->refreshable_state; + } + + /** + * Output only. The refresh State of the clone. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.RefreshableState refreshable_state = 47 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setRefreshableState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseProperties\RefreshableState::class); + $this->refreshable_state = $var; + + return $this; + } + + /** + * Output only. The Data Guard role of the Autonomous Database. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.Role role = 48 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getRole() + { + return $this->role; + } + + /** + * Output only. The Data Guard role of the Autonomous Database. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.Role role = 48 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setRole($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseProperties\Role::class); + $this->role = $var; + + return $this; + } + + /** + * Output only. The list and details of the scheduled operations of the + * Autonomous Database. + * + * Generated from protobuf field repeated .google.cloud.oracledatabase.v1.ScheduledOperationDetails scheduled_operation_details = 64 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getScheduledOperationDetails() + { + return $this->scheduled_operation_details; + } + + /** + * Output only. The list and details of the scheduled operations of the + * Autonomous Database. + * + * Generated from protobuf field repeated .google.cloud.oracledatabase.v1.ScheduledOperationDetails scheduled_operation_details = 64 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\OracleDatabase\V1\ScheduledOperationDetails>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setScheduledOperationDetails($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\OracleDatabase\V1\ScheduledOperationDetails::class); + $this->scheduled_operation_details = $arr; + + return $this; + } + + /** + * Output only. The SQL Web Developer URL for the Autonomous Database. + * + * Generated from protobuf field string sql_web_developer_url = 50 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getSqlWebDeveloperUrl() + { + return $this->sql_web_developer_url; + } + + /** + * Output only. The SQL Web Developer URL for the Autonomous Database. + * + * Generated from protobuf field string sql_web_developer_url = 50 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setSqlWebDeveloperUrl($var) + { + GPBUtil::checkString($var, True); + $this->sql_web_developer_url = $var; + + return $this; + } + + /** + * Output only. The list of available regions that can be used to create a + * clone for the Autonomous Database. + * + * Generated from protobuf field repeated string supported_clone_regions = 51 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSupportedCloneRegions() + { + return $this->supported_clone_regions; + } + + /** + * Output only. The list of available regions that can be used to create a + * clone for the Autonomous Database. + * + * Generated from protobuf field repeated string supported_clone_regions = 51 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSupportedCloneRegions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->supported_clone_regions = $arr; + + return $this; + } + + /** + * Output only. The storage space used by Autonomous Database, in gigabytes. + * + * Generated from protobuf field int32 used_data_storage_size_tbs = 53 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getUsedDataStorageSizeTbs() + { + return $this->used_data_storage_size_tbs; + } + + /** + * Output only. The storage space used by Autonomous Database, in gigabytes. + * + * Generated from protobuf field int32 used_data_storage_size_tbs = 53 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setUsedDataStorageSizeTbs($var) + { + GPBUtil::checkInt32($var); + $this->used_data_storage_size_tbs = $var; + + return $this; + } + + /** + * Output only. The Oracle Cloud Infrastructure link for the Autonomous + * Database. + * + * Generated from protobuf field string oci_url = 54 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getOciUrl() + { + return $this->oci_url; + } + + /** + * Output only. The Oracle Cloud Infrastructure link for the Autonomous + * Database. + * + * Generated from protobuf field string oci_url = 54 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setOciUrl($var) + { + GPBUtil::checkString($var, True); + $this->oci_url = $var; + + return $this; + } + + /** + * Output only. The storage space used by automatic backups of Autonomous + * Database, in gigabytes. + * + * Generated from protobuf field float total_auto_backup_storage_size_gbs = 59 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return float + */ + public function getTotalAutoBackupStorageSizeGbs() + { + return $this->total_auto_backup_storage_size_gbs; + } + + /** + * Output only. The storage space used by automatic backups of Autonomous + * Database, in gigabytes. + * + * Generated from protobuf field float total_auto_backup_storage_size_gbs = 59 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param float $var + * @return $this + */ + public function setTotalAutoBackupStorageSizeGbs($var) + { + GPBUtil::checkFloat($var); + $this->total_auto_backup_storage_size_gbs = $var; + + return $this; + } + + /** + * Output only. The long term backup schedule of the Autonomous Database. + * + * Generated from protobuf field .google.protobuf.Timestamp next_long_term_backup_time = 60 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getNextLongTermBackupTime() + { + return $this->next_long_term_backup_time; + } + + public function hasNextLongTermBackupTime() + { + return isset($this->next_long_term_backup_time); + } + + public function clearNextLongTermBackupTime() + { + unset($this->next_long_term_backup_time); + } + + /** + * Output only. The long term backup schedule of the Autonomous Database. + * + * Generated from protobuf field .google.protobuf.Timestamp next_long_term_backup_time = 60 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setNextLongTermBackupTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->next_long_term_backup_time = $var; + + return $this; + } + + /** + * Output only. The date and time when maintenance will begin. + * + * Generated from protobuf field .google.protobuf.Timestamp maintenance_begin_time = 65 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getMaintenanceBeginTime() + { + return $this->maintenance_begin_time; + } + + public function hasMaintenanceBeginTime() + { + return isset($this->maintenance_begin_time); + } + + public function clearMaintenanceBeginTime() + { + unset($this->maintenance_begin_time); + } + + /** + * Output only. The date and time when maintenance will begin. + * + * Generated from protobuf field .google.protobuf.Timestamp maintenance_begin_time = 65 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setMaintenanceBeginTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->maintenance_begin_time = $var; + + return $this; + } + + /** + * Output only. The date and time when maintenance will end. + * + * Generated from protobuf field .google.protobuf.Timestamp maintenance_end_time = 66 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getMaintenanceEndTime() + { + return $this->maintenance_end_time; + } + + public function hasMaintenanceEndTime() + { + return isset($this->maintenance_end_time); + } + + public function clearMaintenanceEndTime() + { + unset($this->maintenance_end_time); + } + + /** + * Output only. The date and time when maintenance will end. + * + * Generated from protobuf field .google.protobuf.Timestamp maintenance_end_time = 66 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setMaintenanceEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->maintenance_end_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseProperties/DataSafeState.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseProperties/DataSafeState.php new file mode 100644 index 000000000000..156d722b5854 --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseProperties/DataSafeState.php @@ -0,0 +1,85 @@ +google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.DataSafeState + */ +class DataSafeState +{ + /** + * Default unspecified value. + * + * Generated from protobuf enum DATA_SAFE_STATE_UNSPECIFIED = 0; + */ + const DATA_SAFE_STATE_UNSPECIFIED = 0; + /** + * Registering data safe state. + * + * Generated from protobuf enum REGISTERING = 1; + */ + const REGISTERING = 1; + /** + * Registered data safe state. + * + * Generated from protobuf enum REGISTERED = 2; + */ + const REGISTERED = 2; + /** + * Deregistering data safe state. + * + * Generated from protobuf enum DEREGISTERING = 3; + */ + const DEREGISTERING = 3; + /** + * Not registered data safe state. + * + * Generated from protobuf enum NOT_REGISTERED = 4; + */ + const NOT_REGISTERED = 4; + /** + * Failed data safe state. + * + * Generated from protobuf enum FAILED = 5; + */ + const FAILED = 5; + + private static $valueToName = [ + self::DATA_SAFE_STATE_UNSPECIFIED => 'DATA_SAFE_STATE_UNSPECIFIED', + self::REGISTERING => 'REGISTERING', + self::REGISTERED => 'REGISTERED', + self::DEREGISTERING => 'DEREGISTERING', + self::NOT_REGISTERED => 'NOT_REGISTERED', + self::FAILED => 'FAILED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(DataSafeState::class, \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseProperties_DataSafeState::class); + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseProperties/DatabaseEdition.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseProperties/DatabaseEdition.php new file mode 100644 index 000000000000..23aaf036fc31 --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseProperties/DatabaseEdition.php @@ -0,0 +1,64 @@ +google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.DatabaseEdition + */ +class DatabaseEdition +{ + /** + * Default unspecified value. + * + * Generated from protobuf enum DATABASE_EDITION_UNSPECIFIED = 0; + */ + const DATABASE_EDITION_UNSPECIFIED = 0; + /** + * Standard Database Edition + * + * Generated from protobuf enum STANDARD_EDITION = 1; + */ + const STANDARD_EDITION = 1; + /** + * Enterprise Database Edition + * + * Generated from protobuf enum ENTERPRISE_EDITION = 2; + */ + const ENTERPRISE_EDITION = 2; + + private static $valueToName = [ + self::DATABASE_EDITION_UNSPECIFIED => 'DATABASE_EDITION_UNSPECIFIED', + self::STANDARD_EDITION => 'STANDARD_EDITION', + self::ENTERPRISE_EDITION => 'ENTERPRISE_EDITION', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(DatabaseEdition::class, \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseProperties_DatabaseEdition::class); + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseProperties/DatabaseManagementState.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseProperties/DatabaseManagementState.php new file mode 100644 index 000000000000..b88dab5a98e7 --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseProperties/DatabaseManagementState.php @@ -0,0 +1,92 @@ +google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.DatabaseManagementState + */ +class DatabaseManagementState +{ + /** + * Default unspecified value. + * + * Generated from protobuf enum DATABASE_MANAGEMENT_STATE_UNSPECIFIED = 0; + */ + const DATABASE_MANAGEMENT_STATE_UNSPECIFIED = 0; + /** + * Enabling Database Management state + * + * Generated from protobuf enum ENABLING = 1; + */ + const ENABLING = 1; + /** + * Enabled Database Management state + * + * Generated from protobuf enum ENABLED = 2; + */ + const ENABLED = 2; + /** + * Disabling Database Management state + * + * Generated from protobuf enum DISABLING = 3; + */ + const DISABLING = 3; + /** + * Not Enabled Database Management state + * + * Generated from protobuf enum NOT_ENABLED = 4; + */ + const NOT_ENABLED = 4; + /** + * Failed enabling Database Management state + * + * Generated from protobuf enum FAILED_ENABLING = 5; + */ + const FAILED_ENABLING = 5; + /** + * Failed disabling Database Management state + * + * Generated from protobuf enum FAILED_DISABLING = 6; + */ + const FAILED_DISABLING = 6; + + private static $valueToName = [ + self::DATABASE_MANAGEMENT_STATE_UNSPECIFIED => 'DATABASE_MANAGEMENT_STATE_UNSPECIFIED', + self::ENABLING => 'ENABLING', + self::ENABLED => 'ENABLED', + self::DISABLING => 'DISABLING', + self::NOT_ENABLED => 'NOT_ENABLED', + self::FAILED_ENABLING => 'FAILED_ENABLING', + self::FAILED_DISABLING => 'FAILED_DISABLING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(DatabaseManagementState::class, \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseProperties_DatabaseManagementState::class); + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseProperties/LicenseType.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseProperties/LicenseType.php new file mode 100644 index 000000000000..fc1207bc5641 --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseProperties/LicenseType.php @@ -0,0 +1,64 @@ +google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.LicenseType + */ +class LicenseType +{ + /** + * Unspecified + * + * Generated from protobuf enum LICENSE_TYPE_UNSPECIFIED = 0; + */ + const LICENSE_TYPE_UNSPECIFIED = 0; + /** + * License included part of offer + * + * Generated from protobuf enum LICENSE_INCLUDED = 1; + */ + const LICENSE_INCLUDED = 1; + /** + * Bring your own license + * + * Generated from protobuf enum BRING_YOUR_OWN_LICENSE = 2; + */ + const BRING_YOUR_OWN_LICENSE = 2; + + private static $valueToName = [ + self::LICENSE_TYPE_UNSPECIFIED => 'LICENSE_TYPE_UNSPECIFIED', + self::LICENSE_INCLUDED => 'LICENSE_INCLUDED', + self::BRING_YOUR_OWN_LICENSE => 'BRING_YOUR_OWN_LICENSE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(LicenseType::class, \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseProperties_LicenseType::class); + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseProperties/LocalDisasterRecoveryType.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseProperties/LocalDisasterRecoveryType.php new file mode 100644 index 000000000000..84a02743cd88 --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseProperties/LocalDisasterRecoveryType.php @@ -0,0 +1,64 @@ +google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.LocalDisasterRecoveryType + */ +class LocalDisasterRecoveryType +{ + /** + * Default unspecified value. + * + * Generated from protobuf enum LOCAL_DISASTER_RECOVERY_TYPE_UNSPECIFIED = 0; + */ + const LOCAL_DISASTER_RECOVERY_TYPE_UNSPECIFIED = 0; + /** + * Autonomous Data Guard recovery. + * + * Generated from protobuf enum ADG = 1; + */ + const ADG = 1; + /** + * Backup based recovery. + * + * Generated from protobuf enum BACKUP_BASED = 2; + */ + const BACKUP_BASED = 2; + + private static $valueToName = [ + self::LOCAL_DISASTER_RECOVERY_TYPE_UNSPECIFIED => 'LOCAL_DISASTER_RECOVERY_TYPE_UNSPECIFIED', + self::ADG => 'ADG', + self::BACKUP_BASED => 'BACKUP_BASED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(LocalDisasterRecoveryType::class, \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseProperties_LocalDisasterRecoveryType::class); + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseProperties/MaintenanceScheduleType.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseProperties/MaintenanceScheduleType.php new file mode 100644 index 000000000000..5ef0262bff50 --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseProperties/MaintenanceScheduleType.php @@ -0,0 +1,65 @@ +google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.MaintenanceScheduleType + */ +class MaintenanceScheduleType +{ + /** + * Default unspecified value. + * + * Generated from protobuf enum MAINTENANCE_SCHEDULE_TYPE_UNSPECIFIED = 0; + */ + const MAINTENANCE_SCHEDULE_TYPE_UNSPECIFIED = 0; + /** + * An EARLY maintenance schedule patches the database before + * the regular scheduled maintenance. + * + * Generated from protobuf enum EARLY = 1; + */ + const EARLY = 1; + /** + * A REGULAR maintenance schedule follows the normal maintenance cycle. + * + * Generated from protobuf enum REGULAR = 2; + */ + const REGULAR = 2; + + private static $valueToName = [ + self::MAINTENANCE_SCHEDULE_TYPE_UNSPECIFIED => 'MAINTENANCE_SCHEDULE_TYPE_UNSPECIFIED', + self::EARLY => 'EARLY', + self::REGULAR => 'REGULAR', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(MaintenanceScheduleType::class, \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseProperties_MaintenanceScheduleType::class); + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseProperties/OpenMode.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseProperties/OpenMode.php new file mode 100644 index 000000000000..dd509ef1210d --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseProperties/OpenMode.php @@ -0,0 +1,64 @@ +google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.OpenMode + */ +class OpenMode +{ + /** + * Default unspecified value. + * + * Generated from protobuf enum OPEN_MODE_UNSPECIFIED = 0; + */ + const OPEN_MODE_UNSPECIFIED = 0; + /** + * Read Only Mode + * + * Generated from protobuf enum READ_ONLY = 1; + */ + const READ_ONLY = 1; + /** + * Read Write Mode + * + * Generated from protobuf enum READ_WRITE = 2; + */ + const READ_WRITE = 2; + + private static $valueToName = [ + self::OPEN_MODE_UNSPECIFIED => 'OPEN_MODE_UNSPECIFIED', + self::READ_ONLY => 'READ_ONLY', + self::READ_WRITE => 'READ_WRITE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(OpenMode::class, \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseProperties_OpenMode::class); + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseProperties/PermissionLevel.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseProperties/PermissionLevel.php new file mode 100644 index 000000000000..f500235b4607 --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseProperties/PermissionLevel.php @@ -0,0 +1,64 @@ +google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.PermissionLevel + */ +class PermissionLevel +{ + /** + * Default unspecified value. + * + * Generated from protobuf enum PERMISSION_LEVEL_UNSPECIFIED = 0; + */ + const PERMISSION_LEVEL_UNSPECIFIED = 0; + /** + * Restricted mode allows access only by admin users. + * + * Generated from protobuf enum RESTRICTED = 1; + */ + const RESTRICTED = 1; + /** + * Normal access. + * + * Generated from protobuf enum UNRESTRICTED = 2; + */ + const UNRESTRICTED = 2; + + private static $valueToName = [ + self::PERMISSION_LEVEL_UNSPECIFIED => 'PERMISSION_LEVEL_UNSPECIFIED', + self::RESTRICTED => 'RESTRICTED', + self::UNRESTRICTED => 'UNRESTRICTED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(PermissionLevel::class, \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseProperties_PermissionLevel::class); + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseProperties/RefreshableMode.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseProperties/RefreshableMode.php new file mode 100644 index 000000000000..c3a92917eccf --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseProperties/RefreshableMode.php @@ -0,0 +1,66 @@ +google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.RefreshableMode + */ +class RefreshableMode +{ + /** + * The default unspecified value. + * + * Generated from protobuf enum REFRESHABLE_MODE_UNSPECIFIED = 0; + */ + const REFRESHABLE_MODE_UNSPECIFIED = 0; + /** + * AUTOMATIC indicates that the cloned database is automatically + * refreshed with data from the source Autonomous Database. + * + * Generated from protobuf enum AUTOMATIC = 1; + */ + const AUTOMATIC = 1; + /** + * MANUAL indicates that the cloned database is manually refreshed with + * data from the source Autonomous Database. + * + * Generated from protobuf enum MANUAL = 2; + */ + const MANUAL = 2; + + private static $valueToName = [ + self::REFRESHABLE_MODE_UNSPECIFIED => 'REFRESHABLE_MODE_UNSPECIFIED', + self::AUTOMATIC => 'AUTOMATIC', + self::MANUAL => 'MANUAL', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(RefreshableMode::class, \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseProperties_RefreshableMode::class); + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseProperties/RefreshableState.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseProperties/RefreshableState.php new file mode 100644 index 000000000000..b6c0f8ba9bd7 --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseProperties/RefreshableState.php @@ -0,0 +1,64 @@ +google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.RefreshableState + */ +class RefreshableState +{ + /** + * Default unspecified value. + * + * Generated from protobuf enum REFRESHABLE_STATE_UNSPECIFIED = 0; + */ + const REFRESHABLE_STATE_UNSPECIFIED = 0; + /** + * Refreshing + * + * Generated from protobuf enum REFRESHING = 1; + */ + const REFRESHING = 1; + /** + * Not refreshed + * + * Generated from protobuf enum NOT_REFRESHING = 2; + */ + const NOT_REFRESHING = 2; + + private static $valueToName = [ + self::REFRESHABLE_STATE_UNSPECIFIED => 'REFRESHABLE_STATE_UNSPECIFIED', + self::REFRESHING => 'REFRESHING', + self::NOT_REFRESHING => 'NOT_REFRESHING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(RefreshableState::class, \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseProperties_RefreshableState::class); + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseProperties/Role.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseProperties/Role.php new file mode 100644 index 000000000000..3e70e82b862a --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseProperties/Role.php @@ -0,0 +1,85 @@ +google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.Role + */ +class Role +{ + /** + * Default unspecified value. + * + * Generated from protobuf enum ROLE_UNSPECIFIED = 0; + */ + const ROLE_UNSPECIFIED = 0; + /** + * Primary role + * + * Generated from protobuf enum PRIMARY = 1; + */ + const PRIMARY = 1; + /** + * Standby role + * + * Generated from protobuf enum STANDBY = 2; + */ + const STANDBY = 2; + /** + * Disabled standby role + * + * Generated from protobuf enum DISABLED_STANDBY = 3; + */ + const DISABLED_STANDBY = 3; + /** + * Backup copy role + * + * Generated from protobuf enum BACKUP_COPY = 4; + */ + const BACKUP_COPY = 4; + /** + * Snapshot standby role + * + * Generated from protobuf enum SNAPSHOT_STANDBY = 5; + */ + const SNAPSHOT_STANDBY = 5; + + private static $valueToName = [ + self::ROLE_UNSPECIFIED => 'ROLE_UNSPECIFIED', + self::PRIMARY => 'PRIMARY', + self::STANDBY => 'STANDBY', + self::DISABLED_STANDBY => 'DISABLED_STANDBY', + self::BACKUP_COPY => 'BACKUP_COPY', + self::SNAPSHOT_STANDBY => 'SNAPSHOT_STANDBY', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Role::class, \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseProperties_Role::class); + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseStandbySummary.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseStandbySummary.php new file mode 100644 index 000000000000..424aeff56287 --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseStandbySummary.php @@ -0,0 +1,250 @@ +google.cloud.oracledatabase.v1.AutonomousDatabaseStandbySummary + */ +class AutonomousDatabaseStandbySummary extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The amount of time, in seconds, that the data of the standby + * database lags in comparison to the data of the primary database. + * + * Generated from protobuf field .google.protobuf.Duration lag_time_duration = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $lag_time_duration = null; + /** + * Output only. The additional details about the current lifecycle state of + * the Autonomous Database. + * + * Generated from protobuf field string lifecycle_details = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $lifecycle_details = ''; + /** + * Output only. The current lifecycle state of the Autonomous Database. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. The date and time the Autonomous Data Guard role was switched + * for the standby Autonomous Database. + * + * Generated from protobuf field .google.protobuf.Timestamp data_guard_role_changed_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $data_guard_role_changed_time = null; + /** + * Output only. The date and time the Disaster Recovery role was switched for + * the standby Autonomous Database. + * + * Generated from protobuf field .google.protobuf.Timestamp disaster_recovery_role_changed_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $disaster_recovery_role_changed_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Duration $lag_time_duration + * Output only. The amount of time, in seconds, that the data of the standby + * database lags in comparison to the data of the primary database. + * @type string $lifecycle_details + * Output only. The additional details about the current lifecycle state of + * the Autonomous Database. + * @type int $state + * Output only. The current lifecycle state of the Autonomous Database. + * @type \Google\Protobuf\Timestamp $data_guard_role_changed_time + * Output only. The date and time the Autonomous Data Guard role was switched + * for the standby Autonomous Database. + * @type \Google\Protobuf\Timestamp $disaster_recovery_role_changed_time + * Output only. The date and time the Disaster Recovery role was switched for + * the standby Autonomous Database. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Oracledatabase\V1\AutonomousDatabase::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The amount of time, in seconds, that the data of the standby + * database lags in comparison to the data of the primary database. + * + * Generated from protobuf field .google.protobuf.Duration lag_time_duration = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Duration|null + */ + public function getLagTimeDuration() + { + return $this->lag_time_duration; + } + + public function hasLagTimeDuration() + { + return isset($this->lag_time_duration); + } + + public function clearLagTimeDuration() + { + unset($this->lag_time_duration); + } + + /** + * Output only. The amount of time, in seconds, that the data of the standby + * database lags in comparison to the data of the primary database. + * + * Generated from protobuf field .google.protobuf.Duration lag_time_duration = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setLagTimeDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->lag_time_duration = $var; + + return $this; + } + + /** + * Output only. The additional details about the current lifecycle state of + * the Autonomous Database. + * + * Generated from protobuf field string lifecycle_details = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getLifecycleDetails() + { + return $this->lifecycle_details; + } + + /** + * Output only. The additional details about the current lifecycle state of + * the Autonomous Database. + * + * Generated from protobuf field string lifecycle_details = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setLifecycleDetails($var) + { + GPBUtil::checkString($var, True); + $this->lifecycle_details = $var; + + return $this; + } + + /** + * Output only. The current lifecycle state of the Autonomous Database. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The current lifecycle state of the Autonomous Database. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\OracleDatabase\V1\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. The date and time the Autonomous Data Guard role was switched + * for the standby Autonomous Database. + * + * Generated from protobuf field .google.protobuf.Timestamp data_guard_role_changed_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getDataGuardRoleChangedTime() + { + return $this->data_guard_role_changed_time; + } + + public function hasDataGuardRoleChangedTime() + { + return isset($this->data_guard_role_changed_time); + } + + public function clearDataGuardRoleChangedTime() + { + unset($this->data_guard_role_changed_time); + } + + /** + * Output only. The date and time the Autonomous Data Guard role was switched + * for the standby Autonomous Database. + * + * Generated from protobuf field .google.protobuf.Timestamp data_guard_role_changed_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setDataGuardRoleChangedTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->data_guard_role_changed_time = $var; + + return $this; + } + + /** + * Output only. The date and time the Disaster Recovery role was switched for + * the standby Autonomous Database. + * + * Generated from protobuf field .google.protobuf.Timestamp disaster_recovery_role_changed_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getDisasterRecoveryRoleChangedTime() + { + return $this->disaster_recovery_role_changed_time; + } + + public function hasDisasterRecoveryRoleChangedTime() + { + return isset($this->disaster_recovery_role_changed_time); + } + + public function clearDisasterRecoveryRoleChangedTime() + { + unset($this->disaster_recovery_role_changed_time); + } + + /** + * Output only. The date and time the Disaster Recovery role was switched for + * the standby Autonomous Database. + * + * Generated from protobuf field .google.protobuf.Timestamp disaster_recovery_role_changed_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setDisasterRecoveryRoleChangedTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->disaster_recovery_role_changed_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDbVersion.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDbVersion.php new file mode 100644 index 000000000000..a303b6b0ead7 --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDbVersion.php @@ -0,0 +1,182 @@ +google.cloud.oracledatabase.v1.AutonomousDbVersion + */ +class AutonomousDbVersion extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The name of the Autonomous Database Version resource with the + * format: + * projects/{project}/locations/{region}/autonomousDbVersions/{autonomous_db_version} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Output only. An Oracle Database version for Autonomous Database. + * + * Generated from protobuf field string version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $version = ''; + /** + * Output only. The Autonomous Database workload type. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.DBWorkload db_workload = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $db_workload = 0; + /** + * Output only. A URL that points to a detailed description of the Autonomous + * Database version. + * + * Generated from protobuf field string workload_uri = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $workload_uri = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The name of the Autonomous Database Version resource with the + * format: + * projects/{project}/locations/{region}/autonomousDbVersions/{autonomous_db_version} + * @type string $version + * Output only. An Oracle Database version for Autonomous Database. + * @type int $db_workload + * Output only. The Autonomous Database workload type. + * @type string $workload_uri + * Output only. A URL that points to a detailed description of the Autonomous + * Database version. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Oracledatabase\V1\AutonomousDbVersion::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The name of the Autonomous Database Version resource with the + * format: + * projects/{project}/locations/{region}/autonomousDbVersions/{autonomous_db_version} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The name of the Autonomous Database Version resource with the + * format: + * projects/{project}/locations/{region}/autonomousDbVersions/{autonomous_db_version} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. An Oracle Database version for Autonomous Database. + * + * Generated from protobuf field string version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getVersion() + { + return $this->version; + } + + /** + * Output only. An Oracle Database version for Autonomous Database. + * + * Generated from protobuf field string version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkString($var, True); + $this->version = $var; + + return $this; + } + + /** + * Output only. The Autonomous Database workload type. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.DBWorkload db_workload = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getDbWorkload() + { + return $this->db_workload; + } + + /** + * Output only. The Autonomous Database workload type. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.DBWorkload db_workload = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setDbWorkload($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\OracleDatabase\V1\DBWorkload::class); + $this->db_workload = $var; + + return $this; + } + + /** + * Output only. A URL that points to a detailed description of the Autonomous + * Database version. + * + * Generated from protobuf field string workload_uri = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getWorkloadUri() + { + return $this->workload_uri; + } + + /** + * Output only. A URL that points to a detailed description of the Autonomous + * Database version. + * + * Generated from protobuf field string workload_uri = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setWorkloadUri($var) + { + GPBUtil::checkString($var, True); + $this->workload_uri = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CloudAccountDetails.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CloudAccountDetails.php new file mode 100644 index 000000000000..3d7419e5588c --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CloudAccountDetails.php @@ -0,0 +1,189 @@ +google.cloud.oracledatabase.v1.CloudAccountDetails + */ +class CloudAccountDetails extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. OCI account name. + * + * Generated from protobuf field string cloud_account = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $cloud_account = ''; + /** + * Output only. OCI account home region. + * + * Generated from protobuf field string cloud_account_home_region = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $cloud_account_home_region = ''; + /** + * Output only. URL to link an existing account. + * + * Generated from protobuf field optional string link_existing_account_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $link_existing_account_uri = null; + /** + * Output only. URL to create a new account and link. + * + * Generated from protobuf field optional string account_creation_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $account_creation_uri = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $cloud_account + * Output only. OCI account name. + * @type string $cloud_account_home_region + * Output only. OCI account home region. + * @type string $link_existing_account_uri + * Output only. URL to link an existing account. + * @type string $account_creation_uri + * Output only. URL to create a new account and link. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Oracledatabase\V1\Entitlement::initOnce(); + parent::__construct($data); + } + + /** + * Output only. OCI account name. + * + * Generated from protobuf field string cloud_account = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getCloudAccount() + { + return $this->cloud_account; + } + + /** + * Output only. OCI account name. + * + * Generated from protobuf field string cloud_account = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setCloudAccount($var) + { + GPBUtil::checkString($var, True); + $this->cloud_account = $var; + + return $this; + } + + /** + * Output only. OCI account home region. + * + * Generated from protobuf field string cloud_account_home_region = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getCloudAccountHomeRegion() + { + return $this->cloud_account_home_region; + } + + /** + * Output only. OCI account home region. + * + * Generated from protobuf field string cloud_account_home_region = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setCloudAccountHomeRegion($var) + { + GPBUtil::checkString($var, True); + $this->cloud_account_home_region = $var; + + return $this; + } + + /** + * Output only. URL to link an existing account. + * + * Generated from protobuf field optional string link_existing_account_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getLinkExistingAccountUri() + { + return isset($this->link_existing_account_uri) ? $this->link_existing_account_uri : ''; + } + + public function hasLinkExistingAccountUri() + { + return isset($this->link_existing_account_uri); + } + + public function clearLinkExistingAccountUri() + { + unset($this->link_existing_account_uri); + } + + /** + * Output only. URL to link an existing account. + * + * Generated from protobuf field optional string link_existing_account_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setLinkExistingAccountUri($var) + { + GPBUtil::checkString($var, True); + $this->link_existing_account_uri = $var; + + return $this; + } + + /** + * Output only. URL to create a new account and link. + * + * Generated from protobuf field optional string account_creation_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getAccountCreationUri() + { + return isset($this->account_creation_uri) ? $this->account_creation_uri : ''; + } + + public function hasAccountCreationUri() + { + return isset($this->account_creation_uri); + } + + public function clearAccountCreationUri() + { + unset($this->account_creation_uri); + } + + /** + * Output only. URL to create a new account and link. + * + * Generated from protobuf field optional string account_creation_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setAccountCreationUri($var) + { + GPBUtil::checkString($var, True); + $this->account_creation_uri = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CloudExadataInfrastructure.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CloudExadataInfrastructure.php new file mode 100644 index 000000000000..2f3453a3469f --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CloudExadataInfrastructure.php @@ -0,0 +1,304 @@ +google.cloud.oracledatabase.v1.CloudExadataInfrastructure + */ +class CloudExadataInfrastructure extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The name of the Exadata Infrastructure resource with the + * format: + * projects/{project}/locations/{region}/cloudExadataInfrastructures/{cloud_exadata_infrastructure} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Optional. User friendly name for this resource. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $display_name = ''; + /** + * Optional. Google Cloud Platform location where Oracle Exadata is hosted. + * + * Generated from protobuf field string gcp_oracle_zone = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $gcp_oracle_zone = ''; + /** + * Output only. Entitlement ID of the private offer against which this + * infrastructure resource is provisioned. + * + * Generated from protobuf field string entitlement_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $entitlement_id = ''; + /** + * Optional. Various properties of the infra. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.CloudExadataInfrastructureProperties properties = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $properties = null; + /** + * Optional. Labels or tags associated with the resource. + * + * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Output only. The date and time that the Exadata Infrastructure was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The name of the Exadata Infrastructure resource with the + * format: + * projects/{project}/locations/{region}/cloudExadataInfrastructures/{cloud_exadata_infrastructure} + * @type string $display_name + * Optional. User friendly name for this resource. + * @type string $gcp_oracle_zone + * Optional. Google Cloud Platform location where Oracle Exadata is hosted. + * @type string $entitlement_id + * Output only. Entitlement ID of the private offer against which this + * infrastructure resource is provisioned. + * @type \Google\Cloud\OracleDatabase\V1\CloudExadataInfrastructureProperties $properties + * Optional. Various properties of the infra. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. Labels or tags associated with the resource. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The date and time that the Exadata Infrastructure was created. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Oracledatabase\V1\ExadataInfra::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The name of the Exadata Infrastructure resource with the + * format: + * projects/{project}/locations/{region}/cloudExadataInfrastructures/{cloud_exadata_infrastructure} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The name of the Exadata Infrastructure resource with the + * format: + * projects/{project}/locations/{region}/cloudExadataInfrastructures/{cloud_exadata_infrastructure} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. User friendly name for this resource. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Optional. User friendly name for this resource. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Optional. Google Cloud Platform location where Oracle Exadata is hosted. + * + * Generated from protobuf field string gcp_oracle_zone = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getGcpOracleZone() + { + return $this->gcp_oracle_zone; + } + + /** + * Optional. Google Cloud Platform location where Oracle Exadata is hosted. + * + * Generated from protobuf field string gcp_oracle_zone = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setGcpOracleZone($var) + { + GPBUtil::checkString($var, True); + $this->gcp_oracle_zone = $var; + + return $this; + } + + /** + * Output only. Entitlement ID of the private offer against which this + * infrastructure resource is provisioned. + * + * Generated from protobuf field string entitlement_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getEntitlementId() + { + return $this->entitlement_id; + } + + /** + * Output only. Entitlement ID of the private offer against which this + * infrastructure resource is provisioned. + * + * Generated from protobuf field string entitlement_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setEntitlementId($var) + { + GPBUtil::checkString($var, True); + $this->entitlement_id = $var; + + return $this; + } + + /** + * Optional. Various properties of the infra. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.CloudExadataInfrastructureProperties properties = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\OracleDatabase\V1\CloudExadataInfrastructureProperties|null + */ + public function getProperties() + { + return $this->properties; + } + + public function hasProperties() + { + return isset($this->properties); + } + + public function clearProperties() + { + unset($this->properties); + } + + /** + * Optional. Various properties of the infra. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.CloudExadataInfrastructureProperties properties = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\OracleDatabase\V1\CloudExadataInfrastructureProperties $var + * @return $this + */ + public function setProperties($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OracleDatabase\V1\CloudExadataInfrastructureProperties::class); + $this->properties = $var; + + return $this; + } + + /** + * Optional. Labels or tags associated with the resource. + * + * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. Labels or tags associated with the resource. + * + * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Output only. The date and time that the Exadata Infrastructure was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The date and time that the Exadata Infrastructure was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CloudExadataInfrastructureProperties.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CloudExadataInfrastructureProperties.php new file mode 100644 index 000000000000..97d78c5bb6bd --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CloudExadataInfrastructureProperties.php @@ -0,0 +1,1025 @@ +google.cloud.oracledatabase.v1.CloudExadataInfrastructureProperties + */ +class CloudExadataInfrastructureProperties extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. OCID of created infra. + * https://docs.oracle.com/en-us/iaas/Content/General/Concepts/identifiers.htm#Oracle + * + * Generated from protobuf field string ocid = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $ocid = ''; + /** + * Optional. The number of compute servers for the Exadata Infrastructure. + * + * Generated from protobuf field int32 compute_count = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $compute_count = 0; + /** + * Optional. The number of Cloud Exadata storage servers for the Exadata + * Infrastructure. + * + * Generated from protobuf field int32 storage_count = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $storage_count = 0; + /** + * Optional. The total storage allocated to the Exadata Infrastructure + * resource, in gigabytes (GB). + * + * Generated from protobuf field int32 total_storage_size_gb = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $total_storage_size_gb = 0; + /** + * Output only. The available storage can be allocated to the Exadata + * Infrastructure resource, in gigabytes (GB). + * + * Generated from protobuf field int32 available_storage_size_gb = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $available_storage_size_gb = 0; + /** + * Optional. Maintenance window for repair. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.MaintenanceWindow maintenance_window = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $maintenance_window = null; + /** + * Output only. The current lifecycle state of the Exadata Infrastructure. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.CloudExadataInfrastructureProperties.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Required. The shape of the Exadata Infrastructure. The shape determines the + * amount of CPU, storage, and memory resources allocated to the instance. + * + * Generated from protobuf field string shape = 8 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $shape = ''; + /** + * Output only. Deep link to the OCI console to view this resource. + * + * Generated from protobuf field string oci_url = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $oci_url = ''; + /** + * Optional. The number of enabled CPU cores. + * + * Generated from protobuf field int32 cpu_count = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $cpu_count = 0; + /** + * Output only. The total number of CPU cores available. + * + * Generated from protobuf field int32 max_cpu_count = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $max_cpu_count = 0; + /** + * Optional. The memory allocated in GBs. + * + * Generated from protobuf field int32 memory_size_gb = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $memory_size_gb = 0; + /** + * Output only. The total memory available in GBs. + * + * Generated from protobuf field int32 max_memory_gb = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $max_memory_gb = 0; + /** + * Optional. The local node storage allocated in GBs. + * + * Generated from protobuf field int32 db_node_storage_size_gb = 14 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $db_node_storage_size_gb = 0; + /** + * Output only. The total local node storage available in GBs. + * + * Generated from protobuf field int32 max_db_node_storage_size_gb = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $max_db_node_storage_size_gb = 0; + /** + * Output only. Size, in terabytes, of the DATA disk group. + * + * Generated from protobuf field double data_storage_size_tb = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $data_storage_size_tb = 0.0; + /** + * Output only. The total available DATA disk group size. + * + * Generated from protobuf field double max_data_storage_tb = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $max_data_storage_tb = 0.0; + /** + * Output only. The requested number of additional storage servers activated + * for the Exadata Infrastructure. + * + * Generated from protobuf field int32 activated_storage_count = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $activated_storage_count = 0; + /** + * Output only. The requested number of additional storage servers for the + * Exadata Infrastructure. + * + * Generated from protobuf field int32 additional_storage_count = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $additional_storage_count = 0; + /** + * Output only. The software version of the database servers (dom0) in the + * Exadata Infrastructure. + * + * Generated from protobuf field string db_server_version = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $db_server_version = ''; + /** + * Output only. The software version of the storage servers (cells) in the + * Exadata Infrastructure. + * + * Generated from protobuf field string storage_server_version = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $storage_server_version = ''; + /** + * Output only. The OCID of the next maintenance run. + * + * Generated from protobuf field string next_maintenance_run_id = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $next_maintenance_run_id = ''; + /** + * Output only. The time when the next maintenance run will occur. + * + * Generated from protobuf field .google.protobuf.Timestamp next_maintenance_run_time = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $next_maintenance_run_time = null; + /** + * Output only. The time when the next security maintenance run will occur. + * + * Generated from protobuf field .google.protobuf.Timestamp next_security_maintenance_run_time = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $next_security_maintenance_run_time = null; + /** + * Optional. The list of customer contacts. + * + * Generated from protobuf field repeated .google.cloud.oracledatabase.v1.CustomerContact customer_contacts = 25 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $customer_contacts; + /** + * Output only. The monthly software version of the storage servers (cells) + * in the Exadata Infrastructure. Example: 20.1.15 + * + * Generated from protobuf field string monthly_storage_server_version = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $monthly_storage_server_version = ''; + /** + * Output only. The monthly software version of the database servers (dom0) + * in the Exadata Infrastructure. Example: 20.1.15 + * + * Generated from protobuf field string monthly_db_server_version = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $monthly_db_server_version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $ocid + * Output only. OCID of created infra. + * https://docs.oracle.com/en-us/iaas/Content/General/Concepts/identifiers.htm#Oracle + * @type int $compute_count + * Optional. The number of compute servers for the Exadata Infrastructure. + * @type int $storage_count + * Optional. The number of Cloud Exadata storage servers for the Exadata + * Infrastructure. + * @type int $total_storage_size_gb + * Optional. The total storage allocated to the Exadata Infrastructure + * resource, in gigabytes (GB). + * @type int $available_storage_size_gb + * Output only. The available storage can be allocated to the Exadata + * Infrastructure resource, in gigabytes (GB). + * @type \Google\Cloud\OracleDatabase\V1\MaintenanceWindow $maintenance_window + * Optional. Maintenance window for repair. + * @type int $state + * Output only. The current lifecycle state of the Exadata Infrastructure. + * @type string $shape + * Required. The shape of the Exadata Infrastructure. The shape determines the + * amount of CPU, storage, and memory resources allocated to the instance. + * @type string $oci_url + * Output only. Deep link to the OCI console to view this resource. + * @type int $cpu_count + * Optional. The number of enabled CPU cores. + * @type int $max_cpu_count + * Output only. The total number of CPU cores available. + * @type int $memory_size_gb + * Optional. The memory allocated in GBs. + * @type int $max_memory_gb + * Output only. The total memory available in GBs. + * @type int $db_node_storage_size_gb + * Optional. The local node storage allocated in GBs. + * @type int $max_db_node_storage_size_gb + * Output only. The total local node storage available in GBs. + * @type float $data_storage_size_tb + * Output only. Size, in terabytes, of the DATA disk group. + * @type float $max_data_storage_tb + * Output only. The total available DATA disk group size. + * @type int $activated_storage_count + * Output only. The requested number of additional storage servers activated + * for the Exadata Infrastructure. + * @type int $additional_storage_count + * Output only. The requested number of additional storage servers for the + * Exadata Infrastructure. + * @type string $db_server_version + * Output only. The software version of the database servers (dom0) in the + * Exadata Infrastructure. + * @type string $storage_server_version + * Output only. The software version of the storage servers (cells) in the + * Exadata Infrastructure. + * @type string $next_maintenance_run_id + * Output only. The OCID of the next maintenance run. + * @type \Google\Protobuf\Timestamp $next_maintenance_run_time + * Output only. The time when the next maintenance run will occur. + * @type \Google\Protobuf\Timestamp $next_security_maintenance_run_time + * Output only. The time when the next security maintenance run will occur. + * @type array<\Google\Cloud\OracleDatabase\V1\CustomerContact>|\Google\Protobuf\Internal\RepeatedField $customer_contacts + * Optional. The list of customer contacts. + * @type string $monthly_storage_server_version + * Output only. The monthly software version of the storage servers (cells) + * in the Exadata Infrastructure. Example: 20.1.15 + * @type string $monthly_db_server_version + * Output only. The monthly software version of the database servers (dom0) + * in the Exadata Infrastructure. Example: 20.1.15 + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Oracledatabase\V1\ExadataInfra::initOnce(); + parent::__construct($data); + } + + /** + * Output only. OCID of created infra. + * https://docs.oracle.com/en-us/iaas/Content/General/Concepts/identifiers.htm#Oracle + * + * Generated from protobuf field string ocid = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getOcid() + { + return $this->ocid; + } + + /** + * Output only. OCID of created infra. + * https://docs.oracle.com/en-us/iaas/Content/General/Concepts/identifiers.htm#Oracle + * + * Generated from protobuf field string ocid = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setOcid($var) + { + GPBUtil::checkString($var, True); + $this->ocid = $var; + + return $this; + } + + /** + * Optional. The number of compute servers for the Exadata Infrastructure. + * + * Generated from protobuf field int32 compute_count = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getComputeCount() + { + return $this->compute_count; + } + + /** + * Optional. The number of compute servers for the Exadata Infrastructure. + * + * Generated from protobuf field int32 compute_count = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setComputeCount($var) + { + GPBUtil::checkInt32($var); + $this->compute_count = $var; + + return $this; + } + + /** + * Optional. The number of Cloud Exadata storage servers for the Exadata + * Infrastructure. + * + * Generated from protobuf field int32 storage_count = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getStorageCount() + { + return $this->storage_count; + } + + /** + * Optional. The number of Cloud Exadata storage servers for the Exadata + * Infrastructure. + * + * Generated from protobuf field int32 storage_count = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setStorageCount($var) + { + GPBUtil::checkInt32($var); + $this->storage_count = $var; + + return $this; + } + + /** + * Optional. The total storage allocated to the Exadata Infrastructure + * resource, in gigabytes (GB). + * + * Generated from protobuf field int32 total_storage_size_gb = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getTotalStorageSizeGb() + { + return $this->total_storage_size_gb; + } + + /** + * Optional. The total storage allocated to the Exadata Infrastructure + * resource, in gigabytes (GB). + * + * Generated from protobuf field int32 total_storage_size_gb = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setTotalStorageSizeGb($var) + { + GPBUtil::checkInt32($var); + $this->total_storage_size_gb = $var; + + return $this; + } + + /** + * Output only. The available storage can be allocated to the Exadata + * Infrastructure resource, in gigabytes (GB). + * + * Generated from protobuf field int32 available_storage_size_gb = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getAvailableStorageSizeGb() + { + return $this->available_storage_size_gb; + } + + /** + * Output only. The available storage can be allocated to the Exadata + * Infrastructure resource, in gigabytes (GB). + * + * Generated from protobuf field int32 available_storage_size_gb = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setAvailableStorageSizeGb($var) + { + GPBUtil::checkInt32($var); + $this->available_storage_size_gb = $var; + + return $this; + } + + /** + * Optional. Maintenance window for repair. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.MaintenanceWindow maintenance_window = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\OracleDatabase\V1\MaintenanceWindow|null + */ + public function getMaintenanceWindow() + { + return $this->maintenance_window; + } + + public function hasMaintenanceWindow() + { + return isset($this->maintenance_window); + } + + public function clearMaintenanceWindow() + { + unset($this->maintenance_window); + } + + /** + * Optional. Maintenance window for repair. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.MaintenanceWindow maintenance_window = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\OracleDatabase\V1\MaintenanceWindow $var + * @return $this + */ + public function setMaintenanceWindow($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OracleDatabase\V1\MaintenanceWindow::class); + $this->maintenance_window = $var; + + return $this; + } + + /** + * Output only. The current lifecycle state of the Exadata Infrastructure. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.CloudExadataInfrastructureProperties.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The current lifecycle state of the Exadata Infrastructure. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.CloudExadataInfrastructureProperties.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\OracleDatabase\V1\CloudExadataInfrastructureProperties\State::class); + $this->state = $var; + + return $this; + } + + /** + * Required. The shape of the Exadata Infrastructure. The shape determines the + * amount of CPU, storage, and memory resources allocated to the instance. + * + * Generated from protobuf field string shape = 8 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getShape() + { + return $this->shape; + } + + /** + * Required. The shape of the Exadata Infrastructure. The shape determines the + * amount of CPU, storage, and memory resources allocated to the instance. + * + * Generated from protobuf field string shape = 8 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setShape($var) + { + GPBUtil::checkString($var, True); + $this->shape = $var; + + return $this; + } + + /** + * Output only. Deep link to the OCI console to view this resource. + * + * Generated from protobuf field string oci_url = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getOciUrl() + { + return $this->oci_url; + } + + /** + * Output only. Deep link to the OCI console to view this resource. + * + * Generated from protobuf field string oci_url = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setOciUrl($var) + { + GPBUtil::checkString($var, True); + $this->oci_url = $var; + + return $this; + } + + /** + * Optional. The number of enabled CPU cores. + * + * Generated from protobuf field int32 cpu_count = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getCpuCount() + { + return $this->cpu_count; + } + + /** + * Optional. The number of enabled CPU cores. + * + * Generated from protobuf field int32 cpu_count = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setCpuCount($var) + { + GPBUtil::checkInt32($var); + $this->cpu_count = $var; + + return $this; + } + + /** + * Output only. The total number of CPU cores available. + * + * Generated from protobuf field int32 max_cpu_count = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getMaxCpuCount() + { + return $this->max_cpu_count; + } + + /** + * Output only. The total number of CPU cores available. + * + * Generated from protobuf field int32 max_cpu_count = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setMaxCpuCount($var) + { + GPBUtil::checkInt32($var); + $this->max_cpu_count = $var; + + return $this; + } + + /** + * Optional. The memory allocated in GBs. + * + * Generated from protobuf field int32 memory_size_gb = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getMemorySizeGb() + { + return $this->memory_size_gb; + } + + /** + * Optional. The memory allocated in GBs. + * + * Generated from protobuf field int32 memory_size_gb = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setMemorySizeGb($var) + { + GPBUtil::checkInt32($var); + $this->memory_size_gb = $var; + + return $this; + } + + /** + * Output only. The total memory available in GBs. + * + * Generated from protobuf field int32 max_memory_gb = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getMaxMemoryGb() + { + return $this->max_memory_gb; + } + + /** + * Output only. The total memory available in GBs. + * + * Generated from protobuf field int32 max_memory_gb = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setMaxMemoryGb($var) + { + GPBUtil::checkInt32($var); + $this->max_memory_gb = $var; + + return $this; + } + + /** + * Optional. The local node storage allocated in GBs. + * + * Generated from protobuf field int32 db_node_storage_size_gb = 14 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getDbNodeStorageSizeGb() + { + return $this->db_node_storage_size_gb; + } + + /** + * Optional. The local node storage allocated in GBs. + * + * Generated from protobuf field int32 db_node_storage_size_gb = 14 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setDbNodeStorageSizeGb($var) + { + GPBUtil::checkInt32($var); + $this->db_node_storage_size_gb = $var; + + return $this; + } + + /** + * Output only. The total local node storage available in GBs. + * + * Generated from protobuf field int32 max_db_node_storage_size_gb = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getMaxDbNodeStorageSizeGb() + { + return $this->max_db_node_storage_size_gb; + } + + /** + * Output only. The total local node storage available in GBs. + * + * Generated from protobuf field int32 max_db_node_storage_size_gb = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setMaxDbNodeStorageSizeGb($var) + { + GPBUtil::checkInt32($var); + $this->max_db_node_storage_size_gb = $var; + + return $this; + } + + /** + * Output only. Size, in terabytes, of the DATA disk group. + * + * Generated from protobuf field double data_storage_size_tb = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return float + */ + public function getDataStorageSizeTb() + { + return $this->data_storage_size_tb; + } + + /** + * Output only. Size, in terabytes, of the DATA disk group. + * + * Generated from protobuf field double data_storage_size_tb = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param float $var + * @return $this + */ + public function setDataStorageSizeTb($var) + { + GPBUtil::checkDouble($var); + $this->data_storage_size_tb = $var; + + return $this; + } + + /** + * Output only. The total available DATA disk group size. + * + * Generated from protobuf field double max_data_storage_tb = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return float + */ + public function getMaxDataStorageTb() + { + return $this->max_data_storage_tb; + } + + /** + * Output only. The total available DATA disk group size. + * + * Generated from protobuf field double max_data_storage_tb = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param float $var + * @return $this + */ + public function setMaxDataStorageTb($var) + { + GPBUtil::checkDouble($var); + $this->max_data_storage_tb = $var; + + return $this; + } + + /** + * Output only. The requested number of additional storage servers activated + * for the Exadata Infrastructure. + * + * Generated from protobuf field int32 activated_storage_count = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getActivatedStorageCount() + { + return $this->activated_storage_count; + } + + /** + * Output only. The requested number of additional storage servers activated + * for the Exadata Infrastructure. + * + * Generated from protobuf field int32 activated_storage_count = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setActivatedStorageCount($var) + { + GPBUtil::checkInt32($var); + $this->activated_storage_count = $var; + + return $this; + } + + /** + * Output only. The requested number of additional storage servers for the + * Exadata Infrastructure. + * + * Generated from protobuf field int32 additional_storage_count = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getAdditionalStorageCount() + { + return $this->additional_storage_count; + } + + /** + * Output only. The requested number of additional storage servers for the + * Exadata Infrastructure. + * + * Generated from protobuf field int32 additional_storage_count = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setAdditionalStorageCount($var) + { + GPBUtil::checkInt32($var); + $this->additional_storage_count = $var; + + return $this; + } + + /** + * Output only. The software version of the database servers (dom0) in the + * Exadata Infrastructure. + * + * Generated from protobuf field string db_server_version = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDbServerVersion() + { + return $this->db_server_version; + } + + /** + * Output only. The software version of the database servers (dom0) in the + * Exadata Infrastructure. + * + * Generated from protobuf field string db_server_version = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setDbServerVersion($var) + { + GPBUtil::checkString($var, True); + $this->db_server_version = $var; + + return $this; + } + + /** + * Output only. The software version of the storage servers (cells) in the + * Exadata Infrastructure. + * + * Generated from protobuf field string storage_server_version = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getStorageServerVersion() + { + return $this->storage_server_version; + } + + /** + * Output only. The software version of the storage servers (cells) in the + * Exadata Infrastructure. + * + * Generated from protobuf field string storage_server_version = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setStorageServerVersion($var) + { + GPBUtil::checkString($var, True); + $this->storage_server_version = $var; + + return $this; + } + + /** + * Output only. The OCID of the next maintenance run. + * + * Generated from protobuf field string next_maintenance_run_id = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getNextMaintenanceRunId() + { + return $this->next_maintenance_run_id; + } + + /** + * Output only. The OCID of the next maintenance run. + * + * Generated from protobuf field string next_maintenance_run_id = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setNextMaintenanceRunId($var) + { + GPBUtil::checkString($var, True); + $this->next_maintenance_run_id = $var; + + return $this; + } + + /** + * Output only. The time when the next maintenance run will occur. + * + * Generated from protobuf field .google.protobuf.Timestamp next_maintenance_run_time = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getNextMaintenanceRunTime() + { + return $this->next_maintenance_run_time; + } + + public function hasNextMaintenanceRunTime() + { + return isset($this->next_maintenance_run_time); + } + + public function clearNextMaintenanceRunTime() + { + unset($this->next_maintenance_run_time); + } + + /** + * Output only. The time when the next maintenance run will occur. + * + * Generated from protobuf field .google.protobuf.Timestamp next_maintenance_run_time = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setNextMaintenanceRunTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->next_maintenance_run_time = $var; + + return $this; + } + + /** + * Output only. The time when the next security maintenance run will occur. + * + * Generated from protobuf field .google.protobuf.Timestamp next_security_maintenance_run_time = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getNextSecurityMaintenanceRunTime() + { + return $this->next_security_maintenance_run_time; + } + + public function hasNextSecurityMaintenanceRunTime() + { + return isset($this->next_security_maintenance_run_time); + } + + public function clearNextSecurityMaintenanceRunTime() + { + unset($this->next_security_maintenance_run_time); + } + + /** + * Output only. The time when the next security maintenance run will occur. + * + * Generated from protobuf field .google.protobuf.Timestamp next_security_maintenance_run_time = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setNextSecurityMaintenanceRunTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->next_security_maintenance_run_time = $var; + + return $this; + } + + /** + * Optional. The list of customer contacts. + * + * Generated from protobuf field repeated .google.cloud.oracledatabase.v1.CustomerContact customer_contacts = 25 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCustomerContacts() + { + return $this->customer_contacts; + } + + /** + * Optional. The list of customer contacts. + * + * Generated from protobuf field repeated .google.cloud.oracledatabase.v1.CustomerContact customer_contacts = 25 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\OracleDatabase\V1\CustomerContact>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCustomerContacts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\OracleDatabase\V1\CustomerContact::class); + $this->customer_contacts = $arr; + + return $this; + } + + /** + * Output only. The monthly software version of the storage servers (cells) + * in the Exadata Infrastructure. Example: 20.1.15 + * + * Generated from protobuf field string monthly_storage_server_version = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getMonthlyStorageServerVersion() + { + return $this->monthly_storage_server_version; + } + + /** + * Output only. The monthly software version of the storage servers (cells) + * in the Exadata Infrastructure. Example: 20.1.15 + * + * Generated from protobuf field string monthly_storage_server_version = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setMonthlyStorageServerVersion($var) + { + GPBUtil::checkString($var, True); + $this->monthly_storage_server_version = $var; + + return $this; + } + + /** + * Output only. The monthly software version of the database servers (dom0) + * in the Exadata Infrastructure. Example: 20.1.15 + * + * Generated from protobuf field string monthly_db_server_version = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getMonthlyDbServerVersion() + { + return $this->monthly_db_server_version; + } + + /** + * Output only. The monthly software version of the database servers (dom0) + * in the Exadata Infrastructure. Example: 20.1.15 + * + * Generated from protobuf field string monthly_db_server_version = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setMonthlyDbServerVersion($var) + { + GPBUtil::checkString($var, True); + $this->monthly_db_server_version = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CloudExadataInfrastructureProperties/State.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CloudExadataInfrastructureProperties/State.php new file mode 100644 index 000000000000..4b754316302c --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CloudExadataInfrastructureProperties/State.php @@ -0,0 +1,99 @@ +google.cloud.oracledatabase.v1.CloudExadataInfrastructureProperties.State + */ +class State +{ + /** + * Default unspecified value. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The Exadata Infrastructure is being provisioned. + * + * Generated from protobuf enum PROVISIONING = 1; + */ + const PROVISIONING = 1; + /** + * The Exadata Infrastructure is available for use. + * + * Generated from protobuf enum AVAILABLE = 2; + */ + const AVAILABLE = 2; + /** + * The Exadata Infrastructure is being updated. + * + * Generated from protobuf enum UPDATING = 3; + */ + const UPDATING = 3; + /** + * The Exadata Infrastructure is being terminated. + * + * Generated from protobuf enum TERMINATING = 4; + */ + const TERMINATING = 4; + /** + * The Exadata Infrastructure is terminated. + * + * Generated from protobuf enum TERMINATED = 5; + */ + const TERMINATED = 5; + /** + * The Exadata Infrastructure is in failed state. + * + * Generated from protobuf enum FAILED = 6; + */ + const FAILED = 6; + /** + * The Exadata Infrastructure is in maintenance. + * + * Generated from protobuf enum MAINTENANCE_IN_PROGRESS = 7; + */ + const MAINTENANCE_IN_PROGRESS = 7; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::PROVISIONING => 'PROVISIONING', + self::AVAILABLE => 'AVAILABLE', + self::UPDATING => 'UPDATING', + self::TERMINATING => 'TERMINATING', + self::TERMINATED => 'TERMINATED', + self::FAILED => 'FAILED', + self::MAINTENANCE_IN_PROGRESS => 'MAINTENANCE_IN_PROGRESS', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\OracleDatabase\V1\CloudExadataInfrastructureProperties_State::class); + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CloudVmCluster.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CloudVmCluster.php new file mode 100644 index 000000000000..56840d098dfc --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CloudVmCluster.php @@ -0,0 +1,414 @@ +google.cloud.oracledatabase.v1.CloudVmCluster + */ +class CloudVmCluster extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The name of the VM Cluster resource with the format: + * projects/{project}/locations/{region}/cloudVmClusters/{cloud_vm_cluster} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Required. The name of the Exadata Infrastructure resource on which VM + * cluster resource is created, in the following format: + * projects/{project}/locations/{region}/cloudExadataInfrastuctures/{cloud_extradata_infrastructure} + * + * Generated from protobuf field string exadata_infrastructure = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $exadata_infrastructure = ''; + /** + * Optional. User friendly name for this resource. + * + * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $display_name = ''; + /** + * Output only. Google Cloud Platform location where Oracle Exadata is hosted. + * It is same as Google Cloud Platform Oracle zone of Exadata infrastructure. + * + * Generated from protobuf field string gcp_oracle_zone = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $gcp_oracle_zone = ''; + /** + * Optional. Various properties of the VM Cluster. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.CloudVmClusterProperties properties = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $properties = null; + /** + * Optional. Labels or tags associated with the VM Cluster. + * + * Generated from protobuf field map labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Output only. The date and time that the VM cluster was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Required. Network settings. CIDR to use for cluster IP allocation. + * + * Generated from protobuf field string cidr = 9 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $cidr = ''; + /** + * Required. CIDR range of the backup subnet. + * + * Generated from protobuf field string backup_subnet_cidr = 10 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $backup_subnet_cidr = ''; + /** + * Required. The name of the VPC network. + * Format: projects/{project}/global/networks/{network} + * + * Generated from protobuf field string network = 11 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $network = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The name of the VM Cluster resource with the format: + * projects/{project}/locations/{region}/cloudVmClusters/{cloud_vm_cluster} + * @type string $exadata_infrastructure + * Required. The name of the Exadata Infrastructure resource on which VM + * cluster resource is created, in the following format: + * projects/{project}/locations/{region}/cloudExadataInfrastuctures/{cloud_extradata_infrastructure} + * @type string $display_name + * Optional. User friendly name for this resource. + * @type string $gcp_oracle_zone + * Output only. Google Cloud Platform location where Oracle Exadata is hosted. + * It is same as Google Cloud Platform Oracle zone of Exadata infrastructure. + * @type \Google\Cloud\OracleDatabase\V1\CloudVmClusterProperties $properties + * Optional. Various properties of the VM Cluster. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. Labels or tags associated with the VM Cluster. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The date and time that the VM cluster was created. + * @type string $cidr + * Required. Network settings. CIDR to use for cluster IP allocation. + * @type string $backup_subnet_cidr + * Required. CIDR range of the backup subnet. + * @type string $network + * Required. The name of the VPC network. + * Format: projects/{project}/global/networks/{network} + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Oracledatabase\V1\VmCluster::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The name of the VM Cluster resource with the format: + * projects/{project}/locations/{region}/cloudVmClusters/{cloud_vm_cluster} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The name of the VM Cluster resource with the format: + * projects/{project}/locations/{region}/cloudVmClusters/{cloud_vm_cluster} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. The name of the Exadata Infrastructure resource on which VM + * cluster resource is created, in the following format: + * projects/{project}/locations/{region}/cloudExadataInfrastuctures/{cloud_extradata_infrastructure} + * + * Generated from protobuf field string exadata_infrastructure = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getExadataInfrastructure() + { + return $this->exadata_infrastructure; + } + + /** + * Required. The name of the Exadata Infrastructure resource on which VM + * cluster resource is created, in the following format: + * projects/{project}/locations/{region}/cloudExadataInfrastuctures/{cloud_extradata_infrastructure} + * + * Generated from protobuf field string exadata_infrastructure = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setExadataInfrastructure($var) + { + GPBUtil::checkString($var, True); + $this->exadata_infrastructure = $var; + + return $this; + } + + /** + * Optional. User friendly name for this resource. + * + * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Optional. User friendly name for this resource. + * + * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Output only. Google Cloud Platform location where Oracle Exadata is hosted. + * It is same as Google Cloud Platform Oracle zone of Exadata infrastructure. + * + * Generated from protobuf field string gcp_oracle_zone = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getGcpOracleZone() + { + return $this->gcp_oracle_zone; + } + + /** + * Output only. Google Cloud Platform location where Oracle Exadata is hosted. + * It is same as Google Cloud Platform Oracle zone of Exadata infrastructure. + * + * Generated from protobuf field string gcp_oracle_zone = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setGcpOracleZone($var) + { + GPBUtil::checkString($var, True); + $this->gcp_oracle_zone = $var; + + return $this; + } + + /** + * Optional. Various properties of the VM Cluster. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.CloudVmClusterProperties properties = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\OracleDatabase\V1\CloudVmClusterProperties|null + */ + public function getProperties() + { + return $this->properties; + } + + public function hasProperties() + { + return isset($this->properties); + } + + public function clearProperties() + { + unset($this->properties); + } + + /** + * Optional. Various properties of the VM Cluster. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.CloudVmClusterProperties properties = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\OracleDatabase\V1\CloudVmClusterProperties $var + * @return $this + */ + public function setProperties($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OracleDatabase\V1\CloudVmClusterProperties::class); + $this->properties = $var; + + return $this; + } + + /** + * Optional. Labels or tags associated with the VM Cluster. + * + * Generated from protobuf field map labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. Labels or tags associated with the VM Cluster. + * + * Generated from protobuf field map labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Output only. The date and time that the VM cluster was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The date and time that the VM cluster was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Required. Network settings. CIDR to use for cluster IP allocation. + * + * Generated from protobuf field string cidr = 9 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getCidr() + { + return $this->cidr; + } + + /** + * Required. Network settings. CIDR to use for cluster IP allocation. + * + * Generated from protobuf field string cidr = 9 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setCidr($var) + { + GPBUtil::checkString($var, True); + $this->cidr = $var; + + return $this; + } + + /** + * Required. CIDR range of the backup subnet. + * + * Generated from protobuf field string backup_subnet_cidr = 10 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getBackupSubnetCidr() + { + return $this->backup_subnet_cidr; + } + + /** + * Required. CIDR range of the backup subnet. + * + * Generated from protobuf field string backup_subnet_cidr = 10 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setBackupSubnetCidr($var) + { + GPBUtil::checkString($var, True); + $this->backup_subnet_cidr = $var; + + return $this; + } + + /** + * Required. The name of the VPC network. + * Format: projects/{project}/global/networks/{network} + * + * Generated from protobuf field string network = 11 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getNetwork() + { + return $this->network; + } + + /** + * Required. The name of the VPC network. + * Format: projects/{project}/global/networks/{network} + * + * Generated from protobuf field string network = 11 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setNetwork($var) + { + GPBUtil::checkString($var, True); + $this->network = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CloudVmClusterProperties.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CloudVmClusterProperties.php new file mode 100644 index 000000000000..205d69e8c506 --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CloudVmClusterProperties.php @@ -0,0 +1,1157 @@ +google.cloud.oracledatabase.v1.CloudVmClusterProperties + */ +class CloudVmClusterProperties extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Oracle Cloud Infrastructure ID of VM Cluster. + * + * Generated from protobuf field string ocid = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $ocid = ''; + /** + * Required. License type of VM Cluster. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.CloudVmClusterProperties.LicenseType license_type = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $license_type = 0; + /** + * Optional. Grid Infrastructure Version. + * + * Generated from protobuf field string gi_version = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $gi_version = ''; + /** + * Optional. Time zone of VM Cluster to set. Defaults to UTC if not specified. + * + * Generated from protobuf field .google.type.TimeZone time_zone = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $time_zone = null; + /** + * Optional. SSH public keys to be stored with cluster. + * + * Generated from protobuf field repeated string ssh_public_keys = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $ssh_public_keys; + /** + * Optional. Number of database servers. + * + * Generated from protobuf field int32 node_count = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $node_count = 0; + /** + * Output only. Shape of VM Cluster. + * + * Generated from protobuf field string shape = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $shape = ''; + /** + * Optional. OCPU count per VM. Minimum is 0.1. + * + * Generated from protobuf field float ocpu_count = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $ocpu_count = 0.0; + /** + * Optional. Memory allocated in GBs. + * + * Generated from protobuf field int32 memory_size_gb = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $memory_size_gb = 0; + /** + * Optional. Local storage per VM. + * + * Generated from protobuf field int32 db_node_storage_size_gb = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $db_node_storage_size_gb = 0; + /** + * Output only. The storage allocation for the disk group, in gigabytes (GB). + * + * Generated from protobuf field int32 storage_size_gb = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $storage_size_gb = 0; + /** + * Optional. The data disk group size to be allocated in TBs. + * + * Generated from protobuf field double data_storage_size_tb = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $data_storage_size_tb = 0.0; + /** + * Optional. The type of redundancy. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.CloudVmClusterProperties.DiskRedundancy disk_redundancy = 13 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $disk_redundancy = 0; + /** + * Optional. Use exadata sparse snapshots. + * + * Generated from protobuf field bool sparse_diskgroup_enabled = 14 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $sparse_diskgroup_enabled = false; + /** + * Optional. Use local backup. + * + * Generated from protobuf field bool local_backup_enabled = 15 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $local_backup_enabled = false; + /** + * Optional. Prefix for VM cluster host names. + * + * Generated from protobuf field string hostname_prefix = 16 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $hostname_prefix = ''; + /** + * Optional. Data collection options for diagnostics. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.DataCollectionOptions diagnostics_data_collection_options = 19 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $diagnostics_data_collection_options = null; + /** + * Output only. State of the cluster. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.CloudVmClusterProperties.State state = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. SCAN listener port - TCP + * + * Generated from protobuf field int32 scan_listener_port_tcp = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $scan_listener_port_tcp = 0; + /** + * Output only. SCAN listener port - TLS + * + * Generated from protobuf field int32 scan_listener_port_tcp_ssl = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $scan_listener_port_tcp_ssl = 0; + /** + * Output only. Parent DNS domain where SCAN DNS and hosts names are + * qualified. ex: ocispdelegated.ocisp10jvnet.oraclevcn.com + * + * Generated from protobuf field string domain = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $domain = ''; + /** + * Output only. SCAN DNS name. + * ex: sp2-yi0xq-scan.ocispdelegated.ocisp10jvnet.oraclevcn.com + * + * Generated from protobuf field string scan_dns = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $scan_dns = ''; + /** + * Output only. host name without domain. + * format: "-" with some suffix. + * ex: sp2-yi0xq where "sp2" is the hostname_prefix. + * + * Generated from protobuf field string hostname = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $hostname = ''; + /** + * Required. Number of enabled CPU cores. + * + * Generated from protobuf field int32 cpu_core_count = 26 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $cpu_core_count = 0; + /** + * Output only. Operating system version of the image. + * + * Generated from protobuf field string system_version = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $system_version = ''; + /** + * Output only. OCIDs of scan IPs. + * + * Generated from protobuf field repeated string scan_ip_ids = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $scan_ip_ids; + /** + * Output only. OCID of scan DNS record. + * + * Generated from protobuf field string scan_dns_record_id = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $scan_dns_record_id = ''; + /** + * Output only. Deep link to the OCI console to view this resource. + * + * Generated from protobuf field string oci_url = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $oci_url = ''; + /** + * Optional. OCID of database servers. + * + * Generated from protobuf field repeated string db_server_ocids = 31 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $db_server_ocids; + /** + * Output only. Compartment ID of cluster. + * + * Generated from protobuf field string compartment_id = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $compartment_id = ''; + /** + * Output only. DNS listener IP. + * + * Generated from protobuf field string dns_listener_ip = 35 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $dns_listener_ip = ''; + /** + * Optional. OCI Cluster name. + * + * Generated from protobuf field string cluster_name = 36 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $cluster_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $ocid + * Output only. Oracle Cloud Infrastructure ID of VM Cluster. + * @type int $license_type + * Required. License type of VM Cluster. + * @type string $gi_version + * Optional. Grid Infrastructure Version. + * @type \Google\Type\TimeZone $time_zone + * Optional. Time zone of VM Cluster to set. Defaults to UTC if not specified. + * @type array|\Google\Protobuf\Internal\RepeatedField $ssh_public_keys + * Optional. SSH public keys to be stored with cluster. + * @type int $node_count + * Optional. Number of database servers. + * @type string $shape + * Output only. Shape of VM Cluster. + * @type float $ocpu_count + * Optional. OCPU count per VM. Minimum is 0.1. + * @type int $memory_size_gb + * Optional. Memory allocated in GBs. + * @type int $db_node_storage_size_gb + * Optional. Local storage per VM. + * @type int $storage_size_gb + * Output only. The storage allocation for the disk group, in gigabytes (GB). + * @type float $data_storage_size_tb + * Optional. The data disk group size to be allocated in TBs. + * @type int $disk_redundancy + * Optional. The type of redundancy. + * @type bool $sparse_diskgroup_enabled + * Optional. Use exadata sparse snapshots. + * @type bool $local_backup_enabled + * Optional. Use local backup. + * @type string $hostname_prefix + * Optional. Prefix for VM cluster host names. + * @type \Google\Cloud\OracleDatabase\V1\DataCollectionOptions $diagnostics_data_collection_options + * Optional. Data collection options for diagnostics. + * @type int $state + * Output only. State of the cluster. + * @type int $scan_listener_port_tcp + * Output only. SCAN listener port - TCP + * @type int $scan_listener_port_tcp_ssl + * Output only. SCAN listener port - TLS + * @type string $domain + * Output only. Parent DNS domain where SCAN DNS and hosts names are + * qualified. ex: ocispdelegated.ocisp10jvnet.oraclevcn.com + * @type string $scan_dns + * Output only. SCAN DNS name. + * ex: sp2-yi0xq-scan.ocispdelegated.ocisp10jvnet.oraclevcn.com + * @type string $hostname + * Output only. host name without domain. + * format: "-" with some suffix. + * ex: sp2-yi0xq where "sp2" is the hostname_prefix. + * @type int $cpu_core_count + * Required. Number of enabled CPU cores. + * @type string $system_version + * Output only. Operating system version of the image. + * @type array|\Google\Protobuf\Internal\RepeatedField $scan_ip_ids + * Output only. OCIDs of scan IPs. + * @type string $scan_dns_record_id + * Output only. OCID of scan DNS record. + * @type string $oci_url + * Output only. Deep link to the OCI console to view this resource. + * @type array|\Google\Protobuf\Internal\RepeatedField $db_server_ocids + * Optional. OCID of database servers. + * @type string $compartment_id + * Output only. Compartment ID of cluster. + * @type string $dns_listener_ip + * Output only. DNS listener IP. + * @type string $cluster_name + * Optional. OCI Cluster name. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Oracledatabase\V1\VmCluster::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Oracle Cloud Infrastructure ID of VM Cluster. + * + * Generated from protobuf field string ocid = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getOcid() + { + return $this->ocid; + } + + /** + * Output only. Oracle Cloud Infrastructure ID of VM Cluster. + * + * Generated from protobuf field string ocid = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setOcid($var) + { + GPBUtil::checkString($var, True); + $this->ocid = $var; + + return $this; + } + + /** + * Required. License type of VM Cluster. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.CloudVmClusterProperties.LicenseType license_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getLicenseType() + { + return $this->license_type; + } + + /** + * Required. License type of VM Cluster. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.CloudVmClusterProperties.LicenseType license_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setLicenseType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\OracleDatabase\V1\CloudVmClusterProperties\LicenseType::class); + $this->license_type = $var; + + return $this; + } + + /** + * Optional. Grid Infrastructure Version. + * + * Generated from protobuf field string gi_version = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getGiVersion() + { + return $this->gi_version; + } + + /** + * Optional. Grid Infrastructure Version. + * + * Generated from protobuf field string gi_version = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setGiVersion($var) + { + GPBUtil::checkString($var, True); + $this->gi_version = $var; + + return $this; + } + + /** + * Optional. Time zone of VM Cluster to set. Defaults to UTC if not specified. + * + * Generated from protobuf field .google.type.TimeZone time_zone = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Type\TimeZone|null + */ + public function getTimeZone() + { + return $this->time_zone; + } + + public function hasTimeZone() + { + return isset($this->time_zone); + } + + public function clearTimeZone() + { + unset($this->time_zone); + } + + /** + * Optional. Time zone of VM Cluster to set. Defaults to UTC if not specified. + * + * Generated from protobuf field .google.type.TimeZone time_zone = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Type\TimeZone $var + * @return $this + */ + public function setTimeZone($var) + { + GPBUtil::checkMessage($var, \Google\Type\TimeZone::class); + $this->time_zone = $var; + + return $this; + } + + /** + * Optional. SSH public keys to be stored with cluster. + * + * Generated from protobuf field repeated string ssh_public_keys = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSshPublicKeys() + { + return $this->ssh_public_keys; + } + + /** + * Optional. SSH public keys to be stored with cluster. + * + * Generated from protobuf field repeated string ssh_public_keys = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSshPublicKeys($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->ssh_public_keys = $arr; + + return $this; + } + + /** + * Optional. Number of database servers. + * + * Generated from protobuf field int32 node_count = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getNodeCount() + { + return $this->node_count; + } + + /** + * Optional. Number of database servers. + * + * Generated from protobuf field int32 node_count = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setNodeCount($var) + { + GPBUtil::checkInt32($var); + $this->node_count = $var; + + return $this; + } + + /** + * Output only. Shape of VM Cluster. + * + * Generated from protobuf field string shape = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getShape() + { + return $this->shape; + } + + /** + * Output only. Shape of VM Cluster. + * + * Generated from protobuf field string shape = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setShape($var) + { + GPBUtil::checkString($var, True); + $this->shape = $var; + + return $this; + } + + /** + * Optional. OCPU count per VM. Minimum is 0.1. + * + * Generated from protobuf field float ocpu_count = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return float + */ + public function getOcpuCount() + { + return $this->ocpu_count; + } + + /** + * Optional. OCPU count per VM. Minimum is 0.1. + * + * Generated from protobuf field float ocpu_count = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param float $var + * @return $this + */ + public function setOcpuCount($var) + { + GPBUtil::checkFloat($var); + $this->ocpu_count = $var; + + return $this; + } + + /** + * Optional. Memory allocated in GBs. + * + * Generated from protobuf field int32 memory_size_gb = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getMemorySizeGb() + { + return $this->memory_size_gb; + } + + /** + * Optional. Memory allocated in GBs. + * + * Generated from protobuf field int32 memory_size_gb = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setMemorySizeGb($var) + { + GPBUtil::checkInt32($var); + $this->memory_size_gb = $var; + + return $this; + } + + /** + * Optional. Local storage per VM. + * + * Generated from protobuf field int32 db_node_storage_size_gb = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getDbNodeStorageSizeGb() + { + return $this->db_node_storage_size_gb; + } + + /** + * Optional. Local storage per VM. + * + * Generated from protobuf field int32 db_node_storage_size_gb = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setDbNodeStorageSizeGb($var) + { + GPBUtil::checkInt32($var); + $this->db_node_storage_size_gb = $var; + + return $this; + } + + /** + * Output only. The storage allocation for the disk group, in gigabytes (GB). + * + * Generated from protobuf field int32 storage_size_gb = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getStorageSizeGb() + { + return $this->storage_size_gb; + } + + /** + * Output only. The storage allocation for the disk group, in gigabytes (GB). + * + * Generated from protobuf field int32 storage_size_gb = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setStorageSizeGb($var) + { + GPBUtil::checkInt32($var); + $this->storage_size_gb = $var; + + return $this; + } + + /** + * Optional. The data disk group size to be allocated in TBs. + * + * Generated from protobuf field double data_storage_size_tb = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @return float + */ + public function getDataStorageSizeTb() + { + return $this->data_storage_size_tb; + } + + /** + * Optional. The data disk group size to be allocated in TBs. + * + * Generated from protobuf field double data_storage_size_tb = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @param float $var + * @return $this + */ + public function setDataStorageSizeTb($var) + { + GPBUtil::checkDouble($var); + $this->data_storage_size_tb = $var; + + return $this; + } + + /** + * Optional. The type of redundancy. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.CloudVmClusterProperties.DiskRedundancy disk_redundancy = 13 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getDiskRedundancy() + { + return $this->disk_redundancy; + } + + /** + * Optional. The type of redundancy. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.CloudVmClusterProperties.DiskRedundancy disk_redundancy = 13 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setDiskRedundancy($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\OracleDatabase\V1\CloudVmClusterProperties\DiskRedundancy::class); + $this->disk_redundancy = $var; + + return $this; + } + + /** + * Optional. Use exadata sparse snapshots. + * + * Generated from protobuf field bool sparse_diskgroup_enabled = 14 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getSparseDiskgroupEnabled() + { + return $this->sparse_diskgroup_enabled; + } + + /** + * Optional. Use exadata sparse snapshots. + * + * Generated from protobuf field bool sparse_diskgroup_enabled = 14 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setSparseDiskgroupEnabled($var) + { + GPBUtil::checkBool($var); + $this->sparse_diskgroup_enabled = $var; + + return $this; + } + + /** + * Optional. Use local backup. + * + * Generated from protobuf field bool local_backup_enabled = 15 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getLocalBackupEnabled() + { + return $this->local_backup_enabled; + } + + /** + * Optional. Use local backup. + * + * Generated from protobuf field bool local_backup_enabled = 15 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setLocalBackupEnabled($var) + { + GPBUtil::checkBool($var); + $this->local_backup_enabled = $var; + + return $this; + } + + /** + * Optional. Prefix for VM cluster host names. + * + * Generated from protobuf field string hostname_prefix = 16 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getHostnamePrefix() + { + return $this->hostname_prefix; + } + + /** + * Optional. Prefix for VM cluster host names. + * + * Generated from protobuf field string hostname_prefix = 16 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setHostnamePrefix($var) + { + GPBUtil::checkString($var, True); + $this->hostname_prefix = $var; + + return $this; + } + + /** + * Optional. Data collection options for diagnostics. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.DataCollectionOptions diagnostics_data_collection_options = 19 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\OracleDatabase\V1\DataCollectionOptions|null + */ + public function getDiagnosticsDataCollectionOptions() + { + return $this->diagnostics_data_collection_options; + } + + public function hasDiagnosticsDataCollectionOptions() + { + return isset($this->diagnostics_data_collection_options); + } + + public function clearDiagnosticsDataCollectionOptions() + { + unset($this->diagnostics_data_collection_options); + } + + /** + * Optional. Data collection options for diagnostics. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.DataCollectionOptions diagnostics_data_collection_options = 19 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\OracleDatabase\V1\DataCollectionOptions $var + * @return $this + */ + public function setDiagnosticsDataCollectionOptions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OracleDatabase\V1\DataCollectionOptions::class); + $this->diagnostics_data_collection_options = $var; + + return $this; + } + + /** + * Output only. State of the cluster. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.CloudVmClusterProperties.State state = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. State of the cluster. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.CloudVmClusterProperties.State state = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\OracleDatabase\V1\CloudVmClusterProperties\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. SCAN listener port - TCP + * + * Generated from protobuf field int32 scan_listener_port_tcp = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getScanListenerPortTcp() + { + return $this->scan_listener_port_tcp; + } + + /** + * Output only. SCAN listener port - TCP + * + * Generated from protobuf field int32 scan_listener_port_tcp = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setScanListenerPortTcp($var) + { + GPBUtil::checkInt32($var); + $this->scan_listener_port_tcp = $var; + + return $this; + } + + /** + * Output only. SCAN listener port - TLS + * + * Generated from protobuf field int32 scan_listener_port_tcp_ssl = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getScanListenerPortTcpSsl() + { + return $this->scan_listener_port_tcp_ssl; + } + + /** + * Output only. SCAN listener port - TLS + * + * Generated from protobuf field int32 scan_listener_port_tcp_ssl = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setScanListenerPortTcpSsl($var) + { + GPBUtil::checkInt32($var); + $this->scan_listener_port_tcp_ssl = $var; + + return $this; + } + + /** + * Output only. Parent DNS domain where SCAN DNS and hosts names are + * qualified. ex: ocispdelegated.ocisp10jvnet.oraclevcn.com + * + * Generated from protobuf field string domain = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDomain() + { + return $this->domain; + } + + /** + * Output only. Parent DNS domain where SCAN DNS and hosts names are + * qualified. ex: ocispdelegated.ocisp10jvnet.oraclevcn.com + * + * Generated from protobuf field string domain = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setDomain($var) + { + GPBUtil::checkString($var, True); + $this->domain = $var; + + return $this; + } + + /** + * Output only. SCAN DNS name. + * ex: sp2-yi0xq-scan.ocispdelegated.ocisp10jvnet.oraclevcn.com + * + * Generated from protobuf field string scan_dns = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getScanDns() + { + return $this->scan_dns; + } + + /** + * Output only. SCAN DNS name. + * ex: sp2-yi0xq-scan.ocispdelegated.ocisp10jvnet.oraclevcn.com + * + * Generated from protobuf field string scan_dns = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setScanDns($var) + { + GPBUtil::checkString($var, True); + $this->scan_dns = $var; + + return $this; + } + + /** + * Output only. host name without domain. + * format: "-" with some suffix. + * ex: sp2-yi0xq where "sp2" is the hostname_prefix. + * + * Generated from protobuf field string hostname = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getHostname() + { + return $this->hostname; + } + + /** + * Output only. host name without domain. + * format: "-" with some suffix. + * ex: sp2-yi0xq where "sp2" is the hostname_prefix. + * + * Generated from protobuf field string hostname = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setHostname($var) + { + GPBUtil::checkString($var, True); + $this->hostname = $var; + + return $this; + } + + /** + * Required. Number of enabled CPU cores. + * + * Generated from protobuf field int32 cpu_core_count = 26 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getCpuCoreCount() + { + return $this->cpu_core_count; + } + + /** + * Required. Number of enabled CPU cores. + * + * Generated from protobuf field int32 cpu_core_count = 26 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setCpuCoreCount($var) + { + GPBUtil::checkInt32($var); + $this->cpu_core_count = $var; + + return $this; + } + + /** + * Output only. Operating system version of the image. + * + * Generated from protobuf field string system_version = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getSystemVersion() + { + return $this->system_version; + } + + /** + * Output only. Operating system version of the image. + * + * Generated from protobuf field string system_version = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setSystemVersion($var) + { + GPBUtil::checkString($var, True); + $this->system_version = $var; + + return $this; + } + + /** + * Output only. OCIDs of scan IPs. + * + * Generated from protobuf field repeated string scan_ip_ids = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getScanIpIds() + { + return $this->scan_ip_ids; + } + + /** + * Output only. OCIDs of scan IPs. + * + * Generated from protobuf field repeated string scan_ip_ids = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setScanIpIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->scan_ip_ids = $arr; + + return $this; + } + + /** + * Output only. OCID of scan DNS record. + * + * Generated from protobuf field string scan_dns_record_id = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getScanDnsRecordId() + { + return $this->scan_dns_record_id; + } + + /** + * Output only. OCID of scan DNS record. + * + * Generated from protobuf field string scan_dns_record_id = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setScanDnsRecordId($var) + { + GPBUtil::checkString($var, True); + $this->scan_dns_record_id = $var; + + return $this; + } + + /** + * Output only. Deep link to the OCI console to view this resource. + * + * Generated from protobuf field string oci_url = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getOciUrl() + { + return $this->oci_url; + } + + /** + * Output only. Deep link to the OCI console to view this resource. + * + * Generated from protobuf field string oci_url = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setOciUrl($var) + { + GPBUtil::checkString($var, True); + $this->oci_url = $var; + + return $this; + } + + /** + * Optional. OCID of database servers. + * + * Generated from protobuf field repeated string db_server_ocids = 31 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDbServerOcids() + { + return $this->db_server_ocids; + } + + /** + * Optional. OCID of database servers. + * + * Generated from protobuf field repeated string db_server_ocids = 31 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDbServerOcids($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->db_server_ocids = $arr; + + return $this; + } + + /** + * Output only. Compartment ID of cluster. + * + * Generated from protobuf field string compartment_id = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getCompartmentId() + { + return $this->compartment_id; + } + + /** + * Output only. Compartment ID of cluster. + * + * Generated from protobuf field string compartment_id = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setCompartmentId($var) + { + GPBUtil::checkString($var, True); + $this->compartment_id = $var; + + return $this; + } + + /** + * Output only. DNS listener IP. + * + * Generated from protobuf field string dns_listener_ip = 35 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDnsListenerIp() + { + return $this->dns_listener_ip; + } + + /** + * Output only. DNS listener IP. + * + * Generated from protobuf field string dns_listener_ip = 35 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setDnsListenerIp($var) + { + GPBUtil::checkString($var, True); + $this->dns_listener_ip = $var; + + return $this; + } + + /** + * Optional. OCI Cluster name. + * + * Generated from protobuf field string cluster_name = 36 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getClusterName() + { + return $this->cluster_name; + } + + /** + * Optional. OCI Cluster name. + * + * Generated from protobuf field string cluster_name = 36 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setClusterName($var) + { + GPBUtil::checkString($var, True); + $this->cluster_name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CloudVmClusterProperties/DiskRedundancy.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CloudVmClusterProperties/DiskRedundancy.php new file mode 100644 index 000000000000..b386169f41a2 --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CloudVmClusterProperties/DiskRedundancy.php @@ -0,0 +1,64 @@ +google.cloud.oracledatabase.v1.CloudVmClusterProperties.DiskRedundancy + */ +class DiskRedundancy +{ + /** + * Unspecified. + * + * Generated from protobuf enum DISK_REDUNDANCY_UNSPECIFIED = 0; + */ + const DISK_REDUNDANCY_UNSPECIFIED = 0; + /** + * High - 3 way mirror. + * + * Generated from protobuf enum HIGH = 1; + */ + const HIGH = 1; + /** + * Normal - 2 way mirror. + * + * Generated from protobuf enum NORMAL = 2; + */ + const NORMAL = 2; + + private static $valueToName = [ + self::DISK_REDUNDANCY_UNSPECIFIED => 'DISK_REDUNDANCY_UNSPECIFIED', + self::HIGH => 'HIGH', + self::NORMAL => 'NORMAL', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(DiskRedundancy::class, \Google\Cloud\OracleDatabase\V1\CloudVmClusterProperties_DiskRedundancy::class); + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CloudVmClusterProperties/LicenseType.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CloudVmClusterProperties/LicenseType.php new file mode 100644 index 000000000000..2a21b015c8bc --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CloudVmClusterProperties/LicenseType.php @@ -0,0 +1,64 @@ +google.cloud.oracledatabase.v1.CloudVmClusterProperties.LicenseType + */ +class LicenseType +{ + /** + * Unspecified + * + * Generated from protobuf enum LICENSE_TYPE_UNSPECIFIED = 0; + */ + const LICENSE_TYPE_UNSPECIFIED = 0; + /** + * License included part of offer + * + * Generated from protobuf enum LICENSE_INCLUDED = 1; + */ + const LICENSE_INCLUDED = 1; + /** + * Bring your own license + * + * Generated from protobuf enum BRING_YOUR_OWN_LICENSE = 2; + */ + const BRING_YOUR_OWN_LICENSE = 2; + + private static $valueToName = [ + self::LICENSE_TYPE_UNSPECIFIED => 'LICENSE_TYPE_UNSPECIFIED', + self::LICENSE_INCLUDED => 'LICENSE_INCLUDED', + self::BRING_YOUR_OWN_LICENSE => 'BRING_YOUR_OWN_LICENSE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(LicenseType::class, \Google\Cloud\OracleDatabase\V1\CloudVmClusterProperties_LicenseType::class); + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CloudVmClusterProperties/State.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CloudVmClusterProperties/State.php new file mode 100644 index 000000000000..4ae5c9489a27 --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CloudVmClusterProperties/State.php @@ -0,0 +1,99 @@ +google.cloud.oracledatabase.v1.CloudVmClusterProperties.State + */ +class State +{ + /** + * Default unspecified value. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Indicates that the resource is in provisioning state. + * + * Generated from protobuf enum PROVISIONING = 1; + */ + const PROVISIONING = 1; + /** + * Indicates that the resource is in available state. + * + * Generated from protobuf enum AVAILABLE = 2; + */ + const AVAILABLE = 2; + /** + * Indicates that the resource is in updating state. + * + * Generated from protobuf enum UPDATING = 3; + */ + const UPDATING = 3; + /** + * Indicates that the resource is in terminating state. + * + * Generated from protobuf enum TERMINATING = 4; + */ + const TERMINATING = 4; + /** + * Indicates that the resource is in terminated state. + * + * Generated from protobuf enum TERMINATED = 5; + */ + const TERMINATED = 5; + /** + * Indicates that the resource is in failed state. + * + * Generated from protobuf enum FAILED = 6; + */ + const FAILED = 6; + /** + * Indicates that the resource is in maintenance in progress state. + * + * Generated from protobuf enum MAINTENANCE_IN_PROGRESS = 7; + */ + const MAINTENANCE_IN_PROGRESS = 7; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::PROVISIONING => 'PROVISIONING', + self::AVAILABLE => 'AVAILABLE', + self::UPDATING => 'UPDATING', + self::TERMINATING => 'TERMINATING', + self::TERMINATED => 'TERMINATED', + self::FAILED => 'FAILED', + self::MAINTENANCE_IN_PROGRESS => 'MAINTENANCE_IN_PROGRESS', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\OracleDatabase\V1\CloudVmClusterProperties_State::class); + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CreateAutonomousDatabaseRequest.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CreateAutonomousDatabaseRequest.php new file mode 100644 index 000000000000..5e4dc3542c9f --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CreateAutonomousDatabaseRequest.php @@ -0,0 +1,241 @@ +google.cloud.oracledatabase.v1.CreateAutonomousDatabaseRequest + */ +class CreateAutonomousDatabaseRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the parent in the following format: + * projects/{project}/locations/{location}. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The ID of the Autonomous Database to create. This value is + * restricted to (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$) and must be a maximum of + * 63 characters in length. The value must start with a letter and end with a + * letter or a number. + * + * Generated from protobuf field string autonomous_database_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $autonomous_database_id = ''; + /** + * Required. The Autonomous Database being created. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabase autonomous_database = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $autonomous_database = null; + /** + * Optional. An optional ID to identify the request. This value is used to + * identify duplicate requests. If you make a request with the same request ID + * and the original request is still in progress or completed, the server + * ignores the second request. This prevents clients from + * accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param string $parent Required. The name of the parent in the following format: + * projects/{project}/locations/{location}. Please see + * {@see OracleDatabaseClient::locationName()} for help formatting this field. + * @param \Google\Cloud\OracleDatabase\V1\AutonomousDatabase $autonomousDatabase Required. The Autonomous Database being created. + * @param string $autonomousDatabaseId Required. The ID of the Autonomous Database to create. This value is + * restricted to (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$) and must be a maximum of + * 63 characters in length. The value must start with a letter and end with a + * letter or a number. + * + * @return \Google\Cloud\OracleDatabase\V1\CreateAutonomousDatabaseRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\OracleDatabase\V1\AutonomousDatabase $autonomousDatabase, string $autonomousDatabaseId): self + { + return (new self()) + ->setParent($parent) + ->setAutonomousDatabase($autonomousDatabase) + ->setAutonomousDatabaseId($autonomousDatabaseId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The name of the parent in the following format: + * projects/{project}/locations/{location}. + * @type string $autonomous_database_id + * Required. The ID of the Autonomous Database to create. This value is + * restricted to (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$) and must be a maximum of + * 63 characters in length. The value must start with a letter and end with a + * letter or a number. + * @type \Google\Cloud\OracleDatabase\V1\AutonomousDatabase $autonomous_database + * Required. The Autonomous Database being created. + * @type string $request_id + * Optional. An optional ID to identify the request. This value is used to + * identify duplicate requests. If you make a request with the same request ID + * and the original request is still in progress or completed, the server + * ignores the second request. This prevents clients from + * accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Oracledatabase\V1\Oracledatabase::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the parent in the following format: + * projects/{project}/locations/{location}. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The name of the parent in the following format: + * projects/{project}/locations/{location}. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The ID of the Autonomous Database to create. This value is + * restricted to (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$) and must be a maximum of + * 63 characters in length. The value must start with a letter and end with a + * letter or a number. + * + * Generated from protobuf field string autonomous_database_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getAutonomousDatabaseId() + { + return $this->autonomous_database_id; + } + + /** + * Required. The ID of the Autonomous Database to create. This value is + * restricted to (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$) and must be a maximum of + * 63 characters in length. The value must start with a letter and end with a + * letter or a number. + * + * Generated from protobuf field string autonomous_database_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setAutonomousDatabaseId($var) + { + GPBUtil::checkString($var, True); + $this->autonomous_database_id = $var; + + return $this; + } + + /** + * Required. The Autonomous Database being created. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabase autonomous_database = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\OracleDatabase\V1\AutonomousDatabase|null + */ + public function getAutonomousDatabase() + { + return $this->autonomous_database; + } + + public function hasAutonomousDatabase() + { + return isset($this->autonomous_database); + } + + public function clearAutonomousDatabase() + { + unset($this->autonomous_database); + } + + /** + * Required. The Autonomous Database being created. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabase autonomous_database = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\OracleDatabase\V1\AutonomousDatabase $var + * @return $this + */ + public function setAutonomousDatabase($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OracleDatabase\V1\AutonomousDatabase::class); + $this->autonomous_database = $var; + + return $this; + } + + /** + * Optional. An optional ID to identify the request. This value is used to + * identify duplicate requests. If you make a request with the same request ID + * and the original request is still in progress or completed, the server + * ignores the second request. This prevents clients from + * accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional ID to identify the request. This value is used to + * identify duplicate requests. If you make a request with the same request ID + * and the original request is still in progress or completed, the server + * ignores the second request. This prevents clients from + * accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CreateCloudExadataInfrastructureRequest.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CreateCloudExadataInfrastructureRequest.php new file mode 100644 index 000000000000..51f846ed3a8f --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CreateCloudExadataInfrastructureRequest.php @@ -0,0 +1,241 @@ +google.cloud.oracledatabase.v1.CreateCloudExadataInfrastructureRequest + */ +class CreateCloudExadataInfrastructureRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent value for CloudExadataInfrastructure in the following + * format: projects/{project}/locations/{location}. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The ID of the Exadata Infrastructure to create. This value is + * restricted to (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$) and must be a maximum of + * 63 characters in length. The value must start with a letter and end with a + * letter or a number. + * + * Generated from protobuf field string cloud_exadata_infrastructure_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $cloud_exadata_infrastructure_id = ''; + /** + * Required. Details of the Exadata Infrastructure instance to create. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.CloudExadataInfrastructure cloud_exadata_infrastructure = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $cloud_exadata_infrastructure = null; + /** + * Optional. An optional ID to identify the request. This value is used to + * identify duplicate requests. If you make a request with the same request ID + * and the original request is still in progress or completed, the server + * ignores the second request. This prevents clients from + * accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param string $parent Required. The parent value for CloudExadataInfrastructure in the following + * format: projects/{project}/locations/{location}. Please see + * {@see OracleDatabaseClient::locationName()} for help formatting this field. + * @param \Google\Cloud\OracleDatabase\V1\CloudExadataInfrastructure $cloudExadataInfrastructure Required. Details of the Exadata Infrastructure instance to create. + * @param string $cloudExadataInfrastructureId Required. The ID of the Exadata Infrastructure to create. This value is + * restricted to (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$) and must be a maximum of + * 63 characters in length. The value must start with a letter and end with a + * letter or a number. + * + * @return \Google\Cloud\OracleDatabase\V1\CreateCloudExadataInfrastructureRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\OracleDatabase\V1\CloudExadataInfrastructure $cloudExadataInfrastructure, string $cloudExadataInfrastructureId): self + { + return (new self()) + ->setParent($parent) + ->setCloudExadataInfrastructure($cloudExadataInfrastructure) + ->setCloudExadataInfrastructureId($cloudExadataInfrastructureId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent value for CloudExadataInfrastructure in the following + * format: projects/{project}/locations/{location}. + * @type string $cloud_exadata_infrastructure_id + * Required. The ID of the Exadata Infrastructure to create. This value is + * restricted to (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$) and must be a maximum of + * 63 characters in length. The value must start with a letter and end with a + * letter or a number. + * @type \Google\Cloud\OracleDatabase\V1\CloudExadataInfrastructure $cloud_exadata_infrastructure + * Required. Details of the Exadata Infrastructure instance to create. + * @type string $request_id + * Optional. An optional ID to identify the request. This value is used to + * identify duplicate requests. If you make a request with the same request ID + * and the original request is still in progress or completed, the server + * ignores the second request. This prevents clients from + * accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Oracledatabase\V1\Oracledatabase::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent value for CloudExadataInfrastructure in the following + * format: projects/{project}/locations/{location}. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent value for CloudExadataInfrastructure in the following + * format: projects/{project}/locations/{location}. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The ID of the Exadata Infrastructure to create. This value is + * restricted to (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$) and must be a maximum of + * 63 characters in length. The value must start with a letter and end with a + * letter or a number. + * + * Generated from protobuf field string cloud_exadata_infrastructure_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getCloudExadataInfrastructureId() + { + return $this->cloud_exadata_infrastructure_id; + } + + /** + * Required. The ID of the Exadata Infrastructure to create. This value is + * restricted to (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$) and must be a maximum of + * 63 characters in length. The value must start with a letter and end with a + * letter or a number. + * + * Generated from protobuf field string cloud_exadata_infrastructure_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setCloudExadataInfrastructureId($var) + { + GPBUtil::checkString($var, True); + $this->cloud_exadata_infrastructure_id = $var; + + return $this; + } + + /** + * Required. Details of the Exadata Infrastructure instance to create. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.CloudExadataInfrastructure cloud_exadata_infrastructure = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\OracleDatabase\V1\CloudExadataInfrastructure|null + */ + public function getCloudExadataInfrastructure() + { + return $this->cloud_exadata_infrastructure; + } + + public function hasCloudExadataInfrastructure() + { + return isset($this->cloud_exadata_infrastructure); + } + + public function clearCloudExadataInfrastructure() + { + unset($this->cloud_exadata_infrastructure); + } + + /** + * Required. Details of the Exadata Infrastructure instance to create. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.CloudExadataInfrastructure cloud_exadata_infrastructure = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\OracleDatabase\V1\CloudExadataInfrastructure $var + * @return $this + */ + public function setCloudExadataInfrastructure($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OracleDatabase\V1\CloudExadataInfrastructure::class); + $this->cloud_exadata_infrastructure = $var; + + return $this; + } + + /** + * Optional. An optional ID to identify the request. This value is used to + * identify duplicate requests. If you make a request with the same request ID + * and the original request is still in progress or completed, the server + * ignores the second request. This prevents clients from + * accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional ID to identify the request. This value is used to + * identify duplicate requests. If you make a request with the same request ID + * and the original request is still in progress or completed, the server + * ignores the second request. This prevents clients from + * accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CreateCloudVmClusterRequest.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CreateCloudVmClusterRequest.php new file mode 100644 index 000000000000..fa1b9db56ffd --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CreateCloudVmClusterRequest.php @@ -0,0 +1,241 @@ +google.cloud.oracledatabase.v1.CreateCloudVmClusterRequest + */ +class CreateCloudVmClusterRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the parent in the following format: + * projects/{project}/locations/{location}. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The ID of the VM Cluster to create. This value is restricted + * to (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$) and must be a maximum of 63 + * characters in length. The value must start with a letter and end with + * a letter or a number. + * + * Generated from protobuf field string cloud_vm_cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $cloud_vm_cluster_id = ''; + /** + * Required. The resource being created + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.CloudVmCluster cloud_vm_cluster = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $cloud_vm_cluster = null; + /** + * Optional. An optional ID to identify the request. This value is used to + * identify duplicate requests. If you make a request with the same request ID + * and the original request is still in progress or completed, the server + * ignores the second request. This prevents clients from + * accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param string $parent Required. The name of the parent in the following format: + * projects/{project}/locations/{location}. Please see + * {@see OracleDatabaseClient::locationName()} for help formatting this field. + * @param \Google\Cloud\OracleDatabase\V1\CloudVmCluster $cloudVmCluster Required. The resource being created + * @param string $cloudVmClusterId Required. The ID of the VM Cluster to create. This value is restricted + * to (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$) and must be a maximum of 63 + * characters in length. The value must start with a letter and end with + * a letter or a number. + * + * @return \Google\Cloud\OracleDatabase\V1\CreateCloudVmClusterRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\OracleDatabase\V1\CloudVmCluster $cloudVmCluster, string $cloudVmClusterId): self + { + return (new self()) + ->setParent($parent) + ->setCloudVmCluster($cloudVmCluster) + ->setCloudVmClusterId($cloudVmClusterId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The name of the parent in the following format: + * projects/{project}/locations/{location}. + * @type string $cloud_vm_cluster_id + * Required. The ID of the VM Cluster to create. This value is restricted + * to (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$) and must be a maximum of 63 + * characters in length. The value must start with a letter and end with + * a letter or a number. + * @type \Google\Cloud\OracleDatabase\V1\CloudVmCluster $cloud_vm_cluster + * Required. The resource being created + * @type string $request_id + * Optional. An optional ID to identify the request. This value is used to + * identify duplicate requests. If you make a request with the same request ID + * and the original request is still in progress or completed, the server + * ignores the second request. This prevents clients from + * accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Oracledatabase\V1\Oracledatabase::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the parent in the following format: + * projects/{project}/locations/{location}. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The name of the parent in the following format: + * projects/{project}/locations/{location}. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The ID of the VM Cluster to create. This value is restricted + * to (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$) and must be a maximum of 63 + * characters in length. The value must start with a letter and end with + * a letter or a number. + * + * Generated from protobuf field string cloud_vm_cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getCloudVmClusterId() + { + return $this->cloud_vm_cluster_id; + } + + /** + * Required. The ID of the VM Cluster to create. This value is restricted + * to (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$) and must be a maximum of 63 + * characters in length. The value must start with a letter and end with + * a letter or a number. + * + * Generated from protobuf field string cloud_vm_cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setCloudVmClusterId($var) + { + GPBUtil::checkString($var, True); + $this->cloud_vm_cluster_id = $var; + + return $this; + } + + /** + * Required. The resource being created + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.CloudVmCluster cloud_vm_cluster = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\OracleDatabase\V1\CloudVmCluster|null + */ + public function getCloudVmCluster() + { + return $this->cloud_vm_cluster; + } + + public function hasCloudVmCluster() + { + return isset($this->cloud_vm_cluster); + } + + public function clearCloudVmCluster() + { + unset($this->cloud_vm_cluster); + } + + /** + * Required. The resource being created + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.CloudVmCluster cloud_vm_cluster = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\OracleDatabase\V1\CloudVmCluster $var + * @return $this + */ + public function setCloudVmCluster($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OracleDatabase\V1\CloudVmCluster::class); + $this->cloud_vm_cluster = $var; + + return $this; + } + + /** + * Optional. An optional ID to identify the request. This value is used to + * identify duplicate requests. If you make a request with the same request ID + * and the original request is still in progress or completed, the server + * ignores the second request. This prevents clients from + * accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional ID to identify the request. This value is used to + * identify duplicate requests. If you make a request with the same request ID + * and the original request is still in progress or completed, the server + * ignores the second request. This prevents clients from + * accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CustomerContact.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CustomerContact.php new file mode 100644 index 000000000000..0fa28d175e71 --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CustomerContact.php @@ -0,0 +1,72 @@ +google.cloud.oracledatabase.v1.CustomerContact + */ +class CustomerContact extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The email address used by Oracle to send notifications regarding + * databases and infrastructure. + * + * Generated from protobuf field string email = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $email = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $email + * Required. The email address used by Oracle to send notifications regarding + * databases and infrastructure. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Oracledatabase\V1\Common::initOnce(); + parent::__construct($data); + } + + /** + * Required. The email address used by Oracle to send notifications regarding + * databases and infrastructure. + * + * Generated from protobuf field string email = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getEmail() + { + return $this->email; + } + + /** + * Required. The email address used by Oracle to send notifications regarding + * databases and infrastructure. + * + * Generated from protobuf field string email = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setEmail($var) + { + GPBUtil::checkString($var, True); + $this->email = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DBWorkload.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DBWorkload.php new file mode 100644 index 000000000000..72cf4268477a --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DBWorkload.php @@ -0,0 +1,76 @@ +google.cloud.oracledatabase.v1.DBWorkload + */ +class DBWorkload +{ + /** + * Default unspecified value. + * + * Generated from protobuf enum DB_WORKLOAD_UNSPECIFIED = 0; + */ + const DB_WORKLOAD_UNSPECIFIED = 0; + /** + * Autonomous Transaction Processing database. + * + * Generated from protobuf enum OLTP = 1; + */ + const OLTP = 1; + /** + * Autonomous Data Warehouse database. + * + * Generated from protobuf enum DW = 2; + */ + const DW = 2; + /** + * Autonomous JSON Database. + * + * Generated from protobuf enum AJD = 3; + */ + const AJD = 3; + /** + * Autonomous Database with the Oracle APEX Application Development workload + * type. + * + * Generated from protobuf enum APEX = 4; + */ + const APEX = 4; + + private static $valueToName = [ + self::DB_WORKLOAD_UNSPECIFIED => 'DB_WORKLOAD_UNSPECIFIED', + self::OLTP => 'OLTP', + self::DW => 'DW', + self::AJD => 'AJD', + self::APEX => 'APEX', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DataCollectionOptions.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DataCollectionOptions.php new file mode 100644 index 000000000000..d7c34a0fe64c --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DataCollectionOptions.php @@ -0,0 +1,143 @@ +google.cloud.oracledatabase.v1.DataCollectionOptions + */ +class DataCollectionOptions extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Indicates whether diagnostic collection is enabled for the VM + * cluster + * + * Generated from protobuf field bool diagnostics_events_enabled = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $diagnostics_events_enabled = false; + /** + * Optional. Indicates whether health monitoring is enabled for the VM cluster + * + * Generated from protobuf field bool health_monitoring_enabled = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $health_monitoring_enabled = false; + /** + * Optional. Indicates whether incident logs and trace collection are enabled + * for the VM cluster + * + * Generated from protobuf field bool incident_logs_enabled = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $incident_logs_enabled = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $diagnostics_events_enabled + * Optional. Indicates whether diagnostic collection is enabled for the VM + * cluster + * @type bool $health_monitoring_enabled + * Optional. Indicates whether health monitoring is enabled for the VM cluster + * @type bool $incident_logs_enabled + * Optional. Indicates whether incident logs and trace collection are enabled + * for the VM cluster + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Oracledatabase\V1\VmCluster::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Indicates whether diagnostic collection is enabled for the VM + * cluster + * + * Generated from protobuf field bool diagnostics_events_enabled = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getDiagnosticsEventsEnabled() + { + return $this->diagnostics_events_enabled; + } + + /** + * Optional. Indicates whether diagnostic collection is enabled for the VM + * cluster + * + * Generated from protobuf field bool diagnostics_events_enabled = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setDiagnosticsEventsEnabled($var) + { + GPBUtil::checkBool($var); + $this->diagnostics_events_enabled = $var; + + return $this; + } + + /** + * Optional. Indicates whether health monitoring is enabled for the VM cluster + * + * Generated from protobuf field bool health_monitoring_enabled = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getHealthMonitoringEnabled() + { + return $this->health_monitoring_enabled; + } + + /** + * Optional. Indicates whether health monitoring is enabled for the VM cluster + * + * Generated from protobuf field bool health_monitoring_enabled = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setHealthMonitoringEnabled($var) + { + GPBUtil::checkBool($var); + $this->health_monitoring_enabled = $var; + + return $this; + } + + /** + * Optional. Indicates whether incident logs and trace collection are enabled + * for the VM cluster + * + * Generated from protobuf field bool incident_logs_enabled = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getIncidentLogsEnabled() + { + return $this->incident_logs_enabled; + } + + /** + * Optional. Indicates whether incident logs and trace collection are enabled + * for the VM cluster + * + * Generated from protobuf field bool incident_logs_enabled = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setIncidentLogsEnabled($var) + { + GPBUtil::checkBool($var); + $this->incident_logs_enabled = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DatabaseConnectionStringProfile.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DatabaseConnectionStringProfile.php new file mode 100644 index 000000000000..8b1f70647671 --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DatabaseConnectionStringProfile.php @@ -0,0 +1,352 @@ +google.cloud.oracledatabase.v1.DatabaseConnectionStringProfile + */ +class DatabaseConnectionStringProfile extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The current consumer group being used by the connection. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.DatabaseConnectionStringProfile.ConsumerGroup consumer_group = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $consumer_group = 0; + /** + * Output only. The display name for the database connection. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $display_name = ''; + /** + * Output only. The host name format being currently used in connection + * string. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.DatabaseConnectionStringProfile.HostFormat host_format = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $host_format = 0; + /** + * Output only. This field indicates if the connection string is regional and + * is only applicable for cross-region Data Guard. + * + * Generated from protobuf field bool is_regional = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $is_regional = false; + /** + * Output only. The protocol being used by the connection. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.DatabaseConnectionStringProfile.Protocol protocol = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $protocol = 0; + /** + * Output only. The current session mode of the connection. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.DatabaseConnectionStringProfile.SessionMode session_mode = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $session_mode = 0; + /** + * Output only. The syntax of the connection string. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.DatabaseConnectionStringProfile.SyntaxFormat syntax_format = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $syntax_format = 0; + /** + * Output only. This field indicates the TLS authentication type of the + * connection. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.DatabaseConnectionStringProfile.TLSAuthentication tls_authentication = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $tls_authentication = 0; + /** + * Output only. The value of the connection string. + * + * Generated from protobuf field string value = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $value = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $consumer_group + * Output only. The current consumer group being used by the connection. + * @type string $display_name + * Output only. The display name for the database connection. + * @type int $host_format + * Output only. The host name format being currently used in connection + * string. + * @type bool $is_regional + * Output only. This field indicates if the connection string is regional and + * is only applicable for cross-region Data Guard. + * @type int $protocol + * Output only. The protocol being used by the connection. + * @type int $session_mode + * Output only. The current session mode of the connection. + * @type int $syntax_format + * Output only. The syntax of the connection string. + * @type int $tls_authentication + * Output only. This field indicates the TLS authentication type of the + * connection. + * @type string $value + * Output only. The value of the connection string. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Oracledatabase\V1\AutonomousDatabase::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The current consumer group being used by the connection. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.DatabaseConnectionStringProfile.ConsumerGroup consumer_group = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getConsumerGroup() + { + return $this->consumer_group; + } + + /** + * Output only. The current consumer group being used by the connection. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.DatabaseConnectionStringProfile.ConsumerGroup consumer_group = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setConsumerGroup($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\OracleDatabase\V1\DatabaseConnectionStringProfile\ConsumerGroup::class); + $this->consumer_group = $var; + + return $this; + } + + /** + * Output only. The display name for the database connection. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Output only. The display name for the database connection. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Output only. The host name format being currently used in connection + * string. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.DatabaseConnectionStringProfile.HostFormat host_format = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getHostFormat() + { + return $this->host_format; + } + + /** + * Output only. The host name format being currently used in connection + * string. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.DatabaseConnectionStringProfile.HostFormat host_format = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setHostFormat($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\OracleDatabase\V1\DatabaseConnectionStringProfile\HostFormat::class); + $this->host_format = $var; + + return $this; + } + + /** + * Output only. This field indicates if the connection string is regional and + * is only applicable for cross-region Data Guard. + * + * Generated from protobuf field bool is_regional = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getIsRegional() + { + return $this->is_regional; + } + + /** + * Output only. This field indicates if the connection string is regional and + * is only applicable for cross-region Data Guard. + * + * Generated from protobuf field bool is_regional = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setIsRegional($var) + { + GPBUtil::checkBool($var); + $this->is_regional = $var; + + return $this; + } + + /** + * Output only. The protocol being used by the connection. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.DatabaseConnectionStringProfile.Protocol protocol = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getProtocol() + { + return $this->protocol; + } + + /** + * Output only. The protocol being used by the connection. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.DatabaseConnectionStringProfile.Protocol protocol = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setProtocol($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\OracleDatabase\V1\DatabaseConnectionStringProfile\Protocol::class); + $this->protocol = $var; + + return $this; + } + + /** + * Output only. The current session mode of the connection. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.DatabaseConnectionStringProfile.SessionMode session_mode = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getSessionMode() + { + return $this->session_mode; + } + + /** + * Output only. The current session mode of the connection. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.DatabaseConnectionStringProfile.SessionMode session_mode = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setSessionMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\OracleDatabase\V1\DatabaseConnectionStringProfile\SessionMode::class); + $this->session_mode = $var; + + return $this; + } + + /** + * Output only. The syntax of the connection string. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.DatabaseConnectionStringProfile.SyntaxFormat syntax_format = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getSyntaxFormat() + { + return $this->syntax_format; + } + + /** + * Output only. The syntax of the connection string. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.DatabaseConnectionStringProfile.SyntaxFormat syntax_format = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setSyntaxFormat($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\OracleDatabase\V1\DatabaseConnectionStringProfile\SyntaxFormat::class); + $this->syntax_format = $var; + + return $this; + } + + /** + * Output only. This field indicates the TLS authentication type of the + * connection. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.DatabaseConnectionStringProfile.TLSAuthentication tls_authentication = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getTlsAuthentication() + { + return $this->tls_authentication; + } + + /** + * Output only. This field indicates the TLS authentication type of the + * connection. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.DatabaseConnectionStringProfile.TLSAuthentication tls_authentication = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setTlsAuthentication($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\OracleDatabase\V1\DatabaseConnectionStringProfile\TLSAuthentication::class); + $this->tls_authentication = $var; + + return $this; + } + + /** + * Output only. The value of the connection string. + * + * Generated from protobuf field string value = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getValue() + { + return $this->value; + } + + /** + * Output only. The value of the connection string. + * + * Generated from protobuf field string value = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setValue($var) + { + GPBUtil::checkString($var, True); + $this->value = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DatabaseConnectionStringProfile/ConsumerGroup.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DatabaseConnectionStringProfile/ConsumerGroup.php new file mode 100644 index 000000000000..929945ac2ebc --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DatabaseConnectionStringProfile/ConsumerGroup.php @@ -0,0 +1,85 @@ +google.cloud.oracledatabase.v1.DatabaseConnectionStringProfile.ConsumerGroup + */ +class ConsumerGroup +{ + /** + * Default unspecified value. + * + * Generated from protobuf enum CONSUMER_GROUP_UNSPECIFIED = 0; + */ + const CONSUMER_GROUP_UNSPECIFIED = 0; + /** + * High consumer group. + * + * Generated from protobuf enum HIGH = 1; + */ + const HIGH = 1; + /** + * Medium consumer group. + * + * Generated from protobuf enum MEDIUM = 2; + */ + const MEDIUM = 2; + /** + * Low consumer group. + * + * Generated from protobuf enum LOW = 3; + */ + const LOW = 3; + /** + * TP consumer group. + * + * Generated from protobuf enum TP = 4; + */ + const TP = 4; + /** + * TPURGENT consumer group. + * + * Generated from protobuf enum TPURGENT = 5; + */ + const TPURGENT = 5; + + private static $valueToName = [ + self::CONSUMER_GROUP_UNSPECIFIED => 'CONSUMER_GROUP_UNSPECIFIED', + self::HIGH => 'HIGH', + self::MEDIUM => 'MEDIUM', + self::LOW => 'LOW', + self::TP => 'TP', + self::TPURGENT => 'TPURGENT', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ConsumerGroup::class, \Google\Cloud\OracleDatabase\V1\DatabaseConnectionStringProfile_ConsumerGroup::class); + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DatabaseConnectionStringProfile/HostFormat.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DatabaseConnectionStringProfile/HostFormat.php new file mode 100644 index 000000000000..4c80de56aed5 --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DatabaseConnectionStringProfile/HostFormat.php @@ -0,0 +1,64 @@ +google.cloud.oracledatabase.v1.DatabaseConnectionStringProfile.HostFormat + */ +class HostFormat +{ + /** + * Default unspecified value. + * + * Generated from protobuf enum HOST_FORMAT_UNSPECIFIED = 0; + */ + const HOST_FORMAT_UNSPECIFIED = 0; + /** + * FQDN + * + * Generated from protobuf enum FQDN = 1; + */ + const FQDN = 1; + /** + * IP + * + * Generated from protobuf enum IP = 2; + */ + const IP = 2; + + private static $valueToName = [ + self::HOST_FORMAT_UNSPECIFIED => 'HOST_FORMAT_UNSPECIFIED', + self::FQDN => 'FQDN', + self::IP => 'IP', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(HostFormat::class, \Google\Cloud\OracleDatabase\V1\DatabaseConnectionStringProfile_HostFormat::class); + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DatabaseConnectionStringProfile/Protocol.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DatabaseConnectionStringProfile/Protocol.php new file mode 100644 index 000000000000..b997f9c87ff6 --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DatabaseConnectionStringProfile/Protocol.php @@ -0,0 +1,64 @@ +google.cloud.oracledatabase.v1.DatabaseConnectionStringProfile.Protocol + */ +class Protocol +{ + /** + * Default unspecified value. + * + * Generated from protobuf enum PROTOCOL_UNSPECIFIED = 0; + */ + const PROTOCOL_UNSPECIFIED = 0; + /** + * Tcp + * + * Generated from protobuf enum TCP = 1; + */ + const TCP = 1; + /** + * Tcps + * + * Generated from protobuf enum TCPS = 2; + */ + const TCPS = 2; + + private static $valueToName = [ + self::PROTOCOL_UNSPECIFIED => 'PROTOCOL_UNSPECIFIED', + self::TCP => 'TCP', + self::TCPS => 'TCPS', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Protocol::class, \Google\Cloud\OracleDatabase\V1\DatabaseConnectionStringProfile_Protocol::class); + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DatabaseConnectionStringProfile/SessionMode.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DatabaseConnectionStringProfile/SessionMode.php new file mode 100644 index 000000000000..03776dd82981 --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DatabaseConnectionStringProfile/SessionMode.php @@ -0,0 +1,64 @@ +google.cloud.oracledatabase.v1.DatabaseConnectionStringProfile.SessionMode + */ +class SessionMode +{ + /** + * Default unspecified value. + * + * Generated from protobuf enum SESSION_MODE_UNSPECIFIED = 0; + */ + const SESSION_MODE_UNSPECIFIED = 0; + /** + * Direct + * + * Generated from protobuf enum DIRECT = 1; + */ + const DIRECT = 1; + /** + * Indirect + * + * Generated from protobuf enum INDIRECT = 2; + */ + const INDIRECT = 2; + + private static $valueToName = [ + self::SESSION_MODE_UNSPECIFIED => 'SESSION_MODE_UNSPECIFIED', + self::DIRECT => 'DIRECT', + self::INDIRECT => 'INDIRECT', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SessionMode::class, \Google\Cloud\OracleDatabase\V1\DatabaseConnectionStringProfile_SessionMode::class); + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DatabaseConnectionStringProfile/SyntaxFormat.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DatabaseConnectionStringProfile/SyntaxFormat.php new file mode 100644 index 000000000000..1aec22587f72 --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DatabaseConnectionStringProfile/SyntaxFormat.php @@ -0,0 +1,71 @@ +google.cloud.oracledatabase.v1.DatabaseConnectionStringProfile.SyntaxFormat + */ +class SyntaxFormat +{ + /** + * Default unspecified value. + * + * Generated from protobuf enum SYNTAX_FORMAT_UNSPECIFIED = 0; + */ + const SYNTAX_FORMAT_UNSPECIFIED = 0; + /** + * Long + * + * Generated from protobuf enum LONG = 1; + */ + const LONG = 1; + /** + * Ezconnect + * + * Generated from protobuf enum EZCONNECT = 2; + */ + const EZCONNECT = 2; + /** + * Ezconnectplus + * + * Generated from protobuf enum EZCONNECTPLUS = 3; + */ + const EZCONNECTPLUS = 3; + + private static $valueToName = [ + self::SYNTAX_FORMAT_UNSPECIFIED => 'SYNTAX_FORMAT_UNSPECIFIED', + self::LONG => 'LONG', + self::EZCONNECT => 'EZCONNECT', + self::EZCONNECTPLUS => 'EZCONNECTPLUS', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SyntaxFormat::class, \Google\Cloud\OracleDatabase\V1\DatabaseConnectionStringProfile_SyntaxFormat::class); + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DatabaseConnectionStringProfile/TLSAuthentication.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DatabaseConnectionStringProfile/TLSAuthentication.php new file mode 100644 index 000000000000..e94024b177f3 --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DatabaseConnectionStringProfile/TLSAuthentication.php @@ -0,0 +1,64 @@ +google.cloud.oracledatabase.v1.DatabaseConnectionStringProfile.TLSAuthentication + */ +class TLSAuthentication +{ + /** + * Default unspecified value. + * + * Generated from protobuf enum TLS_AUTHENTICATION_UNSPECIFIED = 0; + */ + const TLS_AUTHENTICATION_UNSPECIFIED = 0; + /** + * Server + * + * Generated from protobuf enum SERVER = 1; + */ + const SERVER = 1; + /** + * Mutual + * + * Generated from protobuf enum MUTUAL = 2; + */ + const MUTUAL = 2; + + private static $valueToName = [ + self::TLS_AUTHENTICATION_UNSPECIFIED => 'TLS_AUTHENTICATION_UNSPECIFIED', + self::SERVER => 'SERVER', + self::MUTUAL => 'MUTUAL', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(TLSAuthentication::class, \Google\Cloud\OracleDatabase\V1\DatabaseConnectionStringProfile_TLSAuthentication::class); + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DbNode.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DbNode.php new file mode 100644 index 000000000000..fadef514cd96 --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DbNode.php @@ -0,0 +1,116 @@ +google.cloud.oracledatabase.v1.DbNode + */ +class DbNode extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The name of the database node resource in the following format: + * projects/{project}/locations/{location}/cloudVmClusters/{cloud_vm_cluster}/dbNodes/{db_node} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Optional. Various properties of the database node. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.DbNodeProperties properties = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $properties = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The name of the database node resource in the following format: + * projects/{project}/locations/{location}/cloudVmClusters/{cloud_vm_cluster}/dbNodes/{db_node} + * @type \Google\Cloud\OracleDatabase\V1\DbNodeProperties $properties + * Optional. Various properties of the database node. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Oracledatabase\V1\DbNode::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The name of the database node resource in the following format: + * projects/{project}/locations/{location}/cloudVmClusters/{cloud_vm_cluster}/dbNodes/{db_node} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The name of the database node resource in the following format: + * projects/{project}/locations/{location}/cloudVmClusters/{cloud_vm_cluster}/dbNodes/{db_node} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. Various properties of the database node. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.DbNodeProperties properties = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\OracleDatabase\V1\DbNodeProperties|null + */ + public function getProperties() + { + return $this->properties; + } + + public function hasProperties() + { + return isset($this->properties); + } + + public function clearProperties() + { + unset($this->properties); + } + + /** + * Optional. Various properties of the database node. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.DbNodeProperties properties = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\OracleDatabase\V1\DbNodeProperties $var + * @return $this + */ + public function setProperties($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OracleDatabase\V1\DbNodeProperties::class); + $this->properties = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DbNodeProperties.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DbNodeProperties.php new file mode 100644 index 000000000000..039b98065d2c --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DbNodeProperties.php @@ -0,0 +1,305 @@ +google.cloud.oracledatabase.v1.DbNodeProperties + */ +class DbNodeProperties extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. OCID of database node. + * + * Generated from protobuf field string ocid = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $ocid = ''; + /** + * Optional. OCPU count per database node. + * + * Generated from protobuf field int32 ocpu_count = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $ocpu_count = 0; + /** + * Memory allocated in GBs. + * + * Generated from protobuf field int32 memory_size_gb = 3; + */ + protected $memory_size_gb = 0; + /** + * Optional. Local storage per database node. + * + * Generated from protobuf field int32 db_node_storage_size_gb = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $db_node_storage_size_gb = 0; + /** + * Optional. Database server OCID. + * + * Generated from protobuf field string db_server_ocid = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $db_server_ocid = ''; + /** + * Optional. DNS + * + * Generated from protobuf field string hostname = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $hostname = ''; + /** + * Output only. State of the database node. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.DbNodeProperties.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Total CPU core count of the database node. + * + * Generated from protobuf field int32 total_cpu_core_count = 10; + */ + protected $total_cpu_core_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $ocid + * Output only. OCID of database node. + * @type int $ocpu_count + * Optional. OCPU count per database node. + * @type int $memory_size_gb + * Memory allocated in GBs. + * @type int $db_node_storage_size_gb + * Optional. Local storage per database node. + * @type string $db_server_ocid + * Optional. Database server OCID. + * @type string $hostname + * Optional. DNS + * @type int $state + * Output only. State of the database node. + * @type int $total_cpu_core_count + * Total CPU core count of the database node. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Oracledatabase\V1\DbNode::initOnce(); + parent::__construct($data); + } + + /** + * Output only. OCID of database node. + * + * Generated from protobuf field string ocid = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getOcid() + { + return $this->ocid; + } + + /** + * Output only. OCID of database node. + * + * Generated from protobuf field string ocid = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setOcid($var) + { + GPBUtil::checkString($var, True); + $this->ocid = $var; + + return $this; + } + + /** + * Optional. OCPU count per database node. + * + * Generated from protobuf field int32 ocpu_count = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getOcpuCount() + { + return $this->ocpu_count; + } + + /** + * Optional. OCPU count per database node. + * + * Generated from protobuf field int32 ocpu_count = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setOcpuCount($var) + { + GPBUtil::checkInt32($var); + $this->ocpu_count = $var; + + return $this; + } + + /** + * Memory allocated in GBs. + * + * Generated from protobuf field int32 memory_size_gb = 3; + * @return int + */ + public function getMemorySizeGb() + { + return $this->memory_size_gb; + } + + /** + * Memory allocated in GBs. + * + * Generated from protobuf field int32 memory_size_gb = 3; + * @param int $var + * @return $this + */ + public function setMemorySizeGb($var) + { + GPBUtil::checkInt32($var); + $this->memory_size_gb = $var; + + return $this; + } + + /** + * Optional. Local storage per database node. + * + * Generated from protobuf field int32 db_node_storage_size_gb = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getDbNodeStorageSizeGb() + { + return $this->db_node_storage_size_gb; + } + + /** + * Optional. Local storage per database node. + * + * Generated from protobuf field int32 db_node_storage_size_gb = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setDbNodeStorageSizeGb($var) + { + GPBUtil::checkInt32($var); + $this->db_node_storage_size_gb = $var; + + return $this; + } + + /** + * Optional. Database server OCID. + * + * Generated from protobuf field string db_server_ocid = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDbServerOcid() + { + return $this->db_server_ocid; + } + + /** + * Optional. Database server OCID. + * + * Generated from protobuf field string db_server_ocid = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDbServerOcid($var) + { + GPBUtil::checkString($var, True); + $this->db_server_ocid = $var; + + return $this; + } + + /** + * Optional. DNS + * + * Generated from protobuf field string hostname = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getHostname() + { + return $this->hostname; + } + + /** + * Optional. DNS + * + * Generated from protobuf field string hostname = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setHostname($var) + { + GPBUtil::checkString($var, True); + $this->hostname = $var; + + return $this; + } + + /** + * Output only. State of the database node. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.DbNodeProperties.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. State of the database node. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.DbNodeProperties.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\OracleDatabase\V1\DbNodeProperties\State::class); + $this->state = $var; + + return $this; + } + + /** + * Total CPU core count of the database node. + * + * Generated from protobuf field int32 total_cpu_core_count = 10; + * @return int + */ + public function getTotalCpuCoreCount() + { + return $this->total_cpu_core_count; + } + + /** + * Total CPU core count of the database node. + * + * Generated from protobuf field int32 total_cpu_core_count = 10; + * @param int $var + * @return $this + */ + public function setTotalCpuCoreCount($var) + { + GPBUtil::checkInt32($var); + $this->total_cpu_core_count = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DbNodeProperties/State.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DbNodeProperties/State.php new file mode 100644 index 000000000000..dc053f553afc --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DbNodeProperties/State.php @@ -0,0 +1,113 @@ +google.cloud.oracledatabase.v1.DbNodeProperties.State + */ +class State +{ + /** + * Default unspecified value. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Indicates that the resource is in provisioning state. + * + * Generated from protobuf enum PROVISIONING = 1; + */ + const PROVISIONING = 1; + /** + * Indicates that the resource is in available state. + * + * Generated from protobuf enum AVAILABLE = 2; + */ + const AVAILABLE = 2; + /** + * Indicates that the resource is in updating state. + * + * Generated from protobuf enum UPDATING = 3; + */ + const UPDATING = 3; + /** + * Indicates that the resource is in stopping state. + * + * Generated from protobuf enum STOPPING = 4; + */ + const STOPPING = 4; + /** + * Indicates that the resource is in stopped state. + * + * Generated from protobuf enum STOPPED = 5; + */ + const STOPPED = 5; + /** + * Indicates that the resource is in starting state. + * + * Generated from protobuf enum STARTING = 6; + */ + const STARTING = 6; + /** + * Indicates that the resource is in terminating state. + * + * Generated from protobuf enum TERMINATING = 7; + */ + const TERMINATING = 7; + /** + * Indicates that the resource is in terminated state. + * + * Generated from protobuf enum TERMINATED = 8; + */ + const TERMINATED = 8; + /** + * Indicates that the resource is in failed state. + * + * Generated from protobuf enum FAILED = 9; + */ + const FAILED = 9; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::PROVISIONING => 'PROVISIONING', + self::AVAILABLE => 'AVAILABLE', + self::UPDATING => 'UPDATING', + self::STOPPING => 'STOPPING', + self::STOPPED => 'STOPPED', + self::STARTING => 'STARTING', + self::TERMINATING => 'TERMINATING', + self::TERMINATED => 'TERMINATED', + self::FAILED => 'FAILED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\OracleDatabase\V1\DbNodeProperties_State::class); + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DbServer.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DbServer.php new file mode 100644 index 000000000000..c0ffe3f99517 --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DbServer.php @@ -0,0 +1,150 @@ +google.cloud.oracledatabase.v1.DbServer + */ +class DbServer extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The name of the database server resource with the format: + * projects/{project}/locations/{location}/cloudExadataInfrastructures/{cloud_exadata_infrastructure}/dbServers/{db_server} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Optional. User friendly name for this resource. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $display_name = ''; + /** + * Optional. Various properties of the database server. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.DbServerProperties properties = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $properties = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The name of the database server resource with the format: + * projects/{project}/locations/{location}/cloudExadataInfrastructures/{cloud_exadata_infrastructure}/dbServers/{db_server} + * @type string $display_name + * Optional. User friendly name for this resource. + * @type \Google\Cloud\OracleDatabase\V1\DbServerProperties $properties + * Optional. Various properties of the database server. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Oracledatabase\V1\DbServer::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The name of the database server resource with the format: + * projects/{project}/locations/{location}/cloudExadataInfrastructures/{cloud_exadata_infrastructure}/dbServers/{db_server} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The name of the database server resource with the format: + * projects/{project}/locations/{location}/cloudExadataInfrastructures/{cloud_exadata_infrastructure}/dbServers/{db_server} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. User friendly name for this resource. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Optional. User friendly name for this resource. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Optional. Various properties of the database server. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.DbServerProperties properties = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\OracleDatabase\V1\DbServerProperties|null + */ + public function getProperties() + { + return $this->properties; + } + + public function hasProperties() + { + return isset($this->properties); + } + + public function clearProperties() + { + unset($this->properties); + } + + /** + * Optional. Various properties of the database server. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.DbServerProperties properties = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\OracleDatabase\V1\DbServerProperties $var + * @return $this + */ + public function setProperties($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OracleDatabase\V1\DbServerProperties::class); + $this->properties = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DbServerProperties.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DbServerProperties.php new file mode 100644 index 000000000000..61585de65cca --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DbServerProperties.php @@ -0,0 +1,373 @@ +google.cloud.oracledatabase.v1.DbServerProperties + */ +class DbServerProperties extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. OCID of database server. + * + * Generated from protobuf field string ocid = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $ocid = ''; + /** + * Optional. OCPU count per database. + * + * Generated from protobuf field int32 ocpu_count = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $ocpu_count = 0; + /** + * Optional. Maximum OCPU count per database. + * + * Generated from protobuf field int32 max_ocpu_count = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $max_ocpu_count = 0; + /** + * Optional. Memory allocated in GBs. + * + * Generated from protobuf field int32 memory_size_gb = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $memory_size_gb = 0; + /** + * Optional. Maximum memory allocated in GBs. + * + * Generated from protobuf field int32 max_memory_size_gb = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $max_memory_size_gb = 0; + /** + * Optional. Local storage per VM. + * + * Generated from protobuf field int32 db_node_storage_size_gb = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $db_node_storage_size_gb = 0; + /** + * Optional. Maximum local storage per VM. + * + * Generated from protobuf field int32 max_db_node_storage_size_gb = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $max_db_node_storage_size_gb = 0; + /** + * Optional. Vm count per database. + * + * Generated from protobuf field int32 vm_count = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $vm_count = 0; + /** + * Output only. State of the database server. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.DbServerProperties.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. OCID of database nodes associated with the database server. + * + * Generated from protobuf field repeated string db_node_ids = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $db_node_ids; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $ocid + * Output only. OCID of database server. + * @type int $ocpu_count + * Optional. OCPU count per database. + * @type int $max_ocpu_count + * Optional. Maximum OCPU count per database. + * @type int $memory_size_gb + * Optional. Memory allocated in GBs. + * @type int $max_memory_size_gb + * Optional. Maximum memory allocated in GBs. + * @type int $db_node_storage_size_gb + * Optional. Local storage per VM. + * @type int $max_db_node_storage_size_gb + * Optional. Maximum local storage per VM. + * @type int $vm_count + * Optional. Vm count per database. + * @type int $state + * Output only. State of the database server. + * @type array|\Google\Protobuf\Internal\RepeatedField $db_node_ids + * Output only. OCID of database nodes associated with the database server. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Oracledatabase\V1\DbServer::initOnce(); + parent::__construct($data); + } + + /** + * Output only. OCID of database server. + * + * Generated from protobuf field string ocid = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getOcid() + { + return $this->ocid; + } + + /** + * Output only. OCID of database server. + * + * Generated from protobuf field string ocid = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setOcid($var) + { + GPBUtil::checkString($var, True); + $this->ocid = $var; + + return $this; + } + + /** + * Optional. OCPU count per database. + * + * Generated from protobuf field int32 ocpu_count = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getOcpuCount() + { + return $this->ocpu_count; + } + + /** + * Optional. OCPU count per database. + * + * Generated from protobuf field int32 ocpu_count = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setOcpuCount($var) + { + GPBUtil::checkInt32($var); + $this->ocpu_count = $var; + + return $this; + } + + /** + * Optional. Maximum OCPU count per database. + * + * Generated from protobuf field int32 max_ocpu_count = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getMaxOcpuCount() + { + return $this->max_ocpu_count; + } + + /** + * Optional. Maximum OCPU count per database. + * + * Generated from protobuf field int32 max_ocpu_count = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setMaxOcpuCount($var) + { + GPBUtil::checkInt32($var); + $this->max_ocpu_count = $var; + + return $this; + } + + /** + * Optional. Memory allocated in GBs. + * + * Generated from protobuf field int32 memory_size_gb = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getMemorySizeGb() + { + return $this->memory_size_gb; + } + + /** + * Optional. Memory allocated in GBs. + * + * Generated from protobuf field int32 memory_size_gb = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setMemorySizeGb($var) + { + GPBUtil::checkInt32($var); + $this->memory_size_gb = $var; + + return $this; + } + + /** + * Optional. Maximum memory allocated in GBs. + * + * Generated from protobuf field int32 max_memory_size_gb = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getMaxMemorySizeGb() + { + return $this->max_memory_size_gb; + } + + /** + * Optional. Maximum memory allocated in GBs. + * + * Generated from protobuf field int32 max_memory_size_gb = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setMaxMemorySizeGb($var) + { + GPBUtil::checkInt32($var); + $this->max_memory_size_gb = $var; + + return $this; + } + + /** + * Optional. Local storage per VM. + * + * Generated from protobuf field int32 db_node_storage_size_gb = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getDbNodeStorageSizeGb() + { + return $this->db_node_storage_size_gb; + } + + /** + * Optional. Local storage per VM. + * + * Generated from protobuf field int32 db_node_storage_size_gb = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setDbNodeStorageSizeGb($var) + { + GPBUtil::checkInt32($var); + $this->db_node_storage_size_gb = $var; + + return $this; + } + + /** + * Optional. Maximum local storage per VM. + * + * Generated from protobuf field int32 max_db_node_storage_size_gb = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getMaxDbNodeStorageSizeGb() + { + return $this->max_db_node_storage_size_gb; + } + + /** + * Optional. Maximum local storage per VM. + * + * Generated from protobuf field int32 max_db_node_storage_size_gb = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setMaxDbNodeStorageSizeGb($var) + { + GPBUtil::checkInt32($var); + $this->max_db_node_storage_size_gb = $var; + + return $this; + } + + /** + * Optional. Vm count per database. + * + * Generated from protobuf field int32 vm_count = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getVmCount() + { + return $this->vm_count; + } + + /** + * Optional. Vm count per database. + * + * Generated from protobuf field int32 vm_count = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setVmCount($var) + { + GPBUtil::checkInt32($var); + $this->vm_count = $var; + + return $this; + } + + /** + * Output only. State of the database server. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.DbServerProperties.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. State of the database server. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.DbServerProperties.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\OracleDatabase\V1\DbServerProperties\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. OCID of database nodes associated with the database server. + * + * Generated from protobuf field repeated string db_node_ids = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDbNodeIds() + { + return $this->db_node_ids; + } + + /** + * Output only. OCID of database nodes associated with the database server. + * + * Generated from protobuf field repeated string db_node_ids = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDbNodeIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->db_node_ids = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DbServerProperties/State.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DbServerProperties/State.php new file mode 100644 index 000000000000..9418d0c58bd2 --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DbServerProperties/State.php @@ -0,0 +1,85 @@ +google.cloud.oracledatabase.v1.DbServerProperties.State + */ +class State +{ + /** + * Default unspecified value. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Indicates that the resource is in creating state. + * + * Generated from protobuf enum CREATING = 1; + */ + const CREATING = 1; + /** + * Indicates that the resource is in available state. + * + * Generated from protobuf enum AVAILABLE = 2; + */ + const AVAILABLE = 2; + /** + * Indicates that the resource is in unavailable state. + * + * Generated from protobuf enum UNAVAILABLE = 3; + */ + const UNAVAILABLE = 3; + /** + * Indicates that the resource is in deleting state. + * + * Generated from protobuf enum DELETING = 4; + */ + const DELETING = 4; + /** + * Indicates that the resource is in deleted state. + * + * Generated from protobuf enum DELETED = 5; + */ + const DELETED = 5; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::CREATING => 'CREATING', + self::AVAILABLE => 'AVAILABLE', + self::UNAVAILABLE => 'UNAVAILABLE', + self::DELETING => 'DELETING', + self::DELETED => 'DELETED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\OracleDatabase\V1\DbServerProperties_State::class); + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DbSystemShape.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DbSystemShape.php new file mode 100644 index 000000000000..9d22965d8b40 --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DbSystemShape.php @@ -0,0 +1,446 @@ +google.cloud.oracledatabase.v1.DbSystemShape + */ +class DbSystemShape extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The name of the Database System Shape resource with the format: + * projects/{project}/locations/{region}/dbSystemShapes/{db_system_shape} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Optional. shape + * + * Generated from protobuf field string shape = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $shape = ''; + /** + * Optional. Minimum number of database servers. + * + * Generated from protobuf field int32 min_node_count = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $min_node_count = 0; + /** + * Optional. Maximum number of database servers. + * + * Generated from protobuf field int32 max_node_count = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $max_node_count = 0; + /** + * Optional. Minimum number of storage servers. + * + * Generated from protobuf field int32 min_storage_count = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $min_storage_count = 0; + /** + * Optional. Maximum number of storage servers. + * + * Generated from protobuf field int32 max_storage_count = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $max_storage_count = 0; + /** + * Optional. Number of cores per node. + * + * Generated from protobuf field int32 available_core_count_per_node = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $available_core_count_per_node = 0; + /** + * Optional. Memory per database server node in gigabytes. + * + * Generated from protobuf field int32 available_memory_per_node_gb = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $available_memory_per_node_gb = 0; + /** + * Optional. Storage per storage server in terabytes. + * + * Generated from protobuf field int32 available_data_storage_tb = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $available_data_storage_tb = 0; + /** + * Optional. Minimum core count per node. + * + * Generated from protobuf field int32 min_core_count_per_node = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $min_core_count_per_node = 0; + /** + * Optional. Minimum memory per node in gigabytes. + * + * Generated from protobuf field int32 min_memory_per_node_gb = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $min_memory_per_node_gb = 0; + /** + * Optional. Minimum node storage per database server in gigabytes. + * + * Generated from protobuf field int32 min_db_node_storage_per_node_gb = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $min_db_node_storage_per_node_gb = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The name of the Database System Shape resource with the format: + * projects/{project}/locations/{region}/dbSystemShapes/{db_system_shape} + * @type string $shape + * Optional. shape + * @type int $min_node_count + * Optional. Minimum number of database servers. + * @type int $max_node_count + * Optional. Maximum number of database servers. + * @type int $min_storage_count + * Optional. Minimum number of storage servers. + * @type int $max_storage_count + * Optional. Maximum number of storage servers. + * @type int $available_core_count_per_node + * Optional. Number of cores per node. + * @type int $available_memory_per_node_gb + * Optional. Memory per database server node in gigabytes. + * @type int $available_data_storage_tb + * Optional. Storage per storage server in terabytes. + * @type int $min_core_count_per_node + * Optional. Minimum core count per node. + * @type int $min_memory_per_node_gb + * Optional. Minimum memory per node in gigabytes. + * @type int $min_db_node_storage_per_node_gb + * Optional. Minimum node storage per database server in gigabytes. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Oracledatabase\V1\DbSystemShape::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The name of the Database System Shape resource with the format: + * projects/{project}/locations/{region}/dbSystemShapes/{db_system_shape} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The name of the Database System Shape resource with the format: + * projects/{project}/locations/{region}/dbSystemShapes/{db_system_shape} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. shape + * + * Generated from protobuf field string shape = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getShape() + { + return $this->shape; + } + + /** + * Optional. shape + * + * Generated from protobuf field string shape = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setShape($var) + { + GPBUtil::checkString($var, True); + $this->shape = $var; + + return $this; + } + + /** + * Optional. Minimum number of database servers. + * + * Generated from protobuf field int32 min_node_count = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getMinNodeCount() + { + return $this->min_node_count; + } + + /** + * Optional. Minimum number of database servers. + * + * Generated from protobuf field int32 min_node_count = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setMinNodeCount($var) + { + GPBUtil::checkInt32($var); + $this->min_node_count = $var; + + return $this; + } + + /** + * Optional. Maximum number of database servers. + * + * Generated from protobuf field int32 max_node_count = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getMaxNodeCount() + { + return $this->max_node_count; + } + + /** + * Optional. Maximum number of database servers. + * + * Generated from protobuf field int32 max_node_count = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setMaxNodeCount($var) + { + GPBUtil::checkInt32($var); + $this->max_node_count = $var; + + return $this; + } + + /** + * Optional. Minimum number of storage servers. + * + * Generated from protobuf field int32 min_storage_count = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getMinStorageCount() + { + return $this->min_storage_count; + } + + /** + * Optional. Minimum number of storage servers. + * + * Generated from protobuf field int32 min_storage_count = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setMinStorageCount($var) + { + GPBUtil::checkInt32($var); + $this->min_storage_count = $var; + + return $this; + } + + /** + * Optional. Maximum number of storage servers. + * + * Generated from protobuf field int32 max_storage_count = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getMaxStorageCount() + { + return $this->max_storage_count; + } + + /** + * Optional. Maximum number of storage servers. + * + * Generated from protobuf field int32 max_storage_count = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setMaxStorageCount($var) + { + GPBUtil::checkInt32($var); + $this->max_storage_count = $var; + + return $this; + } + + /** + * Optional. Number of cores per node. + * + * Generated from protobuf field int32 available_core_count_per_node = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getAvailableCoreCountPerNode() + { + return $this->available_core_count_per_node; + } + + /** + * Optional. Number of cores per node. + * + * Generated from protobuf field int32 available_core_count_per_node = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setAvailableCoreCountPerNode($var) + { + GPBUtil::checkInt32($var); + $this->available_core_count_per_node = $var; + + return $this; + } + + /** + * Optional. Memory per database server node in gigabytes. + * + * Generated from protobuf field int32 available_memory_per_node_gb = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getAvailableMemoryPerNodeGb() + { + return $this->available_memory_per_node_gb; + } + + /** + * Optional. Memory per database server node in gigabytes. + * + * Generated from protobuf field int32 available_memory_per_node_gb = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setAvailableMemoryPerNodeGb($var) + { + GPBUtil::checkInt32($var); + $this->available_memory_per_node_gb = $var; + + return $this; + } + + /** + * Optional. Storage per storage server in terabytes. + * + * Generated from protobuf field int32 available_data_storage_tb = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getAvailableDataStorageTb() + { + return $this->available_data_storage_tb; + } + + /** + * Optional. Storage per storage server in terabytes. + * + * Generated from protobuf field int32 available_data_storage_tb = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setAvailableDataStorageTb($var) + { + GPBUtil::checkInt32($var); + $this->available_data_storage_tb = $var; + + return $this; + } + + /** + * Optional. Minimum core count per node. + * + * Generated from protobuf field int32 min_core_count_per_node = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getMinCoreCountPerNode() + { + return $this->min_core_count_per_node; + } + + /** + * Optional. Minimum core count per node. + * + * Generated from protobuf field int32 min_core_count_per_node = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setMinCoreCountPerNode($var) + { + GPBUtil::checkInt32($var); + $this->min_core_count_per_node = $var; + + return $this; + } + + /** + * Optional. Minimum memory per node in gigabytes. + * + * Generated from protobuf field int32 min_memory_per_node_gb = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getMinMemoryPerNodeGb() + { + return $this->min_memory_per_node_gb; + } + + /** + * Optional. Minimum memory per node in gigabytes. + * + * Generated from protobuf field int32 min_memory_per_node_gb = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setMinMemoryPerNodeGb($var) + { + GPBUtil::checkInt32($var); + $this->min_memory_per_node_gb = $var; + + return $this; + } + + /** + * Optional. Minimum node storage per database server in gigabytes. + * + * Generated from protobuf field int32 min_db_node_storage_per_node_gb = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getMinDbNodeStoragePerNodeGb() + { + return $this->min_db_node_storage_per_node_gb; + } + + /** + * Optional. Minimum node storage per database server in gigabytes. + * + * Generated from protobuf field int32 min_db_node_storage_per_node_gb = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setMinDbNodeStoragePerNodeGb($var) + { + GPBUtil::checkInt32($var); + $this->min_db_node_storage_per_node_gb = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DeleteAutonomousDatabaseRequest.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DeleteAutonomousDatabaseRequest.php new file mode 100644 index 000000000000..178fadebc4ff --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DeleteAutonomousDatabaseRequest.php @@ -0,0 +1,144 @@ +google.cloud.oracledatabase.v1.DeleteAutonomousDatabaseRequest + */ +class DeleteAutonomousDatabaseRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the resource in the following format: + * projects/{project}/locations/{location}/autonomousDatabases/{autonomous_database}. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. An optional ID to identify the request. This value is used to + * identify duplicate requests. If you make a request with the same request ID + * and the original request is still in progress or completed, the server + * ignores the second request. This prevents clients from + * accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param string $name Required. The name of the resource in the following format: + * projects/{project}/locations/{location}/autonomousDatabases/{autonomous_database}. Please see + * {@see OracleDatabaseClient::autonomousDatabaseName()} for help formatting this field. + * + * @return \Google\Cloud\OracleDatabase\V1\DeleteAutonomousDatabaseRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the resource in the following format: + * projects/{project}/locations/{location}/autonomousDatabases/{autonomous_database}. + * @type string $request_id + * Optional. An optional ID to identify the request. This value is used to + * identify duplicate requests. If you make a request with the same request ID + * and the original request is still in progress or completed, the server + * ignores the second request. This prevents clients from + * accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Oracledatabase\V1\Oracledatabase::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the resource in the following format: + * projects/{project}/locations/{location}/autonomousDatabases/{autonomous_database}. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the resource in the following format: + * projects/{project}/locations/{location}/autonomousDatabases/{autonomous_database}. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. An optional ID to identify the request. This value is used to + * identify duplicate requests. If you make a request with the same request ID + * and the original request is still in progress or completed, the server + * ignores the second request. This prevents clients from + * accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional ID to identify the request. This value is used to + * identify duplicate requests. If you make a request with the same request ID + * and the original request is still in progress or completed, the server + * ignores the second request. This prevents clients from + * accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DeleteCloudExadataInfrastructureRequest.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DeleteCloudExadataInfrastructureRequest.php new file mode 100644 index 000000000000..6501036f4549 --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DeleteCloudExadataInfrastructureRequest.php @@ -0,0 +1,191 @@ +google.cloud.oracledatabase.v1.DeleteCloudExadataInfrastructureRequest + */ +class DeleteCloudExadataInfrastructureRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the Cloud Exadata Infrastructure in the following + * format: + * projects/{project}/locations/{location}/cloudExadataInfrastructures/{cloud_exadata_infrastructure}. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. An optional ID to identify the request. This value is used to + * identify duplicate requests. If you make a request with the same request ID + * and the original request is still in progress or completed, the server + * ignores the second request. This prevents clients from + * accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + /** + * Optional. If set to true, all VM clusters for this Exadata Infrastructure + * will be deleted. An Exadata Infrastructure can only be deleted once all its + * VM clusters have been deleted. + * + * Generated from protobuf field bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $force = false; + + /** + * @param string $name Required. The name of the Cloud Exadata Infrastructure in the following + * format: + * projects/{project}/locations/{location}/cloudExadataInfrastructures/{cloud_exadata_infrastructure}. Please see + * {@see OracleDatabaseClient::cloudExadataInfrastructureName()} for help formatting this field. + * + * @return \Google\Cloud\OracleDatabase\V1\DeleteCloudExadataInfrastructureRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the Cloud Exadata Infrastructure in the following + * format: + * projects/{project}/locations/{location}/cloudExadataInfrastructures/{cloud_exadata_infrastructure}. + * @type string $request_id + * Optional. An optional ID to identify the request. This value is used to + * identify duplicate requests. If you make a request with the same request ID + * and the original request is still in progress or completed, the server + * ignores the second request. This prevents clients from + * accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @type bool $force + * Optional. If set to true, all VM clusters for this Exadata Infrastructure + * will be deleted. An Exadata Infrastructure can only be deleted once all its + * VM clusters have been deleted. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Oracledatabase\V1\Oracledatabase::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the Cloud Exadata Infrastructure in the following + * format: + * projects/{project}/locations/{location}/cloudExadataInfrastructures/{cloud_exadata_infrastructure}. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the Cloud Exadata Infrastructure in the following + * format: + * projects/{project}/locations/{location}/cloudExadataInfrastructures/{cloud_exadata_infrastructure}. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. An optional ID to identify the request. This value is used to + * identify duplicate requests. If you make a request with the same request ID + * and the original request is still in progress or completed, the server + * ignores the second request. This prevents clients from + * accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional ID to identify the request. This value is used to + * identify duplicate requests. If you make a request with the same request ID + * and the original request is still in progress or completed, the server + * ignores the second request. This prevents clients from + * accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + + /** + * Optional. If set to true, all VM clusters for this Exadata Infrastructure + * will be deleted. An Exadata Infrastructure can only be deleted once all its + * VM clusters have been deleted. + * + * Generated from protobuf field bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getForce() + { + return $this->force; + } + + /** + * Optional. If set to true, all VM clusters for this Exadata Infrastructure + * will be deleted. An Exadata Infrastructure can only be deleted once all its + * VM clusters have been deleted. + * + * Generated from protobuf field bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setForce($var) + { + GPBUtil::checkBool($var); + $this->force = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DeleteCloudVmClusterRequest.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DeleteCloudVmClusterRequest.php new file mode 100644 index 000000000000..6618b7516b25 --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DeleteCloudVmClusterRequest.php @@ -0,0 +1,186 @@ +google.cloud.oracledatabase.v1.DeleteCloudVmClusterRequest + */ +class DeleteCloudVmClusterRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the Cloud VM Cluster in the following format: + * projects/{project}/locations/{location}/cloudVmClusters/{cloud_vm_cluster}. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. An optional ID to identify the request. This value is used to + * identify duplicate requests. If you make a request with the same request ID + * and the original request is still in progress or completed, the server + * ignores the second request. This prevents clients from + * accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + /** + * Optional. If set to true, all child resources for the VM Cluster will be + * deleted. A VM Cluster can only be deleted once all its child resources have + * been deleted. + * + * Generated from protobuf field bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $force = false; + + /** + * @param string $name Required. The name of the Cloud VM Cluster in the following format: + * projects/{project}/locations/{location}/cloudVmClusters/{cloud_vm_cluster}. Please see + * {@see OracleDatabaseClient::cloudVmClusterName()} for help formatting this field. + * + * @return \Google\Cloud\OracleDatabase\V1\DeleteCloudVmClusterRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the Cloud VM Cluster in the following format: + * projects/{project}/locations/{location}/cloudVmClusters/{cloud_vm_cluster}. + * @type string $request_id + * Optional. An optional ID to identify the request. This value is used to + * identify duplicate requests. If you make a request with the same request ID + * and the original request is still in progress or completed, the server + * ignores the second request. This prevents clients from + * accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @type bool $force + * Optional. If set to true, all child resources for the VM Cluster will be + * deleted. A VM Cluster can only be deleted once all its child resources have + * been deleted. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Oracledatabase\V1\Oracledatabase::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the Cloud VM Cluster in the following format: + * projects/{project}/locations/{location}/cloudVmClusters/{cloud_vm_cluster}. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the Cloud VM Cluster in the following format: + * projects/{project}/locations/{location}/cloudVmClusters/{cloud_vm_cluster}. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. An optional ID to identify the request. This value is used to + * identify duplicate requests. If you make a request with the same request ID + * and the original request is still in progress or completed, the server + * ignores the second request. This prevents clients from + * accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional ID to identify the request. This value is used to + * identify duplicate requests. If you make a request with the same request ID + * and the original request is still in progress or completed, the server + * ignores the second request. This prevents clients from + * accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + + /** + * Optional. If set to true, all child resources for the VM Cluster will be + * deleted. A VM Cluster can only be deleted once all its child resources have + * been deleted. + * + * Generated from protobuf field bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getForce() + { + return $this->force; + } + + /** + * Optional. If set to true, all child resources for the VM Cluster will be + * deleted. A VM Cluster can only be deleted once all its child resources have + * been deleted. + * + * Generated from protobuf field bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setForce($var) + { + GPBUtil::checkBool($var); + $this->force = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/Entitlement.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/Entitlement.php new file mode 100644 index 000000000000..d534ed0dc088 --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/Entitlement.php @@ -0,0 +1,183 @@ +google.cloud.oracledatabase.v1.Entitlement + */ +class Entitlement extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The name of the Entitlement resource with the format: + * projects/{project}/locations/{region}/entitlements/{entitlement} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Details of the OCI Cloud Account. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.CloudAccountDetails cloud_account_details = 2; + */ + protected $cloud_account_details = null; + /** + * Output only. Google Cloud Marketplace order ID (aka entitlement ID) + * + * Generated from protobuf field string entitlement_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $entitlement_id = ''; + /** + * Output only. Entitlement State. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.Entitlement.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The name of the Entitlement resource with the format: + * projects/{project}/locations/{region}/entitlements/{entitlement} + * @type \Google\Cloud\OracleDatabase\V1\CloudAccountDetails $cloud_account_details + * Details of the OCI Cloud Account. + * @type string $entitlement_id + * Output only. Google Cloud Marketplace order ID (aka entitlement ID) + * @type int $state + * Output only. Entitlement State. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Oracledatabase\V1\Entitlement::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The name of the Entitlement resource with the format: + * projects/{project}/locations/{region}/entitlements/{entitlement} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The name of the Entitlement resource with the format: + * projects/{project}/locations/{region}/entitlements/{entitlement} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Details of the OCI Cloud Account. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.CloudAccountDetails cloud_account_details = 2; + * @return \Google\Cloud\OracleDatabase\V1\CloudAccountDetails|null + */ + public function getCloudAccountDetails() + { + return $this->cloud_account_details; + } + + public function hasCloudAccountDetails() + { + return isset($this->cloud_account_details); + } + + public function clearCloudAccountDetails() + { + unset($this->cloud_account_details); + } + + /** + * Details of the OCI Cloud Account. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.CloudAccountDetails cloud_account_details = 2; + * @param \Google\Cloud\OracleDatabase\V1\CloudAccountDetails $var + * @return $this + */ + public function setCloudAccountDetails($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OracleDatabase\V1\CloudAccountDetails::class); + $this->cloud_account_details = $var; + + return $this; + } + + /** + * Output only. Google Cloud Marketplace order ID (aka entitlement ID) + * + * Generated from protobuf field string entitlement_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getEntitlementId() + { + return $this->entitlement_id; + } + + /** + * Output only. Google Cloud Marketplace order ID (aka entitlement ID) + * + * Generated from protobuf field string entitlement_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setEntitlementId($var) + { + GPBUtil::checkString($var, True); + $this->entitlement_id = $var; + + return $this; + } + + /** + * Output only. Entitlement State. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.Entitlement.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. Entitlement State. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.Entitlement.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\OracleDatabase\V1\Entitlement\State::class); + $this->state = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/Entitlement/State.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/Entitlement/State.php new file mode 100644 index 000000000000..5f4dde2882bc --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/Entitlement/State.php @@ -0,0 +1,71 @@ +google.cloud.oracledatabase.v1.Entitlement.State + */ +class State +{ + /** + * Default unspecified value. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Account not linked. + * + * Generated from protobuf enum ACCOUNT_NOT_LINKED = 1; + */ + const ACCOUNT_NOT_LINKED = 1; + /** + * Account is linked but not active. + * + * Generated from protobuf enum ACCOUNT_NOT_ACTIVE = 2; + */ + const ACCOUNT_NOT_ACTIVE = 2; + /** + * Entitlement and Account are active. + * + * Generated from protobuf enum ACTIVE = 3; + */ + const ACTIVE = 3; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::ACCOUNT_NOT_LINKED => 'ACCOUNT_NOT_LINKED', + self::ACCOUNT_NOT_ACTIVE => 'ACCOUNT_NOT_ACTIVE', + self::ACTIVE => 'ACTIVE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\OracleDatabase\V1\Entitlement_State::class); + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/GenerateAutonomousDatabaseWalletRequest.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/GenerateAutonomousDatabaseWalletRequest.php new file mode 100644 index 000000000000..ed1220a99486 --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/GenerateAutonomousDatabaseWalletRequest.php @@ -0,0 +1,210 @@ +google.cloud.oracledatabase.v1.GenerateAutonomousDatabaseWalletRequest + */ +class GenerateAutonomousDatabaseWalletRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the Autonomous Database in the following format: + * projects/{project}/locations/{location}/autonomousDatabases/{autonomous_database}. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. The type of wallet generation for the Autonomous Database. The + * default value is SINGLE. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.GenerateType type = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $type = 0; + /** + * Optional. True when requesting regional connection strings in PDB connect + * info, applicable to cross-region Data Guard only. + * + * Generated from protobuf field bool is_regional = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $is_regional = false; + /** + * Required. The password used to encrypt the keys inside the wallet. The + * password must be a minimum of 8 characters. + * + * Generated from protobuf field string password = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $password = ''; + + /** + * @param string $name Required. The name of the Autonomous Database in the following format: + * projects/{project}/locations/{location}/autonomousDatabases/{autonomous_database}. Please see + * {@see OracleDatabaseClient::autonomousDatabaseName()} for help formatting this field. + * @param int $type Optional. The type of wallet generation for the Autonomous Database. The + * default value is SINGLE. + * For allowed values, use constants defined on {@see \Google\Cloud\OracleDatabase\V1\GenerateType} + * @param bool $isRegional Optional. True when requesting regional connection strings in PDB connect + * info, applicable to cross-region Data Guard only. + * @param string $password Required. The password used to encrypt the keys inside the wallet. The + * password must be a minimum of 8 characters. + * + * @return \Google\Cloud\OracleDatabase\V1\GenerateAutonomousDatabaseWalletRequest + * + * @experimental + */ + public static function build(string $name, int $type, bool $isRegional, string $password): self + { + return (new self()) + ->setName($name) + ->setType($type) + ->setIsRegional($isRegional) + ->setPassword($password); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the Autonomous Database in the following format: + * projects/{project}/locations/{location}/autonomousDatabases/{autonomous_database}. + * @type int $type + * Optional. The type of wallet generation for the Autonomous Database. The + * default value is SINGLE. + * @type bool $is_regional + * Optional. True when requesting regional connection strings in PDB connect + * info, applicable to cross-region Data Guard only. + * @type string $password + * Required. The password used to encrypt the keys inside the wallet. The + * password must be a minimum of 8 characters. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Oracledatabase\V1\Oracledatabase::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the Autonomous Database in the following format: + * projects/{project}/locations/{location}/autonomousDatabases/{autonomous_database}. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the Autonomous Database in the following format: + * projects/{project}/locations/{location}/autonomousDatabases/{autonomous_database}. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. The type of wallet generation for the Autonomous Database. The + * default value is SINGLE. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.GenerateType type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Optional. The type of wallet generation for the Autonomous Database. The + * default value is SINGLE. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.GenerateType type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\OracleDatabase\V1\GenerateType::class); + $this->type = $var; + + return $this; + } + + /** + * Optional. True when requesting regional connection strings in PDB connect + * info, applicable to cross-region Data Guard only. + * + * Generated from protobuf field bool is_regional = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getIsRegional() + { + return $this->is_regional; + } + + /** + * Optional. True when requesting regional connection strings in PDB connect + * info, applicable to cross-region Data Guard only. + * + * Generated from protobuf field bool is_regional = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setIsRegional($var) + { + GPBUtil::checkBool($var); + $this->is_regional = $var; + + return $this; + } + + /** + * Required. The password used to encrypt the keys inside the wallet. The + * password must be a minimum of 8 characters. + * + * Generated from protobuf field string password = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPassword() + { + return $this->password; + } + + /** + * Required. The password used to encrypt the keys inside the wallet. The + * password must be a minimum of 8 characters. + * + * Generated from protobuf field string password = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPassword($var) + { + GPBUtil::checkString($var, True); + $this->password = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/GenerateAutonomousDatabaseWalletResponse.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/GenerateAutonomousDatabaseWalletResponse.php new file mode 100644 index 000000000000..24215559cd7a --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/GenerateAutonomousDatabaseWalletResponse.php @@ -0,0 +1,67 @@ +google.cloud.oracledatabase.v1.GenerateAutonomousDatabaseWalletResponse + */ +class GenerateAutonomousDatabaseWalletResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The base64 encoded wallet files. + * + * Generated from protobuf field bytes archive_content = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $archive_content = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $archive_content + * Output only. The base64 encoded wallet files. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Oracledatabase\V1\Oracledatabase::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The base64 encoded wallet files. + * + * Generated from protobuf field bytes archive_content = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getArchiveContent() + { + return $this->archive_content; + } + + /** + * Output only. The base64 encoded wallet files. + * + * Generated from protobuf field bytes archive_content = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setArchiveContent($var) + { + GPBUtil::checkString($var, False); + $this->archive_content = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/GenerateType.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/GenerateType.php new file mode 100644 index 000000000000..d89621248279 --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/GenerateType.php @@ -0,0 +1,61 @@ +google.cloud.oracledatabase.v1.GenerateType + */ +class GenerateType +{ + /** + * Default unspecified value. + * + * Generated from protobuf enum GENERATE_TYPE_UNSPECIFIED = 0; + */ + const GENERATE_TYPE_UNSPECIFIED = 0; + /** + * Used to generate wallet for all databases in the region. + * + * Generated from protobuf enum ALL = 1; + */ + const ALL = 1; + /** + * Used to generate wallet for a single database. + * + * Generated from protobuf enum SINGLE = 2; + */ + const SINGLE = 2; + + private static $valueToName = [ + self::GENERATE_TYPE_UNSPECIFIED => 'GENERATE_TYPE_UNSPECIFIED', + self::ALL => 'ALL', + self::SINGLE => 'SINGLE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/GetAutonomousDatabaseRequest.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/GetAutonomousDatabaseRequest.php new file mode 100644 index 000000000000..ef3ff3dfa6fe --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/GetAutonomousDatabaseRequest.php @@ -0,0 +1,86 @@ +google.cloud.oracledatabase.v1.GetAutonomousDatabaseRequest + */ +class GetAutonomousDatabaseRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the Autonomous Database in the following format: + * projects/{project}/locations/{location}/autonomousDatabases/{autonomous_database}. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the Autonomous Database in the following format: + * projects/{project}/locations/{location}/autonomousDatabases/{autonomous_database}. Please see + * {@see OracleDatabaseClient::autonomousDatabaseName()} for help formatting this field. + * + * @return \Google\Cloud\OracleDatabase\V1\GetAutonomousDatabaseRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the Autonomous Database in the following format: + * projects/{project}/locations/{location}/autonomousDatabases/{autonomous_database}. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Oracledatabase\V1\Oracledatabase::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the Autonomous Database in the following format: + * projects/{project}/locations/{location}/autonomousDatabases/{autonomous_database}. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the Autonomous Database in the following format: + * projects/{project}/locations/{location}/autonomousDatabases/{autonomous_database}. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/GetCloudExadataInfrastructureRequest.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/GetCloudExadataInfrastructureRequest.php new file mode 100644 index 000000000000..b432c93d58f3 --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/GetCloudExadataInfrastructureRequest.php @@ -0,0 +1,91 @@ +google.cloud.oracledatabase.v1.GetCloudExadataInfrastructureRequest + */ +class GetCloudExadataInfrastructureRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the Cloud Exadata Infrastructure in the following + * format: + * projects/{project}/locations/{location}/cloudExadataInfrastructures/{cloud_exadata_infrastructure}. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the Cloud Exadata Infrastructure in the following + * format: + * projects/{project}/locations/{location}/cloudExadataInfrastructures/{cloud_exadata_infrastructure}. Please see + * {@see OracleDatabaseClient::cloudExadataInfrastructureName()} for help formatting this field. + * + * @return \Google\Cloud\OracleDatabase\V1\GetCloudExadataInfrastructureRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the Cloud Exadata Infrastructure in the following + * format: + * projects/{project}/locations/{location}/cloudExadataInfrastructures/{cloud_exadata_infrastructure}. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Oracledatabase\V1\Oracledatabase::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the Cloud Exadata Infrastructure in the following + * format: + * projects/{project}/locations/{location}/cloudExadataInfrastructures/{cloud_exadata_infrastructure}. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the Cloud Exadata Infrastructure in the following + * format: + * projects/{project}/locations/{location}/cloudExadataInfrastructures/{cloud_exadata_infrastructure}. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/GetCloudVmClusterRequest.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/GetCloudVmClusterRequest.php new file mode 100644 index 000000000000..abc510235f45 --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/GetCloudVmClusterRequest.php @@ -0,0 +1,86 @@ +google.cloud.oracledatabase.v1.GetCloudVmClusterRequest + */ +class GetCloudVmClusterRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the Cloud VM Cluster in the following format: + * projects/{project}/locations/{location}/cloudVmClusters/{cloud_vm_cluster}. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the Cloud VM Cluster in the following format: + * projects/{project}/locations/{location}/cloudVmClusters/{cloud_vm_cluster}. Please see + * {@see OracleDatabaseClient::cloudVmClusterName()} for help formatting this field. + * + * @return \Google\Cloud\OracleDatabase\V1\GetCloudVmClusterRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the Cloud VM Cluster in the following format: + * projects/{project}/locations/{location}/cloudVmClusters/{cloud_vm_cluster}. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Oracledatabase\V1\Oracledatabase::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the Cloud VM Cluster in the following format: + * projects/{project}/locations/{location}/cloudVmClusters/{cloud_vm_cluster}. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the Cloud VM Cluster in the following format: + * projects/{project}/locations/{location}/cloudVmClusters/{cloud_vm_cluster}. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/GiVersion.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/GiVersion.php new file mode 100644 index 000000000000..16f041648764 --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/GiVersion.php @@ -0,0 +1,110 @@ +google.cloud.oracledatabase.v1.GiVersion + */ +class GiVersion extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The name of the Oracle Grid Infrastructure (GI) version + * resource with the format: + * projects/{project}/locations/{region}/giVersions/{gi_versions} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Optional. version + * + * Generated from protobuf field string version = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The name of the Oracle Grid Infrastructure (GI) version + * resource with the format: + * projects/{project}/locations/{region}/giVersions/{gi_versions} + * @type string $version + * Optional. version + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Oracledatabase\V1\GiVersion::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The name of the Oracle Grid Infrastructure (GI) version + * resource with the format: + * projects/{project}/locations/{region}/giVersions/{gi_versions} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The name of the Oracle Grid Infrastructure (GI) version + * resource with the format: + * projects/{project}/locations/{region}/giVersions/{gi_versions} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. version + * + * Generated from protobuf field string version = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getVersion() + { + return $this->version; + } + + /** + * Optional. version + * + * Generated from protobuf field string version = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkString($var, True); + $this->version = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListAutonomousDatabaseBackupsRequest.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListAutonomousDatabaseBackupsRequest.php new file mode 100644 index 000000000000..18b0e3b66671 --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListAutonomousDatabaseBackupsRequest.php @@ -0,0 +1,220 @@ +google.cloud.oracledatabase.v1.ListAutonomousDatabaseBackupsRequest + */ +class ListAutonomousDatabaseBackupsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent value for ListAutonomousDatabaseBackups in the + * following format: projects/{project}/locations/{location}. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. An expression for filtering the results of the request. Only the + * **autonomous_database_id** field is supported in the following format: + * `autonomous_database_id="{autonomous_database_id}"`. The accepted values + * must be a valid Autonomous Database ID, limited to the naming + * restrictions of the ID: ^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$). + * The ID must start with a letter, end with a letter or a number, and be + * a maximum of 63 characters. + * + * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. The maximum number of items to return. + * If unspecified, at most 50 Autonomous DB Backups will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The parent value for ListAutonomousDatabaseBackups in the + * following format: projects/{project}/locations/{location}. Please see + * {@see OracleDatabaseClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\OracleDatabase\V1\ListAutonomousDatabaseBackupsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent value for ListAutonomousDatabaseBackups in the + * following format: projects/{project}/locations/{location}. + * @type string $filter + * Optional. An expression for filtering the results of the request. Only the + * **autonomous_database_id** field is supported in the following format: + * `autonomous_database_id="{autonomous_database_id}"`. The accepted values + * must be a valid Autonomous Database ID, limited to the naming + * restrictions of the ID: ^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$). + * The ID must start with a letter, end with a letter or a number, and be + * a maximum of 63 characters. + * @type int $page_size + * Optional. The maximum number of items to return. + * If unspecified, at most 50 Autonomous DB Backups will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * @type string $page_token + * Optional. A token identifying a page of results the server should return. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Oracledatabase\V1\Oracledatabase::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent value for ListAutonomousDatabaseBackups in the + * following format: projects/{project}/locations/{location}. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent value for ListAutonomousDatabaseBackups in the + * following format: projects/{project}/locations/{location}. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. An expression for filtering the results of the request. Only the + * **autonomous_database_id** field is supported in the following format: + * `autonomous_database_id="{autonomous_database_id}"`. The accepted values + * must be a valid Autonomous Database ID, limited to the naming + * restrictions of the ID: ^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$). + * The ID must start with a letter, end with a letter or a number, and be + * a maximum of 63 characters. + * + * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. An expression for filtering the results of the request. Only the + * **autonomous_database_id** field is supported in the following format: + * `autonomous_database_id="{autonomous_database_id}"`. The accepted values + * must be a valid Autonomous Database ID, limited to the naming + * restrictions of the ID: ^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$). + * The ID must start with a letter, end with a letter or a number, and be + * a maximum of 63 characters. + * + * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Optional. The maximum number of items to return. + * If unspecified, at most 50 Autonomous DB Backups will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of items to return. + * If unspecified, at most 50 Autonomous DB Backups will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListAutonomousDatabaseBackupsResponse.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListAutonomousDatabaseBackupsResponse.php new file mode 100644 index 000000000000..4350618c2c3d --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListAutonomousDatabaseBackupsResponse.php @@ -0,0 +1,101 @@ +google.cloud.oracledatabase.v1.ListAutonomousDatabaseBackupsResponse + */ +class ListAutonomousDatabaseBackupsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of Autonomous Database Backups. + * + * Generated from protobuf field repeated .google.cloud.oracledatabase.v1.AutonomousDatabaseBackup autonomous_database_backups = 1; + */ + private $autonomous_database_backups; + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\OracleDatabase\V1\AutonomousDatabaseBackup>|\Google\Protobuf\Internal\RepeatedField $autonomous_database_backups + * The list of Autonomous Database Backups. + * @type string $next_page_token + * A token identifying a page of results the server should return. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Oracledatabase\V1\Oracledatabase::initOnce(); + parent::__construct($data); + } + + /** + * The list of Autonomous Database Backups. + * + * Generated from protobuf field repeated .google.cloud.oracledatabase.v1.AutonomousDatabaseBackup autonomous_database_backups = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAutonomousDatabaseBackups() + { + return $this->autonomous_database_backups; + } + + /** + * The list of Autonomous Database Backups. + * + * Generated from protobuf field repeated .google.cloud.oracledatabase.v1.AutonomousDatabaseBackup autonomous_database_backups = 1; + * @param array<\Google\Cloud\OracleDatabase\V1\AutonomousDatabaseBackup>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAutonomousDatabaseBackups($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseBackup::class); + $this->autonomous_database_backups = $arr; + + return $this; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListAutonomousDatabaseCharacterSetsRequest.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListAutonomousDatabaseCharacterSetsRequest.php new file mode 100644 index 000000000000..4c2d224e314a --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListAutonomousDatabaseCharacterSetsRequest.php @@ -0,0 +1,208 @@ +google.cloud.oracledatabase.v1.ListAutonomousDatabaseCharacterSetsRequest + */ +class ListAutonomousDatabaseCharacterSetsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent value for the Autonomous Database in the following + * format: projects/{project}/locations/{location}. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of items to return. + * If unspecified, at most 50 Autonomous DB Character Sets will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. An expression for filtering the results of the request. Only the + * **character_set_type** field is supported in the following format: + * `character_set_type="{characterSetType}"`. Accepted values include + * `DATABASE` and `NATIONAL`. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + + /** + * @param string $parent Required. The parent value for the Autonomous Database in the following + * format: projects/{project}/locations/{location}. Please see + * {@see OracleDatabaseClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\OracleDatabase\V1\ListAutonomousDatabaseCharacterSetsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent value for the Autonomous Database in the following + * format: projects/{project}/locations/{location}. + * @type int $page_size + * Optional. The maximum number of items to return. + * If unspecified, at most 50 Autonomous DB Character Sets will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * @type string $page_token + * Optional. A token identifying a page of results the server should return. + * @type string $filter + * Optional. An expression for filtering the results of the request. Only the + * **character_set_type** field is supported in the following format: + * `character_set_type="{characterSetType}"`. Accepted values include + * `DATABASE` and `NATIONAL`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Oracledatabase\V1\Oracledatabase::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent value for the Autonomous Database in the following + * format: projects/{project}/locations/{location}. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent value for the Autonomous Database in the following + * format: projects/{project}/locations/{location}. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The maximum number of items to return. + * If unspecified, at most 50 Autonomous DB Character Sets will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of items to return. + * If unspecified, at most 50 Autonomous DB Character Sets will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. An expression for filtering the results of the request. Only the + * **character_set_type** field is supported in the following format: + * `character_set_type="{characterSetType}"`. Accepted values include + * `DATABASE` and `NATIONAL`. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. An expression for filtering the results of the request. Only the + * **character_set_type** field is supported in the following format: + * `character_set_type="{characterSetType}"`. Accepted values include + * `DATABASE` and `NATIONAL`. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListAutonomousDatabaseCharacterSetsResponse.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListAutonomousDatabaseCharacterSetsResponse.php new file mode 100644 index 000000000000..7466b5277d9a --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListAutonomousDatabaseCharacterSetsResponse.php @@ -0,0 +1,101 @@ +google.cloud.oracledatabase.v1.ListAutonomousDatabaseCharacterSetsResponse + */ +class ListAutonomousDatabaseCharacterSetsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of Autonomous Database Character Sets. + * + * Generated from protobuf field repeated .google.cloud.oracledatabase.v1.AutonomousDatabaseCharacterSet autonomous_database_character_sets = 1; + */ + private $autonomous_database_character_sets; + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\OracleDatabase\V1\AutonomousDatabaseCharacterSet>|\Google\Protobuf\Internal\RepeatedField $autonomous_database_character_sets + * The list of Autonomous Database Character Sets. + * @type string $next_page_token + * A token identifying a page of results the server should return. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Oracledatabase\V1\Oracledatabase::initOnce(); + parent::__construct($data); + } + + /** + * The list of Autonomous Database Character Sets. + * + * Generated from protobuf field repeated .google.cloud.oracledatabase.v1.AutonomousDatabaseCharacterSet autonomous_database_character_sets = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAutonomousDatabaseCharacterSets() + { + return $this->autonomous_database_character_sets; + } + + /** + * The list of Autonomous Database Character Sets. + * + * Generated from protobuf field repeated .google.cloud.oracledatabase.v1.AutonomousDatabaseCharacterSet autonomous_database_character_sets = 1; + * @param array<\Google\Cloud\OracleDatabase\V1\AutonomousDatabaseCharacterSet>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAutonomousDatabaseCharacterSets($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseCharacterSet::class); + $this->autonomous_database_character_sets = $arr; + + return $this; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListAutonomousDatabasesRequest.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListAutonomousDatabasesRequest.php new file mode 100644 index 000000000000..38e445f51d6b --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListAutonomousDatabasesRequest.php @@ -0,0 +1,230 @@ +google.cloud.oracledatabase.v1.ListAutonomousDatabasesRequest + */ +class ListAutonomousDatabasesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent value for the Autonomous Database in the following + * format: projects/{project}/locations/{location}. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of items to return. + * If unspecified, at most 50 Autonomous Database will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. An expression for filtering the results of the request. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. An expression for ordering the results of the request. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The parent value for the Autonomous Database in the following + * format: projects/{project}/locations/{location}. Please see + * {@see OracleDatabaseClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\OracleDatabase\V1\ListAutonomousDatabasesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent value for the Autonomous Database in the following + * format: projects/{project}/locations/{location}. + * @type int $page_size + * Optional. The maximum number of items to return. + * If unspecified, at most 50 Autonomous Database will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * @type string $page_token + * Optional. A token identifying a page of results the server should return. + * @type string $filter + * Optional. An expression for filtering the results of the request. + * @type string $order_by + * Optional. An expression for ordering the results of the request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Oracledatabase\V1\Oracledatabase::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent value for the Autonomous Database in the following + * format: projects/{project}/locations/{location}. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent value for the Autonomous Database in the following + * format: projects/{project}/locations/{location}. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The maximum number of items to return. + * If unspecified, at most 50 Autonomous Database will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of items to return. + * If unspecified, at most 50 Autonomous Database will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. An expression for filtering the results of the request. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. An expression for filtering the results of the request. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Optional. An expression for ordering the results of the request. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. An expression for ordering the results of the request. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListAutonomousDatabasesResponse.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListAutonomousDatabasesResponse.php new file mode 100644 index 000000000000..0c570e1c3539 --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListAutonomousDatabasesResponse.php @@ -0,0 +1,101 @@ +google.cloud.oracledatabase.v1.ListAutonomousDatabasesResponse + */ +class ListAutonomousDatabasesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of Autonomous Databases. + * + * Generated from protobuf field repeated .google.cloud.oracledatabase.v1.AutonomousDatabase autonomous_databases = 1; + */ + private $autonomous_databases; + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\OracleDatabase\V1\AutonomousDatabase>|\Google\Protobuf\Internal\RepeatedField $autonomous_databases + * The list of Autonomous Databases. + * @type string $next_page_token + * A token identifying a page of results the server should return. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Oracledatabase\V1\Oracledatabase::initOnce(); + parent::__construct($data); + } + + /** + * The list of Autonomous Databases. + * + * Generated from protobuf field repeated .google.cloud.oracledatabase.v1.AutonomousDatabase autonomous_databases = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAutonomousDatabases() + { + return $this->autonomous_databases; + } + + /** + * The list of Autonomous Databases. + * + * Generated from protobuf field repeated .google.cloud.oracledatabase.v1.AutonomousDatabase autonomous_databases = 1; + * @param array<\Google\Cloud\OracleDatabase\V1\AutonomousDatabase>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAutonomousDatabases($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\OracleDatabase\V1\AutonomousDatabase::class); + $this->autonomous_databases = $arr; + + return $this; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListAutonomousDbVersionsRequest.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListAutonomousDbVersionsRequest.php new file mode 100644 index 000000000000..7acc6d2b594d --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListAutonomousDbVersionsRequest.php @@ -0,0 +1,162 @@ +google.cloud.oracledatabase.v1.ListAutonomousDbVersionsRequest + */ +class ListAutonomousDbVersionsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent value for the Autonomous Database in the following + * format: projects/{project}/locations/{location}. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of items to return. + * If unspecified, at most 50 Autonomous DB Versions will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The parent value for the Autonomous Database in the following + * format: projects/{project}/locations/{location}. Please see + * {@see OracleDatabaseClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\OracleDatabase\V1\ListAutonomousDbVersionsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent value for the Autonomous Database in the following + * format: projects/{project}/locations/{location}. + * @type int $page_size + * Optional. The maximum number of items to return. + * If unspecified, at most 50 Autonomous DB Versions will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * @type string $page_token + * Optional. A token identifying a page of results the server should return. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Oracledatabase\V1\Oracledatabase::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent value for the Autonomous Database in the following + * format: projects/{project}/locations/{location}. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent value for the Autonomous Database in the following + * format: projects/{project}/locations/{location}. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The maximum number of items to return. + * If unspecified, at most 50 Autonomous DB Versions will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of items to return. + * If unspecified, at most 50 Autonomous DB Versions will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListAutonomousDbVersionsResponse.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListAutonomousDbVersionsResponse.php new file mode 100644 index 000000000000..a4d26a12226a --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListAutonomousDbVersionsResponse.php @@ -0,0 +1,101 @@ +google.cloud.oracledatabase.v1.ListAutonomousDbVersionsResponse + */ +class ListAutonomousDbVersionsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of Autonomous Database versions. + * + * Generated from protobuf field repeated .google.cloud.oracledatabase.v1.AutonomousDbVersion autonomous_db_versions = 1; + */ + private $autonomous_db_versions; + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\OracleDatabase\V1\AutonomousDbVersion>|\Google\Protobuf\Internal\RepeatedField $autonomous_db_versions + * The list of Autonomous Database versions. + * @type string $next_page_token + * A token identifying a page of results the server should return. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Oracledatabase\V1\Oracledatabase::initOnce(); + parent::__construct($data); + } + + /** + * The list of Autonomous Database versions. + * + * Generated from protobuf field repeated .google.cloud.oracledatabase.v1.AutonomousDbVersion autonomous_db_versions = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAutonomousDbVersions() + { + return $this->autonomous_db_versions; + } + + /** + * The list of Autonomous Database versions. + * + * Generated from protobuf field repeated .google.cloud.oracledatabase.v1.AutonomousDbVersion autonomous_db_versions = 1; + * @param array<\Google\Cloud\OracleDatabase\V1\AutonomousDbVersion>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAutonomousDbVersions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\OracleDatabase\V1\AutonomousDbVersion::class); + $this->autonomous_db_versions = $arr; + + return $this; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListCloudExadataInfrastructuresRequest.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListCloudExadataInfrastructuresRequest.php new file mode 100644 index 000000000000..0f0045bf050e --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListCloudExadataInfrastructuresRequest.php @@ -0,0 +1,162 @@ +google.cloud.oracledatabase.v1.ListCloudExadataInfrastructuresRequest + */ +class ListCloudExadataInfrastructuresRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent value for CloudExadataInfrastructure in the following + * format: projects/{project}/locations/{location}. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of items to return. + * If unspecified, at most 50 Exadata infrastructures will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The parent value for CloudExadataInfrastructure in the following + * format: projects/{project}/locations/{location}. Please see + * {@see OracleDatabaseClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\OracleDatabase\V1\ListCloudExadataInfrastructuresRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent value for CloudExadataInfrastructure in the following + * format: projects/{project}/locations/{location}. + * @type int $page_size + * Optional. The maximum number of items to return. + * If unspecified, at most 50 Exadata infrastructures will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * @type string $page_token + * Optional. A token identifying a page of results the server should return. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Oracledatabase\V1\Oracledatabase::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent value for CloudExadataInfrastructure in the following + * format: projects/{project}/locations/{location}. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent value for CloudExadataInfrastructure in the following + * format: projects/{project}/locations/{location}. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The maximum number of items to return. + * If unspecified, at most 50 Exadata infrastructures will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of items to return. + * If unspecified, at most 50 Exadata infrastructures will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListCloudExadataInfrastructuresResponse.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListCloudExadataInfrastructuresResponse.php new file mode 100644 index 000000000000..c54cb824f6a0 --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListCloudExadataInfrastructuresResponse.php @@ -0,0 +1,101 @@ +google.cloud.oracledatabase.v1.ListCloudExadataInfrastructuresResponse + */ +class ListCloudExadataInfrastructuresResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of Exadata Infrastructures. + * + * Generated from protobuf field repeated .google.cloud.oracledatabase.v1.CloudExadataInfrastructure cloud_exadata_infrastructures = 1; + */ + private $cloud_exadata_infrastructures; + /** + * A token for fetching next page of response. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\OracleDatabase\V1\CloudExadataInfrastructure>|\Google\Protobuf\Internal\RepeatedField $cloud_exadata_infrastructures + * The list of Exadata Infrastructures. + * @type string $next_page_token + * A token for fetching next page of response. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Oracledatabase\V1\Oracledatabase::initOnce(); + parent::__construct($data); + } + + /** + * The list of Exadata Infrastructures. + * + * Generated from protobuf field repeated .google.cloud.oracledatabase.v1.CloudExadataInfrastructure cloud_exadata_infrastructures = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCloudExadataInfrastructures() + { + return $this->cloud_exadata_infrastructures; + } + + /** + * The list of Exadata Infrastructures. + * + * Generated from protobuf field repeated .google.cloud.oracledatabase.v1.CloudExadataInfrastructure cloud_exadata_infrastructures = 1; + * @param array<\Google\Cloud\OracleDatabase\V1\CloudExadataInfrastructure>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCloudExadataInfrastructures($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\OracleDatabase\V1\CloudExadataInfrastructure::class); + $this->cloud_exadata_infrastructures = $arr; + + return $this; + } + + /** + * A token for fetching next page of response. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token for fetching next page of response. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListCloudVmClustersRequest.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListCloudVmClustersRequest.php new file mode 100644 index 000000000000..91204da83c5f --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListCloudVmClustersRequest.php @@ -0,0 +1,196 @@ +google.cloud.oracledatabase.v1.ListCloudVmClustersRequest + */ +class ListCloudVmClustersRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the parent in the following format: + * projects/{project}/locations/{location}. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The number of VM clusters to return. + * If unspecified, at most 50 VM clusters will be returned. + * The maximum value is 1,000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A token identifying the page of results the server returns. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. An expression for filtering the results of the request. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + + /** + * @param string $parent Required. The name of the parent in the following format: + * projects/{project}/locations/{location}. Please see + * {@see OracleDatabaseClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\OracleDatabase\V1\ListCloudVmClustersRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The name of the parent in the following format: + * projects/{project}/locations/{location}. + * @type int $page_size + * Optional. The number of VM clusters to return. + * If unspecified, at most 50 VM clusters will be returned. + * The maximum value is 1,000. + * @type string $page_token + * Optional. A token identifying the page of results the server returns. + * @type string $filter + * Optional. An expression for filtering the results of the request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Oracledatabase\V1\Oracledatabase::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the parent in the following format: + * projects/{project}/locations/{location}. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The name of the parent in the following format: + * projects/{project}/locations/{location}. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The number of VM clusters to return. + * If unspecified, at most 50 VM clusters will be returned. + * The maximum value is 1,000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The number of VM clusters to return. + * If unspecified, at most 50 VM clusters will be returned. + * The maximum value is 1,000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. A token identifying the page of results the server returns. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A token identifying the page of results the server returns. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. An expression for filtering the results of the request. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. An expression for filtering the results of the request. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListCloudVmClustersResponse.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListCloudVmClustersResponse.php new file mode 100644 index 000000000000..b42cbec7c465 --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListCloudVmClustersResponse.php @@ -0,0 +1,101 @@ +google.cloud.oracledatabase.v1.ListCloudVmClustersResponse + */ +class ListCloudVmClustersResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of VM Clusters. + * + * Generated from protobuf field repeated .google.cloud.oracledatabase.v1.CloudVmCluster cloud_vm_clusters = 1; + */ + private $cloud_vm_clusters; + /** + * A token to fetch the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\OracleDatabase\V1\CloudVmCluster>|\Google\Protobuf\Internal\RepeatedField $cloud_vm_clusters + * The list of VM Clusters. + * @type string $next_page_token + * A token to fetch the next page of results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Oracledatabase\V1\Oracledatabase::initOnce(); + parent::__construct($data); + } + + /** + * The list of VM Clusters. + * + * Generated from protobuf field repeated .google.cloud.oracledatabase.v1.CloudVmCluster cloud_vm_clusters = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCloudVmClusters() + { + return $this->cloud_vm_clusters; + } + + /** + * The list of VM Clusters. + * + * Generated from protobuf field repeated .google.cloud.oracledatabase.v1.CloudVmCluster cloud_vm_clusters = 1; + * @param array<\Google\Cloud\OracleDatabase\V1\CloudVmCluster>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCloudVmClusters($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\OracleDatabase\V1\CloudVmCluster::class); + $this->cloud_vm_clusters = $arr; + + return $this; + } + + /** + * A token to fetch the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token to fetch the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListDbNodesRequest.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListDbNodesRequest.php new file mode 100644 index 000000000000..aeda44f15653 --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListDbNodesRequest.php @@ -0,0 +1,162 @@ +google.cloud.oracledatabase.v1.ListDbNodesRequest + */ +class ListDbNodesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent value for database node in the following format: + * projects/{project}/locations/{location}/cloudVmClusters/{cloudVmCluster}. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of items to return. + * If unspecified, at most 50 db nodes will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A token identifying a page of results the node should return. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The parent value for database node in the following format: + * projects/{project}/locations/{location}/cloudVmClusters/{cloudVmCluster}. Please see + * {@see OracleDatabaseClient::cloudVmClusterName()} for help formatting this field. + * + * @return \Google\Cloud\OracleDatabase\V1\ListDbNodesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent value for database node in the following format: + * projects/{project}/locations/{location}/cloudVmClusters/{cloudVmCluster}. + * @type int $page_size + * Optional. The maximum number of items to return. + * If unspecified, at most 50 db nodes will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * @type string $page_token + * Optional. A token identifying a page of results the node should return. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Oracledatabase\V1\Oracledatabase::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent value for database node in the following format: + * projects/{project}/locations/{location}/cloudVmClusters/{cloudVmCluster}. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent value for database node in the following format: + * projects/{project}/locations/{location}/cloudVmClusters/{cloudVmCluster}. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The maximum number of items to return. + * If unspecified, at most 50 db nodes will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of items to return. + * If unspecified, at most 50 db nodes will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. A token identifying a page of results the node should return. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A token identifying a page of results the node should return. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListDbNodesResponse.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListDbNodesResponse.php new file mode 100644 index 000000000000..88f95f531ea8 --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListDbNodesResponse.php @@ -0,0 +1,101 @@ +google.cloud.oracledatabase.v1.ListDbNodesResponse + */ +class ListDbNodesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of DB Nodes + * + * Generated from protobuf field repeated .google.cloud.oracledatabase.v1.DbNode db_nodes = 1; + */ + private $db_nodes; + /** + * A token identifying a page of results the node should return. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\OracleDatabase\V1\DbNode>|\Google\Protobuf\Internal\RepeatedField $db_nodes + * The list of DB Nodes + * @type string $next_page_token + * A token identifying a page of results the node should return. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Oracledatabase\V1\Oracledatabase::initOnce(); + parent::__construct($data); + } + + /** + * The list of DB Nodes + * + * Generated from protobuf field repeated .google.cloud.oracledatabase.v1.DbNode db_nodes = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDbNodes() + { + return $this->db_nodes; + } + + /** + * The list of DB Nodes + * + * Generated from protobuf field repeated .google.cloud.oracledatabase.v1.DbNode db_nodes = 1; + * @param array<\Google\Cloud\OracleDatabase\V1\DbNode>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDbNodes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\OracleDatabase\V1\DbNode::class); + $this->db_nodes = $arr; + + return $this; + } + + /** + * A token identifying a page of results the node should return. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token identifying a page of results the node should return. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListDbServersRequest.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListDbServersRequest.php new file mode 100644 index 000000000000..18561a941cde --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListDbServersRequest.php @@ -0,0 +1,162 @@ +google.cloud.oracledatabase.v1.ListDbServersRequest + */ +class ListDbServersRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent value for database server in the following format: + * projects/{project}/locations/{location}/cloudExadataInfrastructures/{cloudExadataInfrastructure}. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of items to return. + * If unspecified, a maximum of 50 db servers will be returned. + * The maximum value is 1000; values above 1000 will be reset to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The parent value for database server in the following format: + * projects/{project}/locations/{location}/cloudExadataInfrastructures/{cloudExadataInfrastructure}. Please see + * {@see OracleDatabaseClient::cloudExadataInfrastructureName()} for help formatting this field. + * + * @return \Google\Cloud\OracleDatabase\V1\ListDbServersRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent value for database server in the following format: + * projects/{project}/locations/{location}/cloudExadataInfrastructures/{cloudExadataInfrastructure}. + * @type int $page_size + * Optional. The maximum number of items to return. + * If unspecified, a maximum of 50 db servers will be returned. + * The maximum value is 1000; values above 1000 will be reset to 1000. + * @type string $page_token + * Optional. A token identifying a page of results the server should return. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Oracledatabase\V1\Oracledatabase::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent value for database server in the following format: + * projects/{project}/locations/{location}/cloudExadataInfrastructures/{cloudExadataInfrastructure}. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent value for database server in the following format: + * projects/{project}/locations/{location}/cloudExadataInfrastructures/{cloudExadataInfrastructure}. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The maximum number of items to return. + * If unspecified, a maximum of 50 db servers will be returned. + * The maximum value is 1000; values above 1000 will be reset to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of items to return. + * If unspecified, a maximum of 50 db servers will be returned. + * The maximum value is 1000; values above 1000 will be reset to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListDbServersResponse.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListDbServersResponse.php new file mode 100644 index 000000000000..dbad0dea9b22 --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListDbServersResponse.php @@ -0,0 +1,101 @@ +google.cloud.oracledatabase.v1.ListDbServersResponse + */ +class ListDbServersResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of database servers. + * + * Generated from protobuf field repeated .google.cloud.oracledatabase.v1.DbServer db_servers = 1; + */ + private $db_servers; + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\OracleDatabase\V1\DbServer>|\Google\Protobuf\Internal\RepeatedField $db_servers + * The list of database servers. + * @type string $next_page_token + * A token identifying a page of results the server should return. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Oracledatabase\V1\Oracledatabase::initOnce(); + parent::__construct($data); + } + + /** + * The list of database servers. + * + * Generated from protobuf field repeated .google.cloud.oracledatabase.v1.DbServer db_servers = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDbServers() + { + return $this->db_servers; + } + + /** + * The list of database servers. + * + * Generated from protobuf field repeated .google.cloud.oracledatabase.v1.DbServer db_servers = 1; + * @param array<\Google\Cloud\OracleDatabase\V1\DbServer>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDbServers($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\OracleDatabase\V1\DbServer::class); + $this->db_servers = $arr; + + return $this; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListDbSystemShapesRequest.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListDbSystemShapesRequest.php new file mode 100644 index 000000000000..9c19cfa0fa24 --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListDbSystemShapesRequest.php @@ -0,0 +1,162 @@ +google.cloud.oracledatabase.v1.ListDbSystemShapesRequest + */ +class ListDbSystemShapesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent value for Database System Shapes in the following + * format: projects/{project}/locations/{location}. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of items to return. + * If unspecified, at most 50 database system shapes will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The parent value for Database System Shapes in the following + * format: projects/{project}/locations/{location}. Please see + * {@see OracleDatabaseClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\OracleDatabase\V1\ListDbSystemShapesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent value for Database System Shapes in the following + * format: projects/{project}/locations/{location}. + * @type int $page_size + * Optional. The maximum number of items to return. + * If unspecified, at most 50 database system shapes will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * @type string $page_token + * Optional. A token identifying a page of results the server should return. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Oracledatabase\V1\Oracledatabase::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent value for Database System Shapes in the following + * format: projects/{project}/locations/{location}. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent value for Database System Shapes in the following + * format: projects/{project}/locations/{location}. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The maximum number of items to return. + * If unspecified, at most 50 database system shapes will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of items to return. + * If unspecified, at most 50 database system shapes will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListDbSystemShapesResponse.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListDbSystemShapesResponse.php new file mode 100644 index 000000000000..550a89a04c2f --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListDbSystemShapesResponse.php @@ -0,0 +1,101 @@ +google.cloud.oracledatabase.v1.ListDbSystemShapesResponse + */ +class ListDbSystemShapesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of Database System shapes. + * + * Generated from protobuf field repeated .google.cloud.oracledatabase.v1.DbSystemShape db_system_shapes = 1; + */ + private $db_system_shapes; + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\OracleDatabase\V1\DbSystemShape>|\Google\Protobuf\Internal\RepeatedField $db_system_shapes + * The list of Database System shapes. + * @type string $next_page_token + * A token identifying a page of results the server should return. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Oracledatabase\V1\Oracledatabase::initOnce(); + parent::__construct($data); + } + + /** + * The list of Database System shapes. + * + * Generated from protobuf field repeated .google.cloud.oracledatabase.v1.DbSystemShape db_system_shapes = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDbSystemShapes() + { + return $this->db_system_shapes; + } + + /** + * The list of Database System shapes. + * + * Generated from protobuf field repeated .google.cloud.oracledatabase.v1.DbSystemShape db_system_shapes = 1; + * @param array<\Google\Cloud\OracleDatabase\V1\DbSystemShape>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDbSystemShapes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\OracleDatabase\V1\DbSystemShape::class); + $this->db_system_shapes = $arr; + + return $this; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListEntitlementsRequest.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListEntitlementsRequest.php new file mode 100644 index 000000000000..47ff2ed941d7 --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListEntitlementsRequest.php @@ -0,0 +1,162 @@ +google.cloud.oracledatabase.v1.ListEntitlementsRequest + */ +class ListEntitlementsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent value for the entitlement in the following format: + * projects/{project}/locations/{location}. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of items to return. + * If unspecified, a maximum of 50 entitlements will be returned. + * The maximum value is 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The parent value for the entitlement in the following format: + * projects/{project}/locations/{location}. Please see + * {@see OracleDatabaseClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\OracleDatabase\V1\ListEntitlementsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent value for the entitlement in the following format: + * projects/{project}/locations/{location}. + * @type int $page_size + * Optional. The maximum number of items to return. + * If unspecified, a maximum of 50 entitlements will be returned. + * The maximum value is 1000. + * @type string $page_token + * Optional. A token identifying a page of results the server should return. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Oracledatabase\V1\Oracledatabase::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent value for the entitlement in the following format: + * projects/{project}/locations/{location}. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent value for the entitlement in the following format: + * projects/{project}/locations/{location}. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The maximum number of items to return. + * If unspecified, a maximum of 50 entitlements will be returned. + * The maximum value is 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of items to return. + * If unspecified, a maximum of 50 entitlements will be returned. + * The maximum value is 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListEntitlementsResponse.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListEntitlementsResponse.php new file mode 100644 index 000000000000..d0c5b817d87c --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListEntitlementsResponse.php @@ -0,0 +1,101 @@ +google.cloud.oracledatabase.v1.ListEntitlementsResponse + */ +class ListEntitlementsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of Entitlements + * + * Generated from protobuf field repeated .google.cloud.oracledatabase.v1.Entitlement entitlements = 1; + */ + private $entitlements; + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\OracleDatabase\V1\Entitlement>|\Google\Protobuf\Internal\RepeatedField $entitlements + * The list of Entitlements + * @type string $next_page_token + * A token identifying a page of results the server should return. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Oracledatabase\V1\Oracledatabase::initOnce(); + parent::__construct($data); + } + + /** + * The list of Entitlements + * + * Generated from protobuf field repeated .google.cloud.oracledatabase.v1.Entitlement entitlements = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEntitlements() + { + return $this->entitlements; + } + + /** + * The list of Entitlements + * + * Generated from protobuf field repeated .google.cloud.oracledatabase.v1.Entitlement entitlements = 1; + * @param array<\Google\Cloud\OracleDatabase\V1\Entitlement>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEntitlements($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\OracleDatabase\V1\Entitlement::class); + $this->entitlements = $arr; + + return $this; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListGiVersionsRequest.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListGiVersionsRequest.php new file mode 100644 index 000000000000..05e7af358083 --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListGiVersionsRequest.php @@ -0,0 +1,166 @@ +google.cloud.oracledatabase.v1.ListGiVersionsRequest + */ +class ListGiVersionsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent value for Grid Infrastructure Version in the following + * format: Format: projects/{project}/locations/{location}. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of items to return. + * If unspecified, a maximum of 50 Oracle Grid Infrastructure (GI) versions + * will be returned. The maximum value is 1000; values above 1000 will be + * reset to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The parent value for Grid Infrastructure Version in the following + * format: Format: projects/{project}/locations/{location}. Please see + * {@see OracleDatabaseClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\OracleDatabase\V1\ListGiVersionsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent value for Grid Infrastructure Version in the following + * format: Format: projects/{project}/locations/{location}. + * @type int $page_size + * Optional. The maximum number of items to return. + * If unspecified, a maximum of 50 Oracle Grid Infrastructure (GI) versions + * will be returned. The maximum value is 1000; values above 1000 will be + * reset to 1000. + * @type string $page_token + * Optional. A token identifying a page of results the server should return. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Oracledatabase\V1\Oracledatabase::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent value for Grid Infrastructure Version in the following + * format: Format: projects/{project}/locations/{location}. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent value for Grid Infrastructure Version in the following + * format: Format: projects/{project}/locations/{location}. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The maximum number of items to return. + * If unspecified, a maximum of 50 Oracle Grid Infrastructure (GI) versions + * will be returned. The maximum value is 1000; values above 1000 will be + * reset to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of items to return. + * If unspecified, a maximum of 50 Oracle Grid Infrastructure (GI) versions + * will be returned. The maximum value is 1000; values above 1000 will be + * reset to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListGiVersionsResponse.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListGiVersionsResponse.php new file mode 100644 index 000000000000..6f80f31c0455 --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListGiVersionsResponse.php @@ -0,0 +1,101 @@ +google.cloud.oracledatabase.v1.ListGiVersionsResponse + */ +class ListGiVersionsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of Oracle Grid Infrastructure (GI) versions. + * + * Generated from protobuf field repeated .google.cloud.oracledatabase.v1.GiVersion gi_versions = 1; + */ + private $gi_versions; + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\OracleDatabase\V1\GiVersion>|\Google\Protobuf\Internal\RepeatedField $gi_versions + * The list of Oracle Grid Infrastructure (GI) versions. + * @type string $next_page_token + * A token identifying a page of results the server should return. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Oracledatabase\V1\Oracledatabase::initOnce(); + parent::__construct($data); + } + + /** + * The list of Oracle Grid Infrastructure (GI) versions. + * + * Generated from protobuf field repeated .google.cloud.oracledatabase.v1.GiVersion gi_versions = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getGiVersions() + { + return $this->gi_versions; + } + + /** + * The list of Oracle Grid Infrastructure (GI) versions. + * + * Generated from protobuf field repeated .google.cloud.oracledatabase.v1.GiVersion gi_versions = 1; + * @param array<\Google\Cloud\OracleDatabase\V1\GiVersion>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setGiVersions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\OracleDatabase\V1\GiVersion::class); + $this->gi_versions = $arr; + + return $this; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/LocationMetadata.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/LocationMetadata.php new file mode 100644 index 000000000000..d843ad111c9a --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/LocationMetadata.php @@ -0,0 +1,67 @@ +google.cloud.oracledatabase.v1.LocationMetadata + */ +class LocationMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Google Cloud Platform Oracle zones in a location. + * + * Generated from protobuf field repeated string gcp_oracle_zones = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $gcp_oracle_zones; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $gcp_oracle_zones + * Output only. Google Cloud Platform Oracle zones in a location. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Oracledatabase\V1\LocationMetadata::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Google Cloud Platform Oracle zones in a location. + * + * Generated from protobuf field repeated string gcp_oracle_zones = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getGcpOracleZones() + { + return $this->gcp_oracle_zones; + } + + /** + * Output only. Google Cloud Platform Oracle zones in a location. + * + * Generated from protobuf field repeated string gcp_oracle_zones = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setGcpOracleZones($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->gcp_oracle_zones = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/MaintenanceWindow.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/MaintenanceWindow.php new file mode 100644 index 000000000000..0eff7f6bc701 --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/MaintenanceWindow.php @@ -0,0 +1,404 @@ +google.cloud.oracledatabase.v1.MaintenanceWindow + */ +class MaintenanceWindow extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The maintenance window scheduling preference. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.MaintenanceWindow.MaintenanceWindowPreference preference = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $preference = 0; + /** + * Optional. Months during the year when maintenance should be performed. + * + * Generated from protobuf field repeated .google.type.Month months = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $months; + /** + * Optional. Weeks during the month when maintenance should be performed. + * Weeks start on the 1st, 8th, 15th, and 22nd days of the month, and have a + * duration of 7 days. Weeks start and end based on calendar dates, not days + * of the week. + * + * Generated from protobuf field repeated int32 weeks_of_month = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $weeks_of_month; + /** + * Optional. Days during the week when maintenance should be performed. + * + * Generated from protobuf field repeated .google.type.DayOfWeek days_of_week = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $days_of_week; + /** + * Optional. The window of hours during the day when maintenance should be + * performed. The window is a 4 hour slot. Valid values are: + * 0 - represents time slot 0:00 - 3:59 UTC + * 4 - represents time slot 4:00 - 7:59 UTC + * 8 - represents time slot 8:00 - 11:59 UTC + * 12 - represents time slot 12:00 - 15:59 UTC + * 16 - represents time slot 16:00 - 19:59 UTC + * 20 - represents time slot 20:00 - 23:59 UTC + * + * Generated from protobuf field repeated int32 hours_of_day = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $hours_of_day; + /** + * Optional. Lead time window allows user to set a lead time to prepare for a + * down time. The lead time is in weeks and valid value is between 1 to 4. + * + * Generated from protobuf field int32 lead_time_week = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $lead_time_week = 0; + /** + * Optional. Cloud CloudExadataInfrastructure node patching method, either + * "ROLLING" + * or "NONROLLING". Default value is ROLLING. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.MaintenanceWindow.PatchingMode patching_mode = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $patching_mode = 0; + /** + * Optional. Determines the amount of time the system will wait before the + * start of each database server patching operation. Custom action timeout is + * in minutes and valid value is between 15 to 120 (inclusive). + * + * Generated from protobuf field int32 custom_action_timeout_mins = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $custom_action_timeout_mins = 0; + /** + * Optional. If true, enables the configuration of a custom action timeout + * (waiting period) between database server patching operations. + * + * Generated from protobuf field bool is_custom_action_timeout_enabled = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $is_custom_action_timeout_enabled = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $preference + * Optional. The maintenance window scheduling preference. + * @type array|\Google\Protobuf\Internal\RepeatedField $months + * Optional. Months during the year when maintenance should be performed. + * @type array|\Google\Protobuf\Internal\RepeatedField $weeks_of_month + * Optional. Weeks during the month when maintenance should be performed. + * Weeks start on the 1st, 8th, 15th, and 22nd days of the month, and have a + * duration of 7 days. Weeks start and end based on calendar dates, not days + * of the week. + * @type array|\Google\Protobuf\Internal\RepeatedField $days_of_week + * Optional. Days during the week when maintenance should be performed. + * @type array|\Google\Protobuf\Internal\RepeatedField $hours_of_day + * Optional. The window of hours during the day when maintenance should be + * performed. The window is a 4 hour slot. Valid values are: + * 0 - represents time slot 0:00 - 3:59 UTC + * 4 - represents time slot 4:00 - 7:59 UTC + * 8 - represents time slot 8:00 - 11:59 UTC + * 12 - represents time slot 12:00 - 15:59 UTC + * 16 - represents time slot 16:00 - 19:59 UTC + * 20 - represents time slot 20:00 - 23:59 UTC + * @type int $lead_time_week + * Optional. Lead time window allows user to set a lead time to prepare for a + * down time. The lead time is in weeks and valid value is between 1 to 4. + * @type int $patching_mode + * Optional. Cloud CloudExadataInfrastructure node patching method, either + * "ROLLING" + * or "NONROLLING". Default value is ROLLING. + * @type int $custom_action_timeout_mins + * Optional. Determines the amount of time the system will wait before the + * start of each database server patching operation. Custom action timeout is + * in minutes and valid value is between 15 to 120 (inclusive). + * @type bool $is_custom_action_timeout_enabled + * Optional. If true, enables the configuration of a custom action timeout + * (waiting period) between database server patching operations. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Oracledatabase\V1\ExadataInfra::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The maintenance window scheduling preference. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.MaintenanceWindow.MaintenanceWindowPreference preference = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPreference() + { + return $this->preference; + } + + /** + * Optional. The maintenance window scheduling preference. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.MaintenanceWindow.MaintenanceWindowPreference preference = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPreference($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\OracleDatabase\V1\MaintenanceWindow\MaintenanceWindowPreference::class); + $this->preference = $var; + + return $this; + } + + /** + * Optional. Months during the year when maintenance should be performed. + * + * Generated from protobuf field repeated .google.type.Month months = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMonths() + { + return $this->months; + } + + /** + * Optional. Months during the year when maintenance should be performed. + * + * Generated from protobuf field repeated .google.type.Month months = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMonths($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Type\Month::class); + $this->months = $arr; + + return $this; + } + + /** + * Optional. Weeks during the month when maintenance should be performed. + * Weeks start on the 1st, 8th, 15th, and 22nd days of the month, and have a + * duration of 7 days. Weeks start and end based on calendar dates, not days + * of the week. + * + * Generated from protobuf field repeated int32 weeks_of_month = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getWeeksOfMonth() + { + return $this->weeks_of_month; + } + + /** + * Optional. Weeks during the month when maintenance should be performed. + * Weeks start on the 1st, 8th, 15th, and 22nd days of the month, and have a + * duration of 7 days. Weeks start and end based on calendar dates, not days + * of the week. + * + * Generated from protobuf field repeated int32 weeks_of_month = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setWeeksOfMonth($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); + $this->weeks_of_month = $arr; + + return $this; + } + + /** + * Optional. Days during the week when maintenance should be performed. + * + * Generated from protobuf field repeated .google.type.DayOfWeek days_of_week = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDaysOfWeek() + { + return $this->days_of_week; + } + + /** + * Optional. Days during the week when maintenance should be performed. + * + * Generated from protobuf field repeated .google.type.DayOfWeek days_of_week = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDaysOfWeek($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Type\DayOfWeek::class); + $this->days_of_week = $arr; + + return $this; + } + + /** + * Optional. The window of hours during the day when maintenance should be + * performed. The window is a 4 hour slot. Valid values are: + * 0 - represents time slot 0:00 - 3:59 UTC + * 4 - represents time slot 4:00 - 7:59 UTC + * 8 - represents time slot 8:00 - 11:59 UTC + * 12 - represents time slot 12:00 - 15:59 UTC + * 16 - represents time slot 16:00 - 19:59 UTC + * 20 - represents time slot 20:00 - 23:59 UTC + * + * Generated from protobuf field repeated int32 hours_of_day = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getHoursOfDay() + { + return $this->hours_of_day; + } + + /** + * Optional. The window of hours during the day when maintenance should be + * performed. The window is a 4 hour slot. Valid values are: + * 0 - represents time slot 0:00 - 3:59 UTC + * 4 - represents time slot 4:00 - 7:59 UTC + * 8 - represents time slot 8:00 - 11:59 UTC + * 12 - represents time slot 12:00 - 15:59 UTC + * 16 - represents time slot 16:00 - 19:59 UTC + * 20 - represents time slot 20:00 - 23:59 UTC + * + * Generated from protobuf field repeated int32 hours_of_day = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setHoursOfDay($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); + $this->hours_of_day = $arr; + + return $this; + } + + /** + * Optional. Lead time window allows user to set a lead time to prepare for a + * down time. The lead time is in weeks and valid value is between 1 to 4. + * + * Generated from protobuf field int32 lead_time_week = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getLeadTimeWeek() + { + return $this->lead_time_week; + } + + /** + * Optional. Lead time window allows user to set a lead time to prepare for a + * down time. The lead time is in weeks and valid value is between 1 to 4. + * + * Generated from protobuf field int32 lead_time_week = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setLeadTimeWeek($var) + { + GPBUtil::checkInt32($var); + $this->lead_time_week = $var; + + return $this; + } + + /** + * Optional. Cloud CloudExadataInfrastructure node patching method, either + * "ROLLING" + * or "NONROLLING". Default value is ROLLING. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.MaintenanceWindow.PatchingMode patching_mode = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPatchingMode() + { + return $this->patching_mode; + } + + /** + * Optional. Cloud CloudExadataInfrastructure node patching method, either + * "ROLLING" + * or "NONROLLING". Default value is ROLLING. + * + * Generated from protobuf field .google.cloud.oracledatabase.v1.MaintenanceWindow.PatchingMode patching_mode = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPatchingMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\OracleDatabase\V1\MaintenanceWindow\PatchingMode::class); + $this->patching_mode = $var; + + return $this; + } + + /** + * Optional. Determines the amount of time the system will wait before the + * start of each database server patching operation. Custom action timeout is + * in minutes and valid value is between 15 to 120 (inclusive). + * + * Generated from protobuf field int32 custom_action_timeout_mins = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getCustomActionTimeoutMins() + { + return $this->custom_action_timeout_mins; + } + + /** + * Optional. Determines the amount of time the system will wait before the + * start of each database server patching operation. Custom action timeout is + * in minutes and valid value is between 15 to 120 (inclusive). + * + * Generated from protobuf field int32 custom_action_timeout_mins = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setCustomActionTimeoutMins($var) + { + GPBUtil::checkInt32($var); + $this->custom_action_timeout_mins = $var; + + return $this; + } + + /** + * Optional. If true, enables the configuration of a custom action timeout + * (waiting period) between database server patching operations. + * + * Generated from protobuf field bool is_custom_action_timeout_enabled = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getIsCustomActionTimeoutEnabled() + { + return $this->is_custom_action_timeout_enabled; + } + + /** + * Optional. If true, enables the configuration of a custom action timeout + * (waiting period) between database server patching operations. + * + * Generated from protobuf field bool is_custom_action_timeout_enabled = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setIsCustomActionTimeoutEnabled($var) + { + GPBUtil::checkBool($var); + $this->is_custom_action_timeout_enabled = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/MaintenanceWindow/MaintenanceWindowPreference.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/MaintenanceWindow/MaintenanceWindowPreference.php new file mode 100644 index 000000000000..b191c6814368 --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/MaintenanceWindow/MaintenanceWindowPreference.php @@ -0,0 +1,64 @@ +google.cloud.oracledatabase.v1.MaintenanceWindow.MaintenanceWindowPreference + */ +class MaintenanceWindowPreference +{ + /** + * Default unspecified value. + * + * Generated from protobuf enum MAINTENANCE_WINDOW_PREFERENCE_UNSPECIFIED = 0; + */ + const MAINTENANCE_WINDOW_PREFERENCE_UNSPECIFIED = 0; + /** + * Custom preference. + * + * Generated from protobuf enum CUSTOM_PREFERENCE = 1; + */ + const CUSTOM_PREFERENCE = 1; + /** + * No preference. + * + * Generated from protobuf enum NO_PREFERENCE = 2; + */ + const NO_PREFERENCE = 2; + + private static $valueToName = [ + self::MAINTENANCE_WINDOW_PREFERENCE_UNSPECIFIED => 'MAINTENANCE_WINDOW_PREFERENCE_UNSPECIFIED', + self::CUSTOM_PREFERENCE => 'CUSTOM_PREFERENCE', + self::NO_PREFERENCE => 'NO_PREFERENCE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(MaintenanceWindowPreference::class, \Google\Cloud\OracleDatabase\V1\MaintenanceWindow_MaintenanceWindowPreference::class); + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/MaintenanceWindow/PatchingMode.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/MaintenanceWindow/PatchingMode.php new file mode 100644 index 000000000000..862cc6250890 --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/MaintenanceWindow/PatchingMode.php @@ -0,0 +1,65 @@ +google.cloud.oracledatabase.v1.MaintenanceWindow.PatchingMode + */ +class PatchingMode +{ + /** + * Default unspecified value. + * + * Generated from protobuf enum PATCHING_MODE_UNSPECIFIED = 0; + */ + const PATCHING_MODE_UNSPECIFIED = 0; + /** + * Updates the Cloud Exadata database server hosts in a rolling fashion. + * + * Generated from protobuf enum ROLLING = 1; + */ + const ROLLING = 1; + /** + * The non-rolling maintenance method first updates your storage servers at + * the same time, then your database servers at the same time. + * + * Generated from protobuf enum NON_ROLLING = 2; + */ + const NON_ROLLING = 2; + + private static $valueToName = [ + self::PATCHING_MODE_UNSPECIFIED => 'PATCHING_MODE_UNSPECIFIED', + self::ROLLING => 'ROLLING', + self::NON_ROLLING => 'NON_ROLLING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(PatchingMode::class, \Google\Cloud\OracleDatabase\V1\MaintenanceWindow_PatchingMode::class); + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/OperationMetadata.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/OperationMetadata.php new file mode 100644 index 000000000000..d170cd2d8f0a --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/OperationMetadata.php @@ -0,0 +1,345 @@ +google.cloud.oracledatabase.v1.OperationMetadata + */ +class OperationMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $end_time = null; + /** + * Output only. Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $target = ''; + /** + * Output only. Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $verb = ''; + /** + * Output only. The status of the operation. + * + * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $status_message = ''; + /** + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have been cancelled successfully + * have [Operation.error][] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`. + * + * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $requested_cancellation = false; + /** + * Output only. API version used to start the operation. + * + * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $api_version = ''; + /** + * Output only. An estimated percentage of the operation that has been + * completed at a given moment of time, between 0 and 100. + * + * Generated from protobuf field double percent_complete = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $percent_complete = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time the operation was created. + * @type \Google\Protobuf\Timestamp $end_time + * Output only. The time the operation finished running. + * @type string $target + * Output only. Server-defined resource path for the target of the operation. + * @type string $verb + * Output only. Name of the verb executed by the operation. + * @type string $status_message + * Output only. The status of the operation. + * @type bool $requested_cancellation + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have been cancelled successfully + * have [Operation.error][] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`. + * @type string $api_version + * Output only. API version used to start the operation. + * @type float $percent_complete + * Output only. An estimated percentage of the operation that has been + * completed at a given moment of time, between 0 and 100. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Oracledatabase\V1\Oracledatabase::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEndTime() + { + return $this->end_time; + } + + public function hasEndTime() + { + return isset($this->end_time); + } + + public function clearEndTime() + { + unset($this->end_time); + } + + /** + * Output only. The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * Output only. Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getTarget() + { + return $this->target; + } + + /** + * Output only. Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setTarget($var) + { + GPBUtil::checkString($var, True); + $this->target = $var; + + return $this; + } + + /** + * Output only. Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getVerb() + { + return $this->verb; + } + + /** + * Output only. Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setVerb($var) + { + GPBUtil::checkString($var, True); + $this->verb = $var; + + return $this; + } + + /** + * Output only. The status of the operation. + * + * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getStatusMessage() + { + return $this->status_message; + } + + /** + * Output only. The status of the operation. + * + * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setStatusMessage($var) + { + GPBUtil::checkString($var, True); + $this->status_message = $var; + + return $this; + } + + /** + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have been cancelled successfully + * have [Operation.error][] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`. + * + * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getRequestedCancellation() + { + return $this->requested_cancellation; + } + + /** + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have been cancelled successfully + * have [Operation.error][] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`. + * + * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setRequestedCancellation($var) + { + GPBUtil::checkBool($var); + $this->requested_cancellation = $var; + + return $this; + } + + /** + * Output only. API version used to start the operation. + * + * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getApiVersion() + { + return $this->api_version; + } + + /** + * Output only. API version used to start the operation. + * + * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setApiVersion($var) + { + GPBUtil::checkString($var, True); + $this->api_version = $var; + + return $this; + } + + /** + * Output only. An estimated percentage of the operation that has been + * completed at a given moment of time, between 0 and 100. + * + * Generated from protobuf field double percent_complete = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return float + */ + public function getPercentComplete() + { + return $this->percent_complete; + } + + /** + * Output only. An estimated percentage of the operation that has been + * completed at a given moment of time, between 0 and 100. + * + * Generated from protobuf field double percent_complete = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param float $var + * @return $this + */ + public function setPercentComplete($var) + { + GPBUtil::checkDouble($var); + $this->percent_complete = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/OperationsInsightsState.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/OperationsInsightsState.php new file mode 100644 index 000000000000..7dc7914c8613 --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/OperationsInsightsState.php @@ -0,0 +1,89 @@ +google.cloud.oracledatabase.v1.OperationsInsightsState + */ +class OperationsInsightsState +{ + /** + * Default unspecified value. + * + * Generated from protobuf enum OPERATIONS_INSIGHTS_STATE_UNSPECIFIED = 0; + */ + const OPERATIONS_INSIGHTS_STATE_UNSPECIFIED = 0; + /** + * Enabling status for operation insights. + * + * Generated from protobuf enum ENABLING = 1; + */ + const ENABLING = 1; + /** + * Enabled status for operation insights. + * + * Generated from protobuf enum ENABLED = 2; + */ + const ENABLED = 2; + /** + * Disabling status for operation insights. + * + * Generated from protobuf enum DISABLING = 3; + */ + const DISABLING = 3; + /** + * Not Enabled status for operation insights. + * + * Generated from protobuf enum NOT_ENABLED = 4; + */ + const NOT_ENABLED = 4; + /** + * Failed enabling status for operation insights. + * + * Generated from protobuf enum FAILED_ENABLING = 5; + */ + const FAILED_ENABLING = 5; + /** + * Failed disabling status for operation insights. + * + * Generated from protobuf enum FAILED_DISABLING = 6; + */ + const FAILED_DISABLING = 6; + + private static $valueToName = [ + self::OPERATIONS_INSIGHTS_STATE_UNSPECIFIED => 'OPERATIONS_INSIGHTS_STATE_UNSPECIFIED', + self::ENABLING => 'ENABLING', + self::ENABLED => 'ENABLED', + self::DISABLING => 'DISABLING', + self::NOT_ENABLED => 'NOT_ENABLED', + self::FAILED_ENABLING => 'FAILED_ENABLING', + self::FAILED_DISABLING => 'FAILED_DISABLING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/RestoreAutonomousDatabaseRequest.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/RestoreAutonomousDatabaseRequest.php new file mode 100644 index 000000000000..42a50fa6066e --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/RestoreAutonomousDatabaseRequest.php @@ -0,0 +1,132 @@ +google.cloud.oracledatabase.v1.RestoreAutonomousDatabaseRequest + */ +class RestoreAutonomousDatabaseRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the Autonomous Database in the following format: + * projects/{project}/locations/{location}/autonomousDatabases/{autonomous_database}. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. The time and date to restore the database to. + * + * Generated from protobuf field .google.protobuf.Timestamp restore_time = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $restore_time = null; + + /** + * @param string $name Required. The name of the Autonomous Database in the following format: + * projects/{project}/locations/{location}/autonomousDatabases/{autonomous_database}. Please see + * {@see OracleDatabaseClient::autonomousDatabaseName()} for help formatting this field. + * @param \Google\Protobuf\Timestamp $restoreTime Required. The time and date to restore the database to. + * + * @return \Google\Cloud\OracleDatabase\V1\RestoreAutonomousDatabaseRequest + * + * @experimental + */ + public static function build(string $name, \Google\Protobuf\Timestamp $restoreTime): self + { + return (new self()) + ->setName($name) + ->setRestoreTime($restoreTime); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the Autonomous Database in the following format: + * projects/{project}/locations/{location}/autonomousDatabases/{autonomous_database}. + * @type \Google\Protobuf\Timestamp $restore_time + * Required. The time and date to restore the database to. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Oracledatabase\V1\Oracledatabase::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the Autonomous Database in the following format: + * projects/{project}/locations/{location}/autonomousDatabases/{autonomous_database}. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the Autonomous Database in the following format: + * projects/{project}/locations/{location}/autonomousDatabases/{autonomous_database}. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. The time and date to restore the database to. + * + * Generated from protobuf field .google.protobuf.Timestamp restore_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getRestoreTime() + { + return $this->restore_time; + } + + public function hasRestoreTime() + { + return isset($this->restore_time); + } + + public function clearRestoreTime() + { + unset($this->restore_time); + } + + /** + * Required. The time and date to restore the database to. + * + * Generated from protobuf field .google.protobuf.Timestamp restore_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setRestoreTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->restore_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ScheduledOperationDetails.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ScheduledOperationDetails.php new file mode 100644 index 000000000000..47023e1d5ec0 --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ScheduledOperationDetails.php @@ -0,0 +1,156 @@ +google.cloud.oracledatabase.v1.ScheduledOperationDetails + */ +class ScheduledOperationDetails extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Day of week. + * + * Generated from protobuf field .google.type.DayOfWeek day_of_week = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $day_of_week = 0; + /** + * Output only. Auto start time. + * + * Generated from protobuf field .google.type.TimeOfDay start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $start_time = null; + /** + * Output only. Auto stop time. + * + * Generated from protobuf field .google.type.TimeOfDay stop_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $stop_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $day_of_week + * Output only. Day of week. + * @type \Google\Type\TimeOfDay $start_time + * Output only. Auto start time. + * @type \Google\Type\TimeOfDay $stop_time + * Output only. Auto stop time. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Oracledatabase\V1\AutonomousDatabase::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Day of week. + * + * Generated from protobuf field .google.type.DayOfWeek day_of_week = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getDayOfWeek() + { + return $this->day_of_week; + } + + /** + * Output only. Day of week. + * + * Generated from protobuf field .google.type.DayOfWeek day_of_week = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setDayOfWeek($var) + { + GPBUtil::checkEnum($var, \Google\Type\DayOfWeek::class); + $this->day_of_week = $var; + + return $this; + } + + /** + * Output only. Auto start time. + * + * Generated from protobuf field .google.type.TimeOfDay start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Type\TimeOfDay|null + */ + public function getStartTime() + { + return $this->start_time; + } + + public function hasStartTime() + { + return isset($this->start_time); + } + + public function clearStartTime() + { + unset($this->start_time); + } + + /** + * Output only. Auto start time. + * + * Generated from protobuf field .google.type.TimeOfDay start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Type\TimeOfDay $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Type\TimeOfDay::class); + $this->start_time = $var; + + return $this; + } + + /** + * Output only. Auto stop time. + * + * Generated from protobuf field .google.type.TimeOfDay stop_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Type\TimeOfDay|null + */ + public function getStopTime() + { + return $this->stop_time; + } + + public function hasStopTime() + { + return isset($this->stop_time); + } + + public function clearStopTime() + { + unset($this->stop_time); + } + + /** + * Output only. Auto stop time. + * + * Generated from protobuf field .google.type.TimeOfDay stop_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Type\TimeOfDay $var + * @return $this + */ + public function setStopTime($var) + { + GPBUtil::checkMessage($var, \Google\Type\TimeOfDay::class); + $this->stop_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/State.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/State.php new file mode 100644 index 000000000000..a66420d3d463 --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/State.php @@ -0,0 +1,195 @@ +google.cloud.oracledatabase.v1.State + */ +class State +{ + /** + * Default unspecified value. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Indicates that the Autonomous Database is in provisioning state. + * + * Generated from protobuf enum PROVISIONING = 1; + */ + const PROVISIONING = 1; + /** + * Indicates that the Autonomous Database is in available state. + * + * Generated from protobuf enum AVAILABLE = 2; + */ + const AVAILABLE = 2; + /** + * Indicates that the Autonomous Database is in stopping state. + * + * Generated from protobuf enum STOPPING = 3; + */ + const STOPPING = 3; + /** + * Indicates that the Autonomous Database is in stopped state. + * + * Generated from protobuf enum STOPPED = 4; + */ + const STOPPED = 4; + /** + * Indicates that the Autonomous Database is in starting state. + * + * Generated from protobuf enum STARTING = 5; + */ + const STARTING = 5; + /** + * Indicates that the Autonomous Database is in terminating state. + * + * Generated from protobuf enum TERMINATING = 6; + */ + const TERMINATING = 6; + /** + * Indicates that the Autonomous Database is in terminated state. + * + * Generated from protobuf enum TERMINATED = 7; + */ + const TERMINATED = 7; + /** + * Indicates that the Autonomous Database is in unavailable state. + * + * Generated from protobuf enum UNAVAILABLE = 8; + */ + const UNAVAILABLE = 8; + /** + * Indicates that the Autonomous Database restore is in progress. + * + * Generated from protobuf enum RESTORE_IN_PROGRESS = 9; + */ + const RESTORE_IN_PROGRESS = 9; + /** + * Indicates that the Autonomous Database failed to restore. + * + * Generated from protobuf enum RESTORE_FAILED = 10; + */ + const RESTORE_FAILED = 10; + /** + * Indicates that the Autonomous Database backup is in progress. + * + * Generated from protobuf enum BACKUP_IN_PROGRESS = 11; + */ + const BACKUP_IN_PROGRESS = 11; + /** + * Indicates that the Autonomous Database scale is in progress. + * + * Generated from protobuf enum SCALE_IN_PROGRESS = 12; + */ + const SCALE_IN_PROGRESS = 12; + /** + * Indicates that the Autonomous Database is available but needs attention + * state. + * + * Generated from protobuf enum AVAILABLE_NEEDS_ATTENTION = 13; + */ + const AVAILABLE_NEEDS_ATTENTION = 13; + /** + * Indicates that the Autonomous Database is in updating state. + * + * Generated from protobuf enum UPDATING = 14; + */ + const UPDATING = 14; + /** + * Indicates that the Autonomous Database's maintenance is in progress state. + * + * Generated from protobuf enum MAINTENANCE_IN_PROGRESS = 15; + */ + const MAINTENANCE_IN_PROGRESS = 15; + /** + * Indicates that the Autonomous Database is in restarting state. + * + * Generated from protobuf enum RESTARTING = 16; + */ + const RESTARTING = 16; + /** + * Indicates that the Autonomous Database is in recreating state. + * + * Generated from protobuf enum RECREATING = 17; + */ + const RECREATING = 17; + /** + * Indicates that the Autonomous Database's role change is in progress state. + * + * Generated from protobuf enum ROLE_CHANGE_IN_PROGRESS = 18; + */ + const ROLE_CHANGE_IN_PROGRESS = 18; + /** + * Indicates that the Autonomous Database is in upgrading state. + * + * Generated from protobuf enum UPGRADING = 19; + */ + const UPGRADING = 19; + /** + * Indicates that the Autonomous Database is in inaccessible state. + * + * Generated from protobuf enum INACCESSIBLE = 20; + */ + const INACCESSIBLE = 20; + /** + * Indicates that the Autonomous Database is in standby state. + * + * Generated from protobuf enum STANDBY = 21; + */ + const STANDBY = 21; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::PROVISIONING => 'PROVISIONING', + self::AVAILABLE => 'AVAILABLE', + self::STOPPING => 'STOPPING', + self::STOPPED => 'STOPPED', + self::STARTING => 'STARTING', + self::TERMINATING => 'TERMINATING', + self::TERMINATED => 'TERMINATED', + self::UNAVAILABLE => 'UNAVAILABLE', + self::RESTORE_IN_PROGRESS => 'RESTORE_IN_PROGRESS', + self::RESTORE_FAILED => 'RESTORE_FAILED', + self::BACKUP_IN_PROGRESS => 'BACKUP_IN_PROGRESS', + self::SCALE_IN_PROGRESS => 'SCALE_IN_PROGRESS', + self::AVAILABLE_NEEDS_ATTENTION => 'AVAILABLE_NEEDS_ATTENTION', + self::UPDATING => 'UPDATING', + self::MAINTENANCE_IN_PROGRESS => 'MAINTENANCE_IN_PROGRESS', + self::RESTARTING => 'RESTARTING', + self::RECREATING => 'RECREATING', + self::ROLE_CHANGE_IN_PROGRESS => 'ROLE_CHANGE_IN_PROGRESS', + self::UPGRADING => 'UPGRADING', + self::INACCESSIBLE => 'INACCESSIBLE', + self::STANDBY => 'STANDBY', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/create_autonomous_database.php b/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/create_autonomous_database.php new file mode 100644 index 000000000000..f74530e4c64d --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/create_autonomous_database.php @@ -0,0 +1,109 @@ +setNetwork($formattedAutonomousDatabaseNetwork) + ->setCidr($autonomousDatabaseCidr); + $request = (new CreateAutonomousDatabaseRequest()) + ->setParent($formattedParent) + ->setAutonomousDatabaseId($autonomousDatabaseId) + ->setAutonomousDatabase($autonomousDatabase); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $oracleDatabaseClient->createAutonomousDatabase($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var AutonomousDatabase $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = OracleDatabaseClient::locationName('[PROJECT]', '[LOCATION]'); + $autonomousDatabaseId = '[AUTONOMOUS_DATABASE_ID]'; + $formattedAutonomousDatabaseNetwork = OracleDatabaseClient::networkName('[PROJECT]', '[NETWORK]'); + $autonomousDatabaseCidr = '[CIDR]'; + + create_autonomous_database_sample( + $formattedParent, + $autonomousDatabaseId, + $formattedAutonomousDatabaseNetwork, + $autonomousDatabaseCidr + ); +} +// [END oracledatabase_v1_generated_OracleDatabase_CreateAutonomousDatabase_sync] diff --git a/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/create_cloud_exadata_infrastructure.php b/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/create_cloud_exadata_infrastructure.php new file mode 100644 index 000000000000..7c933aeb610f --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/create_cloud_exadata_infrastructure.php @@ -0,0 +1,94 @@ +setParent($formattedParent) + ->setCloudExadataInfrastructureId($cloudExadataInfrastructureId) + ->setCloudExadataInfrastructure($cloudExadataInfrastructure); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $oracleDatabaseClient->createCloudExadataInfrastructure($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var CloudExadataInfrastructure $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = OracleDatabaseClient::locationName('[PROJECT]', '[LOCATION]'); + $cloudExadataInfrastructureId = '[CLOUD_EXADATA_INFRASTRUCTURE_ID]'; + + create_cloud_exadata_infrastructure_sample($formattedParent, $cloudExadataInfrastructureId); +} +// [END oracledatabase_v1_generated_OracleDatabase_CreateCloudExadataInfrastructure_sync] diff --git a/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/create_cloud_vm_cluster.php b/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/create_cloud_vm_cluster.php new file mode 100644 index 000000000000..948ffd02e119 --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/create_cloud_vm_cluster.php @@ -0,0 +1,126 @@ +setExadataInfrastructure($formattedCloudVmClusterExadataInfrastructure) + ->setCidr($cloudVmClusterCidr) + ->setBackupSubnetCidr($cloudVmClusterBackupSubnetCidr) + ->setNetwork($formattedCloudVmClusterNetwork); + $request = (new CreateCloudVmClusterRequest()) + ->setParent($formattedParent) + ->setCloudVmClusterId($cloudVmClusterId) + ->setCloudVmCluster($cloudVmCluster); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $oracleDatabaseClient->createCloudVmCluster($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var CloudVmCluster $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = OracleDatabaseClient::locationName('[PROJECT]', '[LOCATION]'); + $cloudVmClusterId = '[CLOUD_VM_CLUSTER_ID]'; + $formattedCloudVmClusterExadataInfrastructure = OracleDatabaseClient::cloudExadataInfrastructureName( + '[PROJECT]', + '[LOCATION]', + '[CLOUD_EXADATA_INFRASTRUCTURE]' + ); + $cloudVmClusterCidr = '[CIDR]'; + $cloudVmClusterBackupSubnetCidr = '[BACKUP_SUBNET_CIDR]'; + $formattedCloudVmClusterNetwork = OracleDatabaseClient::networkName('[PROJECT]', '[NETWORK]'); + + create_cloud_vm_cluster_sample( + $formattedParent, + $cloudVmClusterId, + $formattedCloudVmClusterExadataInfrastructure, + $cloudVmClusterCidr, + $cloudVmClusterBackupSubnetCidr, + $formattedCloudVmClusterNetwork + ); +} +// [END oracledatabase_v1_generated_OracleDatabase_CreateCloudVmCluster_sync] diff --git a/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/delete_autonomous_database.php b/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/delete_autonomous_database.php new file mode 100644 index 000000000000..640fdef87a17 --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/delete_autonomous_database.php @@ -0,0 +1,85 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $oracleDatabaseClient->deleteAutonomousDatabase($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = OracleDatabaseClient::autonomousDatabaseName( + '[PROJECT]', + '[LOCATION]', + '[AUTONOMOUS_DATABASE]' + ); + + delete_autonomous_database_sample($formattedName); +} +// [END oracledatabase_v1_generated_OracleDatabase_DeleteAutonomousDatabase_sync] diff --git a/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/delete_cloud_exadata_infrastructure.php b/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/delete_cloud_exadata_infrastructure.php new file mode 100644 index 000000000000..390896e787e6 --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/delete_cloud_exadata_infrastructure.php @@ -0,0 +1,86 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $oracleDatabaseClient->deleteCloudExadataInfrastructure($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = OracleDatabaseClient::cloudExadataInfrastructureName( + '[PROJECT]', + '[LOCATION]', + '[CLOUD_EXADATA_INFRASTRUCTURE]' + ); + + delete_cloud_exadata_infrastructure_sample($formattedName); +} +// [END oracledatabase_v1_generated_OracleDatabase_DeleteCloudExadataInfrastructure_sync] diff --git a/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/delete_cloud_vm_cluster.php b/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/delete_cloud_vm_cluster.php new file mode 100644 index 000000000000..3524a13161c1 --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/delete_cloud_vm_cluster.php @@ -0,0 +1,85 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $oracleDatabaseClient->deleteCloudVmCluster($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = OracleDatabaseClient::cloudVmClusterName( + '[PROJECT]', + '[LOCATION]', + '[CLOUD_VM_CLUSTER]' + ); + + delete_cloud_vm_cluster_sample($formattedName); +} +// [END oracledatabase_v1_generated_OracleDatabase_DeleteCloudVmCluster_sync] diff --git a/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/generate_autonomous_database_wallet.php b/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/generate_autonomous_database_wallet.php new file mode 100644 index 000000000000..f16b542bfe2b --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/generate_autonomous_database_wallet.php @@ -0,0 +1,80 @@ +setName($formattedName) + ->setPassword($password); + + // Call the API and handle any network failures. + try { + /** @var GenerateAutonomousDatabaseWalletResponse $response */ + $response = $oracleDatabaseClient->generateAutonomousDatabaseWallet($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = OracleDatabaseClient::autonomousDatabaseName( + '[PROJECT]', + '[LOCATION]', + '[AUTONOMOUS_DATABASE]' + ); + $password = '[PASSWORD]'; + + generate_autonomous_database_wallet_sample($formattedName, $password); +} +// [END oracledatabase_v1_generated_OracleDatabase_GenerateAutonomousDatabaseWallet_sync] diff --git a/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/get_autonomous_database.php b/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/get_autonomous_database.php new file mode 100644 index 000000000000..eca95808ea65 --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/get_autonomous_database.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var AutonomousDatabase $response */ + $response = $oracleDatabaseClient->getAutonomousDatabase($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = OracleDatabaseClient::autonomousDatabaseName( + '[PROJECT]', + '[LOCATION]', + '[AUTONOMOUS_DATABASE]' + ); + + get_autonomous_database_sample($formattedName); +} +// [END oracledatabase_v1_generated_OracleDatabase_GetAutonomousDatabase_sync] diff --git a/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/get_cloud_exadata_infrastructure.php b/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/get_cloud_exadata_infrastructure.php new file mode 100644 index 000000000000..4b3fc1fd9ead --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/get_cloud_exadata_infrastructure.php @@ -0,0 +1,77 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var CloudExadataInfrastructure $response */ + $response = $oracleDatabaseClient->getCloudExadataInfrastructure($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = OracleDatabaseClient::cloudExadataInfrastructureName( + '[PROJECT]', + '[LOCATION]', + '[CLOUD_EXADATA_INFRASTRUCTURE]' + ); + + get_cloud_exadata_infrastructure_sample($formattedName); +} +// [END oracledatabase_v1_generated_OracleDatabase_GetCloudExadataInfrastructure_sync] diff --git a/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/get_cloud_vm_cluster.php b/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/get_cloud_vm_cluster.php new file mode 100644 index 000000000000..bc24707483c9 --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/get_cloud_vm_cluster.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var CloudVmCluster $response */ + $response = $oracleDatabaseClient->getCloudVmCluster($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = OracleDatabaseClient::cloudVmClusterName( + '[PROJECT]', + '[LOCATION]', + '[CLOUD_VM_CLUSTER]' + ); + + get_cloud_vm_cluster_sample($formattedName); +} +// [END oracledatabase_v1_generated_OracleDatabase_GetCloudVmCluster_sync] diff --git a/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/get_location.php b/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/get_location.php new file mode 100644 index 000000000000..cf2353306d42 --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/get_location.php @@ -0,0 +1,57 @@ +getLocation($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END oracledatabase_v1_generated_OracleDatabase_GetLocation_sync] diff --git a/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/list_autonomous_database_backups.php b/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/list_autonomous_database_backups.php new file mode 100644 index 000000000000..642341a84282 --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/list_autonomous_database_backups.php @@ -0,0 +1,75 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $oracleDatabaseClient->listAutonomousDatabaseBackups($request); + + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = OracleDatabaseClient::locationName('[PROJECT]', '[LOCATION]'); + + list_autonomous_database_backups_sample($formattedParent); +} +// [END oracledatabase_v1_generated_OracleDatabase_ListAutonomousDatabaseBackups_sync] diff --git a/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/list_autonomous_database_character_sets.php b/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/list_autonomous_database_character_sets.php new file mode 100644 index 000000000000..50ed7338d96c --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/list_autonomous_database_character_sets.php @@ -0,0 +1,75 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $oracleDatabaseClient->listAutonomousDatabaseCharacterSets($request); + + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = OracleDatabaseClient::locationName('[PROJECT]', '[LOCATION]'); + + list_autonomous_database_character_sets_sample($formattedParent); +} +// [END oracledatabase_v1_generated_OracleDatabase_ListAutonomousDatabaseCharacterSets_sync] diff --git a/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/list_autonomous_databases.php b/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/list_autonomous_databases.php new file mode 100644 index 000000000000..c6efbdf9795f --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/list_autonomous_databases.php @@ -0,0 +1,75 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $oracleDatabaseClient->listAutonomousDatabases($request); + + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = OracleDatabaseClient::locationName('[PROJECT]', '[LOCATION]'); + + list_autonomous_databases_sample($formattedParent); +} +// [END oracledatabase_v1_generated_OracleDatabase_ListAutonomousDatabases_sync] diff --git a/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/list_autonomous_db_versions.php b/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/list_autonomous_db_versions.php new file mode 100644 index 000000000000..afdd69e1e9d4 --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/list_autonomous_db_versions.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $oracleDatabaseClient->listAutonomousDbVersions($request); + + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = OracleDatabaseClient::locationName('[PROJECT]', '[LOCATION]'); + + list_autonomous_db_versions_sample($formattedParent); +} +// [END oracledatabase_v1_generated_OracleDatabase_ListAutonomousDbVersions_sync] diff --git a/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/list_cloud_exadata_infrastructures.php b/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/list_cloud_exadata_infrastructures.php new file mode 100644 index 000000000000..f582d8f1d73e --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/list_cloud_exadata_infrastructures.php @@ -0,0 +1,75 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $oracleDatabaseClient->listCloudExadataInfrastructures($request); + + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = OracleDatabaseClient::locationName('[PROJECT]', '[LOCATION]'); + + list_cloud_exadata_infrastructures_sample($formattedParent); +} +// [END oracledatabase_v1_generated_OracleDatabase_ListCloudExadataInfrastructures_sync] diff --git a/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/list_cloud_vm_clusters.php b/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/list_cloud_vm_clusters.php new file mode 100644 index 000000000000..a1a4c49fefd3 --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/list_cloud_vm_clusters.php @@ -0,0 +1,75 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $oracleDatabaseClient->listCloudVmClusters($request); + + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = OracleDatabaseClient::locationName('[PROJECT]', '[LOCATION]'); + + list_cloud_vm_clusters_sample($formattedParent); +} +// [END oracledatabase_v1_generated_OracleDatabase_ListCloudVmClusters_sync] diff --git a/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/list_db_nodes.php b/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/list_db_nodes.php new file mode 100644 index 000000000000..70d725693466 --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/list_db_nodes.php @@ -0,0 +1,79 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $oracleDatabaseClient->listDbNodes($request); + + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = OracleDatabaseClient::cloudVmClusterName( + '[PROJECT]', + '[LOCATION]', + '[CLOUD_VM_CLUSTER]' + ); + + list_db_nodes_sample($formattedParent); +} +// [END oracledatabase_v1_generated_OracleDatabase_ListDbNodes_sync] diff --git a/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/list_db_servers.php b/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/list_db_servers.php new file mode 100644 index 000000000000..37abee89b707 --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/list_db_servers.php @@ -0,0 +1,79 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $oracleDatabaseClient->listDbServers($request); + + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = OracleDatabaseClient::cloudExadataInfrastructureName( + '[PROJECT]', + '[LOCATION]', + '[CLOUD_EXADATA_INFRASTRUCTURE]' + ); + + list_db_servers_sample($formattedParent); +} +// [END oracledatabase_v1_generated_OracleDatabase_ListDbServers_sync] diff --git a/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/list_db_system_shapes.php b/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/list_db_system_shapes.php new file mode 100644 index 000000000000..76017f17defa --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/list_db_system_shapes.php @@ -0,0 +1,75 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $oracleDatabaseClient->listDbSystemShapes($request); + + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = OracleDatabaseClient::locationName('[PROJECT]', '[LOCATION]'); + + list_db_system_shapes_sample($formattedParent); +} +// [END oracledatabase_v1_generated_OracleDatabase_ListDbSystemShapes_sync] diff --git a/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/list_entitlements.php b/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/list_entitlements.php new file mode 100644 index 000000000000..7823a57eb30a --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/list_entitlements.php @@ -0,0 +1,75 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $oracleDatabaseClient->listEntitlements($request); + + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = OracleDatabaseClient::locationName('[PROJECT]', '[LOCATION]'); + + list_entitlements_sample($formattedParent); +} +// [END oracledatabase_v1_generated_OracleDatabase_ListEntitlements_sync] diff --git a/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/list_gi_versions.php b/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/list_gi_versions.php new file mode 100644 index 000000000000..40bcf44570f3 --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/list_gi_versions.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $oracleDatabaseClient->listGiVersions($request); + + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = OracleDatabaseClient::locationName('[PROJECT]', '[LOCATION]'); + + list_gi_versions_sample($formattedParent); +} +// [END oracledatabase_v1_generated_OracleDatabase_ListGiVersions_sync] diff --git a/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/list_locations.php b/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/list_locations.php new file mode 100644 index 000000000000..b9e866565369 --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/list_locations.php @@ -0,0 +1,60 @@ +listLocations($request); + + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END oracledatabase_v1_generated_OracleDatabase_ListLocations_sync] diff --git a/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/restore_autonomous_database.php b/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/restore_autonomous_database.php new file mode 100644 index 000000000000..5d0754532160 --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/restore_autonomous_database.php @@ -0,0 +1,91 @@ +setName($formattedName) + ->setRestoreTime($restoreTime); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $oracleDatabaseClient->restoreAutonomousDatabase($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var AutonomousDatabase $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = OracleDatabaseClient::autonomousDatabaseName( + '[PROJECT]', + '[LOCATION]', + '[AUTONOMOUS_DATABASE]' + ); + + restore_autonomous_database_sample($formattedName); +} +// [END oracledatabase_v1_generated_OracleDatabase_RestoreAutonomousDatabase_sync] diff --git a/owl-bot-staging/OracleDatabase/v1/src/V1/Client/OracleDatabaseClient.php b/owl-bot-staging/OracleDatabase/v1/src/V1/Client/OracleDatabaseClient.php new file mode 100644 index 000000000000..cf956f26c37c --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/src/V1/Client/OracleDatabaseClient.php @@ -0,0 +1,1047 @@ + createAutonomousDatabaseAsync(CreateAutonomousDatabaseRequest $request, array $optionalArgs = []) + * @method PromiseInterface createCloudExadataInfrastructureAsync(CreateCloudExadataInfrastructureRequest $request, array $optionalArgs = []) + * @method PromiseInterface createCloudVmClusterAsync(CreateCloudVmClusterRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteAutonomousDatabaseAsync(DeleteAutonomousDatabaseRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteCloudExadataInfrastructureAsync(DeleteCloudExadataInfrastructureRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteCloudVmClusterAsync(DeleteCloudVmClusterRequest $request, array $optionalArgs = []) + * @method PromiseInterface generateAutonomousDatabaseWalletAsync(GenerateAutonomousDatabaseWalletRequest $request, array $optionalArgs = []) + * @method PromiseInterface getAutonomousDatabaseAsync(GetAutonomousDatabaseRequest $request, array $optionalArgs = []) + * @method PromiseInterface getCloudExadataInfrastructureAsync(GetCloudExadataInfrastructureRequest $request, array $optionalArgs = []) + * @method PromiseInterface getCloudVmClusterAsync(GetCloudVmClusterRequest $request, array $optionalArgs = []) + * @method PromiseInterface listAutonomousDatabaseBackupsAsync(ListAutonomousDatabaseBackupsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listAutonomousDatabaseCharacterSetsAsync(ListAutonomousDatabaseCharacterSetsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listAutonomousDatabasesAsync(ListAutonomousDatabasesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listAutonomousDbVersionsAsync(ListAutonomousDbVersionsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listCloudExadataInfrastructuresAsync(ListCloudExadataInfrastructuresRequest $request, array $optionalArgs = []) + * @method PromiseInterface listCloudVmClustersAsync(ListCloudVmClustersRequest $request, array $optionalArgs = []) + * @method PromiseInterface listDbNodesAsync(ListDbNodesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listDbServersAsync(ListDbServersRequest $request, array $optionalArgs = []) + * @method PromiseInterface listDbSystemShapesAsync(ListDbSystemShapesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listEntitlementsAsync(ListEntitlementsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listGiVersionsAsync(ListGiVersionsRequest $request, array $optionalArgs = []) + * @method PromiseInterface restoreAutonomousDatabaseAsync(RestoreAutonomousDatabaseRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + */ +final class OracleDatabaseClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.oracledatabase.v1.OracleDatabase'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'oracledatabase.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'oracledatabase.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/oracle_database_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/oracle_database_descriptor_config.php', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + 'useJwtAccessWithScope' => false, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/oracle_database_rest_client_config.php', + ], + ], + ]; + } + + /** Implements GapicClientTrait::defaultTransport. */ + private static function defaultTransport() + { + return 'rest'; + } + + /** Implements ClientOptionsTrait::supportedTransports. */ + private static function supportedTransports() + { + return [ + 'rest', + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Create the default operation client for the service. + * + * @param array $options ClientOptions for the client. + * + * @return OperationsClient + */ + private function createOperationsClient(array $options) + { + // Unset client-specific configuration options + unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); + + if (isset($options['operationsClient'])) { + return $options['operationsClient']; + } + + return new OperationsClient($options); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * autonomous_database resource. + * + * @param string $project + * @param string $location + * @param string $autonomousDatabase + * + * @return string The formatted autonomous_database resource. + */ + public static function autonomousDatabaseName(string $project, string $location, string $autonomousDatabase): string + { + return self::getPathTemplate('autonomousDatabase')->render([ + 'project' => $project, + 'location' => $location, + 'autonomous_database' => $autonomousDatabase, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * cloud_exadata_infrastructure resource. + * + * @param string $project + * @param string $location + * @param string $cloudExadataInfrastructure + * + * @return string The formatted cloud_exadata_infrastructure resource. + */ + public static function cloudExadataInfrastructureName(string $project, string $location, string $cloudExadataInfrastructure): string + { + return self::getPathTemplate('cloudExadataInfrastructure')->render([ + 'project' => $project, + 'location' => $location, + 'cloud_exadata_infrastructure' => $cloudExadataInfrastructure, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * cloud_vm_cluster resource. + * + * @param string $project + * @param string $location + * @param string $cloudVmCluster + * + * @return string The formatted cloud_vm_cluster resource. + */ + public static function cloudVmClusterName(string $project, string $location, string $cloudVmCluster): string + { + return self::getPathTemplate('cloudVmCluster')->render([ + 'project' => $project, + 'location' => $location, + 'cloud_vm_cluster' => $cloudVmCluster, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a location + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted location resource. + */ + public static function locationName(string $project, string $location): string + { + return self::getPathTemplate('location')->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a network + * resource. + * + * @param string $project + * @param string $network + * + * @return string The formatted network resource. + */ + public static function networkName(string $project, string $network): string + { + return self::getPathTemplate('network')->render([ + 'project' => $project, + 'network' => $network, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - autonomousDatabase: projects/{project}/locations/{location}/autonomousDatabases/{autonomous_database} + * - cloudExadataInfrastructure: projects/{project}/locations/{location}/cloudExadataInfrastructures/{cloud_exadata_infrastructure} + * - cloudVmCluster: projects/{project}/locations/{location}/cloudVmClusters/{cloud_vm_cluster} + * - location: projects/{project}/locations/{location} + * - network: projects/{project}/global/networks/{network} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'oracledatabase.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. At the moment, supports only + * `rest`. *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\RestTransport::build()} method for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Creates a new Autonomous Database in a given project and location. + * + * The async variant is + * {@see OracleDatabaseClient::createAutonomousDatabaseAsync()} . + * + * @example samples/V1/OracleDatabaseClient/create_autonomous_database.php + * + * @param CreateAutonomousDatabaseRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createAutonomousDatabase(CreateAutonomousDatabaseRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateAutonomousDatabase', $request, $callOptions)->wait(); + } + + /** + * Creates a new Exadata Infrastructure in a given project and location. + * + * The async variant is + * {@see OracleDatabaseClient::createCloudExadataInfrastructureAsync()} . + * + * @example samples/V1/OracleDatabaseClient/create_cloud_exadata_infrastructure.php + * + * @param CreateCloudExadataInfrastructureRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createCloudExadataInfrastructure(CreateCloudExadataInfrastructureRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateCloudExadataInfrastructure', $request, $callOptions)->wait(); + } + + /** + * Creates a new VM Cluster in a given project and location. + * + * The async variant is {@see OracleDatabaseClient::createCloudVmClusterAsync()} . + * + * @example samples/V1/OracleDatabaseClient/create_cloud_vm_cluster.php + * + * @param CreateCloudVmClusterRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createCloudVmCluster(CreateCloudVmClusterRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateCloudVmCluster', $request, $callOptions)->wait(); + } + + /** + * Deletes a single Autonomous Database. + * + * The async variant is + * {@see OracleDatabaseClient::deleteAutonomousDatabaseAsync()} . + * + * @example samples/V1/OracleDatabaseClient/delete_autonomous_database.php + * + * @param DeleteAutonomousDatabaseRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteAutonomousDatabase(DeleteAutonomousDatabaseRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteAutonomousDatabase', $request, $callOptions)->wait(); + } + + /** + * Deletes a single Exadata Infrastructure. + * + * The async variant is + * {@see OracleDatabaseClient::deleteCloudExadataInfrastructureAsync()} . + * + * @example samples/V1/OracleDatabaseClient/delete_cloud_exadata_infrastructure.php + * + * @param DeleteCloudExadataInfrastructureRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteCloudExadataInfrastructure(DeleteCloudExadataInfrastructureRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteCloudExadataInfrastructure', $request, $callOptions)->wait(); + } + + /** + * Deletes a single VM Cluster. + * + * The async variant is {@see OracleDatabaseClient::deleteCloudVmClusterAsync()} . + * + * @example samples/V1/OracleDatabaseClient/delete_cloud_vm_cluster.php + * + * @param DeleteCloudVmClusterRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteCloudVmCluster(DeleteCloudVmClusterRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteCloudVmCluster', $request, $callOptions)->wait(); + } + + /** + * Generates a wallet for an Autonomous Database. + * + * The async variant is + * {@see OracleDatabaseClient::generateAutonomousDatabaseWalletAsync()} . + * + * @example samples/V1/OracleDatabaseClient/generate_autonomous_database_wallet.php + * + * @param GenerateAutonomousDatabaseWalletRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return GenerateAutonomousDatabaseWalletResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function generateAutonomousDatabaseWallet(GenerateAutonomousDatabaseWalletRequest $request, array $callOptions = []): GenerateAutonomousDatabaseWalletResponse + { + return $this->startApiCall('GenerateAutonomousDatabaseWallet', $request, $callOptions)->wait(); + } + + /** + * Gets the details of a single Autonomous Database. + * + * The async variant is {@see OracleDatabaseClient::getAutonomousDatabaseAsync()} . + * + * @example samples/V1/OracleDatabaseClient/get_autonomous_database.php + * + * @param GetAutonomousDatabaseRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return AutonomousDatabase + * + * @throws ApiException Thrown if the API call fails. + */ + public function getAutonomousDatabase(GetAutonomousDatabaseRequest $request, array $callOptions = []): AutonomousDatabase + { + return $this->startApiCall('GetAutonomousDatabase', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single Exadata Infrastructure. + * + * The async variant is + * {@see OracleDatabaseClient::getCloudExadataInfrastructureAsync()} . + * + * @example samples/V1/OracleDatabaseClient/get_cloud_exadata_infrastructure.php + * + * @param GetCloudExadataInfrastructureRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return CloudExadataInfrastructure + * + * @throws ApiException Thrown if the API call fails. + */ + public function getCloudExadataInfrastructure(GetCloudExadataInfrastructureRequest $request, array $callOptions = []): CloudExadataInfrastructure + { + return $this->startApiCall('GetCloudExadataInfrastructure', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single VM Cluster. + * + * The async variant is {@see OracleDatabaseClient::getCloudVmClusterAsync()} . + * + * @example samples/V1/OracleDatabaseClient/get_cloud_vm_cluster.php + * + * @param GetCloudVmClusterRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return CloudVmCluster + * + * @throws ApiException Thrown if the API call fails. + */ + public function getCloudVmCluster(GetCloudVmClusterRequest $request, array $callOptions = []): CloudVmCluster + { + return $this->startApiCall('GetCloudVmCluster', $request, $callOptions)->wait(); + } + + /** + * Lists the long-term and automatic backups of an Autonomous Database. + * + * The async variant is + * {@see OracleDatabaseClient::listAutonomousDatabaseBackupsAsync()} . + * + * @example samples/V1/OracleDatabaseClient/list_autonomous_database_backups.php + * + * @param ListAutonomousDatabaseBackupsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listAutonomousDatabaseBackups(ListAutonomousDatabaseBackupsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListAutonomousDatabaseBackups', $request, $callOptions); + } + + /** + * Lists Autonomous Database Character Sets in a given project and location. + * + * The async variant is + * {@see OracleDatabaseClient::listAutonomousDatabaseCharacterSetsAsync()} . + * + * @example samples/V1/OracleDatabaseClient/list_autonomous_database_character_sets.php + * + * @param ListAutonomousDatabaseCharacterSetsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listAutonomousDatabaseCharacterSets(ListAutonomousDatabaseCharacterSetsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListAutonomousDatabaseCharacterSets', $request, $callOptions); + } + + /** + * Lists the Autonomous Databases in a given project and location. + * + * The async variant is {@see OracleDatabaseClient::listAutonomousDatabasesAsync()} + * . + * + * @example samples/V1/OracleDatabaseClient/list_autonomous_databases.php + * + * @param ListAutonomousDatabasesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listAutonomousDatabases(ListAutonomousDatabasesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListAutonomousDatabases', $request, $callOptions); + } + + /** + * Lists all the available Autonomous Database versions for a project and + * location. + * + * The async variant is + * {@see OracleDatabaseClient::listAutonomousDbVersionsAsync()} . + * + * @example samples/V1/OracleDatabaseClient/list_autonomous_db_versions.php + * + * @param ListAutonomousDbVersionsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listAutonomousDbVersions(ListAutonomousDbVersionsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListAutonomousDbVersions', $request, $callOptions); + } + + /** + * Lists Exadata Infrastructures in a given project and location. + * + * The async variant is + * {@see OracleDatabaseClient::listCloudExadataInfrastructuresAsync()} . + * + * @example samples/V1/OracleDatabaseClient/list_cloud_exadata_infrastructures.php + * + * @param ListCloudExadataInfrastructuresRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listCloudExadataInfrastructures(ListCloudExadataInfrastructuresRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListCloudExadataInfrastructures', $request, $callOptions); + } + + /** + * Lists the VM Clusters in a given project and location. + * + * The async variant is {@see OracleDatabaseClient::listCloudVmClustersAsync()} . + * + * @example samples/V1/OracleDatabaseClient/list_cloud_vm_clusters.php + * + * @param ListCloudVmClustersRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listCloudVmClusters(ListCloudVmClustersRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListCloudVmClusters', $request, $callOptions); + } + + /** + * Lists the database nodes of a VM Cluster. + * + * The async variant is {@see OracleDatabaseClient::listDbNodesAsync()} . + * + * @example samples/V1/OracleDatabaseClient/list_db_nodes.php + * + * @param ListDbNodesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listDbNodes(ListDbNodesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListDbNodes', $request, $callOptions); + } + + /** + * Lists the database servers of an Exadata Infrastructure instance. + * + * The async variant is {@see OracleDatabaseClient::listDbServersAsync()} . + * + * @example samples/V1/OracleDatabaseClient/list_db_servers.php + * + * @param ListDbServersRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listDbServers(ListDbServersRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListDbServers', $request, $callOptions); + } + + /** + * Lists the database system shapes available for the project and location. + * + * The async variant is {@see OracleDatabaseClient::listDbSystemShapesAsync()} . + * + * @example samples/V1/OracleDatabaseClient/list_db_system_shapes.php + * + * @param ListDbSystemShapesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listDbSystemShapes(ListDbSystemShapesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListDbSystemShapes', $request, $callOptions); + } + + /** + * Lists the entitlements in a given project. + * + * The async variant is {@see OracleDatabaseClient::listEntitlementsAsync()} . + * + * @example samples/V1/OracleDatabaseClient/list_entitlements.php + * + * @param ListEntitlementsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listEntitlements(ListEntitlementsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListEntitlements', $request, $callOptions); + } + + /** + * Lists all the valid Oracle Grid Infrastructure (GI) versions for the given + * project and location. + * + * The async variant is {@see OracleDatabaseClient::listGiVersionsAsync()} . + * + * @example samples/V1/OracleDatabaseClient/list_gi_versions.php + * + * @param ListGiVersionsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listGiVersions(ListGiVersionsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListGiVersions', $request, $callOptions); + } + + /** + * Restores a single Autonomous Database. + * + * The async variant is + * {@see OracleDatabaseClient::restoreAutonomousDatabaseAsync()} . + * + * @example samples/V1/OracleDatabaseClient/restore_autonomous_database.php + * + * @param RestoreAutonomousDatabaseRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function restoreAutonomousDatabase(RestoreAutonomousDatabaseRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('RestoreAutonomousDatabase', $request, $callOptions)->wait(); + } + + /** + * Gets information about a location. + * + * The async variant is {@see OracleDatabaseClient::getLocationAsync()} . + * + * @example samples/V1/OracleDatabaseClient/get_location.php + * + * @param GetLocationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Location + * + * @throws ApiException Thrown if the API call fails. + */ + public function getLocation(GetLocationRequest $request, array $callOptions = []): Location + { + return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * The async variant is {@see OracleDatabaseClient::listLocationsAsync()} . + * + * @example samples/V1/OracleDatabaseClient/list_locations.php + * + * @param ListLocationsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListLocations', $request, $callOptions); + } +} diff --git a/owl-bot-staging/OracleDatabase/v1/src/V1/gapic_metadata.json b/owl-bot-staging/OracleDatabase/v1/src/V1/gapic_metadata.json new file mode 100644 index 000000000000..8cf55064f966 --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/src/V1/gapic_metadata.json @@ -0,0 +1,138 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.cloud.oracledatabase.v1", + "libraryPackage": "Google\\Cloud\\OracleDatabase\\V1", + "services": { + "OracleDatabase": { + "clients": { + "grpc": { + "libraryClient": "OracleDatabaseGapicClient", + "rpcs": { + "CreateAutonomousDatabase": { + "methods": [ + "createAutonomousDatabase" + ] + }, + "CreateCloudExadataInfrastructure": { + "methods": [ + "createCloudExadataInfrastructure" + ] + }, + "CreateCloudVmCluster": { + "methods": [ + "createCloudVmCluster" + ] + }, + "DeleteAutonomousDatabase": { + "methods": [ + "deleteAutonomousDatabase" + ] + }, + "DeleteCloudExadataInfrastructure": { + "methods": [ + "deleteCloudExadataInfrastructure" + ] + }, + "DeleteCloudVmCluster": { + "methods": [ + "deleteCloudVmCluster" + ] + }, + "GenerateAutonomousDatabaseWallet": { + "methods": [ + "generateAutonomousDatabaseWallet" + ] + }, + "GetAutonomousDatabase": { + "methods": [ + "getAutonomousDatabase" + ] + }, + "GetCloudExadataInfrastructure": { + "methods": [ + "getCloudExadataInfrastructure" + ] + }, + "GetCloudVmCluster": { + "methods": [ + "getCloudVmCluster" + ] + }, + "ListAutonomousDatabaseBackups": { + "methods": [ + "listAutonomousDatabaseBackups" + ] + }, + "ListAutonomousDatabaseCharacterSets": { + "methods": [ + "listAutonomousDatabaseCharacterSets" + ] + }, + "ListAutonomousDatabases": { + "methods": [ + "listAutonomousDatabases" + ] + }, + "ListAutonomousDbVersions": { + "methods": [ + "listAutonomousDbVersions" + ] + }, + "ListCloudExadataInfrastructures": { + "methods": [ + "listCloudExadataInfrastructures" + ] + }, + "ListCloudVmClusters": { + "methods": [ + "listCloudVmClusters" + ] + }, + "ListDbNodes": { + "methods": [ + "listDbNodes" + ] + }, + "ListDbServers": { + "methods": [ + "listDbServers" + ] + }, + "ListDbSystemShapes": { + "methods": [ + "listDbSystemShapes" + ] + }, + "ListEntitlements": { + "methods": [ + "listEntitlements" + ] + }, + "ListGiVersions": { + "methods": [ + "listGiVersions" + ] + }, + "RestoreAutonomousDatabase": { + "methods": [ + "restoreAutonomousDatabase" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/OracleDatabase/v1/src/V1/resources/oracle_database_client_config.json b/owl-bot-staging/OracleDatabase/v1/src/V1/resources/oracle_database_client_config.json new file mode 100644 index 000000000000..396a3c007940 --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/src/V1/resources/oracle_database_client_config.json @@ -0,0 +1,167 @@ +{ + "interfaces": { + "google.cloud.oracledatabase.v1.OracleDatabase": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "RESOURCE_EXHAUSTED", + "UNAVAILABLE", + "INTERNAL", + "DEADLINE_EXCEEDED" + ], + "no_retry_1_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 10000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "CreateAutonomousDatabase": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateCloudExadataInfrastructure": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateCloudVmCluster": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteAutonomousDatabase": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteCloudExadataInfrastructure": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteCloudVmCluster": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GenerateAutonomousDatabaseWallet": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetAutonomousDatabase": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetCloudExadataInfrastructure": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetCloudVmCluster": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListAutonomousDatabaseBackups": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListAutonomousDatabaseCharacterSets": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListAutonomousDatabases": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListAutonomousDbVersions": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListCloudExadataInfrastructures": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListCloudVmClusters": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListDbNodes": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListDbServers": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListDbSystemShapes": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListEntitlements": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListGiVersions": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "RestoreAutonomousDatabase": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetLocation": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListLocations": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/OracleDatabase/v1/src/V1/resources/oracle_database_descriptor_config.php b/owl-bot-staging/OracleDatabase/v1/src/V1/resources/oracle_database_descriptor_config.php new file mode 100644 index 000000000000..9f1099d49d15 --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/src/V1/resources/oracle_database_descriptor_config.php @@ -0,0 +1,470 @@ + [ + 'google.cloud.oracledatabase.v1.OracleDatabase' => [ + 'CreateAutonomousDatabase' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\OracleDatabase\V1\AutonomousDatabase', + 'metadataReturnType' => '\Google\Cloud\OracleDatabase\V1\OperationMetadata', + 'initialPollDelayMillis' => '60000', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '600000', + 'totalPollTimeoutMillis' => '432000000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateCloudExadataInfrastructure' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\OracleDatabase\V1\CloudExadataInfrastructure', + 'metadataReturnType' => '\Google\Cloud\OracleDatabase\V1\OperationMetadata', + 'initialPollDelayMillis' => '60000', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '600000', + 'totalPollTimeoutMillis' => '432000000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateCloudVmCluster' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\OracleDatabase\V1\CloudVmCluster', + 'metadataReturnType' => '\Google\Cloud\OracleDatabase\V1\OperationMetadata', + 'initialPollDelayMillis' => '60000', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '600000', + 'totalPollTimeoutMillis' => '432000000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteAutonomousDatabase' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\OracleDatabase\V1\OperationMetadata', + 'initialPollDelayMillis' => '60000', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '600000', + 'totalPollTimeoutMillis' => '432000000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteCloudExadataInfrastructure' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\OracleDatabase\V1\OperationMetadata', + 'initialPollDelayMillis' => '60000', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '600000', + 'totalPollTimeoutMillis' => '432000000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteCloudVmCluster' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\OracleDatabase\V1\OperationMetadata', + 'initialPollDelayMillis' => '60000', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '600000', + 'totalPollTimeoutMillis' => '432000000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'RestoreAutonomousDatabase' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\OracleDatabase\V1\AutonomousDatabase', + 'metadataReturnType' => '\Google\Cloud\OracleDatabase\V1\OperationMetadata', + 'initialPollDelayMillis' => '60000', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '600000', + 'totalPollTimeoutMillis' => '432000000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GenerateAutonomousDatabaseWallet' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\OracleDatabase\V1\GenerateAutonomousDatabaseWalletResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetAutonomousDatabase' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\OracleDatabase\V1\AutonomousDatabase', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetCloudExadataInfrastructure' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\OracleDatabase\V1\CloudExadataInfrastructure', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetCloudVmCluster' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\OracleDatabase\V1\CloudVmCluster', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListAutonomousDatabaseBackups' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getAutonomousDatabaseBackups', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\OracleDatabase\V1\ListAutonomousDatabaseBackupsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListAutonomousDatabaseCharacterSets' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getAutonomousDatabaseCharacterSets', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\OracleDatabase\V1\ListAutonomousDatabaseCharacterSetsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListAutonomousDatabases' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getAutonomousDatabases', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\OracleDatabase\V1\ListAutonomousDatabasesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListAutonomousDbVersions' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getAutonomousDbVersions', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\OracleDatabase\V1\ListAutonomousDbVersionsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListCloudExadataInfrastructures' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getCloudExadataInfrastructures', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\OracleDatabase\V1\ListCloudExadataInfrastructuresResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListCloudVmClusters' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getCloudVmClusters', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\OracleDatabase\V1\ListCloudVmClustersResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListDbNodes' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getDbNodes', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\OracleDatabase\V1\ListDbNodesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListDbServers' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getDbServers', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\OracleDatabase\V1\ListDbServersResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListDbSystemShapes' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getDbSystemShapes', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\OracleDatabase\V1\ListDbSystemShapesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListEntitlements' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getEntitlements', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\OracleDatabase\V1\ListEntitlementsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListGiVersions' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getGiVersions', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\OracleDatabase\V1\ListGiVersionsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'GetLocation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Location\Location', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'templateMap' => [ + 'autonomousDatabase' => 'projects/{project}/locations/{location}/autonomousDatabases/{autonomous_database}', + 'cloudExadataInfrastructure' => 'projects/{project}/locations/{location}/cloudExadataInfrastructures/{cloud_exadata_infrastructure}', + 'cloudVmCluster' => 'projects/{project}/locations/{location}/cloudVmClusters/{cloud_vm_cluster}', + 'location' => 'projects/{project}/locations/{location}', + 'network' => 'projects/{project}/global/networks/{network}', + ], + ], + ], +]; diff --git a/owl-bot-staging/OracleDatabase/v1/src/V1/resources/oracle_database_rest_client_config.php b/owl-bot-staging/OracleDatabase/v1/src/V1/resources/oracle_database_rest_client_config.php new file mode 100644 index 000000000000..e0a3cf1977c9 --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/src/V1/resources/oracle_database_rest_client_config.php @@ -0,0 +1,356 @@ + [ + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.cloud.oracledatabase.v1.OracleDatabase' => [ + 'CreateAutonomousDatabase' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/autonomousDatabases', + 'body' => 'autonomous_database', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'autonomous_database_id', + ], + ], + 'CreateCloudExadataInfrastructure' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/cloudExadataInfrastructures', + 'body' => 'cloud_exadata_infrastructure', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'cloud_exadata_infrastructure_id', + ], + ], + 'CreateCloudVmCluster' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/cloudVmClusters', + 'body' => 'cloud_vm_cluster', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'cloud_vm_cluster_id', + ], + ], + 'DeleteAutonomousDatabase' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/autonomousDatabases/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteCloudExadataInfrastructure' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/cloudExadataInfrastructures/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteCloudVmCluster' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/cloudVmClusters/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GenerateAutonomousDatabaseWallet' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/autonomousDatabases/*}:generateWallet', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetAutonomousDatabase' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/autonomousDatabases/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetCloudExadataInfrastructure' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/cloudExadataInfrastructures/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetCloudVmCluster' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/cloudVmClusters/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListAutonomousDatabaseBackups' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/autonomousDatabaseBackups', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListAutonomousDatabaseCharacterSets' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/autonomousDatabaseCharacterSets', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListAutonomousDatabases' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/autonomousDatabases', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListAutonomousDbVersions' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/autonomousDbVersions', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListCloudExadataInfrastructures' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/cloudExadataInfrastructures', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListCloudVmClusters' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/cloudVmClusters', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListDbNodes' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/cloudVmClusters/*}/dbNodes', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListDbServers' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/cloudExadataInfrastructures/*}/dbServers', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListDbSystemShapes' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/dbSystemShapes', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListEntitlements' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/entitlements', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListGiVersions' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/giVersions', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'RestoreAutonomousDatabase' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/autonomousDatabases/*}:restore', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/OracleDatabase/v1/tests/Unit/V1/Client/OracleDatabaseClientTest.php b/owl-bot-staging/OracleDatabase/v1/tests/Unit/V1/Client/OracleDatabaseClientTest.php new file mode 100644 index 000000000000..2292ebf9d836 --- /dev/null +++ b/owl-bot-staging/OracleDatabase/v1/tests/Unit/V1/Client/OracleDatabaseClientTest.php @@ -0,0 +1,2376 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return OracleDatabaseClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new OracleDatabaseClient($options); + } + + /** @test */ + public function createAutonomousDatabaseTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createAutonomousDatabaseTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $database = 'database1789464955'; + $displayName = 'displayName1615086568'; + $entitlementId = 'entitlementId-1715775123'; + $adminPassword = 'adminPassword1579561355'; + $network = 'network1843485230'; + $cidr = 'cidr3053428'; + $expectedResponse = new AutonomousDatabase(); + $expectedResponse->setName($name); + $expectedResponse->setDatabase($database); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setEntitlementId($entitlementId); + $expectedResponse->setAdminPassword($adminPassword); + $expectedResponse->setNetwork($network); + $expectedResponse->setCidr($cidr); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createAutonomousDatabaseTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $autonomousDatabaseId = 'autonomousDatabaseId-1188134896'; + $autonomousDatabase = new AutonomousDatabase(); + $autonomousDatabaseNetwork = $gapicClient->networkName('[PROJECT]', '[NETWORK]'); + $autonomousDatabase->setNetwork($autonomousDatabaseNetwork); + $autonomousDatabaseCidr = 'autonomousDatabaseCidr-1677675745'; + $autonomousDatabase->setCidr($autonomousDatabaseCidr); + $request = (new CreateAutonomousDatabaseRequest()) + ->setParent($formattedParent) + ->setAutonomousDatabaseId($autonomousDatabaseId) + ->setAutonomousDatabase($autonomousDatabase); + $response = $gapicClient->createAutonomousDatabase($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.oracledatabase.v1.OracleDatabase/CreateAutonomousDatabase', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getAutonomousDatabaseId(); + $this->assertProtobufEquals($autonomousDatabaseId, $actualValue); + $actualValue = $actualApiRequestObject->getAutonomousDatabase(); + $this->assertProtobufEquals($autonomousDatabase, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createAutonomousDatabaseTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createAutonomousDatabaseExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createAutonomousDatabaseTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $autonomousDatabaseId = 'autonomousDatabaseId-1188134896'; + $autonomousDatabase = new AutonomousDatabase(); + $autonomousDatabaseNetwork = $gapicClient->networkName('[PROJECT]', '[NETWORK]'); + $autonomousDatabase->setNetwork($autonomousDatabaseNetwork); + $autonomousDatabaseCidr = 'autonomousDatabaseCidr-1677675745'; + $autonomousDatabase->setCidr($autonomousDatabaseCidr); + $request = (new CreateAutonomousDatabaseRequest()) + ->setParent($formattedParent) + ->setAutonomousDatabaseId($autonomousDatabaseId) + ->setAutonomousDatabase($autonomousDatabase); + $response = $gapicClient->createAutonomousDatabase($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createAutonomousDatabaseTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createCloudExadataInfrastructureTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createCloudExadataInfrastructureTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $gcpOracleZone = 'gcpOracleZone1763347746'; + $entitlementId = 'entitlementId-1715775123'; + $expectedResponse = new CloudExadataInfrastructure(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setGcpOracleZone($gcpOracleZone); + $expectedResponse->setEntitlementId($entitlementId); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createCloudExadataInfrastructureTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $cloudExadataInfrastructureId = 'cloudExadataInfrastructureId642023910'; + $cloudExadataInfrastructure = new CloudExadataInfrastructure(); + $request = (new CreateCloudExadataInfrastructureRequest()) + ->setParent($formattedParent) + ->setCloudExadataInfrastructureId($cloudExadataInfrastructureId) + ->setCloudExadataInfrastructure($cloudExadataInfrastructure); + $response = $gapicClient->createCloudExadataInfrastructure($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.oracledatabase.v1.OracleDatabase/CreateCloudExadataInfrastructure', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getCloudExadataInfrastructureId(); + $this->assertProtobufEquals($cloudExadataInfrastructureId, $actualValue); + $actualValue = $actualApiRequestObject->getCloudExadataInfrastructure(); + $this->assertProtobufEquals($cloudExadataInfrastructure, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createCloudExadataInfrastructureTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createCloudExadataInfrastructureExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createCloudExadataInfrastructureTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $cloudExadataInfrastructureId = 'cloudExadataInfrastructureId642023910'; + $cloudExadataInfrastructure = new CloudExadataInfrastructure(); + $request = (new CreateCloudExadataInfrastructureRequest()) + ->setParent($formattedParent) + ->setCloudExadataInfrastructureId($cloudExadataInfrastructureId) + ->setCloudExadataInfrastructure($cloudExadataInfrastructure); + $response = $gapicClient->createCloudExadataInfrastructure($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createCloudExadataInfrastructureTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createCloudVmClusterTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createCloudVmClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $exadataInfrastructure = 'exadataInfrastructure94104074'; + $displayName = 'displayName1615086568'; + $gcpOracleZone = 'gcpOracleZone1763347746'; + $cidr = 'cidr3053428'; + $backupSubnetCidr = 'backupSubnetCidr-1604198375'; + $network = 'network1843485230'; + $expectedResponse = new CloudVmCluster(); + $expectedResponse->setName($name); + $expectedResponse->setExadataInfrastructure($exadataInfrastructure); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setGcpOracleZone($gcpOracleZone); + $expectedResponse->setCidr($cidr); + $expectedResponse->setBackupSubnetCidr($backupSubnetCidr); + $expectedResponse->setNetwork($network); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createCloudVmClusterTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $cloudVmClusterId = 'cloudVmClusterId-117615746'; + $cloudVmCluster = new CloudVmCluster(); + $cloudVmClusterExadataInfrastructure = $gapicClient->cloudExadataInfrastructureName('[PROJECT]', '[LOCATION]', '[CLOUD_EXADATA_INFRASTRUCTURE]'); + $cloudVmCluster->setExadataInfrastructure($cloudVmClusterExadataInfrastructure); + $cloudVmClusterCidr = 'cloudVmClusterCidr-1405325022'; + $cloudVmCluster->setCidr($cloudVmClusterCidr); + $cloudVmClusterBackupSubnetCidr = 'cloudVmClusterBackupSubnetCidr1861461121'; + $cloudVmCluster->setBackupSubnetCidr($cloudVmClusterBackupSubnetCidr); + $cloudVmClusterNetwork = $gapicClient->networkName('[PROJECT]', '[NETWORK]'); + $cloudVmCluster->setNetwork($cloudVmClusterNetwork); + $request = (new CreateCloudVmClusterRequest()) + ->setParent($formattedParent) + ->setCloudVmClusterId($cloudVmClusterId) + ->setCloudVmCluster($cloudVmCluster); + $response = $gapicClient->createCloudVmCluster($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.oracledatabase.v1.OracleDatabase/CreateCloudVmCluster', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getCloudVmClusterId(); + $this->assertProtobufEquals($cloudVmClusterId, $actualValue); + $actualValue = $actualApiRequestObject->getCloudVmCluster(); + $this->assertProtobufEquals($cloudVmCluster, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createCloudVmClusterTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createCloudVmClusterExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createCloudVmClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $cloudVmClusterId = 'cloudVmClusterId-117615746'; + $cloudVmCluster = new CloudVmCluster(); + $cloudVmClusterExadataInfrastructure = $gapicClient->cloudExadataInfrastructureName('[PROJECT]', '[LOCATION]', '[CLOUD_EXADATA_INFRASTRUCTURE]'); + $cloudVmCluster->setExadataInfrastructure($cloudVmClusterExadataInfrastructure); + $cloudVmClusterCidr = 'cloudVmClusterCidr-1405325022'; + $cloudVmCluster->setCidr($cloudVmClusterCidr); + $cloudVmClusterBackupSubnetCidr = 'cloudVmClusterBackupSubnetCidr1861461121'; + $cloudVmCluster->setBackupSubnetCidr($cloudVmClusterBackupSubnetCidr); + $cloudVmClusterNetwork = $gapicClient->networkName('[PROJECT]', '[NETWORK]'); + $cloudVmCluster->setNetwork($cloudVmClusterNetwork); + $request = (new CreateCloudVmClusterRequest()) + ->setParent($formattedParent) + ->setCloudVmClusterId($cloudVmClusterId) + ->setCloudVmCluster($cloudVmCluster); + $response = $gapicClient->createCloudVmCluster($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createCloudVmClusterTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteAutonomousDatabaseTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteAutonomousDatabaseTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteAutonomousDatabaseTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->autonomousDatabaseName('[PROJECT]', '[LOCATION]', '[AUTONOMOUS_DATABASE]'); + $request = (new DeleteAutonomousDatabaseRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteAutonomousDatabase($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.oracledatabase.v1.OracleDatabase/DeleteAutonomousDatabase', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteAutonomousDatabaseTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteAutonomousDatabaseExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteAutonomousDatabaseTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->autonomousDatabaseName('[PROJECT]', '[LOCATION]', '[AUTONOMOUS_DATABASE]'); + $request = (new DeleteAutonomousDatabaseRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteAutonomousDatabase($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteAutonomousDatabaseTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteCloudExadataInfrastructureTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteCloudExadataInfrastructureTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteCloudExadataInfrastructureTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->cloudExadataInfrastructureName('[PROJECT]', '[LOCATION]', '[CLOUD_EXADATA_INFRASTRUCTURE]'); + $request = (new DeleteCloudExadataInfrastructureRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteCloudExadataInfrastructure($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.oracledatabase.v1.OracleDatabase/DeleteCloudExadataInfrastructure', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteCloudExadataInfrastructureTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteCloudExadataInfrastructureExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteCloudExadataInfrastructureTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->cloudExadataInfrastructureName('[PROJECT]', '[LOCATION]', '[CLOUD_EXADATA_INFRASTRUCTURE]'); + $request = (new DeleteCloudExadataInfrastructureRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteCloudExadataInfrastructure($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteCloudExadataInfrastructureTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteCloudVmClusterTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteCloudVmClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteCloudVmClusterTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->cloudVmClusterName('[PROJECT]', '[LOCATION]', '[CLOUD_VM_CLUSTER]'); + $request = (new DeleteCloudVmClusterRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteCloudVmCluster($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.oracledatabase.v1.OracleDatabase/DeleteCloudVmCluster', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteCloudVmClusterTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteCloudVmClusterExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteCloudVmClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->cloudVmClusterName('[PROJECT]', '[LOCATION]', '[CLOUD_VM_CLUSTER]'); + $request = (new DeleteCloudVmClusterRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteCloudVmCluster($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteCloudVmClusterTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function generateAutonomousDatabaseWalletTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $archiveContent = '-4'; + $expectedResponse = new GenerateAutonomousDatabaseWalletResponse(); + $expectedResponse->setArchiveContent($archiveContent); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->autonomousDatabaseName('[PROJECT]', '[LOCATION]', '[AUTONOMOUS_DATABASE]'); + $password = 'password1216985755'; + $request = (new GenerateAutonomousDatabaseWalletRequest()) + ->setName($formattedName) + ->setPassword($password); + $response = $gapicClient->generateAutonomousDatabaseWallet($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.oracledatabase.v1.OracleDatabase/GenerateAutonomousDatabaseWallet', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getPassword(); + $this->assertProtobufEquals($password, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function generateAutonomousDatabaseWalletExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->autonomousDatabaseName('[PROJECT]', '[LOCATION]', '[AUTONOMOUS_DATABASE]'); + $password = 'password1216985755'; + $request = (new GenerateAutonomousDatabaseWalletRequest()) + ->setName($formattedName) + ->setPassword($password); + try { + $gapicClient->generateAutonomousDatabaseWallet($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAutonomousDatabaseTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $database = 'database1789464955'; + $displayName = 'displayName1615086568'; + $entitlementId = 'entitlementId-1715775123'; + $adminPassword = 'adminPassword1579561355'; + $network = 'network1843485230'; + $cidr = 'cidr3053428'; + $expectedResponse = new AutonomousDatabase(); + $expectedResponse->setName($name2); + $expectedResponse->setDatabase($database); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setEntitlementId($entitlementId); + $expectedResponse->setAdminPassword($adminPassword); + $expectedResponse->setNetwork($network); + $expectedResponse->setCidr($cidr); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->autonomousDatabaseName('[PROJECT]', '[LOCATION]', '[AUTONOMOUS_DATABASE]'); + $request = (new GetAutonomousDatabaseRequest()) + ->setName($formattedName); + $response = $gapicClient->getAutonomousDatabase($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.oracledatabase.v1.OracleDatabase/GetAutonomousDatabase', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAutonomousDatabaseExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->autonomousDatabaseName('[PROJECT]', '[LOCATION]', '[AUTONOMOUS_DATABASE]'); + $request = (new GetAutonomousDatabaseRequest()) + ->setName($formattedName); + try { + $gapicClient->getAutonomousDatabase($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getCloudExadataInfrastructureTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $gcpOracleZone = 'gcpOracleZone1763347746'; + $entitlementId = 'entitlementId-1715775123'; + $expectedResponse = new CloudExadataInfrastructure(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setGcpOracleZone($gcpOracleZone); + $expectedResponse->setEntitlementId($entitlementId); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->cloudExadataInfrastructureName('[PROJECT]', '[LOCATION]', '[CLOUD_EXADATA_INFRASTRUCTURE]'); + $request = (new GetCloudExadataInfrastructureRequest()) + ->setName($formattedName); + $response = $gapicClient->getCloudExadataInfrastructure($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.oracledatabase.v1.OracleDatabase/GetCloudExadataInfrastructure', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getCloudExadataInfrastructureExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->cloudExadataInfrastructureName('[PROJECT]', '[LOCATION]', '[CLOUD_EXADATA_INFRASTRUCTURE]'); + $request = (new GetCloudExadataInfrastructureRequest()) + ->setName($formattedName); + try { + $gapicClient->getCloudExadataInfrastructure($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getCloudVmClusterTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $exadataInfrastructure = 'exadataInfrastructure94104074'; + $displayName = 'displayName1615086568'; + $gcpOracleZone = 'gcpOracleZone1763347746'; + $cidr = 'cidr3053428'; + $backupSubnetCidr = 'backupSubnetCidr-1604198375'; + $network = 'network1843485230'; + $expectedResponse = new CloudVmCluster(); + $expectedResponse->setName($name2); + $expectedResponse->setExadataInfrastructure($exadataInfrastructure); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setGcpOracleZone($gcpOracleZone); + $expectedResponse->setCidr($cidr); + $expectedResponse->setBackupSubnetCidr($backupSubnetCidr); + $expectedResponse->setNetwork($network); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->cloudVmClusterName('[PROJECT]', '[LOCATION]', '[CLOUD_VM_CLUSTER]'); + $request = (new GetCloudVmClusterRequest()) + ->setName($formattedName); + $response = $gapicClient->getCloudVmCluster($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.oracledatabase.v1.OracleDatabase/GetCloudVmCluster', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getCloudVmClusterExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->cloudVmClusterName('[PROJECT]', '[LOCATION]', '[CLOUD_VM_CLUSTER]'); + $request = (new GetCloudVmClusterRequest()) + ->setName($formattedName); + try { + $gapicClient->getCloudVmCluster($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAutonomousDatabaseBackupsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $autonomousDatabaseBackupsElement = new AutonomousDatabaseBackup(); + $autonomousDatabaseBackups = [ + $autonomousDatabaseBackupsElement, + ]; + $expectedResponse = new ListAutonomousDatabaseBackupsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setAutonomousDatabaseBackups($autonomousDatabaseBackups); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListAutonomousDatabaseBackupsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listAutonomousDatabaseBackups($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getAutonomousDatabaseBackups()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.oracledatabase.v1.OracleDatabase/ListAutonomousDatabaseBackups', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAutonomousDatabaseBackupsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListAutonomousDatabaseBackupsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listAutonomousDatabaseBackups($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAutonomousDatabaseCharacterSetsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $autonomousDatabaseCharacterSetsElement = new AutonomousDatabaseCharacterSet(); + $autonomousDatabaseCharacterSets = [ + $autonomousDatabaseCharacterSetsElement, + ]; + $expectedResponse = new ListAutonomousDatabaseCharacterSetsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setAutonomousDatabaseCharacterSets($autonomousDatabaseCharacterSets); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListAutonomousDatabaseCharacterSetsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listAutonomousDatabaseCharacterSets($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getAutonomousDatabaseCharacterSets()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.oracledatabase.v1.OracleDatabase/ListAutonomousDatabaseCharacterSets', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAutonomousDatabaseCharacterSetsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListAutonomousDatabaseCharacterSetsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listAutonomousDatabaseCharacterSets($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAutonomousDatabasesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $autonomousDatabasesElement = new AutonomousDatabase(); + $autonomousDatabases = [ + $autonomousDatabasesElement, + ]; + $expectedResponse = new ListAutonomousDatabasesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setAutonomousDatabases($autonomousDatabases); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListAutonomousDatabasesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listAutonomousDatabases($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getAutonomousDatabases()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.oracledatabase.v1.OracleDatabase/ListAutonomousDatabases', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAutonomousDatabasesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListAutonomousDatabasesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listAutonomousDatabases($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAutonomousDbVersionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $autonomousDbVersionsElement = new AutonomousDbVersion(); + $autonomousDbVersions = [ + $autonomousDbVersionsElement, + ]; + $expectedResponse = new ListAutonomousDbVersionsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setAutonomousDbVersions($autonomousDbVersions); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListAutonomousDbVersionsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listAutonomousDbVersions($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getAutonomousDbVersions()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.oracledatabase.v1.OracleDatabase/ListAutonomousDbVersions', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAutonomousDbVersionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListAutonomousDbVersionsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listAutonomousDbVersions($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listCloudExadataInfrastructuresTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $cloudExadataInfrastructuresElement = new CloudExadataInfrastructure(); + $cloudExadataInfrastructures = [ + $cloudExadataInfrastructuresElement, + ]; + $expectedResponse = new ListCloudExadataInfrastructuresResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setCloudExadataInfrastructures($cloudExadataInfrastructures); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListCloudExadataInfrastructuresRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listCloudExadataInfrastructures($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getCloudExadataInfrastructures()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.oracledatabase.v1.OracleDatabase/ListCloudExadataInfrastructures', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listCloudExadataInfrastructuresExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListCloudExadataInfrastructuresRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listCloudExadataInfrastructures($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listCloudVmClustersTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $cloudVmClustersElement = new CloudVmCluster(); + $cloudVmClusters = [ + $cloudVmClustersElement, + ]; + $expectedResponse = new ListCloudVmClustersResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setCloudVmClusters($cloudVmClusters); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListCloudVmClustersRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listCloudVmClusters($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getCloudVmClusters()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.oracledatabase.v1.OracleDatabase/ListCloudVmClusters', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listCloudVmClustersExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListCloudVmClustersRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listCloudVmClusters($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listDbNodesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $dbNodesElement = new DbNode(); + $dbNodes = [ + $dbNodesElement, + ]; + $expectedResponse = new ListDbNodesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setDbNodes($dbNodes); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->cloudVmClusterName('[PROJECT]', '[LOCATION]', '[CLOUD_VM_CLUSTER]'); + $request = (new ListDbNodesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listDbNodes($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getDbNodes()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.oracledatabase.v1.OracleDatabase/ListDbNodes', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listDbNodesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->cloudVmClusterName('[PROJECT]', '[LOCATION]', '[CLOUD_VM_CLUSTER]'); + $request = (new ListDbNodesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listDbNodes($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listDbServersTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $dbServersElement = new DbServer(); + $dbServers = [ + $dbServersElement, + ]; + $expectedResponse = new ListDbServersResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setDbServers($dbServers); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->cloudExadataInfrastructureName('[PROJECT]', '[LOCATION]', '[CLOUD_EXADATA_INFRASTRUCTURE]'); + $request = (new ListDbServersRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listDbServers($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getDbServers()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.oracledatabase.v1.OracleDatabase/ListDbServers', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listDbServersExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->cloudExadataInfrastructureName('[PROJECT]', '[LOCATION]', '[CLOUD_EXADATA_INFRASTRUCTURE]'); + $request = (new ListDbServersRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listDbServers($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listDbSystemShapesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $dbSystemShapesElement = new DbSystemShape(); + $dbSystemShapes = [ + $dbSystemShapesElement, + ]; + $expectedResponse = new ListDbSystemShapesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setDbSystemShapes($dbSystemShapes); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListDbSystemShapesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listDbSystemShapes($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getDbSystemShapes()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.oracledatabase.v1.OracleDatabase/ListDbSystemShapes', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listDbSystemShapesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListDbSystemShapesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listDbSystemShapes($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listEntitlementsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $entitlementsElement = new Entitlement(); + $entitlements = [ + $entitlementsElement, + ]; + $expectedResponse = new ListEntitlementsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setEntitlements($entitlements); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListEntitlementsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listEntitlements($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getEntitlements()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.oracledatabase.v1.OracleDatabase/ListEntitlements', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listEntitlementsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListEntitlementsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listEntitlements($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listGiVersionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $giVersionsElement = new GiVersion(); + $giVersions = [ + $giVersionsElement, + ]; + $expectedResponse = new ListGiVersionsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setGiVersions($giVersions); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListGiVersionsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listGiVersions($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getGiVersions()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.oracledatabase.v1.OracleDatabase/ListGiVersions', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listGiVersionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListGiVersionsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listGiVersions($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function restoreAutonomousDatabaseTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/restoreAutonomousDatabaseTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $database = 'database1789464955'; + $displayName = 'displayName1615086568'; + $entitlementId = 'entitlementId-1715775123'; + $adminPassword = 'adminPassword1579561355'; + $network = 'network1843485230'; + $cidr = 'cidr3053428'; + $expectedResponse = new AutonomousDatabase(); + $expectedResponse->setName($name2); + $expectedResponse->setDatabase($database); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setEntitlementId($entitlementId); + $expectedResponse->setAdminPassword($adminPassword); + $expectedResponse->setNetwork($network); + $expectedResponse->setCidr($cidr); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/restoreAutonomousDatabaseTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->autonomousDatabaseName('[PROJECT]', '[LOCATION]', '[AUTONOMOUS_DATABASE]'); + $restoreTime = new Timestamp(); + $request = (new RestoreAutonomousDatabaseRequest()) + ->setName($formattedName) + ->setRestoreTime($restoreTime); + $response = $gapicClient->restoreAutonomousDatabase($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.oracledatabase.v1.OracleDatabase/RestoreAutonomousDatabase', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualApiRequestObject->getRestoreTime(); + $this->assertProtobufEquals($restoreTime, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/restoreAutonomousDatabaseTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function restoreAutonomousDatabaseExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/restoreAutonomousDatabaseTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->autonomousDatabaseName('[PROJECT]', '[LOCATION]', '[AUTONOMOUS_DATABASE]'); + $restoreTime = new Timestamp(); + $request = (new RestoreAutonomousDatabaseRequest()) + ->setName($formattedName) + ->setRestoreTime($restoreTime); + $response = $gapicClient->restoreAutonomousDatabase($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/restoreAutonomousDatabaseTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getLocationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $locationId = 'locationId552319461'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Location(); + $expectedResponse->setName($name2); + $expectedResponse->setLocationId($locationId); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + $request = new GetLocationRequest(); + $response = $gapicClient->getLocation($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new GetLocationRequest(); + try { + $gapicClient->getLocation($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $locationsElement = new Location(); + $locations = [ + $locationsElement, + ]; + $expectedResponse = new ListLocationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setLocations($locations); + $transport->addResponse($expectedResponse); + $request = new ListLocationsRequest(); + $response = $gapicClient->listLocations($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new ListLocationsRequest(); + try { + $gapicClient->listLocations($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createAutonomousDatabaseAsyncTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createAutonomousDatabaseTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $database = 'database1789464955'; + $displayName = 'displayName1615086568'; + $entitlementId = 'entitlementId-1715775123'; + $adminPassword = 'adminPassword1579561355'; + $network = 'network1843485230'; + $cidr = 'cidr3053428'; + $expectedResponse = new AutonomousDatabase(); + $expectedResponse->setName($name); + $expectedResponse->setDatabase($database); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setEntitlementId($entitlementId); + $expectedResponse->setAdminPassword($adminPassword); + $expectedResponse->setNetwork($network); + $expectedResponse->setCidr($cidr); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createAutonomousDatabaseTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $autonomousDatabaseId = 'autonomousDatabaseId-1188134896'; + $autonomousDatabase = new AutonomousDatabase(); + $autonomousDatabaseNetwork = $gapicClient->networkName('[PROJECT]', '[NETWORK]'); + $autonomousDatabase->setNetwork($autonomousDatabaseNetwork); + $autonomousDatabaseCidr = 'autonomousDatabaseCidr-1677675745'; + $autonomousDatabase->setCidr($autonomousDatabaseCidr); + $request = (new CreateAutonomousDatabaseRequest()) + ->setParent($formattedParent) + ->setAutonomousDatabaseId($autonomousDatabaseId) + ->setAutonomousDatabase($autonomousDatabase); + $response = $gapicClient->createAutonomousDatabaseAsync($request)->wait(); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.oracledatabase.v1.OracleDatabase/CreateAutonomousDatabase', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getAutonomousDatabaseId(); + $this->assertProtobufEquals($autonomousDatabaseId, $actualValue); + $actualValue = $actualApiRequestObject->getAutonomousDatabase(); + $this->assertProtobufEquals($autonomousDatabase, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createAutonomousDatabaseTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } +} diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/GPBMetadata/Google/Cloud/Orchestration/Airflow/Service/V1/Environments.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/GPBMetadata/Google/Cloud/Orchestration/Airflow/Service/V1/Environments.php new file mode 100644 index 0000000000000000000000000000000000000000..8a9a31b8e84af106526616bcbf86e22d9f5aa381 GIT binary patch literal 23403 zcmd5^-ESOOR^M*Nj(wascEw-mB$G}hGn36E?TrU^S+U<_h8@s!w+fF7k-mPtS zm+cz2yK1Vcop?faVPFv;1iP?EfDi}?2`y+J5JK<|poIk<*pU#7cBNSfkl6nKc;TG; zQC-zl?YL|QHcw8~t#j@@=XcIMANTeb-mtbTxRPGfTe@9y^+tMqFYRvWY0EZUvu-xi z>+OvV-A>od9m{Cyb|#%(D5Z;~m2`fguyPqcbiW#?tr@+wYuILMM{l`KhA{(Z)pm5ps@3)MVtIa9cWaHB zTU%RXbk}l3cdg{7yO!m2*Q%WE+WlLv0o0o{$4TdX^x+Al@t@URZyNQq8pmL z87;##YE9zsa4mneLBr)(%7q(iE_G~mNPAr=um8H zg_f(^ty*(!L3ir5VY#MV#-Vd_o4V@>oSt0!v|vl*jE(d)KF7Ja&?IlCUAwLOxu?^% z?zZjLYi!;`;Hmf5T7(?4ma&#?wM>$N*>dLQI&12X==EW)X`sU5eRIdqn~iyWtF~*H zcDzq3x&YUKCwVZGtd%T6d%X28nXOH`-D(-F%|m_f!2*?%-?7}igUiDEl*w|r=4>D0 z+Z6+?%dPEL(cdx@-+bK=n9VjC9z^e;;a~GWMG$)#e)OFLym?fUS8j3&8Rj%H0jH4> zP9r0nMrQX`YDzGySqAzUf+BYvsY|{W8-zD)T>wrDIOiK+3si|$uZvd)bX=wf9r67Y z@qM#{kD1V*^I{P5bm$vqbV7ijAYG^Tk}qKg^(;on^?4&)sZ2gVeFD=tTSo`(^LrKj z{WfY`8G!+-W}~pC6Y0dYA*BSvKJPo7#D~MPa~VFv1F9n99ALqz{-BTQcA*;5jYYw_*Ho<;H0bq|@b6ams_t8q!uP0zSOwzH?ujxt| zPWhJU;3WEvwoYXV&b0K$uI8Hu32#Wf2Ga|AQ;(E>PzHaBGhVfDUyD+d9Lk7xtBG`X zBsD2BFx+OWH9{5>;qYuq>Rm!B{)U9;_4Z5L%pGWx{?oGY8n=Ksmmr(u-Ay=k;`t<~OH*KM|n ze)Xdyq@t!Fmhok8*4*Zb5@QE*^O@eHGfOxZLJyaUrVEq}Dmo15j|~??x(!o6yK;PN z^GLdYlv6k01e*dv-!B$|e!s$?kNYQjS_TjtJt)6a(50~n*3AajZhr@s+>3lS0cq~U zS8>mKVA|VFv(|8`dL1J?X>+dyo%#GLpJbE&oqZ9mP=IdYcVf}FMLHRLHsf>4$_7ld zaftRv($*YCoK1Ilc0Q)SBBnXthx1X_;UaDb5wGPcvi^->{#CYyoA64nHAGNSe?3Jn2hO#Fu&p!txQ|%^y7{9(*PAUz?-pP>9K@A3Lat{a z0N~Fu0DlI^;3ADMpahSY`kM(*Lm2j6|3AU_Td2|q7<k4m4vztS0Vr% zn$__r=9l{5Y(Qt+38NGD1+;{gK}CZTRHk4X^ziJ`QE5!%sdf)J)LQqb)Fy3 zJduAs4b*IAp7?_6r!!=qT{{+%>#|zD**v{I9yNOQY{XOb57DQFEQHGm%|pZ+>o6I~ zNyhxg;8c6Z{=eS`ldJyKdytGm%X$DUrK6z5<8vgy{15^2uZg&xOW8ec%y_E_!=~;z z`={5Z0wC#pG|Ld+A<%oFejB}62teNJ4u%X!bz!K(R^sS*+*xlZ{cZxrX|CQfq^mvB z?in|ZQO?4^hS9{#jHgRHxcQrtFwr$PVSQULqx?xoY+jIIC=^$^*;$1 z4ULxBG*3%6;e@+qaaTDq`|!C;a0MAC77S4Jw(W>4)c9YWh-tpMc5k)${jC z3;Jm?JmDCbedoE&MQ2k{&cg^_yoR+#2P-%{5#lee!c+r``dCbCXkDXN3e85T7*URQ zuZ9WsB~Wvv<#MT-uV@cSm3vF2?1HxPu$%|Cvmn@zQ?6Y+(ui9#Hdewp!cOtF4;lY?)qO8ClCY2V;&Hr^zsYYgD}n<3TdQ z8(i61z+>tYd~dAC93C3u0273F5l+{IFn(eRC9l^f+EOt5jA zb*#`}gr?O^Ymdkbu)@wHy6(XGxIEMhOi}c9 z?$)>DfU-?>X4lZYOySLlid?J`f%;Xr)RTu$G1i4F+t{hud)j7Q*FKQtsv#u>3dVS5 zs}Xp|wf7=i#M;(|kb!3F7B=H*T5T7fkY2dz)T?kB3uHEGmT%Iu8?CqN+q$S;laolO zACAD7udv|_9p2p5wR*Gd(C)<@|0IkwYMVGyN3(2w!+6XAOhu#?mSRwiZLHUj1L{}a zg)@%1;XcA@IXtEIohQ zHkdOXQeJ>D`EY&DG#VPc8pml2(MNsCQ@D&R6!bA#t?h1^HXR_4rofDVfHTIVvK({T z*xW_BS&ytR1;;NWGy)slEZX0mRDr^n#WjM8pyDUKL&P0}x~mAG9jaEJWeSL!tcDeU z3A>=XjAXg|u^vhWjr#%B&3$$;!B!MEbtki~NK(FKQ3!U%HzNXolE(g4@qVFFDlX@X zD_XViPIu6ig2~W`>T-5z31cvf9z*YzG2mNW#=tDn7X`w+k=cC_1*((vsaN5e83>m%|of)mHm=vc@v zDz9RL)2-RAMooD(JgTkg9lsz_N#zy{V)KfBLeoFMC)jvEvv1qj%Ex}9mog>Qzd8vc z!H5I#cN!x!?4YBQa7e^Hso_}x>D}tQwBp6Qs0nJ4$4!re%rjYjEQ^c3gfn3AG%IOh z3+i+re8+VV$GFa=i(?rxg0e^mJU+OQbfSI?O^l=v%QJw6Zi5I=#0$9ZJKr|!n3_HC+#`<)NMGwA1gNim(~V0w>YAE09w%$T`wDADnZnJ-eoLZe&T zbkJmJYy-xb+T@%yi>Y*)rzzQ(1|7x*pZ#SR#~>fmX2J-@qVH>H?dW4Dn-DO$2IuRd zf+}NEt>(J8mC~VGmKBHvWZ<$lQl9@qxrIjx+}S9nPe!^v`` zaGwf)R6;CZASft|Ce^R^!*s8-oQWzVcCQxTmplozYvg*{Xf_VD{r?CvRa1$s&rr>kuW$s8#j{=v0=o5JWz11ZESApw&=DU zU2rRsUXYUsr>P8zZCfhT;ZaClf2_u|fP89Eml>I?WL*AchCWmRlJY@-~pN1jtKNKEg&}=np{@Mt&QaTf2Mm(gx ziUCmXWHegd>Yoh2u&+oLb%16S1_FUd+_JWhJceu-&~Qy+4Bu|!nQ|6x;L&^0HYW^^ z%pQS9hPQd~=skl6mawQs#C>o0=)G4X@}1RZ9}wpDtq@`BY5?14degx&0~I>%#KeP7 zE}11ph}Ac^bg-J_AhsR6mx5ii4=B|UF-jj*n*8q!)-YlA)2BS7;{dFgCnFJ_1$`mr zaL%H!CWPuUE#4fw$&@EMb=hNVtO~YT3+C< z`sjZPc)EZMJke>n_s=zdoHY)13VZ(OXQ$MAa5lH4*SA+KEblaQ*;2;3s@`b>vVE4t zg;bF4DhPIRE%m?p@W@4gn&|Z6M=U=;=eNmvAYK)*Px%^_u&^_ST_S`8HRQ2XfW5NrKpKe(zQV}aT{(oT|z(~RxBZ*tRli$(jUJF8aZ*QSuOZzGowm<4kjXBJQK!cmT3A!Arj3yONHDD zbq7|LR=SSE5VA`}HUNuIn06LRlvwfyN%hx~a5kc8qG0HASyqYhnhv{)8*b9@eL8Ls zDe8dohOgJJ;l(e%TQ(u(;$0=epA+WJQ_;AdZUqT0Aw7?+k0FU;s>cAO4X30xV{I{F zAOB2M59%5DT=+V#aH@U)XCvNWHmt5>tM{~}(qdJs;<=^lVr1*+3S7!9l~xyMAQmha zwQO-g<4?p_2#ZNjf`dxMrH5E|_)Ze89zYeZI8kt85iTtveSW2u)mwC;8Cz5E6zl;+pv4r^VT|98@I6-I2DTvz!r!MZO7Z$GpJqz(hN}8!iSK2L!I0{Wc-K5VTGCiQ&MN#e z=?&jT^WjJT_FKs})X&hx{wMtPZEusi?mJ9=J$Q(G&c9nJA7Pddyho}m$n~)@$TKep zXM&$gDIMi*>l+_u*^z&?#94(ek?t4vSYYsw{Pm~Ge_(l%&bRvX?tAW9U-(3xs;;YHMt$hbYLUJ_G81`8=S0ffVfr`i*wy0xbvqY-~gX zLH|1_wb0$+*is8oIH1&i52f}tObDNVCd+=fBEx>3Ksmar@LA6F*m6>EFP@0J5v<&c z=@ufXND;+7rPhO(Fr>E`EGp_U^MyVic|d!D@T?>^W2wx74ErKwK!-^n^(s7Bv3f=Q25&UNYP6w__ zC~;dcfv@Gl<8HKFM8ukxgS*J<$`_s;5p-{uGgNeE7oU}XNWv+9R;9!}4d(w?uJjrE z$iJXR#GjRzj~6Bd8F6VG*?%${DyR#GwV}E%r6=h8brR0;NOBc>sa_?Y-=Dhxz1$t6?O3tI3s#pLU87y@5d`2CSkJsPOy+$-0dTp z%yA0szCUCwC|ouN4_Tw{a$+R=+e!XwD-nuvl(>C$av)KJq#)wLu{S;8o8AukCMlPF zBixX0io%TYU9_u+3)6?RtDcmkWRAnGzJ+!b4RvNvyQwcRgQDezek>w$bSU*QvmfBk zn?zjlKBOdjQj(IKlmSmL@Ku8bbp6;22=}uK5pI*$pYX>Ll(>iQ_9G@2c|4a^)o&nT z($Sun3b4i|{TKrS&!&j_j$m1yM4Y+azx<&5I@(>gH}$@Zy`S}@bj*T$==aV`3XhNv zYf|2Fof&k{f0TstAwSp|qP!*Xe!yzVKD4Az;v#lmlEPEJ8}!stM#q9Dti+Dd` zQpCM{dC=UhAE&uddg8wW8#_Jme=OJWT+)*uqo0uU#PQuiru2lw>Ayl7Tb%xnpQ|{7 zjDAAINh!0uT}|TrK@vvgO&WRgICkB+o4^6Z`Uxh{zmkAE@sj8;v*Q%)vU>NhiF8BU zIF(`~@qQB_Mjt$9XGY=Nlxsq57T6ySdWThCM} literal 0 HcmV?d00001 diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/GPBMetadata/Google/Cloud/Orchestration/Airflow/Service/V1/ImageVersions.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/GPBMetadata/Google/Cloud/Orchestration/Airflow/Service/V1/ImageVersions.php new file mode 100644 index 000000000000..6fc6f07f032c --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/GPBMetadata/Google/Cloud/Orchestration/Airflow/Service/V1/ImageVersions.php @@ -0,0 +1,49 @@ +internalAddGeneratedFile( + ' +» +Bgoogle/cloud/orchestration/airflow/service/v1/image_versions.proto-google.cloud.orchestration.airflow.service.v1google/api/client.protogoogle/type/date.proto"p +ListImageVersionsRequest +parent (  + page_size ( + +page_token (  +include_past_releases ("‰ +ListImageVersionsResponseS +image_versions ( 2;.google.cloud.orchestration.airflow.service.v1.ImageVersion +next_page_token ( "½ + ImageVersion +image_version_id (  + +is_default (! +supported_python_versions ( \' + release_date ( 2.google.type.Date +creation_disabled ( +upgrade_disabled (2É + ImageVersionsê +ListImageVersionsG.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequestH.google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse"BÚAparent‚Óä“31/v1/{parent=projects/*/locations/*}/imageVersionsKÊAcomposer.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformB‚ +1com.google.cloud.orchestration.airflow.service.v1PZKcloud.google.com/go/orchestration/airflow/service/apiv1/servicepb;servicepbbproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/GPBMetadata/Google/Cloud/Orchestration/Airflow/Service/V1/Operations.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/GPBMetadata/Google/Cloud/Orchestration/Airflow/Service/V1/Operations.php new file mode 100644 index 0000000000000000000000000000000000000000..2c420a66cb0d18c2d1a4cd39b94e5fd9a5d640be GIT binary patch literal 1505 zcmbtU%}(1u5N;p|un6i{MT$6WDH1^fTcNj5sGQgd5ov5;2dR~-$Z^kI?t&uALZKkZ6TZv*Vd>{=S)a@1v^-yn!7QBI+?ThNBzEt`LkUVZUCWuk%-5C#!4CrfY6(vIP!c1J67`pV&2$ep4&-L-IhRg&HJdXmZ7?KhU#9{ zj{)!lFOH#^ql0e%@-Iq80rp|ccuXJe;&_Nd%&-^Wue|0HIProQarcL|lO*&-o=`ZL zp^s|&FvAqKyAk0%I)RHkEzvgKGPfHtL_;rdbrky)M~qO5n>HF##PVhfO>KW3R>0v2 ztYtYi8V`~@fs7{Tesl;aVhIh8)4T=1Z7#WwbTQA)!MxYZn?;SrU0HW1X;p`(cwU1x z9_J~yISFcc5D{_@{3?Uf=S^Qe%>0#KQReJX=Il|f>pMS-ppwsc!4-J`N}_qF zT7ZSx=22VuFHq$HpkfO&`7_we**au55vnew_{OvG9S$Z-V3ne5iK@#Scun2{8w<@a zN$|K@Ow}q__bK8T4H+L_wZxU{N85`e(k-s?XICqFXVNwVi|qC+wVvP@wgcD`{J=AZ-6y>&}tcm&JCC4O#srTZMO$K z{sy4j*1A3ZueiM=6?VQCKryZS6_A{d*57fsdF#U9@p%|7>qgJu@{*7TmM-+m@){_$ z&WzT%RFo@V!`3d1q21Rk`^c}pwYRcmUtF%-#|m&S#(()>{Xb$;0v zJ^VNJHDBgTiPMd;3ZKq1*9GCoOr4S^j-VG|eh25Ijz-71G%BaFe7l#g*+I7X_YQ^N RIrbkp5~*dj$+zGZfZtZo+D!le literal 0 HcmV?d00001 diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/AirflowMetadataRetentionPolicyConfig.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/AirflowMetadataRetentionPolicyConfig.php new file mode 100644 index 000000000000..b5e79403dcb3 --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/AirflowMetadataRetentionPolicyConfig.php @@ -0,0 +1,101 @@ +google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig + */ +class AirflowMetadataRetentionPolicyConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Retention can be either enabled or disabled. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig.RetentionMode retention_mode = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $retention_mode = 0; + /** + * Optional. How many days data should be retained for. + * + * Generated from protobuf field int32 retention_days = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $retention_days = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $retention_mode + * Optional. Retention can be either enabled or disabled. + * @type int $retention_days + * Optional. How many days data should be retained for. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Retention can be either enabled or disabled. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig.RetentionMode retention_mode = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getRetentionMode() + { + return $this->retention_mode; + } + + /** + * Optional. Retention can be either enabled or disabled. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig.RetentionMode retention_mode = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setRetentionMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Orchestration\Airflow\Service\V1\AirflowMetadataRetentionPolicyConfig\RetentionMode::class); + $this->retention_mode = $var; + + return $this; + } + + /** + * Optional. How many days data should be retained for. + * + * Generated from protobuf field int32 retention_days = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getRetentionDays() + { + return $this->retention_days; + } + + /** + * Optional. How many days data should be retained for. + * + * Generated from protobuf field int32 retention_days = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setRetentionDays($var) + { + GPBUtil::checkInt32($var); + $this->retention_days = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/AirflowMetadataRetentionPolicyConfig/RetentionMode.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/AirflowMetadataRetentionPolicyConfig/RetentionMode.php new file mode 100644 index 000000000000..170ce188ab09 --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/AirflowMetadataRetentionPolicyConfig/RetentionMode.php @@ -0,0 +1,64 @@ +google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig.RetentionMode + */ +class RetentionMode +{ + /** + * Default mode doesn't change environment parameters. + * + * Generated from protobuf enum RETENTION_MODE_UNSPECIFIED = 0; + */ + const RETENTION_MODE_UNSPECIFIED = 0; + /** + * Retention policy is enabled. + * + * Generated from protobuf enum RETENTION_MODE_ENABLED = 1; + */ + const RETENTION_MODE_ENABLED = 1; + /** + * Retention policy is disabled. + * + * Generated from protobuf enum RETENTION_MODE_DISABLED = 2; + */ + const RETENTION_MODE_DISABLED = 2; + + private static $valueToName = [ + self::RETENTION_MODE_UNSPECIFIED => 'RETENTION_MODE_UNSPECIFIED', + self::RETENTION_MODE_ENABLED => 'RETENTION_MODE_ENABLED', + self::RETENTION_MODE_DISABLED => 'RETENTION_MODE_DISABLED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(RetentionMode::class, \Google\Cloud\Orchestration\Airflow\Service\V1\AirflowMetadataRetentionPolicyConfig_RetentionMode::class); + diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/CheckUpgradeRequest.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/CheckUpgradeRequest.php new file mode 100644 index 000000000000..bafe6650d072 --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/CheckUpgradeRequest.php @@ -0,0 +1,185 @@ +google.cloud.orchestration.airflow.service.v1.CheckUpgradeRequest + */ +class CheckUpgradeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the environment to check upgrade for, in the + * form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * + * Generated from protobuf field string environment = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $environment = ''; + /** + * Optional. The version of the software running in the environment. + * This encapsulates both the version of Cloud Composer functionality and the + * version of Apache Airflow. It must match the regular expression + * `composer-([0-9]+(\.[0-9]+\.[0-9]+(-preview\.[0-9]+)?)?|latest)-airflow-([0-9]+(\.[0-9]+(\.[0-9]+)?)?)`. + * When used as input, the server also checks if the provided version is + * supported and denies the request for an unsupported version. + * The Cloud Composer portion of the image version is a full + * [semantic version](https://semver.org), or an alias in the form of major + * version number or `latest`. When an alias is provided, the server replaces + * it with the current Cloud Composer version that satisfies the alias. + * The Apache Airflow portion of the image version is a full semantic version + * that points to one of the supported Apache Airflow versions, or an alias in + * the form of only major or major.minor versions specified. When an alias is + * provided, the server replaces it with the latest Apache Airflow version + * that satisfies the alias and is supported in the given Cloud Composer + * version. + * In all cases, the resolved image version is stored in the same field. + * See also [version + * list](/composer/docs/concepts/versioning/composer-versions) and [versioning + * overview](/composer/docs/concepts/versioning/composer-versioning-overview). + * + * Generated from protobuf field string image_version = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $image_version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $environment + * Required. The resource name of the environment to check upgrade for, in the + * form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * @type string $image_version + * Optional. The version of the software running in the environment. + * This encapsulates both the version of Cloud Composer functionality and the + * version of Apache Airflow. It must match the regular expression + * `composer-([0-9]+(\.[0-9]+\.[0-9]+(-preview\.[0-9]+)?)?|latest)-airflow-([0-9]+(\.[0-9]+(\.[0-9]+)?)?)`. + * When used as input, the server also checks if the provided version is + * supported and denies the request for an unsupported version. + * The Cloud Composer portion of the image version is a full + * [semantic version](https://semver.org), or an alias in the form of major + * version number or `latest`. When an alias is provided, the server replaces + * it with the current Cloud Composer version that satisfies the alias. + * The Apache Airflow portion of the image version is a full semantic version + * that points to one of the supported Apache Airflow versions, or an alias in + * the form of only major or major.minor versions specified. When an alias is + * provided, the server replaces it with the latest Apache Airflow version + * that satisfies the alias and is supported in the given Cloud Composer + * version. + * In all cases, the resolved image version is stored in the same field. + * See also [version + * list](/composer/docs/concepts/versioning/composer-versions) and [versioning + * overview](/composer/docs/concepts/versioning/composer-versioning-overview). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the environment to check upgrade for, in the + * form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * + * Generated from protobuf field string environment = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getEnvironment() + { + return $this->environment; + } + + /** + * Required. The resource name of the environment to check upgrade for, in the + * form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * + * Generated from protobuf field string environment = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setEnvironment($var) + { + GPBUtil::checkString($var, True); + $this->environment = $var; + + return $this; + } + + /** + * Optional. The version of the software running in the environment. + * This encapsulates both the version of Cloud Composer functionality and the + * version of Apache Airflow. It must match the regular expression + * `composer-([0-9]+(\.[0-9]+\.[0-9]+(-preview\.[0-9]+)?)?|latest)-airflow-([0-9]+(\.[0-9]+(\.[0-9]+)?)?)`. + * When used as input, the server also checks if the provided version is + * supported and denies the request for an unsupported version. + * The Cloud Composer portion of the image version is a full + * [semantic version](https://semver.org), or an alias in the form of major + * version number or `latest`. When an alias is provided, the server replaces + * it with the current Cloud Composer version that satisfies the alias. + * The Apache Airflow portion of the image version is a full semantic version + * that points to one of the supported Apache Airflow versions, or an alias in + * the form of only major or major.minor versions specified. When an alias is + * provided, the server replaces it with the latest Apache Airflow version + * that satisfies the alias and is supported in the given Cloud Composer + * version. + * In all cases, the resolved image version is stored in the same field. + * See also [version + * list](/composer/docs/concepts/versioning/composer-versions) and [versioning + * overview](/composer/docs/concepts/versioning/composer-versioning-overview). + * + * Generated from protobuf field string image_version = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getImageVersion() + { + return $this->image_version; + } + + /** + * Optional. The version of the software running in the environment. + * This encapsulates both the version of Cloud Composer functionality and the + * version of Apache Airflow. It must match the regular expression + * `composer-([0-9]+(\.[0-9]+\.[0-9]+(-preview\.[0-9]+)?)?|latest)-airflow-([0-9]+(\.[0-9]+(\.[0-9]+)?)?)`. + * When used as input, the server also checks if the provided version is + * supported and denies the request for an unsupported version. + * The Cloud Composer portion of the image version is a full + * [semantic version](https://semver.org), or an alias in the form of major + * version number or `latest`. When an alias is provided, the server replaces + * it with the current Cloud Composer version that satisfies the alias. + * The Apache Airflow portion of the image version is a full semantic version + * that points to one of the supported Apache Airflow versions, or an alias in + * the form of only major or major.minor versions specified. When an alias is + * provided, the server replaces it with the latest Apache Airflow version + * that satisfies the alias and is supported in the given Cloud Composer + * version. + * In all cases, the resolved image version is stored in the same field. + * See also [version + * list](/composer/docs/concepts/versioning/composer-versions) and [versioning + * overview](/composer/docs/concepts/versioning/composer-versioning-overview). + * + * Generated from protobuf field string image_version = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setImageVersion($var) + { + GPBUtil::checkString($var, True); + $this->image_version = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/CheckUpgradeResponse.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/CheckUpgradeResponse.php new file mode 100644 index 000000000000..e62502ad25a1 --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/CheckUpgradeResponse.php @@ -0,0 +1,212 @@ +google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse + */ +class CheckUpgradeResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Url for a docker build log of an upgraded image. + * + * Generated from protobuf field string build_log_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $build_log_uri = ''; + /** + * Output only. Whether build has succeeded or failed on modules conflicts. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse.ConflictResult contains_pypi_modules_conflict = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $contains_pypi_modules_conflict = 0; + /** + * Output only. Extract from a docker image build log containing information + * about pypi modules conflicts. + * + * Generated from protobuf field string pypi_conflict_build_log_extract = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $pypi_conflict_build_log_extract = ''; + /** + * Composer image for which the build was happening. + * + * Generated from protobuf field string image_version = 5; + */ + protected $image_version = ''; + /** + * Pypi dependencies specified in the environment configuration, at the time + * when the build was triggered. + * + * Generated from protobuf field map pypi_dependencies = 6; + */ + private $pypi_dependencies; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $build_log_uri + * Output only. Url for a docker build log of an upgraded image. + * @type int $contains_pypi_modules_conflict + * Output only. Whether build has succeeded or failed on modules conflicts. + * @type string $pypi_conflict_build_log_extract + * Output only. Extract from a docker image build log containing information + * about pypi modules conflicts. + * @type string $image_version + * Composer image for which the build was happening. + * @type array|\Google\Protobuf\Internal\MapField $pypi_dependencies + * Pypi dependencies specified in the environment configuration, at the time + * when the build was triggered. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Url for a docker build log of an upgraded image. + * + * Generated from protobuf field string build_log_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getBuildLogUri() + { + return $this->build_log_uri; + } + + /** + * Output only. Url for a docker build log of an upgraded image. + * + * Generated from protobuf field string build_log_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setBuildLogUri($var) + { + GPBUtil::checkString($var, True); + $this->build_log_uri = $var; + + return $this; + } + + /** + * Output only. Whether build has succeeded or failed on modules conflicts. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse.ConflictResult contains_pypi_modules_conflict = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getContainsPypiModulesConflict() + { + return $this->contains_pypi_modules_conflict; + } + + /** + * Output only. Whether build has succeeded or failed on modules conflicts. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse.ConflictResult contains_pypi_modules_conflict = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setContainsPypiModulesConflict($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Orchestration\Airflow\Service\V1\CheckUpgradeResponse\ConflictResult::class); + $this->contains_pypi_modules_conflict = $var; + + return $this; + } + + /** + * Output only. Extract from a docker image build log containing information + * about pypi modules conflicts. + * + * Generated from protobuf field string pypi_conflict_build_log_extract = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getPypiConflictBuildLogExtract() + { + return $this->pypi_conflict_build_log_extract; + } + + /** + * Output only. Extract from a docker image build log containing information + * about pypi modules conflicts. + * + * Generated from protobuf field string pypi_conflict_build_log_extract = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setPypiConflictBuildLogExtract($var) + { + GPBUtil::checkString($var, True); + $this->pypi_conflict_build_log_extract = $var; + + return $this; + } + + /** + * Composer image for which the build was happening. + * + * Generated from protobuf field string image_version = 5; + * @return string + */ + public function getImageVersion() + { + return $this->image_version; + } + + /** + * Composer image for which the build was happening. + * + * Generated from protobuf field string image_version = 5; + * @param string $var + * @return $this + */ + public function setImageVersion($var) + { + GPBUtil::checkString($var, True); + $this->image_version = $var; + + return $this; + } + + /** + * Pypi dependencies specified in the environment configuration, at the time + * when the build was triggered. + * + * Generated from protobuf field map pypi_dependencies = 6; + * @return \Google\Protobuf\Internal\MapField + */ + public function getPypiDependencies() + { + return $this->pypi_dependencies; + } + + /** + * Pypi dependencies specified in the environment configuration, at the time + * when the build was triggered. + * + * Generated from protobuf field map pypi_dependencies = 6; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setPypiDependencies($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->pypi_dependencies = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/CheckUpgradeResponse/ConflictResult.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/CheckUpgradeResponse/ConflictResult.php new file mode 100644 index 000000000000..967c0ca021fa --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/CheckUpgradeResponse/ConflictResult.php @@ -0,0 +1,64 @@ +google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse.ConflictResult + */ +class ConflictResult +{ + /** + * It is unknown whether build had conflicts or not. + * + * Generated from protobuf enum CONFLICT_RESULT_UNSPECIFIED = 0; + */ + const CONFLICT_RESULT_UNSPECIFIED = 0; + /** + * There were python packages conflicts. + * + * Generated from protobuf enum CONFLICT = 1; + */ + const CONFLICT = 1; + /** + * There were no python packages conflicts. + * + * Generated from protobuf enum NO_CONFLICT = 2; + */ + const NO_CONFLICT = 2; + + private static $valueToName = [ + self::CONFLICT_RESULT_UNSPECIFIED => 'CONFLICT_RESULT_UNSPECIFIED', + self::CONFLICT => 'CONFLICT', + self::NO_CONFLICT => 'NO_CONFLICT', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ConflictResult::class, \Google\Cloud\Orchestration\Airflow\Service\V1\CheckUpgradeResponse_ConflictResult::class); + diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/CloudDataLineageIntegration.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/CloudDataLineageIntegration.php new file mode 100644 index 000000000000..40148f22a1c0 --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/CloudDataLineageIntegration.php @@ -0,0 +1,67 @@ +google.cloud.orchestration.airflow.service.v1.CloudDataLineageIntegration + */ +class CloudDataLineageIntegration extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Whether or not Cloud Data Lineage integration is enabled. + * + * Generated from protobuf field bool enabled = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $enabled = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $enabled + * Optional. Whether or not Cloud Data Lineage integration is enabled. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Whether or not Cloud Data Lineage integration is enabled. + * + * Generated from protobuf field bool enabled = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getEnabled() + { + return $this->enabled; + } + + /** + * Optional. Whether or not Cloud Data Lineage integration is enabled. + * + * Generated from protobuf field bool enabled = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setEnabled($var) + { + GPBUtil::checkBool($var); + $this->enabled = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/CreateEnvironmentRequest.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/CreateEnvironmentRequest.php new file mode 100644 index 000000000000..c18885d24d38 --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/CreateEnvironmentRequest.php @@ -0,0 +1,131 @@ +google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest + */ +class CreateEnvironmentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The parent must be of the form + * "projects/{projectId}/locations/{locationId}". + * + * Generated from protobuf field string parent = 1; + */ + protected $parent = ''; + /** + * The environment to create. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.Environment environment = 2; + */ + protected $environment = null; + + /** + * @param string $parent The parent must be of the form + * "projects/{projectId}/locations/{locationId}". + * @param \Google\Cloud\Orchestration\Airflow\Service\V1\Environment $environment The environment to create. + * + * @return \Google\Cloud\Orchestration\Airflow\Service\V1\CreateEnvironmentRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Orchestration\Airflow\Service\V1\Environment $environment): self + { + return (new self()) + ->setParent($parent) + ->setEnvironment($environment); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * The parent must be of the form + * "projects/{projectId}/locations/{locationId}". + * @type \Google\Cloud\Orchestration\Airflow\Service\V1\Environment $environment + * The environment to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); + parent::__construct($data); + } + + /** + * The parent must be of the form + * "projects/{projectId}/locations/{locationId}". + * + * Generated from protobuf field string parent = 1; + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * The parent must be of the form + * "projects/{projectId}/locations/{locationId}". + * + * Generated from protobuf field string parent = 1; + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The environment to create. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.Environment environment = 2; + * @return \Google\Cloud\Orchestration\Airflow\Service\V1\Environment|null + */ + public function getEnvironment() + { + return $this->environment; + } + + public function hasEnvironment() + { + return isset($this->environment); + } + + public function clearEnvironment() + { + unset($this->environment); + } + + /** + * The environment to create. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.Environment environment = 2; + * @param \Google\Cloud\Orchestration\Airflow\Service\V1\Environment $var + * @return $this + */ + public function setEnvironment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Orchestration\Airflow\Service\V1\Environment::class); + $this->environment = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/CreateUserWorkloadsConfigMapRequest.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/CreateUserWorkloadsConfigMapRequest.php new file mode 100644 index 000000000000..3c9d6d95fcba --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/CreateUserWorkloadsConfigMapRequest.php @@ -0,0 +1,132 @@ +google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsConfigMapRequest + */ +class CreateUserWorkloadsConfigMapRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The environment name to create a ConfigMap for, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. User workloads ConfigMap to create. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap user_workloads_config_map = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $user_workloads_config_map = null; + + /** + * @param string $parent Required. The environment name to create a ConfigMap for, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * Please see {@see EnvironmentsClient::environmentName()} for help formatting this field. + * @param \Google\Cloud\Orchestration\Airflow\Service\V1\UserWorkloadsConfigMap $userWorkloadsConfigMap Required. User workloads ConfigMap to create. + * + * @return \Google\Cloud\Orchestration\Airflow\Service\V1\CreateUserWorkloadsConfigMapRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Orchestration\Airflow\Service\V1\UserWorkloadsConfigMap $userWorkloadsConfigMap): self + { + return (new self()) + ->setParent($parent) + ->setUserWorkloadsConfigMap($userWorkloadsConfigMap); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The environment name to create a ConfigMap for, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * @type \Google\Cloud\Orchestration\Airflow\Service\V1\UserWorkloadsConfigMap $user_workloads_config_map + * Required. User workloads ConfigMap to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); + parent::__construct($data); + } + + /** + * Required. The environment name to create a ConfigMap for, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The environment name to create a ConfigMap for, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. User workloads ConfigMap to create. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap user_workloads_config_map = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Orchestration\Airflow\Service\V1\UserWorkloadsConfigMap|null + */ + public function getUserWorkloadsConfigMap() + { + return $this->user_workloads_config_map; + } + + public function hasUserWorkloadsConfigMap() + { + return isset($this->user_workloads_config_map); + } + + public function clearUserWorkloadsConfigMap() + { + unset($this->user_workloads_config_map); + } + + /** + * Required. User workloads ConfigMap to create. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap user_workloads_config_map = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Orchestration\Airflow\Service\V1\UserWorkloadsConfigMap $var + * @return $this + */ + public function setUserWorkloadsConfigMap($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Orchestration\Airflow\Service\V1\UserWorkloadsConfigMap::class); + $this->user_workloads_config_map = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/CreateUserWorkloadsSecretRequest.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/CreateUserWorkloadsSecretRequest.php new file mode 100644 index 000000000000..483f8bb4f3c3 --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/CreateUserWorkloadsSecretRequest.php @@ -0,0 +1,132 @@ +google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsSecretRequest + */ +class CreateUserWorkloadsSecretRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The environment name to create a Secret for, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. User workloads Secret to create. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret user_workloads_secret = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $user_workloads_secret = null; + + /** + * @param string $parent Required. The environment name to create a Secret for, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * Please see {@see EnvironmentsClient::environmentName()} for help formatting this field. + * @param \Google\Cloud\Orchestration\Airflow\Service\V1\UserWorkloadsSecret $userWorkloadsSecret Required. User workloads Secret to create. + * + * @return \Google\Cloud\Orchestration\Airflow\Service\V1\CreateUserWorkloadsSecretRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Orchestration\Airflow\Service\V1\UserWorkloadsSecret $userWorkloadsSecret): self + { + return (new self()) + ->setParent($parent) + ->setUserWorkloadsSecret($userWorkloadsSecret); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The environment name to create a Secret for, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * @type \Google\Cloud\Orchestration\Airflow\Service\V1\UserWorkloadsSecret $user_workloads_secret + * Required. User workloads Secret to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); + parent::__construct($data); + } + + /** + * Required. The environment name to create a Secret for, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The environment name to create a Secret for, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. User workloads Secret to create. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret user_workloads_secret = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Orchestration\Airflow\Service\V1\UserWorkloadsSecret|null + */ + public function getUserWorkloadsSecret() + { + return $this->user_workloads_secret; + } + + public function hasUserWorkloadsSecret() + { + return isset($this->user_workloads_secret); + } + + public function clearUserWorkloadsSecret() + { + unset($this->user_workloads_secret); + } + + /** + * Required. User workloads Secret to create. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret user_workloads_secret = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Orchestration\Airflow\Service\V1\UserWorkloadsSecret $var + * @return $this + */ + public function setUserWorkloadsSecret($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Orchestration\Airflow\Service\V1\UserWorkloadsSecret::class); + $this->user_workloads_secret = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/DataRetentionConfig.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/DataRetentionConfig.php new file mode 100644 index 000000000000..c5d884f8ebc9 --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/DataRetentionConfig.php @@ -0,0 +1,121 @@ +google.cloud.orchestration.airflow.service.v1.DataRetentionConfig + */ +class DataRetentionConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The retention policy for airflow metadata database. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig airflow_metadata_retention_config = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $airflow_metadata_retention_config = null; + /** + * Optional. The configuration settings for task logs retention + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig task_logs_retention_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $task_logs_retention_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Orchestration\Airflow\Service\V1\AirflowMetadataRetentionPolicyConfig $airflow_metadata_retention_config + * Optional. The retention policy for airflow metadata database. + * @type \Google\Cloud\Orchestration\Airflow\Service\V1\TaskLogsRetentionConfig $task_logs_retention_config + * Optional. The configuration settings for task logs retention + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The retention policy for airflow metadata database. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig airflow_metadata_retention_config = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Orchestration\Airflow\Service\V1\AirflowMetadataRetentionPolicyConfig|null + */ + public function getAirflowMetadataRetentionConfig() + { + return $this->airflow_metadata_retention_config; + } + + public function hasAirflowMetadataRetentionConfig() + { + return isset($this->airflow_metadata_retention_config); + } + + public function clearAirflowMetadataRetentionConfig() + { + unset($this->airflow_metadata_retention_config); + } + + /** + * Optional. The retention policy for airflow metadata database. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig airflow_metadata_retention_config = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Orchestration\Airflow\Service\V1\AirflowMetadataRetentionPolicyConfig $var + * @return $this + */ + public function setAirflowMetadataRetentionConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Orchestration\Airflow\Service\V1\AirflowMetadataRetentionPolicyConfig::class); + $this->airflow_metadata_retention_config = $var; + + return $this; + } + + /** + * Optional. The configuration settings for task logs retention + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig task_logs_retention_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Orchestration\Airflow\Service\V1\TaskLogsRetentionConfig|null + */ + public function getTaskLogsRetentionConfig() + { + return $this->task_logs_retention_config; + } + + public function hasTaskLogsRetentionConfig() + { + return isset($this->task_logs_retention_config); + } + + public function clearTaskLogsRetentionConfig() + { + unset($this->task_logs_retention_config); + } + + /** + * Optional. The configuration settings for task logs retention + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig task_logs_retention_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Orchestration\Airflow\Service\V1\TaskLogsRetentionConfig $var + * @return $this + */ + public function setTaskLogsRetentionConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Orchestration\Airflow\Service\V1\TaskLogsRetentionConfig::class); + $this->task_logs_retention_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/DatabaseConfig.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/DatabaseConfig.php new file mode 100644 index 000000000000..bc15000dc1a5 --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/DatabaseConfig.php @@ -0,0 +1,134 @@ +google.cloud.orchestration.airflow.service.v1.DatabaseConfig + */ +class DatabaseConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Cloud SQL machine type used by Airflow database. + * It has to be one of: db-n1-standard-2, db-n1-standard-4, db-n1-standard-8 + * or db-n1-standard-16. If not specified, db-n1-standard-2 will be used. + * Supported for Cloud Composer environments in versions + * composer-1.*.*-airflow-*.*.*. + * + * Generated from protobuf field string machine_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $machine_type = ''; + /** + * Optional. The Compute Engine zone where the Airflow database is created. If + * zone is provided, it must be in the region selected for the environment. If + * zone is not provided, a zone is automatically selected. The zone can only + * be set during environment creation. Supported for Cloud Composer + * environments in versions composer-2.*.*-airflow-*.*.*. + * + * Generated from protobuf field string zone = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $zone = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $machine_type + * Optional. Cloud SQL machine type used by Airflow database. + * It has to be one of: db-n1-standard-2, db-n1-standard-4, db-n1-standard-8 + * or db-n1-standard-16. If not specified, db-n1-standard-2 will be used. + * Supported for Cloud Composer environments in versions + * composer-1.*.*-airflow-*.*.*. + * @type string $zone + * Optional. The Compute Engine zone where the Airflow database is created. If + * zone is provided, it must be in the region selected for the environment. If + * zone is not provided, a zone is automatically selected. The zone can only + * be set during environment creation. Supported for Cloud Composer + * environments in versions composer-2.*.*-airflow-*.*.*. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Cloud SQL machine type used by Airflow database. + * It has to be one of: db-n1-standard-2, db-n1-standard-4, db-n1-standard-8 + * or db-n1-standard-16. If not specified, db-n1-standard-2 will be used. + * Supported for Cloud Composer environments in versions + * composer-1.*.*-airflow-*.*.*. + * + * Generated from protobuf field string machine_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getMachineType() + { + return $this->machine_type; + } + + /** + * Optional. Cloud SQL machine type used by Airflow database. + * It has to be one of: db-n1-standard-2, db-n1-standard-4, db-n1-standard-8 + * or db-n1-standard-16. If not specified, db-n1-standard-2 will be used. + * Supported for Cloud Composer environments in versions + * composer-1.*.*-airflow-*.*.*. + * + * Generated from protobuf field string machine_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setMachineType($var) + { + GPBUtil::checkString($var, True); + $this->machine_type = $var; + + return $this; + } + + /** + * Optional. The Compute Engine zone where the Airflow database is created. If + * zone is provided, it must be in the region selected for the environment. If + * zone is not provided, a zone is automatically selected. The zone can only + * be set during environment creation. Supported for Cloud Composer + * environments in versions composer-2.*.*-airflow-*.*.*. + * + * Generated from protobuf field string zone = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getZone() + { + return $this->zone; + } + + /** + * Optional. The Compute Engine zone where the Airflow database is created. If + * zone is provided, it must be in the region selected for the environment. If + * zone is not provided, a zone is automatically selected. The zone can only + * be set during environment creation. Supported for Cloud Composer + * environments in versions composer-2.*.*-airflow-*.*.*. + * + * Generated from protobuf field string zone = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setZone($var) + { + GPBUtil::checkString($var, True); + $this->zone = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/DatabaseFailoverRequest.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/DatabaseFailoverRequest.php new file mode 100644 index 000000000000..ab6e640265f2 --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/DatabaseFailoverRequest.php @@ -0,0 +1,72 @@ +google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest + */ +class DatabaseFailoverRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Target environment: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * + * Generated from protobuf field string environment = 1; + */ + protected $environment = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $environment + * Target environment: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); + parent::__construct($data); + } + + /** + * Target environment: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * + * Generated from protobuf field string environment = 1; + * @return string + */ + public function getEnvironment() + { + return $this->environment; + } + + /** + * Target environment: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * + * Generated from protobuf field string environment = 1; + * @param string $var + * @return $this + */ + public function setEnvironment($var) + { + GPBUtil::checkString($var, True); + $this->environment = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/DatabaseFailoverResponse.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/DatabaseFailoverResponse.php new file mode 100644 index 000000000000..87249c1f5d8a --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/DatabaseFailoverResponse.php @@ -0,0 +1,33 @@ +google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse + */ +class DatabaseFailoverResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/DeleteEnvironmentRequest.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/DeleteEnvironmentRequest.php new file mode 100644 index 000000000000..dbecadf7a50f --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/DeleteEnvironmentRequest.php @@ -0,0 +1,85 @@ +google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest + */ +class DeleteEnvironmentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The environment to delete, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + + /** + * @param string $name The environment to delete, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * + * @return \Google\Cloud\Orchestration\Airflow\Service\V1\DeleteEnvironmentRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The environment to delete, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); + parent::__construct($data); + } + + /** + * The environment to delete, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The environment to delete, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/DeleteUserWorkloadsConfigMapRequest.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/DeleteUserWorkloadsConfigMapRequest.php new file mode 100644 index 000000000000..45de5167d11a --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/DeleteUserWorkloadsConfigMapRequest.php @@ -0,0 +1,86 @@ +google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsConfigMapRequest + */ +class DeleteUserWorkloadsConfigMapRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The ConfigMap to delete, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsConfigMaps/{userWorkloadsConfigMapId}" + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The ConfigMap to delete, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsConfigMaps/{userWorkloadsConfigMapId}" + * Please see {@see EnvironmentsClient::userWorkloadsConfigMapName()} for help formatting this field. + * + * @return \Google\Cloud\Orchestration\Airflow\Service\V1\DeleteUserWorkloadsConfigMapRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The ConfigMap to delete, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsConfigMaps/{userWorkloadsConfigMapId}" + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); + parent::__construct($data); + } + + /** + * Required. The ConfigMap to delete, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsConfigMaps/{userWorkloadsConfigMapId}" + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The ConfigMap to delete, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsConfigMaps/{userWorkloadsConfigMapId}" + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/DeleteUserWorkloadsSecretRequest.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/DeleteUserWorkloadsSecretRequest.php new file mode 100644 index 000000000000..eca0bab9c9fb --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/DeleteUserWorkloadsSecretRequest.php @@ -0,0 +1,86 @@ +google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsSecretRequest + */ +class DeleteUserWorkloadsSecretRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The Secret to delete, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsSecrets/{userWorkloadsSecretId}" + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The Secret to delete, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsSecrets/{userWorkloadsSecretId}" + * Please see {@see EnvironmentsClient::userWorkloadsSecretName()} for help formatting this field. + * + * @return \Google\Cloud\Orchestration\Airflow\Service\V1\DeleteUserWorkloadsSecretRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The Secret to delete, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsSecrets/{userWorkloadsSecretId}" + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); + parent::__construct($data); + } + + /** + * Required. The Secret to delete, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsSecrets/{userWorkloadsSecretId}" + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The Secret to delete, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsSecrets/{userWorkloadsSecretId}" + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/EncryptionConfig.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/EncryptionConfig.php new file mode 100644 index 000000000000..c8d5d8e29fc8 --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/EncryptionConfig.php @@ -0,0 +1,77 @@ +google.cloud.orchestration.airflow.service.v1.EncryptionConfig + */ +class EncryptionConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Customer-managed Encryption Key available through Google's Key + * Management Service. Cannot be updated. If not specified, Google-managed key + * will be used. + * + * Generated from protobuf field string kms_key_name = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $kms_key_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kms_key_name + * Optional. Customer-managed Encryption Key available through Google's Key + * Management Service. Cannot be updated. If not specified, Google-managed key + * will be used. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Customer-managed Encryption Key available through Google's Key + * Management Service. Cannot be updated. If not specified, Google-managed key + * will be used. + * + * Generated from protobuf field string kms_key_name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getKmsKeyName() + { + return $this->kms_key_name; + } + + /** + * Optional. Customer-managed Encryption Key available through Google's Key + * Management Service. Cannot be updated. If not specified, Google-managed key + * will be used. + * + * Generated from protobuf field string kms_key_name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setKmsKeyName($var) + { + GPBUtil::checkString($var, True); + $this->kms_key_name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/Environment.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/Environment.php new file mode 100644 index 000000000000..9173036393bc --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/Environment.php @@ -0,0 +1,453 @@ +google.cloud.orchestration.airflow.service.v1.Environment + */ +class Environment extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The resource name of the environment, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * EnvironmentId must start with a lowercase letter followed by up to 63 + * lowercase letters, numbers, or hyphens, and cannot end with a hyphen. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Optional. Configuration parameters for this environment. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.EnvironmentConfig config = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $config = null; + /** + * Output only. The UUID (Universally Unique IDentifier) associated with this + * environment. This value is generated when the environment is created. + * + * Generated from protobuf field string uuid = 3; + */ + protected $uuid = ''; + /** + * The current state of the environment. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.Environment.State state = 4; + */ + protected $state = 0; + /** + * Output only. The time at which this environment was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 5; + */ + protected $create_time = null; + /** + * Output only. The time at which this environment was last modified. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 6; + */ + protected $update_time = null; + /** + * Optional. User-defined labels for this environment. + * The labels map can contain no more than 64 entries. Entries of the labels + * map are UTF8 strings that comply with the following restrictions: + * * Keys must conform to regexp: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62} + * * Values must conform to regexp: [\p{Ll}\p{Lo}\p{N}_-]{0,63} + * * Both keys and values are additionally constrained to be <= 128 bytes in + * size. + * + * Generated from protobuf field map labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Output only. Reserved for future use. + * + * Generated from protobuf field bool satisfies_pzs = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $satisfies_pzs = false; + /** + * Output only. Reserved for future use. + * + * Generated from protobuf field bool satisfies_pzi = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $satisfies_pzi = false; + /** + * Optional. Storage configuration for this environment. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.StorageConfig storage_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $storage_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The resource name of the environment, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * EnvironmentId must start with a lowercase letter followed by up to 63 + * lowercase letters, numbers, or hyphens, and cannot end with a hyphen. + * @type \Google\Cloud\Orchestration\Airflow\Service\V1\EnvironmentConfig $config + * Optional. Configuration parameters for this environment. + * @type string $uuid + * Output only. The UUID (Universally Unique IDentifier) associated with this + * environment. This value is generated when the environment is created. + * @type int $state + * The current state of the environment. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time at which this environment was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The time at which this environment was last modified. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. User-defined labels for this environment. + * The labels map can contain no more than 64 entries. Entries of the labels + * map are UTF8 strings that comply with the following restrictions: + * * Keys must conform to regexp: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62} + * * Values must conform to regexp: [\p{Ll}\p{Lo}\p{N}_-]{0,63} + * * Both keys and values are additionally constrained to be <= 128 bytes in + * size. + * @type bool $satisfies_pzs + * Output only. Reserved for future use. + * @type bool $satisfies_pzi + * Output only. Reserved for future use. + * @type \Google\Cloud\Orchestration\Airflow\Service\V1\StorageConfig $storage_config + * Optional. Storage configuration for this environment. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The resource name of the environment, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * EnvironmentId must start with a lowercase letter followed by up to 63 + * lowercase letters, numbers, or hyphens, and cannot end with a hyphen. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The resource name of the environment, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * EnvironmentId must start with a lowercase letter followed by up to 63 + * lowercase letters, numbers, or hyphens, and cannot end with a hyphen. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. Configuration parameters for this environment. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.EnvironmentConfig config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Orchestration\Airflow\Service\V1\EnvironmentConfig|null + */ + public function getConfig() + { + return $this->config; + } + + public function hasConfig() + { + return isset($this->config); + } + + public function clearConfig() + { + unset($this->config); + } + + /** + * Optional. Configuration parameters for this environment. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.EnvironmentConfig config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Orchestration\Airflow\Service\V1\EnvironmentConfig $var + * @return $this + */ + public function setConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Orchestration\Airflow\Service\V1\EnvironmentConfig::class); + $this->config = $var; + + return $this; + } + + /** + * Output only. The UUID (Universally Unique IDentifier) associated with this + * environment. This value is generated when the environment is created. + * + * Generated from protobuf field string uuid = 3; + * @return string + */ + public function getUuid() + { + return $this->uuid; + } + + /** + * Output only. The UUID (Universally Unique IDentifier) associated with this + * environment. This value is generated when the environment is created. + * + * Generated from protobuf field string uuid = 3; + * @param string $var + * @return $this + */ + public function setUuid($var) + { + GPBUtil::checkString($var, True); + $this->uuid = $var; + + return $this; + } + + /** + * The current state of the environment. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.Environment.State state = 4; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * The current state of the environment. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.Environment.State state = 4; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Orchestration\Airflow\Service\V1\Environment\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. The time at which this environment was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 5; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The time at which this environment was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 5; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The time at which this environment was last modified. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 6; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The time at which this environment was last modified. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 6; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Optional. User-defined labels for this environment. + * The labels map can contain no more than 64 entries. Entries of the labels + * map are UTF8 strings that comply with the following restrictions: + * * Keys must conform to regexp: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62} + * * Values must conform to regexp: [\p{Ll}\p{Lo}\p{N}_-]{0,63} + * * Both keys and values are additionally constrained to be <= 128 bytes in + * size. + * + * Generated from protobuf field map labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. User-defined labels for this environment. + * The labels map can contain no more than 64 entries. Entries of the labels + * map are UTF8 strings that comply with the following restrictions: + * * Keys must conform to regexp: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62} + * * Values must conform to regexp: [\p{Ll}\p{Lo}\p{N}_-]{0,63} + * * Both keys and values are additionally constrained to be <= 128 bytes in + * size. + * + * Generated from protobuf field map labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Output only. Reserved for future use. + * + * Generated from protobuf field bool satisfies_pzs = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getSatisfiesPzs() + { + return $this->satisfies_pzs; + } + + /** + * Output only. Reserved for future use. + * + * Generated from protobuf field bool satisfies_pzs = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setSatisfiesPzs($var) + { + GPBUtil::checkBool($var); + $this->satisfies_pzs = $var; + + return $this; + } + + /** + * Output only. Reserved for future use. + * + * Generated from protobuf field bool satisfies_pzi = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getSatisfiesPzi() + { + return $this->satisfies_pzi; + } + + /** + * Output only. Reserved for future use. + * + * Generated from protobuf field bool satisfies_pzi = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setSatisfiesPzi($var) + { + GPBUtil::checkBool($var); + $this->satisfies_pzi = $var; + + return $this; + } + + /** + * Optional. Storage configuration for this environment. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.StorageConfig storage_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Orchestration\Airflow\Service\V1\StorageConfig|null + */ + public function getStorageConfig() + { + return $this->storage_config; + } + + public function hasStorageConfig() + { + return isset($this->storage_config); + } + + public function clearStorageConfig() + { + unset($this->storage_config); + } + + /** + * Optional. Storage configuration for this environment. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.StorageConfig storage_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Orchestration\Airflow\Service\V1\StorageConfig $var + * @return $this + */ + public function setStorageConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Orchestration\Airflow\Service\V1\StorageConfig::class); + $this->storage_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/Environment/State.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/Environment/State.php new file mode 100644 index 000000000000..eb7f15efa845 --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/Environment/State.php @@ -0,0 +1,86 @@ +google.cloud.orchestration.airflow.service.v1.Environment.State + */ +class State +{ + /** + * The state of the environment is unknown. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The environment is in the process of being created. + * + * Generated from protobuf enum CREATING = 1; + */ + const CREATING = 1; + /** + * The environment is currently running and healthy. It is ready for use. + * + * Generated from protobuf enum RUNNING = 2; + */ + const RUNNING = 2; + /** + * The environment is being updated. It remains usable but cannot receive + * additional update requests or be deleted at this time. + * + * Generated from protobuf enum UPDATING = 3; + */ + const UPDATING = 3; + /** + * The environment is undergoing deletion. It cannot be used. + * + * Generated from protobuf enum DELETING = 4; + */ + const DELETING = 4; + /** + * The environment has encountered an error and cannot be used. + * + * Generated from protobuf enum ERROR = 5; + */ + const ERROR = 5; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::CREATING => 'CREATING', + self::RUNNING => 'RUNNING', + self::UPDATING => 'UPDATING', + self::DELETING => 'DELETING', + self::ERROR => 'ERROR', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\Orchestration\Airflow\Service\V1\Environment_State::class); + diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/EnvironmentConfig.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/EnvironmentConfig.php new file mode 100644 index 000000000000..81fdfdb3e32b --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/EnvironmentConfig.php @@ -0,0 +1,979 @@ +google.cloud.orchestration.airflow.service.v1.EnvironmentConfig + */ +class EnvironmentConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The Kubernetes Engine cluster used to run this environment. + * + * Generated from protobuf field string gke_cluster = 1; + */ + protected $gke_cluster = ''; + /** + * Output only. The Cloud Storage prefix of the DAGs for this environment. + * Although Cloud Storage objects reside in a flat namespace, a hierarchical + * file tree can be simulated using "/"-delimited object name prefixes. DAG + * objects for this environment reside in a simulated directory with the given + * prefix. + * + * Generated from protobuf field string dag_gcs_prefix = 2; + */ + protected $dag_gcs_prefix = ''; + /** + * The number of nodes in the Kubernetes Engine cluster that will be + * used to run this environment. + * This field is supported for Cloud Composer environments in versions + * composer-1.*.*-airflow-*.*.*. + * + * Generated from protobuf field int32 node_count = 3; + */ + protected $node_count = 0; + /** + * Optional. The configuration settings for software inside the environment. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.SoftwareConfig software_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $software_config = null; + /** + * Optional. The configuration used for the Kubernetes Engine cluster. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.NodeConfig node_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $node_config = null; + /** + * Optional. The configuration used for the Private IP Cloud Composer + * environment. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig private_environment_config = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $private_environment_config = null; + /** + * Optional. The network-level access control policy for the Airflow web + * server. If unspecified, no network-level access restrictions will be + * applied. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl web_server_network_access_control = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $web_server_network_access_control = null; + /** + * Optional. The configuration settings for Cloud SQL instance used internally + * by Apache Airflow software. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.DatabaseConfig database_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $database_config = null; + /** + * Optional. The configuration settings for the Airflow web server App Engine + * instance. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.WebServerConfig web_server_config = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $web_server_config = null; + /** + * Optional. The encryption options for the Cloud Composer environment + * and its dependencies. Cannot be updated. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.EncryptionConfig encryption_config = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $encryption_config = null; + /** + * Optional. The maintenance window is the period when Cloud Composer + * components may undergo maintenance. It is defined so that maintenance is + * not executed during peak hours or critical time periods. + * The system will not be under maintenance for every occurrence of this + * window, but when maintenance is planned, it will be scheduled + * during the window. + * The maintenance window period must encompass at least 12 hours per week. + * This may be split into multiple chunks, each with a size of + * at least 4 hours. + * If this value is omitted, the default value for maintenance window is + * applied. By default, maintenance windows are from 00:00:00 to 04:00:00 + * (GMT) on Friday, Saturday, and Sunday every week. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.MaintenanceWindow maintenance_window = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $maintenance_window = null; + /** + * Optional. The workloads configuration settings for the GKE cluster + * associated with the Cloud Composer environment. The GKE cluster runs + * Airflow scheduler, web server and workers workloads. + * This field is supported for Cloud Composer environments in versions + * composer-2.*.*-airflow-*.*.* and newer. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.WorkloadsConfig workloads_config = 15 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $workloads_config = null; + /** + * Optional. The size of the Cloud Composer environment. + * This field is supported for Cloud Composer environments in versions + * composer-2.*.*-airflow-*.*.* and newer. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.EnvironmentSize environment_size = 16 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $environment_size = 0; + /** + * Output only. The URI of the Apache Airflow Web UI hosted within this + * environment (see [Airflow web + * interface](/composer/docs/how-to/accessing/airflow-web-interface)). + * + * Generated from protobuf field string airflow_uri = 6; + */ + protected $airflow_uri = ''; + /** + * Output only. The 'bring your own identity' variant of the URI of the Apache + * Airflow Web UI hosted within this environment, to be accessed with external + * identities using workforce identity federation (see [Access environments + * with workforce identity + * federation](/composer/docs/composer-2/access-environments-with-workforce-identity-federation)). + * + * Generated from protobuf field string airflow_byoid_uri = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $airflow_byoid_uri = ''; + /** + * Optional. The configuration options for GKE cluster master authorized + * networks. By default master authorized networks feature is: + * - in case of private environment: enabled with no external networks + * allowlisted. + * - in case of public environment: disabled. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig master_authorized_networks_config = 17 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $master_authorized_networks_config = null; + /** + * Optional. The Recovery settings configuration of an environment. + * This field is supported for Cloud Composer environments in versions + * composer-2.*.*-airflow-*.*.* and newer. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.RecoveryConfig recovery_config = 18 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $recovery_config = null; + /** + * Optional. Resilience mode of the Cloud Composer Environment. + * This field is supported for Cloud Composer environments in versions + * composer-2.2.0-airflow-*.*.* and newer. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.ResilienceMode resilience_mode = 19 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $resilience_mode = 0; + /** + * Optional. The configuration setting for Airflow database data retention + * mechanism. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.DataRetentionConfig data_retention_config = 21 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $data_retention_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $gke_cluster + * Output only. The Kubernetes Engine cluster used to run this environment. + * @type string $dag_gcs_prefix + * Output only. The Cloud Storage prefix of the DAGs for this environment. + * Although Cloud Storage objects reside in a flat namespace, a hierarchical + * file tree can be simulated using "/"-delimited object name prefixes. DAG + * objects for this environment reside in a simulated directory with the given + * prefix. + * @type int $node_count + * The number of nodes in the Kubernetes Engine cluster that will be + * used to run this environment. + * This field is supported for Cloud Composer environments in versions + * composer-1.*.*-airflow-*.*.*. + * @type \Google\Cloud\Orchestration\Airflow\Service\V1\SoftwareConfig $software_config + * Optional. The configuration settings for software inside the environment. + * @type \Google\Cloud\Orchestration\Airflow\Service\V1\NodeConfig $node_config + * Optional. The configuration used for the Kubernetes Engine cluster. + * @type \Google\Cloud\Orchestration\Airflow\Service\V1\PrivateEnvironmentConfig $private_environment_config + * Optional. The configuration used for the Private IP Cloud Composer + * environment. + * @type \Google\Cloud\Orchestration\Airflow\Service\V1\WebServerNetworkAccessControl $web_server_network_access_control + * Optional. The network-level access control policy for the Airflow web + * server. If unspecified, no network-level access restrictions will be + * applied. + * @type \Google\Cloud\Orchestration\Airflow\Service\V1\DatabaseConfig $database_config + * Optional. The configuration settings for Cloud SQL instance used internally + * by Apache Airflow software. + * @type \Google\Cloud\Orchestration\Airflow\Service\V1\WebServerConfig $web_server_config + * Optional. The configuration settings for the Airflow web server App Engine + * instance. + * @type \Google\Cloud\Orchestration\Airflow\Service\V1\EncryptionConfig $encryption_config + * Optional. The encryption options for the Cloud Composer environment + * and its dependencies. Cannot be updated. + * @type \Google\Cloud\Orchestration\Airflow\Service\V1\MaintenanceWindow $maintenance_window + * Optional. The maintenance window is the period when Cloud Composer + * components may undergo maintenance. It is defined so that maintenance is + * not executed during peak hours or critical time periods. + * The system will not be under maintenance for every occurrence of this + * window, but when maintenance is planned, it will be scheduled + * during the window. + * The maintenance window period must encompass at least 12 hours per week. + * This may be split into multiple chunks, each with a size of + * at least 4 hours. + * If this value is omitted, the default value for maintenance window is + * applied. By default, maintenance windows are from 00:00:00 to 04:00:00 + * (GMT) on Friday, Saturday, and Sunday every week. + * @type \Google\Cloud\Orchestration\Airflow\Service\V1\WorkloadsConfig $workloads_config + * Optional. The workloads configuration settings for the GKE cluster + * associated with the Cloud Composer environment. The GKE cluster runs + * Airflow scheduler, web server and workers workloads. + * This field is supported for Cloud Composer environments in versions + * composer-2.*.*-airflow-*.*.* and newer. + * @type int $environment_size + * Optional. The size of the Cloud Composer environment. + * This field is supported for Cloud Composer environments in versions + * composer-2.*.*-airflow-*.*.* and newer. + * @type string $airflow_uri + * Output only. The URI of the Apache Airflow Web UI hosted within this + * environment (see [Airflow web + * interface](/composer/docs/how-to/accessing/airflow-web-interface)). + * @type string $airflow_byoid_uri + * Output only. The 'bring your own identity' variant of the URI of the Apache + * Airflow Web UI hosted within this environment, to be accessed with external + * identities using workforce identity federation (see [Access environments + * with workforce identity + * federation](/composer/docs/composer-2/access-environments-with-workforce-identity-federation)). + * @type \Google\Cloud\Orchestration\Airflow\Service\V1\MasterAuthorizedNetworksConfig $master_authorized_networks_config + * Optional. The configuration options for GKE cluster master authorized + * networks. By default master authorized networks feature is: + * - in case of private environment: enabled with no external networks + * allowlisted. + * - in case of public environment: disabled. + * @type \Google\Cloud\Orchestration\Airflow\Service\V1\RecoveryConfig $recovery_config + * Optional. The Recovery settings configuration of an environment. + * This field is supported for Cloud Composer environments in versions + * composer-2.*.*-airflow-*.*.* and newer. + * @type int $resilience_mode + * Optional. Resilience mode of the Cloud Composer Environment. + * This field is supported for Cloud Composer environments in versions + * composer-2.2.0-airflow-*.*.* and newer. + * @type \Google\Cloud\Orchestration\Airflow\Service\V1\DataRetentionConfig $data_retention_config + * Optional. The configuration setting for Airflow database data retention + * mechanism. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The Kubernetes Engine cluster used to run this environment. + * + * Generated from protobuf field string gke_cluster = 1; + * @return string + */ + public function getGkeCluster() + { + return $this->gke_cluster; + } + + /** + * Output only. The Kubernetes Engine cluster used to run this environment. + * + * Generated from protobuf field string gke_cluster = 1; + * @param string $var + * @return $this + */ + public function setGkeCluster($var) + { + GPBUtil::checkString($var, True); + $this->gke_cluster = $var; + + return $this; + } + + /** + * Output only. The Cloud Storage prefix of the DAGs for this environment. + * Although Cloud Storage objects reside in a flat namespace, a hierarchical + * file tree can be simulated using "/"-delimited object name prefixes. DAG + * objects for this environment reside in a simulated directory with the given + * prefix. + * + * Generated from protobuf field string dag_gcs_prefix = 2; + * @return string + */ + public function getDagGcsPrefix() + { + return $this->dag_gcs_prefix; + } + + /** + * Output only. The Cloud Storage prefix of the DAGs for this environment. + * Although Cloud Storage objects reside in a flat namespace, a hierarchical + * file tree can be simulated using "/"-delimited object name prefixes. DAG + * objects for this environment reside in a simulated directory with the given + * prefix. + * + * Generated from protobuf field string dag_gcs_prefix = 2; + * @param string $var + * @return $this + */ + public function setDagGcsPrefix($var) + { + GPBUtil::checkString($var, True); + $this->dag_gcs_prefix = $var; + + return $this; + } + + /** + * The number of nodes in the Kubernetes Engine cluster that will be + * used to run this environment. + * This field is supported for Cloud Composer environments in versions + * composer-1.*.*-airflow-*.*.*. + * + * Generated from protobuf field int32 node_count = 3; + * @return int + */ + public function getNodeCount() + { + return $this->node_count; + } + + /** + * The number of nodes in the Kubernetes Engine cluster that will be + * used to run this environment. + * This field is supported for Cloud Composer environments in versions + * composer-1.*.*-airflow-*.*.*. + * + * Generated from protobuf field int32 node_count = 3; + * @param int $var + * @return $this + */ + public function setNodeCount($var) + { + GPBUtil::checkInt32($var); + $this->node_count = $var; + + return $this; + } + + /** + * Optional. The configuration settings for software inside the environment. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.SoftwareConfig software_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Orchestration\Airflow\Service\V1\SoftwareConfig|null + */ + public function getSoftwareConfig() + { + return $this->software_config; + } + + public function hasSoftwareConfig() + { + return isset($this->software_config); + } + + public function clearSoftwareConfig() + { + unset($this->software_config); + } + + /** + * Optional. The configuration settings for software inside the environment. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.SoftwareConfig software_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Orchestration\Airflow\Service\V1\SoftwareConfig $var + * @return $this + */ + public function setSoftwareConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Orchestration\Airflow\Service\V1\SoftwareConfig::class); + $this->software_config = $var; + + return $this; + } + + /** + * Optional. The configuration used for the Kubernetes Engine cluster. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.NodeConfig node_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Orchestration\Airflow\Service\V1\NodeConfig|null + */ + public function getNodeConfig() + { + return $this->node_config; + } + + public function hasNodeConfig() + { + return isset($this->node_config); + } + + public function clearNodeConfig() + { + unset($this->node_config); + } + + /** + * Optional. The configuration used for the Kubernetes Engine cluster. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.NodeConfig node_config = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Orchestration\Airflow\Service\V1\NodeConfig $var + * @return $this + */ + public function setNodeConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Orchestration\Airflow\Service\V1\NodeConfig::class); + $this->node_config = $var; + + return $this; + } + + /** + * Optional. The configuration used for the Private IP Cloud Composer + * environment. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig private_environment_config = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Orchestration\Airflow\Service\V1\PrivateEnvironmentConfig|null + */ + public function getPrivateEnvironmentConfig() + { + return $this->private_environment_config; + } + + public function hasPrivateEnvironmentConfig() + { + return isset($this->private_environment_config); + } + + public function clearPrivateEnvironmentConfig() + { + unset($this->private_environment_config); + } + + /** + * Optional. The configuration used for the Private IP Cloud Composer + * environment. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig private_environment_config = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Orchestration\Airflow\Service\V1\PrivateEnvironmentConfig $var + * @return $this + */ + public function setPrivateEnvironmentConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Orchestration\Airflow\Service\V1\PrivateEnvironmentConfig::class); + $this->private_environment_config = $var; + + return $this; + } + + /** + * Optional. The network-level access control policy for the Airflow web + * server. If unspecified, no network-level access restrictions will be + * applied. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl web_server_network_access_control = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Orchestration\Airflow\Service\V1\WebServerNetworkAccessControl|null + */ + public function getWebServerNetworkAccessControl() + { + return $this->web_server_network_access_control; + } + + public function hasWebServerNetworkAccessControl() + { + return isset($this->web_server_network_access_control); + } + + public function clearWebServerNetworkAccessControl() + { + unset($this->web_server_network_access_control); + } + + /** + * Optional. The network-level access control policy for the Airflow web + * server. If unspecified, no network-level access restrictions will be + * applied. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl web_server_network_access_control = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Orchestration\Airflow\Service\V1\WebServerNetworkAccessControl $var + * @return $this + */ + public function setWebServerNetworkAccessControl($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Orchestration\Airflow\Service\V1\WebServerNetworkAccessControl::class); + $this->web_server_network_access_control = $var; + + return $this; + } + + /** + * Optional. The configuration settings for Cloud SQL instance used internally + * by Apache Airflow software. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.DatabaseConfig database_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Orchestration\Airflow\Service\V1\DatabaseConfig|null + */ + public function getDatabaseConfig() + { + return $this->database_config; + } + + public function hasDatabaseConfig() + { + return isset($this->database_config); + } + + public function clearDatabaseConfig() + { + unset($this->database_config); + } + + /** + * Optional. The configuration settings for Cloud SQL instance used internally + * by Apache Airflow software. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.DatabaseConfig database_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Orchestration\Airflow\Service\V1\DatabaseConfig $var + * @return $this + */ + public function setDatabaseConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Orchestration\Airflow\Service\V1\DatabaseConfig::class); + $this->database_config = $var; + + return $this; + } + + /** + * Optional. The configuration settings for the Airflow web server App Engine + * instance. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.WebServerConfig web_server_config = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Orchestration\Airflow\Service\V1\WebServerConfig|null + */ + public function getWebServerConfig() + { + return $this->web_server_config; + } + + public function hasWebServerConfig() + { + return isset($this->web_server_config); + } + + public function clearWebServerConfig() + { + unset($this->web_server_config); + } + + /** + * Optional. The configuration settings for the Airflow web server App Engine + * instance. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.WebServerConfig web_server_config = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Orchestration\Airflow\Service\V1\WebServerConfig $var + * @return $this + */ + public function setWebServerConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Orchestration\Airflow\Service\V1\WebServerConfig::class); + $this->web_server_config = $var; + + return $this; + } + + /** + * Optional. The encryption options for the Cloud Composer environment + * and its dependencies. Cannot be updated. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.EncryptionConfig encryption_config = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Orchestration\Airflow\Service\V1\EncryptionConfig|null + */ + public function getEncryptionConfig() + { + return $this->encryption_config; + } + + public function hasEncryptionConfig() + { + return isset($this->encryption_config); + } + + public function clearEncryptionConfig() + { + unset($this->encryption_config); + } + + /** + * Optional. The encryption options for the Cloud Composer environment + * and its dependencies. Cannot be updated. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.EncryptionConfig encryption_config = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Orchestration\Airflow\Service\V1\EncryptionConfig $var + * @return $this + */ + public function setEncryptionConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Orchestration\Airflow\Service\V1\EncryptionConfig::class); + $this->encryption_config = $var; + + return $this; + } + + /** + * Optional. The maintenance window is the period when Cloud Composer + * components may undergo maintenance. It is defined so that maintenance is + * not executed during peak hours or critical time periods. + * The system will not be under maintenance for every occurrence of this + * window, but when maintenance is planned, it will be scheduled + * during the window. + * The maintenance window period must encompass at least 12 hours per week. + * This may be split into multiple chunks, each with a size of + * at least 4 hours. + * If this value is omitted, the default value for maintenance window is + * applied. By default, maintenance windows are from 00:00:00 to 04:00:00 + * (GMT) on Friday, Saturday, and Sunday every week. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.MaintenanceWindow maintenance_window = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Orchestration\Airflow\Service\V1\MaintenanceWindow|null + */ + public function getMaintenanceWindow() + { + return $this->maintenance_window; + } + + public function hasMaintenanceWindow() + { + return isset($this->maintenance_window); + } + + public function clearMaintenanceWindow() + { + unset($this->maintenance_window); + } + + /** + * Optional. The maintenance window is the period when Cloud Composer + * components may undergo maintenance. It is defined so that maintenance is + * not executed during peak hours or critical time periods. + * The system will not be under maintenance for every occurrence of this + * window, but when maintenance is planned, it will be scheduled + * during the window. + * The maintenance window period must encompass at least 12 hours per week. + * This may be split into multiple chunks, each with a size of + * at least 4 hours. + * If this value is omitted, the default value for maintenance window is + * applied. By default, maintenance windows are from 00:00:00 to 04:00:00 + * (GMT) on Friday, Saturday, and Sunday every week. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.MaintenanceWindow maintenance_window = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Orchestration\Airflow\Service\V1\MaintenanceWindow $var + * @return $this + */ + public function setMaintenanceWindow($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Orchestration\Airflow\Service\V1\MaintenanceWindow::class); + $this->maintenance_window = $var; + + return $this; + } + + /** + * Optional. The workloads configuration settings for the GKE cluster + * associated with the Cloud Composer environment. The GKE cluster runs + * Airflow scheduler, web server and workers workloads. + * This field is supported for Cloud Composer environments in versions + * composer-2.*.*-airflow-*.*.* and newer. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.WorkloadsConfig workloads_config = 15 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Orchestration\Airflow\Service\V1\WorkloadsConfig|null + */ + public function getWorkloadsConfig() + { + return $this->workloads_config; + } + + public function hasWorkloadsConfig() + { + return isset($this->workloads_config); + } + + public function clearWorkloadsConfig() + { + unset($this->workloads_config); + } + + /** + * Optional. The workloads configuration settings for the GKE cluster + * associated with the Cloud Composer environment. The GKE cluster runs + * Airflow scheduler, web server and workers workloads. + * This field is supported for Cloud Composer environments in versions + * composer-2.*.*-airflow-*.*.* and newer. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.WorkloadsConfig workloads_config = 15 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Orchestration\Airflow\Service\V1\WorkloadsConfig $var + * @return $this + */ + public function setWorkloadsConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Orchestration\Airflow\Service\V1\WorkloadsConfig::class); + $this->workloads_config = $var; + + return $this; + } + + /** + * Optional. The size of the Cloud Composer environment. + * This field is supported for Cloud Composer environments in versions + * composer-2.*.*-airflow-*.*.* and newer. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.EnvironmentSize environment_size = 16 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getEnvironmentSize() + { + return $this->environment_size; + } + + /** + * Optional. The size of the Cloud Composer environment. + * This field is supported for Cloud Composer environments in versions + * composer-2.*.*-airflow-*.*.* and newer. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.EnvironmentSize environment_size = 16 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setEnvironmentSize($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Orchestration\Airflow\Service\V1\EnvironmentConfig\EnvironmentSize::class); + $this->environment_size = $var; + + return $this; + } + + /** + * Output only. The URI of the Apache Airflow Web UI hosted within this + * environment (see [Airflow web + * interface](/composer/docs/how-to/accessing/airflow-web-interface)). + * + * Generated from protobuf field string airflow_uri = 6; + * @return string + */ + public function getAirflowUri() + { + return $this->airflow_uri; + } + + /** + * Output only. The URI of the Apache Airflow Web UI hosted within this + * environment (see [Airflow web + * interface](/composer/docs/how-to/accessing/airflow-web-interface)). + * + * Generated from protobuf field string airflow_uri = 6; + * @param string $var + * @return $this + */ + public function setAirflowUri($var) + { + GPBUtil::checkString($var, True); + $this->airflow_uri = $var; + + return $this; + } + + /** + * Output only. The 'bring your own identity' variant of the URI of the Apache + * Airflow Web UI hosted within this environment, to be accessed with external + * identities using workforce identity federation (see [Access environments + * with workforce identity + * federation](/composer/docs/composer-2/access-environments-with-workforce-identity-federation)). + * + * Generated from protobuf field string airflow_byoid_uri = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getAirflowByoidUri() + { + return $this->airflow_byoid_uri; + } + + /** + * Output only. The 'bring your own identity' variant of the URI of the Apache + * Airflow Web UI hosted within this environment, to be accessed with external + * identities using workforce identity federation (see [Access environments + * with workforce identity + * federation](/composer/docs/composer-2/access-environments-with-workforce-identity-federation)). + * + * Generated from protobuf field string airflow_byoid_uri = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setAirflowByoidUri($var) + { + GPBUtil::checkString($var, True); + $this->airflow_byoid_uri = $var; + + return $this; + } + + /** + * Optional. The configuration options for GKE cluster master authorized + * networks. By default master authorized networks feature is: + * - in case of private environment: enabled with no external networks + * allowlisted. + * - in case of public environment: disabled. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig master_authorized_networks_config = 17 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Orchestration\Airflow\Service\V1\MasterAuthorizedNetworksConfig|null + */ + public function getMasterAuthorizedNetworksConfig() + { + return $this->master_authorized_networks_config; + } + + public function hasMasterAuthorizedNetworksConfig() + { + return isset($this->master_authorized_networks_config); + } + + public function clearMasterAuthorizedNetworksConfig() + { + unset($this->master_authorized_networks_config); + } + + /** + * Optional. The configuration options for GKE cluster master authorized + * networks. By default master authorized networks feature is: + * - in case of private environment: enabled with no external networks + * allowlisted. + * - in case of public environment: disabled. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig master_authorized_networks_config = 17 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Orchestration\Airflow\Service\V1\MasterAuthorizedNetworksConfig $var + * @return $this + */ + public function setMasterAuthorizedNetworksConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Orchestration\Airflow\Service\V1\MasterAuthorizedNetworksConfig::class); + $this->master_authorized_networks_config = $var; + + return $this; + } + + /** + * Optional. The Recovery settings configuration of an environment. + * This field is supported for Cloud Composer environments in versions + * composer-2.*.*-airflow-*.*.* and newer. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.RecoveryConfig recovery_config = 18 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Orchestration\Airflow\Service\V1\RecoveryConfig|null + */ + public function getRecoveryConfig() + { + return $this->recovery_config; + } + + public function hasRecoveryConfig() + { + return isset($this->recovery_config); + } + + public function clearRecoveryConfig() + { + unset($this->recovery_config); + } + + /** + * Optional. The Recovery settings configuration of an environment. + * This field is supported for Cloud Composer environments in versions + * composer-2.*.*-airflow-*.*.* and newer. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.RecoveryConfig recovery_config = 18 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Orchestration\Airflow\Service\V1\RecoveryConfig $var + * @return $this + */ + public function setRecoveryConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Orchestration\Airflow\Service\V1\RecoveryConfig::class); + $this->recovery_config = $var; + + return $this; + } + + /** + * Optional. Resilience mode of the Cloud Composer Environment. + * This field is supported for Cloud Composer environments in versions + * composer-2.2.0-airflow-*.*.* and newer. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.ResilienceMode resilience_mode = 19 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getResilienceMode() + { + return $this->resilience_mode; + } + + /** + * Optional. Resilience mode of the Cloud Composer Environment. + * This field is supported for Cloud Composer environments in versions + * composer-2.2.0-airflow-*.*.* and newer. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.ResilienceMode resilience_mode = 19 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setResilienceMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Orchestration\Airflow\Service\V1\EnvironmentConfig\ResilienceMode::class); + $this->resilience_mode = $var; + + return $this; + } + + /** + * Optional. The configuration setting for Airflow database data retention + * mechanism. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.DataRetentionConfig data_retention_config = 21 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Orchestration\Airflow\Service\V1\DataRetentionConfig|null + */ + public function getDataRetentionConfig() + { + return $this->data_retention_config; + } + + public function hasDataRetentionConfig() + { + return isset($this->data_retention_config); + } + + public function clearDataRetentionConfig() + { + unset($this->data_retention_config); + } + + /** + * Optional. The configuration setting for Airflow database data retention + * mechanism. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.DataRetentionConfig data_retention_config = 21 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Orchestration\Airflow\Service\V1\DataRetentionConfig $var + * @return $this + */ + public function setDataRetentionConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Orchestration\Airflow\Service\V1\DataRetentionConfig::class); + $this->data_retention_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/EnvironmentConfig/EnvironmentSize.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/EnvironmentConfig/EnvironmentSize.php new file mode 100644 index 000000000000..024e1e477770 --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/EnvironmentConfig/EnvironmentSize.php @@ -0,0 +1,71 @@ +google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.EnvironmentSize + */ +class EnvironmentSize +{ + /** + * The size of the environment is unspecified. + * + * Generated from protobuf enum ENVIRONMENT_SIZE_UNSPECIFIED = 0; + */ + const ENVIRONMENT_SIZE_UNSPECIFIED = 0; + /** + * The environment size is small. + * + * Generated from protobuf enum ENVIRONMENT_SIZE_SMALL = 1; + */ + const ENVIRONMENT_SIZE_SMALL = 1; + /** + * The environment size is medium. + * + * Generated from protobuf enum ENVIRONMENT_SIZE_MEDIUM = 2; + */ + const ENVIRONMENT_SIZE_MEDIUM = 2; + /** + * The environment size is large. + * + * Generated from protobuf enum ENVIRONMENT_SIZE_LARGE = 3; + */ + const ENVIRONMENT_SIZE_LARGE = 3; + + private static $valueToName = [ + self::ENVIRONMENT_SIZE_UNSPECIFIED => 'ENVIRONMENT_SIZE_UNSPECIFIED', + self::ENVIRONMENT_SIZE_SMALL => 'ENVIRONMENT_SIZE_SMALL', + self::ENVIRONMENT_SIZE_MEDIUM => 'ENVIRONMENT_SIZE_MEDIUM', + self::ENVIRONMENT_SIZE_LARGE => 'ENVIRONMENT_SIZE_LARGE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(EnvironmentSize::class, \Google\Cloud\Orchestration\Airflow\Service\V1\EnvironmentConfig_EnvironmentSize::class); + diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/EnvironmentConfig/ResilienceMode.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/EnvironmentConfig/ResilienceMode.php new file mode 100644 index 000000000000..1b8f10ce252e --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/EnvironmentConfig/ResilienceMode.php @@ -0,0 +1,57 @@ +google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.ResilienceMode + */ +class ResilienceMode +{ + /** + * Default mode doesn't change environment parameters. + * + * Generated from protobuf enum RESILIENCE_MODE_UNSPECIFIED = 0; + */ + const RESILIENCE_MODE_UNSPECIFIED = 0; + /** + * Enabled High Resilience mode, including Cloud SQL HA. + * + * Generated from protobuf enum HIGH_RESILIENCE = 1; + */ + const HIGH_RESILIENCE = 1; + + private static $valueToName = [ + self::RESILIENCE_MODE_UNSPECIFIED => 'RESILIENCE_MODE_UNSPECIFIED', + self::HIGH_RESILIENCE => 'HIGH_RESILIENCE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ResilienceMode::class, \Google\Cloud\Orchestration\Airflow\Service\V1\EnvironmentConfig_ResilienceMode::class); + diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ExecuteAirflowCommandRequest.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ExecuteAirflowCommandRequest.php new file mode 100644 index 000000000000..b8834cb19c0a --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ExecuteAirflowCommandRequest.php @@ -0,0 +1,185 @@ +google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest + */ +class ExecuteAirflowCommandRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the environment in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}". + * + * Generated from protobuf field string environment = 1; + */ + protected $environment = ''; + /** + * Airflow command. + * + * Generated from protobuf field string command = 2; + */ + protected $command = ''; + /** + * Airflow subcommand. + * + * Generated from protobuf field string subcommand = 3; + */ + protected $subcommand = ''; + /** + * Parameters for the Airflow command/subcommand as an array of arguments. + * It may contain positional arguments like `["my-dag-id"]`, key-value + * parameters like `["--foo=bar"]` or `["--foo","bar"]`, + * or other flags like `["-f"]`. + * + * Generated from protobuf field repeated string parameters = 4; + */ + private $parameters; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $environment + * The resource name of the environment in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}". + * @type string $command + * Airflow command. + * @type string $subcommand + * Airflow subcommand. + * @type array|\Google\Protobuf\Internal\RepeatedField $parameters + * Parameters for the Airflow command/subcommand as an array of arguments. + * It may contain positional arguments like `["my-dag-id"]`, key-value + * parameters like `["--foo=bar"]` or `["--foo","bar"]`, + * or other flags like `["-f"]`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); + parent::__construct($data); + } + + /** + * The resource name of the environment in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}". + * + * Generated from protobuf field string environment = 1; + * @return string + */ + public function getEnvironment() + { + return $this->environment; + } + + /** + * The resource name of the environment in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}". + * + * Generated from protobuf field string environment = 1; + * @param string $var + * @return $this + */ + public function setEnvironment($var) + { + GPBUtil::checkString($var, True); + $this->environment = $var; + + return $this; + } + + /** + * Airflow command. + * + * Generated from protobuf field string command = 2; + * @return string + */ + public function getCommand() + { + return $this->command; + } + + /** + * Airflow command. + * + * Generated from protobuf field string command = 2; + * @param string $var + * @return $this + */ + public function setCommand($var) + { + GPBUtil::checkString($var, True); + $this->command = $var; + + return $this; + } + + /** + * Airflow subcommand. + * + * Generated from protobuf field string subcommand = 3; + * @return string + */ + public function getSubcommand() + { + return $this->subcommand; + } + + /** + * Airflow subcommand. + * + * Generated from protobuf field string subcommand = 3; + * @param string $var + * @return $this + */ + public function setSubcommand($var) + { + GPBUtil::checkString($var, True); + $this->subcommand = $var; + + return $this; + } + + /** + * Parameters for the Airflow command/subcommand as an array of arguments. + * It may contain positional arguments like `["my-dag-id"]`, key-value + * parameters like `["--foo=bar"]` or `["--foo","bar"]`, + * or other flags like `["-f"]`. + * + * Generated from protobuf field repeated string parameters = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getParameters() + { + return $this->parameters; + } + + /** + * Parameters for the Airflow command/subcommand as an array of arguments. + * It may contain positional arguments like `["my-dag-id"]`, key-value + * parameters like `["--foo=bar"]` or `["--foo","bar"]`, + * or other flags like `["-f"]`. + * + * Generated from protobuf field repeated string parameters = 4; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setParameters($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->parameters = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ExecuteAirflowCommandResponse.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ExecuteAirflowCommandResponse.php new file mode 100644 index 000000000000..7652aa34183c --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ExecuteAirflowCommandResponse.php @@ -0,0 +1,169 @@ +google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse + */ +class ExecuteAirflowCommandResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The unique ID of the command execution for polling. + * + * Generated from protobuf field string execution_id = 1; + */ + protected $execution_id = ''; + /** + * The name of the pod where the command is executed. + * + * Generated from protobuf field string pod = 2; + */ + protected $pod = ''; + /** + * The namespace of the pod where the command is executed. + * + * Generated from protobuf field string pod_namespace = 3; + */ + protected $pod_namespace = ''; + /** + * Error message. Empty if there was no error. + * + * Generated from protobuf field string error = 4; + */ + protected $error = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $execution_id + * The unique ID of the command execution for polling. + * @type string $pod + * The name of the pod where the command is executed. + * @type string $pod_namespace + * The namespace of the pod where the command is executed. + * @type string $error + * Error message. Empty if there was no error. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); + parent::__construct($data); + } + + /** + * The unique ID of the command execution for polling. + * + * Generated from protobuf field string execution_id = 1; + * @return string + */ + public function getExecutionId() + { + return $this->execution_id; + } + + /** + * The unique ID of the command execution for polling. + * + * Generated from protobuf field string execution_id = 1; + * @param string $var + * @return $this + */ + public function setExecutionId($var) + { + GPBUtil::checkString($var, True); + $this->execution_id = $var; + + return $this; + } + + /** + * The name of the pod where the command is executed. + * + * Generated from protobuf field string pod = 2; + * @return string + */ + public function getPod() + { + return $this->pod; + } + + /** + * The name of the pod where the command is executed. + * + * Generated from protobuf field string pod = 2; + * @param string $var + * @return $this + */ + public function setPod($var) + { + GPBUtil::checkString($var, True); + $this->pod = $var; + + return $this; + } + + /** + * The namespace of the pod where the command is executed. + * + * Generated from protobuf field string pod_namespace = 3; + * @return string + */ + public function getPodNamespace() + { + return $this->pod_namespace; + } + + /** + * The namespace of the pod where the command is executed. + * + * Generated from protobuf field string pod_namespace = 3; + * @param string $var + * @return $this + */ + public function setPodNamespace($var) + { + GPBUtil::checkString($var, True); + $this->pod_namespace = $var; + + return $this; + } + + /** + * Error message. Empty if there was no error. + * + * Generated from protobuf field string error = 4; + * @return string + */ + public function getError() + { + return $this->error; + } + + /** + * Error message. Empty if there was no error. + * + * Generated from protobuf field string error = 4; + * @param string $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkString($var, True); + $this->error = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/FetchDatabasePropertiesRequest.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/FetchDatabasePropertiesRequest.php new file mode 100644 index 000000000000..ac136a7d9c93 --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/FetchDatabasePropertiesRequest.php @@ -0,0 +1,71 @@ +google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest + */ +class FetchDatabasePropertiesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the environment, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * + * Generated from protobuf field string environment = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $environment = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $environment + * Required. The resource name of the environment, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the environment, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * + * Generated from protobuf field string environment = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getEnvironment() + { + return $this->environment; + } + + /** + * Required. The resource name of the environment, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * + * Generated from protobuf field string environment = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setEnvironment($var) + { + GPBUtil::checkString($var, True); + $this->environment = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/FetchDatabasePropertiesResponse.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/FetchDatabasePropertiesResponse.php new file mode 100644 index 000000000000..a2c147998912 --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/FetchDatabasePropertiesResponse.php @@ -0,0 +1,147 @@ +google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse + */ +class FetchDatabasePropertiesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The Compute Engine zone that the instance is currently serving from. + * + * Generated from protobuf field string primary_gce_zone = 1; + */ + protected $primary_gce_zone = ''; + /** + * The Compute Engine zone that the failover instance is currently serving + * from for a regional Cloud SQL instance. + * + * Generated from protobuf field string secondary_gce_zone = 2; + */ + protected $secondary_gce_zone = ''; + /** + * The availability status of the failover replica. A false status indicates + * that the failover replica is out of sync. The primary instance can only + * fail over to the failover replica when the status is true. + * + * Generated from protobuf field bool is_failover_replica_available = 3; + */ + protected $is_failover_replica_available = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $primary_gce_zone + * The Compute Engine zone that the instance is currently serving from. + * @type string $secondary_gce_zone + * The Compute Engine zone that the failover instance is currently serving + * from for a regional Cloud SQL instance. + * @type bool $is_failover_replica_available + * The availability status of the failover replica. A false status indicates + * that the failover replica is out of sync. The primary instance can only + * fail over to the failover replica when the status is true. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); + parent::__construct($data); + } + + /** + * The Compute Engine zone that the instance is currently serving from. + * + * Generated from protobuf field string primary_gce_zone = 1; + * @return string + */ + public function getPrimaryGceZone() + { + return $this->primary_gce_zone; + } + + /** + * The Compute Engine zone that the instance is currently serving from. + * + * Generated from protobuf field string primary_gce_zone = 1; + * @param string $var + * @return $this + */ + public function setPrimaryGceZone($var) + { + GPBUtil::checkString($var, True); + $this->primary_gce_zone = $var; + + return $this; + } + + /** + * The Compute Engine zone that the failover instance is currently serving + * from for a regional Cloud SQL instance. + * + * Generated from protobuf field string secondary_gce_zone = 2; + * @return string + */ + public function getSecondaryGceZone() + { + return $this->secondary_gce_zone; + } + + /** + * The Compute Engine zone that the failover instance is currently serving + * from for a regional Cloud SQL instance. + * + * Generated from protobuf field string secondary_gce_zone = 2; + * @param string $var + * @return $this + */ + public function setSecondaryGceZone($var) + { + GPBUtil::checkString($var, True); + $this->secondary_gce_zone = $var; + + return $this; + } + + /** + * The availability status of the failover replica. A false status indicates + * that the failover replica is out of sync. The primary instance can only + * fail over to the failover replica when the status is true. + * + * Generated from protobuf field bool is_failover_replica_available = 3; + * @return bool + */ + public function getIsFailoverReplicaAvailable() + { + return $this->is_failover_replica_available; + } + + /** + * The availability status of the failover replica. A false status indicates + * that the failover replica is out of sync. The primary instance can only + * fail over to the failover replica when the status is true. + * + * Generated from protobuf field bool is_failover_replica_available = 3; + * @param bool $var + * @return $this + */ + public function setIsFailoverReplicaAvailable($var) + { + GPBUtil::checkBool($var); + $this->is_failover_replica_available = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/GetEnvironmentRequest.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/GetEnvironmentRequest.php new file mode 100644 index 000000000000..fc67aee19860 --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/GetEnvironmentRequest.php @@ -0,0 +1,85 @@ +google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest + */ +class GetEnvironmentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the environment to get, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + + /** + * @param string $name The resource name of the environment to get, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * + * @return \Google\Cloud\Orchestration\Airflow\Service\V1\GetEnvironmentRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The resource name of the environment to get, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); + parent::__construct($data); + } + + /** + * The resource name of the environment to get, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The resource name of the environment to get, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/GetUserWorkloadsConfigMapRequest.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/GetUserWorkloadsConfigMapRequest.php new file mode 100644 index 000000000000..bd1ec8a5330a --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/GetUserWorkloadsConfigMapRequest.php @@ -0,0 +1,86 @@ +google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsConfigMapRequest + */ +class GetUserWorkloadsConfigMapRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the ConfigMap to get, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsConfigMaps/{userWorkloadsConfigMapId}" + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The resource name of the ConfigMap to get, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsConfigMaps/{userWorkloadsConfigMapId}" + * Please see {@see EnvironmentsClient::userWorkloadsConfigMapName()} for help formatting this field. + * + * @return \Google\Cloud\Orchestration\Airflow\Service\V1\GetUserWorkloadsConfigMapRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the ConfigMap to get, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsConfigMaps/{userWorkloadsConfigMapId}" + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the ConfigMap to get, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsConfigMaps/{userWorkloadsConfigMapId}" + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the ConfigMap to get, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsConfigMaps/{userWorkloadsConfigMapId}" + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/GetUserWorkloadsSecretRequest.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/GetUserWorkloadsSecretRequest.php new file mode 100644 index 000000000000..e1cdc05d0b68 --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/GetUserWorkloadsSecretRequest.php @@ -0,0 +1,86 @@ +google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsSecretRequest + */ +class GetUserWorkloadsSecretRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the Secret to get, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsSecrets/{userWorkloadsSecretId}" + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The resource name of the Secret to get, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsSecrets/{userWorkloadsSecretId}" + * Please see {@see EnvironmentsClient::userWorkloadsSecretName()} for help formatting this field. + * + * @return \Google\Cloud\Orchestration\Airflow\Service\V1\GetUserWorkloadsSecretRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the Secret to get, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsSecrets/{userWorkloadsSecretId}" + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the Secret to get, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsSecrets/{userWorkloadsSecretId}" + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the Secret to get, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsSecrets/{userWorkloadsSecretId}" + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/IPAllocationPolicy.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/IPAllocationPolicy.php new file mode 100644 index 000000000000..184b6d0ef50e --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/IPAllocationPolicy.php @@ -0,0 +1,318 @@ +google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy + */ +class IPAllocationPolicy extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Whether or not to enable Alias IPs in the GKE cluster. + * If `true`, a VPC-native cluster is created. + * This field is only supported for Cloud Composer environments in versions + * composer-1.*.*-airflow-*.*.*. Environments in newer versions always use + * VPC-native GKE clusters. + * + * Generated from protobuf field bool use_ip_aliases = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $use_ip_aliases = false; + protected $cluster_ip_allocation; + protected $services_ip_allocation; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $use_ip_aliases + * Optional. Whether or not to enable Alias IPs in the GKE cluster. + * If `true`, a VPC-native cluster is created. + * This field is only supported for Cloud Composer environments in versions + * composer-1.*.*-airflow-*.*.*. Environments in newer versions always use + * VPC-native GKE clusters. + * @type string $cluster_secondary_range_name + * Optional. The name of the GKE cluster's secondary range used to allocate + * IP addresses to pods. + * For Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*, + * this field is applicable only when `use_ip_aliases` is true. + * @type string $cluster_ipv4_cidr_block + * Optional. The IP address range used to allocate IP addresses to pods in + * the GKE cluster. + * For Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*, + * this field is applicable only when `use_ip_aliases` is true. + * Set to blank to have GKE choose a range with the default size. + * Set to /netmask (e.g. `/14`) to have GKE choose a range with a specific + * netmask. + * Set to a + * [CIDR](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) + * notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g. + * `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range + * to use. + * @type string $services_secondary_range_name + * Optional. The name of the services' secondary range used to allocate + * IP addresses to the GKE cluster. + * For Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*, + * this field is applicable only when `use_ip_aliases` is true. + * @type string $services_ipv4_cidr_block + * Optional. The IP address range of the services IP addresses in this + * GKE cluster. + * For Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*, + * this field is applicable only when `use_ip_aliases` is true. + * Set to blank to have GKE choose a range with the default size. + * Set to /netmask (e.g. `/14`) to have GKE choose a range with a specific + * netmask. + * Set to a + * [CIDR](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) + * notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g. + * `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range + * to use. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Whether or not to enable Alias IPs in the GKE cluster. + * If `true`, a VPC-native cluster is created. + * This field is only supported for Cloud Composer environments in versions + * composer-1.*.*-airflow-*.*.*. Environments in newer versions always use + * VPC-native GKE clusters. + * + * Generated from protobuf field bool use_ip_aliases = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getUseIpAliases() + { + return $this->use_ip_aliases; + } + + /** + * Optional. Whether or not to enable Alias IPs in the GKE cluster. + * If `true`, a VPC-native cluster is created. + * This field is only supported for Cloud Composer environments in versions + * composer-1.*.*-airflow-*.*.*. Environments in newer versions always use + * VPC-native GKE clusters. + * + * Generated from protobuf field bool use_ip_aliases = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setUseIpAliases($var) + { + GPBUtil::checkBool($var); + $this->use_ip_aliases = $var; + + return $this; + } + + /** + * Optional. The name of the GKE cluster's secondary range used to allocate + * IP addresses to pods. + * For Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*, + * this field is applicable only when `use_ip_aliases` is true. + * + * Generated from protobuf field string cluster_secondary_range_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getClusterSecondaryRangeName() + { + return $this->readOneof(2); + } + + public function hasClusterSecondaryRangeName() + { + return $this->hasOneof(2); + } + + /** + * Optional. The name of the GKE cluster's secondary range used to allocate + * IP addresses to pods. + * For Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*, + * this field is applicable only when `use_ip_aliases` is true. + * + * Generated from protobuf field string cluster_secondary_range_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setClusterSecondaryRangeName($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Optional. The IP address range used to allocate IP addresses to pods in + * the GKE cluster. + * For Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*, + * this field is applicable only when `use_ip_aliases` is true. + * Set to blank to have GKE choose a range with the default size. + * Set to /netmask (e.g. `/14`) to have GKE choose a range with a specific + * netmask. + * Set to a + * [CIDR](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) + * notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g. + * `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range + * to use. + * + * Generated from protobuf field string cluster_ipv4_cidr_block = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getClusterIpv4CidrBlock() + { + return $this->readOneof(4); + } + + public function hasClusterIpv4CidrBlock() + { + return $this->hasOneof(4); + } + + /** + * Optional. The IP address range used to allocate IP addresses to pods in + * the GKE cluster. + * For Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*, + * this field is applicable only when `use_ip_aliases` is true. + * Set to blank to have GKE choose a range with the default size. + * Set to /netmask (e.g. `/14`) to have GKE choose a range with a specific + * netmask. + * Set to a + * [CIDR](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) + * notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g. + * `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range + * to use. + * + * Generated from protobuf field string cluster_ipv4_cidr_block = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setClusterIpv4CidrBlock($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Optional. The name of the services' secondary range used to allocate + * IP addresses to the GKE cluster. + * For Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*, + * this field is applicable only when `use_ip_aliases` is true. + * + * Generated from protobuf field string services_secondary_range_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getServicesSecondaryRangeName() + { + return $this->readOneof(3); + } + + public function hasServicesSecondaryRangeName() + { + return $this->hasOneof(3); + } + + /** + * Optional. The name of the services' secondary range used to allocate + * IP addresses to the GKE cluster. + * For Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*, + * this field is applicable only when `use_ip_aliases` is true. + * + * Generated from protobuf field string services_secondary_range_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setServicesSecondaryRangeName($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Optional. The IP address range of the services IP addresses in this + * GKE cluster. + * For Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*, + * this field is applicable only when `use_ip_aliases` is true. + * Set to blank to have GKE choose a range with the default size. + * Set to /netmask (e.g. `/14`) to have GKE choose a range with a specific + * netmask. + * Set to a + * [CIDR](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) + * notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g. + * `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range + * to use. + * + * Generated from protobuf field string services_ipv4_cidr_block = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getServicesIpv4CidrBlock() + { + return $this->readOneof(5); + } + + public function hasServicesIpv4CidrBlock() + { + return $this->hasOneof(5); + } + + /** + * Optional. The IP address range of the services IP addresses in this + * GKE cluster. + * For Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*, + * this field is applicable only when `use_ip_aliases` is true. + * Set to blank to have GKE choose a range with the default size. + * Set to /netmask (e.g. `/14`) to have GKE choose a range with a specific + * netmask. + * Set to a + * [CIDR](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) + * notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g. + * `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range + * to use. + * + * Generated from protobuf field string services_ipv4_cidr_block = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setServicesIpv4CidrBlock($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * @return string + */ + public function getClusterIpAllocation() + { + return $this->whichOneof("cluster_ip_allocation"); + } + + /** + * @return string + */ + public function getServicesIpAllocation() + { + return $this->whichOneof("services_ip_allocation"); + } + +} + diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ImageVersion.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ImageVersion.php new file mode 100644 index 000000000000..405feff4278e --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ImageVersion.php @@ -0,0 +1,259 @@ +google.cloud.orchestration.airflow.service.v1.ImageVersion + */ +class ImageVersion extends \Google\Protobuf\Internal\Message +{ + /** + * The string identifier of the ImageVersion, in the form: + * "composer-x.y.z-airflow-a.b.c" + * + * Generated from protobuf field string image_version_id = 1; + */ + protected $image_version_id = ''; + /** + * Whether this is the default ImageVersion used by Composer during + * environment creation if no input ImageVersion is specified. + * + * Generated from protobuf field bool is_default = 2; + */ + protected $is_default = false; + /** + * supported python versions + * + * Generated from protobuf field repeated string supported_python_versions = 3; + */ + private $supported_python_versions; + /** + * The date of the version release. + * + * Generated from protobuf field .google.type.Date release_date = 4; + */ + protected $release_date = null; + /** + * Whether it is impossible to create an environment with the image version. + * + * Generated from protobuf field bool creation_disabled = 5; + */ + protected $creation_disabled = false; + /** + * Whether it is impossible to upgrade an environment running with the image + * version. + * + * Generated from protobuf field bool upgrade_disabled = 6; + */ + protected $upgrade_disabled = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $image_version_id + * The string identifier of the ImageVersion, in the form: + * "composer-x.y.z-airflow-a.b.c" + * @type bool $is_default + * Whether this is the default ImageVersion used by Composer during + * environment creation if no input ImageVersion is specified. + * @type array|\Google\Protobuf\Internal\RepeatedField $supported_python_versions + * supported python versions + * @type \Google\Type\Date $release_date + * The date of the version release. + * @type bool $creation_disabled + * Whether it is impossible to create an environment with the image version. + * @type bool $upgrade_disabled + * Whether it is impossible to upgrade an environment running with the image + * version. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\ImageVersions::initOnce(); + parent::__construct($data); + } + + /** + * The string identifier of the ImageVersion, in the form: + * "composer-x.y.z-airflow-a.b.c" + * + * Generated from protobuf field string image_version_id = 1; + * @return string + */ + public function getImageVersionId() + { + return $this->image_version_id; + } + + /** + * The string identifier of the ImageVersion, in the form: + * "composer-x.y.z-airflow-a.b.c" + * + * Generated from protobuf field string image_version_id = 1; + * @param string $var + * @return $this + */ + public function setImageVersionId($var) + { + GPBUtil::checkString($var, True); + $this->image_version_id = $var; + + return $this; + } + + /** + * Whether this is the default ImageVersion used by Composer during + * environment creation if no input ImageVersion is specified. + * + * Generated from protobuf field bool is_default = 2; + * @return bool + */ + public function getIsDefault() + { + return $this->is_default; + } + + /** + * Whether this is the default ImageVersion used by Composer during + * environment creation if no input ImageVersion is specified. + * + * Generated from protobuf field bool is_default = 2; + * @param bool $var + * @return $this + */ + public function setIsDefault($var) + { + GPBUtil::checkBool($var); + $this->is_default = $var; + + return $this; + } + + /** + * supported python versions + * + * Generated from protobuf field repeated string supported_python_versions = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSupportedPythonVersions() + { + return $this->supported_python_versions; + } + + /** + * supported python versions + * + * Generated from protobuf field repeated string supported_python_versions = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSupportedPythonVersions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->supported_python_versions = $arr; + + return $this; + } + + /** + * The date of the version release. + * + * Generated from protobuf field .google.type.Date release_date = 4; + * @return \Google\Type\Date|null + */ + public function getReleaseDate() + { + return $this->release_date; + } + + public function hasReleaseDate() + { + return isset($this->release_date); + } + + public function clearReleaseDate() + { + unset($this->release_date); + } + + /** + * The date of the version release. + * + * Generated from protobuf field .google.type.Date release_date = 4; + * @param \Google\Type\Date $var + * @return $this + */ + public function setReleaseDate($var) + { + GPBUtil::checkMessage($var, \Google\Type\Date::class); + $this->release_date = $var; + + return $this; + } + + /** + * Whether it is impossible to create an environment with the image version. + * + * Generated from protobuf field bool creation_disabled = 5; + * @return bool + */ + public function getCreationDisabled() + { + return $this->creation_disabled; + } + + /** + * Whether it is impossible to create an environment with the image version. + * + * Generated from protobuf field bool creation_disabled = 5; + * @param bool $var + * @return $this + */ + public function setCreationDisabled($var) + { + GPBUtil::checkBool($var); + $this->creation_disabled = $var; + + return $this; + } + + /** + * Whether it is impossible to upgrade an environment running with the image + * version. + * + * Generated from protobuf field bool upgrade_disabled = 6; + * @return bool + */ + public function getUpgradeDisabled() + { + return $this->upgrade_disabled; + } + + /** + * Whether it is impossible to upgrade an environment running with the image + * version. + * + * Generated from protobuf field bool upgrade_disabled = 6; + * @param bool $var + * @return $this + */ + public function setUpgradeDisabled($var) + { + GPBUtil::checkBool($var); + $this->upgrade_disabled = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListEnvironmentsRequest.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListEnvironmentsRequest.php new file mode 100644 index 000000000000..d22e4dcd17d4 --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListEnvironmentsRequest.php @@ -0,0 +1,153 @@ +google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest + */ +class ListEnvironmentsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * List environments in the given project and location, in the form: + * "projects/{projectId}/locations/{locationId}" + * + * Generated from protobuf field string parent = 1; + */ + protected $parent = ''; + /** + * The maximum number of environments to return. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The next_page_token value returned from a previous List request, if any. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $parent List environments in the given project and location, in the form: + * "projects/{projectId}/locations/{locationId}" + * + * @return \Google\Cloud\Orchestration\Airflow\Service\V1\ListEnvironmentsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * List environments in the given project and location, in the form: + * "projects/{projectId}/locations/{locationId}" + * @type int $page_size + * The maximum number of environments to return. + * @type string $page_token + * The next_page_token value returned from a previous List request, if any. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); + parent::__construct($data); + } + + /** + * List environments in the given project and location, in the form: + * "projects/{projectId}/locations/{locationId}" + * + * Generated from protobuf field string parent = 1; + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * List environments in the given project and location, in the form: + * "projects/{projectId}/locations/{locationId}" + * + * Generated from protobuf field string parent = 1; + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The maximum number of environments to return. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of environments to return. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The next_page_token value returned from a previous List request, if any. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The next_page_token value returned from a previous List request, if any. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListEnvironmentsResponse.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListEnvironmentsResponse.php new file mode 100644 index 000000000000..11adef627138 --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListEnvironmentsResponse.php @@ -0,0 +1,101 @@ +google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse + */ +class ListEnvironmentsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of environments returned by a ListEnvironmentsRequest. + * + * Generated from protobuf field repeated .google.cloud.orchestration.airflow.service.v1.Environment environments = 1; + */ + private $environments; + /** + * The page token used to query for the next page if one exists. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Orchestration\Airflow\Service\V1\Environment>|\Google\Protobuf\Internal\RepeatedField $environments + * The list of environments returned by a ListEnvironmentsRequest. + * @type string $next_page_token + * The page token used to query for the next page if one exists. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); + parent::__construct($data); + } + + /** + * The list of environments returned by a ListEnvironmentsRequest. + * + * Generated from protobuf field repeated .google.cloud.orchestration.airflow.service.v1.Environment environments = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEnvironments() + { + return $this->environments; + } + + /** + * The list of environments returned by a ListEnvironmentsRequest. + * + * Generated from protobuf field repeated .google.cloud.orchestration.airflow.service.v1.Environment environments = 1; + * @param array<\Google\Cloud\Orchestration\Airflow\Service\V1\Environment>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEnvironments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Orchestration\Airflow\Service\V1\Environment::class); + $this->environments = $arr; + + return $this; + } + + /** + * The page token used to query for the next page if one exists. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * The page token used to query for the next page if one exists. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListImageVersionsRequest.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListImageVersionsRequest.php new file mode 100644 index 000000000000..a89e8c354f52 --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListImageVersionsRequest.php @@ -0,0 +1,187 @@ +google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest + */ +class ListImageVersionsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * List ImageVersions in the given project and location, in the form: + * "projects/{projectId}/locations/{locationId}" + * + * Generated from protobuf field string parent = 1; + */ + protected $parent = ''; + /** + * The maximum number of image_versions to return. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The next_page_token value returned from a previous List request, if any. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * Whether or not image versions from old releases should be included. + * + * Generated from protobuf field bool include_past_releases = 4; + */ + protected $include_past_releases = false; + + /** + * @param string $parent List ImageVersions in the given project and location, in the form: + * "projects/{projectId}/locations/{locationId}" + * + * @return \Google\Cloud\Orchestration\Airflow\Service\V1\ListImageVersionsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * List ImageVersions in the given project and location, in the form: + * "projects/{projectId}/locations/{locationId}" + * @type int $page_size + * The maximum number of image_versions to return. + * @type string $page_token + * The next_page_token value returned from a previous List request, if any. + * @type bool $include_past_releases + * Whether or not image versions from old releases should be included. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\ImageVersions::initOnce(); + parent::__construct($data); + } + + /** + * List ImageVersions in the given project and location, in the form: + * "projects/{projectId}/locations/{locationId}" + * + * Generated from protobuf field string parent = 1; + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * List ImageVersions in the given project and location, in the form: + * "projects/{projectId}/locations/{locationId}" + * + * Generated from protobuf field string parent = 1; + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The maximum number of image_versions to return. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of image_versions to return. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The next_page_token value returned from a previous List request, if any. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The next_page_token value returned from a previous List request, if any. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Whether or not image versions from old releases should be included. + * + * Generated from protobuf field bool include_past_releases = 4; + * @return bool + */ + public function getIncludePastReleases() + { + return $this->include_past_releases; + } + + /** + * Whether or not image versions from old releases should be included. + * + * Generated from protobuf field bool include_past_releases = 4; + * @param bool $var + * @return $this + */ + public function setIncludePastReleases($var) + { + GPBUtil::checkBool($var); + $this->include_past_releases = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListImageVersionsResponse.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListImageVersionsResponse.php new file mode 100644 index 000000000000..96b637d44898 --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListImageVersionsResponse.php @@ -0,0 +1,101 @@ +google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse + */ +class ListImageVersionsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of supported ImageVersions in a location. + * + * Generated from protobuf field repeated .google.cloud.orchestration.airflow.service.v1.ImageVersion image_versions = 1; + */ + private $image_versions; + /** + * The page token used to query for the next page if one exists. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Orchestration\Airflow\Service\V1\ImageVersion>|\Google\Protobuf\Internal\RepeatedField $image_versions + * The list of supported ImageVersions in a location. + * @type string $next_page_token + * The page token used to query for the next page if one exists. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\ImageVersions::initOnce(); + parent::__construct($data); + } + + /** + * The list of supported ImageVersions in a location. + * + * Generated from protobuf field repeated .google.cloud.orchestration.airflow.service.v1.ImageVersion image_versions = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getImageVersions() + { + return $this->image_versions; + } + + /** + * The list of supported ImageVersions in a location. + * + * Generated from protobuf field repeated .google.cloud.orchestration.airflow.service.v1.ImageVersion image_versions = 1; + * @param array<\Google\Cloud\Orchestration\Airflow\Service\V1\ImageVersion>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setImageVersions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Orchestration\Airflow\Service\V1\ImageVersion::class); + $this->image_versions = $arr; + + return $this; + } + + /** + * The page token used to query for the next page if one exists. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * The page token used to query for the next page if one exists. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListUserWorkloadsConfigMapsRequest.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListUserWorkloadsConfigMapsRequest.php new file mode 100644 index 000000000000..2046af856140 --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListUserWorkloadsConfigMapsRequest.php @@ -0,0 +1,158 @@ +google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest + */ +class ListUserWorkloadsConfigMapsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. List ConfigMaps in the given environment, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of ConfigMaps to return. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. The next_page_token value returned from a previous List request, + * if any. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. List ConfigMaps in the given environment, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * Please see {@see EnvironmentsClient::environmentName()} for help formatting this field. + * + * @return \Google\Cloud\Orchestration\Airflow\Service\V1\ListUserWorkloadsConfigMapsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. List ConfigMaps in the given environment, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * @type int $page_size + * Optional. The maximum number of ConfigMaps to return. + * @type string $page_token + * Optional. The next_page_token value returned from a previous List request, + * if any. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); + parent::__construct($data); + } + + /** + * Required. List ConfigMaps in the given environment, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. List ConfigMaps in the given environment, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The maximum number of ConfigMaps to return. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of ConfigMaps to return. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. The next_page_token value returned from a previous List request, + * if any. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. The next_page_token value returned from a previous List request, + * if any. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListUserWorkloadsConfigMapsResponse.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListUserWorkloadsConfigMapsResponse.php new file mode 100644 index 000000000000..2f724620a158 --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListUserWorkloadsConfigMapsResponse.php @@ -0,0 +1,101 @@ +google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsResponse + */ +class ListUserWorkloadsConfigMapsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of ConfigMaps returned by a ListUserWorkloadsConfigMapsRequest. + * + * Generated from protobuf field repeated .google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap user_workloads_config_maps = 1; + */ + private $user_workloads_config_maps; + /** + * The page token used to query for the next page if one exists. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Orchestration\Airflow\Service\V1\UserWorkloadsConfigMap>|\Google\Protobuf\Internal\RepeatedField $user_workloads_config_maps + * The list of ConfigMaps returned by a ListUserWorkloadsConfigMapsRequest. + * @type string $next_page_token + * The page token used to query for the next page if one exists. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); + parent::__construct($data); + } + + /** + * The list of ConfigMaps returned by a ListUserWorkloadsConfigMapsRequest. + * + * Generated from protobuf field repeated .google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap user_workloads_config_maps = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUserWorkloadsConfigMaps() + { + return $this->user_workloads_config_maps; + } + + /** + * The list of ConfigMaps returned by a ListUserWorkloadsConfigMapsRequest. + * + * Generated from protobuf field repeated .google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap user_workloads_config_maps = 1; + * @param array<\Google\Cloud\Orchestration\Airflow\Service\V1\UserWorkloadsConfigMap>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUserWorkloadsConfigMaps($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Orchestration\Airflow\Service\V1\UserWorkloadsConfigMap::class); + $this->user_workloads_config_maps = $arr; + + return $this; + } + + /** + * The page token used to query for the next page if one exists. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * The page token used to query for the next page if one exists. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListUserWorkloadsSecretsRequest.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListUserWorkloadsSecretsRequest.php new file mode 100644 index 000000000000..2033ac139f94 --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListUserWorkloadsSecretsRequest.php @@ -0,0 +1,158 @@ +google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest + */ +class ListUserWorkloadsSecretsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. List Secrets in the given environment, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of Secrets to return. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. The next_page_token value returned from a previous List request, + * if any. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. List Secrets in the given environment, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * Please see {@see EnvironmentsClient::environmentName()} for help formatting this field. + * + * @return \Google\Cloud\Orchestration\Airflow\Service\V1\ListUserWorkloadsSecretsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. List Secrets in the given environment, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * @type int $page_size + * Optional. The maximum number of Secrets to return. + * @type string $page_token + * Optional. The next_page_token value returned from a previous List request, + * if any. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); + parent::__construct($data); + } + + /** + * Required. List Secrets in the given environment, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. List Secrets in the given environment, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The maximum number of Secrets to return. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of Secrets to return. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. The next_page_token value returned from a previous List request, + * if any. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. The next_page_token value returned from a previous List request, + * if any. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListUserWorkloadsSecretsResponse.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListUserWorkloadsSecretsResponse.php new file mode 100644 index 000000000000..0719870695d3 --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListUserWorkloadsSecretsResponse.php @@ -0,0 +1,101 @@ +google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsResponse + */ +class ListUserWorkloadsSecretsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of Secrets returned by a ListUserWorkloadsSecretsRequest. + * + * Generated from protobuf field repeated .google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret user_workloads_secrets = 1; + */ + private $user_workloads_secrets; + /** + * The page token used to query for the next page if one exists. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Orchestration\Airflow\Service\V1\UserWorkloadsSecret>|\Google\Protobuf\Internal\RepeatedField $user_workloads_secrets + * The list of Secrets returned by a ListUserWorkloadsSecretsRequest. + * @type string $next_page_token + * The page token used to query for the next page if one exists. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); + parent::__construct($data); + } + + /** + * The list of Secrets returned by a ListUserWorkloadsSecretsRequest. + * + * Generated from protobuf field repeated .google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret user_workloads_secrets = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUserWorkloadsSecrets() + { + return $this->user_workloads_secrets; + } + + /** + * The list of Secrets returned by a ListUserWorkloadsSecretsRequest. + * + * Generated from protobuf field repeated .google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret user_workloads_secrets = 1; + * @param array<\Google\Cloud\Orchestration\Airflow\Service\V1\UserWorkloadsSecret>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUserWorkloadsSecrets($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Orchestration\Airflow\Service\V1\UserWorkloadsSecret::class); + $this->user_workloads_secrets = $arr; + + return $this; + } + + /** + * The page token used to query for the next page if one exists. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * The page token used to query for the next page if one exists. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListWorkloadsRequest.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListWorkloadsRequest.php new file mode 100644 index 000000000000..b52f55294277 --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListWorkloadsRequest.php @@ -0,0 +1,212 @@ +google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest + */ +class ListWorkloadsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The environment name to get workloads for, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of environments to return. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. The next_page_token value returned from a previous List request, + * if any. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. The list filter. + * Currently only supports equality on the type field. The value of a field + * specified in the filter expression must be one ComposerWorkloadType enum + * option. It's possible to get multiple types using "OR" operator, e.g.: + * "type=SCHEDULER OR type=CELERY_WORKER". If not specified, all items are + * returned. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + + /** + * @param string $parent Required. The environment name to get workloads for, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * Please see {@see EnvironmentsClient::environmentName()} for help formatting this field. + * + * @return \Google\Cloud\Orchestration\Airflow\Service\V1\ListWorkloadsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The environment name to get workloads for, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * @type int $page_size + * Optional. The maximum number of environments to return. + * @type string $page_token + * Optional. The next_page_token value returned from a previous List request, + * if any. + * @type string $filter + * Optional. The list filter. + * Currently only supports equality on the type field. The value of a field + * specified in the filter expression must be one ComposerWorkloadType enum + * option. It's possible to get multiple types using "OR" operator, e.g.: + * "type=SCHEDULER OR type=CELERY_WORKER". If not specified, all items are + * returned. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); + parent::__construct($data); + } + + /** + * Required. The environment name to get workloads for, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The environment name to get workloads for, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The maximum number of environments to return. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of environments to return. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. The next_page_token value returned from a previous List request, + * if any. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. The next_page_token value returned from a previous List request, + * if any. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. The list filter. + * Currently only supports equality on the type field. The value of a field + * specified in the filter expression must be one ComposerWorkloadType enum + * option. It's possible to get multiple types using "OR" operator, e.g.: + * "type=SCHEDULER OR type=CELERY_WORKER". If not specified, all items are + * returned. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. The list filter. + * Currently only supports equality on the type field. The value of a field + * specified in the filter expression must be one ComposerWorkloadType enum + * option. It's possible to get multiple types using "OR" operator, e.g.: + * "type=SCHEDULER OR type=CELERY_WORKER". If not specified, all items are + * returned. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListWorkloadsResponse.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListWorkloadsResponse.php new file mode 100644 index 000000000000..4e83ea12af70 --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListWorkloadsResponse.php @@ -0,0 +1,101 @@ +google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse + */ +class ListWorkloadsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of environment workloads. + * + * Generated from protobuf field repeated .google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload workloads = 1; + */ + private $workloads; + /** + * The page token used to query for the next page if one exists. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Orchestration\Airflow\Service\V1\ListWorkloadsResponse\ComposerWorkload>|\Google\Protobuf\Internal\RepeatedField $workloads + * The list of environment workloads. + * @type string $next_page_token + * The page token used to query for the next page if one exists. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); + parent::__construct($data); + } + + /** + * The list of environment workloads. + * + * Generated from protobuf field repeated .google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload workloads = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getWorkloads() + { + return $this->workloads; + } + + /** + * The list of environment workloads. + * + * Generated from protobuf field repeated .google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload workloads = 1; + * @param array<\Google\Cloud\Orchestration\Airflow\Service\V1\ListWorkloadsResponse\ComposerWorkload>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setWorkloads($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Orchestration\Airflow\Service\V1\ListWorkloadsResponse\ComposerWorkload::class); + $this->workloads = $arr; + + return $this; + } + + /** + * The page token used to query for the next page if one exists. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * The page token used to query for the next page if one exists. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListWorkloadsResponse/ComposerWorkload.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListWorkloadsResponse/ComposerWorkload.php new file mode 100644 index 000000000000..aff0aa24b1c9 --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListWorkloadsResponse/ComposerWorkload.php @@ -0,0 +1,148 @@ +google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload + */ +class ComposerWorkload extends \Google\Protobuf\Internal\Message +{ + /** + * Name of a workload. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Type of a workload. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadType type = 2; + */ + protected $type = 0; + /** + * Output only. Status of a workload. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadStatus status = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $status = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Name of a workload. + * @type int $type + * Type of a workload. + * @type \Google\Cloud\Orchestration\Airflow\Service\V1\ListWorkloadsResponse\ComposerWorkloadStatus $status + * Output only. Status of a workload. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); + parent::__construct($data); + } + + /** + * Name of a workload. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Name of a workload. + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Type of a workload. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadType type = 2; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Type of a workload. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadType type = 2; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Orchestration\Airflow\Service\V1\ListWorkloadsResponse\ComposerWorkloadType::class); + $this->type = $var; + + return $this; + } + + /** + * Output only. Status of a workload. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadStatus status = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Orchestration\Airflow\Service\V1\ListWorkloadsResponse\ComposerWorkloadStatus|null + */ + public function getStatus() + { + return $this->status; + } + + public function hasStatus() + { + return isset($this->status); + } + + public function clearStatus() + { + unset($this->status); + } + + /** + * Output only. Status of a workload. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadStatus status = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Orchestration\Airflow\Service\V1\ListWorkloadsResponse\ComposerWorkloadStatus $var + * @return $this + */ + public function setStatus($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Orchestration\Airflow\Service\V1\ListWorkloadsResponse\ComposerWorkloadStatus::class); + $this->status = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ComposerWorkload::class, \Google\Cloud\Orchestration\Airflow\Service\V1\ListWorkloadsResponse_ComposerWorkload::class); + diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListWorkloadsResponse/ComposerWorkloadState.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListWorkloadsResponse/ComposerWorkloadState.php new file mode 100644 index 000000000000..51209700fb83 --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListWorkloadsResponse/ComposerWorkloadState.php @@ -0,0 +1,92 @@ +google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadState + */ +class ComposerWorkloadState +{ + /** + * Not able to determine the status of the workload. + * + * Generated from protobuf enum COMPOSER_WORKLOAD_STATE_UNSPECIFIED = 0; + */ + const COMPOSER_WORKLOAD_STATE_UNSPECIFIED = 0; + /** + * Workload is in pending state and has not yet started. + * + * Generated from protobuf enum PENDING = 1; + */ + const PENDING = 1; + /** + * Workload is running fine. + * + * Generated from protobuf enum OK = 2; + */ + const OK = 2; + /** + * Workload is running but there are some non-critical problems. + * + * Generated from protobuf enum WARNING = 3; + */ + const WARNING = 3; + /** + * Workload is not running due to an error. + * + * Generated from protobuf enum ERROR = 4; + */ + const ERROR = 4; + /** + * Workload has finished execution with success. + * + * Generated from protobuf enum SUCCEEDED = 5; + */ + const SUCCEEDED = 5; + /** + * Workload has finished execution with failure. + * + * Generated from protobuf enum FAILED = 6; + */ + const FAILED = 6; + + private static $valueToName = [ + self::COMPOSER_WORKLOAD_STATE_UNSPECIFIED => 'COMPOSER_WORKLOAD_STATE_UNSPECIFIED', + self::PENDING => 'PENDING', + self::OK => 'OK', + self::WARNING => 'WARNING', + self::ERROR => 'ERROR', + self::SUCCEEDED => 'SUCCEEDED', + self::FAILED => 'FAILED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ComposerWorkloadState::class, \Google\Cloud\Orchestration\Airflow\Service\V1\ListWorkloadsResponse_ComposerWorkloadState::class); + diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListWorkloadsResponse/ComposerWorkloadStatus.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListWorkloadsResponse/ComposerWorkloadStatus.php new file mode 100644 index 000000000000..836548218d32 --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListWorkloadsResponse/ComposerWorkloadStatus.php @@ -0,0 +1,138 @@ +google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadStatus + */ +class ComposerWorkloadStatus extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Workload state. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadState state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. Text to provide more descriptive status. + * + * Generated from protobuf field string status_message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $status_message = ''; + /** + * Output only. Detailed message of the status. + * + * Generated from protobuf field string detailed_status_message = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $detailed_status_message = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $state + * Output only. Workload state. + * @type string $status_message + * Output only. Text to provide more descriptive status. + * @type string $detailed_status_message + * Output only. Detailed message of the status. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Workload state. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadState state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. Workload state. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadState state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Orchestration\Airflow\Service\V1\ListWorkloadsResponse\ComposerWorkloadState::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. Text to provide more descriptive status. + * + * Generated from protobuf field string status_message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getStatusMessage() + { + return $this->status_message; + } + + /** + * Output only. Text to provide more descriptive status. + * + * Generated from protobuf field string status_message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setStatusMessage($var) + { + GPBUtil::checkString($var, True); + $this->status_message = $var; + + return $this; + } + + /** + * Output only. Detailed message of the status. + * + * Generated from protobuf field string detailed_status_message = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDetailedStatusMessage() + { + return $this->detailed_status_message; + } + + /** + * Output only. Detailed message of the status. + * + * Generated from protobuf field string detailed_status_message = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setDetailedStatusMessage($var) + { + GPBUtil::checkString($var, True); + $this->detailed_status_message = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ComposerWorkloadStatus::class, \Google\Cloud\Orchestration\Airflow\Service\V1\ListWorkloadsResponse_ComposerWorkloadStatus::class); + diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListWorkloadsResponse/ComposerWorkloadType.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListWorkloadsResponse/ComposerWorkloadType.php new file mode 100644 index 000000000000..2753ce300497 --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListWorkloadsResponse/ComposerWorkloadType.php @@ -0,0 +1,106 @@ +google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadType + */ +class ComposerWorkloadType +{ + /** + * Not able to determine the type of the workload. + * + * Generated from protobuf enum COMPOSER_WORKLOAD_TYPE_UNSPECIFIED = 0; + */ + const COMPOSER_WORKLOAD_TYPE_UNSPECIFIED = 0; + /** + * Celery worker. + * + * Generated from protobuf enum CELERY_WORKER = 1; + */ + const CELERY_WORKER = 1; + /** + * Kubernetes worker. + * + * Generated from protobuf enum KUBERNETES_WORKER = 2; + */ + const KUBERNETES_WORKER = 2; + /** + * Workload created by Kubernetes Pod Operator. + * + * Generated from protobuf enum KUBERNETES_OPERATOR_POD = 3; + */ + const KUBERNETES_OPERATOR_POD = 3; + /** + * Airflow scheduler. + * + * Generated from protobuf enum SCHEDULER = 4; + */ + const SCHEDULER = 4; + /** + * Airflow Dag processor. + * + * Generated from protobuf enum DAG_PROCESSOR = 5; + */ + const DAG_PROCESSOR = 5; + /** + * Airflow triggerer. + * + * Generated from protobuf enum TRIGGERER = 6; + */ + const TRIGGERER = 6; + /** + * Airflow web server UI. + * + * Generated from protobuf enum WEB_SERVER = 7; + */ + const WEB_SERVER = 7; + /** + * Redis. + * + * Generated from protobuf enum REDIS = 8; + */ + const REDIS = 8; + + private static $valueToName = [ + self::COMPOSER_WORKLOAD_TYPE_UNSPECIFIED => 'COMPOSER_WORKLOAD_TYPE_UNSPECIFIED', + self::CELERY_WORKER => 'CELERY_WORKER', + self::KUBERNETES_WORKER => 'KUBERNETES_WORKER', + self::KUBERNETES_OPERATOR_POD => 'KUBERNETES_OPERATOR_POD', + self::SCHEDULER => 'SCHEDULER', + self::DAG_PROCESSOR => 'DAG_PROCESSOR', + self::TRIGGERER => 'TRIGGERER', + self::WEB_SERVER => 'WEB_SERVER', + self::REDIS => 'REDIS', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ComposerWorkloadType::class, \Google\Cloud\Orchestration\Airflow\Service\V1\ListWorkloadsResponse_ComposerWorkloadType::class); + diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/LoadSnapshotRequest.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/LoadSnapshotRequest.php new file mode 100644 index 000000000000..fe4126d9df59 --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/LoadSnapshotRequest.php @@ -0,0 +1,261 @@ +google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest + */ +class LoadSnapshotRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the target environment in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * + * Generated from protobuf field string environment = 1; + */ + protected $environment = ''; + /** + * A Cloud Storage path to a snapshot to load, e.g.: + * "gs://my-bucket/snapshots/project_location_environment_timestamp". + * + * Generated from protobuf field string snapshot_path = 2; + */ + protected $snapshot_path = ''; + /** + * Whether or not to skip installing Pypi packages when loading the + * environment's state. + * + * Generated from protobuf field bool skip_pypi_packages_installation = 3; + */ + protected $skip_pypi_packages_installation = false; + /** + * Whether or not to skip setting environment variables when loading the + * environment's state. + * + * Generated from protobuf field bool skip_environment_variables_setting = 4; + */ + protected $skip_environment_variables_setting = false; + /** + * Whether or not to skip setting Airflow overrides when loading the + * environment's state. + * + * Generated from protobuf field bool skip_airflow_overrides_setting = 5; + */ + protected $skip_airflow_overrides_setting = false; + /** + * Whether or not to skip copying Cloud Storage data when loading the + * environment's state. + * + * Generated from protobuf field bool skip_gcs_data_copying = 6; + */ + protected $skip_gcs_data_copying = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $environment + * The resource name of the target environment in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * @type string $snapshot_path + * A Cloud Storage path to a snapshot to load, e.g.: + * "gs://my-bucket/snapshots/project_location_environment_timestamp". + * @type bool $skip_pypi_packages_installation + * Whether or not to skip installing Pypi packages when loading the + * environment's state. + * @type bool $skip_environment_variables_setting + * Whether or not to skip setting environment variables when loading the + * environment's state. + * @type bool $skip_airflow_overrides_setting + * Whether or not to skip setting Airflow overrides when loading the + * environment's state. + * @type bool $skip_gcs_data_copying + * Whether or not to skip copying Cloud Storage data when loading the + * environment's state. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); + parent::__construct($data); + } + + /** + * The resource name of the target environment in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * + * Generated from protobuf field string environment = 1; + * @return string + */ + public function getEnvironment() + { + return $this->environment; + } + + /** + * The resource name of the target environment in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * + * Generated from protobuf field string environment = 1; + * @param string $var + * @return $this + */ + public function setEnvironment($var) + { + GPBUtil::checkString($var, True); + $this->environment = $var; + + return $this; + } + + /** + * A Cloud Storage path to a snapshot to load, e.g.: + * "gs://my-bucket/snapshots/project_location_environment_timestamp". + * + * Generated from protobuf field string snapshot_path = 2; + * @return string + */ + public function getSnapshotPath() + { + return $this->snapshot_path; + } + + /** + * A Cloud Storage path to a snapshot to load, e.g.: + * "gs://my-bucket/snapshots/project_location_environment_timestamp". + * + * Generated from protobuf field string snapshot_path = 2; + * @param string $var + * @return $this + */ + public function setSnapshotPath($var) + { + GPBUtil::checkString($var, True); + $this->snapshot_path = $var; + + return $this; + } + + /** + * Whether or not to skip installing Pypi packages when loading the + * environment's state. + * + * Generated from protobuf field bool skip_pypi_packages_installation = 3; + * @return bool + */ + public function getSkipPypiPackagesInstallation() + { + return $this->skip_pypi_packages_installation; + } + + /** + * Whether or not to skip installing Pypi packages when loading the + * environment's state. + * + * Generated from protobuf field bool skip_pypi_packages_installation = 3; + * @param bool $var + * @return $this + */ + public function setSkipPypiPackagesInstallation($var) + { + GPBUtil::checkBool($var); + $this->skip_pypi_packages_installation = $var; + + return $this; + } + + /** + * Whether or not to skip setting environment variables when loading the + * environment's state. + * + * Generated from protobuf field bool skip_environment_variables_setting = 4; + * @return bool + */ + public function getSkipEnvironmentVariablesSetting() + { + return $this->skip_environment_variables_setting; + } + + /** + * Whether or not to skip setting environment variables when loading the + * environment's state. + * + * Generated from protobuf field bool skip_environment_variables_setting = 4; + * @param bool $var + * @return $this + */ + public function setSkipEnvironmentVariablesSetting($var) + { + GPBUtil::checkBool($var); + $this->skip_environment_variables_setting = $var; + + return $this; + } + + /** + * Whether or not to skip setting Airflow overrides when loading the + * environment's state. + * + * Generated from protobuf field bool skip_airflow_overrides_setting = 5; + * @return bool + */ + public function getSkipAirflowOverridesSetting() + { + return $this->skip_airflow_overrides_setting; + } + + /** + * Whether or not to skip setting Airflow overrides when loading the + * environment's state. + * + * Generated from protobuf field bool skip_airflow_overrides_setting = 5; + * @param bool $var + * @return $this + */ + public function setSkipAirflowOverridesSetting($var) + { + GPBUtil::checkBool($var); + $this->skip_airflow_overrides_setting = $var; + + return $this; + } + + /** + * Whether or not to skip copying Cloud Storage data when loading the + * environment's state. + * + * Generated from protobuf field bool skip_gcs_data_copying = 6; + * @return bool + */ + public function getSkipGcsDataCopying() + { + return $this->skip_gcs_data_copying; + } + + /** + * Whether or not to skip copying Cloud Storage data when loading the + * environment's state. + * + * Generated from protobuf field bool skip_gcs_data_copying = 6; + * @param bool $var + * @return $this + */ + public function setSkipGcsDataCopying($var) + { + GPBUtil::checkBool($var); + $this->skip_gcs_data_copying = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/LoadSnapshotResponse.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/LoadSnapshotResponse.php new file mode 100644 index 000000000000..1ab2fa70867e --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/LoadSnapshotResponse.php @@ -0,0 +1,33 @@ +google.cloud.orchestration.airflow.service.v1.LoadSnapshotResponse + */ +class LoadSnapshotResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/MaintenanceWindow.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/MaintenanceWindow.php new file mode 100644 index 000000000000..da4c28d1f6e9 --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/MaintenanceWindow.php @@ -0,0 +1,185 @@ +google.cloud.orchestration.airflow.service.v1.MaintenanceWindow + */ +class MaintenanceWindow extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Start time of the first recurrence of the maintenance window. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $start_time = null; + /** + * Required. Maintenance window end time. It is used only to calculate the + * duration of the maintenance window. The value for end-time must be in the + * future, relative to `start_time`. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $end_time = null; + /** + * Required. Maintenance window recurrence. Format is a subset of + * [RFC-5545](https://tools.ietf.org/html/rfc5545) `RRULE`. The only allowed + * values for `FREQ` field are `FREQ=DAILY` and `FREQ=WEEKLY;BYDAY=...` + * Example values: `FREQ=WEEKLY;BYDAY=TU,WE`, `FREQ=DAILY`. + * + * Generated from protobuf field string recurrence = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $recurrence = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $start_time + * Required. Start time of the first recurrence of the maintenance window. + * @type \Google\Protobuf\Timestamp $end_time + * Required. Maintenance window end time. It is used only to calculate the + * duration of the maintenance window. The value for end-time must be in the + * future, relative to `start_time`. + * @type string $recurrence + * Required. Maintenance window recurrence. Format is a subset of + * [RFC-5545](https://tools.ietf.org/html/rfc5545) `RRULE`. The only allowed + * values for `FREQ` field are `FREQ=DAILY` and `FREQ=WEEKLY;BYDAY=...` + * Example values: `FREQ=WEEKLY;BYDAY=TU,WE`, `FREQ=DAILY`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); + parent::__construct($data); + } + + /** + * Required. Start time of the first recurrence of the maintenance window. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getStartTime() + { + return $this->start_time; + } + + public function hasStartTime() + { + return isset($this->start_time); + } + + public function clearStartTime() + { + unset($this->start_time); + } + + /** + * Required. Start time of the first recurrence of the maintenance window. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * Required. Maintenance window end time. It is used only to calculate the + * duration of the maintenance window. The value for end-time must be in the + * future, relative to `start_time`. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEndTime() + { + return $this->end_time; + } + + public function hasEndTime() + { + return isset($this->end_time); + } + + public function clearEndTime() + { + unset($this->end_time); + } + + /** + * Required. Maintenance window end time. It is used only to calculate the + * duration of the maintenance window. The value for end-time must be in the + * future, relative to `start_time`. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * Required. Maintenance window recurrence. Format is a subset of + * [RFC-5545](https://tools.ietf.org/html/rfc5545) `RRULE`. The only allowed + * values for `FREQ` field are `FREQ=DAILY` and `FREQ=WEEKLY;BYDAY=...` + * Example values: `FREQ=WEEKLY;BYDAY=TU,WE`, `FREQ=DAILY`. + * + * Generated from protobuf field string recurrence = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getRecurrence() + { + return $this->recurrence; + } + + /** + * Required. Maintenance window recurrence. Format is a subset of + * [RFC-5545](https://tools.ietf.org/html/rfc5545) `RRULE`. The only allowed + * values for `FREQ` field are `FREQ=DAILY` and `FREQ=WEEKLY;BYDAY=...` + * Example values: `FREQ=WEEKLY;BYDAY=TU,WE`, `FREQ=DAILY`. + * + * Generated from protobuf field string recurrence = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setRecurrence($var) + { + GPBUtil::checkString($var, True); + $this->recurrence = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/MasterAuthorizedNetworksConfig.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/MasterAuthorizedNetworksConfig.php new file mode 100644 index 000000000000..e7c09c6da662 --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/MasterAuthorizedNetworksConfig.php @@ -0,0 +1,108 @@ +google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig + */ +class MasterAuthorizedNetworksConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Whether or not master authorized networks feature is enabled. + * + * Generated from protobuf field bool enabled = 1; + */ + protected $enabled = false; + /** + * Up to 50 external networks that could access Kubernetes master through + * HTTPS. + * + * Generated from protobuf field repeated .google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.CidrBlock cidr_blocks = 2; + */ + private $cidr_blocks; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $enabled + * Whether or not master authorized networks feature is enabled. + * @type array<\Google\Cloud\Orchestration\Airflow\Service\V1\MasterAuthorizedNetworksConfig\CidrBlock>|\Google\Protobuf\Internal\RepeatedField $cidr_blocks + * Up to 50 external networks that could access Kubernetes master through + * HTTPS. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); + parent::__construct($data); + } + + /** + * Whether or not master authorized networks feature is enabled. + * + * Generated from protobuf field bool enabled = 1; + * @return bool + */ + public function getEnabled() + { + return $this->enabled; + } + + /** + * Whether or not master authorized networks feature is enabled. + * + * Generated from protobuf field bool enabled = 1; + * @param bool $var + * @return $this + */ + public function setEnabled($var) + { + GPBUtil::checkBool($var); + $this->enabled = $var; + + return $this; + } + + /** + * Up to 50 external networks that could access Kubernetes master through + * HTTPS. + * + * Generated from protobuf field repeated .google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.CidrBlock cidr_blocks = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCidrBlocks() + { + return $this->cidr_blocks; + } + + /** + * Up to 50 external networks that could access Kubernetes master through + * HTTPS. + * + * Generated from protobuf field repeated .google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.CidrBlock cidr_blocks = 2; + * @param array<\Google\Cloud\Orchestration\Airflow\Service\V1\MasterAuthorizedNetworksConfig\CidrBlock>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCidrBlocks($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Orchestration\Airflow\Service\V1\MasterAuthorizedNetworksConfig\CidrBlock::class); + $this->cidr_blocks = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/MasterAuthorizedNetworksConfig/CidrBlock.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/MasterAuthorizedNetworksConfig/CidrBlock.php new file mode 100644 index 000000000000..b93272c13e12 --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/MasterAuthorizedNetworksConfig/CidrBlock.php @@ -0,0 +1,104 @@ +google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.CidrBlock + */ +class CidrBlock extends \Google\Protobuf\Internal\Message +{ + /** + * User-defined name that identifies the CIDR block. + * + * Generated from protobuf field string display_name = 1; + */ + protected $display_name = ''; + /** + * CIDR block that must be specified in CIDR notation. + * + * Generated from protobuf field string cidr_block = 2; + */ + protected $cidr_block = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $display_name + * User-defined name that identifies the CIDR block. + * @type string $cidr_block + * CIDR block that must be specified in CIDR notation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); + parent::__construct($data); + } + + /** + * User-defined name that identifies the CIDR block. + * + * Generated from protobuf field string display_name = 1; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * User-defined name that identifies the CIDR block. + * + * Generated from protobuf field string display_name = 1; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * CIDR block that must be specified in CIDR notation. + * + * Generated from protobuf field string cidr_block = 2; + * @return string + */ + public function getCidrBlock() + { + return $this->cidr_block; + } + + /** + * CIDR block that must be specified in CIDR notation. + * + * Generated from protobuf field string cidr_block = 2; + * @param string $var + * @return $this + */ + public function setCidrBlock($var) + { + GPBUtil::checkString($var, True); + $this->cidr_block = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(CidrBlock::class, \Google\Cloud\Orchestration\Airflow\Service\V1\MasterAuthorizedNetworksConfig_CidrBlock::class); + diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/NetworkingConfig.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/NetworkingConfig.php new file mode 100644 index 000000000000..104b52d25dc8 --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/NetworkingConfig.php @@ -0,0 +1,76 @@ +google.cloud.orchestration.airflow.service.v1.NetworkingConfig + */ +class NetworkingConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Indicates the user requested specifc connection type between + * Tenant and Customer projects. You cannot set networking connection type in + * public IP environment. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.NetworkingConfig.ConnectionType connection_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $connection_type = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $connection_type + * Optional. Indicates the user requested specifc connection type between + * Tenant and Customer projects. You cannot set networking connection type in + * public IP environment. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Indicates the user requested specifc connection type between + * Tenant and Customer projects. You cannot set networking connection type in + * public IP environment. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.NetworkingConfig.ConnectionType connection_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getConnectionType() + { + return $this->connection_type; + } + + /** + * Optional. Indicates the user requested specifc connection type between + * Tenant and Customer projects. You cannot set networking connection type in + * public IP environment. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.NetworkingConfig.ConnectionType connection_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setConnectionType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Orchestration\Airflow\Service\V1\NetworkingConfig\ConnectionType::class); + $this->connection_type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/NetworkingConfig/ConnectionType.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/NetworkingConfig/ConnectionType.php new file mode 100644 index 000000000000..605bfc310b9c --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/NetworkingConfig/ConnectionType.php @@ -0,0 +1,69 @@ +google.cloud.orchestration.airflow.service.v1.NetworkingConfig.ConnectionType + */ +class ConnectionType +{ + /** + * No specific connection type was requested, so the environment uses + * the default value corresponding to the rest of its configuration. + * + * Generated from protobuf enum CONNECTION_TYPE_UNSPECIFIED = 0; + */ + const CONNECTION_TYPE_UNSPECIFIED = 0; + /** + * Requests the use of VPC peerings for connecting the Customer and Tenant + * projects. + * + * Generated from protobuf enum VPC_PEERING = 1; + */ + const VPC_PEERING = 1; + /** + * Requests the use of Private Service Connect for connecting the Customer + * and Tenant projects. + * + * Generated from protobuf enum PRIVATE_SERVICE_CONNECT = 2; + */ + const PRIVATE_SERVICE_CONNECT = 2; + + private static $valueToName = [ + self::CONNECTION_TYPE_UNSPECIFIED => 'CONNECTION_TYPE_UNSPECIFIED', + self::VPC_PEERING => 'VPC_PEERING', + self::PRIVATE_SERVICE_CONNECT => 'PRIVATE_SERVICE_CONNECT', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ConnectionType::class, \Google\Cloud\Orchestration\Airflow\Service\V1\NetworkingConfig_ConnectionType::class); + diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/NodeConfig.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/NodeConfig.php new file mode 100644 index 000000000000..c9834b267eb0 --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/NodeConfig.php @@ -0,0 +1,776 @@ +google.cloud.orchestration.airflow.service.v1.NodeConfig + */ +class NodeConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The Compute Engine [zone](/compute/docs/regions-zones) in which + * to deploy the VMs used to run the Apache Airflow software, specified as a + * [relative resource + * name](/apis/design/resource_names#relative_resource_name). For example: + * "projects/{projectId}/zones/{zoneId}". + * This `location` must belong to the enclosing environment's project and + * location. If both this field and `nodeConfig.machineType` are specified, + * `nodeConfig.machineType` must belong to this `location`; if both are + * unspecified, the service will pick a zone in the Compute Engine region + * corresponding to the Cloud Composer location, and propagate that choice to + * both fields. If only one field (`location` or `nodeConfig.machineType`) is + * specified, the location information from the specified field will be + * propagated to the unspecified field. + * This field is supported for Cloud Composer environments in versions + * composer-1.*.*-airflow-*.*.*. + * + * Generated from protobuf field string location = 1; + */ + protected $location = ''; + /** + * Optional. The Compute Engine + * [machine type](/compute/docs/machine-types) used for cluster instances, + * specified as a + * [relative resource + * name](/apis/design/resource_names#relative_resource_name). For example: + * "projects/{projectId}/zones/{zoneId}/machineTypes/{machineTypeId}". + * The `machineType` must belong to the enclosing environment's project and + * location. If both this field and `nodeConfig.location` are specified, + * this `machineType` must belong to the `nodeConfig.location`; if both are + * unspecified, the service will pick a zone in the Compute Engine region + * corresponding to the Cloud Composer location, and propagate that choice to + * both fields. If exactly one of this field and `nodeConfig.location` is + * specified, the location information from the specified field will be + * propagated to the unspecified field. + * The `machineTypeId` must not be a [shared-core machine + * type](/compute/docs/machine-types#sharedcore). + * If this field is unspecified, the `machineTypeId` defaults + * to "n1-standard-1". + * This field is supported for Cloud Composer environments in versions + * composer-1.*.*-airflow-*.*.*. + * + * Generated from protobuf field string machine_type = 2; + */ + protected $machine_type = ''; + /** + * Optional. The Compute Engine network to be used for machine + * communications, specified as a + * [relative resource + * name](/apis/design/resource_names#relative_resource_name). For example: + * "projects/{projectId}/global/networks/{networkId}". + * If unspecified, the "default" network ID in the environment's project is + * used. If a [Custom Subnet Network](/vpc/docs/vpc#vpc_networks_and_subnets) + * is provided, `nodeConfig.subnetwork` must also be provided. For + * [Shared VPC](/vpc/docs/shared-vpc) subnetwork requirements, see + * `nodeConfig.subnetwork`. + * + * Generated from protobuf field string network = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $network = ''; + /** + * Optional. The Compute Engine subnetwork to be used for machine + * communications, specified as a + * [relative resource + * name](/apis/design/resource_names#relative_resource_name). For example: + * "projects/{projectId}/regions/{regionId}/subnetworks/{subnetworkId}" + * If a subnetwork is provided, `nodeConfig.network` must also be provided, + * and the subnetwork must belong to the enclosing environment's project and + * location. + * + * Generated from protobuf field string subnetwork = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $subnetwork = ''; + /** + * Optional. The disk size in GB used for node VMs. Minimum size is 30GB. + * If unspecified, defaults to 100GB. Cannot be updated. + * This field is supported for Cloud Composer environments in versions + * composer-1.*.*-airflow-*.*.*. + * + * Generated from protobuf field int32 disk_size_gb = 5; + */ + protected $disk_size_gb = 0; + /** + * Optional. The set of Google API scopes to be made available on all + * node VMs. If `oauth_scopes` is empty, defaults to + * ["https://www.googleapis.com/auth/cloud-platform"]. Cannot be updated. + * This field is supported for Cloud Composer environments in versions + * composer-1.*.*-airflow-*.*.*. + * + * Generated from protobuf field repeated string oauth_scopes = 6; + */ + private $oauth_scopes; + /** + * Optional. The Google Cloud Platform Service Account to be used by the node + * VMs. If a service account is not specified, the "default" Compute Engine + * service account is used. Cannot be updated. + * + * Generated from protobuf field string service_account = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $service_account = ''; + /** + * Optional. The list of instance tags applied to all node VMs. Tags are used + * to identify valid sources or targets for network firewalls. Each tag within + * the list must comply with [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). + * Cannot be updated. + * + * Generated from protobuf field repeated string tags = 8; + */ + private $tags; + /** + * Optional. The configuration for controlling how IPs are allocated in the + * GKE cluster. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy ip_allocation_policy = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $ip_allocation_policy = null; + /** + * Optional. Deploys 'ip-masq-agent' daemon set in the GKE cluster and defines + * nonMasqueradeCIDRs equals to pod IP range so IP masquerading is used for + * all destination addresses, except between pods traffic. + * See: + * https://cloud.google.com/kubernetes-engine/docs/how-to/ip-masquerade-agent + * + * Generated from protobuf field bool enable_ip_masq_agent = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $enable_ip_masq_agent = false; + /** + * Optional. Network Attachment that Cloud Composer environment is connected + * to, which provides connectivity with a user's VPC network. Takes precedence + * over network and subnetwork settings. If not provided, but network and + * subnetwork are defined during environment, it will be provisioned. If not + * provided and network and subnetwork are also empty, then connectivity to + * user's VPC network is disabled. Network attachment must be provided in + * format + * projects/{project}/regions/{region}/networkAttachments/{networkAttachment}. + * This field is supported for Cloud Composer environments in versions + * composer-3.*.*-airflow-*.*.* and newer. + * + * Generated from protobuf field string composer_network_attachment = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $composer_network_attachment = ''; + /** + * Optional. The IP range in CIDR notation to use internally by Cloud + * Composer. IP addresses are not reserved - and the same range can be used by + * multiple Cloud Composer environments. In case of overlap, IPs from this + * range will not be accessible in the user's VPC network. Cannot be updated. + * If not specified, the default value of '100.64.128.0/20' is used. + * This field is supported for Cloud Composer environments in versions + * composer-3.*.*-airflow-*.*.* and newer. + * + * Generated from protobuf field string composer_internal_ipv4_cidr_block = 13 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $composer_internal_ipv4_cidr_block = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $location + * Optional. The Compute Engine [zone](/compute/docs/regions-zones) in which + * to deploy the VMs used to run the Apache Airflow software, specified as a + * [relative resource + * name](/apis/design/resource_names#relative_resource_name). For example: + * "projects/{projectId}/zones/{zoneId}". + * This `location` must belong to the enclosing environment's project and + * location. If both this field and `nodeConfig.machineType` are specified, + * `nodeConfig.machineType` must belong to this `location`; if both are + * unspecified, the service will pick a zone in the Compute Engine region + * corresponding to the Cloud Composer location, and propagate that choice to + * both fields. If only one field (`location` or `nodeConfig.machineType`) is + * specified, the location information from the specified field will be + * propagated to the unspecified field. + * This field is supported for Cloud Composer environments in versions + * composer-1.*.*-airflow-*.*.*. + * @type string $machine_type + * Optional. The Compute Engine + * [machine type](/compute/docs/machine-types) used for cluster instances, + * specified as a + * [relative resource + * name](/apis/design/resource_names#relative_resource_name). For example: + * "projects/{projectId}/zones/{zoneId}/machineTypes/{machineTypeId}". + * The `machineType` must belong to the enclosing environment's project and + * location. If both this field and `nodeConfig.location` are specified, + * this `machineType` must belong to the `nodeConfig.location`; if both are + * unspecified, the service will pick a zone in the Compute Engine region + * corresponding to the Cloud Composer location, and propagate that choice to + * both fields. If exactly one of this field and `nodeConfig.location` is + * specified, the location information from the specified field will be + * propagated to the unspecified field. + * The `machineTypeId` must not be a [shared-core machine + * type](/compute/docs/machine-types#sharedcore). + * If this field is unspecified, the `machineTypeId` defaults + * to "n1-standard-1". + * This field is supported for Cloud Composer environments in versions + * composer-1.*.*-airflow-*.*.*. + * @type string $network + * Optional. The Compute Engine network to be used for machine + * communications, specified as a + * [relative resource + * name](/apis/design/resource_names#relative_resource_name). For example: + * "projects/{projectId}/global/networks/{networkId}". + * If unspecified, the "default" network ID in the environment's project is + * used. If a [Custom Subnet Network](/vpc/docs/vpc#vpc_networks_and_subnets) + * is provided, `nodeConfig.subnetwork` must also be provided. For + * [Shared VPC](/vpc/docs/shared-vpc) subnetwork requirements, see + * `nodeConfig.subnetwork`. + * @type string $subnetwork + * Optional. The Compute Engine subnetwork to be used for machine + * communications, specified as a + * [relative resource + * name](/apis/design/resource_names#relative_resource_name). For example: + * "projects/{projectId}/regions/{regionId}/subnetworks/{subnetworkId}" + * If a subnetwork is provided, `nodeConfig.network` must also be provided, + * and the subnetwork must belong to the enclosing environment's project and + * location. + * @type int $disk_size_gb + * Optional. The disk size in GB used for node VMs. Minimum size is 30GB. + * If unspecified, defaults to 100GB. Cannot be updated. + * This field is supported for Cloud Composer environments in versions + * composer-1.*.*-airflow-*.*.*. + * @type array|\Google\Protobuf\Internal\RepeatedField $oauth_scopes + * Optional. The set of Google API scopes to be made available on all + * node VMs. If `oauth_scopes` is empty, defaults to + * ["https://www.googleapis.com/auth/cloud-platform"]. Cannot be updated. + * This field is supported for Cloud Composer environments in versions + * composer-1.*.*-airflow-*.*.*. + * @type string $service_account + * Optional. The Google Cloud Platform Service Account to be used by the node + * VMs. If a service account is not specified, the "default" Compute Engine + * service account is used. Cannot be updated. + * @type array|\Google\Protobuf\Internal\RepeatedField $tags + * Optional. The list of instance tags applied to all node VMs. Tags are used + * to identify valid sources or targets for network firewalls. Each tag within + * the list must comply with [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). + * Cannot be updated. + * @type \Google\Cloud\Orchestration\Airflow\Service\V1\IPAllocationPolicy $ip_allocation_policy + * Optional. The configuration for controlling how IPs are allocated in the + * GKE cluster. + * @type bool $enable_ip_masq_agent + * Optional. Deploys 'ip-masq-agent' daemon set in the GKE cluster and defines + * nonMasqueradeCIDRs equals to pod IP range so IP masquerading is used for + * all destination addresses, except between pods traffic. + * See: + * https://cloud.google.com/kubernetes-engine/docs/how-to/ip-masquerade-agent + * @type string $composer_network_attachment + * Optional. Network Attachment that Cloud Composer environment is connected + * to, which provides connectivity with a user's VPC network. Takes precedence + * over network and subnetwork settings. If not provided, but network and + * subnetwork are defined during environment, it will be provisioned. If not + * provided and network and subnetwork are also empty, then connectivity to + * user's VPC network is disabled. Network attachment must be provided in + * format + * projects/{project}/regions/{region}/networkAttachments/{networkAttachment}. + * This field is supported for Cloud Composer environments in versions + * composer-3.*.*-airflow-*.*.* and newer. + * @type string $composer_internal_ipv4_cidr_block + * Optional. The IP range in CIDR notation to use internally by Cloud + * Composer. IP addresses are not reserved - and the same range can be used by + * multiple Cloud Composer environments. In case of overlap, IPs from this + * range will not be accessible in the user's VPC network. Cannot be updated. + * If not specified, the default value of '100.64.128.0/20' is used. + * This field is supported for Cloud Composer environments in versions + * composer-3.*.*-airflow-*.*.* and newer. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The Compute Engine [zone](/compute/docs/regions-zones) in which + * to deploy the VMs used to run the Apache Airflow software, specified as a + * [relative resource + * name](/apis/design/resource_names#relative_resource_name). For example: + * "projects/{projectId}/zones/{zoneId}". + * This `location` must belong to the enclosing environment's project and + * location. If both this field and `nodeConfig.machineType` are specified, + * `nodeConfig.machineType` must belong to this `location`; if both are + * unspecified, the service will pick a zone in the Compute Engine region + * corresponding to the Cloud Composer location, and propagate that choice to + * both fields. If only one field (`location` or `nodeConfig.machineType`) is + * specified, the location information from the specified field will be + * propagated to the unspecified field. + * This field is supported for Cloud Composer environments in versions + * composer-1.*.*-airflow-*.*.*. + * + * Generated from protobuf field string location = 1; + * @return string + */ + public function getLocation() + { + return $this->location; + } + + /** + * Optional. The Compute Engine [zone](/compute/docs/regions-zones) in which + * to deploy the VMs used to run the Apache Airflow software, specified as a + * [relative resource + * name](/apis/design/resource_names#relative_resource_name). For example: + * "projects/{projectId}/zones/{zoneId}". + * This `location` must belong to the enclosing environment's project and + * location. If both this field and `nodeConfig.machineType` are specified, + * `nodeConfig.machineType` must belong to this `location`; if both are + * unspecified, the service will pick a zone in the Compute Engine region + * corresponding to the Cloud Composer location, and propagate that choice to + * both fields. If only one field (`location` or `nodeConfig.machineType`) is + * specified, the location information from the specified field will be + * propagated to the unspecified field. + * This field is supported for Cloud Composer environments in versions + * composer-1.*.*-airflow-*.*.*. + * + * Generated from protobuf field string location = 1; + * @param string $var + * @return $this + */ + public function setLocation($var) + { + GPBUtil::checkString($var, True); + $this->location = $var; + + return $this; + } + + /** + * Optional. The Compute Engine + * [machine type](/compute/docs/machine-types) used for cluster instances, + * specified as a + * [relative resource + * name](/apis/design/resource_names#relative_resource_name). For example: + * "projects/{projectId}/zones/{zoneId}/machineTypes/{machineTypeId}". + * The `machineType` must belong to the enclosing environment's project and + * location. If both this field and `nodeConfig.location` are specified, + * this `machineType` must belong to the `nodeConfig.location`; if both are + * unspecified, the service will pick a zone in the Compute Engine region + * corresponding to the Cloud Composer location, and propagate that choice to + * both fields. If exactly one of this field and `nodeConfig.location` is + * specified, the location information from the specified field will be + * propagated to the unspecified field. + * The `machineTypeId` must not be a [shared-core machine + * type](/compute/docs/machine-types#sharedcore). + * If this field is unspecified, the `machineTypeId` defaults + * to "n1-standard-1". + * This field is supported for Cloud Composer environments in versions + * composer-1.*.*-airflow-*.*.*. + * + * Generated from protobuf field string machine_type = 2; + * @return string + */ + public function getMachineType() + { + return $this->machine_type; + } + + /** + * Optional. The Compute Engine + * [machine type](/compute/docs/machine-types) used for cluster instances, + * specified as a + * [relative resource + * name](/apis/design/resource_names#relative_resource_name). For example: + * "projects/{projectId}/zones/{zoneId}/machineTypes/{machineTypeId}". + * The `machineType` must belong to the enclosing environment's project and + * location. If both this field and `nodeConfig.location` are specified, + * this `machineType` must belong to the `nodeConfig.location`; if both are + * unspecified, the service will pick a zone in the Compute Engine region + * corresponding to the Cloud Composer location, and propagate that choice to + * both fields. If exactly one of this field and `nodeConfig.location` is + * specified, the location information from the specified field will be + * propagated to the unspecified field. + * The `machineTypeId` must not be a [shared-core machine + * type](/compute/docs/machine-types#sharedcore). + * If this field is unspecified, the `machineTypeId` defaults + * to "n1-standard-1". + * This field is supported for Cloud Composer environments in versions + * composer-1.*.*-airflow-*.*.*. + * + * Generated from protobuf field string machine_type = 2; + * @param string $var + * @return $this + */ + public function setMachineType($var) + { + GPBUtil::checkString($var, True); + $this->machine_type = $var; + + return $this; + } + + /** + * Optional. The Compute Engine network to be used for machine + * communications, specified as a + * [relative resource + * name](/apis/design/resource_names#relative_resource_name). For example: + * "projects/{projectId}/global/networks/{networkId}". + * If unspecified, the "default" network ID in the environment's project is + * used. If a [Custom Subnet Network](/vpc/docs/vpc#vpc_networks_and_subnets) + * is provided, `nodeConfig.subnetwork` must also be provided. For + * [Shared VPC](/vpc/docs/shared-vpc) subnetwork requirements, see + * `nodeConfig.subnetwork`. + * + * Generated from protobuf field string network = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getNetwork() + { + return $this->network; + } + + /** + * Optional. The Compute Engine network to be used for machine + * communications, specified as a + * [relative resource + * name](/apis/design/resource_names#relative_resource_name). For example: + * "projects/{projectId}/global/networks/{networkId}". + * If unspecified, the "default" network ID in the environment's project is + * used. If a [Custom Subnet Network](/vpc/docs/vpc#vpc_networks_and_subnets) + * is provided, `nodeConfig.subnetwork` must also be provided. For + * [Shared VPC](/vpc/docs/shared-vpc) subnetwork requirements, see + * `nodeConfig.subnetwork`. + * + * Generated from protobuf field string network = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setNetwork($var) + { + GPBUtil::checkString($var, True); + $this->network = $var; + + return $this; + } + + /** + * Optional. The Compute Engine subnetwork to be used for machine + * communications, specified as a + * [relative resource + * name](/apis/design/resource_names#relative_resource_name). For example: + * "projects/{projectId}/regions/{regionId}/subnetworks/{subnetworkId}" + * If a subnetwork is provided, `nodeConfig.network` must also be provided, + * and the subnetwork must belong to the enclosing environment's project and + * location. + * + * Generated from protobuf field string subnetwork = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getSubnetwork() + { + return $this->subnetwork; + } + + /** + * Optional. The Compute Engine subnetwork to be used for machine + * communications, specified as a + * [relative resource + * name](/apis/design/resource_names#relative_resource_name). For example: + * "projects/{projectId}/regions/{regionId}/subnetworks/{subnetworkId}" + * If a subnetwork is provided, `nodeConfig.network` must also be provided, + * and the subnetwork must belong to the enclosing environment's project and + * location. + * + * Generated from protobuf field string subnetwork = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setSubnetwork($var) + { + GPBUtil::checkString($var, True); + $this->subnetwork = $var; + + return $this; + } + + /** + * Optional. The disk size in GB used for node VMs. Minimum size is 30GB. + * If unspecified, defaults to 100GB. Cannot be updated. + * This field is supported for Cloud Composer environments in versions + * composer-1.*.*-airflow-*.*.*. + * + * Generated from protobuf field int32 disk_size_gb = 5; + * @return int + */ + public function getDiskSizeGb() + { + return $this->disk_size_gb; + } + + /** + * Optional. The disk size in GB used for node VMs. Minimum size is 30GB. + * If unspecified, defaults to 100GB. Cannot be updated. + * This field is supported for Cloud Composer environments in versions + * composer-1.*.*-airflow-*.*.*. + * + * Generated from protobuf field int32 disk_size_gb = 5; + * @param int $var + * @return $this + */ + public function setDiskSizeGb($var) + { + GPBUtil::checkInt32($var); + $this->disk_size_gb = $var; + + return $this; + } + + /** + * Optional. The set of Google API scopes to be made available on all + * node VMs. If `oauth_scopes` is empty, defaults to + * ["https://www.googleapis.com/auth/cloud-platform"]. Cannot be updated. + * This field is supported for Cloud Composer environments in versions + * composer-1.*.*-airflow-*.*.*. + * + * Generated from protobuf field repeated string oauth_scopes = 6; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getOauthScopes() + { + return $this->oauth_scopes; + } + + /** + * Optional. The set of Google API scopes to be made available on all + * node VMs. If `oauth_scopes` is empty, defaults to + * ["https://www.googleapis.com/auth/cloud-platform"]. Cannot be updated. + * This field is supported for Cloud Composer environments in versions + * composer-1.*.*-airflow-*.*.*. + * + * Generated from protobuf field repeated string oauth_scopes = 6; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setOauthScopes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->oauth_scopes = $arr; + + return $this; + } + + /** + * Optional. The Google Cloud Platform Service Account to be used by the node + * VMs. If a service account is not specified, the "default" Compute Engine + * service account is used. Cannot be updated. + * + * Generated from protobuf field string service_account = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getServiceAccount() + { + return $this->service_account; + } + + /** + * Optional. The Google Cloud Platform Service Account to be used by the node + * VMs. If a service account is not specified, the "default" Compute Engine + * service account is used. Cannot be updated. + * + * Generated from protobuf field string service_account = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setServiceAccount($var) + { + GPBUtil::checkString($var, True); + $this->service_account = $var; + + return $this; + } + + /** + * Optional. The list of instance tags applied to all node VMs. Tags are used + * to identify valid sources or targets for network firewalls. Each tag within + * the list must comply with [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). + * Cannot be updated. + * + * Generated from protobuf field repeated string tags = 8; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTags() + { + return $this->tags; + } + + /** + * Optional. The list of instance tags applied to all node VMs. Tags are used + * to identify valid sources or targets for network firewalls. Each tag within + * the list must comply with [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). + * Cannot be updated. + * + * Generated from protobuf field repeated string tags = 8; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTags($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->tags = $arr; + + return $this; + } + + /** + * Optional. The configuration for controlling how IPs are allocated in the + * GKE cluster. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy ip_allocation_policy = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Orchestration\Airflow\Service\V1\IPAllocationPolicy|null + */ + public function getIpAllocationPolicy() + { + return $this->ip_allocation_policy; + } + + public function hasIpAllocationPolicy() + { + return isset($this->ip_allocation_policy); + } + + public function clearIpAllocationPolicy() + { + unset($this->ip_allocation_policy); + } + + /** + * Optional. The configuration for controlling how IPs are allocated in the + * GKE cluster. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy ip_allocation_policy = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Orchestration\Airflow\Service\V1\IPAllocationPolicy $var + * @return $this + */ + public function setIpAllocationPolicy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Orchestration\Airflow\Service\V1\IPAllocationPolicy::class); + $this->ip_allocation_policy = $var; + + return $this; + } + + /** + * Optional. Deploys 'ip-masq-agent' daemon set in the GKE cluster and defines + * nonMasqueradeCIDRs equals to pod IP range so IP masquerading is used for + * all destination addresses, except between pods traffic. + * See: + * https://cloud.google.com/kubernetes-engine/docs/how-to/ip-masquerade-agent + * + * Generated from protobuf field bool enable_ip_masq_agent = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getEnableIpMasqAgent() + { + return $this->enable_ip_masq_agent; + } + + /** + * Optional. Deploys 'ip-masq-agent' daemon set in the GKE cluster and defines + * nonMasqueradeCIDRs equals to pod IP range so IP masquerading is used for + * all destination addresses, except between pods traffic. + * See: + * https://cloud.google.com/kubernetes-engine/docs/how-to/ip-masquerade-agent + * + * Generated from protobuf field bool enable_ip_masq_agent = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setEnableIpMasqAgent($var) + { + GPBUtil::checkBool($var); + $this->enable_ip_masq_agent = $var; + + return $this; + } + + /** + * Optional. Network Attachment that Cloud Composer environment is connected + * to, which provides connectivity with a user's VPC network. Takes precedence + * over network and subnetwork settings. If not provided, but network and + * subnetwork are defined during environment, it will be provisioned. If not + * provided and network and subnetwork are also empty, then connectivity to + * user's VPC network is disabled. Network attachment must be provided in + * format + * projects/{project}/regions/{region}/networkAttachments/{networkAttachment}. + * This field is supported for Cloud Composer environments in versions + * composer-3.*.*-airflow-*.*.* and newer. + * + * Generated from protobuf field string composer_network_attachment = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getComposerNetworkAttachment() + { + return $this->composer_network_attachment; + } + + /** + * Optional. Network Attachment that Cloud Composer environment is connected + * to, which provides connectivity with a user's VPC network. Takes precedence + * over network and subnetwork settings. If not provided, but network and + * subnetwork are defined during environment, it will be provisioned. If not + * provided and network and subnetwork are also empty, then connectivity to + * user's VPC network is disabled. Network attachment must be provided in + * format + * projects/{project}/regions/{region}/networkAttachments/{networkAttachment}. + * This field is supported for Cloud Composer environments in versions + * composer-3.*.*-airflow-*.*.* and newer. + * + * Generated from protobuf field string composer_network_attachment = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setComposerNetworkAttachment($var) + { + GPBUtil::checkString($var, True); + $this->composer_network_attachment = $var; + + return $this; + } + + /** + * Optional. The IP range in CIDR notation to use internally by Cloud + * Composer. IP addresses are not reserved - and the same range can be used by + * multiple Cloud Composer environments. In case of overlap, IPs from this + * range will not be accessible in the user's VPC network. Cannot be updated. + * If not specified, the default value of '100.64.128.0/20' is used. + * This field is supported for Cloud Composer environments in versions + * composer-3.*.*-airflow-*.*.* and newer. + * + * Generated from protobuf field string composer_internal_ipv4_cidr_block = 13 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getComposerInternalIpv4CidrBlock() + { + return $this->composer_internal_ipv4_cidr_block; + } + + /** + * Optional. The IP range in CIDR notation to use internally by Cloud + * Composer. IP addresses are not reserved - and the same range can be used by + * multiple Cloud Composer environments. In case of overlap, IPs from this + * range will not be accessible in the user's VPC network. Cannot be updated. + * If not specified, the default value of '100.64.128.0/20' is used. + * This field is supported for Cloud Composer environments in versions + * composer-3.*.*-airflow-*.*.* and newer. + * + * Generated from protobuf field string composer_internal_ipv4_cidr_block = 13 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setComposerInternalIpv4CidrBlock($var) + { + GPBUtil::checkString($var, True); + $this->composer_internal_ipv4_cidr_block = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/OperationMetadata.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/OperationMetadata.php new file mode 100644 index 000000000000..ae698a9c0bd0 --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/OperationMetadata.php @@ -0,0 +1,265 @@ +google.cloud.orchestration.airflow.service.v1.OperationMetadata + */ +class OperationMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The current operation state. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.OperationMetadata.State state = 1; + */ + protected $state = 0; + /** + * Output only. The type of operation being performed. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.OperationMetadata.Type operation_type = 2; + */ + protected $operation_type = 0; + /** + * Output only. The resource being operated on, as a [relative resource name]( + * /apis/design/resource_names#relative_resource_name). + * + * Generated from protobuf field string resource = 3; + */ + protected $resource = ''; + /** + * Output only. The UUID of the resource being operated on. + * + * Generated from protobuf field string resource_uuid = 4; + */ + protected $resource_uuid = ''; + /** + * Output only. The time the operation was submitted to the server. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 5; + */ + protected $create_time = null; + /** + * Output only. The time when the operation terminated, regardless of its + * success. This field is unset if the operation is still ongoing. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 6; + */ + protected $end_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $state + * Output only. The current operation state. + * @type int $operation_type + * Output only. The type of operation being performed. + * @type string $resource + * Output only. The resource being operated on, as a [relative resource name]( + * /apis/design/resource_names#relative_resource_name). + * @type string $resource_uuid + * Output only. The UUID of the resource being operated on. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time the operation was submitted to the server. + * @type \Google\Protobuf\Timestamp $end_time + * Output only. The time when the operation terminated, regardless of its + * success. This field is unset if the operation is still ongoing. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Operations::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The current operation state. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.OperationMetadata.State state = 1; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The current operation state. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.OperationMetadata.State state = 1; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Orchestration\Airflow\Service\V1\OperationMetadata\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. The type of operation being performed. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.OperationMetadata.Type operation_type = 2; + * @return int + */ + public function getOperationType() + { + return $this->operation_type; + } + + /** + * Output only. The type of operation being performed. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.OperationMetadata.Type operation_type = 2; + * @param int $var + * @return $this + */ + public function setOperationType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Orchestration\Airflow\Service\V1\OperationMetadata\Type::class); + $this->operation_type = $var; + + return $this; + } + + /** + * Output only. The resource being operated on, as a [relative resource name]( + * /apis/design/resource_names#relative_resource_name). + * + * Generated from protobuf field string resource = 3; + * @return string + */ + public function getResource() + { + return $this->resource; + } + + /** + * Output only. The resource being operated on, as a [relative resource name]( + * /apis/design/resource_names#relative_resource_name). + * + * Generated from protobuf field string resource = 3; + * @param string $var + * @return $this + */ + public function setResource($var) + { + GPBUtil::checkString($var, True); + $this->resource = $var; + + return $this; + } + + /** + * Output only. The UUID of the resource being operated on. + * + * Generated from protobuf field string resource_uuid = 4; + * @return string + */ + public function getResourceUuid() + { + return $this->resource_uuid; + } + + /** + * Output only. The UUID of the resource being operated on. + * + * Generated from protobuf field string resource_uuid = 4; + * @param string $var + * @return $this + */ + public function setResourceUuid($var) + { + GPBUtil::checkString($var, True); + $this->resource_uuid = $var; + + return $this; + } + + /** + * Output only. The time the operation was submitted to the server. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 5; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The time the operation was submitted to the server. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 5; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The time when the operation terminated, regardless of its + * success. This field is unset if the operation is still ongoing. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 6; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEndTime() + { + return $this->end_time; + } + + public function hasEndTime() + { + return isset($this->end_time); + } + + public function clearEndTime() + { + unset($this->end_time); + } + + /** + * Output only. The time when the operation terminated, regardless of its + * success. This field is unset if the operation is still ongoing. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 6; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/OperationMetadata/State.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/OperationMetadata/State.php new file mode 100644 index 000000000000..71b3cde48793 --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/OperationMetadata/State.php @@ -0,0 +1,83 @@ +google.cloud.orchestration.airflow.service.v1.OperationMetadata.State + */ +class State +{ + /** + * Unused. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The operation has been created but is not yet started. + * + * Generated from protobuf enum PENDING = 1; + */ + const PENDING = 1; + /** + * The operation is underway. + * + * Generated from protobuf enum RUNNING = 2; + */ + const RUNNING = 2; + /** + * The operation completed successfully. + * + * Generated from protobuf enum SUCCEEDED = 3; + */ + const SUCCEEDED = 3; + /** + * Generated from protobuf enum SUCCESSFUL = 3; + */ + const SUCCESSFUL = 3; + /** + * The operation is no longer running but did not succeed. + * + * Generated from protobuf enum FAILED = 4; + */ + const FAILED = 4; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::PENDING => 'PENDING', + self::RUNNING => 'RUNNING', + self::SUCCEEDED => 'SUCCEEDED', + self::SUCCESSFUL => 'SUCCESSFUL', + self::FAILED => 'FAILED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\Orchestration\Airflow\Service\V1\OperationMetadata_State::class); + diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/OperationMetadata/Type.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/OperationMetadata/Type.php new file mode 100644 index 000000000000..ffa8d17415f1 --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/OperationMetadata/Type.php @@ -0,0 +1,100 @@ +google.cloud.orchestration.airflow.service.v1.OperationMetadata.Type + */ +class Type +{ + /** + * Unused. + * + * Generated from protobuf enum TYPE_UNSPECIFIED = 0; + */ + const TYPE_UNSPECIFIED = 0; + /** + * A resource creation operation. + * + * Generated from protobuf enum CREATE = 1; + */ + const CREATE = 1; + /** + * A resource deletion operation. + * + * Generated from protobuf enum DELETE = 2; + */ + const DELETE = 2; + /** + * A resource update operation. + * + * Generated from protobuf enum UPDATE = 3; + */ + const UPDATE = 3; + /** + * A resource check operation. + * + * Generated from protobuf enum CHECK = 4; + */ + const CHECK = 4; + /** + * Saves snapshot of the resource operation. + * + * Generated from protobuf enum SAVE_SNAPSHOT = 5; + */ + const SAVE_SNAPSHOT = 5; + /** + * Loads snapshot of the resource operation. + * + * Generated from protobuf enum LOAD_SNAPSHOT = 6; + */ + const LOAD_SNAPSHOT = 6; + /** + * Triggers failover of environment's Cloud SQL instance (only for highly + * resilient environments). + * + * Generated from protobuf enum DATABASE_FAILOVER = 7; + */ + const DATABASE_FAILOVER = 7; + + private static $valueToName = [ + self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', + self::CREATE => 'CREATE', + self::DELETE => 'DELETE', + self::UPDATE => 'UPDATE', + self::CHECK => 'CHECK', + self::SAVE_SNAPSHOT => 'SAVE_SNAPSHOT', + self::LOAD_SNAPSHOT => 'LOAD_SNAPSHOT', + self::DATABASE_FAILOVER => 'DATABASE_FAILOVER', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Type::class, \Google\Cloud\Orchestration\Airflow\Service\V1\OperationMetadata_Type::class); + diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/PollAirflowCommandRequest.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/PollAirflowCommandRequest.php new file mode 100644 index 000000000000..e7ed7e645030 --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/PollAirflowCommandRequest.php @@ -0,0 +1,207 @@ +google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest + */ +class PollAirflowCommandRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the environment in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * + * Generated from protobuf field string environment = 1; + */ + protected $environment = ''; + /** + * The unique ID of the command execution. + * + * Generated from protobuf field string execution_id = 2; + */ + protected $execution_id = ''; + /** + * The name of the pod where the command is executed. + * + * Generated from protobuf field string pod = 3; + */ + protected $pod = ''; + /** + * The namespace of the pod where the command is executed. + * + * Generated from protobuf field string pod_namespace = 4; + */ + protected $pod_namespace = ''; + /** + * Line number from which new logs should be fetched. + * + * Generated from protobuf field int32 next_line_number = 5; + */ + protected $next_line_number = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $environment + * The resource name of the environment in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * @type string $execution_id + * The unique ID of the command execution. + * @type string $pod + * The name of the pod where the command is executed. + * @type string $pod_namespace + * The namespace of the pod where the command is executed. + * @type int $next_line_number + * Line number from which new logs should be fetched. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); + parent::__construct($data); + } + + /** + * The resource name of the environment in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * + * Generated from protobuf field string environment = 1; + * @return string + */ + public function getEnvironment() + { + return $this->environment; + } + + /** + * The resource name of the environment in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * + * Generated from protobuf field string environment = 1; + * @param string $var + * @return $this + */ + public function setEnvironment($var) + { + GPBUtil::checkString($var, True); + $this->environment = $var; + + return $this; + } + + /** + * The unique ID of the command execution. + * + * Generated from protobuf field string execution_id = 2; + * @return string + */ + public function getExecutionId() + { + return $this->execution_id; + } + + /** + * The unique ID of the command execution. + * + * Generated from protobuf field string execution_id = 2; + * @param string $var + * @return $this + */ + public function setExecutionId($var) + { + GPBUtil::checkString($var, True); + $this->execution_id = $var; + + return $this; + } + + /** + * The name of the pod where the command is executed. + * + * Generated from protobuf field string pod = 3; + * @return string + */ + public function getPod() + { + return $this->pod; + } + + /** + * The name of the pod where the command is executed. + * + * Generated from protobuf field string pod = 3; + * @param string $var + * @return $this + */ + public function setPod($var) + { + GPBUtil::checkString($var, True); + $this->pod = $var; + + return $this; + } + + /** + * The namespace of the pod where the command is executed. + * + * Generated from protobuf field string pod_namespace = 4; + * @return string + */ + public function getPodNamespace() + { + return $this->pod_namespace; + } + + /** + * The namespace of the pod where the command is executed. + * + * Generated from protobuf field string pod_namespace = 4; + * @param string $var + * @return $this + */ + public function setPodNamespace($var) + { + GPBUtil::checkString($var, True); + $this->pod_namespace = $var; + + return $this; + } + + /** + * Line number from which new logs should be fetched. + * + * Generated from protobuf field int32 next_line_number = 5; + * @return int + */ + public function getNextLineNumber() + { + return $this->next_line_number; + } + + /** + * Line number from which new logs should be fetched. + * + * Generated from protobuf field int32 next_line_number = 5; + * @param int $var + * @return $this + */ + public function setNextLineNumber($var) + { + GPBUtil::checkInt32($var); + $this->next_line_number = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/PollAirflowCommandResponse.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/PollAirflowCommandResponse.php new file mode 100644 index 000000000000..b08a1b04456c --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/PollAirflowCommandResponse.php @@ -0,0 +1,149 @@ +google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse + */ +class PollAirflowCommandResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Output from the command execution. It may not contain the full output + * and the caller may need to poll for more lines. + * + * Generated from protobuf field repeated .google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line output = 1; + */ + private $output; + /** + * Whether the command execution has finished and there is no more output. + * + * Generated from protobuf field bool output_end = 2; + */ + protected $output_end = false; + /** + * The result exit status of the command. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo exit_info = 3; + */ + protected $exit_info = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Orchestration\Airflow\Service\V1\PollAirflowCommandResponse\Line>|\Google\Protobuf\Internal\RepeatedField $output + * Output from the command execution. It may not contain the full output + * and the caller may need to poll for more lines. + * @type bool $output_end + * Whether the command execution has finished and there is no more output. + * @type \Google\Cloud\Orchestration\Airflow\Service\V1\PollAirflowCommandResponse\ExitInfo $exit_info + * The result exit status of the command. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); + parent::__construct($data); + } + + /** + * Output from the command execution. It may not contain the full output + * and the caller may need to poll for more lines. + * + * Generated from protobuf field repeated .google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line output = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getOutput() + { + return $this->output; + } + + /** + * Output from the command execution. It may not contain the full output + * and the caller may need to poll for more lines. + * + * Generated from protobuf field repeated .google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line output = 1; + * @param array<\Google\Cloud\Orchestration\Airflow\Service\V1\PollAirflowCommandResponse\Line>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setOutput($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Orchestration\Airflow\Service\V1\PollAirflowCommandResponse\Line::class); + $this->output = $arr; + + return $this; + } + + /** + * Whether the command execution has finished and there is no more output. + * + * Generated from protobuf field bool output_end = 2; + * @return bool + */ + public function getOutputEnd() + { + return $this->output_end; + } + + /** + * Whether the command execution has finished and there is no more output. + * + * Generated from protobuf field bool output_end = 2; + * @param bool $var + * @return $this + */ + public function setOutputEnd($var) + { + GPBUtil::checkBool($var); + $this->output_end = $var; + + return $this; + } + + /** + * The result exit status of the command. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo exit_info = 3; + * @return \Google\Cloud\Orchestration\Airflow\Service\V1\PollAirflowCommandResponse\ExitInfo|null + */ + public function getExitInfo() + { + return $this->exit_info; + } + + public function hasExitInfo() + { + return isset($this->exit_info); + } + + public function clearExitInfo() + { + unset($this->exit_info); + } + + /** + * The result exit status of the command. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo exit_info = 3; + * @param \Google\Cloud\Orchestration\Airflow\Service\V1\PollAirflowCommandResponse\ExitInfo $var + * @return $this + */ + public function setExitInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Orchestration\Airflow\Service\V1\PollAirflowCommandResponse\ExitInfo::class); + $this->exit_info = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/PollAirflowCommandResponse/ExitInfo.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/PollAirflowCommandResponse/ExitInfo.php new file mode 100644 index 000000000000..b1f0102c2162 --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/PollAirflowCommandResponse/ExitInfo.php @@ -0,0 +1,104 @@ +google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo + */ +class ExitInfo extends \Google\Protobuf\Internal\Message +{ + /** + * The exit code from the command execution. + * + * Generated from protobuf field int32 exit_code = 1; + */ + protected $exit_code = 0; + /** + * Error message. Empty if there was no error. + * + * Generated from protobuf field string error = 2; + */ + protected $error = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $exit_code + * The exit code from the command execution. + * @type string $error + * Error message. Empty if there was no error. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); + parent::__construct($data); + } + + /** + * The exit code from the command execution. + * + * Generated from protobuf field int32 exit_code = 1; + * @return int + */ + public function getExitCode() + { + return $this->exit_code; + } + + /** + * The exit code from the command execution. + * + * Generated from protobuf field int32 exit_code = 1; + * @param int $var + * @return $this + */ + public function setExitCode($var) + { + GPBUtil::checkInt32($var); + $this->exit_code = $var; + + return $this; + } + + /** + * Error message. Empty if there was no error. + * + * Generated from protobuf field string error = 2; + * @return string + */ + public function getError() + { + return $this->error; + } + + /** + * Error message. Empty if there was no error. + * + * Generated from protobuf field string error = 2; + * @param string $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkString($var, True); + $this->error = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ExitInfo::class, \Google\Cloud\Orchestration\Airflow\Service\V1\PollAirflowCommandResponse_ExitInfo::class); + diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/PollAirflowCommandResponse/Line.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/PollAirflowCommandResponse/Line.php new file mode 100644 index 000000000000..fc810160dcee --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/PollAirflowCommandResponse/Line.php @@ -0,0 +1,104 @@ +google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line + */ +class Line extends \Google\Protobuf\Internal\Message +{ + /** + * Number of the line. + * + * Generated from protobuf field int32 line_number = 1; + */ + protected $line_number = 0; + /** + * Text content of the log line. + * + * Generated from protobuf field string content = 2; + */ + protected $content = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $line_number + * Number of the line. + * @type string $content + * Text content of the log line. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); + parent::__construct($data); + } + + /** + * Number of the line. + * + * Generated from protobuf field int32 line_number = 1; + * @return int + */ + public function getLineNumber() + { + return $this->line_number; + } + + /** + * Number of the line. + * + * Generated from protobuf field int32 line_number = 1; + * @param int $var + * @return $this + */ + public function setLineNumber($var) + { + GPBUtil::checkInt32($var); + $this->line_number = $var; + + return $this; + } + + /** + * Text content of the log line. + * + * Generated from protobuf field string content = 2; + * @return string + */ + public function getContent() + { + return $this->content; + } + + /** + * Text content of the log line. + * + * Generated from protobuf field string content = 2; + * @param string $var + * @return $this + */ + public function setContent($var) + { + GPBUtil::checkString($var, True); + $this->content = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Line::class, \Google\Cloud\Orchestration\Airflow\Service\V1\PollAirflowCommandResponse_Line::class); + diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/PrivateClusterConfig.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/PrivateClusterConfig.php new file mode 100644 index 000000000000..0748584cbe17 --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/PrivateClusterConfig.php @@ -0,0 +1,160 @@ +google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig + */ +class PrivateClusterConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. If `true`, access to the public endpoint of the GKE cluster is + * denied. + * + * Generated from protobuf field bool enable_private_endpoint = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $enable_private_endpoint = false; + /** + * Optional. The CIDR block from which IPv4 range for GKE master will be + * reserved. If left blank, the default value of '172.16.0.0/23' is used. + * + * Generated from protobuf field string master_ipv4_cidr_block = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $master_ipv4_cidr_block = ''; + /** + * Output only. The IP range in CIDR notation to use for the hosted master + * network. This range is used for assigning internal IP addresses to the GKE + * cluster master or set of masters and to the internal load balancer virtual + * IP. This range must not overlap with any other ranges in use within the + * cluster's network. + * + * Generated from protobuf field string master_ipv4_reserved_range = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $master_ipv4_reserved_range = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $enable_private_endpoint + * Optional. If `true`, access to the public endpoint of the GKE cluster is + * denied. + * @type string $master_ipv4_cidr_block + * Optional. The CIDR block from which IPv4 range for GKE master will be + * reserved. If left blank, the default value of '172.16.0.0/23' is used. + * @type string $master_ipv4_reserved_range + * Output only. The IP range in CIDR notation to use for the hosted master + * network. This range is used for assigning internal IP addresses to the GKE + * cluster master or set of masters and to the internal load balancer virtual + * IP. This range must not overlap with any other ranges in use within the + * cluster's network. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); + parent::__construct($data); + } + + /** + * Optional. If `true`, access to the public endpoint of the GKE cluster is + * denied. + * + * Generated from protobuf field bool enable_private_endpoint = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getEnablePrivateEndpoint() + { + return $this->enable_private_endpoint; + } + + /** + * Optional. If `true`, access to the public endpoint of the GKE cluster is + * denied. + * + * Generated from protobuf field bool enable_private_endpoint = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setEnablePrivateEndpoint($var) + { + GPBUtil::checkBool($var); + $this->enable_private_endpoint = $var; + + return $this; + } + + /** + * Optional. The CIDR block from which IPv4 range for GKE master will be + * reserved. If left blank, the default value of '172.16.0.0/23' is used. + * + * Generated from protobuf field string master_ipv4_cidr_block = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getMasterIpv4CidrBlock() + { + return $this->master_ipv4_cidr_block; + } + + /** + * Optional. The CIDR block from which IPv4 range for GKE master will be + * reserved. If left blank, the default value of '172.16.0.0/23' is used. + * + * Generated from protobuf field string master_ipv4_cidr_block = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setMasterIpv4CidrBlock($var) + { + GPBUtil::checkString($var, True); + $this->master_ipv4_cidr_block = $var; + + return $this; + } + + /** + * Output only. The IP range in CIDR notation to use for the hosted master + * network. This range is used for assigning internal IP addresses to the GKE + * cluster master or set of masters and to the internal load balancer virtual + * IP. This range must not overlap with any other ranges in use within the + * cluster's network. + * + * Generated from protobuf field string master_ipv4_reserved_range = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getMasterIpv4ReservedRange() + { + return $this->master_ipv4_reserved_range; + } + + /** + * Output only. The IP range in CIDR notation to use for the hosted master + * network. This range is used for assigning internal IP addresses to the GKE + * cluster master or set of masters and to the internal load balancer virtual + * IP. This range must not overlap with any other ranges in use within the + * cluster's network. + * + * Generated from protobuf field string master_ipv4_reserved_range = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setMasterIpv4ReservedRange($var) + { + GPBUtil::checkString($var, True); + $this->master_ipv4_reserved_range = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/PrivateEnvironmentConfig.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/PrivateEnvironmentConfig.php new file mode 100644 index 000000000000..0ede8e0f8b6b --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/PrivateEnvironmentConfig.php @@ -0,0 +1,564 @@ +google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig + */ +class PrivateEnvironmentConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. If `true`, a Private IP Cloud Composer environment is created. + * If this field is set to true, `IPAllocationPolicy.use_ip_aliases` must be + * set to true for Cloud Composer environments in versions + * composer-1.*.*-airflow-*.*.*. + * + * Generated from protobuf field bool enable_private_environment = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $enable_private_environment = false; + /** + * Optional. If `true`, builds performed during operations that install Python + * packages have only private connectivity to Google services (including + * Artifact Registry) and VPC network (if either `NodeConfig.network` and + * `NodeConfig.subnetwork` fields or `NodeConfig.composer_network_attachment` + * field are specified). If `false`, the builds also have access to the + * internet. + * This field is supported for Cloud Composer environments in versions + * composer-3.*.*-airflow-*.*.* and newer. + * + * Generated from protobuf field bool enable_private_builds_only = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $enable_private_builds_only = false; + /** + * Optional. Configuration for the private GKE cluster for a Private IP + * Cloud Composer environment. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig private_cluster_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $private_cluster_config = null; + /** + * Optional. The CIDR block from which IP range for web server will be + * reserved. Needs to be disjoint from + * `private_cluster_config.master_ipv4_cidr_block` and + * `cloud_sql_ipv4_cidr_block`. + * This field is supported for Cloud Composer environments in versions + * composer-1.*.*-airflow-*.*.*. + * + * Generated from protobuf field string web_server_ipv4_cidr_block = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $web_server_ipv4_cidr_block = ''; + /** + * Optional. The CIDR block from which IP range in tenant project will be + * reserved for Cloud SQL. Needs to be disjoint from + * `web_server_ipv4_cidr_block`. + * + * Generated from protobuf field string cloud_sql_ipv4_cidr_block = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $cloud_sql_ipv4_cidr_block = ''; + /** + * Output only. The IP range reserved for the tenant project's App Engine VMs. + * This field is supported for Cloud Composer environments in versions + * composer-1.*.*-airflow-*.*.*. + * + * Generated from protobuf field string web_server_ipv4_reserved_range = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $web_server_ipv4_reserved_range = ''; + /** + * Optional. The CIDR block from which IP range for Cloud Composer Network in + * tenant project will be reserved. Needs to be disjoint from + * private_cluster_config.master_ipv4_cidr_block and + * cloud_sql_ipv4_cidr_block. + * This field is supported for Cloud Composer environments in versions + * composer-2.*.*-airflow-*.*.* and newer. + * + * Generated from protobuf field string cloud_composer_network_ipv4_cidr_block = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $cloud_composer_network_ipv4_cidr_block = ''; + /** + * Output only. The IP range reserved for the tenant project's Cloud Composer + * network. + * This field is supported for Cloud Composer environments in versions + * composer-2.*.*-airflow-*.*.* and newer. + * + * Generated from protobuf field string cloud_composer_network_ipv4_reserved_range = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $cloud_composer_network_ipv4_reserved_range = ''; + /** + * Optional. When enabled, IPs from public (non-RFC1918) ranges can be used + * for `IPAllocationPolicy.cluster_ipv4_cidr_block` and + * `IPAllocationPolicy.service_ipv4_cidr_block`. + * + * Generated from protobuf field bool enable_privately_used_public_ips = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $enable_privately_used_public_ips = false; + /** + * Optional. When specified, the environment will use Private Service Connect + * instead of VPC peerings to connect to Cloud SQL in the Tenant Project, + * and the PSC endpoint in the Customer Project will use an IP address from + * this subnetwork. + * + * Generated from protobuf field string cloud_composer_connection_subnetwork = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $cloud_composer_connection_subnetwork = ''; + /** + * Optional. Configuration for the network connections configuration in the + * environment. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.NetworkingConfig networking_config = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $networking_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $enable_private_environment + * Optional. If `true`, a Private IP Cloud Composer environment is created. + * If this field is set to true, `IPAllocationPolicy.use_ip_aliases` must be + * set to true for Cloud Composer environments in versions + * composer-1.*.*-airflow-*.*.*. + * @type bool $enable_private_builds_only + * Optional. If `true`, builds performed during operations that install Python + * packages have only private connectivity to Google services (including + * Artifact Registry) and VPC network (if either `NodeConfig.network` and + * `NodeConfig.subnetwork` fields or `NodeConfig.composer_network_attachment` + * field are specified). If `false`, the builds also have access to the + * internet. + * This field is supported for Cloud Composer environments in versions + * composer-3.*.*-airflow-*.*.* and newer. + * @type \Google\Cloud\Orchestration\Airflow\Service\V1\PrivateClusterConfig $private_cluster_config + * Optional. Configuration for the private GKE cluster for a Private IP + * Cloud Composer environment. + * @type string $web_server_ipv4_cidr_block + * Optional. The CIDR block from which IP range for web server will be + * reserved. Needs to be disjoint from + * `private_cluster_config.master_ipv4_cidr_block` and + * `cloud_sql_ipv4_cidr_block`. + * This field is supported for Cloud Composer environments in versions + * composer-1.*.*-airflow-*.*.*. + * @type string $cloud_sql_ipv4_cidr_block + * Optional. The CIDR block from which IP range in tenant project will be + * reserved for Cloud SQL. Needs to be disjoint from + * `web_server_ipv4_cidr_block`. + * @type string $web_server_ipv4_reserved_range + * Output only. The IP range reserved for the tenant project's App Engine VMs. + * This field is supported for Cloud Composer environments in versions + * composer-1.*.*-airflow-*.*.*. + * @type string $cloud_composer_network_ipv4_cidr_block + * Optional. The CIDR block from which IP range for Cloud Composer Network in + * tenant project will be reserved. Needs to be disjoint from + * private_cluster_config.master_ipv4_cidr_block and + * cloud_sql_ipv4_cidr_block. + * This field is supported for Cloud Composer environments in versions + * composer-2.*.*-airflow-*.*.* and newer. + * @type string $cloud_composer_network_ipv4_reserved_range + * Output only. The IP range reserved for the tenant project's Cloud Composer + * network. + * This field is supported for Cloud Composer environments in versions + * composer-2.*.*-airflow-*.*.* and newer. + * @type bool $enable_privately_used_public_ips + * Optional. When enabled, IPs from public (non-RFC1918) ranges can be used + * for `IPAllocationPolicy.cluster_ipv4_cidr_block` and + * `IPAllocationPolicy.service_ipv4_cidr_block`. + * @type string $cloud_composer_connection_subnetwork + * Optional. When specified, the environment will use Private Service Connect + * instead of VPC peerings to connect to Cloud SQL in the Tenant Project, + * and the PSC endpoint in the Customer Project will use an IP address from + * this subnetwork. + * @type \Google\Cloud\Orchestration\Airflow\Service\V1\NetworkingConfig $networking_config + * Optional. Configuration for the network connections configuration in the + * environment. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); + parent::__construct($data); + } + + /** + * Optional. If `true`, a Private IP Cloud Composer environment is created. + * If this field is set to true, `IPAllocationPolicy.use_ip_aliases` must be + * set to true for Cloud Composer environments in versions + * composer-1.*.*-airflow-*.*.*. + * + * Generated from protobuf field bool enable_private_environment = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getEnablePrivateEnvironment() + { + return $this->enable_private_environment; + } + + /** + * Optional. If `true`, a Private IP Cloud Composer environment is created. + * If this field is set to true, `IPAllocationPolicy.use_ip_aliases` must be + * set to true for Cloud Composer environments in versions + * composer-1.*.*-airflow-*.*.*. + * + * Generated from protobuf field bool enable_private_environment = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setEnablePrivateEnvironment($var) + { + GPBUtil::checkBool($var); + $this->enable_private_environment = $var; + + return $this; + } + + /** + * Optional. If `true`, builds performed during operations that install Python + * packages have only private connectivity to Google services (including + * Artifact Registry) and VPC network (if either `NodeConfig.network` and + * `NodeConfig.subnetwork` fields or `NodeConfig.composer_network_attachment` + * field are specified). If `false`, the builds also have access to the + * internet. + * This field is supported for Cloud Composer environments in versions + * composer-3.*.*-airflow-*.*.* and newer. + * + * Generated from protobuf field bool enable_private_builds_only = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getEnablePrivateBuildsOnly() + { + return $this->enable_private_builds_only; + } + + /** + * Optional. If `true`, builds performed during operations that install Python + * packages have only private connectivity to Google services (including + * Artifact Registry) and VPC network (if either `NodeConfig.network` and + * `NodeConfig.subnetwork` fields or `NodeConfig.composer_network_attachment` + * field are specified). If `false`, the builds also have access to the + * internet. + * This field is supported for Cloud Composer environments in versions + * composer-3.*.*-airflow-*.*.* and newer. + * + * Generated from protobuf field bool enable_private_builds_only = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setEnablePrivateBuildsOnly($var) + { + GPBUtil::checkBool($var); + $this->enable_private_builds_only = $var; + + return $this; + } + + /** + * Optional. Configuration for the private GKE cluster for a Private IP + * Cloud Composer environment. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig private_cluster_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Orchestration\Airflow\Service\V1\PrivateClusterConfig|null + */ + public function getPrivateClusterConfig() + { + return $this->private_cluster_config; + } + + public function hasPrivateClusterConfig() + { + return isset($this->private_cluster_config); + } + + public function clearPrivateClusterConfig() + { + unset($this->private_cluster_config); + } + + /** + * Optional. Configuration for the private GKE cluster for a Private IP + * Cloud Composer environment. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig private_cluster_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Orchestration\Airflow\Service\V1\PrivateClusterConfig $var + * @return $this + */ + public function setPrivateClusterConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Orchestration\Airflow\Service\V1\PrivateClusterConfig::class); + $this->private_cluster_config = $var; + + return $this; + } + + /** + * Optional. The CIDR block from which IP range for web server will be + * reserved. Needs to be disjoint from + * `private_cluster_config.master_ipv4_cidr_block` and + * `cloud_sql_ipv4_cidr_block`. + * This field is supported for Cloud Composer environments in versions + * composer-1.*.*-airflow-*.*.*. + * + * Generated from protobuf field string web_server_ipv4_cidr_block = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getWebServerIpv4CidrBlock() + { + return $this->web_server_ipv4_cidr_block; + } + + /** + * Optional. The CIDR block from which IP range for web server will be + * reserved. Needs to be disjoint from + * `private_cluster_config.master_ipv4_cidr_block` and + * `cloud_sql_ipv4_cidr_block`. + * This field is supported for Cloud Composer environments in versions + * composer-1.*.*-airflow-*.*.*. + * + * Generated from protobuf field string web_server_ipv4_cidr_block = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setWebServerIpv4CidrBlock($var) + { + GPBUtil::checkString($var, True); + $this->web_server_ipv4_cidr_block = $var; + + return $this; + } + + /** + * Optional. The CIDR block from which IP range in tenant project will be + * reserved for Cloud SQL. Needs to be disjoint from + * `web_server_ipv4_cidr_block`. + * + * Generated from protobuf field string cloud_sql_ipv4_cidr_block = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getCloudSqlIpv4CidrBlock() + { + return $this->cloud_sql_ipv4_cidr_block; + } + + /** + * Optional. The CIDR block from which IP range in tenant project will be + * reserved for Cloud SQL. Needs to be disjoint from + * `web_server_ipv4_cidr_block`. + * + * Generated from protobuf field string cloud_sql_ipv4_cidr_block = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setCloudSqlIpv4CidrBlock($var) + { + GPBUtil::checkString($var, True); + $this->cloud_sql_ipv4_cidr_block = $var; + + return $this; + } + + /** + * Output only. The IP range reserved for the tenant project's App Engine VMs. + * This field is supported for Cloud Composer environments in versions + * composer-1.*.*-airflow-*.*.*. + * + * Generated from protobuf field string web_server_ipv4_reserved_range = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getWebServerIpv4ReservedRange() + { + return $this->web_server_ipv4_reserved_range; + } + + /** + * Output only. The IP range reserved for the tenant project's App Engine VMs. + * This field is supported for Cloud Composer environments in versions + * composer-1.*.*-airflow-*.*.*. + * + * Generated from protobuf field string web_server_ipv4_reserved_range = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setWebServerIpv4ReservedRange($var) + { + GPBUtil::checkString($var, True); + $this->web_server_ipv4_reserved_range = $var; + + return $this; + } + + /** + * Optional. The CIDR block from which IP range for Cloud Composer Network in + * tenant project will be reserved. Needs to be disjoint from + * private_cluster_config.master_ipv4_cidr_block and + * cloud_sql_ipv4_cidr_block. + * This field is supported for Cloud Composer environments in versions + * composer-2.*.*-airflow-*.*.* and newer. + * + * Generated from protobuf field string cloud_composer_network_ipv4_cidr_block = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getCloudComposerNetworkIpv4CidrBlock() + { + return $this->cloud_composer_network_ipv4_cidr_block; + } + + /** + * Optional. The CIDR block from which IP range for Cloud Composer Network in + * tenant project will be reserved. Needs to be disjoint from + * private_cluster_config.master_ipv4_cidr_block and + * cloud_sql_ipv4_cidr_block. + * This field is supported for Cloud Composer environments in versions + * composer-2.*.*-airflow-*.*.* and newer. + * + * Generated from protobuf field string cloud_composer_network_ipv4_cidr_block = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setCloudComposerNetworkIpv4CidrBlock($var) + { + GPBUtil::checkString($var, True); + $this->cloud_composer_network_ipv4_cidr_block = $var; + + return $this; + } + + /** + * Output only. The IP range reserved for the tenant project's Cloud Composer + * network. + * This field is supported for Cloud Composer environments in versions + * composer-2.*.*-airflow-*.*.* and newer. + * + * Generated from protobuf field string cloud_composer_network_ipv4_reserved_range = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getCloudComposerNetworkIpv4ReservedRange() + { + return $this->cloud_composer_network_ipv4_reserved_range; + } + + /** + * Output only. The IP range reserved for the tenant project's Cloud Composer + * network. + * This field is supported for Cloud Composer environments in versions + * composer-2.*.*-airflow-*.*.* and newer. + * + * Generated from protobuf field string cloud_composer_network_ipv4_reserved_range = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setCloudComposerNetworkIpv4ReservedRange($var) + { + GPBUtil::checkString($var, True); + $this->cloud_composer_network_ipv4_reserved_range = $var; + + return $this; + } + + /** + * Optional. When enabled, IPs from public (non-RFC1918) ranges can be used + * for `IPAllocationPolicy.cluster_ipv4_cidr_block` and + * `IPAllocationPolicy.service_ipv4_cidr_block`. + * + * Generated from protobuf field bool enable_privately_used_public_ips = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getEnablePrivatelyUsedPublicIps() + { + return $this->enable_privately_used_public_ips; + } + + /** + * Optional. When enabled, IPs from public (non-RFC1918) ranges can be used + * for `IPAllocationPolicy.cluster_ipv4_cidr_block` and + * `IPAllocationPolicy.service_ipv4_cidr_block`. + * + * Generated from protobuf field bool enable_privately_used_public_ips = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setEnablePrivatelyUsedPublicIps($var) + { + GPBUtil::checkBool($var); + $this->enable_privately_used_public_ips = $var; + + return $this; + } + + /** + * Optional. When specified, the environment will use Private Service Connect + * instead of VPC peerings to connect to Cloud SQL in the Tenant Project, + * and the PSC endpoint in the Customer Project will use an IP address from + * this subnetwork. + * + * Generated from protobuf field string cloud_composer_connection_subnetwork = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getCloudComposerConnectionSubnetwork() + { + return $this->cloud_composer_connection_subnetwork; + } + + /** + * Optional. When specified, the environment will use Private Service Connect + * instead of VPC peerings to connect to Cloud SQL in the Tenant Project, + * and the PSC endpoint in the Customer Project will use an IP address from + * this subnetwork. + * + * Generated from protobuf field string cloud_composer_connection_subnetwork = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setCloudComposerConnectionSubnetwork($var) + { + GPBUtil::checkString($var, True); + $this->cloud_composer_connection_subnetwork = $var; + + return $this; + } + + /** + * Optional. Configuration for the network connections configuration in the + * environment. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.NetworkingConfig networking_config = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Orchestration\Airflow\Service\V1\NetworkingConfig|null + */ + public function getNetworkingConfig() + { + return $this->networking_config; + } + + public function hasNetworkingConfig() + { + return isset($this->networking_config); + } + + public function clearNetworkingConfig() + { + unset($this->networking_config); + } + + /** + * Optional. Configuration for the network connections configuration in the + * environment. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.NetworkingConfig networking_config = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Orchestration\Airflow\Service\V1\NetworkingConfig $var + * @return $this + */ + public function setNetworkingConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Orchestration\Airflow\Service\V1\NetworkingConfig::class); + $this->networking_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/RecoveryConfig.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/RecoveryConfig.php new file mode 100644 index 000000000000..28d0684e7aad --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/RecoveryConfig.php @@ -0,0 +1,77 @@ +google.cloud.orchestration.airflow.service.v1.RecoveryConfig + */ +class RecoveryConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The configuration for scheduled snapshot creation mechanism. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.ScheduledSnapshotsConfig scheduled_snapshots_config = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $scheduled_snapshots_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Orchestration\Airflow\Service\V1\ScheduledSnapshotsConfig $scheduled_snapshots_config + * Optional. The configuration for scheduled snapshot creation mechanism. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The configuration for scheduled snapshot creation mechanism. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.ScheduledSnapshotsConfig scheduled_snapshots_config = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Orchestration\Airflow\Service\V1\ScheduledSnapshotsConfig|null + */ + public function getScheduledSnapshotsConfig() + { + return $this->scheduled_snapshots_config; + } + + public function hasScheduledSnapshotsConfig() + { + return isset($this->scheduled_snapshots_config); + } + + public function clearScheduledSnapshotsConfig() + { + unset($this->scheduled_snapshots_config); + } + + /** + * Optional. The configuration for scheduled snapshot creation mechanism. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.ScheduledSnapshotsConfig scheduled_snapshots_config = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Orchestration\Airflow\Service\V1\ScheduledSnapshotsConfig $var + * @return $this + */ + public function setScheduledSnapshotsConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Orchestration\Airflow\Service\V1\ScheduledSnapshotsConfig::class); + $this->scheduled_snapshots_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/SaveSnapshotRequest.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/SaveSnapshotRequest.php new file mode 100644 index 000000000000..ceda45d81c94 --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/SaveSnapshotRequest.php @@ -0,0 +1,109 @@ +google.cloud.orchestration.airflow.service.v1.SaveSnapshotRequest + */ +class SaveSnapshotRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the source environment in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * + * Generated from protobuf field string environment = 1; + */ + protected $environment = ''; + /** + * Location in a Cloud Storage where the snapshot is going to be stored, e.g.: + * "gs://my-bucket/snapshots". + * + * Generated from protobuf field string snapshot_location = 2; + */ + protected $snapshot_location = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $environment + * The resource name of the source environment in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * @type string $snapshot_location + * Location in a Cloud Storage where the snapshot is going to be stored, e.g.: + * "gs://my-bucket/snapshots". + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); + parent::__construct($data); + } + + /** + * The resource name of the source environment in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * + * Generated from protobuf field string environment = 1; + * @return string + */ + public function getEnvironment() + { + return $this->environment; + } + + /** + * The resource name of the source environment in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * + * Generated from protobuf field string environment = 1; + * @param string $var + * @return $this + */ + public function setEnvironment($var) + { + GPBUtil::checkString($var, True); + $this->environment = $var; + + return $this; + } + + /** + * Location in a Cloud Storage where the snapshot is going to be stored, e.g.: + * "gs://my-bucket/snapshots". + * + * Generated from protobuf field string snapshot_location = 2; + * @return string + */ + public function getSnapshotLocation() + { + return $this->snapshot_location; + } + + /** + * Location in a Cloud Storage where the snapshot is going to be stored, e.g.: + * "gs://my-bucket/snapshots". + * + * Generated from protobuf field string snapshot_location = 2; + * @param string $var + * @return $this + */ + public function setSnapshotLocation($var) + { + GPBUtil::checkString($var, True); + $this->snapshot_location = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/SaveSnapshotResponse.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/SaveSnapshotResponse.php new file mode 100644 index 000000000000..769393e4eae8 --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/SaveSnapshotResponse.php @@ -0,0 +1,79 @@ +google.cloud.orchestration.airflow.service.v1.SaveSnapshotResponse + */ +class SaveSnapshotResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The fully-resolved Cloud Storage path of the created snapshot, + * e.g.: + * "gs://my-bucket/snapshots/project_location_environment_timestamp". + * This field is populated only if the snapshot creation was successful. + * + * Generated from protobuf field string snapshot_path = 1; + */ + protected $snapshot_path = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $snapshot_path + * The fully-resolved Cloud Storage path of the created snapshot, + * e.g.: + * "gs://my-bucket/snapshots/project_location_environment_timestamp". + * This field is populated only if the snapshot creation was successful. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); + parent::__construct($data); + } + + /** + * The fully-resolved Cloud Storage path of the created snapshot, + * e.g.: + * "gs://my-bucket/snapshots/project_location_environment_timestamp". + * This field is populated only if the snapshot creation was successful. + * + * Generated from protobuf field string snapshot_path = 1; + * @return string + */ + public function getSnapshotPath() + { + return $this->snapshot_path; + } + + /** + * The fully-resolved Cloud Storage path of the created snapshot, + * e.g.: + * "gs://my-bucket/snapshots/project_location_environment_timestamp". + * This field is populated only if the snapshot creation was successful. + * + * Generated from protobuf field string snapshot_path = 1; + * @param string $var + * @return $this + */ + public function setSnapshotPath($var) + { + GPBUtil::checkString($var, True); + $this->snapshot_path = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ScheduledSnapshotsConfig.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ScheduledSnapshotsConfig.php new file mode 100644 index 000000000000..ee16abe92c52 --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ScheduledSnapshotsConfig.php @@ -0,0 +1,185 @@ +google.cloud.orchestration.airflow.service.v1.ScheduledSnapshotsConfig + */ +class ScheduledSnapshotsConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Whether scheduled snapshots creation is enabled. + * + * Generated from protobuf field bool enabled = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $enabled = false; + /** + * Optional. The Cloud Storage location for storing automatically created + * snapshots. + * + * Generated from protobuf field string snapshot_location = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $snapshot_location = ''; + /** + * Optional. The cron expression representing the time when snapshots creation + * mechanism runs. This field is subject to additional validation around + * frequency of execution. + * + * Generated from protobuf field string snapshot_creation_schedule = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $snapshot_creation_schedule = ''; + /** + * Optional. Time zone that sets the context to interpret + * snapshot_creation_schedule. + * + * Generated from protobuf field string time_zone = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $time_zone = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $enabled + * Optional. Whether scheduled snapshots creation is enabled. + * @type string $snapshot_location + * Optional. The Cloud Storage location for storing automatically created + * snapshots. + * @type string $snapshot_creation_schedule + * Optional. The cron expression representing the time when snapshots creation + * mechanism runs. This field is subject to additional validation around + * frequency of execution. + * @type string $time_zone + * Optional. Time zone that sets the context to interpret + * snapshot_creation_schedule. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Whether scheduled snapshots creation is enabled. + * + * Generated from protobuf field bool enabled = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getEnabled() + { + return $this->enabled; + } + + /** + * Optional. Whether scheduled snapshots creation is enabled. + * + * Generated from protobuf field bool enabled = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setEnabled($var) + { + GPBUtil::checkBool($var); + $this->enabled = $var; + + return $this; + } + + /** + * Optional. The Cloud Storage location for storing automatically created + * snapshots. + * + * Generated from protobuf field string snapshot_location = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getSnapshotLocation() + { + return $this->snapshot_location; + } + + /** + * Optional. The Cloud Storage location for storing automatically created + * snapshots. + * + * Generated from protobuf field string snapshot_location = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setSnapshotLocation($var) + { + GPBUtil::checkString($var, True); + $this->snapshot_location = $var; + + return $this; + } + + /** + * Optional. The cron expression representing the time when snapshots creation + * mechanism runs. This field is subject to additional validation around + * frequency of execution. + * + * Generated from protobuf field string snapshot_creation_schedule = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getSnapshotCreationSchedule() + { + return $this->snapshot_creation_schedule; + } + + /** + * Optional. The cron expression representing the time when snapshots creation + * mechanism runs. This field is subject to additional validation around + * frequency of execution. + * + * Generated from protobuf field string snapshot_creation_schedule = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setSnapshotCreationSchedule($var) + { + GPBUtil::checkString($var, True); + $this->snapshot_creation_schedule = $var; + + return $this; + } + + /** + * Optional. Time zone that sets the context to interpret + * snapshot_creation_schedule. + * + * Generated from protobuf field string time_zone = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getTimeZone() + { + return $this->time_zone; + } + + /** + * Optional. Time zone that sets the context to interpret + * snapshot_creation_schedule. + * + * Generated from protobuf field string time_zone = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setTimeZone($var) + { + GPBUtil::checkString($var, True); + $this->time_zone = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/SoftwareConfig.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/SoftwareConfig.php new file mode 100644 index 000000000000..ea2277a07c3e --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/SoftwareConfig.php @@ -0,0 +1,583 @@ +google.cloud.orchestration.airflow.service.v1.SoftwareConfig + */ +class SoftwareConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The version of the software running in the environment. + * This encapsulates both the version of Cloud Composer functionality and the + * version of Apache Airflow. It must match the regular expression + * `composer-([0-9]+(\.[0-9]+\.[0-9]+(-preview\.[0-9]+)?)?|latest)-airflow-([0-9]+(\.[0-9]+(\.[0-9]+)?)?)`. + * When used as input, the server also checks if the provided version is + * supported and denies the request for an unsupported version. + * The Cloud Composer portion of the image version is a full + * [semantic version](https://semver.org), or an alias in the form of major + * version number or `latest`. When an alias is provided, the server replaces + * it with the current Cloud Composer version that satisfies the alias. + * The Apache Airflow portion of the image version is a full semantic version + * that points to one of the supported Apache Airflow versions, or an alias in + * the form of only major or major.minor versions specified. When an alias is + * provided, the server replaces it with the latest Apache Airflow version + * that satisfies the alias and is supported in the given Cloud Composer + * version. + * In all cases, the resolved image version is stored in the same field. + * See also [version + * list](/composer/docs/concepts/versioning/composer-versions) and [versioning + * overview](/composer/docs/concepts/versioning/composer-versioning-overview). + * + * Generated from protobuf field string image_version = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $image_version = ''; + /** + * Optional. Apache Airflow configuration properties to override. + * Property keys contain the section and property names, separated by a + * hyphen, for example "core-dags_are_paused_at_creation". Section names must + * not contain hyphens ("-"), opening square brackets ("["), or closing + * square brackets ("]"). The property name must not be empty and must not + * contain an equals sign ("=") or semicolon (";"). Section and property names + * must not contain a period ("."). Apache Airflow configuration property + * names must be written in + * [snake_case](https://en.wikipedia.org/wiki/Snake_case). Property values can + * contain any character, and can be written in any lower/upper case format. + * Certain Apache Airflow configuration property values are + * [blocked](/composer/docs/concepts/airflow-configurations), + * and cannot be overridden. + * + * Generated from protobuf field map airflow_config_overrides = 2; + */ + private $airflow_config_overrides; + /** + * Optional. Custom Python Package Index (PyPI) packages to be installed in + * the environment. + * Keys refer to the lowercase package name such as "numpy" + * and values are the lowercase extras and version specifier such as + * "==1.12.0", "[devel,gcp_api]", or "[devel]>=1.8.2, <1.9.2". To specify a + * package without pinning it to a version specifier, use the empty string as + * the value. + * + * Generated from protobuf field map pypi_packages = 3; + */ + private $pypi_packages; + /** + * Optional. Additional environment variables to provide to the Apache Airflow + * scheduler, worker, and webserver processes. + * Environment variable names must match the regular expression + * `[a-zA-Z_][a-zA-Z0-9_]*`. They cannot specify Apache Airflow + * software configuration overrides (they cannot match the regular expression + * `AIRFLOW__[A-Z0-9_]+__[A-Z0-9_]+`), and they cannot match any of the + * following reserved names: + * * `AIRFLOW_HOME` + * * `C_FORCE_ROOT` + * * `CONTAINER_NAME` + * * `DAGS_FOLDER` + * * `GCP_PROJECT` + * * `GCS_BUCKET` + * * `GKE_CLUSTER_NAME` + * * `SQL_DATABASE` + * * `SQL_INSTANCE` + * * `SQL_PASSWORD` + * * `SQL_PROJECT` + * * `SQL_REGION` + * * `SQL_USER` + * + * Generated from protobuf field map env_variables = 4; + */ + private $env_variables; + /** + * Optional. The major version of Python used to run the Apache Airflow + * scheduler, worker, and webserver processes. + * Can be set to '2' or '3'. If not specified, the default is '3'. Cannot be + * updated. + * This field is only supported for Cloud Composer environments in versions + * composer-1.*.*-airflow-*.*.*. Environments in newer versions always use + * Python major version 3. + * + * Generated from protobuf field string python_version = 6; + */ + protected $python_version = ''; + /** + * Optional. The number of schedulers for Airflow. + * This field is supported for Cloud Composer environments in versions + * composer-1.*.*-airflow-2.*.*. + * + * Generated from protobuf field int32 scheduler_count = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $scheduler_count = 0; + /** + * Optional. The configuration for Cloud Data Lineage integration. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.CloudDataLineageIntegration cloud_data_lineage_integration = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $cloud_data_lineage_integration = null; + /** + * Optional. Whether or not the web server uses custom plugins. + * If unspecified, the field defaults to `PLUGINS_ENABLED`. + * This field is supported for Cloud Composer environments in versions + * composer-3.*.*-airflow-*.*.* and newer. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.SoftwareConfig.WebServerPluginsMode web_server_plugins_mode = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $web_server_plugins_mode = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $image_version + * Optional. The version of the software running in the environment. + * This encapsulates both the version of Cloud Composer functionality and the + * version of Apache Airflow. It must match the regular expression + * `composer-([0-9]+(\.[0-9]+\.[0-9]+(-preview\.[0-9]+)?)?|latest)-airflow-([0-9]+(\.[0-9]+(\.[0-9]+)?)?)`. + * When used as input, the server also checks if the provided version is + * supported and denies the request for an unsupported version. + * The Cloud Composer portion of the image version is a full + * [semantic version](https://semver.org), or an alias in the form of major + * version number or `latest`. When an alias is provided, the server replaces + * it with the current Cloud Composer version that satisfies the alias. + * The Apache Airflow portion of the image version is a full semantic version + * that points to one of the supported Apache Airflow versions, or an alias in + * the form of only major or major.minor versions specified. When an alias is + * provided, the server replaces it with the latest Apache Airflow version + * that satisfies the alias and is supported in the given Cloud Composer + * version. + * In all cases, the resolved image version is stored in the same field. + * See also [version + * list](/composer/docs/concepts/versioning/composer-versions) and [versioning + * overview](/composer/docs/concepts/versioning/composer-versioning-overview). + * @type array|\Google\Protobuf\Internal\MapField $airflow_config_overrides + * Optional. Apache Airflow configuration properties to override. + * Property keys contain the section and property names, separated by a + * hyphen, for example "core-dags_are_paused_at_creation". Section names must + * not contain hyphens ("-"), opening square brackets ("["), or closing + * square brackets ("]"). The property name must not be empty and must not + * contain an equals sign ("=") or semicolon (";"). Section and property names + * must not contain a period ("."). Apache Airflow configuration property + * names must be written in + * [snake_case](https://en.wikipedia.org/wiki/Snake_case). Property values can + * contain any character, and can be written in any lower/upper case format. + * Certain Apache Airflow configuration property values are + * [blocked](/composer/docs/concepts/airflow-configurations), + * and cannot be overridden. + * @type array|\Google\Protobuf\Internal\MapField $pypi_packages + * Optional. Custom Python Package Index (PyPI) packages to be installed in + * the environment. + * Keys refer to the lowercase package name such as "numpy" + * and values are the lowercase extras and version specifier such as + * "==1.12.0", "[devel,gcp_api]", or "[devel]>=1.8.2, <1.9.2". To specify a + * package without pinning it to a version specifier, use the empty string as + * the value. + * @type array|\Google\Protobuf\Internal\MapField $env_variables + * Optional. Additional environment variables to provide to the Apache Airflow + * scheduler, worker, and webserver processes. + * Environment variable names must match the regular expression + * `[a-zA-Z_][a-zA-Z0-9_]*`. They cannot specify Apache Airflow + * software configuration overrides (they cannot match the regular expression + * `AIRFLOW__[A-Z0-9_]+__[A-Z0-9_]+`), and they cannot match any of the + * following reserved names: + * * `AIRFLOW_HOME` + * * `C_FORCE_ROOT` + * * `CONTAINER_NAME` + * * `DAGS_FOLDER` + * * `GCP_PROJECT` + * * `GCS_BUCKET` + * * `GKE_CLUSTER_NAME` + * * `SQL_DATABASE` + * * `SQL_INSTANCE` + * * `SQL_PASSWORD` + * * `SQL_PROJECT` + * * `SQL_REGION` + * * `SQL_USER` + * @type string $python_version + * Optional. The major version of Python used to run the Apache Airflow + * scheduler, worker, and webserver processes. + * Can be set to '2' or '3'. If not specified, the default is '3'. Cannot be + * updated. + * This field is only supported for Cloud Composer environments in versions + * composer-1.*.*-airflow-*.*.*. Environments in newer versions always use + * Python major version 3. + * @type int $scheduler_count + * Optional. The number of schedulers for Airflow. + * This field is supported for Cloud Composer environments in versions + * composer-1.*.*-airflow-2.*.*. + * @type \Google\Cloud\Orchestration\Airflow\Service\V1\CloudDataLineageIntegration $cloud_data_lineage_integration + * Optional. The configuration for Cloud Data Lineage integration. + * @type int $web_server_plugins_mode + * Optional. Whether or not the web server uses custom plugins. + * If unspecified, the field defaults to `PLUGINS_ENABLED`. + * This field is supported for Cloud Composer environments in versions + * composer-3.*.*-airflow-*.*.* and newer. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The version of the software running in the environment. + * This encapsulates both the version of Cloud Composer functionality and the + * version of Apache Airflow. It must match the regular expression + * `composer-([0-9]+(\.[0-9]+\.[0-9]+(-preview\.[0-9]+)?)?|latest)-airflow-([0-9]+(\.[0-9]+(\.[0-9]+)?)?)`. + * When used as input, the server also checks if the provided version is + * supported and denies the request for an unsupported version. + * The Cloud Composer portion of the image version is a full + * [semantic version](https://semver.org), or an alias in the form of major + * version number or `latest`. When an alias is provided, the server replaces + * it with the current Cloud Composer version that satisfies the alias. + * The Apache Airflow portion of the image version is a full semantic version + * that points to one of the supported Apache Airflow versions, or an alias in + * the form of only major or major.minor versions specified. When an alias is + * provided, the server replaces it with the latest Apache Airflow version + * that satisfies the alias and is supported in the given Cloud Composer + * version. + * In all cases, the resolved image version is stored in the same field. + * See also [version + * list](/composer/docs/concepts/versioning/composer-versions) and [versioning + * overview](/composer/docs/concepts/versioning/composer-versioning-overview). + * + * Generated from protobuf field string image_version = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getImageVersion() + { + return $this->image_version; + } + + /** + * Optional. The version of the software running in the environment. + * This encapsulates both the version of Cloud Composer functionality and the + * version of Apache Airflow. It must match the regular expression + * `composer-([0-9]+(\.[0-9]+\.[0-9]+(-preview\.[0-9]+)?)?|latest)-airflow-([0-9]+(\.[0-9]+(\.[0-9]+)?)?)`. + * When used as input, the server also checks if the provided version is + * supported and denies the request for an unsupported version. + * The Cloud Composer portion of the image version is a full + * [semantic version](https://semver.org), or an alias in the form of major + * version number or `latest`. When an alias is provided, the server replaces + * it with the current Cloud Composer version that satisfies the alias. + * The Apache Airflow portion of the image version is a full semantic version + * that points to one of the supported Apache Airflow versions, or an alias in + * the form of only major or major.minor versions specified. When an alias is + * provided, the server replaces it with the latest Apache Airflow version + * that satisfies the alias and is supported in the given Cloud Composer + * version. + * In all cases, the resolved image version is stored in the same field. + * See also [version + * list](/composer/docs/concepts/versioning/composer-versions) and [versioning + * overview](/composer/docs/concepts/versioning/composer-versioning-overview). + * + * Generated from protobuf field string image_version = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setImageVersion($var) + { + GPBUtil::checkString($var, True); + $this->image_version = $var; + + return $this; + } + + /** + * Optional. Apache Airflow configuration properties to override. + * Property keys contain the section and property names, separated by a + * hyphen, for example "core-dags_are_paused_at_creation". Section names must + * not contain hyphens ("-"), opening square brackets ("["), or closing + * square brackets ("]"). The property name must not be empty and must not + * contain an equals sign ("=") or semicolon (";"). Section and property names + * must not contain a period ("."). Apache Airflow configuration property + * names must be written in + * [snake_case](https://en.wikipedia.org/wiki/Snake_case). Property values can + * contain any character, and can be written in any lower/upper case format. + * Certain Apache Airflow configuration property values are + * [blocked](/composer/docs/concepts/airflow-configurations), + * and cannot be overridden. + * + * Generated from protobuf field map airflow_config_overrides = 2; + * @return \Google\Protobuf\Internal\MapField + */ + public function getAirflowConfigOverrides() + { + return $this->airflow_config_overrides; + } + + /** + * Optional. Apache Airflow configuration properties to override. + * Property keys contain the section and property names, separated by a + * hyphen, for example "core-dags_are_paused_at_creation". Section names must + * not contain hyphens ("-"), opening square brackets ("["), or closing + * square brackets ("]"). The property name must not be empty and must not + * contain an equals sign ("=") or semicolon (";"). Section and property names + * must not contain a period ("."). Apache Airflow configuration property + * names must be written in + * [snake_case](https://en.wikipedia.org/wiki/Snake_case). Property values can + * contain any character, and can be written in any lower/upper case format. + * Certain Apache Airflow configuration property values are + * [blocked](/composer/docs/concepts/airflow-configurations), + * and cannot be overridden. + * + * Generated from protobuf field map airflow_config_overrides = 2; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setAirflowConfigOverrides($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->airflow_config_overrides = $arr; + + return $this; + } + + /** + * Optional. Custom Python Package Index (PyPI) packages to be installed in + * the environment. + * Keys refer to the lowercase package name such as "numpy" + * and values are the lowercase extras and version specifier such as + * "==1.12.0", "[devel,gcp_api]", or "[devel]>=1.8.2, <1.9.2". To specify a + * package without pinning it to a version specifier, use the empty string as + * the value. + * + * Generated from protobuf field map pypi_packages = 3; + * @return \Google\Protobuf\Internal\MapField + */ + public function getPypiPackages() + { + return $this->pypi_packages; + } + + /** + * Optional. Custom Python Package Index (PyPI) packages to be installed in + * the environment. + * Keys refer to the lowercase package name such as "numpy" + * and values are the lowercase extras and version specifier such as + * "==1.12.0", "[devel,gcp_api]", or "[devel]>=1.8.2, <1.9.2". To specify a + * package without pinning it to a version specifier, use the empty string as + * the value. + * + * Generated from protobuf field map pypi_packages = 3; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setPypiPackages($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->pypi_packages = $arr; + + return $this; + } + + /** + * Optional. Additional environment variables to provide to the Apache Airflow + * scheduler, worker, and webserver processes. + * Environment variable names must match the regular expression + * `[a-zA-Z_][a-zA-Z0-9_]*`. They cannot specify Apache Airflow + * software configuration overrides (they cannot match the regular expression + * `AIRFLOW__[A-Z0-9_]+__[A-Z0-9_]+`), and they cannot match any of the + * following reserved names: + * * `AIRFLOW_HOME` + * * `C_FORCE_ROOT` + * * `CONTAINER_NAME` + * * `DAGS_FOLDER` + * * `GCP_PROJECT` + * * `GCS_BUCKET` + * * `GKE_CLUSTER_NAME` + * * `SQL_DATABASE` + * * `SQL_INSTANCE` + * * `SQL_PASSWORD` + * * `SQL_PROJECT` + * * `SQL_REGION` + * * `SQL_USER` + * + * Generated from protobuf field map env_variables = 4; + * @return \Google\Protobuf\Internal\MapField + */ + public function getEnvVariables() + { + return $this->env_variables; + } + + /** + * Optional. Additional environment variables to provide to the Apache Airflow + * scheduler, worker, and webserver processes. + * Environment variable names must match the regular expression + * `[a-zA-Z_][a-zA-Z0-9_]*`. They cannot specify Apache Airflow + * software configuration overrides (they cannot match the regular expression + * `AIRFLOW__[A-Z0-9_]+__[A-Z0-9_]+`), and they cannot match any of the + * following reserved names: + * * `AIRFLOW_HOME` + * * `C_FORCE_ROOT` + * * `CONTAINER_NAME` + * * `DAGS_FOLDER` + * * `GCP_PROJECT` + * * `GCS_BUCKET` + * * `GKE_CLUSTER_NAME` + * * `SQL_DATABASE` + * * `SQL_INSTANCE` + * * `SQL_PASSWORD` + * * `SQL_PROJECT` + * * `SQL_REGION` + * * `SQL_USER` + * + * Generated from protobuf field map env_variables = 4; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setEnvVariables($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->env_variables = $arr; + + return $this; + } + + /** + * Optional. The major version of Python used to run the Apache Airflow + * scheduler, worker, and webserver processes. + * Can be set to '2' or '3'. If not specified, the default is '3'. Cannot be + * updated. + * This field is only supported for Cloud Composer environments in versions + * composer-1.*.*-airflow-*.*.*. Environments in newer versions always use + * Python major version 3. + * + * Generated from protobuf field string python_version = 6; + * @return string + */ + public function getPythonVersion() + { + return $this->python_version; + } + + /** + * Optional. The major version of Python used to run the Apache Airflow + * scheduler, worker, and webserver processes. + * Can be set to '2' or '3'. If not specified, the default is '3'. Cannot be + * updated. + * This field is only supported for Cloud Composer environments in versions + * composer-1.*.*-airflow-*.*.*. Environments in newer versions always use + * Python major version 3. + * + * Generated from protobuf field string python_version = 6; + * @param string $var + * @return $this + */ + public function setPythonVersion($var) + { + GPBUtil::checkString($var, True); + $this->python_version = $var; + + return $this; + } + + /** + * Optional. The number of schedulers for Airflow. + * This field is supported for Cloud Composer environments in versions + * composer-1.*.*-airflow-2.*.*. + * + * Generated from protobuf field int32 scheduler_count = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getSchedulerCount() + { + return $this->scheduler_count; + } + + /** + * Optional. The number of schedulers for Airflow. + * This field is supported for Cloud Composer environments in versions + * composer-1.*.*-airflow-2.*.*. + * + * Generated from protobuf field int32 scheduler_count = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setSchedulerCount($var) + { + GPBUtil::checkInt32($var); + $this->scheduler_count = $var; + + return $this; + } + + /** + * Optional. The configuration for Cloud Data Lineage integration. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.CloudDataLineageIntegration cloud_data_lineage_integration = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Orchestration\Airflow\Service\V1\CloudDataLineageIntegration|null + */ + public function getCloudDataLineageIntegration() + { + return $this->cloud_data_lineage_integration; + } + + public function hasCloudDataLineageIntegration() + { + return isset($this->cloud_data_lineage_integration); + } + + public function clearCloudDataLineageIntegration() + { + unset($this->cloud_data_lineage_integration); + } + + /** + * Optional. The configuration for Cloud Data Lineage integration. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.CloudDataLineageIntegration cloud_data_lineage_integration = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Orchestration\Airflow\Service\V1\CloudDataLineageIntegration $var + * @return $this + */ + public function setCloudDataLineageIntegration($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Orchestration\Airflow\Service\V1\CloudDataLineageIntegration::class); + $this->cloud_data_lineage_integration = $var; + + return $this; + } + + /** + * Optional. Whether or not the web server uses custom plugins. + * If unspecified, the field defaults to `PLUGINS_ENABLED`. + * This field is supported for Cloud Composer environments in versions + * composer-3.*.*-airflow-*.*.* and newer. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.SoftwareConfig.WebServerPluginsMode web_server_plugins_mode = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getWebServerPluginsMode() + { + return $this->web_server_plugins_mode; + } + + /** + * Optional. Whether or not the web server uses custom plugins. + * If unspecified, the field defaults to `PLUGINS_ENABLED`. + * This field is supported for Cloud Composer environments in versions + * composer-3.*.*-airflow-*.*.* and newer. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.SoftwareConfig.WebServerPluginsMode web_server_plugins_mode = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setWebServerPluginsMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Orchestration\Airflow\Service\V1\SoftwareConfig\WebServerPluginsMode::class); + $this->web_server_plugins_mode = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/SoftwareConfig/WebServerPluginsMode.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/SoftwareConfig/WebServerPluginsMode.php new file mode 100644 index 000000000000..05096507030c --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/SoftwareConfig/WebServerPluginsMode.php @@ -0,0 +1,64 @@ +google.cloud.orchestration.airflow.service.v1.SoftwareConfig.WebServerPluginsMode + */ +class WebServerPluginsMode +{ + /** + * Default mode. + * + * Generated from protobuf enum WEB_SERVER_PLUGINS_MODE_UNSPECIFIED = 0; + */ + const WEB_SERVER_PLUGINS_MODE_UNSPECIFIED = 0; + /** + * Web server plugins are not supported. + * + * Generated from protobuf enum PLUGINS_DISABLED = 1; + */ + const PLUGINS_DISABLED = 1; + /** + * Web server plugins are supported. + * + * Generated from protobuf enum PLUGINS_ENABLED = 2; + */ + const PLUGINS_ENABLED = 2; + + private static $valueToName = [ + self::WEB_SERVER_PLUGINS_MODE_UNSPECIFIED => 'WEB_SERVER_PLUGINS_MODE_UNSPECIFIED', + self::PLUGINS_DISABLED => 'PLUGINS_DISABLED', + self::PLUGINS_ENABLED => 'PLUGINS_ENABLED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(WebServerPluginsMode::class, \Google\Cloud\Orchestration\Airflow\Service\V1\SoftwareConfig_WebServerPluginsMode::class); + diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/StopAirflowCommandRequest.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/StopAirflowCommandRequest.php new file mode 100644 index 000000000000..01cc5c8be841 --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/StopAirflowCommandRequest.php @@ -0,0 +1,211 @@ +google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest + */ +class StopAirflowCommandRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the environment in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}". + * + * Generated from protobuf field string environment = 1; + */ + protected $environment = ''; + /** + * The unique ID of the command execution. + * + * Generated from protobuf field string execution_id = 2; + */ + protected $execution_id = ''; + /** + * The name of the pod where the command is executed. + * + * Generated from protobuf field string pod = 3; + */ + protected $pod = ''; + /** + * The namespace of the pod where the command is executed. + * + * Generated from protobuf field string pod_namespace = 4; + */ + protected $pod_namespace = ''; + /** + * If true, the execution is terminated forcefully (SIGKILL). If false, the + * execution is stopped gracefully, giving it time for cleanup. + * + * Generated from protobuf field bool force = 5; + */ + protected $force = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $environment + * The resource name of the environment in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}". + * @type string $execution_id + * The unique ID of the command execution. + * @type string $pod + * The name of the pod where the command is executed. + * @type string $pod_namespace + * The namespace of the pod where the command is executed. + * @type bool $force + * If true, the execution is terminated forcefully (SIGKILL). If false, the + * execution is stopped gracefully, giving it time for cleanup. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); + parent::__construct($data); + } + + /** + * The resource name of the environment in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}". + * + * Generated from protobuf field string environment = 1; + * @return string + */ + public function getEnvironment() + { + return $this->environment; + } + + /** + * The resource name of the environment in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}". + * + * Generated from protobuf field string environment = 1; + * @param string $var + * @return $this + */ + public function setEnvironment($var) + { + GPBUtil::checkString($var, True); + $this->environment = $var; + + return $this; + } + + /** + * The unique ID of the command execution. + * + * Generated from protobuf field string execution_id = 2; + * @return string + */ + public function getExecutionId() + { + return $this->execution_id; + } + + /** + * The unique ID of the command execution. + * + * Generated from protobuf field string execution_id = 2; + * @param string $var + * @return $this + */ + public function setExecutionId($var) + { + GPBUtil::checkString($var, True); + $this->execution_id = $var; + + return $this; + } + + /** + * The name of the pod where the command is executed. + * + * Generated from protobuf field string pod = 3; + * @return string + */ + public function getPod() + { + return $this->pod; + } + + /** + * The name of the pod where the command is executed. + * + * Generated from protobuf field string pod = 3; + * @param string $var + * @return $this + */ + public function setPod($var) + { + GPBUtil::checkString($var, True); + $this->pod = $var; + + return $this; + } + + /** + * The namespace of the pod where the command is executed. + * + * Generated from protobuf field string pod_namespace = 4; + * @return string + */ + public function getPodNamespace() + { + return $this->pod_namespace; + } + + /** + * The namespace of the pod where the command is executed. + * + * Generated from protobuf field string pod_namespace = 4; + * @param string $var + * @return $this + */ + public function setPodNamespace($var) + { + GPBUtil::checkString($var, True); + $this->pod_namespace = $var; + + return $this; + } + + /** + * If true, the execution is terminated forcefully (SIGKILL). If false, the + * execution is stopped gracefully, giving it time for cleanup. + * + * Generated from protobuf field bool force = 5; + * @return bool + */ + public function getForce() + { + return $this->force; + } + + /** + * If true, the execution is terminated forcefully (SIGKILL). If false, the + * execution is stopped gracefully, giving it time for cleanup. + * + * Generated from protobuf field bool force = 5; + * @param bool $var + * @return $this + */ + public function setForce($var) + { + GPBUtil::checkBool($var); + $this->force = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/StopAirflowCommandResponse.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/StopAirflowCommandResponse.php new file mode 100644 index 000000000000..89e52c6e0492 --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/StopAirflowCommandResponse.php @@ -0,0 +1,101 @@ +google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse + */ +class StopAirflowCommandResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Whether the execution is still running. + * + * Generated from protobuf field bool is_done = 1; + */ + protected $is_done = false; + /** + * Output message from stopping execution request. + * + * Generated from protobuf field repeated string output = 2; + */ + private $output; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $is_done + * Whether the execution is still running. + * @type array|\Google\Protobuf\Internal\RepeatedField $output + * Output message from stopping execution request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); + parent::__construct($data); + } + + /** + * Whether the execution is still running. + * + * Generated from protobuf field bool is_done = 1; + * @return bool + */ + public function getIsDone() + { + return $this->is_done; + } + + /** + * Whether the execution is still running. + * + * Generated from protobuf field bool is_done = 1; + * @param bool $var + * @return $this + */ + public function setIsDone($var) + { + GPBUtil::checkBool($var); + $this->is_done = $var; + + return $this; + } + + /** + * Output message from stopping execution request. + * + * Generated from protobuf field repeated string output = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getOutput() + { + return $this->output; + } + + /** + * Output message from stopping execution request. + * + * Generated from protobuf field repeated string output = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setOutput($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->output = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/StorageConfig.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/StorageConfig.php new file mode 100644 index 000000000000..20976333720f --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/StorageConfig.php @@ -0,0 +1,71 @@ +google.cloud.orchestration.airflow.service.v1.StorageConfig + */ +class StorageConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The name of the Cloud Storage bucket used by the environment. No + * `gs://` prefix. + * + * Generated from protobuf field string bucket = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $bucket = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $bucket + * Optional. The name of the Cloud Storage bucket used by the environment. No + * `gs://` prefix. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The name of the Cloud Storage bucket used by the environment. No + * `gs://` prefix. + * + * Generated from protobuf field string bucket = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getBucket() + { + return $this->bucket; + } + + /** + * Optional. The name of the Cloud Storage bucket used by the environment. No + * `gs://` prefix. + * + * Generated from protobuf field string bucket = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setBucket($var) + { + GPBUtil::checkString($var, True); + $this->bucket = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/TaskLogsRetentionConfig.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/TaskLogsRetentionConfig.php new file mode 100644 index 000000000000..bd0d655b9bd1 --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/TaskLogsRetentionConfig.php @@ -0,0 +1,67 @@ +google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig + */ +class TaskLogsRetentionConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The mode of storage for Airflow workers task logs. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig.TaskLogsStorageMode storage_mode = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $storage_mode = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $storage_mode + * Optional. The mode of storage for Airflow workers task logs. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The mode of storage for Airflow workers task logs. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig.TaskLogsStorageMode storage_mode = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getStorageMode() + { + return $this->storage_mode; + } + + /** + * Optional. The mode of storage for Airflow workers task logs. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig.TaskLogsStorageMode storage_mode = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setStorageMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Orchestration\Airflow\Service\V1\TaskLogsRetentionConfig\TaskLogsStorageMode::class); + $this->storage_mode = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/TaskLogsRetentionConfig/TaskLogsStorageMode.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/TaskLogsRetentionConfig/TaskLogsStorageMode.php new file mode 100644 index 000000000000..1f4db54b8b6b --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/TaskLogsRetentionConfig/TaskLogsStorageMode.php @@ -0,0 +1,65 @@ +google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig.TaskLogsStorageMode + */ +class TaskLogsStorageMode +{ + /** + * This configuration is not specified by the user. + * + * Generated from protobuf enum TASK_LOGS_STORAGE_MODE_UNSPECIFIED = 0; + */ + const TASK_LOGS_STORAGE_MODE_UNSPECIFIED = 0; + /** + * Store task logs in Cloud Logging and in the environment's Cloud Storage + * bucket. + * + * Generated from protobuf enum CLOUD_LOGGING_AND_CLOUD_STORAGE = 1; + */ + const CLOUD_LOGGING_AND_CLOUD_STORAGE = 1; + /** + * Store task logs in Cloud Logging only. + * + * Generated from protobuf enum CLOUD_LOGGING_ONLY = 2; + */ + const CLOUD_LOGGING_ONLY = 2; + + private static $valueToName = [ + self::TASK_LOGS_STORAGE_MODE_UNSPECIFIED => 'TASK_LOGS_STORAGE_MODE_UNSPECIFIED', + self::CLOUD_LOGGING_AND_CLOUD_STORAGE => 'CLOUD_LOGGING_AND_CLOUD_STORAGE', + self::CLOUD_LOGGING_ONLY => 'CLOUD_LOGGING_ONLY', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(TaskLogsStorageMode::class, \Google\Cloud\Orchestration\Airflow\Service\V1\TaskLogsRetentionConfig_TaskLogsStorageMode::class); + diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/UpdateEnvironmentRequest.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/UpdateEnvironmentRequest.php new file mode 100644 index 000000000000..5dc8e78f5eef --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/UpdateEnvironmentRequest.php @@ -0,0 +1,756 @@ +google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest + */ +class UpdateEnvironmentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The relative resource name of the environment to update, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * + * Generated from protobuf field string name = 2; + */ + protected $name = ''; + /** + * A patch environment. Fields specified by the `updateMask` will be copied + * from the patch environment into the environment under update. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.Environment environment = 1; + */ + protected $environment = null; + /** + * Required. A comma-separated list of paths, relative to `Environment`, of + * fields to update. + * For example, to set the version of scikit-learn to install in the + * environment to 0.19.0 and to remove an existing installation of + * numpy, the `updateMask` parameter would include the following two + * `paths` values: "config.softwareConfig.pypiPackages.scikit-learn" and + * "config.softwareConfig.pypiPackages.numpy". The included patch + * environment would specify the scikit-learn version as follows: + * { + * "config":{ + * "softwareConfig":{ + * "pypiPackages":{ + * "scikit-learn":"==0.19.0" + * } + * } + * } + * } + * Note that in the above example, any existing PyPI packages + * other than scikit-learn and numpy will be unaffected. + * Only one update type may be included in a single request's `updateMask`. + * For example, one cannot update both the PyPI packages and + * labels in the same request. However, it is possible to update multiple + * members of a map field simultaneously in the same request. For example, + * to set the labels "label1" and "label2" while clearing "label3" (assuming + * it already exists), one can + * provide the paths "labels.label1", "labels.label2", and "labels.label3" + * and populate the patch environment as follows: + * { + * "labels":{ + * "label1":"new-label1-value" + * "label2":"new-label2-value" + * } + * } + * Note that in the above example, any existing labels that are not + * included in the `updateMask` will be unaffected. + * It is also possible to replace an entire map field by providing the + * map field's path in the `updateMask`. The new value of the field will + * be that which is provided in the patch environment. For example, to + * delete all pre-existing user-specified PyPI packages and + * install botocore at version 1.7.14, the `updateMask` would contain + * the path "config.softwareConfig.pypiPackages", and + * the patch environment would be the following: + * { + * "config":{ + * "softwareConfig":{ + * "pypiPackages":{ + * "botocore":"==1.7.14" + * } + * } + * } + * } + * **Note:** Only the following fields can be updated: + * * `config.softwareConfig.pypiPackages` + * * Replace all custom custom PyPI packages. If a replacement + * package map is not included in `environment`, all custom + * PyPI packages are cleared. It is an error to provide both + * this mask and a mask specifying an individual package. + * * `config.softwareConfig.pypiPackages.`packagename + * * Update the custom PyPI package *packagename*, + * preserving other packages. To delete the package, include it in + * `updateMask`, and omit the mapping for it in + * `environment.config.softwareConfig.pypiPackages`. It is an error + * to provide both a mask of this form and the + * `config.softwareConfig.pypiPackages` mask. + * * `labels` + * * Replace all environment labels. If a replacement labels map is not + * included in `environment`, all labels are cleared. It is an error to + * provide both this mask and a mask specifying one or more individual + * labels. + * * `labels.`labelName + * * Set the label named *labelName*, while preserving other + * labels. To delete the label, include it in `updateMask` and omit its + * mapping in `environment.labels`. It is an error to provide both a + * mask of this form and the `labels` mask. + * * `config.nodeCount` + * * Horizontally scale the number of nodes in the environment. An integer + * greater than or equal to 3 must be provided in the `config.nodeCount` + * field. Supported for Cloud Composer environments in versions + * composer-1.*.*-airflow-*.*.*. + * * `config.webServerNetworkAccessControl` + * * Replace the environment's current `WebServerNetworkAccessControl`. + * * `config.softwareConfig.airflowConfigOverrides` + * * Replace all Apache Airflow config overrides. If a replacement config + * overrides map is not included in `environment`, all config overrides + * are cleared. + * It is an error to provide both this mask and a mask specifying one or + * more individual config overrides. + * * `config.softwareConfig.airflowConfigOverrides.`section-name + * * Override the Apache Airflow config property *name* in the + * section named *section*, preserving other properties. To + * delete the property override, include it in `updateMask` and omit its + * mapping in + * `environment.config.softwareConfig.airflowConfigOverrides`. + * It is an error to provide both a mask of this form and the + * `config.softwareConfig.airflowConfigOverrides` mask. + * * `config.softwareConfig.envVariables` + * * Replace all environment variables. If a replacement environment + * variable map is not included in `environment`, all custom environment + * variables are cleared. + * * `config.softwareConfig.schedulerCount` + * * Horizontally scale the number of schedulers in Airflow. A positive + * integer not greater than the number of nodes must be provided in the + * `config.softwareConfig.schedulerCount` field. Supported for Cloud + * Composer environments in versions composer-1.*.*-airflow-2.*.*. + * * `config.databaseConfig.machineType` + * * Cloud SQL machine type used by Airflow database. + * It has to be one of: db-n1-standard-2, db-n1-standard-4, + * db-n1-standard-8 or db-n1-standard-16. Supported for Cloud Composer + * environments in versions composer-1.*.*-airflow-*.*.*. + * * `config.webServerConfig.machineType` + * * Machine type on which Airflow web server is running. + * It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4 + * or composer-n1-webserver-8. Supported for Cloud Composer environments + * in versions composer-1.*.*-airflow-*.*.*. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3; + */ + protected $update_mask = null; + + /** + * @param string $name The relative resource name of the environment to update, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * @param \Google\Cloud\Orchestration\Airflow\Service\V1\Environment $environment A patch environment. Fields specified by the `updateMask` will be copied + * from the patch environment into the environment under update. + * @param \Google\Protobuf\FieldMask $updateMask Required. A comma-separated list of paths, relative to `Environment`, of + * fields to update. + * For example, to set the version of scikit-learn to install in the + * environment to 0.19.0 and to remove an existing installation of + * numpy, the `updateMask` parameter would include the following two + * `paths` values: "config.softwareConfig.pypiPackages.scikit-learn" and + * "config.softwareConfig.pypiPackages.numpy". The included patch + * environment would specify the scikit-learn version as follows: + * + * { + * "config":{ + * "softwareConfig":{ + * "pypiPackages":{ + * "scikit-learn":"==0.19.0" + * } + * } + * } + * } + * + * Note that in the above example, any existing PyPI packages + * other than scikit-learn and numpy will be unaffected. + * + * Only one update type may be included in a single request's `updateMask`. + * For example, one cannot update both the PyPI packages and + * labels in the same request. However, it is possible to update multiple + * members of a map field simultaneously in the same request. For example, + * to set the labels "label1" and "label2" while clearing "label3" (assuming + * it already exists), one can + * provide the paths "labels.label1", "labels.label2", and "labels.label3" + * and populate the patch environment as follows: + * + * { + * "labels":{ + * "label1":"new-label1-value" + * "label2":"new-label2-value" + * } + * } + * + * Note that in the above example, any existing labels that are not + * included in the `updateMask` will be unaffected. + * + * It is also possible to replace an entire map field by providing the + * map field's path in the `updateMask`. The new value of the field will + * be that which is provided in the patch environment. For example, to + * delete all pre-existing user-specified PyPI packages and + * install botocore at version 1.7.14, the `updateMask` would contain + * the path "config.softwareConfig.pypiPackages", and + * the patch environment would be the following: + * + * { + * "config":{ + * "softwareConfig":{ + * "pypiPackages":{ + * "botocore":"==1.7.14" + * } + * } + * } + * } + * + * **Note:** Only the following fields can be updated: + * + * * `config.softwareConfig.pypiPackages` + * * Replace all custom custom PyPI packages. If a replacement + * package map is not included in `environment`, all custom + * PyPI packages are cleared. It is an error to provide both + * this mask and a mask specifying an individual package. + * * `config.softwareConfig.pypiPackages.`packagename + * * Update the custom PyPI package *packagename*, + * preserving other packages. To delete the package, include it in + * `updateMask`, and omit the mapping for it in + * `environment.config.softwareConfig.pypiPackages`. It is an error + * to provide both a mask of this form and the + * `config.softwareConfig.pypiPackages` mask. + * * `labels` + * * Replace all environment labels. If a replacement labels map is not + * included in `environment`, all labels are cleared. It is an error to + * provide both this mask and a mask specifying one or more individual + * labels. + * * `labels.`labelName + * * Set the label named *labelName*, while preserving other + * labels. To delete the label, include it in `updateMask` and omit its + * mapping in `environment.labels`. It is an error to provide both a + * mask of this form and the `labels` mask. + * * `config.nodeCount` + * * Horizontally scale the number of nodes in the environment. An integer + * greater than or equal to 3 must be provided in the `config.nodeCount` + * field. Supported for Cloud Composer environments in versions + * composer-1.*.*-airflow-*.*.*. + * * `config.webServerNetworkAccessControl` + * * Replace the environment's current `WebServerNetworkAccessControl`. + * * `config.softwareConfig.airflowConfigOverrides` + * * Replace all Apache Airflow config overrides. If a replacement config + * overrides map is not included in `environment`, all config overrides + * are cleared. + * It is an error to provide both this mask and a mask specifying one or + * more individual config overrides. + * * `config.softwareConfig.airflowConfigOverrides.`section-name + * * Override the Apache Airflow config property *name* in the + * section named *section*, preserving other properties. To + * delete the property override, include it in `updateMask` and omit its + * mapping in + * `environment.config.softwareConfig.airflowConfigOverrides`. + * It is an error to provide both a mask of this form and the + * `config.softwareConfig.airflowConfigOverrides` mask. + * * `config.softwareConfig.envVariables` + * * Replace all environment variables. If a replacement environment + * variable map is not included in `environment`, all custom environment + * variables are cleared. + * * `config.softwareConfig.schedulerCount` + * * Horizontally scale the number of schedulers in Airflow. A positive + * integer not greater than the number of nodes must be provided in the + * `config.softwareConfig.schedulerCount` field. Supported for Cloud + * Composer environments in versions composer-1.*.*-airflow-2.*.*. + * * `config.databaseConfig.machineType` + * * Cloud SQL machine type used by Airflow database. + * It has to be one of: db-n1-standard-2, db-n1-standard-4, + * db-n1-standard-8 or db-n1-standard-16. Supported for Cloud Composer + * environments in versions composer-1.*.*-airflow-*.*.*. + * * `config.webServerConfig.machineType` + * * Machine type on which Airflow web server is running. + * It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4 + * or composer-n1-webserver-8. Supported for Cloud Composer environments + * in versions composer-1.*.*-airflow-*.*.*. + * + * @return \Google\Cloud\Orchestration\Airflow\Service\V1\UpdateEnvironmentRequest + * + * @experimental + */ + public static function build(string $name, \Google\Cloud\Orchestration\Airflow\Service\V1\Environment $environment, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setName($name) + ->setEnvironment($environment) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The relative resource name of the environment to update, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * @type \Google\Cloud\Orchestration\Airflow\Service\V1\Environment $environment + * A patch environment. Fields specified by the `updateMask` will be copied + * from the patch environment into the environment under update. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. A comma-separated list of paths, relative to `Environment`, of + * fields to update. + * For example, to set the version of scikit-learn to install in the + * environment to 0.19.0 and to remove an existing installation of + * numpy, the `updateMask` parameter would include the following two + * `paths` values: "config.softwareConfig.pypiPackages.scikit-learn" and + * "config.softwareConfig.pypiPackages.numpy". The included patch + * environment would specify the scikit-learn version as follows: + * { + * "config":{ + * "softwareConfig":{ + * "pypiPackages":{ + * "scikit-learn":"==0.19.0" + * } + * } + * } + * } + * Note that in the above example, any existing PyPI packages + * other than scikit-learn and numpy will be unaffected. + * Only one update type may be included in a single request's `updateMask`. + * For example, one cannot update both the PyPI packages and + * labels in the same request. However, it is possible to update multiple + * members of a map field simultaneously in the same request. For example, + * to set the labels "label1" and "label2" while clearing "label3" (assuming + * it already exists), one can + * provide the paths "labels.label1", "labels.label2", and "labels.label3" + * and populate the patch environment as follows: + * { + * "labels":{ + * "label1":"new-label1-value" + * "label2":"new-label2-value" + * } + * } + * Note that in the above example, any existing labels that are not + * included in the `updateMask` will be unaffected. + * It is also possible to replace an entire map field by providing the + * map field's path in the `updateMask`. The new value of the field will + * be that which is provided in the patch environment. For example, to + * delete all pre-existing user-specified PyPI packages and + * install botocore at version 1.7.14, the `updateMask` would contain + * the path "config.softwareConfig.pypiPackages", and + * the patch environment would be the following: + * { + * "config":{ + * "softwareConfig":{ + * "pypiPackages":{ + * "botocore":"==1.7.14" + * } + * } + * } + * } + * **Note:** Only the following fields can be updated: + * * `config.softwareConfig.pypiPackages` + * * Replace all custom custom PyPI packages. If a replacement + * package map is not included in `environment`, all custom + * PyPI packages are cleared. It is an error to provide both + * this mask and a mask specifying an individual package. + * * `config.softwareConfig.pypiPackages.`packagename + * * Update the custom PyPI package *packagename*, + * preserving other packages. To delete the package, include it in + * `updateMask`, and omit the mapping for it in + * `environment.config.softwareConfig.pypiPackages`. It is an error + * to provide both a mask of this form and the + * `config.softwareConfig.pypiPackages` mask. + * * `labels` + * * Replace all environment labels. If a replacement labels map is not + * included in `environment`, all labels are cleared. It is an error to + * provide both this mask and a mask specifying one or more individual + * labels. + * * `labels.`labelName + * * Set the label named *labelName*, while preserving other + * labels. To delete the label, include it in `updateMask` and omit its + * mapping in `environment.labels`. It is an error to provide both a + * mask of this form and the `labels` mask. + * * `config.nodeCount` + * * Horizontally scale the number of nodes in the environment. An integer + * greater than or equal to 3 must be provided in the `config.nodeCount` + * field. Supported for Cloud Composer environments in versions + * composer-1.*.*-airflow-*.*.*. + * * `config.webServerNetworkAccessControl` + * * Replace the environment's current `WebServerNetworkAccessControl`. + * * `config.softwareConfig.airflowConfigOverrides` + * * Replace all Apache Airflow config overrides. If a replacement config + * overrides map is not included in `environment`, all config overrides + * are cleared. + * It is an error to provide both this mask and a mask specifying one or + * more individual config overrides. + * * `config.softwareConfig.airflowConfigOverrides.`section-name + * * Override the Apache Airflow config property *name* in the + * section named *section*, preserving other properties. To + * delete the property override, include it in `updateMask` and omit its + * mapping in + * `environment.config.softwareConfig.airflowConfigOverrides`. + * It is an error to provide both a mask of this form and the + * `config.softwareConfig.airflowConfigOverrides` mask. + * * `config.softwareConfig.envVariables` + * * Replace all environment variables. If a replacement environment + * variable map is not included in `environment`, all custom environment + * variables are cleared. + * * `config.softwareConfig.schedulerCount` + * * Horizontally scale the number of schedulers in Airflow. A positive + * integer not greater than the number of nodes must be provided in the + * `config.softwareConfig.schedulerCount` field. Supported for Cloud + * Composer environments in versions composer-1.*.*-airflow-2.*.*. + * * `config.databaseConfig.machineType` + * * Cloud SQL machine type used by Airflow database. + * It has to be one of: db-n1-standard-2, db-n1-standard-4, + * db-n1-standard-8 or db-n1-standard-16. Supported for Cloud Composer + * environments in versions composer-1.*.*-airflow-*.*.*. + * * `config.webServerConfig.machineType` + * * Machine type on which Airflow web server is running. + * It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4 + * or composer-n1-webserver-8. Supported for Cloud Composer environments + * in versions composer-1.*.*-airflow-*.*.*. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); + parent::__construct($data); + } + + /** + * The relative resource name of the environment to update, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * + * Generated from protobuf field string name = 2; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The relative resource name of the environment to update, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * + * Generated from protobuf field string name = 2; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * A patch environment. Fields specified by the `updateMask` will be copied + * from the patch environment into the environment under update. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.Environment environment = 1; + * @return \Google\Cloud\Orchestration\Airflow\Service\V1\Environment|null + */ + public function getEnvironment() + { + return $this->environment; + } + + public function hasEnvironment() + { + return isset($this->environment); + } + + public function clearEnvironment() + { + unset($this->environment); + } + + /** + * A patch environment. Fields specified by the `updateMask` will be copied + * from the patch environment into the environment under update. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.Environment environment = 1; + * @param \Google\Cloud\Orchestration\Airflow\Service\V1\Environment $var + * @return $this + */ + public function setEnvironment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Orchestration\Airflow\Service\V1\Environment::class); + $this->environment = $var; + + return $this; + } + + /** + * Required. A comma-separated list of paths, relative to `Environment`, of + * fields to update. + * For example, to set the version of scikit-learn to install in the + * environment to 0.19.0 and to remove an existing installation of + * numpy, the `updateMask` parameter would include the following two + * `paths` values: "config.softwareConfig.pypiPackages.scikit-learn" and + * "config.softwareConfig.pypiPackages.numpy". The included patch + * environment would specify the scikit-learn version as follows: + * { + * "config":{ + * "softwareConfig":{ + * "pypiPackages":{ + * "scikit-learn":"==0.19.0" + * } + * } + * } + * } + * Note that in the above example, any existing PyPI packages + * other than scikit-learn and numpy will be unaffected. + * Only one update type may be included in a single request's `updateMask`. + * For example, one cannot update both the PyPI packages and + * labels in the same request. However, it is possible to update multiple + * members of a map field simultaneously in the same request. For example, + * to set the labels "label1" and "label2" while clearing "label3" (assuming + * it already exists), one can + * provide the paths "labels.label1", "labels.label2", and "labels.label3" + * and populate the patch environment as follows: + * { + * "labels":{ + * "label1":"new-label1-value" + * "label2":"new-label2-value" + * } + * } + * Note that in the above example, any existing labels that are not + * included in the `updateMask` will be unaffected. + * It is also possible to replace an entire map field by providing the + * map field's path in the `updateMask`. The new value of the field will + * be that which is provided in the patch environment. For example, to + * delete all pre-existing user-specified PyPI packages and + * install botocore at version 1.7.14, the `updateMask` would contain + * the path "config.softwareConfig.pypiPackages", and + * the patch environment would be the following: + * { + * "config":{ + * "softwareConfig":{ + * "pypiPackages":{ + * "botocore":"==1.7.14" + * } + * } + * } + * } + * **Note:** Only the following fields can be updated: + * * `config.softwareConfig.pypiPackages` + * * Replace all custom custom PyPI packages. If a replacement + * package map is not included in `environment`, all custom + * PyPI packages are cleared. It is an error to provide both + * this mask and a mask specifying an individual package. + * * `config.softwareConfig.pypiPackages.`packagename + * * Update the custom PyPI package *packagename*, + * preserving other packages. To delete the package, include it in + * `updateMask`, and omit the mapping for it in + * `environment.config.softwareConfig.pypiPackages`. It is an error + * to provide both a mask of this form and the + * `config.softwareConfig.pypiPackages` mask. + * * `labels` + * * Replace all environment labels. If a replacement labels map is not + * included in `environment`, all labels are cleared. It is an error to + * provide both this mask and a mask specifying one or more individual + * labels. + * * `labels.`labelName + * * Set the label named *labelName*, while preserving other + * labels. To delete the label, include it in `updateMask` and omit its + * mapping in `environment.labels`. It is an error to provide both a + * mask of this form and the `labels` mask. + * * `config.nodeCount` + * * Horizontally scale the number of nodes in the environment. An integer + * greater than or equal to 3 must be provided in the `config.nodeCount` + * field. Supported for Cloud Composer environments in versions + * composer-1.*.*-airflow-*.*.*. + * * `config.webServerNetworkAccessControl` + * * Replace the environment's current `WebServerNetworkAccessControl`. + * * `config.softwareConfig.airflowConfigOverrides` + * * Replace all Apache Airflow config overrides. If a replacement config + * overrides map is not included in `environment`, all config overrides + * are cleared. + * It is an error to provide both this mask and a mask specifying one or + * more individual config overrides. + * * `config.softwareConfig.airflowConfigOverrides.`section-name + * * Override the Apache Airflow config property *name* in the + * section named *section*, preserving other properties. To + * delete the property override, include it in `updateMask` and omit its + * mapping in + * `environment.config.softwareConfig.airflowConfigOverrides`. + * It is an error to provide both a mask of this form and the + * `config.softwareConfig.airflowConfigOverrides` mask. + * * `config.softwareConfig.envVariables` + * * Replace all environment variables. If a replacement environment + * variable map is not included in `environment`, all custom environment + * variables are cleared. + * * `config.softwareConfig.schedulerCount` + * * Horizontally scale the number of schedulers in Airflow. A positive + * integer not greater than the number of nodes must be provided in the + * `config.softwareConfig.schedulerCount` field. Supported for Cloud + * Composer environments in versions composer-1.*.*-airflow-2.*.*. + * * `config.databaseConfig.machineType` + * * Cloud SQL machine type used by Airflow database. + * It has to be one of: db-n1-standard-2, db-n1-standard-4, + * db-n1-standard-8 or db-n1-standard-16. Supported for Cloud Composer + * environments in versions composer-1.*.*-airflow-*.*.*. + * * `config.webServerConfig.machineType` + * * Machine type on which Airflow web server is running. + * It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4 + * or composer-n1-webserver-8. Supported for Cloud Composer environments + * in versions composer-1.*.*-airflow-*.*.*. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. A comma-separated list of paths, relative to `Environment`, of + * fields to update. + * For example, to set the version of scikit-learn to install in the + * environment to 0.19.0 and to remove an existing installation of + * numpy, the `updateMask` parameter would include the following two + * `paths` values: "config.softwareConfig.pypiPackages.scikit-learn" and + * "config.softwareConfig.pypiPackages.numpy". The included patch + * environment would specify the scikit-learn version as follows: + * { + * "config":{ + * "softwareConfig":{ + * "pypiPackages":{ + * "scikit-learn":"==0.19.0" + * } + * } + * } + * } + * Note that in the above example, any existing PyPI packages + * other than scikit-learn and numpy will be unaffected. + * Only one update type may be included in a single request's `updateMask`. + * For example, one cannot update both the PyPI packages and + * labels in the same request. However, it is possible to update multiple + * members of a map field simultaneously in the same request. For example, + * to set the labels "label1" and "label2" while clearing "label3" (assuming + * it already exists), one can + * provide the paths "labels.label1", "labels.label2", and "labels.label3" + * and populate the patch environment as follows: + * { + * "labels":{ + * "label1":"new-label1-value" + * "label2":"new-label2-value" + * } + * } + * Note that in the above example, any existing labels that are not + * included in the `updateMask` will be unaffected. + * It is also possible to replace an entire map field by providing the + * map field's path in the `updateMask`. The new value of the field will + * be that which is provided in the patch environment. For example, to + * delete all pre-existing user-specified PyPI packages and + * install botocore at version 1.7.14, the `updateMask` would contain + * the path "config.softwareConfig.pypiPackages", and + * the patch environment would be the following: + * { + * "config":{ + * "softwareConfig":{ + * "pypiPackages":{ + * "botocore":"==1.7.14" + * } + * } + * } + * } + * **Note:** Only the following fields can be updated: + * * `config.softwareConfig.pypiPackages` + * * Replace all custom custom PyPI packages. If a replacement + * package map is not included in `environment`, all custom + * PyPI packages are cleared. It is an error to provide both + * this mask and a mask specifying an individual package. + * * `config.softwareConfig.pypiPackages.`packagename + * * Update the custom PyPI package *packagename*, + * preserving other packages. To delete the package, include it in + * `updateMask`, and omit the mapping for it in + * `environment.config.softwareConfig.pypiPackages`. It is an error + * to provide both a mask of this form and the + * `config.softwareConfig.pypiPackages` mask. + * * `labels` + * * Replace all environment labels. If a replacement labels map is not + * included in `environment`, all labels are cleared. It is an error to + * provide both this mask and a mask specifying one or more individual + * labels. + * * `labels.`labelName + * * Set the label named *labelName*, while preserving other + * labels. To delete the label, include it in `updateMask` and omit its + * mapping in `environment.labels`. It is an error to provide both a + * mask of this form and the `labels` mask. + * * `config.nodeCount` + * * Horizontally scale the number of nodes in the environment. An integer + * greater than or equal to 3 must be provided in the `config.nodeCount` + * field. Supported for Cloud Composer environments in versions + * composer-1.*.*-airflow-*.*.*. + * * `config.webServerNetworkAccessControl` + * * Replace the environment's current `WebServerNetworkAccessControl`. + * * `config.softwareConfig.airflowConfigOverrides` + * * Replace all Apache Airflow config overrides. If a replacement config + * overrides map is not included in `environment`, all config overrides + * are cleared. + * It is an error to provide both this mask and a mask specifying one or + * more individual config overrides. + * * `config.softwareConfig.airflowConfigOverrides.`section-name + * * Override the Apache Airflow config property *name* in the + * section named *section*, preserving other properties. To + * delete the property override, include it in `updateMask` and omit its + * mapping in + * `environment.config.softwareConfig.airflowConfigOverrides`. + * It is an error to provide both a mask of this form and the + * `config.softwareConfig.airflowConfigOverrides` mask. + * * `config.softwareConfig.envVariables` + * * Replace all environment variables. If a replacement environment + * variable map is not included in `environment`, all custom environment + * variables are cleared. + * * `config.softwareConfig.schedulerCount` + * * Horizontally scale the number of schedulers in Airflow. A positive + * integer not greater than the number of nodes must be provided in the + * `config.softwareConfig.schedulerCount` field. Supported for Cloud + * Composer environments in versions composer-1.*.*-airflow-2.*.*. + * * `config.databaseConfig.machineType` + * * Cloud SQL machine type used by Airflow database. + * It has to be one of: db-n1-standard-2, db-n1-standard-4, + * db-n1-standard-8 or db-n1-standard-16. Supported for Cloud Composer + * environments in versions composer-1.*.*-airflow-*.*.*. + * * `config.webServerConfig.machineType` + * * Machine type on which Airflow web server is running. + * It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4 + * or composer-n1-webserver-8. Supported for Cloud Composer environments + * in versions composer-1.*.*-airflow-*.*.*. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/UpdateUserWorkloadsConfigMapRequest.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/UpdateUserWorkloadsConfigMapRequest.php new file mode 100644 index 000000000000..7da8153668e4 --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/UpdateUserWorkloadsConfigMapRequest.php @@ -0,0 +1,90 @@ +google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsConfigMapRequest + */ +class UpdateUserWorkloadsConfigMapRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. User workloads ConfigMap to override. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap user_workloads_config_map = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $user_workloads_config_map = null; + + /** + * @param \Google\Cloud\Orchestration\Airflow\Service\V1\UserWorkloadsConfigMap $userWorkloadsConfigMap Optional. User workloads ConfigMap to override. + * + * @return \Google\Cloud\Orchestration\Airflow\Service\V1\UpdateUserWorkloadsConfigMapRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Orchestration\Airflow\Service\V1\UserWorkloadsConfigMap $userWorkloadsConfigMap): self + { + return (new self()) + ->setUserWorkloadsConfigMap($userWorkloadsConfigMap); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Orchestration\Airflow\Service\V1\UserWorkloadsConfigMap $user_workloads_config_map + * Optional. User workloads ConfigMap to override. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); + parent::__construct($data); + } + + /** + * Optional. User workloads ConfigMap to override. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap user_workloads_config_map = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Orchestration\Airflow\Service\V1\UserWorkloadsConfigMap|null + */ + public function getUserWorkloadsConfigMap() + { + return $this->user_workloads_config_map; + } + + public function hasUserWorkloadsConfigMap() + { + return isset($this->user_workloads_config_map); + } + + public function clearUserWorkloadsConfigMap() + { + unset($this->user_workloads_config_map); + } + + /** + * Optional. User workloads ConfigMap to override. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap user_workloads_config_map = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Orchestration\Airflow\Service\V1\UserWorkloadsConfigMap $var + * @return $this + */ + public function setUserWorkloadsConfigMap($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Orchestration\Airflow\Service\V1\UserWorkloadsConfigMap::class); + $this->user_workloads_config_map = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/UpdateUserWorkloadsSecretRequest.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/UpdateUserWorkloadsSecretRequest.php new file mode 100644 index 000000000000..66845f93f36b --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/UpdateUserWorkloadsSecretRequest.php @@ -0,0 +1,90 @@ +google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsSecretRequest + */ +class UpdateUserWorkloadsSecretRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. User workloads Secret to override. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret user_workloads_secret = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $user_workloads_secret = null; + + /** + * @param \Google\Cloud\Orchestration\Airflow\Service\V1\UserWorkloadsSecret $userWorkloadsSecret Optional. User workloads Secret to override. + * + * @return \Google\Cloud\Orchestration\Airflow\Service\V1\UpdateUserWorkloadsSecretRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Orchestration\Airflow\Service\V1\UserWorkloadsSecret $userWorkloadsSecret): self + { + return (new self()) + ->setUserWorkloadsSecret($userWorkloadsSecret); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Orchestration\Airflow\Service\V1\UserWorkloadsSecret $user_workloads_secret + * Optional. User workloads Secret to override. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); + parent::__construct($data); + } + + /** + * Optional. User workloads Secret to override. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret user_workloads_secret = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Orchestration\Airflow\Service\V1\UserWorkloadsSecret|null + */ + public function getUserWorkloadsSecret() + { + return $this->user_workloads_secret; + } + + public function hasUserWorkloadsSecret() + { + return isset($this->user_workloads_secret); + } + + public function clearUserWorkloadsSecret() + { + unset($this->user_workloads_secret); + } + + /** + * Optional. User workloads Secret to override. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret user_workloads_secret = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Orchestration\Airflow\Service\V1\UserWorkloadsSecret $var + * @return $this + */ + public function setUserWorkloadsSecret($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Orchestration\Airflow\Service\V1\UserWorkloadsSecret::class); + $this->user_workloads_secret = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/UserWorkloadsConfigMap.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/UserWorkloadsConfigMap.php new file mode 100644 index 000000000000..942b7506ece2 --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/UserWorkloadsConfigMap.php @@ -0,0 +1,134 @@ +google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap + */ +class UserWorkloadsConfigMap extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The resource name of the ConfigMap, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsConfigMaps/{userWorkloadsConfigMapId}" + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Optional. The "data" field of Kubernetes ConfigMap, organized in key-value + * pairs. For details see: + * https://kubernetes.io/docs/concepts/configuration/configmap/ + * Example: + * { + * "example_key": "example_value", + * "another_key": "another_value" + * } + * + * Generated from protobuf field map data = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $data; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The resource name of the ConfigMap, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsConfigMaps/{userWorkloadsConfigMapId}" + * @type array|\Google\Protobuf\Internal\MapField $data + * Optional. The "data" field of Kubernetes ConfigMap, organized in key-value + * pairs. For details see: + * https://kubernetes.io/docs/concepts/configuration/configmap/ + * Example: + * { + * "example_key": "example_value", + * "another_key": "another_value" + * } + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The resource name of the ConfigMap, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsConfigMaps/{userWorkloadsConfigMapId}" + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The resource name of the ConfigMap, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsConfigMaps/{userWorkloadsConfigMapId}" + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. The "data" field of Kubernetes ConfigMap, organized in key-value + * pairs. For details see: + * https://kubernetes.io/docs/concepts/configuration/configmap/ + * Example: + * { + * "example_key": "example_value", + * "another_key": "another_value" + * } + * + * Generated from protobuf field map data = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getData() + { + return $this->data; + } + + /** + * Optional. The "data" field of Kubernetes ConfigMap, organized in key-value + * pairs. For details see: + * https://kubernetes.io/docs/concepts/configuration/configmap/ + * Example: + * { + * "example_key": "example_value", + * "another_key": "another_value" + * } + * + * Generated from protobuf field map data = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setData($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->data = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/UserWorkloadsSecret.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/UserWorkloadsSecret.php new file mode 100644 index 000000000000..ff9358356170 --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/UserWorkloadsSecret.php @@ -0,0 +1,138 @@ +google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret + */ +class UserWorkloadsSecret extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The resource name of the Secret, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsSecrets/{userWorkloadsSecretId}" + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Optional. The "data" field of Kubernetes Secret, organized in key-value + * pairs, which can contain sensitive values such as a password, a token, or a + * key. The values for all keys have to be base64-encoded strings. For details + * see: https://kubernetes.io/docs/concepts/configuration/secret/ + * Example: + * { + * "example": "ZXhhbXBsZV92YWx1ZQ==", + * "another-example": "YW5vdGhlcl9leGFtcGxlX3ZhbHVl" + * } + * + * Generated from protobuf field map data = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $data; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The resource name of the Secret, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsSecrets/{userWorkloadsSecretId}" + * @type array|\Google\Protobuf\Internal\MapField $data + * Optional. The "data" field of Kubernetes Secret, organized in key-value + * pairs, which can contain sensitive values such as a password, a token, or a + * key. The values for all keys have to be base64-encoded strings. For details + * see: https://kubernetes.io/docs/concepts/configuration/secret/ + * Example: + * { + * "example": "ZXhhbXBsZV92YWx1ZQ==", + * "another-example": "YW5vdGhlcl9leGFtcGxlX3ZhbHVl" + * } + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The resource name of the Secret, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsSecrets/{userWorkloadsSecretId}" + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The resource name of the Secret, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsSecrets/{userWorkloadsSecretId}" + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. The "data" field of Kubernetes Secret, organized in key-value + * pairs, which can contain sensitive values such as a password, a token, or a + * key. The values for all keys have to be base64-encoded strings. For details + * see: https://kubernetes.io/docs/concepts/configuration/secret/ + * Example: + * { + * "example": "ZXhhbXBsZV92YWx1ZQ==", + * "another-example": "YW5vdGhlcl9leGFtcGxlX3ZhbHVl" + * } + * + * Generated from protobuf field map data = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getData() + { + return $this->data; + } + + /** + * Optional. The "data" field of Kubernetes Secret, organized in key-value + * pairs, which can contain sensitive values such as a password, a token, or a + * key. The values for all keys have to be base64-encoded strings. For details + * see: https://kubernetes.io/docs/concepts/configuration/secret/ + * Example: + * { + * "example": "ZXhhbXBsZV92YWx1ZQ==", + * "another-example": "YW5vdGhlcl9leGFtcGxlX3ZhbHVl" + * } + * + * Generated from protobuf field map data = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setData($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->data = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/WebServerConfig.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/WebServerConfig.php new file mode 100644 index 000000000000..8b4cdd4debb2 --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/WebServerConfig.php @@ -0,0 +1,89 @@ +google.cloud.orchestration.airflow.service.v1.WebServerConfig + */ +class WebServerConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Machine type on which Airflow web server is running. + * It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4 or + * composer-n1-webserver-8. + * If not specified, composer-n1-webserver-2 will be used. + * Value custom is returned only in response, if Airflow web server parameters + * were manually changed to a non-standard values. + * + * Generated from protobuf field string machine_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $machine_type = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $machine_type + * Optional. Machine type on which Airflow web server is running. + * It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4 or + * composer-n1-webserver-8. + * If not specified, composer-n1-webserver-2 will be used. + * Value custom is returned only in response, if Airflow web server parameters + * were manually changed to a non-standard values. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Machine type on which Airflow web server is running. + * It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4 or + * composer-n1-webserver-8. + * If not specified, composer-n1-webserver-2 will be used. + * Value custom is returned only in response, if Airflow web server parameters + * were manually changed to a non-standard values. + * + * Generated from protobuf field string machine_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getMachineType() + { + return $this->machine_type; + } + + /** + * Optional. Machine type on which Airflow web server is running. + * It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4 or + * composer-n1-webserver-8. + * If not specified, composer-n1-webserver-2 will be used. + * Value custom is returned only in response, if Airflow web server parameters + * were manually changed to a non-standard values. + * + * Generated from protobuf field string machine_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setMachineType($var) + { + GPBUtil::checkString($var, True); + $this->machine_type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/WebServerNetworkAccessControl.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/WebServerNetworkAccessControl.php new file mode 100644 index 000000000000..04c469c125e2 --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/WebServerNetworkAccessControl.php @@ -0,0 +1,67 @@ +google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + */ +class WebServerNetworkAccessControl extends \Google\Protobuf\Internal\Message +{ + /** + * A collection of allowed IP ranges with descriptions. + * + * Generated from protobuf field repeated .google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange allowed_ip_ranges = 1; + */ + private $allowed_ip_ranges; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Orchestration\Airflow\Service\V1\WebServerNetworkAccessControl\AllowedIpRange>|\Google\Protobuf\Internal\RepeatedField $allowed_ip_ranges + * A collection of allowed IP ranges with descriptions. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); + parent::__construct($data); + } + + /** + * A collection of allowed IP ranges with descriptions. + * + * Generated from protobuf field repeated .google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange allowed_ip_ranges = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAllowedIpRanges() + { + return $this->allowed_ip_ranges; + } + + /** + * A collection of allowed IP ranges with descriptions. + * + * Generated from protobuf field repeated .google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange allowed_ip_ranges = 1; + * @param array<\Google\Cloud\Orchestration\Airflow\Service\V1\WebServerNetworkAccessControl\AllowedIpRange>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAllowedIpRanges($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Orchestration\Airflow\Service\V1\WebServerNetworkAccessControl\AllowedIpRange::class); + $this->allowed_ip_ranges = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/WebServerNetworkAccessControl/AllowedIpRange.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/WebServerNetworkAccessControl/AllowedIpRange.php new file mode 100644 index 000000000000..196292682450 --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/WebServerNetworkAccessControl/AllowedIpRange.php @@ -0,0 +1,132 @@ +google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange + */ +class AllowedIpRange extends \Google\Protobuf\Internal\Message +{ + /** + * IP address or range, defined using CIDR notation, of requests that this + * rule applies to. + * Examples: `192.168.1.1` or `192.168.0.0/16` or `2001:db8::/32` + * or `2001:0db8:0000:0042:0000:8a2e:0370:7334`. + * IP range prefixes should be properly truncated. For example, + * `1.2.3.4/24` should be truncated to `1.2.3.0/24`. Similarly, for IPv6, + * `2001:db8::1/32` should be truncated to `2001:db8::/32`. + * + * Generated from protobuf field string value = 1; + */ + protected $value = ''; + /** + * Optional. User-provided description. It must contain at most 300 + * characters. + * + * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $value + * IP address or range, defined using CIDR notation, of requests that this + * rule applies to. + * Examples: `192.168.1.1` or `192.168.0.0/16` or `2001:db8::/32` + * or `2001:0db8:0000:0042:0000:8a2e:0370:7334`. + * IP range prefixes should be properly truncated. For example, + * `1.2.3.4/24` should be truncated to `1.2.3.0/24`. Similarly, for IPv6, + * `2001:db8::1/32` should be truncated to `2001:db8::/32`. + * @type string $description + * Optional. User-provided description. It must contain at most 300 + * characters. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); + parent::__construct($data); + } + + /** + * IP address or range, defined using CIDR notation, of requests that this + * rule applies to. + * Examples: `192.168.1.1` or `192.168.0.0/16` or `2001:db8::/32` + * or `2001:0db8:0000:0042:0000:8a2e:0370:7334`. + * IP range prefixes should be properly truncated. For example, + * `1.2.3.4/24` should be truncated to `1.2.3.0/24`. Similarly, for IPv6, + * `2001:db8::1/32` should be truncated to `2001:db8::/32`. + * + * Generated from protobuf field string value = 1; + * @return string + */ + public function getValue() + { + return $this->value; + } + + /** + * IP address or range, defined using CIDR notation, of requests that this + * rule applies to. + * Examples: `192.168.1.1` or `192.168.0.0/16` or `2001:db8::/32` + * or `2001:0db8:0000:0042:0000:8a2e:0370:7334`. + * IP range prefixes should be properly truncated. For example, + * `1.2.3.4/24` should be truncated to `1.2.3.0/24`. Similarly, for IPv6, + * `2001:db8::1/32` should be truncated to `2001:db8::/32`. + * + * Generated from protobuf field string value = 1; + * @param string $var + * @return $this + */ + public function setValue($var) + { + GPBUtil::checkString($var, True); + $this->value = $var; + + return $this; + } + + /** + * Optional. User-provided description. It must contain at most 300 + * characters. + * + * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. User-provided description. It must contain at most 300 + * characters. + * + * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(AllowedIpRange::class, \Google\Cloud\Orchestration\Airflow\Service\V1\WebServerNetworkAccessControl_AllowedIpRange::class); + diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/WorkloadsConfig.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/WorkloadsConfig.php new file mode 100644 index 000000000000..e12719b0b73b --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/WorkloadsConfig.php @@ -0,0 +1,263 @@ +google.cloud.orchestration.airflow.service.v1.WorkloadsConfig + */ +class WorkloadsConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Resources used by Airflow schedulers. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.SchedulerResource scheduler = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $scheduler = null; + /** + * Optional. Resources used by Airflow web server. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WebServerResource web_server = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $web_server = null; + /** + * Optional. Resources used by Airflow workers. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WorkerResource worker = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $worker = null; + /** + * Optional. Resources used by Airflow triggerers. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.TriggererResource triggerer = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $triggerer = null; + /** + * Optional. Resources used by Airflow DAG processors. + * This field is supported for Cloud Composer environments in versions + * composer-3.*.*-airflow-*.*.* and newer. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.DagProcessorResource dag_processor = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $dag_processor = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Orchestration\Airflow\Service\V1\WorkloadsConfig\SchedulerResource $scheduler + * Optional. Resources used by Airflow schedulers. + * @type \Google\Cloud\Orchestration\Airflow\Service\V1\WorkloadsConfig\WebServerResource $web_server + * Optional. Resources used by Airflow web server. + * @type \Google\Cloud\Orchestration\Airflow\Service\V1\WorkloadsConfig\WorkerResource $worker + * Optional. Resources used by Airflow workers. + * @type \Google\Cloud\Orchestration\Airflow\Service\V1\WorkloadsConfig\TriggererResource $triggerer + * Optional. Resources used by Airflow triggerers. + * @type \Google\Cloud\Orchestration\Airflow\Service\V1\WorkloadsConfig\DagProcessorResource $dag_processor + * Optional. Resources used by Airflow DAG processors. + * This field is supported for Cloud Composer environments in versions + * composer-3.*.*-airflow-*.*.* and newer. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Resources used by Airflow schedulers. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.SchedulerResource scheduler = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Orchestration\Airflow\Service\V1\WorkloadsConfig\SchedulerResource|null + */ + public function getScheduler() + { + return $this->scheduler; + } + + public function hasScheduler() + { + return isset($this->scheduler); + } + + public function clearScheduler() + { + unset($this->scheduler); + } + + /** + * Optional. Resources used by Airflow schedulers. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.SchedulerResource scheduler = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Orchestration\Airflow\Service\V1\WorkloadsConfig\SchedulerResource $var + * @return $this + */ + public function setScheduler($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Orchestration\Airflow\Service\V1\WorkloadsConfig\SchedulerResource::class); + $this->scheduler = $var; + + return $this; + } + + /** + * Optional. Resources used by Airflow web server. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WebServerResource web_server = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Orchestration\Airflow\Service\V1\WorkloadsConfig\WebServerResource|null + */ + public function getWebServer() + { + return $this->web_server; + } + + public function hasWebServer() + { + return isset($this->web_server); + } + + public function clearWebServer() + { + unset($this->web_server); + } + + /** + * Optional. Resources used by Airflow web server. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WebServerResource web_server = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Orchestration\Airflow\Service\V1\WorkloadsConfig\WebServerResource $var + * @return $this + */ + public function setWebServer($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Orchestration\Airflow\Service\V1\WorkloadsConfig\WebServerResource::class); + $this->web_server = $var; + + return $this; + } + + /** + * Optional. Resources used by Airflow workers. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WorkerResource worker = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Orchestration\Airflow\Service\V1\WorkloadsConfig\WorkerResource|null + */ + public function getWorker() + { + return $this->worker; + } + + public function hasWorker() + { + return isset($this->worker); + } + + public function clearWorker() + { + unset($this->worker); + } + + /** + * Optional. Resources used by Airflow workers. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WorkerResource worker = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Orchestration\Airflow\Service\V1\WorkloadsConfig\WorkerResource $var + * @return $this + */ + public function setWorker($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Orchestration\Airflow\Service\V1\WorkloadsConfig\WorkerResource::class); + $this->worker = $var; + + return $this; + } + + /** + * Optional. Resources used by Airflow triggerers. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.TriggererResource triggerer = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Orchestration\Airflow\Service\V1\WorkloadsConfig\TriggererResource|null + */ + public function getTriggerer() + { + return $this->triggerer; + } + + public function hasTriggerer() + { + return isset($this->triggerer); + } + + public function clearTriggerer() + { + unset($this->triggerer); + } + + /** + * Optional. Resources used by Airflow triggerers. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.TriggererResource triggerer = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Orchestration\Airflow\Service\V1\WorkloadsConfig\TriggererResource $var + * @return $this + */ + public function setTriggerer($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Orchestration\Airflow\Service\V1\WorkloadsConfig\TriggererResource::class); + $this->triggerer = $var; + + return $this; + } + + /** + * Optional. Resources used by Airflow DAG processors. + * This field is supported for Cloud Composer environments in versions + * composer-3.*.*-airflow-*.*.* and newer. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.DagProcessorResource dag_processor = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Orchestration\Airflow\Service\V1\WorkloadsConfig\DagProcessorResource|null + */ + public function getDagProcessor() + { + return $this->dag_processor; + } + + public function hasDagProcessor() + { + return isset($this->dag_processor); + } + + public function clearDagProcessor() + { + unset($this->dag_processor); + } + + /** + * Optional. Resources used by Airflow DAG processors. + * This field is supported for Cloud Composer environments in versions + * composer-3.*.*-airflow-*.*.* and newer. + * + * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.DagProcessorResource dag_processor = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Orchestration\Airflow\Service\V1\WorkloadsConfig\DagProcessorResource $var + * @return $this + */ + public function setDagProcessor($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Orchestration\Airflow\Service\V1\WorkloadsConfig\DagProcessorResource::class); + $this->dag_processor = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/WorkloadsConfig/DagProcessorResource.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/WorkloadsConfig/DagProcessorResource.php new file mode 100644 index 000000000000..3600af65614f --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/WorkloadsConfig/DagProcessorResource.php @@ -0,0 +1,190 @@ +google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.DagProcessorResource + */ +class DagProcessorResource extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. CPU request and limit for a single Airflow DAG processor + * replica. + * + * Generated from protobuf field float cpu = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $cpu = 0.0; + /** + * Optional. Memory (GB) request and limit for a single Airflow DAG + * processor replica. + * + * Generated from protobuf field float memory_gb = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $memory_gb = 0.0; + /** + * Optional. Storage (GB) request and limit for a single Airflow DAG + * processor replica. + * + * Generated from protobuf field float storage_gb = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $storage_gb = 0.0; + /** + * Optional. The number of DAG processors. If not provided or set to 0, a + * single DAG processor instance will be created. + * + * Generated from protobuf field int32 count = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $cpu + * Optional. CPU request and limit for a single Airflow DAG processor + * replica. + * @type float $memory_gb + * Optional. Memory (GB) request and limit for a single Airflow DAG + * processor replica. + * @type float $storage_gb + * Optional. Storage (GB) request and limit for a single Airflow DAG + * processor replica. + * @type int $count + * Optional. The number of DAG processors. If not provided or set to 0, a + * single DAG processor instance will be created. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); + parent::__construct($data); + } + + /** + * Optional. CPU request and limit for a single Airflow DAG processor + * replica. + * + * Generated from protobuf field float cpu = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return float + */ + public function getCpu() + { + return $this->cpu; + } + + /** + * Optional. CPU request and limit for a single Airflow DAG processor + * replica. + * + * Generated from protobuf field float cpu = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param float $var + * @return $this + */ + public function setCpu($var) + { + GPBUtil::checkFloat($var); + $this->cpu = $var; + + return $this; + } + + /** + * Optional. Memory (GB) request and limit for a single Airflow DAG + * processor replica. + * + * Generated from protobuf field float memory_gb = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return float + */ + public function getMemoryGb() + { + return $this->memory_gb; + } + + /** + * Optional. Memory (GB) request and limit for a single Airflow DAG + * processor replica. + * + * Generated from protobuf field float memory_gb = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param float $var + * @return $this + */ + public function setMemoryGb($var) + { + GPBUtil::checkFloat($var); + $this->memory_gb = $var; + + return $this; + } + + /** + * Optional. Storage (GB) request and limit for a single Airflow DAG + * processor replica. + * + * Generated from protobuf field float storage_gb = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return float + */ + public function getStorageGb() + { + return $this->storage_gb; + } + + /** + * Optional. Storage (GB) request and limit for a single Airflow DAG + * processor replica. + * + * Generated from protobuf field float storage_gb = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param float $var + * @return $this + */ + public function setStorageGb($var) + { + GPBUtil::checkFloat($var); + $this->storage_gb = $var; + + return $this; + } + + /** + * Optional. The number of DAG processors. If not provided or set to 0, a + * single DAG processor instance will be created. + * + * Generated from protobuf field int32 count = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getCount() + { + return $this->count; + } + + /** + * Optional. The number of DAG processors. If not provided or set to 0, a + * single DAG processor instance will be created. + * + * Generated from protobuf field int32 count = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setCount($var) + { + GPBUtil::checkInt32($var); + $this->count = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(DagProcessorResource::class, \Google\Cloud\Orchestration\Airflow\Service\V1\WorkloadsConfig_DagProcessorResource::class); + diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/WorkloadsConfig/SchedulerResource.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/WorkloadsConfig/SchedulerResource.php new file mode 100644 index 000000000000..c0e536aac762 --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/WorkloadsConfig/SchedulerResource.php @@ -0,0 +1,180 @@ +google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.SchedulerResource + */ +class SchedulerResource extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. CPU request and limit for a single Airflow scheduler replica. + * + * Generated from protobuf field float cpu = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $cpu = 0.0; + /** + * Optional. Memory (GB) request and limit for a single Airflow scheduler + * replica. + * + * Generated from protobuf field float memory_gb = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $memory_gb = 0.0; + /** + * Optional. Storage (GB) request and limit for a single Airflow scheduler + * replica. + * + * Generated from protobuf field float storage_gb = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $storage_gb = 0.0; + /** + * Optional. The number of schedulers. + * + * Generated from protobuf field int32 count = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $cpu + * Optional. CPU request and limit for a single Airflow scheduler replica. + * @type float $memory_gb + * Optional. Memory (GB) request and limit for a single Airflow scheduler + * replica. + * @type float $storage_gb + * Optional. Storage (GB) request and limit for a single Airflow scheduler + * replica. + * @type int $count + * Optional. The number of schedulers. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); + parent::__construct($data); + } + + /** + * Optional. CPU request and limit for a single Airflow scheduler replica. + * + * Generated from protobuf field float cpu = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return float + */ + public function getCpu() + { + return $this->cpu; + } + + /** + * Optional. CPU request and limit for a single Airflow scheduler replica. + * + * Generated from protobuf field float cpu = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param float $var + * @return $this + */ + public function setCpu($var) + { + GPBUtil::checkFloat($var); + $this->cpu = $var; + + return $this; + } + + /** + * Optional. Memory (GB) request and limit for a single Airflow scheduler + * replica. + * + * Generated from protobuf field float memory_gb = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return float + */ + public function getMemoryGb() + { + return $this->memory_gb; + } + + /** + * Optional. Memory (GB) request and limit for a single Airflow scheduler + * replica. + * + * Generated from protobuf field float memory_gb = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param float $var + * @return $this + */ + public function setMemoryGb($var) + { + GPBUtil::checkFloat($var); + $this->memory_gb = $var; + + return $this; + } + + /** + * Optional. Storage (GB) request and limit for a single Airflow scheduler + * replica. + * + * Generated from protobuf field float storage_gb = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return float + */ + public function getStorageGb() + { + return $this->storage_gb; + } + + /** + * Optional. Storage (GB) request and limit for a single Airflow scheduler + * replica. + * + * Generated from protobuf field float storage_gb = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param float $var + * @return $this + */ + public function setStorageGb($var) + { + GPBUtil::checkFloat($var); + $this->storage_gb = $var; + + return $this; + } + + /** + * Optional. The number of schedulers. + * + * Generated from protobuf field int32 count = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getCount() + { + return $this->count; + } + + /** + * Optional. The number of schedulers. + * + * Generated from protobuf field int32 count = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setCount($var) + { + GPBUtil::checkInt32($var); + $this->count = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SchedulerResource::class, \Google\Cloud\Orchestration\Airflow\Service\V1\WorkloadsConfig_SchedulerResource::class); + diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/WorkloadsConfig/TriggererResource.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/WorkloadsConfig/TriggererResource.php new file mode 100644 index 000000000000..785a114fe90e --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/WorkloadsConfig/TriggererResource.php @@ -0,0 +1,142 @@ +google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.TriggererResource + */ +class TriggererResource extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The number of triggerers. + * + * Generated from protobuf field int32 count = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $count = 0; + /** + * Optional. CPU request and limit for a single Airflow triggerer replica. + * + * Generated from protobuf field float cpu = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $cpu = 0.0; + /** + * Optional. Memory (GB) request and limit for a single Airflow triggerer + * replica. + * + * Generated from protobuf field float memory_gb = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $memory_gb = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $count + * Optional. The number of triggerers. + * @type float $cpu + * Optional. CPU request and limit for a single Airflow triggerer replica. + * @type float $memory_gb + * Optional. Memory (GB) request and limit for a single Airflow triggerer + * replica. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The number of triggerers. + * + * Generated from protobuf field int32 count = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getCount() + { + return $this->count; + } + + /** + * Optional. The number of triggerers. + * + * Generated from protobuf field int32 count = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setCount($var) + { + GPBUtil::checkInt32($var); + $this->count = $var; + + return $this; + } + + /** + * Optional. CPU request and limit for a single Airflow triggerer replica. + * + * Generated from protobuf field float cpu = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return float + */ + public function getCpu() + { + return $this->cpu; + } + + /** + * Optional. CPU request and limit for a single Airflow triggerer replica. + * + * Generated from protobuf field float cpu = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param float $var + * @return $this + */ + public function setCpu($var) + { + GPBUtil::checkFloat($var); + $this->cpu = $var; + + return $this; + } + + /** + * Optional. Memory (GB) request and limit for a single Airflow triggerer + * replica. + * + * Generated from protobuf field float memory_gb = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return float + */ + public function getMemoryGb() + { + return $this->memory_gb; + } + + /** + * Optional. Memory (GB) request and limit for a single Airflow triggerer + * replica. + * + * Generated from protobuf field float memory_gb = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param float $var + * @return $this + */ + public function setMemoryGb($var) + { + GPBUtil::checkFloat($var); + $this->memory_gb = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(TriggererResource::class, \Google\Cloud\Orchestration\Airflow\Service\V1\WorkloadsConfig_TriggererResource::class); + diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/WorkloadsConfig/WebServerResource.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/WorkloadsConfig/WebServerResource.php new file mode 100644 index 000000000000..13b80734e6ba --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/WorkloadsConfig/WebServerResource.php @@ -0,0 +1,138 @@ +google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WebServerResource + */ +class WebServerResource extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. CPU request and limit for Airflow web server. + * + * Generated from protobuf field float cpu = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $cpu = 0.0; + /** + * Optional. Memory (GB) request and limit for Airflow web server. + * + * Generated from protobuf field float memory_gb = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $memory_gb = 0.0; + /** + * Optional. Storage (GB) request and limit for Airflow web server. + * + * Generated from protobuf field float storage_gb = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $storage_gb = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $cpu + * Optional. CPU request and limit for Airflow web server. + * @type float $memory_gb + * Optional. Memory (GB) request and limit for Airflow web server. + * @type float $storage_gb + * Optional. Storage (GB) request and limit for Airflow web server. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); + parent::__construct($data); + } + + /** + * Optional. CPU request and limit for Airflow web server. + * + * Generated from protobuf field float cpu = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return float + */ + public function getCpu() + { + return $this->cpu; + } + + /** + * Optional. CPU request and limit for Airflow web server. + * + * Generated from protobuf field float cpu = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param float $var + * @return $this + */ + public function setCpu($var) + { + GPBUtil::checkFloat($var); + $this->cpu = $var; + + return $this; + } + + /** + * Optional. Memory (GB) request and limit for Airflow web server. + * + * Generated from protobuf field float memory_gb = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return float + */ + public function getMemoryGb() + { + return $this->memory_gb; + } + + /** + * Optional. Memory (GB) request and limit for Airflow web server. + * + * Generated from protobuf field float memory_gb = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param float $var + * @return $this + */ + public function setMemoryGb($var) + { + GPBUtil::checkFloat($var); + $this->memory_gb = $var; + + return $this; + } + + /** + * Optional. Storage (GB) request and limit for Airflow web server. + * + * Generated from protobuf field float storage_gb = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return float + */ + public function getStorageGb() + { + return $this->storage_gb; + } + + /** + * Optional. Storage (GB) request and limit for Airflow web server. + * + * Generated from protobuf field float storage_gb = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param float $var + * @return $this + */ + public function setStorageGb($var) + { + GPBUtil::checkFloat($var); + $this->storage_gb = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(WebServerResource::class, \Google\Cloud\Orchestration\Airflow\Service\V1\WorkloadsConfig_WebServerResource::class); + diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/WorkloadsConfig/WorkerResource.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/WorkloadsConfig/WorkerResource.php new file mode 100644 index 000000000000..0f3882cc780a --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/WorkloadsConfig/WorkerResource.php @@ -0,0 +1,214 @@ +google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WorkerResource + */ +class WorkerResource extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. CPU request and limit for a single Airflow worker replica. + * + * Generated from protobuf field float cpu = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $cpu = 0.0; + /** + * Optional. Memory (GB) request and limit for a single Airflow worker + * replica. + * + * Generated from protobuf field float memory_gb = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $memory_gb = 0.0; + /** + * Optional. Storage (GB) request and limit for a single Airflow worker + * replica. + * + * Generated from protobuf field float storage_gb = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $storage_gb = 0.0; + /** + * Optional. Minimum number of workers for autoscaling. + * + * Generated from protobuf field int32 min_count = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $min_count = 0; + /** + * Optional. Maximum number of workers for autoscaling. + * + * Generated from protobuf field int32 max_count = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $max_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $cpu + * Optional. CPU request and limit for a single Airflow worker replica. + * @type float $memory_gb + * Optional. Memory (GB) request and limit for a single Airflow worker + * replica. + * @type float $storage_gb + * Optional. Storage (GB) request and limit for a single Airflow worker + * replica. + * @type int $min_count + * Optional. Minimum number of workers for autoscaling. + * @type int $max_count + * Optional. Maximum number of workers for autoscaling. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); + parent::__construct($data); + } + + /** + * Optional. CPU request and limit for a single Airflow worker replica. + * + * Generated from protobuf field float cpu = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return float + */ + public function getCpu() + { + return $this->cpu; + } + + /** + * Optional. CPU request and limit for a single Airflow worker replica. + * + * Generated from protobuf field float cpu = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param float $var + * @return $this + */ + public function setCpu($var) + { + GPBUtil::checkFloat($var); + $this->cpu = $var; + + return $this; + } + + /** + * Optional. Memory (GB) request and limit for a single Airflow worker + * replica. + * + * Generated from protobuf field float memory_gb = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return float + */ + public function getMemoryGb() + { + return $this->memory_gb; + } + + /** + * Optional. Memory (GB) request and limit for a single Airflow worker + * replica. + * + * Generated from protobuf field float memory_gb = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param float $var + * @return $this + */ + public function setMemoryGb($var) + { + GPBUtil::checkFloat($var); + $this->memory_gb = $var; + + return $this; + } + + /** + * Optional. Storage (GB) request and limit for a single Airflow worker + * replica. + * + * Generated from protobuf field float storage_gb = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return float + */ + public function getStorageGb() + { + return $this->storage_gb; + } + + /** + * Optional. Storage (GB) request and limit for a single Airflow worker + * replica. + * + * Generated from protobuf field float storage_gb = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param float $var + * @return $this + */ + public function setStorageGb($var) + { + GPBUtil::checkFloat($var); + $this->storage_gb = $var; + + return $this; + } + + /** + * Optional. Minimum number of workers for autoscaling. + * + * Generated from protobuf field int32 min_count = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getMinCount() + { + return $this->min_count; + } + + /** + * Optional. Minimum number of workers for autoscaling. + * + * Generated from protobuf field int32 min_count = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setMinCount($var) + { + GPBUtil::checkInt32($var); + $this->min_count = $var; + + return $this; + } + + /** + * Optional. Maximum number of workers for autoscaling. + * + * Generated from protobuf field int32 max_count = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getMaxCount() + { + return $this->max_count; + } + + /** + * Optional. Maximum number of workers for autoscaling. + * + * Generated from protobuf field int32 max_count = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setMaxCount($var) + { + GPBUtil::checkInt32($var); + $this->max_count = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(WorkerResource::class, \Google\Cloud\Orchestration\Airflow\Service\V1\WorkloadsConfig_WorkerResource::class); + diff --git a/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/check_upgrade.php b/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/check_upgrade.php new file mode 100644 index 000000000000..90a3c9bfb574 --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/check_upgrade.php @@ -0,0 +1,86 @@ +setEnvironment($environment); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $environmentsClient->checkUpgrade($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var CheckUpgradeResponse $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $environment = '[ENVIRONMENT]'; + + check_upgrade_sample($environment); +} +// [END composer_v1_generated_Environments_CheckUpgrade_sync] diff --git a/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/create_environment.php b/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/create_environment.php new file mode 100644 index 000000000000..ee30baa2854b --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/create_environment.php @@ -0,0 +1,69 @@ +createEnvironment($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Environment $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END composer_v1_generated_Environments_CreateEnvironment_sync] diff --git a/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/create_user_workloads_config_map.php b/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/create_user_workloads_config_map.php new file mode 100644 index 000000000000..d206b5e40636 --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/create_user_workloads_config_map.php @@ -0,0 +1,77 @@ +setParent($formattedParent) + ->setUserWorkloadsConfigMap($userWorkloadsConfigMap); + + // Call the API and handle any network failures. + try { + /** @var UserWorkloadsConfigMap $response */ + $response = $environmentsClient->createUserWorkloadsConfigMap($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = EnvironmentsClient::environmentName('[PROJECT]', '[LOCATION]', '[ENVIRONMENT]'); + + create_user_workloads_config_map_sample($formattedParent); +} +// [END composer_v1_generated_Environments_CreateUserWorkloadsConfigMap_sync] diff --git a/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/create_user_workloads_secret.php b/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/create_user_workloads_secret.php new file mode 100644 index 000000000000..b4195478a2ae --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/create_user_workloads_secret.php @@ -0,0 +1,77 @@ +setParent($formattedParent) + ->setUserWorkloadsSecret($userWorkloadsSecret); + + // Call the API and handle any network failures. + try { + /** @var UserWorkloadsSecret $response */ + $response = $environmentsClient->createUserWorkloadsSecret($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = EnvironmentsClient::environmentName('[PROJECT]', '[LOCATION]', '[ENVIRONMENT]'); + + create_user_workloads_secret_sample($formattedParent); +} +// [END composer_v1_generated_Environments_CreateUserWorkloadsSecret_sync] diff --git a/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/database_failover.php b/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/database_failover.php new file mode 100644 index 000000000000..f8403349490f --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/database_failover.php @@ -0,0 +1,69 @@ +databaseFailover($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var DatabaseFailoverResponse $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END composer_v1_generated_Environments_DatabaseFailover_sync] diff --git a/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/delete_environment.php b/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/delete_environment.php new file mode 100644 index 000000000000..9b9d127a89ed --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/delete_environment.php @@ -0,0 +1,66 @@ +deleteEnvironment($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END composer_v1_generated_Environments_DeleteEnvironment_sync] diff --git a/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/delete_user_workloads_config_map.php b/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/delete_user_workloads_config_map.php new file mode 100644 index 000000000000..88060b4c37ba --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/delete_user_workloads_config_map.php @@ -0,0 +1,78 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $environmentsClient->deleteUserWorkloadsConfigMap($request); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = EnvironmentsClient::userWorkloadsConfigMapName( + '[PROJECT]', + '[LOCATION]', + '[ENVIRONMENT]', + '[USER_WORKLOADS_CONFIG_MAP]' + ); + + delete_user_workloads_config_map_sample($formattedName); +} +// [END composer_v1_generated_Environments_DeleteUserWorkloadsConfigMap_sync] diff --git a/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/delete_user_workloads_secret.php b/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/delete_user_workloads_secret.php new file mode 100644 index 000000000000..dec8d0259b76 --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/delete_user_workloads_secret.php @@ -0,0 +1,78 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $environmentsClient->deleteUserWorkloadsSecret($request); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = EnvironmentsClient::userWorkloadsSecretName( + '[PROJECT]', + '[LOCATION]', + '[ENVIRONMENT]', + '[USER_WORKLOADS_SECRET]' + ); + + delete_user_workloads_secret_sample($formattedName); +} +// [END composer_v1_generated_Environments_DeleteUserWorkloadsSecret_sync] diff --git a/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/execute_airflow_command.php b/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/execute_airflow_command.php new file mode 100644 index 000000000000..80aeedc42126 --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/execute_airflow_command.php @@ -0,0 +1,57 @@ +executeAirflowCommand($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END composer_v1_generated_Environments_ExecuteAirflowCommand_sync] diff --git a/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/fetch_database_properties.php b/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/fetch_database_properties.php new file mode 100644 index 000000000000..4c4f0aede5e3 --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/fetch_database_properties.php @@ -0,0 +1,76 @@ +setEnvironment($formattedEnvironment); + + // Call the API and handle any network failures. + try { + /** @var FetchDatabasePropertiesResponse $response */ + $response = $environmentsClient->fetchDatabaseProperties($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedEnvironment = EnvironmentsClient::environmentName( + '[PROJECT]', + '[LOCATION]', + '[ENVIRONMENT]' + ); + + fetch_database_properties_sample($formattedEnvironment); +} +// [END composer_v1_generated_Environments_FetchDatabaseProperties_sync] diff --git a/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/get_environment.php b/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/get_environment.php new file mode 100644 index 000000000000..9dc51c95458f --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/get_environment.php @@ -0,0 +1,57 @@ +getEnvironment($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END composer_v1_generated_Environments_GetEnvironment_sync] diff --git a/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/get_user_workloads_config_map.php b/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/get_user_workloads_config_map.php new file mode 100644 index 000000000000..84af11fc5311 --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/get_user_workloads_config_map.php @@ -0,0 +1,80 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var UserWorkloadsConfigMap $response */ + $response = $environmentsClient->getUserWorkloadsConfigMap($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = EnvironmentsClient::userWorkloadsConfigMapName( + '[PROJECT]', + '[LOCATION]', + '[ENVIRONMENT]', + '[USER_WORKLOADS_CONFIG_MAP]' + ); + + get_user_workloads_config_map_sample($formattedName); +} +// [END composer_v1_generated_Environments_GetUserWorkloadsConfigMap_sync] diff --git a/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/get_user_workloads_secret.php b/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/get_user_workloads_secret.php new file mode 100644 index 000000000000..4b40f9c8cb89 --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/get_user_workloads_secret.php @@ -0,0 +1,81 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var UserWorkloadsSecret $response */ + $response = $environmentsClient->getUserWorkloadsSecret($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = EnvironmentsClient::userWorkloadsSecretName( + '[PROJECT]', + '[LOCATION]', + '[ENVIRONMENT]', + '[USER_WORKLOADS_SECRET]' + ); + + get_user_workloads_secret_sample($formattedName); +} +// [END composer_v1_generated_Environments_GetUserWorkloadsSecret_sync] diff --git a/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/list_environments.php b/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/list_environments.php new file mode 100644 index 000000000000..a0c2bb2bc35b --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/list_environments.php @@ -0,0 +1,62 @@ +listEnvironments($request); + + /** @var Environment $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END composer_v1_generated_Environments_ListEnvironments_sync] diff --git a/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/list_user_workloads_config_maps.php b/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/list_user_workloads_config_maps.php new file mode 100644 index 000000000000..53debb71c1c2 --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/list_user_workloads_config_maps.php @@ -0,0 +1,80 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $environmentsClient->listUserWorkloadsConfigMaps($request); + + /** @var UserWorkloadsConfigMap $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = EnvironmentsClient::environmentName('[PROJECT]', '[LOCATION]', '[ENVIRONMENT]'); + + list_user_workloads_config_maps_sample($formattedParent); +} +// [END composer_v1_generated_Environments_ListUserWorkloadsConfigMaps_sync] diff --git a/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/list_user_workloads_secrets.php b/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/list_user_workloads_secrets.php new file mode 100644 index 000000000000..d44c6ed37253 --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/list_user_workloads_secrets.php @@ -0,0 +1,80 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $environmentsClient->listUserWorkloadsSecrets($request); + + /** @var UserWorkloadsSecret $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = EnvironmentsClient::environmentName('[PROJECT]', '[LOCATION]', '[ENVIRONMENT]'); + + list_user_workloads_secrets_sample($formattedParent); +} +// [END composer_v1_generated_Environments_ListUserWorkloadsSecrets_sync] diff --git a/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/list_workloads.php b/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/list_workloads.php new file mode 100644 index 000000000000..c951151b3718 --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/list_workloads.php @@ -0,0 +1,81 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $environmentsClient->listWorkloads($request); + + /** @var ComposerWorkload $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = EnvironmentsClient::environmentName('[PROJECT]', '[LOCATION]', '[ENVIRONMENT]'); + + list_workloads_sample($formattedParent); +} +// [END composer_v1_generated_Environments_ListWorkloads_sync] diff --git a/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/load_snapshot.php b/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/load_snapshot.php new file mode 100644 index 000000000000..9776228d8a78 --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/load_snapshot.php @@ -0,0 +1,72 @@ +loadSnapshot($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var LoadSnapshotResponse $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END composer_v1_generated_Environments_LoadSnapshot_sync] diff --git a/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/poll_airflow_command.php b/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/poll_airflow_command.php new file mode 100644 index 000000000000..3ca41a15e0c0 --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/poll_airflow_command.php @@ -0,0 +1,57 @@ +pollAirflowCommand($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END composer_v1_generated_Environments_PollAirflowCommand_sync] diff --git a/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/save_snapshot.php b/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/save_snapshot.php new file mode 100644 index 000000000000..3bea6a1a071e --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/save_snapshot.php @@ -0,0 +1,72 @@ +saveSnapshot($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var SaveSnapshotResponse $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END composer_v1_generated_Environments_SaveSnapshot_sync] diff --git a/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/stop_airflow_command.php b/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/stop_airflow_command.php new file mode 100644 index 000000000000..77d9b55899ac --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/stop_airflow_command.php @@ -0,0 +1,57 @@ +stopAirflowCommand($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END composer_v1_generated_Environments_StopAirflowCommand_sync] diff --git a/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/update_environment.php b/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/update_environment.php new file mode 100644 index 000000000000..a5f3651541cb --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/update_environment.php @@ -0,0 +1,69 @@ +updateEnvironment($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Environment $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END composer_v1_generated_Environments_UpdateEnvironment_sync] diff --git a/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/update_user_workloads_config_map.php b/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/update_user_workloads_config_map.php new file mode 100644 index 000000000000..d9ddca84e5da --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/update_user_workloads_config_map.php @@ -0,0 +1,60 @@ +updateUserWorkloadsConfigMap($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END composer_v1_generated_Environments_UpdateUserWorkloadsConfigMap_sync] diff --git a/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/update_user_workloads_secret.php b/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/update_user_workloads_secret.php new file mode 100644 index 000000000000..91f1d7fd8e62 --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/update_user_workloads_secret.php @@ -0,0 +1,60 @@ +updateUserWorkloadsSecret($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END composer_v1_generated_Environments_UpdateUserWorkloadsSecret_sync] diff --git a/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/ImageVersionsClient/list_image_versions.php b/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/ImageVersionsClient/list_image_versions.php new file mode 100644 index 000000000000..c05f61e5d64a --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/ImageVersionsClient/list_image_versions.php @@ -0,0 +1,62 @@ +listImageVersions($request); + + /** @var ImageVersion $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END composer_v1_generated_ImageVersions_ListImageVersions_sync] diff --git a/owl-bot-staging/OrchestrationAirflow/v1/src/V1/Client/EnvironmentsClient.php b/owl-bot-staging/OrchestrationAirflow/v1/src/V1/Client/EnvironmentsClient.php new file mode 100644 index 000000000000..77a8bf2b18b5 --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/src/V1/Client/EnvironmentsClient.php @@ -0,0 +1,1040 @@ + checkUpgradeAsync(CheckUpgradeRequest $request, array $optionalArgs = []) + * @method PromiseInterface createEnvironmentAsync(CreateEnvironmentRequest $request, array $optionalArgs = []) + * @method PromiseInterface createUserWorkloadsConfigMapAsync(CreateUserWorkloadsConfigMapRequest $request, array $optionalArgs = []) + * @method PromiseInterface createUserWorkloadsSecretAsync(CreateUserWorkloadsSecretRequest $request, array $optionalArgs = []) + * @method PromiseInterface databaseFailoverAsync(DatabaseFailoverRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteEnvironmentAsync(DeleteEnvironmentRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteUserWorkloadsConfigMapAsync(DeleteUserWorkloadsConfigMapRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteUserWorkloadsSecretAsync(DeleteUserWorkloadsSecretRequest $request, array $optionalArgs = []) + * @method PromiseInterface executeAirflowCommandAsync(ExecuteAirflowCommandRequest $request, array $optionalArgs = []) + * @method PromiseInterface fetchDatabasePropertiesAsync(FetchDatabasePropertiesRequest $request, array $optionalArgs = []) + * @method PromiseInterface getEnvironmentAsync(GetEnvironmentRequest $request, array $optionalArgs = []) + * @method PromiseInterface getUserWorkloadsConfigMapAsync(GetUserWorkloadsConfigMapRequest $request, array $optionalArgs = []) + * @method PromiseInterface getUserWorkloadsSecretAsync(GetUserWorkloadsSecretRequest $request, array $optionalArgs = []) + * @method PromiseInterface listEnvironmentsAsync(ListEnvironmentsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listUserWorkloadsConfigMapsAsync(ListUserWorkloadsConfigMapsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listUserWorkloadsSecretsAsync(ListUserWorkloadsSecretsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listWorkloadsAsync(ListWorkloadsRequest $request, array $optionalArgs = []) + * @method PromiseInterface loadSnapshotAsync(LoadSnapshotRequest $request, array $optionalArgs = []) + * @method PromiseInterface pollAirflowCommandAsync(PollAirflowCommandRequest $request, array $optionalArgs = []) + * @method PromiseInterface saveSnapshotAsync(SaveSnapshotRequest $request, array $optionalArgs = []) + * @method PromiseInterface stopAirflowCommandAsync(StopAirflowCommandRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateEnvironmentAsync(UpdateEnvironmentRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateUserWorkloadsConfigMapAsync(UpdateUserWorkloadsConfigMapRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateUserWorkloadsSecretAsync(UpdateUserWorkloadsSecretRequest $request, array $optionalArgs = []) + */ +final class EnvironmentsClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.orchestration.airflow.service.v1.Environments'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'composer.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'composer.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/environments_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/environments_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/environments_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/environments_rest_client_config.php', + ], + ], + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Create the default operation client for the service. + * + * @param array $options ClientOptions for the client. + * + * @return OperationsClient + */ + private function createOperationsClient(array $options) + { + // Unset client-specific configuration options + unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); + + if (isset($options['operationsClient'])) { + return $options['operationsClient']; + } + + return new OperationsClient($options); + } + + /** + * Formats a string containing the fully-qualified path to represent a environment + * resource. + * + * @param string $project + * @param string $location + * @param string $environment + * + * @return string The formatted environment resource. + */ + public static function environmentName(string $project, string $location, string $environment): string + { + return self::getPathTemplate('environment')->render([ + 'project' => $project, + 'location' => $location, + 'environment' => $environment, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * user_workloads_config_map resource. + * + * @param string $project + * @param string $location + * @param string $environment + * @param string $userWorkloadsConfigMap + * + * @return string The formatted user_workloads_config_map resource. + */ + public static function userWorkloadsConfigMapName(string $project, string $location, string $environment, string $userWorkloadsConfigMap): string + { + return self::getPathTemplate('userWorkloadsConfigMap')->render([ + 'project' => $project, + 'location' => $location, + 'environment' => $environment, + 'user_workloads_config_map' => $userWorkloadsConfigMap, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * user_workloads_secret resource. + * + * @param string $project + * @param string $location + * @param string $environment + * @param string $userWorkloadsSecret + * + * @return string The formatted user_workloads_secret resource. + */ + public static function userWorkloadsSecretName(string $project, string $location, string $environment, string $userWorkloadsSecret): string + { + return self::getPathTemplate('userWorkloadsSecret')->render([ + 'project' => $project, + 'location' => $location, + 'environment' => $environment, + 'user_workloads_secret' => $userWorkloadsSecret, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - environment: projects/{project}/locations/{location}/environments/{environment} + * - userWorkloadsConfigMap: projects/{project}/locations/{location}/environments/{environment}/userWorkloadsConfigMaps/{user_workloads_config_map} + * - userWorkloadsSecret: projects/{project}/locations/{location}/environments/{environment}/userWorkloadsSecrets/{user_workloads_secret} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'composer.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Check if an upgrade operation on the environment will succeed. + * + * In case of problems detailed info can be found in the returned Operation. + * + * The async variant is {@see EnvironmentsClient::checkUpgradeAsync()} . + * + * @example samples/V1/EnvironmentsClient/check_upgrade.php + * + * @param CheckUpgradeRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function checkUpgrade(CheckUpgradeRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CheckUpgrade', $request, $callOptions)->wait(); + } + + /** + * Create a new environment. + * + * The async variant is {@see EnvironmentsClient::createEnvironmentAsync()} . + * + * @example samples/V1/EnvironmentsClient/create_environment.php + * + * @param CreateEnvironmentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createEnvironment(CreateEnvironmentRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateEnvironment', $request, $callOptions)->wait(); + } + + /** + * Creates a user workloads ConfigMap. + * + * This method is supported for Cloud Composer environments in versions + * composer-3.*.*-airflow-*.*.* and newer. + * + * The async variant is + * {@see EnvironmentsClient::createUserWorkloadsConfigMapAsync()} . + * + * @example samples/V1/EnvironmentsClient/create_user_workloads_config_map.php + * + * @param CreateUserWorkloadsConfigMapRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return UserWorkloadsConfigMap + * + * @throws ApiException Thrown if the API call fails. + */ + public function createUserWorkloadsConfigMap(CreateUserWorkloadsConfigMapRequest $request, array $callOptions = []): UserWorkloadsConfigMap + { + return $this->startApiCall('CreateUserWorkloadsConfigMap', $request, $callOptions)->wait(); + } + + /** + * Creates a user workloads Secret. + * + * This method is supported for Cloud Composer environments in versions + * composer-3.*.*-airflow-*.*.* and newer. + * + * The async variant is {@see EnvironmentsClient::createUserWorkloadsSecretAsync()} + * . + * + * @example samples/V1/EnvironmentsClient/create_user_workloads_secret.php + * + * @param CreateUserWorkloadsSecretRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return UserWorkloadsSecret + * + * @throws ApiException Thrown if the API call fails. + */ + public function createUserWorkloadsSecret(CreateUserWorkloadsSecretRequest $request, array $callOptions = []): UserWorkloadsSecret + { + return $this->startApiCall('CreateUserWorkloadsSecret', $request, $callOptions)->wait(); + } + + /** + * Triggers database failover (only for highly resilient environments). + * + * The async variant is {@see EnvironmentsClient::databaseFailoverAsync()} . + * + * @example samples/V1/EnvironmentsClient/database_failover.php + * + * @param DatabaseFailoverRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function databaseFailover(DatabaseFailoverRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DatabaseFailover', $request, $callOptions)->wait(); + } + + /** + * Delete an environment. + * + * The async variant is {@see EnvironmentsClient::deleteEnvironmentAsync()} . + * + * @example samples/V1/EnvironmentsClient/delete_environment.php + * + * @param DeleteEnvironmentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteEnvironment(DeleteEnvironmentRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteEnvironment', $request, $callOptions)->wait(); + } + + /** + * Deletes a user workloads ConfigMap. + * + * This method is supported for Cloud Composer environments in versions + * composer-3.*.*-airflow-*.*.* and newer. + * + * The async variant is + * {@see EnvironmentsClient::deleteUserWorkloadsConfigMapAsync()} . + * + * @example samples/V1/EnvironmentsClient/delete_user_workloads_config_map.php + * + * @param DeleteUserWorkloadsConfigMapRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteUserWorkloadsConfigMap(DeleteUserWorkloadsConfigMapRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteUserWorkloadsConfigMap', $request, $callOptions)->wait(); + } + + /** + * Deletes a user workloads Secret. + * + * This method is supported for Cloud Composer environments in versions + * composer-3.*.*-airflow-*.*.* and newer. + * + * The async variant is {@see EnvironmentsClient::deleteUserWorkloadsSecretAsync()} + * . + * + * @example samples/V1/EnvironmentsClient/delete_user_workloads_secret.php + * + * @param DeleteUserWorkloadsSecretRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteUserWorkloadsSecret(DeleteUserWorkloadsSecretRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteUserWorkloadsSecret', $request, $callOptions)->wait(); + } + + /** + * Executes Airflow CLI command. + * + * The async variant is {@see EnvironmentsClient::executeAirflowCommandAsync()} . + * + * @example samples/V1/EnvironmentsClient/execute_airflow_command.php + * + * @param ExecuteAirflowCommandRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ExecuteAirflowCommandResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function executeAirflowCommand(ExecuteAirflowCommandRequest $request, array $callOptions = []): ExecuteAirflowCommandResponse + { + return $this->startApiCall('ExecuteAirflowCommand', $request, $callOptions)->wait(); + } + + /** + * Fetches database properties. + * + * The async variant is {@see EnvironmentsClient::fetchDatabasePropertiesAsync()} . + * + * @example samples/V1/EnvironmentsClient/fetch_database_properties.php + * + * @param FetchDatabasePropertiesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return FetchDatabasePropertiesResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function fetchDatabaseProperties(FetchDatabasePropertiesRequest $request, array $callOptions = []): FetchDatabasePropertiesResponse + { + return $this->startApiCall('FetchDatabaseProperties', $request, $callOptions)->wait(); + } + + /** + * Get an existing environment. + * + * The async variant is {@see EnvironmentsClient::getEnvironmentAsync()} . + * + * @example samples/V1/EnvironmentsClient/get_environment.php + * + * @param GetEnvironmentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Environment + * + * @throws ApiException Thrown if the API call fails. + */ + public function getEnvironment(GetEnvironmentRequest $request, array $callOptions = []): Environment + { + return $this->startApiCall('GetEnvironment', $request, $callOptions)->wait(); + } + + /** + * Gets an existing user workloads ConfigMap. + * + * This method is supported for Cloud Composer environments in versions + * composer-3.*.*-airflow-*.*.* and newer. + * + * The async variant is {@see EnvironmentsClient::getUserWorkloadsConfigMapAsync()} + * . + * + * @example samples/V1/EnvironmentsClient/get_user_workloads_config_map.php + * + * @param GetUserWorkloadsConfigMapRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return UserWorkloadsConfigMap + * + * @throws ApiException Thrown if the API call fails. + */ + public function getUserWorkloadsConfigMap(GetUserWorkloadsConfigMapRequest $request, array $callOptions = []): UserWorkloadsConfigMap + { + return $this->startApiCall('GetUserWorkloadsConfigMap', $request, $callOptions)->wait(); + } + + /** + * Gets an existing user workloads Secret. + * Values of the "data" field in the response are cleared. + * + * This method is supported for Cloud Composer environments in versions + * composer-3.*.*-airflow-*.*.* and newer. + * + * The async variant is {@see EnvironmentsClient::getUserWorkloadsSecretAsync()} . + * + * @example samples/V1/EnvironmentsClient/get_user_workloads_secret.php + * + * @param GetUserWorkloadsSecretRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return UserWorkloadsSecret + * + * @throws ApiException Thrown if the API call fails. + */ + public function getUserWorkloadsSecret(GetUserWorkloadsSecretRequest $request, array $callOptions = []): UserWorkloadsSecret + { + return $this->startApiCall('GetUserWorkloadsSecret', $request, $callOptions)->wait(); + } + + /** + * List environments. + * + * The async variant is {@see EnvironmentsClient::listEnvironmentsAsync()} . + * + * @example samples/V1/EnvironmentsClient/list_environments.php + * + * @param ListEnvironmentsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listEnvironments(ListEnvironmentsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListEnvironments', $request, $callOptions); + } + + /** + * Lists user workloads ConfigMaps. + * + * This method is supported for Cloud Composer environments in versions + * composer-3.*.*-airflow-*.*.* and newer. + * + * The async variant is + * {@see EnvironmentsClient::listUserWorkloadsConfigMapsAsync()} . + * + * @example samples/V1/EnvironmentsClient/list_user_workloads_config_maps.php + * + * @param ListUserWorkloadsConfigMapsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listUserWorkloadsConfigMaps(ListUserWorkloadsConfigMapsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListUserWorkloadsConfigMaps', $request, $callOptions); + } + + /** + * Lists user workloads Secrets. + * + * This method is supported for Cloud Composer environments in versions + * composer-3.*.*-airflow-*.*.* and newer. + * + * The async variant is {@see EnvironmentsClient::listUserWorkloadsSecretsAsync()} + * . + * + * @example samples/V1/EnvironmentsClient/list_user_workloads_secrets.php + * + * @param ListUserWorkloadsSecretsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listUserWorkloadsSecrets(ListUserWorkloadsSecretsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListUserWorkloadsSecrets', $request, $callOptions); + } + + /** + * Lists workloads in a Cloud Composer environment. Workload is a unit that + * runs a single Composer component. + * + * This method is supported for Cloud Composer environments in versions + * composer-3.*.*-airflow-*.*.* and newer. + * + * The async variant is {@see EnvironmentsClient::listWorkloadsAsync()} . + * + * @example samples/V1/EnvironmentsClient/list_workloads.php + * + * @param ListWorkloadsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listWorkloads(ListWorkloadsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListWorkloads', $request, $callOptions); + } + + /** + * Loads a snapshot of a Cloud Composer environment. + * + * As a result of this operation, a snapshot of environment's specified in + * LoadSnapshotRequest is loaded into the environment. + * + * The async variant is {@see EnvironmentsClient::loadSnapshotAsync()} . + * + * @example samples/V1/EnvironmentsClient/load_snapshot.php + * + * @param LoadSnapshotRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function loadSnapshot(LoadSnapshotRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('LoadSnapshot', $request, $callOptions)->wait(); + } + + /** + * Polls Airflow CLI command execution and fetches logs. + * + * The async variant is {@see EnvironmentsClient::pollAirflowCommandAsync()} . + * + * @example samples/V1/EnvironmentsClient/poll_airflow_command.php + * + * @param PollAirflowCommandRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PollAirflowCommandResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function pollAirflowCommand(PollAirflowCommandRequest $request, array $callOptions = []): PollAirflowCommandResponse + { + return $this->startApiCall('PollAirflowCommand', $request, $callOptions)->wait(); + } + + /** + * Creates a snapshots of a Cloud Composer environment. + * + * As a result of this operation, snapshot of environment's state is stored + * in a location specified in the SaveSnapshotRequest. + * + * The async variant is {@see EnvironmentsClient::saveSnapshotAsync()} . + * + * @example samples/V1/EnvironmentsClient/save_snapshot.php + * + * @param SaveSnapshotRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function saveSnapshot(SaveSnapshotRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('SaveSnapshot', $request, $callOptions)->wait(); + } + + /** + * Stops Airflow CLI command execution. + * + * The async variant is {@see EnvironmentsClient::stopAirflowCommandAsync()} . + * + * @example samples/V1/EnvironmentsClient/stop_airflow_command.php + * + * @param StopAirflowCommandRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return StopAirflowCommandResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function stopAirflowCommand(StopAirflowCommandRequest $request, array $callOptions = []): StopAirflowCommandResponse + { + return $this->startApiCall('StopAirflowCommand', $request, $callOptions)->wait(); + } + + /** + * Update an environment. + * + * The async variant is {@see EnvironmentsClient::updateEnvironmentAsync()} . + * + * @example samples/V1/EnvironmentsClient/update_environment.php + * + * @param UpdateEnvironmentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateEnvironment(UpdateEnvironmentRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateEnvironment', $request, $callOptions)->wait(); + } + + /** + * Updates a user workloads ConfigMap. + * + * This method is supported for Cloud Composer environments in versions + * composer-3.*.*-airflow-*.*.* and newer. + * + * The async variant is + * {@see EnvironmentsClient::updateUserWorkloadsConfigMapAsync()} . + * + * @example samples/V1/EnvironmentsClient/update_user_workloads_config_map.php + * + * @param UpdateUserWorkloadsConfigMapRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return UserWorkloadsConfigMap + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateUserWorkloadsConfigMap(UpdateUserWorkloadsConfigMapRequest $request, array $callOptions = []): UserWorkloadsConfigMap + { + return $this->startApiCall('UpdateUserWorkloadsConfigMap', $request, $callOptions)->wait(); + } + + /** + * Updates a user workloads Secret. + * + * This method is supported for Cloud Composer environments in versions + * composer-3.*.*-airflow-*.*.* and newer. + * + * The async variant is {@see EnvironmentsClient::updateUserWorkloadsSecretAsync()} + * . + * + * @example samples/V1/EnvironmentsClient/update_user_workloads_secret.php + * + * @param UpdateUserWorkloadsSecretRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return UserWorkloadsSecret + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateUserWorkloadsSecret(UpdateUserWorkloadsSecretRequest $request, array $callOptions = []): UserWorkloadsSecret + { + return $this->startApiCall('UpdateUserWorkloadsSecret', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/OrchestrationAirflow/v1/src/V1/Client/ImageVersionsClient.php b/owl-bot-staging/OrchestrationAirflow/v1/src/V1/Client/ImageVersionsClient.php new file mode 100644 index 000000000000..55875e67dd39 --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/src/V1/Client/ImageVersionsClient.php @@ -0,0 +1,193 @@ + listImageVersionsAsync(ListImageVersionsRequest $request, array $optionalArgs = []) + */ +final class ImageVersionsClient +{ + use GapicClientTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.orchestration.airflow.service.v1.ImageVersions'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'composer.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'composer.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/image_versions_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/image_versions_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/image_versions_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/image_versions_rest_client_config.php', + ], + ], + ]; + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'composer.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * List ImageVersions for provided location. + * + * The async variant is {@see ImageVersionsClient::listImageVersionsAsync()} . + * + * @example samples/V1/ImageVersionsClient/list_image_versions.php + * + * @param ListImageVersionsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listImageVersions(ListImageVersionsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListImageVersions', $request, $callOptions); + } +} diff --git a/owl-bot-staging/OrchestrationAirflow/v1/src/V1/gapic_metadata.json b/owl-bot-staging/OrchestrationAirflow/v1/src/V1/gapic_metadata.json new file mode 100644 index 000000000000..818abc4a7eb4 --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/src/V1/gapic_metadata.json @@ -0,0 +1,152 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.cloud.orchestration.airflow.service.v1", + "libraryPackage": "Google\\Cloud\\Orchestration\\Airflow\\Service\\V1", + "services": { + "Environments": { + "clients": { + "grpc": { + "libraryClient": "EnvironmentsGapicClient", + "rpcs": { + "CheckUpgrade": { + "methods": [ + "checkUpgrade" + ] + }, + "CreateEnvironment": { + "methods": [ + "createEnvironment" + ] + }, + "CreateUserWorkloadsConfigMap": { + "methods": [ + "createUserWorkloadsConfigMap" + ] + }, + "CreateUserWorkloadsSecret": { + "methods": [ + "createUserWorkloadsSecret" + ] + }, + "DatabaseFailover": { + "methods": [ + "databaseFailover" + ] + }, + "DeleteEnvironment": { + "methods": [ + "deleteEnvironment" + ] + }, + "DeleteUserWorkloadsConfigMap": { + "methods": [ + "deleteUserWorkloadsConfigMap" + ] + }, + "DeleteUserWorkloadsSecret": { + "methods": [ + "deleteUserWorkloadsSecret" + ] + }, + "ExecuteAirflowCommand": { + "methods": [ + "executeAirflowCommand" + ] + }, + "FetchDatabaseProperties": { + "methods": [ + "fetchDatabaseProperties" + ] + }, + "GetEnvironment": { + "methods": [ + "getEnvironment" + ] + }, + "GetUserWorkloadsConfigMap": { + "methods": [ + "getUserWorkloadsConfigMap" + ] + }, + "GetUserWorkloadsSecret": { + "methods": [ + "getUserWorkloadsSecret" + ] + }, + "ListEnvironments": { + "methods": [ + "listEnvironments" + ] + }, + "ListUserWorkloadsConfigMaps": { + "methods": [ + "listUserWorkloadsConfigMaps" + ] + }, + "ListUserWorkloadsSecrets": { + "methods": [ + "listUserWorkloadsSecrets" + ] + }, + "ListWorkloads": { + "methods": [ + "listWorkloads" + ] + }, + "LoadSnapshot": { + "methods": [ + "loadSnapshot" + ] + }, + "PollAirflowCommand": { + "methods": [ + "pollAirflowCommand" + ] + }, + "SaveSnapshot": { + "methods": [ + "saveSnapshot" + ] + }, + "StopAirflowCommand": { + "methods": [ + "stopAirflowCommand" + ] + }, + "UpdateEnvironment": { + "methods": [ + "updateEnvironment" + ] + }, + "UpdateUserWorkloadsConfigMap": { + "methods": [ + "updateUserWorkloadsConfigMap" + ] + }, + "UpdateUserWorkloadsSecret": { + "methods": [ + "updateUserWorkloadsSecret" + ] + } + } + } + } + }, + "ImageVersions": { + "clients": { + "grpc": { + "libraryClient": "ImageVersionsGapicClient", + "rpcs": { + "ListImageVersions": { + "methods": [ + "listImageVersions" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/OrchestrationAirflow/v1/src/V1/resources/environments_client_config.json b/owl-bot-staging/OrchestrationAirflow/v1/src/V1/resources/environments_client_config.json new file mode 100644 index 000000000000..0f0a01172887 --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/src/V1/resources/environments_client_config.json @@ -0,0 +1,142 @@ +{ + "interfaces": { + "google.cloud.orchestration.airflow.service.v1.Environments": { + "retry_codes": { + "no_retry_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + } + }, + "methods": { + "CheckUpgrade": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "CreateEnvironment": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "CreateUserWorkloadsConfigMap": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "CreateUserWorkloadsSecret": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DatabaseFailover": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DeleteEnvironment": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DeleteUserWorkloadsConfigMap": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DeleteUserWorkloadsSecret": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ExecuteAirflowCommand": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "FetchDatabaseProperties": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetEnvironment": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetUserWorkloadsConfigMap": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetUserWorkloadsSecret": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListEnvironments": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListUserWorkloadsConfigMaps": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListUserWorkloadsSecrets": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListWorkloads": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "LoadSnapshot": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "PollAirflowCommand": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "SaveSnapshot": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "StopAirflowCommand": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpdateEnvironment": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpdateUserWorkloadsConfigMap": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpdateUserWorkloadsSecret": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } + } + } +} diff --git a/owl-bot-staging/OrchestrationAirflow/v1/src/V1/resources/environments_descriptor_config.php b/owl-bot-staging/OrchestrationAirflow/v1/src/V1/resources/environments_descriptor_config.php new file mode 100644 index 000000000000..3865c7a2b3d0 --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/src/V1/resources/environments_descriptor_config.php @@ -0,0 +1,404 @@ + [ + 'google.cloud.orchestration.airflow.service.v1.Environments' => [ + 'CheckUpgrade' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Orchestration\Airflow\Service\V1\CheckUpgradeResponse', + 'metadataReturnType' => '\Google\Cloud\Orchestration\Airflow\Service\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'environment', + 'fieldAccessors' => [ + 'getEnvironment', + ], + ], + ], + ], + 'CreateEnvironment' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Orchestration\Airflow\Service\V1\Environment', + 'metadataReturnType' => '\Google\Cloud\Orchestration\Airflow\Service\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DatabaseFailover' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Orchestration\Airflow\Service\V1\DatabaseFailoverResponse', + 'metadataReturnType' => '\Google\Cloud\Orchestration\Airflow\Service\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'environment', + 'fieldAccessors' => [ + 'getEnvironment', + ], + ], + ], + ], + 'DeleteEnvironment' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\Orchestration\Airflow\Service\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'LoadSnapshot' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Orchestration\Airflow\Service\V1\LoadSnapshotResponse', + 'metadataReturnType' => '\Google\Cloud\Orchestration\Airflow\Service\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'environment', + 'fieldAccessors' => [ + 'getEnvironment', + ], + ], + ], + ], + 'SaveSnapshot' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Orchestration\Airflow\Service\V1\SaveSnapshotResponse', + 'metadataReturnType' => '\Google\Cloud\Orchestration\Airflow\Service\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'environment', + 'fieldAccessors' => [ + 'getEnvironment', + ], + ], + ], + ], + 'UpdateEnvironment' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Orchestration\Airflow\Service\V1\Environment', + 'metadataReturnType' => '\Google\Cloud\Orchestration\Airflow\Service\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'CreateUserWorkloadsConfigMap' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Orchestration\Airflow\Service\V1\UserWorkloadsConfigMap', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateUserWorkloadsSecret' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Orchestration\Airflow\Service\V1\UserWorkloadsSecret', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteUserWorkloadsConfigMap' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteUserWorkloadsSecret' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ExecuteAirflowCommand' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Orchestration\Airflow\Service\V1\ExecuteAirflowCommandResponse', + 'headerParams' => [ + [ + 'keyName' => 'environment', + 'fieldAccessors' => [ + 'getEnvironment', + ], + ], + ], + ], + 'FetchDatabaseProperties' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Orchestration\Airflow\Service\V1\FetchDatabasePropertiesResponse', + 'headerParams' => [ + [ + 'keyName' => 'environment', + 'fieldAccessors' => [ + 'getEnvironment', + ], + ], + ], + ], + 'GetEnvironment' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Orchestration\Airflow\Service\V1\Environment', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetUserWorkloadsConfigMap' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Orchestration\Airflow\Service\V1\UserWorkloadsConfigMap', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetUserWorkloadsSecret' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Orchestration\Airflow\Service\V1\UserWorkloadsSecret', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListEnvironments' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getEnvironments', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Orchestration\Airflow\Service\V1\ListEnvironmentsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListUserWorkloadsConfigMaps' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getUserWorkloadsConfigMaps', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Orchestration\Airflow\Service\V1\ListUserWorkloadsConfigMapsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListUserWorkloadsSecrets' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getUserWorkloadsSecrets', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Orchestration\Airflow\Service\V1\ListUserWorkloadsSecretsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListWorkloads' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getWorkloads', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Orchestration\Airflow\Service\V1\ListWorkloadsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'PollAirflowCommand' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Orchestration\Airflow\Service\V1\PollAirflowCommandResponse', + 'headerParams' => [ + [ + 'keyName' => 'environment', + 'fieldAccessors' => [ + 'getEnvironment', + ], + ], + ], + ], + 'StopAirflowCommand' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Orchestration\Airflow\Service\V1\StopAirflowCommandResponse', + 'headerParams' => [ + [ + 'keyName' => 'environment', + 'fieldAccessors' => [ + 'getEnvironment', + ], + ], + ], + ], + 'UpdateUserWorkloadsConfigMap' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Orchestration\Airflow\Service\V1\UserWorkloadsConfigMap', + 'headerParams' => [ + [ + 'keyName' => 'user_workloads_config_map.name', + 'fieldAccessors' => [ + 'getUserWorkloadsConfigMap', + 'getName', + ], + ], + ], + ], + 'UpdateUserWorkloadsSecret' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Orchestration\Airflow\Service\V1\UserWorkloadsSecret', + 'headerParams' => [ + [ + 'keyName' => 'user_workloads_secret.name', + 'fieldAccessors' => [ + 'getUserWorkloadsSecret', + 'getName', + ], + ], + ], + ], + 'templateMap' => [ + 'environment' => 'projects/{project}/locations/{location}/environments/{environment}', + 'userWorkloadsConfigMap' => 'projects/{project}/locations/{location}/environments/{environment}/userWorkloadsConfigMaps/{user_workloads_config_map}', + 'userWorkloadsSecret' => 'projects/{project}/locations/{location}/environments/{environment}/userWorkloadsSecrets/{user_workloads_secret}', + ], + ], + ], +]; diff --git a/owl-bot-staging/OrchestrationAirflow/v1/src/V1/resources/environments_rest_client_config.php b/owl-bot-staging/OrchestrationAirflow/v1/src/V1/resources/environments_rest_client_config.php new file mode 100644 index 000000000000..bed86b569fa3 --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/src/V1/resources/environments_rest_client_config.php @@ -0,0 +1,343 @@ + [ + 'google.cloud.orchestration.airflow.service.v1.Environments' => [ + 'CheckUpgrade' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{environment=projects/*/locations/*/environments/*}:checkUpgrade', + 'body' => '*', + 'placeholders' => [ + 'environment' => [ + 'getters' => [ + 'getEnvironment', + ], + ], + ], + ], + 'CreateEnvironment' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/environments', + 'body' => 'environment', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreateUserWorkloadsConfigMap' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/environments/*}/userWorkloadsConfigMaps', + 'body' => 'user_workloads_config_map', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreateUserWorkloadsSecret' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/environments/*}/userWorkloadsSecrets', + 'body' => 'user_workloads_secret', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DatabaseFailover' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{environment=projects/*/locations/*/environments/*}:databaseFailover', + 'body' => '*', + 'placeholders' => [ + 'environment' => [ + 'getters' => [ + 'getEnvironment', + ], + ], + ], + ], + 'DeleteEnvironment' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/environments/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteUserWorkloadsConfigMap' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/environments/*/userWorkloadsConfigMaps/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteUserWorkloadsSecret' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/environments/*/userWorkloadsSecrets/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ExecuteAirflowCommand' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{environment=projects/*/locations/*/environments/*}:executeAirflowCommand', + 'body' => '*', + 'placeholders' => [ + 'environment' => [ + 'getters' => [ + 'getEnvironment', + ], + ], + ], + ], + 'FetchDatabaseProperties' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{environment=projects/*/locations/*/environments/*}:fetchDatabaseProperties', + 'placeholders' => [ + 'environment' => [ + 'getters' => [ + 'getEnvironment', + ], + ], + ], + ], + 'GetEnvironment' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/environments/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetUserWorkloadsConfigMap' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/environments/*/userWorkloadsConfigMaps/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetUserWorkloadsSecret' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/environments/*/userWorkloadsSecrets/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListEnvironments' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/environments', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListUserWorkloadsConfigMaps' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/environments/*}/userWorkloadsConfigMaps', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListUserWorkloadsSecrets' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/environments/*}/userWorkloadsSecrets', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListWorkloads' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/environments/*}/workloads', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'LoadSnapshot' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{environment=projects/*/locations/*/environments/*}:loadSnapshot', + 'body' => '*', + 'placeholders' => [ + 'environment' => [ + 'getters' => [ + 'getEnvironment', + ], + ], + ], + ], + 'PollAirflowCommand' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{environment=projects/*/locations/*/environments/*}:pollAirflowCommand', + 'body' => '*', + 'placeholders' => [ + 'environment' => [ + 'getters' => [ + 'getEnvironment', + ], + ], + ], + ], + 'SaveSnapshot' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{environment=projects/*/locations/*/environments/*}:saveSnapshot', + 'body' => '*', + 'placeholders' => [ + 'environment' => [ + 'getters' => [ + 'getEnvironment', + ], + ], + ], + ], + 'StopAirflowCommand' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{environment=projects/*/locations/*/environments/*}:stopAirflowCommand', + 'body' => '*', + 'placeholders' => [ + 'environment' => [ + 'getters' => [ + 'getEnvironment', + ], + ], + ], + ], + 'UpdateEnvironment' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/environments/*}', + 'body' => 'environment', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'UpdateUserWorkloadsConfigMap' => [ + 'method' => 'put', + 'uriTemplate' => '/v1/{user_workloads_config_map.name=projects/*/locations/*/environments/*/userWorkloadsConfigMaps/*}', + 'body' => 'user_workloads_config_map', + 'placeholders' => [ + 'user_workloads_config_map.name' => [ + 'getters' => [ + 'getUserWorkloadsConfigMap', + 'getName', + ], + ], + ], + ], + 'UpdateUserWorkloadsSecret' => [ + 'method' => 'put', + 'uriTemplate' => '/v1/{user_workloads_secret.name=projects/*/locations/*/environments/*/userWorkloadsSecrets/*}', + 'body' => 'user_workloads_secret', + 'placeholders' => [ + 'user_workloads_secret.name' => [ + 'getters' => [ + 'getUserWorkloadsSecret', + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/OrchestrationAirflow/v1/src/V1/resources/image_versions_client_config.json b/owl-bot-staging/OrchestrationAirflow/v1/src/V1/resources/image_versions_client_config.json new file mode 100644 index 000000000000..8dcb3d85d715 --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/src/V1/resources/image_versions_client_config.json @@ -0,0 +1,27 @@ +{ + "interfaces": { + "google.cloud.orchestration.airflow.service.v1.ImageVersions": { + "retry_codes": { + "no_retry_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + } + }, + "methods": { + "ListImageVersions": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } + } + } +} diff --git a/owl-bot-staging/OrchestrationAirflow/v1/src/V1/resources/image_versions_descriptor_config.php b/owl-bot-staging/OrchestrationAirflow/v1/src/V1/resources/image_versions_descriptor_config.php new file mode 100644 index 000000000000..1eb232f5660d --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/src/V1/resources/image_versions_descriptor_config.php @@ -0,0 +1,48 @@ + [ + 'google.cloud.orchestration.airflow.service.v1.ImageVersions' => [ + 'ListImageVersions' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getImageVersions', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Orchestration\Airflow\Service\V1\ListImageVersionsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + ], + ], +]; diff --git a/owl-bot-staging/OrchestrationAirflow/v1/src/V1/resources/image_versions_rest_client_config.php b/owl-bot-staging/OrchestrationAirflow/v1/src/V1/resources/image_versions_rest_client_config.php new file mode 100644 index 000000000000..e999b9722e51 --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/src/V1/resources/image_versions_rest_client_config.php @@ -0,0 +1,75 @@ + [ + 'google.cloud.orchestration.airflow.service.v1.ImageVersions' => [ + 'ListImageVersions' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/imageVersions', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/OrchestrationAirflow/v1/tests/Unit/V1/Client/EnvironmentsClientTest.php b/owl-bot-staging/OrchestrationAirflow/v1/tests/Unit/V1/Client/EnvironmentsClientTest.php new file mode 100644 index 000000000000..a116aac0468b --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/tests/Unit/V1/Client/EnvironmentsClientTest.php @@ -0,0 +1,2084 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return EnvironmentsClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new EnvironmentsClient($options); + } + + /** @test */ + public function checkUpgradeTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/checkUpgradeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $buildLogUri = 'buildLogUri2127590688'; + $pypiConflictBuildLogExtract = 'pypiConflictBuildLogExtract-575404123'; + $imageVersion2 = 'imageVersion2-1876344665'; + $expectedResponse = new CheckUpgradeResponse(); + $expectedResponse->setBuildLogUri($buildLogUri); + $expectedResponse->setPypiConflictBuildLogExtract($pypiConflictBuildLogExtract); + $expectedResponse->setImageVersion($imageVersion2); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/checkUpgradeTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $environment = 'environment-85904877'; + $request = (new CheckUpgradeRequest()) + ->setEnvironment($environment); + $response = $gapicClient->checkUpgrade($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.orchestration.airflow.service.v1.Environments/CheckUpgrade', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getEnvironment(); + $this->assertProtobufEquals($environment, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/checkUpgradeTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function checkUpgradeExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/checkUpgradeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $environment = 'environment-85904877'; + $request = (new CheckUpgradeRequest()) + ->setEnvironment($environment); + $response = $gapicClient->checkUpgrade($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/checkUpgradeTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createEnvironmentTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createEnvironmentTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $uuid = 'uuid3601339'; + $satisfiesPzs = false; + $satisfiesPzi = false; + $expectedResponse = new Environment(); + $expectedResponse->setName($name); + $expectedResponse->setUuid($uuid); + $expectedResponse->setSatisfiesPzs($satisfiesPzs); + $expectedResponse->setSatisfiesPzi($satisfiesPzi); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createEnvironmentTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + $request = new CreateEnvironmentRequest(); + $response = $gapicClient->createEnvironment($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.orchestration.airflow.service.v1.Environments/CreateEnvironment', $actualApiFuncCall); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createEnvironmentTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createEnvironmentExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createEnvironmentTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + $request = new CreateEnvironmentRequest(); + $response = $gapicClient->createEnvironment($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createEnvironmentTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createUserWorkloadsConfigMapTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $expectedResponse = new UserWorkloadsConfigMap(); + $expectedResponse->setName($name); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->environmentName('[PROJECT]', '[LOCATION]', '[ENVIRONMENT]'); + $userWorkloadsConfigMap = new UserWorkloadsConfigMap(); + $request = (new CreateUserWorkloadsConfigMapRequest()) + ->setParent($formattedParent) + ->setUserWorkloadsConfigMap($userWorkloadsConfigMap); + $response = $gapicClient->createUserWorkloadsConfigMap($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.orchestration.airflow.service.v1.Environments/CreateUserWorkloadsConfigMap', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getUserWorkloadsConfigMap(); + $this->assertProtobufEquals($userWorkloadsConfigMap, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createUserWorkloadsConfigMapExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->environmentName('[PROJECT]', '[LOCATION]', '[ENVIRONMENT]'); + $userWorkloadsConfigMap = new UserWorkloadsConfigMap(); + $request = (new CreateUserWorkloadsConfigMapRequest()) + ->setParent($formattedParent) + ->setUserWorkloadsConfigMap($userWorkloadsConfigMap); + try { + $gapicClient->createUserWorkloadsConfigMap($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createUserWorkloadsSecretTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $expectedResponse = new UserWorkloadsSecret(); + $expectedResponse->setName($name); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->environmentName('[PROJECT]', '[LOCATION]', '[ENVIRONMENT]'); + $userWorkloadsSecret = new UserWorkloadsSecret(); + $request = (new CreateUserWorkloadsSecretRequest()) + ->setParent($formattedParent) + ->setUserWorkloadsSecret($userWorkloadsSecret); + $response = $gapicClient->createUserWorkloadsSecret($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.orchestration.airflow.service.v1.Environments/CreateUserWorkloadsSecret', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getUserWorkloadsSecret(); + $this->assertProtobufEquals($userWorkloadsSecret, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createUserWorkloadsSecretExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->environmentName('[PROJECT]', '[LOCATION]', '[ENVIRONMENT]'); + $userWorkloadsSecret = new UserWorkloadsSecret(); + $request = (new CreateUserWorkloadsSecretRequest()) + ->setParent($formattedParent) + ->setUserWorkloadsSecret($userWorkloadsSecret); + try { + $gapicClient->createUserWorkloadsSecret($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function databaseFailoverTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/databaseFailoverTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new DatabaseFailoverResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/databaseFailoverTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + $request = new DatabaseFailoverRequest(); + $response = $gapicClient->databaseFailover($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.orchestration.airflow.service.v1.Environments/DatabaseFailover', $actualApiFuncCall); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/databaseFailoverTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function databaseFailoverExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/databaseFailoverTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + $request = new DatabaseFailoverRequest(); + $response = $gapicClient->databaseFailover($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/databaseFailoverTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteEnvironmentTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteEnvironmentTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteEnvironmentTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + $request = new DeleteEnvironmentRequest(); + $response = $gapicClient->deleteEnvironment($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.orchestration.airflow.service.v1.Environments/DeleteEnvironment', $actualApiFuncCall); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteEnvironmentTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteEnvironmentExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteEnvironmentTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + $request = new DeleteEnvironmentRequest(); + $response = $gapicClient->deleteEnvironment($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteEnvironmentTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteUserWorkloadsConfigMapTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->userWorkloadsConfigMapName('[PROJECT]', '[LOCATION]', '[ENVIRONMENT]', '[USER_WORKLOADS_CONFIG_MAP]'); + $request = (new DeleteUserWorkloadsConfigMapRequest()) + ->setName($formattedName); + $gapicClient->deleteUserWorkloadsConfigMap($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.orchestration.airflow.service.v1.Environments/DeleteUserWorkloadsConfigMap', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteUserWorkloadsConfigMapExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->userWorkloadsConfigMapName('[PROJECT]', '[LOCATION]', '[ENVIRONMENT]', '[USER_WORKLOADS_CONFIG_MAP]'); + $request = (new DeleteUserWorkloadsConfigMapRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteUserWorkloadsConfigMap($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteUserWorkloadsSecretTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->userWorkloadsSecretName('[PROJECT]', '[LOCATION]', '[ENVIRONMENT]', '[USER_WORKLOADS_SECRET]'); + $request = (new DeleteUserWorkloadsSecretRequest()) + ->setName($formattedName); + $gapicClient->deleteUserWorkloadsSecret($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.orchestration.airflow.service.v1.Environments/DeleteUserWorkloadsSecret', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteUserWorkloadsSecretExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->userWorkloadsSecretName('[PROJECT]', '[LOCATION]', '[ENVIRONMENT]', '[USER_WORKLOADS_SECRET]'); + $request = (new DeleteUserWorkloadsSecretRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteUserWorkloadsSecret($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function executeAirflowCommandTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $executionId = 'executionId-1217171550'; + $pod = 'pod111173'; + $podNamespace = 'podNamespace-896290847'; + $error = 'error96784904'; + $expectedResponse = new ExecuteAirflowCommandResponse(); + $expectedResponse->setExecutionId($executionId); + $expectedResponse->setPod($pod); + $expectedResponse->setPodNamespace($podNamespace); + $expectedResponse->setError($error); + $transport->addResponse($expectedResponse); + $request = new ExecuteAirflowCommandRequest(); + $response = $gapicClient->executeAirflowCommand($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.orchestration.airflow.service.v1.Environments/ExecuteAirflowCommand', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function executeAirflowCommandExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new ExecuteAirflowCommandRequest(); + try { + $gapicClient->executeAirflowCommand($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function fetchDatabasePropertiesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $primaryGceZone = 'primaryGceZone-1946545985'; + $secondaryGceZone = 'secondaryGceZone826699149'; + $isFailoverReplicaAvailable = true; + $expectedResponse = new FetchDatabasePropertiesResponse(); + $expectedResponse->setPrimaryGceZone($primaryGceZone); + $expectedResponse->setSecondaryGceZone($secondaryGceZone); + $expectedResponse->setIsFailoverReplicaAvailable($isFailoverReplicaAvailable); + $transport->addResponse($expectedResponse); + // Mock request + $formattedEnvironment = $gapicClient->environmentName('[PROJECT]', '[LOCATION]', '[ENVIRONMENT]'); + $request = (new FetchDatabasePropertiesRequest()) + ->setEnvironment($formattedEnvironment); + $response = $gapicClient->fetchDatabaseProperties($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.orchestration.airflow.service.v1.Environments/FetchDatabaseProperties', $actualFuncCall); + $actualValue = $actualRequestObject->getEnvironment(); + $this->assertProtobufEquals($formattedEnvironment, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function fetchDatabasePropertiesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedEnvironment = $gapicClient->environmentName('[PROJECT]', '[LOCATION]', '[ENVIRONMENT]'); + $request = (new FetchDatabasePropertiesRequest()) + ->setEnvironment($formattedEnvironment); + try { + $gapicClient->fetchDatabaseProperties($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getEnvironmentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $uuid = 'uuid3601339'; + $satisfiesPzs = false; + $satisfiesPzi = false; + $expectedResponse = new Environment(); + $expectedResponse->setName($name2); + $expectedResponse->setUuid($uuid); + $expectedResponse->setSatisfiesPzs($satisfiesPzs); + $expectedResponse->setSatisfiesPzi($satisfiesPzi); + $transport->addResponse($expectedResponse); + $request = new GetEnvironmentRequest(); + $response = $gapicClient->getEnvironment($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.orchestration.airflow.service.v1.Environments/GetEnvironment', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getEnvironmentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new GetEnvironmentRequest(); + try { + $gapicClient->getEnvironment($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getUserWorkloadsConfigMapTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new UserWorkloadsConfigMap(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->userWorkloadsConfigMapName('[PROJECT]', '[LOCATION]', '[ENVIRONMENT]', '[USER_WORKLOADS_CONFIG_MAP]'); + $request = (new GetUserWorkloadsConfigMapRequest()) + ->setName($formattedName); + $response = $gapicClient->getUserWorkloadsConfigMap($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.orchestration.airflow.service.v1.Environments/GetUserWorkloadsConfigMap', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getUserWorkloadsConfigMapExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->userWorkloadsConfigMapName('[PROJECT]', '[LOCATION]', '[ENVIRONMENT]', '[USER_WORKLOADS_CONFIG_MAP]'); + $request = (new GetUserWorkloadsConfigMapRequest()) + ->setName($formattedName); + try { + $gapicClient->getUserWorkloadsConfigMap($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getUserWorkloadsSecretTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new UserWorkloadsSecret(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->userWorkloadsSecretName('[PROJECT]', '[LOCATION]', '[ENVIRONMENT]', '[USER_WORKLOADS_SECRET]'); + $request = (new GetUserWorkloadsSecretRequest()) + ->setName($formattedName); + $response = $gapicClient->getUserWorkloadsSecret($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.orchestration.airflow.service.v1.Environments/GetUserWorkloadsSecret', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getUserWorkloadsSecretExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->userWorkloadsSecretName('[PROJECT]', '[LOCATION]', '[ENVIRONMENT]', '[USER_WORKLOADS_SECRET]'); + $request = (new GetUserWorkloadsSecretRequest()) + ->setName($formattedName); + try { + $gapicClient->getUserWorkloadsSecret($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listEnvironmentsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $environmentsElement = new Environment(); + $environments = [ + $environmentsElement, + ]; + $expectedResponse = new ListEnvironmentsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setEnvironments($environments); + $transport->addResponse($expectedResponse); + $request = new ListEnvironmentsRequest(); + $response = $gapicClient->listEnvironments($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getEnvironments()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.orchestration.airflow.service.v1.Environments/ListEnvironments', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listEnvironmentsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new ListEnvironmentsRequest(); + try { + $gapicClient->listEnvironments($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listUserWorkloadsConfigMapsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $userWorkloadsConfigMapsElement = new UserWorkloadsConfigMap(); + $userWorkloadsConfigMaps = [ + $userWorkloadsConfigMapsElement, + ]; + $expectedResponse = new ListUserWorkloadsConfigMapsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setUserWorkloadsConfigMaps($userWorkloadsConfigMaps); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->environmentName('[PROJECT]', '[LOCATION]', '[ENVIRONMENT]'); + $request = (new ListUserWorkloadsConfigMapsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listUserWorkloadsConfigMaps($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getUserWorkloadsConfigMaps()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.orchestration.airflow.service.v1.Environments/ListUserWorkloadsConfigMaps', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listUserWorkloadsConfigMapsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->environmentName('[PROJECT]', '[LOCATION]', '[ENVIRONMENT]'); + $request = (new ListUserWorkloadsConfigMapsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listUserWorkloadsConfigMaps($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listUserWorkloadsSecretsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $userWorkloadsSecretsElement = new UserWorkloadsSecret(); + $userWorkloadsSecrets = [ + $userWorkloadsSecretsElement, + ]; + $expectedResponse = new ListUserWorkloadsSecretsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setUserWorkloadsSecrets($userWorkloadsSecrets); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->environmentName('[PROJECT]', '[LOCATION]', '[ENVIRONMENT]'); + $request = (new ListUserWorkloadsSecretsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listUserWorkloadsSecrets($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getUserWorkloadsSecrets()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.orchestration.airflow.service.v1.Environments/ListUserWorkloadsSecrets', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listUserWorkloadsSecretsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->environmentName('[PROJECT]', '[LOCATION]', '[ENVIRONMENT]'); + $request = (new ListUserWorkloadsSecretsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listUserWorkloadsSecrets($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listWorkloadsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $workloadsElement = new ComposerWorkload(); + $workloads = [ + $workloadsElement, + ]; + $expectedResponse = new ListWorkloadsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setWorkloads($workloads); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->environmentName('[PROJECT]', '[LOCATION]', '[ENVIRONMENT]'); + $request = (new ListWorkloadsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listWorkloads($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getWorkloads()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.orchestration.airflow.service.v1.Environments/ListWorkloads', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listWorkloadsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->environmentName('[PROJECT]', '[LOCATION]', '[ENVIRONMENT]'); + $request = (new ListWorkloadsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listWorkloads($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function loadSnapshotTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/loadSnapshotTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new LoadSnapshotResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/loadSnapshotTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + $request = new LoadSnapshotRequest(); + $response = $gapicClient->loadSnapshot($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.orchestration.airflow.service.v1.Environments/LoadSnapshot', $actualApiFuncCall); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/loadSnapshotTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function loadSnapshotExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/loadSnapshotTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + $request = new LoadSnapshotRequest(); + $response = $gapicClient->loadSnapshot($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/loadSnapshotTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function pollAirflowCommandTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $outputEnd = false; + $expectedResponse = new PollAirflowCommandResponse(); + $expectedResponse->setOutputEnd($outputEnd); + $transport->addResponse($expectedResponse); + $request = new PollAirflowCommandRequest(); + $response = $gapicClient->pollAirflowCommand($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.orchestration.airflow.service.v1.Environments/PollAirflowCommand', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function pollAirflowCommandExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new PollAirflowCommandRequest(); + try { + $gapicClient->pollAirflowCommand($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function saveSnapshotTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/saveSnapshotTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $snapshotPath = 'snapshotPath1197949376'; + $expectedResponse = new SaveSnapshotResponse(); + $expectedResponse->setSnapshotPath($snapshotPath); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/saveSnapshotTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + $request = new SaveSnapshotRequest(); + $response = $gapicClient->saveSnapshot($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.orchestration.airflow.service.v1.Environments/SaveSnapshot', $actualApiFuncCall); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/saveSnapshotTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function saveSnapshotExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/saveSnapshotTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + $request = new SaveSnapshotRequest(); + $response = $gapicClient->saveSnapshot($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/saveSnapshotTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function stopAirflowCommandTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $isDone = false; + $expectedResponse = new StopAirflowCommandResponse(); + $expectedResponse->setIsDone($isDone); + $transport->addResponse($expectedResponse); + $request = new StopAirflowCommandRequest(); + $response = $gapicClient->stopAirflowCommand($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.orchestration.airflow.service.v1.Environments/StopAirflowCommand', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function stopAirflowCommandExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new StopAirflowCommandRequest(); + try { + $gapicClient->stopAirflowCommand($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateEnvironmentTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateEnvironmentTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $uuid = 'uuid3601339'; + $satisfiesPzs = false; + $satisfiesPzi = false; + $expectedResponse = new Environment(); + $expectedResponse->setName($name2); + $expectedResponse->setUuid($uuid); + $expectedResponse->setSatisfiesPzs($satisfiesPzs); + $expectedResponse->setSatisfiesPzi($satisfiesPzi); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateEnvironmentTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + $request = new UpdateEnvironmentRequest(); + $response = $gapicClient->updateEnvironment($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.orchestration.airflow.service.v1.Environments/UpdateEnvironment', $actualApiFuncCall); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateEnvironmentTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateEnvironmentExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateEnvironmentTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + $request = new UpdateEnvironmentRequest(); + $response = $gapicClient->updateEnvironment($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateEnvironmentTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateUserWorkloadsConfigMapTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $expectedResponse = new UserWorkloadsConfigMap(); + $expectedResponse->setName($name); + $transport->addResponse($expectedResponse); + $request = new UpdateUserWorkloadsConfigMapRequest(); + $response = $gapicClient->updateUserWorkloadsConfigMap($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.orchestration.airflow.service.v1.Environments/UpdateUserWorkloadsConfigMap', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateUserWorkloadsConfigMapExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new UpdateUserWorkloadsConfigMapRequest(); + try { + $gapicClient->updateUserWorkloadsConfigMap($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateUserWorkloadsSecretTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $expectedResponse = new UserWorkloadsSecret(); + $expectedResponse->setName($name); + $transport->addResponse($expectedResponse); + $request = new UpdateUserWorkloadsSecretRequest(); + $response = $gapicClient->updateUserWorkloadsSecret($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.orchestration.airflow.service.v1.Environments/UpdateUserWorkloadsSecret', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateUserWorkloadsSecretExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new UpdateUserWorkloadsSecretRequest(); + try { + $gapicClient->updateUserWorkloadsSecret($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function checkUpgradeAsyncTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/checkUpgradeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $buildLogUri = 'buildLogUri2127590688'; + $pypiConflictBuildLogExtract = 'pypiConflictBuildLogExtract-575404123'; + $imageVersion2 = 'imageVersion2-1876344665'; + $expectedResponse = new CheckUpgradeResponse(); + $expectedResponse->setBuildLogUri($buildLogUri); + $expectedResponse->setPypiConflictBuildLogExtract($pypiConflictBuildLogExtract); + $expectedResponse->setImageVersion($imageVersion2); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/checkUpgradeTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $environment = 'environment-85904877'; + $request = (new CheckUpgradeRequest()) + ->setEnvironment($environment); + $response = $gapicClient->checkUpgradeAsync($request)->wait(); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.orchestration.airflow.service.v1.Environments/CheckUpgrade', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getEnvironment(); + $this->assertProtobufEquals($environment, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/checkUpgradeTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } +} diff --git a/owl-bot-staging/OrchestrationAirflow/v1/tests/Unit/V1/Client/ImageVersionsClientTest.php b/owl-bot-staging/OrchestrationAirflow/v1/tests/Unit/V1/Client/ImageVersionsClientTest.php new file mode 100644 index 000000000000..e1effad02bf3 --- /dev/null +++ b/owl-bot-staging/OrchestrationAirflow/v1/tests/Unit/V1/Client/ImageVersionsClientTest.php @@ -0,0 +1,159 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return ImageVersionsClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new ImageVersionsClient($options); + } + + /** @test */ + public function listImageVersionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $imageVersionsElement = new ImageVersion(); + $imageVersions = [ + $imageVersionsElement, + ]; + $expectedResponse = new ListImageVersionsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setImageVersions($imageVersions); + $transport->addResponse($expectedResponse); + $request = new ListImageVersionsRequest(); + $response = $gapicClient->listImageVersions($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getImageVersions()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.orchestration.airflow.service.v1.ImageVersions/ListImageVersions', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listImageVersionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new ListImageVersionsRequest(); + try { + $gapicClient->listImageVersions($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listImageVersionsAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $imageVersionsElement = new ImageVersion(); + $imageVersions = [ + $imageVersionsElement, + ]; + $expectedResponse = new ListImageVersionsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setImageVersions($imageVersions); + $transport->addResponse($expectedResponse); + $request = new ListImageVersionsRequest(); + $response = $gapicClient->listImageVersionsAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getImageVersions()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.orchestration.airflow.service.v1.ImageVersions/ListImageVersions', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/OrgPolicy/v2/proto/src/GPBMetadata/Google/Cloud/Orgpolicy/V2/Constraint.php b/owl-bot-staging/OrgPolicy/v2/proto/src/GPBMetadata/Google/Cloud/Orgpolicy/V2/Constraint.php new file mode 100644 index 0000000000000000000000000000000000000000..a350fd91db0526422a7db1d8c3e1f0224e835a00 GIT binary patch literal 2426 zcmb7G&2HO95RNR{wMVWkGexU7{n;u3V)usv)U*ZYIt3-sicnb;WZFdv0R%;^WEM0@ zkV^xOp_l2g=N|e5J@nQ$=-DsOYllmTWGp*ybkTBW=9{1WW_Ex0(LeLy329T81_q-R z8C?=~Mu{JI%riZQjH2o@1MrwTpVq^xTjIhV3$u!veU*ISqZoq@>+%98qRi1~Z0jjxcP-2t##_Fg&gA z1DK8xhNPJy!4(kv`OyfykdPS+|DM{RZo4+K4aa_sxg3zO;e-^;7j?&xYckt&No=6H zCf(g531+PO)b}v=12T`PAD075G3>aE2Cm@@TQoES+h<zK%nvDm^jC22XkGzauzrd5{MUyQnt!?Hu)F)np3T8c%&Lnv7@QXsD?MZS3qLPmexqGKa+SY;VyoAvL-I};GI0CLM# zVlJq#<=7$9Gvvw&B9`jU?}yk$OtgI-b2u}odei>Gl;l)sjltvYOe_&!e+V|xfTs7ajDmK9>Vs5ziJn@Gw<_K zRpHa7+B?<;a;K;1E#*)?>1z5(@3^ltJBJ;mRem6>!;0MPsy~+t!Wt~Ml-{fIlJsZc zTK=N|Pcm91hlPv^MVyAU%$M*ba_LuUvaohFTTOFA4|mOUZcT-~vFBhWxSK5AqWUd5 zH(dKQ4mSj-UFARTHfwCdR_0J=mp-ljw+!WG6f*BT7xpd8ehi!QcHxF07Q8s8eHS*) zDLeD5nW%`O&H8t597>UoR}j_XSx{NS%~E}5p4WU(i0QD4r$Djl1LV?q3?CgS+Do;i zYp?ps4Tb@%HV2BVDM&F~pY&VtdMRGFl&*s7qELp7fpVmtDtdb$_q6h|umz;NO?&2v-0saRa literal 0 HcmV?d00001 diff --git a/owl-bot-staging/OrgPolicy/v2/proto/src/GPBMetadata/Google/Cloud/Orgpolicy/V2/Orgpolicy.php b/owl-bot-staging/OrgPolicy/v2/proto/src/GPBMetadata/Google/Cloud/Orgpolicy/V2/Orgpolicy.php new file mode 100644 index 0000000000000000000000000000000000000000..79aba35bded0aa976957ab736f9ee2ddb0085ec3 GIT binary patch literal 7185 zcmb_hy>r~w5f6?M&3mNe=rN`!+8RR;6@EwtM~{(TpZ`$dP3goXcFmyLU%K zAbyf%~|G}ecpc;C;phZlz>v>&=7%j)^wGA)m`krIAj*Np^@*ka9MaZ@GN$6WG zqHb=ly+b0aZADgNlNo5NQv;1HX`u1Awt`U0vBFS|7tt|N;g8?jg+0_TvLg6r-VU3# zYe%-_*dG9rRkdR|Apz~YY^Ue8BHMFSs<7p@$l{X9ZBp5J-vi{Us&r|a1_J`oc;H4P za4n~CpM0(%5+49}r?j z(pSC>QDBs;x7#rT--1eAj5$LYw17T0(9+N)imz}{omI0QSF?Ulo4YKmSiTL#PT9lD zdhX@agAS!gb60Rg2neGF)eHm?#G~cGuC?N93)vTiENdoEl?I{t6c1$^iXU=M_91IR zLb@4CL^3r(U`E)FApQn{`15t`7h`CAn>96j37w-oY*tZ~#p>GF7xnY_4mub5q%~WC zrODb2of|0#pw4Z)3&MBtV`L%#9C!m!7FI09UL`-p4((ToEyal zzyck(J9}PYQOw^cU)DcT(922QIT}b@sKZHMh%n4U41YvgQD_{CUnho7BV-f0#A0=V zwT|bsNdPPSN0AJrnC03Z@D^qqr~g|ZukE1ef?(i_Xxy=&weRuFoGB^V-^LJ10*t3b zd|0mWT{PMA;kY7AN*j^wIhixbDLpQCN{%sn51kKs4hbR0W5ABvQa)c^DRzjT4?z*X zh^B3Kj|6tq>;&F^)3*XByjhy)348&plaNF#g%fj6E7E_ax`oCMET;#XQv{Q>)loOs z-;Dy>?LKBkzWX&iO-bu`hfVmK1z-XeF`8%-_lT`gBGa`?=sDtcJeUr+qp&oOs!-2u zIHWz7xjR|AB>kcFrqg~mw~D6Hd*T^%k?ly@%^1qqVimuDF2JUCvRr}iR@cVSxhJ;U z)_#I!-nPRiIWEG7jN2|7y(#S-|CWP2vY{be;&{y zwiJ0!h|3DOs=4TLZuiiKW=61yCX=p4^Fm2c)-qDNUq;Wn|V)jcH6Hu^^Yz5?VOG$DI|KzL1NdLZrbKy(k#*Eb0VcO;>` z*4Kq4uv6QX_7GhGTN^Of!VGvoc&&d`qfZqyy&e$g4E^@b9{<-NbF77mli~F6(PmT8 zeu}2wV=b!Rk;EMD14Ej_M%?k}Au4>ycf5Ew(wb=cK5$?GMpa&i6sPebw~VKAAz)t)R>68Gl$o&$9@}gK>yoEn#FvR*-J4 zHi`;Qo%U3DRu?Dd&p!L-uPTT5I(@-E=7;HOJPt0O7)jBDJM&mei^+K~Bejed(^BaX zFf{sQ@xK)`MRBo^z-foe#^$u3L~opeUK)lMR(57tfrk!BlpDwyaQ)!S|$ZM z7HKTt8)=ywXeo*Rp`dDf0^%~3#!?dN>78CXepY91G%TwU8-2w|(hcG#OBu!n+v?2Z!z*6F-|;Hv{MOhig{&cNjr`Bv8bU9 z$A77Se+e;2k2j?;NDGb-gFmu1$7U}E{v)N^(=L1n?Rv@W7X7ZB zzU}gNS7LYl-9J>WY_bb3eVtx#>9KMBaqVOItRZf{==Ik&J8Bwm|Mg|%C9Z0kOxHBy k$ENwXwmZ(+_ML_Ji~lWtr6Sb2|7XOe>F9^i~s-t literal 0 HcmV?d00001 diff --git a/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/AlternatePolicySpec.php b/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/AlternatePolicySpec.php new file mode 100644 index 000000000000..4d3a507f2019 --- /dev/null +++ b/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/AlternatePolicySpec.php @@ -0,0 +1,120 @@ +google.cloud.orgpolicy.v2.AlternatePolicySpec + */ +class AlternatePolicySpec extends \Google\Protobuf\Internal\Message +{ + /** + * Reference to the launch that will be used while audit logging and to + * control the launch. + * Should be set only in the alternate policy. + * + * Generated from protobuf field string launch = 1; + */ + protected $launch = ''; + /** + * Specify constraint for configurations of Google Cloud resources. + * + * Generated from protobuf field .google.cloud.orgpolicy.v2.PolicySpec spec = 2; + */ + protected $spec = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $launch + * Reference to the launch that will be used while audit logging and to + * control the launch. + * Should be set only in the alternate policy. + * @type \Google\Cloud\OrgPolicy\V2\PolicySpec $spec + * Specify constraint for configurations of Google Cloud resources. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orgpolicy\V2\Orgpolicy::initOnce(); + parent::__construct($data); + } + + /** + * Reference to the launch that will be used while audit logging and to + * control the launch. + * Should be set only in the alternate policy. + * + * Generated from protobuf field string launch = 1; + * @return string + */ + public function getLaunch() + { + return $this->launch; + } + + /** + * Reference to the launch that will be used while audit logging and to + * control the launch. + * Should be set only in the alternate policy. + * + * Generated from protobuf field string launch = 1; + * @param string $var + * @return $this + */ + public function setLaunch($var) + { + GPBUtil::checkString($var, True); + $this->launch = $var; + + return $this; + } + + /** + * Specify constraint for configurations of Google Cloud resources. + * + * Generated from protobuf field .google.cloud.orgpolicy.v2.PolicySpec spec = 2; + * @return \Google\Cloud\OrgPolicy\V2\PolicySpec|null + */ + public function getSpec() + { + return $this->spec; + } + + public function hasSpec() + { + return isset($this->spec); + } + + public function clearSpec() + { + unset($this->spec); + } + + /** + * Specify constraint for configurations of Google Cloud resources. + * + * Generated from protobuf field .google.cloud.orgpolicy.v2.PolicySpec spec = 2; + * @param \Google\Cloud\OrgPolicy\V2\PolicySpec $var + * @return $this + */ + public function setSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OrgPolicy\V2\PolicySpec::class); + $this->spec = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/Constraint.php b/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/Constraint.php new file mode 100644 index 000000000000..4b0d15284a17 --- /dev/null +++ b/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/Constraint.php @@ -0,0 +1,322 @@ +google.cloud.orgpolicy.v2.Constraint + */ +class Constraint extends \Google\Protobuf\Internal\Message +{ + /** + * Immutable. The resource name of the constraint. Must be in one of + * the following forms: + * * `projects/{project_number}/constraints/{constraint_name}` + * * `folders/{folder_id}/constraints/{constraint_name}` + * * `organizations/{organization_id}/constraints/{constraint_name}` + * For example, "/projects/123/constraints/compute.disableSerialPortAccess". + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $name = ''; + /** + * The human readable name. + * Mutable. + * + * Generated from protobuf field string display_name = 2; + */ + protected $display_name = ''; + /** + * Detailed description of what this constraint controls as well as how and + * where it is enforced. + * Mutable. + * + * Generated from protobuf field string description = 3; + */ + protected $description = ''; + /** + * The evaluation behavior of this constraint in the absence of a policy. + * + * Generated from protobuf field .google.cloud.orgpolicy.v2.Constraint.ConstraintDefault constraint_default = 4; + */ + protected $constraint_default = 0; + /** + * Shows if dry run is supported for this constraint or not. + * + * Generated from protobuf field bool supports_dry_run = 7; + */ + protected $supports_dry_run = false; + protected $constraint_type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Immutable. The resource name of the constraint. Must be in one of + * the following forms: + * * `projects/{project_number}/constraints/{constraint_name}` + * * `folders/{folder_id}/constraints/{constraint_name}` + * * `organizations/{organization_id}/constraints/{constraint_name}` + * For example, "/projects/123/constraints/compute.disableSerialPortAccess". + * @type string $display_name + * The human readable name. + * Mutable. + * @type string $description + * Detailed description of what this constraint controls as well as how and + * where it is enforced. + * Mutable. + * @type int $constraint_default + * The evaluation behavior of this constraint in the absence of a policy. + * @type \Google\Cloud\OrgPolicy\V2\Constraint\ListConstraint $list_constraint + * Defines this constraint as being a ListConstraint. + * @type \Google\Cloud\OrgPolicy\V2\Constraint\BooleanConstraint $boolean_constraint + * Defines this constraint as being a BooleanConstraint. + * @type bool $supports_dry_run + * Shows if dry run is supported for this constraint or not. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orgpolicy\V2\Constraint::initOnce(); + parent::__construct($data); + } + + /** + * Immutable. The resource name of the constraint. Must be in one of + * the following forms: + * * `projects/{project_number}/constraints/{constraint_name}` + * * `folders/{folder_id}/constraints/{constraint_name}` + * * `organizations/{organization_id}/constraints/{constraint_name}` + * For example, "/projects/123/constraints/compute.disableSerialPortAccess". + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Immutable. The resource name of the constraint. Must be in one of + * the following forms: + * * `projects/{project_number}/constraints/{constraint_name}` + * * `folders/{folder_id}/constraints/{constraint_name}` + * * `organizations/{organization_id}/constraints/{constraint_name}` + * For example, "/projects/123/constraints/compute.disableSerialPortAccess". + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The human readable name. + * Mutable. + * + * Generated from protobuf field string display_name = 2; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * The human readable name. + * Mutable. + * + * Generated from protobuf field string display_name = 2; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Detailed description of what this constraint controls as well as how and + * where it is enforced. + * Mutable. + * + * Generated from protobuf field string description = 3; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Detailed description of what this constraint controls as well as how and + * where it is enforced. + * Mutable. + * + * Generated from protobuf field string description = 3; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * The evaluation behavior of this constraint in the absence of a policy. + * + * Generated from protobuf field .google.cloud.orgpolicy.v2.Constraint.ConstraintDefault constraint_default = 4; + * @return int + */ + public function getConstraintDefault() + { + return $this->constraint_default; + } + + /** + * The evaluation behavior of this constraint in the absence of a policy. + * + * Generated from protobuf field .google.cloud.orgpolicy.v2.Constraint.ConstraintDefault constraint_default = 4; + * @param int $var + * @return $this + */ + public function setConstraintDefault($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\OrgPolicy\V2\Constraint\ConstraintDefault::class); + $this->constraint_default = $var; + + return $this; + } + + /** + * Defines this constraint as being a ListConstraint. + * + * Generated from protobuf field .google.cloud.orgpolicy.v2.Constraint.ListConstraint list_constraint = 5; + * @return \Google\Cloud\OrgPolicy\V2\Constraint\ListConstraint|null + */ + public function getListConstraint() + { + return $this->readOneof(5); + } + + public function hasListConstraint() + { + return $this->hasOneof(5); + } + + /** + * Defines this constraint as being a ListConstraint. + * + * Generated from protobuf field .google.cloud.orgpolicy.v2.Constraint.ListConstraint list_constraint = 5; + * @param \Google\Cloud\OrgPolicy\V2\Constraint\ListConstraint $var + * @return $this + */ + public function setListConstraint($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OrgPolicy\V2\Constraint\ListConstraint::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Defines this constraint as being a BooleanConstraint. + * + * Generated from protobuf field .google.cloud.orgpolicy.v2.Constraint.BooleanConstraint boolean_constraint = 6; + * @return \Google\Cloud\OrgPolicy\V2\Constraint\BooleanConstraint|null + */ + public function getBooleanConstraint() + { + return $this->readOneof(6); + } + + public function hasBooleanConstraint() + { + return $this->hasOneof(6); + } + + /** + * Defines this constraint as being a BooleanConstraint. + * + * Generated from protobuf field .google.cloud.orgpolicy.v2.Constraint.BooleanConstraint boolean_constraint = 6; + * @param \Google\Cloud\OrgPolicy\V2\Constraint\BooleanConstraint $var + * @return $this + */ + public function setBooleanConstraint($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OrgPolicy\V2\Constraint\BooleanConstraint::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * Shows if dry run is supported for this constraint or not. + * + * Generated from protobuf field bool supports_dry_run = 7; + * @return bool + */ + public function getSupportsDryRun() + { + return $this->supports_dry_run; + } + + /** + * Shows if dry run is supported for this constraint or not. + * + * Generated from protobuf field bool supports_dry_run = 7; + * @param bool $var + * @return $this + */ + public function setSupportsDryRun($var) + { + GPBUtil::checkBool($var); + $this->supports_dry_run = $var; + + return $this; + } + + /** + * @return string + */ + public function getConstraintType() + { + return $this->whichOneof("constraint_type"); + } + +} + diff --git a/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/Constraint/BooleanConstraint.php b/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/Constraint/BooleanConstraint.php new file mode 100644 index 000000000000..0302a06ca9cf --- /dev/null +++ b/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/Constraint/BooleanConstraint.php @@ -0,0 +1,39 @@ +google.cloud.orgpolicy.v2.Constraint.BooleanConstraint + */ +class BooleanConstraint extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orgpolicy\V2\Constraint::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(BooleanConstraint::class, \Google\Cloud\OrgPolicy\V2\Constraint_BooleanConstraint::class); + diff --git a/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/Constraint/ConstraintDefault.php b/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/Constraint/ConstraintDefault.php new file mode 100644 index 000000000000..b7eaebc4f0ca --- /dev/null +++ b/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/Constraint/ConstraintDefault.php @@ -0,0 +1,69 @@ +google.cloud.orgpolicy.v2.Constraint.ConstraintDefault + */ +class ConstraintDefault +{ + /** + * This is only used for distinguishing unset values and should never be + * used. + * + * Generated from protobuf enum CONSTRAINT_DEFAULT_UNSPECIFIED = 0; + */ + const CONSTRAINT_DEFAULT_UNSPECIFIED = 0; + /** + * Indicate that all values are allowed for list constraints. + * Indicate that enforcement is off for boolean constraints. + * + * Generated from protobuf enum ALLOW = 1; + */ + const ALLOW = 1; + /** + * Indicate that all values are denied for list constraints. + * Indicate that enforcement is on for boolean constraints. + * + * Generated from protobuf enum DENY = 2; + */ + const DENY = 2; + + private static $valueToName = [ + self::CONSTRAINT_DEFAULT_UNSPECIFIED => 'CONSTRAINT_DEFAULT_UNSPECIFIED', + self::ALLOW => 'ALLOW', + self::DENY => 'DENY', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ConstraintDefault::class, \Google\Cloud\OrgPolicy\V2\Constraint_ConstraintDefault::class); + diff --git a/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/Constraint/ListConstraint.php b/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/Constraint/ListConstraint.php new file mode 100644 index 000000000000..c37b41858aed --- /dev/null +++ b/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/Constraint/ListConstraint.php @@ -0,0 +1,125 @@ +google.cloud.orgpolicy.v2.Constraint.ListConstraint + */ +class ListConstraint extends \Google\Protobuf\Internal\Message +{ + /** + * Indicates whether values grouped into categories can be used in + * `Policy.allowed_values` and `Policy.denied_values`. For example, + * `"in:Python"` would match any value in the 'Python' group. + * + * Generated from protobuf field bool supports_in = 1; + */ + protected $supports_in = false; + /** + * Indicates whether subtrees of the Resource Manager resource hierarchy + * can be used in `Policy.allowed_values` and `Policy.denied_values`. For + * example, `"under:folders/123"` would match any resource under the + * 'folders/123' folder. + * + * Generated from protobuf field bool supports_under = 2; + */ + protected $supports_under = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $supports_in + * Indicates whether values grouped into categories can be used in + * `Policy.allowed_values` and `Policy.denied_values`. For example, + * `"in:Python"` would match any value in the 'Python' group. + * @type bool $supports_under + * Indicates whether subtrees of the Resource Manager resource hierarchy + * can be used in `Policy.allowed_values` and `Policy.denied_values`. For + * example, `"under:folders/123"` would match any resource under the + * 'folders/123' folder. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orgpolicy\V2\Constraint::initOnce(); + parent::__construct($data); + } + + /** + * Indicates whether values grouped into categories can be used in + * `Policy.allowed_values` and `Policy.denied_values`. For example, + * `"in:Python"` would match any value in the 'Python' group. + * + * Generated from protobuf field bool supports_in = 1; + * @return bool + */ + public function getSupportsIn() + { + return $this->supports_in; + } + + /** + * Indicates whether values grouped into categories can be used in + * `Policy.allowed_values` and `Policy.denied_values`. For example, + * `"in:Python"` would match any value in the 'Python' group. + * + * Generated from protobuf field bool supports_in = 1; + * @param bool $var + * @return $this + */ + public function setSupportsIn($var) + { + GPBUtil::checkBool($var); + $this->supports_in = $var; + + return $this; + } + + /** + * Indicates whether subtrees of the Resource Manager resource hierarchy + * can be used in `Policy.allowed_values` and `Policy.denied_values`. For + * example, `"under:folders/123"` would match any resource under the + * 'folders/123' folder. + * + * Generated from protobuf field bool supports_under = 2; + * @return bool + */ + public function getSupportsUnder() + { + return $this->supports_under; + } + + /** + * Indicates whether subtrees of the Resource Manager resource hierarchy + * can be used in `Policy.allowed_values` and `Policy.denied_values`. For + * example, `"under:folders/123"` would match any resource under the + * 'folders/123' folder. + * + * Generated from protobuf field bool supports_under = 2; + * @param bool $var + * @return $this + */ + public function setSupportsUnder($var) + { + GPBUtil::checkBool($var); + $this->supports_under = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ListConstraint::class, \Google\Cloud\OrgPolicy\V2\Constraint_ListConstraint::class); + diff --git a/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/CreateCustomConstraintRequest.php b/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/CreateCustomConstraintRequest.php new file mode 100644 index 000000000000..4a0a404d1671 --- /dev/null +++ b/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/CreateCustomConstraintRequest.php @@ -0,0 +1,134 @@ +google.cloud.orgpolicy.v2.CreateCustomConstraintRequest + */ +class CreateCustomConstraintRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Must be in the following form: + * * `organizations/{organization_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Custom constraint to create. + * + * Generated from protobuf field .google.cloud.orgpolicy.v2.CustomConstraint custom_constraint = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $custom_constraint = null; + + /** + * @param string $parent Required. Must be in the following form: + * + * * `organizations/{organization_id}` + * Please see {@see OrgPolicyClient::organizationName()} for help formatting this field. + * @param \Google\Cloud\OrgPolicy\V2\CustomConstraint $customConstraint Required. Custom constraint to create. + * + * @return \Google\Cloud\OrgPolicy\V2\CreateCustomConstraintRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\OrgPolicy\V2\CustomConstraint $customConstraint): self + { + return (new self()) + ->setParent($parent) + ->setCustomConstraint($customConstraint); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Must be in the following form: + * * `organizations/{organization_id}` + * @type \Google\Cloud\OrgPolicy\V2\CustomConstraint $custom_constraint + * Required. Custom constraint to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orgpolicy\V2\Orgpolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. Must be in the following form: + * * `organizations/{organization_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Must be in the following form: + * * `organizations/{organization_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. Custom constraint to create. + * + * Generated from protobuf field .google.cloud.orgpolicy.v2.CustomConstraint custom_constraint = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\OrgPolicy\V2\CustomConstraint|null + */ + public function getCustomConstraint() + { + return $this->custom_constraint; + } + + public function hasCustomConstraint() + { + return isset($this->custom_constraint); + } + + public function clearCustomConstraint() + { + unset($this->custom_constraint); + } + + /** + * Required. Custom constraint to create. + * + * Generated from protobuf field .google.cloud.orgpolicy.v2.CustomConstraint custom_constraint = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\OrgPolicy\V2\CustomConstraint $var + * @return $this + */ + public function setCustomConstraint($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OrgPolicy\V2\CustomConstraint::class); + $this->custom_constraint = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/CreatePolicyRequest.php b/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/CreatePolicyRequest.php new file mode 100644 index 000000000000..adbbed633510 --- /dev/null +++ b/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/CreatePolicyRequest.php @@ -0,0 +1,154 @@ +google.cloud.orgpolicy.v2.CreatePolicyRequest + */ +class CreatePolicyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The Google Cloud resource that will parent the new policy. Must + * be in one of the following forms: + * * `projects/{project_number}` + * * `projects/{project_id}` + * * `folders/{folder_id}` + * * `organizations/{organization_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Policy to create. + * + * Generated from protobuf field .google.cloud.orgpolicy.v2.Policy policy = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $policy = null; + + /** + * @param string $parent Required. The Google Cloud resource that will parent the new policy. Must + * be in one of the following forms: + * + * * `projects/{project_number}` + * * `projects/{project_id}` + * * `folders/{folder_id}` + * * `organizations/{organization_id}` + * Please see {@see OrgPolicyClient::projectName()} for help formatting this field. + * @param \Google\Cloud\OrgPolicy\V2\Policy $policy Required. Policy to create. + * + * @return \Google\Cloud\OrgPolicy\V2\CreatePolicyRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\OrgPolicy\V2\Policy $policy): self + { + return (new self()) + ->setParent($parent) + ->setPolicy($policy); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The Google Cloud resource that will parent the new policy. Must + * be in one of the following forms: + * * `projects/{project_number}` + * * `projects/{project_id}` + * * `folders/{folder_id}` + * * `organizations/{organization_id}` + * @type \Google\Cloud\OrgPolicy\V2\Policy $policy + * Required. Policy to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orgpolicy\V2\Orgpolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. The Google Cloud resource that will parent the new policy. Must + * be in one of the following forms: + * * `projects/{project_number}` + * * `projects/{project_id}` + * * `folders/{folder_id}` + * * `organizations/{organization_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The Google Cloud resource that will parent the new policy. Must + * be in one of the following forms: + * * `projects/{project_number}` + * * `projects/{project_id}` + * * `folders/{folder_id}` + * * `organizations/{organization_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. Policy to create. + * + * Generated from protobuf field .google.cloud.orgpolicy.v2.Policy policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\OrgPolicy\V2\Policy|null + */ + public function getPolicy() + { + return $this->policy; + } + + public function hasPolicy() + { + return isset($this->policy); + } + + public function clearPolicy() + { + unset($this->policy); + } + + /** + * Required. Policy to create. + * + * Generated from protobuf field .google.cloud.orgpolicy.v2.Policy policy = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\OrgPolicy\V2\Policy $var + * @return $this + */ + public function setPolicy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OrgPolicy\V2\Policy::class); + $this->policy = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/CustomConstraint.php b/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/CustomConstraint.php new file mode 100644 index 000000000000..db6db0d97896 --- /dev/null +++ b/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/CustomConstraint.php @@ -0,0 +1,375 @@ +google.cloud.orgpolicy.v2.CustomConstraint + */ +class CustomConstraint extends \Google\Protobuf\Internal\Message +{ + /** + * Immutable. Name of the constraint. This is unique within the organization. + * Format of the name should be + * * `organizations/{organization_id}/customConstraints/{custom_constraint_id}` + * Example: `organizations/123/customConstraints/custom.createOnlyE2TypeVms` + * The max length is 70 characters and the minimum length is 1. Note that the + * prefix `organizations/{organization_id}/customConstraints/` is not counted. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $name = ''; + /** + * Immutable. The resource instance type on which this policy applies. Format + * will be of the form : `/` Example: + * * `compute.googleapis.com/Instance`. + * + * Generated from protobuf field repeated string resource_types = 2 [(.google.api.field_behavior) = IMMUTABLE]; + */ + private $resource_types; + /** + * All the operations being applied for this constraint. + * + * Generated from protobuf field repeated .google.cloud.orgpolicy.v2.CustomConstraint.MethodType method_types = 3; + */ + private $method_types; + /** + * Org policy condition/expression. For example: + * `resource.instanceName.matches("[production|test]_.*_(\d)+")` or, + * `resource.management.auto_upgrade == true` + * The max length of the condition is 1000 characters. + * + * Generated from protobuf field string condition = 4; + */ + protected $condition = ''; + /** + * Allow or deny type. + * + * Generated from protobuf field .google.cloud.orgpolicy.v2.CustomConstraint.ActionType action_type = 5; + */ + protected $action_type = 0; + /** + * One line display name for the UI. + * The max length of the display_name is 200 characters. + * + * Generated from protobuf field string display_name = 6; + */ + protected $display_name = ''; + /** + * Detailed information about this custom policy constraint. + * The max length of the description is 2000 characters. + * + * Generated from protobuf field string description = 7; + */ + protected $description = ''; + /** + * Output only. The last time this custom constraint was updated. This + * represents the last time that the `CreateCustomConstraint` or + * `UpdateCustomConstraint` RPC was called + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Immutable. Name of the constraint. This is unique within the organization. + * Format of the name should be + * * `organizations/{organization_id}/customConstraints/{custom_constraint_id}` + * Example: `organizations/123/customConstraints/custom.createOnlyE2TypeVms` + * The max length is 70 characters and the minimum length is 1. Note that the + * prefix `organizations/{organization_id}/customConstraints/` is not counted. + * @type array|\Google\Protobuf\Internal\RepeatedField $resource_types + * Immutable. The resource instance type on which this policy applies. Format + * will be of the form : `/` Example: + * * `compute.googleapis.com/Instance`. + * @type array|\Google\Protobuf\Internal\RepeatedField $method_types + * All the operations being applied for this constraint. + * @type string $condition + * Org policy condition/expression. For example: + * `resource.instanceName.matches("[production|test]_.*_(\d)+")` or, + * `resource.management.auto_upgrade == true` + * The max length of the condition is 1000 characters. + * @type int $action_type + * Allow or deny type. + * @type string $display_name + * One line display name for the UI. + * The max length of the display_name is 200 characters. + * @type string $description + * Detailed information about this custom policy constraint. + * The max length of the description is 2000 characters. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The last time this custom constraint was updated. This + * represents the last time that the `CreateCustomConstraint` or + * `UpdateCustomConstraint` RPC was called + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orgpolicy\V2\Constraint::initOnce(); + parent::__construct($data); + } + + /** + * Immutable. Name of the constraint. This is unique within the organization. + * Format of the name should be + * * `organizations/{organization_id}/customConstraints/{custom_constraint_id}` + * Example: `organizations/123/customConstraints/custom.createOnlyE2TypeVms` + * The max length is 70 characters and the minimum length is 1. Note that the + * prefix `organizations/{organization_id}/customConstraints/` is not counted. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Immutable. Name of the constraint. This is unique within the organization. + * Format of the name should be + * * `organizations/{organization_id}/customConstraints/{custom_constraint_id}` + * Example: `organizations/123/customConstraints/custom.createOnlyE2TypeVms` + * The max length is 70 characters and the minimum length is 1. Note that the + * prefix `organizations/{organization_id}/customConstraints/` is not counted. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Immutable. The resource instance type on which this policy applies. Format + * will be of the form : `/` Example: + * * `compute.googleapis.com/Instance`. + * + * Generated from protobuf field repeated string resource_types = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getResourceTypes() + { + return $this->resource_types; + } + + /** + * Immutable. The resource instance type on which this policy applies. Format + * will be of the form : `/` Example: + * * `compute.googleapis.com/Instance`. + * + * Generated from protobuf field repeated string resource_types = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setResourceTypes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->resource_types = $arr; + + return $this; + } + + /** + * All the operations being applied for this constraint. + * + * Generated from protobuf field repeated .google.cloud.orgpolicy.v2.CustomConstraint.MethodType method_types = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMethodTypes() + { + return $this->method_types; + } + + /** + * All the operations being applied for this constraint. + * + * Generated from protobuf field repeated .google.cloud.orgpolicy.v2.CustomConstraint.MethodType method_types = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMethodTypes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\OrgPolicy\V2\CustomConstraint\MethodType::class); + $this->method_types = $arr; + + return $this; + } + + /** + * Org policy condition/expression. For example: + * `resource.instanceName.matches("[production|test]_.*_(\d)+")` or, + * `resource.management.auto_upgrade == true` + * The max length of the condition is 1000 characters. + * + * Generated from protobuf field string condition = 4; + * @return string + */ + public function getCondition() + { + return $this->condition; + } + + /** + * Org policy condition/expression. For example: + * `resource.instanceName.matches("[production|test]_.*_(\d)+")` or, + * `resource.management.auto_upgrade == true` + * The max length of the condition is 1000 characters. + * + * Generated from protobuf field string condition = 4; + * @param string $var + * @return $this + */ + public function setCondition($var) + { + GPBUtil::checkString($var, True); + $this->condition = $var; + + return $this; + } + + /** + * Allow or deny type. + * + * Generated from protobuf field .google.cloud.orgpolicy.v2.CustomConstraint.ActionType action_type = 5; + * @return int + */ + public function getActionType() + { + return $this->action_type; + } + + /** + * Allow or deny type. + * + * Generated from protobuf field .google.cloud.orgpolicy.v2.CustomConstraint.ActionType action_type = 5; + * @param int $var + * @return $this + */ + public function setActionType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\OrgPolicy\V2\CustomConstraint\ActionType::class); + $this->action_type = $var; + + return $this; + } + + /** + * One line display name for the UI. + * The max length of the display_name is 200 characters. + * + * Generated from protobuf field string display_name = 6; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * One line display name for the UI. + * The max length of the display_name is 200 characters. + * + * Generated from protobuf field string display_name = 6; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Detailed information about this custom policy constraint. + * The max length of the description is 2000 characters. + * + * Generated from protobuf field string description = 7; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Detailed information about this custom policy constraint. + * The max length of the description is 2000 characters. + * + * Generated from protobuf field string description = 7; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Output only. The last time this custom constraint was updated. This + * represents the last time that the `CreateCustomConstraint` or + * `UpdateCustomConstraint` RPC was called + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The last time this custom constraint was updated. This + * represents the last time that the `CreateCustomConstraint` or + * `UpdateCustomConstraint` RPC was called + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/CustomConstraint/ActionType.php b/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/CustomConstraint/ActionType.php new file mode 100644 index 000000000000..b86b75e0c8ae --- /dev/null +++ b/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/CustomConstraint/ActionType.php @@ -0,0 +1,64 @@ +google.cloud.orgpolicy.v2.CustomConstraint.ActionType + */ +class ActionType +{ + /** + * Unspecified. Results in an error. + * + * Generated from protobuf enum ACTION_TYPE_UNSPECIFIED = 0; + */ + const ACTION_TYPE_UNSPECIFIED = 0; + /** + * Allowed action type. + * + * Generated from protobuf enum ALLOW = 1; + */ + const ALLOW = 1; + /** + * Deny action type. + * + * Generated from protobuf enum DENY = 2; + */ + const DENY = 2; + + private static $valueToName = [ + self::ACTION_TYPE_UNSPECIFIED => 'ACTION_TYPE_UNSPECIFIED', + self::ALLOW => 'ALLOW', + self::DENY => 'DENY', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ActionType::class, \Google\Cloud\OrgPolicy\V2\CustomConstraint_ActionType::class); + diff --git a/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/CustomConstraint/MethodType.php b/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/CustomConstraint/MethodType.php new file mode 100644 index 000000000000..d1077ce64749 --- /dev/null +++ b/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/CustomConstraint/MethodType.php @@ -0,0 +1,91 @@ +google.cloud.orgpolicy.v2.CustomConstraint.MethodType + */ +class MethodType +{ + /** + * Unspecified. Results in an error. + * + * Generated from protobuf enum METHOD_TYPE_UNSPECIFIED = 0; + */ + const METHOD_TYPE_UNSPECIFIED = 0; + /** + * Constraint applied when creating the resource. + * + * Generated from protobuf enum CREATE = 1; + */ + const CREATE = 1; + /** + * Constraint applied when updating the resource. + * + * Generated from protobuf enum UPDATE = 2; + */ + const UPDATE = 2; + /** + * Constraint applied when deleting the resource. + * Not supported yet. + * + * Generated from protobuf enum DELETE = 3; + */ + const DELETE = 3; + /** + * Constraint applied when removing an IAM grant. + * + * Generated from protobuf enum REMOVE_GRANT = 4; + */ + const REMOVE_GRANT = 4; + /** + * Constraint applied when enforcing forced tagging. + * + * Generated from protobuf enum GOVERN_TAGS = 5; + */ + const GOVERN_TAGS = 5; + + private static $valueToName = [ + self::METHOD_TYPE_UNSPECIFIED => 'METHOD_TYPE_UNSPECIFIED', + self::CREATE => 'CREATE', + self::UPDATE => 'UPDATE', + self::DELETE => 'DELETE', + self::REMOVE_GRANT => 'REMOVE_GRANT', + self::GOVERN_TAGS => 'GOVERN_TAGS', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(MethodType::class, \Google\Cloud\OrgPolicy\V2\CustomConstraint_MethodType::class); + diff --git a/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/DeleteCustomConstraintRequest.php b/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/DeleteCustomConstraintRequest.php new file mode 100644 index 000000000000..76d93c9521c7 --- /dev/null +++ b/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/DeleteCustomConstraintRequest.php @@ -0,0 +1,87 @@ +google.cloud.orgpolicy.v2.DeleteCustomConstraintRequest + */ +class DeleteCustomConstraintRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the custom constraint to delete. + * See the custom constraint entry for naming rules. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Name of the custom constraint to delete. + * See the custom constraint entry for naming rules. Please see + * {@see OrgPolicyClient::customConstraintName()} for help formatting this field. + * + * @return \Google\Cloud\OrgPolicy\V2\DeleteCustomConstraintRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the custom constraint to delete. + * See the custom constraint entry for naming rules. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orgpolicy\V2\Orgpolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the custom constraint to delete. + * See the custom constraint entry for naming rules. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the custom constraint to delete. + * See the custom constraint entry for naming rules. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/DeletePolicyRequest.php b/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/DeletePolicyRequest.php new file mode 100644 index 000000000000..05b6ac45c430 --- /dev/null +++ b/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/DeletePolicyRequest.php @@ -0,0 +1,129 @@ +google.cloud.orgpolicy.v2.DeletePolicyRequest + */ +class DeletePolicyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the policy to delete. + * See the policy entry for naming rules. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. The current etag of policy. If an etag is provided and does not + * match the current etag of the policy, deletion will be blocked and an + * ABORTED error will be returned. + * + * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $etag = ''; + + /** + * @param string $name Required. Name of the policy to delete. + * See the policy entry for naming rules. Please see + * {@see OrgPolicyClient::policyName()} for help formatting this field. + * + * @return \Google\Cloud\OrgPolicy\V2\DeletePolicyRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the policy to delete. + * See the policy entry for naming rules. + * @type string $etag + * Optional. The current etag of policy. If an etag is provided and does not + * match the current etag of the policy, deletion will be blocked and an + * ABORTED error will be returned. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orgpolicy\V2\Orgpolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the policy to delete. + * See the policy entry for naming rules. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the policy to delete. + * See the policy entry for naming rules. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. The current etag of policy. If an etag is provided and does not + * match the current etag of the policy, deletion will be blocked and an + * ABORTED error will be returned. + * + * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * Optional. The current etag of policy. If an etag is provided and does not + * match the current etag of the policy, deletion will be blocked and an + * ABORTED error will be returned. + * + * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/GetCustomConstraintRequest.php b/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/GetCustomConstraintRequest.php new file mode 100644 index 000000000000..f169a5d51f9c --- /dev/null +++ b/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/GetCustomConstraintRequest.php @@ -0,0 +1,87 @@ +google.cloud.orgpolicy.v2.GetCustomConstraintRequest + */ +class GetCustomConstraintRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the custom constraint. See the custom constraint + * entry for naming requirements. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Resource name of the custom constraint. See the custom constraint + * entry for naming requirements. Please see + * {@see OrgPolicyClient::customConstraintName()} for help formatting this field. + * + * @return \Google\Cloud\OrgPolicy\V2\GetCustomConstraintRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Resource name of the custom constraint. See the custom constraint + * entry for naming requirements. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orgpolicy\V2\Orgpolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the custom constraint. See the custom constraint + * entry for naming requirements. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Resource name of the custom constraint. See the custom constraint + * entry for naming requirements. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/GetEffectivePolicyRequest.php b/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/GetEffectivePolicyRequest.php new file mode 100644 index 000000000000..338899f8a5e9 --- /dev/null +++ b/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/GetEffectivePolicyRequest.php @@ -0,0 +1,87 @@ +google.cloud.orgpolicy.v2.GetEffectivePolicyRequest + */ +class GetEffectivePolicyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The effective policy to compute. See + * [Policy][google.cloud.orgpolicy.v2.Policy] for naming requirements. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The effective policy to compute. See + * [Policy][google.cloud.orgpolicy.v2.Policy] for naming requirements. Please see + * {@see OrgPolicyClient::policyName()} for help formatting this field. + * + * @return \Google\Cloud\OrgPolicy\V2\GetEffectivePolicyRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The effective policy to compute. See + * [Policy][google.cloud.orgpolicy.v2.Policy] for naming requirements. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orgpolicy\V2\Orgpolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. The effective policy to compute. See + * [Policy][google.cloud.orgpolicy.v2.Policy] for naming requirements. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The effective policy to compute. See + * [Policy][google.cloud.orgpolicy.v2.Policy] for naming requirements. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/GetPolicyRequest.php b/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/GetPolicyRequest.php new file mode 100644 index 000000000000..f48f61f6804a --- /dev/null +++ b/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/GetPolicyRequest.php @@ -0,0 +1,87 @@ +google.cloud.orgpolicy.v2.GetPolicyRequest + */ +class GetPolicyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the policy. See + * [Policy][google.cloud.orgpolicy.v2.Policy] for naming requirements. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Resource name of the policy. See + * [Policy][google.cloud.orgpolicy.v2.Policy] for naming requirements. Please see + * {@see OrgPolicyClient::policyName()} for help formatting this field. + * + * @return \Google\Cloud\OrgPolicy\V2\GetPolicyRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Resource name of the policy. See + * [Policy][google.cloud.orgpolicy.v2.Policy] for naming requirements. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orgpolicy\V2\Orgpolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the policy. See + * [Policy][google.cloud.orgpolicy.v2.Policy] for naming requirements. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Resource name of the policy. See + * [Policy][google.cloud.orgpolicy.v2.Policy] for naming requirements. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/ListConstraintsRequest.php b/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/ListConstraintsRequest.php new file mode 100644 index 000000000000..f0f09385397f --- /dev/null +++ b/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/ListConstraintsRequest.php @@ -0,0 +1,188 @@ +google.cloud.orgpolicy.v2.ListConstraintsRequest + */ +class ListConstraintsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The Google Cloud resource that parents the constraint. Must be in + * one of the following forms: + * * `projects/{project_number}` + * * `projects/{project_id}` + * * `folders/{folder_id}` + * * `organizations/{organization_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Size of the pages to be returned. This is currently unsupported and will + * be ignored. The server may at any point start using this field to limit + * page size. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * Page token used to retrieve the next page. This is currently unsupported + * and will be ignored. The server may at any point start using this field. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The Google Cloud resource that parents the constraint. Must be in + * one of the following forms: + * + * * `projects/{project_number}` + * * `projects/{project_id}` + * * `folders/{folder_id}` + * * `organizations/{organization_id}` + * Please see {@see OrgPolicyClient::projectName()} for help formatting this field. + * + * @return \Google\Cloud\OrgPolicy\V2\ListConstraintsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The Google Cloud resource that parents the constraint. Must be in + * one of the following forms: + * * `projects/{project_number}` + * * `projects/{project_id}` + * * `folders/{folder_id}` + * * `organizations/{organization_id}` + * @type int $page_size + * Size of the pages to be returned. This is currently unsupported and will + * be ignored. The server may at any point start using this field to limit + * page size. + * @type string $page_token + * Page token used to retrieve the next page. This is currently unsupported + * and will be ignored. The server may at any point start using this field. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orgpolicy\V2\Orgpolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. The Google Cloud resource that parents the constraint. Must be in + * one of the following forms: + * * `projects/{project_number}` + * * `projects/{project_id}` + * * `folders/{folder_id}` + * * `organizations/{organization_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The Google Cloud resource that parents the constraint. Must be in + * one of the following forms: + * * `projects/{project_number}` + * * `projects/{project_id}` + * * `folders/{folder_id}` + * * `organizations/{organization_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Size of the pages to be returned. This is currently unsupported and will + * be ignored. The server may at any point start using this field to limit + * page size. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Size of the pages to be returned. This is currently unsupported and will + * be ignored. The server may at any point start using this field to limit + * page size. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Page token used to retrieve the next page. This is currently unsupported + * and will be ignored. The server may at any point start using this field. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Page token used to retrieve the next page. This is currently unsupported + * and will be ignored. The server may at any point start using this field. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/ListConstraintsResponse.php b/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/ListConstraintsResponse.php new file mode 100644 index 000000000000..26bd82b66fd3 --- /dev/null +++ b/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/ListConstraintsResponse.php @@ -0,0 +1,102 @@ +google.cloud.orgpolicy.v2.ListConstraintsResponse + */ +class ListConstraintsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The collection of constraints that are available on the targeted resource. + * + * Generated from protobuf field repeated .google.cloud.orgpolicy.v2.Constraint constraints = 1; + */ + private $constraints; + /** + * Page token used to retrieve the next page. This is currently not used. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\OrgPolicy\V2\Constraint>|\Google\Protobuf\Internal\RepeatedField $constraints + * The collection of constraints that are available on the targeted resource. + * @type string $next_page_token + * Page token used to retrieve the next page. This is currently not used. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orgpolicy\V2\Orgpolicy::initOnce(); + parent::__construct($data); + } + + /** + * The collection of constraints that are available on the targeted resource. + * + * Generated from protobuf field repeated .google.cloud.orgpolicy.v2.Constraint constraints = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getConstraints() + { + return $this->constraints; + } + + /** + * The collection of constraints that are available on the targeted resource. + * + * Generated from protobuf field repeated .google.cloud.orgpolicy.v2.Constraint constraints = 1; + * @param array<\Google\Cloud\OrgPolicy\V2\Constraint>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setConstraints($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\OrgPolicy\V2\Constraint::class); + $this->constraints = $arr; + + return $this; + } + + /** + * Page token used to retrieve the next page. This is currently not used. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Page token used to retrieve the next page. This is currently not used. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/ListCustomConstraintsRequest.php b/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/ListCustomConstraintsRequest.php new file mode 100644 index 000000000000..b04e17ab5b9c --- /dev/null +++ b/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/ListCustomConstraintsRequest.php @@ -0,0 +1,178 @@ +google.cloud.orgpolicy.v2.ListCustomConstraintsRequest + */ +class ListCustomConstraintsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The target Google Cloud resource that parents the set of custom + * constraints that will be returned from this call. Must be in one of the + * following forms: + * * `organizations/{organization_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Size of the pages to be returned. This is currently unsupported and will + * be ignored. The server may at any point start using this field to limit + * page size. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * Page token used to retrieve the next page. This is currently unsupported + * and will be ignored. The server may at any point start using this field. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The target Google Cloud resource that parents the set of custom + * constraints that will be returned from this call. Must be in one of the + * following forms: + * + * * `organizations/{organization_id}` + * Please see {@see OrgPolicyClient::organizationName()} for help formatting this field. + * + * @return \Google\Cloud\OrgPolicy\V2\ListCustomConstraintsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The target Google Cloud resource that parents the set of custom + * constraints that will be returned from this call. Must be in one of the + * following forms: + * * `organizations/{organization_id}` + * @type int $page_size + * Size of the pages to be returned. This is currently unsupported and will + * be ignored. The server may at any point start using this field to limit + * page size. + * @type string $page_token + * Page token used to retrieve the next page. This is currently unsupported + * and will be ignored. The server may at any point start using this field. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orgpolicy\V2\Orgpolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. The target Google Cloud resource that parents the set of custom + * constraints that will be returned from this call. Must be in one of the + * following forms: + * * `organizations/{organization_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The target Google Cloud resource that parents the set of custom + * constraints that will be returned from this call. Must be in one of the + * following forms: + * * `organizations/{organization_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Size of the pages to be returned. This is currently unsupported and will + * be ignored. The server may at any point start using this field to limit + * page size. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Size of the pages to be returned. This is currently unsupported and will + * be ignored. The server may at any point start using this field to limit + * page size. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Page token used to retrieve the next page. This is currently unsupported + * and will be ignored. The server may at any point start using this field. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Page token used to retrieve the next page. This is currently unsupported + * and will be ignored. The server may at any point start using this field. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/ListCustomConstraintsResponse.php b/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/ListCustomConstraintsResponse.php new file mode 100644 index 000000000000..98b10425eb16 --- /dev/null +++ b/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/ListCustomConstraintsResponse.php @@ -0,0 +1,111 @@ +google.cloud.orgpolicy.v2.ListCustomConstraintsResponse + */ +class ListCustomConstraintsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * All custom constraints that exist on the organization resource. It will be + * empty if no custom constraints are set. + * + * Generated from protobuf field repeated .google.cloud.orgpolicy.v2.CustomConstraint custom_constraints = 1; + */ + private $custom_constraints; + /** + * Page token used to retrieve the next page. This is currently not used, but + * the server may at any point start supplying a valid token. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\OrgPolicy\V2\CustomConstraint>|\Google\Protobuf\Internal\RepeatedField $custom_constraints + * All custom constraints that exist on the organization resource. It will be + * empty if no custom constraints are set. + * @type string $next_page_token + * Page token used to retrieve the next page. This is currently not used, but + * the server may at any point start supplying a valid token. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orgpolicy\V2\Orgpolicy::initOnce(); + parent::__construct($data); + } + + /** + * All custom constraints that exist on the organization resource. It will be + * empty if no custom constraints are set. + * + * Generated from protobuf field repeated .google.cloud.orgpolicy.v2.CustomConstraint custom_constraints = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCustomConstraints() + { + return $this->custom_constraints; + } + + /** + * All custom constraints that exist on the organization resource. It will be + * empty if no custom constraints are set. + * + * Generated from protobuf field repeated .google.cloud.orgpolicy.v2.CustomConstraint custom_constraints = 1; + * @param array<\Google\Cloud\OrgPolicy\V2\CustomConstraint>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCustomConstraints($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\OrgPolicy\V2\CustomConstraint::class); + $this->custom_constraints = $arr; + + return $this; + } + + /** + * Page token used to retrieve the next page. This is currently not used, but + * the server may at any point start supplying a valid token. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Page token used to retrieve the next page. This is currently not used, but + * the server may at any point start supplying a valid token. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/ListPoliciesRequest.php b/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/ListPoliciesRequest.php new file mode 100644 index 000000000000..a604c24236bb --- /dev/null +++ b/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/ListPoliciesRequest.php @@ -0,0 +1,193 @@ +google.cloud.orgpolicy.v2.ListPoliciesRequest + */ +class ListPoliciesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The target Google Cloud resource that parents the set of + * constraints and policies that will be returned from this call. Must be in + * one of the following forms: + * * `projects/{project_number}` + * * `projects/{project_id}` + * * `folders/{folder_id}` + * * `organizations/{organization_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Size of the pages to be returned. This is currently unsupported and will + * be ignored. The server may at any point start using this field to limit + * page size. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * Page token used to retrieve the next page. This is currently unsupported + * and will be ignored. The server may at any point start using this field. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The target Google Cloud resource that parents the set of + * constraints and policies that will be returned from this call. Must be in + * one of the following forms: + * + * * `projects/{project_number}` + * * `projects/{project_id}` + * * `folders/{folder_id}` + * * `organizations/{organization_id}` + * Please see {@see OrgPolicyClient::projectName()} for help formatting this field. + * + * @return \Google\Cloud\OrgPolicy\V2\ListPoliciesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The target Google Cloud resource that parents the set of + * constraints and policies that will be returned from this call. Must be in + * one of the following forms: + * * `projects/{project_number}` + * * `projects/{project_id}` + * * `folders/{folder_id}` + * * `organizations/{organization_id}` + * @type int $page_size + * Size of the pages to be returned. This is currently unsupported and will + * be ignored. The server may at any point start using this field to limit + * page size. + * @type string $page_token + * Page token used to retrieve the next page. This is currently unsupported + * and will be ignored. The server may at any point start using this field. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orgpolicy\V2\Orgpolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. The target Google Cloud resource that parents the set of + * constraints and policies that will be returned from this call. Must be in + * one of the following forms: + * * `projects/{project_number}` + * * `projects/{project_id}` + * * `folders/{folder_id}` + * * `organizations/{organization_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The target Google Cloud resource that parents the set of + * constraints and policies that will be returned from this call. Must be in + * one of the following forms: + * * `projects/{project_number}` + * * `projects/{project_id}` + * * `folders/{folder_id}` + * * `organizations/{organization_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Size of the pages to be returned. This is currently unsupported and will + * be ignored. The server may at any point start using this field to limit + * page size. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Size of the pages to be returned. This is currently unsupported and will + * be ignored. The server may at any point start using this field to limit + * page size. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Page token used to retrieve the next page. This is currently unsupported + * and will be ignored. The server may at any point start using this field. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Page token used to retrieve the next page. This is currently unsupported + * and will be ignored. The server may at any point start using this field. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/ListPoliciesResponse.php b/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/ListPoliciesResponse.php new file mode 100644 index 000000000000..d60a6f2158e1 --- /dev/null +++ b/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/ListPoliciesResponse.php @@ -0,0 +1,111 @@ +google.cloud.orgpolicy.v2.ListPoliciesResponse + */ +class ListPoliciesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * All policies that exist on the resource. It will be empty if no + * policies are set. + * + * Generated from protobuf field repeated .google.cloud.orgpolicy.v2.Policy policies = 1; + */ + private $policies; + /** + * Page token used to retrieve the next page. This is currently not used, but + * the server may at any point start supplying a valid token. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\OrgPolicy\V2\Policy>|\Google\Protobuf\Internal\RepeatedField $policies + * All policies that exist on the resource. It will be empty if no + * policies are set. + * @type string $next_page_token + * Page token used to retrieve the next page. This is currently not used, but + * the server may at any point start supplying a valid token. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orgpolicy\V2\Orgpolicy::initOnce(); + parent::__construct($data); + } + + /** + * All policies that exist on the resource. It will be empty if no + * policies are set. + * + * Generated from protobuf field repeated .google.cloud.orgpolicy.v2.Policy policies = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPolicies() + { + return $this->policies; + } + + /** + * All policies that exist on the resource. It will be empty if no + * policies are set. + * + * Generated from protobuf field repeated .google.cloud.orgpolicy.v2.Policy policies = 1; + * @param array<\Google\Cloud\OrgPolicy\V2\Policy>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPolicies($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\OrgPolicy\V2\Policy::class); + $this->policies = $arr; + + return $this; + } + + /** + * Page token used to retrieve the next page. This is currently not used, but + * the server may at any point start supplying a valid token. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Page token used to retrieve the next page. This is currently not used, but + * the server may at any point start supplying a valid token. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/Policy.php b/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/Policy.php new file mode 100644 index 000000000000..804da4a74295 --- /dev/null +++ b/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/Policy.php @@ -0,0 +1,297 @@ +google.cloud.orgpolicy.v2.Policy + */ +class Policy extends \Google\Protobuf\Internal\Message +{ + /** + * Immutable. The resource name of the policy. Must be one of the following + * forms, where `constraint_name` is the name of the constraint which this + * policy configures: + * * `projects/{project_number}/policies/{constraint_name}` + * * `folders/{folder_id}/policies/{constraint_name}` + * * `organizations/{organization_id}/policies/{constraint_name}` + * For example, `projects/123/policies/compute.disableSerialPortAccess`. + * Note: `projects/{project_id}/policies/{constraint_name}` is also an + * acceptable name for API requests, but responses will return the name using + * the equivalent project number. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $name = ''; + /** + * Basic information about the Organization Policy. + * + * Generated from protobuf field .google.cloud.orgpolicy.v2.PolicySpec spec = 2; + */ + protected $spec = null; + /** + * Deprecated. + * + * Generated from protobuf field .google.cloud.orgpolicy.v2.AlternatePolicySpec alternate = 3 [deprecated = true]; + * @deprecated + */ + protected $alternate = null; + /** + * Dry-run policy. + * Audit-only policy, can be used to monitor how the policy would have + * impacted the existing and future resources if it's enforced. + * + * Generated from protobuf field .google.cloud.orgpolicy.v2.PolicySpec dry_run_spec = 4; + */ + protected $dry_run_spec = null; + /** + * Optional. An opaque tag indicating the current state of the policy, used + * for concurrency control. This 'etag' is computed by the server based on the + * value of other fields, and may be sent on update and delete requests to + * ensure the client has an up-to-date value before proceeding. + * + * Generated from protobuf field string etag = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $etag = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Immutable. The resource name of the policy. Must be one of the following + * forms, where `constraint_name` is the name of the constraint which this + * policy configures: + * * `projects/{project_number}/policies/{constraint_name}` + * * `folders/{folder_id}/policies/{constraint_name}` + * * `organizations/{organization_id}/policies/{constraint_name}` + * For example, `projects/123/policies/compute.disableSerialPortAccess`. + * Note: `projects/{project_id}/policies/{constraint_name}` is also an + * acceptable name for API requests, but responses will return the name using + * the equivalent project number. + * @type \Google\Cloud\OrgPolicy\V2\PolicySpec $spec + * Basic information about the Organization Policy. + * @type \Google\Cloud\OrgPolicy\V2\AlternatePolicySpec $alternate + * Deprecated. + * @type \Google\Cloud\OrgPolicy\V2\PolicySpec $dry_run_spec + * Dry-run policy. + * Audit-only policy, can be used to monitor how the policy would have + * impacted the existing and future resources if it's enforced. + * @type string $etag + * Optional. An opaque tag indicating the current state of the policy, used + * for concurrency control. This 'etag' is computed by the server based on the + * value of other fields, and may be sent on update and delete requests to + * ensure the client has an up-to-date value before proceeding. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orgpolicy\V2\Orgpolicy::initOnce(); + parent::__construct($data); + } + + /** + * Immutable. The resource name of the policy. Must be one of the following + * forms, where `constraint_name` is the name of the constraint which this + * policy configures: + * * `projects/{project_number}/policies/{constraint_name}` + * * `folders/{folder_id}/policies/{constraint_name}` + * * `organizations/{organization_id}/policies/{constraint_name}` + * For example, `projects/123/policies/compute.disableSerialPortAccess`. + * Note: `projects/{project_id}/policies/{constraint_name}` is also an + * acceptable name for API requests, but responses will return the name using + * the equivalent project number. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Immutable. The resource name of the policy. Must be one of the following + * forms, where `constraint_name` is the name of the constraint which this + * policy configures: + * * `projects/{project_number}/policies/{constraint_name}` + * * `folders/{folder_id}/policies/{constraint_name}` + * * `organizations/{organization_id}/policies/{constraint_name}` + * For example, `projects/123/policies/compute.disableSerialPortAccess`. + * Note: `projects/{project_id}/policies/{constraint_name}` is also an + * acceptable name for API requests, but responses will return the name using + * the equivalent project number. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Basic information about the Organization Policy. + * + * Generated from protobuf field .google.cloud.orgpolicy.v2.PolicySpec spec = 2; + * @return \Google\Cloud\OrgPolicy\V2\PolicySpec|null + */ + public function getSpec() + { + return $this->spec; + } + + public function hasSpec() + { + return isset($this->spec); + } + + public function clearSpec() + { + unset($this->spec); + } + + /** + * Basic information about the Organization Policy. + * + * Generated from protobuf field .google.cloud.orgpolicy.v2.PolicySpec spec = 2; + * @param \Google\Cloud\OrgPolicy\V2\PolicySpec $var + * @return $this + */ + public function setSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OrgPolicy\V2\PolicySpec::class); + $this->spec = $var; + + return $this; + } + + /** + * Deprecated. + * + * Generated from protobuf field .google.cloud.orgpolicy.v2.AlternatePolicySpec alternate = 3 [deprecated = true]; + * @return \Google\Cloud\OrgPolicy\V2\AlternatePolicySpec|null + * @deprecated + */ + public function getAlternate() + { + @trigger_error('alternate is deprecated.', E_USER_DEPRECATED); + return $this->alternate; + } + + public function hasAlternate() + { + @trigger_error('alternate is deprecated.', E_USER_DEPRECATED); + return isset($this->alternate); + } + + public function clearAlternate() + { + @trigger_error('alternate is deprecated.', E_USER_DEPRECATED); + unset($this->alternate); + } + + /** + * Deprecated. + * + * Generated from protobuf field .google.cloud.orgpolicy.v2.AlternatePolicySpec alternate = 3 [deprecated = true]; + * @param \Google\Cloud\OrgPolicy\V2\AlternatePolicySpec $var + * @return $this + * @deprecated + */ + public function setAlternate($var) + { + @trigger_error('alternate is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkMessage($var, \Google\Cloud\OrgPolicy\V2\AlternatePolicySpec::class); + $this->alternate = $var; + + return $this; + } + + /** + * Dry-run policy. + * Audit-only policy, can be used to monitor how the policy would have + * impacted the existing and future resources if it's enforced. + * + * Generated from protobuf field .google.cloud.orgpolicy.v2.PolicySpec dry_run_spec = 4; + * @return \Google\Cloud\OrgPolicy\V2\PolicySpec|null + */ + public function getDryRunSpec() + { + return $this->dry_run_spec; + } + + public function hasDryRunSpec() + { + return isset($this->dry_run_spec); + } + + public function clearDryRunSpec() + { + unset($this->dry_run_spec); + } + + /** + * Dry-run policy. + * Audit-only policy, can be used to monitor how the policy would have + * impacted the existing and future resources if it's enforced. + * + * Generated from protobuf field .google.cloud.orgpolicy.v2.PolicySpec dry_run_spec = 4; + * @param \Google\Cloud\OrgPolicy\V2\PolicySpec $var + * @return $this + */ + public function setDryRunSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OrgPolicy\V2\PolicySpec::class); + $this->dry_run_spec = $var; + + return $this; + } + + /** + * Optional. An opaque tag indicating the current state of the policy, used + * for concurrency control. This 'etag' is computed by the server based on the + * value of other fields, and may be sent on update and delete requests to + * ensure the client has an up-to-date value before proceeding. + * + * Generated from protobuf field string etag = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * Optional. An opaque tag indicating the current state of the policy, used + * for concurrency control. This 'etag' is computed by the server based on the + * value of other fields, and may be sent on update and delete requests to + * ensure the client has an up-to-date value before proceeding. + * + * Generated from protobuf field string etag = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/PolicySpec.php b/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/PolicySpec.php new file mode 100644 index 000000000000..88ddcb36ab79 --- /dev/null +++ b/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/PolicySpec.php @@ -0,0 +1,310 @@ +google.cloud.orgpolicy.v2.PolicySpec + */ +class PolicySpec extends \Google\Protobuf\Internal\Message +{ + /** + * An opaque tag indicating the current version of the policySpec, used for + * concurrency control. + * This field is ignored if used in a `CreatePolicy` request. + * When the policy is returned from either a `GetPolicy` or a + * `ListPolicies` request, this `etag` indicates the version of the + * current policySpec to use when executing a read-modify-write loop. + * When the policy is returned from a `GetEffectivePolicy` request, the + * `etag` will be unset. + * + * Generated from protobuf field string etag = 1; + */ + protected $etag = ''; + /** + * Output only. The time stamp this was previously updated. This + * represents the last time a call to `CreatePolicy` or `UpdatePolicy` was + * made for that policy. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * In policies for boolean constraints, the following requirements apply: + * - There must be one and only one policy rule where condition is unset. + * - Boolean policy rules with conditions must set `enforced` to the + * opposite of the policy rule without a condition. + * - During policy evaluation, policy rules with conditions that are + * true for a target resource take precedence. + * + * Generated from protobuf field repeated .google.cloud.orgpolicy.v2.PolicySpec.PolicyRule rules = 3; + */ + private $rules; + /** + * Determines the inheritance behavior for this policy. + * If `inherit_from_parent` is true, policy rules set higher up in the + * hierarchy (up to the closest root) are inherited and present in the + * effective policy. If it is false, then no rules are inherited, and this + * policy becomes the new root for evaluation. + * This field can be set only for policies which configure list constraints. + * + * Generated from protobuf field bool inherit_from_parent = 4; + */ + protected $inherit_from_parent = false; + /** + * Ignores policies set above this resource and restores the + * `constraint_default` enforcement behavior of the specific constraint at + * this resource. + * This field can be set in policies for either list or boolean + * constraints. If set, `rules` must be empty and `inherit_from_parent` + * must be set to false. + * + * Generated from protobuf field bool reset = 5; + */ + protected $reset = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $etag + * An opaque tag indicating the current version of the policySpec, used for + * concurrency control. + * This field is ignored if used in a `CreatePolicy` request. + * When the policy is returned from either a `GetPolicy` or a + * `ListPolicies` request, this `etag` indicates the version of the + * current policySpec to use when executing a read-modify-write loop. + * When the policy is returned from a `GetEffectivePolicy` request, the + * `etag` will be unset. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The time stamp this was previously updated. This + * represents the last time a call to `CreatePolicy` or `UpdatePolicy` was + * made for that policy. + * @type array<\Google\Cloud\OrgPolicy\V2\PolicySpec\PolicyRule>|\Google\Protobuf\Internal\RepeatedField $rules + * In policies for boolean constraints, the following requirements apply: + * - There must be one and only one policy rule where condition is unset. + * - Boolean policy rules with conditions must set `enforced` to the + * opposite of the policy rule without a condition. + * - During policy evaluation, policy rules with conditions that are + * true for a target resource take precedence. + * @type bool $inherit_from_parent + * Determines the inheritance behavior for this policy. + * If `inherit_from_parent` is true, policy rules set higher up in the + * hierarchy (up to the closest root) are inherited and present in the + * effective policy. If it is false, then no rules are inherited, and this + * policy becomes the new root for evaluation. + * This field can be set only for policies which configure list constraints. + * @type bool $reset + * Ignores policies set above this resource and restores the + * `constraint_default` enforcement behavior of the specific constraint at + * this resource. + * This field can be set in policies for either list or boolean + * constraints. If set, `rules` must be empty and `inherit_from_parent` + * must be set to false. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orgpolicy\V2\Orgpolicy::initOnce(); + parent::__construct($data); + } + + /** + * An opaque tag indicating the current version of the policySpec, used for + * concurrency control. + * This field is ignored if used in a `CreatePolicy` request. + * When the policy is returned from either a `GetPolicy` or a + * `ListPolicies` request, this `etag` indicates the version of the + * current policySpec to use when executing a read-modify-write loop. + * When the policy is returned from a `GetEffectivePolicy` request, the + * `etag` will be unset. + * + * Generated from protobuf field string etag = 1; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * An opaque tag indicating the current version of the policySpec, used for + * concurrency control. + * This field is ignored if used in a `CreatePolicy` request. + * When the policy is returned from either a `GetPolicy` or a + * `ListPolicies` request, this `etag` indicates the version of the + * current policySpec to use when executing a read-modify-write loop. + * When the policy is returned from a `GetEffectivePolicy` request, the + * `etag` will be unset. + * + * Generated from protobuf field string etag = 1; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + + /** + * Output only. The time stamp this was previously updated. This + * represents the last time a call to `CreatePolicy` or `UpdatePolicy` was + * made for that policy. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The time stamp this was previously updated. This + * represents the last time a call to `CreatePolicy` or `UpdatePolicy` was + * made for that policy. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * In policies for boolean constraints, the following requirements apply: + * - There must be one and only one policy rule where condition is unset. + * - Boolean policy rules with conditions must set `enforced` to the + * opposite of the policy rule without a condition. + * - During policy evaluation, policy rules with conditions that are + * true for a target resource take precedence. + * + * Generated from protobuf field repeated .google.cloud.orgpolicy.v2.PolicySpec.PolicyRule rules = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRules() + { + return $this->rules; + } + + /** + * In policies for boolean constraints, the following requirements apply: + * - There must be one and only one policy rule where condition is unset. + * - Boolean policy rules with conditions must set `enforced` to the + * opposite of the policy rule without a condition. + * - During policy evaluation, policy rules with conditions that are + * true for a target resource take precedence. + * + * Generated from protobuf field repeated .google.cloud.orgpolicy.v2.PolicySpec.PolicyRule rules = 3; + * @param array<\Google\Cloud\OrgPolicy\V2\PolicySpec\PolicyRule>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRules($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\OrgPolicy\V2\PolicySpec\PolicyRule::class); + $this->rules = $arr; + + return $this; + } + + /** + * Determines the inheritance behavior for this policy. + * If `inherit_from_parent` is true, policy rules set higher up in the + * hierarchy (up to the closest root) are inherited and present in the + * effective policy. If it is false, then no rules are inherited, and this + * policy becomes the new root for evaluation. + * This field can be set only for policies which configure list constraints. + * + * Generated from protobuf field bool inherit_from_parent = 4; + * @return bool + */ + public function getInheritFromParent() + { + return $this->inherit_from_parent; + } + + /** + * Determines the inheritance behavior for this policy. + * If `inherit_from_parent` is true, policy rules set higher up in the + * hierarchy (up to the closest root) are inherited and present in the + * effective policy. If it is false, then no rules are inherited, and this + * policy becomes the new root for evaluation. + * This field can be set only for policies which configure list constraints. + * + * Generated from protobuf field bool inherit_from_parent = 4; + * @param bool $var + * @return $this + */ + public function setInheritFromParent($var) + { + GPBUtil::checkBool($var); + $this->inherit_from_parent = $var; + + return $this; + } + + /** + * Ignores policies set above this resource and restores the + * `constraint_default` enforcement behavior of the specific constraint at + * this resource. + * This field can be set in policies for either list or boolean + * constraints. If set, `rules` must be empty and `inherit_from_parent` + * must be set to false. + * + * Generated from protobuf field bool reset = 5; + * @return bool + */ + public function getReset() + { + return $this->reset; + } + + /** + * Ignores policies set above this resource and restores the + * `constraint_default` enforcement behavior of the specific constraint at + * this resource. + * This field can be set in policies for either list or boolean + * constraints. If set, `rules` must be empty and `inherit_from_parent` + * must be set to false. + * + * Generated from protobuf field bool reset = 5; + * @param bool $var + * @return $this + */ + public function setReset($var) + { + GPBUtil::checkBool($var); + $this->reset = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/PolicySpec/PolicyRule.php b/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/PolicySpec/PolicyRule.php new file mode 100644 index 000000000000..64212ae4b572 --- /dev/null +++ b/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/PolicySpec/PolicyRule.php @@ -0,0 +1,280 @@ +google.cloud.orgpolicy.v2.PolicySpec.PolicyRule + */ +class PolicyRule extends \Google\Protobuf\Internal\Message +{ + /** + * A condition which determines whether this rule is used + * in the evaluation of the policy. When set, the `expression` field in + * the `Expr' must include from 1 to 10 subexpressions, joined by the "||" + * or "&&" operators. Each subexpression must be of the form + * "resource.matchTag('/tag_key_short_name, + * 'tag_value_short_name')". or "resource.matchTagId('tagKeys/key_id', + * 'tagValues/value_id')". where key_name and value_name are the resource + * names for Label Keys and Values. These names are available from the Tag + * Manager Service. An example expression is: + * "resource.matchTag('123456789/environment, + * 'prod')". or "resource.matchTagId('tagKeys/123', + * 'tagValues/456')". + * + * Generated from protobuf field .google.type.Expr condition = 5; + */ + protected $condition = null; + protected $kind; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\OrgPolicy\V2\PolicySpec\PolicyRule\StringValues $values + * List of values to be used for this policy rule. This field can be set + * only in policies for list constraints. + * @type bool $allow_all + * Setting this to true means that all values are allowed. This field can + * be set only in policies for list constraints. + * @type bool $deny_all + * Setting this to true means that all values are denied. This field can + * be set only in policies for list constraints. + * @type bool $enforce + * If `true`, then the policy is enforced. If `false`, then any + * configuration is acceptable. + * This field can be set only in policies for boolean constraints. + * @type \Google\Type\Expr $condition + * A condition which determines whether this rule is used + * in the evaluation of the policy. When set, the `expression` field in + * the `Expr' must include from 1 to 10 subexpressions, joined by the "||" + * or "&&" operators. Each subexpression must be of the form + * "resource.matchTag('/tag_key_short_name, + * 'tag_value_short_name')". or "resource.matchTagId('tagKeys/key_id', + * 'tagValues/value_id')". where key_name and value_name are the resource + * names for Label Keys and Values. These names are available from the Tag + * Manager Service. An example expression is: + * "resource.matchTag('123456789/environment, + * 'prod')". or "resource.matchTagId('tagKeys/123', + * 'tagValues/456')". + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orgpolicy\V2\Orgpolicy::initOnce(); + parent::__construct($data); + } + + /** + * List of values to be used for this policy rule. This field can be set + * only in policies for list constraints. + * + * Generated from protobuf field .google.cloud.orgpolicy.v2.PolicySpec.PolicyRule.StringValues values = 1; + * @return \Google\Cloud\OrgPolicy\V2\PolicySpec\PolicyRule\StringValues|null + */ + public function getValues() + { + return $this->readOneof(1); + } + + public function hasValues() + { + return $this->hasOneof(1); + } + + /** + * List of values to be used for this policy rule. This field can be set + * only in policies for list constraints. + * + * Generated from protobuf field .google.cloud.orgpolicy.v2.PolicySpec.PolicyRule.StringValues values = 1; + * @param \Google\Cloud\OrgPolicy\V2\PolicySpec\PolicyRule\StringValues $var + * @return $this + */ + public function setValues($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OrgPolicy\V2\PolicySpec\PolicyRule\StringValues::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Setting this to true means that all values are allowed. This field can + * be set only in policies for list constraints. + * + * Generated from protobuf field bool allow_all = 2; + * @return bool + */ + public function getAllowAll() + { + return $this->readOneof(2); + } + + public function hasAllowAll() + { + return $this->hasOneof(2); + } + + /** + * Setting this to true means that all values are allowed. This field can + * be set only in policies for list constraints. + * + * Generated from protobuf field bool allow_all = 2; + * @param bool $var + * @return $this + */ + public function setAllowAll($var) + { + GPBUtil::checkBool($var); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Setting this to true means that all values are denied. This field can + * be set only in policies for list constraints. + * + * Generated from protobuf field bool deny_all = 3; + * @return bool + */ + public function getDenyAll() + { + return $this->readOneof(3); + } + + public function hasDenyAll() + { + return $this->hasOneof(3); + } + + /** + * Setting this to true means that all values are denied. This field can + * be set only in policies for list constraints. + * + * Generated from protobuf field bool deny_all = 3; + * @param bool $var + * @return $this + */ + public function setDenyAll($var) + { + GPBUtil::checkBool($var); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * If `true`, then the policy is enforced. If `false`, then any + * configuration is acceptable. + * This field can be set only in policies for boolean constraints. + * + * Generated from protobuf field bool enforce = 4; + * @return bool + */ + public function getEnforce() + { + return $this->readOneof(4); + } + + public function hasEnforce() + { + return $this->hasOneof(4); + } + + /** + * If `true`, then the policy is enforced. If `false`, then any + * configuration is acceptable. + * This field can be set only in policies for boolean constraints. + * + * Generated from protobuf field bool enforce = 4; + * @param bool $var + * @return $this + */ + public function setEnforce($var) + { + GPBUtil::checkBool($var); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * A condition which determines whether this rule is used + * in the evaluation of the policy. When set, the `expression` field in + * the `Expr' must include from 1 to 10 subexpressions, joined by the "||" + * or "&&" operators. Each subexpression must be of the form + * "resource.matchTag('/tag_key_short_name, + * 'tag_value_short_name')". or "resource.matchTagId('tagKeys/key_id', + * 'tagValues/value_id')". where key_name and value_name are the resource + * names for Label Keys and Values. These names are available from the Tag + * Manager Service. An example expression is: + * "resource.matchTag('123456789/environment, + * 'prod')". or "resource.matchTagId('tagKeys/123', + * 'tagValues/456')". + * + * Generated from protobuf field .google.type.Expr condition = 5; + * @return \Google\Type\Expr|null + */ + public function getCondition() + { + return $this->condition; + } + + public function hasCondition() + { + return isset($this->condition); + } + + public function clearCondition() + { + unset($this->condition); + } + + /** + * A condition which determines whether this rule is used + * in the evaluation of the policy. When set, the `expression` field in + * the `Expr' must include from 1 to 10 subexpressions, joined by the "||" + * or "&&" operators. Each subexpression must be of the form + * "resource.matchTag('/tag_key_short_name, + * 'tag_value_short_name')". or "resource.matchTagId('tagKeys/key_id', + * 'tagValues/value_id')". where key_name and value_name are the resource + * names for Label Keys and Values. These names are available from the Tag + * Manager Service. An example expression is: + * "resource.matchTag('123456789/environment, + * 'prod')". or "resource.matchTagId('tagKeys/123', + * 'tagValues/456')". + * + * Generated from protobuf field .google.type.Expr condition = 5; + * @param \Google\Type\Expr $var + * @return $this + */ + public function setCondition($var) + { + GPBUtil::checkMessage($var, \Google\Type\Expr::class); + $this->condition = $var; + + return $this; + } + + /** + * @return string + */ + public function getKind() + { + return $this->whichOneof("kind"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(PolicyRule::class, \Google\Cloud\OrgPolicy\V2\PolicySpec_PolicyRule::class); + diff --git a/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/PolicySpec/PolicyRule/StringValues.php b/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/PolicySpec/PolicyRule/StringValues.php new file mode 100644 index 000000000000..389de6430399 --- /dev/null +++ b/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/PolicySpec/PolicyRule/StringValues.php @@ -0,0 +1,118 @@ +` (for example, `projects/tokyo-rain-123`) + * - `folders/` (for example, `folders/1234`) + * - `organizations/` (for example, `organizations/1234`) + * The `supports_under` field of the associated `Constraint` defines + * whether ancestry prefixes can be used. + * + * Generated from protobuf message google.cloud.orgpolicy.v2.PolicySpec.PolicyRule.StringValues + */ +class StringValues extends \Google\Protobuf\Internal\Message +{ + /** + * List of values allowed at this resource. + * + * Generated from protobuf field repeated string allowed_values = 1; + */ + private $allowed_values; + /** + * List of values denied at this resource. + * + * Generated from protobuf field repeated string denied_values = 2; + */ + private $denied_values; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $allowed_values + * List of values allowed at this resource. + * @type array|\Google\Protobuf\Internal\RepeatedField $denied_values + * List of values denied at this resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orgpolicy\V2\Orgpolicy::initOnce(); + parent::__construct($data); + } + + /** + * List of values allowed at this resource. + * + * Generated from protobuf field repeated string allowed_values = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAllowedValues() + { + return $this->allowed_values; + } + + /** + * List of values allowed at this resource. + * + * Generated from protobuf field repeated string allowed_values = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAllowedValues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->allowed_values = $arr; + + return $this; + } + + /** + * List of values denied at this resource. + * + * Generated from protobuf field repeated string denied_values = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDeniedValues() + { + return $this->denied_values; + } + + /** + * List of values denied at this resource. + * + * Generated from protobuf field repeated string denied_values = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDeniedValues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->denied_values = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(StringValues::class, \Google\Cloud\OrgPolicy\V2\PolicySpec_PolicyRule_StringValues::class); + diff --git a/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/UpdateCustomConstraintRequest.php b/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/UpdateCustomConstraintRequest.php new file mode 100644 index 000000000000..f9ba7c3c1e59 --- /dev/null +++ b/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/UpdateCustomConstraintRequest.php @@ -0,0 +1,91 @@ +google.cloud.orgpolicy.v2.UpdateCustomConstraintRequest + */ +class UpdateCustomConstraintRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. `CustomConstraint` to update. + * + * Generated from protobuf field .google.cloud.orgpolicy.v2.CustomConstraint custom_constraint = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $custom_constraint = null; + + /** + * @param \Google\Cloud\OrgPolicy\V2\CustomConstraint $customConstraint Required. `CustomConstraint` to update. + * + * @return \Google\Cloud\OrgPolicy\V2\UpdateCustomConstraintRequest + * + * @experimental + */ + public static function build(\Google\Cloud\OrgPolicy\V2\CustomConstraint $customConstraint): self + { + return (new self()) + ->setCustomConstraint($customConstraint); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\OrgPolicy\V2\CustomConstraint $custom_constraint + * Required. `CustomConstraint` to update. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orgpolicy\V2\Orgpolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. `CustomConstraint` to update. + * + * Generated from protobuf field .google.cloud.orgpolicy.v2.CustomConstraint custom_constraint = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\OrgPolicy\V2\CustomConstraint|null + */ + public function getCustomConstraint() + { + return $this->custom_constraint; + } + + public function hasCustomConstraint() + { + return isset($this->custom_constraint); + } + + public function clearCustomConstraint() + { + unset($this->custom_constraint); + } + + /** + * Required. `CustomConstraint` to update. + * + * Generated from protobuf field .google.cloud.orgpolicy.v2.CustomConstraint custom_constraint = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\OrgPolicy\V2\CustomConstraint $var + * @return $this + */ + public function setCustomConstraint($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OrgPolicy\V2\CustomConstraint::class); + $this->custom_constraint = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/UpdatePolicyRequest.php b/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/UpdatePolicyRequest.php new file mode 100644 index 000000000000..0c67e5957f80 --- /dev/null +++ b/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/UpdatePolicyRequest.php @@ -0,0 +1,143 @@ +google.cloud.orgpolicy.v2.UpdatePolicyRequest + */ +class UpdatePolicyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Policy to update. + * + * Generated from protobuf field .google.cloud.orgpolicy.v2.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $policy = null; + /** + * Field mask used to specify the fields to be overwritten in the policy + * by the set. The fields specified in the update_mask are relative to the + * policy, not the full request. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\OrgPolicy\V2\Policy $policy Required. Policy to update. + * + * @return \Google\Cloud\OrgPolicy\V2\UpdatePolicyRequest + * + * @experimental + */ + public static function build(\Google\Cloud\OrgPolicy\V2\Policy $policy): self + { + return (new self()) + ->setPolicy($policy); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\OrgPolicy\V2\Policy $policy + * Required. Policy to update. + * @type \Google\Protobuf\FieldMask $update_mask + * Field mask used to specify the fields to be overwritten in the policy + * by the set. The fields specified in the update_mask are relative to the + * policy, not the full request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Orgpolicy\V2\Orgpolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. Policy to update. + * + * Generated from protobuf field .google.cloud.orgpolicy.v2.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\OrgPolicy\V2\Policy|null + */ + public function getPolicy() + { + return $this->policy; + } + + public function hasPolicy() + { + return isset($this->policy); + } + + public function clearPolicy() + { + unset($this->policy); + } + + /** + * Required. Policy to update. + * + * Generated from protobuf field .google.cloud.orgpolicy.v2.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\OrgPolicy\V2\Policy $var + * @return $this + */ + public function setPolicy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OrgPolicy\V2\Policy::class); + $this->policy = $var; + + return $this; + } + + /** + * Field mask used to specify the fields to be overwritten in the policy + * by the set. The fields specified in the update_mask are relative to the + * policy, not the full request. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Field mask used to specify the fields to be overwritten in the policy + * by the set. The fields specified in the update_mask are relative to the + * policy, not the full request. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OrgPolicy/v2/samples/V2/OrgPolicyClient/create_custom_constraint.php b/owl-bot-staging/OrgPolicy/v2/samples/V2/OrgPolicyClient/create_custom_constraint.php new file mode 100644 index 000000000000..f0950603e92a --- /dev/null +++ b/owl-bot-staging/OrgPolicy/v2/samples/V2/OrgPolicyClient/create_custom_constraint.php @@ -0,0 +1,80 @@ +setParent($formattedParent) + ->setCustomConstraint($customConstraint); + + // Call the API and handle any network failures. + try { + /** @var CustomConstraint $response */ + $response = $orgPolicyClient->createCustomConstraint($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = OrgPolicyClient::organizationName('[ORGANIZATION]'); + + create_custom_constraint_sample($formattedParent); +} +// [END orgpolicy_v2_generated_OrgPolicy_CreateCustomConstraint_sync] diff --git a/owl-bot-staging/OrgPolicy/v2/samples/V2/OrgPolicyClient/create_policy.php b/owl-bot-staging/OrgPolicy/v2/samples/V2/OrgPolicyClient/create_policy.php new file mode 100644 index 000000000000..82a510091b53 --- /dev/null +++ b/owl-bot-staging/OrgPolicy/v2/samples/V2/OrgPolicyClient/create_policy.php @@ -0,0 +1,84 @@ +setParent($formattedParent) + ->setPolicy($policy); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $orgPolicyClient->createPolicy($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = OrgPolicyClient::projectName('[PROJECT]'); + + create_policy_sample($formattedParent); +} +// [END orgpolicy_v2_generated_OrgPolicy_CreatePolicy_sync] diff --git a/owl-bot-staging/OrgPolicy/v2/samples/V2/OrgPolicyClient/delete_custom_constraint.php b/owl-bot-staging/OrgPolicy/v2/samples/V2/OrgPolicyClient/delete_custom_constraint.php new file mode 100644 index 000000000000..76cf1119445a --- /dev/null +++ b/owl-bot-staging/OrgPolicy/v2/samples/V2/OrgPolicyClient/delete_custom_constraint.php @@ -0,0 +1,73 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $orgPolicyClient->deleteCustomConstraint($request); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = OrgPolicyClient::customConstraintName('[ORGANIZATION]', '[CUSTOM_CONSTRAINT]'); + + delete_custom_constraint_sample($formattedName); +} +// [END orgpolicy_v2_generated_OrgPolicy_DeleteCustomConstraint_sync] diff --git a/owl-bot-staging/OrgPolicy/v2/samples/V2/OrgPolicyClient/delete_policy.php b/owl-bot-staging/OrgPolicy/v2/samples/V2/OrgPolicyClient/delete_policy.php new file mode 100644 index 000000000000..d84bae5cfd51 --- /dev/null +++ b/owl-bot-staging/OrgPolicy/v2/samples/V2/OrgPolicyClient/delete_policy.php @@ -0,0 +1,73 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $orgPolicyClient->deletePolicy($request); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = OrgPolicyClient::policyName('[PROJECT]', '[POLICY]'); + + delete_policy_sample($formattedName); +} +// [END orgpolicy_v2_generated_OrgPolicy_DeletePolicy_sync] diff --git a/owl-bot-staging/OrgPolicy/v2/samples/V2/OrgPolicyClient/get_custom_constraint.php b/owl-bot-staging/OrgPolicy/v2/samples/V2/OrgPolicyClient/get_custom_constraint.php new file mode 100644 index 000000000000..a0f1ed7310b9 --- /dev/null +++ b/owl-bot-staging/OrgPolicy/v2/samples/V2/OrgPolicyClient/get_custom_constraint.php @@ -0,0 +1,75 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var CustomConstraint $response */ + $response = $orgPolicyClient->getCustomConstraint($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = OrgPolicyClient::customConstraintName('[ORGANIZATION]', '[CUSTOM_CONSTRAINT]'); + + get_custom_constraint_sample($formattedName); +} +// [END orgpolicy_v2_generated_OrgPolicy_GetCustomConstraint_sync] diff --git a/owl-bot-staging/OrgPolicy/v2/samples/V2/OrgPolicyClient/get_effective_policy.php b/owl-bot-staging/OrgPolicy/v2/samples/V2/OrgPolicyClient/get_effective_policy.php new file mode 100644 index 000000000000..59330c3ed041 --- /dev/null +++ b/owl-bot-staging/OrgPolicy/v2/samples/V2/OrgPolicyClient/get_effective_policy.php @@ -0,0 +1,77 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $orgPolicyClient->getEffectivePolicy($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = OrgPolicyClient::policyName('[PROJECT]', '[POLICY]'); + + get_effective_policy_sample($formattedName); +} +// [END orgpolicy_v2_generated_OrgPolicy_GetEffectivePolicy_sync] diff --git a/owl-bot-staging/OrgPolicy/v2/samples/V2/OrgPolicyClient/get_policy.php b/owl-bot-staging/OrgPolicy/v2/samples/V2/OrgPolicyClient/get_policy.php new file mode 100644 index 000000000000..13e35d202f5e --- /dev/null +++ b/owl-bot-staging/OrgPolicy/v2/samples/V2/OrgPolicyClient/get_policy.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $orgPolicyClient->getPolicy($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = OrgPolicyClient::policyName('[PROJECT]', '[POLICY]'); + + get_policy_sample($formattedName); +} +// [END orgpolicy_v2_generated_OrgPolicy_GetPolicy_sync] diff --git a/owl-bot-staging/OrgPolicy/v2/samples/V2/OrgPolicyClient/list_constraints.php b/owl-bot-staging/OrgPolicy/v2/samples/V2/OrgPolicyClient/list_constraints.php new file mode 100644 index 000000000000..5be4c9f8f89e --- /dev/null +++ b/owl-bot-staging/OrgPolicy/v2/samples/V2/OrgPolicyClient/list_constraints.php @@ -0,0 +1,82 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $orgPolicyClient->listConstraints($request); + + /** @var Constraint $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = OrgPolicyClient::projectName('[PROJECT]'); + + list_constraints_sample($formattedParent); +} +// [END orgpolicy_v2_generated_OrgPolicy_ListConstraints_sync] diff --git a/owl-bot-staging/OrgPolicy/v2/samples/V2/OrgPolicyClient/list_custom_constraints.php b/owl-bot-staging/OrgPolicy/v2/samples/V2/OrgPolicyClient/list_custom_constraints.php new file mode 100644 index 000000000000..9ec51a811064 --- /dev/null +++ b/owl-bot-staging/OrgPolicy/v2/samples/V2/OrgPolicyClient/list_custom_constraints.php @@ -0,0 +1,81 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $orgPolicyClient->listCustomConstraints($request); + + /** @var CustomConstraint $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = OrgPolicyClient::organizationName('[ORGANIZATION]'); + + list_custom_constraints_sample($formattedParent); +} +// [END orgpolicy_v2_generated_OrgPolicy_ListCustomConstraints_sync] diff --git a/owl-bot-staging/OrgPolicy/v2/samples/V2/OrgPolicyClient/list_policies.php b/owl-bot-staging/OrgPolicy/v2/samples/V2/OrgPolicyClient/list_policies.php new file mode 100644 index 000000000000..75b3053adf31 --- /dev/null +++ b/owl-bot-staging/OrgPolicy/v2/samples/V2/OrgPolicyClient/list_policies.php @@ -0,0 +1,83 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $orgPolicyClient->listPolicies($request); + + /** @var Policy $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = OrgPolicyClient::projectName('[PROJECT]'); + + list_policies_sample($formattedParent); +} +// [END orgpolicy_v2_generated_OrgPolicy_ListPolicies_sync] diff --git a/owl-bot-staging/OrgPolicy/v2/samples/V2/OrgPolicyClient/update_custom_constraint.php b/owl-bot-staging/OrgPolicy/v2/samples/V2/OrgPolicyClient/update_custom_constraint.php new file mode 100644 index 000000000000..7029b5e6e71b --- /dev/null +++ b/owl-bot-staging/OrgPolicy/v2/samples/V2/OrgPolicyClient/update_custom_constraint.php @@ -0,0 +1,65 @@ +setCustomConstraint($customConstraint); + + // Call the API and handle any network failures. + try { + /** @var CustomConstraint $response */ + $response = $orgPolicyClient->updateCustomConstraint($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END orgpolicy_v2_generated_OrgPolicy_UpdateCustomConstraint_sync] diff --git a/owl-bot-staging/OrgPolicy/v2/samples/V2/OrgPolicyClient/update_policy.php b/owl-bot-staging/OrgPolicy/v2/samples/V2/OrgPolicyClient/update_policy.php new file mode 100644 index 000000000000..3a03a88a6f4a --- /dev/null +++ b/owl-bot-staging/OrgPolicy/v2/samples/V2/OrgPolicyClient/update_policy.php @@ -0,0 +1,67 @@ +setPolicy($policy); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $orgPolicyClient->updatePolicy($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END orgpolicy_v2_generated_OrgPolicy_UpdatePolicy_sync] diff --git a/owl-bot-staging/OrgPolicy/v2/src/V2/Client/OrgPolicyClient.php b/owl-bot-staging/OrgPolicy/v2/src/V2/Client/OrgPolicyClient.php new file mode 100644 index 000000000000..cf96ec33cf34 --- /dev/null +++ b/owl-bot-staging/OrgPolicy/v2/src/V2/Client/OrgPolicyClient.php @@ -0,0 +1,729 @@ + createCustomConstraintAsync(CreateCustomConstraintRequest $request, array $optionalArgs = []) + * @method PromiseInterface createPolicyAsync(CreatePolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteCustomConstraintAsync(DeleteCustomConstraintRequest $request, array $optionalArgs = []) + * @method PromiseInterface deletePolicyAsync(DeletePolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface getCustomConstraintAsync(GetCustomConstraintRequest $request, array $optionalArgs = []) + * @method PromiseInterface getEffectivePolicyAsync(GetEffectivePolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface getPolicyAsync(GetPolicyRequest $request, array $optionalArgs = []) + * @method PromiseInterface listConstraintsAsync(ListConstraintsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listCustomConstraintsAsync(ListCustomConstraintsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listPoliciesAsync(ListPoliciesRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateCustomConstraintAsync(UpdateCustomConstraintRequest $request, array $optionalArgs = []) + * @method PromiseInterface updatePolicyAsync(UpdatePolicyRequest $request, array $optionalArgs = []) + */ +final class OrgPolicyClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.orgpolicy.v2.OrgPolicy'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'orgpolicy.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'orgpolicy.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/org_policy_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/org_policy_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/org_policy_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/org_policy_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a + * custom_constraint resource. + * + * @param string $organization + * @param string $customConstraint + * + * @return string The formatted custom_constraint resource. + */ + public static function customConstraintName(string $organization, string $customConstraint): string + { + return self::getPathTemplate('customConstraint')->render([ + 'organization' => $organization, + 'custom_constraint' => $customConstraint, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a folder + * resource. + * + * @param string $folder + * + * @return string The formatted folder resource. + */ + public static function folderName(string $folder): string + { + return self::getPathTemplate('folder')->render([ + 'folder' => $folder, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * folder_policy resource. + * + * @param string $folder + * @param string $policy + * + * @return string The formatted folder_policy resource. + */ + public static function folderPolicyName(string $folder, string $policy): string + { + return self::getPathTemplate('folderPolicy')->render([ + 'folder' => $folder, + 'policy' => $policy, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a organization + * resource. + * + * @param string $organization + * + * @return string The formatted organization resource. + */ + public static function organizationName(string $organization): string + { + return self::getPathTemplate('organization')->render([ + 'organization' => $organization, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_policy resource. + * + * @param string $organization + * @param string $policy + * + * @return string The formatted organization_policy resource. + */ + public static function organizationPolicyName(string $organization, string $policy): string + { + return self::getPathTemplate('organizationPolicy')->render([ + 'organization' => $organization, + 'policy' => $policy, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a policy + * resource. + * + * @param string $project + * @param string $policy + * + * @return string The formatted policy resource. + */ + public static function policyName(string $project, string $policy): string + { + return self::getPathTemplate('policy')->render([ + 'project' => $project, + 'policy' => $policy, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a project + * resource. + * + * @param string $project + * + * @return string The formatted project resource. + */ + public static function projectName(string $project): string + { + return self::getPathTemplate('project')->render([ + 'project' => $project, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_policy resource. + * + * @param string $project + * @param string $policy + * + * @return string The formatted project_policy resource. + */ + public static function projectPolicyName(string $project, string $policy): string + { + return self::getPathTemplate('projectPolicy')->render([ + 'project' => $project, + 'policy' => $policy, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - customConstraint: organizations/{organization}/customConstraints/{custom_constraint} + * - folder: folders/{folder} + * - folderPolicy: folders/{folder}/policies/{policy} + * - organization: organizations/{organization} + * - organizationPolicy: organizations/{organization}/policies/{policy} + * - policy: projects/{project}/policies/{policy} + * - project: projects/{project} + * - projectPolicy: projects/{project}/policies/{policy} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'orgpolicy.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Creates a custom constraint. + * + * Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the + * organization does not exist. + * Returns a `google.rpc.Status` with `google.rpc.Code.ALREADY_EXISTS` if the + * constraint already exists on the given organization. + * + * The async variant is {@see OrgPolicyClient::createCustomConstraintAsync()} . + * + * @example samples/V2/OrgPolicyClient/create_custom_constraint.php + * + * @param CreateCustomConstraintRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return CustomConstraint + * + * @throws ApiException Thrown if the API call fails. + */ + public function createCustomConstraint(CreateCustomConstraintRequest $request, array $callOptions = []): CustomConstraint + { + return $this->startApiCall('CreateCustomConstraint', $request, $callOptions)->wait(); + } + + /** + * Creates a policy. + * + * Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the + * constraint does not exist. + * Returns a `google.rpc.Status` with `google.rpc.Code.ALREADY_EXISTS` if the + * policy already exists on the given Google Cloud resource. + * + * The async variant is {@see OrgPolicyClient::createPolicyAsync()} . + * + * @example samples/V2/OrgPolicyClient/create_policy.php + * + * @param CreatePolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function createPolicy(CreatePolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('CreatePolicy', $request, $callOptions)->wait(); + } + + /** + * Deletes a custom constraint. + * + * Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the + * constraint does not exist. + * + * The async variant is {@see OrgPolicyClient::deleteCustomConstraintAsync()} . + * + * @example samples/V2/OrgPolicyClient/delete_custom_constraint.php + * + * @param DeleteCustomConstraintRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteCustomConstraint(DeleteCustomConstraintRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteCustomConstraint', $request, $callOptions)->wait(); + } + + /** + * Deletes a policy. + * + * Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the + * constraint or organization policy does not exist. + * + * The async variant is {@see OrgPolicyClient::deletePolicyAsync()} . + * + * @example samples/V2/OrgPolicyClient/delete_policy.php + * + * @param DeletePolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException Thrown if the API call fails. + */ + public function deletePolicy(DeletePolicyRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeletePolicy', $request, $callOptions)->wait(); + } + + /** + * Gets a custom constraint. + * + * Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the + * custom constraint does not exist. + * + * The async variant is {@see OrgPolicyClient::getCustomConstraintAsync()} . + * + * @example samples/V2/OrgPolicyClient/get_custom_constraint.php + * + * @param GetCustomConstraintRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return CustomConstraint + * + * @throws ApiException Thrown if the API call fails. + */ + public function getCustomConstraint(GetCustomConstraintRequest $request, array $callOptions = []): CustomConstraint + { + return $this->startApiCall('GetCustomConstraint', $request, $callOptions)->wait(); + } + + /** + * Gets the effective policy on a resource. This is the result of merging + * policies in the resource hierarchy and evaluating conditions. The + * returned policy will not have an `etag` or `condition` set because it is + * an evaluated policy across multiple resources. + * Subtrees of Resource Manager resource hierarchy with 'under:' prefix will + * not be expanded. + * + * The async variant is {@see OrgPolicyClient::getEffectivePolicyAsync()} . + * + * @example samples/V2/OrgPolicyClient/get_effective_policy.php + * + * @param GetEffectivePolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function getEffectivePolicy(GetEffectivePolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('GetEffectivePolicy', $request, $callOptions)->wait(); + } + + /** + * Gets a policy on a resource. + * + * If no policy is set on the resource, `NOT_FOUND` is returned. The + * `etag` value can be used with `UpdatePolicy()` to update a + * policy during read-modify-write. + * + * The async variant is {@see OrgPolicyClient::getPolicyAsync()} . + * + * @example samples/V2/OrgPolicyClient/get_policy.php + * + * @param GetPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function getPolicy(GetPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('GetPolicy', $request, $callOptions)->wait(); + } + + /** + * Lists constraints that could be applied on the specified resource. + * + * The async variant is {@see OrgPolicyClient::listConstraintsAsync()} . + * + * @example samples/V2/OrgPolicyClient/list_constraints.php + * + * @param ListConstraintsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listConstraints(ListConstraintsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListConstraints', $request, $callOptions); + } + + /** + * Retrieves all of the custom constraints that exist on a particular + * organization resource. + * + * The async variant is {@see OrgPolicyClient::listCustomConstraintsAsync()} . + * + * @example samples/V2/OrgPolicyClient/list_custom_constraints.php + * + * @param ListCustomConstraintsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listCustomConstraints(ListCustomConstraintsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListCustomConstraints', $request, $callOptions); + } + + /** + * Retrieves all of the policies that exist on a particular resource. + * + * The async variant is {@see OrgPolicyClient::listPoliciesAsync()} . + * + * @example samples/V2/OrgPolicyClient/list_policies.php + * + * @param ListPoliciesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listPolicies(ListPoliciesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListPolicies', $request, $callOptions); + } + + /** + * Updates a custom constraint. + * + * Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the + * constraint does not exist. + * + * Note: the supplied policy will perform a full overwrite of all + * fields. + * + * The async variant is {@see OrgPolicyClient::updateCustomConstraintAsync()} . + * + * @example samples/V2/OrgPolicyClient/update_custom_constraint.php + * + * @param UpdateCustomConstraintRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return CustomConstraint + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateCustomConstraint(UpdateCustomConstraintRequest $request, array $callOptions = []): CustomConstraint + { + return $this->startApiCall('UpdateCustomConstraint', $request, $callOptions)->wait(); + } + + /** + * Updates a policy. + * + * Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the + * constraint or the policy do not exist. + * Returns a `google.rpc.Status` with `google.rpc.Code.ABORTED` if the etag + * supplied in the request does not match the persisted etag of the policy + * + * Note: the supplied policy will perform a full overwrite of all + * fields. + * + * The async variant is {@see OrgPolicyClient::updatePolicyAsync()} . + * + * @example samples/V2/OrgPolicyClient/update_policy.php + * + * @param UpdatePolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function updatePolicy(UpdatePolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('UpdatePolicy', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/OrgPolicy/v2/src/V2/gapic_metadata.json b/owl-bot-staging/OrgPolicy/v2/src/V2/gapic_metadata.json new file mode 100644 index 000000000000..cf604abda85c --- /dev/null +++ b/owl-bot-staging/OrgPolicy/v2/src/V2/gapic_metadata.json @@ -0,0 +1,78 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.cloud.orgpolicy.v2", + "libraryPackage": "Google\\Cloud\\OrgPolicy\\V2", + "services": { + "OrgPolicy": { + "clients": { + "grpc": { + "libraryClient": "OrgPolicyGapicClient", + "rpcs": { + "CreateCustomConstraint": { + "methods": [ + "createCustomConstraint" + ] + }, + "CreatePolicy": { + "methods": [ + "createPolicy" + ] + }, + "DeleteCustomConstraint": { + "methods": [ + "deleteCustomConstraint" + ] + }, + "DeletePolicy": { + "methods": [ + "deletePolicy" + ] + }, + "GetCustomConstraint": { + "methods": [ + "getCustomConstraint" + ] + }, + "GetEffectivePolicy": { + "methods": [ + "getEffectivePolicy" + ] + }, + "GetPolicy": { + "methods": [ + "getPolicy" + ] + }, + "ListConstraints": { + "methods": [ + "listConstraints" + ] + }, + "ListCustomConstraints": { + "methods": [ + "listCustomConstraints" + ] + }, + "ListPolicies": { + "methods": [ + "listPolicies" + ] + }, + "UpdateCustomConstraint": { + "methods": [ + "updateCustomConstraint" + ] + }, + "UpdatePolicy": { + "methods": [ + "updatePolicy" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/OrgPolicy/v2/src/V2/resources/org_policy_client_config.json b/owl-bot-staging/OrgPolicy/v2/src/V2/resources/org_policy_client_config.json new file mode 100644 index 000000000000..70d2bff64dc2 --- /dev/null +++ b/owl-bot-staging/OrgPolicy/v2/src/V2/resources/org_policy_client_config.json @@ -0,0 +1,95 @@ +{ + "interfaces": { + "google.cloud.orgpolicy.v2.OrgPolicy": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 10000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "CreateCustomConstraint": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "CreatePolicy": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeleteCustomConstraint": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeletePolicy": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetCustomConstraint": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetEffectivePolicy": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListConstraints": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListCustomConstraints": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListPolicies": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateCustomConstraint": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdatePolicy": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/OrgPolicy/v2/src/V2/resources/org_policy_descriptor_config.php b/owl-bot-staging/OrgPolicy/v2/src/V2/resources/org_policy_descriptor_config.php new file mode 100644 index 000000000000..797825a2e765 --- /dev/null +++ b/owl-bot-staging/OrgPolicy/v2/src/V2/resources/org_policy_descriptor_config.php @@ -0,0 +1,208 @@ + [ + 'google.cloud.orgpolicy.v2.OrgPolicy' => [ + 'CreateCustomConstraint' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\OrgPolicy\V2\CustomConstraint', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreatePolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\OrgPolicy\V2\Policy', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteCustomConstraint' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeletePolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetCustomConstraint' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\OrgPolicy\V2\CustomConstraint', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetEffectivePolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\OrgPolicy\V2\Policy', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\OrgPolicy\V2\Policy', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListConstraints' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getConstraints', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\OrgPolicy\V2\ListConstraintsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListCustomConstraints' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getCustomConstraints', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\OrgPolicy\V2\ListCustomConstraintsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListPolicies' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getPolicies', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\OrgPolicy\V2\ListPoliciesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateCustomConstraint' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\OrgPolicy\V2\CustomConstraint', + 'headerParams' => [ + [ + 'keyName' => 'custom_constraint.name', + 'fieldAccessors' => [ + 'getCustomConstraint', + 'getName', + ], + ], + ], + ], + 'UpdatePolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\OrgPolicy\V2\Policy', + 'headerParams' => [ + [ + 'keyName' => 'policy.name', + 'fieldAccessors' => [ + 'getPolicy', + 'getName', + ], + ], + ], + ], + 'templateMap' => [ + 'customConstraint' => 'organizations/{organization}/customConstraints/{custom_constraint}', + 'folder' => 'folders/{folder}', + 'folderPolicy' => 'folders/{folder}/policies/{policy}', + 'organization' => 'organizations/{organization}', + 'organizationPolicy' => 'organizations/{organization}/policies/{policy}', + 'policy' => 'projects/{project}/policies/{policy}', + 'project' => 'projects/{project}', + 'projectPolicy' => 'projects/{project}/policies/{policy}', + ], + ], + ], +]; diff --git a/owl-bot-staging/OrgPolicy/v2/src/V2/resources/org_policy_rest_client_config.php b/owl-bot-staging/OrgPolicy/v2/src/V2/resources/org_policy_rest_client_config.php new file mode 100644 index 000000000000..cb54175b8f87 --- /dev/null +++ b/owl-bot-staging/OrgPolicy/v2/src/V2/resources/org_policy_rest_client_config.php @@ -0,0 +1,241 @@ + [ + 'google.cloud.orgpolicy.v2.OrgPolicy' => [ + 'CreateCustomConstraint' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=organizations/*}/customConstraints', + 'body' => 'custom_constraint', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreatePolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*}/policies', + 'body' => 'policy', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=folders/*}/policies', + 'body' => 'policy', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=organizations/*}/policies', + 'body' => 'policy', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteCustomConstraint' => [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{name=organizations/*/customConstraints/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeletePolicy' => [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{name=projects/*/policies/*}', + 'additionalBindings' => [ + [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{name=folders/*/policies/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{name=organizations/*/policies/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetCustomConstraint' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=organizations/*/customConstraints/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetEffectivePolicy' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/policies/*}:getEffectivePolicy', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=folders/*/policies/*}:getEffectivePolicy', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=organizations/*/policies/*}:getEffectivePolicy', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetPolicy' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/policies/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=folders/*/policies/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=organizations/*/policies/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListConstraints' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*}/constraints', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=folders/*}/constraints', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=organizations/*}/constraints', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListCustomConstraints' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=organizations/*}/customConstraints', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListPolicies' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*}/policies', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=folders/*}/policies', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=organizations/*}/policies', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateCustomConstraint' => [ + 'method' => 'patch', + 'uriTemplate' => '/v2/{custom_constraint.name=organizations/*/customConstraints/*}', + 'body' => 'custom_constraint', + 'placeholders' => [ + 'custom_constraint.name' => [ + 'getters' => [ + 'getCustomConstraint', + 'getName', + ], + ], + ], + ], + 'UpdatePolicy' => [ + 'method' => 'patch', + 'uriTemplate' => '/v2/{policy.name=projects/*/policies/*}', + 'body' => 'policy', + 'additionalBindings' => [ + [ + 'method' => 'patch', + 'uriTemplate' => '/v2/{policy.name=folders/*/policies/*}', + 'body' => 'policy', + ], + [ + 'method' => 'patch', + 'uriTemplate' => '/v2/{policy.name=organizations/*/policies/*}', + 'body' => 'policy', + ], + ], + 'placeholders' => [ + 'policy.name' => [ + 'getters' => [ + 'getPolicy', + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/OrgPolicy/v2/tests/Unit/V2/Client/OrgPolicyClientTest.php b/owl-bot-staging/OrgPolicy/v2/tests/Unit/V2/Client/OrgPolicyClientTest.php new file mode 100644 index 000000000000..40bcc9e397c2 --- /dev/null +++ b/owl-bot-staging/OrgPolicy/v2/tests/Unit/V2/Client/OrgPolicyClientTest.php @@ -0,0 +1,942 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return OrgPolicyClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new OrgPolicyClient($options); + } + + /** @test */ + public function createCustomConstraintTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $condition = 'condition-861311717'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $expectedResponse = new CustomConstraint(); + $expectedResponse->setName($name); + $expectedResponse->setCondition($condition); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->organizationName('[ORGANIZATION]'); + $customConstraint = new CustomConstraint(); + $request = (new CreateCustomConstraintRequest()) + ->setParent($formattedParent) + ->setCustomConstraint($customConstraint); + $response = $gapicClient->createCustomConstraint($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.orgpolicy.v2.OrgPolicy/CreateCustomConstraint', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getCustomConstraint(); + $this->assertProtobufEquals($customConstraint, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createCustomConstraintExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->organizationName('[ORGANIZATION]'); + $customConstraint = new CustomConstraint(); + $request = (new CreateCustomConstraintRequest()) + ->setParent($formattedParent) + ->setCustomConstraint($customConstraint); + try { + $gapicClient->createCustomConstraint($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $etag = 'etag3123477'; + $expectedResponse = new Policy(); + $expectedResponse->setName($name); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $policy = new Policy(); + $request = (new CreatePolicyRequest()) + ->setParent($formattedParent) + ->setPolicy($policy); + $response = $gapicClient->createPolicy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.orgpolicy.v2.OrgPolicy/CreatePolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getPolicy(); + $this->assertProtobufEquals($policy, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $policy = new Policy(); + $request = (new CreatePolicyRequest()) + ->setParent($formattedParent) + ->setPolicy($policy); + try { + $gapicClient->createPolicy($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteCustomConstraintTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->customConstraintName('[ORGANIZATION]', '[CUSTOM_CONSTRAINT]'); + $request = (new DeleteCustomConstraintRequest()) + ->setName($formattedName); + $gapicClient->deleteCustomConstraint($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.orgpolicy.v2.OrgPolicy/DeleteCustomConstraint', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteCustomConstraintExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->customConstraintName('[ORGANIZATION]', '[CUSTOM_CONSTRAINT]'); + $request = (new DeleteCustomConstraintRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteCustomConstraint($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deletePolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->policyName('[PROJECT]', '[POLICY]'); + $request = (new DeletePolicyRequest()) + ->setName($formattedName); + $gapicClient->deletePolicy($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.orgpolicy.v2.OrgPolicy/DeletePolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deletePolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->policyName('[PROJECT]', '[POLICY]'); + $request = (new DeletePolicyRequest()) + ->setName($formattedName); + try { + $gapicClient->deletePolicy($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getCustomConstraintTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $condition = 'condition-861311717'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $expectedResponse = new CustomConstraint(); + $expectedResponse->setName($name2); + $expectedResponse->setCondition($condition); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->customConstraintName('[ORGANIZATION]', '[CUSTOM_CONSTRAINT]'); + $request = (new GetCustomConstraintRequest()) + ->setName($formattedName); + $response = $gapicClient->getCustomConstraint($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.orgpolicy.v2.OrgPolicy/GetCustomConstraint', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getCustomConstraintExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->customConstraintName('[ORGANIZATION]', '[CUSTOM_CONSTRAINT]'); + $request = (new GetCustomConstraintRequest()) + ->setName($formattedName); + try { + $gapicClient->getCustomConstraint($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getEffectivePolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $etag = 'etag3123477'; + $expectedResponse = new Policy(); + $expectedResponse->setName($name2); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->policyName('[PROJECT]', '[POLICY]'); + $request = (new GetEffectivePolicyRequest()) + ->setName($formattedName); + $response = $gapicClient->getEffectivePolicy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.orgpolicy.v2.OrgPolicy/GetEffectivePolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getEffectivePolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->policyName('[PROJECT]', '[POLICY]'); + $request = (new GetEffectivePolicyRequest()) + ->setName($formattedName); + try { + $gapicClient->getEffectivePolicy($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $etag = 'etag3123477'; + $expectedResponse = new Policy(); + $expectedResponse->setName($name2); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->policyName('[PROJECT]', '[POLICY]'); + $request = (new GetPolicyRequest()) + ->setName($formattedName); + $response = $gapicClient->getPolicy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.orgpolicy.v2.OrgPolicy/GetPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->policyName('[PROJECT]', '[POLICY]'); + $request = (new GetPolicyRequest()) + ->setName($formattedName); + try { + $gapicClient->getPolicy($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listConstraintsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $constraintsElement = new Constraint(); + $constraints = [ + $constraintsElement, + ]; + $expectedResponse = new ListConstraintsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setConstraints($constraints); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $request = (new ListConstraintsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listConstraints($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getConstraints()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.orgpolicy.v2.OrgPolicy/ListConstraints', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listConstraintsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $request = (new ListConstraintsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listConstraints($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listCustomConstraintsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $customConstraintsElement = new CustomConstraint(); + $customConstraints = [ + $customConstraintsElement, + ]; + $expectedResponse = new ListCustomConstraintsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setCustomConstraints($customConstraints); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->organizationName('[ORGANIZATION]'); + $request = (new ListCustomConstraintsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listCustomConstraints($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getCustomConstraints()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.orgpolicy.v2.OrgPolicy/ListCustomConstraints', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listCustomConstraintsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->organizationName('[ORGANIZATION]'); + $request = (new ListCustomConstraintsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listCustomConstraints($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listPoliciesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $policiesElement = new Policy(); + $policies = [ + $policiesElement, + ]; + $expectedResponse = new ListPoliciesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setPolicies($policies); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $request = (new ListPoliciesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listPolicies($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getPolicies()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.orgpolicy.v2.OrgPolicy/ListPolicies', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listPoliciesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $request = (new ListPoliciesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listPolicies($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateCustomConstraintTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $condition = 'condition-861311717'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $expectedResponse = new CustomConstraint(); + $expectedResponse->setName($name); + $expectedResponse->setCondition($condition); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $customConstraint = new CustomConstraint(); + $request = (new UpdateCustomConstraintRequest()) + ->setCustomConstraint($customConstraint); + $response = $gapicClient->updateCustomConstraint($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.orgpolicy.v2.OrgPolicy/UpdateCustomConstraint', $actualFuncCall); + $actualValue = $actualRequestObject->getCustomConstraint(); + $this->assertProtobufEquals($customConstraint, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateCustomConstraintExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $customConstraint = new CustomConstraint(); + $request = (new UpdateCustomConstraintRequest()) + ->setCustomConstraint($customConstraint); + try { + $gapicClient->updateCustomConstraint($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updatePolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $etag = 'etag3123477'; + $expectedResponse = new Policy(); + $expectedResponse->setName($name); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $policy = new Policy(); + $request = (new UpdatePolicyRequest()) + ->setPolicy($policy); + $response = $gapicClient->updatePolicy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.orgpolicy.v2.OrgPolicy/UpdatePolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getPolicy(); + $this->assertProtobufEquals($policy, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updatePolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $policy = new Policy(); + $request = (new UpdatePolicyRequest()) + ->setPolicy($policy); + try { + $gapicClient->updatePolicy($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createCustomConstraintAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $condition = 'condition-861311717'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $expectedResponse = new CustomConstraint(); + $expectedResponse->setName($name); + $expectedResponse->setCondition($condition); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->organizationName('[ORGANIZATION]'); + $customConstraint = new CustomConstraint(); + $request = (new CreateCustomConstraintRequest()) + ->setParent($formattedParent) + ->setCustomConstraint($customConstraint); + $response = $gapicClient->createCustomConstraintAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.orgpolicy.v2.OrgPolicy/CreateCustomConstraint', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getCustomConstraint(); + $this->assertProtobufEquals($customConstraint, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/OsConfig/v1/proto/src/GPBMetadata/Google/Cloud/Osconfig/V1/Inventory.php b/owl-bot-staging/OsConfig/v1/proto/src/GPBMetadata/Google/Cloud/Osconfig/V1/Inventory.php new file mode 100644 index 0000000000000000000000000000000000000000..5d339f5b4ca1f94aa05a0206c3ebe3b023254fc2 GIT binary patch literal 4419 zcmbtYOLG%P5JvI~^%`R@U=%^Y+E8Uf1t~Tpxa2sLWXnduu@pZBoHi#BSMeN7*1I zaWs$Am0DNvT12rO%d>RLP-=doK^#T5+BP+alU9_qlCo9WRSIjx-5C^hE#J{eR%u#R z(;yk$u>5+)a&^mW&}OEykfCOWn4aZy(_ATlskMn~YdTRj%K7hzr`0u2t8Q@l>ME13 zmIC=|WnmdWH#FB(ilH8O3kv?(e$Ak|;(D5g|L#&(r6%>LX3#h2$BNR>440tv@x2Y- z)IDmM3KJ-qI+?$x2%T*2UE4yxSCr7AGJ^tPs1{9+IHqP)*NCe-)JC7mxHX$?5-$Rf zt<2vGj%Dg-Lzx#gX0ykPTv0s7C;g`@ibFi#F_*dBOu=FFt9k-nIh$73DKYAK($YHA zaCQsxvp|Pt(~J|qA*hrT!Dw*) zBwTD+uE%{!FrU!FgkhOYl`qBlk__OsEXNaT+;#afjCF|P;??7)CgiIyt~q)Oz0r~M zBss!Gr(t3rZyGVwaQEnub%z*4b4hZHuit{{Frcc|#AFl6U1Z-=?}lNR`Hv>WX`KU} zke`BNIkZVll?4x>jLlChJ`7PfMw7lMFjeUimt};OGa%^>iST4+N{eUU$prcXz#u$Z zU>SzFkqn-R#Rmf$$;~Un6gBap8V0GWn0EIOq9g-U8qD1ttKl7J4k-)Krx#?@sC6`I zXf=aG8d)gLt8w-TKp&tt;CgAhxKZ3vcVCnX>fY8)xv*MXFBaA&FCb+mi(8e#)^2J0 zg}PlRm$r8&W3%7FFn1Qeo*;7#rixoTySdHH!kSvntv<_b6eeRbF6Sz_;$|+tS%{Y7 z`2>vBu_{r+P5nIrmyh@_KLe@jw7cd3uZAc4;v)2y`#GUu6x&kbotS4ty>0QjmFR z5IxVSS+@?{J)Zx1VW?I?det~e=E5gv{NAVf{yKeKFfpYN;!v~MQ;$*BG2Pq2_00s@XQSK-m9aLKRu$t4}aF*OPvFp`Z07m^?~VmZ<~tMM7sxIG(>n>hDYQ zJnyF}AoT@M#yo7ZND56N=VMJlM@SRPZomFTsdMJ%a?f{t8I-pl4%H2`g*ZSc(%Vaq$FJO1C}%zK=MR{>Y5gz!RBOvYM(n z*r8&oq;(e!A41&FAlJ8TRvvxFNJ<<`+}ySt+=extExUL@*k&xQLAk)%wqbSKtQP7m&1?p>9(X=Dqc)`$;M&Qq^w-YuprPSF zrhbmWOdxamEnvaZG1W2rS<2)X91jXoqh)z&gT6+zg0O!9<3Rxv4GSa8ne{UDOAO?| zqCS!{4%ew`8(LQ|PuPK2hO1$_AqaxF^BKc!A-tl2sm}FmVI5S^JWYkPVO2WK8eA5% z7BOtqpys}4Yw#98Ul%69&_3w~SUiT2j%N6x4Urb-Lw*0%hGgSQv8?$aw+}O62NZ~6 zH|wTxYRg33qr8r--4EDkxtX`YufvRCiS&VM;m<>y*sxu|u?QE#pKLK0<7R(~!Icf- zMT)n{D<3BT`EkGs4r~72`&|5=+?_!T`x1sblpF*-Saogy?<=@}_Kz4$Z&Ek11n+Ur zmQfpf7Sj^|=c{wvoEf;yCRraFbf-px*)k&X9J_kfJ_$SC z2^eiq0|!Y#idh4$A9KOAEz>3P5=bHFEJMY3hPpEVI5JY&B(GW7j!x&4zP|>SqOdUt z=%eGc_(nBxJxF) zR$bB;dsERJ5z(?u*VIfy?0JI$u|>@sTe?APNfav$vEJy2a;4gN1GhS+XKSP&4o!1t zkUN@Tdi^`5qnVR|KD=|hg})WcG<0n$F;IYsIwp>#YDC;^mTJUR`>LyUciH}KneOj4 z{Qcd7tp@;_p*oJ(aGDGTz5x;cSzZr8MaNZL{O_jjDEdTqb=A9;p66R*831_CuH6UaihI&q0TQH^eeIGU|nu4y;%(?VfL z+!=rL&E{?YSPG{P#7!<^p>R&fZPB$o5Rv!s(bBs+Ix+es zGE$Fq(=HTFZgm2}F7@t1-M>Py-=9gmgKFKJok35$1%GeA=8Ni6$nq~GrgkAuud9Y(ex*!I~o~chD zY8?$3L#h0OIqo7gRqaR}k^p+|lF$LLiDf!Em6p+*%0HY3vNhWsLfwNH`I=}*_Y%^5 ze;zy;_nk%>phYrj=R~5Ge1eqwB?2+}N~l8ICS%j(T1e$ToJTy0AhpuI3=f6#&E3R70^;cf?eX#J8`(DmONL;t&#%S|1Pa>#Q4HA?Dz(NY{@ z?$jc=?~<@~#*le$}+V*BP_TI9-47!sG#w#L~w^UZ~% zY&Cr;X;en5T4s<7Nx5s9yTs*EjvYOlSX|0lySjHNr$7{yB*+lw8G*ULe5pX9&d)7z z9g>!37)qaDQlY6Tk;_69tx8yj*qI1Vk4C2c-=ooBE;{-;#JS#|v&iYbXz>e(B5^NE zXpARV?V%;RI-!I`H+PmouI^OjO6HP~hGeyl z3;X-{xFn=txh2;c2lx;vWnk5rIxZPw3}qQE_v11M=TnpLIj{&q%Z^lje;#)_4<;2Y z_v9^_EP_+_r{=IY_@OsG1+LCw0gc9~d}Bf3xmlb#0_8_X_QThr-ATjfjyqeS|Y&d=9Tn{p5mHyJt zxCiM|ioYPT@VdnaRU4(1a1omOCkiX!DiG6P;u!llYzu>uZF?Rg31dn0fh)HT%VaVz zv03#!b}`W0&sbklbm3!&4KPvs*93!sB!fwcwUnGBe6s>E)gC&iV2qrC1}WCMS=bz6 zaX{;h)qHg!P9)aOazM^c7BZ&iTAr)W+wkI)HaN+R2Bbn?3)kUlwce3i&6bRR&qVD6 z#OjT@jK-dX%k4dRe?JouRsougPvsVWj+PQZQqKJrffbr%gS!1Ckhu=aIDBx?g=cJH zjy|ci`E3v3GA~>?nesejh6TQ$YQ@GD6W>^OXoKhY0prPh$q%y~(%Y8n9b^(9UM#WS z5kY{}as%0~ciKv=*eUO2LUfkaAZ-U7Fst3aUxIYNE$eKB8m#L$#GB&m$M!R_Ij54)Gp3XyS1ZL%wNXbp)*vO< zcN(p-T%-I%Nmnm{%ICK;W_(Mre8_N^B;bY7QMP54sMJuFr zr=jB+j!X|Q3>SvsAAmoF8LphUaOoewp(ozz(~WIPDe=WS+THhl@3+5w@9o>~x_d6X zDs2*ncm^XqY4<>4dqi?Q%BV?gX?NJ~6HhYfzH8aUlO?IHNlmRIsr5$Z72N96p=T0B z8c;g0Ny)V7uvenKNu9nmDBWAbvF=jaG7oga_pO1mPaLLu#HAkd<-iYsW9$>(HB2IH zwyIl%89jp;-Oa#cx5iC&wa8?5XKfw8w9%NP`K`cmB{94m+Jy%o;m;lJqGQQt2E)Hq z%hxT(VwPcBUt*{?rM_YN1g%Z3?GGK3S=5pE2F)=^@v0Qss{8 zgo;O8VsT92f`Sc&O~SPHbR}++FNR2gxB+uq<2gYRiVM{ne^fG$D`mKzfC#;ye_zI{ zR+?q5@UsA`cPxLVKR0N6G+2iIUn1O^(`lN zRy+%fm}N0n4;|g=<>onW`M&_fID|3dE3lM?fQtj2ixjeHI66;pp?;RjcVoX3mob5U zIH@NSsarW6wz+ZfGMqo`5KE2WQzz2t*8*HhfyQ@TPdCM+fBOFbjH!x~XbL$0=p^K4 zPm3>)iy{GHDw@u4u~ym@|DF1tsLD`obn zQV7zM_`Lut5#cY7Tpa0$PugPJZ4b~T;DpD|2;EJ6$!=P3NXhG+^~== zm%kE@9Oa}$V=!_Dfr#heH1Ry@=~(K0tP)|0EPR7NgZUN6c0OvU`rT%`rPdl74Yi&< zhV=t>Dt8+7N~fVUvjXPnvvsxI*jDR$yHn|?dhM24yPeJ8HMsEPgxcKDwrlE^+U#VH zi$z#{ayrAcko(gjCRFE~l7Q8;>owZ-% zsc!U)z;{GA*~N#%qs&X;MnwsBDoQ-7C^%ce6!BmBrB9BO@!fee&*+<1lJ@vo_(T|c UQSef0nNwa9!OF1bAHfLVZ%TKx6gNrfpA%Zj0pn>Jij z%ETm&=8=xl-d4O#qS%h*S-NE??f%9FaTML^+0-CTT2YEMWwo}Zl!}$L3n=PZeMcub zrE6JTgJg8W>UT1ht6Syn@L^qk7aOlLrDo8bGZ>EZ!4bDC&Q;JibK4YdMTMa<=5^WIQtNWH3aTU5vxM=?;kHZi&DpLUxTJt39n}kC)|Ky7m$EnUn8yLZU2VkflP`GDlyA@6N&X z!$g-P3#l}Z$#f8t>8*vt86QuxX~yxLEkZJpdihcQ&h!g*3csnCHqdeY{ zNDVp4CvQPKNK}-#a!iS(;@PBs#Ze2UgHx7bPx4XeGdM;~^f+b>b%Pq15#$Mkjb|5M zjxfk!>57kmEIf*Ik+L0&O&Dly!x(z48 z72P3N3RGrWd5RyI2#yR~lMWd!#L>W*ySwrm0&IgZFPI6arW8K8{tF|_88 zEqukB3_u)m3Z~ndOAKlf84z(=OrM0Q4lxK8FF8J#J;~P<)ed@d5HD#^0PQ2 zE}!@*0@GEkO^hb-q)%beU}G2A!Z?sWkk$cAnh)HP={ehpYY-p$l;RM3NVa`4&ccx` z&FB+B!(8-6B=Jua=ALH)6VVKVi%d&3n5U+0^tl^-U87vr_Yb8j10;`j0g3=PB;W&x zQ*#UJyydW9n&8Tn4y4@k2EfP=aNCJRmrhH;aci?!3x=!C_1ww82J6N!}h2z=O-l{IsN2F78>I9n}(-SA%gyTJGs$Xl= zQ-hqw4~%Ee1V~}z1SN@!CJi_`OmyiSoN3gm)!O=++FZ-8mDKgsX1!FXELTd!`8T9v z5U;GN^+v7SC^eh&5or#fkY6p7s@2MBc|I!5!i@io`(y00xn3xgN=5vf$o&v`n*TNe z?}nv7c{CP-?7Fq9go_?JZY+{|Ntw39I`omW+y3x+$`=Iu_qxE!R^;ofg2 z`D6kvjviIBSqqB32--kt1x}6w5RtQ#d6vI=psRcifHzfp#M`tw+&^>Ka^Ro+Wd2N(7VZY2S6iI#o zXUoLfTg^{~Te77rH~oRaIr)7A-mX%2%o*-~;NjyiV{2Way7;@1-}wkDD16GZ9uiZy zCHW(IWKShr+cI4u-Gfu(d>b?v2V#qK8jhLdk*5x6!W-D+uMv1>ye195^*FADX@gBzk0iPFr= za@QI>s9-MQZz|#kmfc_qYC~!7mF=? zR(TqIO9SLZV_)hWQumd{){{m1e B3(f!l literal 0 HcmV?d00001 diff --git a/owl-bot-staging/OsConfig/v1/proto/src/GPBMetadata/Google/Cloud/Osconfig/V1/OsconfigCommon.php b/owl-bot-staging/OsConfig/v1/proto/src/GPBMetadata/Google/Cloud/Osconfig/V1/OsconfigCommon.php new file mode 100644 index 0000000000000000000000000000000000000000..56df5d202f1f7c2b6971af95aa1f6ae72966706f GIT binary patch literal 889 zcmb7CO^Xvj5H-P#&eZWi@9eF<(c}dzQKDfMGf2OJy+P1MS;bWWX_e<_ zfUB(*1)2z85yPkW3f?a+ub#QlQdNc{g^g010!O@1RW?#3S27oy(e1eXzIGg2B_mHw zh-6zVHRA}&)$Ai$mNCncrDsXzHA@ojSd#U4LI^KdSwd5rdouE!fO~Y67J@@*nRTyY zQC){8d&ozSx3;DeIShkFN)JR%!I}#9w*wfom5~##yC%46zr3`(Ve7^KusQrdJWU60eA aPwwlJ_O>sBWqS_)(_N1YM&6M-LjD51`yht^ literal 0 HcmV?d00001 diff --git a/owl-bot-staging/OsConfig/v1/proto/src/GPBMetadata/Google/Cloud/Osconfig/V1/OsconfigService.php b/owl-bot-staging/OsConfig/v1/proto/src/GPBMetadata/Google/Cloud/Osconfig/V1/OsconfigService.php new file mode 100644 index 000000000000..82c4921ead68 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/GPBMetadata/Google/Cloud/Osconfig/V1/OsconfigService.php @@ -0,0 +1,47 @@ +internalAddGeneratedFile( + ' +Œ +/google/cloud/osconfig/v1/osconfig_service.protogoogle.cloud.osconfig.v1google/api/resource.proto0google/cloud/osconfig/v1/patch_deployments.proto)google/cloud/osconfig/v1/patch_jobs.protogoogle/protobuf/empty.protogoogle/api/annotations.proto2¬ +OsConfigService +ExecutePatchJob0.google.cloud.osconfig.v1.ExecutePatchJobRequest".google.cloud.osconfig.v1.PatchJob"4‚Óä“.")/v1/{parent=projects/*}/patchJobs:execute:*‘ + GetPatchJob,.google.cloud.osconfig.v1.GetPatchJobRequest".google.cloud.osconfig.v1.PatchJob"0ÚAname‚Óä“#!/v1/{name=projects/*/patchJobs/*}š +CancelPatchJob/.google.cloud.osconfig.v1.CancelPatchJobRequest".google.cloud.osconfig.v1.PatchJob"3‚Óä“-"(/v1/{name=projects/*/patchJobs/*}:cancel:*¤ + ListPatchJobs..google.cloud.osconfig.v1.ListPatchJobsRequest/.google.cloud.osconfig.v1.ListPatchJobsResponse"2ÚAparent‚Óä“#!/v1/{parent=projects/*}/patchJobsà +ListPatchJobInstanceDetails<.google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest=.google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse"DÚAparent‚Óä“53/v1/{parent=projects/*/patchJobs/*}/instanceDetailsì +CreatePatchDeployment6.google.cloud.osconfig.v1.CreatePatchDeploymentRequest).google.cloud.osconfig.v1.PatchDeployment"pÚA+parent,patch_deployment,patch_deployment_id‚Óä“<"(/v1/{parent=projects/*}/patchDeployments:patch_deployment­ +GetPatchDeployment3.google.cloud.osconfig.v1.GetPatchDeploymentRequest).google.cloud.osconfig.v1.PatchDeployment"7ÚAname‚Óä“*(/v1/{name=projects/*/patchDeployments/*}À +ListPatchDeployments5.google.cloud.osconfig.v1.ListPatchDeploymentsRequest6.google.cloud.osconfig.v1.ListPatchDeploymentsResponse"9ÚAparent‚Óä“*(/v1/{parent=projects/*}/patchDeployments  +DeletePatchDeployment6.google.cloud.osconfig.v1.DeletePatchDeploymentRequest.google.protobuf.Empty"7ÚAname‚Óä“**(/v1/{name=projects/*/patchDeployments/*}î +UpdatePatchDeployment6.google.cloud.osconfig.v1.UpdatePatchDeploymentRequest).google.cloud.osconfig.v1.PatchDeployment"rÚApatch_deployment,update_mask‚Óä“M29/v1/{patch_deployment.name=projects/*/patchDeployments/*}:patch_deploymentº +PausePatchDeployment5.google.cloud.osconfig.v1.PausePatchDeploymentRequest).google.cloud.osconfig.v1.PatchDeployment"@ÚAname‚Óä“3"./v1/{name=projects/*/patchDeployments/*}:pause:*½ +ResumePatchDeployment6.google.cloud.osconfig.v1.ResumePatchDeploymentRequest).google.cloud.osconfig.v1.PatchDeployment"AÚAname‚Óä“4"//v1/{name=projects/*/patchDeployments/*}:resume:*KÊAosconfig.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformBÔ +com.google.cloud.osconfig.v1B OsConfigProtoZ8cloud.google.com/go/osconfig/apiv1/osconfigpb;osconfigpbªGoogle.Cloud.OsConfig.V1ÊGoogle\\Cloud\\OsConfig\\V1êGoogle::Cloud::OsConfig::V1êA• +compute.googleapis.com/Instance4projects/{project}/zones/{zone}/instances/{instance}internalAddGeneratedFile( + ' +Ý +5google/cloud/osconfig/v1/osconfig_zonal_service.protogoogle.cloud.osconfig.v1google/api/client.proto(google/cloud/osconfig/v1/inventory.proto;google/cloud/osconfig/v1/os_policy_assignment_reports.proto4google/cloud/osconfig/v1/os_policy_assignments.proto,google/cloud/osconfig/v1/vulnerability.proto#google/longrunning/operations.proto2¬ +OsConfigZonalService¾ +CreateOSPolicyAssignment9.google.cloud.osconfig.v1.CreateOSPolicyAssignmentRequest.google.longrunning.Operation"ÇÊA9 +OSPolicyAssignment#OSPolicyAssignmentOperationMetadataÚA3parent,os_policy_assignment,os_policy_assignment_id‚Óä“O"7/v1/{parent=projects/*/locations/*}/osPolicyAssignments:os_policy_assignmentÀ +UpdateOSPolicyAssignment9.google.cloud.osconfig.v1.UpdateOSPolicyAssignmentRequest.google.longrunning.Operation"ÉÊA9 +OSPolicyAssignment#OSPolicyAssignmentOperationMetadataÚA os_policy_assignment,update_mask‚Óä“d2L/v1/{os_policy_assignment.name=projects/*/locations/*/osPolicyAssignments/*}:os_policy_assignmentÅ +GetOSPolicyAssignment6.google.cloud.osconfig.v1.GetOSPolicyAssignmentRequest,.google.cloud.osconfig.v1.OSPolicyAssignment"FÚAname‚Óä“97/v1/{name=projects/*/locations/*/osPolicyAssignments/*}Ø +ListOSPolicyAssignments8.google.cloud.osconfig.v1.ListOSPolicyAssignmentsRequest9.google.cloud.osconfig.v1.ListOSPolicyAssignmentsResponse"HÚAparent‚Óä“97/v1/{parent=projects/*/locations/*}/osPolicyAssignmentsü +ListOSPolicyAssignmentRevisions@.google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsRequestA.google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsResponse"TÚAname‚Óä“GE/v1/{name=projects/*/locations/*/osPolicyAssignments/*}:listRevisionsü +DeleteOSPolicyAssignment9.google.cloud.osconfig.v1.DeleteOSPolicyAssignmentRequest.google.longrunning.Operation"…ÊA< +google.protobuf.Empty#OSPolicyAssignmentOperationMetadataÚAname‚Óä“9*7/v1/{name=projects/*/locations/*/osPolicyAssignments/*}ê +GetOSPolicyAssignmentReport<.google.cloud.osconfig.v1.GetOSPolicyAssignmentReportRequest2.google.cloud.osconfig.v1.OSPolicyAssignmentReport"YÚAname‚Óä“LJ/v1/{name=projects/*/locations/*/instances/*/osPolicyAssignments/*/report}€ +ListOSPolicyAssignmentReports>.google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsRequest?.google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsResponse"^ÚAparent‚Óä“OM/v1/{parent=projects/*/locations/*/instances/*/osPolicyAssignments/*}/reportsª + GetInventory-.google.cloud.osconfig.v1.GetInventoryRequest#.google.cloud.osconfig.v1.Inventory"FÚAname‚Óä“97/v1/{name=projects/*/locations/*/instances/*/inventory}Ä +ListInventories0.google.cloud.osconfig.v1.ListInventoriesRequest1.google.cloud.osconfig.v1.ListInventoriesResponse"LÚAparent‚Óä“=;/v1/{parent=projects/*/locations/*/instances/*}/inventoriesÒ +GetVulnerabilityReport7.google.cloud.osconfig.v1.GetVulnerabilityReportRequest-.google.cloud.osconfig.v1.VulnerabilityReport"PÚAname‚Óä“CA/v1/{name=projects/*/locations/*/instances/*/vulnerabilityReport}è +ListVulnerabilityReports9.google.cloud.osconfig.v1.ListVulnerabilityReportsRequest:.google.cloud.osconfig.v1.ListVulnerabilityReportsResponse"UÚAparent‚Óä“FD/v1/{parent=projects/*/locations/*/instances/*}/vulnerabilityReportsKÊAosconfig.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformBÉ +com.google.cloud.osconfig.v1BOsConfigZonalServiceProtoPZ8cloud.google.com/go/osconfig/apiv1/osconfigpb;osconfigpbªGoogle.Cloud.OsConfig.V1ÊGoogle\\Cloud\\OsConfig\\V1êGoogle::Cloud::OsConfig::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/GPBMetadata/Google/Cloud/Osconfig/V1/PatchDeployments.php b/owl-bot-staging/OsConfig/v1/proto/src/GPBMetadata/Google/Cloud/Osconfig/V1/PatchDeployments.php new file mode 100644 index 0000000000000000000000000000000000000000..39309081323defe69e250901dfd5dd527826407c GIT binary patch literal 4584 zcmcIo-BQ~|6s}G9@iD`XI!O&=TGdS(m=rmXCeu+uQ~&Xk1Wdt@NyZ(Ikk+6?mQ+cm zaWdSt5766AAD|D>2k1>-q1Tx{L9crDtYm|1f|F^uLDuf~?b&m_bM|QO-FJ^%_)K17 zHuJQA8S+6}4vv`YdQRZzjwK(o8V%;jy3=$`i+PGHmn!mBr7D+88`Vz{>N_n@XR3VY zIENO?>6X(na*nS%cEdc(9WUivEzpnZ26HW^-DGy)D?|=pYfa|6n$G04?ZPGtG(!ut z+8XiHikzob33+P!OLqZuOY?nsoAZ^rbnpsf{Bv6emZ{5rpauBvn(5a~+YC(2GGF4h zR^*0e`3y;V=Qdil9+-|Tb3nz`+5CbmIQiUbu7hq^kt4&lxo6NTwGBI9o~>E667zM> zbOXoR#;K}$$bybP`J4HLa9K`gHspC>qpJ28xgrN%i=AFwmOU13FKz-Bp+5Jm?M!!#OajCr&kr&jaVcAAISKPfIOSA%@}|ptS2v z&42z5*s6(2478>@IJVk$S*?UA6Cn1jVQr`JBV%u2DlNy&bQ*@%?!O)>b@3ZB)Mef< zIx<|v+@0?Ths)?X{5l6W-!^Hbj6f)q=1P?2%JI_dOvt6VX3h&`Br<(=;eutJp;*GH zABR(^L|~TXj8GBbcvNOO;|(tMdK2Rw&iEwGzyn0V4JXWo69SB24oeP2FdUmZI~Ini z-ymnDSct*wKO-<1t4z{3T;eq@laLehDJcVKBdipt@Jy1wEDZgfPe>18(zMY;EIsvx zX<=E(4B=>cc~KGe^txN2wKhT&h8IDcEGc~p<1STPQGqj;i0ShSn2J=cg*i82Eb@A0 zn9ws3I&!-bC2F*RX~$-D?vuK&A2Fk4vCIfT7b0knVw8%_xT1GM0GYr3fwTpZ$Mlxx znf76qZIsw$H@4ztqk}kvaZZ%&m*Y~z|x68$i)s1p#>H`U2BwwsODiVwy5hLZxoSfsA(I!wm&Bi)Aa zGk)i3mtMXg(#h;k!!X?=9%&I$BTCff&bo|88>3vuU~`|73@4V)MjPW?X>b^YC;M{(CSzWc9>6q*bHQ*b z@_s1k3!+ElL`UpcoHLLjJgJY%d^j8_Ou+c*1+vFtH(d(!*f`nYc!r66GnpXZ@r`og zH*Zw>2tX{?@L52|B~c}^e9~Ylrx~6E9_=a!E3L7_U!t)94=RNogIX;xoci{SAVTnJi-Z6lT^~5F3hivvRt} zDCB4_3xn6<>@NwJdt~}?dOza-U%Yh%QZ9P4?&G%@`AEcy2a(9})!4CfG5-NC(!%TH1*IAsHMW!dlHYKd7aVDHK4zoAC=sJl34fqvo< z$JyZ9Bk`Q-V|b5D&hK|Jb-tcBDv_<#U~XG$`R~gC=wSTRY&G8#f8h^wFm@j2o=t_R znB)DYUyH*qYPhj&Idr=B7}(3;RYug{xCeK;kH04~YjkI!6#1QnQt?GIt?V!T84cCK z`wYC$5Q8OqFwp{IVM%f*=OHfIpvUBDu#W?&<07@9Un~ zPk-y~yYQC0&1~iw0UOA@13B1dvgG?&j6~H!z%y*4Gleb%& z_gG*IjKJ90<_dPIq+myl6ztr;c^jZ_8NM&KNYNLl2fhUv|G8n$GW)V07y>UW`+@1$G6|@5pRHe)g-%-gw(H=*Ka*pNTI37#!%p1} zm}eW-PL26}&vXOFYvIyzd5;An57Nl`^=MmCXYR`D!p3rW%E-^;zzf;QKonQH@0bJhRkPfJVWpI>Vu3pMC$4 zV{0KMAI9S)L^~$tQeX_-<7Ig)Z+vb>k*f>_qd;w8KCh2lOOCzgULqA6AuSDxPb}$P!29dL(`Ky!jLF^H+ zpzwzzTvDE~ei*PAK^pryM6XFzSac1K*+D)bC)U%OAN*9Adr`Ro@ADJIh7S$f*hA=x zjqpf*5iQ)n=zYcdfpi`+g9r~8!u%X*lJ3HaX=7XvTl%hPA#U>La3WK>5viGWT9I2< zkEAdbDm=%Q3d%lSNU$Naw-+XsWh>=&;V(h1(RX; z2k1QsAbl93^(`8igOWAaaNChRo1d$RAW=baz>F*#vf<^>r-4BOD!#jv5^OG~2K88j_ zXl{6r%Lig>E29pbjvy&3;fc)fP%Rf0!d7PBqgTlahYFm!M zt>E5b)M29(74M*N%HH^^rj`KIwz$!;3Bc<^fYBpQhFUO82!i7vy?>KAmW38j@5qh_>@dZ z=^c2(MWPl7g;l_vTt-+;O7FrI*YT+=5%(Rpj>st~VNYs1I%YAZEkXxdtZCCISCdp{ z7X(3Egw=MZ(oytov)xjv^{u*6%e^9H;2aKX9sH5NK5eDm#GlQoqBm6aZnu@2L$*w{ zDxK<`dUHFMl$Igg?pCXcQbUP(=`vibs`pwA1r_KI>YY2fqG_tu&MlB!l{7VQ;UdX( z>i2Mw+U?}dmDQgsjnmr~X&w77>LC4%Z==7Si_0S2@o+4z5zh-h&O@d}Kck+m4$D#C zqmGbJku8-@p%fuq)OZF)s!EVF+#q866PU2#25lBl-ue>C9E8Ku+t7#Ma9jra=cofc zVV`Zs8OdPd_RWEd6vms;%t-~~5nnfw+=lE^(?$UMx+qam_q{ROLl4CIF0W`KMIS;YFfj#z9Hpp|9FMJ70M?&`o zT-KCLRqg0iwYgQ_o=*OnvQ_CeI+*+biR&-%6&!4B@6$WgH%kxg}=`M z@GKLUdJUUJf`&c=SuLemBiJMe4E1KE+Ns}H1f=kNL_jb(4#9csV9wXn2hE0BAxWL9 zR|rlQAXjO%8V|=uIjqD1X`6FL(V0S4yF3D`9yvl&zUlCFu~ZEb6n8iu~`d&rDq z9(VNd-tC#e0k=0roy!nkXNHEwuL-FmM)8ej7&Xt0T87LRKNS9$fb0bDu@ib~2K&0> z(t8SSL(G_>J31eZ$bfo;6kX-|*uCyKo*5sT#(egKp~*DHcRga`0(abHSRHp95;HDd zJqv&&Q*Yw5+QbTqsHbzy$Z|SR*h=7rZyT_oKvJs4CT^= z?-Gz2@#`J9WSMsOOlQcrqLmmcgeMk?SVvU;zJPpOD5i8#miz);h41DdJE8spfaUZJ zi<+K&o{Q-_uSlN&?Dc)!=~4CPK**Hdnw}>?e_7z1dN;mWE`fO=Jl2Yx|DUp!C3m zXsHhrP5hqQTmm4+hJn$uSfLB)(P z4u?HF9Pi`#eBmE+aGn!xT+77k8In^Hy%ljl6PEToCvIj?;96Cx#V@x2<$}?pC7k?*uIIgGWzxn5^?d%rNf6Z0Y?| zY>K3c_fQ0%S6A`z&%DM*-wC30KjH4bg&rEHUQ66u3pJSM%CHdKQ)`oj2pQ#( z+Enz-hdTX_35e^k9YTWAs5H|c_B@+^O~C7T2cBvDW||+GI`2of#3QD7?&VLtd(Pn( z9ejqwk2>+?*zMgu{PX*{JeDW?3WN-eA90GRA9dXKZ~il$+KE2!;70>7xr3j0ex7?x z2$suSvRsa5%jNqwdyD*`_JeDq$NFE1uO?$3S@2ehAAyefz`|FG&mhm?Il%t_45mn# literal 0 HcmV?d00001 diff --git a/owl-bot-staging/OsConfig/v1/proto/src/GPBMetadata/Google/Cloud/Osconfig/V1/Vulnerability.php b/owl-bot-staging/OsConfig/v1/proto/src/GPBMetadata/Google/Cloud/Osconfig/V1/Vulnerability.php new file mode 100644 index 0000000000000000000000000000000000000000..963f576352ef69f9320a894bd89461bed5adce0a GIT binary patch literal 3891 zcmbtX&2kz?5DuUp(^wWBSvJOUd5v8WuGkPsNhO8iBnS{%TLJfgkn{wRGUJnC^qk+s--)oLUTf2 z*ZUgHDw^(ev%00|gPz*Y4%f0nM`Pd}Ra5QP84e6EkPoP3$O;w8wXHpB%U#))+hvZ? zE-;LC)x&7F);0kYO|~qdHI4;uK)^r4>1e7VShj5Azx%2ssRPwkWljAK{dp|(WX+<8 za9XzK3=~_{2Le;54iuVxAh?)J_P(K`|BnUVsu~LkhNCSGY-$c7^8 z<@(ef1(L0#A9%+yIJGCFT^n<`Q${`(Y}29Rrwf8fZO0sJa=RJ8(der^A!d0)ZEveo z>u%8(@=(>yT<+MbV~}a8b?W8uKWmM`(Nr;&wtQerK9Ps<(dVicw0yTaiqSSQDn0Uw z`M3&yC*a{ls6-O3bcPcz;}b74Tua{caAZTxnx20y|B`pSEzU;FY1a0ga0OC-UV^0n z+3M8LO`BYW8AjbiNC>5)TamZ<2zd^R;}ln^l?V%wbZmVyGtIQj1nA(J3;hwq90MzZ zO3c1Q1P_g^Cw*Ao_{=B+Tr2s*94rJ5AWfL>VvVVq#SM?G7krFUQ45;kdL3NL6kRBi zh81;ynb$Ph#hM$^0an6mNww*Lq;}mXM7P3;5R;ULc)Z-v=p@Mq#>8+O^L|KT5K)F6JIFFDC_~GVhU*fxGLs@L zLg_GBgL!v(!%L_z-GoA`(HL%!I9#&mkeb*)6D%ZAvIMcN*L|>oC79b$A_JHdyEVmD z=KHrd9X!C1vof8j`>4q@L`Odedh3{)TMOh0%(*RuyBSR$!3+xzxd*q-V2P)ULT3=f zMP%{psfWll#h{X7syuvAat$s!hGipb4kX-n1C;wA^e+EBd@$+^<>^FNQW+#eR>>>K~{C_5a#n%ronI&iy8?Fnbq=_?1D zCdmid$;R7!_@Dfv3t64|DFkv<{qYE*Y+`r(tJ>%&~W7)j%d zG^=%KztX6c3gWg{D#qU2^Qk6|iR@ON1xy^<+7Zh;@o?(r z5ReJPy9ak_b+IMxmdd4uR4;wCFV;)N6GyHQxcvjnB7xbzE2o~ZJ2erz6@6zg=(#I0(l7* z{pG?=zEVa?gs?3yxQqT$I8}!^kLuTfh$a~SkA!&1;8f^e%tmMP`17}LqRdCY3?BhA zRja_q$V_YPFMq4;jfXfNx|?kr5Z{Gwxr(_Q*UaVo-CVA<)|ul^<&D+RtntvDx5mb^ PsiPT}bO)#-I0E<=E0xZ) literal 0 HcmV?d00001 diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/AptSettings.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/AptSettings.php new file mode 100644 index 000000000000..d764127ec017 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/AptSettings.php @@ -0,0 +1,152 @@ +google.cloud.osconfig.v1.AptSettings + */ +class AptSettings extends \Google\Protobuf\Internal\Message +{ + /** + * By changing the type to DIST, the patching is performed + * using `apt-get dist-upgrade` instead. + * + * Generated from protobuf field .google.cloud.osconfig.v1.AptSettings.Type type = 1; + */ + protected $type = 0; + /** + * List of packages to exclude from update. These packages will be excluded + * + * Generated from protobuf field repeated string excludes = 2; + */ + private $excludes; + /** + * An exclusive list of packages to be updated. These are the only packages + * that will be updated. If these packages are not installed, they will be + * ignored. This field cannot be specified with any other patch configuration + * fields. + * + * Generated from protobuf field repeated string exclusive_packages = 3; + */ + private $exclusive_packages; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $type + * By changing the type to DIST, the patching is performed + * using `apt-get dist-upgrade` instead. + * @type array|\Google\Protobuf\Internal\RepeatedField $excludes + * List of packages to exclude from update. These packages will be excluded + * @type array|\Google\Protobuf\Internal\RepeatedField $exclusive_packages + * An exclusive list of packages to be updated. These are the only packages + * that will be updated. If these packages are not installed, they will be + * ignored. This field cannot be specified with any other patch configuration + * fields. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\PatchJobs::initOnce(); + parent::__construct($data); + } + + /** + * By changing the type to DIST, the patching is performed + * using `apt-get dist-upgrade` instead. + * + * Generated from protobuf field .google.cloud.osconfig.v1.AptSettings.Type type = 1; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * By changing the type to DIST, the patching is performed + * using `apt-get dist-upgrade` instead. + * + * Generated from protobuf field .google.cloud.osconfig.v1.AptSettings.Type type = 1; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\OsConfig\V1\AptSettings\Type::class); + $this->type = $var; + + return $this; + } + + /** + * List of packages to exclude from update. These packages will be excluded + * + * Generated from protobuf field repeated string excludes = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getExcludes() + { + return $this->excludes; + } + + /** + * List of packages to exclude from update. These packages will be excluded + * + * Generated from protobuf field repeated string excludes = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setExcludes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->excludes = $arr; + + return $this; + } + + /** + * An exclusive list of packages to be updated. These are the only packages + * that will be updated. If these packages are not installed, they will be + * ignored. This field cannot be specified with any other patch configuration + * fields. + * + * Generated from protobuf field repeated string exclusive_packages = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getExclusivePackages() + { + return $this->exclusive_packages; + } + + /** + * An exclusive list of packages to be updated. These are the only packages + * that will be updated. If these packages are not installed, they will be + * ignored. This field cannot be specified with any other patch configuration + * fields. + * + * Generated from protobuf field repeated string exclusive_packages = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setExclusivePackages($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->exclusive_packages = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/AptSettings/Type.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/AptSettings/Type.php new file mode 100644 index 000000000000..35532d7ee4df --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/AptSettings/Type.php @@ -0,0 +1,64 @@ +google.cloud.osconfig.v1.AptSettings.Type + */ +class Type +{ + /** + * By default, upgrade will be performed. + * + * Generated from protobuf enum TYPE_UNSPECIFIED = 0; + */ + const TYPE_UNSPECIFIED = 0; + /** + * Runs `apt-get dist-upgrade`. + * + * Generated from protobuf enum DIST = 1; + */ + const DIST = 1; + /** + * Runs `apt-get upgrade`. + * + * Generated from protobuf enum UPGRADE = 2; + */ + const UPGRADE = 2; + + private static $valueToName = [ + self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', + self::DIST => 'DIST', + self::UPGRADE => 'UPGRADE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Type::class, \Google\Cloud\OsConfig\V1\AptSettings_Type::class); + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/CVSSv3.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/CVSSv3.php new file mode 100644 index 000000000000..ac3e56bdc493 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/CVSSv3.php @@ -0,0 +1,460 @@ +google.cloud.osconfig.v1.CVSSv3 + */ +class CVSSv3 extends \Google\Protobuf\Internal\Message +{ + /** + * The base score is a function of the base metric scores. + * https://www.first.org/cvss/specification-document#Base-Metrics + * + * Generated from protobuf field float base_score = 1; + */ + protected $base_score = 0.0; + /** + * The Exploitability sub-score equation is derived from the Base + * Exploitability metrics. + * https://www.first.org/cvss/specification-document#2-1-Exploitability-Metrics + * + * Generated from protobuf field float exploitability_score = 2; + */ + protected $exploitability_score = 0.0; + /** + * The Impact sub-score equation is derived from the Base Impact metrics. + * + * Generated from protobuf field float impact_score = 3; + */ + protected $impact_score = 0.0; + /** + * This metric reflects the context by which vulnerability exploitation is + * possible. + * + * Generated from protobuf field .google.cloud.osconfig.v1.CVSSv3.AttackVector attack_vector = 5; + */ + protected $attack_vector = 0; + /** + * This metric describes the conditions beyond the attacker's control that + * must exist in order to exploit the vulnerability. + * + * Generated from protobuf field .google.cloud.osconfig.v1.CVSSv3.AttackComplexity attack_complexity = 6; + */ + protected $attack_complexity = 0; + /** + * This metric describes the level of privileges an attacker must possess + * before successfully exploiting the vulnerability. + * + * Generated from protobuf field .google.cloud.osconfig.v1.CVSSv3.PrivilegesRequired privileges_required = 7; + */ + protected $privileges_required = 0; + /** + * This metric captures the requirement for a human user, other than the + * attacker, to participate in the successful compromise of the vulnerable + * component. + * + * Generated from protobuf field .google.cloud.osconfig.v1.CVSSv3.UserInteraction user_interaction = 8; + */ + protected $user_interaction = 0; + /** + * The Scope metric captures whether a vulnerability in one vulnerable + * component impacts resources in components beyond its security scope. + * + * Generated from protobuf field .google.cloud.osconfig.v1.CVSSv3.Scope scope = 9; + */ + protected $scope = 0; + /** + * This metric measures the impact to the confidentiality of the information + * resources managed by a software component due to a successfully exploited + * vulnerability. + * + * Generated from protobuf field .google.cloud.osconfig.v1.CVSSv3.Impact confidentiality_impact = 10; + */ + protected $confidentiality_impact = 0; + /** + * This metric measures the impact to integrity of a successfully exploited + * vulnerability. + * + * Generated from protobuf field .google.cloud.osconfig.v1.CVSSv3.Impact integrity_impact = 11; + */ + protected $integrity_impact = 0; + /** + * This metric measures the impact to the availability of the impacted + * component resulting from a successfully exploited vulnerability. + * + * Generated from protobuf field .google.cloud.osconfig.v1.CVSSv3.Impact availability_impact = 12; + */ + protected $availability_impact = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $base_score + * The base score is a function of the base metric scores. + * https://www.first.org/cvss/specification-document#Base-Metrics + * @type float $exploitability_score + * The Exploitability sub-score equation is derived from the Base + * Exploitability metrics. + * https://www.first.org/cvss/specification-document#2-1-Exploitability-Metrics + * @type float $impact_score + * The Impact sub-score equation is derived from the Base Impact metrics. + * @type int $attack_vector + * This metric reflects the context by which vulnerability exploitation is + * possible. + * @type int $attack_complexity + * This metric describes the conditions beyond the attacker's control that + * must exist in order to exploit the vulnerability. + * @type int $privileges_required + * This metric describes the level of privileges an attacker must possess + * before successfully exploiting the vulnerability. + * @type int $user_interaction + * This metric captures the requirement for a human user, other than the + * attacker, to participate in the successful compromise of the vulnerable + * component. + * @type int $scope + * The Scope metric captures whether a vulnerability in one vulnerable + * component impacts resources in components beyond its security scope. + * @type int $confidentiality_impact + * This metric measures the impact to the confidentiality of the information + * resources managed by a software component due to a successfully exploited + * vulnerability. + * @type int $integrity_impact + * This metric measures the impact to integrity of a successfully exploited + * vulnerability. + * @type int $availability_impact + * This metric measures the impact to the availability of the impacted + * component resulting from a successfully exploited vulnerability. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\Vulnerability::initOnce(); + parent::__construct($data); + } + + /** + * The base score is a function of the base metric scores. + * https://www.first.org/cvss/specification-document#Base-Metrics + * + * Generated from protobuf field float base_score = 1; + * @return float + */ + public function getBaseScore() + { + return $this->base_score; + } + + /** + * The base score is a function of the base metric scores. + * https://www.first.org/cvss/specification-document#Base-Metrics + * + * Generated from protobuf field float base_score = 1; + * @param float $var + * @return $this + */ + public function setBaseScore($var) + { + GPBUtil::checkFloat($var); + $this->base_score = $var; + + return $this; + } + + /** + * The Exploitability sub-score equation is derived from the Base + * Exploitability metrics. + * https://www.first.org/cvss/specification-document#2-1-Exploitability-Metrics + * + * Generated from protobuf field float exploitability_score = 2; + * @return float + */ + public function getExploitabilityScore() + { + return $this->exploitability_score; + } + + /** + * The Exploitability sub-score equation is derived from the Base + * Exploitability metrics. + * https://www.first.org/cvss/specification-document#2-1-Exploitability-Metrics + * + * Generated from protobuf field float exploitability_score = 2; + * @param float $var + * @return $this + */ + public function setExploitabilityScore($var) + { + GPBUtil::checkFloat($var); + $this->exploitability_score = $var; + + return $this; + } + + /** + * The Impact sub-score equation is derived from the Base Impact metrics. + * + * Generated from protobuf field float impact_score = 3; + * @return float + */ + public function getImpactScore() + { + return $this->impact_score; + } + + /** + * The Impact sub-score equation is derived from the Base Impact metrics. + * + * Generated from protobuf field float impact_score = 3; + * @param float $var + * @return $this + */ + public function setImpactScore($var) + { + GPBUtil::checkFloat($var); + $this->impact_score = $var; + + return $this; + } + + /** + * This metric reflects the context by which vulnerability exploitation is + * possible. + * + * Generated from protobuf field .google.cloud.osconfig.v1.CVSSv3.AttackVector attack_vector = 5; + * @return int + */ + public function getAttackVector() + { + return $this->attack_vector; + } + + /** + * This metric reflects the context by which vulnerability exploitation is + * possible. + * + * Generated from protobuf field .google.cloud.osconfig.v1.CVSSv3.AttackVector attack_vector = 5; + * @param int $var + * @return $this + */ + public function setAttackVector($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\OsConfig\V1\CVSSv3\AttackVector::class); + $this->attack_vector = $var; + + return $this; + } + + /** + * This metric describes the conditions beyond the attacker's control that + * must exist in order to exploit the vulnerability. + * + * Generated from protobuf field .google.cloud.osconfig.v1.CVSSv3.AttackComplexity attack_complexity = 6; + * @return int + */ + public function getAttackComplexity() + { + return $this->attack_complexity; + } + + /** + * This metric describes the conditions beyond the attacker's control that + * must exist in order to exploit the vulnerability. + * + * Generated from protobuf field .google.cloud.osconfig.v1.CVSSv3.AttackComplexity attack_complexity = 6; + * @param int $var + * @return $this + */ + public function setAttackComplexity($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\OsConfig\V1\CVSSv3\AttackComplexity::class); + $this->attack_complexity = $var; + + return $this; + } + + /** + * This metric describes the level of privileges an attacker must possess + * before successfully exploiting the vulnerability. + * + * Generated from protobuf field .google.cloud.osconfig.v1.CVSSv3.PrivilegesRequired privileges_required = 7; + * @return int + */ + public function getPrivilegesRequired() + { + return $this->privileges_required; + } + + /** + * This metric describes the level of privileges an attacker must possess + * before successfully exploiting the vulnerability. + * + * Generated from protobuf field .google.cloud.osconfig.v1.CVSSv3.PrivilegesRequired privileges_required = 7; + * @param int $var + * @return $this + */ + public function setPrivilegesRequired($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\OsConfig\V1\CVSSv3\PrivilegesRequired::class); + $this->privileges_required = $var; + + return $this; + } + + /** + * This metric captures the requirement for a human user, other than the + * attacker, to participate in the successful compromise of the vulnerable + * component. + * + * Generated from protobuf field .google.cloud.osconfig.v1.CVSSv3.UserInteraction user_interaction = 8; + * @return int + */ + public function getUserInteraction() + { + return $this->user_interaction; + } + + /** + * This metric captures the requirement for a human user, other than the + * attacker, to participate in the successful compromise of the vulnerable + * component. + * + * Generated from protobuf field .google.cloud.osconfig.v1.CVSSv3.UserInteraction user_interaction = 8; + * @param int $var + * @return $this + */ + public function setUserInteraction($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\OsConfig\V1\CVSSv3\UserInteraction::class); + $this->user_interaction = $var; + + return $this; + } + + /** + * The Scope metric captures whether a vulnerability in one vulnerable + * component impacts resources in components beyond its security scope. + * + * Generated from protobuf field .google.cloud.osconfig.v1.CVSSv3.Scope scope = 9; + * @return int + */ + public function getScope() + { + return $this->scope; + } + + /** + * The Scope metric captures whether a vulnerability in one vulnerable + * component impacts resources in components beyond its security scope. + * + * Generated from protobuf field .google.cloud.osconfig.v1.CVSSv3.Scope scope = 9; + * @param int $var + * @return $this + */ + public function setScope($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\OsConfig\V1\CVSSv3\Scope::class); + $this->scope = $var; + + return $this; + } + + /** + * This metric measures the impact to the confidentiality of the information + * resources managed by a software component due to a successfully exploited + * vulnerability. + * + * Generated from protobuf field .google.cloud.osconfig.v1.CVSSv3.Impact confidentiality_impact = 10; + * @return int + */ + public function getConfidentialityImpact() + { + return $this->confidentiality_impact; + } + + /** + * This metric measures the impact to the confidentiality of the information + * resources managed by a software component due to a successfully exploited + * vulnerability. + * + * Generated from protobuf field .google.cloud.osconfig.v1.CVSSv3.Impact confidentiality_impact = 10; + * @param int $var + * @return $this + */ + public function setConfidentialityImpact($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\OsConfig\V1\CVSSv3\Impact::class); + $this->confidentiality_impact = $var; + + return $this; + } + + /** + * This metric measures the impact to integrity of a successfully exploited + * vulnerability. + * + * Generated from protobuf field .google.cloud.osconfig.v1.CVSSv3.Impact integrity_impact = 11; + * @return int + */ + public function getIntegrityImpact() + { + return $this->integrity_impact; + } + + /** + * This metric measures the impact to integrity of a successfully exploited + * vulnerability. + * + * Generated from protobuf field .google.cloud.osconfig.v1.CVSSv3.Impact integrity_impact = 11; + * @param int $var + * @return $this + */ + public function setIntegrityImpact($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\OsConfig\V1\CVSSv3\Impact::class); + $this->integrity_impact = $var; + + return $this; + } + + /** + * This metric measures the impact to the availability of the impacted + * component resulting from a successfully exploited vulnerability. + * + * Generated from protobuf field .google.cloud.osconfig.v1.CVSSv3.Impact availability_impact = 12; + * @return int + */ + public function getAvailabilityImpact() + { + return $this->availability_impact; + } + + /** + * This metric measures the impact to the availability of the impacted + * component resulting from a successfully exploited vulnerability. + * + * Generated from protobuf field .google.cloud.osconfig.v1.CVSSv3.Impact availability_impact = 12; + * @param int $var + * @return $this + */ + public function setAvailabilityImpact($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\OsConfig\V1\CVSSv3\Impact::class); + $this->availability_impact = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/CVSSv3/AttackComplexity.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/CVSSv3/AttackComplexity.php new file mode 100644 index 000000000000..0eb983c0c6f1 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/CVSSv3/AttackComplexity.php @@ -0,0 +1,71 @@ +google.cloud.osconfig.v1.CVSSv3.AttackComplexity + */ +class AttackComplexity +{ + /** + * Invalid value. + * + * Generated from protobuf enum ATTACK_COMPLEXITY_UNSPECIFIED = 0; + */ + const ATTACK_COMPLEXITY_UNSPECIFIED = 0; + /** + * Specialized access conditions or extenuating circumstances do not exist. + * An attacker can expect repeatable success when attacking the vulnerable + * component. + * + * Generated from protobuf enum ATTACK_COMPLEXITY_LOW = 1; + */ + const ATTACK_COMPLEXITY_LOW = 1; + /** + * A successful attack depends on conditions beyond the attacker's control. + * That is, a successful attack cannot be accomplished at will, but requires + * the attacker to invest in some measurable amount of effort in preparation + * or execution against the vulnerable component before a successful attack + * can be expected. + * + * Generated from protobuf enum ATTACK_COMPLEXITY_HIGH = 2; + */ + const ATTACK_COMPLEXITY_HIGH = 2; + + private static $valueToName = [ + self::ATTACK_COMPLEXITY_UNSPECIFIED => 'ATTACK_COMPLEXITY_UNSPECIFIED', + self::ATTACK_COMPLEXITY_LOW => 'ATTACK_COMPLEXITY_LOW', + self::ATTACK_COMPLEXITY_HIGH => 'ATTACK_COMPLEXITY_HIGH', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(AttackComplexity::class, \Google\Cloud\OsConfig\V1\CVSSv3_AttackComplexity::class); + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/CVSSv3/AttackVector.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/CVSSv3/AttackVector.php new file mode 100644 index 000000000000..7f9c2e812631 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/CVSSv3/AttackVector.php @@ -0,0 +1,84 @@ +google.cloud.osconfig.v1.CVSSv3.AttackVector + */ +class AttackVector +{ + /** + * Invalid value. + * + * Generated from protobuf enum ATTACK_VECTOR_UNSPECIFIED = 0; + */ + const ATTACK_VECTOR_UNSPECIFIED = 0; + /** + * The vulnerable component is bound to the network stack and the set of + * possible attackers extends beyond the other options listed below, up to + * and including the entire Internet. + * + * Generated from protobuf enum ATTACK_VECTOR_NETWORK = 1; + */ + const ATTACK_VECTOR_NETWORK = 1; + /** + * The vulnerable component is bound to the network stack, but the attack is + * limited at the protocol level to a logically adjacent topology. + * + * Generated from protobuf enum ATTACK_VECTOR_ADJACENT = 2; + */ + const ATTACK_VECTOR_ADJACENT = 2; + /** + * The vulnerable component is not bound to the network stack and the + * attacker's path is via read/write/execute capabilities. + * + * Generated from protobuf enum ATTACK_VECTOR_LOCAL = 3; + */ + const ATTACK_VECTOR_LOCAL = 3; + /** + * The attack requires the attacker to physically touch or manipulate the + * vulnerable component. + * + * Generated from protobuf enum ATTACK_VECTOR_PHYSICAL = 4; + */ + const ATTACK_VECTOR_PHYSICAL = 4; + + private static $valueToName = [ + self::ATTACK_VECTOR_UNSPECIFIED => 'ATTACK_VECTOR_UNSPECIFIED', + self::ATTACK_VECTOR_NETWORK => 'ATTACK_VECTOR_NETWORK', + self::ATTACK_VECTOR_ADJACENT => 'ATTACK_VECTOR_ADJACENT', + self::ATTACK_VECTOR_LOCAL => 'ATTACK_VECTOR_LOCAL', + self::ATTACK_VECTOR_PHYSICAL => 'ATTACK_VECTOR_PHYSICAL', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(AttackVector::class, \Google\Cloud\OsConfig\V1\CVSSv3_AttackVector::class); + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/CVSSv3/Impact.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/CVSSv3/Impact.php new file mode 100644 index 000000000000..4657a7871ef7 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/CVSSv3/Impact.php @@ -0,0 +1,73 @@ +google.cloud.osconfig.v1.CVSSv3.Impact + */ +class Impact +{ + /** + * Invalid value. + * + * Generated from protobuf enum IMPACT_UNSPECIFIED = 0; + */ + const IMPACT_UNSPECIFIED = 0; + /** + * High impact. + * + * Generated from protobuf enum IMPACT_HIGH = 1; + */ + const IMPACT_HIGH = 1; + /** + * Low impact. + * + * Generated from protobuf enum IMPACT_LOW = 2; + */ + const IMPACT_LOW = 2; + /** + * No impact. + * + * Generated from protobuf enum IMPACT_NONE = 3; + */ + const IMPACT_NONE = 3; + + private static $valueToName = [ + self::IMPACT_UNSPECIFIED => 'IMPACT_UNSPECIFIED', + self::IMPACT_HIGH => 'IMPACT_HIGH', + self::IMPACT_LOW => 'IMPACT_LOW', + self::IMPACT_NONE => 'IMPACT_NONE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Impact::class, \Google\Cloud\OsConfig\V1\CVSSv3_Impact::class); + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/CVSSv3/PrivilegesRequired.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/CVSSv3/PrivilegesRequired.php new file mode 100644 index 000000000000..f50e27e6d4ca --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/CVSSv3/PrivilegesRequired.php @@ -0,0 +1,79 @@ +google.cloud.osconfig.v1.CVSSv3.PrivilegesRequired + */ +class PrivilegesRequired +{ + /** + * Invalid value. + * + * Generated from protobuf enum PRIVILEGES_REQUIRED_UNSPECIFIED = 0; + */ + const PRIVILEGES_REQUIRED_UNSPECIFIED = 0; + /** + * The attacker is unauthorized prior to attack, and therefore does not + * require any access to settings or files of the vulnerable system to + * carry out an attack. + * + * Generated from protobuf enum PRIVILEGES_REQUIRED_NONE = 1; + */ + const PRIVILEGES_REQUIRED_NONE = 1; + /** + * The attacker requires privileges that provide basic user capabilities + * that could normally affect only settings and files owned by a user. + * Alternatively, an attacker with Low privileges has the ability to access + * only non-sensitive resources. + * + * Generated from protobuf enum PRIVILEGES_REQUIRED_LOW = 2; + */ + const PRIVILEGES_REQUIRED_LOW = 2; + /** + * The attacker requires privileges that provide significant (e.g., + * administrative) control over the vulnerable component allowing access to + * component-wide settings and files. + * + * Generated from protobuf enum PRIVILEGES_REQUIRED_HIGH = 3; + */ + const PRIVILEGES_REQUIRED_HIGH = 3; + + private static $valueToName = [ + self::PRIVILEGES_REQUIRED_UNSPECIFIED => 'PRIVILEGES_REQUIRED_UNSPECIFIED', + self::PRIVILEGES_REQUIRED_NONE => 'PRIVILEGES_REQUIRED_NONE', + self::PRIVILEGES_REQUIRED_LOW => 'PRIVILEGES_REQUIRED_LOW', + self::PRIVILEGES_REQUIRED_HIGH => 'PRIVILEGES_REQUIRED_HIGH', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(PrivilegesRequired::class, \Google\Cloud\OsConfig\V1\CVSSv3_PrivilegesRequired::class); + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/CVSSv3/Scope.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/CVSSv3/Scope.php new file mode 100644 index 000000000000..55824469cbac --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/CVSSv3/Scope.php @@ -0,0 +1,67 @@ +google.cloud.osconfig.v1.CVSSv3.Scope + */ +class Scope +{ + /** + * Invalid value. + * + * Generated from protobuf enum SCOPE_UNSPECIFIED = 0; + */ + const SCOPE_UNSPECIFIED = 0; + /** + * An exploited vulnerability can only affect resources managed by the same + * security authority. + * + * Generated from protobuf enum SCOPE_UNCHANGED = 1; + */ + const SCOPE_UNCHANGED = 1; + /** + * An exploited vulnerability can affect resources beyond the security scope + * managed by the security authority of the vulnerable component. + * + * Generated from protobuf enum SCOPE_CHANGED = 2; + */ + const SCOPE_CHANGED = 2; + + private static $valueToName = [ + self::SCOPE_UNSPECIFIED => 'SCOPE_UNSPECIFIED', + self::SCOPE_UNCHANGED => 'SCOPE_UNCHANGED', + self::SCOPE_CHANGED => 'SCOPE_CHANGED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Scope::class, \Google\Cloud\OsConfig\V1\CVSSv3_Scope::class); + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/CVSSv3/UserInteraction.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/CVSSv3/UserInteraction.php new file mode 100644 index 000000000000..c2b9f2a5fa2a --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/CVSSv3/UserInteraction.php @@ -0,0 +1,67 @@ +google.cloud.osconfig.v1.CVSSv3.UserInteraction + */ +class UserInteraction +{ + /** + * Invalid value. + * + * Generated from protobuf enum USER_INTERACTION_UNSPECIFIED = 0; + */ + const USER_INTERACTION_UNSPECIFIED = 0; + /** + * The vulnerable system can be exploited without interaction from any user. + * + * Generated from protobuf enum USER_INTERACTION_NONE = 1; + */ + const USER_INTERACTION_NONE = 1; + /** + * Successful exploitation of this vulnerability requires a user to take + * some action before the vulnerability can be exploited. + * + * Generated from protobuf enum USER_INTERACTION_REQUIRED = 2; + */ + const USER_INTERACTION_REQUIRED = 2; + + private static $valueToName = [ + self::USER_INTERACTION_UNSPECIFIED => 'USER_INTERACTION_UNSPECIFIED', + self::USER_INTERACTION_NONE => 'USER_INTERACTION_NONE', + self::USER_INTERACTION_REQUIRED => 'USER_INTERACTION_REQUIRED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(UserInteraction::class, \Google\Cloud\OsConfig\V1\CVSSv3_UserInteraction::class); + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/CancelPatchJobRequest.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/CancelPatchJobRequest.php new file mode 100644 index 000000000000..9e59bb209634 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/CancelPatchJobRequest.php @@ -0,0 +1,67 @@ +google.cloud.osconfig.v1.CancelPatchJobRequest + */ +class CancelPatchJobRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the patch in the form `projects/*/patchJobs/*` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the patch in the form `projects/*/patchJobs/*` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\PatchJobs::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the patch in the form `projects/*/patchJobs/*` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the patch in the form `projects/*/patchJobs/*` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/CreateOSPolicyAssignmentRequest.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/CreateOSPolicyAssignmentRequest.php new file mode 100644 index 000000000000..69af19a5623f --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/CreateOSPolicyAssignmentRequest.php @@ -0,0 +1,199 @@ +google.cloud.osconfig.v1.CreateOSPolicyAssignmentRequest + */ +class CreateOSPolicyAssignmentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource name in the form: + * projects/{project}/locations/{location} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The OS policy assignment to be created. + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicyAssignment os_policy_assignment = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $os_policy_assignment = null; + /** + * Required. The logical name of the OS policy assignment in the project + * with the following restrictions: + * * Must contain only lowercase letters, numbers, and hyphens. + * * Must start with a letter. + * * Must be between 1-63 characters. + * * Must end with a number or a letter. + * * Must be unique within the project. + * + * Generated from protobuf field string os_policy_assignment_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $os_policy_assignment_id = ''; + + /** + * @param string $parent Required. The parent resource name in the form: + * projects/{project}/locations/{location} + * Please see {@see OsConfigZonalServiceClient::locationName()} for help formatting this field. + * @param \Google\Cloud\OsConfig\V1\OSPolicyAssignment $osPolicyAssignment Required. The OS policy assignment to be created. + * @param string $osPolicyAssignmentId Required. The logical name of the OS policy assignment in the project + * with the following restrictions: + * + * * Must contain only lowercase letters, numbers, and hyphens. + * * Must start with a letter. + * * Must be between 1-63 characters. + * * Must end with a number or a letter. + * * Must be unique within the project. + * + * @return \Google\Cloud\OsConfig\V1\CreateOSPolicyAssignmentRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\OsConfig\V1\OSPolicyAssignment $osPolicyAssignment, string $osPolicyAssignmentId): self + { + return (new self()) + ->setParent($parent) + ->setOsPolicyAssignment($osPolicyAssignment) + ->setOsPolicyAssignmentId($osPolicyAssignmentId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource name in the form: + * projects/{project}/locations/{location} + * @type \Google\Cloud\OsConfig\V1\OSPolicyAssignment $os_policy_assignment + * Required. The OS policy assignment to be created. + * @type string $os_policy_assignment_id + * Required. The logical name of the OS policy assignment in the project + * with the following restrictions: + * * Must contain only lowercase letters, numbers, and hyphens. + * * Must start with a letter. + * * Must be between 1-63 characters. + * * Must end with a number or a letter. + * * Must be unique within the project. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\OsPolicyAssignments::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource name in the form: + * projects/{project}/locations/{location} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource name in the form: + * projects/{project}/locations/{location} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The OS policy assignment to be created. + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicyAssignment os_policy_assignment = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\OsConfig\V1\OSPolicyAssignment|null + */ + public function getOsPolicyAssignment() + { + return $this->os_policy_assignment; + } + + public function hasOsPolicyAssignment() + { + return isset($this->os_policy_assignment); + } + + public function clearOsPolicyAssignment() + { + unset($this->os_policy_assignment); + } + + /** + * Required. The OS policy assignment to be created. + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicyAssignment os_policy_assignment = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\OsConfig\V1\OSPolicyAssignment $var + * @return $this + */ + public function setOsPolicyAssignment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\OSPolicyAssignment::class); + $this->os_policy_assignment = $var; + + return $this; + } + + /** + * Required. The logical name of the OS policy assignment in the project + * with the following restrictions: + * * Must contain only lowercase letters, numbers, and hyphens. + * * Must start with a letter. + * * Must be between 1-63 characters. + * * Must end with a number or a letter. + * * Must be unique within the project. + * + * Generated from protobuf field string os_policy_assignment_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getOsPolicyAssignmentId() + { + return $this->os_policy_assignment_id; + } + + /** + * Required. The logical name of the OS policy assignment in the project + * with the following restrictions: + * * Must contain only lowercase letters, numbers, and hyphens. + * * Must start with a letter. + * * Must be between 1-63 characters. + * * Must end with a number or a letter. + * * Must be unique within the project. + * + * Generated from protobuf field string os_policy_assignment_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setOsPolicyAssignmentId($var) + { + GPBUtil::checkString($var, True); + $this->os_policy_assignment_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/CreatePatchDeploymentRequest.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/CreatePatchDeploymentRequest.php new file mode 100644 index 000000000000..433d6c41edff --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/CreatePatchDeploymentRequest.php @@ -0,0 +1,198 @@ +google.cloud.osconfig.v1.CreatePatchDeploymentRequest + */ +class CreatePatchDeploymentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project to apply this patch deployment to in the form + * `projects/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. A name for the patch deployment in the project. When creating a + * name the following rules apply: + * * Must contain only lowercase letters, numbers, and hyphens. + * * Must start with a letter. + * * Must be between 1-63 characters. + * * Must end with a number or a letter. + * * Must be unique within the project. + * + * Generated from protobuf field string patch_deployment_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $patch_deployment_id = ''; + /** + * Required. The patch deployment to create. + * + * Generated from protobuf field .google.cloud.osconfig.v1.PatchDeployment patch_deployment = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $patch_deployment = null; + + /** + * @param string $parent Required. The project to apply this patch deployment to in the form + * `projects/*`. Please see + * {@see OsConfigServiceClient::projectName()} for help formatting this field. + * @param \Google\Cloud\OsConfig\V1\PatchDeployment $patchDeployment Required. The patch deployment to create. + * @param string $patchDeploymentId Required. A name for the patch deployment in the project. When creating a + * name the following rules apply: + * * Must contain only lowercase letters, numbers, and hyphens. + * * Must start with a letter. + * * Must be between 1-63 characters. + * * Must end with a number or a letter. + * * Must be unique within the project. + * + * @return \Google\Cloud\OsConfig\V1\CreatePatchDeploymentRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\OsConfig\V1\PatchDeployment $patchDeployment, string $patchDeploymentId): self + { + return (new self()) + ->setParent($parent) + ->setPatchDeployment($patchDeployment) + ->setPatchDeploymentId($patchDeploymentId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The project to apply this patch deployment to in the form + * `projects/*`. + * @type string $patch_deployment_id + * Required. A name for the patch deployment in the project. When creating a + * name the following rules apply: + * * Must contain only lowercase letters, numbers, and hyphens. + * * Must start with a letter. + * * Must be between 1-63 characters. + * * Must end with a number or a letter. + * * Must be unique within the project. + * @type \Google\Cloud\OsConfig\V1\PatchDeployment $patch_deployment + * Required. The patch deployment to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\PatchDeployments::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project to apply this patch deployment to in the form + * `projects/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The project to apply this patch deployment to in the form + * `projects/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. A name for the patch deployment in the project. When creating a + * name the following rules apply: + * * Must contain only lowercase letters, numbers, and hyphens. + * * Must start with a letter. + * * Must be between 1-63 characters. + * * Must end with a number or a letter. + * * Must be unique within the project. + * + * Generated from protobuf field string patch_deployment_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPatchDeploymentId() + { + return $this->patch_deployment_id; + } + + /** + * Required. A name for the patch deployment in the project. When creating a + * name the following rules apply: + * * Must contain only lowercase letters, numbers, and hyphens. + * * Must start with a letter. + * * Must be between 1-63 characters. + * * Must end with a number or a letter. + * * Must be unique within the project. + * + * Generated from protobuf field string patch_deployment_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPatchDeploymentId($var) + { + GPBUtil::checkString($var, True); + $this->patch_deployment_id = $var; + + return $this; + } + + /** + * Required. The patch deployment to create. + * + * Generated from protobuf field .google.cloud.osconfig.v1.PatchDeployment patch_deployment = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\OsConfig\V1\PatchDeployment|null + */ + public function getPatchDeployment() + { + return $this->patch_deployment; + } + + public function hasPatchDeployment() + { + return isset($this->patch_deployment); + } + + public function clearPatchDeployment() + { + unset($this->patch_deployment); + } + + /** + * Required. The patch deployment to create. + * + * Generated from protobuf field .google.cloud.osconfig.v1.PatchDeployment patch_deployment = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\OsConfig\V1\PatchDeployment $var + * @return $this + */ + public function setPatchDeployment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\PatchDeployment::class); + $this->patch_deployment = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/DeleteOSPolicyAssignmentRequest.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/DeleteOSPolicyAssignmentRequest.php new file mode 100644 index 000000000000..aebd165577c3 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/DeleteOSPolicyAssignmentRequest.php @@ -0,0 +1,81 @@ +google.cloud.osconfig.v1.DeleteOSPolicyAssignmentRequest + */ +class DeleteOSPolicyAssignmentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the OS policy assignment to be deleted + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the OS policy assignment to be deleted + * Please see {@see OsConfigZonalServiceClient::oSPolicyAssignmentName()} for help formatting this field. + * + * @return \Google\Cloud\OsConfig\V1\DeleteOSPolicyAssignmentRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the OS policy assignment to be deleted + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\OsPolicyAssignments::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the OS policy assignment to be deleted + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the OS policy assignment to be deleted + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/DeletePatchDeploymentRequest.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/DeletePatchDeploymentRequest.php new file mode 100644 index 000000000000..4232078984a5 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/DeletePatchDeploymentRequest.php @@ -0,0 +1,86 @@ +google.cloud.osconfig.v1.DeletePatchDeploymentRequest + */ +class DeletePatchDeploymentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the patch deployment in the form + * `projects/*/patchDeployments/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The resource name of the patch deployment in the form + * `projects/*/patchDeployments/*`. Please see + * {@see OsConfigServiceClient::patchDeploymentName()} for help formatting this field. + * + * @return \Google\Cloud\OsConfig\V1\DeletePatchDeploymentRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the patch deployment in the form + * `projects/*/patchDeployments/*`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\PatchDeployments::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the patch deployment in the form + * `projects/*/patchDeployments/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the patch deployment in the form + * `projects/*/patchDeployments/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ExecStep.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ExecStep.php new file mode 100644 index 000000000000..51a9368b6a5f --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ExecStep.php @@ -0,0 +1,121 @@ +google.cloud.osconfig.v1.ExecStep + */ +class ExecStep extends \Google\Protobuf\Internal\Message +{ + /** + * The ExecStepConfig for all Linux VMs targeted by the PatchJob. + * + * Generated from protobuf field .google.cloud.osconfig.v1.ExecStepConfig linux_exec_step_config = 1; + */ + protected $linux_exec_step_config = null; + /** + * The ExecStepConfig for all Windows VMs targeted by the PatchJob. + * + * Generated from protobuf field .google.cloud.osconfig.v1.ExecStepConfig windows_exec_step_config = 2; + */ + protected $windows_exec_step_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\OsConfig\V1\ExecStepConfig $linux_exec_step_config + * The ExecStepConfig for all Linux VMs targeted by the PatchJob. + * @type \Google\Cloud\OsConfig\V1\ExecStepConfig $windows_exec_step_config + * The ExecStepConfig for all Windows VMs targeted by the PatchJob. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\PatchJobs::initOnce(); + parent::__construct($data); + } + + /** + * The ExecStepConfig for all Linux VMs targeted by the PatchJob. + * + * Generated from protobuf field .google.cloud.osconfig.v1.ExecStepConfig linux_exec_step_config = 1; + * @return \Google\Cloud\OsConfig\V1\ExecStepConfig|null + */ + public function getLinuxExecStepConfig() + { + return $this->linux_exec_step_config; + } + + public function hasLinuxExecStepConfig() + { + return isset($this->linux_exec_step_config); + } + + public function clearLinuxExecStepConfig() + { + unset($this->linux_exec_step_config); + } + + /** + * The ExecStepConfig for all Linux VMs targeted by the PatchJob. + * + * Generated from protobuf field .google.cloud.osconfig.v1.ExecStepConfig linux_exec_step_config = 1; + * @param \Google\Cloud\OsConfig\V1\ExecStepConfig $var + * @return $this + */ + public function setLinuxExecStepConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\ExecStepConfig::class); + $this->linux_exec_step_config = $var; + + return $this; + } + + /** + * The ExecStepConfig for all Windows VMs targeted by the PatchJob. + * + * Generated from protobuf field .google.cloud.osconfig.v1.ExecStepConfig windows_exec_step_config = 2; + * @return \Google\Cloud\OsConfig\V1\ExecStepConfig|null + */ + public function getWindowsExecStepConfig() + { + return $this->windows_exec_step_config; + } + + public function hasWindowsExecStepConfig() + { + return isset($this->windows_exec_step_config); + } + + public function clearWindowsExecStepConfig() + { + unset($this->windows_exec_step_config); + } + + /** + * The ExecStepConfig for all Windows VMs targeted by the PatchJob. + * + * Generated from protobuf field .google.cloud.osconfig.v1.ExecStepConfig windows_exec_step_config = 2; + * @param \Google\Cloud\OsConfig\V1\ExecStepConfig $var + * @return $this + */ + public function setWindowsExecStepConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\ExecStepConfig::class); + $this->windows_exec_step_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ExecStepConfig.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ExecStepConfig.php new file mode 100644 index 000000000000..9c1079efc867 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ExecStepConfig.php @@ -0,0 +1,192 @@ +google.cloud.osconfig.v1.ExecStepConfig + */ +class ExecStepConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Defaults to [0]. A list of possible return values that the + * execution can return to indicate a success. + * + * Generated from protobuf field repeated int32 allowed_success_codes = 3; + */ + private $allowed_success_codes; + /** + * The script interpreter to use to run the script. If no interpreter is + * specified the script will be executed directly, which will likely + * only succeed for scripts with [shebang lines] + * (https://en.wikipedia.org/wiki/Shebang_\(Unix\)). + * + * Generated from protobuf field .google.cloud.osconfig.v1.ExecStepConfig.Interpreter interpreter = 4; + */ + protected $interpreter = 0; + protected $executable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $local_path + * An absolute path to the executable on the VM. + * @type \Google\Cloud\OsConfig\V1\GcsObject $gcs_object + * A Cloud Storage object containing the executable. + * @type array|\Google\Protobuf\Internal\RepeatedField $allowed_success_codes + * Defaults to [0]. A list of possible return values that the + * execution can return to indicate a success. + * @type int $interpreter + * The script interpreter to use to run the script. If no interpreter is + * specified the script will be executed directly, which will likely + * only succeed for scripts with [shebang lines] + * (https://en.wikipedia.org/wiki/Shebang_\(Unix\)). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\PatchJobs::initOnce(); + parent::__construct($data); + } + + /** + * An absolute path to the executable on the VM. + * + * Generated from protobuf field string local_path = 1; + * @return string + */ + public function getLocalPath() + { + return $this->readOneof(1); + } + + public function hasLocalPath() + { + return $this->hasOneof(1); + } + + /** + * An absolute path to the executable on the VM. + * + * Generated from protobuf field string local_path = 1; + * @param string $var + * @return $this + */ + public function setLocalPath($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * A Cloud Storage object containing the executable. + * + * Generated from protobuf field .google.cloud.osconfig.v1.GcsObject gcs_object = 2; + * @return \Google\Cloud\OsConfig\V1\GcsObject|null + */ + public function getGcsObject() + { + return $this->readOneof(2); + } + + public function hasGcsObject() + { + return $this->hasOneof(2); + } + + /** + * A Cloud Storage object containing the executable. + * + * Generated from protobuf field .google.cloud.osconfig.v1.GcsObject gcs_object = 2; + * @param \Google\Cloud\OsConfig\V1\GcsObject $var + * @return $this + */ + public function setGcsObject($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\GcsObject::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Defaults to [0]. A list of possible return values that the + * execution can return to indicate a success. + * + * Generated from protobuf field repeated int32 allowed_success_codes = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAllowedSuccessCodes() + { + return $this->allowed_success_codes; + } + + /** + * Defaults to [0]. A list of possible return values that the + * execution can return to indicate a success. + * + * Generated from protobuf field repeated int32 allowed_success_codes = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAllowedSuccessCodes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); + $this->allowed_success_codes = $arr; + + return $this; + } + + /** + * The script interpreter to use to run the script. If no interpreter is + * specified the script will be executed directly, which will likely + * only succeed for scripts with [shebang lines] + * (https://en.wikipedia.org/wiki/Shebang_\(Unix\)). + * + * Generated from protobuf field .google.cloud.osconfig.v1.ExecStepConfig.Interpreter interpreter = 4; + * @return int + */ + public function getInterpreter() + { + return $this->interpreter; + } + + /** + * The script interpreter to use to run the script. If no interpreter is + * specified the script will be executed directly, which will likely + * only succeed for scripts with [shebang lines] + * (https://en.wikipedia.org/wiki/Shebang_\(Unix\)). + * + * Generated from protobuf field .google.cloud.osconfig.v1.ExecStepConfig.Interpreter interpreter = 4; + * @param int $var + * @return $this + */ + public function setInterpreter($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\OsConfig\V1\ExecStepConfig\Interpreter::class); + $this->interpreter = $var; + + return $this; + } + + /** + * @return string + */ + public function getExecutable() + { + return $this->whichOneof("executable"); + } + +} + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ExecStepConfig/Interpreter.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ExecStepConfig/Interpreter.php new file mode 100644 index 000000000000..80a6e85c88f0 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ExecStepConfig/Interpreter.php @@ -0,0 +1,68 @@ +google.cloud.osconfig.v1.ExecStepConfig.Interpreter + */ +class Interpreter +{ + /** + * Invalid for a Windows ExecStepConfig. For a Linux ExecStepConfig, the + * interpreter will be parsed from the shebang line of the script if + * unspecified. + * + * Generated from protobuf enum INTERPRETER_UNSPECIFIED = 0; + */ + const INTERPRETER_UNSPECIFIED = 0; + /** + * Indicates that the script is run with `/bin/sh` on Linux and `cmd` + * on Windows. + * + * Generated from protobuf enum SHELL = 1; + */ + const SHELL = 1; + /** + * Indicates that the file is run with PowerShell flags + * `-NonInteractive`, `-NoProfile`, and `-ExecutionPolicy Bypass`. + * + * Generated from protobuf enum POWERSHELL = 2; + */ + const POWERSHELL = 2; + + private static $valueToName = [ + self::INTERPRETER_UNSPECIFIED => 'INTERPRETER_UNSPECIFIED', + self::SHELL => 'SHELL', + self::POWERSHELL => 'POWERSHELL', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Interpreter::class, \Google\Cloud\OsConfig\V1\ExecStepConfig_Interpreter::class); + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ExecutePatchJobRequest.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ExecutePatchJobRequest.php new file mode 100644 index 000000000000..481824d2f193 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ExecutePatchJobRequest.php @@ -0,0 +1,366 @@ +google.cloud.osconfig.v1.ExecutePatchJobRequest + */ +class ExecutePatchJobRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project in which to run this patch in the form `projects/*` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Description of the patch job. Length of the description is limited + * to 1024 characters. + * + * Generated from protobuf field string description = 2; + */ + protected $description = ''; + /** + * Required. Instances to patch, either explicitly or filtered by some + * criteria such as zone or labels. + * + * Generated from protobuf field .google.cloud.osconfig.v1.PatchInstanceFilter instance_filter = 7 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $instance_filter = null; + /** + * Patch configuration being applied. If omitted, instances are + * patched using the default configurations. + * + * Generated from protobuf field .google.cloud.osconfig.v1.PatchConfig patch_config = 4; + */ + protected $patch_config = null; + /** + * Duration of the patch job. After the duration ends, the patch job + * times out. + * + * Generated from protobuf field .google.protobuf.Duration duration = 5; + */ + protected $duration = null; + /** + * If this patch is a dry-run only, instances are contacted but + * will do nothing. + * + * Generated from protobuf field bool dry_run = 6; + */ + protected $dry_run = false; + /** + * Display name for this patch job. This does not have to be unique. + * + * Generated from protobuf field string display_name = 8; + */ + protected $display_name = ''; + /** + * Rollout strategy of the patch job. + * + * Generated from protobuf field .google.cloud.osconfig.v1.PatchRollout rollout = 9; + */ + protected $rollout = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The project in which to run this patch in the form `projects/*` + * @type string $description + * Description of the patch job. Length of the description is limited + * to 1024 characters. + * @type \Google\Cloud\OsConfig\V1\PatchInstanceFilter $instance_filter + * Required. Instances to patch, either explicitly or filtered by some + * criteria such as zone or labels. + * @type \Google\Cloud\OsConfig\V1\PatchConfig $patch_config + * Patch configuration being applied. If omitted, instances are + * patched using the default configurations. + * @type \Google\Protobuf\Duration $duration + * Duration of the patch job. After the duration ends, the patch job + * times out. + * @type bool $dry_run + * If this patch is a dry-run only, instances are contacted but + * will do nothing. + * @type string $display_name + * Display name for this patch job. This does not have to be unique. + * @type \Google\Cloud\OsConfig\V1\PatchRollout $rollout + * Rollout strategy of the patch job. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\PatchJobs::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project in which to run this patch in the form `projects/*` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The project in which to run this patch in the form `projects/*` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Description of the patch job. Length of the description is limited + * to 1024 characters. + * + * Generated from protobuf field string description = 2; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Description of the patch job. Length of the description is limited + * to 1024 characters. + * + * Generated from protobuf field string description = 2; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Required. Instances to patch, either explicitly or filtered by some + * criteria such as zone or labels. + * + * Generated from protobuf field .google.cloud.osconfig.v1.PatchInstanceFilter instance_filter = 7 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\OsConfig\V1\PatchInstanceFilter|null + */ + public function getInstanceFilter() + { + return $this->instance_filter; + } + + public function hasInstanceFilter() + { + return isset($this->instance_filter); + } + + public function clearInstanceFilter() + { + unset($this->instance_filter); + } + + /** + * Required. Instances to patch, either explicitly or filtered by some + * criteria such as zone or labels. + * + * Generated from protobuf field .google.cloud.osconfig.v1.PatchInstanceFilter instance_filter = 7 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\OsConfig\V1\PatchInstanceFilter $var + * @return $this + */ + public function setInstanceFilter($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\PatchInstanceFilter::class); + $this->instance_filter = $var; + + return $this; + } + + /** + * Patch configuration being applied. If omitted, instances are + * patched using the default configurations. + * + * Generated from protobuf field .google.cloud.osconfig.v1.PatchConfig patch_config = 4; + * @return \Google\Cloud\OsConfig\V1\PatchConfig|null + */ + public function getPatchConfig() + { + return $this->patch_config; + } + + public function hasPatchConfig() + { + return isset($this->patch_config); + } + + public function clearPatchConfig() + { + unset($this->patch_config); + } + + /** + * Patch configuration being applied. If omitted, instances are + * patched using the default configurations. + * + * Generated from protobuf field .google.cloud.osconfig.v1.PatchConfig patch_config = 4; + * @param \Google\Cloud\OsConfig\V1\PatchConfig $var + * @return $this + */ + public function setPatchConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\PatchConfig::class); + $this->patch_config = $var; + + return $this; + } + + /** + * Duration of the patch job. After the duration ends, the patch job + * times out. + * + * Generated from protobuf field .google.protobuf.Duration duration = 5; + * @return \Google\Protobuf\Duration|null + */ + public function getDuration() + { + return $this->duration; + } + + public function hasDuration() + { + return isset($this->duration); + } + + public function clearDuration() + { + unset($this->duration); + } + + /** + * Duration of the patch job. After the duration ends, the patch job + * times out. + * + * Generated from protobuf field .google.protobuf.Duration duration = 5; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->duration = $var; + + return $this; + } + + /** + * If this patch is a dry-run only, instances are contacted but + * will do nothing. + * + * Generated from protobuf field bool dry_run = 6; + * @return bool + */ + public function getDryRun() + { + return $this->dry_run; + } + + /** + * If this patch is a dry-run only, instances are contacted but + * will do nothing. + * + * Generated from protobuf field bool dry_run = 6; + * @param bool $var + * @return $this + */ + public function setDryRun($var) + { + GPBUtil::checkBool($var); + $this->dry_run = $var; + + return $this; + } + + /** + * Display name for this patch job. This does not have to be unique. + * + * Generated from protobuf field string display_name = 8; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Display name for this patch job. This does not have to be unique. + * + * Generated from protobuf field string display_name = 8; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Rollout strategy of the patch job. + * + * Generated from protobuf field .google.cloud.osconfig.v1.PatchRollout rollout = 9; + * @return \Google\Cloud\OsConfig\V1\PatchRollout|null + */ + public function getRollout() + { + return $this->rollout; + } + + public function hasRollout() + { + return isset($this->rollout); + } + + public function clearRollout() + { + unset($this->rollout); + } + + /** + * Rollout strategy of the patch job. + * + * Generated from protobuf field .google.cloud.osconfig.v1.PatchRollout rollout = 9; + * @param \Google\Cloud\OsConfig\V1\PatchRollout $var + * @return $this + */ + public function setRollout($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\PatchRollout::class); + $this->rollout = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/FixedOrPercent.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/FixedOrPercent.php new file mode 100644 index 000000000000..2f1c0b9df9be --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/FixedOrPercent.php @@ -0,0 +1,112 @@ +google.cloud.osconfig.v1.FixedOrPercent + */ +class FixedOrPercent extends \Google\Protobuf\Internal\Message +{ + protected $mode; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $fixed + * Specifies a fixed value. + * @type int $percent + * Specifies the relative value defined as a percentage, which will be + * multiplied by a reference value. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\OsconfigCommon::initOnce(); + parent::__construct($data); + } + + /** + * Specifies a fixed value. + * + * Generated from protobuf field int32 fixed = 1; + * @return int + */ + public function getFixed() + { + return $this->readOneof(1); + } + + public function hasFixed() + { + return $this->hasOneof(1); + } + + /** + * Specifies a fixed value. + * + * Generated from protobuf field int32 fixed = 1; + * @param int $var + * @return $this + */ + public function setFixed($var) + { + GPBUtil::checkInt32($var); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Specifies the relative value defined as a percentage, which will be + * multiplied by a reference value. + * + * Generated from protobuf field int32 percent = 2; + * @return int + */ + public function getPercent() + { + return $this->readOneof(2); + } + + public function hasPercent() + { + return $this->hasOneof(2); + } + + /** + * Specifies the relative value defined as a percentage, which will be + * multiplied by a reference value. + * + * Generated from protobuf field int32 percent = 2; + * @param int $var + * @return $this + */ + public function setPercent($var) + { + GPBUtil::checkInt32($var); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getMode() + { + return $this->whichOneof("mode"); + } + +} + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/GcsObject.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/GcsObject.php new file mode 100644 index 000000000000..e6ecdb9d9728 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/GcsObject.php @@ -0,0 +1,139 @@ +google.cloud.osconfig.v1.GcsObject + */ +class GcsObject extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Bucket of the Cloud Storage object. + * + * Generated from protobuf field string bucket = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $bucket = ''; + /** + * Required. Name of the Cloud Storage object. + * + * Generated from protobuf field string object = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $object = ''; + /** + * Required. Generation number of the Cloud Storage object. This is used to + * ensure that the ExecStep specified by this PatchJob does not change. + * + * Generated from protobuf field int64 generation_number = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $generation_number = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $bucket + * Required. Bucket of the Cloud Storage object. + * @type string $object + * Required. Name of the Cloud Storage object. + * @type int|string $generation_number + * Required. Generation number of the Cloud Storage object. This is used to + * ensure that the ExecStep specified by this PatchJob does not change. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\PatchJobs::initOnce(); + parent::__construct($data); + } + + /** + * Required. Bucket of the Cloud Storage object. + * + * Generated from protobuf field string bucket = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getBucket() + { + return $this->bucket; + } + + /** + * Required. Bucket of the Cloud Storage object. + * + * Generated from protobuf field string bucket = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setBucket($var) + { + GPBUtil::checkString($var, True); + $this->bucket = $var; + + return $this; + } + + /** + * Required. Name of the Cloud Storage object. + * + * Generated from protobuf field string object = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getObject() + { + return $this->object; + } + + /** + * Required. Name of the Cloud Storage object. + * + * Generated from protobuf field string object = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setObject($var) + { + GPBUtil::checkString($var, True); + $this->object = $var; + + return $this; + } + + /** + * Required. Generation number of the Cloud Storage object. This is used to + * ensure that the ExecStep specified by this PatchJob does not change. + * + * Generated from protobuf field int64 generation_number = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return int|string + */ + public function getGenerationNumber() + { + return $this->generation_number; + } + + /** + * Required. Generation number of the Cloud Storage object. This is used to + * ensure that the ExecStep specified by this PatchJob does not change. + * + * Generated from protobuf field int64 generation_number = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param int|string $var + * @return $this + */ + public function setGenerationNumber($var) + { + GPBUtil::checkInt64($var); + $this->generation_number = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/GetInventoryRequest.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/GetInventoryRequest.php new file mode 100644 index 000000000000..a79edf7dabb8 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/GetInventoryRequest.php @@ -0,0 +1,146 @@ +google.cloud.osconfig.v1.GetInventoryRequest + */ +class GetInventoryRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. API resource name for inventory resource. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/inventory` + * For `{project}`, either `project-number` or `project-id` can be provided. + * For `{instance}`, either Compute Engine `instance-id` or `instance-name` + * can be provided. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Inventory view indicating what information should be included in the + * inventory resource. If unspecified, the default view is BASIC. + * + * Generated from protobuf field .google.cloud.osconfig.v1.InventoryView view = 2; + */ + protected $view = 0; + + /** + * @param string $name Required. API resource name for inventory resource. + * + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/inventory` + * + * For `{project}`, either `project-number` or `project-id` can be provided. + * For `{instance}`, either Compute Engine `instance-id` or `instance-name` + * can be provided. Please see + * {@see OsConfigZonalServiceClient::inventoryName()} for help formatting this field. + * + * @return \Google\Cloud\OsConfig\V1\GetInventoryRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. API resource name for inventory resource. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/inventory` + * For `{project}`, either `project-number` or `project-id` can be provided. + * For `{instance}`, either Compute Engine `instance-id` or `instance-name` + * can be provided. + * @type int $view + * Inventory view indicating what information should be included in the + * inventory resource. If unspecified, the default view is BASIC. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\Inventory::initOnce(); + parent::__construct($data); + } + + /** + * Required. API resource name for inventory resource. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/inventory` + * For `{project}`, either `project-number` or `project-id` can be provided. + * For `{instance}`, either Compute Engine `instance-id` or `instance-name` + * can be provided. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. API resource name for inventory resource. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/inventory` + * For `{project}`, either `project-number` or `project-id` can be provided. + * For `{instance}`, either Compute Engine `instance-id` or `instance-name` + * can be provided. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Inventory view indicating what information should be included in the + * inventory resource. If unspecified, the default view is BASIC. + * + * Generated from protobuf field .google.cloud.osconfig.v1.InventoryView view = 2; + * @return int + */ + public function getView() + { + return $this->view; + } + + /** + * Inventory view indicating what information should be included in the + * inventory resource. If unspecified, the default view is BASIC. + * + * Generated from protobuf field .google.cloud.osconfig.v1.InventoryView view = 2; + * @param int $var + * @return $this + */ + public function setView($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\OsConfig\V1\InventoryView::class); + $this->view = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/GetOSPolicyAssignmentReportRequest.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/GetOSPolicyAssignmentReportRequest.php new file mode 100644 index 000000000000..6cabb4d835d6 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/GetOSPolicyAssignmentReportRequest.php @@ -0,0 +1,113 @@ +google.cloud.osconfig.v1.GetOSPolicyAssignmentReportRequest + */ +class GetOSPolicyAssignmentReportRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. API resource name for OS policy assignment report. + * Format: + * `/projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}/report` + * For `{project}`, either `project-number` or `project-id` can be provided. + * For `{instance_id}`, either Compute Engine `instance-id` or `instance-name` + * can be provided. + * For `{assignment_id}`, the OSPolicyAssignment id must be provided. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. API resource name for OS policy assignment report. + * + * Format: + * `/projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}/report` + * + * For `{project}`, either `project-number` or `project-id` can be provided. + * For `{instance_id}`, either Compute Engine `instance-id` or `instance-name` + * can be provided. + * For `{assignment_id}`, the OSPolicyAssignment id must be provided. Please see + * {@see OsConfigZonalServiceClient::oSPolicyAssignmentReportName()} for help formatting this field. + * + * @return \Google\Cloud\OsConfig\V1\GetOSPolicyAssignmentReportRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. API resource name for OS policy assignment report. + * Format: + * `/projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}/report` + * For `{project}`, either `project-number` or `project-id` can be provided. + * For `{instance_id}`, either Compute Engine `instance-id` or `instance-name` + * can be provided. + * For `{assignment_id}`, the OSPolicyAssignment id must be provided. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\OsPolicyAssignmentReports::initOnce(); + parent::__construct($data); + } + + /** + * Required. API resource name for OS policy assignment report. + * Format: + * `/projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}/report` + * For `{project}`, either `project-number` or `project-id` can be provided. + * For `{instance_id}`, either Compute Engine `instance-id` or `instance-name` + * can be provided. + * For `{assignment_id}`, the OSPolicyAssignment id must be provided. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. API resource name for OS policy assignment report. + * Format: + * `/projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}/report` + * For `{project}`, either `project-number` or `project-id` can be provided. + * For `{instance_id}`, either Compute Engine `instance-id` or `instance-name` + * can be provided. + * For `{assignment_id}`, the OSPolicyAssignment id must be provided. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/GetOSPolicyAssignmentRequest.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/GetOSPolicyAssignmentRequest.php new file mode 100644 index 000000000000..1c54186081b4 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/GetOSPolicyAssignmentRequest.php @@ -0,0 +1,92 @@ +google.cloud.osconfig.v1.GetOSPolicyAssignmentRequest + */ +class GetOSPolicyAssignmentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of OS policy assignment. + * Format: + * `projects/{project}/locations/{location}/osPolicyAssignments/{os_policy_assignment}@{revisionId}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The resource name of OS policy assignment. + * + * Format: + * `projects/{project}/locations/{location}/osPolicyAssignments/{os_policy_assignment}@{revisionId}` + * Please see {@see OsConfigZonalServiceClient::oSPolicyAssignmentName()} for help formatting this field. + * + * @return \Google\Cloud\OsConfig\V1\GetOSPolicyAssignmentRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of OS policy assignment. + * Format: + * `projects/{project}/locations/{location}/osPolicyAssignments/{os_policy_assignment}@{revisionId}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\OsPolicyAssignments::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of OS policy assignment. + * Format: + * `projects/{project}/locations/{location}/osPolicyAssignments/{os_policy_assignment}@{revisionId}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of OS policy assignment. + * Format: + * `projects/{project}/locations/{location}/osPolicyAssignments/{os_policy_assignment}@{revisionId}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/GetPatchDeploymentRequest.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/GetPatchDeploymentRequest.php new file mode 100644 index 000000000000..c31502242f26 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/GetPatchDeploymentRequest.php @@ -0,0 +1,86 @@ +google.cloud.osconfig.v1.GetPatchDeploymentRequest + */ +class GetPatchDeploymentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the patch deployment in the form + * `projects/*/patchDeployments/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The resource name of the patch deployment in the form + * `projects/*/patchDeployments/*`. Please see + * {@see OsConfigServiceClient::patchDeploymentName()} for help formatting this field. + * + * @return \Google\Cloud\OsConfig\V1\GetPatchDeploymentRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the patch deployment in the form + * `projects/*/patchDeployments/*`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\PatchDeployments::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the patch deployment in the form + * `projects/*/patchDeployments/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the patch deployment in the form + * `projects/*/patchDeployments/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/GetPatchJobRequest.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/GetPatchJobRequest.php new file mode 100644 index 000000000000..2f45f2829ae3 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/GetPatchJobRequest.php @@ -0,0 +1,81 @@ +google.cloud.osconfig.v1.GetPatchJobRequest + */ +class GetPatchJobRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the patch in the form `projects/*/patchJobs/*` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Name of the patch in the form `projects/*/patchJobs/*` + * Please see {@see OsConfigServiceClient::patchJobName()} for help formatting this field. + * + * @return \Google\Cloud\OsConfig\V1\GetPatchJobRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the patch in the form `projects/*/patchJobs/*` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\PatchJobs::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the patch in the form `projects/*/patchJobs/*` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the patch in the form `projects/*/patchJobs/*` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/GetVulnerabilityReportRequest.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/GetVulnerabilityReportRequest.php new file mode 100644 index 000000000000..7ee6c21429f9 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/GetVulnerabilityReportRequest.php @@ -0,0 +1,108 @@ +google.cloud.osconfig.v1.GetVulnerabilityReportRequest + */ +class GetVulnerabilityReportRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. API resource name for vulnerability resource. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/vulnerabilityReport` + * For `{project}`, either `project-number` or `project-id` can be provided. + * For `{instance}`, either Compute Engine `instance-id` or `instance-name` + * can be provided. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. API resource name for vulnerability resource. + * + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/vulnerabilityReport` + * + * For `{project}`, either `project-number` or `project-id` can be provided. + * For `{instance}`, either Compute Engine `instance-id` or `instance-name` + * can be provided. Please see + * {@see OsConfigZonalServiceClient::vulnerabilityReportName()} for help formatting this field. + * + * @return \Google\Cloud\OsConfig\V1\GetVulnerabilityReportRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. API resource name for vulnerability resource. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/vulnerabilityReport` + * For `{project}`, either `project-number` or `project-id` can be provided. + * For `{instance}`, either Compute Engine `instance-id` or `instance-name` + * can be provided. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\Vulnerability::initOnce(); + parent::__construct($data); + } + + /** + * Required. API resource name for vulnerability resource. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/vulnerabilityReport` + * For `{project}`, either `project-number` or `project-id` can be provided. + * For `{instance}`, either Compute Engine `instance-id` or `instance-name` + * can be provided. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. API resource name for vulnerability resource. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/vulnerabilityReport` + * For `{project}`, either `project-number` or `project-id` can be provided. + * For `{instance}`, either Compute Engine `instance-id` or `instance-name` + * can be provided. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/GooSettings.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/GooSettings.php new file mode 100644 index 000000000000..be0a25aff2b6 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/GooSettings.php @@ -0,0 +1,33 @@ +google.cloud.osconfig.v1.GooSettings + */ +class GooSettings extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\PatchJobs::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Instance.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Instance.php new file mode 100644 index 000000000000..2844a3c225ca --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Instance.php @@ -0,0 +1,33 @@ +google.cloud.osconfig.v1.Instance + */ +class Instance extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\PatchJobs::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Instance/PatchState.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Instance/PatchState.php new file mode 100644 index 000000000000..aeb4f3dd80b8 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Instance/PatchState.php @@ -0,0 +1,157 @@ +google.cloud.osconfig.v1.Instance.PatchState + */ +class PatchState +{ + /** + * Unspecified. + * + * Generated from protobuf enum PATCH_STATE_UNSPECIFIED = 0; + */ + const PATCH_STATE_UNSPECIFIED = 0; + /** + * The instance is not yet notified. + * + * Generated from protobuf enum PENDING = 1; + */ + const PENDING = 1; + /** + * Instance is inactive and cannot be patched. + * + * Generated from protobuf enum INACTIVE = 2; + */ + const INACTIVE = 2; + /** + * The instance is notified that it should be patched. + * + * Generated from protobuf enum NOTIFIED = 3; + */ + const NOTIFIED = 3; + /** + * The instance has started the patching process. + * + * Generated from protobuf enum STARTED = 4; + */ + const STARTED = 4; + /** + * The instance is downloading patches. + * + * Generated from protobuf enum DOWNLOADING_PATCHES = 5; + */ + const DOWNLOADING_PATCHES = 5; + /** + * The instance is applying patches. + * + * Generated from protobuf enum APPLYING_PATCHES = 6; + */ + const APPLYING_PATCHES = 6; + /** + * The instance is rebooting. + * + * Generated from protobuf enum REBOOTING = 7; + */ + const REBOOTING = 7; + /** + * The instance has completed applying patches. + * + * Generated from protobuf enum SUCCEEDED = 8; + */ + const SUCCEEDED = 8; + /** + * The instance has completed applying patches but a reboot is required. + * + * Generated from protobuf enum SUCCEEDED_REBOOT_REQUIRED = 9; + */ + const SUCCEEDED_REBOOT_REQUIRED = 9; + /** + * The instance has failed to apply the patch. + * + * Generated from protobuf enum FAILED = 10; + */ + const FAILED = 10; + /** + * The instance acked the notification and will start shortly. + * + * Generated from protobuf enum ACKED = 11; + */ + const ACKED = 11; + /** + * The instance exceeded the time out while applying the patch. + * + * Generated from protobuf enum TIMED_OUT = 12; + */ + const TIMED_OUT = 12; + /** + * The instance is running the pre-patch step. + * + * Generated from protobuf enum RUNNING_PRE_PATCH_STEP = 13; + */ + const RUNNING_PRE_PATCH_STEP = 13; + /** + * The instance is running the post-patch step. + * + * Generated from protobuf enum RUNNING_POST_PATCH_STEP = 14; + */ + const RUNNING_POST_PATCH_STEP = 14; + /** + * The service could not detect the presence of the agent. Check to ensure + * that the agent is installed, running, and able to communicate with the + * service. + * + * Generated from protobuf enum NO_AGENT_DETECTED = 15; + */ + const NO_AGENT_DETECTED = 15; + + private static $valueToName = [ + self::PATCH_STATE_UNSPECIFIED => 'PATCH_STATE_UNSPECIFIED', + self::PENDING => 'PENDING', + self::INACTIVE => 'INACTIVE', + self::NOTIFIED => 'NOTIFIED', + self::STARTED => 'STARTED', + self::DOWNLOADING_PATCHES => 'DOWNLOADING_PATCHES', + self::APPLYING_PATCHES => 'APPLYING_PATCHES', + self::REBOOTING => 'REBOOTING', + self::SUCCEEDED => 'SUCCEEDED', + self::SUCCEEDED_REBOOT_REQUIRED => 'SUCCEEDED_REBOOT_REQUIRED', + self::FAILED => 'FAILED', + self::ACKED => 'ACKED', + self::TIMED_OUT => 'TIMED_OUT', + self::RUNNING_PRE_PATCH_STEP => 'RUNNING_PRE_PATCH_STEP', + self::RUNNING_POST_PATCH_STEP => 'RUNNING_POST_PATCH_STEP', + self::NO_AGENT_DETECTED => 'NO_AGENT_DETECTED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(PatchState::class, \Google\Cloud\OsConfig\V1\Instance_PatchState::class); + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Inventory.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Inventory.php new file mode 100644 index 000000000000..a8c9f5fb7e3d --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Inventory.php @@ -0,0 +1,213 @@ +google.cloud.osconfig.v1.Inventory + */ +class Inventory extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The `Inventory` API resource name. + * Format: + * `projects/{project_number}/locations/{location}/instances/{instance_id}/inventory` + * + * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Base level operating system information for the VM. + * + * Generated from protobuf field .google.cloud.osconfig.v1.Inventory.OsInfo os_info = 1; + */ + protected $os_info = null; + /** + * Inventory items related to the VM keyed by an opaque unique identifier for + * each inventory item. The identifier is unique to each distinct and + * addressable inventory item and will change, when there is a new package + * version. + * + * Generated from protobuf field map items = 2; + */ + private $items; + /** + * Output only. Timestamp of the last reported inventory for the VM. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The `Inventory` API resource name. + * Format: + * `projects/{project_number}/locations/{location}/instances/{instance_id}/inventory` + * @type \Google\Cloud\OsConfig\V1\Inventory\OsInfo $os_info + * Base level operating system information for the VM. + * @type array|\Google\Protobuf\Internal\MapField $items + * Inventory items related to the VM keyed by an opaque unique identifier for + * each inventory item. The identifier is unique to each distinct and + * addressable inventory item and will change, when there is a new package + * version. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. Timestamp of the last reported inventory for the VM. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\Inventory::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The `Inventory` API resource name. + * Format: + * `projects/{project_number}/locations/{location}/instances/{instance_id}/inventory` + * + * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The `Inventory` API resource name. + * Format: + * `projects/{project_number}/locations/{location}/instances/{instance_id}/inventory` + * + * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Base level operating system information for the VM. + * + * Generated from protobuf field .google.cloud.osconfig.v1.Inventory.OsInfo os_info = 1; + * @return \Google\Cloud\OsConfig\V1\Inventory\OsInfo|null + */ + public function getOsInfo() + { + return $this->os_info; + } + + public function hasOsInfo() + { + return isset($this->os_info); + } + + public function clearOsInfo() + { + unset($this->os_info); + } + + /** + * Base level operating system information for the VM. + * + * Generated from protobuf field .google.cloud.osconfig.v1.Inventory.OsInfo os_info = 1; + * @param \Google\Cloud\OsConfig\V1\Inventory\OsInfo $var + * @return $this + */ + public function setOsInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\Inventory\OsInfo::class); + $this->os_info = $var; + + return $this; + } + + /** + * Inventory items related to the VM keyed by an opaque unique identifier for + * each inventory item. The identifier is unique to each distinct and + * addressable inventory item and will change, when there is a new package + * version. + * + * Generated from protobuf field map items = 2; + * @return \Google\Protobuf\Internal\MapField + */ + public function getItems() + { + return $this->items; + } + + /** + * Inventory items related to the VM keyed by an opaque unique identifier for + * each inventory item. The identifier is unique to each distinct and + * addressable inventory item and will change, when there is a new package + * version. + * + * Generated from protobuf field map items = 2; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setItems($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\OsConfig\V1\Inventory\Item::class); + $this->items = $arr; + + return $this; + } + + /** + * Output only. Timestamp of the last reported inventory for the VM. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. Timestamp of the last reported inventory for the VM. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Inventory/Item.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Inventory/Item.php new file mode 100644 index 000000000000..e1d306f6f07c --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Inventory/Item.php @@ -0,0 +1,301 @@ +google.cloud.osconfig.v1.Inventory.Item + */ +class Item extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier for this item, unique across items for this VM. + * + * Generated from protobuf field string id = 1; + */ + protected $id = ''; + /** + * The origin of this inventory item. + * + * Generated from protobuf field .google.cloud.osconfig.v1.Inventory.Item.OriginType origin_type = 2; + */ + protected $origin_type = 0; + /** + * When this inventory item was first detected. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 8; + */ + protected $create_time = null; + /** + * When this inventory item was last modified. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 9; + */ + protected $update_time = null; + /** + * The specific type of inventory, correlating to its specific details. + * + * Generated from protobuf field .google.cloud.osconfig.v1.Inventory.Item.Type type = 5; + */ + protected $type = 0; + protected $details; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $id + * Identifier for this item, unique across items for this VM. + * @type int $origin_type + * The origin of this inventory item. + * @type \Google\Protobuf\Timestamp $create_time + * When this inventory item was first detected. + * @type \Google\Protobuf\Timestamp $update_time + * When this inventory item was last modified. + * @type int $type + * The specific type of inventory, correlating to its specific details. + * @type \Google\Cloud\OsConfig\V1\Inventory\SoftwarePackage $installed_package + * Software package present on the VM instance. + * @type \Google\Cloud\OsConfig\V1\Inventory\SoftwarePackage $available_package + * Software package available to be installed on the VM instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\Inventory::initOnce(); + parent::__construct($data); + } + + /** + * Identifier for this item, unique across items for this VM. + * + * Generated from protobuf field string id = 1; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * Identifier for this item, unique across items for this VM. + * + * Generated from protobuf field string id = 1; + * @param string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkString($var, True); + $this->id = $var; + + return $this; + } + + /** + * The origin of this inventory item. + * + * Generated from protobuf field .google.cloud.osconfig.v1.Inventory.Item.OriginType origin_type = 2; + * @return int + */ + public function getOriginType() + { + return $this->origin_type; + } + + /** + * The origin of this inventory item. + * + * Generated from protobuf field .google.cloud.osconfig.v1.Inventory.Item.OriginType origin_type = 2; + * @param int $var + * @return $this + */ + public function setOriginType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\OsConfig\V1\Inventory\Item\OriginType::class); + $this->origin_type = $var; + + return $this; + } + + /** + * When this inventory item was first detected. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 8; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * When this inventory item was first detected. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 8; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * When this inventory item was last modified. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 9; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * When this inventory item was last modified. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 9; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * The specific type of inventory, correlating to its specific details. + * + * Generated from protobuf field .google.cloud.osconfig.v1.Inventory.Item.Type type = 5; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * The specific type of inventory, correlating to its specific details. + * + * Generated from protobuf field .google.cloud.osconfig.v1.Inventory.Item.Type type = 5; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\OsConfig\V1\Inventory\Item\Type::class); + $this->type = $var; + + return $this; + } + + /** + * Software package present on the VM instance. + * + * Generated from protobuf field .google.cloud.osconfig.v1.Inventory.SoftwarePackage installed_package = 6; + * @return \Google\Cloud\OsConfig\V1\Inventory\SoftwarePackage|null + */ + public function getInstalledPackage() + { + return $this->readOneof(6); + } + + public function hasInstalledPackage() + { + return $this->hasOneof(6); + } + + /** + * Software package present on the VM instance. + * + * Generated from protobuf field .google.cloud.osconfig.v1.Inventory.SoftwarePackage installed_package = 6; + * @param \Google\Cloud\OsConfig\V1\Inventory\SoftwarePackage $var + * @return $this + */ + public function setInstalledPackage($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\Inventory\SoftwarePackage::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * Software package available to be installed on the VM instance. + * + * Generated from protobuf field .google.cloud.osconfig.v1.Inventory.SoftwarePackage available_package = 7; + * @return \Google\Cloud\OsConfig\V1\Inventory\SoftwarePackage|null + */ + public function getAvailablePackage() + { + return $this->readOneof(7); + } + + public function hasAvailablePackage() + { + return $this->hasOneof(7); + } + + /** + * Software package available to be installed on the VM instance. + * + * Generated from protobuf field .google.cloud.osconfig.v1.Inventory.SoftwarePackage available_package = 7; + * @param \Google\Cloud\OsConfig\V1\Inventory\SoftwarePackage $var + * @return $this + */ + public function setAvailablePackage($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\Inventory\SoftwarePackage::class); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * @return string + */ + public function getDetails() + { + return $this->whichOneof("details"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Item::class, \Google\Cloud\OsConfig\V1\Inventory_Item::class); + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Inventory/Item/OriginType.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Inventory/Item/OriginType.php new file mode 100644 index 000000000000..8e2be71c247c --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Inventory/Item/OriginType.php @@ -0,0 +1,58 @@ +google.cloud.osconfig.v1.Inventory.Item.OriginType + */ +class OriginType +{ + /** + * Invalid. An origin type must be specified. + * + * Generated from protobuf enum ORIGIN_TYPE_UNSPECIFIED = 0; + */ + const ORIGIN_TYPE_UNSPECIFIED = 0; + /** + * This inventory item was discovered as the result of the agent + * reporting inventory via the reporting API. + * + * Generated from protobuf enum INVENTORY_REPORT = 1; + */ + const INVENTORY_REPORT = 1; + + private static $valueToName = [ + self::ORIGIN_TYPE_UNSPECIFIED => 'ORIGIN_TYPE_UNSPECIFIED', + self::INVENTORY_REPORT => 'INVENTORY_REPORT', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(OriginType::class, \Google\Cloud\OsConfig\V1\Inventory_Item_OriginType::class); + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Inventory/Item/Type.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Inventory/Item/Type.php new file mode 100644 index 000000000000..a4a78404f590 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Inventory/Item/Type.php @@ -0,0 +1,64 @@ +google.cloud.osconfig.v1.Inventory.Item.Type + */ +class Type +{ + /** + * Invalid. An type must be specified. + * + * Generated from protobuf enum TYPE_UNSPECIFIED = 0; + */ + const TYPE_UNSPECIFIED = 0; + /** + * This represents a package that is installed on the VM. + * + * Generated from protobuf enum INSTALLED_PACKAGE = 1; + */ + const INSTALLED_PACKAGE = 1; + /** + * This represents an update that is available for a package. + * + * Generated from protobuf enum AVAILABLE_PACKAGE = 2; + */ + const AVAILABLE_PACKAGE = 2; + + private static $valueToName = [ + self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', + self::INSTALLED_PACKAGE => 'INSTALLED_PACKAGE', + self::AVAILABLE_PACKAGE => 'AVAILABLE_PACKAGE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Type::class, \Google\Cloud\OsConfig\V1\Inventory_Item_Type::class); + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Inventory/OsInfo.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Inventory/OsInfo.php new file mode 100644 index 000000000000..8afe5a671bb1 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Inventory/OsInfo.php @@ -0,0 +1,320 @@ +google.cloud.osconfig.v1.Inventory.OsInfo + */ +class OsInfo extends \Google\Protobuf\Internal\Message +{ + /** + * The VM hostname. + * + * Generated from protobuf field string hostname = 9; + */ + protected $hostname = ''; + /** + * The operating system long name. + * For example 'Debian GNU/Linux 9' or 'Microsoft Window Server 2019 + * Datacenter'. + * + * Generated from protobuf field string long_name = 2; + */ + protected $long_name = ''; + /** + * The operating system short name. + * For example, 'windows' or 'debian'. + * + * Generated from protobuf field string short_name = 3; + */ + protected $short_name = ''; + /** + * The version of the operating system. + * + * Generated from protobuf field string version = 4; + */ + protected $version = ''; + /** + * The system architecture of the operating system. + * + * Generated from protobuf field string architecture = 5; + */ + protected $architecture = ''; + /** + * The kernel version of the operating system. + * + * Generated from protobuf field string kernel_version = 6; + */ + protected $kernel_version = ''; + /** + * The kernel release of the operating system. + * + * Generated from protobuf field string kernel_release = 7; + */ + protected $kernel_release = ''; + /** + * The current version of the OS Config agent running on the VM. + * + * Generated from protobuf field string osconfig_agent_version = 8; + */ + protected $osconfig_agent_version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $hostname + * The VM hostname. + * @type string $long_name + * The operating system long name. + * For example 'Debian GNU/Linux 9' or 'Microsoft Window Server 2019 + * Datacenter'. + * @type string $short_name + * The operating system short name. + * For example, 'windows' or 'debian'. + * @type string $version + * The version of the operating system. + * @type string $architecture + * The system architecture of the operating system. + * @type string $kernel_version + * The kernel version of the operating system. + * @type string $kernel_release + * The kernel release of the operating system. + * @type string $osconfig_agent_version + * The current version of the OS Config agent running on the VM. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\Inventory::initOnce(); + parent::__construct($data); + } + + /** + * The VM hostname. + * + * Generated from protobuf field string hostname = 9; + * @return string + */ + public function getHostname() + { + return $this->hostname; + } + + /** + * The VM hostname. + * + * Generated from protobuf field string hostname = 9; + * @param string $var + * @return $this + */ + public function setHostname($var) + { + GPBUtil::checkString($var, True); + $this->hostname = $var; + + return $this; + } + + /** + * The operating system long name. + * For example 'Debian GNU/Linux 9' or 'Microsoft Window Server 2019 + * Datacenter'. + * + * Generated from protobuf field string long_name = 2; + * @return string + */ + public function getLongName() + { + return $this->long_name; + } + + /** + * The operating system long name. + * For example 'Debian GNU/Linux 9' or 'Microsoft Window Server 2019 + * Datacenter'. + * + * Generated from protobuf field string long_name = 2; + * @param string $var + * @return $this + */ + public function setLongName($var) + { + GPBUtil::checkString($var, True); + $this->long_name = $var; + + return $this; + } + + /** + * The operating system short name. + * For example, 'windows' or 'debian'. + * + * Generated from protobuf field string short_name = 3; + * @return string + */ + public function getShortName() + { + return $this->short_name; + } + + /** + * The operating system short name. + * For example, 'windows' or 'debian'. + * + * Generated from protobuf field string short_name = 3; + * @param string $var + * @return $this + */ + public function setShortName($var) + { + GPBUtil::checkString($var, True); + $this->short_name = $var; + + return $this; + } + + /** + * The version of the operating system. + * + * Generated from protobuf field string version = 4; + * @return string + */ + public function getVersion() + { + return $this->version; + } + + /** + * The version of the operating system. + * + * Generated from protobuf field string version = 4; + * @param string $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkString($var, True); + $this->version = $var; + + return $this; + } + + /** + * The system architecture of the operating system. + * + * Generated from protobuf field string architecture = 5; + * @return string + */ + public function getArchitecture() + { + return $this->architecture; + } + + /** + * The system architecture of the operating system. + * + * Generated from protobuf field string architecture = 5; + * @param string $var + * @return $this + */ + public function setArchitecture($var) + { + GPBUtil::checkString($var, True); + $this->architecture = $var; + + return $this; + } + + /** + * The kernel version of the operating system. + * + * Generated from protobuf field string kernel_version = 6; + * @return string + */ + public function getKernelVersion() + { + return $this->kernel_version; + } + + /** + * The kernel version of the operating system. + * + * Generated from protobuf field string kernel_version = 6; + * @param string $var + * @return $this + */ + public function setKernelVersion($var) + { + GPBUtil::checkString($var, True); + $this->kernel_version = $var; + + return $this; + } + + /** + * The kernel release of the operating system. + * + * Generated from protobuf field string kernel_release = 7; + * @return string + */ + public function getKernelRelease() + { + return $this->kernel_release; + } + + /** + * The kernel release of the operating system. + * + * Generated from protobuf field string kernel_release = 7; + * @param string $var + * @return $this + */ + public function setKernelRelease($var) + { + GPBUtil::checkString($var, True); + $this->kernel_release = $var; + + return $this; + } + + /** + * The current version of the OS Config agent running on the VM. + * + * Generated from protobuf field string osconfig_agent_version = 8; + * @return string + */ + public function getOsconfigAgentVersion() + { + return $this->osconfig_agent_version; + } + + /** + * The current version of the OS Config agent running on the VM. + * + * Generated from protobuf field string osconfig_agent_version = 8; + * @param string $var + * @return $this + */ + public function setOsconfigAgentVersion($var) + { + GPBUtil::checkString($var, True); + $this->osconfig_agent_version = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(OsInfo::class, \Google\Cloud\OsConfig\V1\Inventory_OsInfo::class); + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Inventory/SoftwarePackage.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Inventory/SoftwarePackage.php new file mode 100644 index 000000000000..0c1efa777998 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Inventory/SoftwarePackage.php @@ -0,0 +1,387 @@ +google.cloud.osconfig.v1.Inventory.SoftwarePackage + */ +class SoftwarePackage extends \Google\Protobuf\Internal\Message +{ + protected $details; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\OsConfig\V1\Inventory\VersionedPackage $yum_package + * Yum package info. + * For details about the yum package manager, see + * https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/deployment_guide/ch-yum. + * @type \Google\Cloud\OsConfig\V1\Inventory\VersionedPackage $apt_package + * Details of an APT package. + * For details about the apt package manager, see + * https://wiki.debian.org/Apt. + * @type \Google\Cloud\OsConfig\V1\Inventory\VersionedPackage $zypper_package + * Details of a Zypper package. + * For details about the Zypper package manager, see + * https://en.opensuse.org/SDB:Zypper_manual. + * @type \Google\Cloud\OsConfig\V1\Inventory\VersionedPackage $googet_package + * Details of a Googet package. + * For details about the googet package manager, see + * https://github.com/google/googet. + * @type \Google\Cloud\OsConfig\V1\Inventory\ZypperPatch $zypper_patch + * Details of a Zypper patch. + * For details about the Zypper package manager, see + * https://en.opensuse.org/SDB:Zypper_manual. + * @type \Google\Cloud\OsConfig\V1\Inventory\WindowsUpdatePackage $wua_package + * Details of a Windows Update package. + * See https://docs.microsoft.com/en-us/windows/win32/api/_wua/ for + * information about Windows Update. + * @type \Google\Cloud\OsConfig\V1\Inventory\WindowsQuickFixEngineeringPackage $qfe_package + * Details of a Windows Quick Fix engineering package. + * See + * https://docs.microsoft.com/en-us/windows/win32/cimwin32prov/win32-quickfixengineering + * for info in Windows Quick Fix Engineering. + * @type \Google\Cloud\OsConfig\V1\Inventory\VersionedPackage $cos_package + * Details of a COS package. + * @type \Google\Cloud\OsConfig\V1\Inventory\WindowsApplication $windows_application + * Details of Windows Application. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\Inventory::initOnce(); + parent::__construct($data); + } + + /** + * Yum package info. + * For details about the yum package manager, see + * https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/deployment_guide/ch-yum. + * + * Generated from protobuf field .google.cloud.osconfig.v1.Inventory.VersionedPackage yum_package = 1; + * @return \Google\Cloud\OsConfig\V1\Inventory\VersionedPackage|null + */ + public function getYumPackage() + { + return $this->readOneof(1); + } + + public function hasYumPackage() + { + return $this->hasOneof(1); + } + + /** + * Yum package info. + * For details about the yum package manager, see + * https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/deployment_guide/ch-yum. + * + * Generated from protobuf field .google.cloud.osconfig.v1.Inventory.VersionedPackage yum_package = 1; + * @param \Google\Cloud\OsConfig\V1\Inventory\VersionedPackage $var + * @return $this + */ + public function setYumPackage($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\Inventory\VersionedPackage::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Details of an APT package. + * For details about the apt package manager, see + * https://wiki.debian.org/Apt. + * + * Generated from protobuf field .google.cloud.osconfig.v1.Inventory.VersionedPackage apt_package = 2; + * @return \Google\Cloud\OsConfig\V1\Inventory\VersionedPackage|null + */ + public function getAptPackage() + { + return $this->readOneof(2); + } + + public function hasAptPackage() + { + return $this->hasOneof(2); + } + + /** + * Details of an APT package. + * For details about the apt package manager, see + * https://wiki.debian.org/Apt. + * + * Generated from protobuf field .google.cloud.osconfig.v1.Inventory.VersionedPackage apt_package = 2; + * @param \Google\Cloud\OsConfig\V1\Inventory\VersionedPackage $var + * @return $this + */ + public function setAptPackage($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\Inventory\VersionedPackage::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Details of a Zypper package. + * For details about the Zypper package manager, see + * https://en.opensuse.org/SDB:Zypper_manual. + * + * Generated from protobuf field .google.cloud.osconfig.v1.Inventory.VersionedPackage zypper_package = 3; + * @return \Google\Cloud\OsConfig\V1\Inventory\VersionedPackage|null + */ + public function getZypperPackage() + { + return $this->readOneof(3); + } + + public function hasZypperPackage() + { + return $this->hasOneof(3); + } + + /** + * Details of a Zypper package. + * For details about the Zypper package manager, see + * https://en.opensuse.org/SDB:Zypper_manual. + * + * Generated from protobuf field .google.cloud.osconfig.v1.Inventory.VersionedPackage zypper_package = 3; + * @param \Google\Cloud\OsConfig\V1\Inventory\VersionedPackage $var + * @return $this + */ + public function setZypperPackage($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\Inventory\VersionedPackage::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Details of a Googet package. + * For details about the googet package manager, see + * https://github.com/google/googet. + * + * Generated from protobuf field .google.cloud.osconfig.v1.Inventory.VersionedPackage googet_package = 4; + * @return \Google\Cloud\OsConfig\V1\Inventory\VersionedPackage|null + */ + public function getGoogetPackage() + { + return $this->readOneof(4); + } + + public function hasGoogetPackage() + { + return $this->hasOneof(4); + } + + /** + * Details of a Googet package. + * For details about the googet package manager, see + * https://github.com/google/googet. + * + * Generated from protobuf field .google.cloud.osconfig.v1.Inventory.VersionedPackage googet_package = 4; + * @param \Google\Cloud\OsConfig\V1\Inventory\VersionedPackage $var + * @return $this + */ + public function setGoogetPackage($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\Inventory\VersionedPackage::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Details of a Zypper patch. + * For details about the Zypper package manager, see + * https://en.opensuse.org/SDB:Zypper_manual. + * + * Generated from protobuf field .google.cloud.osconfig.v1.Inventory.ZypperPatch zypper_patch = 5; + * @return \Google\Cloud\OsConfig\V1\Inventory\ZypperPatch|null + */ + public function getZypperPatch() + { + return $this->readOneof(5); + } + + public function hasZypperPatch() + { + return $this->hasOneof(5); + } + + /** + * Details of a Zypper patch. + * For details about the Zypper package manager, see + * https://en.opensuse.org/SDB:Zypper_manual. + * + * Generated from protobuf field .google.cloud.osconfig.v1.Inventory.ZypperPatch zypper_patch = 5; + * @param \Google\Cloud\OsConfig\V1\Inventory\ZypperPatch $var + * @return $this + */ + public function setZypperPatch($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\Inventory\ZypperPatch::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Details of a Windows Update package. + * See https://docs.microsoft.com/en-us/windows/win32/api/_wua/ for + * information about Windows Update. + * + * Generated from protobuf field .google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage wua_package = 6; + * @return \Google\Cloud\OsConfig\V1\Inventory\WindowsUpdatePackage|null + */ + public function getWuaPackage() + { + return $this->readOneof(6); + } + + public function hasWuaPackage() + { + return $this->hasOneof(6); + } + + /** + * Details of a Windows Update package. + * See https://docs.microsoft.com/en-us/windows/win32/api/_wua/ for + * information about Windows Update. + * + * Generated from protobuf field .google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage wua_package = 6; + * @param \Google\Cloud\OsConfig\V1\Inventory\WindowsUpdatePackage $var + * @return $this + */ + public function setWuaPackage($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\Inventory\WindowsUpdatePackage::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * Details of a Windows Quick Fix engineering package. + * See + * https://docs.microsoft.com/en-us/windows/win32/cimwin32prov/win32-quickfixengineering + * for info in Windows Quick Fix Engineering. + * + * Generated from protobuf field .google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage qfe_package = 7; + * @return \Google\Cloud\OsConfig\V1\Inventory\WindowsQuickFixEngineeringPackage|null + */ + public function getQfePackage() + { + return $this->readOneof(7); + } + + public function hasQfePackage() + { + return $this->hasOneof(7); + } + + /** + * Details of a Windows Quick Fix engineering package. + * See + * https://docs.microsoft.com/en-us/windows/win32/cimwin32prov/win32-quickfixengineering + * for info in Windows Quick Fix Engineering. + * + * Generated from protobuf field .google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage qfe_package = 7; + * @param \Google\Cloud\OsConfig\V1\Inventory\WindowsQuickFixEngineeringPackage $var + * @return $this + */ + public function setQfePackage($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\Inventory\WindowsQuickFixEngineeringPackage::class); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * Details of a COS package. + * + * Generated from protobuf field .google.cloud.osconfig.v1.Inventory.VersionedPackage cos_package = 8; + * @return \Google\Cloud\OsConfig\V1\Inventory\VersionedPackage|null + */ + public function getCosPackage() + { + return $this->readOneof(8); + } + + public function hasCosPackage() + { + return $this->hasOneof(8); + } + + /** + * Details of a COS package. + * + * Generated from protobuf field .google.cloud.osconfig.v1.Inventory.VersionedPackage cos_package = 8; + * @param \Google\Cloud\OsConfig\V1\Inventory\VersionedPackage $var + * @return $this + */ + public function setCosPackage($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\Inventory\VersionedPackage::class); + $this->writeOneof(8, $var); + + return $this; + } + + /** + * Details of Windows Application. + * + * Generated from protobuf field .google.cloud.osconfig.v1.Inventory.WindowsApplication windows_application = 9; + * @return \Google\Cloud\OsConfig\V1\Inventory\WindowsApplication|null + */ + public function getWindowsApplication() + { + return $this->readOneof(9); + } + + public function hasWindowsApplication() + { + return $this->hasOneof(9); + } + + /** + * Details of Windows Application. + * + * Generated from protobuf field .google.cloud.osconfig.v1.Inventory.WindowsApplication windows_application = 9; + * @param \Google\Cloud\OsConfig\V1\Inventory\WindowsApplication $var + * @return $this + */ + public function setWindowsApplication($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\Inventory\WindowsApplication::class); + $this->writeOneof(9, $var); + + return $this; + } + + /** + * @return string + */ + public function getDetails() + { + return $this->whichOneof("details"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SoftwarePackage::class, \Google\Cloud\OsConfig\V1\Inventory_SoftwarePackage::class); + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Inventory/VersionedPackage.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Inventory/VersionedPackage.php new file mode 100644 index 000000000000..619a13761ab7 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Inventory/VersionedPackage.php @@ -0,0 +1,139 @@ +google.cloud.osconfig.v1.Inventory.VersionedPackage + */ +class VersionedPackage extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the package. + * + * Generated from protobuf field string package_name = 4; + */ + protected $package_name = ''; + /** + * The system architecture this package is intended for. + * + * Generated from protobuf field string architecture = 2; + */ + protected $architecture = ''; + /** + * The version of the package. + * + * Generated from protobuf field string version = 3; + */ + protected $version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $package_name + * The name of the package. + * @type string $architecture + * The system architecture this package is intended for. + * @type string $version + * The version of the package. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\Inventory::initOnce(); + parent::__construct($data); + } + + /** + * The name of the package. + * + * Generated from protobuf field string package_name = 4; + * @return string + */ + public function getPackageName() + { + return $this->package_name; + } + + /** + * The name of the package. + * + * Generated from protobuf field string package_name = 4; + * @param string $var + * @return $this + */ + public function setPackageName($var) + { + GPBUtil::checkString($var, True); + $this->package_name = $var; + + return $this; + } + + /** + * The system architecture this package is intended for. + * + * Generated from protobuf field string architecture = 2; + * @return string + */ + public function getArchitecture() + { + return $this->architecture; + } + + /** + * The system architecture this package is intended for. + * + * Generated from protobuf field string architecture = 2; + * @param string $var + * @return $this + */ + public function setArchitecture($var) + { + GPBUtil::checkString($var, True); + $this->architecture = $var; + + return $this; + } + + /** + * The version of the package. + * + * Generated from protobuf field string version = 3; + * @return string + */ + public function getVersion() + { + return $this->version; + } + + /** + * The version of the package. + * + * Generated from protobuf field string version = 3; + * @param string $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkString($var, True); + $this->version = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(VersionedPackage::class, \Google\Cloud\OsConfig\V1\Inventory_VersionedPackage::class); + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Inventory/WindowsApplication.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Inventory/WindowsApplication.php new file mode 100644 index 000000000000..6f2fe764f0a0 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Inventory/WindowsApplication.php @@ -0,0 +1,226 @@ +google.cloud.osconfig.v1.Inventory.WindowsApplication + */ +class WindowsApplication extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the application or product. + * + * Generated from protobuf field string display_name = 1; + */ + protected $display_name = ''; + /** + * The version of the product or application in string format. + * + * Generated from protobuf field string display_version = 2; + */ + protected $display_version = ''; + /** + * The name of the manufacturer for the product or application. + * + * Generated from protobuf field string publisher = 3; + */ + protected $publisher = ''; + /** + * The last time this product received service. The value of this property + * is replaced each time a patch is applied or removed from the product or + * the command-line option is used to repair the product. + * + * Generated from protobuf field .google.type.Date install_date = 4; + */ + protected $install_date = null; + /** + * The internet address for technical support. + * + * Generated from protobuf field string help_link = 5; + */ + protected $help_link = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $display_name + * The name of the application or product. + * @type string $display_version + * The version of the product or application in string format. + * @type string $publisher + * The name of the manufacturer for the product or application. + * @type \Google\Type\Date $install_date + * The last time this product received service. The value of this property + * is replaced each time a patch is applied or removed from the product or + * the command-line option is used to repair the product. + * @type string $help_link + * The internet address for technical support. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\Inventory::initOnce(); + parent::__construct($data); + } + + /** + * The name of the application or product. + * + * Generated from protobuf field string display_name = 1; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * The name of the application or product. + * + * Generated from protobuf field string display_name = 1; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * The version of the product or application in string format. + * + * Generated from protobuf field string display_version = 2; + * @return string + */ + public function getDisplayVersion() + { + return $this->display_version; + } + + /** + * The version of the product or application in string format. + * + * Generated from protobuf field string display_version = 2; + * @param string $var + * @return $this + */ + public function setDisplayVersion($var) + { + GPBUtil::checkString($var, True); + $this->display_version = $var; + + return $this; + } + + /** + * The name of the manufacturer for the product or application. + * + * Generated from protobuf field string publisher = 3; + * @return string + */ + public function getPublisher() + { + return $this->publisher; + } + + /** + * The name of the manufacturer for the product or application. + * + * Generated from protobuf field string publisher = 3; + * @param string $var + * @return $this + */ + public function setPublisher($var) + { + GPBUtil::checkString($var, True); + $this->publisher = $var; + + return $this; + } + + /** + * The last time this product received service. The value of this property + * is replaced each time a patch is applied or removed from the product or + * the command-line option is used to repair the product. + * + * Generated from protobuf field .google.type.Date install_date = 4; + * @return \Google\Type\Date|null + */ + public function getInstallDate() + { + return $this->install_date; + } + + public function hasInstallDate() + { + return isset($this->install_date); + } + + public function clearInstallDate() + { + unset($this->install_date); + } + + /** + * The last time this product received service. The value of this property + * is replaced each time a patch is applied or removed from the product or + * the command-line option is used to repair the product. + * + * Generated from protobuf field .google.type.Date install_date = 4; + * @param \Google\Type\Date $var + * @return $this + */ + public function setInstallDate($var) + { + GPBUtil::checkMessage($var, \Google\Type\Date::class); + $this->install_date = $var; + + return $this; + } + + /** + * The internet address for technical support. + * + * Generated from protobuf field string help_link = 5; + * @return string + */ + public function getHelpLink() + { + return $this->help_link; + } + + /** + * The internet address for technical support. + * + * Generated from protobuf field string help_link = 5; + * @param string $var + * @return $this + */ + public function setHelpLink($var) + { + GPBUtil::checkString($var, True); + $this->help_link = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(WindowsApplication::class, \Google\Cloud\OsConfig\V1\Inventory_WindowsApplication::class); + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Inventory/WindowsQuickFixEngineeringPackage.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Inventory/WindowsQuickFixEngineeringPackage.php new file mode 100644 index 000000000000..bd21553ac6e7 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Inventory/WindowsQuickFixEngineeringPackage.php @@ -0,0 +1,185 @@ +google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage + */ +class WindowsQuickFixEngineeringPackage extends \Google\Protobuf\Internal\Message +{ + /** + * A short textual description of the QFE update. + * + * Generated from protobuf field string caption = 1; + */ + protected $caption = ''; + /** + * A textual description of the QFE update. + * + * Generated from protobuf field string description = 2; + */ + protected $description = ''; + /** + * Unique identifier associated with a particular QFE update. + * + * Generated from protobuf field string hot_fix_id = 3; + */ + protected $hot_fix_id = ''; + /** + * Date that the QFE update was installed. Mapped from installed_on field. + * + * Generated from protobuf field .google.protobuf.Timestamp install_time = 5; + */ + protected $install_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $caption + * A short textual description of the QFE update. + * @type string $description + * A textual description of the QFE update. + * @type string $hot_fix_id + * Unique identifier associated with a particular QFE update. + * @type \Google\Protobuf\Timestamp $install_time + * Date that the QFE update was installed. Mapped from installed_on field. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\Inventory::initOnce(); + parent::__construct($data); + } + + /** + * A short textual description of the QFE update. + * + * Generated from protobuf field string caption = 1; + * @return string + */ + public function getCaption() + { + return $this->caption; + } + + /** + * A short textual description of the QFE update. + * + * Generated from protobuf field string caption = 1; + * @param string $var + * @return $this + */ + public function setCaption($var) + { + GPBUtil::checkString($var, True); + $this->caption = $var; + + return $this; + } + + /** + * A textual description of the QFE update. + * + * Generated from protobuf field string description = 2; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * A textual description of the QFE update. + * + * Generated from protobuf field string description = 2; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Unique identifier associated with a particular QFE update. + * + * Generated from protobuf field string hot_fix_id = 3; + * @return string + */ + public function getHotFixId() + { + return $this->hot_fix_id; + } + + /** + * Unique identifier associated with a particular QFE update. + * + * Generated from protobuf field string hot_fix_id = 3; + * @param string $var + * @return $this + */ + public function setHotFixId($var) + { + GPBUtil::checkString($var, True); + $this->hot_fix_id = $var; + + return $this; + } + + /** + * Date that the QFE update was installed. Mapped from installed_on field. + * + * Generated from protobuf field .google.protobuf.Timestamp install_time = 5; + * @return \Google\Protobuf\Timestamp|null + */ + public function getInstallTime() + { + return $this->install_time; + } + + public function hasInstallTime() + { + return isset($this->install_time); + } + + public function clearInstallTime() + { + unset($this->install_time); + } + + /** + * Date that the QFE update was installed. Mapped from installed_on field. + * + * Generated from protobuf field .google.protobuf.Timestamp install_time = 5; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setInstallTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->install_time = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(WindowsQuickFixEngineeringPackage::class, \Google\Cloud\OsConfig\V1\Inventory_WindowsQuickFixEngineeringPackage::class); + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Inventory/WindowsUpdatePackage.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Inventory/WindowsUpdatePackage.php new file mode 100644 index 000000000000..60bd4b135eb6 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Inventory/WindowsUpdatePackage.php @@ -0,0 +1,368 @@ +google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage + */ +class WindowsUpdatePackage extends \Google\Protobuf\Internal\Message +{ + /** + * The localized title of the update package. + * + * Generated from protobuf field string title = 1; + */ + protected $title = ''; + /** + * The localized description of the update package. + * + * Generated from protobuf field string description = 2; + */ + protected $description = ''; + /** + * The categories that are associated with this update package. + * + * Generated from protobuf field repeated .google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory categories = 3; + */ + private $categories; + /** + * A collection of Microsoft Knowledge Base article IDs that are associated + * with the update package. + * + * Generated from protobuf field repeated string kb_article_ids = 4; + */ + private $kb_article_ids; + /** + * A hyperlink to the language-specific support information for the update. + * + * Generated from protobuf field string support_url = 11; + */ + protected $support_url = ''; + /** + * A collection of URLs that provide more information about the update + * package. + * + * Generated from protobuf field repeated string more_info_urls = 5; + */ + private $more_info_urls; + /** + * Gets the identifier of an update package. Stays the same across + * revisions. + * + * Generated from protobuf field string update_id = 6; + */ + protected $update_id = ''; + /** + * The revision number of this update package. + * + * Generated from protobuf field int32 revision_number = 7; + */ + protected $revision_number = 0; + /** + * The last published date of the update, in (UTC) date and time. + * + * Generated from protobuf field .google.protobuf.Timestamp last_deployment_change_time = 10; + */ + protected $last_deployment_change_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $title + * The localized title of the update package. + * @type string $description + * The localized description of the update package. + * @type array<\Google\Cloud\OsConfig\V1\Inventory\WindowsUpdatePackage\WindowsUpdateCategory>|\Google\Protobuf\Internal\RepeatedField $categories + * The categories that are associated with this update package. + * @type array|\Google\Protobuf\Internal\RepeatedField $kb_article_ids + * A collection of Microsoft Knowledge Base article IDs that are associated + * with the update package. + * @type string $support_url + * A hyperlink to the language-specific support information for the update. + * @type array|\Google\Protobuf\Internal\RepeatedField $more_info_urls + * A collection of URLs that provide more information about the update + * package. + * @type string $update_id + * Gets the identifier of an update package. Stays the same across + * revisions. + * @type int $revision_number + * The revision number of this update package. + * @type \Google\Protobuf\Timestamp $last_deployment_change_time + * The last published date of the update, in (UTC) date and time. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\Inventory::initOnce(); + parent::__construct($data); + } + + /** + * The localized title of the update package. + * + * Generated from protobuf field string title = 1; + * @return string + */ + public function getTitle() + { + return $this->title; + } + + /** + * The localized title of the update package. + * + * Generated from protobuf field string title = 1; + * @param string $var + * @return $this + */ + public function setTitle($var) + { + GPBUtil::checkString($var, True); + $this->title = $var; + + return $this; + } + + /** + * The localized description of the update package. + * + * Generated from protobuf field string description = 2; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * The localized description of the update package. + * + * Generated from protobuf field string description = 2; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * The categories that are associated with this update package. + * + * Generated from protobuf field repeated .google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory categories = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCategories() + { + return $this->categories; + } + + /** + * The categories that are associated with this update package. + * + * Generated from protobuf field repeated .google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory categories = 3; + * @param array<\Google\Cloud\OsConfig\V1\Inventory\WindowsUpdatePackage\WindowsUpdateCategory>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCategories($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\OsConfig\V1\Inventory\WindowsUpdatePackage\WindowsUpdateCategory::class); + $this->categories = $arr; + + return $this; + } + + /** + * A collection of Microsoft Knowledge Base article IDs that are associated + * with the update package. + * + * Generated from protobuf field repeated string kb_article_ids = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getKbArticleIds() + { + return $this->kb_article_ids; + } + + /** + * A collection of Microsoft Knowledge Base article IDs that are associated + * with the update package. + * + * Generated from protobuf field repeated string kb_article_ids = 4; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setKbArticleIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->kb_article_ids = $arr; + + return $this; + } + + /** + * A hyperlink to the language-specific support information for the update. + * + * Generated from protobuf field string support_url = 11; + * @return string + */ + public function getSupportUrl() + { + return $this->support_url; + } + + /** + * A hyperlink to the language-specific support information for the update. + * + * Generated from protobuf field string support_url = 11; + * @param string $var + * @return $this + */ + public function setSupportUrl($var) + { + GPBUtil::checkString($var, True); + $this->support_url = $var; + + return $this; + } + + /** + * A collection of URLs that provide more information about the update + * package. + * + * Generated from protobuf field repeated string more_info_urls = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMoreInfoUrls() + { + return $this->more_info_urls; + } + + /** + * A collection of URLs that provide more information about the update + * package. + * + * Generated from protobuf field repeated string more_info_urls = 5; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMoreInfoUrls($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->more_info_urls = $arr; + + return $this; + } + + /** + * Gets the identifier of an update package. Stays the same across + * revisions. + * + * Generated from protobuf field string update_id = 6; + * @return string + */ + public function getUpdateId() + { + return $this->update_id; + } + + /** + * Gets the identifier of an update package. Stays the same across + * revisions. + * + * Generated from protobuf field string update_id = 6; + * @param string $var + * @return $this + */ + public function setUpdateId($var) + { + GPBUtil::checkString($var, True); + $this->update_id = $var; + + return $this; + } + + /** + * The revision number of this update package. + * + * Generated from protobuf field int32 revision_number = 7; + * @return int + */ + public function getRevisionNumber() + { + return $this->revision_number; + } + + /** + * The revision number of this update package. + * + * Generated from protobuf field int32 revision_number = 7; + * @param int $var + * @return $this + */ + public function setRevisionNumber($var) + { + GPBUtil::checkInt32($var); + $this->revision_number = $var; + + return $this; + } + + /** + * The last published date of the update, in (UTC) date and time. + * + * Generated from protobuf field .google.protobuf.Timestamp last_deployment_change_time = 10; + * @return \Google\Protobuf\Timestamp|null + */ + public function getLastDeploymentChangeTime() + { + return $this->last_deployment_change_time; + } + + public function hasLastDeploymentChangeTime() + { + return isset($this->last_deployment_change_time); + } + + public function clearLastDeploymentChangeTime() + { + unset($this->last_deployment_change_time); + } + + /** + * The last published date of the update, in (UTC) date and time. + * + * Generated from protobuf field .google.protobuf.Timestamp last_deployment_change_time = 10; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setLastDeploymentChangeTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->last_deployment_change_time = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(WindowsUpdatePackage::class, \Google\Cloud\OsConfig\V1\Inventory_WindowsUpdatePackage::class); + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Inventory/WindowsUpdatePackage/WindowsUpdateCategory.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Inventory/WindowsUpdatePackage/WindowsUpdateCategory.php new file mode 100644 index 000000000000..9b3288f0412d --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Inventory/WindowsUpdatePackage/WindowsUpdateCategory.php @@ -0,0 +1,104 @@ +google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory + */ +class WindowsUpdateCategory extends \Google\Protobuf\Internal\Message +{ + /** + * The identifier of the windows update category. + * + * Generated from protobuf field string id = 1; + */ + protected $id = ''; + /** + * The name of the windows update category. + * + * Generated from protobuf field string name = 2; + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $id + * The identifier of the windows update category. + * @type string $name + * The name of the windows update category. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\Inventory::initOnce(); + parent::__construct($data); + } + + /** + * The identifier of the windows update category. + * + * Generated from protobuf field string id = 1; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * The identifier of the windows update category. + * + * Generated from protobuf field string id = 1; + * @param string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkString($var, True); + $this->id = $var; + + return $this; + } + + /** + * The name of the windows update category. + * + * Generated from protobuf field string name = 2; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The name of the windows update category. + * + * Generated from protobuf field string name = 2; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(WindowsUpdateCategory::class, \Google\Cloud\OsConfig\V1\Inventory_WindowsUpdatePackage_WindowsUpdateCategory::class); + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Inventory/ZypperPatch.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Inventory/ZypperPatch.php new file mode 100644 index 000000000000..dc876af0d8c4 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Inventory/ZypperPatch.php @@ -0,0 +1,172 @@ +google.cloud.osconfig.v1.Inventory.ZypperPatch + */ +class ZypperPatch extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the patch. + * + * Generated from protobuf field string patch_name = 5; + */ + protected $patch_name = ''; + /** + * The category of the patch. + * + * Generated from protobuf field string category = 2; + */ + protected $category = ''; + /** + * The severity specified for this patch + * + * Generated from protobuf field string severity = 3; + */ + protected $severity = ''; + /** + * Any summary information provided about this patch. + * + * Generated from protobuf field string summary = 4; + */ + protected $summary = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $patch_name + * The name of the patch. + * @type string $category + * The category of the patch. + * @type string $severity + * The severity specified for this patch + * @type string $summary + * Any summary information provided about this patch. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\Inventory::initOnce(); + parent::__construct($data); + } + + /** + * The name of the patch. + * + * Generated from protobuf field string patch_name = 5; + * @return string + */ + public function getPatchName() + { + return $this->patch_name; + } + + /** + * The name of the patch. + * + * Generated from protobuf field string patch_name = 5; + * @param string $var + * @return $this + */ + public function setPatchName($var) + { + GPBUtil::checkString($var, True); + $this->patch_name = $var; + + return $this; + } + + /** + * The category of the patch. + * + * Generated from protobuf field string category = 2; + * @return string + */ + public function getCategory() + { + return $this->category; + } + + /** + * The category of the patch. + * + * Generated from protobuf field string category = 2; + * @param string $var + * @return $this + */ + public function setCategory($var) + { + GPBUtil::checkString($var, True); + $this->category = $var; + + return $this; + } + + /** + * The severity specified for this patch + * + * Generated from protobuf field string severity = 3; + * @return string + */ + public function getSeverity() + { + return $this->severity; + } + + /** + * The severity specified for this patch + * + * Generated from protobuf field string severity = 3; + * @param string $var + * @return $this + */ + public function setSeverity($var) + { + GPBUtil::checkString($var, True); + $this->severity = $var; + + return $this; + } + + /** + * Any summary information provided about this patch. + * + * Generated from protobuf field string summary = 4; + * @return string + */ + public function getSummary() + { + return $this->summary; + } + + /** + * Any summary information provided about this patch. + * + * Generated from protobuf field string summary = 4; + * @param string $var + * @return $this + */ + public function setSummary($var) + { + GPBUtil::checkString($var, True); + $this->summary = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ZypperPatch::class, \Google\Cloud\OsConfig\V1\Inventory_ZypperPatch::class); + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/InventoryView.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/InventoryView.php new file mode 100644 index 000000000000..eb6194d6c526 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/InventoryView.php @@ -0,0 +1,62 @@ +google.cloud.osconfig.v1.InventoryView + */ +class InventoryView +{ + /** + * The default value. + * The API defaults to the BASIC view. + * + * Generated from protobuf enum INVENTORY_VIEW_UNSPECIFIED = 0; + */ + const INVENTORY_VIEW_UNSPECIFIED = 0; + /** + * Returns the basic inventory information that includes `os_info`. + * + * Generated from protobuf enum BASIC = 1; + */ + const BASIC = 1; + /** + * Returns all fields. + * + * Generated from protobuf enum FULL = 2; + */ + const FULL = 2; + + private static $valueToName = [ + self::INVENTORY_VIEW_UNSPECIFIED => 'INVENTORY_VIEW_UNSPECIFIED', + self::BASIC => 'BASIC', + self::FULL => 'FULL', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListInventoriesRequest.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListInventoriesRequest.php new file mode 100644 index 000000000000..10f17a2d79a4 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListInventoriesRequest.php @@ -0,0 +1,246 @@ +google.cloud.osconfig.v1.ListInventoriesRequest + */ +class ListInventoriesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource name. + * Format: `projects/{project}/locations/{location}/instances/-` + * For `{project}`, either `project-number` or `project-id` can be provided. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Inventory view indicating what information should be included in the + * inventory resource. If unspecified, the default view is BASIC. + * + * Generated from protobuf field .google.cloud.osconfig.v1.InventoryView view = 2; + */ + protected $view = 0; + /** + * The maximum number of results to return. + * + * Generated from protobuf field int32 page_size = 3; + */ + protected $page_size = 0; + /** + * A pagination token returned from a previous call to + * `ListInventories` that indicates where this listing + * should continue from. + * + * Generated from protobuf field string page_token = 4; + */ + protected $page_token = ''; + /** + * If provided, this field specifies the criteria that must be met by a + * `Inventory` API resource to be included in the response. + * + * Generated from protobuf field string filter = 5; + */ + protected $filter = ''; + + /** + * @param string $parent Required. The parent resource name. + * + * Format: `projects/{project}/locations/{location}/instances/-` + * + * For `{project}`, either `project-number` or `project-id` can be provided. Please see + * {@see OsConfigZonalServiceClient::instanceName()} for help formatting this field. + * + * @return \Google\Cloud\OsConfig\V1\ListInventoriesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource name. + * Format: `projects/{project}/locations/{location}/instances/-` + * For `{project}`, either `project-number` or `project-id` can be provided. + * @type int $view + * Inventory view indicating what information should be included in the + * inventory resource. If unspecified, the default view is BASIC. + * @type int $page_size + * The maximum number of results to return. + * @type string $page_token + * A pagination token returned from a previous call to + * `ListInventories` that indicates where this listing + * should continue from. + * @type string $filter + * If provided, this field specifies the criteria that must be met by a + * `Inventory` API resource to be included in the response. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\Inventory::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource name. + * Format: `projects/{project}/locations/{location}/instances/-` + * For `{project}`, either `project-number` or `project-id` can be provided. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource name. + * Format: `projects/{project}/locations/{location}/instances/-` + * For `{project}`, either `project-number` or `project-id` can be provided. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Inventory view indicating what information should be included in the + * inventory resource. If unspecified, the default view is BASIC. + * + * Generated from protobuf field .google.cloud.osconfig.v1.InventoryView view = 2; + * @return int + */ + public function getView() + { + return $this->view; + } + + /** + * Inventory view indicating what information should be included in the + * inventory resource. If unspecified, the default view is BASIC. + * + * Generated from protobuf field .google.cloud.osconfig.v1.InventoryView view = 2; + * @param int $var + * @return $this + */ + public function setView($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\OsConfig\V1\InventoryView::class); + $this->view = $var; + + return $this; + } + + /** + * The maximum number of results to return. + * + * Generated from protobuf field int32 page_size = 3; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of results to return. + * + * Generated from protobuf field int32 page_size = 3; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A pagination token returned from a previous call to + * `ListInventories` that indicates where this listing + * should continue from. + * + * Generated from protobuf field string page_token = 4; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A pagination token returned from a previous call to + * `ListInventories` that indicates where this listing + * should continue from. + * + * Generated from protobuf field string page_token = 4; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * If provided, this field specifies the criteria that must be met by a + * `Inventory` API resource to be included in the response. + * + * Generated from protobuf field string filter = 5; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * If provided, this field specifies the criteria that must be met by a + * `Inventory` API resource to be included in the response. + * + * Generated from protobuf field string filter = 5; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListInventoriesResponse.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListInventoriesResponse.php new file mode 100644 index 000000000000..c1d0aa692768 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListInventoriesResponse.php @@ -0,0 +1,102 @@ +google.cloud.osconfig.v1.ListInventoriesResponse + */ +class ListInventoriesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * List of inventory objects. + * + * Generated from protobuf field repeated .google.cloud.osconfig.v1.Inventory inventories = 1; + */ + private $inventories; + /** + * The pagination token to retrieve the next page of inventory objects. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\OsConfig\V1\Inventory>|\Google\Protobuf\Internal\RepeatedField $inventories + * List of inventory objects. + * @type string $next_page_token + * The pagination token to retrieve the next page of inventory objects. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\Inventory::initOnce(); + parent::__construct($data); + } + + /** + * List of inventory objects. + * + * Generated from protobuf field repeated .google.cloud.osconfig.v1.Inventory inventories = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getInventories() + { + return $this->inventories; + } + + /** + * List of inventory objects. + * + * Generated from protobuf field repeated .google.cloud.osconfig.v1.Inventory inventories = 1; + * @param array<\Google\Cloud\OsConfig\V1\Inventory>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setInventories($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\OsConfig\V1\Inventory::class); + $this->inventories = $arr; + + return $this; + } + + /** + * The pagination token to retrieve the next page of inventory objects. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * The pagination token to retrieve the next page of inventory objects. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListOSPolicyAssignmentReportsRequest.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListOSPolicyAssignmentReportsRequest.php new file mode 100644 index 000000000000..aa3cd3257a0f --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListOSPolicyAssignmentReportsRequest.php @@ -0,0 +1,283 @@ +google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsRequest + */ +class ListOSPolicyAssignmentReportsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource name. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}/reports` + * For `{project}`, either `project-number` or `project-id` can be provided. + * For `{instance}`, either `instance-name`, `instance-id`, or `-` can be + * provided. If '-' is provided, the response will include + * OSPolicyAssignmentReports for all instances in the project/location. + * For `{assignment}`, either `assignment-id` or `-` can be provided. If '-' + * is provided, the response will include OSPolicyAssignmentReports for all + * OSPolicyAssignments in the project/location. + * Either {instance} or {assignment} must be `-`. + * For example: + * `projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/-/reports` + * returns all reports for the instance + * `projects/{project}/locations/{location}/instances/-/osPolicyAssignments/{assignment-id}/reports` + * returns all the reports for the given assignment across all instances. + * `projects/{project}/locations/{location}/instances/-/osPolicyAssignments/-/reports` + * returns all the reports for all assignments across all instances. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of results to return. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * If provided, this field specifies the criteria that must be met by the + * `OSPolicyAssignmentReport` API resource that is included in the response. + * + * Generated from protobuf field string filter = 3; + */ + protected $filter = ''; + /** + * A pagination token returned from a previous call to the + * `ListOSPolicyAssignmentReports` method that indicates where this listing + * should continue from. + * + * Generated from protobuf field string page_token = 4; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The parent resource name. + * + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}/reports` + * + * For `{project}`, either `project-number` or `project-id` can be provided. + * For `{instance}`, either `instance-name`, `instance-id`, or `-` can be + * provided. If '-' is provided, the response will include + * OSPolicyAssignmentReports for all instances in the project/location. + * For `{assignment}`, either `assignment-id` or `-` can be provided. If '-' + * is provided, the response will include OSPolicyAssignmentReports for all + * OSPolicyAssignments in the project/location. + * Either {instance} or {assignment} must be `-`. + * + * For example: + * `projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/-/reports` + * returns all reports for the instance + * `projects/{project}/locations/{location}/instances/-/osPolicyAssignments/{assignment-id}/reports` + * returns all the reports for the given assignment across all instances. + * `projects/{project}/locations/{location}/instances/-/osPolicyAssignments/-/reports` + * returns all the reports for all assignments across all instances. Please see + * {@see OsConfigZonalServiceClient::instanceOSPolicyAssignmentName()} for help formatting this field. + * + * @return \Google\Cloud\OsConfig\V1\ListOSPolicyAssignmentReportsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource name. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}/reports` + * For `{project}`, either `project-number` or `project-id` can be provided. + * For `{instance}`, either `instance-name`, `instance-id`, or `-` can be + * provided. If '-' is provided, the response will include + * OSPolicyAssignmentReports for all instances in the project/location. + * For `{assignment}`, either `assignment-id` or `-` can be provided. If '-' + * is provided, the response will include OSPolicyAssignmentReports for all + * OSPolicyAssignments in the project/location. + * Either {instance} or {assignment} must be `-`. + * For example: + * `projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/-/reports` + * returns all reports for the instance + * `projects/{project}/locations/{location}/instances/-/osPolicyAssignments/{assignment-id}/reports` + * returns all the reports for the given assignment across all instances. + * `projects/{project}/locations/{location}/instances/-/osPolicyAssignments/-/reports` + * returns all the reports for all assignments across all instances. + * @type int $page_size + * The maximum number of results to return. + * @type string $filter + * If provided, this field specifies the criteria that must be met by the + * `OSPolicyAssignmentReport` API resource that is included in the response. + * @type string $page_token + * A pagination token returned from a previous call to the + * `ListOSPolicyAssignmentReports` method that indicates where this listing + * should continue from. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\OsPolicyAssignmentReports::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource name. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}/reports` + * For `{project}`, either `project-number` or `project-id` can be provided. + * For `{instance}`, either `instance-name`, `instance-id`, or `-` can be + * provided. If '-' is provided, the response will include + * OSPolicyAssignmentReports for all instances in the project/location. + * For `{assignment}`, either `assignment-id` or `-` can be provided. If '-' + * is provided, the response will include OSPolicyAssignmentReports for all + * OSPolicyAssignments in the project/location. + * Either {instance} or {assignment} must be `-`. + * For example: + * `projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/-/reports` + * returns all reports for the instance + * `projects/{project}/locations/{location}/instances/-/osPolicyAssignments/{assignment-id}/reports` + * returns all the reports for the given assignment across all instances. + * `projects/{project}/locations/{location}/instances/-/osPolicyAssignments/-/reports` + * returns all the reports for all assignments across all instances. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource name. + * Format: + * `projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}/reports` + * For `{project}`, either `project-number` or `project-id` can be provided. + * For `{instance}`, either `instance-name`, `instance-id`, or `-` can be + * provided. If '-' is provided, the response will include + * OSPolicyAssignmentReports for all instances in the project/location. + * For `{assignment}`, either `assignment-id` or `-` can be provided. If '-' + * is provided, the response will include OSPolicyAssignmentReports for all + * OSPolicyAssignments in the project/location. + * Either {instance} or {assignment} must be `-`. + * For example: + * `projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/-/reports` + * returns all reports for the instance + * `projects/{project}/locations/{location}/instances/-/osPolicyAssignments/{assignment-id}/reports` + * returns all the reports for the given assignment across all instances. + * `projects/{project}/locations/{location}/instances/-/osPolicyAssignments/-/reports` + * returns all the reports for all assignments across all instances. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The maximum number of results to return. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of results to return. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * If provided, this field specifies the criteria that must be met by the + * `OSPolicyAssignmentReport` API resource that is included in the response. + * + * Generated from protobuf field string filter = 3; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * If provided, this field specifies the criteria that must be met by the + * `OSPolicyAssignmentReport` API resource that is included in the response. + * + * Generated from protobuf field string filter = 3; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * A pagination token returned from a previous call to the + * `ListOSPolicyAssignmentReports` method that indicates where this listing + * should continue from. + * + * Generated from protobuf field string page_token = 4; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A pagination token returned from a previous call to the + * `ListOSPolicyAssignmentReports` method that indicates where this listing + * should continue from. + * + * Generated from protobuf field string page_token = 4; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListOSPolicyAssignmentReportsResponse.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListOSPolicyAssignmentReportsResponse.php new file mode 100644 index 000000000000..332138efc2c5 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListOSPolicyAssignmentReportsResponse.php @@ -0,0 +1,106 @@ +google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsResponse + */ +class ListOSPolicyAssignmentReportsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * List of OS policy assignment reports. + * + * Generated from protobuf field repeated .google.cloud.osconfig.v1.OSPolicyAssignmentReport os_policy_assignment_reports = 1; + */ + private $os_policy_assignment_reports; + /** + * The pagination token to retrieve the next page of OS policy assignment + * report objects. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\OsConfig\V1\OSPolicyAssignmentReport>|\Google\Protobuf\Internal\RepeatedField $os_policy_assignment_reports + * List of OS policy assignment reports. + * @type string $next_page_token + * The pagination token to retrieve the next page of OS policy assignment + * report objects. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\OsPolicyAssignmentReports::initOnce(); + parent::__construct($data); + } + + /** + * List of OS policy assignment reports. + * + * Generated from protobuf field repeated .google.cloud.osconfig.v1.OSPolicyAssignmentReport os_policy_assignment_reports = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getOsPolicyAssignmentReports() + { + return $this->os_policy_assignment_reports; + } + + /** + * List of OS policy assignment reports. + * + * Generated from protobuf field repeated .google.cloud.osconfig.v1.OSPolicyAssignmentReport os_policy_assignment_reports = 1; + * @param array<\Google\Cloud\OsConfig\V1\OSPolicyAssignmentReport>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setOsPolicyAssignmentReports($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\OsConfig\V1\OSPolicyAssignmentReport::class); + $this->os_policy_assignment_reports = $arr; + + return $this; + } + + /** + * The pagination token to retrieve the next page of OS policy assignment + * report objects. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * The pagination token to retrieve the next page of OS policy assignment + * report objects. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListOSPolicyAssignmentRevisionsRequest.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListOSPolicyAssignmentRevisionsRequest.php new file mode 100644 index 000000000000..f447e8890ede --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListOSPolicyAssignmentRevisionsRequest.php @@ -0,0 +1,157 @@ +google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsRequest + */ +class ListOSPolicyAssignmentRevisionsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the OS policy assignment to list revisions for. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * The maximum number of revisions to return. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A pagination token returned from a previous call to + * `ListOSPolicyAssignmentRevisions` that indicates where this listing should + * continue from. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $name Required. The name of the OS policy assignment to list revisions for. Please see + * {@see OsConfigZonalServiceClient::oSPolicyAssignmentName()} for help formatting this field. + * + * @return \Google\Cloud\OsConfig\V1\ListOSPolicyAssignmentRevisionsRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the OS policy assignment to list revisions for. + * @type int $page_size + * The maximum number of revisions to return. + * @type string $page_token + * A pagination token returned from a previous call to + * `ListOSPolicyAssignmentRevisions` that indicates where this listing should + * continue from. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\OsPolicyAssignments::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the OS policy assignment to list revisions for. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the OS policy assignment to list revisions for. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The maximum number of revisions to return. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of revisions to return. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A pagination token returned from a previous call to + * `ListOSPolicyAssignmentRevisions` that indicates where this listing should + * continue from. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A pagination token returned from a previous call to + * `ListOSPolicyAssignmentRevisions` that indicates where this listing should + * continue from. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListOSPolicyAssignmentRevisionsResponse.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListOSPolicyAssignmentRevisionsResponse.php new file mode 100644 index 000000000000..d51a61e1ad48 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListOSPolicyAssignmentRevisionsResponse.php @@ -0,0 +1,105 @@ +google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsResponse + */ +class ListOSPolicyAssignmentRevisionsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The OS policy assignment revisions + * + * Generated from protobuf field repeated .google.cloud.osconfig.v1.OSPolicyAssignment os_policy_assignments = 1; + */ + private $os_policy_assignments; + /** + * The pagination token to retrieve the next page of OS policy assignment + * revisions. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\OsConfig\V1\OSPolicyAssignment>|\Google\Protobuf\Internal\RepeatedField $os_policy_assignments + * The OS policy assignment revisions + * @type string $next_page_token + * The pagination token to retrieve the next page of OS policy assignment + * revisions. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\OsPolicyAssignments::initOnce(); + parent::__construct($data); + } + + /** + * The OS policy assignment revisions + * + * Generated from protobuf field repeated .google.cloud.osconfig.v1.OSPolicyAssignment os_policy_assignments = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getOsPolicyAssignments() + { + return $this->os_policy_assignments; + } + + /** + * The OS policy assignment revisions + * + * Generated from protobuf field repeated .google.cloud.osconfig.v1.OSPolicyAssignment os_policy_assignments = 1; + * @param array<\Google\Cloud\OsConfig\V1\OSPolicyAssignment>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setOsPolicyAssignments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\OsConfig\V1\OSPolicyAssignment::class); + $this->os_policy_assignments = $arr; + + return $this; + } + + /** + * The pagination token to retrieve the next page of OS policy assignment + * revisions. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * The pagination token to retrieve the next page of OS policy assignment + * revisions. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListOSPolicyAssignmentsRequest.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListOSPolicyAssignmentsRequest.php new file mode 100644 index 000000000000..acce0b60f54b --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListOSPolicyAssignmentsRequest.php @@ -0,0 +1,157 @@ +google.cloud.osconfig.v1.ListOSPolicyAssignmentsRequest + */ +class ListOSPolicyAssignmentsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource name. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of assignments to return. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A pagination token returned from a previous call to + * `ListOSPolicyAssignments` that indicates where this listing should continue + * from. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The parent resource name. Please see + * {@see OsConfigZonalServiceClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\OsConfig\V1\ListOSPolicyAssignmentsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource name. + * @type int $page_size + * The maximum number of assignments to return. + * @type string $page_token + * A pagination token returned from a previous call to + * `ListOSPolicyAssignments` that indicates where this listing should continue + * from. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\OsPolicyAssignments::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource name. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource name. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The maximum number of assignments to return. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of assignments to return. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A pagination token returned from a previous call to + * `ListOSPolicyAssignments` that indicates where this listing should continue + * from. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A pagination token returned from a previous call to + * `ListOSPolicyAssignments` that indicates where this listing should continue + * from. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListOSPolicyAssignmentsResponse.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListOSPolicyAssignmentsResponse.php new file mode 100644 index 000000000000..9b8390e7c544 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListOSPolicyAssignmentsResponse.php @@ -0,0 +1,101 @@ +google.cloud.osconfig.v1.ListOSPolicyAssignmentsResponse + */ +class ListOSPolicyAssignmentsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of assignments + * + * Generated from protobuf field repeated .google.cloud.osconfig.v1.OSPolicyAssignment os_policy_assignments = 1; + */ + private $os_policy_assignments; + /** + * The pagination token to retrieve the next page of OS policy assignments. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\OsConfig\V1\OSPolicyAssignment>|\Google\Protobuf\Internal\RepeatedField $os_policy_assignments + * The list of assignments + * @type string $next_page_token + * The pagination token to retrieve the next page of OS policy assignments. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\OsPolicyAssignments::initOnce(); + parent::__construct($data); + } + + /** + * The list of assignments + * + * Generated from protobuf field repeated .google.cloud.osconfig.v1.OSPolicyAssignment os_policy_assignments = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getOsPolicyAssignments() + { + return $this->os_policy_assignments; + } + + /** + * The list of assignments + * + * Generated from protobuf field repeated .google.cloud.osconfig.v1.OSPolicyAssignment os_policy_assignments = 1; + * @param array<\Google\Cloud\OsConfig\V1\OSPolicyAssignment>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setOsPolicyAssignments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\OsConfig\V1\OSPolicyAssignment::class); + $this->os_policy_assignments = $arr; + + return $this; + } + + /** + * The pagination token to retrieve the next page of OS policy assignments. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * The pagination token to retrieve the next page of OS policy assignments. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListPatchDeploymentsRequest.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListPatchDeploymentsRequest.php new file mode 100644 index 000000000000..7ad08e78f343 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListPatchDeploymentsRequest.php @@ -0,0 +1,161 @@ +google.cloud.osconfig.v1.ListPatchDeploymentsRequest + */ +class ListPatchDeploymentsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the parent in the form `projects/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of patch deployments to return. Default is + * 100. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A pagination token returned from a previous call to + * ListPatchDeployments that indicates where this listing should continue + * from. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The resource name of the parent in the form `projects/*`. Please see + * {@see OsConfigServiceClient::projectName()} for help formatting this field. + * + * @return \Google\Cloud\OsConfig\V1\ListPatchDeploymentsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name of the parent in the form `projects/*`. + * @type int $page_size + * Optional. The maximum number of patch deployments to return. Default is + * 100. + * @type string $page_token + * Optional. A pagination token returned from a previous call to + * ListPatchDeployments that indicates where this listing should continue + * from. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\PatchDeployments::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the parent in the form `projects/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The resource name of the parent in the form `projects/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The maximum number of patch deployments to return. Default is + * 100. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of patch deployments to return. Default is + * 100. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. A pagination token returned from a previous call to + * ListPatchDeployments that indicates where this listing should continue + * from. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A pagination token returned from a previous call to + * ListPatchDeployments that indicates where this listing should continue + * from. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListPatchDeploymentsResponse.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListPatchDeploymentsResponse.php new file mode 100644 index 000000000000..e17162ddb232 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListPatchDeploymentsResponse.php @@ -0,0 +1,105 @@ +google.cloud.osconfig.v1.ListPatchDeploymentsResponse + */ +class ListPatchDeploymentsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of patch deployments. + * + * Generated from protobuf field repeated .google.cloud.osconfig.v1.PatchDeployment patch_deployments = 1; + */ + private $patch_deployments; + /** + * A pagination token that can be used to get the next page of patch + * deployments. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\OsConfig\V1\PatchDeployment>|\Google\Protobuf\Internal\RepeatedField $patch_deployments + * The list of patch deployments. + * @type string $next_page_token + * A pagination token that can be used to get the next page of patch + * deployments. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\PatchDeployments::initOnce(); + parent::__construct($data); + } + + /** + * The list of patch deployments. + * + * Generated from protobuf field repeated .google.cloud.osconfig.v1.PatchDeployment patch_deployments = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPatchDeployments() + { + return $this->patch_deployments; + } + + /** + * The list of patch deployments. + * + * Generated from protobuf field repeated .google.cloud.osconfig.v1.PatchDeployment patch_deployments = 1; + * @param array<\Google\Cloud\OsConfig\V1\PatchDeployment>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPatchDeployments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\OsConfig\V1\PatchDeployment::class); + $this->patch_deployments = $arr; + + return $this; + } + + /** + * A pagination token that can be used to get the next page of patch + * deployments. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A pagination token that can be used to get the next page of patch + * deployments. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListPatchJobInstanceDetailsRequest.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListPatchJobInstanceDetailsRequest.php new file mode 100644 index 000000000000..73a61e1c1ffc --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListPatchJobInstanceDetailsRequest.php @@ -0,0 +1,200 @@ +google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest + */ +class ListPatchJobInstanceDetailsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent for the instances are in the form of + * `projects/*/patchJobs/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of instance details records to return. Default is 100. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A pagination token returned from a previous call + * that indicates where this listing should continue from. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * A filter expression that filters results listed in the response. This + * field supports filtering results by instance zone, name, state, or + * `failure_reason`. + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + + /** + * @param string $parent Required. The parent for the instances are in the form of + * `projects/*/patchJobs/*`. Please see + * {@see OsConfigServiceClient::patchJobName()} for help formatting this field. + * + * @return \Google\Cloud\OsConfig\V1\ListPatchJobInstanceDetailsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent for the instances are in the form of + * `projects/*/patchJobs/*`. + * @type int $page_size + * The maximum number of instance details records to return. Default is 100. + * @type string $page_token + * A pagination token returned from a previous call + * that indicates where this listing should continue from. + * @type string $filter + * A filter expression that filters results listed in the response. This + * field supports filtering results by instance zone, name, state, or + * `failure_reason`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\PatchJobs::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent for the instances are in the form of + * `projects/*/patchJobs/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent for the instances are in the form of + * `projects/*/patchJobs/*`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The maximum number of instance details records to return. Default is 100. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of instance details records to return. Default is 100. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A pagination token returned from a previous call + * that indicates where this listing should continue from. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A pagination token returned from a previous call + * that indicates where this listing should continue from. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * A filter expression that filters results listed in the response. This + * field supports filtering results by instance zone, name, state, or + * `failure_reason`. + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * A filter expression that filters results listed in the response. This + * field supports filtering results by instance zone, name, state, or + * `failure_reason`. + * + * Generated from protobuf field string filter = 4; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListPatchJobInstanceDetailsResponse.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListPatchJobInstanceDetailsResponse.php new file mode 100644 index 000000000000..d6cb6f297b8e --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListPatchJobInstanceDetailsResponse.php @@ -0,0 +1,101 @@ +google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse + */ +class ListPatchJobInstanceDetailsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of instance status. + * + * Generated from protobuf field repeated .google.cloud.osconfig.v1.PatchJobInstanceDetails patch_job_instance_details = 1; + */ + private $patch_job_instance_details; + /** + * A pagination token that can be used to get the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\OsConfig\V1\PatchJobInstanceDetails>|\Google\Protobuf\Internal\RepeatedField $patch_job_instance_details + * A list of instance status. + * @type string $next_page_token + * A pagination token that can be used to get the next page of results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\PatchJobs::initOnce(); + parent::__construct($data); + } + + /** + * A list of instance status. + * + * Generated from protobuf field repeated .google.cloud.osconfig.v1.PatchJobInstanceDetails patch_job_instance_details = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPatchJobInstanceDetails() + { + return $this->patch_job_instance_details; + } + + /** + * A list of instance status. + * + * Generated from protobuf field repeated .google.cloud.osconfig.v1.PatchJobInstanceDetails patch_job_instance_details = 1; + * @param array<\Google\Cloud\OsConfig\V1\PatchJobInstanceDetails>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPatchJobInstanceDetails($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\OsConfig\V1\PatchJobInstanceDetails::class); + $this->patch_job_instance_details = $arr; + + return $this; + } + + /** + * A pagination token that can be used to get the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A pagination token that can be used to get the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListPatchJobsRequest.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListPatchJobsRequest.php new file mode 100644 index 000000000000..768d9cfd5652 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListPatchJobsRequest.php @@ -0,0 +1,195 @@ +google.cloud.osconfig.v1.ListPatchJobsRequest + */ +class ListPatchJobsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. In the form of `projects/*` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of instance status to return. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A pagination token returned from a previous call + * that indicates where this listing should continue from. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * If provided, this field specifies the criteria that must be met by patch + * jobs to be included in the response. + * Currently, filtering is only available on the patch_deployment field. + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + + /** + * @param string $parent Required. In the form of `projects/*` + * Please see {@see OsConfigServiceClient::projectName()} for help formatting this field. + * + * @return \Google\Cloud\OsConfig\V1\ListPatchJobsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. In the form of `projects/*` + * @type int $page_size + * The maximum number of instance status to return. + * @type string $page_token + * A pagination token returned from a previous call + * that indicates where this listing should continue from. + * @type string $filter + * If provided, this field specifies the criteria that must be met by patch + * jobs to be included in the response. + * Currently, filtering is only available on the patch_deployment field. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\PatchJobs::initOnce(); + parent::__construct($data); + } + + /** + * Required. In the form of `projects/*` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. In the form of `projects/*` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The maximum number of instance status to return. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of instance status to return. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A pagination token returned from a previous call + * that indicates where this listing should continue from. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A pagination token returned from a previous call + * that indicates where this listing should continue from. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * If provided, this field specifies the criteria that must be met by patch + * jobs to be included in the response. + * Currently, filtering is only available on the patch_deployment field. + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * If provided, this field specifies the criteria that must be met by patch + * jobs to be included in the response. + * Currently, filtering is only available on the patch_deployment field. + * + * Generated from protobuf field string filter = 4; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListPatchJobsResponse.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListPatchJobsResponse.php new file mode 100644 index 000000000000..481d0a0b4932 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListPatchJobsResponse.php @@ -0,0 +1,101 @@ +google.cloud.osconfig.v1.ListPatchJobsResponse + */ +class ListPatchJobsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of patch jobs. + * + * Generated from protobuf field repeated .google.cloud.osconfig.v1.PatchJob patch_jobs = 1; + */ + private $patch_jobs; + /** + * A pagination token that can be used to get the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\OsConfig\V1\PatchJob>|\Google\Protobuf\Internal\RepeatedField $patch_jobs + * The list of patch jobs. + * @type string $next_page_token + * A pagination token that can be used to get the next page of results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\PatchJobs::initOnce(); + parent::__construct($data); + } + + /** + * The list of patch jobs. + * + * Generated from protobuf field repeated .google.cloud.osconfig.v1.PatchJob patch_jobs = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPatchJobs() + { + return $this->patch_jobs; + } + + /** + * The list of patch jobs. + * + * Generated from protobuf field repeated .google.cloud.osconfig.v1.PatchJob patch_jobs = 1; + * @param array<\Google\Cloud\OsConfig\V1\PatchJob>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPatchJobs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\OsConfig\V1\PatchJob::class); + $this->patch_jobs = $arr; + + return $this; + } + + /** + * A pagination token that can be used to get the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A pagination token that can be used to get the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListVulnerabilityReportsRequest.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListVulnerabilityReportsRequest.php new file mode 100644 index 000000000000..aa81a0eb353d --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListVulnerabilityReportsRequest.php @@ -0,0 +1,208 @@ +google.cloud.osconfig.v1.ListVulnerabilityReportsRequest + */ +class ListVulnerabilityReportsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource name. + * Format: `projects/{project}/locations/{location}/instances/-` + * For `{project}`, either `project-number` or `project-id` can be provided. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of results to return. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A pagination token returned from a previous call to + * `ListVulnerabilityReports` that indicates where this listing + * should continue from. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * If provided, this field specifies the criteria that must be met by a + * `vulnerabilityReport` API resource to be included in the response. + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + + /** + * @param string $parent Required. The parent resource name. + * + * Format: `projects/{project}/locations/{location}/instances/-` + * + * For `{project}`, either `project-number` or `project-id` can be provided. Please see + * {@see OsConfigZonalServiceClient::instanceName()} for help formatting this field. + * + * @return \Google\Cloud\OsConfig\V1\ListVulnerabilityReportsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource name. + * Format: `projects/{project}/locations/{location}/instances/-` + * For `{project}`, either `project-number` or `project-id` can be provided. + * @type int $page_size + * The maximum number of results to return. + * @type string $page_token + * A pagination token returned from a previous call to + * `ListVulnerabilityReports` that indicates where this listing + * should continue from. + * @type string $filter + * If provided, this field specifies the criteria that must be met by a + * `vulnerabilityReport` API resource to be included in the response. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\Vulnerability::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource name. + * Format: `projects/{project}/locations/{location}/instances/-` + * For `{project}`, either `project-number` or `project-id` can be provided. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource name. + * Format: `projects/{project}/locations/{location}/instances/-` + * For `{project}`, either `project-number` or `project-id` can be provided. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The maximum number of results to return. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of results to return. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A pagination token returned from a previous call to + * `ListVulnerabilityReports` that indicates where this listing + * should continue from. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A pagination token returned from a previous call to + * `ListVulnerabilityReports` that indicates where this listing + * should continue from. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * If provided, this field specifies the criteria that must be met by a + * `vulnerabilityReport` API resource to be included in the response. + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * If provided, this field specifies the criteria that must be met by a + * `vulnerabilityReport` API resource to be included in the response. + * + * Generated from protobuf field string filter = 4; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListVulnerabilityReportsResponse.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListVulnerabilityReportsResponse.php new file mode 100644 index 000000000000..eea4419f54bc --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListVulnerabilityReportsResponse.php @@ -0,0 +1,106 @@ +google.cloud.osconfig.v1.ListVulnerabilityReportsResponse + */ +class ListVulnerabilityReportsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * List of vulnerabilityReport objects. + * + * Generated from protobuf field repeated .google.cloud.osconfig.v1.VulnerabilityReport vulnerability_reports = 1; + */ + private $vulnerability_reports; + /** + * The pagination token to retrieve the next page of vulnerabilityReports + * object. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\OsConfig\V1\VulnerabilityReport>|\Google\Protobuf\Internal\RepeatedField $vulnerability_reports + * List of vulnerabilityReport objects. + * @type string $next_page_token + * The pagination token to retrieve the next page of vulnerabilityReports + * object. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\Vulnerability::initOnce(); + parent::__construct($data); + } + + /** + * List of vulnerabilityReport objects. + * + * Generated from protobuf field repeated .google.cloud.osconfig.v1.VulnerabilityReport vulnerability_reports = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getVulnerabilityReports() + { + return $this->vulnerability_reports; + } + + /** + * List of vulnerabilityReport objects. + * + * Generated from protobuf field repeated .google.cloud.osconfig.v1.VulnerabilityReport vulnerability_reports = 1; + * @param array<\Google\Cloud\OsConfig\V1\VulnerabilityReport>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setVulnerabilityReports($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\OsConfig\V1\VulnerabilityReport::class); + $this->vulnerability_reports = $arr; + + return $this; + } + + /** + * The pagination token to retrieve the next page of vulnerabilityReports + * object. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * The pagination token to retrieve the next page of vulnerabilityReports + * object. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/MonthlySchedule.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/MonthlySchedule.php new file mode 100644 index 000000000000..eabc69adbd0f --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/MonthlySchedule.php @@ -0,0 +1,118 @@ +google.cloud.osconfig.v1.MonthlySchedule + */ +class MonthlySchedule extends \Google\Protobuf\Internal\Message +{ + protected $day_of_month; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\OsConfig\V1\WeekDayOfMonth $week_day_of_month + * Required. Week day in a month. + * @type int $month_day + * Required. One day of the month. 1-31 indicates the 1st to the 31st day. + * -1 indicates the last day of the month. Months without the target day + * will be skipped. For example, a schedule to run "every month on the 31st" + * will not run in February, April, June, etc. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\PatchDeployments::initOnce(); + parent::__construct($data); + } + + /** + * Required. Week day in a month. + * + * Generated from protobuf field .google.cloud.osconfig.v1.WeekDayOfMonth week_day_of_month = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\OsConfig\V1\WeekDayOfMonth|null + */ + public function getWeekDayOfMonth() + { + return $this->readOneof(1); + } + + public function hasWeekDayOfMonth() + { + return $this->hasOneof(1); + } + + /** + * Required. Week day in a month. + * + * Generated from protobuf field .google.cloud.osconfig.v1.WeekDayOfMonth week_day_of_month = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\OsConfig\V1\WeekDayOfMonth $var + * @return $this + */ + public function setWeekDayOfMonth($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\WeekDayOfMonth::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Required. One day of the month. 1-31 indicates the 1st to the 31st day. + * -1 indicates the last day of the month. Months without the target day + * will be skipped. For example, a schedule to run "every month on the 31st" + * will not run in February, April, June, etc. + * + * Generated from protobuf field int32 month_day = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getMonthDay() + { + return $this->readOneof(2); + } + + public function hasMonthDay() + { + return $this->hasOneof(2); + } + + /** + * Required. One day of the month. 1-31 indicates the 1st to the 31st day. + * -1 indicates the last day of the month. Months without the target day + * will be skipped. For example, a schedule to run "every month on the 31st" + * will not run in February, April, June, etc. + * + * Generated from protobuf field int32 month_day = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setMonthDay($var) + { + GPBUtil::checkInt32($var); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getDayOfMonth() + { + return $this->whichOneof("day_of_month"); + } + +} + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy.php new file mode 100644 index 000000000000..2c98bbe13e28 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy.php @@ -0,0 +1,263 @@ +google.cloud.osconfig.v1.OSPolicy + */ +class OSPolicy extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The id of the OS policy with the following restrictions: + * * Must contain only lowercase letters, numbers, and hyphens. + * * Must start with a letter. + * * Must be between 1-63 characters. + * * Must end with a number or a letter. + * * Must be unique within the assignment. + * + * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $id = ''; + /** + * Policy description. + * Length of the description is limited to 1024 characters. + * + * Generated from protobuf field string description = 2; + */ + protected $description = ''; + /** + * Required. Policy mode + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Mode mode = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $mode = 0; + /** + * Required. List of resource groups for the policy. + * For a particular VM, resource groups are evaluated in the order specified + * and the first resource group that is applicable is selected and the rest + * are ignored. + * If none of the resource groups are applicable for a VM, the VM is + * considered to be non-compliant w.r.t this policy. This behavior can be + * toggled by the flag `allow_no_resource_group_match` + * + * Generated from protobuf field repeated .google.cloud.osconfig.v1.OSPolicy.ResourceGroup resource_groups = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + private $resource_groups; + /** + * This flag determines the OS policy compliance status when none of the + * resource groups within the policy are applicable for a VM. Set this value + * to `true` if the policy needs to be reported as compliant even if the + * policy has nothing to validate or enforce. + * + * Generated from protobuf field bool allow_no_resource_group_match = 5; + */ + protected $allow_no_resource_group_match = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $id + * Required. The id of the OS policy with the following restrictions: + * * Must contain only lowercase letters, numbers, and hyphens. + * * Must start with a letter. + * * Must be between 1-63 characters. + * * Must end with a number or a letter. + * * Must be unique within the assignment. + * @type string $description + * Policy description. + * Length of the description is limited to 1024 characters. + * @type int $mode + * Required. Policy mode + * @type array<\Google\Cloud\OsConfig\V1\OSPolicy\ResourceGroup>|\Google\Protobuf\Internal\RepeatedField $resource_groups + * Required. List of resource groups for the policy. + * For a particular VM, resource groups are evaluated in the order specified + * and the first resource group that is applicable is selected and the rest + * are ignored. + * If none of the resource groups are applicable for a VM, the VM is + * considered to be non-compliant w.r.t this policy. This behavior can be + * toggled by the flag `allow_no_resource_group_match` + * @type bool $allow_no_resource_group_match + * This flag determines the OS policy compliance status when none of the + * resource groups within the policy are applicable for a VM. Set this value + * to `true` if the policy needs to be reported as compliant even if the + * policy has nothing to validate or enforce. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\OsPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. The id of the OS policy with the following restrictions: + * * Must contain only lowercase letters, numbers, and hyphens. + * * Must start with a letter. + * * Must be between 1-63 characters. + * * Must end with a number or a letter. + * * Must be unique within the assignment. + * + * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * Required. The id of the OS policy with the following restrictions: + * * Must contain only lowercase letters, numbers, and hyphens. + * * Must start with a letter. + * * Must be between 1-63 characters. + * * Must end with a number or a letter. + * * Must be unique within the assignment. + * + * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkString($var, True); + $this->id = $var; + + return $this; + } + + /** + * Policy description. + * Length of the description is limited to 1024 characters. + * + * Generated from protobuf field string description = 2; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Policy description. + * Length of the description is limited to 1024 characters. + * + * Generated from protobuf field string description = 2; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Required. Policy mode + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Mode mode = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getMode() + { + return $this->mode; + } + + /** + * Required. Policy mode + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Mode mode = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\OsConfig\V1\OSPolicy\Mode::class); + $this->mode = $var; + + return $this; + } + + /** + * Required. List of resource groups for the policy. + * For a particular VM, resource groups are evaluated in the order specified + * and the first resource group that is applicable is selected and the rest + * are ignored. + * If none of the resource groups are applicable for a VM, the VM is + * considered to be non-compliant w.r.t this policy. This behavior can be + * toggled by the flag `allow_no_resource_group_match` + * + * Generated from protobuf field repeated .google.cloud.osconfig.v1.OSPolicy.ResourceGroup resource_groups = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getResourceGroups() + { + return $this->resource_groups; + } + + /** + * Required. List of resource groups for the policy. + * For a particular VM, resource groups are evaluated in the order specified + * and the first resource group that is applicable is selected and the rest + * are ignored. + * If none of the resource groups are applicable for a VM, the VM is + * considered to be non-compliant w.r.t this policy. This behavior can be + * toggled by the flag `allow_no_resource_group_match` + * + * Generated from protobuf field repeated .google.cloud.osconfig.v1.OSPolicy.ResourceGroup resource_groups = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Cloud\OsConfig\V1\OSPolicy\ResourceGroup>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setResourceGroups($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\OsConfig\V1\OSPolicy\ResourceGroup::class); + $this->resource_groups = $arr; + + return $this; + } + + /** + * This flag determines the OS policy compliance status when none of the + * resource groups within the policy are applicable for a VM. Set this value + * to `true` if the policy needs to be reported as compliant even if the + * policy has nothing to validate or enforce. + * + * Generated from protobuf field bool allow_no_resource_group_match = 5; + * @return bool + */ + public function getAllowNoResourceGroupMatch() + { + return $this->allow_no_resource_group_match; + } + + /** + * This flag determines the OS policy compliance status when none of the + * resource groups within the policy are applicable for a VM. Set this value + * to `true` if the policy needs to be reported as compliant even if the + * policy has nothing to validate or enforce. + * + * Generated from protobuf field bool allow_no_resource_group_match = 5; + * @param bool $var + * @return $this + */ + public function setAllowNoResourceGroupMatch($var) + { + GPBUtil::checkBool($var); + $this->allow_no_resource_group_match = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/InventoryFilter.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/InventoryFilter.php new file mode 100644 index 000000000000..3e129a0b56bb --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/InventoryFilter.php @@ -0,0 +1,120 @@ +google.cloud.osconfig.v1.OSPolicy.InventoryFilter + */ +class InventoryFilter extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The OS short name + * + * Generated from protobuf field string os_short_name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $os_short_name = ''; + /** + * The OS version + * Prefix matches are supported if asterisk(*) is provided as the + * last character. For example, to match all versions with a major + * version of `7`, specify the following value for this field `7.*` + * An empty string matches all OS versions. + * + * Generated from protobuf field string os_version = 2; + */ + protected $os_version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $os_short_name + * Required. The OS short name + * @type string $os_version + * The OS version + * Prefix matches are supported if asterisk(*) is provided as the + * last character. For example, to match all versions with a major + * version of `7`, specify the following value for this field `7.*` + * An empty string matches all OS versions. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\OsPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. The OS short name + * + * Generated from protobuf field string os_short_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getOsShortName() + { + return $this->os_short_name; + } + + /** + * Required. The OS short name + * + * Generated from protobuf field string os_short_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setOsShortName($var) + { + GPBUtil::checkString($var, True); + $this->os_short_name = $var; + + return $this; + } + + /** + * The OS version + * Prefix matches are supported if asterisk(*) is provided as the + * last character. For example, to match all versions with a major + * version of `7`, specify the following value for this field `7.*` + * An empty string matches all OS versions. + * + * Generated from protobuf field string os_version = 2; + * @return string + */ + public function getOsVersion() + { + return $this->os_version; + } + + /** + * The OS version + * Prefix matches are supported if asterisk(*) is provided as the + * last character. For example, to match all versions with a major + * version of `7`, specify the following value for this field `7.*` + * An empty string matches all OS versions. + * + * Generated from protobuf field string os_version = 2; + * @param string $var + * @return $this + */ + public function setOsVersion($var) + { + GPBUtil::checkString($var, True); + $this->os_version = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(InventoryFilter::class, \Google\Cloud\OsConfig\V1\OSPolicy_InventoryFilter::class); + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Mode.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Mode.php new file mode 100644 index 000000000000..98985cc0839d --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Mode.php @@ -0,0 +1,67 @@ +google.cloud.osconfig.v1.OSPolicy.Mode + */ +class Mode +{ + /** + * Invalid mode + * + * Generated from protobuf enum MODE_UNSPECIFIED = 0; + */ + const MODE_UNSPECIFIED = 0; + /** + * This mode checks if the configuration resources in the policy are in + * their desired state. No actions are performed if they are not in the + * desired state. This mode is used for reporting purposes. + * + * Generated from protobuf enum VALIDATION = 1; + */ + const VALIDATION = 1; + /** + * This mode checks if the configuration resources in the policy are in + * their desired state, and if not, enforces the desired state. + * + * Generated from protobuf enum ENFORCEMENT = 2; + */ + const ENFORCEMENT = 2; + + private static $valueToName = [ + self::MODE_UNSPECIFIED => 'MODE_UNSPECIFIED', + self::VALIDATION => 'VALIDATION', + self::ENFORCEMENT => 'ENFORCEMENT', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Mode::class, \Google\Cloud\OsConfig\V1\OSPolicy_Mode::class); + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource.php new file mode 100644 index 000000000000..48d1375aec6c --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource.php @@ -0,0 +1,235 @@ +google.cloud.osconfig.v1.OSPolicy.Resource + */ +class Resource extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The id of the resource with the following restrictions: + * * Must contain only lowercase letters, numbers, and hyphens. + * * Must start with a letter. + * * Must be between 1-63 characters. + * * Must end with a number or a letter. + * * Must be unique within the OS policy. + * + * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $id = ''; + protected $resource_type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $id + * Required. The id of the resource with the following restrictions: + * * Must contain only lowercase letters, numbers, and hyphens. + * * Must start with a letter. + * * Must be between 1-63 characters. + * * Must end with a number or a letter. + * * Must be unique within the OS policy. + * @type \Google\Cloud\OsConfig\V1\OSPolicy\Resource\PackageResource $pkg + * Package resource + * @type \Google\Cloud\OsConfig\V1\OSPolicy\Resource\RepositoryResource $repository + * Package repository resource + * @type \Google\Cloud\OsConfig\V1\OSPolicy\Resource\ExecResource $exec + * Exec resource + * @type \Google\Cloud\OsConfig\V1\OSPolicy\Resource\FileResource $file + * File resource + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\OsPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. The id of the resource with the following restrictions: + * * Must contain only lowercase letters, numbers, and hyphens. + * * Must start with a letter. + * * Must be between 1-63 characters. + * * Must end with a number or a letter. + * * Must be unique within the OS policy. + * + * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * Required. The id of the resource with the following restrictions: + * * Must contain only lowercase letters, numbers, and hyphens. + * * Must start with a letter. + * * Must be between 1-63 characters. + * * Must end with a number or a letter. + * * Must be unique within the OS policy. + * + * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkString($var, True); + $this->id = $var; + + return $this; + } + + /** + * Package resource + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource pkg = 2; + * @return \Google\Cloud\OsConfig\V1\OSPolicy\Resource\PackageResource|null + */ + public function getPkg() + { + return $this->readOneof(2); + } + + public function hasPkg() + { + return $this->hasOneof(2); + } + + /** + * Package resource + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource pkg = 2; + * @param \Google\Cloud\OsConfig\V1\OSPolicy\Resource\PackageResource $var + * @return $this + */ + public function setPkg($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\OSPolicy\Resource\PackageResource::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Package repository resource + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource repository = 3; + * @return \Google\Cloud\OsConfig\V1\OSPolicy\Resource\RepositoryResource|null + */ + public function getRepository() + { + return $this->readOneof(3); + } + + public function hasRepository() + { + return $this->hasOneof(3); + } + + /** + * Package repository resource + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource repository = 3; + * @param \Google\Cloud\OsConfig\V1\OSPolicy\Resource\RepositoryResource $var + * @return $this + */ + public function setRepository($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\OSPolicy\Resource\RepositoryResource::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Exec resource + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource exec = 4; + * @return \Google\Cloud\OsConfig\V1\OSPolicy\Resource\ExecResource|null + */ + public function getExec() + { + return $this->readOneof(4); + } + + public function hasExec() + { + return $this->hasOneof(4); + } + + /** + * Exec resource + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource exec = 4; + * @param \Google\Cloud\OsConfig\V1\OSPolicy\Resource\ExecResource $var + * @return $this + */ + public function setExec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\OSPolicy\Resource\ExecResource::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * File resource + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.FileResource file = 5; + * @return \Google\Cloud\OsConfig\V1\OSPolicy\Resource\FileResource|null + */ + public function getFile() + { + return $this->readOneof(5); + } + + public function hasFile() + { + return $this->hasOneof(5); + } + + /** + * File resource + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.FileResource file = 5; + * @param \Google\Cloud\OsConfig\V1\OSPolicy\Resource\FileResource $var + * @return $this + */ + public function setFile($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\OSPolicy\Resource\FileResource::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * @return string + */ + public function getResourceType() + { + return $this->whichOneof("resource_type"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Resource::class, \Google\Cloud\OsConfig\V1\OSPolicy_Resource::class); + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/ExecResource.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/ExecResource.php new file mode 100644 index 000000000000..306c2035cad5 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/ExecResource.php @@ -0,0 +1,165 @@ +google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource + */ +class ExecResource extends \Google\Protobuf\Internal\Message +{ + /** + * Required. What to run to validate this resource is in the desired + * state. An exit code of 100 indicates "in desired state", and exit code + * of 101 indicates "not in desired state". Any other exit code indicates + * a failure running validate. + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.Exec validate = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $validate = null; + /** + * What to run to bring this resource into the desired state. + * An exit code of 100 indicates "success", any other exit code indicates + * a failure running enforce. + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.Exec enforce = 2; + */ + protected $enforce = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\OsConfig\V1\OSPolicy\Resource\ExecResource\Exec $validate + * Required. What to run to validate this resource is in the desired + * state. An exit code of 100 indicates "in desired state", and exit code + * of 101 indicates "not in desired state". Any other exit code indicates + * a failure running validate. + * @type \Google\Cloud\OsConfig\V1\OSPolicy\Resource\ExecResource\Exec $enforce + * What to run to bring this resource into the desired state. + * An exit code of 100 indicates "success", any other exit code indicates + * a failure running enforce. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\OsPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. What to run to validate this resource is in the desired + * state. An exit code of 100 indicates "in desired state", and exit code + * of 101 indicates "not in desired state". Any other exit code indicates + * a failure running validate. + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.Exec validate = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\OsConfig\V1\OSPolicy\Resource\ExecResource\Exec|null + */ + public function getValidate() + { + return $this->validate; + } + + public function hasValidate() + { + return isset($this->validate); + } + + public function clearValidate() + { + unset($this->validate); + } + + /** + * Required. What to run to validate this resource is in the desired + * state. An exit code of 100 indicates "in desired state", and exit code + * of 101 indicates "not in desired state". Any other exit code indicates + * a failure running validate. + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.Exec validate = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\OsConfig\V1\OSPolicy\Resource\ExecResource\Exec $var + * @return $this + */ + public function setValidate($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\OSPolicy\Resource\ExecResource\Exec::class); + $this->validate = $var; + + return $this; + } + + /** + * What to run to bring this resource into the desired state. + * An exit code of 100 indicates "success", any other exit code indicates + * a failure running enforce. + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.Exec enforce = 2; + * @return \Google\Cloud\OsConfig\V1\OSPolicy\Resource\ExecResource\Exec|null + */ + public function getEnforce() + { + return $this->enforce; + } + + public function hasEnforce() + { + return isset($this->enforce); + } + + public function clearEnforce() + { + unset($this->enforce); + } + + /** + * What to run to bring this resource into the desired state. + * An exit code of 100 indicates "success", any other exit code indicates + * a failure running enforce. + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.Exec enforce = 2; + * @param \Google\Cloud\OsConfig\V1\OSPolicy\Resource\ExecResource\Exec $var + * @return $this + */ + public function setEnforce($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\OSPolicy\Resource\ExecResource\Exec::class); + $this->enforce = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ExecResource::class, \Google\Cloud\OsConfig\V1\OSPolicy_Resource_ExecResource::class); + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/ExecResource/Exec.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/ExecResource/Exec.php new file mode 100644 index 000000000000..ab90ad3dc940 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/ExecResource/Exec.php @@ -0,0 +1,236 @@ +google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.Exec + */ +class Exec extends \Google\Protobuf\Internal\Message +{ + /** + * Optional arguments to pass to the source during execution. + * + * Generated from protobuf field repeated string args = 3; + */ + private $args; + /** + * Required. The script interpreter to use. + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.Exec.Interpreter interpreter = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $interpreter = 0; + /** + * Only recorded for enforce Exec. + * Path to an output file (that is created by this Exec) whose + * content will be recorded in OSPolicyResourceCompliance after a + * successful run. Absence or failure to read this file will result in + * this ExecResource being non-compliant. Output file size is limited to + * 100K bytes. + * + * Generated from protobuf field string output_file_path = 5; + */ + protected $output_file_path = ''; + protected $source; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\OsConfig\V1\OSPolicy\Resource\File $file + * A remote or local file. + * @type string $script + * An inline script. + * The size of the script is limited to 1024 characters. + * @type array|\Google\Protobuf\Internal\RepeatedField $args + * Optional arguments to pass to the source during execution. + * @type int $interpreter + * Required. The script interpreter to use. + * @type string $output_file_path + * Only recorded for enforce Exec. + * Path to an output file (that is created by this Exec) whose + * content will be recorded in OSPolicyResourceCompliance after a + * successful run. Absence or failure to read this file will result in + * this ExecResource being non-compliant. Output file size is limited to + * 100K bytes. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\OsPolicy::initOnce(); + parent::__construct($data); + } + + /** + * A remote or local file. + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.File file = 1; + * @return \Google\Cloud\OsConfig\V1\OSPolicy\Resource\File|null + */ + public function getFile() + { + return $this->readOneof(1); + } + + public function hasFile() + { + return $this->hasOneof(1); + } + + /** + * A remote or local file. + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.File file = 1; + * @param \Google\Cloud\OsConfig\V1\OSPolicy\Resource\File $var + * @return $this + */ + public function setFile($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\OSPolicy\Resource\File::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * An inline script. + * The size of the script is limited to 1024 characters. + * + * Generated from protobuf field string script = 2; + * @return string + */ + public function getScript() + { + return $this->readOneof(2); + } + + public function hasScript() + { + return $this->hasOneof(2); + } + + /** + * An inline script. + * The size of the script is limited to 1024 characters. + * + * Generated from protobuf field string script = 2; + * @param string $var + * @return $this + */ + public function setScript($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Optional arguments to pass to the source during execution. + * + * Generated from protobuf field repeated string args = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getArgs() + { + return $this->args; + } + + /** + * Optional arguments to pass to the source during execution. + * + * Generated from protobuf field repeated string args = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setArgs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->args = $arr; + + return $this; + } + + /** + * Required. The script interpreter to use. + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.Exec.Interpreter interpreter = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getInterpreter() + { + return $this->interpreter; + } + + /** + * Required. The script interpreter to use. + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.Exec.Interpreter interpreter = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setInterpreter($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\OsConfig\V1\OSPolicy\Resource\ExecResource\Exec\Interpreter::class); + $this->interpreter = $var; + + return $this; + } + + /** + * Only recorded for enforce Exec. + * Path to an output file (that is created by this Exec) whose + * content will be recorded in OSPolicyResourceCompliance after a + * successful run. Absence or failure to read this file will result in + * this ExecResource being non-compliant. Output file size is limited to + * 100K bytes. + * + * Generated from protobuf field string output_file_path = 5; + * @return string + */ + public function getOutputFilePath() + { + return $this->output_file_path; + } + + /** + * Only recorded for enforce Exec. + * Path to an output file (that is created by this Exec) whose + * content will be recorded in OSPolicyResourceCompliance after a + * successful run. Absence or failure to read this file will result in + * this ExecResource being non-compliant. Output file size is limited to + * 100K bytes. + * + * Generated from protobuf field string output_file_path = 5; + * @param string $var + * @return $this + */ + public function setOutputFilePath($var) + { + GPBUtil::checkString($var, True); + $this->output_file_path = $var; + + return $this; + } + + /** + * @return string + */ + public function getSource() + { + return $this->whichOneof("source"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Exec::class, \Google\Cloud\OsConfig\V1\OSPolicy_Resource_ExecResource_Exec::class); + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/ExecResource/Exec/Interpreter.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/ExecResource/Exec/Interpreter.php new file mode 100644 index 000000000000..24420319356e --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/ExecResource/Exec/Interpreter.php @@ -0,0 +1,76 @@ +google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.Exec.Interpreter + */ +class Interpreter +{ + /** + * Invalid value, the request will return validation error. + * + * Generated from protobuf enum INTERPRETER_UNSPECIFIED = 0; + */ + const INTERPRETER_UNSPECIFIED = 0; + /** + * If an interpreter is not specified, the + * source is executed directly. This execution, without an + * interpreter, only succeeds for executables and scripts that have shebang lines. + * + * Generated from protobuf enum NONE = 1; + */ + const NONE = 1; + /** + * Indicates that the script runs with `/bin/sh` on Linux and + * `cmd.exe` on Windows. + * + * Generated from protobuf enum SHELL = 2; + */ + const SHELL = 2; + /** + * Indicates that the script runs with PowerShell. + * + * Generated from protobuf enum POWERSHELL = 3; + */ + const POWERSHELL = 3; + + private static $valueToName = [ + self::INTERPRETER_UNSPECIFIED => 'INTERPRETER_UNSPECIFIED', + self::NONE => 'NONE', + self::SHELL => 'SHELL', + self::POWERSHELL => 'POWERSHELL', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Interpreter::class, \Google\Cloud\OsConfig\V1\OSPolicy_Resource_ExecResource_Exec_Interpreter::class); + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/File.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/File.php new file mode 100644 index 000000000000..d66bed31db32 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/File.php @@ -0,0 +1,190 @@ +google.cloud.osconfig.v1.OSPolicy.Resource.File + */ +class File extends \Google\Protobuf\Internal\Message +{ + /** + * Defaults to false. When false, files are subject to validations + * based on the file type: + * Remote: A checksum must be specified. + * Cloud Storage: An object generation number must be specified. + * + * Generated from protobuf field bool allow_insecure = 4; + */ + protected $allow_insecure = false; + protected $type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\OsConfig\V1\OSPolicy\Resource\File\Remote $remote + * A generic remote file. + * @type \Google\Cloud\OsConfig\V1\OSPolicy\Resource\File\Gcs $gcs + * A Cloud Storage object. + * @type string $local_path + * A local path within the VM to use. + * @type bool $allow_insecure + * Defaults to false. When false, files are subject to validations + * based on the file type: + * Remote: A checksum must be specified. + * Cloud Storage: An object generation number must be specified. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\OsPolicy::initOnce(); + parent::__construct($data); + } + + /** + * A generic remote file. + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.File.Remote remote = 1; + * @return \Google\Cloud\OsConfig\V1\OSPolicy\Resource\File\Remote|null + */ + public function getRemote() + { + return $this->readOneof(1); + } + + public function hasRemote() + { + return $this->hasOneof(1); + } + + /** + * A generic remote file. + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.File.Remote remote = 1; + * @param \Google\Cloud\OsConfig\V1\OSPolicy\Resource\File\Remote $var + * @return $this + */ + public function setRemote($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\OSPolicy\Resource\File\Remote::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * A Cloud Storage object. + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.File.Gcs gcs = 2; + * @return \Google\Cloud\OsConfig\V1\OSPolicy\Resource\File\Gcs|null + */ + public function getGcs() + { + return $this->readOneof(2); + } + + public function hasGcs() + { + return $this->hasOneof(2); + } + + /** + * A Cloud Storage object. + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.File.Gcs gcs = 2; + * @param \Google\Cloud\OsConfig\V1\OSPolicy\Resource\File\Gcs $var + * @return $this + */ + public function setGcs($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\OSPolicy\Resource\File\Gcs::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * A local path within the VM to use. + * + * Generated from protobuf field string local_path = 3; + * @return string + */ + public function getLocalPath() + { + return $this->readOneof(3); + } + + public function hasLocalPath() + { + return $this->hasOneof(3); + } + + /** + * A local path within the VM to use. + * + * Generated from protobuf field string local_path = 3; + * @param string $var + * @return $this + */ + public function setLocalPath($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Defaults to false. When false, files are subject to validations + * based on the file type: + * Remote: A checksum must be specified. + * Cloud Storage: An object generation number must be specified. + * + * Generated from protobuf field bool allow_insecure = 4; + * @return bool + */ + public function getAllowInsecure() + { + return $this->allow_insecure; + } + + /** + * Defaults to false. When false, files are subject to validations + * based on the file type: + * Remote: A checksum must be specified. + * Cloud Storage: An object generation number must be specified. + * + * Generated from protobuf field bool allow_insecure = 4; + * @param bool $var + * @return $this + */ + public function setAllowInsecure($var) + { + GPBUtil::checkBool($var); + $this->allow_insecure = $var; + + return $this; + } + + /** + * @return string + */ + public function getType() + { + return $this->whichOneof("type"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(File::class, \Google\Cloud\OsConfig\V1\OSPolicy_Resource_File::class); + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/File/Gcs.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/File/Gcs.php new file mode 100644 index 000000000000..e68947115368 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/File/Gcs.php @@ -0,0 +1,138 @@ +google.cloud.osconfig.v1.OSPolicy.Resource.File.Gcs + */ +class Gcs extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Bucket of the Cloud Storage object. + * + * Generated from protobuf field string bucket = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $bucket = ''; + /** + * Required. Name of the Cloud Storage object. + * + * Generated from protobuf field string object = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $object = ''; + /** + * Generation number of the Cloud Storage object. + * + * Generated from protobuf field int64 generation = 3; + */ + protected $generation = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $bucket + * Required. Bucket of the Cloud Storage object. + * @type string $object + * Required. Name of the Cloud Storage object. + * @type int|string $generation + * Generation number of the Cloud Storage object. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\OsPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. Bucket of the Cloud Storage object. + * + * Generated from protobuf field string bucket = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getBucket() + { + return $this->bucket; + } + + /** + * Required. Bucket of the Cloud Storage object. + * + * Generated from protobuf field string bucket = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setBucket($var) + { + GPBUtil::checkString($var, True); + $this->bucket = $var; + + return $this; + } + + /** + * Required. Name of the Cloud Storage object. + * + * Generated from protobuf field string object = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getObject() + { + return $this->object; + } + + /** + * Required. Name of the Cloud Storage object. + * + * Generated from protobuf field string object = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setObject($var) + { + GPBUtil::checkString($var, True); + $this->object = $var; + + return $this; + } + + /** + * Generation number of the Cloud Storage object. + * + * Generated from protobuf field int64 generation = 3; + * @return int|string + */ + public function getGeneration() + { + return $this->generation; + } + + /** + * Generation number of the Cloud Storage object. + * + * Generated from protobuf field int64 generation = 3; + * @param int|string $var + * @return $this + */ + public function setGeneration($var) + { + GPBUtil::checkInt64($var); + $this->generation = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Gcs::class, \Google\Cloud\OsConfig\V1\OSPolicy_Resource_File_Gcs::class); + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/File/Remote.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/File/Remote.php new file mode 100644 index 000000000000..d955b52e4a9d --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/File/Remote.php @@ -0,0 +1,108 @@ +google.cloud.osconfig.v1.OSPolicy.Resource.File.Remote + */ +class Remote extends \Google\Protobuf\Internal\Message +{ + /** + * Required. URI from which to fetch the object. It should contain both + * the protocol and path following the format `{protocol}://{location}`. + * + * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $uri = ''; + /** + * SHA256 checksum of the remote file. + * + * Generated from protobuf field string sha256_checksum = 2; + */ + protected $sha256_checksum = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $uri + * Required. URI from which to fetch the object. It should contain both + * the protocol and path following the format `{protocol}://{location}`. + * @type string $sha256_checksum + * SHA256 checksum of the remote file. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\OsPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. URI from which to fetch the object. It should contain both + * the protocol and path following the format `{protocol}://{location}`. + * + * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * Required. URI from which to fetch the object. It should contain both + * the protocol and path following the format `{protocol}://{location}`. + * + * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setUri($var) + { + GPBUtil::checkString($var, True); + $this->uri = $var; + + return $this; + } + + /** + * SHA256 checksum of the remote file. + * + * Generated from protobuf field string sha256_checksum = 2; + * @return string + */ + public function getSha256Checksum() + { + return $this->sha256_checksum; + } + + /** + * SHA256 checksum of the remote file. + * + * Generated from protobuf field string sha256_checksum = 2; + * @param string $var + * @return $this + */ + public function setSha256Checksum($var) + { + GPBUtil::checkString($var, True); + $this->sha256_checksum = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Remote::class, \Google\Cloud\OsConfig\V1\OSPolicy_Resource_File_Remote::class); + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/FileResource.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/FileResource.php new file mode 100644 index 000000000000..8fc050d3997f --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/FileResource.php @@ -0,0 +1,260 @@ +google.cloud.osconfig.v1.OSPolicy.Resource.FileResource + */ +class FileResource extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The absolute path of the file within the VM. + * + * Generated from protobuf field string path = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $path = ''; + /** + * Required. Desired state of the file. + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.FileResource.DesiredState state = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $state = 0; + /** + * Consists of three octal digits which represent, in + * order, the permissions of the owner, group, and other users for the + * file (similarly to the numeric mode used in the linux chmod + * utility). Each digit represents a three bit number with the 4 bit + * corresponding to the read permissions, the 2 bit corresponds to the + * write bit, and the one bit corresponds to the execute permission. + * Default behavior is 755. + * Below are some examples of permissions and their associated values: + * read, write, and execute: 7 + * read and execute: 5 + * read and write: 6 + * read only: 4 + * + * Generated from protobuf field string permissions = 5; + */ + protected $permissions = ''; + protected $source; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\OsConfig\V1\OSPolicy\Resource\File $file + * A remote or local source. + * @type string $content + * A a file with this content. + * The size of the content is limited to 1024 characters. + * @type string $path + * Required. The absolute path of the file within the VM. + * @type int $state + * Required. Desired state of the file. + * @type string $permissions + * Consists of three octal digits which represent, in + * order, the permissions of the owner, group, and other users for the + * file (similarly to the numeric mode used in the linux chmod + * utility). Each digit represents a three bit number with the 4 bit + * corresponding to the read permissions, the 2 bit corresponds to the + * write bit, and the one bit corresponds to the execute permission. + * Default behavior is 755. + * Below are some examples of permissions and their associated values: + * read, write, and execute: 7 + * read and execute: 5 + * read and write: 6 + * read only: 4 + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\OsPolicy::initOnce(); + parent::__construct($data); + } + + /** + * A remote or local source. + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.File file = 1; + * @return \Google\Cloud\OsConfig\V1\OSPolicy\Resource\File|null + */ + public function getFile() + { + return $this->readOneof(1); + } + + public function hasFile() + { + return $this->hasOneof(1); + } + + /** + * A remote or local source. + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.File file = 1; + * @param \Google\Cloud\OsConfig\V1\OSPolicy\Resource\File $var + * @return $this + */ + public function setFile($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\OSPolicy\Resource\File::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * A a file with this content. + * The size of the content is limited to 1024 characters. + * + * Generated from protobuf field string content = 2; + * @return string + */ + public function getContent() + { + return $this->readOneof(2); + } + + public function hasContent() + { + return $this->hasOneof(2); + } + + /** + * A a file with this content. + * The size of the content is limited to 1024 characters. + * + * Generated from protobuf field string content = 2; + * @param string $var + * @return $this + */ + public function setContent($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Required. The absolute path of the file within the VM. + * + * Generated from protobuf field string path = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPath() + { + return $this->path; + } + + /** + * Required. The absolute path of the file within the VM. + * + * Generated from protobuf field string path = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPath($var) + { + GPBUtil::checkString($var, True); + $this->path = $var; + + return $this; + } + + /** + * Required. Desired state of the file. + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.FileResource.DesiredState state = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Required. Desired state of the file. + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.FileResource.DesiredState state = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\OsConfig\V1\OSPolicy\Resource\FileResource\DesiredState::class); + $this->state = $var; + + return $this; + } + + /** + * Consists of three octal digits which represent, in + * order, the permissions of the owner, group, and other users for the + * file (similarly to the numeric mode used in the linux chmod + * utility). Each digit represents a three bit number with the 4 bit + * corresponding to the read permissions, the 2 bit corresponds to the + * write bit, and the one bit corresponds to the execute permission. + * Default behavior is 755. + * Below are some examples of permissions and their associated values: + * read, write, and execute: 7 + * read and execute: 5 + * read and write: 6 + * read only: 4 + * + * Generated from protobuf field string permissions = 5; + * @return string + */ + public function getPermissions() + { + return $this->permissions; + } + + /** + * Consists of three octal digits which represent, in + * order, the permissions of the owner, group, and other users for the + * file (similarly to the numeric mode used in the linux chmod + * utility). Each digit represents a three bit number with the 4 bit + * corresponding to the read permissions, the 2 bit corresponds to the + * write bit, and the one bit corresponds to the execute permission. + * Default behavior is 755. + * Below are some examples of permissions and their associated values: + * read, write, and execute: 7 + * read and execute: 5 + * read and write: 6 + * read only: 4 + * + * Generated from protobuf field string permissions = 5; + * @param string $var + * @return $this + */ + public function setPermissions($var) + { + GPBUtil::checkString($var, True); + $this->permissions = $var; + + return $this; + } + + /** + * @return string + */ + public function getSource() + { + return $this->whichOneof("source"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(FileResource::class, \Google\Cloud\OsConfig\V1\OSPolicy_Resource_FileResource::class); + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/FileResource/DesiredState.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/FileResource/DesiredState.php new file mode 100644 index 000000000000..6d49442e7819 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/FileResource/DesiredState.php @@ -0,0 +1,72 @@ +google.cloud.osconfig.v1.OSPolicy.Resource.FileResource.DesiredState + */ +class DesiredState +{ + /** + * Unspecified is invalid. + * + * Generated from protobuf enum DESIRED_STATE_UNSPECIFIED = 0; + */ + const DESIRED_STATE_UNSPECIFIED = 0; + /** + * Ensure file at path is present. + * + * Generated from protobuf enum PRESENT = 1; + */ + const PRESENT = 1; + /** + * Ensure file at path is absent. + * + * Generated from protobuf enum ABSENT = 2; + */ + const ABSENT = 2; + /** + * Ensure the contents of the file at path matches. If the file does + * not exist it will be created. + * + * Generated from protobuf enum CONTENTS_MATCH = 3; + */ + const CONTENTS_MATCH = 3; + + private static $valueToName = [ + self::DESIRED_STATE_UNSPECIFIED => 'DESIRED_STATE_UNSPECIFIED', + self::PRESENT => 'PRESENT', + self::ABSENT => 'ABSENT', + self::CONTENTS_MATCH => 'CONTENTS_MATCH', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(DesiredState::class, \Google\Cloud\OsConfig\V1\OSPolicy_Resource_FileResource_DesiredState::class); + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/PackageResource.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/PackageResource.php new file mode 100644 index 000000000000..297104e99c60 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/PackageResource.php @@ -0,0 +1,310 @@ +google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource + */ +class PackageResource extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The desired state the agent should maintain for this package. + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.DesiredState desired_state = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $desired_state = 0; + protected $system_package; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $desired_state + * Required. The desired state the agent should maintain for this package. + * @type \Google\Cloud\OsConfig\V1\OSPolicy\Resource\PackageResource\APT $apt + * A package managed by Apt. + * @type \Google\Cloud\OsConfig\V1\OSPolicy\Resource\PackageResource\Deb $deb + * A deb package file. + * @type \Google\Cloud\OsConfig\V1\OSPolicy\Resource\PackageResource\YUM $yum + * A package managed by YUM. + * @type \Google\Cloud\OsConfig\V1\OSPolicy\Resource\PackageResource\Zypper $zypper + * A package managed by Zypper. + * @type \Google\Cloud\OsConfig\V1\OSPolicy\Resource\PackageResource\RPM $rpm + * An rpm package file. + * @type \Google\Cloud\OsConfig\V1\OSPolicy\Resource\PackageResource\GooGet $googet + * A package managed by GooGet. + * @type \Google\Cloud\OsConfig\V1\OSPolicy\Resource\PackageResource\MSI $msi + * An MSI package. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\OsPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. The desired state the agent should maintain for this package. + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.DesiredState desired_state = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getDesiredState() + { + return $this->desired_state; + } + + /** + * Required. The desired state the agent should maintain for this package. + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.DesiredState desired_state = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setDesiredState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\OsConfig\V1\OSPolicy\Resource\PackageResource\DesiredState::class); + $this->desired_state = $var; + + return $this; + } + + /** + * A package managed by Apt. + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.APT apt = 2; + * @return \Google\Cloud\OsConfig\V1\OSPolicy\Resource\PackageResource\APT|null + */ + public function getApt() + { + return $this->readOneof(2); + } + + public function hasApt() + { + return $this->hasOneof(2); + } + + /** + * A package managed by Apt. + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.APT apt = 2; + * @param \Google\Cloud\OsConfig\V1\OSPolicy\Resource\PackageResource\APT $var + * @return $this + */ + public function setApt($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\OSPolicy\Resource\PackageResource\APT::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * A deb package file. + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.Deb deb = 3; + * @return \Google\Cloud\OsConfig\V1\OSPolicy\Resource\PackageResource\Deb|null + */ + public function getDeb() + { + return $this->readOneof(3); + } + + public function hasDeb() + { + return $this->hasOneof(3); + } + + /** + * A deb package file. + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.Deb deb = 3; + * @param \Google\Cloud\OsConfig\V1\OSPolicy\Resource\PackageResource\Deb $var + * @return $this + */ + public function setDeb($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\OSPolicy\Resource\PackageResource\Deb::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * A package managed by YUM. + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.YUM yum = 4; + * @return \Google\Cloud\OsConfig\V1\OSPolicy\Resource\PackageResource\YUM|null + */ + public function getYum() + { + return $this->readOneof(4); + } + + public function hasYum() + { + return $this->hasOneof(4); + } + + /** + * A package managed by YUM. + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.YUM yum = 4; + * @param \Google\Cloud\OsConfig\V1\OSPolicy\Resource\PackageResource\YUM $var + * @return $this + */ + public function setYum($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\OSPolicy\Resource\PackageResource\YUM::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * A package managed by Zypper. + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.Zypper zypper = 5; + * @return \Google\Cloud\OsConfig\V1\OSPolicy\Resource\PackageResource\Zypper|null + */ + public function getZypper() + { + return $this->readOneof(5); + } + + public function hasZypper() + { + return $this->hasOneof(5); + } + + /** + * A package managed by Zypper. + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.Zypper zypper = 5; + * @param \Google\Cloud\OsConfig\V1\OSPolicy\Resource\PackageResource\Zypper $var + * @return $this + */ + public function setZypper($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\OSPolicy\Resource\PackageResource\Zypper::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * An rpm package file. + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.RPM rpm = 6; + * @return \Google\Cloud\OsConfig\V1\OSPolicy\Resource\PackageResource\RPM|null + */ + public function getRpm() + { + return $this->readOneof(6); + } + + public function hasRpm() + { + return $this->hasOneof(6); + } + + /** + * An rpm package file. + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.RPM rpm = 6; + * @param \Google\Cloud\OsConfig\V1\OSPolicy\Resource\PackageResource\RPM $var + * @return $this + */ + public function setRpm($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\OSPolicy\Resource\PackageResource\RPM::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * A package managed by GooGet. + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.GooGet googet = 7; + * @return \Google\Cloud\OsConfig\V1\OSPolicy\Resource\PackageResource\GooGet|null + */ + public function getGooget() + { + return $this->readOneof(7); + } + + public function hasGooget() + { + return $this->hasOneof(7); + } + + /** + * A package managed by GooGet. + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.GooGet googet = 7; + * @param \Google\Cloud\OsConfig\V1\OSPolicy\Resource\PackageResource\GooGet $var + * @return $this + */ + public function setGooget($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\OSPolicy\Resource\PackageResource\GooGet::class); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * An MSI package. + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.MSI msi = 8; + * @return \Google\Cloud\OsConfig\V1\OSPolicy\Resource\PackageResource\MSI|null + */ + public function getMsi() + { + return $this->readOneof(8); + } + + public function hasMsi() + { + return $this->hasOneof(8); + } + + /** + * An MSI package. + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.MSI msi = 8; + * @param \Google\Cloud\OsConfig\V1\OSPolicy\Resource\PackageResource\MSI $var + * @return $this + */ + public function setMsi($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\OSPolicy\Resource\PackageResource\MSI::class); + $this->writeOneof(8, $var); + + return $this; + } + + /** + * @return string + */ + public function getSystemPackage() + { + return $this->whichOneof("system_package"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(PackageResource::class, \Google\Cloud\OsConfig\V1\OSPolicy_Resource_PackageResource::class); + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/PackageResource/APT.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/PackageResource/APT.php new file mode 100644 index 000000000000..502ce367c6e3 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/PackageResource/APT.php @@ -0,0 +1,72 @@ +google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.APT + */ +class APT extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Package name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Package name. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\OsPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. Package name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Package name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(APT::class, \Google\Cloud\OsConfig\V1\OSPolicy_Resource_PackageResource_APT::class); + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/PackageResource/Deb.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/PackageResource/Deb.php new file mode 100644 index 000000000000..658389864d0f --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/PackageResource/Deb.php @@ -0,0 +1,126 @@ +google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.Deb + */ +class Deb extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A deb package. + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.File source = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $source = null; + /** + * Whether dependencies should also be installed. + * - install when false: `dpkg -i package` + * - install when true: `apt-get update && apt-get -y install + * package.deb` + * + * Generated from protobuf field bool pull_deps = 2; + */ + protected $pull_deps = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\OsConfig\V1\OSPolicy\Resource\File $source + * Required. A deb package. + * @type bool $pull_deps + * Whether dependencies should also be installed. + * - install when false: `dpkg -i package` + * - install when true: `apt-get update && apt-get -y install + * package.deb` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\OsPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. A deb package. + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.File source = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\OsConfig\V1\OSPolicy\Resource\File|null + */ + public function getSource() + { + return $this->source; + } + + public function hasSource() + { + return isset($this->source); + } + + public function clearSource() + { + unset($this->source); + } + + /** + * Required. A deb package. + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.File source = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\OsConfig\V1\OSPolicy\Resource\File $var + * @return $this + */ + public function setSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\OSPolicy\Resource\File::class); + $this->source = $var; + + return $this; + } + + /** + * Whether dependencies should also be installed. + * - install when false: `dpkg -i package` + * - install when true: `apt-get update && apt-get -y install + * package.deb` + * + * Generated from protobuf field bool pull_deps = 2; + * @return bool + */ + public function getPullDeps() + { + return $this->pull_deps; + } + + /** + * Whether dependencies should also be installed. + * - install when false: `dpkg -i package` + * - install when true: `apt-get update && apt-get -y install + * package.deb` + * + * Generated from protobuf field bool pull_deps = 2; + * @param bool $var + * @return $this + */ + public function setPullDeps($var) + { + GPBUtil::checkBool($var); + $this->pull_deps = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Deb::class, \Google\Cloud\OsConfig\V1\OSPolicy_Resource_PackageResource_Deb::class); + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/PackageResource/DesiredState.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/PackageResource/DesiredState.php new file mode 100644 index 000000000000..63d1bbe9bbc5 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/PackageResource/DesiredState.php @@ -0,0 +1,65 @@ +google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.DesiredState + */ +class DesiredState +{ + /** + * Unspecified is invalid. + * + * Generated from protobuf enum DESIRED_STATE_UNSPECIFIED = 0; + */ + const DESIRED_STATE_UNSPECIFIED = 0; + /** + * Ensure that the package is installed. + * + * Generated from protobuf enum INSTALLED = 1; + */ + const INSTALLED = 1; + /** + * The agent ensures that the package is not installed and + * uninstalls it if detected. + * + * Generated from protobuf enum REMOVED = 2; + */ + const REMOVED = 2; + + private static $valueToName = [ + self::DESIRED_STATE_UNSPECIFIED => 'DESIRED_STATE_UNSPECIFIED', + self::INSTALLED => 'INSTALLED', + self::REMOVED => 'REMOVED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(DesiredState::class, \Google\Cloud\OsConfig\V1\OSPolicy_Resource_PackageResource_DesiredState::class); + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/PackageResource/GooGet.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/PackageResource/GooGet.php new file mode 100644 index 000000000000..5f6fe0353cce --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/PackageResource/GooGet.php @@ -0,0 +1,72 @@ +google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.GooGet + */ +class GooGet extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Package name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Package name. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\OsPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. Package name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Package name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(GooGet::class, \Google\Cloud\OsConfig\V1\OSPolicy_Resource_PackageResource_GooGet::class); + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/PackageResource/MSI.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/PackageResource/MSI.php new file mode 100644 index 000000000000..74941501dbc7 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/PackageResource/MSI.php @@ -0,0 +1,126 @@ +google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.MSI + */ +class MSI extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The MSI package. + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.File source = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $source = null; + /** + * Additional properties to use during installation. + * This should be in the format of Property=Setting. + * Appended to the defaults of `ACTION=INSTALL + * REBOOT=ReallySuppress`. + * + * Generated from protobuf field repeated string properties = 2; + */ + private $properties; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\OsConfig\V1\OSPolicy\Resource\File $source + * Required. The MSI package. + * @type array|\Google\Protobuf\Internal\RepeatedField $properties + * Additional properties to use during installation. + * This should be in the format of Property=Setting. + * Appended to the defaults of `ACTION=INSTALL + * REBOOT=ReallySuppress`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\OsPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. The MSI package. + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.File source = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\OsConfig\V1\OSPolicy\Resource\File|null + */ + public function getSource() + { + return $this->source; + } + + public function hasSource() + { + return isset($this->source); + } + + public function clearSource() + { + unset($this->source); + } + + /** + * Required. The MSI package. + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.File source = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\OsConfig\V1\OSPolicy\Resource\File $var + * @return $this + */ + public function setSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\OSPolicy\Resource\File::class); + $this->source = $var; + + return $this; + } + + /** + * Additional properties to use during installation. + * This should be in the format of Property=Setting. + * Appended to the defaults of `ACTION=INSTALL + * REBOOT=ReallySuppress`. + * + * Generated from protobuf field repeated string properties = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getProperties() + { + return $this->properties; + } + + /** + * Additional properties to use during installation. + * This should be in the format of Property=Setting. + * Appended to the defaults of `ACTION=INSTALL + * REBOOT=ReallySuppress`. + * + * Generated from protobuf field repeated string properties = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setProperties($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->properties = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(MSI::class, \Google\Cloud\OsConfig\V1\OSPolicy_Resource_PackageResource_MSI::class); + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/PackageResource/RPM.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/PackageResource/RPM.php new file mode 100644 index 000000000000..2ee83503a01b --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/PackageResource/RPM.php @@ -0,0 +1,126 @@ +google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.RPM + */ +class RPM extends \Google\Protobuf\Internal\Message +{ + /** + * Required. An rpm package. + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.File source = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $source = null; + /** + * Whether dependencies should also be installed. + * - install when false: `rpm --upgrade --replacepkgs package.rpm` + * - install when true: `yum -y install package.rpm` or + * `zypper -y install package.rpm` + * + * Generated from protobuf field bool pull_deps = 2; + */ + protected $pull_deps = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\OsConfig\V1\OSPolicy\Resource\File $source + * Required. An rpm package. + * @type bool $pull_deps + * Whether dependencies should also be installed. + * - install when false: `rpm --upgrade --replacepkgs package.rpm` + * - install when true: `yum -y install package.rpm` or + * `zypper -y install package.rpm` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\OsPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. An rpm package. + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.File source = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\OsConfig\V1\OSPolicy\Resource\File|null + */ + public function getSource() + { + return $this->source; + } + + public function hasSource() + { + return isset($this->source); + } + + public function clearSource() + { + unset($this->source); + } + + /** + * Required. An rpm package. + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.File source = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\OsConfig\V1\OSPolicy\Resource\File $var + * @return $this + */ + public function setSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\OSPolicy\Resource\File::class); + $this->source = $var; + + return $this; + } + + /** + * Whether dependencies should also be installed. + * - install when false: `rpm --upgrade --replacepkgs package.rpm` + * - install when true: `yum -y install package.rpm` or + * `zypper -y install package.rpm` + * + * Generated from protobuf field bool pull_deps = 2; + * @return bool + */ + public function getPullDeps() + { + return $this->pull_deps; + } + + /** + * Whether dependencies should also be installed. + * - install when false: `rpm --upgrade --replacepkgs package.rpm` + * - install when true: `yum -y install package.rpm` or + * `zypper -y install package.rpm` + * + * Generated from protobuf field bool pull_deps = 2; + * @param bool $var + * @return $this + */ + public function setPullDeps($var) + { + GPBUtil::checkBool($var); + $this->pull_deps = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(RPM::class, \Google\Cloud\OsConfig\V1\OSPolicy_Resource_PackageResource_RPM::class); + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/PackageResource/YUM.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/PackageResource/YUM.php new file mode 100644 index 000000000000..3a6368593dc7 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/PackageResource/YUM.php @@ -0,0 +1,72 @@ +google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.YUM + */ +class YUM extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Package name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Package name. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\OsPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. Package name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Package name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(YUM::class, \Google\Cloud\OsConfig\V1\OSPolicy_Resource_PackageResource_YUM::class); + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/PackageResource/Zypper.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/PackageResource/Zypper.php new file mode 100644 index 000000000000..4632c0902cca --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/PackageResource/Zypper.php @@ -0,0 +1,72 @@ +google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.Zypper + */ +class Zypper extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Package name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Package name. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\OsPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. Package name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Package name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Zypper::class, \Google\Cloud\OsConfig\V1\OSPolicy_Resource_PackageResource_Zypper::class); + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/RepositoryResource.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/RepositoryResource.php new file mode 100644 index 000000000000..84d4c5756091 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/RepositoryResource.php @@ -0,0 +1,177 @@ +google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource + */ +class RepositoryResource extends \Google\Protobuf\Internal\Message +{ + protected $repository; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\OsConfig\V1\OSPolicy\Resource\RepositoryResource\AptRepository $apt + * An Apt Repository. + * @type \Google\Cloud\OsConfig\V1\OSPolicy\Resource\RepositoryResource\YumRepository $yum + * A Yum Repository. + * @type \Google\Cloud\OsConfig\V1\OSPolicy\Resource\RepositoryResource\ZypperRepository $zypper + * A Zypper Repository. + * @type \Google\Cloud\OsConfig\V1\OSPolicy\Resource\RepositoryResource\GooRepository $goo + * A Goo Repository. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\OsPolicy::initOnce(); + parent::__construct($data); + } + + /** + * An Apt Repository. + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.AptRepository apt = 1; + * @return \Google\Cloud\OsConfig\V1\OSPolicy\Resource\RepositoryResource\AptRepository|null + */ + public function getApt() + { + return $this->readOneof(1); + } + + public function hasApt() + { + return $this->hasOneof(1); + } + + /** + * An Apt Repository. + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.AptRepository apt = 1; + * @param \Google\Cloud\OsConfig\V1\OSPolicy\Resource\RepositoryResource\AptRepository $var + * @return $this + */ + public function setApt($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\OSPolicy\Resource\RepositoryResource\AptRepository::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * A Yum Repository. + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.YumRepository yum = 2; + * @return \Google\Cloud\OsConfig\V1\OSPolicy\Resource\RepositoryResource\YumRepository|null + */ + public function getYum() + { + return $this->readOneof(2); + } + + public function hasYum() + { + return $this->hasOneof(2); + } + + /** + * A Yum Repository. + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.YumRepository yum = 2; + * @param \Google\Cloud\OsConfig\V1\OSPolicy\Resource\RepositoryResource\YumRepository $var + * @return $this + */ + public function setYum($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\OSPolicy\Resource\RepositoryResource\YumRepository::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * A Zypper Repository. + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.ZypperRepository zypper = 3; + * @return \Google\Cloud\OsConfig\V1\OSPolicy\Resource\RepositoryResource\ZypperRepository|null + */ + public function getZypper() + { + return $this->readOneof(3); + } + + public function hasZypper() + { + return $this->hasOneof(3); + } + + /** + * A Zypper Repository. + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.ZypperRepository zypper = 3; + * @param \Google\Cloud\OsConfig\V1\OSPolicy\Resource\RepositoryResource\ZypperRepository $var + * @return $this + */ + public function setZypper($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\OSPolicy\Resource\RepositoryResource\ZypperRepository::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * A Goo Repository. + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.GooRepository goo = 4; + * @return \Google\Cloud\OsConfig\V1\OSPolicy\Resource\RepositoryResource\GooRepository|null + */ + public function getGoo() + { + return $this->readOneof(4); + } + + public function hasGoo() + { + return $this->hasOneof(4); + } + + /** + * A Goo Repository. + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.GooRepository goo = 4; + * @param \Google\Cloud\OsConfig\V1\OSPolicy\Resource\RepositoryResource\GooRepository $var + * @return $this + */ + public function setGoo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\OSPolicy\Resource\RepositoryResource\GooRepository::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * @return string + */ + public function getRepository() + { + return $this->whichOneof("repository"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(RepositoryResource::class, \Google\Cloud\OsConfig\V1\OSPolicy_Resource_RepositoryResource::class); + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/RepositoryResource/AptRepository.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/RepositoryResource/AptRepository.php new file mode 100644 index 000000000000..6e82b088317a --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/RepositoryResource/AptRepository.php @@ -0,0 +1,216 @@ +google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.AptRepository + */ +class AptRepository extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Type of archive files in this repository. + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.AptRepository.ArchiveType archive_type = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $archive_type = 0; + /** + * Required. URI for this repository. + * + * Generated from protobuf field string uri = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $uri = ''; + /** + * Required. Distribution of this repository. + * + * Generated from protobuf field string distribution = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $distribution = ''; + /** + * Required. List of components for this repository. Must contain at + * least one item. + * + * Generated from protobuf field repeated string components = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + private $components; + /** + * URI of the key file for this repository. The agent maintains a + * keyring at `/etc/apt/trusted.gpg.d/osconfig_agent_managed.gpg`. + * + * Generated from protobuf field string gpg_key = 5; + */ + protected $gpg_key = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $archive_type + * Required. Type of archive files in this repository. + * @type string $uri + * Required. URI for this repository. + * @type string $distribution + * Required. Distribution of this repository. + * @type array|\Google\Protobuf\Internal\RepeatedField $components + * Required. List of components for this repository. Must contain at + * least one item. + * @type string $gpg_key + * URI of the key file for this repository. The agent maintains a + * keyring at `/etc/apt/trusted.gpg.d/osconfig_agent_managed.gpg`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\OsPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. Type of archive files in this repository. + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.AptRepository.ArchiveType archive_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getArchiveType() + { + return $this->archive_type; + } + + /** + * Required. Type of archive files in this repository. + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.AptRepository.ArchiveType archive_type = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setArchiveType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\OsConfig\V1\OSPolicy\Resource\RepositoryResource\AptRepository\ArchiveType::class); + $this->archive_type = $var; + + return $this; + } + + /** + * Required. URI for this repository. + * + * Generated from protobuf field string uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * Required. URI for this repository. + * + * Generated from protobuf field string uri = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setUri($var) + { + GPBUtil::checkString($var, True); + $this->uri = $var; + + return $this; + } + + /** + * Required. Distribution of this repository. + * + * Generated from protobuf field string distribution = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDistribution() + { + return $this->distribution; + } + + /** + * Required. Distribution of this repository. + * + * Generated from protobuf field string distribution = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDistribution($var) + { + GPBUtil::checkString($var, True); + $this->distribution = $var; + + return $this; + } + + /** + * Required. List of components for this repository. Must contain at + * least one item. + * + * Generated from protobuf field repeated string components = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getComponents() + { + return $this->components; + } + + /** + * Required. List of components for this repository. Must contain at + * least one item. + * + * Generated from protobuf field repeated string components = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setComponents($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->components = $arr; + + return $this; + } + + /** + * URI of the key file for this repository. The agent maintains a + * keyring at `/etc/apt/trusted.gpg.d/osconfig_agent_managed.gpg`. + * + * Generated from protobuf field string gpg_key = 5; + * @return string + */ + public function getGpgKey() + { + return $this->gpg_key; + } + + /** + * URI of the key file for this repository. The agent maintains a + * keyring at `/etc/apt/trusted.gpg.d/osconfig_agent_managed.gpg`. + * + * Generated from protobuf field string gpg_key = 5; + * @param string $var + * @return $this + */ + public function setGpgKey($var) + { + GPBUtil::checkString($var, True); + $this->gpg_key = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(AptRepository::class, \Google\Cloud\OsConfig\V1\OSPolicy_Resource_RepositoryResource_AptRepository::class); + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/RepositoryResource/AptRepository/ArchiveType.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/RepositoryResource/AptRepository/ArchiveType.php new file mode 100644 index 000000000000..19a12732314d --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/RepositoryResource/AptRepository/ArchiveType.php @@ -0,0 +1,64 @@ +google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.AptRepository.ArchiveType + */ +class ArchiveType +{ + /** + * Unspecified is invalid. + * + * Generated from protobuf enum ARCHIVE_TYPE_UNSPECIFIED = 0; + */ + const ARCHIVE_TYPE_UNSPECIFIED = 0; + /** + * Deb indicates that the archive contains binary files. + * + * Generated from protobuf enum DEB = 1; + */ + const DEB = 1; + /** + * Deb-src indicates that the archive contains source files. + * + * Generated from protobuf enum DEB_SRC = 2; + */ + const DEB_SRC = 2; + + private static $valueToName = [ + self::ARCHIVE_TYPE_UNSPECIFIED => 'ARCHIVE_TYPE_UNSPECIFIED', + self::DEB => 'DEB', + self::DEB_SRC => 'DEB_SRC', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ArchiveType::class, \Google\Cloud\OsConfig\V1\OSPolicy_Resource_RepositoryResource_AptRepository_ArchiveType::class); + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/RepositoryResource/GooRepository.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/RepositoryResource/GooRepository.php new file mode 100644 index 000000000000..74f227b80549 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/RepositoryResource/GooRepository.php @@ -0,0 +1,106 @@ +google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.GooRepository + */ +class GooRepository extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the repository. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * Required. The url of the repository. + * + * Generated from protobuf field string url = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $url = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the repository. + * @type string $url + * Required. The url of the repository. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\OsPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the repository. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the repository. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. The url of the repository. + * + * Generated from protobuf field string url = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getUrl() + { + return $this->url; + } + + /** + * Required. The url of the repository. + * + * Generated from protobuf field string url = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setUrl($var) + { + GPBUtil::checkString($var, True); + $this->url = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(GooRepository::class, \Google\Cloud\OsConfig\V1\OSPolicy_Resource_RepositoryResource_GooRepository::class); + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/RepositoryResource/YumRepository.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/RepositoryResource/YumRepository.php new file mode 100644 index 000000000000..172da077406a --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/RepositoryResource/YumRepository.php @@ -0,0 +1,186 @@ +google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.YumRepository + */ +class YumRepository extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A one word, unique name for this repository. This is the + * `repo id` in the yum config file and also the `display_name` if + * `display_name` is omitted. This id is also used as the unique + * identifier when checking for resource conflicts. + * + * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $id = ''; + /** + * The display name of the repository. + * + * Generated from protobuf field string display_name = 2; + */ + protected $display_name = ''; + /** + * Required. The location of the repository directory. + * + * Generated from protobuf field string base_url = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $base_url = ''; + /** + * URIs of GPG keys. + * + * Generated from protobuf field repeated string gpg_keys = 4; + */ + private $gpg_keys; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $id + * Required. A one word, unique name for this repository. This is the + * `repo id` in the yum config file and also the `display_name` if + * `display_name` is omitted. This id is also used as the unique + * identifier when checking for resource conflicts. + * @type string $display_name + * The display name of the repository. + * @type string $base_url + * Required. The location of the repository directory. + * @type array|\Google\Protobuf\Internal\RepeatedField $gpg_keys + * URIs of GPG keys. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\OsPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. A one word, unique name for this repository. This is the + * `repo id` in the yum config file and also the `display_name` if + * `display_name` is omitted. This id is also used as the unique + * identifier when checking for resource conflicts. + * + * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * Required. A one word, unique name for this repository. This is the + * `repo id` in the yum config file and also the `display_name` if + * `display_name` is omitted. This id is also used as the unique + * identifier when checking for resource conflicts. + * + * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkString($var, True); + $this->id = $var; + + return $this; + } + + /** + * The display name of the repository. + * + * Generated from protobuf field string display_name = 2; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * The display name of the repository. + * + * Generated from protobuf field string display_name = 2; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Required. The location of the repository directory. + * + * Generated from protobuf field string base_url = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getBaseUrl() + { + return $this->base_url; + } + + /** + * Required. The location of the repository directory. + * + * Generated from protobuf field string base_url = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setBaseUrl($var) + { + GPBUtil::checkString($var, True); + $this->base_url = $var; + + return $this; + } + + /** + * URIs of GPG keys. + * + * Generated from protobuf field repeated string gpg_keys = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getGpgKeys() + { + return $this->gpg_keys; + } + + /** + * URIs of GPG keys. + * + * Generated from protobuf field repeated string gpg_keys = 4; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setGpgKeys($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->gpg_keys = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(YumRepository::class, \Google\Cloud\OsConfig\V1\OSPolicy_Resource_RepositoryResource_YumRepository::class); + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/RepositoryResource/ZypperRepository.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/RepositoryResource/ZypperRepository.php new file mode 100644 index 000000000000..645ac80d006b --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/RepositoryResource/ZypperRepository.php @@ -0,0 +1,186 @@ +google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.ZypperRepository + */ +class ZypperRepository extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A one word, unique name for this repository. This is the + * `repo id` in the zypper config file and also the `display_name` if + * `display_name` is omitted. This id is also used as the unique + * identifier when checking for GuestPolicy conflicts. + * + * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $id = ''; + /** + * The display name of the repository. + * + * Generated from protobuf field string display_name = 2; + */ + protected $display_name = ''; + /** + * Required. The location of the repository directory. + * + * Generated from protobuf field string base_url = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $base_url = ''; + /** + * URIs of GPG keys. + * + * Generated from protobuf field repeated string gpg_keys = 4; + */ + private $gpg_keys; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $id + * Required. A one word, unique name for this repository. This is the + * `repo id` in the zypper config file and also the `display_name` if + * `display_name` is omitted. This id is also used as the unique + * identifier when checking for GuestPolicy conflicts. + * @type string $display_name + * The display name of the repository. + * @type string $base_url + * Required. The location of the repository directory. + * @type array|\Google\Protobuf\Internal\RepeatedField $gpg_keys + * URIs of GPG keys. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\OsPolicy::initOnce(); + parent::__construct($data); + } + + /** + * Required. A one word, unique name for this repository. This is the + * `repo id` in the zypper config file and also the `display_name` if + * `display_name` is omitted. This id is also used as the unique + * identifier when checking for GuestPolicy conflicts. + * + * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * Required. A one word, unique name for this repository. This is the + * `repo id` in the zypper config file and also the `display_name` if + * `display_name` is omitted. This id is also used as the unique + * identifier when checking for GuestPolicy conflicts. + * + * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkString($var, True); + $this->id = $var; + + return $this; + } + + /** + * The display name of the repository. + * + * Generated from protobuf field string display_name = 2; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * The display name of the repository. + * + * Generated from protobuf field string display_name = 2; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Required. The location of the repository directory. + * + * Generated from protobuf field string base_url = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getBaseUrl() + { + return $this->base_url; + } + + /** + * Required. The location of the repository directory. + * + * Generated from protobuf field string base_url = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setBaseUrl($var) + { + GPBUtil::checkString($var, True); + $this->base_url = $var; + + return $this; + } + + /** + * URIs of GPG keys. + * + * Generated from protobuf field repeated string gpg_keys = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getGpgKeys() + { + return $this->gpg_keys; + } + + /** + * URIs of GPG keys. + * + * Generated from protobuf field repeated string gpg_keys = 4; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setGpgKeys($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->gpg_keys = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ZypperRepository::class, \Google\Cloud\OsConfig\V1\OSPolicy_Resource_RepositoryResource_ZypperRepository::class); + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/ResourceGroup.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/ResourceGroup.php new file mode 100644 index 000000000000..808e7902a376 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/ResourceGroup.php @@ -0,0 +1,149 @@ +google.cloud.osconfig.v1.OSPolicy.ResourceGroup + */ +class ResourceGroup extends \Google\Protobuf\Internal\Message +{ + /** + * List of inventory filters for the resource group. + * The resources in this resource group are applied to the target VM if it + * satisfies at least one of the following inventory filters. + * For example, to apply this resource group to VMs running either `RHEL` or + * `CentOS` operating systems, specify 2 items for the list with following + * values: + * inventory_filters[0].os_short_name='rhel' and + * inventory_filters[1].os_short_name='centos' + * If the list is empty, this resource group will be applied to the target + * VM unconditionally. + * + * Generated from protobuf field repeated .google.cloud.osconfig.v1.OSPolicy.InventoryFilter inventory_filters = 1; + */ + private $inventory_filters; + /** + * Required. List of resources configured for this resource group. + * The resources are executed in the exact order specified here. + * + * Generated from protobuf field repeated .google.cloud.osconfig.v1.OSPolicy.Resource resources = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $resources; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\OsConfig\V1\OSPolicy\InventoryFilter>|\Google\Protobuf\Internal\RepeatedField $inventory_filters + * List of inventory filters for the resource group. + * The resources in this resource group are applied to the target VM if it + * satisfies at least one of the following inventory filters. + * For example, to apply this resource group to VMs running either `RHEL` or + * `CentOS` operating systems, specify 2 items for the list with following + * values: + * inventory_filters[0].os_short_name='rhel' and + * inventory_filters[1].os_short_name='centos' + * If the list is empty, this resource group will be applied to the target + * VM unconditionally. + * @type array<\Google\Cloud\OsConfig\V1\OSPolicy\Resource>|\Google\Protobuf\Internal\RepeatedField $resources + * Required. List of resources configured for this resource group. + * The resources are executed in the exact order specified here. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\OsPolicy::initOnce(); + parent::__construct($data); + } + + /** + * List of inventory filters for the resource group. + * The resources in this resource group are applied to the target VM if it + * satisfies at least one of the following inventory filters. + * For example, to apply this resource group to VMs running either `RHEL` or + * `CentOS` operating systems, specify 2 items for the list with following + * values: + * inventory_filters[0].os_short_name='rhel' and + * inventory_filters[1].os_short_name='centos' + * If the list is empty, this resource group will be applied to the target + * VM unconditionally. + * + * Generated from protobuf field repeated .google.cloud.osconfig.v1.OSPolicy.InventoryFilter inventory_filters = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getInventoryFilters() + { + return $this->inventory_filters; + } + + /** + * List of inventory filters for the resource group. + * The resources in this resource group are applied to the target VM if it + * satisfies at least one of the following inventory filters. + * For example, to apply this resource group to VMs running either `RHEL` or + * `CentOS` operating systems, specify 2 items for the list with following + * values: + * inventory_filters[0].os_short_name='rhel' and + * inventory_filters[1].os_short_name='centos' + * If the list is empty, this resource group will be applied to the target + * VM unconditionally. + * + * Generated from protobuf field repeated .google.cloud.osconfig.v1.OSPolicy.InventoryFilter inventory_filters = 1; + * @param array<\Google\Cloud\OsConfig\V1\OSPolicy\InventoryFilter>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setInventoryFilters($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\OsConfig\V1\OSPolicy\InventoryFilter::class); + $this->inventory_filters = $arr; + + return $this; + } + + /** + * Required. List of resources configured for this resource group. + * The resources are executed in the exact order specified here. + * + * Generated from protobuf field repeated .google.cloud.osconfig.v1.OSPolicy.Resource resources = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getResources() + { + return $this->resources; + } + + /** + * Required. List of resources configured for this resource group. + * The resources are executed in the exact order specified here. + * + * Generated from protobuf field repeated .google.cloud.osconfig.v1.OSPolicy.Resource resources = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Cloud\OsConfig\V1\OSPolicy\Resource>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setResources($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\OsConfig\V1\OSPolicy\Resource::class); + $this->resources = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ResourceGroup::class, \Google\Cloud\OsConfig\V1\OSPolicy_ResourceGroup::class); + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignment.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignment.php new file mode 100644 index 000000000000..a03e2dc4d4e0 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignment.php @@ -0,0 +1,597 @@ +google.cloud.osconfig.v1.OSPolicyAssignment + */ +class OSPolicyAssignment extends \Google\Protobuf\Internal\Message +{ + /** + * Resource name. + * Format: + * `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id}` + * This field is ignored when you create an OS policy assignment. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * OS policy assignment description. + * Length of the description is limited to 1024 characters. + * + * Generated from protobuf field string description = 2; + */ + protected $description = ''; + /** + * Required. List of OS policies to be applied to the VMs. + * + * Generated from protobuf field repeated .google.cloud.osconfig.v1.OSPolicy os_policies = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + private $os_policies; + /** + * Required. Filter to select VMs. + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter instance_filter = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $instance_filter = null; + /** + * Required. Rollout to deploy the OS policy assignment. + * A rollout is triggered in the following situations: + * 1) OSPolicyAssignment is created. + * 2) OSPolicyAssignment is updated and the update contains changes to one of + * the following fields: + * - instance_filter + * - os_policies + * 3) OSPolicyAssignment is deleted. + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicyAssignment.Rollout rollout = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $rollout = null; + /** + * Output only. The assignment revision ID + * A new revision is committed whenever a rollout is triggered for a OS policy + * assignment + * + * Generated from protobuf field string revision_id = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $revision_id = ''; + /** + * Output only. The timestamp that the revision was created. + * + * Generated from protobuf field .google.protobuf.Timestamp revision_create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $revision_create_time = null; + /** + * The etag for this OS policy assignment. + * If this is provided on update, it must match the server's etag. + * + * Generated from protobuf field string etag = 8; + */ + protected $etag = ''; + /** + * Output only. OS policy assignment rollout state + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicyAssignment.RolloutState rollout_state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $rollout_state = 0; + /** + * Output only. Indicates that this revision has been successfully rolled out + * in this zone and new VMs will be assigned OS policies from this revision. + * For a given OS policy assignment, there is only one revision with a value + * of `true` for this field. + * + * Generated from protobuf field bool baseline = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $baseline = false; + /** + * Output only. Indicates that this revision deletes the OS policy assignment. + * + * Generated from protobuf field bool deleted = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $deleted = false; + /** + * Output only. Indicates that reconciliation is in progress for the revision. + * This value is `true` when the `rollout_state` is one of: + * * IN_PROGRESS + * * CANCELLING + * + * Generated from protobuf field bool reconciling = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $reconciling = false; + /** + * Output only. Server generated unique id for the OS policy assignment + * resource. + * + * Generated from protobuf field string uid = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $uid = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Resource name. + * Format: + * `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id}` + * This field is ignored when you create an OS policy assignment. + * @type string $description + * OS policy assignment description. + * Length of the description is limited to 1024 characters. + * @type array<\Google\Cloud\OsConfig\V1\OSPolicy>|\Google\Protobuf\Internal\RepeatedField $os_policies + * Required. List of OS policies to be applied to the VMs. + * @type \Google\Cloud\OsConfig\V1\OSPolicyAssignment\InstanceFilter $instance_filter + * Required. Filter to select VMs. + * @type \Google\Cloud\OsConfig\V1\OSPolicyAssignment\Rollout $rollout + * Required. Rollout to deploy the OS policy assignment. + * A rollout is triggered in the following situations: + * 1) OSPolicyAssignment is created. + * 2) OSPolicyAssignment is updated and the update contains changes to one of + * the following fields: + * - instance_filter + * - os_policies + * 3) OSPolicyAssignment is deleted. + * @type string $revision_id + * Output only. The assignment revision ID + * A new revision is committed whenever a rollout is triggered for a OS policy + * assignment + * @type \Google\Protobuf\Timestamp $revision_create_time + * Output only. The timestamp that the revision was created. + * @type string $etag + * The etag for this OS policy assignment. + * If this is provided on update, it must match the server's etag. + * @type int $rollout_state + * Output only. OS policy assignment rollout state + * @type bool $baseline + * Output only. Indicates that this revision has been successfully rolled out + * in this zone and new VMs will be assigned OS policies from this revision. + * For a given OS policy assignment, there is only one revision with a value + * of `true` for this field. + * @type bool $deleted + * Output only. Indicates that this revision deletes the OS policy assignment. + * @type bool $reconciling + * Output only. Indicates that reconciliation is in progress for the revision. + * This value is `true` when the `rollout_state` is one of: + * * IN_PROGRESS + * * CANCELLING + * @type string $uid + * Output only. Server generated unique id for the OS policy assignment + * resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\OsPolicyAssignments::initOnce(); + parent::__construct($data); + } + + /** + * Resource name. + * Format: + * `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id}` + * This field is ignored when you create an OS policy assignment. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Resource name. + * Format: + * `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id}` + * This field is ignored when you create an OS policy assignment. + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * OS policy assignment description. + * Length of the description is limited to 1024 characters. + * + * Generated from protobuf field string description = 2; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * OS policy assignment description. + * Length of the description is limited to 1024 characters. + * + * Generated from protobuf field string description = 2; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Required. List of OS policies to be applied to the VMs. + * + * Generated from protobuf field repeated .google.cloud.osconfig.v1.OSPolicy os_policies = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getOsPolicies() + { + return $this->os_policies; + } + + /** + * Required. List of OS policies to be applied to the VMs. + * + * Generated from protobuf field repeated .google.cloud.osconfig.v1.OSPolicy os_policies = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Cloud\OsConfig\V1\OSPolicy>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setOsPolicies($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\OsConfig\V1\OSPolicy::class); + $this->os_policies = $arr; + + return $this; + } + + /** + * Required. Filter to select VMs. + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter instance_filter = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\OsConfig\V1\OSPolicyAssignment\InstanceFilter|null + */ + public function getInstanceFilter() + { + return $this->instance_filter; + } + + public function hasInstanceFilter() + { + return isset($this->instance_filter); + } + + public function clearInstanceFilter() + { + unset($this->instance_filter); + } + + /** + * Required. Filter to select VMs. + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter instance_filter = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\OsConfig\V1\OSPolicyAssignment\InstanceFilter $var + * @return $this + */ + public function setInstanceFilter($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\OSPolicyAssignment\InstanceFilter::class); + $this->instance_filter = $var; + + return $this; + } + + /** + * Required. Rollout to deploy the OS policy assignment. + * A rollout is triggered in the following situations: + * 1) OSPolicyAssignment is created. + * 2) OSPolicyAssignment is updated and the update contains changes to one of + * the following fields: + * - instance_filter + * - os_policies + * 3) OSPolicyAssignment is deleted. + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicyAssignment.Rollout rollout = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\OsConfig\V1\OSPolicyAssignment\Rollout|null + */ + public function getRollout() + { + return $this->rollout; + } + + public function hasRollout() + { + return isset($this->rollout); + } + + public function clearRollout() + { + unset($this->rollout); + } + + /** + * Required. Rollout to deploy the OS policy assignment. + * A rollout is triggered in the following situations: + * 1) OSPolicyAssignment is created. + * 2) OSPolicyAssignment is updated and the update contains changes to one of + * the following fields: + * - instance_filter + * - os_policies + * 3) OSPolicyAssignment is deleted. + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicyAssignment.Rollout rollout = 5 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\OsConfig\V1\OSPolicyAssignment\Rollout $var + * @return $this + */ + public function setRollout($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\OSPolicyAssignment\Rollout::class); + $this->rollout = $var; + + return $this; + } + + /** + * Output only. The assignment revision ID + * A new revision is committed whenever a rollout is triggered for a OS policy + * assignment + * + * Generated from protobuf field string revision_id = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getRevisionId() + { + return $this->revision_id; + } + + /** + * Output only. The assignment revision ID + * A new revision is committed whenever a rollout is triggered for a OS policy + * assignment + * + * Generated from protobuf field string revision_id = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setRevisionId($var) + { + GPBUtil::checkString($var, True); + $this->revision_id = $var; + + return $this; + } + + /** + * Output only. The timestamp that the revision was created. + * + * Generated from protobuf field .google.protobuf.Timestamp revision_create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getRevisionCreateTime() + { + return $this->revision_create_time; + } + + public function hasRevisionCreateTime() + { + return isset($this->revision_create_time); + } + + public function clearRevisionCreateTime() + { + unset($this->revision_create_time); + } + + /** + * Output only. The timestamp that the revision was created. + * + * Generated from protobuf field .google.protobuf.Timestamp revision_create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setRevisionCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->revision_create_time = $var; + + return $this; + } + + /** + * The etag for this OS policy assignment. + * If this is provided on update, it must match the server's etag. + * + * Generated from protobuf field string etag = 8; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * The etag for this OS policy assignment. + * If this is provided on update, it must match the server's etag. + * + * Generated from protobuf field string etag = 8; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + + /** + * Output only. OS policy assignment rollout state + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicyAssignment.RolloutState rollout_state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getRolloutState() + { + return $this->rollout_state; + } + + /** + * Output only. OS policy assignment rollout state + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicyAssignment.RolloutState rollout_state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setRolloutState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\OsConfig\V1\OSPolicyAssignment\RolloutState::class); + $this->rollout_state = $var; + + return $this; + } + + /** + * Output only. Indicates that this revision has been successfully rolled out + * in this zone and new VMs will be assigned OS policies from this revision. + * For a given OS policy assignment, there is only one revision with a value + * of `true` for this field. + * + * Generated from protobuf field bool baseline = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getBaseline() + { + return $this->baseline; + } + + /** + * Output only. Indicates that this revision has been successfully rolled out + * in this zone and new VMs will be assigned OS policies from this revision. + * For a given OS policy assignment, there is only one revision with a value + * of `true` for this field. + * + * Generated from protobuf field bool baseline = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setBaseline($var) + { + GPBUtil::checkBool($var); + $this->baseline = $var; + + return $this; + } + + /** + * Output only. Indicates that this revision deletes the OS policy assignment. + * + * Generated from protobuf field bool deleted = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getDeleted() + { + return $this->deleted; + } + + /** + * Output only. Indicates that this revision deletes the OS policy assignment. + * + * Generated from protobuf field bool deleted = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setDeleted($var) + { + GPBUtil::checkBool($var); + $this->deleted = $var; + + return $this; + } + + /** + * Output only. Indicates that reconciliation is in progress for the revision. + * This value is `true` when the `rollout_state` is one of: + * * IN_PROGRESS + * * CANCELLING + * + * Generated from protobuf field bool reconciling = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getReconciling() + { + return $this->reconciling; + } + + /** + * Output only. Indicates that reconciliation is in progress for the revision. + * This value is `true` when the `rollout_state` is one of: + * * IN_PROGRESS + * * CANCELLING + * + * Generated from protobuf field bool reconciling = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setReconciling($var) + { + GPBUtil::checkBool($var); + $this->reconciling = $var; + + return $this; + } + + /** + * Output only. Server generated unique id for the OS policy assignment + * resource. + * + * Generated from protobuf field string uid = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * Output only. Server generated unique id for the OS policy assignment + * resource. + * + * Generated from protobuf field string uid = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setUid($var) + { + GPBUtil::checkString($var, True); + $this->uid = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignment/InstanceFilter.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignment/InstanceFilter.php new file mode 100644 index 000000000000..1f00e56ba059 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignment/InstanceFilter.php @@ -0,0 +1,202 @@ +google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter + */ +class InstanceFilter extends \Google\Protobuf\Internal\Message +{ + /** + * Target all VMs in the project. If true, no other criteria is + * permitted. + * + * Generated from protobuf field bool all = 1; + */ + protected $all = false; + /** + * List of label sets used for VM inclusion. + * If the list has more than one `LabelSet`, the VM is included if any + * of the label sets are applicable for the VM. + * + * Generated from protobuf field repeated .google.cloud.osconfig.v1.OSPolicyAssignment.LabelSet inclusion_labels = 2; + */ + private $inclusion_labels; + /** + * List of label sets used for VM exclusion. + * If the list has more than one label set, the VM is excluded if any + * of the label sets are applicable for the VM. + * + * Generated from protobuf field repeated .google.cloud.osconfig.v1.OSPolicyAssignment.LabelSet exclusion_labels = 3; + */ + private $exclusion_labels; + /** + * List of inventories to select VMs. + * A VM is selected if its inventory data matches at least one of the + * following inventories. + * + * Generated from protobuf field repeated .google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter.Inventory inventories = 4; + */ + private $inventories; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $all + * Target all VMs in the project. If true, no other criteria is + * permitted. + * @type array<\Google\Cloud\OsConfig\V1\OSPolicyAssignment\LabelSet>|\Google\Protobuf\Internal\RepeatedField $inclusion_labels + * List of label sets used for VM inclusion. + * If the list has more than one `LabelSet`, the VM is included if any + * of the label sets are applicable for the VM. + * @type array<\Google\Cloud\OsConfig\V1\OSPolicyAssignment\LabelSet>|\Google\Protobuf\Internal\RepeatedField $exclusion_labels + * List of label sets used for VM exclusion. + * If the list has more than one label set, the VM is excluded if any + * of the label sets are applicable for the VM. + * @type array<\Google\Cloud\OsConfig\V1\OSPolicyAssignment\InstanceFilter\Inventory>|\Google\Protobuf\Internal\RepeatedField $inventories + * List of inventories to select VMs. + * A VM is selected if its inventory data matches at least one of the + * following inventories. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\OsPolicyAssignments::initOnce(); + parent::__construct($data); + } + + /** + * Target all VMs in the project. If true, no other criteria is + * permitted. + * + * Generated from protobuf field bool all = 1; + * @return bool + */ + public function getAll() + { + return $this->all; + } + + /** + * Target all VMs in the project. If true, no other criteria is + * permitted. + * + * Generated from protobuf field bool all = 1; + * @param bool $var + * @return $this + */ + public function setAll($var) + { + GPBUtil::checkBool($var); + $this->all = $var; + + return $this; + } + + /** + * List of label sets used for VM inclusion. + * If the list has more than one `LabelSet`, the VM is included if any + * of the label sets are applicable for the VM. + * + * Generated from protobuf field repeated .google.cloud.osconfig.v1.OSPolicyAssignment.LabelSet inclusion_labels = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getInclusionLabels() + { + return $this->inclusion_labels; + } + + /** + * List of label sets used for VM inclusion. + * If the list has more than one `LabelSet`, the VM is included if any + * of the label sets are applicable for the VM. + * + * Generated from protobuf field repeated .google.cloud.osconfig.v1.OSPolicyAssignment.LabelSet inclusion_labels = 2; + * @param array<\Google\Cloud\OsConfig\V1\OSPolicyAssignment\LabelSet>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setInclusionLabels($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\OsConfig\V1\OSPolicyAssignment\LabelSet::class); + $this->inclusion_labels = $arr; + + return $this; + } + + /** + * List of label sets used for VM exclusion. + * If the list has more than one label set, the VM is excluded if any + * of the label sets are applicable for the VM. + * + * Generated from protobuf field repeated .google.cloud.osconfig.v1.OSPolicyAssignment.LabelSet exclusion_labels = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getExclusionLabels() + { + return $this->exclusion_labels; + } + + /** + * List of label sets used for VM exclusion. + * If the list has more than one label set, the VM is excluded if any + * of the label sets are applicable for the VM. + * + * Generated from protobuf field repeated .google.cloud.osconfig.v1.OSPolicyAssignment.LabelSet exclusion_labels = 3; + * @param array<\Google\Cloud\OsConfig\V1\OSPolicyAssignment\LabelSet>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setExclusionLabels($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\OsConfig\V1\OSPolicyAssignment\LabelSet::class); + $this->exclusion_labels = $arr; + + return $this; + } + + /** + * List of inventories to select VMs. + * A VM is selected if its inventory data matches at least one of the + * following inventories. + * + * Generated from protobuf field repeated .google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter.Inventory inventories = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getInventories() + { + return $this->inventories; + } + + /** + * List of inventories to select VMs. + * A VM is selected if its inventory data matches at least one of the + * following inventories. + * + * Generated from protobuf field repeated .google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter.Inventory inventories = 4; + * @param array<\Google\Cloud\OsConfig\V1\OSPolicyAssignment\InstanceFilter\Inventory>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setInventories($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\OsConfig\V1\OSPolicyAssignment\InstanceFilter\Inventory::class); + $this->inventories = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(InstanceFilter::class, \Google\Cloud\OsConfig\V1\OSPolicyAssignment_InstanceFilter::class); + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignment/InstanceFilter/Inventory.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignment/InstanceFilter/Inventory.php new file mode 100644 index 000000000000..aad0aa22658a --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignment/InstanceFilter/Inventory.php @@ -0,0 +1,120 @@ +google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter.Inventory + */ +class Inventory extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The OS short name + * + * Generated from protobuf field string os_short_name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $os_short_name = ''; + /** + * The OS version + * Prefix matches are supported if asterisk(*) is provided as the + * last character. For example, to match all versions with a major + * version of `7`, specify the following value for this field `7.*` + * An empty string matches all OS versions. + * + * Generated from protobuf field string os_version = 2; + */ + protected $os_version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $os_short_name + * Required. The OS short name + * @type string $os_version + * The OS version + * Prefix matches are supported if asterisk(*) is provided as the + * last character. For example, to match all versions with a major + * version of `7`, specify the following value for this field `7.*` + * An empty string matches all OS versions. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\OsPolicyAssignments::initOnce(); + parent::__construct($data); + } + + /** + * Required. The OS short name + * + * Generated from protobuf field string os_short_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getOsShortName() + { + return $this->os_short_name; + } + + /** + * Required. The OS short name + * + * Generated from protobuf field string os_short_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setOsShortName($var) + { + GPBUtil::checkString($var, True); + $this->os_short_name = $var; + + return $this; + } + + /** + * The OS version + * Prefix matches are supported if asterisk(*) is provided as the + * last character. For example, to match all versions with a major + * version of `7`, specify the following value for this field `7.*` + * An empty string matches all OS versions. + * + * Generated from protobuf field string os_version = 2; + * @return string + */ + public function getOsVersion() + { + return $this->os_version; + } + + /** + * The OS version + * Prefix matches are supported if asterisk(*) is provided as the + * last character. For example, to match all versions with a major + * version of `7`, specify the following value for this field `7.*` + * An empty string matches all OS versions. + * + * Generated from protobuf field string os_version = 2; + * @param string $var + * @return $this + */ + public function setOsVersion($var) + { + GPBUtil::checkString($var, True); + $this->os_version = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Inventory::class, \Google\Cloud\OsConfig\V1\OSPolicyAssignment_InstanceFilter_Inventory::class); + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignment/LabelSet.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignment/LabelSet.php new file mode 100644 index 000000000000..2e255e18bbd5 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignment/LabelSet.php @@ -0,0 +1,86 @@ +google.cloud.osconfig.v1.OSPolicyAssignment.LabelSet + */ +class LabelSet extends \Google\Protobuf\Internal\Message +{ + /** + * Labels are identified by key/value pairs in this map. + * A VM should contain all the key/value pairs specified in this + * map to be selected. + * + * Generated from protobuf field map labels = 1; + */ + private $labels; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\MapField $labels + * Labels are identified by key/value pairs in this map. + * A VM should contain all the key/value pairs specified in this + * map to be selected. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\OsPolicyAssignments::initOnce(); + parent::__construct($data); + } + + /** + * Labels are identified by key/value pairs in this map. + * A VM should contain all the key/value pairs specified in this + * map to be selected. + * + * Generated from protobuf field map labels = 1; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Labels are identified by key/value pairs in this map. + * A VM should contain all the key/value pairs specified in this + * map to be selected. + * + * Generated from protobuf field map labels = 1; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(LabelSet::class, \Google\Cloud\OsConfig\V1\OSPolicyAssignment_LabelSet::class); + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignment/Rollout.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignment/Rollout.php new file mode 100644 index 000000000000..a222fc7776b0 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignment/Rollout.php @@ -0,0 +1,145 @@ +google.cloud.osconfig.v1.OSPolicyAssignment.Rollout + */ +class Rollout extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The maximum number (or percentage) of VMs per zone to disrupt + * at any given moment. + * + * Generated from protobuf field .google.cloud.osconfig.v1.FixedOrPercent disruption_budget = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $disruption_budget = null; + /** + * Required. This determines the minimum duration of time to wait after the + * configuration changes are applied through the current rollout. A + * VM continues to count towards the `disruption_budget` at least + * until this duration of time has passed after configuration changes are + * applied. + * + * Generated from protobuf field .google.protobuf.Duration min_wait_duration = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $min_wait_duration = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\OsConfig\V1\FixedOrPercent $disruption_budget + * Required. The maximum number (or percentage) of VMs per zone to disrupt + * at any given moment. + * @type \Google\Protobuf\Duration $min_wait_duration + * Required. This determines the minimum duration of time to wait after the + * configuration changes are applied through the current rollout. A + * VM continues to count towards the `disruption_budget` at least + * until this duration of time has passed after configuration changes are + * applied. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\OsPolicyAssignments::initOnce(); + parent::__construct($data); + } + + /** + * Required. The maximum number (or percentage) of VMs per zone to disrupt + * at any given moment. + * + * Generated from protobuf field .google.cloud.osconfig.v1.FixedOrPercent disruption_budget = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\OsConfig\V1\FixedOrPercent|null + */ + public function getDisruptionBudget() + { + return $this->disruption_budget; + } + + public function hasDisruptionBudget() + { + return isset($this->disruption_budget); + } + + public function clearDisruptionBudget() + { + unset($this->disruption_budget); + } + + /** + * Required. The maximum number (or percentage) of VMs per zone to disrupt + * at any given moment. + * + * Generated from protobuf field .google.cloud.osconfig.v1.FixedOrPercent disruption_budget = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\OsConfig\V1\FixedOrPercent $var + * @return $this + */ + public function setDisruptionBudget($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\FixedOrPercent::class); + $this->disruption_budget = $var; + + return $this; + } + + /** + * Required. This determines the minimum duration of time to wait after the + * configuration changes are applied through the current rollout. A + * VM continues to count towards the `disruption_budget` at least + * until this duration of time has passed after configuration changes are + * applied. + * + * Generated from protobuf field .google.protobuf.Duration min_wait_duration = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Duration|null + */ + public function getMinWaitDuration() + { + return $this->min_wait_duration; + } + + public function hasMinWaitDuration() + { + return isset($this->min_wait_duration); + } + + public function clearMinWaitDuration() + { + unset($this->min_wait_duration); + } + + /** + * Required. This determines the minimum duration of time to wait after the + * configuration changes are applied through the current rollout. A + * VM continues to count towards the `disruption_budget` at least + * until this duration of time has passed after configuration changes are + * applied. + * + * Generated from protobuf field .google.protobuf.Duration min_wait_duration = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setMinWaitDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->min_wait_duration = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Rollout::class, \Google\Cloud\OsConfig\V1\OSPolicyAssignment_Rollout::class); + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignment/RolloutState.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignment/RolloutState.php new file mode 100644 index 000000000000..87b485b15645 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignment/RolloutState.php @@ -0,0 +1,78 @@ +google.cloud.osconfig.v1.OSPolicyAssignment.RolloutState + */ +class RolloutState +{ + /** + * Invalid value + * + * Generated from protobuf enum ROLLOUT_STATE_UNSPECIFIED = 0; + */ + const ROLLOUT_STATE_UNSPECIFIED = 0; + /** + * The rollout is in progress. + * + * Generated from protobuf enum IN_PROGRESS = 1; + */ + const IN_PROGRESS = 1; + /** + * The rollout is being cancelled. + * + * Generated from protobuf enum CANCELLING = 2; + */ + const CANCELLING = 2; + /** + * The rollout is cancelled. + * + * Generated from protobuf enum CANCELLED = 3; + */ + const CANCELLED = 3; + /** + * The rollout has completed successfully. + * + * Generated from protobuf enum SUCCEEDED = 4; + */ + const SUCCEEDED = 4; + + private static $valueToName = [ + self::ROLLOUT_STATE_UNSPECIFIED => 'ROLLOUT_STATE_UNSPECIFIED', + self::IN_PROGRESS => 'IN_PROGRESS', + self::CANCELLING => 'CANCELLING', + self::CANCELLED => 'CANCELLED', + self::SUCCEEDED => 'SUCCEEDED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(RolloutState::class, \Google\Cloud\OsConfig\V1\OSPolicyAssignment_RolloutState::class); + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignmentOperationMetadata.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignmentOperationMetadata.php new file mode 100644 index 000000000000..fc63cafcd101 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignmentOperationMetadata.php @@ -0,0 +1,232 @@ +google.cloud.osconfig.v1.OSPolicyAssignmentOperationMetadata + */ +class OSPolicyAssignmentOperationMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Reference to the `OSPolicyAssignment` API resource. + * Format: + * `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id@revision_id}` + * + * Generated from protobuf field string os_policy_assignment = 1 [(.google.api.resource_reference) = { + */ + protected $os_policy_assignment = ''; + /** + * The OS policy assignment API method. + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicyAssignmentOperationMetadata.APIMethod api_method = 2; + */ + protected $api_method = 0; + /** + * State of the rollout + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicyAssignmentOperationMetadata.RolloutState rollout_state = 3; + */ + protected $rollout_state = 0; + /** + * Rollout start time + * + * Generated from protobuf field .google.protobuf.Timestamp rollout_start_time = 4; + */ + protected $rollout_start_time = null; + /** + * Rollout update time + * + * Generated from protobuf field .google.protobuf.Timestamp rollout_update_time = 5; + */ + protected $rollout_update_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $os_policy_assignment + * Reference to the `OSPolicyAssignment` API resource. + * Format: + * `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id@revision_id}` + * @type int $api_method + * The OS policy assignment API method. + * @type int $rollout_state + * State of the rollout + * @type \Google\Protobuf\Timestamp $rollout_start_time + * Rollout start time + * @type \Google\Protobuf\Timestamp $rollout_update_time + * Rollout update time + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\OsPolicyAssignments::initOnce(); + parent::__construct($data); + } + + /** + * Reference to the `OSPolicyAssignment` API resource. + * Format: + * `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id@revision_id}` + * + * Generated from protobuf field string os_policy_assignment = 1 [(.google.api.resource_reference) = { + * @return string + */ + public function getOsPolicyAssignment() + { + return $this->os_policy_assignment; + } + + /** + * Reference to the `OSPolicyAssignment` API resource. + * Format: + * `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id@revision_id}` + * + * Generated from protobuf field string os_policy_assignment = 1 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setOsPolicyAssignment($var) + { + GPBUtil::checkString($var, True); + $this->os_policy_assignment = $var; + + return $this; + } + + /** + * The OS policy assignment API method. + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicyAssignmentOperationMetadata.APIMethod api_method = 2; + * @return int + */ + public function getApiMethod() + { + return $this->api_method; + } + + /** + * The OS policy assignment API method. + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicyAssignmentOperationMetadata.APIMethod api_method = 2; + * @param int $var + * @return $this + */ + public function setApiMethod($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\OsConfig\V1\OSPolicyAssignmentOperationMetadata\APIMethod::class); + $this->api_method = $var; + + return $this; + } + + /** + * State of the rollout + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicyAssignmentOperationMetadata.RolloutState rollout_state = 3; + * @return int + */ + public function getRolloutState() + { + return $this->rollout_state; + } + + /** + * State of the rollout + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicyAssignmentOperationMetadata.RolloutState rollout_state = 3; + * @param int $var + * @return $this + */ + public function setRolloutState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\OsConfig\V1\OSPolicyAssignmentOperationMetadata\RolloutState::class); + $this->rollout_state = $var; + + return $this; + } + + /** + * Rollout start time + * + * Generated from protobuf field .google.protobuf.Timestamp rollout_start_time = 4; + * @return \Google\Protobuf\Timestamp|null + */ + public function getRolloutStartTime() + { + return $this->rollout_start_time; + } + + public function hasRolloutStartTime() + { + return isset($this->rollout_start_time); + } + + public function clearRolloutStartTime() + { + unset($this->rollout_start_time); + } + + /** + * Rollout start time + * + * Generated from protobuf field .google.protobuf.Timestamp rollout_start_time = 4; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setRolloutStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->rollout_start_time = $var; + + return $this; + } + + /** + * Rollout update time + * + * Generated from protobuf field .google.protobuf.Timestamp rollout_update_time = 5; + * @return \Google\Protobuf\Timestamp|null + */ + public function getRolloutUpdateTime() + { + return $this->rollout_update_time; + } + + public function hasRolloutUpdateTime() + { + return isset($this->rollout_update_time); + } + + public function clearRolloutUpdateTime() + { + unset($this->rollout_update_time); + } + + /** + * Rollout update time + * + * Generated from protobuf field .google.protobuf.Timestamp rollout_update_time = 5; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setRolloutUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->rollout_update_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignmentOperationMetadata/APIMethod.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignmentOperationMetadata/APIMethod.php new file mode 100644 index 000000000000..bfc5ecbce745 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignmentOperationMetadata/APIMethod.php @@ -0,0 +1,71 @@ +google.cloud.osconfig.v1.OSPolicyAssignmentOperationMetadata.APIMethod + */ +class APIMethod +{ + /** + * Invalid value + * + * Generated from protobuf enum API_METHOD_UNSPECIFIED = 0; + */ + const API_METHOD_UNSPECIFIED = 0; + /** + * Create OS policy assignment API method + * + * Generated from protobuf enum CREATE = 1; + */ + const CREATE = 1; + /** + * Update OS policy assignment API method + * + * Generated from protobuf enum UPDATE = 2; + */ + const UPDATE = 2; + /** + * Delete OS policy assignment API method + * + * Generated from protobuf enum DELETE = 3; + */ + const DELETE = 3; + + private static $valueToName = [ + self::API_METHOD_UNSPECIFIED => 'API_METHOD_UNSPECIFIED', + self::CREATE => 'CREATE', + self::UPDATE => 'UPDATE', + self::DELETE => 'DELETE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(APIMethod::class, \Google\Cloud\OsConfig\V1\OSPolicyAssignmentOperationMetadata_APIMethod::class); + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignmentOperationMetadata/RolloutState.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignmentOperationMetadata/RolloutState.php new file mode 100644 index 000000000000..cc058a19eb50 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignmentOperationMetadata/RolloutState.php @@ -0,0 +1,78 @@ +google.cloud.osconfig.v1.OSPolicyAssignmentOperationMetadata.RolloutState + */ +class RolloutState +{ + /** + * Invalid value + * + * Generated from protobuf enum ROLLOUT_STATE_UNSPECIFIED = 0; + */ + const ROLLOUT_STATE_UNSPECIFIED = 0; + /** + * The rollout is in progress. + * + * Generated from protobuf enum IN_PROGRESS = 1; + */ + const IN_PROGRESS = 1; + /** + * The rollout is being cancelled. + * + * Generated from protobuf enum CANCELLING = 2; + */ + const CANCELLING = 2; + /** + * The rollout is cancelled. + * + * Generated from protobuf enum CANCELLED = 3; + */ + const CANCELLED = 3; + /** + * The rollout has completed successfully. + * + * Generated from protobuf enum SUCCEEDED = 4; + */ + const SUCCEEDED = 4; + + private static $valueToName = [ + self::ROLLOUT_STATE_UNSPECIFIED => 'ROLLOUT_STATE_UNSPECIFIED', + self::IN_PROGRESS => 'IN_PROGRESS', + self::CANCELLING => 'CANCELLING', + self::CANCELLED => 'CANCELLED', + self::SUCCEEDED => 'SUCCEEDED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(RolloutState::class, \Google\Cloud\OsConfig\V1\OSPolicyAssignmentOperationMetadata_RolloutState::class); + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignmentReport.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignmentReport.php new file mode 100644 index 000000000000..e98ff0ef9fd1 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignmentReport.php @@ -0,0 +1,287 @@ +google.cloud.osconfig.v1.OSPolicyAssignmentReport + */ +class OSPolicyAssignmentReport extends \Google\Protobuf\Internal\Message +{ + /** + * The `OSPolicyAssignmentReport` API resource name. + * Format: + * `projects/{project_number}/locations/{location}/instances/{instance_id}/osPolicyAssignments/{os_policy_assignment_id}/report` + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The Compute Engine VM instance name. + * + * Generated from protobuf field string instance = 2; + */ + protected $instance = ''; + /** + * Reference to the `OSPolicyAssignment` API resource that the `OSPolicy` + * belongs to. + * Format: + * `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id@revision_id}` + * + * Generated from protobuf field string os_policy_assignment = 3 [(.google.api.resource_reference) = { + */ + protected $os_policy_assignment = ''; + /** + * Compliance data for each `OSPolicy` that is applied to the VM. + * + * Generated from protobuf field repeated .google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance os_policy_compliances = 4; + */ + private $os_policy_compliances; + /** + * Timestamp for when the report was last generated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 5; + */ + protected $update_time = null; + /** + * Unique identifier of the last attempted run to apply the OS policies + * associated with this assignment on the VM. + * This ID is logged by the OS Config agent while applying the OS + * policies associated with this assignment on the VM. + * NOTE: If the service is unable to successfully connect to the agent for + * this run, then this id will not be available in the agent logs. + * + * Generated from protobuf field string last_run_id = 6; + */ + protected $last_run_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The `OSPolicyAssignmentReport` API resource name. + * Format: + * `projects/{project_number}/locations/{location}/instances/{instance_id}/osPolicyAssignments/{os_policy_assignment_id}/report` + * @type string $instance + * The Compute Engine VM instance name. + * @type string $os_policy_assignment + * Reference to the `OSPolicyAssignment` API resource that the `OSPolicy` + * belongs to. + * Format: + * `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id@revision_id}` + * @type array<\Google\Cloud\OsConfig\V1\OSPolicyAssignmentReport\OSPolicyCompliance>|\Google\Protobuf\Internal\RepeatedField $os_policy_compliances + * Compliance data for each `OSPolicy` that is applied to the VM. + * @type \Google\Protobuf\Timestamp $update_time + * Timestamp for when the report was last generated. + * @type string $last_run_id + * Unique identifier of the last attempted run to apply the OS policies + * associated with this assignment on the VM. + * This ID is logged by the OS Config agent while applying the OS + * policies associated with this assignment on the VM. + * NOTE: If the service is unable to successfully connect to the agent for + * this run, then this id will not be available in the agent logs. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\OsPolicyAssignmentReports::initOnce(); + parent::__construct($data); + } + + /** + * The `OSPolicyAssignmentReport` API resource name. + * Format: + * `projects/{project_number}/locations/{location}/instances/{instance_id}/osPolicyAssignments/{os_policy_assignment_id}/report` + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The `OSPolicyAssignmentReport` API resource name. + * Format: + * `projects/{project_number}/locations/{location}/instances/{instance_id}/osPolicyAssignments/{os_policy_assignment_id}/report` + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The Compute Engine VM instance name. + * + * Generated from protobuf field string instance = 2; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * The Compute Engine VM instance name. + * + * Generated from protobuf field string instance = 2; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Reference to the `OSPolicyAssignment` API resource that the `OSPolicy` + * belongs to. + * Format: + * `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id@revision_id}` + * + * Generated from protobuf field string os_policy_assignment = 3 [(.google.api.resource_reference) = { + * @return string + */ + public function getOsPolicyAssignment() + { + return $this->os_policy_assignment; + } + + /** + * Reference to the `OSPolicyAssignment` API resource that the `OSPolicy` + * belongs to. + * Format: + * `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id@revision_id}` + * + * Generated from protobuf field string os_policy_assignment = 3 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setOsPolicyAssignment($var) + { + GPBUtil::checkString($var, True); + $this->os_policy_assignment = $var; + + return $this; + } + + /** + * Compliance data for each `OSPolicy` that is applied to the VM. + * + * Generated from protobuf field repeated .google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance os_policy_compliances = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getOsPolicyCompliances() + { + return $this->os_policy_compliances; + } + + /** + * Compliance data for each `OSPolicy` that is applied to the VM. + * + * Generated from protobuf field repeated .google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance os_policy_compliances = 4; + * @param array<\Google\Cloud\OsConfig\V1\OSPolicyAssignmentReport\OSPolicyCompliance>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setOsPolicyCompliances($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\OsConfig\V1\OSPolicyAssignmentReport\OSPolicyCompliance::class); + $this->os_policy_compliances = $arr; + + return $this; + } + + /** + * Timestamp for when the report was last generated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 5; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Timestamp for when the report was last generated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 5; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Unique identifier of the last attempted run to apply the OS policies + * associated with this assignment on the VM. + * This ID is logged by the OS Config agent while applying the OS + * policies associated with this assignment on the VM. + * NOTE: If the service is unable to successfully connect to the agent for + * this run, then this id will not be available in the agent logs. + * + * Generated from protobuf field string last_run_id = 6; + * @return string + */ + public function getLastRunId() + { + return $this->last_run_id; + } + + /** + * Unique identifier of the last attempted run to apply the OS policies + * associated with this assignment on the VM. + * This ID is logged by the OS Config agent while applying the OS + * policies associated with this assignment on the VM. + * NOTE: If the service is unable to successfully connect to the agent for + * this run, then this id will not be available in the agent logs. + * + * Generated from protobuf field string last_run_id = 6; + * @param string $var + * @return $this + */ + public function setLastRunId($var) + { + GPBUtil::checkString($var, True); + $this->last_run_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignmentReport/OSPolicyCompliance.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignmentReport/OSPolicyCompliance.php new file mode 100644 index 000000000000..8daa097eb7ca --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignmentReport/OSPolicyCompliance.php @@ -0,0 +1,244 @@ +google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance + */ +class OSPolicyCompliance extends \Google\Protobuf\Internal\Message +{ + /** + * The OS policy id + * + * Generated from protobuf field string os_policy_id = 1; + */ + protected $os_policy_id = ''; + /** + * The compliance state of the OS policy. + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.ComplianceState compliance_state = 2; + */ + protected $compliance_state = 0; + /** + * The reason for the OS policy to be in an unknown compliance state. + * This field is always populated when `compliance_state` is `UNKNOWN`. + * If populated, the field can contain one of the following values: + * * `vm-not-running`: The VM was not running. + * * `os-policies-not-supported-by-agent`: The version of the OS Config + * agent running on the VM does not support running OS policies. + * * `no-agent-detected`: The OS Config agent is not detected for the VM. + * * `resource-execution-errors`: The OS Config agent encountered errors + * while executing one or more resources in the policy. See + * `os_policy_resource_compliances` for details. + * * `task-timeout`: The task sent to the agent to apply the policy timed + * out. + * * `unexpected-agent-state`: The OS Config agent did not report the final + * status of the task that attempted to apply the policy. Instead, the agent + * unexpectedly started working on a different task. This mostly happens + * when the agent or VM unexpectedly restarts while applying OS policies. + * * `internal-service-errors`: Internal service errors were encountered + * while attempting to apply the policy. + * + * Generated from protobuf field string compliance_state_reason = 3; + */ + protected $compliance_state_reason = ''; + /** + * Compliance data for each resource within the policy that is applied to + * the VM. + * + * Generated from protobuf field repeated .google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance os_policy_resource_compliances = 4; + */ + private $os_policy_resource_compliances; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $os_policy_id + * The OS policy id + * @type int $compliance_state + * The compliance state of the OS policy. + * @type string $compliance_state_reason + * The reason for the OS policy to be in an unknown compliance state. + * This field is always populated when `compliance_state` is `UNKNOWN`. + * If populated, the field can contain one of the following values: + * * `vm-not-running`: The VM was not running. + * * `os-policies-not-supported-by-agent`: The version of the OS Config + * agent running on the VM does not support running OS policies. + * * `no-agent-detected`: The OS Config agent is not detected for the VM. + * * `resource-execution-errors`: The OS Config agent encountered errors + * while executing one or more resources in the policy. See + * `os_policy_resource_compliances` for details. + * * `task-timeout`: The task sent to the agent to apply the policy timed + * out. + * * `unexpected-agent-state`: The OS Config agent did not report the final + * status of the task that attempted to apply the policy. Instead, the agent + * unexpectedly started working on a different task. This mostly happens + * when the agent or VM unexpectedly restarts while applying OS policies. + * * `internal-service-errors`: Internal service errors were encountered + * while attempting to apply the policy. + * @type array<\Google\Cloud\OsConfig\V1\OSPolicyAssignmentReport\OSPolicyCompliance\OSPolicyResourceCompliance>|\Google\Protobuf\Internal\RepeatedField $os_policy_resource_compliances + * Compliance data for each resource within the policy that is applied to + * the VM. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\OsPolicyAssignmentReports::initOnce(); + parent::__construct($data); + } + + /** + * The OS policy id + * + * Generated from protobuf field string os_policy_id = 1; + * @return string + */ + public function getOsPolicyId() + { + return $this->os_policy_id; + } + + /** + * The OS policy id + * + * Generated from protobuf field string os_policy_id = 1; + * @param string $var + * @return $this + */ + public function setOsPolicyId($var) + { + GPBUtil::checkString($var, True); + $this->os_policy_id = $var; + + return $this; + } + + /** + * The compliance state of the OS policy. + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.ComplianceState compliance_state = 2; + * @return int + */ + public function getComplianceState() + { + return $this->compliance_state; + } + + /** + * The compliance state of the OS policy. + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.ComplianceState compliance_state = 2; + * @param int $var + * @return $this + */ + public function setComplianceState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\OsConfig\V1\OSPolicyAssignmentReport\OSPolicyCompliance\ComplianceState::class); + $this->compliance_state = $var; + + return $this; + } + + /** + * The reason for the OS policy to be in an unknown compliance state. + * This field is always populated when `compliance_state` is `UNKNOWN`. + * If populated, the field can contain one of the following values: + * * `vm-not-running`: The VM was not running. + * * `os-policies-not-supported-by-agent`: The version of the OS Config + * agent running on the VM does not support running OS policies. + * * `no-agent-detected`: The OS Config agent is not detected for the VM. + * * `resource-execution-errors`: The OS Config agent encountered errors + * while executing one or more resources in the policy. See + * `os_policy_resource_compliances` for details. + * * `task-timeout`: The task sent to the agent to apply the policy timed + * out. + * * `unexpected-agent-state`: The OS Config agent did not report the final + * status of the task that attempted to apply the policy. Instead, the agent + * unexpectedly started working on a different task. This mostly happens + * when the agent or VM unexpectedly restarts while applying OS policies. + * * `internal-service-errors`: Internal service errors were encountered + * while attempting to apply the policy. + * + * Generated from protobuf field string compliance_state_reason = 3; + * @return string + */ + public function getComplianceStateReason() + { + return $this->compliance_state_reason; + } + + /** + * The reason for the OS policy to be in an unknown compliance state. + * This field is always populated when `compliance_state` is `UNKNOWN`. + * If populated, the field can contain one of the following values: + * * `vm-not-running`: The VM was not running. + * * `os-policies-not-supported-by-agent`: The version of the OS Config + * agent running on the VM does not support running OS policies. + * * `no-agent-detected`: The OS Config agent is not detected for the VM. + * * `resource-execution-errors`: The OS Config agent encountered errors + * while executing one or more resources in the policy. See + * `os_policy_resource_compliances` for details. + * * `task-timeout`: The task sent to the agent to apply the policy timed + * out. + * * `unexpected-agent-state`: The OS Config agent did not report the final + * status of the task that attempted to apply the policy. Instead, the agent + * unexpectedly started working on a different task. This mostly happens + * when the agent or VM unexpectedly restarts while applying OS policies. + * * `internal-service-errors`: Internal service errors were encountered + * while attempting to apply the policy. + * + * Generated from protobuf field string compliance_state_reason = 3; + * @param string $var + * @return $this + */ + public function setComplianceStateReason($var) + { + GPBUtil::checkString($var, True); + $this->compliance_state_reason = $var; + + return $this; + } + + /** + * Compliance data for each resource within the policy that is applied to + * the VM. + * + * Generated from protobuf field repeated .google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance os_policy_resource_compliances = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getOsPolicyResourceCompliances() + { + return $this->os_policy_resource_compliances; + } + + /** + * Compliance data for each resource within the policy that is applied to + * the VM. + * + * Generated from protobuf field repeated .google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance os_policy_resource_compliances = 4; + * @param array<\Google\Cloud\OsConfig\V1\OSPolicyAssignmentReport\OSPolicyCompliance\OSPolicyResourceCompliance>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setOsPolicyResourceCompliances($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\OsConfig\V1\OSPolicyAssignmentReport\OSPolicyCompliance\OSPolicyResourceCompliance::class); + $this->os_policy_resource_compliances = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(OSPolicyCompliance::class, \Google\Cloud\OsConfig\V1\OSPolicyAssignmentReport_OSPolicyCompliance::class); + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignmentReport/OSPolicyCompliance/ComplianceState.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignmentReport/OSPolicyCompliance/ComplianceState.php new file mode 100644 index 000000000000..64a1bb18fa65 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignmentReport/OSPolicyCompliance/ComplianceState.php @@ -0,0 +1,70 @@ +google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.ComplianceState + */ +class ComplianceState +{ + /** + * The policy is in an unknown compliance state. + * Refer to the field `compliance_state_reason` to learn the exact reason + * for the policy to be in this compliance state. + * + * Generated from protobuf enum UNKNOWN = 0; + */ + const UNKNOWN = 0; + /** + * Policy is compliant. + * The policy is compliant if all the underlying resources are also + * compliant. + * + * Generated from protobuf enum COMPLIANT = 1; + */ + const COMPLIANT = 1; + /** + * Policy is non-compliant. + * The policy is non-compliant if one or more underlying resources are + * non-compliant. + * + * Generated from protobuf enum NON_COMPLIANT = 2; + */ + const NON_COMPLIANT = 2; + + private static $valueToName = [ + self::UNKNOWN => 'UNKNOWN', + self::COMPLIANT => 'COMPLIANT', + self::NON_COMPLIANT => 'NON_COMPLIANT', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ComplianceState::class, \Google\Cloud\OsConfig\V1\OSPolicyAssignmentReport_OSPolicyCompliance_ComplianceState::class); + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignmentReport/OSPolicyCompliance/OSPolicyResourceCompliance.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignmentReport/OSPolicyCompliance/OSPolicyResourceCompliance.php new file mode 100644 index 000000000000..5c6d0c077f01 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignmentReport/OSPolicyCompliance/OSPolicyResourceCompliance.php @@ -0,0 +1,262 @@ +google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance + */ +class OSPolicyResourceCompliance extends \Google\Protobuf\Internal\Message +{ + /** + * The ID of the OS policy resource. + * + * Generated from protobuf field string os_policy_resource_id = 1; + */ + protected $os_policy_resource_id = ''; + /** + * Ordered list of configuration completed by the agent for the OS policy + * resource. + * + * Generated from protobuf field repeated .google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep config_steps = 2; + */ + private $config_steps; + /** + * The compliance state of the resource. + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ComplianceState compliance_state = 3; + */ + protected $compliance_state = 0; + /** + * A reason for the resource to be in the given compliance state. + * This field is always populated when `compliance_state` is `UNKNOWN`. + * The following values are supported when `compliance_state == UNKNOWN` + * * `execution-errors`: Errors were encountered by the agent while + * executing the resource and the compliance state couldn't be + * determined. + * * `execution-skipped-by-agent`: Resource execution was skipped by the + * agent because errors were encountered while executing prior resources + * in the OS policy. + * * `os-policy-execution-attempt-failed`: The execution of the OS policy + * containing this resource failed and the compliance state couldn't be + * determined. + * + * Generated from protobuf field string compliance_state_reason = 4; + */ + protected $compliance_state_reason = ''; + protected $output; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $os_policy_resource_id + * The ID of the OS policy resource. + * @type array<\Google\Cloud\OsConfig\V1\OSPolicyAssignmentReport\OSPolicyCompliance\OSPolicyResourceCompliance\OSPolicyResourceConfigStep>|\Google\Protobuf\Internal\RepeatedField $config_steps + * Ordered list of configuration completed by the agent for the OS policy + * resource. + * @type int $compliance_state + * The compliance state of the resource. + * @type string $compliance_state_reason + * A reason for the resource to be in the given compliance state. + * This field is always populated when `compliance_state` is `UNKNOWN`. + * The following values are supported when `compliance_state == UNKNOWN` + * * `execution-errors`: Errors were encountered by the agent while + * executing the resource and the compliance state couldn't be + * determined. + * * `execution-skipped-by-agent`: Resource execution was skipped by the + * agent because errors were encountered while executing prior resources + * in the OS policy. + * * `os-policy-execution-attempt-failed`: The execution of the OS policy + * containing this resource failed and the compliance state couldn't be + * determined. + * @type \Google\Cloud\OsConfig\V1\OSPolicyAssignmentReport\OSPolicyCompliance\OSPolicyResourceCompliance\ExecResourceOutput $exec_resource_output + * ExecResource specific output. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\OsPolicyAssignmentReports::initOnce(); + parent::__construct($data); + } + + /** + * The ID of the OS policy resource. + * + * Generated from protobuf field string os_policy_resource_id = 1; + * @return string + */ + public function getOsPolicyResourceId() + { + return $this->os_policy_resource_id; + } + + /** + * The ID of the OS policy resource. + * + * Generated from protobuf field string os_policy_resource_id = 1; + * @param string $var + * @return $this + */ + public function setOsPolicyResourceId($var) + { + GPBUtil::checkString($var, True); + $this->os_policy_resource_id = $var; + + return $this; + } + + /** + * Ordered list of configuration completed by the agent for the OS policy + * resource. + * + * Generated from protobuf field repeated .google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep config_steps = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getConfigSteps() + { + return $this->config_steps; + } + + /** + * Ordered list of configuration completed by the agent for the OS policy + * resource. + * + * Generated from protobuf field repeated .google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep config_steps = 2; + * @param array<\Google\Cloud\OsConfig\V1\OSPolicyAssignmentReport\OSPolicyCompliance\OSPolicyResourceCompliance\OSPolicyResourceConfigStep>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setConfigSteps($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\OsConfig\V1\OSPolicyAssignmentReport\OSPolicyCompliance\OSPolicyResourceCompliance\OSPolicyResourceConfigStep::class); + $this->config_steps = $arr; + + return $this; + } + + /** + * The compliance state of the resource. + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ComplianceState compliance_state = 3; + * @return int + */ + public function getComplianceState() + { + return $this->compliance_state; + } + + /** + * The compliance state of the resource. + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ComplianceState compliance_state = 3; + * @param int $var + * @return $this + */ + public function setComplianceState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\OsConfig\V1\OSPolicyAssignmentReport\OSPolicyCompliance\OSPolicyResourceCompliance\ComplianceState::class); + $this->compliance_state = $var; + + return $this; + } + + /** + * A reason for the resource to be in the given compliance state. + * This field is always populated when `compliance_state` is `UNKNOWN`. + * The following values are supported when `compliance_state == UNKNOWN` + * * `execution-errors`: Errors were encountered by the agent while + * executing the resource and the compliance state couldn't be + * determined. + * * `execution-skipped-by-agent`: Resource execution was skipped by the + * agent because errors were encountered while executing prior resources + * in the OS policy. + * * `os-policy-execution-attempt-failed`: The execution of the OS policy + * containing this resource failed and the compliance state couldn't be + * determined. + * + * Generated from protobuf field string compliance_state_reason = 4; + * @return string + */ + public function getComplianceStateReason() + { + return $this->compliance_state_reason; + } + + /** + * A reason for the resource to be in the given compliance state. + * This field is always populated when `compliance_state` is `UNKNOWN`. + * The following values are supported when `compliance_state == UNKNOWN` + * * `execution-errors`: Errors were encountered by the agent while + * executing the resource and the compliance state couldn't be + * determined. + * * `execution-skipped-by-agent`: Resource execution was skipped by the + * agent because errors were encountered while executing prior resources + * in the OS policy. + * * `os-policy-execution-attempt-failed`: The execution of the OS policy + * containing this resource failed and the compliance state couldn't be + * determined. + * + * Generated from protobuf field string compliance_state_reason = 4; + * @param string $var + * @return $this + */ + public function setComplianceStateReason($var) + { + GPBUtil::checkString($var, True); + $this->compliance_state_reason = $var; + + return $this; + } + + /** + * ExecResource specific output. + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput exec_resource_output = 5; + * @return \Google\Cloud\OsConfig\V1\OSPolicyAssignmentReport\OSPolicyCompliance\OSPolicyResourceCompliance\ExecResourceOutput|null + */ + public function getExecResourceOutput() + { + return $this->readOneof(5); + } + + public function hasExecResourceOutput() + { + return $this->hasOneof(5); + } + + /** + * ExecResource specific output. + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput exec_resource_output = 5; + * @param \Google\Cloud\OsConfig\V1\OSPolicyAssignmentReport\OSPolicyCompliance\OSPolicyResourceCompliance\ExecResourceOutput $var + * @return $this + */ + public function setExecResourceOutput($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\OSPolicyAssignmentReport\OSPolicyCompliance\OSPolicyResourceCompliance\ExecResourceOutput::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * @return string + */ + public function getOutput() + { + return $this->whichOneof("output"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(OSPolicyResourceCompliance::class, \Google\Cloud\OsConfig\V1\OSPolicyAssignmentReport_OSPolicyCompliance_OSPolicyResourceCompliance::class); + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignmentReport/OSPolicyCompliance/OSPolicyResourceCompliance/ComplianceState.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignmentReport/OSPolicyCompliance/OSPolicyResourceCompliance/ComplianceState.php new file mode 100644 index 000000000000..08bbcffb989c --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignmentReport/OSPolicyCompliance/OSPolicyResourceCompliance/ComplianceState.php @@ -0,0 +1,66 @@ +google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ComplianceState + */ +class ComplianceState +{ + /** + * The resource is in an unknown compliance state. + * To get more details about why the policy is in this state, review + * the output of the `compliance_state_reason` field. + * + * Generated from protobuf enum UNKNOWN = 0; + */ + const UNKNOWN = 0; + /** + * Resource is compliant. + * + * Generated from protobuf enum COMPLIANT = 1; + */ + const COMPLIANT = 1; + /** + * Resource is non-compliant. + * + * Generated from protobuf enum NON_COMPLIANT = 2; + */ + const NON_COMPLIANT = 2; + + private static $valueToName = [ + self::UNKNOWN => 'UNKNOWN', + self::COMPLIANT => 'COMPLIANT', + self::NON_COMPLIANT => 'NON_COMPLIANT', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ComplianceState::class, \Google\Cloud\OsConfig\V1\OSPolicyAssignmentReport_OSPolicyCompliance_OSPolicyResourceCompliance_ComplianceState::class); + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignmentReport/OSPolicyCompliance/OSPolicyResourceCompliance/ExecResourceOutput.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignmentReport/OSPolicyCompliance/OSPolicyResourceCompliance/ExecResourceOutput.php new file mode 100644 index 000000000000..8506100def1c --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignmentReport/OSPolicyCompliance/OSPolicyResourceCompliance/ExecResourceOutput.php @@ -0,0 +1,74 @@ +google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput + */ +class ExecResourceOutput extends \Google\Protobuf\Internal\Message +{ + /** + * Output from enforcement phase output file (if run). + * Output size is limited to 100K bytes. + * + * Generated from protobuf field bytes enforcement_output = 2; + */ + protected $enforcement_output = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $enforcement_output + * Output from enforcement phase output file (if run). + * Output size is limited to 100K bytes. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\OsPolicyAssignmentReports::initOnce(); + parent::__construct($data); + } + + /** + * Output from enforcement phase output file (if run). + * Output size is limited to 100K bytes. + * + * Generated from protobuf field bytes enforcement_output = 2; + * @return string + */ + public function getEnforcementOutput() + { + return $this->enforcement_output; + } + + /** + * Output from enforcement phase output file (if run). + * Output size is limited to 100K bytes. + * + * Generated from protobuf field bytes enforcement_output = 2; + * @param string $var + * @return $this + */ + public function setEnforcementOutput($var) + { + GPBUtil::checkString($var, False); + $this->enforcement_output = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ExecResourceOutput::class, \Google\Cloud\OsConfig\V1\OSPolicyAssignmentReport_OSPolicyCompliance_OSPolicyResourceCompliance_ExecResourceOutput::class); + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignmentReport/OSPolicyCompliance/OSPolicyResourceCompliance/OSPolicyResourceConfigStep.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignmentReport/OSPolicyCompliance/OSPolicyResourceCompliance/OSPolicyResourceConfigStep.php new file mode 100644 index 000000000000..0889e4a8a502 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignmentReport/OSPolicyCompliance/OSPolicyResourceCompliance/OSPolicyResourceConfigStep.php @@ -0,0 +1,109 @@ +google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep + */ +class OSPolicyResourceConfigStep extends \Google\Protobuf\Internal\Message +{ + /** + * Configuration step type. + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep.Type type = 1; + */ + protected $type = 0; + /** + * An error message recorded during the execution of this step. + * Only populated if errors were encountered during this step execution. + * + * Generated from protobuf field string error_message = 2; + */ + protected $error_message = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $type + * Configuration step type. + * @type string $error_message + * An error message recorded during the execution of this step. + * Only populated if errors were encountered during this step execution. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\OsPolicyAssignmentReports::initOnce(); + parent::__construct($data); + } + + /** + * Configuration step type. + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep.Type type = 1; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Configuration step type. + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep.Type type = 1; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\OsConfig\V1\OSPolicyAssignmentReport\OSPolicyCompliance\OSPolicyResourceCompliance\OSPolicyResourceConfigStep\Type::class); + $this->type = $var; + + return $this; + } + + /** + * An error message recorded during the execution of this step. + * Only populated if errors were encountered during this step execution. + * + * Generated from protobuf field string error_message = 2; + * @return string + */ + public function getErrorMessage() + { + return $this->error_message; + } + + /** + * An error message recorded during the execution of this step. + * Only populated if errors were encountered during this step execution. + * + * Generated from protobuf field string error_message = 2; + * @param string $var + * @return $this + */ + public function setErrorMessage($var) + { + GPBUtil::checkString($var, True); + $this->error_message = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(OSPolicyResourceConfigStep::class, \Google\Cloud\OsConfig\V1\OSPolicyAssignmentReport_OSPolicyCompliance_OSPolicyResourceCompliance_OSPolicyResourceConfigStep::class); + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignmentReport/OSPolicyCompliance/OSPolicyResourceCompliance/OSPolicyResourceConfigStep/Type.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignmentReport/OSPolicyCompliance/OSPolicyResourceCompliance/OSPolicyResourceConfigStep/Type.php new file mode 100644 index 000000000000..8e851817718e --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignmentReport/OSPolicyCompliance/OSPolicyResourceCompliance/OSPolicyResourceConfigStep/Type.php @@ -0,0 +1,84 @@ +google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep.Type + */ +class Type +{ + /** + * Default value. This value is unused. + * + * Generated from protobuf enum TYPE_UNSPECIFIED = 0; + */ + const TYPE_UNSPECIFIED = 0; + /** + * Checks for resource conflicts such as schema errors. + * + * Generated from protobuf enum VALIDATION = 1; + */ + const VALIDATION = 1; + /** + * Checks the current status of the desired state for a resource. + * + * Generated from protobuf enum DESIRED_STATE_CHECK = 2; + */ + const DESIRED_STATE_CHECK = 2; + /** + * Enforces the desired state for a resource that is not in desired + * state. + * + * Generated from protobuf enum DESIRED_STATE_ENFORCEMENT = 3; + */ + const DESIRED_STATE_ENFORCEMENT = 3; + /** + * Re-checks the status of the desired state. This check is done + * for a resource after the enforcement of all OS policies. + * This step is used to determine the final desired state status for + * the resource. It accounts for any resources that might have drifted + * from their desired state due to side effects from executing other + * resources. + * + * Generated from protobuf enum DESIRED_STATE_CHECK_POST_ENFORCEMENT = 4; + */ + const DESIRED_STATE_CHECK_POST_ENFORCEMENT = 4; + + private static $valueToName = [ + self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', + self::VALIDATION => 'VALIDATION', + self::DESIRED_STATE_CHECK => 'DESIRED_STATE_CHECK', + self::DESIRED_STATE_ENFORCEMENT => 'DESIRED_STATE_ENFORCEMENT', + self::DESIRED_STATE_CHECK_POST_ENFORCEMENT => 'DESIRED_STATE_CHECK_POST_ENFORCEMENT', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Type::class, \Google\Cloud\OsConfig\V1\OSPolicyAssignmentReport_OSPolicyCompliance_OSPolicyResourceCompliance_OSPolicyResourceConfigStep_Type::class); + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OneTimeSchedule.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OneTimeSchedule.php new file mode 100644 index 000000000000..df8040508dee --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OneTimeSchedule.php @@ -0,0 +1,78 @@ +google.cloud.osconfig.v1.OneTimeSchedule + */ +class OneTimeSchedule extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The desired patch job execution time. + * + * Generated from protobuf field .google.protobuf.Timestamp execute_time = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $execute_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $execute_time + * Required. The desired patch job execution time. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\PatchDeployments::initOnce(); + parent::__construct($data); + } + + /** + * Required. The desired patch job execution time. + * + * Generated from protobuf field .google.protobuf.Timestamp execute_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getExecuteTime() + { + return $this->execute_time; + } + + public function hasExecuteTime() + { + return isset($this->execute_time); + } + + public function clearExecuteTime() + { + unset($this->execute_time); + } + + /** + * Required. The desired patch job execution time. + * + * Generated from protobuf field .google.protobuf.Timestamp execute_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setExecuteTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->execute_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PatchConfig.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PatchConfig.php new file mode 100644 index 000000000000..c8bdadd845fb --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PatchConfig.php @@ -0,0 +1,426 @@ +google.cloud.osconfig.v1.PatchConfig + */ +class PatchConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Post-patch reboot settings. + * + * Generated from protobuf field .google.cloud.osconfig.v1.PatchConfig.RebootConfig reboot_config = 1; + */ + protected $reboot_config = 0; + /** + * Apt update settings. Use this setting to override the default `apt` patch + * rules. + * + * Generated from protobuf field .google.cloud.osconfig.v1.AptSettings apt = 3; + */ + protected $apt = null; + /** + * Yum update settings. Use this setting to override the default `yum` patch + * rules. + * + * Generated from protobuf field .google.cloud.osconfig.v1.YumSettings yum = 4; + */ + protected $yum = null; + /** + * Goo update settings. Use this setting to override the default `goo` patch + * rules. + * + * Generated from protobuf field .google.cloud.osconfig.v1.GooSettings goo = 5; + */ + protected $goo = null; + /** + * Zypper update settings. Use this setting to override the default `zypper` + * patch rules. + * + * Generated from protobuf field .google.cloud.osconfig.v1.ZypperSettings zypper = 6; + */ + protected $zypper = null; + /** + * Windows update settings. Use this override the default windows patch rules. + * + * Generated from protobuf field .google.cloud.osconfig.v1.WindowsUpdateSettings windows_update = 7; + */ + protected $windows_update = null; + /** + * The `ExecStep` to run before the patch update. + * + * Generated from protobuf field .google.cloud.osconfig.v1.ExecStep pre_step = 8; + */ + protected $pre_step = null; + /** + * The `ExecStep` to run after the patch update. + * + * Generated from protobuf field .google.cloud.osconfig.v1.ExecStep post_step = 9; + */ + protected $post_step = null; + /** + * Allows the patch job to run on Managed instance groups (MIGs). + * + * Generated from protobuf field bool mig_instances_allowed = 10; + */ + protected $mig_instances_allowed = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $reboot_config + * Post-patch reboot settings. + * @type \Google\Cloud\OsConfig\V1\AptSettings $apt + * Apt update settings. Use this setting to override the default `apt` patch + * rules. + * @type \Google\Cloud\OsConfig\V1\YumSettings $yum + * Yum update settings. Use this setting to override the default `yum` patch + * rules. + * @type \Google\Cloud\OsConfig\V1\GooSettings $goo + * Goo update settings. Use this setting to override the default `goo` patch + * rules. + * @type \Google\Cloud\OsConfig\V1\ZypperSettings $zypper + * Zypper update settings. Use this setting to override the default `zypper` + * patch rules. + * @type \Google\Cloud\OsConfig\V1\WindowsUpdateSettings $windows_update + * Windows update settings. Use this override the default windows patch rules. + * @type \Google\Cloud\OsConfig\V1\ExecStep $pre_step + * The `ExecStep` to run before the patch update. + * @type \Google\Cloud\OsConfig\V1\ExecStep $post_step + * The `ExecStep` to run after the patch update. + * @type bool $mig_instances_allowed + * Allows the patch job to run on Managed instance groups (MIGs). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\PatchJobs::initOnce(); + parent::__construct($data); + } + + /** + * Post-patch reboot settings. + * + * Generated from protobuf field .google.cloud.osconfig.v1.PatchConfig.RebootConfig reboot_config = 1; + * @return int + */ + public function getRebootConfig() + { + return $this->reboot_config; + } + + /** + * Post-patch reboot settings. + * + * Generated from protobuf field .google.cloud.osconfig.v1.PatchConfig.RebootConfig reboot_config = 1; + * @param int $var + * @return $this + */ + public function setRebootConfig($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\OsConfig\V1\PatchConfig\RebootConfig::class); + $this->reboot_config = $var; + + return $this; + } + + /** + * Apt update settings. Use this setting to override the default `apt` patch + * rules. + * + * Generated from protobuf field .google.cloud.osconfig.v1.AptSettings apt = 3; + * @return \Google\Cloud\OsConfig\V1\AptSettings|null + */ + public function getApt() + { + return $this->apt; + } + + public function hasApt() + { + return isset($this->apt); + } + + public function clearApt() + { + unset($this->apt); + } + + /** + * Apt update settings. Use this setting to override the default `apt` patch + * rules. + * + * Generated from protobuf field .google.cloud.osconfig.v1.AptSettings apt = 3; + * @param \Google\Cloud\OsConfig\V1\AptSettings $var + * @return $this + */ + public function setApt($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\AptSettings::class); + $this->apt = $var; + + return $this; + } + + /** + * Yum update settings. Use this setting to override the default `yum` patch + * rules. + * + * Generated from protobuf field .google.cloud.osconfig.v1.YumSettings yum = 4; + * @return \Google\Cloud\OsConfig\V1\YumSettings|null + */ + public function getYum() + { + return $this->yum; + } + + public function hasYum() + { + return isset($this->yum); + } + + public function clearYum() + { + unset($this->yum); + } + + /** + * Yum update settings. Use this setting to override the default `yum` patch + * rules. + * + * Generated from protobuf field .google.cloud.osconfig.v1.YumSettings yum = 4; + * @param \Google\Cloud\OsConfig\V1\YumSettings $var + * @return $this + */ + public function setYum($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\YumSettings::class); + $this->yum = $var; + + return $this; + } + + /** + * Goo update settings. Use this setting to override the default `goo` patch + * rules. + * + * Generated from protobuf field .google.cloud.osconfig.v1.GooSettings goo = 5; + * @return \Google\Cloud\OsConfig\V1\GooSettings|null + */ + public function getGoo() + { + return $this->goo; + } + + public function hasGoo() + { + return isset($this->goo); + } + + public function clearGoo() + { + unset($this->goo); + } + + /** + * Goo update settings. Use this setting to override the default `goo` patch + * rules. + * + * Generated from protobuf field .google.cloud.osconfig.v1.GooSettings goo = 5; + * @param \Google\Cloud\OsConfig\V1\GooSettings $var + * @return $this + */ + public function setGoo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\GooSettings::class); + $this->goo = $var; + + return $this; + } + + /** + * Zypper update settings. Use this setting to override the default `zypper` + * patch rules. + * + * Generated from protobuf field .google.cloud.osconfig.v1.ZypperSettings zypper = 6; + * @return \Google\Cloud\OsConfig\V1\ZypperSettings|null + */ + public function getZypper() + { + return $this->zypper; + } + + public function hasZypper() + { + return isset($this->zypper); + } + + public function clearZypper() + { + unset($this->zypper); + } + + /** + * Zypper update settings. Use this setting to override the default `zypper` + * patch rules. + * + * Generated from protobuf field .google.cloud.osconfig.v1.ZypperSettings zypper = 6; + * @param \Google\Cloud\OsConfig\V1\ZypperSettings $var + * @return $this + */ + public function setZypper($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\ZypperSettings::class); + $this->zypper = $var; + + return $this; + } + + /** + * Windows update settings. Use this override the default windows patch rules. + * + * Generated from protobuf field .google.cloud.osconfig.v1.WindowsUpdateSettings windows_update = 7; + * @return \Google\Cloud\OsConfig\V1\WindowsUpdateSettings|null + */ + public function getWindowsUpdate() + { + return $this->windows_update; + } + + public function hasWindowsUpdate() + { + return isset($this->windows_update); + } + + public function clearWindowsUpdate() + { + unset($this->windows_update); + } + + /** + * Windows update settings. Use this override the default windows patch rules. + * + * Generated from protobuf field .google.cloud.osconfig.v1.WindowsUpdateSettings windows_update = 7; + * @param \Google\Cloud\OsConfig\V1\WindowsUpdateSettings $var + * @return $this + */ + public function setWindowsUpdate($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\WindowsUpdateSettings::class); + $this->windows_update = $var; + + return $this; + } + + /** + * The `ExecStep` to run before the patch update. + * + * Generated from protobuf field .google.cloud.osconfig.v1.ExecStep pre_step = 8; + * @return \Google\Cloud\OsConfig\V1\ExecStep|null + */ + public function getPreStep() + { + return $this->pre_step; + } + + public function hasPreStep() + { + return isset($this->pre_step); + } + + public function clearPreStep() + { + unset($this->pre_step); + } + + /** + * The `ExecStep` to run before the patch update. + * + * Generated from protobuf field .google.cloud.osconfig.v1.ExecStep pre_step = 8; + * @param \Google\Cloud\OsConfig\V1\ExecStep $var + * @return $this + */ + public function setPreStep($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\ExecStep::class); + $this->pre_step = $var; + + return $this; + } + + /** + * The `ExecStep` to run after the patch update. + * + * Generated from protobuf field .google.cloud.osconfig.v1.ExecStep post_step = 9; + * @return \Google\Cloud\OsConfig\V1\ExecStep|null + */ + public function getPostStep() + { + return $this->post_step; + } + + public function hasPostStep() + { + return isset($this->post_step); + } + + public function clearPostStep() + { + unset($this->post_step); + } + + /** + * The `ExecStep` to run after the patch update. + * + * Generated from protobuf field .google.cloud.osconfig.v1.ExecStep post_step = 9; + * @param \Google\Cloud\OsConfig\V1\ExecStep $var + * @return $this + */ + public function setPostStep($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\ExecStep::class); + $this->post_step = $var; + + return $this; + } + + /** + * Allows the patch job to run on Managed instance groups (MIGs). + * + * Generated from protobuf field bool mig_instances_allowed = 10; + * @return bool + */ + public function getMigInstancesAllowed() + { + return $this->mig_instances_allowed; + } + + /** + * Allows the patch job to run on Managed instance groups (MIGs). + * + * Generated from protobuf field bool mig_instances_allowed = 10; + * @param bool $var + * @return $this + */ + public function setMigInstancesAllowed($var) + { + GPBUtil::checkBool($var); + $this->mig_instances_allowed = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PatchConfig/RebootConfig.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PatchConfig/RebootConfig.php new file mode 100644 index 000000000000..7448831d19a5 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PatchConfig/RebootConfig.php @@ -0,0 +1,78 @@ +google.cloud.osconfig.v1.PatchConfig.RebootConfig + */ +class RebootConfig +{ + /** + * The default behavior is DEFAULT. + * + * Generated from protobuf enum REBOOT_CONFIG_UNSPECIFIED = 0; + */ + const REBOOT_CONFIG_UNSPECIFIED = 0; + /** + * The agent decides if a reboot is necessary by checking signals such as + * registry keys on Windows or `/var/run/reboot-required` on APT based + * systems. On RPM based systems, a set of core system package install times + * are compared with system boot time. + * + * Generated from protobuf enum DEFAULT = 1; + */ + const PBDEFAULT = 1; + /** + * Always reboot the machine after the update completes. + * + * Generated from protobuf enum ALWAYS = 2; + */ + const ALWAYS = 2; + /** + * Never reboot the machine after the update completes. + * + * Generated from protobuf enum NEVER = 3; + */ + const NEVER = 3; + + private static $valueToName = [ + self::REBOOT_CONFIG_UNSPECIFIED => 'REBOOT_CONFIG_UNSPECIFIED', + self::PBDEFAULT => 'DEFAULT', + self::ALWAYS => 'ALWAYS', + self::NEVER => 'NEVER', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + $pbconst = __CLASS__. '::PB' . strtoupper($name); + if (!defined($pbconst)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($pbconst); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(RebootConfig::class, \Google\Cloud\OsConfig\V1\PatchConfig_RebootConfig::class); + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PatchDeployment.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PatchDeployment.php new file mode 100644 index 000000000000..ed3802a67ee2 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PatchDeployment.php @@ -0,0 +1,558 @@ +google.cloud.osconfig.v1.PatchDeployment + */ +class PatchDeployment extends \Google\Protobuf\Internal\Message +{ + /** + * Unique name for the patch deployment resource in a project. The patch + * deployment name is in the form: + * `projects/{project_id}/patchDeployments/{patch_deployment_id}`. + * This field is ignored when you create a new patch deployment. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Optional. Description of the patch deployment. Length of the description is + * limited to 1024 characters. + * + * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Required. VM instances to patch. + * + * Generated from protobuf field .google.cloud.osconfig.v1.PatchInstanceFilter instance_filter = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $instance_filter = null; + /** + * Optional. Patch configuration that is applied. + * + * Generated from protobuf field .google.cloud.osconfig.v1.PatchConfig patch_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $patch_config = null; + /** + * Optional. Duration of the patch. After the duration ends, the patch times + * out. + * + * Generated from protobuf field .google.protobuf.Duration duration = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $duration = null; + /** + * Output only. Time the patch deployment was created. Timestamp is in + * [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. Time the patch deployment was last updated. Timestamp is in + * [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Output only. The last time a patch job was started by this deployment. + * Timestamp is in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text + * format. + * + * Generated from protobuf field .google.protobuf.Timestamp last_execute_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $last_execute_time = null; + /** + * Optional. Rollout strategy of the patch job. + * + * Generated from protobuf field .google.cloud.osconfig.v1.PatchRollout rollout = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $rollout = null; + /** + * Output only. Current state of the patch deployment. + * + * Generated from protobuf field .google.cloud.osconfig.v1.PatchDeployment.State state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + protected $schedule; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Unique name for the patch deployment resource in a project. The patch + * deployment name is in the form: + * `projects/{project_id}/patchDeployments/{patch_deployment_id}`. + * This field is ignored when you create a new patch deployment. + * @type string $description + * Optional. Description of the patch deployment. Length of the description is + * limited to 1024 characters. + * @type \Google\Cloud\OsConfig\V1\PatchInstanceFilter $instance_filter + * Required. VM instances to patch. + * @type \Google\Cloud\OsConfig\V1\PatchConfig $patch_config + * Optional. Patch configuration that is applied. + * @type \Google\Protobuf\Duration $duration + * Optional. Duration of the patch. After the duration ends, the patch times + * out. + * @type \Google\Cloud\OsConfig\V1\OneTimeSchedule $one_time_schedule + * Required. Schedule a one-time execution. + * @type \Google\Cloud\OsConfig\V1\RecurringSchedule $recurring_schedule + * Required. Schedule recurring executions. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Time the patch deployment was created. Timestamp is in + * [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. Time the patch deployment was last updated. Timestamp is in + * [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. + * @type \Google\Protobuf\Timestamp $last_execute_time + * Output only. The last time a patch job was started by this deployment. + * Timestamp is in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text + * format. + * @type \Google\Cloud\OsConfig\V1\PatchRollout $rollout + * Optional. Rollout strategy of the patch job. + * @type int $state + * Output only. Current state of the patch deployment. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\PatchDeployments::initOnce(); + parent::__construct($data); + } + + /** + * Unique name for the patch deployment resource in a project. The patch + * deployment name is in the form: + * `projects/{project_id}/patchDeployments/{patch_deployment_id}`. + * This field is ignored when you create a new patch deployment. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Unique name for the patch deployment resource in a project. The patch + * deployment name is in the form: + * `projects/{project_id}/patchDeployments/{patch_deployment_id}`. + * This field is ignored when you create a new patch deployment. + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. Description of the patch deployment. Length of the description is + * limited to 1024 characters. + * + * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. Description of the patch deployment. Length of the description is + * limited to 1024 characters. + * + * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Required. VM instances to patch. + * + * Generated from protobuf field .google.cloud.osconfig.v1.PatchInstanceFilter instance_filter = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\OsConfig\V1\PatchInstanceFilter|null + */ + public function getInstanceFilter() + { + return $this->instance_filter; + } + + public function hasInstanceFilter() + { + return isset($this->instance_filter); + } + + public function clearInstanceFilter() + { + unset($this->instance_filter); + } + + /** + * Required. VM instances to patch. + * + * Generated from protobuf field .google.cloud.osconfig.v1.PatchInstanceFilter instance_filter = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\OsConfig\V1\PatchInstanceFilter $var + * @return $this + */ + public function setInstanceFilter($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\PatchInstanceFilter::class); + $this->instance_filter = $var; + + return $this; + } + + /** + * Optional. Patch configuration that is applied. + * + * Generated from protobuf field .google.cloud.osconfig.v1.PatchConfig patch_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\OsConfig\V1\PatchConfig|null + */ + public function getPatchConfig() + { + return $this->patch_config; + } + + public function hasPatchConfig() + { + return isset($this->patch_config); + } + + public function clearPatchConfig() + { + unset($this->patch_config); + } + + /** + * Optional. Patch configuration that is applied. + * + * Generated from protobuf field .google.cloud.osconfig.v1.PatchConfig patch_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\OsConfig\V1\PatchConfig $var + * @return $this + */ + public function setPatchConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\PatchConfig::class); + $this->patch_config = $var; + + return $this; + } + + /** + * Optional. Duration of the patch. After the duration ends, the patch times + * out. + * + * Generated from protobuf field .google.protobuf.Duration duration = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Duration|null + */ + public function getDuration() + { + return $this->duration; + } + + public function hasDuration() + { + return isset($this->duration); + } + + public function clearDuration() + { + unset($this->duration); + } + + /** + * Optional. Duration of the patch. After the duration ends, the patch times + * out. + * + * Generated from protobuf field .google.protobuf.Duration duration = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->duration = $var; + + return $this; + } + + /** + * Required. Schedule a one-time execution. + * + * Generated from protobuf field .google.cloud.osconfig.v1.OneTimeSchedule one_time_schedule = 6 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\OsConfig\V1\OneTimeSchedule|null + */ + public function getOneTimeSchedule() + { + return $this->readOneof(6); + } + + public function hasOneTimeSchedule() + { + return $this->hasOneof(6); + } + + /** + * Required. Schedule a one-time execution. + * + * Generated from protobuf field .google.cloud.osconfig.v1.OneTimeSchedule one_time_schedule = 6 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\OsConfig\V1\OneTimeSchedule $var + * @return $this + */ + public function setOneTimeSchedule($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\OneTimeSchedule::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * Required. Schedule recurring executions. + * + * Generated from protobuf field .google.cloud.osconfig.v1.RecurringSchedule recurring_schedule = 7 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\OsConfig\V1\RecurringSchedule|null + */ + public function getRecurringSchedule() + { + return $this->readOneof(7); + } + + public function hasRecurringSchedule() + { + return $this->hasOneof(7); + } + + /** + * Required. Schedule recurring executions. + * + * Generated from protobuf field .google.cloud.osconfig.v1.RecurringSchedule recurring_schedule = 7 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\OsConfig\V1\RecurringSchedule $var + * @return $this + */ + public function setRecurringSchedule($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\RecurringSchedule::class); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * Output only. Time the patch deployment was created. Timestamp is in + * [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. Time the patch deployment was created. Timestamp is in + * [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. Time the patch deployment was last updated. Timestamp is in + * [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. Time the patch deployment was last updated. Timestamp is in + * [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Output only. The last time a patch job was started by this deployment. + * Timestamp is in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text + * format. + * + * Generated from protobuf field .google.protobuf.Timestamp last_execute_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getLastExecuteTime() + { + return $this->last_execute_time; + } + + public function hasLastExecuteTime() + { + return isset($this->last_execute_time); + } + + public function clearLastExecuteTime() + { + unset($this->last_execute_time); + } + + /** + * Output only. The last time a patch job was started by this deployment. + * Timestamp is in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text + * format. + * + * Generated from protobuf field .google.protobuf.Timestamp last_execute_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setLastExecuteTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->last_execute_time = $var; + + return $this; + } + + /** + * Optional. Rollout strategy of the patch job. + * + * Generated from protobuf field .google.cloud.osconfig.v1.PatchRollout rollout = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\OsConfig\V1\PatchRollout|null + */ + public function getRollout() + { + return $this->rollout; + } + + public function hasRollout() + { + return isset($this->rollout); + } + + public function clearRollout() + { + unset($this->rollout); + } + + /** + * Optional. Rollout strategy of the patch job. + * + * Generated from protobuf field .google.cloud.osconfig.v1.PatchRollout rollout = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\OsConfig\V1\PatchRollout $var + * @return $this + */ + public function setRollout($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\PatchRollout::class); + $this->rollout = $var; + + return $this; + } + + /** + * Output only. Current state of the patch deployment. + * + * Generated from protobuf field .google.cloud.osconfig.v1.PatchDeployment.State state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. Current state of the patch deployment. + * + * Generated from protobuf field .google.cloud.osconfig.v1.PatchDeployment.State state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\OsConfig\V1\PatchDeployment\State::class); + $this->state = $var; + + return $this; + } + + /** + * @return string + */ + public function getSchedule() + { + return $this->whichOneof("schedule"); + } + +} + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PatchDeployment/State.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PatchDeployment/State.php new file mode 100644 index 000000000000..5b4375fab273 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PatchDeployment/State.php @@ -0,0 +1,65 @@ +google.cloud.osconfig.v1.PatchDeployment.State + */ +class State +{ + /** + * The default value. This value is used if the state is omitted. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Active value means that patch deployment generates Patch Jobs. + * + * Generated from protobuf enum ACTIVE = 1; + */ + const ACTIVE = 1; + /** + * Paused value means that patch deployment does not generate + * Patch jobs. Requires user action to move in and out from this state. + * + * Generated from protobuf enum PAUSED = 2; + */ + const PAUSED = 2; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::ACTIVE => 'ACTIVE', + self::PAUSED => 'PAUSED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\OsConfig\V1\PatchDeployment_State::class); + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PatchInstanceFilter.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PatchInstanceFilter.php new file mode 100644 index 000000000000..81bb99323274 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PatchInstanceFilter.php @@ -0,0 +1,238 @@ +google.cloud.osconfig.v1.PatchInstanceFilter + */ +class PatchInstanceFilter extends \Google\Protobuf\Internal\Message +{ + /** + * Target all VM instances in the project. If true, no other criteria is + * permitted. + * + * Generated from protobuf field bool all = 1; + */ + protected $all = false; + /** + * Targets VM instances matching ANY of these GroupLabels. This allows + * targeting of disparate groups of VM instances. + * + * Generated from protobuf field repeated .google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel group_labels = 2; + */ + private $group_labels; + /** + * Targets VM instances in ANY of these zones. Leave empty to target VM + * instances in any zone. + * + * Generated from protobuf field repeated string zones = 3; + */ + private $zones; + /** + * Targets any of the VM instances specified. Instances are specified by their + * URI in the form `zones/[ZONE]/instances/[INSTANCE_NAME]`, + * `projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]`, or + * `https://www.googleapis.com/compute/v1/projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]` + * + * Generated from protobuf field repeated string instances = 4; + */ + private $instances; + /** + * Targets VMs whose name starts with one of these prefixes. Similar to + * labels, this is another way to group VMs when targeting configs, for + * example prefix="prod-". + * + * Generated from protobuf field repeated string instance_name_prefixes = 5; + */ + private $instance_name_prefixes; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $all + * Target all VM instances in the project. If true, no other criteria is + * permitted. + * @type array<\Google\Cloud\OsConfig\V1\PatchInstanceFilter\GroupLabel>|\Google\Protobuf\Internal\RepeatedField $group_labels + * Targets VM instances matching ANY of these GroupLabels. This allows + * targeting of disparate groups of VM instances. + * @type array|\Google\Protobuf\Internal\RepeatedField $zones + * Targets VM instances in ANY of these zones. Leave empty to target VM + * instances in any zone. + * @type array|\Google\Protobuf\Internal\RepeatedField $instances + * Targets any of the VM instances specified. Instances are specified by their + * URI in the form `zones/[ZONE]/instances/[INSTANCE_NAME]`, + * `projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]`, or + * `https://www.googleapis.com/compute/v1/projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]` + * @type array|\Google\Protobuf\Internal\RepeatedField $instance_name_prefixes + * Targets VMs whose name starts with one of these prefixes. Similar to + * labels, this is another way to group VMs when targeting configs, for + * example prefix="prod-". + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\PatchJobs::initOnce(); + parent::__construct($data); + } + + /** + * Target all VM instances in the project. If true, no other criteria is + * permitted. + * + * Generated from protobuf field bool all = 1; + * @return bool + */ + public function getAll() + { + return $this->all; + } + + /** + * Target all VM instances in the project. If true, no other criteria is + * permitted. + * + * Generated from protobuf field bool all = 1; + * @param bool $var + * @return $this + */ + public function setAll($var) + { + GPBUtil::checkBool($var); + $this->all = $var; + + return $this; + } + + /** + * Targets VM instances matching ANY of these GroupLabels. This allows + * targeting of disparate groups of VM instances. + * + * Generated from protobuf field repeated .google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel group_labels = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getGroupLabels() + { + return $this->group_labels; + } + + /** + * Targets VM instances matching ANY of these GroupLabels. This allows + * targeting of disparate groups of VM instances. + * + * Generated from protobuf field repeated .google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel group_labels = 2; + * @param array<\Google\Cloud\OsConfig\V1\PatchInstanceFilter\GroupLabel>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setGroupLabels($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\OsConfig\V1\PatchInstanceFilter\GroupLabel::class); + $this->group_labels = $arr; + + return $this; + } + + /** + * Targets VM instances in ANY of these zones. Leave empty to target VM + * instances in any zone. + * + * Generated from protobuf field repeated string zones = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getZones() + { + return $this->zones; + } + + /** + * Targets VM instances in ANY of these zones. Leave empty to target VM + * instances in any zone. + * + * Generated from protobuf field repeated string zones = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setZones($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->zones = $arr; + + return $this; + } + + /** + * Targets any of the VM instances specified. Instances are specified by their + * URI in the form `zones/[ZONE]/instances/[INSTANCE_NAME]`, + * `projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]`, or + * `https://www.googleapis.com/compute/v1/projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]` + * + * Generated from protobuf field repeated string instances = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getInstances() + { + return $this->instances; + } + + /** + * Targets any of the VM instances specified. Instances are specified by their + * URI in the form `zones/[ZONE]/instances/[INSTANCE_NAME]`, + * `projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]`, or + * `https://www.googleapis.com/compute/v1/projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]` + * + * Generated from protobuf field repeated string instances = 4; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setInstances($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->instances = $arr; + + return $this; + } + + /** + * Targets VMs whose name starts with one of these prefixes. Similar to + * labels, this is another way to group VMs when targeting configs, for + * example prefix="prod-". + * + * Generated from protobuf field repeated string instance_name_prefixes = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getInstanceNamePrefixes() + { + return $this->instance_name_prefixes; + } + + /** + * Targets VMs whose name starts with one of these prefixes. Similar to + * labels, this is another way to group VMs when targeting configs, for + * example prefix="prod-". + * + * Generated from protobuf field repeated string instance_name_prefixes = 5; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setInstanceNamePrefixes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->instance_name_prefixes = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PatchInstanceFilter/GroupLabel.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PatchInstanceFilter/GroupLabel.php new file mode 100644 index 000000000000..7a50a5d80ec0 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PatchInstanceFilter/GroupLabel.php @@ -0,0 +1,80 @@ +google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel + */ +class GroupLabel extends \Google\Protobuf\Internal\Message +{ + /** + * Compute Engine instance labels that must be present for a VM + * instance to be targeted by this filter. + * + * Generated from protobuf field map labels = 1; + */ + private $labels; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\MapField $labels + * Compute Engine instance labels that must be present for a VM + * instance to be targeted by this filter. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\PatchJobs::initOnce(); + parent::__construct($data); + } + + /** + * Compute Engine instance labels that must be present for a VM + * instance to be targeted by this filter. + * + * Generated from protobuf field map labels = 1; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Compute Engine instance labels that must be present for a VM + * instance to be targeted by this filter. + * + * Generated from protobuf field map labels = 1; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(GroupLabel::class, \Google\Cloud\OsConfig\V1\PatchInstanceFilter_GroupLabel::class); + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PatchJob.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PatchJob.php new file mode 100644 index 000000000000..be710e1e9926 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PatchJob.php @@ -0,0 +1,643 @@ +google.cloud.osconfig.v1.PatchJob + */ +class PatchJob extends \Google\Protobuf\Internal\Message +{ + /** + * Unique identifier for this patch job in the form + * `projects/*/patchJobs/*` + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Display name for this patch job. This is not a unique identifier. + * + * Generated from protobuf field string display_name = 14; + */ + protected $display_name = ''; + /** + * Description of the patch job. Length of the description is limited + * to 1024 characters. + * + * Generated from protobuf field string description = 2; + */ + protected $description = ''; + /** + * Time this patch job was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; + */ + protected $create_time = null; + /** + * Last time this patch job was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4; + */ + protected $update_time = null; + /** + * The current state of the PatchJob. + * + * Generated from protobuf field .google.cloud.osconfig.v1.PatchJob.State state = 5; + */ + protected $state = 0; + /** + * Instances to patch. + * + * Generated from protobuf field .google.cloud.osconfig.v1.PatchInstanceFilter instance_filter = 13; + */ + protected $instance_filter = null; + /** + * Patch configuration being applied. + * + * Generated from protobuf field .google.cloud.osconfig.v1.PatchConfig patch_config = 7; + */ + protected $patch_config = null; + /** + * Duration of the patch job. After the duration ends, the + * patch job times out. + * + * Generated from protobuf field .google.protobuf.Duration duration = 8; + */ + protected $duration = null; + /** + * Summary of instance details. + * + * Generated from protobuf field .google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary instance_details_summary = 9; + */ + protected $instance_details_summary = null; + /** + * If this patch job is a dry run, the agent reports that it has + * finished without running any updates on the VM instance. + * + * Generated from protobuf field bool dry_run = 10; + */ + protected $dry_run = false; + /** + * If this patch job failed, this message provides information about the + * failure. + * + * Generated from protobuf field string error_message = 11; + */ + protected $error_message = ''; + /** + * Reflects the overall progress of the patch job in the range of + * 0.0 being no progress to 100.0 being complete. + * + * Generated from protobuf field double percent_complete = 12; + */ + protected $percent_complete = 0.0; + /** + * Output only. Name of the patch deployment that created this patch job. + * + * Generated from protobuf field string patch_deployment = 15 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $patch_deployment = ''; + /** + * Rollout strategy being applied. + * + * Generated from protobuf field .google.cloud.osconfig.v1.PatchRollout rollout = 16; + */ + protected $rollout = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Unique identifier for this patch job in the form + * `projects/*/patchJobs/*` + * @type string $display_name + * Display name for this patch job. This is not a unique identifier. + * @type string $description + * Description of the patch job. Length of the description is limited + * to 1024 characters. + * @type \Google\Protobuf\Timestamp $create_time + * Time this patch job was created. + * @type \Google\Protobuf\Timestamp $update_time + * Last time this patch job was updated. + * @type int $state + * The current state of the PatchJob. + * @type \Google\Cloud\OsConfig\V1\PatchInstanceFilter $instance_filter + * Instances to patch. + * @type \Google\Cloud\OsConfig\V1\PatchConfig $patch_config + * Patch configuration being applied. + * @type \Google\Protobuf\Duration $duration + * Duration of the patch job. After the duration ends, the + * patch job times out. + * @type \Google\Cloud\OsConfig\V1\PatchJob\InstanceDetailsSummary $instance_details_summary + * Summary of instance details. + * @type bool $dry_run + * If this patch job is a dry run, the agent reports that it has + * finished without running any updates on the VM instance. + * @type string $error_message + * If this patch job failed, this message provides information about the + * failure. + * @type float $percent_complete + * Reflects the overall progress of the patch job in the range of + * 0.0 being no progress to 100.0 being complete. + * @type string $patch_deployment + * Output only. Name of the patch deployment that created this patch job. + * @type \Google\Cloud\OsConfig\V1\PatchRollout $rollout + * Rollout strategy being applied. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\PatchJobs::initOnce(); + parent::__construct($data); + } + + /** + * Unique identifier for this patch job in the form + * `projects/*/patchJobs/*` + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Unique identifier for this patch job in the form + * `projects/*/patchJobs/*` + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Display name for this patch job. This is not a unique identifier. + * + * Generated from protobuf field string display_name = 14; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Display name for this patch job. This is not a unique identifier. + * + * Generated from protobuf field string display_name = 14; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Description of the patch job. Length of the description is limited + * to 1024 characters. + * + * Generated from protobuf field string description = 2; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Description of the patch job. Length of the description is limited + * to 1024 characters. + * + * Generated from protobuf field string description = 2; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Time this patch job was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Time this patch job was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Last time this patch job was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Last time this patch job was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * The current state of the PatchJob. + * + * Generated from protobuf field .google.cloud.osconfig.v1.PatchJob.State state = 5; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * The current state of the PatchJob. + * + * Generated from protobuf field .google.cloud.osconfig.v1.PatchJob.State state = 5; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\OsConfig\V1\PatchJob\State::class); + $this->state = $var; + + return $this; + } + + /** + * Instances to patch. + * + * Generated from protobuf field .google.cloud.osconfig.v1.PatchInstanceFilter instance_filter = 13; + * @return \Google\Cloud\OsConfig\V1\PatchInstanceFilter|null + */ + public function getInstanceFilter() + { + return $this->instance_filter; + } + + public function hasInstanceFilter() + { + return isset($this->instance_filter); + } + + public function clearInstanceFilter() + { + unset($this->instance_filter); + } + + /** + * Instances to patch. + * + * Generated from protobuf field .google.cloud.osconfig.v1.PatchInstanceFilter instance_filter = 13; + * @param \Google\Cloud\OsConfig\V1\PatchInstanceFilter $var + * @return $this + */ + public function setInstanceFilter($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\PatchInstanceFilter::class); + $this->instance_filter = $var; + + return $this; + } + + /** + * Patch configuration being applied. + * + * Generated from protobuf field .google.cloud.osconfig.v1.PatchConfig patch_config = 7; + * @return \Google\Cloud\OsConfig\V1\PatchConfig|null + */ + public function getPatchConfig() + { + return $this->patch_config; + } + + public function hasPatchConfig() + { + return isset($this->patch_config); + } + + public function clearPatchConfig() + { + unset($this->patch_config); + } + + /** + * Patch configuration being applied. + * + * Generated from protobuf field .google.cloud.osconfig.v1.PatchConfig patch_config = 7; + * @param \Google\Cloud\OsConfig\V1\PatchConfig $var + * @return $this + */ + public function setPatchConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\PatchConfig::class); + $this->patch_config = $var; + + return $this; + } + + /** + * Duration of the patch job. After the duration ends, the + * patch job times out. + * + * Generated from protobuf field .google.protobuf.Duration duration = 8; + * @return \Google\Protobuf\Duration|null + */ + public function getDuration() + { + return $this->duration; + } + + public function hasDuration() + { + return isset($this->duration); + } + + public function clearDuration() + { + unset($this->duration); + } + + /** + * Duration of the patch job. After the duration ends, the + * patch job times out. + * + * Generated from protobuf field .google.protobuf.Duration duration = 8; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->duration = $var; + + return $this; + } + + /** + * Summary of instance details. + * + * Generated from protobuf field .google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary instance_details_summary = 9; + * @return \Google\Cloud\OsConfig\V1\PatchJob\InstanceDetailsSummary|null + */ + public function getInstanceDetailsSummary() + { + return $this->instance_details_summary; + } + + public function hasInstanceDetailsSummary() + { + return isset($this->instance_details_summary); + } + + public function clearInstanceDetailsSummary() + { + unset($this->instance_details_summary); + } + + /** + * Summary of instance details. + * + * Generated from protobuf field .google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary instance_details_summary = 9; + * @param \Google\Cloud\OsConfig\V1\PatchJob\InstanceDetailsSummary $var + * @return $this + */ + public function setInstanceDetailsSummary($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\PatchJob\InstanceDetailsSummary::class); + $this->instance_details_summary = $var; + + return $this; + } + + /** + * If this patch job is a dry run, the agent reports that it has + * finished without running any updates on the VM instance. + * + * Generated from protobuf field bool dry_run = 10; + * @return bool + */ + public function getDryRun() + { + return $this->dry_run; + } + + /** + * If this patch job is a dry run, the agent reports that it has + * finished without running any updates on the VM instance. + * + * Generated from protobuf field bool dry_run = 10; + * @param bool $var + * @return $this + */ + public function setDryRun($var) + { + GPBUtil::checkBool($var); + $this->dry_run = $var; + + return $this; + } + + /** + * If this patch job failed, this message provides information about the + * failure. + * + * Generated from protobuf field string error_message = 11; + * @return string + */ + public function getErrorMessage() + { + return $this->error_message; + } + + /** + * If this patch job failed, this message provides information about the + * failure. + * + * Generated from protobuf field string error_message = 11; + * @param string $var + * @return $this + */ + public function setErrorMessage($var) + { + GPBUtil::checkString($var, True); + $this->error_message = $var; + + return $this; + } + + /** + * Reflects the overall progress of the patch job in the range of + * 0.0 being no progress to 100.0 being complete. + * + * Generated from protobuf field double percent_complete = 12; + * @return float + */ + public function getPercentComplete() + { + return $this->percent_complete; + } + + /** + * Reflects the overall progress of the patch job in the range of + * 0.0 being no progress to 100.0 being complete. + * + * Generated from protobuf field double percent_complete = 12; + * @param float $var + * @return $this + */ + public function setPercentComplete($var) + { + GPBUtil::checkDouble($var); + $this->percent_complete = $var; + + return $this; + } + + /** + * Output only. Name of the patch deployment that created this patch job. + * + * Generated from protobuf field string patch_deployment = 15 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getPatchDeployment() + { + return $this->patch_deployment; + } + + /** + * Output only. Name of the patch deployment that created this patch job. + * + * Generated from protobuf field string patch_deployment = 15 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setPatchDeployment($var) + { + GPBUtil::checkString($var, True); + $this->patch_deployment = $var; + + return $this; + } + + /** + * Rollout strategy being applied. + * + * Generated from protobuf field .google.cloud.osconfig.v1.PatchRollout rollout = 16; + * @return \Google\Cloud\OsConfig\V1\PatchRollout|null + */ + public function getRollout() + { + return $this->rollout; + } + + public function hasRollout() + { + return isset($this->rollout); + } + + public function clearRollout() + { + unset($this->rollout); + } + + /** + * Rollout strategy being applied. + * + * Generated from protobuf field .google.cloud.osconfig.v1.PatchRollout rollout = 16; + * @param \Google\Cloud\OsConfig\V1\PatchRollout $var + * @return $this + */ + public function setRollout($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\PatchRollout::class); + $this->rollout = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PatchJob/InstanceDetailsSummary.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PatchJob/InstanceDetailsSummary.php new file mode 100644 index 000000000000..303233add89a --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PatchJob/InstanceDetailsSummary.php @@ -0,0 +1,557 @@ +google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary + */ +class InstanceDetailsSummary extends \Google\Protobuf\Internal\Message +{ + /** + * Number of instances pending patch job. + * + * Generated from protobuf field int64 pending_instance_count = 1; + */ + protected $pending_instance_count = 0; + /** + * Number of instances that are inactive. + * + * Generated from protobuf field int64 inactive_instance_count = 2; + */ + protected $inactive_instance_count = 0; + /** + * Number of instances notified about patch job. + * + * Generated from protobuf field int64 notified_instance_count = 3; + */ + protected $notified_instance_count = 0; + /** + * Number of instances that have started. + * + * Generated from protobuf field int64 started_instance_count = 4; + */ + protected $started_instance_count = 0; + /** + * Number of instances that are downloading patches. + * + * Generated from protobuf field int64 downloading_patches_instance_count = 5; + */ + protected $downloading_patches_instance_count = 0; + /** + * Number of instances that are applying patches. + * + * Generated from protobuf field int64 applying_patches_instance_count = 6; + */ + protected $applying_patches_instance_count = 0; + /** + * Number of instances rebooting. + * + * Generated from protobuf field int64 rebooting_instance_count = 7; + */ + protected $rebooting_instance_count = 0; + /** + * Number of instances that have completed successfully. + * + * Generated from protobuf field int64 succeeded_instance_count = 8; + */ + protected $succeeded_instance_count = 0; + /** + * Number of instances that require reboot. + * + * Generated from protobuf field int64 succeeded_reboot_required_instance_count = 9; + */ + protected $succeeded_reboot_required_instance_count = 0; + /** + * Number of instances that failed. + * + * Generated from protobuf field int64 failed_instance_count = 10; + */ + protected $failed_instance_count = 0; + /** + * Number of instances that have acked and will start shortly. + * + * Generated from protobuf field int64 acked_instance_count = 11; + */ + protected $acked_instance_count = 0; + /** + * Number of instances that exceeded the time out while applying the patch. + * + * Generated from protobuf field int64 timed_out_instance_count = 12; + */ + protected $timed_out_instance_count = 0; + /** + * Number of instances that are running the pre-patch step. + * + * Generated from protobuf field int64 pre_patch_step_instance_count = 13; + */ + protected $pre_patch_step_instance_count = 0; + /** + * Number of instances that are running the post-patch step. + * + * Generated from protobuf field int64 post_patch_step_instance_count = 14; + */ + protected $post_patch_step_instance_count = 0; + /** + * Number of instances that do not appear to be running the agent. Check to + * ensure that the agent is installed, running, and able to communicate with + * the service. + * + * Generated from protobuf field int64 no_agent_detected_instance_count = 15; + */ + protected $no_agent_detected_instance_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $pending_instance_count + * Number of instances pending patch job. + * @type int|string $inactive_instance_count + * Number of instances that are inactive. + * @type int|string $notified_instance_count + * Number of instances notified about patch job. + * @type int|string $started_instance_count + * Number of instances that have started. + * @type int|string $downloading_patches_instance_count + * Number of instances that are downloading patches. + * @type int|string $applying_patches_instance_count + * Number of instances that are applying patches. + * @type int|string $rebooting_instance_count + * Number of instances rebooting. + * @type int|string $succeeded_instance_count + * Number of instances that have completed successfully. + * @type int|string $succeeded_reboot_required_instance_count + * Number of instances that require reboot. + * @type int|string $failed_instance_count + * Number of instances that failed. + * @type int|string $acked_instance_count + * Number of instances that have acked and will start shortly. + * @type int|string $timed_out_instance_count + * Number of instances that exceeded the time out while applying the patch. + * @type int|string $pre_patch_step_instance_count + * Number of instances that are running the pre-patch step. + * @type int|string $post_patch_step_instance_count + * Number of instances that are running the post-patch step. + * @type int|string $no_agent_detected_instance_count + * Number of instances that do not appear to be running the agent. Check to + * ensure that the agent is installed, running, and able to communicate with + * the service. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\PatchJobs::initOnce(); + parent::__construct($data); + } + + /** + * Number of instances pending patch job. + * + * Generated from protobuf field int64 pending_instance_count = 1; + * @return int|string + */ + public function getPendingInstanceCount() + { + return $this->pending_instance_count; + } + + /** + * Number of instances pending patch job. + * + * Generated from protobuf field int64 pending_instance_count = 1; + * @param int|string $var + * @return $this + */ + public function setPendingInstanceCount($var) + { + GPBUtil::checkInt64($var); + $this->pending_instance_count = $var; + + return $this; + } + + /** + * Number of instances that are inactive. + * + * Generated from protobuf field int64 inactive_instance_count = 2; + * @return int|string + */ + public function getInactiveInstanceCount() + { + return $this->inactive_instance_count; + } + + /** + * Number of instances that are inactive. + * + * Generated from protobuf field int64 inactive_instance_count = 2; + * @param int|string $var + * @return $this + */ + public function setInactiveInstanceCount($var) + { + GPBUtil::checkInt64($var); + $this->inactive_instance_count = $var; + + return $this; + } + + /** + * Number of instances notified about patch job. + * + * Generated from protobuf field int64 notified_instance_count = 3; + * @return int|string + */ + public function getNotifiedInstanceCount() + { + return $this->notified_instance_count; + } + + /** + * Number of instances notified about patch job. + * + * Generated from protobuf field int64 notified_instance_count = 3; + * @param int|string $var + * @return $this + */ + public function setNotifiedInstanceCount($var) + { + GPBUtil::checkInt64($var); + $this->notified_instance_count = $var; + + return $this; + } + + /** + * Number of instances that have started. + * + * Generated from protobuf field int64 started_instance_count = 4; + * @return int|string + */ + public function getStartedInstanceCount() + { + return $this->started_instance_count; + } + + /** + * Number of instances that have started. + * + * Generated from protobuf field int64 started_instance_count = 4; + * @param int|string $var + * @return $this + */ + public function setStartedInstanceCount($var) + { + GPBUtil::checkInt64($var); + $this->started_instance_count = $var; + + return $this; + } + + /** + * Number of instances that are downloading patches. + * + * Generated from protobuf field int64 downloading_patches_instance_count = 5; + * @return int|string + */ + public function getDownloadingPatchesInstanceCount() + { + return $this->downloading_patches_instance_count; + } + + /** + * Number of instances that are downloading patches. + * + * Generated from protobuf field int64 downloading_patches_instance_count = 5; + * @param int|string $var + * @return $this + */ + public function setDownloadingPatchesInstanceCount($var) + { + GPBUtil::checkInt64($var); + $this->downloading_patches_instance_count = $var; + + return $this; + } + + /** + * Number of instances that are applying patches. + * + * Generated from protobuf field int64 applying_patches_instance_count = 6; + * @return int|string + */ + public function getApplyingPatchesInstanceCount() + { + return $this->applying_patches_instance_count; + } + + /** + * Number of instances that are applying patches. + * + * Generated from protobuf field int64 applying_patches_instance_count = 6; + * @param int|string $var + * @return $this + */ + public function setApplyingPatchesInstanceCount($var) + { + GPBUtil::checkInt64($var); + $this->applying_patches_instance_count = $var; + + return $this; + } + + /** + * Number of instances rebooting. + * + * Generated from protobuf field int64 rebooting_instance_count = 7; + * @return int|string + */ + public function getRebootingInstanceCount() + { + return $this->rebooting_instance_count; + } + + /** + * Number of instances rebooting. + * + * Generated from protobuf field int64 rebooting_instance_count = 7; + * @param int|string $var + * @return $this + */ + public function setRebootingInstanceCount($var) + { + GPBUtil::checkInt64($var); + $this->rebooting_instance_count = $var; + + return $this; + } + + /** + * Number of instances that have completed successfully. + * + * Generated from protobuf field int64 succeeded_instance_count = 8; + * @return int|string + */ + public function getSucceededInstanceCount() + { + return $this->succeeded_instance_count; + } + + /** + * Number of instances that have completed successfully. + * + * Generated from protobuf field int64 succeeded_instance_count = 8; + * @param int|string $var + * @return $this + */ + public function setSucceededInstanceCount($var) + { + GPBUtil::checkInt64($var); + $this->succeeded_instance_count = $var; + + return $this; + } + + /** + * Number of instances that require reboot. + * + * Generated from protobuf field int64 succeeded_reboot_required_instance_count = 9; + * @return int|string + */ + public function getSucceededRebootRequiredInstanceCount() + { + return $this->succeeded_reboot_required_instance_count; + } + + /** + * Number of instances that require reboot. + * + * Generated from protobuf field int64 succeeded_reboot_required_instance_count = 9; + * @param int|string $var + * @return $this + */ + public function setSucceededRebootRequiredInstanceCount($var) + { + GPBUtil::checkInt64($var); + $this->succeeded_reboot_required_instance_count = $var; + + return $this; + } + + /** + * Number of instances that failed. + * + * Generated from protobuf field int64 failed_instance_count = 10; + * @return int|string + */ + public function getFailedInstanceCount() + { + return $this->failed_instance_count; + } + + /** + * Number of instances that failed. + * + * Generated from protobuf field int64 failed_instance_count = 10; + * @param int|string $var + * @return $this + */ + public function setFailedInstanceCount($var) + { + GPBUtil::checkInt64($var); + $this->failed_instance_count = $var; + + return $this; + } + + /** + * Number of instances that have acked and will start shortly. + * + * Generated from protobuf field int64 acked_instance_count = 11; + * @return int|string + */ + public function getAckedInstanceCount() + { + return $this->acked_instance_count; + } + + /** + * Number of instances that have acked and will start shortly. + * + * Generated from protobuf field int64 acked_instance_count = 11; + * @param int|string $var + * @return $this + */ + public function setAckedInstanceCount($var) + { + GPBUtil::checkInt64($var); + $this->acked_instance_count = $var; + + return $this; + } + + /** + * Number of instances that exceeded the time out while applying the patch. + * + * Generated from protobuf field int64 timed_out_instance_count = 12; + * @return int|string + */ + public function getTimedOutInstanceCount() + { + return $this->timed_out_instance_count; + } + + /** + * Number of instances that exceeded the time out while applying the patch. + * + * Generated from protobuf field int64 timed_out_instance_count = 12; + * @param int|string $var + * @return $this + */ + public function setTimedOutInstanceCount($var) + { + GPBUtil::checkInt64($var); + $this->timed_out_instance_count = $var; + + return $this; + } + + /** + * Number of instances that are running the pre-patch step. + * + * Generated from protobuf field int64 pre_patch_step_instance_count = 13; + * @return int|string + */ + public function getPrePatchStepInstanceCount() + { + return $this->pre_patch_step_instance_count; + } + + /** + * Number of instances that are running the pre-patch step. + * + * Generated from protobuf field int64 pre_patch_step_instance_count = 13; + * @param int|string $var + * @return $this + */ + public function setPrePatchStepInstanceCount($var) + { + GPBUtil::checkInt64($var); + $this->pre_patch_step_instance_count = $var; + + return $this; + } + + /** + * Number of instances that are running the post-patch step. + * + * Generated from protobuf field int64 post_patch_step_instance_count = 14; + * @return int|string + */ + public function getPostPatchStepInstanceCount() + { + return $this->post_patch_step_instance_count; + } + + /** + * Number of instances that are running the post-patch step. + * + * Generated from protobuf field int64 post_patch_step_instance_count = 14; + * @param int|string $var + * @return $this + */ + public function setPostPatchStepInstanceCount($var) + { + GPBUtil::checkInt64($var); + $this->post_patch_step_instance_count = $var; + + return $this; + } + + /** + * Number of instances that do not appear to be running the agent. Check to + * ensure that the agent is installed, running, and able to communicate with + * the service. + * + * Generated from protobuf field int64 no_agent_detected_instance_count = 15; + * @return int|string + */ + public function getNoAgentDetectedInstanceCount() + { + return $this->no_agent_detected_instance_count; + } + + /** + * Number of instances that do not appear to be running the agent. Check to + * ensure that the agent is installed, running, and able to communicate with + * the service. + * + * Generated from protobuf field int64 no_agent_detected_instance_count = 15; + * @param int|string $var + * @return $this + */ + public function setNoAgentDetectedInstanceCount($var) + { + GPBUtil::checkInt64($var); + $this->no_agent_detected_instance_count = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(InstanceDetailsSummary::class, \Google\Cloud\OsConfig\V1\PatchJob_InstanceDetailsSummary::class); + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PatchJob/State.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PatchJob/State.php new file mode 100644 index 000000000000..3e8662e82774 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PatchJob/State.php @@ -0,0 +1,100 @@ +google.cloud.osconfig.v1.PatchJob.State + */ +class State +{ + /** + * State must be specified. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The patch job was successfully initiated. + * + * Generated from protobuf enum STARTED = 1; + */ + const STARTED = 1; + /** + * The patch job is looking up instances to run the patch on. + * + * Generated from protobuf enum INSTANCE_LOOKUP = 2; + */ + const INSTANCE_LOOKUP = 2; + /** + * Instances are being patched. + * + * Generated from protobuf enum PATCHING = 3; + */ + const PATCHING = 3; + /** + * Patch job completed successfully. + * + * Generated from protobuf enum SUCCEEDED = 4; + */ + const SUCCEEDED = 4; + /** + * Patch job completed but there were errors. + * + * Generated from protobuf enum COMPLETED_WITH_ERRORS = 5; + */ + const COMPLETED_WITH_ERRORS = 5; + /** + * The patch job was canceled. + * + * Generated from protobuf enum CANCELED = 6; + */ + const CANCELED = 6; + /** + * The patch job timed out. + * + * Generated from protobuf enum TIMED_OUT = 7; + */ + const TIMED_OUT = 7; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::STARTED => 'STARTED', + self::INSTANCE_LOOKUP => 'INSTANCE_LOOKUP', + self::PATCHING => 'PATCHING', + self::SUCCEEDED => 'SUCCEEDED', + self::COMPLETED_WITH_ERRORS => 'COMPLETED_WITH_ERRORS', + self::CANCELED => 'CANCELED', + self::TIMED_OUT => 'TIMED_OUT', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(State::class, \Google\Cloud\OsConfig\V1\PatchJob_State::class); + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PatchJobInstanceDetails.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PatchJobInstanceDetails.php new file mode 100644 index 000000000000..6fa552d169e6 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PatchJobInstanceDetails.php @@ -0,0 +1,210 @@ +google.cloud.osconfig.v1.PatchJobInstanceDetails + */ +class PatchJobInstanceDetails extends \Google\Protobuf\Internal\Message +{ + /** + * The instance name in the form `projects/*/zones/*/instances/*` + * + * Generated from protobuf field string name = 1 [(.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * The unique identifier for the instance. This identifier is + * defined by the server. + * + * Generated from protobuf field string instance_system_id = 2; + */ + protected $instance_system_id = ''; + /** + * Current state of instance patch. + * + * Generated from protobuf field .google.cloud.osconfig.v1.Instance.PatchState state = 3; + */ + protected $state = 0; + /** + * If the patch fails, this field provides the reason. + * + * Generated from protobuf field string failure_reason = 4; + */ + protected $failure_reason = ''; + /** + * The number of times the agent that the agent attempts to apply the patch. + * + * Generated from protobuf field int64 attempt_count = 5; + */ + protected $attempt_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The instance name in the form `projects/*/zones/*/instances/*` + * @type string $instance_system_id + * The unique identifier for the instance. This identifier is + * defined by the server. + * @type int $state + * Current state of instance patch. + * @type string $failure_reason + * If the patch fails, this field provides the reason. + * @type int|string $attempt_count + * The number of times the agent that the agent attempts to apply the patch. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\PatchJobs::initOnce(); + parent::__construct($data); + } + + /** + * The instance name in the form `projects/*/zones/*/instances/*` + * + * Generated from protobuf field string name = 1 [(.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The instance name in the form `projects/*/zones/*/instances/*` + * + * Generated from protobuf field string name = 1 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The unique identifier for the instance. This identifier is + * defined by the server. + * + * Generated from protobuf field string instance_system_id = 2; + * @return string + */ + public function getInstanceSystemId() + { + return $this->instance_system_id; + } + + /** + * The unique identifier for the instance. This identifier is + * defined by the server. + * + * Generated from protobuf field string instance_system_id = 2; + * @param string $var + * @return $this + */ + public function setInstanceSystemId($var) + { + GPBUtil::checkString($var, True); + $this->instance_system_id = $var; + + return $this; + } + + /** + * Current state of instance patch. + * + * Generated from protobuf field .google.cloud.osconfig.v1.Instance.PatchState state = 3; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Current state of instance patch. + * + * Generated from protobuf field .google.cloud.osconfig.v1.Instance.PatchState state = 3; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\OsConfig\V1\Instance\PatchState::class); + $this->state = $var; + + return $this; + } + + /** + * If the patch fails, this field provides the reason. + * + * Generated from protobuf field string failure_reason = 4; + * @return string + */ + public function getFailureReason() + { + return $this->failure_reason; + } + + /** + * If the patch fails, this field provides the reason. + * + * Generated from protobuf field string failure_reason = 4; + * @param string $var + * @return $this + */ + public function setFailureReason($var) + { + GPBUtil::checkString($var, True); + $this->failure_reason = $var; + + return $this; + } + + /** + * The number of times the agent that the agent attempts to apply the patch. + * + * Generated from protobuf field int64 attempt_count = 5; + * @return int|string + */ + public function getAttemptCount() + { + return $this->attempt_count; + } + + /** + * The number of times the agent that the agent attempts to apply the patch. + * + * Generated from protobuf field int64 attempt_count = 5; + * @param int|string $var + * @return $this + */ + public function setAttemptCount($var) + { + GPBUtil::checkInt64($var); + $this->attempt_count = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PatchRollout.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PatchRollout.php new file mode 100644 index 000000000000..3cc4ed4b6103 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PatchRollout.php @@ -0,0 +1,184 @@ +google.cloud.osconfig.v1.PatchRollout + */ +class PatchRollout extends \Google\Protobuf\Internal\Message +{ + /** + * Mode of the patch rollout. + * + * Generated from protobuf field .google.cloud.osconfig.v1.PatchRollout.Mode mode = 1; + */ + protected $mode = 0; + /** + * The maximum number (or percentage) of VMs per zone to disrupt at any given + * moment. The number of VMs calculated from multiplying the percentage by the + * total number of VMs in a zone is rounded up. + * During patching, a VM is considered disrupted from the time the agent is + * notified to begin until patching has completed. This disruption time + * includes the time to complete reboot and any post-patch steps. + * A VM contributes to the disruption budget if its patching operation fails + * either when applying the patches, running pre or post patch steps, or if it + * fails to respond with a success notification before timing out. VMs that + * are not running or do not have an active agent do not count toward this + * disruption budget. + * For zone-by-zone rollouts, if the disruption budget in a zone is exceeded, + * the patch job stops, because continuing to the next zone requires + * completion of the patch process in the previous zone. + * For example, if the disruption budget has a fixed value of `10`, and 8 VMs + * fail to patch in the current zone, the patch job continues to patch 2 VMs + * at a time until the zone is completed. When that zone is completed + * successfully, patching begins with 10 VMs at a time in the next zone. If 10 + * VMs in the next zone fail to patch, the patch job stops. + * + * Generated from protobuf field .google.cloud.osconfig.v1.FixedOrPercent disruption_budget = 2; + */ + protected $disruption_budget = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $mode + * Mode of the patch rollout. + * @type \Google\Cloud\OsConfig\V1\FixedOrPercent $disruption_budget + * The maximum number (or percentage) of VMs per zone to disrupt at any given + * moment. The number of VMs calculated from multiplying the percentage by the + * total number of VMs in a zone is rounded up. + * During patching, a VM is considered disrupted from the time the agent is + * notified to begin until patching has completed. This disruption time + * includes the time to complete reboot and any post-patch steps. + * A VM contributes to the disruption budget if its patching operation fails + * either when applying the patches, running pre or post patch steps, or if it + * fails to respond with a success notification before timing out. VMs that + * are not running or do not have an active agent do not count toward this + * disruption budget. + * For zone-by-zone rollouts, if the disruption budget in a zone is exceeded, + * the patch job stops, because continuing to the next zone requires + * completion of the patch process in the previous zone. + * For example, if the disruption budget has a fixed value of `10`, and 8 VMs + * fail to patch in the current zone, the patch job continues to patch 2 VMs + * at a time until the zone is completed. When that zone is completed + * successfully, patching begins with 10 VMs at a time in the next zone. If 10 + * VMs in the next zone fail to patch, the patch job stops. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\PatchJobs::initOnce(); + parent::__construct($data); + } + + /** + * Mode of the patch rollout. + * + * Generated from protobuf field .google.cloud.osconfig.v1.PatchRollout.Mode mode = 1; + * @return int + */ + public function getMode() + { + return $this->mode; + } + + /** + * Mode of the patch rollout. + * + * Generated from protobuf field .google.cloud.osconfig.v1.PatchRollout.Mode mode = 1; + * @param int $var + * @return $this + */ + public function setMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\OsConfig\V1\PatchRollout\Mode::class); + $this->mode = $var; + + return $this; + } + + /** + * The maximum number (or percentage) of VMs per zone to disrupt at any given + * moment. The number of VMs calculated from multiplying the percentage by the + * total number of VMs in a zone is rounded up. + * During patching, a VM is considered disrupted from the time the agent is + * notified to begin until patching has completed. This disruption time + * includes the time to complete reboot and any post-patch steps. + * A VM contributes to the disruption budget if its patching operation fails + * either when applying the patches, running pre or post patch steps, or if it + * fails to respond with a success notification before timing out. VMs that + * are not running or do not have an active agent do not count toward this + * disruption budget. + * For zone-by-zone rollouts, if the disruption budget in a zone is exceeded, + * the patch job stops, because continuing to the next zone requires + * completion of the patch process in the previous zone. + * For example, if the disruption budget has a fixed value of `10`, and 8 VMs + * fail to patch in the current zone, the patch job continues to patch 2 VMs + * at a time until the zone is completed. When that zone is completed + * successfully, patching begins with 10 VMs at a time in the next zone. If 10 + * VMs in the next zone fail to patch, the patch job stops. + * + * Generated from protobuf field .google.cloud.osconfig.v1.FixedOrPercent disruption_budget = 2; + * @return \Google\Cloud\OsConfig\V1\FixedOrPercent|null + */ + public function getDisruptionBudget() + { + return $this->disruption_budget; + } + + public function hasDisruptionBudget() + { + return isset($this->disruption_budget); + } + + public function clearDisruptionBudget() + { + unset($this->disruption_budget); + } + + /** + * The maximum number (or percentage) of VMs per zone to disrupt at any given + * moment. The number of VMs calculated from multiplying the percentage by the + * total number of VMs in a zone is rounded up. + * During patching, a VM is considered disrupted from the time the agent is + * notified to begin until patching has completed. This disruption time + * includes the time to complete reboot and any post-patch steps. + * A VM contributes to the disruption budget if its patching operation fails + * either when applying the patches, running pre or post patch steps, or if it + * fails to respond with a success notification before timing out. VMs that + * are not running or do not have an active agent do not count toward this + * disruption budget. + * For zone-by-zone rollouts, if the disruption budget in a zone is exceeded, + * the patch job stops, because continuing to the next zone requires + * completion of the patch process in the previous zone. + * For example, if the disruption budget has a fixed value of `10`, and 8 VMs + * fail to patch in the current zone, the patch job continues to patch 2 VMs + * at a time until the zone is completed. When that zone is completed + * successfully, patching begins with 10 VMs at a time in the next zone. If 10 + * VMs in the next zone fail to patch, the patch job stops. + * + * Generated from protobuf field .google.cloud.osconfig.v1.FixedOrPercent disruption_budget = 2; + * @param \Google\Cloud\OsConfig\V1\FixedOrPercent $var + * @return $this + */ + public function setDisruptionBudget($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\FixedOrPercent::class); + $this->disruption_budget = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PatchRollout/Mode.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PatchRollout/Mode.php new file mode 100644 index 000000000000..91da69901a93 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PatchRollout/Mode.php @@ -0,0 +1,69 @@ +google.cloud.osconfig.v1.PatchRollout.Mode + */ +class Mode +{ + /** + * Mode must be specified. + * + * Generated from protobuf enum MODE_UNSPECIFIED = 0; + */ + const MODE_UNSPECIFIED = 0; + /** + * Patches are applied one zone at a time. The patch job begins in the + * region with the lowest number of targeted VMs. Within the region, + * patching begins in the zone with the lowest number of targeted VMs. If + * multiple regions (or zones within a region) have the same number of + * targeted VMs, a tie-breaker is achieved by sorting the regions or zones + * in alphabetical order. + * + * Generated from protobuf enum ZONE_BY_ZONE = 1; + */ + const ZONE_BY_ZONE = 1; + /** + * Patches are applied to VMs in all zones at the same time. + * + * Generated from protobuf enum CONCURRENT_ZONES = 2; + */ + const CONCURRENT_ZONES = 2; + + private static $valueToName = [ + self::MODE_UNSPECIFIED => 'MODE_UNSPECIFIED', + self::ZONE_BY_ZONE => 'ZONE_BY_ZONE', + self::CONCURRENT_ZONES => 'CONCURRENT_ZONES', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Mode::class, \Google\Cloud\OsConfig\V1\PatchRollout_Mode::class); + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PausePatchDeploymentRequest.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PausePatchDeploymentRequest.php new file mode 100644 index 000000000000..c8b8a56b512b --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PausePatchDeploymentRequest.php @@ -0,0 +1,86 @@ +google.cloud.osconfig.v1.PausePatchDeploymentRequest + */ +class PausePatchDeploymentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the patch deployment in the form + * `projects/*/patchDeployments/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The resource name of the patch deployment in the form + * `projects/*/patchDeployments/*`. Please see + * {@see OsConfigServiceClient::patchDeploymentName()} for help formatting this field. + * + * @return \Google\Cloud\OsConfig\V1\PausePatchDeploymentRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the patch deployment in the form + * `projects/*/patchDeployments/*`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\PatchDeployments::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the patch deployment in the form + * `projects/*/patchDeployments/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the patch deployment in the form + * `projects/*/patchDeployments/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/RecurringSchedule.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/RecurringSchedule.php new file mode 100644 index 000000000000..d8a873ab6c48 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/RecurringSchedule.php @@ -0,0 +1,418 @@ +google.cloud.osconfig.v1.RecurringSchedule + */ +class RecurringSchedule extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Defines the time zone that `time_of_day` is relative to. + * The rules for daylight saving time are determined by the chosen time zone. + * + * Generated from protobuf field .google.type.TimeZone time_zone = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $time_zone = null; + /** + * Optional. The time that the recurring schedule becomes effective. + * Defaults to `create_time` of the patch deployment. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $start_time = null; + /** + * Optional. The end time at which a recurring patch deployment schedule is no + * longer active. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $end_time = null; + /** + * Required. Time of the day to run a recurring deployment. + * + * Generated from protobuf field .google.type.TimeOfDay time_of_day = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $time_of_day = null; + /** + * Required. The frequency unit of this recurring schedule. + * + * Generated from protobuf field .google.cloud.osconfig.v1.RecurringSchedule.Frequency frequency = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $frequency = 0; + /** + * Output only. The time the last patch job ran successfully. + * + * Generated from protobuf field .google.protobuf.Timestamp last_execute_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $last_execute_time = null; + /** + * Output only. The time the next patch job is scheduled to run. + * + * Generated from protobuf field .google.protobuf.Timestamp next_execute_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $next_execute_time = null; + protected $schedule_config; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Type\TimeZone $time_zone + * Required. Defines the time zone that `time_of_day` is relative to. + * The rules for daylight saving time are determined by the chosen time zone. + * @type \Google\Protobuf\Timestamp $start_time + * Optional. The time that the recurring schedule becomes effective. + * Defaults to `create_time` of the patch deployment. + * @type \Google\Protobuf\Timestamp $end_time + * Optional. The end time at which a recurring patch deployment schedule is no + * longer active. + * @type \Google\Type\TimeOfDay $time_of_day + * Required. Time of the day to run a recurring deployment. + * @type int $frequency + * Required. The frequency unit of this recurring schedule. + * @type \Google\Cloud\OsConfig\V1\WeeklySchedule $weekly + * Required. Schedule with weekly executions. + * @type \Google\Cloud\OsConfig\V1\MonthlySchedule $monthly + * Required. Schedule with monthly executions. + * @type \Google\Protobuf\Timestamp $last_execute_time + * Output only. The time the last patch job ran successfully. + * @type \Google\Protobuf\Timestamp $next_execute_time + * Output only. The time the next patch job is scheduled to run. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\PatchDeployments::initOnce(); + parent::__construct($data); + } + + /** + * Required. Defines the time zone that `time_of_day` is relative to. + * The rules for daylight saving time are determined by the chosen time zone. + * + * Generated from protobuf field .google.type.TimeZone time_zone = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Type\TimeZone|null + */ + public function getTimeZone() + { + return $this->time_zone; + } + + public function hasTimeZone() + { + return isset($this->time_zone); + } + + public function clearTimeZone() + { + unset($this->time_zone); + } + + /** + * Required. Defines the time zone that `time_of_day` is relative to. + * The rules for daylight saving time are determined by the chosen time zone. + * + * Generated from protobuf field .google.type.TimeZone time_zone = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Type\TimeZone $var + * @return $this + */ + public function setTimeZone($var) + { + GPBUtil::checkMessage($var, \Google\Type\TimeZone::class); + $this->time_zone = $var; + + return $this; + } + + /** + * Optional. The time that the recurring schedule becomes effective. + * Defaults to `create_time` of the patch deployment. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getStartTime() + { + return $this->start_time; + } + + public function hasStartTime() + { + return isset($this->start_time); + } + + public function clearStartTime() + { + unset($this->start_time); + } + + /** + * Optional. The time that the recurring schedule becomes effective. + * Defaults to `create_time` of the patch deployment. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * Optional. The end time at which a recurring patch deployment schedule is no + * longer active. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEndTime() + { + return $this->end_time; + } + + public function hasEndTime() + { + return isset($this->end_time); + } + + public function clearEndTime() + { + unset($this->end_time); + } + + /** + * Optional. The end time at which a recurring patch deployment schedule is no + * longer active. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * Required. Time of the day to run a recurring deployment. + * + * Generated from protobuf field .google.type.TimeOfDay time_of_day = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Type\TimeOfDay|null + */ + public function getTimeOfDay() + { + return $this->time_of_day; + } + + public function hasTimeOfDay() + { + return isset($this->time_of_day); + } + + public function clearTimeOfDay() + { + unset($this->time_of_day); + } + + /** + * Required. Time of the day to run a recurring deployment. + * + * Generated from protobuf field .google.type.TimeOfDay time_of_day = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Type\TimeOfDay $var + * @return $this + */ + public function setTimeOfDay($var) + { + GPBUtil::checkMessage($var, \Google\Type\TimeOfDay::class); + $this->time_of_day = $var; + + return $this; + } + + /** + * Required. The frequency unit of this recurring schedule. + * + * Generated from protobuf field .google.cloud.osconfig.v1.RecurringSchedule.Frequency frequency = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getFrequency() + { + return $this->frequency; + } + + /** + * Required. The frequency unit of this recurring schedule. + * + * Generated from protobuf field .google.cloud.osconfig.v1.RecurringSchedule.Frequency frequency = 5 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setFrequency($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\OsConfig\V1\RecurringSchedule\Frequency::class); + $this->frequency = $var; + + return $this; + } + + /** + * Required. Schedule with weekly executions. + * + * Generated from protobuf field .google.cloud.osconfig.v1.WeeklySchedule weekly = 6 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\OsConfig\V1\WeeklySchedule|null + */ + public function getWeekly() + { + return $this->readOneof(6); + } + + public function hasWeekly() + { + return $this->hasOneof(6); + } + + /** + * Required. Schedule with weekly executions. + * + * Generated from protobuf field .google.cloud.osconfig.v1.WeeklySchedule weekly = 6 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\OsConfig\V1\WeeklySchedule $var + * @return $this + */ + public function setWeekly($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\WeeklySchedule::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * Required. Schedule with monthly executions. + * + * Generated from protobuf field .google.cloud.osconfig.v1.MonthlySchedule monthly = 7 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\OsConfig\V1\MonthlySchedule|null + */ + public function getMonthly() + { + return $this->readOneof(7); + } + + public function hasMonthly() + { + return $this->hasOneof(7); + } + + /** + * Required. Schedule with monthly executions. + * + * Generated from protobuf field .google.cloud.osconfig.v1.MonthlySchedule monthly = 7 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\OsConfig\V1\MonthlySchedule $var + * @return $this + */ + public function setMonthly($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\MonthlySchedule::class); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * Output only. The time the last patch job ran successfully. + * + * Generated from protobuf field .google.protobuf.Timestamp last_execute_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getLastExecuteTime() + { + return $this->last_execute_time; + } + + public function hasLastExecuteTime() + { + return isset($this->last_execute_time); + } + + public function clearLastExecuteTime() + { + unset($this->last_execute_time); + } + + /** + * Output only. The time the last patch job ran successfully. + * + * Generated from protobuf field .google.protobuf.Timestamp last_execute_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setLastExecuteTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->last_execute_time = $var; + + return $this; + } + + /** + * Output only. The time the next patch job is scheduled to run. + * + * Generated from protobuf field .google.protobuf.Timestamp next_execute_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getNextExecuteTime() + { + return $this->next_execute_time; + } + + public function hasNextExecuteTime() + { + return isset($this->next_execute_time); + } + + public function clearNextExecuteTime() + { + unset($this->next_execute_time); + } + + /** + * Output only. The time the next patch job is scheduled to run. + * + * Generated from protobuf field .google.protobuf.Timestamp next_execute_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setNextExecuteTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->next_execute_time = $var; + + return $this; + } + + /** + * @return string + */ + public function getScheduleConfig() + { + return $this->whichOneof("schedule_config"); + } + +} + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/RecurringSchedule/Frequency.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/RecurringSchedule/Frequency.php new file mode 100644 index 000000000000..790abdbd75ac --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/RecurringSchedule/Frequency.php @@ -0,0 +1,74 @@ +google.cloud.osconfig.v1.RecurringSchedule.Frequency + */ +class Frequency +{ + /** + * Invalid. A frequency must be specified. + * + * Generated from protobuf enum FREQUENCY_UNSPECIFIED = 0; + */ + const FREQUENCY_UNSPECIFIED = 0; + /** + * Indicates that the frequency of recurrence should be expressed in terms + * of weeks. + * + * Generated from protobuf enum WEEKLY = 1; + */ + const WEEKLY = 1; + /** + * Indicates that the frequency of recurrence should be expressed in terms + * of months. + * + * Generated from protobuf enum MONTHLY = 2; + */ + const MONTHLY = 2; + /** + * Indicates that the frequency of recurrence should be expressed in terms + * of days. + * + * Generated from protobuf enum DAILY = 3; + */ + const DAILY = 3; + + private static $valueToName = [ + self::FREQUENCY_UNSPECIFIED => 'FREQUENCY_UNSPECIFIED', + self::WEEKLY => 'WEEKLY', + self::MONTHLY => 'MONTHLY', + self::DAILY => 'DAILY', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Frequency::class, \Google\Cloud\OsConfig\V1\RecurringSchedule_Frequency::class); + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ResumePatchDeploymentRequest.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ResumePatchDeploymentRequest.php new file mode 100644 index 000000000000..08fcc27a915f --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ResumePatchDeploymentRequest.php @@ -0,0 +1,86 @@ +google.cloud.osconfig.v1.ResumePatchDeploymentRequest + */ +class ResumePatchDeploymentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the patch deployment in the form + * `projects/*/patchDeployments/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The resource name of the patch deployment in the form + * `projects/*/patchDeployments/*`. Please see + * {@see OsConfigServiceClient::patchDeploymentName()} for help formatting this field. + * + * @return \Google\Cloud\OsConfig\V1\ResumePatchDeploymentRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the patch deployment in the form + * `projects/*/patchDeployments/*`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\PatchDeployments::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the patch deployment in the form + * `projects/*/patchDeployments/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the patch deployment in the form + * `projects/*/patchDeployments/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/UpdateOSPolicyAssignmentRequest.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/UpdateOSPolicyAssignmentRequest.php new file mode 100644 index 000000000000..0fb7755dbd4d --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/UpdateOSPolicyAssignmentRequest.php @@ -0,0 +1,141 @@ +google.cloud.osconfig.v1.UpdateOSPolicyAssignmentRequest + */ +class UpdateOSPolicyAssignmentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The updated OS policy assignment. + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicyAssignment os_policy_assignment = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $os_policy_assignment = null; + /** + * Optional. Field mask that controls which fields of the assignment should be + * updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\OsConfig\V1\OSPolicyAssignment $osPolicyAssignment Required. The updated OS policy assignment. + * @param \Google\Protobuf\FieldMask $updateMask Optional. Field mask that controls which fields of the assignment should be + * updated. + * + * @return \Google\Cloud\OsConfig\V1\UpdateOSPolicyAssignmentRequest + * + * @experimental + */ + public static function build(\Google\Cloud\OsConfig\V1\OSPolicyAssignment $osPolicyAssignment, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setOsPolicyAssignment($osPolicyAssignment) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\OsConfig\V1\OSPolicyAssignment $os_policy_assignment + * Required. The updated OS policy assignment. + * @type \Google\Protobuf\FieldMask $update_mask + * Optional. Field mask that controls which fields of the assignment should be + * updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\OsPolicyAssignments::initOnce(); + parent::__construct($data); + } + + /** + * Required. The updated OS policy assignment. + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicyAssignment os_policy_assignment = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\OsConfig\V1\OSPolicyAssignment|null + */ + public function getOsPolicyAssignment() + { + return $this->os_policy_assignment; + } + + public function hasOsPolicyAssignment() + { + return isset($this->os_policy_assignment); + } + + public function clearOsPolicyAssignment() + { + unset($this->os_policy_assignment); + } + + /** + * Required. The updated OS policy assignment. + * + * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicyAssignment os_policy_assignment = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\OsConfig\V1\OSPolicyAssignment $var + * @return $this + */ + public function setOsPolicyAssignment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\OSPolicyAssignment::class); + $this->os_policy_assignment = $var; + + return $this; + } + + /** + * Optional. Field mask that controls which fields of the assignment should be + * updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Optional. Field mask that controls which fields of the assignment should be + * updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/UpdatePatchDeploymentRequest.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/UpdatePatchDeploymentRequest.php new file mode 100644 index 000000000000..fdcd8821bb29 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/UpdatePatchDeploymentRequest.php @@ -0,0 +1,141 @@ +google.cloud.osconfig.v1.UpdatePatchDeploymentRequest + */ +class UpdatePatchDeploymentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The patch deployment to Update. + * + * Generated from protobuf field .google.cloud.osconfig.v1.PatchDeployment patch_deployment = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $patch_deployment = null; + /** + * Optional. Field mask that controls which fields of the patch deployment + * should be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\OsConfig\V1\PatchDeployment $patchDeployment Required. The patch deployment to Update. + * @param \Google\Protobuf\FieldMask $updateMask Optional. Field mask that controls which fields of the patch deployment + * should be updated. + * + * @return \Google\Cloud\OsConfig\V1\UpdatePatchDeploymentRequest + * + * @experimental + */ + public static function build(\Google\Cloud\OsConfig\V1\PatchDeployment $patchDeployment, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setPatchDeployment($patchDeployment) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\OsConfig\V1\PatchDeployment $patch_deployment + * Required. The patch deployment to Update. + * @type \Google\Protobuf\FieldMask $update_mask + * Optional. Field mask that controls which fields of the patch deployment + * should be updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\PatchDeployments::initOnce(); + parent::__construct($data); + } + + /** + * Required. The patch deployment to Update. + * + * Generated from protobuf field .google.cloud.osconfig.v1.PatchDeployment patch_deployment = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\OsConfig\V1\PatchDeployment|null + */ + public function getPatchDeployment() + { + return $this->patch_deployment; + } + + public function hasPatchDeployment() + { + return isset($this->patch_deployment); + } + + public function clearPatchDeployment() + { + unset($this->patch_deployment); + } + + /** + * Required. The patch deployment to Update. + * + * Generated from protobuf field .google.cloud.osconfig.v1.PatchDeployment patch_deployment = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\OsConfig\V1\PatchDeployment $var + * @return $this + */ + public function setPatchDeployment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\PatchDeployment::class); + $this->patch_deployment = $var; + + return $this; + } + + /** + * Optional. Field mask that controls which fields of the patch deployment + * should be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Optional. Field mask that controls which fields of the patch deployment + * should be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/VulnerabilityReport.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/VulnerabilityReport.php new file mode 100644 index 000000000000..44ac2be6bef7 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/VulnerabilityReport.php @@ -0,0 +1,160 @@ +google.cloud.osconfig.v1.VulnerabilityReport + */ +class VulnerabilityReport extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The `vulnerabilityReport` API resource name. + * Format: + * `projects/{project_number}/locations/{location}/instances/{instance_id}/vulnerabilityReport` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. List of vulnerabilities affecting the VM. + * + * Generated from protobuf field repeated .google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability vulnerabilities = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $vulnerabilities; + /** + * Output only. The timestamp for when the last vulnerability report was generated for the + * VM. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The `vulnerabilityReport` API resource name. + * Format: + * `projects/{project_number}/locations/{location}/instances/{instance_id}/vulnerabilityReport` + * @type array<\Google\Cloud\OsConfig\V1\VulnerabilityReport\Vulnerability>|\Google\Protobuf\Internal\RepeatedField $vulnerabilities + * Output only. List of vulnerabilities affecting the VM. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The timestamp for when the last vulnerability report was generated for the + * VM. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\Vulnerability::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The `vulnerabilityReport` API resource name. + * Format: + * `projects/{project_number}/locations/{location}/instances/{instance_id}/vulnerabilityReport` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The `vulnerabilityReport` API resource name. + * Format: + * `projects/{project_number}/locations/{location}/instances/{instance_id}/vulnerabilityReport` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. List of vulnerabilities affecting the VM. + * + * Generated from protobuf field repeated .google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability vulnerabilities = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getVulnerabilities() + { + return $this->vulnerabilities; + } + + /** + * Output only. List of vulnerabilities affecting the VM. + * + * Generated from protobuf field repeated .google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability vulnerabilities = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\OsConfig\V1\VulnerabilityReport\Vulnerability>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setVulnerabilities($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\OsConfig\V1\VulnerabilityReport\Vulnerability::class); + $this->vulnerabilities = $arr; + + return $this; + } + + /** + * Output only. The timestamp for when the last vulnerability report was generated for the + * VM. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The timestamp for when the last vulnerability report was generated for the + * VM. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/VulnerabilityReport/Vulnerability.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/VulnerabilityReport/Vulnerability.php new file mode 100644 index 000000000000..1e51cba7df9d --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/VulnerabilityReport/Vulnerability.php @@ -0,0 +1,320 @@ +google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability + */ +class Vulnerability extends \Google\Protobuf\Internal\Message +{ + /** + * Contains metadata as per the upstream feed of the operating system and + * NVD. + * + * Generated from protobuf field .google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details details = 1; + */ + protected $details = null; + /** + * Corresponds to the `INSTALLED_PACKAGE` inventory item on the VM. + * This field displays the inventory items affected by this vulnerability. + * If the vulnerability report was not updated after the VM inventory + * update, these values might not display in VM inventory. For some distros, + * this field may be empty. + * + * Generated from protobuf field repeated string installed_inventory_item_ids = 2 [deprecated = true]; + * @deprecated + */ + private $installed_inventory_item_ids; + /** + * Corresponds to the `AVAILABLE_PACKAGE` inventory item on the VM. + * If the vulnerability report was not updated after the VM inventory + * update, these values might not display in VM inventory. If there is no + * available fix, the field is empty. The `inventory_item` value specifies + * the latest `SoftwarePackage` available to the VM that fixes the + * vulnerability. + * + * Generated from protobuf field repeated string available_inventory_item_ids = 3 [deprecated = true]; + * @deprecated + */ + private $available_inventory_item_ids; + /** + * The timestamp for when the vulnerability was first detected. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 4; + */ + protected $create_time = null; + /** + * The timestamp for when the vulnerability was last modified. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 5; + */ + protected $update_time = null; + /** + * List of items affected by the vulnerability. + * + * Generated from protobuf field repeated .google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Item items = 6; + */ + private $items; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\OsConfig\V1\VulnerabilityReport\Vulnerability\Details $details + * Contains metadata as per the upstream feed of the operating system and + * NVD. + * @type array|\Google\Protobuf\Internal\RepeatedField $installed_inventory_item_ids + * Corresponds to the `INSTALLED_PACKAGE` inventory item on the VM. + * This field displays the inventory items affected by this vulnerability. + * If the vulnerability report was not updated after the VM inventory + * update, these values might not display in VM inventory. For some distros, + * this field may be empty. + * @type array|\Google\Protobuf\Internal\RepeatedField $available_inventory_item_ids + * Corresponds to the `AVAILABLE_PACKAGE` inventory item on the VM. + * If the vulnerability report was not updated after the VM inventory + * update, these values might not display in VM inventory. If there is no + * available fix, the field is empty. The `inventory_item` value specifies + * the latest `SoftwarePackage` available to the VM that fixes the + * vulnerability. + * @type \Google\Protobuf\Timestamp $create_time + * The timestamp for when the vulnerability was first detected. + * @type \Google\Protobuf\Timestamp $update_time + * The timestamp for when the vulnerability was last modified. + * @type array<\Google\Cloud\OsConfig\V1\VulnerabilityReport\Vulnerability\Item>|\Google\Protobuf\Internal\RepeatedField $items + * List of items affected by the vulnerability. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\Vulnerability::initOnce(); + parent::__construct($data); + } + + /** + * Contains metadata as per the upstream feed of the operating system and + * NVD. + * + * Generated from protobuf field .google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details details = 1; + * @return \Google\Cloud\OsConfig\V1\VulnerabilityReport\Vulnerability\Details|null + */ + public function getDetails() + { + return $this->details; + } + + public function hasDetails() + { + return isset($this->details); + } + + public function clearDetails() + { + unset($this->details); + } + + /** + * Contains metadata as per the upstream feed of the operating system and + * NVD. + * + * Generated from protobuf field .google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details details = 1; + * @param \Google\Cloud\OsConfig\V1\VulnerabilityReport\Vulnerability\Details $var + * @return $this + */ + public function setDetails($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\VulnerabilityReport\Vulnerability\Details::class); + $this->details = $var; + + return $this; + } + + /** + * Corresponds to the `INSTALLED_PACKAGE` inventory item on the VM. + * This field displays the inventory items affected by this vulnerability. + * If the vulnerability report was not updated after the VM inventory + * update, these values might not display in VM inventory. For some distros, + * this field may be empty. + * + * Generated from protobuf field repeated string installed_inventory_item_ids = 2 [deprecated = true]; + * @return \Google\Protobuf\Internal\RepeatedField + * @deprecated + */ + public function getInstalledInventoryItemIds() + { + @trigger_error('installed_inventory_item_ids is deprecated.', E_USER_DEPRECATED); + return $this->installed_inventory_item_ids; + } + + /** + * Corresponds to the `INSTALLED_PACKAGE` inventory item on the VM. + * This field displays the inventory items affected by this vulnerability. + * If the vulnerability report was not updated after the VM inventory + * update, these values might not display in VM inventory. For some distros, + * this field may be empty. + * + * Generated from protobuf field repeated string installed_inventory_item_ids = 2 [deprecated = true]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + * @deprecated + */ + public function setInstalledInventoryItemIds($var) + { + @trigger_error('installed_inventory_item_ids is deprecated.', E_USER_DEPRECATED); + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->installed_inventory_item_ids = $arr; + + return $this; + } + + /** + * Corresponds to the `AVAILABLE_PACKAGE` inventory item on the VM. + * If the vulnerability report was not updated after the VM inventory + * update, these values might not display in VM inventory. If there is no + * available fix, the field is empty. The `inventory_item` value specifies + * the latest `SoftwarePackage` available to the VM that fixes the + * vulnerability. + * + * Generated from protobuf field repeated string available_inventory_item_ids = 3 [deprecated = true]; + * @return \Google\Protobuf\Internal\RepeatedField + * @deprecated + */ + public function getAvailableInventoryItemIds() + { + @trigger_error('available_inventory_item_ids is deprecated.', E_USER_DEPRECATED); + return $this->available_inventory_item_ids; + } + + /** + * Corresponds to the `AVAILABLE_PACKAGE` inventory item on the VM. + * If the vulnerability report was not updated after the VM inventory + * update, these values might not display in VM inventory. If there is no + * available fix, the field is empty. The `inventory_item` value specifies + * the latest `SoftwarePackage` available to the VM that fixes the + * vulnerability. + * + * Generated from protobuf field repeated string available_inventory_item_ids = 3 [deprecated = true]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + * @deprecated + */ + public function setAvailableInventoryItemIds($var) + { + @trigger_error('available_inventory_item_ids is deprecated.', E_USER_DEPRECATED); + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->available_inventory_item_ids = $arr; + + return $this; + } + + /** + * The timestamp for when the vulnerability was first detected. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 4; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * The timestamp for when the vulnerability was first detected. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 4; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * The timestamp for when the vulnerability was last modified. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 5; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * The timestamp for when the vulnerability was last modified. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 5; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * List of items affected by the vulnerability. + * + * Generated from protobuf field repeated .google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Item items = 6; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getItems() + { + return $this->items; + } + + /** + * List of items affected by the vulnerability. + * + * Generated from protobuf field repeated .google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Item items = 6; + * @param array<\Google\Cloud\OsConfig\V1\VulnerabilityReport\Vulnerability\Item>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setItems($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\OsConfig\V1\VulnerabilityReport\Vulnerability\Item::class); + $this->items = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Vulnerability::class, \Google\Cloud\OsConfig\V1\VulnerabilityReport_Vulnerability::class); + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/VulnerabilityReport/Vulnerability/Details.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/VulnerabilityReport/Vulnerability/Details.php new file mode 100644 index 000000000000..395df6446c9c --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/VulnerabilityReport/Vulnerability/Details.php @@ -0,0 +1,263 @@ +google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details + */ +class Details extends \Google\Protobuf\Internal\Message +{ + /** + * The CVE of the vulnerability. CVE cannot be + * empty and the combination of should be unique + * across vulnerabilities for a VM. + * + * Generated from protobuf field string cve = 1; + */ + protected $cve = ''; + /** + * The CVSS V2 score of this vulnerability. CVSS V2 score is on a scale of + * 0 - 10 where 0 indicates low severity and 10 indicates high severity. + * + * Generated from protobuf field float cvss_v2_score = 2; + */ + protected $cvss_v2_score = 0.0; + /** + * The full description of the CVSSv3 for this vulnerability from NVD. + * + * Generated from protobuf field .google.cloud.osconfig.v1.CVSSv3 cvss_v3 = 3; + */ + protected $cvss_v3 = null; + /** + * Assigned severity/impact ranking from the distro. + * + * Generated from protobuf field string severity = 4; + */ + protected $severity = ''; + /** + * The note or description describing the vulnerability from the distro. + * + * Generated from protobuf field string description = 5; + */ + protected $description = ''; + /** + * Corresponds to the references attached to the `VulnerabilityDetails`. + * + * Generated from protobuf field repeated .google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details.Reference references = 6; + */ + private $references; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $cve + * The CVE of the vulnerability. CVE cannot be + * empty and the combination of should be unique + * across vulnerabilities for a VM. + * @type float $cvss_v2_score + * The CVSS V2 score of this vulnerability. CVSS V2 score is on a scale of + * 0 - 10 where 0 indicates low severity and 10 indicates high severity. + * @type \Google\Cloud\OsConfig\V1\CVSSv3 $cvss_v3 + * The full description of the CVSSv3 for this vulnerability from NVD. + * @type string $severity + * Assigned severity/impact ranking from the distro. + * @type string $description + * The note or description describing the vulnerability from the distro. + * @type array<\Google\Cloud\OsConfig\V1\VulnerabilityReport\Vulnerability\Details\Reference>|\Google\Protobuf\Internal\RepeatedField $references + * Corresponds to the references attached to the `VulnerabilityDetails`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\Vulnerability::initOnce(); + parent::__construct($data); + } + + /** + * The CVE of the vulnerability. CVE cannot be + * empty and the combination of should be unique + * across vulnerabilities for a VM. + * + * Generated from protobuf field string cve = 1; + * @return string + */ + public function getCve() + { + return $this->cve; + } + + /** + * The CVE of the vulnerability. CVE cannot be + * empty and the combination of should be unique + * across vulnerabilities for a VM. + * + * Generated from protobuf field string cve = 1; + * @param string $var + * @return $this + */ + public function setCve($var) + { + GPBUtil::checkString($var, True); + $this->cve = $var; + + return $this; + } + + /** + * The CVSS V2 score of this vulnerability. CVSS V2 score is on a scale of + * 0 - 10 where 0 indicates low severity and 10 indicates high severity. + * + * Generated from protobuf field float cvss_v2_score = 2; + * @return float + */ + public function getCvssV2Score() + { + return $this->cvss_v2_score; + } + + /** + * The CVSS V2 score of this vulnerability. CVSS V2 score is on a scale of + * 0 - 10 where 0 indicates low severity and 10 indicates high severity. + * + * Generated from protobuf field float cvss_v2_score = 2; + * @param float $var + * @return $this + */ + public function setCvssV2Score($var) + { + GPBUtil::checkFloat($var); + $this->cvss_v2_score = $var; + + return $this; + } + + /** + * The full description of the CVSSv3 for this vulnerability from NVD. + * + * Generated from protobuf field .google.cloud.osconfig.v1.CVSSv3 cvss_v3 = 3; + * @return \Google\Cloud\OsConfig\V1\CVSSv3|null + */ + public function getCvssV3() + { + return $this->cvss_v3; + } + + public function hasCvssV3() + { + return isset($this->cvss_v3); + } + + public function clearCvssV3() + { + unset($this->cvss_v3); + } + + /** + * The full description of the CVSSv3 for this vulnerability from NVD. + * + * Generated from protobuf field .google.cloud.osconfig.v1.CVSSv3 cvss_v3 = 3; + * @param \Google\Cloud\OsConfig\V1\CVSSv3 $var + * @return $this + */ + public function setCvssV3($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\CVSSv3::class); + $this->cvss_v3 = $var; + + return $this; + } + + /** + * Assigned severity/impact ranking from the distro. + * + * Generated from protobuf field string severity = 4; + * @return string + */ + public function getSeverity() + { + return $this->severity; + } + + /** + * Assigned severity/impact ranking from the distro. + * + * Generated from protobuf field string severity = 4; + * @param string $var + * @return $this + */ + public function setSeverity($var) + { + GPBUtil::checkString($var, True); + $this->severity = $var; + + return $this; + } + + /** + * The note or description describing the vulnerability from the distro. + * + * Generated from protobuf field string description = 5; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * The note or description describing the vulnerability from the distro. + * + * Generated from protobuf field string description = 5; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Corresponds to the references attached to the `VulnerabilityDetails`. + * + * Generated from protobuf field repeated .google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details.Reference references = 6; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getReferences() + { + return $this->references; + } + + /** + * Corresponds to the references attached to the `VulnerabilityDetails`. + * + * Generated from protobuf field repeated .google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details.Reference references = 6; + * @param array<\Google\Cloud\OsConfig\V1\VulnerabilityReport\Vulnerability\Details\Reference>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setReferences($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\OsConfig\V1\VulnerabilityReport\Vulnerability\Details\Reference::class); + $this->references = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Details::class, \Google\Cloud\OsConfig\V1\VulnerabilityReport_Vulnerability_Details::class); + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/VulnerabilityReport/Vulnerability/Details/Reference.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/VulnerabilityReport/Vulnerability/Details/Reference.php new file mode 100644 index 000000000000..1baf7f3ead4c --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/VulnerabilityReport/Vulnerability/Details/Reference.php @@ -0,0 +1,104 @@ +google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details.Reference + */ +class Reference extends \Google\Protobuf\Internal\Message +{ + /** + * The url of the reference. + * + * Generated from protobuf field string url = 1; + */ + protected $url = ''; + /** + * The source of the reference e.g. NVD. + * + * Generated from protobuf field string source = 2; + */ + protected $source = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $url + * The url of the reference. + * @type string $source + * The source of the reference e.g. NVD. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\Vulnerability::initOnce(); + parent::__construct($data); + } + + /** + * The url of the reference. + * + * Generated from protobuf field string url = 1; + * @return string + */ + public function getUrl() + { + return $this->url; + } + + /** + * The url of the reference. + * + * Generated from protobuf field string url = 1; + * @param string $var + * @return $this + */ + public function setUrl($var) + { + GPBUtil::checkString($var, True); + $this->url = $var; + + return $this; + } + + /** + * The source of the reference e.g. NVD. + * + * Generated from protobuf field string source = 2; + * @return string + */ + public function getSource() + { + return $this->source; + } + + /** + * The source of the reference e.g. NVD. + * + * Generated from protobuf field string source = 2; + * @param string $var + * @return $this + */ + public function setSource($var) + { + GPBUtil::checkString($var, True); + $this->source = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Reference::class, \Google\Cloud\OsConfig\V1\VulnerabilityReport_Vulnerability_Details_Reference::class); + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/VulnerabilityReport/Vulnerability/Item.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/VulnerabilityReport/Vulnerability/Item.php new file mode 100644 index 000000000000..cf61b3d6f807 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/VulnerabilityReport/Vulnerability/Item.php @@ -0,0 +1,213 @@ +google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Item + */ +class Item extends \Google\Protobuf\Internal\Message +{ + /** + * Corresponds to the `INSTALLED_PACKAGE` inventory item on the VM. + * This field displays the inventory items affected by this vulnerability. + * If the vulnerability report was not updated after the VM inventory + * update, these values might not display in VM inventory. For some + * operating systems, this field might be empty. + * + * Generated from protobuf field string installed_inventory_item_id = 1; + */ + protected $installed_inventory_item_id = ''; + /** + * Corresponds to the `AVAILABLE_PACKAGE` inventory item on the VM. + * If the vulnerability report was not updated after the VM inventory + * update, these values might not display in VM inventory. If there is no + * available fix, the field is empty. The `inventory_item` value specifies + * the latest `SoftwarePackage` available to the VM that fixes the + * vulnerability. + * + * Generated from protobuf field string available_inventory_item_id = 2; + */ + protected $available_inventory_item_id = ''; + /** + * The recommended [CPE URI](https://cpe.mitre.org/specification/) update + * that contains a fix for this vulnerability. + * + * Generated from protobuf field string fixed_cpe_uri = 3; + */ + protected $fixed_cpe_uri = ''; + /** + * The upstream OS patch, packages or KB that fixes the vulnerability. + * + * Generated from protobuf field string upstream_fix = 4; + */ + protected $upstream_fix = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $installed_inventory_item_id + * Corresponds to the `INSTALLED_PACKAGE` inventory item on the VM. + * This field displays the inventory items affected by this vulnerability. + * If the vulnerability report was not updated after the VM inventory + * update, these values might not display in VM inventory. For some + * operating systems, this field might be empty. + * @type string $available_inventory_item_id + * Corresponds to the `AVAILABLE_PACKAGE` inventory item on the VM. + * If the vulnerability report was not updated after the VM inventory + * update, these values might not display in VM inventory. If there is no + * available fix, the field is empty. The `inventory_item` value specifies + * the latest `SoftwarePackage` available to the VM that fixes the + * vulnerability. + * @type string $fixed_cpe_uri + * The recommended [CPE URI](https://cpe.mitre.org/specification/) update + * that contains a fix for this vulnerability. + * @type string $upstream_fix + * The upstream OS patch, packages or KB that fixes the vulnerability. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\Vulnerability::initOnce(); + parent::__construct($data); + } + + /** + * Corresponds to the `INSTALLED_PACKAGE` inventory item on the VM. + * This field displays the inventory items affected by this vulnerability. + * If the vulnerability report was not updated after the VM inventory + * update, these values might not display in VM inventory. For some + * operating systems, this field might be empty. + * + * Generated from protobuf field string installed_inventory_item_id = 1; + * @return string + */ + public function getInstalledInventoryItemId() + { + return $this->installed_inventory_item_id; + } + + /** + * Corresponds to the `INSTALLED_PACKAGE` inventory item on the VM. + * This field displays the inventory items affected by this vulnerability. + * If the vulnerability report was not updated after the VM inventory + * update, these values might not display in VM inventory. For some + * operating systems, this field might be empty. + * + * Generated from protobuf field string installed_inventory_item_id = 1; + * @param string $var + * @return $this + */ + public function setInstalledInventoryItemId($var) + { + GPBUtil::checkString($var, True); + $this->installed_inventory_item_id = $var; + + return $this; + } + + /** + * Corresponds to the `AVAILABLE_PACKAGE` inventory item on the VM. + * If the vulnerability report was not updated after the VM inventory + * update, these values might not display in VM inventory. If there is no + * available fix, the field is empty. The `inventory_item` value specifies + * the latest `SoftwarePackage` available to the VM that fixes the + * vulnerability. + * + * Generated from protobuf field string available_inventory_item_id = 2; + * @return string + */ + public function getAvailableInventoryItemId() + { + return $this->available_inventory_item_id; + } + + /** + * Corresponds to the `AVAILABLE_PACKAGE` inventory item on the VM. + * If the vulnerability report was not updated after the VM inventory + * update, these values might not display in VM inventory. If there is no + * available fix, the field is empty. The `inventory_item` value specifies + * the latest `SoftwarePackage` available to the VM that fixes the + * vulnerability. + * + * Generated from protobuf field string available_inventory_item_id = 2; + * @param string $var + * @return $this + */ + public function setAvailableInventoryItemId($var) + { + GPBUtil::checkString($var, True); + $this->available_inventory_item_id = $var; + + return $this; + } + + /** + * The recommended [CPE URI](https://cpe.mitre.org/specification/) update + * that contains a fix for this vulnerability. + * + * Generated from protobuf field string fixed_cpe_uri = 3; + * @return string + */ + public function getFixedCpeUri() + { + return $this->fixed_cpe_uri; + } + + /** + * The recommended [CPE URI](https://cpe.mitre.org/specification/) update + * that contains a fix for this vulnerability. + * + * Generated from protobuf field string fixed_cpe_uri = 3; + * @param string $var + * @return $this + */ + public function setFixedCpeUri($var) + { + GPBUtil::checkString($var, True); + $this->fixed_cpe_uri = $var; + + return $this; + } + + /** + * The upstream OS patch, packages or KB that fixes the vulnerability. + * + * Generated from protobuf field string upstream_fix = 4; + * @return string + */ + public function getUpstreamFix() + { + return $this->upstream_fix; + } + + /** + * The upstream OS patch, packages or KB that fixes the vulnerability. + * + * Generated from protobuf field string upstream_fix = 4; + * @param string $var + * @return $this + */ + public function setUpstreamFix($var) + { + GPBUtil::checkString($var, True); + $this->upstream_fix = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Item::class, \Google\Cloud\OsConfig\V1\VulnerabilityReport_Vulnerability_Item::class); + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/WeekDayOfMonth.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/WeekDayOfMonth.php new file mode 100644 index 000000000000..ade13fa6ec0d --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/WeekDayOfMonth.php @@ -0,0 +1,163 @@ +google.cloud.osconfig.v1.WeekDayOfMonth + */ +class WeekDayOfMonth extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Week number in a month. 1-4 indicates the 1st to 4th week of the + * month. -1 indicates the last week of the month. + * + * Generated from protobuf field int32 week_ordinal = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $week_ordinal = 0; + /** + * Required. A day of the week. + * + * Generated from protobuf field .google.type.DayOfWeek day_of_week = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $day_of_week = 0; + /** + * Optional. Represents the number of days before or after the given week day + * of month that the patch deployment is scheduled for. For example if + * `week_ordinal` and `day_of_week` values point to the second day of the + * month and this `day_offset` value is set to `3`, the patch deployment takes + * place three days after the second Tuesday of the month. If this value is + * negative, for example -5, the patches are deployed five days before before + * the second Tuesday of the month. Allowed values are in range [-30, 30]. + * + * Generated from protobuf field int32 day_offset = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $day_offset = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $week_ordinal + * Required. Week number in a month. 1-4 indicates the 1st to 4th week of the + * month. -1 indicates the last week of the month. + * @type int $day_of_week + * Required. A day of the week. + * @type int $day_offset + * Optional. Represents the number of days before or after the given week day + * of month that the patch deployment is scheduled for. For example if + * `week_ordinal` and `day_of_week` values point to the second day of the + * month and this `day_offset` value is set to `3`, the patch deployment takes + * place three days after the second Tuesday of the month. If this value is + * negative, for example -5, the patches are deployed five days before before + * the second Tuesday of the month. Allowed values are in range [-30, 30]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\PatchDeployments::initOnce(); + parent::__construct($data); + } + + /** + * Required. Week number in a month. 1-4 indicates the 1st to 4th week of the + * month. -1 indicates the last week of the month. + * + * Generated from protobuf field int32 week_ordinal = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getWeekOrdinal() + { + return $this->week_ordinal; + } + + /** + * Required. Week number in a month. 1-4 indicates the 1st to 4th week of the + * month. -1 indicates the last week of the month. + * + * Generated from protobuf field int32 week_ordinal = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setWeekOrdinal($var) + { + GPBUtil::checkInt32($var); + $this->week_ordinal = $var; + + return $this; + } + + /** + * Required. A day of the week. + * + * Generated from protobuf field .google.type.DayOfWeek day_of_week = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getDayOfWeek() + { + return $this->day_of_week; + } + + /** + * Required. A day of the week. + * + * Generated from protobuf field .google.type.DayOfWeek day_of_week = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setDayOfWeek($var) + { + GPBUtil::checkEnum($var, \Google\Type\DayOfWeek::class); + $this->day_of_week = $var; + + return $this; + } + + /** + * Optional. Represents the number of days before or after the given week day + * of month that the patch deployment is scheduled for. For example if + * `week_ordinal` and `day_of_week` values point to the second day of the + * month and this `day_offset` value is set to `3`, the patch deployment takes + * place three days after the second Tuesday of the month. If this value is + * negative, for example -5, the patches are deployed five days before before + * the second Tuesday of the month. Allowed values are in range [-30, 30]. + * + * Generated from protobuf field int32 day_offset = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getDayOffset() + { + return $this->day_offset; + } + + /** + * Optional. Represents the number of days before or after the given week day + * of month that the patch deployment is scheduled for. For example if + * `week_ordinal` and `day_of_week` values point to the second day of the + * month and this `day_offset` value is set to `3`, the patch deployment takes + * place three days after the second Tuesday of the month. If this value is + * negative, for example -5, the patches are deployed five days before before + * the second Tuesday of the month. Allowed values are in range [-30, 30]. + * + * Generated from protobuf field int32 day_offset = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setDayOffset($var) + { + GPBUtil::checkInt32($var); + $this->day_offset = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/WeeklySchedule.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/WeeklySchedule.php new file mode 100644 index 000000000000..4090800c3937 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/WeeklySchedule.php @@ -0,0 +1,67 @@ +google.cloud.osconfig.v1.WeeklySchedule + */ +class WeeklySchedule extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Day of the week. + * + * Generated from protobuf field .google.type.DayOfWeek day_of_week = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $day_of_week = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $day_of_week + * Required. Day of the week. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\PatchDeployments::initOnce(); + parent::__construct($data); + } + + /** + * Required. Day of the week. + * + * Generated from protobuf field .google.type.DayOfWeek day_of_week = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getDayOfWeek() + { + return $this->day_of_week; + } + + /** + * Required. Day of the week. + * + * Generated from protobuf field .google.type.DayOfWeek day_of_week = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setDayOfWeek($var) + { + GPBUtil::checkEnum($var, \Google\Type\DayOfWeek::class); + $this->day_of_week = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/WindowsUpdateSettings.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/WindowsUpdateSettings.php new file mode 100644 index 000000000000..86dcae33129a --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/WindowsUpdateSettings.php @@ -0,0 +1,147 @@ +google.cloud.osconfig.v1.WindowsUpdateSettings + */ +class WindowsUpdateSettings extends \Google\Protobuf\Internal\Message +{ + /** + * Only apply updates of these windows update classifications. If empty, all + * updates are applied. + * + * Generated from protobuf field repeated .google.cloud.osconfig.v1.WindowsUpdateSettings.Classification classifications = 1; + */ + private $classifications; + /** + * List of KBs to exclude from update. + * + * Generated from protobuf field repeated string excludes = 2; + */ + private $excludes; + /** + * An exclusive list of kbs to be updated. These are the only patches + * that will be updated. This field must not be used with other + * patch configurations. + * + * Generated from protobuf field repeated string exclusive_patches = 3; + */ + private $exclusive_patches; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $classifications + * Only apply updates of these windows update classifications. If empty, all + * updates are applied. + * @type array|\Google\Protobuf\Internal\RepeatedField $excludes + * List of KBs to exclude from update. + * @type array|\Google\Protobuf\Internal\RepeatedField $exclusive_patches + * An exclusive list of kbs to be updated. These are the only patches + * that will be updated. This field must not be used with other + * patch configurations. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\PatchJobs::initOnce(); + parent::__construct($data); + } + + /** + * Only apply updates of these windows update classifications. If empty, all + * updates are applied. + * + * Generated from protobuf field repeated .google.cloud.osconfig.v1.WindowsUpdateSettings.Classification classifications = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getClassifications() + { + return $this->classifications; + } + + /** + * Only apply updates of these windows update classifications. If empty, all + * updates are applied. + * + * Generated from protobuf field repeated .google.cloud.osconfig.v1.WindowsUpdateSettings.Classification classifications = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setClassifications($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\OsConfig\V1\WindowsUpdateSettings\Classification::class); + $this->classifications = $arr; + + return $this; + } + + /** + * List of KBs to exclude from update. + * + * Generated from protobuf field repeated string excludes = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getExcludes() + { + return $this->excludes; + } + + /** + * List of KBs to exclude from update. + * + * Generated from protobuf field repeated string excludes = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setExcludes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->excludes = $arr; + + return $this; + } + + /** + * An exclusive list of kbs to be updated. These are the only patches + * that will be updated. This field must not be used with other + * patch configurations. + * + * Generated from protobuf field repeated string exclusive_patches = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getExclusivePatches() + { + return $this->exclusive_patches; + } + + /** + * An exclusive list of kbs to be updated. These are the only patches + * that will be updated. This field must not be used with other + * patch configurations. + * + * Generated from protobuf field repeated string exclusive_patches = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setExclusivePatches($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->exclusive_patches = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/WindowsUpdateSettings/Classification.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/WindowsUpdateSettings/Classification.php new file mode 100644 index 000000000000..4aaae34a6a96 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/WindowsUpdateSettings/Classification.php @@ -0,0 +1,132 @@ +google.cloud.osconfig.v1.WindowsUpdateSettings.Classification + */ +class Classification +{ + /** + * Invalid. If classifications are included, they must be specified. + * + * Generated from protobuf enum CLASSIFICATION_UNSPECIFIED = 0; + */ + const CLASSIFICATION_UNSPECIFIED = 0; + /** + * "A widely released fix for a specific problem that addresses a critical, + * non-security-related bug." [1] + * + * Generated from protobuf enum CRITICAL = 1; + */ + const CRITICAL = 1; + /** + * "A widely released fix for a product-specific, security-related + * vulnerability. Security vulnerabilities are rated by their severity. The + * severity rating is indicated in the Microsoft security bulletin as + * critical, important, moderate, or low." [1] + * + * Generated from protobuf enum SECURITY = 2; + */ + const SECURITY = 2; + /** + * "A widely released and frequent software update that contains additions + * to a product's definition database. Definition databases are often used + * to detect objects that have specific attributes, such as malicious code, + * phishing websites, or junk mail." [1] + * + * Generated from protobuf enum DEFINITION = 3; + */ + const DEFINITION = 3; + /** + * "Software that controls the input and output of a device." [1] + * + * Generated from protobuf enum DRIVER = 4; + */ + const DRIVER = 4; + /** + * "New product functionality that is first distributed outside the context + * of a product release and that is typically included in the next full + * product release." [1] + * + * Generated from protobuf enum FEATURE_PACK = 5; + */ + const FEATURE_PACK = 5; + /** + * "A tested, cumulative set of all hotfixes, security updates, critical + * updates, and updates. Additionally, service packs may contain additional + * fixes for problems that are found internally since the release of the + * product. Service packs my also contain a limited number of + * customer-requested design changes or features." [1] + * + * Generated from protobuf enum SERVICE_PACK = 6; + */ + const SERVICE_PACK = 6; + /** + * "A utility or feature that helps complete a task or set of tasks." [1] + * + * Generated from protobuf enum TOOL = 7; + */ + const TOOL = 7; + /** + * "A tested, cumulative set of hotfixes, security updates, critical + * updates, and updates that are packaged together for easy deployment. A + * rollup generally targets a specific area, such as security, or a + * component of a product, such as Internet Information Services (IIS)." [1] + * + * Generated from protobuf enum UPDATE_ROLLUP = 8; + */ + const UPDATE_ROLLUP = 8; + /** + * "A widely released fix for a specific problem. An update addresses a + * noncritical, non-security-related bug." [1] + * + * Generated from protobuf enum UPDATE = 9; + */ + const UPDATE = 9; + + private static $valueToName = [ + self::CLASSIFICATION_UNSPECIFIED => 'CLASSIFICATION_UNSPECIFIED', + self::CRITICAL => 'CRITICAL', + self::SECURITY => 'SECURITY', + self::DEFINITION => 'DEFINITION', + self::DRIVER => 'DRIVER', + self::FEATURE_PACK => 'FEATURE_PACK', + self::SERVICE_PACK => 'SERVICE_PACK', + self::TOOL => 'TOOL', + self::UPDATE_ROLLUP => 'UPDATE_ROLLUP', + self::UPDATE => 'UPDATE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Classification::class, \Google\Cloud\OsConfig\V1\WindowsUpdateSettings_Classification::class); + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/YumSettings.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/YumSettings.php new file mode 100644 index 000000000000..e40067eea438 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/YumSettings.php @@ -0,0 +1,191 @@ +google.cloud.osconfig.v1.YumSettings + */ +class YumSettings extends \Google\Protobuf\Internal\Message +{ + /** + * Adds the `--security` flag to `yum update`. Not supported on + * all platforms. + * + * Generated from protobuf field bool security = 1; + */ + protected $security = false; + /** + * Will cause patch to run `yum update-minimal` instead. + * + * Generated from protobuf field bool minimal = 2; + */ + protected $minimal = false; + /** + * List of packages to exclude from update. These packages are excluded by + * using the yum `--exclude` flag. + * + * Generated from protobuf field repeated string excludes = 3; + */ + private $excludes; + /** + * An exclusive list of packages to be updated. These are the only packages + * that will be updated. If these packages are not installed, they will be + * ignored. This field must not be specified with any other patch + * configuration fields. + * + * Generated from protobuf field repeated string exclusive_packages = 4; + */ + private $exclusive_packages; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $security + * Adds the `--security` flag to `yum update`. Not supported on + * all platforms. + * @type bool $minimal + * Will cause patch to run `yum update-minimal` instead. + * @type array|\Google\Protobuf\Internal\RepeatedField $excludes + * List of packages to exclude from update. These packages are excluded by + * using the yum `--exclude` flag. + * @type array|\Google\Protobuf\Internal\RepeatedField $exclusive_packages + * An exclusive list of packages to be updated. These are the only packages + * that will be updated. If these packages are not installed, they will be + * ignored. This field must not be specified with any other patch + * configuration fields. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\PatchJobs::initOnce(); + parent::__construct($data); + } + + /** + * Adds the `--security` flag to `yum update`. Not supported on + * all platforms. + * + * Generated from protobuf field bool security = 1; + * @return bool + */ + public function getSecurity() + { + return $this->security; + } + + /** + * Adds the `--security` flag to `yum update`. Not supported on + * all platforms. + * + * Generated from protobuf field bool security = 1; + * @param bool $var + * @return $this + */ + public function setSecurity($var) + { + GPBUtil::checkBool($var); + $this->security = $var; + + return $this; + } + + /** + * Will cause patch to run `yum update-minimal` instead. + * + * Generated from protobuf field bool minimal = 2; + * @return bool + */ + public function getMinimal() + { + return $this->minimal; + } + + /** + * Will cause patch to run `yum update-minimal` instead. + * + * Generated from protobuf field bool minimal = 2; + * @param bool $var + * @return $this + */ + public function setMinimal($var) + { + GPBUtil::checkBool($var); + $this->minimal = $var; + + return $this; + } + + /** + * List of packages to exclude from update. These packages are excluded by + * using the yum `--exclude` flag. + * + * Generated from protobuf field repeated string excludes = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getExcludes() + { + return $this->excludes; + } + + /** + * List of packages to exclude from update. These packages are excluded by + * using the yum `--exclude` flag. + * + * Generated from protobuf field repeated string excludes = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setExcludes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->excludes = $arr; + + return $this; + } + + /** + * An exclusive list of packages to be updated. These are the only packages + * that will be updated. If these packages are not installed, they will be + * ignored. This field must not be specified with any other patch + * configuration fields. + * + * Generated from protobuf field repeated string exclusive_packages = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getExclusivePackages() + { + return $this->exclusive_packages; + } + + /** + * An exclusive list of packages to be updated. These are the only packages + * that will be updated. If these packages are not installed, they will be + * ignored. This field must not be specified with any other patch + * configuration fields. + * + * Generated from protobuf field repeated string exclusive_packages = 4; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setExclusivePackages($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->exclusive_packages = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ZypperSettings.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ZypperSettings.php new file mode 100644 index 000000000000..e69961934d6e --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ZypperSettings.php @@ -0,0 +1,254 @@ +google.cloud.osconfig.v1.ZypperSettings + */ +class ZypperSettings extends \Google\Protobuf\Internal\Message +{ + /** + * Adds the `--with-optional` flag to `zypper patch`. + * + * Generated from protobuf field bool with_optional = 1; + */ + protected $with_optional = false; + /** + * Adds the `--with-update` flag, to `zypper patch`. + * + * Generated from protobuf field bool with_update = 2; + */ + protected $with_update = false; + /** + * Install only patches with these categories. + * Common categories include security, recommended, and feature. + * + * Generated from protobuf field repeated string categories = 3; + */ + private $categories; + /** + * Install only patches with these severities. + * Common severities include critical, important, moderate, and low. + * + * Generated from protobuf field repeated string severities = 4; + */ + private $severities; + /** + * List of patches to exclude from update. + * + * Generated from protobuf field repeated string excludes = 5; + */ + private $excludes; + /** + * An exclusive list of patches to be updated. These are the only patches + * that will be installed using 'zypper patch patch:' command. + * This field must not be used with any other patch configuration fields. + * + * Generated from protobuf field repeated string exclusive_patches = 6; + */ + private $exclusive_patches; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $with_optional + * Adds the `--with-optional` flag to `zypper patch`. + * @type bool $with_update + * Adds the `--with-update` flag, to `zypper patch`. + * @type array|\Google\Protobuf\Internal\RepeatedField $categories + * Install only patches with these categories. + * Common categories include security, recommended, and feature. + * @type array|\Google\Protobuf\Internal\RepeatedField $severities + * Install only patches with these severities. + * Common severities include critical, important, moderate, and low. + * @type array|\Google\Protobuf\Internal\RepeatedField $excludes + * List of patches to exclude from update. + * @type array|\Google\Protobuf\Internal\RepeatedField $exclusive_patches + * An exclusive list of patches to be updated. These are the only patches + * that will be installed using 'zypper patch patch:' command. + * This field must not be used with any other patch configuration fields. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Osconfig\V1\PatchJobs::initOnce(); + parent::__construct($data); + } + + /** + * Adds the `--with-optional` flag to `zypper patch`. + * + * Generated from protobuf field bool with_optional = 1; + * @return bool + */ + public function getWithOptional() + { + return $this->with_optional; + } + + /** + * Adds the `--with-optional` flag to `zypper patch`. + * + * Generated from protobuf field bool with_optional = 1; + * @param bool $var + * @return $this + */ + public function setWithOptional($var) + { + GPBUtil::checkBool($var); + $this->with_optional = $var; + + return $this; + } + + /** + * Adds the `--with-update` flag, to `zypper patch`. + * + * Generated from protobuf field bool with_update = 2; + * @return bool + */ + public function getWithUpdate() + { + return $this->with_update; + } + + /** + * Adds the `--with-update` flag, to `zypper patch`. + * + * Generated from protobuf field bool with_update = 2; + * @param bool $var + * @return $this + */ + public function setWithUpdate($var) + { + GPBUtil::checkBool($var); + $this->with_update = $var; + + return $this; + } + + /** + * Install only patches with these categories. + * Common categories include security, recommended, and feature. + * + * Generated from protobuf field repeated string categories = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCategories() + { + return $this->categories; + } + + /** + * Install only patches with these categories. + * Common categories include security, recommended, and feature. + * + * Generated from protobuf field repeated string categories = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCategories($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->categories = $arr; + + return $this; + } + + /** + * Install only patches with these severities. + * Common severities include critical, important, moderate, and low. + * + * Generated from protobuf field repeated string severities = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSeverities() + { + return $this->severities; + } + + /** + * Install only patches with these severities. + * Common severities include critical, important, moderate, and low. + * + * Generated from protobuf field repeated string severities = 4; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSeverities($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->severities = $arr; + + return $this; + } + + /** + * List of patches to exclude from update. + * + * Generated from protobuf field repeated string excludes = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getExcludes() + { + return $this->excludes; + } + + /** + * List of patches to exclude from update. + * + * Generated from protobuf field repeated string excludes = 5; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setExcludes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->excludes = $arr; + + return $this; + } + + /** + * An exclusive list of patches to be updated. These are the only patches + * that will be installed using 'zypper patch patch:' command. + * This field must not be used with any other patch configuration fields. + * + * Generated from protobuf field repeated string exclusive_patches = 6; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getExclusivePatches() + { + return $this->exclusive_patches; + } + + /** + * An exclusive list of patches to be updated. These are the only patches + * that will be installed using 'zypper patch patch:' command. + * This field must not be used with any other patch configuration fields. + * + * Generated from protobuf field repeated string exclusive_patches = 6; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setExclusivePatches($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->exclusive_patches = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigServiceClient/cancel_patch_job.php b/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigServiceClient/cancel_patch_job.php new file mode 100644 index 000000000000..800390b484f3 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigServiceClient/cancel_patch_job.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var PatchJob $response */ + $response = $osConfigServiceClient->cancelPatchJob($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = OsConfigServiceClient::patchJobName('[PROJECT]', '[PATCH_JOB]'); + + cancel_patch_job_sample($formattedName); +} +// [END osconfig_v1_generated_OsConfigService_CancelPatchJob_sync] diff --git a/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigServiceClient/create_patch_deployment.php b/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigServiceClient/create_patch_deployment.php new file mode 100644 index 000000000000..0f9f877f3669 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigServiceClient/create_patch_deployment.php @@ -0,0 +1,92 @@ +setExecuteTime($patchDeploymentOneTimeScheduleExecuteTime); + $patchDeployment = (new PatchDeployment()) + ->setInstanceFilter($patchDeploymentInstanceFilter) + ->setOneTimeSchedule($patchDeploymentOneTimeSchedule); + $request = (new CreatePatchDeploymentRequest()) + ->setParent($formattedParent) + ->setPatchDeploymentId($patchDeploymentId) + ->setPatchDeployment($patchDeployment); + + // Call the API and handle any network failures. + try { + /** @var PatchDeployment $response */ + $response = $osConfigServiceClient->createPatchDeployment($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = OsConfigServiceClient::projectName('[PROJECT]'); + $patchDeploymentId = '[PATCH_DEPLOYMENT_ID]'; + + create_patch_deployment_sample($formattedParent, $patchDeploymentId); +} +// [END osconfig_v1_generated_OsConfigService_CreatePatchDeployment_sync] diff --git a/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigServiceClient/delete_patch_deployment.php b/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigServiceClient/delete_patch_deployment.php new file mode 100644 index 000000000000..5b70ab855314 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigServiceClient/delete_patch_deployment.php @@ -0,0 +1,70 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $osConfigServiceClient->deletePatchDeployment($request); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = OsConfigServiceClient::patchDeploymentName('[PROJECT]', '[PATCH_DEPLOYMENT]'); + + delete_patch_deployment_sample($formattedName); +} +// [END osconfig_v1_generated_OsConfigService_DeletePatchDeployment_sync] diff --git a/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigServiceClient/execute_patch_job.php b/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigServiceClient/execute_patch_job.php new file mode 100644 index 000000000000..4432b5f9b33d --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigServiceClient/execute_patch_job.php @@ -0,0 +1,74 @@ +setParent($formattedParent) + ->setInstanceFilter($instanceFilter); + + // Call the API and handle any network failures. + try { + /** @var PatchJob $response */ + $response = $osConfigServiceClient->executePatchJob($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = OsConfigServiceClient::projectName('[PROJECT]'); + + execute_patch_job_sample($formattedParent); +} +// [END osconfig_v1_generated_OsConfigService_ExecutePatchJob_sync] diff --git a/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigServiceClient/get_patch_deployment.php b/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigServiceClient/get_patch_deployment.php new file mode 100644 index 000000000000..ae48156f11d4 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigServiceClient/get_patch_deployment.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var PatchDeployment $response */ + $response = $osConfigServiceClient->getPatchDeployment($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = OsConfigServiceClient::patchDeploymentName('[PROJECT]', '[PATCH_DEPLOYMENT]'); + + get_patch_deployment_sample($formattedName); +} +// [END osconfig_v1_generated_OsConfigService_GetPatchDeployment_sync] diff --git a/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigServiceClient/get_patch_job.php b/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigServiceClient/get_patch_job.php new file mode 100644 index 000000000000..cd14116f66c3 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigServiceClient/get_patch_job.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var PatchJob $response */ + $response = $osConfigServiceClient->getPatchJob($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = OsConfigServiceClient::patchJobName('[PROJECT]', '[PATCH_JOB]'); + + get_patch_job_sample($formattedName); +} +// [END osconfig_v1_generated_OsConfigService_GetPatchJob_sync] diff --git a/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigServiceClient/list_patch_deployments.php b/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigServiceClient/list_patch_deployments.php new file mode 100644 index 000000000000..0eeaf8a48221 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigServiceClient/list_patch_deployments.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $osConfigServiceClient->listPatchDeployments($request); + + /** @var PatchDeployment $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = OsConfigServiceClient::projectName('[PROJECT]'); + + list_patch_deployments_sample($formattedParent); +} +// [END osconfig_v1_generated_OsConfigService_ListPatchDeployments_sync] diff --git a/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigServiceClient/list_patch_job_instance_details.php b/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigServiceClient/list_patch_job_instance_details.php new file mode 100644 index 000000000000..039c88439e8c --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigServiceClient/list_patch_job_instance_details.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $osConfigServiceClient->listPatchJobInstanceDetails($request); + + /** @var PatchJobInstanceDetails $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = OsConfigServiceClient::patchJobName('[PROJECT]', '[PATCH_JOB]'); + + list_patch_job_instance_details_sample($formattedParent); +} +// [END osconfig_v1_generated_OsConfigService_ListPatchJobInstanceDetails_sync] diff --git a/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigServiceClient/list_patch_jobs.php b/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigServiceClient/list_patch_jobs.php new file mode 100644 index 000000000000..d2a825d6944e --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigServiceClient/list_patch_jobs.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $osConfigServiceClient->listPatchJobs($request); + + /** @var PatchJob $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = OsConfigServiceClient::projectName('[PROJECT]'); + + list_patch_jobs_sample($formattedParent); +} +// [END osconfig_v1_generated_OsConfigService_ListPatchJobs_sync] diff --git a/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigServiceClient/pause_patch_deployment.php b/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigServiceClient/pause_patch_deployment.php new file mode 100644 index 000000000000..866ec8e1c20d --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigServiceClient/pause_patch_deployment.php @@ -0,0 +1,73 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var PatchDeployment $response */ + $response = $osConfigServiceClient->pausePatchDeployment($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = OsConfigServiceClient::patchDeploymentName('[PROJECT]', '[PATCH_DEPLOYMENT]'); + + pause_patch_deployment_sample($formattedName); +} +// [END osconfig_v1_generated_OsConfigService_PausePatchDeployment_sync] diff --git a/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigServiceClient/resume_patch_deployment.php b/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigServiceClient/resume_patch_deployment.php new file mode 100644 index 000000000000..ede7e714299d --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigServiceClient/resume_patch_deployment.php @@ -0,0 +1,73 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var PatchDeployment $response */ + $response = $osConfigServiceClient->resumePatchDeployment($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = OsConfigServiceClient::patchDeploymentName('[PROJECT]', '[PATCH_DEPLOYMENT]'); + + resume_patch_deployment_sample($formattedName); +} +// [END osconfig_v1_generated_OsConfigService_ResumePatchDeployment_sync] diff --git a/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigServiceClient/update_patch_deployment.php b/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigServiceClient/update_patch_deployment.php new file mode 100644 index 000000000000..8b5a5497d8ce --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigServiceClient/update_patch_deployment.php @@ -0,0 +1,68 @@ +setExecuteTime($patchDeploymentOneTimeScheduleExecuteTime); + $patchDeployment = (new PatchDeployment()) + ->setInstanceFilter($patchDeploymentInstanceFilter) + ->setOneTimeSchedule($patchDeploymentOneTimeSchedule); + $request = (new UpdatePatchDeploymentRequest()) + ->setPatchDeployment($patchDeployment); + + // Call the API and handle any network failures. + try { + /** @var PatchDeployment $response */ + $response = $osConfigServiceClient->updatePatchDeployment($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END osconfig_v1_generated_OsConfigService_UpdatePatchDeployment_sync] diff --git a/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigZonalServiceClient/create_os_policy_assignment.php b/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigZonalServiceClient/create_os_policy_assignment.php new file mode 100644 index 000000000000..5e1ed5052894 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigZonalServiceClient/create_os_policy_assignment.php @@ -0,0 +1,161 @@ +setId($osPolicyAssignmentOsPoliciesResourceGroupsResourcesId); + $osPolicyAssignmentOsPoliciesResourceGroupsResources = [$resource,]; + $resourceGroup = (new ResourceGroup()) + ->setResources($osPolicyAssignmentOsPoliciesResourceGroupsResources); + $osPolicyAssignmentOsPoliciesResourceGroups = [$resourceGroup,]; + $oSPolicy = (new OSPolicy()) + ->setId($osPolicyAssignmentOsPoliciesId) + ->setMode($osPolicyAssignmentOsPoliciesMode) + ->setResourceGroups($osPolicyAssignmentOsPoliciesResourceGroups); + $osPolicyAssignmentOsPolicies = [$oSPolicy,]; + $osPolicyAssignmentInstanceFilter = new InstanceFilter(); + $osPolicyAssignmentRolloutDisruptionBudget = new FixedOrPercent(); + $osPolicyAssignmentRolloutMinWaitDuration = new Duration(); + $osPolicyAssignmentRollout = (new Rollout()) + ->setDisruptionBudget($osPolicyAssignmentRolloutDisruptionBudget) + ->setMinWaitDuration($osPolicyAssignmentRolloutMinWaitDuration); + $osPolicyAssignment = (new OSPolicyAssignment()) + ->setOsPolicies($osPolicyAssignmentOsPolicies) + ->setInstanceFilter($osPolicyAssignmentInstanceFilter) + ->setRollout($osPolicyAssignmentRollout); + $request = (new CreateOSPolicyAssignmentRequest()) + ->setParent($formattedParent) + ->setOsPolicyAssignment($osPolicyAssignment) + ->setOsPolicyAssignmentId($osPolicyAssignmentId); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $osConfigZonalServiceClient->createOSPolicyAssignment($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var OSPolicyAssignment $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = OsConfigZonalServiceClient::locationName('[PROJECT]', '[LOCATION]'); + $osPolicyAssignmentOsPoliciesId = '[ID]'; + $osPolicyAssignmentOsPoliciesMode = Mode::MODE_UNSPECIFIED; + $osPolicyAssignmentOsPoliciesResourceGroupsResourcesId = '[ID]'; + $osPolicyAssignmentId = '[OS_POLICY_ASSIGNMENT_ID]'; + + create_os_policy_assignment_sample( + $formattedParent, + $osPolicyAssignmentOsPoliciesId, + $osPolicyAssignmentOsPoliciesMode, + $osPolicyAssignmentOsPoliciesResourceGroupsResourcesId, + $osPolicyAssignmentId + ); +} +// [END osconfig_v1_generated_OsConfigZonalService_CreateOSPolicyAssignment_sync] diff --git a/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigZonalServiceClient/delete_os_policy_assignment.php b/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigZonalServiceClient/delete_os_policy_assignment.php new file mode 100644 index 000000000000..ee64a498c4a8 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigZonalServiceClient/delete_os_policy_assignment.php @@ -0,0 +1,95 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $osConfigZonalServiceClient->deleteOSPolicyAssignment($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = OsConfigZonalServiceClient::oSPolicyAssignmentName( + '[PROJECT]', + '[LOCATION]', + '[OS_POLICY_ASSIGNMENT]' + ); + + delete_os_policy_assignment_sample($formattedName); +} +// [END osconfig_v1_generated_OsConfigZonalService_DeleteOSPolicyAssignment_sync] diff --git a/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigZonalServiceClient/get_inventory.php b/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigZonalServiceClient/get_inventory.php new file mode 100644 index 000000000000..5d2e9b2a5ae0 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigZonalServiceClient/get_inventory.php @@ -0,0 +1,79 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Inventory $response */ + $response = $osConfigZonalServiceClient->getInventory($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = OsConfigZonalServiceClient::inventoryName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + + get_inventory_sample($formattedName); +} +// [END osconfig_v1_generated_OsConfigZonalService_GetInventory_sync] diff --git a/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigZonalServiceClient/get_os_policy_assignment.php b/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigZonalServiceClient/get_os_policy_assignment.php new file mode 100644 index 000000000000..b02485a4c3da --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigZonalServiceClient/get_os_policy_assignment.php @@ -0,0 +1,82 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OSPolicyAssignment $response */ + $response = $osConfigZonalServiceClient->getOSPolicyAssignment($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = OsConfigZonalServiceClient::oSPolicyAssignmentName( + '[PROJECT]', + '[LOCATION]', + '[OS_POLICY_ASSIGNMENT]' + ); + + get_os_policy_assignment_sample($formattedName); +} +// [END osconfig_v1_generated_OsConfigZonalService_GetOSPolicyAssignment_sync] diff --git a/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigZonalServiceClient/get_os_policy_assignment_report.php b/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigZonalServiceClient/get_os_policy_assignment_report.php new file mode 100644 index 000000000000..9b1b7534b1fa --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigZonalServiceClient/get_os_policy_assignment_report.php @@ -0,0 +1,85 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OSPolicyAssignmentReport $response */ + $response = $osConfigZonalServiceClient->getOSPolicyAssignmentReport($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = OsConfigZonalServiceClient::oSPolicyAssignmentReportName( + '[PROJECT]', + '[LOCATION]', + '[INSTANCE]', + '[ASSIGNMENT]' + ); + + get_os_policy_assignment_report_sample($formattedName); +} +// [END osconfig_v1_generated_OsConfigZonalService_GetOSPolicyAssignmentReport_sync] diff --git a/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigZonalServiceClient/get_vulnerability_report.php b/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigZonalServiceClient/get_vulnerability_report.php new file mode 100644 index 000000000000..65e01e501cc3 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigZonalServiceClient/get_vulnerability_report.php @@ -0,0 +1,83 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var VulnerabilityReport $response */ + $response = $osConfigZonalServiceClient->getVulnerabilityReport($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = OsConfigZonalServiceClient::vulnerabilityReportName( + '[PROJECT]', + '[LOCATION]', + '[INSTANCE]' + ); + + get_vulnerability_report_sample($formattedName); +} +// [END osconfig_v1_generated_OsConfigZonalService_GetVulnerabilityReport_sync] diff --git a/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigZonalServiceClient/list_inventories.php b/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigZonalServiceClient/list_inventories.php new file mode 100644 index 000000000000..6c195d5bb409 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigZonalServiceClient/list_inventories.php @@ -0,0 +1,80 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $osConfigZonalServiceClient->listInventories($request); + + /** @var Inventory $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = OsConfigZonalServiceClient::instanceName('[PROJECT]', '[ZONE]', '[INSTANCE]'); + + list_inventories_sample($formattedParent); +} +// [END osconfig_v1_generated_OsConfigZonalService_ListInventories_sync] diff --git a/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigZonalServiceClient/list_os_policy_assignment_reports.php b/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigZonalServiceClient/list_os_policy_assignment_reports.php new file mode 100644 index 000000000000..e8cf9d742d37 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigZonalServiceClient/list_os_policy_assignment_reports.php @@ -0,0 +1,102 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $osConfigZonalServiceClient->listOSPolicyAssignmentReports($request); + + /** @var OSPolicyAssignmentReport $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = OsConfigZonalServiceClient::instanceOSPolicyAssignmentName( + '[PROJECT]', + '[LOCATION]', + '[INSTANCE]', + '[ASSIGNMENT]' + ); + + list_os_policy_assignment_reports_sample($formattedParent); +} +// [END osconfig_v1_generated_OsConfigZonalService_ListOSPolicyAssignmentReports_sync] diff --git a/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigZonalServiceClient/list_os_policy_assignment_revisions.php b/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigZonalServiceClient/list_os_policy_assignment_revisions.php new file mode 100644 index 000000000000..3ca9daab02a4 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigZonalServiceClient/list_os_policy_assignment_revisions.php @@ -0,0 +1,80 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $osConfigZonalServiceClient->listOSPolicyAssignmentRevisions($request); + + /** @var OSPolicyAssignment $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = OsConfigZonalServiceClient::oSPolicyAssignmentName( + '[PROJECT]', + '[LOCATION]', + '[OS_POLICY_ASSIGNMENT]' + ); + + list_os_policy_assignment_revisions_sample($formattedName); +} +// [END osconfig_v1_generated_OsConfigZonalService_ListOSPolicyAssignmentRevisions_sync] diff --git a/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigZonalServiceClient/list_os_policy_assignments.php b/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigZonalServiceClient/list_os_policy_assignments.php new file mode 100644 index 000000000000..1f42899d05c0 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigZonalServiceClient/list_os_policy_assignments.php @@ -0,0 +1,78 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $osConfigZonalServiceClient->listOSPolicyAssignments($request); + + /** @var OSPolicyAssignment $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = OsConfigZonalServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + list_os_policy_assignments_sample($formattedParent); +} +// [END osconfig_v1_generated_OsConfigZonalService_ListOSPolicyAssignments_sync] diff --git a/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigZonalServiceClient/list_vulnerability_reports.php b/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigZonalServiceClient/list_vulnerability_reports.php new file mode 100644 index 000000000000..57a319a2820d --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigZonalServiceClient/list_vulnerability_reports.php @@ -0,0 +1,80 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $osConfigZonalServiceClient->listVulnerabilityReports($request); + + /** @var VulnerabilityReport $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = OsConfigZonalServiceClient::instanceName('[PROJECT]', '[ZONE]', '[INSTANCE]'); + + list_vulnerability_reports_sample($formattedParent); +} +// [END osconfig_v1_generated_OsConfigZonalService_ListVulnerabilityReports_sync] diff --git a/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigZonalServiceClient/update_os_policy_assignment.php b/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigZonalServiceClient/update_os_policy_assignment.php new file mode 100644 index 000000000000..489a3eda0d73 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigZonalServiceClient/update_os_policy_assignment.php @@ -0,0 +1,142 @@ +setId($osPolicyAssignmentOsPoliciesResourceGroupsResourcesId); + $osPolicyAssignmentOsPoliciesResourceGroupsResources = [$resource,]; + $resourceGroup = (new ResourceGroup()) + ->setResources($osPolicyAssignmentOsPoliciesResourceGroupsResources); + $osPolicyAssignmentOsPoliciesResourceGroups = [$resourceGroup,]; + $oSPolicy = (new OSPolicy()) + ->setId($osPolicyAssignmentOsPoliciesId) + ->setMode($osPolicyAssignmentOsPoliciesMode) + ->setResourceGroups($osPolicyAssignmentOsPoliciesResourceGroups); + $osPolicyAssignmentOsPolicies = [$oSPolicy,]; + $osPolicyAssignmentInstanceFilter = new InstanceFilter(); + $osPolicyAssignmentRolloutDisruptionBudget = new FixedOrPercent(); + $osPolicyAssignmentRolloutMinWaitDuration = new Duration(); + $osPolicyAssignmentRollout = (new Rollout()) + ->setDisruptionBudget($osPolicyAssignmentRolloutDisruptionBudget) + ->setMinWaitDuration($osPolicyAssignmentRolloutMinWaitDuration); + $osPolicyAssignment = (new OSPolicyAssignment()) + ->setOsPolicies($osPolicyAssignmentOsPolicies) + ->setInstanceFilter($osPolicyAssignmentInstanceFilter) + ->setRollout($osPolicyAssignmentRollout); + $request = (new UpdateOSPolicyAssignmentRequest()) + ->setOsPolicyAssignment($osPolicyAssignment); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $osConfigZonalServiceClient->updateOSPolicyAssignment($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var OSPolicyAssignment $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $osPolicyAssignmentOsPoliciesId = '[ID]'; + $osPolicyAssignmentOsPoliciesMode = Mode::MODE_UNSPECIFIED; + $osPolicyAssignmentOsPoliciesResourceGroupsResourcesId = '[ID]'; + + update_os_policy_assignment_sample( + $osPolicyAssignmentOsPoliciesId, + $osPolicyAssignmentOsPoliciesMode, + $osPolicyAssignmentOsPoliciesResourceGroupsResourcesId + ); +} +// [END osconfig_v1_generated_OsConfigZonalService_UpdateOSPolicyAssignment_sync] diff --git a/owl-bot-staging/OsConfig/v1/src/V1/Client/OsConfigServiceClient.php b/owl-bot-staging/OsConfig/v1/src/V1/Client/OsConfigServiceClient.php new file mode 100644 index 000000000000..25a3a5f7ecf3 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/src/V1/Client/OsConfigServiceClient.php @@ -0,0 +1,595 @@ + cancelPatchJobAsync(CancelPatchJobRequest $request, array $optionalArgs = []) + * @method PromiseInterface createPatchDeploymentAsync(CreatePatchDeploymentRequest $request, array $optionalArgs = []) + * @method PromiseInterface deletePatchDeploymentAsync(DeletePatchDeploymentRequest $request, array $optionalArgs = []) + * @method PromiseInterface executePatchJobAsync(ExecutePatchJobRequest $request, array $optionalArgs = []) + * @method PromiseInterface getPatchDeploymentAsync(GetPatchDeploymentRequest $request, array $optionalArgs = []) + * @method PromiseInterface getPatchJobAsync(GetPatchJobRequest $request, array $optionalArgs = []) + * @method PromiseInterface listPatchDeploymentsAsync(ListPatchDeploymentsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listPatchJobInstanceDetailsAsync(ListPatchJobInstanceDetailsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listPatchJobsAsync(ListPatchJobsRequest $request, array $optionalArgs = []) + * @method PromiseInterface pausePatchDeploymentAsync(PausePatchDeploymentRequest $request, array $optionalArgs = []) + * @method PromiseInterface resumePatchDeploymentAsync(ResumePatchDeploymentRequest $request, array $optionalArgs = []) + * @method PromiseInterface updatePatchDeploymentAsync(UpdatePatchDeploymentRequest $request, array $optionalArgs = []) + */ +final class OsConfigServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.osconfig.v1.OsConfigService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'osconfig.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'osconfig.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/os_config_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/os_config_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/os_config_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/os_config_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a + * patch_deployment resource. + * + * @param string $project + * @param string $patchDeployment + * + * @return string The formatted patch_deployment resource. + */ + public static function patchDeploymentName(string $project, string $patchDeployment): string + { + return self::getPathTemplate('patchDeployment')->render([ + 'project' => $project, + 'patch_deployment' => $patchDeployment, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a patch_job + * resource. + * + * @param string $project + * @param string $patchJob + * + * @return string The formatted patch_job resource. + */ + public static function patchJobName(string $project, string $patchJob): string + { + return self::getPathTemplate('patchJob')->render([ + 'project' => $project, + 'patch_job' => $patchJob, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a project + * resource. + * + * @param string $project + * + * @return string The formatted project resource. + */ + public static function projectName(string $project): string + { + return self::getPathTemplate('project')->render([ + 'project' => $project, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - patchDeployment: projects/{project}/patchDeployments/{patch_deployment} + * - patchJob: projects/{project}/patchJobs/{patch_job} + * - project: projects/{project} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'osconfig.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Cancel a patch job. The patch job must be active. Canceled patch jobs + * cannot be restarted. + * + * The async variant is {@see OsConfigServiceClient::cancelPatchJobAsync()} . + * + * @example samples/V1/OsConfigServiceClient/cancel_patch_job.php + * + * @param CancelPatchJobRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PatchJob + * + * @throws ApiException Thrown if the API call fails. + */ + public function cancelPatchJob(CancelPatchJobRequest $request, array $callOptions = []): PatchJob + { + return $this->startApiCall('CancelPatchJob', $request, $callOptions)->wait(); + } + + /** + * Create an OS Config patch deployment. + * + * The async variant is {@see OsConfigServiceClient::createPatchDeploymentAsync()} + * . + * + * @example samples/V1/OsConfigServiceClient/create_patch_deployment.php + * + * @param CreatePatchDeploymentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PatchDeployment + * + * @throws ApiException Thrown if the API call fails. + */ + public function createPatchDeployment(CreatePatchDeploymentRequest $request, array $callOptions = []): PatchDeployment + { + return $this->startApiCall('CreatePatchDeployment', $request, $callOptions)->wait(); + } + + /** + * Delete an OS Config patch deployment. + * + * The async variant is {@see OsConfigServiceClient::deletePatchDeploymentAsync()} + * . + * + * @example samples/V1/OsConfigServiceClient/delete_patch_deployment.php + * + * @param DeletePatchDeploymentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException Thrown if the API call fails. + */ + public function deletePatchDeployment(DeletePatchDeploymentRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeletePatchDeployment', $request, $callOptions)->wait(); + } + + /** + * Patch VM instances by creating and running a patch job. + * + * The async variant is {@see OsConfigServiceClient::executePatchJobAsync()} . + * + * @example samples/V1/OsConfigServiceClient/execute_patch_job.php + * + * @param ExecutePatchJobRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PatchJob + * + * @throws ApiException Thrown if the API call fails. + */ + public function executePatchJob(ExecutePatchJobRequest $request, array $callOptions = []): PatchJob + { + return $this->startApiCall('ExecutePatchJob', $request, $callOptions)->wait(); + } + + /** + * Get an OS Config patch deployment. + * + * The async variant is {@see OsConfigServiceClient::getPatchDeploymentAsync()} . + * + * @example samples/V1/OsConfigServiceClient/get_patch_deployment.php + * + * @param GetPatchDeploymentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PatchDeployment + * + * @throws ApiException Thrown if the API call fails. + */ + public function getPatchDeployment(GetPatchDeploymentRequest $request, array $callOptions = []): PatchDeployment + { + return $this->startApiCall('GetPatchDeployment', $request, $callOptions)->wait(); + } + + /** + * Get the patch job. This can be used to track the progress of an + * ongoing patch job or review the details of completed jobs. + * + * The async variant is {@see OsConfigServiceClient::getPatchJobAsync()} . + * + * @example samples/V1/OsConfigServiceClient/get_patch_job.php + * + * @param GetPatchJobRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PatchJob + * + * @throws ApiException Thrown if the API call fails. + */ + public function getPatchJob(GetPatchJobRequest $request, array $callOptions = []): PatchJob + { + return $this->startApiCall('GetPatchJob', $request, $callOptions)->wait(); + } + + /** + * Get a page of OS Config patch deployments. + * + * The async variant is {@see OsConfigServiceClient::listPatchDeploymentsAsync()} . + * + * @example samples/V1/OsConfigServiceClient/list_patch_deployments.php + * + * @param ListPatchDeploymentsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listPatchDeployments(ListPatchDeploymentsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListPatchDeployments', $request, $callOptions); + } + + /** + * Get a list of instance details for a given patch job. + * + * The async variant is + * {@see OsConfigServiceClient::listPatchJobInstanceDetailsAsync()} . + * + * @example samples/V1/OsConfigServiceClient/list_patch_job_instance_details.php + * + * @param ListPatchJobInstanceDetailsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listPatchJobInstanceDetails(ListPatchJobInstanceDetailsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListPatchJobInstanceDetails', $request, $callOptions); + } + + /** + * Get a list of patch jobs. + * + * The async variant is {@see OsConfigServiceClient::listPatchJobsAsync()} . + * + * @example samples/V1/OsConfigServiceClient/list_patch_jobs.php + * + * @param ListPatchJobsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listPatchJobs(ListPatchJobsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListPatchJobs', $request, $callOptions); + } + + /** + * Change state of patch deployment to "PAUSED". + * Patch deployment in paused state doesn't generate patch jobs. + * + * The async variant is {@see OsConfigServiceClient::pausePatchDeploymentAsync()} . + * + * @example samples/V1/OsConfigServiceClient/pause_patch_deployment.php + * + * @param PausePatchDeploymentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PatchDeployment + * + * @throws ApiException Thrown if the API call fails. + */ + public function pausePatchDeployment(PausePatchDeploymentRequest $request, array $callOptions = []): PatchDeployment + { + return $this->startApiCall('PausePatchDeployment', $request, $callOptions)->wait(); + } + + /** + * Change state of patch deployment back to "ACTIVE". + * Patch deployment in active state continues to generate patch jobs. + * + * The async variant is {@see OsConfigServiceClient::resumePatchDeploymentAsync()} + * . + * + * @example samples/V1/OsConfigServiceClient/resume_patch_deployment.php + * + * @param ResumePatchDeploymentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PatchDeployment + * + * @throws ApiException Thrown if the API call fails. + */ + public function resumePatchDeployment(ResumePatchDeploymentRequest $request, array $callOptions = []): PatchDeployment + { + return $this->startApiCall('ResumePatchDeployment', $request, $callOptions)->wait(); + } + + /** + * Update an OS Config patch deployment. + * + * The async variant is {@see OsConfigServiceClient::updatePatchDeploymentAsync()} + * . + * + * @example samples/V1/OsConfigServiceClient/update_patch_deployment.php + * + * @param UpdatePatchDeploymentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PatchDeployment + * + * @throws ApiException Thrown if the API call fails. + */ + public function updatePatchDeployment(UpdatePatchDeploymentRequest $request, array $callOptions = []): PatchDeployment + { + return $this->startApiCall('UpdatePatchDeployment', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/OsConfig/v1/src/V1/Client/OsConfigZonalServiceClient.php b/owl-bot-staging/OsConfig/v1/src/V1/Client/OsConfigZonalServiceClient.php new file mode 100644 index 000000000000..c96ac054c68d --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/src/V1/Client/OsConfigZonalServiceClient.php @@ -0,0 +1,821 @@ + createOSPolicyAssignmentAsync(CreateOSPolicyAssignmentRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteOSPolicyAssignmentAsync(DeleteOSPolicyAssignmentRequest $request, array $optionalArgs = []) + * @method PromiseInterface getInventoryAsync(GetInventoryRequest $request, array $optionalArgs = []) + * @method PromiseInterface getOSPolicyAssignmentAsync(GetOSPolicyAssignmentRequest $request, array $optionalArgs = []) + * @method PromiseInterface getOSPolicyAssignmentReportAsync(GetOSPolicyAssignmentReportRequest $request, array $optionalArgs = []) + * @method PromiseInterface getVulnerabilityReportAsync(GetVulnerabilityReportRequest $request, array $optionalArgs = []) + * @method PromiseInterface listInventoriesAsync(ListInventoriesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listOSPolicyAssignmentReportsAsync(ListOSPolicyAssignmentReportsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listOSPolicyAssignmentRevisionsAsync(ListOSPolicyAssignmentRevisionsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listOSPolicyAssignmentsAsync(ListOSPolicyAssignmentsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listVulnerabilityReportsAsync(ListVulnerabilityReportsRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateOSPolicyAssignmentAsync(UpdateOSPolicyAssignmentRequest $request, array $optionalArgs = []) + */ +final class OsConfigZonalServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.osconfig.v1.OsConfigZonalService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'osconfig.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'osconfig.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/os_config_zonal_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/os_config_zonal_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/os_config_zonal_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/os_config_zonal_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Create the default operation client for the service. + * + * @param array $options ClientOptions for the client. + * + * @return OperationsClient + */ + private function createOperationsClient(array $options) + { + // Unset client-specific configuration options + unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); + + if (isset($options['operationsClient'])) { + return $options['operationsClient']; + } + + return new OperationsClient($options); + } + + /** + * Formats a string containing the fully-qualified path to represent a instance + * resource. + * + * @param string $project + * @param string $zone + * @param string $instance + * + * @return string The formatted instance resource. + */ + public static function instanceName(string $project, string $zone, string $instance): string + { + return self::getPathTemplate('instance')->render([ + 'project' => $project, + 'zone' => $zone, + 'instance' => $instance, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * instance_os_policy_assignment resource. + * + * @param string $project + * @param string $location + * @param string $instance + * @param string $assignment + * + * @return string The formatted instance_os_policy_assignment resource. + */ + public static function instanceOSPolicyAssignmentName(string $project, string $location, string $instance, string $assignment): string + { + return self::getPathTemplate('instanceOSPolicyAssignment')->render([ + 'project' => $project, + 'location' => $location, + 'instance' => $instance, + 'assignment' => $assignment, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a inventory + * resource. + * + * @param string $project + * @param string $location + * @param string $instance + * + * @return string The formatted inventory resource. + */ + public static function inventoryName(string $project, string $location, string $instance): string + { + return self::getPathTemplate('inventory')->render([ + 'project' => $project, + 'location' => $location, + 'instance' => $instance, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a location + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted location resource. + */ + public static function locationName(string $project, string $location): string + { + return self::getPathTemplate('location')->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * os_policy_assignment resource. + * + * @param string $project + * @param string $location + * @param string $osPolicyAssignment + * + * @return string The formatted os_policy_assignment resource. + */ + public static function oSPolicyAssignmentName(string $project, string $location, string $osPolicyAssignment): string + { + return self::getPathTemplate('oSPolicyAssignment')->render([ + 'project' => $project, + 'location' => $location, + 'os_policy_assignment' => $osPolicyAssignment, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * os_policy_assignment_report resource. + * + * @param string $project + * @param string $location + * @param string $instance + * @param string $assignment + * + * @return string The formatted os_policy_assignment_report resource. + */ + public static function oSPolicyAssignmentReportName(string $project, string $location, string $instance, string $assignment): string + { + return self::getPathTemplate('oSPolicyAssignmentReport')->render([ + 'project' => $project, + 'location' => $location, + 'instance' => $instance, + 'assignment' => $assignment, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_instance resource. + * + * @param string $project + * @param string $location + * @param string $instance + * + * @return string The formatted project_location_instance resource. + */ + public static function projectLocationInstanceName(string $project, string $location, string $instance): string + { + return self::getPathTemplate('projectLocationInstance')->render([ + 'project' => $project, + 'location' => $location, + 'instance' => $instance, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_zone_instance resource. + * + * @param string $project + * @param string $zone + * @param string $instance + * + * @return string The formatted project_zone_instance resource. + */ + public static function projectZoneInstanceName(string $project, string $zone, string $instance): string + { + return self::getPathTemplate('projectZoneInstance')->render([ + 'project' => $project, + 'zone' => $zone, + 'instance' => $instance, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * vulnerability_report resource. + * + * @param string $project + * @param string $location + * @param string $instance + * + * @return string The formatted vulnerability_report resource. + */ + public static function vulnerabilityReportName(string $project, string $location, string $instance): string + { + return self::getPathTemplate('vulnerabilityReport')->render([ + 'project' => $project, + 'location' => $location, + 'instance' => $instance, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - instance: projects/{project}/zones/{zone}/instances/{instance} + * - instanceOSPolicyAssignment: projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment} + * - inventory: projects/{project}/locations/{location}/instances/{instance}/inventory + * - location: projects/{project}/locations/{location} + * - oSPolicyAssignment: projects/{project}/locations/{location}/osPolicyAssignments/{os_policy_assignment} + * - oSPolicyAssignmentReport: projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}/report + * - projectLocationInstance: projects/{project}/locations/{location}/instances/{instance} + * - projectZoneInstance: projects/{project}/zones/{zone}/instances/{instance} + * - vulnerabilityReport: projects/{project}/locations/{location}/instances/{instance}/vulnerabilityReport + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'osconfig.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Create an OS policy assignment. + * + * This method also creates the first revision of the OS policy assignment. + * + * This method returns a long running operation (LRO) that contains the + * rollout details. The rollout can be cancelled by cancelling the LRO. + * + * For more information, see [Method: + * projects.locations.osPolicyAssignments.operations.cancel](https://cloud.google.com/compute/docs/osconfig/rest/v1/projects.locations.osPolicyAssignments.operations/cancel). + * + * The async variant is + * {@see OsConfigZonalServiceClient::createOSPolicyAssignmentAsync()} . + * + * @example samples/V1/OsConfigZonalServiceClient/create_os_policy_assignment.php + * + * @param CreateOSPolicyAssignmentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createOSPolicyAssignment(CreateOSPolicyAssignmentRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateOSPolicyAssignment', $request, $callOptions)->wait(); + } + + /** + * Delete the OS policy assignment. + * + * This method creates a new revision of the OS policy assignment. + * + * This method returns a long running operation (LRO) that contains the + * rollout details. The rollout can be cancelled by cancelling the LRO. + * + * If the LRO completes and is not cancelled, all revisions associated with + * the OS policy assignment are deleted. + * + * For more information, see [Method: + * projects.locations.osPolicyAssignments.operations.cancel](https://cloud.google.com/compute/docs/osconfig/rest/v1/projects.locations.osPolicyAssignments.operations/cancel). + * + * The async variant is + * {@see OsConfigZonalServiceClient::deleteOSPolicyAssignmentAsync()} . + * + * @example samples/V1/OsConfigZonalServiceClient/delete_os_policy_assignment.php + * + * @param DeleteOSPolicyAssignmentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteOSPolicyAssignment(DeleteOSPolicyAssignmentRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteOSPolicyAssignment', $request, $callOptions)->wait(); + } + + /** + * Get inventory data for the specified VM instance. If the VM has no + * associated inventory, the message `NOT_FOUND` is returned. + * + * The async variant is {@see OsConfigZonalServiceClient::getInventoryAsync()} . + * + * @example samples/V1/OsConfigZonalServiceClient/get_inventory.php + * + * @param GetInventoryRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Inventory + * + * @throws ApiException Thrown if the API call fails. + */ + public function getInventory(GetInventoryRequest $request, array $callOptions = []): Inventory + { + return $this->startApiCall('GetInventory', $request, $callOptions)->wait(); + } + + /** + * Retrieve an existing OS policy assignment. + * + * This method always returns the latest revision. In order to retrieve a + * previous revision of the assignment, also provide the revision ID in the + * `name` parameter. + * + * The async variant is + * {@see OsConfigZonalServiceClient::getOSPolicyAssignmentAsync()} . + * + * @example samples/V1/OsConfigZonalServiceClient/get_os_policy_assignment.php + * + * @param GetOSPolicyAssignmentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OSPolicyAssignment + * + * @throws ApiException Thrown if the API call fails. + */ + public function getOSPolicyAssignment(GetOSPolicyAssignmentRequest $request, array $callOptions = []): OSPolicyAssignment + { + return $this->startApiCall('GetOSPolicyAssignment', $request, $callOptions)->wait(); + } + + /** + * Get the OS policy asssignment report for the specified Compute Engine VM + * instance. + * + * The async variant is + * {@see OsConfigZonalServiceClient::getOSPolicyAssignmentReportAsync()} . + * + * @example samples/V1/OsConfigZonalServiceClient/get_os_policy_assignment_report.php + * + * @param GetOSPolicyAssignmentReportRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OSPolicyAssignmentReport + * + * @throws ApiException Thrown if the API call fails. + */ + public function getOSPolicyAssignmentReport(GetOSPolicyAssignmentReportRequest $request, array $callOptions = []): OSPolicyAssignmentReport + { + return $this->startApiCall('GetOSPolicyAssignmentReport', $request, $callOptions)->wait(); + } + + /** + * Gets the vulnerability report for the specified VM instance. Only VMs with + * inventory data have vulnerability reports associated with them. + * + * The async variant is + * {@see OsConfigZonalServiceClient::getVulnerabilityReportAsync()} . + * + * @example samples/V1/OsConfigZonalServiceClient/get_vulnerability_report.php + * + * @param GetVulnerabilityReportRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return VulnerabilityReport + * + * @throws ApiException Thrown if the API call fails. + */ + public function getVulnerabilityReport(GetVulnerabilityReportRequest $request, array $callOptions = []): VulnerabilityReport + { + return $this->startApiCall('GetVulnerabilityReport', $request, $callOptions)->wait(); + } + + /** + * List inventory data for all VM instances in the specified zone. + * + * The async variant is {@see OsConfigZonalServiceClient::listInventoriesAsync()} . + * + * @example samples/V1/OsConfigZonalServiceClient/list_inventories.php + * + * @param ListInventoriesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listInventories(ListInventoriesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListInventories', $request, $callOptions); + } + + /** + * List OS policy asssignment reports for all Compute Engine VM instances in + * the specified zone. + * + * The async variant is + * {@see OsConfigZonalServiceClient::listOSPolicyAssignmentReportsAsync()} . + * + * @example samples/V1/OsConfigZonalServiceClient/list_os_policy_assignment_reports.php + * + * @param ListOSPolicyAssignmentReportsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listOSPolicyAssignmentReports(ListOSPolicyAssignmentReportsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListOSPolicyAssignmentReports', $request, $callOptions); + } + + /** + * List the OS policy assignment revisions for a given OS policy assignment. + * + * The async variant is + * {@see OsConfigZonalServiceClient::listOSPolicyAssignmentRevisionsAsync()} . + * + * @example samples/V1/OsConfigZonalServiceClient/list_os_policy_assignment_revisions.php + * + * @param ListOSPolicyAssignmentRevisionsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listOSPolicyAssignmentRevisions(ListOSPolicyAssignmentRevisionsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListOSPolicyAssignmentRevisions', $request, $callOptions); + } + + /** + * List the OS policy assignments under the parent resource. + * + * For each OS policy assignment, the latest revision is returned. + * + * The async variant is + * {@see OsConfigZonalServiceClient::listOSPolicyAssignmentsAsync()} . + * + * @example samples/V1/OsConfigZonalServiceClient/list_os_policy_assignments.php + * + * @param ListOSPolicyAssignmentsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listOSPolicyAssignments(ListOSPolicyAssignmentsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListOSPolicyAssignments', $request, $callOptions); + } + + /** + * List vulnerability reports for all VM instances in the specified zone. + * + * The async variant is + * {@see OsConfigZonalServiceClient::listVulnerabilityReportsAsync()} . + * + * @example samples/V1/OsConfigZonalServiceClient/list_vulnerability_reports.php + * + * @param ListVulnerabilityReportsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listVulnerabilityReports(ListVulnerabilityReportsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListVulnerabilityReports', $request, $callOptions); + } + + /** + * Update an existing OS policy assignment. + * + * This method creates a new revision of the OS policy assignment. + * + * This method returns a long running operation (LRO) that contains the + * rollout details. The rollout can be cancelled by cancelling the LRO. + * + * For more information, see [Method: + * projects.locations.osPolicyAssignments.operations.cancel](https://cloud.google.com/compute/docs/osconfig/rest/v1/projects.locations.osPolicyAssignments.operations/cancel). + * + * The async variant is + * {@see OsConfigZonalServiceClient::updateOSPolicyAssignmentAsync()} . + * + * @example samples/V1/OsConfigZonalServiceClient/update_os_policy_assignment.php + * + * @param UpdateOSPolicyAssignmentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateOSPolicyAssignment(UpdateOSPolicyAssignmentRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateOSPolicyAssignment', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/OsConfig/v1/src/V1/gapic_metadata.json b/owl-bot-staging/OsConfig/v1/src/V1/gapic_metadata.json new file mode 100644 index 000000000000..247dd1093fab --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/src/V1/gapic_metadata.json @@ -0,0 +1,147 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.cloud.osconfig.v1", + "libraryPackage": "Google\\Cloud\\OsConfig\\V1", + "services": { + "OsConfigService": { + "clients": { + "grpc": { + "libraryClient": "OsConfigServiceGapicClient", + "rpcs": { + "CancelPatchJob": { + "methods": [ + "cancelPatchJob" + ] + }, + "CreatePatchDeployment": { + "methods": [ + "createPatchDeployment" + ] + }, + "DeletePatchDeployment": { + "methods": [ + "deletePatchDeployment" + ] + }, + "ExecutePatchJob": { + "methods": [ + "executePatchJob" + ] + }, + "GetPatchDeployment": { + "methods": [ + "getPatchDeployment" + ] + }, + "GetPatchJob": { + "methods": [ + "getPatchJob" + ] + }, + "ListPatchDeployments": { + "methods": [ + "listPatchDeployments" + ] + }, + "ListPatchJobInstanceDetails": { + "methods": [ + "listPatchJobInstanceDetails" + ] + }, + "ListPatchJobs": { + "methods": [ + "listPatchJobs" + ] + }, + "PausePatchDeployment": { + "methods": [ + "pausePatchDeployment" + ] + }, + "ResumePatchDeployment": { + "methods": [ + "resumePatchDeployment" + ] + }, + "UpdatePatchDeployment": { + "methods": [ + "updatePatchDeployment" + ] + } + } + } + } + }, + "OsConfigZonalService": { + "clients": { + "grpc": { + "libraryClient": "OsConfigZonalServiceGapicClient", + "rpcs": { + "CreateOSPolicyAssignment": { + "methods": [ + "createOSPolicyAssignment" + ] + }, + "DeleteOSPolicyAssignment": { + "methods": [ + "deleteOSPolicyAssignment" + ] + }, + "GetInventory": { + "methods": [ + "getInventory" + ] + }, + "GetOSPolicyAssignment": { + "methods": [ + "getOSPolicyAssignment" + ] + }, + "GetOSPolicyAssignmentReport": { + "methods": [ + "getOSPolicyAssignmentReport" + ] + }, + "GetVulnerabilityReport": { + "methods": [ + "getVulnerabilityReport" + ] + }, + "ListInventories": { + "methods": [ + "listInventories" + ] + }, + "ListOSPolicyAssignmentReports": { + "methods": [ + "listOSPolicyAssignmentReports" + ] + }, + "ListOSPolicyAssignmentRevisions": { + "methods": [ + "listOSPolicyAssignmentRevisions" + ] + }, + "ListOSPolicyAssignments": { + "methods": [ + "listOSPolicyAssignments" + ] + }, + "ListVulnerabilityReports": { + "methods": [ + "listVulnerabilityReports" + ] + }, + "UpdateOSPolicyAssignment": { + "methods": [ + "updateOSPolicyAssignment" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/OsConfig/v1/src/V1/resources/os_config_service_client_config.json b/owl-bot-staging/OsConfig/v1/src/V1/resources/os_config_service_client_config.json new file mode 100644 index 000000000000..46ee0df83ec8 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/src/V1/resources/os_config_service_client_config.json @@ -0,0 +1,94 @@ +{ + "interfaces": { + "google.cloud.osconfig.v1.OsConfigService": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE" + ] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "CancelPatchJob": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "CreatePatchDeployment": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeletePatchDeployment": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ExecutePatchJob": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetPatchDeployment": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetPatchJob": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListPatchDeployments": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListPatchJobInstanceDetails": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListPatchJobs": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "PausePatchDeployment": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ResumePatchDeployment": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdatePatchDeployment": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/OsConfig/v1/src/V1/resources/os_config_service_descriptor_config.php b/owl-bot-staging/OsConfig/v1/src/V1/resources/os_config_service_descriptor_config.php new file mode 100644 index 000000000000..9ea9f6165176 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/src/V1/resources/os_config_service_descriptor_config.php @@ -0,0 +1,202 @@ + [ + 'google.cloud.osconfig.v1.OsConfigService' => [ + 'CancelPatchJob' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\OsConfig\V1\PatchJob', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'CreatePatchDeployment' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\OsConfig\V1\PatchDeployment', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeletePatchDeployment' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ExecutePatchJob' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\OsConfig\V1\PatchJob', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'GetPatchDeployment' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\OsConfig\V1\PatchDeployment', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetPatchJob' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\OsConfig\V1\PatchJob', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListPatchDeployments' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getPatchDeployments', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\OsConfig\V1\ListPatchDeploymentsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListPatchJobInstanceDetails' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getPatchJobInstanceDetails', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\OsConfig\V1\ListPatchJobInstanceDetailsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListPatchJobs' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getPatchJobs', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\OsConfig\V1\ListPatchJobsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'PausePatchDeployment' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\OsConfig\V1\PatchDeployment', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ResumePatchDeployment' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\OsConfig\V1\PatchDeployment', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UpdatePatchDeployment' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\OsConfig\V1\PatchDeployment', + 'headerParams' => [ + [ + 'keyName' => 'patch_deployment.name', + 'fieldAccessors' => [ + 'getPatchDeployment', + 'getName', + ], + ], + ], + ], + 'templateMap' => [ + 'patchDeployment' => 'projects/{project}/patchDeployments/{patch_deployment}', + 'patchJob' => 'projects/{project}/patchJobs/{patch_job}', + 'project' => 'projects/{project}', + ], + ], + ], +]; diff --git a/owl-bot-staging/OsConfig/v1/src/V1/resources/os_config_service_rest_client_config.php b/owl-bot-staging/OsConfig/v1/src/V1/resources/os_config_service_rest_client_config.php new file mode 100644 index 000000000000..eefb6ab786c2 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/src/V1/resources/os_config_service_rest_client_config.php @@ -0,0 +1,196 @@ + [ + 'google.cloud.osconfig.v1.OsConfigService' => [ + 'CancelPatchJob' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/patchJobs/*}:cancel', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'CreatePatchDeployment' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*}/patchDeployments', + 'body' => 'patch_deployment', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'patch_deployment_id', + ], + ], + 'DeletePatchDeployment' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/patchDeployments/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ExecutePatchJob' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*}/patchJobs:execute', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'GetPatchDeployment' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/patchDeployments/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetPatchJob' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/patchJobs/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListPatchDeployments' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*}/patchDeployments', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListPatchJobInstanceDetails' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/patchJobs/*}/instanceDetails', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListPatchJobs' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*}/patchJobs', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'PausePatchDeployment' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/patchDeployments/*}:pause', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ResumePatchDeployment' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/patchDeployments/*}:resume', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'UpdatePatchDeployment' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{patch_deployment.name=projects/*/patchDeployments/*}', + 'body' => 'patch_deployment', + 'placeholders' => [ + 'patch_deployment.name' => [ + 'getters' => [ + 'getPatchDeployment', + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/osPolicyAssignments/*/operations/*}:cancel', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/osPolicyAssignments/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/OsConfig/v1/src/V1/resources/os_config_zonal_service_client_config.json b/owl-bot-staging/OsConfig/v1/src/V1/resources/os_config_zonal_service_client_config.json new file mode 100644 index 000000000000..2c7785e13e2c --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/src/V1/resources/os_config_zonal_service_client_config.json @@ -0,0 +1,94 @@ +{ + "interfaces": { + "google.cloud.osconfig.v1.OsConfigZonalService": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE" + ] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "CreateOSPolicyAssignment": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeleteOSPolicyAssignment": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetInventory": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetOSPolicyAssignment": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetOSPolicyAssignmentReport": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetVulnerabilityReport": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListInventories": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListOSPolicyAssignmentReports": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListOSPolicyAssignmentRevisions": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListOSPolicyAssignments": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListVulnerabilityReports": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateOSPolicyAssignment": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/OsConfig/v1/src/V1/resources/os_config_zonal_service_descriptor_config.php b/owl-bot-staging/OsConfig/v1/src/V1/resources/os_config_zonal_service_descriptor_config.php new file mode 100644 index 000000000000..c02c4e8d16c9 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/src/V1/resources/os_config_zonal_service_descriptor_config.php @@ -0,0 +1,245 @@ + [ + 'google.cloud.osconfig.v1.OsConfigZonalService' => [ + 'CreateOSPolicyAssignment' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\OsConfig\V1\OSPolicyAssignment', + 'metadataReturnType' => '\Google\Cloud\OsConfig\V1\OSPolicyAssignmentOperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteOSPolicyAssignment' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\OsConfig\V1\OSPolicyAssignmentOperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UpdateOSPolicyAssignment' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\OsConfig\V1\OSPolicyAssignment', + 'metadataReturnType' => '\Google\Cloud\OsConfig\V1\OSPolicyAssignmentOperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'os_policy_assignment.name', + 'fieldAccessors' => [ + 'getOsPolicyAssignment', + 'getName', + ], + ], + ], + ], + 'GetInventory' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\OsConfig\V1\Inventory', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetOSPolicyAssignment' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\OsConfig\V1\OSPolicyAssignment', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetOSPolicyAssignmentReport' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\OsConfig\V1\OSPolicyAssignmentReport', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetVulnerabilityReport' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\OsConfig\V1\VulnerabilityReport', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListInventories' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getInventories', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\OsConfig\V1\ListInventoriesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListOSPolicyAssignmentReports' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getOsPolicyAssignmentReports', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\OsConfig\V1\ListOSPolicyAssignmentReportsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListOSPolicyAssignmentRevisions' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getOsPolicyAssignments', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\OsConfig\V1\ListOSPolicyAssignmentRevisionsResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListOSPolicyAssignments' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getOsPolicyAssignments', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\OsConfig\V1\ListOSPolicyAssignmentsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListVulnerabilityReports' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getVulnerabilityReports', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\OsConfig\V1\ListVulnerabilityReportsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'templateMap' => [ + 'instance' => 'projects/{project}/zones/{zone}/instances/{instance}', + 'instanceOSPolicyAssignment' => 'projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}', + 'inventory' => 'projects/{project}/locations/{location}/instances/{instance}/inventory', + 'location' => 'projects/{project}/locations/{location}', + 'oSPolicyAssignment' => 'projects/{project}/locations/{location}/osPolicyAssignments/{os_policy_assignment}', + 'oSPolicyAssignmentReport' => 'projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}/report', + 'projectLocationInstance' => 'projects/{project}/locations/{location}/instances/{instance}', + 'projectZoneInstance' => 'projects/{project}/zones/{zone}/instances/{instance}', + 'vulnerabilityReport' => 'projects/{project}/locations/{location}/instances/{instance}/vulnerabilityReport', + ], + ], + ], +]; diff --git a/owl-bot-staging/OsConfig/v1/src/V1/resources/os_config_zonal_service_rest_client_config.php b/owl-bot-staging/OsConfig/v1/src/V1/resources/os_config_zonal_service_rest_client_config.php new file mode 100644 index 000000000000..5ac6fb548708 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/src/V1/resources/os_config_zonal_service_rest_client_config.php @@ -0,0 +1,192 @@ + [ + 'google.cloud.osconfig.v1.OsConfigZonalService' => [ + 'CreateOSPolicyAssignment' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/osPolicyAssignments', + 'body' => 'os_policy_assignment', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'os_policy_assignment_id', + ], + ], + 'DeleteOSPolicyAssignment' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/osPolicyAssignments/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetInventory' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/inventory}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOSPolicyAssignment' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/osPolicyAssignments/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOSPolicyAssignmentReport' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/osPolicyAssignments/*/report}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetVulnerabilityReport' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/vulnerabilityReport}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListInventories' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/instances/*}/inventories', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListOSPolicyAssignmentReports' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/instances/*/osPolicyAssignments/*}/reports', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListOSPolicyAssignmentRevisions' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/osPolicyAssignments/*}:listRevisions', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOSPolicyAssignments' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/osPolicyAssignments', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListVulnerabilityReports' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/instances/*}/vulnerabilityReports', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateOSPolicyAssignment' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{os_policy_assignment.name=projects/*/locations/*/osPolicyAssignments/*}', + 'body' => 'os_policy_assignment', + 'placeholders' => [ + 'os_policy_assignment.name' => [ + 'getters' => [ + 'getOsPolicyAssignment', + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/osPolicyAssignments/*/operations/*}:cancel', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/osPolicyAssignments/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/OsConfig/v1/tests/Unit/V1/Client/OsConfigServiceClientTest.php b/owl-bot-staging/OsConfig/v1/tests/Unit/V1/Client/OsConfigServiceClientTest.php new file mode 100644 index 000000000000..bc99c9315760 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/tests/Unit/V1/Client/OsConfigServiceClientTest.php @@ -0,0 +1,1000 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return OsConfigServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new OsConfigServiceClient($options); + } + + /** @test */ + public function cancelPatchJobTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $dryRun = false; + $errorMessage = 'errorMessage-1938755376'; + $percentComplete = -1.96096922E8; + $patchDeployment = 'patchDeployment633565980'; + $expectedResponse = new PatchJob(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setDryRun($dryRun); + $expectedResponse->setErrorMessage($errorMessage); + $expectedResponse->setPercentComplete($percentComplete); + $expectedResponse->setPatchDeployment($patchDeployment); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->patchJobName('[PROJECT]', '[PATCH_JOB]'); + $request = (new CancelPatchJobRequest()) + ->setName($formattedName); + $response = $gapicClient->cancelPatchJob($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.osconfig.v1.OsConfigService/CancelPatchJob', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function cancelPatchJobExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->patchJobName('[PROJECT]', '[PATCH_JOB]'); + $request = (new CancelPatchJobRequest()) + ->setName($formattedName); + try { + $gapicClient->cancelPatchJob($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createPatchDeploymentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $description = 'description-1724546052'; + $expectedResponse = new PatchDeployment(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $patchDeploymentId = 'patchDeploymentId-1817061090'; + $patchDeployment = new PatchDeployment(); + $patchDeploymentInstanceFilter = new PatchInstanceFilter(); + $patchDeployment->setInstanceFilter($patchDeploymentInstanceFilter); + $patchDeploymentOneTimeSchedule = new OneTimeSchedule(); + $oneTimeScheduleExecuteTime = new Timestamp(); + $patchDeploymentOneTimeSchedule->setExecuteTime($oneTimeScheduleExecuteTime); + $patchDeployment->setOneTimeSchedule($patchDeploymentOneTimeSchedule); + $request = (new CreatePatchDeploymentRequest()) + ->setParent($formattedParent) + ->setPatchDeploymentId($patchDeploymentId) + ->setPatchDeployment($patchDeployment); + $response = $gapicClient->createPatchDeployment($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.osconfig.v1.OsConfigService/CreatePatchDeployment', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getPatchDeploymentId(); + $this->assertProtobufEquals($patchDeploymentId, $actualValue); + $actualValue = $actualRequestObject->getPatchDeployment(); + $this->assertProtobufEquals($patchDeployment, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createPatchDeploymentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $patchDeploymentId = 'patchDeploymentId-1817061090'; + $patchDeployment = new PatchDeployment(); + $patchDeploymentInstanceFilter = new PatchInstanceFilter(); + $patchDeployment->setInstanceFilter($patchDeploymentInstanceFilter); + $patchDeploymentOneTimeSchedule = new OneTimeSchedule(); + $oneTimeScheduleExecuteTime = new Timestamp(); + $patchDeploymentOneTimeSchedule->setExecuteTime($oneTimeScheduleExecuteTime); + $patchDeployment->setOneTimeSchedule($patchDeploymentOneTimeSchedule); + $request = (new CreatePatchDeploymentRequest()) + ->setParent($formattedParent) + ->setPatchDeploymentId($patchDeploymentId) + ->setPatchDeployment($patchDeployment); + try { + $gapicClient->createPatchDeployment($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deletePatchDeploymentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->patchDeploymentName('[PROJECT]', '[PATCH_DEPLOYMENT]'); + $request = (new DeletePatchDeploymentRequest()) + ->setName($formattedName); + $gapicClient->deletePatchDeployment($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.osconfig.v1.OsConfigService/DeletePatchDeployment', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deletePatchDeploymentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->patchDeploymentName('[PROJECT]', '[PATCH_DEPLOYMENT]'); + $request = (new DeletePatchDeploymentRequest()) + ->setName($formattedName); + try { + $gapicClient->deletePatchDeployment($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function executePatchJobTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName2 = 'displayName21615000987'; + $description2 = 'description2568623279'; + $dryRun2 = true; + $errorMessage = 'errorMessage-1938755376'; + $percentComplete = -1.96096922E8; + $patchDeployment = 'patchDeployment633565980'; + $expectedResponse = new PatchJob(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName2); + $expectedResponse->setDescription($description2); + $expectedResponse->setDryRun($dryRun2); + $expectedResponse->setErrorMessage($errorMessage); + $expectedResponse->setPercentComplete($percentComplete); + $expectedResponse->setPatchDeployment($patchDeployment); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $instanceFilter = new PatchInstanceFilter(); + $request = (new ExecutePatchJobRequest()) + ->setParent($formattedParent) + ->setInstanceFilter($instanceFilter); + $response = $gapicClient->executePatchJob($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.osconfig.v1.OsConfigService/ExecutePatchJob', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getInstanceFilter(); + $this->assertProtobufEquals($instanceFilter, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function executePatchJobExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $instanceFilter = new PatchInstanceFilter(); + $request = (new ExecutePatchJobRequest()) + ->setParent($formattedParent) + ->setInstanceFilter($instanceFilter); + try { + $gapicClient->executePatchJob($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getPatchDeploymentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $expectedResponse = new PatchDeployment(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->patchDeploymentName('[PROJECT]', '[PATCH_DEPLOYMENT]'); + $request = (new GetPatchDeploymentRequest()) + ->setName($formattedName); + $response = $gapicClient->getPatchDeployment($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.osconfig.v1.OsConfigService/GetPatchDeployment', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getPatchDeploymentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->patchDeploymentName('[PROJECT]', '[PATCH_DEPLOYMENT]'); + $request = (new GetPatchDeploymentRequest()) + ->setName($formattedName); + try { + $gapicClient->getPatchDeployment($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getPatchJobTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $dryRun = false; + $errorMessage = 'errorMessage-1938755376'; + $percentComplete = -1.96096922E8; + $patchDeployment = 'patchDeployment633565980'; + $expectedResponse = new PatchJob(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setDryRun($dryRun); + $expectedResponse->setErrorMessage($errorMessage); + $expectedResponse->setPercentComplete($percentComplete); + $expectedResponse->setPatchDeployment($patchDeployment); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->patchJobName('[PROJECT]', '[PATCH_JOB]'); + $request = (new GetPatchJobRequest()) + ->setName($formattedName); + $response = $gapicClient->getPatchJob($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.osconfig.v1.OsConfigService/GetPatchJob', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getPatchJobExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->patchJobName('[PROJECT]', '[PATCH_JOB]'); + $request = (new GetPatchJobRequest()) + ->setName($formattedName); + try { + $gapicClient->getPatchJob($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listPatchDeploymentsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $patchDeploymentsElement = new PatchDeployment(); + $patchDeployments = [ + $patchDeploymentsElement, + ]; + $expectedResponse = new ListPatchDeploymentsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setPatchDeployments($patchDeployments); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $request = (new ListPatchDeploymentsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listPatchDeployments($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getPatchDeployments()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.osconfig.v1.OsConfigService/ListPatchDeployments', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listPatchDeploymentsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $request = (new ListPatchDeploymentsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listPatchDeployments($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listPatchJobInstanceDetailsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $patchJobInstanceDetailsElement = new PatchJobInstanceDetails(); + $patchJobInstanceDetails = [ + $patchJobInstanceDetailsElement, + ]; + $expectedResponse = new ListPatchJobInstanceDetailsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setPatchJobInstanceDetails($patchJobInstanceDetails); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->patchJobName('[PROJECT]', '[PATCH_JOB]'); + $request = (new ListPatchJobInstanceDetailsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listPatchJobInstanceDetails($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getPatchJobInstanceDetails()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.osconfig.v1.OsConfigService/ListPatchJobInstanceDetails', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listPatchJobInstanceDetailsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->patchJobName('[PROJECT]', '[PATCH_JOB]'); + $request = (new ListPatchJobInstanceDetailsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listPatchJobInstanceDetails($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listPatchJobsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $patchJobsElement = new PatchJob(); + $patchJobs = [ + $patchJobsElement, + ]; + $expectedResponse = new ListPatchJobsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setPatchJobs($patchJobs); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $request = (new ListPatchJobsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listPatchJobs($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getPatchJobs()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.osconfig.v1.OsConfigService/ListPatchJobs', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listPatchJobsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $request = (new ListPatchJobsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listPatchJobs($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function pausePatchDeploymentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $expectedResponse = new PatchDeployment(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->patchDeploymentName('[PROJECT]', '[PATCH_DEPLOYMENT]'); + $request = (new PausePatchDeploymentRequest()) + ->setName($formattedName); + $response = $gapicClient->pausePatchDeployment($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.osconfig.v1.OsConfigService/PausePatchDeployment', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function pausePatchDeploymentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->patchDeploymentName('[PROJECT]', '[PATCH_DEPLOYMENT]'); + $request = (new PausePatchDeploymentRequest()) + ->setName($formattedName); + try { + $gapicClient->pausePatchDeployment($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function resumePatchDeploymentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $expectedResponse = new PatchDeployment(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->patchDeploymentName('[PROJECT]', '[PATCH_DEPLOYMENT]'); + $request = (new ResumePatchDeploymentRequest()) + ->setName($formattedName); + $response = $gapicClient->resumePatchDeployment($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.osconfig.v1.OsConfigService/ResumePatchDeployment', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function resumePatchDeploymentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->patchDeploymentName('[PROJECT]', '[PATCH_DEPLOYMENT]'); + $request = (new ResumePatchDeploymentRequest()) + ->setName($formattedName); + try { + $gapicClient->resumePatchDeployment($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updatePatchDeploymentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $description = 'description-1724546052'; + $expectedResponse = new PatchDeployment(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $patchDeployment = new PatchDeployment(); + $patchDeploymentInstanceFilter = new PatchInstanceFilter(); + $patchDeployment->setInstanceFilter($patchDeploymentInstanceFilter); + $patchDeploymentOneTimeSchedule = new OneTimeSchedule(); + $oneTimeScheduleExecuteTime = new Timestamp(); + $patchDeploymentOneTimeSchedule->setExecuteTime($oneTimeScheduleExecuteTime); + $patchDeployment->setOneTimeSchedule($patchDeploymentOneTimeSchedule); + $request = (new UpdatePatchDeploymentRequest()) + ->setPatchDeployment($patchDeployment); + $response = $gapicClient->updatePatchDeployment($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.osconfig.v1.OsConfigService/UpdatePatchDeployment', $actualFuncCall); + $actualValue = $actualRequestObject->getPatchDeployment(); + $this->assertProtobufEquals($patchDeployment, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updatePatchDeploymentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $patchDeployment = new PatchDeployment(); + $patchDeploymentInstanceFilter = new PatchInstanceFilter(); + $patchDeployment->setInstanceFilter($patchDeploymentInstanceFilter); + $patchDeploymentOneTimeSchedule = new OneTimeSchedule(); + $oneTimeScheduleExecuteTime = new Timestamp(); + $patchDeploymentOneTimeSchedule->setExecuteTime($oneTimeScheduleExecuteTime); + $patchDeployment->setOneTimeSchedule($patchDeploymentOneTimeSchedule); + $request = (new UpdatePatchDeploymentRequest()) + ->setPatchDeployment($patchDeployment); + try { + $gapicClient->updatePatchDeployment($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function cancelPatchJobAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $dryRun = false; + $errorMessage = 'errorMessage-1938755376'; + $percentComplete = -1.96096922E8; + $patchDeployment = 'patchDeployment633565980'; + $expectedResponse = new PatchJob(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setDryRun($dryRun); + $expectedResponse->setErrorMessage($errorMessage); + $expectedResponse->setPercentComplete($percentComplete); + $expectedResponse->setPatchDeployment($patchDeployment); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->patchJobName('[PROJECT]', '[PATCH_JOB]'); + $request = (new CancelPatchJobRequest()) + ->setName($formattedName); + $response = $gapicClient->cancelPatchJobAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.osconfig.v1.OsConfigService/CancelPatchJob', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/OsConfig/v1/tests/Unit/V1/Client/OsConfigZonalServiceClientTest.php b/owl-bot-staging/OsConfig/v1/tests/Unit/V1/Client/OsConfigZonalServiceClientTest.php new file mode 100644 index 000000000000..4782dbbc2903 --- /dev/null +++ b/owl-bot-staging/OsConfig/v1/tests/Unit/V1/Client/OsConfigZonalServiceClientTest.php @@ -0,0 +1,1271 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return OsConfigZonalServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new OsConfigZonalServiceClient($options); + } + + /** @test */ + public function createOSPolicyAssignmentTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createOSPolicyAssignmentTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $revisionId = 'revisionId513861631'; + $etag = 'etag3123477'; + $baseline = false; + $deleted = false; + $reconciling = false; + $uid = 'uid115792'; + $expectedResponse = new OSPolicyAssignment(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setRevisionId($revisionId); + $expectedResponse->setEtag($etag); + $expectedResponse->setBaseline($baseline); + $expectedResponse->setDeleted($deleted); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setUid($uid); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createOSPolicyAssignmentTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $osPolicyAssignment = new OSPolicyAssignment(); + $osPolicyAssignmentOsPolicies = []; + $osPolicyAssignment->setOsPolicies($osPolicyAssignmentOsPolicies); + $osPolicyAssignmentInstanceFilter = new InstanceFilter(); + $osPolicyAssignment->setInstanceFilter($osPolicyAssignmentInstanceFilter); + $osPolicyAssignmentRollout = new Rollout(); + $rolloutDisruptionBudget = new FixedOrPercent(); + $osPolicyAssignmentRollout->setDisruptionBudget($rolloutDisruptionBudget); + $rolloutMinWaitDuration = new Duration(); + $osPolicyAssignmentRollout->setMinWaitDuration($rolloutMinWaitDuration); + $osPolicyAssignment->setRollout($osPolicyAssignmentRollout); + $osPolicyAssignmentId = 'osPolicyAssignmentId-1092208901'; + $request = (new CreateOSPolicyAssignmentRequest()) + ->setParent($formattedParent) + ->setOsPolicyAssignment($osPolicyAssignment) + ->setOsPolicyAssignmentId($osPolicyAssignmentId); + $response = $gapicClient->createOSPolicyAssignment($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.osconfig.v1.OsConfigZonalService/CreateOSPolicyAssignment', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getOsPolicyAssignment(); + $this->assertProtobufEquals($osPolicyAssignment, $actualValue); + $actualValue = $actualApiRequestObject->getOsPolicyAssignmentId(); + $this->assertProtobufEquals($osPolicyAssignmentId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createOSPolicyAssignmentTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createOSPolicyAssignmentExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createOSPolicyAssignmentTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $osPolicyAssignment = new OSPolicyAssignment(); + $osPolicyAssignmentOsPolicies = []; + $osPolicyAssignment->setOsPolicies($osPolicyAssignmentOsPolicies); + $osPolicyAssignmentInstanceFilter = new InstanceFilter(); + $osPolicyAssignment->setInstanceFilter($osPolicyAssignmentInstanceFilter); + $osPolicyAssignmentRollout = new Rollout(); + $rolloutDisruptionBudget = new FixedOrPercent(); + $osPolicyAssignmentRollout->setDisruptionBudget($rolloutDisruptionBudget); + $rolloutMinWaitDuration = new Duration(); + $osPolicyAssignmentRollout->setMinWaitDuration($rolloutMinWaitDuration); + $osPolicyAssignment->setRollout($osPolicyAssignmentRollout); + $osPolicyAssignmentId = 'osPolicyAssignmentId-1092208901'; + $request = (new CreateOSPolicyAssignmentRequest()) + ->setParent($formattedParent) + ->setOsPolicyAssignment($osPolicyAssignment) + ->setOsPolicyAssignmentId($osPolicyAssignmentId); + $response = $gapicClient->createOSPolicyAssignment($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createOSPolicyAssignmentTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteOSPolicyAssignmentTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteOSPolicyAssignmentTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteOSPolicyAssignmentTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->oSPolicyAssignmentName('[PROJECT]', '[LOCATION]', '[OS_POLICY_ASSIGNMENT]'); + $request = (new DeleteOSPolicyAssignmentRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteOSPolicyAssignment($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.osconfig.v1.OsConfigZonalService/DeleteOSPolicyAssignment', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteOSPolicyAssignmentTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteOSPolicyAssignmentExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteOSPolicyAssignmentTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->oSPolicyAssignmentName('[PROJECT]', '[LOCATION]', '[OS_POLICY_ASSIGNMENT]'); + $request = (new DeleteOSPolicyAssignmentRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteOSPolicyAssignment($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteOSPolicyAssignmentTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getInventoryTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new Inventory(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->inventoryName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new GetInventoryRequest()) + ->setName($formattedName); + $response = $gapicClient->getInventory($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.osconfig.v1.OsConfigZonalService/GetInventory', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getInventoryExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->inventoryName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new GetInventoryRequest()) + ->setName($formattedName); + try { + $gapicClient->getInventory($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getOSPolicyAssignmentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $revisionId = 'revisionId513861631'; + $etag = 'etag3123477'; + $baseline = false; + $deleted = false; + $reconciling = false; + $uid = 'uid115792'; + $expectedResponse = new OSPolicyAssignment(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setRevisionId($revisionId); + $expectedResponse->setEtag($etag); + $expectedResponse->setBaseline($baseline); + $expectedResponse->setDeleted($deleted); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setUid($uid); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->oSPolicyAssignmentName('[PROJECT]', '[LOCATION]', '[OS_POLICY_ASSIGNMENT]'); + $request = (new GetOSPolicyAssignmentRequest()) + ->setName($formattedName); + $response = $gapicClient->getOSPolicyAssignment($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.osconfig.v1.OsConfigZonalService/GetOSPolicyAssignment', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getOSPolicyAssignmentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->oSPolicyAssignmentName('[PROJECT]', '[LOCATION]', '[OS_POLICY_ASSIGNMENT]'); + $request = (new GetOSPolicyAssignmentRequest()) + ->setName($formattedName); + try { + $gapicClient->getOSPolicyAssignment($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getOSPolicyAssignmentReportTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $instance = 'instance555127957'; + $osPolicyAssignment = 'osPolicyAssignment-945935777'; + $lastRunId = 'lastRunId2008161560'; + $expectedResponse = new OSPolicyAssignmentReport(); + $expectedResponse->setName($name2); + $expectedResponse->setInstance($instance); + $expectedResponse->setOsPolicyAssignment($osPolicyAssignment); + $expectedResponse->setLastRunId($lastRunId); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->oSPolicyAssignmentReportName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[ASSIGNMENT]'); + $request = (new GetOSPolicyAssignmentReportRequest()) + ->setName($formattedName); + $response = $gapicClient->getOSPolicyAssignmentReport($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.osconfig.v1.OsConfigZonalService/GetOSPolicyAssignmentReport', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getOSPolicyAssignmentReportExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->oSPolicyAssignmentReportName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[ASSIGNMENT]'); + $request = (new GetOSPolicyAssignmentReportRequest()) + ->setName($formattedName); + try { + $gapicClient->getOSPolicyAssignmentReport($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getVulnerabilityReportTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new VulnerabilityReport(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->vulnerabilityReportName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new GetVulnerabilityReportRequest()) + ->setName($formattedName); + $response = $gapicClient->getVulnerabilityReport($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.osconfig.v1.OsConfigZonalService/GetVulnerabilityReport', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getVulnerabilityReportExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->vulnerabilityReportName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new GetVulnerabilityReportRequest()) + ->setName($formattedName); + try { + $gapicClient->getVulnerabilityReport($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listInventoriesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $inventoriesElement = new Inventory(); + $inventories = [ + $inventoriesElement, + ]; + $expectedResponse = new ListInventoriesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setInventories($inventories); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->instanceName('[PROJECT]', '[ZONE]', '[INSTANCE]'); + $request = (new ListInventoriesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listInventories($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getInventories()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.osconfig.v1.OsConfigZonalService/ListInventories', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listInventoriesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->instanceName('[PROJECT]', '[ZONE]', '[INSTANCE]'); + $request = (new ListInventoriesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listInventories($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listOSPolicyAssignmentReportsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $osPolicyAssignmentReportsElement = new OSPolicyAssignmentReport(); + $osPolicyAssignmentReports = [ + $osPolicyAssignmentReportsElement, + ]; + $expectedResponse = new ListOSPolicyAssignmentReportsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setOsPolicyAssignmentReports($osPolicyAssignmentReports); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->instanceOSPolicyAssignmentName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[ASSIGNMENT]'); + $request = (new ListOSPolicyAssignmentReportsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listOSPolicyAssignmentReports($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getOsPolicyAssignmentReports()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.osconfig.v1.OsConfigZonalService/ListOSPolicyAssignmentReports', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listOSPolicyAssignmentReportsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->instanceOSPolicyAssignmentName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[ASSIGNMENT]'); + $request = (new ListOSPolicyAssignmentReportsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listOSPolicyAssignmentReports($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listOSPolicyAssignmentRevisionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $osPolicyAssignmentsElement = new OSPolicyAssignment(); + $osPolicyAssignments = [ + $osPolicyAssignmentsElement, + ]; + $expectedResponse = new ListOSPolicyAssignmentRevisionsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setOsPolicyAssignments($osPolicyAssignments); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->oSPolicyAssignmentName('[PROJECT]', '[LOCATION]', '[OS_POLICY_ASSIGNMENT]'); + $request = (new ListOSPolicyAssignmentRevisionsRequest()) + ->setName($formattedName); + $response = $gapicClient->listOSPolicyAssignmentRevisions($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getOsPolicyAssignments()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.osconfig.v1.OsConfigZonalService/ListOSPolicyAssignmentRevisions', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listOSPolicyAssignmentRevisionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->oSPolicyAssignmentName('[PROJECT]', '[LOCATION]', '[OS_POLICY_ASSIGNMENT]'); + $request = (new ListOSPolicyAssignmentRevisionsRequest()) + ->setName($formattedName); + try { + $gapicClient->listOSPolicyAssignmentRevisions($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listOSPolicyAssignmentsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $osPolicyAssignmentsElement = new OSPolicyAssignment(); + $osPolicyAssignments = [ + $osPolicyAssignmentsElement, + ]; + $expectedResponse = new ListOSPolicyAssignmentsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setOsPolicyAssignments($osPolicyAssignments); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListOSPolicyAssignmentsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listOSPolicyAssignments($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getOsPolicyAssignments()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.osconfig.v1.OsConfigZonalService/ListOSPolicyAssignments', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listOSPolicyAssignmentsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListOSPolicyAssignmentsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listOSPolicyAssignments($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listVulnerabilityReportsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $vulnerabilityReportsElement = new VulnerabilityReport(); + $vulnerabilityReports = [ + $vulnerabilityReportsElement, + ]; + $expectedResponse = new ListVulnerabilityReportsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setVulnerabilityReports($vulnerabilityReports); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->instanceName('[PROJECT]', '[ZONE]', '[INSTANCE]'); + $request = (new ListVulnerabilityReportsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listVulnerabilityReports($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getVulnerabilityReports()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.osconfig.v1.OsConfigZonalService/ListVulnerabilityReports', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listVulnerabilityReportsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->instanceName('[PROJECT]', '[ZONE]', '[INSTANCE]'); + $request = (new ListVulnerabilityReportsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listVulnerabilityReports($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateOSPolicyAssignmentTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateOSPolicyAssignmentTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $revisionId = 'revisionId513861631'; + $etag = 'etag3123477'; + $baseline = false; + $deleted = false; + $reconciling = false; + $uid = 'uid115792'; + $expectedResponse = new OSPolicyAssignment(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setRevisionId($revisionId); + $expectedResponse->setEtag($etag); + $expectedResponse->setBaseline($baseline); + $expectedResponse->setDeleted($deleted); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setUid($uid); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateOSPolicyAssignmentTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $osPolicyAssignment = new OSPolicyAssignment(); + $osPolicyAssignmentOsPolicies = []; + $osPolicyAssignment->setOsPolicies($osPolicyAssignmentOsPolicies); + $osPolicyAssignmentInstanceFilter = new InstanceFilter(); + $osPolicyAssignment->setInstanceFilter($osPolicyAssignmentInstanceFilter); + $osPolicyAssignmentRollout = new Rollout(); + $rolloutDisruptionBudget = new FixedOrPercent(); + $osPolicyAssignmentRollout->setDisruptionBudget($rolloutDisruptionBudget); + $rolloutMinWaitDuration = new Duration(); + $osPolicyAssignmentRollout->setMinWaitDuration($rolloutMinWaitDuration); + $osPolicyAssignment->setRollout($osPolicyAssignmentRollout); + $request = (new UpdateOSPolicyAssignmentRequest()) + ->setOsPolicyAssignment($osPolicyAssignment); + $response = $gapicClient->updateOSPolicyAssignment($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.osconfig.v1.OsConfigZonalService/UpdateOSPolicyAssignment', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getOsPolicyAssignment(); + $this->assertProtobufEquals($osPolicyAssignment, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateOSPolicyAssignmentTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateOSPolicyAssignmentExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateOSPolicyAssignmentTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $osPolicyAssignment = new OSPolicyAssignment(); + $osPolicyAssignmentOsPolicies = []; + $osPolicyAssignment->setOsPolicies($osPolicyAssignmentOsPolicies); + $osPolicyAssignmentInstanceFilter = new InstanceFilter(); + $osPolicyAssignment->setInstanceFilter($osPolicyAssignmentInstanceFilter); + $osPolicyAssignmentRollout = new Rollout(); + $rolloutDisruptionBudget = new FixedOrPercent(); + $osPolicyAssignmentRollout->setDisruptionBudget($rolloutDisruptionBudget); + $rolloutMinWaitDuration = new Duration(); + $osPolicyAssignmentRollout->setMinWaitDuration($rolloutMinWaitDuration); + $osPolicyAssignment->setRollout($osPolicyAssignmentRollout); + $request = (new UpdateOSPolicyAssignmentRequest()) + ->setOsPolicyAssignment($osPolicyAssignment); + $response = $gapicClient->updateOSPolicyAssignment($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateOSPolicyAssignmentTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createOSPolicyAssignmentAsyncTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createOSPolicyAssignmentTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $revisionId = 'revisionId513861631'; + $etag = 'etag3123477'; + $baseline = false; + $deleted = false; + $reconciling = false; + $uid = 'uid115792'; + $expectedResponse = new OSPolicyAssignment(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setRevisionId($revisionId); + $expectedResponse->setEtag($etag); + $expectedResponse->setBaseline($baseline); + $expectedResponse->setDeleted($deleted); + $expectedResponse->setReconciling($reconciling); + $expectedResponse->setUid($uid); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createOSPolicyAssignmentTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $osPolicyAssignment = new OSPolicyAssignment(); + $osPolicyAssignmentOsPolicies = []; + $osPolicyAssignment->setOsPolicies($osPolicyAssignmentOsPolicies); + $osPolicyAssignmentInstanceFilter = new InstanceFilter(); + $osPolicyAssignment->setInstanceFilter($osPolicyAssignmentInstanceFilter); + $osPolicyAssignmentRollout = new Rollout(); + $rolloutDisruptionBudget = new FixedOrPercent(); + $osPolicyAssignmentRollout->setDisruptionBudget($rolloutDisruptionBudget); + $rolloutMinWaitDuration = new Duration(); + $osPolicyAssignmentRollout->setMinWaitDuration($rolloutMinWaitDuration); + $osPolicyAssignment->setRollout($osPolicyAssignmentRollout); + $osPolicyAssignmentId = 'osPolicyAssignmentId-1092208901'; + $request = (new CreateOSPolicyAssignmentRequest()) + ->setParent($formattedParent) + ->setOsPolicyAssignment($osPolicyAssignment) + ->setOsPolicyAssignmentId($osPolicyAssignmentId); + $response = $gapicClient->createOSPolicyAssignmentAsync($request)->wait(); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.osconfig.v1.OsConfigZonalService/CreateOSPolicyAssignment', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getOsPolicyAssignment(); + $this->assertProtobufEquals($osPolicyAssignment, $actualValue); + $actualValue = $actualApiRequestObject->getOsPolicyAssignmentId(); + $this->assertProtobufEquals($osPolicyAssignmentId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createOSPolicyAssignmentTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } +} diff --git a/owl-bot-staging/OsLogin/v1/proto/src/GPBMetadata/Google/Cloud/Oslogin/Common/Common.php b/owl-bot-staging/OsLogin/v1/proto/src/GPBMetadata/Google/Cloud/Oslogin/Common/Common.php new file mode 100644 index 0000000000000000000000000000000000000000..58e5d425988ea0d4b0b5b1d94b5cba370ed0c736 GIT binary patch literal 1639 zcma)6UvC>l5XW}Y#FNmbM*%|+-TqTupl1X;T?ojI9m}HiS+S#1bdq&GukD5N?P+%p z)l~jMd;~rMFMI(Wc+L|af!W=&>!?YEU-o7_znS0sW_G^)KAoj-pR{R0MX2bQj21-A zC`koZJmN7KWs?aNB;xaw#Z0&&D+_V?Jd` z4PkS>I$RSJAPMJGreQ=$yVrO|RX7e+7_<#OIM(>UxA@@L;12o_8lFqRadZ~9KMBvOngL<9UJqSeR5#?-zKQjT>Wkrkt! zmI7r6I*Fnp3FDwiWh7Xtxags)=S`_v3#f0ZkMp!T9Gj4;<>+~DkUSzvWOOq-A%dz* zB!`B#4zOH*1()bmPg!unXgqGvS@mX`FT6e;uj@R) zX{fH5X`YYZuWhLQ-!X6wtfy-R#?1%DwFC3J`gMWsLr)g5Oab~33uHK&y#-jtnPC}nJ1DWOr)#uSZf#`pkk%=nxR$4t-& z8@i}$8N|D=C1*5_E7w=%ltx@uwvBlU%5otUoewe4j=A~}Ahd+^U0L5XO8?YLjt}qi zR6j13Oous2EmB$m^ttiXm+o71aQzjsZ_*7A=iGv8rnKF44zF`wKY{xz4Q)V_PHH)8 z7sR@wm65eq`dHTRLH>+oqn&>(@BLALy}q3F%;WljF0@>~P%CZO`2=p$mnqZL@MNeM zDuQI}*E+2aI^FiL|Dr!=JsS>Q^jgESZok($?woX5&HZM~ Z`qBE0e_?mk#%jBAtr<_de3q~T_z!@54Br3% literal 0 HcmV?d00001 diff --git a/owl-bot-staging/OsLogin/v1/proto/src/GPBMetadata/Google/Cloud/Oslogin/V1/Oslogin.php b/owl-bot-staging/OsLogin/v1/proto/src/GPBMetadata/Google/Cloud/Oslogin/V1/Oslogin.php new file mode 100644 index 000000000000..8c82c08fb98d --- /dev/null +++ b/owl-bot-staging/OsLogin/v1/proto/src/GPBMetadata/Google/Cloud/Oslogin/V1/Oslogin.php @@ -0,0 +1,80 @@ +internalAddGeneratedFile( + ' +’ +%google/cloud/oslogin/v1/oslogin.protogoogle.cloud.oslogin.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto(google/cloud/oslogin/common/common.protogoogle/protobuf/empty.proto google/protobuf/field_mask.proto"˜ + LoginProfile +name ( BàAA +posix_accounts ( 2).google.cloud.oslogin.common.PosixAccountQ +ssh_public_keys ( 28.google.cloud.oslogin.v1.LoginProfile.SshPublicKeysEntry_ +SshPublicKeysEntry +key ( 8 +value ( 2).google.cloud.oslogin.common.SshPublicKey:8"  +CreateSshPublicKeyRequest; +parent ( B+àAúA%#oslogin.googleapis.com/SshPublicKeyF +ssh_public_key ( 2).google.cloud.oslogin.common.SshPublicKeyBàA"V +DeletePosixAccountRequest9 +name ( B+àAúA% +#oslogin.googleapis.com/PosixAccount"V +DeleteSshPublicKeyRequest9 +name ( B+àAúA% +#oslogin.googleapis.com/SshPublicKey"z +GetLoginProfileRequest9 +name ( B+àAúA%#oslogin.googleapis.com/PosixAccount + +project_id (  + system_id ( "S +GetSshPublicKeyRequest9 +name ( B+àAúA% +#oslogin.googleapis.com/SshPublicKey"Ê +ImportSshPublicKeyRequest; +parent ( B+àAúA%#oslogin.googleapis.com/SshPublicKeyF +ssh_public_key ( 2).google.cloud.oslogin.common.SshPublicKeyBàA + +project_id (  +regions ( BàA"k +ImportSshPublicKeyResponse< + login_profile ( 2%.google.cloud.oslogin.v1.LoginProfile +details ( "Ï +UpdateSshPublicKeyRequest9 +name ( B+àAúA% +#oslogin.googleapis.com/SshPublicKeyF +ssh_public_key ( 2).google.cloud.oslogin.common.SshPublicKeyBàA/ + update_mask ( 2.google.protobuf.FieldMask2† +OsLoginServiceÇ +CreateSshPublicKey2.google.cloud.oslogin.v1.CreateSshPublicKeyRequest).google.cloud.oslogin.common.SshPublicKey"RÚAparent,ssh_public_key‚Óä“4""/v1/{parent=users/*}/sshPublicKeys:ssh_public_keyŽ +DeletePosixAccount2.google.cloud.oslogin.v1.DeletePosixAccountRequest.google.protobuf.Empty",ÚAname‚Óä“*/v1/{name=users/*/projects/*}“ +DeleteSshPublicKey2.google.cloud.oslogin.v1.DeleteSshPublicKeyRequest.google.protobuf.Empty"1ÚAname‚Óä“$*"/v1/{name=users/*/sshPublicKeys/*}™ +GetLoginProfile/.google.cloud.oslogin.v1.GetLoginProfileRequest%.google.cloud.oslogin.v1.LoginProfile".ÚAname‚Óä“!/v1/{name=users/*}/loginProfile  +GetSshPublicKey/.google.cloud.oslogin.v1.GetSshPublicKeyRequest).google.cloud.oslogin.common.SshPublicKey"1ÚAname‚Óä“$"/v1/{name=users/*/sshPublicKeys/*}ù +ImportSshPublicKey2.google.cloud.oslogin.v1.ImportSshPublicKeyRequest3.google.cloud.oslogin.v1.ImportSshPublicKeyResponse"zÚAparent,ssh_public_keyÚA parent,ssh_public_key,project_id‚Óä“9"\'/v1/{parent=users/*}:importSshPublicKey:ssh_public_keyç +UpdateSshPublicKey2.google.cloud.oslogin.v1.UpdateSshPublicKeyRequest).google.cloud.oslogin.common.SshPublicKey"rÚAname,ssh_public_keyÚAname,ssh_public_key,update_mask‚Óä“42"/v1/{name=users/*/sshPublicKeys/*}:ssh_public_keyÝÊAoslogin.googleapis.comÒAÀhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/compute.readonlyBµ +com.google.cloud.oslogin.v1B OsLoginProtoPZ5cloud.google.com/go/oslogin/apiv1/osloginpb;osloginpbªGoogle.Cloud.OsLogin.V1ÊGoogle\\Cloud\\OsLogin\\V1êGoogle::Cloud::OsLogin::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/OsLogin/v1/proto/src/Google/Cloud/OsLogin/Common/OperatingSystemType.php b/owl-bot-staging/OsLogin/v1/proto/src/Google/Cloud/OsLogin/Common/OperatingSystemType.php new file mode 100644 index 000000000000..dea57253ea7e --- /dev/null +++ b/owl-bot-staging/OsLogin/v1/proto/src/Google/Cloud/OsLogin/Common/OperatingSystemType.php @@ -0,0 +1,62 @@ +google.cloud.oslogin.common.OperatingSystemType + */ +class OperatingSystemType +{ + /** + * The operating system type associated with the user account information is + * unspecified. + * + * Generated from protobuf enum OPERATING_SYSTEM_TYPE_UNSPECIFIED = 0; + */ + const OPERATING_SYSTEM_TYPE_UNSPECIFIED = 0; + /** + * Linux user account information. + * + * Generated from protobuf enum LINUX = 1; + */ + const LINUX = 1; + /** + * Windows user account information. + * + * Generated from protobuf enum WINDOWS = 2; + */ + const WINDOWS = 2; + + private static $valueToName = [ + self::OPERATING_SYSTEM_TYPE_UNSPECIFIED => 'OPERATING_SYSTEM_TYPE_UNSPECIFIED', + self::LINUX => 'LINUX', + self::WINDOWS => 'WINDOWS', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/OsLogin/v1/proto/src/Google/Cloud/OsLogin/Common/PosixAccount.php b/owl-bot-staging/OsLogin/v1/proto/src/Google/Cloud/OsLogin/Common/PosixAccount.php new file mode 100644 index 000000000000..99d5713285c0 --- /dev/null +++ b/owl-bot-staging/OsLogin/v1/proto/src/Google/Cloud/OsLogin/Common/PosixAccount.php @@ -0,0 +1,411 @@ +google.cloud.oslogin.common.PosixAccount + */ +class PosixAccount extends \Google\Protobuf\Internal\Message +{ + /** + * Only one POSIX account can be marked as primary. + * + * Generated from protobuf field bool primary = 1; + */ + protected $primary = false; + /** + * The username of the POSIX account. + * + * Generated from protobuf field string username = 2; + */ + protected $username = ''; + /** + * The user ID. + * + * Generated from protobuf field int64 uid = 3; + */ + protected $uid = 0; + /** + * The default group ID. + * + * Generated from protobuf field int64 gid = 4; + */ + protected $gid = 0; + /** + * The path to the home directory for this account. + * + * Generated from protobuf field string home_directory = 5; + */ + protected $home_directory = ''; + /** + * The path to the logic shell for this account. + * + * Generated from protobuf field string shell = 6; + */ + protected $shell = ''; + /** + * The GECOS (user information) entry for this account. + * + * Generated from protobuf field string gecos = 7; + */ + protected $gecos = ''; + /** + * System identifier for which account the username or uid applies to. + * By default, the empty value is used. + * + * Generated from protobuf field string system_id = 8; + */ + protected $system_id = ''; + /** + * Output only. A POSIX account identifier. + * + * Generated from protobuf field string account_id = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $account_id = ''; + /** + * The operating system type where this account applies. + * + * Generated from protobuf field .google.cloud.oslogin.common.OperatingSystemType operating_system_type = 10; + */ + protected $operating_system_type = 0; + /** + * Output only. The canonical resource name. + * + * Generated from protobuf field string name = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $primary + * Only one POSIX account can be marked as primary. + * @type string $username + * The username of the POSIX account. + * @type int|string $uid + * The user ID. + * @type int|string $gid + * The default group ID. + * @type string $home_directory + * The path to the home directory for this account. + * @type string $shell + * The path to the logic shell for this account. + * @type string $gecos + * The GECOS (user information) entry for this account. + * @type string $system_id + * System identifier for which account the username or uid applies to. + * By default, the empty value is used. + * @type string $account_id + * Output only. A POSIX account identifier. + * @type int $operating_system_type + * The operating system type where this account applies. + * @type string $name + * Output only. The canonical resource name. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Oslogin\Common\Common::initOnce(); + parent::__construct($data); + } + + /** + * Only one POSIX account can be marked as primary. + * + * Generated from protobuf field bool primary = 1; + * @return bool + */ + public function getPrimary() + { + return $this->primary; + } + + /** + * Only one POSIX account can be marked as primary. + * + * Generated from protobuf field bool primary = 1; + * @param bool $var + * @return $this + */ + public function setPrimary($var) + { + GPBUtil::checkBool($var); + $this->primary = $var; + + return $this; + } + + /** + * The username of the POSIX account. + * + * Generated from protobuf field string username = 2; + * @return string + */ + public function getUsername() + { + return $this->username; + } + + /** + * The username of the POSIX account. + * + * Generated from protobuf field string username = 2; + * @param string $var + * @return $this + */ + public function setUsername($var) + { + GPBUtil::checkString($var, True); + $this->username = $var; + + return $this; + } + + /** + * The user ID. + * + * Generated from protobuf field int64 uid = 3; + * @return int|string + */ + public function getUid() + { + return $this->uid; + } + + /** + * The user ID. + * + * Generated from protobuf field int64 uid = 3; + * @param int|string $var + * @return $this + */ + public function setUid($var) + { + GPBUtil::checkInt64($var); + $this->uid = $var; + + return $this; + } + + /** + * The default group ID. + * + * Generated from protobuf field int64 gid = 4; + * @return int|string + */ + public function getGid() + { + return $this->gid; + } + + /** + * The default group ID. + * + * Generated from protobuf field int64 gid = 4; + * @param int|string $var + * @return $this + */ + public function setGid($var) + { + GPBUtil::checkInt64($var); + $this->gid = $var; + + return $this; + } + + /** + * The path to the home directory for this account. + * + * Generated from protobuf field string home_directory = 5; + * @return string + */ + public function getHomeDirectory() + { + return $this->home_directory; + } + + /** + * The path to the home directory for this account. + * + * Generated from protobuf field string home_directory = 5; + * @param string $var + * @return $this + */ + public function setHomeDirectory($var) + { + GPBUtil::checkString($var, True); + $this->home_directory = $var; + + return $this; + } + + /** + * The path to the logic shell for this account. + * + * Generated from protobuf field string shell = 6; + * @return string + */ + public function getShell() + { + return $this->shell; + } + + /** + * The path to the logic shell for this account. + * + * Generated from protobuf field string shell = 6; + * @param string $var + * @return $this + */ + public function setShell($var) + { + GPBUtil::checkString($var, True); + $this->shell = $var; + + return $this; + } + + /** + * The GECOS (user information) entry for this account. + * + * Generated from protobuf field string gecos = 7; + * @return string + */ + public function getGecos() + { + return $this->gecos; + } + + /** + * The GECOS (user information) entry for this account. + * + * Generated from protobuf field string gecos = 7; + * @param string $var + * @return $this + */ + public function setGecos($var) + { + GPBUtil::checkString($var, True); + $this->gecos = $var; + + return $this; + } + + /** + * System identifier for which account the username or uid applies to. + * By default, the empty value is used. + * + * Generated from protobuf field string system_id = 8; + * @return string + */ + public function getSystemId() + { + return $this->system_id; + } + + /** + * System identifier for which account the username or uid applies to. + * By default, the empty value is used. + * + * Generated from protobuf field string system_id = 8; + * @param string $var + * @return $this + */ + public function setSystemId($var) + { + GPBUtil::checkString($var, True); + $this->system_id = $var; + + return $this; + } + + /** + * Output only. A POSIX account identifier. + * + * Generated from protobuf field string account_id = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getAccountId() + { + return $this->account_id; + } + + /** + * Output only. A POSIX account identifier. + * + * Generated from protobuf field string account_id = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setAccountId($var) + { + GPBUtil::checkString($var, True); + $this->account_id = $var; + + return $this; + } + + /** + * The operating system type where this account applies. + * + * Generated from protobuf field .google.cloud.oslogin.common.OperatingSystemType operating_system_type = 10; + * @return int + */ + public function getOperatingSystemType() + { + return $this->operating_system_type; + } + + /** + * The operating system type where this account applies. + * + * Generated from protobuf field .google.cloud.oslogin.common.OperatingSystemType operating_system_type = 10; + * @param int $var + * @return $this + */ + public function setOperatingSystemType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\OsLogin\Common\OperatingSystemType::class); + $this->operating_system_type = $var; + + return $this; + } + + /** + * Output only. The canonical resource name. + * + * Generated from protobuf field string name = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The canonical resource name. + * + * Generated from protobuf field string name = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OsLogin/v1/proto/src/Google/Cloud/OsLogin/Common/SshPublicKey.php b/owl-bot-staging/OsLogin/v1/proto/src/Google/Cloud/OsLogin/Common/SshPublicKey.php new file mode 100644 index 000000000000..185588081e3e --- /dev/null +++ b/owl-bot-staging/OsLogin/v1/proto/src/Google/Cloud/OsLogin/Common/SshPublicKey.php @@ -0,0 +1,177 @@ +google.cloud.oslogin.common.SshPublicKey + */ +class SshPublicKey extends \Google\Protobuf\Internal\Message +{ + /** + * Public key text in SSH format, defined by + * RFC4253 + * section 6.6. + * + * Generated from protobuf field string key = 1; + */ + protected $key = ''; + /** + * An expiration time in microseconds since epoch. + * + * Generated from protobuf field int64 expiration_time_usec = 2; + */ + protected $expiration_time_usec = 0; + /** + * Output only. The SHA-256 fingerprint of the SSH public key. + * + * Generated from protobuf field string fingerprint = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $fingerprint = ''; + /** + * Output only. The canonical resource name. + * + * Generated from protobuf field string name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $key + * Public key text in SSH format, defined by + * RFC4253 + * section 6.6. + * @type int|string $expiration_time_usec + * An expiration time in microseconds since epoch. + * @type string $fingerprint + * Output only. The SHA-256 fingerprint of the SSH public key. + * @type string $name + * Output only. The canonical resource name. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Oslogin\Common\Common::initOnce(); + parent::__construct($data); + } + + /** + * Public key text in SSH format, defined by + * RFC4253 + * section 6.6. + * + * Generated from protobuf field string key = 1; + * @return string + */ + public function getKey() + { + return $this->key; + } + + /** + * Public key text in SSH format, defined by + * RFC4253 + * section 6.6. + * + * Generated from protobuf field string key = 1; + * @param string $var + * @return $this + */ + public function setKey($var) + { + GPBUtil::checkString($var, True); + $this->key = $var; + + return $this; + } + + /** + * An expiration time in microseconds since epoch. + * + * Generated from protobuf field int64 expiration_time_usec = 2; + * @return int|string + */ + public function getExpirationTimeUsec() + { + return $this->expiration_time_usec; + } + + /** + * An expiration time in microseconds since epoch. + * + * Generated from protobuf field int64 expiration_time_usec = 2; + * @param int|string $var + * @return $this + */ + public function setExpirationTimeUsec($var) + { + GPBUtil::checkInt64($var); + $this->expiration_time_usec = $var; + + return $this; + } + + /** + * Output only. The SHA-256 fingerprint of the SSH public key. + * + * Generated from protobuf field string fingerprint = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getFingerprint() + { + return $this->fingerprint; + } + + /** + * Output only. The SHA-256 fingerprint of the SSH public key. + * + * Generated from protobuf field string fingerprint = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setFingerprint($var) + { + GPBUtil::checkString($var, True); + $this->fingerprint = $var; + + return $this; + } + + /** + * Output only. The canonical resource name. + * + * Generated from protobuf field string name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The canonical resource name. + * + * Generated from protobuf field string name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OsLogin/v1/proto/src/Google/Cloud/OsLogin/V1/CreateSshPublicKeyRequest.php b/owl-bot-staging/OsLogin/v1/proto/src/Google/Cloud/OsLogin/V1/CreateSshPublicKeyRequest.php new file mode 100644 index 000000000000..76728c29f5e7 --- /dev/null +++ b/owl-bot-staging/OsLogin/v1/proto/src/Google/Cloud/OsLogin/V1/CreateSshPublicKeyRequest.php @@ -0,0 +1,127 @@ +google.cloud.oslogin.v1.CreateSshPublicKeyRequest + */ +class CreateSshPublicKeyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The unique ID for the user in format `users/{user}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The SSH public key and expiration time. + * + * Generated from protobuf field .google.cloud.oslogin.common.SshPublicKey ssh_public_key = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $ssh_public_key = null; + + /** + * @param string $parent Required. The unique ID for the user in format `users/{user}`. Please see + * {@see OsLoginServiceClient::userName()} for help formatting this field. + * @param \Google\Cloud\OsLogin\Common\SshPublicKey $sshPublicKey Required. The SSH public key and expiration time. + * + * @return \Google\Cloud\OsLogin\V1\CreateSshPublicKeyRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\OsLogin\Common\SshPublicKey $sshPublicKey): self + { + return (new self()) + ->setParent($parent) + ->setSshPublicKey($sshPublicKey); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The unique ID for the user in format `users/{user}`. + * @type \Google\Cloud\OsLogin\Common\SshPublicKey $ssh_public_key + * Required. The SSH public key and expiration time. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Oslogin\V1\Oslogin::initOnce(); + parent::__construct($data); + } + + /** + * Required. The unique ID for the user in format `users/{user}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The unique ID for the user in format `users/{user}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The SSH public key and expiration time. + * + * Generated from protobuf field .google.cloud.oslogin.common.SshPublicKey ssh_public_key = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\OsLogin\Common\SshPublicKey|null + */ + public function getSshPublicKey() + { + return $this->ssh_public_key; + } + + public function hasSshPublicKey() + { + return isset($this->ssh_public_key); + } + + public function clearSshPublicKey() + { + unset($this->ssh_public_key); + } + + /** + * Required. The SSH public key and expiration time. + * + * Generated from protobuf field .google.cloud.oslogin.common.SshPublicKey ssh_public_key = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\OsLogin\Common\SshPublicKey $var + * @return $this + */ + public function setSshPublicKey($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OsLogin\Common\SshPublicKey::class); + $this->ssh_public_key = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OsLogin/v1/proto/src/Google/Cloud/OsLogin/V1/DeletePosixAccountRequest.php b/owl-bot-staging/OsLogin/v1/proto/src/Google/Cloud/OsLogin/V1/DeletePosixAccountRequest.php new file mode 100644 index 000000000000..965160ab977f --- /dev/null +++ b/owl-bot-staging/OsLogin/v1/proto/src/Google/Cloud/OsLogin/V1/DeletePosixAccountRequest.php @@ -0,0 +1,91 @@ +google.cloud.oslogin.v1.DeletePosixAccountRequest + */ +class DeletePosixAccountRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A reference to the POSIX account to update. POSIX accounts are + * identified by the project ID they are associated with. A reference to the + * POSIX account is in format `users/{user}/projects/{project}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. A reference to the POSIX account to update. POSIX accounts are + * identified by the project ID they are associated with. A reference to the + * POSIX account is in format `users/{user}/projects/{project}`. Please see + * {@see OsLoginServiceClient::posixAccountName()} for help formatting this field. + * + * @return \Google\Cloud\OsLogin\V1\DeletePosixAccountRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. A reference to the POSIX account to update. POSIX accounts are + * identified by the project ID they are associated with. A reference to the + * POSIX account is in format `users/{user}/projects/{project}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Oslogin\V1\Oslogin::initOnce(); + parent::__construct($data); + } + + /** + * Required. A reference to the POSIX account to update. POSIX accounts are + * identified by the project ID they are associated with. A reference to the + * POSIX account is in format `users/{user}/projects/{project}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. A reference to the POSIX account to update. POSIX accounts are + * identified by the project ID they are associated with. A reference to the + * POSIX account is in format `users/{user}/projects/{project}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OsLogin/v1/proto/src/Google/Cloud/OsLogin/V1/DeleteSshPublicKeyRequest.php b/owl-bot-staging/OsLogin/v1/proto/src/Google/Cloud/OsLogin/V1/DeleteSshPublicKeyRequest.php new file mode 100644 index 000000000000..11383a19392f --- /dev/null +++ b/owl-bot-staging/OsLogin/v1/proto/src/Google/Cloud/OsLogin/V1/DeleteSshPublicKeyRequest.php @@ -0,0 +1,91 @@ +google.cloud.oslogin.v1.DeleteSshPublicKeyRequest + */ +class DeleteSshPublicKeyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The fingerprint of the public key to update. Public keys are + * identified by their SHA-256 fingerprint. The fingerprint of the public key + * is in format `users/{user}/sshPublicKeys/{fingerprint}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The fingerprint of the public key to update. Public keys are + * identified by their SHA-256 fingerprint. The fingerprint of the public key + * is in format `users/{user}/sshPublicKeys/{fingerprint}`. Please see + * {@see OsLoginServiceClient::sshPublicKeyName()} for help formatting this field. + * + * @return \Google\Cloud\OsLogin\V1\DeleteSshPublicKeyRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The fingerprint of the public key to update. Public keys are + * identified by their SHA-256 fingerprint. The fingerprint of the public key + * is in format `users/{user}/sshPublicKeys/{fingerprint}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Oslogin\V1\Oslogin::initOnce(); + parent::__construct($data); + } + + /** + * Required. The fingerprint of the public key to update. Public keys are + * identified by their SHA-256 fingerprint. The fingerprint of the public key + * is in format `users/{user}/sshPublicKeys/{fingerprint}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The fingerprint of the public key to update. Public keys are + * identified by their SHA-256 fingerprint. The fingerprint of the public key + * is in format `users/{user}/sshPublicKeys/{fingerprint}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OsLogin/v1/proto/src/Google/Cloud/OsLogin/V1/GetLoginProfileRequest.php b/owl-bot-staging/OsLogin/v1/proto/src/Google/Cloud/OsLogin/V1/GetLoginProfileRequest.php new file mode 100644 index 000000000000..85992364fab9 --- /dev/null +++ b/owl-bot-staging/OsLogin/v1/proto/src/Google/Cloud/OsLogin/V1/GetLoginProfileRequest.php @@ -0,0 +1,149 @@ +google.cloud.oslogin.v1.GetLoginProfileRequest + */ +class GetLoginProfileRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The unique ID for the user in format `users/{user}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * The project ID of the Google Cloud Platform project. + * + * Generated from protobuf field string project_id = 2; + */ + protected $project_id = ''; + /** + * A system ID for filtering the results of the request. + * + * Generated from protobuf field string system_id = 3; + */ + protected $system_id = ''; + + /** + * @param string $name Required. The unique ID for the user in format `users/{user}`. Please see + * {@see OsLoginServiceClient::userName()} for help formatting this field. + * + * @return \Google\Cloud\OsLogin\V1\GetLoginProfileRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The unique ID for the user in format `users/{user}`. + * @type string $project_id + * The project ID of the Google Cloud Platform project. + * @type string $system_id + * A system ID for filtering the results of the request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Oslogin\V1\Oslogin::initOnce(); + parent::__construct($data); + } + + /** + * Required. The unique ID for the user in format `users/{user}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The unique ID for the user in format `users/{user}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The project ID of the Google Cloud Platform project. + * + * Generated from protobuf field string project_id = 2; + * @return string + */ + public function getProjectId() + { + return $this->project_id; + } + + /** + * The project ID of the Google Cloud Platform project. + * + * Generated from protobuf field string project_id = 2; + * @param string $var + * @return $this + */ + public function setProjectId($var) + { + GPBUtil::checkString($var, True); + $this->project_id = $var; + + return $this; + } + + /** + * A system ID for filtering the results of the request. + * + * Generated from protobuf field string system_id = 3; + * @return string + */ + public function getSystemId() + { + return $this->system_id; + } + + /** + * A system ID for filtering the results of the request. + * + * Generated from protobuf field string system_id = 3; + * @param string $var + * @return $this + */ + public function setSystemId($var) + { + GPBUtil::checkString($var, True); + $this->system_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OsLogin/v1/proto/src/Google/Cloud/OsLogin/V1/GetSshPublicKeyRequest.php b/owl-bot-staging/OsLogin/v1/proto/src/Google/Cloud/OsLogin/V1/GetSshPublicKeyRequest.php new file mode 100644 index 000000000000..6e6de1d0ec84 --- /dev/null +++ b/owl-bot-staging/OsLogin/v1/proto/src/Google/Cloud/OsLogin/V1/GetSshPublicKeyRequest.php @@ -0,0 +1,91 @@ +google.cloud.oslogin.v1.GetSshPublicKeyRequest + */ +class GetSshPublicKeyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The fingerprint of the public key to retrieve. Public keys are + * identified by their SHA-256 fingerprint. The fingerprint of the public key + * is in format `users/{user}/sshPublicKeys/{fingerprint}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The fingerprint of the public key to retrieve. Public keys are + * identified by their SHA-256 fingerprint. The fingerprint of the public key + * is in format `users/{user}/sshPublicKeys/{fingerprint}`. Please see + * {@see OsLoginServiceClient::sshPublicKeyName()} for help formatting this field. + * + * @return \Google\Cloud\OsLogin\V1\GetSshPublicKeyRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The fingerprint of the public key to retrieve. Public keys are + * identified by their SHA-256 fingerprint. The fingerprint of the public key + * is in format `users/{user}/sshPublicKeys/{fingerprint}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Oslogin\V1\Oslogin::initOnce(); + parent::__construct($data); + } + + /** + * Required. The fingerprint of the public key to retrieve. Public keys are + * identified by their SHA-256 fingerprint. The fingerprint of the public key + * is in format `users/{user}/sshPublicKeys/{fingerprint}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The fingerprint of the public key to retrieve. Public keys are + * identified by their SHA-256 fingerprint. The fingerprint of the public key + * is in format `users/{user}/sshPublicKeys/{fingerprint}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OsLogin/v1/proto/src/Google/Cloud/OsLogin/V1/ImportSshPublicKeyRequest.php b/owl-bot-staging/OsLogin/v1/proto/src/Google/Cloud/OsLogin/V1/ImportSshPublicKeyRequest.php new file mode 100644 index 000000000000..122ed6f2f131 --- /dev/null +++ b/owl-bot-staging/OsLogin/v1/proto/src/Google/Cloud/OsLogin/V1/ImportSshPublicKeyRequest.php @@ -0,0 +1,221 @@ +google.cloud.oslogin.v1.ImportSshPublicKeyRequest + */ +class ImportSshPublicKeyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The unique ID for the user in format `users/{user}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The SSH public key and expiration time. + * + * Generated from protobuf field .google.cloud.oslogin.common.SshPublicKey ssh_public_key = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $ssh_public_key = null; + /** + * The project ID of the Google Cloud Platform project. + * + * Generated from protobuf field string project_id = 3; + */ + protected $project_id = ''; + /** + * Optional. The regions to which to assert that the key was written. + * If unspecified, defaults to all regions. + * Regions are listed at https://cloud.google.com/about/locations#region. + * + * Generated from protobuf field repeated string regions = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $regions; + + /** + * @param string $parent Required. The unique ID for the user in format `users/{user}`. Please see + * {@see OsLoginServiceClient::userName()} for help formatting this field. + * @param \Google\Cloud\OsLogin\Common\SshPublicKey $sshPublicKey Optional. The SSH public key and expiration time. + * + * @return \Google\Cloud\OsLogin\V1\ImportSshPublicKeyRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\OsLogin\Common\SshPublicKey $sshPublicKey): self + { + return (new self()) + ->setParent($parent) + ->setSshPublicKey($sshPublicKey); + } + + /** + * @param string $parent Required. The unique ID for the user in format `users/{user}`. Please see + * {@see OsLoginServiceClient::userName()} for help formatting this field. + * @param \Google\Cloud\OsLogin\Common\SshPublicKey $sshPublicKey Optional. The SSH public key and expiration time. + * @param string $projectId The project ID of the Google Cloud Platform project. + * + * @return \Google\Cloud\OsLogin\V1\ImportSshPublicKeyRequest + * + * @experimental + */ + public static function buildFromParentSshPublicKeyProjectId(string $parent, \Google\Cloud\OsLogin\Common\SshPublicKey $sshPublicKey, string $projectId): self + { + return (new self()) + ->setParent($parent) + ->setSshPublicKey($sshPublicKey) + ->setProjectId($projectId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The unique ID for the user in format `users/{user}`. + * @type \Google\Cloud\OsLogin\Common\SshPublicKey $ssh_public_key + * Optional. The SSH public key and expiration time. + * @type string $project_id + * The project ID of the Google Cloud Platform project. + * @type array|\Google\Protobuf\Internal\RepeatedField $regions + * Optional. The regions to which to assert that the key was written. + * If unspecified, defaults to all regions. + * Regions are listed at https://cloud.google.com/about/locations#region. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Oslogin\V1\Oslogin::initOnce(); + parent::__construct($data); + } + + /** + * Required. The unique ID for the user in format `users/{user}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The unique ID for the user in format `users/{user}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The SSH public key and expiration time. + * + * Generated from protobuf field .google.cloud.oslogin.common.SshPublicKey ssh_public_key = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\OsLogin\Common\SshPublicKey|null + */ + public function getSshPublicKey() + { + return $this->ssh_public_key; + } + + public function hasSshPublicKey() + { + return isset($this->ssh_public_key); + } + + public function clearSshPublicKey() + { + unset($this->ssh_public_key); + } + + /** + * Optional. The SSH public key and expiration time. + * + * Generated from protobuf field .google.cloud.oslogin.common.SshPublicKey ssh_public_key = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\OsLogin\Common\SshPublicKey $var + * @return $this + */ + public function setSshPublicKey($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OsLogin\Common\SshPublicKey::class); + $this->ssh_public_key = $var; + + return $this; + } + + /** + * The project ID of the Google Cloud Platform project. + * + * Generated from protobuf field string project_id = 3; + * @return string + */ + public function getProjectId() + { + return $this->project_id; + } + + /** + * The project ID of the Google Cloud Platform project. + * + * Generated from protobuf field string project_id = 3; + * @param string $var + * @return $this + */ + public function setProjectId($var) + { + GPBUtil::checkString($var, True); + $this->project_id = $var; + + return $this; + } + + /** + * Optional. The regions to which to assert that the key was written. + * If unspecified, defaults to all regions. + * Regions are listed at https://cloud.google.com/about/locations#region. + * + * Generated from protobuf field repeated string regions = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRegions() + { + return $this->regions; + } + + /** + * Optional. The regions to which to assert that the key was written. + * If unspecified, defaults to all regions. + * Regions are listed at https://cloud.google.com/about/locations#region. + * + * Generated from protobuf field repeated string regions = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRegions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->regions = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/OsLogin/v1/proto/src/Google/Cloud/OsLogin/V1/ImportSshPublicKeyResponse.php b/owl-bot-staging/OsLogin/v1/proto/src/Google/Cloud/OsLogin/V1/ImportSshPublicKeyResponse.php new file mode 100644 index 000000000000..c9c749a53bee --- /dev/null +++ b/owl-bot-staging/OsLogin/v1/proto/src/Google/Cloud/OsLogin/V1/ImportSshPublicKeyResponse.php @@ -0,0 +1,111 @@ +google.cloud.oslogin.v1.ImportSshPublicKeyResponse + */ +class ImportSshPublicKeyResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The login profile information for the user. + * + * Generated from protobuf field .google.cloud.oslogin.v1.LoginProfile login_profile = 1; + */ + protected $login_profile = null; + /** + * Detailed information about import results. + * + * Generated from protobuf field string details = 2; + */ + protected $details = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\OsLogin\V1\LoginProfile $login_profile + * The login profile information for the user. + * @type string $details + * Detailed information about import results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Oslogin\V1\Oslogin::initOnce(); + parent::__construct($data); + } + + /** + * The login profile information for the user. + * + * Generated from protobuf field .google.cloud.oslogin.v1.LoginProfile login_profile = 1; + * @return \Google\Cloud\OsLogin\V1\LoginProfile|null + */ + public function getLoginProfile() + { + return $this->login_profile; + } + + public function hasLoginProfile() + { + return isset($this->login_profile); + } + + public function clearLoginProfile() + { + unset($this->login_profile); + } + + /** + * The login profile information for the user. + * + * Generated from protobuf field .google.cloud.oslogin.v1.LoginProfile login_profile = 1; + * @param \Google\Cloud\OsLogin\V1\LoginProfile $var + * @return $this + */ + public function setLoginProfile($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OsLogin\V1\LoginProfile::class); + $this->login_profile = $var; + + return $this; + } + + /** + * Detailed information about import results. + * + * Generated from protobuf field string details = 2; + * @return string + */ + public function getDetails() + { + return $this->details; + } + + /** + * Detailed information about import results. + * + * Generated from protobuf field string details = 2; + * @param string $var + * @return $this + */ + public function setDetails($var) + { + GPBUtil::checkString($var, True); + $this->details = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OsLogin/v1/proto/src/Google/Cloud/OsLogin/V1/LoginProfile.php b/owl-bot-staging/OsLogin/v1/proto/src/Google/Cloud/OsLogin/V1/LoginProfile.php new file mode 100644 index 000000000000..6abe567377c1 --- /dev/null +++ b/owl-bot-staging/OsLogin/v1/proto/src/Google/Cloud/OsLogin/V1/LoginProfile.php @@ -0,0 +1,136 @@ +google.cloud.oslogin.v1.LoginProfile + */ +class LoginProfile extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A unique user ID. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * The list of POSIX accounts associated with the user. + * + * Generated from protobuf field repeated .google.cloud.oslogin.common.PosixAccount posix_accounts = 2; + */ + private $posix_accounts; + /** + * A map from SSH public key fingerprint to the associated key object. + * + * Generated from protobuf field map ssh_public_keys = 3; + */ + private $ssh_public_keys; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. A unique user ID. + * @type array<\Google\Cloud\OsLogin\Common\PosixAccount>|\Google\Protobuf\Internal\RepeatedField $posix_accounts + * The list of POSIX accounts associated with the user. + * @type array|\Google\Protobuf\Internal\MapField $ssh_public_keys + * A map from SSH public key fingerprint to the associated key object. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Oslogin\V1\Oslogin::initOnce(); + parent::__construct($data); + } + + /** + * Required. A unique user ID. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. A unique user ID. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The list of POSIX accounts associated with the user. + * + * Generated from protobuf field repeated .google.cloud.oslogin.common.PosixAccount posix_accounts = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPosixAccounts() + { + return $this->posix_accounts; + } + + /** + * The list of POSIX accounts associated with the user. + * + * Generated from protobuf field repeated .google.cloud.oslogin.common.PosixAccount posix_accounts = 2; + * @param array<\Google\Cloud\OsLogin\Common\PosixAccount>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPosixAccounts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\OsLogin\Common\PosixAccount::class); + $this->posix_accounts = $arr; + + return $this; + } + + /** + * A map from SSH public key fingerprint to the associated key object. + * + * Generated from protobuf field map ssh_public_keys = 3; + * @return \Google\Protobuf\Internal\MapField + */ + public function getSshPublicKeys() + { + return $this->ssh_public_keys; + } + + /** + * A map from SSH public key fingerprint to the associated key object. + * + * Generated from protobuf field map ssh_public_keys = 3; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setSshPublicKeys($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\OsLogin\Common\SshPublicKey::class); + $this->ssh_public_keys = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/OsLogin/v1/proto/src/Google/Cloud/OsLogin/V1/UpdateSshPublicKeyRequest.php b/owl-bot-staging/OsLogin/v1/proto/src/Google/Cloud/OsLogin/V1/UpdateSshPublicKeyRequest.php new file mode 100644 index 000000000000..421c2a2586c5 --- /dev/null +++ b/owl-bot-staging/OsLogin/v1/proto/src/Google/Cloud/OsLogin/V1/UpdateSshPublicKeyRequest.php @@ -0,0 +1,201 @@ +google.cloud.oslogin.v1.UpdateSshPublicKeyRequest + */ +class UpdateSshPublicKeyRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The fingerprint of the public key to update. Public keys are + * identified by their SHA-256 fingerprint. The fingerprint of the public key + * is in format `users/{user}/sshPublicKeys/{fingerprint}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. The SSH public key and expiration time. + * + * Generated from protobuf field .google.cloud.oslogin.common.SshPublicKey ssh_public_key = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $ssh_public_key = null; + /** + * Mask to control which fields get updated. Updates all if not present. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3; + */ + protected $update_mask = null; + + /** + * @param string $name Required. The fingerprint of the public key to update. Public keys are + * identified by their SHA-256 fingerprint. The fingerprint of the public key + * is in format `users/{user}/sshPublicKeys/{fingerprint}`. Please see + * {@see OsLoginServiceClient::sshPublicKeyName()} for help formatting this field. + * @param \Google\Cloud\OsLogin\Common\SshPublicKey $sshPublicKey Required. The SSH public key and expiration time. + * + * @return \Google\Cloud\OsLogin\V1\UpdateSshPublicKeyRequest + * + * @experimental + */ + public static function build(string $name, \Google\Cloud\OsLogin\Common\SshPublicKey $sshPublicKey): self + { + return (new self()) + ->setName($name) + ->setSshPublicKey($sshPublicKey); + } + + /** + * @param string $name Required. The fingerprint of the public key to update. Public keys are + * identified by their SHA-256 fingerprint. The fingerprint of the public key + * is in format `users/{user}/sshPublicKeys/{fingerprint}`. Please see + * {@see OsLoginServiceClient::sshPublicKeyName()} for help formatting this field. + * @param \Google\Cloud\OsLogin\Common\SshPublicKey $sshPublicKey Required. The SSH public key and expiration time. + * @param \Google\Protobuf\FieldMask $updateMask Mask to control which fields get updated. Updates all if not present. + * + * @return \Google\Cloud\OsLogin\V1\UpdateSshPublicKeyRequest + * + * @experimental + */ + public static function buildFromNameSshPublicKeyUpdateMask(string $name, \Google\Cloud\OsLogin\Common\SshPublicKey $sshPublicKey, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setName($name) + ->setSshPublicKey($sshPublicKey) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The fingerprint of the public key to update. Public keys are + * identified by their SHA-256 fingerprint. The fingerprint of the public key + * is in format `users/{user}/sshPublicKeys/{fingerprint}`. + * @type \Google\Cloud\OsLogin\Common\SshPublicKey $ssh_public_key + * Required. The SSH public key and expiration time. + * @type \Google\Protobuf\FieldMask $update_mask + * Mask to control which fields get updated. Updates all if not present. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Oslogin\V1\Oslogin::initOnce(); + parent::__construct($data); + } + + /** + * Required. The fingerprint of the public key to update. Public keys are + * identified by their SHA-256 fingerprint. The fingerprint of the public key + * is in format `users/{user}/sshPublicKeys/{fingerprint}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The fingerprint of the public key to update. Public keys are + * identified by their SHA-256 fingerprint. The fingerprint of the public key + * is in format `users/{user}/sshPublicKeys/{fingerprint}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. The SSH public key and expiration time. + * + * Generated from protobuf field .google.cloud.oslogin.common.SshPublicKey ssh_public_key = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\OsLogin\Common\SshPublicKey|null + */ + public function getSshPublicKey() + { + return $this->ssh_public_key; + } + + public function hasSshPublicKey() + { + return isset($this->ssh_public_key); + } + + public function clearSshPublicKey() + { + unset($this->ssh_public_key); + } + + /** + * Required. The SSH public key and expiration time. + * + * Generated from protobuf field .google.cloud.oslogin.common.SshPublicKey ssh_public_key = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\OsLogin\Common\SshPublicKey $var + * @return $this + */ + public function setSshPublicKey($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\OsLogin\Common\SshPublicKey::class); + $this->ssh_public_key = $var; + + return $this; + } + + /** + * Mask to control which fields get updated. Updates all if not present. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Mask to control which fields get updated. Updates all if not present. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/OsLogin/v1/samples/V1/OsLoginServiceClient/create_ssh_public_key.php b/owl-bot-staging/OsLogin/v1/samples/V1/OsLoginServiceClient/create_ssh_public_key.php new file mode 100644 index 000000000000..648a5ea7645f --- /dev/null +++ b/owl-bot-staging/OsLogin/v1/samples/V1/OsLoginServiceClient/create_ssh_public_key.php @@ -0,0 +1,73 @@ +setParent($formattedParent) + ->setSshPublicKey($sshPublicKey); + + // Call the API and handle any network failures. + try { + /** @var SshPublicKey $response */ + $response = $osLoginServiceClient->createSshPublicKey($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = OsLoginServiceClient::userName('[USER]'); + + create_ssh_public_key_sample($formattedParent); +} +// [END oslogin_v1_generated_OsLoginService_CreateSshPublicKey_sync] diff --git a/owl-bot-staging/OsLogin/v1/samples/V1/OsLoginServiceClient/delete_posix_account.php b/owl-bot-staging/OsLogin/v1/samples/V1/OsLoginServiceClient/delete_posix_account.php new file mode 100644 index 000000000000..cec102d70eed --- /dev/null +++ b/owl-bot-staging/OsLogin/v1/samples/V1/OsLoginServiceClient/delete_posix_account.php @@ -0,0 +1,71 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $osLoginServiceClient->deletePosixAccount($request); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = OsLoginServiceClient::posixAccountName('[USER]', '[PROJECT]'); + + delete_posix_account_sample($formattedName); +} +// [END oslogin_v1_generated_OsLoginService_DeletePosixAccount_sync] diff --git a/owl-bot-staging/OsLogin/v1/samples/V1/OsLoginServiceClient/delete_ssh_public_key.php b/owl-bot-staging/OsLogin/v1/samples/V1/OsLoginServiceClient/delete_ssh_public_key.php new file mode 100644 index 000000000000..e7398c7d3fc4 --- /dev/null +++ b/owl-bot-staging/OsLogin/v1/samples/V1/OsLoginServiceClient/delete_ssh_public_key.php @@ -0,0 +1,71 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $osLoginServiceClient->deleteSshPublicKey($request); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = OsLoginServiceClient::sshPublicKeyName('[USER]', '[FINGERPRINT]'); + + delete_ssh_public_key_sample($formattedName); +} +// [END oslogin_v1_generated_OsLoginService_DeleteSshPublicKey_sync] diff --git a/owl-bot-staging/OsLogin/v1/samples/V1/OsLoginServiceClient/get_login_profile.php b/owl-bot-staging/OsLogin/v1/samples/V1/OsLoginServiceClient/get_login_profile.php new file mode 100644 index 000000000000..6b97dcf8279b --- /dev/null +++ b/owl-bot-staging/OsLogin/v1/samples/V1/OsLoginServiceClient/get_login_profile.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var LoginProfile $response */ + $response = $osLoginServiceClient->getLoginProfile($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = OsLoginServiceClient::userName('[USER]'); + + get_login_profile_sample($formattedName); +} +// [END oslogin_v1_generated_OsLoginService_GetLoginProfile_sync] diff --git a/owl-bot-staging/OsLogin/v1/samples/V1/OsLoginServiceClient/get_ssh_public_key.php b/owl-bot-staging/OsLogin/v1/samples/V1/OsLoginServiceClient/get_ssh_public_key.php new file mode 100644 index 000000000000..a7570bc0d15d --- /dev/null +++ b/owl-bot-staging/OsLogin/v1/samples/V1/OsLoginServiceClient/get_ssh_public_key.php @@ -0,0 +1,73 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var SshPublicKey $response */ + $response = $osLoginServiceClient->getSshPublicKey($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = OsLoginServiceClient::sshPublicKeyName('[USER]', '[FINGERPRINT]'); + + get_ssh_public_key_sample($formattedName); +} +// [END oslogin_v1_generated_OsLoginService_GetSshPublicKey_sync] diff --git a/owl-bot-staging/OsLogin/v1/samples/V1/OsLoginServiceClient/import_ssh_public_key.php b/owl-bot-staging/OsLogin/v1/samples/V1/OsLoginServiceClient/import_ssh_public_key.php new file mode 100644 index 000000000000..a631d81efa91 --- /dev/null +++ b/owl-bot-staging/OsLogin/v1/samples/V1/OsLoginServiceClient/import_ssh_public_key.php @@ -0,0 +1,73 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var ImportSshPublicKeyResponse $response */ + $response = $osLoginServiceClient->importSshPublicKey($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = OsLoginServiceClient::userName('[USER]'); + + import_ssh_public_key_sample($formattedParent); +} +// [END oslogin_v1_generated_OsLoginService_ImportSshPublicKey_sync] diff --git a/owl-bot-staging/OsLogin/v1/samples/V1/OsLoginServiceClient/update_ssh_public_key.php b/owl-bot-staging/OsLogin/v1/samples/V1/OsLoginServiceClient/update_ssh_public_key.php new file mode 100644 index 000000000000..a742735ea2a3 --- /dev/null +++ b/owl-bot-staging/OsLogin/v1/samples/V1/OsLoginServiceClient/update_ssh_public_key.php @@ -0,0 +1,76 @@ +setName($formattedName) + ->setSshPublicKey($sshPublicKey); + + // Call the API and handle any network failures. + try { + /** @var SshPublicKey $response */ + $response = $osLoginServiceClient->updateSshPublicKey($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = OsLoginServiceClient::sshPublicKeyName('[USER]', '[FINGERPRINT]'); + + update_ssh_public_key_sample($formattedName); +} +// [END oslogin_v1_generated_OsLoginService_UpdateSshPublicKey_sync] diff --git a/owl-bot-staging/OsLogin/v1/src/V1/Client/OsLoginServiceClient.php b/owl-bot-staging/OsLogin/v1/src/V1/Client/OsLoginServiceClient.php new file mode 100644 index 000000000000..6dff5896fee0 --- /dev/null +++ b/owl-bot-staging/OsLogin/v1/src/V1/Client/OsLoginServiceClient.php @@ -0,0 +1,451 @@ + createSshPublicKeyAsync(CreateSshPublicKeyRequest $request, array $optionalArgs = []) + * @method PromiseInterface deletePosixAccountAsync(DeletePosixAccountRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteSshPublicKeyAsync(DeleteSshPublicKeyRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLoginProfileAsync(GetLoginProfileRequest $request, array $optionalArgs = []) + * @method PromiseInterface getSshPublicKeyAsync(GetSshPublicKeyRequest $request, array $optionalArgs = []) + * @method PromiseInterface importSshPublicKeyAsync(ImportSshPublicKeyRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateSshPublicKeyAsync(UpdateSshPublicKeyRequest $request, array $optionalArgs = []) + */ +final class OsLoginServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.oslogin.v1.OsLoginService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'oslogin.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'oslogin.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/cloud-platform.read-only', + 'https://www.googleapis.com/auth/compute', + 'https://www.googleapis.com/auth/compute.readonly', + ]; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/os_login_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/os_login_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/os_login_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/os_login_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a + * posix_account resource. + * + * @param string $user + * @param string $project + * + * @return string The formatted posix_account resource. + */ + public static function posixAccountName(string $user, string $project): string + { + return self::getPathTemplate('posixAccount')->render([ + 'user' => $user, + 'project' => $project, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * ssh_public_key resource. + * + * @param string $user + * @param string $fingerprint + * + * @return string The formatted ssh_public_key resource. + */ + public static function sshPublicKeyName(string $user, string $fingerprint): string + { + return self::getPathTemplate('sshPublicKey')->render([ + 'user' => $user, + 'fingerprint' => $fingerprint, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a user + * resource. + * + * @param string $user + * + * @return string The formatted user resource. + */ + public static function userName(string $user): string + { + return self::getPathTemplate('user')->render([ + 'user' => $user, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - posixAccount: users/{user}/projects/{project} + * - sshPublicKey: users/{user}/sshPublicKeys/{fingerprint} + * - user: users/{user} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'oslogin.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Create an SSH public key + * + * The async variant is {@see OsLoginServiceClient::createSshPublicKeyAsync()} . + * + * @example samples/V1/OsLoginServiceClient/create_ssh_public_key.php + * + * @param CreateSshPublicKeyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return SshPublicKey + * + * @throws ApiException Thrown if the API call fails. + */ + public function createSshPublicKey(CreateSshPublicKeyRequest $request, array $callOptions = []): SshPublicKey + { + return $this->startApiCall('CreateSshPublicKey', $request, $callOptions)->wait(); + } + + /** + * Deletes a POSIX account. + * + * The async variant is {@see OsLoginServiceClient::deletePosixAccountAsync()} . + * + * @example samples/V1/OsLoginServiceClient/delete_posix_account.php + * + * @param DeletePosixAccountRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException Thrown if the API call fails. + */ + public function deletePosixAccount(DeletePosixAccountRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeletePosixAccount', $request, $callOptions)->wait(); + } + + /** + * Deletes an SSH public key. + * + * The async variant is {@see OsLoginServiceClient::deleteSshPublicKeyAsync()} . + * + * @example samples/V1/OsLoginServiceClient/delete_ssh_public_key.php + * + * @param DeleteSshPublicKeyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteSshPublicKey(DeleteSshPublicKeyRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteSshPublicKey', $request, $callOptions)->wait(); + } + + /** + * Retrieves the profile information used for logging in to a virtual machine + * on Google Compute Engine. + * + * The async variant is {@see OsLoginServiceClient::getLoginProfileAsync()} . + * + * @example samples/V1/OsLoginServiceClient/get_login_profile.php + * + * @param GetLoginProfileRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return LoginProfile + * + * @throws ApiException Thrown if the API call fails. + */ + public function getLoginProfile(GetLoginProfileRequest $request, array $callOptions = []): LoginProfile + { + return $this->startApiCall('GetLoginProfile', $request, $callOptions)->wait(); + } + + /** + * Retrieves an SSH public key. + * + * The async variant is {@see OsLoginServiceClient::getSshPublicKeyAsync()} . + * + * @example samples/V1/OsLoginServiceClient/get_ssh_public_key.php + * + * @param GetSshPublicKeyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return SshPublicKey + * + * @throws ApiException Thrown if the API call fails. + */ + public function getSshPublicKey(GetSshPublicKeyRequest $request, array $callOptions = []): SshPublicKey + { + return $this->startApiCall('GetSshPublicKey', $request, $callOptions)->wait(); + } + + /** + * Adds an SSH public key and returns the profile information. Default POSIX + * account information is set when no username and UID exist as part of the + * login profile. + * + * The async variant is {@see OsLoginServiceClient::importSshPublicKeyAsync()} . + * + * @example samples/V1/OsLoginServiceClient/import_ssh_public_key.php + * + * @param ImportSshPublicKeyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ImportSshPublicKeyResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function importSshPublicKey(ImportSshPublicKeyRequest $request, array $callOptions = []): ImportSshPublicKeyResponse + { + return $this->startApiCall('ImportSshPublicKey', $request, $callOptions)->wait(); + } + + /** + * Updates an SSH public key and returns the profile information. This method + * supports patch semantics. + * + * The async variant is {@see OsLoginServiceClient::updateSshPublicKeyAsync()} . + * + * @example samples/V1/OsLoginServiceClient/update_ssh_public_key.php + * + * @param UpdateSshPublicKeyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return SshPublicKey + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateSshPublicKey(UpdateSshPublicKeyRequest $request, array $callOptions = []): SshPublicKey + { + return $this->startApiCall('UpdateSshPublicKey', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/OsLogin/v1/src/V1/gapic_metadata.json b/owl-bot-staging/OsLogin/v1/src/V1/gapic_metadata.json new file mode 100644 index 000000000000..1d9c47c89831 --- /dev/null +++ b/owl-bot-staging/OsLogin/v1/src/V1/gapic_metadata.json @@ -0,0 +1,53 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.cloud.oslogin.v1", + "libraryPackage": "Google\\Cloud\\OsLogin\\V1", + "services": { + "OsLoginService": { + "clients": { + "grpc": { + "libraryClient": "OsLoginServiceGapicClient", + "rpcs": { + "CreateSshPublicKey": { + "methods": [ + "createSshPublicKey" + ] + }, + "DeletePosixAccount": { + "methods": [ + "deletePosixAccount" + ] + }, + "DeleteSshPublicKey": { + "methods": [ + "deleteSshPublicKey" + ] + }, + "GetLoginProfile": { + "methods": [ + "getLoginProfile" + ] + }, + "GetSshPublicKey": { + "methods": [ + "getSshPublicKey" + ] + }, + "ImportSshPublicKey": { + "methods": [ + "importSshPublicKey" + ] + }, + "UpdateSshPublicKey": { + "methods": [ + "updateSshPublicKey" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/OsLogin/v1/src/V1/resources/os_login_service_client_config.json b/owl-bot-staging/OsLogin/v1/src/V1/resources/os_login_service_client_config.json new file mode 100644 index 000000000000..71f41f61790d --- /dev/null +++ b/owl-bot-staging/OsLogin/v1/src/V1/resources/os_login_service_client_config.json @@ -0,0 +1,70 @@ +{ + "interfaces": { + "google.cloud.oslogin.v1.OsLoginService": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 10000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 10000, + "total_timeout_millis": 10000 + } + }, + "methods": { + "CreateSshPublicKey": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DeletePosixAccount": { + "timeout_millis": 10000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeleteSshPublicKey": { + "timeout_millis": 10000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetLoginProfile": { + "timeout_millis": 10000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetSshPublicKey": { + "timeout_millis": 10000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ImportSshPublicKey": { + "timeout_millis": 10000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateSshPublicKey": { + "timeout_millis": 10000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/OsLogin/v1/src/V1/resources/os_login_service_descriptor_config.php b/owl-bot-staging/OsLogin/v1/src/V1/resources/os_login_service_descriptor_config.php new file mode 100644 index 000000000000..f76e9c8d302a --- /dev/null +++ b/owl-bot-staging/OsLogin/v1/src/V1/resources/os_login_service_descriptor_config.php @@ -0,0 +1,117 @@ + [ + 'google.cloud.oslogin.v1.OsLoginService' => [ + 'CreateSshPublicKey' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\OsLogin\Common\SshPublicKey', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeletePosixAccount' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteSshPublicKey' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetLoginProfile' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\OsLogin\V1\LoginProfile', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetSshPublicKey' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\OsLogin\Common\SshPublicKey', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ImportSshPublicKey' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\OsLogin\V1\ImportSshPublicKeyResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateSshPublicKey' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\OsLogin\Common\SshPublicKey', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'templateMap' => [ + 'posixAccount' => 'users/{user}/projects/{project}', + 'sshPublicKey' => 'users/{user}/sshPublicKeys/{fingerprint}', + 'user' => 'users/{user}', + ], + ], + ], +]; diff --git a/owl-bot-staging/OsLogin/v1/src/V1/resources/os_login_service_rest_client_config.php b/owl-bot-staging/OsLogin/v1/src/V1/resources/os_login_service_rest_client_config.php new file mode 100644 index 000000000000..6eaa81999f32 --- /dev/null +++ b/owl-bot-staging/OsLogin/v1/src/V1/resources/os_login_service_rest_client_config.php @@ -0,0 +1,109 @@ + [ + 'google.cloud.oslogin.v1.OsLoginService' => [ + 'CreateSshPublicKey' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=users/*}/sshPublicKeys', + 'body' => 'ssh_public_key', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeletePosixAccount' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=users/*/projects/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteSshPublicKey' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=users/*/sshPublicKeys/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetLoginProfile' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=users/*}/loginProfile', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetSshPublicKey' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=users/*/sshPublicKeys/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ImportSshPublicKey' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=users/*}:importSshPublicKey', + 'body' => 'ssh_public_key', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateSshPublicKey' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{name=users/*/sshPublicKeys/*}', + 'body' => 'ssh_public_key', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/OsLogin/v1/tests/Unit/V1/Client/OsLoginServiceClientTest.php b/owl-bot-staging/OsLogin/v1/tests/Unit/V1/Client/OsLoginServiceClientTest.php new file mode 100644 index 000000000000..ec2cc9b6eb64 --- /dev/null +++ b/owl-bot-staging/OsLogin/v1/tests/Unit/V1/Client/OsLoginServiceClientTest.php @@ -0,0 +1,582 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return OsLoginServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new OsLoginServiceClient($options); + } + + /** @test */ + public function createSshPublicKeyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $key = 'key106079'; + $expirationTimeUsec = 2058878882; + $fingerprint = 'fingerprint-1375934236'; + $name = 'name3373707'; + $expectedResponse = new SshPublicKey(); + $expectedResponse->setKey($key); + $expectedResponse->setExpirationTimeUsec($expirationTimeUsec); + $expectedResponse->setFingerprint($fingerprint); + $expectedResponse->setName($name); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->userName('[USER]'); + $sshPublicKey = new SshPublicKey(); + $request = (new CreateSshPublicKeyRequest()) + ->setParent($formattedParent) + ->setSshPublicKey($sshPublicKey); + $response = $gapicClient->createSshPublicKey($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.oslogin.v1.OsLoginService/CreateSshPublicKey', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getSshPublicKey(); + $this->assertProtobufEquals($sshPublicKey, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createSshPublicKeyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->userName('[USER]'); + $sshPublicKey = new SshPublicKey(); + $request = (new CreateSshPublicKeyRequest()) + ->setParent($formattedParent) + ->setSshPublicKey($sshPublicKey); + try { + $gapicClient->createSshPublicKey($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deletePosixAccountTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->posixAccountName('[USER]', '[PROJECT]'); + $request = (new DeletePosixAccountRequest()) + ->setName($formattedName); + $gapicClient->deletePosixAccount($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.oslogin.v1.OsLoginService/DeletePosixAccount', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deletePosixAccountExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->posixAccountName('[USER]', '[PROJECT]'); + $request = (new DeletePosixAccountRequest()) + ->setName($formattedName); + try { + $gapicClient->deletePosixAccount($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteSshPublicKeyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->sshPublicKeyName('[USER]', '[FINGERPRINT]'); + $request = (new DeleteSshPublicKeyRequest()) + ->setName($formattedName); + $gapicClient->deleteSshPublicKey($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.oslogin.v1.OsLoginService/DeleteSshPublicKey', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteSshPublicKeyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->sshPublicKeyName('[USER]', '[FINGERPRINT]'); + $request = (new DeleteSshPublicKeyRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteSshPublicKey($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLoginProfileTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new LoginProfile(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->userName('[USER]'); + $request = (new GetLoginProfileRequest()) + ->setName($formattedName); + $response = $gapicClient->getLoginProfile($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.oslogin.v1.OsLoginService/GetLoginProfile', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLoginProfileExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->userName('[USER]'); + $request = (new GetLoginProfileRequest()) + ->setName($formattedName); + try { + $gapicClient->getLoginProfile($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getSshPublicKeyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $key = 'key106079'; + $expirationTimeUsec = 2058878882; + $fingerprint = 'fingerprint-1375934236'; + $name2 = 'name2-1052831874'; + $expectedResponse = new SshPublicKey(); + $expectedResponse->setKey($key); + $expectedResponse->setExpirationTimeUsec($expirationTimeUsec); + $expectedResponse->setFingerprint($fingerprint); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->sshPublicKeyName('[USER]', '[FINGERPRINT]'); + $request = (new GetSshPublicKeyRequest()) + ->setName($formattedName); + $response = $gapicClient->getSshPublicKey($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.oslogin.v1.OsLoginService/GetSshPublicKey', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getSshPublicKeyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->sshPublicKeyName('[USER]', '[FINGERPRINT]'); + $request = (new GetSshPublicKeyRequest()) + ->setName($formattedName); + try { + $gapicClient->getSshPublicKey($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function importSshPublicKeyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $details = 'details1557721666'; + $expectedResponse = new ImportSshPublicKeyResponse(); + $expectedResponse->setDetails($details); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->userName('[USER]'); + $request = (new ImportSshPublicKeyRequest()) + ->setParent($formattedParent); + $response = $gapicClient->importSshPublicKey($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.oslogin.v1.OsLoginService/ImportSshPublicKey', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function importSshPublicKeyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->userName('[USER]'); + $request = (new ImportSshPublicKeyRequest()) + ->setParent($formattedParent); + try { + $gapicClient->importSshPublicKey($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateSshPublicKeyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $key = 'key106079'; + $expirationTimeUsec = 2058878882; + $fingerprint = 'fingerprint-1375934236'; + $name2 = 'name2-1052831874'; + $expectedResponse = new SshPublicKey(); + $expectedResponse->setKey($key); + $expectedResponse->setExpirationTimeUsec($expirationTimeUsec); + $expectedResponse->setFingerprint($fingerprint); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->sshPublicKeyName('[USER]', '[FINGERPRINT]'); + $sshPublicKey = new SshPublicKey(); + $request = (new UpdateSshPublicKeyRequest()) + ->setName($formattedName) + ->setSshPublicKey($sshPublicKey); + $response = $gapicClient->updateSshPublicKey($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.oslogin.v1.OsLoginService/UpdateSshPublicKey', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getSshPublicKey(); + $this->assertProtobufEquals($sshPublicKey, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateSshPublicKeyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->sshPublicKeyName('[USER]', '[FINGERPRINT]'); + $sshPublicKey = new SshPublicKey(); + $request = (new UpdateSshPublicKeyRequest()) + ->setName($formattedName) + ->setSshPublicKey($sshPublicKey); + try { + $gapicClient->updateSshPublicKey($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createSshPublicKeyAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $key = 'key106079'; + $expirationTimeUsec = 2058878882; + $fingerprint = 'fingerprint-1375934236'; + $name = 'name3373707'; + $expectedResponse = new SshPublicKey(); + $expectedResponse->setKey($key); + $expectedResponse->setExpirationTimeUsec($expirationTimeUsec); + $expectedResponse->setFingerprint($fingerprint); + $expectedResponse->setName($name); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->userName('[USER]'); + $sshPublicKey = new SshPublicKey(); + $request = (new CreateSshPublicKeyRequest()) + ->setParent($formattedParent) + ->setSshPublicKey($sshPublicKey); + $response = $gapicClient->createSshPublicKeyAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.oslogin.v1.OsLoginService/CreateSshPublicKey', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getSshPublicKey(); + $this->assertProtobufEquals($sshPublicKey, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} From af298737278bc3f4e60ab06c67e2851bfe1f2aa4 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Tue, 10 Dec 2024 21:07:00 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20po?= =?UTF-8?q?st-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- .../Client/ManagedIdentitiesServiceClient.php | 10 +- .../src/V1/Client/ManagedKafkaClient.php | 10 +- .../src/V1/Client/DeliveryServiceClient.php | 10 +- .../src/V1/Client/RouteOptimizationClient.php | 4 + .../Client/SpeechTranslationServiceClient.php | 4 + .../src/V1/Client/CloudMemcacheClient.php | 10 +- .../src/V1/Client/MigrationCenterClient.php | 10 +- .../V3/Client/AlertPolicyServiceClient.php | 10 +- .../src/V3/Client/GroupServiceClient.php | 10 +- .../src/V3/Client/MetricServiceClient.php | 10 +- .../NotificationChannelServiceClient.php | 10 +- .../src/V3/Client/QueryServiceClient.php | 4 + .../Client/ServiceMonitoringServiceClient.php | 10 +- .../src/V3/Client/SnoozeServiceClient.php | 10 +- .../V3/Client/UptimeCheckServiceClient.php | 10 +- NetApp/src/V1/Client/NetAppClient.php | 10 +- .../src/V1/Client/HubServiceClient.php | 10 +- .../PolicyBasedRoutingServiceClient.php | 10 +- .../V1/Client/ReachabilityServiceClient.php | 10 +- .../src/V1/Client/NetworkSecurityClient.php | 10 +- .../src/V1/Client/DepServiceClient.php | 10 +- .../src/V1/Client/NetworkServicesClient.php | 10 +- .../Client/ManagedNotebookServiceClient.php | 10 +- .../src/V1/Client/NotebookServiceClient.php | 10 +- .../src/V2/Client/NotebookServiceClient.php | 10 +- .../src/V1/Client/FleetRoutingClient.php | 4 + .../src/V1/Client/OracleDatabaseClient.php | 10 +- .../src/V1/Client/EnvironmentsClient.php | 10 +- .../src/V1/Client/ImageVersionsClient.php | 4 + OrgPolicy/src/V2/Client/OrgPolicyClient.php | 10 +- .../src/V1/Client/OsConfigServiceClient.php | 10 +- .../V1/Client/OsConfigZonalServiceClient.php | 10 +- .../src/V1/Client/OsLoginServiceClient.php | 10 +- .../V1/ManagedIdentitiesService.php | 117 - .../Cloud/Managedidentities/V1/Resource.php | Bin 2818 -> 0 bytes .../V1/AttachTrustRequest.php | 133 - .../V1/CreateMicrosoftAdDomainRequest.php | 220 - .../V1/DeleteDomainRequest.php | 87 - .../V1/DetachTrustRequest.php | 133 - .../Cloud/ManagedIdentities/V1/Domain.php | 525 -- .../ManagedIdentities/V1/Domain/State.php | 100 - .../ManagedIdentities/V1/GetDomainRequest.php | 86 - .../V1/ListDomainsRequest.php | 263 - .../V1/ListDomainsResponse.php | 140 - .../Cloud/ManagedIdentities/V1/OpMetadata.php | 269 - .../V1/ReconfigureTrustRequest.php | 169 - .../V1/ResetAdminPasswordRequest.php | 87 - .../V1/ResetAdminPasswordResponse.php | 68 - .../Cloud/ManagedIdentities/V1/Trust.php | 462 -- .../ManagedIdentities/V1/Trust/State.php | 85 - .../V1/Trust/TrustDirection.php | 74 - .../ManagedIdentities/V1/Trust/TrustType.php | 64 - .../V1/UpdateDomainRequest.php | 167 - .../V1/ValidateTrustRequest.php | 133 - .../attach_trust.php | 122 - .../create_microsoft_ad_domain.php | 129 - .../delete_domain.php | 81 - .../detach_trust.php | 122 - .../get_domain.php | 72 - .../list_domains.php | 77 - .../reconfigure_trust.php | 96 - .../reset_admin_password.php | 72 - .../update_domain.php | 105 - .../validate_trust.php | 123 - .../Client/ManagedIdentitiesServiceClient.php | 607 -- .../v1/src/V1/gapic_metadata.json | 68 - ...aged_identities_service_client_config.json | 82 - ...d_identities_service_descriptor_config.php | 210 - ..._identities_service_rest_client_config.php | 295 - .../ManagedIdentitiesServiceClientTest.php | 1417 ---- .../Cloud/Managedkafka/V1/ManagedKafka.php | 125 - .../Cloud/Managedkafka/V1/Resources.php | Bin 3894 -> 0 bytes .../Cloud/ManagedKafka/V1/AccessConfig.php | 75 - .../Cloud/ManagedKafka/V1/CapacityConfig.php | 109 - .../Google/Cloud/ManagedKafka/V1/Cluster.php | 448 -- .../Cloud/ManagedKafka/V1/Cluster/State.php | 71 - .../Cloud/ManagedKafka/V1/ConsumerGroup.php | 117 - .../V1/ConsumerPartitionMetadata.php | 109 - .../ManagedKafka/V1/ConsumerTopicMetadata.php | 71 - .../ManagedKafka/V1/CreateClusterRequest.php | 272 - .../ManagedKafka/V1/CreateTopicRequest.php | 189 - .../ManagedKafka/V1/DeleteClusterRequest.php | 159 - .../V1/DeleteConsumerGroupRequest.php | 86 - .../ManagedKafka/V1/DeleteTopicRequest.php | 86 - .../Cloud/ManagedKafka/V1/GcpConfig.php | 124 - .../ManagedKafka/V1/GetClusterRequest.php | 81 - .../V1/GetConsumerGroupRequest.php | 86 - .../Cloud/ManagedKafka/V1/GetTopicRequest.php | 91 - .../ManagedKafka/V1/ListClustersRequest.php | 242 - .../ManagedKafka/V1/ListClustersResponse.php | 139 - .../V1/ListConsumerGroupsRequest.php | 179 - .../V1/ListConsumerGroupsResponse.php | 109 - .../ManagedKafka/V1/ListTopicsRequest.php | 174 - .../ManagedKafka/V1/ListTopicsResponse.php | 109 - .../Cloud/ManagedKafka/V1/NetworkConfig.php | 96 - .../ManagedKafka/V1/OperationMetadata.php | 307 - .../Cloud/ManagedKafka/V1/RebalanceConfig.php | 71 - .../ManagedKafka/V1/RebalanceConfig/Mode.php | 65 - .../Google/Cloud/ManagedKafka/V1/Topic.php | 201 - .../ManagedKafka/V1/UpdateClusterRequest.php | 234 - .../V1/UpdateConsumerGroupRequest.php | 156 - .../ManagedKafka/V1/UpdateTopicRequest.php | 156 - .../V1/ManagedKafkaClient/create_cluster.php | 138 - .../V1/ManagedKafkaClient/create_topic.php | 95 - .../V1/ManagedKafkaClient/delete_cluster.php | 80 - .../delete_consumer_group.php | 75 - .../V1/ManagedKafkaClient/delete_topic.php | 70 - .../V1/ManagedKafkaClient/get_cluster.php | 71 - .../ManagedKafkaClient/get_consumer_group.php | 77 - .../V1/ManagedKafkaClient/get_location.php | 57 - .../V1/ManagedKafkaClient/get_topic.php | 73 - .../V1/ManagedKafkaClient/list_clusters.php | 77 - .../list_consumer_groups.php | 78 - .../V1/ManagedKafkaClient/list_locations.php | 62 - .../V1/ManagedKafkaClient/list_topics.php | 77 - .../V1/ManagedKafkaClient/update_cluster.php | 124 - .../update_consumer_group.php | 62 - .../V1/ManagedKafkaClient/update_topic.php | 82 - .../v1/src/V1/Client/ManagedKafkaClient.php | 802 -- .../v1/src/V1/gapic_metadata.json | 98 - .../managed_kafka_client_config.json | 124 - .../managed_kafka_descriptor_config.php | 285 - .../managed_kafka_rest_client_config.php | 277 - .../Unit/V1/Client/ManagedKafkaClientTest.php | 1526 ---- .../Maps/Fleetengine/Delivery/V1/Common.php | Bin 3682 -> 0 bytes .../Fleetengine/Delivery/V1/DeliveryApi.php | 123 - .../Delivery/V1/DeliveryVehicles.php | Bin 3115 -> 0 bytes .../Maps/Fleetengine/Delivery/V1/Header.php | Bin 1535 -> 0 bytes .../Delivery/V1/TaskTrackingInfo.php | 53 - .../Maps/Fleetengine/Delivery/V1/Tasks.php | Bin 4076 -> 0 bytes .../Delivery/V1/BatchCreateTasksRequest.php | 177 - .../Delivery/V1/BatchCreateTasksResponse.php | 67 - .../V1/CreateDeliveryVehicleRequest.php | 279 - .../Delivery/V1/CreateTaskRequest.php | 304 - .../Delivery/V1/DeliveryRequestHeader.php | 493 -- .../V1/DeliveryRequestHeader/Platform.php | 71 - .../V1/DeliveryRequestHeader/SdkType.php | 71 - .../Delivery/V1/DeliveryVehicle.php | 671 -- .../DeliveryVehicle/DeliveryVehicleType.php | 79 - .../Delivery/V1/DeliveryVehicleAttribute.php | 225 - .../Delivery/V1/DeliveryVehicleLocation.php | 1789 ----- .../V1/DeliveryVehicleLocationSensor.php | 110 - .../V1/DeliveryVehicleNavigationStatus.php | 76 - .../Delivery/V1/GetDeliveryVehicleRequest.php | 140 - .../Delivery/V1/GetTaskRequest.php | 135 - .../V1/GetTaskTrackingInfoRequest.php | 145 - .../V1/ListDeliveryVehiclesRequest.php | 365 - .../V1/ListDeliveryVehiclesResponse.php | 159 - .../Delivery/V1/ListTasksRequest.php | 273 - .../Delivery/V1/ListTasksResponse.php | 160 - .../FleetEngine/Delivery/V1/LocationInfo.php | 77 - .../Maps/FleetEngine/Delivery/V1/Task.php | 720 -- .../Delivery/V1/Task/JourneySharingInfo.php | 216 - .../FleetEngine/Delivery/V1/Task/State.php | 65 - .../Delivery/V1/Task/TaskOutcome.php | 65 - .../V1/Task/TaskOutcomeLocationSource.php | 65 - .../FleetEngine/Delivery/V1/Task/Type.php | 87 - .../FleetEngine/Delivery/V1/TaskAttribute.php | 176 - .../Delivery/V1/TaskTrackingInfo.php | 698 -- .../Delivery/V1/TaskTrackingViewConfig.php | 346 - .../VisibilityOption.php | 229 - .../FleetEngine/Delivery/V1/TimeWindow.php | 121 - .../V1/UpdateDeliveryVehicleRequest.php | 201 - .../Delivery/V1/UpdateTaskRequest.php | 259 - .../Delivery/V1/VehicleJourneySegment.php | 352 - .../FleetEngine/Delivery/V1/VehicleStop.php | 161 - .../Delivery/V1/VehicleStop/State.php | 76 - .../Delivery/V1/VehicleStop/TaskInfo.php | 190 - .../batch_create_tasks.php | 122 - .../create_delivery_vehicle.php | 84 - .../V1/DeliveryServiceClient/create_task.php | 98 - .../get_delivery_vehicle.php | 74 - .../V1/DeliveryServiceClient/get_task.php | 73 - .../get_task_tracking_info.php | 75 - .../list_delivery_vehicles.php | 78 - .../V1/DeliveryServiceClient/list_tasks.php | 78 - .../update_delivery_vehicle.php | 68 - .../V1/DeliveryServiceClient/update_task.php | 84 - .../src/V1/Client/DeliveryServiceClient.php | 557 -- .../v1/src/V1/gapic_metadata.json | 68 - .../delivery_service_client_config.json | 84 - .../delivery_service_descriptor_config.php | 202 - .../delivery_service_rest_client_config.php | 158 - .../V1/Client/DeliveryServiceClientTest.php | 855 -- .../V1/RouteOptimizationService.php | Bin 17393 -> 0 bytes .../V1/AggregatedMetrics.php | 454 -- .../V1/BatchOptimizeToursMetadata.php | 33 - .../V1/BatchOptimizeToursRequest.php | 125 - .../AsyncModelConfig.php | 162 - .../V1/BatchOptimizeToursResponse.php | 34 - .../Maps/RouteOptimization/V1/BreakRule.php | 113 - .../V1/BreakRule/BreakRequest.php | 172 - .../V1/BreakRule/FrequencyConstraint.php | 166 - .../Maps/RouteOptimization/V1/DataFormat.php | 62 - .../RouteOptimization/V1/DistanceLimit.php | 284 - .../RouteOptimization/V1/GcsDestination.php | 68 - .../Maps/RouteOptimization/V1/GcsSource.php | 71 - .../V1/InjectedSolutionConstraint.php | 156 - .../ConstraintRelaxation.php | 151 - .../ConstraintRelaxation/Relaxation.php | 204 - .../ConstraintRelaxation/Relaxation/Level.php | 83 - .../Maps/RouteOptimization/V1/InputConfig.php | 110 - .../Maps/RouteOptimization/V1/Location.php | 133 - .../V1/OptimizeToursRequest.php | 1178 --- .../V1/OptimizeToursRequest/SearchMode.php | 65 - .../V1/OptimizeToursRequest/SolvingMode.php | 84 - .../V1/OptimizeToursResponse.php | 243 - .../V1/OptimizeToursResponse/Metrics.php | 372 - .../V1/OptimizeToursValidationError.php | 316 - .../FieldReference.php | 197 - .../RouteOptimization/V1/OutputConfig.php | 111 - .../RouteOptimization/V1/RouteModifiers.php | 204 - .../Maps/RouteOptimization/V1/Shipment.php | 841 -- .../RouteOptimization/V1/Shipment/Load.php | 81 - .../V1/Shipment/VisitRequest.php | 615 -- .../RouteOptimization/V1/ShipmentModel.php | 1010 --- .../ShipmentModel/DurationDistanceMatrix.php | 137 - .../DurationDistanceMatrix/Row.php | 116 - .../V1/ShipmentModel/PrecedenceRule.php | 243 - .../RouteOptimization/V1/ShipmentRoute.php | 706 -- .../V1/ShipmentRoute/EncodedPolyline.php | 73 - .../V1/ShipmentRoute/PBBreak.php | 124 - .../V1/ShipmentRoute/Transition.php | 639 -- .../V1/ShipmentRoute/VehicleLoad.php | 80 - .../V1/ShipmentRoute/Visit.php | 433 -- .../V1/ShipmentTypeIncompatibility.php | 107 - .../IncompatibilityMode.php | 72 - .../V1/ShipmentTypeRequirement.php | 156 - .../RequirementMode.php | 80 - .../RouteOptimization/V1/SkippedShipment.php | 157 - .../V1/SkippedShipment/Reason.php | 181 - .../V1/SkippedShipment/Reason/Code.php | 115 - .../Maps/RouteOptimization/V1/TimeWindow.php | 389 - .../V1/TransitionAttributes.php | 412 - .../Maps/RouteOptimization/V1/Vehicle.php | 1423 ---- .../V1/Vehicle/DurationLimit.php | 359 - .../V1/Vehicle/LoadLimit.php | 270 - .../V1/Vehicle/LoadLimit/Interval.php | 150 - .../V1/Vehicle/TravelMode.php | 67 - .../V1/Vehicle/UnloadingPolicy.php | 68 - .../Maps/RouteOptimization/V1/Waypoint.php | 166 - .../batch_optimize_tours.php | 133 - .../optimize_tours.php | 89 - .../src/V1/Client/RouteOptimizationClient.php | 327 - .../v1/src/V1/gapic_metadata.json | 28 - .../route_optimization_client_config.json | 44 - .../route_optimization_descriptor_config.php | 59 - .../route_optimization_rest_client_config.php | 80 - .../V1/Client/RouteOptimizationClientTest.php | 327 - .../V1Beta1/MediaTranslation.php | Bin 2626 -> 0 bytes .../StreamingTranslateSpeechConfig.php | 159 - .../StreamingTranslateSpeechRequest.php | 139 - .../StreamingTranslateSpeechResponse.php | 164 - .../SpeechEventType.php | 66 - .../StreamingTranslateSpeechResult.php | 76 - .../TextTranslationResult.php | 124 - .../V1beta1/TranslateSpeechConfig.php | 308 - .../streaming_translate_speech.php | 64 - .../Client/SpeechTranslationServiceClient.php | 181 - .../SpeechTranslationServiceGapicClient.php | 258 - .../SpeechTranslationServiceClient.php | 36 - .../v1beta1/src/V1beta1/gapic_metadata.json | 23 - ...ech_translation_service_client_config.json | 49 - ..._translation_service_descriptor_config.php | 35 - ...translation_service_rest_client_config.php | 26 - .../SpeechTranslationServiceClientTest.php | 151 - .../SpeechTranslationServiceClientTest.php | 151 - .../Cloud/Memcache/V1/CloudMemcache.php | Bin 8216 -> 0 bytes .../Memcache/V1/ApplyParametersRequest.php | 168 - .../Memcache/V1/CreateInstanceRequest.php | 210 - .../Memcache/V1/DeleteInstanceRequest.php | 91 - .../Cloud/Memcache/V1/GetInstanceRequest.php | 91 - .../src/Google/Cloud/Memcache/V1/Instance.php | 809 -- .../Memcache/V1/Instance/InstanceMessage.php | 102 - .../V1/Instance/InstanceMessage/Code.php | 55 - .../Cloud/Memcache/V1/Instance/Node.php | 256 - .../Cloud/Memcache/V1/Instance/Node/State.php | 78 - .../Cloud/Memcache/V1/Instance/NodeConfig.php | 104 - .../Cloud/Memcache/V1/Instance/State.php | 86 - .../Memcache/V1/ListInstancesRequest.php | 251 - .../Memcache/V1/ListInstancesResponse.php | 151 - .../Cloud/Memcache/V1/LocationMetadata.php | 75 - .../Cloud/Memcache/V1/MaintenancePolicy.php | 201 - .../Cloud/Memcache/V1/MaintenanceSchedule.php | 169 - .../Cloud/Memcache/V1/MemcacheParameters.php | 115 - .../Cloud/Memcache/V1/MemcacheVersion.php | 52 - .../Cloud/Memcache/V1/OperationMetadata.php | 303 - .../V1/RescheduleMaintenanceRequest.php | 184 - .../RescheduleType.php | 72 - .../Memcache/V1/UpdateInstanceRequest.php | 147 - .../Memcache/V1/UpdateParametersRequest.php | 178 - .../Memcache/V1/WeeklyMaintenanceWindow.php | 155 - .../Google/Cloud/Memcache/V1/ZoneMetadata.php | 31 - .../CloudMemcacheClient/apply_parameters.php | 85 - .../CloudMemcacheClient/create_instance.php | 134 - .../CloudMemcacheClient/delete_instance.php | 82 - .../V1/CloudMemcacheClient/get_instance.php | 73 - .../V1/CloudMemcacheClient/get_location.php | 57 - .../V1/CloudMemcacheClient/list_instances.php | 78 - .../V1/CloudMemcacheClient/list_locations.php | 62 - .../reschedule_maintenance.php | 89 - .../CloudMemcacheClient/update_instance.php | 115 - .../CloudMemcacheClient/update_parameters.php | 90 - .../v1/src/V1/Client/CloudMemcacheClient.php | 587 -- .../Memcache/v1/src/V1/gapic_metadata.json | 68 - .../cloud_memcache_client_config.json | 82 - .../cloud_memcache_descriptor_config.php | 213 - .../cloud_memcache_rest_client_config.php | 200 - .../V1/Client/CloudMemcacheClientTest.php | 1284 --- .../Migrationcenter/V1/Migrationcenter.php | Bin 48680 -> 0 bytes .../V1/AddAssetsToGroupRequest.php | 257 - .../V1/AggregateAssetsValuesRequest.php | 139 - .../V1/AggregateAssetsValuesResponse.php | 67 - .../Cloud/MigrationCenter/V1/Aggregation.php | 209 - .../MigrationCenter/V1/Aggregation/Count.php | 36 - .../V1/Aggregation/Frequency.php | 36 - .../V1/Aggregation/Histogram.php | 102 - .../MigrationCenter/V1/Aggregation/Sum.php | 36 - .../MigrationCenter/V1/AggregationResult.php | 181 - .../V1/AggregationResult/Count.php | 63 - .../V1/AggregationResult/Frequency.php | 63 - .../V1/AggregationResult/Histogram.php | 86 - .../V1/AggregationResult/Histogram/Bucket.php | 141 - .../V1/AggregationResult/Sum.php | 63 - .../Google/Cloud/MigrationCenter/V1/Asset.php | 425 - .../Cloud/MigrationCenter/V1/AssetFrame.php | 263 - .../Cloud/MigrationCenter/V1/AssetList.php | 67 - .../V1/AssetPerformanceData.php | 75 - .../Cloud/MigrationCenter/V1/AssetView.php | 63 - .../V1/AwsEc2PlatformDetails.php | 101 - .../V1/AzureVmPlatformDetails.php | 135 - .../V1/BatchDeleteAssetsRequest.php | 170 - .../V1/BatchUpdateAssetsRequest.php | 122 - .../V1/BatchUpdateAssetsResponse.php | 71 - .../Cloud/MigrationCenter/V1/BiosDetails.php | 256 - .../MigrationCenter/V1/CommitmentPlan.php | 68 - .../V1/ComputeEngineMigrationTarget.php | 77 - .../V1/ComputeEnginePreferences.php | 119 - .../V1/ComputeEngineShapeDescriptor.php | 237 - .../V1/ComputeMigrationTargetProduct.php | 68 - .../V1/ComputeStorageDescriptor.php | 101 - .../MigrationCenter/V1/CpuUsageSample.php | 71 - .../MigrationCenter/V1/CreateGroupRequest.php | 257 - .../V1/CreateImportDataFileRequest.php | 237 - .../V1/CreateImportJobRequest.php | 237 - .../V1/CreatePreferenceSetRequest.php | 262 - .../V1/CreateReportConfigRequest.php | 257 - .../V1/CreateReportRequest.php | 257 - .../V1/CreateSourceRequest.php | 257 - .../V1/DailyResourceUsageAggregation.php | 253 - .../V1/DailyResourceUsageAggregation/CPU.php | 80 - .../V1/DailyResourceUsageAggregation/Disk.php | 80 - .../DailyResourceUsageAggregation/Memory.php | 80 - .../DailyResourceUsageAggregation/Network.php | 124 - .../DailyResourceUsageAggregation/Stats.php | 172 - .../MigrationCenter/V1/DeleteAssetRequest.php | 155 - .../MigrationCenter/V1/DeleteGroupRequest.php | 155 - .../V1/DeleteImportDataFileRequest.php | 155 - .../V1/DeleteImportJobRequest.php | 197 - .../V1/DeletePreferenceSetRequest.php | 155 - .../V1/DeleteReportConfigRequest.php | 197 - .../V1/DeleteReportRequest.php | 155 - .../V1/DeleteSourceRequest.php | 155 - .../Cloud/MigrationCenter/V1/DiskEntry.php | 323 - .../V1/DiskEntry/InterfaceType.php | 99 - .../MigrationCenter/V1/DiskEntryList.php | 67 - .../MigrationCenter/V1/DiskPartition.php | 281 - .../MigrationCenter/V1/DiskPartitionList.php | 67 - .../MigrationCenter/V1/DiskUsageSample.php | 67 - .../Cloud/MigrationCenter/V1/ErrorFrame.php | 189 - .../MigrationCenter/V1/ErrorFrameView.php | 62 - .../MigrationCenter/V1/ExecutionReport.php | 145 - .../V1/FileValidationReport.php | 173 - .../MigrationCenter/V1/FitDescriptor.php | 67 - .../V1/FitDescriptor/FitLevel.php | 71 - .../V1/FrameViolationEntry.php | 102 - .../Cloud/MigrationCenter/V1/Frames.php | 67 - .../Cloud/MigrationCenter/V1/FstabEntry.php | 241 - .../MigrationCenter/V1/FstabEntryList.php | 67 - .../MigrationCenter/V1/GenericInsight.php | 155 - .../V1/GenericPlatformDetails.php | 75 - .../MigrationCenter/V1/GetAssetRequest.php | 115 - .../V1/GetErrorFrameRequest.php | 127 - .../MigrationCenter/V1/GetGroupRequest.php | 81 - .../V1/GetImportDataFileRequest.php | 81 - .../V1/GetImportJobRequest.php | 119 - .../V1/GetPreferenceSetRequest.php | 81 - .../V1/GetReportConfigRequest.php | 81 - .../MigrationCenter/V1/GetReportRequest.php | 115 - .../MigrationCenter/V1/GetSettingsRequest.php | 81 - .../MigrationCenter/V1/GetSourceRequest.php | 81 - .../Google/Cloud/MigrationCenter/V1/Group.php | 260 - .../MigrationCenter/V1/GuestConfigDetails.php | 233 - .../V1/GuestConfigDetails/SeLinuxMode.php | 71 - .../V1/GuestInstalledApplication.php | 213 - .../V1/GuestInstalledApplicationList.php | 67 - .../MigrationCenter/V1/GuestOsDetails.php | 223 - .../V1/GuestRuntimeDetails.php | 365 - .../Cloud/MigrationCenter/V1/HostsEntry.php | 101 - .../MigrationCenter/V1/HostsEntryList.php | 67 - .../MigrationCenter/V1/ImportDataFile.php | 255 - .../V1/ImportDataFile/State.php | 64 - .../Cloud/MigrationCenter/V1/ImportError.php | 102 - .../V1/ImportError/Severity.php | 63 - .../Cloud/MigrationCenter/V1/ImportJob.php | 410 - .../V1/ImportJob/ImportJobState.php | 99 - .../MigrationCenter/V1/ImportJobFormat.php | 88 - .../MigrationCenter/V1/ImportJobView.php | 64 - .../MigrationCenter/V1/ImportRowError.php | 174 - .../Cloud/MigrationCenter/V1/Insight.php | 108 - .../Cloud/MigrationCenter/V1/InsightList.php | 111 - .../Cloud/MigrationCenter/V1/LicenseType.php | 63 - .../MigrationCenter/V1/ListAssetsRequest.php | 255 - .../MigrationCenter/V1/ListAssetsResponse.php | 135 - .../V1/ListErrorFramesRequest.php | 191 - .../V1/ListErrorFramesResponse.php | 135 - .../MigrationCenter/V1/ListGroupsRequest.php | 221 - .../MigrationCenter/V1/ListGroupsResponse.php | 135 - .../V1/ListImportDataFilesRequest.php | 241 - .../V1/ListImportDataFilesResponse.php | 139 - .../V1/ListImportJobsRequest.php | 259 - .../V1/ListImportJobsResponse.php | 135 - .../V1/ListPreferenceSetsRequest.php | 191 - .../V1/ListPreferenceSetsResponse.php | 135 - .../V1/ListReportConfigsRequest.php | 221 - .../V1/ListReportConfigsResponse.php | 135 - .../MigrationCenter/V1/ListReportsRequest.php | 255 - .../V1/ListReportsResponse.php | 135 - .../MigrationCenter/V1/ListSourcesRequest.php | 221 - .../V1/ListSourcesResponse.php | 135 - .../V1/MachineArchitectureDetails.php | 315 - .../CpuHyperThreading.php | 64 - .../FirmwareType.php | 64 - .../MigrationCenter/V1/MachineDetails.php | 467 -- .../V1/MachineDetails/PowerState.php | 94 - .../MigrationCenter/V1/MachineDiskDetails.php | 145 - .../V1/MachineNetworkDetails.php | 183 - .../MigrationCenter/V1/MachinePreferences.php | 73 - .../MigrationCenter/V1/MachineSeries.php | 75 - .../MigrationCenter/V1/MemoryUsageSample.php | 67 - .../MigrationCenter/V1/MigrationInsight.php | 123 - .../V1/NetworkAdapterDetails.php | 145 - .../MigrationCenter/V1/NetworkAdapterList.php | 67 - .../MigrationCenter/V1/NetworkAddress.php | 203 - .../V1/NetworkAddress/AddressAssignment.php | 64 - .../MigrationCenter/V1/NetworkAddressList.php | 67 - .../MigrationCenter/V1/NetworkConnection.php | 303 - .../V1/NetworkConnection/State.php | 85 - .../V1/NetworkConnectionList.php | 67 - .../MigrationCenter/V1/NetworkUsageSample.php | 109 - .../Cloud/MigrationCenter/V1/NfsExport.php | 101 - .../MigrationCenter/V1/NfsExportList.php | 67 - .../MigrationCenter/V1/OpenFileDetails.php | 169 - .../Cloud/MigrationCenter/V1/OpenFileList.php | 67 - .../V1/OperatingSystemFamily.php | 66 - .../MigrationCenter/V1/OperationMetadata.php | 307 - .../MigrationCenter/V1/PerformanceSample.php | 257 - .../MigrationCenter/V1/PersistentDiskType.php | 70 - .../V1/PhysicalPlatformDetails.php | 75 - .../MigrationCenter/V1/PlatformDetails.php | 207 - .../MigrationCenter/V1/PreferenceSet.php | 267 - .../MigrationCenter/V1/RegionPreferences.php | 83 - .../V1/RemoveAssetsFromGroupRequest.php | 253 - .../Cloud/MigrationCenter/V1/Report.php | 335 - .../Cloud/MigrationCenter/V1/Report/State.php | 71 - .../Cloud/MigrationCenter/V1/Report/Type.php | 57 - .../V1/ReportAssetFramesRequest.php | 145 - .../V1/ReportAssetFramesResponse.php | 33 - .../Cloud/MigrationCenter/V1/ReportConfig.php | 258 - .../GroupPreferenceSetAssignment.php | 104 - .../MigrationCenter/V1/ReportSummary.php | 112 - .../V1/ReportSummary/AssetAggregateStats.php | 436 -- .../V1/ReportSummary/ChartData.php | 78 - .../V1/ReportSummary/ChartData/DataPoint.php | 104 - .../V1/ReportSummary/ComputeEngineFinding.php | 172 - .../V1/ReportSummary/GroupFinding.php | 221 - .../GroupPreferenceSetFinding.php | 544 -- .../V1/ReportSummary/HistogramChartData.php | 87 - .../HistogramChartData/Bucket.php | 141 - .../ReportSummary/MachineSeriesAllocation.php | 115 - .../V1/ReportSummary/SoleTenantFinding.php | 138 - .../SoleTenantNodeAllocation.php | 148 - .../V1/ReportSummary/UtilizationChartData.php | 105 - .../V1/ReportSummary/VmwareEngineFinding.php | 138 - .../V1/ReportSummary/VmwareNode.php | 78 - .../V1/ReportSummary/VmwareNodeAllocation.php | 148 - .../Cloud/MigrationCenter/V1/ReportView.php | 73 - .../V1/RunImportJobRequest.php | 155 - .../MigrationCenter/V1/RunningProcess.php | 203 - .../MigrationCenter/V1/RunningProcessList.php | 67 - .../MigrationCenter/V1/RunningService.php | 237 - .../V1/RunningService/StartMode.php | 85 - .../V1/RunningService/State.php | 71 - .../MigrationCenter/V1/RunningServiceList.php | 67 - .../MigrationCenter/V1/RuntimeNetworkInfo.php | 121 - .../Cloud/MigrationCenter/V1/Settings.php | 101 - .../V1/SizingOptimizationStrategy.php | 74 - .../V1/SoleTenancyPreferences.php | 189 - .../SoleTenancyPreferences/CommitmentPlan.php | 71 - .../HostMaintenancePolicy.php | 71 - .../MigrationCenter/V1/SoleTenantNodeType.php | 71 - .../Cloud/MigrationCenter/V1/Source.php | 436 -- .../MigrationCenter/V1/Source/SourceType.php | 76 - .../Cloud/MigrationCenter/V1/Source/State.php | 72 - .../MigrationCenter/V1/UpdateAssetRequest.php | 235 - .../MigrationCenter/V1/UpdateGroupRequest.php | 230 - .../V1/UpdateImportJobRequest.php | 235 - .../V1/UpdatePreferenceSetRequest.php | 235 - .../V1/UpdateSettingsRequest.php | 235 - .../V1/UpdateSourceRequest.php | 235 - .../MigrationCenter/V1/UploadFileInfo.php | 145 - .../V1/ValidateImportJobRequest.php | 155 - .../MigrationCenter/V1/ValidationReport.php | 101 - .../V1/VirtualMachinePreferences.php | 366 - .../MigrationCenter/V1/VmwareDiskConfig.php | 169 - .../V1/VmwareDiskConfig/BackingType.php | 106 - .../V1/VmwareDiskConfig/RdmCompatibility.php | 64 - .../V1/VmwareDiskConfig/VmdkMode.php | 71 - .../V1/VmwareEnginePreferences.php | 217 - .../CommitmentPlan.php | 85 - .../V1/VmwarePlatformDetails.php | 241 - .../add_assets_to_group.php | 97 - .../aggregate_assets_values.php | 70 - .../batch_delete_assets.php | 76 - .../batch_update_assets.php | 81 - .../V1/MigrationCenterClient/create_group.php | 92 - .../create_import_data_file.php | 95 - .../create_import_job.php | 99 - .../create_preference_set.php | 93 - .../MigrationCenterClient/create_report.php | 96 - .../create_report_config.php | 121 - .../MigrationCenterClient/create_source.php | 92 - .../V1/MigrationCenterClient/delete_asset.php | 69 - .../V1/MigrationCenterClient/delete_group.php | 80 - .../delete_import_data_file.php | 85 - .../delete_import_job.php | 80 - .../delete_preference_set.php | 84 - .../MigrationCenterClient/delete_report.php | 85 - .../delete_report_config.php | 84 - .../MigrationCenterClient/delete_source.php | 80 - .../V1/MigrationCenterClient/get_asset.php | 71 - .../MigrationCenterClient/get_error_frame.php | 78 - .../V1/MigrationCenterClient/get_group.php | 71 - .../get_import_data_file.php | 76 - .../MigrationCenterClient/get_import_job.php | 71 - .../V1/MigrationCenterClient/get_location.php | 57 - .../get_preference_set.php | 75 - .../V1/MigrationCenterClient/get_report.php | 76 - .../get_report_config.php | 75 - .../V1/MigrationCenterClient/get_settings.php | 71 - .../V1/MigrationCenterClient/get_source.php | 71 - .../V1/MigrationCenterClient/list_assets.php | 76 - .../list_error_frames.php | 76 - .../V1/MigrationCenterClient/list_groups.php | 76 - .../list_import_data_files.php | 76 - .../list_import_jobs.php | 76 - .../MigrationCenterClient/list_locations.php | 62 - .../list_preference_sets.php | 76 - .../list_report_configs.php | 76 - .../V1/MigrationCenterClient/list_reports.php | 80 - .../V1/MigrationCenterClient/list_sources.php | 76 - .../remove_assets_from_group.php | 97 - .../report_asset_frames.php | 74 - .../MigrationCenterClient/run_import_job.php | 80 - .../V1/MigrationCenterClient/update_asset.php | 62 - .../V1/MigrationCenterClient/update_group.php | 74 - .../update_import_job.php | 92 - .../update_preference_set.php | 74 - .../MigrationCenterClient/update_settings.php | 74 - .../MigrationCenterClient/update_source.php | 74 - .../validate_import_job.php | 80 - .../src/V1/Client/MigrationCenterClient.php | 1883 ----- .../v1/src/V1/gapic_metadata.json | 268 - .../migration_center_client_config.json | 292 - .../migration_center_descriptor_config.php | 890 --- .../migration_center_rest_client_config.php | 694 -- .../V1/Client/MigrationCenterClientTest.php | 5105 ------------ .../Google/Monitoring/V3/Alert.php | Bin 6219 -> 0 bytes .../Google/Monitoring/V3/AlertService.php | 64 - .../Google/Monitoring/V3/Common.php | Bin 2539 -> 0 bytes .../Google/Monitoring/V3/DroppedLabels.php | 33 - .../Google/Monitoring/V3/Group.php | 37 - .../Google/Monitoring/V3/GroupService.php | Bin 3723 -> 0 bytes .../Google/Monitoring/V3/Metric.php | Bin 2648 -> 0 bytes .../Google/Monitoring/V3/MetricService.php | Bin 7118 -> 0 bytes .../Google/Monitoring/V3/MutationRecord.php | 32 - .../Google/Monitoring/V3/Notification.php | Bin 2943 -> 0 bytes .../Monitoring/V3/NotificationService.php | 97 - .../Google/Monitoring/V3/QueryService.php | 32 - .../Google/Monitoring/V3/Service.php | Bin 5715 -> 0 bytes .../Google/Monitoring/V3/ServiceService.php | 95 - .../Google/Monitoring/V3/Snooze.php | 39 - .../Google/Monitoring/V3/SnoozeService.php | 56 - .../Google/Monitoring/V3/SpanContext.php | 29 - .../Google/Monitoring/V3/Uptime.php | Bin 6049 -> 0 bytes .../Google/Monitoring/V3/UptimeService.php | 72 - .../Cloud/Monitoring/V3/Aggregation.php | 389 - .../Monitoring/V3/Aggregation/Aligner.php | 269 - .../Monitoring/V3/Aggregation/Reducer.php | 191 - .../Cloud/Monitoring/V3/AlertPolicy.php | 805 -- .../V3/AlertPolicy/AlertStrategy.php | 217 - .../NotificationChannelStrategy.php | 139 - .../AlertStrategy/NotificationPrompt.php | 64 - .../AlertStrategy/NotificationRateLimit.php | 81 - .../Monitoring/V3/AlertPolicy/Condition.php | 373 - .../Condition/EvaluationMissingData.php | 76 - .../V3/AlertPolicy/Condition/LogMatch.php | 151 - .../AlertPolicy/Condition/MetricAbsence.php | 304 - .../AlertPolicy/Condition/MetricThreshold.php | 635 -- .../MetricThreshold/ForecastOptions.php | 101 - .../MonitoringQueryLanguageCondition.php | 257 - .../PrometheusQueryLanguageCondition.php | 433 -- .../V3/AlertPolicy/Condition/Trigger.php | 118 - .../V3/AlertPolicy/ConditionCombinerType.php | 81 - .../V3/AlertPolicy/Documentation.php | 245 - .../V3/AlertPolicy/Documentation/Link.php | 124 - .../Monitoring/V3/AlertPolicy/Severity.php | 75 - .../Google/Cloud/Monitoring/V3/BasicSli.php | 269 - .../V3/BasicSli/AvailabilityCriteria.php | 36 - .../V3/BasicSli/LatencyCriteria.php | 84 - .../Cloud/Monitoring/V3/ComparisonType.php | 90 - .../V3/CreateAlertPolicyRequest.php | 188 - .../Monitoring/V3/CreateGroupRequest.php | 181 - .../V3/CreateMetricDescriptorRequest.php | 151 - .../V3/CreateNotificationChannelRequest.php | 163 - .../V3/CreateServiceLevelObjectiveRequest.php | 185 - .../Monitoring/V3/CreateServiceRequest.php | 180 - .../Monitoring/V3/CreateSnoozeRequest.php | 149 - .../Monitoring/V3/CreateTimeSeriesError.php | 135 - .../Monitoring/V3/CreateTimeSeriesRequest.php | 159 - .../Monitoring/V3/CreateTimeSeriesSummary.php | 135 - .../V3/CreateTimeSeriesSummary/Error.php | 114 - .../V3/CreateUptimeCheckConfigRequest.php | 142 - .../V3/DeleteAlertPolicyRequest.php | 93 - .../Monitoring/V3/DeleteGroupRequest.php | 130 - .../V3/DeleteMetricDescriptorRequest.php | 103 - .../V3/DeleteNotificationChannelRequest.php | 138 - .../V3/DeleteServiceLevelObjectiveRequest.php | 92 - .../Monitoring/V3/DeleteServiceRequest.php | 87 - .../V3/DeleteUptimeCheckConfigRequest.php | 87 - .../Cloud/Monitoring/V3/DistributionCut.php | 127 - .../Cloud/Monitoring/V3/DroppedLabels.php | 80 - .../Monitoring/V3/GetAlertPolicyRequest.php | 87 - .../Cloud/Monitoring/V3/GetGroupRequest.php | 87 - .../V3/GetMetricDescriptorRequest.php | 103 - .../GetMonitoredResourceDescriptorRequest.php | 98 - ...etNotificationChannelDescriptorRequest.php | 87 - .../V3/GetNotificationChannelRequest.php | 87 - ...ficationChannelVerificationCodeRequest.php | 167 - ...icationChannelVerificationCodeResponse.php | 131 - .../V3/GetServiceLevelObjectiveRequest.php | 138 - .../Cloud/Monitoring/V3/GetServiceRequest.php | 87 - .../Cloud/Monitoring/V3/GetSnoozeRequest.php | 88 - .../V3/GetUptimeCheckConfigRequest.php | 87 - .../src/Google/Cloud/Monitoring/V3/Group.php | 257 - .../Cloud/Monitoring/V3/GroupResourceType.php | 66 - .../Cloud/Monitoring/V3/InternalChecker.php | 271 - .../Monitoring/V3/InternalChecker/State.php | 74 - .../Google/Cloud/Monitoring/V3/LabelValue.php | 141 - .../V3/ListAlertPoliciesRequest.php | 298 - .../V3/ListAlertPoliciesResponse.php | 147 - .../Monitoring/V3/ListGroupMembersRequest.php | 277 - .../V3/ListGroupMembersResponse.php | 143 - .../Cloud/Monitoring/V3/ListGroupsRequest.php | 316 - .../Monitoring/V3/ListGroupsResponse.php | 109 - .../V3/ListMetricDescriptorsRequest.php | 238 - .../V3/ListMetricDescriptorsResponse.php | 113 - ...istMonitoredResourceDescriptorsRequest.php | 222 - ...stMonitoredResourceDescriptorsResponse.php | 113 - ...tNotificationChannelDescriptorsRequest.php | 206 - ...NotificationChannelDescriptorsResponse.php | 117 - .../V3/ListNotificationChannelsRequest.php | 307 - .../V3/ListNotificationChannelsResponse.php | 151 - .../V3/ListServiceLevelObjectivesRequest.php | 257 - .../V3/ListServiceLevelObjectivesResponse.php | 109 - .../Monitoring/V3/ListServicesRequest.php | 275 - .../Monitoring/V3/ListServicesResponse.php | 109 - .../Monitoring/V3/ListSnoozesRequest.php | 252 - .../Monitoring/V3/ListSnoozesResponse.php | 106 - .../Monitoring/V3/ListTimeSeriesRequest.php | 501 -- .../ListTimeSeriesRequest/TimeSeriesView.php | 59 - .../Monitoring/V3/ListTimeSeriesResponse.php | 201 - .../V3/ListUptimeCheckConfigsRequest.php | 230 - .../V3/ListUptimeCheckConfigsResponse.php | 155 - .../V3/ListUptimeCheckIpsRequest.php | 129 - .../V3/ListUptimeCheckIpsResponse.php | 125 - .../Cloud/Monitoring/V3/MutationRecord.php | 111 - .../Monitoring/V3/NotificationChannel.php | 594 -- .../VerificationStatus.php | 76 - .../V3/NotificationChannelDescriptor.php | 326 - .../src/Google/Cloud/Monitoring/V3/Point.php | 153 - .../Google/Cloud/Monitoring/V3/QueryError.php | 115 - .../Cloud/Monitoring/V3/QueryErrorList.php | 105 - .../Monitoring/V3/QueryTimeSeriesRequest.php | 197 - .../Monitoring/V3/QueryTimeSeriesResponse.php | 195 - .../src/Google/Cloud/Monitoring/V3/Range.php | 101 - .../Cloud/Monitoring/V3/RequestBasedSli.php | 121 - ...ficationChannelVerificationCodeRequest.php | 81 - .../Google/Cloud/Monitoring/V3/Service.php | 608 -- .../Cloud/Monitoring/V3/Service/AppEngine.php | 78 - .../Monitoring/V3/Service/BasicService.php | 130 - .../Monitoring/V3/Service/CloudEndpoints.php | 78 - .../Cloud/Monitoring/V3/Service/CloudRun.php | 120 - .../Monitoring/V3/Service/ClusterIstio.php | 198 - .../Cloud/Monitoring/V3/Service/Custom.php | 38 - .../Monitoring/V3/Service/GkeNamespace.php | 182 - .../Monitoring/V3/Service/GkeService.php | 219 - .../Monitoring/V3/Service/GkeWorkload.php | 250 - .../V3/Service/IstioCanonicalService.php | 171 - .../Cloud/Monitoring/V3/Service/MeshIstio.php | 151 - .../Cloud/Monitoring/V3/Service/Telemetry.php | 74 - .../Monitoring/V3/ServiceLevelIndicator.php | 153 - .../Monitoring/V3/ServiceLevelObjective.php | 338 - .../V3/ServiceLevelObjective/View.php | 71 - .../Cloud/Monitoring/V3/ServiceTier.php | 74 - .../src/Google/Cloud/Monitoring/V3/Snooze.php | 224 - .../Cloud/Monitoring/V3/Snooze/Criteria.php | 88 - .../Cloud/Monitoring/V3/SpanContext.php | 91 - .../Monitoring/V3/SyntheticMonitorTarget.php | 75 - .../CloudFunctionV2Target.php | 134 - .../Cloud/Monitoring/V3/TextLocator.php | 303 - .../Monitoring/V3/TextLocator/Position.php | 108 - .../Cloud/Monitoring/V3/TimeInterval.php | 165 - .../Google/Cloud/Monitoring/V3/TimeSeries.php | 404 - .../Cloud/Monitoring/V3/TimeSeriesData.php | 114 - .../V3/TimeSeriesData/PointData.php | 116 - .../Monitoring/V3/TimeSeriesDescriptor.php | 101 - .../TimeSeriesDescriptor/ValueDescriptor.php | 184 - .../Cloud/Monitoring/V3/TimeSeriesRatio.php | 180 - .../Google/Cloud/Monitoring/V3/TypedValue.php | 213 - .../V3/UpdateAlertPolicyRequest.php | 239 - .../Monitoring/V3/UpdateGroupRequest.php | 134 - .../V3/UpdateNotificationChannelRequest.php | 151 - .../V3/UpdateServiceLevelObjectiveRequest.php | 139 - .../Monitoring/V3/UpdateServiceRequest.php | 139 - .../Monitoring/V3/UpdateSnoozeRequest.php | 227 - .../V3/UpdateUptimeCheckConfigRequest.php | 192 - .../Cloud/Monitoring/V3/UptimeCheckConfig.php | 748 -- .../V3/UptimeCheckConfig/CheckerType.php | 69 - .../V3/UptimeCheckConfig/ContentMatcher.php | 158 - .../ContentMatcher/ContentMatcherOption.php | 107 - .../ContentMatcher/JsonPathMatcher.php | 114 - .../JsonPathMatcher/JsonPathMatcherOption.php | 68 - .../V3/UptimeCheckConfig/HttpCheck.php | 730 -- .../HttpCheck/BasicAuthentication.php | 107 - .../HttpCheck/ContentType.php | 67 - .../HttpCheck/RequestMethod.php | 64 - .../HttpCheck/ResponseStatusCode.php | 112 - .../ResponseStatusCode/StatusClass.php | 92 - .../HttpCheck/ServiceAgentAuthentication.php | 74 - .../ServiceAgentAuthenticationType.php | 57 - .../V3/UptimeCheckConfig/PingConfig.php | 72 - .../V3/UptimeCheckConfig/ResourceGroup.php | 113 - .../V3/UptimeCheckConfig/TcpCheck.php | 122 - .../Cloud/Monitoring/V3/UptimeCheckIp.php | 160 - .../Cloud/Monitoring/V3/UptimeCheckRegion.php | 102 - .../V3/VerifyNotificationChannelRequest.php | 147 - .../Cloud/Monitoring/V3/WindowsBasedSli.php | 236 - .../V3/WindowsBasedSli/MetricRange.php | 125 - .../WindowsBasedSli/PerformanceThreshold.php | 146 - .../create_alert_policy.php | 88 - .../delete_alert_policy.php | 77 - .../get_alert_policy.php | 73 - .../list_alert_policies.php | 85 - .../update_alert_policy.php | 66 - .../V3/GroupServiceClient/create_group.php | 76 - .../V3/GroupServiceClient/delete_group.php | 71 - .../V3/GroupServiceClient/get_group.php | 73 - .../GroupServiceClient/list_group_members.php | 78 - .../V3/GroupServiceClient/list_groups.php | 79 - .../V3/GroupServiceClient/update_group.php | 60 - .../create_metric_descriptor.php | 81 - .../create_service_time_series.php | 84 - .../create_time_series.php | 82 - .../delete_metric_descriptor.php | 77 - .../get_metric_descriptor.php | 77 - .../get_monitored_resource_descriptor.php | 79 - .../list_metric_descriptors.php | 79 - .../list_monitored_resource_descriptors.php | 79 - .../MetricServiceClient/list_time_series.php | 99 - .../create_notification_channel.php | 87 - .../delete_notification_channel.php | 79 - .../get_notification_channel.php | 80 - .../get_notification_channel_descriptor.php | 77 - ...notification_channel_verification_code.php | 96 - .../list_notification_channel_descriptors.php | 86 - .../list_notification_channels.php | 88 - ...notification_channel_verification_code.php | 73 - .../update_notification_channel.php | 65 - .../verify_notification_channel.php | 85 - .../QueryServiceClient/query_time_series.php | 84 - .../create_service.php | 76 - .../create_service_level_objective.php | 75 - .../delete_service.php | 71 - .../delete_service_level_objective.php | 76 - .../get_service.php | 73 - .../get_service_level_objective.php | 78 - .../list_service_level_objectives.php | 80 - .../list_services.php | 80 - .../update_service.php | 59 - .../update_service_level_objective.php | 59 - .../V3/SnoozeServiceClient/create_snooze.php | 89 - .../V3/SnoozeServiceClient/get_snooze.php | 73 - .../V3/SnoozeServiceClient/list_snoozes.php | 81 - .../V3/SnoozeServiceClient/update_snooze.php | 83 - .../create_uptime_check_config.php | 76 - .../delete_uptime_check_config.php | 76 - .../get_uptime_check_config.php | 76 - .../list_uptime_check_configs.php | 80 - .../list_uptime_check_ips.php | 62 - .../update_uptime_check_config.php | 62 - .../v3/src/V3/AlertPolicyServiceClient.php | 34 - .../V3/Client/AlertPolicyServiceClient.php | 511 -- .../v3/src/V3/Client/GroupServiceClient.php | 448 -- .../v3/src/V3/Client/MetricServiceClient.php | 679 -- .../NotificationChannelServiceClient.php | 683 -- .../v3/src/V3/Client/QueryServiceClient.php | 197 - .../Client/ServiceMonitoringServiceClient.php | 639 -- .../v3/src/V3/Client/SnoozeServiceClient.php | 438 -- .../V3/Client/UptimeCheckServiceClient.php | 475 -- .../Gapic/AlertPolicyServiceGapicClient.php | 806 -- .../src/V3/Gapic/GroupServiceGapicClient.php | 752 -- .../src/V3/Gapic/MetricServiceGapicClient.php | 1178 --- .../NotificationChannelServiceGapicClient.php | 1075 --- .../src/V3/Gapic/QueryServiceGapicClient.php | 256 - .../ServiceMonitoringServiceGapicClient.php | 1044 --- .../src/V3/Gapic/SnoozeServiceGapicClient.php | 680 -- .../Gapic/UptimeCheckServiceGapicClient.php | 724 -- .../v3/src/V3/GroupServiceClient.php | 34 - .../v3/src/V3/MetricServiceClient.php | 34 - .../V3/NotificationChannelServiceClient.php | 34 - .../v3/src/V3/QueryServiceClient.php | 34 - .../src/V3/ServiceMonitoringServiceClient.php | 34 - .../v3/src/V3/SnoozeServiceClient.php | 34 - .../v3/src/V3/UptimeCheckServiceClient.php | 34 - .../Monitoring/v3/src/V3/gapic_metadata.json | 336 - .../alert_policy_service_client_config.json | 69 - ...alert_policy_service_descriptor_config.php | 107 - ...lert_policy_service_rest_client_config.php | 87 - .../group_service_client_config.json | 86 - .../group_service_descriptor_config.php | 123 - .../group_service_rest_client_config.php | 98 - .../metric_service_client_config.json | 101 - .../metric_service_descriptor_config.php | 174 - .../metric_service_rest_client_config.php | 156 - ...ication_channel_service_client_config.json | 94 - ...tion_channel_service_descriptor_config.php | 175 - ...ion_channel_service_rest_client_config.php | 145 - .../query_service_client_config.json | 27 - .../query_service_descriptor_config.php | 48 - .../query_service_rest_client_config.php | 41 - ...vice_monitoring_service_client_config.json | 94 - ...e_monitoring_service_descriptor_config.php | 176 - ..._monitoring_service_rest_client_config.php | 145 - .../snooze_service_client_config.json | 64 - .../snooze_service_descriptor_config.php | 94 - .../snooze_service_rest_client_config.php | 79 - .../uptime_check_service_client_config.json | 74 - ...uptime_check_service_descriptor_config.php | 116 - ...ptime_check_service_rest_client_config.php | 91 - .../Unit/V3/AlertPolicyServiceClientTest.php | 380 - .../Client/AlertPolicyServiceClientTest.php | 442 -- .../Unit/V3/Client/GroupServiceClientTest.php | 541 -- .../V3/Client/MetricServiceClientTest.php | 769 -- .../NotificationChannelServiceClientTest.php | 809 -- .../Unit/V3/Client/QueryServiceClientTest.php | 182 - .../ServiceMonitoringServiceClientTest.php | 790 -- .../V3/Client/SnoozeServiceClientTest.php | 416 - .../Client/UptimeCheckServiceClientTest.php | 517 -- .../tests/Unit/V3/GroupServiceClientTest.php | 468 -- .../tests/Unit/V3/MetricServiceClientTest.php | 672 -- .../NotificationChannelServiceClientTest.php | 716 -- .../tests/Unit/V3/QueryServiceClientTest.php | 134 - .../V3/ServiceMonitoringServiceClientTest.php | 701 -- .../tests/Unit/V3/SnoozeServiceClientTest.php | 351 - .../Unit/V3/UptimeCheckServiceClientTest.php | 450 -- .../Cloud/Netapp/V1/ActiveDirectory.php | Bin 3025 -> 0 bytes .../Google/Cloud/Netapp/V1/Backup.php | Bin 2667 -> 0 bytes .../Google/Cloud/Netapp/V1/BackupPolicy.php | Bin 2776 -> 0 bytes .../Google/Cloud/Netapp/V1/BackupVault.php | Bin 2445 -> 0 bytes .../Cloud/Netapp/V1/CloudNetappService.php | 144 - .../Google/Cloud/Netapp/V1/Common.php | Bin 1126 -> 0 bytes .../Google/Cloud/Netapp/V1/Kms.php | Bin 2847 -> 0 bytes .../Google/Cloud/Netapp/V1/Replication.php | Bin 5576 -> 0 bytes .../Google/Cloud/Netapp/V1/Snapshot.php | Bin 2434 -> 0 bytes .../Google/Cloud/Netapp/V1/StoragePool.php | Bin 3337 -> 0 bytes .../Google/Cloud/Netapp/V1/Volume.php | Bin 7713 -> 0 bytes .../src/Google/Cloud/NetApp/V1/AccessType.php | 68 - .../Cloud/NetApp/V1/ActiveDirectory.php | 827 -- .../Cloud/NetApp/V1/ActiveDirectory/State.php | 99 - .../src/Google/Cloud/NetApp/V1/Backup.php | 441 -- .../Google/Cloud/NetApp/V1/Backup/State.php | 96 - .../Google/Cloud/NetApp/V1/Backup/Type.php | 64 - .../Google/Cloud/NetApp/V1/BackupConfig.php | 209 - .../Google/Cloud/NetApp/V1/BackupPolicy.php | 471 -- .../Cloud/NetApp/V1/BackupPolicy/State.php | 83 - .../Google/Cloud/NetApp/V1/BackupVault.php | 221 - .../Cloud/NetApp/V1/BackupVault/State.php | 85 - .../V1/CreateActiveDirectoryRequest.php | 178 - .../NetApp/V1/CreateBackupPolicyRequest.php | 188 - .../Cloud/NetApp/V1/CreateBackupRequest.php | 188 - .../NetApp/V1/CreateBackupVaultRequest.php | 188 - .../NetApp/V1/CreateKmsConfigRequest.php | 178 - .../NetApp/V1/CreateReplicationRequest.php | 183 - .../Cloud/NetApp/V1/CreateSnapshotRequest.php | 183 - .../NetApp/V1/CreateStoragePoolRequest.php | 178 - .../Cloud/NetApp/V1/CreateVolumeRequest.php | 178 - .../Google/Cloud/NetApp/V1/DailySchedule.php | 169 - .../V1/DeleteActiveDirectoryRequest.php | 81 - .../NetApp/V1/DeleteBackupPolicyRequest.php | 86 - .../Cloud/NetApp/V1/DeleteBackupRequest.php | 86 - .../NetApp/V1/DeleteBackupVaultRequest.php | 86 - .../NetApp/V1/DeleteKmsConfigRequest.php | 81 - .../NetApp/V1/DeleteReplicationRequest.php | 86 - .../Cloud/NetApp/V1/DeleteSnapshotRequest.php | 86 - .../NetApp/V1/DeleteStoragePoolRequest.php | 81 - .../Cloud/NetApp/V1/DeleteVolumeRequest.php | 123 - .../NetApp/V1/DestinationVolumeParameters.php | 240 - .../Cloud/NetApp/V1/EncryptVolumesRequest.php | 67 - .../Google/Cloud/NetApp/V1/EncryptionType.php | 61 - .../NetApp/V1/EstablishPeeringRequest.php | 220 - .../Google/Cloud/NetApp/V1/ExportPolicy.php | 67 - .../NetApp/V1/GetActiveDirectoryRequest.php | 81 - .../NetApp/V1/GetBackupPolicyRequest.php | 86 - .../Cloud/NetApp/V1/GetBackupRequest.php | 86 - .../Cloud/NetApp/V1/GetBackupVaultRequest.php | 86 - .../Cloud/NetApp/V1/GetKmsConfigRequest.php | 81 - .../Cloud/NetApp/V1/GetReplicationRequest.php | 86 - .../Cloud/NetApp/V1/GetSnapshotRequest.php | 86 - .../Cloud/NetApp/V1/GetStoragePoolRequest.php | 81 - .../Cloud/NetApp/V1/GetVolumeRequest.php | 81 - .../Google/Cloud/NetApp/V1/HourlySchedule.php | 125 - .../Cloud/NetApp/V1/HybridPeeringDetails.php | 187 - .../NetApp/V1/HybridReplicationParameters.php | 329 - .../src/Google/Cloud/NetApp/V1/KmsConfig.php | 361 - .../Cloud/NetApp/V1/KmsConfig/State.php | 129 - .../V1/ListActiveDirectoriesRequest.php | 221 - .../V1/ListActiveDirectoriesResponse.php | 135 - .../NetApp/V1/ListBackupPoliciesRequest.php | 221 - .../NetApp/V1/ListBackupPoliciesResponse.php | 135 - .../NetApp/V1/ListBackupVaultsRequest.php | 231 - .../NetApp/V1/ListBackupVaultsResponse.php | 139 - .../Cloud/NetApp/V1/ListBackupsRequest.php | 281 - .../Cloud/NetApp/V1/ListBackupsResponse.php | 139 - .../Cloud/NetApp/V1/ListKmsConfigsRequest.php | 221 - .../NetApp/V1/ListKmsConfigsResponse.php | 135 - .../NetApp/V1/ListReplicationsRequest.php | 231 - .../NetApp/V1/ListReplicationsResponse.php | 139 - .../Cloud/NetApp/V1/ListSnapshotsRequest.php | 231 - .../Cloud/NetApp/V1/ListSnapshotsResponse.php | 139 - .../NetApp/V1/ListStoragePoolsRequest.php | 225 - .../NetApp/V1/ListStoragePoolsResponse.php | 135 - .../Cloud/NetApp/V1/ListVolumesRequest.php | 221 - .../Cloud/NetApp/V1/ListVolumesResponse.php | 135 - .../Cloud/NetApp/V1/LocationMetadata.php | 68 - .../Cloud/NetApp/V1/MonthlySchedule.php | 217 - .../Google/Cloud/NetApp/V1/MountOption.php | 169 - .../Cloud/NetApp/V1/OperationMetadata.php | 307 - .../src/Google/Cloud/NetApp/V1/Protocols.php | 68 - .../Google/Cloud/NetApp/V1/Replication.php | 705 -- .../V1/Replication/HybridReplicationType.php | 64 - .../NetApp/V1/Replication/MirrorState.php | 94 - .../NetApp/V1/Replication/ReplicationRole.php | 65 - .../V1/Replication/ReplicationSchedule.php | 73 - .../Cloud/NetApp/V1/Replication/State.php | 100 - .../Cloud/NetApp/V1/RestoreParameters.php | 120 - .../Cloud/NetApp/V1/RestrictedAction.php | 54 - .../NetApp/V1/ResumeReplicationRequest.php | 71 - .../V1/ReverseReplicationDirectionRequest.php | 72 - .../Cloud/NetApp/V1/RevertVolumeRequest.php | 113 - .../Google/Cloud/NetApp/V1/SMBSettings.php | 111 - .../Google/Cloud/NetApp/V1/SecurityStyle.php | 61 - .../Google/Cloud/NetApp/V1/ServiceLevel.php | 75 - .../NetApp/V1/SimpleExportPolicyRule.php | 577 -- .../src/Google/Cloud/NetApp/V1/Snapshot.php | 293 - .../Google/Cloud/NetApp/V1/Snapshot/State.php | 92 - .../Google/Cloud/NetApp/V1/SnapshotPolicy.php | 257 - .../NetApp/V1/StopReplicationRequest.php | 125 - .../Google/Cloud/NetApp/V1/StoragePool.php | 766 -- .../Cloud/NetApp/V1/StoragePool/State.php | 99 - .../V1/SwitchActiveReplicaZoneRequest.php | 68 - .../NetApp/V1/SyncReplicationRequest.php | 71 - .../Google/Cloud/NetApp/V1/TieringPolicy.php | 129 - .../NetApp/V1/TieringPolicy/TierAction.php | 65 - .../Google/Cloud/NetApp/V1/TransferStats.php | 393 - .../V1/UpdateActiveDirectoryRequest.php | 156 - .../NetApp/V1/UpdateBackupPolicyRequest.php | 156 - .../Cloud/NetApp/V1/UpdateBackupRequest.php | 156 - .../NetApp/V1/UpdateBackupVaultRequest.php | 156 - .../NetApp/V1/UpdateKmsConfigRequest.php | 156 - .../NetApp/V1/UpdateReplicationRequest.php | 141 - .../Cloud/NetApp/V1/UpdateSnapshotRequest.php | 141 - .../NetApp/V1/UpdateStoragePoolRequest.php | 156 - .../Cloud/NetApp/V1/UpdateVolumeRequest.php | 156 - .../NetApp/V1/VerifyKmsConfigRequest.php | 67 - .../NetApp/V1/VerifyKmsConfigResponse.php | 144 - .../src/Google/Cloud/NetApp/V1/Volume.php | 1443 ---- .../Google/Cloud/NetApp/V1/Volume/State.php | 115 - .../Google/Cloud/NetApp/V1/WeeklySchedule.php | 218 - .../NetAppClient/create_active_directory.php | 123 - .../samples/V1/NetAppClient/create_backup.php | 96 - .../V1/NetAppClient/create_backup_policy.php | 93 - .../V1/NetAppClient/create_backup_vault.php | 93 - .../V1/NetAppClient/create_kms_config.php | 98 - .../V1/NetAppClient/create_replication.php | 116 - .../V1/NetAppClient/create_snapshot.php | 92 - .../V1/NetAppClient/create_storage_pool.php | 114 - .../samples/V1/NetAppClient/create_volume.php | 123 - .../NetAppClient/delete_active_directory.php | 80 - .../samples/V1/NetAppClient/delete_backup.php | 81 - .../V1/NetAppClient/delete_backup_policy.php | 81 - .../V1/NetAppClient/delete_backup_vault.php | 81 - .../V1/NetAppClient/delete_kms_config.php | 80 - .../V1/NetAppClient/delete_replication.php | 86 - .../V1/NetAppClient/delete_snapshot.php | 81 - .../V1/NetAppClient/delete_storage_pool.php | 80 - .../samples/V1/NetAppClient/delete_volume.php | 80 - .../V1/NetAppClient/encrypt_volumes.php | 84 - .../V1/NetAppClient/establish_peering.php | 105 - .../V1/NetAppClient/get_active_directory.php | 71 - .../v1/samples/V1/NetAppClient/get_backup.php | 72 - .../V1/NetAppClient/get_backup_policy.php | 72 - .../V1/NetAppClient/get_backup_vault.php | 72 - .../V1/NetAppClient/get_kms_config.php | 71 - .../samples/V1/NetAppClient/get_location.php | 57 - .../V1/NetAppClient/get_replication.php | 77 - .../samples/V1/NetAppClient/get_snapshot.php | 72 - .../V1/NetAppClient/get_storage_pool.php | 71 - .../v1/samples/V1/NetAppClient/get_volume.php | 71 - .../NetAppClient/list_active_directories.php | 76 - .../V1/NetAppClient/list_backup_policies.php | 76 - .../V1/NetAppClient/list_backup_vaults.php | 78 - .../samples/V1/NetAppClient/list_backups.php | 84 - .../V1/NetAppClient/list_kms_configs.php | 76 - .../V1/NetAppClient/list_locations.php | 62 - .../V1/NetAppClient/list_replications.php | 78 - .../V1/NetAppClient/list_snapshots.php | 78 - .../V1/NetAppClient/list_storage_pools.php | 76 - .../samples/V1/NetAppClient/list_volumes.php | 76 - .../V1/NetAppClient/resume_replication.php | 89 - .../reverse_replication_direction.php | 90 - .../samples/V1/NetAppClient/revert_volume.php | 91 - .../V1/NetAppClient/stop_replication.php | 89 - .../switch_active_replica_zone.php | 84 - .../V1/NetAppClient/sync_replication.php | 90 - .../NetAppClient/update_active_directory.php | 111 - .../samples/V1/NetAppClient/update_backup.php | 74 - .../V1/NetAppClient/update_backup_policy.php | 74 - .../V1/NetAppClient/update_backup_vault.php | 74 - .../V1/NetAppClient/update_kms_config.php | 88 - .../V1/NetAppClient/update_replication.php | 104 - .../V1/NetAppClient/update_snapshot.php | 74 - .../V1/NetAppClient/update_storage_pool.php | 103 - .../samples/V1/NetAppClient/update_volume.php | 112 - .../V1/NetAppClient/verify_kms_config.php | 71 - .../NetApp/v1/src/V1/Client/NetAppClient.php | 2060 ----- .../NetApp/v1/src/V1/gapic_metadata.json | 298 - .../V1/resources/net_app_client_config.json | 324 - .../resources/net_app_descriptor_config.php | 1049 --- .../resources/net_app_rest_client_config.php | 784 -- .../tests/Unit/V1/Client/NetAppClientTest.php | 6873 ----------------- .../Cloud/Networkconnectivity/V1/Common.php | 40 - .../Cloud/Networkconnectivity/V1/Hub.php | Bin 19414 -> 0 bytes .../V1/PolicyBasedRouting.php | Bin 5510 -> 0 bytes .../V1/AcceptHubSpokeRequest.php | 197 - .../V1/AcceptHubSpokeResponse.php | 78 - .../NetworkConnectivity/V1/AutoAccept.php | 81 - .../V1/CreateHubRequest.php | 243 - .../V1/CreatePolicyBasedRouteRequest.php | 237 - .../V1/CreateSpokeRequest.php | 242 - .../V1/DeleteHubRequest.php | 160 - .../V1/DeletePolicyBasedRouteRequest.php | 155 - .../V1/DeleteSpokeRequest.php | 160 - .../V1/GetGroupRequest.php | 82 - .../NetworkConnectivity/V1/GetHubRequest.php | 83 - .../V1/GetPolicyBasedRouteRequest.php | 81 - .../V1/GetRouteRequest.php | 82 - .../V1/GetRouteTableRequest.php | 82 - .../V1/GetSpokeRequest.php | 82 - .../Cloud/NetworkConnectivity/V1/Group.php | 405 - .../Cloud/NetworkConnectivity/V1/Hub.php | 620 -- .../NetworkConnectivity/V1/HubStatusEntry.php | 158 - .../V1/LinkedInterconnectAttachments.php | 188 - .../V1/LinkedProducerVpcNetwork.php | 247 - .../V1/LinkedRouterApplianceInstances.php | 192 - .../V1/LinkedVpcNetwork.php | 177 - .../V1/LinkedVpnTunnels.php | 188 - .../V1/ListGroupsRequest.php | 219 - .../V1/ListGroupsResponse.php | 145 - .../V1/ListHubSpokesRequest.php | 322 - .../V1/ListHubSpokesRequest/SpokeView.php | 68 - .../V1/ListHubSpokesResponse.php | 152 - .../V1/ListHubsRequest.php | 219 - .../V1/ListHubsResponse.php | 145 - .../V1/ListPolicyBasedRoutesRequest.php | 217 - .../V1/ListPolicyBasedRoutesResponse.php | 139 - .../V1/ListRouteTablesRequest.php | 219 - .../V1/ListRouteTablesResponse.php | 145 - .../V1/ListRoutesRequest.php | 219 - .../V1/ListRoutesResponse.php | 145 - .../V1/ListSpokesRequest.php | 218 - .../V1/ListSpokesResponse.php | 144 - .../V1/LocationFeature.php | 61 - .../V1/LocationMetadata.php | 67 - .../V1/NextHopInterconnectAttachment.php | 147 - .../V1/NextHopRouterApplianceInstance.php | 143 - .../V1/NextHopVPNTunnel.php | 143 - .../V1/NextHopVpcNetwork.php | 65 - .../V1/OperationMetadata.php | 307 - .../V1/PolicyBasedRoute.php | 636 -- .../V1/PolicyBasedRoute/Filter.php | 192 - .../Filter/ProtocolVersion.php | 57 - .../InterconnectAttachment.php | 74 - .../V1/PolicyBasedRoute/OtherRoutes.php | 60 - .../V1/PolicyBasedRoute/VirtualMachine.php | 78 - .../V1/PolicyBasedRoute/Warnings.php | 158 - .../V1/PolicyBasedRoute/Warnings/Code.php | 68 - .../NetworkConnectivity/V1/PolicyMode.php | 55 - .../NetworkConnectivity/V1/PresetTopology.php | 65 - .../V1/PscPropagationStatus.php | 276 - .../V1/PscPropagationStatus/Code.php | 103 - .../V1/QueryHubStatusRequest.php | 348 - .../V1/QueryHubStatusResponse.php | 110 - .../V1/RejectHubSpokeRequest.php | 231 - .../V1/RejectHubSpokeResponse.php | 78 - .../Cloud/NetworkConnectivity/V1/Route.php | 694 -- .../NetworkConnectivity/V1/RouteTable.php | 317 - .../NetworkConnectivity/V1/RouteType.php | 72 - .../V1/RouterApplianceInstance.php | 104 - .../NetworkConnectivity/V1/RoutingVPC.php | 118 - .../Cloud/NetworkConnectivity/V1/Spoke.php | 682 -- .../V1/Spoke/StateReason.php | 138 - .../V1/Spoke/StateReason/Code.php | 79 - .../NetworkConnectivity/V1/SpokeSummary.php | 151 - .../V1/SpokeSummary/SpokeStateCount.php | 109 - .../V1/SpokeSummary/SpokeStateReasonCount.php | 108 - .../V1/SpokeSummary/SpokeTypeCount.php | 110 - .../NetworkConnectivity/V1/SpokeType.php | 83 - .../Cloud/NetworkConnectivity/V1/State.php | 105 - .../V1/UpdateGroupRequest.php | 236 - .../V1/UpdateHubRequest.php | 236 - .../V1/UpdateSpokeRequest.php | 236 - .../V1/HubServiceClient/accept_hub_spoke.php | 88 - .../V1/HubServiceClient/create_hub.php | 88 - .../V1/HubServiceClient/create_spoke.php | 88 - .../V1/HubServiceClient/delete_hub.php | 80 - .../V1/HubServiceClient/delete_spoke.php | 80 - .../samples/V1/HubServiceClient/get_group.php | 71 - .../samples/V1/HubServiceClient/get_hub.php | 71 - .../V1/HubServiceClient/get_iam_policy.php | 72 - .../V1/HubServiceClient/get_location.php | 57 - .../samples/V1/HubServiceClient/get_route.php | 71 - .../V1/HubServiceClient/get_route_table.php | 71 - .../samples/V1/HubServiceClient/get_spoke.php | 71 - .../V1/HubServiceClient/list_groups.php | 76 - .../V1/HubServiceClient/list_hub_spokes.php | 78 - .../samples/V1/HubServiceClient/list_hubs.php | 76 - .../V1/HubServiceClient/list_locations.php | 62 - .../V1/HubServiceClient/list_route_tables.php | 76 - .../V1/HubServiceClient/list_routes.php | 76 - .../V1/HubServiceClient/list_spokes.php | 77 - .../V1/HubServiceClient/query_hub_status.php | 77 - .../V1/HubServiceClient/reject_hub_spoke.php | 90 - .../V1/HubServiceClient/set_iam_policy.php | 77 - .../HubServiceClient/test_iam_permissions.php | 84 - .../V1/HubServiceClient/update_group.php | 71 - .../V1/HubServiceClient/update_hub.php | 72 - .../V1/HubServiceClient/update_spoke.php | 71 - .../create_policy_based_route.php | 113 - .../delete_policy_based_route.php | 83 - .../get_iam_policy.php | 72 - .../get_location.php | 57 - .../get_policy_based_route.php | 74 - .../list_locations.php | 62 - .../list_policy_based_routes.php | 76 - .../set_iam_policy.php | 77 - .../test_iam_permissions.php | 84 - .../v1/src/V1/Client/HubServiceClient.php | 1203 --- .../PolicyBasedRoutingServiceClient.php | 580 -- .../v1/src/V1/gapic_metadata.json | 202 - .../resources/hub_service_client_config.json | 174 - .../hub_service_descriptor_config.php | 487 -- .../hub_service_rest_client_config.php | 432 -- ...y_based_routing_service_client_config.json | 89 - ...ased_routing_service_descriptor_config.php | 176 - ...sed_routing_service_rest_client_config.php | 233 - .../Unit/V1/Client/HubServiceClientTest.php | 2537 ------ .../PolicyBasedRoutingServiceClientTest.php | 932 --- .../Networkmanagement/V1/ConnectivityTest.php | Bin 4939 -> 0 bytes .../Networkmanagement/V1/Reachability.php | 84 - .../Cloud/Networkmanagement/V1/Trace.php | Bin 17481 -> 0 bytes .../Cloud/NetworkManagement/V1/AbortInfo.php | 173 - .../NetworkManagement/V1/AbortInfo/Cause.php | 327 - .../V1/AppEngineVersionInfo.php | 169 - .../V1/CloudFunctionInfo.php | 169 - .../V1/CloudRunRevisionInfo.php | 169 - .../V1/CloudSQLInstanceInfo.php | 241 - .../NetworkManagement/V1/ConnectivityTest.php | 781 -- .../V1/CreateConnectivityTestRequest.php | 199 - .../V1/DeleteConnectivityTestRequest.php | 86 - .../NetworkManagement/V1/DeliverInfo.php | 207 - .../V1/DeliverInfo/Target.php | 172 - .../Cloud/NetworkManagement/V1/DropInfo.php | 203 - .../NetworkManagement/V1/DropInfo/Cause.php | 711 -- .../Cloud/NetworkManagement/V1/Endpoint.php | 805 -- .../V1/Endpoint/AppEngineVersionEndpoint.php | 78 - .../V1/Endpoint/CloudFunctionEndpoint.php | 70 - .../V1/Endpoint/CloudRunRevisionEndpoint.php | 82 - .../V1/Endpoint/ForwardingRuleTarget.php | 79 - .../V1/Endpoint/NetworkType.php | 69 - .../NetworkManagement/V1/EndpointInfo.php | 307 - .../NetworkManagement/V1/FirewallInfo.php | 440 -- .../V1/FirewallInfo/FirewallRuleType.php | 125 - .../NetworkManagement/V1/ForwardInfo.php | 135 - .../V1/ForwardInfo/Target.php | 113 - .../V1/ForwardingRuleInfo.php | 415 - .../NetworkManagement/V1/GKEMasterInfo.php | 204 - .../V1/GetConnectivityTestRequest.php | 86 - .../V1/GoogleServiceInfo.php | 105 - .../GoogleServiceInfo/GoogleServiceType.php | 101 - .../NetworkManagement/V1/InstanceInfo.php | 344 - .../V1/LatencyDistribution.php | 67 - .../V1/LatencyPercentile.php | 109 - .../V1/ListConnectivityTestsRequest.php | 282 - .../V1/ListConnectivityTestsResponse.php | 135 - .../V1/LoadBalancerBackend.php | 203 - .../HealthCheckFirewallState.php | 69 - .../V1/LoadBalancerBackendInfo.php | 409 - .../HealthCheckFirewallsConfigState.php | 86 - .../NetworkManagement/V1/LoadBalancerInfo.php | 216 - .../V1/LoadBalancerInfo/BackendType.php | 71 - .../V1/LoadBalancerInfo/LoadBalancerType.php | 85 - .../NetworkManagement/V1/LoadBalancerType.php | 120 - .../Cloud/NetworkManagement/V1/NatInfo.php | 483 -- .../NetworkManagement/V1/NatInfo/Type.php | 78 - .../NetworkManagement/V1/NetworkInfo.php | 204 - .../V1/OperationMetadata.php | 295 - .../NetworkManagement/V1/ProbingDetails.php | 417 - .../V1/ProbingDetails/EdgeLocation.php | 71 - .../V1/ProbingDetails/ProbingAbortCause.php | 65 - .../V1/ProbingDetails/ProbingResult.php | 82 - .../V1/ProxyConnectionInfo.php | 419 - .../V1/ReachabilityDetails.php | 197 - .../V1/ReachabilityDetails/Result.php | 94 - .../NetworkManagement/V1/RedisClusterInfo.php | 249 - .../V1/RedisInstanceInfo.php | 237 - .../V1/RerunConnectivityTestRequest.php | 71 - .../Cloud/NetworkManagement/V1/RouteInfo.php | 735 -- .../V1/RouteInfo/NextHopType.php | 140 - .../V1/RouteInfo/RouteScope.php | 64 - .../V1/RouteInfo/RouteType.php | 112 - .../V1/ServerlessNegInfo.php | 68 - .../Cloud/NetworkManagement/V1/Step.php | 1090 --- .../Cloud/NetworkManagement/V1/Step/State.php | 304 - .../V1/StorageBucketInfo.php | 67 - .../Cloud/NetworkManagement/V1/Trace.php | 190 - .../V1/UpdateConnectivityTestRequest.php | 141 - .../NetworkManagement/V1/VpcConnectorInfo.php | 135 - .../NetworkManagement/V1/VpnGatewayInfo.php | 245 - .../NetworkManagement/V1/VpnTunnelInfo.php | 339 - .../V1/VpnTunnelInfo/RoutingType.php | 72 - .../create_connectivity_test.php | 113 - .../delete_connectivity_test.php | 81 - .../get_connectivity_test.php | 72 - .../get_iam_policy.php | 72 - .../get_location.php | 57 - .../list_connectivity_tests.php | 77 - .../list_locations.php | 62 - .../rerun_connectivity_test.php | 95 - .../set_iam_policy.php | 77 - .../test_iam_permissions.php | 84 - .../update_connectivity_test.php | 92 - .../V1/Client/ReachabilityServiceClient.php | 656 -- .../v1/src/V1/gapic_metadata.json | 73 - .../reachability_service_client_config.json | 87 - ...reachability_service_descriptor_config.php | 214 - ...eachability_service_rest_client_config.php | 213 - .../Client/ReachabilityServiceClientTest.php | 1202 --- .../V1/AuthorizationPolicy.php | Bin 3391 -> 0 bytes .../Networksecurity/V1/ClientTlsPolicy.php | 67 - .../Cloud/Networksecurity/V1/Common.php | 37 - .../Networksecurity/V1/NetworkSecurity.php | 58 - .../Networksecurity/V1/ServerTlsPolicy.php | 71 - .../Google/Cloud/Networksecurity/V1/Tls.php | Bin 1442 -> 0 bytes .../V1/AuthorizationPolicy.php | 314 - .../V1/AuthorizationPolicy/Action.php | 66 - .../V1/AuthorizationPolicy/Rule.php | 132 - .../AuthorizationPolicy/Rule/Destination.php | 214 - .../Rule/Destination/HttpHeaderMatch.php | 142 - .../V1/AuthorizationPolicy/Rule/Source.php | 140 - .../V1/CertificateProvider.php | 118 - .../V1/CertificateProviderInstance.php | 78 - .../NetworkSecurity/V1/ClientTlsPolicy.php | 357 - .../V1/CreateAuthorizationPolicyRequest.php | 183 - .../V1/CreateClientTlsPolicyRequest.php | 178 - .../V1/CreateServerTlsPolicyRequest.php | 178 - .../V1/DeleteAuthorizationPolicyRequest.php | 86 - .../V1/DeleteClientTlsPolicyRequest.php | 86 - .../V1/DeleteServerTlsPolicyRequest.php | 86 - .../V1/GetAuthorizationPolicyRequest.php | 86 - .../V1/GetClientTlsPolicyRequest.php | 86 - .../V1/GetServerTlsPolicyRequest.php | 86 - .../Cloud/NetworkSecurity/V1/GrpcEndpoint.php | 71 - .../V1/ListAuthorizationPoliciesRequest.php | 171 - .../V1/ListAuthorizationPoliciesResponse.php | 109 - .../V1/ListClientTlsPoliciesRequest.php | 166 - .../V1/ListClientTlsPoliciesResponse.php | 109 - .../V1/ListServerTlsPoliciesRequest.php | 166 - .../V1/ListServerTlsPoliciesResponse.php | 109 - .../NetworkSecurity/V1/OperationMetadata.php | 303 - .../NetworkSecurity/V1/ServerTlsPolicy.php | 403 - .../V1/ServerTlsPolicy/MTLSPolicy.php | 74 - .../V1/UpdateAuthorizationPolicyRequest.php | 156 - .../V1/UpdateClientTlsPolicyRequest.php | 161 - .../V1/UpdateServerTlsPolicyRequest.php | 161 - .../Cloud/NetworkSecurity/V1/ValidationCA.php | 118 - .../create_authorization_policy.php | 110 - .../create_client_tls_policy.php | 98 - .../create_server_tls_policy.php | 98 - .../delete_authorization_policy.php | 85 - .../delete_client_tls_policy.php | 85 - .../delete_server_tls_policy.php | 85 - .../get_authorization_policy.php | 76 - .../get_client_tls_policy.php | 76 - .../NetworkSecurityClient/get_iam_policy.php | 72 - .../V1/NetworkSecurityClient/get_location.php | 57 - .../get_server_tls_policy.php | 76 - .../list_authorization_policies.php | 78 - .../list_client_tls_policies.php | 77 - .../NetworkSecurityClient/list_locations.php | 62 - .../list_server_tls_policies.php | 77 - .../NetworkSecurityClient/set_iam_policy.php | 77 - .../test_iam_permissions.php | 84 - .../update_authorization_policy.php | 92 - .../update_client_tls_policy.php | 85 - .../update_server_tls_policy.php | 85 - .../src/V1/Client/NetworkSecurityClient.php | 919 --- .../v1/src/V1/gapic_metadata.json | 118 - .../network_security_client_config.json | 132 - .../network_security_descriptor_config.php | 377 - .../network_security_rest_client_config.php | 354 - .../V1/Client/NetworkSecurityClientTest.php | 2113 ----- .../Cloud/Networkservices/V1/Common.php | Bin 1930 -> 0 bytes .../Google/Cloud/Networkservices/V1/Dep.php | Bin 9040 -> 0 bytes .../Networkservices/V1/EndpointPolicy.php | Bin 3659 -> 0 bytes .../Cloud/Networkservices/V1/Gateway.php | Bin 2567 -> 0 bytes .../Cloud/Networkservices/V1/GrpcRoute.php | Bin 4529 -> 0 bytes .../Cloud/Networkservices/V1/HttpRoute.php | Bin 6027 -> 0 bytes .../Google/Cloud/Networkservices/V1/Mesh.php | 64 - .../Networkservices/V1/NetworkServices.php | 110 - .../Networkservices/V1/ServiceBinding.php | 59 - .../Cloud/Networkservices/V1/TcpRoute.php | 85 - .../Cloud/Networkservices/V1/TlsRoute.php | 78 - .../V1/CreateEndpointPolicyRequest.php | 173 - .../V1/CreateGatewayRequest.php | 168 - .../V1/CreateGrpcRouteRequest.php | 168 - .../V1/CreateHttpRouteRequest.php | 168 - .../V1/CreateLbRouteExtensionRequest.php | 247 - .../V1/CreateLbTrafficExtensionRequest.php | 247 - .../NetworkServices/V1/CreateMeshRequest.php | 168 - .../V1/CreateServiceBindingRequest.php | 168 - .../V1/CreateTcpRouteRequest.php | 168 - .../V1/CreateTlsRouteRequest.php | 168 - .../V1/DeleteEndpointPolicyRequest.php | 86 - .../V1/DeleteGatewayRequest.php | 86 - .../V1/DeleteGrpcRouteRequest.php | 86 - .../V1/DeleteHttpRouteRequest.php | 86 - .../V1/DeleteLbRouteExtensionRequest.php | 165 - .../V1/DeleteLbTrafficExtensionRequest.php | 165 - .../NetworkServices/V1/DeleteMeshRequest.php | 86 - .../V1/DeleteServiceBindingRequest.php | 86 - .../V1/DeleteTcpRouteRequest.php | 86 - .../V1/DeleteTlsRouteRequest.php | 86 - .../NetworkServices/V1/EndpointMatcher.php | 76 - .../EndpointMatcher/MetadataLabelMatcher.php | 196 - .../MetadataLabelMatchCriteria.php | 66 - .../MetadataLabelMatcher/MetadataLabels.php | 108 - .../NetworkServices/V1/EndpointPolicy.php | 526 -- .../V1/EndpointPolicy/EndpointPolicyType.php | 64 - .../Cloud/NetworkServices/V1/EventType.php | 95 - .../NetworkServices/V1/ExtensionChain.php | 182 - .../V1/ExtensionChain/Extension.php | 416 - .../V1/ExtensionChain/MatchCondition.php | 82 - .../Cloud/NetworkServices/V1/Gateway.php | 444 -- .../Cloud/NetworkServices/V1/Gateway/Type.php | 68 - .../V1/GetEndpointPolicyRequest.php | 86 - .../NetworkServices/V1/GetGatewayRequest.php | 86 - .../V1/GetGrpcRouteRequest.php | 86 - .../V1/GetHttpRouteRequest.php | 86 - .../V1/GetLbRouteExtensionRequest.php | 91 - .../V1/GetLbTrafficExtensionRequest.php | 91 - .../NetworkServices/V1/GetMeshRequest.php | 86 - .../V1/GetServiceBindingRequest.php | 86 - .../NetworkServices/V1/GetTcpRouteRequest.php | 86 - .../NetworkServices/V1/GetTlsRouteRequest.php | 86 - .../Cloud/NetworkServices/V1/GrpcRoute.php | 534 -- .../V1/GrpcRoute/Destination.php | 165 - .../V1/GrpcRoute/FaultInjectionPolicy.php | 129 - .../GrpcRoute/FaultInjectionPolicy/Abort.php | 133 - .../GrpcRoute/FaultInjectionPolicy/Delay.php | 129 - .../V1/GrpcRoute/HeaderMatch.php | 142 - .../V1/GrpcRoute/HeaderMatch/Type.php | 65 - .../V1/GrpcRoute/MethodMatch.php | 202 - .../V1/GrpcRoute/MethodMatch/Type.php | 65 - .../V1/GrpcRoute/RetryPolicy.php | 168 - .../V1/GrpcRoute/RouteAction.php | 250 - .../V1/GrpcRoute/RouteMatch.php | 119 - .../V1/GrpcRoute/RouteRule.php | 130 - .../Cloud/NetworkServices/V1/HttpRoute.php | 518 -- .../V1/HttpRoute/CorsPolicy.php | 344 - .../V1/HttpRoute/Destination.php | 144 - .../V1/HttpRoute/FaultInjectionPolicy.php | 129 - .../HttpRoute/FaultInjectionPolicy/Abort.php | 113 - .../HttpRoute/FaultInjectionPolicy/Delay.php | 119 - .../V1/HttpRoute/HeaderMatch.php | 330 - .../V1/HttpRoute/HeaderMatch/IntegerRange.php | 104 - .../V1/HttpRoute/HeaderModifier.php | 147 - .../V1/HttpRoute/QueryParameterMatch.php | 202 - .../NetworkServices/V1/HttpRoute/Redirect.php | 330 - .../V1/HttpRoute/Redirect/ResponseCode.php | 85 - .../V1/HttpRoute/RequestMirrorPolicy.php | 87 - .../V1/HttpRoute/RetryPolicy.php | 216 - .../V1/HttpRoute/RouteAction.php | 546 -- .../V1/HttpRoute/RouteMatch.php | 290 - .../V1/HttpRoute/RouteRule.php | 139 - .../V1/HttpRoute/URLRewrite.php | 113 - .../NetworkServices/V1/LbRouteExtension.php | 462 -- .../NetworkServices/V1/LbTrafficExtension.php | 460 -- .../V1/ListEndpointPoliciesRequest.php | 166 - .../V1/ListEndpointPoliciesResponse.php | 109 - .../V1/ListGatewaysRequest.php | 162 - .../V1/ListGatewaysResponse.php | 109 - .../V1/ListGrpcRoutesRequest.php | 162 - .../V1/ListGrpcRoutesResponse.php | 109 - .../V1/ListHttpRoutesRequest.php | 162 - .../V1/ListHttpRoutesResponse.php | 109 - .../V1/ListLbRouteExtensionsRequest.php | 231 - .../V1/ListLbRouteExtensionsResponse.php | 135 - .../V1/ListLbTrafficExtensionsRequest.php | 231 - .../V1/ListLbTrafficExtensionsResponse.php | 135 - .../NetworkServices/V1/ListMeshesRequest.php | 162 - .../NetworkServices/V1/ListMeshesResponse.php | 109 - .../V1/ListServiceBindingsRequest.php | 162 - .../V1/ListServiceBindingsResponse.php | 109 - .../V1/ListTcpRoutesRequest.php | 162 - .../V1/ListTcpRoutesResponse.php | 109 - .../V1/ListTlsRoutesRequest.php | 162 - .../V1/ListTlsRoutesResponse.php | 109 - .../V1/LoadBalancingScheme.php | 65 - .../Google/Cloud/NetworkServices/V1/Mesh.php | 321 - .../NetworkServices/V1/OperationMetadata.php | 307 - .../NetworkServices/V1/ServiceBinding.php | 270 - .../Cloud/NetworkServices/V1/TcpRoute.php | 404 - .../V1/TcpRoute/RouteAction.php | 120 - .../V1/TcpRoute/RouteDestination.php | 144 - .../V1/TcpRoute/RouteMatch.php | 139 - .../NetworkServices/V1/TcpRoute/RouteRule.php | 127 - .../Cloud/NetworkServices/V1/TlsRoute.php | 370 - .../V1/TlsRoute/RouteAction.php | 74 - .../V1/TlsRoute/RouteDestination.php | 116 - .../V1/TlsRoute/RouteMatch.php | 147 - .../NetworkServices/V1/TlsRoute/RouteRule.php | 119 - .../V1/TrafficPortSelector.php | 79 - .../V1/UpdateEndpointPolicyRequest.php | 156 - .../V1/UpdateGatewayRequest.php | 156 - .../V1/UpdateGrpcRouteRequest.php | 156 - .../V1/UpdateHttpRouteRequest.php | 156 - .../V1/UpdateLbRouteExtensionRequest.php | 230 - .../V1/UpdateLbTrafficExtensionRequest.php | 230 - .../NetworkServices/V1/UpdateMeshRequest.php | 156 - .../V1/UpdateTcpRouteRequest.php | 156 - .../V1/UpdateTlsRouteRequest.php | 156 - .../create_lb_route_extension.php | 176 - .../create_lb_traffic_extension.php | 177 - .../delete_lb_route_extension.php | 86 - .../delete_lb_traffic_extension.php | 86 - .../V1/DepServiceClient/get_iam_policy.php | 72 - .../get_lb_route_extension.php | 77 - .../get_lb_traffic_extension.php | 77 - .../V1/DepServiceClient/get_location.php | 57 - .../list_lb_route_extensions.php | 78 - .../list_lb_traffic_extensions.php | 78 - .../V1/DepServiceClient/list_locations.php | 62 - .../V1/DepServiceClient/set_iam_policy.php | 77 - .../DepServiceClient/test_iam_permissions.php | 84 - .../update_lb_route_extension.php | 163 - .../update_lb_traffic_extension.php | 163 - .../create_endpoint_policy.php | 111 - .../NetworkServicesClient/create_gateway.php | 120 - .../create_grpc_route.php | 143 - .../create_http_route.php | 132 - .../V1/NetworkServicesClient/create_mesh.php | 93 - .../create_service_binding.php | 106 - .../create_tcp_route.php | 103 - .../create_tls_route.php | 124 - .../delete_endpoint_policy.php | 85 - .../NetworkServicesClient/delete_gateway.php | 81 - .../delete_grpc_route.php | 81 - .../delete_http_route.php | 81 - .../V1/NetworkServicesClient/delete_mesh.php | 81 - .../delete_service_binding.php | 85 - .../delete_tcp_route.php | 81 - .../delete_tls_route.php | 81 - .../get_endpoint_policy.php | 76 - .../V1/NetworkServicesClient/get_gateway.php | 72 - .../NetworkServicesClient/get_grpc_route.php | 72 - .../NetworkServicesClient/get_http_route.php | 72 - .../NetworkServicesClient/get_iam_policy.php | 72 - .../V1/NetworkServicesClient/get_location.php | 57 - .../V1/NetworkServicesClient/get_mesh.php | 72 - .../get_service_binding.php | 76 - .../NetworkServicesClient/get_tcp_route.php | 72 - .../NetworkServicesClient/get_tls_route.php | 72 - .../list_endpoint_policies.php | 77 - .../NetworkServicesClient/list_gateways.php | 77 - .../list_grpc_routes.php | 77 - .../list_http_routes.php | 77 - .../NetworkServicesClient/list_locations.php | 62 - .../V1/NetworkServicesClient/list_meshes.php | 77 - .../list_service_bindings.php | 77 - .../NetworkServicesClient/list_tcp_routes.php | 77 - .../NetworkServicesClient/list_tls_routes.php | 77 - .../NetworkServicesClient/set_iam_policy.php | 77 - .../test_iam_permissions.php | 84 - .../update_endpoint_policy.php | 93 - .../NetworkServicesClient/update_gateway.php | 104 - .../update_grpc_route.php | 126 - .../update_http_route.php | 115 - .../V1/NetworkServicesClient/update_mesh.php | 85 - .../update_tcp_route.php | 92 - .../update_tls_route.php | 109 - .../v1/src/V1/Client/DepServiceClient.php | 744 -- .../src/V1/Client/NetworkServicesClient.php | 1761 ----- .../v1/src/V1/gapic_metadata.json | 322 - .../resources/dep_service_client_config.json | 107 - .../dep_service_descriptor_config.php | 286 - .../dep_service_rest_client_config.php | 349 - .../network_services_client_config.json | 252 - .../network_services_descriptor_config.php | 816 -- .../network_services_rest_client_config.php | 702 -- .../Unit/V1/Client/DepServiceClientTest.php | 1609 ---- .../V1/Client/NetworkServicesClientTest.php | 4812 ------------ .../Cloud/Notebooks/V1/DiagnosticConfig.php | 35 - .../Google/Cloud/Notebooks/V1/Environment.php | Bin 1607 -> 0 bytes .../Google/Cloud/Notebooks/V1/Event.php | Bin 1205 -> 0 bytes .../Google/Cloud/Notebooks/V1/Execution.php | Bin 3375 -> 0 bytes .../Google/Cloud/Notebooks/V1/Instance.php | Bin 5063 -> 0 bytes .../Cloud/Notebooks/V1/InstanceConfig.php | 30 - .../Cloud/Notebooks/V1/ManagedService.php | 131 - .../Google/Cloud/Notebooks/V1/Runtime.php | Bin 6123 -> 0 bytes .../Google/Cloud/Notebooks/V1/Schedule.php | Bin 1737 -> 0 bytes .../Google/Cloud/Notebooks/V1/Service.php | Bin 14354 -> 0 bytes .../Cloud/Notebooks/V1/ContainerImage.php | 110 - .../Notebooks/V1/CreateEnvironmentRequest.php | 177 - .../Notebooks/V1/CreateExecutionRequest.php | 168 - .../Notebooks/V1/CreateInstanceRequest.php | 167 - .../Notebooks/V1/CreateRuntimeRequest.php | 202 - .../Notebooks/V1/CreateScheduleRequest.php | 168 - .../Notebooks/V1/DeleteEnvironmentRequest.php | 85 - .../Notebooks/V1/DeleteExecutionRequest.php | 86 - .../Notebooks/V1/DeleteInstanceRequest.php | 85 - .../Notebooks/V1/DeleteRuntimeRequest.php | 120 - .../Notebooks/V1/DeleteScheduleRequest.php | 86 - .../Notebooks/V1/DiagnoseInstanceRequest.php | 132 - .../Notebooks/V1/DiagnoseRuntimeRequest.php | 132 - .../Cloud/Notebooks/V1/DiagnosticConfig.php | 263 - .../Cloud/Notebooks/V1/EncryptionConfig.php | 80 - .../Google/Cloud/Notebooks/V1/Environment.php | 305 - .../src/Google/Cloud/Notebooks/V1/Event.php | 145 - .../Cloud/Notebooks/V1/Event/EventType.php | 84 - .../Google/Cloud/Notebooks/V1/Execution.php | 377 - .../Cloud/Notebooks/V1/Execution/State.php | 117 - .../Cloud/Notebooks/V1/ExecutionTemplate.php | 829 -- .../ExecutionTemplate/DataprocParameters.php | 74 - .../V1/ExecutionTemplate/JobType.php | 66 - .../V1/ExecutionTemplate/ScaleTier.php | 99 - .../SchedulerAcceleratorConfig.php | 107 - .../SchedulerAcceleratorType.php | 106 - .../ExecutionTemplate/VertexAIParameters.php | 148 - .../Notebooks/V1/GetEnvironmentRequest.php | 85 - .../Notebooks/V1/GetExecutionRequest.php | 86 - .../Notebooks/V1/GetInstanceHealthRequest.php | 86 - .../V1/GetInstanceHealthResponse.php | 133 - .../GetInstanceHealthResponse/HealthState.php | 84 - .../Cloud/Notebooks/V1/GetInstanceRequest.php | 85 - .../Cloud/Notebooks/V1/GetRuntimeRequest.php | 86 - .../Cloud/Notebooks/V1/GetScheduleRequest.php | 86 - .../Google/Cloud/Notebooks/V1/Instance.php | 1522 ---- .../V1/Instance/AcceleratorConfig.php | 107 - .../Notebooks/V1/Instance/AcceleratorType.php | 128 - .../Cloud/Notebooks/V1/Instance/Disk.php | 568 -- .../V1/Instance/Disk/GuestOsFeature.php | 102 - .../Notebooks/V1/Instance/DiskEncryption.php | 64 - .../Cloud/Notebooks/V1/Instance/DiskType.php | 78 - .../Cloud/Notebooks/V1/Instance/NicType.php | 65 - .../V1/Instance/ShieldedInstanceConfig.php | 169 - .../Cloud/Notebooks/V1/Instance/State.php | 128 - .../V1/Instance/UpgradeHistoryEntry.php | 391 - .../Instance/UpgradeHistoryEntry/Action.php | 64 - .../V1/Instance/UpgradeHistoryEntry/State.php | 71 - .../Cloud/Notebooks/V1/InstanceConfig.php | 105 - .../V1/IsInstanceUpgradeableRequest.php | 109 - .../V1/IsInstanceUpgradeableResponse.php | 181 - .../Notebooks/V1/ListEnvironmentsRequest.php | 152 - .../Notebooks/V1/ListEnvironmentsResponse.php | 139 - .../Notebooks/V1/ListExecutionsRequest.php | 234 - .../Notebooks/V1/ListExecutionsResponse.php | 147 - .../Notebooks/V1/ListInstancesRequest.php | 157 - .../Notebooks/V1/ListInstancesResponse.php | 147 - .../Notebooks/V1/ListRuntimesRequest.php | 158 - .../Notebooks/V1/ListRuntimesResponse.php | 147 - .../Notebooks/V1/ListSchedulesRequest.php | 226 - .../Notebooks/V1/ListSchedulesResponse.php | 147 - .../Google/Cloud/Notebooks/V1/LocalDisk.php | 583 -- .../V1/LocalDisk/RuntimeGuestOsFeature.php | 111 - .../V1/LocalDiskInitializeParams.php | 231 - .../V1/LocalDiskInitializeParams/DiskType.php | 78 - .../Cloud/Notebooks/V1/OperationMetadata.php | 337 - .../V1/RefreshRuntimeTokenInternalRequest.php | 127 - .../RefreshRuntimeTokenInternalResponse.php | 111 - .../Notebooks/V1/RegisterInstanceRequest.php | 117 - .../V1/ReportInstanceInfoRequest.php | 147 - .../V1/ReportRuntimeEventRequest.php | 168 - .../Notebooks/V1/ReservationAffinity.php | 135 - .../Notebooks/V1/ReservationAffinity/Type.php | 72 - .../Notebooks/V1/ResetInstanceRequest.php | 71 - .../Notebooks/V1/ResetRuntimeRequest.php | 119 - .../Notebooks/V1/RollbackInstanceRequest.php | 109 - .../src/Google/Cloud/Notebooks/V1/Runtime.php | 409 - .../Notebooks/V1/Runtime/HealthState.php | 84 - .../Cloud/Notebooks/V1/Runtime/State.php | 107 - .../Notebooks/V1/RuntimeAcceleratorConfig.php | 111 - .../AcceleratorType.php | 127 - .../Notebooks/V1/RuntimeAccessConfig.php | 139 - .../RuntimeAccessConfig/RuntimeAccessType.php | 68 - .../Cloud/Notebooks/V1/RuntimeMetrics.php | 67 - .../V1/RuntimeShieldedInstanceConfig.php | 166 - .../Notebooks/V1/RuntimeSoftwareConfig.php | 528 -- .../PostStartupScriptBehavior.php | 64 - .../Google/Cloud/Notebooks/V1/Schedule.php | 448 -- .../Cloud/Notebooks/V1/Schedule/State.php | 97 - .../V1/SetInstanceAcceleratorRequest.php | 151 - .../Notebooks/V1/SetInstanceLabelsRequest.php | 109 - .../V1/SetInstanceMachineTypeRequest.php | 109 - .../Notebooks/V1/StartInstanceRequest.php | 71 - .../Notebooks/V1/StartRuntimeRequest.php | 119 - .../Notebooks/V1/StopInstanceRequest.php | 71 - .../Cloud/Notebooks/V1/StopRuntimeRequest.php | 119 - .../Notebooks/V1/SwitchRuntimeRequest.php | 197 - .../Notebooks/V1/TriggerScheduleRequest.php | 71 - .../V1/UpdateInstanceConfigRequest.php | 115 - .../V1/UpdateInstanceMetadataItemsRequest.php | 105 - .../UpdateInstanceMetadataItemsResponse.php | 67 - .../Notebooks/V1/UpdateRuntimeRequest.php | 268 - .../UpdateShieldedInstanceConfigRequest.php | 116 - .../V1/UpgradeInstanceInternalRequest.php | 147 - .../Notebooks/V1/UpgradeInstanceRequest.php | 109 - .../Notebooks/V1/UpgradeRuntimeRequest.php | 121 - .../Google/Cloud/Notebooks/V1/UpgradeType.php | 76 - .../Cloud/Notebooks/V1/VirtualMachine.php | 145 - .../Notebooks/V1/VirtualMachineConfig.php | 873 --- .../V1/VirtualMachineConfig/BootImage.php | 37 - .../V1/VirtualMachineConfig/NicType.php | 65 - .../src/Google/Cloud/Notebooks/V1/VmImage.php | 150 - .../create_runtime.php | 93 - .../delete_runtime.php | 81 - .../diagnose_runtime.php | 102 - .../get_iam_policy.php | 72 - .../get_location.php | 57 - .../get_runtime.php | 73 - .../list_locations.php | 62 - .../list_runtimes.php | 77 - .../refresh_runtime_token_internal.php | 77 - .../report_runtime_event.php | 91 - .../reset_runtime.php | 83 - .../set_iam_policy.php | 77 - .../start_runtime.php | 87 - .../stop_runtime.php | 87 - .../switch_runtime.php | 83 - .../test_iam_permissions.php | 84 - .../update_runtime.php | 74 - .../upgrade_runtime.php | 83 - .../create_environment.php | 90 - .../create_execution.php | 89 - .../NotebookServiceClient/create_instance.php | 96 - .../NotebookServiceClient/create_schedule.php | 89 - .../delete_environment.php | 80 - .../delete_execution.php | 81 - .../NotebookServiceClient/delete_instance.php | 80 - .../NotebookServiceClient/delete_schedule.php | 81 - .../diagnose_instance.php | 102 - .../NotebookServiceClient/get_environment.php | 71 - .../NotebookServiceClient/get_execution.php | 72 - .../NotebookServiceClient/get_iam_policy.php | 72 - .../V1/NotebookServiceClient/get_instance.php | 71 - .../get_instance_health.php | 72 - .../V1/NotebookServiceClient/get_location.php | 57 - .../V1/NotebookServiceClient/get_schedule.php | 72 - .../is_instance_upgradeable.php | 71 - .../list_environments.php | 75 - .../NotebookServiceClient/list_executions.php | 77 - .../NotebookServiceClient/list_instances.php | 76 - .../NotebookServiceClient/list_locations.php | 62 - .../NotebookServiceClient/list_schedules.php | 77 - .../register_instance.php | 92 - .../report_instance_info.php | 90 - .../NotebookServiceClient/reset_instance.php | 83 - .../rollback_instance.php | 87 - .../NotebookServiceClient/set_iam_policy.php | 77 - .../set_instance_accelerator.php | 93 - .../set_instance_labels.php | 83 - .../set_instance_machine_type.php | 87 - .../NotebookServiceClient/start_instance.php | 83 - .../NotebookServiceClient/stop_instance.php | 83 - .../test_iam_permissions.php | 84 - .../trigger_schedule.php | 84 - .../update_instance_config.php | 83 - .../update_instance_metadata_items.php | 71 - .../update_shielded_instance_config.php | 83 - .../upgrade_instance.php | 83 - .../upgrade_instance_internal.php | 88 - .../Client/ManagedNotebookServiceClient.php | 822 -- .../src/V1/Client/NotebookServiceClient.php | 1471 ---- .../Notebooks/v1/src/V1/gapic_metadata.json | 312 - ...anaged_notebook_service_client_config.json | 134 - ...ged_notebook_service_descriptor_config.php | 340 - ...ed_notebook_service_rest_client_config.php | 317 - .../notebook_service_client_config.json | 239 - .../notebook_service_descriptor_config.php | 709 -- .../notebook_service_rest_client_config.php | 563 -- .../ManagedNotebookServiceClientTest.php | 1971 ----- .../V1/Client/NotebookServiceClientTest.php | 4758 ------------ .../Cloud/Notebooks/V2/DiagnosticConfig.php | 35 - .../Google/Cloud/Notebooks/V2/Event.php | Bin 1327 -> 0 bytes .../Google/Cloud/Notebooks/V2/GceSetup.php | Bin 3414 -> 0 bytes .../Google/Cloud/Notebooks/V2/Instance.php | Bin 2907 -> 0 bytes .../Google/Cloud/Notebooks/V2/Service.php | 123 - .../Cloud/Notebooks/V2/AcceleratorConfig.php | 106 - .../V2/AcceleratorConfig/AcceleratorType.php | 121 - .../Google/Cloud/Notebooks/V2/BootDisk.php | 193 - .../V2/CheckInstanceUpgradabilityRequest.php | 71 - .../V2/CheckInstanceUpgradabilityResponse.php | 181 - .../Cloud/Notebooks/V2/ContainerImage.php | 110 - .../Notebooks/V2/CreateInstanceRequest.php | 202 - .../Google/Cloud/Notebooks/V2/DataDisk.php | 189 - .../Notebooks/V2/DeleteInstanceRequest.php | 120 - .../Notebooks/V2/DiagnoseInstanceRequest.php | 166 - .../Cloud/Notebooks/V2/DiagnosticConfig.php | 259 - .../Cloud/Notebooks/V2/DiskEncryption.php | 61 - .../Google/Cloud/Notebooks/V2/DiskType.php | 75 - .../src/Google/Cloud/Notebooks/V2/Event.php | 145 - .../Cloud/Notebooks/V2/Event/EventType.php | 93 - .../Cloud/Notebooks/V2/GPUDriverConfig.php | 117 - .../Google/Cloud/Notebooks/V2/GceSetup.php | 595 -- .../Cloud/Notebooks/V2/GetInstanceRequest.php | 86 - .../Google/Cloud/Notebooks/V2/HealthState.php | 81 - .../Google/Cloud/Notebooks/V2/Instance.php | 604 -- .../Notebooks/V2/ListInstancesRequest.php | 230 - .../Notebooks/V2/ListInstancesResponse.php | 147 - .../Cloud/Notebooks/V2/NetworkInterface.php | 155 - .../Notebooks/V2/NetworkInterface/NicType.php | 65 - .../Cloud/Notebooks/V2/OperationMetadata.php | 341 - .../Notebooks/V2/ResetInstanceRequest.php | 71 - .../Notebooks/V2/RollbackInstanceRequest.php | 143 - .../Cloud/Notebooks/V2/ServiceAccount.php | 105 - .../Notebooks/V2/ShieldedInstanceConfig.php | 170 - .../Notebooks/V2/StartInstanceRequest.php | 71 - .../src/Google/Cloud/Notebooks/V2/State.php | 118 - .../Notebooks/V2/StopInstanceRequest.php | 71 - .../Notebooks/V2/UpdateInstanceRequest.php | 170 - .../Notebooks/V2/UpgradeHistoryEntry.php | 353 - .../V2/UpgradeHistoryEntry/Action.php | 64 - .../V2/UpgradeHistoryEntry/State.php | 71 - .../Notebooks/V2/UpgradeInstanceRequest.php | 71 - .../src/Google/Cloud/Notebooks/V2/VmImage.php | 150 - .../check_instance_upgradability.php | 71 - .../NotebookServiceClient/create_instance.php | 89 - .../NotebookServiceClient/delete_instance.php | 81 - .../diagnose_instance.php | 102 - .../NotebookServiceClient/get_iam_policy.php | 72 - .../V2/NotebookServiceClient/get_instance.php | 72 - .../V2/NotebookServiceClient/get_location.php | 57 - .../NotebookServiceClient/list_instances.php | 77 - .../NotebookServiceClient/list_locations.php | 62 - .../NotebookServiceClient/reset_instance.php | 83 - .../rollback_instance.php | 94 - .../NotebookServiceClient/set_iam_policy.php | 77 - .../NotebookServiceClient/start_instance.php | 83 - .../NotebookServiceClient/stop_instance.php | 83 - .../test_iam_permissions.php | 84 - .../NotebookServiceClient/update_instance.php | 74 - .../upgrade_instance.php | 83 - .../src/V2/Client/NotebookServiceClient.php | 780 -- .../Notebooks/v2/src/V2/gapic_metadata.json | 103 - .../notebook_service_client_config.json | 129 - .../notebook_service_descriptor_config.php | 321 - .../notebook_service_rest_client_config.php | 284 - .../V2/Client/NotebookServiceClientTest.php | 1879 ----- .../Cloud/Optimization/V1/AsyncModel.php | Bin 1677 -> 0 bytes .../Cloud/Optimization/V1/FleetRouting.php | Bin 18781 -> 0 bytes .../Optimization/V1/AggregatedMetrics.php | 554 -- .../Optimization/V1/AsyncModelMetadata.php | 193 - .../V1/AsyncModelMetadata/State.php | 78 - .../V1/BatchOptimizeToursRequest.php | 117 - .../AsyncModelConfig.php | 224 - .../V1/BatchOptimizeToursResponse.php | 34 - .../Cloud/Optimization/V1/BreakRule.php | 113 - .../V1/BreakRule/BreakRequest.php | 172 - .../V1/BreakRule/FrequencyConstraint.php | 166 - .../Optimization/V1/CapacityQuantity.php | 90 - .../V1/CapacityQuantityInterval.php | 137 - .../Cloud/Optimization/V1/DataFormat.php | 61 - .../Cloud/Optimization/V1/DistanceLimit.php | 284 - .../Cloud/Optimization/V1/GcsDestination.php | 67 - .../Cloud/Optimization/V1/GcsSource.php | 67 - .../V1/InjectedSolutionConstraint.php | 156 - .../ConstraintRelaxation.php | 151 - .../ConstraintRelaxation/Relaxation.php | 204 - .../ConstraintRelaxation/Relaxation/Level.php | 83 - .../Cloud/Optimization/V1/InputConfig.php | 112 - .../Google/Cloud/Optimization/V1/Location.php | 133 - .../Optimization/V1/OptimizeToursRequest.php | 1237 --- .../V1/OptimizeToursRequest/SearchMode.php | 65 - .../V1/OptimizeToursRequest/SolvingMode.php | 83 - .../Optimization/V1/OptimizeToursResponse.php | 294 - .../V1/OptimizeToursResponse/Metrics.php | 372 - .../V1/OptimizeToursValidationError.php | 1207 --- .../FieldReference.php | 197 - .../Cloud/Optimization/V1/OutputConfig.php | 109 - .../Cloud/Optimization/V1/RouteModifiers.php | 204 - .../Google/Cloud/Optimization/V1/Shipment.php | 850 -- .../Cloud/Optimization/V1/Shipment/Load.php | 81 - .../Optimization/V1/Shipment/VisitRequest.php | 658 -- .../Cloud/Optimization/V1/ShipmentModel.php | 1057 --- .../V1/ShipmentModel/BreakRule.php | 120 - .../ShipmentModel/BreakRule/BreakRequest.php | 172 - .../BreakRule/FrequencyConstraint.php | 166 - .../ShipmentModel/DurationDistanceMatrix.php | 137 - .../DurationDistanceMatrix/Row.php | 116 - .../V1/ShipmentModel/PrecedenceRule.php | 243 - .../Cloud/Optimization/V1/ShipmentRoute.php | 954 --- .../Optimization/V1/ShipmentRoute/Delay.php | 128 - .../V1/ShipmentRoute/EncodedPolyline.php | 73 - .../Optimization/V1/ShipmentRoute/PBBreak.php | 124 - .../V1/ShipmentRoute/Transition.php | 620 -- .../V1/ShipmentRoute/TravelStep.php | 236 - .../V1/ShipmentRoute/VehicleLoad.php | 80 - .../Optimization/V1/ShipmentRoute/Visit.php | 606 -- .../V1/ShipmentTypeIncompatibility.php | 107 - .../IncompatibilityMode.php | 72 - .../V1/ShipmentTypeRequirement.php | 156 - .../RequirementMode.php | 80 - .../Cloud/Optimization/V1/SkippedShipment.php | 153 - .../V1/SkippedShipment/Reason.php | 181 - .../V1/SkippedShipment/Reason/Code.php | 116 - .../Cloud/Optimization/V1/TimeWindow.php | 388 - .../Optimization/V1/TransitionAttributes.php | 408 - .../Google/Cloud/Optimization/V1/Vehicle.php | 1581 ---- .../Optimization/V1/Vehicle/DurationLimit.php | 359 - .../Optimization/V1/Vehicle/LoadLimit.php | 270 - .../V1/Vehicle/LoadLimit/Interval.php | 150 - .../Optimization/V1/Vehicle/TravelMode.php | 67 - .../V1/Vehicle/UnloadingPolicy.php | 68 - .../Google/Cloud/Optimization/V1/Waypoint.php | 166 - .../batch_optimize_tours.php | 105 - .../V1/FleetRoutingClient/optimize_tours.php | 87 - .../v1/src/V1/Client/FleetRoutingClient.php | 314 - .../v1/src/V1/gapic_metadata.json | 28 - .../fleet_routing_client_config.json | 56 - .../fleet_routing_descriptor_config.php | 59 - .../fleet_routing_rest_client_config.php | 86 - .../Unit/V1/Client/FleetRoutingClientTest.php | 329 - .../Oracledatabase/V1/AutonomousDatabase.php | Bin 10121 -> 0 bytes .../V1/AutonomousDatabaseCharacterSet.php | Bin 1639 -> 0 bytes .../Oracledatabase/V1/AutonomousDbBackup.php | Bin 2777 -> 0 bytes .../Oracledatabase/V1/AutonomousDbVersion.php | 36 - .../Google/Cloud/Oracledatabase/V1/Common.php | 30 - .../Google/Cloud/Oracledatabase/V1/DbNode.php | Bin 1729 -> 0 bytes .../Cloud/Oracledatabase/V1/DbServer.php | Bin 1820 -> 0 bytes .../Cloud/Oracledatabase/V1/DbSystemShape.php | 44 - .../Cloud/Oracledatabase/V1/Entitlement.php | Bin 1722 -> 0 bytes .../Cloud/Oracledatabase/V1/ExadataInfra.php | Bin 4076 -> 0 bytes .../Cloud/Oracledatabase/V1/GiVersion.php | 34 - .../Oracledatabase/V1/LocationMetadata.php | 30 - .../Oracledatabase/V1/Oracledatabase.php | 236 - .../Cloud/Oracledatabase/V1/VmCluster.php | Bin 3650 -> 0 bytes .../V1/AllConnectionStrings.php | 148 - .../OracleDatabase/V1/AutonomousDatabase.php | 422 - .../V1/AutonomousDatabaseApex.php | 102 - .../V1/AutonomousDatabaseBackup.php | 234 - .../V1/AutonomousDatabaseBackupProperties.php | 775 -- .../State.php | 92 - .../Type.php | 71 - .../V1/AutonomousDatabaseCharacterSet.php | 148 - .../CharacterSetType.php | 64 - .../AutonomousDatabaseConnectionStrings.php | 276 - .../V1/AutonomousDatabaseConnectionUrls.php | 327 - .../V1/AutonomousDatabaseProperties.php | 2197 ------ .../DataSafeState.php | 85 - .../DatabaseEdition.php | 64 - .../DatabaseManagementState.php | 92 - .../LicenseType.php | 64 - .../LocalDisasterRecoveryType.php | 64 - .../MaintenanceScheduleType.php | 65 - .../AutonomousDatabaseProperties/OpenMode.php | 64 - .../PermissionLevel.php | 64 - .../RefreshableMode.php | 66 - .../RefreshableState.php | 64 - .../V1/AutonomousDatabaseProperties/Role.php | 85 - .../V1/AutonomousDatabaseStandbySummary.php | 250 - .../OracleDatabase/V1/AutonomousDbVersion.php | 182 - .../OracleDatabase/V1/CloudAccountDetails.php | 189 - .../V1/CloudExadataInfrastructure.php | 304 - .../CloudExadataInfrastructureProperties.php | 1025 --- .../State.php | 99 - .../OracleDatabase/V1/CloudVmCluster.php | 414 - .../V1/CloudVmClusterProperties.php | 1157 --- .../DiskRedundancy.php | 64 - .../CloudVmClusterProperties/LicenseType.php | 64 - .../V1/CloudVmClusterProperties/State.php | 99 - .../V1/CreateAutonomousDatabaseRequest.php | 241 - ...reateCloudExadataInfrastructureRequest.php | 241 - .../V1/CreateCloudVmClusterRequest.php | 241 - .../OracleDatabase/V1/CustomerContact.php | 72 - .../Cloud/OracleDatabase/V1/DBWorkload.php | 76 - .../V1/DataCollectionOptions.php | 143 - .../V1/DatabaseConnectionStringProfile.php | 352 - .../ConsumerGroup.php | 85 - .../HostFormat.php | 64 - .../Protocol.php | 64 - .../SessionMode.php | 64 - .../SyntaxFormat.php | 71 - .../TLSAuthentication.php | 64 - .../Google/Cloud/OracleDatabase/V1/DbNode.php | 116 - .../OracleDatabase/V1/DbNodeProperties.php | 305 - .../V1/DbNodeProperties/State.php | 113 - .../Cloud/OracleDatabase/V1/DbServer.php | 150 - .../OracleDatabase/V1/DbServerProperties.php | 373 - .../V1/DbServerProperties/State.php | 85 - .../Cloud/OracleDatabase/V1/DbSystemShape.php | 446 -- .../V1/DeleteAutonomousDatabaseRequest.php | 144 - ...eleteCloudExadataInfrastructureRequest.php | 191 - .../V1/DeleteCloudVmClusterRequest.php | 186 - .../Cloud/OracleDatabase/V1/Entitlement.php | 183 - .../OracleDatabase/V1/Entitlement/State.php | 71 - ...enerateAutonomousDatabaseWalletRequest.php | 210 - ...nerateAutonomousDatabaseWalletResponse.php | 67 - .../Cloud/OracleDatabase/V1/GenerateType.php | 61 - .../V1/GetAutonomousDatabaseRequest.php | 86 - .../GetCloudExadataInfrastructureRequest.php | 91 - .../V1/GetCloudVmClusterRequest.php | 86 - .../Cloud/OracleDatabase/V1/GiVersion.php | 110 - .../ListAutonomousDatabaseBackupsRequest.php | 220 - .../ListAutonomousDatabaseBackupsResponse.php | 101 - ...AutonomousDatabaseCharacterSetsRequest.php | 208 - ...utonomousDatabaseCharacterSetsResponse.php | 101 - .../V1/ListAutonomousDatabasesRequest.php | 230 - .../V1/ListAutonomousDatabasesResponse.php | 101 - .../V1/ListAutonomousDbVersionsRequest.php | 162 - .../V1/ListAutonomousDbVersionsResponse.php | 101 - ...ListCloudExadataInfrastructuresRequest.php | 162 - ...istCloudExadataInfrastructuresResponse.php | 101 - .../V1/ListCloudVmClustersRequest.php | 196 - .../V1/ListCloudVmClustersResponse.php | 101 - .../OracleDatabase/V1/ListDbNodesRequest.php | 162 - .../OracleDatabase/V1/ListDbNodesResponse.php | 101 - .../V1/ListDbServersRequest.php | 162 - .../V1/ListDbServersResponse.php | 101 - .../V1/ListDbSystemShapesRequest.php | 162 - .../V1/ListDbSystemShapesResponse.php | 101 - .../V1/ListEntitlementsRequest.php | 162 - .../V1/ListEntitlementsResponse.php | 101 - .../V1/ListGiVersionsRequest.php | 166 - .../V1/ListGiVersionsResponse.php | 101 - .../OracleDatabase/V1/LocationMetadata.php | 67 - .../OracleDatabase/V1/MaintenanceWindow.php | 404 - .../MaintenanceWindowPreference.php | 64 - .../V1/MaintenanceWindow/PatchingMode.php | 65 - .../OracleDatabase/V1/OperationMetadata.php | 345 - .../V1/OperationsInsightsState.php | 89 - .../V1/RestoreAutonomousDatabaseRequest.php | 132 - .../V1/ScheduledOperationDetails.php | 156 - .../Google/Cloud/OracleDatabase/V1/State.php | 195 - .../create_autonomous_database.php | 109 - .../create_cloud_exadata_infrastructure.php | 94 - .../create_cloud_vm_cluster.php | 126 - .../delete_autonomous_database.php | 85 - .../delete_cloud_exadata_infrastructure.php | 86 - .../delete_cloud_vm_cluster.php | 85 - .../generate_autonomous_database_wallet.php | 80 - .../get_autonomous_database.php | 76 - .../get_cloud_exadata_infrastructure.php | 77 - .../get_cloud_vm_cluster.php | 76 - .../V1/OracleDatabaseClient/get_location.php | 57 - .../list_autonomous_database_backups.php | 75 - ...ist_autonomous_database_character_sets.php | 75 - .../list_autonomous_databases.php | 75 - .../list_autonomous_db_versions.php | 76 - .../list_cloud_exadata_infrastructures.php | 75 - .../list_cloud_vm_clusters.php | 75 - .../V1/OracleDatabaseClient/list_db_nodes.php | 79 - .../OracleDatabaseClient/list_db_servers.php | 79 - .../list_db_system_shapes.php | 75 - .../list_entitlements.php | 75 - .../OracleDatabaseClient/list_gi_versions.php | 76 - .../OracleDatabaseClient/list_locations.php | 60 - .../restore_autonomous_database.php | 91 - .../v1/src/V1/Client/OracleDatabaseClient.php | 1047 --- .../v1/src/V1/gapic_metadata.json | 138 - .../oracle_database_client_config.json | 167 - .../oracle_database_descriptor_config.php | 470 -- .../oracle_database_rest_client_config.php | 356 - .../V1/Client/OracleDatabaseClientTest.php | 2376 ------ .../Airflow/Service/V1/Environments.php | Bin 23403 -> 0 bytes .../Airflow/Service/V1/ImageVersions.php | 49 - .../Airflow/Service/V1/Operations.php | Bin 1505 -> 0 bytes .../AirflowMetadataRetentionPolicyConfig.php | 101 - .../RetentionMode.php | 64 - .../Service/V1/CheckUpgradeRequest.php | 185 - .../Service/V1/CheckUpgradeResponse.php | 212 - .../CheckUpgradeResponse/ConflictResult.php | 64 - .../V1/CloudDataLineageIntegration.php | 67 - .../Service/V1/CreateEnvironmentRequest.php | 131 - .../CreateUserWorkloadsConfigMapRequest.php | 132 - .../V1/CreateUserWorkloadsSecretRequest.php | 132 - .../Service/V1/DataRetentionConfig.php | 121 - .../Airflow/Service/V1/DatabaseConfig.php | 134 - .../Service/V1/DatabaseFailoverRequest.php | 72 - .../Service/V1/DatabaseFailoverResponse.php | 33 - .../Service/V1/DeleteEnvironmentRequest.php | 85 - .../DeleteUserWorkloadsConfigMapRequest.php | 86 - .../V1/DeleteUserWorkloadsSecretRequest.php | 86 - .../Airflow/Service/V1/EncryptionConfig.php | 77 - .../Airflow/Service/V1/Environment.php | 453 -- .../Airflow/Service/V1/Environment/State.php | 86 - .../Airflow/Service/V1/EnvironmentConfig.php | 979 --- .../V1/EnvironmentConfig/EnvironmentSize.php | 71 - .../V1/EnvironmentConfig/ResilienceMode.php | 57 - .../V1/ExecuteAirflowCommandRequest.php | 185 - .../V1/ExecuteAirflowCommandResponse.php | 169 - .../V1/FetchDatabasePropertiesRequest.php | 71 - .../V1/FetchDatabasePropertiesResponse.php | 147 - .../Service/V1/GetEnvironmentRequest.php | 85 - .../V1/GetUserWorkloadsConfigMapRequest.php | 86 - .../V1/GetUserWorkloadsSecretRequest.php | 86 - .../Airflow/Service/V1/IPAllocationPolicy.php | 318 - .../Airflow/Service/V1/ImageVersion.php | 259 - .../Service/V1/ListEnvironmentsRequest.php | 153 - .../Service/V1/ListEnvironmentsResponse.php | 101 - .../Service/V1/ListImageVersionsRequest.php | 187 - .../Service/V1/ListImageVersionsResponse.php | 101 - .../V1/ListUserWorkloadsConfigMapsRequest.php | 158 - .../ListUserWorkloadsConfigMapsResponse.php | 101 - .../V1/ListUserWorkloadsSecretsRequest.php | 158 - .../V1/ListUserWorkloadsSecretsResponse.php | 101 - .../Service/V1/ListWorkloadsRequest.php | 212 - .../Service/V1/ListWorkloadsResponse.php | 101 - .../ComposerWorkload.php | 148 - .../ComposerWorkloadState.php | 92 - .../ComposerWorkloadStatus.php | 138 - .../ComposerWorkloadType.php | 106 - .../Service/V1/LoadSnapshotRequest.php | 261 - .../Service/V1/LoadSnapshotResponse.php | 33 - .../Airflow/Service/V1/MaintenanceWindow.php | 185 - .../V1/MasterAuthorizedNetworksConfig.php | 108 - .../CidrBlock.php | 104 - .../Airflow/Service/V1/NetworkingConfig.php | 76 - .../V1/NetworkingConfig/ConnectionType.php | 69 - .../Airflow/Service/V1/NodeConfig.php | 776 -- .../Airflow/Service/V1/OperationMetadata.php | 265 - .../Service/V1/OperationMetadata/State.php | 83 - .../Service/V1/OperationMetadata/Type.php | 100 - .../Service/V1/PollAirflowCommandRequest.php | 207 - .../Service/V1/PollAirflowCommandResponse.php | 149 - .../PollAirflowCommandResponse/ExitInfo.php | 104 - .../V1/PollAirflowCommandResponse/Line.php | 104 - .../Service/V1/PrivateClusterConfig.php | 160 - .../Service/V1/PrivateEnvironmentConfig.php | 564 -- .../Airflow/Service/V1/RecoveryConfig.php | 77 - .../Service/V1/SaveSnapshotRequest.php | 109 - .../Service/V1/SaveSnapshotResponse.php | 79 - .../Service/V1/ScheduledSnapshotsConfig.php | 185 - .../Airflow/Service/V1/SoftwareConfig.php | 583 -- .../SoftwareConfig/WebServerPluginsMode.php | 64 - .../Service/V1/StopAirflowCommandRequest.php | 211 - .../Service/V1/StopAirflowCommandResponse.php | 101 - .../Airflow/Service/V1/StorageConfig.php | 71 - .../Service/V1/TaskLogsRetentionConfig.php | 67 - .../TaskLogsStorageMode.php | 65 - .../Service/V1/UpdateEnvironmentRequest.php | 756 -- .../UpdateUserWorkloadsConfigMapRequest.php | 90 - .../V1/UpdateUserWorkloadsSecretRequest.php | 90 - .../Service/V1/UserWorkloadsConfigMap.php | 134 - .../Service/V1/UserWorkloadsSecret.php | 138 - .../Airflow/Service/V1/WebServerConfig.php | 89 - .../V1/WebServerNetworkAccessControl.php | 67 - .../AllowedIpRange.php | 132 - .../Airflow/Service/V1/WorkloadsConfig.php | 263 - .../WorkloadsConfig/DagProcessorResource.php | 190 - .../V1/WorkloadsConfig/SchedulerResource.php | 180 - .../V1/WorkloadsConfig/TriggererResource.php | 142 - .../V1/WorkloadsConfig/WebServerResource.php | 138 - .../V1/WorkloadsConfig/WorkerResource.php | 214 - .../V1/EnvironmentsClient/check_upgrade.php | 86 - .../EnvironmentsClient/create_environment.php | 69 - .../create_user_workloads_config_map.php | 77 - .../create_user_workloads_secret.php | 77 - .../EnvironmentsClient/database_failover.php | 69 - .../EnvironmentsClient/delete_environment.php | 66 - .../delete_user_workloads_config_map.php | 78 - .../delete_user_workloads_secret.php | 78 - .../execute_airflow_command.php | 57 - .../fetch_database_properties.php | 76 - .../V1/EnvironmentsClient/get_environment.php | 57 - .../get_user_workloads_config_map.php | 80 - .../get_user_workloads_secret.php | 81 - .../EnvironmentsClient/list_environments.php | 62 - .../list_user_workloads_config_maps.php | 80 - .../list_user_workloads_secrets.php | 80 - .../V1/EnvironmentsClient/list_workloads.php | 81 - .../V1/EnvironmentsClient/load_snapshot.php | 72 - .../poll_airflow_command.php | 57 - .../V1/EnvironmentsClient/save_snapshot.php | 72 - .../stop_airflow_command.php | 57 - .../EnvironmentsClient/update_environment.php | 69 - .../update_user_workloads_config_map.php | 60 - .../update_user_workloads_secret.php | 60 - .../list_image_versions.php | 62 - .../v1/src/V1/Client/EnvironmentsClient.php | 1040 --- .../v1/src/V1/Client/ImageVersionsClient.php | 193 - .../v1/src/V1/gapic_metadata.json | 152 - .../resources/environments_client_config.json | 142 - .../environments_descriptor_config.php | 404 - .../environments_rest_client_config.php | 343 - .../image_versions_client_config.json | 27 - .../image_versions_descriptor_config.php | 48 - .../image_versions_rest_client_config.php | 75 - .../Unit/V1/Client/EnvironmentsClientTest.php | 2084 ----- .../V1/Client/ImageVersionsClientTest.php | 159 - .../Google/Cloud/Orgpolicy/V2/Constraint.php | Bin 2426 -> 0 bytes .../Google/Cloud/Orgpolicy/V2/Orgpolicy.php | Bin 7185 -> 0 bytes .../OrgPolicy/V2/AlternatePolicySpec.php | 120 - .../Google/Cloud/OrgPolicy/V2/Constraint.php | 322 - .../V2/Constraint/BooleanConstraint.php | 39 - .../V2/Constraint/ConstraintDefault.php | 69 - .../V2/Constraint/ListConstraint.php | 125 - .../V2/CreateCustomConstraintRequest.php | 134 - .../OrgPolicy/V2/CreatePolicyRequest.php | 154 - .../Cloud/OrgPolicy/V2/CustomConstraint.php | 375 - .../V2/CustomConstraint/ActionType.php | 64 - .../V2/CustomConstraint/MethodType.php | 91 - .../V2/DeleteCustomConstraintRequest.php | 87 - .../OrgPolicy/V2/DeletePolicyRequest.php | 129 - .../V2/GetCustomConstraintRequest.php | 87 - .../V2/GetEffectivePolicyRequest.php | 87 - .../Cloud/OrgPolicy/V2/GetPolicyRequest.php | 87 - .../OrgPolicy/V2/ListConstraintsRequest.php | 188 - .../OrgPolicy/V2/ListConstraintsResponse.php | 102 - .../V2/ListCustomConstraintsRequest.php | 178 - .../V2/ListCustomConstraintsResponse.php | 111 - .../OrgPolicy/V2/ListPoliciesRequest.php | 193 - .../OrgPolicy/V2/ListPoliciesResponse.php | 111 - .../src/Google/Cloud/OrgPolicy/V2/Policy.php | 297 - .../Google/Cloud/OrgPolicy/V2/PolicySpec.php | 310 - .../OrgPolicy/V2/PolicySpec/PolicyRule.php | 280 - .../V2/PolicySpec/PolicyRule/StringValues.php | 118 - .../V2/UpdateCustomConstraintRequest.php | 91 - .../OrgPolicy/V2/UpdatePolicyRequest.php | 143 - .../create_custom_constraint.php | 80 - .../V2/OrgPolicyClient/create_policy.php | 84 - .../delete_custom_constraint.php | 73 - .../V2/OrgPolicyClient/delete_policy.php | 73 - .../OrgPolicyClient/get_custom_constraint.php | 75 - .../OrgPolicyClient/get_effective_policy.php | 77 - .../samples/V2/OrgPolicyClient/get_policy.php | 76 - .../V2/OrgPolicyClient/list_constraints.php | 82 - .../list_custom_constraints.php | 81 - .../V2/OrgPolicyClient/list_policies.php | 83 - .../update_custom_constraint.php | 65 - .../V2/OrgPolicyClient/update_policy.php | 67 - .../v2/src/V2/Client/OrgPolicyClient.php | 729 -- .../OrgPolicy/v2/src/V2/gapic_metadata.json | 78 - .../resources/org_policy_client_config.json | 95 - .../org_policy_descriptor_config.php | 208 - .../org_policy_rest_client_config.php | 241 - .../Unit/V2/Client/OrgPolicyClientTest.php | 942 --- .../Google/Cloud/Osconfig/V1/Inventory.php | Bin 4419 -> 0 bytes .../Google/Cloud/Osconfig/V1/OsPolicy.php | Bin 5077 -> 0 bytes .../Osconfig/V1/OsPolicyAssignmentReports.php | Bin 3585 -> 0 bytes .../Cloud/Osconfig/V1/OsPolicyAssignments.php | Bin 4721 -> 0 bytes .../Cloud/Osconfig/V1/OsconfigCommon.php | Bin 889 -> 0 bytes .../Cloud/Osconfig/V1/OsconfigService.php | 47 - .../Osconfig/V1/OsconfigZonalService.php | 50 - .../Cloud/Osconfig/V1/PatchDeployments.php | Bin 4584 -> 0 bytes .../Google/Cloud/Osconfig/V1/PatchJobs.php | Bin 6898 -> 0 bytes .../Cloud/Osconfig/V1/Vulnerability.php | Bin 3891 -> 0 bytes .../Google/Cloud/OsConfig/V1/AptSettings.php | 152 - .../Cloud/OsConfig/V1/AptSettings/Type.php | 64 - .../src/Google/Cloud/OsConfig/V1/CVSSv3.php | 460 -- .../OsConfig/V1/CVSSv3/AttackComplexity.php | 71 - .../Cloud/OsConfig/V1/CVSSv3/AttackVector.php | 84 - .../Cloud/OsConfig/V1/CVSSv3/Impact.php | 73 - .../OsConfig/V1/CVSSv3/PrivilegesRequired.php | 79 - .../Google/Cloud/OsConfig/V1/CVSSv3/Scope.php | 67 - .../OsConfig/V1/CVSSv3/UserInteraction.php | 67 - .../OsConfig/V1/CancelPatchJobRequest.php | 67 - .../V1/CreateOSPolicyAssignmentRequest.php | 199 - .../V1/CreatePatchDeploymentRequest.php | 198 - .../V1/DeleteOSPolicyAssignmentRequest.php | 81 - .../V1/DeletePatchDeploymentRequest.php | 86 - .../src/Google/Cloud/OsConfig/V1/ExecStep.php | 121 - .../Cloud/OsConfig/V1/ExecStepConfig.php | 192 - .../V1/ExecStepConfig/Interpreter.php | 68 - .../OsConfig/V1/ExecutePatchJobRequest.php | 366 - .../Cloud/OsConfig/V1/FixedOrPercent.php | 112 - .../Google/Cloud/OsConfig/V1/GcsObject.php | 139 - .../Cloud/OsConfig/V1/GetInventoryRequest.php | 146 - .../V1/GetOSPolicyAssignmentReportRequest.php | 113 - .../V1/GetOSPolicyAssignmentRequest.php | 92 - .../OsConfig/V1/GetPatchDeploymentRequest.php | 86 - .../Cloud/OsConfig/V1/GetPatchJobRequest.php | 81 - .../V1/GetVulnerabilityReportRequest.php | 108 - .../Google/Cloud/OsConfig/V1/GooSettings.php | 33 - .../src/Google/Cloud/OsConfig/V1/Instance.php | 33 - .../Cloud/OsConfig/V1/Instance/PatchState.php | 157 - .../Google/Cloud/OsConfig/V1/Inventory.php | 213 - .../Cloud/OsConfig/V1/Inventory/Item.php | 301 - .../OsConfig/V1/Inventory/Item/OriginType.php | 58 - .../Cloud/OsConfig/V1/Inventory/Item/Type.php | 64 - .../Cloud/OsConfig/V1/Inventory/OsInfo.php | 320 - .../OsConfig/V1/Inventory/SoftwarePackage.php | 387 - .../V1/Inventory/VersionedPackage.php | 139 - .../V1/Inventory/WindowsApplication.php | 226 - .../WindowsQuickFixEngineeringPackage.php | 185 - .../V1/Inventory/WindowsUpdatePackage.php | 368 - .../WindowsUpdateCategory.php | 104 - .../OsConfig/V1/Inventory/ZypperPatch.php | 172 - .../Cloud/OsConfig/V1/InventoryView.php | 62 - .../OsConfig/V1/ListInventoriesRequest.php | 246 - .../OsConfig/V1/ListInventoriesResponse.php | 102 - .../ListOSPolicyAssignmentReportsRequest.php | 283 - .../ListOSPolicyAssignmentReportsResponse.php | 106 - ...ListOSPolicyAssignmentRevisionsRequest.php | 157 - ...istOSPolicyAssignmentRevisionsResponse.php | 105 - .../V1/ListOSPolicyAssignmentsRequest.php | 157 - .../V1/ListOSPolicyAssignmentsResponse.php | 101 - .../V1/ListPatchDeploymentsRequest.php | 161 - .../V1/ListPatchDeploymentsResponse.php | 105 - .../V1/ListPatchJobInstanceDetailsRequest.php | 200 - .../ListPatchJobInstanceDetailsResponse.php | 101 - .../OsConfig/V1/ListPatchJobsRequest.php | 195 - .../OsConfig/V1/ListPatchJobsResponse.php | 101 - .../V1/ListVulnerabilityReportsRequest.php | 208 - .../V1/ListVulnerabilityReportsResponse.php | 106 - .../Cloud/OsConfig/V1/MonthlySchedule.php | 118 - .../src/Google/Cloud/OsConfig/V1/OSPolicy.php | 263 - .../OsConfig/V1/OSPolicy/InventoryFilter.php | 120 - .../Cloud/OsConfig/V1/OSPolicy/Mode.php | 67 - .../Cloud/OsConfig/V1/OSPolicy/Resource.php | 235 - .../V1/OSPolicy/Resource/ExecResource.php | 165 - .../OSPolicy/Resource/ExecResource/Exec.php | 236 - .../ExecResource/Exec/Interpreter.php | 76 - .../OsConfig/V1/OSPolicy/Resource/File.php | 190 - .../V1/OSPolicy/Resource/File/Gcs.php | 138 - .../V1/OSPolicy/Resource/File/Remote.php | 108 - .../V1/OSPolicy/Resource/FileResource.php | 260 - .../Resource/FileResource/DesiredState.php | 72 - .../V1/OSPolicy/Resource/PackageResource.php | 310 - .../OSPolicy/Resource/PackageResource/APT.php | 72 - .../OSPolicy/Resource/PackageResource/Deb.php | 126 - .../Resource/PackageResource/DesiredState.php | 65 - .../Resource/PackageResource/GooGet.php | 72 - .../OSPolicy/Resource/PackageResource/MSI.php | 126 - .../OSPolicy/Resource/PackageResource/RPM.php | 126 - .../OSPolicy/Resource/PackageResource/YUM.php | 72 - .../Resource/PackageResource/Zypper.php | 72 - .../OSPolicy/Resource/RepositoryResource.php | 177 - .../RepositoryResource/AptRepository.php | 216 - .../AptRepository/ArchiveType.php | 64 - .../RepositoryResource/GooRepository.php | 106 - .../RepositoryResource/YumRepository.php | 186 - .../RepositoryResource/ZypperRepository.php | 186 - .../OsConfig/V1/OSPolicy/ResourceGroup.php | 149 - .../Cloud/OsConfig/V1/OSPolicyAssignment.php | 597 -- .../V1/OSPolicyAssignment/InstanceFilter.php | 202 - .../InstanceFilter/Inventory.php | 120 - .../V1/OSPolicyAssignment/LabelSet.php | 86 - .../V1/OSPolicyAssignment/Rollout.php | 145 - .../V1/OSPolicyAssignment/RolloutState.php | 78 - .../OSPolicyAssignmentOperationMetadata.php | 232 - .../APIMethod.php | 71 - .../RolloutState.php | 78 - .../OsConfig/V1/OSPolicyAssignmentReport.php | 287 - .../OSPolicyCompliance.php | 244 - .../OSPolicyCompliance/ComplianceState.php | 70 - .../OSPolicyResourceCompliance.php | 262 - .../ComplianceState.php | 66 - .../ExecResourceOutput.php | 74 - .../OSPolicyResourceConfigStep.php | 109 - .../OSPolicyResourceConfigStep/Type.php | 84 - .../Cloud/OsConfig/V1/OneTimeSchedule.php | 78 - .../Google/Cloud/OsConfig/V1/PatchConfig.php | 426 - .../OsConfig/V1/PatchConfig/RebootConfig.php | 78 - .../Cloud/OsConfig/V1/PatchDeployment.php | 558 -- .../OsConfig/V1/PatchDeployment/State.php | 65 - .../Cloud/OsConfig/V1/PatchInstanceFilter.php | 238 - .../V1/PatchInstanceFilter/GroupLabel.php | 80 - .../src/Google/Cloud/OsConfig/V1/PatchJob.php | 643 -- .../V1/PatchJob/InstanceDetailsSummary.php | 557 -- .../Cloud/OsConfig/V1/PatchJob/State.php | 100 - .../OsConfig/V1/PatchJobInstanceDetails.php | 210 - .../Google/Cloud/OsConfig/V1/PatchRollout.php | 184 - .../Cloud/OsConfig/V1/PatchRollout/Mode.php | 69 - .../V1/PausePatchDeploymentRequest.php | 86 - .../Cloud/OsConfig/V1/RecurringSchedule.php | 418 - .../V1/RecurringSchedule/Frequency.php | 74 - .../V1/ResumePatchDeploymentRequest.php | 86 - .../V1/UpdateOSPolicyAssignmentRequest.php | 141 - .../V1/UpdatePatchDeploymentRequest.php | 141 - .../Cloud/OsConfig/V1/VulnerabilityReport.php | 160 - .../V1/VulnerabilityReport/Vulnerability.php | 320 - .../Vulnerability/Details.php | 263 - .../Vulnerability/Details/Reference.php | 104 - .../Vulnerability/Item.php | 213 - .../Cloud/OsConfig/V1/WeekDayOfMonth.php | 163 - .../Cloud/OsConfig/V1/WeeklySchedule.php | 67 - .../OsConfig/V1/WindowsUpdateSettings.php | 147 - .../WindowsUpdateSettings/Classification.php | 132 - .../Google/Cloud/OsConfig/V1/YumSettings.php | 191 - .../Cloud/OsConfig/V1/ZypperSettings.php | 254 - .../cancel_patch_job.php | 72 - .../create_patch_deployment.php | 92 - .../delete_patch_deployment.php | 70 - .../execute_patch_job.php | 74 - .../get_patch_deployment.php | 72 - .../OsConfigServiceClient/get_patch_job.php | 72 - .../list_patch_deployments.php | 76 - .../list_patch_job_instance_details.php | 77 - .../OsConfigServiceClient/list_patch_jobs.php | 76 - .../pause_patch_deployment.php | 73 - .../resume_patch_deployment.php | 73 - .../update_patch_deployment.php | 68 - .../create_os_policy_assignment.php | 161 - .../delete_os_policy_assignment.php | 95 - .../get_inventory.php | 79 - .../get_os_policy_assignment.php | 82 - .../get_os_policy_assignment_report.php | 85 - .../get_vulnerability_report.php | 83 - .../list_inventories.php | 80 - .../list_os_policy_assignment_reports.php | 102 - .../list_os_policy_assignment_revisions.php | 80 - .../list_os_policy_assignments.php | 78 - .../list_vulnerability_reports.php | 80 - .../update_os_policy_assignment.php | 142 - .../src/V1/Client/OsConfigServiceClient.php | 595 -- .../V1/Client/OsConfigZonalServiceClient.php | 821 -- .../OsConfig/v1/src/V1/gapic_metadata.json | 147 - .../os_config_service_client_config.json | 94 - .../os_config_service_descriptor_config.php | 202 - .../os_config_service_rest_client_config.php | 196 - ...os_config_zonal_service_client_config.json | 94 - ...config_zonal_service_descriptor_config.php | 245 - ...onfig_zonal_service_rest_client_config.php | 192 - .../V1/Client/OsConfigServiceClientTest.php | 1000 --- .../Client/OsConfigZonalServiceClientTest.php | 1271 --- .../Google/Cloud/Oslogin/Common/Common.php | Bin 1639 -> 0 bytes .../Google/Cloud/Oslogin/V1/Oslogin.php | 80 - .../OsLogin/Common/OperatingSystemType.php | 62 - .../Cloud/OsLogin/Common/PosixAccount.php | 411 - .../Cloud/OsLogin/Common/SshPublicKey.php | 177 - .../OsLogin/V1/CreateSshPublicKeyRequest.php | 127 - .../OsLogin/V1/DeletePosixAccountRequest.php | 91 - .../OsLogin/V1/DeleteSshPublicKeyRequest.php | 91 - .../OsLogin/V1/GetLoginProfileRequest.php | 149 - .../OsLogin/V1/GetSshPublicKeyRequest.php | 91 - .../OsLogin/V1/ImportSshPublicKeyRequest.php | 221 - .../OsLogin/V1/ImportSshPublicKeyResponse.php | 111 - .../Google/Cloud/OsLogin/V1/LoginProfile.php | 136 - .../OsLogin/V1/UpdateSshPublicKeyRequest.php | 201 - .../create_ssh_public_key.php | 73 - .../delete_posix_account.php | 71 - .../delete_ssh_public_key.php | 71 - .../get_login_profile.php | 72 - .../get_ssh_public_key.php | 73 - .../import_ssh_public_key.php | 73 - .../update_ssh_public_key.php | 76 - .../v1/src/V1/Client/OsLoginServiceClient.php | 451 -- .../OsLogin/v1/src/V1/gapic_metadata.json | 53 - .../os_login_service_client_config.json | 70 - .../os_login_service_descriptor_config.php | 117 - .../os_login_service_rest_client_config.php | 109 - .../V1/Client/OsLoginServiceClientTest.php | 582 -- 2392 files changed, 216 insertions(+), 433524 deletions(-) delete mode 100644 owl-bot-staging/ManagedIdentities/v1/proto/src/GPBMetadata/Google/Cloud/Managedidentities/V1/ManagedIdentitiesService.php delete mode 100644 owl-bot-staging/ManagedIdentities/v1/proto/src/GPBMetadata/Google/Cloud/Managedidentities/V1/Resource.php delete mode 100644 owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/AttachTrustRequest.php delete mode 100644 owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/CreateMicrosoftAdDomainRequest.php delete mode 100644 owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/DeleteDomainRequest.php delete mode 100644 owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/DetachTrustRequest.php delete mode 100644 owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/Domain.php delete mode 100644 owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/Domain/State.php delete mode 100644 owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/GetDomainRequest.php delete mode 100644 owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/ListDomainsRequest.php delete mode 100644 owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/ListDomainsResponse.php delete mode 100644 owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/OpMetadata.php delete mode 100644 owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/ReconfigureTrustRequest.php delete mode 100644 owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/ResetAdminPasswordRequest.php delete mode 100644 owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/ResetAdminPasswordResponse.php delete mode 100644 owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/Trust.php delete mode 100644 owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/Trust/State.php delete mode 100644 owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/Trust/TrustDirection.php delete mode 100644 owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/Trust/TrustType.php delete mode 100644 owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/UpdateDomainRequest.php delete mode 100644 owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/ValidateTrustRequest.php delete mode 100644 owl-bot-staging/ManagedIdentities/v1/samples/V1/ManagedIdentitiesServiceClient/attach_trust.php delete mode 100644 owl-bot-staging/ManagedIdentities/v1/samples/V1/ManagedIdentitiesServiceClient/create_microsoft_ad_domain.php delete mode 100644 owl-bot-staging/ManagedIdentities/v1/samples/V1/ManagedIdentitiesServiceClient/delete_domain.php delete mode 100644 owl-bot-staging/ManagedIdentities/v1/samples/V1/ManagedIdentitiesServiceClient/detach_trust.php delete mode 100644 owl-bot-staging/ManagedIdentities/v1/samples/V1/ManagedIdentitiesServiceClient/get_domain.php delete mode 100644 owl-bot-staging/ManagedIdentities/v1/samples/V1/ManagedIdentitiesServiceClient/list_domains.php delete mode 100644 owl-bot-staging/ManagedIdentities/v1/samples/V1/ManagedIdentitiesServiceClient/reconfigure_trust.php delete mode 100644 owl-bot-staging/ManagedIdentities/v1/samples/V1/ManagedIdentitiesServiceClient/reset_admin_password.php delete mode 100644 owl-bot-staging/ManagedIdentities/v1/samples/V1/ManagedIdentitiesServiceClient/update_domain.php delete mode 100644 owl-bot-staging/ManagedIdentities/v1/samples/V1/ManagedIdentitiesServiceClient/validate_trust.php delete mode 100644 owl-bot-staging/ManagedIdentities/v1/src/V1/Client/ManagedIdentitiesServiceClient.php delete mode 100644 owl-bot-staging/ManagedIdentities/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/ManagedIdentities/v1/src/V1/resources/managed_identities_service_client_config.json delete mode 100644 owl-bot-staging/ManagedIdentities/v1/src/V1/resources/managed_identities_service_descriptor_config.php delete mode 100644 owl-bot-staging/ManagedIdentities/v1/src/V1/resources/managed_identities_service_rest_client_config.php delete mode 100644 owl-bot-staging/ManagedIdentities/v1/tests/Unit/V1/Client/ManagedIdentitiesServiceClientTest.php delete mode 100644 owl-bot-staging/ManagedKafka/v1/proto/src/GPBMetadata/Google/Cloud/Managedkafka/V1/ManagedKafka.php delete mode 100644 owl-bot-staging/ManagedKafka/v1/proto/src/GPBMetadata/Google/Cloud/Managedkafka/V1/Resources.php delete mode 100644 owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/AccessConfig.php delete mode 100644 owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/CapacityConfig.php delete mode 100644 owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/Cluster.php delete mode 100644 owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/Cluster/State.php delete mode 100644 owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/ConsumerGroup.php delete mode 100644 owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/ConsumerPartitionMetadata.php delete mode 100644 owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/ConsumerTopicMetadata.php delete mode 100644 owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/CreateClusterRequest.php delete mode 100644 owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/CreateTopicRequest.php delete mode 100644 owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/DeleteClusterRequest.php delete mode 100644 owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/DeleteConsumerGroupRequest.php delete mode 100644 owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/DeleteTopicRequest.php delete mode 100644 owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/GcpConfig.php delete mode 100644 owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/GetClusterRequest.php delete mode 100644 owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/GetConsumerGroupRequest.php delete mode 100644 owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/GetTopicRequest.php delete mode 100644 owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/ListClustersRequest.php delete mode 100644 owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/ListClustersResponse.php delete mode 100644 owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/ListConsumerGroupsRequest.php delete mode 100644 owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/ListConsumerGroupsResponse.php delete mode 100644 owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/ListTopicsRequest.php delete mode 100644 owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/ListTopicsResponse.php delete mode 100644 owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/NetworkConfig.php delete mode 100644 owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/OperationMetadata.php delete mode 100644 owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/RebalanceConfig.php delete mode 100644 owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/RebalanceConfig/Mode.php delete mode 100644 owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/Topic.php delete mode 100644 owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/UpdateClusterRequest.php delete mode 100644 owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/UpdateConsumerGroupRequest.php delete mode 100644 owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/UpdateTopicRequest.php delete mode 100644 owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/create_cluster.php delete mode 100644 owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/create_topic.php delete mode 100644 owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/delete_cluster.php delete mode 100644 owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/delete_consumer_group.php delete mode 100644 owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/delete_topic.php delete mode 100644 owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/get_cluster.php delete mode 100644 owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/get_consumer_group.php delete mode 100644 owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/get_location.php delete mode 100644 owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/get_topic.php delete mode 100644 owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/list_clusters.php delete mode 100644 owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/list_consumer_groups.php delete mode 100644 owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/list_locations.php delete mode 100644 owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/list_topics.php delete mode 100644 owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/update_cluster.php delete mode 100644 owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/update_consumer_group.php delete mode 100644 owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/update_topic.php delete mode 100644 owl-bot-staging/ManagedKafka/v1/src/V1/Client/ManagedKafkaClient.php delete mode 100644 owl-bot-staging/ManagedKafka/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/ManagedKafka/v1/src/V1/resources/managed_kafka_client_config.json delete mode 100644 owl-bot-staging/ManagedKafka/v1/src/V1/resources/managed_kafka_descriptor_config.php delete mode 100644 owl-bot-staging/ManagedKafka/v1/src/V1/resources/managed_kafka_rest_client_config.php delete mode 100644 owl-bot-staging/ManagedKafka/v1/tests/Unit/V1/Client/ManagedKafkaClientTest.php delete mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/GPBMetadata/Google/Maps/Fleetengine/Delivery/V1/Common.php delete mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/GPBMetadata/Google/Maps/Fleetengine/Delivery/V1/DeliveryApi.php delete mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/GPBMetadata/Google/Maps/Fleetengine/Delivery/V1/DeliveryVehicles.php delete mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/GPBMetadata/Google/Maps/Fleetengine/Delivery/V1/Header.php delete mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/GPBMetadata/Google/Maps/Fleetengine/Delivery/V1/TaskTrackingInfo.php delete mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/GPBMetadata/Google/Maps/Fleetengine/Delivery/V1/Tasks.php delete mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/BatchCreateTasksRequest.php delete mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/BatchCreateTasksResponse.php delete mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/CreateDeliveryVehicleRequest.php delete mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/CreateTaskRequest.php delete mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/DeliveryRequestHeader.php delete mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/DeliveryRequestHeader/Platform.php delete mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/DeliveryRequestHeader/SdkType.php delete mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/DeliveryVehicle.php delete mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/DeliveryVehicle/DeliveryVehicleType.php delete mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/DeliveryVehicleAttribute.php delete mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/DeliveryVehicleLocation.php delete mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/DeliveryVehicleLocationSensor.php delete mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/DeliveryVehicleNavigationStatus.php delete mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/GetDeliveryVehicleRequest.php delete mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/GetTaskRequest.php delete mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/GetTaskTrackingInfoRequest.php delete mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/ListDeliveryVehiclesRequest.php delete mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/ListDeliveryVehiclesResponse.php delete mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/ListTasksRequest.php delete mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/ListTasksResponse.php delete mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/LocationInfo.php delete mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/Task.php delete mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/Task/JourneySharingInfo.php delete mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/Task/State.php delete mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/Task/TaskOutcome.php delete mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/Task/TaskOutcomeLocationSource.php delete mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/Task/Type.php delete mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/TaskAttribute.php delete mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/TaskTrackingInfo.php delete mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/TaskTrackingViewConfig.php delete mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/TaskTrackingViewConfig/VisibilityOption.php delete mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/TimeWindow.php delete mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/UpdateDeliveryVehicleRequest.php delete mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/UpdateTaskRequest.php delete mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/VehicleJourneySegment.php delete mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/VehicleStop.php delete mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/VehicleStop/State.php delete mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/VehicleStop/TaskInfo.php delete mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/samples/V1/DeliveryServiceClient/batch_create_tasks.php delete mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/samples/V1/DeliveryServiceClient/create_delivery_vehicle.php delete mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/samples/V1/DeliveryServiceClient/create_task.php delete mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/samples/V1/DeliveryServiceClient/get_delivery_vehicle.php delete mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/samples/V1/DeliveryServiceClient/get_task.php delete mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/samples/V1/DeliveryServiceClient/get_task_tracking_info.php delete mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/samples/V1/DeliveryServiceClient/list_delivery_vehicles.php delete mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/samples/V1/DeliveryServiceClient/list_tasks.php delete mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/samples/V1/DeliveryServiceClient/update_delivery_vehicle.php delete mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/samples/V1/DeliveryServiceClient/update_task.php delete mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/src/V1/Client/DeliveryServiceClient.php delete mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/src/V1/resources/delivery_service_client_config.json delete mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/src/V1/resources/delivery_service_descriptor_config.php delete mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/src/V1/resources/delivery_service_rest_client_config.php delete mode 100644 owl-bot-staging/MapsFleetEngineDelivery/v1/tests/Unit/V1/Client/DeliveryServiceClientTest.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/GPBMetadata/Google/Maps/Routeoptimization/V1/RouteOptimizationService.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/AggregatedMetrics.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BatchOptimizeToursMetadata.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BatchOptimizeToursRequest.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BatchOptimizeToursRequest/AsyncModelConfig.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BatchOptimizeToursResponse.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BreakRule.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BreakRule/BreakRequest.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BreakRule/FrequencyConstraint.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/DataFormat.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/DistanceLimit.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/GcsDestination.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/GcsSource.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/InjectedSolutionConstraint.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/InjectedSolutionConstraint/ConstraintRelaxation.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/InjectedSolutionConstraint/ConstraintRelaxation/Relaxation.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/InjectedSolutionConstraint/ConstraintRelaxation/Relaxation/Level.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/InputConfig.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Location.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursRequest.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursRequest/SearchMode.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursRequest/SolvingMode.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursResponse.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursResponse/Metrics.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursValidationError.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursValidationError/FieldReference.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OutputConfig.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/RouteModifiers.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Shipment.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Shipment/Load.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Shipment/VisitRequest.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentModel.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentModel/DurationDistanceMatrix.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentModel/DurationDistanceMatrix/Row.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentModel/PrecedenceRule.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentRoute.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentRoute/EncodedPolyline.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentRoute/PBBreak.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentRoute/Transition.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentRoute/VehicleLoad.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentRoute/Visit.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentTypeIncompatibility.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentTypeIncompatibility/IncompatibilityMode.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentTypeRequirement.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentTypeRequirement/RequirementMode.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/SkippedShipment.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/SkippedShipment/Reason.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/SkippedShipment/Reason/Code.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/TimeWindow.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/TransitionAttributes.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Vehicle.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Vehicle/DurationLimit.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Vehicle/LoadLimit.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Vehicle/LoadLimit/Interval.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Vehicle/TravelMode.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Vehicle/UnloadingPolicy.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Waypoint.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/samples/V1/RouteOptimizationClient/batch_optimize_tours.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/samples/V1/RouteOptimizationClient/optimize_tours.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/src/V1/Client/RouteOptimizationClient.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/src/V1/resources/route_optimization_client_config.json delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/src/V1/resources/route_optimization_descriptor_config.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/src/V1/resources/route_optimization_rest_client_config.php delete mode 100644 owl-bot-staging/MapsRouteOptimization/v1/tests/Unit/V1/Client/RouteOptimizationClientTest.php delete mode 100644 owl-bot-staging/MediaTranslation/v1beta1/proto/src/GPBMetadata/Google/Cloud/Mediatranslation/V1Beta1/MediaTranslation.php delete mode 100644 owl-bot-staging/MediaTranslation/v1beta1/proto/src/Google/Cloud/MediaTranslation/V1beta1/StreamingTranslateSpeechConfig.php delete mode 100644 owl-bot-staging/MediaTranslation/v1beta1/proto/src/Google/Cloud/MediaTranslation/V1beta1/StreamingTranslateSpeechRequest.php delete mode 100644 owl-bot-staging/MediaTranslation/v1beta1/proto/src/Google/Cloud/MediaTranslation/V1beta1/StreamingTranslateSpeechResponse.php delete mode 100644 owl-bot-staging/MediaTranslation/v1beta1/proto/src/Google/Cloud/MediaTranslation/V1beta1/StreamingTranslateSpeechResponse/SpeechEventType.php delete mode 100644 owl-bot-staging/MediaTranslation/v1beta1/proto/src/Google/Cloud/MediaTranslation/V1beta1/StreamingTranslateSpeechResult.php delete mode 100644 owl-bot-staging/MediaTranslation/v1beta1/proto/src/Google/Cloud/MediaTranslation/V1beta1/StreamingTranslateSpeechResult/TextTranslationResult.php delete mode 100644 owl-bot-staging/MediaTranslation/v1beta1/proto/src/Google/Cloud/MediaTranslation/V1beta1/TranslateSpeechConfig.php delete mode 100644 owl-bot-staging/MediaTranslation/v1beta1/samples/V1beta1/SpeechTranslationServiceClient/streaming_translate_speech.php delete mode 100644 owl-bot-staging/MediaTranslation/v1beta1/src/V1beta1/Client/SpeechTranslationServiceClient.php delete mode 100644 owl-bot-staging/MediaTranslation/v1beta1/src/V1beta1/Gapic/SpeechTranslationServiceGapicClient.php delete mode 100644 owl-bot-staging/MediaTranslation/v1beta1/src/V1beta1/SpeechTranslationServiceClient.php delete mode 100644 owl-bot-staging/MediaTranslation/v1beta1/src/V1beta1/gapic_metadata.json delete mode 100644 owl-bot-staging/MediaTranslation/v1beta1/src/V1beta1/resources/speech_translation_service_client_config.json delete mode 100644 owl-bot-staging/MediaTranslation/v1beta1/src/V1beta1/resources/speech_translation_service_descriptor_config.php delete mode 100644 owl-bot-staging/MediaTranslation/v1beta1/src/V1beta1/resources/speech_translation_service_rest_client_config.php delete mode 100644 owl-bot-staging/MediaTranslation/v1beta1/tests/Unit/V1beta1/Client/SpeechTranslationServiceClientTest.php delete mode 100644 owl-bot-staging/MediaTranslation/v1beta1/tests/Unit/V1beta1/SpeechTranslationServiceClientTest.php delete mode 100644 owl-bot-staging/Memcache/v1/proto/src/GPBMetadata/Google/Cloud/Memcache/V1/CloudMemcache.php delete mode 100644 owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/ApplyParametersRequest.php delete mode 100644 owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/CreateInstanceRequest.php delete mode 100644 owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/DeleteInstanceRequest.php delete mode 100644 owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/GetInstanceRequest.php delete mode 100644 owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/Instance.php delete mode 100644 owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/Instance/InstanceMessage.php delete mode 100644 owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/Instance/InstanceMessage/Code.php delete mode 100644 owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/Instance/Node.php delete mode 100644 owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/Instance/Node/State.php delete mode 100644 owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/Instance/NodeConfig.php delete mode 100644 owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/Instance/State.php delete mode 100644 owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/ListInstancesRequest.php delete mode 100644 owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/ListInstancesResponse.php delete mode 100644 owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/LocationMetadata.php delete mode 100644 owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/MaintenancePolicy.php delete mode 100644 owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/MaintenanceSchedule.php delete mode 100644 owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/MemcacheParameters.php delete mode 100644 owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/MemcacheVersion.php delete mode 100644 owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/OperationMetadata.php delete mode 100644 owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/RescheduleMaintenanceRequest.php delete mode 100644 owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/RescheduleMaintenanceRequest/RescheduleType.php delete mode 100644 owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/UpdateInstanceRequest.php delete mode 100644 owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/UpdateParametersRequest.php delete mode 100644 owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/WeeklyMaintenanceWindow.php delete mode 100644 owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/ZoneMetadata.php delete mode 100644 owl-bot-staging/Memcache/v1/samples/V1/CloudMemcacheClient/apply_parameters.php delete mode 100644 owl-bot-staging/Memcache/v1/samples/V1/CloudMemcacheClient/create_instance.php delete mode 100644 owl-bot-staging/Memcache/v1/samples/V1/CloudMemcacheClient/delete_instance.php delete mode 100644 owl-bot-staging/Memcache/v1/samples/V1/CloudMemcacheClient/get_instance.php delete mode 100644 owl-bot-staging/Memcache/v1/samples/V1/CloudMemcacheClient/get_location.php delete mode 100644 owl-bot-staging/Memcache/v1/samples/V1/CloudMemcacheClient/list_instances.php delete mode 100644 owl-bot-staging/Memcache/v1/samples/V1/CloudMemcacheClient/list_locations.php delete mode 100644 owl-bot-staging/Memcache/v1/samples/V1/CloudMemcacheClient/reschedule_maintenance.php delete mode 100644 owl-bot-staging/Memcache/v1/samples/V1/CloudMemcacheClient/update_instance.php delete mode 100644 owl-bot-staging/Memcache/v1/samples/V1/CloudMemcacheClient/update_parameters.php delete mode 100644 owl-bot-staging/Memcache/v1/src/V1/Client/CloudMemcacheClient.php delete mode 100644 owl-bot-staging/Memcache/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/Memcache/v1/src/V1/resources/cloud_memcache_client_config.json delete mode 100644 owl-bot-staging/Memcache/v1/src/V1/resources/cloud_memcache_descriptor_config.php delete mode 100644 owl-bot-staging/Memcache/v1/src/V1/resources/cloud_memcache_rest_client_config.php delete mode 100644 owl-bot-staging/Memcache/v1/tests/Unit/V1/Client/CloudMemcacheClientTest.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/GPBMetadata/Google/Cloud/Migrationcenter/V1/Migrationcenter.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AddAssetsToGroupRequest.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AggregateAssetsValuesRequest.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AggregateAssetsValuesResponse.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Aggregation.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Aggregation/Count.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Aggregation/Frequency.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Aggregation/Histogram.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Aggregation/Sum.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AggregationResult.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AggregationResult/Count.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AggregationResult/Frequency.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AggregationResult/Histogram.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AggregationResult/Histogram/Bucket.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AggregationResult/Sum.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Asset.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AssetFrame.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AssetList.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AssetPerformanceData.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AssetView.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AwsEc2PlatformDetails.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AzureVmPlatformDetails.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/BatchDeleteAssetsRequest.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/BatchUpdateAssetsRequest.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/BatchUpdateAssetsResponse.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/BiosDetails.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/CommitmentPlan.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ComputeEngineMigrationTarget.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ComputeEnginePreferences.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ComputeEngineShapeDescriptor.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ComputeMigrationTargetProduct.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ComputeStorageDescriptor.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/CpuUsageSample.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/CreateGroupRequest.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/CreateImportDataFileRequest.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/CreateImportJobRequest.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/CreatePreferenceSetRequest.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/CreateReportConfigRequest.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/CreateReportRequest.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/CreateSourceRequest.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DailyResourceUsageAggregation.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DailyResourceUsageAggregation/CPU.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DailyResourceUsageAggregation/Disk.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DailyResourceUsageAggregation/Memory.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DailyResourceUsageAggregation/Network.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DailyResourceUsageAggregation/Stats.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DeleteAssetRequest.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DeleteGroupRequest.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DeleteImportDataFileRequest.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DeleteImportJobRequest.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DeletePreferenceSetRequest.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DeleteReportConfigRequest.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DeleteReportRequest.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DeleteSourceRequest.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DiskEntry.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DiskEntry/InterfaceType.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DiskEntryList.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DiskPartition.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DiskPartitionList.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DiskUsageSample.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ErrorFrame.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ErrorFrameView.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ExecutionReport.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/FileValidationReport.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/FitDescriptor.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/FitDescriptor/FitLevel.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/FrameViolationEntry.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Frames.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/FstabEntry.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/FstabEntryList.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GenericInsight.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GenericPlatformDetails.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GetAssetRequest.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GetErrorFrameRequest.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GetGroupRequest.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GetImportDataFileRequest.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GetImportJobRequest.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GetPreferenceSetRequest.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GetReportConfigRequest.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GetReportRequest.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GetSettingsRequest.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GetSourceRequest.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Group.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GuestConfigDetails.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GuestConfigDetails/SeLinuxMode.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GuestInstalledApplication.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GuestInstalledApplicationList.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GuestOsDetails.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GuestRuntimeDetails.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/HostsEntry.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/HostsEntryList.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ImportDataFile.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ImportDataFile/State.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ImportError.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ImportError/Severity.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ImportJob.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ImportJob/ImportJobState.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ImportJobFormat.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ImportJobView.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ImportRowError.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Insight.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/InsightList.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/LicenseType.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListAssetsRequest.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListAssetsResponse.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListErrorFramesRequest.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListErrorFramesResponse.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListGroupsRequest.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListGroupsResponse.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListImportDataFilesRequest.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListImportDataFilesResponse.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListImportJobsRequest.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListImportJobsResponse.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListPreferenceSetsRequest.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListPreferenceSetsResponse.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListReportConfigsRequest.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListReportConfigsResponse.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListReportsRequest.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListReportsResponse.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListSourcesRequest.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListSourcesResponse.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/MachineArchitectureDetails.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/MachineArchitectureDetails/CpuHyperThreading.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/MachineArchitectureDetails/FirmwareType.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/MachineDetails.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/MachineDetails/PowerState.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/MachineDiskDetails.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/MachineNetworkDetails.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/MachinePreferences.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/MachineSeries.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/MemoryUsageSample.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/MigrationInsight.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/NetworkAdapterDetails.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/NetworkAdapterList.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/NetworkAddress.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/NetworkAddress/AddressAssignment.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/NetworkAddressList.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/NetworkConnection.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/NetworkConnection/State.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/NetworkConnectionList.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/NetworkUsageSample.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/NfsExport.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/NfsExportList.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/OpenFileDetails.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/OpenFileList.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/OperatingSystemFamily.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/OperationMetadata.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/PerformanceSample.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/PersistentDiskType.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/PhysicalPlatformDetails.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/PlatformDetails.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/PreferenceSet.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/RegionPreferences.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/RemoveAssetsFromGroupRequest.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Report.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Report/State.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Report/Type.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportAssetFramesRequest.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportAssetFramesResponse.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportConfig.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportConfig/GroupPreferenceSetAssignment.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/AssetAggregateStats.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/ChartData.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/ChartData/DataPoint.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/ComputeEngineFinding.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/GroupFinding.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/GroupPreferenceSetFinding.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/HistogramChartData.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/HistogramChartData/Bucket.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/MachineSeriesAllocation.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/SoleTenantFinding.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/SoleTenantNodeAllocation.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/UtilizationChartData.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/VmwareEngineFinding.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/VmwareNode.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/VmwareNodeAllocation.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportView.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/RunImportJobRequest.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/RunningProcess.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/RunningProcessList.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/RunningService.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/RunningService/StartMode.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/RunningService/State.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/RunningServiceList.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/RuntimeNetworkInfo.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Settings.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/SizingOptimizationStrategy.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/SoleTenancyPreferences.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/SoleTenancyPreferences/CommitmentPlan.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/SoleTenancyPreferences/HostMaintenancePolicy.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/SoleTenantNodeType.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Source.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Source/SourceType.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Source/State.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/UpdateAssetRequest.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/UpdateGroupRequest.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/UpdateImportJobRequest.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/UpdatePreferenceSetRequest.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/UpdateSettingsRequest.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/UpdateSourceRequest.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/UploadFileInfo.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ValidateImportJobRequest.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ValidationReport.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/VirtualMachinePreferences.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/VmwareDiskConfig.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/VmwareDiskConfig/BackingType.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/VmwareDiskConfig/RdmCompatibility.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/VmwareDiskConfig/VmdkMode.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/VmwareEnginePreferences.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/VmwareEnginePreferences/CommitmentPlan.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/VmwarePlatformDetails.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/add_assets_to_group.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/aggregate_assets_values.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/batch_delete_assets.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/batch_update_assets.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/create_group.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/create_import_data_file.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/create_import_job.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/create_preference_set.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/create_report.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/create_report_config.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/create_source.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/delete_asset.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/delete_group.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/delete_import_data_file.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/delete_import_job.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/delete_preference_set.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/delete_report.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/delete_report_config.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/delete_source.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/get_asset.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/get_error_frame.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/get_group.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/get_import_data_file.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/get_import_job.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/get_location.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/get_preference_set.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/get_report.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/get_report_config.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/get_settings.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/get_source.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/list_assets.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/list_error_frames.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/list_groups.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/list_import_data_files.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/list_import_jobs.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/list_locations.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/list_preference_sets.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/list_report_configs.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/list_reports.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/list_sources.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/remove_assets_from_group.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/report_asset_frames.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/run_import_job.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/update_asset.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/update_group.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/update_import_job.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/update_preference_set.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/update_settings.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/update_source.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/validate_import_job.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/src/V1/Client/MigrationCenterClient.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/MigrationCenter/v1/src/V1/resources/migration_center_client_config.json delete mode 100644 owl-bot-staging/MigrationCenter/v1/src/V1/resources/migration_center_descriptor_config.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/src/V1/resources/migration_center_rest_client_config.php delete mode 100644 owl-bot-staging/MigrationCenter/v1/tests/Unit/V1/Client/MigrationCenterClientTest.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/Alert.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/AlertService.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/Common.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/DroppedLabels.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/Group.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/GroupService.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/Metric.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/MetricService.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/MutationRecord.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/Notification.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/NotificationService.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/QueryService.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/Service.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/ServiceService.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/Snooze.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/SnoozeService.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/SpanContext.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/Uptime.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/UptimeService.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Aggregation.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Aggregation/Aligner.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Aggregation/Reducer.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/AlertStrategy.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/AlertStrategy/NotificationChannelStrategy.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/AlertStrategy/NotificationPrompt.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/AlertStrategy/NotificationRateLimit.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/Condition.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/Condition/EvaluationMissingData.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/Condition/LogMatch.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/Condition/MetricAbsence.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/Condition/MetricThreshold.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/Condition/MetricThreshold/ForecastOptions.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/Condition/MonitoringQueryLanguageCondition.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/Condition/PrometheusQueryLanguageCondition.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/Condition/Trigger.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/ConditionCombinerType.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/Documentation.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/Documentation/Link.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/Severity.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/BasicSli.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/BasicSli/AvailabilityCriteria.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/BasicSli/LatencyCriteria.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ComparisonType.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/CreateAlertPolicyRequest.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/CreateGroupRequest.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/CreateMetricDescriptorRequest.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/CreateNotificationChannelRequest.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/CreateServiceLevelObjectiveRequest.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/CreateServiceRequest.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/CreateSnoozeRequest.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/CreateTimeSeriesError.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/CreateTimeSeriesRequest.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/CreateTimeSeriesSummary.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/CreateTimeSeriesSummary/Error.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/CreateUptimeCheckConfigRequest.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/DeleteAlertPolicyRequest.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/DeleteGroupRequest.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/DeleteMetricDescriptorRequest.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/DeleteNotificationChannelRequest.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/DeleteServiceLevelObjectiveRequest.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/DeleteServiceRequest.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/DeleteUptimeCheckConfigRequest.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/DistributionCut.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/DroppedLabels.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GetAlertPolicyRequest.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GetGroupRequest.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GetMetricDescriptorRequest.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GetMonitoredResourceDescriptorRequest.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GetNotificationChannelDescriptorRequest.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GetNotificationChannelRequest.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GetNotificationChannelVerificationCodeRequest.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GetNotificationChannelVerificationCodeResponse.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GetServiceLevelObjectiveRequest.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GetServiceRequest.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GetSnoozeRequest.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GetUptimeCheckConfigRequest.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Group.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GroupResourceType.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/InternalChecker.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/InternalChecker/State.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/LabelValue.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListAlertPoliciesRequest.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListAlertPoliciesResponse.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListGroupMembersRequest.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListGroupMembersResponse.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListGroupsRequest.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListGroupsResponse.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListMetricDescriptorsRequest.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListMetricDescriptorsResponse.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListMonitoredResourceDescriptorsRequest.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListMonitoredResourceDescriptorsResponse.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListNotificationChannelDescriptorsRequest.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListNotificationChannelDescriptorsResponse.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListNotificationChannelsRequest.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListNotificationChannelsResponse.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListServiceLevelObjectivesRequest.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListServiceLevelObjectivesResponse.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListServicesRequest.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListServicesResponse.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListSnoozesRequest.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListSnoozesResponse.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListTimeSeriesRequest.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListTimeSeriesRequest/TimeSeriesView.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListTimeSeriesResponse.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListUptimeCheckConfigsRequest.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListUptimeCheckConfigsResponse.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListUptimeCheckIpsRequest.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListUptimeCheckIpsResponse.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/MutationRecord.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/NotificationChannel.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/NotificationChannel/VerificationStatus.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/NotificationChannelDescriptor.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Point.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/QueryError.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/QueryErrorList.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/QueryTimeSeriesRequest.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/QueryTimeSeriesResponse.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Range.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/RequestBasedSli.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/SendNotificationChannelVerificationCodeRequest.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service/AppEngine.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service/BasicService.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service/CloudEndpoints.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service/CloudRun.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service/ClusterIstio.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service/Custom.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service/GkeNamespace.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service/GkeService.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service/GkeWorkload.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service/IstioCanonicalService.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service/MeshIstio.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service/Telemetry.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ServiceLevelIndicator.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ServiceLevelObjective.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ServiceLevelObjective/View.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ServiceTier.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Snooze.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Snooze/Criteria.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/SpanContext.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/SyntheticMonitorTarget.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/SyntheticMonitorTarget/CloudFunctionV2Target.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/TextLocator.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/TextLocator/Position.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/TimeInterval.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/TimeSeries.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/TimeSeriesData.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/TimeSeriesData/PointData.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/TimeSeriesDescriptor.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/TimeSeriesDescriptor/ValueDescriptor.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/TimeSeriesRatio.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/TypedValue.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UpdateAlertPolicyRequest.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UpdateGroupRequest.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UpdateNotificationChannelRequest.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UpdateServiceLevelObjectiveRequest.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UpdateServiceRequest.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UpdateSnoozeRequest.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UpdateUptimeCheckConfigRequest.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/CheckerType.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/ContentMatcher.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/ContentMatcher/ContentMatcherOption.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/ContentMatcher/JsonPathMatcher.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/ContentMatcher/JsonPathMatcher/JsonPathMatcherOption.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/HttpCheck.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/HttpCheck/BasicAuthentication.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/HttpCheck/ContentType.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/HttpCheck/RequestMethod.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/HttpCheck/ResponseStatusCode.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/HttpCheck/ResponseStatusCode/StatusClass.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/HttpCheck/ServiceAgentAuthentication.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/HttpCheck/ServiceAgentAuthentication/ServiceAgentAuthenticationType.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/PingConfig.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/ResourceGroup.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/TcpCheck.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckIp.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckRegion.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/VerifyNotificationChannelRequest.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/WindowsBasedSli.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/WindowsBasedSli/MetricRange.php delete mode 100644 owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/WindowsBasedSli/PerformanceThreshold.php delete mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/AlertPolicyServiceClient/create_alert_policy.php delete mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/AlertPolicyServiceClient/delete_alert_policy.php delete mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/AlertPolicyServiceClient/get_alert_policy.php delete mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/AlertPolicyServiceClient/list_alert_policies.php delete mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/AlertPolicyServiceClient/update_alert_policy.php delete mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/GroupServiceClient/create_group.php delete mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/GroupServiceClient/delete_group.php delete mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/GroupServiceClient/get_group.php delete mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/GroupServiceClient/list_group_members.php delete mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/GroupServiceClient/list_groups.php delete mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/GroupServiceClient/update_group.php delete mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/MetricServiceClient/create_metric_descriptor.php delete mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/MetricServiceClient/create_service_time_series.php delete mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/MetricServiceClient/create_time_series.php delete mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/MetricServiceClient/delete_metric_descriptor.php delete mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/MetricServiceClient/get_metric_descriptor.php delete mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/MetricServiceClient/get_monitored_resource_descriptor.php delete mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/MetricServiceClient/list_metric_descriptors.php delete mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/MetricServiceClient/list_monitored_resource_descriptors.php delete mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/MetricServiceClient/list_time_series.php delete mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/NotificationChannelServiceClient/create_notification_channel.php delete mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/NotificationChannelServiceClient/delete_notification_channel.php delete mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/NotificationChannelServiceClient/get_notification_channel.php delete mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/NotificationChannelServiceClient/get_notification_channel_descriptor.php delete mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/NotificationChannelServiceClient/get_notification_channel_verification_code.php delete mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/NotificationChannelServiceClient/list_notification_channel_descriptors.php delete mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/NotificationChannelServiceClient/list_notification_channels.php delete mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/NotificationChannelServiceClient/send_notification_channel_verification_code.php delete mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/NotificationChannelServiceClient/update_notification_channel.php delete mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/NotificationChannelServiceClient/verify_notification_channel.php delete mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/QueryServiceClient/query_time_series.php delete mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/ServiceMonitoringServiceClient/create_service.php delete mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/ServiceMonitoringServiceClient/create_service_level_objective.php delete mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/ServiceMonitoringServiceClient/delete_service.php delete mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/ServiceMonitoringServiceClient/delete_service_level_objective.php delete mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/ServiceMonitoringServiceClient/get_service.php delete mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/ServiceMonitoringServiceClient/get_service_level_objective.php delete mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/ServiceMonitoringServiceClient/list_service_level_objectives.php delete mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/ServiceMonitoringServiceClient/list_services.php delete mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/ServiceMonitoringServiceClient/update_service.php delete mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/ServiceMonitoringServiceClient/update_service_level_objective.php delete mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/SnoozeServiceClient/create_snooze.php delete mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/SnoozeServiceClient/get_snooze.php delete mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/SnoozeServiceClient/list_snoozes.php delete mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/SnoozeServiceClient/update_snooze.php delete mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/UptimeCheckServiceClient/create_uptime_check_config.php delete mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/UptimeCheckServiceClient/delete_uptime_check_config.php delete mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/UptimeCheckServiceClient/get_uptime_check_config.php delete mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/UptimeCheckServiceClient/list_uptime_check_configs.php delete mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/UptimeCheckServiceClient/list_uptime_check_ips.php delete mode 100644 owl-bot-staging/Monitoring/v3/samples/V3/UptimeCheckServiceClient/update_uptime_check_config.php delete mode 100644 owl-bot-staging/Monitoring/v3/src/V3/AlertPolicyServiceClient.php delete mode 100644 owl-bot-staging/Monitoring/v3/src/V3/Client/AlertPolicyServiceClient.php delete mode 100644 owl-bot-staging/Monitoring/v3/src/V3/Client/GroupServiceClient.php delete mode 100644 owl-bot-staging/Monitoring/v3/src/V3/Client/MetricServiceClient.php delete mode 100644 owl-bot-staging/Monitoring/v3/src/V3/Client/NotificationChannelServiceClient.php delete mode 100644 owl-bot-staging/Monitoring/v3/src/V3/Client/QueryServiceClient.php delete mode 100644 owl-bot-staging/Monitoring/v3/src/V3/Client/ServiceMonitoringServiceClient.php delete mode 100644 owl-bot-staging/Monitoring/v3/src/V3/Client/SnoozeServiceClient.php delete mode 100644 owl-bot-staging/Monitoring/v3/src/V3/Client/UptimeCheckServiceClient.php delete mode 100644 owl-bot-staging/Monitoring/v3/src/V3/Gapic/AlertPolicyServiceGapicClient.php delete mode 100644 owl-bot-staging/Monitoring/v3/src/V3/Gapic/GroupServiceGapicClient.php delete mode 100644 owl-bot-staging/Monitoring/v3/src/V3/Gapic/MetricServiceGapicClient.php delete mode 100644 owl-bot-staging/Monitoring/v3/src/V3/Gapic/NotificationChannelServiceGapicClient.php delete mode 100644 owl-bot-staging/Monitoring/v3/src/V3/Gapic/QueryServiceGapicClient.php delete mode 100644 owl-bot-staging/Monitoring/v3/src/V3/Gapic/ServiceMonitoringServiceGapicClient.php delete mode 100644 owl-bot-staging/Monitoring/v3/src/V3/Gapic/SnoozeServiceGapicClient.php delete mode 100644 owl-bot-staging/Monitoring/v3/src/V3/Gapic/UptimeCheckServiceGapicClient.php delete mode 100644 owl-bot-staging/Monitoring/v3/src/V3/GroupServiceClient.php delete mode 100644 owl-bot-staging/Monitoring/v3/src/V3/MetricServiceClient.php delete mode 100644 owl-bot-staging/Monitoring/v3/src/V3/NotificationChannelServiceClient.php delete mode 100644 owl-bot-staging/Monitoring/v3/src/V3/QueryServiceClient.php delete mode 100644 owl-bot-staging/Monitoring/v3/src/V3/ServiceMonitoringServiceClient.php delete mode 100644 owl-bot-staging/Monitoring/v3/src/V3/SnoozeServiceClient.php delete mode 100644 owl-bot-staging/Monitoring/v3/src/V3/UptimeCheckServiceClient.php delete mode 100644 owl-bot-staging/Monitoring/v3/src/V3/gapic_metadata.json delete mode 100644 owl-bot-staging/Monitoring/v3/src/V3/resources/alert_policy_service_client_config.json delete mode 100644 owl-bot-staging/Monitoring/v3/src/V3/resources/alert_policy_service_descriptor_config.php delete mode 100644 owl-bot-staging/Monitoring/v3/src/V3/resources/alert_policy_service_rest_client_config.php delete mode 100644 owl-bot-staging/Monitoring/v3/src/V3/resources/group_service_client_config.json delete mode 100644 owl-bot-staging/Monitoring/v3/src/V3/resources/group_service_descriptor_config.php delete mode 100644 owl-bot-staging/Monitoring/v3/src/V3/resources/group_service_rest_client_config.php delete mode 100644 owl-bot-staging/Monitoring/v3/src/V3/resources/metric_service_client_config.json delete mode 100644 owl-bot-staging/Monitoring/v3/src/V3/resources/metric_service_descriptor_config.php delete mode 100644 owl-bot-staging/Monitoring/v3/src/V3/resources/metric_service_rest_client_config.php delete mode 100644 owl-bot-staging/Monitoring/v3/src/V3/resources/notification_channel_service_client_config.json delete mode 100644 owl-bot-staging/Monitoring/v3/src/V3/resources/notification_channel_service_descriptor_config.php delete mode 100644 owl-bot-staging/Monitoring/v3/src/V3/resources/notification_channel_service_rest_client_config.php delete mode 100644 owl-bot-staging/Monitoring/v3/src/V3/resources/query_service_client_config.json delete mode 100644 owl-bot-staging/Monitoring/v3/src/V3/resources/query_service_descriptor_config.php delete mode 100644 owl-bot-staging/Monitoring/v3/src/V3/resources/query_service_rest_client_config.php delete mode 100644 owl-bot-staging/Monitoring/v3/src/V3/resources/service_monitoring_service_client_config.json delete mode 100644 owl-bot-staging/Monitoring/v3/src/V3/resources/service_monitoring_service_descriptor_config.php delete mode 100644 owl-bot-staging/Monitoring/v3/src/V3/resources/service_monitoring_service_rest_client_config.php delete mode 100644 owl-bot-staging/Monitoring/v3/src/V3/resources/snooze_service_client_config.json delete mode 100644 owl-bot-staging/Monitoring/v3/src/V3/resources/snooze_service_descriptor_config.php delete mode 100644 owl-bot-staging/Monitoring/v3/src/V3/resources/snooze_service_rest_client_config.php delete mode 100644 owl-bot-staging/Monitoring/v3/src/V3/resources/uptime_check_service_client_config.json delete mode 100644 owl-bot-staging/Monitoring/v3/src/V3/resources/uptime_check_service_descriptor_config.php delete mode 100644 owl-bot-staging/Monitoring/v3/src/V3/resources/uptime_check_service_rest_client_config.php delete mode 100644 owl-bot-staging/Monitoring/v3/tests/Unit/V3/AlertPolicyServiceClientTest.php delete mode 100644 owl-bot-staging/Monitoring/v3/tests/Unit/V3/Client/AlertPolicyServiceClientTest.php delete mode 100644 owl-bot-staging/Monitoring/v3/tests/Unit/V3/Client/GroupServiceClientTest.php delete mode 100644 owl-bot-staging/Monitoring/v3/tests/Unit/V3/Client/MetricServiceClientTest.php delete mode 100644 owl-bot-staging/Monitoring/v3/tests/Unit/V3/Client/NotificationChannelServiceClientTest.php delete mode 100644 owl-bot-staging/Monitoring/v3/tests/Unit/V3/Client/QueryServiceClientTest.php delete mode 100644 owl-bot-staging/Monitoring/v3/tests/Unit/V3/Client/ServiceMonitoringServiceClientTest.php delete mode 100644 owl-bot-staging/Monitoring/v3/tests/Unit/V3/Client/SnoozeServiceClientTest.php delete mode 100644 owl-bot-staging/Monitoring/v3/tests/Unit/V3/Client/UptimeCheckServiceClientTest.php delete mode 100644 owl-bot-staging/Monitoring/v3/tests/Unit/V3/GroupServiceClientTest.php delete mode 100644 owl-bot-staging/Monitoring/v3/tests/Unit/V3/MetricServiceClientTest.php delete mode 100644 owl-bot-staging/Monitoring/v3/tests/Unit/V3/NotificationChannelServiceClientTest.php delete mode 100644 owl-bot-staging/Monitoring/v3/tests/Unit/V3/QueryServiceClientTest.php delete mode 100644 owl-bot-staging/Monitoring/v3/tests/Unit/V3/ServiceMonitoringServiceClientTest.php delete mode 100644 owl-bot-staging/Monitoring/v3/tests/Unit/V3/SnoozeServiceClientTest.php delete mode 100644 owl-bot-staging/Monitoring/v3/tests/Unit/V3/UptimeCheckServiceClientTest.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/GPBMetadata/Google/Cloud/Netapp/V1/ActiveDirectory.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/GPBMetadata/Google/Cloud/Netapp/V1/Backup.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/GPBMetadata/Google/Cloud/Netapp/V1/BackupPolicy.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/GPBMetadata/Google/Cloud/Netapp/V1/BackupVault.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/GPBMetadata/Google/Cloud/Netapp/V1/CloudNetappService.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/GPBMetadata/Google/Cloud/Netapp/V1/Common.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/GPBMetadata/Google/Cloud/Netapp/V1/Kms.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/GPBMetadata/Google/Cloud/Netapp/V1/Replication.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/GPBMetadata/Google/Cloud/Netapp/V1/Snapshot.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/GPBMetadata/Google/Cloud/Netapp/V1/StoragePool.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/GPBMetadata/Google/Cloud/Netapp/V1/Volume.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/AccessType.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ActiveDirectory.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ActiveDirectory/State.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Backup.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Backup/State.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Backup/Type.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/BackupConfig.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/BackupPolicy.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/BackupPolicy/State.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/BackupVault.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/BackupVault/State.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateActiveDirectoryRequest.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateBackupPolicyRequest.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateBackupRequest.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateBackupVaultRequest.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateKmsConfigRequest.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateReplicationRequest.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateSnapshotRequest.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateStoragePoolRequest.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateVolumeRequest.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DailySchedule.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteActiveDirectoryRequest.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteBackupPolicyRequest.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteBackupRequest.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteBackupVaultRequest.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteKmsConfigRequest.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteReplicationRequest.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteSnapshotRequest.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteStoragePoolRequest.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteVolumeRequest.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DestinationVolumeParameters.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/EncryptVolumesRequest.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/EncryptionType.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/EstablishPeeringRequest.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ExportPolicy.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetActiveDirectoryRequest.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetBackupPolicyRequest.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetBackupRequest.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetBackupVaultRequest.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetKmsConfigRequest.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetReplicationRequest.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetSnapshotRequest.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetStoragePoolRequest.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetVolumeRequest.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/HourlySchedule.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/HybridPeeringDetails.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/HybridReplicationParameters.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/KmsConfig.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/KmsConfig/State.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListActiveDirectoriesRequest.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListActiveDirectoriesResponse.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListBackupPoliciesRequest.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListBackupPoliciesResponse.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListBackupVaultsRequest.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListBackupVaultsResponse.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListBackupsRequest.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListBackupsResponse.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListKmsConfigsRequest.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListKmsConfigsResponse.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListReplicationsRequest.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListReplicationsResponse.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListSnapshotsRequest.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListSnapshotsResponse.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListStoragePoolsRequest.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListStoragePoolsResponse.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListVolumesRequest.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListVolumesResponse.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/LocationMetadata.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/MonthlySchedule.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/MountOption.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/OperationMetadata.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Protocols.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Replication.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Replication/HybridReplicationType.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Replication/MirrorState.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Replication/ReplicationRole.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Replication/ReplicationSchedule.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Replication/State.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/RestoreParameters.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/RestrictedAction.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ResumeReplicationRequest.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ReverseReplicationDirectionRequest.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/RevertVolumeRequest.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/SMBSettings.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/SecurityStyle.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ServiceLevel.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/SimpleExportPolicyRule.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Snapshot.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Snapshot/State.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/SnapshotPolicy.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/StopReplicationRequest.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/StoragePool.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/StoragePool/State.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/SwitchActiveReplicaZoneRequest.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/SyncReplicationRequest.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/TieringPolicy.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/TieringPolicy/TierAction.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/TransferStats.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateActiveDirectoryRequest.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateBackupPolicyRequest.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateBackupRequest.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateBackupVaultRequest.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateKmsConfigRequest.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateReplicationRequest.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateSnapshotRequest.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateStoragePoolRequest.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateVolumeRequest.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/VerifyKmsConfigRequest.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/VerifyKmsConfigResponse.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Volume.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Volume/State.php delete mode 100644 owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/WeeklySchedule.php delete mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_active_directory.php delete mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_backup.php delete mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_backup_policy.php delete mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_backup_vault.php delete mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_kms_config.php delete mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_replication.php delete mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_snapshot.php delete mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_storage_pool.php delete mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_volume.php delete mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_active_directory.php delete mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_backup.php delete mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_backup_policy.php delete mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_backup_vault.php delete mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_kms_config.php delete mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_replication.php delete mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_snapshot.php delete mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_storage_pool.php delete mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_volume.php delete mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/encrypt_volumes.php delete mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/establish_peering.php delete mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_active_directory.php delete mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_backup.php delete mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_backup_policy.php delete mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_backup_vault.php delete mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_kms_config.php delete mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_location.php delete mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_replication.php delete mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_snapshot.php delete mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_storage_pool.php delete mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_volume.php delete mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_active_directories.php delete mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_backup_policies.php delete mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_backup_vaults.php delete mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_backups.php delete mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_kms_configs.php delete mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_locations.php delete mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_replications.php delete mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_snapshots.php delete mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_storage_pools.php delete mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_volumes.php delete mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/resume_replication.php delete mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/reverse_replication_direction.php delete mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/revert_volume.php delete mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/stop_replication.php delete mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/switch_active_replica_zone.php delete mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/sync_replication.php delete mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_active_directory.php delete mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_backup.php delete mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_backup_policy.php delete mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_backup_vault.php delete mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_kms_config.php delete mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_replication.php delete mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_snapshot.php delete mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_storage_pool.php delete mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_volume.php delete mode 100644 owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/verify_kms_config.php delete mode 100644 owl-bot-staging/NetApp/v1/src/V1/Client/NetAppClient.php delete mode 100644 owl-bot-staging/NetApp/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/NetApp/v1/src/V1/resources/net_app_client_config.json delete mode 100644 owl-bot-staging/NetApp/v1/src/V1/resources/net_app_descriptor_config.php delete mode 100644 owl-bot-staging/NetApp/v1/src/V1/resources/net_app_rest_client_config.php delete mode 100644 owl-bot-staging/NetApp/v1/tests/Unit/V1/Client/NetAppClientTest.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/GPBMetadata/Google/Cloud/Networkconnectivity/V1/Common.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/GPBMetadata/Google/Cloud/Networkconnectivity/V1/Hub.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/GPBMetadata/Google/Cloud/Networkconnectivity/V1/PolicyBasedRouting.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/AcceptHubSpokeRequest.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/AcceptHubSpokeResponse.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/AutoAccept.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/CreateHubRequest.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/CreatePolicyBasedRouteRequest.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/CreateSpokeRequest.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/DeleteHubRequest.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/DeletePolicyBasedRouteRequest.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/DeleteSpokeRequest.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/GetGroupRequest.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/GetHubRequest.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/GetPolicyBasedRouteRequest.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/GetRouteRequest.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/GetRouteTableRequest.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/GetSpokeRequest.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/Group.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/Hub.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/HubStatusEntry.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/LinkedInterconnectAttachments.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/LinkedProducerVpcNetwork.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/LinkedRouterApplianceInstances.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/LinkedVpcNetwork.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/LinkedVpnTunnels.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListGroupsRequest.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListGroupsResponse.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListHubSpokesRequest.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListHubSpokesRequest/SpokeView.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListHubSpokesResponse.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListHubsRequest.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListHubsResponse.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListPolicyBasedRoutesRequest.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListPolicyBasedRoutesResponse.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListRouteTablesRequest.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListRouteTablesResponse.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListRoutesRequest.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListRoutesResponse.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListSpokesRequest.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListSpokesResponse.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/LocationFeature.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/LocationMetadata.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/NextHopInterconnectAttachment.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/NextHopRouterApplianceInstance.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/NextHopVPNTunnel.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/NextHopVpcNetwork.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/OperationMetadata.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/PolicyBasedRoute.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/PolicyBasedRoute/Filter.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/PolicyBasedRoute/Filter/ProtocolVersion.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/PolicyBasedRoute/InterconnectAttachment.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/PolicyBasedRoute/OtherRoutes.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/PolicyBasedRoute/VirtualMachine.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/PolicyBasedRoute/Warnings.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/PolicyBasedRoute/Warnings/Code.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/PolicyMode.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/PresetTopology.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/PscPropagationStatus.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/PscPropagationStatus/Code.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/QueryHubStatusRequest.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/QueryHubStatusResponse.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/RejectHubSpokeRequest.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/RejectHubSpokeResponse.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/Route.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/RouteTable.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/RouteType.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/RouterApplianceInstance.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/RoutingVPC.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/Spoke.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/Spoke/StateReason.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/Spoke/StateReason/Code.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/SpokeSummary.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/SpokeSummary/SpokeStateCount.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/SpokeSummary/SpokeStateReasonCount.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/SpokeSummary/SpokeTypeCount.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/SpokeType.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/State.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/UpdateGroupRequest.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/UpdateHubRequest.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/UpdateSpokeRequest.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/accept_hub_spoke.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/create_hub.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/create_spoke.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/delete_hub.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/delete_spoke.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/get_group.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/get_hub.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/get_iam_policy.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/get_location.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/get_route.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/get_route_table.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/get_spoke.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/list_groups.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/list_hub_spokes.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/list_hubs.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/list_locations.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/list_route_tables.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/list_routes.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/list_spokes.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/query_hub_status.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/reject_hub_spoke.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/set_iam_policy.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/test_iam_permissions.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/update_group.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/update_hub.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/update_spoke.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/samples/V1/PolicyBasedRoutingServiceClient/create_policy_based_route.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/samples/V1/PolicyBasedRoutingServiceClient/delete_policy_based_route.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/samples/V1/PolicyBasedRoutingServiceClient/get_iam_policy.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/samples/V1/PolicyBasedRoutingServiceClient/get_location.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/samples/V1/PolicyBasedRoutingServiceClient/get_policy_based_route.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/samples/V1/PolicyBasedRoutingServiceClient/list_locations.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/samples/V1/PolicyBasedRoutingServiceClient/list_policy_based_routes.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/samples/V1/PolicyBasedRoutingServiceClient/set_iam_policy.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/samples/V1/PolicyBasedRoutingServiceClient/test_iam_permissions.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/src/V1/Client/HubServiceClient.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/src/V1/Client/PolicyBasedRoutingServiceClient.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/src/V1/resources/hub_service_client_config.json delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/src/V1/resources/hub_service_descriptor_config.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/src/V1/resources/hub_service_rest_client_config.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/src/V1/resources/policy_based_routing_service_client_config.json delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/src/V1/resources/policy_based_routing_service_descriptor_config.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/src/V1/resources/policy_based_routing_service_rest_client_config.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/tests/Unit/V1/Client/HubServiceClientTest.php delete mode 100644 owl-bot-staging/NetworkConnectivity/v1/tests/Unit/V1/Client/PolicyBasedRoutingServiceClientTest.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/GPBMetadata/Google/Cloud/Networkmanagement/V1/ConnectivityTest.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/GPBMetadata/Google/Cloud/Networkmanagement/V1/Reachability.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/GPBMetadata/Google/Cloud/Networkmanagement/V1/Trace.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/AbortInfo.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/AbortInfo/Cause.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/AppEngineVersionInfo.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/CloudFunctionInfo.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/CloudRunRevisionInfo.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/CloudSQLInstanceInfo.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ConnectivityTest.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/CreateConnectivityTestRequest.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/DeleteConnectivityTestRequest.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/DeliverInfo.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/DeliverInfo/Target.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/DropInfo.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/DropInfo/Cause.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Endpoint.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Endpoint/AppEngineVersionEndpoint.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Endpoint/CloudFunctionEndpoint.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Endpoint/CloudRunRevisionEndpoint.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Endpoint/ForwardingRuleTarget.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Endpoint/NetworkType.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/EndpointInfo.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/FirewallInfo.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/FirewallInfo/FirewallRuleType.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ForwardInfo.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ForwardInfo/Target.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ForwardingRuleInfo.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/GKEMasterInfo.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/GetConnectivityTestRequest.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/GoogleServiceInfo.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/GoogleServiceInfo/GoogleServiceType.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/InstanceInfo.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LatencyDistribution.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LatencyPercentile.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ListConnectivityTestsRequest.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ListConnectivityTestsResponse.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LoadBalancerBackend.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LoadBalancerBackend/HealthCheckFirewallState.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LoadBalancerBackendInfo.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LoadBalancerBackendInfo/HealthCheckFirewallsConfigState.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LoadBalancerInfo.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LoadBalancerInfo/BackendType.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LoadBalancerInfo/LoadBalancerType.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LoadBalancerType.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/NatInfo.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/NatInfo/Type.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/NetworkInfo.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/OperationMetadata.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ProbingDetails.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ProbingDetails/EdgeLocation.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ProbingDetails/ProbingAbortCause.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ProbingDetails/ProbingResult.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ProxyConnectionInfo.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ReachabilityDetails.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ReachabilityDetails/Result.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/RedisClusterInfo.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/RedisInstanceInfo.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/RerunConnectivityTestRequest.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/RouteInfo.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/RouteInfo/NextHopType.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/RouteInfo/RouteScope.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/RouteInfo/RouteType.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ServerlessNegInfo.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Step.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Step/State.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/StorageBucketInfo.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Trace.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/UpdateConnectivityTestRequest.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/VpcConnectorInfo.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/VpnGatewayInfo.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/VpnTunnelInfo.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/VpnTunnelInfo/RoutingType.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/create_connectivity_test.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/delete_connectivity_test.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/get_connectivity_test.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/get_iam_policy.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/get_location.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/list_connectivity_tests.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/list_locations.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/rerun_connectivity_test.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/set_iam_policy.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/test_iam_permissions.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/update_connectivity_test.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/src/V1/Client/ReachabilityServiceClient.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/NetworkManagement/v1/src/V1/resources/reachability_service_client_config.json delete mode 100644 owl-bot-staging/NetworkManagement/v1/src/V1/resources/reachability_service_descriptor_config.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/src/V1/resources/reachability_service_rest_client_config.php delete mode 100644 owl-bot-staging/NetworkManagement/v1/tests/Unit/V1/Client/ReachabilityServiceClientTest.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/AuthorizationPolicy.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/ClientTlsPolicy.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/Common.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/NetworkSecurity.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/ServerTlsPolicy.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/Tls.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthorizationPolicy.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthorizationPolicy/Action.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthorizationPolicy/Rule.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthorizationPolicy/Rule/Destination.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthorizationPolicy/Rule/Destination/HttpHeaderMatch.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthorizationPolicy/Rule/Source.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CertificateProvider.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CertificateProviderInstance.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ClientTlsPolicy.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateAuthorizationPolicyRequest.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateClientTlsPolicyRequest.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateServerTlsPolicyRequest.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteAuthorizationPolicyRequest.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteClientTlsPolicyRequest.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteServerTlsPolicyRequest.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetAuthorizationPolicyRequest.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetClientTlsPolicyRequest.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetServerTlsPolicyRequest.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GrpcEndpoint.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListAuthorizationPoliciesRequest.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListAuthorizationPoliciesResponse.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListClientTlsPoliciesRequest.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListClientTlsPoliciesResponse.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListServerTlsPoliciesRequest.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListServerTlsPoliciesResponse.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/OperationMetadata.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ServerTlsPolicy.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ServerTlsPolicy/MTLSPolicy.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateAuthorizationPolicyRequest.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateClientTlsPolicyRequest.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateServerTlsPolicyRequest.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ValidationCA.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/create_authorization_policy.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/create_client_tls_policy.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/create_server_tls_policy.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/delete_authorization_policy.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/delete_client_tls_policy.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/delete_server_tls_policy.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_authorization_policy.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_client_tls_policy.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_iam_policy.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_location.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_server_tls_policy.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_authorization_policies.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_client_tls_policies.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_locations.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_server_tls_policies.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/set_iam_policy.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/test_iam_permissions.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/update_authorization_policy.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/update_client_tls_policy.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/update_server_tls_policy.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/src/V1/Client/NetworkSecurityClient.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/NetworkSecurity/v1/src/V1/resources/network_security_client_config.json delete mode 100644 owl-bot-staging/NetworkSecurity/v1/src/V1/resources/network_security_descriptor_config.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/src/V1/resources/network_security_rest_client_config.php delete mode 100644 owl-bot-staging/NetworkSecurity/v1/tests/Unit/V1/Client/NetworkSecurityClientTest.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/GPBMetadata/Google/Cloud/Networkservices/V1/Common.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/GPBMetadata/Google/Cloud/Networkservices/V1/Dep.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/GPBMetadata/Google/Cloud/Networkservices/V1/EndpointPolicy.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/GPBMetadata/Google/Cloud/Networkservices/V1/Gateway.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/GPBMetadata/Google/Cloud/Networkservices/V1/GrpcRoute.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/GPBMetadata/Google/Cloud/Networkservices/V1/HttpRoute.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/GPBMetadata/Google/Cloud/Networkservices/V1/Mesh.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/GPBMetadata/Google/Cloud/Networkservices/V1/NetworkServices.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/GPBMetadata/Google/Cloud/Networkservices/V1/ServiceBinding.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/GPBMetadata/Google/Cloud/Networkservices/V1/TcpRoute.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/GPBMetadata/Google/Cloud/Networkservices/V1/TlsRoute.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/CreateEndpointPolicyRequest.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/CreateGatewayRequest.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/CreateGrpcRouteRequest.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/CreateHttpRouteRequest.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/CreateLbRouteExtensionRequest.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/CreateLbTrafficExtensionRequest.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/CreateMeshRequest.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/CreateServiceBindingRequest.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/CreateTcpRouteRequest.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/CreateTlsRouteRequest.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/DeleteEndpointPolicyRequest.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/DeleteGatewayRequest.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/DeleteGrpcRouteRequest.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/DeleteHttpRouteRequest.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/DeleteLbRouteExtensionRequest.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/DeleteLbTrafficExtensionRequest.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/DeleteMeshRequest.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/DeleteServiceBindingRequest.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/DeleteTcpRouteRequest.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/DeleteTlsRouteRequest.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/EndpointMatcher.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/EndpointMatcher/MetadataLabelMatcher.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/EndpointMatcher/MetadataLabelMatcher/MetadataLabelMatchCriteria.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/EndpointMatcher/MetadataLabelMatcher/MetadataLabels.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/EndpointPolicy.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/EndpointPolicy/EndpointPolicyType.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/EventType.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ExtensionChain.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ExtensionChain/Extension.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ExtensionChain/MatchCondition.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/Gateway.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/Gateway/Type.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GetEndpointPolicyRequest.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GetGatewayRequest.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GetGrpcRouteRequest.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GetHttpRouteRequest.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GetLbRouteExtensionRequest.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GetLbTrafficExtensionRequest.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GetMeshRequest.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GetServiceBindingRequest.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GetTcpRouteRequest.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GetTlsRouteRequest.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute/Destination.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute/FaultInjectionPolicy.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute/FaultInjectionPolicy/Abort.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute/FaultInjectionPolicy/Delay.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute/HeaderMatch.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute/HeaderMatch/Type.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute/MethodMatch.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute/MethodMatch/Type.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute/RetryPolicy.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute/RouteAction.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute/RouteMatch.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute/RouteRule.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/CorsPolicy.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/Destination.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/FaultInjectionPolicy.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/FaultInjectionPolicy/Abort.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/FaultInjectionPolicy/Delay.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/HeaderMatch.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/HeaderMatch/IntegerRange.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/HeaderModifier.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/QueryParameterMatch.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/Redirect.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/Redirect/ResponseCode.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/RequestMirrorPolicy.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/RetryPolicy.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/RouteAction.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/RouteMatch.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/RouteRule.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/URLRewrite.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/LbRouteExtension.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/LbTrafficExtension.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListEndpointPoliciesRequest.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListEndpointPoliciesResponse.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListGatewaysRequest.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListGatewaysResponse.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListGrpcRoutesRequest.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListGrpcRoutesResponse.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListHttpRoutesRequest.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListHttpRoutesResponse.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListLbRouteExtensionsRequest.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListLbRouteExtensionsResponse.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListLbTrafficExtensionsRequest.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListLbTrafficExtensionsResponse.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListMeshesRequest.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListMeshesResponse.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListServiceBindingsRequest.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListServiceBindingsResponse.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListTcpRoutesRequest.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListTcpRoutesResponse.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListTlsRoutesRequest.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListTlsRoutesResponse.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/LoadBalancingScheme.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/Mesh.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/OperationMetadata.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ServiceBinding.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/TcpRoute.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/TcpRoute/RouteAction.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/TcpRoute/RouteDestination.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/TcpRoute/RouteMatch.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/TcpRoute/RouteRule.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/TlsRoute.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/TlsRoute/RouteAction.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/TlsRoute/RouteDestination.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/TlsRoute/RouteMatch.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/TlsRoute/RouteRule.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/TrafficPortSelector.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/UpdateEndpointPolicyRequest.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/UpdateGatewayRequest.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/UpdateGrpcRouteRequest.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/UpdateHttpRouteRequest.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/UpdateLbRouteExtensionRequest.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/UpdateLbTrafficExtensionRequest.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/UpdateMeshRequest.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/UpdateTcpRouteRequest.php delete mode 100644 owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/UpdateTlsRouteRequest.php delete mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/create_lb_route_extension.php delete mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/create_lb_traffic_extension.php delete mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/delete_lb_route_extension.php delete mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/delete_lb_traffic_extension.php delete mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/get_iam_policy.php delete mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/get_lb_route_extension.php delete mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/get_lb_traffic_extension.php delete mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/get_location.php delete mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/list_lb_route_extensions.php delete mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/list_lb_traffic_extensions.php delete mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/list_locations.php delete mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/set_iam_policy.php delete mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/test_iam_permissions.php delete mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/update_lb_route_extension.php delete mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/update_lb_traffic_extension.php delete mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/create_endpoint_policy.php delete mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/create_gateway.php delete mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/create_grpc_route.php delete mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/create_http_route.php delete mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/create_mesh.php delete mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/create_service_binding.php delete mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/create_tcp_route.php delete mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/create_tls_route.php delete mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/delete_endpoint_policy.php delete mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/delete_gateway.php delete mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/delete_grpc_route.php delete mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/delete_http_route.php delete mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/delete_mesh.php delete mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/delete_service_binding.php delete mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/delete_tcp_route.php delete mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/delete_tls_route.php delete mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/get_endpoint_policy.php delete mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/get_gateway.php delete mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/get_grpc_route.php delete mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/get_http_route.php delete mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/get_iam_policy.php delete mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/get_location.php delete mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/get_mesh.php delete mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/get_service_binding.php delete mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/get_tcp_route.php delete mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/get_tls_route.php delete mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/list_endpoint_policies.php delete mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/list_gateways.php delete mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/list_grpc_routes.php delete mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/list_http_routes.php delete mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/list_locations.php delete mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/list_meshes.php delete mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/list_service_bindings.php delete mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/list_tcp_routes.php delete mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/list_tls_routes.php delete mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/set_iam_policy.php delete mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/test_iam_permissions.php delete mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/update_endpoint_policy.php delete mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/update_gateway.php delete mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/update_grpc_route.php delete mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/update_http_route.php delete mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/update_mesh.php delete mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/update_tcp_route.php delete mode 100644 owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/update_tls_route.php delete mode 100644 owl-bot-staging/NetworkServices/v1/src/V1/Client/DepServiceClient.php delete mode 100644 owl-bot-staging/NetworkServices/v1/src/V1/Client/NetworkServicesClient.php delete mode 100644 owl-bot-staging/NetworkServices/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/NetworkServices/v1/src/V1/resources/dep_service_client_config.json delete mode 100644 owl-bot-staging/NetworkServices/v1/src/V1/resources/dep_service_descriptor_config.php delete mode 100644 owl-bot-staging/NetworkServices/v1/src/V1/resources/dep_service_rest_client_config.php delete mode 100644 owl-bot-staging/NetworkServices/v1/src/V1/resources/network_services_client_config.json delete mode 100644 owl-bot-staging/NetworkServices/v1/src/V1/resources/network_services_descriptor_config.php delete mode 100644 owl-bot-staging/NetworkServices/v1/src/V1/resources/network_services_rest_client_config.php delete mode 100644 owl-bot-staging/NetworkServices/v1/tests/Unit/V1/Client/DepServiceClientTest.php delete mode 100644 owl-bot-staging/NetworkServices/v1/tests/Unit/V1/Client/NetworkServicesClientTest.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/GPBMetadata/Google/Cloud/Notebooks/V1/DiagnosticConfig.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/GPBMetadata/Google/Cloud/Notebooks/V1/Environment.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/GPBMetadata/Google/Cloud/Notebooks/V1/Event.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/GPBMetadata/Google/Cloud/Notebooks/V1/Execution.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/GPBMetadata/Google/Cloud/Notebooks/V1/Instance.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/GPBMetadata/Google/Cloud/Notebooks/V1/InstanceConfig.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/GPBMetadata/Google/Cloud/Notebooks/V1/ManagedService.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/GPBMetadata/Google/Cloud/Notebooks/V1/Runtime.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/GPBMetadata/Google/Cloud/Notebooks/V1/Schedule.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/GPBMetadata/Google/Cloud/Notebooks/V1/Service.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ContainerImage.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/CreateEnvironmentRequest.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/CreateExecutionRequest.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/CreateInstanceRequest.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/CreateRuntimeRequest.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/CreateScheduleRequest.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/DeleteEnvironmentRequest.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/DeleteExecutionRequest.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/DeleteInstanceRequest.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/DeleteRuntimeRequest.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/DeleteScheduleRequest.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/DiagnoseInstanceRequest.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/DiagnoseRuntimeRequest.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/DiagnosticConfig.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/EncryptionConfig.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Environment.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Event.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Event/EventType.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Execution.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Execution/State.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ExecutionTemplate.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ExecutionTemplate/DataprocParameters.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ExecutionTemplate/JobType.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ExecutionTemplate/ScaleTier.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ExecutionTemplate/SchedulerAcceleratorConfig.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ExecutionTemplate/SchedulerAcceleratorType.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ExecutionTemplate/VertexAIParameters.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/GetEnvironmentRequest.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/GetExecutionRequest.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/GetInstanceHealthRequest.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/GetInstanceHealthResponse.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/GetInstanceHealthResponse/HealthState.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/GetInstanceRequest.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/GetRuntimeRequest.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/GetScheduleRequest.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance/AcceleratorConfig.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance/AcceleratorType.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance/Disk.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance/Disk/GuestOsFeature.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance/DiskEncryption.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance/DiskType.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance/NicType.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance/ShieldedInstanceConfig.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance/State.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance/UpgradeHistoryEntry.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance/UpgradeHistoryEntry/Action.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance/UpgradeHistoryEntry/State.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/InstanceConfig.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/IsInstanceUpgradeableRequest.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/IsInstanceUpgradeableResponse.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ListEnvironmentsRequest.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ListEnvironmentsResponse.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ListExecutionsRequest.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ListExecutionsResponse.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ListInstancesRequest.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ListInstancesResponse.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ListRuntimesRequest.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ListRuntimesResponse.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ListSchedulesRequest.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ListSchedulesResponse.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/LocalDisk.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/LocalDisk/RuntimeGuestOsFeature.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/LocalDiskInitializeParams.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/LocalDiskInitializeParams/DiskType.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/OperationMetadata.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/RefreshRuntimeTokenInternalRequest.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/RefreshRuntimeTokenInternalResponse.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/RegisterInstanceRequest.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ReportInstanceInfoRequest.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ReportRuntimeEventRequest.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ReservationAffinity.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ReservationAffinity/Type.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ResetInstanceRequest.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ResetRuntimeRequest.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/RollbackInstanceRequest.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Runtime.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Runtime/HealthState.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Runtime/State.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/RuntimeAcceleratorConfig.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/RuntimeAcceleratorConfig/AcceleratorType.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/RuntimeAccessConfig.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/RuntimeAccessConfig/RuntimeAccessType.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/RuntimeMetrics.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/RuntimeShieldedInstanceConfig.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/RuntimeSoftwareConfig.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/RuntimeSoftwareConfig/PostStartupScriptBehavior.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Schedule.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Schedule/State.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/SetInstanceAcceleratorRequest.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/SetInstanceLabelsRequest.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/SetInstanceMachineTypeRequest.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/StartInstanceRequest.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/StartRuntimeRequest.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/StopInstanceRequest.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/StopRuntimeRequest.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/SwitchRuntimeRequest.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/TriggerScheduleRequest.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/UpdateInstanceConfigRequest.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/UpdateInstanceMetadataItemsRequest.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/UpdateInstanceMetadataItemsResponse.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/UpdateRuntimeRequest.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/UpdateShieldedInstanceConfigRequest.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/UpgradeInstanceInternalRequest.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/UpgradeInstanceRequest.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/UpgradeRuntimeRequest.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/UpgradeType.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/VirtualMachine.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/VirtualMachineConfig.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/VirtualMachineConfig/BootImage.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/VirtualMachineConfig/NicType.php delete mode 100644 owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/VmImage.php delete mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/create_runtime.php delete mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/delete_runtime.php delete mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/diagnose_runtime.php delete mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/get_iam_policy.php delete mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/get_location.php delete mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/get_runtime.php delete mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/list_locations.php delete mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/list_runtimes.php delete mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/refresh_runtime_token_internal.php delete mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/report_runtime_event.php delete mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/reset_runtime.php delete mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/set_iam_policy.php delete mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/start_runtime.php delete mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/stop_runtime.php delete mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/switch_runtime.php delete mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/test_iam_permissions.php delete mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/update_runtime.php delete mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/upgrade_runtime.php delete mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/create_environment.php delete mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/create_execution.php delete mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/create_instance.php delete mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/create_schedule.php delete mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/delete_environment.php delete mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/delete_execution.php delete mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/delete_instance.php delete mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/delete_schedule.php delete mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/diagnose_instance.php delete mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/get_environment.php delete mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/get_execution.php delete mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/get_iam_policy.php delete mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/get_instance.php delete mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/get_instance_health.php delete mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/get_location.php delete mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/get_schedule.php delete mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/is_instance_upgradeable.php delete mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/list_environments.php delete mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/list_executions.php delete mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/list_instances.php delete mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/list_locations.php delete mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/list_schedules.php delete mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/register_instance.php delete mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/report_instance_info.php delete mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/reset_instance.php delete mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/rollback_instance.php delete mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/set_iam_policy.php delete mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/set_instance_accelerator.php delete mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/set_instance_labels.php delete mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/set_instance_machine_type.php delete mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/start_instance.php delete mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/stop_instance.php delete mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/test_iam_permissions.php delete mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/trigger_schedule.php delete mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/update_instance_config.php delete mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/update_instance_metadata_items.php delete mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/update_shielded_instance_config.php delete mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/upgrade_instance.php delete mode 100644 owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/upgrade_instance_internal.php delete mode 100644 owl-bot-staging/Notebooks/v1/src/V1/Client/ManagedNotebookServiceClient.php delete mode 100644 owl-bot-staging/Notebooks/v1/src/V1/Client/NotebookServiceClient.php delete mode 100644 owl-bot-staging/Notebooks/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/Notebooks/v1/src/V1/resources/managed_notebook_service_client_config.json delete mode 100644 owl-bot-staging/Notebooks/v1/src/V1/resources/managed_notebook_service_descriptor_config.php delete mode 100644 owl-bot-staging/Notebooks/v1/src/V1/resources/managed_notebook_service_rest_client_config.php delete mode 100644 owl-bot-staging/Notebooks/v1/src/V1/resources/notebook_service_client_config.json delete mode 100644 owl-bot-staging/Notebooks/v1/src/V1/resources/notebook_service_descriptor_config.php delete mode 100644 owl-bot-staging/Notebooks/v1/src/V1/resources/notebook_service_rest_client_config.php delete mode 100644 owl-bot-staging/Notebooks/v1/tests/Unit/V1/Client/ManagedNotebookServiceClientTest.php delete mode 100644 owl-bot-staging/Notebooks/v1/tests/Unit/V1/Client/NotebookServiceClientTest.php delete mode 100644 owl-bot-staging/Notebooks/v2/proto/src/GPBMetadata/Google/Cloud/Notebooks/V2/DiagnosticConfig.php delete mode 100644 owl-bot-staging/Notebooks/v2/proto/src/GPBMetadata/Google/Cloud/Notebooks/V2/Event.php delete mode 100644 owl-bot-staging/Notebooks/v2/proto/src/GPBMetadata/Google/Cloud/Notebooks/V2/GceSetup.php delete mode 100644 owl-bot-staging/Notebooks/v2/proto/src/GPBMetadata/Google/Cloud/Notebooks/V2/Instance.php delete mode 100644 owl-bot-staging/Notebooks/v2/proto/src/GPBMetadata/Google/Cloud/Notebooks/V2/Service.php delete mode 100644 owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/AcceleratorConfig.php delete mode 100644 owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/AcceleratorConfig/AcceleratorType.php delete mode 100644 owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/BootDisk.php delete mode 100644 owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/CheckInstanceUpgradabilityRequest.php delete mode 100644 owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/CheckInstanceUpgradabilityResponse.php delete mode 100644 owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/ContainerImage.php delete mode 100644 owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/CreateInstanceRequest.php delete mode 100644 owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/DataDisk.php delete mode 100644 owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/DeleteInstanceRequest.php delete mode 100644 owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/DiagnoseInstanceRequest.php delete mode 100644 owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/DiagnosticConfig.php delete mode 100644 owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/DiskEncryption.php delete mode 100644 owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/DiskType.php delete mode 100644 owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/Event.php delete mode 100644 owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/Event/EventType.php delete mode 100644 owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/GPUDriverConfig.php delete mode 100644 owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/GceSetup.php delete mode 100644 owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/GetInstanceRequest.php delete mode 100644 owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/HealthState.php delete mode 100644 owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/Instance.php delete mode 100644 owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/ListInstancesRequest.php delete mode 100644 owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/ListInstancesResponse.php delete mode 100644 owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/NetworkInterface.php delete mode 100644 owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/NetworkInterface/NicType.php delete mode 100644 owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/OperationMetadata.php delete mode 100644 owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/ResetInstanceRequest.php delete mode 100644 owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/RollbackInstanceRequest.php delete mode 100644 owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/ServiceAccount.php delete mode 100644 owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/ShieldedInstanceConfig.php delete mode 100644 owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/StartInstanceRequest.php delete mode 100644 owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/State.php delete mode 100644 owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/StopInstanceRequest.php delete mode 100644 owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/UpdateInstanceRequest.php delete mode 100644 owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/UpgradeHistoryEntry.php delete mode 100644 owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/UpgradeHistoryEntry/Action.php delete mode 100644 owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/UpgradeHistoryEntry/State.php delete mode 100644 owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/UpgradeInstanceRequest.php delete mode 100644 owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/VmImage.php delete mode 100644 owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/check_instance_upgradability.php delete mode 100644 owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/create_instance.php delete mode 100644 owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/delete_instance.php delete mode 100644 owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/diagnose_instance.php delete mode 100644 owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/get_iam_policy.php delete mode 100644 owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/get_instance.php delete mode 100644 owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/get_location.php delete mode 100644 owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/list_instances.php delete mode 100644 owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/list_locations.php delete mode 100644 owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/reset_instance.php delete mode 100644 owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/rollback_instance.php delete mode 100644 owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/set_iam_policy.php delete mode 100644 owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/start_instance.php delete mode 100644 owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/stop_instance.php delete mode 100644 owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/test_iam_permissions.php delete mode 100644 owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/update_instance.php delete mode 100644 owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/upgrade_instance.php delete mode 100644 owl-bot-staging/Notebooks/v2/src/V2/Client/NotebookServiceClient.php delete mode 100644 owl-bot-staging/Notebooks/v2/src/V2/gapic_metadata.json delete mode 100644 owl-bot-staging/Notebooks/v2/src/V2/resources/notebook_service_client_config.json delete mode 100644 owl-bot-staging/Notebooks/v2/src/V2/resources/notebook_service_descriptor_config.php delete mode 100644 owl-bot-staging/Notebooks/v2/src/V2/resources/notebook_service_rest_client_config.php delete mode 100644 owl-bot-staging/Notebooks/v2/tests/Unit/V2/Client/NotebookServiceClientTest.php delete mode 100644 owl-bot-staging/Optimization/v1/proto/src/GPBMetadata/Google/Cloud/Optimization/V1/AsyncModel.php delete mode 100644 owl-bot-staging/Optimization/v1/proto/src/GPBMetadata/Google/Cloud/Optimization/V1/FleetRouting.php delete mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/AggregatedMetrics.php delete mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/AsyncModelMetadata.php delete mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/AsyncModelMetadata/State.php delete mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/BatchOptimizeToursRequest.php delete mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/BatchOptimizeToursRequest/AsyncModelConfig.php delete mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/BatchOptimizeToursResponse.php delete mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/BreakRule.php delete mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/BreakRule/BreakRequest.php delete mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/BreakRule/FrequencyConstraint.php delete mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/CapacityQuantity.php delete mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/CapacityQuantityInterval.php delete mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/DataFormat.php delete mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/DistanceLimit.php delete mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/GcsDestination.php delete mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/GcsSource.php delete mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/InjectedSolutionConstraint.php delete mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/InjectedSolutionConstraint/ConstraintRelaxation.php delete mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/InjectedSolutionConstraint/ConstraintRelaxation/Relaxation.php delete mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/InjectedSolutionConstraint/ConstraintRelaxation/Relaxation/Level.php delete mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/InputConfig.php delete mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/Location.php delete mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/OptimizeToursRequest.php delete mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/OptimizeToursRequest/SearchMode.php delete mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/OptimizeToursRequest/SolvingMode.php delete mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/OptimizeToursResponse.php delete mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/OptimizeToursResponse/Metrics.php delete mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/OptimizeToursValidationError.php delete mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/OptimizeToursValidationError/FieldReference.php delete mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/OutputConfig.php delete mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/RouteModifiers.php delete mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/Shipment.php delete mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/Shipment/Load.php delete mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/Shipment/VisitRequest.php delete mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentModel.php delete mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentModel/BreakRule.php delete mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentModel/BreakRule/BreakRequest.php delete mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentModel/BreakRule/FrequencyConstraint.php delete mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentModel/DurationDistanceMatrix.php delete mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentModel/DurationDistanceMatrix/Row.php delete mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentModel/PrecedenceRule.php delete mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentRoute.php delete mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentRoute/Delay.php delete mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentRoute/EncodedPolyline.php delete mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentRoute/PBBreak.php delete mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentRoute/Transition.php delete mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentRoute/TravelStep.php delete mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentRoute/VehicleLoad.php delete mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentRoute/Visit.php delete mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentTypeIncompatibility.php delete mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentTypeIncompatibility/IncompatibilityMode.php delete mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentTypeRequirement.php delete mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentTypeRequirement/RequirementMode.php delete mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/SkippedShipment.php delete mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/SkippedShipment/Reason.php delete mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/SkippedShipment/Reason/Code.php delete mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/TimeWindow.php delete mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/TransitionAttributes.php delete mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/Vehicle.php delete mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/Vehicle/DurationLimit.php delete mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/Vehicle/LoadLimit.php delete mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/Vehicle/LoadLimit/Interval.php delete mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/Vehicle/TravelMode.php delete mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/Vehicle/UnloadingPolicy.php delete mode 100644 owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/Waypoint.php delete mode 100644 owl-bot-staging/Optimization/v1/samples/V1/FleetRoutingClient/batch_optimize_tours.php delete mode 100644 owl-bot-staging/Optimization/v1/samples/V1/FleetRoutingClient/optimize_tours.php delete mode 100644 owl-bot-staging/Optimization/v1/src/V1/Client/FleetRoutingClient.php delete mode 100644 owl-bot-staging/Optimization/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/Optimization/v1/src/V1/resources/fleet_routing_client_config.json delete mode 100644 owl-bot-staging/Optimization/v1/src/V1/resources/fleet_routing_descriptor_config.php delete mode 100644 owl-bot-staging/Optimization/v1/src/V1/resources/fleet_routing_rest_client_config.php delete mode 100644 owl-bot-staging/Optimization/v1/tests/Unit/V1/Client/FleetRoutingClientTest.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/GPBMetadata/Google/Cloud/Oracledatabase/V1/AutonomousDatabase.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/GPBMetadata/Google/Cloud/Oracledatabase/V1/AutonomousDatabaseCharacterSet.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/GPBMetadata/Google/Cloud/Oracledatabase/V1/AutonomousDbBackup.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/GPBMetadata/Google/Cloud/Oracledatabase/V1/AutonomousDbVersion.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/GPBMetadata/Google/Cloud/Oracledatabase/V1/Common.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/GPBMetadata/Google/Cloud/Oracledatabase/V1/DbNode.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/GPBMetadata/Google/Cloud/Oracledatabase/V1/DbServer.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/GPBMetadata/Google/Cloud/Oracledatabase/V1/DbSystemShape.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/GPBMetadata/Google/Cloud/Oracledatabase/V1/Entitlement.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/GPBMetadata/Google/Cloud/Oracledatabase/V1/ExadataInfra.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/GPBMetadata/Google/Cloud/Oracledatabase/V1/GiVersion.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/GPBMetadata/Google/Cloud/Oracledatabase/V1/LocationMetadata.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/GPBMetadata/Google/Cloud/Oracledatabase/V1/Oracledatabase.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/GPBMetadata/Google/Cloud/Oracledatabase/V1/VmCluster.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AllConnectionStrings.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabase.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseApex.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseBackup.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseBackupProperties.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseBackupProperties/State.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseBackupProperties/Type.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseCharacterSet.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseCharacterSet/CharacterSetType.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseConnectionStrings.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseConnectionUrls.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseProperties.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseProperties/DataSafeState.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseProperties/DatabaseEdition.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseProperties/DatabaseManagementState.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseProperties/LicenseType.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseProperties/LocalDisasterRecoveryType.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseProperties/MaintenanceScheduleType.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseProperties/OpenMode.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseProperties/PermissionLevel.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseProperties/RefreshableMode.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseProperties/RefreshableState.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseProperties/Role.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseStandbySummary.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDbVersion.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CloudAccountDetails.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CloudExadataInfrastructure.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CloudExadataInfrastructureProperties.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CloudExadataInfrastructureProperties/State.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CloudVmCluster.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CloudVmClusterProperties.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CloudVmClusterProperties/DiskRedundancy.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CloudVmClusterProperties/LicenseType.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CloudVmClusterProperties/State.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CreateAutonomousDatabaseRequest.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CreateCloudExadataInfrastructureRequest.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CreateCloudVmClusterRequest.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CustomerContact.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DBWorkload.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DataCollectionOptions.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DatabaseConnectionStringProfile.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DatabaseConnectionStringProfile/ConsumerGroup.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DatabaseConnectionStringProfile/HostFormat.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DatabaseConnectionStringProfile/Protocol.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DatabaseConnectionStringProfile/SessionMode.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DatabaseConnectionStringProfile/SyntaxFormat.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DatabaseConnectionStringProfile/TLSAuthentication.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DbNode.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DbNodeProperties.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DbNodeProperties/State.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DbServer.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DbServerProperties.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DbServerProperties/State.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DbSystemShape.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DeleteAutonomousDatabaseRequest.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DeleteCloudExadataInfrastructureRequest.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DeleteCloudVmClusterRequest.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/Entitlement.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/Entitlement/State.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/GenerateAutonomousDatabaseWalletRequest.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/GenerateAutonomousDatabaseWalletResponse.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/GenerateType.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/GetAutonomousDatabaseRequest.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/GetCloudExadataInfrastructureRequest.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/GetCloudVmClusterRequest.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/GiVersion.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListAutonomousDatabaseBackupsRequest.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListAutonomousDatabaseBackupsResponse.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListAutonomousDatabaseCharacterSetsRequest.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListAutonomousDatabaseCharacterSetsResponse.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListAutonomousDatabasesRequest.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListAutonomousDatabasesResponse.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListAutonomousDbVersionsRequest.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListAutonomousDbVersionsResponse.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListCloudExadataInfrastructuresRequest.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListCloudExadataInfrastructuresResponse.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListCloudVmClustersRequest.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListCloudVmClustersResponse.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListDbNodesRequest.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListDbNodesResponse.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListDbServersRequest.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListDbServersResponse.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListDbSystemShapesRequest.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListDbSystemShapesResponse.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListEntitlementsRequest.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListEntitlementsResponse.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListGiVersionsRequest.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListGiVersionsResponse.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/LocationMetadata.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/MaintenanceWindow.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/MaintenanceWindow/MaintenanceWindowPreference.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/MaintenanceWindow/PatchingMode.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/OperationMetadata.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/OperationsInsightsState.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/RestoreAutonomousDatabaseRequest.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ScheduledOperationDetails.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/State.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/create_autonomous_database.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/create_cloud_exadata_infrastructure.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/create_cloud_vm_cluster.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/delete_autonomous_database.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/delete_cloud_exadata_infrastructure.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/delete_cloud_vm_cluster.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/generate_autonomous_database_wallet.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/get_autonomous_database.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/get_cloud_exadata_infrastructure.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/get_cloud_vm_cluster.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/get_location.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/list_autonomous_database_backups.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/list_autonomous_database_character_sets.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/list_autonomous_databases.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/list_autonomous_db_versions.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/list_cloud_exadata_infrastructures.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/list_cloud_vm_clusters.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/list_db_nodes.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/list_db_servers.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/list_db_system_shapes.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/list_entitlements.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/list_gi_versions.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/list_locations.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/restore_autonomous_database.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/src/V1/Client/OracleDatabaseClient.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/OracleDatabase/v1/src/V1/resources/oracle_database_client_config.json delete mode 100644 owl-bot-staging/OracleDatabase/v1/src/V1/resources/oracle_database_descriptor_config.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/src/V1/resources/oracle_database_rest_client_config.php delete mode 100644 owl-bot-staging/OracleDatabase/v1/tests/Unit/V1/Client/OracleDatabaseClientTest.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/GPBMetadata/Google/Cloud/Orchestration/Airflow/Service/V1/Environments.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/GPBMetadata/Google/Cloud/Orchestration/Airflow/Service/V1/ImageVersions.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/GPBMetadata/Google/Cloud/Orchestration/Airflow/Service/V1/Operations.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/AirflowMetadataRetentionPolicyConfig.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/AirflowMetadataRetentionPolicyConfig/RetentionMode.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/CheckUpgradeRequest.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/CheckUpgradeResponse.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/CheckUpgradeResponse/ConflictResult.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/CloudDataLineageIntegration.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/CreateEnvironmentRequest.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/CreateUserWorkloadsConfigMapRequest.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/CreateUserWorkloadsSecretRequest.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/DataRetentionConfig.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/DatabaseConfig.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/DatabaseFailoverRequest.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/DatabaseFailoverResponse.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/DeleteEnvironmentRequest.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/DeleteUserWorkloadsConfigMapRequest.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/DeleteUserWorkloadsSecretRequest.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/EncryptionConfig.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/Environment.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/Environment/State.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/EnvironmentConfig.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/EnvironmentConfig/EnvironmentSize.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/EnvironmentConfig/ResilienceMode.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ExecuteAirflowCommandRequest.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ExecuteAirflowCommandResponse.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/FetchDatabasePropertiesRequest.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/FetchDatabasePropertiesResponse.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/GetEnvironmentRequest.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/GetUserWorkloadsConfigMapRequest.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/GetUserWorkloadsSecretRequest.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/IPAllocationPolicy.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ImageVersion.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListEnvironmentsRequest.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListEnvironmentsResponse.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListImageVersionsRequest.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListImageVersionsResponse.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListUserWorkloadsConfigMapsRequest.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListUserWorkloadsConfigMapsResponse.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListUserWorkloadsSecretsRequest.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListUserWorkloadsSecretsResponse.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListWorkloadsRequest.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListWorkloadsResponse.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListWorkloadsResponse/ComposerWorkload.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListWorkloadsResponse/ComposerWorkloadState.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListWorkloadsResponse/ComposerWorkloadStatus.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListWorkloadsResponse/ComposerWorkloadType.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/LoadSnapshotRequest.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/LoadSnapshotResponse.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/MaintenanceWindow.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/MasterAuthorizedNetworksConfig.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/MasterAuthorizedNetworksConfig/CidrBlock.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/NetworkingConfig.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/NetworkingConfig/ConnectionType.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/NodeConfig.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/OperationMetadata.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/OperationMetadata/State.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/OperationMetadata/Type.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/PollAirflowCommandRequest.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/PollAirflowCommandResponse.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/PollAirflowCommandResponse/ExitInfo.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/PollAirflowCommandResponse/Line.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/PrivateClusterConfig.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/PrivateEnvironmentConfig.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/RecoveryConfig.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/SaveSnapshotRequest.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/SaveSnapshotResponse.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ScheduledSnapshotsConfig.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/SoftwareConfig.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/SoftwareConfig/WebServerPluginsMode.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/StopAirflowCommandRequest.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/StopAirflowCommandResponse.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/StorageConfig.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/TaskLogsRetentionConfig.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/TaskLogsRetentionConfig/TaskLogsStorageMode.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/UpdateEnvironmentRequest.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/UpdateUserWorkloadsConfigMapRequest.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/UpdateUserWorkloadsSecretRequest.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/UserWorkloadsConfigMap.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/UserWorkloadsSecret.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/WebServerConfig.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/WebServerNetworkAccessControl.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/WebServerNetworkAccessControl/AllowedIpRange.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/WorkloadsConfig.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/WorkloadsConfig/DagProcessorResource.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/WorkloadsConfig/SchedulerResource.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/WorkloadsConfig/TriggererResource.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/WorkloadsConfig/WebServerResource.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/WorkloadsConfig/WorkerResource.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/check_upgrade.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/create_environment.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/create_user_workloads_config_map.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/create_user_workloads_secret.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/database_failover.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/delete_environment.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/delete_user_workloads_config_map.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/delete_user_workloads_secret.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/execute_airflow_command.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/fetch_database_properties.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/get_environment.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/get_user_workloads_config_map.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/get_user_workloads_secret.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/list_environments.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/list_user_workloads_config_maps.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/list_user_workloads_secrets.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/list_workloads.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/load_snapshot.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/poll_airflow_command.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/save_snapshot.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/stop_airflow_command.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/update_environment.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/update_user_workloads_config_map.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/update_user_workloads_secret.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/samples/V1/ImageVersionsClient/list_image_versions.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/src/V1/Client/EnvironmentsClient.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/src/V1/Client/ImageVersionsClient.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/src/V1/resources/environments_client_config.json delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/src/V1/resources/environments_descriptor_config.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/src/V1/resources/environments_rest_client_config.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/src/V1/resources/image_versions_client_config.json delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/src/V1/resources/image_versions_descriptor_config.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/src/V1/resources/image_versions_rest_client_config.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/tests/Unit/V1/Client/EnvironmentsClientTest.php delete mode 100644 owl-bot-staging/OrchestrationAirflow/v1/tests/Unit/V1/Client/ImageVersionsClientTest.php delete mode 100644 owl-bot-staging/OrgPolicy/v2/proto/src/GPBMetadata/Google/Cloud/Orgpolicy/V2/Constraint.php delete mode 100644 owl-bot-staging/OrgPolicy/v2/proto/src/GPBMetadata/Google/Cloud/Orgpolicy/V2/Orgpolicy.php delete mode 100644 owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/AlternatePolicySpec.php delete mode 100644 owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/Constraint.php delete mode 100644 owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/Constraint/BooleanConstraint.php delete mode 100644 owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/Constraint/ConstraintDefault.php delete mode 100644 owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/Constraint/ListConstraint.php delete mode 100644 owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/CreateCustomConstraintRequest.php delete mode 100644 owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/CreatePolicyRequest.php delete mode 100644 owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/CustomConstraint.php delete mode 100644 owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/CustomConstraint/ActionType.php delete mode 100644 owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/CustomConstraint/MethodType.php delete mode 100644 owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/DeleteCustomConstraintRequest.php delete mode 100644 owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/DeletePolicyRequest.php delete mode 100644 owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/GetCustomConstraintRequest.php delete mode 100644 owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/GetEffectivePolicyRequest.php delete mode 100644 owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/GetPolicyRequest.php delete mode 100644 owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/ListConstraintsRequest.php delete mode 100644 owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/ListConstraintsResponse.php delete mode 100644 owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/ListCustomConstraintsRequest.php delete mode 100644 owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/ListCustomConstraintsResponse.php delete mode 100644 owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/ListPoliciesRequest.php delete mode 100644 owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/ListPoliciesResponse.php delete mode 100644 owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/Policy.php delete mode 100644 owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/PolicySpec.php delete mode 100644 owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/PolicySpec/PolicyRule.php delete mode 100644 owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/PolicySpec/PolicyRule/StringValues.php delete mode 100644 owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/UpdateCustomConstraintRequest.php delete mode 100644 owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/UpdatePolicyRequest.php delete mode 100644 owl-bot-staging/OrgPolicy/v2/samples/V2/OrgPolicyClient/create_custom_constraint.php delete mode 100644 owl-bot-staging/OrgPolicy/v2/samples/V2/OrgPolicyClient/create_policy.php delete mode 100644 owl-bot-staging/OrgPolicy/v2/samples/V2/OrgPolicyClient/delete_custom_constraint.php delete mode 100644 owl-bot-staging/OrgPolicy/v2/samples/V2/OrgPolicyClient/delete_policy.php delete mode 100644 owl-bot-staging/OrgPolicy/v2/samples/V2/OrgPolicyClient/get_custom_constraint.php delete mode 100644 owl-bot-staging/OrgPolicy/v2/samples/V2/OrgPolicyClient/get_effective_policy.php delete mode 100644 owl-bot-staging/OrgPolicy/v2/samples/V2/OrgPolicyClient/get_policy.php delete mode 100644 owl-bot-staging/OrgPolicy/v2/samples/V2/OrgPolicyClient/list_constraints.php delete mode 100644 owl-bot-staging/OrgPolicy/v2/samples/V2/OrgPolicyClient/list_custom_constraints.php delete mode 100644 owl-bot-staging/OrgPolicy/v2/samples/V2/OrgPolicyClient/list_policies.php delete mode 100644 owl-bot-staging/OrgPolicy/v2/samples/V2/OrgPolicyClient/update_custom_constraint.php delete mode 100644 owl-bot-staging/OrgPolicy/v2/samples/V2/OrgPolicyClient/update_policy.php delete mode 100644 owl-bot-staging/OrgPolicy/v2/src/V2/Client/OrgPolicyClient.php delete mode 100644 owl-bot-staging/OrgPolicy/v2/src/V2/gapic_metadata.json delete mode 100644 owl-bot-staging/OrgPolicy/v2/src/V2/resources/org_policy_client_config.json delete mode 100644 owl-bot-staging/OrgPolicy/v2/src/V2/resources/org_policy_descriptor_config.php delete mode 100644 owl-bot-staging/OrgPolicy/v2/src/V2/resources/org_policy_rest_client_config.php delete mode 100644 owl-bot-staging/OrgPolicy/v2/tests/Unit/V2/Client/OrgPolicyClientTest.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/GPBMetadata/Google/Cloud/Osconfig/V1/Inventory.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/GPBMetadata/Google/Cloud/Osconfig/V1/OsPolicy.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/GPBMetadata/Google/Cloud/Osconfig/V1/OsPolicyAssignmentReports.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/GPBMetadata/Google/Cloud/Osconfig/V1/OsPolicyAssignments.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/GPBMetadata/Google/Cloud/Osconfig/V1/OsconfigCommon.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/GPBMetadata/Google/Cloud/Osconfig/V1/OsconfigService.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/GPBMetadata/Google/Cloud/Osconfig/V1/OsconfigZonalService.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/GPBMetadata/Google/Cloud/Osconfig/V1/PatchDeployments.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/GPBMetadata/Google/Cloud/Osconfig/V1/PatchJobs.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/GPBMetadata/Google/Cloud/Osconfig/V1/Vulnerability.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/AptSettings.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/AptSettings/Type.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/CVSSv3.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/CVSSv3/AttackComplexity.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/CVSSv3/AttackVector.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/CVSSv3/Impact.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/CVSSv3/PrivilegesRequired.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/CVSSv3/Scope.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/CVSSv3/UserInteraction.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/CancelPatchJobRequest.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/CreateOSPolicyAssignmentRequest.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/CreatePatchDeploymentRequest.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/DeleteOSPolicyAssignmentRequest.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/DeletePatchDeploymentRequest.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ExecStep.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ExecStepConfig.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ExecStepConfig/Interpreter.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ExecutePatchJobRequest.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/FixedOrPercent.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/GcsObject.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/GetInventoryRequest.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/GetOSPolicyAssignmentReportRequest.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/GetOSPolicyAssignmentRequest.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/GetPatchDeploymentRequest.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/GetPatchJobRequest.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/GetVulnerabilityReportRequest.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/GooSettings.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Instance.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Instance/PatchState.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Inventory.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Inventory/Item.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Inventory/Item/OriginType.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Inventory/Item/Type.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Inventory/OsInfo.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Inventory/SoftwarePackage.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Inventory/VersionedPackage.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Inventory/WindowsApplication.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Inventory/WindowsQuickFixEngineeringPackage.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Inventory/WindowsUpdatePackage.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Inventory/WindowsUpdatePackage/WindowsUpdateCategory.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Inventory/ZypperPatch.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/InventoryView.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListInventoriesRequest.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListInventoriesResponse.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListOSPolicyAssignmentReportsRequest.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListOSPolicyAssignmentReportsResponse.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListOSPolicyAssignmentRevisionsRequest.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListOSPolicyAssignmentRevisionsResponse.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListOSPolicyAssignmentsRequest.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListOSPolicyAssignmentsResponse.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListPatchDeploymentsRequest.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListPatchDeploymentsResponse.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListPatchJobInstanceDetailsRequest.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListPatchJobInstanceDetailsResponse.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListPatchJobsRequest.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListPatchJobsResponse.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListVulnerabilityReportsRequest.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListVulnerabilityReportsResponse.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/MonthlySchedule.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/InventoryFilter.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Mode.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/ExecResource.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/ExecResource/Exec.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/ExecResource/Exec/Interpreter.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/File.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/File/Gcs.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/File/Remote.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/FileResource.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/FileResource/DesiredState.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/PackageResource.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/PackageResource/APT.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/PackageResource/Deb.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/PackageResource/DesiredState.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/PackageResource/GooGet.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/PackageResource/MSI.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/PackageResource/RPM.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/PackageResource/YUM.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/PackageResource/Zypper.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/RepositoryResource.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/RepositoryResource/AptRepository.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/RepositoryResource/AptRepository/ArchiveType.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/RepositoryResource/GooRepository.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/RepositoryResource/YumRepository.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/RepositoryResource/ZypperRepository.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/ResourceGroup.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignment.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignment/InstanceFilter.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignment/InstanceFilter/Inventory.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignment/LabelSet.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignment/Rollout.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignment/RolloutState.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignmentOperationMetadata.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignmentOperationMetadata/APIMethod.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignmentOperationMetadata/RolloutState.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignmentReport.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignmentReport/OSPolicyCompliance.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignmentReport/OSPolicyCompliance/ComplianceState.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignmentReport/OSPolicyCompliance/OSPolicyResourceCompliance.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignmentReport/OSPolicyCompliance/OSPolicyResourceCompliance/ComplianceState.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignmentReport/OSPolicyCompliance/OSPolicyResourceCompliance/ExecResourceOutput.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignmentReport/OSPolicyCompliance/OSPolicyResourceCompliance/OSPolicyResourceConfigStep.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignmentReport/OSPolicyCompliance/OSPolicyResourceCompliance/OSPolicyResourceConfigStep/Type.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OneTimeSchedule.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PatchConfig.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PatchConfig/RebootConfig.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PatchDeployment.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PatchDeployment/State.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PatchInstanceFilter.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PatchInstanceFilter/GroupLabel.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PatchJob.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PatchJob/InstanceDetailsSummary.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PatchJob/State.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PatchJobInstanceDetails.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PatchRollout.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PatchRollout/Mode.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PausePatchDeploymentRequest.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/RecurringSchedule.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/RecurringSchedule/Frequency.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ResumePatchDeploymentRequest.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/UpdateOSPolicyAssignmentRequest.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/UpdatePatchDeploymentRequest.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/VulnerabilityReport.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/VulnerabilityReport/Vulnerability.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/VulnerabilityReport/Vulnerability/Details.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/VulnerabilityReport/Vulnerability/Details/Reference.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/VulnerabilityReport/Vulnerability/Item.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/WeekDayOfMonth.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/WeeklySchedule.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/WindowsUpdateSettings.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/WindowsUpdateSettings/Classification.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/YumSettings.php delete mode 100644 owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ZypperSettings.php delete mode 100644 owl-bot-staging/OsConfig/v1/samples/V1/OsConfigServiceClient/cancel_patch_job.php delete mode 100644 owl-bot-staging/OsConfig/v1/samples/V1/OsConfigServiceClient/create_patch_deployment.php delete mode 100644 owl-bot-staging/OsConfig/v1/samples/V1/OsConfigServiceClient/delete_patch_deployment.php delete mode 100644 owl-bot-staging/OsConfig/v1/samples/V1/OsConfigServiceClient/execute_patch_job.php delete mode 100644 owl-bot-staging/OsConfig/v1/samples/V1/OsConfigServiceClient/get_patch_deployment.php delete mode 100644 owl-bot-staging/OsConfig/v1/samples/V1/OsConfigServiceClient/get_patch_job.php delete mode 100644 owl-bot-staging/OsConfig/v1/samples/V1/OsConfigServiceClient/list_patch_deployments.php delete mode 100644 owl-bot-staging/OsConfig/v1/samples/V1/OsConfigServiceClient/list_patch_job_instance_details.php delete mode 100644 owl-bot-staging/OsConfig/v1/samples/V1/OsConfigServiceClient/list_patch_jobs.php delete mode 100644 owl-bot-staging/OsConfig/v1/samples/V1/OsConfigServiceClient/pause_patch_deployment.php delete mode 100644 owl-bot-staging/OsConfig/v1/samples/V1/OsConfigServiceClient/resume_patch_deployment.php delete mode 100644 owl-bot-staging/OsConfig/v1/samples/V1/OsConfigServiceClient/update_patch_deployment.php delete mode 100644 owl-bot-staging/OsConfig/v1/samples/V1/OsConfigZonalServiceClient/create_os_policy_assignment.php delete mode 100644 owl-bot-staging/OsConfig/v1/samples/V1/OsConfigZonalServiceClient/delete_os_policy_assignment.php delete mode 100644 owl-bot-staging/OsConfig/v1/samples/V1/OsConfigZonalServiceClient/get_inventory.php delete mode 100644 owl-bot-staging/OsConfig/v1/samples/V1/OsConfigZonalServiceClient/get_os_policy_assignment.php delete mode 100644 owl-bot-staging/OsConfig/v1/samples/V1/OsConfigZonalServiceClient/get_os_policy_assignment_report.php delete mode 100644 owl-bot-staging/OsConfig/v1/samples/V1/OsConfigZonalServiceClient/get_vulnerability_report.php delete mode 100644 owl-bot-staging/OsConfig/v1/samples/V1/OsConfigZonalServiceClient/list_inventories.php delete mode 100644 owl-bot-staging/OsConfig/v1/samples/V1/OsConfigZonalServiceClient/list_os_policy_assignment_reports.php delete mode 100644 owl-bot-staging/OsConfig/v1/samples/V1/OsConfigZonalServiceClient/list_os_policy_assignment_revisions.php delete mode 100644 owl-bot-staging/OsConfig/v1/samples/V1/OsConfigZonalServiceClient/list_os_policy_assignments.php delete mode 100644 owl-bot-staging/OsConfig/v1/samples/V1/OsConfigZonalServiceClient/list_vulnerability_reports.php delete mode 100644 owl-bot-staging/OsConfig/v1/samples/V1/OsConfigZonalServiceClient/update_os_policy_assignment.php delete mode 100644 owl-bot-staging/OsConfig/v1/src/V1/Client/OsConfigServiceClient.php delete mode 100644 owl-bot-staging/OsConfig/v1/src/V1/Client/OsConfigZonalServiceClient.php delete mode 100644 owl-bot-staging/OsConfig/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/OsConfig/v1/src/V1/resources/os_config_service_client_config.json delete mode 100644 owl-bot-staging/OsConfig/v1/src/V1/resources/os_config_service_descriptor_config.php delete mode 100644 owl-bot-staging/OsConfig/v1/src/V1/resources/os_config_service_rest_client_config.php delete mode 100644 owl-bot-staging/OsConfig/v1/src/V1/resources/os_config_zonal_service_client_config.json delete mode 100644 owl-bot-staging/OsConfig/v1/src/V1/resources/os_config_zonal_service_descriptor_config.php delete mode 100644 owl-bot-staging/OsConfig/v1/src/V1/resources/os_config_zonal_service_rest_client_config.php delete mode 100644 owl-bot-staging/OsConfig/v1/tests/Unit/V1/Client/OsConfigServiceClientTest.php delete mode 100644 owl-bot-staging/OsConfig/v1/tests/Unit/V1/Client/OsConfigZonalServiceClientTest.php delete mode 100644 owl-bot-staging/OsLogin/v1/proto/src/GPBMetadata/Google/Cloud/Oslogin/Common/Common.php delete mode 100644 owl-bot-staging/OsLogin/v1/proto/src/GPBMetadata/Google/Cloud/Oslogin/V1/Oslogin.php delete mode 100644 owl-bot-staging/OsLogin/v1/proto/src/Google/Cloud/OsLogin/Common/OperatingSystemType.php delete mode 100644 owl-bot-staging/OsLogin/v1/proto/src/Google/Cloud/OsLogin/Common/PosixAccount.php delete mode 100644 owl-bot-staging/OsLogin/v1/proto/src/Google/Cloud/OsLogin/Common/SshPublicKey.php delete mode 100644 owl-bot-staging/OsLogin/v1/proto/src/Google/Cloud/OsLogin/V1/CreateSshPublicKeyRequest.php delete mode 100644 owl-bot-staging/OsLogin/v1/proto/src/Google/Cloud/OsLogin/V1/DeletePosixAccountRequest.php delete mode 100644 owl-bot-staging/OsLogin/v1/proto/src/Google/Cloud/OsLogin/V1/DeleteSshPublicKeyRequest.php delete mode 100644 owl-bot-staging/OsLogin/v1/proto/src/Google/Cloud/OsLogin/V1/GetLoginProfileRequest.php delete mode 100644 owl-bot-staging/OsLogin/v1/proto/src/Google/Cloud/OsLogin/V1/GetSshPublicKeyRequest.php delete mode 100644 owl-bot-staging/OsLogin/v1/proto/src/Google/Cloud/OsLogin/V1/ImportSshPublicKeyRequest.php delete mode 100644 owl-bot-staging/OsLogin/v1/proto/src/Google/Cloud/OsLogin/V1/ImportSshPublicKeyResponse.php delete mode 100644 owl-bot-staging/OsLogin/v1/proto/src/Google/Cloud/OsLogin/V1/LoginProfile.php delete mode 100644 owl-bot-staging/OsLogin/v1/proto/src/Google/Cloud/OsLogin/V1/UpdateSshPublicKeyRequest.php delete mode 100644 owl-bot-staging/OsLogin/v1/samples/V1/OsLoginServiceClient/create_ssh_public_key.php delete mode 100644 owl-bot-staging/OsLogin/v1/samples/V1/OsLoginServiceClient/delete_posix_account.php delete mode 100644 owl-bot-staging/OsLogin/v1/samples/V1/OsLoginServiceClient/delete_ssh_public_key.php delete mode 100644 owl-bot-staging/OsLogin/v1/samples/V1/OsLoginServiceClient/get_login_profile.php delete mode 100644 owl-bot-staging/OsLogin/v1/samples/V1/OsLoginServiceClient/get_ssh_public_key.php delete mode 100644 owl-bot-staging/OsLogin/v1/samples/V1/OsLoginServiceClient/import_ssh_public_key.php delete mode 100644 owl-bot-staging/OsLogin/v1/samples/V1/OsLoginServiceClient/update_ssh_public_key.php delete mode 100644 owl-bot-staging/OsLogin/v1/src/V1/Client/OsLoginServiceClient.php delete mode 100644 owl-bot-staging/OsLogin/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/OsLogin/v1/src/V1/resources/os_login_service_client_config.json delete mode 100644 owl-bot-staging/OsLogin/v1/src/V1/resources/os_login_service_descriptor_config.php delete mode 100644 owl-bot-staging/OsLogin/v1/src/V1/resources/os_login_service_rest_client_config.php delete mode 100644 owl-bot-staging/OsLogin/v1/tests/Unit/V1/Client/OsLoginServiceClientTest.php diff --git a/ManagedIdentities/src/V1/Client/ManagedIdentitiesServiceClient.php b/ManagedIdentities/src/V1/Client/ManagedIdentitiesServiceClient.php index 622860c2894c..55901d2a36fd 100644 --- a/ManagedIdentities/src/V1/Client/ManagedIdentitiesServiceClient.php +++ b/ManagedIdentities/src/V1/Client/ManagedIdentitiesServiceClient.php @@ -49,6 +49,7 @@ use Google\LongRunning\Client\OperationsClient; use Google\LongRunning\Operation; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Log\LoggerInterface; /** * Service Description: API Overview @@ -251,14 +252,14 @@ public static function locationName(string $project, string $location): string * listed, then parseName will check each of the supported templates, and return * the first match. * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match * * @return array An associative array from name component IDs to component values. * * @throws ValidationException If $formattedName could not be matched. */ - public static function parseName(string $formattedName, string $template = null): array + public static function parseName(string $formattedName, ?string $template = null): array { return self::parseFormattedName($formattedName, $template); } @@ -313,6 +314,9 @@ public static function parseName(string $formattedName, string $template = null) * @type callable $clientCertSource * A callable which returns the client cert as a string. This can be used to * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag * } * * @throws ValidationException diff --git a/ManagedKafka/src/V1/Client/ManagedKafkaClient.php b/ManagedKafka/src/V1/Client/ManagedKafkaClient.php index 2b733c1a9131..c7df5180f63c 100644 --- a/ManagedKafka/src/V1/Client/ManagedKafkaClient.php +++ b/ManagedKafka/src/V1/Client/ManagedKafkaClient.php @@ -57,6 +57,7 @@ use Google\LongRunning\Client\OperationsClient; use Google\LongRunning\Operation; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Log\LoggerInterface; /** * Service Description: The service that a client application uses to manage Apache Kafka clusters, @@ -304,14 +305,14 @@ public static function topicName(string $project, string $location, string $clus * listed, then parseName will check each of the supported templates, and return * the first match. * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match * * @return array An associative array from name component IDs to component values. * * @throws ValidationException If $formattedName could not be matched. */ - public static function parseName(string $formattedName, string $template = null): array + public static function parseName(string $formattedName, ?string $template = null): array { return self::parseFormattedName($formattedName, $template); } @@ -366,6 +367,9 @@ public static function parseName(string $formattedName, string $template = null) * @type callable $clientCertSource * A callable which returns the client cert as a string. This can be used to * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag * } * * @throws ValidationException diff --git a/MapsFleetEngineDelivery/src/V1/Client/DeliveryServiceClient.php b/MapsFleetEngineDelivery/src/V1/Client/DeliveryServiceClient.php index e92ee44d161e..80ca0d9306f5 100644 --- a/MapsFleetEngineDelivery/src/V1/Client/DeliveryServiceClient.php +++ b/MapsFleetEngineDelivery/src/V1/Client/DeliveryServiceClient.php @@ -48,6 +48,7 @@ use Google\Maps\FleetEngine\Delivery\V1\UpdateDeliveryVehicleRequest; use Google\Maps\FleetEngine\Delivery\V1\UpdateTaskRequest; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Log\LoggerInterface; /** * Service Description: The Last Mile Delivery service. @@ -198,14 +199,14 @@ public static function taskTrackingInfoName(string $provider, string $tracking): * listed, then parseName will check each of the supported templates, and return * the first match. * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match * * @return array An associative array from name component IDs to component values. * * @throws ValidationException If $formattedName could not be matched. */ - public static function parseName(string $formattedName, string $template = null): array + public static function parseName(string $formattedName, ?string $template = null): array { return self::parseFormattedName($formattedName, $template); } @@ -260,6 +261,9 @@ public static function parseName(string $formattedName, string $template = null) * @type callable $clientCertSource * A callable which returns the client cert as a string. This can be used to * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag * } * * @throws ValidationException diff --git a/MapsRouteOptimization/src/V1/Client/RouteOptimizationClient.php b/MapsRouteOptimization/src/V1/Client/RouteOptimizationClient.php index 440aa0e2093c..4a2e092d8841 100644 --- a/MapsRouteOptimization/src/V1/Client/RouteOptimizationClient.php +++ b/MapsRouteOptimization/src/V1/Client/RouteOptimizationClient.php @@ -39,6 +39,7 @@ use Google\Maps\RouteOptimization\V1\OptimizeToursResponse; use Google\Maps\RouteOptimization\V1\ShipmentRoute; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Log\LoggerInterface; /** * Service Description: A service for optimizing vehicle tours. @@ -213,6 +214,9 @@ private function createOperationsClient(array $options) * @type callable $clientCertSource * A callable which returns the client cert as a string. This can be used to * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag * } * * @throws ValidationException diff --git a/MediaTranslation/src/V1beta1/Client/SpeechTranslationServiceClient.php b/MediaTranslation/src/V1beta1/Client/SpeechTranslationServiceClient.php index fff9ba7bc16d..43e2cd73f121 100644 --- a/MediaTranslation/src/V1beta1/Client/SpeechTranslationServiceClient.php +++ b/MediaTranslation/src/V1beta1/Client/SpeechTranslationServiceClient.php @@ -33,6 +33,7 @@ use Google\ApiCore\Transport\TransportInterface; use Google\ApiCore\ValidationException; use Google\Auth\FetchAuthTokenInterface; +use Psr\Log\LoggerInterface; /** * Service Description: Provides translation from/to media types. @@ -139,6 +140,9 @@ private static function getClientDefaults() * @type callable $clientCertSource * A callable which returns the client cert as a string. This can be used to * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag * } * * @throws ValidationException diff --git a/Memcache/src/V1/Client/CloudMemcacheClient.php b/Memcache/src/V1/Client/CloudMemcacheClient.php index 4d0fc0e5e9d4..1833f2507985 100644 --- a/Memcache/src/V1/Client/CloudMemcacheClient.php +++ b/Memcache/src/V1/Client/CloudMemcacheClient.php @@ -49,6 +49,7 @@ use Google\LongRunning\Client\OperationsClient; use Google\LongRunning\Operation; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Log\LoggerInterface; /** * Service Description: Configures and manages Cloud Memorystore for Memcached instances. @@ -233,14 +234,14 @@ public static function locationName(string $project, string $location): string * listed, then parseName will check each of the supported templates, and return * the first match. * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match * * @return array An associative array from name component IDs to component values. * * @throws ValidationException If $formattedName could not be matched. */ - public static function parseName(string $formattedName, string $template = null): array + public static function parseName(string $formattedName, ?string $template = null): array { return self::parseFormattedName($formattedName, $template); } @@ -295,6 +296,9 @@ public static function parseName(string $formattedName, string $template = null) * @type callable $clientCertSource * A callable which returns the client cert as a string. This can be used to * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag * } * * @throws ValidationException diff --git a/MigrationCenter/src/V1/Client/MigrationCenterClient.php b/MigrationCenter/src/V1/Client/MigrationCenterClient.php index dcb131fa2b6e..1e1db82da9b0 100644 --- a/MigrationCenter/src/V1/Client/MigrationCenterClient.php +++ b/MigrationCenter/src/V1/Client/MigrationCenterClient.php @@ -101,6 +101,7 @@ use Google\LongRunning\Client\OperationsClient; use Google\LongRunning\Operation; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Log\LoggerInterface; /** * Service Description: Service describing handlers for resources. @@ -499,14 +500,14 @@ public static function sourceName(string $project, string $location, string $sou * listed, then parseName will check each of the supported templates, and return * the first match. * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match * * @return array An associative array from name component IDs to component values. * * @throws ValidationException If $formattedName could not be matched. */ - public static function parseName(string $formattedName, string $template = null): array + public static function parseName(string $formattedName, ?string $template = null): array { return self::parseFormattedName($formattedName, $template); } @@ -561,6 +562,9 @@ public static function parseName(string $formattedName, string $template = null) * @type callable $clientCertSource * A callable which returns the client cert as a string. This can be used to * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag * } * * @throws ValidationException diff --git a/Monitoring/src/V3/Client/AlertPolicyServiceClient.php b/Monitoring/src/V3/Client/AlertPolicyServiceClient.php index ae1115fe9fec..81ad251d51ad 100644 --- a/Monitoring/src/V3/Client/AlertPolicyServiceClient.php +++ b/Monitoring/src/V3/Client/AlertPolicyServiceClient.php @@ -40,6 +40,7 @@ use Google\Cloud\Monitoring\V3\ListAlertPoliciesRequest; use Google\Cloud\Monitoring\V3\UpdateAlertPolicyRequest; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Log\LoggerInterface; /** * Service Description: The AlertPolicyService API is used to manage (list, create, delete, @@ -279,14 +280,14 @@ public static function projectAlertPolicyConditionName(string $project, string $ * listed, then parseName will check each of the supported templates, and return * the first match. * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match * * @return array An associative array from name component IDs to component values. * * @throws ValidationException If $formattedName could not be matched. */ - public static function parseName(string $formattedName, string $template = null): array + public static function parseName(string $formattedName, ?string $template = null): array { return self::parseFormattedName($formattedName, $template); } @@ -341,6 +342,9 @@ public static function parseName(string $formattedName, string $template = null) * @type callable $clientCertSource * A callable which returns the client cert as a string. This can be used to * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag * } * * @throws ValidationException diff --git a/Monitoring/src/V3/Client/GroupServiceClient.php b/Monitoring/src/V3/Client/GroupServiceClient.php index 0d70cc2c18b7..8decd079484c 100644 --- a/Monitoring/src/V3/Client/GroupServiceClient.php +++ b/Monitoring/src/V3/Client/GroupServiceClient.php @@ -41,6 +41,7 @@ use Google\Cloud\Monitoring\V3\ListGroupsRequest; use Google\Cloud\Monitoring\V3\UpdateGroupRequest; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Log\LoggerInterface; /** * Service Description: The Group API lets you inspect and manage your @@ -204,14 +205,14 @@ public static function projectGroupName(string $project, string $group): string * listed, then parseName will check each of the supported templates, and return * the first match. * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match * * @return array An associative array from name component IDs to component values. * * @throws ValidationException If $formattedName could not be matched. */ - public static function parseName(string $formattedName, string $template = null): array + public static function parseName(string $formattedName, ?string $template = null): array { return self::parseFormattedName($formattedName, $template); } @@ -266,6 +267,9 @@ public static function parseName(string $formattedName, string $template = null) * @type callable $clientCertSource * A callable which returns the client cert as a string. This can be used to * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag * } * * @throws ValidationException diff --git a/Monitoring/src/V3/Client/MetricServiceClient.php b/Monitoring/src/V3/Client/MetricServiceClient.php index bf2cf9e8163e..2af5c2610c17 100644 --- a/Monitoring/src/V3/Client/MetricServiceClient.php +++ b/Monitoring/src/V3/Client/MetricServiceClient.php @@ -45,6 +45,7 @@ use Google\Cloud\Monitoring\V3\ListTimeSeriesRequest; use Google\Cloud\Monitoring\V3\TimeSeries; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Log\LoggerInterface; /** * Service Description: Manages metric descriptors, monitored resource descriptors, and @@ -338,14 +339,14 @@ public static function workspaceName(string $project): string * listed, then parseName will check each of the supported templates, and return * the first match. * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match * * @return array An associative array from name component IDs to component values. * * @throws ValidationException If $formattedName could not be matched. */ - public static function parseName(string $formattedName, string $template = null): array + public static function parseName(string $formattedName, ?string $template = null): array { return self::parseFormattedName($formattedName, $template); } @@ -400,6 +401,9 @@ public static function parseName(string $formattedName, string $template = null) * @type callable $clientCertSource * A callable which returns the client cert as a string. This can be used to * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag * } * * @throws ValidationException diff --git a/Monitoring/src/V3/Client/NotificationChannelServiceClient.php b/Monitoring/src/V3/Client/NotificationChannelServiceClient.php index 361ddf6b6df9..8923b2fb4717 100644 --- a/Monitoring/src/V3/Client/NotificationChannelServiceClient.php +++ b/Monitoring/src/V3/Client/NotificationChannelServiceClient.php @@ -47,6 +47,7 @@ use Google\Cloud\Monitoring\V3\UpdateNotificationChannelRequest; use Google\Cloud\Monitoring\V3\VerifyNotificationChannelRequest; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Log\LoggerInterface; /** * Service Description: The Notification Channel API provides access to configuration that @@ -276,14 +277,14 @@ public static function projectNotificationChannelName(string $project, string $n * listed, then parseName will check each of the supported templates, and return * the first match. * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match * * @return array An associative array from name component IDs to component values. * * @throws ValidationException If $formattedName could not be matched. */ - public static function parseName(string $formattedName, string $template = null): array + public static function parseName(string $formattedName, ?string $template = null): array { return self::parseFormattedName($formattedName, $template); } @@ -338,6 +339,9 @@ public static function parseName(string $formattedName, string $template = null) * @type callable $clientCertSource * A callable which returns the client cert as a string. This can be used to * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag * } * * @throws ValidationException diff --git a/Monitoring/src/V3/Client/QueryServiceClient.php b/Monitoring/src/V3/Client/QueryServiceClient.php index c9f5c8943803..d56bf0ede01b 100644 --- a/Monitoring/src/V3/Client/QueryServiceClient.php +++ b/Monitoring/src/V3/Client/QueryServiceClient.php @@ -34,6 +34,7 @@ use Google\Auth\FetchAuthTokenInterface; use Google\Cloud\Monitoring\V3\QueryTimeSeriesRequest; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Log\LoggerInterface; /** * Service Description: The QueryService API is used to manage time series data in Cloud @@ -144,6 +145,9 @@ private static function getClientDefaults() * @type callable $clientCertSource * A callable which returns the client cert as a string. This can be used to * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag * } * * @throws ValidationException diff --git a/Monitoring/src/V3/Client/ServiceMonitoringServiceClient.php b/Monitoring/src/V3/Client/ServiceMonitoringServiceClient.php index 1a6b71cc14ae..757c2b8240df 100644 --- a/Monitoring/src/V3/Client/ServiceMonitoringServiceClient.php +++ b/Monitoring/src/V3/Client/ServiceMonitoringServiceClient.php @@ -46,6 +46,7 @@ use Google\Cloud\Monitoring\V3\UpdateServiceLevelObjectiveRequest; use Google\Cloud\Monitoring\V3\UpdateServiceRequest; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Log\LoggerInterface; /** * Service Description: The Cloud Monitoring Service-Oriented Monitoring API has endpoints for @@ -285,14 +286,14 @@ public static function serviceLevelObjectiveName(string $project, string $servic * listed, then parseName will check each of the supported templates, and return * the first match. * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match * * @return array An associative array from name component IDs to component values. * * @throws ValidationException If $formattedName could not be matched. */ - public static function parseName(string $formattedName, string $template = null): array + public static function parseName(string $formattedName, ?string $template = null): array { return self::parseFormattedName($formattedName, $template); } @@ -347,6 +348,9 @@ public static function parseName(string $formattedName, string $template = null) * @type callable $clientCertSource * A callable which returns the client cert as a string. This can be used to * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag * } * * @throws ValidationException diff --git a/Monitoring/src/V3/Client/SnoozeServiceClient.php b/Monitoring/src/V3/Client/SnoozeServiceClient.php index d616e5fad17f..8b754a2cd0e8 100644 --- a/Monitoring/src/V3/Client/SnoozeServiceClient.php +++ b/Monitoring/src/V3/Client/SnoozeServiceClient.php @@ -39,6 +39,7 @@ use Google\Cloud\Monitoring\V3\Snooze; use Google\Cloud\Monitoring\V3\UpdateSnoozeRequest; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Log\LoggerInterface; /** * Service Description: The SnoozeService API is used to temporarily prevent an alert policy from @@ -241,14 +242,14 @@ public static function workspaceName(string $project): string * listed, then parseName will check each of the supported templates, and return * the first match. * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match * * @return array An associative array from name component IDs to component values. * * @throws ValidationException If $formattedName could not be matched. */ - public static function parseName(string $formattedName, string $template = null): array + public static function parseName(string $formattedName, ?string $template = null): array { return self::parseFormattedName($formattedName, $template); } @@ -303,6 +304,9 @@ public static function parseName(string $formattedName, string $template = null) * @type callable $clientCertSource * A callable which returns the client cert as a string. This can be used to * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag * } * * @throws ValidationException diff --git a/Monitoring/src/V3/Client/UptimeCheckServiceClient.php b/Monitoring/src/V3/Client/UptimeCheckServiceClient.php index f166cb860fcd..d6dd0ab10973 100644 --- a/Monitoring/src/V3/Client/UptimeCheckServiceClient.php +++ b/Monitoring/src/V3/Client/UptimeCheckServiceClient.php @@ -41,6 +41,7 @@ use Google\Cloud\Monitoring\V3\UpdateUptimeCheckConfigRequest; use Google\Cloud\Monitoring\V3\UptimeCheckConfig; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Log\LoggerInterface; /** * Service Description: The UptimeCheckService API is used to manage (list, create, delete, edit) @@ -220,14 +221,14 @@ public static function uptimeCheckConfigName(string $project, string $uptimeChec * listed, then parseName will check each of the supported templates, and return * the first match. * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match * * @return array An associative array from name component IDs to component values. * * @throws ValidationException If $formattedName could not be matched. */ - public static function parseName(string $formattedName, string $template = null): array + public static function parseName(string $formattedName, ?string $template = null): array { return self::parseFormattedName($formattedName, $template); } @@ -282,6 +283,9 @@ public static function parseName(string $formattedName, string $template = null) * @type callable $clientCertSource * A callable which returns the client cert as a string. This can be used to * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag * } * * @throws ValidationException diff --git a/NetApp/src/V1/Client/NetAppClient.php b/NetApp/src/V1/Client/NetAppClient.php index 2bf59158fe01..2b29f0f7b5d6 100644 --- a/NetApp/src/V1/Client/NetAppClient.php +++ b/NetApp/src/V1/Client/NetAppClient.php @@ -104,6 +104,7 @@ use Google\LongRunning\Client\OperationsClient; use Google\LongRunning\Operation; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Log\LoggerInterface; /** * Service Description: NetApp Files Google Cloud Service @@ -508,14 +509,14 @@ public static function volumeName(string $project, string $location, string $vol * listed, then parseName will check each of the supported templates, and return * the first match. * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match * * @return array An associative array from name component IDs to component values. * * @throws ValidationException If $formattedName could not be matched. */ - public static function parseName(string $formattedName, string $template = null): array + public static function parseName(string $formattedName, ?string $template = null): array { return self::parseFormattedName($formattedName, $template); } @@ -570,6 +571,9 @@ public static function parseName(string $formattedName, string $template = null) * @type callable $clientCertSource * A callable which returns the client cert as a string. This can be used to * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag * } * * @throws ValidationException diff --git a/NetworkConnectivity/src/V1/Client/HubServiceClient.php b/NetworkConnectivity/src/V1/Client/HubServiceClient.php index 5a87de51aec1..50b2544b2f55 100644 --- a/NetworkConnectivity/src/V1/Client/HubServiceClient.php +++ b/NetworkConnectivity/src/V1/Client/HubServiceClient.php @@ -71,6 +71,7 @@ use Google\LongRunning\Client\OperationsClient; use Google\LongRunning\Operation; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Log\LoggerInterface; /** * Service Description: Network Connectivity Center is a hub-and-spoke abstraction for network @@ -417,14 +418,14 @@ public static function vpnTunnelName(string $project, string $region, string $re * listed, then parseName will check each of the supported templates, and return * the first match. * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match * * @return array An associative array from name component IDs to component values. * * @throws ValidationException If $formattedName could not be matched. */ - public static function parseName(string $formattedName, string $template = null): array + public static function parseName(string $formattedName, ?string $template = null): array { return self::parseFormattedName($formattedName, $template); } @@ -479,6 +480,9 @@ public static function parseName(string $formattedName, string $template = null) * @type callable $clientCertSource * A callable which returns the client cert as a string. This can be used to * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag * } * * @throws ValidationException diff --git a/NetworkConnectivity/src/V1/Client/PolicyBasedRoutingServiceClient.php b/NetworkConnectivity/src/V1/Client/PolicyBasedRoutingServiceClient.php index daf283d58a53..d611dc064182 100644 --- a/NetworkConnectivity/src/V1/Client/PolicyBasedRoutingServiceClient.php +++ b/NetworkConnectivity/src/V1/Client/PolicyBasedRoutingServiceClient.php @@ -50,6 +50,7 @@ use Google\LongRunning\Client\OperationsClient; use Google\LongRunning\Operation; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Log\LoggerInterface; /** * Service Description: Policy-Based Routing allows GCP customers to specify flexibile routing @@ -237,14 +238,14 @@ public static function policyBasedRouteName(string $project, string $policyBased * listed, then parseName will check each of the supported templates, and return * the first match. * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match * * @return array An associative array from name component IDs to component values. * * @throws ValidationException If $formattedName could not be matched. */ - public static function parseName(string $formattedName, string $template = null): array + public static function parseName(string $formattedName, ?string $template = null): array { return self::parseFormattedName($formattedName, $template); } @@ -299,6 +300,9 @@ public static function parseName(string $formattedName, string $template = null) * @type callable $clientCertSource * A callable which returns the client cert as a string. This can be used to * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag * } * * @throws ValidationException diff --git a/NetworkManagement/src/V1/Client/ReachabilityServiceClient.php b/NetworkManagement/src/V1/Client/ReachabilityServiceClient.php index f1fa700c6cbf..61600dbb2f52 100644 --- a/NetworkManagement/src/V1/Client/ReachabilityServiceClient.php +++ b/NetworkManagement/src/V1/Client/ReachabilityServiceClient.php @@ -52,6 +52,7 @@ use Google\LongRunning\Client\OperationsClient; use Google\LongRunning\Operation; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Log\LoggerInterface; /** * Service Description: The Reachability service in the Google Cloud Network Management API provides @@ -226,14 +227,14 @@ public static function projectName(string $project): string * listed, then parseName will check each of the supported templates, and return * the first match. * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match * * @return array An associative array from name component IDs to component values. * * @throws ValidationException If $formattedName could not be matched. */ - public static function parseName(string $formattedName, string $template = null): array + public static function parseName(string $formattedName, ?string $template = null): array { return self::parseFormattedName($formattedName, $template); } @@ -288,6 +289,9 @@ public static function parseName(string $formattedName, string $template = null) * @type callable $clientCertSource * A callable which returns the client cert as a string. This can be used to * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag * } * * @throws ValidationException diff --git a/NetworkSecurity/src/V1/Client/NetworkSecurityClient.php b/NetworkSecurity/src/V1/Client/NetworkSecurityClient.php index cf85a7e87a41..8f7d5f05e81a 100644 --- a/NetworkSecurity/src/V1/Client/NetworkSecurityClient.php +++ b/NetworkSecurity/src/V1/Client/NetworkSecurityClient.php @@ -63,6 +63,7 @@ use Google\LongRunning\Client\OperationsClient; use Google\LongRunning\Operation; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Log\LoggerInterface; /** * Service Description: Network Security API provides resources to configure authentication and @@ -288,14 +289,14 @@ public static function serverTlsPolicyName(string $project, string $location, st * listed, then parseName will check each of the supported templates, and return * the first match. * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match * * @return array An associative array from name component IDs to component values. * * @throws ValidationException If $formattedName could not be matched. */ - public static function parseName(string $formattedName, string $template = null): array + public static function parseName(string $formattedName, ?string $template = null): array { return self::parseFormattedName($formattedName, $template); } @@ -350,6 +351,9 @@ public static function parseName(string $formattedName, string $template = null) * @type callable $clientCertSource * A callable which returns the client cert as a string. This can be used to * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag * } * * @throws ValidationException diff --git a/NetworkServices/src/V1/Client/DepServiceClient.php b/NetworkServices/src/V1/Client/DepServiceClient.php index bdba8921d50a..5b0d7cca36d2 100644 --- a/NetworkServices/src/V1/Client/DepServiceClient.php +++ b/NetworkServices/src/V1/Client/DepServiceClient.php @@ -57,6 +57,7 @@ use Google\LongRunning\Client\OperationsClient; use Google\LongRunning\Operation; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Log\LoggerInterface; /** * Service Description: Service describing handlers for resources. @@ -252,14 +253,14 @@ public static function locationName(string $project, string $location): string * listed, then parseName will check each of the supported templates, and return * the first match. * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match * * @return array An associative array from name component IDs to component values. * * @throws ValidationException If $formattedName could not be matched. */ - public static function parseName(string $formattedName, string $template = null): array + public static function parseName(string $formattedName, ?string $template = null): array { return self::parseFormattedName($formattedName, $template); } @@ -314,6 +315,9 @@ public static function parseName(string $formattedName, string $template = null) * @type callable $clientCertSource * A callable which returns the client cert as a string. This can be used to * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag * } * * @throws ValidationException diff --git a/NetworkServices/src/V1/Client/NetworkServicesClient.php b/NetworkServices/src/V1/Client/NetworkServicesClient.php index d80619a26a6c..fb2c15ce2b4c 100644 --- a/NetworkServices/src/V1/Client/NetworkServicesClient.php +++ b/NetworkServices/src/V1/Client/NetworkServicesClient.php @@ -92,6 +92,7 @@ use Google\LongRunning\Client\OperationsClient; use Google\LongRunning\Operation; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Log\LoggerInterface; /** * Service Description: Service describing handlers for resources. @@ -519,14 +520,14 @@ public static function tlsRouteName(string $project, string $location, string $t * listed, then parseName will check each of the supported templates, and return * the first match. * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match * * @return array An associative array from name component IDs to component values. * * @throws ValidationException If $formattedName could not be matched. */ - public static function parseName(string $formattedName, string $template = null): array + public static function parseName(string $formattedName, ?string $template = null): array { return self::parseFormattedName($formattedName, $template); } @@ -581,6 +582,9 @@ public static function parseName(string $formattedName, string $template = null) * @type callable $clientCertSource * A callable which returns the client cert as a string. This can be used to * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag * } * * @throws ValidationException diff --git a/Notebooks/src/V1/Client/ManagedNotebookServiceClient.php b/Notebooks/src/V1/Client/ManagedNotebookServiceClient.php index 1e3859121f8d..e7c9406fc25a 100644 --- a/Notebooks/src/V1/Client/ManagedNotebookServiceClient.php +++ b/Notebooks/src/V1/Client/ManagedNotebookServiceClient.php @@ -60,6 +60,7 @@ use Google\LongRunning\Client\OperationsClient; use Google\LongRunning\Operation; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Log\LoggerInterface; /** * Service Description: API v1 service for Managed Notebooks. @@ -238,14 +239,14 @@ public static function runtimeName(string $project, string $location, string $ru * listed, then parseName will check each of the supported templates, and return * the first match. * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match * * @return array An associative array from name component IDs to component values. * * @throws ValidationException If $formattedName could not be matched. */ - public static function parseName(string $formattedName, string $template = null): array + public static function parseName(string $formattedName, ?string $template = null): array { return self::parseFormattedName($formattedName, $template); } @@ -300,6 +301,9 @@ public static function parseName(string $formattedName, string $template = null) * @type callable $clientCertSource * A callable which returns the client cert as a string. This can be used to * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag * } * * @throws ValidationException diff --git a/Notebooks/src/V1/Client/NotebookServiceClient.php b/Notebooks/src/V1/Client/NotebookServiceClient.php index fb1d043a19b6..2f61c14e5b3e 100644 --- a/Notebooks/src/V1/Client/NotebookServiceClient.php +++ b/Notebooks/src/V1/Client/NotebookServiceClient.php @@ -86,6 +86,7 @@ use Google\LongRunning\Client\OperationsClient; use Google\LongRunning\Operation; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Log\LoggerInterface; /** * Service Description: API v1 service for Cloud AI Platform Notebooks. @@ -343,14 +344,14 @@ public static function tensorboardName(string $project, string $location, string * listed, then parseName will check each of the supported templates, and return * the first match. * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match * * @return array An associative array from name component IDs to component values. * * @throws ValidationException If $formattedName could not be matched. */ - public static function parseName(string $formattedName, string $template = null): array + public static function parseName(string $formattedName, ?string $template = null): array { return self::parseFormattedName($formattedName, $template); } @@ -405,6 +406,9 @@ public static function parseName(string $formattedName, string $template = null) * @type callable $clientCertSource * A callable which returns the client cert as a string. This can be used to * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag * } * * @throws ValidationException diff --git a/Notebooks/src/V2/Client/NotebookServiceClient.php b/Notebooks/src/V2/Client/NotebookServiceClient.php index 9290daf0cb05..c8c9d07717ac 100644 --- a/Notebooks/src/V2/Client/NotebookServiceClient.php +++ b/Notebooks/src/V2/Client/NotebookServiceClient.php @@ -59,6 +59,7 @@ use Google\LongRunning\Client\OperationsClient; use Google\LongRunning\Operation; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Log\LoggerInterface; /** * Service Description: API v2 service for Workbench Notebooks Instances. @@ -236,14 +237,14 @@ public static function locationName(string $project, string $location): string * listed, then parseName will check each of the supported templates, and return * the first match. * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match * * @return array An associative array from name component IDs to component values. * * @throws ValidationException If $formattedName could not be matched. */ - public static function parseName(string $formattedName, string $template = null): array + public static function parseName(string $formattedName, ?string $template = null): array { return self::parseFormattedName($formattedName, $template); } @@ -298,6 +299,9 @@ public static function parseName(string $formattedName, string $template = null) * @type callable $clientCertSource * A callable which returns the client cert as a string. This can be used to * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag * } * * @throws ValidationException diff --git a/Optimization/src/V1/Client/FleetRoutingClient.php b/Optimization/src/V1/Client/FleetRoutingClient.php index f82865bd5554..2ed6f5832e79 100644 --- a/Optimization/src/V1/Client/FleetRoutingClient.php +++ b/Optimization/src/V1/Client/FleetRoutingClient.php @@ -39,6 +39,7 @@ use Google\LongRunning\Client\OperationsClient; use Google\LongRunning\Operation; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Log\LoggerInterface; /** * Service Description: A service for optimizing vehicle tours. @@ -212,6 +213,9 @@ private function createOperationsClient(array $options) * @type callable $clientCertSource * A callable which returns the client cert as a string. This can be used to * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag * } * * @throws ValidationException diff --git a/OracleDatabase/src/V1/Client/OracleDatabaseClient.php b/OracleDatabase/src/V1/Client/OracleDatabaseClient.php index ae385a2af8c6..9c474eee3f7b 100644 --- a/OracleDatabase/src/V1/Client/OracleDatabaseClient.php +++ b/OracleDatabase/src/V1/Client/OracleDatabaseClient.php @@ -66,6 +66,7 @@ use Google\LongRunning\Client\OperationsClient; use Google\LongRunning\Operation; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Log\LoggerInterface; /** * Service Description: Service describing handlers for resources @@ -323,14 +324,14 @@ public static function networkName(string $project, string $network): string * listed, then parseName will check each of the supported templates, and return * the first match. * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match * * @return array An associative array from name component IDs to component values. * * @throws ValidationException If $formattedName could not be matched. */ - public static function parseName(string $formattedName, string $template = null): array + public static function parseName(string $formattedName, ?string $template = null): array { return self::parseFormattedName($formattedName, $template); } @@ -382,6 +383,9 @@ public static function parseName(string $formattedName, string $template = null) * @type callable $clientCertSource * A callable which returns the client cert as a string. This can be used to * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag * } * * @throws ValidationException diff --git a/OrchestrationAirflow/src/V1/Client/EnvironmentsClient.php b/OrchestrationAirflow/src/V1/Client/EnvironmentsClient.php index 5b4f6dd4cbb5..b1c99bc61ff0 100644 --- a/OrchestrationAirflow/src/V1/Client/EnvironmentsClient.php +++ b/OrchestrationAirflow/src/V1/Client/EnvironmentsClient.php @@ -68,6 +68,7 @@ use Google\LongRunning\Client\OperationsClient; use Google\LongRunning\Operation; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Log\LoggerInterface; /** * Service Description: Managed Apache Airflow Environments. @@ -286,14 +287,14 @@ public static function userWorkloadsSecretName( * listed, then parseName will check each of the supported templates, and return * the first match. * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match * * @return array An associative array from name component IDs to component values. * * @throws ValidationException If $formattedName could not be matched. */ - public static function parseName(string $formattedName, string $template = null): array + public static function parseName(string $formattedName, ?string $template = null): array { return self::parseFormattedName($formattedName, $template); } @@ -348,6 +349,9 @@ public static function parseName(string $formattedName, string $template = null) * @type callable $clientCertSource * A callable which returns the client cert as a string. This can be used to * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag * } * * @throws ValidationException diff --git a/OrchestrationAirflow/src/V1/Client/ImageVersionsClient.php b/OrchestrationAirflow/src/V1/Client/ImageVersionsClient.php index dbd7cd38f1d7..583d2382b353 100644 --- a/OrchestrationAirflow/src/V1/Client/ImageVersionsClient.php +++ b/OrchestrationAirflow/src/V1/Client/ImageVersionsClient.php @@ -34,6 +34,7 @@ use Google\Auth\FetchAuthTokenInterface; use Google\Cloud\Orchestration\Airflow\Service\V1\ListImageVersionsRequest; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Log\LoggerInterface; /** * Service Description: Readonly service to query available ImageVersions. @@ -138,6 +139,9 @@ private static function getClientDefaults() * @type callable $clientCertSource * A callable which returns the client cert as a string. This can be used to * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag * } * * @throws ValidationException diff --git a/OrgPolicy/src/V2/Client/OrgPolicyClient.php b/OrgPolicy/src/V2/Client/OrgPolicyClient.php index fbbbad583939..c019b10e6e44 100644 --- a/OrgPolicy/src/V2/Client/OrgPolicyClient.php +++ b/OrgPolicy/src/V2/Client/OrgPolicyClient.php @@ -48,6 +48,7 @@ use Google\Cloud\OrgPolicy\V2\UpdateCustomConstraintRequest; use Google\Cloud\OrgPolicy\V2\UpdatePolicyRequest; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Log\LoggerInterface; /** * Service Description: An interface for managing organization policies. @@ -287,14 +288,14 @@ public static function projectPolicyName(string $project, string $policy): strin * listed, then parseName will check each of the supported templates, and return * the first match. * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match * * @return array An associative array from name component IDs to component values. * * @throws ValidationException If $formattedName could not be matched. */ - public static function parseName(string $formattedName, string $template = null): array + public static function parseName(string $formattedName, ?string $template = null): array { return self::parseFormattedName($formattedName, $template); } @@ -349,6 +350,9 @@ public static function parseName(string $formattedName, string $template = null) * @type callable $clientCertSource * A callable which returns the client cert as a string. This can be used to * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag * } * * @throws ValidationException diff --git a/OsConfig/src/V1/Client/OsConfigServiceClient.php b/OsConfig/src/V1/Client/OsConfigServiceClient.php index 9842432e6c67..1e635ce4fec0 100644 --- a/OsConfig/src/V1/Client/OsConfigServiceClient.php +++ b/OsConfig/src/V1/Client/OsConfigServiceClient.php @@ -48,6 +48,7 @@ use Google\Cloud\OsConfig\V1\ResumePatchDeploymentRequest; use Google\Cloud\OsConfig\V1\UpdatePatchDeploymentRequest; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Log\LoggerInterface; /** * Service Description: OS Config API @@ -185,14 +186,14 @@ public static function projectName(string $project): string * listed, then parseName will check each of the supported templates, and return * the first match. * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match * * @return array An associative array from name component IDs to component values. * * @throws ValidationException If $formattedName could not be matched. */ - public static function parseName(string $formattedName, string $template = null): array + public static function parseName(string $formattedName, ?string $template = null): array { return self::parseFormattedName($formattedName, $template); } @@ -247,6 +248,9 @@ public static function parseName(string $formattedName, string $template = null) * @type callable $clientCertSource * A callable which returns the client cert as a string. This can be used to * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag * } * * @throws ValidationException diff --git a/OsConfig/src/V1/Client/OsConfigZonalServiceClient.php b/OsConfig/src/V1/Client/OsConfigZonalServiceClient.php index d2b6fe9aa965..267fdd6fbb77 100644 --- a/OsConfig/src/V1/Client/OsConfigZonalServiceClient.php +++ b/OsConfig/src/V1/Client/OsConfigZonalServiceClient.php @@ -53,6 +53,7 @@ use Google\LongRunning\Client\OperationsClient; use Google\LongRunning\Operation; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Log\LoggerInterface; /** * Service Description: Zonal OS Config API @@ -380,14 +381,14 @@ public static function vulnerabilityReportName(string $project, string $location * listed, then parseName will check each of the supported templates, and return * the first match. * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match * * @return array An associative array from name component IDs to component values. * * @throws ValidationException If $formattedName could not be matched. */ - public static function parseName(string $formattedName, string $template = null): array + public static function parseName(string $formattedName, ?string $template = null): array { return self::parseFormattedName($formattedName, $template); } @@ -442,6 +443,9 @@ public static function parseName(string $formattedName, string $template = null) * @type callable $clientCertSource * A callable which returns the client cert as a string. This can be used to * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag * } * * @throws ValidationException diff --git a/OsLogin/src/V1/Client/OsLoginServiceClient.php b/OsLogin/src/V1/Client/OsLoginServiceClient.php index 5d15d64d451a..861d52378921 100644 --- a/OsLogin/src/V1/Client/OsLoginServiceClient.php +++ b/OsLogin/src/V1/Client/OsLoginServiceClient.php @@ -43,6 +43,7 @@ use Google\Cloud\OsLogin\V1\LoginProfile; use Google\Cloud\OsLogin\V1\UpdateSshPublicKeyRequest; use GuzzleHttp\Promise\PromiseInterface; +use Psr\Log\LoggerInterface; /** * Service Description: Cloud OS Login API @@ -180,14 +181,14 @@ public static function userName(string $user): string * listed, then parseName will check each of the supported templates, and return * the first match. * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match * * @return array An associative array from name component IDs to component values. * * @throws ValidationException If $formattedName could not be matched. */ - public static function parseName(string $formattedName, string $template = null): array + public static function parseName(string $formattedName, ?string $template = null): array { return self::parseFormattedName($formattedName, $template); } @@ -242,6 +243,9 @@ public static function parseName(string $formattedName, string $template = null) * @type callable $clientCertSource * A callable which returns the client cert as a string. This can be used to * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag * } * * @throws ValidationException diff --git a/owl-bot-staging/ManagedIdentities/v1/proto/src/GPBMetadata/Google/Cloud/Managedidentities/V1/ManagedIdentitiesService.php b/owl-bot-staging/ManagedIdentities/v1/proto/src/GPBMetadata/Google/Cloud/Managedidentities/V1/ManagedIdentitiesService.php deleted file mode 100644 index b488af3c4a76..000000000000 --- a/owl-bot-staging/ManagedIdentities/v1/proto/src/GPBMetadata/Google/Cloud/Managedidentities/V1/ManagedIdentitiesService.php +++ /dev/null @@ -1,117 +0,0 @@ -internalAddGeneratedFile( - ' -ß$ -Bgoogle/cloud/managedidentities/v1/managed_identities_service.proto!google.cloud.managedidentities.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto0google/cloud/managedidentities/v1/resource.proto#google/longrunning/operations.proto google/protobuf/field_mask.protogoogle/protobuf/timestamp.proto"Ü - -OpMetadata4 - create_time ( 2.google.protobuf.TimestampBàA1 -end_time ( 2.google.protobuf.TimestampBàA -target ( BàA -verb ( BàA# -requested_cancellation (BàA - api_version ( BàA"» -CreateMicrosoftAdDomainRequest? -parent ( B/àAúA)\'managedidentities.googleapis.com/Domain - domain_name ( BàA> -domain ( 2).google.cloud.managedidentities.v1.DomainBàA"Z -ResetAdminPasswordRequest= -name ( B/àAúA) -\'managedidentities.googleapis.com/Domain". -ResetAdminPasswordResponse -password ( "² -ListDomainsRequest? -parent ( B/àAúA)\'managedidentities.googleapis.com/Domain - page_size (BàA - -page_token ( BàA -filter ( BàA -order_by ( BàA" -ListDomainsResponse: -domains ( 2).google.cloud.managedidentities.v1.Domain -next_page_token (  - unreachable ( "Q -GetDomainRequest= -name ( B/àAúA) -\'managedidentities.googleapis.com/Domain"‹ -UpdateDomainRequest4 - update_mask ( 2.google.protobuf.FieldMaskBàA> -domain ( 2).google.cloud.managedidentities.v1.DomainBàA"T -DeleteDomainRequest= -name ( B/àAúA) -\'managedidentities.googleapis.com/Domain"‘ -AttachTrustRequest= -name ( B/àAúA) -\'managedidentities.googleapis.com/Domain< -trust ( 2(.google.cloud.managedidentities.v1.TrustBàA"Ÿ -ReconfigureTrustRequest= -name ( B/àAúA) -\'managedidentities.googleapis.com/Domain -target_domain_name ( BàA$ -target_dns_ip_addresses ( BàA"‘ -DetachTrustRequest= -name ( B/àAúA) -\'managedidentities.googleapis.com/Domain< -trust ( 2(.google.cloud.managedidentities.v1.TrustBàA"“ -ValidateTrustRequest= -name ( B/àAúA) -\'managedidentities.googleapis.com/Domain< -trust ( 2(.google.cloud.managedidentities.v1.TrustBàA2ò -ManagedIdentitiesServiceð -CreateMicrosoftAdDomainA.google.cloud.managedidentities.v1.CreateMicrosoftAdDomainRequest.google.longrunning.Operation"sÊA -Domain -OpMetadataÚAparent,domain_name,domain‚Óä“:"0/v1/{parent=projects/*/locations/global}/domains:domainè -ResetAdminPassword<.google.cloud.managedidentities.v1.ResetAdminPasswordRequest=.google.cloud.managedidentities.v1.ResetAdminPasswordResponse"UÚAname‚Óä“H"C/v1/{name=projects/*/locations/global/domains/*}:resetAdminPassword:*¿ - ListDomains5.google.cloud.managedidentities.v1.ListDomainsRequest6.google.cloud.managedidentities.v1.ListDomainsResponse"AÚAparent‚Óä“20/v1/{parent=projects/*/locations/global}/domains¬ - GetDomain3.google.cloud.managedidentities.v1.GetDomainRequest).google.cloud.managedidentities.v1.Domain"?ÚAname‚Óä“20/v1/{name=projects/*/locations/global/domains/*}Ú - UpdateDomain6.google.cloud.managedidentities.v1.UpdateDomainRequest.google.longrunning.Operation"sÊA -Domain -OpMetadataÚAdomain,update_mask‚Óä“A27/v1/{domain.name=projects/*/locations/global/domains/*}:domainÌ - DeleteDomain6.google.cloud.managedidentities.v1.DeleteDomainRequest.google.longrunning.Operation"eÊA# -google.protobuf.Empty -OpMetadataÚAname‚Óä“2*0/v1/{name=projects/*/locations/global/domains/*}Ð - AttachTrust5.google.cloud.managedidentities.v1.AttachTrustRequest.google.longrunning.Operation"kÊA -Domain -OpMetadataÚA -name,trust‚Óä“A"/v1/{name=projects/*/locations/global/domains/*}:validateTrust:*TÊA managedidentities.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformB“ -%com.google.cloud.managedidentities.v1BManagedIdentitiesServiceProtoPZScloud.google.com/go/managedidentities/apiv1/managedidentitiespb;managedidentitiespb¢GCMIª!Google.Cloud.ManagedIdentities.V1Ê!Google\\Cloud\\ManagedIdentities\\V1ê$Google::Cloud::ManagedIdentities::V1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/ManagedIdentities/v1/proto/src/GPBMetadata/Google/Cloud/Managedidentities/V1/Resource.php b/owl-bot-staging/ManagedIdentities/v1/proto/src/GPBMetadata/Google/Cloud/Managedidentities/V1/Resource.php deleted file mode 100644 index f7ef4e6c6bea9123381ee15731484e5f6d291557..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2818 zcmb7G?{3>v6emfOt~YC!88Na>Vs~AqWfF5}0WodLLoV!X-r&-_j;`Z%7{l88SM$2QJdq84ld)24!2$+ z7aesz~-XILWcsdSz7pIIc_}lbT#}C0a3H)Cnt{prfK}tdSs_bMMy3CJ4%oVz! zOB>Iy#N@J@aRhnT!I@`0o*GEY$P5`xLK2KRG<6d{W>L}uQB6CdEKex^(s(vA%i;V9 zZb%knr~qCKI&O_oI@J9gub3aWIX6XJ);U9`m8w_d=7#!9R7w_a4f zLzRGxX^_^7xYVd_f2qFL8&#sI`$EqMS#rj)3JOLak|{fm65hK`NZBt@@;a@T09aTn zD4(Faz$coV!nq$i2?>vAeQEB^J+u-;E>Ix~(|S46D=G>q6Ysy=Elz=N6m?1god zeJUwmpsJftm=et_0E$TW4J3sV?A^|g64JE#J@N?BUJBTCa)z=X{e1orxKRJ~9krHV?g z>6t9OvWm*5B$!etI&^|od{Nl=t$@nHGvy<6cVO$b;S8-o&uE*wrqQW=pxj2c+I>T} zO>3`KP*zYGUOKO8MSd{sb>u;bzjcg#Lx?Sbp_RVT)6G8DDl6;gUeD<7cKZkL?i}c* zWgC`mwT)Uuxr3@hOFz`jeZ94B)Rwi$Tir#Yr&kFfI~2H(sxaZ3v*vyQ_5F#uEN#A- zJ)Jl6W@^649?zSeAOncWhx3hpDyS?Hr#wUoBMD4GN1i#C>GC~7q9zVIi)HrKwzn6p zizSlCw7SE0Xb9pKju9~_oR=f}eAw`BM5l`! z5{$|@RN@?JcP-0k+rYymrG{>I%)$Iic|%7ld1rBo+5O?bcI;QZ%M?ba0^BnOHV_yr z8b8=Z-_rMM#SI6o35dLvfC>*JPRHznX|roxng><1Y+9}E(CSFE?$DNRMHtPiEi=~x z1Eto#1@r{S`u=LQRgoogle.cloud.managedidentities.v1.AttachTrustRequest - */ -class AttachTrustRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource domain name, project name and location using the form: - * `projects/{project_id}/locations/global/domains/{domain_name}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. The domain trust resource. - * - * Generated from protobuf field .google.cloud.managedidentities.v1.Trust trust = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $trust = null; - - /** - * @param string $name Required. The resource domain name, project name and location using the form: - * `projects/{project_id}/locations/global/domains/{domain_name}` - * Please see {@see ManagedIdentitiesServiceClient::domainName()} for help formatting this field. - * @param \Google\Cloud\ManagedIdentities\V1\Trust $trust Required. The domain trust resource. - * - * @return \Google\Cloud\ManagedIdentities\V1\AttachTrustRequest - * - * @experimental - */ - public static function build(string $name, \Google\Cloud\ManagedIdentities\V1\Trust $trust): self - { - return (new self()) - ->setName($name) - ->setTrust($trust); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource domain name, project name and location using the form: - * `projects/{project_id}/locations/global/domains/{domain_name}` - * @type \Google\Cloud\ManagedIdentities\V1\Trust $trust - * Required. The domain trust resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Managedidentities\V1\ManagedIdentitiesService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource domain name, project name and location using the form: - * `projects/{project_id}/locations/global/domains/{domain_name}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource domain name, project name and location using the form: - * `projects/{project_id}/locations/global/domains/{domain_name}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. The domain trust resource. - * - * Generated from protobuf field .google.cloud.managedidentities.v1.Trust trust = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\ManagedIdentities\V1\Trust|null - */ - public function getTrust() - { - return $this->trust; - } - - public function hasTrust() - { - return isset($this->trust); - } - - public function clearTrust() - { - unset($this->trust); - } - - /** - * Required. The domain trust resource. - * - * Generated from protobuf field .google.cloud.managedidentities.v1.Trust trust = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\ManagedIdentities\V1\Trust $var - * @return $this - */ - public function setTrust($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ManagedIdentities\V1\Trust::class); - $this->trust = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/CreateMicrosoftAdDomainRequest.php b/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/CreateMicrosoftAdDomainRequest.php deleted file mode 100644 index d96de3d33357..000000000000 --- a/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/CreateMicrosoftAdDomainRequest.php +++ /dev/null @@ -1,220 +0,0 @@ -google.cloud.managedidentities.v1.CreateMicrosoftAdDomainRequest - */ -class CreateMicrosoftAdDomainRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource project name and location using the form: - * `projects/{project_id}/locations/global` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The fully qualified domain name. - * e.g. mydomain.myorganization.com, with the following restrictions: - * * Must contain only lowercase letters, numbers, periods and hyphens. - * * Must start with a letter. - * * Must contain between 2-64 characters. - * * Must end with a number or a letter. - * * Must not start with period. - * * First segement length (mydomain form example above) shouldn't exceed - * 15 chars. - * * The last segment cannot be fully numeric. - * * Must be unique within the customer project. - * - * Generated from protobuf field string domain_name = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $domain_name = ''; - /** - * Required. A Managed Identity domain resource. - * - * Generated from protobuf field .google.cloud.managedidentities.v1.Domain domain = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $domain = null; - - /** - * @param string $parent Required. The resource project name and location using the form: - * `projects/{project_id}/locations/global` - * Please see {@see ManagedIdentitiesServiceClient::locationName()} for help formatting this field. - * @param string $domainName Required. The fully qualified domain name. - * e.g. mydomain.myorganization.com, with the following restrictions: - * - * * Must contain only lowercase letters, numbers, periods and hyphens. - * * Must start with a letter. - * * Must contain between 2-64 characters. - * * Must end with a number or a letter. - * * Must not start with period. - * * First segement length (mydomain form example above) shouldn't exceed - * 15 chars. - * * The last segment cannot be fully numeric. - * * Must be unique within the customer project. - * @param \Google\Cloud\ManagedIdentities\V1\Domain $domain Required. A Managed Identity domain resource. - * - * @return \Google\Cloud\ManagedIdentities\V1\CreateMicrosoftAdDomainRequest - * - * @experimental - */ - public static function build(string $parent, string $domainName, \Google\Cloud\ManagedIdentities\V1\Domain $domain): self - { - return (new self()) - ->setParent($parent) - ->setDomainName($domainName) - ->setDomain($domain); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource project name and location using the form: - * `projects/{project_id}/locations/global` - * @type string $domain_name - * Required. The fully qualified domain name. - * e.g. mydomain.myorganization.com, with the following restrictions: - * * Must contain only lowercase letters, numbers, periods and hyphens. - * * Must start with a letter. - * * Must contain between 2-64 characters. - * * Must end with a number or a letter. - * * Must not start with period. - * * First segement length (mydomain form example above) shouldn't exceed - * 15 chars. - * * The last segment cannot be fully numeric. - * * Must be unique within the customer project. - * @type \Google\Cloud\ManagedIdentities\V1\Domain $domain - * Required. A Managed Identity domain resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Managedidentities\V1\ManagedIdentitiesService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource project name and location using the form: - * `projects/{project_id}/locations/global` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The resource project name and location using the form: - * `projects/{project_id}/locations/global` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The fully qualified domain name. - * e.g. mydomain.myorganization.com, with the following restrictions: - * * Must contain only lowercase letters, numbers, periods and hyphens. - * * Must start with a letter. - * * Must contain between 2-64 characters. - * * Must end with a number or a letter. - * * Must not start with period. - * * First segement length (mydomain form example above) shouldn't exceed - * 15 chars. - * * The last segment cannot be fully numeric. - * * Must be unique within the customer project. - * - * Generated from protobuf field string domain_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDomainName() - { - return $this->domain_name; - } - - /** - * Required. The fully qualified domain name. - * e.g. mydomain.myorganization.com, with the following restrictions: - * * Must contain only lowercase letters, numbers, periods and hyphens. - * * Must start with a letter. - * * Must contain between 2-64 characters. - * * Must end with a number or a letter. - * * Must not start with period. - * * First segement length (mydomain form example above) shouldn't exceed - * 15 chars. - * * The last segment cannot be fully numeric. - * * Must be unique within the customer project. - * - * Generated from protobuf field string domain_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDomainName($var) - { - GPBUtil::checkString($var, True); - $this->domain_name = $var; - - return $this; - } - - /** - * Required. A Managed Identity domain resource. - * - * Generated from protobuf field .google.cloud.managedidentities.v1.Domain domain = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\ManagedIdentities\V1\Domain|null - */ - public function getDomain() - { - return $this->domain; - } - - public function hasDomain() - { - return isset($this->domain); - } - - public function clearDomain() - { - unset($this->domain); - } - - /** - * Required. A Managed Identity domain resource. - * - * Generated from protobuf field .google.cloud.managedidentities.v1.Domain domain = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\ManagedIdentities\V1\Domain $var - * @return $this - */ - public function setDomain($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ManagedIdentities\V1\Domain::class); - $this->domain = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/DeleteDomainRequest.php b/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/DeleteDomainRequest.php deleted file mode 100644 index e32ca99efc77..000000000000 --- a/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/DeleteDomainRequest.php +++ /dev/null @@ -1,87 +0,0 @@ -google.cloud.managedidentities.v1.DeleteDomainRequest - */ -class DeleteDomainRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The domain resource name using the form: - * `projects/{project_id}/locations/global/domains/{domain_name}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The domain resource name using the form: - * `projects/{project_id}/locations/global/domains/{domain_name}` - * Please see {@see ManagedIdentitiesServiceClient::domainName()} for help formatting this field. - * - * @return \Google\Cloud\ManagedIdentities\V1\DeleteDomainRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The domain resource name using the form: - * `projects/{project_id}/locations/global/domains/{domain_name}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Managedidentities\V1\ManagedIdentitiesService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The domain resource name using the form: - * `projects/{project_id}/locations/global/domains/{domain_name}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The domain resource name using the form: - * `projects/{project_id}/locations/global/domains/{domain_name}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/DetachTrustRequest.php b/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/DetachTrustRequest.php deleted file mode 100644 index 6f4da640e84c..000000000000 --- a/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/DetachTrustRequest.php +++ /dev/null @@ -1,133 +0,0 @@ -google.cloud.managedidentities.v1.DetachTrustRequest - */ -class DetachTrustRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource domain name, project name, and location using the form: - * `projects/{project_id}/locations/global/domains/{domain_name}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. The domain trust resource to removed. - * - * Generated from protobuf field .google.cloud.managedidentities.v1.Trust trust = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $trust = null; - - /** - * @param string $name Required. The resource domain name, project name, and location using the form: - * `projects/{project_id}/locations/global/domains/{domain_name}` - * Please see {@see ManagedIdentitiesServiceClient::domainName()} for help formatting this field. - * @param \Google\Cloud\ManagedIdentities\V1\Trust $trust Required. The domain trust resource to removed. - * - * @return \Google\Cloud\ManagedIdentities\V1\DetachTrustRequest - * - * @experimental - */ - public static function build(string $name, \Google\Cloud\ManagedIdentities\V1\Trust $trust): self - { - return (new self()) - ->setName($name) - ->setTrust($trust); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource domain name, project name, and location using the form: - * `projects/{project_id}/locations/global/domains/{domain_name}` - * @type \Google\Cloud\ManagedIdentities\V1\Trust $trust - * Required. The domain trust resource to removed. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Managedidentities\V1\ManagedIdentitiesService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource domain name, project name, and location using the form: - * `projects/{project_id}/locations/global/domains/{domain_name}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource domain name, project name, and location using the form: - * `projects/{project_id}/locations/global/domains/{domain_name}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. The domain trust resource to removed. - * - * Generated from protobuf field .google.cloud.managedidentities.v1.Trust trust = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\ManagedIdentities\V1\Trust|null - */ - public function getTrust() - { - return $this->trust; - } - - public function hasTrust() - { - return isset($this->trust); - } - - public function clearTrust() - { - unset($this->trust); - } - - /** - * Required. The domain trust resource to removed. - * - * Generated from protobuf field .google.cloud.managedidentities.v1.Trust trust = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\ManagedIdentities\V1\Trust $var - * @return $this - */ - public function setTrust($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ManagedIdentities\V1\Trust::class); - $this->trust = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/Domain.php b/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/Domain.php deleted file mode 100644 index fcc587589a00..000000000000 --- a/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/Domain.php +++ /dev/null @@ -1,525 +0,0 @@ -google.cloud.managedidentities.v1.Domain - */ -class Domain extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The unique name of the domain using the form: - * `projects/{project_id}/locations/global/domains/{domain_name}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Optional. Resource labels that can contain user-provided metadata. - * - * Generated from protobuf field map labels = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - /** - * Optional. The full names of the Google Compute Engine - * [networks](/compute/docs/networks-and-firewalls#networks) the domain - * instance is connected to. Networks can be added using UpdateDomain. - * The domain is only available on networks listed in `authorized_networks`. - * If CIDR subnets overlap between networks, domain creation will fail. - * - * Generated from protobuf field repeated string authorized_networks = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $authorized_networks; - /** - * Required. The CIDR range of internal addresses that are reserved for this - * domain. Reserved networks must be /24 or larger. Ranges must be - * unique and non-overlapping with existing subnets in - * [Domain].[authorized_networks]. - * - * Generated from protobuf field string reserved_ip_range = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $reserved_ip_range = ''; - /** - * Required. Locations where domain needs to be provisioned. - * [regions][compute/docs/regions-zones/] - * e.g. us-west1 or us-east4 - * Service supports up to 4 locations at once. Each location will use a /26 - * block. - * - * Generated from protobuf field repeated string locations = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - private $locations; - /** - * Optional. The name of delegated administrator account used to perform - * Active Directory operations. If not specified, `setupadmin` will be used. - * - * Generated from protobuf field string admin = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $admin = ''; - /** - * Output only. The fully-qualified domain name of the exposed domain used by - * clients to connect to the service. Similar to what would be chosen for an - * Active Directory set up on an internal network. - * - * Generated from protobuf field string fqdn = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $fqdn = ''; - /** - * Output only. The time the instance was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The last update time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Output only. The current state of this domain. - * - * Generated from protobuf field .google.cloud.managedidentities.v1.Domain.State state = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. Additional information about the current status of this - * domain, if available. - * - * Generated from protobuf field string status_message = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $status_message = ''; - /** - * Output only. The current trusts associated with the domain. - * - * Generated from protobuf field repeated .google.cloud.managedidentities.v1.Trust trusts = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $trusts; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The unique name of the domain using the form: - * `projects/{project_id}/locations/global/domains/{domain_name}`. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. Resource labels that can contain user-provided metadata. - * @type array|\Google\Protobuf\Internal\RepeatedField $authorized_networks - * Optional. The full names of the Google Compute Engine - * [networks](/compute/docs/networks-and-firewalls#networks) the domain - * instance is connected to. Networks can be added using UpdateDomain. - * The domain is only available on networks listed in `authorized_networks`. - * If CIDR subnets overlap between networks, domain creation will fail. - * @type string $reserved_ip_range - * Required. The CIDR range of internal addresses that are reserved for this - * domain. Reserved networks must be /24 or larger. Ranges must be - * unique and non-overlapping with existing subnets in - * [Domain].[authorized_networks]. - * @type array|\Google\Protobuf\Internal\RepeatedField $locations - * Required. Locations where domain needs to be provisioned. - * [regions][compute/docs/regions-zones/] - * e.g. us-west1 or us-east4 - * Service supports up to 4 locations at once. Each location will use a /26 - * block. - * @type string $admin - * Optional. The name of delegated administrator account used to perform - * Active Directory operations. If not specified, `setupadmin` will be used. - * @type string $fqdn - * Output only. The fully-qualified domain name of the exposed domain used by - * clients to connect to the service. Similar to what would be chosen for an - * Active Directory set up on an internal network. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time the instance was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The last update time. - * @type int $state - * Output only. The current state of this domain. - * @type string $status_message - * Output only. Additional information about the current status of this - * domain, if available. - * @type array<\Google\Cloud\ManagedIdentities\V1\Trust>|\Google\Protobuf\Internal\RepeatedField $trusts - * Output only. The current trusts associated with the domain. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Managedidentities\V1\Resource::initOnce(); - parent::__construct($data); - } - - /** - * Required. The unique name of the domain using the form: - * `projects/{project_id}/locations/global/domains/{domain_name}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The unique name of the domain using the form: - * `projects/{project_id}/locations/global/domains/{domain_name}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. Resource labels that can contain user-provided metadata. - * - * Generated from protobuf field map labels = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. Resource labels that can contain user-provided metadata. - * - * Generated from protobuf field map labels = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Optional. The full names of the Google Compute Engine - * [networks](/compute/docs/networks-and-firewalls#networks) the domain - * instance is connected to. Networks can be added using UpdateDomain. - * The domain is only available on networks listed in `authorized_networks`. - * If CIDR subnets overlap between networks, domain creation will fail. - * - * Generated from protobuf field repeated string authorized_networks = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAuthorizedNetworks() - { - return $this->authorized_networks; - } - - /** - * Optional. The full names of the Google Compute Engine - * [networks](/compute/docs/networks-and-firewalls#networks) the domain - * instance is connected to. Networks can be added using UpdateDomain. - * The domain is only available on networks listed in `authorized_networks`. - * If CIDR subnets overlap between networks, domain creation will fail. - * - * Generated from protobuf field repeated string authorized_networks = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAuthorizedNetworks($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->authorized_networks = $arr; - - return $this; - } - - /** - * Required. The CIDR range of internal addresses that are reserved for this - * domain. Reserved networks must be /24 or larger. Ranges must be - * unique and non-overlapping with existing subnets in - * [Domain].[authorized_networks]. - * - * Generated from protobuf field string reserved_ip_range = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getReservedIpRange() - { - return $this->reserved_ip_range; - } - - /** - * Required. The CIDR range of internal addresses that are reserved for this - * domain. Reserved networks must be /24 or larger. Ranges must be - * unique and non-overlapping with existing subnets in - * [Domain].[authorized_networks]. - * - * Generated from protobuf field string reserved_ip_range = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setReservedIpRange($var) - { - GPBUtil::checkString($var, True); - $this->reserved_ip_range = $var; - - return $this; - } - - /** - * Required. Locations where domain needs to be provisioned. - * [regions][compute/docs/regions-zones/] - * e.g. us-west1 or us-east4 - * Service supports up to 4 locations at once. Each location will use a /26 - * block. - * - * Generated from protobuf field repeated string locations = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getLocations() - { - return $this->locations; - } - - /** - * Required. Locations where domain needs to be provisioned. - * [regions][compute/docs/regions-zones/] - * e.g. us-west1 or us-east4 - * Service supports up to 4 locations at once. Each location will use a /26 - * block. - * - * Generated from protobuf field repeated string locations = 5 [(.google.api.field_behavior) = REQUIRED]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setLocations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->locations = $arr; - - return $this; - } - - /** - * Optional. The name of delegated administrator account used to perform - * Active Directory operations. If not specified, `setupadmin` will be used. - * - * Generated from protobuf field string admin = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getAdmin() - { - return $this->admin; - } - - /** - * Optional. The name of delegated administrator account used to perform - * Active Directory operations. If not specified, `setupadmin` will be used. - * - * Generated from protobuf field string admin = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setAdmin($var) - { - GPBUtil::checkString($var, True); - $this->admin = $var; - - return $this; - } - - /** - * Output only. The fully-qualified domain name of the exposed domain used by - * clients to connect to the service. Similar to what would be chosen for an - * Active Directory set up on an internal network. - * - * Generated from protobuf field string fqdn = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getFqdn() - { - return $this->fqdn; - } - - /** - * Output only. The fully-qualified domain name of the exposed domain used by - * clients to connect to the service. Similar to what would be chosen for an - * Active Directory set up on an internal network. - * - * Generated from protobuf field string fqdn = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setFqdn($var) - { - GPBUtil::checkString($var, True); - $this->fqdn = $var; - - return $this; - } - - /** - * Output only. The time the instance was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The time the instance was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The last update time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The last update time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Output only. The current state of this domain. - * - * Generated from protobuf field .google.cloud.managedidentities.v1.Domain.State state = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The current state of this domain. - * - * Generated from protobuf field .google.cloud.managedidentities.v1.Domain.State state = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\ManagedIdentities\V1\Domain\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. Additional information about the current status of this - * domain, if available. - * - * Generated from protobuf field string status_message = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getStatusMessage() - { - return $this->status_message; - } - - /** - * Output only. Additional information about the current status of this - * domain, if available. - * - * Generated from protobuf field string status_message = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setStatusMessage($var) - { - GPBUtil::checkString($var, True); - $this->status_message = $var; - - return $this; - } - - /** - * Output only. The current trusts associated with the domain. - * - * Generated from protobuf field repeated .google.cloud.managedidentities.v1.Trust trusts = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTrusts() - { - return $this->trusts; - } - - /** - * Output only. The current trusts associated with the domain. - * - * Generated from protobuf field repeated .google.cloud.managedidentities.v1.Trust trusts = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\ManagedIdentities\V1\Trust>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTrusts($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ManagedIdentities\V1\Trust::class); - $this->trusts = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/Domain/State.php b/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/Domain/State.php deleted file mode 100644 index 1c43dad77b98..000000000000 --- a/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/Domain/State.php +++ /dev/null @@ -1,100 +0,0 @@ -google.cloud.managedidentities.v1.Domain.State - */ -class State -{ - /** - * Not set. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The domain is being created. - * - * Generated from protobuf enum CREATING = 1; - */ - const CREATING = 1; - /** - * The domain has been created and is fully usable. - * - * Generated from protobuf enum READY = 2; - */ - const READY = 2; - /** - * The domain's configuration is being updated. - * - * Generated from protobuf enum UPDATING = 3; - */ - const UPDATING = 3; - /** - * The domain is being deleted. - * - * Generated from protobuf enum DELETING = 4; - */ - const DELETING = 4; - /** - * The domain is being repaired and may be unusable. Details - * can be found in the `status_message` field. - * - * Generated from protobuf enum REPAIRING = 5; - */ - const REPAIRING = 5; - /** - * The domain is undergoing maintenance. - * - * Generated from protobuf enum PERFORMING_MAINTENANCE = 6; - */ - const PERFORMING_MAINTENANCE = 6; - /** - * The domain is not serving requests. - * - * Generated from protobuf enum UNAVAILABLE = 7; - */ - const UNAVAILABLE = 7; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::CREATING => 'CREATING', - self::READY => 'READY', - self::UPDATING => 'UPDATING', - self::DELETING => 'DELETING', - self::REPAIRING => 'REPAIRING', - self::PERFORMING_MAINTENANCE => 'PERFORMING_MAINTENANCE', - self::UNAVAILABLE => 'UNAVAILABLE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\ManagedIdentities\V1\Domain_State::class); - diff --git a/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/GetDomainRequest.php b/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/GetDomainRequest.php deleted file mode 100644 index 8900370c46d4..000000000000 --- a/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/GetDomainRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.managedidentities.v1.GetDomainRequest - */ -class GetDomainRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The domain resource name using the form: - * `projects/{project_id}/locations/global/domains/{domain_name}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The domain resource name using the form: - * `projects/{project_id}/locations/global/domains/{domain_name}` - * Please see {@see ManagedIdentitiesServiceClient::domainName()} for help formatting this field. - * - * @return \Google\Cloud\ManagedIdentities\V1\GetDomainRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The domain resource name using the form: - * `projects/{project_id}/locations/global/domains/{domain_name}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Managedidentities\V1\ManagedIdentitiesService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The domain resource name using the form: - * `projects/{project_id}/locations/global/domains/{domain_name}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The domain resource name using the form: - * `projects/{project_id}/locations/global/domains/{domain_name}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/ListDomainsRequest.php b/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/ListDomainsRequest.php deleted file mode 100644 index 0d7b7bdcb159..000000000000 --- a/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/ListDomainsRequest.php +++ /dev/null @@ -1,263 +0,0 @@ -google.cloud.managedidentities.v1.ListDomainsRequest - */ -class ListDomainsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the domain location using the form: - * `projects/{project_id}/locations/global` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The maximum number of items to return. - * If not specified, a default value of 1000 will be used. - * Regardless of the page_size value, the response may include a partial list. - * Callers should rely on a response's - * [next_page_token][google.cloud.managedidentities.v1.ListDomainsResponse.next_page_token] - * to determine if there are additional results to list. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. The `next_page_token` value returned from a previous ListDomainsRequest - * request, if any. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. A filter specifying constraints of a list operation. - * For example, `Domain.fqdn="mydomain.myorginization"`. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. Specifies the ordering of results. See - * [Sorting - * order](https://cloud.google.com/apis/design/design_patterns#sorting_order) - * for more information. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The resource name of the domain location using the form: - * `projects/{project_id}/locations/global` - * Please see {@see ManagedIdentitiesServiceClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\ManagedIdentities\V1\ListDomainsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the domain location using the form: - * `projects/{project_id}/locations/global` - * @type int $page_size - * Optional. The maximum number of items to return. - * If not specified, a default value of 1000 will be used. - * Regardless of the page_size value, the response may include a partial list. - * Callers should rely on a response's - * [next_page_token][google.cloud.managedidentities.v1.ListDomainsResponse.next_page_token] - * to determine if there are additional results to list. - * @type string $page_token - * Optional. The `next_page_token` value returned from a previous ListDomainsRequest - * request, if any. - * @type string $filter - * Optional. A filter specifying constraints of a list operation. - * For example, `Domain.fqdn="mydomain.myorginization"`. - * @type string $order_by - * Optional. Specifies the ordering of results. See - * [Sorting - * order](https://cloud.google.com/apis/design/design_patterns#sorting_order) - * for more information. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Managedidentities\V1\ManagedIdentitiesService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the domain location using the form: - * `projects/{project_id}/locations/global` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The resource name of the domain location using the form: - * `projects/{project_id}/locations/global` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. The maximum number of items to return. - * If not specified, a default value of 1000 will be used. - * Regardless of the page_size value, the response may include a partial list. - * Callers should rely on a response's - * [next_page_token][google.cloud.managedidentities.v1.ListDomainsResponse.next_page_token] - * to determine if there are additional results to list. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of items to return. - * If not specified, a default value of 1000 will be used. - * Regardless of the page_size value, the response may include a partial list. - * Callers should rely on a response's - * [next_page_token][google.cloud.managedidentities.v1.ListDomainsResponse.next_page_token] - * to determine if there are additional results to list. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. The `next_page_token` value returned from a previous ListDomainsRequest - * request, if any. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. The `next_page_token` value returned from a previous ListDomainsRequest - * request, if any. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Optional. A filter specifying constraints of a list operation. - * For example, `Domain.fqdn="mydomain.myorginization"`. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. A filter specifying constraints of a list operation. - * For example, `Domain.fqdn="mydomain.myorginization"`. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Optional. Specifies the ordering of results. See - * [Sorting - * order](https://cloud.google.com/apis/design/design_patterns#sorting_order) - * for more information. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Optional. Specifies the ordering of results. See - * [Sorting - * order](https://cloud.google.com/apis/design/design_patterns#sorting_order) - * for more information. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/ListDomainsResponse.php b/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/ListDomainsResponse.php deleted file mode 100644 index 4d274be3bf26..000000000000 --- a/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/ListDomainsResponse.php +++ /dev/null @@ -1,140 +0,0 @@ -google.cloud.managedidentities.v1.ListDomainsResponse - */ -class ListDomainsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of Managed Identities Service domains in the project. - * - * Generated from protobuf field repeated .google.cloud.managedidentities.v1.Domain domains = 1; - */ - private $domains; - /** - * A token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * A list of locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\ManagedIdentities\V1\Domain>|\Google\Protobuf\Internal\RepeatedField $domains - * A list of Managed Identities Service domains in the project. - * @type string $next_page_token - * A token to retrieve the next page of results, or empty if there are no more - * results in the list. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * A list of locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Managedidentities\V1\ManagedIdentitiesService::initOnce(); - parent::__construct($data); - } - - /** - * A list of Managed Identities Service domains in the project. - * - * Generated from protobuf field repeated .google.cloud.managedidentities.v1.Domain domains = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDomains() - { - return $this->domains; - } - - /** - * A list of Managed Identities Service domains in the project. - * - * Generated from protobuf field repeated .google.cloud.managedidentities.v1.Domain domains = 1; - * @param array<\Google\Cloud\ManagedIdentities\V1\Domain>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDomains($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ManagedIdentities\V1\Domain::class); - $this->domains = $arr; - - return $this; - } - - /** - * A token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * A list of locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * A list of locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/OpMetadata.php b/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/OpMetadata.php deleted file mode 100644 index 45fcb533abb3..000000000000 --- a/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/OpMetadata.php +++ /dev/null @@ -1,269 +0,0 @@ -google.cloud.managedidentities.v1.OpMetadata - */ -class OpMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $end_time = null; - /** - * Output only. Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $target = ''; - /** - * Output only. Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $verb = ''; - /** - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have successfully been cancelled - * have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, - * corresponding to `Code.CANCELLED`. - * - * Generated from protobuf field bool requested_cancellation = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $requested_cancellation = false; - /** - * Output only. API version used to start the operation. - * - * Generated from protobuf field string api_version = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $api_version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time the operation was created. - * @type \Google\Protobuf\Timestamp $end_time - * Output only. The time the operation finished running. - * @type string $target - * Output only. Server-defined resource path for the target of the operation. - * @type string $verb - * Output only. Name of the verb executed by the operation. - * @type bool $requested_cancellation - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have successfully been cancelled - * have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, - * corresponding to `Code.CANCELLED`. - * @type string $api_version - * Output only. API version used to start the operation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Managedidentities\V1\ManagedIdentitiesService::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * Output only. The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * Output only. Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getTarget() - { - return $this->target; - } - - /** - * Output only. Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setTarget($var) - { - GPBUtil::checkString($var, True); - $this->target = $var; - - return $this; - } - - /** - * Output only. Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getVerb() - { - return $this->verb; - } - - /** - * Output only. Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setVerb($var) - { - GPBUtil::checkString($var, True); - $this->verb = $var; - - return $this; - } - - /** - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have successfully been cancelled - * have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, - * corresponding to `Code.CANCELLED`. - * - * Generated from protobuf field bool requested_cancellation = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getRequestedCancellation() - { - return $this->requested_cancellation; - } - - /** - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have successfully been cancelled - * have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, - * corresponding to `Code.CANCELLED`. - * - * Generated from protobuf field bool requested_cancellation = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setRequestedCancellation($var) - { - GPBUtil::checkBool($var); - $this->requested_cancellation = $var; - - return $this; - } - - /** - * Output only. API version used to start the operation. - * - * Generated from protobuf field string api_version = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getApiVersion() - { - return $this->api_version; - } - - /** - * Output only. API version used to start the operation. - * - * Generated from protobuf field string api_version = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setApiVersion($var) - { - GPBUtil::checkString($var, True); - $this->api_version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/ReconfigureTrustRequest.php b/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/ReconfigureTrustRequest.php deleted file mode 100644 index fe92488377fc..000000000000 --- a/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/ReconfigureTrustRequest.php +++ /dev/null @@ -1,169 +0,0 @@ -google.cloud.managedidentities.v1.ReconfigureTrustRequest - */ -class ReconfigureTrustRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource domain name, project name and location using the form: - * `projects/{project_id}/locations/global/domains/{domain_name}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. The fully-qualified target domain name which will be in trust with current - * domain. - * - * Generated from protobuf field string target_domain_name = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $target_domain_name = ''; - /** - * Required. The target DNS server IP addresses to resolve the remote domain involved - * in the trust. - * - * Generated from protobuf field repeated string target_dns_ip_addresses = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - private $target_dns_ip_addresses; - - /** - * @param string $name Required. The resource domain name, project name and location using the form: - * `projects/{project_id}/locations/global/domains/{domain_name}` - * Please see {@see ManagedIdentitiesServiceClient::domainName()} for help formatting this field. - * @param string $targetDomainName Required. The fully-qualified target domain name which will be in trust with current - * domain. - * @param string[] $targetDnsIpAddresses Required. The target DNS server IP addresses to resolve the remote domain involved - * in the trust. - * - * @return \Google\Cloud\ManagedIdentities\V1\ReconfigureTrustRequest - * - * @experimental - */ - public static function build(string $name, string $targetDomainName, array $targetDnsIpAddresses): self - { - return (new self()) - ->setName($name) - ->setTargetDomainName($targetDomainName) - ->setTargetDnsIpAddresses($targetDnsIpAddresses); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource domain name, project name and location using the form: - * `projects/{project_id}/locations/global/domains/{domain_name}` - * @type string $target_domain_name - * Required. The fully-qualified target domain name which will be in trust with current - * domain. - * @type array|\Google\Protobuf\Internal\RepeatedField $target_dns_ip_addresses - * Required. The target DNS server IP addresses to resolve the remote domain involved - * in the trust. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Managedidentities\V1\ManagedIdentitiesService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource domain name, project name and location using the form: - * `projects/{project_id}/locations/global/domains/{domain_name}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource domain name, project name and location using the form: - * `projects/{project_id}/locations/global/domains/{domain_name}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. The fully-qualified target domain name which will be in trust with current - * domain. - * - * Generated from protobuf field string target_domain_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getTargetDomainName() - { - return $this->target_domain_name; - } - - /** - * Required. The fully-qualified target domain name which will be in trust with current - * domain. - * - * Generated from protobuf field string target_domain_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setTargetDomainName($var) - { - GPBUtil::checkString($var, True); - $this->target_domain_name = $var; - - return $this; - } - - /** - * Required. The target DNS server IP addresses to resolve the remote domain involved - * in the trust. - * - * Generated from protobuf field repeated string target_dns_ip_addresses = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTargetDnsIpAddresses() - { - return $this->target_dns_ip_addresses; - } - - /** - * Required. The target DNS server IP addresses to resolve the remote domain involved - * in the trust. - * - * Generated from protobuf field repeated string target_dns_ip_addresses = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTargetDnsIpAddresses($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->target_dns_ip_addresses = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/ResetAdminPasswordRequest.php b/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/ResetAdminPasswordRequest.php deleted file mode 100644 index 5aa41f4f8b8e..000000000000 --- a/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/ResetAdminPasswordRequest.php +++ /dev/null @@ -1,87 +0,0 @@ -google.cloud.managedidentities.v1.ResetAdminPasswordRequest - */ -class ResetAdminPasswordRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The domain resource name using the form: - * `projects/{project_id}/locations/global/domains/{domain_name}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The domain resource name using the form: - * `projects/{project_id}/locations/global/domains/{domain_name}` - * Please see {@see ManagedIdentitiesServiceClient::domainName()} for help formatting this field. - * - * @return \Google\Cloud\ManagedIdentities\V1\ResetAdminPasswordRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The domain resource name using the form: - * `projects/{project_id}/locations/global/domains/{domain_name}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Managedidentities\V1\ManagedIdentitiesService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The domain resource name using the form: - * `projects/{project_id}/locations/global/domains/{domain_name}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The domain resource name using the form: - * `projects/{project_id}/locations/global/domains/{domain_name}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/ResetAdminPasswordResponse.php b/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/ResetAdminPasswordResponse.php deleted file mode 100644 index 0e2b6865b4ef..000000000000 --- a/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/ResetAdminPasswordResponse.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.managedidentities.v1.ResetAdminPasswordResponse - */ -class ResetAdminPasswordResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A random password. See [admin][google.cloud.managedidentities.v1.Domain.admin] for more information. - * - * Generated from protobuf field string password = 1; - */ - protected $password = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $password - * A random password. See [admin][google.cloud.managedidentities.v1.Domain.admin] for more information. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Managedidentities\V1\ManagedIdentitiesService::initOnce(); - parent::__construct($data); - } - - /** - * A random password. See [admin][google.cloud.managedidentities.v1.Domain.admin] for more information. - * - * Generated from protobuf field string password = 1; - * @return string - */ - public function getPassword() - { - return $this->password; - } - - /** - * A random password. See [admin][google.cloud.managedidentities.v1.Domain.admin] for more information. - * - * Generated from protobuf field string password = 1; - * @param string $var - * @return $this - */ - public function setPassword($var) - { - GPBUtil::checkString($var, True); - $this->password = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/Trust.php b/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/Trust.php deleted file mode 100644 index 637e3b32d72b..000000000000 --- a/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/Trust.php +++ /dev/null @@ -1,462 +0,0 @@ -google.cloud.managedidentities.v1.Trust - */ -class Trust extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The fully qualified target domain name which will be in trust with the - * current domain. - * - * Generated from protobuf field string target_domain_name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $target_domain_name = ''; - /** - * Required. The type of trust represented by the trust resource. - * - * Generated from protobuf field .google.cloud.managedidentities.v1.Trust.TrustType trust_type = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $trust_type = 0; - /** - * Required. The trust direction, which decides if the current domain is trusted, - * trusting, or both. - * - * Generated from protobuf field .google.cloud.managedidentities.v1.Trust.TrustDirection trust_direction = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $trust_direction = 0; - /** - * Optional. The trust authentication type, which decides whether the trusted side has - * forest/domain wide access or selective access to an approved set of - * resources. - * - * Generated from protobuf field bool selective_authentication = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $selective_authentication = false; - /** - * Required. The target DNS server IP addresses which can resolve the remote domain - * involved in the trust. - * - * Generated from protobuf field repeated string target_dns_ip_addresses = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - private $target_dns_ip_addresses; - /** - * Required. The trust secret used for the handshake with the target domain. This will - * not be stored. - * - * Generated from protobuf field string trust_handshake_secret = 6 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $trust_handshake_secret = ''; - /** - * Output only. The time the instance was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The last update time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Output only. The current state of the trust. - * - * Generated from protobuf field .google.cloud.managedidentities.v1.Trust.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. Additional information about the current state of the trust, if available. - * - * Generated from protobuf field string state_description = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state_description = ''; - /** - * Output only. The last heartbeat time when the trust was known to be connected. - * - * Generated from protobuf field .google.protobuf.Timestamp last_trust_heartbeat_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $last_trust_heartbeat_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $target_domain_name - * Required. The fully qualified target domain name which will be in trust with the - * current domain. - * @type int $trust_type - * Required. The type of trust represented by the trust resource. - * @type int $trust_direction - * Required. The trust direction, which decides if the current domain is trusted, - * trusting, or both. - * @type bool $selective_authentication - * Optional. The trust authentication type, which decides whether the trusted side has - * forest/domain wide access or selective access to an approved set of - * resources. - * @type array|\Google\Protobuf\Internal\RepeatedField $target_dns_ip_addresses - * Required. The target DNS server IP addresses which can resolve the remote domain - * involved in the trust. - * @type string $trust_handshake_secret - * Required. The trust secret used for the handshake with the target domain. This will - * not be stored. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time the instance was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The last update time. - * @type int $state - * Output only. The current state of the trust. - * @type string $state_description - * Output only. Additional information about the current state of the trust, if available. - * @type \Google\Protobuf\Timestamp $last_trust_heartbeat_time - * Output only. The last heartbeat time when the trust was known to be connected. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Managedidentities\V1\Resource::initOnce(); - parent::__construct($data); - } - - /** - * Required. The fully qualified target domain name which will be in trust with the - * current domain. - * - * Generated from protobuf field string target_domain_name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getTargetDomainName() - { - return $this->target_domain_name; - } - - /** - * Required. The fully qualified target domain name which will be in trust with the - * current domain. - * - * Generated from protobuf field string target_domain_name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setTargetDomainName($var) - { - GPBUtil::checkString($var, True); - $this->target_domain_name = $var; - - return $this; - } - - /** - * Required. The type of trust represented by the trust resource. - * - * Generated from protobuf field .google.cloud.managedidentities.v1.Trust.TrustType trust_type = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getTrustType() - { - return $this->trust_type; - } - - /** - * Required. The type of trust represented by the trust resource. - * - * Generated from protobuf field .google.cloud.managedidentities.v1.Trust.TrustType trust_type = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setTrustType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\ManagedIdentities\V1\Trust\TrustType::class); - $this->trust_type = $var; - - return $this; - } - - /** - * Required. The trust direction, which decides if the current domain is trusted, - * trusting, or both. - * - * Generated from protobuf field .google.cloud.managedidentities.v1.Trust.TrustDirection trust_direction = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getTrustDirection() - { - return $this->trust_direction; - } - - /** - * Required. The trust direction, which decides if the current domain is trusted, - * trusting, or both. - * - * Generated from protobuf field .google.cloud.managedidentities.v1.Trust.TrustDirection trust_direction = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setTrustDirection($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\ManagedIdentities\V1\Trust\TrustDirection::class); - $this->trust_direction = $var; - - return $this; - } - - /** - * Optional. The trust authentication type, which decides whether the trusted side has - * forest/domain wide access or selective access to an approved set of - * resources. - * - * Generated from protobuf field bool selective_authentication = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getSelectiveAuthentication() - { - return $this->selective_authentication; - } - - /** - * Optional. The trust authentication type, which decides whether the trusted side has - * forest/domain wide access or selective access to an approved set of - * resources. - * - * Generated from protobuf field bool selective_authentication = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setSelectiveAuthentication($var) - { - GPBUtil::checkBool($var); - $this->selective_authentication = $var; - - return $this; - } - - /** - * Required. The target DNS server IP addresses which can resolve the remote domain - * involved in the trust. - * - * Generated from protobuf field repeated string target_dns_ip_addresses = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTargetDnsIpAddresses() - { - return $this->target_dns_ip_addresses; - } - - /** - * Required. The target DNS server IP addresses which can resolve the remote domain - * involved in the trust. - * - * Generated from protobuf field repeated string target_dns_ip_addresses = 5 [(.google.api.field_behavior) = REQUIRED]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTargetDnsIpAddresses($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->target_dns_ip_addresses = $arr; - - return $this; - } - - /** - * Required. The trust secret used for the handshake with the target domain. This will - * not be stored. - * - * Generated from protobuf field string trust_handshake_secret = 6 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getTrustHandshakeSecret() - { - return $this->trust_handshake_secret; - } - - /** - * Required. The trust secret used for the handshake with the target domain. This will - * not be stored. - * - * Generated from protobuf field string trust_handshake_secret = 6 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setTrustHandshakeSecret($var) - { - GPBUtil::checkString($var, True); - $this->trust_handshake_secret = $var; - - return $this; - } - - /** - * Output only. The time the instance was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The time the instance was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The last update time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The last update time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Output only. The current state of the trust. - * - * Generated from protobuf field .google.cloud.managedidentities.v1.Trust.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The current state of the trust. - * - * Generated from protobuf field .google.cloud.managedidentities.v1.Trust.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\ManagedIdentities\V1\Trust\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. Additional information about the current state of the trust, if available. - * - * Generated from protobuf field string state_description = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getStateDescription() - { - return $this->state_description; - } - - /** - * Output only. Additional information about the current state of the trust, if available. - * - * Generated from protobuf field string state_description = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setStateDescription($var) - { - GPBUtil::checkString($var, True); - $this->state_description = $var; - - return $this; - } - - /** - * Output only. The last heartbeat time when the trust was known to be connected. - * - * Generated from protobuf field .google.protobuf.Timestamp last_trust_heartbeat_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getLastTrustHeartbeatTime() - { - return $this->last_trust_heartbeat_time; - } - - public function hasLastTrustHeartbeatTime() - { - return isset($this->last_trust_heartbeat_time); - } - - public function clearLastTrustHeartbeatTime() - { - unset($this->last_trust_heartbeat_time); - } - - /** - * Output only. The last heartbeat time when the trust was known to be connected. - * - * Generated from protobuf field .google.protobuf.Timestamp last_trust_heartbeat_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setLastTrustHeartbeatTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->last_trust_heartbeat_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/Trust/State.php b/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/Trust/State.php deleted file mode 100644 index 6c45c0cba0f6..000000000000 --- a/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/Trust/State.php +++ /dev/null @@ -1,85 +0,0 @@ -google.cloud.managedidentities.v1.Trust.State - */ -class State -{ - /** - * Not set. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The domain trust is being created. - * - * Generated from protobuf enum CREATING = 1; - */ - const CREATING = 1; - /** - * The domain trust is being updated. - * - * Generated from protobuf enum UPDATING = 2; - */ - const UPDATING = 2; - /** - * The domain trust is being deleted. - * - * Generated from protobuf enum DELETING = 3; - */ - const DELETING = 3; - /** - * The domain trust is connected. - * - * Generated from protobuf enum CONNECTED = 4; - */ - const CONNECTED = 4; - /** - * The domain trust is disconnected. - * - * Generated from protobuf enum DISCONNECTED = 5; - */ - const DISCONNECTED = 5; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::CREATING => 'CREATING', - self::UPDATING => 'UPDATING', - self::DELETING => 'DELETING', - self::CONNECTED => 'CONNECTED', - self::DISCONNECTED => 'DISCONNECTED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\ManagedIdentities\V1\Trust_State::class); - diff --git a/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/Trust/TrustDirection.php b/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/Trust/TrustDirection.php deleted file mode 100644 index 1eedb6a50162..000000000000 --- a/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/Trust/TrustDirection.php +++ /dev/null @@ -1,74 +0,0 @@ -google.cloud.managedidentities.v1.Trust.TrustDirection - */ -class TrustDirection -{ - /** - * Not set. - * - * Generated from protobuf enum TRUST_DIRECTION_UNSPECIFIED = 0; - */ - const TRUST_DIRECTION_UNSPECIFIED = 0; - /** - * The inbound direction represents the trusting side. - * - * Generated from protobuf enum INBOUND = 1; - */ - const INBOUND = 1; - /** - * The outboud direction represents the trusted side. - * - * Generated from protobuf enum OUTBOUND = 2; - */ - const OUTBOUND = 2; - /** - * The bidirectional direction represents the trusted / trusting side. - * - * Generated from protobuf enum BIDIRECTIONAL = 3; - */ - const BIDIRECTIONAL = 3; - - private static $valueToName = [ - self::TRUST_DIRECTION_UNSPECIFIED => 'TRUST_DIRECTION_UNSPECIFIED', - self::INBOUND => 'INBOUND', - self::OUTBOUND => 'OUTBOUND', - self::BIDIRECTIONAL => 'BIDIRECTIONAL', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(TrustDirection::class, \Google\Cloud\ManagedIdentities\V1\Trust_TrustDirection::class); - diff --git a/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/Trust/TrustType.php b/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/Trust/TrustType.php deleted file mode 100644 index 33b99c2807f4..000000000000 --- a/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/Trust/TrustType.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.managedidentities.v1.Trust.TrustType - */ -class TrustType -{ - /** - * Not set. - * - * Generated from protobuf enum TRUST_TYPE_UNSPECIFIED = 0; - */ - const TRUST_TYPE_UNSPECIFIED = 0; - /** - * The forest trust. - * - * Generated from protobuf enum FOREST = 1; - */ - const FOREST = 1; - /** - * The external domain trust. - * - * Generated from protobuf enum EXTERNAL = 2; - */ - const EXTERNAL = 2; - - private static $valueToName = [ - self::TRUST_TYPE_UNSPECIFIED => 'TRUST_TYPE_UNSPECIFIED', - self::FOREST => 'FOREST', - self::EXTERNAL => 'EXTERNAL', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(TrustType::class, \Google\Cloud\ManagedIdentities\V1\Trust_TrustType::class); - diff --git a/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/UpdateDomainRequest.php b/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/UpdateDomainRequest.php deleted file mode 100644 index 35eceef3d024..000000000000 --- a/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/UpdateDomainRequest.php +++ /dev/null @@ -1,167 +0,0 @@ -google.cloud.managedidentities.v1.UpdateDomainRequest - */ -class UpdateDomainRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Mask of fields to update. At least one path must be supplied in this - * field. The elements of the repeated paths field may only include - * fields from [Domain][google.cloud.managedidentities.v1.Domain]: - * * `labels` - * * `locations` - * * `authorized_networks` - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * Required. Domain message with updated fields. Only supported fields specified in - * update_mask are updated. - * - * Generated from protobuf field .google.cloud.managedidentities.v1.Domain domain = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $domain = null; - - /** - * @param \Google\Cloud\ManagedIdentities\V1\Domain $domain Required. Domain message with updated fields. Only supported fields specified in - * update_mask are updated. - * @param \Google\Protobuf\FieldMask $updateMask Required. Mask of fields to update. At least one path must be supplied in this - * field. The elements of the repeated paths field may only include - * fields from [Domain][google.cloud.managedidentities.v1.Domain]: - * * `labels` - * * `locations` - * * `authorized_networks` - * - * @return \Google\Cloud\ManagedIdentities\V1\UpdateDomainRequest - * - * @experimental - */ - public static function build(\Google\Cloud\ManagedIdentities\V1\Domain $domain, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setDomain($domain) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Mask of fields to update. At least one path must be supplied in this - * field. The elements of the repeated paths field may only include - * fields from [Domain][google.cloud.managedidentities.v1.Domain]: - * * `labels` - * * `locations` - * * `authorized_networks` - * @type \Google\Cloud\ManagedIdentities\V1\Domain $domain - * Required. Domain message with updated fields. Only supported fields specified in - * update_mask are updated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Managedidentities\V1\ManagedIdentitiesService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Mask of fields to update. At least one path must be supplied in this - * field. The elements of the repeated paths field may only include - * fields from [Domain][google.cloud.managedidentities.v1.Domain]: - * * `labels` - * * `locations` - * * `authorized_networks` - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Required. Mask of fields to update. At least one path must be supplied in this - * field. The elements of the repeated paths field may only include - * fields from [Domain][google.cloud.managedidentities.v1.Domain]: - * * `labels` - * * `locations` - * * `authorized_networks` - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * Required. Domain message with updated fields. Only supported fields specified in - * update_mask are updated. - * - * Generated from protobuf field .google.cloud.managedidentities.v1.Domain domain = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\ManagedIdentities\V1\Domain|null - */ - public function getDomain() - { - return $this->domain; - } - - public function hasDomain() - { - return isset($this->domain); - } - - public function clearDomain() - { - unset($this->domain); - } - - /** - * Required. Domain message with updated fields. Only supported fields specified in - * update_mask are updated. - * - * Generated from protobuf field .google.cloud.managedidentities.v1.Domain domain = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\ManagedIdentities\V1\Domain $var - * @return $this - */ - public function setDomain($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ManagedIdentities\V1\Domain::class); - $this->domain = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/ValidateTrustRequest.php b/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/ValidateTrustRequest.php deleted file mode 100644 index da322c4a9393..000000000000 --- a/owl-bot-staging/ManagedIdentities/v1/proto/src/Google/Cloud/ManagedIdentities/V1/ValidateTrustRequest.php +++ /dev/null @@ -1,133 +0,0 @@ -google.cloud.managedidentities.v1.ValidateTrustRequest - */ -class ValidateTrustRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource domain name, project name, and location using the form: - * `projects/{project_id}/locations/global/domains/{domain_name}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. The domain trust to validate trust state for. - * - * Generated from protobuf field .google.cloud.managedidentities.v1.Trust trust = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $trust = null; - - /** - * @param string $name Required. The resource domain name, project name, and location using the form: - * `projects/{project_id}/locations/global/domains/{domain_name}` - * Please see {@see ManagedIdentitiesServiceClient::domainName()} for help formatting this field. - * @param \Google\Cloud\ManagedIdentities\V1\Trust $trust Required. The domain trust to validate trust state for. - * - * @return \Google\Cloud\ManagedIdentities\V1\ValidateTrustRequest - * - * @experimental - */ - public static function build(string $name, \Google\Cloud\ManagedIdentities\V1\Trust $trust): self - { - return (new self()) - ->setName($name) - ->setTrust($trust); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource domain name, project name, and location using the form: - * `projects/{project_id}/locations/global/domains/{domain_name}` - * @type \Google\Cloud\ManagedIdentities\V1\Trust $trust - * Required. The domain trust to validate trust state for. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Managedidentities\V1\ManagedIdentitiesService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource domain name, project name, and location using the form: - * `projects/{project_id}/locations/global/domains/{domain_name}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource domain name, project name, and location using the form: - * `projects/{project_id}/locations/global/domains/{domain_name}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. The domain trust to validate trust state for. - * - * Generated from protobuf field .google.cloud.managedidentities.v1.Trust trust = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\ManagedIdentities\V1\Trust|null - */ - public function getTrust() - { - return $this->trust; - } - - public function hasTrust() - { - return isset($this->trust); - } - - public function clearTrust() - { - unset($this->trust); - } - - /** - * Required. The domain trust to validate trust state for. - * - * Generated from protobuf field .google.cloud.managedidentities.v1.Trust trust = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\ManagedIdentities\V1\Trust $var - * @return $this - */ - public function setTrust($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ManagedIdentities\V1\Trust::class); - $this->trust = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ManagedIdentities/v1/samples/V1/ManagedIdentitiesServiceClient/attach_trust.php b/owl-bot-staging/ManagedIdentities/v1/samples/V1/ManagedIdentitiesServiceClient/attach_trust.php deleted file mode 100644 index 6478dfaf4a80..000000000000 --- a/owl-bot-staging/ManagedIdentities/v1/samples/V1/ManagedIdentitiesServiceClient/attach_trust.php +++ /dev/null @@ -1,122 +0,0 @@ -setTargetDomainName($trustTargetDomainName) - ->setTrustType($trustTrustType) - ->setTrustDirection($trustTrustDirection) - ->setTargetDnsIpAddresses($trustTargetDnsIpAddresses) - ->setTrustHandshakeSecret($trustTrustHandshakeSecret); - $request = (new AttachTrustRequest()) - ->setName($formattedName) - ->setTrust($trust); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $managedIdentitiesServiceClient->attachTrust($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Domain $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = ManagedIdentitiesServiceClient::domainName('[PROJECT]', '[LOCATION]', '[DOMAIN]'); - $trustTargetDomainName = '[TARGET_DOMAIN_NAME]'; - $trustTrustType = TrustType::TRUST_TYPE_UNSPECIFIED; - $trustTrustDirection = TrustDirection::TRUST_DIRECTION_UNSPECIFIED; - $trustTargetDnsIpAddressesElement = '[TARGET_DNS_IP_ADDRESSES]'; - $trustTrustHandshakeSecret = '[TRUST_HANDSHAKE_SECRET]'; - - attach_trust_sample( - $formattedName, - $trustTargetDomainName, - $trustTrustType, - $trustTrustDirection, - $trustTargetDnsIpAddressesElement, - $trustTrustHandshakeSecret - ); -} -// [END managedidentities_v1_generated_ManagedIdentitiesService_AttachTrust_sync] diff --git a/owl-bot-staging/ManagedIdentities/v1/samples/V1/ManagedIdentitiesServiceClient/create_microsoft_ad_domain.php b/owl-bot-staging/ManagedIdentities/v1/samples/V1/ManagedIdentitiesServiceClient/create_microsoft_ad_domain.php deleted file mode 100644 index 4e74f2a1db34..000000000000 --- a/owl-bot-staging/ManagedIdentities/v1/samples/V1/ManagedIdentitiesServiceClient/create_microsoft_ad_domain.php +++ /dev/null @@ -1,129 +0,0 @@ -setName($domainName) - ->setReservedIpRange($domainReservedIpRange) - ->setLocations($domainLocations); - $request = (new CreateMicrosoftAdDomainRequest()) - ->setParent($formattedParent) - ->setDomainName($domainName) - ->setDomain($domain); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $managedIdentitiesServiceClient->createMicrosoftAdDomain($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Domain $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = ManagedIdentitiesServiceClient::locationName('[PROJECT]', '[LOCATION]'); - $domainName = '[DOMAIN_NAME]'; - $domainName = '[NAME]'; - $domainReservedIpRange = '[RESERVED_IP_RANGE]'; - $domainLocationsElement = '[LOCATIONS]'; - - create_microsoft_ad_domain_sample( - $formattedParent, - $domainName, - $domainName, - $domainReservedIpRange, - $domainLocationsElement - ); -} -// [END managedidentities_v1_generated_ManagedIdentitiesService_CreateMicrosoftAdDomain_sync] diff --git a/owl-bot-staging/ManagedIdentities/v1/samples/V1/ManagedIdentitiesServiceClient/delete_domain.php b/owl-bot-staging/ManagedIdentities/v1/samples/V1/ManagedIdentitiesServiceClient/delete_domain.php deleted file mode 100644 index 20c8a8a12a1b..000000000000 --- a/owl-bot-staging/ManagedIdentities/v1/samples/V1/ManagedIdentitiesServiceClient/delete_domain.php +++ /dev/null @@ -1,81 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $managedIdentitiesServiceClient->deleteDomain($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = ManagedIdentitiesServiceClient::domainName('[PROJECT]', '[LOCATION]', '[DOMAIN]'); - - delete_domain_sample($formattedName); -} -// [END managedidentities_v1_generated_ManagedIdentitiesService_DeleteDomain_sync] diff --git a/owl-bot-staging/ManagedIdentities/v1/samples/V1/ManagedIdentitiesServiceClient/detach_trust.php b/owl-bot-staging/ManagedIdentities/v1/samples/V1/ManagedIdentitiesServiceClient/detach_trust.php deleted file mode 100644 index e287c2ee6b28..000000000000 --- a/owl-bot-staging/ManagedIdentities/v1/samples/V1/ManagedIdentitiesServiceClient/detach_trust.php +++ /dev/null @@ -1,122 +0,0 @@ -setTargetDomainName($trustTargetDomainName) - ->setTrustType($trustTrustType) - ->setTrustDirection($trustTrustDirection) - ->setTargetDnsIpAddresses($trustTargetDnsIpAddresses) - ->setTrustHandshakeSecret($trustTrustHandshakeSecret); - $request = (new DetachTrustRequest()) - ->setName($formattedName) - ->setTrust($trust); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $managedIdentitiesServiceClient->detachTrust($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Domain $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = ManagedIdentitiesServiceClient::domainName('[PROJECT]', '[LOCATION]', '[DOMAIN]'); - $trustTargetDomainName = '[TARGET_DOMAIN_NAME]'; - $trustTrustType = TrustType::TRUST_TYPE_UNSPECIFIED; - $trustTrustDirection = TrustDirection::TRUST_DIRECTION_UNSPECIFIED; - $trustTargetDnsIpAddressesElement = '[TARGET_DNS_IP_ADDRESSES]'; - $trustTrustHandshakeSecret = '[TRUST_HANDSHAKE_SECRET]'; - - detach_trust_sample( - $formattedName, - $trustTargetDomainName, - $trustTrustType, - $trustTrustDirection, - $trustTargetDnsIpAddressesElement, - $trustTrustHandshakeSecret - ); -} -// [END managedidentities_v1_generated_ManagedIdentitiesService_DetachTrust_sync] diff --git a/owl-bot-staging/ManagedIdentities/v1/samples/V1/ManagedIdentitiesServiceClient/get_domain.php b/owl-bot-staging/ManagedIdentities/v1/samples/V1/ManagedIdentitiesServiceClient/get_domain.php deleted file mode 100644 index 7a6b49fa1482..000000000000 --- a/owl-bot-staging/ManagedIdentities/v1/samples/V1/ManagedIdentitiesServiceClient/get_domain.php +++ /dev/null @@ -1,72 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Domain $response */ - $response = $managedIdentitiesServiceClient->getDomain($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = ManagedIdentitiesServiceClient::domainName('[PROJECT]', '[LOCATION]', '[DOMAIN]'); - - get_domain_sample($formattedName); -} -// [END managedidentities_v1_generated_ManagedIdentitiesService_GetDomain_sync] diff --git a/owl-bot-staging/ManagedIdentities/v1/samples/V1/ManagedIdentitiesServiceClient/list_domains.php b/owl-bot-staging/ManagedIdentities/v1/samples/V1/ManagedIdentitiesServiceClient/list_domains.php deleted file mode 100644 index 71f27124492a..000000000000 --- a/owl-bot-staging/ManagedIdentities/v1/samples/V1/ManagedIdentitiesServiceClient/list_domains.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $managedIdentitiesServiceClient->listDomains($request); - - /** @var Domain $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = ManagedIdentitiesServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - list_domains_sample($formattedParent); -} -// [END managedidentities_v1_generated_ManagedIdentitiesService_ListDomains_sync] diff --git a/owl-bot-staging/ManagedIdentities/v1/samples/V1/ManagedIdentitiesServiceClient/reconfigure_trust.php b/owl-bot-staging/ManagedIdentities/v1/samples/V1/ManagedIdentitiesServiceClient/reconfigure_trust.php deleted file mode 100644 index fc3405ce881b..000000000000 --- a/owl-bot-staging/ManagedIdentities/v1/samples/V1/ManagedIdentitiesServiceClient/reconfigure_trust.php +++ /dev/null @@ -1,96 +0,0 @@ -setName($formattedName) - ->setTargetDomainName($targetDomainName) - ->setTargetDnsIpAddresses($targetDnsIpAddresses); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $managedIdentitiesServiceClient->reconfigureTrust($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Domain $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = ManagedIdentitiesServiceClient::domainName('[PROJECT]', '[LOCATION]', '[DOMAIN]'); - $targetDomainName = '[TARGET_DOMAIN_NAME]'; - $targetDnsIpAddressesElement = '[TARGET_DNS_IP_ADDRESSES]'; - - reconfigure_trust_sample($formattedName, $targetDomainName, $targetDnsIpAddressesElement); -} -// [END managedidentities_v1_generated_ManagedIdentitiesService_ReconfigureTrust_sync] diff --git a/owl-bot-staging/ManagedIdentities/v1/samples/V1/ManagedIdentitiesServiceClient/reset_admin_password.php b/owl-bot-staging/ManagedIdentities/v1/samples/V1/ManagedIdentitiesServiceClient/reset_admin_password.php deleted file mode 100644 index 6dcf28503934..000000000000 --- a/owl-bot-staging/ManagedIdentities/v1/samples/V1/ManagedIdentitiesServiceClient/reset_admin_password.php +++ /dev/null @@ -1,72 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var ResetAdminPasswordResponse $response */ - $response = $managedIdentitiesServiceClient->resetAdminPassword($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = ManagedIdentitiesServiceClient::domainName('[PROJECT]', '[LOCATION]', '[DOMAIN]'); - - reset_admin_password_sample($formattedName); -} -// [END managedidentities_v1_generated_ManagedIdentitiesService_ResetAdminPassword_sync] diff --git a/owl-bot-staging/ManagedIdentities/v1/samples/V1/ManagedIdentitiesServiceClient/update_domain.php b/owl-bot-staging/ManagedIdentities/v1/samples/V1/ManagedIdentitiesServiceClient/update_domain.php deleted file mode 100644 index 94032efa618e..000000000000 --- a/owl-bot-staging/ManagedIdentities/v1/samples/V1/ManagedIdentitiesServiceClient/update_domain.php +++ /dev/null @@ -1,105 +0,0 @@ -setName($domainName) - ->setReservedIpRange($domainReservedIpRange) - ->setLocations($domainLocations); - $request = (new UpdateDomainRequest()) - ->setUpdateMask($updateMask) - ->setDomain($domain); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $managedIdentitiesServiceClient->updateDomain($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Domain $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $domainName = '[NAME]'; - $domainReservedIpRange = '[RESERVED_IP_RANGE]'; - $domainLocationsElement = '[LOCATIONS]'; - - update_domain_sample($domainName, $domainReservedIpRange, $domainLocationsElement); -} -// [END managedidentities_v1_generated_ManagedIdentitiesService_UpdateDomain_sync] diff --git a/owl-bot-staging/ManagedIdentities/v1/samples/V1/ManagedIdentitiesServiceClient/validate_trust.php b/owl-bot-staging/ManagedIdentities/v1/samples/V1/ManagedIdentitiesServiceClient/validate_trust.php deleted file mode 100644 index da23c9ce0f8b..000000000000 --- a/owl-bot-staging/ManagedIdentities/v1/samples/V1/ManagedIdentitiesServiceClient/validate_trust.php +++ /dev/null @@ -1,123 +0,0 @@ -setTargetDomainName($trustTargetDomainName) - ->setTrustType($trustTrustType) - ->setTrustDirection($trustTrustDirection) - ->setTargetDnsIpAddresses($trustTargetDnsIpAddresses) - ->setTrustHandshakeSecret($trustTrustHandshakeSecret); - $request = (new ValidateTrustRequest()) - ->setName($formattedName) - ->setTrust($trust); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $managedIdentitiesServiceClient->validateTrust($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Domain $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = ManagedIdentitiesServiceClient::domainName('[PROJECT]', '[LOCATION]', '[DOMAIN]'); - $trustTargetDomainName = '[TARGET_DOMAIN_NAME]'; - $trustTrustType = TrustType::TRUST_TYPE_UNSPECIFIED; - $trustTrustDirection = TrustDirection::TRUST_DIRECTION_UNSPECIFIED; - $trustTargetDnsIpAddressesElement = '[TARGET_DNS_IP_ADDRESSES]'; - $trustTrustHandshakeSecret = '[TRUST_HANDSHAKE_SECRET]'; - - validate_trust_sample( - $formattedName, - $trustTargetDomainName, - $trustTrustType, - $trustTrustDirection, - $trustTargetDnsIpAddressesElement, - $trustTrustHandshakeSecret - ); -} -// [END managedidentities_v1_generated_ManagedIdentitiesService_ValidateTrust_sync] diff --git a/owl-bot-staging/ManagedIdentities/v1/src/V1/Client/ManagedIdentitiesServiceClient.php b/owl-bot-staging/ManagedIdentities/v1/src/V1/Client/ManagedIdentitiesServiceClient.php deleted file mode 100644 index 3548e741d59f..000000000000 --- a/owl-bot-staging/ManagedIdentities/v1/src/V1/Client/ManagedIdentitiesServiceClient.php +++ /dev/null @@ -1,607 +0,0 @@ - attachTrustAsync(AttachTrustRequest $request, array $optionalArgs = []) - * @method PromiseInterface createMicrosoftAdDomainAsync(CreateMicrosoftAdDomainRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteDomainAsync(DeleteDomainRequest $request, array $optionalArgs = []) - * @method PromiseInterface detachTrustAsync(DetachTrustRequest $request, array $optionalArgs = []) - * @method PromiseInterface getDomainAsync(GetDomainRequest $request, array $optionalArgs = []) - * @method PromiseInterface listDomainsAsync(ListDomainsRequest $request, array $optionalArgs = []) - * @method PromiseInterface reconfigureTrustAsync(ReconfigureTrustRequest $request, array $optionalArgs = []) - * @method PromiseInterface resetAdminPasswordAsync(ResetAdminPasswordRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateDomainAsync(UpdateDomainRequest $request, array $optionalArgs = []) - * @method PromiseInterface validateTrustAsync(ValidateTrustRequest $request, array $optionalArgs = []) - */ -final class ManagedIdentitiesServiceClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.managedidentities.v1.ManagedIdentitiesService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'managedidentities.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'managedidentities.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/managed_identities_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/managed_identities_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/managed_identities_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/managed_identities_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Create the default operation client for the service. - * - * @param array $options ClientOptions for the client. - * - * @return OperationsClient - */ - private function createOperationsClient(array $options) - { - // Unset client-specific configuration options - unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); - - if (isset($options['operationsClient'])) { - return $options['operationsClient']; - } - - return new OperationsClient($options); - } - - /** - * Formats a string containing the fully-qualified path to represent a domain - * resource. - * - * @param string $project - * @param string $location - * @param string $domain - * - * @return string The formatted domain resource. - */ - public static function domainName(string $project, string $location, string $domain): string - { - return self::getPathTemplate('domain')->render([ - 'project' => $project, - 'location' => $location, - 'domain' => $domain, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a location - * resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted location resource. - */ - public static function locationName(string $project, string $location): string - { - return self::getPathTemplate('location')->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - domain: projects/{project}/locations/{location}/domains/{domain} - * - location: projects/{project}/locations/{location} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param ?string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, ?string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'managedidentities.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Adds an AD trust to a domain. - * - * The async variant is {@see ManagedIdentitiesServiceClient::attachTrustAsync()} . - * - * @example samples/V1/ManagedIdentitiesServiceClient/attach_trust.php - * - * @param AttachTrustRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function attachTrust(AttachTrustRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('AttachTrust', $request, $callOptions)->wait(); - } - - /** - * Creates a Microsoft AD domain. - * - * The async variant is - * {@see ManagedIdentitiesServiceClient::createMicrosoftAdDomainAsync()} . - * - * @example samples/V1/ManagedIdentitiesServiceClient/create_microsoft_ad_domain.php - * - * @param CreateMicrosoftAdDomainRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createMicrosoftAdDomain(CreateMicrosoftAdDomainRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateMicrosoftAdDomain', $request, $callOptions)->wait(); - } - - /** - * Deletes a domain. - * - * The async variant is {@see ManagedIdentitiesServiceClient::deleteDomainAsync()} - * . - * - * @example samples/V1/ManagedIdentitiesServiceClient/delete_domain.php - * - * @param DeleteDomainRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteDomain(DeleteDomainRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteDomain', $request, $callOptions)->wait(); - } - - /** - * Removes an AD trust. - * - * The async variant is {@see ManagedIdentitiesServiceClient::detachTrustAsync()} . - * - * @example samples/V1/ManagedIdentitiesServiceClient/detach_trust.php - * - * @param DetachTrustRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function detachTrust(DetachTrustRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DetachTrust', $request, $callOptions)->wait(); - } - - /** - * Gets information about a domain. - * - * The async variant is {@see ManagedIdentitiesServiceClient::getDomainAsync()} . - * - * @example samples/V1/ManagedIdentitiesServiceClient/get_domain.php - * - * @param GetDomainRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Domain - * - * @throws ApiException Thrown if the API call fails. - */ - public function getDomain(GetDomainRequest $request, array $callOptions = []): Domain - { - return $this->startApiCall('GetDomain', $request, $callOptions)->wait(); - } - - /** - * Lists domains in a project. - * - * The async variant is {@see ManagedIdentitiesServiceClient::listDomainsAsync()} . - * - * @example samples/V1/ManagedIdentitiesServiceClient/list_domains.php - * - * @param ListDomainsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listDomains(ListDomainsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListDomains', $request, $callOptions); - } - - /** - * Updates the DNS conditional forwarder. - * - * The async variant is - * {@see ManagedIdentitiesServiceClient::reconfigureTrustAsync()} . - * - * @example samples/V1/ManagedIdentitiesServiceClient/reconfigure_trust.php - * - * @param ReconfigureTrustRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function reconfigureTrust(ReconfigureTrustRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('ReconfigureTrust', $request, $callOptions)->wait(); - } - - /** - * Resets a domain's administrator password. - * - * The async variant is - * {@see ManagedIdentitiesServiceClient::resetAdminPasswordAsync()} . - * - * @example samples/V1/ManagedIdentitiesServiceClient/reset_admin_password.php - * - * @param ResetAdminPasswordRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return ResetAdminPasswordResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function resetAdminPassword(ResetAdminPasswordRequest $request, array $callOptions = []): ResetAdminPasswordResponse - { - return $this->startApiCall('ResetAdminPassword', $request, $callOptions)->wait(); - } - - /** - * Updates the metadata and configuration of a domain. - * - * The async variant is {@see ManagedIdentitiesServiceClient::updateDomainAsync()} - * . - * - * @example samples/V1/ManagedIdentitiesServiceClient/update_domain.php - * - * @param UpdateDomainRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateDomain(UpdateDomainRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateDomain', $request, $callOptions)->wait(); - } - - /** - * Validates a trust state, that the target domain is reachable, and that the - * target domain is able to accept incoming trust requests. - * - * The async variant is {@see ManagedIdentitiesServiceClient::validateTrustAsync()} - * . - * - * @example samples/V1/ManagedIdentitiesServiceClient/validate_trust.php - * - * @param ValidateTrustRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function validateTrust(ValidateTrustRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('ValidateTrust', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/ManagedIdentities/v1/src/V1/gapic_metadata.json b/owl-bot-staging/ManagedIdentities/v1/src/V1/gapic_metadata.json deleted file mode 100644 index ceace87a4fb2..000000000000 --- a/owl-bot-staging/ManagedIdentities/v1/src/V1/gapic_metadata.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.managedidentities.v1", - "libraryPackage": "Google\\Cloud\\ManagedIdentities\\V1", - "services": { - "ManagedIdentitiesService": { - "clients": { - "grpc": { - "libraryClient": "ManagedIdentitiesServiceGapicClient", - "rpcs": { - "AttachTrust": { - "methods": [ - "attachTrust" - ] - }, - "CreateMicrosoftAdDomain": { - "methods": [ - "createMicrosoftAdDomain" - ] - }, - "DeleteDomain": { - "methods": [ - "deleteDomain" - ] - }, - "DetachTrust": { - "methods": [ - "detachTrust" - ] - }, - "GetDomain": { - "methods": [ - "getDomain" - ] - }, - "ListDomains": { - "methods": [ - "listDomains" - ] - }, - "ReconfigureTrust": { - "methods": [ - "reconfigureTrust" - ] - }, - "ResetAdminPassword": { - "methods": [ - "resetAdminPassword" - ] - }, - "UpdateDomain": { - "methods": [ - "updateDomain" - ] - }, - "ValidateTrust": { - "methods": [ - "validateTrust" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/ManagedIdentities/v1/src/V1/resources/managed_identities_service_client_config.json b/owl-bot-staging/ManagedIdentities/v1/src/V1/resources/managed_identities_service_client_config.json deleted file mode 100644 index 6dc854819889..000000000000 --- a/owl-bot-staging/ManagedIdentities/v1/src/V1/resources/managed_identities_service_client_config.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "interfaces": { - "google.cloud.managedidentities.v1.ManagedIdentitiesService": { - "retry_codes": { - "no_retry_codes": [], - "no_retry_1_codes": [] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "no_retry_1_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": { - "AttachTrust": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateMicrosoftAdDomain": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteDomain": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DetachTrust": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetDomain": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListDomains": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ReconfigureTrust": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ResetAdminPassword": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateDomain": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ValidateTrust": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/ManagedIdentities/v1/src/V1/resources/managed_identities_service_descriptor_config.php b/owl-bot-staging/ManagedIdentities/v1/src/V1/resources/managed_identities_service_descriptor_config.php deleted file mode 100644 index f5f9c7931585..000000000000 --- a/owl-bot-staging/ManagedIdentities/v1/src/V1/resources/managed_identities_service_descriptor_config.php +++ /dev/null @@ -1,210 +0,0 @@ - [ - 'google.cloud.managedidentities.v1.ManagedIdentitiesService' => [ - 'AttachTrust' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\ManagedIdentities\V1\Domain', - 'metadataReturnType' => '\Google\Cloud\ManagedIdentities\V1\OpMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'CreateMicrosoftAdDomain' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\ManagedIdentities\V1\Domain', - 'metadataReturnType' => '\Google\Cloud\ManagedIdentities\V1\OpMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteDomain' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\ManagedIdentities\V1\OpMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DetachTrust' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\ManagedIdentities\V1\Domain', - 'metadataReturnType' => '\Google\Cloud\ManagedIdentities\V1\OpMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ReconfigureTrust' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\ManagedIdentities\V1\Domain', - 'metadataReturnType' => '\Google\Cloud\ManagedIdentities\V1\OpMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateDomain' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\ManagedIdentities\V1\Domain', - 'metadataReturnType' => '\Google\Cloud\ManagedIdentities\V1\OpMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'domain.name', - 'fieldAccessors' => [ - 'getDomain', - 'getName', - ], - ], - ], - ], - 'ValidateTrust' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\ManagedIdentities\V1\Domain', - 'metadataReturnType' => '\Google\Cloud\ManagedIdentities\V1\OpMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetDomain' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\ManagedIdentities\V1\Domain', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListDomains' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getDomains', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\ManagedIdentities\V1\ListDomainsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ResetAdminPassword' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\ManagedIdentities\V1\ResetAdminPasswordResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'templateMap' => [ - 'domain' => 'projects/{project}/locations/{location}/domains/{domain}', - 'location' => 'projects/{project}/locations/{location}', - ], - ], - ], -]; diff --git a/owl-bot-staging/ManagedIdentities/v1/src/V1/resources/managed_identities_service_rest_client_config.php b/owl-bot-staging/ManagedIdentities/v1/src/V1/resources/managed_identities_service_rest_client_config.php deleted file mode 100644 index 5a26dbcf0866..000000000000 --- a/owl-bot-staging/ManagedIdentities/v1/src/V1/resources/managed_identities_service_rest_client_config.php +++ /dev/null @@ -1,295 +0,0 @@ - [ - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.cloud.managedidentities.v1.ManagedIdentitiesService' => [ - 'AttachTrust' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/global/domains/*}:attachTrust', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'CreateMicrosoftAdDomain' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/global}/domains', - 'body' => 'domain', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'domain_name', - ], - ], - 'DeleteDomain' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/global/domains/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DetachTrust' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/global/domains/*}:detachTrust', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetDomain' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/global/domains/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListDomains' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/global}/domains', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ReconfigureTrust' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/global/domains/*}:reconfigureTrust', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ResetAdminPassword' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/global/domains/*}:resetAdminPassword', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'UpdateDomain' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{domain.name=projects/*/locations/global/domains/*}', - 'body' => 'domain', - 'placeholders' => [ - 'domain.name' => [ - 'getters' => [ - 'getDomain', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'ValidateTrust' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/global/domains/*}:validateTrust', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.iam.v1.IAMPolicy' => [ - 'GetIamPolicy' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/global/domains/*}:getIamPolicy', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/global/peerings/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/global/domains/*/backups/*}:getIamPolicy', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/global/domains/*}:setIamPolicy', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/global/peerings/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/global/domains/*/backups/*}:setIamPolicy', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/global/domains/*}:testIamPermissions', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/global/peerings/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/global/domains/*/backups/*}:testIamPermissions', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/global/operations/*}:cancel', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/global/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/global/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/global/operations}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/ManagedIdentities/v1/tests/Unit/V1/Client/ManagedIdentitiesServiceClientTest.php b/owl-bot-staging/ManagedIdentities/v1/tests/Unit/V1/Client/ManagedIdentitiesServiceClientTest.php deleted file mode 100644 index db9009a4d3f0..000000000000 --- a/owl-bot-staging/ManagedIdentities/v1/tests/Unit/V1/Client/ManagedIdentitiesServiceClientTest.php +++ /dev/null @@ -1,1417 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return ManagedIdentitiesServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new ManagedIdentitiesServiceClient($options); - } - - /** @test */ - public function attachTrustTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/attachTrustTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $reservedIpRange = 'reservedIpRange-1082940580'; - $admin = 'admin92668751'; - $fqdn = 'fqdn3150485'; - $statusMessage = 'statusMessage-239442758'; - $expectedResponse = new Domain(); - $expectedResponse->setName($name2); - $expectedResponse->setReservedIpRange($reservedIpRange); - $expectedResponse->setAdmin($admin); - $expectedResponse->setFqdn($fqdn); - $expectedResponse->setStatusMessage($statusMessage); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/attachTrustTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->domainName('[PROJECT]', '[LOCATION]', '[DOMAIN]'); - $trust = new Trust(); - $trustTargetDomainName = 'trustTargetDomainName-39985064'; - $trust->setTargetDomainName($trustTargetDomainName); - $trustTrustType = TrustType::TRUST_TYPE_UNSPECIFIED; - $trust->setTrustType($trustTrustType); - $trustTrustDirection = TrustDirection::TRUST_DIRECTION_UNSPECIFIED; - $trust->setTrustDirection($trustTrustDirection); - $trustTargetDnsIpAddresses = []; - $trust->setTargetDnsIpAddresses($trustTargetDnsIpAddresses); - $trustTrustHandshakeSecret = 'trustTrustHandshakeSecret-1896647033'; - $trust->setTrustHandshakeSecret($trustTrustHandshakeSecret); - $request = (new AttachTrustRequest()) - ->setName($formattedName) - ->setTrust($trust); - $response = $gapicClient->attachTrust($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.managedidentities.v1.ManagedIdentitiesService/AttachTrust', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualApiRequestObject->getTrust(); - $this->assertProtobufEquals($trust, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/attachTrustTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function attachTrustExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/attachTrustTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->domainName('[PROJECT]', '[LOCATION]', '[DOMAIN]'); - $trust = new Trust(); - $trustTargetDomainName = 'trustTargetDomainName-39985064'; - $trust->setTargetDomainName($trustTargetDomainName); - $trustTrustType = TrustType::TRUST_TYPE_UNSPECIFIED; - $trust->setTrustType($trustTrustType); - $trustTrustDirection = TrustDirection::TRUST_DIRECTION_UNSPECIFIED; - $trust->setTrustDirection($trustTrustDirection); - $trustTargetDnsIpAddresses = []; - $trust->setTargetDnsIpAddresses($trustTargetDnsIpAddresses); - $trustTrustHandshakeSecret = 'trustTrustHandshakeSecret-1896647033'; - $trust->setTrustHandshakeSecret($trustTrustHandshakeSecret); - $request = (new AttachTrustRequest()) - ->setName($formattedName) - ->setTrust($trust); - $response = $gapicClient->attachTrust($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/attachTrustTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createMicrosoftAdDomainTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createMicrosoftAdDomainTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $reservedIpRange = 'reservedIpRange-1082940580'; - $admin = 'admin92668751'; - $fqdn = 'fqdn3150485'; - $statusMessage = 'statusMessage-239442758'; - $expectedResponse = new Domain(); - $expectedResponse->setName($name); - $expectedResponse->setReservedIpRange($reservedIpRange); - $expectedResponse->setAdmin($admin); - $expectedResponse->setFqdn($fqdn); - $expectedResponse->setStatusMessage($statusMessage); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createMicrosoftAdDomainTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $domainName = 'domainName104118566'; - $domain = new Domain(); - $domainName = 'domainName-1244085905'; - $domain->setName($domainName); - $domainReservedIpRange = 'domainReservedIpRange1357926058'; - $domain->setReservedIpRange($domainReservedIpRange); - $domainLocations = []; - $domain->setLocations($domainLocations); - $request = (new CreateMicrosoftAdDomainRequest()) - ->setParent($formattedParent) - ->setDomainName($domainName) - ->setDomain($domain); - $response = $gapicClient->createMicrosoftAdDomain($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.managedidentities.v1.ManagedIdentitiesService/CreateMicrosoftAdDomain', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getDomainName(); - $this->assertProtobufEquals($domainName, $actualValue); - $actualValue = $actualApiRequestObject->getDomain(); - $this->assertProtobufEquals($domain, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createMicrosoftAdDomainTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createMicrosoftAdDomainExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createMicrosoftAdDomainTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $domainName = 'domainName104118566'; - $domain = new Domain(); - $domainName = 'domainName-1244085905'; - $domain->setName($domainName); - $domainReservedIpRange = 'domainReservedIpRange1357926058'; - $domain->setReservedIpRange($domainReservedIpRange); - $domainLocations = []; - $domain->setLocations($domainLocations); - $request = (new CreateMicrosoftAdDomainRequest()) - ->setParent($formattedParent) - ->setDomainName($domainName) - ->setDomain($domain); - $response = $gapicClient->createMicrosoftAdDomain($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createMicrosoftAdDomainTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteDomainTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteDomainTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteDomainTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->domainName('[PROJECT]', '[LOCATION]', '[DOMAIN]'); - $request = (new DeleteDomainRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteDomain($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.managedidentities.v1.ManagedIdentitiesService/DeleteDomain', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteDomainTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteDomainExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteDomainTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->domainName('[PROJECT]', '[LOCATION]', '[DOMAIN]'); - $request = (new DeleteDomainRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteDomain($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteDomainTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function detachTrustTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/detachTrustTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $reservedIpRange = 'reservedIpRange-1082940580'; - $admin = 'admin92668751'; - $fqdn = 'fqdn3150485'; - $statusMessage = 'statusMessage-239442758'; - $expectedResponse = new Domain(); - $expectedResponse->setName($name2); - $expectedResponse->setReservedIpRange($reservedIpRange); - $expectedResponse->setAdmin($admin); - $expectedResponse->setFqdn($fqdn); - $expectedResponse->setStatusMessage($statusMessage); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/detachTrustTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->domainName('[PROJECT]', '[LOCATION]', '[DOMAIN]'); - $trust = new Trust(); - $trustTargetDomainName = 'trustTargetDomainName-39985064'; - $trust->setTargetDomainName($trustTargetDomainName); - $trustTrustType = TrustType::TRUST_TYPE_UNSPECIFIED; - $trust->setTrustType($trustTrustType); - $trustTrustDirection = TrustDirection::TRUST_DIRECTION_UNSPECIFIED; - $trust->setTrustDirection($trustTrustDirection); - $trustTargetDnsIpAddresses = []; - $trust->setTargetDnsIpAddresses($trustTargetDnsIpAddresses); - $trustTrustHandshakeSecret = 'trustTrustHandshakeSecret-1896647033'; - $trust->setTrustHandshakeSecret($trustTrustHandshakeSecret); - $request = (new DetachTrustRequest()) - ->setName($formattedName) - ->setTrust($trust); - $response = $gapicClient->detachTrust($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.managedidentities.v1.ManagedIdentitiesService/DetachTrust', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualApiRequestObject->getTrust(); - $this->assertProtobufEquals($trust, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/detachTrustTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function detachTrustExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/detachTrustTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->domainName('[PROJECT]', '[LOCATION]', '[DOMAIN]'); - $trust = new Trust(); - $trustTargetDomainName = 'trustTargetDomainName-39985064'; - $trust->setTargetDomainName($trustTargetDomainName); - $trustTrustType = TrustType::TRUST_TYPE_UNSPECIFIED; - $trust->setTrustType($trustTrustType); - $trustTrustDirection = TrustDirection::TRUST_DIRECTION_UNSPECIFIED; - $trust->setTrustDirection($trustTrustDirection); - $trustTargetDnsIpAddresses = []; - $trust->setTargetDnsIpAddresses($trustTargetDnsIpAddresses); - $trustTrustHandshakeSecret = 'trustTrustHandshakeSecret-1896647033'; - $trust->setTrustHandshakeSecret($trustTrustHandshakeSecret); - $request = (new DetachTrustRequest()) - ->setName($formattedName) - ->setTrust($trust); - $response = $gapicClient->detachTrust($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/detachTrustTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getDomainTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $reservedIpRange = 'reservedIpRange-1082940580'; - $admin = 'admin92668751'; - $fqdn = 'fqdn3150485'; - $statusMessage = 'statusMessage-239442758'; - $expectedResponse = new Domain(); - $expectedResponse->setName($name2); - $expectedResponse->setReservedIpRange($reservedIpRange); - $expectedResponse->setAdmin($admin); - $expectedResponse->setFqdn($fqdn); - $expectedResponse->setStatusMessage($statusMessage); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->domainName('[PROJECT]', '[LOCATION]', '[DOMAIN]'); - $request = (new GetDomainRequest()) - ->setName($formattedName); - $response = $gapicClient->getDomain($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.managedidentities.v1.ManagedIdentitiesService/GetDomain', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDomainExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->domainName('[PROJECT]', '[LOCATION]', '[DOMAIN]'); - $request = (new GetDomainRequest()) - ->setName($formattedName); - try { - $gapicClient->getDomain($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDomainsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $domainsElement = new Domain(); - $domains = [ - $domainsElement, - ]; - $expectedResponse = new ListDomainsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setDomains($domains); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListDomainsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listDomains($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getDomains()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.managedidentities.v1.ManagedIdentitiesService/ListDomains', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDomainsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListDomainsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listDomains($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function reconfigureTrustTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/reconfigureTrustTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $reservedIpRange = 'reservedIpRange-1082940580'; - $admin = 'admin92668751'; - $fqdn = 'fqdn3150485'; - $statusMessage = 'statusMessage-239442758'; - $expectedResponse = new Domain(); - $expectedResponse->setName($name2); - $expectedResponse->setReservedIpRange($reservedIpRange); - $expectedResponse->setAdmin($admin); - $expectedResponse->setFqdn($fqdn); - $expectedResponse->setStatusMessage($statusMessage); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/reconfigureTrustTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->domainName('[PROJECT]', '[LOCATION]', '[DOMAIN]'); - $targetDomainName = 'targetDomainName1303689080'; - $targetDnsIpAddresses = []; - $request = (new ReconfigureTrustRequest()) - ->setName($formattedName) - ->setTargetDomainName($targetDomainName) - ->setTargetDnsIpAddresses($targetDnsIpAddresses); - $response = $gapicClient->reconfigureTrust($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.managedidentities.v1.ManagedIdentitiesService/ReconfigureTrust', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualApiRequestObject->getTargetDomainName(); - $this->assertProtobufEquals($targetDomainName, $actualValue); - $actualValue = $actualApiRequestObject->getTargetDnsIpAddresses(); - $this->assertProtobufEquals($targetDnsIpAddresses, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/reconfigureTrustTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function reconfigureTrustExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/reconfigureTrustTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->domainName('[PROJECT]', '[LOCATION]', '[DOMAIN]'); - $targetDomainName = 'targetDomainName1303689080'; - $targetDnsIpAddresses = []; - $request = (new ReconfigureTrustRequest()) - ->setName($formattedName) - ->setTargetDomainName($targetDomainName) - ->setTargetDnsIpAddresses($targetDnsIpAddresses); - $response = $gapicClient->reconfigureTrust($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/reconfigureTrustTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function resetAdminPasswordTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $password = 'password1216985755'; - $expectedResponse = new ResetAdminPasswordResponse(); - $expectedResponse->setPassword($password); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->domainName('[PROJECT]', '[LOCATION]', '[DOMAIN]'); - $request = (new ResetAdminPasswordRequest()) - ->setName($formattedName); - $response = $gapicClient->resetAdminPassword($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.managedidentities.v1.ManagedIdentitiesService/ResetAdminPassword', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function resetAdminPasswordExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->domainName('[PROJECT]', '[LOCATION]', '[DOMAIN]'); - $request = (new ResetAdminPasswordRequest()) - ->setName($formattedName); - try { - $gapicClient->resetAdminPassword($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateDomainTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateDomainTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $reservedIpRange = 'reservedIpRange-1082940580'; - $admin = 'admin92668751'; - $fqdn = 'fqdn3150485'; - $statusMessage = 'statusMessage-239442758'; - $expectedResponse = new Domain(); - $expectedResponse->setName($name); - $expectedResponse->setReservedIpRange($reservedIpRange); - $expectedResponse->setAdmin($admin); - $expectedResponse->setFqdn($fqdn); - $expectedResponse->setStatusMessage($statusMessage); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateDomainTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $updateMask = new FieldMask(); - $domain = new Domain(); - $domainName = 'domainName-1244085905'; - $domain->setName($domainName); - $domainReservedIpRange = 'domainReservedIpRange1357926058'; - $domain->setReservedIpRange($domainReservedIpRange); - $domainLocations = []; - $domain->setLocations($domainLocations); - $request = (new UpdateDomainRequest()) - ->setUpdateMask($updateMask) - ->setDomain($domain); - $response = $gapicClient->updateDomain($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.managedidentities.v1.ManagedIdentitiesService/UpdateDomain', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $actualValue = $actualApiRequestObject->getDomain(); - $this->assertProtobufEquals($domain, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateDomainTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateDomainExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateDomainTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $updateMask = new FieldMask(); - $domain = new Domain(); - $domainName = 'domainName-1244085905'; - $domain->setName($domainName); - $domainReservedIpRange = 'domainReservedIpRange1357926058'; - $domain->setReservedIpRange($domainReservedIpRange); - $domainLocations = []; - $domain->setLocations($domainLocations); - $request = (new UpdateDomainRequest()) - ->setUpdateMask($updateMask) - ->setDomain($domain); - $response = $gapicClient->updateDomain($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateDomainTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function validateTrustTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/validateTrustTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $reservedIpRange = 'reservedIpRange-1082940580'; - $admin = 'admin92668751'; - $fqdn = 'fqdn3150485'; - $statusMessage = 'statusMessage-239442758'; - $expectedResponse = new Domain(); - $expectedResponse->setName($name2); - $expectedResponse->setReservedIpRange($reservedIpRange); - $expectedResponse->setAdmin($admin); - $expectedResponse->setFqdn($fqdn); - $expectedResponse->setStatusMessage($statusMessage); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/validateTrustTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->domainName('[PROJECT]', '[LOCATION]', '[DOMAIN]'); - $trust = new Trust(); - $trustTargetDomainName = 'trustTargetDomainName-39985064'; - $trust->setTargetDomainName($trustTargetDomainName); - $trustTrustType = TrustType::TRUST_TYPE_UNSPECIFIED; - $trust->setTrustType($trustTrustType); - $trustTrustDirection = TrustDirection::TRUST_DIRECTION_UNSPECIFIED; - $trust->setTrustDirection($trustTrustDirection); - $trustTargetDnsIpAddresses = []; - $trust->setTargetDnsIpAddresses($trustTargetDnsIpAddresses); - $trustTrustHandshakeSecret = 'trustTrustHandshakeSecret-1896647033'; - $trust->setTrustHandshakeSecret($trustTrustHandshakeSecret); - $request = (new ValidateTrustRequest()) - ->setName($formattedName) - ->setTrust($trust); - $response = $gapicClient->validateTrust($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.managedidentities.v1.ManagedIdentitiesService/ValidateTrust', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualApiRequestObject->getTrust(); - $this->assertProtobufEquals($trust, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/validateTrustTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function validateTrustExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/validateTrustTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->domainName('[PROJECT]', '[LOCATION]', '[DOMAIN]'); - $trust = new Trust(); - $trustTargetDomainName = 'trustTargetDomainName-39985064'; - $trust->setTargetDomainName($trustTargetDomainName); - $trustTrustType = TrustType::TRUST_TYPE_UNSPECIFIED; - $trust->setTrustType($trustTrustType); - $trustTrustDirection = TrustDirection::TRUST_DIRECTION_UNSPECIFIED; - $trust->setTrustDirection($trustTrustDirection); - $trustTargetDnsIpAddresses = []; - $trust->setTargetDnsIpAddresses($trustTargetDnsIpAddresses); - $trustTrustHandshakeSecret = 'trustTrustHandshakeSecret-1896647033'; - $trust->setTrustHandshakeSecret($trustTrustHandshakeSecret); - $request = (new ValidateTrustRequest()) - ->setName($formattedName) - ->setTrust($trust); - $response = $gapicClient->validateTrust($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/validateTrustTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function attachTrustAsyncTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/attachTrustTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $reservedIpRange = 'reservedIpRange-1082940580'; - $admin = 'admin92668751'; - $fqdn = 'fqdn3150485'; - $statusMessage = 'statusMessage-239442758'; - $expectedResponse = new Domain(); - $expectedResponse->setName($name2); - $expectedResponse->setReservedIpRange($reservedIpRange); - $expectedResponse->setAdmin($admin); - $expectedResponse->setFqdn($fqdn); - $expectedResponse->setStatusMessage($statusMessage); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/attachTrustTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->domainName('[PROJECT]', '[LOCATION]', '[DOMAIN]'); - $trust = new Trust(); - $trustTargetDomainName = 'trustTargetDomainName-39985064'; - $trust->setTargetDomainName($trustTargetDomainName); - $trustTrustType = TrustType::TRUST_TYPE_UNSPECIFIED; - $trust->setTrustType($trustTrustType); - $trustTrustDirection = TrustDirection::TRUST_DIRECTION_UNSPECIFIED; - $trust->setTrustDirection($trustTrustDirection); - $trustTargetDnsIpAddresses = []; - $trust->setTargetDnsIpAddresses($trustTargetDnsIpAddresses); - $trustTrustHandshakeSecret = 'trustTrustHandshakeSecret-1896647033'; - $trust->setTrustHandshakeSecret($trustTrustHandshakeSecret); - $request = (new AttachTrustRequest()) - ->setName($formattedName) - ->setTrust($trust); - $response = $gapicClient->attachTrustAsync($request)->wait(); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.managedidentities.v1.ManagedIdentitiesService/AttachTrust', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualApiRequestObject->getTrust(); - $this->assertProtobufEquals($trust, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/attachTrustTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } -} diff --git a/owl-bot-staging/ManagedKafka/v1/proto/src/GPBMetadata/Google/Cloud/Managedkafka/V1/ManagedKafka.php b/owl-bot-staging/ManagedKafka/v1/proto/src/GPBMetadata/Google/Cloud/Managedkafka/V1/ManagedKafka.php deleted file mode 100644 index 10674c4cc346..000000000000 --- a/owl-bot-staging/ManagedKafka/v1/proto/src/GPBMetadata/Google/Cloud/Managedkafka/V1/ManagedKafka.php +++ /dev/null @@ -1,125 +0,0 @@ -internalAddGeneratedFile( - ' -ñ+ -0google/cloud/managedkafka/v1/managed_kafka.protogoogle.cloud.managedkafka.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/field_info.protogoogle/api/resource.proto,google/cloud/managedkafka/v1/resources.proto#google/longrunning/operations.protogoogle/protobuf/empty.proto google/protobuf/field_mask.proto"¯ -ListClustersRequest; -parent ( B+àAúA%#managedkafka.googleapis.com/Cluster - page_size (BàA - -page_token ( BàA -filter ( BàA -order_by ( BàA"} -ListClustersResponse7 -clusters ( 2%.google.cloud.managedkafka.v1.Cluster -next_page_token (  - unreachable ( "N -GetClusterRequest9 -name ( B+àAúA% -#managedkafka.googleapis.com/Cluster"Ê -CreateClusterRequest; -parent ( B+àAúA%#managedkafka.googleapis.com/Cluster - -cluster_id ( BàA; -cluster ( 2%.google.cloud.managedkafka.v1.ClusterBàA - -request_id ( B àAâŒÏ×"ª -UpdateClusterRequest4 - update_mask ( 2.google.protobuf.FieldMaskBàA; -cluster ( 2%.google.cloud.managedkafka.v1.ClusterBàA - -request_id ( B àAâŒÏ×"r -DeleteClusterRequest9 -name ( B+àAúA% -#managedkafka.googleapis.com/Cluster - -request_id ( B àAâŒÏ×" -ListTopicsRequest9 -parent ( B)àAúA#!managedkafka.googleapis.com/Topic - page_size (BàA - -page_token ( BàA"b -ListTopicsResponse3 -topics ( 2#.google.cloud.managedkafka.v1.Topic -next_page_token ( "J -GetTopicRequest7 -name ( B)àAúA# -!managedkafka.googleapis.com/Topic"Ÿ -CreateTopicRequest9 -parent ( B)àAúA#!managedkafka.googleapis.com/Topic -topic_id ( BàA7 -topic ( 2#.google.cloud.managedkafka.v1.TopicBàA"ƒ -UpdateTopicRequest4 - update_mask ( 2.google.protobuf.FieldMaskBàA7 -topic ( 2#.google.cloud.managedkafka.v1.TopicBàA"M -DeleteTopicRequest7 -name ( B)àAúA# -!managedkafka.googleapis.com/Topic" -ListConsumerGroupsRequestA -parent ( B1àAúA+)managedkafka.googleapis.com/ConsumerGroup - page_size (BàA - -page_token ( BàA"{ -ListConsumerGroupsResponseD -consumer_groups ( 2+.google.cloud.managedkafka.v1.ConsumerGroup -next_page_token ( "Z -GetConsumerGroupRequest? -name ( B1àAúA+ -)managedkafka.googleapis.com/ConsumerGroup"œ -UpdateConsumerGroupRequest4 - update_mask ( 2.google.protobuf.FieldMaskBàAH -consumer_group ( 2+.google.cloud.managedkafka.v1.ConsumerGroupBàA"] -DeleteConsumerGroupRequest? -name ( B1àAúA+ -)managedkafka.googleapis.com/ConsumerGroup2² - ManagedKafka´ - ListClusters1.google.cloud.managedkafka.v1.ListClustersRequest2.google.cloud.managedkafka.v1.ListClustersResponse"=ÚAparent‚Óä“.,/v1/{parent=projects/*/locations/*}/clusters¡ - -GetCluster/.google.cloud.managedkafka.v1.GetClusterRequest%.google.cloud.managedkafka.v1.Cluster";ÚAname‚Óä“.,/v1/{name=projects/*/locations/*/clusters/*}Ü - CreateCluster2.google.cloud.managedkafka.v1.CreateClusterRequest.google.longrunning.Operation"xÊA -ClusterOperationMetadataÚAparent,cluster,cluster_id‚Óä“7",/v1/{parent=projects/*/locations/*}/clusters:clusterÞ - UpdateCluster2.google.cloud.managedkafka.v1.UpdateClusterRequest.google.longrunning.Operation"zÊA -ClusterOperationMetadataÚAcluster,update_mask‚Óä“?24/v1/{cluster.name=projects/*/locations/*/clusters/*}:clusterÌ - DeleteCluster2.google.cloud.managedkafka.v1.DeleteClusterRequest.google.longrunning.Operation"hÊA* -google.protobuf.EmptyOperationMetadataÚAname‚Óä“.*,/v1/{name=projects/*/locations/*/clusters/*}· - -ListTopics/.google.cloud.managedkafka.v1.ListTopicsRequest0.google.cloud.managedkafka.v1.ListTopicsResponse"FÚAparent‚Óä“75/v1/{parent=projects/*/locations/*/clusters/*}/topics¤ -GetTopic-.google.cloud.managedkafka.v1.GetTopicRequest#.google.cloud.managedkafka.v1.Topic"DÚAname‚Óä“75/v1/{name=projects/*/locations/*/clusters/*/topics/*} - CreateTopic0.google.cloud.managedkafka.v1.CreateTopicRequest#.google.cloud.managedkafka.v1.Topic"\\ÚAparent,topic,topic_id‚Óä“>"5/v1/{parent=projects/*/locations/*/clusters/*}/topics:topicÄ - UpdateTopic0.google.cloud.managedkafka.v1.UpdateTopicRequest#.google.cloud.managedkafka.v1.Topic"^ÚAtopic,update_mask‚Óä“D2;/v1/{topic.name=projects/*/locations/*/clusters/*/topics/*}:topic - DeleteTopic0.google.cloud.managedkafka.v1.DeleteTopicRequest.google.protobuf.Empty"DÚAname‚Óä“7*5/v1/{name=projects/*/locations/*/clusters/*/topics/*}× -ListConsumerGroups7.google.cloud.managedkafka.v1.ListConsumerGroupsRequest8.google.cloud.managedkafka.v1.ListConsumerGroupsResponse"NÚAparent‚Óä“?=/v1/{parent=projects/*/locations/*/clusters/*}/consumerGroupsÄ -GetConsumerGroup5.google.cloud.managedkafka.v1.GetConsumerGroupRequest+.google.cloud.managedkafka.v1.ConsumerGroup"LÚAname‚Óä“?=/v1/{name=projects/*/locations/*/clusters/*/consumerGroups/*}€ -UpdateConsumerGroup8.google.cloud.managedkafka.v1.UpdateConsumerGroupRequest+.google.cloud.managedkafka.v1.ConsumerGroup"ÚAconsumer_group,update_mask‚Óä“^2L/v1/{consumer_group.name=projects/*/locations/*/clusters/*/consumerGroups/*}:consumer_groupµ -DeleteConsumerGroup8.google.cloud.managedkafka.v1.DeleteConsumerGroupRequest.google.protobuf.Empty"LÚAname‚Óä“?*=/v1/{name=projects/*/locations/*/clusters/*/consumerGroups/*}OÊAmanagedkafka.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformBÝ - com.google.cloud.managedkafka.v1BManagedKafkaProtoPZDcloud.google.com/go/managedkafka/apiv1/managedkafkapb;managedkafkapbªGoogle.Cloud.ManagedKafka.V1ÊGoogle\\Cloud\\ManagedKafka\\V1êGoogle::Cloud::ManagedKafka::V1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/ManagedKafka/v1/proto/src/GPBMetadata/Google/Cloud/Managedkafka/V1/Resources.php b/owl-bot-staging/ManagedKafka/v1/proto/src/GPBMetadata/Google/Cloud/Managedkafka/V1/Resources.php deleted file mode 100644 index 05cd1c359ad8b3e163889ec69d9541536134757e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3894 zcmbtXOK;mo5Dq0vwnu)*Y||=k&@ggXEv+}HDVG+ z^+;Ff36(3RGd=)X4fBA+SkhZ`l_5zb!(XOyHfhujuC$0zaK1;HVn@0j=5xv7EC_^EvkX0olfcXVQOOXQh) ztXqyGop^O(HXZiz^!MB?c3tCy~UblmzjJi`KO$Cc!ghq8Or+{hwAfmagP52GMYm$^Ax&! zF2M}1Ms}m4iDQhZR+4J@HfBtymAstR4x|mWLku@JBP8+sThTV>LMMioqzYAH1bW}sd?2C-eF=Kb98#{=!PONeK14z*n zBRN15OU2Kon}{4dq$&ZhH(=4lGUE1h;wtt_J(od4bL`tg?kA4pPYJlWg%g1U3as9R zObjqS1IZ&Y3?j}iLh4vG{2N(Lo zx9}=_8WjvnL$56p*P_P}R&qvtTnnE@8*|ZGaW;G^t-!Kvs9w)<24Vb4Sy)mgP&~8Z z<}0vNo}dH&F~G5A`)I^BJqB2k;-28I!NPzHEN7^6h8}TQjs&0bzjCmAiU@oaW(HO_ zNV273aXJM~DT{lk$w;1WzzluiKZNYwe&uvnvarzDR}QKrc~@?fs~DP3VO4(IimfU8 z4dt*b@1klmo5zYS|PYD zB13cc0%}ie#bC_;%)$J)BJn%0sIrZsqzh`u#&o#iXA6R}4YNlBSD_rIwQIh#i522c zIrX=^1~*wqsrt@$fFU%#apzk5sU89(ae? zc=I#nDm_)hdpJkkNR`sa8$1MhIjgY>9F@G!r~Ai_A_myIClzm1goXIxMOiJq=HAI8 zxH&By1F!4|nj zYe{TI(TQXA9F|Y5$Kj$ei50<2@yp9?JT@7*!K!Bsu0h)YqFnZsH#pEi? z4Z?2oB=5NVk4adJEY%##x6k9_E`%7PCe6W19-Y|}Sq$Phbs!U4i(@p8-Npn)_b!Lg zM3^Z)(i`OAFC5&NM#M?CpZ*U*Y9Za2!}Qt+-<3W^bhNP)Ed&C^#fkU)>jbRq+jI=U ze2>C>xR=1cY6z>xNy>s_;&iZK3OlwW{|PM79>aGP zYkUi7OY1B!hQO~+}dpvGz1|wH&LZe~TwR5I3CK=37BNzev17uI= A&Hw-a diff --git a/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/AccessConfig.php b/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/AccessConfig.php deleted file mode 100644 index 7b0b55d42851..000000000000 --- a/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/AccessConfig.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.managedkafka.v1.AccessConfig - */ -class AccessConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Virtual Private Cloud (VPC) networks that must be granted direct - * access to the Kafka cluster. Minimum of 1 network is required. Maximum 10 - * networks can be specified. - * - * Generated from protobuf field repeated .google.cloud.managedkafka.v1.NetworkConfig network_configs = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - private $network_configs; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\ManagedKafka\V1\NetworkConfig>|\Google\Protobuf\Internal\RepeatedField $network_configs - * Required. Virtual Private Cloud (VPC) networks that must be granted direct - * access to the Kafka cluster. Minimum of 1 network is required. Maximum 10 - * networks can be specified. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Managedkafka\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Required. Virtual Private Cloud (VPC) networks that must be granted direct - * access to the Kafka cluster. Minimum of 1 network is required. Maximum 10 - * networks can be specified. - * - * Generated from protobuf field repeated .google.cloud.managedkafka.v1.NetworkConfig network_configs = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNetworkConfigs() - { - return $this->network_configs; - } - - /** - * Required. Virtual Private Cloud (VPC) networks that must be granted direct - * access to the Kafka cluster. Minimum of 1 network is required. Maximum 10 - * networks can be specified. - * - * Generated from protobuf field repeated .google.cloud.managedkafka.v1.NetworkConfig network_configs = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param array<\Google\Cloud\ManagedKafka\V1\NetworkConfig>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNetworkConfigs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ManagedKafka\V1\NetworkConfig::class); - $this->network_configs = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/CapacityConfig.php b/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/CapacityConfig.php deleted file mode 100644 index 491c262bce33..000000000000 --- a/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/CapacityConfig.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.managedkafka.v1.CapacityConfig - */ -class CapacityConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The number of vCPUs to provision for the cluster. Minimum: 3. - * - * Generated from protobuf field int64 vcpu_count = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $vcpu_count = 0; - /** - * Required. The memory to provision for the cluster in bytes. - * The CPU:memory ratio (vCPU:GiB) must be between 1:1 and 1:8. - * Minimum: 3221225472 (3 GiB). - * - * Generated from protobuf field int64 memory_bytes = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $memory_bytes = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $vcpu_count - * Required. The number of vCPUs to provision for the cluster. Minimum: 3. - * @type int|string $memory_bytes - * Required. The memory to provision for the cluster in bytes. - * The CPU:memory ratio (vCPU:GiB) must be between 1:1 and 1:8. - * Minimum: 3221225472 (3 GiB). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Managedkafka\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Required. The number of vCPUs to provision for the cluster. Minimum: 3. - * - * Generated from protobuf field int64 vcpu_count = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return int|string - */ - public function getVcpuCount() - { - return $this->vcpu_count; - } - - /** - * Required. The number of vCPUs to provision for the cluster. Minimum: 3. - * - * Generated from protobuf field int64 vcpu_count = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param int|string $var - * @return $this - */ - public function setVcpuCount($var) - { - GPBUtil::checkInt64($var); - $this->vcpu_count = $var; - - return $this; - } - - /** - * Required. The memory to provision for the cluster in bytes. - * The CPU:memory ratio (vCPU:GiB) must be between 1:1 and 1:8. - * Minimum: 3221225472 (3 GiB). - * - * Generated from protobuf field int64 memory_bytes = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return int|string - */ - public function getMemoryBytes() - { - return $this->memory_bytes; - } - - /** - * Required. The memory to provision for the cluster in bytes. - * The CPU:memory ratio (vCPU:GiB) must be between 1:1 and 1:8. - * Minimum: 3221225472 (3 GiB). - * - * Generated from protobuf field int64 memory_bytes = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param int|string $var - * @return $this - */ - public function setMemoryBytes($var) - { - GPBUtil::checkInt64($var); - $this->memory_bytes = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/Cluster.php b/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/Cluster.php deleted file mode 100644 index 0f78467726d0..000000000000 --- a/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/Cluster.php +++ /dev/null @@ -1,448 +0,0 @@ -google.cloud.managedkafka.v1.Cluster - */ -class Cluster extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. The name of the cluster. Structured like: - * projects/{project_number}/locations/{location}/clusters/{cluster_id} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Output only. The time when the cluster was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time when the cluster was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Optional. Labels as key value pairs. - * - * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - /** - * Required. Capacity configuration for the Kafka cluster. - * - * Generated from protobuf field .google.cloud.managedkafka.v1.CapacityConfig capacity_config = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $capacity_config = null; - /** - * Optional. Rebalance configuration for the Kafka cluster. - * - * Generated from protobuf field .google.cloud.managedkafka.v1.RebalanceConfig rebalance_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $rebalance_config = null; - /** - * Output only. The current state of the cluster. - * - * Generated from protobuf field .google.cloud.managedkafka.v1.Cluster.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. Reserved for future use. - * - * Generated from protobuf field optional bool satisfies_pzi = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $satisfies_pzi = null; - /** - * Output only. Reserved for future use. - * - * Generated from protobuf field optional bool satisfies_pzs = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $satisfies_pzs = null; - protected $platform_config; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\ManagedKafka\V1\GcpConfig $gcp_config - * Required. Configuration properties for a Kafka cluster deployed to Google - * Cloud Platform. - * @type string $name - * Identifier. The name of the cluster. Structured like: - * projects/{project_number}/locations/{location}/clusters/{cluster_id} - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time when the cluster was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The time when the cluster was last updated. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. Labels as key value pairs. - * @type \Google\Cloud\ManagedKafka\V1\CapacityConfig $capacity_config - * Required. Capacity configuration for the Kafka cluster. - * @type \Google\Cloud\ManagedKafka\V1\RebalanceConfig $rebalance_config - * Optional. Rebalance configuration for the Kafka cluster. - * @type int $state - * Output only. The current state of the cluster. - * @type bool $satisfies_pzi - * Output only. Reserved for future use. - * @type bool $satisfies_pzs - * Output only. Reserved for future use. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Managedkafka\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Required. Configuration properties for a Kafka cluster deployed to Google - * Cloud Platform. - * - * Generated from protobuf field .google.cloud.managedkafka.v1.GcpConfig gcp_config = 9 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\ManagedKafka\V1\GcpConfig|null - */ - public function getGcpConfig() - { - return $this->readOneof(9); - } - - public function hasGcpConfig() - { - return $this->hasOneof(9); - } - - /** - * Required. Configuration properties for a Kafka cluster deployed to Google - * Cloud Platform. - * - * Generated from protobuf field .google.cloud.managedkafka.v1.GcpConfig gcp_config = 9 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\ManagedKafka\V1\GcpConfig $var - * @return $this - */ - public function setGcpConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ManagedKafka\V1\GcpConfig::class); - $this->writeOneof(9, $var); - - return $this; - } - - /** - * Identifier. The name of the cluster. Structured like: - * projects/{project_number}/locations/{location}/clusters/{cluster_id} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. The name of the cluster. Structured like: - * projects/{project_number}/locations/{location}/clusters/{cluster_id} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. The time when the cluster was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The time when the cluster was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The time when the cluster was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The time when the cluster was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Optional. Labels as key value pairs. - * - * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. Labels as key value pairs. - * - * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Required. Capacity configuration for the Kafka cluster. - * - * Generated from protobuf field .google.cloud.managedkafka.v1.CapacityConfig capacity_config = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\ManagedKafka\V1\CapacityConfig|null - */ - public function getCapacityConfig() - { - return $this->capacity_config; - } - - public function hasCapacityConfig() - { - return isset($this->capacity_config); - } - - public function clearCapacityConfig() - { - unset($this->capacity_config); - } - - /** - * Required. Capacity configuration for the Kafka cluster. - * - * Generated from protobuf field .google.cloud.managedkafka.v1.CapacityConfig capacity_config = 5 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\ManagedKafka\V1\CapacityConfig $var - * @return $this - */ - public function setCapacityConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ManagedKafka\V1\CapacityConfig::class); - $this->capacity_config = $var; - - return $this; - } - - /** - * Optional. Rebalance configuration for the Kafka cluster. - * - * Generated from protobuf field .google.cloud.managedkafka.v1.RebalanceConfig rebalance_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\ManagedKafka\V1\RebalanceConfig|null - */ - public function getRebalanceConfig() - { - return $this->rebalance_config; - } - - public function hasRebalanceConfig() - { - return isset($this->rebalance_config); - } - - public function clearRebalanceConfig() - { - unset($this->rebalance_config); - } - - /** - * Optional. Rebalance configuration for the Kafka cluster. - * - * Generated from protobuf field .google.cloud.managedkafka.v1.RebalanceConfig rebalance_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\ManagedKafka\V1\RebalanceConfig $var - * @return $this - */ - public function setRebalanceConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ManagedKafka\V1\RebalanceConfig::class); - $this->rebalance_config = $var; - - return $this; - } - - /** - * Output only. The current state of the cluster. - * - * Generated from protobuf field .google.cloud.managedkafka.v1.Cluster.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The current state of the cluster. - * - * Generated from protobuf field .google.cloud.managedkafka.v1.Cluster.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\ManagedKafka\V1\Cluster\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. Reserved for future use. - * - * Generated from protobuf field optional bool satisfies_pzi = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getSatisfiesPzi() - { - return isset($this->satisfies_pzi) ? $this->satisfies_pzi : false; - } - - public function hasSatisfiesPzi() - { - return isset($this->satisfies_pzi); - } - - public function clearSatisfiesPzi() - { - unset($this->satisfies_pzi); - } - - /** - * Output only. Reserved for future use. - * - * Generated from protobuf field optional bool satisfies_pzi = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setSatisfiesPzi($var) - { - GPBUtil::checkBool($var); - $this->satisfies_pzi = $var; - - return $this; - } - - /** - * Output only. Reserved for future use. - * - * Generated from protobuf field optional bool satisfies_pzs = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getSatisfiesPzs() - { - return isset($this->satisfies_pzs) ? $this->satisfies_pzs : false; - } - - public function hasSatisfiesPzs() - { - return isset($this->satisfies_pzs); - } - - public function clearSatisfiesPzs() - { - unset($this->satisfies_pzs); - } - - /** - * Output only. Reserved for future use. - * - * Generated from protobuf field optional bool satisfies_pzs = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setSatisfiesPzs($var) - { - GPBUtil::checkBool($var); - $this->satisfies_pzs = $var; - - return $this; - } - - /** - * @return string - */ - public function getPlatformConfig() - { - return $this->whichOneof("platform_config"); - } - -} - diff --git a/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/Cluster/State.php b/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/Cluster/State.php deleted file mode 100644 index e3a34a3a6a34..000000000000 --- a/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/Cluster/State.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.managedkafka.v1.Cluster.State - */ -class State -{ - /** - * A state was not specified. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The cluster is being created. - * - * Generated from protobuf enum CREATING = 1; - */ - const CREATING = 1; - /** - * The cluster is active. - * - * Generated from protobuf enum ACTIVE = 2; - */ - const ACTIVE = 2; - /** - * The cluster is being deleted. - * - * Generated from protobuf enum DELETING = 3; - */ - const DELETING = 3; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::CREATING => 'CREATING', - self::ACTIVE => 'ACTIVE', - self::DELETING => 'DELETING', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\ManagedKafka\V1\Cluster_State::class); - diff --git a/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/ConsumerGroup.php b/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/ConsumerGroup.php deleted file mode 100644 index 1dd45cb33745..000000000000 --- a/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/ConsumerGroup.php +++ /dev/null @@ -1,117 +0,0 @@ -google.cloud.managedkafka.v1.ConsumerGroup - */ -class ConsumerGroup extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. The name of the consumer group. The `consumer_group` segment is - * used when connecting directly to the cluster. Structured like: - * projects/{project}/locations/{location}/clusters/{cluster}/consumerGroups/{consumer_group} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Optional. Metadata for this consumer group for all topics it has metadata - * for. The key of the map is a topic name, structured like: - * projects/{project}/locations/{location}/clusters/{cluster}/topics/{topic} - * - * Generated from protobuf field map topics = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $topics; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. The name of the consumer group. The `consumer_group` segment is - * used when connecting directly to the cluster. Structured like: - * projects/{project}/locations/{location}/clusters/{cluster}/consumerGroups/{consumer_group} - * @type array|\Google\Protobuf\Internal\MapField $topics - * Optional. Metadata for this consumer group for all topics it has metadata - * for. The key of the map is a topic name, structured like: - * projects/{project}/locations/{location}/clusters/{cluster}/topics/{topic} - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Managedkafka\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. The name of the consumer group. The `consumer_group` segment is - * used when connecting directly to the cluster. Structured like: - * projects/{project}/locations/{location}/clusters/{cluster}/consumerGroups/{consumer_group} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. The name of the consumer group. The `consumer_group` segment is - * used when connecting directly to the cluster. Structured like: - * projects/{project}/locations/{location}/clusters/{cluster}/consumerGroups/{consumer_group} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. Metadata for this consumer group for all topics it has metadata - * for. The key of the map is a topic name, structured like: - * projects/{project}/locations/{location}/clusters/{cluster}/topics/{topic} - * - * Generated from protobuf field map topics = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getTopics() - { - return $this->topics; - } - - /** - * Optional. Metadata for this consumer group for all topics it has metadata - * for. The key of the map is a topic name, structured like: - * projects/{project}/locations/{location}/clusters/{cluster}/topics/{topic} - * - * Generated from protobuf field map topics = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setTopics($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ManagedKafka\V1\ConsumerTopicMetadata::class); - $this->topics = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/ConsumerPartitionMetadata.php b/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/ConsumerPartitionMetadata.php deleted file mode 100644 index c51b38cc407a..000000000000 --- a/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/ConsumerPartitionMetadata.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.managedkafka.v1.ConsumerPartitionMetadata - */ -class ConsumerPartitionMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The current offset for this partition, or 0 if no offset has been - * committed. - * - * Generated from protobuf field int64 offset = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $offset = 0; - /** - * Optional. The associated metadata for this partition, or empty if it does - * not exist. - * - * Generated from protobuf field string metadata = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $metadata = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $offset - * Required. The current offset for this partition, or 0 if no offset has been - * committed. - * @type string $metadata - * Optional. The associated metadata for this partition, or empty if it does - * not exist. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Managedkafka\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Required. The current offset for this partition, or 0 if no offset has been - * committed. - * - * Generated from protobuf field int64 offset = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return int|string - */ - public function getOffset() - { - return $this->offset; - } - - /** - * Required. The current offset for this partition, or 0 if no offset has been - * committed. - * - * Generated from protobuf field int64 offset = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param int|string $var - * @return $this - */ - public function setOffset($var) - { - GPBUtil::checkInt64($var); - $this->offset = $var; - - return $this; - } - - /** - * Optional. The associated metadata for this partition, or empty if it does - * not exist. - * - * Generated from protobuf field string metadata = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getMetadata() - { - return $this->metadata; - } - - /** - * Optional. The associated metadata for this partition, or empty if it does - * not exist. - * - * Generated from protobuf field string metadata = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setMetadata($var) - { - GPBUtil::checkString($var, True); - $this->metadata = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/ConsumerTopicMetadata.php b/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/ConsumerTopicMetadata.php deleted file mode 100644 index 1bae3f307e4f..000000000000 --- a/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/ConsumerTopicMetadata.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.managedkafka.v1.ConsumerTopicMetadata - */ -class ConsumerTopicMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Metadata for this consumer group and topic for all partition - * indexes it has metadata for. - * - * Generated from protobuf field map partitions = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $partitions; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\MapField $partitions - * Optional. Metadata for this consumer group and topic for all partition - * indexes it has metadata for. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Managedkafka\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Metadata for this consumer group and topic for all partition - * indexes it has metadata for. - * - * Generated from protobuf field map partitions = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getPartitions() - { - return $this->partitions; - } - - /** - * Optional. Metadata for this consumer group and topic for all partition - * indexes it has metadata for. - * - * Generated from protobuf field map partitions = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setPartitions($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::INT32, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ManagedKafka\V1\ConsumerPartitionMetadata::class); - $this->partitions = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/CreateClusterRequest.php b/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/CreateClusterRequest.php deleted file mode 100644 index 8271e3324f0e..000000000000 --- a/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/CreateClusterRequest.php +++ /dev/null @@ -1,272 +0,0 @@ -google.cloud.managedkafka.v1.CreateClusterRequest - */ -class CreateClusterRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent region in which to create the cluster. Structured like - * `projects/{project}/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The ID to use for the cluster, which will become the final - * component of the cluster's name. The ID must be 1-63 characters long, and - * match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` to comply with - * RFC 1035. - * This value is structured like: `my-cluster-id`. - * - * Generated from protobuf field string cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $cluster_id = ''; - /** - * Required. Configuration of the cluster to create. Its `name` field is - * ignored. - * - * Generated from protobuf field .google.cloud.managedkafka.v1.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $cluster = null; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID to avoid duplication of requests. If a request times out or - * fails, retrying with the same ID allows the server to recognize the - * previous attempt. For at least 60 minutes, the server ignores duplicate - * requests bearing the same ID. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID - * within 60 minutes of the last request, the server checks if an original - * operation with the same request ID was received. If so, the server ignores - * the second request. - * The request ID must be a valid UUID. A zero UUID is not supported - * (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - */ - protected $request_id = ''; - - /** - * @param string $parent Required. The parent region in which to create the cluster. Structured like - * `projects/{project}/locations/{location}`. Please see - * {@see ManagedKafkaClient::locationName()} for help formatting this field. - * @param \Google\Cloud\ManagedKafka\V1\Cluster $cluster Required. Configuration of the cluster to create. Its `name` field is - * ignored. - * @param string $clusterId Required. The ID to use for the cluster, which will become the final - * component of the cluster's name. The ID must be 1-63 characters long, and - * match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` to comply with - * RFC 1035. - * - * This value is structured like: `my-cluster-id`. - * - * @return \Google\Cloud\ManagedKafka\V1\CreateClusterRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\ManagedKafka\V1\Cluster $cluster, string $clusterId): self - { - return (new self()) - ->setParent($parent) - ->setCluster($cluster) - ->setClusterId($clusterId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent region in which to create the cluster. Structured like - * `projects/{project}/locations/{location}`. - * @type string $cluster_id - * Required. The ID to use for the cluster, which will become the final - * component of the cluster's name. The ID must be 1-63 characters long, and - * match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` to comply with - * RFC 1035. - * This value is structured like: `my-cluster-id`. - * @type \Google\Cloud\ManagedKafka\V1\Cluster $cluster - * Required. Configuration of the cluster to create. Its `name` field is - * ignored. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID to avoid duplication of requests. If a request times out or - * fails, retrying with the same ID allows the server to recognize the - * previous attempt. For at least 60 minutes, the server ignores duplicate - * requests bearing the same ID. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID - * within 60 minutes of the last request, the server checks if an original - * operation with the same request ID was received. If so, the server ignores - * the second request. - * The request ID must be a valid UUID. A zero UUID is not supported - * (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Managedkafka\V1\ManagedKafka::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent region in which to create the cluster. Structured like - * `projects/{project}/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent region in which to create the cluster. Structured like - * `projects/{project}/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The ID to use for the cluster, which will become the final - * component of the cluster's name. The ID must be 1-63 characters long, and - * match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` to comply with - * RFC 1035. - * This value is structured like: `my-cluster-id`. - * - * Generated from protobuf field string cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getClusterId() - { - return $this->cluster_id; - } - - /** - * Required. The ID to use for the cluster, which will become the final - * component of the cluster's name. The ID must be 1-63 characters long, and - * match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` to comply with - * RFC 1035. - * This value is structured like: `my-cluster-id`. - * - * Generated from protobuf field string cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setClusterId($var) - { - GPBUtil::checkString($var, True); - $this->cluster_id = $var; - - return $this; - } - - /** - * Required. Configuration of the cluster to create. Its `name` field is - * ignored. - * - * Generated from protobuf field .google.cloud.managedkafka.v1.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\ManagedKafka\V1\Cluster|null - */ - public function getCluster() - { - return $this->cluster; - } - - public function hasCluster() - { - return isset($this->cluster); - } - - public function clearCluster() - { - unset($this->cluster); - } - - /** - * Required. Configuration of the cluster to create. Its `name` field is - * ignored. - * - * Generated from protobuf field .google.cloud.managedkafka.v1.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\ManagedKafka\V1\Cluster $var - * @return $this - */ - public function setCluster($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ManagedKafka\V1\Cluster::class); - $this->cluster = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID to avoid duplication of requests. If a request times out or - * fails, retrying with the same ID allows the server to recognize the - * previous attempt. For at least 60 minutes, the server ignores duplicate - * requests bearing the same ID. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID - * within 60 minutes of the last request, the server checks if an original - * operation with the same request ID was received. If so, the server ignores - * the second request. - * The request ID must be a valid UUID. A zero UUID is not supported - * (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID to avoid duplication of requests. If a request times out or - * fails, retrying with the same ID allows the server to recognize the - * previous attempt. For at least 60 minutes, the server ignores duplicate - * requests bearing the same ID. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID - * within 60 minutes of the last request, the server checks if an original - * operation with the same request ID was received. If so, the server ignores - * the second request. - * The request ID must be a valid UUID. A zero UUID is not supported - * (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/CreateTopicRequest.php b/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/CreateTopicRequest.php deleted file mode 100644 index 49797ac7e3d0..000000000000 --- a/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/CreateTopicRequest.php +++ /dev/null @@ -1,189 +0,0 @@ -google.cloud.managedkafka.v1.CreateTopicRequest - */ -class CreateTopicRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent cluster in which to create the topic. - * Structured like - * `projects/{project}/locations/{location}/clusters/{cluster}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The ID to use for the topic, which will become the final - * component of the topic's name. - * This value is structured like: `my-topic-name`. - * - * Generated from protobuf field string topic_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $topic_id = ''; - /** - * Required. Configuration of the topic to create. Its `name` field is - * ignored. - * - * Generated from protobuf field .google.cloud.managedkafka.v1.Topic topic = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $topic = null; - - /** - * @param string $parent Required. The parent cluster in which to create the topic. - * Structured like - * `projects/{project}/locations/{location}/clusters/{cluster}`. Please see - * {@see ManagedKafkaClient::clusterName()} for help formatting this field. - * @param \Google\Cloud\ManagedKafka\V1\Topic $topic Required. Configuration of the topic to create. Its `name` field is - * ignored. - * @param string $topicId Required. The ID to use for the topic, which will become the final - * component of the topic's name. - * - * This value is structured like: `my-topic-name`. - * - * @return \Google\Cloud\ManagedKafka\V1\CreateTopicRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\ManagedKafka\V1\Topic $topic, string $topicId): self - { - return (new self()) - ->setParent($parent) - ->setTopic($topic) - ->setTopicId($topicId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent cluster in which to create the topic. - * Structured like - * `projects/{project}/locations/{location}/clusters/{cluster}`. - * @type string $topic_id - * Required. The ID to use for the topic, which will become the final - * component of the topic's name. - * This value is structured like: `my-topic-name`. - * @type \Google\Cloud\ManagedKafka\V1\Topic $topic - * Required. Configuration of the topic to create. Its `name` field is - * ignored. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Managedkafka\V1\ManagedKafka::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent cluster in which to create the topic. - * Structured like - * `projects/{project}/locations/{location}/clusters/{cluster}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent cluster in which to create the topic. - * Structured like - * `projects/{project}/locations/{location}/clusters/{cluster}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The ID to use for the topic, which will become the final - * component of the topic's name. - * This value is structured like: `my-topic-name`. - * - * Generated from protobuf field string topic_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getTopicId() - { - return $this->topic_id; - } - - /** - * Required. The ID to use for the topic, which will become the final - * component of the topic's name. - * This value is structured like: `my-topic-name`. - * - * Generated from protobuf field string topic_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setTopicId($var) - { - GPBUtil::checkString($var, True); - $this->topic_id = $var; - - return $this; - } - - /** - * Required. Configuration of the topic to create. Its `name` field is - * ignored. - * - * Generated from protobuf field .google.cloud.managedkafka.v1.Topic topic = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\ManagedKafka\V1\Topic|null - */ - public function getTopic() - { - return $this->topic; - } - - public function hasTopic() - { - return isset($this->topic); - } - - public function clearTopic() - { - unset($this->topic); - } - - /** - * Required. Configuration of the topic to create. Its `name` field is - * ignored. - * - * Generated from protobuf field .google.cloud.managedkafka.v1.Topic topic = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\ManagedKafka\V1\Topic $var - * @return $this - */ - public function setTopic($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ManagedKafka\V1\Topic::class); - $this->topic = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/DeleteClusterRequest.php b/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/DeleteClusterRequest.php deleted file mode 100644 index d01b80718e76..000000000000 --- a/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/DeleteClusterRequest.php +++ /dev/null @@ -1,159 +0,0 @@ -google.cloud.managedkafka.v1.DeleteClusterRequest - */ -class DeleteClusterRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the cluster to delete. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID to avoid duplication of requests. If a request times out or - * fails, retrying with the same ID allows the server to recognize the - * previous attempt. For at least 60 minutes, the server ignores duplicate - * requests bearing the same ID. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID - * within 60 minutes of the last request, the server checks if an original - * operation with the same request ID was received. If so, the server ignores - * the second request. - * The request ID must be a valid UUID. A zero UUID is not supported - * (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - */ - protected $request_id = ''; - - /** - * @param string $name Required. The name of the cluster to delete. Please see - * {@see ManagedKafkaClient::clusterName()} for help formatting this field. - * - * @return \Google\Cloud\ManagedKafka\V1\DeleteClusterRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the cluster to delete. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID to avoid duplication of requests. If a request times out or - * fails, retrying with the same ID allows the server to recognize the - * previous attempt. For at least 60 minutes, the server ignores duplicate - * requests bearing the same ID. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID - * within 60 minutes of the last request, the server checks if an original - * operation with the same request ID was received. If so, the server ignores - * the second request. - * The request ID must be a valid UUID. A zero UUID is not supported - * (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Managedkafka\V1\ManagedKafka::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the cluster to delete. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the cluster to delete. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID to avoid duplication of requests. If a request times out or - * fails, retrying with the same ID allows the server to recognize the - * previous attempt. For at least 60 minutes, the server ignores duplicate - * requests bearing the same ID. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID - * within 60 minutes of the last request, the server checks if an original - * operation with the same request ID was received. If so, the server ignores - * the second request. - * The request ID must be a valid UUID. A zero UUID is not supported - * (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID to avoid duplication of requests. If a request times out or - * fails, retrying with the same ID allows the server to recognize the - * previous attempt. For at least 60 minutes, the server ignores duplicate - * requests bearing the same ID. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID - * within 60 minutes of the last request, the server checks if an original - * operation with the same request ID was received. If so, the server ignores - * the second request. - * The request ID must be a valid UUID. A zero UUID is not supported - * (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/DeleteConsumerGroupRequest.php b/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/DeleteConsumerGroupRequest.php deleted file mode 100644 index fec2b3a08134..000000000000 --- a/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/DeleteConsumerGroupRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.managedkafka.v1.DeleteConsumerGroupRequest - */ -class DeleteConsumerGroupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the consumer group to delete. - * `projects/{project}/locations/{location}/clusters/{cluster}/consumerGroups/{consumerGroup}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the consumer group to delete. - * `projects/{project}/locations/{location}/clusters/{cluster}/consumerGroups/{consumerGroup}`. Please see - * {@see ManagedKafkaClient::consumerGroupName()} for help formatting this field. - * - * @return \Google\Cloud\ManagedKafka\V1\DeleteConsumerGroupRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the consumer group to delete. - * `projects/{project}/locations/{location}/clusters/{cluster}/consumerGroups/{consumerGroup}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Managedkafka\V1\ManagedKafka::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the consumer group to delete. - * `projects/{project}/locations/{location}/clusters/{cluster}/consumerGroups/{consumerGroup}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the consumer group to delete. - * `projects/{project}/locations/{location}/clusters/{cluster}/consumerGroups/{consumerGroup}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/DeleteTopicRequest.php b/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/DeleteTopicRequest.php deleted file mode 100644 index c8f0b94a2ee5..000000000000 --- a/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/DeleteTopicRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.managedkafka.v1.DeleteTopicRequest - */ -class DeleteTopicRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the topic to delete. - * `projects/{project}/locations/{location}/clusters/{cluster}/topics/{topic}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the topic to delete. - * `projects/{project}/locations/{location}/clusters/{cluster}/topics/{topic}`. Please see - * {@see ManagedKafkaClient::topicName()} for help formatting this field. - * - * @return \Google\Cloud\ManagedKafka\V1\DeleteTopicRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the topic to delete. - * `projects/{project}/locations/{location}/clusters/{cluster}/topics/{topic}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Managedkafka\V1\ManagedKafka::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the topic to delete. - * `projects/{project}/locations/{location}/clusters/{cluster}/topics/{topic}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the topic to delete. - * `projects/{project}/locations/{location}/clusters/{cluster}/topics/{topic}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/GcpConfig.php b/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/GcpConfig.php deleted file mode 100644 index e4bc8e0c167d..000000000000 --- a/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/GcpConfig.php +++ /dev/null @@ -1,124 +0,0 @@ -google.cloud.managedkafka.v1.GcpConfig - */ -class GcpConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Access configuration for the Kafka cluster. - * - * Generated from protobuf field .google.cloud.managedkafka.v1.AccessConfig access_config = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $access_config = null; - /** - * Optional. Immutable. The Cloud KMS Key name to use for encryption. The key - * must be located in the same region as the cluster and cannot be changed. - * Structured like: - * projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}. - * - * Generated from protobuf field string kms_key = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { - */ - protected $kms_key = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\ManagedKafka\V1\AccessConfig $access_config - * Required. Access configuration for the Kafka cluster. - * @type string $kms_key - * Optional. Immutable. The Cloud KMS Key name to use for encryption. The key - * must be located in the same region as the cluster and cannot be changed. - * Structured like: - * projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Managedkafka\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Required. Access configuration for the Kafka cluster. - * - * Generated from protobuf field .google.cloud.managedkafka.v1.AccessConfig access_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\ManagedKafka\V1\AccessConfig|null - */ - public function getAccessConfig() - { - return $this->access_config; - } - - public function hasAccessConfig() - { - return isset($this->access_config); - } - - public function clearAccessConfig() - { - unset($this->access_config); - } - - /** - * Required. Access configuration for the Kafka cluster. - * - * Generated from protobuf field .google.cloud.managedkafka.v1.AccessConfig access_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\ManagedKafka\V1\AccessConfig $var - * @return $this - */ - public function setAccessConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ManagedKafka\V1\AccessConfig::class); - $this->access_config = $var; - - return $this; - } - - /** - * Optional. Immutable. The Cloud KMS Key name to use for encryption. The key - * must be located in the same region as the cluster and cannot be changed. - * Structured like: - * projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}. - * - * Generated from protobuf field string kms_key = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { - * @return string - */ - public function getKmsKey() - { - return $this->kms_key; - } - - /** - * Optional. Immutable. The Cloud KMS Key name to use for encryption. The key - * must be located in the same region as the cluster and cannot be changed. - * Structured like: - * projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}. - * - * Generated from protobuf field string kms_key = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setKmsKey($var) - { - GPBUtil::checkString($var, True); - $this->kms_key = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/GetClusterRequest.php b/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/GetClusterRequest.php deleted file mode 100644 index a0aae7374680..000000000000 --- a/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/GetClusterRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.managedkafka.v1.GetClusterRequest - */ -class GetClusterRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the cluster whose configuration to return. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the cluster whose configuration to return. Please see - * {@see ManagedKafkaClient::clusterName()} for help formatting this field. - * - * @return \Google\Cloud\ManagedKafka\V1\GetClusterRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the cluster whose configuration to return. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Managedkafka\V1\ManagedKafka::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the cluster whose configuration to return. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the cluster whose configuration to return. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/GetConsumerGroupRequest.php b/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/GetConsumerGroupRequest.php deleted file mode 100644 index 05104476d0a0..000000000000 --- a/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/GetConsumerGroupRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.managedkafka.v1.GetConsumerGroupRequest - */ -class GetConsumerGroupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the consumer group whose configuration to return. - * `projects/{project}/locations/{location}/clusters/{cluster}/consumerGroups/{consumerGroup}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the consumer group whose configuration to return. - * `projects/{project}/locations/{location}/clusters/{cluster}/consumerGroups/{consumerGroup}`. Please see - * {@see ManagedKafkaClient::consumerGroupName()} for help formatting this field. - * - * @return \Google\Cloud\ManagedKafka\V1\GetConsumerGroupRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the consumer group whose configuration to return. - * `projects/{project}/locations/{location}/clusters/{cluster}/consumerGroups/{consumerGroup}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Managedkafka\V1\ManagedKafka::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the consumer group whose configuration to return. - * `projects/{project}/locations/{location}/clusters/{cluster}/consumerGroups/{consumerGroup}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the consumer group whose configuration to return. - * `projects/{project}/locations/{location}/clusters/{cluster}/consumerGroups/{consumerGroup}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/GetTopicRequest.php b/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/GetTopicRequest.php deleted file mode 100644 index 49f1ad997717..000000000000 --- a/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/GetTopicRequest.php +++ /dev/null @@ -1,91 +0,0 @@ -google.cloud.managedkafka.v1.GetTopicRequest - */ -class GetTopicRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the topic whose configuration to return. Structured - * like: - * projects/{project}/locations/{location}/clusters/{cluster}/topics/{topic}. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the topic whose configuration to return. Structured - * like: - * projects/{project}/locations/{location}/clusters/{cluster}/topics/{topic}. Please see - * {@see ManagedKafkaClient::topicName()} for help formatting this field. - * - * @return \Google\Cloud\ManagedKafka\V1\GetTopicRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the topic whose configuration to return. Structured - * like: - * projects/{project}/locations/{location}/clusters/{cluster}/topics/{topic}. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Managedkafka\V1\ManagedKafka::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the topic whose configuration to return. Structured - * like: - * projects/{project}/locations/{location}/clusters/{cluster}/topics/{topic}. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the topic whose configuration to return. Structured - * like: - * projects/{project}/locations/{location}/clusters/{cluster}/topics/{topic}. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/ListClustersRequest.php b/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/ListClustersRequest.php deleted file mode 100644 index aa5222147449..000000000000 --- a/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/ListClustersRequest.php +++ /dev/null @@ -1,242 +0,0 @@ -google.cloud.managedkafka.v1.ListClustersRequest - */ -class ListClustersRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent location whose clusters are to be listed. Structured - * like `projects/{project}/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The maximum number of clusters to return. The service may return - * fewer than this value. If unspecified, server will pick an appropriate - * default. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. A page token, received from a previous `ListClusters` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListClusters` must match - * the call that provided the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. Filter expression for the result. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. Order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The parent location whose clusters are to be listed. Structured - * like `projects/{project}/locations/{location}`. Please see - * {@see ManagedKafkaClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\ManagedKafka\V1\ListClustersRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent location whose clusters are to be listed. Structured - * like `projects/{project}/locations/{location}`. - * @type int $page_size - * Optional. The maximum number of clusters to return. The service may return - * fewer than this value. If unspecified, server will pick an appropriate - * default. - * @type string $page_token - * Optional. A page token, received from a previous `ListClusters` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListClusters` must match - * the call that provided the page token. - * @type string $filter - * Optional. Filter expression for the result. - * @type string $order_by - * Optional. Order by fields for the result. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Managedkafka\V1\ManagedKafka::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent location whose clusters are to be listed. Structured - * like `projects/{project}/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent location whose clusters are to be listed. Structured - * like `projects/{project}/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. The maximum number of clusters to return. The service may return - * fewer than this value. If unspecified, server will pick an appropriate - * default. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of clusters to return. The service may return - * fewer than this value. If unspecified, server will pick an appropriate - * default. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. A page token, received from a previous `ListClusters` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListClusters` must match - * the call that provided the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. A page token, received from a previous `ListClusters` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListClusters` must match - * the call that provided the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Optional. Filter expression for the result. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. Filter expression for the result. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Optional. Order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Optional. Order by fields for the result. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/ListClustersResponse.php b/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/ListClustersResponse.php deleted file mode 100644 index f02d1357fbc3..000000000000 --- a/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/ListClustersResponse.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.managedkafka.v1.ListClustersResponse - */ -class ListClustersResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of Clusters in the requested parent. - * - * Generated from protobuf field repeated .google.cloud.managedkafka.v1.Cluster clusters = 1; - */ - private $clusters; - /** - * A token that can be sent as `page_token` to retrieve the next page of - * results. If this field is omitted, there are no more results. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\ManagedKafka\V1\Cluster>|\Google\Protobuf\Internal\RepeatedField $clusters - * The list of Clusters in the requested parent. - * @type string $next_page_token - * A token that can be sent as `page_token` to retrieve the next page of - * results. If this field is omitted, there are no more results. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Managedkafka\V1\ManagedKafka::initOnce(); - parent::__construct($data); - } - - /** - * The list of Clusters in the requested parent. - * - * Generated from protobuf field repeated .google.cloud.managedkafka.v1.Cluster clusters = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getClusters() - { - return $this->clusters; - } - - /** - * The list of Clusters in the requested parent. - * - * Generated from protobuf field repeated .google.cloud.managedkafka.v1.Cluster clusters = 1; - * @param array<\Google\Cloud\ManagedKafka\V1\Cluster>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setClusters($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ManagedKafka\V1\Cluster::class); - $this->clusters = $arr; - - return $this; - } - - /** - * A token that can be sent as `page_token` to retrieve the next page of - * results. If this field is omitted, there are no more results. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token that can be sent as `page_token` to retrieve the next page of - * results. If this field is omitted, there are no more results. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/ListConsumerGroupsRequest.php b/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/ListConsumerGroupsRequest.php deleted file mode 100644 index d201e3bc513c..000000000000 --- a/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/ListConsumerGroupsRequest.php +++ /dev/null @@ -1,179 +0,0 @@ -google.cloud.managedkafka.v1.ListConsumerGroupsRequest - */ -class ListConsumerGroupsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent cluster whose consumer groups are to be listed. - * Structured like - * `projects/{project}/locations/{location}/clusters/{cluster}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The maximum number of consumer groups to return. The service may - * return fewer than this value. If unset or zero, all consumer groups for the - * parent is returned. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. A page token, received from a previous `ListConsumerGroups` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListConsumerGroups` must - * match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The parent cluster whose consumer groups are to be listed. - * Structured like - * `projects/{project}/locations/{location}/clusters/{cluster}`. Please see - * {@see ManagedKafkaClient::clusterName()} for help formatting this field. - * - * @return \Google\Cloud\ManagedKafka\V1\ListConsumerGroupsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent cluster whose consumer groups are to be listed. - * Structured like - * `projects/{project}/locations/{location}/clusters/{cluster}`. - * @type int $page_size - * Optional. The maximum number of consumer groups to return. The service may - * return fewer than this value. If unset or zero, all consumer groups for the - * parent is returned. - * @type string $page_token - * Optional. A page token, received from a previous `ListConsumerGroups` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListConsumerGroups` must - * match the call that provided the page token. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Managedkafka\V1\ManagedKafka::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent cluster whose consumer groups are to be listed. - * Structured like - * `projects/{project}/locations/{location}/clusters/{cluster}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent cluster whose consumer groups are to be listed. - * Structured like - * `projects/{project}/locations/{location}/clusters/{cluster}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. The maximum number of consumer groups to return. The service may - * return fewer than this value. If unset or zero, all consumer groups for the - * parent is returned. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of consumer groups to return. The service may - * return fewer than this value. If unset or zero, all consumer groups for the - * parent is returned. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. A page token, received from a previous `ListConsumerGroups` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListConsumerGroups` must - * match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. A page token, received from a previous `ListConsumerGroups` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListConsumerGroups` must - * match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/ListConsumerGroupsResponse.php b/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/ListConsumerGroupsResponse.php deleted file mode 100644 index abcaff0766b1..000000000000 --- a/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/ListConsumerGroupsResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.managedkafka.v1.ListConsumerGroupsResponse - */ -class ListConsumerGroupsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of consumer group in the requested parent. The order of the - * consumer groups is unspecified. - * - * Generated from protobuf field repeated .google.cloud.managedkafka.v1.ConsumerGroup consumer_groups = 1; - */ - private $consumer_groups; - /** - * A token that can be sent as `page_token` to retrieve the next page of - * results. If this field is omitted, there are no more results. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\ManagedKafka\V1\ConsumerGroup>|\Google\Protobuf\Internal\RepeatedField $consumer_groups - * The list of consumer group in the requested parent. The order of the - * consumer groups is unspecified. - * @type string $next_page_token - * A token that can be sent as `page_token` to retrieve the next page of - * results. If this field is omitted, there are no more results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Managedkafka\V1\ManagedKafka::initOnce(); - parent::__construct($data); - } - - /** - * The list of consumer group in the requested parent. The order of the - * consumer groups is unspecified. - * - * Generated from protobuf field repeated .google.cloud.managedkafka.v1.ConsumerGroup consumer_groups = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getConsumerGroups() - { - return $this->consumer_groups; - } - - /** - * The list of consumer group in the requested parent. The order of the - * consumer groups is unspecified. - * - * Generated from protobuf field repeated .google.cloud.managedkafka.v1.ConsumerGroup consumer_groups = 1; - * @param array<\Google\Cloud\ManagedKafka\V1\ConsumerGroup>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setConsumerGroups($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ManagedKafka\V1\ConsumerGroup::class); - $this->consumer_groups = $arr; - - return $this; - } - - /** - * A token that can be sent as `page_token` to retrieve the next page of - * results. If this field is omitted, there are no more results. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token that can be sent as `page_token` to retrieve the next page of - * results. If this field is omitted, there are no more results. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/ListTopicsRequest.php b/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/ListTopicsRequest.php deleted file mode 100644 index cae01297e741..000000000000 --- a/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/ListTopicsRequest.php +++ /dev/null @@ -1,174 +0,0 @@ -google.cloud.managedkafka.v1.ListTopicsRequest - */ -class ListTopicsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent cluster whose topics are to be listed. Structured like - * `projects/{project}/locations/{location}/clusters/{cluster}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The maximum number of topics to return. The service may return - * fewer than this value. If unset or zero, all topics for the parent is - * returned. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. A page token, received from a previous `ListTopics` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListTopics` must match - * the call that provided the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The parent cluster whose topics are to be listed. Structured like - * `projects/{project}/locations/{location}/clusters/{cluster}`. Please see - * {@see ManagedKafkaClient::clusterName()} for help formatting this field. - * - * @return \Google\Cloud\ManagedKafka\V1\ListTopicsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent cluster whose topics are to be listed. Structured like - * `projects/{project}/locations/{location}/clusters/{cluster}`. - * @type int $page_size - * Optional. The maximum number of topics to return. The service may return - * fewer than this value. If unset or zero, all topics for the parent is - * returned. - * @type string $page_token - * Optional. A page token, received from a previous `ListTopics` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListTopics` must match - * the call that provided the page token. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Managedkafka\V1\ManagedKafka::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent cluster whose topics are to be listed. Structured like - * `projects/{project}/locations/{location}/clusters/{cluster}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent cluster whose topics are to be listed. Structured like - * `projects/{project}/locations/{location}/clusters/{cluster}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. The maximum number of topics to return. The service may return - * fewer than this value. If unset or zero, all topics for the parent is - * returned. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of topics to return. The service may return - * fewer than this value. If unset or zero, all topics for the parent is - * returned. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. A page token, received from a previous `ListTopics` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListTopics` must match - * the call that provided the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. A page token, received from a previous `ListTopics` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListTopics` must match - * the call that provided the page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/ListTopicsResponse.php b/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/ListTopicsResponse.php deleted file mode 100644 index c9437db1809b..000000000000 --- a/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/ListTopicsResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.managedkafka.v1.ListTopicsResponse - */ -class ListTopicsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of topics in the requested parent. The order of the topics is - * unspecified. - * - * Generated from protobuf field repeated .google.cloud.managedkafka.v1.Topic topics = 1; - */ - private $topics; - /** - * A token that can be sent as `page_token` to retrieve the next page of - * results. If this field is omitted, there are no more results. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\ManagedKafka\V1\Topic>|\Google\Protobuf\Internal\RepeatedField $topics - * The list of topics in the requested parent. The order of the topics is - * unspecified. - * @type string $next_page_token - * A token that can be sent as `page_token` to retrieve the next page of - * results. If this field is omitted, there are no more results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Managedkafka\V1\ManagedKafka::initOnce(); - parent::__construct($data); - } - - /** - * The list of topics in the requested parent. The order of the topics is - * unspecified. - * - * Generated from protobuf field repeated .google.cloud.managedkafka.v1.Topic topics = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTopics() - { - return $this->topics; - } - - /** - * The list of topics in the requested parent. The order of the topics is - * unspecified. - * - * Generated from protobuf field repeated .google.cloud.managedkafka.v1.Topic topics = 1; - * @param array<\Google\Cloud\ManagedKafka\V1\Topic>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTopics($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ManagedKafka\V1\Topic::class); - $this->topics = $arr; - - return $this; - } - - /** - * A token that can be sent as `page_token` to retrieve the next page of - * results. If this field is omitted, there are no more results. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token that can be sent as `page_token` to retrieve the next page of - * results. If this field is omitted, there are no more results. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/NetworkConfig.php b/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/NetworkConfig.php deleted file mode 100644 index c0efa7fdf8ad..000000000000 --- a/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/NetworkConfig.php +++ /dev/null @@ -1,96 +0,0 @@ -google.cloud.managedkafka.v1.NetworkConfig - */ -class NetworkConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the VPC subnet in which to create Private Service Connect - * (PSC) endpoints for the Kafka brokers and bootstrap address. Structured - * like: projects/{project}/regions/{region}/subnetworks/{subnet_id} - * The subnet must be located in the same region as the Kafka cluster. The - * project may differ. Multiple subnets from the same parent network must not - * be specified. - * The CIDR range of the subnet must be within the IPv4 address ranges for - * private networks, as specified in RFC 1918. - * - * Generated from protobuf field string subnet = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $subnet = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $subnet - * Required. Name of the VPC subnet in which to create Private Service Connect - * (PSC) endpoints for the Kafka brokers and bootstrap address. Structured - * like: projects/{project}/regions/{region}/subnetworks/{subnet_id} - * The subnet must be located in the same region as the Kafka cluster. The - * project may differ. Multiple subnets from the same parent network must not - * be specified. - * The CIDR range of the subnet must be within the IPv4 address ranges for - * private networks, as specified in RFC 1918. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Managedkafka\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the VPC subnet in which to create Private Service Connect - * (PSC) endpoints for the Kafka brokers and bootstrap address. Structured - * like: projects/{project}/regions/{region}/subnetworks/{subnet_id} - * The subnet must be located in the same region as the Kafka cluster. The - * project may differ. Multiple subnets from the same parent network must not - * be specified. - * The CIDR range of the subnet must be within the IPv4 address ranges for - * private networks, as specified in RFC 1918. - * - * Generated from protobuf field string subnet = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getSubnet() - { - return $this->subnet; - } - - /** - * Required. Name of the VPC subnet in which to create Private Service Connect - * (PSC) endpoints for the Kafka brokers and bootstrap address. Structured - * like: projects/{project}/regions/{region}/subnetworks/{subnet_id} - * The subnet must be located in the same region as the Kafka cluster. The - * project may differ. Multiple subnets from the same parent network must not - * be specified. - * The CIDR range of the subnet must be within the IPv4 address ranges for - * private networks, as specified in RFC 1918. - * - * Generated from protobuf field string subnet = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setSubnet($var) - { - GPBUtil::checkString($var, True); - $this->subnet = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/OperationMetadata.php b/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/OperationMetadata.php deleted file mode 100644 index ebfd69902bdd..000000000000 --- a/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/OperationMetadata.php +++ /dev/null @@ -1,307 +0,0 @@ -google.cloud.managedkafka.v1.OperationMetadata - */ -class OperationMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $end_time = null; - /** - * Output only. Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $target = ''; - /** - * Output only. Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $verb = ''; - /** - * Output only. Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $status_message = ''; - /** - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have been cancelled successfully - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. - * - * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $requested_cancellation = false; - /** - * Output only. API version used to start the operation. - * - * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $api_version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time the operation was created. - * @type \Google\Protobuf\Timestamp $end_time - * Output only. The time the operation finished running. - * @type string $target - * Output only. Server-defined resource path for the target of the operation. - * @type string $verb - * Output only. Name of the verb executed by the operation. - * @type string $status_message - * Output only. Human-readable status of the operation, if any. - * @type bool $requested_cancellation - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have been cancelled successfully - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. - * @type string $api_version - * Output only. API version used to start the operation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Managedkafka\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * Output only. The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * Output only. Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getTarget() - { - return $this->target; - } - - /** - * Output only. Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setTarget($var) - { - GPBUtil::checkString($var, True); - $this->target = $var; - - return $this; - } - - /** - * Output only. Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getVerb() - { - return $this->verb; - } - - /** - * Output only. Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setVerb($var) - { - GPBUtil::checkString($var, True); - $this->verb = $var; - - return $this; - } - - /** - * Output only. Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getStatusMessage() - { - return $this->status_message; - } - - /** - * Output only. Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setStatusMessage($var) - { - GPBUtil::checkString($var, True); - $this->status_message = $var; - - return $this; - } - - /** - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have been cancelled successfully - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. - * - * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getRequestedCancellation() - { - return $this->requested_cancellation; - } - - /** - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have been cancelled successfully - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. - * - * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setRequestedCancellation($var) - { - GPBUtil::checkBool($var); - $this->requested_cancellation = $var; - - return $this; - } - - /** - * Output only. API version used to start the operation. - * - * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getApiVersion() - { - return $this->api_version; - } - - /** - * Output only. API version used to start the operation. - * - * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setApiVersion($var) - { - GPBUtil::checkString($var, True); - $this->api_version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/RebalanceConfig.php b/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/RebalanceConfig.php deleted file mode 100644 index b13164db93f7..000000000000 --- a/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/RebalanceConfig.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.managedkafka.v1.RebalanceConfig - */ -class RebalanceConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The rebalance behavior for the cluster. - * When not specified, defaults to `NO_REBALANCE`. - * - * Generated from protobuf field .google.cloud.managedkafka.v1.RebalanceConfig.Mode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $mode = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $mode - * Optional. The rebalance behavior for the cluster. - * When not specified, defaults to `NO_REBALANCE`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Managedkafka\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The rebalance behavior for the cluster. - * When not specified, defaults to `NO_REBALANCE`. - * - * Generated from protobuf field .google.cloud.managedkafka.v1.RebalanceConfig.Mode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getMode() - { - return $this->mode; - } - - /** - * Optional. The rebalance behavior for the cluster. - * When not specified, defaults to `NO_REBALANCE`. - * - * Generated from protobuf field .google.cloud.managedkafka.v1.RebalanceConfig.Mode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\ManagedKafka\V1\RebalanceConfig\Mode::class); - $this->mode = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/RebalanceConfig/Mode.php b/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/RebalanceConfig/Mode.php deleted file mode 100644 index d2c73ce51672..000000000000 --- a/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/RebalanceConfig/Mode.php +++ /dev/null @@ -1,65 +0,0 @@ -google.cloud.managedkafka.v1.RebalanceConfig.Mode - */ -class Mode -{ - /** - * A mode was not specified. Do not use. - * - * Generated from protobuf enum MODE_UNSPECIFIED = 0; - */ - const MODE_UNSPECIFIED = 0; - /** - * Do not rebalance automatically. - * - * Generated from protobuf enum NO_REBALANCE = 1; - */ - const NO_REBALANCE = 1; - /** - * Automatically rebalance topic partitions among brokers when the - * cluster is scaled up. - * - * Generated from protobuf enum AUTO_REBALANCE_ON_SCALE_UP = 2; - */ - const AUTO_REBALANCE_ON_SCALE_UP = 2; - - private static $valueToName = [ - self::MODE_UNSPECIFIED => 'MODE_UNSPECIFIED', - self::NO_REBALANCE => 'NO_REBALANCE', - self::AUTO_REBALANCE_ON_SCALE_UP => 'AUTO_REBALANCE_ON_SCALE_UP', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Mode::class, \Google\Cloud\ManagedKafka\V1\RebalanceConfig_Mode::class); - diff --git a/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/Topic.php b/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/Topic.php deleted file mode 100644 index da04d6f0f968..000000000000 --- a/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/Topic.php +++ /dev/null @@ -1,201 +0,0 @@ -google.cloud.managedkafka.v1.Topic - */ -class Topic extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. The name of the topic. The `topic` segment is used when - * connecting directly to the cluster. Structured like: - * projects/{project}/locations/{location}/clusters/{cluster}/topics/{topic} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Required. The number of partitions this topic has. The partition count can - * only be increased, not decreased. Please note that if partitions are - * increased for a topic that has a key, the partitioning logic or the - * ordering of the messages will be affected. - * - * Generated from protobuf field int32 partition_count = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $partition_count = 0; - /** - * Required. Immutable. The number of replicas of each partition. A - * replication factor of 3 is recommended for high availability. - * - * Generated from protobuf field int32 replication_factor = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - */ - protected $replication_factor = 0; - /** - * Optional. Configurations for the topic that are overridden from the cluster - * defaults. The key of the map is a Kafka topic property name, for example: - * `cleanup.policy`, `compression.type`. - * - * Generated from protobuf field map configs = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $configs; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. The name of the topic. The `topic` segment is used when - * connecting directly to the cluster. Structured like: - * projects/{project}/locations/{location}/clusters/{cluster}/topics/{topic} - * @type int $partition_count - * Required. The number of partitions this topic has. The partition count can - * only be increased, not decreased. Please note that if partitions are - * increased for a topic that has a key, the partitioning logic or the - * ordering of the messages will be affected. - * @type int $replication_factor - * Required. Immutable. The number of replicas of each partition. A - * replication factor of 3 is recommended for high availability. - * @type array|\Google\Protobuf\Internal\MapField $configs - * Optional. Configurations for the topic that are overridden from the cluster - * defaults. The key of the map is a Kafka topic property name, for example: - * `cleanup.policy`, `compression.type`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Managedkafka\V1\Resources::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. The name of the topic. The `topic` segment is used when - * connecting directly to the cluster. Structured like: - * projects/{project}/locations/{location}/clusters/{cluster}/topics/{topic} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. The name of the topic. The `topic` segment is used when - * connecting directly to the cluster. Structured like: - * projects/{project}/locations/{location}/clusters/{cluster}/topics/{topic} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. The number of partitions this topic has. The partition count can - * only be increased, not decreased. Please note that if partitions are - * increased for a topic that has a key, the partitioning logic or the - * ordering of the messages will be affected. - * - * Generated from protobuf field int32 partition_count = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getPartitionCount() - { - return $this->partition_count; - } - - /** - * Required. The number of partitions this topic has. The partition count can - * only be increased, not decreased. Please note that if partitions are - * increased for a topic that has a key, the partitioning logic or the - * ordering of the messages will be affected. - * - * Generated from protobuf field int32 partition_count = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setPartitionCount($var) - { - GPBUtil::checkInt32($var); - $this->partition_count = $var; - - return $this; - } - - /** - * Required. Immutable. The number of replicas of each partition. A - * replication factor of 3 is recommended for high availability. - * - * Generated from protobuf field int32 replication_factor = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @return int - */ - public function getReplicationFactor() - { - return $this->replication_factor; - } - - /** - * Required. Immutable. The number of replicas of each partition. A - * replication factor of 3 is recommended for high availability. - * - * Generated from protobuf field int32 replication_factor = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @param int $var - * @return $this - */ - public function setReplicationFactor($var) - { - GPBUtil::checkInt32($var); - $this->replication_factor = $var; - - return $this; - } - - /** - * Optional. Configurations for the topic that are overridden from the cluster - * defaults. The key of the map is a Kafka topic property name, for example: - * `cleanup.policy`, `compression.type`. - * - * Generated from protobuf field map configs = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getConfigs() - { - return $this->configs; - } - - /** - * Optional. Configurations for the topic that are overridden from the cluster - * defaults. The key of the map is a Kafka topic property name, for example: - * `cleanup.policy`, `compression.type`. - * - * Generated from protobuf field map configs = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setConfigs($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->configs = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/UpdateClusterRequest.php b/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/UpdateClusterRequest.php deleted file mode 100644 index 93b64c314b65..000000000000 --- a/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/UpdateClusterRequest.php +++ /dev/null @@ -1,234 +0,0 @@ -google.cloud.managedkafka.v1.UpdateClusterRequest - */ -class UpdateClusterRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * cluster resource by the update. The fields specified in the update_mask are - * relative to the resource, not the full request. A field will be overwritten - * if it is in the mask. The mask is required and a value of * will update all - * fields. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * Required. The cluster to update. Its `name` field must be populated. - * - * Generated from protobuf field .google.cloud.managedkafka.v1.Cluster cluster = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $cluster = null; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID to avoid duplication of requests. If a request times out or - * fails, retrying with the same ID allows the server to recognize the - * previous attempt. For at least 60 minutes, the server ignores duplicate - * requests bearing the same ID. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID - * within 60 minutes of the last request, the server checks if an original - * operation with the same request ID was received. If so, the server ignores - * the second request. - * The request ID must be a valid UUID. A zero UUID is not supported - * (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - */ - protected $request_id = ''; - - /** - * @param \Google\Cloud\ManagedKafka\V1\Cluster $cluster Required. The cluster to update. Its `name` field must be populated. - * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the - * cluster resource by the update. The fields specified in the update_mask are - * relative to the resource, not the full request. A field will be overwritten - * if it is in the mask. The mask is required and a value of * will update all - * fields. - * - * @return \Google\Cloud\ManagedKafka\V1\UpdateClusterRequest - * - * @experimental - */ - public static function build(\Google\Cloud\ManagedKafka\V1\Cluster $cluster, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setCluster($cluster) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Field mask is used to specify the fields to be overwritten in the - * cluster resource by the update. The fields specified in the update_mask are - * relative to the resource, not the full request. A field will be overwritten - * if it is in the mask. The mask is required and a value of * will update all - * fields. - * @type \Google\Cloud\ManagedKafka\V1\Cluster $cluster - * Required. The cluster to update. Its `name` field must be populated. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID to avoid duplication of requests. If a request times out or - * fails, retrying with the same ID allows the server to recognize the - * previous attempt. For at least 60 minutes, the server ignores duplicate - * requests bearing the same ID. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID - * within 60 minutes of the last request, the server checks if an original - * operation with the same request ID was received. If so, the server ignores - * the second request. - * The request ID must be a valid UUID. A zero UUID is not supported - * (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Managedkafka\V1\ManagedKafka::initOnce(); - parent::__construct($data); - } - - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * cluster resource by the update. The fields specified in the update_mask are - * relative to the resource, not the full request. A field will be overwritten - * if it is in the mask. The mask is required and a value of * will update all - * fields. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * cluster resource by the update. The fields specified in the update_mask are - * relative to the resource, not the full request. A field will be overwritten - * if it is in the mask. The mask is required and a value of * will update all - * fields. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * Required. The cluster to update. Its `name` field must be populated. - * - * Generated from protobuf field .google.cloud.managedkafka.v1.Cluster cluster = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\ManagedKafka\V1\Cluster|null - */ - public function getCluster() - { - return $this->cluster; - } - - public function hasCluster() - { - return isset($this->cluster); - } - - public function clearCluster() - { - unset($this->cluster); - } - - /** - * Required. The cluster to update. Its `name` field must be populated. - * - * Generated from protobuf field .google.cloud.managedkafka.v1.Cluster cluster = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\ManagedKafka\V1\Cluster $var - * @return $this - */ - public function setCluster($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ManagedKafka\V1\Cluster::class); - $this->cluster = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID to avoid duplication of requests. If a request times out or - * fails, retrying with the same ID allows the server to recognize the - * previous attempt. For at least 60 minutes, the server ignores duplicate - * requests bearing the same ID. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID - * within 60 minutes of the last request, the server checks if an original - * operation with the same request ID was received. If so, the server ignores - * the second request. - * The request ID must be a valid UUID. A zero UUID is not supported - * (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID to avoid duplication of requests. If a request times out or - * fails, retrying with the same ID allows the server to recognize the - * previous attempt. For at least 60 minutes, the server ignores duplicate - * requests bearing the same ID. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID - * within 60 minutes of the last request, the server checks if an original - * operation with the same request ID was received. If so, the server ignores - * the second request. - * The request ID must be a valid UUID. A zero UUID is not supported - * (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/UpdateConsumerGroupRequest.php b/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/UpdateConsumerGroupRequest.php deleted file mode 100644 index dcdd3471a832..000000000000 --- a/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/UpdateConsumerGroupRequest.php +++ /dev/null @@ -1,156 +0,0 @@ -google.cloud.managedkafka.v1.UpdateConsumerGroupRequest - */ -class UpdateConsumerGroupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * ConsumerGroup resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. The - * mask is required and a value of * will update all fields. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * Required. The consumer group to update. Its `name` field must be populated. - * - * Generated from protobuf field .google.cloud.managedkafka.v1.ConsumerGroup consumer_group = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $consumer_group = null; - - /** - * @param \Google\Cloud\ManagedKafka\V1\ConsumerGroup $consumerGroup Required. The consumer group to update. Its `name` field must be populated. - * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the - * ConsumerGroup resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. The - * mask is required and a value of * will update all fields. - * - * @return \Google\Cloud\ManagedKafka\V1\UpdateConsumerGroupRequest - * - * @experimental - */ - public static function build(\Google\Cloud\ManagedKafka\V1\ConsumerGroup $consumerGroup, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setConsumerGroup($consumerGroup) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Field mask is used to specify the fields to be overwritten in the - * ConsumerGroup resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. The - * mask is required and a value of * will update all fields. - * @type \Google\Cloud\ManagedKafka\V1\ConsumerGroup $consumer_group - * Required. The consumer group to update. Its `name` field must be populated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Managedkafka\V1\ManagedKafka::initOnce(); - parent::__construct($data); - } - - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * ConsumerGroup resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. The - * mask is required and a value of * will update all fields. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * ConsumerGroup resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. The - * mask is required and a value of * will update all fields. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * Required. The consumer group to update. Its `name` field must be populated. - * - * Generated from protobuf field .google.cloud.managedkafka.v1.ConsumerGroup consumer_group = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\ManagedKafka\V1\ConsumerGroup|null - */ - public function getConsumerGroup() - { - return $this->consumer_group; - } - - public function hasConsumerGroup() - { - return isset($this->consumer_group); - } - - public function clearConsumerGroup() - { - unset($this->consumer_group); - } - - /** - * Required. The consumer group to update. Its `name` field must be populated. - * - * Generated from protobuf field .google.cloud.managedkafka.v1.ConsumerGroup consumer_group = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\ManagedKafka\V1\ConsumerGroup $var - * @return $this - */ - public function setConsumerGroup($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ManagedKafka\V1\ConsumerGroup::class); - $this->consumer_group = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/UpdateTopicRequest.php b/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/UpdateTopicRequest.php deleted file mode 100644 index 3e2a1f8792eb..000000000000 --- a/owl-bot-staging/ManagedKafka/v1/proto/src/Google/Cloud/ManagedKafka/V1/UpdateTopicRequest.php +++ /dev/null @@ -1,156 +0,0 @@ -google.cloud.managedkafka.v1.UpdateTopicRequest - */ -class UpdateTopicRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * Topic resource by the update. The fields specified in the update_mask are - * relative to the resource, not the full request. A field will be overwritten - * if it is in the mask. The mask is required and a value of * will update all - * fields. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * Required. The topic to update. Its `name` field must be populated. - * - * Generated from protobuf field .google.cloud.managedkafka.v1.Topic topic = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $topic = null; - - /** - * @param \Google\Cloud\ManagedKafka\V1\Topic $topic Required. The topic to update. Its `name` field must be populated. - * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the - * Topic resource by the update. The fields specified in the update_mask are - * relative to the resource, not the full request. A field will be overwritten - * if it is in the mask. The mask is required and a value of * will update all - * fields. - * - * @return \Google\Cloud\ManagedKafka\V1\UpdateTopicRequest - * - * @experimental - */ - public static function build(\Google\Cloud\ManagedKafka\V1\Topic $topic, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setTopic($topic) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Field mask is used to specify the fields to be overwritten in the - * Topic resource by the update. The fields specified in the update_mask are - * relative to the resource, not the full request. A field will be overwritten - * if it is in the mask. The mask is required and a value of * will update all - * fields. - * @type \Google\Cloud\ManagedKafka\V1\Topic $topic - * Required. The topic to update. Its `name` field must be populated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Managedkafka\V1\ManagedKafka::initOnce(); - parent::__construct($data); - } - - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * Topic resource by the update. The fields specified in the update_mask are - * relative to the resource, not the full request. A field will be overwritten - * if it is in the mask. The mask is required and a value of * will update all - * fields. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * Topic resource by the update. The fields specified in the update_mask are - * relative to the resource, not the full request. A field will be overwritten - * if it is in the mask. The mask is required and a value of * will update all - * fields. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * Required. The topic to update. Its `name` field must be populated. - * - * Generated from protobuf field .google.cloud.managedkafka.v1.Topic topic = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\ManagedKafka\V1\Topic|null - */ - public function getTopic() - { - return $this->topic; - } - - public function hasTopic() - { - return isset($this->topic); - } - - public function clearTopic() - { - unset($this->topic); - } - - /** - * Required. The topic to update. Its `name` field must be populated. - * - * Generated from protobuf field .google.cloud.managedkafka.v1.Topic topic = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\ManagedKafka\V1\Topic $var - * @return $this - */ - public function setTopic($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ManagedKafka\V1\Topic::class); - $this->topic = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/create_cluster.php b/owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/create_cluster.php deleted file mode 100644 index 2a7f3f1cc01a..000000000000 --- a/owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/create_cluster.php +++ /dev/null @@ -1,138 +0,0 @@ -setSubnet($clusterGcpConfigAccessConfigNetworkConfigsSubnet); - $clusterGcpConfigAccessConfigNetworkConfigs = [$networkConfig,]; - $clusterGcpConfigAccessConfig = (new AccessConfig()) - ->setNetworkConfigs($clusterGcpConfigAccessConfigNetworkConfigs); - $clusterGcpConfig = (new GcpConfig()) - ->setAccessConfig($clusterGcpConfigAccessConfig); - $clusterCapacityConfig = (new CapacityConfig()) - ->setVcpuCount($clusterCapacityConfigVcpuCount) - ->setMemoryBytes($clusterCapacityConfigMemoryBytes); - $cluster = (new Cluster()) - ->setGcpConfig($clusterGcpConfig) - ->setCapacityConfig($clusterCapacityConfig); - $request = (new CreateClusterRequest()) - ->setParent($formattedParent) - ->setClusterId($clusterId) - ->setCluster($cluster); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $managedKafkaClient->createCluster($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Cluster $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = ManagedKafkaClient::locationName('[PROJECT]', '[LOCATION]'); - $clusterId = '[CLUSTER_ID]'; - $clusterGcpConfigAccessConfigNetworkConfigsSubnet = '[SUBNET]'; - $clusterCapacityConfigVcpuCount = 0; - $clusterCapacityConfigMemoryBytes = 0; - - create_cluster_sample( - $formattedParent, - $clusterId, - $clusterGcpConfigAccessConfigNetworkConfigsSubnet, - $clusterCapacityConfigVcpuCount, - $clusterCapacityConfigMemoryBytes - ); -} -// [END managedkafka_v1_generated_ManagedKafka_CreateCluster_sync] diff --git a/owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/create_topic.php b/owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/create_topic.php deleted file mode 100644 index 0cc45662eb29..000000000000 --- a/owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/create_topic.php +++ /dev/null @@ -1,95 +0,0 @@ -setPartitionCount($topicPartitionCount) - ->setReplicationFactor($topicReplicationFactor); - $request = (new CreateTopicRequest()) - ->setParent($formattedParent) - ->setTopicId($topicId) - ->setTopic($topic); - - // Call the API and handle any network failures. - try { - /** @var Topic $response */ - $response = $managedKafkaClient->createTopic($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = ManagedKafkaClient::clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); - $topicId = '[TOPIC_ID]'; - $topicPartitionCount = 0; - $topicReplicationFactor = 0; - - create_topic_sample($formattedParent, $topicId, $topicPartitionCount, $topicReplicationFactor); -} -// [END managedkafka_v1_generated_ManagedKafka_CreateTopic_sync] diff --git a/owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/delete_cluster.php b/owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/delete_cluster.php deleted file mode 100644 index f028249f7cd8..000000000000 --- a/owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/delete_cluster.php +++ /dev/null @@ -1,80 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $managedKafkaClient->deleteCluster($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = ManagedKafkaClient::clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); - - delete_cluster_sample($formattedName); -} -// [END managedkafka_v1_generated_ManagedKafka_DeleteCluster_sync] diff --git a/owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/delete_consumer_group.php b/owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/delete_consumer_group.php deleted file mode 100644 index d953c6d7c30e..000000000000 --- a/owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/delete_consumer_group.php +++ /dev/null @@ -1,75 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $managedKafkaClient->deleteConsumerGroup($request); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = ManagedKafkaClient::consumerGroupName( - '[PROJECT]', - '[LOCATION]', - '[CLUSTER]', - '[CONSUMER_GROUP]' - ); - - delete_consumer_group_sample($formattedName); -} -// [END managedkafka_v1_generated_ManagedKafka_DeleteConsumerGroup_sync] diff --git a/owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/delete_topic.php b/owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/delete_topic.php deleted file mode 100644 index f2e8ee9e3cbf..000000000000 --- a/owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/delete_topic.php +++ /dev/null @@ -1,70 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $managedKafkaClient->deleteTopic($request); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = ManagedKafkaClient::topicName('[PROJECT]', '[LOCATION]', '[CLUSTER]', '[TOPIC]'); - - delete_topic_sample($formattedName); -} -// [END managedkafka_v1_generated_ManagedKafka_DeleteTopic_sync] diff --git a/owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/get_cluster.php b/owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/get_cluster.php deleted file mode 100644 index 5c3fc319d4f9..000000000000 --- a/owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/get_cluster.php +++ /dev/null @@ -1,71 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Cluster $response */ - $response = $managedKafkaClient->getCluster($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = ManagedKafkaClient::clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); - - get_cluster_sample($formattedName); -} -// [END managedkafka_v1_generated_ManagedKafka_GetCluster_sync] diff --git a/owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/get_consumer_group.php b/owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/get_consumer_group.php deleted file mode 100644 index ebbfda931847..000000000000 --- a/owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/get_consumer_group.php +++ /dev/null @@ -1,77 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var ConsumerGroup $response */ - $response = $managedKafkaClient->getConsumerGroup($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = ManagedKafkaClient::consumerGroupName( - '[PROJECT]', - '[LOCATION]', - '[CLUSTER]', - '[CONSUMER_GROUP]' - ); - - get_consumer_group_sample($formattedName); -} -// [END managedkafka_v1_generated_ManagedKafka_GetConsumerGroup_sync] diff --git a/owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/get_location.php b/owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/get_location.php deleted file mode 100644 index 54ef42f76ae7..000000000000 --- a/owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/get_location.php +++ /dev/null @@ -1,57 +0,0 @@ -getLocation($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END managedkafka_v1_generated_ManagedKafka_GetLocation_sync] diff --git a/owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/get_topic.php b/owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/get_topic.php deleted file mode 100644 index 48c3f4d04e00..000000000000 --- a/owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/get_topic.php +++ /dev/null @@ -1,73 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Topic $response */ - $response = $managedKafkaClient->getTopic($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = ManagedKafkaClient::topicName('[PROJECT]', '[LOCATION]', '[CLUSTER]', '[TOPIC]'); - - get_topic_sample($formattedName); -} -// [END managedkafka_v1_generated_ManagedKafka_GetTopic_sync] diff --git a/owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/list_clusters.php b/owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/list_clusters.php deleted file mode 100644 index 0a4b0a051a9f..000000000000 --- a/owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/list_clusters.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $managedKafkaClient->listClusters($request); - - /** @var Cluster $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = ManagedKafkaClient::locationName('[PROJECT]', '[LOCATION]'); - - list_clusters_sample($formattedParent); -} -// [END managedkafka_v1_generated_ManagedKafka_ListClusters_sync] diff --git a/owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/list_consumer_groups.php b/owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/list_consumer_groups.php deleted file mode 100644 index 7ab0b78142b1..000000000000 --- a/owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/list_consumer_groups.php +++ /dev/null @@ -1,78 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $managedKafkaClient->listConsumerGroups($request); - - /** @var ConsumerGroup $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = ManagedKafkaClient::clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); - - list_consumer_groups_sample($formattedParent); -} -// [END managedkafka_v1_generated_ManagedKafka_ListConsumerGroups_sync] diff --git a/owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/list_locations.php b/owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/list_locations.php deleted file mode 100644 index c7aec8b4850e..000000000000 --- a/owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/list_locations.php +++ /dev/null @@ -1,62 +0,0 @@ -listLocations($request); - - /** @var Location $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END managedkafka_v1_generated_ManagedKafka_ListLocations_sync] diff --git a/owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/list_topics.php b/owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/list_topics.php deleted file mode 100644 index 90860be6b9db..000000000000 --- a/owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/list_topics.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $managedKafkaClient->listTopics($request); - - /** @var Topic $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = ManagedKafkaClient::clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); - - list_topics_sample($formattedParent); -} -// [END managedkafka_v1_generated_ManagedKafka_ListTopics_sync] diff --git a/owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/update_cluster.php b/owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/update_cluster.php deleted file mode 100644 index 61e3c38aa419..000000000000 --- a/owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/update_cluster.php +++ /dev/null @@ -1,124 +0,0 @@ -setSubnet($clusterGcpConfigAccessConfigNetworkConfigsSubnet); - $clusterGcpConfigAccessConfigNetworkConfigs = [$networkConfig,]; - $clusterGcpConfigAccessConfig = (new AccessConfig()) - ->setNetworkConfigs($clusterGcpConfigAccessConfigNetworkConfigs); - $clusterGcpConfig = (new GcpConfig()) - ->setAccessConfig($clusterGcpConfigAccessConfig); - $clusterCapacityConfig = (new CapacityConfig()) - ->setVcpuCount($clusterCapacityConfigVcpuCount) - ->setMemoryBytes($clusterCapacityConfigMemoryBytes); - $cluster = (new Cluster()) - ->setGcpConfig($clusterGcpConfig) - ->setCapacityConfig($clusterCapacityConfig); - $request = (new UpdateClusterRequest()) - ->setUpdateMask($updateMask) - ->setCluster($cluster); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $managedKafkaClient->updateCluster($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Cluster $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $clusterGcpConfigAccessConfigNetworkConfigsSubnet = '[SUBNET]'; - $clusterCapacityConfigVcpuCount = 0; - $clusterCapacityConfigMemoryBytes = 0; - - update_cluster_sample( - $clusterGcpConfigAccessConfigNetworkConfigsSubnet, - $clusterCapacityConfigVcpuCount, - $clusterCapacityConfigMemoryBytes - ); -} -// [END managedkafka_v1_generated_ManagedKafka_UpdateCluster_sync] diff --git a/owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/update_consumer_group.php b/owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/update_consumer_group.php deleted file mode 100644 index 91b8e7b0091f..000000000000 --- a/owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/update_consumer_group.php +++ /dev/null @@ -1,62 +0,0 @@ -setUpdateMask($updateMask) - ->setConsumerGroup($consumerGroup); - - // Call the API and handle any network failures. - try { - /** @var ConsumerGroup $response */ - $response = $managedKafkaClient->updateConsumerGroup($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END managedkafka_v1_generated_ManagedKafka_UpdateConsumerGroup_sync] diff --git a/owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/update_topic.php b/owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/update_topic.php deleted file mode 100644 index cc41bac1056f..000000000000 --- a/owl-bot-staging/ManagedKafka/v1/samples/V1/ManagedKafkaClient/update_topic.php +++ /dev/null @@ -1,82 +0,0 @@ -setPartitionCount($topicPartitionCount) - ->setReplicationFactor($topicReplicationFactor); - $request = (new UpdateTopicRequest()) - ->setUpdateMask($updateMask) - ->setTopic($topic); - - // Call the API and handle any network failures. - try { - /** @var Topic $response */ - $response = $managedKafkaClient->updateTopic($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $topicPartitionCount = 0; - $topicReplicationFactor = 0; - - update_topic_sample($topicPartitionCount, $topicReplicationFactor); -} -// [END managedkafka_v1_generated_ManagedKafka_UpdateTopic_sync] diff --git a/owl-bot-staging/ManagedKafka/v1/src/V1/Client/ManagedKafkaClient.php b/owl-bot-staging/ManagedKafka/v1/src/V1/Client/ManagedKafkaClient.php deleted file mode 100644 index daeef68cb1a3..000000000000 --- a/owl-bot-staging/ManagedKafka/v1/src/V1/Client/ManagedKafkaClient.php +++ /dev/null @@ -1,802 +0,0 @@ - createClusterAsync(CreateClusterRequest $request, array $optionalArgs = []) - * @method PromiseInterface createTopicAsync(CreateTopicRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteClusterAsync(DeleteClusterRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteConsumerGroupAsync(DeleteConsumerGroupRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteTopicAsync(DeleteTopicRequest $request, array $optionalArgs = []) - * @method PromiseInterface getClusterAsync(GetClusterRequest $request, array $optionalArgs = []) - * @method PromiseInterface getConsumerGroupAsync(GetConsumerGroupRequest $request, array $optionalArgs = []) - * @method PromiseInterface getTopicAsync(GetTopicRequest $request, array $optionalArgs = []) - * @method PromiseInterface listClustersAsync(ListClustersRequest $request, array $optionalArgs = []) - * @method PromiseInterface listConsumerGroupsAsync(ListConsumerGroupsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listTopicsAsync(ListTopicsRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateClusterAsync(UpdateClusterRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateConsumerGroupAsync(UpdateConsumerGroupRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateTopicAsync(UpdateTopicRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) - */ -final class ManagedKafkaClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.managedkafka.v1.ManagedKafka'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'managedkafka.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'managedkafka.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/managed_kafka_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/managed_kafka_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/managed_kafka_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/managed_kafka_rest_client_config.php', - ], - ], - ]; - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Create the default operation client for the service. - * - * @param array $options ClientOptions for the client. - * - * @return OperationsClient - */ - private function createOperationsClient(array $options) - { - // Unset client-specific configuration options - unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); - - if (isset($options['operationsClient'])) { - return $options['operationsClient']; - } - - return new OperationsClient($options); - } - - /** - * Formats a string containing the fully-qualified path to represent a cluster - * resource. - * - * @param string $project - * @param string $location - * @param string $cluster - * - * @return string The formatted cluster resource. - */ - public static function clusterName(string $project, string $location, string $cluster): string - { - return self::getPathTemplate('cluster')->render([ - 'project' => $project, - 'location' => $location, - 'cluster' => $cluster, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * consumer_group resource. - * - * @param string $project - * @param string $location - * @param string $cluster - * @param string $consumerGroup - * - * @return string The formatted consumer_group resource. - */ - public static function consumerGroupName(string $project, string $location, string $cluster, string $consumerGroup): string - { - return self::getPathTemplate('consumerGroup')->render([ - 'project' => $project, - 'location' => $location, - 'cluster' => $cluster, - 'consumer_group' => $consumerGroup, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a crypto_key - * resource. - * - * @param string $project - * @param string $location - * @param string $keyRing - * @param string $cryptoKey - * - * @return string The formatted crypto_key resource. - */ - public static function cryptoKeyName(string $project, string $location, string $keyRing, string $cryptoKey): string - { - return self::getPathTemplate('cryptoKey')->render([ - 'project' => $project, - 'location' => $location, - 'key_ring' => $keyRing, - 'crypto_key' => $cryptoKey, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a location - * resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted location resource. - */ - public static function locationName(string $project, string $location): string - { - return self::getPathTemplate('location')->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a topic - * resource. - * - * @param string $project - * @param string $location - * @param string $cluster - * @param string $topic - * - * @return string The formatted topic resource. - */ - public static function topicName(string $project, string $location, string $cluster, string $topic): string - { - return self::getPathTemplate('topic')->render([ - 'project' => $project, - 'location' => $location, - 'cluster' => $cluster, - 'topic' => $topic, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - cluster: projects/{project}/locations/{location}/clusters/{cluster} - * - consumerGroup: projects/{project}/locations/{location}/clusters/{cluster}/consumerGroups/{consumer_group} - * - cryptoKey: projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key} - * - location: projects/{project}/locations/{location} - * - topic: projects/{project}/locations/{location}/clusters/{cluster}/topics/{topic} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param ?string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, ?string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'managedkafka.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Creates a new cluster in a given project and location. - * - * The async variant is {@see ManagedKafkaClient::createClusterAsync()} . - * - * @example samples/V1/ManagedKafkaClient/create_cluster.php - * - * @param CreateClusterRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createCluster(CreateClusterRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateCluster', $request, $callOptions)->wait(); - } - - /** - * Creates a new topic in a given project and location. - * - * The async variant is {@see ManagedKafkaClient::createTopicAsync()} . - * - * @example samples/V1/ManagedKafkaClient/create_topic.php - * - * @param CreateTopicRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Topic - * - * @throws ApiException Thrown if the API call fails. - */ - public function createTopic(CreateTopicRequest $request, array $callOptions = []): Topic - { - return $this->startApiCall('CreateTopic', $request, $callOptions)->wait(); - } - - /** - * Deletes a single cluster. - * - * The async variant is {@see ManagedKafkaClient::deleteClusterAsync()} . - * - * @example samples/V1/ManagedKafkaClient/delete_cluster.php - * - * @param DeleteClusterRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteCluster(DeleteClusterRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteCluster', $request, $callOptions)->wait(); - } - - /** - * Deletes a single consumer group. - * - * The async variant is {@see ManagedKafkaClient::deleteConsumerGroupAsync()} . - * - * @example samples/V1/ManagedKafkaClient/delete_consumer_group.php - * - * @param DeleteConsumerGroupRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteConsumerGroup(DeleteConsumerGroupRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteConsumerGroup', $request, $callOptions)->wait(); - } - - /** - * Deletes a single topic. - * - * The async variant is {@see ManagedKafkaClient::deleteTopicAsync()} . - * - * @example samples/V1/ManagedKafkaClient/delete_topic.php - * - * @param DeleteTopicRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteTopic(DeleteTopicRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteTopic', $request, $callOptions)->wait(); - } - - /** - * Returns the properties of a single cluster. - * - * The async variant is {@see ManagedKafkaClient::getClusterAsync()} . - * - * @example samples/V1/ManagedKafkaClient/get_cluster.php - * - * @param GetClusterRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Cluster - * - * @throws ApiException Thrown if the API call fails. - */ - public function getCluster(GetClusterRequest $request, array $callOptions = []): Cluster - { - return $this->startApiCall('GetCluster', $request, $callOptions)->wait(); - } - - /** - * Returns the properties of a single consumer group. - * - * The async variant is {@see ManagedKafkaClient::getConsumerGroupAsync()} . - * - * @example samples/V1/ManagedKafkaClient/get_consumer_group.php - * - * @param GetConsumerGroupRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return ConsumerGroup - * - * @throws ApiException Thrown if the API call fails. - */ - public function getConsumerGroup(GetConsumerGroupRequest $request, array $callOptions = []): ConsumerGroup - { - return $this->startApiCall('GetConsumerGroup', $request, $callOptions)->wait(); - } - - /** - * Returns the properties of a single topic. - * - * The async variant is {@see ManagedKafkaClient::getTopicAsync()} . - * - * @example samples/V1/ManagedKafkaClient/get_topic.php - * - * @param GetTopicRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Topic - * - * @throws ApiException Thrown if the API call fails. - */ - public function getTopic(GetTopicRequest $request, array $callOptions = []): Topic - { - return $this->startApiCall('GetTopic', $request, $callOptions)->wait(); - } - - /** - * Lists the clusters in a given project and location. - * - * The async variant is {@see ManagedKafkaClient::listClustersAsync()} . - * - * @example samples/V1/ManagedKafkaClient/list_clusters.php - * - * @param ListClustersRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listClusters(ListClustersRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListClusters', $request, $callOptions); - } - - /** - * Lists the consumer groups in a given cluster. - * - * The async variant is {@see ManagedKafkaClient::listConsumerGroupsAsync()} . - * - * @example samples/V1/ManagedKafkaClient/list_consumer_groups.php - * - * @param ListConsumerGroupsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listConsumerGroups(ListConsumerGroupsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListConsumerGroups', $request, $callOptions); - } - - /** - * Lists the topics in a given cluster. - * - * The async variant is {@see ManagedKafkaClient::listTopicsAsync()} . - * - * @example samples/V1/ManagedKafkaClient/list_topics.php - * - * @param ListTopicsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listTopics(ListTopicsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListTopics', $request, $callOptions); - } - - /** - * Updates the properties of a single cluster. - * - * The async variant is {@see ManagedKafkaClient::updateClusterAsync()} . - * - * @example samples/V1/ManagedKafkaClient/update_cluster.php - * - * @param UpdateClusterRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateCluster(UpdateClusterRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateCluster', $request, $callOptions)->wait(); - } - - /** - * Updates the properties of a single consumer group. - * - * The async variant is {@see ManagedKafkaClient::updateConsumerGroupAsync()} . - * - * @example samples/V1/ManagedKafkaClient/update_consumer_group.php - * - * @param UpdateConsumerGroupRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return ConsumerGroup - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateConsumerGroup(UpdateConsumerGroupRequest $request, array $callOptions = []): ConsumerGroup - { - return $this->startApiCall('UpdateConsumerGroup', $request, $callOptions)->wait(); - } - - /** - * Updates the properties of a single topic. - * - * The async variant is {@see ManagedKafkaClient::updateTopicAsync()} . - * - * @example samples/V1/ManagedKafkaClient/update_topic.php - * - * @param UpdateTopicRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Topic - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateTopic(UpdateTopicRequest $request, array $callOptions = []): Topic - { - return $this->startApiCall('UpdateTopic', $request, $callOptions)->wait(); - } - - /** - * Gets information about a location. - * - * The async variant is {@see ManagedKafkaClient::getLocationAsync()} . - * - * @example samples/V1/ManagedKafkaClient/get_location.php - * - * @param GetLocationRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Location - * - * @throws ApiException Thrown if the API call fails. - */ - public function getLocation(GetLocationRequest $request, array $callOptions = []): Location - { - return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * The async variant is {@see ManagedKafkaClient::listLocationsAsync()} . - * - * @example samples/V1/ManagedKafkaClient/list_locations.php - * - * @param ListLocationsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListLocations', $request, $callOptions); - } -} diff --git a/owl-bot-staging/ManagedKafka/v1/src/V1/gapic_metadata.json b/owl-bot-staging/ManagedKafka/v1/src/V1/gapic_metadata.json deleted file mode 100644 index 52eab10d2dac..000000000000 --- a/owl-bot-staging/ManagedKafka/v1/src/V1/gapic_metadata.json +++ /dev/null @@ -1,98 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.managedkafka.v1", - "libraryPackage": "Google\\Cloud\\ManagedKafka\\V1", - "services": { - "ManagedKafka": { - "clients": { - "grpc": { - "libraryClient": "ManagedKafkaGapicClient", - "rpcs": { - "CreateCluster": { - "methods": [ - "createCluster" - ] - }, - "CreateTopic": { - "methods": [ - "createTopic" - ] - }, - "DeleteCluster": { - "methods": [ - "deleteCluster" - ] - }, - "DeleteConsumerGroup": { - "methods": [ - "deleteConsumerGroup" - ] - }, - "DeleteTopic": { - "methods": [ - "deleteTopic" - ] - }, - "GetCluster": { - "methods": [ - "getCluster" - ] - }, - "GetConsumerGroup": { - "methods": [ - "getConsumerGroup" - ] - }, - "GetTopic": { - "methods": [ - "getTopic" - ] - }, - "ListClusters": { - "methods": [ - "listClusters" - ] - }, - "ListConsumerGroups": { - "methods": [ - "listConsumerGroups" - ] - }, - "ListTopics": { - "methods": [ - "listTopics" - ] - }, - "UpdateCluster": { - "methods": [ - "updateCluster" - ] - }, - "UpdateConsumerGroup": { - "methods": [ - "updateConsumerGroup" - ] - }, - "UpdateTopic": { - "methods": [ - "updateTopic" - ] - }, - "GetLocation": { - "methods": [ - "getLocation" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/ManagedKafka/v1/src/V1/resources/managed_kafka_client_config.json b/owl-bot-staging/ManagedKafka/v1/src/V1/resources/managed_kafka_client_config.json deleted file mode 100644 index 8585444e9db2..000000000000 --- a/owl-bot-staging/ManagedKafka/v1/src/V1/resources/managed_kafka_client_config.json +++ /dev/null @@ -1,124 +0,0 @@ -{ - "interfaces": { - "google.cloud.managedkafka.v1.ManagedKafka": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE" - ], - "no_retry_1_codes": [] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "retry_policy_1_params": { - "initial_retry_delay_millis": 1000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 10000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - }, - "no_retry_1_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": { - "CreateCluster": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateTopic": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteCluster": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteConsumerGroup": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteTopic": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetCluster": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetConsumerGroup": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetTopic": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListClusters": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListConsumerGroups": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListTopics": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateCluster": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateConsumerGroup": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateTopic": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetLocation": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListLocations": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - } - } - } - } -} diff --git a/owl-bot-staging/ManagedKafka/v1/src/V1/resources/managed_kafka_descriptor_config.php b/owl-bot-staging/ManagedKafka/v1/src/V1/resources/managed_kafka_descriptor_config.php deleted file mode 100644 index 37b43b976d5a..000000000000 --- a/owl-bot-staging/ManagedKafka/v1/src/V1/resources/managed_kafka_descriptor_config.php +++ /dev/null @@ -1,285 +0,0 @@ - [ - 'google.cloud.managedkafka.v1.ManagedKafka' => [ - 'CreateCluster' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\ManagedKafka\V1\Cluster', - 'metadataReturnType' => '\Google\Cloud\ManagedKafka\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteCluster' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\ManagedKafka\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateCluster' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\ManagedKafka\V1\Cluster', - 'metadataReturnType' => '\Google\Cloud\ManagedKafka\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'cluster.name', - 'fieldAccessors' => [ - 'getCluster', - 'getName', - ], - ], - ], - ], - 'CreateTopic' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\ManagedKafka\V1\Topic', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteConsumerGroup' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteTopic' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetCluster' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\ManagedKafka\V1\Cluster', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetConsumerGroup' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\ManagedKafka\V1\ConsumerGroup', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetTopic' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\ManagedKafka\V1\Topic', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListClusters' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getClusters', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\ManagedKafka\V1\ListClustersResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListConsumerGroups' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getConsumerGroups', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\ManagedKafka\V1\ListConsumerGroupsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListTopics' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getTopics', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\ManagedKafka\V1\ListTopicsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateConsumerGroup' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\ManagedKafka\V1\ConsumerGroup', - 'headerParams' => [ - [ - 'keyName' => 'consumer_group.name', - 'fieldAccessors' => [ - 'getConsumerGroup', - 'getName', - ], - ], - ], - ], - 'UpdateTopic' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\ManagedKafka\V1\Topic', - 'headerParams' => [ - [ - 'keyName' => 'topic.name', - 'fieldAccessors' => [ - 'getTopic', - 'getName', - ], - ], - ], - ], - 'GetLocation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Location\Location', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'ListLocations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLocations', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'templateMap' => [ - 'cluster' => 'projects/{project}/locations/{location}/clusters/{cluster}', - 'consumerGroup' => 'projects/{project}/locations/{location}/clusters/{cluster}/consumerGroups/{consumer_group}', - 'cryptoKey' => 'projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}', - 'location' => 'projects/{project}/locations/{location}', - 'topic' => 'projects/{project}/locations/{location}/clusters/{cluster}/topics/{topic}', - ], - ], - ], -]; diff --git a/owl-bot-staging/ManagedKafka/v1/src/V1/resources/managed_kafka_rest_client_config.php b/owl-bot-staging/ManagedKafka/v1/src/V1/resources/managed_kafka_rest_client_config.php deleted file mode 100644 index f6fcea12de47..000000000000 --- a/owl-bot-staging/ManagedKafka/v1/src/V1/resources/managed_kafka_rest_client_config.php +++ /dev/null @@ -1,277 +0,0 @@ - [ - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.cloud.managedkafka.v1.ManagedKafka' => [ - 'CreateCluster' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/clusters', - 'body' => 'cluster', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'cluster_id', - ], - ], - 'CreateTopic' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/clusters/*}/topics', - 'body' => 'topic', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'topic_id', - ], - ], - 'DeleteCluster' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/clusters/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteConsumerGroup' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/clusters/*/consumerGroups/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteTopic' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/clusters/*/topics/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetCluster' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/clusters/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetConsumerGroup' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/clusters/*/consumerGroups/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetTopic' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/clusters/*/topics/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListClusters' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/clusters', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListConsumerGroups' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/clusters/*}/consumerGroups', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListTopics' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/clusters/*}/topics', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateCluster' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{cluster.name=projects/*/locations/*/clusters/*}', - 'body' => 'cluster', - 'placeholders' => [ - 'cluster.name' => [ - 'getters' => [ - 'getCluster', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdateConsumerGroup' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{consumer_group.name=projects/*/locations/*/clusters/*/consumerGroups/*}', - 'body' => 'consumer_group', - 'placeholders' => [ - 'consumer_group.name' => [ - 'getters' => [ - 'getConsumerGroup', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdateTopic' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{topic.name=projects/*/locations/*/clusters/*/topics/*}', - 'body' => 'topic', - 'placeholders' => [ - 'topic.name' => [ - 'getters' => [ - 'getTopic', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/ManagedKafka/v1/tests/Unit/V1/Client/ManagedKafkaClientTest.php b/owl-bot-staging/ManagedKafka/v1/tests/Unit/V1/Client/ManagedKafkaClientTest.php deleted file mode 100644 index cf3da605fcf5..000000000000 --- a/owl-bot-staging/ManagedKafka/v1/tests/Unit/V1/Client/ManagedKafkaClientTest.php +++ /dev/null @@ -1,1526 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return ManagedKafkaClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new ManagedKafkaClient($options); - } - - /** @test */ - public function createClusterTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $satisfiesPzi = false; - $satisfiesPzs = false; - $expectedResponse = new Cluster(); - $expectedResponse->setName($name); - $expectedResponse->setSatisfiesPzi($satisfiesPzi); - $expectedResponse->setSatisfiesPzs($satisfiesPzs); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createClusterTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $clusterId = 'clusterId240280960'; - $cluster = new Cluster(); - $clusterCapacityConfig = new CapacityConfig(); - $capacityConfigVcpuCount = 1944563327; - $clusterCapacityConfig->setVcpuCount($capacityConfigVcpuCount); - $capacityConfigMemoryBytes = 743041454; - $clusterCapacityConfig->setMemoryBytes($capacityConfigMemoryBytes); - $cluster->setCapacityConfig($clusterCapacityConfig); - $clusterGcpConfig = new GcpConfig(); - $gcpConfigAccessConfig = new AccessConfig(); - $accessConfigNetworkConfigs = []; - $gcpConfigAccessConfig->setNetworkConfigs($accessConfigNetworkConfigs); - $clusterGcpConfig->setAccessConfig($gcpConfigAccessConfig); - $cluster->setGcpConfig($clusterGcpConfig); - $request = (new CreateClusterRequest()) - ->setParent($formattedParent) - ->setClusterId($clusterId) - ->setCluster($cluster); - $response = $gapicClient->createCluster($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.managedkafka.v1.ManagedKafka/CreateCluster', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getClusterId(); - $this->assertProtobufEquals($clusterId, $actualValue); - $actualValue = $actualApiRequestObject->getCluster(); - $this->assertProtobufEquals($cluster, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createClusterTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createClusterExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $clusterId = 'clusterId240280960'; - $cluster = new Cluster(); - $clusterCapacityConfig = new CapacityConfig(); - $capacityConfigVcpuCount = 1944563327; - $clusterCapacityConfig->setVcpuCount($capacityConfigVcpuCount); - $capacityConfigMemoryBytes = 743041454; - $clusterCapacityConfig->setMemoryBytes($capacityConfigMemoryBytes); - $cluster->setCapacityConfig($clusterCapacityConfig); - $clusterGcpConfig = new GcpConfig(); - $gcpConfigAccessConfig = new AccessConfig(); - $accessConfigNetworkConfigs = []; - $gcpConfigAccessConfig->setNetworkConfigs($accessConfigNetworkConfigs); - $clusterGcpConfig->setAccessConfig($gcpConfigAccessConfig); - $cluster->setGcpConfig($clusterGcpConfig); - $request = (new CreateClusterRequest()) - ->setParent($formattedParent) - ->setClusterId($clusterId) - ->setCluster($cluster); - $response = $gapicClient->createCluster($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createClusterTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createTopicTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $partitionCount = 1738969222; - $replicationFactor = 1434332894; - $expectedResponse = new Topic(); - $expectedResponse->setName($name); - $expectedResponse->setPartitionCount($partitionCount); - $expectedResponse->setReplicationFactor($replicationFactor); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); - $topicId = 'topicId-957291989'; - $topic = new Topic(); - $topicPartitionCount = 2129663148; - $topic->setPartitionCount($topicPartitionCount); - $topicReplicationFactor = 1954252084; - $topic->setReplicationFactor($topicReplicationFactor); - $request = (new CreateTopicRequest()) - ->setParent($formattedParent) - ->setTopicId($topicId) - ->setTopic($topic); - $response = $gapicClient->createTopic($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.managedkafka.v1.ManagedKafka/CreateTopic', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getTopicId(); - $this->assertProtobufEquals($topicId, $actualValue); - $actualValue = $actualRequestObject->getTopic(); - $this->assertProtobufEquals($topic, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createTopicExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); - $topicId = 'topicId-957291989'; - $topic = new Topic(); - $topicPartitionCount = 2129663148; - $topic->setPartitionCount($topicPartitionCount); - $topicReplicationFactor = 1954252084; - $topic->setReplicationFactor($topicReplicationFactor); - $request = (new CreateTopicRequest()) - ->setParent($formattedParent) - ->setTopicId($topicId) - ->setTopic($topic); - try { - $gapicClient->createTopic($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteClusterTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteClusterTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); - $request = (new DeleteClusterRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteCluster($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.managedkafka.v1.ManagedKafka/DeleteCluster', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteClusterTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteClusterExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); - $request = (new DeleteClusterRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteCluster($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteClusterTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteConsumerGroupTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->consumerGroupName('[PROJECT]', '[LOCATION]', '[CLUSTER]', '[CONSUMER_GROUP]'); - $request = (new DeleteConsumerGroupRequest()) - ->setName($formattedName); - $gapicClient->deleteConsumerGroup($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.managedkafka.v1.ManagedKafka/DeleteConsumerGroup', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteConsumerGroupExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->consumerGroupName('[PROJECT]', '[LOCATION]', '[CLUSTER]', '[CONSUMER_GROUP]'); - $request = (new DeleteConsumerGroupRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteConsumerGroup($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteTopicTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->topicName('[PROJECT]', '[LOCATION]', '[CLUSTER]', '[TOPIC]'); - $request = (new DeleteTopicRequest()) - ->setName($formattedName); - $gapicClient->deleteTopic($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.managedkafka.v1.ManagedKafka/DeleteTopic', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteTopicExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->topicName('[PROJECT]', '[LOCATION]', '[CLUSTER]', '[TOPIC]'); - $request = (new DeleteTopicRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteTopic($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getClusterTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $satisfiesPzi = false; - $satisfiesPzs = false; - $expectedResponse = new Cluster(); - $expectedResponse->setName($name2); - $expectedResponse->setSatisfiesPzi($satisfiesPzi); - $expectedResponse->setSatisfiesPzs($satisfiesPzs); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); - $request = (new GetClusterRequest()) - ->setName($formattedName); - $response = $gapicClient->getCluster($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.managedkafka.v1.ManagedKafka/GetCluster', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getClusterExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); - $request = (new GetClusterRequest()) - ->setName($formattedName); - try { - $gapicClient->getCluster($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getConsumerGroupTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new ConsumerGroup(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->consumerGroupName('[PROJECT]', '[LOCATION]', '[CLUSTER]', '[CONSUMER_GROUP]'); - $request = (new GetConsumerGroupRequest()) - ->setName($formattedName); - $response = $gapicClient->getConsumerGroup($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.managedkafka.v1.ManagedKafka/GetConsumerGroup', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getConsumerGroupExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->consumerGroupName('[PROJECT]', '[LOCATION]', '[CLUSTER]', '[CONSUMER_GROUP]'); - $request = (new GetConsumerGroupRequest()) - ->setName($formattedName); - try { - $gapicClient->getConsumerGroup($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getTopicTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $partitionCount = 1738969222; - $replicationFactor = 1434332894; - $expectedResponse = new Topic(); - $expectedResponse->setName($name2); - $expectedResponse->setPartitionCount($partitionCount); - $expectedResponse->setReplicationFactor($replicationFactor); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->topicName('[PROJECT]', '[LOCATION]', '[CLUSTER]', '[TOPIC]'); - $request = (new GetTopicRequest()) - ->setName($formattedName); - $response = $gapicClient->getTopic($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.managedkafka.v1.ManagedKafka/GetTopic', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getTopicExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->topicName('[PROJECT]', '[LOCATION]', '[CLUSTER]', '[TOPIC]'); - $request = (new GetTopicRequest()) - ->setName($formattedName); - try { - $gapicClient->getTopic($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listClustersTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $clustersElement = new Cluster(); - $clusters = [ - $clustersElement, - ]; - $expectedResponse = new ListClustersResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setClusters($clusters); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListClustersRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listClusters($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getClusters()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.managedkafka.v1.ManagedKafka/ListClusters', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listClustersExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListClustersRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listClusters($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listConsumerGroupsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $consumerGroupsElement = new ConsumerGroup(); - $consumerGroups = [ - $consumerGroupsElement, - ]; - $expectedResponse = new ListConsumerGroupsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setConsumerGroups($consumerGroups); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); - $request = (new ListConsumerGroupsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listConsumerGroups($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getConsumerGroups()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.managedkafka.v1.ManagedKafka/ListConsumerGroups', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listConsumerGroupsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); - $request = (new ListConsumerGroupsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listConsumerGroups($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listTopicsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $topicsElement = new Topic(); - $topics = [ - $topicsElement, - ]; - $expectedResponse = new ListTopicsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setTopics($topics); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); - $request = (new ListTopicsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listTopics($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getTopics()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.managedkafka.v1.ManagedKafka/ListTopics', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listTopicsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); - $request = (new ListTopicsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listTopics($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateClusterTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $satisfiesPzi = false; - $satisfiesPzs = false; - $expectedResponse = new Cluster(); - $expectedResponse->setName($name); - $expectedResponse->setSatisfiesPzi($satisfiesPzi); - $expectedResponse->setSatisfiesPzs($satisfiesPzs); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateClusterTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $updateMask = new FieldMask(); - $cluster = new Cluster(); - $clusterCapacityConfig = new CapacityConfig(); - $capacityConfigVcpuCount = 1944563327; - $clusterCapacityConfig->setVcpuCount($capacityConfigVcpuCount); - $capacityConfigMemoryBytes = 743041454; - $clusterCapacityConfig->setMemoryBytes($capacityConfigMemoryBytes); - $cluster->setCapacityConfig($clusterCapacityConfig); - $clusterGcpConfig = new GcpConfig(); - $gcpConfigAccessConfig = new AccessConfig(); - $accessConfigNetworkConfigs = []; - $gcpConfigAccessConfig->setNetworkConfigs($accessConfigNetworkConfigs); - $clusterGcpConfig->setAccessConfig($gcpConfigAccessConfig); - $cluster->setGcpConfig($clusterGcpConfig); - $request = (new UpdateClusterRequest()) - ->setUpdateMask($updateMask) - ->setCluster($cluster); - $response = $gapicClient->updateCluster($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.managedkafka.v1.ManagedKafka/UpdateCluster', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $actualValue = $actualApiRequestObject->getCluster(); - $this->assertProtobufEquals($cluster, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateClusterTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateClusterExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $updateMask = new FieldMask(); - $cluster = new Cluster(); - $clusterCapacityConfig = new CapacityConfig(); - $capacityConfigVcpuCount = 1944563327; - $clusterCapacityConfig->setVcpuCount($capacityConfigVcpuCount); - $capacityConfigMemoryBytes = 743041454; - $clusterCapacityConfig->setMemoryBytes($capacityConfigMemoryBytes); - $cluster->setCapacityConfig($clusterCapacityConfig); - $clusterGcpConfig = new GcpConfig(); - $gcpConfigAccessConfig = new AccessConfig(); - $accessConfigNetworkConfigs = []; - $gcpConfigAccessConfig->setNetworkConfigs($accessConfigNetworkConfigs); - $clusterGcpConfig->setAccessConfig($gcpConfigAccessConfig); - $cluster->setGcpConfig($clusterGcpConfig); - $request = (new UpdateClusterRequest()) - ->setUpdateMask($updateMask) - ->setCluster($cluster); - $response = $gapicClient->updateCluster($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateClusterTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateConsumerGroupTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $expectedResponse = new ConsumerGroup(); - $expectedResponse->setName($name); - $transport->addResponse($expectedResponse); - // Mock request - $updateMask = new FieldMask(); - $consumerGroup = new ConsumerGroup(); - $request = (new UpdateConsumerGroupRequest()) - ->setUpdateMask($updateMask) - ->setConsumerGroup($consumerGroup); - $response = $gapicClient->updateConsumerGroup($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.managedkafka.v1.ManagedKafka/UpdateConsumerGroup', $actualFuncCall); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $actualValue = $actualRequestObject->getConsumerGroup(); - $this->assertProtobufEquals($consumerGroup, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateConsumerGroupExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $updateMask = new FieldMask(); - $consumerGroup = new ConsumerGroup(); - $request = (new UpdateConsumerGroupRequest()) - ->setUpdateMask($updateMask) - ->setConsumerGroup($consumerGroup); - try { - $gapicClient->updateConsumerGroup($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateTopicTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $partitionCount = 1738969222; - $replicationFactor = 1434332894; - $expectedResponse = new Topic(); - $expectedResponse->setName($name); - $expectedResponse->setPartitionCount($partitionCount); - $expectedResponse->setReplicationFactor($replicationFactor); - $transport->addResponse($expectedResponse); - // Mock request - $updateMask = new FieldMask(); - $topic = new Topic(); - $topicPartitionCount = 2129663148; - $topic->setPartitionCount($topicPartitionCount); - $topicReplicationFactor = 1954252084; - $topic->setReplicationFactor($topicReplicationFactor); - $request = (new UpdateTopicRequest()) - ->setUpdateMask($updateMask) - ->setTopic($topic); - $response = $gapicClient->updateTopic($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.managedkafka.v1.ManagedKafka/UpdateTopic', $actualFuncCall); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $actualValue = $actualRequestObject->getTopic(); - $this->assertProtobufEquals($topic, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateTopicExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $updateMask = new FieldMask(); - $topic = new Topic(); - $topicPartitionCount = 2129663148; - $topic->setPartitionCount($topicPartitionCount); - $topicReplicationFactor = 1954252084; - $topic->setReplicationFactor($topicReplicationFactor); - $request = (new UpdateTopicRequest()) - ->setUpdateMask($updateMask) - ->setTopic($topic); - try { - $gapicClient->updateTopic($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $locationId = 'locationId552319461'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Location(); - $expectedResponse->setName($name2); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - $request = new GetLocationRequest(); - $response = $gapicClient->getLocation($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new GetLocationRequest(); - try { - $gapicClient->getLocation($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $locationsElement = new Location(); - $locations = [ - $locationsElement, - ]; - $expectedResponse = new ListLocationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLocations($locations); - $transport->addResponse($expectedResponse); - $request = new ListLocationsRequest(); - $response = $gapicClient->listLocations($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new ListLocationsRequest(); - try { - $gapicClient->listLocations($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createClusterAsyncTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $satisfiesPzi = false; - $satisfiesPzs = false; - $expectedResponse = new Cluster(); - $expectedResponse->setName($name); - $expectedResponse->setSatisfiesPzi($satisfiesPzi); - $expectedResponse->setSatisfiesPzs($satisfiesPzs); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createClusterTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $clusterId = 'clusterId240280960'; - $cluster = new Cluster(); - $clusterCapacityConfig = new CapacityConfig(); - $capacityConfigVcpuCount = 1944563327; - $clusterCapacityConfig->setVcpuCount($capacityConfigVcpuCount); - $capacityConfigMemoryBytes = 743041454; - $clusterCapacityConfig->setMemoryBytes($capacityConfigMemoryBytes); - $cluster->setCapacityConfig($clusterCapacityConfig); - $clusterGcpConfig = new GcpConfig(); - $gcpConfigAccessConfig = new AccessConfig(); - $accessConfigNetworkConfigs = []; - $gcpConfigAccessConfig->setNetworkConfigs($accessConfigNetworkConfigs); - $clusterGcpConfig->setAccessConfig($gcpConfigAccessConfig); - $cluster->setGcpConfig($clusterGcpConfig); - $request = (new CreateClusterRequest()) - ->setParent($formattedParent) - ->setClusterId($clusterId) - ->setCluster($cluster); - $response = $gapicClient->createClusterAsync($request)->wait(); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.managedkafka.v1.ManagedKafka/CreateCluster', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getClusterId(); - $this->assertProtobufEquals($clusterId, $actualValue); - $actualValue = $actualApiRequestObject->getCluster(); - $this->assertProtobufEquals($cluster, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createClusterTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } -} diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/GPBMetadata/Google/Maps/Fleetengine/Delivery/V1/Common.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/GPBMetadata/Google/Maps/Fleetengine/Delivery/V1/Common.php deleted file mode 100644 index 6706e838d022a8fa0f947615d039af9b18a1e465..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3682 zcmbtXOK;mo5RUxL$c|+?b{NNXSSN*@G^J`MX#u)UAz73n#32QVmWx6Fu_D(p5sD=E zaNrdAA3YX5_Fwc?^jGxML(jeS(%mH~DYh)RjW4E_^UdR%*%{6^-+HGWJP<0_!9EJH zDYVap@DvN4?}o17+Cn=zIl;bQxLwb(u`dcjNfi`T6Xa4=`;5E39c-R+G&uWw!LQAXagxGhGOfo?PC_UMJl$fRJtP^27_EC~9Ik_){euM|D3xbcs$anUb-&Dc--cxG`Zw1e4l`U+W zMSP0REZ3K$epG!W!=SyuG>arAL|yNHV2^#|dDsuG57o{++&V;|?R18NSOUIyVI_1I zOtZ&snbhQVj}OYu7W}#jU;fu(tPN&G}962S@PSkB zbz~TkkBoDEj(CyXT~84yy<*8FcNsTnw8aTN!##(^n6y50bv%@N0<)(WnS>+8S$6l{ zB}?QEKiy@9I00V|_3A@nG&LK;U6)>TkN z*FfbV8+l}CV4dDap4NJHckNP+d+m&S2H61nguxiFFb+_h{G%|*X{7p+8rK8t1g_6# z3G&wNo;a#&h*#X122(*uT_hvQcaf}aC zi&^{YF~D8TzzbL#iixRM9!mv+_2Kx0liMH9NeMQFo9L0Vat(5LQWb-DV2xnrXam^{ z0cdKEEyr}jOhE*n@3>(P9Ws-Z#%u5OAAg>hIw;GfUnU+@*d`>> zO-N*$kjyr!-dquzJHMw=t$1OIH>Oyw)nA#&&h*zrYb#bLNmQdG4XBi)G#irC+-c9S d53#3Py$|ar@meyl#ay|;Fv)n&cn|LZ{srxno<{%x diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/GPBMetadata/Google/Maps/Fleetengine/Delivery/V1/DeliveryApi.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/GPBMetadata/Google/Maps/Fleetengine/Delivery/V1/DeliveryApi.php deleted file mode 100644 index daae42f83879..000000000000 --- a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/GPBMetadata/Google/Maps/Fleetengine/Delivery/V1/DeliveryApi.php +++ /dev/null @@ -1,123 +0,0 @@ -internalAddGeneratedFile( - ' -Ú, -6google/maps/fleetengine/delivery/v1/delivery_api.protomaps.fleetengine.delivery.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.protogoogle/api/routing.protogoogle/geo/type/viewport.proto;google/maps/fleetengine/delivery/v1/delivery_vehicles.proto0google/maps/fleetengine/delivery/v1/header.protovfhN+=ni=jAhAJVoCfRRxh+eCAZXz`DN1;tMGVuL@OUpwm zh{}DJQck@A^Jv+jE*sPExIEsNJey;B#B7&Fsyqk4vxYPZESr+O*7g(1Eyv=Pu_q~w zCrD}Ro>CgMgwp74Yy#M>6-6Xn>n6fZjyvpMrUA^=U#rt5b|%qjNX4tx}6i=;8OgkGqXQTI3vJz)fX)Bm5#@d1EOp9RYU(U?ym8}t zLTv@C946_C&2{7Rvz&_l#+)RG4-l@i8pN`IY$ z)fuNM7a=F?UtA(f>lc&;TtYu{)Aenc>tY6%^OgJRqU)GKIrN zQ89~*mn&Ou#kfCVIgljE2XM_Eg(3C08Tunm&4><$_^X&h_KV5`_-O8HlX{LB_*gW> zWqGlyYAlv2#8R=|8s0#82-ib8w9up8z;qbKjs3?QVowdD;yH$So=%6Z6DpLUvsC1n-zox`Si_(<0qdb^NO z^02a9-+6|>LRPs9(9&!AL8o1>?iX^}_b;p8!QE+F$Mt|lj#PAIc_t>Mj0qnz2P>ic zB7HoWd|A`aU-?Cnzmrl0E~b8{dwpLi!E#)H!f^S@yaFu!vjo@Xr|?V2McfahTl1AW zi)BwJ4iKPJ;aw+W<9QVwTYOPPZ)g9kW|gm?Fri3`T9`Rsd3{mG$WI^_So{b*Cu(=z zmF2$D?^(!C2VI9k;98zXozsRC%XWA1&8HO?)ET`0GPj~1BW!3QhRS06R1j(hVKQ?M zVOg{=nsl)8*(pTRqBnk7g7XuyRag=6n9NB!?|rx=7t&^*blx{fTL*<(Ax<|YXG3Z} zXP)Cfml5VG>x(1oAmC8$kJU$sWT475xN^{`c4j@c0@;225G{s|()ZiVryV`ESGCVL5nrnmJrjyL3LGRa0 zZf94o{g%14C+ApI3`MG(V|6(iPr8uW-S{KjWyIrdJnzQ)jMIS^C*GGCV=X4sG{LB8 sQ&-);cG| z4_T7XFLONdBcb?<(|O2!nkc65?+H&l9&yE4$Y0}J7j(hG1hDkY+(jDsii?P51*6D^ z##35gX1PydfqS^18)i^@}WL`&TmI( z2f>zcAK$sL?U8jnBR^HiXaDtqwU06_7<*bUHd-*&tj^T$C5>-5>_K>_A zvS^vIC3wCFKrhi!ZGP5eu*9r^y4h~bU>=RflemY*WUCyr{}#KPMluX?%O@9{*HD`YTeOr z@^a7{*GstYLu+i$@Lbj&5b{-f)}D07wll3)PP?SGWv7!9=bQGlKN=7IfpinternalAddGeneratedFile( - ' -¸ -p1b=l+*7uQO+1s4 zrcyst*gjEQ&tXo(v6OnZ)gqqKa5^rvh^Hz_uBhx3D~g`WSMH*!?{vKe(Ui91v@MeA zn695{S%ffRx2a81O=8g=@eWhH)f6-Rx4tT{0c^8FeAjFcWvi5VNtoF*nOWNsFtwKm zQ`;QC)N&zAt-87n(6CJ3S1KG1-hqNYZntjHhT=1m;jjDDH>gb+H7)uJdbOdnOv@*z zd0MvBwHu5&w!#&Pc7r4zC;=vyz3)00g$*ToScwM)gHp@ejCi(b;miDnM_uN4B^1@P zHevm6@^6w4LbDu>wv=S>Mol~Q$PI;gT{3K4Q9Q!Bp1m&K%>j=3pK51>E$!0UCM8xg zL-x%cbv#WQcr^g|nCdPGvpKfbs65rOPN(D8<3C{}SVVv-*{2PQ_~XO&QRN3@9Tg9i1E>|0&rH8h$KI#o(ldzj z!Xxse07#CZU*__eNd%B`aD_K7!|5^%6_IBJh&l!ce@QXWlAgl#VHAVAE(1c%tu3lS zT!J8A+|)khq&(a@re-+}!DD$&sD3s26@^ebZ?_z&4!6&QGJ?XFuL!@MjYi}yi3o>& zMHb3p6i716G0$wgrFPq(O?e6-XL%Ikk^(nQ(uPaKBZ*0LHQ`#OZIhW6 zDrbeR^c=us%%k-#Bffl1nM7hfJRd0?=`8*;0n+JLO9m`^q+{YJLP~`F!srKwv^&IR zKGr$6_jt6uu>D6y0$r&9^SBYP0cUuZm|Ht1$R|chL}O_QK0k(L__pb~X59*!$IS9i z*rBkuNH-x-d0o6I07iATAn@bPKMRE9uHf_!*cgmh>G2M?={{ zv5ZDz%bPIA%QEUTw?VF?%P)-LUL{+6c@knCX3Klotgh!!SKw@-eSzb_!VpdrlCZKL zLGl=Cp_olq^2HsaT-@8up0t9#mv)QQd`{m*-xuIkAziK*Red|3E$Bw1o0!zLKBRN7 zG(6gZUWmiYSFzou_=}{wI8l1ENjyLGF8X*BtdyyDydI90|Go^LaoIDd?SSH8^CpJt zSceuaruYHJwQuyOPwUj8>`)Avxix(>0nf%)t9_WF%XbXPg}b;h&<@|K4b$^z&$NPm zGGsBJ=>=K*86FHQ@_=AV=(rZ)&pBn8Pr(cGmBE*T`fj4Dyv~~x=Pj<&!x84Q;KHoh zur#phGsi`LyEYrP$0y5$*?R+DM7=ATO~bZ=F?BJyT>Lc#iBptH!ksf6X8XAE?K@Ue zFgU(_Nvc49?J_VV)G`LlIL5_+YCy%0Pe(+33J(YNPo=qoC!gmV14K?S{+I+zo7RDO z=!;cg2EVxmahu>#C?-FCk+}ia2UTG>qJlF2PC#u1DI5*#Q43!t&g;@IP5hW|SWdSY z>G1B+c1B#K*kkZ8jkXfEzCQT)TWl)3sptNP-P;mJsmkvYRUDmaps.fleetengine.delivery.v1.BatchCreateTasksRequest - */ -class BatchCreateTasksRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The standard Delivery API request header. - * Note: If you set this field, then the header field in the - * `CreateTaskRequest` messages must either be empty, or it must match this - * field. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $header = null; - /** - * Required. The parent resource shared by all tasks. This value must be in - * the format `providers/{provider}`. The `provider` must be the Google Cloud - * Project ID. For example, `sample-cloud-project`. The parent field in the - * `CreateTaskRequest` messages must either be empty, or it must match this - * field. - * - * Generated from protobuf field string parent = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The request message that specifies the resources to create. - * Note: You can create a maximum of 500 tasks in a batch. - * - * Generated from protobuf field repeated .maps.fleetengine.delivery.v1.CreateTaskRequest requests = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - private $requests; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Maps\FleetEngine\Delivery\V1\DeliveryRequestHeader $header - * Optional. The standard Delivery API request header. - * Note: If you set this field, then the header field in the - * `CreateTaskRequest` messages must either be empty, or it must match this - * field. - * @type string $parent - * Required. The parent resource shared by all tasks. This value must be in - * the format `providers/{provider}`. The `provider` must be the Google Cloud - * Project ID. For example, `sample-cloud-project`. The parent field in the - * `CreateTaskRequest` messages must either be empty, or it must match this - * field. - * @type array<\Google\Maps\FleetEngine\Delivery\V1\CreateTaskRequest>|\Google\Protobuf\Internal\RepeatedField $requests - * Required. The request message that specifies the resources to create. - * Note: You can create a maximum of 500 tasks in a batch. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Fleetengine\Delivery\V1\DeliveryApi::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The standard Delivery API request header. - * Note: If you set this field, then the header field in the - * `CreateTaskRequest` messages must either be empty, or it must match this - * field. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Maps\FleetEngine\Delivery\V1\DeliveryRequestHeader|null - */ - public function getHeader() - { - return $this->header; - } - - public function hasHeader() - { - return isset($this->header); - } - - public function clearHeader() - { - unset($this->header); - } - - /** - * Optional. The standard Delivery API request header. - * Note: If you set this field, then the header field in the - * `CreateTaskRequest` messages must either be empty, or it must match this - * field. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Maps\FleetEngine\Delivery\V1\DeliveryRequestHeader $var - * @return $this - */ - public function setHeader($var) - { - GPBUtil::checkMessage($var, \Google\Maps\FleetEngine\Delivery\V1\DeliveryRequestHeader::class); - $this->header = $var; - - return $this; - } - - /** - * Required. The parent resource shared by all tasks. This value must be in - * the format `providers/{provider}`. The `provider` must be the Google Cloud - * Project ID. For example, `sample-cloud-project`. The parent field in the - * `CreateTaskRequest` messages must either be empty, or it must match this - * field. - * - * Generated from protobuf field string parent = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource shared by all tasks. This value must be in - * the format `providers/{provider}`. The `provider` must be the Google Cloud - * Project ID. For example, `sample-cloud-project`. The parent field in the - * `CreateTaskRequest` messages must either be empty, or it must match this - * field. - * - * Generated from protobuf field string parent = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The request message that specifies the resources to create. - * Note: You can create a maximum of 500 tasks in a batch. - * - * Generated from protobuf field repeated .maps.fleetengine.delivery.v1.CreateTaskRequest requests = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRequests() - { - return $this->requests; - } - - /** - * Required. The request message that specifies the resources to create. - * Note: You can create a maximum of 500 tasks in a batch. - * - * Generated from protobuf field repeated .maps.fleetengine.delivery.v1.CreateTaskRequest requests = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param array<\Google\Maps\FleetEngine\Delivery\V1\CreateTaskRequest>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRequests($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\FleetEngine\Delivery\V1\CreateTaskRequest::class); - $this->requests = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/BatchCreateTasksResponse.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/BatchCreateTasksResponse.php deleted file mode 100644 index 2f87fdd9b497..000000000000 --- a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/BatchCreateTasksResponse.php +++ /dev/null @@ -1,67 +0,0 @@ -maps.fleetengine.delivery.v1.BatchCreateTasksResponse - */ -class BatchCreateTasksResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The created Tasks. - * - * Generated from protobuf field repeated .maps.fleetengine.delivery.v1.Task tasks = 1; - */ - private $tasks; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Maps\FleetEngine\Delivery\V1\Task>|\Google\Protobuf\Internal\RepeatedField $tasks - * The created Tasks. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Fleetengine\Delivery\V1\DeliveryApi::initOnce(); - parent::__construct($data); - } - - /** - * The created Tasks. - * - * Generated from protobuf field repeated .maps.fleetengine.delivery.v1.Task tasks = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTasks() - { - return $this->tasks; - } - - /** - * The created Tasks. - * - * Generated from protobuf field repeated .maps.fleetengine.delivery.v1.Task tasks = 1; - * @param array<\Google\Maps\FleetEngine\Delivery\V1\Task>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTasks($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\FleetEngine\Delivery\V1\Task::class); - $this->tasks = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/CreateDeliveryVehicleRequest.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/CreateDeliveryVehicleRequest.php deleted file mode 100644 index 4af64a0a5ce4..000000000000 --- a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/CreateDeliveryVehicleRequest.php +++ /dev/null @@ -1,279 +0,0 @@ -maps.fleetengine.delivery.v1.CreateDeliveryVehicleRequest - */ -class CreateDeliveryVehicleRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The standard Delivery API request header. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $header = null; - /** - * Required. Must be in the format `providers/{provider}`. The provider must - * be the Google Cloud Project ID. For example, `sample-cloud-project`. - * - * Generated from protobuf field string parent = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $parent = ''; - /** - * Required. The Delivery Vehicle ID must be unique and subject to the - * following restrictions: - * * Must be a valid Unicode string. - * * Limited to a maximum length of 64 characters. - * * Normalized according to [Unicode Normalization Form C] - * (http://www.unicode.org/reports/tr15/). - * * May not contain any of the following ASCII characters: '/', ':', '?', - * ',', or '#'. - * - * Generated from protobuf field string delivery_vehicle_id = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $delivery_vehicle_id = ''; - /** - * Required. The `DeliveryVehicle` entity to create. When creating a new - * delivery vehicle, you may set the following optional fields: - * * type - * * last_location - * * attributes - * Note: The DeliveryVehicle's `name` field is ignored. All other - * DeliveryVehicle fields must not be set; otherwise, an error is returned. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryVehicle delivery_vehicle = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $delivery_vehicle = null; - - /** - * @param string $parent Required. Must be in the format `providers/{provider}`. The provider must - * be the Google Cloud Project ID. For example, `sample-cloud-project`. - * @param \Google\Maps\FleetEngine\Delivery\V1\DeliveryVehicle $deliveryVehicle Required. The `DeliveryVehicle` entity to create. When creating a new - * delivery vehicle, you may set the following optional fields: - * - * * type - * * last_location - * * attributes - * - * Note: The DeliveryVehicle's `name` field is ignored. All other - * DeliveryVehicle fields must not be set; otherwise, an error is returned. - * @param string $deliveryVehicleId Required. The Delivery Vehicle ID must be unique and subject to the - * following restrictions: - * - * * Must be a valid Unicode string. - * * Limited to a maximum length of 64 characters. - * * Normalized according to [Unicode Normalization Form C] - * (http://www.unicode.org/reports/tr15/). - * * May not contain any of the following ASCII characters: '/', ':', '?', - * ',', or '#'. - * - * @return \Google\Maps\FleetEngine\Delivery\V1\CreateDeliveryVehicleRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Maps\FleetEngine\Delivery\V1\DeliveryVehicle $deliveryVehicle, string $deliveryVehicleId): self - { - return (new self()) - ->setParent($parent) - ->setDeliveryVehicle($deliveryVehicle) - ->setDeliveryVehicleId($deliveryVehicleId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Maps\FleetEngine\Delivery\V1\DeliveryRequestHeader $header - * Optional. The standard Delivery API request header. - * @type string $parent - * Required. Must be in the format `providers/{provider}`. The provider must - * be the Google Cloud Project ID. For example, `sample-cloud-project`. - * @type string $delivery_vehicle_id - * Required. The Delivery Vehicle ID must be unique and subject to the - * following restrictions: - * * Must be a valid Unicode string. - * * Limited to a maximum length of 64 characters. - * * Normalized according to [Unicode Normalization Form C] - * (http://www.unicode.org/reports/tr15/). - * * May not contain any of the following ASCII characters: '/', ':', '?', - * ',', or '#'. - * @type \Google\Maps\FleetEngine\Delivery\V1\DeliveryVehicle $delivery_vehicle - * Required. The `DeliveryVehicle` entity to create. When creating a new - * delivery vehicle, you may set the following optional fields: - * * type - * * last_location - * * attributes - * Note: The DeliveryVehicle's `name` field is ignored. All other - * DeliveryVehicle fields must not be set; otherwise, an error is returned. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Fleetengine\Delivery\V1\DeliveryApi::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The standard Delivery API request header. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Maps\FleetEngine\Delivery\V1\DeliveryRequestHeader|null - */ - public function getHeader() - { - return $this->header; - } - - public function hasHeader() - { - return isset($this->header); - } - - public function clearHeader() - { - unset($this->header); - } - - /** - * Optional. The standard Delivery API request header. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Maps\FleetEngine\Delivery\V1\DeliveryRequestHeader $var - * @return $this - */ - public function setHeader($var) - { - GPBUtil::checkMessage($var, \Google\Maps\FleetEngine\Delivery\V1\DeliveryRequestHeader::class); - $this->header = $var; - - return $this; - } - - /** - * Required. Must be in the format `providers/{provider}`. The provider must - * be the Google Cloud Project ID. For example, `sample-cloud-project`. - * - * Generated from protobuf field string parent = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Must be in the format `providers/{provider}`. The provider must - * be the Google Cloud Project ID. For example, `sample-cloud-project`. - * - * Generated from protobuf field string parent = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The Delivery Vehicle ID must be unique and subject to the - * following restrictions: - * * Must be a valid Unicode string. - * * Limited to a maximum length of 64 characters. - * * Normalized according to [Unicode Normalization Form C] - * (http://www.unicode.org/reports/tr15/). - * * May not contain any of the following ASCII characters: '/', ':', '?', - * ',', or '#'. - * - * Generated from protobuf field string delivery_vehicle_id = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDeliveryVehicleId() - { - return $this->delivery_vehicle_id; - } - - /** - * Required. The Delivery Vehicle ID must be unique and subject to the - * following restrictions: - * * Must be a valid Unicode string. - * * Limited to a maximum length of 64 characters. - * * Normalized according to [Unicode Normalization Form C] - * (http://www.unicode.org/reports/tr15/). - * * May not contain any of the following ASCII characters: '/', ':', '?', - * ',', or '#'. - * - * Generated from protobuf field string delivery_vehicle_id = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDeliveryVehicleId($var) - { - GPBUtil::checkString($var, True); - $this->delivery_vehicle_id = $var; - - return $this; - } - - /** - * Required. The `DeliveryVehicle` entity to create. When creating a new - * delivery vehicle, you may set the following optional fields: - * * type - * * last_location - * * attributes - * Note: The DeliveryVehicle's `name` field is ignored. All other - * DeliveryVehicle fields must not be set; otherwise, an error is returned. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryVehicle delivery_vehicle = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Maps\FleetEngine\Delivery\V1\DeliveryVehicle|null - */ - public function getDeliveryVehicle() - { - return $this->delivery_vehicle; - } - - public function hasDeliveryVehicle() - { - return isset($this->delivery_vehicle); - } - - public function clearDeliveryVehicle() - { - unset($this->delivery_vehicle); - } - - /** - * Required. The `DeliveryVehicle` entity to create. When creating a new - * delivery vehicle, you may set the following optional fields: - * * type - * * last_location - * * attributes - * Note: The DeliveryVehicle's `name` field is ignored. All other - * DeliveryVehicle fields must not be set; otherwise, an error is returned. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryVehicle delivery_vehicle = 5 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Maps\FleetEngine\Delivery\V1\DeliveryVehicle $var - * @return $this - */ - public function setDeliveryVehicle($var) - { - GPBUtil::checkMessage($var, \Google\Maps\FleetEngine\Delivery\V1\DeliveryVehicle::class); - $this->delivery_vehicle = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/CreateTaskRequest.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/CreateTaskRequest.php deleted file mode 100644 index a46f2f910ca5..000000000000 --- a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/CreateTaskRequest.php +++ /dev/null @@ -1,304 +0,0 @@ -maps.fleetengine.delivery.v1.CreateTaskRequest - */ -class CreateTaskRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The standard Delivery API request header. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $header = null; - /** - * Required. Must be in the format `providers/{provider}`. The `provider` must - * be the Google Cloud Project ID. For example, `sample-cloud-project`. - * - * Generated from protobuf field string parent = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $parent = ''; - /** - * Required. The Task ID must be unique, but it should be not a shipment - * tracking ID. To store a shipment tracking ID, use the `tracking_id` field. - * Note that multiple tasks can have the same `tracking_id`. Task IDs are - * subject to the following restrictions: - * * Must be a valid Unicode string. - * * Limited to a maximum length of 64 characters. - * * Normalized according to [Unicode Normalization Form C] - * (http://www.unicode.org/reports/tr15/). - * * May not contain any of the following ASCII characters: '/', ':', '?', - * ',', or '#'. - * - * Generated from protobuf field string task_id = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $task_id = ''; - /** - * Required. The Task entity to create. - * When creating a Task, the following fields are required: - * * `type` - * * `state` (must be set to `OPEN`) - * * `tracking_id` (must not be set for `UNAVAILABLE` or `SCHEDULED_STOP` - * tasks, but required for all other task types) - * * `planned_location` (optional for `UNAVAILABLE` tasks) - * * `task_duration` - * Note: The Task's `name` field is ignored. All other Task fields must not be - * set; otherwise, an error is returned. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.Task task = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $task = null; - - /** - * @param string $parent Required. Must be in the format `providers/{provider}`. The `provider` must - * be the Google Cloud Project ID. For example, `sample-cloud-project`. - * @param \Google\Maps\FleetEngine\Delivery\V1\Task $task Required. The Task entity to create. - * When creating a Task, the following fields are required: - * - * * `type` - * * `state` (must be set to `OPEN`) - * * `tracking_id` (must not be set for `UNAVAILABLE` or `SCHEDULED_STOP` - * tasks, but required for all other task types) - * * `planned_location` (optional for `UNAVAILABLE` tasks) - * * `task_duration` - * - * Note: The Task's `name` field is ignored. All other Task fields must not be - * set; otherwise, an error is returned. - * @param string $taskId Required. The Task ID must be unique, but it should be not a shipment - * tracking ID. To store a shipment tracking ID, use the `tracking_id` field. - * Note that multiple tasks can have the same `tracking_id`. Task IDs are - * subject to the following restrictions: - * - * * Must be a valid Unicode string. - * * Limited to a maximum length of 64 characters. - * * Normalized according to [Unicode Normalization Form C] - * (http://www.unicode.org/reports/tr15/). - * * May not contain any of the following ASCII characters: '/', ':', '?', - * ',', or '#'. - * - * @return \Google\Maps\FleetEngine\Delivery\V1\CreateTaskRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Maps\FleetEngine\Delivery\V1\Task $task, string $taskId): self - { - return (new self()) - ->setParent($parent) - ->setTask($task) - ->setTaskId($taskId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Maps\FleetEngine\Delivery\V1\DeliveryRequestHeader $header - * Optional. The standard Delivery API request header. - * @type string $parent - * Required. Must be in the format `providers/{provider}`. The `provider` must - * be the Google Cloud Project ID. For example, `sample-cloud-project`. - * @type string $task_id - * Required. The Task ID must be unique, but it should be not a shipment - * tracking ID. To store a shipment tracking ID, use the `tracking_id` field. - * Note that multiple tasks can have the same `tracking_id`. Task IDs are - * subject to the following restrictions: - * * Must be a valid Unicode string. - * * Limited to a maximum length of 64 characters. - * * Normalized according to [Unicode Normalization Form C] - * (http://www.unicode.org/reports/tr15/). - * * May not contain any of the following ASCII characters: '/', ':', '?', - * ',', or '#'. - * @type \Google\Maps\FleetEngine\Delivery\V1\Task $task - * Required. The Task entity to create. - * When creating a Task, the following fields are required: - * * `type` - * * `state` (must be set to `OPEN`) - * * `tracking_id` (must not be set for `UNAVAILABLE` or `SCHEDULED_STOP` - * tasks, but required for all other task types) - * * `planned_location` (optional for `UNAVAILABLE` tasks) - * * `task_duration` - * Note: The Task's `name` field is ignored. All other Task fields must not be - * set; otherwise, an error is returned. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Fleetengine\Delivery\V1\DeliveryApi::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The standard Delivery API request header. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Maps\FleetEngine\Delivery\V1\DeliveryRequestHeader|null - */ - public function getHeader() - { - return $this->header; - } - - public function hasHeader() - { - return isset($this->header); - } - - public function clearHeader() - { - unset($this->header); - } - - /** - * Optional. The standard Delivery API request header. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Maps\FleetEngine\Delivery\V1\DeliveryRequestHeader $var - * @return $this - */ - public function setHeader($var) - { - GPBUtil::checkMessage($var, \Google\Maps\FleetEngine\Delivery\V1\DeliveryRequestHeader::class); - $this->header = $var; - - return $this; - } - - /** - * Required. Must be in the format `providers/{provider}`. The `provider` must - * be the Google Cloud Project ID. For example, `sample-cloud-project`. - * - * Generated from protobuf field string parent = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Must be in the format `providers/{provider}`. The `provider` must - * be the Google Cloud Project ID. For example, `sample-cloud-project`. - * - * Generated from protobuf field string parent = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The Task ID must be unique, but it should be not a shipment - * tracking ID. To store a shipment tracking ID, use the `tracking_id` field. - * Note that multiple tasks can have the same `tracking_id`. Task IDs are - * subject to the following restrictions: - * * Must be a valid Unicode string. - * * Limited to a maximum length of 64 characters. - * * Normalized according to [Unicode Normalization Form C] - * (http://www.unicode.org/reports/tr15/). - * * May not contain any of the following ASCII characters: '/', ':', '?', - * ',', or '#'. - * - * Generated from protobuf field string task_id = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getTaskId() - { - return $this->task_id; - } - - /** - * Required. The Task ID must be unique, but it should be not a shipment - * tracking ID. To store a shipment tracking ID, use the `tracking_id` field. - * Note that multiple tasks can have the same `tracking_id`. Task IDs are - * subject to the following restrictions: - * * Must be a valid Unicode string. - * * Limited to a maximum length of 64 characters. - * * Normalized according to [Unicode Normalization Form C] - * (http://www.unicode.org/reports/tr15/). - * * May not contain any of the following ASCII characters: '/', ':', '?', - * ',', or '#'. - * - * Generated from protobuf field string task_id = 5 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setTaskId($var) - { - GPBUtil::checkString($var, True); - $this->task_id = $var; - - return $this; - } - - /** - * Required. The Task entity to create. - * When creating a Task, the following fields are required: - * * `type` - * * `state` (must be set to `OPEN`) - * * `tracking_id` (must not be set for `UNAVAILABLE` or `SCHEDULED_STOP` - * tasks, but required for all other task types) - * * `planned_location` (optional for `UNAVAILABLE` tasks) - * * `task_duration` - * Note: The Task's `name` field is ignored. All other Task fields must not be - * set; otherwise, an error is returned. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.Task task = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Maps\FleetEngine\Delivery\V1\Task|null - */ - public function getTask() - { - return $this->task; - } - - public function hasTask() - { - return isset($this->task); - } - - public function clearTask() - { - unset($this->task); - } - - /** - * Required. The Task entity to create. - * When creating a Task, the following fields are required: - * * `type` - * * `state` (must be set to `OPEN`) - * * `tracking_id` (must not be set for `UNAVAILABLE` or `SCHEDULED_STOP` - * tasks, but required for all other task types) - * * `planned_location` (optional for `UNAVAILABLE` tasks) - * * `task_duration` - * Note: The Task's `name` field is ignored. All other Task fields must not be - * set; otherwise, an error is returned. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.Task task = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Maps\FleetEngine\Delivery\V1\Task $var - * @return $this - */ - public function setTask($var) - { - GPBUtil::checkMessage($var, \Google\Maps\FleetEngine\Delivery\V1\Task::class); - $this->task = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/DeliveryRequestHeader.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/DeliveryRequestHeader.php deleted file mode 100644 index 99c677f30314..000000000000 --- a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/DeliveryRequestHeader.php +++ /dev/null @@ -1,493 +0,0 @@ -maps.fleetengine.delivery.v1.DeliveryRequestHeader - */ -class DeliveryRequestHeader extends \Google\Protobuf\Internal\Message -{ - /** - * The BCP-47 language code, such as en-US or sr-Latn. For more information, - * see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. If none - * is specified, the response may be in any language, with a preference for - * English if such a name exists. Field value example: `en-US`. - * - * Generated from protobuf field string language_code = 1; - */ - protected $language_code = ''; - /** - * Required. CLDR region code of the region where the request originates. - * Field value example: `US`. - * - * Generated from protobuf field string region_code = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $region_code = ''; - /** - * Version of the calling SDK, if applicable. - * The version format is "major.minor.patch", example: `1.1.2`. - * - * Generated from protobuf field string sdk_version = 3; - */ - protected $sdk_version = ''; - /** - * Version of the operating system on which the calling SDK is running. - * Field value examples: `4.4.1`, `12.1`. - * - * Generated from protobuf field string os_version = 4; - */ - protected $os_version = ''; - /** - * Model of the device on which the calling SDK is running. - * Field value examples: `iPhone12,1`, `SM-G920F`. - * - * Generated from protobuf field string device_model = 5; - */ - protected $device_model = ''; - /** - * The type of SDK sending the request. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryRequestHeader.SdkType sdk_type = 6; - */ - protected $sdk_type = 0; - /** - * Version of the MapSDK which the calling SDK depends on, if applicable. - * The version format is "major.minor.patch", example: `5.2.1`. - * - * Generated from protobuf field string maps_sdk_version = 7; - */ - protected $maps_sdk_version = ''; - /** - * Version of the NavSDK which the calling SDK depends on, if applicable. - * The version format is "major.minor.patch", example: `2.1.0`. - * - * Generated from protobuf field string nav_sdk_version = 8; - */ - protected $nav_sdk_version = ''; - /** - * Platform of the calling SDK. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryRequestHeader.Platform platform = 9; - */ - protected $platform = 0; - /** - * Manufacturer of the Android device from the calling SDK, only applicable - * for the Android SDKs. - * Field value example: `Samsung`. - * - * Generated from protobuf field string manufacturer = 10; - */ - protected $manufacturer = ''; - /** - * Android API level of the calling SDK, only applicable for the Android SDKs. - * Field value example: `23`. - * - * Generated from protobuf field int32 android_api_level = 11; - */ - protected $android_api_level = 0; - /** - * Optional ID that can be provided for logging purposes in order to identify - * the request. - * - * Generated from protobuf field string trace_id = 12; - */ - protected $trace_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $language_code - * The BCP-47 language code, such as en-US or sr-Latn. For more information, - * see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. If none - * is specified, the response may be in any language, with a preference for - * English if such a name exists. Field value example: `en-US`. - * @type string $region_code - * Required. CLDR region code of the region where the request originates. - * Field value example: `US`. - * @type string $sdk_version - * Version of the calling SDK, if applicable. - * The version format is "major.minor.patch", example: `1.1.2`. - * @type string $os_version - * Version of the operating system on which the calling SDK is running. - * Field value examples: `4.4.1`, `12.1`. - * @type string $device_model - * Model of the device on which the calling SDK is running. - * Field value examples: `iPhone12,1`, `SM-G920F`. - * @type int $sdk_type - * The type of SDK sending the request. - * @type string $maps_sdk_version - * Version of the MapSDK which the calling SDK depends on, if applicable. - * The version format is "major.minor.patch", example: `5.2.1`. - * @type string $nav_sdk_version - * Version of the NavSDK which the calling SDK depends on, if applicable. - * The version format is "major.minor.patch", example: `2.1.0`. - * @type int $platform - * Platform of the calling SDK. - * @type string $manufacturer - * Manufacturer of the Android device from the calling SDK, only applicable - * for the Android SDKs. - * Field value example: `Samsung`. - * @type int $android_api_level - * Android API level of the calling SDK, only applicable for the Android SDKs. - * Field value example: `23`. - * @type string $trace_id - * Optional ID that can be provided for logging purposes in order to identify - * the request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Fleetengine\Delivery\V1\Header::initOnce(); - parent::__construct($data); - } - - /** - * The BCP-47 language code, such as en-US or sr-Latn. For more information, - * see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. If none - * is specified, the response may be in any language, with a preference for - * English if such a name exists. Field value example: `en-US`. - * - * Generated from protobuf field string language_code = 1; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * The BCP-47 language code, such as en-US or sr-Latn. For more information, - * see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. If none - * is specified, the response may be in any language, with a preference for - * English if such a name exists. Field value example: `en-US`. - * - * Generated from protobuf field string language_code = 1; - * @param string $var - * @return $this - */ - public function setLanguageCode($var) - { - GPBUtil::checkString($var, True); - $this->language_code = $var; - - return $this; - } - - /** - * Required. CLDR region code of the region where the request originates. - * Field value example: `US`. - * - * Generated from protobuf field string region_code = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getRegionCode() - { - return $this->region_code; - } - - /** - * Required. CLDR region code of the region where the request originates. - * Field value example: `US`. - * - * Generated from protobuf field string region_code = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setRegionCode($var) - { - GPBUtil::checkString($var, True); - $this->region_code = $var; - - return $this; - } - - /** - * Version of the calling SDK, if applicable. - * The version format is "major.minor.patch", example: `1.1.2`. - * - * Generated from protobuf field string sdk_version = 3; - * @return string - */ - public function getSdkVersion() - { - return $this->sdk_version; - } - - /** - * Version of the calling SDK, if applicable. - * The version format is "major.minor.patch", example: `1.1.2`. - * - * Generated from protobuf field string sdk_version = 3; - * @param string $var - * @return $this - */ - public function setSdkVersion($var) - { - GPBUtil::checkString($var, True); - $this->sdk_version = $var; - - return $this; - } - - /** - * Version of the operating system on which the calling SDK is running. - * Field value examples: `4.4.1`, `12.1`. - * - * Generated from protobuf field string os_version = 4; - * @return string - */ - public function getOsVersion() - { - return $this->os_version; - } - - /** - * Version of the operating system on which the calling SDK is running. - * Field value examples: `4.4.1`, `12.1`. - * - * Generated from protobuf field string os_version = 4; - * @param string $var - * @return $this - */ - public function setOsVersion($var) - { - GPBUtil::checkString($var, True); - $this->os_version = $var; - - return $this; - } - - /** - * Model of the device on which the calling SDK is running. - * Field value examples: `iPhone12,1`, `SM-G920F`. - * - * Generated from protobuf field string device_model = 5; - * @return string - */ - public function getDeviceModel() - { - return $this->device_model; - } - - /** - * Model of the device on which the calling SDK is running. - * Field value examples: `iPhone12,1`, `SM-G920F`. - * - * Generated from protobuf field string device_model = 5; - * @param string $var - * @return $this - */ - public function setDeviceModel($var) - { - GPBUtil::checkString($var, True); - $this->device_model = $var; - - return $this; - } - - /** - * The type of SDK sending the request. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryRequestHeader.SdkType sdk_type = 6; - * @return int - */ - public function getSdkType() - { - return $this->sdk_type; - } - - /** - * The type of SDK sending the request. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryRequestHeader.SdkType sdk_type = 6; - * @param int $var - * @return $this - */ - public function setSdkType($var) - { - GPBUtil::checkEnum($var, \Google\Maps\FleetEngine\Delivery\V1\DeliveryRequestHeader\SdkType::class); - $this->sdk_type = $var; - - return $this; - } - - /** - * Version of the MapSDK which the calling SDK depends on, if applicable. - * The version format is "major.minor.patch", example: `5.2.1`. - * - * Generated from protobuf field string maps_sdk_version = 7; - * @return string - */ - public function getMapsSdkVersion() - { - return $this->maps_sdk_version; - } - - /** - * Version of the MapSDK which the calling SDK depends on, if applicable. - * The version format is "major.minor.patch", example: `5.2.1`. - * - * Generated from protobuf field string maps_sdk_version = 7; - * @param string $var - * @return $this - */ - public function setMapsSdkVersion($var) - { - GPBUtil::checkString($var, True); - $this->maps_sdk_version = $var; - - return $this; - } - - /** - * Version of the NavSDK which the calling SDK depends on, if applicable. - * The version format is "major.minor.patch", example: `2.1.0`. - * - * Generated from protobuf field string nav_sdk_version = 8; - * @return string - */ - public function getNavSdkVersion() - { - return $this->nav_sdk_version; - } - - /** - * Version of the NavSDK which the calling SDK depends on, if applicable. - * The version format is "major.minor.patch", example: `2.1.0`. - * - * Generated from protobuf field string nav_sdk_version = 8; - * @param string $var - * @return $this - */ - public function setNavSdkVersion($var) - { - GPBUtil::checkString($var, True); - $this->nav_sdk_version = $var; - - return $this; - } - - /** - * Platform of the calling SDK. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryRequestHeader.Platform platform = 9; - * @return int - */ - public function getPlatform() - { - return $this->platform; - } - - /** - * Platform of the calling SDK. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryRequestHeader.Platform platform = 9; - * @param int $var - * @return $this - */ - public function setPlatform($var) - { - GPBUtil::checkEnum($var, \Google\Maps\FleetEngine\Delivery\V1\DeliveryRequestHeader\Platform::class); - $this->platform = $var; - - return $this; - } - - /** - * Manufacturer of the Android device from the calling SDK, only applicable - * for the Android SDKs. - * Field value example: `Samsung`. - * - * Generated from protobuf field string manufacturer = 10; - * @return string - */ - public function getManufacturer() - { - return $this->manufacturer; - } - - /** - * Manufacturer of the Android device from the calling SDK, only applicable - * for the Android SDKs. - * Field value example: `Samsung`. - * - * Generated from protobuf field string manufacturer = 10; - * @param string $var - * @return $this - */ - public function setManufacturer($var) - { - GPBUtil::checkString($var, True); - $this->manufacturer = $var; - - return $this; - } - - /** - * Android API level of the calling SDK, only applicable for the Android SDKs. - * Field value example: `23`. - * - * Generated from protobuf field int32 android_api_level = 11; - * @return int - */ - public function getAndroidApiLevel() - { - return $this->android_api_level; - } - - /** - * Android API level of the calling SDK, only applicable for the Android SDKs. - * Field value example: `23`. - * - * Generated from protobuf field int32 android_api_level = 11; - * @param int $var - * @return $this - */ - public function setAndroidApiLevel($var) - { - GPBUtil::checkInt32($var); - $this->android_api_level = $var; - - return $this; - } - - /** - * Optional ID that can be provided for logging purposes in order to identify - * the request. - * - * Generated from protobuf field string trace_id = 12; - * @return string - */ - public function getTraceId() - { - return $this->trace_id; - } - - /** - * Optional ID that can be provided for logging purposes in order to identify - * the request. - * - * Generated from protobuf field string trace_id = 12; - * @param string $var - * @return $this - */ - public function setTraceId($var) - { - GPBUtil::checkString($var, True); - $this->trace_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/DeliveryRequestHeader/Platform.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/DeliveryRequestHeader/Platform.php deleted file mode 100644 index 765859442242..000000000000 --- a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/DeliveryRequestHeader/Platform.php +++ /dev/null @@ -1,71 +0,0 @@ -maps.fleetengine.delivery.v1.DeliveryRequestHeader.Platform - */ -class Platform -{ - /** - * The default value. This value is used if the platform is omitted. - * - * Generated from protobuf enum PLATFORM_UNSPECIFIED = 0; - */ - const PLATFORM_UNSPECIFIED = 0; - /** - * The request is coming from Android. - * - * Generated from protobuf enum ANDROID = 1; - */ - const ANDROID = 1; - /** - * The request is coming from iOS. - * - * Generated from protobuf enum IOS = 2; - */ - const IOS = 2; - /** - * The request is coming from the web. - * - * Generated from protobuf enum WEB = 3; - */ - const WEB = 3; - - private static $valueToName = [ - self::PLATFORM_UNSPECIFIED => 'PLATFORM_UNSPECIFIED', - self::ANDROID => 'ANDROID', - self::IOS => 'IOS', - self::WEB => 'WEB', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Platform::class, \Google\Maps\FleetEngine\Delivery\V1\DeliveryRequestHeader_Platform::class); - diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/DeliveryRequestHeader/SdkType.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/DeliveryRequestHeader/SdkType.php deleted file mode 100644 index 1c4eb571244c..000000000000 --- a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/DeliveryRequestHeader/SdkType.php +++ /dev/null @@ -1,71 +0,0 @@ -maps.fleetengine.delivery.v1.DeliveryRequestHeader.SdkType - */ -class SdkType -{ - /** - * The default value. This value is used if the `sdk_type` is omitted. - * - * Generated from protobuf enum SDK_TYPE_UNSPECIFIED = 0; - */ - const SDK_TYPE_UNSPECIFIED = 0; - /** - * The calling SDK is Consumer. - * - * Generated from protobuf enum CONSUMER = 1; - */ - const CONSUMER = 1; - /** - * The calling SDK is Driver. - * - * Generated from protobuf enum DRIVER = 2; - */ - const DRIVER = 2; - /** - * The calling SDK is JavaScript. - * - * Generated from protobuf enum JAVASCRIPT = 3; - */ - const JAVASCRIPT = 3; - - private static $valueToName = [ - self::SDK_TYPE_UNSPECIFIED => 'SDK_TYPE_UNSPECIFIED', - self::CONSUMER => 'CONSUMER', - self::DRIVER => 'DRIVER', - self::JAVASCRIPT => 'JAVASCRIPT', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SdkType::class, \Google\Maps\FleetEngine\Delivery\V1\DeliveryRequestHeader_SdkType::class); - diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/DeliveryVehicle.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/DeliveryVehicle.php deleted file mode 100644 index 30bf0c4151e0..000000000000 --- a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/DeliveryVehicle.php +++ /dev/null @@ -1,671 +0,0 @@ -maps.fleetengine.delivery.v1.DeliveryVehicle - */ -class DeliveryVehicle extends \Google\Protobuf\Internal\Message -{ - /** - * The unique name of this Delivery Vehicle. - * The format is `providers/{provider}/deliveryVehicles/{vehicle}`. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The last reported location of the Delivery Vehicle. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryVehicleLocation last_location = 2; - */ - protected $last_location = null; - /** - * The Delivery Vehicle's navigation status. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryVehicleNavigationStatus navigation_status = 3; - */ - protected $navigation_status = 0; - /** - * The encoded polyline specifying the route that the navigation recommends - * taking to the next waypoint. Your driver app updates this when a - * stop is reached or passed, and when the navigation reroutes. These - * `LatLng`s are returned in - * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0].path` - * (gRPC) or `Task.journeySharingInfo.remainingVehicleJourneySegments[0].path` - * (REST) for all active Tasks assigned to the Vehicle. - * There are a few cases where this field might not be used to populate - * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0].path` - * (gRPC) or `Task.journeySharingInfo.remainingVehicleJourneySegments[0].path` - * (REST): - * * The endpoint of the `current_route_segment` does not match - * `DeliveryVehicle.remaining_vehicle_journey_segments[0].stop` (gRPC) or - * `DeliveryVehicle.remainingVehicleJourneySegments[0].stop` (REST). - * * The driver app has not updated its location recently, so the last - * updated value for this field might be stale. - * * The driver app has recently updated its location, but the - * `current_route_segment` is stale, and points to a previous vehicle stop. - * In these cases, Fleet Engine populates this field with a route from the - * most recently passed VehicleStop to the upcoming VehicleStop to ensure that - * the consumer of this field has the best available information on the - * current path of the Delivery Vehicle. - * - * Generated from protobuf field bytes current_route_segment = 4; - */ - protected $current_route_segment = ''; - /** - * The location where the `current_route_segment` ends. This is not currently - * populated by the driver app, but you can supply it on - * `UpdateDeliveryVehicle` calls. It is either the `LatLng` from the upcoming - * vehicle stop, or the last `LatLng` of the `current_route_segment`. Fleet - * Engine will then do its best to interpolate to an actual `VehicleStop`. - * This field is ignored in `UpdateDeliveryVehicle` calls if the - * `current_route_segment` field is empty. - * - * Generated from protobuf field .google.type.LatLng current_route_segment_end_point = 5; - */ - protected $current_route_segment_end_point = null; - /** - * The remaining driving distance for the `current_route_segment`. - * The Driver app typically provides this field, but there are some - * circumstances in which Fleet Engine will override the value sent by the - * app. For more information, see - * [DeliveryVehicle.current_route_segment][maps.fleetengine.delivery.v1.DeliveryVehicle.current_route_segment]. - * This field is returned in - * `Task.remaining_vehicle_journey_segments[0].driving_distance_meters` (gRPC) - * or `Task.remainingVehicleJourneySegments[0].drivingDistanceMeters` (REST) - * for all active `Task`s assigned to the Delivery Vehicle. - * Fleet Engine ignores this field in `UpdateDeliveryVehicleRequest` if the - * `current_route_segment` field is empty. - * - * Generated from protobuf field .google.protobuf.Int32Value remaining_distance_meters = 6; - */ - protected $remaining_distance_meters = null; - /** - * The remaining driving time for the `current_route_segment`. - * The Driver app typically provides this field, but there are some - * circumstances in which Fleet Engine will override the value sent by the - * app. For more information, see - * [DeliveryVehicle.current_route_segment][maps.fleetengine.delivery.v1.DeliveryVehicle.current_route_segment]. - * This field is returned in - * `Task.remaining_vehicle_journey_segments[0].driving_duration` (gRPC) or - * `Task.remainingVehicleJourneySegments[0].drivingDuration` (REST) for all - * active tasks assigned to the Delivery Vehicle. - * Fleet Engine ignores this field in `UpdateDeliveryVehicleRequest` if the - * `current_route_segment` field is empty. - * - * Generated from protobuf field .google.protobuf.Duration remaining_duration = 7; - */ - protected $remaining_duration = null; - /** - * The journey segments assigned to this Delivery Vehicle, starting from the - * Vehicle's most recently reported location. This field won't be populated - * in the response of `ListDeliveryVehicles`. - * - * Generated from protobuf field repeated .maps.fleetengine.delivery.v1.VehicleJourneySegment remaining_vehicle_journey_segments = 8; - */ - private $remaining_vehicle_journey_segments; - /** - * A list of custom Delivery Vehicle attributes. A Delivery Vehicle can have - * at most 100 attributes, and each attribute must have a unique key. - * - * Generated from protobuf field repeated .maps.fleetengine.delivery.v1.DeliveryVehicleAttribute attributes = 9; - */ - private $attributes; - /** - * The type of this delivery vehicle. If unset, this will default to `AUTO`. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryVehicle.DeliveryVehicleType type = 10; - */ - protected $type = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The unique name of this Delivery Vehicle. - * The format is `providers/{provider}/deliveryVehicles/{vehicle}`. - * @type \Google\Maps\FleetEngine\Delivery\V1\DeliveryVehicleLocation $last_location - * The last reported location of the Delivery Vehicle. - * @type int $navigation_status - * The Delivery Vehicle's navigation status. - * @type string $current_route_segment - * The encoded polyline specifying the route that the navigation recommends - * taking to the next waypoint. Your driver app updates this when a - * stop is reached or passed, and when the navigation reroutes. These - * `LatLng`s are returned in - * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0].path` - * (gRPC) or `Task.journeySharingInfo.remainingVehicleJourneySegments[0].path` - * (REST) for all active Tasks assigned to the Vehicle. - * There are a few cases where this field might not be used to populate - * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0].path` - * (gRPC) or `Task.journeySharingInfo.remainingVehicleJourneySegments[0].path` - * (REST): - * * The endpoint of the `current_route_segment` does not match - * `DeliveryVehicle.remaining_vehicle_journey_segments[0].stop` (gRPC) or - * `DeliveryVehicle.remainingVehicleJourneySegments[0].stop` (REST). - * * The driver app has not updated its location recently, so the last - * updated value for this field might be stale. - * * The driver app has recently updated its location, but the - * `current_route_segment` is stale, and points to a previous vehicle stop. - * In these cases, Fleet Engine populates this field with a route from the - * most recently passed VehicleStop to the upcoming VehicleStop to ensure that - * the consumer of this field has the best available information on the - * current path of the Delivery Vehicle. - * @type \Google\Type\LatLng $current_route_segment_end_point - * The location where the `current_route_segment` ends. This is not currently - * populated by the driver app, but you can supply it on - * `UpdateDeliveryVehicle` calls. It is either the `LatLng` from the upcoming - * vehicle stop, or the last `LatLng` of the `current_route_segment`. Fleet - * Engine will then do its best to interpolate to an actual `VehicleStop`. - * This field is ignored in `UpdateDeliveryVehicle` calls if the - * `current_route_segment` field is empty. - * @type \Google\Protobuf\Int32Value $remaining_distance_meters - * The remaining driving distance for the `current_route_segment`. - * The Driver app typically provides this field, but there are some - * circumstances in which Fleet Engine will override the value sent by the - * app. For more information, see - * [DeliveryVehicle.current_route_segment][maps.fleetengine.delivery.v1.DeliveryVehicle.current_route_segment]. - * This field is returned in - * `Task.remaining_vehicle_journey_segments[0].driving_distance_meters` (gRPC) - * or `Task.remainingVehicleJourneySegments[0].drivingDistanceMeters` (REST) - * for all active `Task`s assigned to the Delivery Vehicle. - * Fleet Engine ignores this field in `UpdateDeliveryVehicleRequest` if the - * `current_route_segment` field is empty. - * @type \Google\Protobuf\Duration $remaining_duration - * The remaining driving time for the `current_route_segment`. - * The Driver app typically provides this field, but there are some - * circumstances in which Fleet Engine will override the value sent by the - * app. For more information, see - * [DeliveryVehicle.current_route_segment][maps.fleetengine.delivery.v1.DeliveryVehicle.current_route_segment]. - * This field is returned in - * `Task.remaining_vehicle_journey_segments[0].driving_duration` (gRPC) or - * `Task.remainingVehicleJourneySegments[0].drivingDuration` (REST) for all - * active tasks assigned to the Delivery Vehicle. - * Fleet Engine ignores this field in `UpdateDeliveryVehicleRequest` if the - * `current_route_segment` field is empty. - * @type array<\Google\Maps\FleetEngine\Delivery\V1\VehicleJourneySegment>|\Google\Protobuf\Internal\RepeatedField $remaining_vehicle_journey_segments - * The journey segments assigned to this Delivery Vehicle, starting from the - * Vehicle's most recently reported location. This field won't be populated - * in the response of `ListDeliveryVehicles`. - * @type array<\Google\Maps\FleetEngine\Delivery\V1\DeliveryVehicleAttribute>|\Google\Protobuf\Internal\RepeatedField $attributes - * A list of custom Delivery Vehicle attributes. A Delivery Vehicle can have - * at most 100 attributes, and each attribute must have a unique key. - * @type int $type - * The type of this delivery vehicle. If unset, this will default to `AUTO`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Fleetengine\Delivery\V1\DeliveryVehicles::initOnce(); - parent::__construct($data); - } - - /** - * The unique name of this Delivery Vehicle. - * The format is `providers/{provider}/deliveryVehicles/{vehicle}`. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The unique name of this Delivery Vehicle. - * The format is `providers/{provider}/deliveryVehicles/{vehicle}`. - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The last reported location of the Delivery Vehicle. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryVehicleLocation last_location = 2; - * @return \Google\Maps\FleetEngine\Delivery\V1\DeliveryVehicleLocation|null - */ - public function getLastLocation() - { - return $this->last_location; - } - - public function hasLastLocation() - { - return isset($this->last_location); - } - - public function clearLastLocation() - { - unset($this->last_location); - } - - /** - * The last reported location of the Delivery Vehicle. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryVehicleLocation last_location = 2; - * @param \Google\Maps\FleetEngine\Delivery\V1\DeliveryVehicleLocation $var - * @return $this - */ - public function setLastLocation($var) - { - GPBUtil::checkMessage($var, \Google\Maps\FleetEngine\Delivery\V1\DeliveryVehicleLocation::class); - $this->last_location = $var; - - return $this; - } - - /** - * The Delivery Vehicle's navigation status. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryVehicleNavigationStatus navigation_status = 3; - * @return int - */ - public function getNavigationStatus() - { - return $this->navigation_status; - } - - /** - * The Delivery Vehicle's navigation status. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryVehicleNavigationStatus navigation_status = 3; - * @param int $var - * @return $this - */ - public function setNavigationStatus($var) - { - GPBUtil::checkEnum($var, \Google\Maps\FleetEngine\Delivery\V1\DeliveryVehicleNavigationStatus::class); - $this->navigation_status = $var; - - return $this; - } - - /** - * The encoded polyline specifying the route that the navigation recommends - * taking to the next waypoint. Your driver app updates this when a - * stop is reached or passed, and when the navigation reroutes. These - * `LatLng`s are returned in - * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0].path` - * (gRPC) or `Task.journeySharingInfo.remainingVehicleJourneySegments[0].path` - * (REST) for all active Tasks assigned to the Vehicle. - * There are a few cases where this field might not be used to populate - * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0].path` - * (gRPC) or `Task.journeySharingInfo.remainingVehicleJourneySegments[0].path` - * (REST): - * * The endpoint of the `current_route_segment` does not match - * `DeliveryVehicle.remaining_vehicle_journey_segments[0].stop` (gRPC) or - * `DeliveryVehicle.remainingVehicleJourneySegments[0].stop` (REST). - * * The driver app has not updated its location recently, so the last - * updated value for this field might be stale. - * * The driver app has recently updated its location, but the - * `current_route_segment` is stale, and points to a previous vehicle stop. - * In these cases, Fleet Engine populates this field with a route from the - * most recently passed VehicleStop to the upcoming VehicleStop to ensure that - * the consumer of this field has the best available information on the - * current path of the Delivery Vehicle. - * - * Generated from protobuf field bytes current_route_segment = 4; - * @return string - */ - public function getCurrentRouteSegment() - { - return $this->current_route_segment; - } - - /** - * The encoded polyline specifying the route that the navigation recommends - * taking to the next waypoint. Your driver app updates this when a - * stop is reached or passed, and when the navigation reroutes. These - * `LatLng`s are returned in - * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0].path` - * (gRPC) or `Task.journeySharingInfo.remainingVehicleJourneySegments[0].path` - * (REST) for all active Tasks assigned to the Vehicle. - * There are a few cases where this field might not be used to populate - * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0].path` - * (gRPC) or `Task.journeySharingInfo.remainingVehicleJourneySegments[0].path` - * (REST): - * * The endpoint of the `current_route_segment` does not match - * `DeliveryVehicle.remaining_vehicle_journey_segments[0].stop` (gRPC) or - * `DeliveryVehicle.remainingVehicleJourneySegments[0].stop` (REST). - * * The driver app has not updated its location recently, so the last - * updated value for this field might be stale. - * * The driver app has recently updated its location, but the - * `current_route_segment` is stale, and points to a previous vehicle stop. - * In these cases, Fleet Engine populates this field with a route from the - * most recently passed VehicleStop to the upcoming VehicleStop to ensure that - * the consumer of this field has the best available information on the - * current path of the Delivery Vehicle. - * - * Generated from protobuf field bytes current_route_segment = 4; - * @param string $var - * @return $this - */ - public function setCurrentRouteSegment($var) - { - GPBUtil::checkString($var, False); - $this->current_route_segment = $var; - - return $this; - } - - /** - * The location where the `current_route_segment` ends. This is not currently - * populated by the driver app, but you can supply it on - * `UpdateDeliveryVehicle` calls. It is either the `LatLng` from the upcoming - * vehicle stop, or the last `LatLng` of the `current_route_segment`. Fleet - * Engine will then do its best to interpolate to an actual `VehicleStop`. - * This field is ignored in `UpdateDeliveryVehicle` calls if the - * `current_route_segment` field is empty. - * - * Generated from protobuf field .google.type.LatLng current_route_segment_end_point = 5; - * @return \Google\Type\LatLng|null - */ - public function getCurrentRouteSegmentEndPoint() - { - return $this->current_route_segment_end_point; - } - - public function hasCurrentRouteSegmentEndPoint() - { - return isset($this->current_route_segment_end_point); - } - - public function clearCurrentRouteSegmentEndPoint() - { - unset($this->current_route_segment_end_point); - } - - /** - * The location where the `current_route_segment` ends. This is not currently - * populated by the driver app, but you can supply it on - * `UpdateDeliveryVehicle` calls. It is either the `LatLng` from the upcoming - * vehicle stop, or the last `LatLng` of the `current_route_segment`. Fleet - * Engine will then do its best to interpolate to an actual `VehicleStop`. - * This field is ignored in `UpdateDeliveryVehicle` calls if the - * `current_route_segment` field is empty. - * - * Generated from protobuf field .google.type.LatLng current_route_segment_end_point = 5; - * @param \Google\Type\LatLng $var - * @return $this - */ - public function setCurrentRouteSegmentEndPoint($var) - { - GPBUtil::checkMessage($var, \Google\Type\LatLng::class); - $this->current_route_segment_end_point = $var; - - return $this; - } - - /** - * The remaining driving distance for the `current_route_segment`. - * The Driver app typically provides this field, but there are some - * circumstances in which Fleet Engine will override the value sent by the - * app. For more information, see - * [DeliveryVehicle.current_route_segment][maps.fleetengine.delivery.v1.DeliveryVehicle.current_route_segment]. - * This field is returned in - * `Task.remaining_vehicle_journey_segments[0].driving_distance_meters` (gRPC) - * or `Task.remainingVehicleJourneySegments[0].drivingDistanceMeters` (REST) - * for all active `Task`s assigned to the Delivery Vehicle. - * Fleet Engine ignores this field in `UpdateDeliveryVehicleRequest` if the - * `current_route_segment` field is empty. - * - * Generated from protobuf field .google.protobuf.Int32Value remaining_distance_meters = 6; - * @return \Google\Protobuf\Int32Value|null - */ - public function getRemainingDistanceMeters() - { - return $this->remaining_distance_meters; - } - - public function hasRemainingDistanceMeters() - { - return isset($this->remaining_distance_meters); - } - - public function clearRemainingDistanceMeters() - { - unset($this->remaining_distance_meters); - } - - /** - * Returns the unboxed value from getRemainingDistanceMeters() - - * The remaining driving distance for the `current_route_segment`. - * The Driver app typically provides this field, but there are some - * circumstances in which Fleet Engine will override the value sent by the - * app. For more information, see - * [DeliveryVehicle.current_route_segment][maps.fleetengine.delivery.v1.DeliveryVehicle.current_route_segment]. - * This field is returned in - * `Task.remaining_vehicle_journey_segments[0].driving_distance_meters` (gRPC) - * or `Task.remainingVehicleJourneySegments[0].drivingDistanceMeters` (REST) - * for all active `Task`s assigned to the Delivery Vehicle. - * Fleet Engine ignores this field in `UpdateDeliveryVehicleRequest` if the - * `current_route_segment` field is empty. - * - * Generated from protobuf field .google.protobuf.Int32Value remaining_distance_meters = 6; - * @return int|null - */ - public function getRemainingDistanceMetersUnwrapped() - { - return $this->readWrapperValue("remaining_distance_meters"); - } - - /** - * The remaining driving distance for the `current_route_segment`. - * The Driver app typically provides this field, but there are some - * circumstances in which Fleet Engine will override the value sent by the - * app. For more information, see - * [DeliveryVehicle.current_route_segment][maps.fleetengine.delivery.v1.DeliveryVehicle.current_route_segment]. - * This field is returned in - * `Task.remaining_vehicle_journey_segments[0].driving_distance_meters` (gRPC) - * or `Task.remainingVehicleJourneySegments[0].drivingDistanceMeters` (REST) - * for all active `Task`s assigned to the Delivery Vehicle. - * Fleet Engine ignores this field in `UpdateDeliveryVehicleRequest` if the - * `current_route_segment` field is empty. - * - * Generated from protobuf field .google.protobuf.Int32Value remaining_distance_meters = 6; - * @param \Google\Protobuf\Int32Value $var - * @return $this - */ - public function setRemainingDistanceMeters($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class); - $this->remaining_distance_meters = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object. - - * The remaining driving distance for the `current_route_segment`. - * The Driver app typically provides this field, but there are some - * circumstances in which Fleet Engine will override the value sent by the - * app. For more information, see - * [DeliveryVehicle.current_route_segment][maps.fleetengine.delivery.v1.DeliveryVehicle.current_route_segment]. - * This field is returned in - * `Task.remaining_vehicle_journey_segments[0].driving_distance_meters` (gRPC) - * or `Task.remainingVehicleJourneySegments[0].drivingDistanceMeters` (REST) - * for all active `Task`s assigned to the Delivery Vehicle. - * Fleet Engine ignores this field in `UpdateDeliveryVehicleRequest` if the - * `current_route_segment` field is empty. - * - * Generated from protobuf field .google.protobuf.Int32Value remaining_distance_meters = 6; - * @param int|null $var - * @return $this - */ - public function setRemainingDistanceMetersUnwrapped($var) - { - $this->writeWrapperValue("remaining_distance_meters", $var); - return $this;} - - /** - * The remaining driving time for the `current_route_segment`. - * The Driver app typically provides this field, but there are some - * circumstances in which Fleet Engine will override the value sent by the - * app. For more information, see - * [DeliveryVehicle.current_route_segment][maps.fleetengine.delivery.v1.DeliveryVehicle.current_route_segment]. - * This field is returned in - * `Task.remaining_vehicle_journey_segments[0].driving_duration` (gRPC) or - * `Task.remainingVehicleJourneySegments[0].drivingDuration` (REST) for all - * active tasks assigned to the Delivery Vehicle. - * Fleet Engine ignores this field in `UpdateDeliveryVehicleRequest` if the - * `current_route_segment` field is empty. - * - * Generated from protobuf field .google.protobuf.Duration remaining_duration = 7; - * @return \Google\Protobuf\Duration|null - */ - public function getRemainingDuration() - { - return $this->remaining_duration; - } - - public function hasRemainingDuration() - { - return isset($this->remaining_duration); - } - - public function clearRemainingDuration() - { - unset($this->remaining_duration); - } - - /** - * The remaining driving time for the `current_route_segment`. - * The Driver app typically provides this field, but there are some - * circumstances in which Fleet Engine will override the value sent by the - * app. For more information, see - * [DeliveryVehicle.current_route_segment][maps.fleetengine.delivery.v1.DeliveryVehicle.current_route_segment]. - * This field is returned in - * `Task.remaining_vehicle_journey_segments[0].driving_duration` (gRPC) or - * `Task.remainingVehicleJourneySegments[0].drivingDuration` (REST) for all - * active tasks assigned to the Delivery Vehicle. - * Fleet Engine ignores this field in `UpdateDeliveryVehicleRequest` if the - * `current_route_segment` field is empty. - * - * Generated from protobuf field .google.protobuf.Duration remaining_duration = 7; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setRemainingDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->remaining_duration = $var; - - return $this; - } - - /** - * The journey segments assigned to this Delivery Vehicle, starting from the - * Vehicle's most recently reported location. This field won't be populated - * in the response of `ListDeliveryVehicles`. - * - * Generated from protobuf field repeated .maps.fleetengine.delivery.v1.VehicleJourneySegment remaining_vehicle_journey_segments = 8; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRemainingVehicleJourneySegments() - { - return $this->remaining_vehicle_journey_segments; - } - - /** - * The journey segments assigned to this Delivery Vehicle, starting from the - * Vehicle's most recently reported location. This field won't be populated - * in the response of `ListDeliveryVehicles`. - * - * Generated from protobuf field repeated .maps.fleetengine.delivery.v1.VehicleJourneySegment remaining_vehicle_journey_segments = 8; - * @param array<\Google\Maps\FleetEngine\Delivery\V1\VehicleJourneySegment>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRemainingVehicleJourneySegments($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\FleetEngine\Delivery\V1\VehicleJourneySegment::class); - $this->remaining_vehicle_journey_segments = $arr; - - return $this; - } - - /** - * A list of custom Delivery Vehicle attributes. A Delivery Vehicle can have - * at most 100 attributes, and each attribute must have a unique key. - * - * Generated from protobuf field repeated .maps.fleetengine.delivery.v1.DeliveryVehicleAttribute attributes = 9; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAttributes() - { - return $this->attributes; - } - - /** - * A list of custom Delivery Vehicle attributes. A Delivery Vehicle can have - * at most 100 attributes, and each attribute must have a unique key. - * - * Generated from protobuf field repeated .maps.fleetengine.delivery.v1.DeliveryVehicleAttribute attributes = 9; - * @param array<\Google\Maps\FleetEngine\Delivery\V1\DeliveryVehicleAttribute>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAttributes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\FleetEngine\Delivery\V1\DeliveryVehicleAttribute::class); - $this->attributes = $arr; - - return $this; - } - - /** - * The type of this delivery vehicle. If unset, this will default to `AUTO`. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryVehicle.DeliveryVehicleType type = 10; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * The type of this delivery vehicle. If unset, this will default to `AUTO`. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryVehicle.DeliveryVehicleType type = 10; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Maps\FleetEngine\Delivery\V1\DeliveryVehicle\DeliveryVehicleType::class); - $this->type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/DeliveryVehicle/DeliveryVehicleType.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/DeliveryVehicle/DeliveryVehicleType.php deleted file mode 100644 index 896654441ac9..000000000000 --- a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/DeliveryVehicle/DeliveryVehicleType.php +++ /dev/null @@ -1,79 +0,0 @@ -maps.fleetengine.delivery.v1.DeliveryVehicle.DeliveryVehicleType - */ -class DeliveryVehicleType -{ - /** - * The value is unused. - * - * Generated from protobuf enum DELIVERY_VEHICLE_TYPE_UNSPECIFIED = 0; - */ - const DELIVERY_VEHICLE_TYPE_UNSPECIFIED = 0; - /** - * An automobile. - * - * Generated from protobuf enum AUTO = 1; - */ - const AUTO = 1; - /** - * A motorcycle, moped, or other two-wheeled vehicle - * - * Generated from protobuf enum TWO_WHEELER = 2; - */ - const TWO_WHEELER = 2; - /** - * Human-powered transport. - * - * Generated from protobuf enum BICYCLE = 3; - */ - const BICYCLE = 3; - /** - * A human transporter, typically walking or running, traveling along - * pedestrian pathways. - * - * Generated from protobuf enum PEDESTRIAN = 4; - */ - const PEDESTRIAN = 4; - - private static $valueToName = [ - self::DELIVERY_VEHICLE_TYPE_UNSPECIFIED => 'DELIVERY_VEHICLE_TYPE_UNSPECIFIED', - self::AUTO => 'AUTO', - self::TWO_WHEELER => 'TWO_WHEELER', - self::BICYCLE => 'BICYCLE', - self::PEDESTRIAN => 'PEDESTRIAN', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DeliveryVehicleType::class, \Google\Maps\FleetEngine\Delivery\V1\DeliveryVehicle_DeliveryVehicleType::class); - diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/DeliveryVehicleAttribute.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/DeliveryVehicleAttribute.php deleted file mode 100644 index 6260a1669498..000000000000 --- a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/DeliveryVehicleAttribute.php +++ /dev/null @@ -1,225 +0,0 @@ -maps.fleetengine.delivery.v1.DeliveryVehicleAttribute - */ -class DeliveryVehicleAttribute extends \Google\Protobuf\Internal\Message -{ - /** - * The attribute's key. - * - * Generated from protobuf field string key = 1; - */ - protected $key = ''; - /** - * The attribute's value. - * - * Generated from protobuf field string value = 2; - */ - protected $value = ''; - protected $delivery_vehicle_attribute_value; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $key - * The attribute's key. - * @type string $value - * The attribute's value. - * @type string $string_value - * String typed attribute value. - * Note: This is identical to the `value` field which will eventually be - * deprecated. For create or update methods, either field can be used, but - * it's strongly recommended to use `string_value`. If both `string_value` - * and `value` are set, they must be identical or an error will be thrown. - * Both fields are populated in responses. - * @type bool $bool_value - * Boolean typed attribute value. - * @type float $number_value - * Double typed attribute value. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Fleetengine\Delivery\V1\Common::initOnce(); - parent::__construct($data); - } - - /** - * The attribute's key. - * - * Generated from protobuf field string key = 1; - * @return string - */ - public function getKey() - { - return $this->key; - } - - /** - * The attribute's key. - * - * Generated from protobuf field string key = 1; - * @param string $var - * @return $this - */ - public function setKey($var) - { - GPBUtil::checkString($var, True); - $this->key = $var; - - return $this; - } - - /** - * The attribute's value. - * - * Generated from protobuf field string value = 2; - * @return string - */ - public function getValue() - { - return $this->value; - } - - /** - * The attribute's value. - * - * Generated from protobuf field string value = 2; - * @param string $var - * @return $this - */ - public function setValue($var) - { - GPBUtil::checkString($var, True); - $this->value = $var; - - return $this; - } - - /** - * String typed attribute value. - * Note: This is identical to the `value` field which will eventually be - * deprecated. For create or update methods, either field can be used, but - * it's strongly recommended to use `string_value`. If both `string_value` - * and `value` are set, they must be identical or an error will be thrown. - * Both fields are populated in responses. - * - * Generated from protobuf field string string_value = 3; - * @return string - */ - public function getStringValue() - { - return $this->readOneof(3); - } - - public function hasStringValue() - { - return $this->hasOneof(3); - } - - /** - * String typed attribute value. - * Note: This is identical to the `value` field which will eventually be - * deprecated. For create or update methods, either field can be used, but - * it's strongly recommended to use `string_value`. If both `string_value` - * and `value` are set, they must be identical or an error will be thrown. - * Both fields are populated in responses. - * - * Generated from protobuf field string string_value = 3; - * @param string $var - * @return $this - */ - public function setStringValue($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Boolean typed attribute value. - * - * Generated from protobuf field bool bool_value = 4; - * @return bool - */ - public function getBoolValue() - { - return $this->readOneof(4); - } - - public function hasBoolValue() - { - return $this->hasOneof(4); - } - - /** - * Boolean typed attribute value. - * - * Generated from protobuf field bool bool_value = 4; - * @param bool $var - * @return $this - */ - public function setBoolValue($var) - { - GPBUtil::checkBool($var); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Double typed attribute value. - * - * Generated from protobuf field double number_value = 5; - * @return float - */ - public function getNumberValue() - { - return $this->readOneof(5); - } - - public function hasNumberValue() - { - return $this->hasOneof(5); - } - - /** - * Double typed attribute value. - * - * Generated from protobuf field double number_value = 5; - * @param float $var - * @return $this - */ - public function setNumberValue($var) - { - GPBUtil::checkDouble($var); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * @return string - */ - public function getDeliveryVehicleAttributeValue() - { - return $this->whichOneof("delivery_vehicle_attribute_value"); - } - -} - diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/DeliveryVehicleLocation.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/DeliveryVehicleLocation.php deleted file mode 100644 index e5bcab30627f..000000000000 --- a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/DeliveryVehicleLocation.php +++ /dev/null @@ -1,1789 +0,0 @@ -maps.fleetengine.delivery.v1.DeliveryVehicleLocation - */ -class DeliveryVehicleLocation extends \Google\Protobuf\Internal\Message -{ - /** - * The location of the vehicle. - * When it is sent to Fleet Engine, the vehicle's location is a GPS location. - * When you receive it in a response, the vehicle's location can be either a - * GPS location, a supplemental location, or some other estimated location. - * The source is specified in `location_sensor`. - * - * Generated from protobuf field .google.type.LatLng location = 1; - */ - protected $location = null; - /** - * Deprecated: Use `latlng_accuracy` instead. - * - * Generated from protobuf field .google.protobuf.DoubleValue horizontal_accuracy = 8 [deprecated = true]; - * @deprecated - */ - protected $horizontal_accuracy = null; - /** - * Accuracy of `location` in meters as a radius. - * - * Generated from protobuf field .google.protobuf.DoubleValue latlng_accuracy = 22; - */ - protected $latlng_accuracy = null; - /** - * Direction the vehicle is moving in degrees. 0 represents North. - * The valid range is [0,360). - * - * Generated from protobuf field .google.protobuf.Int32Value heading = 2; - */ - protected $heading = null; - /** - * Deprecated: Use `heading_accuracy` instead. - * - * Generated from protobuf field .google.protobuf.DoubleValue bearing_accuracy = 10 [deprecated = true]; - * @deprecated - */ - protected $bearing_accuracy = null; - /** - * Accuracy of `heading` in degrees. - * - * Generated from protobuf field .google.protobuf.DoubleValue heading_accuracy = 23; - */ - protected $heading_accuracy = null; - /** - * Altitude in meters above WGS84. - * - * Generated from protobuf field .google.protobuf.DoubleValue altitude = 5; - */ - protected $altitude = null; - /** - * Deprecated: Use `altitude_accuracy` instead. - * - * Generated from protobuf field .google.protobuf.DoubleValue vertical_accuracy = 9 [deprecated = true]; - * @deprecated - */ - protected $vertical_accuracy = null; - /** - * Accuracy of `altitude` in meters. - * - * Generated from protobuf field .google.protobuf.DoubleValue altitude_accuracy = 24; - */ - protected $altitude_accuracy = null; - /** - * Speed of the vehicle in kilometers per hour. - * Deprecated: Use `speed` instead. - * - * Generated from protobuf field .google.protobuf.Int32Value speed_kmph = 3 [deprecated = true]; - * @deprecated - */ - protected $speed_kmph = null; - /** - * Speed of the vehicle in meters/second - * - * Generated from protobuf field .google.protobuf.DoubleValue speed = 6; - */ - protected $speed = null; - /** - * Accuracy of `speed` in meters/second. - * - * Generated from protobuf field .google.protobuf.DoubleValue speed_accuracy = 7; - */ - protected $speed_accuracy = null; - /** - * The time when `location` was reported by the sensor according to the - * sensor's clock. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4; - */ - protected $update_time = null; - /** - * Output only. The time when the server received the location information. - * - * Generated from protobuf field .google.protobuf.Timestamp server_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $server_time = null; - /** - * Provider of location data (for example, `GPS`). - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor location_sensor = 11; - */ - protected $location_sensor = 0; - /** - * Whether `location` is snapped to a road. - * - * Generated from protobuf field .google.protobuf.BoolValue is_road_snapped = 27; - */ - protected $is_road_snapped = null; - /** - * Input only. Indicates whether the GPS sensor is enabled on the mobile - * device. - * - * Generated from protobuf field .google.protobuf.BoolValue is_gps_sensor_enabled = 12 [(.google.api.field_behavior) = INPUT_ONLY]; - */ - protected $is_gps_sensor_enabled = null; - /** - * Input only. Time (in seconds) since this location was first sent to the - * server. This will be zero for the first update. If the time is unknown (for - * example, when the app restarts), this value resets to zero. - * - * Generated from protobuf field .google.protobuf.Int32Value time_since_update = 14 [(.google.api.field_behavior) = INPUT_ONLY]; - */ - protected $time_since_update = null; - /** - * Input only. Deprecated: Other signals are now used to determine if a - * location is stale. - * - * Generated from protobuf field .google.protobuf.Int32Value num_stale_updates = 15 [deprecated = true, (.google.api.field_behavior) = INPUT_ONLY]; - * @deprecated - */ - protected $num_stale_updates = null; - /** - * Raw vehicle location (unprocessed by road-snapper). - * - * Generated from protobuf field .google.type.LatLng raw_location = 16; - */ - protected $raw_location = null; - /** - * Timestamp associated with the raw location. - * - * Generated from protobuf field .google.protobuf.Timestamp raw_location_time = 17; - */ - protected $raw_location_time = null; - /** - * Source of the raw location. Defaults to `GPS`. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor raw_location_sensor = 28; - */ - protected $raw_location_sensor = 0; - /** - * Accuracy of `raw_location` as a radius, in meters. - * - * Generated from protobuf field .google.protobuf.DoubleValue raw_location_accuracy = 25; - */ - protected $raw_location_accuracy = null; - /** - * Supplemental location provided by the integrating app. - * - * Generated from protobuf field .google.type.LatLng supplemental_location = 18; - */ - protected $supplemental_location = null; - /** - * Timestamp associated with the supplemental location. - * - * Generated from protobuf field .google.protobuf.Timestamp supplemental_location_time = 19; - */ - protected $supplemental_location_time = null; - /** - * Source of the supplemental location. Defaults to - * `CUSTOMER_SUPPLIED_LOCATION`. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor supplemental_location_sensor = 20; - */ - protected $supplemental_location_sensor = 0; - /** - * Accuracy of `supplemental_location` as a radius, in meters. - * - * Generated from protobuf field .google.protobuf.DoubleValue supplemental_location_accuracy = 21; - */ - protected $supplemental_location_accuracy = null; - /** - * Deprecated: Use `is_road_snapped` instead. - * - * Generated from protobuf field bool road_snapped = 26 [deprecated = true]; - * @deprecated - */ - protected $road_snapped = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Type\LatLng $location - * The location of the vehicle. - * When it is sent to Fleet Engine, the vehicle's location is a GPS location. - * When you receive it in a response, the vehicle's location can be either a - * GPS location, a supplemental location, or some other estimated location. - * The source is specified in `location_sensor`. - * @type \Google\Protobuf\DoubleValue $horizontal_accuracy - * Deprecated: Use `latlng_accuracy` instead. - * @type \Google\Protobuf\DoubleValue $latlng_accuracy - * Accuracy of `location` in meters as a radius. - * @type \Google\Protobuf\Int32Value $heading - * Direction the vehicle is moving in degrees. 0 represents North. - * The valid range is [0,360). - * @type \Google\Protobuf\DoubleValue $bearing_accuracy - * Deprecated: Use `heading_accuracy` instead. - * @type \Google\Protobuf\DoubleValue $heading_accuracy - * Accuracy of `heading` in degrees. - * @type \Google\Protobuf\DoubleValue $altitude - * Altitude in meters above WGS84. - * @type \Google\Protobuf\DoubleValue $vertical_accuracy - * Deprecated: Use `altitude_accuracy` instead. - * @type \Google\Protobuf\DoubleValue $altitude_accuracy - * Accuracy of `altitude` in meters. - * @type \Google\Protobuf\Int32Value $speed_kmph - * Speed of the vehicle in kilometers per hour. - * Deprecated: Use `speed` instead. - * @type \Google\Protobuf\DoubleValue $speed - * Speed of the vehicle in meters/second - * @type \Google\Protobuf\DoubleValue $speed_accuracy - * Accuracy of `speed` in meters/second. - * @type \Google\Protobuf\Timestamp $update_time - * The time when `location` was reported by the sensor according to the - * sensor's clock. - * @type \Google\Protobuf\Timestamp $server_time - * Output only. The time when the server received the location information. - * @type int $location_sensor - * Provider of location data (for example, `GPS`). - * @type \Google\Protobuf\BoolValue $is_road_snapped - * Whether `location` is snapped to a road. - * @type \Google\Protobuf\BoolValue $is_gps_sensor_enabled - * Input only. Indicates whether the GPS sensor is enabled on the mobile - * device. - * @type \Google\Protobuf\Int32Value $time_since_update - * Input only. Time (in seconds) since this location was first sent to the - * server. This will be zero for the first update. If the time is unknown (for - * example, when the app restarts), this value resets to zero. - * @type \Google\Protobuf\Int32Value $num_stale_updates - * Input only. Deprecated: Other signals are now used to determine if a - * location is stale. - * @type \Google\Type\LatLng $raw_location - * Raw vehicle location (unprocessed by road-snapper). - * @type \Google\Protobuf\Timestamp $raw_location_time - * Timestamp associated with the raw location. - * @type int $raw_location_sensor - * Source of the raw location. Defaults to `GPS`. - * @type \Google\Protobuf\DoubleValue $raw_location_accuracy - * Accuracy of `raw_location` as a radius, in meters. - * @type \Google\Type\LatLng $supplemental_location - * Supplemental location provided by the integrating app. - * @type \Google\Protobuf\Timestamp $supplemental_location_time - * Timestamp associated with the supplemental location. - * @type int $supplemental_location_sensor - * Source of the supplemental location. Defaults to - * `CUSTOMER_SUPPLIED_LOCATION`. - * @type \Google\Protobuf\DoubleValue $supplemental_location_accuracy - * Accuracy of `supplemental_location` as a radius, in meters. - * @type bool $road_snapped - * Deprecated: Use `is_road_snapped` instead. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Fleetengine\Delivery\V1\Common::initOnce(); - parent::__construct($data); - } - - /** - * The location of the vehicle. - * When it is sent to Fleet Engine, the vehicle's location is a GPS location. - * When you receive it in a response, the vehicle's location can be either a - * GPS location, a supplemental location, or some other estimated location. - * The source is specified in `location_sensor`. - * - * Generated from protobuf field .google.type.LatLng location = 1; - * @return \Google\Type\LatLng|null - */ - public function getLocation() - { - return $this->location; - } - - public function hasLocation() - { - return isset($this->location); - } - - public function clearLocation() - { - unset($this->location); - } - - /** - * The location of the vehicle. - * When it is sent to Fleet Engine, the vehicle's location is a GPS location. - * When you receive it in a response, the vehicle's location can be either a - * GPS location, a supplemental location, or some other estimated location. - * The source is specified in `location_sensor`. - * - * Generated from protobuf field .google.type.LatLng location = 1; - * @param \Google\Type\LatLng $var - * @return $this - */ - public function setLocation($var) - { - GPBUtil::checkMessage($var, \Google\Type\LatLng::class); - $this->location = $var; - - return $this; - } - - /** - * Deprecated: Use `latlng_accuracy` instead. - * - * Generated from protobuf field .google.protobuf.DoubleValue horizontal_accuracy = 8 [deprecated = true]; - * @return \Google\Protobuf\DoubleValue|null - * @deprecated - */ - public function getHorizontalAccuracy() - { - @trigger_error('horizontal_accuracy is deprecated.', E_USER_DEPRECATED); - return $this->horizontal_accuracy; - } - - public function hasHorizontalAccuracy() - { - @trigger_error('horizontal_accuracy is deprecated.', E_USER_DEPRECATED); - return isset($this->horizontal_accuracy); - } - - public function clearHorizontalAccuracy() - { - @trigger_error('horizontal_accuracy is deprecated.', E_USER_DEPRECATED); - unset($this->horizontal_accuracy); - } - - /** - * Returns the unboxed value from getHorizontalAccuracy() - - * Deprecated: Use `latlng_accuracy` instead. - * - * Generated from protobuf field .google.protobuf.DoubleValue horizontal_accuracy = 8 [deprecated = true]; - * @return float|null - */ - public function getHorizontalAccuracyUnwrapped() - { - @trigger_error('horizontal_accuracy is deprecated.', E_USER_DEPRECATED); - return $this->readWrapperValue("horizontal_accuracy"); - } - - /** - * Deprecated: Use `latlng_accuracy` instead. - * - * Generated from protobuf field .google.protobuf.DoubleValue horizontal_accuracy = 8 [deprecated = true]; - * @param \Google\Protobuf\DoubleValue $var - * @return $this - * @deprecated - */ - public function setHorizontalAccuracy($var) - { - @trigger_error('horizontal_accuracy is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkMessage($var, \Google\Protobuf\DoubleValue::class); - $this->horizontal_accuracy = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\DoubleValue object. - - * Deprecated: Use `latlng_accuracy` instead. - * - * Generated from protobuf field .google.protobuf.DoubleValue horizontal_accuracy = 8 [deprecated = true]; - * @param float|null $var - * @return $this - */ - public function setHorizontalAccuracyUnwrapped($var) - { - $this->writeWrapperValue("horizontal_accuracy", $var); - return $this;} - - /** - * Accuracy of `location` in meters as a radius. - * - * Generated from protobuf field .google.protobuf.DoubleValue latlng_accuracy = 22; - * @return \Google\Protobuf\DoubleValue|null - */ - public function getLatlngAccuracy() - { - return $this->latlng_accuracy; - } - - public function hasLatlngAccuracy() - { - return isset($this->latlng_accuracy); - } - - public function clearLatlngAccuracy() - { - unset($this->latlng_accuracy); - } - - /** - * Returns the unboxed value from getLatlngAccuracy() - - * Accuracy of `location` in meters as a radius. - * - * Generated from protobuf field .google.protobuf.DoubleValue latlng_accuracy = 22; - * @return float|null - */ - public function getLatlngAccuracyUnwrapped() - { - return $this->readWrapperValue("latlng_accuracy"); - } - - /** - * Accuracy of `location` in meters as a radius. - * - * Generated from protobuf field .google.protobuf.DoubleValue latlng_accuracy = 22; - * @param \Google\Protobuf\DoubleValue $var - * @return $this - */ - public function setLatlngAccuracy($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\DoubleValue::class); - $this->latlng_accuracy = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\DoubleValue object. - - * Accuracy of `location` in meters as a radius. - * - * Generated from protobuf field .google.protobuf.DoubleValue latlng_accuracy = 22; - * @param float|null $var - * @return $this - */ - public function setLatlngAccuracyUnwrapped($var) - { - $this->writeWrapperValue("latlng_accuracy", $var); - return $this;} - - /** - * Direction the vehicle is moving in degrees. 0 represents North. - * The valid range is [0,360). - * - * Generated from protobuf field .google.protobuf.Int32Value heading = 2; - * @return \Google\Protobuf\Int32Value|null - */ - public function getHeading() - { - return $this->heading; - } - - public function hasHeading() - { - return isset($this->heading); - } - - public function clearHeading() - { - unset($this->heading); - } - - /** - * Returns the unboxed value from getHeading() - - * Direction the vehicle is moving in degrees. 0 represents North. - * The valid range is [0,360). - * - * Generated from protobuf field .google.protobuf.Int32Value heading = 2; - * @return int|null - */ - public function getHeadingUnwrapped() - { - return $this->readWrapperValue("heading"); - } - - /** - * Direction the vehicle is moving in degrees. 0 represents North. - * The valid range is [0,360). - * - * Generated from protobuf field .google.protobuf.Int32Value heading = 2; - * @param \Google\Protobuf\Int32Value $var - * @return $this - */ - public function setHeading($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class); - $this->heading = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object. - - * Direction the vehicle is moving in degrees. 0 represents North. - * The valid range is [0,360). - * - * Generated from protobuf field .google.protobuf.Int32Value heading = 2; - * @param int|null $var - * @return $this - */ - public function setHeadingUnwrapped($var) - { - $this->writeWrapperValue("heading", $var); - return $this;} - - /** - * Deprecated: Use `heading_accuracy` instead. - * - * Generated from protobuf field .google.protobuf.DoubleValue bearing_accuracy = 10 [deprecated = true]; - * @return \Google\Protobuf\DoubleValue|null - * @deprecated - */ - public function getBearingAccuracy() - { - @trigger_error('bearing_accuracy is deprecated.', E_USER_DEPRECATED); - return $this->bearing_accuracy; - } - - public function hasBearingAccuracy() - { - @trigger_error('bearing_accuracy is deprecated.', E_USER_DEPRECATED); - return isset($this->bearing_accuracy); - } - - public function clearBearingAccuracy() - { - @trigger_error('bearing_accuracy is deprecated.', E_USER_DEPRECATED); - unset($this->bearing_accuracy); - } - - /** - * Returns the unboxed value from getBearingAccuracy() - - * Deprecated: Use `heading_accuracy` instead. - * - * Generated from protobuf field .google.protobuf.DoubleValue bearing_accuracy = 10 [deprecated = true]; - * @return float|null - */ - public function getBearingAccuracyUnwrapped() - { - @trigger_error('bearing_accuracy is deprecated.', E_USER_DEPRECATED); - return $this->readWrapperValue("bearing_accuracy"); - } - - /** - * Deprecated: Use `heading_accuracy` instead. - * - * Generated from protobuf field .google.protobuf.DoubleValue bearing_accuracy = 10 [deprecated = true]; - * @param \Google\Protobuf\DoubleValue $var - * @return $this - * @deprecated - */ - public function setBearingAccuracy($var) - { - @trigger_error('bearing_accuracy is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkMessage($var, \Google\Protobuf\DoubleValue::class); - $this->bearing_accuracy = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\DoubleValue object. - - * Deprecated: Use `heading_accuracy` instead. - * - * Generated from protobuf field .google.protobuf.DoubleValue bearing_accuracy = 10 [deprecated = true]; - * @param float|null $var - * @return $this - */ - public function setBearingAccuracyUnwrapped($var) - { - $this->writeWrapperValue("bearing_accuracy", $var); - return $this;} - - /** - * Accuracy of `heading` in degrees. - * - * Generated from protobuf field .google.protobuf.DoubleValue heading_accuracy = 23; - * @return \Google\Protobuf\DoubleValue|null - */ - public function getHeadingAccuracy() - { - return $this->heading_accuracy; - } - - public function hasHeadingAccuracy() - { - return isset($this->heading_accuracy); - } - - public function clearHeadingAccuracy() - { - unset($this->heading_accuracy); - } - - /** - * Returns the unboxed value from getHeadingAccuracy() - - * Accuracy of `heading` in degrees. - * - * Generated from protobuf field .google.protobuf.DoubleValue heading_accuracy = 23; - * @return float|null - */ - public function getHeadingAccuracyUnwrapped() - { - return $this->readWrapperValue("heading_accuracy"); - } - - /** - * Accuracy of `heading` in degrees. - * - * Generated from protobuf field .google.protobuf.DoubleValue heading_accuracy = 23; - * @param \Google\Protobuf\DoubleValue $var - * @return $this - */ - public function setHeadingAccuracy($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\DoubleValue::class); - $this->heading_accuracy = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\DoubleValue object. - - * Accuracy of `heading` in degrees. - * - * Generated from protobuf field .google.protobuf.DoubleValue heading_accuracy = 23; - * @param float|null $var - * @return $this - */ - public function setHeadingAccuracyUnwrapped($var) - { - $this->writeWrapperValue("heading_accuracy", $var); - return $this;} - - /** - * Altitude in meters above WGS84. - * - * Generated from protobuf field .google.protobuf.DoubleValue altitude = 5; - * @return \Google\Protobuf\DoubleValue|null - */ - public function getAltitude() - { - return $this->altitude; - } - - public function hasAltitude() - { - return isset($this->altitude); - } - - public function clearAltitude() - { - unset($this->altitude); - } - - /** - * Returns the unboxed value from getAltitude() - - * Altitude in meters above WGS84. - * - * Generated from protobuf field .google.protobuf.DoubleValue altitude = 5; - * @return float|null - */ - public function getAltitudeUnwrapped() - { - return $this->readWrapperValue("altitude"); - } - - /** - * Altitude in meters above WGS84. - * - * Generated from protobuf field .google.protobuf.DoubleValue altitude = 5; - * @param \Google\Protobuf\DoubleValue $var - * @return $this - */ - public function setAltitude($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\DoubleValue::class); - $this->altitude = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\DoubleValue object. - - * Altitude in meters above WGS84. - * - * Generated from protobuf field .google.protobuf.DoubleValue altitude = 5; - * @param float|null $var - * @return $this - */ - public function setAltitudeUnwrapped($var) - { - $this->writeWrapperValue("altitude", $var); - return $this;} - - /** - * Deprecated: Use `altitude_accuracy` instead. - * - * Generated from protobuf field .google.protobuf.DoubleValue vertical_accuracy = 9 [deprecated = true]; - * @return \Google\Protobuf\DoubleValue|null - * @deprecated - */ - public function getVerticalAccuracy() - { - @trigger_error('vertical_accuracy is deprecated.', E_USER_DEPRECATED); - return $this->vertical_accuracy; - } - - public function hasVerticalAccuracy() - { - @trigger_error('vertical_accuracy is deprecated.', E_USER_DEPRECATED); - return isset($this->vertical_accuracy); - } - - public function clearVerticalAccuracy() - { - @trigger_error('vertical_accuracy is deprecated.', E_USER_DEPRECATED); - unset($this->vertical_accuracy); - } - - /** - * Returns the unboxed value from getVerticalAccuracy() - - * Deprecated: Use `altitude_accuracy` instead. - * - * Generated from protobuf field .google.protobuf.DoubleValue vertical_accuracy = 9 [deprecated = true]; - * @return float|null - */ - public function getVerticalAccuracyUnwrapped() - { - @trigger_error('vertical_accuracy is deprecated.', E_USER_DEPRECATED); - return $this->readWrapperValue("vertical_accuracy"); - } - - /** - * Deprecated: Use `altitude_accuracy` instead. - * - * Generated from protobuf field .google.protobuf.DoubleValue vertical_accuracy = 9 [deprecated = true]; - * @param \Google\Protobuf\DoubleValue $var - * @return $this - * @deprecated - */ - public function setVerticalAccuracy($var) - { - @trigger_error('vertical_accuracy is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkMessage($var, \Google\Protobuf\DoubleValue::class); - $this->vertical_accuracy = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\DoubleValue object. - - * Deprecated: Use `altitude_accuracy` instead. - * - * Generated from protobuf field .google.protobuf.DoubleValue vertical_accuracy = 9 [deprecated = true]; - * @param float|null $var - * @return $this - */ - public function setVerticalAccuracyUnwrapped($var) - { - $this->writeWrapperValue("vertical_accuracy", $var); - return $this;} - - /** - * Accuracy of `altitude` in meters. - * - * Generated from protobuf field .google.protobuf.DoubleValue altitude_accuracy = 24; - * @return \Google\Protobuf\DoubleValue|null - */ - public function getAltitudeAccuracy() - { - return $this->altitude_accuracy; - } - - public function hasAltitudeAccuracy() - { - return isset($this->altitude_accuracy); - } - - public function clearAltitudeAccuracy() - { - unset($this->altitude_accuracy); - } - - /** - * Returns the unboxed value from getAltitudeAccuracy() - - * Accuracy of `altitude` in meters. - * - * Generated from protobuf field .google.protobuf.DoubleValue altitude_accuracy = 24; - * @return float|null - */ - public function getAltitudeAccuracyUnwrapped() - { - return $this->readWrapperValue("altitude_accuracy"); - } - - /** - * Accuracy of `altitude` in meters. - * - * Generated from protobuf field .google.protobuf.DoubleValue altitude_accuracy = 24; - * @param \Google\Protobuf\DoubleValue $var - * @return $this - */ - public function setAltitudeAccuracy($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\DoubleValue::class); - $this->altitude_accuracy = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\DoubleValue object. - - * Accuracy of `altitude` in meters. - * - * Generated from protobuf field .google.protobuf.DoubleValue altitude_accuracy = 24; - * @param float|null $var - * @return $this - */ - public function setAltitudeAccuracyUnwrapped($var) - { - $this->writeWrapperValue("altitude_accuracy", $var); - return $this;} - - /** - * Speed of the vehicle in kilometers per hour. - * Deprecated: Use `speed` instead. - * - * Generated from protobuf field .google.protobuf.Int32Value speed_kmph = 3 [deprecated = true]; - * @return \Google\Protobuf\Int32Value|null - * @deprecated - */ - public function getSpeedKmph() - { - @trigger_error('speed_kmph is deprecated.', E_USER_DEPRECATED); - return $this->speed_kmph; - } - - public function hasSpeedKmph() - { - @trigger_error('speed_kmph is deprecated.', E_USER_DEPRECATED); - return isset($this->speed_kmph); - } - - public function clearSpeedKmph() - { - @trigger_error('speed_kmph is deprecated.', E_USER_DEPRECATED); - unset($this->speed_kmph); - } - - /** - * Returns the unboxed value from getSpeedKmph() - - * Speed of the vehicle in kilometers per hour. - * Deprecated: Use `speed` instead. - * - * Generated from protobuf field .google.protobuf.Int32Value speed_kmph = 3 [deprecated = true]; - * @return int|null - */ - public function getSpeedKmphUnwrapped() - { - @trigger_error('speed_kmph is deprecated.', E_USER_DEPRECATED); - return $this->readWrapperValue("speed_kmph"); - } - - /** - * Speed of the vehicle in kilometers per hour. - * Deprecated: Use `speed` instead. - * - * Generated from protobuf field .google.protobuf.Int32Value speed_kmph = 3 [deprecated = true]; - * @param \Google\Protobuf\Int32Value $var - * @return $this - * @deprecated - */ - public function setSpeedKmph($var) - { - @trigger_error('speed_kmph is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class); - $this->speed_kmph = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object. - - * Speed of the vehicle in kilometers per hour. - * Deprecated: Use `speed` instead. - * - * Generated from protobuf field .google.protobuf.Int32Value speed_kmph = 3 [deprecated = true]; - * @param int|null $var - * @return $this - */ - public function setSpeedKmphUnwrapped($var) - { - $this->writeWrapperValue("speed_kmph", $var); - return $this;} - - /** - * Speed of the vehicle in meters/second - * - * Generated from protobuf field .google.protobuf.DoubleValue speed = 6; - * @return \Google\Protobuf\DoubleValue|null - */ - public function getSpeed() - { - return $this->speed; - } - - public function hasSpeed() - { - return isset($this->speed); - } - - public function clearSpeed() - { - unset($this->speed); - } - - /** - * Returns the unboxed value from getSpeed() - - * Speed of the vehicle in meters/second - * - * Generated from protobuf field .google.protobuf.DoubleValue speed = 6; - * @return float|null - */ - public function getSpeedUnwrapped() - { - return $this->readWrapperValue("speed"); - } - - /** - * Speed of the vehicle in meters/second - * - * Generated from protobuf field .google.protobuf.DoubleValue speed = 6; - * @param \Google\Protobuf\DoubleValue $var - * @return $this - */ - public function setSpeed($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\DoubleValue::class); - $this->speed = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\DoubleValue object. - - * Speed of the vehicle in meters/second - * - * Generated from protobuf field .google.protobuf.DoubleValue speed = 6; - * @param float|null $var - * @return $this - */ - public function setSpeedUnwrapped($var) - { - $this->writeWrapperValue("speed", $var); - return $this;} - - /** - * Accuracy of `speed` in meters/second. - * - * Generated from protobuf field .google.protobuf.DoubleValue speed_accuracy = 7; - * @return \Google\Protobuf\DoubleValue|null - */ - public function getSpeedAccuracy() - { - return $this->speed_accuracy; - } - - public function hasSpeedAccuracy() - { - return isset($this->speed_accuracy); - } - - public function clearSpeedAccuracy() - { - unset($this->speed_accuracy); - } - - /** - * Returns the unboxed value from getSpeedAccuracy() - - * Accuracy of `speed` in meters/second. - * - * Generated from protobuf field .google.protobuf.DoubleValue speed_accuracy = 7; - * @return float|null - */ - public function getSpeedAccuracyUnwrapped() - { - return $this->readWrapperValue("speed_accuracy"); - } - - /** - * Accuracy of `speed` in meters/second. - * - * Generated from protobuf field .google.protobuf.DoubleValue speed_accuracy = 7; - * @param \Google\Protobuf\DoubleValue $var - * @return $this - */ - public function setSpeedAccuracy($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\DoubleValue::class); - $this->speed_accuracy = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\DoubleValue object. - - * Accuracy of `speed` in meters/second. - * - * Generated from protobuf field .google.protobuf.DoubleValue speed_accuracy = 7; - * @param float|null $var - * @return $this - */ - public function setSpeedAccuracyUnwrapped($var) - { - $this->writeWrapperValue("speed_accuracy", $var); - return $this;} - - /** - * The time when `location` was reported by the sensor according to the - * sensor's clock. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * The time when `location` was reported by the sensor according to the - * sensor's clock. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Output only. The time when the server received the location information. - * - * Generated from protobuf field .google.protobuf.Timestamp server_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getServerTime() - { - return $this->server_time; - } - - public function hasServerTime() - { - return isset($this->server_time); - } - - public function clearServerTime() - { - unset($this->server_time); - } - - /** - * Output only. The time when the server received the location information. - * - * Generated from protobuf field .google.protobuf.Timestamp server_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setServerTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->server_time = $var; - - return $this; - } - - /** - * Provider of location data (for example, `GPS`). - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor location_sensor = 11; - * @return int - */ - public function getLocationSensor() - { - return $this->location_sensor; - } - - /** - * Provider of location data (for example, `GPS`). - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor location_sensor = 11; - * @param int $var - * @return $this - */ - public function setLocationSensor($var) - { - GPBUtil::checkEnum($var, \Google\Maps\FleetEngine\Delivery\V1\DeliveryVehicleLocationSensor::class); - $this->location_sensor = $var; - - return $this; - } - - /** - * Whether `location` is snapped to a road. - * - * Generated from protobuf field .google.protobuf.BoolValue is_road_snapped = 27; - * @return \Google\Protobuf\BoolValue|null - */ - public function getIsRoadSnapped() - { - return $this->is_road_snapped; - } - - public function hasIsRoadSnapped() - { - return isset($this->is_road_snapped); - } - - public function clearIsRoadSnapped() - { - unset($this->is_road_snapped); - } - - /** - * Returns the unboxed value from getIsRoadSnapped() - - * Whether `location` is snapped to a road. - * - * Generated from protobuf field .google.protobuf.BoolValue is_road_snapped = 27; - * @return bool|null - */ - public function getIsRoadSnappedUnwrapped() - { - return $this->readWrapperValue("is_road_snapped"); - } - - /** - * Whether `location` is snapped to a road. - * - * Generated from protobuf field .google.protobuf.BoolValue is_road_snapped = 27; - * @param \Google\Protobuf\BoolValue $var - * @return $this - */ - public function setIsRoadSnapped($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); - $this->is_road_snapped = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. - - * Whether `location` is snapped to a road. - * - * Generated from protobuf field .google.protobuf.BoolValue is_road_snapped = 27; - * @param bool|null $var - * @return $this - */ - public function setIsRoadSnappedUnwrapped($var) - { - $this->writeWrapperValue("is_road_snapped", $var); - return $this;} - - /** - * Input only. Indicates whether the GPS sensor is enabled on the mobile - * device. - * - * Generated from protobuf field .google.protobuf.BoolValue is_gps_sensor_enabled = 12 [(.google.api.field_behavior) = INPUT_ONLY]; - * @return \Google\Protobuf\BoolValue|null - */ - public function getIsGpsSensorEnabled() - { - return $this->is_gps_sensor_enabled; - } - - public function hasIsGpsSensorEnabled() - { - return isset($this->is_gps_sensor_enabled); - } - - public function clearIsGpsSensorEnabled() - { - unset($this->is_gps_sensor_enabled); - } - - /** - * Returns the unboxed value from getIsGpsSensorEnabled() - - * Input only. Indicates whether the GPS sensor is enabled on the mobile - * device. - * - * Generated from protobuf field .google.protobuf.BoolValue is_gps_sensor_enabled = 12 [(.google.api.field_behavior) = INPUT_ONLY]; - * @return bool|null - */ - public function getIsGpsSensorEnabledUnwrapped() - { - return $this->readWrapperValue("is_gps_sensor_enabled"); - } - - /** - * Input only. Indicates whether the GPS sensor is enabled on the mobile - * device. - * - * Generated from protobuf field .google.protobuf.BoolValue is_gps_sensor_enabled = 12 [(.google.api.field_behavior) = INPUT_ONLY]; - * @param \Google\Protobuf\BoolValue $var - * @return $this - */ - public function setIsGpsSensorEnabled($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); - $this->is_gps_sensor_enabled = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. - - * Input only. Indicates whether the GPS sensor is enabled on the mobile - * device. - * - * Generated from protobuf field .google.protobuf.BoolValue is_gps_sensor_enabled = 12 [(.google.api.field_behavior) = INPUT_ONLY]; - * @param bool|null $var - * @return $this - */ - public function setIsGpsSensorEnabledUnwrapped($var) - { - $this->writeWrapperValue("is_gps_sensor_enabled", $var); - return $this;} - - /** - * Input only. Time (in seconds) since this location was first sent to the - * server. This will be zero for the first update. If the time is unknown (for - * example, when the app restarts), this value resets to zero. - * - * Generated from protobuf field .google.protobuf.Int32Value time_since_update = 14 [(.google.api.field_behavior) = INPUT_ONLY]; - * @return \Google\Protobuf\Int32Value|null - */ - public function getTimeSinceUpdate() - { - return $this->time_since_update; - } - - public function hasTimeSinceUpdate() - { - return isset($this->time_since_update); - } - - public function clearTimeSinceUpdate() - { - unset($this->time_since_update); - } - - /** - * Returns the unboxed value from getTimeSinceUpdate() - - * Input only. Time (in seconds) since this location was first sent to the - * server. This will be zero for the first update. If the time is unknown (for - * example, when the app restarts), this value resets to zero. - * - * Generated from protobuf field .google.protobuf.Int32Value time_since_update = 14 [(.google.api.field_behavior) = INPUT_ONLY]; - * @return int|null - */ - public function getTimeSinceUpdateUnwrapped() - { - return $this->readWrapperValue("time_since_update"); - } - - /** - * Input only. Time (in seconds) since this location was first sent to the - * server. This will be zero for the first update. If the time is unknown (for - * example, when the app restarts), this value resets to zero. - * - * Generated from protobuf field .google.protobuf.Int32Value time_since_update = 14 [(.google.api.field_behavior) = INPUT_ONLY]; - * @param \Google\Protobuf\Int32Value $var - * @return $this - */ - public function setTimeSinceUpdate($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class); - $this->time_since_update = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object. - - * Input only. Time (in seconds) since this location was first sent to the - * server. This will be zero for the first update. If the time is unknown (for - * example, when the app restarts), this value resets to zero. - * - * Generated from protobuf field .google.protobuf.Int32Value time_since_update = 14 [(.google.api.field_behavior) = INPUT_ONLY]; - * @param int|null $var - * @return $this - */ - public function setTimeSinceUpdateUnwrapped($var) - { - $this->writeWrapperValue("time_since_update", $var); - return $this;} - - /** - * Input only. Deprecated: Other signals are now used to determine if a - * location is stale. - * - * Generated from protobuf field .google.protobuf.Int32Value num_stale_updates = 15 [deprecated = true, (.google.api.field_behavior) = INPUT_ONLY]; - * @return \Google\Protobuf\Int32Value|null - * @deprecated - */ - public function getNumStaleUpdates() - { - @trigger_error('num_stale_updates is deprecated.', E_USER_DEPRECATED); - return $this->num_stale_updates; - } - - public function hasNumStaleUpdates() - { - @trigger_error('num_stale_updates is deprecated.', E_USER_DEPRECATED); - return isset($this->num_stale_updates); - } - - public function clearNumStaleUpdates() - { - @trigger_error('num_stale_updates is deprecated.', E_USER_DEPRECATED); - unset($this->num_stale_updates); - } - - /** - * Returns the unboxed value from getNumStaleUpdates() - - * Input only. Deprecated: Other signals are now used to determine if a - * location is stale. - * - * Generated from protobuf field .google.protobuf.Int32Value num_stale_updates = 15 [deprecated = true, (.google.api.field_behavior) = INPUT_ONLY]; - * @return int|null - */ - public function getNumStaleUpdatesUnwrapped() - { - @trigger_error('num_stale_updates is deprecated.', E_USER_DEPRECATED); - return $this->readWrapperValue("num_stale_updates"); - } - - /** - * Input only. Deprecated: Other signals are now used to determine if a - * location is stale. - * - * Generated from protobuf field .google.protobuf.Int32Value num_stale_updates = 15 [deprecated = true, (.google.api.field_behavior) = INPUT_ONLY]; - * @param \Google\Protobuf\Int32Value $var - * @return $this - * @deprecated - */ - public function setNumStaleUpdates($var) - { - @trigger_error('num_stale_updates is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class); - $this->num_stale_updates = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object. - - * Input only. Deprecated: Other signals are now used to determine if a - * location is stale. - * - * Generated from protobuf field .google.protobuf.Int32Value num_stale_updates = 15 [deprecated = true, (.google.api.field_behavior) = INPUT_ONLY]; - * @param int|null $var - * @return $this - */ - public function setNumStaleUpdatesUnwrapped($var) - { - $this->writeWrapperValue("num_stale_updates", $var); - return $this;} - - /** - * Raw vehicle location (unprocessed by road-snapper). - * - * Generated from protobuf field .google.type.LatLng raw_location = 16; - * @return \Google\Type\LatLng|null - */ - public function getRawLocation() - { - return $this->raw_location; - } - - public function hasRawLocation() - { - return isset($this->raw_location); - } - - public function clearRawLocation() - { - unset($this->raw_location); - } - - /** - * Raw vehicle location (unprocessed by road-snapper). - * - * Generated from protobuf field .google.type.LatLng raw_location = 16; - * @param \Google\Type\LatLng $var - * @return $this - */ - public function setRawLocation($var) - { - GPBUtil::checkMessage($var, \Google\Type\LatLng::class); - $this->raw_location = $var; - - return $this; - } - - /** - * Timestamp associated with the raw location. - * - * Generated from protobuf field .google.protobuf.Timestamp raw_location_time = 17; - * @return \Google\Protobuf\Timestamp|null - */ - public function getRawLocationTime() - { - return $this->raw_location_time; - } - - public function hasRawLocationTime() - { - return isset($this->raw_location_time); - } - - public function clearRawLocationTime() - { - unset($this->raw_location_time); - } - - /** - * Timestamp associated with the raw location. - * - * Generated from protobuf field .google.protobuf.Timestamp raw_location_time = 17; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setRawLocationTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->raw_location_time = $var; - - return $this; - } - - /** - * Source of the raw location. Defaults to `GPS`. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor raw_location_sensor = 28; - * @return int - */ - public function getRawLocationSensor() - { - return $this->raw_location_sensor; - } - - /** - * Source of the raw location. Defaults to `GPS`. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor raw_location_sensor = 28; - * @param int $var - * @return $this - */ - public function setRawLocationSensor($var) - { - GPBUtil::checkEnum($var, \Google\Maps\FleetEngine\Delivery\V1\DeliveryVehicleLocationSensor::class); - $this->raw_location_sensor = $var; - - return $this; - } - - /** - * Accuracy of `raw_location` as a radius, in meters. - * - * Generated from protobuf field .google.protobuf.DoubleValue raw_location_accuracy = 25; - * @return \Google\Protobuf\DoubleValue|null - */ - public function getRawLocationAccuracy() - { - return $this->raw_location_accuracy; - } - - public function hasRawLocationAccuracy() - { - return isset($this->raw_location_accuracy); - } - - public function clearRawLocationAccuracy() - { - unset($this->raw_location_accuracy); - } - - /** - * Returns the unboxed value from getRawLocationAccuracy() - - * Accuracy of `raw_location` as a radius, in meters. - * - * Generated from protobuf field .google.protobuf.DoubleValue raw_location_accuracy = 25; - * @return float|null - */ - public function getRawLocationAccuracyUnwrapped() - { - return $this->readWrapperValue("raw_location_accuracy"); - } - - /** - * Accuracy of `raw_location` as a radius, in meters. - * - * Generated from protobuf field .google.protobuf.DoubleValue raw_location_accuracy = 25; - * @param \Google\Protobuf\DoubleValue $var - * @return $this - */ - public function setRawLocationAccuracy($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\DoubleValue::class); - $this->raw_location_accuracy = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\DoubleValue object. - - * Accuracy of `raw_location` as a radius, in meters. - * - * Generated from protobuf field .google.protobuf.DoubleValue raw_location_accuracy = 25; - * @param float|null $var - * @return $this - */ - public function setRawLocationAccuracyUnwrapped($var) - { - $this->writeWrapperValue("raw_location_accuracy", $var); - return $this;} - - /** - * Supplemental location provided by the integrating app. - * - * Generated from protobuf field .google.type.LatLng supplemental_location = 18; - * @return \Google\Type\LatLng|null - */ - public function getSupplementalLocation() - { - return $this->supplemental_location; - } - - public function hasSupplementalLocation() - { - return isset($this->supplemental_location); - } - - public function clearSupplementalLocation() - { - unset($this->supplemental_location); - } - - /** - * Supplemental location provided by the integrating app. - * - * Generated from protobuf field .google.type.LatLng supplemental_location = 18; - * @param \Google\Type\LatLng $var - * @return $this - */ - public function setSupplementalLocation($var) - { - GPBUtil::checkMessage($var, \Google\Type\LatLng::class); - $this->supplemental_location = $var; - - return $this; - } - - /** - * Timestamp associated with the supplemental location. - * - * Generated from protobuf field .google.protobuf.Timestamp supplemental_location_time = 19; - * @return \Google\Protobuf\Timestamp|null - */ - public function getSupplementalLocationTime() - { - return $this->supplemental_location_time; - } - - public function hasSupplementalLocationTime() - { - return isset($this->supplemental_location_time); - } - - public function clearSupplementalLocationTime() - { - unset($this->supplemental_location_time); - } - - /** - * Timestamp associated with the supplemental location. - * - * Generated from protobuf field .google.protobuf.Timestamp supplemental_location_time = 19; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setSupplementalLocationTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->supplemental_location_time = $var; - - return $this; - } - - /** - * Source of the supplemental location. Defaults to - * `CUSTOMER_SUPPLIED_LOCATION`. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor supplemental_location_sensor = 20; - * @return int - */ - public function getSupplementalLocationSensor() - { - return $this->supplemental_location_sensor; - } - - /** - * Source of the supplemental location. Defaults to - * `CUSTOMER_SUPPLIED_LOCATION`. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor supplemental_location_sensor = 20; - * @param int $var - * @return $this - */ - public function setSupplementalLocationSensor($var) - { - GPBUtil::checkEnum($var, \Google\Maps\FleetEngine\Delivery\V1\DeliveryVehicleLocationSensor::class); - $this->supplemental_location_sensor = $var; - - return $this; - } - - /** - * Accuracy of `supplemental_location` as a radius, in meters. - * - * Generated from protobuf field .google.protobuf.DoubleValue supplemental_location_accuracy = 21; - * @return \Google\Protobuf\DoubleValue|null - */ - public function getSupplementalLocationAccuracy() - { - return $this->supplemental_location_accuracy; - } - - public function hasSupplementalLocationAccuracy() - { - return isset($this->supplemental_location_accuracy); - } - - public function clearSupplementalLocationAccuracy() - { - unset($this->supplemental_location_accuracy); - } - - /** - * Returns the unboxed value from getSupplementalLocationAccuracy() - - * Accuracy of `supplemental_location` as a radius, in meters. - * - * Generated from protobuf field .google.protobuf.DoubleValue supplemental_location_accuracy = 21; - * @return float|null - */ - public function getSupplementalLocationAccuracyUnwrapped() - { - return $this->readWrapperValue("supplemental_location_accuracy"); - } - - /** - * Accuracy of `supplemental_location` as a radius, in meters. - * - * Generated from protobuf field .google.protobuf.DoubleValue supplemental_location_accuracy = 21; - * @param \Google\Protobuf\DoubleValue $var - * @return $this - */ - public function setSupplementalLocationAccuracy($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\DoubleValue::class); - $this->supplemental_location_accuracy = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\DoubleValue object. - - * Accuracy of `supplemental_location` as a radius, in meters. - * - * Generated from protobuf field .google.protobuf.DoubleValue supplemental_location_accuracy = 21; - * @param float|null $var - * @return $this - */ - public function setSupplementalLocationAccuracyUnwrapped($var) - { - $this->writeWrapperValue("supplemental_location_accuracy", $var); - return $this;} - - /** - * Deprecated: Use `is_road_snapped` instead. - * - * Generated from protobuf field bool road_snapped = 26 [deprecated = true]; - * @return bool - * @deprecated - */ - public function getRoadSnapped() - { - @trigger_error('road_snapped is deprecated.', E_USER_DEPRECATED); - return $this->road_snapped; - } - - /** - * Deprecated: Use `is_road_snapped` instead. - * - * Generated from protobuf field bool road_snapped = 26 [deprecated = true]; - * @param bool $var - * @return $this - * @deprecated - */ - public function setRoadSnapped($var) - { - @trigger_error('road_snapped is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkBool($var); - $this->road_snapped = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/DeliveryVehicleLocationSensor.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/DeliveryVehicleLocationSensor.php deleted file mode 100644 index eb723fbe4a61..000000000000 --- a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/DeliveryVehicleLocationSensor.php +++ /dev/null @@ -1,110 +0,0 @@ -maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor - */ -class DeliveryVehicleLocationSensor -{ - /** - * The sensor is unspecified or unknown. - * - * Generated from protobuf enum UNKNOWN_SENSOR = 0; - */ - const UNKNOWN_SENSOR = 0; - /** - * GPS or Assisted GPS. - * - * Generated from protobuf enum GPS = 1; - */ - const GPS = 1; - /** - * Assisted GPS, cell tower ID, or WiFi access point. - * - * Generated from protobuf enum NETWORK = 2; - */ - const NETWORK = 2; - /** - * Cell tower ID or WiFi access point. - * - * Generated from protobuf enum PASSIVE = 3; - */ - const PASSIVE = 3; - /** - * A location determined by the mobile device to be the most likely - * road position. - * - * Generated from protobuf enum ROAD_SNAPPED_LOCATION_PROVIDER = 4; - */ - const ROAD_SNAPPED_LOCATION_PROVIDER = 4; - /** - * A customer-supplied location from an independent source. Typically, this - * value is used for a location provided from sources other than the mobile - * device running Driver SDK. If the original source is described by one of - * the other enum values, use that value. Locations marked - * CUSTOMER_SUPPLIED_LOCATION are typically provided via a DeliveryVehicle's - * `last_location.supplemental_location_sensor`. - * - * Generated from protobuf enum CUSTOMER_SUPPLIED_LOCATION = 5; - */ - const CUSTOMER_SUPPLIED_LOCATION = 5; - /** - * A location calculated by Fleet Engine based on the signals available to it. - * Output only. This value will be rejected if it is received in a request. - * - * Generated from protobuf enum FLEET_ENGINE_LOCATION = 6; - */ - const FLEET_ENGINE_LOCATION = 6; - /** - * Android's Fused Location Provider. - * - * Generated from protobuf enum FUSED_LOCATION_PROVIDER = 100; - */ - const FUSED_LOCATION_PROVIDER = 100; - /** - * The location provider on Apple operating systems. - * - * Generated from protobuf enum CORE_LOCATION = 200; - */ - const CORE_LOCATION = 200; - - private static $valueToName = [ - self::UNKNOWN_SENSOR => 'UNKNOWN_SENSOR', - self::GPS => 'GPS', - self::NETWORK => 'NETWORK', - self::PASSIVE => 'PASSIVE', - self::ROAD_SNAPPED_LOCATION_PROVIDER => 'ROAD_SNAPPED_LOCATION_PROVIDER', - self::CUSTOMER_SUPPLIED_LOCATION => 'CUSTOMER_SUPPLIED_LOCATION', - self::FLEET_ENGINE_LOCATION => 'FLEET_ENGINE_LOCATION', - self::FUSED_LOCATION_PROVIDER => 'FUSED_LOCATION_PROVIDER', - self::CORE_LOCATION => 'CORE_LOCATION', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/DeliveryVehicleNavigationStatus.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/DeliveryVehicleNavigationStatus.php deleted file mode 100644 index 2e8bcd7c4266..000000000000 --- a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/DeliveryVehicleNavigationStatus.php +++ /dev/null @@ -1,76 +0,0 @@ -maps.fleetengine.delivery.v1.DeliveryVehicleNavigationStatus - */ -class DeliveryVehicleNavigationStatus -{ - /** - * Unspecified navigation status. - * - * Generated from protobuf enum UNKNOWN_NAVIGATION_STATUS = 0; - */ - const UNKNOWN_NAVIGATION_STATUS = 0; - /** - * The Driver app's navigation is in `FREE_NAV` mode. - * - * Generated from protobuf enum NO_GUIDANCE = 1; - */ - const NO_GUIDANCE = 1; - /** - * Turn-by-turn navigation is available and the Driver app navigation has - * entered `GUIDED_NAV` mode. - * - * Generated from protobuf enum ENROUTE_TO_DESTINATION = 2; - */ - const ENROUTE_TO_DESTINATION = 2; - /** - * The vehicle has gone off the suggested route. - * - * Generated from protobuf enum OFF_ROUTE = 3; - */ - const OFF_ROUTE = 3; - /** - * The vehicle is within approximately 50m of the destination. - * - * Generated from protobuf enum ARRIVED_AT_DESTINATION = 4; - */ - const ARRIVED_AT_DESTINATION = 4; - - private static $valueToName = [ - self::UNKNOWN_NAVIGATION_STATUS => 'UNKNOWN_NAVIGATION_STATUS', - self::NO_GUIDANCE => 'NO_GUIDANCE', - self::ENROUTE_TO_DESTINATION => 'ENROUTE_TO_DESTINATION', - self::OFF_ROUTE => 'OFF_ROUTE', - self::ARRIVED_AT_DESTINATION => 'ARRIVED_AT_DESTINATION', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/GetDeliveryVehicleRequest.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/GetDeliveryVehicleRequest.php deleted file mode 100644 index 20719e8f261d..000000000000 --- a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/GetDeliveryVehicleRequest.php +++ /dev/null @@ -1,140 +0,0 @@ -maps.fleetengine.delivery.v1.GetDeliveryVehicleRequest - */ -class GetDeliveryVehicleRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The standard Delivery API request header. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $header = null; - /** - * Required. Must be in the format - * `providers/{provider}/deliveryVehicles/{delivery_vehicle}`. - * The `provider` must be the Google Cloud Project ID. For example, - * `sample-cloud-project`. - * - * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Must be in the format - * `providers/{provider}/deliveryVehicles/{delivery_vehicle}`. - * The `provider` must be the Google Cloud Project ID. For example, - * `sample-cloud-project`. Please see - * {@see DeliveryServiceClient::deliveryVehicleName()} for help formatting this field. - * - * @return \Google\Maps\FleetEngine\Delivery\V1\GetDeliveryVehicleRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Maps\FleetEngine\Delivery\V1\DeliveryRequestHeader $header - * Optional. The standard Delivery API request header. - * @type string $name - * Required. Must be in the format - * `providers/{provider}/deliveryVehicles/{delivery_vehicle}`. - * The `provider` must be the Google Cloud Project ID. For example, - * `sample-cloud-project`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Fleetengine\Delivery\V1\DeliveryApi::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The standard Delivery API request header. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Maps\FleetEngine\Delivery\V1\DeliveryRequestHeader|null - */ - public function getHeader() - { - return $this->header; - } - - public function hasHeader() - { - return isset($this->header); - } - - public function clearHeader() - { - unset($this->header); - } - - /** - * Optional. The standard Delivery API request header. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Maps\FleetEngine\Delivery\V1\DeliveryRequestHeader $var - * @return $this - */ - public function setHeader($var) - { - GPBUtil::checkMessage($var, \Google\Maps\FleetEngine\Delivery\V1\DeliveryRequestHeader::class); - $this->header = $var; - - return $this; - } - - /** - * Required. Must be in the format - * `providers/{provider}/deliveryVehicles/{delivery_vehicle}`. - * The `provider` must be the Google Cloud Project ID. For example, - * `sample-cloud-project`. - * - * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Must be in the format - * `providers/{provider}/deliveryVehicles/{delivery_vehicle}`. - * The `provider` must be the Google Cloud Project ID. For example, - * `sample-cloud-project`. - * - * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/GetTaskRequest.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/GetTaskRequest.php deleted file mode 100644 index 019e1e9dc29d..000000000000 --- a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/GetTaskRequest.php +++ /dev/null @@ -1,135 +0,0 @@ -maps.fleetengine.delivery.v1.GetTaskRequest - */ -class GetTaskRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The standard Delivery API request header. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $header = null; - /** - * Required. Must be in the format `providers/{provider}/tasks/{task}`. The - * `provider` must be the Google Cloud Project ID. For example, - * `sample-cloud-project`. - * - * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Must be in the format `providers/{provider}/tasks/{task}`. The - * `provider` must be the Google Cloud Project ID. For example, - * `sample-cloud-project`. Please see - * {@see DeliveryServiceClient::taskName()} for help formatting this field. - * - * @return \Google\Maps\FleetEngine\Delivery\V1\GetTaskRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Maps\FleetEngine\Delivery\V1\DeliveryRequestHeader $header - * Optional. The standard Delivery API request header. - * @type string $name - * Required. Must be in the format `providers/{provider}/tasks/{task}`. The - * `provider` must be the Google Cloud Project ID. For example, - * `sample-cloud-project`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Fleetengine\Delivery\V1\DeliveryApi::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The standard Delivery API request header. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Maps\FleetEngine\Delivery\V1\DeliveryRequestHeader|null - */ - public function getHeader() - { - return $this->header; - } - - public function hasHeader() - { - return isset($this->header); - } - - public function clearHeader() - { - unset($this->header); - } - - /** - * Optional. The standard Delivery API request header. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Maps\FleetEngine\Delivery\V1\DeliveryRequestHeader $var - * @return $this - */ - public function setHeader($var) - { - GPBUtil::checkMessage($var, \Google\Maps\FleetEngine\Delivery\V1\DeliveryRequestHeader::class); - $this->header = $var; - - return $this; - } - - /** - * Required. Must be in the format `providers/{provider}/tasks/{task}`. The - * `provider` must be the Google Cloud Project ID. For example, - * `sample-cloud-project`. - * - * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Must be in the format `providers/{provider}/tasks/{task}`. The - * `provider` must be the Google Cloud Project ID. For example, - * `sample-cloud-project`. - * - * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/GetTaskTrackingInfoRequest.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/GetTaskTrackingInfoRequest.php deleted file mode 100644 index 022c8c8f04b0..000000000000 --- a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/GetTaskTrackingInfoRequest.php +++ /dev/null @@ -1,145 +0,0 @@ -maps.fleetengine.delivery.v1.GetTaskTrackingInfoRequest - */ -class GetTaskTrackingInfoRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The standard Delivery API request header. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $header = null; - /** - * Required. Must be in the format - * `providers/{provider}/taskTrackingInfo/{tracking_id}`. The `provider` - * must be the Google Cloud Project ID, and the `tracking_id` must be the - * tracking ID associated with the task. An example name can be - * `providers/sample-cloud-project/taskTrackingInfo/sample-tracking-id`. - * - * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Must be in the format - * `providers/{provider}/taskTrackingInfo/{tracking_id}`. The `provider` - * must be the Google Cloud Project ID, and the `tracking_id` must be the - * tracking ID associated with the task. An example name can be - * `providers/sample-cloud-project/taskTrackingInfo/sample-tracking-id`. Please see - * {@see DeliveryServiceClient::taskTrackingInfoName()} for help formatting this field. - * - * @return \Google\Maps\FleetEngine\Delivery\V1\GetTaskTrackingInfoRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Maps\FleetEngine\Delivery\V1\DeliveryRequestHeader $header - * Optional. The standard Delivery API request header. - * @type string $name - * Required. Must be in the format - * `providers/{provider}/taskTrackingInfo/{tracking_id}`. The `provider` - * must be the Google Cloud Project ID, and the `tracking_id` must be the - * tracking ID associated with the task. An example name can be - * `providers/sample-cloud-project/taskTrackingInfo/sample-tracking-id`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Fleetengine\Delivery\V1\DeliveryApi::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The standard Delivery API request header. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Maps\FleetEngine\Delivery\V1\DeliveryRequestHeader|null - */ - public function getHeader() - { - return $this->header; - } - - public function hasHeader() - { - return isset($this->header); - } - - public function clearHeader() - { - unset($this->header); - } - - /** - * Optional. The standard Delivery API request header. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Maps\FleetEngine\Delivery\V1\DeliveryRequestHeader $var - * @return $this - */ - public function setHeader($var) - { - GPBUtil::checkMessage($var, \Google\Maps\FleetEngine\Delivery\V1\DeliveryRequestHeader::class); - $this->header = $var; - - return $this; - } - - /** - * Required. Must be in the format - * `providers/{provider}/taskTrackingInfo/{tracking_id}`. The `provider` - * must be the Google Cloud Project ID, and the `tracking_id` must be the - * tracking ID associated with the task. An example name can be - * `providers/sample-cloud-project/taskTrackingInfo/sample-tracking-id`. - * - * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Must be in the format - * `providers/{provider}/taskTrackingInfo/{tracking_id}`. The `provider` - * must be the Google Cloud Project ID, and the `tracking_id` must be the - * tracking ID associated with the task. An example name can be - * `providers/sample-cloud-project/taskTrackingInfo/sample-tracking-id`. - * - * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/ListDeliveryVehiclesRequest.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/ListDeliveryVehiclesRequest.php deleted file mode 100644 index 6bdedae146df..000000000000 --- a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/ListDeliveryVehiclesRequest.php +++ /dev/null @@ -1,365 +0,0 @@ -maps.fleetengine.delivery.v1.ListDeliveryVehiclesRequest - */ -class ListDeliveryVehiclesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The standard Delivery API request header. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $header = null; - /** - * Required. Must be in the format `providers/{provider}`. - * The `provider` must be the Google Cloud Project ID. - * For example, `sample-cloud-project`. - * - * Generated from protobuf field string parent = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The maximum number of vehicles to return. The service may return - * fewer than this number. If you don't specify this number, then the server - * determines the number of results to return. - * - * Generated from protobuf field int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. A page token, received from a previous `ListDeliveryVehicles` - * call. You must provide this in order to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListDeliveryVehicles` - * must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. A filter query to apply when listing delivery vehicles. See - * http://aip.dev/160 for examples of the filter syntax. If you don't specify - * a value, or if you specify an empty string for the filter, then all - * delivery vehicles are returned. - * Note that the only queries supported for `ListDeliveryVehicles` are - * on vehicle attributes (for example, `attributes. = ` or - * `attributes. = AND attributes. = `). Also, all - * attributes are stored as strings, so the only supported comparisons against - * attributes are string comparisons. In order to compare against number or - * boolean values, the values must be explicitly quoted to be treated as - * strings (for example, `attributes. = "10"` or - * `attributes. = "true"`). - * The maximum number of restrictions allowed in a filter query is 50. A - * restriction is a part of the query of the form - * `attribute. `, for example `attributes.foo = bar` - * is 1 restriction. - * - * Generated from protobuf field string filter = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. A filter that limits the vehicles returned to those whose last - * known location was in the rectangular area defined by the viewport. - * - * Generated from protobuf field .google.geo.type.Viewport viewport = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $viewport = null; - - /** - * @param string $parent Required. Must be in the format `providers/{provider}`. - * The `provider` must be the Google Cloud Project ID. - * For example, `sample-cloud-project`. Please see - * {@see DeliveryServiceClient::providerName()} for help formatting this field. - * - * @return \Google\Maps\FleetEngine\Delivery\V1\ListDeliveryVehiclesRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Maps\FleetEngine\Delivery\V1\DeliveryRequestHeader $header - * Optional. The standard Delivery API request header. - * @type string $parent - * Required. Must be in the format `providers/{provider}`. - * The `provider` must be the Google Cloud Project ID. - * For example, `sample-cloud-project`. - * @type int $page_size - * Optional. The maximum number of vehicles to return. The service may return - * fewer than this number. If you don't specify this number, then the server - * determines the number of results to return. - * @type string $page_token - * Optional. A page token, received from a previous `ListDeliveryVehicles` - * call. You must provide this in order to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListDeliveryVehicles` - * must match the call that provided the page token. - * @type string $filter - * Optional. A filter query to apply when listing delivery vehicles. See - * http://aip.dev/160 for examples of the filter syntax. If you don't specify - * a value, or if you specify an empty string for the filter, then all - * delivery vehicles are returned. - * Note that the only queries supported for `ListDeliveryVehicles` are - * on vehicle attributes (for example, `attributes. = ` or - * `attributes. = AND attributes. = `). Also, all - * attributes are stored as strings, so the only supported comparisons against - * attributes are string comparisons. In order to compare against number or - * boolean values, the values must be explicitly quoted to be treated as - * strings (for example, `attributes. = "10"` or - * `attributes. = "true"`). - * The maximum number of restrictions allowed in a filter query is 50. A - * restriction is a part of the query of the form - * `attribute. `, for example `attributes.foo = bar` - * is 1 restriction. - * @type \Google\Geo\Type\Viewport $viewport - * Optional. A filter that limits the vehicles returned to those whose last - * known location was in the rectangular area defined by the viewport. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Fleetengine\Delivery\V1\DeliveryApi::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The standard Delivery API request header. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Maps\FleetEngine\Delivery\V1\DeliveryRequestHeader|null - */ - public function getHeader() - { - return $this->header; - } - - public function hasHeader() - { - return isset($this->header); - } - - public function clearHeader() - { - unset($this->header); - } - - /** - * Optional. The standard Delivery API request header. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Maps\FleetEngine\Delivery\V1\DeliveryRequestHeader $var - * @return $this - */ - public function setHeader($var) - { - GPBUtil::checkMessage($var, \Google\Maps\FleetEngine\Delivery\V1\DeliveryRequestHeader::class); - $this->header = $var; - - return $this; - } - - /** - * Required. Must be in the format `providers/{provider}`. - * The `provider` must be the Google Cloud Project ID. - * For example, `sample-cloud-project`. - * - * Generated from protobuf field string parent = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Must be in the format `providers/{provider}`. - * The `provider` must be the Google Cloud Project ID. - * For example, `sample-cloud-project`. - * - * Generated from protobuf field string parent = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. The maximum number of vehicles to return. The service may return - * fewer than this number. If you don't specify this number, then the server - * determines the number of results to return. - * - * Generated from protobuf field int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of vehicles to return. The service may return - * fewer than this number. If you don't specify this number, then the server - * determines the number of results to return. - * - * Generated from protobuf field int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. A page token, received from a previous `ListDeliveryVehicles` - * call. You must provide this in order to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListDeliveryVehicles` - * must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. A page token, received from a previous `ListDeliveryVehicles` - * call. You must provide this in order to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListDeliveryVehicles` - * must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Optional. A filter query to apply when listing delivery vehicles. See - * http://aip.dev/160 for examples of the filter syntax. If you don't specify - * a value, or if you specify an empty string for the filter, then all - * delivery vehicles are returned. - * Note that the only queries supported for `ListDeliveryVehicles` are - * on vehicle attributes (for example, `attributes. = ` or - * `attributes. = AND attributes. = `). Also, all - * attributes are stored as strings, so the only supported comparisons against - * attributes are string comparisons. In order to compare against number or - * boolean values, the values must be explicitly quoted to be treated as - * strings (for example, `attributes. = "10"` or - * `attributes. = "true"`). - * The maximum number of restrictions allowed in a filter query is 50. A - * restriction is a part of the query of the form - * `attribute. `, for example `attributes.foo = bar` - * is 1 restriction. - * - * Generated from protobuf field string filter = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. A filter query to apply when listing delivery vehicles. See - * http://aip.dev/160 for examples of the filter syntax. If you don't specify - * a value, or if you specify an empty string for the filter, then all - * delivery vehicles are returned. - * Note that the only queries supported for `ListDeliveryVehicles` are - * on vehicle attributes (for example, `attributes. = ` or - * `attributes. = AND attributes. = `). Also, all - * attributes are stored as strings, so the only supported comparisons against - * attributes are string comparisons. In order to compare against number or - * boolean values, the values must be explicitly quoted to be treated as - * strings (for example, `attributes. = "10"` or - * `attributes. = "true"`). - * The maximum number of restrictions allowed in a filter query is 50. A - * restriction is a part of the query of the form - * `attribute. `, for example `attributes.foo = bar` - * is 1 restriction. - * - * Generated from protobuf field string filter = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Optional. A filter that limits the vehicles returned to those whose last - * known location was in the rectangular area defined by the viewport. - * - * Generated from protobuf field .google.geo.type.Viewport viewport = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Geo\Type\Viewport|null - */ - public function getViewport() - { - return $this->viewport; - } - - public function hasViewport() - { - return isset($this->viewport); - } - - public function clearViewport() - { - unset($this->viewport); - } - - /** - * Optional. A filter that limits the vehicles returned to those whose last - * known location was in the rectangular area defined by the viewport. - * - * Generated from protobuf field .google.geo.type.Viewport viewport = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Geo\Type\Viewport $var - * @return $this - */ - public function setViewport($var) - { - GPBUtil::checkMessage($var, \Google\Geo\Type\Viewport::class); - $this->viewport = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/ListDeliveryVehiclesResponse.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/ListDeliveryVehiclesResponse.php deleted file mode 100644 index 286675bd84db..000000000000 --- a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/ListDeliveryVehiclesResponse.php +++ /dev/null @@ -1,159 +0,0 @@ -maps.fleetengine.delivery.v1.ListDeliveryVehiclesResponse - */ -class ListDeliveryVehiclesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The set of delivery vehicles that meet the requested filtering criteria. - * When no filter is specified, the request returns all delivery vehicles. A - * successful response can also be empty. An empty response indicates that no - * delivery vehicles were found meeting the requested filter criteria. - * - * Generated from protobuf field repeated .maps.fleetengine.delivery.v1.DeliveryVehicle delivery_vehicles = 1; - */ - private $delivery_vehicles; - /** - * You can pass this token in the `ListDeliveryVehiclesRequest` to continue to - * list results. When all of the results are returned, this field won't be in - * the response, or it will be an empty string. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * The total number of delivery vehicles that match the request criteria, - * across all pages. - * - * Generated from protobuf field int64 total_size = 3; - */ - protected $total_size = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Maps\FleetEngine\Delivery\V1\DeliveryVehicle>|\Google\Protobuf\Internal\RepeatedField $delivery_vehicles - * The set of delivery vehicles that meet the requested filtering criteria. - * When no filter is specified, the request returns all delivery vehicles. A - * successful response can also be empty. An empty response indicates that no - * delivery vehicles were found meeting the requested filter criteria. - * @type string $next_page_token - * You can pass this token in the `ListDeliveryVehiclesRequest` to continue to - * list results. When all of the results are returned, this field won't be in - * the response, or it will be an empty string. - * @type int|string $total_size - * The total number of delivery vehicles that match the request criteria, - * across all pages. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Fleetengine\Delivery\V1\DeliveryApi::initOnce(); - parent::__construct($data); - } - - /** - * The set of delivery vehicles that meet the requested filtering criteria. - * When no filter is specified, the request returns all delivery vehicles. A - * successful response can also be empty. An empty response indicates that no - * delivery vehicles were found meeting the requested filter criteria. - * - * Generated from protobuf field repeated .maps.fleetengine.delivery.v1.DeliveryVehicle delivery_vehicles = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDeliveryVehicles() - { - return $this->delivery_vehicles; - } - - /** - * The set of delivery vehicles that meet the requested filtering criteria. - * When no filter is specified, the request returns all delivery vehicles. A - * successful response can also be empty. An empty response indicates that no - * delivery vehicles were found meeting the requested filter criteria. - * - * Generated from protobuf field repeated .maps.fleetengine.delivery.v1.DeliveryVehicle delivery_vehicles = 1; - * @param array<\Google\Maps\FleetEngine\Delivery\V1\DeliveryVehicle>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDeliveryVehicles($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\FleetEngine\Delivery\V1\DeliveryVehicle::class); - $this->delivery_vehicles = $arr; - - return $this; - } - - /** - * You can pass this token in the `ListDeliveryVehiclesRequest` to continue to - * list results. When all of the results are returned, this field won't be in - * the response, or it will be an empty string. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * You can pass this token in the `ListDeliveryVehiclesRequest` to continue to - * list results. When all of the results are returned, this field won't be in - * the response, or it will be an empty string. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * The total number of delivery vehicles that match the request criteria, - * across all pages. - * - * Generated from protobuf field int64 total_size = 3; - * @return int|string - */ - public function getTotalSize() - { - return $this->total_size; - } - - /** - * The total number of delivery vehicles that match the request criteria, - * across all pages. - * - * Generated from protobuf field int64 total_size = 3; - * @param int|string $var - * @return $this - */ - public function setTotalSize($var) - { - GPBUtil::checkInt64($var); - $this->total_size = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/ListTasksRequest.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/ListTasksRequest.php deleted file mode 100644 index e23c8d8e365d..000000000000 --- a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/ListTasksRequest.php +++ /dev/null @@ -1,273 +0,0 @@ -maps.fleetengine.delivery.v1.ListTasksRequest - */ -class ListTasksRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The standard Delivery API request header. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $header = null; - /** - * Required. Must be in the format `providers/{provider}`. - * The `provider` must be the Google Cloud Project ID. For example, - * `sample-cloud-project`. - * - * Generated from protobuf field string parent = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The maximum number of Tasks to return. The service may return - * fewer than this value. If you don't specify this value, then the server - * determines the number of results to return. - * - * Generated from protobuf field int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. A page token received from a previous `ListTasks` call. - * You can provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListTasks` must match - * the call that provided the page token. - * - * Generated from protobuf field string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. A filter query to apply when listing Tasks. See - * http://aip.dev/160 for examples of filter syntax. If you don't specify a - * value, or if you filter on an empty string, then all Tasks are returned. - * For information about the Task properties that you can filter on, see [List - * tasks](https://developers.google.com/maps/documentation/mobility/fleet-engine/journeys/tasks/find-tasks#filter_listed_tasks). - * - * Generated from protobuf field string filter = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - - /** - * @param string $parent Required. Must be in the format `providers/{provider}`. - * The `provider` must be the Google Cloud Project ID. For example, - * `sample-cloud-project`. Please see - * {@see DeliveryServiceClient::providerName()} for help formatting this field. - * - * @return \Google\Maps\FleetEngine\Delivery\V1\ListTasksRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Maps\FleetEngine\Delivery\V1\DeliveryRequestHeader $header - * Optional. The standard Delivery API request header. - * @type string $parent - * Required. Must be in the format `providers/{provider}`. - * The `provider` must be the Google Cloud Project ID. For example, - * `sample-cloud-project`. - * @type int $page_size - * Optional. The maximum number of Tasks to return. The service may return - * fewer than this value. If you don't specify this value, then the server - * determines the number of results to return. - * @type string $page_token - * Optional. A page token received from a previous `ListTasks` call. - * You can provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListTasks` must match - * the call that provided the page token. - * @type string $filter - * Optional. A filter query to apply when listing Tasks. See - * http://aip.dev/160 for examples of filter syntax. If you don't specify a - * value, or if you filter on an empty string, then all Tasks are returned. - * For information about the Task properties that you can filter on, see [List - * tasks](https://developers.google.com/maps/documentation/mobility/fleet-engine/journeys/tasks/find-tasks#filter_listed_tasks). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Fleetengine\Delivery\V1\DeliveryApi::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The standard Delivery API request header. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Maps\FleetEngine\Delivery\V1\DeliveryRequestHeader|null - */ - public function getHeader() - { - return $this->header; - } - - public function hasHeader() - { - return isset($this->header); - } - - public function clearHeader() - { - unset($this->header); - } - - /** - * Optional. The standard Delivery API request header. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Maps\FleetEngine\Delivery\V1\DeliveryRequestHeader $var - * @return $this - */ - public function setHeader($var) - { - GPBUtil::checkMessage($var, \Google\Maps\FleetEngine\Delivery\V1\DeliveryRequestHeader::class); - $this->header = $var; - - return $this; - } - - /** - * Required. Must be in the format `providers/{provider}`. - * The `provider` must be the Google Cloud Project ID. For example, - * `sample-cloud-project`. - * - * Generated from protobuf field string parent = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Must be in the format `providers/{provider}`. - * The `provider` must be the Google Cloud Project ID. For example, - * `sample-cloud-project`. - * - * Generated from protobuf field string parent = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. The maximum number of Tasks to return. The service may return - * fewer than this value. If you don't specify this value, then the server - * determines the number of results to return. - * - * Generated from protobuf field int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of Tasks to return. The service may return - * fewer than this value. If you don't specify this value, then the server - * determines the number of results to return. - * - * Generated from protobuf field int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. A page token received from a previous `ListTasks` call. - * You can provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListTasks` must match - * the call that provided the page token. - * - * Generated from protobuf field string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. A page token received from a previous `ListTasks` call. - * You can provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListTasks` must match - * the call that provided the page token. - * - * Generated from protobuf field string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Optional. A filter query to apply when listing Tasks. See - * http://aip.dev/160 for examples of filter syntax. If you don't specify a - * value, or if you filter on an empty string, then all Tasks are returned. - * For information about the Task properties that you can filter on, see [List - * tasks](https://developers.google.com/maps/documentation/mobility/fleet-engine/journeys/tasks/find-tasks#filter_listed_tasks). - * - * Generated from protobuf field string filter = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. A filter query to apply when listing Tasks. See - * http://aip.dev/160 for examples of filter syntax. If you don't specify a - * value, or if you filter on an empty string, then all Tasks are returned. - * For information about the Task properties that you can filter on, see [List - * tasks](https://developers.google.com/maps/documentation/mobility/fleet-engine/journeys/tasks/find-tasks#filter_listed_tasks). - * - * Generated from protobuf field string filter = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/ListTasksResponse.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/ListTasksResponse.php deleted file mode 100644 index 6ff86766b915..000000000000 --- a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/ListTasksResponse.php +++ /dev/null @@ -1,160 +0,0 @@ -maps.fleetengine.delivery.v1.ListTasksResponse - */ -class ListTasksResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The set of Tasks that meet the requested filtering criteria. When no filter - * is specified, the request returns all tasks. A successful response can also - * be empty. An empty response indicates that no Tasks were found meeting the - * requested filter criteria. - * - * Generated from protobuf field repeated .maps.fleetengine.delivery.v1.Task tasks = 1; - */ - private $tasks; - /** - * Pass this token in the `ListTasksRequest` to continue to list results. - * If all results have been returned, then this field is either an empty - * string, or it doesn't appear in the response. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * The total number of Tasks that match the request criteria, across all - * pages. - * - * Generated from protobuf field int64 total_size = 3; - */ - protected $total_size = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Maps\FleetEngine\Delivery\V1\Task>|\Google\Protobuf\Internal\RepeatedField $tasks - * The set of Tasks that meet the requested filtering criteria. When no filter - * is specified, the request returns all tasks. A successful response can also - * be empty. An empty response indicates that no Tasks were found meeting the - * requested filter criteria. - * @type string $next_page_token - * Pass this token in the `ListTasksRequest` to continue to list results. - * If all results have been returned, then this field is either an empty - * string, or it doesn't appear in the response. - * @type int|string $total_size - * The total number of Tasks that match the request criteria, across all - * pages. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Fleetengine\Delivery\V1\DeliveryApi::initOnce(); - parent::__construct($data); - } - - /** - * The set of Tasks that meet the requested filtering criteria. When no filter - * is specified, the request returns all tasks. A successful response can also - * be empty. An empty response indicates that no Tasks were found meeting the - * requested filter criteria. - * - * Generated from protobuf field repeated .maps.fleetengine.delivery.v1.Task tasks = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTasks() - { - return $this->tasks; - } - - /** - * The set of Tasks that meet the requested filtering criteria. When no filter - * is specified, the request returns all tasks. A successful response can also - * be empty. An empty response indicates that no Tasks were found meeting the - * requested filter criteria. - * - * Generated from protobuf field repeated .maps.fleetengine.delivery.v1.Task tasks = 1; - * @param array<\Google\Maps\FleetEngine\Delivery\V1\Task>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTasks($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\FleetEngine\Delivery\V1\Task::class); - $this->tasks = $arr; - - return $this; - } - - /** - * Pass this token in the `ListTasksRequest` to continue to list results. - * If all results have been returned, then this field is either an empty - * string, or it doesn't appear in the response. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Pass this token in the `ListTasksRequest` to continue to list results. - * If all results have been returned, then this field is either an empty - * string, or it doesn't appear in the response. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * The total number of Tasks that match the request criteria, across all - * pages. - * - * Generated from protobuf field int64 total_size = 3; - * @return int|string - */ - public function getTotalSize() - { - return $this->total_size; - } - - /** - * The total number of Tasks that match the request criteria, across all - * pages. - * - * Generated from protobuf field int64 total_size = 3; - * @param int|string $var - * @return $this - */ - public function setTotalSize($var) - { - GPBUtil::checkInt64($var); - $this->total_size = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/LocationInfo.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/LocationInfo.php deleted file mode 100644 index 6c8597013b43..000000000000 --- a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/LocationInfo.php +++ /dev/null @@ -1,77 +0,0 @@ -maps.fleetengine.delivery.v1.LocationInfo - */ -class LocationInfo extends \Google\Protobuf\Internal\Message -{ - /** - * The location's coordinates. - * - * Generated from protobuf field .google.type.LatLng point = 1; - */ - protected $point = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Type\LatLng $point - * The location's coordinates. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Fleetengine\Delivery\V1\DeliveryVehicles::initOnce(); - parent::__construct($data); - } - - /** - * The location's coordinates. - * - * Generated from protobuf field .google.type.LatLng point = 1; - * @return \Google\Type\LatLng|null - */ - public function getPoint() - { - return $this->point; - } - - public function hasPoint() - { - return isset($this->point); - } - - public function clearPoint() - { - unset($this->point); - } - - /** - * The location's coordinates. - * - * Generated from protobuf field .google.type.LatLng point = 1; - * @param \Google\Type\LatLng $var - * @return $this - */ - public function setPoint($var) - { - GPBUtil::checkMessage($var, \Google\Type\LatLng::class); - $this->point = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/Task.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/Task.php deleted file mode 100644 index 66471744ba32..000000000000 --- a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/Task.php +++ /dev/null @@ -1,720 +0,0 @@ -maps.fleetengine.delivery.v1.Task - */ -class Task extends \Google\Protobuf\Internal\Message -{ - /** - * Must be in the format `providers/{provider}/tasks/{task}`. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Required. Immutable. Defines the type of the Task. For example, a break or - * shipment. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.Task.Type type = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - */ - protected $type = 0; - /** - * Required. The current execution state of the Task. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.Task.State state = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $state = 0; - /** - * The outcome of the Task. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.Task.TaskOutcome task_outcome = 9; - */ - protected $task_outcome = 0; - /** - * The timestamp that indicates when the `Task`'s outcome was set by the - * provider. - * - * Generated from protobuf field .google.protobuf.Timestamp task_outcome_time = 10; - */ - protected $task_outcome_time = null; - /** - * The location where the `Task`'s outcome was set. This value is updated as - * part of `UpdateTask`. If this value isn't explicitly updated by the - * provider, then Fleet Engine populates it by default with the last known - * vehicle location (the *raw* location). - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.LocationInfo task_outcome_location = 11; - */ - protected $task_outcome_location = null; - /** - * Indicates where the value of the `task_outcome_location` came from. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.Task.TaskOutcomeLocationSource task_outcome_location_source = 12; - */ - protected $task_outcome_location_source = 0; - /** - * Immutable. This field facilitates the storing of an ID so you can avoid - * using a complicated mapping. You cannot set `tracking_id` for Tasks of type - * `UNAVAILABLE` and `SCHEDULED_STOP`. These IDs are subject to the - * following restrictions: - * * Must be a valid Unicode string. - * * Limited to a maximum length of 64 characters. - * * Normalized according to [Unicode Normalization Form C] - * (http://www.unicode.org/reports/tr15/). - * * May not contain any of the following ASCII characters: '/', ':', '?', - * ',', or '#'. - * - * Generated from protobuf field string tracking_id = 4 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $tracking_id = ''; - /** - * Output only. The ID of the vehicle that is executing this Task. Delivery - * Vehicle IDs are subject to the following restrictions: - * * Must be a valid Unicode string. - * * Limited to a maximum length of 64 characters. - * * Normalized according to [Unicode Normalization Form C] - * (http://www.unicode.org/reports/tr15/). - * * May not contain any of the following ASCII characters: '/', ':', '?', - * ',', or '#'. - * - * Generated from protobuf field string delivery_vehicle_id = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $delivery_vehicle_id = ''; - /** - * Immutable. The location where the Task will be completed. - * Optional for `UNAVAILABLE` Tasks, but required for all other Tasks. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.LocationInfo planned_location = 6 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $planned_location = null; - /** - * Required. Immutable. The time needed to execute a Task at this location. - * - * Generated from protobuf field .google.protobuf.Duration task_duration = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - */ - protected $task_duration = null; - /** - * The time window during which the task should be completed. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.TimeWindow target_time_window = 14; - */ - protected $target_time_window = null; - /** - * Output only. Journey sharing-specific fields. Not populated when state is - * `CLOSED`. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.Task.JourneySharingInfo journey_sharing_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $journey_sharing_info = null; - /** - * The configuration for task tracking that specifies which data elements are - * visible to the end users under what circumstances. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.TaskTrackingViewConfig task_tracking_view_config = 13; - */ - protected $task_tracking_view_config = null; - /** - * A list of custom Task attributes. Each attribute must have a unique key. - * - * Generated from protobuf field repeated .maps.fleetengine.delivery.v1.TaskAttribute attributes = 15; - */ - private $attributes; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Must be in the format `providers/{provider}/tasks/{task}`. - * @type int $type - * Required. Immutable. Defines the type of the Task. For example, a break or - * shipment. - * @type int $state - * Required. The current execution state of the Task. - * @type int $task_outcome - * The outcome of the Task. - * @type \Google\Protobuf\Timestamp $task_outcome_time - * The timestamp that indicates when the `Task`'s outcome was set by the - * provider. - * @type \Google\Maps\FleetEngine\Delivery\V1\LocationInfo $task_outcome_location - * The location where the `Task`'s outcome was set. This value is updated as - * part of `UpdateTask`. If this value isn't explicitly updated by the - * provider, then Fleet Engine populates it by default with the last known - * vehicle location (the *raw* location). - * @type int $task_outcome_location_source - * Indicates where the value of the `task_outcome_location` came from. - * @type string $tracking_id - * Immutable. This field facilitates the storing of an ID so you can avoid - * using a complicated mapping. You cannot set `tracking_id` for Tasks of type - * `UNAVAILABLE` and `SCHEDULED_STOP`. These IDs are subject to the - * following restrictions: - * * Must be a valid Unicode string. - * * Limited to a maximum length of 64 characters. - * * Normalized according to [Unicode Normalization Form C] - * (http://www.unicode.org/reports/tr15/). - * * May not contain any of the following ASCII characters: '/', ':', '?', - * ',', or '#'. - * @type string $delivery_vehicle_id - * Output only. The ID of the vehicle that is executing this Task. Delivery - * Vehicle IDs are subject to the following restrictions: - * * Must be a valid Unicode string. - * * Limited to a maximum length of 64 characters. - * * Normalized according to [Unicode Normalization Form C] - * (http://www.unicode.org/reports/tr15/). - * * May not contain any of the following ASCII characters: '/', ':', '?', - * ',', or '#'. - * @type \Google\Maps\FleetEngine\Delivery\V1\LocationInfo $planned_location - * Immutable. The location where the Task will be completed. - * Optional for `UNAVAILABLE` Tasks, but required for all other Tasks. - * @type \Google\Protobuf\Duration $task_duration - * Required. Immutable. The time needed to execute a Task at this location. - * @type \Google\Maps\FleetEngine\Delivery\V1\TimeWindow $target_time_window - * The time window during which the task should be completed. - * @type \Google\Maps\FleetEngine\Delivery\V1\Task\JourneySharingInfo $journey_sharing_info - * Output only. Journey sharing-specific fields. Not populated when state is - * `CLOSED`. - * @type \Google\Maps\FleetEngine\Delivery\V1\TaskTrackingViewConfig $task_tracking_view_config - * The configuration for task tracking that specifies which data elements are - * visible to the end users under what circumstances. - * @type array<\Google\Maps\FleetEngine\Delivery\V1\TaskAttribute>|\Google\Protobuf\Internal\RepeatedField $attributes - * A list of custom Task attributes. Each attribute must have a unique key. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Fleetengine\Delivery\V1\Tasks::initOnce(); - parent::__construct($data); - } - - /** - * Must be in the format `providers/{provider}/tasks/{task}`. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Must be in the format `providers/{provider}/tasks/{task}`. - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. Immutable. Defines the type of the Task. For example, a break or - * shipment. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.Task.Type type = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Required. Immutable. Defines the type of the Task. For example, a break or - * shipment. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.Task.Type type = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Maps\FleetEngine\Delivery\V1\Task\Type::class); - $this->type = $var; - - return $this; - } - - /** - * Required. The current execution state of the Task. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.Task.State state = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Required. The current execution state of the Task. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.Task.State state = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Maps\FleetEngine\Delivery\V1\Task\State::class); - $this->state = $var; - - return $this; - } - - /** - * The outcome of the Task. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.Task.TaskOutcome task_outcome = 9; - * @return int - */ - public function getTaskOutcome() - { - return $this->task_outcome; - } - - /** - * The outcome of the Task. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.Task.TaskOutcome task_outcome = 9; - * @param int $var - * @return $this - */ - public function setTaskOutcome($var) - { - GPBUtil::checkEnum($var, \Google\Maps\FleetEngine\Delivery\V1\Task\TaskOutcome::class); - $this->task_outcome = $var; - - return $this; - } - - /** - * The timestamp that indicates when the `Task`'s outcome was set by the - * provider. - * - * Generated from protobuf field .google.protobuf.Timestamp task_outcome_time = 10; - * @return \Google\Protobuf\Timestamp|null - */ - public function getTaskOutcomeTime() - { - return $this->task_outcome_time; - } - - public function hasTaskOutcomeTime() - { - return isset($this->task_outcome_time); - } - - public function clearTaskOutcomeTime() - { - unset($this->task_outcome_time); - } - - /** - * The timestamp that indicates when the `Task`'s outcome was set by the - * provider. - * - * Generated from protobuf field .google.protobuf.Timestamp task_outcome_time = 10; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setTaskOutcomeTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->task_outcome_time = $var; - - return $this; - } - - /** - * The location where the `Task`'s outcome was set. This value is updated as - * part of `UpdateTask`. If this value isn't explicitly updated by the - * provider, then Fleet Engine populates it by default with the last known - * vehicle location (the *raw* location). - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.LocationInfo task_outcome_location = 11; - * @return \Google\Maps\FleetEngine\Delivery\V1\LocationInfo|null - */ - public function getTaskOutcomeLocation() - { - return $this->task_outcome_location; - } - - public function hasTaskOutcomeLocation() - { - return isset($this->task_outcome_location); - } - - public function clearTaskOutcomeLocation() - { - unset($this->task_outcome_location); - } - - /** - * The location where the `Task`'s outcome was set. This value is updated as - * part of `UpdateTask`. If this value isn't explicitly updated by the - * provider, then Fleet Engine populates it by default with the last known - * vehicle location (the *raw* location). - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.LocationInfo task_outcome_location = 11; - * @param \Google\Maps\FleetEngine\Delivery\V1\LocationInfo $var - * @return $this - */ - public function setTaskOutcomeLocation($var) - { - GPBUtil::checkMessage($var, \Google\Maps\FleetEngine\Delivery\V1\LocationInfo::class); - $this->task_outcome_location = $var; - - return $this; - } - - /** - * Indicates where the value of the `task_outcome_location` came from. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.Task.TaskOutcomeLocationSource task_outcome_location_source = 12; - * @return int - */ - public function getTaskOutcomeLocationSource() - { - return $this->task_outcome_location_source; - } - - /** - * Indicates where the value of the `task_outcome_location` came from. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.Task.TaskOutcomeLocationSource task_outcome_location_source = 12; - * @param int $var - * @return $this - */ - public function setTaskOutcomeLocationSource($var) - { - GPBUtil::checkEnum($var, \Google\Maps\FleetEngine\Delivery\V1\Task\TaskOutcomeLocationSource::class); - $this->task_outcome_location_source = $var; - - return $this; - } - - /** - * Immutable. This field facilitates the storing of an ID so you can avoid - * using a complicated mapping. You cannot set `tracking_id` for Tasks of type - * `UNAVAILABLE` and `SCHEDULED_STOP`. These IDs are subject to the - * following restrictions: - * * Must be a valid Unicode string. - * * Limited to a maximum length of 64 characters. - * * Normalized according to [Unicode Normalization Form C] - * (http://www.unicode.org/reports/tr15/). - * * May not contain any of the following ASCII characters: '/', ':', '?', - * ',', or '#'. - * - * Generated from protobuf field string tracking_id = 4 [(.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getTrackingId() - { - return $this->tracking_id; - } - - /** - * Immutable. This field facilitates the storing of an ID so you can avoid - * using a complicated mapping. You cannot set `tracking_id` for Tasks of type - * `UNAVAILABLE` and `SCHEDULED_STOP`. These IDs are subject to the - * following restrictions: - * * Must be a valid Unicode string. - * * Limited to a maximum length of 64 characters. - * * Normalized according to [Unicode Normalization Form C] - * (http://www.unicode.org/reports/tr15/). - * * May not contain any of the following ASCII characters: '/', ':', '?', - * ',', or '#'. - * - * Generated from protobuf field string tracking_id = 4 [(.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setTrackingId($var) - { - GPBUtil::checkString($var, True); - $this->tracking_id = $var; - - return $this; - } - - /** - * Output only. The ID of the vehicle that is executing this Task. Delivery - * Vehicle IDs are subject to the following restrictions: - * * Must be a valid Unicode string. - * * Limited to a maximum length of 64 characters. - * * Normalized according to [Unicode Normalization Form C] - * (http://www.unicode.org/reports/tr15/). - * * May not contain any of the following ASCII characters: '/', ':', '?', - * ',', or '#'. - * - * Generated from protobuf field string delivery_vehicle_id = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getDeliveryVehicleId() - { - return $this->delivery_vehicle_id; - } - - /** - * Output only. The ID of the vehicle that is executing this Task. Delivery - * Vehicle IDs are subject to the following restrictions: - * * Must be a valid Unicode string. - * * Limited to a maximum length of 64 characters. - * * Normalized according to [Unicode Normalization Form C] - * (http://www.unicode.org/reports/tr15/). - * * May not contain any of the following ASCII characters: '/', ':', '?', - * ',', or '#'. - * - * Generated from protobuf field string delivery_vehicle_id = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setDeliveryVehicleId($var) - { - GPBUtil::checkString($var, True); - $this->delivery_vehicle_id = $var; - - return $this; - } - - /** - * Immutable. The location where the Task will be completed. - * Optional for `UNAVAILABLE` Tasks, but required for all other Tasks. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.LocationInfo planned_location = 6 [(.google.api.field_behavior) = IMMUTABLE]; - * @return \Google\Maps\FleetEngine\Delivery\V1\LocationInfo|null - */ - public function getPlannedLocation() - { - return $this->planned_location; - } - - public function hasPlannedLocation() - { - return isset($this->planned_location); - } - - public function clearPlannedLocation() - { - unset($this->planned_location); - } - - /** - * Immutable. The location where the Task will be completed. - * Optional for `UNAVAILABLE` Tasks, but required for all other Tasks. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.LocationInfo planned_location = 6 [(.google.api.field_behavior) = IMMUTABLE]; - * @param \Google\Maps\FleetEngine\Delivery\V1\LocationInfo $var - * @return $this - */ - public function setPlannedLocation($var) - { - GPBUtil::checkMessage($var, \Google\Maps\FleetEngine\Delivery\V1\LocationInfo::class); - $this->planned_location = $var; - - return $this; - } - - /** - * Required. Immutable. The time needed to execute a Task at this location. - * - * Generated from protobuf field .google.protobuf.Duration task_duration = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @return \Google\Protobuf\Duration|null - */ - public function getTaskDuration() - { - return $this->task_duration; - } - - public function hasTaskDuration() - { - return isset($this->task_duration); - } - - public function clearTaskDuration() - { - unset($this->task_duration); - } - - /** - * Required. Immutable. The time needed to execute a Task at this location. - * - * Generated from protobuf field .google.protobuf.Duration task_duration = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setTaskDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->task_duration = $var; - - return $this; - } - - /** - * The time window during which the task should be completed. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.TimeWindow target_time_window = 14; - * @return \Google\Maps\FleetEngine\Delivery\V1\TimeWindow|null - */ - public function getTargetTimeWindow() - { - return $this->target_time_window; - } - - public function hasTargetTimeWindow() - { - return isset($this->target_time_window); - } - - public function clearTargetTimeWindow() - { - unset($this->target_time_window); - } - - /** - * The time window during which the task should be completed. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.TimeWindow target_time_window = 14; - * @param \Google\Maps\FleetEngine\Delivery\V1\TimeWindow $var - * @return $this - */ - public function setTargetTimeWindow($var) - { - GPBUtil::checkMessage($var, \Google\Maps\FleetEngine\Delivery\V1\TimeWindow::class); - $this->target_time_window = $var; - - return $this; - } - - /** - * Output only. Journey sharing-specific fields. Not populated when state is - * `CLOSED`. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.Task.JourneySharingInfo journey_sharing_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Maps\FleetEngine\Delivery\V1\Task\JourneySharingInfo|null - */ - public function getJourneySharingInfo() - { - return $this->journey_sharing_info; - } - - public function hasJourneySharingInfo() - { - return isset($this->journey_sharing_info); - } - - public function clearJourneySharingInfo() - { - unset($this->journey_sharing_info); - } - - /** - * Output only. Journey sharing-specific fields. Not populated when state is - * `CLOSED`. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.Task.JourneySharingInfo journey_sharing_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Maps\FleetEngine\Delivery\V1\Task\JourneySharingInfo $var - * @return $this - */ - public function setJourneySharingInfo($var) - { - GPBUtil::checkMessage($var, \Google\Maps\FleetEngine\Delivery\V1\Task\JourneySharingInfo::class); - $this->journey_sharing_info = $var; - - return $this; - } - - /** - * The configuration for task tracking that specifies which data elements are - * visible to the end users under what circumstances. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.TaskTrackingViewConfig task_tracking_view_config = 13; - * @return \Google\Maps\FleetEngine\Delivery\V1\TaskTrackingViewConfig|null - */ - public function getTaskTrackingViewConfig() - { - return $this->task_tracking_view_config; - } - - public function hasTaskTrackingViewConfig() - { - return isset($this->task_tracking_view_config); - } - - public function clearTaskTrackingViewConfig() - { - unset($this->task_tracking_view_config); - } - - /** - * The configuration for task tracking that specifies which data elements are - * visible to the end users under what circumstances. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.TaskTrackingViewConfig task_tracking_view_config = 13; - * @param \Google\Maps\FleetEngine\Delivery\V1\TaskTrackingViewConfig $var - * @return $this - */ - public function setTaskTrackingViewConfig($var) - { - GPBUtil::checkMessage($var, \Google\Maps\FleetEngine\Delivery\V1\TaskTrackingViewConfig::class); - $this->task_tracking_view_config = $var; - - return $this; - } - - /** - * A list of custom Task attributes. Each attribute must have a unique key. - * - * Generated from protobuf field repeated .maps.fleetengine.delivery.v1.TaskAttribute attributes = 15; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAttributes() - { - return $this->attributes; - } - - /** - * A list of custom Task attributes. Each attribute must have a unique key. - * - * Generated from protobuf field repeated .maps.fleetengine.delivery.v1.TaskAttribute attributes = 15; - * @param array<\Google\Maps\FleetEngine\Delivery\V1\TaskAttribute>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAttributes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\FleetEngine\Delivery\V1\TaskAttribute::class); - $this->attributes = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/Task/JourneySharingInfo.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/Task/JourneySharingInfo.php deleted file mode 100644 index 24c3728cd2e5..000000000000 --- a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/Task/JourneySharingInfo.php +++ /dev/null @@ -1,216 +0,0 @@ -maps.fleetengine.delivery.v1.Task.JourneySharingInfo - */ -class JourneySharingInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Tracking information for the stops that the assigned vehicle will make - * before it completes this Task. Note that this list can contain stops - * from other tasks. - * The first segment, - * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0]` (gRPC) - * or `Task.journeySharingInfo.remainingVehicleJourneySegments[0]` (REST), - * contains route information from the driver's last known location to the - * upcoming `VehicleStop`. Current route information usually comes from the - * driver app, except for some cases noted in the documentation for - * [DeliveryVehicle.current_route_segment][maps.fleetengine.delivery.v1.DeliveryVehicle.current_route_segment]. - * The other segments in - * `Task.journey_sharing_info.remaining_vehicle_journey_segments` (gRPC) or - * `Task.journeySharingInfo.remainingVehicleJourneySegments` (REST) are - * populated by Fleet Engine. They provide route information between the - * remaining `VehicleStops`. - * - * Generated from protobuf field repeated .maps.fleetengine.delivery.v1.VehicleJourneySegment remaining_vehicle_journey_segments = 1; - */ - private $remaining_vehicle_journey_segments; - /** - * Indicates the vehicle's last reported location of the assigned vehicle. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryVehicleLocation last_location = 2; - */ - protected $last_location = null; - /** - * Indicates whether the vehicle's lastLocation can be snapped to - * the `current_route_segment`. This value is False if either - * `last_location` or `current_route_segment` don't exist. This value is - * computed by Fleet Engine. Updates from clients are ignored. - * - * Generated from protobuf field bool last_location_snappable = 3; - */ - protected $last_location_snappable = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Maps\FleetEngine\Delivery\V1\VehicleJourneySegment>|\Google\Protobuf\Internal\RepeatedField $remaining_vehicle_journey_segments - * Tracking information for the stops that the assigned vehicle will make - * before it completes this Task. Note that this list can contain stops - * from other tasks. - * The first segment, - * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0]` (gRPC) - * or `Task.journeySharingInfo.remainingVehicleJourneySegments[0]` (REST), - * contains route information from the driver's last known location to the - * upcoming `VehicleStop`. Current route information usually comes from the - * driver app, except for some cases noted in the documentation for - * [DeliveryVehicle.current_route_segment][maps.fleetengine.delivery.v1.DeliveryVehicle.current_route_segment]. - * The other segments in - * `Task.journey_sharing_info.remaining_vehicle_journey_segments` (gRPC) or - * `Task.journeySharingInfo.remainingVehicleJourneySegments` (REST) are - * populated by Fleet Engine. They provide route information between the - * remaining `VehicleStops`. - * @type \Google\Maps\FleetEngine\Delivery\V1\DeliveryVehicleLocation $last_location - * Indicates the vehicle's last reported location of the assigned vehicle. - * @type bool $last_location_snappable - * Indicates whether the vehicle's lastLocation can be snapped to - * the `current_route_segment`. This value is False if either - * `last_location` or `current_route_segment` don't exist. This value is - * computed by Fleet Engine. Updates from clients are ignored. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Fleetengine\Delivery\V1\Tasks::initOnce(); - parent::__construct($data); - } - - /** - * Tracking information for the stops that the assigned vehicle will make - * before it completes this Task. Note that this list can contain stops - * from other tasks. - * The first segment, - * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0]` (gRPC) - * or `Task.journeySharingInfo.remainingVehicleJourneySegments[0]` (REST), - * contains route information from the driver's last known location to the - * upcoming `VehicleStop`. Current route information usually comes from the - * driver app, except for some cases noted in the documentation for - * [DeliveryVehicle.current_route_segment][maps.fleetengine.delivery.v1.DeliveryVehicle.current_route_segment]. - * The other segments in - * `Task.journey_sharing_info.remaining_vehicle_journey_segments` (gRPC) or - * `Task.journeySharingInfo.remainingVehicleJourneySegments` (REST) are - * populated by Fleet Engine. They provide route information between the - * remaining `VehicleStops`. - * - * Generated from protobuf field repeated .maps.fleetengine.delivery.v1.VehicleJourneySegment remaining_vehicle_journey_segments = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRemainingVehicleJourneySegments() - { - return $this->remaining_vehicle_journey_segments; - } - - /** - * Tracking information for the stops that the assigned vehicle will make - * before it completes this Task. Note that this list can contain stops - * from other tasks. - * The first segment, - * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0]` (gRPC) - * or `Task.journeySharingInfo.remainingVehicleJourneySegments[0]` (REST), - * contains route information from the driver's last known location to the - * upcoming `VehicleStop`. Current route information usually comes from the - * driver app, except for some cases noted in the documentation for - * [DeliveryVehicle.current_route_segment][maps.fleetengine.delivery.v1.DeliveryVehicle.current_route_segment]. - * The other segments in - * `Task.journey_sharing_info.remaining_vehicle_journey_segments` (gRPC) or - * `Task.journeySharingInfo.remainingVehicleJourneySegments` (REST) are - * populated by Fleet Engine. They provide route information between the - * remaining `VehicleStops`. - * - * Generated from protobuf field repeated .maps.fleetengine.delivery.v1.VehicleJourneySegment remaining_vehicle_journey_segments = 1; - * @param array<\Google\Maps\FleetEngine\Delivery\V1\VehicleJourneySegment>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRemainingVehicleJourneySegments($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\FleetEngine\Delivery\V1\VehicleJourneySegment::class); - $this->remaining_vehicle_journey_segments = $arr; - - return $this; - } - - /** - * Indicates the vehicle's last reported location of the assigned vehicle. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryVehicleLocation last_location = 2; - * @return \Google\Maps\FleetEngine\Delivery\V1\DeliveryVehicleLocation|null - */ - public function getLastLocation() - { - return $this->last_location; - } - - public function hasLastLocation() - { - return isset($this->last_location); - } - - public function clearLastLocation() - { - unset($this->last_location); - } - - /** - * Indicates the vehicle's last reported location of the assigned vehicle. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryVehicleLocation last_location = 2; - * @param \Google\Maps\FleetEngine\Delivery\V1\DeliveryVehicleLocation $var - * @return $this - */ - public function setLastLocation($var) - { - GPBUtil::checkMessage($var, \Google\Maps\FleetEngine\Delivery\V1\DeliveryVehicleLocation::class); - $this->last_location = $var; - - return $this; - } - - /** - * Indicates whether the vehicle's lastLocation can be snapped to - * the `current_route_segment`. This value is False if either - * `last_location` or `current_route_segment` don't exist. This value is - * computed by Fleet Engine. Updates from clients are ignored. - * - * Generated from protobuf field bool last_location_snappable = 3; - * @return bool - */ - public function getLastLocationSnappable() - { - return $this->last_location_snappable; - } - - /** - * Indicates whether the vehicle's lastLocation can be snapped to - * the `current_route_segment`. This value is False if either - * `last_location` or `current_route_segment` don't exist. This value is - * computed by Fleet Engine. Updates from clients are ignored. - * - * Generated from protobuf field bool last_location_snappable = 3; - * @param bool $var - * @return $this - */ - public function setLastLocationSnappable($var) - { - GPBUtil::checkBool($var); - $this->last_location_snappable = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(JourneySharingInfo::class, \Google\Maps\FleetEngine\Delivery\V1\Task_JourneySharingInfo::class); - diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/Task/State.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/Task/State.php deleted file mode 100644 index 8ad698087d0f..000000000000 --- a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/Task/State.php +++ /dev/null @@ -1,65 +0,0 @@ -maps.fleetengine.delivery.v1.Task.State - */ -class State -{ - /** - * Default. Used for an unspecified or unrecognized Task state. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Either the Task has not yet been assigned to a delivery vehicle, or the - * delivery vehicle has not yet passed the `Task`'s assigned vehicle stop. - * - * Generated from protobuf enum OPEN = 1; - */ - const OPEN = 1; - /** - * When the vehicle passes the vehicle stop for this Task. - * - * Generated from protobuf enum CLOSED = 2; - */ - const CLOSED = 2; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::OPEN => 'OPEN', - self::CLOSED => 'CLOSED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Maps\FleetEngine\Delivery\V1\Task_State::class); - diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/Task/TaskOutcome.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/Task/TaskOutcome.php deleted file mode 100644 index 9c9af30335ba..000000000000 --- a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/Task/TaskOutcome.php +++ /dev/null @@ -1,65 +0,0 @@ -maps.fleetengine.delivery.v1.Task.TaskOutcome - */ -class TaskOutcome -{ - /** - * The Task outcome before its value is set. - * - * Generated from protobuf enum TASK_OUTCOME_UNSPECIFIED = 0; - */ - const TASK_OUTCOME_UNSPECIFIED = 0; - /** - * The Task completed successfully. - * - * Generated from protobuf enum SUCCEEDED = 1; - */ - const SUCCEEDED = 1; - /** - * Either the Task couldn't be completed, or it was cancelled. - * - * Generated from protobuf enum FAILED = 2; - */ - const FAILED = 2; - - private static $valueToName = [ - self::TASK_OUTCOME_UNSPECIFIED => 'TASK_OUTCOME_UNSPECIFIED', - self::SUCCEEDED => 'SUCCEEDED', - self::FAILED => 'FAILED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(TaskOutcome::class, \Google\Maps\FleetEngine\Delivery\V1\Task_TaskOutcome::class); - diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/Task/TaskOutcomeLocationSource.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/Task/TaskOutcomeLocationSource.php deleted file mode 100644 index c5b2d9d5e23c..000000000000 --- a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/Task/TaskOutcomeLocationSource.php +++ /dev/null @@ -1,65 +0,0 @@ -maps.fleetengine.delivery.v1.Task.TaskOutcomeLocationSource - */ -class TaskOutcomeLocationSource -{ - /** - * The task outcome before it is set. - * - * Generated from protobuf enum TASK_OUTCOME_LOCATION_SOURCE_UNSPECIFIED = 0; - */ - const TASK_OUTCOME_LOCATION_SOURCE_UNSPECIFIED = 0; - /** - * The provider-specified the `task_outcome_location`. - * - * Generated from protobuf enum PROVIDER = 2; - */ - const PROVIDER = 2; - /** - * The provider didn't specify the `task_outcome_location`, so Fleet Engine - * used the last known vehicle location. - * - * Generated from protobuf enum LAST_VEHICLE_LOCATION = 3; - */ - const LAST_VEHICLE_LOCATION = 3; - - private static $valueToName = [ - self::TASK_OUTCOME_LOCATION_SOURCE_UNSPECIFIED => 'TASK_OUTCOME_LOCATION_SOURCE_UNSPECIFIED', - self::PROVIDER => 'PROVIDER', - self::LAST_VEHICLE_LOCATION => 'LAST_VEHICLE_LOCATION', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(TaskOutcomeLocationSource::class, \Google\Maps\FleetEngine\Delivery\V1\Task_TaskOutcomeLocationSource::class); - diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/Task/Type.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/Task/Type.php deleted file mode 100644 index a4e6bb2b1965..000000000000 --- a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/Task/Type.php +++ /dev/null @@ -1,87 +0,0 @@ -maps.fleetengine.delivery.v1.Task.Type - */ -class Type -{ - /** - * Default, the Task type is unknown. - * - * Generated from protobuf enum TYPE_UNSPECIFIED = 0; - */ - const TYPE_UNSPECIFIED = 0; - /** - * A pickup Task is the action taken for picking up a shipment from a - * customer. Depot or feeder vehicle pickups should use the `SCHEDULED_STOP` - * type. - * - * Generated from protobuf enum PICKUP = 1; - */ - const PICKUP = 1; - /** - * A delivery Task is the action taken for delivering a shipment to an end - * customer. Depot or feeder vehicle dropoffs should use the - * `SCHEDULED_STOP` type. - * - * Generated from protobuf enum DELIVERY = 2; - */ - const DELIVERY = 2; - /** - * A scheduled stop Task is used for planning purposes. For example, it - * could represent picking up or dropping off shipments from feeder vehicles - * or depots. It shouldn't be used for any shipments that are picked up or - * dropped off from an end customer. - * - * Generated from protobuf enum SCHEDULED_STOP = 3; - */ - const SCHEDULED_STOP = 3; - /** - * A Task that means the Vehicle is not available for service. For example, - * this can happen when the driver takes a break, or when the vehicle - * is being refueled. - * - * Generated from protobuf enum UNAVAILABLE = 4; - */ - const UNAVAILABLE = 4; - - private static $valueToName = [ - self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', - self::PICKUP => 'PICKUP', - self::DELIVERY => 'DELIVERY', - self::SCHEDULED_STOP => 'SCHEDULED_STOP', - self::UNAVAILABLE => 'UNAVAILABLE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Type::class, \Google\Maps\FleetEngine\Delivery\V1\Task_Type::class); - diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/TaskAttribute.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/TaskAttribute.php deleted file mode 100644 index f5fba7a3cea3..000000000000 --- a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/TaskAttribute.php +++ /dev/null @@ -1,176 +0,0 @@ -maps.fleetengine.delivery.v1.TaskAttribute - */ -class TaskAttribute extends \Google\Protobuf\Internal\Message -{ - /** - * The attribute's key. Keys may not contain the colon character (:). - * - * Generated from protobuf field string key = 1; - */ - protected $key = ''; - protected $task_attribute_value; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $key - * The attribute's key. Keys may not contain the colon character (:). - * @type string $string_value - * String typed attribute value. - * @type bool $bool_value - * Boolean typed attribute value. - * @type float $number_value - * Double typed attribute value. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Fleetengine\Delivery\V1\Common::initOnce(); - parent::__construct($data); - } - - /** - * The attribute's key. Keys may not contain the colon character (:). - * - * Generated from protobuf field string key = 1; - * @return string - */ - public function getKey() - { - return $this->key; - } - - /** - * The attribute's key. Keys may not contain the colon character (:). - * - * Generated from protobuf field string key = 1; - * @param string $var - * @return $this - */ - public function setKey($var) - { - GPBUtil::checkString($var, True); - $this->key = $var; - - return $this; - } - - /** - * String typed attribute value. - * - * Generated from protobuf field string string_value = 2; - * @return string - */ - public function getStringValue() - { - return $this->readOneof(2); - } - - public function hasStringValue() - { - return $this->hasOneof(2); - } - - /** - * String typed attribute value. - * - * Generated from protobuf field string string_value = 2; - * @param string $var - * @return $this - */ - public function setStringValue($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Boolean typed attribute value. - * - * Generated from protobuf field bool bool_value = 3; - * @return bool - */ - public function getBoolValue() - { - return $this->readOneof(3); - } - - public function hasBoolValue() - { - return $this->hasOneof(3); - } - - /** - * Boolean typed attribute value. - * - * Generated from protobuf field bool bool_value = 3; - * @param bool $var - * @return $this - */ - public function setBoolValue($var) - { - GPBUtil::checkBool($var); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Double typed attribute value. - * - * Generated from protobuf field double number_value = 4; - * @return float - */ - public function getNumberValue() - { - return $this->readOneof(4); - } - - public function hasNumberValue() - { - return $this->hasOneof(4); - } - - /** - * Double typed attribute value. - * - * Generated from protobuf field double number_value = 4; - * @param float $var - * @return $this - */ - public function setNumberValue($var) - { - GPBUtil::checkDouble($var); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * @return string - */ - public function getTaskAttributeValue() - { - return $this->whichOneof("task_attribute_value"); - } - -} - diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/TaskTrackingInfo.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/TaskTrackingInfo.php deleted file mode 100644 index 66383f156e70..000000000000 --- a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/TaskTrackingInfo.php +++ /dev/null @@ -1,698 +0,0 @@ -maps.fleetengine.delivery.v1.TaskTrackingInfo - */ -class TaskTrackingInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Must be in the format `providers/{provider}/taskTrackingInfo/{tracking}`, - * where `tracking` represents the tracking ID. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Immutable. The tracking ID of a Task. - * * Must be a valid Unicode string. - * * Limited to a maximum length of 64 characters. - * * Normalized according to [Unicode Normalization Form C] - * (http://www.unicode.org/reports/tr15/). - * * May not contain any of the following ASCII characters: '/', ':', '?', - * ',', or '#'. - * - * Generated from protobuf field string tracking_id = 2 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $tracking_id = ''; - /** - * The vehicle's last location. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryVehicleLocation vehicle_location = 3; - */ - protected $vehicle_location = null; - /** - * A list of points which when connected forms a polyline of the vehicle's - * expected route to the location of this task. - * - * Generated from protobuf field repeated .google.type.LatLng route_polyline_points = 4; - */ - private $route_polyline_points; - /** - * Indicates the number of stops the vehicle remaining until the task stop is - * reached, including the task stop. For example, if the vehicle's next stop - * is the task stop, the value will be 1. - * - * Generated from protobuf field .google.protobuf.Int32Value remaining_stop_count = 5; - */ - protected $remaining_stop_count = null; - /** - * The total remaining distance in meters to the `VehicleStop` of interest. - * - * Generated from protobuf field .google.protobuf.Int32Value remaining_driving_distance_meters = 6; - */ - protected $remaining_driving_distance_meters = null; - /** - * The timestamp that indicates the estimated arrival time to the stop - * location. - * - * Generated from protobuf field .google.protobuf.Timestamp estimated_arrival_time = 7; - */ - protected $estimated_arrival_time = null; - /** - * The timestamp that indicates the estimated completion time of a Task. - * - * Generated from protobuf field .google.protobuf.Timestamp estimated_task_completion_time = 8; - */ - protected $estimated_task_completion_time = null; - /** - * The current execution state of the Task. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.Task.State state = 11; - */ - protected $state = 0; - /** - * The outcome of attempting to execute a Task. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.Task.TaskOutcome task_outcome = 9; - */ - protected $task_outcome = 0; - /** - * The timestamp that indicates when the Task's outcome was set by the - * provider. - * - * Generated from protobuf field .google.protobuf.Timestamp task_outcome_time = 12; - */ - protected $task_outcome_time = null; - /** - * Immutable. The location where the Task will be completed. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.LocationInfo planned_location = 10 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $planned_location = null; - /** - * The time window during which the task should be completed. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.TimeWindow target_time_window = 13; - */ - protected $target_time_window = null; - /** - * The custom attributes set on the task. - * - * Generated from protobuf field repeated .maps.fleetengine.delivery.v1.TaskAttribute attributes = 14; - */ - private $attributes; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Must be in the format `providers/{provider}/taskTrackingInfo/{tracking}`, - * where `tracking` represents the tracking ID. - * @type string $tracking_id - * Immutable. The tracking ID of a Task. - * * Must be a valid Unicode string. - * * Limited to a maximum length of 64 characters. - * * Normalized according to [Unicode Normalization Form C] - * (http://www.unicode.org/reports/tr15/). - * * May not contain any of the following ASCII characters: '/', ':', '?', - * ',', or '#'. - * @type \Google\Maps\FleetEngine\Delivery\V1\DeliveryVehicleLocation $vehicle_location - * The vehicle's last location. - * @type array<\Google\Type\LatLng>|\Google\Protobuf\Internal\RepeatedField $route_polyline_points - * A list of points which when connected forms a polyline of the vehicle's - * expected route to the location of this task. - * @type \Google\Protobuf\Int32Value $remaining_stop_count - * Indicates the number of stops the vehicle remaining until the task stop is - * reached, including the task stop. For example, if the vehicle's next stop - * is the task stop, the value will be 1. - * @type \Google\Protobuf\Int32Value $remaining_driving_distance_meters - * The total remaining distance in meters to the `VehicleStop` of interest. - * @type \Google\Protobuf\Timestamp $estimated_arrival_time - * The timestamp that indicates the estimated arrival time to the stop - * location. - * @type \Google\Protobuf\Timestamp $estimated_task_completion_time - * The timestamp that indicates the estimated completion time of a Task. - * @type int $state - * The current execution state of the Task. - * @type int $task_outcome - * The outcome of attempting to execute a Task. - * @type \Google\Protobuf\Timestamp $task_outcome_time - * The timestamp that indicates when the Task's outcome was set by the - * provider. - * @type \Google\Maps\FleetEngine\Delivery\V1\LocationInfo $planned_location - * Immutable. The location where the Task will be completed. - * @type \Google\Maps\FleetEngine\Delivery\V1\TimeWindow $target_time_window - * The time window during which the task should be completed. - * @type array<\Google\Maps\FleetEngine\Delivery\V1\TaskAttribute>|\Google\Protobuf\Internal\RepeatedField $attributes - * The custom attributes set on the task. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Fleetengine\Delivery\V1\TaskTrackingInfo::initOnce(); - parent::__construct($data); - } - - /** - * Must be in the format `providers/{provider}/taskTrackingInfo/{tracking}`, - * where `tracking` represents the tracking ID. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Must be in the format `providers/{provider}/taskTrackingInfo/{tracking}`, - * where `tracking` represents the tracking ID. - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Immutable. The tracking ID of a Task. - * * Must be a valid Unicode string. - * * Limited to a maximum length of 64 characters. - * * Normalized according to [Unicode Normalization Form C] - * (http://www.unicode.org/reports/tr15/). - * * May not contain any of the following ASCII characters: '/', ':', '?', - * ',', or '#'. - * - * Generated from protobuf field string tracking_id = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getTrackingId() - { - return $this->tracking_id; - } - - /** - * Immutable. The tracking ID of a Task. - * * Must be a valid Unicode string. - * * Limited to a maximum length of 64 characters. - * * Normalized according to [Unicode Normalization Form C] - * (http://www.unicode.org/reports/tr15/). - * * May not contain any of the following ASCII characters: '/', ':', '?', - * ',', or '#'. - * - * Generated from protobuf field string tracking_id = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setTrackingId($var) - { - GPBUtil::checkString($var, True); - $this->tracking_id = $var; - - return $this; - } - - /** - * The vehicle's last location. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryVehicleLocation vehicle_location = 3; - * @return \Google\Maps\FleetEngine\Delivery\V1\DeliveryVehicleLocation|null - */ - public function getVehicleLocation() - { - return $this->vehicle_location; - } - - public function hasVehicleLocation() - { - return isset($this->vehicle_location); - } - - public function clearVehicleLocation() - { - unset($this->vehicle_location); - } - - /** - * The vehicle's last location. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryVehicleLocation vehicle_location = 3; - * @param \Google\Maps\FleetEngine\Delivery\V1\DeliveryVehicleLocation $var - * @return $this - */ - public function setVehicleLocation($var) - { - GPBUtil::checkMessage($var, \Google\Maps\FleetEngine\Delivery\V1\DeliveryVehicleLocation::class); - $this->vehicle_location = $var; - - return $this; - } - - /** - * A list of points which when connected forms a polyline of the vehicle's - * expected route to the location of this task. - * - * Generated from protobuf field repeated .google.type.LatLng route_polyline_points = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRoutePolylinePoints() - { - return $this->route_polyline_points; - } - - /** - * A list of points which when connected forms a polyline of the vehicle's - * expected route to the location of this task. - * - * Generated from protobuf field repeated .google.type.LatLng route_polyline_points = 4; - * @param array<\Google\Type\LatLng>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRoutePolylinePoints($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Type\LatLng::class); - $this->route_polyline_points = $arr; - - return $this; - } - - /** - * Indicates the number of stops the vehicle remaining until the task stop is - * reached, including the task stop. For example, if the vehicle's next stop - * is the task stop, the value will be 1. - * - * Generated from protobuf field .google.protobuf.Int32Value remaining_stop_count = 5; - * @return \Google\Protobuf\Int32Value|null - */ - public function getRemainingStopCount() - { - return $this->remaining_stop_count; - } - - public function hasRemainingStopCount() - { - return isset($this->remaining_stop_count); - } - - public function clearRemainingStopCount() - { - unset($this->remaining_stop_count); - } - - /** - * Returns the unboxed value from getRemainingStopCount() - - * Indicates the number of stops the vehicle remaining until the task stop is - * reached, including the task stop. For example, if the vehicle's next stop - * is the task stop, the value will be 1. - * - * Generated from protobuf field .google.protobuf.Int32Value remaining_stop_count = 5; - * @return int|null - */ - public function getRemainingStopCountUnwrapped() - { - return $this->readWrapperValue("remaining_stop_count"); - } - - /** - * Indicates the number of stops the vehicle remaining until the task stop is - * reached, including the task stop. For example, if the vehicle's next stop - * is the task stop, the value will be 1. - * - * Generated from protobuf field .google.protobuf.Int32Value remaining_stop_count = 5; - * @param \Google\Protobuf\Int32Value $var - * @return $this - */ - public function setRemainingStopCount($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class); - $this->remaining_stop_count = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object. - - * Indicates the number of stops the vehicle remaining until the task stop is - * reached, including the task stop. For example, if the vehicle's next stop - * is the task stop, the value will be 1. - * - * Generated from protobuf field .google.protobuf.Int32Value remaining_stop_count = 5; - * @param int|null $var - * @return $this - */ - public function setRemainingStopCountUnwrapped($var) - { - $this->writeWrapperValue("remaining_stop_count", $var); - return $this;} - - /** - * The total remaining distance in meters to the `VehicleStop` of interest. - * - * Generated from protobuf field .google.protobuf.Int32Value remaining_driving_distance_meters = 6; - * @return \Google\Protobuf\Int32Value|null - */ - public function getRemainingDrivingDistanceMeters() - { - return $this->remaining_driving_distance_meters; - } - - public function hasRemainingDrivingDistanceMeters() - { - return isset($this->remaining_driving_distance_meters); - } - - public function clearRemainingDrivingDistanceMeters() - { - unset($this->remaining_driving_distance_meters); - } - - /** - * Returns the unboxed value from getRemainingDrivingDistanceMeters() - - * The total remaining distance in meters to the `VehicleStop` of interest. - * - * Generated from protobuf field .google.protobuf.Int32Value remaining_driving_distance_meters = 6; - * @return int|null - */ - public function getRemainingDrivingDistanceMetersUnwrapped() - { - return $this->readWrapperValue("remaining_driving_distance_meters"); - } - - /** - * The total remaining distance in meters to the `VehicleStop` of interest. - * - * Generated from protobuf field .google.protobuf.Int32Value remaining_driving_distance_meters = 6; - * @param \Google\Protobuf\Int32Value $var - * @return $this - */ - public function setRemainingDrivingDistanceMeters($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class); - $this->remaining_driving_distance_meters = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object. - - * The total remaining distance in meters to the `VehicleStop` of interest. - * - * Generated from protobuf field .google.protobuf.Int32Value remaining_driving_distance_meters = 6; - * @param int|null $var - * @return $this - */ - public function setRemainingDrivingDistanceMetersUnwrapped($var) - { - $this->writeWrapperValue("remaining_driving_distance_meters", $var); - return $this;} - - /** - * The timestamp that indicates the estimated arrival time to the stop - * location. - * - * Generated from protobuf field .google.protobuf.Timestamp estimated_arrival_time = 7; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEstimatedArrivalTime() - { - return $this->estimated_arrival_time; - } - - public function hasEstimatedArrivalTime() - { - return isset($this->estimated_arrival_time); - } - - public function clearEstimatedArrivalTime() - { - unset($this->estimated_arrival_time); - } - - /** - * The timestamp that indicates the estimated arrival time to the stop - * location. - * - * Generated from protobuf field .google.protobuf.Timestamp estimated_arrival_time = 7; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEstimatedArrivalTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->estimated_arrival_time = $var; - - return $this; - } - - /** - * The timestamp that indicates the estimated completion time of a Task. - * - * Generated from protobuf field .google.protobuf.Timestamp estimated_task_completion_time = 8; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEstimatedTaskCompletionTime() - { - return $this->estimated_task_completion_time; - } - - public function hasEstimatedTaskCompletionTime() - { - return isset($this->estimated_task_completion_time); - } - - public function clearEstimatedTaskCompletionTime() - { - unset($this->estimated_task_completion_time); - } - - /** - * The timestamp that indicates the estimated completion time of a Task. - * - * Generated from protobuf field .google.protobuf.Timestamp estimated_task_completion_time = 8; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEstimatedTaskCompletionTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->estimated_task_completion_time = $var; - - return $this; - } - - /** - * The current execution state of the Task. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.Task.State state = 11; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * The current execution state of the Task. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.Task.State state = 11; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Maps\FleetEngine\Delivery\V1\Task\State::class); - $this->state = $var; - - return $this; - } - - /** - * The outcome of attempting to execute a Task. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.Task.TaskOutcome task_outcome = 9; - * @return int - */ - public function getTaskOutcome() - { - return $this->task_outcome; - } - - /** - * The outcome of attempting to execute a Task. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.Task.TaskOutcome task_outcome = 9; - * @param int $var - * @return $this - */ - public function setTaskOutcome($var) - { - GPBUtil::checkEnum($var, \Google\Maps\FleetEngine\Delivery\V1\Task\TaskOutcome::class); - $this->task_outcome = $var; - - return $this; - } - - /** - * The timestamp that indicates when the Task's outcome was set by the - * provider. - * - * Generated from protobuf field .google.protobuf.Timestamp task_outcome_time = 12; - * @return \Google\Protobuf\Timestamp|null - */ - public function getTaskOutcomeTime() - { - return $this->task_outcome_time; - } - - public function hasTaskOutcomeTime() - { - return isset($this->task_outcome_time); - } - - public function clearTaskOutcomeTime() - { - unset($this->task_outcome_time); - } - - /** - * The timestamp that indicates when the Task's outcome was set by the - * provider. - * - * Generated from protobuf field .google.protobuf.Timestamp task_outcome_time = 12; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setTaskOutcomeTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->task_outcome_time = $var; - - return $this; - } - - /** - * Immutable. The location where the Task will be completed. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.LocationInfo planned_location = 10 [(.google.api.field_behavior) = IMMUTABLE]; - * @return \Google\Maps\FleetEngine\Delivery\V1\LocationInfo|null - */ - public function getPlannedLocation() - { - return $this->planned_location; - } - - public function hasPlannedLocation() - { - return isset($this->planned_location); - } - - public function clearPlannedLocation() - { - unset($this->planned_location); - } - - /** - * Immutable. The location where the Task will be completed. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.LocationInfo planned_location = 10 [(.google.api.field_behavior) = IMMUTABLE]; - * @param \Google\Maps\FleetEngine\Delivery\V1\LocationInfo $var - * @return $this - */ - public function setPlannedLocation($var) - { - GPBUtil::checkMessage($var, \Google\Maps\FleetEngine\Delivery\V1\LocationInfo::class); - $this->planned_location = $var; - - return $this; - } - - /** - * The time window during which the task should be completed. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.TimeWindow target_time_window = 13; - * @return \Google\Maps\FleetEngine\Delivery\V1\TimeWindow|null - */ - public function getTargetTimeWindow() - { - return $this->target_time_window; - } - - public function hasTargetTimeWindow() - { - return isset($this->target_time_window); - } - - public function clearTargetTimeWindow() - { - unset($this->target_time_window); - } - - /** - * The time window during which the task should be completed. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.TimeWindow target_time_window = 13; - * @param \Google\Maps\FleetEngine\Delivery\V1\TimeWindow $var - * @return $this - */ - public function setTargetTimeWindow($var) - { - GPBUtil::checkMessage($var, \Google\Maps\FleetEngine\Delivery\V1\TimeWindow::class); - $this->target_time_window = $var; - - return $this; - } - - /** - * The custom attributes set on the task. - * - * Generated from protobuf field repeated .maps.fleetengine.delivery.v1.TaskAttribute attributes = 14; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAttributes() - { - return $this->attributes; - } - - /** - * The custom attributes set on the task. - * - * Generated from protobuf field repeated .maps.fleetengine.delivery.v1.TaskAttribute attributes = 14; - * @param array<\Google\Maps\FleetEngine\Delivery\V1\TaskAttribute>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAttributes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\FleetEngine\Delivery\V1\TaskAttribute::class); - $this->attributes = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/TaskTrackingViewConfig.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/TaskTrackingViewConfig.php deleted file mode 100644 index 0c3036b3dc7f..000000000000 --- a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/TaskTrackingViewConfig.php +++ /dev/null @@ -1,346 +0,0 @@ -maps.fleetengine.delivery.v1.TaskTrackingViewConfig - */ -class TaskTrackingViewConfig extends \Google\Protobuf\Internal\Message -{ - /** - * The field that specifies when route polyline points can be visible. If this - * field is not specified, the project level default visibility configuration - * for this data will be used. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption route_polyline_points_visibility = 1; - */ - protected $route_polyline_points_visibility = null; - /** - * The field that specifies when estimated arrival time can be visible. If - * this field is not specified, the project level default visibility - * configuration for this data will be used. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption estimated_arrival_time_visibility = 2; - */ - protected $estimated_arrival_time_visibility = null; - /** - * The field that specifies when estimated task completion time can be - * visible. If this field is not specified, the project level default - * visibility configuration for this data will be used. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption estimated_task_completion_time_visibility = 3; - */ - protected $estimated_task_completion_time_visibility = null; - /** - * The field that specifies when remaining driving distance can be visible. If - * this field is not specified, the project level default visibility - * configuration for this data will be used. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption remaining_driving_distance_visibility = 4; - */ - protected $remaining_driving_distance_visibility = null; - /** - * The field that specifies when remaining stop count can be visible. If this - * field is not specified, the project level default visibility configuration - * for this data will be used. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption remaining_stop_count_visibility = 5; - */ - protected $remaining_stop_count_visibility = null; - /** - * The field that specifies when vehicle location can be visible. If this - * field is not specified, the project level default visibility configuration - * for this data will be used. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption vehicle_location_visibility = 6; - */ - protected $vehicle_location_visibility = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Maps\FleetEngine\Delivery\V1\TaskTrackingViewConfig\VisibilityOption $route_polyline_points_visibility - * The field that specifies when route polyline points can be visible. If this - * field is not specified, the project level default visibility configuration - * for this data will be used. - * @type \Google\Maps\FleetEngine\Delivery\V1\TaskTrackingViewConfig\VisibilityOption $estimated_arrival_time_visibility - * The field that specifies when estimated arrival time can be visible. If - * this field is not specified, the project level default visibility - * configuration for this data will be used. - * @type \Google\Maps\FleetEngine\Delivery\V1\TaskTrackingViewConfig\VisibilityOption $estimated_task_completion_time_visibility - * The field that specifies when estimated task completion time can be - * visible. If this field is not specified, the project level default - * visibility configuration for this data will be used. - * @type \Google\Maps\FleetEngine\Delivery\V1\TaskTrackingViewConfig\VisibilityOption $remaining_driving_distance_visibility - * The field that specifies when remaining driving distance can be visible. If - * this field is not specified, the project level default visibility - * configuration for this data will be used. - * @type \Google\Maps\FleetEngine\Delivery\V1\TaskTrackingViewConfig\VisibilityOption $remaining_stop_count_visibility - * The field that specifies when remaining stop count can be visible. If this - * field is not specified, the project level default visibility configuration - * for this data will be used. - * @type \Google\Maps\FleetEngine\Delivery\V1\TaskTrackingViewConfig\VisibilityOption $vehicle_location_visibility - * The field that specifies when vehicle location can be visible. If this - * field is not specified, the project level default visibility configuration - * for this data will be used. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Fleetengine\Delivery\V1\Tasks::initOnce(); - parent::__construct($data); - } - - /** - * The field that specifies when route polyline points can be visible. If this - * field is not specified, the project level default visibility configuration - * for this data will be used. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption route_polyline_points_visibility = 1; - * @return \Google\Maps\FleetEngine\Delivery\V1\TaskTrackingViewConfig\VisibilityOption|null - */ - public function getRoutePolylinePointsVisibility() - { - return $this->route_polyline_points_visibility; - } - - public function hasRoutePolylinePointsVisibility() - { - return isset($this->route_polyline_points_visibility); - } - - public function clearRoutePolylinePointsVisibility() - { - unset($this->route_polyline_points_visibility); - } - - /** - * The field that specifies when route polyline points can be visible. If this - * field is not specified, the project level default visibility configuration - * for this data will be used. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption route_polyline_points_visibility = 1; - * @param \Google\Maps\FleetEngine\Delivery\V1\TaskTrackingViewConfig\VisibilityOption $var - * @return $this - */ - public function setRoutePolylinePointsVisibility($var) - { - GPBUtil::checkMessage($var, \Google\Maps\FleetEngine\Delivery\V1\TaskTrackingViewConfig\VisibilityOption::class); - $this->route_polyline_points_visibility = $var; - - return $this; - } - - /** - * The field that specifies when estimated arrival time can be visible. If - * this field is not specified, the project level default visibility - * configuration for this data will be used. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption estimated_arrival_time_visibility = 2; - * @return \Google\Maps\FleetEngine\Delivery\V1\TaskTrackingViewConfig\VisibilityOption|null - */ - public function getEstimatedArrivalTimeVisibility() - { - return $this->estimated_arrival_time_visibility; - } - - public function hasEstimatedArrivalTimeVisibility() - { - return isset($this->estimated_arrival_time_visibility); - } - - public function clearEstimatedArrivalTimeVisibility() - { - unset($this->estimated_arrival_time_visibility); - } - - /** - * The field that specifies when estimated arrival time can be visible. If - * this field is not specified, the project level default visibility - * configuration for this data will be used. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption estimated_arrival_time_visibility = 2; - * @param \Google\Maps\FleetEngine\Delivery\V1\TaskTrackingViewConfig\VisibilityOption $var - * @return $this - */ - public function setEstimatedArrivalTimeVisibility($var) - { - GPBUtil::checkMessage($var, \Google\Maps\FleetEngine\Delivery\V1\TaskTrackingViewConfig\VisibilityOption::class); - $this->estimated_arrival_time_visibility = $var; - - return $this; - } - - /** - * The field that specifies when estimated task completion time can be - * visible. If this field is not specified, the project level default - * visibility configuration for this data will be used. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption estimated_task_completion_time_visibility = 3; - * @return \Google\Maps\FleetEngine\Delivery\V1\TaskTrackingViewConfig\VisibilityOption|null - */ - public function getEstimatedTaskCompletionTimeVisibility() - { - return $this->estimated_task_completion_time_visibility; - } - - public function hasEstimatedTaskCompletionTimeVisibility() - { - return isset($this->estimated_task_completion_time_visibility); - } - - public function clearEstimatedTaskCompletionTimeVisibility() - { - unset($this->estimated_task_completion_time_visibility); - } - - /** - * The field that specifies when estimated task completion time can be - * visible. If this field is not specified, the project level default - * visibility configuration for this data will be used. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption estimated_task_completion_time_visibility = 3; - * @param \Google\Maps\FleetEngine\Delivery\V1\TaskTrackingViewConfig\VisibilityOption $var - * @return $this - */ - public function setEstimatedTaskCompletionTimeVisibility($var) - { - GPBUtil::checkMessage($var, \Google\Maps\FleetEngine\Delivery\V1\TaskTrackingViewConfig\VisibilityOption::class); - $this->estimated_task_completion_time_visibility = $var; - - return $this; - } - - /** - * The field that specifies when remaining driving distance can be visible. If - * this field is not specified, the project level default visibility - * configuration for this data will be used. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption remaining_driving_distance_visibility = 4; - * @return \Google\Maps\FleetEngine\Delivery\V1\TaskTrackingViewConfig\VisibilityOption|null - */ - public function getRemainingDrivingDistanceVisibility() - { - return $this->remaining_driving_distance_visibility; - } - - public function hasRemainingDrivingDistanceVisibility() - { - return isset($this->remaining_driving_distance_visibility); - } - - public function clearRemainingDrivingDistanceVisibility() - { - unset($this->remaining_driving_distance_visibility); - } - - /** - * The field that specifies when remaining driving distance can be visible. If - * this field is not specified, the project level default visibility - * configuration for this data will be used. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption remaining_driving_distance_visibility = 4; - * @param \Google\Maps\FleetEngine\Delivery\V1\TaskTrackingViewConfig\VisibilityOption $var - * @return $this - */ - public function setRemainingDrivingDistanceVisibility($var) - { - GPBUtil::checkMessage($var, \Google\Maps\FleetEngine\Delivery\V1\TaskTrackingViewConfig\VisibilityOption::class); - $this->remaining_driving_distance_visibility = $var; - - return $this; - } - - /** - * The field that specifies when remaining stop count can be visible. If this - * field is not specified, the project level default visibility configuration - * for this data will be used. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption remaining_stop_count_visibility = 5; - * @return \Google\Maps\FleetEngine\Delivery\V1\TaskTrackingViewConfig\VisibilityOption|null - */ - public function getRemainingStopCountVisibility() - { - return $this->remaining_stop_count_visibility; - } - - public function hasRemainingStopCountVisibility() - { - return isset($this->remaining_stop_count_visibility); - } - - public function clearRemainingStopCountVisibility() - { - unset($this->remaining_stop_count_visibility); - } - - /** - * The field that specifies when remaining stop count can be visible. If this - * field is not specified, the project level default visibility configuration - * for this data will be used. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption remaining_stop_count_visibility = 5; - * @param \Google\Maps\FleetEngine\Delivery\V1\TaskTrackingViewConfig\VisibilityOption $var - * @return $this - */ - public function setRemainingStopCountVisibility($var) - { - GPBUtil::checkMessage($var, \Google\Maps\FleetEngine\Delivery\V1\TaskTrackingViewConfig\VisibilityOption::class); - $this->remaining_stop_count_visibility = $var; - - return $this; - } - - /** - * The field that specifies when vehicle location can be visible. If this - * field is not specified, the project level default visibility configuration - * for this data will be used. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption vehicle_location_visibility = 6; - * @return \Google\Maps\FleetEngine\Delivery\V1\TaskTrackingViewConfig\VisibilityOption|null - */ - public function getVehicleLocationVisibility() - { - return $this->vehicle_location_visibility; - } - - public function hasVehicleLocationVisibility() - { - return isset($this->vehicle_location_visibility); - } - - public function clearVehicleLocationVisibility() - { - unset($this->vehicle_location_visibility); - } - - /** - * The field that specifies when vehicle location can be visible. If this - * field is not specified, the project level default visibility configuration - * for this data will be used. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption vehicle_location_visibility = 6; - * @param \Google\Maps\FleetEngine\Delivery\V1\TaskTrackingViewConfig\VisibilityOption $var - * @return $this - */ - public function setVehicleLocationVisibility($var) - { - GPBUtil::checkMessage($var, \Google\Maps\FleetEngine\Delivery\V1\TaskTrackingViewConfig\VisibilityOption::class); - $this->vehicle_location_visibility = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/TaskTrackingViewConfig/VisibilityOption.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/TaskTrackingViewConfig/VisibilityOption.php deleted file mode 100644 index 57d7c4bda43e..000000000000 --- a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/TaskTrackingViewConfig/VisibilityOption.php +++ /dev/null @@ -1,229 +0,0 @@ -maps.fleetengine.delivery.v1.TaskTrackingViewConfig.VisibilityOption - */ -class VisibilityOption extends \Google\Protobuf\Internal\Message -{ - protected $visibility_option; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $remaining_stop_count_threshold - * This data element is visible to the end users if the remaining stop - * count <= remaining_stop_count_threshold. - * @type \Google\Protobuf\Duration $duration_until_estimated_arrival_time_threshold - * This data element is visible to the end users if the ETA to the stop - * <= duration_until_estimated_arrival_time_threshold. - * @type int $remaining_driving_distance_meters_threshold - * This data element is visible to the end users if the remaining - * driving distance in meters <= - * remaining_driving_distance_meters_threshold. - * @type bool $always - * If set to true, this data element is always visible to the end users - * with no thresholds. This field cannot be set to false. - * @type bool $never - * If set to true, this data element is always hidden from the end users - * with no thresholds. This field cannot be set to false. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Fleetengine\Delivery\V1\Tasks::initOnce(); - parent::__construct($data); - } - - /** - * This data element is visible to the end users if the remaining stop - * count <= remaining_stop_count_threshold. - * - * Generated from protobuf field int32 remaining_stop_count_threshold = 1; - * @return int - */ - public function getRemainingStopCountThreshold() - { - return $this->readOneof(1); - } - - public function hasRemainingStopCountThreshold() - { - return $this->hasOneof(1); - } - - /** - * This data element is visible to the end users if the remaining stop - * count <= remaining_stop_count_threshold. - * - * Generated from protobuf field int32 remaining_stop_count_threshold = 1; - * @param int $var - * @return $this - */ - public function setRemainingStopCountThreshold($var) - { - GPBUtil::checkInt32($var); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * This data element is visible to the end users if the ETA to the stop - * <= duration_until_estimated_arrival_time_threshold. - * - * Generated from protobuf field .google.protobuf.Duration duration_until_estimated_arrival_time_threshold = 2; - * @return \Google\Protobuf\Duration|null - */ - public function getDurationUntilEstimatedArrivalTimeThreshold() - { - return $this->readOneof(2); - } - - public function hasDurationUntilEstimatedArrivalTimeThreshold() - { - return $this->hasOneof(2); - } - - /** - * This data element is visible to the end users if the ETA to the stop - * <= duration_until_estimated_arrival_time_threshold. - * - * Generated from protobuf field .google.protobuf.Duration duration_until_estimated_arrival_time_threshold = 2; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setDurationUntilEstimatedArrivalTimeThreshold($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * This data element is visible to the end users if the remaining - * driving distance in meters <= - * remaining_driving_distance_meters_threshold. - * - * Generated from protobuf field int32 remaining_driving_distance_meters_threshold = 3; - * @return int - */ - public function getRemainingDrivingDistanceMetersThreshold() - { - return $this->readOneof(3); - } - - public function hasRemainingDrivingDistanceMetersThreshold() - { - return $this->hasOneof(3); - } - - /** - * This data element is visible to the end users if the remaining - * driving distance in meters <= - * remaining_driving_distance_meters_threshold. - * - * Generated from protobuf field int32 remaining_driving_distance_meters_threshold = 3; - * @param int $var - * @return $this - */ - public function setRemainingDrivingDistanceMetersThreshold($var) - { - GPBUtil::checkInt32($var); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * If set to true, this data element is always visible to the end users - * with no thresholds. This field cannot be set to false. - * - * Generated from protobuf field bool always = 4; - * @return bool - */ - public function getAlways() - { - return $this->readOneof(4); - } - - public function hasAlways() - { - return $this->hasOneof(4); - } - - /** - * If set to true, this data element is always visible to the end users - * with no thresholds. This field cannot be set to false. - * - * Generated from protobuf field bool always = 4; - * @param bool $var - * @return $this - */ - public function setAlways($var) - { - GPBUtil::checkBool($var); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * If set to true, this data element is always hidden from the end users - * with no thresholds. This field cannot be set to false. - * - * Generated from protobuf field bool never = 5; - * @return bool - */ - public function getNever() - { - return $this->readOneof(5); - } - - public function hasNever() - { - return $this->hasOneof(5); - } - - /** - * If set to true, this data element is always hidden from the end users - * with no thresholds. This field cannot be set to false. - * - * Generated from protobuf field bool never = 5; - * @param bool $var - * @return $this - */ - public function setNever($var) - { - GPBUtil::checkBool($var); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * @return string - */ - public function getVisibilityOption() - { - return $this->whichOneof("visibility_option"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(VisibilityOption::class, \Google\Maps\FleetEngine\Delivery\V1\TaskTrackingViewConfig_VisibilityOption::class); - diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/TimeWindow.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/TimeWindow.php deleted file mode 100644 index 8d4491a57d7b..000000000000 --- a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/TimeWindow.php +++ /dev/null @@ -1,121 +0,0 @@ -maps.fleetengine.delivery.v1.TimeWindow - */ -class TimeWindow extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The start time of the time window (inclusive). - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $start_time = null; - /** - * Required. The end time of the time window (inclusive). - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $end_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $start_time - * Required. The start time of the time window (inclusive). - * @type \Google\Protobuf\Timestamp $end_time - * Required. The end time of the time window (inclusive). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Fleetengine\Delivery\V1\Common::initOnce(); - parent::__construct($data); - } - - /** - * Required. The start time of the time window (inclusive). - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStartTime() - { - return $this->start_time; - } - - public function hasStartTime() - { - return isset($this->start_time); - } - - public function clearStartTime() - { - unset($this->start_time); - } - - /** - * Required. The start time of the time window (inclusive). - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * Required. The end time of the time window (inclusive). - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * Required. The end time of the time window (inclusive). - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/UpdateDeliveryVehicleRequest.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/UpdateDeliveryVehicleRequest.php deleted file mode 100644 index 0d7c7af0e6f8..000000000000 --- a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/UpdateDeliveryVehicleRequest.php +++ /dev/null @@ -1,201 +0,0 @@ -maps.fleetengine.delivery.v1.UpdateDeliveryVehicleRequest - */ -class UpdateDeliveryVehicleRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The standard Delivery API request header. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $header = null; - /** - * Required. The `DeliveryVehicle` entity update to apply. - * Note: You cannot update the name of the `DeliveryVehicle`. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryVehicle delivery_vehicle = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $delivery_vehicle = null; - /** - * Required. A field mask that indicates which `DeliveryVehicle` fields to - * update. Note that the update_mask must contain at least one field. - * This is a comma-separated list of fully qualified names of fields. Example: - * `"remaining_vehicle_journey_segments"`. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - - /** - * @param \Google\Maps\FleetEngine\Delivery\V1\DeliveryVehicle $deliveryVehicle Required. The `DeliveryVehicle` entity update to apply. - * Note: You cannot update the name of the `DeliveryVehicle`. - * @param \Google\Protobuf\FieldMask $updateMask Required. A field mask that indicates which `DeliveryVehicle` fields to - * update. Note that the update_mask must contain at least one field. - * - * This is a comma-separated list of fully qualified names of fields. Example: - * `"remaining_vehicle_journey_segments"`. - * - * @return \Google\Maps\FleetEngine\Delivery\V1\UpdateDeliveryVehicleRequest - * - * @experimental - */ - public static function build(\Google\Maps\FleetEngine\Delivery\V1\DeliveryVehicle $deliveryVehicle, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setDeliveryVehicle($deliveryVehicle) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Maps\FleetEngine\Delivery\V1\DeliveryRequestHeader $header - * Optional. The standard Delivery API request header. - * @type \Google\Maps\FleetEngine\Delivery\V1\DeliveryVehicle $delivery_vehicle - * Required. The `DeliveryVehicle` entity update to apply. - * Note: You cannot update the name of the `DeliveryVehicle`. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. A field mask that indicates which `DeliveryVehicle` fields to - * update. Note that the update_mask must contain at least one field. - * This is a comma-separated list of fully qualified names of fields. Example: - * `"remaining_vehicle_journey_segments"`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Fleetengine\Delivery\V1\DeliveryApi::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The standard Delivery API request header. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Maps\FleetEngine\Delivery\V1\DeliveryRequestHeader|null - */ - public function getHeader() - { - return $this->header; - } - - public function hasHeader() - { - return isset($this->header); - } - - public function clearHeader() - { - unset($this->header); - } - - /** - * Optional. The standard Delivery API request header. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Maps\FleetEngine\Delivery\V1\DeliveryRequestHeader $var - * @return $this - */ - public function setHeader($var) - { - GPBUtil::checkMessage($var, \Google\Maps\FleetEngine\Delivery\V1\DeliveryRequestHeader::class); - $this->header = $var; - - return $this; - } - - /** - * Required. The `DeliveryVehicle` entity update to apply. - * Note: You cannot update the name of the `DeliveryVehicle`. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryVehicle delivery_vehicle = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Maps\FleetEngine\Delivery\V1\DeliveryVehicle|null - */ - public function getDeliveryVehicle() - { - return $this->delivery_vehicle; - } - - public function hasDeliveryVehicle() - { - return isset($this->delivery_vehicle); - } - - public function clearDeliveryVehicle() - { - unset($this->delivery_vehicle); - } - - /** - * Required. The `DeliveryVehicle` entity update to apply. - * Note: You cannot update the name of the `DeliveryVehicle`. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryVehicle delivery_vehicle = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Maps\FleetEngine\Delivery\V1\DeliveryVehicle $var - * @return $this - */ - public function setDeliveryVehicle($var) - { - GPBUtil::checkMessage($var, \Google\Maps\FleetEngine\Delivery\V1\DeliveryVehicle::class); - $this->delivery_vehicle = $var; - - return $this; - } - - /** - * Required. A field mask that indicates which `DeliveryVehicle` fields to - * update. Note that the update_mask must contain at least one field. - * This is a comma-separated list of fully qualified names of fields. Example: - * `"remaining_vehicle_journey_segments"`. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Required. A field mask that indicates which `DeliveryVehicle` fields to - * update. Note that the update_mask must contain at least one field. - * This is a comma-separated list of fully qualified names of fields. Example: - * `"remaining_vehicle_journey_segments"`. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/UpdateTaskRequest.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/UpdateTaskRequest.php deleted file mode 100644 index 5ec3945df6de..000000000000 --- a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/UpdateTaskRequest.php +++ /dev/null @@ -1,259 +0,0 @@ -maps.fleetengine.delivery.v1.UpdateTaskRequest - */ -class UpdateTaskRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The standard Delivery API request header. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $header = null; - /** - * Required. The Task associated with the update. - * The following fields are maintained by Fleet Engine. Do not update - * them using `Task.update`. - * * `last_location`. - * * `last_location_snappable`. - * * `name`. - * * `remaining_vehicle_journey_segments`. - * * `task_outcome_location_source`. - * Note: You cannot change the value of `task_outcome` once you set it. - * If the Task has been assigned to a delivery vehicle, then don't set the - * Task state to CLOSED using `Task.update`. Instead, remove the `VehicleStop` - * that contains the Task from the delivery vehicle, which automatically sets - * the Task state to CLOSED. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.Task task = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $task = null; - /** - * Required. The field mask that indicates which Task fields to update. - * Note: The `update_mask` must contain at least one field. - * This is a comma-separated list of fully qualified names of fields. Example: - * `"task_outcome,task_outcome_time,task_outcome_location"`. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - - /** - * @param \Google\Maps\FleetEngine\Delivery\V1\Task $task Required. The Task associated with the update. - * The following fields are maintained by Fleet Engine. Do not update - * them using `Task.update`. - * - * * `last_location`. - * * `last_location_snappable`. - * * `name`. - * * `remaining_vehicle_journey_segments`. - * * `task_outcome_location_source`. - * - * Note: You cannot change the value of `task_outcome` once you set it. - * - * If the Task has been assigned to a delivery vehicle, then don't set the - * Task state to CLOSED using `Task.update`. Instead, remove the `VehicleStop` - * that contains the Task from the delivery vehicle, which automatically sets - * the Task state to CLOSED. - * @param \Google\Protobuf\FieldMask $updateMask Required. The field mask that indicates which Task fields to update. - * Note: The `update_mask` must contain at least one field. - * - * This is a comma-separated list of fully qualified names of fields. Example: - * `"task_outcome,task_outcome_time,task_outcome_location"`. - * - * @return \Google\Maps\FleetEngine\Delivery\V1\UpdateTaskRequest - * - * @experimental - */ - public static function build(\Google\Maps\FleetEngine\Delivery\V1\Task $task, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setTask($task) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Maps\FleetEngine\Delivery\V1\DeliveryRequestHeader $header - * Optional. The standard Delivery API request header. - * @type \Google\Maps\FleetEngine\Delivery\V1\Task $task - * Required. The Task associated with the update. - * The following fields are maintained by Fleet Engine. Do not update - * them using `Task.update`. - * * `last_location`. - * * `last_location_snappable`. - * * `name`. - * * `remaining_vehicle_journey_segments`. - * * `task_outcome_location_source`. - * Note: You cannot change the value of `task_outcome` once you set it. - * If the Task has been assigned to a delivery vehicle, then don't set the - * Task state to CLOSED using `Task.update`. Instead, remove the `VehicleStop` - * that contains the Task from the delivery vehicle, which automatically sets - * the Task state to CLOSED. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. The field mask that indicates which Task fields to update. - * Note: The `update_mask` must contain at least one field. - * This is a comma-separated list of fully qualified names of fields. Example: - * `"task_outcome,task_outcome_time,task_outcome_location"`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Fleetengine\Delivery\V1\DeliveryApi::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The standard Delivery API request header. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Maps\FleetEngine\Delivery\V1\DeliveryRequestHeader|null - */ - public function getHeader() - { - return $this->header; - } - - public function hasHeader() - { - return isset($this->header); - } - - public function clearHeader() - { - unset($this->header); - } - - /** - * Optional. The standard Delivery API request header. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.DeliveryRequestHeader header = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Maps\FleetEngine\Delivery\V1\DeliveryRequestHeader $var - * @return $this - */ - public function setHeader($var) - { - GPBUtil::checkMessage($var, \Google\Maps\FleetEngine\Delivery\V1\DeliveryRequestHeader::class); - $this->header = $var; - - return $this; - } - - /** - * Required. The Task associated with the update. - * The following fields are maintained by Fleet Engine. Do not update - * them using `Task.update`. - * * `last_location`. - * * `last_location_snappable`. - * * `name`. - * * `remaining_vehicle_journey_segments`. - * * `task_outcome_location_source`. - * Note: You cannot change the value of `task_outcome` once you set it. - * If the Task has been assigned to a delivery vehicle, then don't set the - * Task state to CLOSED using `Task.update`. Instead, remove the `VehicleStop` - * that contains the Task from the delivery vehicle, which automatically sets - * the Task state to CLOSED. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.Task task = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Maps\FleetEngine\Delivery\V1\Task|null - */ - public function getTask() - { - return $this->task; - } - - public function hasTask() - { - return isset($this->task); - } - - public function clearTask() - { - unset($this->task); - } - - /** - * Required. The Task associated with the update. - * The following fields are maintained by Fleet Engine. Do not update - * them using `Task.update`. - * * `last_location`. - * * `last_location_snappable`. - * * `name`. - * * `remaining_vehicle_journey_segments`. - * * `task_outcome_location_source`. - * Note: You cannot change the value of `task_outcome` once you set it. - * If the Task has been assigned to a delivery vehicle, then don't set the - * Task state to CLOSED using `Task.update`. Instead, remove the `VehicleStop` - * that contains the Task from the delivery vehicle, which automatically sets - * the Task state to CLOSED. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.Task task = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Maps\FleetEngine\Delivery\V1\Task $var - * @return $this - */ - public function setTask($var) - { - GPBUtil::checkMessage($var, \Google\Maps\FleetEngine\Delivery\V1\Task::class); - $this->task = $var; - - return $this; - } - - /** - * Required. The field mask that indicates which Task fields to update. - * Note: The `update_mask` must contain at least one field. - * This is a comma-separated list of fully qualified names of fields. Example: - * `"task_outcome,task_outcome_time,task_outcome_location"`. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Required. The field mask that indicates which Task fields to update. - * Note: The `update_mask` must contain at least one field. - * This is a comma-separated list of fully qualified names of fields. Example: - * `"task_outcome,task_outcome_time,task_outcome_location"`. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/VehicleJourneySegment.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/VehicleJourneySegment.php deleted file mode 100644 index cdef673d39a0..000000000000 --- a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/VehicleJourneySegment.php +++ /dev/null @@ -1,352 +0,0 @@ -maps.fleetengine.delivery.v1.VehicleJourneySegment - */ -class VehicleJourneySegment extends \Google\Protobuf\Internal\Message -{ - /** - * Specifies the stop location, along with the `Task`s associated with - * the stop. Some fields of the VehicleStop might not be present if this - * journey segment is part of `JourneySharingInfo`. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.VehicleStop stop = 1; - */ - protected $stop = null; - /** - * Output only. The travel distance from the previous stop to this stop. - * If the current stop is the first stop in the list of journey - * segments, then the starting point is the vehicle's location recorded - * at the time that this stop was added to the list. This field might not be - * present if this journey segment is part of `JourneySharingInfo`. - * - * Generated from protobuf field .google.protobuf.Int32Value driving_distance_meters = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $driving_distance_meters = null; - /** - * Output only. The travel time from the previous stop to this stop. - * If the current stop is the first stop in the list of journey - * segments, then the starting point is the Vehicle's location recorded - * at the time that this stop was added to the list. - * If this field is defined in the path - * `Task.remaining_vehicle_journey_segments[0].driving_duration` (gRPC) or - * `Task.remainingVehicleJourneySegments[0].drivingDuration` (REST), - * then it may be populated with the value from - * `DeliveryVehicle.remaining_duration` (gRPC) or - * `DeliveryVehicle.remainingDuration` (REST). - * This provides the remaining driving duration from the driver app's latest - * known location rather than the driving time from the previous stop. - * - * Generated from protobuf field .google.protobuf.Duration driving_duration = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $driving_duration = null; - /** - * Output only. The path from the previous stop to this stop. If the current - * stop is the first stop in the list of journey segments, then this is the - * path from the vehicle's current location to this stop at the time that the - * stop was added to the list. This field might not be present if this journey - * segment is part of `JourneySharingInfo`. - * If this field is defined in the path - * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0].path` - * (gRPC) or `Task.journeySharingInfo.remainingVehicleJourneySegments[0].path` - * (REST), then it may be populated with the `LatLng`s decoded from - * `DeliveryVehicle.current_route_segment` (gRPC) or - * `DeliveryVehicle.currentRouteSegment` (REST). This provides the driving - * path from the driver app's latest known location rather than the path from - * the previous stop. - * - * Generated from protobuf field repeated .google.type.LatLng path = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $path; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Maps\FleetEngine\Delivery\V1\VehicleStop $stop - * Specifies the stop location, along with the `Task`s associated with - * the stop. Some fields of the VehicleStop might not be present if this - * journey segment is part of `JourneySharingInfo`. - * @type \Google\Protobuf\Int32Value $driving_distance_meters - * Output only. The travel distance from the previous stop to this stop. - * If the current stop is the first stop in the list of journey - * segments, then the starting point is the vehicle's location recorded - * at the time that this stop was added to the list. This field might not be - * present if this journey segment is part of `JourneySharingInfo`. - * @type \Google\Protobuf\Duration $driving_duration - * Output only. The travel time from the previous stop to this stop. - * If the current stop is the first stop in the list of journey - * segments, then the starting point is the Vehicle's location recorded - * at the time that this stop was added to the list. - * If this field is defined in the path - * `Task.remaining_vehicle_journey_segments[0].driving_duration` (gRPC) or - * `Task.remainingVehicleJourneySegments[0].drivingDuration` (REST), - * then it may be populated with the value from - * `DeliveryVehicle.remaining_duration` (gRPC) or - * `DeliveryVehicle.remainingDuration` (REST). - * This provides the remaining driving duration from the driver app's latest - * known location rather than the driving time from the previous stop. - * @type array<\Google\Type\LatLng>|\Google\Protobuf\Internal\RepeatedField $path - * Output only. The path from the previous stop to this stop. If the current - * stop is the first stop in the list of journey segments, then this is the - * path from the vehicle's current location to this stop at the time that the - * stop was added to the list. This field might not be present if this journey - * segment is part of `JourneySharingInfo`. - * If this field is defined in the path - * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0].path` - * (gRPC) or `Task.journeySharingInfo.remainingVehicleJourneySegments[0].path` - * (REST), then it may be populated with the `LatLng`s decoded from - * `DeliveryVehicle.current_route_segment` (gRPC) or - * `DeliveryVehicle.currentRouteSegment` (REST). This provides the driving - * path from the driver app's latest known location rather than the path from - * the previous stop. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Fleetengine\Delivery\V1\DeliveryVehicles::initOnce(); - parent::__construct($data); - } - - /** - * Specifies the stop location, along with the `Task`s associated with - * the stop. Some fields of the VehicleStop might not be present if this - * journey segment is part of `JourneySharingInfo`. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.VehicleStop stop = 1; - * @return \Google\Maps\FleetEngine\Delivery\V1\VehicleStop|null - */ - public function getStop() - { - return $this->stop; - } - - public function hasStop() - { - return isset($this->stop); - } - - public function clearStop() - { - unset($this->stop); - } - - /** - * Specifies the stop location, along with the `Task`s associated with - * the stop. Some fields of the VehicleStop might not be present if this - * journey segment is part of `JourneySharingInfo`. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.VehicleStop stop = 1; - * @param \Google\Maps\FleetEngine\Delivery\V1\VehicleStop $var - * @return $this - */ - public function setStop($var) - { - GPBUtil::checkMessage($var, \Google\Maps\FleetEngine\Delivery\V1\VehicleStop::class); - $this->stop = $var; - - return $this; - } - - /** - * Output only. The travel distance from the previous stop to this stop. - * If the current stop is the first stop in the list of journey - * segments, then the starting point is the vehicle's location recorded - * at the time that this stop was added to the list. This field might not be - * present if this journey segment is part of `JourneySharingInfo`. - * - * Generated from protobuf field .google.protobuf.Int32Value driving_distance_meters = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Int32Value|null - */ - public function getDrivingDistanceMeters() - { - return $this->driving_distance_meters; - } - - public function hasDrivingDistanceMeters() - { - return isset($this->driving_distance_meters); - } - - public function clearDrivingDistanceMeters() - { - unset($this->driving_distance_meters); - } - - /** - * Returns the unboxed value from getDrivingDistanceMeters() - - * Output only. The travel distance from the previous stop to this stop. - * If the current stop is the first stop in the list of journey - * segments, then the starting point is the vehicle's location recorded - * at the time that this stop was added to the list. This field might not be - * present if this journey segment is part of `JourneySharingInfo`. - * - * Generated from protobuf field .google.protobuf.Int32Value driving_distance_meters = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|null - */ - public function getDrivingDistanceMetersUnwrapped() - { - return $this->readWrapperValue("driving_distance_meters"); - } - - /** - * Output only. The travel distance from the previous stop to this stop. - * If the current stop is the first stop in the list of journey - * segments, then the starting point is the vehicle's location recorded - * at the time that this stop was added to the list. This field might not be - * present if this journey segment is part of `JourneySharingInfo`. - * - * Generated from protobuf field .google.protobuf.Int32Value driving_distance_meters = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Int32Value $var - * @return $this - */ - public function setDrivingDistanceMeters($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class); - $this->driving_distance_meters = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object. - - * Output only. The travel distance from the previous stop to this stop. - * If the current stop is the first stop in the list of journey - * segments, then the starting point is the vehicle's location recorded - * at the time that this stop was added to the list. This field might not be - * present if this journey segment is part of `JourneySharingInfo`. - * - * Generated from protobuf field .google.protobuf.Int32Value driving_distance_meters = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|null $var - * @return $this - */ - public function setDrivingDistanceMetersUnwrapped($var) - { - $this->writeWrapperValue("driving_distance_meters", $var); - return $this;} - - /** - * Output only. The travel time from the previous stop to this stop. - * If the current stop is the first stop in the list of journey - * segments, then the starting point is the Vehicle's location recorded - * at the time that this stop was added to the list. - * If this field is defined in the path - * `Task.remaining_vehicle_journey_segments[0].driving_duration` (gRPC) or - * `Task.remainingVehicleJourneySegments[0].drivingDuration` (REST), - * then it may be populated with the value from - * `DeliveryVehicle.remaining_duration` (gRPC) or - * `DeliveryVehicle.remainingDuration` (REST). - * This provides the remaining driving duration from the driver app's latest - * known location rather than the driving time from the previous stop. - * - * Generated from protobuf field .google.protobuf.Duration driving_duration = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Duration|null - */ - public function getDrivingDuration() - { - return $this->driving_duration; - } - - public function hasDrivingDuration() - { - return isset($this->driving_duration); - } - - public function clearDrivingDuration() - { - unset($this->driving_duration); - } - - /** - * Output only. The travel time from the previous stop to this stop. - * If the current stop is the first stop in the list of journey - * segments, then the starting point is the Vehicle's location recorded - * at the time that this stop was added to the list. - * If this field is defined in the path - * `Task.remaining_vehicle_journey_segments[0].driving_duration` (gRPC) or - * `Task.remainingVehicleJourneySegments[0].drivingDuration` (REST), - * then it may be populated with the value from - * `DeliveryVehicle.remaining_duration` (gRPC) or - * `DeliveryVehicle.remainingDuration` (REST). - * This provides the remaining driving duration from the driver app's latest - * known location rather than the driving time from the previous stop. - * - * Generated from protobuf field .google.protobuf.Duration driving_duration = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setDrivingDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->driving_duration = $var; - - return $this; - } - - /** - * Output only. The path from the previous stop to this stop. If the current - * stop is the first stop in the list of journey segments, then this is the - * path from the vehicle's current location to this stop at the time that the - * stop was added to the list. This field might not be present if this journey - * segment is part of `JourneySharingInfo`. - * If this field is defined in the path - * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0].path` - * (gRPC) or `Task.journeySharingInfo.remainingVehicleJourneySegments[0].path` - * (REST), then it may be populated with the `LatLng`s decoded from - * `DeliveryVehicle.current_route_segment` (gRPC) or - * `DeliveryVehicle.currentRouteSegment` (REST). This provides the driving - * path from the driver app's latest known location rather than the path from - * the previous stop. - * - * Generated from protobuf field repeated .google.type.LatLng path = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPath() - { - return $this->path; - } - - /** - * Output only. The path from the previous stop to this stop. If the current - * stop is the first stop in the list of journey segments, then this is the - * path from the vehicle's current location to this stop at the time that the - * stop was added to the list. This field might not be present if this journey - * segment is part of `JourneySharingInfo`. - * If this field is defined in the path - * `Task.journey_sharing_info.remaining_vehicle_journey_segments[0].path` - * (gRPC) or `Task.journeySharingInfo.remainingVehicleJourneySegments[0].path` - * (REST), then it may be populated with the `LatLng`s decoded from - * `DeliveryVehicle.current_route_segment` (gRPC) or - * `DeliveryVehicle.currentRouteSegment` (REST). This provides the driving - * path from the driver app's latest known location rather than the path from - * the previous stop. - * - * Generated from protobuf field repeated .google.type.LatLng path = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Type\LatLng>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPath($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Type\LatLng::class); - $this->path = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/VehicleStop.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/VehicleStop.php deleted file mode 100644 index febbc0c1605b..000000000000 --- a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/VehicleStop.php +++ /dev/null @@ -1,161 +0,0 @@ -maps.fleetengine.delivery.v1.VehicleStop - */ -class VehicleStop extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The location of the stop. Note that the locations in the `Task`s - * might not exactly match this location, but will be within a short distance - * of it. This field won't be populated in the response of a `GetTask` call. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.LocationInfo planned_location = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $planned_location = null; - /** - * The list of `Task`s to be performed at this stop. This field won't be - * populated in the response of a `GetTask` call. - * - * Generated from protobuf field repeated .maps.fleetengine.delivery.v1.VehicleStop.TaskInfo tasks = 2; - */ - private $tasks; - /** - * The state of the `VehicleStop`. This field won't be populated in the - * response of a `GetTask` call. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.VehicleStop.State state = 3; - */ - protected $state = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Maps\FleetEngine\Delivery\V1\LocationInfo $planned_location - * Required. The location of the stop. Note that the locations in the `Task`s - * might not exactly match this location, but will be within a short distance - * of it. This field won't be populated in the response of a `GetTask` call. - * @type array<\Google\Maps\FleetEngine\Delivery\V1\VehicleStop\TaskInfo>|\Google\Protobuf\Internal\RepeatedField $tasks - * The list of `Task`s to be performed at this stop. This field won't be - * populated in the response of a `GetTask` call. - * @type int $state - * The state of the `VehicleStop`. This field won't be populated in the - * response of a `GetTask` call. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Fleetengine\Delivery\V1\DeliveryVehicles::initOnce(); - parent::__construct($data); - } - - /** - * Required. The location of the stop. Note that the locations in the `Task`s - * might not exactly match this location, but will be within a short distance - * of it. This field won't be populated in the response of a `GetTask` call. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.LocationInfo planned_location = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Maps\FleetEngine\Delivery\V1\LocationInfo|null - */ - public function getPlannedLocation() - { - return $this->planned_location; - } - - public function hasPlannedLocation() - { - return isset($this->planned_location); - } - - public function clearPlannedLocation() - { - unset($this->planned_location); - } - - /** - * Required. The location of the stop. Note that the locations in the `Task`s - * might not exactly match this location, but will be within a short distance - * of it. This field won't be populated in the response of a `GetTask` call. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.LocationInfo planned_location = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Maps\FleetEngine\Delivery\V1\LocationInfo $var - * @return $this - */ - public function setPlannedLocation($var) - { - GPBUtil::checkMessage($var, \Google\Maps\FleetEngine\Delivery\V1\LocationInfo::class); - $this->planned_location = $var; - - return $this; - } - - /** - * The list of `Task`s to be performed at this stop. This field won't be - * populated in the response of a `GetTask` call. - * - * Generated from protobuf field repeated .maps.fleetengine.delivery.v1.VehicleStop.TaskInfo tasks = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTasks() - { - return $this->tasks; - } - - /** - * The list of `Task`s to be performed at this stop. This field won't be - * populated in the response of a `GetTask` call. - * - * Generated from protobuf field repeated .maps.fleetengine.delivery.v1.VehicleStop.TaskInfo tasks = 2; - * @param array<\Google\Maps\FleetEngine\Delivery\V1\VehicleStop\TaskInfo>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTasks($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\FleetEngine\Delivery\V1\VehicleStop\TaskInfo::class); - $this->tasks = $arr; - - return $this; - } - - /** - * The state of the `VehicleStop`. This field won't be populated in the - * response of a `GetTask` call. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.VehicleStop.State state = 3; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * The state of the `VehicleStop`. This field won't be populated in the - * response of a `GetTask` call. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.VehicleStop.State state = 3; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Maps\FleetEngine\Delivery\V1\VehicleStop\State::class); - $this->state = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/VehicleStop/State.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/VehicleStop/State.php deleted file mode 100644 index f212532f517f..000000000000 --- a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/VehicleStop/State.php +++ /dev/null @@ -1,76 +0,0 @@ -maps.fleetengine.delivery.v1.VehicleStop.State - */ -class State -{ - /** - * Unknown. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Created, but not actively routing. - * - * Generated from protobuf enum NEW = 1; - */ - const PBNEW = 1; - /** - * Assigned and actively routing. - * - * Generated from protobuf enum ENROUTE = 2; - */ - const ENROUTE = 2; - /** - * Arrived at stop. Assumes that when the Vehicle is routing to the next - * stop, that all previous stops have been completed. - * - * Generated from protobuf enum ARRIVED = 3; - */ - const ARRIVED = 3; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::PBNEW => 'NEW', - self::ENROUTE => 'ENROUTE', - self::ARRIVED => 'ARRIVED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - $pbconst = __CLASS__. '::PB' . strtoupper($name); - if (!defined($pbconst)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($pbconst); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Maps\FleetEngine\Delivery\V1\VehicleStop_State::class); - diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/VehicleStop/TaskInfo.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/VehicleStop/TaskInfo.php deleted file mode 100644 index 3e6b3a1b19a4..000000000000 --- a/owl-bot-staging/MapsFleetEngineDelivery/v1/proto/src/Google/Maps/FleetEngine/Delivery/V1/VehicleStop/TaskInfo.php +++ /dev/null @@ -1,190 +0,0 @@ -maps.fleetengine.delivery.v1.VehicleStop.TaskInfo - */ -class TaskInfo extends \Google\Protobuf\Internal\Message -{ - /** - * The Task ID. This field won't be populated in the response of a `GetTask` - * call. Task IDs are subject to the following restrictions: - * * Must be a valid Unicode string. - * * Limited to a maximum length of 64 characters. - * * Normalized according to [Unicode Normalization Form C] - * (http://www.unicode.org/reports/tr15/). - * * May not contain any of the following ASCII characters: '/', ':', '?', - * ',', or '#'. - * - * Generated from protobuf field string task_id = 1; - */ - protected $task_id = ''; - /** - * Output only. The time required to perform the Task. - * - * Generated from protobuf field .google.protobuf.Duration task_duration = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $task_duration = null; - /** - * Output only. The time window during which the task should be completed. - * This is only set in the response to `GetDeliveryVehicle`. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.TimeWindow target_time_window = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $target_time_window = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $task_id - * The Task ID. This field won't be populated in the response of a `GetTask` - * call. Task IDs are subject to the following restrictions: - * * Must be a valid Unicode string. - * * Limited to a maximum length of 64 characters. - * * Normalized according to [Unicode Normalization Form C] - * (http://www.unicode.org/reports/tr15/). - * * May not contain any of the following ASCII characters: '/', ':', '?', - * ',', or '#'. - * @type \Google\Protobuf\Duration $task_duration - * Output only. The time required to perform the Task. - * @type \Google\Maps\FleetEngine\Delivery\V1\TimeWindow $target_time_window - * Output only. The time window during which the task should be completed. - * This is only set in the response to `GetDeliveryVehicle`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Fleetengine\Delivery\V1\DeliveryVehicles::initOnce(); - parent::__construct($data); - } - - /** - * The Task ID. This field won't be populated in the response of a `GetTask` - * call. Task IDs are subject to the following restrictions: - * * Must be a valid Unicode string. - * * Limited to a maximum length of 64 characters. - * * Normalized according to [Unicode Normalization Form C] - * (http://www.unicode.org/reports/tr15/). - * * May not contain any of the following ASCII characters: '/', ':', '?', - * ',', or '#'. - * - * Generated from protobuf field string task_id = 1; - * @return string - */ - public function getTaskId() - { - return $this->task_id; - } - - /** - * The Task ID. This field won't be populated in the response of a `GetTask` - * call. Task IDs are subject to the following restrictions: - * * Must be a valid Unicode string. - * * Limited to a maximum length of 64 characters. - * * Normalized according to [Unicode Normalization Form C] - * (http://www.unicode.org/reports/tr15/). - * * May not contain any of the following ASCII characters: '/', ':', '?', - * ',', or '#'. - * - * Generated from protobuf field string task_id = 1; - * @param string $var - * @return $this - */ - public function setTaskId($var) - { - GPBUtil::checkString($var, True); - $this->task_id = $var; - - return $this; - } - - /** - * Output only. The time required to perform the Task. - * - * Generated from protobuf field .google.protobuf.Duration task_duration = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Duration|null - */ - public function getTaskDuration() - { - return $this->task_duration; - } - - public function hasTaskDuration() - { - return isset($this->task_duration); - } - - public function clearTaskDuration() - { - unset($this->task_duration); - } - - /** - * Output only. The time required to perform the Task. - * - * Generated from protobuf field .google.protobuf.Duration task_duration = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setTaskDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->task_duration = $var; - - return $this; - } - - /** - * Output only. The time window during which the task should be completed. - * This is only set in the response to `GetDeliveryVehicle`. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.TimeWindow target_time_window = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Maps\FleetEngine\Delivery\V1\TimeWindow|null - */ - public function getTargetTimeWindow() - { - return $this->target_time_window; - } - - public function hasTargetTimeWindow() - { - return isset($this->target_time_window); - } - - public function clearTargetTimeWindow() - { - unset($this->target_time_window); - } - - /** - * Output only. The time window during which the task should be completed. - * This is only set in the response to `GetDeliveryVehicle`. - * - * Generated from protobuf field .maps.fleetengine.delivery.v1.TimeWindow target_time_window = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Maps\FleetEngine\Delivery\V1\TimeWindow $var - * @return $this - */ - public function setTargetTimeWindow($var) - { - GPBUtil::checkMessage($var, \Google\Maps\FleetEngine\Delivery\V1\TimeWindow::class); - $this->target_time_window = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(TaskInfo::class, \Google\Maps\FleetEngine\Delivery\V1\VehicleStop_TaskInfo::class); - diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/samples/V1/DeliveryServiceClient/batch_create_tasks.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/samples/V1/DeliveryServiceClient/batch_create_tasks.php deleted file mode 100644 index 1c816c55c451..000000000000 --- a/owl-bot-staging/MapsFleetEngineDelivery/v1/samples/V1/DeliveryServiceClient/batch_create_tasks.php +++ /dev/null @@ -1,122 +0,0 @@ -setType($requestsTaskType) - ->setState($requestsTaskState) - ->setTaskDuration($requestsTaskTaskDuration); - $createTaskRequest = (new CreateTaskRequest()) - ->setParent($requestsParent) - ->setTaskId($requestsTaskId) - ->setTask($requestsTask); - $requests = [$createTaskRequest,]; - $request = (new BatchCreateTasksRequest()) - ->setParent($formattedParent) - ->setRequests($requests); - - // Call the API and handle any network failures. - try { - /** @var BatchCreateTasksResponse $response */ - $response = $deliveryServiceClient->batchCreateTasks($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = DeliveryServiceClient::providerName('[PROVIDER]'); - $requestsParent = '[PARENT]'; - $requestsTaskId = '[TASK_ID]'; - $requestsTaskType = Type::TYPE_UNSPECIFIED; - $requestsTaskState = State::STATE_UNSPECIFIED; - - batch_create_tasks_sample( - $formattedParent, - $requestsParent, - $requestsTaskId, - $requestsTaskType, - $requestsTaskState - ); -} -// [END fleetengine_v1_generated_DeliveryService_BatchCreateTasks_sync] diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/samples/V1/DeliveryServiceClient/create_delivery_vehicle.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/samples/V1/DeliveryServiceClient/create_delivery_vehicle.php deleted file mode 100644 index 073a24cbc694..000000000000 --- a/owl-bot-staging/MapsFleetEngineDelivery/v1/samples/V1/DeliveryServiceClient/create_delivery_vehicle.php +++ /dev/null @@ -1,84 +0,0 @@ -setParent($parent) - ->setDeliveryVehicleId($deliveryVehicleId) - ->setDeliveryVehicle($deliveryVehicle); - - // Call the API and handle any network failures. - try { - /** @var DeliveryVehicle $response */ - $response = $deliveryServiceClient->createDeliveryVehicle($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $parent = '[PARENT]'; - $deliveryVehicleId = '[DELIVERY_VEHICLE_ID]'; - - create_delivery_vehicle_sample($parent, $deliveryVehicleId); -} -// [END fleetengine_v1_generated_DeliveryService_CreateDeliveryVehicle_sync] diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/samples/V1/DeliveryServiceClient/create_task.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/samples/V1/DeliveryServiceClient/create_task.php deleted file mode 100644 index 1a5973aa56dd..000000000000 --- a/owl-bot-staging/MapsFleetEngineDelivery/v1/samples/V1/DeliveryServiceClient/create_task.php +++ /dev/null @@ -1,98 +0,0 @@ -setType($taskType) - ->setState($taskState) - ->setTaskDuration($taskTaskDuration); - $request = (new CreateTaskRequest()) - ->setParent($parent) - ->setTaskId($taskId) - ->setTask($task); - - // Call the API and handle any network failures. - try { - /** @var Task $response */ - $response = $deliveryServiceClient->createTask($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $parent = '[PARENT]'; - $taskId = '[TASK_ID]'; - $taskType = Type::TYPE_UNSPECIFIED; - $taskState = State::STATE_UNSPECIFIED; - - create_task_sample($parent, $taskId, $taskType, $taskState); -} -// [END fleetengine_v1_generated_DeliveryService_CreateTask_sync] diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/samples/V1/DeliveryServiceClient/get_delivery_vehicle.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/samples/V1/DeliveryServiceClient/get_delivery_vehicle.php deleted file mode 100644 index 50f56f19dccc..000000000000 --- a/owl-bot-staging/MapsFleetEngineDelivery/v1/samples/V1/DeliveryServiceClient/get_delivery_vehicle.php +++ /dev/null @@ -1,74 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var DeliveryVehicle $response */ - $response = $deliveryServiceClient->getDeliveryVehicle($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = DeliveryServiceClient::deliveryVehicleName('[PROVIDER]', '[VEHICLE]'); - - get_delivery_vehicle_sample($formattedName); -} -// [END fleetengine_v1_generated_DeliveryService_GetDeliveryVehicle_sync] diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/samples/V1/DeliveryServiceClient/get_task.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/samples/V1/DeliveryServiceClient/get_task.php deleted file mode 100644 index c2813462b02b..000000000000 --- a/owl-bot-staging/MapsFleetEngineDelivery/v1/samples/V1/DeliveryServiceClient/get_task.php +++ /dev/null @@ -1,73 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Task $response */ - $response = $deliveryServiceClient->getTask($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = DeliveryServiceClient::taskName('[PROVIDER]', '[TASK]'); - - get_task_sample($formattedName); -} -// [END fleetengine_v1_generated_DeliveryService_GetTask_sync] diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/samples/V1/DeliveryServiceClient/get_task_tracking_info.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/samples/V1/DeliveryServiceClient/get_task_tracking_info.php deleted file mode 100644 index 8535af281902..000000000000 --- a/owl-bot-staging/MapsFleetEngineDelivery/v1/samples/V1/DeliveryServiceClient/get_task_tracking_info.php +++ /dev/null @@ -1,75 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var TaskTrackingInfo $response */ - $response = $deliveryServiceClient->getTaskTrackingInfo($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = DeliveryServiceClient::taskTrackingInfoName('[PROVIDER]', '[TRACKING]'); - - get_task_tracking_info_sample($formattedName); -} -// [END fleetengine_v1_generated_DeliveryService_GetTaskTrackingInfo_sync] diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/samples/V1/DeliveryServiceClient/list_delivery_vehicles.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/samples/V1/DeliveryServiceClient/list_delivery_vehicles.php deleted file mode 100644 index 957671072030..000000000000 --- a/owl-bot-staging/MapsFleetEngineDelivery/v1/samples/V1/DeliveryServiceClient/list_delivery_vehicles.php +++ /dev/null @@ -1,78 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $deliveryServiceClient->listDeliveryVehicles($request); - - /** @var DeliveryVehicle $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = DeliveryServiceClient::providerName('[PROVIDER]'); - - list_delivery_vehicles_sample($formattedParent); -} -// [END fleetengine_v1_generated_DeliveryService_ListDeliveryVehicles_sync] diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/samples/V1/DeliveryServiceClient/list_tasks.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/samples/V1/DeliveryServiceClient/list_tasks.php deleted file mode 100644 index cbdf67b339bf..000000000000 --- a/owl-bot-staging/MapsFleetEngineDelivery/v1/samples/V1/DeliveryServiceClient/list_tasks.php +++ /dev/null @@ -1,78 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $deliveryServiceClient->listTasks($request); - - /** @var Task $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = DeliveryServiceClient::providerName('[PROVIDER]'); - - list_tasks_sample($formattedParent); -} -// [END fleetengine_v1_generated_DeliveryService_ListTasks_sync] diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/samples/V1/DeliveryServiceClient/update_delivery_vehicle.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/samples/V1/DeliveryServiceClient/update_delivery_vehicle.php deleted file mode 100644 index e1c846357a3b..000000000000 --- a/owl-bot-staging/MapsFleetEngineDelivery/v1/samples/V1/DeliveryServiceClient/update_delivery_vehicle.php +++ /dev/null @@ -1,68 +0,0 @@ -setDeliveryVehicle($deliveryVehicle) - ->setUpdateMask($updateMask); - - // Call the API and handle any network failures. - try { - /** @var DeliveryVehicle $response */ - $response = $deliveryServiceClient->updateDeliveryVehicle($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END fleetengine_v1_generated_DeliveryService_UpdateDeliveryVehicle_sync] diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/samples/V1/DeliveryServiceClient/update_task.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/samples/V1/DeliveryServiceClient/update_task.php deleted file mode 100644 index ba858db67368..000000000000 --- a/owl-bot-staging/MapsFleetEngineDelivery/v1/samples/V1/DeliveryServiceClient/update_task.php +++ /dev/null @@ -1,84 +0,0 @@ -setType($taskType) - ->setState($taskState) - ->setTaskDuration($taskTaskDuration); - $updateMask = new FieldMask(); - $request = (new UpdateTaskRequest()) - ->setTask($task) - ->setUpdateMask($updateMask); - - // Call the API and handle any network failures. - try { - /** @var Task $response */ - $response = $deliveryServiceClient->updateTask($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $taskType = Type::TYPE_UNSPECIFIED; - $taskState = State::STATE_UNSPECIFIED; - - update_task_sample($taskType, $taskState); -} -// [END fleetengine_v1_generated_DeliveryService_UpdateTask_sync] diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/src/V1/Client/DeliveryServiceClient.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/src/V1/Client/DeliveryServiceClient.php deleted file mode 100644 index 656f0f8a45b8..000000000000 --- a/owl-bot-staging/MapsFleetEngineDelivery/v1/src/V1/Client/DeliveryServiceClient.php +++ /dev/null @@ -1,557 +0,0 @@ - batchCreateTasksAsync(BatchCreateTasksRequest $request, array $optionalArgs = []) - * @method PromiseInterface createDeliveryVehicleAsync(CreateDeliveryVehicleRequest $request, array $optionalArgs = []) - * @method PromiseInterface createTaskAsync(CreateTaskRequest $request, array $optionalArgs = []) - * @method PromiseInterface getDeliveryVehicleAsync(GetDeliveryVehicleRequest $request, array $optionalArgs = []) - * @method PromiseInterface getTaskAsync(GetTaskRequest $request, array $optionalArgs = []) - * @method PromiseInterface getTaskTrackingInfoAsync(GetTaskTrackingInfoRequest $request, array $optionalArgs = []) - * @method PromiseInterface listDeliveryVehiclesAsync(ListDeliveryVehiclesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listTasksAsync(ListTasksRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateDeliveryVehicleAsync(UpdateDeliveryVehicleRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateTaskAsync(UpdateTaskRequest $request, array $optionalArgs = []) - */ -final class DeliveryServiceClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'maps.fleetengine.delivery.v1.DeliveryService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'fleetengine.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'fleetengine.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/delivery_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/delivery_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/delivery_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/delivery_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a - * delivery_vehicle resource. - * - * @param string $provider - * @param string $vehicle - * - * @return string The formatted delivery_vehicle resource. - */ - public static function deliveryVehicleName(string $provider, string $vehicle): string - { - return self::getPathTemplate('deliveryVehicle')->render([ - 'provider' => $provider, - 'vehicle' => $vehicle, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a provider - * resource. - * - * @param string $provider - * - * @return string The formatted provider resource. - */ - public static function providerName(string $provider): string - { - return self::getPathTemplate('provider')->render([ - 'provider' => $provider, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a task - * resource. - * - * @param string $provider - * @param string $task - * - * @return string The formatted task resource. - */ - public static function taskName(string $provider, string $task): string - { - return self::getPathTemplate('task')->render([ - 'provider' => $provider, - 'task' => $task, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * task_tracking_info resource. - * - * @param string $provider - * @param string $tracking - * - * @return string The formatted task_tracking_info resource. - */ - public static function taskTrackingInfoName(string $provider, string $tracking): string - { - return self::getPathTemplate('taskTrackingInfo')->render([ - 'provider' => $provider, - 'tracking' => $tracking, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - deliveryVehicle: providers/{provider}/deliveryVehicles/{vehicle} - * - provider: providers/{provider} - * - task: providers/{provider}/tasks/{task} - * - taskTrackingInfo: providers/{provider}/taskTrackingInfo/{tracking} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param ?string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, ?string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'fleetengine.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Creates and returns a batch of new `Task` objects. - * - * The async variant is {@see DeliveryServiceClient::batchCreateTasksAsync()} . - * - * @example samples/V1/DeliveryServiceClient/batch_create_tasks.php - * - * @param BatchCreateTasksRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return BatchCreateTasksResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function batchCreateTasks(BatchCreateTasksRequest $request, array $callOptions = []): BatchCreateTasksResponse - { - return $this->startApiCall('BatchCreateTasks', $request, $callOptions)->wait(); - } - - /** - * Creates and returns a new `DeliveryVehicle`. - * - * The async variant is {@see DeliveryServiceClient::createDeliveryVehicleAsync()} - * . - * - * @example samples/V1/DeliveryServiceClient/create_delivery_vehicle.php - * - * @param CreateDeliveryVehicleRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return DeliveryVehicle - * - * @throws ApiException Thrown if the API call fails. - */ - public function createDeliveryVehicle(CreateDeliveryVehicleRequest $request, array $callOptions = []): DeliveryVehicle - { - return $this->startApiCall('CreateDeliveryVehicle', $request, $callOptions)->wait(); - } - - /** - * Creates and returns a new `Task` object. - * - * The async variant is {@see DeliveryServiceClient::createTaskAsync()} . - * - * @example samples/V1/DeliveryServiceClient/create_task.php - * - * @param CreateTaskRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Task - * - * @throws ApiException Thrown if the API call fails. - */ - public function createTask(CreateTaskRequest $request, array $callOptions = []): Task - { - return $this->startApiCall('CreateTask', $request, $callOptions)->wait(); - } - - /** - * Returns the specified `DeliveryVehicle` instance. - * - * The async variant is {@see DeliveryServiceClient::getDeliveryVehicleAsync()} . - * - * @example samples/V1/DeliveryServiceClient/get_delivery_vehicle.php - * - * @param GetDeliveryVehicleRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return DeliveryVehicle - * - * @throws ApiException Thrown if the API call fails. - */ - public function getDeliveryVehicle(GetDeliveryVehicleRequest $request, array $callOptions = []): DeliveryVehicle - { - return $this->startApiCall('GetDeliveryVehicle', $request, $callOptions)->wait(); - } - - /** - * Gets information about a `Task`. - * - * The async variant is {@see DeliveryServiceClient::getTaskAsync()} . - * - * @example samples/V1/DeliveryServiceClient/get_task.php - * - * @param GetTaskRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Task - * - * @throws ApiException Thrown if the API call fails. - */ - public function getTask(GetTaskRequest $request, array $callOptions = []): Task - { - return $this->startApiCall('GetTask', $request, $callOptions)->wait(); - } - - /** - * Returns the specified `TaskTrackingInfo` instance. - * - * The async variant is {@see DeliveryServiceClient::getTaskTrackingInfoAsync()} . - * - * @example samples/V1/DeliveryServiceClient/get_task_tracking_info.php - * - * @param GetTaskTrackingInfoRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return TaskTrackingInfo - * - * @throws ApiException Thrown if the API call fails. - */ - public function getTaskTrackingInfo(GetTaskTrackingInfoRequest $request, array $callOptions = []): TaskTrackingInfo - { - return $this->startApiCall('GetTaskTrackingInfo', $request, $callOptions)->wait(); - } - - /** - * Gets all `DeliveryVehicle`s that meet the specified filtering criteria. - * - * The async variant is {@see DeliveryServiceClient::listDeliveryVehiclesAsync()} . - * - * @example samples/V1/DeliveryServiceClient/list_delivery_vehicles.php - * - * @param ListDeliveryVehiclesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listDeliveryVehicles(ListDeliveryVehiclesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListDeliveryVehicles', $request, $callOptions); - } - - /** - * Gets all `Task`s that meet the specified filtering criteria. - * - * The async variant is {@see DeliveryServiceClient::listTasksAsync()} . - * - * @example samples/V1/DeliveryServiceClient/list_tasks.php - * - * @param ListTasksRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listTasks(ListTasksRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListTasks', $request, $callOptions); - } - - /** - * Writes updated `DeliveryVehicle` data to Fleet Engine, and assigns - * `Tasks` to the `DeliveryVehicle`. You cannot update the name of the - * `DeliveryVehicle`. You *can* update `remaining_vehicle_journey_segments`, - * but it must contain all of the `VehicleJourneySegment`s to be persisted on - * the `DeliveryVehicle`. The `task_id`s are retrieved from - * `remaining_vehicle_journey_segments`, and their corresponding `Tasks` are - * assigned to the `DeliveryVehicle` if they have not yet been assigned. - * - * The async variant is {@see DeliveryServiceClient::updateDeliveryVehicleAsync()} - * . - * - * @example samples/V1/DeliveryServiceClient/update_delivery_vehicle.php - * - * @param UpdateDeliveryVehicleRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return DeliveryVehicle - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateDeliveryVehicle(UpdateDeliveryVehicleRequest $request, array $callOptions = []): DeliveryVehicle - { - return $this->startApiCall('UpdateDeliveryVehicle', $request, $callOptions)->wait(); - } - - /** - * Updates `Task` data. - * - * The async variant is {@see DeliveryServiceClient::updateTaskAsync()} . - * - * @example samples/V1/DeliveryServiceClient/update_task.php - * - * @param UpdateTaskRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Task - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateTask(UpdateTaskRequest $request, array $callOptions = []): Task - { - return $this->startApiCall('UpdateTask', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/src/V1/gapic_metadata.json b/owl-bot-staging/MapsFleetEngineDelivery/v1/src/V1/gapic_metadata.json deleted file mode 100644 index bb2fff435e22..000000000000 --- a/owl-bot-staging/MapsFleetEngineDelivery/v1/src/V1/gapic_metadata.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "maps.fleetengine.delivery.v1", - "libraryPackage": "Google\\Maps\\FleetEngine\\Delivery\\V1", - "services": { - "DeliveryService": { - "clients": { - "grpc": { - "libraryClient": "DeliveryServiceGapicClient", - "rpcs": { - "BatchCreateTasks": { - "methods": [ - "batchCreateTasks" - ] - }, - "CreateDeliveryVehicle": { - "methods": [ - "createDeliveryVehicle" - ] - }, - "CreateTask": { - "methods": [ - "createTask" - ] - }, - "GetDeliveryVehicle": { - "methods": [ - "getDeliveryVehicle" - ] - }, - "GetTask": { - "methods": [ - "getTask" - ] - }, - "GetTaskTrackingInfo": { - "methods": [ - "getTaskTrackingInfo" - ] - }, - "ListDeliveryVehicles": { - "methods": [ - "listDeliveryVehicles" - ] - }, - "ListTasks": { - "methods": [ - "listTasks" - ] - }, - "UpdateDeliveryVehicle": { - "methods": [ - "updateDeliveryVehicle" - ] - }, - "UpdateTask": { - "methods": [ - "updateTask" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/src/V1/resources/delivery_service_client_config.json b/owl-bot-staging/MapsFleetEngineDelivery/v1/src/V1/resources/delivery_service_client_config.json deleted file mode 100644 index ec4118ccb923..000000000000 --- a/owl-bot-staging/MapsFleetEngineDelivery/v1/src/V1/resources/delivery_service_client_config.json +++ /dev/null @@ -1,84 +0,0 @@ -{ - "interfaces": { - "maps.fleetengine.delivery.v1.DeliveryService": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE" - ] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "retry_policy_1_params": { - "initial_retry_delay_millis": 1000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 10000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": { - "BatchCreateTasks": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "CreateDeliveryVehicle": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "CreateTask": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetDeliveryVehicle": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetTask": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetTaskTrackingInfo": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListDeliveryVehicles": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListTasks": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateDeliveryVehicle": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateTask": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/src/V1/resources/delivery_service_descriptor_config.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/src/V1/resources/delivery_service_descriptor_config.php deleted file mode 100644 index 165315e83862..000000000000 --- a/owl-bot-staging/MapsFleetEngineDelivery/v1/src/V1/resources/delivery_service_descriptor_config.php +++ /dev/null @@ -1,202 +0,0 @@ - [ - 'maps.fleetengine.delivery.v1.DeliveryService' => [ - 'BatchCreateTasks' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Maps\FleetEngine\Delivery\V1\BatchCreateTasksResponse', - 'headerParams' => [ - [ - 'keyName' => 'provider_id', - 'fieldAccessors' => [ - 'getParent', - ], - 'matchers' => [ - '/^(?providers\/[^\/]+)$/', - ], - ], - ], - ], - 'CreateDeliveryVehicle' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Maps\FleetEngine\Delivery\V1\DeliveryVehicle', - 'headerParams' => [ - [ - 'keyName' => 'provider_id', - 'fieldAccessors' => [ - 'getParent', - ], - 'matchers' => [ - '/^(?providers\/[^\/]+)$/', - ], - ], - ], - ], - 'CreateTask' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Maps\FleetEngine\Delivery\V1\Task', - 'headerParams' => [ - [ - 'keyName' => 'provider_id', - 'fieldAccessors' => [ - 'getParent', - ], - 'matchers' => [ - '/^(?providers\/[^\/]+)$/', - ], - ], - ], - ], - 'GetDeliveryVehicle' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Maps\FleetEngine\Delivery\V1\DeliveryVehicle', - 'headerParams' => [ - [ - 'keyName' => 'provider_id', - 'fieldAccessors' => [ - 'getName', - ], - 'matchers' => [ - '/^(?providers\/[^\/]+)$/', - ], - ], - ], - ], - 'GetTask' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Maps\FleetEngine\Delivery\V1\Task', - 'headerParams' => [ - [ - 'keyName' => 'provider_id', - 'fieldAccessors' => [ - 'getName', - ], - 'matchers' => [ - '/^(?providers\/[^\/]+)$/', - ], - ], - ], - ], - 'GetTaskTrackingInfo' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Maps\FleetEngine\Delivery\V1\TaskTrackingInfo', - 'headerParams' => [ - [ - 'keyName' => 'provider_id', - 'fieldAccessors' => [ - 'getName', - ], - 'matchers' => [ - '/^(?providers\/[^\/]+)$/', - ], - ], - ], - ], - 'ListDeliveryVehicles' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getDeliveryVehicles', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Maps\FleetEngine\Delivery\V1\ListDeliveryVehiclesResponse', - 'headerParams' => [ - [ - 'keyName' => 'provider_id', - 'fieldAccessors' => [ - 'getParent', - ], - 'matchers' => [ - '/^(?providers\/[^\/]+)$/', - ], - ], - ], - ], - 'ListTasks' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getTasks', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Maps\FleetEngine\Delivery\V1\ListTasksResponse', - 'headerParams' => [ - [ - 'keyName' => 'provider_id', - 'fieldAccessors' => [ - 'getParent', - ], - 'matchers' => [ - '/^(?providers\/[^\/]+)$/', - ], - ], - ], - ], - 'UpdateDeliveryVehicle' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Maps\FleetEngine\Delivery\V1\DeliveryVehicle', - 'headerParams' => [ - [ - 'keyName' => 'provider_id', - 'fieldAccessors' => [ - 'getDeliveryVehicle', - 'getName', - ], - 'matchers' => [ - '/^(?providers\/[^\/]+)$/', - ], - ], - ], - ], - 'UpdateTask' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Maps\FleetEngine\Delivery\V1\Task', - 'headerParams' => [ - [ - 'keyName' => 'provider_id', - 'fieldAccessors' => [ - 'getTask', - 'getName', - ], - 'matchers' => [ - '/^(?providers\/[^\/]+)$/', - ], - ], - ], - ], - 'templateMap' => [ - 'deliveryVehicle' => 'providers/{provider}/deliveryVehicles/{vehicle}', - 'provider' => 'providers/{provider}', - 'task' => 'providers/{provider}/tasks/{task}', - 'taskTrackingInfo' => 'providers/{provider}/taskTrackingInfo/{tracking}', - ], - ], - ], -]; diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/src/V1/resources/delivery_service_rest_client_config.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/src/V1/resources/delivery_service_rest_client_config.php deleted file mode 100644 index 66575bc17381..000000000000 --- a/owl-bot-staging/MapsFleetEngineDelivery/v1/src/V1/resources/delivery_service_rest_client_config.php +++ /dev/null @@ -1,158 +0,0 @@ - [ - 'maps.fleetengine.delivery.v1.DeliveryService' => [ - 'BatchCreateTasks' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=providers/*}/tasks:batchCreate', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CreateDeliveryVehicle' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=providers/*}/deliveryVehicles', - 'body' => 'delivery_vehicle', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'delivery_vehicle_id', - ], - ], - 'CreateTask' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=providers/*}/tasks', - 'body' => 'task', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'task_id', - ], - ], - 'GetDeliveryVehicle' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=providers/*/deliveryVehicles/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetTask' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=providers/*/tasks/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetTaskTrackingInfo' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=providers/*/taskTrackingInfo/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListDeliveryVehicles' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=providers/*}/deliveryVehicles', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListTasks' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=providers/*}/tasks', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateDeliveryVehicle' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{delivery_vehicle.name=providers/*/deliveryVehicles/*}', - 'body' => 'delivery_vehicle', - 'placeholders' => [ - 'delivery_vehicle.name' => [ - 'getters' => [ - 'getDeliveryVehicle', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdateTask' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{task.name=providers/*/tasks/*}', - 'body' => 'task', - 'placeholders' => [ - 'task.name' => [ - 'getters' => [ - 'getTask', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/MapsFleetEngineDelivery/v1/tests/Unit/V1/Client/DeliveryServiceClientTest.php b/owl-bot-staging/MapsFleetEngineDelivery/v1/tests/Unit/V1/Client/DeliveryServiceClientTest.php deleted file mode 100644 index 0e341373cb40..000000000000 --- a/owl-bot-staging/MapsFleetEngineDelivery/v1/tests/Unit/V1/Client/DeliveryServiceClientTest.php +++ /dev/null @@ -1,855 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return DeliveryServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new DeliveryServiceClient($options); - } - - /** @test */ - public function batchCreateTasksTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new BatchCreateTasksResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->providerName('[PROVIDER]'); - $requests = []; - $request = (new BatchCreateTasksRequest()) - ->setParent($formattedParent) - ->setRequests($requests); - $response = $gapicClient->batchCreateTasks($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/maps.fleetengine.delivery.v1.DeliveryService/BatchCreateTasks', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getRequests(); - $this->assertProtobufEquals($requests, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function batchCreateTasksExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->providerName('[PROVIDER]'); - $requests = []; - $request = (new BatchCreateTasksRequest()) - ->setParent($formattedParent) - ->setRequests($requests); - try { - $gapicClient->batchCreateTasks($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createDeliveryVehicleTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $currentRouteSegment = '-9'; - $expectedResponse = new DeliveryVehicle(); - $expectedResponse->setName($name); - $expectedResponse->setCurrentRouteSegment($currentRouteSegment); - $transport->addResponse($expectedResponse); - // Mock request - $parent = 'parent-995424086'; - $deliveryVehicleId = 'deliveryVehicleId-1069581255'; - $deliveryVehicle = new DeliveryVehicle(); - $request = (new CreateDeliveryVehicleRequest()) - ->setParent($parent) - ->setDeliveryVehicleId($deliveryVehicleId) - ->setDeliveryVehicle($deliveryVehicle); - $response = $gapicClient->createDeliveryVehicle($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/maps.fleetengine.delivery.v1.DeliveryService/CreateDeliveryVehicle', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); - $actualValue = $actualRequestObject->getDeliveryVehicleId(); - $this->assertProtobufEquals($deliveryVehicleId, $actualValue); - $actualValue = $actualRequestObject->getDeliveryVehicle(); - $this->assertProtobufEquals($deliveryVehicle, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createDeliveryVehicleExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $parent = 'parent-995424086'; - $deliveryVehicleId = 'deliveryVehicleId-1069581255'; - $deliveryVehicle = new DeliveryVehicle(); - $request = (new CreateDeliveryVehicleRequest()) - ->setParent($parent) - ->setDeliveryVehicleId($deliveryVehicleId) - ->setDeliveryVehicle($deliveryVehicle); - try { - $gapicClient->createDeliveryVehicle($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createTaskTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $trackingId = 'trackingId1878901667'; - $deliveryVehicleId = 'deliveryVehicleId-1069581255'; - $expectedResponse = new Task(); - $expectedResponse->setName($name); - $expectedResponse->setTrackingId($trackingId); - $expectedResponse->setDeliveryVehicleId($deliveryVehicleId); - $transport->addResponse($expectedResponse); - // Mock request - $parent = 'parent-995424086'; - $taskId = 'taskId-1537240555'; - $task = new Task(); - $taskType = Type::TYPE_UNSPECIFIED; - $task->setType($taskType); - $taskState = State::STATE_UNSPECIFIED; - $task->setState($taskState); - $taskTaskDuration = new Duration(); - $task->setTaskDuration($taskTaskDuration); - $request = (new CreateTaskRequest()) - ->setParent($parent) - ->setTaskId($taskId) - ->setTask($task); - $response = $gapicClient->createTask($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/maps.fleetengine.delivery.v1.DeliveryService/CreateTask', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); - $actualValue = $actualRequestObject->getTaskId(); - $this->assertProtobufEquals($taskId, $actualValue); - $actualValue = $actualRequestObject->getTask(); - $this->assertProtobufEquals($task, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createTaskExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $parent = 'parent-995424086'; - $taskId = 'taskId-1537240555'; - $task = new Task(); - $taskType = Type::TYPE_UNSPECIFIED; - $task->setType($taskType); - $taskState = State::STATE_UNSPECIFIED; - $task->setState($taskState); - $taskTaskDuration = new Duration(); - $task->setTaskDuration($taskTaskDuration); - $request = (new CreateTaskRequest()) - ->setParent($parent) - ->setTaskId($taskId) - ->setTask($task); - try { - $gapicClient->createTask($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDeliveryVehicleTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $currentRouteSegment = '-9'; - $expectedResponse = new DeliveryVehicle(); - $expectedResponse->setName($name2); - $expectedResponse->setCurrentRouteSegment($currentRouteSegment); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->deliveryVehicleName('[PROVIDER]', '[VEHICLE]'); - $request = (new GetDeliveryVehicleRequest()) - ->setName($formattedName); - $response = $gapicClient->getDeliveryVehicle($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/maps.fleetengine.delivery.v1.DeliveryService/GetDeliveryVehicle', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDeliveryVehicleExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->deliveryVehicleName('[PROVIDER]', '[VEHICLE]'); - $request = (new GetDeliveryVehicleRequest()) - ->setName($formattedName); - try { - $gapicClient->getDeliveryVehicle($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getTaskTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $trackingId = 'trackingId1878901667'; - $deliveryVehicleId = 'deliveryVehicleId-1069581255'; - $expectedResponse = new Task(); - $expectedResponse->setName($name2); - $expectedResponse->setTrackingId($trackingId); - $expectedResponse->setDeliveryVehicleId($deliveryVehicleId); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->taskName('[PROVIDER]', '[TASK]'); - $request = (new GetTaskRequest()) - ->setName($formattedName); - $response = $gapicClient->getTask($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/maps.fleetengine.delivery.v1.DeliveryService/GetTask', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getTaskExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->taskName('[PROVIDER]', '[TASK]'); - $request = (new GetTaskRequest()) - ->setName($formattedName); - try { - $gapicClient->getTask($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getTaskTrackingInfoTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $trackingId = 'trackingId1878901667'; - $expectedResponse = new TaskTrackingInfo(); - $expectedResponse->setName($name2); - $expectedResponse->setTrackingId($trackingId); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->taskTrackingInfoName('[PROVIDER]', '[TRACKING]'); - $request = (new GetTaskTrackingInfoRequest()) - ->setName($formattedName); - $response = $gapicClient->getTaskTrackingInfo($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/maps.fleetengine.delivery.v1.DeliveryService/GetTaskTrackingInfo', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getTaskTrackingInfoExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->taskTrackingInfoName('[PROVIDER]', '[TRACKING]'); - $request = (new GetTaskTrackingInfoRequest()) - ->setName($formattedName); - try { - $gapicClient->getTaskTrackingInfo($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDeliveryVehiclesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $totalSize = 705419236; - $deliveryVehiclesElement = new DeliveryVehicle(); - $deliveryVehicles = [ - $deliveryVehiclesElement, - ]; - $expectedResponse = new ListDeliveryVehiclesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setTotalSize($totalSize); - $expectedResponse->setDeliveryVehicles($deliveryVehicles); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->providerName('[PROVIDER]'); - $request = (new ListDeliveryVehiclesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listDeliveryVehicles($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getDeliveryVehicles()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/maps.fleetengine.delivery.v1.DeliveryService/ListDeliveryVehicles', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDeliveryVehiclesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->providerName('[PROVIDER]'); - $request = (new ListDeliveryVehiclesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listDeliveryVehicles($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listTasksTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $totalSize = 705419236; - $tasksElement = new Task(); - $tasks = [ - $tasksElement, - ]; - $expectedResponse = new ListTasksResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setTotalSize($totalSize); - $expectedResponse->setTasks($tasks); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->providerName('[PROVIDER]'); - $request = (new ListTasksRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listTasks($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getTasks()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/maps.fleetengine.delivery.v1.DeliveryService/ListTasks', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listTasksExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->providerName('[PROVIDER]'); - $request = (new ListTasksRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listTasks($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateDeliveryVehicleTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $currentRouteSegment = '-9'; - $expectedResponse = new DeliveryVehicle(); - $expectedResponse->setName($name); - $expectedResponse->setCurrentRouteSegment($currentRouteSegment); - $transport->addResponse($expectedResponse); - // Mock request - $deliveryVehicle = new DeliveryVehicle(); - $updateMask = new FieldMask(); - $request = (new UpdateDeliveryVehicleRequest()) - ->setDeliveryVehicle($deliveryVehicle) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateDeliveryVehicle($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/maps.fleetengine.delivery.v1.DeliveryService/UpdateDeliveryVehicle', $actualFuncCall); - $actualValue = $actualRequestObject->getDeliveryVehicle(); - $this->assertProtobufEquals($deliveryVehicle, $actualValue); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateDeliveryVehicleExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $deliveryVehicle = new DeliveryVehicle(); - $updateMask = new FieldMask(); - $request = (new UpdateDeliveryVehicleRequest()) - ->setDeliveryVehicle($deliveryVehicle) - ->setUpdateMask($updateMask); - try { - $gapicClient->updateDeliveryVehicle($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateTaskTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $trackingId = 'trackingId1878901667'; - $deliveryVehicleId = 'deliveryVehicleId-1069581255'; - $expectedResponse = new Task(); - $expectedResponse->setName($name); - $expectedResponse->setTrackingId($trackingId); - $expectedResponse->setDeliveryVehicleId($deliveryVehicleId); - $transport->addResponse($expectedResponse); - // Mock request - $task = new Task(); - $taskType = Type::TYPE_UNSPECIFIED; - $task->setType($taskType); - $taskState = State::STATE_UNSPECIFIED; - $task->setState($taskState); - $taskTaskDuration = new Duration(); - $task->setTaskDuration($taskTaskDuration); - $updateMask = new FieldMask(); - $request = (new UpdateTaskRequest()) - ->setTask($task) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateTask($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/maps.fleetengine.delivery.v1.DeliveryService/UpdateTask', $actualFuncCall); - $actualValue = $actualRequestObject->getTask(); - $this->assertProtobufEquals($task, $actualValue); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateTaskExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $task = new Task(); - $taskType = Type::TYPE_UNSPECIFIED; - $task->setType($taskType); - $taskState = State::STATE_UNSPECIFIED; - $task->setState($taskState); - $taskTaskDuration = new Duration(); - $task->setTaskDuration($taskTaskDuration); - $updateMask = new FieldMask(); - $request = (new UpdateTaskRequest()) - ->setTask($task) - ->setUpdateMask($updateMask); - try { - $gapicClient->updateTask($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function batchCreateTasksAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new BatchCreateTasksResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->providerName('[PROVIDER]'); - $requests = []; - $request = (new BatchCreateTasksRequest()) - ->setParent($formattedParent) - ->setRequests($requests); - $response = $gapicClient->batchCreateTasksAsync($request)->wait(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/maps.fleetengine.delivery.v1.DeliveryService/BatchCreateTasks', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getRequests(); - $this->assertProtobufEquals($requests, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/GPBMetadata/Google/Maps/Routeoptimization/V1/RouteOptimizationService.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/GPBMetadata/Google/Maps/Routeoptimization/V1/RouteOptimizationService.php deleted file mode 100644 index debefc2ef34e4d83c84bc87abc669dd3c1aa4075..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 17393 zcmcg!+ix3JdJm}^`BB%AFEo7#O~)JCNvKGf|6I(FU2Bo8g?uxYFu>uqPnwmPn1wO#Yr{9JcU ztF>~n${%X}rDnE`zj`uh8*ayLz0dYd1itY8+8@BiY}?$= zwptc(!D=~~O!rJ(5@$_ZZ<Q%S(`Ytw#*uzvTK4!;i&pEu|r+CgD8a zcD-B3clg}#m-ePsO_WDhKW>jdw|d$(_KUjPY#k1s#H8ho4^1H(*+#o#{U9OrNYKE{jFw{;t(HXcfb?nHAFzsZJ`BbYn38b(vATdf20(20kW6L(^3#WY{! zY&NCOTqvD&PFwXYqPotAvXv759)iW*H_8>5ZJ18Gsh?_O^13?{2n70hWWHMr&x_DG^~IIgXusftIK?0hi#1O>4@qFjfIbSkr9 z*todf(C~Z*2WCAUW3LmSw5@gr&5NP6t>$UdY#B~`mc6?T*S&W*3yCnkcZbcfVedj( zZ#J!GxUPL@;7RocQNcf)wuxlfj_nSj6uLCic^aQ*^KQVUj$>$t2Fj0P)-^N`u8vT{ zi7&AC`>#U6dwFaivT!ssvIwE@K#lk!4hn6)^e3T^l7frJ`g83Bfeqp(TE?(#%XZ>Z zIA&@yL}TV)it#1BgwLX>ClJF6BTZmpwghu|btAi5tZJ1~aZg=*Nx?^Z*xGSin#VO3AXZkZyX9?dBU`EB3O69JUfQngBK2&ssAc!Eg<_T#s1~-= z#c=LAT0oaI>HD!XmH5utd7>I3ZE*?m+}Ob23;>v`*1Y1z{&SKF;PiMlpUBsPTFSOiIdri zt$lP(f@KtRatmqn07NG7Zxb*h{#JG&t{)!S#v#QTT>Uk<9Qo(i+FPTS%X$liOTzMnM{Xoy3s-tLz7AOhEIM1Q+3O6$x_ihek|8H+nWXMv6t=X zbt0y=T>Df}09*w81a};lU27=uI)HCP3?`l$ryPioaX{(n7>s41O!&P}>R$lnr1X)A zXe#$1+7)E3EB8ikS<*mOMFfi___{lK_8z}9B?-%<*E$AeCx*N#QYW%+%m%&#ONULX zhDY{Y;OIMe3l_vQ@8Y-;47+u73}TYRw2aTpIv*hvMW2keS@|9$y!X<$qj@47K_eew zm%cHY2a<#A7CbDJ7v5rv=sj2N!p$?*dagNkU2}EByySJGLx(m{lG#ua$tWuCMW5r- zU0kY$alV7jlO*=t(VMS&elzRMRu150DM=ckdvuYMZ9vymGn?pSnFpo??vGwTa)-jO zLV(Pv@*PM7*C9J?+6DnaCqBo{@cZXmf`SY|0ny|l0+G7WFwkpjcBhH^o@YeIFv)V? z{8o27I%Oo2_*DolNzmJK(T`!$ww^htxMSLk;6j6`rpwkdj8T?)Y@mL~3_>)q4ihxu zb%;tKlN%TU*5_dw4Lzb3Brwl7TV6PRrhOl}zDSEWF|e~!HsaeAK5=FSK&tZiUc%su7qi0(rm*O%ck!_Gec zjGSinaSDZIiiDE+NM>7wc%nZ;c~Wk|mA+SWEo?SLMN`TJUSokq&$K8WCbo9A3@P8nD1zN{U=IWl#KIJ(45feoGhoJ8 z=o0NBdWu$}3aXoV*s^Q`4I9dP;(sS$HXtT%z@l#3COUepY1LVrz%(wlwk&U#jB&cC zyT#U_lJ5?Grk}Pg3JQ5{VhpeUNX$@HKxr75j=_W_o>wl*!}o#9Zulp73zNvi*3Pr= zEKD*-Mq(6Iaxlv{{tV@VtS3oOZ0&V^C&I*Wj);K=%gff9mhTa8T=Z=ATL=w!@Wi^Dl=w)OU* z{Na&#c!YM-5oigW2Y-$=J)7_WM?>h7`D3zemd&70gc8`H)GwD|M#f#e&?QNxL@7WF z!-5mcrXQnZGAA;>_V(x-5meI{6yRiHK9X8s*%zY3k0+eWo1@9~u;n$F=b_&?ZYC!O ze+3tF7iKAF^p@k%=0LCZZ9ddnjK`Sg@n;y(i@=s5If6G)Wf3AQYNaO>P7EZC1{`(DnuRfr9Ln552=mCx(nz9Wu+jvAK9T7hquL|6_L+MV(%k{$P){7df+r!u zcm`sPTrk!cqXf_=cr4!dF5DVNZv$)J39fxMQ&}E-9iZBUD_G5{ma}_maS$Yo!A!nf z*eh&5Ks1g2d6X?ar2m9dHCX8NO^7gew~M809!F?9rD9?INl$U?A}kfLDn@{Oqfo{_ zO1o4dy95gVZ{T@2cNMNsZ8KoMrKe5(Z~~9f4Q10Fn4n4pFT)H=c)u=y294%YKWsGS z)S0q$kq9$B!;2xS!m3HoF-Gxa6<+aVo(X%+Kqnwfo^NroK>}u^;bw4(Pb0mR37iSl zz#8oBuILY0B=-uWdIk<4o%$J>BH;$PJG%@(rbuK;=_-Vozb3fod&>+xPf_^~;$aHx z)1f-Fv{a0Rq0KOre+Q2rmD&p(yffn=fG@ zFoIo2Se`H&Omn07j1uVB520CvFA-Z%M9pJAN}Rf=CBW!^{9M2Zy`TQI}L=%rwKb?eV7ZUBjyuehvh%VFN@0|lzr8zlH0JCiuvFQYx z!CH07ILmevnHnFXyzT8Sy&(y8+gcL;8iLutf*-)LS4Q^Poso8xx29!aNz{;ib4OZP zKKE?|GG?ob6L@0vY~kW9YCpkL(tv|08BmBCzYY)P@MDaiiD~XQSt^Dodnxe4jG&PE z!D6@K%tCtvz;h>}YL96OSs?O1<}EE;|K9~gj`lH<1JGga>TOt*^8zklxW7_ingt-T z0qdR7;wqD7>~K7zi!D-=N)dKX7KJnCrPVc^$}PBhq&u?93Gd^;(4B5wmC6+ngzED= zf|R{XtXXQT&X3?BRIIq7CB}H0bxtYB6(&8hLVRwnFulUsgV&Nm#f=y25vf9qpORd@ zgN;v=^B+U|gGXeywcc&5KnKLB`Wh@)ET8zR37BF5BPHV;ks+mulqb1M5XD%Yr=*#6 zj3`%OnaL4WrC9r_7*C2kgXTo{9 zamWl@gp0E`Wn_gbD4V=pbeL@R+Z5SzkaV@fEmoLIf(L5#mK;qfg5{Pz={wNNc?ybrum=BLn_~TrHyggkb?c1f+V)& zVT}XZbB*WtO$jz1N}$0HL>v_TF5iM1atwwy2KE$TN?6A)qfG3YU!Z68* zUVz2*{)XClfbEj6rgsZo&Z}G5?YyQwURTw8MZVM4vpd;!EEX$_Mb?7^{gaOFlSzN_h)b z#+i-X!rG(4cE0qevN)|=hGlsQIwf`%mmXpN@eJ!1mTV7PP3jkuu+-mmiUuA#urbMS zOwp(G@VwiUlxJ#?TN$M%N}stNh2p;ww|Y^Tb5C#n#oz=9iaUdbBc zyNbTMOK<7VeO9{(bAbn6tHnMXQ8IcgDocN1LxG?C2@)wst#V=sGbGSlt zi^XD$)L({RiW8@Vvr4(`;71y_;bvJaW*=*Ng-W5y+7c>ScB876wd!VBt!$QxdCW_% zL3+S2^gI=8q)^Fm^v((6$2nK{9QLtC56OwtA5XxwK+F4H&!-D4k0;#pR9~MZPYZkp zrrAe~QhLWI2@YE`&Ax6e8`w^P`6Yvr5$t0d%!)dWe#oOVmV3l*Q_Lq&J)5;v@vm{B ziJxN|Y!3}QM)#{g%wr0?Bj5oR4H=kZsY^`XeHZ)iJ2mV}#V<2iSP@(M-JXfsUKv2q zu%wC~38elu1To*&hDsLTu3JwKTbbh z9w%X47U!^3RxSe5d>g5M!mOPCJ4VEC3$#o8xXLxD@yOz3!`RvwttGhCe0SdOaKD&W z_iZS39ikprsGQlcO%Bo7=~5|}5ALLY%snhnb(wHu7{}B2z``)k*ZIuBZ;ckgvNnng=rrsTV zz#wC4eIH8`cUDsO22cJXGjKwp`eioBLT$llCMDvC_!YU6#;-Vjl}#VHZrjPMtUP=6 ztmoy5-f@rcV{@z1cmvB4E@^-6&%#v4JC>|Evllmay-z~L&pqtW?=S3xK7Gt6OF~F< z<k|;_V?lB1NNH~h$8WG`o4Xn_g24@L-zUaR`4IL5JJru zwU57C@!Rk%PAHQhN|{U_sZ3^XwKk0s?pklX>ismp>-<+Bd_Nk2DQ;{P81RD;Y$X3- KhcDm@fd2=v>Qx;8 diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/AggregatedMetrics.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/AggregatedMetrics.php deleted file mode 100644 index a4e7c9fdc222..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/AggregatedMetrics.php +++ /dev/null @@ -1,454 +0,0 @@ -google.maps.routeoptimization.v1.AggregatedMetrics - */ -class AggregatedMetrics extends \Google\Protobuf\Internal\Message -{ - /** - * Number of shipments performed. Note that a pickup and delivery pair only - * counts once. - * - * Generated from protobuf field int32 performed_shipment_count = 1; - */ - protected $performed_shipment_count = 0; - /** - * Total travel duration for a route or a solution. - * - * Generated from protobuf field .google.protobuf.Duration travel_duration = 2; - */ - protected $travel_duration = null; - /** - * Total wait duration for a route or a solution. - * - * Generated from protobuf field .google.protobuf.Duration wait_duration = 3; - */ - protected $wait_duration = null; - /** - * Total delay duration for a route or a solution. - * - * Generated from protobuf field .google.protobuf.Duration delay_duration = 4; - */ - protected $delay_duration = null; - /** - * Total break duration for a route or a solution. - * - * Generated from protobuf field .google.protobuf.Duration break_duration = 5; - */ - protected $break_duration = null; - /** - * Total visit duration for a route or a solution. - * - * Generated from protobuf field .google.protobuf.Duration visit_duration = 6; - */ - protected $visit_duration = null; - /** - * The total duration should be equal to the sum of all durations above. - * For routes, it also corresponds to: - * ``` - * [ShipmentRoute.vehicle_end_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_end_time] - * - - * [ShipmentRoute.vehicle_start_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_start_time] - * ``` - * - * Generated from protobuf field .google.protobuf.Duration total_duration = 7; - */ - protected $total_duration = null; - /** - * Total travel distance for a route or a solution. - * - * Generated from protobuf field double travel_distance_meters = 8; - */ - protected $travel_distance_meters = 0.0; - /** - * Maximum load achieved over the entire route (resp. solution), for each of - * the quantities on this route (resp. solution), computed as the maximum over - * all - * [Transition.vehicle_loads][google.maps.routeoptimization.v1.ShipmentRoute.Transition.vehicle_loads] - * (resp. - * [ShipmentRoute.metrics.max_loads][google.maps.routeoptimization.v1.AggregatedMetrics.max_loads]. - * - * Generated from protobuf field map max_loads = 9; - */ - private $max_loads; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $performed_shipment_count - * Number of shipments performed. Note that a pickup and delivery pair only - * counts once. - * @type \Google\Protobuf\Duration $travel_duration - * Total travel duration for a route or a solution. - * @type \Google\Protobuf\Duration $wait_duration - * Total wait duration for a route or a solution. - * @type \Google\Protobuf\Duration $delay_duration - * Total delay duration for a route or a solution. - * @type \Google\Protobuf\Duration $break_duration - * Total break duration for a route or a solution. - * @type \Google\Protobuf\Duration $visit_duration - * Total visit duration for a route or a solution. - * @type \Google\Protobuf\Duration $total_duration - * The total duration should be equal to the sum of all durations above. - * For routes, it also corresponds to: - * ``` - * [ShipmentRoute.vehicle_end_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_end_time] - * - - * [ShipmentRoute.vehicle_start_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_start_time] - * ``` - * @type float $travel_distance_meters - * Total travel distance for a route or a solution. - * @type array|\Google\Protobuf\Internal\MapField $max_loads - * Maximum load achieved over the entire route (resp. solution), for each of - * the quantities on this route (resp. solution), computed as the maximum over - * all - * [Transition.vehicle_loads][google.maps.routeoptimization.v1.ShipmentRoute.Transition.vehicle_loads] - * (resp. - * [ShipmentRoute.metrics.max_loads][google.maps.routeoptimization.v1.AggregatedMetrics.max_loads]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); - parent::__construct($data); - } - - /** - * Number of shipments performed. Note that a pickup and delivery pair only - * counts once. - * - * Generated from protobuf field int32 performed_shipment_count = 1; - * @return int - */ - public function getPerformedShipmentCount() - { - return $this->performed_shipment_count; - } - - /** - * Number of shipments performed. Note that a pickup and delivery pair only - * counts once. - * - * Generated from protobuf field int32 performed_shipment_count = 1; - * @param int $var - * @return $this - */ - public function setPerformedShipmentCount($var) - { - GPBUtil::checkInt32($var); - $this->performed_shipment_count = $var; - - return $this; - } - - /** - * Total travel duration for a route or a solution. - * - * Generated from protobuf field .google.protobuf.Duration travel_duration = 2; - * @return \Google\Protobuf\Duration|null - */ - public function getTravelDuration() - { - return $this->travel_duration; - } - - public function hasTravelDuration() - { - return isset($this->travel_duration); - } - - public function clearTravelDuration() - { - unset($this->travel_duration); - } - - /** - * Total travel duration for a route or a solution. - * - * Generated from protobuf field .google.protobuf.Duration travel_duration = 2; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setTravelDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->travel_duration = $var; - - return $this; - } - - /** - * Total wait duration for a route or a solution. - * - * Generated from protobuf field .google.protobuf.Duration wait_duration = 3; - * @return \Google\Protobuf\Duration|null - */ - public function getWaitDuration() - { - return $this->wait_duration; - } - - public function hasWaitDuration() - { - return isset($this->wait_duration); - } - - public function clearWaitDuration() - { - unset($this->wait_duration); - } - - /** - * Total wait duration for a route or a solution. - * - * Generated from protobuf field .google.protobuf.Duration wait_duration = 3; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setWaitDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->wait_duration = $var; - - return $this; - } - - /** - * Total delay duration for a route or a solution. - * - * Generated from protobuf field .google.protobuf.Duration delay_duration = 4; - * @return \Google\Protobuf\Duration|null - */ - public function getDelayDuration() - { - return $this->delay_duration; - } - - public function hasDelayDuration() - { - return isset($this->delay_duration); - } - - public function clearDelayDuration() - { - unset($this->delay_duration); - } - - /** - * Total delay duration for a route or a solution. - * - * Generated from protobuf field .google.protobuf.Duration delay_duration = 4; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setDelayDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->delay_duration = $var; - - return $this; - } - - /** - * Total break duration for a route or a solution. - * - * Generated from protobuf field .google.protobuf.Duration break_duration = 5; - * @return \Google\Protobuf\Duration|null - */ - public function getBreakDuration() - { - return $this->break_duration; - } - - public function hasBreakDuration() - { - return isset($this->break_duration); - } - - public function clearBreakDuration() - { - unset($this->break_duration); - } - - /** - * Total break duration for a route or a solution. - * - * Generated from protobuf field .google.protobuf.Duration break_duration = 5; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setBreakDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->break_duration = $var; - - return $this; - } - - /** - * Total visit duration for a route or a solution. - * - * Generated from protobuf field .google.protobuf.Duration visit_duration = 6; - * @return \Google\Protobuf\Duration|null - */ - public function getVisitDuration() - { - return $this->visit_duration; - } - - public function hasVisitDuration() - { - return isset($this->visit_duration); - } - - public function clearVisitDuration() - { - unset($this->visit_duration); - } - - /** - * Total visit duration for a route or a solution. - * - * Generated from protobuf field .google.protobuf.Duration visit_duration = 6; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setVisitDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->visit_duration = $var; - - return $this; - } - - /** - * The total duration should be equal to the sum of all durations above. - * For routes, it also corresponds to: - * ``` - * [ShipmentRoute.vehicle_end_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_end_time] - * - - * [ShipmentRoute.vehicle_start_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_start_time] - * ``` - * - * Generated from protobuf field .google.protobuf.Duration total_duration = 7; - * @return \Google\Protobuf\Duration|null - */ - public function getTotalDuration() - { - return $this->total_duration; - } - - public function hasTotalDuration() - { - return isset($this->total_duration); - } - - public function clearTotalDuration() - { - unset($this->total_duration); - } - - /** - * The total duration should be equal to the sum of all durations above. - * For routes, it also corresponds to: - * ``` - * [ShipmentRoute.vehicle_end_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_end_time] - * - - * [ShipmentRoute.vehicle_start_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_start_time] - * ``` - * - * Generated from protobuf field .google.protobuf.Duration total_duration = 7; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setTotalDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->total_duration = $var; - - return $this; - } - - /** - * Total travel distance for a route or a solution. - * - * Generated from protobuf field double travel_distance_meters = 8; - * @return float - */ - public function getTravelDistanceMeters() - { - return $this->travel_distance_meters; - } - - /** - * Total travel distance for a route or a solution. - * - * Generated from protobuf field double travel_distance_meters = 8; - * @param float $var - * @return $this - */ - public function setTravelDistanceMeters($var) - { - GPBUtil::checkDouble($var); - $this->travel_distance_meters = $var; - - return $this; - } - - /** - * Maximum load achieved over the entire route (resp. solution), for each of - * the quantities on this route (resp. solution), computed as the maximum over - * all - * [Transition.vehicle_loads][google.maps.routeoptimization.v1.ShipmentRoute.Transition.vehicle_loads] - * (resp. - * [ShipmentRoute.metrics.max_loads][google.maps.routeoptimization.v1.AggregatedMetrics.max_loads]. - * - * Generated from protobuf field map max_loads = 9; - * @return \Google\Protobuf\Internal\MapField - */ - public function getMaxLoads() - { - return $this->max_loads; - } - - /** - * Maximum load achieved over the entire route (resp. solution), for each of - * the quantities on this route (resp. solution), computed as the maximum over - * all - * [Transition.vehicle_loads][google.maps.routeoptimization.v1.ShipmentRoute.Transition.vehicle_loads] - * (resp. - * [ShipmentRoute.metrics.max_loads][google.maps.routeoptimization.v1.AggregatedMetrics.max_loads]. - * - * Generated from protobuf field map max_loads = 9; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setMaxLoads($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\ShipmentRoute\VehicleLoad::class); - $this->max_loads = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BatchOptimizeToursMetadata.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BatchOptimizeToursMetadata.php deleted file mode 100644 index 50b825aa8a7e..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BatchOptimizeToursMetadata.php +++ /dev/null @@ -1,33 +0,0 @@ -google.maps.routeoptimization.v1.BatchOptimizeToursMetadata - */ -class BatchOptimizeToursMetadata extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BatchOptimizeToursRequest.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BatchOptimizeToursRequest.php deleted file mode 100644 index 3c9fbf3f7c0d..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BatchOptimizeToursRequest.php +++ /dev/null @@ -1,125 +0,0 @@ -google.maps.routeoptimization.v1.BatchOptimizeToursRequest - */ -class BatchOptimizeToursRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Target project and location to make a call. - * Format: - * * `projects/{project-id}` - * * `projects/{project-id}/locations/{location-id}` - * If no location is specified, a region will be chosen automatically. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $parent = ''; - /** - * Required. Input/Output information each purchase model, such as file paths - * and data formats. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.BatchOptimizeToursRequest.AsyncModelConfig model_configs = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private $model_configs; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Target project and location to make a call. - * Format: - * * `projects/{project-id}` - * * `projects/{project-id}/locations/{location-id}` - * If no location is specified, a region will be chosen automatically. - * @type array<\Google\Maps\RouteOptimization\V1\BatchOptimizeToursRequest\AsyncModelConfig>|\Google\Protobuf\Internal\RepeatedField $model_configs - * Required. Input/Output information each purchase model, such as file paths - * and data formats. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Target project and location to make a call. - * Format: - * * `projects/{project-id}` - * * `projects/{project-id}/locations/{location-id}` - * If no location is specified, a region will be chosen automatically. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Target project and location to make a call. - * Format: - * * `projects/{project-id}` - * * `projects/{project-id}/locations/{location-id}` - * If no location is specified, a region will be chosen automatically. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. Input/Output information each purchase model, such as file paths - * and data formats. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.BatchOptimizeToursRequest.AsyncModelConfig model_configs = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getModelConfigs() - { - return $this->model_configs; - } - - /** - * Required. Input/Output information each purchase model, such as file paths - * and data formats. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.BatchOptimizeToursRequest.AsyncModelConfig model_configs = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param array<\Google\Maps\RouteOptimization\V1\BatchOptimizeToursRequest\AsyncModelConfig>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setModelConfigs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\BatchOptimizeToursRequest\AsyncModelConfig::class); - $this->model_configs = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BatchOptimizeToursRequest/AsyncModelConfig.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BatchOptimizeToursRequest/AsyncModelConfig.php deleted file mode 100644 index 9f323a5cd726..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BatchOptimizeToursRequest/AsyncModelConfig.php +++ /dev/null @@ -1,162 +0,0 @@ -google.maps.routeoptimization.v1.BatchOptimizeToursRequest.AsyncModelConfig - */ -class AsyncModelConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. User defined model name, can be used as alias by users to keep - * track of models. - * - * Generated from protobuf field string display_name = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $display_name = ''; - /** - * Required. Information about the input model. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.InputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $input_config = null; - /** - * Required. The desired output location information. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.OutputConfig output_config = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $output_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $display_name - * Optional. User defined model name, can be used as alias by users to keep - * track of models. - * @type \Google\Maps\RouteOptimization\V1\InputConfig $input_config - * Required. Information about the input model. - * @type \Google\Maps\RouteOptimization\V1\OutputConfig $output_config - * Required. The desired output location information. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); - parent::__construct($data); - } - - /** - * Optional. User defined model name, can be used as alias by users to keep - * track of models. - * - * Generated from protobuf field string display_name = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Optional. User defined model name, can be used as alias by users to keep - * track of models. - * - * Generated from protobuf field string display_name = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Required. Information about the input model. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.InputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Maps\RouteOptimization\V1\InputConfig|null - */ - public function getInputConfig() - { - return $this->input_config; - } - - public function hasInputConfig() - { - return isset($this->input_config); - } - - public function clearInputConfig() - { - unset($this->input_config); - } - - /** - * Required. Information about the input model. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.InputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Maps\RouteOptimization\V1\InputConfig $var - * @return $this - */ - public function setInputConfig($var) - { - GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\InputConfig::class); - $this->input_config = $var; - - return $this; - } - - /** - * Required. The desired output location information. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.OutputConfig output_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Maps\RouteOptimization\V1\OutputConfig|null - */ - public function getOutputConfig() - { - return $this->output_config; - } - - public function hasOutputConfig() - { - return isset($this->output_config); - } - - public function clearOutputConfig() - { - unset($this->output_config); - } - - /** - * Required. The desired output location information. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.OutputConfig output_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Maps\RouteOptimization\V1\OutputConfig $var - * @return $this - */ - public function setOutputConfig($var) - { - GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\OutputConfig::class); - $this->output_config = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(AsyncModelConfig::class, \Google\Maps\RouteOptimization\V1\BatchOptimizeToursRequest_AsyncModelConfig::class); - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BatchOptimizeToursResponse.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BatchOptimizeToursResponse.php deleted file mode 100644 index 2b0e02bf139a..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BatchOptimizeToursResponse.php +++ /dev/null @@ -1,34 +0,0 @@ -google.maps.routeoptimization.v1.BatchOptimizeToursResponse - */ -class BatchOptimizeToursResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BreakRule.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BreakRule.php deleted file mode 100644 index 500ac900d732..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BreakRule.php +++ /dev/null @@ -1,113 +0,0 @@ -google.maps.routeoptimization.v1.BreakRule - */ -class BreakRule extends \Google\Protobuf\Internal\Message -{ - /** - * Sequence of breaks. See the `BreakRequest` message. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.BreakRule.BreakRequest break_requests = 1; - */ - private $break_requests; - /** - * Several `FrequencyConstraint` may apply. They must all be satisfied by - * the `BreakRequest`s of this `BreakRule`. See `FrequencyConstraint`. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.BreakRule.FrequencyConstraint frequency_constraints = 2; - */ - private $frequency_constraints; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Maps\RouteOptimization\V1\BreakRule\BreakRequest>|\Google\Protobuf\Internal\RepeatedField $break_requests - * Sequence of breaks. See the `BreakRequest` message. - * @type array<\Google\Maps\RouteOptimization\V1\BreakRule\FrequencyConstraint>|\Google\Protobuf\Internal\RepeatedField $frequency_constraints - * Several `FrequencyConstraint` may apply. They must all be satisfied by - * the `BreakRequest`s of this `BreakRule`. See `FrequencyConstraint`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); - parent::__construct($data); - } - - /** - * Sequence of breaks. See the `BreakRequest` message. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.BreakRule.BreakRequest break_requests = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getBreakRequests() - { - return $this->break_requests; - } - - /** - * Sequence of breaks. See the `BreakRequest` message. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.BreakRule.BreakRequest break_requests = 1; - * @param array<\Google\Maps\RouteOptimization\V1\BreakRule\BreakRequest>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setBreakRequests($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\BreakRule\BreakRequest::class); - $this->break_requests = $arr; - - return $this; - } - - /** - * Several `FrequencyConstraint` may apply. They must all be satisfied by - * the `BreakRequest`s of this `BreakRule`. See `FrequencyConstraint`. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.BreakRule.FrequencyConstraint frequency_constraints = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFrequencyConstraints() - { - return $this->frequency_constraints; - } - - /** - * Several `FrequencyConstraint` may apply. They must all be satisfied by - * the `BreakRequest`s of this `BreakRule`. See `FrequencyConstraint`. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.BreakRule.FrequencyConstraint frequency_constraints = 2; - * @param array<\Google\Maps\RouteOptimization\V1\BreakRule\FrequencyConstraint>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFrequencyConstraints($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\BreakRule\FrequencyConstraint::class); - $this->frequency_constraints = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BreakRule/BreakRequest.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BreakRule/BreakRequest.php deleted file mode 100644 index 3defefe05194..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BreakRule/BreakRequest.php +++ /dev/null @@ -1,172 +0,0 @@ -google.maps.routeoptimization.v1.BreakRule.BreakRequest - */ -class BreakRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Lower bound (inclusive) on the start of the break. - * - * Generated from protobuf field .google.protobuf.Timestamp earliest_start_time = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $earliest_start_time = null; - /** - * Required. Upper bound (inclusive) on the start of the break. - * - * Generated from protobuf field .google.protobuf.Timestamp latest_start_time = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $latest_start_time = null; - /** - * Required. Minimum duration of the break. Must be positive. - * - * Generated from protobuf field .google.protobuf.Duration min_duration = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $min_duration = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $earliest_start_time - * Required. Lower bound (inclusive) on the start of the break. - * @type \Google\Protobuf\Timestamp $latest_start_time - * Required. Upper bound (inclusive) on the start of the break. - * @type \Google\Protobuf\Duration $min_duration - * Required. Minimum duration of the break. Must be positive. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Lower bound (inclusive) on the start of the break. - * - * Generated from protobuf field .google.protobuf.Timestamp earliest_start_time = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEarliestStartTime() - { - return $this->earliest_start_time; - } - - public function hasEarliestStartTime() - { - return isset($this->earliest_start_time); - } - - public function clearEarliestStartTime() - { - unset($this->earliest_start_time); - } - - /** - * Required. Lower bound (inclusive) on the start of the break. - * - * Generated from protobuf field .google.protobuf.Timestamp earliest_start_time = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEarliestStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->earliest_start_time = $var; - - return $this; - } - - /** - * Required. Upper bound (inclusive) on the start of the break. - * - * Generated from protobuf field .google.protobuf.Timestamp latest_start_time = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getLatestStartTime() - { - return $this->latest_start_time; - } - - public function hasLatestStartTime() - { - return isset($this->latest_start_time); - } - - public function clearLatestStartTime() - { - unset($this->latest_start_time); - } - - /** - * Required. Upper bound (inclusive) on the start of the break. - * - * Generated from protobuf field .google.protobuf.Timestamp latest_start_time = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setLatestStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->latest_start_time = $var; - - return $this; - } - - /** - * Required. Minimum duration of the break. Must be positive. - * - * Generated from protobuf field .google.protobuf.Duration min_duration = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Duration|null - */ - public function getMinDuration() - { - return $this->min_duration; - } - - public function hasMinDuration() - { - return isset($this->min_duration); - } - - public function clearMinDuration() - { - unset($this->min_duration); - } - - /** - * Required. Minimum duration of the break. Must be positive. - * - * Generated from protobuf field .google.protobuf.Duration min_duration = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setMinDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->min_duration = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(BreakRequest::class, \Google\Maps\RouteOptimization\V1\BreakRule_BreakRequest::class); - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BreakRule/FrequencyConstraint.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BreakRule/FrequencyConstraint.php deleted file mode 100644 index 3a9cd80a9e6d..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/BreakRule/FrequencyConstraint.php +++ /dev/null @@ -1,166 +0,0 @@ -google.maps.routeoptimization.v1.BreakRule.FrequencyConstraint - */ -class FrequencyConstraint extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Minimum break duration for this constraint. Nonnegative. - * See description of `FrequencyConstraint`. - * - * Generated from protobuf field .google.protobuf.Duration min_break_duration = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $min_break_duration = null; - /** - * Required. Maximum allowed span of any interval of time in the route that - * does not include at least partially a break of `duration >= - * min_break_duration`. Must be positive. - * - * Generated from protobuf field .google.protobuf.Duration max_inter_break_duration = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $max_inter_break_duration = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Duration $min_break_duration - * Required. Minimum break duration for this constraint. Nonnegative. - * See description of `FrequencyConstraint`. - * @type \Google\Protobuf\Duration $max_inter_break_duration - * Required. Maximum allowed span of any interval of time in the route that - * does not include at least partially a break of `duration >= - * min_break_duration`. Must be positive. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Minimum break duration for this constraint. Nonnegative. - * See description of `FrequencyConstraint`. - * - * Generated from protobuf field .google.protobuf.Duration min_break_duration = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Duration|null - */ - public function getMinBreakDuration() - { - return $this->min_break_duration; - } - - public function hasMinBreakDuration() - { - return isset($this->min_break_duration); - } - - public function clearMinBreakDuration() - { - unset($this->min_break_duration); - } - - /** - * Required. Minimum break duration for this constraint. Nonnegative. - * See description of `FrequencyConstraint`. - * - * Generated from protobuf field .google.protobuf.Duration min_break_duration = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setMinBreakDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->min_break_duration = $var; - - return $this; - } - - /** - * Required. Maximum allowed span of any interval of time in the route that - * does not include at least partially a break of `duration >= - * min_break_duration`. Must be positive. - * - * Generated from protobuf field .google.protobuf.Duration max_inter_break_duration = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Duration|null - */ - public function getMaxInterBreakDuration() - { - return $this->max_inter_break_duration; - } - - public function hasMaxInterBreakDuration() - { - return isset($this->max_inter_break_duration); - } - - public function clearMaxInterBreakDuration() - { - unset($this->max_inter_break_duration); - } - - /** - * Required. Maximum allowed span of any interval of time in the route that - * does not include at least partially a break of `duration >= - * min_break_duration`. Must be positive. - * - * Generated from protobuf field .google.protobuf.Duration max_inter_break_duration = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setMaxInterBreakDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->max_inter_break_duration = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(FrequencyConstraint::class, \Google\Maps\RouteOptimization\V1\BreakRule_FrequencyConstraint::class); - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/DataFormat.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/DataFormat.php deleted file mode 100644 index 76303e93fb37..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/DataFormat.php +++ /dev/null @@ -1,62 +0,0 @@ -google.maps.routeoptimization.v1.DataFormat - */ -class DataFormat -{ - /** - * Invalid value, format must not be UNSPECIFIED. - * - * Generated from protobuf enum DATA_FORMAT_UNSPECIFIED = 0; - */ - const DATA_FORMAT_UNSPECIFIED = 0; - /** - * JavaScript Object Notation. - * - * Generated from protobuf enum JSON = 1; - */ - const JSON = 1; - /** - * Protocol Buffers text format. See - * https://protobuf.dev/reference/protobuf/textformat-spec/ - * - * Generated from protobuf enum PROTO_TEXT = 2; - */ - const PROTO_TEXT = 2; - - private static $valueToName = [ - self::DATA_FORMAT_UNSPECIFIED => 'DATA_FORMAT_UNSPECIFIED', - self::JSON => 'JSON', - self::PROTO_TEXT => 'PROTO_TEXT', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/DistanceLimit.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/DistanceLimit.php deleted file mode 100644 index a2ec284f830a..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/DistanceLimit.php +++ /dev/null @@ -1,284 +0,0 @@ -google.maps.routeoptimization.v1.DistanceLimit - */ -class DistanceLimit extends \Google\Protobuf\Internal\Message -{ - /** - * A hard limit constraining the distance to be at most max_meters. The limit - * must be nonnegative. - * - * Generated from protobuf field optional int64 max_meters = 1; - */ - protected $max_meters = null; - /** - * A soft limit not enforcing a maximum distance limit, but when violated - * results in a cost which adds up to other costs defined in the model, - * with the same unit. - * If defined soft_max_meters must be less than max_meters and must be - * nonnegative. - * - * Generated from protobuf field optional int64 soft_max_meters = 2; - */ - protected $soft_max_meters = null; - /** - * Cost per kilometer incurred, increasing up to `soft_max_meters`, with - * formula: - * ``` - * min(distance_meters, soft_max_meters) / 1000.0 * - * cost_per_kilometer_below_soft_max. - * ``` - * This cost is not supported in `route_distance_limit`. - * - * Generated from protobuf field optional double cost_per_kilometer_below_soft_max = 4; - */ - protected $cost_per_kilometer_below_soft_max = null; - /** - * Cost per kilometer incurred if distance is above `soft_max_meters` limit. - * The additional cost is 0 if the distance is under the limit, otherwise the - * formula used to compute the cost is the following: - * ``` - * (distance_meters - soft_max_meters) / 1000.0 * - * cost_per_kilometer_above_soft_max. - * ``` - * The cost must be nonnegative. - * - * Generated from protobuf field optional double cost_per_kilometer_above_soft_max = 3; - */ - protected $cost_per_kilometer_above_soft_max = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $max_meters - * A hard limit constraining the distance to be at most max_meters. The limit - * must be nonnegative. - * @type int|string $soft_max_meters - * A soft limit not enforcing a maximum distance limit, but when violated - * results in a cost which adds up to other costs defined in the model, - * with the same unit. - * If defined soft_max_meters must be less than max_meters and must be - * nonnegative. - * @type float $cost_per_kilometer_below_soft_max - * Cost per kilometer incurred, increasing up to `soft_max_meters`, with - * formula: - * ``` - * min(distance_meters, soft_max_meters) / 1000.0 * - * cost_per_kilometer_below_soft_max. - * ``` - * This cost is not supported in `route_distance_limit`. - * @type float $cost_per_kilometer_above_soft_max - * Cost per kilometer incurred if distance is above `soft_max_meters` limit. - * The additional cost is 0 if the distance is under the limit, otherwise the - * formula used to compute the cost is the following: - * ``` - * (distance_meters - soft_max_meters) / 1000.0 * - * cost_per_kilometer_above_soft_max. - * ``` - * The cost must be nonnegative. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); - parent::__construct($data); - } - - /** - * A hard limit constraining the distance to be at most max_meters. The limit - * must be nonnegative. - * - * Generated from protobuf field optional int64 max_meters = 1; - * @return int|string - */ - public function getMaxMeters() - { - return isset($this->max_meters) ? $this->max_meters : 0; - } - - public function hasMaxMeters() - { - return isset($this->max_meters); - } - - public function clearMaxMeters() - { - unset($this->max_meters); - } - - /** - * A hard limit constraining the distance to be at most max_meters. The limit - * must be nonnegative. - * - * Generated from protobuf field optional int64 max_meters = 1; - * @param int|string $var - * @return $this - */ - public function setMaxMeters($var) - { - GPBUtil::checkInt64($var); - $this->max_meters = $var; - - return $this; - } - - /** - * A soft limit not enforcing a maximum distance limit, but when violated - * results in a cost which adds up to other costs defined in the model, - * with the same unit. - * If defined soft_max_meters must be less than max_meters and must be - * nonnegative. - * - * Generated from protobuf field optional int64 soft_max_meters = 2; - * @return int|string - */ - public function getSoftMaxMeters() - { - return isset($this->soft_max_meters) ? $this->soft_max_meters : 0; - } - - public function hasSoftMaxMeters() - { - return isset($this->soft_max_meters); - } - - public function clearSoftMaxMeters() - { - unset($this->soft_max_meters); - } - - /** - * A soft limit not enforcing a maximum distance limit, but when violated - * results in a cost which adds up to other costs defined in the model, - * with the same unit. - * If defined soft_max_meters must be less than max_meters and must be - * nonnegative. - * - * Generated from protobuf field optional int64 soft_max_meters = 2; - * @param int|string $var - * @return $this - */ - public function setSoftMaxMeters($var) - { - GPBUtil::checkInt64($var); - $this->soft_max_meters = $var; - - return $this; - } - - /** - * Cost per kilometer incurred, increasing up to `soft_max_meters`, with - * formula: - * ``` - * min(distance_meters, soft_max_meters) / 1000.0 * - * cost_per_kilometer_below_soft_max. - * ``` - * This cost is not supported in `route_distance_limit`. - * - * Generated from protobuf field optional double cost_per_kilometer_below_soft_max = 4; - * @return float - */ - public function getCostPerKilometerBelowSoftMax() - { - return isset($this->cost_per_kilometer_below_soft_max) ? $this->cost_per_kilometer_below_soft_max : 0.0; - } - - public function hasCostPerKilometerBelowSoftMax() - { - return isset($this->cost_per_kilometer_below_soft_max); - } - - public function clearCostPerKilometerBelowSoftMax() - { - unset($this->cost_per_kilometer_below_soft_max); - } - - /** - * Cost per kilometer incurred, increasing up to `soft_max_meters`, with - * formula: - * ``` - * min(distance_meters, soft_max_meters) / 1000.0 * - * cost_per_kilometer_below_soft_max. - * ``` - * This cost is not supported in `route_distance_limit`. - * - * Generated from protobuf field optional double cost_per_kilometer_below_soft_max = 4; - * @param float $var - * @return $this - */ - public function setCostPerKilometerBelowSoftMax($var) - { - GPBUtil::checkDouble($var); - $this->cost_per_kilometer_below_soft_max = $var; - - return $this; - } - - /** - * Cost per kilometer incurred if distance is above `soft_max_meters` limit. - * The additional cost is 0 if the distance is under the limit, otherwise the - * formula used to compute the cost is the following: - * ``` - * (distance_meters - soft_max_meters) / 1000.0 * - * cost_per_kilometer_above_soft_max. - * ``` - * The cost must be nonnegative. - * - * Generated from protobuf field optional double cost_per_kilometer_above_soft_max = 3; - * @return float - */ - public function getCostPerKilometerAboveSoftMax() - { - return isset($this->cost_per_kilometer_above_soft_max) ? $this->cost_per_kilometer_above_soft_max : 0.0; - } - - public function hasCostPerKilometerAboveSoftMax() - { - return isset($this->cost_per_kilometer_above_soft_max); - } - - public function clearCostPerKilometerAboveSoftMax() - { - unset($this->cost_per_kilometer_above_soft_max); - } - - /** - * Cost per kilometer incurred if distance is above `soft_max_meters` limit. - * The additional cost is 0 if the distance is under the limit, otherwise the - * formula used to compute the cost is the following: - * ``` - * (distance_meters - soft_max_meters) / 1000.0 * - * cost_per_kilometer_above_soft_max. - * ``` - * The cost must be nonnegative. - * - * Generated from protobuf field optional double cost_per_kilometer_above_soft_max = 3; - * @param float $var - * @return $this - */ - public function setCostPerKilometerAboveSoftMax($var) - { - GPBUtil::checkDouble($var); - $this->cost_per_kilometer_above_soft_max = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/GcsDestination.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/GcsDestination.php deleted file mode 100644 index 593d35570a86..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/GcsDestination.php +++ /dev/null @@ -1,68 +0,0 @@ -google.maps.routeoptimization.v1.GcsDestination - */ -class GcsDestination extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Google Cloud Storage URI. - * - * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $uri = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $uri - * Required. Google Cloud Storage URI. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Google Cloud Storage URI. - * - * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * Required. Google Cloud Storage URI. - * - * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/GcsSource.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/GcsSource.php deleted file mode 100644 index a4b7083b7252..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/GcsSource.php +++ /dev/null @@ -1,71 +0,0 @@ -google.maps.routeoptimization.v1.GcsSource - */ -class GcsSource extends \Google\Protobuf\Internal\Message -{ - /** - * Required. URI of a Google Cloud Storage object with the format - * `gs://bucket/path/to/object`. - * - * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $uri = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $uri - * Required. URI of a Google Cloud Storage object with the format - * `gs://bucket/path/to/object`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); - parent::__construct($data); - } - - /** - * Required. URI of a Google Cloud Storage object with the format - * `gs://bucket/path/to/object`. - * - * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * Required. URI of a Google Cloud Storage object with the format - * `gs://bucket/path/to/object`. - * - * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/InjectedSolutionConstraint.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/InjectedSolutionConstraint.php deleted file mode 100644 index bfb8197f0531..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/InjectedSolutionConstraint.php +++ /dev/null @@ -1,156 +0,0 @@ -google.maps.routeoptimization.v1.InjectedSolutionConstraint - */ -class InjectedSolutionConstraint extends \Google\Protobuf\Internal\Message -{ - /** - * Routes of the solution to inject. Some routes may be omitted from the - * original solution. The routes and skipped shipments must satisfy the basic - * validity assumptions listed for `injected_first_solution_routes`. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentRoute routes = 1; - */ - private $routes; - /** - * Skipped shipments of the solution to inject. Some may be omitted from the - * original solution. See the `routes` field. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.SkippedShipment skipped_shipments = 2; - */ - private $skipped_shipments; - /** - * For zero or more groups of vehicles, specifies when and how much to relax - * constraints. If this field is empty, all non-empty vehicle routes are - * fully constrained. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.InjectedSolutionConstraint.ConstraintRelaxation constraint_relaxations = 3; - */ - private $constraint_relaxations; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Maps\RouteOptimization\V1\ShipmentRoute>|\Google\Protobuf\Internal\RepeatedField $routes - * Routes of the solution to inject. Some routes may be omitted from the - * original solution. The routes and skipped shipments must satisfy the basic - * validity assumptions listed for `injected_first_solution_routes`. - * @type array<\Google\Maps\RouteOptimization\V1\SkippedShipment>|\Google\Protobuf\Internal\RepeatedField $skipped_shipments - * Skipped shipments of the solution to inject. Some may be omitted from the - * original solution. See the `routes` field. - * @type array<\Google\Maps\RouteOptimization\V1\InjectedSolutionConstraint\ConstraintRelaxation>|\Google\Protobuf\Internal\RepeatedField $constraint_relaxations - * For zero or more groups of vehicles, specifies when and how much to relax - * constraints. If this field is empty, all non-empty vehicle routes are - * fully constrained. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); - parent::__construct($data); - } - - /** - * Routes of the solution to inject. Some routes may be omitted from the - * original solution. The routes and skipped shipments must satisfy the basic - * validity assumptions listed for `injected_first_solution_routes`. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentRoute routes = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRoutes() - { - return $this->routes; - } - - /** - * Routes of the solution to inject. Some routes may be omitted from the - * original solution. The routes and skipped shipments must satisfy the basic - * validity assumptions listed for `injected_first_solution_routes`. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentRoute routes = 1; - * @param array<\Google\Maps\RouteOptimization\V1\ShipmentRoute>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRoutes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\ShipmentRoute::class); - $this->routes = $arr; - - return $this; - } - - /** - * Skipped shipments of the solution to inject. Some may be omitted from the - * original solution. See the `routes` field. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.SkippedShipment skipped_shipments = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSkippedShipments() - { - return $this->skipped_shipments; - } - - /** - * Skipped shipments of the solution to inject. Some may be omitted from the - * original solution. See the `routes` field. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.SkippedShipment skipped_shipments = 2; - * @param array<\Google\Maps\RouteOptimization\V1\SkippedShipment>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSkippedShipments($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\SkippedShipment::class); - $this->skipped_shipments = $arr; - - return $this; - } - - /** - * For zero or more groups of vehicles, specifies when and how much to relax - * constraints. If this field is empty, all non-empty vehicle routes are - * fully constrained. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.InjectedSolutionConstraint.ConstraintRelaxation constraint_relaxations = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getConstraintRelaxations() - { - return $this->constraint_relaxations; - } - - /** - * For zero or more groups of vehicles, specifies when and how much to relax - * constraints. If this field is empty, all non-empty vehicle routes are - * fully constrained. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.InjectedSolutionConstraint.ConstraintRelaxation constraint_relaxations = 3; - * @param array<\Google\Maps\RouteOptimization\V1\InjectedSolutionConstraint\ConstraintRelaxation>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setConstraintRelaxations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\InjectedSolutionConstraint\ConstraintRelaxation::class); - $this->constraint_relaxations = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/InjectedSolutionConstraint/ConstraintRelaxation.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/InjectedSolutionConstraint/ConstraintRelaxation.php deleted file mode 100644 index 9f6a431bd350..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/InjectedSolutionConstraint/ConstraintRelaxation.php +++ /dev/null @@ -1,151 +0,0 @@ -google.maps.routeoptimization.v1.InjectedSolutionConstraint.ConstraintRelaxation - */ -class ConstraintRelaxation extends \Google\Protobuf\Internal\Message -{ - /** - * All the visit constraint relaxations that will apply to visits on - * routes with vehicles in `vehicle_indices`. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.Relaxation relaxations = 1; - */ - private $relaxations; - /** - * Specifies the vehicle indices to which the visit constraint - * `relaxations` apply. If empty, this is considered the default and the - * `relaxations` apply to all vehicles that are not specified in other - * `constraint_relaxations`. There can be at most one default, i.e., at - * most one constraint relaxation field is allowed empty - * `vehicle_indices`. A vehicle index can only be listed once, even within - * several `constraint_relaxations`. - * A vehicle index is mapped the same as - * [ShipmentRoute.vehicle_index][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_index], - * if `interpret_injected_solutions_using_labels` is true (see `fields` - * comment). - * - * Generated from protobuf field repeated int32 vehicle_indices = 2; - */ - private $vehicle_indices; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Maps\RouteOptimization\V1\InjectedSolutionConstraint\ConstraintRelaxation\Relaxation>|\Google\Protobuf\Internal\RepeatedField $relaxations - * All the visit constraint relaxations that will apply to visits on - * routes with vehicles in `vehicle_indices`. - * @type array|\Google\Protobuf\Internal\RepeatedField $vehicle_indices - * Specifies the vehicle indices to which the visit constraint - * `relaxations` apply. If empty, this is considered the default and the - * `relaxations` apply to all vehicles that are not specified in other - * `constraint_relaxations`. There can be at most one default, i.e., at - * most one constraint relaxation field is allowed empty - * `vehicle_indices`. A vehicle index can only be listed once, even within - * several `constraint_relaxations`. - * A vehicle index is mapped the same as - * [ShipmentRoute.vehicle_index][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_index], - * if `interpret_injected_solutions_using_labels` is true (see `fields` - * comment). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); - parent::__construct($data); - } - - /** - * All the visit constraint relaxations that will apply to visits on - * routes with vehicles in `vehicle_indices`. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.Relaxation relaxations = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRelaxations() - { - return $this->relaxations; - } - - /** - * All the visit constraint relaxations that will apply to visits on - * routes with vehicles in `vehicle_indices`. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.Relaxation relaxations = 1; - * @param array<\Google\Maps\RouteOptimization\V1\InjectedSolutionConstraint\ConstraintRelaxation\Relaxation>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRelaxations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\InjectedSolutionConstraint\ConstraintRelaxation\Relaxation::class); - $this->relaxations = $arr; - - return $this; - } - - /** - * Specifies the vehicle indices to which the visit constraint - * `relaxations` apply. If empty, this is considered the default and the - * `relaxations` apply to all vehicles that are not specified in other - * `constraint_relaxations`. There can be at most one default, i.e., at - * most one constraint relaxation field is allowed empty - * `vehicle_indices`. A vehicle index can only be listed once, even within - * several `constraint_relaxations`. - * A vehicle index is mapped the same as - * [ShipmentRoute.vehicle_index][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_index], - * if `interpret_injected_solutions_using_labels` is true (see `fields` - * comment). - * - * Generated from protobuf field repeated int32 vehicle_indices = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getVehicleIndices() - { - return $this->vehicle_indices; - } - - /** - * Specifies the vehicle indices to which the visit constraint - * `relaxations` apply. If empty, this is considered the default and the - * `relaxations` apply to all vehicles that are not specified in other - * `constraint_relaxations`. There can be at most one default, i.e., at - * most one constraint relaxation field is allowed empty - * `vehicle_indices`. A vehicle index can only be listed once, even within - * several `constraint_relaxations`. - * A vehicle index is mapped the same as - * [ShipmentRoute.vehicle_index][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_index], - * if `interpret_injected_solutions_using_labels` is true (see `fields` - * comment). - * - * Generated from protobuf field repeated int32 vehicle_indices = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setVehicleIndices($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); - $this->vehicle_indices = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ConstraintRelaxation::class, \Google\Maps\RouteOptimization\V1\InjectedSolutionConstraint_ConstraintRelaxation::class); - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/InjectedSolutionConstraint/ConstraintRelaxation/Relaxation.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/InjectedSolutionConstraint/ConstraintRelaxation/Relaxation.php deleted file mode 100644 index f8cb219682a8..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/InjectedSolutionConstraint/ConstraintRelaxation/Relaxation.php +++ /dev/null @@ -1,204 +0,0 @@ -= relaxations(i).threshold_time` AND - * * `j + 1 >= relaxations(i).threshold_visit_count` - * Similarly, the vehicle start is relaxed to `relaxations(i).level` if it - * satisfies: - * * `vehicle_start_time >= relaxations(i).threshold_time` AND - * * `relaxations(i).threshold_visit_count == 0` - * and the vehicle end is relaxed to `relaxations(i).level` if it satisfies: - * * `vehicle_end_time >= relaxations(i).threshold_time` AND - * * `route.visits_size() + 1 >= relaxations(i).threshold_visit_count` - * To apply a relaxation level if a visit meets the `threshold_visit_count` - * OR the `threshold_time` add two `relaxations` with the same `level`: - * one with only `threshold_visit_count` set and the other with only - * `threshold_time` set. If a visit satisfies the conditions of multiple - * `relaxations`, the most relaxed level applies. As a result, from the - * vehicle start through the route visits in order to the vehicle end, the - * relaxation level becomes more relaxed: i.e., the relaxation level is - * non-decreasing as the route progresses. - * The timing and sequence of route visits that do not satisfy the - * threshold conditions of any `relaxations` are fully constrained - * and no visits may be inserted into these sequences. Also, if a - * vehicle start or end does not satisfy the conditions of any - * relaxation the time is fixed, unless the vehicle is empty. - * - * Generated from protobuf message google.maps.routeoptimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.Relaxation - */ -class Relaxation extends \Google\Protobuf\Internal\Message -{ - /** - * The constraint relaxation level that applies when the conditions - * at or after `threshold_time` AND at least `threshold_visit_count` are - * satisfied. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.Relaxation.Level level = 1; - */ - protected $level = 0; - /** - * The time at or after which the relaxation `level` may be applied. - * - * Generated from protobuf field .google.protobuf.Timestamp threshold_time = 2; - */ - protected $threshold_time = null; - /** - * The number of visits at or after which the relaxation `level` may be - * applied. If `threshold_visit_count` is 0 (or unset), the `level` may be - * applied directly at the vehicle start. - * If it is `route.visits_size() + 1`, the `level` may only be applied to - * the vehicle end. If it is more than `route.visits_size() + 1`, - * `level` is not applied at all for that route. - * - * Generated from protobuf field int32 threshold_visit_count = 3; - */ - protected $threshold_visit_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $level - * The constraint relaxation level that applies when the conditions - * at or after `threshold_time` AND at least `threshold_visit_count` are - * satisfied. - * @type \Google\Protobuf\Timestamp $threshold_time - * The time at or after which the relaxation `level` may be applied. - * @type int $threshold_visit_count - * The number of visits at or after which the relaxation `level` may be - * applied. If `threshold_visit_count` is 0 (or unset), the `level` may be - * applied directly at the vehicle start. - * If it is `route.visits_size() + 1`, the `level` may only be applied to - * the vehicle end. If it is more than `route.visits_size() + 1`, - * `level` is not applied at all for that route. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); - parent::__construct($data); - } - - /** - * The constraint relaxation level that applies when the conditions - * at or after `threshold_time` AND at least `threshold_visit_count` are - * satisfied. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.Relaxation.Level level = 1; - * @return int - */ - public function getLevel() - { - return $this->level; - } - - /** - * The constraint relaxation level that applies when the conditions - * at or after `threshold_time` AND at least `threshold_visit_count` are - * satisfied. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.Relaxation.Level level = 1; - * @param int $var - * @return $this - */ - public function setLevel($var) - { - GPBUtil::checkEnum($var, \Google\Maps\RouteOptimization\V1\InjectedSolutionConstraint\ConstraintRelaxation\Relaxation\Level::class); - $this->level = $var; - - return $this; - } - - /** - * The time at or after which the relaxation `level` may be applied. - * - * Generated from protobuf field .google.protobuf.Timestamp threshold_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getThresholdTime() - { - return $this->threshold_time; - } - - public function hasThresholdTime() - { - return isset($this->threshold_time); - } - - public function clearThresholdTime() - { - unset($this->threshold_time); - } - - /** - * The time at or after which the relaxation `level` may be applied. - * - * Generated from protobuf field .google.protobuf.Timestamp threshold_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setThresholdTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->threshold_time = $var; - - return $this; - } - - /** - * The number of visits at or after which the relaxation `level` may be - * applied. If `threshold_visit_count` is 0 (or unset), the `level` may be - * applied directly at the vehicle start. - * If it is `route.visits_size() + 1`, the `level` may only be applied to - * the vehicle end. If it is more than `route.visits_size() + 1`, - * `level` is not applied at all for that route. - * - * Generated from protobuf field int32 threshold_visit_count = 3; - * @return int - */ - public function getThresholdVisitCount() - { - return $this->threshold_visit_count; - } - - /** - * The number of visits at or after which the relaxation `level` may be - * applied. If `threshold_visit_count` is 0 (or unset), the `level` may be - * applied directly at the vehicle start. - * If it is `route.visits_size() + 1`, the `level` may only be applied to - * the vehicle end. If it is more than `route.visits_size() + 1`, - * `level` is not applied at all for that route. - * - * Generated from protobuf field int32 threshold_visit_count = 3; - * @param int $var - * @return $this - */ - public function setThresholdVisitCount($var) - { - GPBUtil::checkInt32($var); - $this->threshold_visit_count = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Relaxation::class, \Google\Maps\RouteOptimization\V1\InjectedSolutionConstraint_ConstraintRelaxation_Relaxation::class); - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/InjectedSolutionConstraint/ConstraintRelaxation/Relaxation/Level.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/InjectedSolutionConstraint/ConstraintRelaxation/Relaxation/Level.php deleted file mode 100644 index 718a0dba2366..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/InjectedSolutionConstraint/ConstraintRelaxation/Relaxation/Level.php +++ /dev/null @@ -1,83 +0,0 @@ -google.maps.routeoptimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.Relaxation.Level - */ -class Level -{ - /** - * Implicit default relaxation level: no constraints are relaxed, - * i.e., all visits are fully constrained. - * This value must not be explicitly used in `level`. - * - * Generated from protobuf enum LEVEL_UNSPECIFIED = 0; - */ - const LEVEL_UNSPECIFIED = 0; - /** - * Visit start times and vehicle start/end times will be relaxed, but - * each visit remains bound to the same vehicle and the visit sequence - * must be observed: no visit can be inserted between them or before - * them. - * - * Generated from protobuf enum RELAX_VISIT_TIMES_AFTER_THRESHOLD = 1; - */ - const RELAX_VISIT_TIMES_AFTER_THRESHOLD = 1; - /** - * Same as `RELAX_VISIT_TIMES_AFTER_THRESHOLD`, but the visit sequence - * is also relaxed: visits can only be performed by this vehicle, but - * can potentially become unperformed. - * - * Generated from protobuf enum RELAX_VISIT_TIMES_AND_SEQUENCE_AFTER_THRESHOLD = 2; - */ - const RELAX_VISIT_TIMES_AND_SEQUENCE_AFTER_THRESHOLD = 2; - /** - * Same as `RELAX_VISIT_TIMES_AND_SEQUENCE_AFTER_THRESHOLD`, but the - * vehicle is also relaxed: visits are completely free at or after the - * threshold time and can potentially become unperformed. - * - * Generated from protobuf enum RELAX_ALL_AFTER_THRESHOLD = 3; - */ - const RELAX_ALL_AFTER_THRESHOLD = 3; - - private static $valueToName = [ - self::LEVEL_UNSPECIFIED => 'LEVEL_UNSPECIFIED', - self::RELAX_VISIT_TIMES_AFTER_THRESHOLD => 'RELAX_VISIT_TIMES_AFTER_THRESHOLD', - self::RELAX_VISIT_TIMES_AND_SEQUENCE_AFTER_THRESHOLD => 'RELAX_VISIT_TIMES_AND_SEQUENCE_AFTER_THRESHOLD', - self::RELAX_ALL_AFTER_THRESHOLD => 'RELAX_ALL_AFTER_THRESHOLD', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Level::class, \Google\Maps\RouteOptimization\V1\InjectedSolutionConstraint_ConstraintRelaxation_Relaxation_Level::class); - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/InputConfig.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/InputConfig.php deleted file mode 100644 index 1ce8d31e1dbd..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/InputConfig.php +++ /dev/null @@ -1,110 +0,0 @@ -google.maps.routeoptimization.v1.InputConfig - */ -class InputConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The input data format. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.DataFormat data_format = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $data_format = 0; - protected $source; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Maps\RouteOptimization\V1\GcsSource $gcs_source - * A Google Cloud Storage location. This must be a single object (file). - * @type int $data_format - * Required. The input data format. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); - parent::__construct($data); - } - - /** - * A Google Cloud Storage location. This must be a single object (file). - * - * Generated from protobuf field .google.maps.routeoptimization.v1.GcsSource gcs_source = 1; - * @return \Google\Maps\RouteOptimization\V1\GcsSource|null - */ - public function getGcsSource() - { - return $this->readOneof(1); - } - - public function hasGcsSource() - { - return $this->hasOneof(1); - } - - /** - * A Google Cloud Storage location. This must be a single object (file). - * - * Generated from protobuf field .google.maps.routeoptimization.v1.GcsSource gcs_source = 1; - * @param \Google\Maps\RouteOptimization\V1\GcsSource $var - * @return $this - */ - public function setGcsSource($var) - { - GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\GcsSource::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Required. The input data format. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.DataFormat data_format = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getDataFormat() - { - return $this->data_format; - } - - /** - * Required. The input data format. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.DataFormat data_format = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setDataFormat($var) - { - GPBUtil::checkEnum($var, \Google\Maps\RouteOptimization\V1\DataFormat::class); - $this->data_format = $var; - - return $this; - } - - /** - * @return string - */ - public function getSource() - { - return $this->whichOneof("source"); - } - -} - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Location.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Location.php deleted file mode 100644 index fd6c1e3bb48d..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Location.php +++ /dev/null @@ -1,133 +0,0 @@ -google.maps.routeoptimization.v1.Location - */ -class Location extends \Google\Protobuf\Internal\Message -{ - /** - * The waypoint's geographic coordinates. - * - * Generated from protobuf field .google.type.LatLng lat_lng = 1; - */ - protected $lat_lng = null; - /** - * The compass heading associated with the direction of the flow of traffic. - * This value is used to specify the side of the road to use for pickup and - * drop-off. Heading values can be from 0 to 360, where 0 specifies a heading - * of due North, 90 specifies a heading of due East, etc. - * - * Generated from protobuf field optional int32 heading = 2; - */ - protected $heading = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Type\LatLng $lat_lng - * The waypoint's geographic coordinates. - * @type int $heading - * The compass heading associated with the direction of the flow of traffic. - * This value is used to specify the side of the road to use for pickup and - * drop-off. Heading values can be from 0 to 360, where 0 specifies a heading - * of due North, 90 specifies a heading of due East, etc. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); - parent::__construct($data); - } - - /** - * The waypoint's geographic coordinates. - * - * Generated from protobuf field .google.type.LatLng lat_lng = 1; - * @return \Google\Type\LatLng|null - */ - public function getLatLng() - { - return $this->lat_lng; - } - - public function hasLatLng() - { - return isset($this->lat_lng); - } - - public function clearLatLng() - { - unset($this->lat_lng); - } - - /** - * The waypoint's geographic coordinates. - * - * Generated from protobuf field .google.type.LatLng lat_lng = 1; - * @param \Google\Type\LatLng $var - * @return $this - */ - public function setLatLng($var) - { - GPBUtil::checkMessage($var, \Google\Type\LatLng::class); - $this->lat_lng = $var; - - return $this; - } - - /** - * The compass heading associated with the direction of the flow of traffic. - * This value is used to specify the side of the road to use for pickup and - * drop-off. Heading values can be from 0 to 360, where 0 specifies a heading - * of due North, 90 specifies a heading of due East, etc. - * - * Generated from protobuf field optional int32 heading = 2; - * @return int - */ - public function getHeading() - { - return isset($this->heading) ? $this->heading : 0; - } - - public function hasHeading() - { - return isset($this->heading); - } - - public function clearHeading() - { - unset($this->heading); - } - - /** - * The compass heading associated with the direction of the flow of traffic. - * This value is used to specify the side of the road to use for pickup and - * drop-off. Heading values can be from 0 to 360, where 0 specifies a heading - * of due North, 90 specifies a heading of due East, etc. - * - * Generated from protobuf field optional int32 heading = 2; - * @param int $var - * @return $this - */ - public function setHeading($var) - { - GPBUtil::checkInt32($var); - $this->heading = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursRequest.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursRequest.php deleted file mode 100644 index a7a94c081cf6..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursRequest.php +++ /dev/null @@ -1,1178 +0,0 @@ -google.maps.routeoptimization.v1.OptimizeToursRequest - */ -class OptimizeToursRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Target project or location to make a call. - * Format: - * * `projects/{project-id}` - * * `projects/{project-id}/locations/{location-id}` - * If no location is specified, a region will be chosen automatically. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $parent = ''; - /** - * If this timeout is set, the server returns a response before the timeout - * period has elapsed or the server deadline for synchronous requests is - * reached, whichever is sooner. - * For asynchronous requests, the server will generate a solution (if - * possible) before the timeout has elapsed. - * - * Generated from protobuf field .google.protobuf.Duration timeout = 2; - */ - protected $timeout = null; - /** - * Shipment model to solve. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.ShipmentModel model = 3; - */ - protected $model = null; - /** - * By default, the solving mode is `DEFAULT_SOLVE` (0). - * - * Generated from protobuf field .google.maps.routeoptimization.v1.OptimizeToursRequest.SolvingMode solving_mode = 4; - */ - protected $solving_mode = 0; - /** - * Search mode used to solve the request. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.OptimizeToursRequest.SearchMode search_mode = 6; - */ - protected $search_mode = 0; - /** - * Guide the optimization algorithm in finding a first solution that is - * similar to a previous solution. - * The model is constrained when the first solution is built. - * Any shipments not performed on a route are implicitly skipped in the first - * solution, but they may be performed in successive solutions. - * The solution must satisfy some basic validity assumptions: - * * for all routes, `vehicle_index` must be in range and not be duplicated. - * * for all visits, `shipment_index` and `visit_request_index` must be - * in range. - * * a shipment may only be referenced on one route. - * * the pickup of a pickup-delivery shipment must be performed before - * the delivery. - * * no more than one pickup alternative or delivery alternative of - * a shipment may be performed. - * * for all routes, times are increasing (i.e., `vehicle_start_time - * <= visits[0].start_time <= visits[1].start_time ... - * <= vehicle_end_time`). - * * a shipment may only be performed on a vehicle that is allowed. A - * vehicle is allowed if - * [Shipment.allowed_vehicle_indices][google.maps.routeoptimization.v1.Shipment.allowed_vehicle_indices] - * is empty or its `vehicle_index` is included in - * [Shipment.allowed_vehicle_indices][google.maps.routeoptimization.v1.Shipment.allowed_vehicle_indices]. - * If the injected solution is not feasible, a validation error is not - * necessarily returned and an error indicating infeasibility may be returned - * instead. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentRoute injected_first_solution_routes = 7; - */ - private $injected_first_solution_routes; - /** - * Constrain the optimization algorithm to find a final solution that is - * similar to a previous solution. For example, this may be used to freeze - * portions of routes which have already been completed or which are to be - * completed but must not be modified. - * If the injected solution is not feasible, a validation error is not - * necessarily returned and an error indicating infeasibility may be returned - * instead. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.InjectedSolutionConstraint injected_solution_constraint = 8; - */ - protected $injected_solution_constraint = null; - /** - * If non-empty, the given routes will be refreshed, without modifying their - * underlying sequence of visits or travel times: only other details will be - * updated. This does not solve the model. - * As of 2020/11, this only populates the polylines of non-empty routes and - * requires that `populate_polylines` is true. - * The `route_polyline` fields of the passed-in routes may be inconsistent - * with route `transitions`. - * This field must not be used together with `injected_first_solution_routes` - * or `injected_solution_constraint`. - * `Shipment.ignore` and `Vehicle.ignore` have no effect on the behavior. - * Polylines are still populated between all visits in all non-empty routes - * regardless of whether the related shipments or vehicles are ignored. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentRoute refresh_details_routes = 9; - */ - private $refresh_details_routes; - /** - * If true: - * * uses - * [ShipmentRoute.vehicle_label][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_label] - * instead of `vehicle_index` to - * match routes in an injected solution with vehicles in the request; - * reuses the mapping of original - * [ShipmentRoute.vehicle_index][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_index] - * to new - * [ShipmentRoute.vehicle_index][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_index] - * to update - * [ConstraintRelaxation.vehicle_indices][google.maps.routeoptimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.vehicle_indices] - * if non-empty, but the mapping must be unambiguous (i.e., multiple - * `ShipmentRoute`s must not share the same original `vehicle_index`). - * * uses - * [ShipmentRoute.Visit.shipment_label][google.maps.routeoptimization.v1.ShipmentRoute.Visit.shipment_label] - * instead of `shipment_index` - * to match visits in an injected solution with shipments in the request; - * * uses - * [SkippedShipment.label][google.maps.routeoptimization.v1.SkippedShipment.label] - * instead of - * [SkippedShipment.index][google.maps.routeoptimization.v1.SkippedShipment.index] - * to - * match skipped shipments in the injected solution with request - * shipments. - * This interpretation applies to the `injected_first_solution_routes`, - * `injected_solution_constraint`, and `refresh_details_routes` fields. - * It can be used when shipment or vehicle indices in the request have - * changed since the solution was created, perhaps because shipments or - * vehicles have been removed from or added to the request. - * If true, labels in the following categories must appear at most once in - * their category: - * * [Vehicle.label][google.maps.routeoptimization.v1.Vehicle.label] in the - * request; - * * [Shipment.label][google.maps.routeoptimization.v1.Shipment.label] in - * the request; - * * [ShipmentRoute.vehicle_label][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_label] in the injected solution; - * * [SkippedShipment.label][google.maps.routeoptimization.v1.SkippedShipment.label] and [ShipmentRoute.Visit.shipment_label][google.maps.routeoptimization.v1.ShipmentRoute.Visit.shipment_label] in - * the injected solution (except pickup/delivery visit pairs, whose - * `shipment_label` must appear twice). - * If a `vehicle_label` in the injected solution does not correspond to a - * request vehicle, the corresponding route is removed from the solution - * along with its visits. If a `shipment_label` in the injected solution does - * not correspond to a request shipment, the corresponding visit is removed - * from the solution. If a - * [SkippedShipment.label][google.maps.routeoptimization.v1.SkippedShipment.label] - * in the injected solution does not correspond to a request shipment, the - * `SkippedShipment` is removed from the solution. - * Removing route visits or entire routes from an injected solution may - * have an effect on the implied constraints, which may lead to change in - * solution, validation errors, or infeasibility. - * NOTE: The caller must ensure that each - * [Vehicle.label][google.maps.routeoptimization.v1.Vehicle.label] (resp. - * [Shipment.label][google.maps.routeoptimization.v1.Shipment.label]) uniquely - * identifies a vehicle (resp. shipment) entity used across the two relevant - * requests: the past request that produced the `OptimizeToursResponse` used - * in the injected solution and the current request that includes the injected - * solution. The uniqueness checks described above are not enough to guarantee - * this requirement. - * - * Generated from protobuf field bool interpret_injected_solutions_using_labels = 10; - */ - protected $interpret_injected_solutions_using_labels = false; - /** - * Consider traffic estimation in calculating `ShipmentRoute` fields - * [Transition.travel_duration][google.maps.routeoptimization.v1.ShipmentRoute.Transition.travel_duration], - * [Visit.start_time][google.maps.routeoptimization.v1.ShipmentRoute.Visit.start_time], - * and `vehicle_end_time`; in setting the - * [ShipmentRoute.has_traffic_infeasibilities][google.maps.routeoptimization.v1.ShipmentRoute.has_traffic_infeasibilities] - * field, and in calculating the - * [OptimizeToursResponse.total_cost][google.maps.routeoptimization.v1.OptimizeToursResponse.total_cost] - * field. - * - * Generated from protobuf field bool consider_road_traffic = 11; - */ - protected $consider_road_traffic = false; - /** - * If true, polylines will be populated in response `ShipmentRoute`s. - * - * Generated from protobuf field bool populate_polylines = 12; - */ - protected $populate_polylines = false; - /** - * If true, polylines and route tokens will be populated in response - * [ShipmentRoute.transitions][google.maps.routeoptimization.v1.ShipmentRoute.transitions]. - * - * Generated from protobuf field bool populate_transition_polylines = 13; - */ - protected $populate_transition_polylines = false; - /** - * If this is set, then the request can have a deadline - * (see https://grpc.io/blog/deadlines) of up to 60 minutes. - * Otherwise, the maximum deadline is only 30 minutes. - * Note that long-lived requests have a significantly larger (but still small) - * risk of interruption. - * - * Generated from protobuf field bool allow_large_deadline_despite_interruption_risk = 14; - */ - protected $allow_large_deadline_despite_interruption_risk = false; - /** - * If true, travel distances will be computed using geodesic distances instead - * of Google Maps distances, and travel times will be computed using geodesic - * distances with a speed defined by `geodesic_meters_per_second`. - * - * Generated from protobuf field bool use_geodesic_distances = 15; - */ - protected $use_geodesic_distances = false; - /** - * When `use_geodesic_distances` is true, this field must be set and defines - * the speed applied to compute travel times. Its value must be at least 1.0 - * meters/seconds. - * - * Generated from protobuf field optional double geodesic_meters_per_second = 16; - */ - protected $geodesic_meters_per_second = null; - /** - * Truncates the number of validation errors returned. These errors are - * typically attached to an INVALID_ARGUMENT error payload as a BadRequest - * error detail (https://cloud.google.com/apis/design/errors#error_details), - * unless solving_mode=VALIDATE_ONLY: see the - * [OptimizeToursResponse.validation_errors][google.maps.routeoptimization.v1.OptimizeToursResponse.validation_errors] - * field. - * This defaults to 100 and is capped at 10,000. - * - * Generated from protobuf field optional int32 max_validation_errors = 5; - */ - protected $max_validation_errors = null; - /** - * Label that may be used to identify this request, reported back in the - * [OptimizeToursResponse.request_label][google.maps.routeoptimization.v1.OptimizeToursResponse.request_label]. - * - * Generated from protobuf field string label = 17; - */ - protected $label = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Target project or location to make a call. - * Format: - * * `projects/{project-id}` - * * `projects/{project-id}/locations/{location-id}` - * If no location is specified, a region will be chosen automatically. - * @type \Google\Protobuf\Duration $timeout - * If this timeout is set, the server returns a response before the timeout - * period has elapsed or the server deadline for synchronous requests is - * reached, whichever is sooner. - * For asynchronous requests, the server will generate a solution (if - * possible) before the timeout has elapsed. - * @type \Google\Maps\RouteOptimization\V1\ShipmentModel $model - * Shipment model to solve. - * @type int $solving_mode - * By default, the solving mode is `DEFAULT_SOLVE` (0). - * @type int $search_mode - * Search mode used to solve the request. - * @type array<\Google\Maps\RouteOptimization\V1\ShipmentRoute>|\Google\Protobuf\Internal\RepeatedField $injected_first_solution_routes - * Guide the optimization algorithm in finding a first solution that is - * similar to a previous solution. - * The model is constrained when the first solution is built. - * Any shipments not performed on a route are implicitly skipped in the first - * solution, but they may be performed in successive solutions. - * The solution must satisfy some basic validity assumptions: - * * for all routes, `vehicle_index` must be in range and not be duplicated. - * * for all visits, `shipment_index` and `visit_request_index` must be - * in range. - * * a shipment may only be referenced on one route. - * * the pickup of a pickup-delivery shipment must be performed before - * the delivery. - * * no more than one pickup alternative or delivery alternative of - * a shipment may be performed. - * * for all routes, times are increasing (i.e., `vehicle_start_time - * <= visits[0].start_time <= visits[1].start_time ... - * <= vehicle_end_time`). - * * a shipment may only be performed on a vehicle that is allowed. A - * vehicle is allowed if - * [Shipment.allowed_vehicle_indices][google.maps.routeoptimization.v1.Shipment.allowed_vehicle_indices] - * is empty or its `vehicle_index` is included in - * [Shipment.allowed_vehicle_indices][google.maps.routeoptimization.v1.Shipment.allowed_vehicle_indices]. - * If the injected solution is not feasible, a validation error is not - * necessarily returned and an error indicating infeasibility may be returned - * instead. - * @type \Google\Maps\RouteOptimization\V1\InjectedSolutionConstraint $injected_solution_constraint - * Constrain the optimization algorithm to find a final solution that is - * similar to a previous solution. For example, this may be used to freeze - * portions of routes which have already been completed or which are to be - * completed but must not be modified. - * If the injected solution is not feasible, a validation error is not - * necessarily returned and an error indicating infeasibility may be returned - * instead. - * @type array<\Google\Maps\RouteOptimization\V1\ShipmentRoute>|\Google\Protobuf\Internal\RepeatedField $refresh_details_routes - * If non-empty, the given routes will be refreshed, without modifying their - * underlying sequence of visits or travel times: only other details will be - * updated. This does not solve the model. - * As of 2020/11, this only populates the polylines of non-empty routes and - * requires that `populate_polylines` is true. - * The `route_polyline` fields of the passed-in routes may be inconsistent - * with route `transitions`. - * This field must not be used together with `injected_first_solution_routes` - * or `injected_solution_constraint`. - * `Shipment.ignore` and `Vehicle.ignore` have no effect on the behavior. - * Polylines are still populated between all visits in all non-empty routes - * regardless of whether the related shipments or vehicles are ignored. - * @type bool $interpret_injected_solutions_using_labels - * If true: - * * uses - * [ShipmentRoute.vehicle_label][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_label] - * instead of `vehicle_index` to - * match routes in an injected solution with vehicles in the request; - * reuses the mapping of original - * [ShipmentRoute.vehicle_index][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_index] - * to new - * [ShipmentRoute.vehicle_index][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_index] - * to update - * [ConstraintRelaxation.vehicle_indices][google.maps.routeoptimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.vehicle_indices] - * if non-empty, but the mapping must be unambiguous (i.e., multiple - * `ShipmentRoute`s must not share the same original `vehicle_index`). - * * uses - * [ShipmentRoute.Visit.shipment_label][google.maps.routeoptimization.v1.ShipmentRoute.Visit.shipment_label] - * instead of `shipment_index` - * to match visits in an injected solution with shipments in the request; - * * uses - * [SkippedShipment.label][google.maps.routeoptimization.v1.SkippedShipment.label] - * instead of - * [SkippedShipment.index][google.maps.routeoptimization.v1.SkippedShipment.index] - * to - * match skipped shipments in the injected solution with request - * shipments. - * This interpretation applies to the `injected_first_solution_routes`, - * `injected_solution_constraint`, and `refresh_details_routes` fields. - * It can be used when shipment or vehicle indices in the request have - * changed since the solution was created, perhaps because shipments or - * vehicles have been removed from or added to the request. - * If true, labels in the following categories must appear at most once in - * their category: - * * [Vehicle.label][google.maps.routeoptimization.v1.Vehicle.label] in the - * request; - * * [Shipment.label][google.maps.routeoptimization.v1.Shipment.label] in - * the request; - * * [ShipmentRoute.vehicle_label][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_label] in the injected solution; - * * [SkippedShipment.label][google.maps.routeoptimization.v1.SkippedShipment.label] and [ShipmentRoute.Visit.shipment_label][google.maps.routeoptimization.v1.ShipmentRoute.Visit.shipment_label] in - * the injected solution (except pickup/delivery visit pairs, whose - * `shipment_label` must appear twice). - * If a `vehicle_label` in the injected solution does not correspond to a - * request vehicle, the corresponding route is removed from the solution - * along with its visits. If a `shipment_label` in the injected solution does - * not correspond to a request shipment, the corresponding visit is removed - * from the solution. If a - * [SkippedShipment.label][google.maps.routeoptimization.v1.SkippedShipment.label] - * in the injected solution does not correspond to a request shipment, the - * `SkippedShipment` is removed from the solution. - * Removing route visits or entire routes from an injected solution may - * have an effect on the implied constraints, which may lead to change in - * solution, validation errors, or infeasibility. - * NOTE: The caller must ensure that each - * [Vehicle.label][google.maps.routeoptimization.v1.Vehicle.label] (resp. - * [Shipment.label][google.maps.routeoptimization.v1.Shipment.label]) uniquely - * identifies a vehicle (resp. shipment) entity used across the two relevant - * requests: the past request that produced the `OptimizeToursResponse` used - * in the injected solution and the current request that includes the injected - * solution. The uniqueness checks described above are not enough to guarantee - * this requirement. - * @type bool $consider_road_traffic - * Consider traffic estimation in calculating `ShipmentRoute` fields - * [Transition.travel_duration][google.maps.routeoptimization.v1.ShipmentRoute.Transition.travel_duration], - * [Visit.start_time][google.maps.routeoptimization.v1.ShipmentRoute.Visit.start_time], - * and `vehicle_end_time`; in setting the - * [ShipmentRoute.has_traffic_infeasibilities][google.maps.routeoptimization.v1.ShipmentRoute.has_traffic_infeasibilities] - * field, and in calculating the - * [OptimizeToursResponse.total_cost][google.maps.routeoptimization.v1.OptimizeToursResponse.total_cost] - * field. - * @type bool $populate_polylines - * If true, polylines will be populated in response `ShipmentRoute`s. - * @type bool $populate_transition_polylines - * If true, polylines and route tokens will be populated in response - * [ShipmentRoute.transitions][google.maps.routeoptimization.v1.ShipmentRoute.transitions]. - * @type bool $allow_large_deadline_despite_interruption_risk - * If this is set, then the request can have a deadline - * (see https://grpc.io/blog/deadlines) of up to 60 minutes. - * Otherwise, the maximum deadline is only 30 minutes. - * Note that long-lived requests have a significantly larger (but still small) - * risk of interruption. - * @type bool $use_geodesic_distances - * If true, travel distances will be computed using geodesic distances instead - * of Google Maps distances, and travel times will be computed using geodesic - * distances with a speed defined by `geodesic_meters_per_second`. - * @type float $geodesic_meters_per_second - * When `use_geodesic_distances` is true, this field must be set and defines - * the speed applied to compute travel times. Its value must be at least 1.0 - * meters/seconds. - * @type int $max_validation_errors - * Truncates the number of validation errors returned. These errors are - * typically attached to an INVALID_ARGUMENT error payload as a BadRequest - * error detail (https://cloud.google.com/apis/design/errors#error_details), - * unless solving_mode=VALIDATE_ONLY: see the - * [OptimizeToursResponse.validation_errors][google.maps.routeoptimization.v1.OptimizeToursResponse.validation_errors] - * field. - * This defaults to 100 and is capped at 10,000. - * @type string $label - * Label that may be used to identify this request, reported back in the - * [OptimizeToursResponse.request_label][google.maps.routeoptimization.v1.OptimizeToursResponse.request_label]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Target project or location to make a call. - * Format: - * * `projects/{project-id}` - * * `projects/{project-id}/locations/{location-id}` - * If no location is specified, a region will be chosen automatically. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Target project or location to make a call. - * Format: - * * `projects/{project-id}` - * * `projects/{project-id}/locations/{location-id}` - * If no location is specified, a region will be chosen automatically. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * If this timeout is set, the server returns a response before the timeout - * period has elapsed or the server deadline for synchronous requests is - * reached, whichever is sooner. - * For asynchronous requests, the server will generate a solution (if - * possible) before the timeout has elapsed. - * - * Generated from protobuf field .google.protobuf.Duration timeout = 2; - * @return \Google\Protobuf\Duration|null - */ - public function getTimeout() - { - return $this->timeout; - } - - public function hasTimeout() - { - return isset($this->timeout); - } - - public function clearTimeout() - { - unset($this->timeout); - } - - /** - * If this timeout is set, the server returns a response before the timeout - * period has elapsed or the server deadline for synchronous requests is - * reached, whichever is sooner. - * For asynchronous requests, the server will generate a solution (if - * possible) before the timeout has elapsed. - * - * Generated from protobuf field .google.protobuf.Duration timeout = 2; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setTimeout($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->timeout = $var; - - return $this; - } - - /** - * Shipment model to solve. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.ShipmentModel model = 3; - * @return \Google\Maps\RouteOptimization\V1\ShipmentModel|null - */ - public function getModel() - { - return $this->model; - } - - public function hasModel() - { - return isset($this->model); - } - - public function clearModel() - { - unset($this->model); - } - - /** - * Shipment model to solve. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.ShipmentModel model = 3; - * @param \Google\Maps\RouteOptimization\V1\ShipmentModel $var - * @return $this - */ - public function setModel($var) - { - GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\ShipmentModel::class); - $this->model = $var; - - return $this; - } - - /** - * By default, the solving mode is `DEFAULT_SOLVE` (0). - * - * Generated from protobuf field .google.maps.routeoptimization.v1.OptimizeToursRequest.SolvingMode solving_mode = 4; - * @return int - */ - public function getSolvingMode() - { - return $this->solving_mode; - } - - /** - * By default, the solving mode is `DEFAULT_SOLVE` (0). - * - * Generated from protobuf field .google.maps.routeoptimization.v1.OptimizeToursRequest.SolvingMode solving_mode = 4; - * @param int $var - * @return $this - */ - public function setSolvingMode($var) - { - GPBUtil::checkEnum($var, \Google\Maps\RouteOptimization\V1\OptimizeToursRequest\SolvingMode::class); - $this->solving_mode = $var; - - return $this; - } - - /** - * Search mode used to solve the request. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.OptimizeToursRequest.SearchMode search_mode = 6; - * @return int - */ - public function getSearchMode() - { - return $this->search_mode; - } - - /** - * Search mode used to solve the request. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.OptimizeToursRequest.SearchMode search_mode = 6; - * @param int $var - * @return $this - */ - public function setSearchMode($var) - { - GPBUtil::checkEnum($var, \Google\Maps\RouteOptimization\V1\OptimizeToursRequest\SearchMode::class); - $this->search_mode = $var; - - return $this; - } - - /** - * Guide the optimization algorithm in finding a first solution that is - * similar to a previous solution. - * The model is constrained when the first solution is built. - * Any shipments not performed on a route are implicitly skipped in the first - * solution, but they may be performed in successive solutions. - * The solution must satisfy some basic validity assumptions: - * * for all routes, `vehicle_index` must be in range and not be duplicated. - * * for all visits, `shipment_index` and `visit_request_index` must be - * in range. - * * a shipment may only be referenced on one route. - * * the pickup of a pickup-delivery shipment must be performed before - * the delivery. - * * no more than one pickup alternative or delivery alternative of - * a shipment may be performed. - * * for all routes, times are increasing (i.e., `vehicle_start_time - * <= visits[0].start_time <= visits[1].start_time ... - * <= vehicle_end_time`). - * * a shipment may only be performed on a vehicle that is allowed. A - * vehicle is allowed if - * [Shipment.allowed_vehicle_indices][google.maps.routeoptimization.v1.Shipment.allowed_vehicle_indices] - * is empty or its `vehicle_index` is included in - * [Shipment.allowed_vehicle_indices][google.maps.routeoptimization.v1.Shipment.allowed_vehicle_indices]. - * If the injected solution is not feasible, a validation error is not - * necessarily returned and an error indicating infeasibility may be returned - * instead. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentRoute injected_first_solution_routes = 7; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getInjectedFirstSolutionRoutes() - { - return $this->injected_first_solution_routes; - } - - /** - * Guide the optimization algorithm in finding a first solution that is - * similar to a previous solution. - * The model is constrained when the first solution is built. - * Any shipments not performed on a route are implicitly skipped in the first - * solution, but they may be performed in successive solutions. - * The solution must satisfy some basic validity assumptions: - * * for all routes, `vehicle_index` must be in range and not be duplicated. - * * for all visits, `shipment_index` and `visit_request_index` must be - * in range. - * * a shipment may only be referenced on one route. - * * the pickup of a pickup-delivery shipment must be performed before - * the delivery. - * * no more than one pickup alternative or delivery alternative of - * a shipment may be performed. - * * for all routes, times are increasing (i.e., `vehicle_start_time - * <= visits[0].start_time <= visits[1].start_time ... - * <= vehicle_end_time`). - * * a shipment may only be performed on a vehicle that is allowed. A - * vehicle is allowed if - * [Shipment.allowed_vehicle_indices][google.maps.routeoptimization.v1.Shipment.allowed_vehicle_indices] - * is empty or its `vehicle_index` is included in - * [Shipment.allowed_vehicle_indices][google.maps.routeoptimization.v1.Shipment.allowed_vehicle_indices]. - * If the injected solution is not feasible, a validation error is not - * necessarily returned and an error indicating infeasibility may be returned - * instead. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentRoute injected_first_solution_routes = 7; - * @param array<\Google\Maps\RouteOptimization\V1\ShipmentRoute>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setInjectedFirstSolutionRoutes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\ShipmentRoute::class); - $this->injected_first_solution_routes = $arr; - - return $this; - } - - /** - * Constrain the optimization algorithm to find a final solution that is - * similar to a previous solution. For example, this may be used to freeze - * portions of routes which have already been completed or which are to be - * completed but must not be modified. - * If the injected solution is not feasible, a validation error is not - * necessarily returned and an error indicating infeasibility may be returned - * instead. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.InjectedSolutionConstraint injected_solution_constraint = 8; - * @return \Google\Maps\RouteOptimization\V1\InjectedSolutionConstraint|null - */ - public function getInjectedSolutionConstraint() - { - return $this->injected_solution_constraint; - } - - public function hasInjectedSolutionConstraint() - { - return isset($this->injected_solution_constraint); - } - - public function clearInjectedSolutionConstraint() - { - unset($this->injected_solution_constraint); - } - - /** - * Constrain the optimization algorithm to find a final solution that is - * similar to a previous solution. For example, this may be used to freeze - * portions of routes which have already been completed or which are to be - * completed but must not be modified. - * If the injected solution is not feasible, a validation error is not - * necessarily returned and an error indicating infeasibility may be returned - * instead. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.InjectedSolutionConstraint injected_solution_constraint = 8; - * @param \Google\Maps\RouteOptimization\V1\InjectedSolutionConstraint $var - * @return $this - */ - public function setInjectedSolutionConstraint($var) - { - GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\InjectedSolutionConstraint::class); - $this->injected_solution_constraint = $var; - - return $this; - } - - /** - * If non-empty, the given routes will be refreshed, without modifying their - * underlying sequence of visits or travel times: only other details will be - * updated. This does not solve the model. - * As of 2020/11, this only populates the polylines of non-empty routes and - * requires that `populate_polylines` is true. - * The `route_polyline` fields of the passed-in routes may be inconsistent - * with route `transitions`. - * This field must not be used together with `injected_first_solution_routes` - * or `injected_solution_constraint`. - * `Shipment.ignore` and `Vehicle.ignore` have no effect on the behavior. - * Polylines are still populated between all visits in all non-empty routes - * regardless of whether the related shipments or vehicles are ignored. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentRoute refresh_details_routes = 9; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRefreshDetailsRoutes() - { - return $this->refresh_details_routes; - } - - /** - * If non-empty, the given routes will be refreshed, without modifying their - * underlying sequence of visits or travel times: only other details will be - * updated. This does not solve the model. - * As of 2020/11, this only populates the polylines of non-empty routes and - * requires that `populate_polylines` is true. - * The `route_polyline` fields of the passed-in routes may be inconsistent - * with route `transitions`. - * This field must not be used together with `injected_first_solution_routes` - * or `injected_solution_constraint`. - * `Shipment.ignore` and `Vehicle.ignore` have no effect on the behavior. - * Polylines are still populated between all visits in all non-empty routes - * regardless of whether the related shipments or vehicles are ignored. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentRoute refresh_details_routes = 9; - * @param array<\Google\Maps\RouteOptimization\V1\ShipmentRoute>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRefreshDetailsRoutes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\ShipmentRoute::class); - $this->refresh_details_routes = $arr; - - return $this; - } - - /** - * If true: - * * uses - * [ShipmentRoute.vehicle_label][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_label] - * instead of `vehicle_index` to - * match routes in an injected solution with vehicles in the request; - * reuses the mapping of original - * [ShipmentRoute.vehicle_index][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_index] - * to new - * [ShipmentRoute.vehicle_index][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_index] - * to update - * [ConstraintRelaxation.vehicle_indices][google.maps.routeoptimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.vehicle_indices] - * if non-empty, but the mapping must be unambiguous (i.e., multiple - * `ShipmentRoute`s must not share the same original `vehicle_index`). - * * uses - * [ShipmentRoute.Visit.shipment_label][google.maps.routeoptimization.v1.ShipmentRoute.Visit.shipment_label] - * instead of `shipment_index` - * to match visits in an injected solution with shipments in the request; - * * uses - * [SkippedShipment.label][google.maps.routeoptimization.v1.SkippedShipment.label] - * instead of - * [SkippedShipment.index][google.maps.routeoptimization.v1.SkippedShipment.index] - * to - * match skipped shipments in the injected solution with request - * shipments. - * This interpretation applies to the `injected_first_solution_routes`, - * `injected_solution_constraint`, and `refresh_details_routes` fields. - * It can be used when shipment or vehicle indices in the request have - * changed since the solution was created, perhaps because shipments or - * vehicles have been removed from or added to the request. - * If true, labels in the following categories must appear at most once in - * their category: - * * [Vehicle.label][google.maps.routeoptimization.v1.Vehicle.label] in the - * request; - * * [Shipment.label][google.maps.routeoptimization.v1.Shipment.label] in - * the request; - * * [ShipmentRoute.vehicle_label][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_label] in the injected solution; - * * [SkippedShipment.label][google.maps.routeoptimization.v1.SkippedShipment.label] and [ShipmentRoute.Visit.shipment_label][google.maps.routeoptimization.v1.ShipmentRoute.Visit.shipment_label] in - * the injected solution (except pickup/delivery visit pairs, whose - * `shipment_label` must appear twice). - * If a `vehicle_label` in the injected solution does not correspond to a - * request vehicle, the corresponding route is removed from the solution - * along with its visits. If a `shipment_label` in the injected solution does - * not correspond to a request shipment, the corresponding visit is removed - * from the solution. If a - * [SkippedShipment.label][google.maps.routeoptimization.v1.SkippedShipment.label] - * in the injected solution does not correspond to a request shipment, the - * `SkippedShipment` is removed from the solution. - * Removing route visits or entire routes from an injected solution may - * have an effect on the implied constraints, which may lead to change in - * solution, validation errors, or infeasibility. - * NOTE: The caller must ensure that each - * [Vehicle.label][google.maps.routeoptimization.v1.Vehicle.label] (resp. - * [Shipment.label][google.maps.routeoptimization.v1.Shipment.label]) uniquely - * identifies a vehicle (resp. shipment) entity used across the two relevant - * requests: the past request that produced the `OptimizeToursResponse` used - * in the injected solution and the current request that includes the injected - * solution. The uniqueness checks described above are not enough to guarantee - * this requirement. - * - * Generated from protobuf field bool interpret_injected_solutions_using_labels = 10; - * @return bool - */ - public function getInterpretInjectedSolutionsUsingLabels() - { - return $this->interpret_injected_solutions_using_labels; - } - - /** - * If true: - * * uses - * [ShipmentRoute.vehicle_label][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_label] - * instead of `vehicle_index` to - * match routes in an injected solution with vehicles in the request; - * reuses the mapping of original - * [ShipmentRoute.vehicle_index][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_index] - * to new - * [ShipmentRoute.vehicle_index][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_index] - * to update - * [ConstraintRelaxation.vehicle_indices][google.maps.routeoptimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.vehicle_indices] - * if non-empty, but the mapping must be unambiguous (i.e., multiple - * `ShipmentRoute`s must not share the same original `vehicle_index`). - * * uses - * [ShipmentRoute.Visit.shipment_label][google.maps.routeoptimization.v1.ShipmentRoute.Visit.shipment_label] - * instead of `shipment_index` - * to match visits in an injected solution with shipments in the request; - * * uses - * [SkippedShipment.label][google.maps.routeoptimization.v1.SkippedShipment.label] - * instead of - * [SkippedShipment.index][google.maps.routeoptimization.v1.SkippedShipment.index] - * to - * match skipped shipments in the injected solution with request - * shipments. - * This interpretation applies to the `injected_first_solution_routes`, - * `injected_solution_constraint`, and `refresh_details_routes` fields. - * It can be used when shipment or vehicle indices in the request have - * changed since the solution was created, perhaps because shipments or - * vehicles have been removed from or added to the request. - * If true, labels in the following categories must appear at most once in - * their category: - * * [Vehicle.label][google.maps.routeoptimization.v1.Vehicle.label] in the - * request; - * * [Shipment.label][google.maps.routeoptimization.v1.Shipment.label] in - * the request; - * * [ShipmentRoute.vehicle_label][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_label] in the injected solution; - * * [SkippedShipment.label][google.maps.routeoptimization.v1.SkippedShipment.label] and [ShipmentRoute.Visit.shipment_label][google.maps.routeoptimization.v1.ShipmentRoute.Visit.shipment_label] in - * the injected solution (except pickup/delivery visit pairs, whose - * `shipment_label` must appear twice). - * If a `vehicle_label` in the injected solution does not correspond to a - * request vehicle, the corresponding route is removed from the solution - * along with its visits. If a `shipment_label` in the injected solution does - * not correspond to a request shipment, the corresponding visit is removed - * from the solution. If a - * [SkippedShipment.label][google.maps.routeoptimization.v1.SkippedShipment.label] - * in the injected solution does not correspond to a request shipment, the - * `SkippedShipment` is removed from the solution. - * Removing route visits or entire routes from an injected solution may - * have an effect on the implied constraints, which may lead to change in - * solution, validation errors, or infeasibility. - * NOTE: The caller must ensure that each - * [Vehicle.label][google.maps.routeoptimization.v1.Vehicle.label] (resp. - * [Shipment.label][google.maps.routeoptimization.v1.Shipment.label]) uniquely - * identifies a vehicle (resp. shipment) entity used across the two relevant - * requests: the past request that produced the `OptimizeToursResponse` used - * in the injected solution and the current request that includes the injected - * solution. The uniqueness checks described above are not enough to guarantee - * this requirement. - * - * Generated from protobuf field bool interpret_injected_solutions_using_labels = 10; - * @param bool $var - * @return $this - */ - public function setInterpretInjectedSolutionsUsingLabels($var) - { - GPBUtil::checkBool($var); - $this->interpret_injected_solutions_using_labels = $var; - - return $this; - } - - /** - * Consider traffic estimation in calculating `ShipmentRoute` fields - * [Transition.travel_duration][google.maps.routeoptimization.v1.ShipmentRoute.Transition.travel_duration], - * [Visit.start_time][google.maps.routeoptimization.v1.ShipmentRoute.Visit.start_time], - * and `vehicle_end_time`; in setting the - * [ShipmentRoute.has_traffic_infeasibilities][google.maps.routeoptimization.v1.ShipmentRoute.has_traffic_infeasibilities] - * field, and in calculating the - * [OptimizeToursResponse.total_cost][google.maps.routeoptimization.v1.OptimizeToursResponse.total_cost] - * field. - * - * Generated from protobuf field bool consider_road_traffic = 11; - * @return bool - */ - public function getConsiderRoadTraffic() - { - return $this->consider_road_traffic; - } - - /** - * Consider traffic estimation in calculating `ShipmentRoute` fields - * [Transition.travel_duration][google.maps.routeoptimization.v1.ShipmentRoute.Transition.travel_duration], - * [Visit.start_time][google.maps.routeoptimization.v1.ShipmentRoute.Visit.start_time], - * and `vehicle_end_time`; in setting the - * [ShipmentRoute.has_traffic_infeasibilities][google.maps.routeoptimization.v1.ShipmentRoute.has_traffic_infeasibilities] - * field, and in calculating the - * [OptimizeToursResponse.total_cost][google.maps.routeoptimization.v1.OptimizeToursResponse.total_cost] - * field. - * - * Generated from protobuf field bool consider_road_traffic = 11; - * @param bool $var - * @return $this - */ - public function setConsiderRoadTraffic($var) - { - GPBUtil::checkBool($var); - $this->consider_road_traffic = $var; - - return $this; - } - - /** - * If true, polylines will be populated in response `ShipmentRoute`s. - * - * Generated from protobuf field bool populate_polylines = 12; - * @return bool - */ - public function getPopulatePolylines() - { - return $this->populate_polylines; - } - - /** - * If true, polylines will be populated in response `ShipmentRoute`s. - * - * Generated from protobuf field bool populate_polylines = 12; - * @param bool $var - * @return $this - */ - public function setPopulatePolylines($var) - { - GPBUtil::checkBool($var); - $this->populate_polylines = $var; - - return $this; - } - - /** - * If true, polylines and route tokens will be populated in response - * [ShipmentRoute.transitions][google.maps.routeoptimization.v1.ShipmentRoute.transitions]. - * - * Generated from protobuf field bool populate_transition_polylines = 13; - * @return bool - */ - public function getPopulateTransitionPolylines() - { - return $this->populate_transition_polylines; - } - - /** - * If true, polylines and route tokens will be populated in response - * [ShipmentRoute.transitions][google.maps.routeoptimization.v1.ShipmentRoute.transitions]. - * - * Generated from protobuf field bool populate_transition_polylines = 13; - * @param bool $var - * @return $this - */ - public function setPopulateTransitionPolylines($var) - { - GPBUtil::checkBool($var); - $this->populate_transition_polylines = $var; - - return $this; - } - - /** - * If this is set, then the request can have a deadline - * (see https://grpc.io/blog/deadlines) of up to 60 minutes. - * Otherwise, the maximum deadline is only 30 minutes. - * Note that long-lived requests have a significantly larger (but still small) - * risk of interruption. - * - * Generated from protobuf field bool allow_large_deadline_despite_interruption_risk = 14; - * @return bool - */ - public function getAllowLargeDeadlineDespiteInterruptionRisk() - { - return $this->allow_large_deadline_despite_interruption_risk; - } - - /** - * If this is set, then the request can have a deadline - * (see https://grpc.io/blog/deadlines) of up to 60 minutes. - * Otherwise, the maximum deadline is only 30 minutes. - * Note that long-lived requests have a significantly larger (but still small) - * risk of interruption. - * - * Generated from protobuf field bool allow_large_deadline_despite_interruption_risk = 14; - * @param bool $var - * @return $this - */ - public function setAllowLargeDeadlineDespiteInterruptionRisk($var) - { - GPBUtil::checkBool($var); - $this->allow_large_deadline_despite_interruption_risk = $var; - - return $this; - } - - /** - * If true, travel distances will be computed using geodesic distances instead - * of Google Maps distances, and travel times will be computed using geodesic - * distances with a speed defined by `geodesic_meters_per_second`. - * - * Generated from protobuf field bool use_geodesic_distances = 15; - * @return bool - */ - public function getUseGeodesicDistances() - { - return $this->use_geodesic_distances; - } - - /** - * If true, travel distances will be computed using geodesic distances instead - * of Google Maps distances, and travel times will be computed using geodesic - * distances with a speed defined by `geodesic_meters_per_second`. - * - * Generated from protobuf field bool use_geodesic_distances = 15; - * @param bool $var - * @return $this - */ - public function setUseGeodesicDistances($var) - { - GPBUtil::checkBool($var); - $this->use_geodesic_distances = $var; - - return $this; - } - - /** - * When `use_geodesic_distances` is true, this field must be set and defines - * the speed applied to compute travel times. Its value must be at least 1.0 - * meters/seconds. - * - * Generated from protobuf field optional double geodesic_meters_per_second = 16; - * @return float - */ - public function getGeodesicMetersPerSecond() - { - return isset($this->geodesic_meters_per_second) ? $this->geodesic_meters_per_second : 0.0; - } - - public function hasGeodesicMetersPerSecond() - { - return isset($this->geodesic_meters_per_second); - } - - public function clearGeodesicMetersPerSecond() - { - unset($this->geodesic_meters_per_second); - } - - /** - * When `use_geodesic_distances` is true, this field must be set and defines - * the speed applied to compute travel times. Its value must be at least 1.0 - * meters/seconds. - * - * Generated from protobuf field optional double geodesic_meters_per_second = 16; - * @param float $var - * @return $this - */ - public function setGeodesicMetersPerSecond($var) - { - GPBUtil::checkDouble($var); - $this->geodesic_meters_per_second = $var; - - return $this; - } - - /** - * Truncates the number of validation errors returned. These errors are - * typically attached to an INVALID_ARGUMENT error payload as a BadRequest - * error detail (https://cloud.google.com/apis/design/errors#error_details), - * unless solving_mode=VALIDATE_ONLY: see the - * [OptimizeToursResponse.validation_errors][google.maps.routeoptimization.v1.OptimizeToursResponse.validation_errors] - * field. - * This defaults to 100 and is capped at 10,000. - * - * Generated from protobuf field optional int32 max_validation_errors = 5; - * @return int - */ - public function getMaxValidationErrors() - { - return isset($this->max_validation_errors) ? $this->max_validation_errors : 0; - } - - public function hasMaxValidationErrors() - { - return isset($this->max_validation_errors); - } - - public function clearMaxValidationErrors() - { - unset($this->max_validation_errors); - } - - /** - * Truncates the number of validation errors returned. These errors are - * typically attached to an INVALID_ARGUMENT error payload as a BadRequest - * error detail (https://cloud.google.com/apis/design/errors#error_details), - * unless solving_mode=VALIDATE_ONLY: see the - * [OptimizeToursResponse.validation_errors][google.maps.routeoptimization.v1.OptimizeToursResponse.validation_errors] - * field. - * This defaults to 100 and is capped at 10,000. - * - * Generated from protobuf field optional int32 max_validation_errors = 5; - * @param int $var - * @return $this - */ - public function setMaxValidationErrors($var) - { - GPBUtil::checkInt32($var); - $this->max_validation_errors = $var; - - return $this; - } - - /** - * Label that may be used to identify this request, reported back in the - * [OptimizeToursResponse.request_label][google.maps.routeoptimization.v1.OptimizeToursResponse.request_label]. - * - * Generated from protobuf field string label = 17; - * @return string - */ - public function getLabel() - { - return $this->label; - } - - /** - * Label that may be used to identify this request, reported back in the - * [OptimizeToursResponse.request_label][google.maps.routeoptimization.v1.OptimizeToursResponse.request_label]. - * - * Generated from protobuf field string label = 17; - * @param string $var - * @return $this - */ - public function setLabel($var) - { - GPBUtil::checkString($var, True); - $this->label = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursRequest/SearchMode.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursRequest/SearchMode.php deleted file mode 100644 index 1933e8a6c82e..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursRequest/SearchMode.php +++ /dev/null @@ -1,65 +0,0 @@ -google.maps.routeoptimization.v1.OptimizeToursRequest.SearchMode - */ -class SearchMode -{ - /** - * Unspecified search mode, equivalent to `RETURN_FAST`. - * - * Generated from protobuf enum SEARCH_MODE_UNSPECIFIED = 0; - */ - const SEARCH_MODE_UNSPECIFIED = 0; - /** - * Stop the search after finding the first good solution. - * - * Generated from protobuf enum RETURN_FAST = 1; - */ - const RETURN_FAST = 1; - /** - * Spend all the available time to search for better solutions. - * - * Generated from protobuf enum CONSUME_ALL_AVAILABLE_TIME = 2; - */ - const CONSUME_ALL_AVAILABLE_TIME = 2; - - private static $valueToName = [ - self::SEARCH_MODE_UNSPECIFIED => 'SEARCH_MODE_UNSPECIFIED', - self::RETURN_FAST => 'RETURN_FAST', - self::CONSUME_ALL_AVAILABLE_TIME => 'CONSUME_ALL_AVAILABLE_TIME', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SearchMode::class, \Google\Maps\RouteOptimization\V1\OptimizeToursRequest_SearchMode::class); - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursRequest/SolvingMode.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursRequest/SolvingMode.php deleted file mode 100644 index 33490075a243..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursRequest/SolvingMode.php +++ /dev/null @@ -1,84 +0,0 @@ -google.maps.routeoptimization.v1.OptimizeToursRequest.SolvingMode - */ -class SolvingMode -{ - /** - * Solve the model. Warnings may be issued in - * [OptimizeToursResponse.validation_errors][google.cloud.optimization.v1.OptimizeToursResponse.validation_errors]. - * - * Generated from protobuf enum DEFAULT_SOLVE = 0; - */ - const DEFAULT_SOLVE = 0; - /** - * Only validates the model without solving it: populates as many - * [OptimizeToursResponse.validation_errors][google.maps.routeoptimization.v1.OptimizeToursResponse.validation_errors] - * as possible. - * - * Generated from protobuf enum VALIDATE_ONLY = 1; - */ - const VALIDATE_ONLY = 1; - /** - * Only populates - * [OptimizeToursResponse.validation_errors][google.maps.routeoptimization.v1.OptimizeToursResponse.validation_errors] - * or - * [OptimizeToursResponse.skipped_shipments][google.maps.routeoptimization.v1.OptimizeToursResponse.skipped_shipments], - * and doesn't actually solve the rest of the request (`status` and `routes` - * are unset in the response). - * If infeasibilities in `injected_solution_constraint` routes are detected - * they are populated in the - * [OptimizeToursResponse.validation_errors][google.maps.routeoptimization.v1.OptimizeToursResponse.validation_errors] - * field and - * [OptimizeToursResponse.skipped_shipments][google.maps.routeoptimization.v1.OptimizeToursResponse.skipped_shipments] - * is left empty. - * *IMPORTANT*: not all infeasible shipments are returned here, but only the - * ones that are detected as infeasible during preprocessing. - * - * Generated from protobuf enum DETECT_SOME_INFEASIBLE_SHIPMENTS = 2; - */ - const DETECT_SOME_INFEASIBLE_SHIPMENTS = 2; - - private static $valueToName = [ - self::DEFAULT_SOLVE => 'DEFAULT_SOLVE', - self::VALIDATE_ONLY => 'VALIDATE_ONLY', - self::DETECT_SOME_INFEASIBLE_SHIPMENTS => 'DETECT_SOME_INFEASIBLE_SHIPMENTS', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SolvingMode::class, \Google\Maps\RouteOptimization\V1\OptimizeToursRequest_SolvingMode::class); - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursResponse.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursResponse.php deleted file mode 100644 index 4933ce254730..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursResponse.php +++ /dev/null @@ -1,243 +0,0 @@ -google.maps.routeoptimization.v1.OptimizeToursResponse - */ -class OptimizeToursResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Routes computed for each vehicle; the i-th route corresponds to the i-th - * vehicle in the model. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentRoute routes = 1; - */ - private $routes; - /** - * Copy of the - * [OptimizeToursRequest.label][google.maps.routeoptimization.v1.OptimizeToursRequest.label], - * if a label was specified in the request. - * - * Generated from protobuf field string request_label = 3; - */ - protected $request_label = ''; - /** - * The list of all shipments skipped. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.SkippedShipment skipped_shipments = 4; - */ - private $skipped_shipments; - /** - * List of all the validation errors that we were able to detect - * independently. See the "MULTIPLE ERRORS" explanation for the - * [OptimizeToursValidationError][google.maps.routeoptimization.v1.OptimizeToursValidationError] - * message. Instead of errors, this will include warnings in the case - * `solving_mode` is `DEFAULT_SOLVE`. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.OptimizeToursValidationError validation_errors = 5; - */ - private $validation_errors; - /** - * Duration, distance and usage metrics for this solution. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.OptimizeToursResponse.Metrics metrics = 6; - */ - protected $metrics = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Maps\RouteOptimization\V1\ShipmentRoute>|\Google\Protobuf\Internal\RepeatedField $routes - * Routes computed for each vehicle; the i-th route corresponds to the i-th - * vehicle in the model. - * @type string $request_label - * Copy of the - * [OptimizeToursRequest.label][google.maps.routeoptimization.v1.OptimizeToursRequest.label], - * if a label was specified in the request. - * @type array<\Google\Maps\RouteOptimization\V1\SkippedShipment>|\Google\Protobuf\Internal\RepeatedField $skipped_shipments - * The list of all shipments skipped. - * @type array<\Google\Maps\RouteOptimization\V1\OptimizeToursValidationError>|\Google\Protobuf\Internal\RepeatedField $validation_errors - * List of all the validation errors that we were able to detect - * independently. See the "MULTIPLE ERRORS" explanation for the - * [OptimizeToursValidationError][google.maps.routeoptimization.v1.OptimizeToursValidationError] - * message. Instead of errors, this will include warnings in the case - * `solving_mode` is `DEFAULT_SOLVE`. - * @type \Google\Maps\RouteOptimization\V1\OptimizeToursResponse\Metrics $metrics - * Duration, distance and usage metrics for this solution. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); - parent::__construct($data); - } - - /** - * Routes computed for each vehicle; the i-th route corresponds to the i-th - * vehicle in the model. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentRoute routes = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRoutes() - { - return $this->routes; - } - - /** - * Routes computed for each vehicle; the i-th route corresponds to the i-th - * vehicle in the model. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentRoute routes = 1; - * @param array<\Google\Maps\RouteOptimization\V1\ShipmentRoute>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRoutes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\ShipmentRoute::class); - $this->routes = $arr; - - return $this; - } - - /** - * Copy of the - * [OptimizeToursRequest.label][google.maps.routeoptimization.v1.OptimizeToursRequest.label], - * if a label was specified in the request. - * - * Generated from protobuf field string request_label = 3; - * @return string - */ - public function getRequestLabel() - { - return $this->request_label; - } - - /** - * Copy of the - * [OptimizeToursRequest.label][google.maps.routeoptimization.v1.OptimizeToursRequest.label], - * if a label was specified in the request. - * - * Generated from protobuf field string request_label = 3; - * @param string $var - * @return $this - */ - public function setRequestLabel($var) - { - GPBUtil::checkString($var, True); - $this->request_label = $var; - - return $this; - } - - /** - * The list of all shipments skipped. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.SkippedShipment skipped_shipments = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSkippedShipments() - { - return $this->skipped_shipments; - } - - /** - * The list of all shipments skipped. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.SkippedShipment skipped_shipments = 4; - * @param array<\Google\Maps\RouteOptimization\V1\SkippedShipment>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSkippedShipments($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\SkippedShipment::class); - $this->skipped_shipments = $arr; - - return $this; - } - - /** - * List of all the validation errors that we were able to detect - * independently. See the "MULTIPLE ERRORS" explanation for the - * [OptimizeToursValidationError][google.maps.routeoptimization.v1.OptimizeToursValidationError] - * message. Instead of errors, this will include warnings in the case - * `solving_mode` is `DEFAULT_SOLVE`. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.OptimizeToursValidationError validation_errors = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getValidationErrors() - { - return $this->validation_errors; - } - - /** - * List of all the validation errors that we were able to detect - * independently. See the "MULTIPLE ERRORS" explanation for the - * [OptimizeToursValidationError][google.maps.routeoptimization.v1.OptimizeToursValidationError] - * message. Instead of errors, this will include warnings in the case - * `solving_mode` is `DEFAULT_SOLVE`. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.OptimizeToursValidationError validation_errors = 5; - * @param array<\Google\Maps\RouteOptimization\V1\OptimizeToursValidationError>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setValidationErrors($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\OptimizeToursValidationError::class); - $this->validation_errors = $arr; - - return $this; - } - - /** - * Duration, distance and usage metrics for this solution. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.OptimizeToursResponse.Metrics metrics = 6; - * @return \Google\Maps\RouteOptimization\V1\OptimizeToursResponse\Metrics|null - */ - public function getMetrics() - { - return $this->metrics; - } - - public function hasMetrics() - { - return isset($this->metrics); - } - - public function clearMetrics() - { - unset($this->metrics); - } - - /** - * Duration, distance and usage metrics for this solution. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.OptimizeToursResponse.Metrics metrics = 6; - * @param \Google\Maps\RouteOptimization\V1\OptimizeToursResponse\Metrics $var - * @return $this - */ - public function setMetrics($var) - { - GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\OptimizeToursResponse\Metrics::class); - $this->metrics = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursResponse/Metrics.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursResponse/Metrics.php deleted file mode 100644 index 88e8bbb1cba8..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursResponse/Metrics.php +++ /dev/null @@ -1,372 +0,0 @@ -google.maps.routeoptimization.v1.OptimizeToursResponse.Metrics - */ -class Metrics extends \Google\Protobuf\Internal\Message -{ - /** - * Aggregated over the routes. Each metric is the sum (or max, for loads) - * over all - * [ShipmentRoute.metrics][google.maps.routeoptimization.v1.ShipmentRoute.metrics] - * fields of the same name. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.AggregatedMetrics aggregated_route_metrics = 1; - */ - protected $aggregated_route_metrics = null; - /** - * Number of mandatory shipments skipped. - * - * Generated from protobuf field int32 skipped_mandatory_shipment_count = 2; - */ - protected $skipped_mandatory_shipment_count = 0; - /** - * Number of vehicles used. Note: if a vehicle route is empty and - * [Vehicle.used_if_route_is_empty][google.maps.routeoptimization.v1.Vehicle.used_if_route_is_empty] - * is true, the vehicle is considered used. - * - * Generated from protobuf field int32 used_vehicle_count = 3; - */ - protected $used_vehicle_count = 0; - /** - * The earliest start time for a used vehicle, computed as the minimum over - * all used vehicles of - * [ShipmentRoute.vehicle_start_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_start_time]. - * - * Generated from protobuf field .google.protobuf.Timestamp earliest_vehicle_start_time = 4; - */ - protected $earliest_vehicle_start_time = null; - /** - * The latest end time for a used vehicle, computed as the maximum over all - * used vehicles of - * [ShipmentRoute.vehicle_end_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_end_time]. - * - * Generated from protobuf field .google.protobuf.Timestamp latest_vehicle_end_time = 5; - */ - protected $latest_vehicle_end_time = null; - /** - * Cost of the solution, broken down by cost-related request fields. - * The keys are proto paths, relative to the input OptimizeToursRequest, - * e.g. "model.shipments.pickups.cost", and the values are the total cost - * generated by the corresponding cost field, aggregated over the whole - * solution. In other words, costs["model.shipments.pickups.cost"] is the - * sum of all pickup costs over the solution. All costs defined in the model - * are reported in detail here with the exception of costs related to - * TransitionAttributes that are only reported in an aggregated way as of - * 2022/01. - * - * Generated from protobuf field map costs = 10; - */ - private $costs; - /** - * Total cost of the solution. The sum of all values in the costs map. - * - * Generated from protobuf field double total_cost = 6; - */ - protected $total_cost = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Maps\RouteOptimization\V1\AggregatedMetrics $aggregated_route_metrics - * Aggregated over the routes. Each metric is the sum (or max, for loads) - * over all - * [ShipmentRoute.metrics][google.maps.routeoptimization.v1.ShipmentRoute.metrics] - * fields of the same name. - * @type int $skipped_mandatory_shipment_count - * Number of mandatory shipments skipped. - * @type int $used_vehicle_count - * Number of vehicles used. Note: if a vehicle route is empty and - * [Vehicle.used_if_route_is_empty][google.maps.routeoptimization.v1.Vehicle.used_if_route_is_empty] - * is true, the vehicle is considered used. - * @type \Google\Protobuf\Timestamp $earliest_vehicle_start_time - * The earliest start time for a used vehicle, computed as the minimum over - * all used vehicles of - * [ShipmentRoute.vehicle_start_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_start_time]. - * @type \Google\Protobuf\Timestamp $latest_vehicle_end_time - * The latest end time for a used vehicle, computed as the maximum over all - * used vehicles of - * [ShipmentRoute.vehicle_end_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_end_time]. - * @type array|\Google\Protobuf\Internal\MapField $costs - * Cost of the solution, broken down by cost-related request fields. - * The keys are proto paths, relative to the input OptimizeToursRequest, - * e.g. "model.shipments.pickups.cost", and the values are the total cost - * generated by the corresponding cost field, aggregated over the whole - * solution. In other words, costs["model.shipments.pickups.cost"] is the - * sum of all pickup costs over the solution. All costs defined in the model - * are reported in detail here with the exception of costs related to - * TransitionAttributes that are only reported in an aggregated way as of - * 2022/01. - * @type float $total_cost - * Total cost of the solution. The sum of all values in the costs map. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); - parent::__construct($data); - } - - /** - * Aggregated over the routes. Each metric is the sum (or max, for loads) - * over all - * [ShipmentRoute.metrics][google.maps.routeoptimization.v1.ShipmentRoute.metrics] - * fields of the same name. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.AggregatedMetrics aggregated_route_metrics = 1; - * @return \Google\Maps\RouteOptimization\V1\AggregatedMetrics|null - */ - public function getAggregatedRouteMetrics() - { - return $this->aggregated_route_metrics; - } - - public function hasAggregatedRouteMetrics() - { - return isset($this->aggregated_route_metrics); - } - - public function clearAggregatedRouteMetrics() - { - unset($this->aggregated_route_metrics); - } - - /** - * Aggregated over the routes. Each metric is the sum (or max, for loads) - * over all - * [ShipmentRoute.metrics][google.maps.routeoptimization.v1.ShipmentRoute.metrics] - * fields of the same name. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.AggregatedMetrics aggregated_route_metrics = 1; - * @param \Google\Maps\RouteOptimization\V1\AggregatedMetrics $var - * @return $this - */ - public function setAggregatedRouteMetrics($var) - { - GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\AggregatedMetrics::class); - $this->aggregated_route_metrics = $var; - - return $this; - } - - /** - * Number of mandatory shipments skipped. - * - * Generated from protobuf field int32 skipped_mandatory_shipment_count = 2; - * @return int - */ - public function getSkippedMandatoryShipmentCount() - { - return $this->skipped_mandatory_shipment_count; - } - - /** - * Number of mandatory shipments skipped. - * - * Generated from protobuf field int32 skipped_mandatory_shipment_count = 2; - * @param int $var - * @return $this - */ - public function setSkippedMandatoryShipmentCount($var) - { - GPBUtil::checkInt32($var); - $this->skipped_mandatory_shipment_count = $var; - - return $this; - } - - /** - * Number of vehicles used. Note: if a vehicle route is empty and - * [Vehicle.used_if_route_is_empty][google.maps.routeoptimization.v1.Vehicle.used_if_route_is_empty] - * is true, the vehicle is considered used. - * - * Generated from protobuf field int32 used_vehicle_count = 3; - * @return int - */ - public function getUsedVehicleCount() - { - return $this->used_vehicle_count; - } - - /** - * Number of vehicles used. Note: if a vehicle route is empty and - * [Vehicle.used_if_route_is_empty][google.maps.routeoptimization.v1.Vehicle.used_if_route_is_empty] - * is true, the vehicle is considered used. - * - * Generated from protobuf field int32 used_vehicle_count = 3; - * @param int $var - * @return $this - */ - public function setUsedVehicleCount($var) - { - GPBUtil::checkInt32($var); - $this->used_vehicle_count = $var; - - return $this; - } - - /** - * The earliest start time for a used vehicle, computed as the minimum over - * all used vehicles of - * [ShipmentRoute.vehicle_start_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_start_time]. - * - * Generated from protobuf field .google.protobuf.Timestamp earliest_vehicle_start_time = 4; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEarliestVehicleStartTime() - { - return $this->earliest_vehicle_start_time; - } - - public function hasEarliestVehicleStartTime() - { - return isset($this->earliest_vehicle_start_time); - } - - public function clearEarliestVehicleStartTime() - { - unset($this->earliest_vehicle_start_time); - } - - /** - * The earliest start time for a used vehicle, computed as the minimum over - * all used vehicles of - * [ShipmentRoute.vehicle_start_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_start_time]. - * - * Generated from protobuf field .google.protobuf.Timestamp earliest_vehicle_start_time = 4; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEarliestVehicleStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->earliest_vehicle_start_time = $var; - - return $this; - } - - /** - * The latest end time for a used vehicle, computed as the maximum over all - * used vehicles of - * [ShipmentRoute.vehicle_end_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_end_time]. - * - * Generated from protobuf field .google.protobuf.Timestamp latest_vehicle_end_time = 5; - * @return \Google\Protobuf\Timestamp|null - */ - public function getLatestVehicleEndTime() - { - return $this->latest_vehicle_end_time; - } - - public function hasLatestVehicleEndTime() - { - return isset($this->latest_vehicle_end_time); - } - - public function clearLatestVehicleEndTime() - { - unset($this->latest_vehicle_end_time); - } - - /** - * The latest end time for a used vehicle, computed as the maximum over all - * used vehicles of - * [ShipmentRoute.vehicle_end_time][google.maps.routeoptimization.v1.ShipmentRoute.vehicle_end_time]. - * - * Generated from protobuf field .google.protobuf.Timestamp latest_vehicle_end_time = 5; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setLatestVehicleEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->latest_vehicle_end_time = $var; - - return $this; - } - - /** - * Cost of the solution, broken down by cost-related request fields. - * The keys are proto paths, relative to the input OptimizeToursRequest, - * e.g. "model.shipments.pickups.cost", and the values are the total cost - * generated by the corresponding cost field, aggregated over the whole - * solution. In other words, costs["model.shipments.pickups.cost"] is the - * sum of all pickup costs over the solution. All costs defined in the model - * are reported in detail here with the exception of costs related to - * TransitionAttributes that are only reported in an aggregated way as of - * 2022/01. - * - * Generated from protobuf field map costs = 10; - * @return \Google\Protobuf\Internal\MapField - */ - public function getCosts() - { - return $this->costs; - } - - /** - * Cost of the solution, broken down by cost-related request fields. - * The keys are proto paths, relative to the input OptimizeToursRequest, - * e.g. "model.shipments.pickups.cost", and the values are the total cost - * generated by the corresponding cost field, aggregated over the whole - * solution. In other words, costs["model.shipments.pickups.cost"] is the - * sum of all pickup costs over the solution. All costs defined in the model - * are reported in detail here with the exception of costs related to - * TransitionAttributes that are only reported in an aggregated way as of - * 2022/01. - * - * Generated from protobuf field map costs = 10; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setCosts($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::DOUBLE); - $this->costs = $arr; - - return $this; - } - - /** - * Total cost of the solution. The sum of all values in the costs map. - * - * Generated from protobuf field double total_cost = 6; - * @return float - */ - public function getTotalCost() - { - return $this->total_cost; - } - - /** - * Total cost of the solution. The sum of all values in the costs map. - * - * Generated from protobuf field double total_cost = 6; - * @param float $var - * @return $this - */ - public function setTotalCost($var) - { - GPBUtil::checkDouble($var); - $this->total_cost = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Metrics::class, \Google\Maps\RouteOptimization\V1\OptimizeToursResponse_Metrics::class); - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursValidationError.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursValidationError.php deleted file mode 100644 index 8f2ad51ee288..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursValidationError.php +++ /dev/null @@ -1,316 +0,0 @@ -google.maps.routeoptimization.v1.OptimizeToursValidationError - */ -class OptimizeToursValidationError extends \Google\Protobuf\Internal\Message -{ - /** - * A validation error is defined by the pair (`code`, `display_name`) which - * are always present. - * The fields following this section provide more context about the error. - * *MULTIPLE ERRORS*: - * When there are multiple errors, the validation process tries to output - * several of them. Much like a compiler, this is an imperfect process. Some - * validation errors will be "fatal", meaning that they stop the entire - * validation process. This is the case for `display_name="UNSPECIFIED"` - * errors, among others. Some errors may cause the validation process to skip - * other errors. - * *STABILITY*: - * `code` and `display_name` should be very stable. But new codes and - * display names may appear over time, which may cause a given (invalid) - * request to yield a different (`code`, `display_name`) pair because the new - * error hid the old one. For example, see "MULTIPLE ERRORS". - * - * Generated from protobuf field int32 code = 1; - */ - protected $code = 0; - /** - * The error display name. - * - * Generated from protobuf field string display_name = 2; - */ - protected $display_name = ''; - /** - * An error context may involve 0, 1 (most of the time) or more fields. For - * example, referring to vehicle #4 and shipment #2's first pickup can be - * done as follows: - * ``` - * fields { name: "vehicles" index: 4} - * fields { name: "shipments" index: 2 sub_field {name: "pickups" index: 0} } - * ``` - * Note, however, that the cardinality of `fields` should not change for a - * given error code. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference fields = 3; - */ - private $fields; - /** - * Human-readable string describing the error. There is a 1:1 mapping - * between `code` and `error_message` (when code != "UNSPECIFIED"). - * *STABILITY*: Not stable: the error message associated to a given `code` may - * change (hopefully to clarify it) over time. Please rely on the - * `display_name` and `code` instead. - * - * Generated from protobuf field string error_message = 4; - */ - protected $error_message = ''; - /** - * May contain the value(s) of the field(s). This is not always available. You - * should absolutely not rely on it and use it only for manual model - * debugging. - * - * Generated from protobuf field string offending_values = 5; - */ - protected $offending_values = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $code - * A validation error is defined by the pair (`code`, `display_name`) which - * are always present. - * The fields following this section provide more context about the error. - * *MULTIPLE ERRORS*: - * When there are multiple errors, the validation process tries to output - * several of them. Much like a compiler, this is an imperfect process. Some - * validation errors will be "fatal", meaning that they stop the entire - * validation process. This is the case for `display_name="UNSPECIFIED"` - * errors, among others. Some errors may cause the validation process to skip - * other errors. - * *STABILITY*: - * `code` and `display_name` should be very stable. But new codes and - * display names may appear over time, which may cause a given (invalid) - * request to yield a different (`code`, `display_name`) pair because the new - * error hid the old one. For example, see "MULTIPLE ERRORS". - * @type string $display_name - * The error display name. - * @type array<\Google\Maps\RouteOptimization\V1\OptimizeToursValidationError\FieldReference>|\Google\Protobuf\Internal\RepeatedField $fields - * An error context may involve 0, 1 (most of the time) or more fields. For - * example, referring to vehicle #4 and shipment #2's first pickup can be - * done as follows: - * ``` - * fields { name: "vehicles" index: 4} - * fields { name: "shipments" index: 2 sub_field {name: "pickups" index: 0} } - * ``` - * Note, however, that the cardinality of `fields` should not change for a - * given error code. - * @type string $error_message - * Human-readable string describing the error. There is a 1:1 mapping - * between `code` and `error_message` (when code != "UNSPECIFIED"). - * *STABILITY*: Not stable: the error message associated to a given `code` may - * change (hopefully to clarify it) over time. Please rely on the - * `display_name` and `code` instead. - * @type string $offending_values - * May contain the value(s) of the field(s). This is not always available. You - * should absolutely not rely on it and use it only for manual model - * debugging. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); - parent::__construct($data); - } - - /** - * A validation error is defined by the pair (`code`, `display_name`) which - * are always present. - * The fields following this section provide more context about the error. - * *MULTIPLE ERRORS*: - * When there are multiple errors, the validation process tries to output - * several of them. Much like a compiler, this is an imperfect process. Some - * validation errors will be "fatal", meaning that they stop the entire - * validation process. This is the case for `display_name="UNSPECIFIED"` - * errors, among others. Some errors may cause the validation process to skip - * other errors. - * *STABILITY*: - * `code` and `display_name` should be very stable. But new codes and - * display names may appear over time, which may cause a given (invalid) - * request to yield a different (`code`, `display_name`) pair because the new - * error hid the old one. For example, see "MULTIPLE ERRORS". - * - * Generated from protobuf field int32 code = 1; - * @return int - */ - public function getCode() - { - return $this->code; - } - - /** - * A validation error is defined by the pair (`code`, `display_name`) which - * are always present. - * The fields following this section provide more context about the error. - * *MULTIPLE ERRORS*: - * When there are multiple errors, the validation process tries to output - * several of them. Much like a compiler, this is an imperfect process. Some - * validation errors will be "fatal", meaning that they stop the entire - * validation process. This is the case for `display_name="UNSPECIFIED"` - * errors, among others. Some errors may cause the validation process to skip - * other errors. - * *STABILITY*: - * `code` and `display_name` should be very stable. But new codes and - * display names may appear over time, which may cause a given (invalid) - * request to yield a different (`code`, `display_name`) pair because the new - * error hid the old one. For example, see "MULTIPLE ERRORS". - * - * Generated from protobuf field int32 code = 1; - * @param int $var - * @return $this - */ - public function setCode($var) - { - GPBUtil::checkInt32($var); - $this->code = $var; - - return $this; - } - - /** - * The error display name. - * - * Generated from protobuf field string display_name = 2; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * The error display name. - * - * Generated from protobuf field string display_name = 2; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * An error context may involve 0, 1 (most of the time) or more fields. For - * example, referring to vehicle #4 and shipment #2's first pickup can be - * done as follows: - * ``` - * fields { name: "vehicles" index: 4} - * fields { name: "shipments" index: 2 sub_field {name: "pickups" index: 0} } - * ``` - * Note, however, that the cardinality of `fields` should not change for a - * given error code. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference fields = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFields() - { - return $this->fields; - } - - /** - * An error context may involve 0, 1 (most of the time) or more fields. For - * example, referring to vehicle #4 and shipment #2's first pickup can be - * done as follows: - * ``` - * fields { name: "vehicles" index: 4} - * fields { name: "shipments" index: 2 sub_field {name: "pickups" index: 0} } - * ``` - * Note, however, that the cardinality of `fields` should not change for a - * given error code. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference fields = 3; - * @param array<\Google\Maps\RouteOptimization\V1\OptimizeToursValidationError\FieldReference>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFields($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\OptimizeToursValidationError\FieldReference::class); - $this->fields = $arr; - - return $this; - } - - /** - * Human-readable string describing the error. There is a 1:1 mapping - * between `code` and `error_message` (when code != "UNSPECIFIED"). - * *STABILITY*: Not stable: the error message associated to a given `code` may - * change (hopefully to clarify it) over time. Please rely on the - * `display_name` and `code` instead. - * - * Generated from protobuf field string error_message = 4; - * @return string - */ - public function getErrorMessage() - { - return $this->error_message; - } - - /** - * Human-readable string describing the error. There is a 1:1 mapping - * between `code` and `error_message` (when code != "UNSPECIFIED"). - * *STABILITY*: Not stable: the error message associated to a given `code` may - * change (hopefully to clarify it) over time. Please rely on the - * `display_name` and `code` instead. - * - * Generated from protobuf field string error_message = 4; - * @param string $var - * @return $this - */ - public function setErrorMessage($var) - { - GPBUtil::checkString($var, True); - $this->error_message = $var; - - return $this; - } - - /** - * May contain the value(s) of the field(s). This is not always available. You - * should absolutely not rely on it and use it only for manual model - * debugging. - * - * Generated from protobuf field string offending_values = 5; - * @return string - */ - public function getOffendingValues() - { - return $this->offending_values; - } - - /** - * May contain the value(s) of the field(s). This is not always available. You - * should absolutely not rely on it and use it only for manual model - * debugging. - * - * Generated from protobuf field string offending_values = 5; - * @param string $var - * @return $this - */ - public function setOffendingValues($var) - { - GPBUtil::checkString($var, True); - $this->offending_values = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursValidationError/FieldReference.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursValidationError/FieldReference.php deleted file mode 100644 index 0956451618ea..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OptimizeToursValidationError/FieldReference.php +++ /dev/null @@ -1,197 +0,0 @@ -google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference - */ -class FieldReference extends \Google\Protobuf\Internal\Message -{ - /** - * Name of the field, e.g., "vehicles". - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Recursively nested sub-field, if needed. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference sub_field = 3; - */ - protected $sub_field = null; - protected $index_or_key; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Name of the field, e.g., "vehicles". - * @type int $index - * Index of the field if repeated. - * @type string $key - * Key if the field is a map. - * @type \Google\Maps\RouteOptimization\V1\OptimizeToursValidationError\FieldReference $sub_field - * Recursively nested sub-field, if needed. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); - parent::__construct($data); - } - - /** - * Name of the field, e.g., "vehicles". - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Name of the field, e.g., "vehicles". - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Index of the field if repeated. - * - * Generated from protobuf field int32 index = 2; - * @return int - */ - public function getIndex() - { - return $this->readOneof(2); - } - - public function hasIndex() - { - return $this->hasOneof(2); - } - - /** - * Index of the field if repeated. - * - * Generated from protobuf field int32 index = 2; - * @param int $var - * @return $this - */ - public function setIndex($var) - { - GPBUtil::checkInt32($var); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Key if the field is a map. - * - * Generated from protobuf field string key = 4; - * @return string - */ - public function getKey() - { - return $this->readOneof(4); - } - - public function hasKey() - { - return $this->hasOneof(4); - } - - /** - * Key if the field is a map. - * - * Generated from protobuf field string key = 4; - * @param string $var - * @return $this - */ - public function setKey($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Recursively nested sub-field, if needed. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference sub_field = 3; - * @return \Google\Maps\RouteOptimization\V1\OptimizeToursValidationError\FieldReference|null - */ - public function getSubField() - { - return $this->sub_field; - } - - public function hasSubField() - { - return isset($this->sub_field); - } - - public function clearSubField() - { - unset($this->sub_field); - } - - /** - * Recursively nested sub-field, if needed. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.OptimizeToursValidationError.FieldReference sub_field = 3; - * @param \Google\Maps\RouteOptimization\V1\OptimizeToursValidationError\FieldReference $var - * @return $this - */ - public function setSubField($var) - { - GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\OptimizeToursValidationError\FieldReference::class); - $this->sub_field = $var; - - return $this; - } - - /** - * @return string - */ - public function getIndexOrKey() - { - return $this->whichOneof("index_or_key"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(FieldReference::class, \Google\Maps\RouteOptimization\V1\OptimizeToursValidationError_FieldReference::class); - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OutputConfig.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OutputConfig.php deleted file mode 100644 index 7ed7e0a1d93f..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/OutputConfig.php +++ /dev/null @@ -1,111 +0,0 @@ -google.maps.routeoptimization.v1.OutputConfig - */ -class OutputConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The output data format. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.DataFormat data_format = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $data_format = 0; - protected $destination; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Maps\RouteOptimization\V1\GcsDestination $gcs_destination - * The Google Cloud Storage location to write the output to. - * @type int $data_format - * Required. The output data format. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); - parent::__construct($data); - } - - /** - * The Google Cloud Storage location to write the output to. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.GcsDestination gcs_destination = 1; - * @return \Google\Maps\RouteOptimization\V1\GcsDestination|null - */ - public function getGcsDestination() - { - return $this->readOneof(1); - } - - public function hasGcsDestination() - { - return $this->hasOneof(1); - } - - /** - * The Google Cloud Storage location to write the output to. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.GcsDestination gcs_destination = 1; - * @param \Google\Maps\RouteOptimization\V1\GcsDestination $var - * @return $this - */ - public function setGcsDestination($var) - { - GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\GcsDestination::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Required. The output data format. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.DataFormat data_format = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getDataFormat() - { - return $this->data_format; - } - - /** - * Required. The output data format. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.DataFormat data_format = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setDataFormat($var) - { - GPBUtil::checkEnum($var, \Google\Maps\RouteOptimization\V1\DataFormat::class); - $this->data_format = $var; - - return $this; - } - - /** - * @return string - */ - public function getDestination() - { - return $this->whichOneof("destination"); - } - -} - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/RouteModifiers.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/RouteModifiers.php deleted file mode 100644 index 941420fd652c..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/RouteModifiers.php +++ /dev/null @@ -1,204 +0,0 @@ -google.maps.routeoptimization.v1.RouteModifiers - */ -class RouteModifiers extends \Google\Protobuf\Internal\Message -{ - /** - * Specifies whether to avoid toll roads where reasonable. Preference will be - * given to routes not containing toll roads. Applies only to motorized travel - * modes. - * - * Generated from protobuf field bool avoid_tolls = 2; - */ - protected $avoid_tolls = false; - /** - * Specifies whether to avoid highways where reasonable. Preference will be - * given to routes not containing highways. Applies only to motorized travel - * modes. - * - * Generated from protobuf field bool avoid_highways = 3; - */ - protected $avoid_highways = false; - /** - * Specifies whether to avoid ferries where reasonable. Preference will be - * given to routes not containing travel by ferries. Applies only to motorized - * travel modes. - * - * Generated from protobuf field bool avoid_ferries = 4; - */ - protected $avoid_ferries = false; - /** - * Optional. Specifies whether to avoid navigating indoors where reasonable. - * Preference will be given to routes not containing indoor navigation. - * Applies only to the `WALKING` travel mode. - * - * Generated from protobuf field bool avoid_indoor = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $avoid_indoor = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $avoid_tolls - * Specifies whether to avoid toll roads where reasonable. Preference will be - * given to routes not containing toll roads. Applies only to motorized travel - * modes. - * @type bool $avoid_highways - * Specifies whether to avoid highways where reasonable. Preference will be - * given to routes not containing highways. Applies only to motorized travel - * modes. - * @type bool $avoid_ferries - * Specifies whether to avoid ferries where reasonable. Preference will be - * given to routes not containing travel by ferries. Applies only to motorized - * travel modes. - * @type bool $avoid_indoor - * Optional. Specifies whether to avoid navigating indoors where reasonable. - * Preference will be given to routes not containing indoor navigation. - * Applies only to the `WALKING` travel mode. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); - parent::__construct($data); - } - - /** - * Specifies whether to avoid toll roads where reasonable. Preference will be - * given to routes not containing toll roads. Applies only to motorized travel - * modes. - * - * Generated from protobuf field bool avoid_tolls = 2; - * @return bool - */ - public function getAvoidTolls() - { - return $this->avoid_tolls; - } - - /** - * Specifies whether to avoid toll roads where reasonable. Preference will be - * given to routes not containing toll roads. Applies only to motorized travel - * modes. - * - * Generated from protobuf field bool avoid_tolls = 2; - * @param bool $var - * @return $this - */ - public function setAvoidTolls($var) - { - GPBUtil::checkBool($var); - $this->avoid_tolls = $var; - - return $this; - } - - /** - * Specifies whether to avoid highways where reasonable. Preference will be - * given to routes not containing highways. Applies only to motorized travel - * modes. - * - * Generated from protobuf field bool avoid_highways = 3; - * @return bool - */ - public function getAvoidHighways() - { - return $this->avoid_highways; - } - - /** - * Specifies whether to avoid highways where reasonable. Preference will be - * given to routes not containing highways. Applies only to motorized travel - * modes. - * - * Generated from protobuf field bool avoid_highways = 3; - * @param bool $var - * @return $this - */ - public function setAvoidHighways($var) - { - GPBUtil::checkBool($var); - $this->avoid_highways = $var; - - return $this; - } - - /** - * Specifies whether to avoid ferries where reasonable. Preference will be - * given to routes not containing travel by ferries. Applies only to motorized - * travel modes. - * - * Generated from protobuf field bool avoid_ferries = 4; - * @return bool - */ - public function getAvoidFerries() - { - return $this->avoid_ferries; - } - - /** - * Specifies whether to avoid ferries where reasonable. Preference will be - * given to routes not containing travel by ferries. Applies only to motorized - * travel modes. - * - * Generated from protobuf field bool avoid_ferries = 4; - * @param bool $var - * @return $this - */ - public function setAvoidFerries($var) - { - GPBUtil::checkBool($var); - $this->avoid_ferries = $var; - - return $this; - } - - /** - * Optional. Specifies whether to avoid navigating indoors where reasonable. - * Preference will be given to routes not containing indoor navigation. - * Applies only to the `WALKING` travel mode. - * - * Generated from protobuf field bool avoid_indoor = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getAvoidIndoor() - { - return $this->avoid_indoor; - } - - /** - * Optional. Specifies whether to avoid navigating indoors where reasonable. - * Preference will be given to routes not containing indoor navigation. - * Applies only to the `WALKING` travel mode. - * - * Generated from protobuf field bool avoid_indoor = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setAvoidIndoor($var) - { - GPBUtil::checkBool($var); - $this->avoid_indoor = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Shipment.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Shipment.php deleted file mode 100644 index c3de173e6cc8..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Shipment.php +++ /dev/null @@ -1,841 +0,0 @@ -google.maps.routeoptimization.v1.Shipment - */ -class Shipment extends \Google\Protobuf\Internal\Message -{ - /** - * The user-defined display name of the shipment. - * It can be up to 63 characters long and may use UTF-8 characters. - * - * Generated from protobuf field string display_name = 16; - */ - protected $display_name = ''; - /** - * Set of pickup alternatives associated to the shipment. If not specified, - * the vehicle only needs to visit a location corresponding to the deliveries. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.Shipment.VisitRequest pickups = 1; - */ - private $pickups; - /** - * Set of delivery alternatives associated to the shipment. If not specified, - * the vehicle only needs to visit a location corresponding to the pickups. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.Shipment.VisitRequest deliveries = 2; - */ - private $deliveries; - /** - * Load demands of the shipment (for example weight, volume, number of - * pallets etc). The keys in the map should be identifiers describing the type - * of the corresponding load, ideally also including the units. - * For example: "weight_kg", "volume_gallons", "pallet_count", etc. - * If a given key does not appear in the map, the corresponding load is - * considered as null. - * - * Generated from protobuf field map load_demands = 14; - */ - private $load_demands; - /** - * If the shipment is not completed, this penalty is added to the overall - * cost of the routes. A shipment is considered completed if one of its pickup - * and delivery alternatives is visited. The cost may be expressed in the - * same unit used for all other cost-related fields in the model and must be - * positive. - * *IMPORTANT*: If this penalty is not specified, it is considered infinite, - * i.e. the shipment must be completed. - * - * Generated from protobuf field optional double penalty_cost = 4; - */ - protected $penalty_cost = null; - /** - * The set of vehicles that may perform this shipment. If empty, all vehicles - * may perform it. Vehicles are given by their index in the `ShipmentModel`'s - * `vehicles` list. - * - * Generated from protobuf field repeated int32 allowed_vehicle_indices = 5; - */ - private $allowed_vehicle_indices; - /** - * Specifies the cost that is incurred when this shipment is delivered by each - * vehicle. If specified, it must have EITHER: - * * the same number of elements as `costs_per_vehicle_indices`. - * `costs_per_vehicle[i]` corresponds to vehicle - * `costs_per_vehicle_indices[i]` of the model. - * * the same number of elements as there are vehicles in the model. The - * i-th element corresponds to vehicle #i of the model. - * These costs must be in the same unit as `penalty_cost` and must not be - * negative. Leave this field empty, if there are no such costs. - * - * Generated from protobuf field repeated double costs_per_vehicle = 6; - */ - private $costs_per_vehicle; - /** - * Indices of the vehicles to which `costs_per_vehicle` applies. If non-empty, - * it must have the same number of elements as `costs_per_vehicle`. A vehicle - * index may not be specified more than once. If a vehicle is excluded from - * `costs_per_vehicle_indices`, its cost is zero. - * - * Generated from protobuf field repeated int32 costs_per_vehicle_indices = 7; - */ - private $costs_per_vehicle_indices; - /** - * Specifies the maximum relative detour time compared to the shortest path - * from pickup to delivery. If specified, it must be nonnegative, and the - * shipment must contain at least a pickup and a delivery. - * For example, let t be the shortest time taken to go from the selected - * pickup alternative directly to the selected delivery alternative. Then - * setting `pickup_to_delivery_relative_detour_limit` enforces: - * ``` - * start_time(delivery) - start_time(pickup) <= - * std::ceil(t * (1.0 + pickup_to_delivery_relative_detour_limit)) - * ``` - * If both relative and absolute limits are specified on the same shipment, - * the more constraining limit is used for each possible pickup/delivery pair. - * As of 2017/10, detours are only supported when travel durations do not - * depend on vehicles. - * - * Generated from protobuf field optional double pickup_to_delivery_relative_detour_limit = 8; - */ - protected $pickup_to_delivery_relative_detour_limit = null; - /** - * Specifies the maximum absolute detour time compared to the shortest path - * from pickup to delivery. If specified, it must be nonnegative, and the - * shipment must contain at least a pickup and a delivery. - * For example, let t be the shortest time taken to go from the selected - * pickup alternative directly to the selected delivery alternative. Then - * setting `pickup_to_delivery_absolute_detour_limit` enforces: - * ``` - * start_time(delivery) - start_time(pickup) <= - * t + pickup_to_delivery_absolute_detour_limit - * ``` - * If both relative and absolute limits are specified on the same shipment, - * the more constraining limit is used for each possible pickup/delivery pair. - * As of 2017/10, detours are only supported when travel durations do not - * depend on vehicles. - * - * Generated from protobuf field .google.protobuf.Duration pickup_to_delivery_absolute_detour_limit = 9; - */ - protected $pickup_to_delivery_absolute_detour_limit = null; - /** - * Specifies the maximum duration from start of pickup to start of delivery of - * a shipment. If specified, it must be nonnegative, and the shipment must - * contain at least a pickup and a delivery. This does not depend on which - * alternatives are selected for pickup and delivery, nor on vehicle speed. - * This can be specified alongside maximum detour constraints: the solution - * will respect both specifications. - * - * Generated from protobuf field .google.protobuf.Duration pickup_to_delivery_time_limit = 10; - */ - protected $pickup_to_delivery_time_limit = null; - /** - * Non-empty string specifying a "type" for this shipment. - * This feature can be used to define incompatibilities or requirements - * between `shipment_types` (see `shipment_type_incompatibilities` and - * `shipment_type_requirements` in `ShipmentModel`). - * Differs from `visit_types` which is specified for a single visit: All - * pickup/deliveries belonging to the same shipment share the same - * `shipment_type`. - * - * Generated from protobuf field string shipment_type = 11; - */ - protected $shipment_type = ''; - /** - * Specifies a label for this shipment. This label is reported in the response - * in the `shipment_label` of the corresponding - * [ShipmentRoute.Visit][google.maps.routeoptimization.v1.ShipmentRoute.Visit]. - * - * Generated from protobuf field string label = 12; - */ - protected $label = ''; - /** - * If true, skip this shipment, but don't apply a `penalty_cost`. - * Ignoring a shipment results in a validation error when there are any - * `shipment_type_requirements` in the model. - * Ignoring a shipment that is performed in `injected_first_solution_routes` - * or `injected_solution_constraint` is permitted; the solver removes the - * related pickup/delivery visits from the performing route. - * `precedence_rules` that reference ignored shipments will also be ignored. - * - * Generated from protobuf field bool ignore = 13; - */ - protected $ignore = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $display_name - * The user-defined display name of the shipment. - * It can be up to 63 characters long and may use UTF-8 characters. - * @type array<\Google\Maps\RouteOptimization\V1\Shipment\VisitRequest>|\Google\Protobuf\Internal\RepeatedField $pickups - * Set of pickup alternatives associated to the shipment. If not specified, - * the vehicle only needs to visit a location corresponding to the deliveries. - * @type array<\Google\Maps\RouteOptimization\V1\Shipment\VisitRequest>|\Google\Protobuf\Internal\RepeatedField $deliveries - * Set of delivery alternatives associated to the shipment. If not specified, - * the vehicle only needs to visit a location corresponding to the pickups. - * @type array|\Google\Protobuf\Internal\MapField $load_demands - * Load demands of the shipment (for example weight, volume, number of - * pallets etc). The keys in the map should be identifiers describing the type - * of the corresponding load, ideally also including the units. - * For example: "weight_kg", "volume_gallons", "pallet_count", etc. - * If a given key does not appear in the map, the corresponding load is - * considered as null. - * @type float $penalty_cost - * If the shipment is not completed, this penalty is added to the overall - * cost of the routes. A shipment is considered completed if one of its pickup - * and delivery alternatives is visited. The cost may be expressed in the - * same unit used for all other cost-related fields in the model and must be - * positive. - * *IMPORTANT*: If this penalty is not specified, it is considered infinite, - * i.e. the shipment must be completed. - * @type array|\Google\Protobuf\Internal\RepeatedField $allowed_vehicle_indices - * The set of vehicles that may perform this shipment. If empty, all vehicles - * may perform it. Vehicles are given by their index in the `ShipmentModel`'s - * `vehicles` list. - * @type array|\Google\Protobuf\Internal\RepeatedField $costs_per_vehicle - * Specifies the cost that is incurred when this shipment is delivered by each - * vehicle. If specified, it must have EITHER: - * * the same number of elements as `costs_per_vehicle_indices`. - * `costs_per_vehicle[i]` corresponds to vehicle - * `costs_per_vehicle_indices[i]` of the model. - * * the same number of elements as there are vehicles in the model. The - * i-th element corresponds to vehicle #i of the model. - * These costs must be in the same unit as `penalty_cost` and must not be - * negative. Leave this field empty, if there are no such costs. - * @type array|\Google\Protobuf\Internal\RepeatedField $costs_per_vehicle_indices - * Indices of the vehicles to which `costs_per_vehicle` applies. If non-empty, - * it must have the same number of elements as `costs_per_vehicle`. A vehicle - * index may not be specified more than once. If a vehicle is excluded from - * `costs_per_vehicle_indices`, its cost is zero. - * @type float $pickup_to_delivery_relative_detour_limit - * Specifies the maximum relative detour time compared to the shortest path - * from pickup to delivery. If specified, it must be nonnegative, and the - * shipment must contain at least a pickup and a delivery. - * For example, let t be the shortest time taken to go from the selected - * pickup alternative directly to the selected delivery alternative. Then - * setting `pickup_to_delivery_relative_detour_limit` enforces: - * ``` - * start_time(delivery) - start_time(pickup) <= - * std::ceil(t * (1.0 + pickup_to_delivery_relative_detour_limit)) - * ``` - * If both relative and absolute limits are specified on the same shipment, - * the more constraining limit is used for each possible pickup/delivery pair. - * As of 2017/10, detours are only supported when travel durations do not - * depend on vehicles. - * @type \Google\Protobuf\Duration $pickup_to_delivery_absolute_detour_limit - * Specifies the maximum absolute detour time compared to the shortest path - * from pickup to delivery. If specified, it must be nonnegative, and the - * shipment must contain at least a pickup and a delivery. - * For example, let t be the shortest time taken to go from the selected - * pickup alternative directly to the selected delivery alternative. Then - * setting `pickup_to_delivery_absolute_detour_limit` enforces: - * ``` - * start_time(delivery) - start_time(pickup) <= - * t + pickup_to_delivery_absolute_detour_limit - * ``` - * If both relative and absolute limits are specified on the same shipment, - * the more constraining limit is used for each possible pickup/delivery pair. - * As of 2017/10, detours are only supported when travel durations do not - * depend on vehicles. - * @type \Google\Protobuf\Duration $pickup_to_delivery_time_limit - * Specifies the maximum duration from start of pickup to start of delivery of - * a shipment. If specified, it must be nonnegative, and the shipment must - * contain at least a pickup and a delivery. This does not depend on which - * alternatives are selected for pickup and delivery, nor on vehicle speed. - * This can be specified alongside maximum detour constraints: the solution - * will respect both specifications. - * @type string $shipment_type - * Non-empty string specifying a "type" for this shipment. - * This feature can be used to define incompatibilities or requirements - * between `shipment_types` (see `shipment_type_incompatibilities` and - * `shipment_type_requirements` in `ShipmentModel`). - * Differs from `visit_types` which is specified for a single visit: All - * pickup/deliveries belonging to the same shipment share the same - * `shipment_type`. - * @type string $label - * Specifies a label for this shipment. This label is reported in the response - * in the `shipment_label` of the corresponding - * [ShipmentRoute.Visit][google.maps.routeoptimization.v1.ShipmentRoute.Visit]. - * @type bool $ignore - * If true, skip this shipment, but don't apply a `penalty_cost`. - * Ignoring a shipment results in a validation error when there are any - * `shipment_type_requirements` in the model. - * Ignoring a shipment that is performed in `injected_first_solution_routes` - * or `injected_solution_constraint` is permitted; the solver removes the - * related pickup/delivery visits from the performing route. - * `precedence_rules` that reference ignored shipments will also be ignored. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); - parent::__construct($data); - } - - /** - * The user-defined display name of the shipment. - * It can be up to 63 characters long and may use UTF-8 characters. - * - * Generated from protobuf field string display_name = 16; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * The user-defined display name of the shipment. - * It can be up to 63 characters long and may use UTF-8 characters. - * - * Generated from protobuf field string display_name = 16; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Set of pickup alternatives associated to the shipment. If not specified, - * the vehicle only needs to visit a location corresponding to the deliveries. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.Shipment.VisitRequest pickups = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPickups() - { - return $this->pickups; - } - - /** - * Set of pickup alternatives associated to the shipment. If not specified, - * the vehicle only needs to visit a location corresponding to the deliveries. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.Shipment.VisitRequest pickups = 1; - * @param array<\Google\Maps\RouteOptimization\V1\Shipment\VisitRequest>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPickups($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\Shipment\VisitRequest::class); - $this->pickups = $arr; - - return $this; - } - - /** - * Set of delivery alternatives associated to the shipment. If not specified, - * the vehicle only needs to visit a location corresponding to the pickups. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.Shipment.VisitRequest deliveries = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDeliveries() - { - return $this->deliveries; - } - - /** - * Set of delivery alternatives associated to the shipment. If not specified, - * the vehicle only needs to visit a location corresponding to the pickups. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.Shipment.VisitRequest deliveries = 2; - * @param array<\Google\Maps\RouteOptimization\V1\Shipment\VisitRequest>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDeliveries($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\Shipment\VisitRequest::class); - $this->deliveries = $arr; - - return $this; - } - - /** - * Load demands of the shipment (for example weight, volume, number of - * pallets etc). The keys in the map should be identifiers describing the type - * of the corresponding load, ideally also including the units. - * For example: "weight_kg", "volume_gallons", "pallet_count", etc. - * If a given key does not appear in the map, the corresponding load is - * considered as null. - * - * Generated from protobuf field map load_demands = 14; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLoadDemands() - { - return $this->load_demands; - } - - /** - * Load demands of the shipment (for example weight, volume, number of - * pallets etc). The keys in the map should be identifiers describing the type - * of the corresponding load, ideally also including the units. - * For example: "weight_kg", "volume_gallons", "pallet_count", etc. - * If a given key does not appear in the map, the corresponding load is - * considered as null. - * - * Generated from protobuf field map load_demands = 14; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLoadDemands($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\Shipment\Load::class); - $this->load_demands = $arr; - - return $this; - } - - /** - * If the shipment is not completed, this penalty is added to the overall - * cost of the routes. A shipment is considered completed if one of its pickup - * and delivery alternatives is visited. The cost may be expressed in the - * same unit used for all other cost-related fields in the model and must be - * positive. - * *IMPORTANT*: If this penalty is not specified, it is considered infinite, - * i.e. the shipment must be completed. - * - * Generated from protobuf field optional double penalty_cost = 4; - * @return float - */ - public function getPenaltyCost() - { - return isset($this->penalty_cost) ? $this->penalty_cost : 0.0; - } - - public function hasPenaltyCost() - { - return isset($this->penalty_cost); - } - - public function clearPenaltyCost() - { - unset($this->penalty_cost); - } - - /** - * If the shipment is not completed, this penalty is added to the overall - * cost of the routes. A shipment is considered completed if one of its pickup - * and delivery alternatives is visited. The cost may be expressed in the - * same unit used for all other cost-related fields in the model and must be - * positive. - * *IMPORTANT*: If this penalty is not specified, it is considered infinite, - * i.e. the shipment must be completed. - * - * Generated from protobuf field optional double penalty_cost = 4; - * @param float $var - * @return $this - */ - public function setPenaltyCost($var) - { - GPBUtil::checkDouble($var); - $this->penalty_cost = $var; - - return $this; - } - - /** - * The set of vehicles that may perform this shipment. If empty, all vehicles - * may perform it. Vehicles are given by their index in the `ShipmentModel`'s - * `vehicles` list. - * - * Generated from protobuf field repeated int32 allowed_vehicle_indices = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAllowedVehicleIndices() - { - return $this->allowed_vehicle_indices; - } - - /** - * The set of vehicles that may perform this shipment. If empty, all vehicles - * may perform it. Vehicles are given by their index in the `ShipmentModel`'s - * `vehicles` list. - * - * Generated from protobuf field repeated int32 allowed_vehicle_indices = 5; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAllowedVehicleIndices($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); - $this->allowed_vehicle_indices = $arr; - - return $this; - } - - /** - * Specifies the cost that is incurred when this shipment is delivered by each - * vehicle. If specified, it must have EITHER: - * * the same number of elements as `costs_per_vehicle_indices`. - * `costs_per_vehicle[i]` corresponds to vehicle - * `costs_per_vehicle_indices[i]` of the model. - * * the same number of elements as there are vehicles in the model. The - * i-th element corresponds to vehicle #i of the model. - * These costs must be in the same unit as `penalty_cost` and must not be - * negative. Leave this field empty, if there are no such costs. - * - * Generated from protobuf field repeated double costs_per_vehicle = 6; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCostsPerVehicle() - { - return $this->costs_per_vehicle; - } - - /** - * Specifies the cost that is incurred when this shipment is delivered by each - * vehicle. If specified, it must have EITHER: - * * the same number of elements as `costs_per_vehicle_indices`. - * `costs_per_vehicle[i]` corresponds to vehicle - * `costs_per_vehicle_indices[i]` of the model. - * * the same number of elements as there are vehicles in the model. The - * i-th element corresponds to vehicle #i of the model. - * These costs must be in the same unit as `penalty_cost` and must not be - * negative. Leave this field empty, if there are no such costs. - * - * Generated from protobuf field repeated double costs_per_vehicle = 6; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCostsPerVehicle($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::DOUBLE); - $this->costs_per_vehicle = $arr; - - return $this; - } - - /** - * Indices of the vehicles to which `costs_per_vehicle` applies. If non-empty, - * it must have the same number of elements as `costs_per_vehicle`. A vehicle - * index may not be specified more than once. If a vehicle is excluded from - * `costs_per_vehicle_indices`, its cost is zero. - * - * Generated from protobuf field repeated int32 costs_per_vehicle_indices = 7; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCostsPerVehicleIndices() - { - return $this->costs_per_vehicle_indices; - } - - /** - * Indices of the vehicles to which `costs_per_vehicle` applies. If non-empty, - * it must have the same number of elements as `costs_per_vehicle`. A vehicle - * index may not be specified more than once. If a vehicle is excluded from - * `costs_per_vehicle_indices`, its cost is zero. - * - * Generated from protobuf field repeated int32 costs_per_vehicle_indices = 7; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCostsPerVehicleIndices($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); - $this->costs_per_vehicle_indices = $arr; - - return $this; - } - - /** - * Specifies the maximum relative detour time compared to the shortest path - * from pickup to delivery. If specified, it must be nonnegative, and the - * shipment must contain at least a pickup and a delivery. - * For example, let t be the shortest time taken to go from the selected - * pickup alternative directly to the selected delivery alternative. Then - * setting `pickup_to_delivery_relative_detour_limit` enforces: - * ``` - * start_time(delivery) - start_time(pickup) <= - * std::ceil(t * (1.0 + pickup_to_delivery_relative_detour_limit)) - * ``` - * If both relative and absolute limits are specified on the same shipment, - * the more constraining limit is used for each possible pickup/delivery pair. - * As of 2017/10, detours are only supported when travel durations do not - * depend on vehicles. - * - * Generated from protobuf field optional double pickup_to_delivery_relative_detour_limit = 8; - * @return float - */ - public function getPickupToDeliveryRelativeDetourLimit() - { - return isset($this->pickup_to_delivery_relative_detour_limit) ? $this->pickup_to_delivery_relative_detour_limit : 0.0; - } - - public function hasPickupToDeliveryRelativeDetourLimit() - { - return isset($this->pickup_to_delivery_relative_detour_limit); - } - - public function clearPickupToDeliveryRelativeDetourLimit() - { - unset($this->pickup_to_delivery_relative_detour_limit); - } - - /** - * Specifies the maximum relative detour time compared to the shortest path - * from pickup to delivery. If specified, it must be nonnegative, and the - * shipment must contain at least a pickup and a delivery. - * For example, let t be the shortest time taken to go from the selected - * pickup alternative directly to the selected delivery alternative. Then - * setting `pickup_to_delivery_relative_detour_limit` enforces: - * ``` - * start_time(delivery) - start_time(pickup) <= - * std::ceil(t * (1.0 + pickup_to_delivery_relative_detour_limit)) - * ``` - * If both relative and absolute limits are specified on the same shipment, - * the more constraining limit is used for each possible pickup/delivery pair. - * As of 2017/10, detours are only supported when travel durations do not - * depend on vehicles. - * - * Generated from protobuf field optional double pickup_to_delivery_relative_detour_limit = 8; - * @param float $var - * @return $this - */ - public function setPickupToDeliveryRelativeDetourLimit($var) - { - GPBUtil::checkDouble($var); - $this->pickup_to_delivery_relative_detour_limit = $var; - - return $this; - } - - /** - * Specifies the maximum absolute detour time compared to the shortest path - * from pickup to delivery. If specified, it must be nonnegative, and the - * shipment must contain at least a pickup and a delivery. - * For example, let t be the shortest time taken to go from the selected - * pickup alternative directly to the selected delivery alternative. Then - * setting `pickup_to_delivery_absolute_detour_limit` enforces: - * ``` - * start_time(delivery) - start_time(pickup) <= - * t + pickup_to_delivery_absolute_detour_limit - * ``` - * If both relative and absolute limits are specified on the same shipment, - * the more constraining limit is used for each possible pickup/delivery pair. - * As of 2017/10, detours are only supported when travel durations do not - * depend on vehicles. - * - * Generated from protobuf field .google.protobuf.Duration pickup_to_delivery_absolute_detour_limit = 9; - * @return \Google\Protobuf\Duration|null - */ - public function getPickupToDeliveryAbsoluteDetourLimit() - { - return $this->pickup_to_delivery_absolute_detour_limit; - } - - public function hasPickupToDeliveryAbsoluteDetourLimit() - { - return isset($this->pickup_to_delivery_absolute_detour_limit); - } - - public function clearPickupToDeliveryAbsoluteDetourLimit() - { - unset($this->pickup_to_delivery_absolute_detour_limit); - } - - /** - * Specifies the maximum absolute detour time compared to the shortest path - * from pickup to delivery. If specified, it must be nonnegative, and the - * shipment must contain at least a pickup and a delivery. - * For example, let t be the shortest time taken to go from the selected - * pickup alternative directly to the selected delivery alternative. Then - * setting `pickup_to_delivery_absolute_detour_limit` enforces: - * ``` - * start_time(delivery) - start_time(pickup) <= - * t + pickup_to_delivery_absolute_detour_limit - * ``` - * If both relative and absolute limits are specified on the same shipment, - * the more constraining limit is used for each possible pickup/delivery pair. - * As of 2017/10, detours are only supported when travel durations do not - * depend on vehicles. - * - * Generated from protobuf field .google.protobuf.Duration pickup_to_delivery_absolute_detour_limit = 9; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setPickupToDeliveryAbsoluteDetourLimit($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->pickup_to_delivery_absolute_detour_limit = $var; - - return $this; - } - - /** - * Specifies the maximum duration from start of pickup to start of delivery of - * a shipment. If specified, it must be nonnegative, and the shipment must - * contain at least a pickup and a delivery. This does not depend on which - * alternatives are selected for pickup and delivery, nor on vehicle speed. - * This can be specified alongside maximum detour constraints: the solution - * will respect both specifications. - * - * Generated from protobuf field .google.protobuf.Duration pickup_to_delivery_time_limit = 10; - * @return \Google\Protobuf\Duration|null - */ - public function getPickupToDeliveryTimeLimit() - { - return $this->pickup_to_delivery_time_limit; - } - - public function hasPickupToDeliveryTimeLimit() - { - return isset($this->pickup_to_delivery_time_limit); - } - - public function clearPickupToDeliveryTimeLimit() - { - unset($this->pickup_to_delivery_time_limit); - } - - /** - * Specifies the maximum duration from start of pickup to start of delivery of - * a shipment. If specified, it must be nonnegative, and the shipment must - * contain at least a pickup and a delivery. This does not depend on which - * alternatives are selected for pickup and delivery, nor on vehicle speed. - * This can be specified alongside maximum detour constraints: the solution - * will respect both specifications. - * - * Generated from protobuf field .google.protobuf.Duration pickup_to_delivery_time_limit = 10; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setPickupToDeliveryTimeLimit($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->pickup_to_delivery_time_limit = $var; - - return $this; - } - - /** - * Non-empty string specifying a "type" for this shipment. - * This feature can be used to define incompatibilities or requirements - * between `shipment_types` (see `shipment_type_incompatibilities` and - * `shipment_type_requirements` in `ShipmentModel`). - * Differs from `visit_types` which is specified for a single visit: All - * pickup/deliveries belonging to the same shipment share the same - * `shipment_type`. - * - * Generated from protobuf field string shipment_type = 11; - * @return string - */ - public function getShipmentType() - { - return $this->shipment_type; - } - - /** - * Non-empty string specifying a "type" for this shipment. - * This feature can be used to define incompatibilities or requirements - * between `shipment_types` (see `shipment_type_incompatibilities` and - * `shipment_type_requirements` in `ShipmentModel`). - * Differs from `visit_types` which is specified for a single visit: All - * pickup/deliveries belonging to the same shipment share the same - * `shipment_type`. - * - * Generated from protobuf field string shipment_type = 11; - * @param string $var - * @return $this - */ - public function setShipmentType($var) - { - GPBUtil::checkString($var, True); - $this->shipment_type = $var; - - return $this; - } - - /** - * Specifies a label for this shipment. This label is reported in the response - * in the `shipment_label` of the corresponding - * [ShipmentRoute.Visit][google.maps.routeoptimization.v1.ShipmentRoute.Visit]. - * - * Generated from protobuf field string label = 12; - * @return string - */ - public function getLabel() - { - return $this->label; - } - - /** - * Specifies a label for this shipment. This label is reported in the response - * in the `shipment_label` of the corresponding - * [ShipmentRoute.Visit][google.maps.routeoptimization.v1.ShipmentRoute.Visit]. - * - * Generated from protobuf field string label = 12; - * @param string $var - * @return $this - */ - public function setLabel($var) - { - GPBUtil::checkString($var, True); - $this->label = $var; - - return $this; - } - - /** - * If true, skip this shipment, but don't apply a `penalty_cost`. - * Ignoring a shipment results in a validation error when there are any - * `shipment_type_requirements` in the model. - * Ignoring a shipment that is performed in `injected_first_solution_routes` - * or `injected_solution_constraint` is permitted; the solver removes the - * related pickup/delivery visits from the performing route. - * `precedence_rules` that reference ignored shipments will also be ignored. - * - * Generated from protobuf field bool ignore = 13; - * @return bool - */ - public function getIgnore() - { - return $this->ignore; - } - - /** - * If true, skip this shipment, but don't apply a `penalty_cost`. - * Ignoring a shipment results in a validation error when there are any - * `shipment_type_requirements` in the model. - * Ignoring a shipment that is performed in `injected_first_solution_routes` - * or `injected_solution_constraint` is permitted; the solver removes the - * related pickup/delivery visits from the performing route. - * `precedence_rules` that reference ignored shipments will also be ignored. - * - * Generated from protobuf field bool ignore = 13; - * @param bool $var - * @return $this - */ - public function setIgnore($var) - { - GPBUtil::checkBool($var); - $this->ignore = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Shipment/Load.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Shipment/Load.php deleted file mode 100644 index dec1b28584e2..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Shipment/Load.php +++ /dev/null @@ -1,81 +0,0 @@ -google.maps.routeoptimization.v1.Shipment.Load - */ -class Load extends \Google\Protobuf\Internal\Message -{ - /** - * The amount by which the load of the vehicle performing the corresponding - * visit will vary. Since it is an integer, users are advised to choose an - * appropriate unit to avoid loss of precision. Must be ≥ 0. - * - * Generated from protobuf field int64 amount = 2; - */ - protected $amount = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $amount - * The amount by which the load of the vehicle performing the corresponding - * visit will vary. Since it is an integer, users are advised to choose an - * appropriate unit to avoid loss of precision. Must be ≥ 0. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); - parent::__construct($data); - } - - /** - * The amount by which the load of the vehicle performing the corresponding - * visit will vary. Since it is an integer, users are advised to choose an - * appropriate unit to avoid loss of precision. Must be ≥ 0. - * - * Generated from protobuf field int64 amount = 2; - * @return int|string - */ - public function getAmount() - { - return $this->amount; - } - - /** - * The amount by which the load of the vehicle performing the corresponding - * visit will vary. Since it is an integer, users are advised to choose an - * appropriate unit to avoid loss of precision. Must be ≥ 0. - * - * Generated from protobuf field int64 amount = 2; - * @param int|string $var - * @return $this - */ - public function setAmount($var) - { - GPBUtil::checkInt64($var); - $this->amount = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Load::class, \Google\Maps\RouteOptimization\V1\Shipment_Load::class); - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Shipment/VisitRequest.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Shipment/VisitRequest.php deleted file mode 100644 index 518eb8d4c60e..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Shipment/VisitRequest.php +++ /dev/null @@ -1,615 +0,0 @@ -google.maps.routeoptimization.v1.Shipment.VisitRequest - */ -class VisitRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The geo-location where the vehicle arrives when performing this - * `VisitRequest`. If the shipment model has duration distance matrices, - * `arrival_location` must not be specified. - * - * Generated from protobuf field .google.type.LatLng arrival_location = 1; - */ - protected $arrival_location = null; - /** - * The waypoint where the vehicle arrives when performing this - * `VisitRequest`. If the shipment model has duration distance matrices, - * `arrival_waypoint` must not be specified. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.Waypoint arrival_waypoint = 2; - */ - protected $arrival_waypoint = null; - /** - * The geo-location where the vehicle departs after completing this - * `VisitRequest`. Can be omitted if it is the same as `arrival_location`. - * If the shipment model has duration distance matrices, - * `departure_location` must not be specified. - * - * Generated from protobuf field .google.type.LatLng departure_location = 3; - */ - protected $departure_location = null; - /** - * The waypoint where the vehicle departs after completing this - * `VisitRequest`. Can be omitted if it is the same as `arrival_waypoint`. - * If the shipment model has duration distance matrices, - * `departure_waypoint` must not be specified. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.Waypoint departure_waypoint = 4; - */ - protected $departure_waypoint = null; - /** - * Specifies tags attached to the visit request. - * Empty or duplicate strings are not allowed. - * - * Generated from protobuf field repeated string tags = 5; - */ - private $tags; - /** - * Time windows which constrain the arrival time at a visit. - * Note that a vehicle may depart outside of the arrival time window, i.e. - * arrival time + duration do not need to be inside a time window. This can - * result in waiting time if the vehicle arrives before - * [TimeWindow.start_time][google.maps.routeoptimization.v1.TimeWindow.start_time]. - * The absence of `TimeWindow` means that the vehicle can perform this visit - * at any time. - * Time windows must be disjoint, i.e. no time window must overlap with or - * be adjacent to another, and they must be in increasing order. - * `cost_per_hour_after_soft_end_time` and `soft_end_time` can only - * be set if there is a single time window. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.TimeWindow time_windows = 6; - */ - private $time_windows; - /** - * Duration of the visit, i.e. time spent by the vehicle between arrival - * and departure (to be added to the possible waiting time; see - * `time_windows`). - * - * Generated from protobuf field .google.protobuf.Duration duration = 7; - */ - protected $duration = null; - /** - * Cost to service this visit request on a vehicle route. This can be used - * to pay different costs for each alternative pickup or delivery of a - * shipment. This cost must be in the same unit as `Shipment.penalty_cost` - * and must not be negative. - * - * Generated from protobuf field double cost = 8; - */ - protected $cost = 0.0; - /** - * Load demands of this visit request. This is just like - * [Shipment.load_demands][google.maps.routeoptimization.v1.Shipment.load_demands] - * field, except that it only applies to this - * [VisitRequest][google.maps.routeoptimization.v1.Shipment.VisitRequest] - * instead of the whole - * [Shipment][google.maps.routeoptimization.v1.Shipment]. The demands listed - * here are added to the demands listed in - * [Shipment.load_demands][google.maps.routeoptimization.v1.Shipment.load_demands]. - * - * Generated from protobuf field map load_demands = 12; - */ - private $load_demands; - /** - * Specifies the types of the visit. This may be used to allocate additional - * time required for a vehicle to complete this visit (see - * [Vehicle.extra_visit_duration_for_visit_type][google.maps.routeoptimization.v1.Vehicle.extra_visit_duration_for_visit_type]). - * A type can only appear once. - * - * Generated from protobuf field repeated string visit_types = 10; - */ - private $visit_types; - /** - * Specifies a label for this `VisitRequest`. This label is reported in the - * response as `visit_label` in the corresponding - * [ShipmentRoute.Visit][google.maps.routeoptimization.v1.ShipmentRoute.Visit]. - * - * Generated from protobuf field string label = 11; - */ - protected $label = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Type\LatLng $arrival_location - * The geo-location where the vehicle arrives when performing this - * `VisitRequest`. If the shipment model has duration distance matrices, - * `arrival_location` must not be specified. - * @type \Google\Maps\RouteOptimization\V1\Waypoint $arrival_waypoint - * The waypoint where the vehicle arrives when performing this - * `VisitRequest`. If the shipment model has duration distance matrices, - * `arrival_waypoint` must not be specified. - * @type \Google\Type\LatLng $departure_location - * The geo-location where the vehicle departs after completing this - * `VisitRequest`. Can be omitted if it is the same as `arrival_location`. - * If the shipment model has duration distance matrices, - * `departure_location` must not be specified. - * @type \Google\Maps\RouteOptimization\V1\Waypoint $departure_waypoint - * The waypoint where the vehicle departs after completing this - * `VisitRequest`. Can be omitted if it is the same as `arrival_waypoint`. - * If the shipment model has duration distance matrices, - * `departure_waypoint` must not be specified. - * @type array|\Google\Protobuf\Internal\RepeatedField $tags - * Specifies tags attached to the visit request. - * Empty or duplicate strings are not allowed. - * @type array<\Google\Maps\RouteOptimization\V1\TimeWindow>|\Google\Protobuf\Internal\RepeatedField $time_windows - * Time windows which constrain the arrival time at a visit. - * Note that a vehicle may depart outside of the arrival time window, i.e. - * arrival time + duration do not need to be inside a time window. This can - * result in waiting time if the vehicle arrives before - * [TimeWindow.start_time][google.maps.routeoptimization.v1.TimeWindow.start_time]. - * The absence of `TimeWindow` means that the vehicle can perform this visit - * at any time. - * Time windows must be disjoint, i.e. no time window must overlap with or - * be adjacent to another, and they must be in increasing order. - * `cost_per_hour_after_soft_end_time` and `soft_end_time` can only - * be set if there is a single time window. - * @type \Google\Protobuf\Duration $duration - * Duration of the visit, i.e. time spent by the vehicle between arrival - * and departure (to be added to the possible waiting time; see - * `time_windows`). - * @type float $cost - * Cost to service this visit request on a vehicle route. This can be used - * to pay different costs for each alternative pickup or delivery of a - * shipment. This cost must be in the same unit as `Shipment.penalty_cost` - * and must not be negative. - * @type array|\Google\Protobuf\Internal\MapField $load_demands - * Load demands of this visit request. This is just like - * [Shipment.load_demands][google.maps.routeoptimization.v1.Shipment.load_demands] - * field, except that it only applies to this - * [VisitRequest][google.maps.routeoptimization.v1.Shipment.VisitRequest] - * instead of the whole - * [Shipment][google.maps.routeoptimization.v1.Shipment]. The demands listed - * here are added to the demands listed in - * [Shipment.load_demands][google.maps.routeoptimization.v1.Shipment.load_demands]. - * @type array|\Google\Protobuf\Internal\RepeatedField $visit_types - * Specifies the types of the visit. This may be used to allocate additional - * time required for a vehicle to complete this visit (see - * [Vehicle.extra_visit_duration_for_visit_type][google.maps.routeoptimization.v1.Vehicle.extra_visit_duration_for_visit_type]). - * A type can only appear once. - * @type string $label - * Specifies a label for this `VisitRequest`. This label is reported in the - * response as `visit_label` in the corresponding - * [ShipmentRoute.Visit][google.maps.routeoptimization.v1.ShipmentRoute.Visit]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); - parent::__construct($data); - } - - /** - * The geo-location where the vehicle arrives when performing this - * `VisitRequest`. If the shipment model has duration distance matrices, - * `arrival_location` must not be specified. - * - * Generated from protobuf field .google.type.LatLng arrival_location = 1; - * @return \Google\Type\LatLng|null - */ - public function getArrivalLocation() - { - return $this->arrival_location; - } - - public function hasArrivalLocation() - { - return isset($this->arrival_location); - } - - public function clearArrivalLocation() - { - unset($this->arrival_location); - } - - /** - * The geo-location where the vehicle arrives when performing this - * `VisitRequest`. If the shipment model has duration distance matrices, - * `arrival_location` must not be specified. - * - * Generated from protobuf field .google.type.LatLng arrival_location = 1; - * @param \Google\Type\LatLng $var - * @return $this - */ - public function setArrivalLocation($var) - { - GPBUtil::checkMessage($var, \Google\Type\LatLng::class); - $this->arrival_location = $var; - - return $this; - } - - /** - * The waypoint where the vehicle arrives when performing this - * `VisitRequest`. If the shipment model has duration distance matrices, - * `arrival_waypoint` must not be specified. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.Waypoint arrival_waypoint = 2; - * @return \Google\Maps\RouteOptimization\V1\Waypoint|null - */ - public function getArrivalWaypoint() - { - return $this->arrival_waypoint; - } - - public function hasArrivalWaypoint() - { - return isset($this->arrival_waypoint); - } - - public function clearArrivalWaypoint() - { - unset($this->arrival_waypoint); - } - - /** - * The waypoint where the vehicle arrives when performing this - * `VisitRequest`. If the shipment model has duration distance matrices, - * `arrival_waypoint` must not be specified. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.Waypoint arrival_waypoint = 2; - * @param \Google\Maps\RouteOptimization\V1\Waypoint $var - * @return $this - */ - public function setArrivalWaypoint($var) - { - GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\Waypoint::class); - $this->arrival_waypoint = $var; - - return $this; - } - - /** - * The geo-location where the vehicle departs after completing this - * `VisitRequest`. Can be omitted if it is the same as `arrival_location`. - * If the shipment model has duration distance matrices, - * `departure_location` must not be specified. - * - * Generated from protobuf field .google.type.LatLng departure_location = 3; - * @return \Google\Type\LatLng|null - */ - public function getDepartureLocation() - { - return $this->departure_location; - } - - public function hasDepartureLocation() - { - return isset($this->departure_location); - } - - public function clearDepartureLocation() - { - unset($this->departure_location); - } - - /** - * The geo-location where the vehicle departs after completing this - * `VisitRequest`. Can be omitted if it is the same as `arrival_location`. - * If the shipment model has duration distance matrices, - * `departure_location` must not be specified. - * - * Generated from protobuf field .google.type.LatLng departure_location = 3; - * @param \Google\Type\LatLng $var - * @return $this - */ - public function setDepartureLocation($var) - { - GPBUtil::checkMessage($var, \Google\Type\LatLng::class); - $this->departure_location = $var; - - return $this; - } - - /** - * The waypoint where the vehicle departs after completing this - * `VisitRequest`. Can be omitted if it is the same as `arrival_waypoint`. - * If the shipment model has duration distance matrices, - * `departure_waypoint` must not be specified. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.Waypoint departure_waypoint = 4; - * @return \Google\Maps\RouteOptimization\V1\Waypoint|null - */ - public function getDepartureWaypoint() - { - return $this->departure_waypoint; - } - - public function hasDepartureWaypoint() - { - return isset($this->departure_waypoint); - } - - public function clearDepartureWaypoint() - { - unset($this->departure_waypoint); - } - - /** - * The waypoint where the vehicle departs after completing this - * `VisitRequest`. Can be omitted if it is the same as `arrival_waypoint`. - * If the shipment model has duration distance matrices, - * `departure_waypoint` must not be specified. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.Waypoint departure_waypoint = 4; - * @param \Google\Maps\RouteOptimization\V1\Waypoint $var - * @return $this - */ - public function setDepartureWaypoint($var) - { - GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\Waypoint::class); - $this->departure_waypoint = $var; - - return $this; - } - - /** - * Specifies tags attached to the visit request. - * Empty or duplicate strings are not allowed. - * - * Generated from protobuf field repeated string tags = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTags() - { - return $this->tags; - } - - /** - * Specifies tags attached to the visit request. - * Empty or duplicate strings are not allowed. - * - * Generated from protobuf field repeated string tags = 5; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTags($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->tags = $arr; - - return $this; - } - - /** - * Time windows which constrain the arrival time at a visit. - * Note that a vehicle may depart outside of the arrival time window, i.e. - * arrival time + duration do not need to be inside a time window. This can - * result in waiting time if the vehicle arrives before - * [TimeWindow.start_time][google.maps.routeoptimization.v1.TimeWindow.start_time]. - * The absence of `TimeWindow` means that the vehicle can perform this visit - * at any time. - * Time windows must be disjoint, i.e. no time window must overlap with or - * be adjacent to another, and they must be in increasing order. - * `cost_per_hour_after_soft_end_time` and `soft_end_time` can only - * be set if there is a single time window. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.TimeWindow time_windows = 6; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTimeWindows() - { - return $this->time_windows; - } - - /** - * Time windows which constrain the arrival time at a visit. - * Note that a vehicle may depart outside of the arrival time window, i.e. - * arrival time + duration do not need to be inside a time window. This can - * result in waiting time if the vehicle arrives before - * [TimeWindow.start_time][google.maps.routeoptimization.v1.TimeWindow.start_time]. - * The absence of `TimeWindow` means that the vehicle can perform this visit - * at any time. - * Time windows must be disjoint, i.e. no time window must overlap with or - * be adjacent to another, and they must be in increasing order. - * `cost_per_hour_after_soft_end_time` and `soft_end_time` can only - * be set if there is a single time window. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.TimeWindow time_windows = 6; - * @param array<\Google\Maps\RouteOptimization\V1\TimeWindow>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTimeWindows($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\TimeWindow::class); - $this->time_windows = $arr; - - return $this; - } - - /** - * Duration of the visit, i.e. time spent by the vehicle between arrival - * and departure (to be added to the possible waiting time; see - * `time_windows`). - * - * Generated from protobuf field .google.protobuf.Duration duration = 7; - * @return \Google\Protobuf\Duration|null - */ - public function getDuration() - { - return $this->duration; - } - - public function hasDuration() - { - return isset($this->duration); - } - - public function clearDuration() - { - unset($this->duration); - } - - /** - * Duration of the visit, i.e. time spent by the vehicle between arrival - * and departure (to be added to the possible waiting time; see - * `time_windows`). - * - * Generated from protobuf field .google.protobuf.Duration duration = 7; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->duration = $var; - - return $this; - } - - /** - * Cost to service this visit request on a vehicle route. This can be used - * to pay different costs for each alternative pickup or delivery of a - * shipment. This cost must be in the same unit as `Shipment.penalty_cost` - * and must not be negative. - * - * Generated from protobuf field double cost = 8; - * @return float - */ - public function getCost() - { - return $this->cost; - } - - /** - * Cost to service this visit request on a vehicle route. This can be used - * to pay different costs for each alternative pickup or delivery of a - * shipment. This cost must be in the same unit as `Shipment.penalty_cost` - * and must not be negative. - * - * Generated from protobuf field double cost = 8; - * @param float $var - * @return $this - */ - public function setCost($var) - { - GPBUtil::checkDouble($var); - $this->cost = $var; - - return $this; - } - - /** - * Load demands of this visit request. This is just like - * [Shipment.load_demands][google.maps.routeoptimization.v1.Shipment.load_demands] - * field, except that it only applies to this - * [VisitRequest][google.maps.routeoptimization.v1.Shipment.VisitRequest] - * instead of the whole - * [Shipment][google.maps.routeoptimization.v1.Shipment]. The demands listed - * here are added to the demands listed in - * [Shipment.load_demands][google.maps.routeoptimization.v1.Shipment.load_demands]. - * - * Generated from protobuf field map load_demands = 12; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLoadDemands() - { - return $this->load_demands; - } - - /** - * Load demands of this visit request. This is just like - * [Shipment.load_demands][google.maps.routeoptimization.v1.Shipment.load_demands] - * field, except that it only applies to this - * [VisitRequest][google.maps.routeoptimization.v1.Shipment.VisitRequest] - * instead of the whole - * [Shipment][google.maps.routeoptimization.v1.Shipment]. The demands listed - * here are added to the demands listed in - * [Shipment.load_demands][google.maps.routeoptimization.v1.Shipment.load_demands]. - * - * Generated from protobuf field map load_demands = 12; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLoadDemands($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\Shipment\Load::class); - $this->load_demands = $arr; - - return $this; - } - - /** - * Specifies the types of the visit. This may be used to allocate additional - * time required for a vehicle to complete this visit (see - * [Vehicle.extra_visit_duration_for_visit_type][google.maps.routeoptimization.v1.Vehicle.extra_visit_duration_for_visit_type]). - * A type can only appear once. - * - * Generated from protobuf field repeated string visit_types = 10; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getVisitTypes() - { - return $this->visit_types; - } - - /** - * Specifies the types of the visit. This may be used to allocate additional - * time required for a vehicle to complete this visit (see - * [Vehicle.extra_visit_duration_for_visit_type][google.maps.routeoptimization.v1.Vehicle.extra_visit_duration_for_visit_type]). - * A type can only appear once. - * - * Generated from protobuf field repeated string visit_types = 10; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setVisitTypes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->visit_types = $arr; - - return $this; - } - - /** - * Specifies a label for this `VisitRequest`. This label is reported in the - * response as `visit_label` in the corresponding - * [ShipmentRoute.Visit][google.maps.routeoptimization.v1.ShipmentRoute.Visit]. - * - * Generated from protobuf field string label = 11; - * @return string - */ - public function getLabel() - { - return $this->label; - } - - /** - * Specifies a label for this `VisitRequest`. This label is reported in the - * response as `visit_label` in the corresponding - * [ShipmentRoute.Visit][google.maps.routeoptimization.v1.ShipmentRoute.Visit]. - * - * Generated from protobuf field string label = 11; - * @param string $var - * @return $this - */ - public function setLabel($var) - { - GPBUtil::checkString($var, True); - $this->label = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(VisitRequest::class, \Google\Maps\RouteOptimization\V1\Shipment_VisitRequest::class); - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentModel.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentModel.php deleted file mode 100644 index 34ac5c5b5eb4..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentModel.php +++ /dev/null @@ -1,1010 +0,0 @@ -google.maps.routeoptimization.v1.ShipmentModel - */ -class ShipmentModel extends \Google\Protobuf\Internal\Message -{ - /** - * Set of shipments which must be performed in the model. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.Shipment shipments = 1; - */ - private $shipments; - /** - * Set of vehicles which can be used to perform visits. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.Vehicle vehicles = 2; - */ - private $vehicles; - /** - * Constrains the maximum number of active vehicles. A vehicle is active if - * its route performs at least one shipment. This can be used to limit the - * number of routes in the case where there are fewer drivers than - * vehicles and that the fleet of vehicles is heterogeneous. The optimization - * will then select the best subset of vehicles to use. - * Must be strictly positive. - * - * Generated from protobuf field optional int32 max_active_vehicles = 4; - */ - protected $max_active_vehicles = null; - /** - * Global start and end time of the model: no times outside of this range - * can be considered valid. - * The model's time span must be less than a year, i.e. the `global_end_time` - * and the `global_start_time` must be within 31536000 seconds of each other. - * When using `cost_per_*hour` fields, you might want to set this window to a - * smaller interval to increase performance (eg. if you model a single day, - * you should set the global time limits to that day). - * If unset, 00:00:00 UTC, January 1, 1970 (i.e. seconds: 0, nanos: 0) is used - * as default. - * - * Generated from protobuf field .google.protobuf.Timestamp global_start_time = 5; - */ - protected $global_start_time = null; - /** - * If unset, 00:00:00 UTC, January 1, 1971 (i.e. seconds: 31536000, nanos: 0) - * is used as default. - * - * Generated from protobuf field .google.protobuf.Timestamp global_end_time = 6; - */ - protected $global_end_time = null; - /** - * The "global duration" of the overall plan is the difference between the - * earliest effective start time and the latest effective end time of - * all vehicles. Users can assign a cost per hour to that quantity to try - * and optimize for earliest job completion, for example. This cost must be in - * the same unit as - * [Shipment.penalty_cost][google.maps.routeoptimization.v1.Shipment.penalty_cost]. - * - * Generated from protobuf field double global_duration_cost_per_hour = 7; - */ - protected $global_duration_cost_per_hour = 0.0; - /** - * Specifies duration and distance matrices used in the model. If this field - * is empty, Google Maps or geodesic distances will be used instead, depending - * on the value of the `use_geodesic_distances` field. If it is not empty, - * `use_geodesic_distances` cannot be true and neither - * `duration_distance_matrix_src_tags` nor `duration_distance_matrix_dst_tags` - * can be empty. - * Usage examples: - * * There are two locations: locA and locB. - * * 1 vehicle starting its route at locA and ending it at locA. - * * 1 pickup visit request at locB. - * ``` - * model { - * vehicles { start_tags: "locA" end_tags: "locA" } - * shipments { pickups { tags: "locB" } } - * duration_distance_matrix_src_tags: "locA" - * duration_distance_matrix_src_tags: "locB" - * duration_distance_matrix_dst_tags: "locA" - * duration_distance_matrix_dst_tags: "locB" - * duration_distance_matrices { - * rows { # from: locA - * durations { seconds: 0 } meters: 0 # to: locA - * durations { seconds: 100 } meters: 1000 # to: locB - * } - * rows { # from: locB - * durations { seconds: 102 } meters: 990 # to: locA - * durations { seconds: 0 } meters: 0 # to: locB - * } - * } - * } - * ``` - * * There are three locations: locA, locB and locC. - * * 1 vehicle starting its route at locA and ending it at locB, using - * matrix "fast". - * * 1 vehicle starting its route at locB and ending it at locB, using - * matrix "slow". - * * 1 vehicle starting its route at locB and ending it at locB, using - * matrix "fast". - * * 1 pickup visit request at locC. - * ``` - * model { - * vehicles { start_tags: "locA" end_tags: "locB" start_tags: "fast" } - * vehicles { start_tags: "locB" end_tags: "locB" start_tags: "slow" } - * vehicles { start_tags: "locB" end_tags: "locB" start_tags: "fast" } - * shipments { pickups { tags: "locC" } } - * duration_distance_matrix_src_tags: "locA" - * duration_distance_matrix_src_tags: "locB" - * duration_distance_matrix_src_tags: "locC" - * duration_distance_matrix_dst_tags: "locB" - * duration_distance_matrix_dst_tags: "locC" - * duration_distance_matrices { - * vehicle_start_tag: "fast" - * rows { # from: locA - * durations { seconds: 1000 } meters: 2000 # to: locB - * durations { seconds: 600 } meters: 1000 # to: locC - * } - * rows { # from: locB - * durations { seconds: 0 } meters: 0 # to: locB - * durations { seconds: 700 } meters: 1200 # to: locC - * } - * rows { # from: locC - * durations { seconds: 702 } meters: 1190 # to: locB - * durations { seconds: 0 } meters: 0 # to: locC - * } - * } - * duration_distance_matrices { - * vehicle_start_tag: "slow" - * rows { # from: locA - * durations { seconds: 1800 } meters: 2001 # to: locB - * durations { seconds: 900 } meters: 1002 # to: locC - * } - * rows { # from: locB - * durations { seconds: 0 } meters: 0 # to: locB - * durations { seconds: 1000 } meters: 1202 # to: locC - * } - * rows { # from: locC - * durations { seconds: 1001 } meters: 1195 # to: locB - * durations { seconds: 0 } meters: 0 # to: locC - * } - * } - * } - * ``` - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentModel.DurationDistanceMatrix duration_distance_matrices = 8; - */ - private $duration_distance_matrices; - /** - * Tags defining the sources of the duration and distance matrices; - * `duration_distance_matrices(i).rows(j)` defines durations and distances - * from visits with tag `duration_distance_matrix_src_tags(j)` to other visits - * in matrix i. - * Tags correspond to - * [VisitRequest.tags][google.maps.routeoptimization.v1.Shipment.VisitRequest.tags] - * or - * [Vehicle.start_tags][google.maps.routeoptimization.v1.Vehicle.start_tags]. - * A given `VisitRequest` or `Vehicle` must match exactly one tag in this - * field. Note that a `Vehicle`'s source, destination and matrix tags may be - * the same; similarly a `VisitRequest`'s source and destination tags may be - * the same. All tags must be different and cannot be empty strings. If this - * field is not empty, then `duration_distance_matrices` must not be empty. - * - * Generated from protobuf field repeated string duration_distance_matrix_src_tags = 9; - */ - private $duration_distance_matrix_src_tags; - /** - * Tags defining the destinations of the duration and distance matrices; - * `duration_distance_matrices(i).rows(j).durations(k)` (resp. - * `duration_distance_matrices(i).rows(j).meters(k))` defines the duration - * (resp. the distance) of the travel from visits with tag - * `duration_distance_matrix_src_tags(j)` to visits with tag - * `duration_distance_matrix_dst_tags(k)` in matrix i. - * Tags correspond to - * [VisitRequest.tags][google.maps.routeoptimization.v1.Shipment.VisitRequest.tags] - * or - * [Vehicle.start_tags][google.maps.routeoptimization.v1.Vehicle.start_tags]. - * A given `VisitRequest` or `Vehicle` must match exactly one tag in this - * field. Note that a `Vehicle`'s source, destination and matrix tags may be - * the same; similarly a `VisitRequest`'s source and destination tags may be - * the same. All tags must be different and cannot be empty strings. If this - * field is not empty, then `duration_distance_matrices` must not be empty. - * - * Generated from protobuf field repeated string duration_distance_matrix_dst_tags = 10; - */ - private $duration_distance_matrix_dst_tags; - /** - * Transition attributes added to the model. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.TransitionAttributes transition_attributes = 11; - */ - private $transition_attributes; - /** - * Sets of incompatible shipment_types (see `ShipmentTypeIncompatibility`). - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentTypeIncompatibility shipment_type_incompatibilities = 12; - */ - private $shipment_type_incompatibilities; - /** - * Sets of `shipment_type` requirements (see `ShipmentTypeRequirement`). - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentTypeRequirement shipment_type_requirements = 13; - */ - private $shipment_type_requirements; - /** - * Set of precedence rules which must be enforced in the model. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentModel.PrecedenceRule precedence_rules = 14; - */ - private $precedence_rules; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Maps\RouteOptimization\V1\Shipment>|\Google\Protobuf\Internal\RepeatedField $shipments - * Set of shipments which must be performed in the model. - * @type array<\Google\Maps\RouteOptimization\V1\Vehicle>|\Google\Protobuf\Internal\RepeatedField $vehicles - * Set of vehicles which can be used to perform visits. - * @type int $max_active_vehicles - * Constrains the maximum number of active vehicles. A vehicle is active if - * its route performs at least one shipment. This can be used to limit the - * number of routes in the case where there are fewer drivers than - * vehicles and that the fleet of vehicles is heterogeneous. The optimization - * will then select the best subset of vehicles to use. - * Must be strictly positive. - * @type \Google\Protobuf\Timestamp $global_start_time - * Global start and end time of the model: no times outside of this range - * can be considered valid. - * The model's time span must be less than a year, i.e. the `global_end_time` - * and the `global_start_time` must be within 31536000 seconds of each other. - * When using `cost_per_*hour` fields, you might want to set this window to a - * smaller interval to increase performance (eg. if you model a single day, - * you should set the global time limits to that day). - * If unset, 00:00:00 UTC, January 1, 1970 (i.e. seconds: 0, nanos: 0) is used - * as default. - * @type \Google\Protobuf\Timestamp $global_end_time - * If unset, 00:00:00 UTC, January 1, 1971 (i.e. seconds: 31536000, nanos: 0) - * is used as default. - * @type float $global_duration_cost_per_hour - * The "global duration" of the overall plan is the difference between the - * earliest effective start time and the latest effective end time of - * all vehicles. Users can assign a cost per hour to that quantity to try - * and optimize for earliest job completion, for example. This cost must be in - * the same unit as - * [Shipment.penalty_cost][google.maps.routeoptimization.v1.Shipment.penalty_cost]. - * @type array<\Google\Maps\RouteOptimization\V1\ShipmentModel\DurationDistanceMatrix>|\Google\Protobuf\Internal\RepeatedField $duration_distance_matrices - * Specifies duration and distance matrices used in the model. If this field - * is empty, Google Maps or geodesic distances will be used instead, depending - * on the value of the `use_geodesic_distances` field. If it is not empty, - * `use_geodesic_distances` cannot be true and neither - * `duration_distance_matrix_src_tags` nor `duration_distance_matrix_dst_tags` - * can be empty. - * Usage examples: - * * There are two locations: locA and locB. - * * 1 vehicle starting its route at locA and ending it at locA. - * * 1 pickup visit request at locB. - * ``` - * model { - * vehicles { start_tags: "locA" end_tags: "locA" } - * shipments { pickups { tags: "locB" } } - * duration_distance_matrix_src_tags: "locA" - * duration_distance_matrix_src_tags: "locB" - * duration_distance_matrix_dst_tags: "locA" - * duration_distance_matrix_dst_tags: "locB" - * duration_distance_matrices { - * rows { # from: locA - * durations { seconds: 0 } meters: 0 # to: locA - * durations { seconds: 100 } meters: 1000 # to: locB - * } - * rows { # from: locB - * durations { seconds: 102 } meters: 990 # to: locA - * durations { seconds: 0 } meters: 0 # to: locB - * } - * } - * } - * ``` - * * There are three locations: locA, locB and locC. - * * 1 vehicle starting its route at locA and ending it at locB, using - * matrix "fast". - * * 1 vehicle starting its route at locB and ending it at locB, using - * matrix "slow". - * * 1 vehicle starting its route at locB and ending it at locB, using - * matrix "fast". - * * 1 pickup visit request at locC. - * ``` - * model { - * vehicles { start_tags: "locA" end_tags: "locB" start_tags: "fast" } - * vehicles { start_tags: "locB" end_tags: "locB" start_tags: "slow" } - * vehicles { start_tags: "locB" end_tags: "locB" start_tags: "fast" } - * shipments { pickups { tags: "locC" } } - * duration_distance_matrix_src_tags: "locA" - * duration_distance_matrix_src_tags: "locB" - * duration_distance_matrix_src_tags: "locC" - * duration_distance_matrix_dst_tags: "locB" - * duration_distance_matrix_dst_tags: "locC" - * duration_distance_matrices { - * vehicle_start_tag: "fast" - * rows { # from: locA - * durations { seconds: 1000 } meters: 2000 # to: locB - * durations { seconds: 600 } meters: 1000 # to: locC - * } - * rows { # from: locB - * durations { seconds: 0 } meters: 0 # to: locB - * durations { seconds: 700 } meters: 1200 # to: locC - * } - * rows { # from: locC - * durations { seconds: 702 } meters: 1190 # to: locB - * durations { seconds: 0 } meters: 0 # to: locC - * } - * } - * duration_distance_matrices { - * vehicle_start_tag: "slow" - * rows { # from: locA - * durations { seconds: 1800 } meters: 2001 # to: locB - * durations { seconds: 900 } meters: 1002 # to: locC - * } - * rows { # from: locB - * durations { seconds: 0 } meters: 0 # to: locB - * durations { seconds: 1000 } meters: 1202 # to: locC - * } - * rows { # from: locC - * durations { seconds: 1001 } meters: 1195 # to: locB - * durations { seconds: 0 } meters: 0 # to: locC - * } - * } - * } - * ``` - * @type array|\Google\Protobuf\Internal\RepeatedField $duration_distance_matrix_src_tags - * Tags defining the sources of the duration and distance matrices; - * `duration_distance_matrices(i).rows(j)` defines durations and distances - * from visits with tag `duration_distance_matrix_src_tags(j)` to other visits - * in matrix i. - * Tags correspond to - * [VisitRequest.tags][google.maps.routeoptimization.v1.Shipment.VisitRequest.tags] - * or - * [Vehicle.start_tags][google.maps.routeoptimization.v1.Vehicle.start_tags]. - * A given `VisitRequest` or `Vehicle` must match exactly one tag in this - * field. Note that a `Vehicle`'s source, destination and matrix tags may be - * the same; similarly a `VisitRequest`'s source and destination tags may be - * the same. All tags must be different and cannot be empty strings. If this - * field is not empty, then `duration_distance_matrices` must not be empty. - * @type array|\Google\Protobuf\Internal\RepeatedField $duration_distance_matrix_dst_tags - * Tags defining the destinations of the duration and distance matrices; - * `duration_distance_matrices(i).rows(j).durations(k)` (resp. - * `duration_distance_matrices(i).rows(j).meters(k))` defines the duration - * (resp. the distance) of the travel from visits with tag - * `duration_distance_matrix_src_tags(j)` to visits with tag - * `duration_distance_matrix_dst_tags(k)` in matrix i. - * Tags correspond to - * [VisitRequest.tags][google.maps.routeoptimization.v1.Shipment.VisitRequest.tags] - * or - * [Vehicle.start_tags][google.maps.routeoptimization.v1.Vehicle.start_tags]. - * A given `VisitRequest` or `Vehicle` must match exactly one tag in this - * field. Note that a `Vehicle`'s source, destination and matrix tags may be - * the same; similarly a `VisitRequest`'s source and destination tags may be - * the same. All tags must be different and cannot be empty strings. If this - * field is not empty, then `duration_distance_matrices` must not be empty. - * @type array<\Google\Maps\RouteOptimization\V1\TransitionAttributes>|\Google\Protobuf\Internal\RepeatedField $transition_attributes - * Transition attributes added to the model. - * @type array<\Google\Maps\RouteOptimization\V1\ShipmentTypeIncompatibility>|\Google\Protobuf\Internal\RepeatedField $shipment_type_incompatibilities - * Sets of incompatible shipment_types (see `ShipmentTypeIncompatibility`). - * @type array<\Google\Maps\RouteOptimization\V1\ShipmentTypeRequirement>|\Google\Protobuf\Internal\RepeatedField $shipment_type_requirements - * Sets of `shipment_type` requirements (see `ShipmentTypeRequirement`). - * @type array<\Google\Maps\RouteOptimization\V1\ShipmentModel\PrecedenceRule>|\Google\Protobuf\Internal\RepeatedField $precedence_rules - * Set of precedence rules which must be enforced in the model. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); - parent::__construct($data); - } - - /** - * Set of shipments which must be performed in the model. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.Shipment shipments = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getShipments() - { - return $this->shipments; - } - - /** - * Set of shipments which must be performed in the model. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.Shipment shipments = 1; - * @param array<\Google\Maps\RouteOptimization\V1\Shipment>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setShipments($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\Shipment::class); - $this->shipments = $arr; - - return $this; - } - - /** - * Set of vehicles which can be used to perform visits. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.Vehicle vehicles = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getVehicles() - { - return $this->vehicles; - } - - /** - * Set of vehicles which can be used to perform visits. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.Vehicle vehicles = 2; - * @param array<\Google\Maps\RouteOptimization\V1\Vehicle>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setVehicles($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\Vehicle::class); - $this->vehicles = $arr; - - return $this; - } - - /** - * Constrains the maximum number of active vehicles. A vehicle is active if - * its route performs at least one shipment. This can be used to limit the - * number of routes in the case where there are fewer drivers than - * vehicles and that the fleet of vehicles is heterogeneous. The optimization - * will then select the best subset of vehicles to use. - * Must be strictly positive. - * - * Generated from protobuf field optional int32 max_active_vehicles = 4; - * @return int - */ - public function getMaxActiveVehicles() - { - return isset($this->max_active_vehicles) ? $this->max_active_vehicles : 0; - } - - public function hasMaxActiveVehicles() - { - return isset($this->max_active_vehicles); - } - - public function clearMaxActiveVehicles() - { - unset($this->max_active_vehicles); - } - - /** - * Constrains the maximum number of active vehicles. A vehicle is active if - * its route performs at least one shipment. This can be used to limit the - * number of routes in the case where there are fewer drivers than - * vehicles and that the fleet of vehicles is heterogeneous. The optimization - * will then select the best subset of vehicles to use. - * Must be strictly positive. - * - * Generated from protobuf field optional int32 max_active_vehicles = 4; - * @param int $var - * @return $this - */ - public function setMaxActiveVehicles($var) - { - GPBUtil::checkInt32($var); - $this->max_active_vehicles = $var; - - return $this; - } - - /** - * Global start and end time of the model: no times outside of this range - * can be considered valid. - * The model's time span must be less than a year, i.e. the `global_end_time` - * and the `global_start_time` must be within 31536000 seconds of each other. - * When using `cost_per_*hour` fields, you might want to set this window to a - * smaller interval to increase performance (eg. if you model a single day, - * you should set the global time limits to that day). - * If unset, 00:00:00 UTC, January 1, 1970 (i.e. seconds: 0, nanos: 0) is used - * as default. - * - * Generated from protobuf field .google.protobuf.Timestamp global_start_time = 5; - * @return \Google\Protobuf\Timestamp|null - */ - public function getGlobalStartTime() - { - return $this->global_start_time; - } - - public function hasGlobalStartTime() - { - return isset($this->global_start_time); - } - - public function clearGlobalStartTime() - { - unset($this->global_start_time); - } - - /** - * Global start and end time of the model: no times outside of this range - * can be considered valid. - * The model's time span must be less than a year, i.e. the `global_end_time` - * and the `global_start_time` must be within 31536000 seconds of each other. - * When using `cost_per_*hour` fields, you might want to set this window to a - * smaller interval to increase performance (eg. if you model a single day, - * you should set the global time limits to that day). - * If unset, 00:00:00 UTC, January 1, 1970 (i.e. seconds: 0, nanos: 0) is used - * as default. - * - * Generated from protobuf field .google.protobuf.Timestamp global_start_time = 5; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setGlobalStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->global_start_time = $var; - - return $this; - } - - /** - * If unset, 00:00:00 UTC, January 1, 1971 (i.e. seconds: 31536000, nanos: 0) - * is used as default. - * - * Generated from protobuf field .google.protobuf.Timestamp global_end_time = 6; - * @return \Google\Protobuf\Timestamp|null - */ - public function getGlobalEndTime() - { - return $this->global_end_time; - } - - public function hasGlobalEndTime() - { - return isset($this->global_end_time); - } - - public function clearGlobalEndTime() - { - unset($this->global_end_time); - } - - /** - * If unset, 00:00:00 UTC, January 1, 1971 (i.e. seconds: 31536000, nanos: 0) - * is used as default. - * - * Generated from protobuf field .google.protobuf.Timestamp global_end_time = 6; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setGlobalEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->global_end_time = $var; - - return $this; - } - - /** - * The "global duration" of the overall plan is the difference between the - * earliest effective start time and the latest effective end time of - * all vehicles. Users can assign a cost per hour to that quantity to try - * and optimize for earliest job completion, for example. This cost must be in - * the same unit as - * [Shipment.penalty_cost][google.maps.routeoptimization.v1.Shipment.penalty_cost]. - * - * Generated from protobuf field double global_duration_cost_per_hour = 7; - * @return float - */ - public function getGlobalDurationCostPerHour() - { - return $this->global_duration_cost_per_hour; - } - - /** - * The "global duration" of the overall plan is the difference between the - * earliest effective start time and the latest effective end time of - * all vehicles. Users can assign a cost per hour to that quantity to try - * and optimize for earliest job completion, for example. This cost must be in - * the same unit as - * [Shipment.penalty_cost][google.maps.routeoptimization.v1.Shipment.penalty_cost]. - * - * Generated from protobuf field double global_duration_cost_per_hour = 7; - * @param float $var - * @return $this - */ - public function setGlobalDurationCostPerHour($var) - { - GPBUtil::checkDouble($var); - $this->global_duration_cost_per_hour = $var; - - return $this; - } - - /** - * Specifies duration and distance matrices used in the model. If this field - * is empty, Google Maps or geodesic distances will be used instead, depending - * on the value of the `use_geodesic_distances` field. If it is not empty, - * `use_geodesic_distances` cannot be true and neither - * `duration_distance_matrix_src_tags` nor `duration_distance_matrix_dst_tags` - * can be empty. - * Usage examples: - * * There are two locations: locA and locB. - * * 1 vehicle starting its route at locA and ending it at locA. - * * 1 pickup visit request at locB. - * ``` - * model { - * vehicles { start_tags: "locA" end_tags: "locA" } - * shipments { pickups { tags: "locB" } } - * duration_distance_matrix_src_tags: "locA" - * duration_distance_matrix_src_tags: "locB" - * duration_distance_matrix_dst_tags: "locA" - * duration_distance_matrix_dst_tags: "locB" - * duration_distance_matrices { - * rows { # from: locA - * durations { seconds: 0 } meters: 0 # to: locA - * durations { seconds: 100 } meters: 1000 # to: locB - * } - * rows { # from: locB - * durations { seconds: 102 } meters: 990 # to: locA - * durations { seconds: 0 } meters: 0 # to: locB - * } - * } - * } - * ``` - * * There are three locations: locA, locB and locC. - * * 1 vehicle starting its route at locA and ending it at locB, using - * matrix "fast". - * * 1 vehicle starting its route at locB and ending it at locB, using - * matrix "slow". - * * 1 vehicle starting its route at locB and ending it at locB, using - * matrix "fast". - * * 1 pickup visit request at locC. - * ``` - * model { - * vehicles { start_tags: "locA" end_tags: "locB" start_tags: "fast" } - * vehicles { start_tags: "locB" end_tags: "locB" start_tags: "slow" } - * vehicles { start_tags: "locB" end_tags: "locB" start_tags: "fast" } - * shipments { pickups { tags: "locC" } } - * duration_distance_matrix_src_tags: "locA" - * duration_distance_matrix_src_tags: "locB" - * duration_distance_matrix_src_tags: "locC" - * duration_distance_matrix_dst_tags: "locB" - * duration_distance_matrix_dst_tags: "locC" - * duration_distance_matrices { - * vehicle_start_tag: "fast" - * rows { # from: locA - * durations { seconds: 1000 } meters: 2000 # to: locB - * durations { seconds: 600 } meters: 1000 # to: locC - * } - * rows { # from: locB - * durations { seconds: 0 } meters: 0 # to: locB - * durations { seconds: 700 } meters: 1200 # to: locC - * } - * rows { # from: locC - * durations { seconds: 702 } meters: 1190 # to: locB - * durations { seconds: 0 } meters: 0 # to: locC - * } - * } - * duration_distance_matrices { - * vehicle_start_tag: "slow" - * rows { # from: locA - * durations { seconds: 1800 } meters: 2001 # to: locB - * durations { seconds: 900 } meters: 1002 # to: locC - * } - * rows { # from: locB - * durations { seconds: 0 } meters: 0 # to: locB - * durations { seconds: 1000 } meters: 1202 # to: locC - * } - * rows { # from: locC - * durations { seconds: 1001 } meters: 1195 # to: locB - * durations { seconds: 0 } meters: 0 # to: locC - * } - * } - * } - * ``` - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentModel.DurationDistanceMatrix duration_distance_matrices = 8; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDurationDistanceMatrices() - { - return $this->duration_distance_matrices; - } - - /** - * Specifies duration and distance matrices used in the model. If this field - * is empty, Google Maps or geodesic distances will be used instead, depending - * on the value of the `use_geodesic_distances` field. If it is not empty, - * `use_geodesic_distances` cannot be true and neither - * `duration_distance_matrix_src_tags` nor `duration_distance_matrix_dst_tags` - * can be empty. - * Usage examples: - * * There are two locations: locA and locB. - * * 1 vehicle starting its route at locA and ending it at locA. - * * 1 pickup visit request at locB. - * ``` - * model { - * vehicles { start_tags: "locA" end_tags: "locA" } - * shipments { pickups { tags: "locB" } } - * duration_distance_matrix_src_tags: "locA" - * duration_distance_matrix_src_tags: "locB" - * duration_distance_matrix_dst_tags: "locA" - * duration_distance_matrix_dst_tags: "locB" - * duration_distance_matrices { - * rows { # from: locA - * durations { seconds: 0 } meters: 0 # to: locA - * durations { seconds: 100 } meters: 1000 # to: locB - * } - * rows { # from: locB - * durations { seconds: 102 } meters: 990 # to: locA - * durations { seconds: 0 } meters: 0 # to: locB - * } - * } - * } - * ``` - * * There are three locations: locA, locB and locC. - * * 1 vehicle starting its route at locA and ending it at locB, using - * matrix "fast". - * * 1 vehicle starting its route at locB and ending it at locB, using - * matrix "slow". - * * 1 vehicle starting its route at locB and ending it at locB, using - * matrix "fast". - * * 1 pickup visit request at locC. - * ``` - * model { - * vehicles { start_tags: "locA" end_tags: "locB" start_tags: "fast" } - * vehicles { start_tags: "locB" end_tags: "locB" start_tags: "slow" } - * vehicles { start_tags: "locB" end_tags: "locB" start_tags: "fast" } - * shipments { pickups { tags: "locC" } } - * duration_distance_matrix_src_tags: "locA" - * duration_distance_matrix_src_tags: "locB" - * duration_distance_matrix_src_tags: "locC" - * duration_distance_matrix_dst_tags: "locB" - * duration_distance_matrix_dst_tags: "locC" - * duration_distance_matrices { - * vehicle_start_tag: "fast" - * rows { # from: locA - * durations { seconds: 1000 } meters: 2000 # to: locB - * durations { seconds: 600 } meters: 1000 # to: locC - * } - * rows { # from: locB - * durations { seconds: 0 } meters: 0 # to: locB - * durations { seconds: 700 } meters: 1200 # to: locC - * } - * rows { # from: locC - * durations { seconds: 702 } meters: 1190 # to: locB - * durations { seconds: 0 } meters: 0 # to: locC - * } - * } - * duration_distance_matrices { - * vehicle_start_tag: "slow" - * rows { # from: locA - * durations { seconds: 1800 } meters: 2001 # to: locB - * durations { seconds: 900 } meters: 1002 # to: locC - * } - * rows { # from: locB - * durations { seconds: 0 } meters: 0 # to: locB - * durations { seconds: 1000 } meters: 1202 # to: locC - * } - * rows { # from: locC - * durations { seconds: 1001 } meters: 1195 # to: locB - * durations { seconds: 0 } meters: 0 # to: locC - * } - * } - * } - * ``` - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentModel.DurationDistanceMatrix duration_distance_matrices = 8; - * @param array<\Google\Maps\RouteOptimization\V1\ShipmentModel\DurationDistanceMatrix>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDurationDistanceMatrices($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\ShipmentModel\DurationDistanceMatrix::class); - $this->duration_distance_matrices = $arr; - - return $this; - } - - /** - * Tags defining the sources of the duration and distance matrices; - * `duration_distance_matrices(i).rows(j)` defines durations and distances - * from visits with tag `duration_distance_matrix_src_tags(j)` to other visits - * in matrix i. - * Tags correspond to - * [VisitRequest.tags][google.maps.routeoptimization.v1.Shipment.VisitRequest.tags] - * or - * [Vehicle.start_tags][google.maps.routeoptimization.v1.Vehicle.start_tags]. - * A given `VisitRequest` or `Vehicle` must match exactly one tag in this - * field. Note that a `Vehicle`'s source, destination and matrix tags may be - * the same; similarly a `VisitRequest`'s source and destination tags may be - * the same. All tags must be different and cannot be empty strings. If this - * field is not empty, then `duration_distance_matrices` must not be empty. - * - * Generated from protobuf field repeated string duration_distance_matrix_src_tags = 9; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDurationDistanceMatrixSrcTags() - { - return $this->duration_distance_matrix_src_tags; - } - - /** - * Tags defining the sources of the duration and distance matrices; - * `duration_distance_matrices(i).rows(j)` defines durations and distances - * from visits with tag `duration_distance_matrix_src_tags(j)` to other visits - * in matrix i. - * Tags correspond to - * [VisitRequest.tags][google.maps.routeoptimization.v1.Shipment.VisitRequest.tags] - * or - * [Vehicle.start_tags][google.maps.routeoptimization.v1.Vehicle.start_tags]. - * A given `VisitRequest` or `Vehicle` must match exactly one tag in this - * field. Note that a `Vehicle`'s source, destination and matrix tags may be - * the same; similarly a `VisitRequest`'s source and destination tags may be - * the same. All tags must be different and cannot be empty strings. If this - * field is not empty, then `duration_distance_matrices` must not be empty. - * - * Generated from protobuf field repeated string duration_distance_matrix_src_tags = 9; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDurationDistanceMatrixSrcTags($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->duration_distance_matrix_src_tags = $arr; - - return $this; - } - - /** - * Tags defining the destinations of the duration and distance matrices; - * `duration_distance_matrices(i).rows(j).durations(k)` (resp. - * `duration_distance_matrices(i).rows(j).meters(k))` defines the duration - * (resp. the distance) of the travel from visits with tag - * `duration_distance_matrix_src_tags(j)` to visits with tag - * `duration_distance_matrix_dst_tags(k)` in matrix i. - * Tags correspond to - * [VisitRequest.tags][google.maps.routeoptimization.v1.Shipment.VisitRequest.tags] - * or - * [Vehicle.start_tags][google.maps.routeoptimization.v1.Vehicle.start_tags]. - * A given `VisitRequest` or `Vehicle` must match exactly one tag in this - * field. Note that a `Vehicle`'s source, destination and matrix tags may be - * the same; similarly a `VisitRequest`'s source and destination tags may be - * the same. All tags must be different and cannot be empty strings. If this - * field is not empty, then `duration_distance_matrices` must not be empty. - * - * Generated from protobuf field repeated string duration_distance_matrix_dst_tags = 10; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDurationDistanceMatrixDstTags() - { - return $this->duration_distance_matrix_dst_tags; - } - - /** - * Tags defining the destinations of the duration and distance matrices; - * `duration_distance_matrices(i).rows(j).durations(k)` (resp. - * `duration_distance_matrices(i).rows(j).meters(k))` defines the duration - * (resp. the distance) of the travel from visits with tag - * `duration_distance_matrix_src_tags(j)` to visits with tag - * `duration_distance_matrix_dst_tags(k)` in matrix i. - * Tags correspond to - * [VisitRequest.tags][google.maps.routeoptimization.v1.Shipment.VisitRequest.tags] - * or - * [Vehicle.start_tags][google.maps.routeoptimization.v1.Vehicle.start_tags]. - * A given `VisitRequest` or `Vehicle` must match exactly one tag in this - * field. Note that a `Vehicle`'s source, destination and matrix tags may be - * the same; similarly a `VisitRequest`'s source and destination tags may be - * the same. All tags must be different and cannot be empty strings. If this - * field is not empty, then `duration_distance_matrices` must not be empty. - * - * Generated from protobuf field repeated string duration_distance_matrix_dst_tags = 10; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDurationDistanceMatrixDstTags($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->duration_distance_matrix_dst_tags = $arr; - - return $this; - } - - /** - * Transition attributes added to the model. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.TransitionAttributes transition_attributes = 11; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTransitionAttributes() - { - return $this->transition_attributes; - } - - /** - * Transition attributes added to the model. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.TransitionAttributes transition_attributes = 11; - * @param array<\Google\Maps\RouteOptimization\V1\TransitionAttributes>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTransitionAttributes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\TransitionAttributes::class); - $this->transition_attributes = $arr; - - return $this; - } - - /** - * Sets of incompatible shipment_types (see `ShipmentTypeIncompatibility`). - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentTypeIncompatibility shipment_type_incompatibilities = 12; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getShipmentTypeIncompatibilities() - { - return $this->shipment_type_incompatibilities; - } - - /** - * Sets of incompatible shipment_types (see `ShipmentTypeIncompatibility`). - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentTypeIncompatibility shipment_type_incompatibilities = 12; - * @param array<\Google\Maps\RouteOptimization\V1\ShipmentTypeIncompatibility>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setShipmentTypeIncompatibilities($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\ShipmentTypeIncompatibility::class); - $this->shipment_type_incompatibilities = $arr; - - return $this; - } - - /** - * Sets of `shipment_type` requirements (see `ShipmentTypeRequirement`). - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentTypeRequirement shipment_type_requirements = 13; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getShipmentTypeRequirements() - { - return $this->shipment_type_requirements; - } - - /** - * Sets of `shipment_type` requirements (see `ShipmentTypeRequirement`). - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentTypeRequirement shipment_type_requirements = 13; - * @param array<\Google\Maps\RouteOptimization\V1\ShipmentTypeRequirement>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setShipmentTypeRequirements($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\ShipmentTypeRequirement::class); - $this->shipment_type_requirements = $arr; - - return $this; - } - - /** - * Set of precedence rules which must be enforced in the model. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentModel.PrecedenceRule precedence_rules = 14; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPrecedenceRules() - { - return $this->precedence_rules; - } - - /** - * Set of precedence rules which must be enforced in the model. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentModel.PrecedenceRule precedence_rules = 14; - * @param array<\Google\Maps\RouteOptimization\V1\ShipmentModel\PrecedenceRule>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPrecedenceRules($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\ShipmentModel\PrecedenceRule::class); - $this->precedence_rules = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentModel/DurationDistanceMatrix.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentModel/DurationDistanceMatrix.php deleted file mode 100644 index 5bc080ab9ce0..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentModel/DurationDistanceMatrix.php +++ /dev/null @@ -1,137 +0,0 @@ -google.maps.routeoptimization.v1.ShipmentModel.DurationDistanceMatrix - */ -class DurationDistanceMatrix extends \Google\Protobuf\Internal\Message -{ - /** - * Specifies the rows of the duration and distance matrix. It must have as - * many elements as - * [ShipmentModel.duration_distance_matrix_src_tags][google.maps.routeoptimization.v1.ShipmentModel.duration_distance_matrix_src_tags]. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentModel.DurationDistanceMatrix.Row rows = 1; - */ - private $rows; - /** - * Tag defining to which vehicles this duration and distance matrix applies. - * If empty, this applies to all vehicles, and there can only be a single - * matrix. - * Each vehicle start must match exactly one matrix, i.e. exactly one of - * their `start_tags` field must match the `vehicle_start_tag` of a matrix - * (and of that matrix only). - * All matrices must have a different `vehicle_start_tag`. - * - * Generated from protobuf field string vehicle_start_tag = 2; - */ - protected $vehicle_start_tag = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Maps\RouteOptimization\V1\ShipmentModel\DurationDistanceMatrix\Row>|\Google\Protobuf\Internal\RepeatedField $rows - * Specifies the rows of the duration and distance matrix. It must have as - * many elements as - * [ShipmentModel.duration_distance_matrix_src_tags][google.maps.routeoptimization.v1.ShipmentModel.duration_distance_matrix_src_tags]. - * @type string $vehicle_start_tag - * Tag defining to which vehicles this duration and distance matrix applies. - * If empty, this applies to all vehicles, and there can only be a single - * matrix. - * Each vehicle start must match exactly one matrix, i.e. exactly one of - * their `start_tags` field must match the `vehicle_start_tag` of a matrix - * (and of that matrix only). - * All matrices must have a different `vehicle_start_tag`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); - parent::__construct($data); - } - - /** - * Specifies the rows of the duration and distance matrix. It must have as - * many elements as - * [ShipmentModel.duration_distance_matrix_src_tags][google.maps.routeoptimization.v1.ShipmentModel.duration_distance_matrix_src_tags]. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentModel.DurationDistanceMatrix.Row rows = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRows() - { - return $this->rows; - } - - /** - * Specifies the rows of the duration and distance matrix. It must have as - * many elements as - * [ShipmentModel.duration_distance_matrix_src_tags][google.maps.routeoptimization.v1.ShipmentModel.duration_distance_matrix_src_tags]. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentModel.DurationDistanceMatrix.Row rows = 1; - * @param array<\Google\Maps\RouteOptimization\V1\ShipmentModel\DurationDistanceMatrix\Row>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRows($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\ShipmentModel\DurationDistanceMatrix\Row::class); - $this->rows = $arr; - - return $this; - } - - /** - * Tag defining to which vehicles this duration and distance matrix applies. - * If empty, this applies to all vehicles, and there can only be a single - * matrix. - * Each vehicle start must match exactly one matrix, i.e. exactly one of - * their `start_tags` field must match the `vehicle_start_tag` of a matrix - * (and of that matrix only). - * All matrices must have a different `vehicle_start_tag`. - * - * Generated from protobuf field string vehicle_start_tag = 2; - * @return string - */ - public function getVehicleStartTag() - { - return $this->vehicle_start_tag; - } - - /** - * Tag defining to which vehicles this duration and distance matrix applies. - * If empty, this applies to all vehicles, and there can only be a single - * matrix. - * Each vehicle start must match exactly one matrix, i.e. exactly one of - * their `start_tags` field must match the `vehicle_start_tag` of a matrix - * (and of that matrix only). - * All matrices must have a different `vehicle_start_tag`. - * - * Generated from protobuf field string vehicle_start_tag = 2; - * @param string $var - * @return $this - */ - public function setVehicleStartTag($var) - { - GPBUtil::checkString($var, True); - $this->vehicle_start_tag = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DurationDistanceMatrix::class, \Google\Maps\RouteOptimization\V1\ShipmentModel_DurationDistanceMatrix::class); - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentModel/DurationDistanceMatrix/Row.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentModel/DurationDistanceMatrix/Row.php deleted file mode 100644 index ade7fdceddc1..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentModel/DurationDistanceMatrix/Row.php +++ /dev/null @@ -1,116 +0,0 @@ -google.maps.routeoptimization.v1.ShipmentModel.DurationDistanceMatrix.Row - */ -class Row extends \Google\Protobuf\Internal\Message -{ - /** - * Duration values for a given row. It must have as many elements as - * [ShipmentModel.duration_distance_matrix_dst_tags][google.maps.routeoptimization.v1.ShipmentModel.duration_distance_matrix_dst_tags]. - * - * Generated from protobuf field repeated .google.protobuf.Duration durations = 1; - */ - private $durations; - /** - * Distance values for a given row. If no costs or constraints refer to - * distances in the model, this can be left empty; otherwise it must have - * as many elements as `durations`. - * - * Generated from protobuf field repeated double meters = 2; - */ - private $meters; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Protobuf\Duration>|\Google\Protobuf\Internal\RepeatedField $durations - * Duration values for a given row. It must have as many elements as - * [ShipmentModel.duration_distance_matrix_dst_tags][google.maps.routeoptimization.v1.ShipmentModel.duration_distance_matrix_dst_tags]. - * @type array|\Google\Protobuf\Internal\RepeatedField $meters - * Distance values for a given row. If no costs or constraints refer to - * distances in the model, this can be left empty; otherwise it must have - * as many elements as `durations`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); - parent::__construct($data); - } - - /** - * Duration values for a given row. It must have as many elements as - * [ShipmentModel.duration_distance_matrix_dst_tags][google.maps.routeoptimization.v1.ShipmentModel.duration_distance_matrix_dst_tags]. - * - * Generated from protobuf field repeated .google.protobuf.Duration durations = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDurations() - { - return $this->durations; - } - - /** - * Duration values for a given row. It must have as many elements as - * [ShipmentModel.duration_distance_matrix_dst_tags][google.maps.routeoptimization.v1.ShipmentModel.duration_distance_matrix_dst_tags]. - * - * Generated from protobuf field repeated .google.protobuf.Duration durations = 1; - * @param array<\Google\Protobuf\Duration>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDurations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Duration::class); - $this->durations = $arr; - - return $this; - } - - /** - * Distance values for a given row. If no costs or constraints refer to - * distances in the model, this can be left empty; otherwise it must have - * as many elements as `durations`. - * - * Generated from protobuf field repeated double meters = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMeters() - { - return $this->meters; - } - - /** - * Distance values for a given row. If no costs or constraints refer to - * distances in the model, this can be left empty; otherwise it must have - * as many elements as `durations`. - * - * Generated from protobuf field repeated double meters = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMeters($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::DOUBLE); - $this->meters = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Row::class, \Google\Maps\RouteOptimization\V1\ShipmentModel_DurationDistanceMatrix_Row::class); - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentModel/PrecedenceRule.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentModel/PrecedenceRule.php deleted file mode 100644 index d83e3791b007..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentModel/PrecedenceRule.php +++ /dev/null @@ -1,243 +0,0 @@ -google.maps.routeoptimization.v1.ShipmentModel.PrecedenceRule - */ -class PrecedenceRule extends \Google\Protobuf\Internal\Message -{ - /** - * Shipment index of the "first" event. This field must be specified. - * - * Generated from protobuf field optional int32 first_index = 1; - */ - protected $first_index = null; - /** - * Indicates if the "first" event is a delivery. - * - * Generated from protobuf field bool first_is_delivery = 3; - */ - protected $first_is_delivery = false; - /** - * Shipment index of the "second" event. This field must be specified. - * - * Generated from protobuf field optional int32 second_index = 2; - */ - protected $second_index = null; - /** - * Indicates if the "second" event is a delivery. - * - * Generated from protobuf field bool second_is_delivery = 4; - */ - protected $second_is_delivery = false; - /** - * The offset between the "first" and "second" event. It can be negative. - * - * Generated from protobuf field .google.protobuf.Duration offset_duration = 5; - */ - protected $offset_duration = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $first_index - * Shipment index of the "first" event. This field must be specified. - * @type bool $first_is_delivery - * Indicates if the "first" event is a delivery. - * @type int $second_index - * Shipment index of the "second" event. This field must be specified. - * @type bool $second_is_delivery - * Indicates if the "second" event is a delivery. - * @type \Google\Protobuf\Duration $offset_duration - * The offset between the "first" and "second" event. It can be negative. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); - parent::__construct($data); - } - - /** - * Shipment index of the "first" event. This field must be specified. - * - * Generated from protobuf field optional int32 first_index = 1; - * @return int - */ - public function getFirstIndex() - { - return isset($this->first_index) ? $this->first_index : 0; - } - - public function hasFirstIndex() - { - return isset($this->first_index); - } - - public function clearFirstIndex() - { - unset($this->first_index); - } - - /** - * Shipment index of the "first" event. This field must be specified. - * - * Generated from protobuf field optional int32 first_index = 1; - * @param int $var - * @return $this - */ - public function setFirstIndex($var) - { - GPBUtil::checkInt32($var); - $this->first_index = $var; - - return $this; - } - - /** - * Indicates if the "first" event is a delivery. - * - * Generated from protobuf field bool first_is_delivery = 3; - * @return bool - */ - public function getFirstIsDelivery() - { - return $this->first_is_delivery; - } - - /** - * Indicates if the "first" event is a delivery. - * - * Generated from protobuf field bool first_is_delivery = 3; - * @param bool $var - * @return $this - */ - public function setFirstIsDelivery($var) - { - GPBUtil::checkBool($var); - $this->first_is_delivery = $var; - - return $this; - } - - /** - * Shipment index of the "second" event. This field must be specified. - * - * Generated from protobuf field optional int32 second_index = 2; - * @return int - */ - public function getSecondIndex() - { - return isset($this->second_index) ? $this->second_index : 0; - } - - public function hasSecondIndex() - { - return isset($this->second_index); - } - - public function clearSecondIndex() - { - unset($this->second_index); - } - - /** - * Shipment index of the "second" event. This field must be specified. - * - * Generated from protobuf field optional int32 second_index = 2; - * @param int $var - * @return $this - */ - public function setSecondIndex($var) - { - GPBUtil::checkInt32($var); - $this->second_index = $var; - - return $this; - } - - /** - * Indicates if the "second" event is a delivery. - * - * Generated from protobuf field bool second_is_delivery = 4; - * @return bool - */ - public function getSecondIsDelivery() - { - return $this->second_is_delivery; - } - - /** - * Indicates if the "second" event is a delivery. - * - * Generated from protobuf field bool second_is_delivery = 4; - * @param bool $var - * @return $this - */ - public function setSecondIsDelivery($var) - { - GPBUtil::checkBool($var); - $this->second_is_delivery = $var; - - return $this; - } - - /** - * The offset between the "first" and "second" event. It can be negative. - * - * Generated from protobuf field .google.protobuf.Duration offset_duration = 5; - * @return \Google\Protobuf\Duration|null - */ - public function getOffsetDuration() - { - return $this->offset_duration; - } - - public function hasOffsetDuration() - { - return isset($this->offset_duration); - } - - public function clearOffsetDuration() - { - unset($this->offset_duration); - } - - /** - * The offset between the "first" and "second" event. It can be negative. - * - * Generated from protobuf field .google.protobuf.Duration offset_duration = 5; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setOffsetDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->offset_duration = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(PrecedenceRule::class, \Google\Maps\RouteOptimization\V1\ShipmentModel_PrecedenceRule::class); - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentRoute.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentRoute.php deleted file mode 100644 index 3c191d29cca6..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentRoute.php +++ /dev/null @@ -1,706 +0,0 @@ - - * | TRANSITION[i] | VISIT[i] | - * | | | - * | * TRAVEL: the vehicle moves from | PERFORM the visit: | - * | VISIT[i-1].departure_location to | | - * | VISIT[i].arrival_location, which | * Spend some time: | - * | takes a given travel duration | the "visit duration". | - * | and distance | | - * | | * Load or unload | - * | * BREAKS: the driver may have | some quantities from the | - * | breaks (e.g. lunch break). | vehicle: the "demand". | - * | | | - * | * WAIT: the driver/vehicle does | | - * | nothing. This can happen for | | - * | many reasons, for example when | | - * | the vehicle reaches the next | | - * | event's destination before the | | - * | start of its time window | | - * | | | - * | * DELAY: *right before* the next | | - * | arrival. E.g. the vehicle and/or | | - * | driver spends time unloading. | | - * | | | - * ---+-------------------------------------+-----------------------------+--> - * ^ ^ ^ - * V[i-1].end V[i].start V[i].end - * ``` - * Lastly, here is how the TRAVEL, BREAKS, DELAY and WAIT can be arranged - * during a transition. - * * They don't overlap. - * * The DELAY is unique and *must* be a contiguous period of time right - * before the next visit (or vehicle end). Thus, it suffice to know the - * delay duration to know its start and end time. - * * The BREAKS are contiguous, non-overlapping periods of time. The - * response specifies the start time and duration of each break. - * * TRAVEL and WAIT are "preemptable": they can be interrupted several times - * during this transition. Clients can assume that travel happens "as soon as - * possible" and that "wait" fills the remaining time. - * A (complex) example: - * ``` - * TRANSITION[i] - * --++-----+-----------------------------------------------------------++--> - * || | | | | | | || - * || T | B | T | | B | | D || - * || r | r | r | W | r | W | e || - * || a | e | a | a | e | a | l || - * || v | a | v | i | a | i | a || - * || e | k | e | t | k | t | y || - * || l | | l | | | | || - * || | | | | | | || - * --++-----------------------------------------------------------------++--> - * ``` - * - * Generated from protobuf message google.maps.routeoptimization.v1.ShipmentRoute - */ -class ShipmentRoute extends \Google\Protobuf\Internal\Message -{ - /** - * Vehicle performing the route, identified by its index in the source - * `ShipmentModel`. - * - * Generated from protobuf field int32 vehicle_index = 1; - */ - protected $vehicle_index = 0; - /** - * Label of the vehicle performing this route, equal to - * `ShipmentModel.vehicles(vehicle_index).label`, if specified. - * - * Generated from protobuf field string vehicle_label = 2; - */ - protected $vehicle_label = ''; - /** - * Time at which the vehicle starts its route. - * - * Generated from protobuf field .google.protobuf.Timestamp vehicle_start_time = 5; - */ - protected $vehicle_start_time = null; - /** - * Time at which the vehicle finishes its route. - * - * Generated from protobuf field .google.protobuf.Timestamp vehicle_end_time = 6; - */ - protected $vehicle_end_time = null; - /** - * Ordered sequence of visits representing a route. - * visits[i] is the i-th visit in the route. - * If this field is empty, the vehicle is considered as unused. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentRoute.Visit visits = 7; - */ - private $visits; - /** - * Ordered list of transitions for the route. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentRoute.Transition transitions = 8; - */ - private $transitions; - /** - * When - * [OptimizeToursRequest.consider_road_traffic][google.maps.routeoptimization.v1.OptimizeToursRequest.consider_road_traffic], - * is set to true, this field indicates that inconsistencies in route timings - * are predicted using traffic-based travel duration estimates. There may be - * insufficient time to complete traffic-adjusted travel, delays, and breaks - * between visits, before the first visit, or after the last visit, while - * still satisfying the visit and vehicle time windows. For example, - * ``` - * start_time(previous_visit) + duration(previous_visit) + - * travel_duration(previous_visit, next_visit) > start_time(next_visit) - * ``` - * Arrival at next_visit will likely happen later than its current - * time window due the increased estimate of travel time - * `travel_duration(previous_visit, next_visit)` due to traffic. Also, a break - * may be forced to overlap with a visit due to an increase in travel time - * estimates and visit or break time window restrictions. - * - * Generated from protobuf field bool has_traffic_infeasibilities = 9; - */ - protected $has_traffic_infeasibilities = false; - /** - * The encoded polyline representation of the route. - * This field is only populated if - * [OptimizeToursRequest.populate_polylines][google.maps.routeoptimization.v1.OptimizeToursRequest.populate_polylines] - * is set to true. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.ShipmentRoute.EncodedPolyline route_polyline = 10; - */ - protected $route_polyline = null; - /** - * Breaks scheduled for the vehicle performing this route. - * The `breaks` sequence represents time intervals, each starting at the - * corresponding `start_time` and lasting `duration` seconds. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentRoute.Break breaks = 11; - */ - private $breaks; - /** - * Duration, distance and load metrics for this route. The fields of - * [AggregatedMetrics][google.maps.routeoptimization.v1.AggregatedMetrics] are - * summed over all - * [ShipmentRoute.transitions][google.maps.routeoptimization.v1.ShipmentRoute.transitions] - * or - * [ShipmentRoute.visits][google.maps.routeoptimization.v1.ShipmentRoute.visits], - * depending on the context. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.AggregatedMetrics metrics = 12; - */ - protected $metrics = null; - /** - * Cost of the route, broken down by cost-related request fields. - * The keys are proto paths, relative to the input OptimizeToursRequest, e.g. - * "model.shipments.pickups.cost", and the values are the total cost - * generated by the corresponding cost field, aggregated over the whole route. - * In other words, costs["model.shipments.pickups.cost"] is the sum of all - * pickup costs over the route. All costs defined in the model are reported in - * detail here with the exception of costs related to TransitionAttributes - * that are only reported in an aggregated way as of 2022/01. - * - * Generated from protobuf field map route_costs = 17; - */ - private $route_costs; - /** - * Total cost of the route. The sum of all costs in the cost map. - * - * Generated from protobuf field double route_total_cost = 18; - */ - protected $route_total_cost = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $vehicle_index - * Vehicle performing the route, identified by its index in the source - * `ShipmentModel`. - * @type string $vehicle_label - * Label of the vehicle performing this route, equal to - * `ShipmentModel.vehicles(vehicle_index).label`, if specified. - * @type \Google\Protobuf\Timestamp $vehicle_start_time - * Time at which the vehicle starts its route. - * @type \Google\Protobuf\Timestamp $vehicle_end_time - * Time at which the vehicle finishes its route. - * @type array<\Google\Maps\RouteOptimization\V1\ShipmentRoute\Visit>|\Google\Protobuf\Internal\RepeatedField $visits - * Ordered sequence of visits representing a route. - * visits[i] is the i-th visit in the route. - * If this field is empty, the vehicle is considered as unused. - * @type array<\Google\Maps\RouteOptimization\V1\ShipmentRoute\Transition>|\Google\Protobuf\Internal\RepeatedField $transitions - * Ordered list of transitions for the route. - * @type bool $has_traffic_infeasibilities - * When - * [OptimizeToursRequest.consider_road_traffic][google.maps.routeoptimization.v1.OptimizeToursRequest.consider_road_traffic], - * is set to true, this field indicates that inconsistencies in route timings - * are predicted using traffic-based travel duration estimates. There may be - * insufficient time to complete traffic-adjusted travel, delays, and breaks - * between visits, before the first visit, or after the last visit, while - * still satisfying the visit and vehicle time windows. For example, - * ``` - * start_time(previous_visit) + duration(previous_visit) + - * travel_duration(previous_visit, next_visit) > start_time(next_visit) - * ``` - * Arrival at next_visit will likely happen later than its current - * time window due the increased estimate of travel time - * `travel_duration(previous_visit, next_visit)` due to traffic. Also, a break - * may be forced to overlap with a visit due to an increase in travel time - * estimates and visit or break time window restrictions. - * @type \Google\Maps\RouteOptimization\V1\ShipmentRoute\EncodedPolyline $route_polyline - * The encoded polyline representation of the route. - * This field is only populated if - * [OptimizeToursRequest.populate_polylines][google.maps.routeoptimization.v1.OptimizeToursRequest.populate_polylines] - * is set to true. - * @type array<\Google\Maps\RouteOptimization\V1\ShipmentRoute\PBBreak>|\Google\Protobuf\Internal\RepeatedField $breaks - * Breaks scheduled for the vehicle performing this route. - * The `breaks` sequence represents time intervals, each starting at the - * corresponding `start_time` and lasting `duration` seconds. - * @type \Google\Maps\RouteOptimization\V1\AggregatedMetrics $metrics - * Duration, distance and load metrics for this route. The fields of - * [AggregatedMetrics][google.maps.routeoptimization.v1.AggregatedMetrics] are - * summed over all - * [ShipmentRoute.transitions][google.maps.routeoptimization.v1.ShipmentRoute.transitions] - * or - * [ShipmentRoute.visits][google.maps.routeoptimization.v1.ShipmentRoute.visits], - * depending on the context. - * @type array|\Google\Protobuf\Internal\MapField $route_costs - * Cost of the route, broken down by cost-related request fields. - * The keys are proto paths, relative to the input OptimizeToursRequest, e.g. - * "model.shipments.pickups.cost", and the values are the total cost - * generated by the corresponding cost field, aggregated over the whole route. - * In other words, costs["model.shipments.pickups.cost"] is the sum of all - * pickup costs over the route. All costs defined in the model are reported in - * detail here with the exception of costs related to TransitionAttributes - * that are only reported in an aggregated way as of 2022/01. - * @type float $route_total_cost - * Total cost of the route. The sum of all costs in the cost map. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); - parent::__construct($data); - } - - /** - * Vehicle performing the route, identified by its index in the source - * `ShipmentModel`. - * - * Generated from protobuf field int32 vehicle_index = 1; - * @return int - */ - public function getVehicleIndex() - { - return $this->vehicle_index; - } - - /** - * Vehicle performing the route, identified by its index in the source - * `ShipmentModel`. - * - * Generated from protobuf field int32 vehicle_index = 1; - * @param int $var - * @return $this - */ - public function setVehicleIndex($var) - { - GPBUtil::checkInt32($var); - $this->vehicle_index = $var; - - return $this; - } - - /** - * Label of the vehicle performing this route, equal to - * `ShipmentModel.vehicles(vehicle_index).label`, if specified. - * - * Generated from protobuf field string vehicle_label = 2; - * @return string - */ - public function getVehicleLabel() - { - return $this->vehicle_label; - } - - /** - * Label of the vehicle performing this route, equal to - * `ShipmentModel.vehicles(vehicle_index).label`, if specified. - * - * Generated from protobuf field string vehicle_label = 2; - * @param string $var - * @return $this - */ - public function setVehicleLabel($var) - { - GPBUtil::checkString($var, True); - $this->vehicle_label = $var; - - return $this; - } - - /** - * Time at which the vehicle starts its route. - * - * Generated from protobuf field .google.protobuf.Timestamp vehicle_start_time = 5; - * @return \Google\Protobuf\Timestamp|null - */ - public function getVehicleStartTime() - { - return $this->vehicle_start_time; - } - - public function hasVehicleStartTime() - { - return isset($this->vehicle_start_time); - } - - public function clearVehicleStartTime() - { - unset($this->vehicle_start_time); - } - - /** - * Time at which the vehicle starts its route. - * - * Generated from protobuf field .google.protobuf.Timestamp vehicle_start_time = 5; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setVehicleStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->vehicle_start_time = $var; - - return $this; - } - - /** - * Time at which the vehicle finishes its route. - * - * Generated from protobuf field .google.protobuf.Timestamp vehicle_end_time = 6; - * @return \Google\Protobuf\Timestamp|null - */ - public function getVehicleEndTime() - { - return $this->vehicle_end_time; - } - - public function hasVehicleEndTime() - { - return isset($this->vehicle_end_time); - } - - public function clearVehicleEndTime() - { - unset($this->vehicle_end_time); - } - - /** - * Time at which the vehicle finishes its route. - * - * Generated from protobuf field .google.protobuf.Timestamp vehicle_end_time = 6; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setVehicleEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->vehicle_end_time = $var; - - return $this; - } - - /** - * Ordered sequence of visits representing a route. - * visits[i] is the i-th visit in the route. - * If this field is empty, the vehicle is considered as unused. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentRoute.Visit visits = 7; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getVisits() - { - return $this->visits; - } - - /** - * Ordered sequence of visits representing a route. - * visits[i] is the i-th visit in the route. - * If this field is empty, the vehicle is considered as unused. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentRoute.Visit visits = 7; - * @param array<\Google\Maps\RouteOptimization\V1\ShipmentRoute\Visit>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setVisits($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\ShipmentRoute\Visit::class); - $this->visits = $arr; - - return $this; - } - - /** - * Ordered list of transitions for the route. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentRoute.Transition transitions = 8; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTransitions() - { - return $this->transitions; - } - - /** - * Ordered list of transitions for the route. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentRoute.Transition transitions = 8; - * @param array<\Google\Maps\RouteOptimization\V1\ShipmentRoute\Transition>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTransitions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\ShipmentRoute\Transition::class); - $this->transitions = $arr; - - return $this; - } - - /** - * When - * [OptimizeToursRequest.consider_road_traffic][google.maps.routeoptimization.v1.OptimizeToursRequest.consider_road_traffic], - * is set to true, this field indicates that inconsistencies in route timings - * are predicted using traffic-based travel duration estimates. There may be - * insufficient time to complete traffic-adjusted travel, delays, and breaks - * between visits, before the first visit, or after the last visit, while - * still satisfying the visit and vehicle time windows. For example, - * ``` - * start_time(previous_visit) + duration(previous_visit) + - * travel_duration(previous_visit, next_visit) > start_time(next_visit) - * ``` - * Arrival at next_visit will likely happen later than its current - * time window due the increased estimate of travel time - * `travel_duration(previous_visit, next_visit)` due to traffic. Also, a break - * may be forced to overlap with a visit due to an increase in travel time - * estimates and visit or break time window restrictions. - * - * Generated from protobuf field bool has_traffic_infeasibilities = 9; - * @return bool - */ - public function getHasTrafficInfeasibilities() - { - return $this->has_traffic_infeasibilities; - } - - /** - * When - * [OptimizeToursRequest.consider_road_traffic][google.maps.routeoptimization.v1.OptimizeToursRequest.consider_road_traffic], - * is set to true, this field indicates that inconsistencies in route timings - * are predicted using traffic-based travel duration estimates. There may be - * insufficient time to complete traffic-adjusted travel, delays, and breaks - * between visits, before the first visit, or after the last visit, while - * still satisfying the visit and vehicle time windows. For example, - * ``` - * start_time(previous_visit) + duration(previous_visit) + - * travel_duration(previous_visit, next_visit) > start_time(next_visit) - * ``` - * Arrival at next_visit will likely happen later than its current - * time window due the increased estimate of travel time - * `travel_duration(previous_visit, next_visit)` due to traffic. Also, a break - * may be forced to overlap with a visit due to an increase in travel time - * estimates and visit or break time window restrictions. - * - * Generated from protobuf field bool has_traffic_infeasibilities = 9; - * @param bool $var - * @return $this - */ - public function setHasTrafficInfeasibilities($var) - { - GPBUtil::checkBool($var); - $this->has_traffic_infeasibilities = $var; - - return $this; - } - - /** - * The encoded polyline representation of the route. - * This field is only populated if - * [OptimizeToursRequest.populate_polylines][google.maps.routeoptimization.v1.OptimizeToursRequest.populate_polylines] - * is set to true. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.ShipmentRoute.EncodedPolyline route_polyline = 10; - * @return \Google\Maps\RouteOptimization\V1\ShipmentRoute\EncodedPolyline|null - */ - public function getRoutePolyline() - { - return $this->route_polyline; - } - - public function hasRoutePolyline() - { - return isset($this->route_polyline); - } - - public function clearRoutePolyline() - { - unset($this->route_polyline); - } - - /** - * The encoded polyline representation of the route. - * This field is only populated if - * [OptimizeToursRequest.populate_polylines][google.maps.routeoptimization.v1.OptimizeToursRequest.populate_polylines] - * is set to true. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.ShipmentRoute.EncodedPolyline route_polyline = 10; - * @param \Google\Maps\RouteOptimization\V1\ShipmentRoute\EncodedPolyline $var - * @return $this - */ - public function setRoutePolyline($var) - { - GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\ShipmentRoute\EncodedPolyline::class); - $this->route_polyline = $var; - - return $this; - } - - /** - * Breaks scheduled for the vehicle performing this route. - * The `breaks` sequence represents time intervals, each starting at the - * corresponding `start_time` and lasting `duration` seconds. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentRoute.Break breaks = 11; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getBreaks() - { - return $this->breaks; - } - - /** - * Breaks scheduled for the vehicle performing this route. - * The `breaks` sequence represents time intervals, each starting at the - * corresponding `start_time` and lasting `duration` seconds. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.ShipmentRoute.Break breaks = 11; - * @param array<\Google\Maps\RouteOptimization\V1\ShipmentRoute\PBBreak>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setBreaks($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\ShipmentRoute\PBBreak::class); - $this->breaks = $arr; - - return $this; - } - - /** - * Duration, distance and load metrics for this route. The fields of - * [AggregatedMetrics][google.maps.routeoptimization.v1.AggregatedMetrics] are - * summed over all - * [ShipmentRoute.transitions][google.maps.routeoptimization.v1.ShipmentRoute.transitions] - * or - * [ShipmentRoute.visits][google.maps.routeoptimization.v1.ShipmentRoute.visits], - * depending on the context. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.AggregatedMetrics metrics = 12; - * @return \Google\Maps\RouteOptimization\V1\AggregatedMetrics|null - */ - public function getMetrics() - { - return $this->metrics; - } - - public function hasMetrics() - { - return isset($this->metrics); - } - - public function clearMetrics() - { - unset($this->metrics); - } - - /** - * Duration, distance and load metrics for this route. The fields of - * [AggregatedMetrics][google.maps.routeoptimization.v1.AggregatedMetrics] are - * summed over all - * [ShipmentRoute.transitions][google.maps.routeoptimization.v1.ShipmentRoute.transitions] - * or - * [ShipmentRoute.visits][google.maps.routeoptimization.v1.ShipmentRoute.visits], - * depending on the context. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.AggregatedMetrics metrics = 12; - * @param \Google\Maps\RouteOptimization\V1\AggregatedMetrics $var - * @return $this - */ - public function setMetrics($var) - { - GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\AggregatedMetrics::class); - $this->metrics = $var; - - return $this; - } - - /** - * Cost of the route, broken down by cost-related request fields. - * The keys are proto paths, relative to the input OptimizeToursRequest, e.g. - * "model.shipments.pickups.cost", and the values are the total cost - * generated by the corresponding cost field, aggregated over the whole route. - * In other words, costs["model.shipments.pickups.cost"] is the sum of all - * pickup costs over the route. All costs defined in the model are reported in - * detail here with the exception of costs related to TransitionAttributes - * that are only reported in an aggregated way as of 2022/01. - * - * Generated from protobuf field map route_costs = 17; - * @return \Google\Protobuf\Internal\MapField - */ - public function getRouteCosts() - { - return $this->route_costs; - } - - /** - * Cost of the route, broken down by cost-related request fields. - * The keys are proto paths, relative to the input OptimizeToursRequest, e.g. - * "model.shipments.pickups.cost", and the values are the total cost - * generated by the corresponding cost field, aggregated over the whole route. - * In other words, costs["model.shipments.pickups.cost"] is the sum of all - * pickup costs over the route. All costs defined in the model are reported in - * detail here with the exception of costs related to TransitionAttributes - * that are only reported in an aggregated way as of 2022/01. - * - * Generated from protobuf field map route_costs = 17; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setRouteCosts($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::DOUBLE); - $this->route_costs = $arr; - - return $this; - } - - /** - * Total cost of the route. The sum of all costs in the cost map. - * - * Generated from protobuf field double route_total_cost = 18; - * @return float - */ - public function getRouteTotalCost() - { - return $this->route_total_cost; - } - - /** - * Total cost of the route. The sum of all costs in the cost map. - * - * Generated from protobuf field double route_total_cost = 18; - * @param float $var - * @return $this - */ - public function setRouteTotalCost($var) - { - GPBUtil::checkDouble($var); - $this->route_total_cost = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentRoute/EncodedPolyline.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentRoute/EncodedPolyline.php deleted file mode 100644 index a3aecf3c5212..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentRoute/EncodedPolyline.php +++ /dev/null @@ -1,73 +0,0 @@ -google.maps.routeoptimization.v1.ShipmentRoute.EncodedPolyline - */ -class EncodedPolyline extends \Google\Protobuf\Internal\Message -{ - /** - * String representing encoded points of the polyline. - * - * Generated from protobuf field string points = 1; - */ - protected $points = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $points - * String representing encoded points of the polyline. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); - parent::__construct($data); - } - - /** - * String representing encoded points of the polyline. - * - * Generated from protobuf field string points = 1; - * @return string - */ - public function getPoints() - { - return $this->points; - } - - /** - * String representing encoded points of the polyline. - * - * Generated from protobuf field string points = 1; - * @param string $var - * @return $this - */ - public function setPoints($var) - { - GPBUtil::checkString($var, True); - $this->points = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(EncodedPolyline::class, \Google\Maps\RouteOptimization\V1\ShipmentRoute_EncodedPolyline::class); - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentRoute/PBBreak.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentRoute/PBBreak.php deleted file mode 100644 index e05a14f991b9..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentRoute/PBBreak.php +++ /dev/null @@ -1,124 +0,0 @@ -google.maps.routeoptimization.v1.ShipmentRoute.Break - */ -class PBBreak extends \Google\Protobuf\Internal\Message -{ - /** - * Start time of a break. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - */ - protected $start_time = null; - /** - * Duration of a break. - * - * Generated from protobuf field .google.protobuf.Duration duration = 2; - */ - protected $duration = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $start_time - * Start time of a break. - * @type \Google\Protobuf\Duration $duration - * Duration of a break. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); - parent::__construct($data); - } - - /** - * Start time of a break. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStartTime() - { - return $this->start_time; - } - - public function hasStartTime() - { - return isset($this->start_time); - } - - public function clearStartTime() - { - unset($this->start_time); - } - - /** - * Start time of a break. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * Duration of a break. - * - * Generated from protobuf field .google.protobuf.Duration duration = 2; - * @return \Google\Protobuf\Duration|null - */ - public function getDuration() - { - return $this->duration; - } - - public function hasDuration() - { - return isset($this->duration); - } - - public function clearDuration() - { - unset($this->duration); - } - - /** - * Duration of a break. - * - * Generated from protobuf field .google.protobuf.Duration duration = 2; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->duration = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(PBBreak::class, \Google\Maps\RouteOptimization\V1\ShipmentRoute_Break::class); - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentRoute/Transition.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentRoute/Transition.php deleted file mode 100644 index e2c4c53592bf..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentRoute/Transition.php +++ /dev/null @@ -1,639 +0,0 @@ -google.maps.routeoptimization.v1.ShipmentRoute.Transition - */ -class Transition extends \Google\Protobuf\Internal\Message -{ - /** - * Travel duration during this transition. - * - * Generated from protobuf field .google.protobuf.Duration travel_duration = 1; - */ - protected $travel_duration = null; - /** - * Distance traveled during the transition. - * - * Generated from protobuf field double travel_distance_meters = 2; - */ - protected $travel_distance_meters = 0.0; - /** - * When traffic is requested via - * [OptimizeToursRequest.consider_road_traffic] - * [google.maps.routeoptimization.v1.OptimizeToursRequest.consider_road_traffic], - * and the traffic info couldn't be retrieved for a `Transition`, this - * boolean is set to true. This may be temporary (rare hiccup in the - * realtime traffic servers) or permanent (no data for this location). - * - * Generated from protobuf field bool traffic_info_unavailable = 3; - */ - protected $traffic_info_unavailable = false; - /** - * Sum of the delay durations applied to this transition. If any, the delay - * starts exactly `delay_duration` seconds before the next event (visit or - * vehicle end). See - * [TransitionAttributes.delay][google.maps.routeoptimization.v1.TransitionAttributes.delay]. - * - * Generated from protobuf field .google.protobuf.Duration delay_duration = 4; - */ - protected $delay_duration = null; - /** - * Sum of the duration of the breaks occurring during this transition, if - * any. Details about each break's start time and duration are stored in - * [ShipmentRoute.breaks][google.maps.routeoptimization.v1.ShipmentRoute.breaks]. - * - * Generated from protobuf field .google.protobuf.Duration break_duration = 5; - */ - protected $break_duration = null; - /** - * Time spent waiting during this transition. Wait duration corresponds to - * idle time and does not include break time. Also note that this wait time - * may be split into several non-contiguous intervals. - * - * Generated from protobuf field .google.protobuf.Duration wait_duration = 6; - */ - protected $wait_duration = null; - /** - * Total duration of the transition, provided for convenience. It is equal - * to: - * * next visit `start_time` (or `vehicle_end_time` if this is the last - * transition) - this transition's `start_time`; - * * if `ShipmentRoute.has_traffic_infeasibilities` is false, the following - * additionally holds: `total_duration = travel_duration + delay_duration - * + break_duration + wait_duration`. - * - * Generated from protobuf field .google.protobuf.Duration total_duration = 7; - */ - protected $total_duration = null; - /** - * Start time of this transition. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 8; - */ - protected $start_time = null; - /** - * The encoded polyline representation of the route followed during the - * transition. - * This field is only populated if [populate_transition_polylines] - * [google.maps.routeoptimization.v1.OptimizeToursRequest.populate_transition_polylines] - * is set to true. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.ShipmentRoute.EncodedPolyline route_polyline = 9; - */ - protected $route_polyline = null; - /** - * Output only. An opaque token that can be passed to [Navigation - * SDK](https://developers.google.com/maps/documentation/navigation) to - * reconstruct the route during navigation, and, in the event of rerouting, - * honor the original intention when the route was created. Treat this token - * as an opaque blob. Don't compare its value across requests as its value - * may change even if the service returns the exact same route. This field - * is only populated if [populate_transition_polylines] - * [google.maps.routeoptimization.v1.OptimizeToursRequest.populate_transition_polylines] - * is set to true. - * - * Generated from protobuf field string route_token = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $route_token = ''; - /** - * Vehicle loads during this transition, for each type that either appears - * in this vehicle's - * [Vehicle.load_limits][google.maps.routeoptimization.v1.Vehicle.load_limits], - * or that have non-zero - * [Shipment.load_demands][google.maps.routeoptimization.v1.Shipment.load_demands] - * on some shipment performed on this route. - * The loads during the first transition are the starting loads of the - * vehicle route. Then, after each visit, the visit's `load_demands` are - * either added or subtracted to get the next transition's loads, depending - * on whether the visit was a pickup or a delivery. - * - * Generated from protobuf field map vehicle_loads = 11; - */ - private $vehicle_loads; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Duration $travel_duration - * Travel duration during this transition. - * @type float $travel_distance_meters - * Distance traveled during the transition. - * @type bool $traffic_info_unavailable - * When traffic is requested via - * [OptimizeToursRequest.consider_road_traffic] - * [google.maps.routeoptimization.v1.OptimizeToursRequest.consider_road_traffic], - * and the traffic info couldn't be retrieved for a `Transition`, this - * boolean is set to true. This may be temporary (rare hiccup in the - * realtime traffic servers) or permanent (no data for this location). - * @type \Google\Protobuf\Duration $delay_duration - * Sum of the delay durations applied to this transition. If any, the delay - * starts exactly `delay_duration` seconds before the next event (visit or - * vehicle end). See - * [TransitionAttributes.delay][google.maps.routeoptimization.v1.TransitionAttributes.delay]. - * @type \Google\Protobuf\Duration $break_duration - * Sum of the duration of the breaks occurring during this transition, if - * any. Details about each break's start time and duration are stored in - * [ShipmentRoute.breaks][google.maps.routeoptimization.v1.ShipmentRoute.breaks]. - * @type \Google\Protobuf\Duration $wait_duration - * Time spent waiting during this transition. Wait duration corresponds to - * idle time and does not include break time. Also note that this wait time - * may be split into several non-contiguous intervals. - * @type \Google\Protobuf\Duration $total_duration - * Total duration of the transition, provided for convenience. It is equal - * to: - * * next visit `start_time` (or `vehicle_end_time` if this is the last - * transition) - this transition's `start_time`; - * * if `ShipmentRoute.has_traffic_infeasibilities` is false, the following - * additionally holds: `total_duration = travel_duration + delay_duration - * + break_duration + wait_duration`. - * @type \Google\Protobuf\Timestamp $start_time - * Start time of this transition. - * @type \Google\Maps\RouteOptimization\V1\ShipmentRoute\EncodedPolyline $route_polyline - * The encoded polyline representation of the route followed during the - * transition. - * This field is only populated if [populate_transition_polylines] - * [google.maps.routeoptimization.v1.OptimizeToursRequest.populate_transition_polylines] - * is set to true. - * @type string $route_token - * Output only. An opaque token that can be passed to [Navigation - * SDK](https://developers.google.com/maps/documentation/navigation) to - * reconstruct the route during navigation, and, in the event of rerouting, - * honor the original intention when the route was created. Treat this token - * as an opaque blob. Don't compare its value across requests as its value - * may change even if the service returns the exact same route. This field - * is only populated if [populate_transition_polylines] - * [google.maps.routeoptimization.v1.OptimizeToursRequest.populate_transition_polylines] - * is set to true. - * @type array|\Google\Protobuf\Internal\MapField $vehicle_loads - * Vehicle loads during this transition, for each type that either appears - * in this vehicle's - * [Vehicle.load_limits][google.maps.routeoptimization.v1.Vehicle.load_limits], - * or that have non-zero - * [Shipment.load_demands][google.maps.routeoptimization.v1.Shipment.load_demands] - * on some shipment performed on this route. - * The loads during the first transition are the starting loads of the - * vehicle route. Then, after each visit, the visit's `load_demands` are - * either added or subtracted to get the next transition's loads, depending - * on whether the visit was a pickup or a delivery. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); - parent::__construct($data); - } - - /** - * Travel duration during this transition. - * - * Generated from protobuf field .google.protobuf.Duration travel_duration = 1; - * @return \Google\Protobuf\Duration|null - */ - public function getTravelDuration() - { - return $this->travel_duration; - } - - public function hasTravelDuration() - { - return isset($this->travel_duration); - } - - public function clearTravelDuration() - { - unset($this->travel_duration); - } - - /** - * Travel duration during this transition. - * - * Generated from protobuf field .google.protobuf.Duration travel_duration = 1; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setTravelDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->travel_duration = $var; - - return $this; - } - - /** - * Distance traveled during the transition. - * - * Generated from protobuf field double travel_distance_meters = 2; - * @return float - */ - public function getTravelDistanceMeters() - { - return $this->travel_distance_meters; - } - - /** - * Distance traveled during the transition. - * - * Generated from protobuf field double travel_distance_meters = 2; - * @param float $var - * @return $this - */ - public function setTravelDistanceMeters($var) - { - GPBUtil::checkDouble($var); - $this->travel_distance_meters = $var; - - return $this; - } - - /** - * When traffic is requested via - * [OptimizeToursRequest.consider_road_traffic] - * [google.maps.routeoptimization.v1.OptimizeToursRequest.consider_road_traffic], - * and the traffic info couldn't be retrieved for a `Transition`, this - * boolean is set to true. This may be temporary (rare hiccup in the - * realtime traffic servers) or permanent (no data for this location). - * - * Generated from protobuf field bool traffic_info_unavailable = 3; - * @return bool - */ - public function getTrafficInfoUnavailable() - { - return $this->traffic_info_unavailable; - } - - /** - * When traffic is requested via - * [OptimizeToursRequest.consider_road_traffic] - * [google.maps.routeoptimization.v1.OptimizeToursRequest.consider_road_traffic], - * and the traffic info couldn't be retrieved for a `Transition`, this - * boolean is set to true. This may be temporary (rare hiccup in the - * realtime traffic servers) or permanent (no data for this location). - * - * Generated from protobuf field bool traffic_info_unavailable = 3; - * @param bool $var - * @return $this - */ - public function setTrafficInfoUnavailable($var) - { - GPBUtil::checkBool($var); - $this->traffic_info_unavailable = $var; - - return $this; - } - - /** - * Sum of the delay durations applied to this transition. If any, the delay - * starts exactly `delay_duration` seconds before the next event (visit or - * vehicle end). See - * [TransitionAttributes.delay][google.maps.routeoptimization.v1.TransitionAttributes.delay]. - * - * Generated from protobuf field .google.protobuf.Duration delay_duration = 4; - * @return \Google\Protobuf\Duration|null - */ - public function getDelayDuration() - { - return $this->delay_duration; - } - - public function hasDelayDuration() - { - return isset($this->delay_duration); - } - - public function clearDelayDuration() - { - unset($this->delay_duration); - } - - /** - * Sum of the delay durations applied to this transition. If any, the delay - * starts exactly `delay_duration` seconds before the next event (visit or - * vehicle end). See - * [TransitionAttributes.delay][google.maps.routeoptimization.v1.TransitionAttributes.delay]. - * - * Generated from protobuf field .google.protobuf.Duration delay_duration = 4; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setDelayDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->delay_duration = $var; - - return $this; - } - - /** - * Sum of the duration of the breaks occurring during this transition, if - * any. Details about each break's start time and duration are stored in - * [ShipmentRoute.breaks][google.maps.routeoptimization.v1.ShipmentRoute.breaks]. - * - * Generated from protobuf field .google.protobuf.Duration break_duration = 5; - * @return \Google\Protobuf\Duration|null - */ - public function getBreakDuration() - { - return $this->break_duration; - } - - public function hasBreakDuration() - { - return isset($this->break_duration); - } - - public function clearBreakDuration() - { - unset($this->break_duration); - } - - /** - * Sum of the duration of the breaks occurring during this transition, if - * any. Details about each break's start time and duration are stored in - * [ShipmentRoute.breaks][google.maps.routeoptimization.v1.ShipmentRoute.breaks]. - * - * Generated from protobuf field .google.protobuf.Duration break_duration = 5; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setBreakDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->break_duration = $var; - - return $this; - } - - /** - * Time spent waiting during this transition. Wait duration corresponds to - * idle time and does not include break time. Also note that this wait time - * may be split into several non-contiguous intervals. - * - * Generated from protobuf field .google.protobuf.Duration wait_duration = 6; - * @return \Google\Protobuf\Duration|null - */ - public function getWaitDuration() - { - return $this->wait_duration; - } - - public function hasWaitDuration() - { - return isset($this->wait_duration); - } - - public function clearWaitDuration() - { - unset($this->wait_duration); - } - - /** - * Time spent waiting during this transition. Wait duration corresponds to - * idle time and does not include break time. Also note that this wait time - * may be split into several non-contiguous intervals. - * - * Generated from protobuf field .google.protobuf.Duration wait_duration = 6; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setWaitDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->wait_duration = $var; - - return $this; - } - - /** - * Total duration of the transition, provided for convenience. It is equal - * to: - * * next visit `start_time` (or `vehicle_end_time` if this is the last - * transition) - this transition's `start_time`; - * * if `ShipmentRoute.has_traffic_infeasibilities` is false, the following - * additionally holds: `total_duration = travel_duration + delay_duration - * + break_duration + wait_duration`. - * - * Generated from protobuf field .google.protobuf.Duration total_duration = 7; - * @return \Google\Protobuf\Duration|null - */ - public function getTotalDuration() - { - return $this->total_duration; - } - - public function hasTotalDuration() - { - return isset($this->total_duration); - } - - public function clearTotalDuration() - { - unset($this->total_duration); - } - - /** - * Total duration of the transition, provided for convenience. It is equal - * to: - * * next visit `start_time` (or `vehicle_end_time` if this is the last - * transition) - this transition's `start_time`; - * * if `ShipmentRoute.has_traffic_infeasibilities` is false, the following - * additionally holds: `total_duration = travel_duration + delay_duration - * + break_duration + wait_duration`. - * - * Generated from protobuf field .google.protobuf.Duration total_duration = 7; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setTotalDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->total_duration = $var; - - return $this; - } - - /** - * Start time of this transition. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 8; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStartTime() - { - return $this->start_time; - } - - public function hasStartTime() - { - return isset($this->start_time); - } - - public function clearStartTime() - { - unset($this->start_time); - } - - /** - * Start time of this transition. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 8; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * The encoded polyline representation of the route followed during the - * transition. - * This field is only populated if [populate_transition_polylines] - * [google.maps.routeoptimization.v1.OptimizeToursRequest.populate_transition_polylines] - * is set to true. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.ShipmentRoute.EncodedPolyline route_polyline = 9; - * @return \Google\Maps\RouteOptimization\V1\ShipmentRoute\EncodedPolyline|null - */ - public function getRoutePolyline() - { - return $this->route_polyline; - } - - public function hasRoutePolyline() - { - return isset($this->route_polyline); - } - - public function clearRoutePolyline() - { - unset($this->route_polyline); - } - - /** - * The encoded polyline representation of the route followed during the - * transition. - * This field is only populated if [populate_transition_polylines] - * [google.maps.routeoptimization.v1.OptimizeToursRequest.populate_transition_polylines] - * is set to true. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.ShipmentRoute.EncodedPolyline route_polyline = 9; - * @param \Google\Maps\RouteOptimization\V1\ShipmentRoute\EncodedPolyline $var - * @return $this - */ - public function setRoutePolyline($var) - { - GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\ShipmentRoute\EncodedPolyline::class); - $this->route_polyline = $var; - - return $this; - } - - /** - * Output only. An opaque token that can be passed to [Navigation - * SDK](https://developers.google.com/maps/documentation/navigation) to - * reconstruct the route during navigation, and, in the event of rerouting, - * honor the original intention when the route was created. Treat this token - * as an opaque blob. Don't compare its value across requests as its value - * may change even if the service returns the exact same route. This field - * is only populated if [populate_transition_polylines] - * [google.maps.routeoptimization.v1.OptimizeToursRequest.populate_transition_polylines] - * is set to true. - * - * Generated from protobuf field string route_token = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getRouteToken() - { - return $this->route_token; - } - - /** - * Output only. An opaque token that can be passed to [Navigation - * SDK](https://developers.google.com/maps/documentation/navigation) to - * reconstruct the route during navigation, and, in the event of rerouting, - * honor the original intention when the route was created. Treat this token - * as an opaque blob. Don't compare its value across requests as its value - * may change even if the service returns the exact same route. This field - * is only populated if [populate_transition_polylines] - * [google.maps.routeoptimization.v1.OptimizeToursRequest.populate_transition_polylines] - * is set to true. - * - * Generated from protobuf field string route_token = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setRouteToken($var) - { - GPBUtil::checkString($var, True); - $this->route_token = $var; - - return $this; - } - - /** - * Vehicle loads during this transition, for each type that either appears - * in this vehicle's - * [Vehicle.load_limits][google.maps.routeoptimization.v1.Vehicle.load_limits], - * or that have non-zero - * [Shipment.load_demands][google.maps.routeoptimization.v1.Shipment.load_demands] - * on some shipment performed on this route. - * The loads during the first transition are the starting loads of the - * vehicle route. Then, after each visit, the visit's `load_demands` are - * either added or subtracted to get the next transition's loads, depending - * on whether the visit was a pickup or a delivery. - * - * Generated from protobuf field map vehicle_loads = 11; - * @return \Google\Protobuf\Internal\MapField - */ - public function getVehicleLoads() - { - return $this->vehicle_loads; - } - - /** - * Vehicle loads during this transition, for each type that either appears - * in this vehicle's - * [Vehicle.load_limits][google.maps.routeoptimization.v1.Vehicle.load_limits], - * or that have non-zero - * [Shipment.load_demands][google.maps.routeoptimization.v1.Shipment.load_demands] - * on some shipment performed on this route. - * The loads during the first transition are the starting loads of the - * vehicle route. Then, after each visit, the visit's `load_demands` are - * either added or subtracted to get the next transition's loads, depending - * on whether the visit was a pickup or a delivery. - * - * Generated from protobuf field map vehicle_loads = 11; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setVehicleLoads($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\ShipmentRoute\VehicleLoad::class); - $this->vehicle_loads = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Transition::class, \Google\Maps\RouteOptimization\V1\ShipmentRoute_Transition::class); - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentRoute/VehicleLoad.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentRoute/VehicleLoad.php deleted file mode 100644 index cb8378f1af45..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentRoute/VehicleLoad.php +++ /dev/null @@ -1,80 +0,0 @@ -google.maps.routeoptimization.v1.ShipmentRoute.VehicleLoad - */ -class VehicleLoad extends \Google\Protobuf\Internal\Message -{ - /** - * The amount of load on the vehicle, for the given type. The unit of load - * is usually indicated by the type. See - * [Transition.vehicle_loads][google.maps.routeoptimization.v1.ShipmentRoute.Transition.vehicle_loads]. - * - * Generated from protobuf field int64 amount = 1; - */ - protected $amount = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $amount - * The amount of load on the vehicle, for the given type. The unit of load - * is usually indicated by the type. See - * [Transition.vehicle_loads][google.maps.routeoptimization.v1.ShipmentRoute.Transition.vehicle_loads]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); - parent::__construct($data); - } - - /** - * The amount of load on the vehicle, for the given type. The unit of load - * is usually indicated by the type. See - * [Transition.vehicle_loads][google.maps.routeoptimization.v1.ShipmentRoute.Transition.vehicle_loads]. - * - * Generated from protobuf field int64 amount = 1; - * @return int|string - */ - public function getAmount() - { - return $this->amount; - } - - /** - * The amount of load on the vehicle, for the given type. The unit of load - * is usually indicated by the type. See - * [Transition.vehicle_loads][google.maps.routeoptimization.v1.ShipmentRoute.Transition.vehicle_loads]. - * - * Generated from protobuf field int64 amount = 1; - * @param int|string $var - * @return $this - */ - public function setAmount($var) - { - GPBUtil::checkInt64($var); - $this->amount = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(VehicleLoad::class, \Google\Maps\RouteOptimization\V1\ShipmentRoute_VehicleLoad::class); - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentRoute/Visit.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentRoute/Visit.php deleted file mode 100644 index a863ea8092cb..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentRoute/Visit.php +++ /dev/null @@ -1,433 +0,0 @@ -google.maps.routeoptimization.v1.ShipmentRoute.Visit - */ -class Visit extends \Google\Protobuf\Internal\Message -{ - /** - * Index of the `shipments` field in the source - * [ShipmentModel][google.maps.routeoptimization.v1.ShipmentModel]. - * - * Generated from protobuf field int32 shipment_index = 1; - */ - protected $shipment_index = 0; - /** - * If true the visit corresponds to a pickup of a `Shipment`. Otherwise, it - * corresponds to a delivery. - * - * Generated from protobuf field bool is_pickup = 2; - */ - protected $is_pickup = false; - /** - * Index of `VisitRequest` in either the pickup or delivery field of the - * `Shipment` (see `is_pickup`). - * - * Generated from protobuf field int32 visit_request_index = 3; - */ - protected $visit_request_index = 0; - /** - * Time at which the visit starts. Note that the vehicle may arrive earlier - * than this at the visit location. Times are consistent with the - * `ShipmentModel`. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 4; - */ - protected $start_time = null; - /** - * Total visit load demand as the sum of the shipment and the visit request - * `load_demands`. The values are negative if the visit is a delivery. - * Demands are reported for the same types as the - * [Transition.loads][google.maps.routeoptimization.v1.ShipmentRoute.Transition] - * (see this field). - * - * Generated from protobuf field map load_demands = 11; - */ - private $load_demands; - /** - * Extra detour time due to the shipments visited on the route before the - * visit and to the potential waiting time induced by time windows. - * If the visit is a delivery, the detour is computed from the corresponding - * pickup visit and is equal to: - * ``` - * start_time(delivery) - start_time(pickup) - * - (duration(pickup) + travel duration from the pickup location - * to the delivery location). - * ``` - * Otherwise, it is computed from the vehicle `start_location` and is equal - * to: - * ``` - * start_time - vehicle_start_time - travel duration from - * the vehicle's `start_location` to the visit. - * ``` - * - * Generated from protobuf field .google.protobuf.Duration detour = 6; - */ - protected $detour = null; - /** - * Copy of the corresponding `Shipment.label`, if specified in the - * `Shipment`. - * - * Generated from protobuf field string shipment_label = 7; - */ - protected $shipment_label = ''; - /** - * Copy of the corresponding - * [VisitRequest.label][google.maps.routeoptimization.v1.Shipment.VisitRequest.label], - * if specified in the `VisitRequest`. - * - * Generated from protobuf field string visit_label = 8; - */ - protected $visit_label = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $shipment_index - * Index of the `shipments` field in the source - * [ShipmentModel][google.maps.routeoptimization.v1.ShipmentModel]. - * @type bool $is_pickup - * If true the visit corresponds to a pickup of a `Shipment`. Otherwise, it - * corresponds to a delivery. - * @type int $visit_request_index - * Index of `VisitRequest` in either the pickup or delivery field of the - * `Shipment` (see `is_pickup`). - * @type \Google\Protobuf\Timestamp $start_time - * Time at which the visit starts. Note that the vehicle may arrive earlier - * than this at the visit location. Times are consistent with the - * `ShipmentModel`. - * @type array|\Google\Protobuf\Internal\MapField $load_demands - * Total visit load demand as the sum of the shipment and the visit request - * `load_demands`. The values are negative if the visit is a delivery. - * Demands are reported for the same types as the - * [Transition.loads][google.maps.routeoptimization.v1.ShipmentRoute.Transition] - * (see this field). - * @type \Google\Protobuf\Duration $detour - * Extra detour time due to the shipments visited on the route before the - * visit and to the potential waiting time induced by time windows. - * If the visit is a delivery, the detour is computed from the corresponding - * pickup visit and is equal to: - * ``` - * start_time(delivery) - start_time(pickup) - * - (duration(pickup) + travel duration from the pickup location - * to the delivery location). - * ``` - * Otherwise, it is computed from the vehicle `start_location` and is equal - * to: - * ``` - * start_time - vehicle_start_time - travel duration from - * the vehicle's `start_location` to the visit. - * ``` - * @type string $shipment_label - * Copy of the corresponding `Shipment.label`, if specified in the - * `Shipment`. - * @type string $visit_label - * Copy of the corresponding - * [VisitRequest.label][google.maps.routeoptimization.v1.Shipment.VisitRequest.label], - * if specified in the `VisitRequest`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); - parent::__construct($data); - } - - /** - * Index of the `shipments` field in the source - * [ShipmentModel][google.maps.routeoptimization.v1.ShipmentModel]. - * - * Generated from protobuf field int32 shipment_index = 1; - * @return int - */ - public function getShipmentIndex() - { - return $this->shipment_index; - } - - /** - * Index of the `shipments` field in the source - * [ShipmentModel][google.maps.routeoptimization.v1.ShipmentModel]. - * - * Generated from protobuf field int32 shipment_index = 1; - * @param int $var - * @return $this - */ - public function setShipmentIndex($var) - { - GPBUtil::checkInt32($var); - $this->shipment_index = $var; - - return $this; - } - - /** - * If true the visit corresponds to a pickup of a `Shipment`. Otherwise, it - * corresponds to a delivery. - * - * Generated from protobuf field bool is_pickup = 2; - * @return bool - */ - public function getIsPickup() - { - return $this->is_pickup; - } - - /** - * If true the visit corresponds to a pickup of a `Shipment`. Otherwise, it - * corresponds to a delivery. - * - * Generated from protobuf field bool is_pickup = 2; - * @param bool $var - * @return $this - */ - public function setIsPickup($var) - { - GPBUtil::checkBool($var); - $this->is_pickup = $var; - - return $this; - } - - /** - * Index of `VisitRequest` in either the pickup or delivery field of the - * `Shipment` (see `is_pickup`). - * - * Generated from protobuf field int32 visit_request_index = 3; - * @return int - */ - public function getVisitRequestIndex() - { - return $this->visit_request_index; - } - - /** - * Index of `VisitRequest` in either the pickup or delivery field of the - * `Shipment` (see `is_pickup`). - * - * Generated from protobuf field int32 visit_request_index = 3; - * @param int $var - * @return $this - */ - public function setVisitRequestIndex($var) - { - GPBUtil::checkInt32($var); - $this->visit_request_index = $var; - - return $this; - } - - /** - * Time at which the visit starts. Note that the vehicle may arrive earlier - * than this at the visit location. Times are consistent with the - * `ShipmentModel`. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 4; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStartTime() - { - return $this->start_time; - } - - public function hasStartTime() - { - return isset($this->start_time); - } - - public function clearStartTime() - { - unset($this->start_time); - } - - /** - * Time at which the visit starts. Note that the vehicle may arrive earlier - * than this at the visit location. Times are consistent with the - * `ShipmentModel`. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 4; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * Total visit load demand as the sum of the shipment and the visit request - * `load_demands`. The values are negative if the visit is a delivery. - * Demands are reported for the same types as the - * [Transition.loads][google.maps.routeoptimization.v1.ShipmentRoute.Transition] - * (see this field). - * - * Generated from protobuf field map load_demands = 11; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLoadDemands() - { - return $this->load_demands; - } - - /** - * Total visit load demand as the sum of the shipment and the visit request - * `load_demands`. The values are negative if the visit is a delivery. - * Demands are reported for the same types as the - * [Transition.loads][google.maps.routeoptimization.v1.ShipmentRoute.Transition] - * (see this field). - * - * Generated from protobuf field map load_demands = 11; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLoadDemands($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\Shipment\Load::class); - $this->load_demands = $arr; - - return $this; - } - - /** - * Extra detour time due to the shipments visited on the route before the - * visit and to the potential waiting time induced by time windows. - * If the visit is a delivery, the detour is computed from the corresponding - * pickup visit and is equal to: - * ``` - * start_time(delivery) - start_time(pickup) - * - (duration(pickup) + travel duration from the pickup location - * to the delivery location). - * ``` - * Otherwise, it is computed from the vehicle `start_location` and is equal - * to: - * ``` - * start_time - vehicle_start_time - travel duration from - * the vehicle's `start_location` to the visit. - * ``` - * - * Generated from protobuf field .google.protobuf.Duration detour = 6; - * @return \Google\Protobuf\Duration|null - */ - public function getDetour() - { - return $this->detour; - } - - public function hasDetour() - { - return isset($this->detour); - } - - public function clearDetour() - { - unset($this->detour); - } - - /** - * Extra detour time due to the shipments visited on the route before the - * visit and to the potential waiting time induced by time windows. - * If the visit is a delivery, the detour is computed from the corresponding - * pickup visit and is equal to: - * ``` - * start_time(delivery) - start_time(pickup) - * - (duration(pickup) + travel duration from the pickup location - * to the delivery location). - * ``` - * Otherwise, it is computed from the vehicle `start_location` and is equal - * to: - * ``` - * start_time - vehicle_start_time - travel duration from - * the vehicle's `start_location` to the visit. - * ``` - * - * Generated from protobuf field .google.protobuf.Duration detour = 6; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setDetour($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->detour = $var; - - return $this; - } - - /** - * Copy of the corresponding `Shipment.label`, if specified in the - * `Shipment`. - * - * Generated from protobuf field string shipment_label = 7; - * @return string - */ - public function getShipmentLabel() - { - return $this->shipment_label; - } - - /** - * Copy of the corresponding `Shipment.label`, if specified in the - * `Shipment`. - * - * Generated from protobuf field string shipment_label = 7; - * @param string $var - * @return $this - */ - public function setShipmentLabel($var) - { - GPBUtil::checkString($var, True); - $this->shipment_label = $var; - - return $this; - } - - /** - * Copy of the corresponding - * [VisitRequest.label][google.maps.routeoptimization.v1.Shipment.VisitRequest.label], - * if specified in the `VisitRequest`. - * - * Generated from protobuf field string visit_label = 8; - * @return string - */ - public function getVisitLabel() - { - return $this->visit_label; - } - - /** - * Copy of the corresponding - * [VisitRequest.label][google.maps.routeoptimization.v1.Shipment.VisitRequest.label], - * if specified in the `VisitRequest`. - * - * Generated from protobuf field string visit_label = 8; - * @param string $var - * @return $this - */ - public function setVisitLabel($var) - { - GPBUtil::checkString($var, True); - $this->visit_label = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Visit::class, \Google\Maps\RouteOptimization\V1\ShipmentRoute_Visit::class); - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentTypeIncompatibility.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentTypeIncompatibility.php deleted file mode 100644 index 17d80f6ccd1d..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentTypeIncompatibility.php +++ /dev/null @@ -1,107 +0,0 @@ -google.maps.routeoptimization.v1.ShipmentTypeIncompatibility - */ -class ShipmentTypeIncompatibility extends \Google\Protobuf\Internal\Message -{ - /** - * List of incompatible types. Two shipments having different `shipment_types` - * among those listed are "incompatible". - * - * Generated from protobuf field repeated string types = 1; - */ - private $types; - /** - * Mode applied to the incompatibility. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.ShipmentTypeIncompatibility.IncompatibilityMode incompatibility_mode = 2; - */ - protected $incompatibility_mode = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $types - * List of incompatible types. Two shipments having different `shipment_types` - * among those listed are "incompatible". - * @type int $incompatibility_mode - * Mode applied to the incompatibility. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); - parent::__construct($data); - } - - /** - * List of incompatible types. Two shipments having different `shipment_types` - * among those listed are "incompatible". - * - * Generated from protobuf field repeated string types = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTypes() - { - return $this->types; - } - - /** - * List of incompatible types. Two shipments having different `shipment_types` - * among those listed are "incompatible". - * - * Generated from protobuf field repeated string types = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTypes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->types = $arr; - - return $this; - } - - /** - * Mode applied to the incompatibility. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.ShipmentTypeIncompatibility.IncompatibilityMode incompatibility_mode = 2; - * @return int - */ - public function getIncompatibilityMode() - { - return $this->incompatibility_mode; - } - - /** - * Mode applied to the incompatibility. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.ShipmentTypeIncompatibility.IncompatibilityMode incompatibility_mode = 2; - * @param int $var - * @return $this - */ - public function setIncompatibilityMode($var) - { - GPBUtil::checkEnum($var, \Google\Maps\RouteOptimization\V1\ShipmentTypeIncompatibility\IncompatibilityMode::class); - $this->incompatibility_mode = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentTypeIncompatibility/IncompatibilityMode.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentTypeIncompatibility/IncompatibilityMode.php deleted file mode 100644 index 1b34c50ca5fa..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentTypeIncompatibility/IncompatibilityMode.php +++ /dev/null @@ -1,72 +0,0 @@ -google.maps.routeoptimization.v1.ShipmentTypeIncompatibility.IncompatibilityMode - */ -class IncompatibilityMode -{ - /** - * Unspecified incompatibility mode. This value should never be used. - * - * Generated from protobuf enum INCOMPATIBILITY_MODE_UNSPECIFIED = 0; - */ - const INCOMPATIBILITY_MODE_UNSPECIFIED = 0; - /** - * In this mode, two shipments with incompatible types can never share the - * same vehicle. - * - * Generated from protobuf enum NOT_PERFORMED_BY_SAME_VEHICLE = 1; - */ - const NOT_PERFORMED_BY_SAME_VEHICLE = 1; - /** - * For two shipments with incompatible types with the - * `NOT_IN_SAME_VEHICLE_SIMULTANEOUSLY` incompatibility mode: - * * If both are pickups only (no deliveries) or deliveries only (no - * pickups), they cannot share the same vehicle at all. - * * If one of the shipments has a delivery and the other a pickup, the two - * shipments can share the same vehicle iff the former shipment is - * delivered before the latter is picked up. - * - * Generated from protobuf enum NOT_IN_SAME_VEHICLE_SIMULTANEOUSLY = 2; - */ - const NOT_IN_SAME_VEHICLE_SIMULTANEOUSLY = 2; - - private static $valueToName = [ - self::INCOMPATIBILITY_MODE_UNSPECIFIED => 'INCOMPATIBILITY_MODE_UNSPECIFIED', - self::NOT_PERFORMED_BY_SAME_VEHICLE => 'NOT_PERFORMED_BY_SAME_VEHICLE', - self::NOT_IN_SAME_VEHICLE_SIMULTANEOUSLY => 'NOT_IN_SAME_VEHICLE_SIMULTANEOUSLY', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(IncompatibilityMode::class, \Google\Maps\RouteOptimization\V1\ShipmentTypeIncompatibility_IncompatibilityMode::class); - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentTypeRequirement.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentTypeRequirement.php deleted file mode 100644 index c7d8d7f847b7..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentTypeRequirement.php +++ /dev/null @@ -1,156 +0,0 @@ -google.maps.routeoptimization.v1.ShipmentTypeRequirement - */ -class ShipmentTypeRequirement extends \Google\Protobuf\Internal\Message -{ - /** - * List of alternative shipment types required by the - * `dependent_shipment_types`. - * - * Generated from protobuf field repeated string required_shipment_type_alternatives = 1; - */ - private $required_shipment_type_alternatives; - /** - * All shipments with a type in the `dependent_shipment_types` field require - * at least one shipment of type `required_shipment_type_alternatives` to be - * visited on the same route. - * NOTE: Chains of requirements such that a `shipment_type` depends on itself - * are not allowed. - * - * Generated from protobuf field repeated string dependent_shipment_types = 2; - */ - private $dependent_shipment_types; - /** - * Mode applied to the requirement. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.ShipmentTypeRequirement.RequirementMode requirement_mode = 3; - */ - protected $requirement_mode = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $required_shipment_type_alternatives - * List of alternative shipment types required by the - * `dependent_shipment_types`. - * @type array|\Google\Protobuf\Internal\RepeatedField $dependent_shipment_types - * All shipments with a type in the `dependent_shipment_types` field require - * at least one shipment of type `required_shipment_type_alternatives` to be - * visited on the same route. - * NOTE: Chains of requirements such that a `shipment_type` depends on itself - * are not allowed. - * @type int $requirement_mode - * Mode applied to the requirement. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); - parent::__construct($data); - } - - /** - * List of alternative shipment types required by the - * `dependent_shipment_types`. - * - * Generated from protobuf field repeated string required_shipment_type_alternatives = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRequiredShipmentTypeAlternatives() - { - return $this->required_shipment_type_alternatives; - } - - /** - * List of alternative shipment types required by the - * `dependent_shipment_types`. - * - * Generated from protobuf field repeated string required_shipment_type_alternatives = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRequiredShipmentTypeAlternatives($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->required_shipment_type_alternatives = $arr; - - return $this; - } - - /** - * All shipments with a type in the `dependent_shipment_types` field require - * at least one shipment of type `required_shipment_type_alternatives` to be - * visited on the same route. - * NOTE: Chains of requirements such that a `shipment_type` depends on itself - * are not allowed. - * - * Generated from protobuf field repeated string dependent_shipment_types = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDependentShipmentTypes() - { - return $this->dependent_shipment_types; - } - - /** - * All shipments with a type in the `dependent_shipment_types` field require - * at least one shipment of type `required_shipment_type_alternatives` to be - * visited on the same route. - * NOTE: Chains of requirements such that a `shipment_type` depends on itself - * are not allowed. - * - * Generated from protobuf field repeated string dependent_shipment_types = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDependentShipmentTypes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->dependent_shipment_types = $arr; - - return $this; - } - - /** - * Mode applied to the requirement. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.ShipmentTypeRequirement.RequirementMode requirement_mode = 3; - * @return int - */ - public function getRequirementMode() - { - return $this->requirement_mode; - } - - /** - * Mode applied to the requirement. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.ShipmentTypeRequirement.RequirementMode requirement_mode = 3; - * @param int $var - * @return $this - */ - public function setRequirementMode($var) - { - GPBUtil::checkEnum($var, \Google\Maps\RouteOptimization\V1\ShipmentTypeRequirement\RequirementMode::class); - $this->requirement_mode = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentTypeRequirement/RequirementMode.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentTypeRequirement/RequirementMode.php deleted file mode 100644 index b25581fc1f06..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/ShipmentTypeRequirement/RequirementMode.php +++ /dev/null @@ -1,80 +0,0 @@ -google.maps.routeoptimization.v1.ShipmentTypeRequirement.RequirementMode - */ -class RequirementMode -{ - /** - * Unspecified requirement mode. This value should never be used. - * - * Generated from protobuf enum REQUIREMENT_MODE_UNSPECIFIED = 0; - */ - const REQUIREMENT_MODE_UNSPECIFIED = 0; - /** - * In this mode, all "dependent" shipments must share the same vehicle as at - * least one of their "required" shipments. - * - * Generated from protobuf enum PERFORMED_BY_SAME_VEHICLE = 1; - */ - const PERFORMED_BY_SAME_VEHICLE = 1; - /** - * With the `IN_SAME_VEHICLE_AT_PICKUP_TIME` mode, all "dependent" - * shipments need to have at least one "required" shipment on their vehicle - * at the time of their pickup. - * A "dependent" shipment pickup must therefore have either: - * * A delivery-only "required" shipment delivered on the route after, or - * * A "required" shipment picked up on the route before it, and if the - * "required" shipment has a delivery, this delivery must be performed - * after the "dependent" shipment's pickup. - * - * Generated from protobuf enum IN_SAME_VEHICLE_AT_PICKUP_TIME = 2; - */ - const IN_SAME_VEHICLE_AT_PICKUP_TIME = 2; - /** - * Same as before, except the "dependent" shipments need to have a - * "required" shipment on their vehicle at the time of their *delivery*. - * - * Generated from protobuf enum IN_SAME_VEHICLE_AT_DELIVERY_TIME = 3; - */ - const IN_SAME_VEHICLE_AT_DELIVERY_TIME = 3; - - private static $valueToName = [ - self::REQUIREMENT_MODE_UNSPECIFIED => 'REQUIREMENT_MODE_UNSPECIFIED', - self::PERFORMED_BY_SAME_VEHICLE => 'PERFORMED_BY_SAME_VEHICLE', - self::IN_SAME_VEHICLE_AT_PICKUP_TIME => 'IN_SAME_VEHICLE_AT_PICKUP_TIME', - self::IN_SAME_VEHICLE_AT_DELIVERY_TIME => 'IN_SAME_VEHICLE_AT_DELIVERY_TIME', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(RequirementMode::class, \Google\Maps\RouteOptimization\V1\ShipmentTypeRequirement_RequirementMode::class); - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/SkippedShipment.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/SkippedShipment.php deleted file mode 100644 index 451c769e8d2a..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/SkippedShipment.php +++ /dev/null @@ -1,157 +0,0 @@ -google.maps.routeoptimization.v1.SkippedShipment - */ -class SkippedShipment extends \Google\Protobuf\Internal\Message -{ - /** - * The index corresponds to the index of the shipment in the source - * `ShipmentModel`. - * - * Generated from protobuf field int32 index = 1; - */ - protected $index = 0; - /** - * Copy of the corresponding - * [Shipment.label][google.maps.routeoptimization.v1.Shipment.label], if - * specified in the `Shipment`. - * - * Generated from protobuf field string label = 2; - */ - protected $label = ''; - /** - * A list of reasons that explain why the shipment was skipped. See comment - * above `Reason`. If we are unable to understand why a shipment was skipped, - * reasons will not be set. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.SkippedShipment.Reason reasons = 3; - */ - private $reasons; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $index - * The index corresponds to the index of the shipment in the source - * `ShipmentModel`. - * @type string $label - * Copy of the corresponding - * [Shipment.label][google.maps.routeoptimization.v1.Shipment.label], if - * specified in the `Shipment`. - * @type array<\Google\Maps\RouteOptimization\V1\SkippedShipment\Reason>|\Google\Protobuf\Internal\RepeatedField $reasons - * A list of reasons that explain why the shipment was skipped. See comment - * above `Reason`. If we are unable to understand why a shipment was skipped, - * reasons will not be set. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); - parent::__construct($data); - } - - /** - * The index corresponds to the index of the shipment in the source - * `ShipmentModel`. - * - * Generated from protobuf field int32 index = 1; - * @return int - */ - public function getIndex() - { - return $this->index; - } - - /** - * The index corresponds to the index of the shipment in the source - * `ShipmentModel`. - * - * Generated from protobuf field int32 index = 1; - * @param int $var - * @return $this - */ - public function setIndex($var) - { - GPBUtil::checkInt32($var); - $this->index = $var; - - return $this; - } - - /** - * Copy of the corresponding - * [Shipment.label][google.maps.routeoptimization.v1.Shipment.label], if - * specified in the `Shipment`. - * - * Generated from protobuf field string label = 2; - * @return string - */ - public function getLabel() - { - return $this->label; - } - - /** - * Copy of the corresponding - * [Shipment.label][google.maps.routeoptimization.v1.Shipment.label], if - * specified in the `Shipment`. - * - * Generated from protobuf field string label = 2; - * @param string $var - * @return $this - */ - public function setLabel($var) - { - GPBUtil::checkString($var, True); - $this->label = $var; - - return $this; - } - - /** - * A list of reasons that explain why the shipment was skipped. See comment - * above `Reason`. If we are unable to understand why a shipment was skipped, - * reasons will not be set. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.SkippedShipment.Reason reasons = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getReasons() - { - return $this->reasons; - } - - /** - * A list of reasons that explain why the shipment was skipped. See comment - * above `Reason`. If we are unable to understand why a shipment was skipped, - * reasons will not be set. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.SkippedShipment.Reason reasons = 3; - * @param array<\Google\Maps\RouteOptimization\V1\SkippedShipment\Reason>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setReasons($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\SkippedShipment\Reason::class); - $this->reasons = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/SkippedShipment/Reason.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/SkippedShipment/Reason.php deleted file mode 100644 index b764ddfda63a..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/SkippedShipment/Reason.php +++ /dev/null @@ -1,181 +0,0 @@ -google.maps.routeoptimization.v1.SkippedShipment.Reason - */ -class Reason extends \Google\Protobuf\Internal\Message -{ - /** - * Refer to the comments of Code. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.SkippedShipment.Reason.Code code = 1; - */ - protected $code = 0; - /** - * If the reason is related to a shipment-vehicle incompatibility, this - * field provides the index of one relevant vehicle. - * - * Generated from protobuf field optional int32 example_vehicle_index = 2; - */ - protected $example_vehicle_index = null; - /** - * If the reason code is `DEMAND_EXCEEDS_VEHICLE_CAPACITY`, documents one - * capacity type that is exceeded. - * - * Generated from protobuf field string example_exceeded_capacity_type = 3; - */ - protected $example_exceeded_capacity_type = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $code - * Refer to the comments of Code. - * @type int $example_vehicle_index - * If the reason is related to a shipment-vehicle incompatibility, this - * field provides the index of one relevant vehicle. - * @type string $example_exceeded_capacity_type - * If the reason code is `DEMAND_EXCEEDS_VEHICLE_CAPACITY`, documents one - * capacity type that is exceeded. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); - parent::__construct($data); - } - - /** - * Refer to the comments of Code. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.SkippedShipment.Reason.Code code = 1; - * @return int - */ - public function getCode() - { - return $this->code; - } - - /** - * Refer to the comments of Code. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.SkippedShipment.Reason.Code code = 1; - * @param int $var - * @return $this - */ - public function setCode($var) - { - GPBUtil::checkEnum($var, \Google\Maps\RouteOptimization\V1\SkippedShipment\Reason\Code::class); - $this->code = $var; - - return $this; - } - - /** - * If the reason is related to a shipment-vehicle incompatibility, this - * field provides the index of one relevant vehicle. - * - * Generated from protobuf field optional int32 example_vehicle_index = 2; - * @return int - */ - public function getExampleVehicleIndex() - { - return isset($this->example_vehicle_index) ? $this->example_vehicle_index : 0; - } - - public function hasExampleVehicleIndex() - { - return isset($this->example_vehicle_index); - } - - public function clearExampleVehicleIndex() - { - unset($this->example_vehicle_index); - } - - /** - * If the reason is related to a shipment-vehicle incompatibility, this - * field provides the index of one relevant vehicle. - * - * Generated from protobuf field optional int32 example_vehicle_index = 2; - * @param int $var - * @return $this - */ - public function setExampleVehicleIndex($var) - { - GPBUtil::checkInt32($var); - $this->example_vehicle_index = $var; - - return $this; - } - - /** - * If the reason code is `DEMAND_EXCEEDS_VEHICLE_CAPACITY`, documents one - * capacity type that is exceeded. - * - * Generated from protobuf field string example_exceeded_capacity_type = 3; - * @return string - */ - public function getExampleExceededCapacityType() - { - return $this->example_exceeded_capacity_type; - } - - /** - * If the reason code is `DEMAND_EXCEEDS_VEHICLE_CAPACITY`, documents one - * capacity type that is exceeded. - * - * Generated from protobuf field string example_exceeded_capacity_type = 3; - * @param string $var - * @return $this - */ - public function setExampleExceededCapacityType($var) - { - GPBUtil::checkString($var, True); - $this->example_exceeded_capacity_type = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Reason::class, \Google\Maps\RouteOptimization\V1\SkippedShipment_Reason::class); - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/SkippedShipment/Reason/Code.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/SkippedShipment/Reason/Code.php deleted file mode 100644 index 28c5af490f6b..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/SkippedShipment/Reason/Code.php +++ /dev/null @@ -1,115 +0,0 @@ -google.maps.routeoptimization.v1.SkippedShipment.Reason.Code - */ -class Code -{ - /** - * This should never be used. - * - * Generated from protobuf enum CODE_UNSPECIFIED = 0; - */ - const CODE_UNSPECIFIED = 0; - /** - * There is no vehicle in the model making all shipments infeasible. - * - * Generated from protobuf enum NO_VEHICLE = 1; - */ - const NO_VEHICLE = 1; - /** - * The demand of the shipment exceeds a vehicle's capacity for some - * capacity types, one of which is `example_exceeded_capacity_type`. - * - * Generated from protobuf enum DEMAND_EXCEEDS_VEHICLE_CAPACITY = 2; - */ - const DEMAND_EXCEEDS_VEHICLE_CAPACITY = 2; - /** - * The minimum distance necessary to perform this shipment, i.e. from - * the vehicle's `start_location` to the shipment's pickup and/or delivery - * locations and to the vehicle's end location exceeds the vehicle's - * `route_distance_limit`. - * Note that for this computation we use the geodesic distances. - * - * Generated from protobuf enum CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DISTANCE_LIMIT = 3; - */ - const CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DISTANCE_LIMIT = 3; - /** - * The minimum time necessary to perform this shipment, including travel - * time, wait time and service time exceeds the vehicle's - * `route_duration_limit`. - * Note: travel time is computed in the best-case scenario, namely as - * geodesic distance x 36 m/s (roughly 130 km/hour). - * - * Generated from protobuf enum CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DURATION_LIMIT = 4; - */ - const CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DURATION_LIMIT = 4; - /** - * Same as above but we only compare minimum travel time and the - * vehicle's `travel_duration_limit`. - * - * Generated from protobuf enum CANNOT_BE_PERFORMED_WITHIN_VEHICLE_TRAVEL_DURATION_LIMIT = 5; - */ - const CANNOT_BE_PERFORMED_WITHIN_VEHICLE_TRAVEL_DURATION_LIMIT = 5; - /** - * The vehicle cannot perform this shipment in the best-case scenario - * (see `CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DURATION_LIMIT` for time - * computation) if it starts at its earliest start time: the total time - * would make the vehicle end after its latest end time. - * - * Generated from protobuf enum CANNOT_BE_PERFORMED_WITHIN_VEHICLE_TIME_WINDOWS = 6; - */ - const CANNOT_BE_PERFORMED_WITHIN_VEHICLE_TIME_WINDOWS = 6; - /** - * The `allowed_vehicle_indices` field of the shipment is not empty and - * this vehicle does not belong to it. - * - * Generated from protobuf enum VEHICLE_NOT_ALLOWED = 7; - */ - const VEHICLE_NOT_ALLOWED = 7; - - private static $valueToName = [ - self::CODE_UNSPECIFIED => 'CODE_UNSPECIFIED', - self::NO_VEHICLE => 'NO_VEHICLE', - self::DEMAND_EXCEEDS_VEHICLE_CAPACITY => 'DEMAND_EXCEEDS_VEHICLE_CAPACITY', - self::CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DISTANCE_LIMIT => 'CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DISTANCE_LIMIT', - self::CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DURATION_LIMIT => 'CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DURATION_LIMIT', - self::CANNOT_BE_PERFORMED_WITHIN_VEHICLE_TRAVEL_DURATION_LIMIT => 'CANNOT_BE_PERFORMED_WITHIN_VEHICLE_TRAVEL_DURATION_LIMIT', - self::CANNOT_BE_PERFORMED_WITHIN_VEHICLE_TIME_WINDOWS => 'CANNOT_BE_PERFORMED_WITHIN_VEHICLE_TIME_WINDOWS', - self::VEHICLE_NOT_ALLOWED => 'VEHICLE_NOT_ALLOWED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Code::class, \Google\Maps\RouteOptimization\V1\SkippedShipment_Reason_Code::class); - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/TimeWindow.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/TimeWindow.php deleted file mode 100644 index 380dd0376f8d..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/TimeWindow.php +++ /dev/null @@ -1,389 +0,0 @@ -google.maps.routeoptimization.v1.TimeWindow - */ -class TimeWindow extends \Google\Protobuf\Internal\Message -{ - /** - * The hard time window start time. If unspecified it will be set to - * `ShipmentModel.global_start_time`. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - */ - protected $start_time = null; - /** - * The hard time window end time. If unspecified it will be set to - * `ShipmentModel.global_end_time`. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - */ - protected $end_time = null; - /** - * The soft start time of the time window. - * - * Generated from protobuf field .google.protobuf.Timestamp soft_start_time = 3; - */ - protected $soft_start_time = null; - /** - * The soft end time of the time window. - * - * Generated from protobuf field .google.protobuf.Timestamp soft_end_time = 4; - */ - protected $soft_end_time = null; - /** - * A cost per hour added to other costs in the model if the event occurs - * before soft_start_time, computed as: - * ``` - * max(0, soft_start_time - t.seconds) - * * cost_per_hour_before_soft_start_time / 3600, - * t being the time of the event. - * ``` - * This cost must be positive, and the field can only be set if - * soft_start_time has been set. - * - * Generated from protobuf field optional double cost_per_hour_before_soft_start_time = 5; - */ - protected $cost_per_hour_before_soft_start_time = null; - /** - * A cost per hour added to other costs in the model if the event occurs after - * `soft_end_time`, computed as: - * ``` - * max(0, t.seconds - soft_end_time.seconds) - * * cost_per_hour_after_soft_end_time / 3600, - * t being the time of the event. - * ``` - * This cost must be positive, and the field can only be set if - * `soft_end_time` has been set. - * - * Generated from protobuf field optional double cost_per_hour_after_soft_end_time = 6; - */ - protected $cost_per_hour_after_soft_end_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $start_time - * The hard time window start time. If unspecified it will be set to - * `ShipmentModel.global_start_time`. - * @type \Google\Protobuf\Timestamp $end_time - * The hard time window end time. If unspecified it will be set to - * `ShipmentModel.global_end_time`. - * @type \Google\Protobuf\Timestamp $soft_start_time - * The soft start time of the time window. - * @type \Google\Protobuf\Timestamp $soft_end_time - * The soft end time of the time window. - * @type float $cost_per_hour_before_soft_start_time - * A cost per hour added to other costs in the model if the event occurs - * before soft_start_time, computed as: - * ``` - * max(0, soft_start_time - t.seconds) - * * cost_per_hour_before_soft_start_time / 3600, - * t being the time of the event. - * ``` - * This cost must be positive, and the field can only be set if - * soft_start_time has been set. - * @type float $cost_per_hour_after_soft_end_time - * A cost per hour added to other costs in the model if the event occurs after - * `soft_end_time`, computed as: - * ``` - * max(0, t.seconds - soft_end_time.seconds) - * * cost_per_hour_after_soft_end_time / 3600, - * t being the time of the event. - * ``` - * This cost must be positive, and the field can only be set if - * `soft_end_time` has been set. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); - parent::__construct($data); - } - - /** - * The hard time window start time. If unspecified it will be set to - * `ShipmentModel.global_start_time`. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStartTime() - { - return $this->start_time; - } - - public function hasStartTime() - { - return isset($this->start_time); - } - - public function clearStartTime() - { - unset($this->start_time); - } - - /** - * The hard time window start time. If unspecified it will be set to - * `ShipmentModel.global_start_time`. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * The hard time window end time. If unspecified it will be set to - * `ShipmentModel.global_end_time`. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * The hard time window end time. If unspecified it will be set to - * `ShipmentModel.global_end_time`. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * The soft start time of the time window. - * - * Generated from protobuf field .google.protobuf.Timestamp soft_start_time = 3; - * @return \Google\Protobuf\Timestamp|null - */ - public function getSoftStartTime() - { - return $this->soft_start_time; - } - - public function hasSoftStartTime() - { - return isset($this->soft_start_time); - } - - public function clearSoftStartTime() - { - unset($this->soft_start_time); - } - - /** - * The soft start time of the time window. - * - * Generated from protobuf field .google.protobuf.Timestamp soft_start_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setSoftStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->soft_start_time = $var; - - return $this; - } - - /** - * The soft end time of the time window. - * - * Generated from protobuf field .google.protobuf.Timestamp soft_end_time = 4; - * @return \Google\Protobuf\Timestamp|null - */ - public function getSoftEndTime() - { - return $this->soft_end_time; - } - - public function hasSoftEndTime() - { - return isset($this->soft_end_time); - } - - public function clearSoftEndTime() - { - unset($this->soft_end_time); - } - - /** - * The soft end time of the time window. - * - * Generated from protobuf field .google.protobuf.Timestamp soft_end_time = 4; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setSoftEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->soft_end_time = $var; - - return $this; - } - - /** - * A cost per hour added to other costs in the model if the event occurs - * before soft_start_time, computed as: - * ``` - * max(0, soft_start_time - t.seconds) - * * cost_per_hour_before_soft_start_time / 3600, - * t being the time of the event. - * ``` - * This cost must be positive, and the field can only be set if - * soft_start_time has been set. - * - * Generated from protobuf field optional double cost_per_hour_before_soft_start_time = 5; - * @return float - */ - public function getCostPerHourBeforeSoftStartTime() - { - return isset($this->cost_per_hour_before_soft_start_time) ? $this->cost_per_hour_before_soft_start_time : 0.0; - } - - public function hasCostPerHourBeforeSoftStartTime() - { - return isset($this->cost_per_hour_before_soft_start_time); - } - - public function clearCostPerHourBeforeSoftStartTime() - { - unset($this->cost_per_hour_before_soft_start_time); - } - - /** - * A cost per hour added to other costs in the model if the event occurs - * before soft_start_time, computed as: - * ``` - * max(0, soft_start_time - t.seconds) - * * cost_per_hour_before_soft_start_time / 3600, - * t being the time of the event. - * ``` - * This cost must be positive, and the field can only be set if - * soft_start_time has been set. - * - * Generated from protobuf field optional double cost_per_hour_before_soft_start_time = 5; - * @param float $var - * @return $this - */ - public function setCostPerHourBeforeSoftStartTime($var) - { - GPBUtil::checkDouble($var); - $this->cost_per_hour_before_soft_start_time = $var; - - return $this; - } - - /** - * A cost per hour added to other costs in the model if the event occurs after - * `soft_end_time`, computed as: - * ``` - * max(0, t.seconds - soft_end_time.seconds) - * * cost_per_hour_after_soft_end_time / 3600, - * t being the time of the event. - * ``` - * This cost must be positive, and the field can only be set if - * `soft_end_time` has been set. - * - * Generated from protobuf field optional double cost_per_hour_after_soft_end_time = 6; - * @return float - */ - public function getCostPerHourAfterSoftEndTime() - { - return isset($this->cost_per_hour_after_soft_end_time) ? $this->cost_per_hour_after_soft_end_time : 0.0; - } - - public function hasCostPerHourAfterSoftEndTime() - { - return isset($this->cost_per_hour_after_soft_end_time); - } - - public function clearCostPerHourAfterSoftEndTime() - { - unset($this->cost_per_hour_after_soft_end_time); - } - - /** - * A cost per hour added to other costs in the model if the event occurs after - * `soft_end_time`, computed as: - * ``` - * max(0, t.seconds - soft_end_time.seconds) - * * cost_per_hour_after_soft_end_time / 3600, - * t being the time of the event. - * ``` - * This cost must be positive, and the field can only be set if - * `soft_end_time` has been set. - * - * Generated from protobuf field optional double cost_per_hour_after_soft_end_time = 6; - * @param float $var - * @return $this - */ - public function setCostPerHourAfterSoftEndTime($var) - { - GPBUtil::checkDouble($var); - $this->cost_per_hour_after_soft_end_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/TransitionAttributes.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/TransitionAttributes.php deleted file mode 100644 index 6201a4c661d7..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/TransitionAttributes.php +++ /dev/null @@ -1,412 +0,0 @@ -google.maps.routeoptimization.v1.TransitionAttributes - */ -class TransitionAttributes extends \Google\Protobuf\Internal\Message -{ - /** - * Tags defining the set of (src->dst) transitions these attributes apply to. - * A source visit or vehicle start matches iff its - * [VisitRequest.tags][google.maps.routeoptimization.v1.Shipment.VisitRequest.tags] - * or - * [Vehicle.start_tags][google.maps.routeoptimization.v1.Vehicle.start_tags] - * either contains `src_tag` or does not contain `excluded_src_tag` (depending - * on which of these two fields is non-empty). - * - * Generated from protobuf field string src_tag = 1; - */ - protected $src_tag = ''; - /** - * See `src_tag`. Exactly one of `src_tag` and `excluded_src_tag` must be - * non-empty. - * - * Generated from protobuf field string excluded_src_tag = 2; - */ - protected $excluded_src_tag = ''; - /** - * A destination visit or vehicle end matches iff its - * [VisitRequest.tags][google.maps.routeoptimization.v1.Shipment.VisitRequest.tags] - * or [Vehicle.end_tags][google.maps.routeoptimization.v1.Vehicle.end_tags] - * either contains `dst_tag` or does not contain `excluded_dst_tag` (depending - * on which of these two fields is non-empty). - * - * Generated from protobuf field string dst_tag = 3; - */ - protected $dst_tag = ''; - /** - * See `dst_tag`. Exactly one of `dst_tag` and `excluded_dst_tag` must be - * non-empty. - * - * Generated from protobuf field string excluded_dst_tag = 4; - */ - protected $excluded_dst_tag = ''; - /** - * Specifies a cost for performing this transition. This is in the same unit - * as all other costs in the model and must not be negative. It is applied on - * top of all other existing costs. - * - * Generated from protobuf field double cost = 5; - */ - protected $cost = 0.0; - /** - * Specifies a cost per kilometer applied to the distance traveled while - * performing this transition. It adds up to any - * [Vehicle.cost_per_kilometer][google.maps.routeoptimization.v1.Vehicle.cost_per_kilometer] - * specified on vehicles. - * - * Generated from protobuf field double cost_per_kilometer = 6; - */ - protected $cost_per_kilometer = 0.0; - /** - * Specifies a limit on the distance traveled while performing this - * transition. - * As of 2021/06, only soft limits are supported. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.DistanceLimit distance_limit = 7; - */ - protected $distance_limit = null; - /** - * Specifies a delay incurred when performing this transition. - * This delay always occurs *after* finishing the source visit and *before* - * starting the destination visit. - * - * Generated from protobuf field .google.protobuf.Duration delay = 8; - */ - protected $delay = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $src_tag - * Tags defining the set of (src->dst) transitions these attributes apply to. - * A source visit or vehicle start matches iff its - * [VisitRequest.tags][google.maps.routeoptimization.v1.Shipment.VisitRequest.tags] - * or - * [Vehicle.start_tags][google.maps.routeoptimization.v1.Vehicle.start_tags] - * either contains `src_tag` or does not contain `excluded_src_tag` (depending - * on which of these two fields is non-empty). - * @type string $excluded_src_tag - * See `src_tag`. Exactly one of `src_tag` and `excluded_src_tag` must be - * non-empty. - * @type string $dst_tag - * A destination visit or vehicle end matches iff its - * [VisitRequest.tags][google.maps.routeoptimization.v1.Shipment.VisitRequest.tags] - * or [Vehicle.end_tags][google.maps.routeoptimization.v1.Vehicle.end_tags] - * either contains `dst_tag` or does not contain `excluded_dst_tag` (depending - * on which of these two fields is non-empty). - * @type string $excluded_dst_tag - * See `dst_tag`. Exactly one of `dst_tag` and `excluded_dst_tag` must be - * non-empty. - * @type float $cost - * Specifies a cost for performing this transition. This is in the same unit - * as all other costs in the model and must not be negative. It is applied on - * top of all other existing costs. - * @type float $cost_per_kilometer - * Specifies a cost per kilometer applied to the distance traveled while - * performing this transition. It adds up to any - * [Vehicle.cost_per_kilometer][google.maps.routeoptimization.v1.Vehicle.cost_per_kilometer] - * specified on vehicles. - * @type \Google\Maps\RouteOptimization\V1\DistanceLimit $distance_limit - * Specifies a limit on the distance traveled while performing this - * transition. - * As of 2021/06, only soft limits are supported. - * @type \Google\Protobuf\Duration $delay - * Specifies a delay incurred when performing this transition. - * This delay always occurs *after* finishing the source visit and *before* - * starting the destination visit. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); - parent::__construct($data); - } - - /** - * Tags defining the set of (src->dst) transitions these attributes apply to. - * A source visit or vehicle start matches iff its - * [VisitRequest.tags][google.maps.routeoptimization.v1.Shipment.VisitRequest.tags] - * or - * [Vehicle.start_tags][google.maps.routeoptimization.v1.Vehicle.start_tags] - * either contains `src_tag` or does not contain `excluded_src_tag` (depending - * on which of these two fields is non-empty). - * - * Generated from protobuf field string src_tag = 1; - * @return string - */ - public function getSrcTag() - { - return $this->src_tag; - } - - /** - * Tags defining the set of (src->dst) transitions these attributes apply to. - * A source visit or vehicle start matches iff its - * [VisitRequest.tags][google.maps.routeoptimization.v1.Shipment.VisitRequest.tags] - * or - * [Vehicle.start_tags][google.maps.routeoptimization.v1.Vehicle.start_tags] - * either contains `src_tag` or does not contain `excluded_src_tag` (depending - * on which of these two fields is non-empty). - * - * Generated from protobuf field string src_tag = 1; - * @param string $var - * @return $this - */ - public function setSrcTag($var) - { - GPBUtil::checkString($var, True); - $this->src_tag = $var; - - return $this; - } - - /** - * See `src_tag`. Exactly one of `src_tag` and `excluded_src_tag` must be - * non-empty. - * - * Generated from protobuf field string excluded_src_tag = 2; - * @return string - */ - public function getExcludedSrcTag() - { - return $this->excluded_src_tag; - } - - /** - * See `src_tag`. Exactly one of `src_tag` and `excluded_src_tag` must be - * non-empty. - * - * Generated from protobuf field string excluded_src_tag = 2; - * @param string $var - * @return $this - */ - public function setExcludedSrcTag($var) - { - GPBUtil::checkString($var, True); - $this->excluded_src_tag = $var; - - return $this; - } - - /** - * A destination visit or vehicle end matches iff its - * [VisitRequest.tags][google.maps.routeoptimization.v1.Shipment.VisitRequest.tags] - * or [Vehicle.end_tags][google.maps.routeoptimization.v1.Vehicle.end_tags] - * either contains `dst_tag` or does not contain `excluded_dst_tag` (depending - * on which of these two fields is non-empty). - * - * Generated from protobuf field string dst_tag = 3; - * @return string - */ - public function getDstTag() - { - return $this->dst_tag; - } - - /** - * A destination visit or vehicle end matches iff its - * [VisitRequest.tags][google.maps.routeoptimization.v1.Shipment.VisitRequest.tags] - * or [Vehicle.end_tags][google.maps.routeoptimization.v1.Vehicle.end_tags] - * either contains `dst_tag` or does not contain `excluded_dst_tag` (depending - * on which of these two fields is non-empty). - * - * Generated from protobuf field string dst_tag = 3; - * @param string $var - * @return $this - */ - public function setDstTag($var) - { - GPBUtil::checkString($var, True); - $this->dst_tag = $var; - - return $this; - } - - /** - * See `dst_tag`. Exactly one of `dst_tag` and `excluded_dst_tag` must be - * non-empty. - * - * Generated from protobuf field string excluded_dst_tag = 4; - * @return string - */ - public function getExcludedDstTag() - { - return $this->excluded_dst_tag; - } - - /** - * See `dst_tag`. Exactly one of `dst_tag` and `excluded_dst_tag` must be - * non-empty. - * - * Generated from protobuf field string excluded_dst_tag = 4; - * @param string $var - * @return $this - */ - public function setExcludedDstTag($var) - { - GPBUtil::checkString($var, True); - $this->excluded_dst_tag = $var; - - return $this; - } - - /** - * Specifies a cost for performing this transition. This is in the same unit - * as all other costs in the model and must not be negative. It is applied on - * top of all other existing costs. - * - * Generated from protobuf field double cost = 5; - * @return float - */ - public function getCost() - { - return $this->cost; - } - - /** - * Specifies a cost for performing this transition. This is in the same unit - * as all other costs in the model and must not be negative. It is applied on - * top of all other existing costs. - * - * Generated from protobuf field double cost = 5; - * @param float $var - * @return $this - */ - public function setCost($var) - { - GPBUtil::checkDouble($var); - $this->cost = $var; - - return $this; - } - - /** - * Specifies a cost per kilometer applied to the distance traveled while - * performing this transition. It adds up to any - * [Vehicle.cost_per_kilometer][google.maps.routeoptimization.v1.Vehicle.cost_per_kilometer] - * specified on vehicles. - * - * Generated from protobuf field double cost_per_kilometer = 6; - * @return float - */ - public function getCostPerKilometer() - { - return $this->cost_per_kilometer; - } - - /** - * Specifies a cost per kilometer applied to the distance traveled while - * performing this transition. It adds up to any - * [Vehicle.cost_per_kilometer][google.maps.routeoptimization.v1.Vehicle.cost_per_kilometer] - * specified on vehicles. - * - * Generated from protobuf field double cost_per_kilometer = 6; - * @param float $var - * @return $this - */ - public function setCostPerKilometer($var) - { - GPBUtil::checkDouble($var); - $this->cost_per_kilometer = $var; - - return $this; - } - - /** - * Specifies a limit on the distance traveled while performing this - * transition. - * As of 2021/06, only soft limits are supported. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.DistanceLimit distance_limit = 7; - * @return \Google\Maps\RouteOptimization\V1\DistanceLimit|null - */ - public function getDistanceLimit() - { - return $this->distance_limit; - } - - public function hasDistanceLimit() - { - return isset($this->distance_limit); - } - - public function clearDistanceLimit() - { - unset($this->distance_limit); - } - - /** - * Specifies a limit on the distance traveled while performing this - * transition. - * As of 2021/06, only soft limits are supported. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.DistanceLimit distance_limit = 7; - * @param \Google\Maps\RouteOptimization\V1\DistanceLimit $var - * @return $this - */ - public function setDistanceLimit($var) - { - GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\DistanceLimit::class); - $this->distance_limit = $var; - - return $this; - } - - /** - * Specifies a delay incurred when performing this transition. - * This delay always occurs *after* finishing the source visit and *before* - * starting the destination visit. - * - * Generated from protobuf field .google.protobuf.Duration delay = 8; - * @return \Google\Protobuf\Duration|null - */ - public function getDelay() - { - return $this->delay; - } - - public function hasDelay() - { - return isset($this->delay); - } - - public function clearDelay() - { - unset($this->delay); - } - - /** - * Specifies a delay incurred when performing this transition. - * This delay always occurs *after* finishing the source visit and *before* - * starting the destination visit. - * - * Generated from protobuf field .google.protobuf.Duration delay = 8; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setDelay($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->delay = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Vehicle.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Vehicle.php deleted file mode 100644 index c77ff7c216ae..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Vehicle.php +++ /dev/null @@ -1,1423 +0,0 @@ -google.maps.routeoptimization.v1.Vehicle - */ -class Vehicle extends \Google\Protobuf\Internal\Message -{ - /** - * The user-defined display name of the vehicle. - * It can be up to 63 characters long and may use UTF-8 characters. - * - * Generated from protobuf field string display_name = 32; - */ - protected $display_name = ''; - /** - * The travel mode which affects the roads usable by the vehicle and its - * speed. See also `travel_duration_multiple`. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.Vehicle.TravelMode travel_mode = 1; - */ - protected $travel_mode = 0; - /** - * A set of conditions to satisfy that affect the way routes are calculated - * for the given vehicle. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.RouteModifiers route_modifiers = 2; - */ - protected $route_modifiers = null; - /** - * Geographic location where the vehicle starts before picking up any - * shipments. If not specified, the vehicle starts at its first pickup. - * If the shipment model has duration and distance matrices, `start_location` - * must not be specified. - * - * Generated from protobuf field .google.type.LatLng start_location = 3; - */ - protected $start_location = null; - /** - * Waypoint representing a geographic location where the vehicle starts before - * picking up any shipments. If neither `start_waypoint` nor `start_location` - * is specified, the vehicle starts at its first pickup. - * If the shipment model has duration and distance matrices, `start_waypoint` - * must not be specified. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.Waypoint start_waypoint = 4; - */ - protected $start_waypoint = null; - /** - * Geographic location where the vehicle ends after it has completed its last - * `VisitRequest`. If not specified the vehicle's `ShipmentRoute` ends - * immediately when it completes its last `VisitRequest`. - * If the shipment model has duration and distance matrices, `end_location` - * must not be specified. - * - * Generated from protobuf field .google.type.LatLng end_location = 5; - */ - protected $end_location = null; - /** - * Waypoint representing a geographic location where the vehicle ends after - * it has completed its last `VisitRequest`. If neither `end_waypoint` nor - * `end_location` is specified, the vehicle's `ShipmentRoute` ends immediately - * when it completes its last `VisitRequest`. - * If the shipment model has duration and distance matrices, `end_waypoint` - * must not be specified. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.Waypoint end_waypoint = 6; - */ - protected $end_waypoint = null; - /** - * Specifies tags attached to the start of the vehicle's route. - * Empty or duplicate strings are not allowed. - * - * Generated from protobuf field repeated string start_tags = 7; - */ - private $start_tags; - /** - * Specifies tags attached to the end of the vehicle's route. - * Empty or duplicate strings are not allowed. - * - * Generated from protobuf field repeated string end_tags = 8; - */ - private $end_tags; - /** - * Time windows during which the vehicle may depart its start location. - * They must be within the global time limits (see - * [ShipmentModel.global_*][google.maps.routeoptimization.v1.ShipmentModel.global_start_time] - * fields). If unspecified, there is no limitation besides those global time - * limits. - * Time windows belonging to the same repeated field must be disjoint, i.e. no - * time window can overlap with or be adjacent to another, and they must be in - * chronological order. - * `cost_per_hour_after_soft_end_time` and `soft_end_time` can only be set if - * there is a single time window. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.TimeWindow start_time_windows = 9; - */ - private $start_time_windows; - /** - * Time windows during which the vehicle may arrive at its end location. - * They must be within the global time limits (see - * [ShipmentModel.global_*][google.maps.routeoptimization.v1.ShipmentModel.global_start_time] - * fields). If unspecified, there is no limitation besides those global time - * limits. - * Time windows belonging to the same repeated field must be disjoint, i.e. no - * time window can overlap with or be adjacent to another, and they must be in - * chronological order. - * `cost_per_hour_after_soft_end_time` and `soft_end_time` can only be set if - * there is a single time window. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.TimeWindow end_time_windows = 10; - */ - private $end_time_windows; - /** - * Specifies a multiplicative factor that can be used to increase or decrease - * travel times of this vehicle. For example, setting this to 2.0 means - * that this vehicle is slower and has travel times that are twice what they - * are for standard vehicles. This multiple does not affect visit durations. - * It does affect cost if `cost_per_hour` or `cost_per_traveled_hour` are - * specified. This must be in the range [0.001, 1000.0]. If unset, the vehicle - * is standard, and this multiple is considered 1.0. - * WARNING: Travel times will be rounded to the nearest second after this - * multiple is applied but before performing any numerical operations, thus, - * a small multiple may result in a loss of precision. - * See also `extra_visit_duration_for_visit_type` below. - * - * Generated from protobuf field optional double travel_duration_multiple = 11; - */ - protected $travel_duration_multiple = null; - /** - * Unloading policy enforced on the vehicle. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.Vehicle.UnloadingPolicy unloading_policy = 12; - */ - protected $unloading_policy = 0; - /** - * Capacities of the vehicle (weight, volume, # of pallets for example). - * The keys in the map are the identifiers of the type of load, consistent - * with the keys of the - * [Shipment.load_demands][google.maps.routeoptimization.v1.Shipment.load_demands] - * field. If a given key is absent from this map, the corresponding capacity - * is considered to be limitless. - * - * Generated from protobuf field map load_limits = 30; - */ - private $load_limits; - /** - * Vehicle costs: all costs add up and must be in the same unit as - * [Shipment.penalty_cost][google.maps.routeoptimization.v1.Shipment.penalty_cost]. - * Cost per hour of the vehicle route. This cost is applied to the total time - * taken by the route, and includes travel time, waiting time, and visit time. - * Using `cost_per_hour` instead of just `cost_per_traveled_hour` may result - * in additional latency. - * - * Generated from protobuf field double cost_per_hour = 16; - */ - protected $cost_per_hour = 0.0; - /** - * Cost per traveled hour of the vehicle route. This cost is applied only to - * travel time taken by the route (i.e., that reported in - * [ShipmentRoute.transitions][google.maps.routeoptimization.v1.ShipmentRoute.transitions]), - * and excludes waiting time and visit time. - * - * Generated from protobuf field double cost_per_traveled_hour = 17; - */ - protected $cost_per_traveled_hour = 0.0; - /** - * Cost per kilometer of the vehicle route. This cost is applied to the - * distance reported in the - * [ShipmentRoute.transitions][google.maps.routeoptimization.v1.ShipmentRoute.transitions] - * and does not apply to any distance implicitly traveled from the - * `arrival_location` to the `departure_location` of a single `VisitRequest`. - * - * Generated from protobuf field double cost_per_kilometer = 18; - */ - protected $cost_per_kilometer = 0.0; - /** - * Fixed cost applied if this vehicle is used to handle a shipment. - * - * Generated from protobuf field double fixed_cost = 19; - */ - protected $fixed_cost = 0.0; - /** - * This field only applies to vehicles when their route does not serve any - * shipments. It indicates if the vehicle should be considered as used or not - * in this case. - * If true, the vehicle goes from its start to its end location even if it - * doesn't serve any shipments, and time and distance costs resulting from its - * start --> end travel are taken into account. - * Otherwise, it doesn't travel from its start to its end location, and no - * `break_rule` or delay (from `TransitionAttributes`) are scheduled for this - * vehicle. In this case, the vehicle's `ShipmentRoute` doesn't contain any - * information except for the vehicle index and label. - * - * Generated from protobuf field bool used_if_route_is_empty = 20; - */ - protected $used_if_route_is_empty = false; - /** - * Limit applied to the total duration of the vehicle's route. In a given - * `OptimizeToursResponse`, the route duration of a vehicle is the - * difference between its `vehicle_end_time` and `vehicle_start_time`. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.Vehicle.DurationLimit route_duration_limit = 21; - */ - protected $route_duration_limit = null; - /** - * Limit applied to the travel duration of the vehicle's route. In a given - * `OptimizeToursResponse`, the route travel duration is the sum of all its - * [transitions.travel_duration][google.maps.routeoptimization.v1.ShipmentRoute.Transition.travel_duration]. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.Vehicle.DurationLimit travel_duration_limit = 22; - */ - protected $travel_duration_limit = null; - /** - * Limit applied to the total distance of the vehicle's route. In a given - * `OptimizeToursResponse`, the route distance is the sum of all its - * [transitions.travel_distance_meters][google.maps.routeoptimization.v1.ShipmentRoute.Transition.travel_distance_meters]. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.DistanceLimit route_distance_limit = 23; - */ - protected $route_distance_limit = null; - /** - * Specifies a map from visit_types strings to durations. The duration is time - * in addition to - * [VisitRequest.duration][google.maps.routeoptimization.v1.Shipment.VisitRequest.duration] - * to be taken at visits with the specified `visit_types`. This extra visit - * duration adds cost if `cost_per_hour` is specified. Keys (i.e. - * `visit_types`) cannot be empty strings. - * If a visit request has multiple types, a duration will be added for each - * type in the map. - * - * Generated from protobuf field map extra_visit_duration_for_visit_type = 24; - */ - private $extra_visit_duration_for_visit_type; - /** - * Describes the break schedule to be enforced on this vehicle. - * If empty, no breaks will be scheduled for this vehicle. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.BreakRule break_rule = 25; - */ - protected $break_rule = null; - /** - * Specifies a label for this vehicle. This label is reported in the response - * as the `vehicle_label` of the corresponding - * [ShipmentRoute][google.maps.routeoptimization.v1.ShipmentRoute]. - * - * Generated from protobuf field string label = 27; - */ - protected $label = ''; - /** - * If true, `used_if_route_is_empty` must be false, and this vehicle will - * remain unused. - * If a shipment is performed by an ignored vehicle in - * `injected_first_solution_routes`, it is skipped in the first solution but - * is free to be performed in the response. - * If a shipment is performed by an ignored vehicle in - * `injected_solution_constraint` and any related pickup/delivery is - * constrained to remain on the vehicle (i.e., not relaxed to level - * `RELAX_ALL_AFTER_THRESHOLD`), it is skipped in the response. - * If a shipment has a non-empty `allowed_vehicle_indices` field and all of - * the allowed vehicles are ignored, it is skipped in the response. - * - * Generated from protobuf field bool ignore = 28; - */ - protected $ignore = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $display_name - * The user-defined display name of the vehicle. - * It can be up to 63 characters long and may use UTF-8 characters. - * @type int $travel_mode - * The travel mode which affects the roads usable by the vehicle and its - * speed. See also `travel_duration_multiple`. - * @type \Google\Maps\RouteOptimization\V1\RouteModifiers $route_modifiers - * A set of conditions to satisfy that affect the way routes are calculated - * for the given vehicle. - * @type \Google\Type\LatLng $start_location - * Geographic location where the vehicle starts before picking up any - * shipments. If not specified, the vehicle starts at its first pickup. - * If the shipment model has duration and distance matrices, `start_location` - * must not be specified. - * @type \Google\Maps\RouteOptimization\V1\Waypoint $start_waypoint - * Waypoint representing a geographic location where the vehicle starts before - * picking up any shipments. If neither `start_waypoint` nor `start_location` - * is specified, the vehicle starts at its first pickup. - * If the shipment model has duration and distance matrices, `start_waypoint` - * must not be specified. - * @type \Google\Type\LatLng $end_location - * Geographic location where the vehicle ends after it has completed its last - * `VisitRequest`. If not specified the vehicle's `ShipmentRoute` ends - * immediately when it completes its last `VisitRequest`. - * If the shipment model has duration and distance matrices, `end_location` - * must not be specified. - * @type \Google\Maps\RouteOptimization\V1\Waypoint $end_waypoint - * Waypoint representing a geographic location where the vehicle ends after - * it has completed its last `VisitRequest`. If neither `end_waypoint` nor - * `end_location` is specified, the vehicle's `ShipmentRoute` ends immediately - * when it completes its last `VisitRequest`. - * If the shipment model has duration and distance matrices, `end_waypoint` - * must not be specified. - * @type array|\Google\Protobuf\Internal\RepeatedField $start_tags - * Specifies tags attached to the start of the vehicle's route. - * Empty or duplicate strings are not allowed. - * @type array|\Google\Protobuf\Internal\RepeatedField $end_tags - * Specifies tags attached to the end of the vehicle's route. - * Empty or duplicate strings are not allowed. - * @type array<\Google\Maps\RouteOptimization\V1\TimeWindow>|\Google\Protobuf\Internal\RepeatedField $start_time_windows - * Time windows during which the vehicle may depart its start location. - * They must be within the global time limits (see - * [ShipmentModel.global_*][google.maps.routeoptimization.v1.ShipmentModel.global_start_time] - * fields). If unspecified, there is no limitation besides those global time - * limits. - * Time windows belonging to the same repeated field must be disjoint, i.e. no - * time window can overlap with or be adjacent to another, and they must be in - * chronological order. - * `cost_per_hour_after_soft_end_time` and `soft_end_time` can only be set if - * there is a single time window. - * @type array<\Google\Maps\RouteOptimization\V1\TimeWindow>|\Google\Protobuf\Internal\RepeatedField $end_time_windows - * Time windows during which the vehicle may arrive at its end location. - * They must be within the global time limits (see - * [ShipmentModel.global_*][google.maps.routeoptimization.v1.ShipmentModel.global_start_time] - * fields). If unspecified, there is no limitation besides those global time - * limits. - * Time windows belonging to the same repeated field must be disjoint, i.e. no - * time window can overlap with or be adjacent to another, and they must be in - * chronological order. - * `cost_per_hour_after_soft_end_time` and `soft_end_time` can only be set if - * there is a single time window. - * @type float $travel_duration_multiple - * Specifies a multiplicative factor that can be used to increase or decrease - * travel times of this vehicle. For example, setting this to 2.0 means - * that this vehicle is slower and has travel times that are twice what they - * are for standard vehicles. This multiple does not affect visit durations. - * It does affect cost if `cost_per_hour` or `cost_per_traveled_hour` are - * specified. This must be in the range [0.001, 1000.0]. If unset, the vehicle - * is standard, and this multiple is considered 1.0. - * WARNING: Travel times will be rounded to the nearest second after this - * multiple is applied but before performing any numerical operations, thus, - * a small multiple may result in a loss of precision. - * See also `extra_visit_duration_for_visit_type` below. - * @type int $unloading_policy - * Unloading policy enforced on the vehicle. - * @type array|\Google\Protobuf\Internal\MapField $load_limits - * Capacities of the vehicle (weight, volume, # of pallets for example). - * The keys in the map are the identifiers of the type of load, consistent - * with the keys of the - * [Shipment.load_demands][google.maps.routeoptimization.v1.Shipment.load_demands] - * field. If a given key is absent from this map, the corresponding capacity - * is considered to be limitless. - * @type float $cost_per_hour - * Vehicle costs: all costs add up and must be in the same unit as - * [Shipment.penalty_cost][google.maps.routeoptimization.v1.Shipment.penalty_cost]. - * Cost per hour of the vehicle route. This cost is applied to the total time - * taken by the route, and includes travel time, waiting time, and visit time. - * Using `cost_per_hour` instead of just `cost_per_traveled_hour` may result - * in additional latency. - * @type float $cost_per_traveled_hour - * Cost per traveled hour of the vehicle route. This cost is applied only to - * travel time taken by the route (i.e., that reported in - * [ShipmentRoute.transitions][google.maps.routeoptimization.v1.ShipmentRoute.transitions]), - * and excludes waiting time and visit time. - * @type float $cost_per_kilometer - * Cost per kilometer of the vehicle route. This cost is applied to the - * distance reported in the - * [ShipmentRoute.transitions][google.maps.routeoptimization.v1.ShipmentRoute.transitions] - * and does not apply to any distance implicitly traveled from the - * `arrival_location` to the `departure_location` of a single `VisitRequest`. - * @type float $fixed_cost - * Fixed cost applied if this vehicle is used to handle a shipment. - * @type bool $used_if_route_is_empty - * This field only applies to vehicles when their route does not serve any - * shipments. It indicates if the vehicle should be considered as used or not - * in this case. - * If true, the vehicle goes from its start to its end location even if it - * doesn't serve any shipments, and time and distance costs resulting from its - * start --> end travel are taken into account. - * Otherwise, it doesn't travel from its start to its end location, and no - * `break_rule` or delay (from `TransitionAttributes`) are scheduled for this - * vehicle. In this case, the vehicle's `ShipmentRoute` doesn't contain any - * information except for the vehicle index and label. - * @type \Google\Maps\RouteOptimization\V1\Vehicle\DurationLimit $route_duration_limit - * Limit applied to the total duration of the vehicle's route. In a given - * `OptimizeToursResponse`, the route duration of a vehicle is the - * difference between its `vehicle_end_time` and `vehicle_start_time`. - * @type \Google\Maps\RouteOptimization\V1\Vehicle\DurationLimit $travel_duration_limit - * Limit applied to the travel duration of the vehicle's route. In a given - * `OptimizeToursResponse`, the route travel duration is the sum of all its - * [transitions.travel_duration][google.maps.routeoptimization.v1.ShipmentRoute.Transition.travel_duration]. - * @type \Google\Maps\RouteOptimization\V1\DistanceLimit $route_distance_limit - * Limit applied to the total distance of the vehicle's route. In a given - * `OptimizeToursResponse`, the route distance is the sum of all its - * [transitions.travel_distance_meters][google.maps.routeoptimization.v1.ShipmentRoute.Transition.travel_distance_meters]. - * @type array|\Google\Protobuf\Internal\MapField $extra_visit_duration_for_visit_type - * Specifies a map from visit_types strings to durations. The duration is time - * in addition to - * [VisitRequest.duration][google.maps.routeoptimization.v1.Shipment.VisitRequest.duration] - * to be taken at visits with the specified `visit_types`. This extra visit - * duration adds cost if `cost_per_hour` is specified. Keys (i.e. - * `visit_types`) cannot be empty strings. - * If a visit request has multiple types, a duration will be added for each - * type in the map. - * @type \Google\Maps\RouteOptimization\V1\BreakRule $break_rule - * Describes the break schedule to be enforced on this vehicle. - * If empty, no breaks will be scheduled for this vehicle. - * @type string $label - * Specifies a label for this vehicle. This label is reported in the response - * as the `vehicle_label` of the corresponding - * [ShipmentRoute][google.maps.routeoptimization.v1.ShipmentRoute]. - * @type bool $ignore - * If true, `used_if_route_is_empty` must be false, and this vehicle will - * remain unused. - * If a shipment is performed by an ignored vehicle in - * `injected_first_solution_routes`, it is skipped in the first solution but - * is free to be performed in the response. - * If a shipment is performed by an ignored vehicle in - * `injected_solution_constraint` and any related pickup/delivery is - * constrained to remain on the vehicle (i.e., not relaxed to level - * `RELAX_ALL_AFTER_THRESHOLD`), it is skipped in the response. - * If a shipment has a non-empty `allowed_vehicle_indices` field and all of - * the allowed vehicles are ignored, it is skipped in the response. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); - parent::__construct($data); - } - - /** - * The user-defined display name of the vehicle. - * It can be up to 63 characters long and may use UTF-8 characters. - * - * Generated from protobuf field string display_name = 32; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * The user-defined display name of the vehicle. - * It can be up to 63 characters long and may use UTF-8 characters. - * - * Generated from protobuf field string display_name = 32; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * The travel mode which affects the roads usable by the vehicle and its - * speed. See also `travel_duration_multiple`. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.Vehicle.TravelMode travel_mode = 1; - * @return int - */ - public function getTravelMode() - { - return $this->travel_mode; - } - - /** - * The travel mode which affects the roads usable by the vehicle and its - * speed. See also `travel_duration_multiple`. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.Vehicle.TravelMode travel_mode = 1; - * @param int $var - * @return $this - */ - public function setTravelMode($var) - { - GPBUtil::checkEnum($var, \Google\Maps\RouteOptimization\V1\Vehicle\TravelMode::class); - $this->travel_mode = $var; - - return $this; - } - - /** - * A set of conditions to satisfy that affect the way routes are calculated - * for the given vehicle. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.RouteModifiers route_modifiers = 2; - * @return \Google\Maps\RouteOptimization\V1\RouteModifiers|null - */ - public function getRouteModifiers() - { - return $this->route_modifiers; - } - - public function hasRouteModifiers() - { - return isset($this->route_modifiers); - } - - public function clearRouteModifiers() - { - unset($this->route_modifiers); - } - - /** - * A set of conditions to satisfy that affect the way routes are calculated - * for the given vehicle. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.RouteModifiers route_modifiers = 2; - * @param \Google\Maps\RouteOptimization\V1\RouteModifiers $var - * @return $this - */ - public function setRouteModifiers($var) - { - GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\RouteModifiers::class); - $this->route_modifiers = $var; - - return $this; - } - - /** - * Geographic location where the vehicle starts before picking up any - * shipments. If not specified, the vehicle starts at its first pickup. - * If the shipment model has duration and distance matrices, `start_location` - * must not be specified. - * - * Generated from protobuf field .google.type.LatLng start_location = 3; - * @return \Google\Type\LatLng|null - */ - public function getStartLocation() - { - return $this->start_location; - } - - public function hasStartLocation() - { - return isset($this->start_location); - } - - public function clearStartLocation() - { - unset($this->start_location); - } - - /** - * Geographic location where the vehicle starts before picking up any - * shipments. If not specified, the vehicle starts at its first pickup. - * If the shipment model has duration and distance matrices, `start_location` - * must not be specified. - * - * Generated from protobuf field .google.type.LatLng start_location = 3; - * @param \Google\Type\LatLng $var - * @return $this - */ - public function setStartLocation($var) - { - GPBUtil::checkMessage($var, \Google\Type\LatLng::class); - $this->start_location = $var; - - return $this; - } - - /** - * Waypoint representing a geographic location where the vehicle starts before - * picking up any shipments. If neither `start_waypoint` nor `start_location` - * is specified, the vehicle starts at its first pickup. - * If the shipment model has duration and distance matrices, `start_waypoint` - * must not be specified. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.Waypoint start_waypoint = 4; - * @return \Google\Maps\RouteOptimization\V1\Waypoint|null - */ - public function getStartWaypoint() - { - return $this->start_waypoint; - } - - public function hasStartWaypoint() - { - return isset($this->start_waypoint); - } - - public function clearStartWaypoint() - { - unset($this->start_waypoint); - } - - /** - * Waypoint representing a geographic location where the vehicle starts before - * picking up any shipments. If neither `start_waypoint` nor `start_location` - * is specified, the vehicle starts at its first pickup. - * If the shipment model has duration and distance matrices, `start_waypoint` - * must not be specified. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.Waypoint start_waypoint = 4; - * @param \Google\Maps\RouteOptimization\V1\Waypoint $var - * @return $this - */ - public function setStartWaypoint($var) - { - GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\Waypoint::class); - $this->start_waypoint = $var; - - return $this; - } - - /** - * Geographic location where the vehicle ends after it has completed its last - * `VisitRequest`. If not specified the vehicle's `ShipmentRoute` ends - * immediately when it completes its last `VisitRequest`. - * If the shipment model has duration and distance matrices, `end_location` - * must not be specified. - * - * Generated from protobuf field .google.type.LatLng end_location = 5; - * @return \Google\Type\LatLng|null - */ - public function getEndLocation() - { - return $this->end_location; - } - - public function hasEndLocation() - { - return isset($this->end_location); - } - - public function clearEndLocation() - { - unset($this->end_location); - } - - /** - * Geographic location where the vehicle ends after it has completed its last - * `VisitRequest`. If not specified the vehicle's `ShipmentRoute` ends - * immediately when it completes its last `VisitRequest`. - * If the shipment model has duration and distance matrices, `end_location` - * must not be specified. - * - * Generated from protobuf field .google.type.LatLng end_location = 5; - * @param \Google\Type\LatLng $var - * @return $this - */ - public function setEndLocation($var) - { - GPBUtil::checkMessage($var, \Google\Type\LatLng::class); - $this->end_location = $var; - - return $this; - } - - /** - * Waypoint representing a geographic location where the vehicle ends after - * it has completed its last `VisitRequest`. If neither `end_waypoint` nor - * `end_location` is specified, the vehicle's `ShipmentRoute` ends immediately - * when it completes its last `VisitRequest`. - * If the shipment model has duration and distance matrices, `end_waypoint` - * must not be specified. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.Waypoint end_waypoint = 6; - * @return \Google\Maps\RouteOptimization\V1\Waypoint|null - */ - public function getEndWaypoint() - { - return $this->end_waypoint; - } - - public function hasEndWaypoint() - { - return isset($this->end_waypoint); - } - - public function clearEndWaypoint() - { - unset($this->end_waypoint); - } - - /** - * Waypoint representing a geographic location where the vehicle ends after - * it has completed its last `VisitRequest`. If neither `end_waypoint` nor - * `end_location` is specified, the vehicle's `ShipmentRoute` ends immediately - * when it completes its last `VisitRequest`. - * If the shipment model has duration and distance matrices, `end_waypoint` - * must not be specified. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.Waypoint end_waypoint = 6; - * @param \Google\Maps\RouteOptimization\V1\Waypoint $var - * @return $this - */ - public function setEndWaypoint($var) - { - GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\Waypoint::class); - $this->end_waypoint = $var; - - return $this; - } - - /** - * Specifies tags attached to the start of the vehicle's route. - * Empty or duplicate strings are not allowed. - * - * Generated from protobuf field repeated string start_tags = 7; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getStartTags() - { - return $this->start_tags; - } - - /** - * Specifies tags attached to the start of the vehicle's route. - * Empty or duplicate strings are not allowed. - * - * Generated from protobuf field repeated string start_tags = 7; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setStartTags($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->start_tags = $arr; - - return $this; - } - - /** - * Specifies tags attached to the end of the vehicle's route. - * Empty or duplicate strings are not allowed. - * - * Generated from protobuf field repeated string end_tags = 8; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEndTags() - { - return $this->end_tags; - } - - /** - * Specifies tags attached to the end of the vehicle's route. - * Empty or duplicate strings are not allowed. - * - * Generated from protobuf field repeated string end_tags = 8; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEndTags($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->end_tags = $arr; - - return $this; - } - - /** - * Time windows during which the vehicle may depart its start location. - * They must be within the global time limits (see - * [ShipmentModel.global_*][google.maps.routeoptimization.v1.ShipmentModel.global_start_time] - * fields). If unspecified, there is no limitation besides those global time - * limits. - * Time windows belonging to the same repeated field must be disjoint, i.e. no - * time window can overlap with or be adjacent to another, and they must be in - * chronological order. - * `cost_per_hour_after_soft_end_time` and `soft_end_time` can only be set if - * there is a single time window. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.TimeWindow start_time_windows = 9; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getStartTimeWindows() - { - return $this->start_time_windows; - } - - /** - * Time windows during which the vehicle may depart its start location. - * They must be within the global time limits (see - * [ShipmentModel.global_*][google.maps.routeoptimization.v1.ShipmentModel.global_start_time] - * fields). If unspecified, there is no limitation besides those global time - * limits. - * Time windows belonging to the same repeated field must be disjoint, i.e. no - * time window can overlap with or be adjacent to another, and they must be in - * chronological order. - * `cost_per_hour_after_soft_end_time` and `soft_end_time` can only be set if - * there is a single time window. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.TimeWindow start_time_windows = 9; - * @param array<\Google\Maps\RouteOptimization\V1\TimeWindow>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setStartTimeWindows($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\TimeWindow::class); - $this->start_time_windows = $arr; - - return $this; - } - - /** - * Time windows during which the vehicle may arrive at its end location. - * They must be within the global time limits (see - * [ShipmentModel.global_*][google.maps.routeoptimization.v1.ShipmentModel.global_start_time] - * fields). If unspecified, there is no limitation besides those global time - * limits. - * Time windows belonging to the same repeated field must be disjoint, i.e. no - * time window can overlap with or be adjacent to another, and they must be in - * chronological order. - * `cost_per_hour_after_soft_end_time` and `soft_end_time` can only be set if - * there is a single time window. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.TimeWindow end_time_windows = 10; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEndTimeWindows() - { - return $this->end_time_windows; - } - - /** - * Time windows during which the vehicle may arrive at its end location. - * They must be within the global time limits (see - * [ShipmentModel.global_*][google.maps.routeoptimization.v1.ShipmentModel.global_start_time] - * fields). If unspecified, there is no limitation besides those global time - * limits. - * Time windows belonging to the same repeated field must be disjoint, i.e. no - * time window can overlap with or be adjacent to another, and they must be in - * chronological order. - * `cost_per_hour_after_soft_end_time` and `soft_end_time` can only be set if - * there is a single time window. - * - * Generated from protobuf field repeated .google.maps.routeoptimization.v1.TimeWindow end_time_windows = 10; - * @param array<\Google\Maps\RouteOptimization\V1\TimeWindow>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEndTimeWindows($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\TimeWindow::class); - $this->end_time_windows = $arr; - - return $this; - } - - /** - * Specifies a multiplicative factor that can be used to increase or decrease - * travel times of this vehicle. For example, setting this to 2.0 means - * that this vehicle is slower and has travel times that are twice what they - * are for standard vehicles. This multiple does not affect visit durations. - * It does affect cost if `cost_per_hour` or `cost_per_traveled_hour` are - * specified. This must be in the range [0.001, 1000.0]. If unset, the vehicle - * is standard, and this multiple is considered 1.0. - * WARNING: Travel times will be rounded to the nearest second after this - * multiple is applied but before performing any numerical operations, thus, - * a small multiple may result in a loss of precision. - * See also `extra_visit_duration_for_visit_type` below. - * - * Generated from protobuf field optional double travel_duration_multiple = 11; - * @return float - */ - public function getTravelDurationMultiple() - { - return isset($this->travel_duration_multiple) ? $this->travel_duration_multiple : 0.0; - } - - public function hasTravelDurationMultiple() - { - return isset($this->travel_duration_multiple); - } - - public function clearTravelDurationMultiple() - { - unset($this->travel_duration_multiple); - } - - /** - * Specifies a multiplicative factor that can be used to increase or decrease - * travel times of this vehicle. For example, setting this to 2.0 means - * that this vehicle is slower and has travel times that are twice what they - * are for standard vehicles. This multiple does not affect visit durations. - * It does affect cost if `cost_per_hour` or `cost_per_traveled_hour` are - * specified. This must be in the range [0.001, 1000.0]. If unset, the vehicle - * is standard, and this multiple is considered 1.0. - * WARNING: Travel times will be rounded to the nearest second after this - * multiple is applied but before performing any numerical operations, thus, - * a small multiple may result in a loss of precision. - * See also `extra_visit_duration_for_visit_type` below. - * - * Generated from protobuf field optional double travel_duration_multiple = 11; - * @param float $var - * @return $this - */ - public function setTravelDurationMultiple($var) - { - GPBUtil::checkDouble($var); - $this->travel_duration_multiple = $var; - - return $this; - } - - /** - * Unloading policy enforced on the vehicle. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.Vehicle.UnloadingPolicy unloading_policy = 12; - * @return int - */ - public function getUnloadingPolicy() - { - return $this->unloading_policy; - } - - /** - * Unloading policy enforced on the vehicle. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.Vehicle.UnloadingPolicy unloading_policy = 12; - * @param int $var - * @return $this - */ - public function setUnloadingPolicy($var) - { - GPBUtil::checkEnum($var, \Google\Maps\RouteOptimization\V1\Vehicle\UnloadingPolicy::class); - $this->unloading_policy = $var; - - return $this; - } - - /** - * Capacities of the vehicle (weight, volume, # of pallets for example). - * The keys in the map are the identifiers of the type of load, consistent - * with the keys of the - * [Shipment.load_demands][google.maps.routeoptimization.v1.Shipment.load_demands] - * field. If a given key is absent from this map, the corresponding capacity - * is considered to be limitless. - * - * Generated from protobuf field map load_limits = 30; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLoadLimits() - { - return $this->load_limits; - } - - /** - * Capacities of the vehicle (weight, volume, # of pallets for example). - * The keys in the map are the identifiers of the type of load, consistent - * with the keys of the - * [Shipment.load_demands][google.maps.routeoptimization.v1.Shipment.load_demands] - * field. If a given key is absent from this map, the corresponding capacity - * is considered to be limitless. - * - * Generated from protobuf field map load_limits = 30; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLoadLimits($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Maps\RouteOptimization\V1\Vehicle\LoadLimit::class); - $this->load_limits = $arr; - - return $this; - } - - /** - * Vehicle costs: all costs add up and must be in the same unit as - * [Shipment.penalty_cost][google.maps.routeoptimization.v1.Shipment.penalty_cost]. - * Cost per hour of the vehicle route. This cost is applied to the total time - * taken by the route, and includes travel time, waiting time, and visit time. - * Using `cost_per_hour` instead of just `cost_per_traveled_hour` may result - * in additional latency. - * - * Generated from protobuf field double cost_per_hour = 16; - * @return float - */ - public function getCostPerHour() - { - return $this->cost_per_hour; - } - - /** - * Vehicle costs: all costs add up and must be in the same unit as - * [Shipment.penalty_cost][google.maps.routeoptimization.v1.Shipment.penalty_cost]. - * Cost per hour of the vehicle route. This cost is applied to the total time - * taken by the route, and includes travel time, waiting time, and visit time. - * Using `cost_per_hour` instead of just `cost_per_traveled_hour` may result - * in additional latency. - * - * Generated from protobuf field double cost_per_hour = 16; - * @param float $var - * @return $this - */ - public function setCostPerHour($var) - { - GPBUtil::checkDouble($var); - $this->cost_per_hour = $var; - - return $this; - } - - /** - * Cost per traveled hour of the vehicle route. This cost is applied only to - * travel time taken by the route (i.e., that reported in - * [ShipmentRoute.transitions][google.maps.routeoptimization.v1.ShipmentRoute.transitions]), - * and excludes waiting time and visit time. - * - * Generated from protobuf field double cost_per_traveled_hour = 17; - * @return float - */ - public function getCostPerTraveledHour() - { - return $this->cost_per_traveled_hour; - } - - /** - * Cost per traveled hour of the vehicle route. This cost is applied only to - * travel time taken by the route (i.e., that reported in - * [ShipmentRoute.transitions][google.maps.routeoptimization.v1.ShipmentRoute.transitions]), - * and excludes waiting time and visit time. - * - * Generated from protobuf field double cost_per_traveled_hour = 17; - * @param float $var - * @return $this - */ - public function setCostPerTraveledHour($var) - { - GPBUtil::checkDouble($var); - $this->cost_per_traveled_hour = $var; - - return $this; - } - - /** - * Cost per kilometer of the vehicle route. This cost is applied to the - * distance reported in the - * [ShipmentRoute.transitions][google.maps.routeoptimization.v1.ShipmentRoute.transitions] - * and does not apply to any distance implicitly traveled from the - * `arrival_location` to the `departure_location` of a single `VisitRequest`. - * - * Generated from protobuf field double cost_per_kilometer = 18; - * @return float - */ - public function getCostPerKilometer() - { - return $this->cost_per_kilometer; - } - - /** - * Cost per kilometer of the vehicle route. This cost is applied to the - * distance reported in the - * [ShipmentRoute.transitions][google.maps.routeoptimization.v1.ShipmentRoute.transitions] - * and does not apply to any distance implicitly traveled from the - * `arrival_location` to the `departure_location` of a single `VisitRequest`. - * - * Generated from protobuf field double cost_per_kilometer = 18; - * @param float $var - * @return $this - */ - public function setCostPerKilometer($var) - { - GPBUtil::checkDouble($var); - $this->cost_per_kilometer = $var; - - return $this; - } - - /** - * Fixed cost applied if this vehicle is used to handle a shipment. - * - * Generated from protobuf field double fixed_cost = 19; - * @return float - */ - public function getFixedCost() - { - return $this->fixed_cost; - } - - /** - * Fixed cost applied if this vehicle is used to handle a shipment. - * - * Generated from protobuf field double fixed_cost = 19; - * @param float $var - * @return $this - */ - public function setFixedCost($var) - { - GPBUtil::checkDouble($var); - $this->fixed_cost = $var; - - return $this; - } - - /** - * This field only applies to vehicles when their route does not serve any - * shipments. It indicates if the vehicle should be considered as used or not - * in this case. - * If true, the vehicle goes from its start to its end location even if it - * doesn't serve any shipments, and time and distance costs resulting from its - * start --> end travel are taken into account. - * Otherwise, it doesn't travel from its start to its end location, and no - * `break_rule` or delay (from `TransitionAttributes`) are scheduled for this - * vehicle. In this case, the vehicle's `ShipmentRoute` doesn't contain any - * information except for the vehicle index and label. - * - * Generated from protobuf field bool used_if_route_is_empty = 20; - * @return bool - */ - public function getUsedIfRouteIsEmpty() - { - return $this->used_if_route_is_empty; - } - - /** - * This field only applies to vehicles when their route does not serve any - * shipments. It indicates if the vehicle should be considered as used or not - * in this case. - * If true, the vehicle goes from its start to its end location even if it - * doesn't serve any shipments, and time and distance costs resulting from its - * start --> end travel are taken into account. - * Otherwise, it doesn't travel from its start to its end location, and no - * `break_rule` or delay (from `TransitionAttributes`) are scheduled for this - * vehicle. In this case, the vehicle's `ShipmentRoute` doesn't contain any - * information except for the vehicle index and label. - * - * Generated from protobuf field bool used_if_route_is_empty = 20; - * @param bool $var - * @return $this - */ - public function setUsedIfRouteIsEmpty($var) - { - GPBUtil::checkBool($var); - $this->used_if_route_is_empty = $var; - - return $this; - } - - /** - * Limit applied to the total duration of the vehicle's route. In a given - * `OptimizeToursResponse`, the route duration of a vehicle is the - * difference between its `vehicle_end_time` and `vehicle_start_time`. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.Vehicle.DurationLimit route_duration_limit = 21; - * @return \Google\Maps\RouteOptimization\V1\Vehicle\DurationLimit|null - */ - public function getRouteDurationLimit() - { - return $this->route_duration_limit; - } - - public function hasRouteDurationLimit() - { - return isset($this->route_duration_limit); - } - - public function clearRouteDurationLimit() - { - unset($this->route_duration_limit); - } - - /** - * Limit applied to the total duration of the vehicle's route. In a given - * `OptimizeToursResponse`, the route duration of a vehicle is the - * difference between its `vehicle_end_time` and `vehicle_start_time`. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.Vehicle.DurationLimit route_duration_limit = 21; - * @param \Google\Maps\RouteOptimization\V1\Vehicle\DurationLimit $var - * @return $this - */ - public function setRouteDurationLimit($var) - { - GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\Vehicle\DurationLimit::class); - $this->route_duration_limit = $var; - - return $this; - } - - /** - * Limit applied to the travel duration of the vehicle's route. In a given - * `OptimizeToursResponse`, the route travel duration is the sum of all its - * [transitions.travel_duration][google.maps.routeoptimization.v1.ShipmentRoute.Transition.travel_duration]. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.Vehicle.DurationLimit travel_duration_limit = 22; - * @return \Google\Maps\RouteOptimization\V1\Vehicle\DurationLimit|null - */ - public function getTravelDurationLimit() - { - return $this->travel_duration_limit; - } - - public function hasTravelDurationLimit() - { - return isset($this->travel_duration_limit); - } - - public function clearTravelDurationLimit() - { - unset($this->travel_duration_limit); - } - - /** - * Limit applied to the travel duration of the vehicle's route. In a given - * `OptimizeToursResponse`, the route travel duration is the sum of all its - * [transitions.travel_duration][google.maps.routeoptimization.v1.ShipmentRoute.Transition.travel_duration]. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.Vehicle.DurationLimit travel_duration_limit = 22; - * @param \Google\Maps\RouteOptimization\V1\Vehicle\DurationLimit $var - * @return $this - */ - public function setTravelDurationLimit($var) - { - GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\Vehicle\DurationLimit::class); - $this->travel_duration_limit = $var; - - return $this; - } - - /** - * Limit applied to the total distance of the vehicle's route. In a given - * `OptimizeToursResponse`, the route distance is the sum of all its - * [transitions.travel_distance_meters][google.maps.routeoptimization.v1.ShipmentRoute.Transition.travel_distance_meters]. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.DistanceLimit route_distance_limit = 23; - * @return \Google\Maps\RouteOptimization\V1\DistanceLimit|null - */ - public function getRouteDistanceLimit() - { - return $this->route_distance_limit; - } - - public function hasRouteDistanceLimit() - { - return isset($this->route_distance_limit); - } - - public function clearRouteDistanceLimit() - { - unset($this->route_distance_limit); - } - - /** - * Limit applied to the total distance of the vehicle's route. In a given - * `OptimizeToursResponse`, the route distance is the sum of all its - * [transitions.travel_distance_meters][google.maps.routeoptimization.v1.ShipmentRoute.Transition.travel_distance_meters]. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.DistanceLimit route_distance_limit = 23; - * @param \Google\Maps\RouteOptimization\V1\DistanceLimit $var - * @return $this - */ - public function setRouteDistanceLimit($var) - { - GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\DistanceLimit::class); - $this->route_distance_limit = $var; - - return $this; - } - - /** - * Specifies a map from visit_types strings to durations. The duration is time - * in addition to - * [VisitRequest.duration][google.maps.routeoptimization.v1.Shipment.VisitRequest.duration] - * to be taken at visits with the specified `visit_types`. This extra visit - * duration adds cost if `cost_per_hour` is specified. Keys (i.e. - * `visit_types`) cannot be empty strings. - * If a visit request has multiple types, a duration will be added for each - * type in the map. - * - * Generated from protobuf field map extra_visit_duration_for_visit_type = 24; - * @return \Google\Protobuf\Internal\MapField - */ - public function getExtraVisitDurationForVisitType() - { - return $this->extra_visit_duration_for_visit_type; - } - - /** - * Specifies a map from visit_types strings to durations. The duration is time - * in addition to - * [VisitRequest.duration][google.maps.routeoptimization.v1.Shipment.VisitRequest.duration] - * to be taken at visits with the specified `visit_types`. This extra visit - * duration adds cost if `cost_per_hour` is specified. Keys (i.e. - * `visit_types`) cannot be empty strings. - * If a visit request has multiple types, a duration will be added for each - * type in the map. - * - * Generated from protobuf field map extra_visit_duration_for_visit_type = 24; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setExtraVisitDurationForVisitType($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Duration::class); - $this->extra_visit_duration_for_visit_type = $arr; - - return $this; - } - - /** - * Describes the break schedule to be enforced on this vehicle. - * If empty, no breaks will be scheduled for this vehicle. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.BreakRule break_rule = 25; - * @return \Google\Maps\RouteOptimization\V1\BreakRule|null - */ - public function getBreakRule() - { - return $this->break_rule; - } - - public function hasBreakRule() - { - return isset($this->break_rule); - } - - public function clearBreakRule() - { - unset($this->break_rule); - } - - /** - * Describes the break schedule to be enforced on this vehicle. - * If empty, no breaks will be scheduled for this vehicle. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.BreakRule break_rule = 25; - * @param \Google\Maps\RouteOptimization\V1\BreakRule $var - * @return $this - */ - public function setBreakRule($var) - { - GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\BreakRule::class); - $this->break_rule = $var; - - return $this; - } - - /** - * Specifies a label for this vehicle. This label is reported in the response - * as the `vehicle_label` of the corresponding - * [ShipmentRoute][google.maps.routeoptimization.v1.ShipmentRoute]. - * - * Generated from protobuf field string label = 27; - * @return string - */ - public function getLabel() - { - return $this->label; - } - - /** - * Specifies a label for this vehicle. This label is reported in the response - * as the `vehicle_label` of the corresponding - * [ShipmentRoute][google.maps.routeoptimization.v1.ShipmentRoute]. - * - * Generated from protobuf field string label = 27; - * @param string $var - * @return $this - */ - public function setLabel($var) - { - GPBUtil::checkString($var, True); - $this->label = $var; - - return $this; - } - - /** - * If true, `used_if_route_is_empty` must be false, and this vehicle will - * remain unused. - * If a shipment is performed by an ignored vehicle in - * `injected_first_solution_routes`, it is skipped in the first solution but - * is free to be performed in the response. - * If a shipment is performed by an ignored vehicle in - * `injected_solution_constraint` and any related pickup/delivery is - * constrained to remain on the vehicle (i.e., not relaxed to level - * `RELAX_ALL_AFTER_THRESHOLD`), it is skipped in the response. - * If a shipment has a non-empty `allowed_vehicle_indices` field and all of - * the allowed vehicles are ignored, it is skipped in the response. - * - * Generated from protobuf field bool ignore = 28; - * @return bool - */ - public function getIgnore() - { - return $this->ignore; - } - - /** - * If true, `used_if_route_is_empty` must be false, and this vehicle will - * remain unused. - * If a shipment is performed by an ignored vehicle in - * `injected_first_solution_routes`, it is skipped in the first solution but - * is free to be performed in the response. - * If a shipment is performed by an ignored vehicle in - * `injected_solution_constraint` and any related pickup/delivery is - * constrained to remain on the vehicle (i.e., not relaxed to level - * `RELAX_ALL_AFTER_THRESHOLD`), it is skipped in the response. - * If a shipment has a non-empty `allowed_vehicle_indices` field and all of - * the allowed vehicles are ignored, it is skipped in the response. - * - * Generated from protobuf field bool ignore = 28; - * @param bool $var - * @return $this - */ - public function setIgnore($var) - { - GPBUtil::checkBool($var); - $this->ignore = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Vehicle/DurationLimit.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Vehicle/DurationLimit.php deleted file mode 100644 index 75db61656a5f..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Vehicle/DurationLimit.php +++ /dev/null @@ -1,359 +0,0 @@ -google.maps.routeoptimization.v1.Vehicle.DurationLimit - */ -class DurationLimit extends \Google\Protobuf\Internal\Message -{ - /** - * A hard limit constraining the duration to be at most max_duration. - * - * Generated from protobuf field .google.protobuf.Duration max_duration = 1; - */ - protected $max_duration = null; - /** - * A soft limit not enforcing a maximum duration limit, but when violated - * makes the route incur a cost. This cost adds up to other costs defined in - * the model, with the same unit. - * If defined, `soft_max_duration` must be nonnegative. If max_duration is - * also defined, `soft_max_duration` must be less than max_duration. - * - * Generated from protobuf field .google.protobuf.Duration soft_max_duration = 2; - */ - protected $soft_max_duration = null; - /** - * Cost per hour incurred if the `soft_max_duration` threshold is violated. - * The additional cost is 0 if the duration is under the threshold, - * otherwise the cost depends on the duration as follows: - * ``` - * cost_per_hour_after_soft_max * (duration - soft_max_duration) - * ``` - * The cost must be nonnegative. - * - * Generated from protobuf field optional double cost_per_hour_after_soft_max = 3; - */ - protected $cost_per_hour_after_soft_max = null; - /** - * A soft limit not enforcing a maximum duration limit, but when violated - * makes the route incur a cost, quadratic in the duration. This cost adds - * up to other costs defined in the model, with the same unit. - * If defined, `quadratic_soft_max_duration` must be nonnegative. If - * `max_duration` is also defined, `quadratic_soft_max_duration` must be - * less than `max_duration`, and the difference must be no larger than one - * day: - * `max_duration - quadratic_soft_max_duration <= 86400 seconds` - * - * Generated from protobuf field .google.protobuf.Duration quadratic_soft_max_duration = 4; - */ - protected $quadratic_soft_max_duration = null; - /** - * Cost per square hour incurred if the - * `quadratic_soft_max_duration` threshold is violated. - * The additional cost is 0 if the duration is under the threshold, - * otherwise the cost depends on the duration as follows: - * ``` - * cost_per_square_hour_after_quadratic_soft_max * - * (duration - quadratic_soft_max_duration)^2 - * ``` - * The cost must be nonnegative. - * - * Generated from protobuf field optional double cost_per_square_hour_after_quadratic_soft_max = 5; - */ - protected $cost_per_square_hour_after_quadratic_soft_max = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Duration $max_duration - * A hard limit constraining the duration to be at most max_duration. - * @type \Google\Protobuf\Duration $soft_max_duration - * A soft limit not enforcing a maximum duration limit, but when violated - * makes the route incur a cost. This cost adds up to other costs defined in - * the model, with the same unit. - * If defined, `soft_max_duration` must be nonnegative. If max_duration is - * also defined, `soft_max_duration` must be less than max_duration. - * @type float $cost_per_hour_after_soft_max - * Cost per hour incurred if the `soft_max_duration` threshold is violated. - * The additional cost is 0 if the duration is under the threshold, - * otherwise the cost depends on the duration as follows: - * ``` - * cost_per_hour_after_soft_max * (duration - soft_max_duration) - * ``` - * The cost must be nonnegative. - * @type \Google\Protobuf\Duration $quadratic_soft_max_duration - * A soft limit not enforcing a maximum duration limit, but when violated - * makes the route incur a cost, quadratic in the duration. This cost adds - * up to other costs defined in the model, with the same unit. - * If defined, `quadratic_soft_max_duration` must be nonnegative. If - * `max_duration` is also defined, `quadratic_soft_max_duration` must be - * less than `max_duration`, and the difference must be no larger than one - * day: - * `max_duration - quadratic_soft_max_duration <= 86400 seconds` - * @type float $cost_per_square_hour_after_quadratic_soft_max - * Cost per square hour incurred if the - * `quadratic_soft_max_duration` threshold is violated. - * The additional cost is 0 if the duration is under the threshold, - * otherwise the cost depends on the duration as follows: - * ``` - * cost_per_square_hour_after_quadratic_soft_max * - * (duration - quadratic_soft_max_duration)^2 - * ``` - * The cost must be nonnegative. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); - parent::__construct($data); - } - - /** - * A hard limit constraining the duration to be at most max_duration. - * - * Generated from protobuf field .google.protobuf.Duration max_duration = 1; - * @return \Google\Protobuf\Duration|null - */ - public function getMaxDuration() - { - return $this->max_duration; - } - - public function hasMaxDuration() - { - return isset($this->max_duration); - } - - public function clearMaxDuration() - { - unset($this->max_duration); - } - - /** - * A hard limit constraining the duration to be at most max_duration. - * - * Generated from protobuf field .google.protobuf.Duration max_duration = 1; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setMaxDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->max_duration = $var; - - return $this; - } - - /** - * A soft limit not enforcing a maximum duration limit, but when violated - * makes the route incur a cost. This cost adds up to other costs defined in - * the model, with the same unit. - * If defined, `soft_max_duration` must be nonnegative. If max_duration is - * also defined, `soft_max_duration` must be less than max_duration. - * - * Generated from protobuf field .google.protobuf.Duration soft_max_duration = 2; - * @return \Google\Protobuf\Duration|null - */ - public function getSoftMaxDuration() - { - return $this->soft_max_duration; - } - - public function hasSoftMaxDuration() - { - return isset($this->soft_max_duration); - } - - public function clearSoftMaxDuration() - { - unset($this->soft_max_duration); - } - - /** - * A soft limit not enforcing a maximum duration limit, but when violated - * makes the route incur a cost. This cost adds up to other costs defined in - * the model, with the same unit. - * If defined, `soft_max_duration` must be nonnegative. If max_duration is - * also defined, `soft_max_duration` must be less than max_duration. - * - * Generated from protobuf field .google.protobuf.Duration soft_max_duration = 2; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setSoftMaxDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->soft_max_duration = $var; - - return $this; - } - - /** - * Cost per hour incurred if the `soft_max_duration` threshold is violated. - * The additional cost is 0 if the duration is under the threshold, - * otherwise the cost depends on the duration as follows: - * ``` - * cost_per_hour_after_soft_max * (duration - soft_max_duration) - * ``` - * The cost must be nonnegative. - * - * Generated from protobuf field optional double cost_per_hour_after_soft_max = 3; - * @return float - */ - public function getCostPerHourAfterSoftMax() - { - return isset($this->cost_per_hour_after_soft_max) ? $this->cost_per_hour_after_soft_max : 0.0; - } - - public function hasCostPerHourAfterSoftMax() - { - return isset($this->cost_per_hour_after_soft_max); - } - - public function clearCostPerHourAfterSoftMax() - { - unset($this->cost_per_hour_after_soft_max); - } - - /** - * Cost per hour incurred if the `soft_max_duration` threshold is violated. - * The additional cost is 0 if the duration is under the threshold, - * otherwise the cost depends on the duration as follows: - * ``` - * cost_per_hour_after_soft_max * (duration - soft_max_duration) - * ``` - * The cost must be nonnegative. - * - * Generated from protobuf field optional double cost_per_hour_after_soft_max = 3; - * @param float $var - * @return $this - */ - public function setCostPerHourAfterSoftMax($var) - { - GPBUtil::checkDouble($var); - $this->cost_per_hour_after_soft_max = $var; - - return $this; - } - - /** - * A soft limit not enforcing a maximum duration limit, but when violated - * makes the route incur a cost, quadratic in the duration. This cost adds - * up to other costs defined in the model, with the same unit. - * If defined, `quadratic_soft_max_duration` must be nonnegative. If - * `max_duration` is also defined, `quadratic_soft_max_duration` must be - * less than `max_duration`, and the difference must be no larger than one - * day: - * `max_duration - quadratic_soft_max_duration <= 86400 seconds` - * - * Generated from protobuf field .google.protobuf.Duration quadratic_soft_max_duration = 4; - * @return \Google\Protobuf\Duration|null - */ - public function getQuadraticSoftMaxDuration() - { - return $this->quadratic_soft_max_duration; - } - - public function hasQuadraticSoftMaxDuration() - { - return isset($this->quadratic_soft_max_duration); - } - - public function clearQuadraticSoftMaxDuration() - { - unset($this->quadratic_soft_max_duration); - } - - /** - * A soft limit not enforcing a maximum duration limit, but when violated - * makes the route incur a cost, quadratic in the duration. This cost adds - * up to other costs defined in the model, with the same unit. - * If defined, `quadratic_soft_max_duration` must be nonnegative. If - * `max_duration` is also defined, `quadratic_soft_max_duration` must be - * less than `max_duration`, and the difference must be no larger than one - * day: - * `max_duration - quadratic_soft_max_duration <= 86400 seconds` - * - * Generated from protobuf field .google.protobuf.Duration quadratic_soft_max_duration = 4; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setQuadraticSoftMaxDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->quadratic_soft_max_duration = $var; - - return $this; - } - - /** - * Cost per square hour incurred if the - * `quadratic_soft_max_duration` threshold is violated. - * The additional cost is 0 if the duration is under the threshold, - * otherwise the cost depends on the duration as follows: - * ``` - * cost_per_square_hour_after_quadratic_soft_max * - * (duration - quadratic_soft_max_duration)^2 - * ``` - * The cost must be nonnegative. - * - * Generated from protobuf field optional double cost_per_square_hour_after_quadratic_soft_max = 5; - * @return float - */ - public function getCostPerSquareHourAfterQuadraticSoftMax() - { - return isset($this->cost_per_square_hour_after_quadratic_soft_max) ? $this->cost_per_square_hour_after_quadratic_soft_max : 0.0; - } - - public function hasCostPerSquareHourAfterQuadraticSoftMax() - { - return isset($this->cost_per_square_hour_after_quadratic_soft_max); - } - - public function clearCostPerSquareHourAfterQuadraticSoftMax() - { - unset($this->cost_per_square_hour_after_quadratic_soft_max); - } - - /** - * Cost per square hour incurred if the - * `quadratic_soft_max_duration` threshold is violated. - * The additional cost is 0 if the duration is under the threshold, - * otherwise the cost depends on the duration as follows: - * ``` - * cost_per_square_hour_after_quadratic_soft_max * - * (duration - quadratic_soft_max_duration)^2 - * ``` - * The cost must be nonnegative. - * - * Generated from protobuf field optional double cost_per_square_hour_after_quadratic_soft_max = 5; - * @param float $var - * @return $this - */ - public function setCostPerSquareHourAfterQuadraticSoftMax($var) - { - GPBUtil::checkDouble($var); - $this->cost_per_square_hour_after_quadratic_soft_max = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DurationLimit::class, \Google\Maps\RouteOptimization\V1\Vehicle_DurationLimit::class); - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Vehicle/LoadLimit.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Vehicle/LoadLimit.php deleted file mode 100644 index 076beefb96f4..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Vehicle/LoadLimit.php +++ /dev/null @@ -1,270 +0,0 @@ -google.maps.routeoptimization.v1.Vehicle.LoadLimit - */ -class LoadLimit extends \Google\Protobuf\Internal\Message -{ - /** - * The maximum acceptable amount of load. - * - * Generated from protobuf field optional int64 max_load = 1; - */ - protected $max_load = null; - /** - * A soft limit of the load. See - * [cost_per_unit_above_soft_max][google.maps.routeoptimization.v1.Vehicle.LoadLimit.cost_per_unit_above_soft_max]. - * - * Generated from protobuf field int64 soft_max_load = 2; - */ - protected $soft_max_load = 0; - /** - * If the load ever exceeds - * [soft_max_load][google.maps.routeoptimization.v1.Vehicle.LoadLimit.soft_max_load] - * along this vehicle's route, the following cost penalty applies (only once - * per vehicle): (load - - * [soft_max_load][google.maps.routeoptimization.v1.Vehicle.LoadLimit.soft_max_load]) - * * [cost_per_unit_above_soft_max][google.maps.routeoptimization.v1.Vehicle.LoadLimit.cost_per_unit_above_soft_max]. All costs - * add up and must be in the same unit as - * [Shipment.penalty_cost][google.maps.routeoptimization.v1.Shipment.penalty_cost]. - * - * Generated from protobuf field double cost_per_unit_above_soft_max = 3; - */ - protected $cost_per_unit_above_soft_max = 0.0; - /** - * The acceptable load interval of the vehicle at the start of the route. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.Vehicle.LoadLimit.Interval start_load_interval = 4; - */ - protected $start_load_interval = null; - /** - * The acceptable load interval of the vehicle at the end of the route. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.Vehicle.LoadLimit.Interval end_load_interval = 5; - */ - protected $end_load_interval = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $max_load - * The maximum acceptable amount of load. - * @type int|string $soft_max_load - * A soft limit of the load. See - * [cost_per_unit_above_soft_max][google.maps.routeoptimization.v1.Vehicle.LoadLimit.cost_per_unit_above_soft_max]. - * @type float $cost_per_unit_above_soft_max - * If the load ever exceeds - * [soft_max_load][google.maps.routeoptimization.v1.Vehicle.LoadLimit.soft_max_load] - * along this vehicle's route, the following cost penalty applies (only once - * per vehicle): (load - - * [soft_max_load][google.maps.routeoptimization.v1.Vehicle.LoadLimit.soft_max_load]) - * * [cost_per_unit_above_soft_max][google.maps.routeoptimization.v1.Vehicle.LoadLimit.cost_per_unit_above_soft_max]. All costs - * add up and must be in the same unit as - * [Shipment.penalty_cost][google.maps.routeoptimization.v1.Shipment.penalty_cost]. - * @type \Google\Maps\RouteOptimization\V1\Vehicle\LoadLimit\Interval $start_load_interval - * The acceptable load interval of the vehicle at the start of the route. - * @type \Google\Maps\RouteOptimization\V1\Vehicle\LoadLimit\Interval $end_load_interval - * The acceptable load interval of the vehicle at the end of the route. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); - parent::__construct($data); - } - - /** - * The maximum acceptable amount of load. - * - * Generated from protobuf field optional int64 max_load = 1; - * @return int|string - */ - public function getMaxLoad() - { - return isset($this->max_load) ? $this->max_load : 0; - } - - public function hasMaxLoad() - { - return isset($this->max_load); - } - - public function clearMaxLoad() - { - unset($this->max_load); - } - - /** - * The maximum acceptable amount of load. - * - * Generated from protobuf field optional int64 max_load = 1; - * @param int|string $var - * @return $this - */ - public function setMaxLoad($var) - { - GPBUtil::checkInt64($var); - $this->max_load = $var; - - return $this; - } - - /** - * A soft limit of the load. See - * [cost_per_unit_above_soft_max][google.maps.routeoptimization.v1.Vehicle.LoadLimit.cost_per_unit_above_soft_max]. - * - * Generated from protobuf field int64 soft_max_load = 2; - * @return int|string - */ - public function getSoftMaxLoad() - { - return $this->soft_max_load; - } - - /** - * A soft limit of the load. See - * [cost_per_unit_above_soft_max][google.maps.routeoptimization.v1.Vehicle.LoadLimit.cost_per_unit_above_soft_max]. - * - * Generated from protobuf field int64 soft_max_load = 2; - * @param int|string $var - * @return $this - */ - public function setSoftMaxLoad($var) - { - GPBUtil::checkInt64($var); - $this->soft_max_load = $var; - - return $this; - } - - /** - * If the load ever exceeds - * [soft_max_load][google.maps.routeoptimization.v1.Vehicle.LoadLimit.soft_max_load] - * along this vehicle's route, the following cost penalty applies (only once - * per vehicle): (load - - * [soft_max_load][google.maps.routeoptimization.v1.Vehicle.LoadLimit.soft_max_load]) - * * [cost_per_unit_above_soft_max][google.maps.routeoptimization.v1.Vehicle.LoadLimit.cost_per_unit_above_soft_max]. All costs - * add up and must be in the same unit as - * [Shipment.penalty_cost][google.maps.routeoptimization.v1.Shipment.penalty_cost]. - * - * Generated from protobuf field double cost_per_unit_above_soft_max = 3; - * @return float - */ - public function getCostPerUnitAboveSoftMax() - { - return $this->cost_per_unit_above_soft_max; - } - - /** - * If the load ever exceeds - * [soft_max_load][google.maps.routeoptimization.v1.Vehicle.LoadLimit.soft_max_load] - * along this vehicle's route, the following cost penalty applies (only once - * per vehicle): (load - - * [soft_max_load][google.maps.routeoptimization.v1.Vehicle.LoadLimit.soft_max_load]) - * * [cost_per_unit_above_soft_max][google.maps.routeoptimization.v1.Vehicle.LoadLimit.cost_per_unit_above_soft_max]. All costs - * add up and must be in the same unit as - * [Shipment.penalty_cost][google.maps.routeoptimization.v1.Shipment.penalty_cost]. - * - * Generated from protobuf field double cost_per_unit_above_soft_max = 3; - * @param float $var - * @return $this - */ - public function setCostPerUnitAboveSoftMax($var) - { - GPBUtil::checkDouble($var); - $this->cost_per_unit_above_soft_max = $var; - - return $this; - } - - /** - * The acceptable load interval of the vehicle at the start of the route. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.Vehicle.LoadLimit.Interval start_load_interval = 4; - * @return \Google\Maps\RouteOptimization\V1\Vehicle\LoadLimit\Interval|null - */ - public function getStartLoadInterval() - { - return $this->start_load_interval; - } - - public function hasStartLoadInterval() - { - return isset($this->start_load_interval); - } - - public function clearStartLoadInterval() - { - unset($this->start_load_interval); - } - - /** - * The acceptable load interval of the vehicle at the start of the route. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.Vehicle.LoadLimit.Interval start_load_interval = 4; - * @param \Google\Maps\RouteOptimization\V1\Vehicle\LoadLimit\Interval $var - * @return $this - */ - public function setStartLoadInterval($var) - { - GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\Vehicle\LoadLimit\Interval::class); - $this->start_load_interval = $var; - - return $this; - } - - /** - * The acceptable load interval of the vehicle at the end of the route. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.Vehicle.LoadLimit.Interval end_load_interval = 5; - * @return \Google\Maps\RouteOptimization\V1\Vehicle\LoadLimit\Interval|null - */ - public function getEndLoadInterval() - { - return $this->end_load_interval; - } - - public function hasEndLoadInterval() - { - return isset($this->end_load_interval); - } - - public function clearEndLoadInterval() - { - unset($this->end_load_interval); - } - - /** - * The acceptable load interval of the vehicle at the end of the route. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.Vehicle.LoadLimit.Interval end_load_interval = 5; - * @param \Google\Maps\RouteOptimization\V1\Vehicle\LoadLimit\Interval $var - * @return $this - */ - public function setEndLoadInterval($var) - { - GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\Vehicle\LoadLimit\Interval::class); - $this->end_load_interval = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(LoadLimit::class, \Google\Maps\RouteOptimization\V1\Vehicle_LoadLimit::class); - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Vehicle/LoadLimit/Interval.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Vehicle/LoadLimit/Interval.php deleted file mode 100644 index cc4429851ef7..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Vehicle/LoadLimit/Interval.php +++ /dev/null @@ -1,150 +0,0 @@ -google.maps.routeoptimization.v1.Vehicle.LoadLimit.Interval - */ -class Interval extends \Google\Protobuf\Internal\Message -{ - /** - * A minimum acceptable load. Must be ≥ 0. - * If they're both specified, - * [min][google.maps.routeoptimization.v1.Vehicle.LoadLimit.Interval.min] - * must be ≤ - * [max][google.maps.routeoptimization.v1.Vehicle.LoadLimit.Interval.max]. - * - * Generated from protobuf field int64 min = 1; - */ - protected $min = 0; - /** - * A maximum acceptable load. Must be ≥ 0. If unspecified, the maximum - * load is unrestricted by this message. - * If they're both specified, - * [min][google.maps.routeoptimization.v1.Vehicle.LoadLimit.Interval.min] - * must be ≤ - * [max][google.maps.routeoptimization.v1.Vehicle.LoadLimit.Interval.max]. - * - * Generated from protobuf field optional int64 max = 2; - */ - protected $max = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $min - * A minimum acceptable load. Must be ≥ 0. - * If they're both specified, - * [min][google.maps.routeoptimization.v1.Vehicle.LoadLimit.Interval.min] - * must be ≤ - * [max][google.maps.routeoptimization.v1.Vehicle.LoadLimit.Interval.max]. - * @type int|string $max - * A maximum acceptable load. Must be ≥ 0. If unspecified, the maximum - * load is unrestricted by this message. - * If they're both specified, - * [min][google.maps.routeoptimization.v1.Vehicle.LoadLimit.Interval.min] - * must be ≤ - * [max][google.maps.routeoptimization.v1.Vehicle.LoadLimit.Interval.max]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); - parent::__construct($data); - } - - /** - * A minimum acceptable load. Must be ≥ 0. - * If they're both specified, - * [min][google.maps.routeoptimization.v1.Vehicle.LoadLimit.Interval.min] - * must be ≤ - * [max][google.maps.routeoptimization.v1.Vehicle.LoadLimit.Interval.max]. - * - * Generated from protobuf field int64 min = 1; - * @return int|string - */ - public function getMin() - { - return $this->min; - } - - /** - * A minimum acceptable load. Must be ≥ 0. - * If they're both specified, - * [min][google.maps.routeoptimization.v1.Vehicle.LoadLimit.Interval.min] - * must be ≤ - * [max][google.maps.routeoptimization.v1.Vehicle.LoadLimit.Interval.max]. - * - * Generated from protobuf field int64 min = 1; - * @param int|string $var - * @return $this - */ - public function setMin($var) - { - GPBUtil::checkInt64($var); - $this->min = $var; - - return $this; - } - - /** - * A maximum acceptable load. Must be ≥ 0. If unspecified, the maximum - * load is unrestricted by this message. - * If they're both specified, - * [min][google.maps.routeoptimization.v1.Vehicle.LoadLimit.Interval.min] - * must be ≤ - * [max][google.maps.routeoptimization.v1.Vehicle.LoadLimit.Interval.max]. - * - * Generated from protobuf field optional int64 max = 2; - * @return int|string - */ - public function getMax() - { - return isset($this->max) ? $this->max : 0; - } - - public function hasMax() - { - return isset($this->max); - } - - public function clearMax() - { - unset($this->max); - } - - /** - * A maximum acceptable load. Must be ≥ 0. If unspecified, the maximum - * load is unrestricted by this message. - * If they're both specified, - * [min][google.maps.routeoptimization.v1.Vehicle.LoadLimit.Interval.min] - * must be ≤ - * [max][google.maps.routeoptimization.v1.Vehicle.LoadLimit.Interval.max]. - * - * Generated from protobuf field optional int64 max = 2; - * @param int|string $var - * @return $this - */ - public function setMax($var) - { - GPBUtil::checkInt64($var); - $this->max = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Interval::class, \Google\Maps\RouteOptimization\V1\Vehicle_LoadLimit_Interval::class); - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Vehicle/TravelMode.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Vehicle/TravelMode.php deleted file mode 100644 index 29c7c3891265..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Vehicle/TravelMode.php +++ /dev/null @@ -1,67 +0,0 @@ -google.maps.routeoptimization.v1.Vehicle.TravelMode - */ -class TravelMode -{ - /** - * Unspecified travel mode, equivalent to `DRIVING`. - * - * Generated from protobuf enum TRAVEL_MODE_UNSPECIFIED = 0; - */ - const TRAVEL_MODE_UNSPECIFIED = 0; - /** - * Travel mode corresponding to driving directions (car, ...). - * - * Generated from protobuf enum DRIVING = 1; - */ - const DRIVING = 1; - /** - * Travel mode corresponding to walking directions. - * - * Generated from protobuf enum WALKING = 2; - */ - const WALKING = 2; - - private static $valueToName = [ - self::TRAVEL_MODE_UNSPECIFIED => 'TRAVEL_MODE_UNSPECIFIED', - self::DRIVING => 'DRIVING', - self::WALKING => 'WALKING', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(TravelMode::class, \Google\Maps\RouteOptimization\V1\Vehicle_TravelMode::class); - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Vehicle/UnloadingPolicy.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Vehicle/UnloadingPolicy.php deleted file mode 100644 index dc58c2f42b5b..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Vehicle/UnloadingPolicy.php +++ /dev/null @@ -1,68 +0,0 @@ -google.maps.routeoptimization.v1.Vehicle.UnloadingPolicy - */ -class UnloadingPolicy -{ - /** - * Unspecified unloading policy; deliveries must just occur after their - * corresponding pickups. - * - * Generated from protobuf enum UNLOADING_POLICY_UNSPECIFIED = 0; - */ - const UNLOADING_POLICY_UNSPECIFIED = 0; - /** - * Deliveries must occur in reverse order of pickups - * - * Generated from protobuf enum LAST_IN_FIRST_OUT = 1; - */ - const LAST_IN_FIRST_OUT = 1; - /** - * Deliveries must occur in the same order as pickups - * - * Generated from protobuf enum FIRST_IN_FIRST_OUT = 2; - */ - const FIRST_IN_FIRST_OUT = 2; - - private static $valueToName = [ - self::UNLOADING_POLICY_UNSPECIFIED => 'UNLOADING_POLICY_UNSPECIFIED', - self::LAST_IN_FIRST_OUT => 'LAST_IN_FIRST_OUT', - self::FIRST_IN_FIRST_OUT => 'FIRST_IN_FIRST_OUT', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(UnloadingPolicy::class, \Google\Maps\RouteOptimization\V1\Vehicle_UnloadingPolicy::class); - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Waypoint.php b/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Waypoint.php deleted file mode 100644 index b691d5167b2b..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/proto/src/Google/Maps/RouteOptimization/V1/Waypoint.php +++ /dev/null @@ -1,166 +0,0 @@ -google.maps.routeoptimization.v1.Waypoint - */ -class Waypoint extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Indicates that the location of this waypoint is meant to have a - * preference for the vehicle to stop at a particular side of road. When you - * set this value, the route will pass through the location so that the - * vehicle can stop at the side of road that the location is biased towards - * from the center of the road. This option doesn't work for the 'WALKING' - * travel mode. - * - * Generated from protobuf field bool side_of_road = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $side_of_road = false; - protected $location_type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Maps\RouteOptimization\V1\Location $location - * A point specified using geographic coordinates, including an optional - * heading. - * @type string $place_id - * The POI Place ID associated with the waypoint. - * @type bool $side_of_road - * Optional. Indicates that the location of this waypoint is meant to have a - * preference for the vehicle to stop at a particular side of road. When you - * set this value, the route will pass through the location so that the - * vehicle can stop at the side of road that the location is biased towards - * from the center of the road. This option doesn't work for the 'WALKING' - * travel mode. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Maps\Routeoptimization\V1\RouteOptimizationService::initOnce(); - parent::__construct($data); - } - - /** - * A point specified using geographic coordinates, including an optional - * heading. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.Location location = 1; - * @return \Google\Maps\RouteOptimization\V1\Location|null - */ - public function getLocation() - { - return $this->readOneof(1); - } - - public function hasLocation() - { - return $this->hasOneof(1); - } - - /** - * A point specified using geographic coordinates, including an optional - * heading. - * - * Generated from protobuf field .google.maps.routeoptimization.v1.Location location = 1; - * @param \Google\Maps\RouteOptimization\V1\Location $var - * @return $this - */ - public function setLocation($var) - { - GPBUtil::checkMessage($var, \Google\Maps\RouteOptimization\V1\Location::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * The POI Place ID associated with the waypoint. - * - * Generated from protobuf field string place_id = 2; - * @return string - */ - public function getPlaceId() - { - return $this->readOneof(2); - } - - public function hasPlaceId() - { - return $this->hasOneof(2); - } - - /** - * The POI Place ID associated with the waypoint. - * - * Generated from protobuf field string place_id = 2; - * @param string $var - * @return $this - */ - public function setPlaceId($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Optional. Indicates that the location of this waypoint is meant to have a - * preference for the vehicle to stop at a particular side of road. When you - * set this value, the route will pass through the location so that the - * vehicle can stop at the side of road that the location is biased towards - * from the center of the road. This option doesn't work for the 'WALKING' - * travel mode. - * - * Generated from protobuf field bool side_of_road = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getSideOfRoad() - { - return $this->side_of_road; - } - - /** - * Optional. Indicates that the location of this waypoint is meant to have a - * preference for the vehicle to stop at a particular side of road. When you - * set this value, the route will pass through the location so that the - * vehicle can stop at the side of road that the location is biased towards - * from the center of the road. This option doesn't work for the 'WALKING' - * travel mode. - * - * Generated from protobuf field bool side_of_road = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setSideOfRoad($var) - { - GPBUtil::checkBool($var); - $this->side_of_road = $var; - - return $this; - } - - /** - * @return string - */ - public function getLocationType() - { - return $this->whichOneof("location_type"); - } - -} - diff --git a/owl-bot-staging/MapsRouteOptimization/v1/samples/V1/RouteOptimizationClient/batch_optimize_tours.php b/owl-bot-staging/MapsRouteOptimization/v1/samples/V1/RouteOptimizationClient/batch_optimize_tours.php deleted file mode 100644 index e118b4dbdf9b..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/samples/V1/RouteOptimizationClient/batch_optimize_tours.php +++ /dev/null @@ -1,133 +0,0 @@ -setDataFormat($modelConfigsInputConfigDataFormat); - $modelConfigsOutputConfig = (new OutputConfig()) - ->setDataFormat($modelConfigsOutputConfigDataFormat); - $asyncModelConfig = (new AsyncModelConfig()) - ->setInputConfig($modelConfigsInputConfig) - ->setOutputConfig($modelConfigsOutputConfig); - $modelConfigs = [$asyncModelConfig,]; - $request = (new BatchOptimizeToursRequest()) - ->setParent($parent) - ->setModelConfigs($modelConfigs); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $routeOptimizationClient->batchOptimizeTours($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var BatchOptimizeToursResponse $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $parent = '[PARENT]'; - $modelConfigsInputConfigDataFormat = DataFormat::DATA_FORMAT_UNSPECIFIED; - $modelConfigsOutputConfigDataFormat = DataFormat::DATA_FORMAT_UNSPECIFIED; - - batch_optimize_tours_sample( - $parent, - $modelConfigsInputConfigDataFormat, - $modelConfigsOutputConfigDataFormat - ); -} -// [END routeoptimization_v1_generated_RouteOptimization_BatchOptimizeTours_sync] diff --git a/owl-bot-staging/MapsRouteOptimization/v1/samples/V1/RouteOptimizationClient/optimize_tours.php b/owl-bot-staging/MapsRouteOptimization/v1/samples/V1/RouteOptimizationClient/optimize_tours.php deleted file mode 100644 index 8ad98f631377..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/samples/V1/RouteOptimizationClient/optimize_tours.php +++ /dev/null @@ -1,89 +0,0 @@ -setParent($parent); - - // Call the API and handle any network failures. - try { - /** @var OptimizeToursResponse $response */ - $response = $routeOptimizationClient->optimizeTours($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $parent = '[PARENT]'; - - optimize_tours_sample($parent); -} -// [END routeoptimization_v1_generated_RouteOptimization_OptimizeTours_sync] diff --git a/owl-bot-staging/MapsRouteOptimization/v1/src/V1/Client/RouteOptimizationClient.php b/owl-bot-staging/MapsRouteOptimization/v1/src/V1/Client/RouteOptimizationClient.php deleted file mode 100644 index ccb83c53a0fb..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/src/V1/Client/RouteOptimizationClient.php +++ /dev/null @@ -1,327 +0,0 @@ - batchOptimizeToursAsync(BatchOptimizeToursRequest $request, array $optionalArgs = []) - * @method PromiseInterface optimizeToursAsync(OptimizeToursRequest $request, array $optionalArgs = []) - */ -final class RouteOptimizationClient -{ - use GapicClientTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.maps.routeoptimization.v1.RouteOptimization'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'routeoptimization.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'routeoptimization.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/route_optimization_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/route_optimization_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/route_optimization_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/route_optimization_rest_client_config.php', - ], - ], - ]; - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Create the default operation client for the service. - * - * @param array $options ClientOptions for the client. - * - * @return OperationsClient - */ - private function createOperationsClient(array $options) - { - // Unset client-specific configuration options - unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); - - if (isset($options['operationsClient'])) { - return $options['operationsClient']; - } - - return new OperationsClient($options); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'routeoptimization.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Optimizes vehicle tours for one or more `OptimizeToursRequest` - * messages as a batch. - * - * This method is a Long Running Operation (LRO). The inputs for optimization - * (`OptimizeToursRequest` messages) and outputs (`OptimizeToursResponse` - * messages) are read from and written to Cloud Storage in user-specified - * format. Like the `OptimizeTours` method, each `OptimizeToursRequest` - * contains a `ShipmentModel` and returns an `OptimizeToursResponse` - * containing `ShipmentRoute` fields, which are a set of routes to be - * performed by vehicles minimizing the overall cost. - * - * The user can poll `operations.get` to check the status of the LRO: - * - * If the LRO `done` field is false, then at least one request is still - * being processed. Other requests may have completed successfully and their - * results are available in Cloud Storage. - * - * If the LRO's `done` field is true, then all requests have been processed. - * Any successfully processed requests will have their results available in - * Cloud Storage. Any requests that failed will not have their results - * available in Cloud Storage. If the LRO's `error` field is set, then it - * contains the error from one of the failed requests. - * - * The async variant is {@see RouteOptimizationClient::batchOptimizeToursAsync()} . - * - * @example samples/V1/RouteOptimizationClient/batch_optimize_tours.php - * - * @param BatchOptimizeToursRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function batchOptimizeTours(BatchOptimizeToursRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('BatchOptimizeTours', $request, $callOptions)->wait(); - } - - /** - * Sends an `OptimizeToursRequest` containing a `ShipmentModel` and returns an - * `OptimizeToursResponse` containing `ShipmentRoute`s, which are a set of - * routes to be performed by vehicles minimizing the overall cost. - * - * A `ShipmentModel` model consists mainly of `Shipment`s that need to be - * carried out and `Vehicle`s that can be used to transport the `Shipment`s. - * The `ShipmentRoute`s assign `Shipment`s to `Vehicle`s. More specifically, - * they assign a series of `Visit`s to each vehicle, where a `Visit` - * corresponds to a `VisitRequest`, which is a pickup or delivery for a - * `Shipment`. - * - * The goal is to provide an assignment of `ShipmentRoute`s to `Vehicle`s that - * minimizes the total cost where cost has many components defined in the - * `ShipmentModel`. - * - * The async variant is {@see RouteOptimizationClient::optimizeToursAsync()} . - * - * @example samples/V1/RouteOptimizationClient/optimize_tours.php - * - * @param OptimizeToursRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OptimizeToursResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function optimizeTours(OptimizeToursRequest $request, array $callOptions = []): OptimizeToursResponse - { - return $this->startApiCall('OptimizeTours', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/MapsRouteOptimization/v1/src/V1/gapic_metadata.json b/owl-bot-staging/MapsRouteOptimization/v1/src/V1/gapic_metadata.json deleted file mode 100644 index 71f5ea3e4f9b..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/src/V1/gapic_metadata.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.maps.routeoptimization.v1", - "libraryPackage": "Google\\Maps\\RouteOptimization\\V1", - "services": { - "RouteOptimization": { - "clients": { - "grpc": { - "libraryClient": "RouteOptimizationGapicClient", - "rpcs": { - "BatchOptimizeTours": { - "methods": [ - "batchOptimizeTours" - ] - }, - "OptimizeTours": { - "methods": [ - "optimizeTours" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/MapsRouteOptimization/v1/src/V1/resources/route_optimization_client_config.json b/owl-bot-staging/MapsRouteOptimization/v1/src/V1/resources/route_optimization_client_config.json deleted file mode 100644 index 0e5122e35b74..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/src/V1/resources/route_optimization_client_config.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "interfaces": { - "google.maps.routeoptimization.v1.RouteOptimization": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE" - ] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "retry_policy_1_params": { - "initial_retry_delay_millis": 1000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 10000, - "initial_rpc_timeout_millis": 3600000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 3600000, - "total_timeout_millis": 3600000 - } - }, - "methods": { - "BatchOptimizeTours": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "OptimizeTours": { - "timeout_millis": 3600000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/MapsRouteOptimization/v1/src/V1/resources/route_optimization_descriptor_config.php b/owl-bot-staging/MapsRouteOptimization/v1/src/V1/resources/route_optimization_descriptor_config.php deleted file mode 100644 index 0e8b84155c48..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/src/V1/resources/route_optimization_descriptor_config.php +++ /dev/null @@ -1,59 +0,0 @@ - [ - 'google.maps.routeoptimization.v1.RouteOptimization' => [ - 'BatchOptimizeTours' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Maps\RouteOptimization\V1\BatchOptimizeToursResponse', - 'metadataReturnType' => '\Google\Maps\RouteOptimization\V1\BatchOptimizeToursMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'OptimizeTours' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Maps\RouteOptimization\V1\OptimizeToursResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - ], - ], -]; diff --git a/owl-bot-staging/MapsRouteOptimization/v1/src/V1/resources/route_optimization_rest_client_config.php b/owl-bot-staging/MapsRouteOptimization/v1/src/V1/resources/route_optimization_rest_client_config.php deleted file mode 100644 index 5087b38b87fd..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/src/V1/resources/route_optimization_rest_client_config.php +++ /dev/null @@ -1,80 +0,0 @@ - [ - 'google.longrunning.Operations' => [ - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.maps.routeoptimization.v1.RouteOptimization' => [ - 'BatchOptimizeTours' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}:batchOptimizeTours', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*}:batchOptimizeTours', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'OptimizeTours' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}:optimizeTours', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*}:optimizeTours', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/MapsRouteOptimization/v1/tests/Unit/V1/Client/RouteOptimizationClientTest.php b/owl-bot-staging/MapsRouteOptimization/v1/tests/Unit/V1/Client/RouteOptimizationClientTest.php deleted file mode 100644 index ce03ba07af40..000000000000 --- a/owl-bot-staging/MapsRouteOptimization/v1/tests/Unit/V1/Client/RouteOptimizationClientTest.php +++ /dev/null @@ -1,327 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return RouteOptimizationClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new RouteOptimizationClient($options); - } - - /** @test */ - public function batchOptimizeToursTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/batchOptimizeToursTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new BatchOptimizeToursResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/batchOptimizeToursTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $parent = 'parent-995424086'; - $modelConfigs = []; - $request = (new BatchOptimizeToursRequest()) - ->setParent($parent) - ->setModelConfigs($modelConfigs); - $response = $gapicClient->batchOptimizeTours($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.maps.routeoptimization.v1.RouteOptimization/BatchOptimizeTours', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); - $actualValue = $actualApiRequestObject->getModelConfigs(); - $this->assertProtobufEquals($modelConfigs, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/batchOptimizeToursTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function batchOptimizeToursExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/batchOptimizeToursTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $parent = 'parent-995424086'; - $modelConfigs = []; - $request = (new BatchOptimizeToursRequest()) - ->setParent($parent) - ->setModelConfigs($modelConfigs); - $response = $gapicClient->batchOptimizeTours($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/batchOptimizeToursTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function optimizeToursTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $requestLabel = 'requestLabel1739091268'; - $expectedResponse = new OptimizeToursResponse(); - $expectedResponse->setRequestLabel($requestLabel); - $transport->addResponse($expectedResponse); - // Mock request - $parent = 'parent-995424086'; - $request = (new OptimizeToursRequest()) - ->setParent($parent); - $response = $gapicClient->optimizeTours($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.maps.routeoptimization.v1.RouteOptimization/OptimizeTours', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function optimizeToursExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $parent = 'parent-995424086'; - $request = (new OptimizeToursRequest()) - ->setParent($parent); - try { - $gapicClient->optimizeTours($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function batchOptimizeToursAsyncTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/batchOptimizeToursTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new BatchOptimizeToursResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/batchOptimizeToursTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $parent = 'parent-995424086'; - $modelConfigs = []; - $request = (new BatchOptimizeToursRequest()) - ->setParent($parent) - ->setModelConfigs($modelConfigs); - $response = $gapicClient->batchOptimizeToursAsync($request)->wait(); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.maps.routeoptimization.v1.RouteOptimization/BatchOptimizeTours', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); - $actualValue = $actualApiRequestObject->getModelConfigs(); - $this->assertProtobufEquals($modelConfigs, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/batchOptimizeToursTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } -} diff --git a/owl-bot-staging/MediaTranslation/v1beta1/proto/src/GPBMetadata/Google/Cloud/Mediatranslation/V1Beta1/MediaTranslation.php b/owl-bot-staging/MediaTranslation/v1beta1/proto/src/GPBMetadata/Google/Cloud/Mediatranslation/V1Beta1/MediaTranslation.php deleted file mode 100644 index bf1b2516f5173a3586e5690536cf20756d4da7e1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2626 zcmbtWO>Y}T7|zATLKG{g?bNi?k?5L)+ol2eW9>wuj)~n?l$BQF_1GS1y}QiL zCbTI04mfk;fCN9I7bJcGXO4&iN8X*;wOz-qA|uKIKHv zKJLB1VnlJs0};4^hkNm0Ksk1UamYN%4UFq2xOLLSR{gkp7oJ8z%w1~YVGs;GT6Vo4 z?w7~3&xqi}k31q+;Fr(#dQ^}-WpHLJhKz)ePsTI~iA!;_U40C`eIkh6l%RGk0kt2` zf!a^^stM=;Las-m2up|VG%ETYVfYKSZ7Mf^wgDcAZ8pXQ2pq8(d9uNX4Ym z$(Pb@8a9Dr16)!ZP4g1TLo9eqXQN}xsff9MAbBSM7nA?&1vRXM%x*C1^{aG5&RD=r zbDGr@WYN>p(6u{Iy*Rr1nED0|^-nd6Jki6o1vwRyK6B6H@AqYJops zL;XXvLE=6O9O}D4pZUXrhPBe$)%;(ToPHO5pjOB6h(CtM8=^8EE;2R5A5&}CVGhUN)i@$5=&N6DJ^xK$5LMH%`v4@f+ zl}`CtSLC-Wf@<5*ioT8BnWQhE(~{!Nqm}CWQ0_@=t_T(XeM3D@X%u@x{{d|a`kk0P zd=8hUl=?T$gOeCG8nv<8=Qz~GKeJCv`k zp&N>L@t+*R%PI+h!@!TI{xMpmoCiEjQ_s?b^)l2+NgAKmpJ%W#*82W+Td6Wv*yqqR zxt0z+gJwG7MMw+D4sGl|%lN$cDgf2R>yqVZsJ*um{4T)Dz{Ri7yK~=R>u+`1mQ_1) ztfyA1>vX?vTh5afe5)Ndj;;FU3S5nCt5tVS8cyf9)%+67-L7?7Y1OPvZU5&SDk#jE zHg_mLV=mQy)4;fdsouDDs&f5yn%BlrqfuNbX`gC4omZ7RmyWSIGjM4m1BAz)6=Nhs z7@6hr`T2PoJ~Ng{EJjLoJPbi>3<5r`{**(z@bGF(t6THBLH>}pwdYUNRAfgl7?+2^ zWoZLUUQ;(S`xN#L=5q^s|7qGUx%*A2Yz(PvjCle^s%&0mes(H>lm?n$3-w-`G!-x|k6oONEH^RC3`0T_E&7y+nQR diff --git a/owl-bot-staging/MediaTranslation/v1beta1/proto/src/Google/Cloud/MediaTranslation/V1beta1/StreamingTranslateSpeechConfig.php b/owl-bot-staging/MediaTranslation/v1beta1/proto/src/Google/Cloud/MediaTranslation/V1beta1/StreamingTranslateSpeechConfig.php deleted file mode 100644 index 410ed6ffea0f..000000000000 --- a/owl-bot-staging/MediaTranslation/v1beta1/proto/src/Google/Cloud/MediaTranslation/V1beta1/StreamingTranslateSpeechConfig.php +++ /dev/null @@ -1,159 +0,0 @@ -google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechConfig - */ -class StreamingTranslateSpeechConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The common config for all the following audio contents. - * - * Generated from protobuf field .google.cloud.mediatranslation.v1beta1.TranslateSpeechConfig audio_config = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $audio_config = null; - /** - * Optional. If `false` or omitted, the system performs - * continuous translation (continuing to wait for and process audio even if - * the user pauses speaking) until the client closes the input stream (gRPC - * API) or until the maximum time limit has been reached. May return multiple - * `StreamingTranslateSpeechResult`s with the `is_final` flag set to `true`. - * If `true`, the speech translator will detect a single spoken utterance. - * When it detects that the user has paused or stopped speaking, it will - * return an `END_OF_SINGLE_UTTERANCE` event and cease translation. - * When the client receives 'END_OF_SINGLE_UTTERANCE' event, the client should - * stop sending the requests. However, clients should keep receiving remaining - * responses until the stream is terminated. To construct the complete - * sentence in a streaming way, one should override (if 'is_final' of previous - * response is false), or append (if 'is_final' of previous response is true). - * - * Generated from protobuf field bool single_utterance = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $single_utterance = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\MediaTranslation\V1beta1\TranslateSpeechConfig $audio_config - * Required. The common config for all the following audio contents. - * @type bool $single_utterance - * Optional. If `false` or omitted, the system performs - * continuous translation (continuing to wait for and process audio even if - * the user pauses speaking) until the client closes the input stream (gRPC - * API) or until the maximum time limit has been reached. May return multiple - * `StreamingTranslateSpeechResult`s with the `is_final` flag set to `true`. - * If `true`, the speech translator will detect a single spoken utterance. - * When it detects that the user has paused or stopped speaking, it will - * return an `END_OF_SINGLE_UTTERANCE` event and cease translation. - * When the client receives 'END_OF_SINGLE_UTTERANCE' event, the client should - * stop sending the requests. However, clients should keep receiving remaining - * responses until the stream is terminated. To construct the complete - * sentence in a streaming way, one should override (if 'is_final' of previous - * response is false), or append (if 'is_final' of previous response is true). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Mediatranslation\V1Beta1\MediaTranslation::initOnce(); - parent::__construct($data); - } - - /** - * Required. The common config for all the following audio contents. - * - * Generated from protobuf field .google.cloud.mediatranslation.v1beta1.TranslateSpeechConfig audio_config = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\MediaTranslation\V1beta1\TranslateSpeechConfig|null - */ - public function getAudioConfig() - { - return $this->audio_config; - } - - public function hasAudioConfig() - { - return isset($this->audio_config); - } - - public function clearAudioConfig() - { - unset($this->audio_config); - } - - /** - * Required. The common config for all the following audio contents. - * - * Generated from protobuf field .google.cloud.mediatranslation.v1beta1.TranslateSpeechConfig audio_config = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\MediaTranslation\V1beta1\TranslateSpeechConfig $var - * @return $this - */ - public function setAudioConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MediaTranslation\V1beta1\TranslateSpeechConfig::class); - $this->audio_config = $var; - - return $this; - } - - /** - * Optional. If `false` or omitted, the system performs - * continuous translation (continuing to wait for and process audio even if - * the user pauses speaking) until the client closes the input stream (gRPC - * API) or until the maximum time limit has been reached. May return multiple - * `StreamingTranslateSpeechResult`s with the `is_final` flag set to `true`. - * If `true`, the speech translator will detect a single spoken utterance. - * When it detects that the user has paused or stopped speaking, it will - * return an `END_OF_SINGLE_UTTERANCE` event and cease translation. - * When the client receives 'END_OF_SINGLE_UTTERANCE' event, the client should - * stop sending the requests. However, clients should keep receiving remaining - * responses until the stream is terminated. To construct the complete - * sentence in a streaming way, one should override (if 'is_final' of previous - * response is false), or append (if 'is_final' of previous response is true). - * - * Generated from protobuf field bool single_utterance = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getSingleUtterance() - { - return $this->single_utterance; - } - - /** - * Optional. If `false` or omitted, the system performs - * continuous translation (continuing to wait for and process audio even if - * the user pauses speaking) until the client closes the input stream (gRPC - * API) or until the maximum time limit has been reached. May return multiple - * `StreamingTranslateSpeechResult`s with the `is_final` flag set to `true`. - * If `true`, the speech translator will detect a single spoken utterance. - * When it detects that the user has paused or stopped speaking, it will - * return an `END_OF_SINGLE_UTTERANCE` event and cease translation. - * When the client receives 'END_OF_SINGLE_UTTERANCE' event, the client should - * stop sending the requests. However, clients should keep receiving remaining - * responses until the stream is terminated. To construct the complete - * sentence in a streaming way, one should override (if 'is_final' of previous - * response is false), or append (if 'is_final' of previous response is true). - * - * Generated from protobuf field bool single_utterance = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setSingleUtterance($var) - { - GPBUtil::checkBool($var); - $this->single_utterance = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MediaTranslation/v1beta1/proto/src/Google/Cloud/MediaTranslation/V1beta1/StreamingTranslateSpeechRequest.php b/owl-bot-staging/MediaTranslation/v1beta1/proto/src/Google/Cloud/MediaTranslation/V1beta1/StreamingTranslateSpeechRequest.php deleted file mode 100644 index 7675f1ceba05..000000000000 --- a/owl-bot-staging/MediaTranslation/v1beta1/proto/src/Google/Cloud/MediaTranslation/V1beta1/StreamingTranslateSpeechRequest.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechRequest - */ -class StreamingTranslateSpeechRequest extends \Google\Protobuf\Internal\Message -{ - protected $streaming_request; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\MediaTranslation\V1beta1\StreamingTranslateSpeechConfig $streaming_config - * Provides information to the recognizer that specifies how to process the - * request. The first `StreamingTranslateSpeechRequest` message must contain - * a `streaming_config` message. - * @type string $audio_content - * The audio data to be translated. Sequential chunks of audio data are sent - * in sequential `StreamingTranslateSpeechRequest` messages. The first - * `StreamingTranslateSpeechRequest` message must not contain - * `audio_content` data and all subsequent `StreamingTranslateSpeechRequest` - * messages must contain `audio_content` data. The audio bytes must be - * encoded as specified in `StreamingTranslateSpeechConfig`. Note: as with - * all bytes fields, protobuffers use a pure binary representation (not - * base64). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Mediatranslation\V1Beta1\MediaTranslation::initOnce(); - parent::__construct($data); - } - - /** - * Provides information to the recognizer that specifies how to process the - * request. The first `StreamingTranslateSpeechRequest` message must contain - * a `streaming_config` message. - * - * Generated from protobuf field .google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechConfig streaming_config = 1; - * @return \Google\Cloud\MediaTranslation\V1beta1\StreamingTranslateSpeechConfig|null - */ - public function getStreamingConfig() - { - return $this->readOneof(1); - } - - public function hasStreamingConfig() - { - return $this->hasOneof(1); - } - - /** - * Provides information to the recognizer that specifies how to process the - * request. The first `StreamingTranslateSpeechRequest` message must contain - * a `streaming_config` message. - * - * Generated from protobuf field .google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechConfig streaming_config = 1; - * @param \Google\Cloud\MediaTranslation\V1beta1\StreamingTranslateSpeechConfig $var - * @return $this - */ - public function setStreamingConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MediaTranslation\V1beta1\StreamingTranslateSpeechConfig::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * The audio data to be translated. Sequential chunks of audio data are sent - * in sequential `StreamingTranslateSpeechRequest` messages. The first - * `StreamingTranslateSpeechRequest` message must not contain - * `audio_content` data and all subsequent `StreamingTranslateSpeechRequest` - * messages must contain `audio_content` data. The audio bytes must be - * encoded as specified in `StreamingTranslateSpeechConfig`. Note: as with - * all bytes fields, protobuffers use a pure binary representation (not - * base64). - * - * Generated from protobuf field bytes audio_content = 2; - * @return string - */ - public function getAudioContent() - { - return $this->readOneof(2); - } - - public function hasAudioContent() - { - return $this->hasOneof(2); - } - - /** - * The audio data to be translated. Sequential chunks of audio data are sent - * in sequential `StreamingTranslateSpeechRequest` messages. The first - * `StreamingTranslateSpeechRequest` message must not contain - * `audio_content` data and all subsequent `StreamingTranslateSpeechRequest` - * messages must contain `audio_content` data. The audio bytes must be - * encoded as specified in `StreamingTranslateSpeechConfig`. Note: as with - * all bytes fields, protobuffers use a pure binary representation (not - * base64). - * - * Generated from protobuf field bytes audio_content = 2; - * @param string $var - * @return $this - */ - public function setAudioContent($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * @return string - */ - public function getStreamingRequest() - { - return $this->whichOneof("streaming_request"); - } - -} - diff --git a/owl-bot-staging/MediaTranslation/v1beta1/proto/src/Google/Cloud/MediaTranslation/V1beta1/StreamingTranslateSpeechResponse.php b/owl-bot-staging/MediaTranslation/v1beta1/proto/src/Google/Cloud/MediaTranslation/V1beta1/StreamingTranslateSpeechResponse.php deleted file mode 100644 index 8760ccf25ab8..000000000000 --- a/owl-bot-staging/MediaTranslation/v1beta1/proto/src/Google/Cloud/MediaTranslation/V1beta1/StreamingTranslateSpeechResponse.php +++ /dev/null @@ -1,164 +0,0 @@ -google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechResponse - */ -class StreamingTranslateSpeechResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. If set, returns a [google.rpc.Status][google.rpc.Status] message that - * specifies the error for the operation. - * - * Generated from protobuf field .google.rpc.Status error = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $error = null; - /** - * Output only. The translation result that is currently being processed (is_final could be - * true or false). - * - * Generated from protobuf field .google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechResult result = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $result = null; - /** - * Output only. Indicates the type of speech event. - * - * Generated from protobuf field .google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechResponse.SpeechEventType speech_event_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $speech_event_type = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Rpc\Status $error - * Output only. If set, returns a [google.rpc.Status][google.rpc.Status] message that - * specifies the error for the operation. - * @type \Google\Cloud\MediaTranslation\V1beta1\StreamingTranslateSpeechResult $result - * Output only. The translation result that is currently being processed (is_final could be - * true or false). - * @type int $speech_event_type - * Output only. Indicates the type of speech event. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Mediatranslation\V1Beta1\MediaTranslation::initOnce(); - parent::__construct($data); - } - - /** - * Output only. If set, returns a [google.rpc.Status][google.rpc.Status] message that - * specifies the error for the operation. - * - * Generated from protobuf field .google.rpc.Status error = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Rpc\Status|null - */ - public function getError() - { - return $this->error; - } - - public function hasError() - { - return isset($this->error); - } - - public function clearError() - { - unset($this->error); - } - - /** - * Output only. If set, returns a [google.rpc.Status][google.rpc.Status] message that - * specifies the error for the operation. - * - * Generated from protobuf field .google.rpc.Status error = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Rpc\Status $var - * @return $this - */ - public function setError($var) - { - GPBUtil::checkMessage($var, \Google\Rpc\Status::class); - $this->error = $var; - - return $this; - } - - /** - * Output only. The translation result that is currently being processed (is_final could be - * true or false). - * - * Generated from protobuf field .google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechResult result = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\MediaTranslation\V1beta1\StreamingTranslateSpeechResult|null - */ - public function getResult() - { - return $this->result; - } - - public function hasResult() - { - return isset($this->result); - } - - public function clearResult() - { - unset($this->result); - } - - /** - * Output only. The translation result that is currently being processed (is_final could be - * true or false). - * - * Generated from protobuf field .google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechResult result = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\MediaTranslation\V1beta1\StreamingTranslateSpeechResult $var - * @return $this - */ - public function setResult($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MediaTranslation\V1beta1\StreamingTranslateSpeechResult::class); - $this->result = $var; - - return $this; - } - - /** - * Output only. Indicates the type of speech event. - * - * Generated from protobuf field .google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechResponse.SpeechEventType speech_event_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getSpeechEventType() - { - return $this->speech_event_type; - } - - /** - * Output only. Indicates the type of speech event. - * - * Generated from protobuf field .google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechResponse.SpeechEventType speech_event_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setSpeechEventType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\MediaTranslation\V1beta1\StreamingTranslateSpeechResponse\SpeechEventType::class); - $this->speech_event_type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MediaTranslation/v1beta1/proto/src/Google/Cloud/MediaTranslation/V1beta1/StreamingTranslateSpeechResponse/SpeechEventType.php b/owl-bot-staging/MediaTranslation/v1beta1/proto/src/Google/Cloud/MediaTranslation/V1beta1/StreamingTranslateSpeechResponse/SpeechEventType.php deleted file mode 100644 index f8dd4b40d7ee..000000000000 --- a/owl-bot-staging/MediaTranslation/v1beta1/proto/src/Google/Cloud/MediaTranslation/V1beta1/StreamingTranslateSpeechResponse/SpeechEventType.php +++ /dev/null @@ -1,66 +0,0 @@ -google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechResponse.SpeechEventType - */ -class SpeechEventType -{ - /** - * No speech event specified. - * - * Generated from protobuf enum SPEECH_EVENT_TYPE_UNSPECIFIED = 0; - */ - const SPEECH_EVENT_TYPE_UNSPECIFIED = 0; - /** - * This event indicates that the server has detected the end of the user's - * speech utterance and expects no additional speech. Therefore, the server - * will not process additional audio (although it may subsequently return - * additional results). When the client receives 'END_OF_SINGLE_UTTERANCE' - * event, the client should stop sending the requests. However, clients - * should keep receiving remaining responses until the stream is terminated. - * To construct the complete sentence in a streaming way, one should - * override (if 'is_final' of previous response is false), or append (if - * 'is_final' of previous response is true). This event is only sent if - * `single_utterance` was set to `true`, and is not used otherwise. - * - * Generated from protobuf enum END_OF_SINGLE_UTTERANCE = 1; - */ - const END_OF_SINGLE_UTTERANCE = 1; - - private static $valueToName = [ - self::SPEECH_EVENT_TYPE_UNSPECIFIED => 'SPEECH_EVENT_TYPE_UNSPECIFIED', - self::END_OF_SINGLE_UTTERANCE => 'END_OF_SINGLE_UTTERANCE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SpeechEventType::class, \Google\Cloud\MediaTranslation\V1beta1\StreamingTranslateSpeechResponse_SpeechEventType::class); - diff --git a/owl-bot-staging/MediaTranslation/v1beta1/proto/src/Google/Cloud/MediaTranslation/V1beta1/StreamingTranslateSpeechResult.php b/owl-bot-staging/MediaTranslation/v1beta1/proto/src/Google/Cloud/MediaTranslation/V1beta1/StreamingTranslateSpeechResult.php deleted file mode 100644 index f70d56afe8af..000000000000 --- a/owl-bot-staging/MediaTranslation/v1beta1/proto/src/Google/Cloud/MediaTranslation/V1beta1/StreamingTranslateSpeechResult.php +++ /dev/null @@ -1,76 +0,0 @@ -google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechResult - */ -class StreamingTranslateSpeechResult extends \Google\Protobuf\Internal\Message -{ - protected $result; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\MediaTranslation\V1beta1\StreamingTranslateSpeechResult\TextTranslationResult $text_translation_result - * Text translation result. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Mediatranslation\V1Beta1\MediaTranslation::initOnce(); - parent::__construct($data); - } - - /** - * Text translation result. - * - * Generated from protobuf field .google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechResult.TextTranslationResult text_translation_result = 1; - * @return \Google\Cloud\MediaTranslation\V1beta1\StreamingTranslateSpeechResult\TextTranslationResult|null - */ - public function getTextTranslationResult() - { - return $this->readOneof(1); - } - - public function hasTextTranslationResult() - { - return $this->hasOneof(1); - } - - /** - * Text translation result. - * - * Generated from protobuf field .google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechResult.TextTranslationResult text_translation_result = 1; - * @param \Google\Cloud\MediaTranslation\V1beta1\StreamingTranslateSpeechResult\TextTranslationResult $var - * @return $this - */ - public function setTextTranslationResult($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MediaTranslation\V1beta1\StreamingTranslateSpeechResult\TextTranslationResult::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * @return string - */ - public function getResult() - { - return $this->whichOneof("result"); - } - -} - diff --git a/owl-bot-staging/MediaTranslation/v1beta1/proto/src/Google/Cloud/MediaTranslation/V1beta1/StreamingTranslateSpeechResult/TextTranslationResult.php b/owl-bot-staging/MediaTranslation/v1beta1/proto/src/Google/Cloud/MediaTranslation/V1beta1/StreamingTranslateSpeechResult/TextTranslationResult.php deleted file mode 100644 index 30b706ff4853..000000000000 --- a/owl-bot-staging/MediaTranslation/v1beta1/proto/src/Google/Cloud/MediaTranslation/V1beta1/StreamingTranslateSpeechResult/TextTranslationResult.php +++ /dev/null @@ -1,124 +0,0 @@ -google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechResult.TextTranslationResult - */ -class TextTranslationResult extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The translated sentence. - * - * Generated from protobuf field string translation = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $translation = ''; - /** - * Output only. If `false`, this `StreamingTranslateSpeechResult` represents - * an interim result that may change. If `true`, this is the final time the - * translation service will return this particular - * `StreamingTranslateSpeechResult`, the streaming translator will not - * return any further hypotheses for this portion of the transcript and - * corresponding audio. - * - * Generated from protobuf field bool is_final = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $is_final = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $translation - * Output only. The translated sentence. - * @type bool $is_final - * Output only. If `false`, this `StreamingTranslateSpeechResult` represents - * an interim result that may change. If `true`, this is the final time the - * translation service will return this particular - * `StreamingTranslateSpeechResult`, the streaming translator will not - * return any further hypotheses for this portion of the transcript and - * corresponding audio. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Mediatranslation\V1Beta1\MediaTranslation::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The translated sentence. - * - * Generated from protobuf field string translation = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getTranslation() - { - return $this->translation; - } - - /** - * Output only. The translated sentence. - * - * Generated from protobuf field string translation = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setTranslation($var) - { - GPBUtil::checkString($var, True); - $this->translation = $var; - - return $this; - } - - /** - * Output only. If `false`, this `StreamingTranslateSpeechResult` represents - * an interim result that may change. If `true`, this is the final time the - * translation service will return this particular - * `StreamingTranslateSpeechResult`, the streaming translator will not - * return any further hypotheses for this portion of the transcript and - * corresponding audio. - * - * Generated from protobuf field bool is_final = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getIsFinal() - { - return $this->is_final; - } - - /** - * Output only. If `false`, this `StreamingTranslateSpeechResult` represents - * an interim result that may change. If `true`, this is the final time the - * translation service will return this particular - * `StreamingTranslateSpeechResult`, the streaming translator will not - * return any further hypotheses for this portion of the transcript and - * corresponding audio. - * - * Generated from protobuf field bool is_final = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setIsFinal($var) - { - GPBUtil::checkBool($var); - $this->is_final = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(TextTranslationResult::class, \Google\Cloud\MediaTranslation\V1beta1\StreamingTranslateSpeechResult_TextTranslationResult::class); - diff --git a/owl-bot-staging/MediaTranslation/v1beta1/proto/src/Google/Cloud/MediaTranslation/V1beta1/TranslateSpeechConfig.php b/owl-bot-staging/MediaTranslation/v1beta1/proto/src/Google/Cloud/MediaTranslation/V1beta1/TranslateSpeechConfig.php deleted file mode 100644 index 7ff6b9c28d56..000000000000 --- a/owl-bot-staging/MediaTranslation/v1beta1/proto/src/Google/Cloud/MediaTranslation/V1beta1/TranslateSpeechConfig.php +++ /dev/null @@ -1,308 +0,0 @@ -google.cloud.mediatranslation.v1beta1.TranslateSpeechConfig - */ -class TranslateSpeechConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Encoding of audio data. - * Supported formats: - * - `linear16` - * Uncompressed 16-bit signed little-endian samples (Linear PCM). - * - `flac` - * `flac` (Free Lossless Audio Codec) is the recommended encoding - * because it is lossless--therefore recognition is not compromised--and - * requires only about half the bandwidth of `linear16`. - * - `mulaw` - * 8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law. - * - `amr` - * Adaptive Multi-Rate Narrowband codec. `sample_rate_hertz` must be 8000. - * - `amr-wb` - * Adaptive Multi-Rate Wideband codec. `sample_rate_hertz` must be 16000. - * - `ogg-opus` - * Opus encoded audio frames in [Ogg](https://wikipedia.org/wiki/Ogg) - * container. `sample_rate_hertz` must be one of 8000, 12000, 16000, 24000, - * or 48000. - * - `mp3` - * MP3 audio. Support all standard MP3 bitrates (which range from 32-320 - * kbps). When using this encoding, `sample_rate_hertz` has to match the - * sample rate of the file being used. - * - * Generated from protobuf field string audio_encoding = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $audio_encoding = ''; - /** - * Required. Source language code (BCP-47) of the input audio. - * - * Generated from protobuf field string source_language_code = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $source_language_code = ''; - /** - * Required. Target language code (BCP-47) of the output. - * - * Generated from protobuf field string target_language_code = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $target_language_code = ''; - /** - * Optional. Sample rate in Hertz of the audio data. Valid values are: - * 8000-48000. 16000 is optimal. For best results, set the sampling rate of - * the audio source to 16000 Hz. If that's not possible, use the native sample - * rate of the audio source (instead of re-sampling). - * - * Generated from protobuf field int32 sample_rate_hertz = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $sample_rate_hertz = 0; - /** - * Optional. `google-provided-model/video` and - * `google-provided-model/enhanced-phone-call` are premium models. - * `google-provided-model/phone-call` is not premium model. - * - * Generated from protobuf field string model = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $model = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $audio_encoding - * Required. Encoding of audio data. - * Supported formats: - * - `linear16` - * Uncompressed 16-bit signed little-endian samples (Linear PCM). - * - `flac` - * `flac` (Free Lossless Audio Codec) is the recommended encoding - * because it is lossless--therefore recognition is not compromised--and - * requires only about half the bandwidth of `linear16`. - * - `mulaw` - * 8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law. - * - `amr` - * Adaptive Multi-Rate Narrowband codec. `sample_rate_hertz` must be 8000. - * - `amr-wb` - * Adaptive Multi-Rate Wideband codec. `sample_rate_hertz` must be 16000. - * - `ogg-opus` - * Opus encoded audio frames in [Ogg](https://wikipedia.org/wiki/Ogg) - * container. `sample_rate_hertz` must be one of 8000, 12000, 16000, 24000, - * or 48000. - * - `mp3` - * MP3 audio. Support all standard MP3 bitrates (which range from 32-320 - * kbps). When using this encoding, `sample_rate_hertz` has to match the - * sample rate of the file being used. - * @type string $source_language_code - * Required. Source language code (BCP-47) of the input audio. - * @type string $target_language_code - * Required. Target language code (BCP-47) of the output. - * @type int $sample_rate_hertz - * Optional. Sample rate in Hertz of the audio data. Valid values are: - * 8000-48000. 16000 is optimal. For best results, set the sampling rate of - * the audio source to 16000 Hz. If that's not possible, use the native sample - * rate of the audio source (instead of re-sampling). - * @type string $model - * Optional. `google-provided-model/video` and - * `google-provided-model/enhanced-phone-call` are premium models. - * `google-provided-model/phone-call` is not premium model. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Mediatranslation\V1Beta1\MediaTranslation::initOnce(); - parent::__construct($data); - } - - /** - * Required. Encoding of audio data. - * Supported formats: - * - `linear16` - * Uncompressed 16-bit signed little-endian samples (Linear PCM). - * - `flac` - * `flac` (Free Lossless Audio Codec) is the recommended encoding - * because it is lossless--therefore recognition is not compromised--and - * requires only about half the bandwidth of `linear16`. - * - `mulaw` - * 8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law. - * - `amr` - * Adaptive Multi-Rate Narrowband codec. `sample_rate_hertz` must be 8000. - * - `amr-wb` - * Adaptive Multi-Rate Wideband codec. `sample_rate_hertz` must be 16000. - * - `ogg-opus` - * Opus encoded audio frames in [Ogg](https://wikipedia.org/wiki/Ogg) - * container. `sample_rate_hertz` must be one of 8000, 12000, 16000, 24000, - * or 48000. - * - `mp3` - * MP3 audio. Support all standard MP3 bitrates (which range from 32-320 - * kbps). When using this encoding, `sample_rate_hertz` has to match the - * sample rate of the file being used. - * - * Generated from protobuf field string audio_encoding = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getAudioEncoding() - { - return $this->audio_encoding; - } - - /** - * Required. Encoding of audio data. - * Supported formats: - * - `linear16` - * Uncompressed 16-bit signed little-endian samples (Linear PCM). - * - `flac` - * `flac` (Free Lossless Audio Codec) is the recommended encoding - * because it is lossless--therefore recognition is not compromised--and - * requires only about half the bandwidth of `linear16`. - * - `mulaw` - * 8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law. - * - `amr` - * Adaptive Multi-Rate Narrowband codec. `sample_rate_hertz` must be 8000. - * - `amr-wb` - * Adaptive Multi-Rate Wideband codec. `sample_rate_hertz` must be 16000. - * - `ogg-opus` - * Opus encoded audio frames in [Ogg](https://wikipedia.org/wiki/Ogg) - * container. `sample_rate_hertz` must be one of 8000, 12000, 16000, 24000, - * or 48000. - * - `mp3` - * MP3 audio. Support all standard MP3 bitrates (which range from 32-320 - * kbps). When using this encoding, `sample_rate_hertz` has to match the - * sample rate of the file being used. - * - * Generated from protobuf field string audio_encoding = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setAudioEncoding($var) - { - GPBUtil::checkString($var, True); - $this->audio_encoding = $var; - - return $this; - } - - /** - * Required. Source language code (BCP-47) of the input audio. - * - * Generated from protobuf field string source_language_code = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getSourceLanguageCode() - { - return $this->source_language_code; - } - - /** - * Required. Source language code (BCP-47) of the input audio. - * - * Generated from protobuf field string source_language_code = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setSourceLanguageCode($var) - { - GPBUtil::checkString($var, True); - $this->source_language_code = $var; - - return $this; - } - - /** - * Required. Target language code (BCP-47) of the output. - * - * Generated from protobuf field string target_language_code = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getTargetLanguageCode() - { - return $this->target_language_code; - } - - /** - * Required. Target language code (BCP-47) of the output. - * - * Generated from protobuf field string target_language_code = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setTargetLanguageCode($var) - { - GPBUtil::checkString($var, True); - $this->target_language_code = $var; - - return $this; - } - - /** - * Optional. Sample rate in Hertz of the audio data. Valid values are: - * 8000-48000. 16000 is optimal. For best results, set the sampling rate of - * the audio source to 16000 Hz. If that's not possible, use the native sample - * rate of the audio source (instead of re-sampling). - * - * Generated from protobuf field int32 sample_rate_hertz = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getSampleRateHertz() - { - return $this->sample_rate_hertz; - } - - /** - * Optional. Sample rate in Hertz of the audio data. Valid values are: - * 8000-48000. 16000 is optimal. For best results, set the sampling rate of - * the audio source to 16000 Hz. If that's not possible, use the native sample - * rate of the audio source (instead of re-sampling). - * - * Generated from protobuf field int32 sample_rate_hertz = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setSampleRateHertz($var) - { - GPBUtil::checkInt32($var); - $this->sample_rate_hertz = $var; - - return $this; - } - - /** - * Optional. `google-provided-model/video` and - * `google-provided-model/enhanced-phone-call` are premium models. - * `google-provided-model/phone-call` is not premium model. - * - * Generated from protobuf field string model = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getModel() - { - return $this->model; - } - - /** - * Optional. `google-provided-model/video` and - * `google-provided-model/enhanced-phone-call` are premium models. - * `google-provided-model/phone-call` is not premium model. - * - * Generated from protobuf field string model = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setModel($var) - { - GPBUtil::checkString($var, True); - $this->model = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MediaTranslation/v1beta1/samples/V1beta1/SpeechTranslationServiceClient/streaming_translate_speech.php b/owl-bot-staging/MediaTranslation/v1beta1/samples/V1beta1/SpeechTranslationServiceClient/streaming_translate_speech.php deleted file mode 100644 index 16ba4b85793d..000000000000 --- a/owl-bot-staging/MediaTranslation/v1beta1/samples/V1beta1/SpeechTranslationServiceClient/streaming_translate_speech.php +++ /dev/null @@ -1,64 +0,0 @@ -streamingTranslateSpeech(); - $stream->writeAll([$request,]); - - /** @var StreamingTranslateSpeechResponse $element */ - foreach ($stream->closeWriteAndReadAll() as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END mediatranslation_v1beta1_generated_SpeechTranslationService_StreamingTranslateSpeech_sync] diff --git a/owl-bot-staging/MediaTranslation/v1beta1/src/V1beta1/Client/SpeechTranslationServiceClient.php b/owl-bot-staging/MediaTranslation/v1beta1/src/V1beta1/Client/SpeechTranslationServiceClient.php deleted file mode 100644 index 23048f622246..000000000000 --- a/owl-bot-staging/MediaTranslation/v1beta1/src/V1beta1/Client/SpeechTranslationServiceClient.php +++ /dev/null @@ -1,181 +0,0 @@ - self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/speech_translation_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/speech_translation_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/speech_translation_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/speech_translation_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'mediatranslation.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * } - * - * @throws ValidationException - * - * @experimental - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** - * Performs bidirectional streaming speech translation: receive results while - * sending audio. This method is only available via the gRPC API (not REST). - * - * @example samples/V1beta1/SpeechTranslationServiceClient/streaming_translate_speech.php - * - * @param array $callOptions { - * Optional. - * - * @type int $timeoutMillis - * Timeout to use for this call. - * } - * - * @return BidiStream - * - * @throws ApiException Thrown if the API call fails. - * - * @experimental - */ - public function streamingTranslateSpeech(array $callOptions = []): BidiStream - { - return $this->startApiCall('StreamingTranslateSpeech', null, $callOptions); - } -} diff --git a/owl-bot-staging/MediaTranslation/v1beta1/src/V1beta1/Gapic/SpeechTranslationServiceGapicClient.php b/owl-bot-staging/MediaTranslation/v1beta1/src/V1beta1/Gapic/SpeechTranslationServiceGapicClient.php deleted file mode 100644 index 39ead91cf776..000000000000 --- a/owl-bot-staging/MediaTranslation/v1beta1/src/V1beta1/Gapic/SpeechTranslationServiceGapicClient.php +++ /dev/null @@ -1,258 +0,0 @@ -streamingTranslateSpeech(); - * $stream->writeAll($requests); - * foreach ($stream->closeWriteAndReadAll() as $element) { - * // doSomethingWith($element); - * } - * // Alternatively: - * // Write requests individually, making read() calls if - * // required. Call closeWrite() once writes are complete, and read the - * // remaining responses from the server. - * $requests = [ - * $request, - * ]; - * $stream = $speechTranslationServiceClient->streamingTranslateSpeech(); - * foreach ($requests as $request) { - * $stream->write($request); - * // if required, read a single response from the stream - * $element = $stream->read(); - * // doSomethingWith($element) - * } - * $stream->closeWrite(); - * $element = $stream->read(); - * while (!is_null($element)) { - * // doSomethingWith($element) - * $element = $stream->read(); - * } - * } finally { - * $speechTranslationServiceClient->close(); - * } - * ``` - * - * @experimental - * - * @deprecated Please use the new service client {@see \Google\Cloud\MediaTranslation\V1beta1\Client\SpeechTranslationServiceClient}. - */ -class SpeechTranslationServiceGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.cloud.mediatranslation.v1beta1.SpeechTranslationService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - const SERVICE_ADDRESS = 'mediatranslation.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'mediatranslation.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/speech_translation_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/speech_translation_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/speech_translation_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/speech_translation_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'mediatranslation.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - * - * @experimental - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** - * Performs bidirectional streaming speech translation: receive results while - * sending audio. This method is only available via the gRPC API (not REST). - * - * Sample code: - * ``` - * $speechTranslationServiceClient = new SpeechTranslationServiceClient(); - * try { - * $request = new StreamingTranslateSpeechRequest(); - * // Write all requests to the server, then read all responses until the - * // stream is complete - * $requests = [ - * $request, - * ]; - * $stream = $speechTranslationServiceClient->streamingTranslateSpeech(); - * $stream->writeAll($requests); - * foreach ($stream->closeWriteAndReadAll() as $element) { - * // doSomethingWith($element); - * } - * // Alternatively: - * // Write requests individually, making read() calls if - * // required. Call closeWrite() once writes are complete, and read the - * // remaining responses from the server. - * $requests = [ - * $request, - * ]; - * $stream = $speechTranslationServiceClient->streamingTranslateSpeech(); - * foreach ($requests as $request) { - * $stream->write($request); - * // if required, read a single response from the stream - * $element = $stream->read(); - * // doSomethingWith($element) - * } - * $stream->closeWrite(); - * $element = $stream->read(); - * while (!is_null($element)) { - * // doSomethingWith($element) - * $element = $stream->read(); - * } - * } finally { - * $speechTranslationServiceClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type int $timeoutMillis - * Timeout to use for this call. - * } - * - * @return \Google\ApiCore\BidiStream - * - * @throws ApiException if the remote call fails - * - * @experimental - */ - public function streamingTranslateSpeech(array $optionalArgs = []) - { - return $this->startCall('StreamingTranslateSpeech', StreamingTranslateSpeechResponse::class, $optionalArgs, null, Call::BIDI_STREAMING_CALL); - } -} diff --git a/owl-bot-staging/MediaTranslation/v1beta1/src/V1beta1/SpeechTranslationServiceClient.php b/owl-bot-staging/MediaTranslation/v1beta1/src/V1beta1/SpeechTranslationServiceClient.php deleted file mode 100644 index f6074ee325aa..000000000000 --- a/owl-bot-staging/MediaTranslation/v1beta1/src/V1beta1/SpeechTranslationServiceClient.php +++ /dev/null @@ -1,36 +0,0 @@ - [ - 'google.cloud.mediatranslation.v1beta1.SpeechTranslationService' => [ - 'StreamingTranslateSpeech' => [ - 'grpcStreaming' => [ - 'grpcStreamingType' => 'BidiStreaming', - ], - 'callType' => \Google\ApiCore\Call::BIDI_STREAMING_CALL, - 'responseType' => 'Google\Cloud\MediaTranslation\V1beta1\StreamingTranslateSpeechResponse', - ], - ], - ], -]; diff --git a/owl-bot-staging/MediaTranslation/v1beta1/src/V1beta1/resources/speech_translation_service_rest_client_config.php b/owl-bot-staging/MediaTranslation/v1beta1/src/V1beta1/resources/speech_translation_service_rest_client_config.php deleted file mode 100644 index b33f57959be3..000000000000 --- a/owl-bot-staging/MediaTranslation/v1beta1/src/V1beta1/resources/speech_translation_service_rest_client_config.php +++ /dev/null @@ -1,26 +0,0 @@ - [], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/MediaTranslation/v1beta1/tests/Unit/V1beta1/Client/SpeechTranslationServiceClientTest.php b/owl-bot-staging/MediaTranslation/v1beta1/tests/Unit/V1beta1/Client/SpeechTranslationServiceClientTest.php deleted file mode 100644 index 28e620cf269b..000000000000 --- a/owl-bot-staging/MediaTranslation/v1beta1/tests/Unit/V1beta1/Client/SpeechTranslationServiceClientTest.php +++ /dev/null @@ -1,151 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return SpeechTranslationServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new SpeechTranslationServiceClient($options); - } - - /** @test */ - public function streamingTranslateSpeechTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new StreamingTranslateSpeechResponse(); - $transport->addResponse($expectedResponse); - $expectedResponse2 = new StreamingTranslateSpeechResponse(); - $transport->addResponse($expectedResponse2); - $expectedResponse3 = new StreamingTranslateSpeechResponse(); - $transport->addResponse($expectedResponse3); - // Mock request - $request = new StreamingTranslateSpeechRequest(); - $request2 = new StreamingTranslateSpeechRequest(); - $request3 = new StreamingTranslateSpeechRequest(); - $bidi = $gapicClient->streamingTranslateSpeech(); - $this->assertInstanceOf(BidiStream::class, $bidi); - $bidi->write($request); - $responses = []; - $responses[] = $bidi->read(); - $bidi->writeAll([ - $request2, - $request3, - ]); - foreach ($bidi->closeWriteAndReadAll() as $response) { - $responses[] = $response; - } - - $expectedResponses = []; - $expectedResponses[] = $expectedResponse; - $expectedResponses[] = $expectedResponse2; - $expectedResponses[] = $expectedResponse3; - $this->assertEquals($expectedResponses, $responses); - $createStreamRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($createStreamRequests)); - $streamFuncCall = $createStreamRequests[0]->getFuncCall(); - $streamRequestObject = $createStreamRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.mediatranslation.v1beta1.SpeechTranslationService/StreamingTranslateSpeech', $streamFuncCall); - $this->assertNull($streamRequestObject); - $callObjects = $transport->popCallObjects(); - $this->assertSame(1, count($callObjects)); - $bidiCall = $callObjects[0]; - $writeRequests = $bidiCall->popReceivedCalls(); - $expectedRequests = []; - $expectedRequests[] = $request; - $expectedRequests[] = $request2; - $expectedRequests[] = $request3; - $this->assertEquals($expectedRequests, $writeRequests); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function streamingTranslateSpeechExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->setStreamingStatus($status); - $this->assertTrue($transport->isExhausted()); - $bidi = $gapicClient->streamingTranslateSpeech(); - $results = $bidi->closeWriteAndReadAll(); - try { - iterator_to_array($results); - // If the close stream method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/MediaTranslation/v1beta1/tests/Unit/V1beta1/SpeechTranslationServiceClientTest.php b/owl-bot-staging/MediaTranslation/v1beta1/tests/Unit/V1beta1/SpeechTranslationServiceClientTest.php deleted file mode 100644 index e6d617f07091..000000000000 --- a/owl-bot-staging/MediaTranslation/v1beta1/tests/Unit/V1beta1/SpeechTranslationServiceClientTest.php +++ /dev/null @@ -1,151 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return SpeechTranslationServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new SpeechTranslationServiceClient($options); - } - - /** @test */ - public function streamingTranslateSpeechTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new StreamingTranslateSpeechResponse(); - $transport->addResponse($expectedResponse); - $expectedResponse2 = new StreamingTranslateSpeechResponse(); - $transport->addResponse($expectedResponse2); - $expectedResponse3 = new StreamingTranslateSpeechResponse(); - $transport->addResponse($expectedResponse3); - // Mock request - $request = new StreamingTranslateSpeechRequest(); - $request2 = new StreamingTranslateSpeechRequest(); - $request3 = new StreamingTranslateSpeechRequest(); - $bidi = $gapicClient->streamingTranslateSpeech(); - $this->assertInstanceOf(BidiStream::class, $bidi); - $bidi->write($request); - $responses = []; - $responses[] = $bidi->read(); - $bidi->writeAll([ - $request2, - $request3, - ]); - foreach ($bidi->closeWriteAndReadAll() as $response) { - $responses[] = $response; - } - - $expectedResponses = []; - $expectedResponses[] = $expectedResponse; - $expectedResponses[] = $expectedResponse2; - $expectedResponses[] = $expectedResponse3; - $this->assertEquals($expectedResponses, $responses); - $createStreamRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($createStreamRequests)); - $streamFuncCall = $createStreamRequests[0]->getFuncCall(); - $streamRequestObject = $createStreamRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.mediatranslation.v1beta1.SpeechTranslationService/StreamingTranslateSpeech', $streamFuncCall); - $this->assertNull($streamRequestObject); - $callObjects = $transport->popCallObjects(); - $this->assertSame(1, count($callObjects)); - $bidiCall = $callObjects[0]; - $writeRequests = $bidiCall->popReceivedCalls(); - $expectedRequests = []; - $expectedRequests[] = $request; - $expectedRequests[] = $request2; - $expectedRequests[] = $request3; - $this->assertEquals($expectedRequests, $writeRequests); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function streamingTranslateSpeechExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->setStreamingStatus($status); - $this->assertTrue($transport->isExhausted()); - $bidi = $gapicClient->streamingTranslateSpeech(); - $results = $bidi->closeWriteAndReadAll(); - try { - iterator_to_array($results); - // If the close stream method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Memcache/v1/proto/src/GPBMetadata/Google/Cloud/Memcache/V1/CloudMemcache.php b/owl-bot-staging/Memcache/v1/proto/src/GPBMetadata/Google/Cloud/Memcache/V1/CloudMemcache.php deleted file mode 100644 index b978df5fc7fe5c2b8af27fc93d70110acf0ca62e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8216 zcmcIpO>i4o5k``o*sa)BUgAV?vg}0JB93vSwU%TPqmgVma+dhw(Y)?{ z{l5NxbN2&x$Av4(ieVd`9vCfUtE&V%hT?io;4~de+3K|0hNm>0UDvb>FRLh}nzB}_ zE9Fw9ei>PPr{gt^g0k&6+m?}QT27~x+ckEZdUMCfJzwH)H2EgWBm>y`uHn0S(@<8{ zm#apgxAZ`7tS}*sA{El83L%Y0OLqX8mhSrsTagR!0u=mnJ6o37RQx~>@ZUS8ubH+P zn7UBDGqlm>?dFiX9l9 zty_(f;Ws_g4IFPBNehK-BM6bCZ|1LwZK*i3t;};B3xxwp-ctgvV?=jX6we4co_&Yu zO$F?SPmMz`Q(d#6+O|VcaBRO&=$)x2Vi;r5G7UR89?t{Quv*K;j{e+qyyLNM7{Y5t zR&v#`x4n*SoA!32=2Blh-XTNVl{%bvbcI7!cHpY+KYI<{x{2-{=)3Ody!EbYG)j8c zY3~`vG4^D9bU&xv(z}Q6$6WjReN#BH+G>S<`vAjyKJ+x|cUR$;@5A+D#WzWF@+?aS z*)aH@FU_47f^^r!)Ii;ir-Zq;BMWWnTiTXzERQG*DS$2)Q~gmO{ZbJsQ_t7^juRNY601=H)I2qOa!#o0OjK znSt5x!0nD@h2RsE#@sJKs&LvA-if8$_w{YW~z}))@;~hqF;ZJ~kz-j%B3JF;Pdj zX++efU}A91sQ^9CCFfwW>2^d^(0CP5aglkEgU9nRwzS=?G>urkIQK~$#;6R8>XX#P zG_%!<^#l!n8hMOE;IB#xCs4}t$l;ZZm>H$+IDWvRn_C`VxsDfLgbURY1Mx${JefaM z{A4y^ob5_x;q+!*t(UcjYn$ukV&y@lTuOa`oPvqsMp>;_)>cw6G701Oqx2*drwgU> zYMCu0=&y(CB~CUr_p2Dp3_4L6#+nEoLvA|%{&265jG^}nH_R5P4QAk^@MsQr=01$E zg|m<<)=GowD{$#)ZLO@8Dx39<%JRc{rM8AATvk`rwIUucHg_G8(HxtE#51GI?MpDJ zKG&^|ux%lJE0%FS2VNmU46hKqF-+{|*2^0YY8zFAS*xm*wR(AtDwrBCH2232DD4aVux32Q$8kznhFd;ork?TrG@EyS;Bg-svf0Gwzo(-b8fUHnCfjo+XL#IN1i-m!*stSETR`T%A3Ux%cX~_ zWv%{XeK1u`!DOXc#X%jDFs9lIFuPX%dRdgKC;7Qei4J& zBI^{TI#S~2KspUci34pe*kQQq-HyZt_qq`P;)&yXsOdx2oepY>d0n)vbXsDLahNxU z6ZAnJ3=5n5K}}xQ3LQA7x~|pj4Fb{%uPKqB*NWcGNBrpsh3>D@Jv802 zSj10c{)9z?L;C;Qc)%DO*@Ibmz!?356ZeecHGV&h0g>Za?=;w7#rxaa4_N}ycjeG} zYj}Vj6qjX^eKx+*PAl@0ysFds5B4PC<&nH|930f%T-`eZC$O^P9U-&5XzZ~C$02Ad z+Lg~?alq-U<70IUbkpKFkA_TwyalNyoro;WP>W_Ic90KinpRQnIR)@RVK`Fv~D)=Dq=E4q59r(~W3DoXme| z_`X!S)SNZW({L*KZlMe_(qH6l05+<&QxD*N$Y|M7!(j$Ef#=`UPXc<+Us z`9h>4Ux;+#vmMrsr}B9bFyQr!{KaOUnym0eQx=|``ohG-WV6BhQ#_v0|#U-ZZk z81++1E#H!$MsEGGVSHykiG8Zp;PNXk#K^)>l2DlRyO-)kZh}QwUBd?~vkZ#cnd6zN z5Vor1hX_i4eLV`4e##L+`OO;vnR~}`0><9&1AmCaY;Qu0OvU8paD)zJ7!jw>-Uv?fGF2?%2hiS-jHC0S z())=sGXrilv(lGeMkzjpp4FohkSl!l>9UCKI{Yh500IPO8@`> diff --git a/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/ApplyParametersRequest.php b/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/ApplyParametersRequest.php deleted file mode 100644 index e950bb56548d..000000000000 --- a/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/ApplyParametersRequest.php +++ /dev/null @@ -1,168 +0,0 @@ -google.cloud.memcache.v1.ApplyParametersRequest - */ -class ApplyParametersRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource name of the Memcached instance for which parameter group updates - * should be applied. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Nodes to which the instance-level parameter group is applied. - * - * Generated from protobuf field repeated string node_ids = 2; - */ - private $node_ids; - /** - * Whether to apply instance-level parameter group to all nodes. If set to - * true, users are restricted from specifying individual nodes, and - * `ApplyParameters` updates all nodes within the instance. - * - * Generated from protobuf field bool apply_all = 3; - */ - protected $apply_all = false; - - /** - * @param string $name Required. Resource name of the Memcached instance for which parameter group updates - * should be applied. Please see - * {@see CloudMemcacheClient::instanceName()} for help formatting this field. - * @param string[] $nodeIds Nodes to which the instance-level parameter group is applied. - * @param bool $applyAll Whether to apply instance-level parameter group to all nodes. If set to - * true, users are restricted from specifying individual nodes, and - * `ApplyParameters` updates all nodes within the instance. - * - * @return \Google\Cloud\Memcache\V1\ApplyParametersRequest - * - * @experimental - */ - public static function build(string $name, array $nodeIds, bool $applyAll): self - { - return (new self()) - ->setName($name) - ->setNodeIds($nodeIds) - ->setApplyAll($applyAll); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Resource name of the Memcached instance for which parameter group updates - * should be applied. - * @type array|\Google\Protobuf\Internal\RepeatedField $node_ids - * Nodes to which the instance-level parameter group is applied. - * @type bool $apply_all - * Whether to apply instance-level parameter group to all nodes. If set to - * true, users are restricted from specifying individual nodes, and - * `ApplyParameters` updates all nodes within the instance. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Memcache\V1\CloudMemcache::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource name of the Memcached instance for which parameter group updates - * should be applied. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Resource name of the Memcached instance for which parameter group updates - * should be applied. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Nodes to which the instance-level parameter group is applied. - * - * Generated from protobuf field repeated string node_ids = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNodeIds() - { - return $this->node_ids; - } - - /** - * Nodes to which the instance-level parameter group is applied. - * - * Generated from protobuf field repeated string node_ids = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNodeIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->node_ids = $arr; - - return $this; - } - - /** - * Whether to apply instance-level parameter group to all nodes. If set to - * true, users are restricted from specifying individual nodes, and - * `ApplyParameters` updates all nodes within the instance. - * - * Generated from protobuf field bool apply_all = 3; - * @return bool - */ - public function getApplyAll() - { - return $this->apply_all; - } - - /** - * Whether to apply instance-level parameter group to all nodes. If set to - * true, users are restricted from specifying individual nodes, and - * `ApplyParameters` updates all nodes within the instance. - * - * Generated from protobuf field bool apply_all = 3; - * @param bool $var - * @return $this - */ - public function setApplyAll($var) - { - GPBUtil::checkBool($var); - $this->apply_all = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/CreateInstanceRequest.php b/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/CreateInstanceRequest.php deleted file mode 100644 index 0557bc075057..000000000000 --- a/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/CreateInstanceRequest.php +++ /dev/null @@ -1,210 +0,0 @@ -google.cloud.memcache.v1.CreateInstanceRequest - */ -class CreateInstanceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the instance location using the form: - * `projects/{project_id}/locations/{location_id}` - * where `location_id` refers to a GCP region - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The logical name of the Memcached instance in the user - * project with the following restrictions: - * * Must contain only lowercase letters, numbers, and hyphens. - * * Must start with a letter. - * * Must be between 1-40 characters. - * * Must end with a number or a letter. - * * Must be unique within the user project / location. - * If any of the above are not met, the API raises an invalid argument error. - * - * Generated from protobuf field string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $instance_id = ''; - /** - * Required. A Memcached Instance - * - * Generated from protobuf field .google.cloud.memcache.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $instance = null; - - /** - * @param string $parent Required. The resource name of the instance location using the form: - * `projects/{project_id}/locations/{location_id}` - * where `location_id` refers to a GCP region - * Please see {@see CloudMemcacheClient::locationName()} for help formatting this field. - * @param \Google\Cloud\Memcache\V1\Instance $instance Required. A Memcached Instance - * @param string $instanceId Required. The logical name of the Memcached instance in the user - * project with the following restrictions: - * - * * Must contain only lowercase letters, numbers, and hyphens. - * * Must start with a letter. - * * Must be between 1-40 characters. - * * Must end with a number or a letter. - * * Must be unique within the user project / location. - * - * If any of the above are not met, the API raises an invalid argument error. - * - * @return \Google\Cloud\Memcache\V1\CreateInstanceRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Memcache\V1\Instance $instance, string $instanceId): self - { - return (new self()) - ->setParent($parent) - ->setInstance($instance) - ->setInstanceId($instanceId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the instance location using the form: - * `projects/{project_id}/locations/{location_id}` - * where `location_id` refers to a GCP region - * @type string $instance_id - * Required. The logical name of the Memcached instance in the user - * project with the following restrictions: - * * Must contain only lowercase letters, numbers, and hyphens. - * * Must start with a letter. - * * Must be between 1-40 characters. - * * Must end with a number or a letter. - * * Must be unique within the user project / location. - * If any of the above are not met, the API raises an invalid argument error. - * @type \Google\Cloud\Memcache\V1\Instance $instance - * Required. A Memcached Instance - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Memcache\V1\CloudMemcache::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the instance location using the form: - * `projects/{project_id}/locations/{location_id}` - * where `location_id` refers to a GCP region - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The resource name of the instance location using the form: - * `projects/{project_id}/locations/{location_id}` - * where `location_id` refers to a GCP region - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The logical name of the Memcached instance in the user - * project with the following restrictions: - * * Must contain only lowercase letters, numbers, and hyphens. - * * Must start with a letter. - * * Must be between 1-40 characters. - * * Must end with a number or a letter. - * * Must be unique within the user project / location. - * If any of the above are not met, the API raises an invalid argument error. - * - * Generated from protobuf field string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getInstanceId() - { - return $this->instance_id; - } - - /** - * Required. The logical name of the Memcached instance in the user - * project with the following restrictions: - * * Must contain only lowercase letters, numbers, and hyphens. - * * Must start with a letter. - * * Must be between 1-40 characters. - * * Must end with a number or a letter. - * * Must be unique within the user project / location. - * If any of the above are not met, the API raises an invalid argument error. - * - * Generated from protobuf field string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setInstanceId($var) - { - GPBUtil::checkString($var, True); - $this->instance_id = $var; - - return $this; - } - - /** - * Required. A Memcached Instance - * - * Generated from protobuf field .google.cloud.memcache.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Memcache\V1\Instance|null - */ - public function getInstance() - { - return $this->instance; - } - - public function hasInstance() - { - return isset($this->instance); - } - - public function clearInstance() - { - unset($this->instance); - } - - /** - * Required. A Memcached Instance - * - * Generated from protobuf field .google.cloud.memcache.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Memcache\V1\Instance $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Memcache\V1\Instance::class); - $this->instance = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/DeleteInstanceRequest.php b/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/DeleteInstanceRequest.php deleted file mode 100644 index b72fed64dd51..000000000000 --- a/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/DeleteInstanceRequest.php +++ /dev/null @@ -1,91 +0,0 @@ -google.cloud.memcache.v1.DeleteInstanceRequest - */ -class DeleteInstanceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Memcached instance resource name in the format: - * `projects/{project_id}/locations/{location_id}/instances/{instance_id}` - * where `location_id` refers to a GCP region - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Memcached instance resource name in the format: - * `projects/{project_id}/locations/{location_id}/instances/{instance_id}` - * where `location_id` refers to a GCP region - * Please see {@see CloudMemcacheClient::instanceName()} for help formatting this field. - * - * @return \Google\Cloud\Memcache\V1\DeleteInstanceRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Memcached instance resource name in the format: - * `projects/{project_id}/locations/{location_id}/instances/{instance_id}` - * where `location_id` refers to a GCP region - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Memcache\V1\CloudMemcache::initOnce(); - parent::__construct($data); - } - - /** - * Required. Memcached instance resource name in the format: - * `projects/{project_id}/locations/{location_id}/instances/{instance_id}` - * where `location_id` refers to a GCP region - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Memcached instance resource name in the format: - * `projects/{project_id}/locations/{location_id}/instances/{instance_id}` - * where `location_id` refers to a GCP region - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/GetInstanceRequest.php b/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/GetInstanceRequest.php deleted file mode 100644 index 68579a961bf6..000000000000 --- a/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/GetInstanceRequest.php +++ /dev/null @@ -1,91 +0,0 @@ -google.cloud.memcache.v1.GetInstanceRequest - */ -class GetInstanceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Memcached instance resource name in the format: - * `projects/{project_id}/locations/{location_id}/instances/{instance_id}` - * where `location_id` refers to a GCP region - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Memcached instance resource name in the format: - * `projects/{project_id}/locations/{location_id}/instances/{instance_id}` - * where `location_id` refers to a GCP region - * Please see {@see CloudMemcacheClient::instanceName()} for help formatting this field. - * - * @return \Google\Cloud\Memcache\V1\GetInstanceRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Memcached instance resource name in the format: - * `projects/{project_id}/locations/{location_id}/instances/{instance_id}` - * where `location_id` refers to a GCP region - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Memcache\V1\CloudMemcache::initOnce(); - parent::__construct($data); - } - - /** - * Required. Memcached instance resource name in the format: - * `projects/{project_id}/locations/{location_id}/instances/{instance_id}` - * where `location_id` refers to a GCP region - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Memcached instance resource name in the format: - * `projects/{project_id}/locations/{location_id}/instances/{instance_id}` - * where `location_id` refers to a GCP region - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/Instance.php b/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/Instance.php deleted file mode 100644 index ae899b8ef090..000000000000 --- a/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/Instance.php +++ /dev/null @@ -1,809 +0,0 @@ -google.cloud.memcache.v1.Instance - */ -class Instance extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Unique name of the resource in this scope including project and - * location using the form: - * `projects/{project_id}/locations/{location_id}/instances/{instance_id}` - * Note: Memcached instances are managed and addressed at the regional level - * so `location_id` here refers to a Google Cloud region; however, users may - * choose which zones Memcached nodes should be provisioned in within an - * instance. Refer to [zones][google.cloud.memcache.v1.Instance.zones] field for more details. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * User provided name for the instance, which is only used for display - * purposes. Cannot be more than 80 characters. - * - * Generated from protobuf field string display_name = 2; - */ - protected $display_name = ''; - /** - * Resource labels to represent user-provided metadata. - * Refer to cloud documentation on labels for more details. - * https://cloud.google.com/compute/docs/labeling-resources - * - * Generated from protobuf field map labels = 3; - */ - private $labels; - /** - * The full name of the Google Compute Engine - * [network](/compute/docs/networks-and-firewalls#networks) to which the - * instance is connected. If left unspecified, the `default` network - * will be used. - * - * Generated from protobuf field string authorized_network = 4; - */ - protected $authorized_network = ''; - /** - * Zones in which Memcached nodes should be provisioned. - * Memcached nodes will be equally distributed across these zones. If not - * provided, the service will by default create nodes in all zones in the - * region for the instance. - * - * Generated from protobuf field repeated string zones = 5; - */ - private $zones; - /** - * Required. Number of nodes in the Memcached instance. - * - * Generated from protobuf field int32 node_count = 6 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $node_count = 0; - /** - * Required. Configuration for Memcached nodes. - * - * Generated from protobuf field .google.cloud.memcache.v1.Instance.NodeConfig node_config = 7 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $node_config = null; - /** - * The major version of Memcached software. - * If not provided, latest supported version will be used. Currently the - * latest supported major version is `MEMCACHE_1_5`. - * The minor version will be automatically determined by our system based on - * the latest supported minor version. - * - * Generated from protobuf field .google.cloud.memcache.v1.MemcacheVersion memcache_version = 9; - */ - protected $memcache_version = 0; - /** - * User defined parameters to apply to the memcached process - * on each node. - * - * Generated from protobuf field .google.cloud.memcache.v1.MemcacheParameters parameters = 11; - */ - protected $parameters = null; - /** - * Output only. List of Memcached nodes. - * Refer to [Node][google.cloud.memcache.v1.Instance.Node] message for more details. - * - * Generated from protobuf field repeated .google.cloud.memcache.v1.Instance.Node memcache_nodes = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $memcache_nodes; - /** - * Output only. The time the instance was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time the instance was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Output only. The state of this Memcached instance. - * - * Generated from protobuf field .google.cloud.memcache.v1.Instance.State state = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. The full version of memcached server running on this instance. - * System automatically determines the full memcached version for an instance - * based on the input MemcacheVersion. - * The full version format will be "memcached-1.5.16". - * - * Generated from protobuf field string memcache_full_version = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $memcache_full_version = ''; - /** - * List of messages that describe the current state of the Memcached instance. - * - * Generated from protobuf field repeated .google.cloud.memcache.v1.Instance.InstanceMessage instance_messages = 19; - */ - private $instance_messages; - /** - * Output only. Endpoint for the Discovery API. - * - * Generated from protobuf field string discovery_endpoint = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $discovery_endpoint = ''; - /** - * The maintenance policy for the instance. If not provided, - * the maintenance event will be performed based on Memorystore - * internal rollout schedule. - * - * Generated from protobuf field .google.cloud.memcache.v1.MaintenancePolicy maintenance_policy = 21; - */ - protected $maintenance_policy = null; - /** - * Output only. Published maintenance schedule. - * - * Generated from protobuf field .google.cloud.memcache.v1.MaintenanceSchedule maintenance_schedule = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $maintenance_schedule = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Unique name of the resource in this scope including project and - * location using the form: - * `projects/{project_id}/locations/{location_id}/instances/{instance_id}` - * Note: Memcached instances are managed and addressed at the regional level - * so `location_id` here refers to a Google Cloud region; however, users may - * choose which zones Memcached nodes should be provisioned in within an - * instance. Refer to [zones][google.cloud.memcache.v1.Instance.zones] field for more details. - * @type string $display_name - * User provided name for the instance, which is only used for display - * purposes. Cannot be more than 80 characters. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Resource labels to represent user-provided metadata. - * Refer to cloud documentation on labels for more details. - * https://cloud.google.com/compute/docs/labeling-resources - * @type string $authorized_network - * The full name of the Google Compute Engine - * [network](/compute/docs/networks-and-firewalls#networks) to which the - * instance is connected. If left unspecified, the `default` network - * will be used. - * @type array|\Google\Protobuf\Internal\RepeatedField $zones - * Zones in which Memcached nodes should be provisioned. - * Memcached nodes will be equally distributed across these zones. If not - * provided, the service will by default create nodes in all zones in the - * region for the instance. - * @type int $node_count - * Required. Number of nodes in the Memcached instance. - * @type \Google\Cloud\Memcache\V1\Instance\NodeConfig $node_config - * Required. Configuration for Memcached nodes. - * @type int $memcache_version - * The major version of Memcached software. - * If not provided, latest supported version will be used. Currently the - * latest supported major version is `MEMCACHE_1_5`. - * The minor version will be automatically determined by our system based on - * the latest supported minor version. - * @type \Google\Cloud\Memcache\V1\MemcacheParameters $parameters - * User defined parameters to apply to the memcached process - * on each node. - * @type array<\Google\Cloud\Memcache\V1\Instance\Node>|\Google\Protobuf\Internal\RepeatedField $memcache_nodes - * Output only. List of Memcached nodes. - * Refer to [Node][google.cloud.memcache.v1.Instance.Node] message for more details. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time the instance was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The time the instance was updated. - * @type int $state - * Output only. The state of this Memcached instance. - * @type string $memcache_full_version - * Output only. The full version of memcached server running on this instance. - * System automatically determines the full memcached version for an instance - * based on the input MemcacheVersion. - * The full version format will be "memcached-1.5.16". - * @type array<\Google\Cloud\Memcache\V1\Instance\InstanceMessage>|\Google\Protobuf\Internal\RepeatedField $instance_messages - * List of messages that describe the current state of the Memcached instance. - * @type string $discovery_endpoint - * Output only. Endpoint for the Discovery API. - * @type \Google\Cloud\Memcache\V1\MaintenancePolicy $maintenance_policy - * The maintenance policy for the instance. If not provided, - * the maintenance event will be performed based on Memorystore - * internal rollout schedule. - * @type \Google\Cloud\Memcache\V1\MaintenanceSchedule $maintenance_schedule - * Output only. Published maintenance schedule. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Memcache\V1\CloudMemcache::initOnce(); - parent::__construct($data); - } - - /** - * Required. Unique name of the resource in this scope including project and - * location using the form: - * `projects/{project_id}/locations/{location_id}/instances/{instance_id}` - * Note: Memcached instances are managed and addressed at the regional level - * so `location_id` here refers to a Google Cloud region; however, users may - * choose which zones Memcached nodes should be provisioned in within an - * instance. Refer to [zones][google.cloud.memcache.v1.Instance.zones] field for more details. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Unique name of the resource in this scope including project and - * location using the form: - * `projects/{project_id}/locations/{location_id}/instances/{instance_id}` - * Note: Memcached instances are managed and addressed at the regional level - * so `location_id` here refers to a Google Cloud region; however, users may - * choose which zones Memcached nodes should be provisioned in within an - * instance. Refer to [zones][google.cloud.memcache.v1.Instance.zones] field for more details. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * User provided name for the instance, which is only used for display - * purposes. Cannot be more than 80 characters. - * - * Generated from protobuf field string display_name = 2; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * User provided name for the instance, which is only used for display - * purposes. Cannot be more than 80 characters. - * - * Generated from protobuf field string display_name = 2; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Resource labels to represent user-provided metadata. - * Refer to cloud documentation on labels for more details. - * https://cloud.google.com/compute/docs/labeling-resources - * - * Generated from protobuf field map labels = 3; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Resource labels to represent user-provided metadata. - * Refer to cloud documentation on labels for more details. - * https://cloud.google.com/compute/docs/labeling-resources - * - * Generated from protobuf field map labels = 3; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * The full name of the Google Compute Engine - * [network](/compute/docs/networks-and-firewalls#networks) to which the - * instance is connected. If left unspecified, the `default` network - * will be used. - * - * Generated from protobuf field string authorized_network = 4; - * @return string - */ - public function getAuthorizedNetwork() - { - return $this->authorized_network; - } - - /** - * The full name of the Google Compute Engine - * [network](/compute/docs/networks-and-firewalls#networks) to which the - * instance is connected. If left unspecified, the `default` network - * will be used. - * - * Generated from protobuf field string authorized_network = 4; - * @param string $var - * @return $this - */ - public function setAuthorizedNetwork($var) - { - GPBUtil::checkString($var, True); - $this->authorized_network = $var; - - return $this; - } - - /** - * Zones in which Memcached nodes should be provisioned. - * Memcached nodes will be equally distributed across these zones. If not - * provided, the service will by default create nodes in all zones in the - * region for the instance. - * - * Generated from protobuf field repeated string zones = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getZones() - { - return $this->zones; - } - - /** - * Zones in which Memcached nodes should be provisioned. - * Memcached nodes will be equally distributed across these zones. If not - * provided, the service will by default create nodes in all zones in the - * region for the instance. - * - * Generated from protobuf field repeated string zones = 5; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setZones($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->zones = $arr; - - return $this; - } - - /** - * Required. Number of nodes in the Memcached instance. - * - * Generated from protobuf field int32 node_count = 6 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getNodeCount() - { - return $this->node_count; - } - - /** - * Required. Number of nodes in the Memcached instance. - * - * Generated from protobuf field int32 node_count = 6 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setNodeCount($var) - { - GPBUtil::checkInt32($var); - $this->node_count = $var; - - return $this; - } - - /** - * Required. Configuration for Memcached nodes. - * - * Generated from protobuf field .google.cloud.memcache.v1.Instance.NodeConfig node_config = 7 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Memcache\V1\Instance\NodeConfig|null - */ - public function getNodeConfig() - { - return $this->node_config; - } - - public function hasNodeConfig() - { - return isset($this->node_config); - } - - public function clearNodeConfig() - { - unset($this->node_config); - } - - /** - * Required. Configuration for Memcached nodes. - * - * Generated from protobuf field .google.cloud.memcache.v1.Instance.NodeConfig node_config = 7 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Memcache\V1\Instance\NodeConfig $var - * @return $this - */ - public function setNodeConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Memcache\V1\Instance\NodeConfig::class); - $this->node_config = $var; - - return $this; - } - - /** - * The major version of Memcached software. - * If not provided, latest supported version will be used. Currently the - * latest supported major version is `MEMCACHE_1_5`. - * The minor version will be automatically determined by our system based on - * the latest supported minor version. - * - * Generated from protobuf field .google.cloud.memcache.v1.MemcacheVersion memcache_version = 9; - * @return int - */ - public function getMemcacheVersion() - { - return $this->memcache_version; - } - - /** - * The major version of Memcached software. - * If not provided, latest supported version will be used. Currently the - * latest supported major version is `MEMCACHE_1_5`. - * The minor version will be automatically determined by our system based on - * the latest supported minor version. - * - * Generated from protobuf field .google.cloud.memcache.v1.MemcacheVersion memcache_version = 9; - * @param int $var - * @return $this - */ - public function setMemcacheVersion($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Memcache\V1\MemcacheVersion::class); - $this->memcache_version = $var; - - return $this; - } - - /** - * User defined parameters to apply to the memcached process - * on each node. - * - * Generated from protobuf field .google.cloud.memcache.v1.MemcacheParameters parameters = 11; - * @return \Google\Cloud\Memcache\V1\MemcacheParameters|null - */ - public function getParameters() - { - return $this->parameters; - } - - public function hasParameters() - { - return isset($this->parameters); - } - - public function clearParameters() - { - unset($this->parameters); - } - - /** - * User defined parameters to apply to the memcached process - * on each node. - * - * Generated from protobuf field .google.cloud.memcache.v1.MemcacheParameters parameters = 11; - * @param \Google\Cloud\Memcache\V1\MemcacheParameters $var - * @return $this - */ - public function setParameters($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Memcache\V1\MemcacheParameters::class); - $this->parameters = $var; - - return $this; - } - - /** - * Output only. List of Memcached nodes. - * Refer to [Node][google.cloud.memcache.v1.Instance.Node] message for more details. - * - * Generated from protobuf field repeated .google.cloud.memcache.v1.Instance.Node memcache_nodes = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMemcacheNodes() - { - return $this->memcache_nodes; - } - - /** - * Output only. List of Memcached nodes. - * Refer to [Node][google.cloud.memcache.v1.Instance.Node] message for more details. - * - * Generated from protobuf field repeated .google.cloud.memcache.v1.Instance.Node memcache_nodes = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\Memcache\V1\Instance\Node>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMemcacheNodes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Memcache\V1\Instance\Node::class); - $this->memcache_nodes = $arr; - - return $this; - } - - /** - * Output only. The time the instance was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The time the instance was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The time the instance was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The time the instance was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Output only. The state of this Memcached instance. - * - * Generated from protobuf field .google.cloud.memcache.v1.Instance.State state = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The state of this Memcached instance. - * - * Generated from protobuf field .google.cloud.memcache.v1.Instance.State state = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Memcache\V1\Instance\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. The full version of memcached server running on this instance. - * System automatically determines the full memcached version for an instance - * based on the input MemcacheVersion. - * The full version format will be "memcached-1.5.16". - * - * Generated from protobuf field string memcache_full_version = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getMemcacheFullVersion() - { - return $this->memcache_full_version; - } - - /** - * Output only. The full version of memcached server running on this instance. - * System automatically determines the full memcached version for an instance - * based on the input MemcacheVersion. - * The full version format will be "memcached-1.5.16". - * - * Generated from protobuf field string memcache_full_version = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setMemcacheFullVersion($var) - { - GPBUtil::checkString($var, True); - $this->memcache_full_version = $var; - - return $this; - } - - /** - * List of messages that describe the current state of the Memcached instance. - * - * Generated from protobuf field repeated .google.cloud.memcache.v1.Instance.InstanceMessage instance_messages = 19; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getInstanceMessages() - { - return $this->instance_messages; - } - - /** - * List of messages that describe the current state of the Memcached instance. - * - * Generated from protobuf field repeated .google.cloud.memcache.v1.Instance.InstanceMessage instance_messages = 19; - * @param array<\Google\Cloud\Memcache\V1\Instance\InstanceMessage>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setInstanceMessages($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Memcache\V1\Instance\InstanceMessage::class); - $this->instance_messages = $arr; - - return $this; - } - - /** - * Output only. Endpoint for the Discovery API. - * - * Generated from protobuf field string discovery_endpoint = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getDiscoveryEndpoint() - { - return $this->discovery_endpoint; - } - - /** - * Output only. Endpoint for the Discovery API. - * - * Generated from protobuf field string discovery_endpoint = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setDiscoveryEndpoint($var) - { - GPBUtil::checkString($var, True); - $this->discovery_endpoint = $var; - - return $this; - } - - /** - * The maintenance policy for the instance. If not provided, - * the maintenance event will be performed based on Memorystore - * internal rollout schedule. - * - * Generated from protobuf field .google.cloud.memcache.v1.MaintenancePolicy maintenance_policy = 21; - * @return \Google\Cloud\Memcache\V1\MaintenancePolicy|null - */ - public function getMaintenancePolicy() - { - return $this->maintenance_policy; - } - - public function hasMaintenancePolicy() - { - return isset($this->maintenance_policy); - } - - public function clearMaintenancePolicy() - { - unset($this->maintenance_policy); - } - - /** - * The maintenance policy for the instance. If not provided, - * the maintenance event will be performed based on Memorystore - * internal rollout schedule. - * - * Generated from protobuf field .google.cloud.memcache.v1.MaintenancePolicy maintenance_policy = 21; - * @param \Google\Cloud\Memcache\V1\MaintenancePolicy $var - * @return $this - */ - public function setMaintenancePolicy($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Memcache\V1\MaintenancePolicy::class); - $this->maintenance_policy = $var; - - return $this; - } - - /** - * Output only. Published maintenance schedule. - * - * Generated from protobuf field .google.cloud.memcache.v1.MaintenanceSchedule maintenance_schedule = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Memcache\V1\MaintenanceSchedule|null - */ - public function getMaintenanceSchedule() - { - return $this->maintenance_schedule; - } - - public function hasMaintenanceSchedule() - { - return isset($this->maintenance_schedule); - } - - public function clearMaintenanceSchedule() - { - unset($this->maintenance_schedule); - } - - /** - * Output only. Published maintenance schedule. - * - * Generated from protobuf field .google.cloud.memcache.v1.MaintenanceSchedule maintenance_schedule = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Memcache\V1\MaintenanceSchedule $var - * @return $this - */ - public function setMaintenanceSchedule($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Memcache\V1\MaintenanceSchedule::class); - $this->maintenance_schedule = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/Instance/InstanceMessage.php b/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/Instance/InstanceMessage.php deleted file mode 100644 index 981abe10b8b6..000000000000 --- a/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/Instance/InstanceMessage.php +++ /dev/null @@ -1,102 +0,0 @@ -google.cloud.memcache.v1.Instance.InstanceMessage - */ -class InstanceMessage extends \Google\Protobuf\Internal\Message -{ - /** - * A code that correspond to one type of user-facing message. - * - * Generated from protobuf field .google.cloud.memcache.v1.Instance.InstanceMessage.Code code = 1; - */ - protected $code = 0; - /** - * Message on memcached instance which will be exposed to users. - * - * Generated from protobuf field string message = 2; - */ - protected $message = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $code - * A code that correspond to one type of user-facing message. - * @type string $message - * Message on memcached instance which will be exposed to users. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Memcache\V1\CloudMemcache::initOnce(); - parent::__construct($data); - } - - /** - * A code that correspond to one type of user-facing message. - * - * Generated from protobuf field .google.cloud.memcache.v1.Instance.InstanceMessage.Code code = 1; - * @return int - */ - public function getCode() - { - return $this->code; - } - - /** - * A code that correspond to one type of user-facing message. - * - * Generated from protobuf field .google.cloud.memcache.v1.Instance.InstanceMessage.Code code = 1; - * @param int $var - * @return $this - */ - public function setCode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Memcache\V1\Instance\InstanceMessage\Code::class); - $this->code = $var; - - return $this; - } - - /** - * Message on memcached instance which will be exposed to users. - * - * Generated from protobuf field string message = 2; - * @return string - */ - public function getMessage() - { - return $this->message; - } - - /** - * Message on memcached instance which will be exposed to users. - * - * Generated from protobuf field string message = 2; - * @param string $var - * @return $this - */ - public function setMessage($var) - { - GPBUtil::checkString($var, True); - $this->message = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(InstanceMessage::class, \Google\Cloud\Memcache\V1\Instance_InstanceMessage::class); - diff --git a/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/Instance/InstanceMessage/Code.php b/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/Instance/InstanceMessage/Code.php deleted file mode 100644 index e0f20c3adb3f..000000000000 --- a/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/Instance/InstanceMessage/Code.php +++ /dev/null @@ -1,55 +0,0 @@ -google.cloud.memcache.v1.Instance.InstanceMessage.Code - */ -class Code -{ - /** - * Message Code not set. - * - * Generated from protobuf enum CODE_UNSPECIFIED = 0; - */ - const CODE_UNSPECIFIED = 0; - /** - * Memcached nodes are distributed unevenly. - * - * Generated from protobuf enum ZONE_DISTRIBUTION_UNBALANCED = 1; - */ - const ZONE_DISTRIBUTION_UNBALANCED = 1; - - private static $valueToName = [ - self::CODE_UNSPECIFIED => 'CODE_UNSPECIFIED', - self::ZONE_DISTRIBUTION_UNBALANCED => 'ZONE_DISTRIBUTION_UNBALANCED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Code::class, \Google\Cloud\Memcache\V1\Instance_InstanceMessage_Code::class); - diff --git a/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/Instance/Node.php b/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/Instance/Node.php deleted file mode 100644 index 85f5a875b821..000000000000 --- a/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/Instance/Node.php +++ /dev/null @@ -1,256 +0,0 @@ -google.cloud.memcache.v1.Instance.Node - */ -class Node extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Identifier of the Memcached node. The node id does not - * include project or location like the Memcached instance name. - * - * Generated from protobuf field string node_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $node_id = ''; - /** - * Output only. Location (GCP Zone) for the Memcached node. - * - * Generated from protobuf field string zone = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $zone = ''; - /** - * Output only. Current state of the Memcached node. - * - * Generated from protobuf field .google.cloud.memcache.v1.Instance.Node.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. Hostname or IP address of the Memcached node used by the - * clients to connect to the Memcached server on this node. - * - * Generated from protobuf field string host = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $host = ''; - /** - * Output only. The port number of the Memcached server on this node. - * - * Generated from protobuf field int32 port = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $port = 0; - /** - * User defined parameters currently applied to the node. - * - * Generated from protobuf field .google.cloud.memcache.v1.MemcacheParameters parameters = 6; - */ - protected $parameters = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $node_id - * Output only. Identifier of the Memcached node. The node id does not - * include project or location like the Memcached instance name. - * @type string $zone - * Output only. Location (GCP Zone) for the Memcached node. - * @type int $state - * Output only. Current state of the Memcached node. - * @type string $host - * Output only. Hostname or IP address of the Memcached node used by the - * clients to connect to the Memcached server on this node. - * @type int $port - * Output only. The port number of the Memcached server on this node. - * @type \Google\Cloud\Memcache\V1\MemcacheParameters $parameters - * User defined parameters currently applied to the node. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Memcache\V1\CloudMemcache::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Identifier of the Memcached node. The node id does not - * include project or location like the Memcached instance name. - * - * Generated from protobuf field string node_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getNodeId() - { - return $this->node_id; - } - - /** - * Output only. Identifier of the Memcached node. The node id does not - * include project or location like the Memcached instance name. - * - * Generated from protobuf field string node_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setNodeId($var) - { - GPBUtil::checkString($var, True); - $this->node_id = $var; - - return $this; - } - - /** - * Output only. Location (GCP Zone) for the Memcached node. - * - * Generated from protobuf field string zone = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getZone() - { - return $this->zone; - } - - /** - * Output only. Location (GCP Zone) for the Memcached node. - * - * Generated from protobuf field string zone = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setZone($var) - { - GPBUtil::checkString($var, True); - $this->zone = $var; - - return $this; - } - - /** - * Output only. Current state of the Memcached node. - * - * Generated from protobuf field .google.cloud.memcache.v1.Instance.Node.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. Current state of the Memcached node. - * - * Generated from protobuf field .google.cloud.memcache.v1.Instance.Node.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Memcache\V1\Instance\Node\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. Hostname or IP address of the Memcached node used by the - * clients to connect to the Memcached server on this node. - * - * Generated from protobuf field string host = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getHost() - { - return $this->host; - } - - /** - * Output only. Hostname or IP address of the Memcached node used by the - * clients to connect to the Memcached server on this node. - * - * Generated from protobuf field string host = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setHost($var) - { - GPBUtil::checkString($var, True); - $this->host = $var; - - return $this; - } - - /** - * Output only. The port number of the Memcached server on this node. - * - * Generated from protobuf field int32 port = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getPort() - { - return $this->port; - } - - /** - * Output only. The port number of the Memcached server on this node. - * - * Generated from protobuf field int32 port = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setPort($var) - { - GPBUtil::checkInt32($var); - $this->port = $var; - - return $this; - } - - /** - * User defined parameters currently applied to the node. - * - * Generated from protobuf field .google.cloud.memcache.v1.MemcacheParameters parameters = 6; - * @return \Google\Cloud\Memcache\V1\MemcacheParameters|null - */ - public function getParameters() - { - return $this->parameters; - } - - public function hasParameters() - { - return isset($this->parameters); - } - - public function clearParameters() - { - unset($this->parameters); - } - - /** - * User defined parameters currently applied to the node. - * - * Generated from protobuf field .google.cloud.memcache.v1.MemcacheParameters parameters = 6; - * @param \Google\Cloud\Memcache\V1\MemcacheParameters $var - * @return $this - */ - public function setParameters($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Memcache\V1\MemcacheParameters::class); - $this->parameters = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Node::class, \Google\Cloud\Memcache\V1\Instance_Node::class); - diff --git a/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/Instance/Node/State.php b/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/Instance/Node/State.php deleted file mode 100644 index b93e40ce84be..000000000000 --- a/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/Instance/Node/State.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.memcache.v1.Instance.Node.State - */ -class State -{ - /** - * Node state is not set. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Node is being created. - * - * Generated from protobuf enum CREATING = 1; - */ - const CREATING = 1; - /** - * Node has been created and ready to be used. - * - * Generated from protobuf enum READY = 2; - */ - const READY = 2; - /** - * Node is being deleted. - * - * Generated from protobuf enum DELETING = 3; - */ - const DELETING = 3; - /** - * Node is being updated. - * - * Generated from protobuf enum UPDATING = 4; - */ - const UPDATING = 4; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::CREATING => 'CREATING', - self::READY => 'READY', - self::DELETING => 'DELETING', - self::UPDATING => 'UPDATING', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\Memcache\V1\Instance_Node_State::class); - diff --git a/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/Instance/NodeConfig.php b/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/Instance/NodeConfig.php deleted file mode 100644 index 042d6658735f..000000000000 --- a/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/Instance/NodeConfig.php +++ /dev/null @@ -1,104 +0,0 @@ -google.cloud.memcache.v1.Instance.NodeConfig - */ -class NodeConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Number of cpus per Memcached node. - * - * Generated from protobuf field int32 cpu_count = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $cpu_count = 0; - /** - * Required. Memory size in MiB for each Memcached node. - * - * Generated from protobuf field int32 memory_size_mb = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $memory_size_mb = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $cpu_count - * Required. Number of cpus per Memcached node. - * @type int $memory_size_mb - * Required. Memory size in MiB for each Memcached node. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Memcache\V1\CloudMemcache::initOnce(); - parent::__construct($data); - } - - /** - * Required. Number of cpus per Memcached node. - * - * Generated from protobuf field int32 cpu_count = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getCpuCount() - { - return $this->cpu_count; - } - - /** - * Required. Number of cpus per Memcached node. - * - * Generated from protobuf field int32 cpu_count = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setCpuCount($var) - { - GPBUtil::checkInt32($var); - $this->cpu_count = $var; - - return $this; - } - - /** - * Required. Memory size in MiB for each Memcached node. - * - * Generated from protobuf field int32 memory_size_mb = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getMemorySizeMb() - { - return $this->memory_size_mb; - } - - /** - * Required. Memory size in MiB for each Memcached node. - * - * Generated from protobuf field int32 memory_size_mb = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setMemorySizeMb($var) - { - GPBUtil::checkInt32($var); - $this->memory_size_mb = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(NodeConfig::class, \Google\Cloud\Memcache\V1\Instance_NodeConfig::class); - diff --git a/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/Instance/State.php b/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/Instance/State.php deleted file mode 100644 index bd965a0eb907..000000000000 --- a/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/Instance/State.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.memcache.v1.Instance.State - */ -class State -{ - /** - * State not set. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Memcached instance is being created. - * - * Generated from protobuf enum CREATING = 1; - */ - const CREATING = 1; - /** - * Memcached instance has been created and ready to be used. - * - * Generated from protobuf enum READY = 2; - */ - const READY = 2; - /** - * Memcached instance is updating configuration such as maintenance policy - * and schedule. - * - * Generated from protobuf enum UPDATING = 3; - */ - const UPDATING = 3; - /** - * Memcached instance is being deleted. - * - * Generated from protobuf enum DELETING = 4; - */ - const DELETING = 4; - /** - * Memcached instance is going through maintenance, e.g. data plane rollout. - * - * Generated from protobuf enum PERFORMING_MAINTENANCE = 5; - */ - const PERFORMING_MAINTENANCE = 5; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::CREATING => 'CREATING', - self::READY => 'READY', - self::UPDATING => 'UPDATING', - self::DELETING => 'DELETING', - self::PERFORMING_MAINTENANCE => 'PERFORMING_MAINTENANCE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\Memcache\V1\Instance_State::class); - diff --git a/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/ListInstancesRequest.php b/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/ListInstancesRequest.php deleted file mode 100644 index 8a5c9bb572c6..000000000000 --- a/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/ListInstancesRequest.php +++ /dev/null @@ -1,251 +0,0 @@ -google.cloud.memcache.v1.ListInstancesRequest - */ -class ListInstancesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the instance location using the form: - * `projects/{project_id}/locations/{location_id}` - * where `location_id` refers to a GCP region - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of items to return. - * If not specified, a default value of 1000 will be used by the service. - * Regardless of the `page_size` value, the response may include a partial - * list and a caller should only rely on response's - * [`next_page_token`][google.cloud.memcache.v1.ListInstancesResponse.next_page_token] - * to determine if there are more instances left to be queried. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The `next_page_token` value returned from a previous List request, if any. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * List filter. For example, exclude all Memcached instances with name as - * my-instance by specifying `"name != my-instance"`. - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - /** - * Sort results. Supported values are "name", "name desc" or "" (unsorted). - * - * Generated from protobuf field string order_by = 5; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The resource name of the instance location using the form: - * `projects/{project_id}/locations/{location_id}` - * where `location_id` refers to a GCP region - * Please see {@see CloudMemcacheClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\Memcache\V1\ListInstancesRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the instance location using the form: - * `projects/{project_id}/locations/{location_id}` - * where `location_id` refers to a GCP region - * @type int $page_size - * The maximum number of items to return. - * If not specified, a default value of 1000 will be used by the service. - * Regardless of the `page_size` value, the response may include a partial - * list and a caller should only rely on response's - * [`next_page_token`][google.cloud.memcache.v1.ListInstancesResponse.next_page_token] - * to determine if there are more instances left to be queried. - * @type string $page_token - * The `next_page_token` value returned from a previous List request, if any. - * @type string $filter - * List filter. For example, exclude all Memcached instances with name as - * my-instance by specifying `"name != my-instance"`. - * @type string $order_by - * Sort results. Supported values are "name", "name desc" or "" (unsorted). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Memcache\V1\CloudMemcache::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the instance location using the form: - * `projects/{project_id}/locations/{location_id}` - * where `location_id` refers to a GCP region - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The resource name of the instance location using the form: - * `projects/{project_id}/locations/{location_id}` - * where `location_id` refers to a GCP region - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * The maximum number of items to return. - * If not specified, a default value of 1000 will be used by the service. - * Regardless of the `page_size` value, the response may include a partial - * list and a caller should only rely on response's - * [`next_page_token`][google.cloud.memcache.v1.ListInstancesResponse.next_page_token] - * to determine if there are more instances left to be queried. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of items to return. - * If not specified, a default value of 1000 will be used by the service. - * Regardless of the `page_size` value, the response may include a partial - * list and a caller should only rely on response's - * [`next_page_token`][google.cloud.memcache.v1.ListInstancesResponse.next_page_token] - * to determine if there are more instances left to be queried. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * The `next_page_token` value returned from a previous List request, if any. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The `next_page_token` value returned from a previous List request, if any. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * List filter. For example, exclude all Memcached instances with name as - * my-instance by specifying `"name != my-instance"`. - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * List filter. For example, exclude all Memcached instances with name as - * my-instance by specifying `"name != my-instance"`. - * - * Generated from protobuf field string filter = 4; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Sort results. Supported values are "name", "name desc" or "" (unsorted). - * - * Generated from protobuf field string order_by = 5; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Sort results. Supported values are "name", "name desc" or "" (unsorted). - * - * Generated from protobuf field string order_by = 5; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/ListInstancesResponse.php b/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/ListInstancesResponse.php deleted file mode 100644 index baa54f4cd391..000000000000 --- a/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/ListInstancesResponse.php +++ /dev/null @@ -1,151 +0,0 @@ -google.cloud.memcache.v1.ListInstancesResponse - */ -class ListInstancesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of Memcached instances in the project in the specified location, - * or across all locations. - * If the `location_id` in the parent field of the request is "-", all regions - * available to the project are queried, and the results aggregated. - * - * Generated from protobuf field repeated .google.cloud.memcache.v1.Instance instances = 1; - */ - private $instances; - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Memcache\V1\Instance>|\Google\Protobuf\Internal\RepeatedField $instances - * A list of Memcached instances in the project in the specified location, - * or across all locations. - * If the `location_id` in the parent field of the request is "-", all regions - * available to the project are queried, and the results aggregated. - * @type string $next_page_token - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Memcache\V1\CloudMemcache::initOnce(); - parent::__construct($data); - } - - /** - * A list of Memcached instances in the project in the specified location, - * or across all locations. - * If the `location_id` in the parent field of the request is "-", all regions - * available to the project are queried, and the results aggregated. - * - * Generated from protobuf field repeated .google.cloud.memcache.v1.Instance instances = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getInstances() - { - return $this->instances; - } - - /** - * A list of Memcached instances in the project in the specified location, - * or across all locations. - * If the `location_id` in the parent field of the request is "-", all regions - * available to the project are queried, and the results aggregated. - * - * Generated from protobuf field repeated .google.cloud.memcache.v1.Instance instances = 1; - * @param array<\Google\Cloud\Memcache\V1\Instance>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setInstances($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Memcache\V1\Instance::class); - $this->instances = $arr; - - return $this; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/LocationMetadata.php b/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/LocationMetadata.php deleted file mode 100644 index 43b01dbbb3d6..000000000000 --- a/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/LocationMetadata.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.memcache.v1.LocationMetadata - */ -class LocationMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The set of available zones in the location. The map is keyed - * by the lowercase ID of each zone, as defined by GCE. These keys can be - * specified in the `zones` field when creating a Memcached instance. - * - * Generated from protobuf field map available_zones = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $available_zones; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\MapField $available_zones - * Output only. The set of available zones in the location. The map is keyed - * by the lowercase ID of each zone, as defined by GCE. These keys can be - * specified in the `zones` field when creating a Memcached instance. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Memcache\V1\CloudMemcache::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The set of available zones in the location. The map is keyed - * by the lowercase ID of each zone, as defined by GCE. These keys can be - * specified in the `zones` field when creating a Memcached instance. - * - * Generated from protobuf field map available_zones = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getAvailableZones() - { - return $this->available_zones; - } - - /** - * Output only. The set of available zones in the location. The map is keyed - * by the lowercase ID of each zone, as defined by GCE. These keys can be - * specified in the `zones` field when creating a Memcached instance. - * - * Generated from protobuf field map available_zones = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setAvailableZones($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Memcache\V1\ZoneMetadata::class); - $this->available_zones = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/MaintenancePolicy.php b/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/MaintenancePolicy.php deleted file mode 100644 index 5bb59c83e923..000000000000 --- a/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/MaintenancePolicy.php +++ /dev/null @@ -1,201 +0,0 @@ -google.cloud.memcache.v1.MaintenancePolicy - */ -class MaintenancePolicy extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The time when the policy was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time when the policy was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Description of what this policy is for. Create/Update methods - * return INVALID_ARGUMENT if the length is greater than 512. - * - * Generated from protobuf field string description = 3; - */ - protected $description = ''; - /** - * Required. Maintenance window that is applied to resources covered by this - * policy. Minimum 1. For the current version, the maximum number of - * weekly_maintenance_windows is expected to be one. - * - * Generated from protobuf field repeated .google.cloud.memcache.v1.WeeklyMaintenanceWindow weekly_maintenance_window = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - private $weekly_maintenance_window; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time when the policy was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The time when the policy was updated. - * @type string $description - * Description of what this policy is for. Create/Update methods - * return INVALID_ARGUMENT if the length is greater than 512. - * @type array<\Google\Cloud\Memcache\V1\WeeklyMaintenanceWindow>|\Google\Protobuf\Internal\RepeatedField $weekly_maintenance_window - * Required. Maintenance window that is applied to resources covered by this - * policy. Minimum 1. For the current version, the maximum number of - * weekly_maintenance_windows is expected to be one. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Memcache\V1\CloudMemcache::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The time when the policy was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The time when the policy was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The time when the policy was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The time when the policy was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Description of what this policy is for. Create/Update methods - * return INVALID_ARGUMENT if the length is greater than 512. - * - * Generated from protobuf field string description = 3; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Description of what this policy is for. Create/Update methods - * return INVALID_ARGUMENT if the length is greater than 512. - * - * Generated from protobuf field string description = 3; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Required. Maintenance window that is applied to resources covered by this - * policy. Minimum 1. For the current version, the maximum number of - * weekly_maintenance_windows is expected to be one. - * - * Generated from protobuf field repeated .google.cloud.memcache.v1.WeeklyMaintenanceWindow weekly_maintenance_window = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getWeeklyMaintenanceWindow() - { - return $this->weekly_maintenance_window; - } - - /** - * Required. Maintenance window that is applied to resources covered by this - * policy. Minimum 1. For the current version, the maximum number of - * weekly_maintenance_windows is expected to be one. - * - * Generated from protobuf field repeated .google.cloud.memcache.v1.WeeklyMaintenanceWindow weekly_maintenance_window = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param array<\Google\Cloud\Memcache\V1\WeeklyMaintenanceWindow>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setWeeklyMaintenanceWindow($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Memcache\V1\WeeklyMaintenanceWindow::class); - $this->weekly_maintenance_window = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/MaintenanceSchedule.php b/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/MaintenanceSchedule.php deleted file mode 100644 index f141831d3947..000000000000 --- a/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/MaintenanceSchedule.php +++ /dev/null @@ -1,169 +0,0 @@ -google.cloud.memcache.v1.MaintenanceSchedule - */ -class MaintenanceSchedule extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The start time of any upcoming scheduled maintenance for this instance. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $start_time = null; - /** - * Output only. The end time of any upcoming scheduled maintenance for this instance. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $end_time = null; - /** - * Output only. The deadline that the maintenance schedule start time can not go beyond, - * including reschedule. - * - * Generated from protobuf field .google.protobuf.Timestamp schedule_deadline_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $schedule_deadline_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $start_time - * Output only. The start time of any upcoming scheduled maintenance for this instance. - * @type \Google\Protobuf\Timestamp $end_time - * Output only. The end time of any upcoming scheduled maintenance for this instance. - * @type \Google\Protobuf\Timestamp $schedule_deadline_time - * Output only. The deadline that the maintenance schedule start time can not go beyond, - * including reschedule. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Memcache\V1\CloudMemcache::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The start time of any upcoming scheduled maintenance for this instance. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStartTime() - { - return $this->start_time; - } - - public function hasStartTime() - { - return isset($this->start_time); - } - - public function clearStartTime() - { - unset($this->start_time); - } - - /** - * Output only. The start time of any upcoming scheduled maintenance for this instance. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * Output only. The end time of any upcoming scheduled maintenance for this instance. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * Output only. The end time of any upcoming scheduled maintenance for this instance. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * Output only. The deadline that the maintenance schedule start time can not go beyond, - * including reschedule. - * - * Generated from protobuf field .google.protobuf.Timestamp schedule_deadline_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getScheduleDeadlineTime() - { - return $this->schedule_deadline_time; - } - - public function hasScheduleDeadlineTime() - { - return isset($this->schedule_deadline_time); - } - - public function clearScheduleDeadlineTime() - { - unset($this->schedule_deadline_time); - } - - /** - * Output only. The deadline that the maintenance schedule start time can not go beyond, - * including reschedule. - * - * Generated from protobuf field .google.protobuf.Timestamp schedule_deadline_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setScheduleDeadlineTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->schedule_deadline_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/MemcacheParameters.php b/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/MemcacheParameters.php deleted file mode 100644 index 8d5064794560..000000000000 --- a/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/MemcacheParameters.php +++ /dev/null @@ -1,115 +0,0 @@ -google.cloud.memcache.v1.MemcacheParameters - */ -class MemcacheParameters extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The unique ID associated with this set of parameters. Users - * can use this id to determine if the parameters associated with the instance - * differ from the parameters associated with the nodes. A discrepancy between - * parameter ids can inform users that they may need to take action to apply - * parameters on nodes. - * - * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $id = ''; - /** - * User defined set of parameters to use in the memcached process. - * - * Generated from protobuf field map params = 3; - */ - private $params; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $id - * Output only. The unique ID associated with this set of parameters. Users - * can use this id to determine if the parameters associated with the instance - * differ from the parameters associated with the nodes. A discrepancy between - * parameter ids can inform users that they may need to take action to apply - * parameters on nodes. - * @type array|\Google\Protobuf\Internal\MapField $params - * User defined set of parameters to use in the memcached process. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Memcache\V1\CloudMemcache::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The unique ID associated with this set of parameters. Users - * can use this id to determine if the parameters associated with the instance - * differ from the parameters associated with the nodes. A discrepancy between - * parameter ids can inform users that they may need to take action to apply - * parameters on nodes. - * - * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * Output only. The unique ID associated with this set of parameters. Users - * can use this id to determine if the parameters associated with the instance - * differ from the parameters associated with the nodes. A discrepancy between - * parameter ids can inform users that they may need to take action to apply - * parameters on nodes. - * - * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setId($var) - { - GPBUtil::checkString($var, True); - $this->id = $var; - - return $this; - } - - /** - * User defined set of parameters to use in the memcached process. - * - * Generated from protobuf field map params = 3; - * @return \Google\Protobuf\Internal\MapField - */ - public function getParams() - { - return $this->params; - } - - /** - * User defined set of parameters to use in the memcached process. - * - * Generated from protobuf field map params = 3; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setParams($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->params = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/MemcacheVersion.php b/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/MemcacheVersion.php deleted file mode 100644 index 99ddc115dd49..000000000000 --- a/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/MemcacheVersion.php +++ /dev/null @@ -1,52 +0,0 @@ -google.cloud.memcache.v1.MemcacheVersion - */ -class MemcacheVersion -{ - /** - * Generated from protobuf enum MEMCACHE_VERSION_UNSPECIFIED = 0; - */ - const MEMCACHE_VERSION_UNSPECIFIED = 0; - /** - * Memcached 1.5 version. - * - * Generated from protobuf enum MEMCACHE_1_5 = 1; - */ - const MEMCACHE_1_5 = 1; - - private static $valueToName = [ - self::MEMCACHE_VERSION_UNSPECIFIED => 'MEMCACHE_VERSION_UNSPECIFIED', - self::MEMCACHE_1_5 => 'MEMCACHE_1_5', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/OperationMetadata.php b/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/OperationMetadata.php deleted file mode 100644 index 0dcd99c7e97a..000000000000 --- a/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/OperationMetadata.php +++ /dev/null @@ -1,303 +0,0 @@ -google.cloud.memcache.v1.OperationMetadata - */ -class OperationMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Time when the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. Time when the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $end_time = null; - /** - * Output only. Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $target = ''; - /** - * Output only. Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $verb = ''; - /** - * Output only. Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_detail = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $status_detail = ''; - /** - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have successfully been cancelled - * have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, - * corresponding to `Code.CANCELLED`. - * - * Generated from protobuf field bool cancel_requested = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $cancel_requested = false; - /** - * Output only. API version used to start the operation. - * - * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $api_version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $create_time - * Output only. Time when the operation was created. - * @type \Google\Protobuf\Timestamp $end_time - * Output only. Time when the operation finished running. - * @type string $target - * Output only. Server-defined resource path for the target of the operation. - * @type string $verb - * Output only. Name of the verb executed by the operation. - * @type string $status_detail - * Output only. Human-readable status of the operation, if any. - * @type bool $cancel_requested - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have successfully been cancelled - * have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, - * corresponding to `Code.CANCELLED`. - * @type string $api_version - * Output only. API version used to start the operation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Memcache\V1\CloudMemcache::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Time when the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. Time when the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. Time when the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * Output only. Time when the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * Output only. Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getTarget() - { - return $this->target; - } - - /** - * Output only. Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setTarget($var) - { - GPBUtil::checkString($var, True); - $this->target = $var; - - return $this; - } - - /** - * Output only. Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getVerb() - { - return $this->verb; - } - - /** - * Output only. Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setVerb($var) - { - GPBUtil::checkString($var, True); - $this->verb = $var; - - return $this; - } - - /** - * Output only. Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_detail = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getStatusDetail() - { - return $this->status_detail; - } - - /** - * Output only. Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_detail = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setStatusDetail($var) - { - GPBUtil::checkString($var, True); - $this->status_detail = $var; - - return $this; - } - - /** - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have successfully been cancelled - * have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, - * corresponding to `Code.CANCELLED`. - * - * Generated from protobuf field bool cancel_requested = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getCancelRequested() - { - return $this->cancel_requested; - } - - /** - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have successfully been cancelled - * have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, - * corresponding to `Code.CANCELLED`. - * - * Generated from protobuf field bool cancel_requested = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setCancelRequested($var) - { - GPBUtil::checkBool($var); - $this->cancel_requested = $var; - - return $this; - } - - /** - * Output only. API version used to start the operation. - * - * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getApiVersion() - { - return $this->api_version; - } - - /** - * Output only. API version used to start the operation. - * - * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setApiVersion($var) - { - GPBUtil::checkString($var, True); - $this->api_version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/RescheduleMaintenanceRequest.php b/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/RescheduleMaintenanceRequest.php deleted file mode 100644 index f5848d53b348..000000000000 --- a/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/RescheduleMaintenanceRequest.php +++ /dev/null @@ -1,184 +0,0 @@ -google.cloud.memcache.v1.RescheduleMaintenanceRequest - */ -class RescheduleMaintenanceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Memcache instance resource name using the form: - * `projects/{project_id}/locations/{location_id}/instances/{instance_id}` - * where `location_id` refers to a GCP region. - * - * Generated from protobuf field string instance = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $instance = ''; - /** - * Required. If reschedule type is SPECIFIC_TIME, must set up schedule_time as well. - * - * Generated from protobuf field .google.cloud.memcache.v1.RescheduleMaintenanceRequest.RescheduleType reschedule_type = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $reschedule_type = 0; - /** - * Timestamp when the maintenance shall be rescheduled to if - * reschedule_type=SPECIFIC_TIME, in RFC 3339 format, for - * example `2012-11-15T16:19:00.094Z`. - * - * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 3; - */ - protected $schedule_time = null; - - /** - * @param string $instance Required. Memcache instance resource name using the form: - * `projects/{project_id}/locations/{location_id}/instances/{instance_id}` - * where `location_id` refers to a GCP region. Please see - * {@see CloudMemcacheClient::instanceName()} for help formatting this field. - * @param int $rescheduleType Required. If reschedule type is SPECIFIC_TIME, must set up schedule_time as well. - * For allowed values, use constants defined on {@see \Google\Cloud\Memcache\V1\RescheduleMaintenanceRequest\RescheduleType} - * @param \Google\Protobuf\Timestamp $scheduleTime Timestamp when the maintenance shall be rescheduled to if - * reschedule_type=SPECIFIC_TIME, in RFC 3339 format, for - * example `2012-11-15T16:19:00.094Z`. - * - * @return \Google\Cloud\Memcache\V1\RescheduleMaintenanceRequest - * - * @experimental - */ - public static function build(string $instance, int $rescheduleType, \Google\Protobuf\Timestamp $scheduleTime): self - { - return (new self()) - ->setInstance($instance) - ->setRescheduleType($rescheduleType) - ->setScheduleTime($scheduleTime); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $instance - * Required. Memcache instance resource name using the form: - * `projects/{project_id}/locations/{location_id}/instances/{instance_id}` - * where `location_id` refers to a GCP region. - * @type int $reschedule_type - * Required. If reschedule type is SPECIFIC_TIME, must set up schedule_time as well. - * @type \Google\Protobuf\Timestamp $schedule_time - * Timestamp when the maintenance shall be rescheduled to if - * reschedule_type=SPECIFIC_TIME, in RFC 3339 format, for - * example `2012-11-15T16:19:00.094Z`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Memcache\V1\CloudMemcache::initOnce(); - parent::__construct($data); - } - - /** - * Required. Memcache instance resource name using the form: - * `projects/{project_id}/locations/{location_id}/instances/{instance_id}` - * where `location_id` refers to a GCP region. - * - * Generated from protobuf field string instance = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getInstance() - { - return $this->instance; - } - - /** - * Required. Memcache instance resource name using the form: - * `projects/{project_id}/locations/{location_id}/instances/{instance_id}` - * where `location_id` refers to a GCP region. - * - * Generated from protobuf field string instance = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkString($var, True); - $this->instance = $var; - - return $this; - } - - /** - * Required. If reschedule type is SPECIFIC_TIME, must set up schedule_time as well. - * - * Generated from protobuf field .google.cloud.memcache.v1.RescheduleMaintenanceRequest.RescheduleType reschedule_type = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getRescheduleType() - { - return $this->reschedule_type; - } - - /** - * Required. If reschedule type is SPECIFIC_TIME, must set up schedule_time as well. - * - * Generated from protobuf field .google.cloud.memcache.v1.RescheduleMaintenanceRequest.RescheduleType reschedule_type = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setRescheduleType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Memcache\V1\RescheduleMaintenanceRequest\RescheduleType::class); - $this->reschedule_type = $var; - - return $this; - } - - /** - * Timestamp when the maintenance shall be rescheduled to if - * reschedule_type=SPECIFIC_TIME, in RFC 3339 format, for - * example `2012-11-15T16:19:00.094Z`. - * - * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 3; - * @return \Google\Protobuf\Timestamp|null - */ - public function getScheduleTime() - { - return $this->schedule_time; - } - - public function hasScheduleTime() - { - return isset($this->schedule_time); - } - - public function clearScheduleTime() - { - unset($this->schedule_time); - } - - /** - * Timestamp when the maintenance shall be rescheduled to if - * reschedule_type=SPECIFIC_TIME, in RFC 3339 format, for - * example `2012-11-15T16:19:00.094Z`. - * - * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setScheduleTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->schedule_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/RescheduleMaintenanceRequest/RescheduleType.php b/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/RescheduleMaintenanceRequest/RescheduleType.php deleted file mode 100644 index b015d580ce0d..000000000000 --- a/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/RescheduleMaintenanceRequest/RescheduleType.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.memcache.v1.RescheduleMaintenanceRequest.RescheduleType - */ -class RescheduleType -{ - /** - * Not set. - * - * Generated from protobuf enum RESCHEDULE_TYPE_UNSPECIFIED = 0; - */ - const RESCHEDULE_TYPE_UNSPECIFIED = 0; - /** - * If the user wants to schedule the maintenance to happen now. - * - * Generated from protobuf enum IMMEDIATE = 1; - */ - const IMMEDIATE = 1; - /** - * If the user wants to use the existing maintenance policy to find the - * next available window. - * - * Generated from protobuf enum NEXT_AVAILABLE_WINDOW = 2; - */ - const NEXT_AVAILABLE_WINDOW = 2; - /** - * If the user wants to reschedule the maintenance to a specific time. - * - * Generated from protobuf enum SPECIFIC_TIME = 3; - */ - const SPECIFIC_TIME = 3; - - private static $valueToName = [ - self::RESCHEDULE_TYPE_UNSPECIFIED => 'RESCHEDULE_TYPE_UNSPECIFIED', - self::IMMEDIATE => 'IMMEDIATE', - self::NEXT_AVAILABLE_WINDOW => 'NEXT_AVAILABLE_WINDOW', - self::SPECIFIC_TIME => 'SPECIFIC_TIME', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(RescheduleType::class, \Google\Cloud\Memcache\V1\RescheduleMaintenanceRequest_RescheduleType::class); - diff --git a/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/UpdateInstanceRequest.php b/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/UpdateInstanceRequest.php deleted file mode 100644 index 2e74317853fd..000000000000 --- a/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/UpdateInstanceRequest.php +++ /dev/null @@ -1,147 +0,0 @@ -google.cloud.memcache.v1.UpdateInstanceRequest - */ -class UpdateInstanceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Mask of fields to update. - * * `displayName` - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * Required. A Memcached Instance. - * Only fields specified in update_mask are updated. - * - * Generated from protobuf field .google.cloud.memcache.v1.Instance instance = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $instance = null; - - /** - * @param \Google\Cloud\Memcache\V1\Instance $instance Required. A Memcached Instance. - * Only fields specified in update_mask are updated. - * @param \Google\Protobuf\FieldMask $updateMask Required. Mask of fields to update. - * - * * `displayName` - * - * @return \Google\Cloud\Memcache\V1\UpdateInstanceRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Memcache\V1\Instance $instance, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setInstance($instance) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Mask of fields to update. - * * `displayName` - * @type \Google\Cloud\Memcache\V1\Instance $instance - * Required. A Memcached Instance. - * Only fields specified in update_mask are updated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Memcache\V1\CloudMemcache::initOnce(); - parent::__construct($data); - } - - /** - * Required. Mask of fields to update. - * * `displayName` - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Required. Mask of fields to update. - * * `displayName` - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * Required. A Memcached Instance. - * Only fields specified in update_mask are updated. - * - * Generated from protobuf field .google.cloud.memcache.v1.Instance instance = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Memcache\V1\Instance|null - */ - public function getInstance() - { - return $this->instance; - } - - public function hasInstance() - { - return isset($this->instance); - } - - public function clearInstance() - { - unset($this->instance); - } - - /** - * Required. A Memcached Instance. - * Only fields specified in update_mask are updated. - * - * Generated from protobuf field .google.cloud.memcache.v1.Instance instance = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Memcache\V1\Instance $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Memcache\V1\Instance::class); - $this->instance = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/UpdateParametersRequest.php b/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/UpdateParametersRequest.php deleted file mode 100644 index af9daca3148d..000000000000 --- a/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/UpdateParametersRequest.php +++ /dev/null @@ -1,178 +0,0 @@ -google.cloud.memcache.v1.UpdateParametersRequest - */ -class UpdateParametersRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource name of the Memcached instance for which the parameters should be - * updated. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. Mask of fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * The parameters to apply to the instance. - * - * Generated from protobuf field .google.cloud.memcache.v1.MemcacheParameters parameters = 3; - */ - protected $parameters = null; - - /** - * @param string $name Required. Resource name of the Memcached instance for which the parameters should be - * updated. Please see - * {@see CloudMemcacheClient::instanceName()} for help formatting this field. - * @param \Google\Protobuf\FieldMask $updateMask Required. Mask of fields to update. - * @param \Google\Cloud\Memcache\V1\MemcacheParameters $parameters The parameters to apply to the instance. - * - * @return \Google\Cloud\Memcache\V1\UpdateParametersRequest - * - * @experimental - */ - public static function build(string $name, \Google\Protobuf\FieldMask $updateMask, \Google\Cloud\Memcache\V1\MemcacheParameters $parameters): self - { - return (new self()) - ->setName($name) - ->setUpdateMask($updateMask) - ->setParameters($parameters); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Resource name of the Memcached instance for which the parameters should be - * updated. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Mask of fields to update. - * @type \Google\Cloud\Memcache\V1\MemcacheParameters $parameters - * The parameters to apply to the instance. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Memcache\V1\CloudMemcache::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource name of the Memcached instance for which the parameters should be - * updated. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Resource name of the Memcached instance for which the parameters should be - * updated. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. Mask of fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Required. Mask of fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * The parameters to apply to the instance. - * - * Generated from protobuf field .google.cloud.memcache.v1.MemcacheParameters parameters = 3; - * @return \Google\Cloud\Memcache\V1\MemcacheParameters|null - */ - public function getParameters() - { - return $this->parameters; - } - - public function hasParameters() - { - return isset($this->parameters); - } - - public function clearParameters() - { - unset($this->parameters); - } - - /** - * The parameters to apply to the instance. - * - * Generated from protobuf field .google.cloud.memcache.v1.MemcacheParameters parameters = 3; - * @param \Google\Cloud\Memcache\V1\MemcacheParameters $var - * @return $this - */ - public function setParameters($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Memcache\V1\MemcacheParameters::class); - $this->parameters = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/WeeklyMaintenanceWindow.php b/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/WeeklyMaintenanceWindow.php deleted file mode 100644 index ec49a6a4aa09..000000000000 --- a/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/WeeklyMaintenanceWindow.php +++ /dev/null @@ -1,155 +0,0 @@ -google.cloud.memcache.v1.WeeklyMaintenanceWindow - */ -class WeeklyMaintenanceWindow extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Allows to define schedule that runs specified day of the week. - * - * Generated from protobuf field .google.type.DayOfWeek day = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $day = 0; - /** - * Required. Start time of the window in UTC. - * - * Generated from protobuf field .google.type.TimeOfDay start_time = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $start_time = null; - /** - * Required. Duration of the time window. - * - * Generated from protobuf field .google.protobuf.Duration duration = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $duration = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $day - * Required. Allows to define schedule that runs specified day of the week. - * @type \Google\Type\TimeOfDay $start_time - * Required. Start time of the window in UTC. - * @type \Google\Protobuf\Duration $duration - * Required. Duration of the time window. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Memcache\V1\CloudMemcache::initOnce(); - parent::__construct($data); - } - - /** - * Required. Allows to define schedule that runs specified day of the week. - * - * Generated from protobuf field .google.type.DayOfWeek day = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getDay() - { - return $this->day; - } - - /** - * Required. Allows to define schedule that runs specified day of the week. - * - * Generated from protobuf field .google.type.DayOfWeek day = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setDay($var) - { - GPBUtil::checkEnum($var, \Google\Type\DayOfWeek::class); - $this->day = $var; - - return $this; - } - - /** - * Required. Start time of the window in UTC. - * - * Generated from protobuf field .google.type.TimeOfDay start_time = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Type\TimeOfDay|null - */ - public function getStartTime() - { - return $this->start_time; - } - - public function hasStartTime() - { - return isset($this->start_time); - } - - public function clearStartTime() - { - unset($this->start_time); - } - - /** - * Required. Start time of the window in UTC. - * - * Generated from protobuf field .google.type.TimeOfDay start_time = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Type\TimeOfDay $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Type\TimeOfDay::class); - $this->start_time = $var; - - return $this; - } - - /** - * Required. Duration of the time window. - * - * Generated from protobuf field .google.protobuf.Duration duration = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Duration|null - */ - public function getDuration() - { - return $this->duration; - } - - public function hasDuration() - { - return isset($this->duration); - } - - public function clearDuration() - { - unset($this->duration); - } - - /** - * Required. Duration of the time window. - * - * Generated from protobuf field .google.protobuf.Duration duration = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->duration = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/ZoneMetadata.php b/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/ZoneMetadata.php deleted file mode 100644 index ef8a0e92f5d1..000000000000 --- a/owl-bot-staging/Memcache/v1/proto/src/Google/Cloud/Memcache/V1/ZoneMetadata.php +++ /dev/null @@ -1,31 +0,0 @@ -google.cloud.memcache.v1.ZoneMetadata - */ -class ZoneMetadata extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Memcache\V1\CloudMemcache::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/Memcache/v1/samples/V1/CloudMemcacheClient/apply_parameters.php b/owl-bot-staging/Memcache/v1/samples/V1/CloudMemcacheClient/apply_parameters.php deleted file mode 100644 index d7bcb6ff4768..000000000000 --- a/owl-bot-staging/Memcache/v1/samples/V1/CloudMemcacheClient/apply_parameters.php +++ /dev/null @@ -1,85 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $cloudMemcacheClient->applyParameters($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Instance $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = CloudMemcacheClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - - apply_parameters_sample($formattedName); -} -// [END memcache_v1_generated_CloudMemcache_ApplyParameters_sync] diff --git a/owl-bot-staging/Memcache/v1/samples/V1/CloudMemcacheClient/create_instance.php b/owl-bot-staging/Memcache/v1/samples/V1/CloudMemcacheClient/create_instance.php deleted file mode 100644 index 6ce653b4a8c1..000000000000 --- a/owl-bot-staging/Memcache/v1/samples/V1/CloudMemcacheClient/create_instance.php +++ /dev/null @@ -1,134 +0,0 @@ -setCpuCount($instanceNodeConfigCpuCount) - ->setMemorySizeMb($instanceNodeConfigMemorySizeMb); - $instance = (new Instance()) - ->setName($instanceName) - ->setNodeCount($instanceNodeCount) - ->setNodeConfig($instanceNodeConfig); - $request = (new CreateInstanceRequest()) - ->setParent($formattedParent) - ->setInstanceId($instanceId) - ->setInstance($instance); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $cloudMemcacheClient->createInstance($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Instance $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = CloudMemcacheClient::locationName('[PROJECT]', '[LOCATION]'); - $instanceId = '[INSTANCE_ID]'; - $instanceName = '[NAME]'; - $instanceNodeCount = 0; - $instanceNodeConfigCpuCount = 0; - $instanceNodeConfigMemorySizeMb = 0; - - create_instance_sample( - $formattedParent, - $instanceId, - $instanceName, - $instanceNodeCount, - $instanceNodeConfigCpuCount, - $instanceNodeConfigMemorySizeMb - ); -} -// [END memcache_v1_generated_CloudMemcache_CreateInstance_sync] diff --git a/owl-bot-staging/Memcache/v1/samples/V1/CloudMemcacheClient/delete_instance.php b/owl-bot-staging/Memcache/v1/samples/V1/CloudMemcacheClient/delete_instance.php deleted file mode 100644 index 9589955ab918..000000000000 --- a/owl-bot-staging/Memcache/v1/samples/V1/CloudMemcacheClient/delete_instance.php +++ /dev/null @@ -1,82 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $cloudMemcacheClient->deleteInstance($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = CloudMemcacheClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - - delete_instance_sample($formattedName); -} -// [END memcache_v1_generated_CloudMemcache_DeleteInstance_sync] diff --git a/owl-bot-staging/Memcache/v1/samples/V1/CloudMemcacheClient/get_instance.php b/owl-bot-staging/Memcache/v1/samples/V1/CloudMemcacheClient/get_instance.php deleted file mode 100644 index 7055ea1a1d43..000000000000 --- a/owl-bot-staging/Memcache/v1/samples/V1/CloudMemcacheClient/get_instance.php +++ /dev/null @@ -1,73 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Instance $response */ - $response = $cloudMemcacheClient->getInstance($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = CloudMemcacheClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - - get_instance_sample($formattedName); -} -// [END memcache_v1_generated_CloudMemcache_GetInstance_sync] diff --git a/owl-bot-staging/Memcache/v1/samples/V1/CloudMemcacheClient/get_location.php b/owl-bot-staging/Memcache/v1/samples/V1/CloudMemcacheClient/get_location.php deleted file mode 100644 index f0294f489913..000000000000 --- a/owl-bot-staging/Memcache/v1/samples/V1/CloudMemcacheClient/get_location.php +++ /dev/null @@ -1,57 +0,0 @@ -getLocation($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END memcache_v1_generated_CloudMemcache_GetLocation_sync] diff --git a/owl-bot-staging/Memcache/v1/samples/V1/CloudMemcacheClient/list_instances.php b/owl-bot-staging/Memcache/v1/samples/V1/CloudMemcacheClient/list_instances.php deleted file mode 100644 index b8a288424f2a..000000000000 --- a/owl-bot-staging/Memcache/v1/samples/V1/CloudMemcacheClient/list_instances.php +++ /dev/null @@ -1,78 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $cloudMemcacheClient->listInstances($request); - - /** @var Instance $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = CloudMemcacheClient::locationName('[PROJECT]', '[LOCATION]'); - - list_instances_sample($formattedParent); -} -// [END memcache_v1_generated_CloudMemcache_ListInstances_sync] diff --git a/owl-bot-staging/Memcache/v1/samples/V1/CloudMemcacheClient/list_locations.php b/owl-bot-staging/Memcache/v1/samples/V1/CloudMemcacheClient/list_locations.php deleted file mode 100644 index 02151c67ba4a..000000000000 --- a/owl-bot-staging/Memcache/v1/samples/V1/CloudMemcacheClient/list_locations.php +++ /dev/null @@ -1,62 +0,0 @@ -listLocations($request); - - /** @var Location $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END memcache_v1_generated_CloudMemcache_ListLocations_sync] diff --git a/owl-bot-staging/Memcache/v1/samples/V1/CloudMemcacheClient/reschedule_maintenance.php b/owl-bot-staging/Memcache/v1/samples/V1/CloudMemcacheClient/reschedule_maintenance.php deleted file mode 100644 index e618a1ca565b..000000000000 --- a/owl-bot-staging/Memcache/v1/samples/V1/CloudMemcacheClient/reschedule_maintenance.php +++ /dev/null @@ -1,89 +0,0 @@ -setInstance($formattedInstance) - ->setRescheduleType($rescheduleType); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $cloudMemcacheClient->rescheduleMaintenance($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Instance $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedInstance = CloudMemcacheClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $rescheduleType = RescheduleType::RESCHEDULE_TYPE_UNSPECIFIED; - - reschedule_maintenance_sample($formattedInstance, $rescheduleType); -} -// [END memcache_v1_generated_CloudMemcache_RescheduleMaintenance_sync] diff --git a/owl-bot-staging/Memcache/v1/samples/V1/CloudMemcacheClient/update_instance.php b/owl-bot-staging/Memcache/v1/samples/V1/CloudMemcacheClient/update_instance.php deleted file mode 100644 index 5b1d84bd0234..000000000000 --- a/owl-bot-staging/Memcache/v1/samples/V1/CloudMemcacheClient/update_instance.php +++ /dev/null @@ -1,115 +0,0 @@ -setCpuCount($instanceNodeConfigCpuCount) - ->setMemorySizeMb($instanceNodeConfigMemorySizeMb); - $instance = (new Instance()) - ->setName($instanceName) - ->setNodeCount($instanceNodeCount) - ->setNodeConfig($instanceNodeConfig); - $request = (new UpdateInstanceRequest()) - ->setUpdateMask($updateMask) - ->setInstance($instance); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $cloudMemcacheClient->updateInstance($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Instance $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $instanceName = '[NAME]'; - $instanceNodeCount = 0; - $instanceNodeConfigCpuCount = 0; - $instanceNodeConfigMemorySizeMb = 0; - - update_instance_sample( - $instanceName, - $instanceNodeCount, - $instanceNodeConfigCpuCount, - $instanceNodeConfigMemorySizeMb - ); -} -// [END memcache_v1_generated_CloudMemcache_UpdateInstance_sync] diff --git a/owl-bot-staging/Memcache/v1/samples/V1/CloudMemcacheClient/update_parameters.php b/owl-bot-staging/Memcache/v1/samples/V1/CloudMemcacheClient/update_parameters.php deleted file mode 100644 index 91c0c48ef163..000000000000 --- a/owl-bot-staging/Memcache/v1/samples/V1/CloudMemcacheClient/update_parameters.php +++ /dev/null @@ -1,90 +0,0 @@ -setName($formattedName) - ->setUpdateMask($updateMask); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $cloudMemcacheClient->updateParameters($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Instance $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = CloudMemcacheClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - - update_parameters_sample($formattedName); -} -// [END memcache_v1_generated_CloudMemcache_UpdateParameters_sync] diff --git a/owl-bot-staging/Memcache/v1/src/V1/Client/CloudMemcacheClient.php b/owl-bot-staging/Memcache/v1/src/V1/Client/CloudMemcacheClient.php deleted file mode 100644 index 451786626307..000000000000 --- a/owl-bot-staging/Memcache/v1/src/V1/Client/CloudMemcacheClient.php +++ /dev/null @@ -1,587 +0,0 @@ - applyParametersAsync(ApplyParametersRequest $request, array $optionalArgs = []) - * @method PromiseInterface createInstanceAsync(CreateInstanceRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteInstanceAsync(DeleteInstanceRequest $request, array $optionalArgs = []) - * @method PromiseInterface getInstanceAsync(GetInstanceRequest $request, array $optionalArgs = []) - * @method PromiseInterface listInstancesAsync(ListInstancesRequest $request, array $optionalArgs = []) - * @method PromiseInterface rescheduleMaintenanceAsync(RescheduleMaintenanceRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateInstanceAsync(UpdateInstanceRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateParametersAsync(UpdateParametersRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) - */ -final class CloudMemcacheClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.memcache.v1.CloudMemcache'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'memcache.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'memcache.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/cloud_memcache_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/cloud_memcache_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/cloud_memcache_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/cloud_memcache_rest_client_config.php', - ], - ], - ]; - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Create the default operation client for the service. - * - * @param array $options ClientOptions for the client. - * - * @return OperationsClient - */ - private function createOperationsClient(array $options) - { - // Unset client-specific configuration options - unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); - - if (isset($options['operationsClient'])) { - return $options['operationsClient']; - } - - return new OperationsClient($options); - } - - /** - * Formats a string containing the fully-qualified path to represent a instance - * resource. - * - * @param string $project - * @param string $location - * @param string $instance - * - * @return string The formatted instance resource. - */ - public static function instanceName(string $project, string $location, string $instance): string - { - return self::getPathTemplate('instance')->render([ - 'project' => $project, - 'location' => $location, - 'instance' => $instance, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a location - * resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted location resource. - */ - public static function locationName(string $project, string $location): string - { - return self::getPathTemplate('location')->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - instance: projects/{project}/locations/{location}/instances/{instance} - * - location: projects/{project}/locations/{location} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param ?string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, ?string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'memcache.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * `ApplyParameters` restarts the set of specified nodes in order to update - * them to the current set of parameters for the Memcached Instance. - * - * The async variant is {@see CloudMemcacheClient::applyParametersAsync()} . - * - * @example samples/V1/CloudMemcacheClient/apply_parameters.php - * - * @param ApplyParametersRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function applyParameters(ApplyParametersRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('ApplyParameters', $request, $callOptions)->wait(); - } - - /** - * Creates a new Instance in a given location. - * - * The async variant is {@see CloudMemcacheClient::createInstanceAsync()} . - * - * @example samples/V1/CloudMemcacheClient/create_instance.php - * - * @param CreateInstanceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createInstance(CreateInstanceRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateInstance', $request, $callOptions)->wait(); - } - - /** - * Deletes a single Instance. - * - * The async variant is {@see CloudMemcacheClient::deleteInstanceAsync()} . - * - * @example samples/V1/CloudMemcacheClient/delete_instance.php - * - * @param DeleteInstanceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteInstance(DeleteInstanceRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteInstance', $request, $callOptions)->wait(); - } - - /** - * Gets details of a single Instance. - * - * The async variant is {@see CloudMemcacheClient::getInstanceAsync()} . - * - * @example samples/V1/CloudMemcacheClient/get_instance.php - * - * @param GetInstanceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Instance - * - * @throws ApiException Thrown if the API call fails. - */ - public function getInstance(GetInstanceRequest $request, array $callOptions = []): Instance - { - return $this->startApiCall('GetInstance', $request, $callOptions)->wait(); - } - - /** - * Lists Instances in a given location. - * - * The async variant is {@see CloudMemcacheClient::listInstancesAsync()} . - * - * @example samples/V1/CloudMemcacheClient/list_instances.php - * - * @param ListInstancesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listInstances(ListInstancesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListInstances', $request, $callOptions); - } - - /** - * Reschedules upcoming maintenance event. - * - * The async variant is {@see CloudMemcacheClient::rescheduleMaintenanceAsync()} . - * - * @example samples/V1/CloudMemcacheClient/reschedule_maintenance.php - * - * @param RescheduleMaintenanceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function rescheduleMaintenance(RescheduleMaintenanceRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('RescheduleMaintenance', $request, $callOptions)->wait(); - } - - /** - * Updates an existing Instance in a given project and location. - * - * The async variant is {@see CloudMemcacheClient::updateInstanceAsync()} . - * - * @example samples/V1/CloudMemcacheClient/update_instance.php - * - * @param UpdateInstanceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateInstance(UpdateInstanceRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateInstance', $request, $callOptions)->wait(); - } - - /** - * Updates the defined Memcached parameters for an existing instance. - * This method only stages the parameters, it must be followed by - * `ApplyParameters` to apply the parameters to nodes of the Memcached - * instance. - * - * The async variant is {@see CloudMemcacheClient::updateParametersAsync()} . - * - * @example samples/V1/CloudMemcacheClient/update_parameters.php - * - * @param UpdateParametersRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateParameters(UpdateParametersRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateParameters', $request, $callOptions)->wait(); - } - - /** - * Gets information about a location. - * - * The async variant is {@see CloudMemcacheClient::getLocationAsync()} . - * - * @example samples/V1/CloudMemcacheClient/get_location.php - * - * @param GetLocationRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Location - * - * @throws ApiException Thrown if the API call fails. - */ - public function getLocation(GetLocationRequest $request, array $callOptions = []): Location - { - return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * The async variant is {@see CloudMemcacheClient::listLocationsAsync()} . - * - * @example samples/V1/CloudMemcacheClient/list_locations.php - * - * @param ListLocationsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListLocations', $request, $callOptions); - } -} diff --git a/owl-bot-staging/Memcache/v1/src/V1/gapic_metadata.json b/owl-bot-staging/Memcache/v1/src/V1/gapic_metadata.json deleted file mode 100644 index e993652f358b..000000000000 --- a/owl-bot-staging/Memcache/v1/src/V1/gapic_metadata.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.memcache.v1", - "libraryPackage": "Google\\Cloud\\Memcache\\V1", - "services": { - "CloudMemcache": { - "clients": { - "grpc": { - "libraryClient": "CloudMemcacheGapicClient", - "rpcs": { - "ApplyParameters": { - "methods": [ - "applyParameters" - ] - }, - "CreateInstance": { - "methods": [ - "createInstance" - ] - }, - "DeleteInstance": { - "methods": [ - "deleteInstance" - ] - }, - "GetInstance": { - "methods": [ - "getInstance" - ] - }, - "ListInstances": { - "methods": [ - "listInstances" - ] - }, - "RescheduleMaintenance": { - "methods": [ - "rescheduleMaintenance" - ] - }, - "UpdateInstance": { - "methods": [ - "updateInstance" - ] - }, - "UpdateParameters": { - "methods": [ - "updateParameters" - ] - }, - "GetLocation": { - "methods": [ - "getLocation" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/Memcache/v1/src/V1/resources/cloud_memcache_client_config.json b/owl-bot-staging/Memcache/v1/src/V1/resources/cloud_memcache_client_config.json deleted file mode 100644 index d52aad915ae6..000000000000 --- a/owl-bot-staging/Memcache/v1/src/V1/resources/cloud_memcache_client_config.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "interfaces": { - "google.cloud.memcache.v1.CloudMemcache": { - "retry_codes": { - "no_retry_codes": [], - "no_retry_1_codes": [] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "no_retry_1_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 1200000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 1200000, - "total_timeout_millis": 1200000 - } - }, - "methods": { - "ApplyParameters": { - "timeout_millis": 1200000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateInstance": { - "timeout_millis": 1200000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteInstance": { - "timeout_millis": 1200000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetInstance": { - "timeout_millis": 1200000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListInstances": { - "timeout_millis": 1200000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "RescheduleMaintenance": { - "timeout_millis": 1200000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateInstance": { - "timeout_millis": 1200000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateParameters": { - "timeout_millis": 1200000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetLocation": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListLocations": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - } - } - } - } -} diff --git a/owl-bot-staging/Memcache/v1/src/V1/resources/cloud_memcache_descriptor_config.php b/owl-bot-staging/Memcache/v1/src/V1/resources/cloud_memcache_descriptor_config.php deleted file mode 100644 index 97d3dc1ba57d..000000000000 --- a/owl-bot-staging/Memcache/v1/src/V1/resources/cloud_memcache_descriptor_config.php +++ /dev/null @@ -1,213 +0,0 @@ - [ - 'google.cloud.memcache.v1.CloudMemcache' => [ - 'ApplyParameters' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Memcache\V1\Instance', - 'metadataReturnType' => '\Google\Cloud\Memcache\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'CreateInstance' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Memcache\V1\Instance', - 'metadataReturnType' => '\Google\Cloud\Memcache\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteInstance' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\Memcache\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'RescheduleMaintenance' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Memcache\V1\Instance', - 'metadataReturnType' => '\Google\Cloud\Memcache\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'instance', - 'fieldAccessors' => [ - 'getInstance', - ], - ], - ], - ], - 'UpdateInstance' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Memcache\V1\Instance', - 'metadataReturnType' => '\Google\Cloud\Memcache\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'instance.name', - 'fieldAccessors' => [ - 'getInstance', - 'getName', - ], - ], - ], - ], - 'UpdateParameters' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Memcache\V1\Instance', - 'metadataReturnType' => '\Google\Cloud\Memcache\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetInstance' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Memcache\V1\Instance', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListInstances' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getInstances', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Memcache\V1\ListInstancesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'GetLocation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Location\Location', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'ListLocations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLocations', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'templateMap' => [ - 'instance' => 'projects/{project}/locations/{location}/instances/{instance}', - 'location' => 'projects/{project}/locations/{location}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Memcache/v1/src/V1/resources/cloud_memcache_rest_client_config.php b/owl-bot-staging/Memcache/v1/src/V1/resources/cloud_memcache_rest_client_config.php deleted file mode 100644 index 281466044120..000000000000 --- a/owl-bot-staging/Memcache/v1/src/V1/resources/cloud_memcache_rest_client_config.php +++ /dev/null @@ -1,200 +0,0 @@ - [ - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.cloud.memcache.v1.CloudMemcache' => [ - 'ApplyParameters' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*}:applyParameters', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'CreateInstance' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/instances', - 'body' => 'instance', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'instance_id', - ], - ], - 'DeleteInstance' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetInstance' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListInstances' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/instances', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'RescheduleMaintenance' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{instance=projects/*/locations/*/instances/*}:rescheduleMaintenance', - 'body' => '*', - 'placeholders' => [ - 'instance' => [ - 'getters' => [ - 'getInstance', - ], - ], - ], - ], - 'UpdateInstance' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{instance.name=projects/*/locations/*/instances/*}', - 'body' => 'instance', - 'placeholders' => [ - 'instance.name' => [ - 'getters' => [ - 'getInstance', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdateParameters' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*}:updateParameters', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Memcache/v1/tests/Unit/V1/Client/CloudMemcacheClientTest.php b/owl-bot-staging/Memcache/v1/tests/Unit/V1/Client/CloudMemcacheClientTest.php deleted file mode 100644 index b4bcd6a189cb..000000000000 --- a/owl-bot-staging/Memcache/v1/tests/Unit/V1/Client/CloudMemcacheClientTest.php +++ /dev/null @@ -1,1284 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return CloudMemcacheClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new CloudMemcacheClient($options); - } - - /** @test */ - public function applyParametersTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/applyParametersTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $authorizedNetwork = 'authorizedNetwork-1733809270'; - $nodeCount = 1539922066; - $memcacheFullVersion = 'memcacheFullVersion-1666834598'; - $discoveryEndpoint = 'discoveryEndpoint224997188'; - $expectedResponse = new Instance(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setAuthorizedNetwork($authorizedNetwork); - $expectedResponse->setNodeCount($nodeCount); - $expectedResponse->setMemcacheFullVersion($memcacheFullVersion); - $expectedResponse->setDiscoveryEndpoint($discoveryEndpoint); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/applyParametersTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $request = (new ApplyParametersRequest()) - ->setName($formattedName); - $response = $gapicClient->applyParameters($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.memcache.v1.CloudMemcache/ApplyParameters', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/applyParametersTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function applyParametersExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/applyParametersTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $request = (new ApplyParametersRequest()) - ->setName($formattedName); - $response = $gapicClient->applyParameters($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/applyParametersTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createInstanceTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createInstanceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $authorizedNetwork = 'authorizedNetwork-1733809270'; - $nodeCount = 1539922066; - $memcacheFullVersion = 'memcacheFullVersion-1666834598'; - $discoveryEndpoint = 'discoveryEndpoint224997188'; - $expectedResponse = new Instance(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setAuthorizedNetwork($authorizedNetwork); - $expectedResponse->setNodeCount($nodeCount); - $expectedResponse->setMemcacheFullVersion($memcacheFullVersion); - $expectedResponse->setDiscoveryEndpoint($discoveryEndpoint); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createInstanceTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $instanceId = 'instanceId-2101995259'; - $instance = new Instance(); - $instanceName = 'instanceName-737857344'; - $instance->setName($instanceName); - $instanceNodeCount = 310900968; - $instance->setNodeCount($instanceNodeCount); - $instanceNodeConfig = new NodeConfig(); - $nodeConfigCpuCount = 604896331; - $instanceNodeConfig->setCpuCount($nodeConfigCpuCount); - $nodeConfigMemorySizeMb = 701709349; - $instanceNodeConfig->setMemorySizeMb($nodeConfigMemorySizeMb); - $instance->setNodeConfig($instanceNodeConfig); - $request = (new CreateInstanceRequest()) - ->setParent($formattedParent) - ->setInstanceId($instanceId) - ->setInstance($instance); - $response = $gapicClient->createInstance($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.memcache.v1.CloudMemcache/CreateInstance', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getInstanceId(); - $this->assertProtobufEquals($instanceId, $actualValue); - $actualValue = $actualApiRequestObject->getInstance(); - $this->assertProtobufEquals($instance, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createInstanceTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createInstanceExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createInstanceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $instanceId = 'instanceId-2101995259'; - $instance = new Instance(); - $instanceName = 'instanceName-737857344'; - $instance->setName($instanceName); - $instanceNodeCount = 310900968; - $instance->setNodeCount($instanceNodeCount); - $instanceNodeConfig = new NodeConfig(); - $nodeConfigCpuCount = 604896331; - $instanceNodeConfig->setCpuCount($nodeConfigCpuCount); - $nodeConfigMemorySizeMb = 701709349; - $instanceNodeConfig->setMemorySizeMb($nodeConfigMemorySizeMb); - $instance->setNodeConfig($instanceNodeConfig); - $request = (new CreateInstanceRequest()) - ->setParent($formattedParent) - ->setInstanceId($instanceId) - ->setInstance($instance); - $response = $gapicClient->createInstance($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createInstanceTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteInstanceTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteInstanceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteInstanceTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $request = (new DeleteInstanceRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteInstance($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.memcache.v1.CloudMemcache/DeleteInstance', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteInstanceTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteInstanceExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteInstanceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $request = (new DeleteInstanceRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteInstance($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteInstanceTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getInstanceTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $authorizedNetwork = 'authorizedNetwork-1733809270'; - $nodeCount = 1539922066; - $memcacheFullVersion = 'memcacheFullVersion-1666834598'; - $discoveryEndpoint = 'discoveryEndpoint224997188'; - $expectedResponse = new Instance(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setAuthorizedNetwork($authorizedNetwork); - $expectedResponse->setNodeCount($nodeCount); - $expectedResponse->setMemcacheFullVersion($memcacheFullVersion); - $expectedResponse->setDiscoveryEndpoint($discoveryEndpoint); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $request = (new GetInstanceRequest()) - ->setName($formattedName); - $response = $gapicClient->getInstance($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.memcache.v1.CloudMemcache/GetInstance', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getInstanceExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $request = (new GetInstanceRequest()) - ->setName($formattedName); - try { - $gapicClient->getInstance($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listInstancesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $instancesElement = new Instance(); - $instances = [ - $instancesElement, - ]; - $expectedResponse = new ListInstancesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setInstances($instances); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListInstancesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listInstances($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getInstances()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.memcache.v1.CloudMemcache/ListInstances', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listInstancesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListInstancesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listInstances($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function rescheduleMaintenanceTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/rescheduleMaintenanceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $authorizedNetwork = 'authorizedNetwork-1733809270'; - $nodeCount = 1539922066; - $memcacheFullVersion = 'memcacheFullVersion-1666834598'; - $discoveryEndpoint = 'discoveryEndpoint224997188'; - $expectedResponse = new Instance(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setAuthorizedNetwork($authorizedNetwork); - $expectedResponse->setNodeCount($nodeCount); - $expectedResponse->setMemcacheFullVersion($memcacheFullVersion); - $expectedResponse->setDiscoveryEndpoint($discoveryEndpoint); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/rescheduleMaintenanceTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedInstance = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $rescheduleType = RescheduleType::RESCHEDULE_TYPE_UNSPECIFIED; - $request = (new RescheduleMaintenanceRequest()) - ->setInstance($formattedInstance) - ->setRescheduleType($rescheduleType); - $response = $gapicClient->rescheduleMaintenance($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.memcache.v1.CloudMemcache/RescheduleMaintenance', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getInstance(); - $this->assertProtobufEquals($formattedInstance, $actualValue); - $actualValue = $actualApiRequestObject->getRescheduleType(); - $this->assertProtobufEquals($rescheduleType, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/rescheduleMaintenanceTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function rescheduleMaintenanceExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/rescheduleMaintenanceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedInstance = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $rescheduleType = RescheduleType::RESCHEDULE_TYPE_UNSPECIFIED; - $request = (new RescheduleMaintenanceRequest()) - ->setInstance($formattedInstance) - ->setRescheduleType($rescheduleType); - $response = $gapicClient->rescheduleMaintenance($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/rescheduleMaintenanceTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateInstanceTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateInstanceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $authorizedNetwork = 'authorizedNetwork-1733809270'; - $nodeCount = 1539922066; - $memcacheFullVersion = 'memcacheFullVersion-1666834598'; - $discoveryEndpoint = 'discoveryEndpoint224997188'; - $expectedResponse = new Instance(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setAuthorizedNetwork($authorizedNetwork); - $expectedResponse->setNodeCount($nodeCount); - $expectedResponse->setMemcacheFullVersion($memcacheFullVersion); - $expectedResponse->setDiscoveryEndpoint($discoveryEndpoint); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateInstanceTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $updateMask = new FieldMask(); - $instance = new Instance(); - $instanceName = 'instanceName-737857344'; - $instance->setName($instanceName); - $instanceNodeCount = 310900968; - $instance->setNodeCount($instanceNodeCount); - $instanceNodeConfig = new NodeConfig(); - $nodeConfigCpuCount = 604896331; - $instanceNodeConfig->setCpuCount($nodeConfigCpuCount); - $nodeConfigMemorySizeMb = 701709349; - $instanceNodeConfig->setMemorySizeMb($nodeConfigMemorySizeMb); - $instance->setNodeConfig($instanceNodeConfig); - $request = (new UpdateInstanceRequest()) - ->setUpdateMask($updateMask) - ->setInstance($instance); - $response = $gapicClient->updateInstance($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.memcache.v1.CloudMemcache/UpdateInstance', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $actualValue = $actualApiRequestObject->getInstance(); - $this->assertProtobufEquals($instance, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateInstanceTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateInstanceExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateInstanceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $updateMask = new FieldMask(); - $instance = new Instance(); - $instanceName = 'instanceName-737857344'; - $instance->setName($instanceName); - $instanceNodeCount = 310900968; - $instance->setNodeCount($instanceNodeCount); - $instanceNodeConfig = new NodeConfig(); - $nodeConfigCpuCount = 604896331; - $instanceNodeConfig->setCpuCount($nodeConfigCpuCount); - $nodeConfigMemorySizeMb = 701709349; - $instanceNodeConfig->setMemorySizeMb($nodeConfigMemorySizeMb); - $instance->setNodeConfig($instanceNodeConfig); - $request = (new UpdateInstanceRequest()) - ->setUpdateMask($updateMask) - ->setInstance($instance); - $response = $gapicClient->updateInstance($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateInstanceTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateParametersTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateParametersTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $authorizedNetwork = 'authorizedNetwork-1733809270'; - $nodeCount = 1539922066; - $memcacheFullVersion = 'memcacheFullVersion-1666834598'; - $discoveryEndpoint = 'discoveryEndpoint224997188'; - $expectedResponse = new Instance(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setAuthorizedNetwork($authorizedNetwork); - $expectedResponse->setNodeCount($nodeCount); - $expectedResponse->setMemcacheFullVersion($memcacheFullVersion); - $expectedResponse->setDiscoveryEndpoint($discoveryEndpoint); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateParametersTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $updateMask = new FieldMask(); - $request = (new UpdateParametersRequest()) - ->setName($formattedName) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateParameters($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.memcache.v1.CloudMemcache/UpdateParameters', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateParametersTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateParametersExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateParametersTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $updateMask = new FieldMask(); - $request = (new UpdateParametersRequest()) - ->setName($formattedName) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateParameters($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateParametersTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getLocationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $locationId = 'locationId552319461'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Location(); - $expectedResponse->setName($name2); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - $request = new GetLocationRequest(); - $response = $gapicClient->getLocation($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new GetLocationRequest(); - try { - $gapicClient->getLocation($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $locationsElement = new Location(); - $locations = [ - $locationsElement, - ]; - $expectedResponse = new ListLocationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLocations($locations); - $transport->addResponse($expectedResponse); - $request = new ListLocationsRequest(); - $response = $gapicClient->listLocations($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new ListLocationsRequest(); - try { - $gapicClient->listLocations($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function applyParametersAsyncTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/applyParametersTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $authorizedNetwork = 'authorizedNetwork-1733809270'; - $nodeCount = 1539922066; - $memcacheFullVersion = 'memcacheFullVersion-1666834598'; - $discoveryEndpoint = 'discoveryEndpoint224997188'; - $expectedResponse = new Instance(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setAuthorizedNetwork($authorizedNetwork); - $expectedResponse->setNodeCount($nodeCount); - $expectedResponse->setMemcacheFullVersion($memcacheFullVersion); - $expectedResponse->setDiscoveryEndpoint($discoveryEndpoint); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/applyParametersTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $request = (new ApplyParametersRequest()) - ->setName($formattedName); - $response = $gapicClient->applyParametersAsync($request)->wait(); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.memcache.v1.CloudMemcache/ApplyParameters', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/applyParametersTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } -} diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/GPBMetadata/Google/Cloud/Migrationcenter/V1/Migrationcenter.php b/owl-bot-staging/MigrationCenter/v1/proto/src/GPBMetadata/Google/Cloud/Migrationcenter/V1/Migrationcenter.php deleted file mode 100644 index 9d3e41b60dedd60c06b31228d7b1b6364f5c6605..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 48680 zcmdUYeQab`me<(T?rvXqyWOw994DDLFPTZw>DXx}nPlAE(<$3!cO|yVsj{7P##kK>GnKiuf2<5DG7R< zeW&V8maFx>t;yZW4!~9FwX#=hd(FvvSL2T+_zOzaO1oaGQ7U`m3oA2AUc0naYL_+^ z7}&-v0oz!L0^3->dQGWvwbW{j$6l$A)HwcY>}^&nQUmIN}FWsnYq-(W0%|gA_nw}1D3P9}Fakg5)%JtS~zT#E4X1qJ4dzE^#x2}0l zlTqS9F4k*1&AnQ!Qrp?cHHdh7L(*S6%v@%-(SDG8zH?Xk;Jz2@zM9#iy7U#e*OO>b@a_UL?mQ*k zCYV1=#Q4L+y{luFG~8070wzM#CoE!2_nf2`+eBi;O-*CE!DFGGO-)Gp)ie54HK3Ns zx=$^-(c`)ib0lo%Nss73zchT!eoV4FjVCB@A-BS5ZrREj4ASx;t*m1^W(h6`%`proi&T#0}281Pb^;dgD3ux%du}^~WA*O+Z#p7Fa4f8FdC?va(b2wu(E= z`d*_odWivDVL+c(&syLtP^Yn%)KGXyhg9mW_dtl!Ijsinm8yF}iG$PqZ}g2_RcGQW zXX!Fs`ZWDR*1^c0_yRWCSG{t(HTjYL>)~XzUKRl``H}ha;UqBks1^VFaAsJYVgQ;1 z+@DUV(<@C6+Kq=LEBxN?w)5)LR;AUbmL3#&(;ox<3_9o3(3aLJAmOlq=wVSkey`GO z@0F@WvmqKjDrQqmTPbf{VCcOOOh#+^!%x%q)fEeI1RZGh7Lu+@Fj92mRWyrG#DYC^ zfA*vr%LLJT35)QhYA0$0s#>IFz@r{6AAgM4<*8*XVod*Bt_viqbF%XiP`k`!fXoa zEI2_0ybpw0Y!A8u32x%6nm$Lk#m}E6j}P7y;QMH*>$) zuZI0;i%)f3sJm0W(c_*QPFSXfQ3W{PXeg_X=~c0QY#8~Kd$gc|K=v65My%PudB z^mTokUt3Uj%y@aN3AnUphB%&rGlkiUyx zt#3Y@IjN2dIk~@b%q#{;Nzzf1FbGl-1|bZOvw&{1(lk6}CmiZALXR>DJ z6Ned|vTFtMZG+`RXxG23M)n%jdTFb;4g6u-Zr52X3{Bb9pf&DD^Oi-oTc2^?Py<5K z7u4BqgnUY!oW-&;@$@-L9Z%1$X4f+#{nJ0w_i6fDed?t|WMJ@cHjhXPlR_5;UO*^Y zpa-6ihciQJ(4QIi>nSzBT1+=W`Ttv)=3z$|bzJg^HV{)0nA&^fa>*1hna9Km*bZx) zlOOTF58eOOuT-YltT*SIuxYw2$C6U;9aKe?!!9M8<5er0XK?GLA6p6{9&f4Pdb6@q zfoG<;P2U_9rQk&?NLCaXu0VQS4a3m@gPkNB+g-^Nh3Ox|Ci#Qv1h`KSg!BY+M|QiT2}tE>TGB( z^?Ook^!v2o>!g$nPrYO%Ei+DEi*vu-r&MUzm(;mJZY@8XDX!jLA-&@5<=nf=&?zn| zC-P!tF_)f$Hu0o-Ec|?7EmK%6<_g8aYR4Bo2}QjD?8n| z%kL($?}5-iP){*~ECzNF%%CC^a@g&=@Pm;(N1X62D{X~mV1k)-#6$yE(;$hq`^WxV zpL*h;R?amwz(dpiCpZmY5F~UOIE!jHz=$k6R=WmgUS%i~y;+yj_diXy)r%HB8phwr zBqb(MEro8tI^`#JI?>TX_Xo$+ae@2$h^D3^%+v1A5(FohZC*DVjd*4fj;1?{8aW4- z)!y!Isri6e?9kLiLaHrDFXp=L7u7Ky%Xu}TnPAwsf&sLeTTL$(XLH2q=8NEunS9|^ zc4ef`owu+pFsHx}JFNx_YqPVN%p8oTeo}9>A(hgS+vaD}l(GIuXl=5|rms(f58WT> zS7-gx4Rbmcw?N1_oWS>RRh@*W>&a_;P91NTnmEK_#YsD$p+emAnwxM5laqjb(vPd* z7UbDptB6C57UZkAspRD|>SELT+8&fAI3dgA9<7Ro$D;kDG#XVy@Ld)GxJ6zrB0Yia z{?k5nmi(-&lC|;z$+@nMH%f5awWF-bvH3F@3O4d!1EVaqa3IKBX~4nS^P_hCu2&Ou zonaV^l`4+*1Xofh>dh^$S=@Y}{cvw!E-K!At)yJGk~)8W9X;F+l@rFQ)xZ&*=X^mO zFR|AWXc5c*d@_j6C3U9eeb6q3P!OjWOoP1|jtk0nN}E;Ef8j-Tzuu?LEO;`bWWzNJp;Z??3p^NMx3L!;1>#p8Di>ai}P zJQ`KG73Iu%1f*Q(KqWpt{&?$RG|;z2T!DTcADM}Jj;wr3+`BOY_lJ`A~OT0vF-$xZAjRzYnU&g zQ;5ToWj^R`sVB|r*g!NX&#DtR;@zu4DHaZCHw+Cxd=Fs;=t?5x;w+z``VKyW>6@`- zdzqEh%T97s!oRp95A>pGv ztZ=tI#JopntEEQuNtD+y-lMMSe)Hzm)Vcg#?RW2cMK$VEt#PCq(w&Wv?rY5cCVO=9 zyIAzGV27Gd`0NM=F%j9QzvA?Gl<=r{lKV4#>hZ3_)m-H*b+*DMQyka9hYW_d*iT$! zSy)M>LaggT@hzNv>rz5^tg9SFbbBZ3Bjc*hlK|Fx!eF{3ys1 zYY0~yBU+T6(O!;$%~Xj6V3)DM5Q3@t6X3EmRdTlIi!-YS*G(Lo+*3HO(B z&n9$~k|6#gI(4xv_;$xBx2PmN&a7oa{xzT~ z8?q~^hufE(Lzn&e2!S?NZKp!?fe2b4#lJ#a`JP>(2~ zpt2vJ9|1M3KKhsi>SI&FDD(+Y0(C=U)tmb0s~^()(Jb|Tq~?BEUG%9cx{Z%c;Kb5K zNw*P9bR?8P=#j9AM@2C1H?(LXj2dq8;%jbX^qk)KO^<3$p!G*7;m}&YfI(p9 zphhNoiU@sLo+sD(1)_zIzJ=%~KAm>nR6}x3Es2a`hS~W}a18GLpOjL;Pb7hMByLL7 zlHIb6CT=2Ub5afIY2iR@NiaGf0TxM~CX025gKA#4iq~M|k?8weB$f3P1H0A>uy|Hv zj>35(5EAD24uT(=$V6@<5p}QW zalqQpl${tf#B`{y&PR39@LyAuT(RELp_BH_u|OSiEdydfov3;3`}O8s4q+dfvL{;W z0WC{6187DKAQkm)OQ-MI4^JW$-SG& zcg?tq#B~O->HUZ?QH3>xk4o}g3JJ@I`Q+c6Fc%J8A8-JL1KIKFxcf`T)Yt(FHmXL- zjlE)o4urU2pwpWWVM7zThv>_ClX>uroD5}%jmFDh!#7q`BtwMr(Z&|t5{`gPKYk(Z7>#5;8NV;eW zMzFV-hKHw?j`D@s#@;Ogy2{f8pzfRMROGYBeVEVYm)=e1{d9?Nr0_{~Y$ls4AW7nc zN@eD=BmIb!JKF))c}6`oyRufig@lWIarGAEIU7F+R=aQUG36jTh61&Vl}53&wS~AUQkRGg zKL)1<*U$;S5)S=1M3(NhTPpkg*yu!tjDn?L*o1JrL&XbmYq=mX)QBLPm zi18DM_ia`nAVnduGq)%d!&G3QUFiCT)Cf?k6X)lr!W z>0=1^rs5?;4k=>Y@^-uFdHM~_TM9v%T51YC*!^hqQO;LnQdm@{BM*>%6QctAIj0Z6 z{a#89`oCaH40lBaG|_mjrbQ zxH&-=vluDUO?5gtVoKOwUd`m^(?QZ+SPDV*WalyK+Df-7%|NJac@CVgEmS3KjIR}ocb)#ad;gu`fm9o34&UT`GGfp(g$k3lV z7svTbhyD}N+*xPv*&%0Fw;mv)V^_jkN%-uN5>sr{K@OT|I*E>GCPga~B08d%ly4od z*n+({47P-H2A>XS{gMX;DsCy%R<_1G#p1$An(RK5$9BH;AHQ#Y(c8wWHoBT$%f zq2#shK*N%l-;>Ug8oal=b+@=%-;$Wf;VHY#(eZ_KfLH&PU$PFQ!+E>sLYK-QP@s z=uu)I(r0BUvxF^xgxAR9{M-^jI@bNg6gJ3X>O!PPAyZgM=L;F^nfR#9D}s39fVWd4 zC*8U_=}$I3vA#6-c5x{;7q9IB17a>i_5_3x@TEc-_**|HLW3-13#;_5pHg$f@0N4R zq1P$5sz&0=;5@CKqzRyc9}rIgaQ6j*3%bZb}STW?G z3ez=KOa{^aU@}zqjJQUU;s6W<(Y4gcD1d)2g@YlooTJd8_8`dvm8^u%eF@Rba2IUq zLm9gUHczd6aqgi1oq7w23Zf0z``@D0LH}7bRNHP9y$`64j?t&>%zSyfmEkTd1lQE5 zmRGIR_C63UB*OWom0fgB&qTpnBsj#1+#d(82>s?1^h|LvyS(;Zw;cn5Eks_2>?my5 z=sWC?r7W~PDl$UqTl8&ac|Mn)r9AVLyR3#|bACN8{OnH40D`-tRPc)=5=mN34WtC4 zYKj(jMBdvi7K%dNVEwzbb{+NAL@lD`P48>k{e-s-D9yDxt1|;M@YrG>V&DM;_li=% zFG$z^N<$Bulpv558={h;Gw4Fkj1tKq^h_Us`>GoBe~@l0^jh4iG~pV96HX5Vn~Mfw z#_&5SWKPf)jBZV`AX{GZUZt$n?Iac?Ku{Ubg7jmuhjoUGTmWeS4k_n7z*&)w3~VdZrgV>w*WgS?{0xj>%?g|mr@OQifEBj?yM!FJ#cn%fu@!8T7k3K z;h{n)kChetNVz3=JqZUM0rBJ2G|HEC(Qe3PmdlZ11Gt6T&}5dthw(JMwwi;shNnyE zW#|`B(83MaPgeW6;}_ zcy5X~P(wtAa3C(C=)P~+yx62Um=2`Suz!GlV83CPEwUAX9fu~fi@5?dIYuw&2ln&; z%!emghVIM8-;S@D-Td4ap!?G}dEfUfNq)#5BSgYH7?MmMeaPl~nQQKn+z|>F!Ftdk zA9in)SsK%VmUGa>SzK7^;2@rm^gK`xX{gK@1*F$lpQL-}|r}%2Phbq+B6=zm+LZ zb%HElc|XKKXYt;y4^tK{!D%{mT;J^knpbCb=;DD&*@sEHc4*2Db3yub!lXjXcOJB$ z%v61#Vk_FW`HJq?0d-~sYsANQ1}5bUUg$di6g+ZIu08O}nTSCNUgWht@E;1@fQsrZ zh z{#_XxWT+{eEGCY-sV=6wE?jSLs5RK)y$aQJA$OZ_UPjlwOhHXd0I?}2k>HPqN9ewY z!{6@f)1~pt>g*DS0IX3p8XX*gqbrn=xHqEa;kzTbUG4dYlaaq}hr*e2Gc z1l~lYWq>N3a1=M8lk*p7BFsxKct=#w@8Xp240$fY!00f_03*Xv#`#@H(9XCI#7#)> zNK&N%mE9#qLR&|6Vct2P*HsFq+=<;AvFQz&R(%yMyeEJ~qkj zk0OJIqkTeiN&zfRMLoTR0`m`0$5^Lc>=7vyBPB279MW!V%@L%$2E@Y;6{T?h;|cZT zfh|zf_t+NcD?|ca&wg{V6vE~0&fo*THi46HXU(S%;qn=)L3uDtp&sYmz@C;xpFbj8 zO%f1!VLF&SB2=Q1v3EstYmwyF8&U6Ma`t#zl~Rp2Pd}FD5?EW?djNZRyM4zn7jhTT z?Ddl?so|CGGBfWVyQ@+(#ars4up_CL9pgwtQ*%c|0_I-3HCBVU#+>kX>3c}+Jz*B* zHmY&N*x(~V%Xv?!7!!R&kjLIv$7uPTygF7fZ1)ktcK;CErcl=Dz6o}-+*BvwzM-Ec zrr~+(qU-(?)yJ2C?1irNko|vvD$Tvzzm7H1U~mw2)=zwZ(Bi>pK4U)|T{1T_g$D%% z6!&x(#m<0~q1m0_S|5l4oEcOnG$0r~!_hWSxRfqCM@kU!$dt^^6F9W?wo54aF<6V|DVZc-dW2cRHvAk#|h0U zT#nyPsiBabLpR0nzyOnD;vFtJ`J5NfI<026M~w7GQMhvxf_1q(Wq`z~)WwTb~&_p#~Vsu>r)2?Cp*{ ztp@#Xk+TU^>8KPXCSpsZN8cESVC(PCTvX>vL4CHOx!TVC^#O!h1uvkMfH(FxHE@4`NMxYvO0DTKrd zZ66I&R-ZU)Y77O+5!$cm3aZy}T=RmnJ3ycsrS=%&&Qbc%CZy0HpL$b{Lg*(s`S-bI zDn-{!$*mw<(C;6@ilaj(UAhZ0ToPVLzOYv=$N;1od`;AI-aPX)-# zd}quKV)-)pd@c{c34cD~)%9gRI9SUfqyggc5964tgUpy#YkRw!a0T*IavV7{19<#G z=>_tDp60{Q;D5nTqBq5ml1;I?IA$gXBn?HY(Rp>^4ssYMoq2$$$JgPhYgQ=qr6L!5COj$N-eVK$R2bv|e1xy7Lp;PFyMVMwHi$?K#6wrK zRPC{1toyn;$7xW}3rXVg6^zNh>4eD-Rhb9WWBXpn=HR4XRCrtyP~X}sn@f!B&L^#+ z#*73UV-gf+Svjct3XU1Ren9I}c9ks8U4zX2mUBy;DdU)=(x#gWij69qB&3cfDffec z>VEJB*PN1i0_rchjOz^?kybtwKS>J-Zf$Qz^sC_nDOUvsk_*8oXb^~~9K&G4W>}-+ z7QMvwf!Jc7HO}BI%iH1!sv(+Z};KqaQo2b92649xuJ*p=Msxc9Bg>XE{ztY z6WK~A9Bcyl!;qI@;#2iza4j=tZ6b>5VvnZN!!593={~7WM;?%4uS_u^%n#k~rqreV zmJ2xraF!QQRIDlcqsW|%d-jnBQQYyJ4QOKfkQlk~oVHsb$F^|)mk!tAa9}!Vpe-yQ zY5w}0Kd|3MT(D}*```eLKD-&5swyq1fs2z09`;+`Dr1#tRx(~a(jLy7IKgO|XcN}m8_RKB1&toY~ z$rQ`!Wh7Iq+RQYE;FBATO{wq74`gnjo_r<;HT_z5fnO0VWzLCtNXQH z$}Z&Te#dvStGCc&nc~40^0~DYsBE<(ZvceEcMvSb6MZZMitk~LoX$xlD~DGnuyWi9 zb+%JBQ(7O(H>4=QZXu~JX2hWT5Bf-pl`1rV7cQB?j^=DfnIqy$gELouknZ&+pC9@( z{pIB4cAS@??oiv0)A0VOy(h-w<4coWv_T6_deh?9`CAC^Tx$pzQO zp!N8S1wQoQ9j-jOUE#aLj3#VP2am$$B9rq1W9%C+x@VD1(&ppHcX10aU2w?hHOBVq zb?iPkN*FDzP^Qk<3rJ=#KS)WHq%W3dfwzKX(AbnZzsBe1tcdx*NC+ahPJ7YIz-u?iyDR7NlCCg zE{0b)^a;8ca412#tMwC`>XMm%CX~=O`N~K2B)iiWr3Gzms&v1uEOsMs! z5hL;A0%_QQN&)C>I0t^?)Yv!r)p@8A!BLgwZWOW^^oxih3rOdyYAibPq6Wm$jE?Sx zrtE4@bb~*I`h^n%TrD6m|ui zJP*PFzc^CZ@>=C)1uhqyrn91m$e*rm16s$SBw4YQW_zzx)f+V!Ov{--RAar?zJpM$ zGK?csK0;`*KFM>8sY?gI6HE1)_rQ5sosYCH3wzSSwOfx@V4R1)fQ(7)uh7})-8#Ll z9*=aYNg7d6qE>X8PPdNn@o6!krCYZi@foPM@4#CuqN-c_vbv~|Ho*tmqI2qMKfSVz zt_;4UE@idd1*YZ7JZNy%&@;!QrKk%km`h81M?6)a3 z__6Qwt5ac(oX%X6Qai90VOTQPYH6cG=)G6$yD6j3s7vHbsv_#1bgQuJC5LN@4+<*k zl308=k;Zk0aBJ&XYJuL99o|K!Xs9T5bfr}JxzizEG)Yw7~R@I`x!q!+_J#s$ao>7^|EM8OTok;m^M^E&q~)&2qO zpfx9{!o+seaPV+#Is4v7>hkw-rX@!(Z`C*FIUb1ev9n7nh-fIjm76Idv|$N}?rY28 z`VJ^l(%B@xzM9J|7K-mJ7T&`cx`HunW((`$Id5^xGnJcE>EflHUG3R;p>_P3` zUqdYIps*E6(TBOPOx80y^qwVZMYxbiC7_`jfCay9Cr=I)e23B65)5 z?pE0VE7i3XoJPxY={&hD_iHkfhR1W3lkbq$+#N~**?1uAp^*2Q$`ZiOm03orbN5mU zk+*@9i+pC0S2KAk*Kixxhtr+7NXTZO*h#;I0@4Q@guq)?$i7c~b1SRarR@7CJpex~ zlS*bG?tq(AFCN&sK&zR?1>}5g6ZbGIfhKb&MS-Ewe$&`Ff@EU6Z&fi89g;Y70LE7gi)VkMk7CuRz<(avnqnW7~84vo4Q!n$h^4p0- zL!XvgfSrE>1F+*xT*q#pcJwjW*pnx_bk)=X49^H@Txkl`wHUu^?iZ4i&Gcq)5%F~2 zWrwN`O5yXQYZPj2u)1hA3`n+J-`v}t$m}-S4`Q@)S*SbF0ywy>KxRJlxmMDd5BIT+ zapjZrDLtz+vO`a)e3Pd1Uts9M)Obo+S4lGTjy`7ScB1LhRTIr3lgPY#y$2F$a{24f z;HUMK!_L3L(VOqk<_7wfU&kKh-L;=V(H?@bPj`)GhS9v~PWOPOZ&x8Y455g$bpIX7 zyIgkQYqO3$ku=uB;Pj-~71cU2Sfs$ngtkTMHTNg_K2CpD4F(@N>%Uv_+NdGfE`5@I zN|R2w!%3M9BG-J{a1eTXdaQ&E)TEyN8<_1nk8T{aJEvgaxA+@j=Wjn12$E{|uxi zJi`Z>fYf3=%(yM2_SKKmm(_)xdVQzrO+s1`AVP!coM)c|6<{rKrPZrC6<=8_C0xs?MGHBT& zbGvrdeEyv%pEp<@Xz*y%^sb8|>ii-d4|2W#D4vdeq}{q1JS`mcm%(|SF|pQWlDhKJ z7o!q<3#7#*v5Xw|9~f!A>dMj|VN#|$E?Oqd=6qOq_+z$DQ@3sjr|E|ey^&`wAAJKD zvz{H!NzHm`Z1A(2tVHgnkEZg&ne{sq{^OhV3^JKn&rQvM?PfhUkC|rL@oXzXr(?%T_Byvth}HI? zxA>I=4gnt}=QoklgzD~MbgtF~A$#b1yh}o?Jj+_i1he%u?Y_pMnuofdQ_RO>8u{Xa z18E)bFJ0(*O>_c#x@*6L=-o+<-VOJSUeKdTY39;vtyi5P78xAdv=W#(u^t91`*L@5 z)GYa}sN!+W5xxIl87oCw*yqZLP}-C8H<3aOwJ*TPu_w?)+8cCUwA!e_H{4rc_0Wv} zAcpOaelj$8;@^K2T!H3EuDop};0mGEX6$yoKhjAr!}aJg;GRgPtpk_g;iSgI`O^qz z#YD=u9edWF-_{H|!8LvY+?@{3wi#xk*?vg=zf&Ud^hoV<6>e?@YmtzxkJFE%xF%oe z+*R?sq(x+ln_Q89jF5cI?Pcbt^%c?1CqPXEUt-k4%@d-wXG6`=IPFQ@65rE*eM+o9 zd3~U)lqM`J4RYTFaw7i{BNuL-5V@U0%gdK8%bF!5LkLX1x;+SVLey2uu{)D#<3>9f z)RI|_@xFTR&qnwDtB$OdW$!oqWI7%_j+E$T)W|0syI6>KF$md1RU=<=(_yw?FgR#E zqQfWd`&0eqe)kCI1Xj5)iAXPlhlN-C9IRDWosM+v$}={e(@Y~6H%0thiT*T9WKKI< zdRoHi;V3W%@xA(@_~`iT#3rmI(ktPF{Cv_08H*0KLpd)@rA31IWJ>dOAm<4n5=Da~ zI%eeG!f_*ZVyLzj2tJT=JIxBCxO7|?357SZ(|!i4TmzHH|o!Iv-Uryxsn`AB1V@6 zhC^_w$E<%Do;2fLO`=jtU-@KfI(omj^EYsW0cwj3%YL*K>tUwAUhY2p9rw+!gn7jg zWDb%r5ll$H{1bSxNrZ>NCOLlY=wmQQrZGf5hk`&2BnEo!OjPI_ge(#xf|G+BVMiES z_!|l6va^#x$+8c356ui;xqOHf`_I0?AP6QnybN!-gh>53HXAGk{fTbd%vcOE{bqmZ zL*|To&AzcFrK{dopho?mHGN#(IDc7eI6aC)Hk`CISSGOHq=O5aKRC#|;mGiN*h*&X zw5fhg+spzwsm-igo1xq7z+exy{4KN?-9iSD1Gmt=>)@cAo;Gr1a0zHFyp0ShmJM|O z&>QH+<)f_ASROGIe!)Vipsk%OrADPSft-ckOi$ctw;QeL$;tco@5f$FmiF3rCOKr_ zC8VVA#ltiIvrj#Pjy7k_%=uVY;R*#qt@ORWBq0d;_#KcYcj}X|K~7?L2>pvaZERla zc=G4_pIVTE{Ml-KZ)+m<(TVk|ADb2%8{A}LBi3ePWBux<{jPwSp5{i=)3HX=)9Y6^ zk8`lVE6=HM{oj@Gc5}~r;hOTFP%Z9Cd3yTUN(%)rQ3?~M#UFZG<2ShFHE#D%Jyh!d E0XwFj!~g&Q diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AddAssetsToGroupRequest.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AddAssetsToGroupRequest.php deleted file mode 100644 index c55045d848d3..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AddAssetsToGroupRequest.php +++ /dev/null @@ -1,257 +0,0 @@ -google.cloud.migrationcenter.v1.AddAssetsToGroupRequest - */ -class AddAssetsToGroupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Group reference. - * - * Generated from protobuf field string group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $group = ''; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - /** - * Required. List of assets to be added. - * The maximum number of assets that can be added in a single request is - * 1000. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.AssetList assets = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $assets = null; - /** - * Optional. When this value is set to `false` and one of the given assets is - * already an existing member of the group, the operation fails with an - * `Already Exists` error. When set to `true` this situation is silently - * ignored by the server. - * Default value is `false`. - * - * Generated from protobuf field bool allow_existing = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $allow_existing = false; - - /** - * @param string $group Required. Group reference. Please see - * {@see MigrationCenterClient::groupName()} for help formatting this field. - * - * @return \Google\Cloud\MigrationCenter\V1\AddAssetsToGroupRequest - * - * @experimental - */ - public static function build(string $group): self - { - return (new self()) - ->setGroup($group); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $group - * Required. Group reference. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @type \Google\Cloud\MigrationCenter\V1\AssetList $assets - * Required. List of assets to be added. - * The maximum number of assets that can be added in a single request is - * 1000. - * @type bool $allow_existing - * Optional. When this value is set to `false` and one of the given assets is - * already an existing member of the group, the operation fails with an - * `Already Exists` error. When set to `true` this situation is silently - * ignored by the server. - * Default value is `false`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Required. Group reference. - * - * Generated from protobuf field string group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getGroup() - { - return $this->group; - } - - /** - * Required. Group reference. - * - * Generated from protobuf field string group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setGroup($var) - { - GPBUtil::checkString($var, True); - $this->group = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - - /** - * Required. List of assets to be added. - * The maximum number of assets that can be added in a single request is - * 1000. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.AssetList assets = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\MigrationCenter\V1\AssetList|null - */ - public function getAssets() - { - return $this->assets; - } - - public function hasAssets() - { - return isset($this->assets); - } - - public function clearAssets() - { - unset($this->assets); - } - - /** - * Required. List of assets to be added. - * The maximum number of assets that can be added in a single request is - * 1000. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.AssetList assets = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\MigrationCenter\V1\AssetList $var - * @return $this - */ - public function setAssets($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\AssetList::class); - $this->assets = $var; - - return $this; - } - - /** - * Optional. When this value is set to `false` and one of the given assets is - * already an existing member of the group, the operation fails with an - * `Already Exists` error. When set to `true` this situation is silently - * ignored by the server. - * Default value is `false`. - * - * Generated from protobuf field bool allow_existing = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getAllowExisting() - { - return $this->allow_existing; - } - - /** - * Optional. When this value is set to `false` and one of the given assets is - * already an existing member of the group, the operation fails with an - * `Already Exists` error. When set to `true` this situation is silently - * ignored by the server. - * Default value is `false`. - * - * Generated from protobuf field bool allow_existing = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setAllowExisting($var) - { - GPBUtil::checkBool($var); - $this->allow_existing = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AggregateAssetsValuesRequest.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AggregateAssetsValuesRequest.php deleted file mode 100644 index 38de4a10663f..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AggregateAssetsValuesRequest.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.migrationcenter.v1.AggregateAssetsValuesRequest - */ -class AggregateAssetsValuesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Parent value for `AggregateAssetsValuesRequest`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $parent = ''; - /** - * Array of aggregations to perform. - * Up to 25 aggregations can be defined. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.Aggregation aggregations = 2; - */ - private $aggregations; - /** - * The aggregation will be performed on assets that match the provided filter. - * - * Generated from protobuf field string filter = 3; - */ - protected $filter = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Parent value for `AggregateAssetsValuesRequest`. - * @type array<\Google\Cloud\MigrationCenter\V1\Aggregation>|\Google\Protobuf\Internal\RepeatedField $aggregations - * Array of aggregations to perform. - * Up to 25 aggregations can be defined. - * @type string $filter - * The aggregation will be performed on assets that match the provided filter. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Required. Parent value for `AggregateAssetsValuesRequest`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Parent value for `AggregateAssetsValuesRequest`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Array of aggregations to perform. - * Up to 25 aggregations can be defined. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.Aggregation aggregations = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAggregations() - { - return $this->aggregations; - } - - /** - * Array of aggregations to perform. - * Up to 25 aggregations can be defined. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.Aggregation aggregations = 2; - * @param array<\Google\Cloud\MigrationCenter\V1\Aggregation>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAggregations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\Aggregation::class); - $this->aggregations = $arr; - - return $this; - } - - /** - * The aggregation will be performed on assets that match the provided filter. - * - * Generated from protobuf field string filter = 3; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * The aggregation will be performed on assets that match the provided filter. - * - * Generated from protobuf field string filter = 3; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AggregateAssetsValuesResponse.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AggregateAssetsValuesResponse.php deleted file mode 100644 index b41c3db831c6..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AggregateAssetsValuesResponse.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.migrationcenter.v1.AggregateAssetsValuesResponse - */ -class AggregateAssetsValuesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The aggregation results. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.AggregationResult results = 1; - */ - private $results; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\MigrationCenter\V1\AggregationResult>|\Google\Protobuf\Internal\RepeatedField $results - * The aggregation results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * The aggregation results. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.AggregationResult results = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getResults() - { - return $this->results; - } - - /** - * The aggregation results. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.AggregationResult results = 1; - * @param array<\Google\Cloud\MigrationCenter\V1\AggregationResult>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setResults($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\AggregationResult::class); - $this->results = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Aggregation.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Aggregation.php deleted file mode 100644 index 5035de75b22c..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Aggregation.php +++ /dev/null @@ -1,209 +0,0 @@ -google.cloud.migrationcenter.v1.Aggregation - */ -class Aggregation extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the field on which to aggregate. - * - * Generated from protobuf field string field = 1; - */ - protected $field = ''; - protected $aggregation_function; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $field - * The name of the field on which to aggregate. - * @type \Google\Cloud\MigrationCenter\V1\Aggregation\Count $count - * Count the number of matching objects. - * @type \Google\Cloud\MigrationCenter\V1\Aggregation\Sum $sum - * Sum over a numeric field. - * @type \Google\Cloud\MigrationCenter\V1\Aggregation\Histogram $histogram - * Creates a bucketed histogram of field values. - * @type \Google\Cloud\MigrationCenter\V1\Aggregation\Frequency $frequency - * Creates a frequency distribution of all field values. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * The name of the field on which to aggregate. - * - * Generated from protobuf field string field = 1; - * @return string - */ - public function getField() - { - return $this->field; - } - - /** - * The name of the field on which to aggregate. - * - * Generated from protobuf field string field = 1; - * @param string $var - * @return $this - */ - public function setField($var) - { - GPBUtil::checkString($var, True); - $this->field = $var; - - return $this; - } - - /** - * Count the number of matching objects. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.Aggregation.Count count = 2; - * @return \Google\Cloud\MigrationCenter\V1\Aggregation\Count|null - */ - public function getCount() - { - return $this->readOneof(2); - } - - public function hasCount() - { - return $this->hasOneof(2); - } - - /** - * Count the number of matching objects. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.Aggregation.Count count = 2; - * @param \Google\Cloud\MigrationCenter\V1\Aggregation\Count $var - * @return $this - */ - public function setCount($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\Aggregation\Count::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Sum over a numeric field. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.Aggregation.Sum sum = 3; - * @return \Google\Cloud\MigrationCenter\V1\Aggregation\Sum|null - */ - public function getSum() - { - return $this->readOneof(3); - } - - public function hasSum() - { - return $this->hasOneof(3); - } - - /** - * Sum over a numeric field. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.Aggregation.Sum sum = 3; - * @param \Google\Cloud\MigrationCenter\V1\Aggregation\Sum $var - * @return $this - */ - public function setSum($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\Aggregation\Sum::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Creates a bucketed histogram of field values. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.Aggregation.Histogram histogram = 4; - * @return \Google\Cloud\MigrationCenter\V1\Aggregation\Histogram|null - */ - public function getHistogram() - { - return $this->readOneof(4); - } - - public function hasHistogram() - { - return $this->hasOneof(4); - } - - /** - * Creates a bucketed histogram of field values. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.Aggregation.Histogram histogram = 4; - * @param \Google\Cloud\MigrationCenter\V1\Aggregation\Histogram $var - * @return $this - */ - public function setHistogram($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\Aggregation\Histogram::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Creates a frequency distribution of all field values. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.Aggregation.Frequency frequency = 5; - * @return \Google\Cloud\MigrationCenter\V1\Aggregation\Frequency|null - */ - public function getFrequency() - { - return $this->readOneof(5); - } - - public function hasFrequency() - { - return $this->hasOneof(5); - } - - /** - * Creates a frequency distribution of all field values. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.Aggregation.Frequency frequency = 5; - * @param \Google\Cloud\MigrationCenter\V1\Aggregation\Frequency $var - * @return $this - */ - public function setFrequency($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\Aggregation\Frequency::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * @return string - */ - public function getAggregationFunction() - { - return $this->whichOneof("aggregation_function"); - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Aggregation/Count.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Aggregation/Count.php deleted file mode 100644 index f55240e0af88..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Aggregation/Count.php +++ /dev/null @@ -1,36 +0,0 @@ -google.cloud.migrationcenter.v1.Aggregation.Count - */ -class Count extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Count::class, \Google\Cloud\MigrationCenter\V1\Aggregation_Count::class); - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Aggregation/Frequency.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Aggregation/Frequency.php deleted file mode 100644 index cf3d70ec7ef9..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Aggregation/Frequency.php +++ /dev/null @@ -1,36 +0,0 @@ -google.cloud.migrationcenter.v1.Aggregation.Frequency - */ -class Frequency extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Frequency::class, \Google\Cloud\MigrationCenter\V1\Aggregation_Frequency::class); - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Aggregation/Histogram.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Aggregation/Histogram.php deleted file mode 100644 index 73db78d7c763..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Aggregation/Histogram.php +++ /dev/null @@ -1,102 +0,0 @@ -google.cloud.migrationcenter.v1.Aggregation.Histogram - */ -class Histogram extends \Google\Protobuf\Internal\Message -{ - /** - * Lower bounds of buckets. - * The response will contain `n+1` buckets for `n` bounds. - * The first bucket will count all assets for which the field value is - * smaller than the first bound. - * Subsequent buckets will count assets for which the field value is - * greater or equal to a lower bound and smaller than the next one. - * The last bucket will count assets for which the field value is greater or - * equal to the final lower bound. - * You can define up to 20 lower bounds. - * - * Generated from protobuf field repeated double lower_bounds = 1; - */ - private $lower_bounds; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $lower_bounds - * Lower bounds of buckets. - * The response will contain `n+1` buckets for `n` bounds. - * The first bucket will count all assets for which the field value is - * smaller than the first bound. - * Subsequent buckets will count assets for which the field value is - * greater or equal to a lower bound and smaller than the next one. - * The last bucket will count assets for which the field value is greater or - * equal to the final lower bound. - * You can define up to 20 lower bounds. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Lower bounds of buckets. - * The response will contain `n+1` buckets for `n` bounds. - * The first bucket will count all assets for which the field value is - * smaller than the first bound. - * Subsequent buckets will count assets for which the field value is - * greater or equal to a lower bound and smaller than the next one. - * The last bucket will count assets for which the field value is greater or - * equal to the final lower bound. - * You can define up to 20 lower bounds. - * - * Generated from protobuf field repeated double lower_bounds = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getLowerBounds() - { - return $this->lower_bounds; - } - - /** - * Lower bounds of buckets. - * The response will contain `n+1` buckets for `n` bounds. - * The first bucket will count all assets for which the field value is - * smaller than the first bound. - * Subsequent buckets will count assets for which the field value is - * greater or equal to a lower bound and smaller than the next one. - * The last bucket will count assets for which the field value is greater or - * equal to the final lower bound. - * You can define up to 20 lower bounds. - * - * Generated from protobuf field repeated double lower_bounds = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setLowerBounds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::DOUBLE); - $this->lower_bounds = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Histogram::class, \Google\Cloud\MigrationCenter\V1\Aggregation_Histogram::class); - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Aggregation/Sum.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Aggregation/Sum.php deleted file mode 100644 index 5181d3c7a311..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Aggregation/Sum.php +++ /dev/null @@ -1,36 +0,0 @@ -google.cloud.migrationcenter.v1.Aggregation.Sum - */ -class Sum extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Sum::class, \Google\Cloud\MigrationCenter\V1\Aggregation_Sum::class); - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AggregationResult.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AggregationResult.php deleted file mode 100644 index bc0d13e64663..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AggregationResult.php +++ /dev/null @@ -1,181 +0,0 @@ -google.cloud.migrationcenter.v1.AggregationResult - */ -class AggregationResult extends \Google\Protobuf\Internal\Message -{ - /** - * Generated from protobuf field string field = 1; - */ - protected $field = ''; - protected $result; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $field - * @type \Google\Cloud\MigrationCenter\V1\AggregationResult\Count $count - * @type \Google\Cloud\MigrationCenter\V1\AggregationResult\Sum $sum - * @type \Google\Cloud\MigrationCenter\V1\AggregationResult\Histogram $histogram - * @type \Google\Cloud\MigrationCenter\V1\AggregationResult\Frequency $frequency - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Generated from protobuf field string field = 1; - * @return string - */ - public function getField() - { - return $this->field; - } - - /** - * Generated from protobuf field string field = 1; - * @param string $var - * @return $this - */ - public function setField($var) - { - GPBUtil::checkString($var, True); - $this->field = $var; - - return $this; - } - - /** - * Generated from protobuf field .google.cloud.migrationcenter.v1.AggregationResult.Count count = 2; - * @return \Google\Cloud\MigrationCenter\V1\AggregationResult\Count|null - */ - public function getCount() - { - return $this->readOneof(2); - } - - public function hasCount() - { - return $this->hasOneof(2); - } - - /** - * Generated from protobuf field .google.cloud.migrationcenter.v1.AggregationResult.Count count = 2; - * @param \Google\Cloud\MigrationCenter\V1\AggregationResult\Count $var - * @return $this - */ - public function setCount($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\AggregationResult\Count::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Generated from protobuf field .google.cloud.migrationcenter.v1.AggregationResult.Sum sum = 3; - * @return \Google\Cloud\MigrationCenter\V1\AggregationResult\Sum|null - */ - public function getSum() - { - return $this->readOneof(3); - } - - public function hasSum() - { - return $this->hasOneof(3); - } - - /** - * Generated from protobuf field .google.cloud.migrationcenter.v1.AggregationResult.Sum sum = 3; - * @param \Google\Cloud\MigrationCenter\V1\AggregationResult\Sum $var - * @return $this - */ - public function setSum($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\AggregationResult\Sum::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Generated from protobuf field .google.cloud.migrationcenter.v1.AggregationResult.Histogram histogram = 4; - * @return \Google\Cloud\MigrationCenter\V1\AggregationResult\Histogram|null - */ - public function getHistogram() - { - return $this->readOneof(4); - } - - public function hasHistogram() - { - return $this->hasOneof(4); - } - - /** - * Generated from protobuf field .google.cloud.migrationcenter.v1.AggregationResult.Histogram histogram = 4; - * @param \Google\Cloud\MigrationCenter\V1\AggregationResult\Histogram $var - * @return $this - */ - public function setHistogram($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\AggregationResult\Histogram::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Generated from protobuf field .google.cloud.migrationcenter.v1.AggregationResult.Frequency frequency = 5; - * @return \Google\Cloud\MigrationCenter\V1\AggregationResult\Frequency|null - */ - public function getFrequency() - { - return $this->readOneof(5); - } - - public function hasFrequency() - { - return $this->hasOneof(5); - } - - /** - * Generated from protobuf field .google.cloud.migrationcenter.v1.AggregationResult.Frequency frequency = 5; - * @param \Google\Cloud\MigrationCenter\V1\AggregationResult\Frequency $var - * @return $this - */ - public function setFrequency($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\AggregationResult\Frequency::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * @return string - */ - public function getResult() - { - return $this->whichOneof("result"); - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AggregationResult/Count.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AggregationResult/Count.php deleted file mode 100644 index 82125a40ceb6..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AggregationResult/Count.php +++ /dev/null @@ -1,63 +0,0 @@ -google.cloud.migrationcenter.v1.AggregationResult.Count - */ -class Count extends \Google\Protobuf\Internal\Message -{ - /** - * Generated from protobuf field int64 value = 1; - */ - protected $value = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $value - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Generated from protobuf field int64 value = 1; - * @return int|string - */ - public function getValue() - { - return $this->value; - } - - /** - * Generated from protobuf field int64 value = 1; - * @param int|string $var - * @return $this - */ - public function setValue($var) - { - GPBUtil::checkInt64($var); - $this->value = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Count::class, \Google\Cloud\MigrationCenter\V1\AggregationResult_Count::class); - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AggregationResult/Frequency.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AggregationResult/Frequency.php deleted file mode 100644 index abcbadcdaa59..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AggregationResult/Frequency.php +++ /dev/null @@ -1,63 +0,0 @@ -google.cloud.migrationcenter.v1.AggregationResult.Frequency - */ -class Frequency extends \Google\Protobuf\Internal\Message -{ - /** - * Generated from protobuf field map values = 1; - */ - private $values; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\MapField $values - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Generated from protobuf field map values = 1; - * @return \Google\Protobuf\Internal\MapField - */ - public function getValues() - { - return $this->values; - } - - /** - * Generated from protobuf field map values = 1; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setValues($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::INT64); - $this->values = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Frequency::class, \Google\Cloud\MigrationCenter\V1\AggregationResult_Frequency::class); - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AggregationResult/Histogram.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AggregationResult/Histogram.php deleted file mode 100644 index 0343bc4390f2..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AggregationResult/Histogram.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.migrationcenter.v1.AggregationResult.Histogram - */ -class Histogram extends \Google\Protobuf\Internal\Message -{ - /** - * Buckets in the histogram. - * There will be `n+1` buckets matching `n` lower bounds in the request. - * The first bucket will be from -infinity to the first bound. - * Subsequent buckets will be between one bound and the next. - * The final bucket will be from the final bound to infinity. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket buckets = 1; - */ - private $buckets; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\MigrationCenter\V1\AggregationResult\Histogram\Bucket>|\Google\Protobuf\Internal\RepeatedField $buckets - * Buckets in the histogram. - * There will be `n+1` buckets matching `n` lower bounds in the request. - * The first bucket will be from -infinity to the first bound. - * Subsequent buckets will be between one bound and the next. - * The final bucket will be from the final bound to infinity. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Buckets in the histogram. - * There will be `n+1` buckets matching `n` lower bounds in the request. - * The first bucket will be from -infinity to the first bound. - * Subsequent buckets will be between one bound and the next. - * The final bucket will be from the final bound to infinity. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket buckets = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getBuckets() - { - return $this->buckets; - } - - /** - * Buckets in the histogram. - * There will be `n+1` buckets matching `n` lower bounds in the request. - * The first bucket will be from -infinity to the first bound. - * Subsequent buckets will be between one bound and the next. - * The final bucket will be from the final bound to infinity. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket buckets = 1; - * @param array<\Google\Cloud\MigrationCenter\V1\AggregationResult\Histogram\Bucket>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setBuckets($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\AggregationResult\Histogram\Bucket::class); - $this->buckets = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Histogram::class, \Google\Cloud\MigrationCenter\V1\AggregationResult_Histogram::class); - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AggregationResult/Histogram/Bucket.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AggregationResult/Histogram/Bucket.php deleted file mode 100644 index bfc4030ab137..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AggregationResult/Histogram/Bucket.php +++ /dev/null @@ -1,141 +0,0 @@ -google.cloud.migrationcenter.v1.AggregationResult.Histogram.Bucket - */ -class Bucket extends \Google\Protobuf\Internal\Message -{ - /** - * Lower bound - inclusive. - * - * Generated from protobuf field double lower_bound = 1; - */ - protected $lower_bound = 0.0; - /** - * Upper bound - exclusive. - * - * Generated from protobuf field double upper_bound = 2; - */ - protected $upper_bound = 0.0; - /** - * Count of items in the bucket. - * - * Generated from protobuf field int64 count = 3; - */ - protected $count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $lower_bound - * Lower bound - inclusive. - * @type float $upper_bound - * Upper bound - exclusive. - * @type int|string $count - * Count of items in the bucket. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Lower bound - inclusive. - * - * Generated from protobuf field double lower_bound = 1; - * @return float - */ - public function getLowerBound() - { - return $this->lower_bound; - } - - /** - * Lower bound - inclusive. - * - * Generated from protobuf field double lower_bound = 1; - * @param float $var - * @return $this - */ - public function setLowerBound($var) - { - GPBUtil::checkDouble($var); - $this->lower_bound = $var; - - return $this; - } - - /** - * Upper bound - exclusive. - * - * Generated from protobuf field double upper_bound = 2; - * @return float - */ - public function getUpperBound() - { - return $this->upper_bound; - } - - /** - * Upper bound - exclusive. - * - * Generated from protobuf field double upper_bound = 2; - * @param float $var - * @return $this - */ - public function setUpperBound($var) - { - GPBUtil::checkDouble($var); - $this->upper_bound = $var; - - return $this; - } - - /** - * Count of items in the bucket. - * - * Generated from protobuf field int64 count = 3; - * @return int|string - */ - public function getCount() - { - return $this->count; - } - - /** - * Count of items in the bucket. - * - * Generated from protobuf field int64 count = 3; - * @param int|string $var - * @return $this - */ - public function setCount($var) - { - GPBUtil::checkInt64($var); - $this->count = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Bucket::class, \Google\Cloud\MigrationCenter\V1\AggregationResult_Histogram_Bucket::class); - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AggregationResult/Sum.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AggregationResult/Sum.php deleted file mode 100644 index 414a36fa146a..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AggregationResult/Sum.php +++ /dev/null @@ -1,63 +0,0 @@ -google.cloud.migrationcenter.v1.AggregationResult.Sum - */ -class Sum extends \Google\Protobuf\Internal\Message -{ - /** - * Generated from protobuf field double value = 1; - */ - protected $value = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $value - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Generated from protobuf field double value = 1; - * @return float - */ - public function getValue() - { - return $this->value; - } - - /** - * Generated from protobuf field double value = 1; - * @param float $var - * @return $this - */ - public function setValue($var) - { - GPBUtil::checkDouble($var); - $this->value = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Sum::class, \Google\Cloud\MigrationCenter\V1\AggregationResult_Sum::class); - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Asset.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Asset.php deleted file mode 100644 index 7838a624d2b5..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Asset.php +++ /dev/null @@ -1,425 +0,0 @@ -google.cloud.migrationcenter.v1.Asset - */ -class Asset extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The full name of the asset. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. The timestamp when the asset was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The timestamp when the asset was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Labels as key value pairs. - * - * Generated from protobuf field map labels = 4; - */ - private $labels; - /** - * Generic asset attributes. - * - * Generated from protobuf field map attributes = 5; - */ - private $attributes; - /** - * Output only. The list of insights associated with the asset. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.InsightList insight_list = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $insight_list = null; - /** - * Output only. Performance data for the asset. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.AssetPerformanceData performance_data = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $performance_data = null; - /** - * Output only. The list of sources contributing to the asset. - * - * Generated from protobuf field repeated string sources = 22 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - private $sources; - /** - * Output only. The list of groups that the asset is assigned to. - * - * Generated from protobuf field repeated string assigned_groups = 23 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - private $assigned_groups; - protected $AssetDetails; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The full name of the asset. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The timestamp when the asset was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The timestamp when the asset was last updated. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Labels as key value pairs. - * @type array|\Google\Protobuf\Internal\MapField $attributes - * Generic asset attributes. - * @type \Google\Cloud\MigrationCenter\V1\MachineDetails $machine_details - * Output only. Asset information specific for virtual and physical - * machines. - * @type \Google\Cloud\MigrationCenter\V1\InsightList $insight_list - * Output only. The list of insights associated with the asset. - * @type \Google\Cloud\MigrationCenter\V1\AssetPerformanceData $performance_data - * Output only. Performance data for the asset. - * @type array|\Google\Protobuf\Internal\RepeatedField $sources - * Output only. The list of sources contributing to the asset. - * @type array|\Google\Protobuf\Internal\RepeatedField $assigned_groups - * Output only. The list of groups that the asset is assigned to. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The full name of the asset. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The full name of the asset. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. The timestamp when the asset was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The timestamp when the asset was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The timestamp when the asset was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The timestamp when the asset was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Labels as key value pairs. - * - * Generated from protobuf field map labels = 4; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Labels as key value pairs. - * - * Generated from protobuf field map labels = 4; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Generic asset attributes. - * - * Generated from protobuf field map attributes = 5; - * @return \Google\Protobuf\Internal\MapField - */ - public function getAttributes() - { - return $this->attributes; - } - - /** - * Generic asset attributes. - * - * Generated from protobuf field map attributes = 5; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setAttributes($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->attributes = $arr; - - return $this; - } - - /** - * Output only. Asset information specific for virtual and physical - * machines. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.MachineDetails machine_details = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\MigrationCenter\V1\MachineDetails|null - */ - public function getMachineDetails() - { - return $this->readOneof(6); - } - - public function hasMachineDetails() - { - return $this->hasOneof(6); - } - - /** - * Output only. Asset information specific for virtual and physical - * machines. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.MachineDetails machine_details = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\MigrationCenter\V1\MachineDetails $var - * @return $this - */ - public function setMachineDetails($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\MachineDetails::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * Output only. The list of insights associated with the asset. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.InsightList insight_list = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\MigrationCenter\V1\InsightList|null - */ - public function getInsightList() - { - return $this->insight_list; - } - - public function hasInsightList() - { - return isset($this->insight_list); - } - - public function clearInsightList() - { - unset($this->insight_list); - } - - /** - * Output only. The list of insights associated with the asset. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.InsightList insight_list = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\MigrationCenter\V1\InsightList $var - * @return $this - */ - public function setInsightList($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\InsightList::class); - $this->insight_list = $var; - - return $this; - } - - /** - * Output only. Performance data for the asset. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.AssetPerformanceData performance_data = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\MigrationCenter\V1\AssetPerformanceData|null - */ - public function getPerformanceData() - { - return $this->performance_data; - } - - public function hasPerformanceData() - { - return isset($this->performance_data); - } - - public function clearPerformanceData() - { - unset($this->performance_data); - } - - /** - * Output only. Performance data for the asset. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.AssetPerformanceData performance_data = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\MigrationCenter\V1\AssetPerformanceData $var - * @return $this - */ - public function setPerformanceData($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\AssetPerformanceData::class); - $this->performance_data = $var; - - return $this; - } - - /** - * Output only. The list of sources contributing to the asset. - * - * Generated from protobuf field repeated string sources = 22 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSources() - { - return $this->sources; - } - - /** - * Output only. The list of sources contributing to the asset. - * - * Generated from protobuf field repeated string sources = 22 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSources($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->sources = $arr; - - return $this; - } - - /** - * Output only. The list of groups that the asset is assigned to. - * - * Generated from protobuf field repeated string assigned_groups = 23 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAssignedGroups() - { - return $this->assigned_groups; - } - - /** - * Output only. The list of groups that the asset is assigned to. - * - * Generated from protobuf field repeated string assigned_groups = 23 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAssignedGroups($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->assigned_groups = $arr; - - return $this; - } - - /** - * @return string - */ - public function getAssetDetails() - { - return $this->whichOneof("AssetDetails"); - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AssetFrame.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AssetFrame.php deleted file mode 100644 index cbd99ab9cb59..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AssetFrame.php +++ /dev/null @@ -1,263 +0,0 @@ -google.cloud.migrationcenter.v1.AssetFrame - */ -class AssetFrame extends \Google\Protobuf\Internal\Message -{ - /** - * The time the data was reported. - * - * Generated from protobuf field .google.protobuf.Timestamp report_time = 10; - */ - protected $report_time = null; - /** - * Labels as key value pairs. - * - * Generated from protobuf field map labels = 11; - */ - private $labels; - /** - * Generic asset attributes. - * - * Generated from protobuf field map attributes = 12; - */ - private $attributes; - /** - * Asset performance data samples. - * Samples that are from more than 40 days ago or after tomorrow are ignored. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.PerformanceSample performance_samples = 13; - */ - private $performance_samples; - /** - * Optional. Trace token is optionally provided to assist with debugging and - * traceability. - * - * Generated from protobuf field string trace_token = 14 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $trace_token = ''; - protected $FrameData; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\MigrationCenter\V1\MachineDetails $machine_details - * Asset information specific for virtual machines. - * @type \Google\Protobuf\Timestamp $report_time - * The time the data was reported. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Labels as key value pairs. - * @type array|\Google\Protobuf\Internal\MapField $attributes - * Generic asset attributes. - * @type array<\Google\Cloud\MigrationCenter\V1\PerformanceSample>|\Google\Protobuf\Internal\RepeatedField $performance_samples - * Asset performance data samples. - * Samples that are from more than 40 days ago or after tomorrow are ignored. - * @type string $trace_token - * Optional. Trace token is optionally provided to assist with debugging and - * traceability. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Asset information specific for virtual machines. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.MachineDetails machine_details = 1; - * @return \Google\Cloud\MigrationCenter\V1\MachineDetails|null - */ - public function getMachineDetails() - { - return $this->readOneof(1); - } - - public function hasMachineDetails() - { - return $this->hasOneof(1); - } - - /** - * Asset information specific for virtual machines. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.MachineDetails machine_details = 1; - * @param \Google\Cloud\MigrationCenter\V1\MachineDetails $var - * @return $this - */ - public function setMachineDetails($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\MachineDetails::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * The time the data was reported. - * - * Generated from protobuf field .google.protobuf.Timestamp report_time = 10; - * @return \Google\Protobuf\Timestamp|null - */ - public function getReportTime() - { - return $this->report_time; - } - - public function hasReportTime() - { - return isset($this->report_time); - } - - public function clearReportTime() - { - unset($this->report_time); - } - - /** - * The time the data was reported. - * - * Generated from protobuf field .google.protobuf.Timestamp report_time = 10; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setReportTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->report_time = $var; - - return $this; - } - - /** - * Labels as key value pairs. - * - * Generated from protobuf field map labels = 11; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Labels as key value pairs. - * - * Generated from protobuf field map labels = 11; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Generic asset attributes. - * - * Generated from protobuf field map attributes = 12; - * @return \Google\Protobuf\Internal\MapField - */ - public function getAttributes() - { - return $this->attributes; - } - - /** - * Generic asset attributes. - * - * Generated from protobuf field map attributes = 12; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setAttributes($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->attributes = $arr; - - return $this; - } - - /** - * Asset performance data samples. - * Samples that are from more than 40 days ago or after tomorrow are ignored. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.PerformanceSample performance_samples = 13; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPerformanceSamples() - { - return $this->performance_samples; - } - - /** - * Asset performance data samples. - * Samples that are from more than 40 days ago or after tomorrow are ignored. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.PerformanceSample performance_samples = 13; - * @param array<\Google\Cloud\MigrationCenter\V1\PerformanceSample>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPerformanceSamples($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\PerformanceSample::class); - $this->performance_samples = $arr; - - return $this; - } - - /** - * Optional. Trace token is optionally provided to assist with debugging and - * traceability. - * - * Generated from protobuf field string trace_token = 14 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getTraceToken() - { - return $this->trace_token; - } - - /** - * Optional. Trace token is optionally provided to assist with debugging and - * traceability. - * - * Generated from protobuf field string trace_token = 14 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setTraceToken($var) - { - GPBUtil::checkString($var, True); - $this->trace_token = $var; - - return $this; - } - - /** - * @return string - */ - public function getFrameData() - { - return $this->whichOneof("FrameData"); - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AssetList.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AssetList.php deleted file mode 100644 index 0f91dbc432d0..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AssetList.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.migrationcenter.v1.AssetList - */ -class AssetList extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A list of asset IDs - * - * Generated from protobuf field repeated string asset_ids = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - private $asset_ids; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $asset_ids - * Required. A list of asset IDs - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Required. A list of asset IDs - * - * Generated from protobuf field repeated string asset_ids = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAssetIds() - { - return $this->asset_ids; - } - - /** - * Required. A list of asset IDs - * - * Generated from protobuf field repeated string asset_ids = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAssetIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->asset_ids = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AssetPerformanceData.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AssetPerformanceData.php deleted file mode 100644 index a043cf9248e9..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AssetPerformanceData.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.migrationcenter.v1.AssetPerformanceData - */ -class AssetPerformanceData extends \Google\Protobuf\Internal\Message -{ - /** - * Daily resource usage aggregations. - * Contains all of the data available for an asset, up to the last 420 days. - * Aggregations are sorted from oldest to most recent. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation daily_resource_usage_aggregations = 1; - */ - private $daily_resource_usage_aggregations; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\MigrationCenter\V1\DailyResourceUsageAggregation>|\Google\Protobuf\Internal\RepeatedField $daily_resource_usage_aggregations - * Daily resource usage aggregations. - * Contains all of the data available for an asset, up to the last 420 days. - * Aggregations are sorted from oldest to most recent. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Daily resource usage aggregations. - * Contains all of the data available for an asset, up to the last 420 days. - * Aggregations are sorted from oldest to most recent. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation daily_resource_usage_aggregations = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDailyResourceUsageAggregations() - { - return $this->daily_resource_usage_aggregations; - } - - /** - * Daily resource usage aggregations. - * Contains all of the data available for an asset, up to the last 420 days. - * Aggregations are sorted from oldest to most recent. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation daily_resource_usage_aggregations = 1; - * @param array<\Google\Cloud\MigrationCenter\V1\DailyResourceUsageAggregation>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDailyResourceUsageAggregations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\DailyResourceUsageAggregation::class); - $this->daily_resource_usage_aggregations = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AssetView.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AssetView.php deleted file mode 100644 index 8a7721b084f7..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AssetView.php +++ /dev/null @@ -1,63 +0,0 @@ -google.cloud.migrationcenter.v1.AssetView - */ -class AssetView -{ - /** - * The asset view is not specified. The API displays the basic view by - * default. - * - * Generated from protobuf enum ASSET_VIEW_UNSPECIFIED = 0; - */ - const ASSET_VIEW_UNSPECIFIED = 0; - /** - * The asset view includes only basic metadata of the asset. - * - * Generated from protobuf enum ASSET_VIEW_BASIC = 1; - */ - const ASSET_VIEW_BASIC = 1; - /** - * The asset view includes all the metadata of an asset and performance data. - * - * Generated from protobuf enum ASSET_VIEW_FULL = 2; - */ - const ASSET_VIEW_FULL = 2; - - private static $valueToName = [ - self::ASSET_VIEW_UNSPECIFIED => 'ASSET_VIEW_UNSPECIFIED', - self::ASSET_VIEW_BASIC => 'ASSET_VIEW_BASIC', - self::ASSET_VIEW_FULL => 'ASSET_VIEW_FULL', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AwsEc2PlatformDetails.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AwsEc2PlatformDetails.php deleted file mode 100644 index a296b339037a..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AwsEc2PlatformDetails.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.migrationcenter.v1.AwsEc2PlatformDetails - */ -class AwsEc2PlatformDetails extends \Google\Protobuf\Internal\Message -{ - /** - * AWS platform's machine type label. - * - * Generated from protobuf field string machine_type_label = 1; - */ - protected $machine_type_label = ''; - /** - * The location of the machine in the AWS format. - * - * Generated from protobuf field string location = 2; - */ - protected $location = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $machine_type_label - * AWS platform's machine type label. - * @type string $location - * The location of the machine in the AWS format. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * AWS platform's machine type label. - * - * Generated from protobuf field string machine_type_label = 1; - * @return string - */ - public function getMachineTypeLabel() - { - return $this->machine_type_label; - } - - /** - * AWS platform's machine type label. - * - * Generated from protobuf field string machine_type_label = 1; - * @param string $var - * @return $this - */ - public function setMachineTypeLabel($var) - { - GPBUtil::checkString($var, True); - $this->machine_type_label = $var; - - return $this; - } - - /** - * The location of the machine in the AWS format. - * - * Generated from protobuf field string location = 2; - * @return string - */ - public function getLocation() - { - return $this->location; - } - - /** - * The location of the machine in the AWS format. - * - * Generated from protobuf field string location = 2; - * @param string $var - * @return $this - */ - public function setLocation($var) - { - GPBUtil::checkString($var, True); - $this->location = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AzureVmPlatformDetails.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AzureVmPlatformDetails.php deleted file mode 100644 index 301fdf059374..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/AzureVmPlatformDetails.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.migrationcenter.v1.AzureVmPlatformDetails - */ -class AzureVmPlatformDetails extends \Google\Protobuf\Internal\Message -{ - /** - * Azure platform's machine type label. - * - * Generated from protobuf field string machine_type_label = 1; - */ - protected $machine_type_label = ''; - /** - * The location of the machine in the Azure format. - * - * Generated from protobuf field string location = 2; - */ - protected $location = ''; - /** - * Azure platform's provisioning state. - * - * Generated from protobuf field string provisioning_state = 3; - */ - protected $provisioning_state = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $machine_type_label - * Azure platform's machine type label. - * @type string $location - * The location of the machine in the Azure format. - * @type string $provisioning_state - * Azure platform's provisioning state. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Azure platform's machine type label. - * - * Generated from protobuf field string machine_type_label = 1; - * @return string - */ - public function getMachineTypeLabel() - { - return $this->machine_type_label; - } - - /** - * Azure platform's machine type label. - * - * Generated from protobuf field string machine_type_label = 1; - * @param string $var - * @return $this - */ - public function setMachineTypeLabel($var) - { - GPBUtil::checkString($var, True); - $this->machine_type_label = $var; - - return $this; - } - - /** - * The location of the machine in the Azure format. - * - * Generated from protobuf field string location = 2; - * @return string - */ - public function getLocation() - { - return $this->location; - } - - /** - * The location of the machine in the Azure format. - * - * Generated from protobuf field string location = 2; - * @param string $var - * @return $this - */ - public function setLocation($var) - { - GPBUtil::checkString($var, True); - $this->location = $var; - - return $this; - } - - /** - * Azure platform's provisioning state. - * - * Generated from protobuf field string provisioning_state = 3; - * @return string - */ - public function getProvisioningState() - { - return $this->provisioning_state; - } - - /** - * Azure platform's provisioning state. - * - * Generated from protobuf field string provisioning_state = 3; - * @param string $var - * @return $this - */ - public function setProvisioningState($var) - { - GPBUtil::checkString($var, True); - $this->provisioning_state = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/BatchDeleteAssetsRequest.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/BatchDeleteAssetsRequest.php deleted file mode 100644 index bd2d1da5d670..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/BatchDeleteAssetsRequest.php +++ /dev/null @@ -1,170 +0,0 @@ -google.cloud.migrationcenter.v1.BatchDeleteAssetsRequest - */ -class BatchDeleteAssetsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Parent value for batch asset delete. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The IDs of the assets to delete. - * A maximum of 1000 assets can be deleted in a batch. - * Format: projects/{project}/locations/{location}/assets/{name}. - * - * Generated from protobuf field repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - private $names; - /** - * Optional. When this value is set to `true` the request is a no-op for - * non-existing assets. See https://google.aip.dev/135#delete-if-existing for - * additional details. Default value is `false`. - * - * Generated from protobuf field bool allow_missing = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $allow_missing = false; - - /** - * @param string $parent Required. Parent value for batch asset delete. Please see - * {@see MigrationCenterClient::locationName()} for help formatting this field. - * @param string[] $names Required. The IDs of the assets to delete. - * A maximum of 1000 assets can be deleted in a batch. - * Format: projects/{project}/locations/{location}/assets/{name}. Please see - * {@see MigrationCenterClient::assetName()} for help formatting this field. - * - * @return \Google\Cloud\MigrationCenter\V1\BatchDeleteAssetsRequest - * - * @experimental - */ - public static function build(string $parent, array $names): self - { - return (new self()) - ->setParent($parent) - ->setNames($names); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Parent value for batch asset delete. - * @type array|\Google\Protobuf\Internal\RepeatedField $names - * Required. The IDs of the assets to delete. - * A maximum of 1000 assets can be deleted in a batch. - * Format: projects/{project}/locations/{location}/assets/{name}. - * @type bool $allow_missing - * Optional. When this value is set to `true` the request is a no-op for - * non-existing assets. See https://google.aip.dev/135#delete-if-existing for - * additional details. Default value is `false`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Required. Parent value for batch asset delete. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Parent value for batch asset delete. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The IDs of the assets to delete. - * A maximum of 1000 assets can be deleted in a batch. - * Format: projects/{project}/locations/{location}/assets/{name}. - * - * Generated from protobuf field repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNames() - { - return $this->names; - } - - /** - * Required. The IDs of the assets to delete. - * A maximum of 1000 assets can be deleted in a batch. - * Format: projects/{project}/locations/{location}/assets/{name}. - * - * Generated from protobuf field repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNames($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->names = $arr; - - return $this; - } - - /** - * Optional. When this value is set to `true` the request is a no-op for - * non-existing assets. See https://google.aip.dev/135#delete-if-existing for - * additional details. Default value is `false`. - * - * Generated from protobuf field bool allow_missing = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getAllowMissing() - { - return $this->allow_missing; - } - - /** - * Optional. When this value is set to `true` the request is a no-op for - * non-existing assets. See https://google.aip.dev/135#delete-if-existing for - * additional details. Default value is `false`. - * - * Generated from protobuf field bool allow_missing = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setAllowMissing($var) - { - GPBUtil::checkBool($var); - $this->allow_missing = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/BatchUpdateAssetsRequest.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/BatchUpdateAssetsRequest.php deleted file mode 100644 index 84257e43ba54..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/BatchUpdateAssetsRequest.php +++ /dev/null @@ -1,122 +0,0 @@ -google.cloud.migrationcenter.v1.BatchUpdateAssetsRequest - */ -class BatchUpdateAssetsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Parent value for batch asset update. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The request message specifying the resources to update. - * A maximum of 1000 assets can be modified in a batch. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.UpdateAssetRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private $requests; - - /** - * @param string $parent Required. Parent value for batch asset update. Please see - * {@see MigrationCenterClient::locationName()} for help formatting this field. - * @param \Google\Cloud\MigrationCenter\V1\UpdateAssetRequest[] $requests Required. The request message specifying the resources to update. - * A maximum of 1000 assets can be modified in a batch. - * - * @return \Google\Cloud\MigrationCenter\V1\BatchUpdateAssetsRequest - * - * @experimental - */ - public static function build(string $parent, array $requests): self - { - return (new self()) - ->setParent($parent) - ->setRequests($requests); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Parent value for batch asset update. - * @type array<\Google\Cloud\MigrationCenter\V1\UpdateAssetRequest>|\Google\Protobuf\Internal\RepeatedField $requests - * Required. The request message specifying the resources to update. - * A maximum of 1000 assets can be modified in a batch. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Required. Parent value for batch asset update. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Parent value for batch asset update. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The request message specifying the resources to update. - * A maximum of 1000 assets can be modified in a batch. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.UpdateAssetRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRequests() - { - return $this->requests; - } - - /** - * Required. The request message specifying the resources to update. - * A maximum of 1000 assets can be modified in a batch. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.UpdateAssetRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param array<\Google\Cloud\MigrationCenter\V1\UpdateAssetRequest>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRequests($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\UpdateAssetRequest::class); - $this->requests = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/BatchUpdateAssetsResponse.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/BatchUpdateAssetsResponse.php deleted file mode 100644 index 1ab18be8f7c6..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/BatchUpdateAssetsResponse.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.migrationcenter.v1.BatchUpdateAssetsResponse - */ -class BatchUpdateAssetsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Update asset content. - * The content only includes values after field mask being applied. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.Asset assets = 1; - */ - private $assets; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\MigrationCenter\V1\Asset>|\Google\Protobuf\Internal\RepeatedField $assets - * Update asset content. - * The content only includes values after field mask being applied. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Update asset content. - * The content only includes values after field mask being applied. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.Asset assets = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAssets() - { - return $this->assets; - } - - /** - * Update asset content. - * The content only includes values after field mask being applied. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.Asset assets = 1; - * @param array<\Google\Cloud\MigrationCenter\V1\Asset>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAssets($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\Asset::class); - $this->assets = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/BiosDetails.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/BiosDetails.php deleted file mode 100644 index 13d0fe01664b..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/BiosDetails.php +++ /dev/null @@ -1,256 +0,0 @@ -google.cloud.migrationcenter.v1.BiosDetails - */ -class BiosDetails extends \Google\Protobuf\Internal\Message -{ - /** - * BIOS name. - * This fields is deprecated. Please use the `id` field instead. - * - * Generated from protobuf field string bios_name = 1 [deprecated = true]; - * @deprecated - */ - protected $bios_name = ''; - /** - * BIOS ID. - * - * Generated from protobuf field string id = 2; - */ - protected $id = ''; - /** - * BIOS manufacturer. - * - * Generated from protobuf field string manufacturer = 3; - */ - protected $manufacturer = ''; - /** - * BIOS version. - * - * Generated from protobuf field string version = 4; - */ - protected $version = ''; - /** - * BIOS release date. - * - * Generated from protobuf field .google.type.Date release_date = 5; - */ - protected $release_date = null; - /** - * SMBIOS UUID. - * - * Generated from protobuf field string smbios_uuid = 6; - */ - protected $smbios_uuid = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $bios_name - * BIOS name. - * This fields is deprecated. Please use the `id` field instead. - * @type string $id - * BIOS ID. - * @type string $manufacturer - * BIOS manufacturer. - * @type string $version - * BIOS version. - * @type \Google\Type\Date $release_date - * BIOS release date. - * @type string $smbios_uuid - * SMBIOS UUID. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * BIOS name. - * This fields is deprecated. Please use the `id` field instead. - * - * Generated from protobuf field string bios_name = 1 [deprecated = true]; - * @return string - * @deprecated - */ - public function getBiosName() - { - @trigger_error('bios_name is deprecated.', E_USER_DEPRECATED); - return $this->bios_name; - } - - /** - * BIOS name. - * This fields is deprecated. Please use the `id` field instead. - * - * Generated from protobuf field string bios_name = 1 [deprecated = true]; - * @param string $var - * @return $this - * @deprecated - */ - public function setBiosName($var) - { - @trigger_error('bios_name is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkString($var, True); - $this->bios_name = $var; - - return $this; - } - - /** - * BIOS ID. - * - * Generated from protobuf field string id = 2; - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * BIOS ID. - * - * Generated from protobuf field string id = 2; - * @param string $var - * @return $this - */ - public function setId($var) - { - GPBUtil::checkString($var, True); - $this->id = $var; - - return $this; - } - - /** - * BIOS manufacturer. - * - * Generated from protobuf field string manufacturer = 3; - * @return string - */ - public function getManufacturer() - { - return $this->manufacturer; - } - - /** - * BIOS manufacturer. - * - * Generated from protobuf field string manufacturer = 3; - * @param string $var - * @return $this - */ - public function setManufacturer($var) - { - GPBUtil::checkString($var, True); - $this->manufacturer = $var; - - return $this; - } - - /** - * BIOS version. - * - * Generated from protobuf field string version = 4; - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * BIOS version. - * - * Generated from protobuf field string version = 4; - * @param string $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkString($var, True); - $this->version = $var; - - return $this; - } - - /** - * BIOS release date. - * - * Generated from protobuf field .google.type.Date release_date = 5; - * @return \Google\Type\Date|null - */ - public function getReleaseDate() - { - return $this->release_date; - } - - public function hasReleaseDate() - { - return isset($this->release_date); - } - - public function clearReleaseDate() - { - unset($this->release_date); - } - - /** - * BIOS release date. - * - * Generated from protobuf field .google.type.Date release_date = 5; - * @param \Google\Type\Date $var - * @return $this - */ - public function setReleaseDate($var) - { - GPBUtil::checkMessage($var, \Google\Type\Date::class); - $this->release_date = $var; - - return $this; - } - - /** - * SMBIOS UUID. - * - * Generated from protobuf field string smbios_uuid = 6; - * @return string - */ - public function getSmbiosUuid() - { - return $this->smbios_uuid; - } - - /** - * SMBIOS UUID. - * - * Generated from protobuf field string smbios_uuid = 6; - * @param string $var - * @return $this - */ - public function setSmbiosUuid($var) - { - GPBUtil::checkString($var, True); - $this->smbios_uuid = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/CommitmentPlan.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/CommitmentPlan.php deleted file mode 100644 index ccbcd5e00664..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/CommitmentPlan.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.migrationcenter.v1.CommitmentPlan - */ -class CommitmentPlan -{ - /** - * Unspecified commitment plan. - * - * Generated from protobuf enum COMMITMENT_PLAN_UNSPECIFIED = 0; - */ - const COMMITMENT_PLAN_UNSPECIFIED = 0; - /** - * No commitment plan. - * - * Generated from protobuf enum COMMITMENT_PLAN_NONE = 1; - */ - const COMMITMENT_PLAN_NONE = 1; - /** - * 1 year commitment. - * - * Generated from protobuf enum COMMITMENT_PLAN_ONE_YEAR = 2; - */ - const COMMITMENT_PLAN_ONE_YEAR = 2; - /** - * 3 years commitment. - * - * Generated from protobuf enum COMMITMENT_PLAN_THREE_YEARS = 3; - */ - const COMMITMENT_PLAN_THREE_YEARS = 3; - - private static $valueToName = [ - self::COMMITMENT_PLAN_UNSPECIFIED => 'COMMITMENT_PLAN_UNSPECIFIED', - self::COMMITMENT_PLAN_NONE => 'COMMITMENT_PLAN_NONE', - self::COMMITMENT_PLAN_ONE_YEAR => 'COMMITMENT_PLAN_ONE_YEAR', - self::COMMITMENT_PLAN_THREE_YEARS => 'COMMITMENT_PLAN_THREE_YEARS', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ComputeEngineMigrationTarget.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ComputeEngineMigrationTarget.php deleted file mode 100644 index e03c6fabc843..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ComputeEngineMigrationTarget.php +++ /dev/null @@ -1,77 +0,0 @@ -google.cloud.migrationcenter.v1.ComputeEngineMigrationTarget - */ -class ComputeEngineMigrationTarget extends \Google\Protobuf\Internal\Message -{ - /** - * Description of the suggested shape for the migration target. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor shape = 1; - */ - protected $shape = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\MigrationCenter\V1\ComputeEngineShapeDescriptor $shape - * Description of the suggested shape for the migration target. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Description of the suggested shape for the migration target. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor shape = 1; - * @return \Google\Cloud\MigrationCenter\V1\ComputeEngineShapeDescriptor|null - */ - public function getShape() - { - return $this->shape; - } - - public function hasShape() - { - return isset($this->shape); - } - - public function clearShape() - { - unset($this->shape); - } - - /** - * Description of the suggested shape for the migration target. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor shape = 1; - * @param \Google\Cloud\MigrationCenter\V1\ComputeEngineShapeDescriptor $var - * @return $this - */ - public function setShape($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\ComputeEngineShapeDescriptor::class); - $this->shape = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ComputeEnginePreferences.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ComputeEnginePreferences.php deleted file mode 100644 index 34c9dbe357d2..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ComputeEnginePreferences.php +++ /dev/null @@ -1,119 +0,0 @@ -google.cloud.migrationcenter.v1.ComputeEnginePreferences - */ -class ComputeEnginePreferences extends \Google\Protobuf\Internal\Message -{ - /** - * Preferences concerning the machine types to consider on Compute Engine. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.MachinePreferences machine_preferences = 2; - */ - protected $machine_preferences = null; - /** - * License type to consider when calculating costs for virtual machine - * insights and recommendations. If unspecified, costs are calculated - * based on the default licensing plan. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.LicenseType license_type = 3; - */ - protected $license_type = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\MigrationCenter\V1\MachinePreferences $machine_preferences - * Preferences concerning the machine types to consider on Compute Engine. - * @type int $license_type - * License type to consider when calculating costs for virtual machine - * insights and recommendations. If unspecified, costs are calculated - * based on the default licensing plan. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Preferences concerning the machine types to consider on Compute Engine. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.MachinePreferences machine_preferences = 2; - * @return \Google\Cloud\MigrationCenter\V1\MachinePreferences|null - */ - public function getMachinePreferences() - { - return $this->machine_preferences; - } - - public function hasMachinePreferences() - { - return isset($this->machine_preferences); - } - - public function clearMachinePreferences() - { - unset($this->machine_preferences); - } - - /** - * Preferences concerning the machine types to consider on Compute Engine. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.MachinePreferences machine_preferences = 2; - * @param \Google\Cloud\MigrationCenter\V1\MachinePreferences $var - * @return $this - */ - public function setMachinePreferences($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\MachinePreferences::class); - $this->machine_preferences = $var; - - return $this; - } - - /** - * License type to consider when calculating costs for virtual machine - * insights and recommendations. If unspecified, costs are calculated - * based on the default licensing plan. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.LicenseType license_type = 3; - * @return int - */ - public function getLicenseType() - { - return $this->license_type; - } - - /** - * License type to consider when calculating costs for virtual machine - * insights and recommendations. If unspecified, costs are calculated - * based on the default licensing plan. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.LicenseType license_type = 3; - * @param int $var - * @return $this - */ - public function setLicenseType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\MigrationCenter\V1\LicenseType::class); - $this->license_type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ComputeEngineShapeDescriptor.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ComputeEngineShapeDescriptor.php deleted file mode 100644 index 3df71598456b..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ComputeEngineShapeDescriptor.php +++ /dev/null @@ -1,237 +0,0 @@ -google.cloud.migrationcenter.v1.ComputeEngineShapeDescriptor - */ -class ComputeEngineShapeDescriptor extends \Google\Protobuf\Internal\Message -{ - /** - * Memory in mebibytes. - * - * Generated from protobuf field int32 memory_mb = 1; - */ - protected $memory_mb = 0; - /** - * Number of physical cores. - * - * Generated from protobuf field int32 physical_core_count = 2; - */ - protected $physical_core_count = 0; - /** - * Number of logical cores. - * - * Generated from protobuf field int32 logical_core_count = 3; - */ - protected $logical_core_count = 0; - /** - * Compute Engine machine series. - * - * Generated from protobuf field string series = 4; - */ - protected $series = ''; - /** - * Compute Engine machine type. - * - * Generated from protobuf field string machine_type = 5; - */ - protected $machine_type = ''; - /** - * Compute Engine storage. Never empty. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ComputeStorageDescriptor storage = 6; - */ - private $storage; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $memory_mb - * Memory in mebibytes. - * @type int $physical_core_count - * Number of physical cores. - * @type int $logical_core_count - * Number of logical cores. - * @type string $series - * Compute Engine machine series. - * @type string $machine_type - * Compute Engine machine type. - * @type array<\Google\Cloud\MigrationCenter\V1\ComputeStorageDescriptor>|\Google\Protobuf\Internal\RepeatedField $storage - * Compute Engine storage. Never empty. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Memory in mebibytes. - * - * Generated from protobuf field int32 memory_mb = 1; - * @return int - */ - public function getMemoryMb() - { - return $this->memory_mb; - } - - /** - * Memory in mebibytes. - * - * Generated from protobuf field int32 memory_mb = 1; - * @param int $var - * @return $this - */ - public function setMemoryMb($var) - { - GPBUtil::checkInt32($var); - $this->memory_mb = $var; - - return $this; - } - - /** - * Number of physical cores. - * - * Generated from protobuf field int32 physical_core_count = 2; - * @return int - */ - public function getPhysicalCoreCount() - { - return $this->physical_core_count; - } - - /** - * Number of physical cores. - * - * Generated from protobuf field int32 physical_core_count = 2; - * @param int $var - * @return $this - */ - public function setPhysicalCoreCount($var) - { - GPBUtil::checkInt32($var); - $this->physical_core_count = $var; - - return $this; - } - - /** - * Number of logical cores. - * - * Generated from protobuf field int32 logical_core_count = 3; - * @return int - */ - public function getLogicalCoreCount() - { - return $this->logical_core_count; - } - - /** - * Number of logical cores. - * - * Generated from protobuf field int32 logical_core_count = 3; - * @param int $var - * @return $this - */ - public function setLogicalCoreCount($var) - { - GPBUtil::checkInt32($var); - $this->logical_core_count = $var; - - return $this; - } - - /** - * Compute Engine machine series. - * - * Generated from protobuf field string series = 4; - * @return string - */ - public function getSeries() - { - return $this->series; - } - - /** - * Compute Engine machine series. - * - * Generated from protobuf field string series = 4; - * @param string $var - * @return $this - */ - public function setSeries($var) - { - GPBUtil::checkString($var, True); - $this->series = $var; - - return $this; - } - - /** - * Compute Engine machine type. - * - * Generated from protobuf field string machine_type = 5; - * @return string - */ - public function getMachineType() - { - return $this->machine_type; - } - - /** - * Compute Engine machine type. - * - * Generated from protobuf field string machine_type = 5; - * @param string $var - * @return $this - */ - public function setMachineType($var) - { - GPBUtil::checkString($var, True); - $this->machine_type = $var; - - return $this; - } - - /** - * Compute Engine storage. Never empty. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ComputeStorageDescriptor storage = 6; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getStorage() - { - return $this->storage; - } - - /** - * Compute Engine storage. Never empty. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ComputeStorageDescriptor storage = 6; - * @param array<\Google\Cloud\MigrationCenter\V1\ComputeStorageDescriptor>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setStorage($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\ComputeStorageDescriptor::class); - $this->storage = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ComputeMigrationTargetProduct.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ComputeMigrationTargetProduct.php deleted file mode 100644 index de1c5e1e2915..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ComputeMigrationTargetProduct.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.migrationcenter.v1.ComputeMigrationTargetProduct - */ -class ComputeMigrationTargetProduct -{ - /** - * Unspecified (default value). - * - * Generated from protobuf enum COMPUTE_MIGRATION_TARGET_PRODUCT_UNSPECIFIED = 0; - */ - const COMPUTE_MIGRATION_TARGET_PRODUCT_UNSPECIFIED = 0; - /** - * Prefer to migrate to Google Cloud Compute Engine. - * - * Generated from protobuf enum COMPUTE_MIGRATION_TARGET_PRODUCT_COMPUTE_ENGINE = 1; - */ - const COMPUTE_MIGRATION_TARGET_PRODUCT_COMPUTE_ENGINE = 1; - /** - * Prefer to migrate to Google Cloud VMware Engine. - * - * Generated from protobuf enum COMPUTE_MIGRATION_TARGET_PRODUCT_VMWARE_ENGINE = 2; - */ - const COMPUTE_MIGRATION_TARGET_PRODUCT_VMWARE_ENGINE = 2; - /** - * Prefer to migrate to Google Cloud Sole Tenant Nodes. - * - * Generated from protobuf enum COMPUTE_MIGRATION_TARGET_PRODUCT_SOLE_TENANCY = 3; - */ - const COMPUTE_MIGRATION_TARGET_PRODUCT_SOLE_TENANCY = 3; - - private static $valueToName = [ - self::COMPUTE_MIGRATION_TARGET_PRODUCT_UNSPECIFIED => 'COMPUTE_MIGRATION_TARGET_PRODUCT_UNSPECIFIED', - self::COMPUTE_MIGRATION_TARGET_PRODUCT_COMPUTE_ENGINE => 'COMPUTE_MIGRATION_TARGET_PRODUCT_COMPUTE_ENGINE', - self::COMPUTE_MIGRATION_TARGET_PRODUCT_VMWARE_ENGINE => 'COMPUTE_MIGRATION_TARGET_PRODUCT_VMWARE_ENGINE', - self::COMPUTE_MIGRATION_TARGET_PRODUCT_SOLE_TENANCY => 'COMPUTE_MIGRATION_TARGET_PRODUCT_SOLE_TENANCY', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ComputeStorageDescriptor.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ComputeStorageDescriptor.php deleted file mode 100644 index bca525749f7a..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ComputeStorageDescriptor.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.migrationcenter.v1.ComputeStorageDescriptor - */ -class ComputeStorageDescriptor extends \Google\Protobuf\Internal\Message -{ - /** - * Disk type backing the storage. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.PersistentDiskType type = 1; - */ - protected $type = 0; - /** - * Disk size in GiB. - * - * Generated from protobuf field int32 size_gb = 2; - */ - protected $size_gb = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $type - * Disk type backing the storage. - * @type int $size_gb - * Disk size in GiB. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Disk type backing the storage. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.PersistentDiskType type = 1; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Disk type backing the storage. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.PersistentDiskType type = 1; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\MigrationCenter\V1\PersistentDiskType::class); - $this->type = $var; - - return $this; - } - - /** - * Disk size in GiB. - * - * Generated from protobuf field int32 size_gb = 2; - * @return int - */ - public function getSizeGb() - { - return $this->size_gb; - } - - /** - * Disk size in GiB. - * - * Generated from protobuf field int32 size_gb = 2; - * @param int $var - * @return $this - */ - public function setSizeGb($var) - { - GPBUtil::checkInt32($var); - $this->size_gb = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/CpuUsageSample.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/CpuUsageSample.php deleted file mode 100644 index 9670ebb811f7..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/CpuUsageSample.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.migrationcenter.v1.CpuUsageSample - */ -class CpuUsageSample extends \Google\Protobuf\Internal\Message -{ - /** - * Percentage of total CPU capacity utilized. Must be in the interval [0, - * 100]. On most systems can be calculated using 100 - idle percentage. - * - * Generated from protobuf field float utilized_percentage = 1; - */ - protected $utilized_percentage = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $utilized_percentage - * Percentage of total CPU capacity utilized. Must be in the interval [0, - * 100]. On most systems can be calculated using 100 - idle percentage. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Percentage of total CPU capacity utilized. Must be in the interval [0, - * 100]. On most systems can be calculated using 100 - idle percentage. - * - * Generated from protobuf field float utilized_percentage = 1; - * @return float - */ - public function getUtilizedPercentage() - { - return $this->utilized_percentage; - } - - /** - * Percentage of total CPU capacity utilized. Must be in the interval [0, - * 100]. On most systems can be calculated using 100 - idle percentage. - * - * Generated from protobuf field float utilized_percentage = 1; - * @param float $var - * @return $this - */ - public function setUtilizedPercentage($var) - { - GPBUtil::checkFloat($var); - $this->utilized_percentage = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/CreateGroupRequest.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/CreateGroupRequest.php deleted file mode 100644 index eaae81c59883..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/CreateGroupRequest.php +++ /dev/null @@ -1,257 +0,0 @@ -google.cloud.migrationcenter.v1.CreateGroupRequest - */ -class CreateGroupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Value for parent. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. User specified ID for the group. It will become the last - * component of the group name. The ID must be unique within the project, must - * conform with RFC-1034, is restricted to lower-cased letters, and has a - * maximum length of 63 characters. The ID must match the regular expression: - * `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`. - * - * Generated from protobuf field string group_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $group_id = ''; - /** - * Required. The group resource being created. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.Group group = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $group = null; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param string $parent Required. Value for parent. Please see - * {@see MigrationCenterClient::locationName()} for help formatting this field. - * @param \Google\Cloud\MigrationCenter\V1\Group $group Required. The group resource being created. - * @param string $groupId Required. User specified ID for the group. It will become the last - * component of the group name. The ID must be unique within the project, must - * conform with RFC-1034, is restricted to lower-cased letters, and has a - * maximum length of 63 characters. The ID must match the regular expression: - * `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`. - * - * @return \Google\Cloud\MigrationCenter\V1\CreateGroupRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\MigrationCenter\V1\Group $group, string $groupId): self - { - return (new self()) - ->setParent($parent) - ->setGroup($group) - ->setGroupId($groupId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Value for parent. - * @type string $group_id - * Required. User specified ID for the group. It will become the last - * component of the group name. The ID must be unique within the project, must - * conform with RFC-1034, is restricted to lower-cased letters, and has a - * maximum length of 63 characters. The ID must match the regular expression: - * `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`. - * @type \Google\Cloud\MigrationCenter\V1\Group $group - * Required. The group resource being created. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Required. Value for parent. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Value for parent. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. User specified ID for the group. It will become the last - * component of the group name. The ID must be unique within the project, must - * conform with RFC-1034, is restricted to lower-cased letters, and has a - * maximum length of 63 characters. The ID must match the regular expression: - * `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`. - * - * Generated from protobuf field string group_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getGroupId() - { - return $this->group_id; - } - - /** - * Required. User specified ID for the group. It will become the last - * component of the group name. The ID must be unique within the project, must - * conform with RFC-1034, is restricted to lower-cased letters, and has a - * maximum length of 63 characters. The ID must match the regular expression: - * `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`. - * - * Generated from protobuf field string group_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setGroupId($var) - { - GPBUtil::checkString($var, True); - $this->group_id = $var; - - return $this; - } - - /** - * Required. The group resource being created. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.Group group = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\MigrationCenter\V1\Group|null - */ - public function getGroup() - { - return $this->group; - } - - public function hasGroup() - { - return isset($this->group); - } - - public function clearGroup() - { - unset($this->group); - } - - /** - * Required. The group resource being created. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.Group group = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\MigrationCenter\V1\Group $var - * @return $this - */ - public function setGroup($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\Group::class); - $this->group = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/CreateImportDataFileRequest.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/CreateImportDataFileRequest.php deleted file mode 100644 index 5f81d9e8f1c3..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/CreateImportDataFileRequest.php +++ /dev/null @@ -1,237 +0,0 @@ -google.cloud.migrationcenter.v1.CreateImportDataFileRequest - */ -class CreateImportDataFileRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the parent of the ImportDataFile. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The ID of the new data file. - * - * Generated from protobuf field string import_data_file_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $import_data_file_id = ''; - /** - * Required. The resource being created. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ImportDataFile import_data_file = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $import_data_file = null; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param string $parent Required. Name of the parent of the ImportDataFile. Please see - * {@see MigrationCenterClient::importJobName()} for help formatting this field. - * @param \Google\Cloud\MigrationCenter\V1\ImportDataFile $importDataFile Required. The resource being created. - * @param string $importDataFileId Required. The ID of the new data file. - * - * @return \Google\Cloud\MigrationCenter\V1\CreateImportDataFileRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\MigrationCenter\V1\ImportDataFile $importDataFile, string $importDataFileId): self - { - return (new self()) - ->setParent($parent) - ->setImportDataFile($importDataFile) - ->setImportDataFileId($importDataFileId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Name of the parent of the ImportDataFile. - * @type string $import_data_file_id - * Required. The ID of the new data file. - * @type \Google\Cloud\MigrationCenter\V1\ImportDataFile $import_data_file - * Required. The resource being created. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the parent of the ImportDataFile. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Name of the parent of the ImportDataFile. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The ID of the new data file. - * - * Generated from protobuf field string import_data_file_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getImportDataFileId() - { - return $this->import_data_file_id; - } - - /** - * Required. The ID of the new data file. - * - * Generated from protobuf field string import_data_file_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setImportDataFileId($var) - { - GPBUtil::checkString($var, True); - $this->import_data_file_id = $var; - - return $this; - } - - /** - * Required. The resource being created. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ImportDataFile import_data_file = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\MigrationCenter\V1\ImportDataFile|null - */ - public function getImportDataFile() - { - return $this->import_data_file; - } - - public function hasImportDataFile() - { - return isset($this->import_data_file); - } - - public function clearImportDataFile() - { - unset($this->import_data_file); - } - - /** - * Required. The resource being created. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ImportDataFile import_data_file = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\MigrationCenter\V1\ImportDataFile $var - * @return $this - */ - public function setImportDataFile($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\ImportDataFile::class); - $this->import_data_file = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/CreateImportJobRequest.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/CreateImportJobRequest.php deleted file mode 100644 index 0a5e153e5d50..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/CreateImportJobRequest.php +++ /dev/null @@ -1,237 +0,0 @@ -google.cloud.migrationcenter.v1.CreateImportJobRequest - */ -class CreateImportJobRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Value for parent. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. ID of the import job. - * - * Generated from protobuf field string import_job_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $import_job_id = ''; - /** - * Required. The resource being created. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ImportJob import_job = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $import_job = null; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param string $parent Required. Value for parent. Please see - * {@see MigrationCenterClient::locationName()} for help formatting this field. - * @param \Google\Cloud\MigrationCenter\V1\ImportJob $importJob Required. The resource being created. - * @param string $importJobId Required. ID of the import job. - * - * @return \Google\Cloud\MigrationCenter\V1\CreateImportJobRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\MigrationCenter\V1\ImportJob $importJob, string $importJobId): self - { - return (new self()) - ->setParent($parent) - ->setImportJob($importJob) - ->setImportJobId($importJobId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Value for parent. - * @type string $import_job_id - * Required. ID of the import job. - * @type \Google\Cloud\MigrationCenter\V1\ImportJob $import_job - * Required. The resource being created. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Required. Value for parent. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Value for parent. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. ID of the import job. - * - * Generated from protobuf field string import_job_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getImportJobId() - { - return $this->import_job_id; - } - - /** - * Required. ID of the import job. - * - * Generated from protobuf field string import_job_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setImportJobId($var) - { - GPBUtil::checkString($var, True); - $this->import_job_id = $var; - - return $this; - } - - /** - * Required. The resource being created. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ImportJob import_job = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\MigrationCenter\V1\ImportJob|null - */ - public function getImportJob() - { - return $this->import_job; - } - - public function hasImportJob() - { - return isset($this->import_job); - } - - public function clearImportJob() - { - unset($this->import_job); - } - - /** - * Required. The resource being created. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ImportJob import_job = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\MigrationCenter\V1\ImportJob $var - * @return $this - */ - public function setImportJob($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\ImportJob::class); - $this->import_job = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/CreatePreferenceSetRequest.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/CreatePreferenceSetRequest.php deleted file mode 100644 index c972bae0ecc1..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/CreatePreferenceSetRequest.php +++ /dev/null @@ -1,262 +0,0 @@ -google.cloud.migrationcenter.v1.CreatePreferenceSetRequest - */ -class CreatePreferenceSetRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Value for parent. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. User specified ID for the preference set. It will become the last - * component of the preference set name. The ID must be unique within the - * project, must conform with RFC-1034, is restricted to lower-cased letters, - * and has a maximum length of 63 characters. The ID must match the regular - * expression - * `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`. - * - * Generated from protobuf field string preference_set_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $preference_set_id = ''; - /** - * Required. The preference set resource being created. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.PreferenceSet preference_set = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $preference_set = null; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param string $parent Required. Value for parent. Please see - * {@see MigrationCenterClient::locationName()} for help formatting this field. - * @param \Google\Cloud\MigrationCenter\V1\PreferenceSet $preferenceSet Required. The preference set resource being created. - * @param string $preferenceSetId Required. User specified ID for the preference set. It will become the last - * component of the preference set name. The ID must be unique within the - * project, must conform with RFC-1034, is restricted to lower-cased letters, - * and has a maximum length of 63 characters. The ID must match the regular - * expression - * `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`. - * - * @return \Google\Cloud\MigrationCenter\V1\CreatePreferenceSetRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\MigrationCenter\V1\PreferenceSet $preferenceSet, string $preferenceSetId): self - { - return (new self()) - ->setParent($parent) - ->setPreferenceSet($preferenceSet) - ->setPreferenceSetId($preferenceSetId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Value for parent. - * @type string $preference_set_id - * Required. User specified ID for the preference set. It will become the last - * component of the preference set name. The ID must be unique within the - * project, must conform with RFC-1034, is restricted to lower-cased letters, - * and has a maximum length of 63 characters. The ID must match the regular - * expression - * `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`. - * @type \Google\Cloud\MigrationCenter\V1\PreferenceSet $preference_set - * Required. The preference set resource being created. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Required. Value for parent. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Value for parent. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. User specified ID for the preference set. It will become the last - * component of the preference set name. The ID must be unique within the - * project, must conform with RFC-1034, is restricted to lower-cased letters, - * and has a maximum length of 63 characters. The ID must match the regular - * expression - * `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`. - * - * Generated from protobuf field string preference_set_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getPreferenceSetId() - { - return $this->preference_set_id; - } - - /** - * Required. User specified ID for the preference set. It will become the last - * component of the preference set name. The ID must be unique within the - * project, must conform with RFC-1034, is restricted to lower-cased letters, - * and has a maximum length of 63 characters. The ID must match the regular - * expression - * `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`. - * - * Generated from protobuf field string preference_set_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setPreferenceSetId($var) - { - GPBUtil::checkString($var, True); - $this->preference_set_id = $var; - - return $this; - } - - /** - * Required. The preference set resource being created. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.PreferenceSet preference_set = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\MigrationCenter\V1\PreferenceSet|null - */ - public function getPreferenceSet() - { - return $this->preference_set; - } - - public function hasPreferenceSet() - { - return isset($this->preference_set); - } - - public function clearPreferenceSet() - { - unset($this->preference_set); - } - - /** - * Required. The preference set resource being created. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.PreferenceSet preference_set = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\MigrationCenter\V1\PreferenceSet $var - * @return $this - */ - public function setPreferenceSet($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\PreferenceSet::class); - $this->preference_set = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/CreateReportConfigRequest.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/CreateReportConfigRequest.php deleted file mode 100644 index 7f7d7dbf97db..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/CreateReportConfigRequest.php +++ /dev/null @@ -1,257 +0,0 @@ -google.cloud.migrationcenter.v1.CreateReportConfigRequest - */ -class CreateReportConfigRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Value for parent. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. User specified ID for the report config. It will become the last - * component of the report config name. The ID must be unique within the - * project, must conform with RFC-1034, is restricted to lower-cased letters, - * and has a maximum length of 63 characters. The ID must match the regular - * expression: [a-z]([a-z0-9-]{0,61}[a-z0-9])?. - * - * Generated from protobuf field string report_config_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $report_config_id = ''; - /** - * Required. The report config set resource being created. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ReportConfig report_config = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $report_config = null; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param string $parent Required. Value for parent. Please see - * {@see MigrationCenterClient::locationName()} for help formatting this field. - * @param \Google\Cloud\MigrationCenter\V1\ReportConfig $reportConfig Required. The report config set resource being created. - * @param string $reportConfigId Required. User specified ID for the report config. It will become the last - * component of the report config name. The ID must be unique within the - * project, must conform with RFC-1034, is restricted to lower-cased letters, - * and has a maximum length of 63 characters. The ID must match the regular - * expression: [a-z]([a-z0-9-]{0,61}[a-z0-9])?. - * - * @return \Google\Cloud\MigrationCenter\V1\CreateReportConfigRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\MigrationCenter\V1\ReportConfig $reportConfig, string $reportConfigId): self - { - return (new self()) - ->setParent($parent) - ->setReportConfig($reportConfig) - ->setReportConfigId($reportConfigId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Value for parent. - * @type string $report_config_id - * Required. User specified ID for the report config. It will become the last - * component of the report config name. The ID must be unique within the - * project, must conform with RFC-1034, is restricted to lower-cased letters, - * and has a maximum length of 63 characters. The ID must match the regular - * expression: [a-z]([a-z0-9-]{0,61}[a-z0-9])?. - * @type \Google\Cloud\MigrationCenter\V1\ReportConfig $report_config - * Required. The report config set resource being created. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Required. Value for parent. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Value for parent. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. User specified ID for the report config. It will become the last - * component of the report config name. The ID must be unique within the - * project, must conform with RFC-1034, is restricted to lower-cased letters, - * and has a maximum length of 63 characters. The ID must match the regular - * expression: [a-z]([a-z0-9-]{0,61}[a-z0-9])?. - * - * Generated from protobuf field string report_config_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getReportConfigId() - { - return $this->report_config_id; - } - - /** - * Required. User specified ID for the report config. It will become the last - * component of the report config name. The ID must be unique within the - * project, must conform with RFC-1034, is restricted to lower-cased letters, - * and has a maximum length of 63 characters. The ID must match the regular - * expression: [a-z]([a-z0-9-]{0,61}[a-z0-9])?. - * - * Generated from protobuf field string report_config_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setReportConfigId($var) - { - GPBUtil::checkString($var, True); - $this->report_config_id = $var; - - return $this; - } - - /** - * Required. The report config set resource being created. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ReportConfig report_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\MigrationCenter\V1\ReportConfig|null - */ - public function getReportConfig() - { - return $this->report_config; - } - - public function hasReportConfig() - { - return isset($this->report_config); - } - - public function clearReportConfig() - { - unset($this->report_config); - } - - /** - * Required. The report config set resource being created. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ReportConfig report_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\MigrationCenter\V1\ReportConfig $var - * @return $this - */ - public function setReportConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\ReportConfig::class); - $this->report_config = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/CreateReportRequest.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/CreateReportRequest.php deleted file mode 100644 index 203eeb2ced47..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/CreateReportRequest.php +++ /dev/null @@ -1,257 +0,0 @@ -google.cloud.migrationcenter.v1.CreateReportRequest - */ -class CreateReportRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Value for parent. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. User specified id for the report. It will become the last - * component of the report name. The id must be unique within the project, - * must conform with RFC-1034, is restricted to lower-cased letters, and has a - * maximum length of 63 characters. The id must match the regular expression: - * [a-z]([a-z0-9-]{0,61}[a-z0-9])?. - * - * Generated from protobuf field string report_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $report_id = ''; - /** - * Required. The report resource being created. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.Report report = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $report = null; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param string $parent Required. Value for parent. Please see - * {@see MigrationCenterClient::reportConfigName()} for help formatting this field. - * @param \Google\Cloud\MigrationCenter\V1\Report $report Required. The report resource being created. - * @param string $reportId Required. User specified id for the report. It will become the last - * component of the report name. The id must be unique within the project, - * must conform with RFC-1034, is restricted to lower-cased letters, and has a - * maximum length of 63 characters. The id must match the regular expression: - * [a-z]([a-z0-9-]{0,61}[a-z0-9])?. - * - * @return \Google\Cloud\MigrationCenter\V1\CreateReportRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\MigrationCenter\V1\Report $report, string $reportId): self - { - return (new self()) - ->setParent($parent) - ->setReport($report) - ->setReportId($reportId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Value for parent. - * @type string $report_id - * Required. User specified id for the report. It will become the last - * component of the report name. The id must be unique within the project, - * must conform with RFC-1034, is restricted to lower-cased letters, and has a - * maximum length of 63 characters. The id must match the regular expression: - * [a-z]([a-z0-9-]{0,61}[a-z0-9])?. - * @type \Google\Cloud\MigrationCenter\V1\Report $report - * Required. The report resource being created. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Required. Value for parent. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Value for parent. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. User specified id for the report. It will become the last - * component of the report name. The id must be unique within the project, - * must conform with RFC-1034, is restricted to lower-cased letters, and has a - * maximum length of 63 characters. The id must match the regular expression: - * [a-z]([a-z0-9-]{0,61}[a-z0-9])?. - * - * Generated from protobuf field string report_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getReportId() - { - return $this->report_id; - } - - /** - * Required. User specified id for the report. It will become the last - * component of the report name. The id must be unique within the project, - * must conform with RFC-1034, is restricted to lower-cased letters, and has a - * maximum length of 63 characters. The id must match the regular expression: - * [a-z]([a-z0-9-]{0,61}[a-z0-9])?. - * - * Generated from protobuf field string report_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setReportId($var) - { - GPBUtil::checkString($var, True); - $this->report_id = $var; - - return $this; - } - - /** - * Required. The report resource being created. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.Report report = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\MigrationCenter\V1\Report|null - */ - public function getReport() - { - return $this->report; - } - - public function hasReport() - { - return isset($this->report); - } - - public function clearReport() - { - unset($this->report); - } - - /** - * Required. The report resource being created. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.Report report = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\MigrationCenter\V1\Report $var - * @return $this - */ - public function setReport($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\Report::class); - $this->report = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/CreateSourceRequest.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/CreateSourceRequest.php deleted file mode 100644 index 0b0e144c6a00..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/CreateSourceRequest.php +++ /dev/null @@ -1,257 +0,0 @@ -google.cloud.migrationcenter.v1.CreateSourceRequest - */ -class CreateSourceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Value for parent. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. User specified ID for the source. It will become the last - * component of the source name. The ID must be unique within the project, - * must conform with RFC-1034, is restricted to lower-cased letters, and has a - * maximum length of 63 characters. The ID must match the regular expression: - * `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`. - * - * Generated from protobuf field string source_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $source_id = ''; - /** - * Required. The resource being created. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.Source source = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $source = null; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param string $parent Required. Value for parent. Please see - * {@see MigrationCenterClient::locationName()} for help formatting this field. - * @param \Google\Cloud\MigrationCenter\V1\Source $source Required. The resource being created. - * @param string $sourceId Required. User specified ID for the source. It will become the last - * component of the source name. The ID must be unique within the project, - * must conform with RFC-1034, is restricted to lower-cased letters, and has a - * maximum length of 63 characters. The ID must match the regular expression: - * `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`. - * - * @return \Google\Cloud\MigrationCenter\V1\CreateSourceRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\MigrationCenter\V1\Source $source, string $sourceId): self - { - return (new self()) - ->setParent($parent) - ->setSource($source) - ->setSourceId($sourceId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Value for parent. - * @type string $source_id - * Required. User specified ID for the source. It will become the last - * component of the source name. The ID must be unique within the project, - * must conform with RFC-1034, is restricted to lower-cased letters, and has a - * maximum length of 63 characters. The ID must match the regular expression: - * `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`. - * @type \Google\Cloud\MigrationCenter\V1\Source $source - * Required. The resource being created. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Required. Value for parent. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Value for parent. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. User specified ID for the source. It will become the last - * component of the source name. The ID must be unique within the project, - * must conform with RFC-1034, is restricted to lower-cased letters, and has a - * maximum length of 63 characters. The ID must match the regular expression: - * `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`. - * - * Generated from protobuf field string source_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getSourceId() - { - return $this->source_id; - } - - /** - * Required. User specified ID for the source. It will become the last - * component of the source name. The ID must be unique within the project, - * must conform with RFC-1034, is restricted to lower-cased letters, and has a - * maximum length of 63 characters. The ID must match the regular expression: - * `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`. - * - * Generated from protobuf field string source_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setSourceId($var) - { - GPBUtil::checkString($var, True); - $this->source_id = $var; - - return $this; - } - - /** - * Required. The resource being created. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.Source source = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\MigrationCenter\V1\Source|null - */ - public function getSource() - { - return $this->source; - } - - public function hasSource() - { - return isset($this->source); - } - - public function clearSource() - { - unset($this->source); - } - - /** - * Required. The resource being created. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.Source source = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\MigrationCenter\V1\Source $var - * @return $this - */ - public function setSource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\Source::class); - $this->source = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DailyResourceUsageAggregation.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DailyResourceUsageAggregation.php deleted file mode 100644 index cb5cc1ead3de..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DailyResourceUsageAggregation.php +++ /dev/null @@ -1,253 +0,0 @@ -google.cloud.migrationcenter.v1.DailyResourceUsageAggregation - */ -class DailyResourceUsageAggregation extends \Google\Protobuf\Internal\Message -{ - /** - * Aggregation date. Day boundaries are at midnight UTC. - * - * Generated from protobuf field .google.type.Date date = 1; - */ - protected $date = null; - /** - * CPU usage. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.CPU cpu = 2; - */ - protected $cpu = null; - /** - * Memory usage. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Memory memory = 3; - */ - protected $memory = null; - /** - * Network usage. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Network network = 4; - */ - protected $network = null; - /** - * Disk usage. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Disk disk = 5; - */ - protected $disk = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Type\Date $date - * Aggregation date. Day boundaries are at midnight UTC. - * @type \Google\Cloud\MigrationCenter\V1\DailyResourceUsageAggregation\CPU $cpu - * CPU usage. - * @type \Google\Cloud\MigrationCenter\V1\DailyResourceUsageAggregation\Memory $memory - * Memory usage. - * @type \Google\Cloud\MigrationCenter\V1\DailyResourceUsageAggregation\Network $network - * Network usage. - * @type \Google\Cloud\MigrationCenter\V1\DailyResourceUsageAggregation\Disk $disk - * Disk usage. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Aggregation date. Day boundaries are at midnight UTC. - * - * Generated from protobuf field .google.type.Date date = 1; - * @return \Google\Type\Date|null - */ - public function getDate() - { - return $this->date; - } - - public function hasDate() - { - return isset($this->date); - } - - public function clearDate() - { - unset($this->date); - } - - /** - * Aggregation date. Day boundaries are at midnight UTC. - * - * Generated from protobuf field .google.type.Date date = 1; - * @param \Google\Type\Date $var - * @return $this - */ - public function setDate($var) - { - GPBUtil::checkMessage($var, \Google\Type\Date::class); - $this->date = $var; - - return $this; - } - - /** - * CPU usage. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.CPU cpu = 2; - * @return \Google\Cloud\MigrationCenter\V1\DailyResourceUsageAggregation\CPU|null - */ - public function getCpu() - { - return $this->cpu; - } - - public function hasCpu() - { - return isset($this->cpu); - } - - public function clearCpu() - { - unset($this->cpu); - } - - /** - * CPU usage. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.CPU cpu = 2; - * @param \Google\Cloud\MigrationCenter\V1\DailyResourceUsageAggregation\CPU $var - * @return $this - */ - public function setCpu($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\DailyResourceUsageAggregation\CPU::class); - $this->cpu = $var; - - return $this; - } - - /** - * Memory usage. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Memory memory = 3; - * @return \Google\Cloud\MigrationCenter\V1\DailyResourceUsageAggregation\Memory|null - */ - public function getMemory() - { - return $this->memory; - } - - public function hasMemory() - { - return isset($this->memory); - } - - public function clearMemory() - { - unset($this->memory); - } - - /** - * Memory usage. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Memory memory = 3; - * @param \Google\Cloud\MigrationCenter\V1\DailyResourceUsageAggregation\Memory $var - * @return $this - */ - public function setMemory($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\DailyResourceUsageAggregation\Memory::class); - $this->memory = $var; - - return $this; - } - - /** - * Network usage. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Network network = 4; - * @return \Google\Cloud\MigrationCenter\V1\DailyResourceUsageAggregation\Network|null - */ - public function getNetwork() - { - return $this->network; - } - - public function hasNetwork() - { - return isset($this->network); - } - - public function clearNetwork() - { - unset($this->network); - } - - /** - * Network usage. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Network network = 4; - * @param \Google\Cloud\MigrationCenter\V1\DailyResourceUsageAggregation\Network $var - * @return $this - */ - public function setNetwork($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\DailyResourceUsageAggregation\Network::class); - $this->network = $var; - - return $this; - } - - /** - * Disk usage. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Disk disk = 5; - * @return \Google\Cloud\MigrationCenter\V1\DailyResourceUsageAggregation\Disk|null - */ - public function getDisk() - { - return $this->disk; - } - - public function hasDisk() - { - return isset($this->disk); - } - - public function clearDisk() - { - unset($this->disk); - } - - /** - * Disk usage. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Disk disk = 5; - * @param \Google\Cloud\MigrationCenter\V1\DailyResourceUsageAggregation\Disk $var - * @return $this - */ - public function setDisk($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\DailyResourceUsageAggregation\Disk::class); - $this->disk = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DailyResourceUsageAggregation/CPU.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DailyResourceUsageAggregation/CPU.php deleted file mode 100644 index 3d47f260cf30..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DailyResourceUsageAggregation/CPU.php +++ /dev/null @@ -1,80 +0,0 @@ -google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.CPU - */ -class CPU extends \Google\Protobuf\Internal\Message -{ - /** - * CPU utilization percentage. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats utilization_percentage = 1; - */ - protected $utilization_percentage = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\MigrationCenter\V1\DailyResourceUsageAggregation\Stats $utilization_percentage - * CPU utilization percentage. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * CPU utilization percentage. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats utilization_percentage = 1; - * @return \Google\Cloud\MigrationCenter\V1\DailyResourceUsageAggregation\Stats|null - */ - public function getUtilizationPercentage() - { - return $this->utilization_percentage; - } - - public function hasUtilizationPercentage() - { - return isset($this->utilization_percentage); - } - - public function clearUtilizationPercentage() - { - unset($this->utilization_percentage); - } - - /** - * CPU utilization percentage. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats utilization_percentage = 1; - * @param \Google\Cloud\MigrationCenter\V1\DailyResourceUsageAggregation\Stats $var - * @return $this - */ - public function setUtilizationPercentage($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\DailyResourceUsageAggregation\Stats::class); - $this->utilization_percentage = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CPU::class, \Google\Cloud\MigrationCenter\V1\DailyResourceUsageAggregation_CPU::class); - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DailyResourceUsageAggregation/Disk.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DailyResourceUsageAggregation/Disk.php deleted file mode 100644 index 6a18aa1ea7ab..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DailyResourceUsageAggregation/Disk.php +++ /dev/null @@ -1,80 +0,0 @@ -google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Disk - */ -class Disk extends \Google\Protobuf\Internal\Message -{ - /** - * Disk I/O operations per second. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats iops = 1; - */ - protected $iops = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\MigrationCenter\V1\DailyResourceUsageAggregation\Stats $iops - * Disk I/O operations per second. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Disk I/O operations per second. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats iops = 1; - * @return \Google\Cloud\MigrationCenter\V1\DailyResourceUsageAggregation\Stats|null - */ - public function getIops() - { - return $this->iops; - } - - public function hasIops() - { - return isset($this->iops); - } - - public function clearIops() - { - unset($this->iops); - } - - /** - * Disk I/O operations per second. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats iops = 1; - * @param \Google\Cloud\MigrationCenter\V1\DailyResourceUsageAggregation\Stats $var - * @return $this - */ - public function setIops($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\DailyResourceUsageAggregation\Stats::class); - $this->iops = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Disk::class, \Google\Cloud\MigrationCenter\V1\DailyResourceUsageAggregation_Disk::class); - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DailyResourceUsageAggregation/Memory.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DailyResourceUsageAggregation/Memory.php deleted file mode 100644 index efc89f8fa29a..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DailyResourceUsageAggregation/Memory.php +++ /dev/null @@ -1,80 +0,0 @@ -google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Memory - */ -class Memory extends \Google\Protobuf\Internal\Message -{ - /** - * Memory utilization percentage. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats utilization_percentage = 1; - */ - protected $utilization_percentage = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\MigrationCenter\V1\DailyResourceUsageAggregation\Stats $utilization_percentage - * Memory utilization percentage. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Memory utilization percentage. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats utilization_percentage = 1; - * @return \Google\Cloud\MigrationCenter\V1\DailyResourceUsageAggregation\Stats|null - */ - public function getUtilizationPercentage() - { - return $this->utilization_percentage; - } - - public function hasUtilizationPercentage() - { - return isset($this->utilization_percentage); - } - - public function clearUtilizationPercentage() - { - unset($this->utilization_percentage); - } - - /** - * Memory utilization percentage. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats utilization_percentage = 1; - * @param \Google\Cloud\MigrationCenter\V1\DailyResourceUsageAggregation\Stats $var - * @return $this - */ - public function setUtilizationPercentage($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\DailyResourceUsageAggregation\Stats::class); - $this->utilization_percentage = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Memory::class, \Google\Cloud\MigrationCenter\V1\DailyResourceUsageAggregation_Memory::class); - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DailyResourceUsageAggregation/Network.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DailyResourceUsageAggregation/Network.php deleted file mode 100644 index 1861848fd408..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DailyResourceUsageAggregation/Network.php +++ /dev/null @@ -1,124 +0,0 @@ -google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Network - */ -class Network extends \Google\Protobuf\Internal\Message -{ - /** - * Network ingress in B/s. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats ingress_bps = 1; - */ - protected $ingress_bps = null; - /** - * Network egress in B/s. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats egress_bps = 2; - */ - protected $egress_bps = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\MigrationCenter\V1\DailyResourceUsageAggregation\Stats $ingress_bps - * Network ingress in B/s. - * @type \Google\Cloud\MigrationCenter\V1\DailyResourceUsageAggregation\Stats $egress_bps - * Network egress in B/s. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Network ingress in B/s. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats ingress_bps = 1; - * @return \Google\Cloud\MigrationCenter\V1\DailyResourceUsageAggregation\Stats|null - */ - public function getIngressBps() - { - return $this->ingress_bps; - } - - public function hasIngressBps() - { - return isset($this->ingress_bps); - } - - public function clearIngressBps() - { - unset($this->ingress_bps); - } - - /** - * Network ingress in B/s. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats ingress_bps = 1; - * @param \Google\Cloud\MigrationCenter\V1\DailyResourceUsageAggregation\Stats $var - * @return $this - */ - public function setIngressBps($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\DailyResourceUsageAggregation\Stats::class); - $this->ingress_bps = $var; - - return $this; - } - - /** - * Network egress in B/s. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats egress_bps = 2; - * @return \Google\Cloud\MigrationCenter\V1\DailyResourceUsageAggregation\Stats|null - */ - public function getEgressBps() - { - return $this->egress_bps; - } - - public function hasEgressBps() - { - return isset($this->egress_bps); - } - - public function clearEgressBps() - { - unset($this->egress_bps); - } - - /** - * Network egress in B/s. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats egress_bps = 2; - * @param \Google\Cloud\MigrationCenter\V1\DailyResourceUsageAggregation\Stats $var - * @return $this - */ - public function setEgressBps($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\DailyResourceUsageAggregation\Stats::class); - $this->egress_bps = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Network::class, \Google\Cloud\MigrationCenter\V1\DailyResourceUsageAggregation_Network::class); - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DailyResourceUsageAggregation/Stats.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DailyResourceUsageAggregation/Stats.php deleted file mode 100644 index c51d20e780d6..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DailyResourceUsageAggregation/Stats.php +++ /dev/null @@ -1,172 +0,0 @@ -google.cloud.migrationcenter.v1.DailyResourceUsageAggregation.Stats - */ -class Stats extends \Google\Protobuf\Internal\Message -{ - /** - * Average usage value. - * - * Generated from protobuf field float average = 1; - */ - protected $average = 0.0; - /** - * Median usage value. - * - * Generated from protobuf field float median = 2; - */ - protected $median = 0.0; - /** - * 95th percentile usage value. - * - * Generated from protobuf field float nintey_fifth_percentile = 3; - */ - protected $nintey_fifth_percentile = 0.0; - /** - * Peak usage value. - * - * Generated from protobuf field float peak = 4; - */ - protected $peak = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $average - * Average usage value. - * @type float $median - * Median usage value. - * @type float $nintey_fifth_percentile - * 95th percentile usage value. - * @type float $peak - * Peak usage value. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Average usage value. - * - * Generated from protobuf field float average = 1; - * @return float - */ - public function getAverage() - { - return $this->average; - } - - /** - * Average usage value. - * - * Generated from protobuf field float average = 1; - * @param float $var - * @return $this - */ - public function setAverage($var) - { - GPBUtil::checkFloat($var); - $this->average = $var; - - return $this; - } - - /** - * Median usage value. - * - * Generated from protobuf field float median = 2; - * @return float - */ - public function getMedian() - { - return $this->median; - } - - /** - * Median usage value. - * - * Generated from protobuf field float median = 2; - * @param float $var - * @return $this - */ - public function setMedian($var) - { - GPBUtil::checkFloat($var); - $this->median = $var; - - return $this; - } - - /** - * 95th percentile usage value. - * - * Generated from protobuf field float nintey_fifth_percentile = 3; - * @return float - */ - public function getNinteyFifthPercentile() - { - return $this->nintey_fifth_percentile; - } - - /** - * 95th percentile usage value. - * - * Generated from protobuf field float nintey_fifth_percentile = 3; - * @param float $var - * @return $this - */ - public function setNinteyFifthPercentile($var) - { - GPBUtil::checkFloat($var); - $this->nintey_fifth_percentile = $var; - - return $this; - } - - /** - * Peak usage value. - * - * Generated from protobuf field float peak = 4; - * @return float - */ - public function getPeak() - { - return $this->peak; - } - - /** - * Peak usage value. - * - * Generated from protobuf field float peak = 4; - * @param float $var - * @return $this - */ - public function setPeak($var) - { - GPBUtil::checkFloat($var); - $this->peak = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Stats::class, \Google\Cloud\MigrationCenter\V1\DailyResourceUsageAggregation_Stats::class); - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DeleteAssetRequest.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DeleteAssetRequest.php deleted file mode 100644 index bf316eb295cd..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DeleteAssetRequest.php +++ /dev/null @@ -1,155 +0,0 @@ -google.cloud.migrationcenter.v1.DeleteAssetRequest - */ -class DeleteAssetRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param string $name Required. Name of the resource. Please see - * {@see MigrationCenterClient::assetName()} for help formatting this field. - * - * @return \Google\Cloud\MigrationCenter\V1\DeleteAssetRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the resource. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DeleteGroupRequest.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DeleteGroupRequest.php deleted file mode 100644 index e4ef8cb44d70..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DeleteGroupRequest.php +++ /dev/null @@ -1,155 +0,0 @@ -google.cloud.migrationcenter.v1.DeleteGroupRequest - */ -class DeleteGroupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the group resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param string $name Required. Name of the group resource. Please see - * {@see MigrationCenterClient::groupName()} for help formatting this field. - * - * @return \Google\Cloud\MigrationCenter\V1\DeleteGroupRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the group resource. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the group resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the group resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DeleteImportDataFileRequest.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DeleteImportDataFileRequest.php deleted file mode 100644 index 57bcb180d47f..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DeleteImportDataFileRequest.php +++ /dev/null @@ -1,155 +0,0 @@ -google.cloud.migrationcenter.v1.DeleteImportDataFileRequest - */ -class DeleteImportDataFileRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the ImportDataFile to delete. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param string $name Required. Name of the ImportDataFile to delete. Please see - * {@see MigrationCenterClient::importDataFileName()} for help formatting this field. - * - * @return \Google\Cloud\MigrationCenter\V1\DeleteImportDataFileRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the ImportDataFile to delete. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the ImportDataFile to delete. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the ImportDataFile to delete. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DeleteImportJobRequest.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DeleteImportJobRequest.php deleted file mode 100644 index 3d581d7757c1..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DeleteImportJobRequest.php +++ /dev/null @@ -1,197 +0,0 @@ -google.cloud.migrationcenter.v1.DeleteImportJobRequest - */ -class DeleteImportJobRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - /** - * Optional. If set to `true`, any `ImportDataFiles` of this job will also be - * deleted If set to `false`, the request only works if the job has no data - * files. - * - * Generated from protobuf field bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $force = false; - - /** - * @param string $name Required. Name of the resource. Please see - * {@see MigrationCenterClient::importJobName()} for help formatting this field. - * - * @return \Google\Cloud\MigrationCenter\V1\DeleteImportJobRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the resource. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @type bool $force - * Optional. If set to `true`, any `ImportDataFiles` of this job will also be - * deleted If set to `false`, the request only works if the job has no data - * files. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - - /** - * Optional. If set to `true`, any `ImportDataFiles` of this job will also be - * deleted If set to `false`, the request only works if the job has no data - * files. - * - * Generated from protobuf field bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getForce() - { - return $this->force; - } - - /** - * Optional. If set to `true`, any `ImportDataFiles` of this job will also be - * deleted If set to `false`, the request only works if the job has no data - * files. - * - * Generated from protobuf field bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setForce($var) - { - GPBUtil::checkBool($var); - $this->force = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DeletePreferenceSetRequest.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DeletePreferenceSetRequest.php deleted file mode 100644 index dfdac0be8cbe..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DeletePreferenceSetRequest.php +++ /dev/null @@ -1,155 +0,0 @@ -google.cloud.migrationcenter.v1.DeletePreferenceSetRequest - */ -class DeletePreferenceSetRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the group resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param string $name Required. Name of the group resource. Please see - * {@see MigrationCenterClient::preferenceSetName()} for help formatting this field. - * - * @return \Google\Cloud\MigrationCenter\V1\DeletePreferenceSetRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the group resource. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the group resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the group resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DeleteReportConfigRequest.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DeleteReportConfigRequest.php deleted file mode 100644 index dc84aa089a70..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DeleteReportConfigRequest.php +++ /dev/null @@ -1,197 +0,0 @@ -google.cloud.migrationcenter.v1.DeleteReportConfigRequest - */ -class DeleteReportConfigRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - /** - * Optional. If set to `true`, any child `Reports` of this entity will also be - * deleted. If set to `false`, the request only works if the resource has no - * children. - * - * Generated from protobuf field bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $force = false; - - /** - * @param string $name Required. Name of the resource. Please see - * {@see MigrationCenterClient::reportConfigName()} for help formatting this field. - * - * @return \Google\Cloud\MigrationCenter\V1\DeleteReportConfigRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the resource. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @type bool $force - * Optional. If set to `true`, any child `Reports` of this entity will also be - * deleted. If set to `false`, the request only works if the resource has no - * children. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - - /** - * Optional. If set to `true`, any child `Reports` of this entity will also be - * deleted. If set to `false`, the request only works if the resource has no - * children. - * - * Generated from protobuf field bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getForce() - { - return $this->force; - } - - /** - * Optional. If set to `true`, any child `Reports` of this entity will also be - * deleted. If set to `false`, the request only works if the resource has no - * children. - * - * Generated from protobuf field bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setForce($var) - { - GPBUtil::checkBool($var); - $this->force = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DeleteReportRequest.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DeleteReportRequest.php deleted file mode 100644 index a65423b390c1..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DeleteReportRequest.php +++ /dev/null @@ -1,155 +0,0 @@ -google.cloud.migrationcenter.v1.DeleteReportRequest - */ -class DeleteReportRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param string $name Required. Name of the resource. Please see - * {@see MigrationCenterClient::reportName()} for help formatting this field. - * - * @return \Google\Cloud\MigrationCenter\V1\DeleteReportRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the resource. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DeleteSourceRequest.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DeleteSourceRequest.php deleted file mode 100644 index 13b36660f9b3..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DeleteSourceRequest.php +++ /dev/null @@ -1,155 +0,0 @@ -google.cloud.migrationcenter.v1.DeleteSourceRequest - */ -class DeleteSourceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param string $name Required. Name of the resource. Please see - * {@see MigrationCenterClient::sourceName()} for help formatting this field. - * - * @return \Google\Cloud\MigrationCenter\V1\DeleteSourceRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the resource. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DiskEntry.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DiskEntry.php deleted file mode 100644 index 4a10c0ae7a15..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DiskEntry.php +++ /dev/null @@ -1,323 +0,0 @@ -google.cloud.migrationcenter.v1.DiskEntry - */ -class DiskEntry extends \Google\Protobuf\Internal\Message -{ - /** - * Disk capacity. - * - * Generated from protobuf field int64 capacity_bytes = 1; - */ - protected $capacity_bytes = 0; - /** - * Disk free space. - * - * Generated from protobuf field int64 free_bytes = 2; - */ - protected $free_bytes = 0; - /** - * Disk label. - * - * Generated from protobuf field string disk_label = 3; - */ - protected $disk_label = ''; - /** - * Disk label type (e.g. BIOS/GPT) - * - * Generated from protobuf field string disk_label_type = 4; - */ - protected $disk_label_type = ''; - /** - * Disks interface type. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.DiskEntry.InterfaceType interface_type = 5; - */ - protected $interface_type = 0; - /** - * Partition layout. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.DiskPartitionList partitions = 6; - */ - protected $partitions = null; - /** - * Disk hardware address (e.g. 0:1 for SCSI). - * - * Generated from protobuf field string hw_address = 7; - */ - protected $hw_address = ''; - protected $platform_specific; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $capacity_bytes - * Disk capacity. - * @type int|string $free_bytes - * Disk free space. - * @type string $disk_label - * Disk label. - * @type string $disk_label_type - * Disk label type (e.g. BIOS/GPT) - * @type int $interface_type - * Disks interface type. - * @type \Google\Cloud\MigrationCenter\V1\DiskPartitionList $partitions - * Partition layout. - * @type string $hw_address - * Disk hardware address (e.g. 0:1 for SCSI). - * @type \Google\Cloud\MigrationCenter\V1\VmwareDiskConfig $vmware - * VMware disk details. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Disk capacity. - * - * Generated from protobuf field int64 capacity_bytes = 1; - * @return int|string - */ - public function getCapacityBytes() - { - return $this->capacity_bytes; - } - - /** - * Disk capacity. - * - * Generated from protobuf field int64 capacity_bytes = 1; - * @param int|string $var - * @return $this - */ - public function setCapacityBytes($var) - { - GPBUtil::checkInt64($var); - $this->capacity_bytes = $var; - - return $this; - } - - /** - * Disk free space. - * - * Generated from protobuf field int64 free_bytes = 2; - * @return int|string - */ - public function getFreeBytes() - { - return $this->free_bytes; - } - - /** - * Disk free space. - * - * Generated from protobuf field int64 free_bytes = 2; - * @param int|string $var - * @return $this - */ - public function setFreeBytes($var) - { - GPBUtil::checkInt64($var); - $this->free_bytes = $var; - - return $this; - } - - /** - * Disk label. - * - * Generated from protobuf field string disk_label = 3; - * @return string - */ - public function getDiskLabel() - { - return $this->disk_label; - } - - /** - * Disk label. - * - * Generated from protobuf field string disk_label = 3; - * @param string $var - * @return $this - */ - public function setDiskLabel($var) - { - GPBUtil::checkString($var, True); - $this->disk_label = $var; - - return $this; - } - - /** - * Disk label type (e.g. BIOS/GPT) - * - * Generated from protobuf field string disk_label_type = 4; - * @return string - */ - public function getDiskLabelType() - { - return $this->disk_label_type; - } - - /** - * Disk label type (e.g. BIOS/GPT) - * - * Generated from protobuf field string disk_label_type = 4; - * @param string $var - * @return $this - */ - public function setDiskLabelType($var) - { - GPBUtil::checkString($var, True); - $this->disk_label_type = $var; - - return $this; - } - - /** - * Disks interface type. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.DiskEntry.InterfaceType interface_type = 5; - * @return int - */ - public function getInterfaceType() - { - return $this->interface_type; - } - - /** - * Disks interface type. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.DiskEntry.InterfaceType interface_type = 5; - * @param int $var - * @return $this - */ - public function setInterfaceType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\MigrationCenter\V1\DiskEntry\InterfaceType::class); - $this->interface_type = $var; - - return $this; - } - - /** - * Partition layout. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.DiskPartitionList partitions = 6; - * @return \Google\Cloud\MigrationCenter\V1\DiskPartitionList|null - */ - public function getPartitions() - { - return $this->partitions; - } - - public function hasPartitions() - { - return isset($this->partitions); - } - - public function clearPartitions() - { - unset($this->partitions); - } - - /** - * Partition layout. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.DiskPartitionList partitions = 6; - * @param \Google\Cloud\MigrationCenter\V1\DiskPartitionList $var - * @return $this - */ - public function setPartitions($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\DiskPartitionList::class); - $this->partitions = $var; - - return $this; - } - - /** - * Disk hardware address (e.g. 0:1 for SCSI). - * - * Generated from protobuf field string hw_address = 7; - * @return string - */ - public function getHwAddress() - { - return $this->hw_address; - } - - /** - * Disk hardware address (e.g. 0:1 for SCSI). - * - * Generated from protobuf field string hw_address = 7; - * @param string $var - * @return $this - */ - public function setHwAddress($var) - { - GPBUtil::checkString($var, True); - $this->hw_address = $var; - - return $this; - } - - /** - * VMware disk details. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.VmwareDiskConfig vmware = 20; - * @return \Google\Cloud\MigrationCenter\V1\VmwareDiskConfig|null - */ - public function getVmware() - { - return $this->readOneof(20); - } - - public function hasVmware() - { - return $this->hasOneof(20); - } - - /** - * VMware disk details. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.VmwareDiskConfig vmware = 20; - * @param \Google\Cloud\MigrationCenter\V1\VmwareDiskConfig $var - * @return $this - */ - public function setVmware($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\VmwareDiskConfig::class); - $this->writeOneof(20, $var); - - return $this; - } - - /** - * @return string - */ - public function getPlatformSpecific() - { - return $this->whichOneof("platform_specific"); - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DiskEntry/InterfaceType.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DiskEntry/InterfaceType.php deleted file mode 100644 index ffca5a44029e..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DiskEntry/InterfaceType.php +++ /dev/null @@ -1,99 +0,0 @@ -google.cloud.migrationcenter.v1.DiskEntry.InterfaceType - */ -class InterfaceType -{ - /** - * Interface type unknown or unspecified. - * - * Generated from protobuf enum INTERFACE_TYPE_UNSPECIFIED = 0; - */ - const INTERFACE_TYPE_UNSPECIFIED = 0; - /** - * IDE interface type. - * - * Generated from protobuf enum IDE = 1; - */ - const IDE = 1; - /** - * SATA interface type. - * - * Generated from protobuf enum SATA = 2; - */ - const SATA = 2; - /** - * SAS interface type. - * - * Generated from protobuf enum SAS = 3; - */ - const SAS = 3; - /** - * SCSI interface type. - * - * Generated from protobuf enum SCSI = 4; - */ - const SCSI = 4; - /** - * NVME interface type. - * - * Generated from protobuf enum NVME = 5; - */ - const NVME = 5; - /** - * FC interface type. - * - * Generated from protobuf enum FC = 6; - */ - const FC = 6; - /** - * iSCSI interface type. - * - * Generated from protobuf enum ISCSI = 7; - */ - const ISCSI = 7; - - private static $valueToName = [ - self::INTERFACE_TYPE_UNSPECIFIED => 'INTERFACE_TYPE_UNSPECIFIED', - self::IDE => 'IDE', - self::SATA => 'SATA', - self::SAS => 'SAS', - self::SCSI => 'SCSI', - self::NVME => 'NVME', - self::FC => 'FC', - self::ISCSI => 'ISCSI', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(InterfaceType::class, \Google\Cloud\MigrationCenter\V1\DiskEntry_InterfaceType::class); - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DiskEntryList.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DiskEntryList.php deleted file mode 100644 index bb0f746c0ffa..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DiskEntryList.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.migrationcenter.v1.DiskEntryList - */ -class DiskEntryList extends \Google\Protobuf\Internal\Message -{ - /** - * Disk entries. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.DiskEntry entries = 1; - */ - private $entries; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\MigrationCenter\V1\DiskEntry>|\Google\Protobuf\Internal\RepeatedField $entries - * Disk entries. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Disk entries. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.DiskEntry entries = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEntries() - { - return $this->entries; - } - - /** - * Disk entries. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.DiskEntry entries = 1; - * @param array<\Google\Cloud\MigrationCenter\V1\DiskEntry>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEntries($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\DiskEntry::class); - $this->entries = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DiskPartition.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DiskPartition.php deleted file mode 100644 index c5607c6cc945..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DiskPartition.php +++ /dev/null @@ -1,281 +0,0 @@ -google.cloud.migrationcenter.v1.DiskPartition - */ -class DiskPartition extends \Google\Protobuf\Internal\Message -{ - /** - * Partition type. - * - * Generated from protobuf field string type = 1; - */ - protected $type = ''; - /** - * Partition file system. - * - * Generated from protobuf field string file_system = 2; - */ - protected $file_system = ''; - /** - * Mount pount (Linux/Windows) or drive letter (Windows). - * - * Generated from protobuf field string mount_point = 3; - */ - protected $mount_point = ''; - /** - * Partition capacity. - * - * Generated from protobuf field int64 capacity_bytes = 4; - */ - protected $capacity_bytes = 0; - /** - * Partition free space. - * - * Generated from protobuf field int64 free_bytes = 5; - */ - protected $free_bytes = 0; - /** - * Partition UUID. - * - * Generated from protobuf field string uuid = 6; - */ - protected $uuid = ''; - /** - * Sub-partitions. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.DiskPartitionList sub_partitions = 7; - */ - protected $sub_partitions = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $type - * Partition type. - * @type string $file_system - * Partition file system. - * @type string $mount_point - * Mount pount (Linux/Windows) or drive letter (Windows). - * @type int|string $capacity_bytes - * Partition capacity. - * @type int|string $free_bytes - * Partition free space. - * @type string $uuid - * Partition UUID. - * @type \Google\Cloud\MigrationCenter\V1\DiskPartitionList $sub_partitions - * Sub-partitions. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Partition type. - * - * Generated from protobuf field string type = 1; - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * Partition type. - * - * Generated from protobuf field string type = 1; - * @param string $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkString($var, True); - $this->type = $var; - - return $this; - } - - /** - * Partition file system. - * - * Generated from protobuf field string file_system = 2; - * @return string - */ - public function getFileSystem() - { - return $this->file_system; - } - - /** - * Partition file system. - * - * Generated from protobuf field string file_system = 2; - * @param string $var - * @return $this - */ - public function setFileSystem($var) - { - GPBUtil::checkString($var, True); - $this->file_system = $var; - - return $this; - } - - /** - * Mount pount (Linux/Windows) or drive letter (Windows). - * - * Generated from protobuf field string mount_point = 3; - * @return string - */ - public function getMountPoint() - { - return $this->mount_point; - } - - /** - * Mount pount (Linux/Windows) or drive letter (Windows). - * - * Generated from protobuf field string mount_point = 3; - * @param string $var - * @return $this - */ - public function setMountPoint($var) - { - GPBUtil::checkString($var, True); - $this->mount_point = $var; - - return $this; - } - - /** - * Partition capacity. - * - * Generated from protobuf field int64 capacity_bytes = 4; - * @return int|string - */ - public function getCapacityBytes() - { - return $this->capacity_bytes; - } - - /** - * Partition capacity. - * - * Generated from protobuf field int64 capacity_bytes = 4; - * @param int|string $var - * @return $this - */ - public function setCapacityBytes($var) - { - GPBUtil::checkInt64($var); - $this->capacity_bytes = $var; - - return $this; - } - - /** - * Partition free space. - * - * Generated from protobuf field int64 free_bytes = 5; - * @return int|string - */ - public function getFreeBytes() - { - return $this->free_bytes; - } - - /** - * Partition free space. - * - * Generated from protobuf field int64 free_bytes = 5; - * @param int|string $var - * @return $this - */ - public function setFreeBytes($var) - { - GPBUtil::checkInt64($var); - $this->free_bytes = $var; - - return $this; - } - - /** - * Partition UUID. - * - * Generated from protobuf field string uuid = 6; - * @return string - */ - public function getUuid() - { - return $this->uuid; - } - - /** - * Partition UUID. - * - * Generated from protobuf field string uuid = 6; - * @param string $var - * @return $this - */ - public function setUuid($var) - { - GPBUtil::checkString($var, True); - $this->uuid = $var; - - return $this; - } - - /** - * Sub-partitions. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.DiskPartitionList sub_partitions = 7; - * @return \Google\Cloud\MigrationCenter\V1\DiskPartitionList|null - */ - public function getSubPartitions() - { - return $this->sub_partitions; - } - - public function hasSubPartitions() - { - return isset($this->sub_partitions); - } - - public function clearSubPartitions() - { - unset($this->sub_partitions); - } - - /** - * Sub-partitions. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.DiskPartitionList sub_partitions = 7; - * @param \Google\Cloud\MigrationCenter\V1\DiskPartitionList $var - * @return $this - */ - public function setSubPartitions($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\DiskPartitionList::class); - $this->sub_partitions = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DiskPartitionList.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DiskPartitionList.php deleted file mode 100644 index 2970bf370b48..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DiskPartitionList.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.migrationcenter.v1.DiskPartitionList - */ -class DiskPartitionList extends \Google\Protobuf\Internal\Message -{ - /** - * Partition entries. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.DiskPartition entries = 1; - */ - private $entries; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\MigrationCenter\V1\DiskPartition>|\Google\Protobuf\Internal\RepeatedField $entries - * Partition entries. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Partition entries. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.DiskPartition entries = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEntries() - { - return $this->entries; - } - - /** - * Partition entries. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.DiskPartition entries = 1; - * @param array<\Google\Cloud\MigrationCenter\V1\DiskPartition>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEntries($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\DiskPartition::class); - $this->entries = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DiskUsageSample.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DiskUsageSample.php deleted file mode 100644 index 41df87337527..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/DiskUsageSample.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.migrationcenter.v1.DiskUsageSample - */ -class DiskUsageSample extends \Google\Protobuf\Internal\Message -{ - /** - * Average IOPS sampled over a short window. Must be non-negative. - * - * Generated from protobuf field float average_iops = 1; - */ - protected $average_iops = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $average_iops - * Average IOPS sampled over a short window. Must be non-negative. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Average IOPS sampled over a short window. Must be non-negative. - * - * Generated from protobuf field float average_iops = 1; - * @return float - */ - public function getAverageIops() - { - return $this->average_iops; - } - - /** - * Average IOPS sampled over a short window. Must be non-negative. - * - * Generated from protobuf field float average_iops = 1; - * @param float $var - * @return $this - */ - public function setAverageIops($var) - { - GPBUtil::checkFloat($var); - $this->average_iops = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ErrorFrame.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ErrorFrame.php deleted file mode 100644 index 442d356e1dd6..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ErrorFrame.php +++ /dev/null @@ -1,189 +0,0 @@ -google.cloud.migrationcenter.v1.ErrorFrame - */ -class ErrorFrame extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The identifier of the ErrorFrame. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. All the violations that were detected for the frame. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.FrameViolationEntry violations = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $violations; - /** - * Output only. The frame that was originally reported. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.AssetFrame original_frame = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $original_frame = null; - /** - * Output only. Frame ingestion time. - * - * Generated from protobuf field .google.protobuf.Timestamp ingestion_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $ingestion_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The identifier of the ErrorFrame. - * @type array<\Google\Cloud\MigrationCenter\V1\FrameViolationEntry>|\Google\Protobuf\Internal\RepeatedField $violations - * Output only. All the violations that were detected for the frame. - * @type \Google\Cloud\MigrationCenter\V1\AssetFrame $original_frame - * Output only. The frame that was originally reported. - * @type \Google\Protobuf\Timestamp $ingestion_time - * Output only. Frame ingestion time. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The identifier of the ErrorFrame. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The identifier of the ErrorFrame. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. All the violations that were detected for the frame. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.FrameViolationEntry violations = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getViolations() - { - return $this->violations; - } - - /** - * Output only. All the violations that were detected for the frame. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.FrameViolationEntry violations = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\MigrationCenter\V1\FrameViolationEntry>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setViolations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\FrameViolationEntry::class); - $this->violations = $arr; - - return $this; - } - - /** - * Output only. The frame that was originally reported. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.AssetFrame original_frame = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\MigrationCenter\V1\AssetFrame|null - */ - public function getOriginalFrame() - { - return $this->original_frame; - } - - public function hasOriginalFrame() - { - return isset($this->original_frame); - } - - public function clearOriginalFrame() - { - unset($this->original_frame); - } - - /** - * Output only. The frame that was originally reported. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.AssetFrame original_frame = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\MigrationCenter\V1\AssetFrame $var - * @return $this - */ - public function setOriginalFrame($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\AssetFrame::class); - $this->original_frame = $var; - - return $this; - } - - /** - * Output only. Frame ingestion time. - * - * Generated from protobuf field .google.protobuf.Timestamp ingestion_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getIngestionTime() - { - return $this->ingestion_time; - } - - public function hasIngestionTime() - { - return isset($this->ingestion_time); - } - - public function clearIngestionTime() - { - unset($this->ingestion_time); - } - - /** - * Output only. Frame ingestion time. - * - * Generated from protobuf field .google.protobuf.Timestamp ingestion_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setIngestionTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->ingestion_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ErrorFrameView.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ErrorFrameView.php deleted file mode 100644 index 2d2db3356bf8..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ErrorFrameView.php +++ /dev/null @@ -1,62 +0,0 @@ -google.cloud.migrationcenter.v1.ErrorFrameView - */ -class ErrorFrameView -{ - /** - * Value is unset. The system will fallback to the default value. - * - * Generated from protobuf enum ERROR_FRAME_VIEW_UNSPECIFIED = 0; - */ - const ERROR_FRAME_VIEW_UNSPECIFIED = 0; - /** - * Include basic frame data, but not the full contents. - * - * Generated from protobuf enum ERROR_FRAME_VIEW_BASIC = 1; - */ - const ERROR_FRAME_VIEW_BASIC = 1; - /** - * Include everything. - * - * Generated from protobuf enum ERROR_FRAME_VIEW_FULL = 2; - */ - const ERROR_FRAME_VIEW_FULL = 2; - - private static $valueToName = [ - self::ERROR_FRAME_VIEW_UNSPECIFIED => 'ERROR_FRAME_VIEW_UNSPECIFIED', - self::ERROR_FRAME_VIEW_BASIC => 'ERROR_FRAME_VIEW_BASIC', - self::ERROR_FRAME_VIEW_FULL => 'ERROR_FRAME_VIEW_FULL', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ExecutionReport.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ExecutionReport.php deleted file mode 100644 index 3225a8a85559..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ExecutionReport.php +++ /dev/null @@ -1,145 +0,0 @@ -google.cloud.migrationcenter.v1.ExecutionReport - */ -class ExecutionReport extends \Google\Protobuf\Internal\Message -{ - /** - * Total number of asset frames reported for the import job. - * - * Generated from protobuf field int32 frames_reported = 1; - */ - protected $frames_reported = 0; - /** - * Validation errors encountered during the execution of the import job. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ValidationReport execution_errors = 2; - */ - protected $execution_errors = null; - /** - * Output only. Total number of rows in the import job. - * - * Generated from protobuf field int32 total_rows_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $total_rows_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $frames_reported - * Total number of asset frames reported for the import job. - * @type \Google\Cloud\MigrationCenter\V1\ValidationReport $execution_errors - * Validation errors encountered during the execution of the import job. - * @type int $total_rows_count - * Output only. Total number of rows in the import job. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Total number of asset frames reported for the import job. - * - * Generated from protobuf field int32 frames_reported = 1; - * @return int - */ - public function getFramesReported() - { - return $this->frames_reported; - } - - /** - * Total number of asset frames reported for the import job. - * - * Generated from protobuf field int32 frames_reported = 1; - * @param int $var - * @return $this - */ - public function setFramesReported($var) - { - GPBUtil::checkInt32($var); - $this->frames_reported = $var; - - return $this; - } - - /** - * Validation errors encountered during the execution of the import job. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ValidationReport execution_errors = 2; - * @return \Google\Cloud\MigrationCenter\V1\ValidationReport|null - */ - public function getExecutionErrors() - { - return $this->execution_errors; - } - - public function hasExecutionErrors() - { - return isset($this->execution_errors); - } - - public function clearExecutionErrors() - { - unset($this->execution_errors); - } - - /** - * Validation errors encountered during the execution of the import job. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ValidationReport execution_errors = 2; - * @param \Google\Cloud\MigrationCenter\V1\ValidationReport $var - * @return $this - */ - public function setExecutionErrors($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\ValidationReport::class); - $this->execution_errors = $var; - - return $this; - } - - /** - * Output only. Total number of rows in the import job. - * - * Generated from protobuf field int32 total_rows_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getTotalRowsCount() - { - return $this->total_rows_count; - } - - /** - * Output only. Total number of rows in the import job. - * - * Generated from protobuf field int32 total_rows_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setTotalRowsCount($var) - { - GPBUtil::checkInt32($var); - $this->total_rows_count = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/FileValidationReport.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/FileValidationReport.php deleted file mode 100644 index c2a87564211b..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/FileValidationReport.php +++ /dev/null @@ -1,173 +0,0 @@ -google.cloud.migrationcenter.v1.FileValidationReport - */ -class FileValidationReport extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the file. - * - * Generated from protobuf field string file_name = 1; - */ - protected $file_name = ''; - /** - * Partial list of rows that encountered validation error. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ImportRowError row_errors = 2; - */ - private $row_errors; - /** - * Flag indicating that processing was aborted due to maximum number of - * errors. - * - * Generated from protobuf field bool partial_report = 3; - */ - protected $partial_report = false; - /** - * List of file level errors. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ImportError file_errors = 4; - */ - private $file_errors; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $file_name - * The name of the file. - * @type array<\Google\Cloud\MigrationCenter\V1\ImportRowError>|\Google\Protobuf\Internal\RepeatedField $row_errors - * Partial list of rows that encountered validation error. - * @type bool $partial_report - * Flag indicating that processing was aborted due to maximum number of - * errors. - * @type array<\Google\Cloud\MigrationCenter\V1\ImportError>|\Google\Protobuf\Internal\RepeatedField $file_errors - * List of file level errors. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * The name of the file. - * - * Generated from protobuf field string file_name = 1; - * @return string - */ - public function getFileName() - { - return $this->file_name; - } - - /** - * The name of the file. - * - * Generated from protobuf field string file_name = 1; - * @param string $var - * @return $this - */ - public function setFileName($var) - { - GPBUtil::checkString($var, True); - $this->file_name = $var; - - return $this; - } - - /** - * Partial list of rows that encountered validation error. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ImportRowError row_errors = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRowErrors() - { - return $this->row_errors; - } - - /** - * Partial list of rows that encountered validation error. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ImportRowError row_errors = 2; - * @param array<\Google\Cloud\MigrationCenter\V1\ImportRowError>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRowErrors($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\ImportRowError::class); - $this->row_errors = $arr; - - return $this; - } - - /** - * Flag indicating that processing was aborted due to maximum number of - * errors. - * - * Generated from protobuf field bool partial_report = 3; - * @return bool - */ - public function getPartialReport() - { - return $this->partial_report; - } - - /** - * Flag indicating that processing was aborted due to maximum number of - * errors. - * - * Generated from protobuf field bool partial_report = 3; - * @param bool $var - * @return $this - */ - public function setPartialReport($var) - { - GPBUtil::checkBool($var); - $this->partial_report = $var; - - return $this; - } - - /** - * List of file level errors. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ImportError file_errors = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFileErrors() - { - return $this->file_errors; - } - - /** - * List of file level errors. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ImportError file_errors = 4; - * @param array<\Google\Cloud\MigrationCenter\V1\ImportError>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFileErrors($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\ImportError::class); - $this->file_errors = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/FitDescriptor.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/FitDescriptor.php deleted file mode 100644 index af3374b36ae8..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/FitDescriptor.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.migrationcenter.v1.FitDescriptor - */ -class FitDescriptor extends \Google\Protobuf\Internal\Message -{ - /** - * Fit level. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.FitDescriptor.FitLevel fit_level = 1; - */ - protected $fit_level = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $fit_level - * Fit level. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Fit level. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.FitDescriptor.FitLevel fit_level = 1; - * @return int - */ - public function getFitLevel() - { - return $this->fit_level; - } - - /** - * Fit level. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.FitDescriptor.FitLevel fit_level = 1; - * @param int $var - * @return $this - */ - public function setFitLevel($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\MigrationCenter\V1\FitDescriptor\FitLevel::class); - $this->fit_level = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/FitDescriptor/FitLevel.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/FitDescriptor/FitLevel.php deleted file mode 100644 index e680d898a10c..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/FitDescriptor/FitLevel.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.migrationcenter.v1.FitDescriptor.FitLevel - */ -class FitLevel -{ - /** - * Not enough information. - * - * Generated from protobuf enum FIT_LEVEL_UNSPECIFIED = 0; - */ - const FIT_LEVEL_UNSPECIFIED = 0; - /** - * Fit. - * - * Generated from protobuf enum FIT = 1; - */ - const FIT = 1; - /** - * No Fit. - * - * Generated from protobuf enum NO_FIT = 2; - */ - const NO_FIT = 2; - /** - * Fit with effort. - * - * Generated from protobuf enum REQUIRES_EFFORT = 3; - */ - const REQUIRES_EFFORT = 3; - - private static $valueToName = [ - self::FIT_LEVEL_UNSPECIFIED => 'FIT_LEVEL_UNSPECIFIED', - self::FIT => 'FIT', - self::NO_FIT => 'NO_FIT', - self::REQUIRES_EFFORT => 'REQUIRES_EFFORT', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(FitLevel::class, \Google\Cloud\MigrationCenter\V1\FitDescriptor_FitLevel::class); - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/FrameViolationEntry.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/FrameViolationEntry.php deleted file mode 100644 index ef32d08c50cf..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/FrameViolationEntry.php +++ /dev/null @@ -1,102 +0,0 @@ -google.cloud.migrationcenter.v1.FrameViolationEntry - */ -class FrameViolationEntry extends \Google\Protobuf\Internal\Message -{ - /** - * The field of the original frame where the violation occurred. - * - * Generated from protobuf field string field = 1; - */ - protected $field = ''; - /** - * A message describing the violation. - * - * Generated from protobuf field string violation = 2; - */ - protected $violation = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $field - * The field of the original frame where the violation occurred. - * @type string $violation - * A message describing the violation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * The field of the original frame where the violation occurred. - * - * Generated from protobuf field string field = 1; - * @return string - */ - public function getField() - { - return $this->field; - } - - /** - * The field of the original frame where the violation occurred. - * - * Generated from protobuf field string field = 1; - * @param string $var - * @return $this - */ - public function setField($var) - { - GPBUtil::checkString($var, True); - $this->field = $var; - - return $this; - } - - /** - * A message describing the violation. - * - * Generated from protobuf field string violation = 2; - * @return string - */ - public function getViolation() - { - return $this->violation; - } - - /** - * A message describing the violation. - * - * Generated from protobuf field string violation = 2; - * @param string $var - * @return $this - */ - public function setViolation($var) - { - GPBUtil::checkString($var, True); - $this->violation = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Frames.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Frames.php deleted file mode 100644 index e838abbd4204..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Frames.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.migrationcenter.v1.Frames - */ -class Frames extends \Google\Protobuf\Internal\Message -{ - /** - * A repeated field of asset data. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.AssetFrame frames_data = 1; - */ - private $frames_data; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\MigrationCenter\V1\AssetFrame>|\Google\Protobuf\Internal\RepeatedField $frames_data - * A repeated field of asset data. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * A repeated field of asset data. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.AssetFrame frames_data = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFramesData() - { - return $this->frames_data; - } - - /** - * A repeated field of asset data. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.AssetFrame frames_data = 1; - * @param array<\Google\Cloud\MigrationCenter\V1\AssetFrame>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFramesData($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\AssetFrame::class); - $this->frames_data = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/FstabEntry.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/FstabEntry.php deleted file mode 100644 index 871f30e54357..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/FstabEntry.php +++ /dev/null @@ -1,241 +0,0 @@ -google.cloud.migrationcenter.v1.FstabEntry - */ -class FstabEntry extends \Google\Protobuf\Internal\Message -{ - /** - * The block special device or remote filesystem to be mounted. - * - * Generated from protobuf field string spec = 1; - */ - protected $spec = ''; - /** - * The mount point for the filesystem. - * - * Generated from protobuf field string file = 2; - */ - protected $file = ''; - /** - * The type of the filesystem. - * - * Generated from protobuf field string vfstype = 3; - */ - protected $vfstype = ''; - /** - * Mount options associated with the filesystem. - * - * Generated from protobuf field string mntops = 4; - */ - protected $mntops = ''; - /** - * Used by dump to determine which filesystems need to be dumped. - * - * Generated from protobuf field int32 freq = 5; - */ - protected $freq = 0; - /** - * Used by the fsck(8) program to determine the order in which filesystem - * checks are done at reboot time. - * - * Generated from protobuf field int32 passno = 6; - */ - protected $passno = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $spec - * The block special device or remote filesystem to be mounted. - * @type string $file - * The mount point for the filesystem. - * @type string $vfstype - * The type of the filesystem. - * @type string $mntops - * Mount options associated with the filesystem. - * @type int $freq - * Used by dump to determine which filesystems need to be dumped. - * @type int $passno - * Used by the fsck(8) program to determine the order in which filesystem - * checks are done at reboot time. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * The block special device or remote filesystem to be mounted. - * - * Generated from protobuf field string spec = 1; - * @return string - */ - public function getSpec() - { - return $this->spec; - } - - /** - * The block special device or remote filesystem to be mounted. - * - * Generated from protobuf field string spec = 1; - * @param string $var - * @return $this - */ - public function setSpec($var) - { - GPBUtil::checkString($var, True); - $this->spec = $var; - - return $this; - } - - /** - * The mount point for the filesystem. - * - * Generated from protobuf field string file = 2; - * @return string - */ - public function getFile() - { - return $this->file; - } - - /** - * The mount point for the filesystem. - * - * Generated from protobuf field string file = 2; - * @param string $var - * @return $this - */ - public function setFile($var) - { - GPBUtil::checkString($var, True); - $this->file = $var; - - return $this; - } - - /** - * The type of the filesystem. - * - * Generated from protobuf field string vfstype = 3; - * @return string - */ - public function getVfstype() - { - return $this->vfstype; - } - - /** - * The type of the filesystem. - * - * Generated from protobuf field string vfstype = 3; - * @param string $var - * @return $this - */ - public function setVfstype($var) - { - GPBUtil::checkString($var, True); - $this->vfstype = $var; - - return $this; - } - - /** - * Mount options associated with the filesystem. - * - * Generated from protobuf field string mntops = 4; - * @return string - */ - public function getMntops() - { - return $this->mntops; - } - - /** - * Mount options associated with the filesystem. - * - * Generated from protobuf field string mntops = 4; - * @param string $var - * @return $this - */ - public function setMntops($var) - { - GPBUtil::checkString($var, True); - $this->mntops = $var; - - return $this; - } - - /** - * Used by dump to determine which filesystems need to be dumped. - * - * Generated from protobuf field int32 freq = 5; - * @return int - */ - public function getFreq() - { - return $this->freq; - } - - /** - * Used by dump to determine which filesystems need to be dumped. - * - * Generated from protobuf field int32 freq = 5; - * @param int $var - * @return $this - */ - public function setFreq($var) - { - GPBUtil::checkInt32($var); - $this->freq = $var; - - return $this; - } - - /** - * Used by the fsck(8) program to determine the order in which filesystem - * checks are done at reboot time. - * - * Generated from protobuf field int32 passno = 6; - * @return int - */ - public function getPassno() - { - return $this->passno; - } - - /** - * Used by the fsck(8) program to determine the order in which filesystem - * checks are done at reboot time. - * - * Generated from protobuf field int32 passno = 6; - * @param int $var - * @return $this - */ - public function setPassno($var) - { - GPBUtil::checkInt32($var); - $this->passno = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/FstabEntryList.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/FstabEntryList.php deleted file mode 100644 index cc53a54a3edd..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/FstabEntryList.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.migrationcenter.v1.FstabEntryList - */ -class FstabEntryList extends \Google\Protobuf\Internal\Message -{ - /** - * Fstab entries. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.FstabEntry entries = 1; - */ - private $entries; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\MigrationCenter\V1\FstabEntry>|\Google\Protobuf\Internal\RepeatedField $entries - * Fstab entries. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Fstab entries. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.FstabEntry entries = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEntries() - { - return $this->entries; - } - - /** - * Fstab entries. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.FstabEntry entries = 1; - * @param array<\Google\Cloud\MigrationCenter\V1\FstabEntry>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEntries($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\FstabEntry::class); - $this->entries = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GenericInsight.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GenericInsight.php deleted file mode 100644 index 4795382282f3..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GenericInsight.php +++ /dev/null @@ -1,155 +0,0 @@ -google.cloud.migrationcenter.v1.GenericInsight - */ -class GenericInsight extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Represents a globally unique message id for - * this insight, can be used for localization purposes, in case message_code - * is not yet known by the client use default_message instead. - * - * Generated from protobuf field int64 message_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $message_id = 0; - /** - * Output only. In case message_code is not yet known by the client - * default_message will be the message to be used instead. - * - * Generated from protobuf field string default_message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $default_message = ''; - /** - * Output only. Additional information about the insight, each entry can be a - * logical entry and must make sense if it is displayed with line breaks - * between each entry. Text can contain md style links. - * - * Generated from protobuf field repeated string additional_information = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $additional_information; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $message_id - * Output only. Represents a globally unique message id for - * this insight, can be used for localization purposes, in case message_code - * is not yet known by the client use default_message instead. - * @type string $default_message - * Output only. In case message_code is not yet known by the client - * default_message will be the message to be used instead. - * @type array|\Google\Protobuf\Internal\RepeatedField $additional_information - * Output only. Additional information about the insight, each entry can be a - * logical entry and must make sense if it is displayed with line breaks - * between each entry. Text can contain md style links. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Represents a globally unique message id for - * this insight, can be used for localization purposes, in case message_code - * is not yet known by the client use default_message instead. - * - * Generated from protobuf field int64 message_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getMessageId() - { - return $this->message_id; - } - - /** - * Output only. Represents a globally unique message id for - * this insight, can be used for localization purposes, in case message_code - * is not yet known by the client use default_message instead. - * - * Generated from protobuf field int64 message_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setMessageId($var) - { - GPBUtil::checkInt64($var); - $this->message_id = $var; - - return $this; - } - - /** - * Output only. In case message_code is not yet known by the client - * default_message will be the message to be used instead. - * - * Generated from protobuf field string default_message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getDefaultMessage() - { - return $this->default_message; - } - - /** - * Output only. In case message_code is not yet known by the client - * default_message will be the message to be used instead. - * - * Generated from protobuf field string default_message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setDefaultMessage($var) - { - GPBUtil::checkString($var, True); - $this->default_message = $var; - - return $this; - } - - /** - * Output only. Additional information about the insight, each entry can be a - * logical entry and must make sense if it is displayed with line breaks - * between each entry. Text can contain md style links. - * - * Generated from protobuf field repeated string additional_information = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAdditionalInformation() - { - return $this->additional_information; - } - - /** - * Output only. Additional information about the insight, each entry can be a - * logical entry and must make sense if it is displayed with line breaks - * between each entry. Text can contain md style links. - * - * Generated from protobuf field repeated string additional_information = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAdditionalInformation($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->additional_information = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GenericPlatformDetails.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GenericPlatformDetails.php deleted file mode 100644 index c45ee7a8e4d6..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GenericPlatformDetails.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.migrationcenter.v1.GenericPlatformDetails - */ -class GenericPlatformDetails extends \Google\Protobuf\Internal\Message -{ - /** - * Free text representation of the machine location. - * The format of this field should not be relied on. Different VMs in the same - * location may have different string values for this field. - * - * Generated from protobuf field string location = 1; - */ - protected $location = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $location - * Free text representation of the machine location. - * The format of this field should not be relied on. Different VMs in the same - * location may have different string values for this field. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Free text representation of the machine location. - * The format of this field should not be relied on. Different VMs in the same - * location may have different string values for this field. - * - * Generated from protobuf field string location = 1; - * @return string - */ - public function getLocation() - { - return $this->location; - } - - /** - * Free text representation of the machine location. - * The format of this field should not be relied on. Different VMs in the same - * location may have different string values for this field. - * - * Generated from protobuf field string location = 1; - * @param string $var - * @return $this - */ - public function setLocation($var) - { - GPBUtil::checkString($var, True); - $this->location = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GetAssetRequest.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GetAssetRequest.php deleted file mode 100644 index a1d156249c2f..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GetAssetRequest.php +++ /dev/null @@ -1,115 +0,0 @@ -google.cloud.migrationcenter.v1.GetAssetRequest - */ -class GetAssetRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * View of the assets. Defaults to BASIC. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.AssetView view = 2; - */ - protected $view = 0; - - /** - * @param string $name Required. Name of the resource. Please see - * {@see MigrationCenterClient::assetName()} for help formatting this field. - * - * @return \Google\Cloud\MigrationCenter\V1\GetAssetRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the resource. - * @type int $view - * View of the assets. Defaults to BASIC. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * View of the assets. Defaults to BASIC. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.AssetView view = 2; - * @return int - */ - public function getView() - { - return $this->view; - } - - /** - * View of the assets. Defaults to BASIC. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.AssetView view = 2; - * @param int $var - * @return $this - */ - public function setView($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\MigrationCenter\V1\AssetView::class); - $this->view = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GetErrorFrameRequest.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GetErrorFrameRequest.php deleted file mode 100644 index 450c50959d97..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GetErrorFrameRequest.php +++ /dev/null @@ -1,127 +0,0 @@ -google.cloud.migrationcenter.v1.GetErrorFrameRequest - */ -class GetErrorFrameRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the frame to retrieve. - * Format: - * projects/{project}/locations/{location}/sources/{source}/errorFrames/{error_frame} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. An optional view mode to control the level of details for the - * frame. The default is a basic frame view. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ErrorFrameView view = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $view = 0; - - /** - * @param string $name Required. The name of the frame to retrieve. - * Format: - * projects/{project}/locations/{location}/sources/{source}/errorFrames/{error_frame} - * Please see {@see MigrationCenterClient::errorFrameName()} for help formatting this field. - * - * @return \Google\Cloud\MigrationCenter\V1\GetErrorFrameRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the frame to retrieve. - * Format: - * projects/{project}/locations/{location}/sources/{source}/errorFrames/{error_frame} - * @type int $view - * Optional. An optional view mode to control the level of details for the - * frame. The default is a basic frame view. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the frame to retrieve. - * Format: - * projects/{project}/locations/{location}/sources/{source}/errorFrames/{error_frame} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the frame to retrieve. - * Format: - * projects/{project}/locations/{location}/sources/{source}/errorFrames/{error_frame} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. An optional view mode to control the level of details for the - * frame. The default is a basic frame view. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ErrorFrameView view = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getView() - { - return $this->view; - } - - /** - * Optional. An optional view mode to control the level of details for the - * frame. The default is a basic frame view. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ErrorFrameView view = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setView($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\MigrationCenter\V1\ErrorFrameView::class); - $this->view = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GetGroupRequest.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GetGroupRequest.php deleted file mode 100644 index c01e860e2eed..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GetGroupRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.migrationcenter.v1.GetGroupRequest - */ -class GetGroupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Name of the resource. Please see - * {@see MigrationCenterClient::groupName()} for help formatting this field. - * - * @return \Google\Cloud\MigrationCenter\V1\GetGroupRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GetImportDataFileRequest.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GetImportDataFileRequest.php deleted file mode 100644 index f091acfc527e..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GetImportDataFileRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.migrationcenter.v1.GetImportDataFileRequest - */ -class GetImportDataFileRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the ImportDataFile. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Name of the ImportDataFile. Please see - * {@see MigrationCenterClient::importDataFileName()} for help formatting this field. - * - * @return \Google\Cloud\MigrationCenter\V1\GetImportDataFileRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the ImportDataFile. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the ImportDataFile. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the ImportDataFile. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GetImportJobRequest.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GetImportJobRequest.php deleted file mode 100644 index 1592d02043f5..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GetImportJobRequest.php +++ /dev/null @@ -1,119 +0,0 @@ -google.cloud.migrationcenter.v1.GetImportJobRequest - */ -class GetImportJobRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. The level of details of the import job. - * Default value is FULL. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ImportJobView view = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $view = 0; - - /** - * @param string $name Required. Name of the resource. Please see - * {@see MigrationCenterClient::importJobName()} for help formatting this field. - * - * @return \Google\Cloud\MigrationCenter\V1\GetImportJobRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the resource. - * @type int $view - * Optional. The level of details of the import job. - * Default value is FULL. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. The level of details of the import job. - * Default value is FULL. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ImportJobView view = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getView() - { - return $this->view; - } - - /** - * Optional. The level of details of the import job. - * Default value is FULL. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ImportJobView view = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setView($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\MigrationCenter\V1\ImportJobView::class); - $this->view = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GetPreferenceSetRequest.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GetPreferenceSetRequest.php deleted file mode 100644 index 27ba45722aeb..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GetPreferenceSetRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.migrationcenter.v1.GetPreferenceSetRequest - */ -class GetPreferenceSetRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Name of the resource. Please see - * {@see MigrationCenterClient::preferenceSetName()} for help formatting this field. - * - * @return \Google\Cloud\MigrationCenter\V1\GetPreferenceSetRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GetReportConfigRequest.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GetReportConfigRequest.php deleted file mode 100644 index 21a31ca5025d..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GetReportConfigRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.migrationcenter.v1.GetReportConfigRequest - */ -class GetReportConfigRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Name of the resource. Please see - * {@see MigrationCenterClient::reportConfigName()} for help formatting this field. - * - * @return \Google\Cloud\MigrationCenter\V1\GetReportConfigRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GetReportRequest.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GetReportRequest.php deleted file mode 100644 index 151893ba187d..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GetReportRequest.php +++ /dev/null @@ -1,115 +0,0 @@ -google.cloud.migrationcenter.v1.GetReportRequest - */ -class GetReportRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Determines what information to retrieve for the Report. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ReportView view = 6; - */ - protected $view = 0; - - /** - * @param string $name Required. Name of the resource. Please see - * {@see MigrationCenterClient::reportName()} for help formatting this field. - * - * @return \Google\Cloud\MigrationCenter\V1\GetReportRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the resource. - * @type int $view - * Determines what information to retrieve for the Report. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Determines what information to retrieve for the Report. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ReportView view = 6; - * @return int - */ - public function getView() - { - return $this->view; - } - - /** - * Determines what information to retrieve for the Report. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ReportView view = 6; - * @param int $var - * @return $this - */ - public function setView($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\MigrationCenter\V1\ReportView::class); - $this->view = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GetSettingsRequest.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GetSettingsRequest.php deleted file mode 100644 index 44708c87d75f..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GetSettingsRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.migrationcenter.v1.GetSettingsRequest - */ -class GetSettingsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Name of the resource. Please see - * {@see MigrationCenterClient::settingsName()} for help formatting this field. - * - * @return \Google\Cloud\MigrationCenter\V1\GetSettingsRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GetSourceRequest.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GetSourceRequest.php deleted file mode 100644 index 0b45d01ed2ee..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GetSourceRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.migrationcenter.v1.GetSourceRequest - */ -class GetSourceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Name of the resource. Please see - * {@see MigrationCenterClient::sourceName()} for help formatting this field. - * - * @return \Google\Cloud\MigrationCenter\V1\GetSourceRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Group.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Group.php deleted file mode 100644 index 6b468b1fd52c..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Group.php +++ /dev/null @@ -1,260 +0,0 @@ -google.cloud.migrationcenter.v1.Group - */ -class Group extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The name of the group. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. The timestamp when the group was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The timestamp when the group was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Labels as key value pairs. - * - * Generated from protobuf field map labels = 4; - */ - private $labels; - /** - * User-friendly display name. - * - * Generated from protobuf field string display_name = 5; - */ - protected $display_name = ''; - /** - * The description of the resource. - * - * Generated from protobuf field string description = 6; - */ - protected $description = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The name of the group. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The timestamp when the group was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The timestamp when the group was last updated. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Labels as key value pairs. - * @type string $display_name - * User-friendly display name. - * @type string $description - * The description of the resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The name of the group. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The name of the group. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. The timestamp when the group was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The timestamp when the group was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The timestamp when the group was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The timestamp when the group was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Labels as key value pairs. - * - * Generated from protobuf field map labels = 4; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Labels as key value pairs. - * - * Generated from protobuf field map labels = 4; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * User-friendly display name. - * - * Generated from protobuf field string display_name = 5; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * User-friendly display name. - * - * Generated from protobuf field string display_name = 5; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * The description of the resource. - * - * Generated from protobuf field string description = 6; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * The description of the resource. - * - * Generated from protobuf field string description = 6; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GuestConfigDetails.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GuestConfigDetails.php deleted file mode 100644 index e5c8b3af74cd..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GuestConfigDetails.php +++ /dev/null @@ -1,233 +0,0 @@ -google.cloud.migrationcenter.v1.GuestConfigDetails - */ -class GuestConfigDetails extends \Google\Protobuf\Internal\Message -{ - /** - * OS issue (typically /etc/issue in Linux). - * - * Generated from protobuf field string issue = 1; - */ - protected $issue = ''; - /** - * Mount list (Linux fstab). - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.FstabEntryList fstab = 2; - */ - protected $fstab = null; - /** - * Hosts file (/etc/hosts). - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.HostsEntryList hosts = 3; - */ - protected $hosts = null; - /** - * NFS exports. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.NfsExportList nfs_exports = 4; - */ - protected $nfs_exports = null; - /** - * Security-Enhanced Linux (SELinux) mode. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.GuestConfigDetails.SeLinuxMode selinux_mode = 5; - */ - protected $selinux_mode = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $issue - * OS issue (typically /etc/issue in Linux). - * @type \Google\Cloud\MigrationCenter\V1\FstabEntryList $fstab - * Mount list (Linux fstab). - * @type \Google\Cloud\MigrationCenter\V1\HostsEntryList $hosts - * Hosts file (/etc/hosts). - * @type \Google\Cloud\MigrationCenter\V1\NfsExportList $nfs_exports - * NFS exports. - * @type int $selinux_mode - * Security-Enhanced Linux (SELinux) mode. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * OS issue (typically /etc/issue in Linux). - * - * Generated from protobuf field string issue = 1; - * @return string - */ - public function getIssue() - { - return $this->issue; - } - - /** - * OS issue (typically /etc/issue in Linux). - * - * Generated from protobuf field string issue = 1; - * @param string $var - * @return $this - */ - public function setIssue($var) - { - GPBUtil::checkString($var, True); - $this->issue = $var; - - return $this; - } - - /** - * Mount list (Linux fstab). - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.FstabEntryList fstab = 2; - * @return \Google\Cloud\MigrationCenter\V1\FstabEntryList|null - */ - public function getFstab() - { - return $this->fstab; - } - - public function hasFstab() - { - return isset($this->fstab); - } - - public function clearFstab() - { - unset($this->fstab); - } - - /** - * Mount list (Linux fstab). - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.FstabEntryList fstab = 2; - * @param \Google\Cloud\MigrationCenter\V1\FstabEntryList $var - * @return $this - */ - public function setFstab($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\FstabEntryList::class); - $this->fstab = $var; - - return $this; - } - - /** - * Hosts file (/etc/hosts). - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.HostsEntryList hosts = 3; - * @return \Google\Cloud\MigrationCenter\V1\HostsEntryList|null - */ - public function getHosts() - { - return $this->hosts; - } - - public function hasHosts() - { - return isset($this->hosts); - } - - public function clearHosts() - { - unset($this->hosts); - } - - /** - * Hosts file (/etc/hosts). - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.HostsEntryList hosts = 3; - * @param \Google\Cloud\MigrationCenter\V1\HostsEntryList $var - * @return $this - */ - public function setHosts($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\HostsEntryList::class); - $this->hosts = $var; - - return $this; - } - - /** - * NFS exports. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.NfsExportList nfs_exports = 4; - * @return \Google\Cloud\MigrationCenter\V1\NfsExportList|null - */ - public function getNfsExports() - { - return $this->nfs_exports; - } - - public function hasNfsExports() - { - return isset($this->nfs_exports); - } - - public function clearNfsExports() - { - unset($this->nfs_exports); - } - - /** - * NFS exports. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.NfsExportList nfs_exports = 4; - * @param \Google\Cloud\MigrationCenter\V1\NfsExportList $var - * @return $this - */ - public function setNfsExports($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\NfsExportList::class); - $this->nfs_exports = $var; - - return $this; - } - - /** - * Security-Enhanced Linux (SELinux) mode. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.GuestConfigDetails.SeLinuxMode selinux_mode = 5; - * @return int - */ - public function getSelinuxMode() - { - return $this->selinux_mode; - } - - /** - * Security-Enhanced Linux (SELinux) mode. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.GuestConfigDetails.SeLinuxMode selinux_mode = 5; - * @param int $var - * @return $this - */ - public function setSelinuxMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\MigrationCenter\V1\GuestConfigDetails\SeLinuxMode::class); - $this->selinux_mode = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GuestConfigDetails/SeLinuxMode.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GuestConfigDetails/SeLinuxMode.php deleted file mode 100644 index 34ea69b84192..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GuestConfigDetails/SeLinuxMode.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.migrationcenter.v1.GuestConfigDetails.SeLinuxMode - */ -class SeLinuxMode -{ - /** - * SELinux mode unknown or unspecified. - * - * Generated from protobuf enum SE_LINUX_MODE_UNSPECIFIED = 0; - */ - const SE_LINUX_MODE_UNSPECIFIED = 0; - /** - * SELinux is disabled. - * - * Generated from protobuf enum SE_LINUX_MODE_DISABLED = 1; - */ - const SE_LINUX_MODE_DISABLED = 1; - /** - * SELinux permissive mode. - * - * Generated from protobuf enum SE_LINUX_MODE_PERMISSIVE = 2; - */ - const SE_LINUX_MODE_PERMISSIVE = 2; - /** - * SELinux enforcing mode. - * - * Generated from protobuf enum SE_LINUX_MODE_ENFORCING = 3; - */ - const SE_LINUX_MODE_ENFORCING = 3; - - private static $valueToName = [ - self::SE_LINUX_MODE_UNSPECIFIED => 'SE_LINUX_MODE_UNSPECIFIED', - self::SE_LINUX_MODE_DISABLED => 'SE_LINUX_MODE_DISABLED', - self::SE_LINUX_MODE_PERMISSIVE => 'SE_LINUX_MODE_PERMISSIVE', - self::SE_LINUX_MODE_ENFORCING => 'SE_LINUX_MODE_ENFORCING', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SeLinuxMode::class, \Google\Cloud\MigrationCenter\V1\GuestConfigDetails_SeLinuxMode::class); - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GuestInstalledApplication.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GuestInstalledApplication.php deleted file mode 100644 index d11d9a3dadab..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GuestInstalledApplication.php +++ /dev/null @@ -1,213 +0,0 @@ -google.cloud.migrationcenter.v1.GuestInstalledApplication - */ -class GuestInstalledApplication extends \Google\Protobuf\Internal\Message -{ - /** - * Installed application name. - * - * Generated from protobuf field string application_name = 1; - */ - protected $application_name = ''; - /** - * Installed application vendor. - * - * Generated from protobuf field string vendor = 2; - */ - protected $vendor = ''; - /** - * The time when the application was installed. - * - * Generated from protobuf field .google.protobuf.Timestamp install_time = 3; - */ - protected $install_time = null; - /** - * Source path. - * - * Generated from protobuf field string path = 4; - */ - protected $path = ''; - /** - * Installed application version. - * - * Generated from protobuf field string version = 5; - */ - protected $version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $application_name - * Installed application name. - * @type string $vendor - * Installed application vendor. - * @type \Google\Protobuf\Timestamp $install_time - * The time when the application was installed. - * @type string $path - * Source path. - * @type string $version - * Installed application version. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Installed application name. - * - * Generated from protobuf field string application_name = 1; - * @return string - */ - public function getApplicationName() - { - return $this->application_name; - } - - /** - * Installed application name. - * - * Generated from protobuf field string application_name = 1; - * @param string $var - * @return $this - */ - public function setApplicationName($var) - { - GPBUtil::checkString($var, True); - $this->application_name = $var; - - return $this; - } - - /** - * Installed application vendor. - * - * Generated from protobuf field string vendor = 2; - * @return string - */ - public function getVendor() - { - return $this->vendor; - } - - /** - * Installed application vendor. - * - * Generated from protobuf field string vendor = 2; - * @param string $var - * @return $this - */ - public function setVendor($var) - { - GPBUtil::checkString($var, True); - $this->vendor = $var; - - return $this; - } - - /** - * The time when the application was installed. - * - * Generated from protobuf field .google.protobuf.Timestamp install_time = 3; - * @return \Google\Protobuf\Timestamp|null - */ - public function getInstallTime() - { - return $this->install_time; - } - - public function hasInstallTime() - { - return isset($this->install_time); - } - - public function clearInstallTime() - { - unset($this->install_time); - } - - /** - * The time when the application was installed. - * - * Generated from protobuf field .google.protobuf.Timestamp install_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setInstallTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->install_time = $var; - - return $this; - } - - /** - * Source path. - * - * Generated from protobuf field string path = 4; - * @return string - */ - public function getPath() - { - return $this->path; - } - - /** - * Source path. - * - * Generated from protobuf field string path = 4; - * @param string $var - * @return $this - */ - public function setPath($var) - { - GPBUtil::checkString($var, True); - $this->path = $var; - - return $this; - } - - /** - * Installed application version. - * - * Generated from protobuf field string version = 5; - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * Installed application version. - * - * Generated from protobuf field string version = 5; - * @param string $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkString($var, True); - $this->version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GuestInstalledApplicationList.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GuestInstalledApplicationList.php deleted file mode 100644 index 7f22bc068a8b..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GuestInstalledApplicationList.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.migrationcenter.v1.GuestInstalledApplicationList - */ -class GuestInstalledApplicationList extends \Google\Protobuf\Internal\Message -{ - /** - * Application entries. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.GuestInstalledApplication entries = 1; - */ - private $entries; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\MigrationCenter\V1\GuestInstalledApplication>|\Google\Protobuf\Internal\RepeatedField $entries - * Application entries. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Application entries. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.GuestInstalledApplication entries = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEntries() - { - return $this->entries; - } - - /** - * Application entries. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.GuestInstalledApplication entries = 1; - * @param array<\Google\Cloud\MigrationCenter\V1\GuestInstalledApplication>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEntries($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\GuestInstalledApplication::class); - $this->entries = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GuestOsDetails.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GuestOsDetails.php deleted file mode 100644 index 83c03f363e10..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GuestOsDetails.php +++ /dev/null @@ -1,223 +0,0 @@ -google.cloud.migrationcenter.v1.GuestOsDetails - */ -class GuestOsDetails extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the operating system. - * - * Generated from protobuf field string os_name = 1; - */ - protected $os_name = ''; - /** - * What family the OS belong to, if known. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.OperatingSystemFamily family = 2; - */ - protected $family = 0; - /** - * The version of the operating system. - * - * Generated from protobuf field string version = 3; - */ - protected $version = ''; - /** - * OS and app configuration. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.GuestConfigDetails config = 4; - */ - protected $config = null; - /** - * Runtime information. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.GuestRuntimeDetails runtime = 5; - */ - protected $runtime = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $os_name - * The name of the operating system. - * @type int $family - * What family the OS belong to, if known. - * @type string $version - * The version of the operating system. - * @type \Google\Cloud\MigrationCenter\V1\GuestConfigDetails $config - * OS and app configuration. - * @type \Google\Cloud\MigrationCenter\V1\GuestRuntimeDetails $runtime - * Runtime information. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * The name of the operating system. - * - * Generated from protobuf field string os_name = 1; - * @return string - */ - public function getOsName() - { - return $this->os_name; - } - - /** - * The name of the operating system. - * - * Generated from protobuf field string os_name = 1; - * @param string $var - * @return $this - */ - public function setOsName($var) - { - GPBUtil::checkString($var, True); - $this->os_name = $var; - - return $this; - } - - /** - * What family the OS belong to, if known. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.OperatingSystemFamily family = 2; - * @return int - */ - public function getFamily() - { - return $this->family; - } - - /** - * What family the OS belong to, if known. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.OperatingSystemFamily family = 2; - * @param int $var - * @return $this - */ - public function setFamily($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\MigrationCenter\V1\OperatingSystemFamily::class); - $this->family = $var; - - return $this; - } - - /** - * The version of the operating system. - * - * Generated from protobuf field string version = 3; - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * The version of the operating system. - * - * Generated from protobuf field string version = 3; - * @param string $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkString($var, True); - $this->version = $var; - - return $this; - } - - /** - * OS and app configuration. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.GuestConfigDetails config = 4; - * @return \Google\Cloud\MigrationCenter\V1\GuestConfigDetails|null - */ - public function getConfig() - { - return $this->config; - } - - public function hasConfig() - { - return isset($this->config); - } - - public function clearConfig() - { - unset($this->config); - } - - /** - * OS and app configuration. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.GuestConfigDetails config = 4; - * @param \Google\Cloud\MigrationCenter\V1\GuestConfigDetails $var - * @return $this - */ - public function setConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\GuestConfigDetails::class); - $this->config = $var; - - return $this; - } - - /** - * Runtime information. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.GuestRuntimeDetails runtime = 5; - * @return \Google\Cloud\MigrationCenter\V1\GuestRuntimeDetails|null - */ - public function getRuntime() - { - return $this->runtime; - } - - public function hasRuntime() - { - return isset($this->runtime); - } - - public function clearRuntime() - { - unset($this->runtime); - } - - /** - * Runtime information. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.GuestRuntimeDetails runtime = 5; - * @param \Google\Cloud\MigrationCenter\V1\GuestRuntimeDetails $var - * @return $this - */ - public function setRuntime($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\GuestRuntimeDetails::class); - $this->runtime = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GuestRuntimeDetails.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GuestRuntimeDetails.php deleted file mode 100644 index 00c2013d7b03..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/GuestRuntimeDetails.php +++ /dev/null @@ -1,365 +0,0 @@ -google.cloud.migrationcenter.v1.GuestRuntimeDetails - */ -class GuestRuntimeDetails extends \Google\Protobuf\Internal\Message -{ - /** - * Running background services. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.RunningServiceList services = 1; - */ - protected $services = null; - /** - * Running processes. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.RunningProcessList processes = 2; - */ - protected $processes = null; - /** - * Runtime network information (connections, ports). - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.RuntimeNetworkInfo network = 3; - */ - protected $network = null; - /** - * Last time the OS was booted. - * - * Generated from protobuf field .google.protobuf.Timestamp last_boot_time = 4; - */ - protected $last_boot_time = null; - /** - * Domain, e.g. c.stratozone-development.internal. - * - * Generated from protobuf field string domain = 5; - */ - protected $domain = ''; - /** - * Machine name. - * - * Generated from protobuf field string machine_name = 6; - */ - protected $machine_name = ''; - /** - * Installed applications information. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.GuestInstalledApplicationList installed_apps = 7; - */ - protected $installed_apps = null; - /** - * Open files information. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.OpenFileList open_file_list = 8; - */ - protected $open_file_list = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\MigrationCenter\V1\RunningServiceList $services - * Running background services. - * @type \Google\Cloud\MigrationCenter\V1\RunningProcessList $processes - * Running processes. - * @type \Google\Cloud\MigrationCenter\V1\RuntimeNetworkInfo $network - * Runtime network information (connections, ports). - * @type \Google\Protobuf\Timestamp $last_boot_time - * Last time the OS was booted. - * @type string $domain - * Domain, e.g. c.stratozone-development.internal. - * @type string $machine_name - * Machine name. - * @type \Google\Cloud\MigrationCenter\V1\GuestInstalledApplicationList $installed_apps - * Installed applications information. - * @type \Google\Cloud\MigrationCenter\V1\OpenFileList $open_file_list - * Open files information. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Running background services. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.RunningServiceList services = 1; - * @return \Google\Cloud\MigrationCenter\V1\RunningServiceList|null - */ - public function getServices() - { - return $this->services; - } - - public function hasServices() - { - return isset($this->services); - } - - public function clearServices() - { - unset($this->services); - } - - /** - * Running background services. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.RunningServiceList services = 1; - * @param \Google\Cloud\MigrationCenter\V1\RunningServiceList $var - * @return $this - */ - public function setServices($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\RunningServiceList::class); - $this->services = $var; - - return $this; - } - - /** - * Running processes. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.RunningProcessList processes = 2; - * @return \Google\Cloud\MigrationCenter\V1\RunningProcessList|null - */ - public function getProcesses() - { - return $this->processes; - } - - public function hasProcesses() - { - return isset($this->processes); - } - - public function clearProcesses() - { - unset($this->processes); - } - - /** - * Running processes. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.RunningProcessList processes = 2; - * @param \Google\Cloud\MigrationCenter\V1\RunningProcessList $var - * @return $this - */ - public function setProcesses($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\RunningProcessList::class); - $this->processes = $var; - - return $this; - } - - /** - * Runtime network information (connections, ports). - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.RuntimeNetworkInfo network = 3; - * @return \Google\Cloud\MigrationCenter\V1\RuntimeNetworkInfo|null - */ - public function getNetwork() - { - return $this->network; - } - - public function hasNetwork() - { - return isset($this->network); - } - - public function clearNetwork() - { - unset($this->network); - } - - /** - * Runtime network information (connections, ports). - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.RuntimeNetworkInfo network = 3; - * @param \Google\Cloud\MigrationCenter\V1\RuntimeNetworkInfo $var - * @return $this - */ - public function setNetwork($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\RuntimeNetworkInfo::class); - $this->network = $var; - - return $this; - } - - /** - * Last time the OS was booted. - * - * Generated from protobuf field .google.protobuf.Timestamp last_boot_time = 4; - * @return \Google\Protobuf\Timestamp|null - */ - public function getLastBootTime() - { - return $this->last_boot_time; - } - - public function hasLastBootTime() - { - return isset($this->last_boot_time); - } - - public function clearLastBootTime() - { - unset($this->last_boot_time); - } - - /** - * Last time the OS was booted. - * - * Generated from protobuf field .google.protobuf.Timestamp last_boot_time = 4; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setLastBootTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->last_boot_time = $var; - - return $this; - } - - /** - * Domain, e.g. c.stratozone-development.internal. - * - * Generated from protobuf field string domain = 5; - * @return string - */ - public function getDomain() - { - return $this->domain; - } - - /** - * Domain, e.g. c.stratozone-development.internal. - * - * Generated from protobuf field string domain = 5; - * @param string $var - * @return $this - */ - public function setDomain($var) - { - GPBUtil::checkString($var, True); - $this->domain = $var; - - return $this; - } - - /** - * Machine name. - * - * Generated from protobuf field string machine_name = 6; - * @return string - */ - public function getMachineName() - { - return $this->machine_name; - } - - /** - * Machine name. - * - * Generated from protobuf field string machine_name = 6; - * @param string $var - * @return $this - */ - public function setMachineName($var) - { - GPBUtil::checkString($var, True); - $this->machine_name = $var; - - return $this; - } - - /** - * Installed applications information. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.GuestInstalledApplicationList installed_apps = 7; - * @return \Google\Cloud\MigrationCenter\V1\GuestInstalledApplicationList|null - */ - public function getInstalledApps() - { - return $this->installed_apps; - } - - public function hasInstalledApps() - { - return isset($this->installed_apps); - } - - public function clearInstalledApps() - { - unset($this->installed_apps); - } - - /** - * Installed applications information. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.GuestInstalledApplicationList installed_apps = 7; - * @param \Google\Cloud\MigrationCenter\V1\GuestInstalledApplicationList $var - * @return $this - */ - public function setInstalledApps($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\GuestInstalledApplicationList::class); - $this->installed_apps = $var; - - return $this; - } - - /** - * Open files information. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.OpenFileList open_file_list = 8; - * @return \Google\Cloud\MigrationCenter\V1\OpenFileList|null - */ - public function getOpenFileList() - { - return $this->open_file_list; - } - - public function hasOpenFileList() - { - return isset($this->open_file_list); - } - - public function clearOpenFileList() - { - unset($this->open_file_list); - } - - /** - * Open files information. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.OpenFileList open_file_list = 8; - * @param \Google\Cloud\MigrationCenter\V1\OpenFileList $var - * @return $this - */ - public function setOpenFileList($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\OpenFileList::class); - $this->open_file_list = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/HostsEntry.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/HostsEntry.php deleted file mode 100644 index 1b1b21b86ead..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/HostsEntry.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.migrationcenter.v1.HostsEntry - */ -class HostsEntry extends \Google\Protobuf\Internal\Message -{ - /** - * IP (raw, IPv4/6 agnostic). - * - * Generated from protobuf field string ip = 1; - */ - protected $ip = ''; - /** - * List of host names / aliases. - * - * Generated from protobuf field repeated string host_names = 2; - */ - private $host_names; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $ip - * IP (raw, IPv4/6 agnostic). - * @type array|\Google\Protobuf\Internal\RepeatedField $host_names - * List of host names / aliases. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * IP (raw, IPv4/6 agnostic). - * - * Generated from protobuf field string ip = 1; - * @return string - */ - public function getIp() - { - return $this->ip; - } - - /** - * IP (raw, IPv4/6 agnostic). - * - * Generated from protobuf field string ip = 1; - * @param string $var - * @return $this - */ - public function setIp($var) - { - GPBUtil::checkString($var, True); - $this->ip = $var; - - return $this; - } - - /** - * List of host names / aliases. - * - * Generated from protobuf field repeated string host_names = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getHostNames() - { - return $this->host_names; - } - - /** - * List of host names / aliases. - * - * Generated from protobuf field repeated string host_names = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setHostNames($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->host_names = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/HostsEntryList.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/HostsEntryList.php deleted file mode 100644 index 95a0f125958f..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/HostsEntryList.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.migrationcenter.v1.HostsEntryList - */ -class HostsEntryList extends \Google\Protobuf\Internal\Message -{ - /** - * Hosts entries. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.HostsEntry entries = 1; - */ - private $entries; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\MigrationCenter\V1\HostsEntry>|\Google\Protobuf\Internal\RepeatedField $entries - * Hosts entries. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Hosts entries. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.HostsEntry entries = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEntries() - { - return $this->entries; - } - - /** - * Hosts entries. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.HostsEntry entries = 1; - * @param array<\Google\Cloud\MigrationCenter\V1\HostsEntry>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEntries($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\HostsEntry::class); - $this->entries = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ImportDataFile.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ImportDataFile.php deleted file mode 100644 index 18d7f3e10c86..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ImportDataFile.php +++ /dev/null @@ -1,255 +0,0 @@ -google.cloud.migrationcenter.v1.ImportDataFile - */ -class ImportDataFile extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The name of the file. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * User-friendly display name. Maximum length is 63 characters. - * - * Generated from protobuf field string display_name = 6; - */ - protected $display_name = ''; - /** - * Required. The payload format. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ImportJobFormat format = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $format = 0; - /** - * Output only. The timestamp when the file was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The state of the import data file. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ImportDataFile.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - protected $file_info; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The name of the file. - * @type string $display_name - * User-friendly display name. Maximum length is 63 characters. - * @type int $format - * Required. The payload format. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The timestamp when the file was created. - * @type int $state - * Output only. The state of the import data file. - * @type \Google\Cloud\MigrationCenter\V1\UploadFileInfo $upload_file_info - * Information about a file that is uploaded to a storage service. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The name of the file. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The name of the file. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * User-friendly display name. Maximum length is 63 characters. - * - * Generated from protobuf field string display_name = 6; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * User-friendly display name. Maximum length is 63 characters. - * - * Generated from protobuf field string display_name = 6; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Required. The payload format. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ImportJobFormat format = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getFormat() - { - return $this->format; - } - - /** - * Required. The payload format. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ImportJobFormat format = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setFormat($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\MigrationCenter\V1\ImportJobFormat::class); - $this->format = $var; - - return $this; - } - - /** - * Output only. The timestamp when the file was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The timestamp when the file was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The state of the import data file. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ImportDataFile.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The state of the import data file. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ImportDataFile.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\MigrationCenter\V1\ImportDataFile\State::class); - $this->state = $var; - - return $this; - } - - /** - * Information about a file that is uploaded to a storage service. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.UploadFileInfo upload_file_info = 5; - * @return \Google\Cloud\MigrationCenter\V1\UploadFileInfo|null - */ - public function getUploadFileInfo() - { - return $this->readOneof(5); - } - - public function hasUploadFileInfo() - { - return $this->hasOneof(5); - } - - /** - * Information about a file that is uploaded to a storage service. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.UploadFileInfo upload_file_info = 5; - * @param \Google\Cloud\MigrationCenter\V1\UploadFileInfo $var - * @return $this - */ - public function setUploadFileInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\UploadFileInfo::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * @return string - */ - public function getFileInfo() - { - return $this->whichOneof("file_info"); - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ImportDataFile/State.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ImportDataFile/State.php deleted file mode 100644 index 0a89ef4a4c60..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ImportDataFile/State.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.migrationcenter.v1.ImportDataFile.State - */ -class State -{ - /** - * Default value. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The data file is being created. - * - * Generated from protobuf enum CREATING = 1; - */ - const CREATING = 1; - /** - * The data file completed initialization. - * - * Generated from protobuf enum ACTIVE = 2; - */ - const ACTIVE = 2; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::CREATING => 'CREATING', - self::ACTIVE => 'ACTIVE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\MigrationCenter\V1\ImportDataFile_State::class); - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ImportError.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ImportError.php deleted file mode 100644 index 04a2df954f0c..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ImportError.php +++ /dev/null @@ -1,102 +0,0 @@ -google.cloud.migrationcenter.v1.ImportError - */ -class ImportError extends \Google\Protobuf\Internal\Message -{ - /** - * The error information. - * - * Generated from protobuf field string error_details = 1; - */ - protected $error_details = ''; - /** - * The severity of the error. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ImportError.Severity severity = 2; - */ - protected $severity = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $error_details - * The error information. - * @type int $severity - * The severity of the error. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * The error information. - * - * Generated from protobuf field string error_details = 1; - * @return string - */ - public function getErrorDetails() - { - return $this->error_details; - } - - /** - * The error information. - * - * Generated from protobuf field string error_details = 1; - * @param string $var - * @return $this - */ - public function setErrorDetails($var) - { - GPBUtil::checkString($var, True); - $this->error_details = $var; - - return $this; - } - - /** - * The severity of the error. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ImportError.Severity severity = 2; - * @return int - */ - public function getSeverity() - { - return $this->severity; - } - - /** - * The severity of the error. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ImportError.Severity severity = 2; - * @param int $var - * @return $this - */ - public function setSeverity($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\MigrationCenter\V1\ImportError\Severity::class); - $this->severity = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ImportError/Severity.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ImportError/Severity.php deleted file mode 100644 index 4495bb787812..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ImportError/Severity.php +++ /dev/null @@ -1,63 +0,0 @@ -google.cloud.migrationcenter.v1.ImportError.Severity - */ -class Severity -{ - /** - * Generated from protobuf enum SEVERITY_UNSPECIFIED = 0; - */ - const SEVERITY_UNSPECIFIED = 0; - /** - * Generated from protobuf enum ERROR = 1; - */ - const ERROR = 1; - /** - * Generated from protobuf enum WARNING = 2; - */ - const WARNING = 2; - /** - * Generated from protobuf enum INFO = 3; - */ - const INFO = 3; - - private static $valueToName = [ - self::SEVERITY_UNSPECIFIED => 'SEVERITY_UNSPECIFIED', - self::ERROR => 'ERROR', - self::WARNING => 'WARNING', - self::INFO => 'INFO', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Severity::class, \Google\Cloud\MigrationCenter\V1\ImportError_Severity::class); - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ImportJob.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ImportJob.php deleted file mode 100644 index 686fb1277d40..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ImportJob.php +++ /dev/null @@ -1,410 +0,0 @@ -google.cloud.migrationcenter.v1.ImportJob - */ -class ImportJob extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The full name of the import job. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * User-friendly display name. Maximum length is 63 characters. - * - * Generated from protobuf field string display_name = 2; - */ - protected $display_name = ''; - /** - * Output only. The timestamp when the import job was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The timestamp when the import job was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Output only. The timestamp when the import job was completed. - * - * Generated from protobuf field .google.protobuf.Timestamp complete_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $complete_time = null; - /** - * Output only. The state of the import job. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ImportJob.ImportJobState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Labels as key value pairs. - * - * Generated from protobuf field map labels = 7; - */ - private $labels; - /** - * Required. Reference to a source. - * - * Generated from protobuf field string asset_source = 8 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $asset_source = ''; - protected $report; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The full name of the import job. - * @type string $display_name - * User-friendly display name. Maximum length is 63 characters. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The timestamp when the import job was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The timestamp when the import job was last updated. - * @type \Google\Protobuf\Timestamp $complete_time - * Output only. The timestamp when the import job was completed. - * @type int $state - * Output only. The state of the import job. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Labels as key value pairs. - * @type string $asset_source - * Required. Reference to a source. - * @type \Google\Cloud\MigrationCenter\V1\ValidationReport $validation_report - * Output only. The report with the validation results of the import job. - * @type \Google\Cloud\MigrationCenter\V1\ExecutionReport $execution_report - * Output only. The report with the results of running the import job. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The full name of the import job. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The full name of the import job. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * User-friendly display name. Maximum length is 63 characters. - * - * Generated from protobuf field string display_name = 2; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * User-friendly display name. Maximum length is 63 characters. - * - * Generated from protobuf field string display_name = 2; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Output only. The timestamp when the import job was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The timestamp when the import job was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The timestamp when the import job was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The timestamp when the import job was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Output only. The timestamp when the import job was completed. - * - * Generated from protobuf field .google.protobuf.Timestamp complete_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCompleteTime() - { - return $this->complete_time; - } - - public function hasCompleteTime() - { - return isset($this->complete_time); - } - - public function clearCompleteTime() - { - unset($this->complete_time); - } - - /** - * Output only. The timestamp when the import job was completed. - * - * Generated from protobuf field .google.protobuf.Timestamp complete_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCompleteTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->complete_time = $var; - - return $this; - } - - /** - * Output only. The state of the import job. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ImportJob.ImportJobState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The state of the import job. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ImportJob.ImportJobState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\MigrationCenter\V1\ImportJob\ImportJobState::class); - $this->state = $var; - - return $this; - } - - /** - * Labels as key value pairs. - * - * Generated from protobuf field map labels = 7; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Labels as key value pairs. - * - * Generated from protobuf field map labels = 7; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Required. Reference to a source. - * - * Generated from protobuf field string asset_source = 8 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getAssetSource() - { - return $this->asset_source; - } - - /** - * Required. Reference to a source. - * - * Generated from protobuf field string asset_source = 8 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setAssetSource($var) - { - GPBUtil::checkString($var, True); - $this->asset_source = $var; - - return $this; - } - - /** - * Output only. The report with the validation results of the import job. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ValidationReport validation_report = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\MigrationCenter\V1\ValidationReport|null - */ - public function getValidationReport() - { - return $this->readOneof(10); - } - - public function hasValidationReport() - { - return $this->hasOneof(10); - } - - /** - * Output only. The report with the validation results of the import job. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ValidationReport validation_report = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\MigrationCenter\V1\ValidationReport $var - * @return $this - */ - public function setValidationReport($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\ValidationReport::class); - $this->writeOneof(10, $var); - - return $this; - } - - /** - * Output only. The report with the results of running the import job. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ExecutionReport execution_report = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\MigrationCenter\V1\ExecutionReport|null - */ - public function getExecutionReport() - { - return $this->readOneof(11); - } - - public function hasExecutionReport() - { - return $this->hasOneof(11); - } - - /** - * Output only. The report with the results of running the import job. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ExecutionReport execution_report = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\MigrationCenter\V1\ExecutionReport $var - * @return $this - */ - public function setExecutionReport($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\ExecutionReport::class); - $this->writeOneof(11, $var); - - return $this; - } - - /** - * @return string - */ - public function getReport() - { - return $this->whichOneof("report"); - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ImportJob/ImportJobState.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ImportJob/ImportJobState.php deleted file mode 100644 index f40118238812..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ImportJob/ImportJobState.php +++ /dev/null @@ -1,99 +0,0 @@ -google.cloud.migrationcenter.v1.ImportJob.ImportJobState - */ -class ImportJobState -{ - /** - * Default value. - * - * Generated from protobuf enum IMPORT_JOB_STATE_UNSPECIFIED = 0; - */ - const IMPORT_JOB_STATE_UNSPECIFIED = 0; - /** - * The import job is pending. - * - * Generated from protobuf enum IMPORT_JOB_STATE_PENDING = 1; - */ - const IMPORT_JOB_STATE_PENDING = 1; - /** - * The processing of the import job is ongoing. - * - * Generated from protobuf enum IMPORT_JOB_STATE_RUNNING = 2; - */ - const IMPORT_JOB_STATE_RUNNING = 2; - /** - * The import job processing has completed. - * - * Generated from protobuf enum IMPORT_JOB_STATE_COMPLETED = 3; - */ - const IMPORT_JOB_STATE_COMPLETED = 3; - /** - * The import job failed to be processed. - * - * Generated from protobuf enum IMPORT_JOB_STATE_FAILED = 4; - */ - const IMPORT_JOB_STATE_FAILED = 4; - /** - * The import job is being validated. - * - * Generated from protobuf enum IMPORT_JOB_STATE_VALIDATING = 5; - */ - const IMPORT_JOB_STATE_VALIDATING = 5; - /** - * The import job contains blocking errors. - * - * Generated from protobuf enum IMPORT_JOB_STATE_FAILED_VALIDATION = 6; - */ - const IMPORT_JOB_STATE_FAILED_VALIDATION = 6; - /** - * The validation of the job completed with no blocking errors. - * - * Generated from protobuf enum IMPORT_JOB_STATE_READY = 7; - */ - const IMPORT_JOB_STATE_READY = 7; - - private static $valueToName = [ - self::IMPORT_JOB_STATE_UNSPECIFIED => 'IMPORT_JOB_STATE_UNSPECIFIED', - self::IMPORT_JOB_STATE_PENDING => 'IMPORT_JOB_STATE_PENDING', - self::IMPORT_JOB_STATE_RUNNING => 'IMPORT_JOB_STATE_RUNNING', - self::IMPORT_JOB_STATE_COMPLETED => 'IMPORT_JOB_STATE_COMPLETED', - self::IMPORT_JOB_STATE_FAILED => 'IMPORT_JOB_STATE_FAILED', - self::IMPORT_JOB_STATE_VALIDATING => 'IMPORT_JOB_STATE_VALIDATING', - self::IMPORT_JOB_STATE_FAILED_VALIDATION => 'IMPORT_JOB_STATE_FAILED_VALIDATION', - self::IMPORT_JOB_STATE_READY => 'IMPORT_JOB_STATE_READY', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ImportJobState::class, \Google\Cloud\MigrationCenter\V1\ImportJob_ImportJobState::class); - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ImportJobFormat.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ImportJobFormat.php deleted file mode 100644 index 7243bd1d17dc..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ImportJobFormat.php +++ /dev/null @@ -1,88 +0,0 @@ -google.cloud.migrationcenter.v1.ImportJobFormat - */ -class ImportJobFormat -{ - /** - * Default value. - * - * Generated from protobuf enum IMPORT_JOB_FORMAT_UNSPECIFIED = 0; - */ - const IMPORT_JOB_FORMAT_UNSPECIFIED = 0; - /** - * RVTools format (XLSX). - * - * Generated from protobuf enum IMPORT_JOB_FORMAT_RVTOOLS_XLSX = 1; - */ - const IMPORT_JOB_FORMAT_RVTOOLS_XLSX = 1; - /** - * RVTools format (CSV). - * - * Generated from protobuf enum IMPORT_JOB_FORMAT_RVTOOLS_CSV = 2; - */ - const IMPORT_JOB_FORMAT_RVTOOLS_CSV = 2; - /** - * CSV format exported from AWS using the - * [AWS collection - * script][https://github.com/GoogleCloudPlatform/aws-to-stratozone-export]. - * - * Generated from protobuf enum IMPORT_JOB_FORMAT_EXPORTED_AWS_CSV = 4; - */ - const IMPORT_JOB_FORMAT_EXPORTED_AWS_CSV = 4; - /** - * CSV format exported from Azure using the - * [Azure collection - * script][https://github.com/GoogleCloudPlatform/azure-to-stratozone-export]. - * - * Generated from protobuf enum IMPORT_JOB_FORMAT_EXPORTED_AZURE_CSV = 5; - */ - const IMPORT_JOB_FORMAT_EXPORTED_AZURE_CSV = 5; - /** - * CSV format created manually and following the StratoZone format. For more - * information, see [Manually create and upload data - * tables][https://cloud.google.com/migrate/stratozone/docs/import-data-portal]. - * - * Generated from protobuf enum IMPORT_JOB_FORMAT_STRATOZONE_CSV = 6; - */ - const IMPORT_JOB_FORMAT_STRATOZONE_CSV = 6; - - private static $valueToName = [ - self::IMPORT_JOB_FORMAT_UNSPECIFIED => 'IMPORT_JOB_FORMAT_UNSPECIFIED', - self::IMPORT_JOB_FORMAT_RVTOOLS_XLSX => 'IMPORT_JOB_FORMAT_RVTOOLS_XLSX', - self::IMPORT_JOB_FORMAT_RVTOOLS_CSV => 'IMPORT_JOB_FORMAT_RVTOOLS_CSV', - self::IMPORT_JOB_FORMAT_EXPORTED_AWS_CSV => 'IMPORT_JOB_FORMAT_EXPORTED_AWS_CSV', - self::IMPORT_JOB_FORMAT_EXPORTED_AZURE_CSV => 'IMPORT_JOB_FORMAT_EXPORTED_AZURE_CSV', - self::IMPORT_JOB_FORMAT_STRATOZONE_CSV => 'IMPORT_JOB_FORMAT_STRATOZONE_CSV', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ImportJobView.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ImportJobView.php deleted file mode 100644 index b203f8c4cb41..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ImportJobView.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.migrationcenter.v1.ImportJobView - */ -class ImportJobView -{ - /** - * The import job view is not specified. The API displays the basic view by - * default. - * - * Generated from protobuf enum IMPORT_JOB_VIEW_UNSPECIFIED = 0; - */ - const IMPORT_JOB_VIEW_UNSPECIFIED = 0; - /** - * The import job view includes basic metadata of an import job. - * This view does not include payload information. - * - * Generated from protobuf enum IMPORT_JOB_VIEW_BASIC = 1; - */ - const IMPORT_JOB_VIEW_BASIC = 1; - /** - * The import job view includes all metadata of an import job. - * - * Generated from protobuf enum IMPORT_JOB_VIEW_FULL = 2; - */ - const IMPORT_JOB_VIEW_FULL = 2; - - private static $valueToName = [ - self::IMPORT_JOB_VIEW_UNSPECIFIED => 'IMPORT_JOB_VIEW_UNSPECIFIED', - self::IMPORT_JOB_VIEW_BASIC => 'IMPORT_JOB_VIEW_BASIC', - self::IMPORT_JOB_VIEW_FULL => 'IMPORT_JOB_VIEW_FULL', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ImportRowError.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ImportRowError.php deleted file mode 100644 index 25d5131c0196..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ImportRowError.php +++ /dev/null @@ -1,174 +0,0 @@ -google.cloud.migrationcenter.v1.ImportRowError - */ -class ImportRowError extends \Google\Protobuf\Internal\Message -{ - /** - * The row number where the error was detected. - * - * Generated from protobuf field int32 row_number = 1 [deprecated = true]; - * @deprecated - */ - protected $row_number = 0; - /** - * The name of the VM in the row. - * - * Generated from protobuf field string vm_name = 2; - */ - protected $vm_name = ''; - /** - * The VM UUID. - * - * Generated from protobuf field string vm_uuid = 3; - */ - protected $vm_uuid = ''; - /** - * The list of errors detected in the row. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ImportError errors = 4; - */ - private $errors; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $row_number - * The row number where the error was detected. - * @type string $vm_name - * The name of the VM in the row. - * @type string $vm_uuid - * The VM UUID. - * @type array<\Google\Cloud\MigrationCenter\V1\ImportError>|\Google\Protobuf\Internal\RepeatedField $errors - * The list of errors detected in the row. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * The row number where the error was detected. - * - * Generated from protobuf field int32 row_number = 1 [deprecated = true]; - * @return int - * @deprecated - */ - public function getRowNumber() - { - @trigger_error('row_number is deprecated.', E_USER_DEPRECATED); - return $this->row_number; - } - - /** - * The row number where the error was detected. - * - * Generated from protobuf field int32 row_number = 1 [deprecated = true]; - * @param int $var - * @return $this - * @deprecated - */ - public function setRowNumber($var) - { - @trigger_error('row_number is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkInt32($var); - $this->row_number = $var; - - return $this; - } - - /** - * The name of the VM in the row. - * - * Generated from protobuf field string vm_name = 2; - * @return string - */ - public function getVmName() - { - return $this->vm_name; - } - - /** - * The name of the VM in the row. - * - * Generated from protobuf field string vm_name = 2; - * @param string $var - * @return $this - */ - public function setVmName($var) - { - GPBUtil::checkString($var, True); - $this->vm_name = $var; - - return $this; - } - - /** - * The VM UUID. - * - * Generated from protobuf field string vm_uuid = 3; - * @return string - */ - public function getVmUuid() - { - return $this->vm_uuid; - } - - /** - * The VM UUID. - * - * Generated from protobuf field string vm_uuid = 3; - * @param string $var - * @return $this - */ - public function setVmUuid($var) - { - GPBUtil::checkString($var, True); - $this->vm_uuid = $var; - - return $this; - } - - /** - * The list of errors detected in the row. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ImportError errors = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getErrors() - { - return $this->errors; - } - - /** - * The list of errors detected in the row. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ImportError errors = 4; - * @param array<\Google\Cloud\MigrationCenter\V1\ImportError>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setErrors($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\ImportError::class); - $this->errors = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Insight.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Insight.php deleted file mode 100644 index 990ef8436af2..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Insight.php +++ /dev/null @@ -1,108 +0,0 @@ -google.cloud.migrationcenter.v1.Insight - */ -class Insight extends \Google\Protobuf\Internal\Message -{ - protected $insight; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\MigrationCenter\V1\MigrationInsight $migration_insight - * Output only. An insight about potential migrations for an asset. - * @type \Google\Cloud\MigrationCenter\V1\GenericInsight $generic_insight - * Output only. A generic insight about an asset - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Output only. An insight about potential migrations for an asset. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.MigrationInsight migration_insight = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\MigrationCenter\V1\MigrationInsight|null - */ - public function getMigrationInsight() - { - return $this->readOneof(1); - } - - public function hasMigrationInsight() - { - return $this->hasOneof(1); - } - - /** - * Output only. An insight about potential migrations for an asset. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.MigrationInsight migration_insight = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\MigrationCenter\V1\MigrationInsight $var - * @return $this - */ - public function setMigrationInsight($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\MigrationInsight::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Output only. A generic insight about an asset - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.GenericInsight generic_insight = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\MigrationCenter\V1\GenericInsight|null - */ - public function getGenericInsight() - { - return $this->readOneof(2); - } - - public function hasGenericInsight() - { - return $this->hasOneof(2); - } - - /** - * Output only. A generic insight about an asset - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.GenericInsight generic_insight = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\MigrationCenter\V1\GenericInsight $var - * @return $this - */ - public function setGenericInsight($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\GenericInsight::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * @return string - */ - public function getInsight() - { - return $this->whichOneof("insight"); - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/InsightList.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/InsightList.php deleted file mode 100644 index ecaa4573249f..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/InsightList.php +++ /dev/null @@ -1,111 +0,0 @@ -google.cloud.migrationcenter.v1.InsightList - */ -class InsightList extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Insights of the list. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.Insight insights = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $insights; - /** - * Output only. Update timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\MigrationCenter\V1\Insight>|\Google\Protobuf\Internal\RepeatedField $insights - * Output only. Insights of the list. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. Update timestamp. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Insights of the list. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.Insight insights = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getInsights() - { - return $this->insights; - } - - /** - * Output only. Insights of the list. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.Insight insights = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\MigrationCenter\V1\Insight>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setInsights($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\Insight::class); - $this->insights = $arr; - - return $this; - } - - /** - * Output only. Update timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. Update timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/LicenseType.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/LicenseType.php deleted file mode 100644 index 695c1cc788ec..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/LicenseType.php +++ /dev/null @@ -1,63 +0,0 @@ -google.cloud.migrationcenter.v1.LicenseType - */ -class LicenseType -{ - /** - * Unspecified (default value). - * - * Generated from protobuf enum LICENSE_TYPE_UNSPECIFIED = 0; - */ - const LICENSE_TYPE_UNSPECIFIED = 0; - /** - * Default Google Cloud licensing plan. Licensing is charged per usage. - * This a good value to start with. - * - * Generated from protobuf enum LICENSE_TYPE_DEFAULT = 1; - */ - const LICENSE_TYPE_DEFAULT = 1; - /** - * Bring-your-own-license (BYOL) plan. User provides the OS license. - * - * Generated from protobuf enum LICENSE_TYPE_BRING_YOUR_OWN_LICENSE = 2; - */ - const LICENSE_TYPE_BRING_YOUR_OWN_LICENSE = 2; - - private static $valueToName = [ - self::LICENSE_TYPE_UNSPECIFIED => 'LICENSE_TYPE_UNSPECIFIED', - self::LICENSE_TYPE_DEFAULT => 'LICENSE_TYPE_DEFAULT', - self::LICENSE_TYPE_BRING_YOUR_OWN_LICENSE => 'LICENSE_TYPE_BRING_YOUR_OWN_LICENSE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListAssetsRequest.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListAssetsRequest.php deleted file mode 100644 index 2270d9571d64..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListAssetsRequest.php +++ /dev/null @@ -1,255 +0,0 @@ -google.cloud.migrationcenter.v1.ListAssetsRequest - */ -class ListAssetsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Parent value for `ListAssetsRequest`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Requested page size. Server may return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * Filtering results. - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - /** - * Field to sort by. See https://google.aip.dev/132#ordering for more details. - * - * Generated from protobuf field string order_by = 5; - */ - protected $order_by = ''; - /** - * View of the assets. Defaults to BASIC. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.AssetView view = 6; - */ - protected $view = 0; - - /** - * @param string $parent Required. Parent value for `ListAssetsRequest`. Please see - * {@see MigrationCenterClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\MigrationCenter\V1\ListAssetsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Parent value for `ListAssetsRequest`. - * @type int $page_size - * Requested page size. Server may return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * @type string $page_token - * A token identifying a page of results the server should return. - * @type string $filter - * Filtering results. - * @type string $order_by - * Field to sort by. See https://google.aip.dev/132#ordering for more details. - * @type int $view - * View of the assets. Defaults to BASIC. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Required. Parent value for `ListAssetsRequest`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Parent value for `ListAssetsRequest`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Requested page size. Server may return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Requested page size. Server may return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Filtering results. - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Filtering results. - * - * Generated from protobuf field string filter = 4; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Field to sort by. See https://google.aip.dev/132#ordering for more details. - * - * Generated from protobuf field string order_by = 5; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Field to sort by. See https://google.aip.dev/132#ordering for more details. - * - * Generated from protobuf field string order_by = 5; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - - /** - * View of the assets. Defaults to BASIC. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.AssetView view = 6; - * @return int - */ - public function getView() - { - return $this->view; - } - - /** - * View of the assets. Defaults to BASIC. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.AssetView view = 6; - * @param int $var - * @return $this - */ - public function setView($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\MigrationCenter\V1\AssetView::class); - $this->view = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListAssetsResponse.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListAssetsResponse.php deleted file mode 100644 index 747c8939c0a2..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListAssetsResponse.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.migrationcenter.v1.ListAssetsResponse - */ -class ListAssetsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of assets. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.Asset assets = 1; - */ - private $assets; - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\MigrationCenter\V1\Asset>|\Google\Protobuf\Internal\RepeatedField $assets - * A list of assets. - * @type string $next_page_token - * A token identifying a page of results the server should return. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * A list of assets. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.Asset assets = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAssets() - { - return $this->assets; - } - - /** - * A list of assets. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.Asset assets = 1; - * @param array<\Google\Cloud\MigrationCenter\V1\Asset>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAssets($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\Asset::class); - $this->assets = $arr; - - return $this; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListErrorFramesRequest.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListErrorFramesRequest.php deleted file mode 100644 index d6553b985f6c..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListErrorFramesRequest.php +++ /dev/null @@ -1,191 +0,0 @@ -google.cloud.migrationcenter.v1.ListErrorFramesRequest - */ -class ListErrorFramesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Parent value (the source) for `ListErrorFramesRequest`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Requested page size. Server may return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * Optional. An optional view mode to control the level of details of each - * error frame. The default is a BASIC frame view. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ErrorFrameView view = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $view = 0; - - /** - * @param string $parent Required. Parent value (the source) for `ListErrorFramesRequest`. Please see - * {@see MigrationCenterClient::sourceName()} for help formatting this field. - * - * @return \Google\Cloud\MigrationCenter\V1\ListErrorFramesRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Parent value (the source) for `ListErrorFramesRequest`. - * @type int $page_size - * Requested page size. Server may return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * @type string $page_token - * A token identifying a page of results the server should return. - * @type int $view - * Optional. An optional view mode to control the level of details of each - * error frame. The default is a BASIC frame view. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Required. Parent value (the source) for `ListErrorFramesRequest`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Parent value (the source) for `ListErrorFramesRequest`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Requested page size. Server may return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Requested page size. Server may return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Optional. An optional view mode to control the level of details of each - * error frame. The default is a BASIC frame view. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ErrorFrameView view = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getView() - { - return $this->view; - } - - /** - * Optional. An optional view mode to control the level of details of each - * error frame. The default is a BASIC frame view. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ErrorFrameView view = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setView($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\MigrationCenter\V1\ErrorFrameView::class); - $this->view = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListErrorFramesResponse.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListErrorFramesResponse.php deleted file mode 100644 index a01575621bc4..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListErrorFramesResponse.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.migrationcenter.v1.ListErrorFramesResponse - */ -class ListErrorFramesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of error frames. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ErrorFrame error_frames = 1; - */ - private $error_frames; - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\MigrationCenter\V1\ErrorFrame>|\Google\Protobuf\Internal\RepeatedField $error_frames - * The list of error frames. - * @type string $next_page_token - * A token identifying a page of results the server should return. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * The list of error frames. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ErrorFrame error_frames = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getErrorFrames() - { - return $this->error_frames; - } - - /** - * The list of error frames. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ErrorFrame error_frames = 1; - * @param array<\Google\Cloud\MigrationCenter\V1\ErrorFrame>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setErrorFrames($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\ErrorFrame::class); - $this->error_frames = $arr; - - return $this; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListGroupsRequest.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListGroupsRequest.php deleted file mode 100644 index 609ab9c2c0c8..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListGroupsRequest.php +++ /dev/null @@ -1,221 +0,0 @@ -google.cloud.migrationcenter.v1.ListGroupsRequest - */ -class ListGroupsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Parent value for `ListGroupsRequest`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Requested page size. Server may return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * Filtering results. - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - /** - * Field to sort by. See https://google.aip.dev/132#ordering for more details. - * - * Generated from protobuf field string order_by = 5; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. Parent value for `ListGroupsRequest`. Please see - * {@see MigrationCenterClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\MigrationCenter\V1\ListGroupsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Parent value for `ListGroupsRequest`. - * @type int $page_size - * Requested page size. Server may return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * @type string $page_token - * A token identifying a page of results the server should return. - * @type string $filter - * Filtering results. - * @type string $order_by - * Field to sort by. See https://google.aip.dev/132#ordering for more details. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Required. Parent value for `ListGroupsRequest`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Parent value for `ListGroupsRequest`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Requested page size. Server may return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Requested page size. Server may return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Filtering results. - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Filtering results. - * - * Generated from protobuf field string filter = 4; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Field to sort by. See https://google.aip.dev/132#ordering for more details. - * - * Generated from protobuf field string order_by = 5; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Field to sort by. See https://google.aip.dev/132#ordering for more details. - * - * Generated from protobuf field string order_by = 5; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListGroupsResponse.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListGroupsResponse.php deleted file mode 100644 index 433533778676..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListGroupsResponse.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.migrationcenter.v1.ListGroupsResponse - */ -class ListGroupsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of Group - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.Group groups = 1; - */ - private $groups; - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\MigrationCenter\V1\Group>|\Google\Protobuf\Internal\RepeatedField $groups - * The list of Group - * @type string $next_page_token - * A token identifying a page of results the server should return. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * The list of Group - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.Group groups = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getGroups() - { - return $this->groups; - } - - /** - * The list of Group - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.Group groups = 1; - * @param array<\Google\Cloud\MigrationCenter\V1\Group>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setGroups($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\Group::class); - $this->groups = $arr; - - return $this; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListImportDataFilesRequest.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListImportDataFilesRequest.php deleted file mode 100644 index 658157f3a3f3..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListImportDataFilesRequest.php +++ /dev/null @@ -1,241 +0,0 @@ -google.cloud.migrationcenter.v1.ListImportDataFilesRequest - */ -class ListImportDataFilesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the parent of the `ImportDataFiles` resource. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of data files to return. The service may return - * fewer than this value. If unspecified, at most 500 data files will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A page token, received from a previous `ListImportDataFiles` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListImportDataFiles` - * must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * Filtering results. - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - /** - * Field to sort by. See https://google.aip.dev/132#ordering for more details. - * - * Generated from protobuf field string order_by = 5; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. Name of the parent of the `ImportDataFiles` resource. Please see - * {@see MigrationCenterClient::importJobName()} for help formatting this field. - * - * @return \Google\Cloud\MigrationCenter\V1\ListImportDataFilesRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Name of the parent of the `ImportDataFiles` resource. - * @type int $page_size - * The maximum number of data files to return. The service may return - * fewer than this value. If unspecified, at most 500 data files will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. - * @type string $page_token - * A page token, received from a previous `ListImportDataFiles` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListImportDataFiles` - * must match the call that provided the page token. - * @type string $filter - * Filtering results. - * @type string $order_by - * Field to sort by. See https://google.aip.dev/132#ordering for more details. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the parent of the `ImportDataFiles` resource. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Name of the parent of the `ImportDataFiles` resource. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * The maximum number of data files to return. The service may return - * fewer than this value. If unspecified, at most 500 data files will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of data files to return. The service may return - * fewer than this value. If unspecified, at most 500 data files will be - * returned. The maximum value is 1000; values above 1000 will be coerced to - * 1000. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A page token, received from a previous `ListImportDataFiles` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListImportDataFiles` - * must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A page token, received from a previous `ListImportDataFiles` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListImportDataFiles` - * must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Filtering results. - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Filtering results. - * - * Generated from protobuf field string filter = 4; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Field to sort by. See https://google.aip.dev/132#ordering for more details. - * - * Generated from protobuf field string order_by = 5; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Field to sort by. See https://google.aip.dev/132#ordering for more details. - * - * Generated from protobuf field string order_by = 5; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListImportDataFilesResponse.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListImportDataFilesResponse.php deleted file mode 100644 index 47bdd308d3e4..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListImportDataFilesResponse.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.migrationcenter.v1.ListImportDataFilesResponse - */ -class ListImportDataFilesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of import data files. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ImportDataFile import_data_files = 1; - */ - private $import_data_files; - /** - * A token that can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\MigrationCenter\V1\ImportDataFile>|\Google\Protobuf\Internal\RepeatedField $import_data_files - * The list of import data files. - * @type string $next_page_token - * A token that can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * The list of import data files. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ImportDataFile import_data_files = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getImportDataFiles() - { - return $this->import_data_files; - } - - /** - * The list of import data files. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ImportDataFile import_data_files = 1; - * @param array<\Google\Cloud\MigrationCenter\V1\ImportDataFile>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setImportDataFiles($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\ImportDataFile::class); - $this->import_data_files = $arr; - - return $this; - } - - /** - * A token that can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token that can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListImportJobsRequest.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListImportJobsRequest.php deleted file mode 100644 index 8dd59bea8a89..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListImportJobsRequest.php +++ /dev/null @@ -1,259 +0,0 @@ -google.cloud.migrationcenter.v1.ListImportJobsRequest - */ -class ListImportJobsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Parent value for `ListImportJobsRequest`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Requested page size. Server may return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * Filtering results. - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - /** - * Field to sort by. See https://google.aip.dev/132#ordering for more details. - * - * Generated from protobuf field string order_by = 5; - */ - protected $order_by = ''; - /** - * Optional. The level of details of each import job. - * Default value is BASIC. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ImportJobView view = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $view = 0; - - /** - * @param string $parent Required. Parent value for `ListImportJobsRequest`. Please see - * {@see MigrationCenterClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\MigrationCenter\V1\ListImportJobsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Parent value for `ListImportJobsRequest`. - * @type int $page_size - * Requested page size. Server may return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * @type string $page_token - * A token identifying a page of results the server should return. - * @type string $filter - * Filtering results. - * @type string $order_by - * Field to sort by. See https://google.aip.dev/132#ordering for more details. - * @type int $view - * Optional. The level of details of each import job. - * Default value is BASIC. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Required. Parent value for `ListImportJobsRequest`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Parent value for `ListImportJobsRequest`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Requested page size. Server may return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Requested page size. Server may return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Filtering results. - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Filtering results. - * - * Generated from protobuf field string filter = 4; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Field to sort by. See https://google.aip.dev/132#ordering for more details. - * - * Generated from protobuf field string order_by = 5; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Field to sort by. See https://google.aip.dev/132#ordering for more details. - * - * Generated from protobuf field string order_by = 5; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - - /** - * Optional. The level of details of each import job. - * Default value is BASIC. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ImportJobView view = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getView() - { - return $this->view; - } - - /** - * Optional. The level of details of each import job. - * Default value is BASIC. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ImportJobView view = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setView($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\MigrationCenter\V1\ImportJobView::class); - $this->view = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListImportJobsResponse.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListImportJobsResponse.php deleted file mode 100644 index 42c57493d293..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListImportJobsResponse.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.migrationcenter.v1.ListImportJobsResponse - */ -class ListImportJobsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of import jobs. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ImportJob import_jobs = 1; - */ - private $import_jobs; - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\MigrationCenter\V1\ImportJob>|\Google\Protobuf\Internal\RepeatedField $import_jobs - * The list of import jobs. - * @type string $next_page_token - * A token identifying a page of results the server should return. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * The list of import jobs. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ImportJob import_jobs = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getImportJobs() - { - return $this->import_jobs; - } - - /** - * The list of import jobs. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ImportJob import_jobs = 1; - * @param array<\Google\Cloud\MigrationCenter\V1\ImportJob>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setImportJobs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\ImportJob::class); - $this->import_jobs = $arr; - - return $this; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListPreferenceSetsRequest.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListPreferenceSetsRequest.php deleted file mode 100644 index 9a4713babe01..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListPreferenceSetsRequest.php +++ /dev/null @@ -1,191 +0,0 @@ -google.cloud.migrationcenter.v1.ListPreferenceSetsRequest - */ -class ListPreferenceSetsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Parent value for `ListPreferenceSetsRequest`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Requested page size. Server may return fewer items than requested. - * If unspecified, at most 500 preference sets will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * Field to sort by. See https://google.aip.dev/132#ordering for more details. - * - * Generated from protobuf field string order_by = 5; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. Parent value for `ListPreferenceSetsRequest`. Please see - * {@see MigrationCenterClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\MigrationCenter\V1\ListPreferenceSetsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Parent value for `ListPreferenceSetsRequest`. - * @type int $page_size - * Requested page size. Server may return fewer items than requested. - * If unspecified, at most 500 preference sets will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * @type string $page_token - * A token identifying a page of results the server should return. - * @type string $order_by - * Field to sort by. See https://google.aip.dev/132#ordering for more details. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Required. Parent value for `ListPreferenceSetsRequest`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Parent value for `ListPreferenceSetsRequest`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Requested page size. Server may return fewer items than requested. - * If unspecified, at most 500 preference sets will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Requested page size. Server may return fewer items than requested. - * If unspecified, at most 500 preference sets will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Field to sort by. See https://google.aip.dev/132#ordering for more details. - * - * Generated from protobuf field string order_by = 5; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Field to sort by. See https://google.aip.dev/132#ordering for more details. - * - * Generated from protobuf field string order_by = 5; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListPreferenceSetsResponse.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListPreferenceSetsResponse.php deleted file mode 100644 index 9066e61fbad0..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListPreferenceSetsResponse.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.migrationcenter.v1.ListPreferenceSetsResponse - */ -class ListPreferenceSetsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of PreferenceSets - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.PreferenceSet preference_sets = 1; - */ - private $preference_sets; - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\MigrationCenter\V1\PreferenceSet>|\Google\Protobuf\Internal\RepeatedField $preference_sets - * The list of PreferenceSets - * @type string $next_page_token - * A token identifying a page of results the server should return. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * The list of PreferenceSets - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.PreferenceSet preference_sets = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPreferenceSets() - { - return $this->preference_sets; - } - - /** - * The list of PreferenceSets - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.PreferenceSet preference_sets = 1; - * @param array<\Google\Cloud\MigrationCenter\V1\PreferenceSet>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPreferenceSets($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\PreferenceSet::class); - $this->preference_sets = $arr; - - return $this; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListReportConfigsRequest.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListReportConfigsRequest.php deleted file mode 100644 index f0736d1ae9fa..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListReportConfigsRequest.php +++ /dev/null @@ -1,221 +0,0 @@ -google.cloud.migrationcenter.v1.ListReportConfigsRequest - */ -class ListReportConfigsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Parent value for `ListReportConfigsRequest`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Requested page size. Server may return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * Filtering results. - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - /** - * Field to sort by. See https://google.aip.dev/132#ordering for more details. - * - * Generated from protobuf field string order_by = 5; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. Parent value for `ListReportConfigsRequest`. Please see - * {@see MigrationCenterClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\MigrationCenter\V1\ListReportConfigsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Parent value for `ListReportConfigsRequest`. - * @type int $page_size - * Requested page size. Server may return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * @type string $page_token - * A token identifying a page of results the server should return. - * @type string $filter - * Filtering results. - * @type string $order_by - * Field to sort by. See https://google.aip.dev/132#ordering for more details. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Required. Parent value for `ListReportConfigsRequest`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Parent value for `ListReportConfigsRequest`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Requested page size. Server may return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Requested page size. Server may return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Filtering results. - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Filtering results. - * - * Generated from protobuf field string filter = 4; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Field to sort by. See https://google.aip.dev/132#ordering for more details. - * - * Generated from protobuf field string order_by = 5; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Field to sort by. See https://google.aip.dev/132#ordering for more details. - * - * Generated from protobuf field string order_by = 5; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListReportConfigsResponse.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListReportConfigsResponse.php deleted file mode 100644 index 262c7dfa22bd..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListReportConfigsResponse.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.migrationcenter.v1.ListReportConfigsResponse - */ -class ListReportConfigsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of report configs. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ReportConfig report_configs = 1; - */ - private $report_configs; - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\MigrationCenter\V1\ReportConfig>|\Google\Protobuf\Internal\RepeatedField $report_configs - * A list of report configs. - * @type string $next_page_token - * A token identifying a page of results the server should return. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * A list of report configs. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ReportConfig report_configs = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getReportConfigs() - { - return $this->report_configs; - } - - /** - * A list of report configs. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ReportConfig report_configs = 1; - * @param array<\Google\Cloud\MigrationCenter\V1\ReportConfig>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setReportConfigs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\ReportConfig::class); - $this->report_configs = $arr; - - return $this; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListReportsRequest.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListReportsRequest.php deleted file mode 100644 index 85c5b136e30b..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListReportsRequest.php +++ /dev/null @@ -1,255 +0,0 @@ -google.cloud.migrationcenter.v1.ListReportsRequest - */ -class ListReportsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Parent value for `ListReportsRequest`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Requested page size. The server may return fewer items than requested. - * If unspecified, the server will pick an appropriate default value. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A token identifying a page of results that the server should return. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * Filtering results. - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - /** - * Field to sort by. See https://google.aip.dev/132#ordering for more details. - * - * Generated from protobuf field string order_by = 5; - */ - protected $order_by = ''; - /** - * Determines what information to retrieve for each Report. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ReportView view = 6; - */ - protected $view = 0; - - /** - * @param string $parent Required. Parent value for `ListReportsRequest`. Please see - * {@see MigrationCenterClient::reportConfigName()} for help formatting this field. - * - * @return \Google\Cloud\MigrationCenter\V1\ListReportsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Parent value for `ListReportsRequest`. - * @type int $page_size - * Requested page size. The server may return fewer items than requested. - * If unspecified, the server will pick an appropriate default value. - * @type string $page_token - * A token identifying a page of results that the server should return. - * @type string $filter - * Filtering results. - * @type string $order_by - * Field to sort by. See https://google.aip.dev/132#ordering for more details. - * @type int $view - * Determines what information to retrieve for each Report. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Required. Parent value for `ListReportsRequest`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Parent value for `ListReportsRequest`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Requested page size. The server may return fewer items than requested. - * If unspecified, the server will pick an appropriate default value. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Requested page size. The server may return fewer items than requested. - * If unspecified, the server will pick an appropriate default value. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A token identifying a page of results that the server should return. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A token identifying a page of results that the server should return. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Filtering results. - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Filtering results. - * - * Generated from protobuf field string filter = 4; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Field to sort by. See https://google.aip.dev/132#ordering for more details. - * - * Generated from protobuf field string order_by = 5; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Field to sort by. See https://google.aip.dev/132#ordering for more details. - * - * Generated from protobuf field string order_by = 5; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - - /** - * Determines what information to retrieve for each Report. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ReportView view = 6; - * @return int - */ - public function getView() - { - return $this->view; - } - - /** - * Determines what information to retrieve for each Report. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ReportView view = 6; - * @param int $var - * @return $this - */ - public function setView($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\MigrationCenter\V1\ReportView::class); - $this->view = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListReportsResponse.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListReportsResponse.php deleted file mode 100644 index 7b0da1132933..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListReportsResponse.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.migrationcenter.v1.ListReportsResponse - */ -class ListReportsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of Reports. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.Report reports = 1; - */ - private $reports; - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\MigrationCenter\V1\Report>|\Google\Protobuf\Internal\RepeatedField $reports - * The list of Reports. - * @type string $next_page_token - * A token identifying a page of results the server should return. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * The list of Reports. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.Report reports = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getReports() - { - return $this->reports; - } - - /** - * The list of Reports. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.Report reports = 1; - * @param array<\Google\Cloud\MigrationCenter\V1\Report>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setReports($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\Report::class); - $this->reports = $arr; - - return $this; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListSourcesRequest.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListSourcesRequest.php deleted file mode 100644 index 25b0f1dd0ca6..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListSourcesRequest.php +++ /dev/null @@ -1,221 +0,0 @@ -google.cloud.migrationcenter.v1.ListSourcesRequest - */ -class ListSourcesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Parent value for `ListSourcesRequest`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Requested page size. The server may return fewer items than requested. - * If unspecified, the server will pick an appropriate default value. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A token identifying a page of results that the server should return. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * Filtering results. - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - /** - * Field to sort by. See https://google.aip.dev/132#ordering for more details. - * - * Generated from protobuf field string order_by = 5; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. Parent value for `ListSourcesRequest`. Please see - * {@see MigrationCenterClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\MigrationCenter\V1\ListSourcesRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Parent value for `ListSourcesRequest`. - * @type int $page_size - * Requested page size. The server may return fewer items than requested. - * If unspecified, the server will pick an appropriate default value. - * @type string $page_token - * A token identifying a page of results that the server should return. - * @type string $filter - * Filtering results. - * @type string $order_by - * Field to sort by. See https://google.aip.dev/132#ordering for more details. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Required. Parent value for `ListSourcesRequest`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Parent value for `ListSourcesRequest`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Requested page size. The server may return fewer items than requested. - * If unspecified, the server will pick an appropriate default value. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Requested page size. The server may return fewer items than requested. - * If unspecified, the server will pick an appropriate default value. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A token identifying a page of results that the server should return. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A token identifying a page of results that the server should return. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Filtering results. - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Filtering results. - * - * Generated from protobuf field string filter = 4; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Field to sort by. See https://google.aip.dev/132#ordering for more details. - * - * Generated from protobuf field string order_by = 5; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Field to sort by. See https://google.aip.dev/132#ordering for more details. - * - * Generated from protobuf field string order_by = 5; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListSourcesResponse.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListSourcesResponse.php deleted file mode 100644 index 1e4b1dbaaff8..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ListSourcesResponse.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.migrationcenter.v1.ListSourcesResponse - */ -class ListSourcesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of sources. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.Source sources = 1; - */ - private $sources; - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\MigrationCenter\V1\Source>|\Google\Protobuf\Internal\RepeatedField $sources - * The list of sources. - * @type string $next_page_token - * A token identifying a page of results the server should return. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * The list of sources. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.Source sources = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSources() - { - return $this->sources; - } - - /** - * The list of sources. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.Source sources = 1; - * @param array<\Google\Cloud\MigrationCenter\V1\Source>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSources($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\Source::class); - $this->sources = $arr; - - return $this; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/MachineArchitectureDetails.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/MachineArchitectureDetails.php deleted file mode 100644 index 45790ac59bd9..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/MachineArchitectureDetails.php +++ /dev/null @@ -1,315 +0,0 @@ -google.cloud.migrationcenter.v1.MachineArchitectureDetails - */ -class MachineArchitectureDetails extends \Google\Protobuf\Internal\Message -{ - /** - * CPU architecture, e.g., "x64-based PC", "x86_64", "i686" etc. - * - * Generated from protobuf field string cpu_architecture = 1; - */ - protected $cpu_architecture = ''; - /** - * CPU name, e.g., "Intel Xeon E5-2690", "AMD EPYC 7571" etc. - * - * Generated from protobuf field string cpu_name = 2; - */ - protected $cpu_name = ''; - /** - * Hardware vendor. - * - * Generated from protobuf field string vendor = 3; - */ - protected $vendor = ''; - /** - * Number of CPU threads allocated to the machine. - * - * Generated from protobuf field int32 cpu_thread_count = 4; - */ - protected $cpu_thread_count = 0; - /** - * Number of processor sockets allocated to the machine. - * - * Generated from protobuf field int32 cpu_socket_count = 5; - */ - protected $cpu_socket_count = 0; - /** - * BIOS Details. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.BiosDetails bios = 6; - */ - protected $bios = null; - /** - * Firmware type. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.MachineArchitectureDetails.FirmwareType firmware_type = 7; - */ - protected $firmware_type = 0; - /** - * CPU hyper-threading support. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.MachineArchitectureDetails.CpuHyperThreading hyperthreading = 8; - */ - protected $hyperthreading = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $cpu_architecture - * CPU architecture, e.g., "x64-based PC", "x86_64", "i686" etc. - * @type string $cpu_name - * CPU name, e.g., "Intel Xeon E5-2690", "AMD EPYC 7571" etc. - * @type string $vendor - * Hardware vendor. - * @type int $cpu_thread_count - * Number of CPU threads allocated to the machine. - * @type int $cpu_socket_count - * Number of processor sockets allocated to the machine. - * @type \Google\Cloud\MigrationCenter\V1\BiosDetails $bios - * BIOS Details. - * @type int $firmware_type - * Firmware type. - * @type int $hyperthreading - * CPU hyper-threading support. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * CPU architecture, e.g., "x64-based PC", "x86_64", "i686" etc. - * - * Generated from protobuf field string cpu_architecture = 1; - * @return string - */ - public function getCpuArchitecture() - { - return $this->cpu_architecture; - } - - /** - * CPU architecture, e.g., "x64-based PC", "x86_64", "i686" etc. - * - * Generated from protobuf field string cpu_architecture = 1; - * @param string $var - * @return $this - */ - public function setCpuArchitecture($var) - { - GPBUtil::checkString($var, True); - $this->cpu_architecture = $var; - - return $this; - } - - /** - * CPU name, e.g., "Intel Xeon E5-2690", "AMD EPYC 7571" etc. - * - * Generated from protobuf field string cpu_name = 2; - * @return string - */ - public function getCpuName() - { - return $this->cpu_name; - } - - /** - * CPU name, e.g., "Intel Xeon E5-2690", "AMD EPYC 7571" etc. - * - * Generated from protobuf field string cpu_name = 2; - * @param string $var - * @return $this - */ - public function setCpuName($var) - { - GPBUtil::checkString($var, True); - $this->cpu_name = $var; - - return $this; - } - - /** - * Hardware vendor. - * - * Generated from protobuf field string vendor = 3; - * @return string - */ - public function getVendor() - { - return $this->vendor; - } - - /** - * Hardware vendor. - * - * Generated from protobuf field string vendor = 3; - * @param string $var - * @return $this - */ - public function setVendor($var) - { - GPBUtil::checkString($var, True); - $this->vendor = $var; - - return $this; - } - - /** - * Number of CPU threads allocated to the machine. - * - * Generated from protobuf field int32 cpu_thread_count = 4; - * @return int - */ - public function getCpuThreadCount() - { - return $this->cpu_thread_count; - } - - /** - * Number of CPU threads allocated to the machine. - * - * Generated from protobuf field int32 cpu_thread_count = 4; - * @param int $var - * @return $this - */ - public function setCpuThreadCount($var) - { - GPBUtil::checkInt32($var); - $this->cpu_thread_count = $var; - - return $this; - } - - /** - * Number of processor sockets allocated to the machine. - * - * Generated from protobuf field int32 cpu_socket_count = 5; - * @return int - */ - public function getCpuSocketCount() - { - return $this->cpu_socket_count; - } - - /** - * Number of processor sockets allocated to the machine. - * - * Generated from protobuf field int32 cpu_socket_count = 5; - * @param int $var - * @return $this - */ - public function setCpuSocketCount($var) - { - GPBUtil::checkInt32($var); - $this->cpu_socket_count = $var; - - return $this; - } - - /** - * BIOS Details. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.BiosDetails bios = 6; - * @return \Google\Cloud\MigrationCenter\V1\BiosDetails|null - */ - public function getBios() - { - return $this->bios; - } - - public function hasBios() - { - return isset($this->bios); - } - - public function clearBios() - { - unset($this->bios); - } - - /** - * BIOS Details. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.BiosDetails bios = 6; - * @param \Google\Cloud\MigrationCenter\V1\BiosDetails $var - * @return $this - */ - public function setBios($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\BiosDetails::class); - $this->bios = $var; - - return $this; - } - - /** - * Firmware type. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.MachineArchitectureDetails.FirmwareType firmware_type = 7; - * @return int - */ - public function getFirmwareType() - { - return $this->firmware_type; - } - - /** - * Firmware type. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.MachineArchitectureDetails.FirmwareType firmware_type = 7; - * @param int $var - * @return $this - */ - public function setFirmwareType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\MigrationCenter\V1\MachineArchitectureDetails\FirmwareType::class); - $this->firmware_type = $var; - - return $this; - } - - /** - * CPU hyper-threading support. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.MachineArchitectureDetails.CpuHyperThreading hyperthreading = 8; - * @return int - */ - public function getHyperthreading() - { - return $this->hyperthreading; - } - - /** - * CPU hyper-threading support. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.MachineArchitectureDetails.CpuHyperThreading hyperthreading = 8; - * @param int $var - * @return $this - */ - public function setHyperthreading($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\MigrationCenter\V1\MachineArchitectureDetails\CpuHyperThreading::class); - $this->hyperthreading = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/MachineArchitectureDetails/CpuHyperThreading.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/MachineArchitectureDetails/CpuHyperThreading.php deleted file mode 100644 index 85eefa303885..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/MachineArchitectureDetails/CpuHyperThreading.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.migrationcenter.v1.MachineArchitectureDetails.CpuHyperThreading - */ -class CpuHyperThreading -{ - /** - * Unspecified or unknown. - * - * Generated from protobuf enum CPU_HYPER_THREADING_UNSPECIFIED = 0; - */ - const CPU_HYPER_THREADING_UNSPECIFIED = 0; - /** - * Hyper-threading is disabled. - * - * Generated from protobuf enum DISABLED = 1; - */ - const DISABLED = 1; - /** - * Hyper-threading is enabled. - * - * Generated from protobuf enum ENABLED = 2; - */ - const ENABLED = 2; - - private static $valueToName = [ - self::CPU_HYPER_THREADING_UNSPECIFIED => 'CPU_HYPER_THREADING_UNSPECIFIED', - self::DISABLED => 'DISABLED', - self::ENABLED => 'ENABLED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CpuHyperThreading::class, \Google\Cloud\MigrationCenter\V1\MachineArchitectureDetails_CpuHyperThreading::class); - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/MachineArchitectureDetails/FirmwareType.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/MachineArchitectureDetails/FirmwareType.php deleted file mode 100644 index 2323225f79b3..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/MachineArchitectureDetails/FirmwareType.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.migrationcenter.v1.MachineArchitectureDetails.FirmwareType - */ -class FirmwareType -{ - /** - * Unspecified or unknown. - * - * Generated from protobuf enum FIRMWARE_TYPE_UNSPECIFIED = 0; - */ - const FIRMWARE_TYPE_UNSPECIFIED = 0; - /** - * BIOS firmware. - * - * Generated from protobuf enum BIOS = 1; - */ - const BIOS = 1; - /** - * EFI firmware. - * - * Generated from protobuf enum EFI = 2; - */ - const EFI = 2; - - private static $valueToName = [ - self::FIRMWARE_TYPE_UNSPECIFIED => 'FIRMWARE_TYPE_UNSPECIFIED', - self::BIOS => 'BIOS', - self::EFI => 'EFI', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(FirmwareType::class, \Google\Cloud\MigrationCenter\V1\MachineArchitectureDetails_FirmwareType::class); - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/MachineDetails.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/MachineDetails.php deleted file mode 100644 index 00a127cedaca..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/MachineDetails.php +++ /dev/null @@ -1,467 +0,0 @@ -google.cloud.migrationcenter.v1.MachineDetails - */ -class MachineDetails extends \Google\Protobuf\Internal\Message -{ - /** - * Machine unique identifier. - * - * Generated from protobuf field string uuid = 1; - */ - protected $uuid = ''; - /** - * Machine name. - * - * Generated from protobuf field string machine_name = 2; - */ - protected $machine_name = ''; - /** - * Machine creation time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; - */ - protected $create_time = null; - /** - * Number of CPU cores in the machine. Must be non-negative. - * - * Generated from protobuf field int32 core_count = 4; - */ - protected $core_count = 0; - /** - * The amount of memory in the machine. Must be non-negative. - * - * Generated from protobuf field int32 memory_mb = 5; - */ - protected $memory_mb = 0; - /** - * Power state of the machine. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.MachineDetails.PowerState power_state = 6; - */ - protected $power_state = 0; - /** - * Architecture details (vendor, CPU architecture). - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.MachineArchitectureDetails architecture = 7; - */ - protected $architecture = null; - /** - * Guest OS information. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.GuestOsDetails guest_os = 8; - */ - protected $guest_os = null; - /** - * Network details. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.MachineNetworkDetails network = 9; - */ - protected $network = null; - /** - * Disk details. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.MachineDiskDetails disks = 10; - */ - protected $disks = null; - /** - * Platform specific information. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.PlatformDetails platform = 11; - */ - protected $platform = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $uuid - * Machine unique identifier. - * @type string $machine_name - * Machine name. - * @type \Google\Protobuf\Timestamp $create_time - * Machine creation time. - * @type int $core_count - * Number of CPU cores in the machine. Must be non-negative. - * @type int $memory_mb - * The amount of memory in the machine. Must be non-negative. - * @type int $power_state - * Power state of the machine. - * @type \Google\Cloud\MigrationCenter\V1\MachineArchitectureDetails $architecture - * Architecture details (vendor, CPU architecture). - * @type \Google\Cloud\MigrationCenter\V1\GuestOsDetails $guest_os - * Guest OS information. - * @type \Google\Cloud\MigrationCenter\V1\MachineNetworkDetails $network - * Network details. - * @type \Google\Cloud\MigrationCenter\V1\MachineDiskDetails $disks - * Disk details. - * @type \Google\Cloud\MigrationCenter\V1\PlatformDetails $platform - * Platform specific information. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Machine unique identifier. - * - * Generated from protobuf field string uuid = 1; - * @return string - */ - public function getUuid() - { - return $this->uuid; - } - - /** - * Machine unique identifier. - * - * Generated from protobuf field string uuid = 1; - * @param string $var - * @return $this - */ - public function setUuid($var) - { - GPBUtil::checkString($var, True); - $this->uuid = $var; - - return $this; - } - - /** - * Machine name. - * - * Generated from protobuf field string machine_name = 2; - * @return string - */ - public function getMachineName() - { - return $this->machine_name; - } - - /** - * Machine name. - * - * Generated from protobuf field string machine_name = 2; - * @param string $var - * @return $this - */ - public function setMachineName($var) - { - GPBUtil::checkString($var, True); - $this->machine_name = $var; - - return $this; - } - - /** - * Machine creation time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Machine creation time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Number of CPU cores in the machine. Must be non-negative. - * - * Generated from protobuf field int32 core_count = 4; - * @return int - */ - public function getCoreCount() - { - return $this->core_count; - } - - /** - * Number of CPU cores in the machine. Must be non-negative. - * - * Generated from protobuf field int32 core_count = 4; - * @param int $var - * @return $this - */ - public function setCoreCount($var) - { - GPBUtil::checkInt32($var); - $this->core_count = $var; - - return $this; - } - - /** - * The amount of memory in the machine. Must be non-negative. - * - * Generated from protobuf field int32 memory_mb = 5; - * @return int - */ - public function getMemoryMb() - { - return $this->memory_mb; - } - - /** - * The amount of memory in the machine. Must be non-negative. - * - * Generated from protobuf field int32 memory_mb = 5; - * @param int $var - * @return $this - */ - public function setMemoryMb($var) - { - GPBUtil::checkInt32($var); - $this->memory_mb = $var; - - return $this; - } - - /** - * Power state of the machine. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.MachineDetails.PowerState power_state = 6; - * @return int - */ - public function getPowerState() - { - return $this->power_state; - } - - /** - * Power state of the machine. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.MachineDetails.PowerState power_state = 6; - * @param int $var - * @return $this - */ - public function setPowerState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\MigrationCenter\V1\MachineDetails\PowerState::class); - $this->power_state = $var; - - return $this; - } - - /** - * Architecture details (vendor, CPU architecture). - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.MachineArchitectureDetails architecture = 7; - * @return \Google\Cloud\MigrationCenter\V1\MachineArchitectureDetails|null - */ - public function getArchitecture() - { - return $this->architecture; - } - - public function hasArchitecture() - { - return isset($this->architecture); - } - - public function clearArchitecture() - { - unset($this->architecture); - } - - /** - * Architecture details (vendor, CPU architecture). - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.MachineArchitectureDetails architecture = 7; - * @param \Google\Cloud\MigrationCenter\V1\MachineArchitectureDetails $var - * @return $this - */ - public function setArchitecture($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\MachineArchitectureDetails::class); - $this->architecture = $var; - - return $this; - } - - /** - * Guest OS information. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.GuestOsDetails guest_os = 8; - * @return \Google\Cloud\MigrationCenter\V1\GuestOsDetails|null - */ - public function getGuestOs() - { - return $this->guest_os; - } - - public function hasGuestOs() - { - return isset($this->guest_os); - } - - public function clearGuestOs() - { - unset($this->guest_os); - } - - /** - * Guest OS information. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.GuestOsDetails guest_os = 8; - * @param \Google\Cloud\MigrationCenter\V1\GuestOsDetails $var - * @return $this - */ - public function setGuestOs($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\GuestOsDetails::class); - $this->guest_os = $var; - - return $this; - } - - /** - * Network details. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.MachineNetworkDetails network = 9; - * @return \Google\Cloud\MigrationCenter\V1\MachineNetworkDetails|null - */ - public function getNetwork() - { - return $this->network; - } - - public function hasNetwork() - { - return isset($this->network); - } - - public function clearNetwork() - { - unset($this->network); - } - - /** - * Network details. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.MachineNetworkDetails network = 9; - * @param \Google\Cloud\MigrationCenter\V1\MachineNetworkDetails $var - * @return $this - */ - public function setNetwork($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\MachineNetworkDetails::class); - $this->network = $var; - - return $this; - } - - /** - * Disk details. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.MachineDiskDetails disks = 10; - * @return \Google\Cloud\MigrationCenter\V1\MachineDiskDetails|null - */ - public function getDisks() - { - return $this->disks; - } - - public function hasDisks() - { - return isset($this->disks); - } - - public function clearDisks() - { - unset($this->disks); - } - - /** - * Disk details. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.MachineDiskDetails disks = 10; - * @param \Google\Cloud\MigrationCenter\V1\MachineDiskDetails $var - * @return $this - */ - public function setDisks($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\MachineDiskDetails::class); - $this->disks = $var; - - return $this; - } - - /** - * Platform specific information. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.PlatformDetails platform = 11; - * @return \Google\Cloud\MigrationCenter\V1\PlatformDetails|null - */ - public function getPlatform() - { - return $this->platform; - } - - public function hasPlatform() - { - return isset($this->platform); - } - - public function clearPlatform() - { - unset($this->platform); - } - - /** - * Platform specific information. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.PlatformDetails platform = 11; - * @param \Google\Cloud\MigrationCenter\V1\PlatformDetails $var - * @return $this - */ - public function setPlatform($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\PlatformDetails::class); - $this->platform = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/MachineDetails/PowerState.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/MachineDetails/PowerState.php deleted file mode 100644 index 21dad929d6af..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/MachineDetails/PowerState.php +++ /dev/null @@ -1,94 +0,0 @@ -google.cloud.migrationcenter.v1.MachineDetails.PowerState - */ -class PowerState -{ - /** - * Power state is unknown. - * - * Generated from protobuf enum POWER_STATE_UNSPECIFIED = 0; - */ - const POWER_STATE_UNSPECIFIED = 0; - /** - * The machine is preparing to enter the ACTIVE state. An instance may enter - * the PENDING state when it launches for the first time, or when it is - * started after being in the SUSPENDED state. - * - * Generated from protobuf enum PENDING = 1; - */ - const PENDING = 1; - /** - * The machine is active. - * - * Generated from protobuf enum ACTIVE = 2; - */ - const ACTIVE = 2; - /** - * The machine is being turned off. - * - * Generated from protobuf enum SUSPENDING = 3; - */ - const SUSPENDING = 3; - /** - * The machine is off. - * - * Generated from protobuf enum SUSPENDED = 4; - */ - const SUSPENDED = 4; - /** - * The machine is being deleted from the hosting platform. - * - * Generated from protobuf enum DELETING = 5; - */ - const DELETING = 5; - /** - * The machine is deleted from the hosting platform. - * - * Generated from protobuf enum DELETED = 6; - */ - const DELETED = 6; - - private static $valueToName = [ - self::POWER_STATE_UNSPECIFIED => 'POWER_STATE_UNSPECIFIED', - self::PENDING => 'PENDING', - self::ACTIVE => 'ACTIVE', - self::SUSPENDING => 'SUSPENDING', - self::SUSPENDED => 'SUSPENDED', - self::DELETING => 'DELETING', - self::DELETED => 'DELETED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(PowerState::class, \Google\Cloud\MigrationCenter\V1\MachineDetails_PowerState::class); - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/MachineDiskDetails.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/MachineDiskDetails.php deleted file mode 100644 index 968285069a4b..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/MachineDiskDetails.php +++ /dev/null @@ -1,145 +0,0 @@ -google.cloud.migrationcenter.v1.MachineDiskDetails - */ -class MachineDiskDetails extends \Google\Protobuf\Internal\Message -{ - /** - * Disk total Capacity. - * - * Generated from protobuf field int64 total_capacity_bytes = 1; - */ - protected $total_capacity_bytes = 0; - /** - * Total disk free space. - * - * Generated from protobuf field int64 total_free_bytes = 2; - */ - protected $total_free_bytes = 0; - /** - * List of disks. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.DiskEntryList disks = 3; - */ - protected $disks = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $total_capacity_bytes - * Disk total Capacity. - * @type int|string $total_free_bytes - * Total disk free space. - * @type \Google\Cloud\MigrationCenter\V1\DiskEntryList $disks - * List of disks. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Disk total Capacity. - * - * Generated from protobuf field int64 total_capacity_bytes = 1; - * @return int|string - */ - public function getTotalCapacityBytes() - { - return $this->total_capacity_bytes; - } - - /** - * Disk total Capacity. - * - * Generated from protobuf field int64 total_capacity_bytes = 1; - * @param int|string $var - * @return $this - */ - public function setTotalCapacityBytes($var) - { - GPBUtil::checkInt64($var); - $this->total_capacity_bytes = $var; - - return $this; - } - - /** - * Total disk free space. - * - * Generated from protobuf field int64 total_free_bytes = 2; - * @return int|string - */ - public function getTotalFreeBytes() - { - return $this->total_free_bytes; - } - - /** - * Total disk free space. - * - * Generated from protobuf field int64 total_free_bytes = 2; - * @param int|string $var - * @return $this - */ - public function setTotalFreeBytes($var) - { - GPBUtil::checkInt64($var); - $this->total_free_bytes = $var; - - return $this; - } - - /** - * List of disks. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.DiskEntryList disks = 3; - * @return \Google\Cloud\MigrationCenter\V1\DiskEntryList|null - */ - public function getDisks() - { - return $this->disks; - } - - public function hasDisks() - { - return isset($this->disks); - } - - public function clearDisks() - { - unset($this->disks); - } - - /** - * List of disks. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.DiskEntryList disks = 3; - * @param \Google\Cloud\MigrationCenter\V1\DiskEntryList $var - * @return $this - */ - public function setDisks($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\DiskEntryList::class); - $this->disks = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/MachineNetworkDetails.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/MachineNetworkDetails.php deleted file mode 100644 index 9949793b9975..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/MachineNetworkDetails.php +++ /dev/null @@ -1,183 +0,0 @@ -google.cloud.migrationcenter.v1.MachineNetworkDetails - */ -class MachineNetworkDetails extends \Google\Protobuf\Internal\Message -{ - /** - * The primary IP address of the machine. - * - * Generated from protobuf field string primary_ip_address = 1; - */ - protected $primary_ip_address = ''; - /** - * The public IP address of the machine. - * - * Generated from protobuf field string public_ip_address = 2; - */ - protected $public_ip_address = ''; - /** - * MAC address of the machine. - * This property is used to uniqly identify the machine. - * - * Generated from protobuf field string primary_mac_address = 3; - */ - protected $primary_mac_address = ''; - /** - * List of network adapters. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.NetworkAdapterList adapters = 4; - */ - protected $adapters = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $primary_ip_address - * The primary IP address of the machine. - * @type string $public_ip_address - * The public IP address of the machine. - * @type string $primary_mac_address - * MAC address of the machine. - * This property is used to uniqly identify the machine. - * @type \Google\Cloud\MigrationCenter\V1\NetworkAdapterList $adapters - * List of network adapters. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * The primary IP address of the machine. - * - * Generated from protobuf field string primary_ip_address = 1; - * @return string - */ - public function getPrimaryIpAddress() - { - return $this->primary_ip_address; - } - - /** - * The primary IP address of the machine. - * - * Generated from protobuf field string primary_ip_address = 1; - * @param string $var - * @return $this - */ - public function setPrimaryIpAddress($var) - { - GPBUtil::checkString($var, True); - $this->primary_ip_address = $var; - - return $this; - } - - /** - * The public IP address of the machine. - * - * Generated from protobuf field string public_ip_address = 2; - * @return string - */ - public function getPublicIpAddress() - { - return $this->public_ip_address; - } - - /** - * The public IP address of the machine. - * - * Generated from protobuf field string public_ip_address = 2; - * @param string $var - * @return $this - */ - public function setPublicIpAddress($var) - { - GPBUtil::checkString($var, True); - $this->public_ip_address = $var; - - return $this; - } - - /** - * MAC address of the machine. - * This property is used to uniqly identify the machine. - * - * Generated from protobuf field string primary_mac_address = 3; - * @return string - */ - public function getPrimaryMacAddress() - { - return $this->primary_mac_address; - } - - /** - * MAC address of the machine. - * This property is used to uniqly identify the machine. - * - * Generated from protobuf field string primary_mac_address = 3; - * @param string $var - * @return $this - */ - public function setPrimaryMacAddress($var) - { - GPBUtil::checkString($var, True); - $this->primary_mac_address = $var; - - return $this; - } - - /** - * List of network adapters. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.NetworkAdapterList adapters = 4; - * @return \Google\Cloud\MigrationCenter\V1\NetworkAdapterList|null - */ - public function getAdapters() - { - return $this->adapters; - } - - public function hasAdapters() - { - return isset($this->adapters); - } - - public function clearAdapters() - { - unset($this->adapters); - } - - /** - * List of network adapters. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.NetworkAdapterList adapters = 4; - * @param \Google\Cloud\MigrationCenter\V1\NetworkAdapterList $var - * @return $this - */ - public function setAdapters($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\NetworkAdapterList::class); - $this->adapters = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/MachinePreferences.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/MachinePreferences.php deleted file mode 100644 index 98a819f472b9..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/MachinePreferences.php +++ /dev/null @@ -1,73 +0,0 @@ -google.cloud.migrationcenter.v1.MachinePreferences - */ -class MachinePreferences extends \Google\Protobuf\Internal\Message -{ - /** - * Compute Engine machine series to consider for insights and recommendations. - * If empty, no restriction is applied on the machine series. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.MachineSeries allowed_machine_series = 1; - */ - private $allowed_machine_series; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\MigrationCenter\V1\MachineSeries>|\Google\Protobuf\Internal\RepeatedField $allowed_machine_series - * Compute Engine machine series to consider for insights and recommendations. - * If empty, no restriction is applied on the machine series. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Compute Engine machine series to consider for insights and recommendations. - * If empty, no restriction is applied on the machine series. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.MachineSeries allowed_machine_series = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAllowedMachineSeries() - { - return $this->allowed_machine_series; - } - - /** - * Compute Engine machine series to consider for insights and recommendations. - * If empty, no restriction is applied on the machine series. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.MachineSeries allowed_machine_series = 1; - * @param array<\Google\Cloud\MigrationCenter\V1\MachineSeries>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAllowedMachineSeries($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\MachineSeries::class); - $this->allowed_machine_series = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/MachineSeries.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/MachineSeries.php deleted file mode 100644 index eaae31262c65..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/MachineSeries.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.migrationcenter.v1.MachineSeries - */ -class MachineSeries extends \Google\Protobuf\Internal\Message -{ - /** - * Code to identify a Compute Engine machine series. Consult - * https://cloud.google.com/compute/docs/machine-resource#machine_type_comparison - * for more details on the available series. - * - * Generated from protobuf field string code = 1; - */ - protected $code = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $code - * Code to identify a Compute Engine machine series. Consult - * https://cloud.google.com/compute/docs/machine-resource#machine_type_comparison - * for more details on the available series. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Code to identify a Compute Engine machine series. Consult - * https://cloud.google.com/compute/docs/machine-resource#machine_type_comparison - * for more details on the available series. - * - * Generated from protobuf field string code = 1; - * @return string - */ - public function getCode() - { - return $this->code; - } - - /** - * Code to identify a Compute Engine machine series. Consult - * https://cloud.google.com/compute/docs/machine-resource#machine_type_comparison - * for more details on the available series. - * - * Generated from protobuf field string code = 1; - * @param string $var - * @return $this - */ - public function setCode($var) - { - GPBUtil::checkString($var, True); - $this->code = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/MemoryUsageSample.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/MemoryUsageSample.php deleted file mode 100644 index 4cf93d504334..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/MemoryUsageSample.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.migrationcenter.v1.MemoryUsageSample - */ -class MemoryUsageSample extends \Google\Protobuf\Internal\Message -{ - /** - * Percentage of system memory utilized. Must be in the interval [0, 100]. - * - * Generated from protobuf field float utilized_percentage = 1; - */ - protected $utilized_percentage = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $utilized_percentage - * Percentage of system memory utilized. Must be in the interval [0, 100]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Percentage of system memory utilized. Must be in the interval [0, 100]. - * - * Generated from protobuf field float utilized_percentage = 1; - * @return float - */ - public function getUtilizedPercentage() - { - return $this->utilized_percentage; - } - - /** - * Percentage of system memory utilized. Must be in the interval [0, 100]. - * - * Generated from protobuf field float utilized_percentage = 1; - * @param float $var - * @return $this - */ - public function setUtilizedPercentage($var) - { - GPBUtil::checkFloat($var); - $this->utilized_percentage = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/MigrationInsight.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/MigrationInsight.php deleted file mode 100644 index f735aaf003f3..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/MigrationInsight.php +++ /dev/null @@ -1,123 +0,0 @@ -google.cloud.migrationcenter.v1.MigrationInsight - */ -class MigrationInsight extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Description of how well the asset this insight is associated - * with fits the proposed migration. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.FitDescriptor fit = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $fit = null; - protected $migration_target; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\MigrationCenter\V1\FitDescriptor $fit - * Output only. Description of how well the asset this insight is associated - * with fits the proposed migration. - * @type \Google\Cloud\MigrationCenter\V1\ComputeEngineMigrationTarget $compute_engine_target - * Output only. A Google Compute Engine target. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Description of how well the asset this insight is associated - * with fits the proposed migration. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.FitDescriptor fit = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\MigrationCenter\V1\FitDescriptor|null - */ - public function getFit() - { - return $this->fit; - } - - public function hasFit() - { - return isset($this->fit); - } - - public function clearFit() - { - unset($this->fit); - } - - /** - * Output only. Description of how well the asset this insight is associated - * with fits the proposed migration. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.FitDescriptor fit = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\MigrationCenter\V1\FitDescriptor $var - * @return $this - */ - public function setFit($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\FitDescriptor::class); - $this->fit = $var; - - return $this; - } - - /** - * Output only. A Google Compute Engine target. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ComputeEngineMigrationTarget compute_engine_target = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\MigrationCenter\V1\ComputeEngineMigrationTarget|null - */ - public function getComputeEngineTarget() - { - return $this->readOneof(10); - } - - public function hasComputeEngineTarget() - { - return $this->hasOneof(10); - } - - /** - * Output only. A Google Compute Engine target. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ComputeEngineMigrationTarget compute_engine_target = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\MigrationCenter\V1\ComputeEngineMigrationTarget $var - * @return $this - */ - public function setComputeEngineTarget($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\ComputeEngineMigrationTarget::class); - $this->writeOneof(10, $var); - - return $this; - } - - /** - * @return string - */ - public function getMigrationTarget() - { - return $this->whichOneof("migration_target"); - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/NetworkAdapterDetails.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/NetworkAdapterDetails.php deleted file mode 100644 index 34f3c8168393..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/NetworkAdapterDetails.php +++ /dev/null @@ -1,145 +0,0 @@ -google.cloud.migrationcenter.v1.NetworkAdapterDetails - */ -class NetworkAdapterDetails extends \Google\Protobuf\Internal\Message -{ - /** - * Network adapter type (e.g. VMXNET3). - * - * Generated from protobuf field string adapter_type = 1; - */ - protected $adapter_type = ''; - /** - * MAC address. - * - * Generated from protobuf field string mac_address = 2; - */ - protected $mac_address = ''; - /** - * NetworkAddressList - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.NetworkAddressList addresses = 3; - */ - protected $addresses = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $adapter_type - * Network adapter type (e.g. VMXNET3). - * @type string $mac_address - * MAC address. - * @type \Google\Cloud\MigrationCenter\V1\NetworkAddressList $addresses - * NetworkAddressList - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Network adapter type (e.g. VMXNET3). - * - * Generated from protobuf field string adapter_type = 1; - * @return string - */ - public function getAdapterType() - { - return $this->adapter_type; - } - - /** - * Network adapter type (e.g. VMXNET3). - * - * Generated from protobuf field string adapter_type = 1; - * @param string $var - * @return $this - */ - public function setAdapterType($var) - { - GPBUtil::checkString($var, True); - $this->adapter_type = $var; - - return $this; - } - - /** - * MAC address. - * - * Generated from protobuf field string mac_address = 2; - * @return string - */ - public function getMacAddress() - { - return $this->mac_address; - } - - /** - * MAC address. - * - * Generated from protobuf field string mac_address = 2; - * @param string $var - * @return $this - */ - public function setMacAddress($var) - { - GPBUtil::checkString($var, True); - $this->mac_address = $var; - - return $this; - } - - /** - * NetworkAddressList - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.NetworkAddressList addresses = 3; - * @return \Google\Cloud\MigrationCenter\V1\NetworkAddressList|null - */ - public function getAddresses() - { - return $this->addresses; - } - - public function hasAddresses() - { - return isset($this->addresses); - } - - public function clearAddresses() - { - unset($this->addresses); - } - - /** - * NetworkAddressList - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.NetworkAddressList addresses = 3; - * @param \Google\Cloud\MigrationCenter\V1\NetworkAddressList $var - * @return $this - */ - public function setAddresses($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\NetworkAddressList::class); - $this->addresses = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/NetworkAdapterList.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/NetworkAdapterList.php deleted file mode 100644 index a8767ce3a699..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/NetworkAdapterList.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.migrationcenter.v1.NetworkAdapterList - */ -class NetworkAdapterList extends \Google\Protobuf\Internal\Message -{ - /** - * Network adapter entries. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.NetworkAdapterDetails entries = 1; - */ - private $entries; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\MigrationCenter\V1\NetworkAdapterDetails>|\Google\Protobuf\Internal\RepeatedField $entries - * Network adapter entries. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Network adapter entries. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.NetworkAdapterDetails entries = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEntries() - { - return $this->entries; - } - - /** - * Network adapter entries. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.NetworkAdapterDetails entries = 1; - * @param array<\Google\Cloud\MigrationCenter\V1\NetworkAdapterDetails>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEntries($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\NetworkAdapterDetails::class); - $this->entries = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/NetworkAddress.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/NetworkAddress.php deleted file mode 100644 index ed7928240f41..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/NetworkAddress.php +++ /dev/null @@ -1,203 +0,0 @@ -google.cloud.migrationcenter.v1.NetworkAddress - */ -class NetworkAddress extends \Google\Protobuf\Internal\Message -{ - /** - * Assigned or configured IP Address. - * - * Generated from protobuf field string ip_address = 1; - */ - protected $ip_address = ''; - /** - * Subnet mask. - * - * Generated from protobuf field string subnet_mask = 2; - */ - protected $subnet_mask = ''; - /** - * Broadcast address. - * - * Generated from protobuf field string bcast = 3; - */ - protected $bcast = ''; - /** - * Fully qualified domain name. - * - * Generated from protobuf field string fqdn = 4; - */ - protected $fqdn = ''; - /** - * Whether DHCP is used to assign addresses. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.NetworkAddress.AddressAssignment assignment = 5; - */ - protected $assignment = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $ip_address - * Assigned or configured IP Address. - * @type string $subnet_mask - * Subnet mask. - * @type string $bcast - * Broadcast address. - * @type string $fqdn - * Fully qualified domain name. - * @type int $assignment - * Whether DHCP is used to assign addresses. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Assigned or configured IP Address. - * - * Generated from protobuf field string ip_address = 1; - * @return string - */ - public function getIpAddress() - { - return $this->ip_address; - } - - /** - * Assigned or configured IP Address. - * - * Generated from protobuf field string ip_address = 1; - * @param string $var - * @return $this - */ - public function setIpAddress($var) - { - GPBUtil::checkString($var, True); - $this->ip_address = $var; - - return $this; - } - - /** - * Subnet mask. - * - * Generated from protobuf field string subnet_mask = 2; - * @return string - */ - public function getSubnetMask() - { - return $this->subnet_mask; - } - - /** - * Subnet mask. - * - * Generated from protobuf field string subnet_mask = 2; - * @param string $var - * @return $this - */ - public function setSubnetMask($var) - { - GPBUtil::checkString($var, True); - $this->subnet_mask = $var; - - return $this; - } - - /** - * Broadcast address. - * - * Generated from protobuf field string bcast = 3; - * @return string - */ - public function getBcast() - { - return $this->bcast; - } - - /** - * Broadcast address. - * - * Generated from protobuf field string bcast = 3; - * @param string $var - * @return $this - */ - public function setBcast($var) - { - GPBUtil::checkString($var, True); - $this->bcast = $var; - - return $this; - } - - /** - * Fully qualified domain name. - * - * Generated from protobuf field string fqdn = 4; - * @return string - */ - public function getFqdn() - { - return $this->fqdn; - } - - /** - * Fully qualified domain name. - * - * Generated from protobuf field string fqdn = 4; - * @param string $var - * @return $this - */ - public function setFqdn($var) - { - GPBUtil::checkString($var, True); - $this->fqdn = $var; - - return $this; - } - - /** - * Whether DHCP is used to assign addresses. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.NetworkAddress.AddressAssignment assignment = 5; - * @return int - */ - public function getAssignment() - { - return $this->assignment; - } - - /** - * Whether DHCP is used to assign addresses. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.NetworkAddress.AddressAssignment assignment = 5; - * @param int $var - * @return $this - */ - public function setAssignment($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\MigrationCenter\V1\NetworkAddress\AddressAssignment::class); - $this->assignment = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/NetworkAddress/AddressAssignment.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/NetworkAddress/AddressAssignment.php deleted file mode 100644 index 7ef71a9aab7b..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/NetworkAddress/AddressAssignment.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.migrationcenter.v1.NetworkAddress.AddressAssignment - */ -class AddressAssignment -{ - /** - * Unknown (default value). - * - * Generated from protobuf enum ADDRESS_ASSIGNMENT_UNSPECIFIED = 0; - */ - const ADDRESS_ASSIGNMENT_UNSPECIFIED = 0; - /** - * Staticly assigned IP. - * - * Generated from protobuf enum ADDRESS_ASSIGNMENT_STATIC = 1; - */ - const ADDRESS_ASSIGNMENT_STATIC = 1; - /** - * Dynamically assigned IP (DHCP). - * - * Generated from protobuf enum ADDRESS_ASSIGNMENT_DHCP = 2; - */ - const ADDRESS_ASSIGNMENT_DHCP = 2; - - private static $valueToName = [ - self::ADDRESS_ASSIGNMENT_UNSPECIFIED => 'ADDRESS_ASSIGNMENT_UNSPECIFIED', - self::ADDRESS_ASSIGNMENT_STATIC => 'ADDRESS_ASSIGNMENT_STATIC', - self::ADDRESS_ASSIGNMENT_DHCP => 'ADDRESS_ASSIGNMENT_DHCP', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(AddressAssignment::class, \Google\Cloud\MigrationCenter\V1\NetworkAddress_AddressAssignment::class); - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/NetworkAddressList.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/NetworkAddressList.php deleted file mode 100644 index a11b3d494b8c..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/NetworkAddressList.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.migrationcenter.v1.NetworkAddressList - */ -class NetworkAddressList extends \Google\Protobuf\Internal\Message -{ - /** - * Network address entries. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.NetworkAddress entries = 1; - */ - private $entries; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\MigrationCenter\V1\NetworkAddress>|\Google\Protobuf\Internal\RepeatedField $entries - * Network address entries. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Network address entries. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.NetworkAddress entries = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEntries() - { - return $this->entries; - } - - /** - * Network address entries. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.NetworkAddress entries = 1; - * @param array<\Google\Cloud\MigrationCenter\V1\NetworkAddress>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEntries($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\NetworkAddress::class); - $this->entries = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/NetworkConnection.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/NetworkConnection.php deleted file mode 100644 index 1cb223103ec1..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/NetworkConnection.php +++ /dev/null @@ -1,303 +0,0 @@ -google.cloud.migrationcenter.v1.NetworkConnection - */ -class NetworkConnection extends \Google\Protobuf\Internal\Message -{ - /** - * Connection protocol (e.g. TCP/UDP). - * - * Generated from protobuf field string protocol = 1; - */ - protected $protocol = ''; - /** - * Local IP address. - * - * Generated from protobuf field string local_ip_address = 2; - */ - protected $local_ip_address = ''; - /** - * Local port. - * - * Generated from protobuf field int32 local_port = 3; - */ - protected $local_port = 0; - /** - * Remote IP address. - * - * Generated from protobuf field string remote_ip_address = 4; - */ - protected $remote_ip_address = ''; - /** - * Remote port. - * - * Generated from protobuf field int32 remote_port = 5; - */ - protected $remote_port = 0; - /** - * Network connection state. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.NetworkConnection.State state = 6; - */ - protected $state = 0; - /** - * Process ID. - * - * Generated from protobuf field int64 pid = 7; - */ - protected $pid = 0; - /** - * Process or service name. - * - * Generated from protobuf field string process_name = 8; - */ - protected $process_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $protocol - * Connection protocol (e.g. TCP/UDP). - * @type string $local_ip_address - * Local IP address. - * @type int $local_port - * Local port. - * @type string $remote_ip_address - * Remote IP address. - * @type int $remote_port - * Remote port. - * @type int $state - * Network connection state. - * @type int|string $pid - * Process ID. - * @type string $process_name - * Process or service name. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Connection protocol (e.g. TCP/UDP). - * - * Generated from protobuf field string protocol = 1; - * @return string - */ - public function getProtocol() - { - return $this->protocol; - } - - /** - * Connection protocol (e.g. TCP/UDP). - * - * Generated from protobuf field string protocol = 1; - * @param string $var - * @return $this - */ - public function setProtocol($var) - { - GPBUtil::checkString($var, True); - $this->protocol = $var; - - return $this; - } - - /** - * Local IP address. - * - * Generated from protobuf field string local_ip_address = 2; - * @return string - */ - public function getLocalIpAddress() - { - return $this->local_ip_address; - } - - /** - * Local IP address. - * - * Generated from protobuf field string local_ip_address = 2; - * @param string $var - * @return $this - */ - public function setLocalIpAddress($var) - { - GPBUtil::checkString($var, True); - $this->local_ip_address = $var; - - return $this; - } - - /** - * Local port. - * - * Generated from protobuf field int32 local_port = 3; - * @return int - */ - public function getLocalPort() - { - return $this->local_port; - } - - /** - * Local port. - * - * Generated from protobuf field int32 local_port = 3; - * @param int $var - * @return $this - */ - public function setLocalPort($var) - { - GPBUtil::checkInt32($var); - $this->local_port = $var; - - return $this; - } - - /** - * Remote IP address. - * - * Generated from protobuf field string remote_ip_address = 4; - * @return string - */ - public function getRemoteIpAddress() - { - return $this->remote_ip_address; - } - - /** - * Remote IP address. - * - * Generated from protobuf field string remote_ip_address = 4; - * @param string $var - * @return $this - */ - public function setRemoteIpAddress($var) - { - GPBUtil::checkString($var, True); - $this->remote_ip_address = $var; - - return $this; - } - - /** - * Remote port. - * - * Generated from protobuf field int32 remote_port = 5; - * @return int - */ - public function getRemotePort() - { - return $this->remote_port; - } - - /** - * Remote port. - * - * Generated from protobuf field int32 remote_port = 5; - * @param int $var - * @return $this - */ - public function setRemotePort($var) - { - GPBUtil::checkInt32($var); - $this->remote_port = $var; - - return $this; - } - - /** - * Network connection state. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.NetworkConnection.State state = 6; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Network connection state. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.NetworkConnection.State state = 6; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\MigrationCenter\V1\NetworkConnection\State::class); - $this->state = $var; - - return $this; - } - - /** - * Process ID. - * - * Generated from protobuf field int64 pid = 7; - * @return int|string - */ - public function getPid() - { - return $this->pid; - } - - /** - * Process ID. - * - * Generated from protobuf field int64 pid = 7; - * @param int|string $var - * @return $this - */ - public function setPid($var) - { - GPBUtil::checkInt64($var); - $this->pid = $var; - - return $this; - } - - /** - * Process or service name. - * - * Generated from protobuf field string process_name = 8; - * @return string - */ - public function getProcessName() - { - return $this->process_name; - } - - /** - * Process or service name. - * - * Generated from protobuf field string process_name = 8; - * @param string $var - * @return $this - */ - public function setProcessName($var) - { - GPBUtil::checkString($var, True); - $this->process_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/NetworkConnection/State.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/NetworkConnection/State.php deleted file mode 100644 index bc8072a8b94e..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/NetworkConnection/State.php +++ /dev/null @@ -1,85 +0,0 @@ -google.cloud.migrationcenter.v1.NetworkConnection.State - */ -class State -{ - /** - * Connection state is unknown or unspecified. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The connection is being opened. - * - * Generated from protobuf enum OPENING = 1; - */ - const OPENING = 1; - /** - * The connection is open. - * - * Generated from protobuf enum OPEN = 2; - */ - const OPEN = 2; - /** - * Listening for incoming connections. - * - * Generated from protobuf enum LISTEN = 3; - */ - const LISTEN = 3; - /** - * The connection is being closed. - * - * Generated from protobuf enum CLOSING = 4; - */ - const CLOSING = 4; - /** - * The connection is closed. - * - * Generated from protobuf enum CLOSED = 5; - */ - const CLOSED = 5; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::OPENING => 'OPENING', - self::OPEN => 'OPEN', - self::LISTEN => 'LISTEN', - self::CLOSING => 'CLOSING', - self::CLOSED => 'CLOSED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\MigrationCenter\V1\NetworkConnection_State::class); - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/NetworkConnectionList.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/NetworkConnectionList.php deleted file mode 100644 index bc8d2c11713d..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/NetworkConnectionList.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.migrationcenter.v1.NetworkConnectionList - */ -class NetworkConnectionList extends \Google\Protobuf\Internal\Message -{ - /** - * Network connection entries. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.NetworkConnection entries = 1; - */ - private $entries; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\MigrationCenter\V1\NetworkConnection>|\Google\Protobuf\Internal\RepeatedField $entries - * Network connection entries. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Network connection entries. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.NetworkConnection entries = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEntries() - { - return $this->entries; - } - - /** - * Network connection entries. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.NetworkConnection entries = 1; - * @param array<\Google\Cloud\MigrationCenter\V1\NetworkConnection>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEntries($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\NetworkConnection::class); - $this->entries = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/NetworkUsageSample.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/NetworkUsageSample.php deleted file mode 100644 index 93378d8a79e8..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/NetworkUsageSample.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.migrationcenter.v1.NetworkUsageSample - */ -class NetworkUsageSample extends \Google\Protobuf\Internal\Message -{ - /** - * Average network ingress in B/s sampled over a short window. - * Must be non-negative. - * - * Generated from protobuf field float average_ingress_bps = 1; - */ - protected $average_ingress_bps = 0.0; - /** - * Average network egress in B/s sampled over a short window. - * Must be non-negative. - * - * Generated from protobuf field float average_egress_bps = 2; - */ - protected $average_egress_bps = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $average_ingress_bps - * Average network ingress in B/s sampled over a short window. - * Must be non-negative. - * @type float $average_egress_bps - * Average network egress in B/s sampled over a short window. - * Must be non-negative. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Average network ingress in B/s sampled over a short window. - * Must be non-negative. - * - * Generated from protobuf field float average_ingress_bps = 1; - * @return float - */ - public function getAverageIngressBps() - { - return $this->average_ingress_bps; - } - - /** - * Average network ingress in B/s sampled over a short window. - * Must be non-negative. - * - * Generated from protobuf field float average_ingress_bps = 1; - * @param float $var - * @return $this - */ - public function setAverageIngressBps($var) - { - GPBUtil::checkFloat($var); - $this->average_ingress_bps = $var; - - return $this; - } - - /** - * Average network egress in B/s sampled over a short window. - * Must be non-negative. - * - * Generated from protobuf field float average_egress_bps = 2; - * @return float - */ - public function getAverageEgressBps() - { - return $this->average_egress_bps; - } - - /** - * Average network egress in B/s sampled over a short window. - * Must be non-negative. - * - * Generated from protobuf field float average_egress_bps = 2; - * @param float $var - * @return $this - */ - public function setAverageEgressBps($var) - { - GPBUtil::checkFloat($var); - $this->average_egress_bps = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/NfsExport.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/NfsExport.php deleted file mode 100644 index 32cbc9a7ccb7..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/NfsExport.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.migrationcenter.v1.NfsExport - */ -class NfsExport extends \Google\Protobuf\Internal\Message -{ - /** - * The directory being exported. - * - * Generated from protobuf field string export_directory = 1; - */ - protected $export_directory = ''; - /** - * The hosts or networks to which the export is being shared. - * - * Generated from protobuf field repeated string hosts = 2; - */ - private $hosts; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $export_directory - * The directory being exported. - * @type array|\Google\Protobuf\Internal\RepeatedField $hosts - * The hosts or networks to which the export is being shared. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * The directory being exported. - * - * Generated from protobuf field string export_directory = 1; - * @return string - */ - public function getExportDirectory() - { - return $this->export_directory; - } - - /** - * The directory being exported. - * - * Generated from protobuf field string export_directory = 1; - * @param string $var - * @return $this - */ - public function setExportDirectory($var) - { - GPBUtil::checkString($var, True); - $this->export_directory = $var; - - return $this; - } - - /** - * The hosts or networks to which the export is being shared. - * - * Generated from protobuf field repeated string hosts = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getHosts() - { - return $this->hosts; - } - - /** - * The hosts or networks to which the export is being shared. - * - * Generated from protobuf field repeated string hosts = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setHosts($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->hosts = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/NfsExportList.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/NfsExportList.php deleted file mode 100644 index 9031002de19e..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/NfsExportList.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.migrationcenter.v1.NfsExportList - */ -class NfsExportList extends \Google\Protobuf\Internal\Message -{ - /** - * NFS export entries. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.NfsExport entries = 1; - */ - private $entries; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\MigrationCenter\V1\NfsExport>|\Google\Protobuf\Internal\RepeatedField $entries - * NFS export entries. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * NFS export entries. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.NfsExport entries = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEntries() - { - return $this->entries; - } - - /** - * NFS export entries. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.NfsExport entries = 1; - * @param array<\Google\Cloud\MigrationCenter\V1\NfsExport>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEntries($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\NfsExport::class); - $this->entries = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/OpenFileDetails.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/OpenFileDetails.php deleted file mode 100644 index c6f2e511686b..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/OpenFileDetails.php +++ /dev/null @@ -1,169 +0,0 @@ -google.cloud.migrationcenter.v1.OpenFileDetails - */ -class OpenFileDetails extends \Google\Protobuf\Internal\Message -{ - /** - * Opened file command. - * - * Generated from protobuf field string command = 1; - */ - protected $command = ''; - /** - * Opened file user. - * - * Generated from protobuf field string user = 2; - */ - protected $user = ''; - /** - * Opened file file type. - * - * Generated from protobuf field string file_type = 3; - */ - protected $file_type = ''; - /** - * Opened file file path. - * - * Generated from protobuf field string file_path = 4; - */ - protected $file_path = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $command - * Opened file command. - * @type string $user - * Opened file user. - * @type string $file_type - * Opened file file type. - * @type string $file_path - * Opened file file path. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Opened file command. - * - * Generated from protobuf field string command = 1; - * @return string - */ - public function getCommand() - { - return $this->command; - } - - /** - * Opened file command. - * - * Generated from protobuf field string command = 1; - * @param string $var - * @return $this - */ - public function setCommand($var) - { - GPBUtil::checkString($var, True); - $this->command = $var; - - return $this; - } - - /** - * Opened file user. - * - * Generated from protobuf field string user = 2; - * @return string - */ - public function getUser() - { - return $this->user; - } - - /** - * Opened file user. - * - * Generated from protobuf field string user = 2; - * @param string $var - * @return $this - */ - public function setUser($var) - { - GPBUtil::checkString($var, True); - $this->user = $var; - - return $this; - } - - /** - * Opened file file type. - * - * Generated from protobuf field string file_type = 3; - * @return string - */ - public function getFileType() - { - return $this->file_type; - } - - /** - * Opened file file type. - * - * Generated from protobuf field string file_type = 3; - * @param string $var - * @return $this - */ - public function setFileType($var) - { - GPBUtil::checkString($var, True); - $this->file_type = $var; - - return $this; - } - - /** - * Opened file file path. - * - * Generated from protobuf field string file_path = 4; - * @return string - */ - public function getFilePath() - { - return $this->file_path; - } - - /** - * Opened file file path. - * - * Generated from protobuf field string file_path = 4; - * @param string $var - * @return $this - */ - public function setFilePath($var) - { - GPBUtil::checkString($var, True); - $this->file_path = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/OpenFileList.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/OpenFileList.php deleted file mode 100644 index 649827ef86a8..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/OpenFileList.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.migrationcenter.v1.OpenFileList - */ -class OpenFileList extends \Google\Protobuf\Internal\Message -{ - /** - * Open file details entries. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.OpenFileDetails entries = 1; - */ - private $entries; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\MigrationCenter\V1\OpenFileDetails>|\Google\Protobuf\Internal\RepeatedField $entries - * Open file details entries. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Open file details entries. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.OpenFileDetails entries = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEntries() - { - return $this->entries; - } - - /** - * Open file details entries. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.OpenFileDetails entries = 1; - * @param array<\Google\Cloud\MigrationCenter\V1\OpenFileDetails>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEntries($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\OpenFileDetails::class); - $this->entries = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/OperatingSystemFamily.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/OperatingSystemFamily.php deleted file mode 100644 index 81224261c687..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/OperatingSystemFamily.php +++ /dev/null @@ -1,66 +0,0 @@ -google.cloud.migrationcenter.v1.OperatingSystemFamily - */ -class OperatingSystemFamily -{ - /** - * Generated from protobuf enum OS_FAMILY_UNKNOWN = 0; - */ - const OS_FAMILY_UNKNOWN = 0; - /** - * Microsoft Windows Server and Desktop. - * - * Generated from protobuf enum OS_FAMILY_WINDOWS = 1; - */ - const OS_FAMILY_WINDOWS = 1; - /** - * Various Linux flavors. - * - * Generated from protobuf enum OS_FAMILY_LINUX = 2; - */ - const OS_FAMILY_LINUX = 2; - /** - * Non-Linux Unix flavors. - * - * Generated from protobuf enum OS_FAMILY_UNIX = 3; - */ - const OS_FAMILY_UNIX = 3; - - private static $valueToName = [ - self::OS_FAMILY_UNKNOWN => 'OS_FAMILY_UNKNOWN', - self::OS_FAMILY_WINDOWS => 'OS_FAMILY_WINDOWS', - self::OS_FAMILY_LINUX => 'OS_FAMILY_LINUX', - self::OS_FAMILY_UNIX => 'OS_FAMILY_UNIX', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/OperationMetadata.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/OperationMetadata.php deleted file mode 100644 index 4e1d8d863cdb..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/OperationMetadata.php +++ /dev/null @@ -1,307 +0,0 @@ -google.cloud.migrationcenter.v1.OperationMetadata - */ -class OperationMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $end_time = null; - /** - * Output only. Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $target = ''; - /** - * Output only. Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $verb = ''; - /** - * Output only. Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $status_message = ''; - /** - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have been cancelled successfully - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. - * - * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $requested_cancellation = false; - /** - * Output only. API version used to start the operation. - * - * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $api_version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time the operation was created. - * @type \Google\Protobuf\Timestamp $end_time - * Output only. The time the operation finished running. - * @type string $target - * Output only. Server-defined resource path for the target of the operation. - * @type string $verb - * Output only. Name of the verb executed by the operation. - * @type string $status_message - * Output only. Human-readable status of the operation, if any. - * @type bool $requested_cancellation - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have been cancelled successfully - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. - * @type string $api_version - * Output only. API version used to start the operation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * Output only. The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * Output only. Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getTarget() - { - return $this->target; - } - - /** - * Output only. Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setTarget($var) - { - GPBUtil::checkString($var, True); - $this->target = $var; - - return $this; - } - - /** - * Output only. Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getVerb() - { - return $this->verb; - } - - /** - * Output only. Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setVerb($var) - { - GPBUtil::checkString($var, True); - $this->verb = $var; - - return $this; - } - - /** - * Output only. Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getStatusMessage() - { - return $this->status_message; - } - - /** - * Output only. Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setStatusMessage($var) - { - GPBUtil::checkString($var, True); - $this->status_message = $var; - - return $this; - } - - /** - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have been cancelled successfully - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. - * - * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getRequestedCancellation() - { - return $this->requested_cancellation; - } - - /** - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have been cancelled successfully - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. - * - * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setRequestedCancellation($var) - { - GPBUtil::checkBool($var); - $this->requested_cancellation = $var; - - return $this; - } - - /** - * Output only. API version used to start the operation. - * - * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getApiVersion() - { - return $this->api_version; - } - - /** - * Output only. API version used to start the operation. - * - * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setApiVersion($var) - { - GPBUtil::checkString($var, True); - $this->api_version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/PerformanceSample.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/PerformanceSample.php deleted file mode 100644 index 4839a52ab473..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/PerformanceSample.php +++ /dev/null @@ -1,257 +0,0 @@ -google.cloud.migrationcenter.v1.PerformanceSample - */ -class PerformanceSample extends \Google\Protobuf\Internal\Message -{ - /** - * Time the sample was collected. - * If omitted, the frame report time will be used. - * - * Generated from protobuf field .google.protobuf.Timestamp sample_time = 1; - */ - protected $sample_time = null; - /** - * Memory usage sample. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.MemoryUsageSample memory = 2; - */ - protected $memory = null; - /** - * CPU usage sample. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.CpuUsageSample cpu = 3; - */ - protected $cpu = null; - /** - * Network usage sample. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.NetworkUsageSample network = 4; - */ - protected $network = null; - /** - * Disk usage sample. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.DiskUsageSample disk = 5; - */ - protected $disk = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $sample_time - * Time the sample was collected. - * If omitted, the frame report time will be used. - * @type \Google\Cloud\MigrationCenter\V1\MemoryUsageSample $memory - * Memory usage sample. - * @type \Google\Cloud\MigrationCenter\V1\CpuUsageSample $cpu - * CPU usage sample. - * @type \Google\Cloud\MigrationCenter\V1\NetworkUsageSample $network - * Network usage sample. - * @type \Google\Cloud\MigrationCenter\V1\DiskUsageSample $disk - * Disk usage sample. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Time the sample was collected. - * If omitted, the frame report time will be used. - * - * Generated from protobuf field .google.protobuf.Timestamp sample_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getSampleTime() - { - return $this->sample_time; - } - - public function hasSampleTime() - { - return isset($this->sample_time); - } - - public function clearSampleTime() - { - unset($this->sample_time); - } - - /** - * Time the sample was collected. - * If omitted, the frame report time will be used. - * - * Generated from protobuf field .google.protobuf.Timestamp sample_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setSampleTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->sample_time = $var; - - return $this; - } - - /** - * Memory usage sample. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.MemoryUsageSample memory = 2; - * @return \Google\Cloud\MigrationCenter\V1\MemoryUsageSample|null - */ - public function getMemory() - { - return $this->memory; - } - - public function hasMemory() - { - return isset($this->memory); - } - - public function clearMemory() - { - unset($this->memory); - } - - /** - * Memory usage sample. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.MemoryUsageSample memory = 2; - * @param \Google\Cloud\MigrationCenter\V1\MemoryUsageSample $var - * @return $this - */ - public function setMemory($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\MemoryUsageSample::class); - $this->memory = $var; - - return $this; - } - - /** - * CPU usage sample. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.CpuUsageSample cpu = 3; - * @return \Google\Cloud\MigrationCenter\V1\CpuUsageSample|null - */ - public function getCpu() - { - return $this->cpu; - } - - public function hasCpu() - { - return isset($this->cpu); - } - - public function clearCpu() - { - unset($this->cpu); - } - - /** - * CPU usage sample. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.CpuUsageSample cpu = 3; - * @param \Google\Cloud\MigrationCenter\V1\CpuUsageSample $var - * @return $this - */ - public function setCpu($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\CpuUsageSample::class); - $this->cpu = $var; - - return $this; - } - - /** - * Network usage sample. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.NetworkUsageSample network = 4; - * @return \Google\Cloud\MigrationCenter\V1\NetworkUsageSample|null - */ - public function getNetwork() - { - return $this->network; - } - - public function hasNetwork() - { - return isset($this->network); - } - - public function clearNetwork() - { - unset($this->network); - } - - /** - * Network usage sample. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.NetworkUsageSample network = 4; - * @param \Google\Cloud\MigrationCenter\V1\NetworkUsageSample $var - * @return $this - */ - public function setNetwork($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\NetworkUsageSample::class); - $this->network = $var; - - return $this; - } - - /** - * Disk usage sample. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.DiskUsageSample disk = 5; - * @return \Google\Cloud\MigrationCenter\V1\DiskUsageSample|null - */ - public function getDisk() - { - return $this->disk; - } - - public function hasDisk() - { - return isset($this->disk); - } - - public function clearDisk() - { - unset($this->disk); - } - - /** - * Disk usage sample. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.DiskUsageSample disk = 5; - * @param \Google\Cloud\MigrationCenter\V1\DiskUsageSample $var - * @return $this - */ - public function setDisk($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\DiskUsageSample::class); - $this->disk = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/PersistentDiskType.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/PersistentDiskType.php deleted file mode 100644 index de8f9f782ac7..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/PersistentDiskType.php +++ /dev/null @@ -1,70 +0,0 @@ -google.cloud.migrationcenter.v1.PersistentDiskType - */ -class PersistentDiskType -{ - /** - * Unspecified (default value). - * Selecting this value allows the system to use any disk type according - * to reported usage. This a good value to start with. - * - * Generated from protobuf enum PERSISTENT_DISK_TYPE_UNSPECIFIED = 0; - */ - const PERSISTENT_DISK_TYPE_UNSPECIFIED = 0; - /** - * Standard HDD Persistent Disk. - * - * Generated from protobuf enum PERSISTENT_DISK_TYPE_STANDARD = 1; - */ - const PERSISTENT_DISK_TYPE_STANDARD = 1; - /** - * Balanced Persistent Disk. - * - * Generated from protobuf enum PERSISTENT_DISK_TYPE_BALANCED = 2; - */ - const PERSISTENT_DISK_TYPE_BALANCED = 2; - /** - * SSD Persistent Disk. - * - * Generated from protobuf enum PERSISTENT_DISK_TYPE_SSD = 3; - */ - const PERSISTENT_DISK_TYPE_SSD = 3; - - private static $valueToName = [ - self::PERSISTENT_DISK_TYPE_UNSPECIFIED => 'PERSISTENT_DISK_TYPE_UNSPECIFIED', - self::PERSISTENT_DISK_TYPE_STANDARD => 'PERSISTENT_DISK_TYPE_STANDARD', - self::PERSISTENT_DISK_TYPE_BALANCED => 'PERSISTENT_DISK_TYPE_BALANCED', - self::PERSISTENT_DISK_TYPE_SSD => 'PERSISTENT_DISK_TYPE_SSD', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/PhysicalPlatformDetails.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/PhysicalPlatformDetails.php deleted file mode 100644 index 6865a5e414cc..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/PhysicalPlatformDetails.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.migrationcenter.v1.PhysicalPlatformDetails - */ -class PhysicalPlatformDetails extends \Google\Protobuf\Internal\Message -{ - /** - * Free text representation of the machine location. - * The format of this field should not be relied on. Different machines in the - * same location may have different string values for this field. - * - * Generated from protobuf field string location = 1; - */ - protected $location = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $location - * Free text representation of the machine location. - * The format of this field should not be relied on. Different machines in the - * same location may have different string values for this field. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Free text representation of the machine location. - * The format of this field should not be relied on. Different machines in the - * same location may have different string values for this field. - * - * Generated from protobuf field string location = 1; - * @return string - */ - public function getLocation() - { - return $this->location; - } - - /** - * Free text representation of the machine location. - * The format of this field should not be relied on. Different machines in the - * same location may have different string values for this field. - * - * Generated from protobuf field string location = 1; - * @param string $var - * @return $this - */ - public function setLocation($var) - { - GPBUtil::checkString($var, True); - $this->location = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/PlatformDetails.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/PlatformDetails.php deleted file mode 100644 index 997532b52d6a..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/PlatformDetails.php +++ /dev/null @@ -1,207 +0,0 @@ -google.cloud.migrationcenter.v1.PlatformDetails - */ -class PlatformDetails extends \Google\Protobuf\Internal\Message -{ - protected $vendor_details; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\MigrationCenter\V1\VmwarePlatformDetails $vmware_details - * VMware specific details. - * @type \Google\Cloud\MigrationCenter\V1\AwsEc2PlatformDetails $aws_ec2_details - * AWS EC2 specific details. - * @type \Google\Cloud\MigrationCenter\V1\AzureVmPlatformDetails $azure_vm_details - * Azure VM specific details. - * @type \Google\Cloud\MigrationCenter\V1\GenericPlatformDetails $generic_details - * Generic platform details. - * @type \Google\Cloud\MigrationCenter\V1\PhysicalPlatformDetails $physical_details - * Physical machines platform details. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * VMware specific details. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.VmwarePlatformDetails vmware_details = 1; - * @return \Google\Cloud\MigrationCenter\V1\VmwarePlatformDetails|null - */ - public function getVmwareDetails() - { - return $this->readOneof(1); - } - - public function hasVmwareDetails() - { - return $this->hasOneof(1); - } - - /** - * VMware specific details. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.VmwarePlatformDetails vmware_details = 1; - * @param \Google\Cloud\MigrationCenter\V1\VmwarePlatformDetails $var - * @return $this - */ - public function setVmwareDetails($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\VmwarePlatformDetails::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * AWS EC2 specific details. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.AwsEc2PlatformDetails aws_ec2_details = 2; - * @return \Google\Cloud\MigrationCenter\V1\AwsEc2PlatformDetails|null - */ - public function getAwsEc2Details() - { - return $this->readOneof(2); - } - - public function hasAwsEc2Details() - { - return $this->hasOneof(2); - } - - /** - * AWS EC2 specific details. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.AwsEc2PlatformDetails aws_ec2_details = 2; - * @param \Google\Cloud\MigrationCenter\V1\AwsEc2PlatformDetails $var - * @return $this - */ - public function setAwsEc2Details($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\AwsEc2PlatformDetails::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Azure VM specific details. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.AzureVmPlatformDetails azure_vm_details = 3; - * @return \Google\Cloud\MigrationCenter\V1\AzureVmPlatformDetails|null - */ - public function getAzureVmDetails() - { - return $this->readOneof(3); - } - - public function hasAzureVmDetails() - { - return $this->hasOneof(3); - } - - /** - * Azure VM specific details. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.AzureVmPlatformDetails azure_vm_details = 3; - * @param \Google\Cloud\MigrationCenter\V1\AzureVmPlatformDetails $var - * @return $this - */ - public function setAzureVmDetails($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\AzureVmPlatformDetails::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Generic platform details. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.GenericPlatformDetails generic_details = 4; - * @return \Google\Cloud\MigrationCenter\V1\GenericPlatformDetails|null - */ - public function getGenericDetails() - { - return $this->readOneof(4); - } - - public function hasGenericDetails() - { - return $this->hasOneof(4); - } - - /** - * Generic platform details. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.GenericPlatformDetails generic_details = 4; - * @param \Google\Cloud\MigrationCenter\V1\GenericPlatformDetails $var - * @return $this - */ - public function setGenericDetails($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\GenericPlatformDetails::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Physical machines platform details. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.PhysicalPlatformDetails physical_details = 5; - * @return \Google\Cloud\MigrationCenter\V1\PhysicalPlatformDetails|null - */ - public function getPhysicalDetails() - { - return $this->readOneof(5); - } - - public function hasPhysicalDetails() - { - return $this->hasOneof(5); - } - - /** - * Physical machines platform details. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.PhysicalPlatformDetails physical_details = 5; - * @param \Google\Cloud\MigrationCenter\V1\PhysicalPlatformDetails $var - * @return $this - */ - public function setPhysicalDetails($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\PhysicalPlatformDetails::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * @return string - */ - public function getVendorDetails() - { - return $this->whichOneof("vendor_details"); - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/PreferenceSet.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/PreferenceSet.php deleted file mode 100644 index e210335dcc6e..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/PreferenceSet.php +++ /dev/null @@ -1,267 +0,0 @@ -google.cloud.migrationcenter.v1.PreferenceSet - */ -class PreferenceSet extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Name of the preference set. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. The timestamp when the preference set was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The timestamp when the preference set was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * User-friendly display name. Maximum length is 63 characters. - * - * Generated from protobuf field string display_name = 4; - */ - protected $display_name = ''; - /** - * A description of the preference set. - * - * Generated from protobuf field string description = 5; - */ - protected $description = ''; - /** - * A set of preferences that applies to all virtual machines in the context. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.VirtualMachinePreferences virtual_machine_preferences = 6; - */ - protected $virtual_machine_preferences = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. Name of the preference set. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The timestamp when the preference set was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The timestamp when the preference set was last updated. - * @type string $display_name - * User-friendly display name. Maximum length is 63 characters. - * @type string $description - * A description of the preference set. - * @type \Google\Cloud\MigrationCenter\V1\VirtualMachinePreferences $virtual_machine_preferences - * A set of preferences that applies to all virtual machines in the context. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Name of the preference set. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. Name of the preference set. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. The timestamp when the preference set was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The timestamp when the preference set was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The timestamp when the preference set was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The timestamp when the preference set was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * User-friendly display name. Maximum length is 63 characters. - * - * Generated from protobuf field string display_name = 4; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * User-friendly display name. Maximum length is 63 characters. - * - * Generated from protobuf field string display_name = 4; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * A description of the preference set. - * - * Generated from protobuf field string description = 5; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * A description of the preference set. - * - * Generated from protobuf field string description = 5; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * A set of preferences that applies to all virtual machines in the context. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.VirtualMachinePreferences virtual_machine_preferences = 6; - * @return \Google\Cloud\MigrationCenter\V1\VirtualMachinePreferences|null - */ - public function getVirtualMachinePreferences() - { - return $this->virtual_machine_preferences; - } - - public function hasVirtualMachinePreferences() - { - return isset($this->virtual_machine_preferences); - } - - public function clearVirtualMachinePreferences() - { - unset($this->virtual_machine_preferences); - } - - /** - * A set of preferences that applies to all virtual machines in the context. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.VirtualMachinePreferences virtual_machine_preferences = 6; - * @param \Google\Cloud\MigrationCenter\V1\VirtualMachinePreferences $var - * @return $this - */ - public function setVirtualMachinePreferences($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\VirtualMachinePreferences::class); - $this->virtual_machine_preferences = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/RegionPreferences.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/RegionPreferences.php deleted file mode 100644 index ad1a9da70136..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/RegionPreferences.php +++ /dev/null @@ -1,83 +0,0 @@ -google.cloud.migrationcenter.v1.RegionPreferences - */ -class RegionPreferences extends \Google\Protobuf\Internal\Message -{ - /** - * A list of preferred regions, - * ordered by the most preferred region first. - * Set only valid Google Cloud region names. - * See https://cloud.google.com/compute/docs/regions-zones - * for available regions. - * - * Generated from protobuf field repeated string preferred_regions = 1; - */ - private $preferred_regions; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $preferred_regions - * A list of preferred regions, - * ordered by the most preferred region first. - * Set only valid Google Cloud region names. - * See https://cloud.google.com/compute/docs/regions-zones - * for available regions. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * A list of preferred regions, - * ordered by the most preferred region first. - * Set only valid Google Cloud region names. - * See https://cloud.google.com/compute/docs/regions-zones - * for available regions. - * - * Generated from protobuf field repeated string preferred_regions = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPreferredRegions() - { - return $this->preferred_regions; - } - - /** - * A list of preferred regions, - * ordered by the most preferred region first. - * Set only valid Google Cloud region names. - * See https://cloud.google.com/compute/docs/regions-zones - * for available regions. - * - * Generated from protobuf field repeated string preferred_regions = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPreferredRegions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->preferred_regions = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/RemoveAssetsFromGroupRequest.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/RemoveAssetsFromGroupRequest.php deleted file mode 100644 index 249f733d7864..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/RemoveAssetsFromGroupRequest.php +++ /dev/null @@ -1,253 +0,0 @@ -google.cloud.migrationcenter.v1.RemoveAssetsFromGroupRequest - */ -class RemoveAssetsFromGroupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Group reference. - * - * Generated from protobuf field string group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $group = ''; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - /** - * Required. List of assets to be removed. - * The maximum number of assets that can be removed in a single request is - * 1000. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.AssetList assets = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $assets = null; - /** - * Optional. When this value is set to `false` and one of the given assets is - * not an existing member of the group, the operation fails with a `Not Found` - * error. When set to `true` this situation is silently ignored by the server. - * Default value is `false`. - * - * Generated from protobuf field bool allow_missing = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $allow_missing = false; - - /** - * @param string $group Required. Group reference. Please see - * {@see MigrationCenterClient::groupName()} for help formatting this field. - * - * @return \Google\Cloud\MigrationCenter\V1\RemoveAssetsFromGroupRequest - * - * @experimental - */ - public static function build(string $group): self - { - return (new self()) - ->setGroup($group); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $group - * Required. Group reference. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @type \Google\Cloud\MigrationCenter\V1\AssetList $assets - * Required. List of assets to be removed. - * The maximum number of assets that can be removed in a single request is - * 1000. - * @type bool $allow_missing - * Optional. When this value is set to `false` and one of the given assets is - * not an existing member of the group, the operation fails with a `Not Found` - * error. When set to `true` this situation is silently ignored by the server. - * Default value is `false`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Required. Group reference. - * - * Generated from protobuf field string group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getGroup() - { - return $this->group; - } - - /** - * Required. Group reference. - * - * Generated from protobuf field string group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setGroup($var) - { - GPBUtil::checkString($var, True); - $this->group = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - - /** - * Required. List of assets to be removed. - * The maximum number of assets that can be removed in a single request is - * 1000. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.AssetList assets = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\MigrationCenter\V1\AssetList|null - */ - public function getAssets() - { - return $this->assets; - } - - public function hasAssets() - { - return isset($this->assets); - } - - public function clearAssets() - { - unset($this->assets); - } - - /** - * Required. List of assets to be removed. - * The maximum number of assets that can be removed in a single request is - * 1000. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.AssetList assets = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\MigrationCenter\V1\AssetList $var - * @return $this - */ - public function setAssets($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\AssetList::class); - $this->assets = $var; - - return $this; - } - - /** - * Optional. When this value is set to `false` and one of the given assets is - * not an existing member of the group, the operation fails with a `Not Found` - * error. When set to `true` this situation is silently ignored by the server. - * Default value is `false`. - * - * Generated from protobuf field bool allow_missing = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getAllowMissing() - { - return $this->allow_missing; - } - - /** - * Optional. When this value is set to `false` and one of the given assets is - * not an existing member of the group, the operation fails with a `Not Found` - * error. When set to `true` this situation is silently ignored by the server. - * Default value is `false`. - * - * Generated from protobuf field bool allow_missing = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setAllowMissing($var) - { - GPBUtil::checkBool($var); - $this->allow_missing = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Report.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Report.php deleted file mode 100644 index 8fa528e7443d..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Report.php +++ /dev/null @@ -1,335 +0,0 @@ -google.cloud.migrationcenter.v1.Report - */ -class Report extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Name of resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. Creation timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. Last update timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * User-friendly display name. Maximum length is 63 characters. - * - * Generated from protobuf field string display_name = 4; - */ - protected $display_name = ''; - /** - * Free-text description. - * - * Generated from protobuf field string description = 5; - */ - protected $description = ''; - /** - * Report type. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.Report.Type type = 6; - */ - protected $type = 0; - /** - * Report creation state. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.Report.State state = 7; - */ - protected $state = 0; - /** - * Output only. Summary view of the Report. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ReportSummary summary = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $summary = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. Name of resource. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. Creation timestamp. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. Last update timestamp. - * @type string $display_name - * User-friendly display name. Maximum length is 63 characters. - * @type string $description - * Free-text description. - * @type int $type - * Report type. - * @type int $state - * Report creation state. - * @type \Google\Cloud\MigrationCenter\V1\ReportSummary $summary - * Output only. Summary view of the Report. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Name of resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. Name of resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. Creation timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. Creation timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. Last update timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. Last update timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * User-friendly display name. Maximum length is 63 characters. - * - * Generated from protobuf field string display_name = 4; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * User-friendly display name. Maximum length is 63 characters. - * - * Generated from protobuf field string display_name = 4; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Free-text description. - * - * Generated from protobuf field string description = 5; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Free-text description. - * - * Generated from protobuf field string description = 5; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Report type. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.Report.Type type = 6; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Report type. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.Report.Type type = 6; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\MigrationCenter\V1\Report\Type::class); - $this->type = $var; - - return $this; - } - - /** - * Report creation state. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.Report.State state = 7; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Report creation state. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.Report.State state = 7; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\MigrationCenter\V1\Report\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. Summary view of the Report. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ReportSummary summary = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\MigrationCenter\V1\ReportSummary|null - */ - public function getSummary() - { - return $this->summary; - } - - public function hasSummary() - { - return isset($this->summary); - } - - public function clearSummary() - { - unset($this->summary); - } - - /** - * Output only. Summary view of the Report. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ReportSummary summary = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\MigrationCenter\V1\ReportSummary $var - * @return $this - */ - public function setSummary($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\ReportSummary::class); - $this->summary = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Report/State.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Report/State.php deleted file mode 100644 index 0e4fdea1154b..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Report/State.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.migrationcenter.v1.Report.State - */ -class State -{ - /** - * Default Report creation state. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Creating Report. - * - * Generated from protobuf enum PENDING = 1; - */ - const PENDING = 1; - /** - * Successfully created Report. - * - * Generated from protobuf enum SUCCEEDED = 2; - */ - const SUCCEEDED = 2; - /** - * Failed to create Report. - * - * Generated from protobuf enum FAILED = 3; - */ - const FAILED = 3; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::PENDING => 'PENDING', - self::SUCCEEDED => 'SUCCEEDED', - self::FAILED => 'FAILED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\MigrationCenter\V1\Report_State::class); - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Report/Type.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Report/Type.php deleted file mode 100644 index 930d1708a900..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Report/Type.php +++ /dev/null @@ -1,57 +0,0 @@ -google.cloud.migrationcenter.v1.Report.Type - */ -class Type -{ - /** - * Default Report type. - * - * Generated from protobuf enum TYPE_UNSPECIFIED = 0; - */ - const TYPE_UNSPECIFIED = 0; - /** - * Total cost of ownership Report type. - * - * Generated from protobuf enum TOTAL_COST_OF_OWNERSHIP = 1; - */ - const TOTAL_COST_OF_OWNERSHIP = 1; - - private static $valueToName = [ - self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', - self::TOTAL_COST_OF_OWNERSHIP => 'TOTAL_COST_OF_OWNERSHIP', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Type::class, \Google\Cloud\MigrationCenter\V1\Report_Type::class); - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportAssetFramesRequest.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportAssetFramesRequest.php deleted file mode 100644 index f3e6443020f7..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportAssetFramesRequest.php +++ /dev/null @@ -1,145 +0,0 @@ -google.cloud.migrationcenter.v1.ReportAssetFramesRequest - */ -class ReportAssetFramesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Parent of the resource. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $parent = ''; - /** - * Collection of frames data. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.Frames frames = 2; - */ - protected $frames = null; - /** - * Required. Reference to a source. - * - * Generated from protobuf field string source = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $source = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Parent of the resource. - * @type \Google\Cloud\MigrationCenter\V1\Frames $frames - * Collection of frames data. - * @type string $source - * Required. Reference to a source. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Required. Parent of the resource. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Parent of the resource. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Collection of frames data. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.Frames frames = 2; - * @return \Google\Cloud\MigrationCenter\V1\Frames|null - */ - public function getFrames() - { - return $this->frames; - } - - public function hasFrames() - { - return isset($this->frames); - } - - public function clearFrames() - { - unset($this->frames); - } - - /** - * Collection of frames data. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.Frames frames = 2; - * @param \Google\Cloud\MigrationCenter\V1\Frames $var - * @return $this - */ - public function setFrames($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\Frames::class); - $this->frames = $var; - - return $this; - } - - /** - * Required. Reference to a source. - * - * Generated from protobuf field string source = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getSource() - { - return $this->source; - } - - /** - * Required. Reference to a source. - * - * Generated from protobuf field string source = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setSource($var) - { - GPBUtil::checkString($var, True); - $this->source = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportAssetFramesResponse.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportAssetFramesResponse.php deleted file mode 100644 index b0952ef378ff..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportAssetFramesResponse.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.migrationcenter.v1.ReportAssetFramesResponse - */ -class ReportAssetFramesResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportConfig.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportConfig.php deleted file mode 100644 index e115833e8bca..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportConfig.php +++ /dev/null @@ -1,258 +0,0 @@ -google.cloud.migrationcenter.v1.ReportConfig - */ -class ReportConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Name of resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. The timestamp when the resource was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The timestamp when the resource was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * User-friendly display name. Maximum length is 63 characters. - * - * Generated from protobuf field string display_name = 4; - */ - protected $display_name = ''; - /** - * Free-text description. - * - * Generated from protobuf field string description = 5; - */ - protected $description = ''; - /** - * Required. Collection of combinations of groups and preference sets. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment group_preferenceset_assignments = 6 [(.google.api.field_behavior) = REQUIRED]; - */ - private $group_preferenceset_assignments; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. Name of resource. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The timestamp when the resource was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The timestamp when the resource was last updated. - * @type string $display_name - * User-friendly display name. Maximum length is 63 characters. - * @type string $description - * Free-text description. - * @type array<\Google\Cloud\MigrationCenter\V1\ReportConfig\GroupPreferenceSetAssignment>|\Google\Protobuf\Internal\RepeatedField $group_preferenceset_assignments - * Required. Collection of combinations of groups and preference sets. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Name of resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. Name of resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. The timestamp when the resource was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The timestamp when the resource was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The timestamp when the resource was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The timestamp when the resource was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * User-friendly display name. Maximum length is 63 characters. - * - * Generated from protobuf field string display_name = 4; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * User-friendly display name. Maximum length is 63 characters. - * - * Generated from protobuf field string display_name = 4; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Free-text description. - * - * Generated from protobuf field string description = 5; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Free-text description. - * - * Generated from protobuf field string description = 5; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Required. Collection of combinations of groups and preference sets. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment group_preferenceset_assignments = 6 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getGroupPreferencesetAssignments() - { - return $this->group_preferenceset_assignments; - } - - /** - * Required. Collection of combinations of groups and preference sets. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment group_preferenceset_assignments = 6 [(.google.api.field_behavior) = REQUIRED]; - * @param array<\Google\Cloud\MigrationCenter\V1\ReportConfig\GroupPreferenceSetAssignment>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setGroupPreferencesetAssignments($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\ReportConfig\GroupPreferenceSetAssignment::class); - $this->group_preferenceset_assignments = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportConfig/GroupPreferenceSetAssignment.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportConfig/GroupPreferenceSetAssignment.php deleted file mode 100644 index 1f3b30434183..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportConfig/GroupPreferenceSetAssignment.php +++ /dev/null @@ -1,104 +0,0 @@ -google.cloud.migrationcenter.v1.ReportConfig.GroupPreferenceSetAssignment - */ -class GroupPreferenceSetAssignment extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the group. - * - * Generated from protobuf field string group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $group = ''; - /** - * Required. Name of the Preference Set. - * - * Generated from protobuf field string preference_set = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $preference_set = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $group - * Required. Name of the group. - * @type string $preference_set - * Required. Name of the Preference Set. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the group. - * - * Generated from protobuf field string group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getGroup() - { - return $this->group; - } - - /** - * Required. Name of the group. - * - * Generated from protobuf field string group = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setGroup($var) - { - GPBUtil::checkString($var, True); - $this->group = $var; - - return $this; - } - - /** - * Required. Name of the Preference Set. - * - * Generated from protobuf field string preference_set = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getPreferenceSet() - { - return $this->preference_set; - } - - /** - * Required. Name of the Preference Set. - * - * Generated from protobuf field string preference_set = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setPreferenceSet($var) - { - GPBUtil::checkString($var, True); - $this->preference_set = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(GroupPreferenceSetAssignment::class, \Google\Cloud\MigrationCenter\V1\ReportConfig_GroupPreferenceSetAssignment::class); - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary.php deleted file mode 100644 index a4ddcabde91d..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary.php +++ /dev/null @@ -1,112 +0,0 @@ -google.cloud.migrationcenter.v1.ReportSummary - */ -class ReportSummary extends \Google\Protobuf\Internal\Message -{ - /** - * Aggregate statistics for all the assets across all the groups. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats all_assets_stats = 1; - */ - protected $all_assets_stats = null; - /** - * Findings for each Group included in this report. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ReportSummary.GroupFinding group_findings = 2; - */ - private $group_findings; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\MigrationCenter\V1\ReportSummary\AssetAggregateStats $all_assets_stats - * Aggregate statistics for all the assets across all the groups. - * @type array<\Google\Cloud\MigrationCenter\V1\ReportSummary\GroupFinding>|\Google\Protobuf\Internal\RepeatedField $group_findings - * Findings for each Group included in this report. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Aggregate statistics for all the assets across all the groups. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats all_assets_stats = 1; - * @return \Google\Cloud\MigrationCenter\V1\ReportSummary\AssetAggregateStats|null - */ - public function getAllAssetsStats() - { - return $this->all_assets_stats; - } - - public function hasAllAssetsStats() - { - return isset($this->all_assets_stats); - } - - public function clearAllAssetsStats() - { - unset($this->all_assets_stats); - } - - /** - * Aggregate statistics for all the assets across all the groups. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats all_assets_stats = 1; - * @param \Google\Cloud\MigrationCenter\V1\ReportSummary\AssetAggregateStats $var - * @return $this - */ - public function setAllAssetsStats($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\ReportSummary\AssetAggregateStats::class); - $this->all_assets_stats = $var; - - return $this; - } - - /** - * Findings for each Group included in this report. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ReportSummary.GroupFinding group_findings = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getGroupFindings() - { - return $this->group_findings; - } - - /** - * Findings for each Group included in this report. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ReportSummary.GroupFinding group_findings = 2; - * @param array<\Google\Cloud\MigrationCenter\V1\ReportSummary\GroupFinding>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setGroupFindings($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\ReportSummary\GroupFinding::class); - $this->group_findings = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/AssetAggregateStats.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/AssetAggregateStats.php deleted file mode 100644 index 84a7c1e88454..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/AssetAggregateStats.php +++ /dev/null @@ -1,436 +0,0 @@ -google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats - */ -class AssetAggregateStats extends \Google\Protobuf\Internal\Message -{ - /** - * Sum of the memory in bytes of all the assets in this collection. - * - * Generated from protobuf field int64 total_memory_bytes = 1; - */ - protected $total_memory_bytes = 0; - /** - * Sum of persistent storage in bytes of all the assets in this collection. - * - * Generated from protobuf field int64 total_storage_bytes = 2; - */ - protected $total_storage_bytes = 0; - /** - * Sum of the CPU core count of all the assets in this collection. - * - * Generated from protobuf field int64 total_cores = 3; - */ - protected $total_cores = 0; - /** - * Count of the number of unique assets in this collection. - * - * Generated from protobuf field int64 total_assets = 4; - */ - protected $total_assets = 0; - /** - * Total memory split into Used/Free buckets. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData memory_utilization_chart = 5; - */ - protected $memory_utilization_chart = null; - /** - * Total memory split into Used/Free buckets. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData storage_utilization_chart = 6; - */ - protected $storage_utilization_chart = null; - /** - * Count of assets grouped by Operating System families. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ReportSummary.ChartData operating_system = 7; - */ - protected $operating_system = null; - /** - * Histogram showing a distribution of CPU core counts. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData core_count_histogram = 8; - */ - protected $core_count_histogram = null; - /** - * Histogram showing a distribution of memory sizes. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData memory_bytes_histogram = 9; - */ - protected $memory_bytes_histogram = null; - /** - * Histogram showing a distribution of memory sizes. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData storage_bytes_histogram = 10; - */ - protected $storage_bytes_histogram = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $total_memory_bytes - * Sum of the memory in bytes of all the assets in this collection. - * @type int|string $total_storage_bytes - * Sum of persistent storage in bytes of all the assets in this collection. - * @type int|string $total_cores - * Sum of the CPU core count of all the assets in this collection. - * @type int|string $total_assets - * Count of the number of unique assets in this collection. - * @type \Google\Cloud\MigrationCenter\V1\ReportSummary\UtilizationChartData $memory_utilization_chart - * Total memory split into Used/Free buckets. - * @type \Google\Cloud\MigrationCenter\V1\ReportSummary\UtilizationChartData $storage_utilization_chart - * Total memory split into Used/Free buckets. - * @type \Google\Cloud\MigrationCenter\V1\ReportSummary\ChartData $operating_system - * Count of assets grouped by Operating System families. - * @type \Google\Cloud\MigrationCenter\V1\ReportSummary\HistogramChartData $core_count_histogram - * Histogram showing a distribution of CPU core counts. - * @type \Google\Cloud\MigrationCenter\V1\ReportSummary\HistogramChartData $memory_bytes_histogram - * Histogram showing a distribution of memory sizes. - * @type \Google\Cloud\MigrationCenter\V1\ReportSummary\HistogramChartData $storage_bytes_histogram - * Histogram showing a distribution of memory sizes. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Sum of the memory in bytes of all the assets in this collection. - * - * Generated from protobuf field int64 total_memory_bytes = 1; - * @return int|string - */ - public function getTotalMemoryBytes() - { - return $this->total_memory_bytes; - } - - /** - * Sum of the memory in bytes of all the assets in this collection. - * - * Generated from protobuf field int64 total_memory_bytes = 1; - * @param int|string $var - * @return $this - */ - public function setTotalMemoryBytes($var) - { - GPBUtil::checkInt64($var); - $this->total_memory_bytes = $var; - - return $this; - } - - /** - * Sum of persistent storage in bytes of all the assets in this collection. - * - * Generated from protobuf field int64 total_storage_bytes = 2; - * @return int|string - */ - public function getTotalStorageBytes() - { - return $this->total_storage_bytes; - } - - /** - * Sum of persistent storage in bytes of all the assets in this collection. - * - * Generated from protobuf field int64 total_storage_bytes = 2; - * @param int|string $var - * @return $this - */ - public function setTotalStorageBytes($var) - { - GPBUtil::checkInt64($var); - $this->total_storage_bytes = $var; - - return $this; - } - - /** - * Sum of the CPU core count of all the assets in this collection. - * - * Generated from protobuf field int64 total_cores = 3; - * @return int|string - */ - public function getTotalCores() - { - return $this->total_cores; - } - - /** - * Sum of the CPU core count of all the assets in this collection. - * - * Generated from protobuf field int64 total_cores = 3; - * @param int|string $var - * @return $this - */ - public function setTotalCores($var) - { - GPBUtil::checkInt64($var); - $this->total_cores = $var; - - return $this; - } - - /** - * Count of the number of unique assets in this collection. - * - * Generated from protobuf field int64 total_assets = 4; - * @return int|string - */ - public function getTotalAssets() - { - return $this->total_assets; - } - - /** - * Count of the number of unique assets in this collection. - * - * Generated from protobuf field int64 total_assets = 4; - * @param int|string $var - * @return $this - */ - public function setTotalAssets($var) - { - GPBUtil::checkInt64($var); - $this->total_assets = $var; - - return $this; - } - - /** - * Total memory split into Used/Free buckets. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData memory_utilization_chart = 5; - * @return \Google\Cloud\MigrationCenter\V1\ReportSummary\UtilizationChartData|null - */ - public function getMemoryUtilizationChart() - { - return $this->memory_utilization_chart; - } - - public function hasMemoryUtilizationChart() - { - return isset($this->memory_utilization_chart); - } - - public function clearMemoryUtilizationChart() - { - unset($this->memory_utilization_chart); - } - - /** - * Total memory split into Used/Free buckets. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData memory_utilization_chart = 5; - * @param \Google\Cloud\MigrationCenter\V1\ReportSummary\UtilizationChartData $var - * @return $this - */ - public function setMemoryUtilizationChart($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\ReportSummary\UtilizationChartData::class); - $this->memory_utilization_chart = $var; - - return $this; - } - - /** - * Total memory split into Used/Free buckets. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData storage_utilization_chart = 6; - * @return \Google\Cloud\MigrationCenter\V1\ReportSummary\UtilizationChartData|null - */ - public function getStorageUtilizationChart() - { - return $this->storage_utilization_chart; - } - - public function hasStorageUtilizationChart() - { - return isset($this->storage_utilization_chart); - } - - public function clearStorageUtilizationChart() - { - unset($this->storage_utilization_chart); - } - - /** - * Total memory split into Used/Free buckets. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData storage_utilization_chart = 6; - * @param \Google\Cloud\MigrationCenter\V1\ReportSummary\UtilizationChartData $var - * @return $this - */ - public function setStorageUtilizationChart($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\ReportSummary\UtilizationChartData::class); - $this->storage_utilization_chart = $var; - - return $this; - } - - /** - * Count of assets grouped by Operating System families. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ReportSummary.ChartData operating_system = 7; - * @return \Google\Cloud\MigrationCenter\V1\ReportSummary\ChartData|null - */ - public function getOperatingSystem() - { - return $this->operating_system; - } - - public function hasOperatingSystem() - { - return isset($this->operating_system); - } - - public function clearOperatingSystem() - { - unset($this->operating_system); - } - - /** - * Count of assets grouped by Operating System families. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ReportSummary.ChartData operating_system = 7; - * @param \Google\Cloud\MigrationCenter\V1\ReportSummary\ChartData $var - * @return $this - */ - public function setOperatingSystem($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\ReportSummary\ChartData::class); - $this->operating_system = $var; - - return $this; - } - - /** - * Histogram showing a distribution of CPU core counts. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData core_count_histogram = 8; - * @return \Google\Cloud\MigrationCenter\V1\ReportSummary\HistogramChartData|null - */ - public function getCoreCountHistogram() - { - return $this->core_count_histogram; - } - - public function hasCoreCountHistogram() - { - return isset($this->core_count_histogram); - } - - public function clearCoreCountHistogram() - { - unset($this->core_count_histogram); - } - - /** - * Histogram showing a distribution of CPU core counts. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData core_count_histogram = 8; - * @param \Google\Cloud\MigrationCenter\V1\ReportSummary\HistogramChartData $var - * @return $this - */ - public function setCoreCountHistogram($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\ReportSummary\HistogramChartData::class); - $this->core_count_histogram = $var; - - return $this; - } - - /** - * Histogram showing a distribution of memory sizes. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData memory_bytes_histogram = 9; - * @return \Google\Cloud\MigrationCenter\V1\ReportSummary\HistogramChartData|null - */ - public function getMemoryBytesHistogram() - { - return $this->memory_bytes_histogram; - } - - public function hasMemoryBytesHistogram() - { - return isset($this->memory_bytes_histogram); - } - - public function clearMemoryBytesHistogram() - { - unset($this->memory_bytes_histogram); - } - - /** - * Histogram showing a distribution of memory sizes. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData memory_bytes_histogram = 9; - * @param \Google\Cloud\MigrationCenter\V1\ReportSummary\HistogramChartData $var - * @return $this - */ - public function setMemoryBytesHistogram($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\ReportSummary\HistogramChartData::class); - $this->memory_bytes_histogram = $var; - - return $this; - } - - /** - * Histogram showing a distribution of memory sizes. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData storage_bytes_histogram = 10; - * @return \Google\Cloud\MigrationCenter\V1\ReportSummary\HistogramChartData|null - */ - public function getStorageBytesHistogram() - { - return $this->storage_bytes_histogram; - } - - public function hasStorageBytesHistogram() - { - return isset($this->storage_bytes_histogram); - } - - public function clearStorageBytesHistogram() - { - unset($this->storage_bytes_histogram); - } - - /** - * Histogram showing a distribution of memory sizes. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData storage_bytes_histogram = 10; - * @param \Google\Cloud\MigrationCenter\V1\ReportSummary\HistogramChartData $var - * @return $this - */ - public function setStorageBytesHistogram($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\ReportSummary\HistogramChartData::class); - $this->storage_bytes_histogram = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(AssetAggregateStats::class, \Google\Cloud\MigrationCenter\V1\ReportSummary_AssetAggregateStats::class); - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/ChartData.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/ChartData.php deleted file mode 100644 index d4db831af724..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/ChartData.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.migrationcenter.v1.ReportSummary.ChartData - */ -class ChartData extends \Google\Protobuf\Internal\Message -{ - /** - * Each data point in the chart is represented as a name-value pair - * with the name being the x-axis label, and the value being the y-axis - * value. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint data_points = 1; - */ - private $data_points; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\MigrationCenter\V1\ReportSummary\ChartData\DataPoint>|\Google\Protobuf\Internal\RepeatedField $data_points - * Each data point in the chart is represented as a name-value pair - * with the name being the x-axis label, and the value being the y-axis - * value. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Each data point in the chart is represented as a name-value pair - * with the name being the x-axis label, and the value being the y-axis - * value. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint data_points = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDataPoints() - { - return $this->data_points; - } - - /** - * Each data point in the chart is represented as a name-value pair - * with the name being the x-axis label, and the value being the y-axis - * value. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint data_points = 1; - * @param array<\Google\Cloud\MigrationCenter\V1\ReportSummary\ChartData\DataPoint>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDataPoints($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\ReportSummary\ChartData\DataPoint::class); - $this->data_points = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ChartData::class, \Google\Cloud\MigrationCenter\V1\ReportSummary_ChartData::class); - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/ChartData/DataPoint.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/ChartData/DataPoint.php deleted file mode 100644 index b2bea49da9ac..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/ChartData/DataPoint.php +++ /dev/null @@ -1,104 +0,0 @@ -google.cloud.migrationcenter.v1.ReportSummary.ChartData.DataPoint - */ -class DataPoint extends \Google\Protobuf\Internal\Message -{ - /** - * The X-axis label for this data point. - * - * Generated from protobuf field string label = 1; - */ - protected $label = ''; - /** - * The Y-axis value for this data point. - * - * Generated from protobuf field double value = 2; - */ - protected $value = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $label - * The X-axis label for this data point. - * @type float $value - * The Y-axis value for this data point. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * The X-axis label for this data point. - * - * Generated from protobuf field string label = 1; - * @return string - */ - public function getLabel() - { - return $this->label; - } - - /** - * The X-axis label for this data point. - * - * Generated from protobuf field string label = 1; - * @param string $var - * @return $this - */ - public function setLabel($var) - { - GPBUtil::checkString($var, True); - $this->label = $var; - - return $this; - } - - /** - * The Y-axis value for this data point. - * - * Generated from protobuf field double value = 2; - * @return float - */ - public function getValue() - { - return $this->value; - } - - /** - * The Y-axis value for this data point. - * - * Generated from protobuf field double value = 2; - * @param float $var - * @return $this - */ - public function setValue($var) - { - GPBUtil::checkDouble($var); - $this->value = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DataPoint::class, \Google\Cloud\MigrationCenter\V1\ReportSummary_ChartData_DataPoint::class); - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/ComputeEngineFinding.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/ComputeEngineFinding.php deleted file mode 100644 index ba31b6aae2fc..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/ComputeEngineFinding.php +++ /dev/null @@ -1,172 +0,0 @@ -google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding - */ -class ComputeEngineFinding extends \Google\Protobuf\Internal\Message -{ - /** - * Set of regions in which the assets were allocated. - * - * Generated from protobuf field repeated string allocated_regions = 1; - */ - private $allocated_regions; - /** - * Count of assets which were allocated. - * - * Generated from protobuf field int64 allocated_asset_count = 2; - */ - protected $allocated_asset_count = 0; - /** - * Distribution of assets based on the Machine Series. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation machine_series_allocations = 3; - */ - private $machine_series_allocations; - /** - * Set of disk types allocated to assets. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.PersistentDiskType allocated_disk_types = 4; - */ - private $allocated_disk_types; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $allocated_regions - * Set of regions in which the assets were allocated. - * @type int|string $allocated_asset_count - * Count of assets which were allocated. - * @type array<\Google\Cloud\MigrationCenter\V1\ReportSummary\MachineSeriesAllocation>|\Google\Protobuf\Internal\RepeatedField $machine_series_allocations - * Distribution of assets based on the Machine Series. - * @type array|\Google\Protobuf\Internal\RepeatedField $allocated_disk_types - * Set of disk types allocated to assets. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Set of regions in which the assets were allocated. - * - * Generated from protobuf field repeated string allocated_regions = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAllocatedRegions() - { - return $this->allocated_regions; - } - - /** - * Set of regions in which the assets were allocated. - * - * Generated from protobuf field repeated string allocated_regions = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAllocatedRegions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->allocated_regions = $arr; - - return $this; - } - - /** - * Count of assets which were allocated. - * - * Generated from protobuf field int64 allocated_asset_count = 2; - * @return int|string - */ - public function getAllocatedAssetCount() - { - return $this->allocated_asset_count; - } - - /** - * Count of assets which were allocated. - * - * Generated from protobuf field int64 allocated_asset_count = 2; - * @param int|string $var - * @return $this - */ - public function setAllocatedAssetCount($var) - { - GPBUtil::checkInt64($var); - $this->allocated_asset_count = $var; - - return $this; - } - - /** - * Distribution of assets based on the Machine Series. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation machine_series_allocations = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMachineSeriesAllocations() - { - return $this->machine_series_allocations; - } - - /** - * Distribution of assets based on the Machine Series. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation machine_series_allocations = 3; - * @param array<\Google\Cloud\MigrationCenter\V1\ReportSummary\MachineSeriesAllocation>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMachineSeriesAllocations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\ReportSummary\MachineSeriesAllocation::class); - $this->machine_series_allocations = $arr; - - return $this; - } - - /** - * Set of disk types allocated to assets. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.PersistentDiskType allocated_disk_types = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAllocatedDiskTypes() - { - return $this->allocated_disk_types; - } - - /** - * Set of disk types allocated to assets. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.PersistentDiskType allocated_disk_types = 4; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAllocatedDiskTypes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\MigrationCenter\V1\PersistentDiskType::class); - $this->allocated_disk_types = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ComputeEngineFinding::class, \Google\Cloud\MigrationCenter\V1\ReportSummary_ComputeEngineFinding::class); - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/GroupFinding.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/GroupFinding.php deleted file mode 100644 index 719521989d08..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/GroupFinding.php +++ /dev/null @@ -1,221 +0,0 @@ -google.cloud.migrationcenter.v1.ReportSummary.GroupFinding - */ -class GroupFinding extends \Google\Protobuf\Internal\Message -{ - /** - * Display Name for the Group. - * - * Generated from protobuf field string display_name = 1; - */ - protected $display_name = ''; - /** - * Description for the Group. - * - * Generated from protobuf field string description = 2; - */ - protected $description = ''; - /** - * Summary statistics for all the assets in this group. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats asset_aggregate_stats = 3; - */ - protected $asset_aggregate_stats = null; - /** - * This field is deprecated, do not rely on it having a value. - * - * Generated from protobuf field int64 overlapping_asset_count = 4 [deprecated = true]; - * @deprecated - */ - protected $overlapping_asset_count = 0; - /** - * Findings for each of the PreferenceSets for this group. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding preference_set_findings = 5; - */ - private $preference_set_findings; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $display_name - * Display Name for the Group. - * @type string $description - * Description for the Group. - * @type \Google\Cloud\MigrationCenter\V1\ReportSummary\AssetAggregateStats $asset_aggregate_stats - * Summary statistics for all the assets in this group. - * @type int|string $overlapping_asset_count - * This field is deprecated, do not rely on it having a value. - * @type array<\Google\Cloud\MigrationCenter\V1\ReportSummary\GroupPreferenceSetFinding>|\Google\Protobuf\Internal\RepeatedField $preference_set_findings - * Findings for each of the PreferenceSets for this group. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Display Name for the Group. - * - * Generated from protobuf field string display_name = 1; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Display Name for the Group. - * - * Generated from protobuf field string display_name = 1; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Description for the Group. - * - * Generated from protobuf field string description = 2; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Description for the Group. - * - * Generated from protobuf field string description = 2; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Summary statistics for all the assets in this group. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats asset_aggregate_stats = 3; - * @return \Google\Cloud\MigrationCenter\V1\ReportSummary\AssetAggregateStats|null - */ - public function getAssetAggregateStats() - { - return $this->asset_aggregate_stats; - } - - public function hasAssetAggregateStats() - { - return isset($this->asset_aggregate_stats); - } - - public function clearAssetAggregateStats() - { - unset($this->asset_aggregate_stats); - } - - /** - * Summary statistics for all the assets in this group. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ReportSummary.AssetAggregateStats asset_aggregate_stats = 3; - * @param \Google\Cloud\MigrationCenter\V1\ReportSummary\AssetAggregateStats $var - * @return $this - */ - public function setAssetAggregateStats($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\ReportSummary\AssetAggregateStats::class); - $this->asset_aggregate_stats = $var; - - return $this; - } - - /** - * This field is deprecated, do not rely on it having a value. - * - * Generated from protobuf field int64 overlapping_asset_count = 4 [deprecated = true]; - * @return int|string - * @deprecated - */ - public function getOverlappingAssetCount() - { - @trigger_error('overlapping_asset_count is deprecated.', E_USER_DEPRECATED); - return $this->overlapping_asset_count; - } - - /** - * This field is deprecated, do not rely on it having a value. - * - * Generated from protobuf field int64 overlapping_asset_count = 4 [deprecated = true]; - * @param int|string $var - * @return $this - * @deprecated - */ - public function setOverlappingAssetCount($var) - { - @trigger_error('overlapping_asset_count is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkInt64($var); - $this->overlapping_asset_count = $var; - - return $this; - } - - /** - * Findings for each of the PreferenceSets for this group. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding preference_set_findings = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPreferenceSetFindings() - { - return $this->preference_set_findings; - } - - /** - * Findings for each of the PreferenceSets for this group. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding preference_set_findings = 5; - * @param array<\Google\Cloud\MigrationCenter\V1\ReportSummary\GroupPreferenceSetFinding>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPreferenceSetFindings($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\ReportSummary\GroupPreferenceSetFinding::class); - $this->preference_set_findings = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(GroupFinding::class, \Google\Cloud\MigrationCenter\V1\ReportSummary_GroupFinding::class); - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/GroupPreferenceSetFinding.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/GroupPreferenceSetFinding.php deleted file mode 100644 index fa84bf84d5bd..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/GroupPreferenceSetFinding.php +++ /dev/null @@ -1,544 +0,0 @@ -google.cloud.migrationcenter.v1.ReportSummary.GroupPreferenceSetFinding - */ -class GroupPreferenceSetFinding extends \Google\Protobuf\Internal\Message -{ - /** - * Display Name of the Preference Set - * - * Generated from protobuf field string display_name = 1; - */ - protected $display_name = ''; - /** - * Description for the Preference Set. - * - * Generated from protobuf field string description = 2; - */ - protected $description = ''; - /** - * A set of preferences that applies to all machines in the context. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.VirtualMachinePreferences machine_preferences = 3; - */ - protected $machine_preferences = null; - /** - * Total monthly cost for this preference set. - * - * Generated from protobuf field .google.type.Money monthly_cost_total = 4; - */ - protected $monthly_cost_total = null; - /** - * Compute monthly cost for this preference set. - * - * Generated from protobuf field .google.type.Money monthly_cost_compute = 5; - */ - protected $monthly_cost_compute = null; - /** - * Licensing monthly cost for this preference set. - * - * Generated from protobuf field .google.type.Money monthly_cost_os_license = 6; - */ - protected $monthly_cost_os_license = null; - /** - * Network Egress monthly cost for this preference set. - * - * Generated from protobuf field .google.type.Money monthly_cost_network_egress = 7; - */ - protected $monthly_cost_network_egress = null; - /** - * Storage monthly cost for this preference set. - * - * Generated from protobuf field .google.type.Money monthly_cost_storage = 8; - */ - protected $monthly_cost_storage = null; - /** - * Miscellaneous monthly cost for this preference set. - * - * Generated from protobuf field .google.type.Money monthly_cost_other = 9; - */ - protected $monthly_cost_other = null; - /** - * A set of findings that applies to Compute Engine machines in the input. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding compute_engine_finding = 10; - */ - protected $compute_engine_finding = null; - /** - * A set of findings that applies to VMWare machines in the input. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ReportSummary.VmwareEngineFinding vmware_engine_finding = 11; - */ - protected $vmware_engine_finding = null; - /** - * A set of findings that applies to Sole-Tenant machines in the input. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ReportSummary.SoleTenantFinding sole_tenant_finding = 12; - */ - protected $sole_tenant_finding = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $display_name - * Display Name of the Preference Set - * @type string $description - * Description for the Preference Set. - * @type \Google\Cloud\MigrationCenter\V1\VirtualMachinePreferences $machine_preferences - * A set of preferences that applies to all machines in the context. - * @type \Google\Type\Money $monthly_cost_total - * Total monthly cost for this preference set. - * @type \Google\Type\Money $monthly_cost_compute - * Compute monthly cost for this preference set. - * @type \Google\Type\Money $monthly_cost_os_license - * Licensing monthly cost for this preference set. - * @type \Google\Type\Money $monthly_cost_network_egress - * Network Egress monthly cost for this preference set. - * @type \Google\Type\Money $monthly_cost_storage - * Storage monthly cost for this preference set. - * @type \Google\Type\Money $monthly_cost_other - * Miscellaneous monthly cost for this preference set. - * @type \Google\Cloud\MigrationCenter\V1\ReportSummary\ComputeEngineFinding $compute_engine_finding - * A set of findings that applies to Compute Engine machines in the input. - * @type \Google\Cloud\MigrationCenter\V1\ReportSummary\VmwareEngineFinding $vmware_engine_finding - * A set of findings that applies to VMWare machines in the input. - * @type \Google\Cloud\MigrationCenter\V1\ReportSummary\SoleTenantFinding $sole_tenant_finding - * A set of findings that applies to Sole-Tenant machines in the input. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Display Name of the Preference Set - * - * Generated from protobuf field string display_name = 1; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Display Name of the Preference Set - * - * Generated from protobuf field string display_name = 1; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Description for the Preference Set. - * - * Generated from protobuf field string description = 2; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Description for the Preference Set. - * - * Generated from protobuf field string description = 2; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * A set of preferences that applies to all machines in the context. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.VirtualMachinePreferences machine_preferences = 3; - * @return \Google\Cloud\MigrationCenter\V1\VirtualMachinePreferences|null - */ - public function getMachinePreferences() - { - return $this->machine_preferences; - } - - public function hasMachinePreferences() - { - return isset($this->machine_preferences); - } - - public function clearMachinePreferences() - { - unset($this->machine_preferences); - } - - /** - * A set of preferences that applies to all machines in the context. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.VirtualMachinePreferences machine_preferences = 3; - * @param \Google\Cloud\MigrationCenter\V1\VirtualMachinePreferences $var - * @return $this - */ - public function setMachinePreferences($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\VirtualMachinePreferences::class); - $this->machine_preferences = $var; - - return $this; - } - - /** - * Total monthly cost for this preference set. - * - * Generated from protobuf field .google.type.Money monthly_cost_total = 4; - * @return \Google\Type\Money|null - */ - public function getMonthlyCostTotal() - { - return $this->monthly_cost_total; - } - - public function hasMonthlyCostTotal() - { - return isset($this->monthly_cost_total); - } - - public function clearMonthlyCostTotal() - { - unset($this->monthly_cost_total); - } - - /** - * Total monthly cost for this preference set. - * - * Generated from protobuf field .google.type.Money monthly_cost_total = 4; - * @param \Google\Type\Money $var - * @return $this - */ - public function setMonthlyCostTotal($var) - { - GPBUtil::checkMessage($var, \Google\Type\Money::class); - $this->monthly_cost_total = $var; - - return $this; - } - - /** - * Compute monthly cost for this preference set. - * - * Generated from protobuf field .google.type.Money monthly_cost_compute = 5; - * @return \Google\Type\Money|null - */ - public function getMonthlyCostCompute() - { - return $this->monthly_cost_compute; - } - - public function hasMonthlyCostCompute() - { - return isset($this->monthly_cost_compute); - } - - public function clearMonthlyCostCompute() - { - unset($this->monthly_cost_compute); - } - - /** - * Compute monthly cost for this preference set. - * - * Generated from protobuf field .google.type.Money monthly_cost_compute = 5; - * @param \Google\Type\Money $var - * @return $this - */ - public function setMonthlyCostCompute($var) - { - GPBUtil::checkMessage($var, \Google\Type\Money::class); - $this->monthly_cost_compute = $var; - - return $this; - } - - /** - * Licensing monthly cost for this preference set. - * - * Generated from protobuf field .google.type.Money monthly_cost_os_license = 6; - * @return \Google\Type\Money|null - */ - public function getMonthlyCostOsLicense() - { - return $this->monthly_cost_os_license; - } - - public function hasMonthlyCostOsLicense() - { - return isset($this->monthly_cost_os_license); - } - - public function clearMonthlyCostOsLicense() - { - unset($this->monthly_cost_os_license); - } - - /** - * Licensing monthly cost for this preference set. - * - * Generated from protobuf field .google.type.Money monthly_cost_os_license = 6; - * @param \Google\Type\Money $var - * @return $this - */ - public function setMonthlyCostOsLicense($var) - { - GPBUtil::checkMessage($var, \Google\Type\Money::class); - $this->monthly_cost_os_license = $var; - - return $this; - } - - /** - * Network Egress monthly cost for this preference set. - * - * Generated from protobuf field .google.type.Money monthly_cost_network_egress = 7; - * @return \Google\Type\Money|null - */ - public function getMonthlyCostNetworkEgress() - { - return $this->monthly_cost_network_egress; - } - - public function hasMonthlyCostNetworkEgress() - { - return isset($this->monthly_cost_network_egress); - } - - public function clearMonthlyCostNetworkEgress() - { - unset($this->monthly_cost_network_egress); - } - - /** - * Network Egress monthly cost for this preference set. - * - * Generated from protobuf field .google.type.Money monthly_cost_network_egress = 7; - * @param \Google\Type\Money $var - * @return $this - */ - public function setMonthlyCostNetworkEgress($var) - { - GPBUtil::checkMessage($var, \Google\Type\Money::class); - $this->monthly_cost_network_egress = $var; - - return $this; - } - - /** - * Storage monthly cost for this preference set. - * - * Generated from protobuf field .google.type.Money monthly_cost_storage = 8; - * @return \Google\Type\Money|null - */ - public function getMonthlyCostStorage() - { - return $this->monthly_cost_storage; - } - - public function hasMonthlyCostStorage() - { - return isset($this->monthly_cost_storage); - } - - public function clearMonthlyCostStorage() - { - unset($this->monthly_cost_storage); - } - - /** - * Storage monthly cost for this preference set. - * - * Generated from protobuf field .google.type.Money monthly_cost_storage = 8; - * @param \Google\Type\Money $var - * @return $this - */ - public function setMonthlyCostStorage($var) - { - GPBUtil::checkMessage($var, \Google\Type\Money::class); - $this->monthly_cost_storage = $var; - - return $this; - } - - /** - * Miscellaneous monthly cost for this preference set. - * - * Generated from protobuf field .google.type.Money monthly_cost_other = 9; - * @return \Google\Type\Money|null - */ - public function getMonthlyCostOther() - { - return $this->monthly_cost_other; - } - - public function hasMonthlyCostOther() - { - return isset($this->monthly_cost_other); - } - - public function clearMonthlyCostOther() - { - unset($this->monthly_cost_other); - } - - /** - * Miscellaneous monthly cost for this preference set. - * - * Generated from protobuf field .google.type.Money monthly_cost_other = 9; - * @param \Google\Type\Money $var - * @return $this - */ - public function setMonthlyCostOther($var) - { - GPBUtil::checkMessage($var, \Google\Type\Money::class); - $this->monthly_cost_other = $var; - - return $this; - } - - /** - * A set of findings that applies to Compute Engine machines in the input. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding compute_engine_finding = 10; - * @return \Google\Cloud\MigrationCenter\V1\ReportSummary\ComputeEngineFinding|null - */ - public function getComputeEngineFinding() - { - return $this->compute_engine_finding; - } - - public function hasComputeEngineFinding() - { - return isset($this->compute_engine_finding); - } - - public function clearComputeEngineFinding() - { - unset($this->compute_engine_finding); - } - - /** - * A set of findings that applies to Compute Engine machines in the input. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ReportSummary.ComputeEngineFinding compute_engine_finding = 10; - * @param \Google\Cloud\MigrationCenter\V1\ReportSummary\ComputeEngineFinding $var - * @return $this - */ - public function setComputeEngineFinding($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\ReportSummary\ComputeEngineFinding::class); - $this->compute_engine_finding = $var; - - return $this; - } - - /** - * A set of findings that applies to VMWare machines in the input. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ReportSummary.VmwareEngineFinding vmware_engine_finding = 11; - * @return \Google\Cloud\MigrationCenter\V1\ReportSummary\VmwareEngineFinding|null - */ - public function getVmwareEngineFinding() - { - return $this->vmware_engine_finding; - } - - public function hasVmwareEngineFinding() - { - return isset($this->vmware_engine_finding); - } - - public function clearVmwareEngineFinding() - { - unset($this->vmware_engine_finding); - } - - /** - * A set of findings that applies to VMWare machines in the input. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ReportSummary.VmwareEngineFinding vmware_engine_finding = 11; - * @param \Google\Cloud\MigrationCenter\V1\ReportSummary\VmwareEngineFinding $var - * @return $this - */ - public function setVmwareEngineFinding($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\ReportSummary\VmwareEngineFinding::class); - $this->vmware_engine_finding = $var; - - return $this; - } - - /** - * A set of findings that applies to Sole-Tenant machines in the input. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ReportSummary.SoleTenantFinding sole_tenant_finding = 12; - * @return \Google\Cloud\MigrationCenter\V1\ReportSummary\SoleTenantFinding|null - */ - public function getSoleTenantFinding() - { - return $this->sole_tenant_finding; - } - - public function hasSoleTenantFinding() - { - return isset($this->sole_tenant_finding); - } - - public function clearSoleTenantFinding() - { - unset($this->sole_tenant_finding); - } - - /** - * A set of findings that applies to Sole-Tenant machines in the input. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ReportSummary.SoleTenantFinding sole_tenant_finding = 12; - * @param \Google\Cloud\MigrationCenter\V1\ReportSummary\SoleTenantFinding $var - * @return $this - */ - public function setSoleTenantFinding($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\ReportSummary\SoleTenantFinding::class); - $this->sole_tenant_finding = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(GroupPreferenceSetFinding::class, \Google\Cloud\MigrationCenter\V1\ReportSummary_GroupPreferenceSetFinding::class); - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/HistogramChartData.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/HistogramChartData.php deleted file mode 100644 index 75d06644f304..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/HistogramChartData.php +++ /dev/null @@ -1,87 +0,0 @@ -google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData - */ -class HistogramChartData extends \Google\Protobuf\Internal\Message -{ - /** - * Buckets in the histogram. - * There will be `n+1` buckets matching `n` lower bounds in the request. - * The first bucket will be from -infinity to the first bound. - * Subsequent buckets will be between one bound and the next. - * The final bucket will be from the final bound to infinity. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket buckets = 1; - */ - private $buckets; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\MigrationCenter\V1\ReportSummary\HistogramChartData\Bucket>|\Google\Protobuf\Internal\RepeatedField $buckets - * Buckets in the histogram. - * There will be `n+1` buckets matching `n` lower bounds in the request. - * The first bucket will be from -infinity to the first bound. - * Subsequent buckets will be between one bound and the next. - * The final bucket will be from the final bound to infinity. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Buckets in the histogram. - * There will be `n+1` buckets matching `n` lower bounds in the request. - * The first bucket will be from -infinity to the first bound. - * Subsequent buckets will be between one bound and the next. - * The final bucket will be from the final bound to infinity. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket buckets = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getBuckets() - { - return $this->buckets; - } - - /** - * Buckets in the histogram. - * There will be `n+1` buckets matching `n` lower bounds in the request. - * The first bucket will be from -infinity to the first bound. - * Subsequent buckets will be between one bound and the next. - * The final bucket will be from the final bound to infinity. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket buckets = 1; - * @param array<\Google\Cloud\MigrationCenter\V1\ReportSummary\HistogramChartData\Bucket>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setBuckets($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\ReportSummary\HistogramChartData\Bucket::class); - $this->buckets = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(HistogramChartData::class, \Google\Cloud\MigrationCenter\V1\ReportSummary_HistogramChartData::class); - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/HistogramChartData/Bucket.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/HistogramChartData/Bucket.php deleted file mode 100644 index ca8197db764a..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/HistogramChartData/Bucket.php +++ /dev/null @@ -1,141 +0,0 @@ -google.cloud.migrationcenter.v1.ReportSummary.HistogramChartData.Bucket - */ -class Bucket extends \Google\Protobuf\Internal\Message -{ - /** - * Lower bound - inclusive. - * - * Generated from protobuf field int64 lower_bound = 1; - */ - protected $lower_bound = 0; - /** - * Upper bound - exclusive. - * - * Generated from protobuf field int64 upper_bound = 2; - */ - protected $upper_bound = 0; - /** - * Count of items in the bucket. - * - * Generated from protobuf field int64 count = 3; - */ - protected $count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $lower_bound - * Lower bound - inclusive. - * @type int|string $upper_bound - * Upper bound - exclusive. - * @type int|string $count - * Count of items in the bucket. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Lower bound - inclusive. - * - * Generated from protobuf field int64 lower_bound = 1; - * @return int|string - */ - public function getLowerBound() - { - return $this->lower_bound; - } - - /** - * Lower bound - inclusive. - * - * Generated from protobuf field int64 lower_bound = 1; - * @param int|string $var - * @return $this - */ - public function setLowerBound($var) - { - GPBUtil::checkInt64($var); - $this->lower_bound = $var; - - return $this; - } - - /** - * Upper bound - exclusive. - * - * Generated from protobuf field int64 upper_bound = 2; - * @return int|string - */ - public function getUpperBound() - { - return $this->upper_bound; - } - - /** - * Upper bound - exclusive. - * - * Generated from protobuf field int64 upper_bound = 2; - * @param int|string $var - * @return $this - */ - public function setUpperBound($var) - { - GPBUtil::checkInt64($var); - $this->upper_bound = $var; - - return $this; - } - - /** - * Count of items in the bucket. - * - * Generated from protobuf field int64 count = 3; - * @return int|string - */ - public function getCount() - { - return $this->count; - } - - /** - * Count of items in the bucket. - * - * Generated from protobuf field int64 count = 3; - * @param int|string $var - * @return $this - */ - public function setCount($var) - { - GPBUtil::checkInt64($var); - $this->count = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Bucket::class, \Google\Cloud\MigrationCenter\V1\ReportSummary_HistogramChartData_Bucket::class); - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/MachineSeriesAllocation.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/MachineSeriesAllocation.php deleted file mode 100644 index ae3ebad0dd3a..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/MachineSeriesAllocation.php +++ /dev/null @@ -1,115 +0,0 @@ -google.cloud.migrationcenter.v1.ReportSummary.MachineSeriesAllocation - */ -class MachineSeriesAllocation extends \Google\Protobuf\Internal\Message -{ - /** - * The Machine Series (e.g. "E2", "N2") - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.MachineSeries machine_series = 1; - */ - protected $machine_series = null; - /** - * Count of assets allocated to this machine series. - * - * Generated from protobuf field int64 allocated_asset_count = 2; - */ - protected $allocated_asset_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\MigrationCenter\V1\MachineSeries $machine_series - * The Machine Series (e.g. "E2", "N2") - * @type int|string $allocated_asset_count - * Count of assets allocated to this machine series. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * The Machine Series (e.g. "E2", "N2") - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.MachineSeries machine_series = 1; - * @return \Google\Cloud\MigrationCenter\V1\MachineSeries|null - */ - public function getMachineSeries() - { - return $this->machine_series; - } - - public function hasMachineSeries() - { - return isset($this->machine_series); - } - - public function clearMachineSeries() - { - unset($this->machine_series); - } - - /** - * The Machine Series (e.g. "E2", "N2") - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.MachineSeries machine_series = 1; - * @param \Google\Cloud\MigrationCenter\V1\MachineSeries $var - * @return $this - */ - public function setMachineSeries($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\MachineSeries::class); - $this->machine_series = $var; - - return $this; - } - - /** - * Count of assets allocated to this machine series. - * - * Generated from protobuf field int64 allocated_asset_count = 2; - * @return int|string - */ - public function getAllocatedAssetCount() - { - return $this->allocated_asset_count; - } - - /** - * Count of assets allocated to this machine series. - * - * Generated from protobuf field int64 allocated_asset_count = 2; - * @param int|string $var - * @return $this - */ - public function setAllocatedAssetCount($var) - { - GPBUtil::checkInt64($var); - $this->allocated_asset_count = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(MachineSeriesAllocation::class, \Google\Cloud\MigrationCenter\V1\ReportSummary_MachineSeriesAllocation::class); - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/SoleTenantFinding.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/SoleTenantFinding.php deleted file mode 100644 index 9dd9c5693d87..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/SoleTenantFinding.php +++ /dev/null @@ -1,138 +0,0 @@ -google.cloud.migrationcenter.v1.ReportSummary.SoleTenantFinding - */ -class SoleTenantFinding extends \Google\Protobuf\Internal\Message -{ - /** - * Set of regions in which the assets are allocated - * - * Generated from protobuf field repeated string allocated_regions = 1; - */ - private $allocated_regions; - /** - * Count of assets which are allocated - * - * Generated from protobuf field int64 allocated_asset_count = 2; - */ - protected $allocated_asset_count = 0; - /** - * Set of per-nodetype allocation records - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ReportSummary.SoleTenantNodeAllocation node_allocations = 3; - */ - private $node_allocations; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $allocated_regions - * Set of regions in which the assets are allocated - * @type int|string $allocated_asset_count - * Count of assets which are allocated - * @type array<\Google\Cloud\MigrationCenter\V1\ReportSummary\SoleTenantNodeAllocation>|\Google\Protobuf\Internal\RepeatedField $node_allocations - * Set of per-nodetype allocation records - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Set of regions in which the assets are allocated - * - * Generated from protobuf field repeated string allocated_regions = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAllocatedRegions() - { - return $this->allocated_regions; - } - - /** - * Set of regions in which the assets are allocated - * - * Generated from protobuf field repeated string allocated_regions = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAllocatedRegions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->allocated_regions = $arr; - - return $this; - } - - /** - * Count of assets which are allocated - * - * Generated from protobuf field int64 allocated_asset_count = 2; - * @return int|string - */ - public function getAllocatedAssetCount() - { - return $this->allocated_asset_count; - } - - /** - * Count of assets which are allocated - * - * Generated from protobuf field int64 allocated_asset_count = 2; - * @param int|string $var - * @return $this - */ - public function setAllocatedAssetCount($var) - { - GPBUtil::checkInt64($var); - $this->allocated_asset_count = $var; - - return $this; - } - - /** - * Set of per-nodetype allocation records - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ReportSummary.SoleTenantNodeAllocation node_allocations = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNodeAllocations() - { - return $this->node_allocations; - } - - /** - * Set of per-nodetype allocation records - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ReportSummary.SoleTenantNodeAllocation node_allocations = 3; - * @param array<\Google\Cloud\MigrationCenter\V1\ReportSummary\SoleTenantNodeAllocation>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNodeAllocations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\ReportSummary\SoleTenantNodeAllocation::class); - $this->node_allocations = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SoleTenantFinding::class, \Google\Cloud\MigrationCenter\V1\ReportSummary_SoleTenantFinding::class); - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/SoleTenantNodeAllocation.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/SoleTenantNodeAllocation.php deleted file mode 100644 index 019fb4f70b41..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/SoleTenantNodeAllocation.php +++ /dev/null @@ -1,148 +0,0 @@ -google.cloud.migrationcenter.v1.ReportSummary.SoleTenantNodeAllocation - */ -class SoleTenantNodeAllocation extends \Google\Protobuf\Internal\Message -{ - /** - * Sole Tenant node type, e.g. "m3-node-128-3904" - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.SoleTenantNodeType node = 1; - */ - protected $node = null; - /** - * Count of this node type to be provisioned - * - * Generated from protobuf field int64 node_count = 2; - */ - protected $node_count = 0; - /** - * Count of assets allocated to these nodes - * - * Generated from protobuf field int64 allocated_asset_count = 3; - */ - protected $allocated_asset_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\MigrationCenter\V1\SoleTenantNodeType $node - * Sole Tenant node type, e.g. "m3-node-128-3904" - * @type int|string $node_count - * Count of this node type to be provisioned - * @type int|string $allocated_asset_count - * Count of assets allocated to these nodes - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Sole Tenant node type, e.g. "m3-node-128-3904" - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.SoleTenantNodeType node = 1; - * @return \Google\Cloud\MigrationCenter\V1\SoleTenantNodeType|null - */ - public function getNode() - { - return $this->node; - } - - public function hasNode() - { - return isset($this->node); - } - - public function clearNode() - { - unset($this->node); - } - - /** - * Sole Tenant node type, e.g. "m3-node-128-3904" - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.SoleTenantNodeType node = 1; - * @param \Google\Cloud\MigrationCenter\V1\SoleTenantNodeType $var - * @return $this - */ - public function setNode($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\SoleTenantNodeType::class); - $this->node = $var; - - return $this; - } - - /** - * Count of this node type to be provisioned - * - * Generated from protobuf field int64 node_count = 2; - * @return int|string - */ - public function getNodeCount() - { - return $this->node_count; - } - - /** - * Count of this node type to be provisioned - * - * Generated from protobuf field int64 node_count = 2; - * @param int|string $var - * @return $this - */ - public function setNodeCount($var) - { - GPBUtil::checkInt64($var); - $this->node_count = $var; - - return $this; - } - - /** - * Count of assets allocated to these nodes - * - * Generated from protobuf field int64 allocated_asset_count = 3; - * @return int|string - */ - public function getAllocatedAssetCount() - { - return $this->allocated_asset_count; - } - - /** - * Count of assets allocated to these nodes - * - * Generated from protobuf field int64 allocated_asset_count = 3; - * @param int|string $var - * @return $this - */ - public function setAllocatedAssetCount($var) - { - GPBUtil::checkInt64($var); - $this->allocated_asset_count = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SoleTenantNodeAllocation::class, \Google\Cloud\MigrationCenter\V1\ReportSummary_SoleTenantNodeAllocation::class); - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/UtilizationChartData.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/UtilizationChartData.php deleted file mode 100644 index 7f3104415ff6..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/UtilizationChartData.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.migrationcenter.v1.ReportSummary.UtilizationChartData - */ -class UtilizationChartData extends \Google\Protobuf\Internal\Message -{ - /** - * Aggregate value which falls into the "Used" bucket. - * - * Generated from protobuf field int64 used = 1; - */ - protected $used = 0; - /** - * Aggregate value which falls into the "Free" bucket. - * - * Generated from protobuf field int64 free = 2; - */ - protected $free = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $used - * Aggregate value which falls into the "Used" bucket. - * @type int|string $free - * Aggregate value which falls into the "Free" bucket. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Aggregate value which falls into the "Used" bucket. - * - * Generated from protobuf field int64 used = 1; - * @return int|string - */ - public function getUsed() - { - return $this->used; - } - - /** - * Aggregate value which falls into the "Used" bucket. - * - * Generated from protobuf field int64 used = 1; - * @param int|string $var - * @return $this - */ - public function setUsed($var) - { - GPBUtil::checkInt64($var); - $this->used = $var; - - return $this; - } - - /** - * Aggregate value which falls into the "Free" bucket. - * - * Generated from protobuf field int64 free = 2; - * @return int|string - */ - public function getFree() - { - return $this->free; - } - - /** - * Aggregate value which falls into the "Free" bucket. - * - * Generated from protobuf field int64 free = 2; - * @param int|string $var - * @return $this - */ - public function setFree($var) - { - GPBUtil::checkInt64($var); - $this->free = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(UtilizationChartData::class, \Google\Cloud\MigrationCenter\V1\ReportSummary_UtilizationChartData::class); - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/VmwareEngineFinding.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/VmwareEngineFinding.php deleted file mode 100644 index dc870baba1ef..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/VmwareEngineFinding.php +++ /dev/null @@ -1,138 +0,0 @@ -google.cloud.migrationcenter.v1.ReportSummary.VmwareEngineFinding - */ -class VmwareEngineFinding extends \Google\Protobuf\Internal\Message -{ - /** - * Set of regions in which the assets were allocated - * - * Generated from protobuf field repeated string allocated_regions = 1; - */ - private $allocated_regions; - /** - * Count of assets which are allocated - * - * Generated from protobuf field int64 allocated_asset_count = 2; - */ - protected $allocated_asset_count = 0; - /** - * Set of per-nodetype allocation records - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ReportSummary.VmwareNodeAllocation node_allocations = 3; - */ - private $node_allocations; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $allocated_regions - * Set of regions in which the assets were allocated - * @type int|string $allocated_asset_count - * Count of assets which are allocated - * @type array<\Google\Cloud\MigrationCenter\V1\ReportSummary\VmwareNodeAllocation>|\Google\Protobuf\Internal\RepeatedField $node_allocations - * Set of per-nodetype allocation records - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Set of regions in which the assets were allocated - * - * Generated from protobuf field repeated string allocated_regions = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAllocatedRegions() - { - return $this->allocated_regions; - } - - /** - * Set of regions in which the assets were allocated - * - * Generated from protobuf field repeated string allocated_regions = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAllocatedRegions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->allocated_regions = $arr; - - return $this; - } - - /** - * Count of assets which are allocated - * - * Generated from protobuf field int64 allocated_asset_count = 2; - * @return int|string - */ - public function getAllocatedAssetCount() - { - return $this->allocated_asset_count; - } - - /** - * Count of assets which are allocated - * - * Generated from protobuf field int64 allocated_asset_count = 2; - * @param int|string $var - * @return $this - */ - public function setAllocatedAssetCount($var) - { - GPBUtil::checkInt64($var); - $this->allocated_asset_count = $var; - - return $this; - } - - /** - * Set of per-nodetype allocation records - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ReportSummary.VmwareNodeAllocation node_allocations = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNodeAllocations() - { - return $this->node_allocations; - } - - /** - * Set of per-nodetype allocation records - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ReportSummary.VmwareNodeAllocation node_allocations = 3; - * @param array<\Google\Cloud\MigrationCenter\V1\ReportSummary\VmwareNodeAllocation>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNodeAllocations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\ReportSummary\VmwareNodeAllocation::class); - $this->node_allocations = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(VmwareEngineFinding::class, \Google\Cloud\MigrationCenter\V1\ReportSummary_VmwareEngineFinding::class); - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/VmwareNode.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/VmwareNode.php deleted file mode 100644 index 9a0dfe332a7c..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/VmwareNode.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.migrationcenter.v1.ReportSummary.VmwareNode - */ -class VmwareNode extends \Google\Protobuf\Internal\Message -{ - /** - * Code to identify VMware Engine node series, e.g. "ve1-standard-72". Based - * on the displayName of - * cloud.google.com/vmware-engine/docs/reference/rest/v1/projects.locations.nodeTypes - * - * Generated from protobuf field string code = 1; - */ - protected $code = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $code - * Code to identify VMware Engine node series, e.g. "ve1-standard-72". Based - * on the displayName of - * cloud.google.com/vmware-engine/docs/reference/rest/v1/projects.locations.nodeTypes - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Code to identify VMware Engine node series, e.g. "ve1-standard-72". Based - * on the displayName of - * cloud.google.com/vmware-engine/docs/reference/rest/v1/projects.locations.nodeTypes - * - * Generated from protobuf field string code = 1; - * @return string - */ - public function getCode() - { - return $this->code; - } - - /** - * Code to identify VMware Engine node series, e.g. "ve1-standard-72". Based - * on the displayName of - * cloud.google.com/vmware-engine/docs/reference/rest/v1/projects.locations.nodeTypes - * - * Generated from protobuf field string code = 1; - * @param string $var - * @return $this - */ - public function setCode($var) - { - GPBUtil::checkString($var, True); - $this->code = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(VmwareNode::class, \Google\Cloud\MigrationCenter\V1\ReportSummary_VmwareNode::class); - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/VmwareNodeAllocation.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/VmwareNodeAllocation.php deleted file mode 100644 index 376a758d9bc5..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportSummary/VmwareNodeAllocation.php +++ /dev/null @@ -1,148 +0,0 @@ -google.cloud.migrationcenter.v1.ReportSummary.VmwareNodeAllocation - */ -class VmwareNodeAllocation extends \Google\Protobuf\Internal\Message -{ - /** - * VMWare node type, e.g. "ve1-standard-72" - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ReportSummary.VmwareNode vmware_node = 1; - */ - protected $vmware_node = null; - /** - * Count of this node type to be provisioned - * - * Generated from protobuf field int64 node_count = 2; - */ - protected $node_count = 0; - /** - * Count of assets allocated to these nodes - * - * Generated from protobuf field int64 allocated_asset_count = 3; - */ - protected $allocated_asset_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\MigrationCenter\V1\ReportSummary\VmwareNode $vmware_node - * VMWare node type, e.g. "ve1-standard-72" - * @type int|string $node_count - * Count of this node type to be provisioned - * @type int|string $allocated_asset_count - * Count of assets allocated to these nodes - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * VMWare node type, e.g. "ve1-standard-72" - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ReportSummary.VmwareNode vmware_node = 1; - * @return \Google\Cloud\MigrationCenter\V1\ReportSummary\VmwareNode|null - */ - public function getVmwareNode() - { - return $this->vmware_node; - } - - public function hasVmwareNode() - { - return isset($this->vmware_node); - } - - public function clearVmwareNode() - { - unset($this->vmware_node); - } - - /** - * VMWare node type, e.g. "ve1-standard-72" - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ReportSummary.VmwareNode vmware_node = 1; - * @param \Google\Cloud\MigrationCenter\V1\ReportSummary\VmwareNode $var - * @return $this - */ - public function setVmwareNode($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\ReportSummary\VmwareNode::class); - $this->vmware_node = $var; - - return $this; - } - - /** - * Count of this node type to be provisioned - * - * Generated from protobuf field int64 node_count = 2; - * @return int|string - */ - public function getNodeCount() - { - return $this->node_count; - } - - /** - * Count of this node type to be provisioned - * - * Generated from protobuf field int64 node_count = 2; - * @param int|string $var - * @return $this - */ - public function setNodeCount($var) - { - GPBUtil::checkInt64($var); - $this->node_count = $var; - - return $this; - } - - /** - * Count of assets allocated to these nodes - * - * Generated from protobuf field int64 allocated_asset_count = 3; - * @return int|string - */ - public function getAllocatedAssetCount() - { - return $this->allocated_asset_count; - } - - /** - * Count of assets allocated to these nodes - * - * Generated from protobuf field int64 allocated_asset_count = 3; - * @param int|string $var - * @return $this - */ - public function setAllocatedAssetCount($var) - { - GPBUtil::checkInt64($var); - $this->allocated_asset_count = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(VmwareNodeAllocation::class, \Google\Cloud\MigrationCenter\V1\ReportSummary_VmwareNodeAllocation::class); - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportView.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportView.php deleted file mode 100644 index 8aa6a7e13acb..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ReportView.php +++ /dev/null @@ -1,73 +0,0 @@ -google.cloud.migrationcenter.v1.ReportView - */ -class ReportView -{ - /** - * The report view is not specified. The API displays the basic view by - * default. - * - * Generated from protobuf enum REPORT_VIEW_UNSPECIFIED = 0; - */ - const REPORT_VIEW_UNSPECIFIED = 0; - /** - * The report view includes only basic metadata of the Report. Useful for - * list views. - * - * Generated from protobuf enum REPORT_VIEW_BASIC = 1; - */ - const REPORT_VIEW_BASIC = 1; - /** - * The report view includes all the metadata of the Report. Useful for - * preview. - * - * Generated from protobuf enum REPORT_VIEW_FULL = 2; - */ - const REPORT_VIEW_FULL = 2; - /** - * The report view includes the standard metadata of an report. Useful for - * detail view. - * - * Generated from protobuf enum REPORT_VIEW_STANDARD = 3; - */ - const REPORT_VIEW_STANDARD = 3; - - private static $valueToName = [ - self::REPORT_VIEW_UNSPECIFIED => 'REPORT_VIEW_UNSPECIFIED', - self::REPORT_VIEW_BASIC => 'REPORT_VIEW_BASIC', - self::REPORT_VIEW_FULL => 'REPORT_VIEW_FULL', - self::REPORT_VIEW_STANDARD => 'REPORT_VIEW_STANDARD', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/RunImportJobRequest.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/RunImportJobRequest.php deleted file mode 100644 index 08b377a9b4b1..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/RunImportJobRequest.php +++ /dev/null @@ -1,155 +0,0 @@ -google.cloud.migrationcenter.v1.RunImportJobRequest - */ -class RunImportJobRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the import job to run. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param string $name Required. The name of the import job to run. Please see - * {@see MigrationCenterClient::importJobName()} for help formatting this field. - * - * @return \Google\Cloud\MigrationCenter\V1\RunImportJobRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the import job to run. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the import job to run. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the import job to run. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/RunningProcess.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/RunningProcess.php deleted file mode 100644 index 6d196f7fad00..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/RunningProcess.php +++ /dev/null @@ -1,203 +0,0 @@ -google.cloud.migrationcenter.v1.RunningProcess - */ -class RunningProcess extends \Google\Protobuf\Internal\Message -{ - /** - * Process ID. - * - * Generated from protobuf field int64 pid = 1; - */ - protected $pid = 0; - /** - * Process binary path. - * - * Generated from protobuf field string exe_path = 2; - */ - protected $exe_path = ''; - /** - * Process full command line. - * - * Generated from protobuf field string cmdline = 3; - */ - protected $cmdline = ''; - /** - * User running the process. - * - * Generated from protobuf field string user = 4; - */ - protected $user = ''; - /** - * Process extended attributes. - * - * Generated from protobuf field map attributes = 100; - */ - private $attributes; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $pid - * Process ID. - * @type string $exe_path - * Process binary path. - * @type string $cmdline - * Process full command line. - * @type string $user - * User running the process. - * @type array|\Google\Protobuf\Internal\MapField $attributes - * Process extended attributes. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Process ID. - * - * Generated from protobuf field int64 pid = 1; - * @return int|string - */ - public function getPid() - { - return $this->pid; - } - - /** - * Process ID. - * - * Generated from protobuf field int64 pid = 1; - * @param int|string $var - * @return $this - */ - public function setPid($var) - { - GPBUtil::checkInt64($var); - $this->pid = $var; - - return $this; - } - - /** - * Process binary path. - * - * Generated from protobuf field string exe_path = 2; - * @return string - */ - public function getExePath() - { - return $this->exe_path; - } - - /** - * Process binary path. - * - * Generated from protobuf field string exe_path = 2; - * @param string $var - * @return $this - */ - public function setExePath($var) - { - GPBUtil::checkString($var, True); - $this->exe_path = $var; - - return $this; - } - - /** - * Process full command line. - * - * Generated from protobuf field string cmdline = 3; - * @return string - */ - public function getCmdline() - { - return $this->cmdline; - } - - /** - * Process full command line. - * - * Generated from protobuf field string cmdline = 3; - * @param string $var - * @return $this - */ - public function setCmdline($var) - { - GPBUtil::checkString($var, True); - $this->cmdline = $var; - - return $this; - } - - /** - * User running the process. - * - * Generated from protobuf field string user = 4; - * @return string - */ - public function getUser() - { - return $this->user; - } - - /** - * User running the process. - * - * Generated from protobuf field string user = 4; - * @param string $var - * @return $this - */ - public function setUser($var) - { - GPBUtil::checkString($var, True); - $this->user = $var; - - return $this; - } - - /** - * Process extended attributes. - * - * Generated from protobuf field map attributes = 100; - * @return \Google\Protobuf\Internal\MapField - */ - public function getAttributes() - { - return $this->attributes; - } - - /** - * Process extended attributes. - * - * Generated from protobuf field map attributes = 100; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setAttributes($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->attributes = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/RunningProcessList.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/RunningProcessList.php deleted file mode 100644 index 2db4b45ee7cb..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/RunningProcessList.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.migrationcenter.v1.RunningProcessList - */ -class RunningProcessList extends \Google\Protobuf\Internal\Message -{ - /** - * Running process entries. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.RunningProcess entries = 1; - */ - private $entries; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\MigrationCenter\V1\RunningProcess>|\Google\Protobuf\Internal\RepeatedField $entries - * Running process entries. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Running process entries. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.RunningProcess entries = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEntries() - { - return $this->entries; - } - - /** - * Running process entries. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.RunningProcess entries = 1; - * @param array<\Google\Cloud\MigrationCenter\V1\RunningProcess>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEntries($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\RunningProcess::class); - $this->entries = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/RunningService.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/RunningService.php deleted file mode 100644 index 6a7eb69330a9..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/RunningService.php +++ /dev/null @@ -1,237 +0,0 @@ -google.cloud.migrationcenter.v1.RunningService - */ -class RunningService extends \Google\Protobuf\Internal\Message -{ - /** - * Service name. - * - * Generated from protobuf field string service_name = 1; - */ - protected $service_name = ''; - /** - * Service state (OS-agnostic). - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.RunningService.State state = 2; - */ - protected $state = 0; - /** - * Service start mode (OS-agnostic). - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.RunningService.StartMode start_mode = 3; - */ - protected $start_mode = 0; - /** - * Service binary path. - * - * Generated from protobuf field string exe_path = 4; - */ - protected $exe_path = ''; - /** - * Service command line. - * - * Generated from protobuf field string cmdline = 5; - */ - protected $cmdline = ''; - /** - * Service pid. - * - * Generated from protobuf field int64 pid = 6; - */ - protected $pid = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $service_name - * Service name. - * @type int $state - * Service state (OS-agnostic). - * @type int $start_mode - * Service start mode (OS-agnostic). - * @type string $exe_path - * Service binary path. - * @type string $cmdline - * Service command line. - * @type int|string $pid - * Service pid. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Service name. - * - * Generated from protobuf field string service_name = 1; - * @return string - */ - public function getServiceName() - { - return $this->service_name; - } - - /** - * Service name. - * - * Generated from protobuf field string service_name = 1; - * @param string $var - * @return $this - */ - public function setServiceName($var) - { - GPBUtil::checkString($var, True); - $this->service_name = $var; - - return $this; - } - - /** - * Service state (OS-agnostic). - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.RunningService.State state = 2; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Service state (OS-agnostic). - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.RunningService.State state = 2; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\MigrationCenter\V1\RunningService\State::class); - $this->state = $var; - - return $this; - } - - /** - * Service start mode (OS-agnostic). - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.RunningService.StartMode start_mode = 3; - * @return int - */ - public function getStartMode() - { - return $this->start_mode; - } - - /** - * Service start mode (OS-agnostic). - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.RunningService.StartMode start_mode = 3; - * @param int $var - * @return $this - */ - public function setStartMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\MigrationCenter\V1\RunningService\StartMode::class); - $this->start_mode = $var; - - return $this; - } - - /** - * Service binary path. - * - * Generated from protobuf field string exe_path = 4; - * @return string - */ - public function getExePath() - { - return $this->exe_path; - } - - /** - * Service binary path. - * - * Generated from protobuf field string exe_path = 4; - * @param string $var - * @return $this - */ - public function setExePath($var) - { - GPBUtil::checkString($var, True); - $this->exe_path = $var; - - return $this; - } - - /** - * Service command line. - * - * Generated from protobuf field string cmdline = 5; - * @return string - */ - public function getCmdline() - { - return $this->cmdline; - } - - /** - * Service command line. - * - * Generated from protobuf field string cmdline = 5; - * @param string $var - * @return $this - */ - public function setCmdline($var) - { - GPBUtil::checkString($var, True); - $this->cmdline = $var; - - return $this; - } - - /** - * Service pid. - * - * Generated from protobuf field int64 pid = 6; - * @return int|string - */ - public function getPid() - { - return $this->pid; - } - - /** - * Service pid. - * - * Generated from protobuf field int64 pid = 6; - * @param int|string $var - * @return $this - */ - public function setPid($var) - { - GPBUtil::checkInt64($var); - $this->pid = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/RunningService/StartMode.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/RunningService/StartMode.php deleted file mode 100644 index 76bc7f88e836..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/RunningService/StartMode.php +++ /dev/null @@ -1,85 +0,0 @@ -google.cloud.migrationcenter.v1.RunningService.StartMode - */ -class StartMode -{ - /** - * Start mode unspecified. - * - * Generated from protobuf enum START_MODE_UNSPECIFIED = 0; - */ - const START_MODE_UNSPECIFIED = 0; - /** - * The service is a device driver started by the system loader. - * - * Generated from protobuf enum BOOT = 1; - */ - const BOOT = 1; - /** - * The service is a device driver started by the IOInitSystem function. - * - * Generated from protobuf enum SYSTEM = 2; - */ - const SYSTEM = 2; - /** - * The service is started by the operating system, at system start-up - * - * Generated from protobuf enum AUTO = 3; - */ - const AUTO = 3; - /** - * The service is started only manually, by a user. - * - * Generated from protobuf enum MANUAL = 4; - */ - const MANUAL = 4; - /** - * The service is disabled. - * - * Generated from protobuf enum DISABLED = 5; - */ - const DISABLED = 5; - - private static $valueToName = [ - self::START_MODE_UNSPECIFIED => 'START_MODE_UNSPECIFIED', - self::BOOT => 'BOOT', - self::SYSTEM => 'SYSTEM', - self::AUTO => 'AUTO', - self::MANUAL => 'MANUAL', - self::DISABLED => 'DISABLED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(StartMode::class, \Google\Cloud\MigrationCenter\V1\RunningService_StartMode::class); - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/RunningService/State.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/RunningService/State.php deleted file mode 100644 index 4c55cf16bf6f..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/RunningService/State.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.migrationcenter.v1.RunningService.State - */ -class State -{ - /** - * Service state unspecified. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Service is active. - * - * Generated from protobuf enum ACTIVE = 1; - */ - const ACTIVE = 1; - /** - * Service is paused. - * - * Generated from protobuf enum PAUSED = 2; - */ - const PAUSED = 2; - /** - * Service is stopped. - * - * Generated from protobuf enum STOPPED = 3; - */ - const STOPPED = 3; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::ACTIVE => 'ACTIVE', - self::PAUSED => 'PAUSED', - self::STOPPED => 'STOPPED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\MigrationCenter\V1\RunningService_State::class); - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/RunningServiceList.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/RunningServiceList.php deleted file mode 100644 index ae8c30df576d..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/RunningServiceList.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.migrationcenter.v1.RunningServiceList - */ -class RunningServiceList extends \Google\Protobuf\Internal\Message -{ - /** - * Running service entries. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.RunningService entries = 1; - */ - private $entries; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\MigrationCenter\V1\RunningService>|\Google\Protobuf\Internal\RepeatedField $entries - * Running service entries. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Running service entries. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.RunningService entries = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEntries() - { - return $this->entries; - } - - /** - * Running service entries. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.RunningService entries = 1; - * @param array<\Google\Cloud\MigrationCenter\V1\RunningService>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEntries($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\RunningService::class); - $this->entries = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/RuntimeNetworkInfo.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/RuntimeNetworkInfo.php deleted file mode 100644 index 49549af0d98f..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/RuntimeNetworkInfo.php +++ /dev/null @@ -1,121 +0,0 @@ -google.cloud.migrationcenter.v1.RuntimeNetworkInfo - */ -class RuntimeNetworkInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Time of the last network scan. - * - * Generated from protobuf field .google.protobuf.Timestamp scan_time = 1; - */ - protected $scan_time = null; - /** - * Network connections. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.NetworkConnectionList connections = 2; - */ - protected $connections = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $scan_time - * Time of the last network scan. - * @type \Google\Cloud\MigrationCenter\V1\NetworkConnectionList $connections - * Network connections. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Time of the last network scan. - * - * Generated from protobuf field .google.protobuf.Timestamp scan_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getScanTime() - { - return $this->scan_time; - } - - public function hasScanTime() - { - return isset($this->scan_time); - } - - public function clearScanTime() - { - unset($this->scan_time); - } - - /** - * Time of the last network scan. - * - * Generated from protobuf field .google.protobuf.Timestamp scan_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setScanTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->scan_time = $var; - - return $this; - } - - /** - * Network connections. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.NetworkConnectionList connections = 2; - * @return \Google\Cloud\MigrationCenter\V1\NetworkConnectionList|null - */ - public function getConnections() - { - return $this->connections; - } - - public function hasConnections() - { - return isset($this->connections); - } - - public function clearConnections() - { - unset($this->connections); - } - - /** - * Network connections. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.NetworkConnectionList connections = 2; - * @param \Google\Cloud\MigrationCenter\V1\NetworkConnectionList $var - * @return $this - */ - public function setConnections($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\NetworkConnectionList::class); - $this->connections = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Settings.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Settings.php deleted file mode 100644 index 59797b9d8491..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Settings.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.migrationcenter.v1.Settings - */ -class Settings extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The name of the resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * The preference set used by default for a project. - * - * Generated from protobuf field string preference_set = 2 [(.google.api.resource_reference) = { - */ - protected $preference_set = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The name of the resource. - * @type string $preference_set - * The preference set used by default for a project. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The name of the resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The name of the resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The preference set used by default for a project. - * - * Generated from protobuf field string preference_set = 2 [(.google.api.resource_reference) = { - * @return string - */ - public function getPreferenceSet() - { - return $this->preference_set; - } - - /** - * The preference set used by default for a project. - * - * Generated from protobuf field string preference_set = 2 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setPreferenceSet($var) - { - GPBUtil::checkString($var, True); - $this->preference_set = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/SizingOptimizationStrategy.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/SizingOptimizationStrategy.php deleted file mode 100644 index 6ac0e00cbf69..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/SizingOptimizationStrategy.php +++ /dev/null @@ -1,74 +0,0 @@ -google.cloud.migrationcenter.v1.SizingOptimizationStrategy - */ -class SizingOptimizationStrategy -{ - /** - * Unspecified (default value). - * - * Generated from protobuf enum SIZING_OPTIMIZATION_STRATEGY_UNSPECIFIED = 0; - */ - const SIZING_OPTIMIZATION_STRATEGY_UNSPECIFIED = 0; - /** - * No optimization applied. Virtual machine sizing matches as closely as - * possible the machine shape on the source site, not considering any actual - * performance data. - * - * Generated from protobuf enum SIZING_OPTIMIZATION_STRATEGY_SAME_AS_SOURCE = 1; - */ - const SIZING_OPTIMIZATION_STRATEGY_SAME_AS_SOURCE = 1; - /** - * Virtual machine sizing will match the reported usage and shape, with some - * slack. This a good value to start with. - * - * Generated from protobuf enum SIZING_OPTIMIZATION_STRATEGY_MODERATE = 2; - */ - const SIZING_OPTIMIZATION_STRATEGY_MODERATE = 2; - /** - * Virtual machine sizing will match the reported usage, with little slack. - * Using this option can help reduce costs. - * - * Generated from protobuf enum SIZING_OPTIMIZATION_STRATEGY_AGGRESSIVE = 3; - */ - const SIZING_OPTIMIZATION_STRATEGY_AGGRESSIVE = 3; - - private static $valueToName = [ - self::SIZING_OPTIMIZATION_STRATEGY_UNSPECIFIED => 'SIZING_OPTIMIZATION_STRATEGY_UNSPECIFIED', - self::SIZING_OPTIMIZATION_STRATEGY_SAME_AS_SOURCE => 'SIZING_OPTIMIZATION_STRATEGY_SAME_AS_SOURCE', - self::SIZING_OPTIMIZATION_STRATEGY_MODERATE => 'SIZING_OPTIMIZATION_STRATEGY_MODERATE', - self::SIZING_OPTIMIZATION_STRATEGY_AGGRESSIVE => 'SIZING_OPTIMIZATION_STRATEGY_AGGRESSIVE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/SoleTenancyPreferences.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/SoleTenancyPreferences.php deleted file mode 100644 index 7d8d4bd37d34..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/SoleTenancyPreferences.php +++ /dev/null @@ -1,189 +0,0 @@ -google.cloud.migrationcenter.v1.SoleTenancyPreferences - */ -class SoleTenancyPreferences extends \Google\Protobuf\Internal\Message -{ - /** - * CPU overcommit ratio. - * Acceptable values are between 1.0 and 2.0 inclusive. - * - * Generated from protobuf field double cpu_overcommit_ratio = 1; - */ - protected $cpu_overcommit_ratio = 0.0; - /** - * Sole Tenancy nodes maintenance policy. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.SoleTenancyPreferences.HostMaintenancePolicy host_maintenance_policy = 2; - */ - protected $host_maintenance_policy = 0; - /** - * Commitment plan to consider when calculating costs for virtual machine - * insights and recommendations. - * If you are unsure which value to set, a 3 year commitment plan is often a - * good value to start with. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.SoleTenancyPreferences.CommitmentPlan commitment_plan = 3; - */ - protected $commitment_plan = 0; - /** - * A list of sole tenant node types. - * An empty list means that all possible node types will be considered. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.SoleTenantNodeType node_types = 4; - */ - private $node_types; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $cpu_overcommit_ratio - * CPU overcommit ratio. - * Acceptable values are between 1.0 and 2.0 inclusive. - * @type int $host_maintenance_policy - * Sole Tenancy nodes maintenance policy. - * @type int $commitment_plan - * Commitment plan to consider when calculating costs for virtual machine - * insights and recommendations. - * If you are unsure which value to set, a 3 year commitment plan is often a - * good value to start with. - * @type array<\Google\Cloud\MigrationCenter\V1\SoleTenantNodeType>|\Google\Protobuf\Internal\RepeatedField $node_types - * A list of sole tenant node types. - * An empty list means that all possible node types will be considered. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * CPU overcommit ratio. - * Acceptable values are between 1.0 and 2.0 inclusive. - * - * Generated from protobuf field double cpu_overcommit_ratio = 1; - * @return float - */ - public function getCpuOvercommitRatio() - { - return $this->cpu_overcommit_ratio; - } - - /** - * CPU overcommit ratio. - * Acceptable values are between 1.0 and 2.0 inclusive. - * - * Generated from protobuf field double cpu_overcommit_ratio = 1; - * @param float $var - * @return $this - */ - public function setCpuOvercommitRatio($var) - { - GPBUtil::checkDouble($var); - $this->cpu_overcommit_ratio = $var; - - return $this; - } - - /** - * Sole Tenancy nodes maintenance policy. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.SoleTenancyPreferences.HostMaintenancePolicy host_maintenance_policy = 2; - * @return int - */ - public function getHostMaintenancePolicy() - { - return $this->host_maintenance_policy; - } - - /** - * Sole Tenancy nodes maintenance policy. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.SoleTenancyPreferences.HostMaintenancePolicy host_maintenance_policy = 2; - * @param int $var - * @return $this - */ - public function setHostMaintenancePolicy($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\MigrationCenter\V1\SoleTenancyPreferences\HostMaintenancePolicy::class); - $this->host_maintenance_policy = $var; - - return $this; - } - - /** - * Commitment plan to consider when calculating costs for virtual machine - * insights and recommendations. - * If you are unsure which value to set, a 3 year commitment plan is often a - * good value to start with. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.SoleTenancyPreferences.CommitmentPlan commitment_plan = 3; - * @return int - */ - public function getCommitmentPlan() - { - return $this->commitment_plan; - } - - /** - * Commitment plan to consider when calculating costs for virtual machine - * insights and recommendations. - * If you are unsure which value to set, a 3 year commitment plan is often a - * good value to start with. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.SoleTenancyPreferences.CommitmentPlan commitment_plan = 3; - * @param int $var - * @return $this - */ - public function setCommitmentPlan($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\MigrationCenter\V1\SoleTenancyPreferences\CommitmentPlan::class); - $this->commitment_plan = $var; - - return $this; - } - - /** - * A list of sole tenant node types. - * An empty list means that all possible node types will be considered. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.SoleTenantNodeType node_types = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNodeTypes() - { - return $this->node_types; - } - - /** - * A list of sole tenant node types. - * An empty list means that all possible node types will be considered. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.SoleTenantNodeType node_types = 4; - * @param array<\Google\Cloud\MigrationCenter\V1\SoleTenantNodeType>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNodeTypes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\SoleTenantNodeType::class); - $this->node_types = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/SoleTenancyPreferences/CommitmentPlan.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/SoleTenancyPreferences/CommitmentPlan.php deleted file mode 100644 index 3a5b64cc0477..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/SoleTenancyPreferences/CommitmentPlan.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.migrationcenter.v1.SoleTenancyPreferences.CommitmentPlan - */ -class CommitmentPlan -{ - /** - * Unspecified commitment plan. - * - * Generated from protobuf enum COMMITMENT_PLAN_UNSPECIFIED = 0; - */ - const COMMITMENT_PLAN_UNSPECIFIED = 0; - /** - * No commitment plan (on-demand usage). - * - * Generated from protobuf enum ON_DEMAND = 1; - */ - const ON_DEMAND = 1; - /** - * 1 year commitment. - * - * Generated from protobuf enum COMMITMENT_1_YEAR = 2; - */ - const COMMITMENT_1_YEAR = 2; - /** - * 3 years commitment. - * - * Generated from protobuf enum COMMITMENT_3_YEAR = 3; - */ - const COMMITMENT_3_YEAR = 3; - - private static $valueToName = [ - self::COMMITMENT_PLAN_UNSPECIFIED => 'COMMITMENT_PLAN_UNSPECIFIED', - self::ON_DEMAND => 'ON_DEMAND', - self::COMMITMENT_1_YEAR => 'COMMITMENT_1_YEAR', - self::COMMITMENT_3_YEAR => 'COMMITMENT_3_YEAR', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CommitmentPlan::class, \Google\Cloud\MigrationCenter\V1\SoleTenancyPreferences_CommitmentPlan::class); - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/SoleTenancyPreferences/HostMaintenancePolicy.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/SoleTenancyPreferences/HostMaintenancePolicy.php deleted file mode 100644 index 36c62c02e8c8..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/SoleTenancyPreferences/HostMaintenancePolicy.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.migrationcenter.v1.SoleTenancyPreferences.HostMaintenancePolicy - */ -class HostMaintenancePolicy -{ - /** - * Unspecified host maintenance policy. - * - * Generated from protobuf enum HOST_MAINTENANCE_POLICY_UNSPECIFIED = 0; - */ - const HOST_MAINTENANCE_POLICY_UNSPECIFIED = 0; - /** - * Default host maintenance policy. - * - * Generated from protobuf enum HOST_MAINTENANCE_POLICY_DEFAULT = 1; - */ - const HOST_MAINTENANCE_POLICY_DEFAULT = 1; - /** - * Restart in place host maintenance policy. - * - * Generated from protobuf enum HOST_MAINTENANCE_POLICY_RESTART_IN_PLACE = 2; - */ - const HOST_MAINTENANCE_POLICY_RESTART_IN_PLACE = 2; - /** - * Migrate within node group host maintenance policy. - * - * Generated from protobuf enum HOST_MAINTENANCE_POLICY_MIGRATE_WITHIN_NODE_GROUP = 3; - */ - const HOST_MAINTENANCE_POLICY_MIGRATE_WITHIN_NODE_GROUP = 3; - - private static $valueToName = [ - self::HOST_MAINTENANCE_POLICY_UNSPECIFIED => 'HOST_MAINTENANCE_POLICY_UNSPECIFIED', - self::HOST_MAINTENANCE_POLICY_DEFAULT => 'HOST_MAINTENANCE_POLICY_DEFAULT', - self::HOST_MAINTENANCE_POLICY_RESTART_IN_PLACE => 'HOST_MAINTENANCE_POLICY_RESTART_IN_PLACE', - self::HOST_MAINTENANCE_POLICY_MIGRATE_WITHIN_NODE_GROUP => 'HOST_MAINTENANCE_POLICY_MIGRATE_WITHIN_NODE_GROUP', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(HostMaintenancePolicy::class, \Google\Cloud\MigrationCenter\V1\SoleTenancyPreferences_HostMaintenancePolicy::class); - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/SoleTenantNodeType.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/SoleTenantNodeType.php deleted file mode 100644 index de2a0dc41427..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/SoleTenantNodeType.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.migrationcenter.v1.SoleTenantNodeType - */ -class SoleTenantNodeType extends \Google\Protobuf\Internal\Message -{ - /** - * Name of the Sole Tenant node. Consult - * https://cloud.google.com/compute/docs/nodes/sole-tenant-nodes - * - * Generated from protobuf field string node_name = 1; - */ - protected $node_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $node_name - * Name of the Sole Tenant node. Consult - * https://cloud.google.com/compute/docs/nodes/sole-tenant-nodes - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Name of the Sole Tenant node. Consult - * https://cloud.google.com/compute/docs/nodes/sole-tenant-nodes - * - * Generated from protobuf field string node_name = 1; - * @return string - */ - public function getNodeName() - { - return $this->node_name; - } - - /** - * Name of the Sole Tenant node. Consult - * https://cloud.google.com/compute/docs/nodes/sole-tenant-nodes - * - * Generated from protobuf field string node_name = 1; - * @param string $var - * @return $this - */ - public function setNodeName($var) - { - GPBUtil::checkString($var, True); - $this->node_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Source.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Source.php deleted file mode 100644 index 52c94434e41e..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Source.php +++ /dev/null @@ -1,436 +0,0 @@ -google.cloud.migrationcenter.v1.Source - */ -class Source extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The full name of the source. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. The timestamp when the source was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The timestamp when the source was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * User-friendly display name. - * - * Generated from protobuf field string display_name = 4; - */ - protected $display_name = ''; - /** - * Free-text description. - * - * Generated from protobuf field string description = 5; - */ - protected $description = ''; - /** - * Data source type. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.Source.SourceType type = 6; - */ - protected $type = 0; - /** - * The information confidence of the source. - * The higher the value, the higher the confidence. - * - * Generated from protobuf field int32 priority = 7; - */ - protected $priority = 0; - /** - * If `true`, the source is managed by other service(s). - * - * Generated from protobuf field bool managed = 8; - */ - protected $managed = false; - /** - * Output only. Number of frames that are still being processed. - * - * Generated from protobuf field int32 pending_frame_count = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $pending_frame_count = 0; - /** - * Output only. The number of frames that were reported by the source and - * contained errors. - * - * Generated from protobuf field int32 error_frame_count = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $error_frame_count = 0; - /** - * Output only. The state of the source. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.Source.State state = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The full name of the source. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The timestamp when the source was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The timestamp when the source was last updated. - * @type string $display_name - * User-friendly display name. - * @type string $description - * Free-text description. - * @type int $type - * Data source type. - * @type int $priority - * The information confidence of the source. - * The higher the value, the higher the confidence. - * @type bool $managed - * If `true`, the source is managed by other service(s). - * @type int $pending_frame_count - * Output only. Number of frames that are still being processed. - * @type int $error_frame_count - * Output only. The number of frames that were reported by the source and - * contained errors. - * @type int $state - * Output only. The state of the source. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The full name of the source. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The full name of the source. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. The timestamp when the source was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The timestamp when the source was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The timestamp when the source was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The timestamp when the source was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * User-friendly display name. - * - * Generated from protobuf field string display_name = 4; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * User-friendly display name. - * - * Generated from protobuf field string display_name = 4; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Free-text description. - * - * Generated from protobuf field string description = 5; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Free-text description. - * - * Generated from protobuf field string description = 5; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Data source type. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.Source.SourceType type = 6; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Data source type. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.Source.SourceType type = 6; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\MigrationCenter\V1\Source\SourceType::class); - $this->type = $var; - - return $this; - } - - /** - * The information confidence of the source. - * The higher the value, the higher the confidence. - * - * Generated from protobuf field int32 priority = 7; - * @return int - */ - public function getPriority() - { - return $this->priority; - } - - /** - * The information confidence of the source. - * The higher the value, the higher the confidence. - * - * Generated from protobuf field int32 priority = 7; - * @param int $var - * @return $this - */ - public function setPriority($var) - { - GPBUtil::checkInt32($var); - $this->priority = $var; - - return $this; - } - - /** - * If `true`, the source is managed by other service(s). - * - * Generated from protobuf field bool managed = 8; - * @return bool - */ - public function getManaged() - { - return $this->managed; - } - - /** - * If `true`, the source is managed by other service(s). - * - * Generated from protobuf field bool managed = 8; - * @param bool $var - * @return $this - */ - public function setManaged($var) - { - GPBUtil::checkBool($var); - $this->managed = $var; - - return $this; - } - - /** - * Output only. Number of frames that are still being processed. - * - * Generated from protobuf field int32 pending_frame_count = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getPendingFrameCount() - { - return $this->pending_frame_count; - } - - /** - * Output only. Number of frames that are still being processed. - * - * Generated from protobuf field int32 pending_frame_count = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setPendingFrameCount($var) - { - GPBUtil::checkInt32($var); - $this->pending_frame_count = $var; - - return $this; - } - - /** - * Output only. The number of frames that were reported by the source and - * contained errors. - * - * Generated from protobuf field int32 error_frame_count = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getErrorFrameCount() - { - return $this->error_frame_count; - } - - /** - * Output only. The number of frames that were reported by the source and - * contained errors. - * - * Generated from protobuf field int32 error_frame_count = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setErrorFrameCount($var) - { - GPBUtil::checkInt32($var); - $this->error_frame_count = $var; - - return $this; - } - - /** - * Output only. The state of the source. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.Source.State state = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The state of the source. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.Source.State state = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\MigrationCenter\V1\Source\State::class); - $this->state = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Source/SourceType.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Source/SourceType.php deleted file mode 100644 index cfb8f6b41c2c..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Source/SourceType.php +++ /dev/null @@ -1,76 +0,0 @@ -google.cloud.migrationcenter.v1.Source.SourceType - */ -class SourceType -{ - /** - * Unspecified - * - * Generated from protobuf enum SOURCE_TYPE_UNKNOWN = 0; - */ - const SOURCE_TYPE_UNKNOWN = 0; - /** - * Manually uploaded file (e.g. CSV) - * - * Generated from protobuf enum SOURCE_TYPE_UPLOAD = 1; - */ - const SOURCE_TYPE_UPLOAD = 1; - /** - * Guest-level info - * - * Generated from protobuf enum SOURCE_TYPE_GUEST_OS_SCAN = 2; - */ - const SOURCE_TYPE_GUEST_OS_SCAN = 2; - /** - * Inventory-level scan - * - * Generated from protobuf enum SOURCE_TYPE_INVENTORY_SCAN = 3; - */ - const SOURCE_TYPE_INVENTORY_SCAN = 3; - /** - * Third-party owned sources. - * - * Generated from protobuf enum SOURCE_TYPE_CUSTOM = 4; - */ - const SOURCE_TYPE_CUSTOM = 4; - - private static $valueToName = [ - self::SOURCE_TYPE_UNKNOWN => 'SOURCE_TYPE_UNKNOWN', - self::SOURCE_TYPE_UPLOAD => 'SOURCE_TYPE_UPLOAD', - self::SOURCE_TYPE_GUEST_OS_SCAN => 'SOURCE_TYPE_GUEST_OS_SCAN', - self::SOURCE_TYPE_INVENTORY_SCAN => 'SOURCE_TYPE_INVENTORY_SCAN', - self::SOURCE_TYPE_CUSTOM => 'SOURCE_TYPE_CUSTOM', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SourceType::class, \Google\Cloud\MigrationCenter\V1\Source_SourceType::class); - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Source/State.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Source/State.php deleted file mode 100644 index 4c4a472ef5d7..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/Source/State.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.migrationcenter.v1.Source.State - */ -class State -{ - /** - * Unspecified. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The source is active and ready to be used. - * - * Generated from protobuf enum ACTIVE = 1; - */ - const ACTIVE = 1; - /** - * In the process of being deleted. - * - * Generated from protobuf enum DELETING = 2; - */ - const DELETING = 2; - /** - * Source is in an invalid state. Asset frames reported to it will be - * ignored. - * - * Generated from protobuf enum INVALID = 3; - */ - const INVALID = 3; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::ACTIVE => 'ACTIVE', - self::DELETING => 'DELETING', - self::INVALID => 'INVALID', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\MigrationCenter\V1\Source_State::class); - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/UpdateAssetRequest.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/UpdateAssetRequest.php deleted file mode 100644 index d4d95dd80c3b..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/UpdateAssetRequest.php +++ /dev/null @@ -1,235 +0,0 @@ -google.cloud.migrationcenter.v1.UpdateAssetRequest - */ -class UpdateAssetRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * `Asset` resource by the update. - * The values specified in the `update_mask` field are relative to the - * resource, not the full request. - * A field will be overwritten if it is in the mask. - * A single * value in the mask lets you to overwrite all fields. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * Required. The resource being updated. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.Asset asset = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $asset = null; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param \Google\Cloud\MigrationCenter\V1\Asset $asset Required. The resource being updated. - * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the - * `Asset` resource by the update. - * The values specified in the `update_mask` field are relative to the - * resource, not the full request. - * A field will be overwritten if it is in the mask. - * A single * value in the mask lets you to overwrite all fields. - * - * @return \Google\Cloud\MigrationCenter\V1\UpdateAssetRequest - * - * @experimental - */ - public static function build(\Google\Cloud\MigrationCenter\V1\Asset $asset, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setAsset($asset) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Field mask is used to specify the fields to be overwritten in the - * `Asset` resource by the update. - * The values specified in the `update_mask` field are relative to the - * resource, not the full request. - * A field will be overwritten if it is in the mask. - * A single * value in the mask lets you to overwrite all fields. - * @type \Google\Cloud\MigrationCenter\V1\Asset $asset - * Required. The resource being updated. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * `Asset` resource by the update. - * The values specified in the `update_mask` field are relative to the - * resource, not the full request. - * A field will be overwritten if it is in the mask. - * A single * value in the mask lets you to overwrite all fields. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * `Asset` resource by the update. - * The values specified in the `update_mask` field are relative to the - * resource, not the full request. - * A field will be overwritten if it is in the mask. - * A single * value in the mask lets you to overwrite all fields. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * Required. The resource being updated. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.Asset asset = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\MigrationCenter\V1\Asset|null - */ - public function getAsset() - { - return $this->asset; - } - - public function hasAsset() - { - return isset($this->asset); - } - - public function clearAsset() - { - unset($this->asset); - } - - /** - * Required. The resource being updated. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.Asset asset = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\MigrationCenter\V1\Asset $var - * @return $this - */ - public function setAsset($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\Asset::class); - $this->asset = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/UpdateGroupRequest.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/UpdateGroupRequest.php deleted file mode 100644 index 2630b822fcdd..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/UpdateGroupRequest.php +++ /dev/null @@ -1,230 +0,0 @@ -google.cloud.migrationcenter.v1.UpdateGroupRequest - */ -class UpdateGroupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * `Group` resource by the update. - * The values specified in the `update_mask` are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. - * A single * value in the mask lets you to overwrite all fields. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * Required. The group resource being updated. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.Group group = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $group = null; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param \Google\Cloud\MigrationCenter\V1\Group $group Required. The group resource being updated. - * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the - * `Group` resource by the update. - * The values specified in the `update_mask` are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. - * A single * value in the mask lets you to overwrite all fields. - * - * @return \Google\Cloud\MigrationCenter\V1\UpdateGroupRequest - * - * @experimental - */ - public static function build(\Google\Cloud\MigrationCenter\V1\Group $group, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setGroup($group) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Field mask is used to specify the fields to be overwritten in the - * `Group` resource by the update. - * The values specified in the `update_mask` are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. - * A single * value in the mask lets you to overwrite all fields. - * @type \Google\Cloud\MigrationCenter\V1\Group $group - * Required. The group resource being updated. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * `Group` resource by the update. - * The values specified in the `update_mask` are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. - * A single * value in the mask lets you to overwrite all fields. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * `Group` resource by the update. - * The values specified in the `update_mask` are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. - * A single * value in the mask lets you to overwrite all fields. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * Required. The group resource being updated. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.Group group = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\MigrationCenter\V1\Group|null - */ - public function getGroup() - { - return $this->group; - } - - public function hasGroup() - { - return isset($this->group); - } - - public function clearGroup() - { - unset($this->group); - } - - /** - * Required. The group resource being updated. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.Group group = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\MigrationCenter\V1\Group $var - * @return $this - */ - public function setGroup($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\Group::class); - $this->group = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/UpdateImportJobRequest.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/UpdateImportJobRequest.php deleted file mode 100644 index c5f2b56e3459..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/UpdateImportJobRequest.php +++ /dev/null @@ -1,235 +0,0 @@ -google.cloud.migrationcenter.v1.UpdateImportJobRequest - */ -class UpdateImportJobRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * `Asset` resource by the update. - * The values specified in the `update_mask` field are relative to the - * resource, not the full request. - * A field will be overwritten if it is in the mask. - * A single * value in the mask lets you to overwrite all fields. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * Required. The resource being updated - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ImportJob import_job = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $import_job = null; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param \Google\Cloud\MigrationCenter\V1\ImportJob $importJob Required. The resource being updated - * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the - * `Asset` resource by the update. - * The values specified in the `update_mask` field are relative to the - * resource, not the full request. - * A field will be overwritten if it is in the mask. - * A single * value in the mask lets you to overwrite all fields. - * - * @return \Google\Cloud\MigrationCenter\V1\UpdateImportJobRequest - * - * @experimental - */ - public static function build(\Google\Cloud\MigrationCenter\V1\ImportJob $importJob, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setImportJob($importJob) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Field mask is used to specify the fields to be overwritten in the - * `Asset` resource by the update. - * The values specified in the `update_mask` field are relative to the - * resource, not the full request. - * A field will be overwritten if it is in the mask. - * A single * value in the mask lets you to overwrite all fields. - * @type \Google\Cloud\MigrationCenter\V1\ImportJob $import_job - * Required. The resource being updated - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * `Asset` resource by the update. - * The values specified in the `update_mask` field are relative to the - * resource, not the full request. - * A field will be overwritten if it is in the mask. - * A single * value in the mask lets you to overwrite all fields. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * `Asset` resource by the update. - * The values specified in the `update_mask` field are relative to the - * resource, not the full request. - * A field will be overwritten if it is in the mask. - * A single * value in the mask lets you to overwrite all fields. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * Required. The resource being updated - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ImportJob import_job = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\MigrationCenter\V1\ImportJob|null - */ - public function getImportJob() - { - return $this->import_job; - } - - public function hasImportJob() - { - return isset($this->import_job); - } - - public function clearImportJob() - { - unset($this->import_job); - } - - /** - * Required. The resource being updated - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ImportJob import_job = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\MigrationCenter\V1\ImportJob $var - * @return $this - */ - public function setImportJob($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\ImportJob::class); - $this->import_job = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/UpdatePreferenceSetRequest.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/UpdatePreferenceSetRequest.php deleted file mode 100644 index d8661e55c657..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/UpdatePreferenceSetRequest.php +++ /dev/null @@ -1,235 +0,0 @@ -google.cloud.migrationcenter.v1.UpdatePreferenceSetRequest - */ -class UpdatePreferenceSetRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * `PreferenceSet` resource by the update. - * The values specified in the `update_mask` field are relative to the - * resource, not the full request. - * A field will be overwritten if it is in the mask. - * A single * value in the mask lets you to overwrite all fields. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * Required. The preference set resource being updated. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.PreferenceSet preference_set = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $preference_set = null; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param \Google\Cloud\MigrationCenter\V1\PreferenceSet $preferenceSet Required. The preference set resource being updated. - * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the - * `PreferenceSet` resource by the update. - * The values specified in the `update_mask` field are relative to the - * resource, not the full request. - * A field will be overwritten if it is in the mask. - * A single * value in the mask lets you to overwrite all fields. - * - * @return \Google\Cloud\MigrationCenter\V1\UpdatePreferenceSetRequest - * - * @experimental - */ - public static function build(\Google\Cloud\MigrationCenter\V1\PreferenceSet $preferenceSet, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setPreferenceSet($preferenceSet) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Field mask is used to specify the fields to be overwritten in the - * `PreferenceSet` resource by the update. - * The values specified in the `update_mask` field are relative to the - * resource, not the full request. - * A field will be overwritten if it is in the mask. - * A single * value in the mask lets you to overwrite all fields. - * @type \Google\Cloud\MigrationCenter\V1\PreferenceSet $preference_set - * Required. The preference set resource being updated. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * `PreferenceSet` resource by the update. - * The values specified in the `update_mask` field are relative to the - * resource, not the full request. - * A field will be overwritten if it is in the mask. - * A single * value in the mask lets you to overwrite all fields. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * `PreferenceSet` resource by the update. - * The values specified in the `update_mask` field are relative to the - * resource, not the full request. - * A field will be overwritten if it is in the mask. - * A single * value in the mask lets you to overwrite all fields. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * Required. The preference set resource being updated. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.PreferenceSet preference_set = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\MigrationCenter\V1\PreferenceSet|null - */ - public function getPreferenceSet() - { - return $this->preference_set; - } - - public function hasPreferenceSet() - { - return isset($this->preference_set); - } - - public function clearPreferenceSet() - { - unset($this->preference_set); - } - - /** - * Required. The preference set resource being updated. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.PreferenceSet preference_set = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\MigrationCenter\V1\PreferenceSet $var - * @return $this - */ - public function setPreferenceSet($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\PreferenceSet::class); - $this->preference_set = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/UpdateSettingsRequest.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/UpdateSettingsRequest.php deleted file mode 100644 index 54e7bb155722..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/UpdateSettingsRequest.php +++ /dev/null @@ -1,235 +0,0 @@ -google.cloud.migrationcenter.v1.UpdateSettingsRequest - */ -class UpdateSettingsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * `Settings` resource by the update. - * The values specified in the `update_mask` field are relative to the - * resource, not the full request. - * A field will be overwritten if it is in the mask. - * A single * value in the mask lets you to overwrite all fields. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * Required. The project settings resource being updated. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.Settings settings = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $settings = null; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param \Google\Cloud\MigrationCenter\V1\Settings $settings Required. The project settings resource being updated. - * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the - * `Settings` resource by the update. - * The values specified in the `update_mask` field are relative to the - * resource, not the full request. - * A field will be overwritten if it is in the mask. - * A single * value in the mask lets you to overwrite all fields. - * - * @return \Google\Cloud\MigrationCenter\V1\UpdateSettingsRequest - * - * @experimental - */ - public static function build(\Google\Cloud\MigrationCenter\V1\Settings $settings, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setSettings($settings) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Field mask is used to specify the fields to be overwritten in the - * `Settings` resource by the update. - * The values specified in the `update_mask` field are relative to the - * resource, not the full request. - * A field will be overwritten if it is in the mask. - * A single * value in the mask lets you to overwrite all fields. - * @type \Google\Cloud\MigrationCenter\V1\Settings $settings - * Required. The project settings resource being updated. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * `Settings` resource by the update. - * The values specified in the `update_mask` field are relative to the - * resource, not the full request. - * A field will be overwritten if it is in the mask. - * A single * value in the mask lets you to overwrite all fields. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * `Settings` resource by the update. - * The values specified in the `update_mask` field are relative to the - * resource, not the full request. - * A field will be overwritten if it is in the mask. - * A single * value in the mask lets you to overwrite all fields. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * Required. The project settings resource being updated. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.Settings settings = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\MigrationCenter\V1\Settings|null - */ - public function getSettings() - { - return $this->settings; - } - - public function hasSettings() - { - return isset($this->settings); - } - - public function clearSettings() - { - unset($this->settings); - } - - /** - * Required. The project settings resource being updated. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.Settings settings = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\MigrationCenter\V1\Settings $var - * @return $this - */ - public function setSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\Settings::class); - $this->settings = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/UpdateSourceRequest.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/UpdateSourceRequest.php deleted file mode 100644 index a59cbccc7e1f..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/UpdateSourceRequest.php +++ /dev/null @@ -1,235 +0,0 @@ -google.cloud.migrationcenter.v1.UpdateSourceRequest - */ -class UpdateSourceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * `Source` resource by the update. - * The values specified in the `update_mask` field are relative to the - * resource, not the full request. - * A field will be overwritten if it is in the mask. - * A single * value in the mask lets you to overwrite all fields. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * Required. The resource being updated - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.Source source = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $source = null; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param \Google\Cloud\MigrationCenter\V1\Source $source Required. The resource being updated - * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the - * `Source` resource by the update. - * The values specified in the `update_mask` field are relative to the - * resource, not the full request. - * A field will be overwritten if it is in the mask. - * A single * value in the mask lets you to overwrite all fields. - * - * @return \Google\Cloud\MigrationCenter\V1\UpdateSourceRequest - * - * @experimental - */ - public static function build(\Google\Cloud\MigrationCenter\V1\Source $source, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setSource($source) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Field mask is used to specify the fields to be overwritten in the - * `Source` resource by the update. - * The values specified in the `update_mask` field are relative to the - * resource, not the full request. - * A field will be overwritten if it is in the mask. - * A single * value in the mask lets you to overwrite all fields. - * @type \Google\Cloud\MigrationCenter\V1\Source $source - * Required. The resource being updated - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * `Source` resource by the update. - * The values specified in the `update_mask` field are relative to the - * resource, not the full request. - * A field will be overwritten if it is in the mask. - * A single * value in the mask lets you to overwrite all fields. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * `Source` resource by the update. - * The values specified in the `update_mask` field are relative to the - * resource, not the full request. - * A field will be overwritten if it is in the mask. - * A single * value in the mask lets you to overwrite all fields. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * Required. The resource being updated - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.Source source = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\MigrationCenter\V1\Source|null - */ - public function getSource() - { - return $this->source; - } - - public function hasSource() - { - return isset($this->source); - } - - public function clearSource() - { - unset($this->source); - } - - /** - * Required. The resource being updated - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.Source source = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\MigrationCenter\V1\Source $var - * @return $this - */ - public function setSource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\Source::class); - $this->source = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/UploadFileInfo.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/UploadFileInfo.php deleted file mode 100644 index 928e161e6d41..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/UploadFileInfo.php +++ /dev/null @@ -1,145 +0,0 @@ -google.cloud.migrationcenter.v1.UploadFileInfo - */ -class UploadFileInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Upload URI for the file. - * - * Generated from protobuf field string signed_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $signed_uri = ''; - /** - * Output only. The headers that were used to sign the URI. - * - * Generated from protobuf field map headers = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $headers; - /** - * Output only. Expiration time of the upload URI. - * - * Generated from protobuf field .google.protobuf.Timestamp uri_expiration_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uri_expiration_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $signed_uri - * Output only. Upload URI for the file. - * @type array|\Google\Protobuf\Internal\MapField $headers - * Output only. The headers that were used to sign the URI. - * @type \Google\Protobuf\Timestamp $uri_expiration_time - * Output only. Expiration time of the upload URI. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Upload URI for the file. - * - * Generated from protobuf field string signed_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getSignedUri() - { - return $this->signed_uri; - } - - /** - * Output only. Upload URI for the file. - * - * Generated from protobuf field string signed_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setSignedUri($var) - { - GPBUtil::checkString($var, True); - $this->signed_uri = $var; - - return $this; - } - - /** - * Output only. The headers that were used to sign the URI. - * - * Generated from protobuf field map headers = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getHeaders() - { - return $this->headers; - } - - /** - * Output only. The headers that were used to sign the URI. - * - * Generated from protobuf field map headers = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setHeaders($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->headers = $arr; - - return $this; - } - - /** - * Output only. Expiration time of the upload URI. - * - * Generated from protobuf field .google.protobuf.Timestamp uri_expiration_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUriExpirationTime() - { - return $this->uri_expiration_time; - } - - public function hasUriExpirationTime() - { - return isset($this->uri_expiration_time); - } - - public function clearUriExpirationTime() - { - unset($this->uri_expiration_time); - } - - /** - * Output only. Expiration time of the upload URI. - * - * Generated from protobuf field .google.protobuf.Timestamp uri_expiration_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUriExpirationTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->uri_expiration_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ValidateImportJobRequest.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ValidateImportJobRequest.php deleted file mode 100644 index 29b792d20ee1..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ValidateImportJobRequest.php +++ /dev/null @@ -1,155 +0,0 @@ -google.cloud.migrationcenter.v1.ValidateImportJobRequest - */ -class ValidateImportJobRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the import job to validate. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param string $name Required. The name of the import job to validate. Please see - * {@see MigrationCenterClient::importJobName()} for help formatting this field. - * - * @return \Google\Cloud\MigrationCenter\V1\ValidateImportJobRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the import job to validate. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the import job to validate. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the import job to validate. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ValidationReport.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ValidationReport.php deleted file mode 100644 index 997d13c8228f..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/ValidationReport.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.migrationcenter.v1.ValidationReport - */ -class ValidationReport extends \Google\Protobuf\Internal\Message -{ - /** - * List of errors found in files. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.FileValidationReport file_validations = 1; - */ - private $file_validations; - /** - * List of job level errors. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ImportError job_errors = 2; - */ - private $job_errors; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\MigrationCenter\V1\FileValidationReport>|\Google\Protobuf\Internal\RepeatedField $file_validations - * List of errors found in files. - * @type array<\Google\Cloud\MigrationCenter\V1\ImportError>|\Google\Protobuf\Internal\RepeatedField $job_errors - * List of job level errors. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * List of errors found in files. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.FileValidationReport file_validations = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFileValidations() - { - return $this->file_validations; - } - - /** - * List of errors found in files. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.FileValidationReport file_validations = 1; - * @param array<\Google\Cloud\MigrationCenter\V1\FileValidationReport>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFileValidations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\FileValidationReport::class); - $this->file_validations = $arr; - - return $this; - } - - /** - * List of job level errors. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ImportError job_errors = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getJobErrors() - { - return $this->job_errors; - } - - /** - * List of job level errors. - * - * Generated from protobuf field repeated .google.cloud.migrationcenter.v1.ImportError job_errors = 2; - * @param array<\Google\Cloud\MigrationCenter\V1\ImportError>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setJobErrors($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\MigrationCenter\V1\ImportError::class); - $this->job_errors = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/VirtualMachinePreferences.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/VirtualMachinePreferences.php deleted file mode 100644 index 8bcad9ff0e45..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/VirtualMachinePreferences.php +++ /dev/null @@ -1,366 +0,0 @@ -google.cloud.migrationcenter.v1.VirtualMachinePreferences - */ -class VirtualMachinePreferences extends \Google\Protobuf\Internal\Message -{ - /** - * Target product for assets using this preference set. - * Specify either target product or business goal, but - * not both. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ComputeMigrationTargetProduct target_product = 2; - */ - protected $target_product = 0; - /** - * Region preferences for assets using this preference set. - * If you are unsure which value to set, the migration service API region is - * often a good value to start with. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.RegionPreferences region_preferences = 3; - */ - protected $region_preferences = null; - /** - * Commitment plan to consider when calculating costs for virtual machine - * insights and recommendations. - * If you are unsure which value to set, a 3 year commitment plan is often a - * good value to start with. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.CommitmentPlan commitment_plan = 4; - */ - protected $commitment_plan = 0; - /** - * Sizing optimization strategy specifies the preferred strategy used when - * extrapolating usage data to calculate insights and recommendations for a - * virtual machine. - * If you are unsure which value to set, a moderate sizing optimization - * strategy is often a good value to start with. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.SizingOptimizationStrategy sizing_optimization_strategy = 5; - */ - protected $sizing_optimization_strategy = 0; - /** - * Compute Engine preferences concern insights and recommendations for Compute - * Engine target. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ComputeEnginePreferences compute_engine_preferences = 6; - */ - protected $compute_engine_preferences = null; - /** - * Preferences concerning insights and recommendations for - * Google Cloud VMware Engine. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.VmwareEnginePreferences vmware_engine_preferences = 7; - */ - protected $vmware_engine_preferences = null; - /** - * Preferences concerning Sole Tenant nodes and virtual machines. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.SoleTenancyPreferences sole_tenancy_preferences = 8; - */ - protected $sole_tenancy_preferences = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $target_product - * Target product for assets using this preference set. - * Specify either target product or business goal, but - * not both. - * @type \Google\Cloud\MigrationCenter\V1\RegionPreferences $region_preferences - * Region preferences for assets using this preference set. - * If you are unsure which value to set, the migration service API region is - * often a good value to start with. - * @type int $commitment_plan - * Commitment plan to consider when calculating costs for virtual machine - * insights and recommendations. - * If you are unsure which value to set, a 3 year commitment plan is often a - * good value to start with. - * @type int $sizing_optimization_strategy - * Sizing optimization strategy specifies the preferred strategy used when - * extrapolating usage data to calculate insights and recommendations for a - * virtual machine. - * If you are unsure which value to set, a moderate sizing optimization - * strategy is often a good value to start with. - * @type \Google\Cloud\MigrationCenter\V1\ComputeEnginePreferences $compute_engine_preferences - * Compute Engine preferences concern insights and recommendations for Compute - * Engine target. - * @type \Google\Cloud\MigrationCenter\V1\VmwareEnginePreferences $vmware_engine_preferences - * Preferences concerning insights and recommendations for - * Google Cloud VMware Engine. - * @type \Google\Cloud\MigrationCenter\V1\SoleTenancyPreferences $sole_tenancy_preferences - * Preferences concerning Sole Tenant nodes and virtual machines. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * Target product for assets using this preference set. - * Specify either target product or business goal, but - * not both. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ComputeMigrationTargetProduct target_product = 2; - * @return int - */ - public function getTargetProduct() - { - return $this->target_product; - } - - /** - * Target product for assets using this preference set. - * Specify either target product or business goal, but - * not both. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ComputeMigrationTargetProduct target_product = 2; - * @param int $var - * @return $this - */ - public function setTargetProduct($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\MigrationCenter\V1\ComputeMigrationTargetProduct::class); - $this->target_product = $var; - - return $this; - } - - /** - * Region preferences for assets using this preference set. - * If you are unsure which value to set, the migration service API region is - * often a good value to start with. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.RegionPreferences region_preferences = 3; - * @return \Google\Cloud\MigrationCenter\V1\RegionPreferences|null - */ - public function getRegionPreferences() - { - return $this->region_preferences; - } - - public function hasRegionPreferences() - { - return isset($this->region_preferences); - } - - public function clearRegionPreferences() - { - unset($this->region_preferences); - } - - /** - * Region preferences for assets using this preference set. - * If you are unsure which value to set, the migration service API region is - * often a good value to start with. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.RegionPreferences region_preferences = 3; - * @param \Google\Cloud\MigrationCenter\V1\RegionPreferences $var - * @return $this - */ - public function setRegionPreferences($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\RegionPreferences::class); - $this->region_preferences = $var; - - return $this; - } - - /** - * Commitment plan to consider when calculating costs for virtual machine - * insights and recommendations. - * If you are unsure which value to set, a 3 year commitment plan is often a - * good value to start with. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.CommitmentPlan commitment_plan = 4; - * @return int - */ - public function getCommitmentPlan() - { - return $this->commitment_plan; - } - - /** - * Commitment plan to consider when calculating costs for virtual machine - * insights and recommendations. - * If you are unsure which value to set, a 3 year commitment plan is often a - * good value to start with. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.CommitmentPlan commitment_plan = 4; - * @param int $var - * @return $this - */ - public function setCommitmentPlan($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\MigrationCenter\V1\CommitmentPlan::class); - $this->commitment_plan = $var; - - return $this; - } - - /** - * Sizing optimization strategy specifies the preferred strategy used when - * extrapolating usage data to calculate insights and recommendations for a - * virtual machine. - * If you are unsure which value to set, a moderate sizing optimization - * strategy is often a good value to start with. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.SizingOptimizationStrategy sizing_optimization_strategy = 5; - * @return int - */ - public function getSizingOptimizationStrategy() - { - return $this->sizing_optimization_strategy; - } - - /** - * Sizing optimization strategy specifies the preferred strategy used when - * extrapolating usage data to calculate insights and recommendations for a - * virtual machine. - * If you are unsure which value to set, a moderate sizing optimization - * strategy is often a good value to start with. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.SizingOptimizationStrategy sizing_optimization_strategy = 5; - * @param int $var - * @return $this - */ - public function setSizingOptimizationStrategy($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\MigrationCenter\V1\SizingOptimizationStrategy::class); - $this->sizing_optimization_strategy = $var; - - return $this; - } - - /** - * Compute Engine preferences concern insights and recommendations for Compute - * Engine target. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ComputeEnginePreferences compute_engine_preferences = 6; - * @return \Google\Cloud\MigrationCenter\V1\ComputeEnginePreferences|null - */ - public function getComputeEnginePreferences() - { - return $this->compute_engine_preferences; - } - - public function hasComputeEnginePreferences() - { - return isset($this->compute_engine_preferences); - } - - public function clearComputeEnginePreferences() - { - unset($this->compute_engine_preferences); - } - - /** - * Compute Engine preferences concern insights and recommendations for Compute - * Engine target. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.ComputeEnginePreferences compute_engine_preferences = 6; - * @param \Google\Cloud\MigrationCenter\V1\ComputeEnginePreferences $var - * @return $this - */ - public function setComputeEnginePreferences($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\ComputeEnginePreferences::class); - $this->compute_engine_preferences = $var; - - return $this; - } - - /** - * Preferences concerning insights and recommendations for - * Google Cloud VMware Engine. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.VmwareEnginePreferences vmware_engine_preferences = 7; - * @return \Google\Cloud\MigrationCenter\V1\VmwareEnginePreferences|null - */ - public function getVmwareEnginePreferences() - { - return $this->vmware_engine_preferences; - } - - public function hasVmwareEnginePreferences() - { - return isset($this->vmware_engine_preferences); - } - - public function clearVmwareEnginePreferences() - { - unset($this->vmware_engine_preferences); - } - - /** - * Preferences concerning insights and recommendations for - * Google Cloud VMware Engine. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.VmwareEnginePreferences vmware_engine_preferences = 7; - * @param \Google\Cloud\MigrationCenter\V1\VmwareEnginePreferences $var - * @return $this - */ - public function setVmwareEnginePreferences($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\VmwareEnginePreferences::class); - $this->vmware_engine_preferences = $var; - - return $this; - } - - /** - * Preferences concerning Sole Tenant nodes and virtual machines. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.SoleTenancyPreferences sole_tenancy_preferences = 8; - * @return \Google\Cloud\MigrationCenter\V1\SoleTenancyPreferences|null - */ - public function getSoleTenancyPreferences() - { - return $this->sole_tenancy_preferences; - } - - public function hasSoleTenancyPreferences() - { - return isset($this->sole_tenancy_preferences); - } - - public function clearSoleTenancyPreferences() - { - unset($this->sole_tenancy_preferences); - } - - /** - * Preferences concerning Sole Tenant nodes and virtual machines. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.SoleTenancyPreferences sole_tenancy_preferences = 8; - * @param \Google\Cloud\MigrationCenter\V1\SoleTenancyPreferences $var - * @return $this - */ - public function setSoleTenancyPreferences($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\MigrationCenter\V1\SoleTenancyPreferences::class); - $this->sole_tenancy_preferences = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/VmwareDiskConfig.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/VmwareDiskConfig.php deleted file mode 100644 index ae83912c74aa..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/VmwareDiskConfig.php +++ /dev/null @@ -1,169 +0,0 @@ -google.cloud.migrationcenter.v1.VmwareDiskConfig - */ -class VmwareDiskConfig extends \Google\Protobuf\Internal\Message -{ - /** - * VMDK backing type. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.VmwareDiskConfig.BackingType backing_type = 1; - */ - protected $backing_type = 0; - /** - * Is VMDK shared with other VMs. - * - * Generated from protobuf field bool shared = 2; - */ - protected $shared = false; - /** - * VMDK disk mode. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.VmwareDiskConfig.VmdkMode vmdk_mode = 3; - */ - protected $vmdk_mode = 0; - /** - * RDM compatibility mode. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.VmwareDiskConfig.RdmCompatibility rdm_compatibility = 4; - */ - protected $rdm_compatibility = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $backing_type - * VMDK backing type. - * @type bool $shared - * Is VMDK shared with other VMs. - * @type int $vmdk_mode - * VMDK disk mode. - * @type int $rdm_compatibility - * RDM compatibility mode. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * VMDK backing type. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.VmwareDiskConfig.BackingType backing_type = 1; - * @return int - */ - public function getBackingType() - { - return $this->backing_type; - } - - /** - * VMDK backing type. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.VmwareDiskConfig.BackingType backing_type = 1; - * @param int $var - * @return $this - */ - public function setBackingType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\MigrationCenter\V1\VmwareDiskConfig\BackingType::class); - $this->backing_type = $var; - - return $this; - } - - /** - * Is VMDK shared with other VMs. - * - * Generated from protobuf field bool shared = 2; - * @return bool - */ - public function getShared() - { - return $this->shared; - } - - /** - * Is VMDK shared with other VMs. - * - * Generated from protobuf field bool shared = 2; - * @param bool $var - * @return $this - */ - public function setShared($var) - { - GPBUtil::checkBool($var); - $this->shared = $var; - - return $this; - } - - /** - * VMDK disk mode. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.VmwareDiskConfig.VmdkMode vmdk_mode = 3; - * @return int - */ - public function getVmdkMode() - { - return $this->vmdk_mode; - } - - /** - * VMDK disk mode. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.VmwareDiskConfig.VmdkMode vmdk_mode = 3; - * @param int $var - * @return $this - */ - public function setVmdkMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\MigrationCenter\V1\VmwareDiskConfig\VmdkMode::class); - $this->vmdk_mode = $var; - - return $this; - } - - /** - * RDM compatibility mode. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.VmwareDiskConfig.RdmCompatibility rdm_compatibility = 4; - * @return int - */ - public function getRdmCompatibility() - { - return $this->rdm_compatibility; - } - - /** - * RDM compatibility mode. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.VmwareDiskConfig.RdmCompatibility rdm_compatibility = 4; - * @param int $var - * @return $this - */ - public function setRdmCompatibility($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\MigrationCenter\V1\VmwareDiskConfig\RdmCompatibility::class); - $this->rdm_compatibility = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/VmwareDiskConfig/BackingType.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/VmwareDiskConfig/BackingType.php deleted file mode 100644 index 1b22c3b4e692..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/VmwareDiskConfig/BackingType.php +++ /dev/null @@ -1,106 +0,0 @@ -google.cloud.migrationcenter.v1.VmwareDiskConfig.BackingType - */ -class BackingType -{ - /** - * Default value. - * - * Generated from protobuf enum BACKING_TYPE_UNSPECIFIED = 0; - */ - const BACKING_TYPE_UNSPECIFIED = 0; - /** - * Flat v1. - * - * Generated from protobuf enum BACKING_TYPE_FLAT_V1 = 1; - */ - const BACKING_TYPE_FLAT_V1 = 1; - /** - * Flat v2. - * - * Generated from protobuf enum BACKING_TYPE_FLAT_V2 = 2; - */ - const BACKING_TYPE_FLAT_V2 = 2; - /** - * Persistent memory, also known as Non-Volatile Memory (NVM). - * - * Generated from protobuf enum BACKING_TYPE_PMEM = 3; - */ - const BACKING_TYPE_PMEM = 3; - /** - * Raw Disk Memory v1. - * - * Generated from protobuf enum BACKING_TYPE_RDM_V1 = 4; - */ - const BACKING_TYPE_RDM_V1 = 4; - /** - * Raw Disk Memory v2. - * - * Generated from protobuf enum BACKING_TYPE_RDM_V2 = 5; - */ - const BACKING_TYPE_RDM_V2 = 5; - /** - * SEsparse is a snapshot format introduced in vSphere 5.5 for large disks. - * - * Generated from protobuf enum BACKING_TYPE_SESPARSE = 6; - */ - const BACKING_TYPE_SESPARSE = 6; - /** - * SEsparse v1. - * - * Generated from protobuf enum BACKING_TYPE_SESPARSE_V1 = 7; - */ - const BACKING_TYPE_SESPARSE_V1 = 7; - /** - * SEsparse v1. - * - * Generated from protobuf enum BACKING_TYPE_SESPARSE_V2 = 8; - */ - const BACKING_TYPE_SESPARSE_V2 = 8; - - private static $valueToName = [ - self::BACKING_TYPE_UNSPECIFIED => 'BACKING_TYPE_UNSPECIFIED', - self::BACKING_TYPE_FLAT_V1 => 'BACKING_TYPE_FLAT_V1', - self::BACKING_TYPE_FLAT_V2 => 'BACKING_TYPE_FLAT_V2', - self::BACKING_TYPE_PMEM => 'BACKING_TYPE_PMEM', - self::BACKING_TYPE_RDM_V1 => 'BACKING_TYPE_RDM_V1', - self::BACKING_TYPE_RDM_V2 => 'BACKING_TYPE_RDM_V2', - self::BACKING_TYPE_SESPARSE => 'BACKING_TYPE_SESPARSE', - self::BACKING_TYPE_SESPARSE_V1 => 'BACKING_TYPE_SESPARSE_V1', - self::BACKING_TYPE_SESPARSE_V2 => 'BACKING_TYPE_SESPARSE_V2', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(BackingType::class, \Google\Cloud\MigrationCenter\V1\VmwareDiskConfig_BackingType::class); - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/VmwareDiskConfig/RdmCompatibility.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/VmwareDiskConfig/RdmCompatibility.php deleted file mode 100644 index ff224da8e130..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/VmwareDiskConfig/RdmCompatibility.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.migrationcenter.v1.VmwareDiskConfig.RdmCompatibility - */ -class RdmCompatibility -{ - /** - * Compatibility mode unspecified or unknown. - * - * Generated from protobuf enum RDM_COMPATIBILITY_UNSPECIFIED = 0; - */ - const RDM_COMPATIBILITY_UNSPECIFIED = 0; - /** - * Physical compatibility mode. - * - * Generated from protobuf enum PHYSICAL_COMPATIBILITY = 1; - */ - const PHYSICAL_COMPATIBILITY = 1; - /** - * Virtual compatibility mode. - * - * Generated from protobuf enum VIRTUAL_COMPATIBILITY = 2; - */ - const VIRTUAL_COMPATIBILITY = 2; - - private static $valueToName = [ - self::RDM_COMPATIBILITY_UNSPECIFIED => 'RDM_COMPATIBILITY_UNSPECIFIED', - self::PHYSICAL_COMPATIBILITY => 'PHYSICAL_COMPATIBILITY', - self::VIRTUAL_COMPATIBILITY => 'VIRTUAL_COMPATIBILITY', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(RdmCompatibility::class, \Google\Cloud\MigrationCenter\V1\VmwareDiskConfig_RdmCompatibility::class); - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/VmwareDiskConfig/VmdkMode.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/VmwareDiskConfig/VmdkMode.php deleted file mode 100644 index 808f36b21778..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/VmwareDiskConfig/VmdkMode.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.migrationcenter.v1.VmwareDiskConfig.VmdkMode - */ -class VmdkMode -{ - /** - * VMDK disk mode unspecified or unknown. - * - * Generated from protobuf enum VMDK_MODE_UNSPECIFIED = 0; - */ - const VMDK_MODE_UNSPECIFIED = 0; - /** - * Dependent disk mode. - * - * Generated from protobuf enum DEPENDENT = 1; - */ - const DEPENDENT = 1; - /** - * Independent - Persistent disk mode. - * - * Generated from protobuf enum INDEPENDENT_PERSISTENT = 2; - */ - const INDEPENDENT_PERSISTENT = 2; - /** - * Independent - Nonpersistent disk mode. - * - * Generated from protobuf enum INDEPENDENT_NONPERSISTENT = 3; - */ - const INDEPENDENT_NONPERSISTENT = 3; - - private static $valueToName = [ - self::VMDK_MODE_UNSPECIFIED => 'VMDK_MODE_UNSPECIFIED', - self::DEPENDENT => 'DEPENDENT', - self::INDEPENDENT_PERSISTENT => 'INDEPENDENT_PERSISTENT', - self::INDEPENDENT_NONPERSISTENT => 'INDEPENDENT_NONPERSISTENT', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(VmdkMode::class, \Google\Cloud\MigrationCenter\V1\VmwareDiskConfig_VmdkMode::class); - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/VmwareEnginePreferences.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/VmwareEnginePreferences.php deleted file mode 100644 index bad6fe515a83..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/VmwareEnginePreferences.php +++ /dev/null @@ -1,217 +0,0 @@ -google.cloud.migrationcenter.v1.VmwareEnginePreferences - */ -class VmwareEnginePreferences extends \Google\Protobuf\Internal\Message -{ - /** - * CPU overcommit ratio. - * Acceptable values are between 1.0 and 8.0, with 0.1 increment. - * - * Generated from protobuf field double cpu_overcommit_ratio = 1; - */ - protected $cpu_overcommit_ratio = 0.0; - /** - * Memory overcommit ratio. - * Acceptable values are 1.0, 1.25, 1.5, 1.75 and 2.0. - * - * Generated from protobuf field double memory_overcommit_ratio = 2; - */ - protected $memory_overcommit_ratio = 0.0; - /** - * The Deduplication and Compression ratio is based on the logical (Used - * Before) space required to store data before applying deduplication and - * compression, in relation to the physical (Used After) space required after - * applying deduplication and compression. Specifically, the ratio is the Used - * Before space divided by the Used After space. For example, if the Used - * Before space is 3 GB, but the physical Used After space is 1 GB, the - * deduplication and compression ratio is 3x. Acceptable values are - * between 1.0 and 4.0. - * - * Generated from protobuf field double storage_deduplication_compression_ratio = 3; - */ - protected $storage_deduplication_compression_ratio = 0.0; - /** - * Commitment plan to consider when calculating costs for virtual machine - * insights and recommendations. - * If you are unsure which value to set, a 3 year commitment plan is often a - * good value to start with. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.VmwareEnginePreferences.CommitmentPlan commitment_plan = 4; - */ - protected $commitment_plan = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $cpu_overcommit_ratio - * CPU overcommit ratio. - * Acceptable values are between 1.0 and 8.0, with 0.1 increment. - * @type float $memory_overcommit_ratio - * Memory overcommit ratio. - * Acceptable values are 1.0, 1.25, 1.5, 1.75 and 2.0. - * @type float $storage_deduplication_compression_ratio - * The Deduplication and Compression ratio is based on the logical (Used - * Before) space required to store data before applying deduplication and - * compression, in relation to the physical (Used After) space required after - * applying deduplication and compression. Specifically, the ratio is the Used - * Before space divided by the Used After space. For example, if the Used - * Before space is 3 GB, but the physical Used After space is 1 GB, the - * deduplication and compression ratio is 3x. Acceptable values are - * between 1.0 and 4.0. - * @type int $commitment_plan - * Commitment plan to consider when calculating costs for virtual machine - * insights and recommendations. - * If you are unsure which value to set, a 3 year commitment plan is often a - * good value to start with. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * CPU overcommit ratio. - * Acceptable values are between 1.0 and 8.0, with 0.1 increment. - * - * Generated from protobuf field double cpu_overcommit_ratio = 1; - * @return float - */ - public function getCpuOvercommitRatio() - { - return $this->cpu_overcommit_ratio; - } - - /** - * CPU overcommit ratio. - * Acceptable values are between 1.0 and 8.0, with 0.1 increment. - * - * Generated from protobuf field double cpu_overcommit_ratio = 1; - * @param float $var - * @return $this - */ - public function setCpuOvercommitRatio($var) - { - GPBUtil::checkDouble($var); - $this->cpu_overcommit_ratio = $var; - - return $this; - } - - /** - * Memory overcommit ratio. - * Acceptable values are 1.0, 1.25, 1.5, 1.75 and 2.0. - * - * Generated from protobuf field double memory_overcommit_ratio = 2; - * @return float - */ - public function getMemoryOvercommitRatio() - { - return $this->memory_overcommit_ratio; - } - - /** - * Memory overcommit ratio. - * Acceptable values are 1.0, 1.25, 1.5, 1.75 and 2.0. - * - * Generated from protobuf field double memory_overcommit_ratio = 2; - * @param float $var - * @return $this - */ - public function setMemoryOvercommitRatio($var) - { - GPBUtil::checkDouble($var); - $this->memory_overcommit_ratio = $var; - - return $this; - } - - /** - * The Deduplication and Compression ratio is based on the logical (Used - * Before) space required to store data before applying deduplication and - * compression, in relation to the physical (Used After) space required after - * applying deduplication and compression. Specifically, the ratio is the Used - * Before space divided by the Used After space. For example, if the Used - * Before space is 3 GB, but the physical Used After space is 1 GB, the - * deduplication and compression ratio is 3x. Acceptable values are - * between 1.0 and 4.0. - * - * Generated from protobuf field double storage_deduplication_compression_ratio = 3; - * @return float - */ - public function getStorageDeduplicationCompressionRatio() - { - return $this->storage_deduplication_compression_ratio; - } - - /** - * The Deduplication and Compression ratio is based on the logical (Used - * Before) space required to store data before applying deduplication and - * compression, in relation to the physical (Used After) space required after - * applying deduplication and compression. Specifically, the ratio is the Used - * Before space divided by the Used After space. For example, if the Used - * Before space is 3 GB, but the physical Used After space is 1 GB, the - * deduplication and compression ratio is 3x. Acceptable values are - * between 1.0 and 4.0. - * - * Generated from protobuf field double storage_deduplication_compression_ratio = 3; - * @param float $var - * @return $this - */ - public function setStorageDeduplicationCompressionRatio($var) - { - GPBUtil::checkDouble($var); - $this->storage_deduplication_compression_ratio = $var; - - return $this; - } - - /** - * Commitment plan to consider when calculating costs for virtual machine - * insights and recommendations. - * If you are unsure which value to set, a 3 year commitment plan is often a - * good value to start with. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.VmwareEnginePreferences.CommitmentPlan commitment_plan = 4; - * @return int - */ - public function getCommitmentPlan() - { - return $this->commitment_plan; - } - - /** - * Commitment plan to consider when calculating costs for virtual machine - * insights and recommendations. - * If you are unsure which value to set, a 3 year commitment plan is often a - * good value to start with. - * - * Generated from protobuf field .google.cloud.migrationcenter.v1.VmwareEnginePreferences.CommitmentPlan commitment_plan = 4; - * @param int $var - * @return $this - */ - public function setCommitmentPlan($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\MigrationCenter\V1\VmwareEnginePreferences\CommitmentPlan::class); - $this->commitment_plan = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/VmwareEnginePreferences/CommitmentPlan.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/VmwareEnginePreferences/CommitmentPlan.php deleted file mode 100644 index 6f7f3204713f..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/VmwareEnginePreferences/CommitmentPlan.php +++ /dev/null @@ -1,85 +0,0 @@ -google.cloud.migrationcenter.v1.VmwareEnginePreferences.CommitmentPlan - */ -class CommitmentPlan -{ - /** - * Unspecified commitment plan. - * - * Generated from protobuf enum COMMITMENT_PLAN_UNSPECIFIED = 0; - */ - const COMMITMENT_PLAN_UNSPECIFIED = 0; - /** - * No commitment plan (on-demand usage). - * - * Generated from protobuf enum ON_DEMAND = 1; - */ - const ON_DEMAND = 1; - /** - * 1 year commitment (monthly payments). - * - * Generated from protobuf enum COMMITMENT_1_YEAR_MONTHLY_PAYMENTS = 2; - */ - const COMMITMENT_1_YEAR_MONTHLY_PAYMENTS = 2; - /** - * 3 year commitment (monthly payments). - * - * Generated from protobuf enum COMMITMENT_3_YEAR_MONTHLY_PAYMENTS = 3; - */ - const COMMITMENT_3_YEAR_MONTHLY_PAYMENTS = 3; - /** - * 1 year commitment (upfront payment). - * - * Generated from protobuf enum COMMITMENT_1_YEAR_UPFRONT_PAYMENT = 4; - */ - const COMMITMENT_1_YEAR_UPFRONT_PAYMENT = 4; - /** - * 3 years commitment (upfront payment). - * - * Generated from protobuf enum COMMITMENT_3_YEAR_UPFRONT_PAYMENT = 5; - */ - const COMMITMENT_3_YEAR_UPFRONT_PAYMENT = 5; - - private static $valueToName = [ - self::COMMITMENT_PLAN_UNSPECIFIED => 'COMMITMENT_PLAN_UNSPECIFIED', - self::ON_DEMAND => 'ON_DEMAND', - self::COMMITMENT_1_YEAR_MONTHLY_PAYMENTS => 'COMMITMENT_1_YEAR_MONTHLY_PAYMENTS', - self::COMMITMENT_3_YEAR_MONTHLY_PAYMENTS => 'COMMITMENT_3_YEAR_MONTHLY_PAYMENTS', - self::COMMITMENT_1_YEAR_UPFRONT_PAYMENT => 'COMMITMENT_1_YEAR_UPFRONT_PAYMENT', - self::COMMITMENT_3_YEAR_UPFRONT_PAYMENT => 'COMMITMENT_3_YEAR_UPFRONT_PAYMENT', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CommitmentPlan::class, \Google\Cloud\MigrationCenter\V1\VmwareEnginePreferences_CommitmentPlan::class); - diff --git a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/VmwarePlatformDetails.php b/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/VmwarePlatformDetails.php deleted file mode 100644 index 45c08c9c3398..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/proto/src/Google/Cloud/MigrationCenter/V1/VmwarePlatformDetails.php +++ /dev/null @@ -1,241 +0,0 @@ -google.cloud.migrationcenter.v1.VmwarePlatformDetails - */ -class VmwarePlatformDetails extends \Google\Protobuf\Internal\Message -{ - /** - * vCenter version. - * - * Generated from protobuf field string vcenter_version = 1; - */ - protected $vcenter_version = ''; - /** - * ESX version. - * - * Generated from protobuf field string esx_version = 2; - */ - protected $esx_version = ''; - /** - * VMware os enum - - * https://vdc-repo.vmware.com/vmwb-repository/dcr-public/da47f910-60ac-438b-8b9b-6122f4d14524/16b7274a-bf8b-4b4c-a05e-746f2aa93c8c/doc/vim.vm.GuestOsDescriptor.GuestOsIdentifier.html. - * - * Generated from protobuf field string osid = 3; - */ - protected $osid = ''; - /** - * Folder name in vCenter where asset resides. - * - * Generated from protobuf field string vcenter_folder = 4; - */ - protected $vcenter_folder = ''; - /** - * vCenter URI used in collection. - * - * Generated from protobuf field string vcenter_uri = 5; - */ - protected $vcenter_uri = ''; - /** - * vCenter VM ID. - * - * Generated from protobuf field string vcenter_vm_id = 6; - */ - protected $vcenter_vm_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $vcenter_version - * vCenter version. - * @type string $esx_version - * ESX version. - * @type string $osid - * VMware os enum - - * https://vdc-repo.vmware.com/vmwb-repository/dcr-public/da47f910-60ac-438b-8b9b-6122f4d14524/16b7274a-bf8b-4b4c-a05e-746f2aa93c8c/doc/vim.vm.GuestOsDescriptor.GuestOsIdentifier.html. - * @type string $vcenter_folder - * Folder name in vCenter where asset resides. - * @type string $vcenter_uri - * vCenter URI used in collection. - * @type string $vcenter_vm_id - * vCenter VM ID. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Migrationcenter\V1\Migrationcenter::initOnce(); - parent::__construct($data); - } - - /** - * vCenter version. - * - * Generated from protobuf field string vcenter_version = 1; - * @return string - */ - public function getVcenterVersion() - { - return $this->vcenter_version; - } - - /** - * vCenter version. - * - * Generated from protobuf field string vcenter_version = 1; - * @param string $var - * @return $this - */ - public function setVcenterVersion($var) - { - GPBUtil::checkString($var, True); - $this->vcenter_version = $var; - - return $this; - } - - /** - * ESX version. - * - * Generated from protobuf field string esx_version = 2; - * @return string - */ - public function getEsxVersion() - { - return $this->esx_version; - } - - /** - * ESX version. - * - * Generated from protobuf field string esx_version = 2; - * @param string $var - * @return $this - */ - public function setEsxVersion($var) - { - GPBUtil::checkString($var, True); - $this->esx_version = $var; - - return $this; - } - - /** - * VMware os enum - - * https://vdc-repo.vmware.com/vmwb-repository/dcr-public/da47f910-60ac-438b-8b9b-6122f4d14524/16b7274a-bf8b-4b4c-a05e-746f2aa93c8c/doc/vim.vm.GuestOsDescriptor.GuestOsIdentifier.html. - * - * Generated from protobuf field string osid = 3; - * @return string - */ - public function getOsid() - { - return $this->osid; - } - - /** - * VMware os enum - - * https://vdc-repo.vmware.com/vmwb-repository/dcr-public/da47f910-60ac-438b-8b9b-6122f4d14524/16b7274a-bf8b-4b4c-a05e-746f2aa93c8c/doc/vim.vm.GuestOsDescriptor.GuestOsIdentifier.html. - * - * Generated from protobuf field string osid = 3; - * @param string $var - * @return $this - */ - public function setOsid($var) - { - GPBUtil::checkString($var, True); - $this->osid = $var; - - return $this; - } - - /** - * Folder name in vCenter where asset resides. - * - * Generated from protobuf field string vcenter_folder = 4; - * @return string - */ - public function getVcenterFolder() - { - return $this->vcenter_folder; - } - - /** - * Folder name in vCenter where asset resides. - * - * Generated from protobuf field string vcenter_folder = 4; - * @param string $var - * @return $this - */ - public function setVcenterFolder($var) - { - GPBUtil::checkString($var, True); - $this->vcenter_folder = $var; - - return $this; - } - - /** - * vCenter URI used in collection. - * - * Generated from protobuf field string vcenter_uri = 5; - * @return string - */ - public function getVcenterUri() - { - return $this->vcenter_uri; - } - - /** - * vCenter URI used in collection. - * - * Generated from protobuf field string vcenter_uri = 5; - * @param string $var - * @return $this - */ - public function setVcenterUri($var) - { - GPBUtil::checkString($var, True); - $this->vcenter_uri = $var; - - return $this; - } - - /** - * vCenter VM ID. - * - * Generated from protobuf field string vcenter_vm_id = 6; - * @return string - */ - public function getVcenterVmId() - { - return $this->vcenter_vm_id; - } - - /** - * vCenter VM ID. - * - * Generated from protobuf field string vcenter_vm_id = 6; - * @param string $var - * @return $this - */ - public function setVcenterVmId($var) - { - GPBUtil::checkString($var, True); - $this->vcenter_vm_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/add_assets_to_group.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/add_assets_to_group.php deleted file mode 100644 index dc19807c3ac9..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/add_assets_to_group.php +++ /dev/null @@ -1,97 +0,0 @@ -setAssetIds($formattedAssetsAssetIds); - $request = (new AddAssetsToGroupRequest()) - ->setGroup($formattedGroup) - ->setAssets($assets); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $migrationCenterClient->addAssetsToGroup($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Group $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedGroup = MigrationCenterClient::groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); - $formattedAssetsAssetIdsElement = MigrationCenterClient::assetName( - '[PROJECT]', - '[LOCATION]', - '[ASSET]' - ); - - add_assets_to_group_sample($formattedGroup, $formattedAssetsAssetIdsElement); -} -// [END migrationcenter_v1_generated_MigrationCenter_AddAssetsToGroup_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/aggregate_assets_values.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/aggregate_assets_values.php deleted file mode 100644 index 6d5f7cabd828..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/aggregate_assets_values.php +++ /dev/null @@ -1,70 +0,0 @@ -setParent($parent); - - // Call the API and handle any network failures. - try { - /** @var AggregateAssetsValuesResponse $response */ - $response = $migrationCenterClient->aggregateAssetsValues($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $parent = '[PARENT]'; - - aggregate_assets_values_sample($parent); -} -// [END migrationcenter_v1_generated_MigrationCenter_AggregateAssetsValues_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/batch_delete_assets.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/batch_delete_assets.php deleted file mode 100644 index 2318fd82f7f3..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/batch_delete_assets.php +++ /dev/null @@ -1,76 +0,0 @@ -setParent($formattedParent) - ->setNames($formattedNames); - - // Call the API and handle any network failures. - try { - $migrationCenterClient->batchDeleteAssets($request); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = MigrationCenterClient::locationName('[PROJECT]', '[LOCATION]'); - $formattedNamesElement = MigrationCenterClient::assetName('[PROJECT]', '[LOCATION]', '[ASSET]'); - - batch_delete_assets_sample($formattedParent, $formattedNamesElement); -} -// [END migrationcenter_v1_generated_MigrationCenter_BatchDeleteAssets_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/batch_update_assets.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/batch_update_assets.php deleted file mode 100644 index cf665e64b4d4..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/batch_update_assets.php +++ /dev/null @@ -1,81 +0,0 @@ -setUpdateMask($requestsUpdateMask) - ->setAsset($requestsAsset); - $requests = [$updateAssetRequest,]; - $request = (new BatchUpdateAssetsRequest()) - ->setParent($formattedParent) - ->setRequests($requests); - - // Call the API and handle any network failures. - try { - /** @var BatchUpdateAssetsResponse $response */ - $response = $migrationCenterClient->batchUpdateAssets($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = MigrationCenterClient::locationName('[PROJECT]', '[LOCATION]'); - - batch_update_assets_sample($formattedParent); -} -// [END migrationcenter_v1_generated_MigrationCenter_BatchUpdateAssets_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/create_group.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/create_group.php deleted file mode 100644 index a99fb5d2d373..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/create_group.php +++ /dev/null @@ -1,92 +0,0 @@ -setParent($formattedParent) - ->setGroupId($groupId) - ->setGroup($group); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $migrationCenterClient->createGroup($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Group $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = MigrationCenterClient::locationName('[PROJECT]', '[LOCATION]'); - $groupId = '[GROUP_ID]'; - - create_group_sample($formattedParent, $groupId); -} -// [END migrationcenter_v1_generated_MigrationCenter_CreateGroup_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/create_import_data_file.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/create_import_data_file.php deleted file mode 100644 index c067eeac2738..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/create_import_data_file.php +++ /dev/null @@ -1,95 +0,0 @@ -setFormat($importDataFileFormat); - $request = (new CreateImportDataFileRequest()) - ->setParent($formattedParent) - ->setImportDataFileId($importDataFileId) - ->setImportDataFile($importDataFile); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $migrationCenterClient->createImportDataFile($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var ImportDataFile $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = MigrationCenterClient::importJobName('[PROJECT]', '[LOCATION]', '[IMPORT_JOB]'); - $importDataFileId = '[IMPORT_DATA_FILE_ID]'; - $importDataFileFormat = ImportJobFormat::IMPORT_JOB_FORMAT_UNSPECIFIED; - - create_import_data_file_sample($formattedParent, $importDataFileId, $importDataFileFormat); -} -// [END migrationcenter_v1_generated_MigrationCenter_CreateImportDataFile_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/create_import_job.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/create_import_job.php deleted file mode 100644 index 581e2f65c76f..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/create_import_job.php +++ /dev/null @@ -1,99 +0,0 @@ -setAssetSource($formattedImportJobAssetSource); - $request = (new CreateImportJobRequest()) - ->setParent($formattedParent) - ->setImportJobId($importJobId) - ->setImportJob($importJob); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $migrationCenterClient->createImportJob($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var ImportJob $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = MigrationCenterClient::locationName('[PROJECT]', '[LOCATION]'); - $importJobId = '[IMPORT_JOB_ID]'; - $formattedImportJobAssetSource = MigrationCenterClient::sourceName( - '[PROJECT]', - '[LOCATION]', - '[SOURCE]' - ); - - create_import_job_sample($formattedParent, $importJobId, $formattedImportJobAssetSource); -} -// [END migrationcenter_v1_generated_MigrationCenter_CreateImportJob_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/create_preference_set.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/create_preference_set.php deleted file mode 100644 index ffa0df62a728..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/create_preference_set.php +++ /dev/null @@ -1,93 +0,0 @@ -setParent($formattedParent) - ->setPreferenceSetId($preferenceSetId) - ->setPreferenceSet($preferenceSet); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $migrationCenterClient->createPreferenceSet($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var PreferenceSet $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = MigrationCenterClient::locationName('[PROJECT]', '[LOCATION]'); - $preferenceSetId = '[PREFERENCE_SET_ID]'; - - create_preference_set_sample($formattedParent, $preferenceSetId); -} -// [END migrationcenter_v1_generated_MigrationCenter_CreatePreferenceSet_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/create_report.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/create_report.php deleted file mode 100644 index 9a56a41ee130..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/create_report.php +++ /dev/null @@ -1,96 +0,0 @@ -setParent($formattedParent) - ->setReportId($reportId) - ->setReport($report); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $migrationCenterClient->createReport($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Report $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = MigrationCenterClient::reportConfigName( - '[PROJECT]', - '[LOCATION]', - '[REPORT_CONFIG]' - ); - $reportId = '[REPORT_ID]'; - - create_report_sample($formattedParent, $reportId); -} -// [END migrationcenter_v1_generated_MigrationCenter_CreateReport_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/create_report_config.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/create_report_config.php deleted file mode 100644 index ea635c561aa0..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/create_report_config.php +++ /dev/null @@ -1,121 +0,0 @@ -setGroup($formattedReportConfigGroupPreferencesetAssignmentsGroup) - ->setPreferenceSet($formattedReportConfigGroupPreferencesetAssignmentsPreferenceSet); - $reportConfigGroupPreferencesetAssignments = [$groupPreferenceSetAssignment,]; - $reportConfig = (new ReportConfig()) - ->setGroupPreferencesetAssignments($reportConfigGroupPreferencesetAssignments); - $request = (new CreateReportConfigRequest()) - ->setParent($formattedParent) - ->setReportConfigId($reportConfigId) - ->setReportConfig($reportConfig); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $migrationCenterClient->createReportConfig($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var ReportConfig $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = MigrationCenterClient::locationName('[PROJECT]', '[LOCATION]'); - $reportConfigId = '[REPORT_CONFIG_ID]'; - $formattedReportConfigGroupPreferencesetAssignmentsGroup = MigrationCenterClient::groupName( - '[PROJECT]', - '[LOCATION]', - '[GROUP]' - ); - $formattedReportConfigGroupPreferencesetAssignmentsPreferenceSet = MigrationCenterClient::preferenceSetName( - '[PROJECT]', - '[LOCATION]', - '[PREFERENCE_SET]' - ); - - create_report_config_sample( - $formattedParent, - $reportConfigId, - $formattedReportConfigGroupPreferencesetAssignmentsGroup, - $formattedReportConfigGroupPreferencesetAssignmentsPreferenceSet - ); -} -// [END migrationcenter_v1_generated_MigrationCenter_CreateReportConfig_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/create_source.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/create_source.php deleted file mode 100644 index f2c02b41062f..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/create_source.php +++ /dev/null @@ -1,92 +0,0 @@ -setParent($formattedParent) - ->setSourceId($sourceId) - ->setSource($source); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $migrationCenterClient->createSource($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Source $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = MigrationCenterClient::locationName('[PROJECT]', '[LOCATION]'); - $sourceId = '[SOURCE_ID]'; - - create_source_sample($formattedParent, $sourceId); -} -// [END migrationcenter_v1_generated_MigrationCenter_CreateSource_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/delete_asset.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/delete_asset.php deleted file mode 100644 index 8f82a66e9e9f..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/delete_asset.php +++ /dev/null @@ -1,69 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $migrationCenterClient->deleteAsset($request); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = MigrationCenterClient::assetName('[PROJECT]', '[LOCATION]', '[ASSET]'); - - delete_asset_sample($formattedName); -} -// [END migrationcenter_v1_generated_MigrationCenter_DeleteAsset_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/delete_group.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/delete_group.php deleted file mode 100644 index 1c19e10c4a1f..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/delete_group.php +++ /dev/null @@ -1,80 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $migrationCenterClient->deleteGroup($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = MigrationCenterClient::groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); - - delete_group_sample($formattedName); -} -// [END migrationcenter_v1_generated_MigrationCenter_DeleteGroup_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/delete_import_data_file.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/delete_import_data_file.php deleted file mode 100644 index 78c5c71100a5..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/delete_import_data_file.php +++ /dev/null @@ -1,85 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $migrationCenterClient->deleteImportDataFile($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = MigrationCenterClient::importDataFileName( - '[PROJECT]', - '[LOCATION]', - '[IMPORT_JOB]', - '[IMPORT_DATA_FILE]' - ); - - delete_import_data_file_sample($formattedName); -} -// [END migrationcenter_v1_generated_MigrationCenter_DeleteImportDataFile_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/delete_import_job.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/delete_import_job.php deleted file mode 100644 index ab52f6c8e4ed..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/delete_import_job.php +++ /dev/null @@ -1,80 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $migrationCenterClient->deleteImportJob($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = MigrationCenterClient::importJobName('[PROJECT]', '[LOCATION]', '[IMPORT_JOB]'); - - delete_import_job_sample($formattedName); -} -// [END migrationcenter_v1_generated_MigrationCenter_DeleteImportJob_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/delete_preference_set.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/delete_preference_set.php deleted file mode 100644 index 9292f8d5b266..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/delete_preference_set.php +++ /dev/null @@ -1,84 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $migrationCenterClient->deletePreferenceSet($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = MigrationCenterClient::preferenceSetName( - '[PROJECT]', - '[LOCATION]', - '[PREFERENCE_SET]' - ); - - delete_preference_set_sample($formattedName); -} -// [END migrationcenter_v1_generated_MigrationCenter_DeletePreferenceSet_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/delete_report.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/delete_report.php deleted file mode 100644 index ac40fe41c2b1..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/delete_report.php +++ /dev/null @@ -1,85 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $migrationCenterClient->deleteReport($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = MigrationCenterClient::reportName( - '[PROJECT]', - '[LOCATION]', - '[REPORT_CONFIG]', - '[REPORT]' - ); - - delete_report_sample($formattedName); -} -// [END migrationcenter_v1_generated_MigrationCenter_DeleteReport_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/delete_report_config.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/delete_report_config.php deleted file mode 100644 index 3153aaf8eda5..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/delete_report_config.php +++ /dev/null @@ -1,84 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $migrationCenterClient->deleteReportConfig($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = MigrationCenterClient::reportConfigName( - '[PROJECT]', - '[LOCATION]', - '[REPORT_CONFIG]' - ); - - delete_report_config_sample($formattedName); -} -// [END migrationcenter_v1_generated_MigrationCenter_DeleteReportConfig_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/delete_source.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/delete_source.php deleted file mode 100644 index a82cdfa562f5..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/delete_source.php +++ /dev/null @@ -1,80 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $migrationCenterClient->deleteSource($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = MigrationCenterClient::sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - - delete_source_sample($formattedName); -} -// [END migrationcenter_v1_generated_MigrationCenter_DeleteSource_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/get_asset.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/get_asset.php deleted file mode 100644 index c6acf97ed498..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/get_asset.php +++ /dev/null @@ -1,71 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Asset $response */ - $response = $migrationCenterClient->getAsset($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = MigrationCenterClient::assetName('[PROJECT]', '[LOCATION]', '[ASSET]'); - - get_asset_sample($formattedName); -} -// [END migrationcenter_v1_generated_MigrationCenter_GetAsset_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/get_error_frame.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/get_error_frame.php deleted file mode 100644 index 8534e71a90a5..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/get_error_frame.php +++ /dev/null @@ -1,78 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var ErrorFrame $response */ - $response = $migrationCenterClient->getErrorFrame($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = MigrationCenterClient::errorFrameName( - '[PROJECT]', - '[LOCATION]', - '[SOURCE]', - '[ERROR_FRAME]' - ); - - get_error_frame_sample($formattedName); -} -// [END migrationcenter_v1_generated_MigrationCenter_GetErrorFrame_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/get_group.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/get_group.php deleted file mode 100644 index bcf0bbb0fbf0..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/get_group.php +++ /dev/null @@ -1,71 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Group $response */ - $response = $migrationCenterClient->getGroup($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = MigrationCenterClient::groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); - - get_group_sample($formattedName); -} -// [END migrationcenter_v1_generated_MigrationCenter_GetGroup_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/get_import_data_file.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/get_import_data_file.php deleted file mode 100644 index 171bbfbc3e26..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/get_import_data_file.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var ImportDataFile $response */ - $response = $migrationCenterClient->getImportDataFile($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = MigrationCenterClient::importDataFileName( - '[PROJECT]', - '[LOCATION]', - '[IMPORT_JOB]', - '[IMPORT_DATA_FILE]' - ); - - get_import_data_file_sample($formattedName); -} -// [END migrationcenter_v1_generated_MigrationCenter_GetImportDataFile_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/get_import_job.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/get_import_job.php deleted file mode 100644 index 866f2e31e7ff..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/get_import_job.php +++ /dev/null @@ -1,71 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var ImportJob $response */ - $response = $migrationCenterClient->getImportJob($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = MigrationCenterClient::importJobName('[PROJECT]', '[LOCATION]', '[IMPORT_JOB]'); - - get_import_job_sample($formattedName); -} -// [END migrationcenter_v1_generated_MigrationCenter_GetImportJob_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/get_location.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/get_location.php deleted file mode 100644 index 6413993b0568..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/get_location.php +++ /dev/null @@ -1,57 +0,0 @@ -getLocation($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END migrationcenter_v1_generated_MigrationCenter_GetLocation_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/get_preference_set.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/get_preference_set.php deleted file mode 100644 index 9d715db7c7aa..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/get_preference_set.php +++ /dev/null @@ -1,75 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var PreferenceSet $response */ - $response = $migrationCenterClient->getPreferenceSet($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = MigrationCenterClient::preferenceSetName( - '[PROJECT]', - '[LOCATION]', - '[PREFERENCE_SET]' - ); - - get_preference_set_sample($formattedName); -} -// [END migrationcenter_v1_generated_MigrationCenter_GetPreferenceSet_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/get_report.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/get_report.php deleted file mode 100644 index 10356b021038..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/get_report.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Report $response */ - $response = $migrationCenterClient->getReport($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = MigrationCenterClient::reportName( - '[PROJECT]', - '[LOCATION]', - '[REPORT_CONFIG]', - '[REPORT]' - ); - - get_report_sample($formattedName); -} -// [END migrationcenter_v1_generated_MigrationCenter_GetReport_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/get_report_config.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/get_report_config.php deleted file mode 100644 index e3baaf6aeb01..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/get_report_config.php +++ /dev/null @@ -1,75 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var ReportConfig $response */ - $response = $migrationCenterClient->getReportConfig($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = MigrationCenterClient::reportConfigName( - '[PROJECT]', - '[LOCATION]', - '[REPORT_CONFIG]' - ); - - get_report_config_sample($formattedName); -} -// [END migrationcenter_v1_generated_MigrationCenter_GetReportConfig_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/get_settings.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/get_settings.php deleted file mode 100644 index 47ecdfb1b626..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/get_settings.php +++ /dev/null @@ -1,71 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Settings $response */ - $response = $migrationCenterClient->getSettings($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = MigrationCenterClient::settingsName('[PROJECT]', '[LOCATION]'); - - get_settings_sample($formattedName); -} -// [END migrationcenter_v1_generated_MigrationCenter_GetSettings_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/get_source.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/get_source.php deleted file mode 100644 index 5a1ee035ecfd..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/get_source.php +++ /dev/null @@ -1,71 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Source $response */ - $response = $migrationCenterClient->getSource($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = MigrationCenterClient::sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - - get_source_sample($formattedName); -} -// [END migrationcenter_v1_generated_MigrationCenter_GetSource_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/list_assets.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/list_assets.php deleted file mode 100644 index eb6f413f3efd..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/list_assets.php +++ /dev/null @@ -1,76 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $migrationCenterClient->listAssets($request); - - /** @var Asset $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = MigrationCenterClient::locationName('[PROJECT]', '[LOCATION]'); - - list_assets_sample($formattedParent); -} -// [END migrationcenter_v1_generated_MigrationCenter_ListAssets_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/list_error_frames.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/list_error_frames.php deleted file mode 100644 index 148fa203f681..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/list_error_frames.php +++ /dev/null @@ -1,76 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $migrationCenterClient->listErrorFrames($request); - - /** @var ErrorFrame $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = MigrationCenterClient::sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - - list_error_frames_sample($formattedParent); -} -// [END migrationcenter_v1_generated_MigrationCenter_ListErrorFrames_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/list_groups.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/list_groups.php deleted file mode 100644 index 886ab3dfc3d4..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/list_groups.php +++ /dev/null @@ -1,76 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $migrationCenterClient->listGroups($request); - - /** @var Group $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = MigrationCenterClient::locationName('[PROJECT]', '[LOCATION]'); - - list_groups_sample($formattedParent); -} -// [END migrationcenter_v1_generated_MigrationCenter_ListGroups_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/list_import_data_files.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/list_import_data_files.php deleted file mode 100644 index 4b14ec35055e..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/list_import_data_files.php +++ /dev/null @@ -1,76 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $migrationCenterClient->listImportDataFiles($request); - - /** @var ImportDataFile $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = MigrationCenterClient::importJobName('[PROJECT]', '[LOCATION]', '[IMPORT_JOB]'); - - list_import_data_files_sample($formattedParent); -} -// [END migrationcenter_v1_generated_MigrationCenter_ListImportDataFiles_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/list_import_jobs.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/list_import_jobs.php deleted file mode 100644 index 121b05e94636..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/list_import_jobs.php +++ /dev/null @@ -1,76 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $migrationCenterClient->listImportJobs($request); - - /** @var ImportJob $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = MigrationCenterClient::locationName('[PROJECT]', '[LOCATION]'); - - list_import_jobs_sample($formattedParent); -} -// [END migrationcenter_v1_generated_MigrationCenter_ListImportJobs_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/list_locations.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/list_locations.php deleted file mode 100644 index f1cce4e51c90..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/list_locations.php +++ /dev/null @@ -1,62 +0,0 @@ -listLocations($request); - - /** @var Location $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END migrationcenter_v1_generated_MigrationCenter_ListLocations_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/list_preference_sets.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/list_preference_sets.php deleted file mode 100644 index 1dc0251d994a..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/list_preference_sets.php +++ /dev/null @@ -1,76 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $migrationCenterClient->listPreferenceSets($request); - - /** @var PreferenceSet $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = MigrationCenterClient::locationName('[PROJECT]', '[LOCATION]'); - - list_preference_sets_sample($formattedParent); -} -// [END migrationcenter_v1_generated_MigrationCenter_ListPreferenceSets_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/list_report_configs.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/list_report_configs.php deleted file mode 100644 index 36bcbf588e0a..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/list_report_configs.php +++ /dev/null @@ -1,76 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $migrationCenterClient->listReportConfigs($request); - - /** @var ReportConfig $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = MigrationCenterClient::locationName('[PROJECT]', '[LOCATION]'); - - list_report_configs_sample($formattedParent); -} -// [END migrationcenter_v1_generated_MigrationCenter_ListReportConfigs_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/list_reports.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/list_reports.php deleted file mode 100644 index 65dad76af1f2..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/list_reports.php +++ /dev/null @@ -1,80 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $migrationCenterClient->listReports($request); - - /** @var Report $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = MigrationCenterClient::reportConfigName( - '[PROJECT]', - '[LOCATION]', - '[REPORT_CONFIG]' - ); - - list_reports_sample($formattedParent); -} -// [END migrationcenter_v1_generated_MigrationCenter_ListReports_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/list_sources.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/list_sources.php deleted file mode 100644 index 2f3b3b6bf373..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/list_sources.php +++ /dev/null @@ -1,76 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $migrationCenterClient->listSources($request); - - /** @var Source $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = MigrationCenterClient::locationName('[PROJECT]', '[LOCATION]'); - - list_sources_sample($formattedParent); -} -// [END migrationcenter_v1_generated_MigrationCenter_ListSources_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/remove_assets_from_group.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/remove_assets_from_group.php deleted file mode 100644 index 6b2a2363abc4..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/remove_assets_from_group.php +++ /dev/null @@ -1,97 +0,0 @@ -setAssetIds($formattedAssetsAssetIds); - $request = (new RemoveAssetsFromGroupRequest()) - ->setGroup($formattedGroup) - ->setAssets($assets); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $migrationCenterClient->removeAssetsFromGroup($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Group $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedGroup = MigrationCenterClient::groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); - $formattedAssetsAssetIdsElement = MigrationCenterClient::assetName( - '[PROJECT]', - '[LOCATION]', - '[ASSET]' - ); - - remove_assets_from_group_sample($formattedGroup, $formattedAssetsAssetIdsElement); -} -// [END migrationcenter_v1_generated_MigrationCenter_RemoveAssetsFromGroup_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/report_asset_frames.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/report_asset_frames.php deleted file mode 100644 index 96764598cc04..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/report_asset_frames.php +++ /dev/null @@ -1,74 +0,0 @@ -setParent($parent) - ->setSource($formattedSource); - - // Call the API and handle any network failures. - try { - /** @var ReportAssetFramesResponse $response */ - $response = $migrationCenterClient->reportAssetFrames($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $parent = '[PARENT]'; - $formattedSource = MigrationCenterClient::sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - - report_asset_frames_sample($parent, $formattedSource); -} -// [END migrationcenter_v1_generated_MigrationCenter_ReportAssetFrames_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/run_import_job.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/run_import_job.php deleted file mode 100644 index 11bf180f9aec..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/run_import_job.php +++ /dev/null @@ -1,80 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $migrationCenterClient->runImportJob($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = MigrationCenterClient::importJobName('[PROJECT]', '[LOCATION]', '[IMPORT_JOB]'); - - run_import_job_sample($formattedName); -} -// [END migrationcenter_v1_generated_MigrationCenter_RunImportJob_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/update_asset.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/update_asset.php deleted file mode 100644 index 2389be669992..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/update_asset.php +++ /dev/null @@ -1,62 +0,0 @@ -setUpdateMask($updateMask) - ->setAsset($asset); - - // Call the API and handle any network failures. - try { - /** @var Asset $response */ - $response = $migrationCenterClient->updateAsset($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END migrationcenter_v1_generated_MigrationCenter_UpdateAsset_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/update_group.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/update_group.php deleted file mode 100644 index 644c4137509d..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/update_group.php +++ /dev/null @@ -1,74 +0,0 @@ -setUpdateMask($updateMask) - ->setGroup($group); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $migrationCenterClient->updateGroup($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Group $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END migrationcenter_v1_generated_MigrationCenter_UpdateGroup_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/update_import_job.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/update_import_job.php deleted file mode 100644 index 2af252d5cdf2..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/update_import_job.php +++ /dev/null @@ -1,92 +0,0 @@ -setAssetSource($formattedImportJobAssetSource); - $request = (new UpdateImportJobRequest()) - ->setUpdateMask($updateMask) - ->setImportJob($importJob); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $migrationCenterClient->updateImportJob($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var ImportJob $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedImportJobAssetSource = MigrationCenterClient::sourceName( - '[PROJECT]', - '[LOCATION]', - '[SOURCE]' - ); - - update_import_job_sample($formattedImportJobAssetSource); -} -// [END migrationcenter_v1_generated_MigrationCenter_UpdateImportJob_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/update_preference_set.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/update_preference_set.php deleted file mode 100644 index 13536ccd7292..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/update_preference_set.php +++ /dev/null @@ -1,74 +0,0 @@ -setUpdateMask($updateMask) - ->setPreferenceSet($preferenceSet); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $migrationCenterClient->updatePreferenceSet($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var PreferenceSet $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END migrationcenter_v1_generated_MigrationCenter_UpdatePreferenceSet_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/update_settings.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/update_settings.php deleted file mode 100644 index 1426d9f05cf1..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/update_settings.php +++ /dev/null @@ -1,74 +0,0 @@ -setUpdateMask($updateMask) - ->setSettings($settings); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $migrationCenterClient->updateSettings($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Settings $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END migrationcenter_v1_generated_MigrationCenter_UpdateSettings_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/update_source.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/update_source.php deleted file mode 100644 index 61bb46995ca5..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/update_source.php +++ /dev/null @@ -1,74 +0,0 @@ -setUpdateMask($updateMask) - ->setSource($source); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $migrationCenterClient->updateSource($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Source $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END migrationcenter_v1_generated_MigrationCenter_UpdateSource_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/validate_import_job.php b/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/validate_import_job.php deleted file mode 100644 index a5fadf886aa0..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/samples/V1/MigrationCenterClient/validate_import_job.php +++ /dev/null @@ -1,80 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $migrationCenterClient->validateImportJob($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = MigrationCenterClient::importJobName('[PROJECT]', '[LOCATION]', '[IMPORT_JOB]'); - - validate_import_job_sample($formattedName); -} -// [END migrationcenter_v1_generated_MigrationCenter_ValidateImportJob_sync] diff --git a/owl-bot-staging/MigrationCenter/v1/src/V1/Client/MigrationCenterClient.php b/owl-bot-staging/MigrationCenter/v1/src/V1/Client/MigrationCenterClient.php deleted file mode 100644 index dad9fe65847e..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/src/V1/Client/MigrationCenterClient.php +++ /dev/null @@ -1,1883 +0,0 @@ - addAssetsToGroupAsync(AddAssetsToGroupRequest $request, array $optionalArgs = []) - * @method PromiseInterface aggregateAssetsValuesAsync(AggregateAssetsValuesRequest $request, array $optionalArgs = []) - * @method PromiseInterface batchDeleteAssetsAsync(BatchDeleteAssetsRequest $request, array $optionalArgs = []) - * @method PromiseInterface batchUpdateAssetsAsync(BatchUpdateAssetsRequest $request, array $optionalArgs = []) - * @method PromiseInterface createGroupAsync(CreateGroupRequest $request, array $optionalArgs = []) - * @method PromiseInterface createImportDataFileAsync(CreateImportDataFileRequest $request, array $optionalArgs = []) - * @method PromiseInterface createImportJobAsync(CreateImportJobRequest $request, array $optionalArgs = []) - * @method PromiseInterface createPreferenceSetAsync(CreatePreferenceSetRequest $request, array $optionalArgs = []) - * @method PromiseInterface createReportAsync(CreateReportRequest $request, array $optionalArgs = []) - * @method PromiseInterface createReportConfigAsync(CreateReportConfigRequest $request, array $optionalArgs = []) - * @method PromiseInterface createSourceAsync(CreateSourceRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteAssetAsync(DeleteAssetRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteGroupAsync(DeleteGroupRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteImportDataFileAsync(DeleteImportDataFileRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteImportJobAsync(DeleteImportJobRequest $request, array $optionalArgs = []) - * @method PromiseInterface deletePreferenceSetAsync(DeletePreferenceSetRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteReportAsync(DeleteReportRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteReportConfigAsync(DeleteReportConfigRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteSourceAsync(DeleteSourceRequest $request, array $optionalArgs = []) - * @method PromiseInterface getAssetAsync(GetAssetRequest $request, array $optionalArgs = []) - * @method PromiseInterface getErrorFrameAsync(GetErrorFrameRequest $request, array $optionalArgs = []) - * @method PromiseInterface getGroupAsync(GetGroupRequest $request, array $optionalArgs = []) - * @method PromiseInterface getImportDataFileAsync(GetImportDataFileRequest $request, array $optionalArgs = []) - * @method PromiseInterface getImportJobAsync(GetImportJobRequest $request, array $optionalArgs = []) - * @method PromiseInterface getPreferenceSetAsync(GetPreferenceSetRequest $request, array $optionalArgs = []) - * @method PromiseInterface getReportAsync(GetReportRequest $request, array $optionalArgs = []) - * @method PromiseInterface getReportConfigAsync(GetReportConfigRequest $request, array $optionalArgs = []) - * @method PromiseInterface getSettingsAsync(GetSettingsRequest $request, array $optionalArgs = []) - * @method PromiseInterface getSourceAsync(GetSourceRequest $request, array $optionalArgs = []) - * @method PromiseInterface listAssetsAsync(ListAssetsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listErrorFramesAsync(ListErrorFramesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listGroupsAsync(ListGroupsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listImportDataFilesAsync(ListImportDataFilesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listImportJobsAsync(ListImportJobsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listPreferenceSetsAsync(ListPreferenceSetsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listReportConfigsAsync(ListReportConfigsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listReportsAsync(ListReportsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listSourcesAsync(ListSourcesRequest $request, array $optionalArgs = []) - * @method PromiseInterface removeAssetsFromGroupAsync(RemoveAssetsFromGroupRequest $request, array $optionalArgs = []) - * @method PromiseInterface reportAssetFramesAsync(ReportAssetFramesRequest $request, array $optionalArgs = []) - * @method PromiseInterface runImportJobAsync(RunImportJobRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateAssetAsync(UpdateAssetRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateGroupAsync(UpdateGroupRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateImportJobAsync(UpdateImportJobRequest $request, array $optionalArgs = []) - * @method PromiseInterface updatePreferenceSetAsync(UpdatePreferenceSetRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateSettingsAsync(UpdateSettingsRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateSourceAsync(UpdateSourceRequest $request, array $optionalArgs = []) - * @method PromiseInterface validateImportJobAsync(ValidateImportJobRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) - */ -final class MigrationCenterClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.migrationcenter.v1.MigrationCenter'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'migrationcenter.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'migrationcenter.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/migration_center_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/migration_center_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/migration_center_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/migration_center_rest_client_config.php', - ], - ], - ]; - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Create the default operation client for the service. - * - * @param array $options ClientOptions for the client. - * - * @return OperationsClient - */ - private function createOperationsClient(array $options) - { - // Unset client-specific configuration options - unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); - - if (isset($options['operationsClient'])) { - return $options['operationsClient']; - } - - return new OperationsClient($options); - } - - /** - * Formats a string containing the fully-qualified path to represent a asset - * resource. - * - * @param string $project - * @param string $location - * @param string $asset - * - * @return string The formatted asset resource. - */ - public static function assetName(string $project, string $location, string $asset): string - { - return self::getPathTemplate('asset')->render([ - 'project' => $project, - 'location' => $location, - 'asset' => $asset, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a error_frame - * resource. - * - * @param string $project - * @param string $location - * @param string $source - * @param string $errorFrame - * - * @return string The formatted error_frame resource. - */ - public static function errorFrameName(string $project, string $location, string $source, string $errorFrame): string - { - return self::getPathTemplate('errorFrame')->render([ - 'project' => $project, - 'location' => $location, - 'source' => $source, - 'error_frame' => $errorFrame, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a group - * resource. - * - * @param string $project - * @param string $location - * @param string $group - * - * @return string The formatted group resource. - */ - public static function groupName(string $project, string $location, string $group): string - { - return self::getPathTemplate('group')->render([ - 'project' => $project, - 'location' => $location, - 'group' => $group, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * import_data_file resource. - * - * @param string $project - * @param string $location - * @param string $importJob - * @param string $importDataFile - * - * @return string The formatted import_data_file resource. - */ - public static function importDataFileName(string $project, string $location, string $importJob, string $importDataFile): string - { - return self::getPathTemplate('importDataFile')->render([ - 'project' => $project, - 'location' => $location, - 'import_job' => $importJob, - 'import_data_file' => $importDataFile, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a import_job - * resource. - * - * @param string $project - * @param string $location - * @param string $importJob - * - * @return string The formatted import_job resource. - */ - public static function importJobName(string $project, string $location, string $importJob): string - { - return self::getPathTemplate('importJob')->render([ - 'project' => $project, - 'location' => $location, - 'import_job' => $importJob, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a location - * resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted location resource. - */ - public static function locationName(string $project, string $location): string - { - return self::getPathTemplate('location')->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * preference_set resource. - * - * @param string $project - * @param string $location - * @param string $preferenceSet - * - * @return string The formatted preference_set resource. - */ - public static function preferenceSetName(string $project, string $location, string $preferenceSet): string - { - return self::getPathTemplate('preferenceSet')->render([ - 'project' => $project, - 'location' => $location, - 'preference_set' => $preferenceSet, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a report - * resource. - * - * @param string $project - * @param string $location - * @param string $reportConfig - * @param string $report - * - * @return string The formatted report resource. - */ - public static function reportName(string $project, string $location, string $reportConfig, string $report): string - { - return self::getPathTemplate('report')->render([ - 'project' => $project, - 'location' => $location, - 'report_config' => $reportConfig, - 'report' => $report, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * report_config resource. - * - * @param string $project - * @param string $location - * @param string $reportConfig - * - * @return string The formatted report_config resource. - */ - public static function reportConfigName(string $project, string $location, string $reportConfig): string - { - return self::getPathTemplate('reportConfig')->render([ - 'project' => $project, - 'location' => $location, - 'report_config' => $reportConfig, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a settings - * resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted settings resource. - */ - public static function settingsName(string $project, string $location): string - { - return self::getPathTemplate('settings')->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a source - * resource. - * - * @param string $project - * @param string $location - * @param string $source - * - * @return string The formatted source resource. - */ - public static function sourceName(string $project, string $location, string $source): string - { - return self::getPathTemplate('source')->render([ - 'project' => $project, - 'location' => $location, - 'source' => $source, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - asset: projects/{project}/locations/{location}/assets/{asset} - * - errorFrame: projects/{project}/locations/{location}/sources/{source}/errorFrames/{error_frame} - * - group: projects/{project}/locations/{location}/groups/{group} - * - importDataFile: projects/{project}/locations/{location}/importJobs/{import_job}/importDataFiles/{import_data_file} - * - importJob: projects/{project}/locations/{location}/importJobs/{import_job} - * - location: projects/{project}/locations/{location} - * - preferenceSet: projects/{project}/locations/{location}/preferenceSets/{preference_set} - * - report: projects/{project}/locations/{location}/reportConfigs/{report_config}/reports/{report} - * - reportConfig: projects/{project}/locations/{location}/reportConfigs/{report_config} - * - settings: projects/{project}/locations/{location}/settings - * - source: projects/{project}/locations/{location}/sources/{source} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param ?string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, ?string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'migrationcenter.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Adds assets to a group. - * - * The async variant is {@see MigrationCenterClient::addAssetsToGroupAsync()} . - * - * @example samples/V1/MigrationCenterClient/add_assets_to_group.php - * - * @param AddAssetsToGroupRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function addAssetsToGroup(AddAssetsToGroupRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('AddAssetsToGroup', $request, $callOptions)->wait(); - } - - /** - * Aggregates the requested fields based on provided function. - * - * The async variant is {@see MigrationCenterClient::aggregateAssetsValuesAsync()} - * . - * - * @example samples/V1/MigrationCenterClient/aggregate_assets_values.php - * - * @param AggregateAssetsValuesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return AggregateAssetsValuesResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function aggregateAssetsValues(AggregateAssetsValuesRequest $request, array $callOptions = []): AggregateAssetsValuesResponse - { - return $this->startApiCall('AggregateAssetsValues', $request, $callOptions)->wait(); - } - - /** - * Deletes list of Assets. - * - * The async variant is {@see MigrationCenterClient::batchDeleteAssetsAsync()} . - * - * @example samples/V1/MigrationCenterClient/batch_delete_assets.php - * - * @param BatchDeleteAssetsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException Thrown if the API call fails. - */ - public function batchDeleteAssets(BatchDeleteAssetsRequest $request, array $callOptions = []): void - { - $this->startApiCall('BatchDeleteAssets', $request, $callOptions)->wait(); - } - - /** - * Updates the parameters of a list of assets. - * - * The async variant is {@see MigrationCenterClient::batchUpdateAssetsAsync()} . - * - * @example samples/V1/MigrationCenterClient/batch_update_assets.php - * - * @param BatchUpdateAssetsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return BatchUpdateAssetsResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function batchUpdateAssets(BatchUpdateAssetsRequest $request, array $callOptions = []): BatchUpdateAssetsResponse - { - return $this->startApiCall('BatchUpdateAssets', $request, $callOptions)->wait(); - } - - /** - * Creates a new group in a given project and location. - * - * The async variant is {@see MigrationCenterClient::createGroupAsync()} . - * - * @example samples/V1/MigrationCenterClient/create_group.php - * - * @param CreateGroupRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createGroup(CreateGroupRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateGroup', $request, $callOptions)->wait(); - } - - /** - * Creates an import data file. - * - * The async variant is {@see MigrationCenterClient::createImportDataFileAsync()} . - * - * @example samples/V1/MigrationCenterClient/create_import_data_file.php - * - * @param CreateImportDataFileRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createImportDataFile(CreateImportDataFileRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateImportDataFile', $request, $callOptions)->wait(); - } - - /** - * Creates an import job. - * - * The async variant is {@see MigrationCenterClient::createImportJobAsync()} . - * - * @example samples/V1/MigrationCenterClient/create_import_job.php - * - * @param CreateImportJobRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createImportJob(CreateImportJobRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateImportJob', $request, $callOptions)->wait(); - } - - /** - * Creates a new preference set in a given project and location. - * - * The async variant is {@see MigrationCenterClient::createPreferenceSetAsync()} . - * - * @example samples/V1/MigrationCenterClient/create_preference_set.php - * - * @param CreatePreferenceSetRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createPreferenceSet(CreatePreferenceSetRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreatePreferenceSet', $request, $callOptions)->wait(); - } - - /** - * Creates a report. - * - * The async variant is {@see MigrationCenterClient::createReportAsync()} . - * - * @example samples/V1/MigrationCenterClient/create_report.php - * - * @param CreateReportRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createReport(CreateReportRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateReport', $request, $callOptions)->wait(); - } - - /** - * Creates a report configuration. - * - * The async variant is {@see MigrationCenterClient::createReportConfigAsync()} . - * - * @example samples/V1/MigrationCenterClient/create_report_config.php - * - * @param CreateReportConfigRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createReportConfig(CreateReportConfigRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateReportConfig', $request, $callOptions)->wait(); - } - - /** - * Creates a new source in a given project and location. - * - * The async variant is {@see MigrationCenterClient::createSourceAsync()} . - * - * @example samples/V1/MigrationCenterClient/create_source.php - * - * @param CreateSourceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createSource(CreateSourceRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateSource', $request, $callOptions)->wait(); - } - - /** - * Deletes an asset. - * - * The async variant is {@see MigrationCenterClient::deleteAssetAsync()} . - * - * @example samples/V1/MigrationCenterClient/delete_asset.php - * - * @param DeleteAssetRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteAsset(DeleteAssetRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteAsset', $request, $callOptions)->wait(); - } - - /** - * Deletes a group. - * - * The async variant is {@see MigrationCenterClient::deleteGroupAsync()} . - * - * @example samples/V1/MigrationCenterClient/delete_group.php - * - * @param DeleteGroupRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteGroup(DeleteGroupRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteGroup', $request, $callOptions)->wait(); - } - - /** - * Delete an import data file. - * - * The async variant is {@see MigrationCenterClient::deleteImportDataFileAsync()} . - * - * @example samples/V1/MigrationCenterClient/delete_import_data_file.php - * - * @param DeleteImportDataFileRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteImportDataFile(DeleteImportDataFileRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteImportDataFile', $request, $callOptions)->wait(); - } - - /** - * Deletes an import job. - * - * The async variant is {@see MigrationCenterClient::deleteImportJobAsync()} . - * - * @example samples/V1/MigrationCenterClient/delete_import_job.php - * - * @param DeleteImportJobRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteImportJob(DeleteImportJobRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteImportJob', $request, $callOptions)->wait(); - } - - /** - * Deletes a preference set. - * - * The async variant is {@see MigrationCenterClient::deletePreferenceSetAsync()} . - * - * @example samples/V1/MigrationCenterClient/delete_preference_set.php - * - * @param DeletePreferenceSetRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deletePreferenceSet(DeletePreferenceSetRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeletePreferenceSet', $request, $callOptions)->wait(); - } - - /** - * Deletes a Report. - * - * The async variant is {@see MigrationCenterClient::deleteReportAsync()} . - * - * @example samples/V1/MigrationCenterClient/delete_report.php - * - * @param DeleteReportRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteReport(DeleteReportRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteReport', $request, $callOptions)->wait(); - } - - /** - * Deletes a ReportConfig. - * - * The async variant is {@see MigrationCenterClient::deleteReportConfigAsync()} . - * - * @example samples/V1/MigrationCenterClient/delete_report_config.php - * - * @param DeleteReportConfigRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteReportConfig(DeleteReportConfigRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteReportConfig', $request, $callOptions)->wait(); - } - - /** - * Deletes a source. - * - * The async variant is {@see MigrationCenterClient::deleteSourceAsync()} . - * - * @example samples/V1/MigrationCenterClient/delete_source.php - * - * @param DeleteSourceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteSource(DeleteSourceRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteSource', $request, $callOptions)->wait(); - } - - /** - * Gets the details of an asset. - * - * The async variant is {@see MigrationCenterClient::getAssetAsync()} . - * - * @example samples/V1/MigrationCenterClient/get_asset.php - * - * @param GetAssetRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Asset - * - * @throws ApiException Thrown if the API call fails. - */ - public function getAsset(GetAssetRequest $request, array $callOptions = []): Asset - { - return $this->startApiCall('GetAsset', $request, $callOptions)->wait(); - } - - /** - * Gets the details of an error frame. - * - * The async variant is {@see MigrationCenterClient::getErrorFrameAsync()} . - * - * @example samples/V1/MigrationCenterClient/get_error_frame.php - * - * @param GetErrorFrameRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return ErrorFrame - * - * @throws ApiException Thrown if the API call fails. - */ - public function getErrorFrame(GetErrorFrameRequest $request, array $callOptions = []): ErrorFrame - { - return $this->startApiCall('GetErrorFrame', $request, $callOptions)->wait(); - } - - /** - * Gets the details of a group. - * - * The async variant is {@see MigrationCenterClient::getGroupAsync()} . - * - * @example samples/V1/MigrationCenterClient/get_group.php - * - * @param GetGroupRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Group - * - * @throws ApiException Thrown if the API call fails. - */ - public function getGroup(GetGroupRequest $request, array $callOptions = []): Group - { - return $this->startApiCall('GetGroup', $request, $callOptions)->wait(); - } - - /** - * Gets an import data file. - * - * The async variant is {@see MigrationCenterClient::getImportDataFileAsync()} . - * - * @example samples/V1/MigrationCenterClient/get_import_data_file.php - * - * @param GetImportDataFileRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return ImportDataFile - * - * @throws ApiException Thrown if the API call fails. - */ - public function getImportDataFile(GetImportDataFileRequest $request, array $callOptions = []): ImportDataFile - { - return $this->startApiCall('GetImportDataFile', $request, $callOptions)->wait(); - } - - /** - * Gets the details of an import job. - * - * The async variant is {@see MigrationCenterClient::getImportJobAsync()} . - * - * @example samples/V1/MigrationCenterClient/get_import_job.php - * - * @param GetImportJobRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return ImportJob - * - * @throws ApiException Thrown if the API call fails. - */ - public function getImportJob(GetImportJobRequest $request, array $callOptions = []): ImportJob - { - return $this->startApiCall('GetImportJob', $request, $callOptions)->wait(); - } - - /** - * Gets the details of a preference set. - * - * The async variant is {@see MigrationCenterClient::getPreferenceSetAsync()} . - * - * @example samples/V1/MigrationCenterClient/get_preference_set.php - * - * @param GetPreferenceSetRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PreferenceSet - * - * @throws ApiException Thrown if the API call fails. - */ - public function getPreferenceSet(GetPreferenceSetRequest $request, array $callOptions = []): PreferenceSet - { - return $this->startApiCall('GetPreferenceSet', $request, $callOptions)->wait(); - } - - /** - * Gets details of a single Report. - * - * The async variant is {@see MigrationCenterClient::getReportAsync()} . - * - * @example samples/V1/MigrationCenterClient/get_report.php - * - * @param GetReportRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Report - * - * @throws ApiException Thrown if the API call fails. - */ - public function getReport(GetReportRequest $request, array $callOptions = []): Report - { - return $this->startApiCall('GetReport', $request, $callOptions)->wait(); - } - - /** - * Gets details of a single ReportConfig. - * - * The async variant is {@see MigrationCenterClient::getReportConfigAsync()} . - * - * @example samples/V1/MigrationCenterClient/get_report_config.php - * - * @param GetReportConfigRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return ReportConfig - * - * @throws ApiException Thrown if the API call fails. - */ - public function getReportConfig(GetReportConfigRequest $request, array $callOptions = []): ReportConfig - { - return $this->startApiCall('GetReportConfig', $request, $callOptions)->wait(); - } - - /** - * Gets the details of regional settings. - * - * The async variant is {@see MigrationCenterClient::getSettingsAsync()} . - * - * @example samples/V1/MigrationCenterClient/get_settings.php - * - * @param GetSettingsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Settings - * - * @throws ApiException Thrown if the API call fails. - */ - public function getSettings(GetSettingsRequest $request, array $callOptions = []): Settings - { - return $this->startApiCall('GetSettings', $request, $callOptions)->wait(); - } - - /** - * Gets the details of a source. - * - * The async variant is {@see MigrationCenterClient::getSourceAsync()} . - * - * @example samples/V1/MigrationCenterClient/get_source.php - * - * @param GetSourceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Source - * - * @throws ApiException Thrown if the API call fails. - */ - public function getSource(GetSourceRequest $request, array $callOptions = []): Source - { - return $this->startApiCall('GetSource', $request, $callOptions)->wait(); - } - - /** - * Lists all the assets in a given project and location. - * - * The async variant is {@see MigrationCenterClient::listAssetsAsync()} . - * - * @example samples/V1/MigrationCenterClient/list_assets.php - * - * @param ListAssetsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listAssets(ListAssetsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListAssets', $request, $callOptions); - } - - /** - * Lists all error frames in a given source and location. - * - * The async variant is {@see MigrationCenterClient::listErrorFramesAsync()} . - * - * @example samples/V1/MigrationCenterClient/list_error_frames.php - * - * @param ListErrorFramesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listErrorFrames(ListErrorFramesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListErrorFrames', $request, $callOptions); - } - - /** - * Lists all groups in a given project and location. - * - * The async variant is {@see MigrationCenterClient::listGroupsAsync()} . - * - * @example samples/V1/MigrationCenterClient/list_groups.php - * - * @param ListGroupsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listGroups(ListGroupsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListGroups', $request, $callOptions); - } - - /** - * List import data files. - * - * The async variant is {@see MigrationCenterClient::listImportDataFilesAsync()} . - * - * @example samples/V1/MigrationCenterClient/list_import_data_files.php - * - * @param ListImportDataFilesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listImportDataFiles(ListImportDataFilesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListImportDataFiles', $request, $callOptions); - } - - /** - * Lists all import jobs. - * - * The async variant is {@see MigrationCenterClient::listImportJobsAsync()} . - * - * @example samples/V1/MigrationCenterClient/list_import_jobs.php - * - * @param ListImportJobsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listImportJobs(ListImportJobsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListImportJobs', $request, $callOptions); - } - - /** - * Lists all the preference sets in a given project and location. - * - * The async variant is {@see MigrationCenterClient::listPreferenceSetsAsync()} . - * - * @example samples/V1/MigrationCenterClient/list_preference_sets.php - * - * @param ListPreferenceSetsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listPreferenceSets(ListPreferenceSetsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListPreferenceSets', $request, $callOptions); - } - - /** - * Lists ReportConfigs in a given project and location. - * - * The async variant is {@see MigrationCenterClient::listReportConfigsAsync()} . - * - * @example samples/V1/MigrationCenterClient/list_report_configs.php - * - * @param ListReportConfigsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listReportConfigs(ListReportConfigsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListReportConfigs', $request, $callOptions); - } - - /** - * Lists Reports in a given ReportConfig. - * - * The async variant is {@see MigrationCenterClient::listReportsAsync()} . - * - * @example samples/V1/MigrationCenterClient/list_reports.php - * - * @param ListReportsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listReports(ListReportsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListReports', $request, $callOptions); - } - - /** - * Lists all the sources in a given project and location. - * - * The async variant is {@see MigrationCenterClient::listSourcesAsync()} . - * - * @example samples/V1/MigrationCenterClient/list_sources.php - * - * @param ListSourcesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listSources(ListSourcesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListSources', $request, $callOptions); - } - - /** - * Removes assets from a group. - * - * The async variant is {@see MigrationCenterClient::removeAssetsFromGroupAsync()} - * . - * - * @example samples/V1/MigrationCenterClient/remove_assets_from_group.php - * - * @param RemoveAssetsFromGroupRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function removeAssetsFromGroup(RemoveAssetsFromGroupRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('RemoveAssetsFromGroup', $request, $callOptions)->wait(); - } - - /** - * Reports a set of frames. - * - * The async variant is {@see MigrationCenterClient::reportAssetFramesAsync()} . - * - * @example samples/V1/MigrationCenterClient/report_asset_frames.php - * - * @param ReportAssetFramesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return ReportAssetFramesResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function reportAssetFrames(ReportAssetFramesRequest $request, array $callOptions = []): ReportAssetFramesResponse - { - return $this->startApiCall('ReportAssetFrames', $request, $callOptions)->wait(); - } - - /** - * Runs an import job. - * - * The async variant is {@see MigrationCenterClient::runImportJobAsync()} . - * - * @example samples/V1/MigrationCenterClient/run_import_job.php - * - * @param RunImportJobRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function runImportJob(RunImportJobRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('RunImportJob', $request, $callOptions)->wait(); - } - - /** - * Updates the parameters of an asset. - * - * The async variant is {@see MigrationCenterClient::updateAssetAsync()} . - * - * @example samples/V1/MigrationCenterClient/update_asset.php - * - * @param UpdateAssetRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Asset - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateAsset(UpdateAssetRequest $request, array $callOptions = []): Asset - { - return $this->startApiCall('UpdateAsset', $request, $callOptions)->wait(); - } - - /** - * Updates the parameters of a group. - * - * The async variant is {@see MigrationCenterClient::updateGroupAsync()} . - * - * @example samples/V1/MigrationCenterClient/update_group.php - * - * @param UpdateGroupRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateGroup(UpdateGroupRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateGroup', $request, $callOptions)->wait(); - } - - /** - * Updates an import job. - * - * The async variant is {@see MigrationCenterClient::updateImportJobAsync()} . - * - * @example samples/V1/MigrationCenterClient/update_import_job.php - * - * @param UpdateImportJobRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateImportJob(UpdateImportJobRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateImportJob', $request, $callOptions)->wait(); - } - - /** - * Updates the parameters of a preference set. - * - * The async variant is {@see MigrationCenterClient::updatePreferenceSetAsync()} . - * - * @example samples/V1/MigrationCenterClient/update_preference_set.php - * - * @param UpdatePreferenceSetRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updatePreferenceSet(UpdatePreferenceSetRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdatePreferenceSet', $request, $callOptions)->wait(); - } - - /** - * Updates the regional-level project settings. - * - * The async variant is {@see MigrationCenterClient::updateSettingsAsync()} . - * - * @example samples/V1/MigrationCenterClient/update_settings.php - * - * @param UpdateSettingsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateSettings(UpdateSettingsRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateSettings', $request, $callOptions)->wait(); - } - - /** - * Updates the parameters of a source. - * - * The async variant is {@see MigrationCenterClient::updateSourceAsync()} . - * - * @example samples/V1/MigrationCenterClient/update_source.php - * - * @param UpdateSourceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateSource(UpdateSourceRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateSource', $request, $callOptions)->wait(); - } - - /** - * Validates an import job. - * - * The async variant is {@see MigrationCenterClient::validateImportJobAsync()} . - * - * @example samples/V1/MigrationCenterClient/validate_import_job.php - * - * @param ValidateImportJobRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function validateImportJob(ValidateImportJobRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('ValidateImportJob', $request, $callOptions)->wait(); - } - - /** - * Gets information about a location. - * - * The async variant is {@see MigrationCenterClient::getLocationAsync()} . - * - * @example samples/V1/MigrationCenterClient/get_location.php - * - * @param GetLocationRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Location - * - * @throws ApiException Thrown if the API call fails. - */ - public function getLocation(GetLocationRequest $request, array $callOptions = []): Location - { - return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * The async variant is {@see MigrationCenterClient::listLocationsAsync()} . - * - * @example samples/V1/MigrationCenterClient/list_locations.php - * - * @param ListLocationsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListLocations', $request, $callOptions); - } -} diff --git a/owl-bot-staging/MigrationCenter/v1/src/V1/gapic_metadata.json b/owl-bot-staging/MigrationCenter/v1/src/V1/gapic_metadata.json deleted file mode 100644 index 84d26c232e01..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/src/V1/gapic_metadata.json +++ /dev/null @@ -1,268 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.migrationcenter.v1", - "libraryPackage": "Google\\Cloud\\MigrationCenter\\V1", - "services": { - "MigrationCenter": { - "clients": { - "grpc": { - "libraryClient": "MigrationCenterGapicClient", - "rpcs": { - "AddAssetsToGroup": { - "methods": [ - "addAssetsToGroup" - ] - }, - "AggregateAssetsValues": { - "methods": [ - "aggregateAssetsValues" - ] - }, - "BatchDeleteAssets": { - "methods": [ - "batchDeleteAssets" - ] - }, - "BatchUpdateAssets": { - "methods": [ - "batchUpdateAssets" - ] - }, - "CreateGroup": { - "methods": [ - "createGroup" - ] - }, - "CreateImportDataFile": { - "methods": [ - "createImportDataFile" - ] - }, - "CreateImportJob": { - "methods": [ - "createImportJob" - ] - }, - "CreatePreferenceSet": { - "methods": [ - "createPreferenceSet" - ] - }, - "CreateReport": { - "methods": [ - "createReport" - ] - }, - "CreateReportConfig": { - "methods": [ - "createReportConfig" - ] - }, - "CreateSource": { - "methods": [ - "createSource" - ] - }, - "DeleteAsset": { - "methods": [ - "deleteAsset" - ] - }, - "DeleteGroup": { - "methods": [ - "deleteGroup" - ] - }, - "DeleteImportDataFile": { - "methods": [ - "deleteImportDataFile" - ] - }, - "DeleteImportJob": { - "methods": [ - "deleteImportJob" - ] - }, - "DeletePreferenceSet": { - "methods": [ - "deletePreferenceSet" - ] - }, - "DeleteReport": { - "methods": [ - "deleteReport" - ] - }, - "DeleteReportConfig": { - "methods": [ - "deleteReportConfig" - ] - }, - "DeleteSource": { - "methods": [ - "deleteSource" - ] - }, - "GetAsset": { - "methods": [ - "getAsset" - ] - }, - "GetErrorFrame": { - "methods": [ - "getErrorFrame" - ] - }, - "GetGroup": { - "methods": [ - "getGroup" - ] - }, - "GetImportDataFile": { - "methods": [ - "getImportDataFile" - ] - }, - "GetImportJob": { - "methods": [ - "getImportJob" - ] - }, - "GetPreferenceSet": { - "methods": [ - "getPreferenceSet" - ] - }, - "GetReport": { - "methods": [ - "getReport" - ] - }, - "GetReportConfig": { - "methods": [ - "getReportConfig" - ] - }, - "GetSettings": { - "methods": [ - "getSettings" - ] - }, - "GetSource": { - "methods": [ - "getSource" - ] - }, - "ListAssets": { - "methods": [ - "listAssets" - ] - }, - "ListErrorFrames": { - "methods": [ - "listErrorFrames" - ] - }, - "ListGroups": { - "methods": [ - "listGroups" - ] - }, - "ListImportDataFiles": { - "methods": [ - "listImportDataFiles" - ] - }, - "ListImportJobs": { - "methods": [ - "listImportJobs" - ] - }, - "ListPreferenceSets": { - "methods": [ - "listPreferenceSets" - ] - }, - "ListReportConfigs": { - "methods": [ - "listReportConfigs" - ] - }, - "ListReports": { - "methods": [ - "listReports" - ] - }, - "ListSources": { - "methods": [ - "listSources" - ] - }, - "RemoveAssetsFromGroup": { - "methods": [ - "removeAssetsFromGroup" - ] - }, - "ReportAssetFrames": { - "methods": [ - "reportAssetFrames" - ] - }, - "RunImportJob": { - "methods": [ - "runImportJob" - ] - }, - "UpdateAsset": { - "methods": [ - "updateAsset" - ] - }, - "UpdateGroup": { - "methods": [ - "updateGroup" - ] - }, - "UpdateImportJob": { - "methods": [ - "updateImportJob" - ] - }, - "UpdatePreferenceSet": { - "methods": [ - "updatePreferenceSet" - ] - }, - "UpdateSettings": { - "methods": [ - "updateSettings" - ] - }, - "UpdateSource": { - "methods": [ - "updateSource" - ] - }, - "ValidateImportJob": { - "methods": [ - "validateImportJob" - ] - }, - "GetLocation": { - "methods": [ - "getLocation" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/MigrationCenter/v1/src/V1/resources/migration_center_client_config.json b/owl-bot-staging/MigrationCenter/v1/src/V1/resources/migration_center_client_config.json deleted file mode 100644 index 22b47025fdfd..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/src/V1/resources/migration_center_client_config.json +++ /dev/null @@ -1,292 +0,0 @@ -{ - "interfaces": { - "google.cloud.migrationcenter.v1.MigrationCenter": { - "retry_codes": { - "no_retry_codes": [], - "no_retry_1_codes": [], - "no_retry_2_codes": [] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "no_retry_1_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - }, - "no_retry_2_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 600000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 600000, - "total_timeout_millis": 600000 - } - }, - "methods": { - "AddAssetsToGroup": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "AggregateAssetsValues": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "BatchDeleteAssets": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "BatchUpdateAssets": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateGroup": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateImportDataFile": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateImportJob": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreatePreferenceSet": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateReport": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateReportConfig": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateSource": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteAsset": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteGroup": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteImportDataFile": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteImportJob": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeletePreferenceSet": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteReport": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteReportConfig": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteSource": { - "timeout_millis": 600000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" - }, - "GetAsset": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetErrorFrame": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetGroup": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetImportDataFile": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetImportJob": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetPreferenceSet": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetReport": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetReportConfig": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetSettings": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetSource": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListAssets": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListErrorFrames": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListGroups": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListImportDataFiles": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListImportJobs": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListPreferenceSets": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListReportConfigs": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListReports": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListSources": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "RemoveAssetsFromGroup": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ReportAssetFrames": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "RunImportJob": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateAsset": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateGroup": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateImportJob": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdatePreferenceSet": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateSettings": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateSource": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ValidateImportJob": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetLocation": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListLocations": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/MigrationCenter/v1/src/V1/resources/migration_center_descriptor_config.php b/owl-bot-staging/MigrationCenter/v1/src/V1/resources/migration_center_descriptor_config.php deleted file mode 100644 index 27a9cb93b901..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/src/V1/resources/migration_center_descriptor_config.php +++ /dev/null @@ -1,890 +0,0 @@ - [ - 'google.cloud.migrationcenter.v1.MigrationCenter' => [ - 'AddAssetsToGroup' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\MigrationCenter\V1\Group', - 'metadataReturnType' => '\Google\Cloud\MigrationCenter\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'group', - 'fieldAccessors' => [ - 'getGroup', - ], - ], - ], - ], - 'CreateGroup' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\MigrationCenter\V1\Group', - 'metadataReturnType' => '\Google\Cloud\MigrationCenter\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateImportDataFile' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\MigrationCenter\V1\ImportDataFile', - 'metadataReturnType' => '\Google\Cloud\MigrationCenter\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateImportJob' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\MigrationCenter\V1\ImportJob', - 'metadataReturnType' => '\Google\Cloud\MigrationCenter\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreatePreferenceSet' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\MigrationCenter\V1\PreferenceSet', - 'metadataReturnType' => '\Google\Cloud\MigrationCenter\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateReport' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\MigrationCenter\V1\Report', - 'metadataReturnType' => '\Google\Cloud\MigrationCenter\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateReportConfig' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\MigrationCenter\V1\ReportConfig', - 'metadataReturnType' => '\Google\Cloud\MigrationCenter\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateSource' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\MigrationCenter\V1\Source', - 'metadataReturnType' => '\Google\Cloud\MigrationCenter\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteGroup' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\MigrationCenter\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteImportDataFile' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\MigrationCenter\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteImportJob' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\MigrationCenter\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeletePreferenceSet' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\MigrationCenter\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteReport' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\MigrationCenter\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteReportConfig' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\MigrationCenter\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteSource' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\MigrationCenter\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'RemoveAssetsFromGroup' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\MigrationCenter\V1\Group', - 'metadataReturnType' => '\Google\Cloud\MigrationCenter\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'group', - 'fieldAccessors' => [ - 'getGroup', - ], - ], - ], - ], - 'RunImportJob' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\MigrationCenter\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateGroup' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\MigrationCenter\V1\Group', - 'metadataReturnType' => '\Google\Cloud\MigrationCenter\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'group.name', - 'fieldAccessors' => [ - 'getGroup', - 'getName', - ], - ], - ], - ], - 'UpdateImportJob' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\MigrationCenter\V1\ImportJob', - 'metadataReturnType' => '\Google\Cloud\MigrationCenter\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'import_job.name', - 'fieldAccessors' => [ - 'getImportJob', - 'getName', - ], - ], - ], - ], - 'UpdatePreferenceSet' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\MigrationCenter\V1\PreferenceSet', - 'metadataReturnType' => '\Google\Cloud\MigrationCenter\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'preference_set.name', - 'fieldAccessors' => [ - 'getPreferenceSet', - 'getName', - ], - ], - ], - ], - 'UpdateSettings' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\MigrationCenter\V1\Settings', - 'metadataReturnType' => '\Google\Cloud\MigrationCenter\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'settings.name', - 'fieldAccessors' => [ - 'getSettings', - 'getName', - ], - ], - ], - ], - 'UpdateSource' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\MigrationCenter\V1\Source', - 'metadataReturnType' => '\Google\Cloud\MigrationCenter\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'source.name', - 'fieldAccessors' => [ - 'getSource', - 'getName', - ], - ], - ], - ], - 'ValidateImportJob' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\MigrationCenter\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'AggregateAssetsValues' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\MigrationCenter\V1\AggregateAssetsValuesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'BatchDeleteAssets' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'BatchUpdateAssets' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\MigrationCenter\V1\BatchUpdateAssetsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteAsset' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetAsset' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\MigrationCenter\V1\Asset', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetErrorFrame' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\MigrationCenter\V1\ErrorFrame', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetGroup' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\MigrationCenter\V1\Group', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetImportDataFile' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\MigrationCenter\V1\ImportDataFile', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetImportJob' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\MigrationCenter\V1\ImportJob', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetPreferenceSet' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\MigrationCenter\V1\PreferenceSet', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetReport' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\MigrationCenter\V1\Report', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetReportConfig' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\MigrationCenter\V1\ReportConfig', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetSettings' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\MigrationCenter\V1\Settings', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetSource' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\MigrationCenter\V1\Source', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListAssets' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getAssets', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\MigrationCenter\V1\ListAssetsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListErrorFrames' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getErrorFrames', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\MigrationCenter\V1\ListErrorFramesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListGroups' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getGroups', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\MigrationCenter\V1\ListGroupsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListImportDataFiles' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getImportDataFiles', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\MigrationCenter\V1\ListImportDataFilesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListImportJobs' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getImportJobs', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\MigrationCenter\V1\ListImportJobsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListPreferenceSets' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getPreferenceSets', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\MigrationCenter\V1\ListPreferenceSetsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListReportConfigs' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getReportConfigs', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\MigrationCenter\V1\ListReportConfigsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListReports' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getReports', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\MigrationCenter\V1\ListReportsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListSources' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getSources', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\MigrationCenter\V1\ListSourcesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ReportAssetFrames' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\MigrationCenter\V1\ReportAssetFramesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateAsset' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\MigrationCenter\V1\Asset', - 'headerParams' => [ - [ - 'keyName' => 'asset.name', - 'fieldAccessors' => [ - 'getAsset', - 'getName', - ], - ], - ], - ], - 'GetLocation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Location\Location', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'ListLocations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLocations', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'templateMap' => [ - 'asset' => 'projects/{project}/locations/{location}/assets/{asset}', - 'errorFrame' => 'projects/{project}/locations/{location}/sources/{source}/errorFrames/{error_frame}', - 'group' => 'projects/{project}/locations/{location}/groups/{group}', - 'importDataFile' => 'projects/{project}/locations/{location}/importJobs/{import_job}/importDataFiles/{import_data_file}', - 'importJob' => 'projects/{project}/locations/{location}/importJobs/{import_job}', - 'location' => 'projects/{project}/locations/{location}', - 'preferenceSet' => 'projects/{project}/locations/{location}/preferenceSets/{preference_set}', - 'report' => 'projects/{project}/locations/{location}/reportConfigs/{report_config}/reports/{report}', - 'reportConfig' => 'projects/{project}/locations/{location}/reportConfigs/{report_config}', - 'settings' => 'projects/{project}/locations/{location}/settings', - 'source' => 'projects/{project}/locations/{location}/sources/{source}', - ], - ], - ], -]; diff --git a/owl-bot-staging/MigrationCenter/v1/src/V1/resources/migration_center_rest_client_config.php b/owl-bot-staging/MigrationCenter/v1/src/V1/resources/migration_center_rest_client_config.php deleted file mode 100644 index 209af4c348a6..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/src/V1/resources/migration_center_rest_client_config.php +++ /dev/null @@ -1,694 +0,0 @@ - [ - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.cloud.migrationcenter.v1.MigrationCenter' => [ - 'AddAssetsToGroup' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{group=projects/*/locations/*/groups/*}:addAssets', - 'body' => '*', - 'placeholders' => [ - 'group' => [ - 'getters' => [ - 'getGroup', - ], - ], - ], - ], - 'AggregateAssetsValues' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/assets:aggregateValues', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'BatchDeleteAssets' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/assets:batchDelete', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'BatchUpdateAssets' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/assets:batchUpdate', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CreateGroup' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/groups', - 'body' => 'group', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'group_id', - ], - ], - 'CreateImportDataFile' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/importJobs/*}/importDataFiles', - 'body' => 'import_data_file', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'import_data_file_id', - ], - ], - 'CreateImportJob' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/importJobs', - 'body' => 'import_job', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'import_job_id', - ], - ], - 'CreatePreferenceSet' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/preferenceSets', - 'body' => 'preference_set', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'preference_set_id', - ], - ], - 'CreateReport' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/reportConfigs/*}/reports', - 'body' => 'report', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'report_id', - ], - ], - 'CreateReportConfig' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/reportConfigs', - 'body' => 'report_config', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'report_config_id', - ], - ], - 'CreateSource' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/sources', - 'body' => 'source', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'source_id', - ], - ], - 'DeleteAsset' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/assets/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteGroup' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/groups/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteImportDataFile' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/importJobs/*/importDataFiles/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteImportJob' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/importJobs/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeletePreferenceSet' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/preferenceSets/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteReport' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/reportConfigs/*/reports/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteReportConfig' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/reportConfigs/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteSource' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/sources/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetAsset' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/assets/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetErrorFrame' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/sources/*/errorFrames/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetGroup' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/groups/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetImportDataFile' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/importJobs/*/importDataFiles/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetImportJob' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/importJobs/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetPreferenceSet' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/preferenceSets/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetReport' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/reportConfigs/*/reports/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetReportConfig' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/reportConfigs/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetSettings' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/settings}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetSource' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/sources/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListAssets' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/assets', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListErrorFrames' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/sources/*}/errorFrames', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListGroups' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/groups', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListImportDataFiles' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/importJobs/*}/importDataFiles', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListImportJobs' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/importJobs', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListPreferenceSets' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/preferenceSets', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListReportConfigs' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/reportConfigs', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListReports' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/reportConfigs/*}/reports', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListSources' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/sources', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'RemoveAssetsFromGroup' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{group=projects/*/locations/*/groups/*}:removeAssets', - 'body' => '*', - 'placeholders' => [ - 'group' => [ - 'getters' => [ - 'getGroup', - ], - ], - ], - ], - 'ReportAssetFrames' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/assets:reportAssetFrames', - 'body' => 'frames', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'RunImportJob' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/importJobs/*}:run', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'UpdateAsset' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{asset.name=projects/*/locations/*/assets/*}', - 'body' => 'asset', - 'placeholders' => [ - 'asset.name' => [ - 'getters' => [ - 'getAsset', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdateGroup' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{group.name=projects/*/locations/*/groups/*}', - 'body' => 'group', - 'placeholders' => [ - 'group.name' => [ - 'getters' => [ - 'getGroup', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdateImportJob' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{import_job.name=projects/*/locations/*/importJobs/*}', - 'body' => 'import_job', - 'placeholders' => [ - 'import_job.name' => [ - 'getters' => [ - 'getImportJob', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdatePreferenceSet' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{preference_set.name=projects/*/locations/*/preferenceSets/*}', - 'body' => 'preference_set', - 'placeholders' => [ - 'preference_set.name' => [ - 'getters' => [ - 'getPreferenceSet', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdateSettings' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{settings.name=projects/*/locations/*/settings}', - 'body' => 'settings', - 'placeholders' => [ - 'settings.name' => [ - 'getters' => [ - 'getSettings', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdateSource' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{source.name=projects/*/locations/*/sources/*}', - 'body' => 'source', - 'placeholders' => [ - 'source.name' => [ - 'getters' => [ - 'getSource', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'ValidateImportJob' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/importJobs/*}:validate', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/MigrationCenter/v1/tests/Unit/V1/Client/MigrationCenterClientTest.php b/owl-bot-staging/MigrationCenter/v1/tests/Unit/V1/Client/MigrationCenterClientTest.php deleted file mode 100644 index 045a91b183b6..000000000000 --- a/owl-bot-staging/MigrationCenter/v1/tests/Unit/V1/Client/MigrationCenterClientTest.php +++ /dev/null @@ -1,5105 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return MigrationCenterClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new MigrationCenterClient($options); - } - - /** @test */ - public function addAssetsToGroupTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/addAssetsToGroupTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $expectedResponse = new Group(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/addAssetsToGroupTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedGroup = $gapicClient->groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); - $assets = new AssetList(); - $assetsAssetIds = [ - $gapicClient->assetName('[PROJECT]', '[LOCATION]', '[ASSET]'), - ]; - $assets->setAssetIds($assetsAssetIds); - $request = (new AddAssetsToGroupRequest()) - ->setGroup($formattedGroup) - ->setAssets($assets); - $response = $gapicClient->addAssetsToGroup($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/AddAssetsToGroup', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getGroup(); - $this->assertProtobufEquals($formattedGroup, $actualValue); - $actualValue = $actualApiRequestObject->getAssets(); - $this->assertProtobufEquals($assets, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/addAssetsToGroupTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function addAssetsToGroupExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/addAssetsToGroupTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedGroup = $gapicClient->groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); - $assets = new AssetList(); - $assetsAssetIds = [ - $gapicClient->assetName('[PROJECT]', '[LOCATION]', '[ASSET]'), - ]; - $assets->setAssetIds($assetsAssetIds); - $request = (new AddAssetsToGroupRequest()) - ->setGroup($formattedGroup) - ->setAssets($assets); - $response = $gapicClient->addAssetsToGroup($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/addAssetsToGroupTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function aggregateAssetsValuesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new AggregateAssetsValuesResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $parent = 'parent-995424086'; - $request = (new AggregateAssetsValuesRequest()) - ->setParent($parent); - $response = $gapicClient->aggregateAssetsValues($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/AggregateAssetsValues', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function aggregateAssetsValuesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $parent = 'parent-995424086'; - $request = (new AggregateAssetsValuesRequest()) - ->setParent($parent); - try { - $gapicClient->aggregateAssetsValues($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function batchDeleteAssetsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $formattedNames = [ - $gapicClient->assetName('[PROJECT]', '[LOCATION]', '[ASSET]'), - ]; - $request = (new BatchDeleteAssetsRequest()) - ->setParent($formattedParent) - ->setNames($formattedNames); - $gapicClient->batchDeleteAssets($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/BatchDeleteAssets', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getNames(); - $this->assertProtobufEquals($formattedNames, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function batchDeleteAssetsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $formattedNames = [ - $gapicClient->assetName('[PROJECT]', '[LOCATION]', '[ASSET]'), - ]; - $request = (new BatchDeleteAssetsRequest()) - ->setParent($formattedParent) - ->setNames($formattedNames); - try { - $gapicClient->batchDeleteAssets($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function batchUpdateAssetsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new BatchUpdateAssetsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $requests = []; - $request = (new BatchUpdateAssetsRequest()) - ->setParent($formattedParent) - ->setRequests($requests); - $response = $gapicClient->batchUpdateAssets($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/BatchUpdateAssets', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getRequests(); - $this->assertProtobufEquals($requests, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function batchUpdateAssetsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $requests = []; - $request = (new BatchUpdateAssetsRequest()) - ->setParent($formattedParent) - ->setRequests($requests); - try { - $gapicClient->batchUpdateAssets($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createGroupTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createGroupTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $expectedResponse = new Group(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createGroupTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $groupId = 'groupId506361563'; - $group = new Group(); - $request = (new CreateGroupRequest()) - ->setParent($formattedParent) - ->setGroupId($groupId) - ->setGroup($group); - $response = $gapicClient->createGroup($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/CreateGroup', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getGroupId(); - $this->assertProtobufEquals($groupId, $actualValue); - $actualValue = $actualApiRequestObject->getGroup(); - $this->assertProtobufEquals($group, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createGroupTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createGroupExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createGroupTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $groupId = 'groupId506361563'; - $group = new Group(); - $request = (new CreateGroupRequest()) - ->setParent($formattedParent) - ->setGroupId($groupId) - ->setGroup($group); - $response = $gapicClient->createGroup($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createGroupTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createImportDataFileTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createImportDataFileTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $expectedResponse = new ImportDataFile(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createImportDataFileTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->importJobName('[PROJECT]', '[LOCATION]', '[IMPORT_JOB]'); - $importDataFileId = 'importDataFileId-1455500925'; - $importDataFile = new ImportDataFile(); - $importDataFileFormat = ImportJobFormat::IMPORT_JOB_FORMAT_UNSPECIFIED; - $importDataFile->setFormat($importDataFileFormat); - $request = (new CreateImportDataFileRequest()) - ->setParent($formattedParent) - ->setImportDataFileId($importDataFileId) - ->setImportDataFile($importDataFile); - $response = $gapicClient->createImportDataFile($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/CreateImportDataFile', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getImportDataFileId(); - $this->assertProtobufEquals($importDataFileId, $actualValue); - $actualValue = $actualApiRequestObject->getImportDataFile(); - $this->assertProtobufEquals($importDataFile, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createImportDataFileTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createImportDataFileExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createImportDataFileTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->importJobName('[PROJECT]', '[LOCATION]', '[IMPORT_JOB]'); - $importDataFileId = 'importDataFileId-1455500925'; - $importDataFile = new ImportDataFile(); - $importDataFileFormat = ImportJobFormat::IMPORT_JOB_FORMAT_UNSPECIFIED; - $importDataFile->setFormat($importDataFileFormat); - $request = (new CreateImportDataFileRequest()) - ->setParent($formattedParent) - ->setImportDataFileId($importDataFileId) - ->setImportDataFile($importDataFile); - $response = $gapicClient->createImportDataFile($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createImportDataFileTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createImportJobTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createImportJobTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $assetSource = 'assetSource-2028843958'; - $expectedResponse = new ImportJob(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setAssetSource($assetSource); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createImportJobTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $importJobId = 'importJobId-1620773193'; - $importJob = new ImportJob(); - $importJobAssetSource = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - $importJob->setAssetSource($importJobAssetSource); - $request = (new CreateImportJobRequest()) - ->setParent($formattedParent) - ->setImportJobId($importJobId) - ->setImportJob($importJob); - $response = $gapicClient->createImportJob($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/CreateImportJob', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getImportJobId(); - $this->assertProtobufEquals($importJobId, $actualValue); - $actualValue = $actualApiRequestObject->getImportJob(); - $this->assertProtobufEquals($importJob, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createImportJobTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createImportJobExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createImportJobTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $importJobId = 'importJobId-1620773193'; - $importJob = new ImportJob(); - $importJobAssetSource = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - $importJob->setAssetSource($importJobAssetSource); - $request = (new CreateImportJobRequest()) - ->setParent($formattedParent) - ->setImportJobId($importJobId) - ->setImportJob($importJob); - $response = $gapicClient->createImportJob($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createImportJobTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createPreferenceSetTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createPreferenceSetTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $expectedResponse = new PreferenceSet(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createPreferenceSetTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $preferenceSetId = 'preferenceSetId697034236'; - $preferenceSet = new PreferenceSet(); - $request = (new CreatePreferenceSetRequest()) - ->setParent($formattedParent) - ->setPreferenceSetId($preferenceSetId) - ->setPreferenceSet($preferenceSet); - $response = $gapicClient->createPreferenceSet($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/CreatePreferenceSet', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getPreferenceSetId(); - $this->assertProtobufEquals($preferenceSetId, $actualValue); - $actualValue = $actualApiRequestObject->getPreferenceSet(); - $this->assertProtobufEquals($preferenceSet, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createPreferenceSetTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createPreferenceSetExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createPreferenceSetTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $preferenceSetId = 'preferenceSetId697034236'; - $preferenceSet = new PreferenceSet(); - $request = (new CreatePreferenceSetRequest()) - ->setParent($formattedParent) - ->setPreferenceSetId($preferenceSetId) - ->setPreferenceSet($preferenceSet); - $response = $gapicClient->createPreferenceSet($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createPreferenceSetTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createReportTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createReportTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $expectedResponse = new Report(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createReportTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->reportConfigName('[PROJECT]', '[LOCATION]', '[REPORT_CONFIG]'); - $reportId = 'reportId-353329146'; - $report = new Report(); - $request = (new CreateReportRequest()) - ->setParent($formattedParent) - ->setReportId($reportId) - ->setReport($report); - $response = $gapicClient->createReport($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/CreateReport', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getReportId(); - $this->assertProtobufEquals($reportId, $actualValue); - $actualValue = $actualApiRequestObject->getReport(); - $this->assertProtobufEquals($report, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createReportTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createReportExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createReportTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->reportConfigName('[PROJECT]', '[LOCATION]', '[REPORT_CONFIG]'); - $reportId = 'reportId-353329146'; - $report = new Report(); - $request = (new CreateReportRequest()) - ->setParent($formattedParent) - ->setReportId($reportId) - ->setReport($report); - $response = $gapicClient->createReport($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createReportTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createReportConfigTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createReportConfigTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $expectedResponse = new ReportConfig(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createReportConfigTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $reportConfigId = 'reportConfigId2120773101'; - $reportConfig = new ReportConfig(); - $reportConfigGroupPreferencesetAssignments = []; - $reportConfig->setGroupPreferencesetAssignments($reportConfigGroupPreferencesetAssignments); - $request = (new CreateReportConfigRequest()) - ->setParent($formattedParent) - ->setReportConfigId($reportConfigId) - ->setReportConfig($reportConfig); - $response = $gapicClient->createReportConfig($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/CreateReportConfig', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getReportConfigId(); - $this->assertProtobufEquals($reportConfigId, $actualValue); - $actualValue = $actualApiRequestObject->getReportConfig(); - $this->assertProtobufEquals($reportConfig, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createReportConfigTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createReportConfigExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createReportConfigTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $reportConfigId = 'reportConfigId2120773101'; - $reportConfig = new ReportConfig(); - $reportConfigGroupPreferencesetAssignments = []; - $reportConfig->setGroupPreferencesetAssignments($reportConfigGroupPreferencesetAssignments); - $request = (new CreateReportConfigRequest()) - ->setParent($formattedParent) - ->setReportConfigId($reportConfigId) - ->setReportConfig($reportConfig); - $response = $gapicClient->createReportConfig($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createReportConfigTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createSourceTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createSourceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $priority = 1165461084; - $managed = false; - $pendingFrameCount = 322639125; - $errorFrameCount = 1431911430; - $expectedResponse = new Source(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setPriority($priority); - $expectedResponse->setManaged($managed); - $expectedResponse->setPendingFrameCount($pendingFrameCount); - $expectedResponse->setErrorFrameCount($errorFrameCount); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createSourceTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $sourceId = 'sourceId-1698410561'; - $source = new Source(); - $request = (new CreateSourceRequest()) - ->setParent($formattedParent) - ->setSourceId($sourceId) - ->setSource($source); - $response = $gapicClient->createSource($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/CreateSource', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getSourceId(); - $this->assertProtobufEquals($sourceId, $actualValue); - $actualValue = $actualApiRequestObject->getSource(); - $this->assertProtobufEquals($source, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createSourceTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createSourceExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createSourceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $sourceId = 'sourceId-1698410561'; - $source = new Source(); - $request = (new CreateSourceRequest()) - ->setParent($formattedParent) - ->setSourceId($sourceId) - ->setSource($source); - $response = $gapicClient->createSource($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createSourceTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteAssetTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->assetName('[PROJECT]', '[LOCATION]', '[ASSET]'); - $request = (new DeleteAssetRequest()) - ->setName($formattedName); - $gapicClient->deleteAsset($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/DeleteAsset', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteAssetExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->assetName('[PROJECT]', '[LOCATION]', '[ASSET]'); - $request = (new DeleteAssetRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteAsset($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteGroupTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteGroupTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteGroupTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); - $request = (new DeleteGroupRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteGroup($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/DeleteGroup', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteGroupTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteGroupExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteGroupTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); - $request = (new DeleteGroupRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteGroup($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteGroupTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteImportDataFileTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteImportDataFileTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteImportDataFileTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->importDataFileName('[PROJECT]', '[LOCATION]', '[IMPORT_JOB]', '[IMPORT_DATA_FILE]'); - $request = (new DeleteImportDataFileRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteImportDataFile($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/DeleteImportDataFile', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteImportDataFileTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteImportDataFileExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteImportDataFileTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->importDataFileName('[PROJECT]', '[LOCATION]', '[IMPORT_JOB]', '[IMPORT_DATA_FILE]'); - $request = (new DeleteImportDataFileRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteImportDataFile($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteImportDataFileTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteImportJobTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteImportJobTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteImportJobTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->importJobName('[PROJECT]', '[LOCATION]', '[IMPORT_JOB]'); - $request = (new DeleteImportJobRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteImportJob($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/DeleteImportJob', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteImportJobTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteImportJobExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteImportJobTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->importJobName('[PROJECT]', '[LOCATION]', '[IMPORT_JOB]'); - $request = (new DeleteImportJobRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteImportJob($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteImportJobTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deletePreferenceSetTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deletePreferenceSetTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deletePreferenceSetTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->preferenceSetName('[PROJECT]', '[LOCATION]', '[PREFERENCE_SET]'); - $request = (new DeletePreferenceSetRequest()) - ->setName($formattedName); - $response = $gapicClient->deletePreferenceSet($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/DeletePreferenceSet', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deletePreferenceSetTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deletePreferenceSetExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deletePreferenceSetTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->preferenceSetName('[PROJECT]', '[LOCATION]', '[PREFERENCE_SET]'); - $request = (new DeletePreferenceSetRequest()) - ->setName($formattedName); - $response = $gapicClient->deletePreferenceSet($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deletePreferenceSetTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteReportTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteReportTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteReportTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->reportName('[PROJECT]', '[LOCATION]', '[REPORT_CONFIG]', '[REPORT]'); - $request = (new DeleteReportRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteReport($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/DeleteReport', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteReportTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteReportExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteReportTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->reportName('[PROJECT]', '[LOCATION]', '[REPORT_CONFIG]', '[REPORT]'); - $request = (new DeleteReportRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteReport($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteReportTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteReportConfigTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteReportConfigTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteReportConfigTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->reportConfigName('[PROJECT]', '[LOCATION]', '[REPORT_CONFIG]'); - $request = (new DeleteReportConfigRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteReportConfig($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/DeleteReportConfig', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteReportConfigTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteReportConfigExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteReportConfigTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->reportConfigName('[PROJECT]', '[LOCATION]', '[REPORT_CONFIG]'); - $request = (new DeleteReportConfigRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteReportConfig($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteReportConfigTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteSourceTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteSourceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteSourceTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - $request = (new DeleteSourceRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteSource($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/DeleteSource', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteSourceTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteSourceExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteSourceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - $request = (new DeleteSourceRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteSource($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteSourceTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getAssetTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new Asset(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->assetName('[PROJECT]', '[LOCATION]', '[ASSET]'); - $request = (new GetAssetRequest()) - ->setName($formattedName); - $response = $gapicClient->getAsset($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/GetAsset', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAssetExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->assetName('[PROJECT]', '[LOCATION]', '[ASSET]'); - $request = (new GetAssetRequest()) - ->setName($formattedName); - try { - $gapicClient->getAsset($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getErrorFrameTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new ErrorFrame(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->errorFrameName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[ERROR_FRAME]'); - $request = (new GetErrorFrameRequest()) - ->setName($formattedName); - $response = $gapicClient->getErrorFrame($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/GetErrorFrame', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getErrorFrameExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->errorFrameName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[ERROR_FRAME]'); - $request = (new GetErrorFrameRequest()) - ->setName($formattedName); - try { - $gapicClient->getErrorFrame($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getGroupTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $expectedResponse = new Group(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); - $request = (new GetGroupRequest()) - ->setName($formattedName); - $response = $gapicClient->getGroup($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/GetGroup', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getGroupExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); - $request = (new GetGroupRequest()) - ->setName($formattedName); - try { - $gapicClient->getGroup($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getImportDataFileTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $expectedResponse = new ImportDataFile(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->importDataFileName('[PROJECT]', '[LOCATION]', '[IMPORT_JOB]', '[IMPORT_DATA_FILE]'); - $request = (new GetImportDataFileRequest()) - ->setName($formattedName); - $response = $gapicClient->getImportDataFile($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/GetImportDataFile', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getImportDataFileExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->importDataFileName('[PROJECT]', '[LOCATION]', '[IMPORT_JOB]', '[IMPORT_DATA_FILE]'); - $request = (new GetImportDataFileRequest()) - ->setName($formattedName); - try { - $gapicClient->getImportDataFile($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getImportJobTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $assetSource = 'assetSource-2028843958'; - $expectedResponse = new ImportJob(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setAssetSource($assetSource); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->importJobName('[PROJECT]', '[LOCATION]', '[IMPORT_JOB]'); - $request = (new GetImportJobRequest()) - ->setName($formattedName); - $response = $gapicClient->getImportJob($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/GetImportJob', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getImportJobExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->importJobName('[PROJECT]', '[LOCATION]', '[IMPORT_JOB]'); - $request = (new GetImportJobRequest()) - ->setName($formattedName); - try { - $gapicClient->getImportJob($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getPreferenceSetTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $expectedResponse = new PreferenceSet(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->preferenceSetName('[PROJECT]', '[LOCATION]', '[PREFERENCE_SET]'); - $request = (new GetPreferenceSetRequest()) - ->setName($formattedName); - $response = $gapicClient->getPreferenceSet($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/GetPreferenceSet', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getPreferenceSetExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->preferenceSetName('[PROJECT]', '[LOCATION]', '[PREFERENCE_SET]'); - $request = (new GetPreferenceSetRequest()) - ->setName($formattedName); - try { - $gapicClient->getPreferenceSet($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getReportTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $expectedResponse = new Report(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->reportName('[PROJECT]', '[LOCATION]', '[REPORT_CONFIG]', '[REPORT]'); - $request = (new GetReportRequest()) - ->setName($formattedName); - $response = $gapicClient->getReport($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/GetReport', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getReportExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->reportName('[PROJECT]', '[LOCATION]', '[REPORT_CONFIG]', '[REPORT]'); - $request = (new GetReportRequest()) - ->setName($formattedName); - try { - $gapicClient->getReport($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getReportConfigTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $expectedResponse = new ReportConfig(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->reportConfigName('[PROJECT]', '[LOCATION]', '[REPORT_CONFIG]'); - $request = (new GetReportConfigRequest()) - ->setName($formattedName); - $response = $gapicClient->getReportConfig($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/GetReportConfig', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getReportConfigExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->reportConfigName('[PROJECT]', '[LOCATION]', '[REPORT_CONFIG]'); - $request = (new GetReportConfigRequest()) - ->setName($formattedName); - try { - $gapicClient->getReportConfig($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getSettingsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $preferenceSet = 'preferenceSet813286142'; - $expectedResponse = new Settings(); - $expectedResponse->setName($name2); - $expectedResponse->setPreferenceSet($preferenceSet); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->settingsName('[PROJECT]', '[LOCATION]'); - $request = (new GetSettingsRequest()) - ->setName($formattedName); - $response = $gapicClient->getSettings($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/GetSettings', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getSettingsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->settingsName('[PROJECT]', '[LOCATION]'); - $request = (new GetSettingsRequest()) - ->setName($formattedName); - try { - $gapicClient->getSettings($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getSourceTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $priority = 1165461084; - $managed = false; - $pendingFrameCount = 322639125; - $errorFrameCount = 1431911430; - $expectedResponse = new Source(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setPriority($priority); - $expectedResponse->setManaged($managed); - $expectedResponse->setPendingFrameCount($pendingFrameCount); - $expectedResponse->setErrorFrameCount($errorFrameCount); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - $request = (new GetSourceRequest()) - ->setName($formattedName); - $response = $gapicClient->getSource($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/GetSource', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getSourceExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - $request = (new GetSourceRequest()) - ->setName($formattedName); - try { - $gapicClient->getSource($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAssetsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $assetsElement = new Asset(); - $assets = [ - $assetsElement, - ]; - $expectedResponse = new ListAssetsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setAssets($assets); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListAssetsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listAssets($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getAssets()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/ListAssets', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAssetsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListAssetsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listAssets($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listErrorFramesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $errorFramesElement = new ErrorFrame(); - $errorFrames = [ - $errorFramesElement, - ]; - $expectedResponse = new ListErrorFramesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setErrorFrames($errorFrames); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - $request = (new ListErrorFramesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listErrorFrames($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getErrorFrames()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/ListErrorFrames', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listErrorFramesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - $request = (new ListErrorFramesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listErrorFrames($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listGroupsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $groupsElement = new Group(); - $groups = [ - $groupsElement, - ]; - $expectedResponse = new ListGroupsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setGroups($groups); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListGroupsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listGroups($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getGroups()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/ListGroups', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listGroupsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListGroupsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listGroups($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listImportDataFilesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $importDataFilesElement = new ImportDataFile(); - $importDataFiles = [ - $importDataFilesElement, - ]; - $expectedResponse = new ListImportDataFilesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setImportDataFiles($importDataFiles); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->importJobName('[PROJECT]', '[LOCATION]', '[IMPORT_JOB]'); - $request = (new ListImportDataFilesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listImportDataFiles($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getImportDataFiles()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/ListImportDataFiles', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listImportDataFilesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->importJobName('[PROJECT]', '[LOCATION]', '[IMPORT_JOB]'); - $request = (new ListImportDataFilesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listImportDataFiles($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listImportJobsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $importJobsElement = new ImportJob(); - $importJobs = [ - $importJobsElement, - ]; - $expectedResponse = new ListImportJobsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setImportJobs($importJobs); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListImportJobsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listImportJobs($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getImportJobs()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/ListImportJobs', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listImportJobsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListImportJobsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listImportJobs($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listPreferenceSetsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $preferenceSetsElement = new PreferenceSet(); - $preferenceSets = [ - $preferenceSetsElement, - ]; - $expectedResponse = new ListPreferenceSetsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setPreferenceSets($preferenceSets); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListPreferenceSetsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listPreferenceSets($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getPreferenceSets()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/ListPreferenceSets', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listPreferenceSetsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListPreferenceSetsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listPreferenceSets($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listReportConfigsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $reportConfigsElement = new ReportConfig(); - $reportConfigs = [ - $reportConfigsElement, - ]; - $expectedResponse = new ListReportConfigsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setReportConfigs($reportConfigs); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListReportConfigsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listReportConfigs($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getReportConfigs()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/ListReportConfigs', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listReportConfigsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListReportConfigsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listReportConfigs($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listReportsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $reportsElement = new Report(); - $reports = [ - $reportsElement, - ]; - $expectedResponse = new ListReportsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setReports($reports); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->reportConfigName('[PROJECT]', '[LOCATION]', '[REPORT_CONFIG]'); - $request = (new ListReportsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listReports($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getReports()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/ListReports', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listReportsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->reportConfigName('[PROJECT]', '[LOCATION]', '[REPORT_CONFIG]'); - $request = (new ListReportsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listReports($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listSourcesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $sourcesElement = new Source(); - $sources = [ - $sourcesElement, - ]; - $expectedResponse = new ListSourcesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setSources($sources); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListSourcesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listSources($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getSources()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/ListSources', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listSourcesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListSourcesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listSources($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function removeAssetsFromGroupTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/removeAssetsFromGroupTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $expectedResponse = new Group(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/removeAssetsFromGroupTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedGroup = $gapicClient->groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); - $assets = new AssetList(); - $assetsAssetIds = [ - $gapicClient->assetName('[PROJECT]', '[LOCATION]', '[ASSET]'), - ]; - $assets->setAssetIds($assetsAssetIds); - $request = (new RemoveAssetsFromGroupRequest()) - ->setGroup($formattedGroup) - ->setAssets($assets); - $response = $gapicClient->removeAssetsFromGroup($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/RemoveAssetsFromGroup', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getGroup(); - $this->assertProtobufEquals($formattedGroup, $actualValue); - $actualValue = $actualApiRequestObject->getAssets(); - $this->assertProtobufEquals($assets, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/removeAssetsFromGroupTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function removeAssetsFromGroupExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/removeAssetsFromGroupTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedGroup = $gapicClient->groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); - $assets = new AssetList(); - $assetsAssetIds = [ - $gapicClient->assetName('[PROJECT]', '[LOCATION]', '[ASSET]'), - ]; - $assets->setAssetIds($assetsAssetIds); - $request = (new RemoveAssetsFromGroupRequest()) - ->setGroup($formattedGroup) - ->setAssets($assets); - $response = $gapicClient->removeAssetsFromGroup($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/removeAssetsFromGroupTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function reportAssetFramesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new ReportAssetFramesResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $parent = 'parent-995424086'; - $formattedSource = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - $request = (new ReportAssetFramesRequest()) - ->setParent($parent) - ->setSource($formattedSource); - $response = $gapicClient->reportAssetFrames($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/ReportAssetFrames', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); - $actualValue = $actualRequestObject->getSource(); - $this->assertProtobufEquals($formattedSource, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function reportAssetFramesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $parent = 'parent-995424086'; - $formattedSource = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - $request = (new ReportAssetFramesRequest()) - ->setParent($parent) - ->setSource($formattedSource); - try { - $gapicClient->reportAssetFrames($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function runImportJobTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/runImportJobTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/runImportJobTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->importJobName('[PROJECT]', '[LOCATION]', '[IMPORT_JOB]'); - $request = (new RunImportJobRequest()) - ->setName($formattedName); - $response = $gapicClient->runImportJob($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/RunImportJob', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/runImportJobTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function runImportJobExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/runImportJobTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->importJobName('[PROJECT]', '[LOCATION]', '[IMPORT_JOB]'); - $request = (new RunImportJobRequest()) - ->setName($formattedName); - $response = $gapicClient->runImportJob($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/runImportJobTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateAssetTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $expectedResponse = new Asset(); - $expectedResponse->setName($name); - $transport->addResponse($expectedResponse); - // Mock request - $updateMask = new FieldMask(); - $asset = new Asset(); - $request = (new UpdateAssetRequest()) - ->setUpdateMask($updateMask) - ->setAsset($asset); - $response = $gapicClient->updateAsset($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/UpdateAsset', $actualFuncCall); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $actualValue = $actualRequestObject->getAsset(); - $this->assertProtobufEquals($asset, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateAssetExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $updateMask = new FieldMask(); - $asset = new Asset(); - $request = (new UpdateAssetRequest()) - ->setUpdateMask($updateMask) - ->setAsset($asset); - try { - $gapicClient->updateAsset($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateGroupTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateGroupTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $expectedResponse = new Group(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateGroupTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $updateMask = new FieldMask(); - $group = new Group(); - $request = (new UpdateGroupRequest()) - ->setUpdateMask($updateMask) - ->setGroup($group); - $response = $gapicClient->updateGroup($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/UpdateGroup', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $actualValue = $actualApiRequestObject->getGroup(); - $this->assertProtobufEquals($group, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateGroupTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateGroupExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateGroupTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $updateMask = new FieldMask(); - $group = new Group(); - $request = (new UpdateGroupRequest()) - ->setUpdateMask($updateMask) - ->setGroup($group); - $response = $gapicClient->updateGroup($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateGroupTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateImportJobTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateImportJobTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $assetSource = 'assetSource-2028843958'; - $expectedResponse = new ImportJob(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setAssetSource($assetSource); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateImportJobTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $updateMask = new FieldMask(); - $importJob = new ImportJob(); - $importJobAssetSource = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - $importJob->setAssetSource($importJobAssetSource); - $request = (new UpdateImportJobRequest()) - ->setUpdateMask($updateMask) - ->setImportJob($importJob); - $response = $gapicClient->updateImportJob($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/UpdateImportJob', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $actualValue = $actualApiRequestObject->getImportJob(); - $this->assertProtobufEquals($importJob, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateImportJobTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateImportJobExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateImportJobTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $updateMask = new FieldMask(); - $importJob = new ImportJob(); - $importJobAssetSource = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - $importJob->setAssetSource($importJobAssetSource); - $request = (new UpdateImportJobRequest()) - ->setUpdateMask($updateMask) - ->setImportJob($importJob); - $response = $gapicClient->updateImportJob($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateImportJobTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updatePreferenceSetTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updatePreferenceSetTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $expectedResponse = new PreferenceSet(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updatePreferenceSetTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $updateMask = new FieldMask(); - $preferenceSet = new PreferenceSet(); - $request = (new UpdatePreferenceSetRequest()) - ->setUpdateMask($updateMask) - ->setPreferenceSet($preferenceSet); - $response = $gapicClient->updatePreferenceSet($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/UpdatePreferenceSet', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $actualValue = $actualApiRequestObject->getPreferenceSet(); - $this->assertProtobufEquals($preferenceSet, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updatePreferenceSetTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updatePreferenceSetExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updatePreferenceSetTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $updateMask = new FieldMask(); - $preferenceSet = new PreferenceSet(); - $request = (new UpdatePreferenceSetRequest()) - ->setUpdateMask($updateMask) - ->setPreferenceSet($preferenceSet); - $response = $gapicClient->updatePreferenceSet($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updatePreferenceSetTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateSettingsTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateSettingsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $preferenceSet = 'preferenceSet813286142'; - $expectedResponse = new Settings(); - $expectedResponse->setName($name); - $expectedResponse->setPreferenceSet($preferenceSet); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateSettingsTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $updateMask = new FieldMask(); - $settings = new Settings(); - $request = (new UpdateSettingsRequest()) - ->setUpdateMask($updateMask) - ->setSettings($settings); - $response = $gapicClient->updateSettings($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/UpdateSettings', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $actualValue = $actualApiRequestObject->getSettings(); - $this->assertProtobufEquals($settings, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateSettingsTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateSettingsExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateSettingsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $updateMask = new FieldMask(); - $settings = new Settings(); - $request = (new UpdateSettingsRequest()) - ->setUpdateMask($updateMask) - ->setSettings($settings); - $response = $gapicClient->updateSettings($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateSettingsTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateSourceTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateSourceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $priority = 1165461084; - $managed = false; - $pendingFrameCount = 322639125; - $errorFrameCount = 1431911430; - $expectedResponse = new Source(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setPriority($priority); - $expectedResponse->setManaged($managed); - $expectedResponse->setPendingFrameCount($pendingFrameCount); - $expectedResponse->setErrorFrameCount($errorFrameCount); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateSourceTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $updateMask = new FieldMask(); - $source = new Source(); - $request = (new UpdateSourceRequest()) - ->setUpdateMask($updateMask) - ->setSource($source); - $response = $gapicClient->updateSource($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/UpdateSource', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $actualValue = $actualApiRequestObject->getSource(); - $this->assertProtobufEquals($source, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateSourceTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateSourceExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateSourceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $updateMask = new FieldMask(); - $source = new Source(); - $request = (new UpdateSourceRequest()) - ->setUpdateMask($updateMask) - ->setSource($source); - $response = $gapicClient->updateSource($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateSourceTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function validateImportJobTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/validateImportJobTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/validateImportJobTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->importJobName('[PROJECT]', '[LOCATION]', '[IMPORT_JOB]'); - $request = (new ValidateImportJobRequest()) - ->setName($formattedName); - $response = $gapicClient->validateImportJob($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/ValidateImportJob', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/validateImportJobTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function validateImportJobExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/validateImportJobTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->importJobName('[PROJECT]', '[LOCATION]', '[IMPORT_JOB]'); - $request = (new ValidateImportJobRequest()) - ->setName($formattedName); - $response = $gapicClient->validateImportJob($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/validateImportJobTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getLocationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $locationId = 'locationId552319461'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Location(); - $expectedResponse->setName($name2); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - $request = new GetLocationRequest(); - $response = $gapicClient->getLocation($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new GetLocationRequest(); - try { - $gapicClient->getLocation($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $locationsElement = new Location(); - $locations = [ - $locationsElement, - ]; - $expectedResponse = new ListLocationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLocations($locations); - $transport->addResponse($expectedResponse); - $request = new ListLocationsRequest(); - $response = $gapicClient->listLocations($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new ListLocationsRequest(); - try { - $gapicClient->listLocations($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function addAssetsToGroupAsyncTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/addAssetsToGroupTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $expectedResponse = new Group(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/addAssetsToGroupTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedGroup = $gapicClient->groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); - $assets = new AssetList(); - $assetsAssetIds = [ - $gapicClient->assetName('[PROJECT]', '[LOCATION]', '[ASSET]'), - ]; - $assets->setAssetIds($assetsAssetIds); - $request = (new AddAssetsToGroupRequest()) - ->setGroup($formattedGroup) - ->setAssets($assets); - $response = $gapicClient->addAssetsToGroupAsync($request)->wait(); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.migrationcenter.v1.MigrationCenter/AddAssetsToGroup', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getGroup(); - $this->assertProtobufEquals($formattedGroup, $actualValue); - $actualValue = $actualApiRequestObject->getAssets(); - $this->assertProtobufEquals($assets, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/addAssetsToGroupTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } -} diff --git a/owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/Alert.php b/owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/Alert.php deleted file mode 100644 index caca7cc0e1b68c8e0e3b844657c577995e23ff5c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6219 zcmcgw&2t+`6_4cj>&ahf+jw@Ugo%@_#91P-^1|-Qge_T?9kI5gm1PIER5gr7ZF$(y z%rGBb9GCALxIq;+{s5}@4=8R>1*iQJ_MAJ#mDk-fqmgYza-hg1@^rsncfa?0zxTR- z{F!s=z$0akTGZ8i+ELo)ihoKK$F+T1w@sxToSaZs(e0jNnAFWG%1%wG)|yIrr_y|g zrk)+RIxQ$&+wPh)*Rw6dw_U^P=FT>A8k+c74hCRpJ?c4{PL;j-_5t;^j^=BvJ#N=J zi0xX(n_B?7sd=7KWcF|Y3jT9~wrS{!=W9Ox_t@}M1D7&1(|C>hexaObrbp58`rMPi z(tX3W6lPGfboz8d5twZ5W5>pGzEGl_)Y;MT*sY4?Q`geW)(-V_*KqJyb(~r#bg3UZ zjD2~!5iZN%j1%Rl*khq^ZIdq)-wkMTbwzQhAGp>Q-!}uejDNLm@Kez-TDt}{JKOYB zJ2PyzQ0Skk4>HWOLBn{BZ8Z>>R>|&RgvVcV(E1=?!LzLf)or&kK1v*tod8*i0PkS> z%GDf)y59Jv4M%Ss;)a7EHk>%me`16*DRw$BD|Rtgp2l%xQGEix-++-xLRLf?WzorD z8fDKm<@dtm(i|h_h7lB5B|p3|?=W2vA)NB;#woop7OKmG5zc)O&gChKNs#M=9v?RT zb?DY`d@Zzh9X-dgAn?S%`rqG&4A17ejaht7?!jHA2U1E&J)Pa2__jDhR$#7Uc#f%^ zt9&TUhR80=cWgcAQA=<~n#a$Xd@d_i8uU~)u|#$!X@)qNz@x5eYHezI(vmWPC?AeS zIYOg-Zd0~=_ndr&+GJZDR36*%q&W`r!DyILWJ4-2gW+i#sJPM;o@F8b@h!|T0l8`O z+@a(Hn5LH2Hfcw?$Gsv)NKyQ<+o(^+ni){?7-r5;EOF=O65+E+G#jIp6-+1hVb!vI z`l90@qq;|Objx!J*tXXaOUCuMG7z6T4uqNtwF zs#W(~TIJSbkbx89Ff=1YnDOWtb(t@|gAfb(XE*OZ$*056g0VFv|1|~kgA7}QX=H|v zL=~(?j?eat9#wsel_c1_0@Gg5{w39YX#&^f%ukV*FlidrSDtj2)9Itpdl^_cyN||V zR~vAb{c$aqc$$$6Oa!hewj%#~6=wUaoD1`Dj_vB2IpgUp`4X06>Z|@KD$%KJcKBg4 z`K{5Lj#tZK^>+=u89}_fLylmnkFB*m=0)bRO#ai`0~eXSPC4vqAGW9Y`YG+GrrniR zIQAHx?r(bE?jA4%guQ@A3D{Vx)n5hFJx7VLx`EcE(lTFU|5gWx!Mr%c zqW36vY=L)magiFgS{&zK8YK<2h&(#^(b_ymv^?O z;4Wjo{KrXHyb^S>3{xkDi9MDeBqMN|d<=71x9id_*BDQl;TiF8hzt8Oi43GeExTt} z8a8Tbh&;=QTLLLLHn0GUy8wly6B{*8^L*8IBKciUQb{yA< zsIwwFFpas%0xV5)`ff&Z2bDdkjQ!I^+-SoZWm^!HqGxy>-Uw9I@N>am$QN&eT8^O( z1kw%y$)CgGb?5bCbc(l-*XTkfeQ!H4=biiw%DEtDC>{xV#y!e)dQOhZo@5M!u8kK1 zRwXj|cZq@gmlVuInsxJObXel;kV=1zl~KpM@h}%zV^q0Kc%ntJyiY2}SiE79e*`Nx zeP_k!D|#N5%6XU+jOAsrkp3hk|0WH}!3Z@ZXvZ}-g!%t_nY@MRB6|%S$P;4iARS3g@KBL%2U| zPPL}i>Pr)aKcwFjf0u^jrAS(i~cA3+o+YFAxzb{GMcDtHoycV@Pcai+_-4J(9u*1Y#d+tK~csG>Pv+WGb#v7G? zI|=jL5%GoK1l9(wJ?wg+nnuqMy?iEL9!=!|#B4Qji)tX+J_94afR%xD(A_=97pl9E z-~MkFVfo|uA#GZx8a-+fFGcf(C*r*~X>e4?_ zZ;F3Q!TX68a=0#$Tqr{0$`ScADKu!6{PXRKL7v}AUIjK_{BYinternalAddGeneratedFile( - ' -ƒ -(google/monitoring/v3/alert_service.protogoogle.monitoring.v3google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto google/monitoring/v3/alert.protogoogle/protobuf/empty.proto google/protobuf/field_mask.proto"• -CreateAlertPolicyRequest; -name ( B-àAúA\'%monitoring.googleapis.com/AlertPolicy< - alert_policy ( 2!.google.monitoring.v3.AlertPolicyBàA"T -GetAlertPolicyRequest; -name ( B-àAúA\' -%monitoring.googleapis.com/AlertPolicy"´ -ListAlertPoliciesRequest; -name ( B-àAúA\'%monitoring.googleapis.com/AlertPolicy -filter ( BàA -order_by ( BàA - page_size (BàA - -page_token ( BàA"ƒ -ListAlertPoliciesResponse9 -alert_policies ( 2!.google.monitoring.v3.AlertPolicy -next_page_token (  - -total_size ("Ž -UpdateAlertPolicyRequest4 - update_mask ( 2.google.protobuf.FieldMaskBàA< - alert_policy ( 2!.google.monitoring.v3.AlertPolicyBàA"W -DeleteAlertPolicyRequest; -name ( B-àAúA\' -%monitoring.googleapis.com/AlertPolicy2ž -AlertPolicyService¨ -ListAlertPolicies..google.monitoring.v3.ListAlertPoliciesRequest/.google.monitoring.v3.ListAlertPoliciesResponse"2ÚAname‚Óä“%#/v3/{name=projects/*}/alertPolicies– -GetAlertPolicy+.google.monitoring.v3.GetAlertPolicyRequest!.google.monitoring.v3.AlertPolicy"4ÚAname‚Óä“\'%/v3/{name=projects/*/alertPolicies/*}µ -CreateAlertPolicy..google.monitoring.v3.CreateAlertPolicyRequest!.google.monitoring.v3.AlertPolicy"MÚAname,alert_policy‚Óä“3"#/v3/{name=projects/*}/alertPolicies: alert_policy‘ -DeleteAlertPolicy..google.monitoring.v3.DeleteAlertPolicyRequest.google.protobuf.Empty"4ÚAname‚Óä“\'*%/v3/{name=projects/*/alertPolicies/*}Ë -UpdateAlertPolicy..google.monitoring.v3.UpdateAlertPolicyRequest!.google.monitoring.v3.AlertPolicy"cÚAupdate_mask,alert_policy‚Óä“B22/v3/{alert_policy.name=projects/*/alertPolicies/*}: alert_policy©ÊAmonitoring.googleapis.comÒA‰https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/monitoring,https://www.googleapis.com/auth/monitoring.readBÌ -com.google.monitoring.v3BAlertServiceProtoPZAcloud.google.com/go/monitoring/apiv3/v2/monitoringpb;monitoringpbªGoogle.Cloud.Monitoring.V3ÊGoogle\\Cloud\\Monitoring\\V3êGoogle::Cloud::Monitoring::V3bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/Common.php b/owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/Common.php deleted file mode 100644 index 0fef40d6d1092c1e0a0c14353880a477bd27cd54..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2539 zcmbVOYirw97>?~+k8@GfwDrO+r&*y+>68*Lg(}O2VxKqyTlQqdlwlCEbnFTgN$3*D zMt;Hm!(jVZ*oXa%!T!j8#a`VkId!|Sd~we6-k6FJ)$C+C6=-RQ(!0}9b zdUVq`0y6-(*c(E&c1?X((`M+QAxr}aae_>6R)x(-x& zhO<=qQSngtNVEg$*_t(KQD65=7YgfxD$h@8FrzF&>W69A$elUC^(050e=o^19C#ru zM#tErLFn11ao&-GyV-xE1w;w1Ick}H;F;qvs)^_GqH-ULEN6AKLTL8?GgVCJVW3^R zi^IlLe)X-H5+@kOjHe5jpZct_sLp5T*KPFVUk8WXOH{agwz!+d{^zM-JY3MNBO|RU z8Mpl}?#qKL^+e&|T?rxO)}_W!vqH-5AvA_osyET8R>GzF`sEV)5LKa=S6`=a8Q==Q zkI<&!z&O$ruK-?3@TfEPG{u(z-vIm-VvR!2Qt1jvtH(7itxt1JuGrbjrSmnk66bSZ zq0NZ;cp?E|U!Zkr8){TjElR3-yq~$r2;pYEVmXAMXQ4t}nnwJh2; zLPAGuORCh92(!fQ01@%IMLLSWl-QYqEGUF2!+`823ZkSCx!>zVa0RA`N&S#FirVY6 zh|DarTWBLeyQ0LP!clm`RCCu|B1p_;9=qAQk`!hu*B@MUnQfLqn~Ar9(rS?*vy(@S zEmTFmA`FwKn4lLzXF!-5@bMrqzmSEdBKD+2e>WHOiQFWTB6f)S`ZdEY7Mw5-779*Y zGJ6XJFHe|w8c%+4E3G0XFYJBq6lmi+sWeST;VmXvCVyK5&Qb5c&s!D&vv> diff --git a/owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/DroppedLabels.php b/owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/DroppedLabels.php deleted file mode 100644 index f7e45d86002a..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/DroppedLabels.php +++ /dev/null @@ -1,33 +0,0 @@ -internalAddGeneratedFile( - ' -— -)google/monitoring/v3/dropped_labels.protogoogle.monitoring.v3"| - DroppedLabels= -label ( 2..google.monitoring.v3.DroppedLabels.LabelEntry, - -LabelEntry -key (  -value ( :8BÍ -com.google.monitoring.v3BDroppedLabelsProtoPZAcloud.google.com/go/monitoring/apiv3/v2/monitoringpb;monitoringpbªGoogle.Cloud.Monitoring.V3ÊGoogle\\Cloud\\Monitoring\\V3êGoogle::Cloud::Monitoring::V3bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/Group.php b/owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/Group.php deleted file mode 100644 index 999b703bd1a3..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/Group.php +++ /dev/null @@ -1,37 +0,0 @@ -internalAddGeneratedFile( - ' -‹ - google/monitoring/v3/group.protogoogle.monitoring.v3"€ -Group -name (  - display_name (  - parent_name (  -filter (  - -is_cluster (:™êA• -monitoring.googleapis.com/Group!projects/{project}/groups/{group}+organizations/{organization}/groups/{group}folders/{folder}/groups/{group}*BÅ -com.google.monitoring.v3B -GroupProtoPZAcloud.google.com/go/monitoring/apiv3/v2/monitoringpb;monitoringpbªGoogle.Cloud.Monitoring.V3ÊGoogle\\Cloud\\Monitoring\\V3êGoogle::Cloud::Monitoring::V3bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/GroupService.php b/owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/GroupService.php deleted file mode 100644 index a03455b22eaefbdb97cd6bc07b10a02c337b4ce1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3723 zcmb_fL2nyH6vj@IIuoE|)DqXF?Zi!q8-E@PSnn>o zV~0?M12+UhLcQ=4fd9Z9Rh;0K69-QG1Wvq}on5aTJGLcqakTT^oA15%y>DjTe%EVx z=nkn+hx!Jiby7PatVN0EyUaCRo76gu2K9;Qwmr+HzCy_EK6!utkUZFZe7Fp*f!py- zs*sLyN<8*DRCt^Z!Z7G5BJk&RYPMyPfEf&aR;-|E!OoUpTVFyN+oWOG0fhkP zZ5tiOWR~j??y&Eev~Z7vF}dxE=R(@sBm#86D*;u|A3Kctj$!M&G%$V3gDelgR8^al z#r5M~3isr;Je<`ag%G2vo&&i}nBSqv-3jq2>-f%=z|8}k#{cO<%B6Xht~rj&tKd3; zs`hf~g&5_yV_Vc=)A>BKs9i79meI9be>zv$T3UZXC26KYJH1yQm-HRC4dk30a=*7= z;N;FRYoKQj+8#R@?kdQ(@s1^_rPb>(lODpj72@7=Caj`wuc5-EbB3>mmI@>-CsOH_ za!blio-i6%T9!*aJX|3_Sm1;7 zzCc8z#SIxmNC`}3k@Dh(i}~NuXz@KOV4_#S6Z(0F1`OXvm$>3&FOyVZzO1kQrKSJX zmhtT#4kZi zjG3uo?4ql65FF~%4TmM7T$(D%BAWM%Cangbj@emooy8a-@rk*gQ71bm!e!80!?Ho= z@*g3bEM?$Tv($h-1wFkqx3k?i_fU7F<;%jADep{2O{d$e7n{+MwZ z+bX_IkAWQHAOl6S@XHYc1xx4gnqY3Xv*^&$;}DAHEeUaH=w}Zr_e%TVDX476DAX(cZ*Zof?Alu6AciSH+QRKTxa%%h^5;M~ut=i2oI zqW+Wo5AB;&i!m=yi^b#PV+kof=Zy|)!6nG;)HgiaU=7!Aua7hD?KOp|0!LK6{Cf&z z;d(K&Fy+OhYKYt8LF!{ofQuaX)uibrUs#X{%zAe-@y)Ak^&on+U(&gXcvvYrJkLnp z;CZGTm7Yh7x-M4rU;czDug=QK>d3cvf1Cuc_LQ7pZ)U!4W_IWPH^IvQZjeLjQEo-l zA)_-Ay`&`Ie&pM}OGfc{OgXXrX~0~{bwUn~$q&Z^^6=pCU>l*KA9I@;Wa9f1m$s+A z$0DCIZ_+;Pwx=}W%+{qh0MDAzFtBV&4*R_$8d;7NS>~YxnnyFBdD7hluw5$*30k28 z_!$U(f_UUIn}m@S;nz(T4jBexmdk#^%=gIHazl#Hw{6FIOVXtXh%0$oFQ9tcAK1zUAz~)-B zaU=gCB|YQ`Yt_Gv#bI$WFo-f~dQj^7$V9sXWl8ANa_a?BXjMB+eNjsKfK91vGqlv& zP{Oa6){7ECmO#z|>YNC>=HEpC;o&*ujD}hh*44x%F}2hI64q4%V2pCgD+zOb&MIY} zmR$P^%IH+iYJEfIb?cn~j3bS;`%qQc3|}$Nsjnfn)-iYHz;e8^=}MCP9_=*)K#DPp zkZ=96M1S&5u+(IL*4k&V9*8=G^%7Y_@jp&+bN!&JT5ZDR7>|W|8ADW>e-&XXlQc_B zy9-xcF?K^|b{K@H^PGF3vz*Nw?nk&PbD6`bw2Z}REefwoa+%x4Zw0vW#xt!7Yp>{; zEPmw;{X|FAI;-mUKTDS?DvDNV{!)ZmjuM{vsO6^8QdT&XaY?^RK_ykK2asrqUa)#L+7no5nFb`L&?aN_Xl!Mg#m$q=nD-pv;PIWAiO zBfL6>GQO-?`OziqL#U$XyLXbuqHJsU_!?}6coTY)N@!uu*Y3AUGrL|;cwl%aM7Ht>25t%*8*D$QSuP#xq9YOtSKD1~-h8?r2?ZY2BUKefzmuRdSon(yc~XsvYDU&H?@d|07jR diff --git a/owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/MetricService.php b/owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/MetricService.php deleted file mode 100644 index 5cd56e066aeefad844fdcf1fcff8a8fcad56221e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7118 zcmb_hOLH7o6{clLk?s&hzK-Rw5|eh@j->H;CN+ZtZdt~yheg1O9ocazVT!3%&z(_| zneL_^Qe>4j>|jL|3t$BcR#YWB3X0+fP$`N9*`&0himbfKItz+(AN`!3k;cIrkNTc- z?m6Fi+^=un{+_ezpeynwv52etq$Teh$o?*o9oP14!|uvELAy;{*|2+#*(Gj8me(K1 zZ$Ee}Z>+!d_%f(^cHkOBl{>cG>5^*CwoKo4O{-Jgt5puK< z)%2Ps>}~2@^C<+fBDeLfN5DeAY&)DgBDK;@kajk0-%O6eWo=Li`RkEw^nYKHcD$nAG zI=mi8YnzBt8!5ukwNeGxShIUj(x-PhtvzbMQK>R{{U4LyY1XG}$)0FuaOm)EqvGrX9UQnjTEb;u&}}fiXht zk#B!Utl~HoQ+^?##gqN@92h$UZ=jb$tedT9K6*t-KC@V;H5P=w6>zvR%-0L(C5wFI zHxu44rxhPv+a$xV%R)y3i=ac#2c7b33BAfNU{#otsJp2|)mWm+xHKeD8B5Qb9T#01 z;F!qBcM;}Qo0E@MQ|ZWhG%yE0M)NcW8TktS<_+p{T5$f!r!Oy0lKZWJCu?0^y%$(0Q8K$7YWJ<1tAz6jV`bh*fr()!OU$ z>fl<7P2h9s8Ni~!x6l+j5cc#g>-j=W2@4}(bgy2ah8X<;Nv`@PD(Ib#OFE2qusKzz zUC!6mVnKWto%e`gTP@u^XeKQbAgEJWm_<{z+ahjr=b$)Ak-%GMe9t8N#TVeOnVOpK zL@uN(Fb?t)u)sr0jmIglnH`VQbXTRZfM#NVsXCrQ)Ngd6P}J>92$j# zslu58{w5j^;Kb&qjPe@^UEtjp?-cg7CQ6U@cAb^p4Rqb;+CeLv`#s%)Q^ghgL?;uF znx7EE$7(v%G3M2Yq4KtSiq2;}+n~Wg1!wT1MRc;!v7&@uN0a<~7Tuo%&??9&pXb2x zDCqT|fbm6i)(7g{Z8|nIQq!;l%ZDV=l6eK4^8&*lo|jsrhuH*PLzAiG)WhVY+b$ck z*tWuApTCPHI0#A<3EetB)#p$l=_7MPX`{J!0^%O@=liV4H#IoT+XABr;3nO8}WcC0Zn`?Jr!_|@3Aag9>$ zL&|PffI!pH;8jaU;mtw(q8I1Y!~c-bw}!JnyqxdlaIG-JQ}a`0JsAuz^1NV%#!@Yn zj__Y3e#U2Mj)!acVX$0fcvr{^<_AoV0XiZpZzcm-!i|NzNFXiQP4Vv~bS{Sl;y3a= z&k+q#AIi6sTS*6jQs?>C?;eBq?{MJe^GG}Zt9RGN1BGG&+tFl9%yo zv0&To0{3JSD;B}OmC$VVu*Ns?!^+BqC=5!>onvj5g-iDnM3F^#O*t`2RVv|6BK{%{ zjmHrP|1THs4|1`tRAT6o(>}&dHP{QE@C_WEKbAh#E+*nAat?uvd z3ydSSsR#Zp+%^F%z2S6qziqp{@=4=C{>6xn!&Wz?4XP#Yw=GYRhac6}kbelPPcLWvJZ^d;3aay}k0N&b=N I2pu8xKQr*R@&Et; diff --git a/owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/MutationRecord.php b/owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/MutationRecord.php deleted file mode 100644 index cc7e45493f8f..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/MutationRecord.php +++ /dev/null @@ -1,32 +0,0 @@ -internalAddGeneratedFile( - ' -ò -*google/monitoring/v3/mutation_record.protogoogle.monitoring.v3"U -MutationRecord/ - mutate_time ( 2.google.protobuf.Timestamp - -mutated_by ( BÎ -com.google.monitoring.v3BMutationRecordProtoPZAcloud.google.com/go/monitoring/apiv3/v2/monitoringpb;monitoringpbªGoogle.Cloud.Monitoring.V3ÊGoogle\\Cloud\\Monitoring\\V3êGoogle::Cloud::Monitoring::V3bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/Notification.php b/owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/Notification.php deleted file mode 100644 index 247b22413b13dd8762fee1d3312bc23d6c75c015..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2943 zcmbVO-A?016s`jc?1Y6~vufQ`v;&JomR%AxQPtM`R0#x%R6+zHtFA0X6MGV-H6Ckh zr(#jwq!+#EO<$qv3silGUh@dOsCqnh5(h#zySa*I&iBpCcg}Zaw!d*NT=WbdQilrS zQwz7Quzx|ZE4a^1ZsS(aZc~9xe(5rsiX6uKC%Af2$Cdq~`U*fj9te}_xWjqJruj?m zFrN$Nbn@L|-r+uLGn4p?J2}aTkV7u1=Mt0R!&>>6`otnWF%Bi%I3B=_MsW)v(ZRc#U~Y1`9J{vo~;x9o#0iM}gpOY&&qwa6dQ%oH!=UKF1Mf z7`x_jIQ0(hZ>Sau0U{Vjj!%U{Y-68#reH1{vIe2L-l6_LzHlV_JYF`WV{M#`_NeQ3 zHo1d+5zyr77z^qL!r7Ah4hedLf5sTON-i@F7`3f3y&zr2g{}`zH6*zY`W?cTTCvg*7?LApNfdaa}6B@laVc zo4YKok&_R1`e zjEA{uLj84UJpFNETErQNr&i*r;X0v%!T2x`hir@uxs0`K3Mp z&-<|`8>_$1qNOn++^UBs$yzB-{au<6{Q1@ie_AHbCT=p$+^w}EDJK``yMTIsTf?Kp^^Q-(;mv2+Mb-ZksyK2 z4IJtVG)o=QvZJC~o1(mfCdt95BptU||RHxBqtL~!5 zw_1d!J(Ai?gwJfEbW)Wxn);Dm#eLurde9B`sL2MPr@m4$pQFXwLcRsE`UN~pPx0)t7o;!9t>CZAAg`OAaq`h!r)thvYZ=yrSyN5o6Vyx}4YbAzarR#ny~8NO65|rN4|`afwG?=u>8ndGN`|=vmf7J%s)P Dx_sV8 diff --git a/owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/NotificationService.php b/owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/NotificationService.php deleted file mode 100644 index b7607591fe99..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/NotificationService.php +++ /dev/null @@ -1,97 +0,0 @@ -internalAddGeneratedFile( - ' -Õ% -/google/monitoring/v3/notification_service.protogoogle.monitoring.v3google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto\'google/monitoring/v3/notification.protogoogle/protobuf/empty.proto google/protobuf/field_mask.protogoogle/protobuf/timestamp.proto"¡ -)ListNotificationChannelDescriptorsRequestM -name ( B?àAúA97monitoring.googleapis.com/NotificationChannelDescriptor - page_size ( - -page_token ( "— -*ListNotificationChannelDescriptorsResponseP -channel_descriptors ( 23.google.monitoring.v3.NotificationChannelDescriptor -next_page_token ( "x -\'GetNotificationChannelDescriptorRequestM -name ( B?àAúA9 -7monitoring.googleapis.com/NotificationChannelDescriptor"µ - CreateNotificationChannelRequestC -name ( B5àAúA/-monitoring.googleapis.com/NotificationChannelL -notification_channel ( 2).google.monitoring.v3.NotificationChannelBàA"à -ListNotificationChannelsRequestC -name ( B5àAúA/-monitoring.googleapis.com/NotificationChannel -filter ( BàA -order_by ( BàA - page_size (BàA - -page_token ( BàA"™ - ListNotificationChannelsResponseH -notification_channels ( 2).google.monitoring.v3.NotificationChannel -next_page_token (  - -total_size ("d -GetNotificationChannelRequestC -name ( B5àAúA/ --monitoring.googleapis.com/NotificationChannel"¦ - UpdateNotificationChannelRequest4 - update_mask ( 2.google.protobuf.FieldMaskBàAL -notification_channel ( 2).google.monitoring.v3.NotificationChannelBàA"v - DeleteNotificationChannelRequestC -name ( B5àAúA/ --monitoring.googleapis.com/NotificationChannel -force ("u -.SendNotificationChannelVerificationCodeRequestC -name ( B5àAúA/ --monitoring.googleapis.com/NotificationChannel"¥ --GetNotificationChannelVerificationCodeRequestC -name ( B5àAúA/ --monitoring.googleapis.com/NotificationChannel/ - expire_time ( 2.google.protobuf.Timestamp"o -.GetNotificationChannelVerificationCodeResponse -code ( / - expire_time ( 2.google.protobuf.Timestamp"z - VerifyNotificationChannelRequestC -name ( B5àAúA/ --monitoring.googleapis.com/NotificationChannel -code ( BàA2ê -NotificationChannelServiceì -"ListNotificationChannelDescriptors?.google.monitoring.v3.ListNotificationChannelDescriptorsRequest@.google.monitoring.v3.ListNotificationChannelDescriptorsResponse"CÚAname‚Óä“64/v3/{name=projects/*}/notificationChannelDescriptorsÝ - GetNotificationChannelDescriptor=.google.monitoring.v3.GetNotificationChannelDescriptorRequest3.google.monitoring.v3.NotificationChannelDescriptor"EÚAname‚Óä“86/v3/{name=projects/*/notificationChannelDescriptors/*}Ä -ListNotificationChannels5.google.monitoring.v3.ListNotificationChannelsRequest6.google.monitoring.v3.ListNotificationChannelsResponse"9ÚAname‚Óä“,*/v3/{name=projects/*}/notificationChannelsµ -GetNotificationChannel3.google.monitoring.v3.GetNotificationChannelRequest).google.monitoring.v3.NotificationChannel";ÚAname‚Óä“.,/v3/{name=projects/*/notificationChannels/*}ä -CreateNotificationChannel6.google.monitoring.v3.CreateNotificationChannelRequest).google.monitoring.v3.NotificationChannel"dÚAname,notification_channel‚Óä“B"*/v3/{name=projects/*}/notificationChannels:notification_channelƒ -UpdateNotificationChannel6.google.monitoring.v3.UpdateNotificationChannelRequest).google.monitoring.v3.NotificationChannel"‚ÚA update_mask,notification_channel‚Óä“Y2A/v3/{notification_channel.name=projects/*/notificationChannels/*}:notification_channel® -DeleteNotificationChannel6.google.monitoring.v3.DeleteNotificationChannelRequest.google.protobuf.Empty"AÚA -name,force‚Óä“.*,/v3/{name=projects/*/notificationChannels/*}Ü -\'SendNotificationChannelVerificationCodeD.google.monitoring.v3.SendNotificationChannelVerificationCodeRequest.google.protobuf.Empty"SÚAname‚Óä“F"A/v3/{name=projects/*/notificationChannels/*}:sendVerificationCode:*‡ -&GetNotificationChannelVerificationCodeC.google.monitoring.v3.GetNotificationChannelVerificationCodeRequestD.google.monitoring.v3.GetNotificationChannelVerificationCodeResponse"RÚAname‚Óä“E"@/v3/{name=projects/*/notificationChannels/*}:getVerificationCode:*Ê -VerifyNotificationChannel6.google.monitoring.v3.VerifyNotificationChannelRequest).google.monitoring.v3.NotificationChannel"JÚA name,code‚Óä“8"3/v3/{name=projects/*/notificationChannels/*}:verify:*©ÊAmonitoring.googleapis.comÒA‰https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/monitoring,https://www.googleapis.com/auth/monitoring.readBÓ -com.google.monitoring.v3BNotificationServiceProtoPZAcloud.google.com/go/monitoring/apiv3/v2/monitoringpb;monitoringpbªGoogle.Cloud.Monitoring.V3ÊGoogle\\Cloud\\Monitoring\\V3êGoogle::Cloud::Monitoring::V3bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/QueryService.php b/owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/QueryService.php deleted file mode 100644 index fb4ffd3bc28d..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/QueryService.php +++ /dev/null @@ -1,32 +0,0 @@ -internalAddGeneratedFile( - ' -¼ -(google/monitoring/v3/query_service.protogoogle.monitoring.v3google/api/client.proto)google/monitoring/v3/metric_service.proto2Þ - QueryService¡ -QueryTimeSeries,.google.monitoring.v3.QueryTimeSeriesRequest-.google.monitoring.v3.QueryTimeSeriesResponse"1‚Óä“+"&/v3/{name=projects/*}/timeSeries:query:*©ÊAmonitoring.googleapis.comÒA‰https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/monitoring,https://www.googleapis.com/auth/monitoring.readBÌ -com.google.monitoring.v3BQueryServiceProtoPZAcloud.google.com/go/monitoring/apiv3/v2/monitoringpb;monitoringpbªGoogle.Cloud.Monitoring.V3ÊGoogle\\Cloud\\Monitoring\\V3êGoogle::Cloud::Monitoring::V3bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/Service.php b/owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/Service.php deleted file mode 100644 index ffa79a3a9746c27bd7d886c8dec772ecbf848b0b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5715 zcmcIo-EJGl753`S;-MtcYuTph)>zR_EV~Zbh(QogQ4Erj6{3>O$g&&+1UAdv5jFL4 zce_7y6hl{ih2Hh5=tY5|7wt_Sp%+1K3giKD?WgFOpCy+RMbQD`8;d*heRIy4@0>X^ zpFi=s)Z*+^L#gSP1n}i(eW|yHPh{S)FysW)3%>$&z>J@JKK%J zHG~Fk6CiqQb7D3HA#`v0XRmN1fF3MZMRw5C!t{(q0!pq z$ku)z**Yq30+_ZD1lkM10B=FVe_qtKsi_5_5#oRMX`oYFjv6-o9&O*!jtx5?h&?~| zIC9L8x{k&G&mEJjKhy*#n|t4L(bp|4wx!A3N7q{oCnUaO*sX06m_GH;wI)ujR5~Q= z2aSDMe<+t_bo5wT7dBQZ=ZxIaLO&wO)iup0VdOiT+-^p2*8i(DCQ?<8ww_XATQzcG z^r-7sDg&0R%X>L!^&kj$HU1+Ajc~SK#C`jW)yKi zu5pI-OBn`HsKRpF2&mboxIT>|H3pF+Y6Vguu}PPN{%LNR!!J|oVLV^0K{`U~b=znY zJIJkQvzRC!O?KcV0`~a)9S7IUFT#Szo%~%$^%DW}G}U#j$R;|qM6%}BU}ae3Y6h+% z8#~bClnyM_h32_%)GRF8uE{H;n8A`g&Wc2`--c_FD4~j3j7Ew9l0&&U_BH+$c28TPk_)zaDX&~pJ7QN0N(Ec`tEMAa2>{f7eSM3Ves3#n^xJ9ItWCOu;7ri)T^ zZEUA>c8uia`OaT7h3keL3aR{C0JQdn(BLm;?5GC0effVWur!p*iD}#ov70YpB^I#E z(;1$pTa)uN$sC_@$-MmpROxr(tD1({*W^^@+A_@d3_Bt@E~3iJXG*>RsX_U;0n71W zFEqdn&VLMfn z9+{?3VFzeR-Gf`wYAI&wSa{B2Uz}s9mfrZy#C_gl%Qj+&x&(6_*RXl1P}DN4u(ZIt zgKVgHW~4W6$CPnXR*d^lJk>tM24=Vo;~mt>#+?|Δ}K@ry+K1`OlNH=3lVrP5h zz8;5SRvb~y&k$1K6PP=q>``OqmHzVCi{?(f@wBnCoxP$i!rarBdwba#jML)I z*Uh~~y>XaTDnHD;tNv#O5_c_W_Ne@LvMYL)x$#@abkzfH<@3iZDK z3Wrn3{ry>$N19T@hCp=hg&&pS>=?+j3@O?8*pzEEy>WNEQbZZEDGKZhR&M?fks#C& zOhj9e-uPfV@IXvOJh5KH_&1nb?wdg3Sy{Uf|4K|9;A;yo$CO|A_Y5q?W~nQ%fW6m= zYvEO47SlP|u`Kd0*yQxEu;3*RJ9swbcd%si42s2^+B7`n)iu3wK_eY6RIDZ-b)Vw3 zfEpN-DqOYkoxw3rWw|Jh4@aM8Ps|=rmSJBKc2@i4IT&<*kW!SBl) zdg0a`(k?sGDG3f({pV52;uSIUX**)KZQYDQY5oQ3*-p%^N8y)On5@M{7fv8EvVwXC zu5%OPN`6djbXhcPY97?KVZ}YZF2_WV@+(*sZjB&$ds6rYG9!ktm4-YSTImtY`z*k+ z%=ZiSaPj4PQ266KWJWZuYH*Xg!OUeh3cQ<Ilo3;EH#&&p@_;zvZ z`dtH`jt*l@;R;{Ds$9BD3internalAddGeneratedFile( - ' -ó -*google/monitoring/v3/service_service.protogoogle.monitoring.v3google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto"google/monitoring/v3/service.protogoogle/protobuf/empty.proto google/protobuf/field_mask.proto"š -CreateServiceRequest9 -parent ( B)àAúA#!monitoring.googleapis.com/Service - -service_id ( 3 -service ( 2.google.monitoring.v3.ServiceBàA"L -GetServiceRequest7 -name ( B)àAúA# -!monitoring.googleapis.com/Service"‡ -ListServicesRequest9 -parent ( B)àAúA#!monitoring.googleapis.com/Service -filter (  - page_size ( - -page_token ( "` -ListServicesResponse/ -services ( 2.google.monitoring.v3.Service -next_page_token ( "| -UpdateServiceRequest3 -service ( 2.google.monitoring.v3.ServiceBàA/ - update_mask ( 2.google.protobuf.FieldMask"O -DeleteServiceRequest7 -name ( B)àAúA# -!monitoring.googleapis.com/Service"Ö -"CreateServiceLevelObjectiveRequest9 -parent ( B)àAúA# -!monitoring.googleapis.com/Service" -service_level_objective_id ( Q -service_level_objective ( 2+.google.monitoring.v3.ServiceLevelObjectiveBàA"¨ -GetServiceLevelObjectiveRequestE -name ( B7àAúA1 -/monitoring.googleapis.com/ServiceLevelObjective> -view (20.google.monitoring.v3.ServiceLevelObjective.View"Õ -!ListServiceLevelObjectivesRequest9 -parent ( B)àAúA# -!monitoring.googleapis.com/Service -filter (  - page_size ( - -page_token ( > -view (20.google.monitoring.v3.ServiceLevelObjective.View"Œ -"ListServiceLevelObjectivesResponseM -service_level_objectives ( 2+.google.monitoring.v3.ServiceLevelObjective -next_page_token ( "¨ -"UpdateServiceLevelObjectiveRequestQ -service_level_objective ( 2+.google.monitoring.v3.ServiceLevelObjectiveBàA/ - update_mask ( 2.google.protobuf.FieldMask"k -"DeleteServiceLevelObjectiveRequestE -name ( B7àAúA1 -/monitoring.googleapis.com/ServiceLevelObjective2ê -ServiceMonitoringService— - CreateService*.google.monitoring.v3.CreateServiceRequest.google.monitoring.v3.Service";ÚAparent,service‚Óä“$"/v3/{parent=*/*}/services:service~ - -GetService\'.google.monitoring.v3.GetServiceRequest.google.monitoring.v3.Service"(ÚAname‚Óä“/v3/{name=*/*/services/*}‘ - ListServices).google.monitoring.v3.ListServicesRequest*.google.monitoring.v3.ListServicesResponse"*ÚAparent‚Óä“/v3/{parent=*/*}/services˜ - UpdateService*.google.monitoring.v3.UpdateServiceRequest.google.monitoring.v3.Service"<ÚAservice‚Óä“,2!/v3/{service.name=*/*/services/*}:service} - DeleteService*.google.monitoring.v3.DeleteServiceRequest.google.protobuf.Empty"(ÚAname‚Óä“*/v3/{name=*/*/services/*}ú -CreateServiceLevelObjective8.google.monitoring.v3.CreateServiceLevelObjectiveRequest+.google.monitoring.v3.ServiceLevelObjective"tÚAparent,service_level_objective‚Óä“M"2/v3/{parent=*/*/services/*}/serviceLevelObjectives:service_level_objectiveÁ -GetServiceLevelObjective5.google.monitoring.v3.GetServiceLevelObjectiveRequest+.google.monitoring.v3.ServiceLevelObjective"AÚAname‚Óä“42/v3/{name=*/*/services/*/serviceLevelObjectives/*}Ô -ListServiceLevelObjectives7.google.monitoring.v3.ListServiceLevelObjectivesRequest8.google.monitoring.v3.ListServiceLevelObjectivesResponse"CÚAparent‚Óä“42/v3/{parent=*/*/services/*}/serviceLevelObjectivesŒ -UpdateServiceLevelObjective8.google.monitoring.v3.UpdateServiceLevelObjectiveRequest+.google.monitoring.v3.ServiceLevelObjective"…ÚAservice_level_objective‚Óä“e2J/v3/{service_level_objective.name=*/*/services/*/serviceLevelObjectives/*}:service_level_objective² -DeleteServiceLevelObjective8.google.monitoring.v3.DeleteServiceLevelObjectiveRequest.google.protobuf.Empty"AÚAname‚Óä“4*2/v3/{name=*/*/services/*/serviceLevelObjectives/*}©ÊAmonitoring.googleapis.comÒA‰https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/monitoring,https://www.googleapis.com/auth/monitoring.readBØ -com.google.monitoring.v3BServiceMonitoringServiceProtoPZAcloud.google.com/go/monitoring/apiv3/v2/monitoringpb;monitoringpbªGoogle.Cloud.Monitoring.V3ÊGoogle\\Cloud\\Monitoring\\V3êGoogle::Cloud::Monitoring::V3bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/Snooze.php b/owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/Snooze.php deleted file mode 100644 index e98aca9ec3cc..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/Snooze.php +++ /dev/null @@ -1,39 +0,0 @@ -internalAddGeneratedFile( - ' - -!google/monitoring/v3/snooze.protogoogle.monitoring.v3google/api/resource.proto!google/monitoring/v3/common.proto"Å -Snooze -name ( BàA< -criteria ( 2%.google.monitoring.v3.Snooze.CriteriaBàA9 -interval ( 2".google.monitoring.v3.TimeIntervalBàA - display_name ( BàAH -Criteria< -policies ( B*úA\' -%monitoring.googleapis.com/AlertPolicy:JêAG - monitoring.googleapis.com/Snooze#projects/{project}/snoozes/{snooze}BÆ -com.google.monitoring.v3B SnoozeProtoPZAcloud.google.com/go/monitoring/apiv3/v2/monitoringpb;monitoringpbªGoogle.Cloud.Monitoring.V3ÊGoogle\\Cloud\\Monitoring\\V3êGoogle::Cloud::Monitoring::V3bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/SnoozeService.php b/owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/SnoozeService.php deleted file mode 100644 index c0b830a53194..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/SnoozeService.php +++ /dev/null @@ -1,56 +0,0 @@ -internalAddGeneratedFile( - ' -• -)google/monitoring/v3/snooze_service.protogoogle.monitoring.v3google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto!google/monitoring/v3/snooze.proto google/protobuf/field_mask.proto"‚ -CreateSnoozeRequest8 -parent ( B(àAúA" monitoring.googleapis.com/Snooze1 -snooze ( 2.google.monitoring.v3.SnoozeBàA"” -ListSnoozesRequest8 -parent ( B(àAúA" monitoring.googleapis.com/Snooze -filter ( BàA - page_size (BàA - -page_token ( BàA"] -ListSnoozesResponse- -snoozes ( 2.google.monitoring.v3.Snooze -next_page_token ( "J -GetSnoozeRequest6 -name ( B(àAúA" - monitoring.googleapis.com/Snooze"~ -UpdateSnoozeRequest1 -snooze ( 2.google.monitoring.v3.SnoozeBàA4 - update_mask ( 2.google.protobuf.FieldMaskBàA2˜ - SnoozeService˜ - CreateSnooze).google.monitoring.v3.CreateSnoozeRequest.google.monitoring.v3.Snooze"?ÚA parent,snooze‚Óä“)"/v3/{parent=projects/*}/snoozes:snooze” - ListSnoozes(.google.monitoring.v3.ListSnoozesRequest).google.monitoring.v3.ListSnoozesResponse"0ÚAparent‚Óä“!/v3/{parent=projects/*}/snoozes - GetSnooze&.google.monitoring.v3.GetSnoozeRequest.google.monitoring.v3.Snooze".ÚAname‚Óä“!/v3/{name=projects/*/snoozes/*}¤ - UpdateSnooze).google.monitoring.v3.UpdateSnoozeRequest.google.monitoring.v3.Snooze"KÚAsnooze,update_mask‚Óä“02&/v3/{snooze.name=projects/*/snoozes/*}:snooze©ÊAmonitoring.googleapis.comÒA‰https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/monitoring,https://www.googleapis.com/auth/monitoring.readBÍ -com.google.monitoring.v3BSnoozeServiceProtoPZAcloud.google.com/go/monitoring/apiv3/v2/monitoringpb;monitoringpbªGoogle.Cloud.Monitoring.V3ÊGoogle\\Cloud\\Monitoring\\V3êGoogle::Cloud::Monitoring::V3bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/SpanContext.php b/owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/SpanContext.php deleted file mode 100644 index ed30a8928d94..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/SpanContext.php +++ /dev/null @@ -1,29 +0,0 @@ -internalAddGeneratedFile( - ' -· -\'google/monitoring/v3/span_context.protogoogle.monitoring.v3" - SpanContext - span_name ( BË -com.google.monitoring.v3BSpanContextProtoPZAcloud.google.com/go/monitoring/apiv3/v2/monitoringpb;monitoringpbªGoogle.Cloud.Monitoring.V3ÊGoogle\\Cloud\\Monitoring\\V3êGoogle::Cloud::Monitoring::V3bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/Uptime.php b/owl-bot-staging/Monitoring/v3/proto/src/GPBMetadata/Google/Monitoring/V3/Uptime.php deleted file mode 100644 index 528518b81c8051f6bd7984d3cb2001d0d814ed5a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6049 zcmb_gTW{mm5njnRdE|>s+q<%wU2v6c*1JihuG}<@_7YGMEh}q_f<$|rRsca$#}Z?i zWO;GnUHCurr9grHgQ7rR`Xhq;fIRgfPeqZJ0&Sm)7U-NqQr3muwS)S_;+!*c=FEI^ zIrHput7pOce3cl)R$bEJkIs3wM|jINT~jmr{E>HjOl)2=Pc6Mq>>STmB)%@myjZEp z_mR~xJzFD1zH6G@KFOb&hVGiSZglf!TY1lN^;42#(f|zglsJ~E5x&|e?Gab)sIJJ@xqrR^3j;p%(?}6?pIv%F0ef>3R{+vHn`wl_Y z$-T#(p}D$g@RUI^G_v`K_hr((4=fXJ`kW6{Y0%5##oIN*CAOjV+ZEzywr=6Y8o0Gs z>=JiiGD_Ke6dX&%>Bs!0uVb+|q2zPkwLLO?I?vn0^=#uQ)0+yo82oBS7)r48_O?#? zof7G(XS!(@ihv0wa`QO-6OdFPRMa<{+8S&DsyLBnfC)m)zU+}l8#~r_VCe~*%;b1wsbF8Vz5S> zbb(GaYkK+IfJ;rHtm!2 z6eFY{(bX*FwP}#_G^5;sWs4A7!K1$-nycuY^ekH_!VJY6NzdWuQsKi~)Xj5aTIE`l zCA$SP><70D$^Ck(A(m^~HL;Sqg<2=dO;M0*^=c}{C1I|)U$4`Tcrl)iWq%)s+pTj0 z69xuk04!OxF*-N}Ryc~R zvtd)0a^DH@e+!%N0aGW`#tC#l2sk-RZu#&8?genZ;3o zB9KZ`-w9Kt1kAe31le!z!HS>17zoOyajbW_l@aZbC2<8Bo&p!Zb_kpd81GVK=N2cy zQV3e5Ynz_M@RKZj65e1WB61UI=E69yQf3rbgB2(Av=T6<*O^s5ik2DePZU)J=((^2p3jax zSYUU>_;=4Ol3qa-mI_RE5$ZVp?*?+0gHo}VfLj#f3-naWP~!QQ8V`e8rb**fxZe! z3%?viGd;s)XUt^&u>kV}2y?G!l>W*i4nl;uJwzZy)l%W}>)vu83geZ@!LAC$U?QJG z+bNFIXXhqp`LR^D$MV=b`!a2pC6gKM5aw0S?O`)@YzApUytx7;)zLKpW#;`5tJ4dRVO$d6!E z^BmVaMgRFx%w#X3Y*xR|u8y zFBOW7OP^vKQ^~v6m3)cNmM>MHLPv3e)%-J9jRFt`Da`>xofA?ld>CMp)bYWb`AZzQ z2!q^)g}~V8DbH`bX0ZD726XnqU_zD(jho+R@=VrFp+D%$W#?A*&oM{_9-?HAs!DJ~=#0b-490Y5}QV$0o>INd9Adg8Wk?|7L1}{0Wl(HAxog zU#9*xS6YPR5K1%ui9zOS*Ky}C&EkTl(51r3&CPhV?A+B$G(xi)+1)We3buX_Amr>EV(N76y1lW#fu=15-8Vap*VaFA;%iBNj zoG(yb1H}bb!aVg~eA==I0U@6KItFWz=Klb)WvMRHD0}M> ztFTP>3AK7lX~|9hWqAiy>yoUDFT^RheQ7O)>5-yoYlZF|B~MdwNE%!=HN$Pd`ta_{ zrPM*G1lAgEXcg zx({0fT=Z#viykx%7o2F?UDeQEvkne74S(K1%xA}DpZ0wDH~x+rC8L3a*?qqyphp2_#r>w#5K|1yEeR`-BJ7DxtU(B7bhyx} z2^gAm=2A{gb69|oQ;|@tR7U{g2!?*wq*p>}mhPut2eoFkR<8-ExyQeRm5G-KcNaFA zBA(U6$`=7Yl!@Ud3-z*yDq@HTuUd+@TT*rinternalAddGeneratedFile( - ' -˜ -)google/monitoring/v3/uptime_service.protogoogle.monitoring.v3google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto!google/monitoring/v3/uptime.protogoogle/protobuf/empty.proto google/protobuf/field_mask.proto"› -ListUptimeCheckConfigsRequestC -parent ( B3àAúA-+monitoring.googleapis.com/UptimeCheckConfig -filter (  - page_size ( - -page_token ( "” -ListUptimeCheckConfigsResponseE -uptime_check_configs ( 2\'.google.monitoring.v3.UptimeCheckConfig -next_page_token (  - -total_size ("` -GetUptimeCheckConfigRequestA -name ( B3àAúA- -+monitoring.googleapis.com/UptimeCheckConfig"° -CreateUptimeCheckConfigRequestC -parent ( B3àAúA-+monitoring.googleapis.com/UptimeCheckConfigI -uptime_check_config ( 2\'.google.monitoring.v3.UptimeCheckConfigBàA"œ -UpdateUptimeCheckConfigRequest/ - update_mask ( 2.google.protobuf.FieldMaskI -uptime_check_config ( 2\'.google.monitoring.v3.UptimeCheckConfigBàA"c -DeleteUptimeCheckConfigRequestA -name ( B3àAúA- -+monitoring.googleapis.com/UptimeCheckConfig"B -ListUptimeCheckIpsRequest - page_size ( - -page_token ( "t -ListUptimeCheckIpsResponse= -uptime_check_ips ( 2#.google.monitoring.v3.UptimeCheckIp -next_page_token ( 2½ - -UptimeCheckServiceÀ -ListUptimeCheckConfigs3.google.monitoring.v3.ListUptimeCheckConfigsRequest4.google.monitoring.v3.ListUptimeCheckConfigsResponse";ÚAparent‚Óä“,*/v3/{parent=projects/*}/uptimeCheckConfigs­ -GetUptimeCheckConfig1.google.monitoring.v3.GetUptimeCheckConfigRequest\'.google.monitoring.v3.UptimeCheckConfig"9ÚAname‚Óä“,*/v3/{name=projects/*/uptimeCheckConfigs/*}Þ -CreateUptimeCheckConfig4.google.monitoring.v3.CreateUptimeCheckConfigRequest\'.google.monitoring.v3.UptimeCheckConfig"dÚAparent,uptime_check_config‚Óä“A"*/v3/{parent=projects/*}/uptimeCheckConfigs:uptime_check_configë -UpdateUptimeCheckConfig4.google.monitoring.v3.UpdateUptimeCheckConfigRequest\'.google.monitoring.v3.UptimeCheckConfig"qÚAuptime_check_config‚Óä“U2>/v3/{uptime_check_config.name=projects/*/uptimeCheckConfigs/*}:uptime_check_config¢ -DeleteUptimeCheckConfig4.google.monitoring.v3.DeleteUptimeCheckConfigRequest.google.protobuf.Empty"9ÚAname‚Óä“,**/v3/{name=projects/*/uptimeCheckConfigs/*}“ -ListUptimeCheckIps/.google.monitoring.v3.ListUptimeCheckIpsRequest0.google.monitoring.v3.ListUptimeCheckIpsResponse"‚Óä“/v3/uptimeCheckIps©ÊAmonitoring.googleapis.comÒA‰https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/monitoring,https://www.googleapis.com/auth/monitoring.readBÍ -com.google.monitoring.v3BUptimeServiceProtoPZAcloud.google.com/go/monitoring/apiv3/v2/monitoringpb;monitoringpbªGoogle.Cloud.Monitoring.V3ÊGoogle\\Cloud\\Monitoring\\V3êGoogle::Cloud::Monitoring::V3bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Aggregation.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Aggregation.php deleted file mode 100644 index 7d97df10e8e0..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Aggregation.php +++ /dev/null @@ -1,389 +0,0 @@ -google.monitoring.v3.Aggregation - */ -class Aggregation extends \Google\Protobuf\Internal\Message -{ - /** - * The `alignment_period` specifies a time interval, in seconds, that is used - * to divide the data in all the - * [time series][google.monitoring.v3.TimeSeries] into consistent blocks of - * time. This will be done before the per-series aligner can be applied to - * the data. - * The value must be at least 60 seconds. If a per-series - * aligner other than `ALIGN_NONE` is specified, this field is required or an - * error is returned. If no per-series aligner is specified, or the aligner - * `ALIGN_NONE` is specified, then this field is ignored. - * The maximum value of the `alignment_period` is 104 weeks (2 years) for - * charts, and 90,000 seconds (25 hours) for alerting policies. - * - * Generated from protobuf field .google.protobuf.Duration alignment_period = 1; - */ - protected $alignment_period = null; - /** - * An `Aligner` describes how to bring the data points in a single - * time series into temporal alignment. Except for `ALIGN_NONE`, all - * alignments cause all the data points in an `alignment_period` to be - * mathematically grouped together, resulting in a single data point for - * each `alignment_period` with end timestamp at the end of the period. - * Not all alignment operations may be applied to all time series. The valid - * choices depend on the `metric_kind` and `value_type` of the original time - * series. Alignment can change the `metric_kind` or the `value_type` of - * the time series. - * Time series data must be aligned in order to perform cross-time - * series reduction. If `cross_series_reducer` is specified, then - * `per_series_aligner` must be specified and not equal to `ALIGN_NONE` - * and `alignment_period` must be specified; otherwise, an error is - * returned. - * - * Generated from protobuf field .google.monitoring.v3.Aggregation.Aligner per_series_aligner = 2; - */ - protected $per_series_aligner = 0; - /** - * The reduction operation to be used to combine time series into a single - * time series, where the value of each data point in the resulting series is - * a function of all the already aligned values in the input time series. - * Not all reducer operations can be applied to all time series. The valid - * choices depend on the `metric_kind` and the `value_type` of the original - * time series. Reduction can yield a time series with a different - * `metric_kind` or `value_type` than the input time series. - * Time series data must first be aligned (see `per_series_aligner`) in order - * to perform cross-time series reduction. If `cross_series_reducer` is - * specified, then `per_series_aligner` must be specified, and must not be - * `ALIGN_NONE`. An `alignment_period` must also be specified; otherwise, an - * error is returned. - * - * Generated from protobuf field .google.monitoring.v3.Aggregation.Reducer cross_series_reducer = 4; - */ - protected $cross_series_reducer = 0; - /** - * The set of fields to preserve when `cross_series_reducer` is - * specified. The `group_by_fields` determine how the time series are - * partitioned into subsets prior to applying the aggregation - * operation. Each subset contains time series that have the same - * value for each of the grouping fields. Each individual time - * series is a member of exactly one subset. The - * `cross_series_reducer` is applied to each subset of time series. - * It is not possible to reduce across different resource types, so - * this field implicitly contains `resource.type`. Fields not - * specified in `group_by_fields` are aggregated away. If - * `group_by_fields` is not specified and all the time series have - * the same resource type, then the time series are aggregated into - * a single output time series. If `cross_series_reducer` is not - * defined, this field is ignored. - * - * Generated from protobuf field repeated string group_by_fields = 5; - */ - private $group_by_fields; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Duration $alignment_period - * The `alignment_period` specifies a time interval, in seconds, that is used - * to divide the data in all the - * [time series][google.monitoring.v3.TimeSeries] into consistent blocks of - * time. This will be done before the per-series aligner can be applied to - * the data. - * The value must be at least 60 seconds. If a per-series - * aligner other than `ALIGN_NONE` is specified, this field is required or an - * error is returned. If no per-series aligner is specified, or the aligner - * `ALIGN_NONE` is specified, then this field is ignored. - * The maximum value of the `alignment_period` is 104 weeks (2 years) for - * charts, and 90,000 seconds (25 hours) for alerting policies. - * @type int $per_series_aligner - * An `Aligner` describes how to bring the data points in a single - * time series into temporal alignment. Except for `ALIGN_NONE`, all - * alignments cause all the data points in an `alignment_period` to be - * mathematically grouped together, resulting in a single data point for - * each `alignment_period` with end timestamp at the end of the period. - * Not all alignment operations may be applied to all time series. The valid - * choices depend on the `metric_kind` and `value_type` of the original time - * series. Alignment can change the `metric_kind` or the `value_type` of - * the time series. - * Time series data must be aligned in order to perform cross-time - * series reduction. If `cross_series_reducer` is specified, then - * `per_series_aligner` must be specified and not equal to `ALIGN_NONE` - * and `alignment_period` must be specified; otherwise, an error is - * returned. - * @type int $cross_series_reducer - * The reduction operation to be used to combine time series into a single - * time series, where the value of each data point in the resulting series is - * a function of all the already aligned values in the input time series. - * Not all reducer operations can be applied to all time series. The valid - * choices depend on the `metric_kind` and the `value_type` of the original - * time series. Reduction can yield a time series with a different - * `metric_kind` or `value_type` than the input time series. - * Time series data must first be aligned (see `per_series_aligner`) in order - * to perform cross-time series reduction. If `cross_series_reducer` is - * specified, then `per_series_aligner` must be specified, and must not be - * `ALIGN_NONE`. An `alignment_period` must also be specified; otherwise, an - * error is returned. - * @type array|\Google\Protobuf\Internal\RepeatedField $group_by_fields - * The set of fields to preserve when `cross_series_reducer` is - * specified. The `group_by_fields` determine how the time series are - * partitioned into subsets prior to applying the aggregation - * operation. Each subset contains time series that have the same - * value for each of the grouping fields. Each individual time - * series is a member of exactly one subset. The - * `cross_series_reducer` is applied to each subset of time series. - * It is not possible to reduce across different resource types, so - * this field implicitly contains `resource.type`. Fields not - * specified in `group_by_fields` are aggregated away. If - * `group_by_fields` is not specified and all the time series have - * the same resource type, then the time series are aggregated into - * a single output time series. If `cross_series_reducer` is not - * defined, this field is ignored. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\Common::initOnce(); - parent::__construct($data); - } - - /** - * The `alignment_period` specifies a time interval, in seconds, that is used - * to divide the data in all the - * [time series][google.monitoring.v3.TimeSeries] into consistent blocks of - * time. This will be done before the per-series aligner can be applied to - * the data. - * The value must be at least 60 seconds. If a per-series - * aligner other than `ALIGN_NONE` is specified, this field is required or an - * error is returned. If no per-series aligner is specified, or the aligner - * `ALIGN_NONE` is specified, then this field is ignored. - * The maximum value of the `alignment_period` is 104 weeks (2 years) for - * charts, and 90,000 seconds (25 hours) for alerting policies. - * - * Generated from protobuf field .google.protobuf.Duration alignment_period = 1; - * @return \Google\Protobuf\Duration|null - */ - public function getAlignmentPeriod() - { - return $this->alignment_period; - } - - public function hasAlignmentPeriod() - { - return isset($this->alignment_period); - } - - public function clearAlignmentPeriod() - { - unset($this->alignment_period); - } - - /** - * The `alignment_period` specifies a time interval, in seconds, that is used - * to divide the data in all the - * [time series][google.monitoring.v3.TimeSeries] into consistent blocks of - * time. This will be done before the per-series aligner can be applied to - * the data. - * The value must be at least 60 seconds. If a per-series - * aligner other than `ALIGN_NONE` is specified, this field is required or an - * error is returned. If no per-series aligner is specified, or the aligner - * `ALIGN_NONE` is specified, then this field is ignored. - * The maximum value of the `alignment_period` is 104 weeks (2 years) for - * charts, and 90,000 seconds (25 hours) for alerting policies. - * - * Generated from protobuf field .google.protobuf.Duration alignment_period = 1; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setAlignmentPeriod($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->alignment_period = $var; - - return $this; - } - - /** - * An `Aligner` describes how to bring the data points in a single - * time series into temporal alignment. Except for `ALIGN_NONE`, all - * alignments cause all the data points in an `alignment_period` to be - * mathematically grouped together, resulting in a single data point for - * each `alignment_period` with end timestamp at the end of the period. - * Not all alignment operations may be applied to all time series. The valid - * choices depend on the `metric_kind` and `value_type` of the original time - * series. Alignment can change the `metric_kind` or the `value_type` of - * the time series. - * Time series data must be aligned in order to perform cross-time - * series reduction. If `cross_series_reducer` is specified, then - * `per_series_aligner` must be specified and not equal to `ALIGN_NONE` - * and `alignment_period` must be specified; otherwise, an error is - * returned. - * - * Generated from protobuf field .google.monitoring.v3.Aggregation.Aligner per_series_aligner = 2; - * @return int - */ - public function getPerSeriesAligner() - { - return $this->per_series_aligner; - } - - /** - * An `Aligner` describes how to bring the data points in a single - * time series into temporal alignment. Except for `ALIGN_NONE`, all - * alignments cause all the data points in an `alignment_period` to be - * mathematically grouped together, resulting in a single data point for - * each `alignment_period` with end timestamp at the end of the period. - * Not all alignment operations may be applied to all time series. The valid - * choices depend on the `metric_kind` and `value_type` of the original time - * series. Alignment can change the `metric_kind` or the `value_type` of - * the time series. - * Time series data must be aligned in order to perform cross-time - * series reduction. If `cross_series_reducer` is specified, then - * `per_series_aligner` must be specified and not equal to `ALIGN_NONE` - * and `alignment_period` must be specified; otherwise, an error is - * returned. - * - * Generated from protobuf field .google.monitoring.v3.Aggregation.Aligner per_series_aligner = 2; - * @param int $var - * @return $this - */ - public function setPerSeriesAligner($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Monitoring\V3\Aggregation\Aligner::class); - $this->per_series_aligner = $var; - - return $this; - } - - /** - * The reduction operation to be used to combine time series into a single - * time series, where the value of each data point in the resulting series is - * a function of all the already aligned values in the input time series. - * Not all reducer operations can be applied to all time series. The valid - * choices depend on the `metric_kind` and the `value_type` of the original - * time series. Reduction can yield a time series with a different - * `metric_kind` or `value_type` than the input time series. - * Time series data must first be aligned (see `per_series_aligner`) in order - * to perform cross-time series reduction. If `cross_series_reducer` is - * specified, then `per_series_aligner` must be specified, and must not be - * `ALIGN_NONE`. An `alignment_period` must also be specified; otherwise, an - * error is returned. - * - * Generated from protobuf field .google.monitoring.v3.Aggregation.Reducer cross_series_reducer = 4; - * @return int - */ - public function getCrossSeriesReducer() - { - return $this->cross_series_reducer; - } - - /** - * The reduction operation to be used to combine time series into a single - * time series, where the value of each data point in the resulting series is - * a function of all the already aligned values in the input time series. - * Not all reducer operations can be applied to all time series. The valid - * choices depend on the `metric_kind` and the `value_type` of the original - * time series. Reduction can yield a time series with a different - * `metric_kind` or `value_type` than the input time series. - * Time series data must first be aligned (see `per_series_aligner`) in order - * to perform cross-time series reduction. If `cross_series_reducer` is - * specified, then `per_series_aligner` must be specified, and must not be - * `ALIGN_NONE`. An `alignment_period` must also be specified; otherwise, an - * error is returned. - * - * Generated from protobuf field .google.monitoring.v3.Aggregation.Reducer cross_series_reducer = 4; - * @param int $var - * @return $this - */ - public function setCrossSeriesReducer($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Monitoring\V3\Aggregation\Reducer::class); - $this->cross_series_reducer = $var; - - return $this; - } - - /** - * The set of fields to preserve when `cross_series_reducer` is - * specified. The `group_by_fields` determine how the time series are - * partitioned into subsets prior to applying the aggregation - * operation. Each subset contains time series that have the same - * value for each of the grouping fields. Each individual time - * series is a member of exactly one subset. The - * `cross_series_reducer` is applied to each subset of time series. - * It is not possible to reduce across different resource types, so - * this field implicitly contains `resource.type`. Fields not - * specified in `group_by_fields` are aggregated away. If - * `group_by_fields` is not specified and all the time series have - * the same resource type, then the time series are aggregated into - * a single output time series. If `cross_series_reducer` is not - * defined, this field is ignored. - * - * Generated from protobuf field repeated string group_by_fields = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getGroupByFields() - { - return $this->group_by_fields; - } - - /** - * The set of fields to preserve when `cross_series_reducer` is - * specified. The `group_by_fields` determine how the time series are - * partitioned into subsets prior to applying the aggregation - * operation. Each subset contains time series that have the same - * value for each of the grouping fields. Each individual time - * series is a member of exactly one subset. The - * `cross_series_reducer` is applied to each subset of time series. - * It is not possible to reduce across different resource types, so - * this field implicitly contains `resource.type`. Fields not - * specified in `group_by_fields` are aggregated away. If - * `group_by_fields` is not specified and all the time series have - * the same resource type, then the time series are aggregated into - * a single output time series. If `cross_series_reducer` is not - * defined, this field is ignored. - * - * Generated from protobuf field repeated string group_by_fields = 5; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setGroupByFields($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->group_by_fields = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Aggregation/Aligner.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Aggregation/Aligner.php deleted file mode 100644 index 9f2767800daf..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Aggregation/Aligner.php +++ /dev/null @@ -1,269 +0,0 @@ -google.monitoring.v3.Aggregation.Aligner - */ -class Aligner -{ - /** - * No alignment. Raw data is returned. Not valid if cross-series reduction - * is requested. The `value_type` of the result is the same as the - * `value_type` of the input. - * - * Generated from protobuf enum ALIGN_NONE = 0; - */ - const ALIGN_NONE = 0; - /** - * Align and convert to - * [DELTA][google.api.MetricDescriptor.MetricKind.DELTA]. - * The output is `delta = y1 - y0`. - * This alignment is valid for - * [CUMULATIVE][google.api.MetricDescriptor.MetricKind.CUMULATIVE] and - * `DELTA` metrics. If the selected alignment period results in periods - * with no data, then the aligned value for such a period is created by - * interpolation. The `value_type` of the aligned result is the same as - * the `value_type` of the input. - * - * Generated from protobuf enum ALIGN_DELTA = 1; - */ - const ALIGN_DELTA = 1; - /** - * Align and convert to a rate. The result is computed as - * `rate = (y1 - y0)/(t1 - t0)`, or "delta over time". - * Think of this aligner as providing the slope of the line that passes - * through the value at the start and at the end of the `alignment_period`. - * This aligner is valid for `CUMULATIVE` - * and `DELTA` metrics with numeric values. If the selected alignment - * period results in periods with no data, then the aligned value for - * such a period is created by interpolation. The output is a `GAUGE` - * metric with `value_type` `DOUBLE`. - * If, by "rate", you mean "percentage change", see the - * `ALIGN_PERCENT_CHANGE` aligner instead. - * - * Generated from protobuf enum ALIGN_RATE = 2; - */ - const ALIGN_RATE = 2; - /** - * Align by interpolating between adjacent points around the alignment - * period boundary. This aligner is valid for `GAUGE` metrics with - * numeric values. The `value_type` of the aligned result is the same as the - * `value_type` of the input. - * - * Generated from protobuf enum ALIGN_INTERPOLATE = 3; - */ - const ALIGN_INTERPOLATE = 3; - /** - * Align by moving the most recent data point before the end of the - * alignment period to the boundary at the end of the alignment - * period. This aligner is valid for `GAUGE` metrics. The `value_type` of - * the aligned result is the same as the `value_type` of the input. - * - * Generated from protobuf enum ALIGN_NEXT_OLDER = 4; - */ - const ALIGN_NEXT_OLDER = 4; - /** - * Align the time series by returning the minimum value in each alignment - * period. This aligner is valid for `GAUGE` and `DELTA` metrics with - * numeric values. The `value_type` of the aligned result is the same as - * the `value_type` of the input. - * - * Generated from protobuf enum ALIGN_MIN = 10; - */ - const ALIGN_MIN = 10; - /** - * Align the time series by returning the maximum value in each alignment - * period. This aligner is valid for `GAUGE` and `DELTA` metrics with - * numeric values. The `value_type` of the aligned result is the same as - * the `value_type` of the input. - * - * Generated from protobuf enum ALIGN_MAX = 11; - */ - const ALIGN_MAX = 11; - /** - * Align the time series by returning the mean value in each alignment - * period. This aligner is valid for `GAUGE` and `DELTA` metrics with - * numeric values. The `value_type` of the aligned result is `DOUBLE`. - * - * Generated from protobuf enum ALIGN_MEAN = 12; - */ - const ALIGN_MEAN = 12; - /** - * Align the time series by returning the number of values in each alignment - * period. This aligner is valid for `GAUGE` and `DELTA` metrics with - * numeric or Boolean values. The `value_type` of the aligned result is - * `INT64`. - * - * Generated from protobuf enum ALIGN_COUNT = 13; - */ - const ALIGN_COUNT = 13; - /** - * Align the time series by returning the sum of the values in each - * alignment period. This aligner is valid for `GAUGE` and `DELTA` - * metrics with numeric and distribution values. The `value_type` of the - * aligned result is the same as the `value_type` of the input. - * - * Generated from protobuf enum ALIGN_SUM = 14; - */ - const ALIGN_SUM = 14; - /** - * Align the time series by returning the standard deviation of the values - * in each alignment period. This aligner is valid for `GAUGE` and - * `DELTA` metrics with numeric values. The `value_type` of the output is - * `DOUBLE`. - * - * Generated from protobuf enum ALIGN_STDDEV = 15; - */ - const ALIGN_STDDEV = 15; - /** - * Align the time series by returning the number of `True` values in - * each alignment period. This aligner is valid for `GAUGE` metrics with - * Boolean values. The `value_type` of the output is `INT64`. - * - * Generated from protobuf enum ALIGN_COUNT_TRUE = 16; - */ - const ALIGN_COUNT_TRUE = 16; - /** - * Align the time series by returning the number of `False` values in - * each alignment period. This aligner is valid for `GAUGE` metrics with - * Boolean values. The `value_type` of the output is `INT64`. - * - * Generated from protobuf enum ALIGN_COUNT_FALSE = 24; - */ - const ALIGN_COUNT_FALSE = 24; - /** - * Align the time series by returning the ratio of the number of `True` - * values to the total number of values in each alignment period. This - * aligner is valid for `GAUGE` metrics with Boolean values. The output - * value is in the range [0.0, 1.0] and has `value_type` `DOUBLE`. - * - * Generated from protobuf enum ALIGN_FRACTION_TRUE = 17; - */ - const ALIGN_FRACTION_TRUE = 17; - /** - * Align the time series by using [percentile - * aggregation](https://en.wikipedia.org/wiki/Percentile). The resulting - * data point in each alignment period is the 99th percentile of all data - * points in the period. This aligner is valid for `GAUGE` and `DELTA` - * metrics with distribution values. The output is a `GAUGE` metric with - * `value_type` `DOUBLE`. - * - * Generated from protobuf enum ALIGN_PERCENTILE_99 = 18; - */ - const ALIGN_PERCENTILE_99 = 18; - /** - * Align the time series by using [percentile - * aggregation](https://en.wikipedia.org/wiki/Percentile). The resulting - * data point in each alignment period is the 95th percentile of all data - * points in the period. This aligner is valid for `GAUGE` and `DELTA` - * metrics with distribution values. The output is a `GAUGE` metric with - * `value_type` `DOUBLE`. - * - * Generated from protobuf enum ALIGN_PERCENTILE_95 = 19; - */ - const ALIGN_PERCENTILE_95 = 19; - /** - * Align the time series by using [percentile - * aggregation](https://en.wikipedia.org/wiki/Percentile). The resulting - * data point in each alignment period is the 50th percentile of all data - * points in the period. This aligner is valid for `GAUGE` and `DELTA` - * metrics with distribution values. The output is a `GAUGE` metric with - * `value_type` `DOUBLE`. - * - * Generated from protobuf enum ALIGN_PERCENTILE_50 = 20; - */ - const ALIGN_PERCENTILE_50 = 20; - /** - * Align the time series by using [percentile - * aggregation](https://en.wikipedia.org/wiki/Percentile). The resulting - * data point in each alignment period is the 5th percentile of all data - * points in the period. This aligner is valid for `GAUGE` and `DELTA` - * metrics with distribution values. The output is a `GAUGE` metric with - * `value_type` `DOUBLE`. - * - * Generated from protobuf enum ALIGN_PERCENTILE_05 = 21; - */ - const ALIGN_PERCENTILE_05 = 21; - /** - * Align and convert to a percentage change. This aligner is valid for - * `GAUGE` and `DELTA` metrics with numeric values. This alignment returns - * `((current - previous)/previous) * 100`, where the value of `previous` is - * determined based on the `alignment_period`. - * If the values of `current` and `previous` are both 0, then the returned - * value is 0. If only `previous` is 0, the returned value is infinity. - * A 10-minute moving mean is computed at each point of the alignment period - * prior to the above calculation to smooth the metric and prevent false - * positives from very short-lived spikes. The moving mean is only - * applicable for data whose values are `>= 0`. Any values `< 0` are - * treated as a missing datapoint, and are ignored. While `DELTA` - * metrics are accepted by this alignment, special care should be taken that - * the values for the metric will always be positive. The output is a - * `GAUGE` metric with `value_type` `DOUBLE`. - * - * Generated from protobuf enum ALIGN_PERCENT_CHANGE = 23; - */ - const ALIGN_PERCENT_CHANGE = 23; - - private static $valueToName = [ - self::ALIGN_NONE => 'ALIGN_NONE', - self::ALIGN_DELTA => 'ALIGN_DELTA', - self::ALIGN_RATE => 'ALIGN_RATE', - self::ALIGN_INTERPOLATE => 'ALIGN_INTERPOLATE', - self::ALIGN_NEXT_OLDER => 'ALIGN_NEXT_OLDER', - self::ALIGN_MIN => 'ALIGN_MIN', - self::ALIGN_MAX => 'ALIGN_MAX', - self::ALIGN_MEAN => 'ALIGN_MEAN', - self::ALIGN_COUNT => 'ALIGN_COUNT', - self::ALIGN_SUM => 'ALIGN_SUM', - self::ALIGN_STDDEV => 'ALIGN_STDDEV', - self::ALIGN_COUNT_TRUE => 'ALIGN_COUNT_TRUE', - self::ALIGN_COUNT_FALSE => 'ALIGN_COUNT_FALSE', - self::ALIGN_FRACTION_TRUE => 'ALIGN_FRACTION_TRUE', - self::ALIGN_PERCENTILE_99 => 'ALIGN_PERCENTILE_99', - self::ALIGN_PERCENTILE_95 => 'ALIGN_PERCENTILE_95', - self::ALIGN_PERCENTILE_50 => 'ALIGN_PERCENTILE_50', - self::ALIGN_PERCENTILE_05 => 'ALIGN_PERCENTILE_05', - self::ALIGN_PERCENT_CHANGE => 'ALIGN_PERCENT_CHANGE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Aligner::class, \Google\Cloud\Monitoring\V3\Aggregation_Aligner::class); - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Aggregation/Reducer.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Aggregation/Reducer.php deleted file mode 100644 index c5d065c3b4e6..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Aggregation/Reducer.php +++ /dev/null @@ -1,191 +0,0 @@ -google.monitoring.v3.Aggregation.Reducer - */ -class Reducer -{ - /** - * No cross-time series reduction. The output of the `Aligner` is - * returned. - * - * Generated from protobuf enum REDUCE_NONE = 0; - */ - const REDUCE_NONE = 0; - /** - * Reduce by computing the mean value across time series for each - * alignment period. This reducer is valid for - * [DELTA][google.api.MetricDescriptor.MetricKind.DELTA] and - * [GAUGE][google.api.MetricDescriptor.MetricKind.GAUGE] metrics with - * numeric or distribution values. The `value_type` of the output is - * [DOUBLE][google.api.MetricDescriptor.ValueType.DOUBLE]. - * - * Generated from protobuf enum REDUCE_MEAN = 1; - */ - const REDUCE_MEAN = 1; - /** - * Reduce by computing the minimum value across time series for each - * alignment period. This reducer is valid for `DELTA` and `GAUGE` metrics - * with numeric values. The `value_type` of the output is the same as the - * `value_type` of the input. - * - * Generated from protobuf enum REDUCE_MIN = 2; - */ - const REDUCE_MIN = 2; - /** - * Reduce by computing the maximum value across time series for each - * alignment period. This reducer is valid for `DELTA` and `GAUGE` metrics - * with numeric values. The `value_type` of the output is the same as the - * `value_type` of the input. - * - * Generated from protobuf enum REDUCE_MAX = 3; - */ - const REDUCE_MAX = 3; - /** - * Reduce by computing the sum across time series for each - * alignment period. This reducer is valid for `DELTA` and `GAUGE` metrics - * with numeric and distribution values. The `value_type` of the output is - * the same as the `value_type` of the input. - * - * Generated from protobuf enum REDUCE_SUM = 4; - */ - const REDUCE_SUM = 4; - /** - * Reduce by computing the standard deviation across time series - * for each alignment period. This reducer is valid for `DELTA` and - * `GAUGE` metrics with numeric or distribution values. The `value_type` - * of the output is `DOUBLE`. - * - * Generated from protobuf enum REDUCE_STDDEV = 5; - */ - const REDUCE_STDDEV = 5; - /** - * Reduce by computing the number of data points across time series - * for each alignment period. This reducer is valid for `DELTA` and - * `GAUGE` metrics of numeric, Boolean, distribution, and string - * `value_type`. The `value_type` of the output is `INT64`. - * - * Generated from protobuf enum REDUCE_COUNT = 6; - */ - const REDUCE_COUNT = 6; - /** - * Reduce by computing the number of `True`-valued data points across time - * series for each alignment period. This reducer is valid for `DELTA` and - * `GAUGE` metrics of Boolean `value_type`. The `value_type` of the output - * is `INT64`. - * - * Generated from protobuf enum REDUCE_COUNT_TRUE = 7; - */ - const REDUCE_COUNT_TRUE = 7; - /** - * Reduce by computing the number of `False`-valued data points across time - * series for each alignment period. This reducer is valid for `DELTA` and - * `GAUGE` metrics of Boolean `value_type`. The `value_type` of the output - * is `INT64`. - * - * Generated from protobuf enum REDUCE_COUNT_FALSE = 15; - */ - const REDUCE_COUNT_FALSE = 15; - /** - * Reduce by computing the ratio of the number of `True`-valued data points - * to the total number of data points for each alignment period. This - * reducer is valid for `DELTA` and `GAUGE` metrics of Boolean `value_type`. - * The output value is in the range [0.0, 1.0] and has `value_type` - * `DOUBLE`. - * - * Generated from protobuf enum REDUCE_FRACTION_TRUE = 8; - */ - const REDUCE_FRACTION_TRUE = 8; - /** - * Reduce by computing the [99th - * percentile](https://en.wikipedia.org/wiki/Percentile) of data points - * across time series for each alignment period. This reducer is valid for - * `GAUGE` and `DELTA` metrics of numeric and distribution type. The value - * of the output is `DOUBLE`. - * - * Generated from protobuf enum REDUCE_PERCENTILE_99 = 9; - */ - const REDUCE_PERCENTILE_99 = 9; - /** - * Reduce by computing the [95th - * percentile](https://en.wikipedia.org/wiki/Percentile) of data points - * across time series for each alignment period. This reducer is valid for - * `GAUGE` and `DELTA` metrics of numeric and distribution type. The value - * of the output is `DOUBLE`. - * - * Generated from protobuf enum REDUCE_PERCENTILE_95 = 10; - */ - const REDUCE_PERCENTILE_95 = 10; - /** - * Reduce by computing the [50th - * percentile](https://en.wikipedia.org/wiki/Percentile) of data points - * across time series for each alignment period. This reducer is valid for - * `GAUGE` and `DELTA` metrics of numeric and distribution type. The value - * of the output is `DOUBLE`. - * - * Generated from protobuf enum REDUCE_PERCENTILE_50 = 11; - */ - const REDUCE_PERCENTILE_50 = 11; - /** - * Reduce by computing the [5th - * percentile](https://en.wikipedia.org/wiki/Percentile) of data points - * across time series for each alignment period. This reducer is valid for - * `GAUGE` and `DELTA` metrics of numeric and distribution type. The value - * of the output is `DOUBLE`. - * - * Generated from protobuf enum REDUCE_PERCENTILE_05 = 12; - */ - const REDUCE_PERCENTILE_05 = 12; - - private static $valueToName = [ - self::REDUCE_NONE => 'REDUCE_NONE', - self::REDUCE_MEAN => 'REDUCE_MEAN', - self::REDUCE_MIN => 'REDUCE_MIN', - self::REDUCE_MAX => 'REDUCE_MAX', - self::REDUCE_SUM => 'REDUCE_SUM', - self::REDUCE_STDDEV => 'REDUCE_STDDEV', - self::REDUCE_COUNT => 'REDUCE_COUNT', - self::REDUCE_COUNT_TRUE => 'REDUCE_COUNT_TRUE', - self::REDUCE_COUNT_FALSE => 'REDUCE_COUNT_FALSE', - self::REDUCE_FRACTION_TRUE => 'REDUCE_FRACTION_TRUE', - self::REDUCE_PERCENTILE_99 => 'REDUCE_PERCENTILE_99', - self::REDUCE_PERCENTILE_95 => 'REDUCE_PERCENTILE_95', - self::REDUCE_PERCENTILE_50 => 'REDUCE_PERCENTILE_50', - self::REDUCE_PERCENTILE_05 => 'REDUCE_PERCENTILE_05', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Reducer::class, \Google\Cloud\Monitoring\V3\Aggregation_Reducer::class); - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy.php deleted file mode 100644 index c9b92c00eff9..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy.php +++ /dev/null @@ -1,805 +0,0 @@ -google.monitoring.v3.AlertPolicy - */ -class AlertPolicy extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. Required if the policy exists. The resource name for this - * policy. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID] - * `[ALERT_POLICY_ID]` is assigned by Cloud Monitoring when the policy - * is created. When calling the - * [alertPolicies.create][google.monitoring.v3.AlertPolicyService.CreateAlertPolicy] - * method, do not include the `name` field in the alerting policy passed as - * part of the request. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * A short name or phrase used to identify the policy in dashboards, - * notifications, and incidents. To avoid confusion, don't use the same - * display name for multiple policies in the same project. The name is - * limited to 512 Unicode characters. - * The convention for the display_name of a PrometheusQueryLanguageCondition - * is "{rule group name}/{alert name}", where the {rule group name} and - * {alert name} should be taken from the corresponding Prometheus - * configuration file. This convention is not enforced. - * In any case the display_name is not a unique key of the AlertPolicy. - * - * Generated from protobuf field string display_name = 2; - */ - protected $display_name = ''; - /** - * Documentation that is included with notifications and incidents related to - * this policy. Best practice is for the documentation to include information - * to help responders understand, mitigate, escalate, and correct the - * underlying problems detected by the alerting policy. Notification channels - * that have limited capacity might not show this documentation. - * - * Generated from protobuf field .google.monitoring.v3.AlertPolicy.Documentation documentation = 13; - */ - protected $documentation = null; - /** - * User-supplied key/value data to be used for organizing and - * identifying the `AlertPolicy` objects. - * The field can contain up to 64 entries. Each key and value is limited to - * 63 Unicode characters or 128 bytes, whichever is smaller. Labels and - * values can contain only lowercase letters, numerals, underscores, and - * dashes. Keys must begin with a letter. - * Note that Prometheus {alert name} is a - * [valid Prometheus label - * names](https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels), - * whereas Prometheus {rule group} is an unrestricted UTF-8 string. - * This means that they cannot be stored as-is in user labels, because - * they may contain characters that are not allowed in user-label values. - * - * Generated from protobuf field map user_labels = 16; - */ - private $user_labels; - /** - * A list of conditions for the policy. The conditions are combined by AND or - * OR according to the `combiner` field. If the combined conditions evaluate - * to true, then an incident is created. A policy can have from one to six - * conditions. - * If `condition_time_series_query_language` is present, it must be the only - * `condition`. - * If `condition_monitoring_query_language` is present, it must be the only - * `condition`. - * - * Generated from protobuf field repeated .google.monitoring.v3.AlertPolicy.Condition conditions = 12; - */ - private $conditions; - /** - * How to combine the results of multiple conditions to determine if an - * incident should be opened. - * If `condition_time_series_query_language` is present, this must be - * `COMBINE_UNSPECIFIED`. - * - * Generated from protobuf field .google.monitoring.v3.AlertPolicy.ConditionCombinerType combiner = 6; - */ - protected $combiner = 0; - /** - * Whether or not the policy is enabled. On write, the default interpretation - * if unset is that the policy is enabled. On read, clients should not make - * any assumption about the state if it has not been populated. The - * field should always be populated on List and Get operations, unless - * a field projection has been specified that strips it out. - * - * Generated from protobuf field .google.protobuf.BoolValue enabled = 17; - */ - protected $enabled = null; - /** - * Read-only description of how the alerting policy is invalid. This field is - * only set when the alerting policy is invalid. An invalid alerting policy - * will not generate incidents. - * - * Generated from protobuf field .google.rpc.Status validity = 18; - */ - protected $validity = null; - /** - * Identifies the notification channels to which notifications should be sent - * when incidents are opened or closed or when new violations occur on - * an already opened incident. Each element of this array corresponds to - * the `name` field in each of the - * [`NotificationChannel`][google.monitoring.v3.NotificationChannel] - * objects that are returned from the [`ListNotificationChannels`] - * [google.monitoring.v3.NotificationChannelService.ListNotificationChannels] - * method. The format of the entries in this field is: - * projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID] - * - * Generated from protobuf field repeated string notification_channels = 14; - */ - private $notification_channels; - /** - * A read-only record of the creation of the alerting policy. If provided - * in a call to create or update, this field will be ignored. - * - * Generated from protobuf field .google.monitoring.v3.MutationRecord creation_record = 10; - */ - protected $creation_record = null; - /** - * A read-only record of the most recent change to the alerting policy. If - * provided in a call to create or update, this field will be ignored. - * - * Generated from protobuf field .google.monitoring.v3.MutationRecord mutation_record = 11; - */ - protected $mutation_record = null; - /** - * Control over how this alerting policy's notification channels are notified. - * - * Generated from protobuf field .google.monitoring.v3.AlertPolicy.AlertStrategy alert_strategy = 21; - */ - protected $alert_strategy = null; - /** - * Optional. The severity of an alerting policy indicates how important - * incidents generated by that policy are. The severity level will be - * displayed on the Incident detail page and in notifications. - * - * Generated from protobuf field .google.monitoring.v3.AlertPolicy.Severity severity = 22 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $severity = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. Required if the policy exists. The resource name for this - * policy. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID] - * `[ALERT_POLICY_ID]` is assigned by Cloud Monitoring when the policy - * is created. When calling the - * [alertPolicies.create][google.monitoring.v3.AlertPolicyService.CreateAlertPolicy] - * method, do not include the `name` field in the alerting policy passed as - * part of the request. - * @type string $display_name - * A short name or phrase used to identify the policy in dashboards, - * notifications, and incidents. To avoid confusion, don't use the same - * display name for multiple policies in the same project. The name is - * limited to 512 Unicode characters. - * The convention for the display_name of a PrometheusQueryLanguageCondition - * is "{rule group name}/{alert name}", where the {rule group name} and - * {alert name} should be taken from the corresponding Prometheus - * configuration file. This convention is not enforced. - * In any case the display_name is not a unique key of the AlertPolicy. - * @type \Google\Cloud\Monitoring\V3\AlertPolicy\Documentation $documentation - * Documentation that is included with notifications and incidents related to - * this policy. Best practice is for the documentation to include information - * to help responders understand, mitigate, escalate, and correct the - * underlying problems detected by the alerting policy. Notification channels - * that have limited capacity might not show this documentation. - * @type array|\Google\Protobuf\Internal\MapField $user_labels - * User-supplied key/value data to be used for organizing and - * identifying the `AlertPolicy` objects. - * The field can contain up to 64 entries. Each key and value is limited to - * 63 Unicode characters or 128 bytes, whichever is smaller. Labels and - * values can contain only lowercase letters, numerals, underscores, and - * dashes. Keys must begin with a letter. - * Note that Prometheus {alert name} is a - * [valid Prometheus label - * names](https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels), - * whereas Prometheus {rule group} is an unrestricted UTF-8 string. - * This means that they cannot be stored as-is in user labels, because - * they may contain characters that are not allowed in user-label values. - * @type array<\Google\Cloud\Monitoring\V3\AlertPolicy\Condition>|\Google\Protobuf\Internal\RepeatedField $conditions - * A list of conditions for the policy. The conditions are combined by AND or - * OR according to the `combiner` field. If the combined conditions evaluate - * to true, then an incident is created. A policy can have from one to six - * conditions. - * If `condition_time_series_query_language` is present, it must be the only - * `condition`. - * If `condition_monitoring_query_language` is present, it must be the only - * `condition`. - * @type int $combiner - * How to combine the results of multiple conditions to determine if an - * incident should be opened. - * If `condition_time_series_query_language` is present, this must be - * `COMBINE_UNSPECIFIED`. - * @type \Google\Protobuf\BoolValue $enabled - * Whether or not the policy is enabled. On write, the default interpretation - * if unset is that the policy is enabled. On read, clients should not make - * any assumption about the state if it has not been populated. The - * field should always be populated on List and Get operations, unless - * a field projection has been specified that strips it out. - * @type \Google\Rpc\Status $validity - * Read-only description of how the alerting policy is invalid. This field is - * only set when the alerting policy is invalid. An invalid alerting policy - * will not generate incidents. - * @type array|\Google\Protobuf\Internal\RepeatedField $notification_channels - * Identifies the notification channels to which notifications should be sent - * when incidents are opened or closed or when new violations occur on - * an already opened incident. Each element of this array corresponds to - * the `name` field in each of the - * [`NotificationChannel`][google.monitoring.v3.NotificationChannel] - * objects that are returned from the [`ListNotificationChannels`] - * [google.monitoring.v3.NotificationChannelService.ListNotificationChannels] - * method. The format of the entries in this field is: - * projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID] - * @type \Google\Cloud\Monitoring\V3\MutationRecord $creation_record - * A read-only record of the creation of the alerting policy. If provided - * in a call to create or update, this field will be ignored. - * @type \Google\Cloud\Monitoring\V3\MutationRecord $mutation_record - * A read-only record of the most recent change to the alerting policy. If - * provided in a call to create or update, this field will be ignored. - * @type \Google\Cloud\Monitoring\V3\AlertPolicy\AlertStrategy $alert_strategy - * Control over how this alerting policy's notification channels are notified. - * @type int $severity - * Optional. The severity of an alerting policy indicates how important - * incidents generated by that policy are. The severity level will be - * displayed on the Incident detail page and in notifications. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\Alert::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. Required if the policy exists. The resource name for this - * policy. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID] - * `[ALERT_POLICY_ID]` is assigned by Cloud Monitoring when the policy - * is created. When calling the - * [alertPolicies.create][google.monitoring.v3.AlertPolicyService.CreateAlertPolicy] - * method, do not include the `name` field in the alerting policy passed as - * part of the request. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. Required if the policy exists. The resource name for this - * policy. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID] - * `[ALERT_POLICY_ID]` is assigned by Cloud Monitoring when the policy - * is created. When calling the - * [alertPolicies.create][google.monitoring.v3.AlertPolicyService.CreateAlertPolicy] - * method, do not include the `name` field in the alerting policy passed as - * part of the request. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * A short name or phrase used to identify the policy in dashboards, - * notifications, and incidents. To avoid confusion, don't use the same - * display name for multiple policies in the same project. The name is - * limited to 512 Unicode characters. - * The convention for the display_name of a PrometheusQueryLanguageCondition - * is "{rule group name}/{alert name}", where the {rule group name} and - * {alert name} should be taken from the corresponding Prometheus - * configuration file. This convention is not enforced. - * In any case the display_name is not a unique key of the AlertPolicy. - * - * Generated from protobuf field string display_name = 2; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * A short name or phrase used to identify the policy in dashboards, - * notifications, and incidents. To avoid confusion, don't use the same - * display name for multiple policies in the same project. The name is - * limited to 512 Unicode characters. - * The convention for the display_name of a PrometheusQueryLanguageCondition - * is "{rule group name}/{alert name}", where the {rule group name} and - * {alert name} should be taken from the corresponding Prometheus - * configuration file. This convention is not enforced. - * In any case the display_name is not a unique key of the AlertPolicy. - * - * Generated from protobuf field string display_name = 2; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Documentation that is included with notifications and incidents related to - * this policy. Best practice is for the documentation to include information - * to help responders understand, mitigate, escalate, and correct the - * underlying problems detected by the alerting policy. Notification channels - * that have limited capacity might not show this documentation. - * - * Generated from protobuf field .google.monitoring.v3.AlertPolicy.Documentation documentation = 13; - * @return \Google\Cloud\Monitoring\V3\AlertPolicy\Documentation|null - */ - public function getDocumentation() - { - return $this->documentation; - } - - public function hasDocumentation() - { - return isset($this->documentation); - } - - public function clearDocumentation() - { - unset($this->documentation); - } - - /** - * Documentation that is included with notifications and incidents related to - * this policy. Best practice is for the documentation to include information - * to help responders understand, mitigate, escalate, and correct the - * underlying problems detected by the alerting policy. Notification channels - * that have limited capacity might not show this documentation. - * - * Generated from protobuf field .google.monitoring.v3.AlertPolicy.Documentation documentation = 13; - * @param \Google\Cloud\Monitoring\V3\AlertPolicy\Documentation $var - * @return $this - */ - public function setDocumentation($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\AlertPolicy\Documentation::class); - $this->documentation = $var; - - return $this; - } - - /** - * User-supplied key/value data to be used for organizing and - * identifying the `AlertPolicy` objects. - * The field can contain up to 64 entries. Each key and value is limited to - * 63 Unicode characters or 128 bytes, whichever is smaller. Labels and - * values can contain only lowercase letters, numerals, underscores, and - * dashes. Keys must begin with a letter. - * Note that Prometheus {alert name} is a - * [valid Prometheus label - * names](https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels), - * whereas Prometheus {rule group} is an unrestricted UTF-8 string. - * This means that they cannot be stored as-is in user labels, because - * they may contain characters that are not allowed in user-label values. - * - * Generated from protobuf field map user_labels = 16; - * @return \Google\Protobuf\Internal\MapField - */ - public function getUserLabels() - { - return $this->user_labels; - } - - /** - * User-supplied key/value data to be used for organizing and - * identifying the `AlertPolicy` objects. - * The field can contain up to 64 entries. Each key and value is limited to - * 63 Unicode characters or 128 bytes, whichever is smaller. Labels and - * values can contain only lowercase letters, numerals, underscores, and - * dashes. Keys must begin with a letter. - * Note that Prometheus {alert name} is a - * [valid Prometheus label - * names](https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels), - * whereas Prometheus {rule group} is an unrestricted UTF-8 string. - * This means that they cannot be stored as-is in user labels, because - * they may contain characters that are not allowed in user-label values. - * - * Generated from protobuf field map user_labels = 16; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setUserLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->user_labels = $arr; - - return $this; - } - - /** - * A list of conditions for the policy. The conditions are combined by AND or - * OR according to the `combiner` field. If the combined conditions evaluate - * to true, then an incident is created. A policy can have from one to six - * conditions. - * If `condition_time_series_query_language` is present, it must be the only - * `condition`. - * If `condition_monitoring_query_language` is present, it must be the only - * `condition`. - * - * Generated from protobuf field repeated .google.monitoring.v3.AlertPolicy.Condition conditions = 12; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getConditions() - { - return $this->conditions; - } - - /** - * A list of conditions for the policy. The conditions are combined by AND or - * OR according to the `combiner` field. If the combined conditions evaluate - * to true, then an incident is created. A policy can have from one to six - * conditions. - * If `condition_time_series_query_language` is present, it must be the only - * `condition`. - * If `condition_monitoring_query_language` is present, it must be the only - * `condition`. - * - * Generated from protobuf field repeated .google.monitoring.v3.AlertPolicy.Condition conditions = 12; - * @param array<\Google\Cloud\Monitoring\V3\AlertPolicy\Condition>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setConditions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Monitoring\V3\AlertPolicy\Condition::class); - $this->conditions = $arr; - - return $this; - } - - /** - * How to combine the results of multiple conditions to determine if an - * incident should be opened. - * If `condition_time_series_query_language` is present, this must be - * `COMBINE_UNSPECIFIED`. - * - * Generated from protobuf field .google.monitoring.v3.AlertPolicy.ConditionCombinerType combiner = 6; - * @return int - */ - public function getCombiner() - { - return $this->combiner; - } - - /** - * How to combine the results of multiple conditions to determine if an - * incident should be opened. - * If `condition_time_series_query_language` is present, this must be - * `COMBINE_UNSPECIFIED`. - * - * Generated from protobuf field .google.monitoring.v3.AlertPolicy.ConditionCombinerType combiner = 6; - * @param int $var - * @return $this - */ - public function setCombiner($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Monitoring\V3\AlertPolicy\ConditionCombinerType::class); - $this->combiner = $var; - - return $this; - } - - /** - * Whether or not the policy is enabled. On write, the default interpretation - * if unset is that the policy is enabled. On read, clients should not make - * any assumption about the state if it has not been populated. The - * field should always be populated on List and Get operations, unless - * a field projection has been specified that strips it out. - * - * Generated from protobuf field .google.protobuf.BoolValue enabled = 17; - * @return \Google\Protobuf\BoolValue|null - */ - public function getEnabled() - { - return $this->enabled; - } - - public function hasEnabled() - { - return isset($this->enabled); - } - - public function clearEnabled() - { - unset($this->enabled); - } - - /** - * Returns the unboxed value from getEnabled() - - * Whether or not the policy is enabled. On write, the default interpretation - * if unset is that the policy is enabled. On read, clients should not make - * any assumption about the state if it has not been populated. The - * field should always be populated on List and Get operations, unless - * a field projection has been specified that strips it out. - * - * Generated from protobuf field .google.protobuf.BoolValue enabled = 17; - * @return bool|null - */ - public function getEnabledUnwrapped() - { - return $this->readWrapperValue("enabled"); - } - - /** - * Whether or not the policy is enabled. On write, the default interpretation - * if unset is that the policy is enabled. On read, clients should not make - * any assumption about the state if it has not been populated. The - * field should always be populated on List and Get operations, unless - * a field projection has been specified that strips it out. - * - * Generated from protobuf field .google.protobuf.BoolValue enabled = 17; - * @param \Google\Protobuf\BoolValue $var - * @return $this - */ - public function setEnabled($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); - $this->enabled = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. - - * Whether or not the policy is enabled. On write, the default interpretation - * if unset is that the policy is enabled. On read, clients should not make - * any assumption about the state if it has not been populated. The - * field should always be populated on List and Get operations, unless - * a field projection has been specified that strips it out. - * - * Generated from protobuf field .google.protobuf.BoolValue enabled = 17; - * @param bool|null $var - * @return $this - */ - public function setEnabledUnwrapped($var) - { - $this->writeWrapperValue("enabled", $var); - return $this;} - - /** - * Read-only description of how the alerting policy is invalid. This field is - * only set when the alerting policy is invalid. An invalid alerting policy - * will not generate incidents. - * - * Generated from protobuf field .google.rpc.Status validity = 18; - * @return \Google\Rpc\Status|null - */ - public function getValidity() - { - return $this->validity; - } - - public function hasValidity() - { - return isset($this->validity); - } - - public function clearValidity() - { - unset($this->validity); - } - - /** - * Read-only description of how the alerting policy is invalid. This field is - * only set when the alerting policy is invalid. An invalid alerting policy - * will not generate incidents. - * - * Generated from protobuf field .google.rpc.Status validity = 18; - * @param \Google\Rpc\Status $var - * @return $this - */ - public function setValidity($var) - { - GPBUtil::checkMessage($var, \Google\Rpc\Status::class); - $this->validity = $var; - - return $this; - } - - /** - * Identifies the notification channels to which notifications should be sent - * when incidents are opened or closed or when new violations occur on - * an already opened incident. Each element of this array corresponds to - * the `name` field in each of the - * [`NotificationChannel`][google.monitoring.v3.NotificationChannel] - * objects that are returned from the [`ListNotificationChannels`] - * [google.monitoring.v3.NotificationChannelService.ListNotificationChannels] - * method. The format of the entries in this field is: - * projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID] - * - * Generated from protobuf field repeated string notification_channels = 14; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNotificationChannels() - { - return $this->notification_channels; - } - - /** - * Identifies the notification channels to which notifications should be sent - * when incidents are opened or closed or when new violations occur on - * an already opened incident. Each element of this array corresponds to - * the `name` field in each of the - * [`NotificationChannel`][google.monitoring.v3.NotificationChannel] - * objects that are returned from the [`ListNotificationChannels`] - * [google.monitoring.v3.NotificationChannelService.ListNotificationChannels] - * method. The format of the entries in this field is: - * projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID] - * - * Generated from protobuf field repeated string notification_channels = 14; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNotificationChannels($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->notification_channels = $arr; - - return $this; - } - - /** - * A read-only record of the creation of the alerting policy. If provided - * in a call to create or update, this field will be ignored. - * - * Generated from protobuf field .google.monitoring.v3.MutationRecord creation_record = 10; - * @return \Google\Cloud\Monitoring\V3\MutationRecord|null - */ - public function getCreationRecord() - { - return $this->creation_record; - } - - public function hasCreationRecord() - { - return isset($this->creation_record); - } - - public function clearCreationRecord() - { - unset($this->creation_record); - } - - /** - * A read-only record of the creation of the alerting policy. If provided - * in a call to create or update, this field will be ignored. - * - * Generated from protobuf field .google.monitoring.v3.MutationRecord creation_record = 10; - * @param \Google\Cloud\Monitoring\V3\MutationRecord $var - * @return $this - */ - public function setCreationRecord($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\MutationRecord::class); - $this->creation_record = $var; - - return $this; - } - - /** - * A read-only record of the most recent change to the alerting policy. If - * provided in a call to create or update, this field will be ignored. - * - * Generated from protobuf field .google.monitoring.v3.MutationRecord mutation_record = 11; - * @return \Google\Cloud\Monitoring\V3\MutationRecord|null - */ - public function getMutationRecord() - { - return $this->mutation_record; - } - - public function hasMutationRecord() - { - return isset($this->mutation_record); - } - - public function clearMutationRecord() - { - unset($this->mutation_record); - } - - /** - * A read-only record of the most recent change to the alerting policy. If - * provided in a call to create or update, this field will be ignored. - * - * Generated from protobuf field .google.monitoring.v3.MutationRecord mutation_record = 11; - * @param \Google\Cloud\Monitoring\V3\MutationRecord $var - * @return $this - */ - public function setMutationRecord($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\MutationRecord::class); - $this->mutation_record = $var; - - return $this; - } - - /** - * Control over how this alerting policy's notification channels are notified. - * - * Generated from protobuf field .google.monitoring.v3.AlertPolicy.AlertStrategy alert_strategy = 21; - * @return \Google\Cloud\Monitoring\V3\AlertPolicy\AlertStrategy|null - */ - public function getAlertStrategy() - { - return $this->alert_strategy; - } - - public function hasAlertStrategy() - { - return isset($this->alert_strategy); - } - - public function clearAlertStrategy() - { - unset($this->alert_strategy); - } - - /** - * Control over how this alerting policy's notification channels are notified. - * - * Generated from protobuf field .google.monitoring.v3.AlertPolicy.AlertStrategy alert_strategy = 21; - * @param \Google\Cloud\Monitoring\V3\AlertPolicy\AlertStrategy $var - * @return $this - */ - public function setAlertStrategy($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\AlertPolicy\AlertStrategy::class); - $this->alert_strategy = $var; - - return $this; - } - - /** - * Optional. The severity of an alerting policy indicates how important - * incidents generated by that policy are. The severity level will be - * displayed on the Incident detail page and in notifications. - * - * Generated from protobuf field .google.monitoring.v3.AlertPolicy.Severity severity = 22 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getSeverity() - { - return $this->severity; - } - - /** - * Optional. The severity of an alerting policy indicates how important - * incidents generated by that policy are. The severity level will be - * displayed on the Incident detail page and in notifications. - * - * Generated from protobuf field .google.monitoring.v3.AlertPolicy.Severity severity = 22 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setSeverity($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Monitoring\V3\AlertPolicy\Severity::class); - $this->severity = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/AlertStrategy.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/AlertStrategy.php deleted file mode 100644 index c8145f8e85af..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/AlertStrategy.php +++ /dev/null @@ -1,217 +0,0 @@ -google.monitoring.v3.AlertPolicy.AlertStrategy - */ -class AlertStrategy extends \Google\Protobuf\Internal\Message -{ - /** - * Required for log-based alerting policies, i.e. policies with a `LogMatch` - * condition. - * This limit is not implemented for alerting policies that do not have - * a LogMatch condition. - * - * Generated from protobuf field .google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit notification_rate_limit = 1; - */ - protected $notification_rate_limit = null; - /** - * For log-based alert policies, the notification prompts is always - * [OPENED]. For non log-based alert policies, the notification prompts can - * be [OPENED] or [OPENED, CLOSED]. - * - * Generated from protobuf field repeated .google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationPrompt notification_prompts = 2; - */ - private $notification_prompts; - /** - * If an alerting policy that was active has no data for this long, any open - * incidents will close - * - * Generated from protobuf field .google.protobuf.Duration auto_close = 3; - */ - protected $auto_close = null; - /** - * Control how notifications will be sent out, on a per-channel basis. - * - * Generated from protobuf field repeated .google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationChannelStrategy notification_channel_strategy = 4; - */ - private $notification_channel_strategy; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Monitoring\V3\AlertPolicy\AlertStrategy\NotificationRateLimit $notification_rate_limit - * Required for log-based alerting policies, i.e. policies with a `LogMatch` - * condition. - * This limit is not implemented for alerting policies that do not have - * a LogMatch condition. - * @type array|\Google\Protobuf\Internal\RepeatedField $notification_prompts - * For log-based alert policies, the notification prompts is always - * [OPENED]. For non log-based alert policies, the notification prompts can - * be [OPENED] or [OPENED, CLOSED]. - * @type \Google\Protobuf\Duration $auto_close - * If an alerting policy that was active has no data for this long, any open - * incidents will close - * @type array<\Google\Cloud\Monitoring\V3\AlertPolicy\AlertStrategy\NotificationChannelStrategy>|\Google\Protobuf\Internal\RepeatedField $notification_channel_strategy - * Control how notifications will be sent out, on a per-channel basis. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\Alert::initOnce(); - parent::__construct($data); - } - - /** - * Required for log-based alerting policies, i.e. policies with a `LogMatch` - * condition. - * This limit is not implemented for alerting policies that do not have - * a LogMatch condition. - * - * Generated from protobuf field .google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit notification_rate_limit = 1; - * @return \Google\Cloud\Monitoring\V3\AlertPolicy\AlertStrategy\NotificationRateLimit|null - */ - public function getNotificationRateLimit() - { - return $this->notification_rate_limit; - } - - public function hasNotificationRateLimit() - { - return isset($this->notification_rate_limit); - } - - public function clearNotificationRateLimit() - { - unset($this->notification_rate_limit); - } - - /** - * Required for log-based alerting policies, i.e. policies with a `LogMatch` - * condition. - * This limit is not implemented for alerting policies that do not have - * a LogMatch condition. - * - * Generated from protobuf field .google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit notification_rate_limit = 1; - * @param \Google\Cloud\Monitoring\V3\AlertPolicy\AlertStrategy\NotificationRateLimit $var - * @return $this - */ - public function setNotificationRateLimit($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\AlertPolicy\AlertStrategy\NotificationRateLimit::class); - $this->notification_rate_limit = $var; - - return $this; - } - - /** - * For log-based alert policies, the notification prompts is always - * [OPENED]. For non log-based alert policies, the notification prompts can - * be [OPENED] or [OPENED, CLOSED]. - * - * Generated from protobuf field repeated .google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationPrompt notification_prompts = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNotificationPrompts() - { - return $this->notification_prompts; - } - - /** - * For log-based alert policies, the notification prompts is always - * [OPENED]. For non log-based alert policies, the notification prompts can - * be [OPENED] or [OPENED, CLOSED]. - * - * Generated from protobuf field repeated .google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationPrompt notification_prompts = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNotificationPrompts($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Monitoring\V3\AlertPolicy\AlertStrategy\NotificationPrompt::class); - $this->notification_prompts = $arr; - - return $this; - } - - /** - * If an alerting policy that was active has no data for this long, any open - * incidents will close - * - * Generated from protobuf field .google.protobuf.Duration auto_close = 3; - * @return \Google\Protobuf\Duration|null - */ - public function getAutoClose() - { - return $this->auto_close; - } - - public function hasAutoClose() - { - return isset($this->auto_close); - } - - public function clearAutoClose() - { - unset($this->auto_close); - } - - /** - * If an alerting policy that was active has no data for this long, any open - * incidents will close - * - * Generated from protobuf field .google.protobuf.Duration auto_close = 3; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setAutoClose($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->auto_close = $var; - - return $this; - } - - /** - * Control how notifications will be sent out, on a per-channel basis. - * - * Generated from protobuf field repeated .google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationChannelStrategy notification_channel_strategy = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNotificationChannelStrategy() - { - return $this->notification_channel_strategy; - } - - /** - * Control how notifications will be sent out, on a per-channel basis. - * - * Generated from protobuf field repeated .google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationChannelStrategy notification_channel_strategy = 4; - * @param array<\Google\Cloud\Monitoring\V3\AlertPolicy\AlertStrategy\NotificationChannelStrategy>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNotificationChannelStrategy($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Monitoring\V3\AlertPolicy\AlertStrategy\NotificationChannelStrategy::class); - $this->notification_channel_strategy = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(AlertStrategy::class, \Google\Cloud\Monitoring\V3\AlertPolicy_AlertStrategy::class); - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/AlertStrategy/NotificationChannelStrategy.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/AlertStrategy/NotificationChannelStrategy.php deleted file mode 100644 index 3fb4be795892..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/AlertStrategy/NotificationChannelStrategy.php +++ /dev/null @@ -1,139 +0,0 @@ -google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationChannelStrategy - */ -class NotificationChannelStrategy extends \Google\Protobuf\Internal\Message -{ - /** - * The full REST resource name for the notification channels that these - * settings apply to. Each of these correspond to the name field in one - * of the NotificationChannel objects referenced in the - * notification_channels field of this AlertPolicy. - * The format is: - * projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID] - * - * Generated from protobuf field repeated string notification_channel_names = 1; - */ - private $notification_channel_names; - /** - * The frequency at which to send reminder notifications for open - * incidents. - * - * Generated from protobuf field .google.protobuf.Duration renotify_interval = 2; - */ - protected $renotify_interval = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $notification_channel_names - * The full REST resource name for the notification channels that these - * settings apply to. Each of these correspond to the name field in one - * of the NotificationChannel objects referenced in the - * notification_channels field of this AlertPolicy. - * The format is: - * projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID] - * @type \Google\Protobuf\Duration $renotify_interval - * The frequency at which to send reminder notifications for open - * incidents. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\Alert::initOnce(); - parent::__construct($data); - } - - /** - * The full REST resource name for the notification channels that these - * settings apply to. Each of these correspond to the name field in one - * of the NotificationChannel objects referenced in the - * notification_channels field of this AlertPolicy. - * The format is: - * projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID] - * - * Generated from protobuf field repeated string notification_channel_names = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNotificationChannelNames() - { - return $this->notification_channel_names; - } - - /** - * The full REST resource name for the notification channels that these - * settings apply to. Each of these correspond to the name field in one - * of the NotificationChannel objects referenced in the - * notification_channels field of this AlertPolicy. - * The format is: - * projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID] - * - * Generated from protobuf field repeated string notification_channel_names = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNotificationChannelNames($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->notification_channel_names = $arr; - - return $this; - } - - /** - * The frequency at which to send reminder notifications for open - * incidents. - * - * Generated from protobuf field .google.protobuf.Duration renotify_interval = 2; - * @return \Google\Protobuf\Duration|null - */ - public function getRenotifyInterval() - { - return $this->renotify_interval; - } - - public function hasRenotifyInterval() - { - return isset($this->renotify_interval); - } - - public function clearRenotifyInterval() - { - unset($this->renotify_interval); - } - - /** - * The frequency at which to send reminder notifications for open - * incidents. - * - * Generated from protobuf field .google.protobuf.Duration renotify_interval = 2; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setRenotifyInterval($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->renotify_interval = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(NotificationChannelStrategy::class, \Google\Cloud\Monitoring\V3\AlertPolicy_AlertStrategy_NotificationChannelStrategy::class); - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/AlertStrategy/NotificationPrompt.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/AlertStrategy/NotificationPrompt.php deleted file mode 100644 index c5cceba508af..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/AlertStrategy/NotificationPrompt.php +++ /dev/null @@ -1,64 +0,0 @@ -google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationPrompt - */ -class NotificationPrompt -{ - /** - * No strategy specified. Treated as error. - * - * Generated from protobuf enum NOTIFICATION_PROMPT_UNSPECIFIED = 0; - */ - const NOTIFICATION_PROMPT_UNSPECIFIED = 0; - /** - * Notify when an incident is opened. - * - * Generated from protobuf enum OPENED = 1; - */ - const OPENED = 1; - /** - * Notify when an incident is closed. - * - * Generated from protobuf enum CLOSED = 3; - */ - const CLOSED = 3; - - private static $valueToName = [ - self::NOTIFICATION_PROMPT_UNSPECIFIED => 'NOTIFICATION_PROMPT_UNSPECIFIED', - self::OPENED => 'OPENED', - self::CLOSED => 'CLOSED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(NotificationPrompt::class, \Google\Cloud\Monitoring\V3\AlertPolicy_AlertStrategy_NotificationPrompt::class); - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/AlertStrategy/NotificationRateLimit.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/AlertStrategy/NotificationRateLimit.php deleted file mode 100644 index 24928f618e19..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/AlertStrategy/NotificationRateLimit.php +++ /dev/null @@ -1,81 +0,0 @@ -google.monitoring.v3.AlertPolicy.AlertStrategy.NotificationRateLimit - */ -class NotificationRateLimit extends \Google\Protobuf\Internal\Message -{ - /** - * Not more than one notification per `period`. - * - * Generated from protobuf field .google.protobuf.Duration period = 1; - */ - protected $period = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Duration $period - * Not more than one notification per `period`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\Alert::initOnce(); - parent::__construct($data); - } - - /** - * Not more than one notification per `period`. - * - * Generated from protobuf field .google.protobuf.Duration period = 1; - * @return \Google\Protobuf\Duration|null - */ - public function getPeriod() - { - return $this->period; - } - - public function hasPeriod() - { - return isset($this->period); - } - - public function clearPeriod() - { - unset($this->period); - } - - /** - * Not more than one notification per `period`. - * - * Generated from protobuf field .google.protobuf.Duration period = 1; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setPeriod($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->period = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(NotificationRateLimit::class, \Google\Cloud\Monitoring\V3\AlertPolicy_AlertStrategy_NotificationRateLimit::class); - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/Condition.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/Condition.php deleted file mode 100644 index c476fb7bd10c..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/Condition.php +++ /dev/null @@ -1,373 +0,0 @@ -google.monitoring.v3.AlertPolicy.Condition - */ -class Condition extends \Google\Protobuf\Internal\Message -{ - /** - * Required if the condition exists. The unique resource name for this - * condition. Its format is: - * projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[POLICY_ID]/conditions/[CONDITION_ID] - * `[CONDITION_ID]` is assigned by Cloud Monitoring when the - * condition is created as part of a new or updated alerting policy. - * When calling the - * [alertPolicies.create][google.monitoring.v3.AlertPolicyService.CreateAlertPolicy] - * method, do not include the `name` field in the conditions of the - * requested alerting policy. Cloud Monitoring creates the - * condition identifiers and includes them in the new policy. - * When calling the - * [alertPolicies.update][google.monitoring.v3.AlertPolicyService.UpdateAlertPolicy] - * method to update a policy, including a condition `name` causes the - * existing condition to be updated. Conditions without names are added to - * the updated policy. Existing conditions are deleted if they are not - * updated. - * Best practice is to preserve `[CONDITION_ID]` if you make only small - * changes, such as those to condition thresholds, durations, or trigger - * values. Otherwise, treat the change as a new condition and let the - * existing condition be deleted. - * - * Generated from protobuf field string name = 12; - */ - protected $name = ''; - /** - * A short name or phrase used to identify the condition in dashboards, - * notifications, and incidents. To avoid confusion, don't use the same - * display name for multiple conditions in the same policy. - * - * Generated from protobuf field string display_name = 6; - */ - protected $display_name = ''; - protected $condition; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required if the condition exists. The unique resource name for this - * condition. Its format is: - * projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[POLICY_ID]/conditions/[CONDITION_ID] - * `[CONDITION_ID]` is assigned by Cloud Monitoring when the - * condition is created as part of a new or updated alerting policy. - * When calling the - * [alertPolicies.create][google.monitoring.v3.AlertPolicyService.CreateAlertPolicy] - * method, do not include the `name` field in the conditions of the - * requested alerting policy. Cloud Monitoring creates the - * condition identifiers and includes them in the new policy. - * When calling the - * [alertPolicies.update][google.monitoring.v3.AlertPolicyService.UpdateAlertPolicy] - * method to update a policy, including a condition `name` causes the - * existing condition to be updated. Conditions without names are added to - * the updated policy. Existing conditions are deleted if they are not - * updated. - * Best practice is to preserve `[CONDITION_ID]` if you make only small - * changes, such as those to condition thresholds, durations, or trigger - * values. Otherwise, treat the change as a new condition and let the - * existing condition be deleted. - * @type string $display_name - * A short name or phrase used to identify the condition in dashboards, - * notifications, and incidents. To avoid confusion, don't use the same - * display name for multiple conditions in the same policy. - * @type \Google\Cloud\Monitoring\V3\AlertPolicy\Condition\MetricThreshold $condition_threshold - * A condition that compares a time series against a threshold. - * @type \Google\Cloud\Monitoring\V3\AlertPolicy\Condition\MetricAbsence $condition_absent - * A condition that checks that a time series continues to - * receive new data points. - * @type \Google\Cloud\Monitoring\V3\AlertPolicy\Condition\LogMatch $condition_matched_log - * A condition that checks for log messages matching given constraints. If - * set, no other conditions can be present. - * @type \Google\Cloud\Monitoring\V3\AlertPolicy\Condition\MonitoringQueryLanguageCondition $condition_monitoring_query_language - * A condition that uses the Monitoring Query Language to define - * alerts. - * @type \Google\Cloud\Monitoring\V3\AlertPolicy\Condition\PrometheusQueryLanguageCondition $condition_prometheus_query_language - * A condition that uses the Prometheus query language to define alerts. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\Alert::initOnce(); - parent::__construct($data); - } - - /** - * Required if the condition exists. The unique resource name for this - * condition. Its format is: - * projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[POLICY_ID]/conditions/[CONDITION_ID] - * `[CONDITION_ID]` is assigned by Cloud Monitoring when the - * condition is created as part of a new or updated alerting policy. - * When calling the - * [alertPolicies.create][google.monitoring.v3.AlertPolicyService.CreateAlertPolicy] - * method, do not include the `name` field in the conditions of the - * requested alerting policy. Cloud Monitoring creates the - * condition identifiers and includes them in the new policy. - * When calling the - * [alertPolicies.update][google.monitoring.v3.AlertPolicyService.UpdateAlertPolicy] - * method to update a policy, including a condition `name` causes the - * existing condition to be updated. Conditions without names are added to - * the updated policy. Existing conditions are deleted if they are not - * updated. - * Best practice is to preserve `[CONDITION_ID]` if you make only small - * changes, such as those to condition thresholds, durations, or trigger - * values. Otherwise, treat the change as a new condition and let the - * existing condition be deleted. - * - * Generated from protobuf field string name = 12; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required if the condition exists. The unique resource name for this - * condition. Its format is: - * projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[POLICY_ID]/conditions/[CONDITION_ID] - * `[CONDITION_ID]` is assigned by Cloud Monitoring when the - * condition is created as part of a new or updated alerting policy. - * When calling the - * [alertPolicies.create][google.monitoring.v3.AlertPolicyService.CreateAlertPolicy] - * method, do not include the `name` field in the conditions of the - * requested alerting policy. Cloud Monitoring creates the - * condition identifiers and includes them in the new policy. - * When calling the - * [alertPolicies.update][google.monitoring.v3.AlertPolicyService.UpdateAlertPolicy] - * method to update a policy, including a condition `name` causes the - * existing condition to be updated. Conditions without names are added to - * the updated policy. Existing conditions are deleted if they are not - * updated. - * Best practice is to preserve `[CONDITION_ID]` if you make only small - * changes, such as those to condition thresholds, durations, or trigger - * values. Otherwise, treat the change as a new condition and let the - * existing condition be deleted. - * - * Generated from protobuf field string name = 12; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * A short name or phrase used to identify the condition in dashboards, - * notifications, and incidents. To avoid confusion, don't use the same - * display name for multiple conditions in the same policy. - * - * Generated from protobuf field string display_name = 6; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * A short name or phrase used to identify the condition in dashboards, - * notifications, and incidents. To avoid confusion, don't use the same - * display name for multiple conditions in the same policy. - * - * Generated from protobuf field string display_name = 6; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * A condition that compares a time series against a threshold. - * - * Generated from protobuf field .google.monitoring.v3.AlertPolicy.Condition.MetricThreshold condition_threshold = 1; - * @return \Google\Cloud\Monitoring\V3\AlertPolicy\Condition\MetricThreshold|null - */ - public function getConditionThreshold() - { - return $this->readOneof(1); - } - - public function hasConditionThreshold() - { - return $this->hasOneof(1); - } - - /** - * A condition that compares a time series against a threshold. - * - * Generated from protobuf field .google.monitoring.v3.AlertPolicy.Condition.MetricThreshold condition_threshold = 1; - * @param \Google\Cloud\Monitoring\V3\AlertPolicy\Condition\MetricThreshold $var - * @return $this - */ - public function setConditionThreshold($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\AlertPolicy\Condition\MetricThreshold::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * A condition that checks that a time series continues to - * receive new data points. - * - * Generated from protobuf field .google.monitoring.v3.AlertPolicy.Condition.MetricAbsence condition_absent = 2; - * @return \Google\Cloud\Monitoring\V3\AlertPolicy\Condition\MetricAbsence|null - */ - public function getConditionAbsent() - { - return $this->readOneof(2); - } - - public function hasConditionAbsent() - { - return $this->hasOneof(2); - } - - /** - * A condition that checks that a time series continues to - * receive new data points. - * - * Generated from protobuf field .google.monitoring.v3.AlertPolicy.Condition.MetricAbsence condition_absent = 2; - * @param \Google\Cloud\Monitoring\V3\AlertPolicy\Condition\MetricAbsence $var - * @return $this - */ - public function setConditionAbsent($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\AlertPolicy\Condition\MetricAbsence::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * A condition that checks for log messages matching given constraints. If - * set, no other conditions can be present. - * - * Generated from protobuf field .google.monitoring.v3.AlertPolicy.Condition.LogMatch condition_matched_log = 20; - * @return \Google\Cloud\Monitoring\V3\AlertPolicy\Condition\LogMatch|null - */ - public function getConditionMatchedLog() - { - return $this->readOneof(20); - } - - public function hasConditionMatchedLog() - { - return $this->hasOneof(20); - } - - /** - * A condition that checks for log messages matching given constraints. If - * set, no other conditions can be present. - * - * Generated from protobuf field .google.monitoring.v3.AlertPolicy.Condition.LogMatch condition_matched_log = 20; - * @param \Google\Cloud\Monitoring\V3\AlertPolicy\Condition\LogMatch $var - * @return $this - */ - public function setConditionMatchedLog($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\AlertPolicy\Condition\LogMatch::class); - $this->writeOneof(20, $var); - - return $this; - } - - /** - * A condition that uses the Monitoring Query Language to define - * alerts. - * - * Generated from protobuf field .google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition condition_monitoring_query_language = 19; - * @return \Google\Cloud\Monitoring\V3\AlertPolicy\Condition\MonitoringQueryLanguageCondition|null - */ - public function getConditionMonitoringQueryLanguage() - { - return $this->readOneof(19); - } - - public function hasConditionMonitoringQueryLanguage() - { - return $this->hasOneof(19); - } - - /** - * A condition that uses the Monitoring Query Language to define - * alerts. - * - * Generated from protobuf field .google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition condition_monitoring_query_language = 19; - * @param \Google\Cloud\Monitoring\V3\AlertPolicy\Condition\MonitoringQueryLanguageCondition $var - * @return $this - */ - public function setConditionMonitoringQueryLanguage($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\AlertPolicy\Condition\MonitoringQueryLanguageCondition::class); - $this->writeOneof(19, $var); - - return $this; - } - - /** - * A condition that uses the Prometheus query language to define alerts. - * - * Generated from protobuf field .google.monitoring.v3.AlertPolicy.Condition.PrometheusQueryLanguageCondition condition_prometheus_query_language = 21; - * @return \Google\Cloud\Monitoring\V3\AlertPolicy\Condition\PrometheusQueryLanguageCondition|null - */ - public function getConditionPrometheusQueryLanguage() - { - return $this->readOneof(21); - } - - public function hasConditionPrometheusQueryLanguage() - { - return $this->hasOneof(21); - } - - /** - * A condition that uses the Prometheus query language to define alerts. - * - * Generated from protobuf field .google.monitoring.v3.AlertPolicy.Condition.PrometheusQueryLanguageCondition condition_prometheus_query_language = 21; - * @param \Google\Cloud\Monitoring\V3\AlertPolicy\Condition\PrometheusQueryLanguageCondition $var - * @return $this - */ - public function setConditionPrometheusQueryLanguage($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\AlertPolicy\Condition\PrometheusQueryLanguageCondition::class); - $this->writeOneof(21, $var); - - return $this; - } - - /** - * @return string - */ - public function getCondition() - { - return $this->whichOneof("condition"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Condition::class, \Google\Cloud\Monitoring\V3\AlertPolicy_Condition::class); - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/Condition/EvaluationMissingData.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/Condition/EvaluationMissingData.php deleted file mode 100644 index 6fc5a47b481b..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/Condition/EvaluationMissingData.php +++ /dev/null @@ -1,76 +0,0 @@ -google.monitoring.v3.AlertPolicy.Condition.EvaluationMissingData - */ -class EvaluationMissingData -{ - /** - * An unspecified evaluation missing data option. Equivalent to - * EVALUATION_MISSING_DATA_NO_OP. - * - * Generated from protobuf enum EVALUATION_MISSING_DATA_UNSPECIFIED = 0; - */ - const EVALUATION_MISSING_DATA_UNSPECIFIED = 0; - /** - * If there is no data to evaluate the condition, then evaluate the - * condition as false. - * - * Generated from protobuf enum EVALUATION_MISSING_DATA_INACTIVE = 1; - */ - const EVALUATION_MISSING_DATA_INACTIVE = 1; - /** - * If there is no data to evaluate the condition, then evaluate the - * condition as true. - * - * Generated from protobuf enum EVALUATION_MISSING_DATA_ACTIVE = 2; - */ - const EVALUATION_MISSING_DATA_ACTIVE = 2; - /** - * Do not evaluate the condition to any value if there is no data. - * - * Generated from protobuf enum EVALUATION_MISSING_DATA_NO_OP = 3; - */ - const EVALUATION_MISSING_DATA_NO_OP = 3; - - private static $valueToName = [ - self::EVALUATION_MISSING_DATA_UNSPECIFIED => 'EVALUATION_MISSING_DATA_UNSPECIFIED', - self::EVALUATION_MISSING_DATA_INACTIVE => 'EVALUATION_MISSING_DATA_INACTIVE', - self::EVALUATION_MISSING_DATA_ACTIVE => 'EVALUATION_MISSING_DATA_ACTIVE', - self::EVALUATION_MISSING_DATA_NO_OP => 'EVALUATION_MISSING_DATA_NO_OP', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(EvaluationMissingData::class, \Google\Cloud\Monitoring\V3\AlertPolicy_Condition_EvaluationMissingData::class); - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/Condition/LogMatch.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/Condition/LogMatch.php deleted file mode 100644 index cd52e655a016..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/Condition/LogMatch.php +++ /dev/null @@ -1,151 +0,0 @@ -google.monitoring.v3.AlertPolicy.Condition.LogMatch - */ -class LogMatch extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A logs-based filter. See [Advanced Logs - * Queries](https://cloud.google.com/logging/docs/view/advanced-queries) - * for how this filter should be constructed. - * - * Generated from protobuf field string filter = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $filter = ''; - /** - * Optional. A map from a label key to an extractor expression, which is - * used to extract the value for this label key. Each entry in this map is - * a specification for how data should be extracted from log entries that - * match `filter`. Each combination of extracted values is treated as a - * separate rule for the purposes of triggering notifications. Label keys - * and corresponding values can be used in notifications generated by this - * condition. - * Please see [the documentation on logs-based metric - * `valueExtractor`s](https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.metrics#LogMetric.FIELDS.value_extractor) - * for syntax and examples. - * - * Generated from protobuf field map label_extractors = 2; - */ - private $label_extractors; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $filter - * Required. A logs-based filter. See [Advanced Logs - * Queries](https://cloud.google.com/logging/docs/view/advanced-queries) - * for how this filter should be constructed. - * @type array|\Google\Protobuf\Internal\MapField $label_extractors - * Optional. A map from a label key to an extractor expression, which is - * used to extract the value for this label key. Each entry in this map is - * a specification for how data should be extracted from log entries that - * match `filter`. Each combination of extracted values is treated as a - * separate rule for the purposes of triggering notifications. Label keys - * and corresponding values can be used in notifications generated by this - * condition. - * Please see [the documentation on logs-based metric - * `valueExtractor`s](https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.metrics#LogMetric.FIELDS.value_extractor) - * for syntax and examples. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\Alert::initOnce(); - parent::__construct($data); - } - - /** - * Required. A logs-based filter. See [Advanced Logs - * Queries](https://cloud.google.com/logging/docs/view/advanced-queries) - * for how this filter should be constructed. - * - * Generated from protobuf field string filter = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Required. A logs-based filter. See [Advanced Logs - * Queries](https://cloud.google.com/logging/docs/view/advanced-queries) - * for how this filter should be constructed. - * - * Generated from protobuf field string filter = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Optional. A map from a label key to an extractor expression, which is - * used to extract the value for this label key. Each entry in this map is - * a specification for how data should be extracted from log entries that - * match `filter`. Each combination of extracted values is treated as a - * separate rule for the purposes of triggering notifications. Label keys - * and corresponding values can be used in notifications generated by this - * condition. - * Please see [the documentation on logs-based metric - * `valueExtractor`s](https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.metrics#LogMetric.FIELDS.value_extractor) - * for syntax and examples. - * - * Generated from protobuf field map label_extractors = 2; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabelExtractors() - { - return $this->label_extractors; - } - - /** - * Optional. A map from a label key to an extractor expression, which is - * used to extract the value for this label key. Each entry in this map is - * a specification for how data should be extracted from log entries that - * match `filter`. Each combination of extracted values is treated as a - * separate rule for the purposes of triggering notifications. Label keys - * and corresponding values can be used in notifications generated by this - * condition. - * Please see [the documentation on logs-based metric - * `valueExtractor`s](https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.metrics#LogMetric.FIELDS.value_extractor) - * for syntax and examples. - * - * Generated from protobuf field map label_extractors = 2; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabelExtractors($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->label_extractors = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(LogMatch::class, \Google\Cloud\Monitoring\V3\AlertPolicy_Condition_LogMatch::class); - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/Condition/MetricAbsence.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/Condition/MetricAbsence.php deleted file mode 100644 index fc6aad1dfc46..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/Condition/MetricAbsence.php +++ /dev/null @@ -1,304 +0,0 @@ -google.monitoring.v3.AlertPolicy.Condition.MetricAbsence - */ -class MetricAbsence extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A - * [filter](https://cloud.google.com/monitoring/api/v3/filters) that - * identifies which time series should be compared with the threshold. - * The filter is similar to the one that is specified in the - * [`ListTimeSeries` - * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list) - * (that call is useful to verify the time series that will be retrieved / - * processed). The filter must specify the metric type and the resource - * type. Optionally, it can specify resource labels and metric labels. - * This field must not exceed 2048 Unicode characters in length. - * - * Generated from protobuf field string filter = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $filter = ''; - /** - * Specifies the alignment of data points in individual time series as - * well as how to combine the retrieved time series together (such as - * when aggregating multiple streams on each resource to a single - * stream for each resource or when aggregating streams across all - * members of a group of resources). Multiple aggregations - * are applied in the order specified. - * This field is similar to the one in the [`ListTimeSeries` - * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list). - * It is advisable to use the `ListTimeSeries` method when debugging this - * field. - * - * Generated from protobuf field repeated .google.monitoring.v3.Aggregation aggregations = 5; - */ - private $aggregations; - /** - * The amount of time that a time series must fail to report new - * data to be considered failing. The minimum value of this field - * is 120 seconds. Larger values that are a multiple of a - * minute--for example, 240 or 300 seconds--are supported. - * If an invalid value is given, an - * error will be returned. The `Duration.nanos` field is - * ignored. - * - * Generated from protobuf field .google.protobuf.Duration duration = 2; - */ - protected $duration = null; - /** - * The number/percent of time series for which the comparison must hold - * in order for the condition to trigger. If unspecified, then the - * condition will trigger if the comparison is true for any of the - * time series that have been identified by `filter` and `aggregations`. - * - * Generated from protobuf field .google.monitoring.v3.AlertPolicy.Condition.Trigger trigger = 3; - */ - protected $trigger = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $filter - * Required. A - * [filter](https://cloud.google.com/monitoring/api/v3/filters) that - * identifies which time series should be compared with the threshold. - * The filter is similar to the one that is specified in the - * [`ListTimeSeries` - * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list) - * (that call is useful to verify the time series that will be retrieved / - * processed). The filter must specify the metric type and the resource - * type. Optionally, it can specify resource labels and metric labels. - * This field must not exceed 2048 Unicode characters in length. - * @type array<\Google\Cloud\Monitoring\V3\Aggregation>|\Google\Protobuf\Internal\RepeatedField $aggregations - * Specifies the alignment of data points in individual time series as - * well as how to combine the retrieved time series together (such as - * when aggregating multiple streams on each resource to a single - * stream for each resource or when aggregating streams across all - * members of a group of resources). Multiple aggregations - * are applied in the order specified. - * This field is similar to the one in the [`ListTimeSeries` - * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list). - * It is advisable to use the `ListTimeSeries` method when debugging this - * field. - * @type \Google\Protobuf\Duration $duration - * The amount of time that a time series must fail to report new - * data to be considered failing. The minimum value of this field - * is 120 seconds. Larger values that are a multiple of a - * minute--for example, 240 or 300 seconds--are supported. - * If an invalid value is given, an - * error will be returned. The `Duration.nanos` field is - * ignored. - * @type \Google\Cloud\Monitoring\V3\AlertPolicy\Condition\Trigger $trigger - * The number/percent of time series for which the comparison must hold - * in order for the condition to trigger. If unspecified, then the - * condition will trigger if the comparison is true for any of the - * time series that have been identified by `filter` and `aggregations`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\Alert::initOnce(); - parent::__construct($data); - } - - /** - * Required. A - * [filter](https://cloud.google.com/monitoring/api/v3/filters) that - * identifies which time series should be compared with the threshold. - * The filter is similar to the one that is specified in the - * [`ListTimeSeries` - * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list) - * (that call is useful to verify the time series that will be retrieved / - * processed). The filter must specify the metric type and the resource - * type. Optionally, it can specify resource labels and metric labels. - * This field must not exceed 2048 Unicode characters in length. - * - * Generated from protobuf field string filter = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Required. A - * [filter](https://cloud.google.com/monitoring/api/v3/filters) that - * identifies which time series should be compared with the threshold. - * The filter is similar to the one that is specified in the - * [`ListTimeSeries` - * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list) - * (that call is useful to verify the time series that will be retrieved / - * processed). The filter must specify the metric type and the resource - * type. Optionally, it can specify resource labels and metric labels. - * This field must not exceed 2048 Unicode characters in length. - * - * Generated from protobuf field string filter = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Specifies the alignment of data points in individual time series as - * well as how to combine the retrieved time series together (such as - * when aggregating multiple streams on each resource to a single - * stream for each resource or when aggregating streams across all - * members of a group of resources). Multiple aggregations - * are applied in the order specified. - * This field is similar to the one in the [`ListTimeSeries` - * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list). - * It is advisable to use the `ListTimeSeries` method when debugging this - * field. - * - * Generated from protobuf field repeated .google.monitoring.v3.Aggregation aggregations = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAggregations() - { - return $this->aggregations; - } - - /** - * Specifies the alignment of data points in individual time series as - * well as how to combine the retrieved time series together (such as - * when aggregating multiple streams on each resource to a single - * stream for each resource or when aggregating streams across all - * members of a group of resources). Multiple aggregations - * are applied in the order specified. - * This field is similar to the one in the [`ListTimeSeries` - * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list). - * It is advisable to use the `ListTimeSeries` method when debugging this - * field. - * - * Generated from protobuf field repeated .google.monitoring.v3.Aggregation aggregations = 5; - * @param array<\Google\Cloud\Monitoring\V3\Aggregation>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAggregations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Monitoring\V3\Aggregation::class); - $this->aggregations = $arr; - - return $this; - } - - /** - * The amount of time that a time series must fail to report new - * data to be considered failing. The minimum value of this field - * is 120 seconds. Larger values that are a multiple of a - * minute--for example, 240 or 300 seconds--are supported. - * If an invalid value is given, an - * error will be returned. The `Duration.nanos` field is - * ignored. - * - * Generated from protobuf field .google.protobuf.Duration duration = 2; - * @return \Google\Protobuf\Duration|null - */ - public function getDuration() - { - return $this->duration; - } - - public function hasDuration() - { - return isset($this->duration); - } - - public function clearDuration() - { - unset($this->duration); - } - - /** - * The amount of time that a time series must fail to report new - * data to be considered failing. The minimum value of this field - * is 120 seconds. Larger values that are a multiple of a - * minute--for example, 240 or 300 seconds--are supported. - * If an invalid value is given, an - * error will be returned. The `Duration.nanos` field is - * ignored. - * - * Generated from protobuf field .google.protobuf.Duration duration = 2; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->duration = $var; - - return $this; - } - - /** - * The number/percent of time series for which the comparison must hold - * in order for the condition to trigger. If unspecified, then the - * condition will trigger if the comparison is true for any of the - * time series that have been identified by `filter` and `aggregations`. - * - * Generated from protobuf field .google.monitoring.v3.AlertPolicy.Condition.Trigger trigger = 3; - * @return \Google\Cloud\Monitoring\V3\AlertPolicy\Condition\Trigger|null - */ - public function getTrigger() - { - return $this->trigger; - } - - public function hasTrigger() - { - return isset($this->trigger); - } - - public function clearTrigger() - { - unset($this->trigger); - } - - /** - * The number/percent of time series for which the comparison must hold - * in order for the condition to trigger. If unspecified, then the - * condition will trigger if the comparison is true for any of the - * time series that have been identified by `filter` and `aggregations`. - * - * Generated from protobuf field .google.monitoring.v3.AlertPolicy.Condition.Trigger trigger = 3; - * @param \Google\Cloud\Monitoring\V3\AlertPolicy\Condition\Trigger $var - * @return $this - */ - public function setTrigger($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\AlertPolicy\Condition\Trigger::class); - $this->trigger = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(MetricAbsence::class, \Google\Cloud\Monitoring\V3\AlertPolicy_Condition_MetricAbsence::class); - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/Condition/MetricThreshold.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/Condition/MetricThreshold.php deleted file mode 100644 index 74e9099f57fc..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/Condition/MetricThreshold.php +++ /dev/null @@ -1,635 +0,0 @@ -google.monitoring.v3.AlertPolicy.Condition.MetricThreshold - */ -class MetricThreshold extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A - * [filter](https://cloud.google.com/monitoring/api/v3/filters) that - * identifies which time series should be compared with the threshold. - * The filter is similar to the one that is specified in the - * [`ListTimeSeries` - * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list) - * (that call is useful to verify the time series that will be retrieved / - * processed). The filter must specify the metric type and the resource - * type. Optionally, it can specify resource labels and metric labels. - * This field must not exceed 2048 Unicode characters in length. - * - * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $filter = ''; - /** - * Specifies the alignment of data points in individual time series as - * well as how to combine the retrieved time series together (such as - * when aggregating multiple streams on each resource to a single - * stream for each resource or when aggregating streams across all - * members of a group of resources). Multiple aggregations - * are applied in the order specified. - * This field is similar to the one in the [`ListTimeSeries` - * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list). - * It is advisable to use the `ListTimeSeries` method when debugging this - * field. - * - * Generated from protobuf field repeated .google.monitoring.v3.Aggregation aggregations = 8; - */ - private $aggregations; - /** - * A [filter](https://cloud.google.com/monitoring/api/v3/filters) that - * identifies a time series that should be used as the denominator of a - * ratio that will be compared with the threshold. If a - * `denominator_filter` is specified, the time series specified by the - * `filter` field will be used as the numerator. - * The filter must specify the metric type and optionally may contain - * restrictions on resource type, resource labels, and metric labels. - * This field may not exceed 2048 Unicode characters in length. - * - * Generated from protobuf field string denominator_filter = 9; - */ - protected $denominator_filter = ''; - /** - * Specifies the alignment of data points in individual time series - * selected by `denominatorFilter` as - * well as how to combine the retrieved time series together (such as - * when aggregating multiple streams on each resource to a single - * stream for each resource or when aggregating streams across all - * members of a group of resources). - * When computing ratios, the `aggregations` and - * `denominator_aggregations` fields must use the same alignment period - * and produce time series that have the same periodicity and labels. - * - * Generated from protobuf field repeated .google.monitoring.v3.Aggregation denominator_aggregations = 10; - */ - private $denominator_aggregations; - /** - * When this field is present, the `MetricThreshold` condition forecasts - * whether the time series is predicted to violate the threshold within - * the `forecast_horizon`. When this field is not set, the - * `MetricThreshold` tests the current value of the timeseries against the - * threshold. - * - * Generated from protobuf field .google.monitoring.v3.AlertPolicy.Condition.MetricThreshold.ForecastOptions forecast_options = 12; - */ - protected $forecast_options = null; - /** - * The comparison to apply between the time series (indicated by `filter` - * and `aggregation`) and the threshold (indicated by `threshold_value`). - * The comparison is applied on each time series, with the time series - * on the left-hand side and the threshold on the right-hand side. - * Only `COMPARISON_LT` and `COMPARISON_GT` are supported currently. - * - * Generated from protobuf field .google.monitoring.v3.ComparisonType comparison = 4; - */ - protected $comparison = 0; - /** - * A value against which to compare the time series. - * - * Generated from protobuf field double threshold_value = 5; - */ - protected $threshold_value = 0.0; - /** - * The amount of time that a time series must violate the - * threshold to be considered failing. Currently, only values - * that are a multiple of a minute--e.g., 0, 60, 120, or 300 - * seconds--are supported. If an invalid value is given, an - * error will be returned. When choosing a duration, it is useful to - * keep in mind the frequency of the underlying time series data - * (which may also be affected by any alignments specified in the - * `aggregations` field); a good duration is long enough so that a single - * outlier does not generate spurious alerts, but short enough that - * unhealthy states are detected and alerted on quickly. - * - * Generated from protobuf field .google.protobuf.Duration duration = 6; - */ - protected $duration = null; - /** - * The number/percent of time series for which the comparison must hold - * in order for the condition to trigger. If unspecified, then the - * condition will trigger if the comparison is true for any of the - * time series that have been identified by `filter` and `aggregations`, - * or by the ratio, if `denominator_filter` and `denominator_aggregations` - * are specified. - * - * Generated from protobuf field .google.monitoring.v3.AlertPolicy.Condition.Trigger trigger = 7; - */ - protected $trigger = null; - /** - * A condition control that determines how metric-threshold conditions - * are evaluated when data stops arriving. To use this control, the value - * of the `duration` field must be greater than or equal to 60 seconds. - * - * Generated from protobuf field .google.monitoring.v3.AlertPolicy.Condition.EvaluationMissingData evaluation_missing_data = 11; - */ - protected $evaluation_missing_data = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $filter - * Required. A - * [filter](https://cloud.google.com/monitoring/api/v3/filters) that - * identifies which time series should be compared with the threshold. - * The filter is similar to the one that is specified in the - * [`ListTimeSeries` - * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list) - * (that call is useful to verify the time series that will be retrieved / - * processed). The filter must specify the metric type and the resource - * type. Optionally, it can specify resource labels and metric labels. - * This field must not exceed 2048 Unicode characters in length. - * @type array<\Google\Cloud\Monitoring\V3\Aggregation>|\Google\Protobuf\Internal\RepeatedField $aggregations - * Specifies the alignment of data points in individual time series as - * well as how to combine the retrieved time series together (such as - * when aggregating multiple streams on each resource to a single - * stream for each resource or when aggregating streams across all - * members of a group of resources). Multiple aggregations - * are applied in the order specified. - * This field is similar to the one in the [`ListTimeSeries` - * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list). - * It is advisable to use the `ListTimeSeries` method when debugging this - * field. - * @type string $denominator_filter - * A [filter](https://cloud.google.com/monitoring/api/v3/filters) that - * identifies a time series that should be used as the denominator of a - * ratio that will be compared with the threshold. If a - * `denominator_filter` is specified, the time series specified by the - * `filter` field will be used as the numerator. - * The filter must specify the metric type and optionally may contain - * restrictions on resource type, resource labels, and metric labels. - * This field may not exceed 2048 Unicode characters in length. - * @type array<\Google\Cloud\Monitoring\V3\Aggregation>|\Google\Protobuf\Internal\RepeatedField $denominator_aggregations - * Specifies the alignment of data points in individual time series - * selected by `denominatorFilter` as - * well as how to combine the retrieved time series together (such as - * when aggregating multiple streams on each resource to a single - * stream for each resource or when aggregating streams across all - * members of a group of resources). - * When computing ratios, the `aggregations` and - * `denominator_aggregations` fields must use the same alignment period - * and produce time series that have the same periodicity and labels. - * @type \Google\Cloud\Monitoring\V3\AlertPolicy\Condition\MetricThreshold\ForecastOptions $forecast_options - * When this field is present, the `MetricThreshold` condition forecasts - * whether the time series is predicted to violate the threshold within - * the `forecast_horizon`. When this field is not set, the - * `MetricThreshold` tests the current value of the timeseries against the - * threshold. - * @type int $comparison - * The comparison to apply between the time series (indicated by `filter` - * and `aggregation`) and the threshold (indicated by `threshold_value`). - * The comparison is applied on each time series, with the time series - * on the left-hand side and the threshold on the right-hand side. - * Only `COMPARISON_LT` and `COMPARISON_GT` are supported currently. - * @type float $threshold_value - * A value against which to compare the time series. - * @type \Google\Protobuf\Duration $duration - * The amount of time that a time series must violate the - * threshold to be considered failing. Currently, only values - * that are a multiple of a minute--e.g., 0, 60, 120, or 300 - * seconds--are supported. If an invalid value is given, an - * error will be returned. When choosing a duration, it is useful to - * keep in mind the frequency of the underlying time series data - * (which may also be affected by any alignments specified in the - * `aggregations` field); a good duration is long enough so that a single - * outlier does not generate spurious alerts, but short enough that - * unhealthy states are detected and alerted on quickly. - * @type \Google\Cloud\Monitoring\V3\AlertPolicy\Condition\Trigger $trigger - * The number/percent of time series for which the comparison must hold - * in order for the condition to trigger. If unspecified, then the - * condition will trigger if the comparison is true for any of the - * time series that have been identified by `filter` and `aggregations`, - * or by the ratio, if `denominator_filter` and `denominator_aggregations` - * are specified. - * @type int $evaluation_missing_data - * A condition control that determines how metric-threshold conditions - * are evaluated when data stops arriving. To use this control, the value - * of the `duration` field must be greater than or equal to 60 seconds. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\Alert::initOnce(); - parent::__construct($data); - } - - /** - * Required. A - * [filter](https://cloud.google.com/monitoring/api/v3/filters) that - * identifies which time series should be compared with the threshold. - * The filter is similar to the one that is specified in the - * [`ListTimeSeries` - * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list) - * (that call is useful to verify the time series that will be retrieved / - * processed). The filter must specify the metric type and the resource - * type. Optionally, it can specify resource labels and metric labels. - * This field must not exceed 2048 Unicode characters in length. - * - * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Required. A - * [filter](https://cloud.google.com/monitoring/api/v3/filters) that - * identifies which time series should be compared with the threshold. - * The filter is similar to the one that is specified in the - * [`ListTimeSeries` - * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list) - * (that call is useful to verify the time series that will be retrieved / - * processed). The filter must specify the metric type and the resource - * type. Optionally, it can specify resource labels and metric labels. - * This field must not exceed 2048 Unicode characters in length. - * - * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Specifies the alignment of data points in individual time series as - * well as how to combine the retrieved time series together (such as - * when aggregating multiple streams on each resource to a single - * stream for each resource or when aggregating streams across all - * members of a group of resources). Multiple aggregations - * are applied in the order specified. - * This field is similar to the one in the [`ListTimeSeries` - * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list). - * It is advisable to use the `ListTimeSeries` method when debugging this - * field. - * - * Generated from protobuf field repeated .google.monitoring.v3.Aggregation aggregations = 8; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAggregations() - { - return $this->aggregations; - } - - /** - * Specifies the alignment of data points in individual time series as - * well as how to combine the retrieved time series together (such as - * when aggregating multiple streams on each resource to a single - * stream for each resource or when aggregating streams across all - * members of a group of resources). Multiple aggregations - * are applied in the order specified. - * This field is similar to the one in the [`ListTimeSeries` - * request](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list). - * It is advisable to use the `ListTimeSeries` method when debugging this - * field. - * - * Generated from protobuf field repeated .google.monitoring.v3.Aggregation aggregations = 8; - * @param array<\Google\Cloud\Monitoring\V3\Aggregation>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAggregations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Monitoring\V3\Aggregation::class); - $this->aggregations = $arr; - - return $this; - } - - /** - * A [filter](https://cloud.google.com/monitoring/api/v3/filters) that - * identifies a time series that should be used as the denominator of a - * ratio that will be compared with the threshold. If a - * `denominator_filter` is specified, the time series specified by the - * `filter` field will be used as the numerator. - * The filter must specify the metric type and optionally may contain - * restrictions on resource type, resource labels, and metric labels. - * This field may not exceed 2048 Unicode characters in length. - * - * Generated from protobuf field string denominator_filter = 9; - * @return string - */ - public function getDenominatorFilter() - { - return $this->denominator_filter; - } - - /** - * A [filter](https://cloud.google.com/monitoring/api/v3/filters) that - * identifies a time series that should be used as the denominator of a - * ratio that will be compared with the threshold. If a - * `denominator_filter` is specified, the time series specified by the - * `filter` field will be used as the numerator. - * The filter must specify the metric type and optionally may contain - * restrictions on resource type, resource labels, and metric labels. - * This field may not exceed 2048 Unicode characters in length. - * - * Generated from protobuf field string denominator_filter = 9; - * @param string $var - * @return $this - */ - public function setDenominatorFilter($var) - { - GPBUtil::checkString($var, True); - $this->denominator_filter = $var; - - return $this; - } - - /** - * Specifies the alignment of data points in individual time series - * selected by `denominatorFilter` as - * well as how to combine the retrieved time series together (such as - * when aggregating multiple streams on each resource to a single - * stream for each resource or when aggregating streams across all - * members of a group of resources). - * When computing ratios, the `aggregations` and - * `denominator_aggregations` fields must use the same alignment period - * and produce time series that have the same periodicity and labels. - * - * Generated from protobuf field repeated .google.monitoring.v3.Aggregation denominator_aggregations = 10; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDenominatorAggregations() - { - return $this->denominator_aggregations; - } - - /** - * Specifies the alignment of data points in individual time series - * selected by `denominatorFilter` as - * well as how to combine the retrieved time series together (such as - * when aggregating multiple streams on each resource to a single - * stream for each resource or when aggregating streams across all - * members of a group of resources). - * When computing ratios, the `aggregations` and - * `denominator_aggregations` fields must use the same alignment period - * and produce time series that have the same periodicity and labels. - * - * Generated from protobuf field repeated .google.monitoring.v3.Aggregation denominator_aggregations = 10; - * @param array<\Google\Cloud\Monitoring\V3\Aggregation>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDenominatorAggregations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Monitoring\V3\Aggregation::class); - $this->denominator_aggregations = $arr; - - return $this; - } - - /** - * When this field is present, the `MetricThreshold` condition forecasts - * whether the time series is predicted to violate the threshold within - * the `forecast_horizon`. When this field is not set, the - * `MetricThreshold` tests the current value of the timeseries against the - * threshold. - * - * Generated from protobuf field .google.monitoring.v3.AlertPolicy.Condition.MetricThreshold.ForecastOptions forecast_options = 12; - * @return \Google\Cloud\Monitoring\V3\AlertPolicy\Condition\MetricThreshold\ForecastOptions|null - */ - public function getForecastOptions() - { - return $this->forecast_options; - } - - public function hasForecastOptions() - { - return isset($this->forecast_options); - } - - public function clearForecastOptions() - { - unset($this->forecast_options); - } - - /** - * When this field is present, the `MetricThreshold` condition forecasts - * whether the time series is predicted to violate the threshold within - * the `forecast_horizon`. When this field is not set, the - * `MetricThreshold` tests the current value of the timeseries against the - * threshold. - * - * Generated from protobuf field .google.monitoring.v3.AlertPolicy.Condition.MetricThreshold.ForecastOptions forecast_options = 12; - * @param \Google\Cloud\Monitoring\V3\AlertPolicy\Condition\MetricThreshold\ForecastOptions $var - * @return $this - */ - public function setForecastOptions($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\AlertPolicy\Condition\MetricThreshold\ForecastOptions::class); - $this->forecast_options = $var; - - return $this; - } - - /** - * The comparison to apply between the time series (indicated by `filter` - * and `aggregation`) and the threshold (indicated by `threshold_value`). - * The comparison is applied on each time series, with the time series - * on the left-hand side and the threshold on the right-hand side. - * Only `COMPARISON_LT` and `COMPARISON_GT` are supported currently. - * - * Generated from protobuf field .google.monitoring.v3.ComparisonType comparison = 4; - * @return int - */ - public function getComparison() - { - return $this->comparison; - } - - /** - * The comparison to apply between the time series (indicated by `filter` - * and `aggregation`) and the threshold (indicated by `threshold_value`). - * The comparison is applied on each time series, with the time series - * on the left-hand side and the threshold on the right-hand side. - * Only `COMPARISON_LT` and `COMPARISON_GT` are supported currently. - * - * Generated from protobuf field .google.monitoring.v3.ComparisonType comparison = 4; - * @param int $var - * @return $this - */ - public function setComparison($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Monitoring\V3\ComparisonType::class); - $this->comparison = $var; - - return $this; - } - - /** - * A value against which to compare the time series. - * - * Generated from protobuf field double threshold_value = 5; - * @return float - */ - public function getThresholdValue() - { - return $this->threshold_value; - } - - /** - * A value against which to compare the time series. - * - * Generated from protobuf field double threshold_value = 5; - * @param float $var - * @return $this - */ - public function setThresholdValue($var) - { - GPBUtil::checkDouble($var); - $this->threshold_value = $var; - - return $this; - } - - /** - * The amount of time that a time series must violate the - * threshold to be considered failing. Currently, only values - * that are a multiple of a minute--e.g., 0, 60, 120, or 300 - * seconds--are supported. If an invalid value is given, an - * error will be returned. When choosing a duration, it is useful to - * keep in mind the frequency of the underlying time series data - * (which may also be affected by any alignments specified in the - * `aggregations` field); a good duration is long enough so that a single - * outlier does not generate spurious alerts, but short enough that - * unhealthy states are detected and alerted on quickly. - * - * Generated from protobuf field .google.protobuf.Duration duration = 6; - * @return \Google\Protobuf\Duration|null - */ - public function getDuration() - { - return $this->duration; - } - - public function hasDuration() - { - return isset($this->duration); - } - - public function clearDuration() - { - unset($this->duration); - } - - /** - * The amount of time that a time series must violate the - * threshold to be considered failing. Currently, only values - * that are a multiple of a minute--e.g., 0, 60, 120, or 300 - * seconds--are supported. If an invalid value is given, an - * error will be returned. When choosing a duration, it is useful to - * keep in mind the frequency of the underlying time series data - * (which may also be affected by any alignments specified in the - * `aggregations` field); a good duration is long enough so that a single - * outlier does not generate spurious alerts, but short enough that - * unhealthy states are detected and alerted on quickly. - * - * Generated from protobuf field .google.protobuf.Duration duration = 6; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->duration = $var; - - return $this; - } - - /** - * The number/percent of time series for which the comparison must hold - * in order for the condition to trigger. If unspecified, then the - * condition will trigger if the comparison is true for any of the - * time series that have been identified by `filter` and `aggregations`, - * or by the ratio, if `denominator_filter` and `denominator_aggregations` - * are specified. - * - * Generated from protobuf field .google.monitoring.v3.AlertPolicy.Condition.Trigger trigger = 7; - * @return \Google\Cloud\Monitoring\V3\AlertPolicy\Condition\Trigger|null - */ - public function getTrigger() - { - return $this->trigger; - } - - public function hasTrigger() - { - return isset($this->trigger); - } - - public function clearTrigger() - { - unset($this->trigger); - } - - /** - * The number/percent of time series for which the comparison must hold - * in order for the condition to trigger. If unspecified, then the - * condition will trigger if the comparison is true for any of the - * time series that have been identified by `filter` and `aggregations`, - * or by the ratio, if `denominator_filter` and `denominator_aggregations` - * are specified. - * - * Generated from protobuf field .google.monitoring.v3.AlertPolicy.Condition.Trigger trigger = 7; - * @param \Google\Cloud\Monitoring\V3\AlertPolicy\Condition\Trigger $var - * @return $this - */ - public function setTrigger($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\AlertPolicy\Condition\Trigger::class); - $this->trigger = $var; - - return $this; - } - - /** - * A condition control that determines how metric-threshold conditions - * are evaluated when data stops arriving. To use this control, the value - * of the `duration` field must be greater than or equal to 60 seconds. - * - * Generated from protobuf field .google.monitoring.v3.AlertPolicy.Condition.EvaluationMissingData evaluation_missing_data = 11; - * @return int - */ - public function getEvaluationMissingData() - { - return $this->evaluation_missing_data; - } - - /** - * A condition control that determines how metric-threshold conditions - * are evaluated when data stops arriving. To use this control, the value - * of the `duration` field must be greater than or equal to 60 seconds. - * - * Generated from protobuf field .google.monitoring.v3.AlertPolicy.Condition.EvaluationMissingData evaluation_missing_data = 11; - * @param int $var - * @return $this - */ - public function setEvaluationMissingData($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Monitoring\V3\AlertPolicy\Condition\EvaluationMissingData::class); - $this->evaluation_missing_data = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(MetricThreshold::class, \Google\Cloud\Monitoring\V3\AlertPolicy_Condition_MetricThreshold::class); - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/Condition/MetricThreshold/ForecastOptions.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/Condition/MetricThreshold/ForecastOptions.php deleted file mode 100644 index 5b730b5b812c..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/Condition/MetricThreshold/ForecastOptions.php +++ /dev/null @@ -1,101 +0,0 @@ -google.monitoring.v3.AlertPolicy.Condition.MetricThreshold.ForecastOptions - */ -class ForecastOptions extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The length of time into the future to forecast whether a - * time series will violate the threshold. If the predicted value is - * found to violate the threshold, and the violation is observed in all - * forecasts made for the configured `duration`, then the time series is - * considered to be failing. - * The forecast horizon can range from 1 hour to 60 hours. - * - * Generated from protobuf field .google.protobuf.Duration forecast_horizon = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $forecast_horizon = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Duration $forecast_horizon - * Required. The length of time into the future to forecast whether a - * time series will violate the threshold. If the predicted value is - * found to violate the threshold, and the violation is observed in all - * forecasts made for the configured `duration`, then the time series is - * considered to be failing. - * The forecast horizon can range from 1 hour to 60 hours. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\Alert::initOnce(); - parent::__construct($data); - } - - /** - * Required. The length of time into the future to forecast whether a - * time series will violate the threshold. If the predicted value is - * found to violate the threshold, and the violation is observed in all - * forecasts made for the configured `duration`, then the time series is - * considered to be failing. - * The forecast horizon can range from 1 hour to 60 hours. - * - * Generated from protobuf field .google.protobuf.Duration forecast_horizon = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Duration|null - */ - public function getForecastHorizon() - { - return $this->forecast_horizon; - } - - public function hasForecastHorizon() - { - return isset($this->forecast_horizon); - } - - public function clearForecastHorizon() - { - unset($this->forecast_horizon); - } - - /** - * Required. The length of time into the future to forecast whether a - * time series will violate the threshold. If the predicted value is - * found to violate the threshold, and the violation is observed in all - * forecasts made for the configured `duration`, then the time series is - * considered to be failing. - * The forecast horizon can range from 1 hour to 60 hours. - * - * Generated from protobuf field .google.protobuf.Duration forecast_horizon = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setForecastHorizon($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->forecast_horizon = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ForecastOptions::class, \Google\Cloud\Monitoring\V3\AlertPolicy_Condition_MetricThreshold_ForecastOptions::class); - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/Condition/MonitoringQueryLanguageCondition.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/Condition/MonitoringQueryLanguageCondition.php deleted file mode 100644 index 22bb059fe5b0..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/Condition/MonitoringQueryLanguageCondition.php +++ /dev/null @@ -1,257 +0,0 @@ -google.monitoring.v3.AlertPolicy.Condition.MonitoringQueryLanguageCondition - */ -class MonitoringQueryLanguageCondition extends \Google\Protobuf\Internal\Message -{ - /** - * [Monitoring Query Language](https://cloud.google.com/monitoring/mql) - * query that outputs a boolean stream. - * - * Generated from protobuf field string query = 1; - */ - protected $query = ''; - /** - * The amount of time that a time series must violate the - * threshold to be considered failing. Currently, only values - * that are a multiple of a minute--e.g., 0, 60, 120, or 300 - * seconds--are supported. If an invalid value is given, an - * error will be returned. When choosing a duration, it is useful to - * keep in mind the frequency of the underlying time series data - * (which may also be affected by any alignments specified in the - * `aggregations` field); a good duration is long enough so that a single - * outlier does not generate spurious alerts, but short enough that - * unhealthy states are detected and alerted on quickly. - * - * Generated from protobuf field .google.protobuf.Duration duration = 2; - */ - protected $duration = null; - /** - * The number/percent of time series for which the comparison must hold - * in order for the condition to trigger. If unspecified, then the - * condition will trigger if the comparison is true for any of the - * time series that have been identified by `filter` and `aggregations`, - * or by the ratio, if `denominator_filter` and `denominator_aggregations` - * are specified. - * - * Generated from protobuf field .google.monitoring.v3.AlertPolicy.Condition.Trigger trigger = 3; - */ - protected $trigger = null; - /** - * A condition control that determines how metric-threshold conditions - * are evaluated when data stops arriving. - * - * Generated from protobuf field .google.monitoring.v3.AlertPolicy.Condition.EvaluationMissingData evaluation_missing_data = 4; - */ - protected $evaluation_missing_data = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $query - * [Monitoring Query Language](https://cloud.google.com/monitoring/mql) - * query that outputs a boolean stream. - * @type \Google\Protobuf\Duration $duration - * The amount of time that a time series must violate the - * threshold to be considered failing. Currently, only values - * that are a multiple of a minute--e.g., 0, 60, 120, or 300 - * seconds--are supported. If an invalid value is given, an - * error will be returned. When choosing a duration, it is useful to - * keep in mind the frequency of the underlying time series data - * (which may also be affected by any alignments specified in the - * `aggregations` field); a good duration is long enough so that a single - * outlier does not generate spurious alerts, but short enough that - * unhealthy states are detected and alerted on quickly. - * @type \Google\Cloud\Monitoring\V3\AlertPolicy\Condition\Trigger $trigger - * The number/percent of time series for which the comparison must hold - * in order for the condition to trigger. If unspecified, then the - * condition will trigger if the comparison is true for any of the - * time series that have been identified by `filter` and `aggregations`, - * or by the ratio, if `denominator_filter` and `denominator_aggregations` - * are specified. - * @type int $evaluation_missing_data - * A condition control that determines how metric-threshold conditions - * are evaluated when data stops arriving. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\Alert::initOnce(); - parent::__construct($data); - } - - /** - * [Monitoring Query Language](https://cloud.google.com/monitoring/mql) - * query that outputs a boolean stream. - * - * Generated from protobuf field string query = 1; - * @return string - */ - public function getQuery() - { - return $this->query; - } - - /** - * [Monitoring Query Language](https://cloud.google.com/monitoring/mql) - * query that outputs a boolean stream. - * - * Generated from protobuf field string query = 1; - * @param string $var - * @return $this - */ - public function setQuery($var) - { - GPBUtil::checkString($var, True); - $this->query = $var; - - return $this; - } - - /** - * The amount of time that a time series must violate the - * threshold to be considered failing. Currently, only values - * that are a multiple of a minute--e.g., 0, 60, 120, or 300 - * seconds--are supported. If an invalid value is given, an - * error will be returned. When choosing a duration, it is useful to - * keep in mind the frequency of the underlying time series data - * (which may also be affected by any alignments specified in the - * `aggregations` field); a good duration is long enough so that a single - * outlier does not generate spurious alerts, but short enough that - * unhealthy states are detected and alerted on quickly. - * - * Generated from protobuf field .google.protobuf.Duration duration = 2; - * @return \Google\Protobuf\Duration|null - */ - public function getDuration() - { - return $this->duration; - } - - public function hasDuration() - { - return isset($this->duration); - } - - public function clearDuration() - { - unset($this->duration); - } - - /** - * The amount of time that a time series must violate the - * threshold to be considered failing. Currently, only values - * that are a multiple of a minute--e.g., 0, 60, 120, or 300 - * seconds--are supported. If an invalid value is given, an - * error will be returned. When choosing a duration, it is useful to - * keep in mind the frequency of the underlying time series data - * (which may also be affected by any alignments specified in the - * `aggregations` field); a good duration is long enough so that a single - * outlier does not generate spurious alerts, but short enough that - * unhealthy states are detected and alerted on quickly. - * - * Generated from protobuf field .google.protobuf.Duration duration = 2; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->duration = $var; - - return $this; - } - - /** - * The number/percent of time series for which the comparison must hold - * in order for the condition to trigger. If unspecified, then the - * condition will trigger if the comparison is true for any of the - * time series that have been identified by `filter` and `aggregations`, - * or by the ratio, if `denominator_filter` and `denominator_aggregations` - * are specified. - * - * Generated from protobuf field .google.monitoring.v3.AlertPolicy.Condition.Trigger trigger = 3; - * @return \Google\Cloud\Monitoring\V3\AlertPolicy\Condition\Trigger|null - */ - public function getTrigger() - { - return $this->trigger; - } - - public function hasTrigger() - { - return isset($this->trigger); - } - - public function clearTrigger() - { - unset($this->trigger); - } - - /** - * The number/percent of time series for which the comparison must hold - * in order for the condition to trigger. If unspecified, then the - * condition will trigger if the comparison is true for any of the - * time series that have been identified by `filter` and `aggregations`, - * or by the ratio, if `denominator_filter` and `denominator_aggregations` - * are specified. - * - * Generated from protobuf field .google.monitoring.v3.AlertPolicy.Condition.Trigger trigger = 3; - * @param \Google\Cloud\Monitoring\V3\AlertPolicy\Condition\Trigger $var - * @return $this - */ - public function setTrigger($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\AlertPolicy\Condition\Trigger::class); - $this->trigger = $var; - - return $this; - } - - /** - * A condition control that determines how metric-threshold conditions - * are evaluated when data stops arriving. - * - * Generated from protobuf field .google.monitoring.v3.AlertPolicy.Condition.EvaluationMissingData evaluation_missing_data = 4; - * @return int - */ - public function getEvaluationMissingData() - { - return $this->evaluation_missing_data; - } - - /** - * A condition control that determines how metric-threshold conditions - * are evaluated when data stops arriving. - * - * Generated from protobuf field .google.monitoring.v3.AlertPolicy.Condition.EvaluationMissingData evaluation_missing_data = 4; - * @param int $var - * @return $this - */ - public function setEvaluationMissingData($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Monitoring\V3\AlertPolicy\Condition\EvaluationMissingData::class); - $this->evaluation_missing_data = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(MonitoringQueryLanguageCondition::class, \Google\Cloud\Monitoring\V3\AlertPolicy_Condition_MonitoringQueryLanguageCondition::class); - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/Condition/PrometheusQueryLanguageCondition.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/Condition/PrometheusQueryLanguageCondition.php deleted file mode 100644 index 6fe5be4207c8..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/Condition/PrometheusQueryLanguageCondition.php +++ /dev/null @@ -1,433 +0,0 @@ -google.monitoring.v3.AlertPolicy.Condition.PrometheusQueryLanguageCondition - */ -class PrometheusQueryLanguageCondition extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The PromQL expression to evaluate. Every evaluation cycle - * this expression is evaluated at the current time, and all resultant - * time series become pending/firing alerts. This field must not be empty. - * - * Generated from protobuf field string query = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $query = ''; - /** - * Optional. Alerts are considered firing once their PromQL expression was - * evaluated to be "true" for this long. - * Alerts whose PromQL expression was not evaluated to be "true" for - * long enough are considered pending. - * Must be a non-negative duration or missing. - * This field is optional. Its default value is zero. - * - * Generated from protobuf field .google.protobuf.Duration duration = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $duration = null; - /** - * Optional. How often this rule should be evaluated. - * Must be a positive multiple of 30 seconds or missing. - * This field is optional. Its default value is 30 seconds. - * If this PrometheusQueryLanguageCondition was generated from a - * Prometheus alerting rule, then this value should be taken from the - * enclosing rule group. - * - * Generated from protobuf field .google.protobuf.Duration evaluation_interval = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $evaluation_interval = null; - /** - * Optional. Labels to add to or overwrite in the PromQL query result. - * Label names [must be - * valid](https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels). - * Label values can be [templatized by using - * variables](https://cloud.google.com/monitoring/alerts/doc-variables#doc-vars). - * The only available variable names are the names of the labels in the - * PromQL result, including "__name__" and "value". "labels" may be empty. - * - * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - /** - * Optional. The rule group name of this alert in the corresponding - * Prometheus configuration file. - * Some external tools may require this field to be populated correctly - * in order to refer to the original Prometheus configuration file. - * The rule group name and the alert name are necessary to update the - * relevant AlertPolicies in case the definition of the rule group changes - * in the future. - * This field is optional. If this field is not empty, then it must - * contain a valid UTF-8 string. - * This field may not exceed 2048 Unicode characters in length. - * - * Generated from protobuf field string rule_group = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $rule_group = ''; - /** - * Optional. The alerting rule name of this alert in the corresponding - * Prometheus configuration file. - * Some external tools may require this field to be populated correctly - * in order to refer to the original Prometheus configuration file. - * The rule group name and the alert name are necessary to update the - * relevant AlertPolicies in case the definition of the rule group changes - * in the future. - * This field is optional. If this field is not empty, then it must be a - * [valid Prometheus label - * name](https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels). - * This field may not exceed 2048 Unicode characters in length. - * - * Generated from protobuf field string alert_rule = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $alert_rule = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $query - * Required. The PromQL expression to evaluate. Every evaluation cycle - * this expression is evaluated at the current time, and all resultant - * time series become pending/firing alerts. This field must not be empty. - * @type \Google\Protobuf\Duration $duration - * Optional. Alerts are considered firing once their PromQL expression was - * evaluated to be "true" for this long. - * Alerts whose PromQL expression was not evaluated to be "true" for - * long enough are considered pending. - * Must be a non-negative duration or missing. - * This field is optional. Its default value is zero. - * @type \Google\Protobuf\Duration $evaluation_interval - * Optional. How often this rule should be evaluated. - * Must be a positive multiple of 30 seconds or missing. - * This field is optional. Its default value is 30 seconds. - * If this PrometheusQueryLanguageCondition was generated from a - * Prometheus alerting rule, then this value should be taken from the - * enclosing rule group. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. Labels to add to or overwrite in the PromQL query result. - * Label names [must be - * valid](https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels). - * Label values can be [templatized by using - * variables](https://cloud.google.com/monitoring/alerts/doc-variables#doc-vars). - * The only available variable names are the names of the labels in the - * PromQL result, including "__name__" and "value". "labels" may be empty. - * @type string $rule_group - * Optional. The rule group name of this alert in the corresponding - * Prometheus configuration file. - * Some external tools may require this field to be populated correctly - * in order to refer to the original Prometheus configuration file. - * The rule group name and the alert name are necessary to update the - * relevant AlertPolicies in case the definition of the rule group changes - * in the future. - * This field is optional. If this field is not empty, then it must - * contain a valid UTF-8 string. - * This field may not exceed 2048 Unicode characters in length. - * @type string $alert_rule - * Optional. The alerting rule name of this alert in the corresponding - * Prometheus configuration file. - * Some external tools may require this field to be populated correctly - * in order to refer to the original Prometheus configuration file. - * The rule group name and the alert name are necessary to update the - * relevant AlertPolicies in case the definition of the rule group changes - * in the future. - * This field is optional. If this field is not empty, then it must be a - * [valid Prometheus label - * name](https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels). - * This field may not exceed 2048 Unicode characters in length. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\Alert::initOnce(); - parent::__construct($data); - } - - /** - * Required. The PromQL expression to evaluate. Every evaluation cycle - * this expression is evaluated at the current time, and all resultant - * time series become pending/firing alerts. This field must not be empty. - * - * Generated from protobuf field string query = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getQuery() - { - return $this->query; - } - - /** - * Required. The PromQL expression to evaluate. Every evaluation cycle - * this expression is evaluated at the current time, and all resultant - * time series become pending/firing alerts. This field must not be empty. - * - * Generated from protobuf field string query = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setQuery($var) - { - GPBUtil::checkString($var, True); - $this->query = $var; - - return $this; - } - - /** - * Optional. Alerts are considered firing once their PromQL expression was - * evaluated to be "true" for this long. - * Alerts whose PromQL expression was not evaluated to be "true" for - * long enough are considered pending. - * Must be a non-negative duration or missing. - * This field is optional. Its default value is zero. - * - * Generated from protobuf field .google.protobuf.Duration duration = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Duration|null - */ - public function getDuration() - { - return $this->duration; - } - - public function hasDuration() - { - return isset($this->duration); - } - - public function clearDuration() - { - unset($this->duration); - } - - /** - * Optional. Alerts are considered firing once their PromQL expression was - * evaluated to be "true" for this long. - * Alerts whose PromQL expression was not evaluated to be "true" for - * long enough are considered pending. - * Must be a non-negative duration or missing. - * This field is optional. Its default value is zero. - * - * Generated from protobuf field .google.protobuf.Duration duration = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->duration = $var; - - return $this; - } - - /** - * Optional. How often this rule should be evaluated. - * Must be a positive multiple of 30 seconds or missing. - * This field is optional. Its default value is 30 seconds. - * If this PrometheusQueryLanguageCondition was generated from a - * Prometheus alerting rule, then this value should be taken from the - * enclosing rule group. - * - * Generated from protobuf field .google.protobuf.Duration evaluation_interval = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Duration|null - */ - public function getEvaluationInterval() - { - return $this->evaluation_interval; - } - - public function hasEvaluationInterval() - { - return isset($this->evaluation_interval); - } - - public function clearEvaluationInterval() - { - unset($this->evaluation_interval); - } - - /** - * Optional. How often this rule should be evaluated. - * Must be a positive multiple of 30 seconds or missing. - * This field is optional. Its default value is 30 seconds. - * If this PrometheusQueryLanguageCondition was generated from a - * Prometheus alerting rule, then this value should be taken from the - * enclosing rule group. - * - * Generated from protobuf field .google.protobuf.Duration evaluation_interval = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setEvaluationInterval($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->evaluation_interval = $var; - - return $this; - } - - /** - * Optional. Labels to add to or overwrite in the PromQL query result. - * Label names [must be - * valid](https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels). - * Label values can be [templatized by using - * variables](https://cloud.google.com/monitoring/alerts/doc-variables#doc-vars). - * The only available variable names are the names of the labels in the - * PromQL result, including "__name__" and "value". "labels" may be empty. - * - * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. Labels to add to or overwrite in the PromQL query result. - * Label names [must be - * valid](https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels). - * Label values can be [templatized by using - * variables](https://cloud.google.com/monitoring/alerts/doc-variables#doc-vars). - * The only available variable names are the names of the labels in the - * PromQL result, including "__name__" and "value". "labels" may be empty. - * - * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Optional. The rule group name of this alert in the corresponding - * Prometheus configuration file. - * Some external tools may require this field to be populated correctly - * in order to refer to the original Prometheus configuration file. - * The rule group name and the alert name are necessary to update the - * relevant AlertPolicies in case the definition of the rule group changes - * in the future. - * This field is optional. If this field is not empty, then it must - * contain a valid UTF-8 string. - * This field may not exceed 2048 Unicode characters in length. - * - * Generated from protobuf field string rule_group = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRuleGroup() - { - return $this->rule_group; - } - - /** - * Optional. The rule group name of this alert in the corresponding - * Prometheus configuration file. - * Some external tools may require this field to be populated correctly - * in order to refer to the original Prometheus configuration file. - * The rule group name and the alert name are necessary to update the - * relevant AlertPolicies in case the definition of the rule group changes - * in the future. - * This field is optional. If this field is not empty, then it must - * contain a valid UTF-8 string. - * This field may not exceed 2048 Unicode characters in length. - * - * Generated from protobuf field string rule_group = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRuleGroup($var) - { - GPBUtil::checkString($var, True); - $this->rule_group = $var; - - return $this; - } - - /** - * Optional. The alerting rule name of this alert in the corresponding - * Prometheus configuration file. - * Some external tools may require this field to be populated correctly - * in order to refer to the original Prometheus configuration file. - * The rule group name and the alert name are necessary to update the - * relevant AlertPolicies in case the definition of the rule group changes - * in the future. - * This field is optional. If this field is not empty, then it must be a - * [valid Prometheus label - * name](https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels). - * This field may not exceed 2048 Unicode characters in length. - * - * Generated from protobuf field string alert_rule = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getAlertRule() - { - return $this->alert_rule; - } - - /** - * Optional. The alerting rule name of this alert in the corresponding - * Prometheus configuration file. - * Some external tools may require this field to be populated correctly - * in order to refer to the original Prometheus configuration file. - * The rule group name and the alert name are necessary to update the - * relevant AlertPolicies in case the definition of the rule group changes - * in the future. - * This field is optional. If this field is not empty, then it must be a - * [valid Prometheus label - * name](https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels). - * This field may not exceed 2048 Unicode characters in length. - * - * Generated from protobuf field string alert_rule = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setAlertRule($var) - { - GPBUtil::checkString($var, True); - $this->alert_rule = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(PrometheusQueryLanguageCondition::class, \Google\Cloud\Monitoring\V3\AlertPolicy_Condition_PrometheusQueryLanguageCondition::class); - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/Condition/Trigger.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/Condition/Trigger.php deleted file mode 100644 index 8daaca29380f..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/Condition/Trigger.php +++ /dev/null @@ -1,118 +0,0 @@ -google.monitoring.v3.AlertPolicy.Condition.Trigger - */ -class Trigger extends \Google\Protobuf\Internal\Message -{ - protected $type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $count - * The absolute number of time series that must fail - * the predicate for the condition to be triggered. - * @type float $percent - * The percentage of time series that must fail the - * predicate for the condition to be triggered. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\Alert::initOnce(); - parent::__construct($data); - } - - /** - * The absolute number of time series that must fail - * the predicate for the condition to be triggered. - * - * Generated from protobuf field int32 count = 1; - * @return int - */ - public function getCount() - { - return $this->readOneof(1); - } - - public function hasCount() - { - return $this->hasOneof(1); - } - - /** - * The absolute number of time series that must fail - * the predicate for the condition to be triggered. - * - * Generated from protobuf field int32 count = 1; - * @param int $var - * @return $this - */ - public function setCount($var) - { - GPBUtil::checkInt32($var); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * The percentage of time series that must fail the - * predicate for the condition to be triggered. - * - * Generated from protobuf field double percent = 2; - * @return float - */ - public function getPercent() - { - return $this->readOneof(2); - } - - public function hasPercent() - { - return $this->hasOneof(2); - } - - /** - * The percentage of time series that must fail the - * predicate for the condition to be triggered. - * - * Generated from protobuf field double percent = 2; - * @param float $var - * @return $this - */ - public function setPercent($var) - { - GPBUtil::checkDouble($var); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * @return string - */ - public function getType() - { - return $this->whichOneof("type"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Trigger::class, \Google\Cloud\Monitoring\V3\AlertPolicy_Condition_Trigger::class); - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/ConditionCombinerType.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/ConditionCombinerType.php deleted file mode 100644 index bb9e016f4bd9..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/ConditionCombinerType.php +++ /dev/null @@ -1,81 +0,0 @@ -google.monitoring.v3.AlertPolicy.ConditionCombinerType - */ -class ConditionCombinerType -{ - /** - * An unspecified combiner. - * - * Generated from protobuf enum COMBINE_UNSPECIFIED = 0; - */ - const COMBINE_UNSPECIFIED = 0; - /** - * Combine conditions using the logical `AND` operator. An - * incident is created only if all the conditions are met - * simultaneously. This combiner is satisfied if all conditions are - * met, even if they are met on completely different resources. - * - * Generated from protobuf enum AND = 1; - */ - const PBAND = 1; - /** - * Combine conditions using the logical `OR` operator. An incident - * is created if any of the listed conditions is met. - * - * Generated from protobuf enum OR = 2; - */ - const PBOR = 2; - /** - * Combine conditions using logical `AND` operator, but unlike the regular - * `AND` option, an incident is created only if all conditions are met - * simultaneously on at least one resource. - * - * Generated from protobuf enum AND_WITH_MATCHING_RESOURCE = 3; - */ - const AND_WITH_MATCHING_RESOURCE = 3; - - private static $valueToName = [ - self::COMBINE_UNSPECIFIED => 'COMBINE_UNSPECIFIED', - self::PBAND => 'AND', - self::PBOR => 'OR', - self::AND_WITH_MATCHING_RESOURCE => 'AND_WITH_MATCHING_RESOURCE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - $pbconst = __CLASS__. '::PB' . strtoupper($name); - if (!defined($pbconst)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($pbconst); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ConditionCombinerType::class, \Google\Cloud\Monitoring\V3\AlertPolicy_ConditionCombinerType::class); - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/Documentation.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/Documentation.php deleted file mode 100644 index 19c93b5e2dff..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/Documentation.php +++ /dev/null @@ -1,245 +0,0 @@ -google.monitoring.v3.AlertPolicy.Documentation - */ -class Documentation extends \Google\Protobuf\Internal\Message -{ - /** - * The body of the documentation, interpreted according to `mime_type`. - * The content may not exceed 8,192 Unicode characters and may not exceed - * more than 10,240 bytes when encoded in UTF-8 format, whichever is - * smaller. This text can be [templatized by using - * variables](https://cloud.google.com/monitoring/alerts/doc-variables#doc-vars). - * - * Generated from protobuf field string content = 1; - */ - protected $content = ''; - /** - * The format of the `content` field. Presently, only the value - * `"text/markdown"` is supported. See - * [Markdown](https://en.wikipedia.org/wiki/Markdown) for more information. - * - * Generated from protobuf field string mime_type = 2; - */ - protected $mime_type = ''; - /** - * Optional. The subject line of the notification. The subject line may not - * exceed 10,240 bytes. In notifications generated by this policy, the - * contents of the subject line after variable expansion will be truncated - * to 255 bytes or shorter at the latest UTF-8 character boundary. The - * 255-byte limit is recommended by [this - * thread](https://stackoverflow.com/questions/1592291/what-is-the-email-subject-length-limit). - * It is both the limit imposed by some third-party ticketing products and - * it is common to define textual fields in databases as VARCHAR(255). - * The contents of the subject line can be [templatized by using - * variables](https://cloud.google.com/monitoring/alerts/doc-variables#doc-vars). - * If this field is missing or empty, a default subject line will be - * generated. - * - * Generated from protobuf field string subject = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $subject = ''; - /** - * Optional. Links to content such as playbooks, repositories, and other - * resources. This field can contain up to 3 entries. - * - * Generated from protobuf field repeated .google.monitoring.v3.AlertPolicy.Documentation.Link links = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $links; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $content - * The body of the documentation, interpreted according to `mime_type`. - * The content may not exceed 8,192 Unicode characters and may not exceed - * more than 10,240 bytes when encoded in UTF-8 format, whichever is - * smaller. This text can be [templatized by using - * variables](https://cloud.google.com/monitoring/alerts/doc-variables#doc-vars). - * @type string $mime_type - * The format of the `content` field. Presently, only the value - * `"text/markdown"` is supported. See - * [Markdown](https://en.wikipedia.org/wiki/Markdown) for more information. - * @type string $subject - * Optional. The subject line of the notification. The subject line may not - * exceed 10,240 bytes. In notifications generated by this policy, the - * contents of the subject line after variable expansion will be truncated - * to 255 bytes or shorter at the latest UTF-8 character boundary. The - * 255-byte limit is recommended by [this - * thread](https://stackoverflow.com/questions/1592291/what-is-the-email-subject-length-limit). - * It is both the limit imposed by some third-party ticketing products and - * it is common to define textual fields in databases as VARCHAR(255). - * The contents of the subject line can be [templatized by using - * variables](https://cloud.google.com/monitoring/alerts/doc-variables#doc-vars). - * If this field is missing or empty, a default subject line will be - * generated. - * @type array<\Google\Cloud\Monitoring\V3\AlertPolicy\Documentation\Link>|\Google\Protobuf\Internal\RepeatedField $links - * Optional. Links to content such as playbooks, repositories, and other - * resources. This field can contain up to 3 entries. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\Alert::initOnce(); - parent::__construct($data); - } - - /** - * The body of the documentation, interpreted according to `mime_type`. - * The content may not exceed 8,192 Unicode characters and may not exceed - * more than 10,240 bytes when encoded in UTF-8 format, whichever is - * smaller. This text can be [templatized by using - * variables](https://cloud.google.com/monitoring/alerts/doc-variables#doc-vars). - * - * Generated from protobuf field string content = 1; - * @return string - */ - public function getContent() - { - return $this->content; - } - - /** - * The body of the documentation, interpreted according to `mime_type`. - * The content may not exceed 8,192 Unicode characters and may not exceed - * more than 10,240 bytes when encoded in UTF-8 format, whichever is - * smaller. This text can be [templatized by using - * variables](https://cloud.google.com/monitoring/alerts/doc-variables#doc-vars). - * - * Generated from protobuf field string content = 1; - * @param string $var - * @return $this - */ - public function setContent($var) - { - GPBUtil::checkString($var, True); - $this->content = $var; - - return $this; - } - - /** - * The format of the `content` field. Presently, only the value - * `"text/markdown"` is supported. See - * [Markdown](https://en.wikipedia.org/wiki/Markdown) for more information. - * - * Generated from protobuf field string mime_type = 2; - * @return string - */ - public function getMimeType() - { - return $this->mime_type; - } - - /** - * The format of the `content` field. Presently, only the value - * `"text/markdown"` is supported. See - * [Markdown](https://en.wikipedia.org/wiki/Markdown) for more information. - * - * Generated from protobuf field string mime_type = 2; - * @param string $var - * @return $this - */ - public function setMimeType($var) - { - GPBUtil::checkString($var, True); - $this->mime_type = $var; - - return $this; - } - - /** - * Optional. The subject line of the notification. The subject line may not - * exceed 10,240 bytes. In notifications generated by this policy, the - * contents of the subject line after variable expansion will be truncated - * to 255 bytes or shorter at the latest UTF-8 character boundary. The - * 255-byte limit is recommended by [this - * thread](https://stackoverflow.com/questions/1592291/what-is-the-email-subject-length-limit). - * It is both the limit imposed by some third-party ticketing products and - * it is common to define textual fields in databases as VARCHAR(255). - * The contents of the subject line can be [templatized by using - * variables](https://cloud.google.com/monitoring/alerts/doc-variables#doc-vars). - * If this field is missing or empty, a default subject line will be - * generated. - * - * Generated from protobuf field string subject = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getSubject() - { - return $this->subject; - } - - /** - * Optional. The subject line of the notification. The subject line may not - * exceed 10,240 bytes. In notifications generated by this policy, the - * contents of the subject line after variable expansion will be truncated - * to 255 bytes or shorter at the latest UTF-8 character boundary. The - * 255-byte limit is recommended by [this - * thread](https://stackoverflow.com/questions/1592291/what-is-the-email-subject-length-limit). - * It is both the limit imposed by some third-party ticketing products and - * it is common to define textual fields in databases as VARCHAR(255). - * The contents of the subject line can be [templatized by using - * variables](https://cloud.google.com/monitoring/alerts/doc-variables#doc-vars). - * If this field is missing or empty, a default subject line will be - * generated. - * - * Generated from protobuf field string subject = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setSubject($var) - { - GPBUtil::checkString($var, True); - $this->subject = $var; - - return $this; - } - - /** - * Optional. Links to content such as playbooks, repositories, and other - * resources. This field can contain up to 3 entries. - * - * Generated from protobuf field repeated .google.monitoring.v3.AlertPolicy.Documentation.Link links = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getLinks() - { - return $this->links; - } - - /** - * Optional. Links to content such as playbooks, repositories, and other - * resources. This field can contain up to 3 entries. - * - * Generated from protobuf field repeated .google.monitoring.v3.AlertPolicy.Documentation.Link links = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\Monitoring\V3\AlertPolicy\Documentation\Link>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setLinks($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Monitoring\V3\AlertPolicy\Documentation\Link::class); - $this->links = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Documentation::class, \Google\Cloud\Monitoring\V3\AlertPolicy_Documentation::class); - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/Documentation/Link.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/Documentation/Link.php deleted file mode 100644 index 278b55932be5..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/Documentation/Link.php +++ /dev/null @@ -1,124 +0,0 @@ -google.monitoring.v3.AlertPolicy.Documentation.Link - */ -class Link extends \Google\Protobuf\Internal\Message -{ - /** - * A short display name for the link. The display name must not be empty - * or exceed 63 characters. Example: "playbook". - * - * Generated from protobuf field string display_name = 1; - */ - protected $display_name = ''; - /** - * The url of a webpage. - * A url can be templatized by using variables - * in the path or the query parameters. The total length of a URL should - * not exceed 2083 characters before and after variable expansion. - * Example: "https://my_domain.com/playbook?name=${resource.name}" - * - * Generated from protobuf field string url = 2; - */ - protected $url = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $display_name - * A short display name for the link. The display name must not be empty - * or exceed 63 characters. Example: "playbook". - * @type string $url - * The url of a webpage. - * A url can be templatized by using variables - * in the path or the query parameters. The total length of a URL should - * not exceed 2083 characters before and after variable expansion. - * Example: "https://my_domain.com/playbook?name=${resource.name}" - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\Alert::initOnce(); - parent::__construct($data); - } - - /** - * A short display name for the link. The display name must not be empty - * or exceed 63 characters. Example: "playbook". - * - * Generated from protobuf field string display_name = 1; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * A short display name for the link. The display name must not be empty - * or exceed 63 characters. Example: "playbook". - * - * Generated from protobuf field string display_name = 1; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * The url of a webpage. - * A url can be templatized by using variables - * in the path or the query parameters. The total length of a URL should - * not exceed 2083 characters before and after variable expansion. - * Example: "https://my_domain.com/playbook?name=${resource.name}" - * - * Generated from protobuf field string url = 2; - * @return string - */ - public function getUrl() - { - return $this->url; - } - - /** - * The url of a webpage. - * A url can be templatized by using variables - * in the path or the query parameters. The total length of a URL should - * not exceed 2083 characters before and after variable expansion. - * Example: "https://my_domain.com/playbook?name=${resource.name}" - * - * Generated from protobuf field string url = 2; - * @param string $var - * @return $this - */ - public function setUrl($var) - { - GPBUtil::checkString($var, True); - $this->url = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Link::class, \Google\Cloud\Monitoring\V3\AlertPolicy_Documentation_Link::class); - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/Severity.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/Severity.php deleted file mode 100644 index 85808c4b4a58..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/AlertPolicy/Severity.php +++ /dev/null @@ -1,75 +0,0 @@ -google.monitoring.v3.AlertPolicy.Severity - */ -class Severity -{ - /** - * No severity is specified. This is the default value. - * - * Generated from protobuf enum SEVERITY_UNSPECIFIED = 0; - */ - const SEVERITY_UNSPECIFIED = 0; - /** - * This is the highest severity level. Use this if the problem could - * cause significant damage or downtime. - * - * Generated from protobuf enum CRITICAL = 1; - */ - const CRITICAL = 1; - /** - * This is the medium severity level. Use this if the problem could - * cause minor damage or downtime. - * - * Generated from protobuf enum ERROR = 2; - */ - const ERROR = 2; - /** - * This is the lowest severity level. Use this if the problem is not causing - * any damage or downtime, but could potentially lead to a problem in the - * future. - * - * Generated from protobuf enum WARNING = 3; - */ - const WARNING = 3; - - private static $valueToName = [ - self::SEVERITY_UNSPECIFIED => 'SEVERITY_UNSPECIFIED', - self::CRITICAL => 'CRITICAL', - self::ERROR => 'ERROR', - self::WARNING => 'WARNING', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Severity::class, \Google\Cloud\Monitoring\V3\AlertPolicy_Severity::class); - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/BasicSli.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/BasicSli.php deleted file mode 100644 index 5becfda99f47..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/BasicSli.php +++ /dev/null @@ -1,269 +0,0 @@ -google.monitoring.v3.BasicSli - */ -class BasicSli extends \Google\Protobuf\Internal\Message -{ - /** - * OPTIONAL: The set of RPCs to which this SLI is relevant. Telemetry from - * other methods will not be used to calculate performance for this SLI. If - * omitted, this SLI applies to all the Service's methods. For service types - * that don't support breaking down by method, setting this field will result - * in an error. - * - * Generated from protobuf field repeated string method = 7; - */ - private $method; - /** - * OPTIONAL: The set of locations to which this SLI is relevant. Telemetry - * from other locations will not be used to calculate performance for this - * SLI. If omitted, this SLI applies to all locations in which the Service has - * activity. For service types that don't support breaking down by location, - * setting this field will result in an error. - * - * Generated from protobuf field repeated string location = 8; - */ - private $location; - /** - * OPTIONAL: The set of API versions to which this SLI is relevant. Telemetry - * from other API versions will not be used to calculate performance for this - * SLI. If omitted, this SLI applies to all API versions. For service types - * that don't support breaking down by version, setting this field will result - * in an error. - * - * Generated from protobuf field repeated string version = 9; - */ - private $version; - protected $sli_criteria; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $method - * OPTIONAL: The set of RPCs to which this SLI is relevant. Telemetry from - * other methods will not be used to calculate performance for this SLI. If - * omitted, this SLI applies to all the Service's methods. For service types - * that don't support breaking down by method, setting this field will result - * in an error. - * @type array|\Google\Protobuf\Internal\RepeatedField $location - * OPTIONAL: The set of locations to which this SLI is relevant. Telemetry - * from other locations will not be used to calculate performance for this - * SLI. If omitted, this SLI applies to all locations in which the Service has - * activity. For service types that don't support breaking down by location, - * setting this field will result in an error. - * @type array|\Google\Protobuf\Internal\RepeatedField $version - * OPTIONAL: The set of API versions to which this SLI is relevant. Telemetry - * from other API versions will not be used to calculate performance for this - * SLI. If omitted, this SLI applies to all API versions. For service types - * that don't support breaking down by version, setting this field will result - * in an error. - * @type \Google\Cloud\Monitoring\V3\BasicSli\AvailabilityCriteria $availability - * Good service is defined to be the count of requests made to this service - * that return successfully. - * @type \Google\Cloud\Monitoring\V3\BasicSli\LatencyCriteria $latency - * Good service is defined to be the count of requests made to this service - * that are fast enough with respect to `latency.threshold`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\Service::initOnce(); - parent::__construct($data); - } - - /** - * OPTIONAL: The set of RPCs to which this SLI is relevant. Telemetry from - * other methods will not be used to calculate performance for this SLI. If - * omitted, this SLI applies to all the Service's methods. For service types - * that don't support breaking down by method, setting this field will result - * in an error. - * - * Generated from protobuf field repeated string method = 7; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMethod() - { - return $this->method; - } - - /** - * OPTIONAL: The set of RPCs to which this SLI is relevant. Telemetry from - * other methods will not be used to calculate performance for this SLI. If - * omitted, this SLI applies to all the Service's methods. For service types - * that don't support breaking down by method, setting this field will result - * in an error. - * - * Generated from protobuf field repeated string method = 7; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMethod($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->method = $arr; - - return $this; - } - - /** - * OPTIONAL: The set of locations to which this SLI is relevant. Telemetry - * from other locations will not be used to calculate performance for this - * SLI. If omitted, this SLI applies to all locations in which the Service has - * activity. For service types that don't support breaking down by location, - * setting this field will result in an error. - * - * Generated from protobuf field repeated string location = 8; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getLocation() - { - return $this->location; - } - - /** - * OPTIONAL: The set of locations to which this SLI is relevant. Telemetry - * from other locations will not be used to calculate performance for this - * SLI. If omitted, this SLI applies to all locations in which the Service has - * activity. For service types that don't support breaking down by location, - * setting this field will result in an error. - * - * Generated from protobuf field repeated string location = 8; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setLocation($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->location = $arr; - - return $this; - } - - /** - * OPTIONAL: The set of API versions to which this SLI is relevant. Telemetry - * from other API versions will not be used to calculate performance for this - * SLI. If omitted, this SLI applies to all API versions. For service types - * that don't support breaking down by version, setting this field will result - * in an error. - * - * Generated from protobuf field repeated string version = 9; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getVersion() - { - return $this->version; - } - - /** - * OPTIONAL: The set of API versions to which this SLI is relevant. Telemetry - * from other API versions will not be used to calculate performance for this - * SLI. If omitted, this SLI applies to all API versions. For service types - * that don't support breaking down by version, setting this field will result - * in an error. - * - * Generated from protobuf field repeated string version = 9; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setVersion($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->version = $arr; - - return $this; - } - - /** - * Good service is defined to be the count of requests made to this service - * that return successfully. - * - * Generated from protobuf field .google.monitoring.v3.BasicSli.AvailabilityCriteria availability = 2; - * @return \Google\Cloud\Monitoring\V3\BasicSli\AvailabilityCriteria|null - */ - public function getAvailability() - { - return $this->readOneof(2); - } - - public function hasAvailability() - { - return $this->hasOneof(2); - } - - /** - * Good service is defined to be the count of requests made to this service - * that return successfully. - * - * Generated from protobuf field .google.monitoring.v3.BasicSli.AvailabilityCriteria availability = 2; - * @param \Google\Cloud\Monitoring\V3\BasicSli\AvailabilityCriteria $var - * @return $this - */ - public function setAvailability($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\BasicSli\AvailabilityCriteria::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Good service is defined to be the count of requests made to this service - * that are fast enough with respect to `latency.threshold`. - * - * Generated from protobuf field .google.monitoring.v3.BasicSli.LatencyCriteria latency = 3; - * @return \Google\Cloud\Monitoring\V3\BasicSli\LatencyCriteria|null - */ - public function getLatency() - { - return $this->readOneof(3); - } - - public function hasLatency() - { - return $this->hasOneof(3); - } - - /** - * Good service is defined to be the count of requests made to this service - * that are fast enough with respect to `latency.threshold`. - * - * Generated from protobuf field .google.monitoring.v3.BasicSli.LatencyCriteria latency = 3; - * @param \Google\Cloud\Monitoring\V3\BasicSli\LatencyCriteria $var - * @return $this - */ - public function setLatency($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\BasicSli\LatencyCriteria::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * @return string - */ - public function getSliCriteria() - { - return $this->whichOneof("sli_criteria"); - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/BasicSli/AvailabilityCriteria.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/BasicSli/AvailabilityCriteria.php deleted file mode 100644 index 39790b19ee01..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/BasicSli/AvailabilityCriteria.php +++ /dev/null @@ -1,36 +0,0 @@ -google.monitoring.v3.BasicSli.AvailabilityCriteria - */ -class AvailabilityCriteria extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\Service::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(AvailabilityCriteria::class, \Google\Cloud\Monitoring\V3\BasicSli_AvailabilityCriteria::class); - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/BasicSli/LatencyCriteria.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/BasicSli/LatencyCriteria.php deleted file mode 100644 index 331b6b6e46f4..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/BasicSli/LatencyCriteria.php +++ /dev/null @@ -1,84 +0,0 @@ -google.monitoring.v3.BasicSli.LatencyCriteria - */ -class LatencyCriteria extends \Google\Protobuf\Internal\Message -{ - /** - * Good service is defined to be the count of requests made to this service - * that return in no more than `threshold`. - * - * Generated from protobuf field .google.protobuf.Duration threshold = 3; - */ - protected $threshold = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Duration $threshold - * Good service is defined to be the count of requests made to this service - * that return in no more than `threshold`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\Service::initOnce(); - parent::__construct($data); - } - - /** - * Good service is defined to be the count of requests made to this service - * that return in no more than `threshold`. - * - * Generated from protobuf field .google.protobuf.Duration threshold = 3; - * @return \Google\Protobuf\Duration|null - */ - public function getThreshold() - { - return $this->threshold; - } - - public function hasThreshold() - { - return isset($this->threshold); - } - - public function clearThreshold() - { - unset($this->threshold); - } - - /** - * Good service is defined to be the count of requests made to this service - * that return in no more than `threshold`. - * - * Generated from protobuf field .google.protobuf.Duration threshold = 3; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setThreshold($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->threshold = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(LatencyCriteria::class, \Google\Cloud\Monitoring\V3\BasicSli_LatencyCriteria::class); - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ComparisonType.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ComparisonType.php deleted file mode 100644 index d86a3fbc2cde..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ComparisonType.php +++ /dev/null @@ -1,90 +0,0 @@ -google.monitoring.v3.ComparisonType - */ -class ComparisonType -{ - /** - * No ordering relationship is specified. - * - * Generated from protobuf enum COMPARISON_UNSPECIFIED = 0; - */ - const COMPARISON_UNSPECIFIED = 0; - /** - * True if the left argument is greater than the right argument. - * - * Generated from protobuf enum COMPARISON_GT = 1; - */ - const COMPARISON_GT = 1; - /** - * True if the left argument is greater than or equal to the right argument. - * - * Generated from protobuf enum COMPARISON_GE = 2; - */ - const COMPARISON_GE = 2; - /** - * True if the left argument is less than the right argument. - * - * Generated from protobuf enum COMPARISON_LT = 3; - */ - const COMPARISON_LT = 3; - /** - * True if the left argument is less than or equal to the right argument. - * - * Generated from protobuf enum COMPARISON_LE = 4; - */ - const COMPARISON_LE = 4; - /** - * True if the left argument is equal to the right argument. - * - * Generated from protobuf enum COMPARISON_EQ = 5; - */ - const COMPARISON_EQ = 5; - /** - * True if the left argument is not equal to the right argument. - * - * Generated from protobuf enum COMPARISON_NE = 6; - */ - const COMPARISON_NE = 6; - - private static $valueToName = [ - self::COMPARISON_UNSPECIFIED => 'COMPARISON_UNSPECIFIED', - self::COMPARISON_GT => 'COMPARISON_GT', - self::COMPARISON_GE => 'COMPARISON_GE', - self::COMPARISON_LT => 'COMPARISON_LT', - self::COMPARISON_LE => 'COMPARISON_LE', - self::COMPARISON_EQ => 'COMPARISON_EQ', - self::COMPARISON_NE => 'COMPARISON_NE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/CreateAlertPolicyRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/CreateAlertPolicyRequest.php deleted file mode 100644 index 6c9c18ef40f4..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/CreateAlertPolicyRequest.php +++ /dev/null @@ -1,188 +0,0 @@ -google.monitoring.v3.CreateAlertPolicyRequest - */ -class CreateAlertPolicyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The - * [project](https://cloud.google.com/monitoring/api/v3#project_name) in which - * to create the alerting policy. The format is: - * projects/[PROJECT_ID_OR_NUMBER] - * Note that this field names the parent container in which the alerting - * policy will be written, not the name of the created policy. |name| must be - * a host project of a Metrics Scope, otherwise INVALID_ARGUMENT error will - * return. The alerting policy that is returned will have a name that contains - * a normalized representation of this name as a prefix but adds a suffix of - * the form `/alertPolicies/[ALERT_POLICY_ID]`, identifying the policy in the - * container. - * - * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. The requested alerting policy. You should omit the `name` field - * in this policy. The name will be returned in the new policy, including a - * new `[ALERT_POLICY_ID]` value. - * - * Generated from protobuf field .google.monitoring.v3.AlertPolicy alert_policy = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $alert_policy = null; - - /** - * @param string $name Required. The - * [project](https://cloud.google.com/monitoring/api/v3#project_name) in which - * to create the alerting policy. The format is: - * - * projects/[PROJECT_ID_OR_NUMBER] - * - * Note that this field names the parent container in which the alerting - * policy will be written, not the name of the created policy. |name| must be - * a host project of a Metrics Scope, otherwise INVALID_ARGUMENT error will - * return. The alerting policy that is returned will have a name that contains - * a normalized representation of this name as a prefix but adds a suffix of - * the form `/alertPolicies/[ALERT_POLICY_ID]`, identifying the policy in the - * container. - * @param \Google\Cloud\Monitoring\V3\AlertPolicy $alertPolicy Required. The requested alerting policy. You should omit the `name` field - * in this policy. The name will be returned in the new policy, including a - * new `[ALERT_POLICY_ID]` value. - * - * @return \Google\Cloud\Monitoring\V3\CreateAlertPolicyRequest - * - * @experimental - */ - public static function build(string $name, \Google\Cloud\Monitoring\V3\AlertPolicy $alertPolicy): self - { - return (new self()) - ->setName($name) - ->setAlertPolicy($alertPolicy); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The - * [project](https://cloud.google.com/monitoring/api/v3#project_name) in which - * to create the alerting policy. The format is: - * projects/[PROJECT_ID_OR_NUMBER] - * Note that this field names the parent container in which the alerting - * policy will be written, not the name of the created policy. |name| must be - * a host project of a Metrics Scope, otherwise INVALID_ARGUMENT error will - * return. The alerting policy that is returned will have a name that contains - * a normalized representation of this name as a prefix but adds a suffix of - * the form `/alertPolicies/[ALERT_POLICY_ID]`, identifying the policy in the - * container. - * @type \Google\Cloud\Monitoring\V3\AlertPolicy $alert_policy - * Required. The requested alerting policy. You should omit the `name` field - * in this policy. The name will be returned in the new policy, including a - * new `[ALERT_POLICY_ID]` value. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\AlertService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The - * [project](https://cloud.google.com/monitoring/api/v3#project_name) in which - * to create the alerting policy. The format is: - * projects/[PROJECT_ID_OR_NUMBER] - * Note that this field names the parent container in which the alerting - * policy will be written, not the name of the created policy. |name| must be - * a host project of a Metrics Scope, otherwise INVALID_ARGUMENT error will - * return. The alerting policy that is returned will have a name that contains - * a normalized representation of this name as a prefix but adds a suffix of - * the form `/alertPolicies/[ALERT_POLICY_ID]`, identifying the policy in the - * container. - * - * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The - * [project](https://cloud.google.com/monitoring/api/v3#project_name) in which - * to create the alerting policy. The format is: - * projects/[PROJECT_ID_OR_NUMBER] - * Note that this field names the parent container in which the alerting - * policy will be written, not the name of the created policy. |name| must be - * a host project of a Metrics Scope, otherwise INVALID_ARGUMENT error will - * return. The alerting policy that is returned will have a name that contains - * a normalized representation of this name as a prefix but adds a suffix of - * the form `/alertPolicies/[ALERT_POLICY_ID]`, identifying the policy in the - * container. - * - * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. The requested alerting policy. You should omit the `name` field - * in this policy. The name will be returned in the new policy, including a - * new `[ALERT_POLICY_ID]` value. - * - * Generated from protobuf field .google.monitoring.v3.AlertPolicy alert_policy = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Monitoring\V3\AlertPolicy|null - */ - public function getAlertPolicy() - { - return $this->alert_policy; - } - - public function hasAlertPolicy() - { - return isset($this->alert_policy); - } - - public function clearAlertPolicy() - { - unset($this->alert_policy); - } - - /** - * Required. The requested alerting policy. You should omit the `name` field - * in this policy. The name will be returned in the new policy, including a - * new `[ALERT_POLICY_ID]` value. - * - * Generated from protobuf field .google.monitoring.v3.AlertPolicy alert_policy = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Monitoring\V3\AlertPolicy $var - * @return $this - */ - public function setAlertPolicy($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\AlertPolicy::class); - $this->alert_policy = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/CreateGroupRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/CreateGroupRequest.php deleted file mode 100644 index bad7c64edac4..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/CreateGroupRequest.php +++ /dev/null @@ -1,181 +0,0 @@ -google.monitoring.v3.CreateGroupRequest - */ -class CreateGroupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The - * [project](https://cloud.google.com/monitoring/api/v3#project_name) in which - * to create the group. The format is: - * projects/[PROJECT_ID_OR_NUMBER] - * - * Generated from protobuf field string name = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. A group definition. It is an error to define the `name` field - * because the system assigns the name. - * - * Generated from protobuf field .google.monitoring.v3.Group group = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $group = null; - /** - * If true, validate this request but do not create the group. - * - * Generated from protobuf field bool validate_only = 3; - */ - protected $validate_only = false; - - /** - * @param string $name Required. The - * [project](https://cloud.google.com/monitoring/api/v3#project_name) in which - * to create the group. The format is: - * - * projects/[PROJECT_ID_OR_NUMBER] - * @param \Google\Cloud\Monitoring\V3\Group $group Required. A group definition. It is an error to define the `name` field - * because the system assigns the name. - * - * @return \Google\Cloud\Monitoring\V3\CreateGroupRequest - * - * @experimental - */ - public static function build(string $name, \Google\Cloud\Monitoring\V3\Group $group): self - { - return (new self()) - ->setName($name) - ->setGroup($group); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The - * [project](https://cloud.google.com/monitoring/api/v3#project_name) in which - * to create the group. The format is: - * projects/[PROJECT_ID_OR_NUMBER] - * @type \Google\Cloud\Monitoring\V3\Group $group - * Required. A group definition. It is an error to define the `name` field - * because the system assigns the name. - * @type bool $validate_only - * If true, validate this request but do not create the group. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\GroupService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The - * [project](https://cloud.google.com/monitoring/api/v3#project_name) in which - * to create the group. The format is: - * projects/[PROJECT_ID_OR_NUMBER] - * - * Generated from protobuf field string name = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The - * [project](https://cloud.google.com/monitoring/api/v3#project_name) in which - * to create the group. The format is: - * projects/[PROJECT_ID_OR_NUMBER] - * - * Generated from protobuf field string name = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. A group definition. It is an error to define the `name` field - * because the system assigns the name. - * - * Generated from protobuf field .google.monitoring.v3.Group group = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Monitoring\V3\Group|null - */ - public function getGroup() - { - return $this->group; - } - - public function hasGroup() - { - return isset($this->group); - } - - public function clearGroup() - { - unset($this->group); - } - - /** - * Required. A group definition. It is an error to define the `name` field - * because the system assigns the name. - * - * Generated from protobuf field .google.monitoring.v3.Group group = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Monitoring\V3\Group $var - * @return $this - */ - public function setGroup($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\Group::class); - $this->group = $var; - - return $this; - } - - /** - * If true, validate this request but do not create the group. - * - * Generated from protobuf field bool validate_only = 3; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * If true, validate this request but do not create the group. - * - * Generated from protobuf field bool validate_only = 3; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/CreateMetricDescriptorRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/CreateMetricDescriptorRequest.php deleted file mode 100644 index 45d737e63e85..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/CreateMetricDescriptorRequest.php +++ /dev/null @@ -1,151 +0,0 @@ -google.monitoring.v3.CreateMetricDescriptorRequest - */ -class CreateMetricDescriptorRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The - * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which - * to execute the request. The format is: - * 4 - * projects/[PROJECT_ID_OR_NUMBER] - * - * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. The new [custom - * metric](https://cloud.google.com/monitoring/custom-metrics) descriptor. - * - * Generated from protobuf field .google.api.MetricDescriptor metric_descriptor = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $metric_descriptor = null; - - /** - * @param string $name Required. The - * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which - * to execute the request. The format is: - * 4 - * projects/[PROJECT_ID_OR_NUMBER] - * @param \Google\Api\MetricDescriptor $metricDescriptor Required. The new [custom - * metric](https://cloud.google.com/monitoring/custom-metrics) descriptor. - * - * @return \Google\Cloud\Monitoring\V3\CreateMetricDescriptorRequest - * - * @experimental - */ - public static function build(string $name, \Google\Api\MetricDescriptor $metricDescriptor): self - { - return (new self()) - ->setName($name) - ->setMetricDescriptor($metricDescriptor); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The - * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which - * to execute the request. The format is: - * 4 - * projects/[PROJECT_ID_OR_NUMBER] - * @type \Google\Api\MetricDescriptor $metric_descriptor - * Required. The new [custom - * metric](https://cloud.google.com/monitoring/custom-metrics) descriptor. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\MetricService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The - * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which - * to execute the request. The format is: - * 4 - * projects/[PROJECT_ID_OR_NUMBER] - * - * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The - * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which - * to execute the request. The format is: - * 4 - * projects/[PROJECT_ID_OR_NUMBER] - * - * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. The new [custom - * metric](https://cloud.google.com/monitoring/custom-metrics) descriptor. - * - * Generated from protobuf field .google.api.MetricDescriptor metric_descriptor = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Api\MetricDescriptor|null - */ - public function getMetricDescriptor() - { - return $this->metric_descriptor; - } - - public function hasMetricDescriptor() - { - return isset($this->metric_descriptor); - } - - public function clearMetricDescriptor() - { - unset($this->metric_descriptor); - } - - /** - * Required. The new [custom - * metric](https://cloud.google.com/monitoring/custom-metrics) descriptor. - * - * Generated from protobuf field .google.api.MetricDescriptor metric_descriptor = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Api\MetricDescriptor $var - * @return $this - */ - public function setMetricDescriptor($var) - { - GPBUtil::checkMessage($var, \Google\Api\MetricDescriptor::class); - $this->metric_descriptor = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/CreateNotificationChannelRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/CreateNotificationChannelRequest.php deleted file mode 100644 index 2a528898bebc..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/CreateNotificationChannelRequest.php +++ /dev/null @@ -1,163 +0,0 @@ -google.monitoring.v3.CreateNotificationChannelRequest - */ -class CreateNotificationChannelRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The - * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which - * to execute the request. The format is: - * projects/[PROJECT_ID_OR_NUMBER] - * This names the container into which the channel will be - * written, this does not name the newly created channel. The resulting - * channel's name will have a normalized version of this field as a prefix, - * but will add `/notificationChannels/[CHANNEL_ID]` to identify the channel. - * - * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. The definition of the `NotificationChannel` to create. - * - * Generated from protobuf field .google.monitoring.v3.NotificationChannel notification_channel = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $notification_channel = null; - - /** - * @param string $name Required. The - * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which - * to execute the request. The format is: - * - * projects/[PROJECT_ID_OR_NUMBER] - * - * This names the container into which the channel will be - * written, this does not name the newly created channel. The resulting - * channel's name will have a normalized version of this field as a prefix, - * but will add `/notificationChannels/[CHANNEL_ID]` to identify the channel. - * @param \Google\Cloud\Monitoring\V3\NotificationChannel $notificationChannel Required. The definition of the `NotificationChannel` to create. - * - * @return \Google\Cloud\Monitoring\V3\CreateNotificationChannelRequest - * - * @experimental - */ - public static function build(string $name, \Google\Cloud\Monitoring\V3\NotificationChannel $notificationChannel): self - { - return (new self()) - ->setName($name) - ->setNotificationChannel($notificationChannel); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The - * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which - * to execute the request. The format is: - * projects/[PROJECT_ID_OR_NUMBER] - * This names the container into which the channel will be - * written, this does not name the newly created channel. The resulting - * channel's name will have a normalized version of this field as a prefix, - * but will add `/notificationChannels/[CHANNEL_ID]` to identify the channel. - * @type \Google\Cloud\Monitoring\V3\NotificationChannel $notification_channel - * Required. The definition of the `NotificationChannel` to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\NotificationService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The - * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which - * to execute the request. The format is: - * projects/[PROJECT_ID_OR_NUMBER] - * This names the container into which the channel will be - * written, this does not name the newly created channel. The resulting - * channel's name will have a normalized version of this field as a prefix, - * but will add `/notificationChannels/[CHANNEL_ID]` to identify the channel. - * - * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The - * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which - * to execute the request. The format is: - * projects/[PROJECT_ID_OR_NUMBER] - * This names the container into which the channel will be - * written, this does not name the newly created channel. The resulting - * channel's name will have a normalized version of this field as a prefix, - * but will add `/notificationChannels/[CHANNEL_ID]` to identify the channel. - * - * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. The definition of the `NotificationChannel` to create. - * - * Generated from protobuf field .google.monitoring.v3.NotificationChannel notification_channel = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Monitoring\V3\NotificationChannel|null - */ - public function getNotificationChannel() - { - return $this->notification_channel; - } - - public function hasNotificationChannel() - { - return isset($this->notification_channel); - } - - public function clearNotificationChannel() - { - unset($this->notification_channel); - } - - /** - * Required. The definition of the `NotificationChannel` to create. - * - * Generated from protobuf field .google.monitoring.v3.NotificationChannel notification_channel = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Monitoring\V3\NotificationChannel $var - * @return $this - */ - public function setNotificationChannel($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\NotificationChannel::class); - $this->notification_channel = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/CreateServiceLevelObjectiveRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/CreateServiceLevelObjectiveRequest.php deleted file mode 100644 index 151f66b7a84c..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/CreateServiceLevelObjectiveRequest.php +++ /dev/null @@ -1,185 +0,0 @@ -google.monitoring.v3.CreateServiceLevelObjectiveRequest - */ -class CreateServiceLevelObjectiveRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource name of the parent `Service`. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The ServiceLevelObjective id to use for this - * ServiceLevelObjective. If omitted, an id will be generated instead. Must - * match the pattern `^[a-zA-Z0-9-_:.]+$` - * - * Generated from protobuf field string service_level_objective_id = 3; - */ - protected $service_level_objective_id = ''; - /** - * Required. The `ServiceLevelObjective` to create. - * The provided `name` will be respected if no `ServiceLevelObjective` exists - * with this name. - * - * Generated from protobuf field .google.monitoring.v3.ServiceLevelObjective service_level_objective = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $service_level_objective = null; - - /** - * @param string $parent Required. Resource name of the parent `Service`. The format is: - * - * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] - * Please see {@see ServiceMonitoringServiceClient::serviceName()} for help formatting this field. - * @param \Google\Cloud\Monitoring\V3\ServiceLevelObjective $serviceLevelObjective Required. The `ServiceLevelObjective` to create. - * The provided `name` will be respected if no `ServiceLevelObjective` exists - * with this name. - * - * @return \Google\Cloud\Monitoring\V3\CreateServiceLevelObjectiveRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Monitoring\V3\ServiceLevelObjective $serviceLevelObjective): self - { - return (new self()) - ->setParent($parent) - ->setServiceLevelObjective($serviceLevelObjective); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Resource name of the parent `Service`. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] - * @type string $service_level_objective_id - * Optional. The ServiceLevelObjective id to use for this - * ServiceLevelObjective. If omitted, an id will be generated instead. Must - * match the pattern `^[a-zA-Z0-9-_:.]+$` - * @type \Google\Cloud\Monitoring\V3\ServiceLevelObjective $service_level_objective - * Required. The `ServiceLevelObjective` to create. - * The provided `name` will be respected if no `ServiceLevelObjective` exists - * with this name. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\ServiceService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource name of the parent `Service`. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Resource name of the parent `Service`. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. The ServiceLevelObjective id to use for this - * ServiceLevelObjective. If omitted, an id will be generated instead. Must - * match the pattern `^[a-zA-Z0-9-_:.]+$` - * - * Generated from protobuf field string service_level_objective_id = 3; - * @return string - */ - public function getServiceLevelObjectiveId() - { - return $this->service_level_objective_id; - } - - /** - * Optional. The ServiceLevelObjective id to use for this - * ServiceLevelObjective. If omitted, an id will be generated instead. Must - * match the pattern `^[a-zA-Z0-9-_:.]+$` - * - * Generated from protobuf field string service_level_objective_id = 3; - * @param string $var - * @return $this - */ - public function setServiceLevelObjectiveId($var) - { - GPBUtil::checkString($var, True); - $this->service_level_objective_id = $var; - - return $this; - } - - /** - * Required. The `ServiceLevelObjective` to create. - * The provided `name` will be respected if no `ServiceLevelObjective` exists - * with this name. - * - * Generated from protobuf field .google.monitoring.v3.ServiceLevelObjective service_level_objective = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Monitoring\V3\ServiceLevelObjective|null - */ - public function getServiceLevelObjective() - { - return $this->service_level_objective; - } - - public function hasServiceLevelObjective() - { - return isset($this->service_level_objective); - } - - public function clearServiceLevelObjective() - { - unset($this->service_level_objective); - } - - /** - * Required. The `ServiceLevelObjective` to create. - * The provided `name` will be respected if no `ServiceLevelObjective` exists - * with this name. - * - * Generated from protobuf field .google.monitoring.v3.ServiceLevelObjective service_level_objective = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Monitoring\V3\ServiceLevelObjective $var - * @return $this - */ - public function setServiceLevelObjective($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\ServiceLevelObjective::class); - $this->service_level_objective = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/CreateServiceRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/CreateServiceRequest.php deleted file mode 100644 index 7d9425e30c52..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/CreateServiceRequest.php +++ /dev/null @@ -1,180 +0,0 @@ -google.monitoring.v3.CreateServiceRequest - */ -class CreateServiceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource - * [name](https://cloud.google.com/monitoring/api/v3#project_name) of the - * parent Metrics Scope. The format is: - * projects/[PROJECT_ID_OR_NUMBER] - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The Service id to use for this Service. If omitted, an id will be - * generated instead. Must match the pattern `[a-z0-9\-]+` - * - * Generated from protobuf field string service_id = 3; - */ - protected $service_id = ''; - /** - * Required. The `Service` to create. - * - * Generated from protobuf field .google.monitoring.v3.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $service = null; - - /** - * @param string $parent Required. Resource - * [name](https://cloud.google.com/monitoring/api/v3#project_name) of the - * parent Metrics Scope. The format is: - * - * projects/[PROJECT_ID_OR_NUMBER] - * @param \Google\Cloud\Monitoring\V3\Service $service Required. The `Service` to create. - * - * @return \Google\Cloud\Monitoring\V3\CreateServiceRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Monitoring\V3\Service $service): self - { - return (new self()) - ->setParent($parent) - ->setService($service); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Resource - * [name](https://cloud.google.com/monitoring/api/v3#project_name) of the - * parent Metrics Scope. The format is: - * projects/[PROJECT_ID_OR_NUMBER] - * @type string $service_id - * Optional. The Service id to use for this Service. If omitted, an id will be - * generated instead. Must match the pattern `[a-z0-9\-]+` - * @type \Google\Cloud\Monitoring\V3\Service $service - * Required. The `Service` to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\ServiceService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource - * [name](https://cloud.google.com/monitoring/api/v3#project_name) of the - * parent Metrics Scope. The format is: - * projects/[PROJECT_ID_OR_NUMBER] - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Resource - * [name](https://cloud.google.com/monitoring/api/v3#project_name) of the - * parent Metrics Scope. The format is: - * projects/[PROJECT_ID_OR_NUMBER] - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. The Service id to use for this Service. If omitted, an id will be - * generated instead. Must match the pattern `[a-z0-9\-]+` - * - * Generated from protobuf field string service_id = 3; - * @return string - */ - public function getServiceId() - { - return $this->service_id; - } - - /** - * Optional. The Service id to use for this Service. If omitted, an id will be - * generated instead. Must match the pattern `[a-z0-9\-]+` - * - * Generated from protobuf field string service_id = 3; - * @param string $var - * @return $this - */ - public function setServiceId($var) - { - GPBUtil::checkString($var, True); - $this->service_id = $var; - - return $this; - } - - /** - * Required. The `Service` to create. - * - * Generated from protobuf field .google.monitoring.v3.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Monitoring\V3\Service|null - */ - public function getService() - { - return $this->service; - } - - public function hasService() - { - return isset($this->service); - } - - public function clearService() - { - unset($this->service); - } - - /** - * Required. The `Service` to create. - * - * Generated from protobuf field .google.monitoring.v3.Service service = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Monitoring\V3\Service $var - * @return $this - */ - public function setService($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\Service::class); - $this->service = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/CreateSnoozeRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/CreateSnoozeRequest.php deleted file mode 100644 index c03b63fbc9d1..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/CreateSnoozeRequest.php +++ /dev/null @@ -1,149 +0,0 @@ -google.monitoring.v3.CreateSnoozeRequest - */ -class CreateSnoozeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The - * [project](https://cloud.google.com/monitoring/api/v3#project_name) in which - * a `Snooze` should be created. The format is: - * projects/[PROJECT_ID_OR_NUMBER] - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The `Snooze` to create. Omit the `name` field, as it will be - * filled in by the API. - * - * Generated from protobuf field .google.monitoring.v3.Snooze snooze = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $snooze = null; - - /** - * @param string $parent Required. The - * [project](https://cloud.google.com/monitoring/api/v3#project_name) in which - * a `Snooze` should be created. The format is: - * - * projects/[PROJECT_ID_OR_NUMBER] - * Please see {@see SnoozeServiceClient::workspaceName()} for help formatting this field. - * @param \Google\Cloud\Monitoring\V3\Snooze $snooze Required. The `Snooze` to create. Omit the `name` field, as it will be - * filled in by the API. - * - * @return \Google\Cloud\Monitoring\V3\CreateSnoozeRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Monitoring\V3\Snooze $snooze): self - { - return (new self()) - ->setParent($parent) - ->setSnooze($snooze); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The - * [project](https://cloud.google.com/monitoring/api/v3#project_name) in which - * a `Snooze` should be created. The format is: - * projects/[PROJECT_ID_OR_NUMBER] - * @type \Google\Cloud\Monitoring\V3\Snooze $snooze - * Required. The `Snooze` to create. Omit the `name` field, as it will be - * filled in by the API. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\SnoozeService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The - * [project](https://cloud.google.com/monitoring/api/v3#project_name) in which - * a `Snooze` should be created. The format is: - * projects/[PROJECT_ID_OR_NUMBER] - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The - * [project](https://cloud.google.com/monitoring/api/v3#project_name) in which - * a `Snooze` should be created. The format is: - * projects/[PROJECT_ID_OR_NUMBER] - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The `Snooze` to create. Omit the `name` field, as it will be - * filled in by the API. - * - * Generated from protobuf field .google.monitoring.v3.Snooze snooze = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Monitoring\V3\Snooze|null - */ - public function getSnooze() - { - return $this->snooze; - } - - public function hasSnooze() - { - return isset($this->snooze); - } - - public function clearSnooze() - { - unset($this->snooze); - } - - /** - * Required. The `Snooze` to create. Omit the `name` field, as it will be - * filled in by the API. - * - * Generated from protobuf field .google.monitoring.v3.Snooze snooze = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Monitoring\V3\Snooze $var - * @return $this - */ - public function setSnooze($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\Snooze::class); - $this->snooze = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/CreateTimeSeriesError.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/CreateTimeSeriesError.php deleted file mode 100644 index 556d57d66086..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/CreateTimeSeriesError.php +++ /dev/null @@ -1,135 +0,0 @@ -google.monitoring.v3.CreateTimeSeriesError - */ -class CreateTimeSeriesError extends \Google\Protobuf\Internal\Message -{ - /** - * DEPRECATED. Time series ID that resulted in the `status` error. - * - * Generated from protobuf field .google.monitoring.v3.TimeSeries time_series = 1 [deprecated = true]; - * @deprecated - */ - protected $time_series = null; - /** - * DEPRECATED. The status of the requested write operation for `time_series`. - * - * Generated from protobuf field .google.rpc.Status status = 2 [deprecated = true]; - * @deprecated - */ - protected $status = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Monitoring\V3\TimeSeries $time_series - * DEPRECATED. Time series ID that resulted in the `status` error. - * @type \Google\Rpc\Status $status - * DEPRECATED. The status of the requested write operation for `time_series`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\MetricService::initOnce(); - parent::__construct($data); - } - - /** - * DEPRECATED. Time series ID that resulted in the `status` error. - * - * Generated from protobuf field .google.monitoring.v3.TimeSeries time_series = 1 [deprecated = true]; - * @return \Google\Cloud\Monitoring\V3\TimeSeries|null - * @deprecated - */ - public function getTimeSeries() - { - @trigger_error('time_series is deprecated.', E_USER_DEPRECATED); - return $this->time_series; - } - - public function hasTimeSeries() - { - @trigger_error('time_series is deprecated.', E_USER_DEPRECATED); - return isset($this->time_series); - } - - public function clearTimeSeries() - { - @trigger_error('time_series is deprecated.', E_USER_DEPRECATED); - unset($this->time_series); - } - - /** - * DEPRECATED. Time series ID that resulted in the `status` error. - * - * Generated from protobuf field .google.monitoring.v3.TimeSeries time_series = 1 [deprecated = true]; - * @param \Google\Cloud\Monitoring\V3\TimeSeries $var - * @return $this - * @deprecated - */ - public function setTimeSeries($var) - { - @trigger_error('time_series is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\TimeSeries::class); - $this->time_series = $var; - - return $this; - } - - /** - * DEPRECATED. The status of the requested write operation for `time_series`. - * - * Generated from protobuf field .google.rpc.Status status = 2 [deprecated = true]; - * @return \Google\Rpc\Status|null - * @deprecated - */ - public function getStatus() - { - @trigger_error('status is deprecated.', E_USER_DEPRECATED); - return $this->status; - } - - public function hasStatus() - { - @trigger_error('status is deprecated.', E_USER_DEPRECATED); - return isset($this->status); - } - - public function clearStatus() - { - @trigger_error('status is deprecated.', E_USER_DEPRECATED); - unset($this->status); - } - - /** - * DEPRECATED. The status of the requested write operation for `time_series`. - * - * Generated from protobuf field .google.rpc.Status status = 2 [deprecated = true]; - * @param \Google\Rpc\Status $var - * @return $this - * @deprecated - */ - public function setStatus($var) - { - @trigger_error('status is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkMessage($var, \Google\Rpc\Status::class); - $this->status = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/CreateTimeSeriesRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/CreateTimeSeriesRequest.php deleted file mode 100644 index 66cb39cd93ac..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/CreateTimeSeriesRequest.php +++ /dev/null @@ -1,159 +0,0 @@ -google.monitoring.v3.CreateTimeSeriesRequest - */ -class CreateTimeSeriesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The - * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which - * to execute the request. The format is: - * projects/[PROJECT_ID_OR_NUMBER] - * - * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. The new data to be added to a list of time series. - * Adds at most one data point to each of several time series. The new data - * point must be more recent than any other point in its time series. Each - * `TimeSeries` value must fully specify a unique time series by supplying - * all label values for the metric and the monitored resource. - * The maximum number of `TimeSeries` objects per `Create` request is 200. - * - * Generated from protobuf field repeated .google.monitoring.v3.TimeSeries time_series = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private $time_series; - - /** - * @param string $name Required. The - * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which - * to execute the request. The format is: - * - * projects/[PROJECT_ID_OR_NUMBER] - * Please see {@see MetricServiceClient::projectName()} for help formatting this field. - * @param \Google\Cloud\Monitoring\V3\TimeSeries[] $timeSeries Required. The new data to be added to a list of time series. - * Adds at most one data point to each of several time series. The new data - * point must be more recent than any other point in its time series. Each - * `TimeSeries` value must fully specify a unique time series by supplying - * all label values for the metric and the monitored resource. - * - * The maximum number of `TimeSeries` objects per `Create` request is 200. - * - * @return \Google\Cloud\Monitoring\V3\CreateTimeSeriesRequest - * - * @experimental - */ - public static function build(string $name, array $timeSeries): self - { - return (new self()) - ->setName($name) - ->setTimeSeries($timeSeries); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The - * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which - * to execute the request. The format is: - * projects/[PROJECT_ID_OR_NUMBER] - * @type array<\Google\Cloud\Monitoring\V3\TimeSeries>|\Google\Protobuf\Internal\RepeatedField $time_series - * Required. The new data to be added to a list of time series. - * Adds at most one data point to each of several time series. The new data - * point must be more recent than any other point in its time series. Each - * `TimeSeries` value must fully specify a unique time series by supplying - * all label values for the metric and the monitored resource. - * The maximum number of `TimeSeries` objects per `Create` request is 200. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\MetricService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The - * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which - * to execute the request. The format is: - * projects/[PROJECT_ID_OR_NUMBER] - * - * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The - * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which - * to execute the request. The format is: - * projects/[PROJECT_ID_OR_NUMBER] - * - * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. The new data to be added to a list of time series. - * Adds at most one data point to each of several time series. The new data - * point must be more recent than any other point in its time series. Each - * `TimeSeries` value must fully specify a unique time series by supplying - * all label values for the metric and the monitored resource. - * The maximum number of `TimeSeries` objects per `Create` request is 200. - * - * Generated from protobuf field repeated .google.monitoring.v3.TimeSeries time_series = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTimeSeries() - { - return $this->time_series; - } - - /** - * Required. The new data to be added to a list of time series. - * Adds at most one data point to each of several time series. The new data - * point must be more recent than any other point in its time series. Each - * `TimeSeries` value must fully specify a unique time series by supplying - * all label values for the metric and the monitored resource. - * The maximum number of `TimeSeries` objects per `Create` request is 200. - * - * Generated from protobuf field repeated .google.monitoring.v3.TimeSeries time_series = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param array<\Google\Cloud\Monitoring\V3\TimeSeries>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTimeSeries($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Monitoring\V3\TimeSeries::class); - $this->time_series = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/CreateTimeSeriesSummary.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/CreateTimeSeriesSummary.php deleted file mode 100644 index 8fb4fe1f025c..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/CreateTimeSeriesSummary.php +++ /dev/null @@ -1,135 +0,0 @@ -google.monitoring.v3.CreateTimeSeriesSummary - */ -class CreateTimeSeriesSummary extends \Google\Protobuf\Internal\Message -{ - /** - * The number of points in the request. - * - * Generated from protobuf field int32 total_point_count = 1; - */ - protected $total_point_count = 0; - /** - * The number of points that were successfully written. - * - * Generated from protobuf field int32 success_point_count = 2; - */ - protected $success_point_count = 0; - /** - * The number of points that failed to be written. Order is not guaranteed. - * - * Generated from protobuf field repeated .google.monitoring.v3.CreateTimeSeriesSummary.Error errors = 3; - */ - private $errors; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $total_point_count - * The number of points in the request. - * @type int $success_point_count - * The number of points that were successfully written. - * @type array<\Google\Cloud\Monitoring\V3\CreateTimeSeriesSummary\Error>|\Google\Protobuf\Internal\RepeatedField $errors - * The number of points that failed to be written. Order is not guaranteed. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\MetricService::initOnce(); - parent::__construct($data); - } - - /** - * The number of points in the request. - * - * Generated from protobuf field int32 total_point_count = 1; - * @return int - */ - public function getTotalPointCount() - { - return $this->total_point_count; - } - - /** - * The number of points in the request. - * - * Generated from protobuf field int32 total_point_count = 1; - * @param int $var - * @return $this - */ - public function setTotalPointCount($var) - { - GPBUtil::checkInt32($var); - $this->total_point_count = $var; - - return $this; - } - - /** - * The number of points that were successfully written. - * - * Generated from protobuf field int32 success_point_count = 2; - * @return int - */ - public function getSuccessPointCount() - { - return $this->success_point_count; - } - - /** - * The number of points that were successfully written. - * - * Generated from protobuf field int32 success_point_count = 2; - * @param int $var - * @return $this - */ - public function setSuccessPointCount($var) - { - GPBUtil::checkInt32($var); - $this->success_point_count = $var; - - return $this; - } - - /** - * The number of points that failed to be written. Order is not guaranteed. - * - * Generated from protobuf field repeated .google.monitoring.v3.CreateTimeSeriesSummary.Error errors = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getErrors() - { - return $this->errors; - } - - /** - * The number of points that failed to be written. Order is not guaranteed. - * - * Generated from protobuf field repeated .google.monitoring.v3.CreateTimeSeriesSummary.Error errors = 3; - * @param array<\Google\Cloud\Monitoring\V3\CreateTimeSeriesSummary\Error>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setErrors($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Monitoring\V3\CreateTimeSeriesSummary\Error::class); - $this->errors = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/CreateTimeSeriesSummary/Error.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/CreateTimeSeriesSummary/Error.php deleted file mode 100644 index 5bd917825b90..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/CreateTimeSeriesSummary/Error.php +++ /dev/null @@ -1,114 +0,0 @@ -google.monitoring.v3.CreateTimeSeriesSummary.Error - */ -class Error extends \Google\Protobuf\Internal\Message -{ - /** - * The status of the requested write operation. - * - * Generated from protobuf field .google.rpc.Status status = 1; - */ - protected $status = null; - /** - * The number of points that couldn't be written because of `status`. - * - * Generated from protobuf field int32 point_count = 2; - */ - protected $point_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Rpc\Status $status - * The status of the requested write operation. - * @type int $point_count - * The number of points that couldn't be written because of `status`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\MetricService::initOnce(); - parent::__construct($data); - } - - /** - * The status of the requested write operation. - * - * Generated from protobuf field .google.rpc.Status status = 1; - * @return \Google\Rpc\Status|null - */ - public function getStatus() - { - return $this->status; - } - - public function hasStatus() - { - return isset($this->status); - } - - public function clearStatus() - { - unset($this->status); - } - - /** - * The status of the requested write operation. - * - * Generated from protobuf field .google.rpc.Status status = 1; - * @param \Google\Rpc\Status $var - * @return $this - */ - public function setStatus($var) - { - GPBUtil::checkMessage($var, \Google\Rpc\Status::class); - $this->status = $var; - - return $this; - } - - /** - * The number of points that couldn't be written because of `status`. - * - * Generated from protobuf field int32 point_count = 2; - * @return int - */ - public function getPointCount() - { - return $this->point_count; - } - - /** - * The number of points that couldn't be written because of `status`. - * - * Generated from protobuf field int32 point_count = 2; - * @param int $var - * @return $this - */ - public function setPointCount($var) - { - GPBUtil::checkInt32($var); - $this->point_count = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Error::class, \Google\Cloud\Monitoring\V3\CreateTimeSeriesSummary_Error::class); - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/CreateUptimeCheckConfigRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/CreateUptimeCheckConfigRequest.php deleted file mode 100644 index 991e2028b3ae..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/CreateUptimeCheckConfigRequest.php +++ /dev/null @@ -1,142 +0,0 @@ -google.monitoring.v3.CreateUptimeCheckConfigRequest - */ -class CreateUptimeCheckConfigRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The - * [project](https://cloud.google.com/monitoring/api/v3#project_name) in which - * to create the Uptime check. The format is: - * projects/[PROJECT_ID_OR_NUMBER] - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The new Uptime check configuration. - * - * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig uptime_check_config = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $uptime_check_config = null; - - /** - * @param string $parent Required. The - * [project](https://cloud.google.com/monitoring/api/v3#project_name) in which - * to create the Uptime check. The format is: - * - * projects/[PROJECT_ID_OR_NUMBER] - * @param \Google\Cloud\Monitoring\V3\UptimeCheckConfig $uptimeCheckConfig Required. The new Uptime check configuration. - * - * @return \Google\Cloud\Monitoring\V3\CreateUptimeCheckConfigRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Monitoring\V3\UptimeCheckConfig $uptimeCheckConfig): self - { - return (new self()) - ->setParent($parent) - ->setUptimeCheckConfig($uptimeCheckConfig); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The - * [project](https://cloud.google.com/monitoring/api/v3#project_name) in which - * to create the Uptime check. The format is: - * projects/[PROJECT_ID_OR_NUMBER] - * @type \Google\Cloud\Monitoring\V3\UptimeCheckConfig $uptime_check_config - * Required. The new Uptime check configuration. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\UptimeService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The - * [project](https://cloud.google.com/monitoring/api/v3#project_name) in which - * to create the Uptime check. The format is: - * projects/[PROJECT_ID_OR_NUMBER] - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The - * [project](https://cloud.google.com/monitoring/api/v3#project_name) in which - * to create the Uptime check. The format is: - * projects/[PROJECT_ID_OR_NUMBER] - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The new Uptime check configuration. - * - * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig uptime_check_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Monitoring\V3\UptimeCheckConfig|null - */ - public function getUptimeCheckConfig() - { - return $this->uptime_check_config; - } - - public function hasUptimeCheckConfig() - { - return isset($this->uptime_check_config); - } - - public function clearUptimeCheckConfig() - { - unset($this->uptime_check_config); - } - - /** - * Required. The new Uptime check configuration. - * - * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig uptime_check_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Monitoring\V3\UptimeCheckConfig $var - * @return $this - */ - public function setUptimeCheckConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\UptimeCheckConfig::class); - $this->uptime_check_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/DeleteAlertPolicyRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/DeleteAlertPolicyRequest.php deleted file mode 100644 index 2333c3a46912..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/DeleteAlertPolicyRequest.php +++ /dev/null @@ -1,93 +0,0 @@ -google.monitoring.v3.DeleteAlertPolicyRequest - */ -class DeleteAlertPolicyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The alerting policy to delete. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID] - * For more information, see [AlertPolicy][google.monitoring.v3.AlertPolicy]. - * - * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The alerting policy to delete. The format is: - * - * projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID] - * - * For more information, see [AlertPolicy][google.monitoring.v3.AlertPolicy]. Please see - * {@see AlertPolicyServiceClient::alertPolicyName()} for help formatting this field. - * - * @return \Google\Cloud\Monitoring\V3\DeleteAlertPolicyRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The alerting policy to delete. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID] - * For more information, see [AlertPolicy][google.monitoring.v3.AlertPolicy]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\AlertService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The alerting policy to delete. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID] - * For more information, see [AlertPolicy][google.monitoring.v3.AlertPolicy]. - * - * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The alerting policy to delete. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID] - * For more information, see [AlertPolicy][google.monitoring.v3.AlertPolicy]. - * - * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/DeleteGroupRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/DeleteGroupRequest.php deleted file mode 100644 index b63a0bdb79fe..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/DeleteGroupRequest.php +++ /dev/null @@ -1,130 +0,0 @@ -google.monitoring.v3.DeleteGroupRequest - */ -class DeleteGroupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The group to delete. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] - * - * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * If this field is true, then the request means to delete a group with all - * its descendants. Otherwise, the request means to delete a group only when - * it has no descendants. The default value is false. - * - * Generated from protobuf field bool recursive = 4; - */ - protected $recursive = false; - - /** - * @param string $name Required. The group to delete. The format is: - * - * projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] - * Please see {@see GroupServiceClient::groupName()} for help formatting this field. - * - * @return \Google\Cloud\Monitoring\V3\DeleteGroupRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The group to delete. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] - * @type bool $recursive - * If this field is true, then the request means to delete a group with all - * its descendants. Otherwise, the request means to delete a group only when - * it has no descendants. The default value is false. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\GroupService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The group to delete. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] - * - * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The group to delete. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] - * - * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * If this field is true, then the request means to delete a group with all - * its descendants. Otherwise, the request means to delete a group only when - * it has no descendants. The default value is false. - * - * Generated from protobuf field bool recursive = 4; - * @return bool - */ - public function getRecursive() - { - return $this->recursive; - } - - /** - * If this field is true, then the request means to delete a group with all - * its descendants. Otherwise, the request means to delete a group only when - * it has no descendants. The default value is false. - * - * Generated from protobuf field bool recursive = 4; - * @param bool $var - * @return $this - */ - public function setRecursive($var) - { - GPBUtil::checkBool($var); - $this->recursive = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/DeleteMetricDescriptorRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/DeleteMetricDescriptorRequest.php deleted file mode 100644 index 3d57dd66af31..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/DeleteMetricDescriptorRequest.php +++ /dev/null @@ -1,103 +0,0 @@ -google.monitoring.v3.DeleteMetricDescriptorRequest - */ -class DeleteMetricDescriptorRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The metric descriptor on which to execute the request. The format - * is: - * projects/[PROJECT_ID_OR_NUMBER]/metricDescriptors/[METRIC_ID] - * An example of `[METRIC_ID]` is: - * `"custom.googleapis.com/my_test_metric"`. - * - * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The metric descriptor on which to execute the request. The format - * is: - * - * projects/[PROJECT_ID_OR_NUMBER]/metricDescriptors/[METRIC_ID] - * - * An example of `[METRIC_ID]` is: - * `"custom.googleapis.com/my_test_metric"`. Please see - * {@see MetricServiceClient::metricDescriptorName()} for help formatting this field. - * - * @return \Google\Cloud\Monitoring\V3\DeleteMetricDescriptorRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The metric descriptor on which to execute the request. The format - * is: - * projects/[PROJECT_ID_OR_NUMBER]/metricDescriptors/[METRIC_ID] - * An example of `[METRIC_ID]` is: - * `"custom.googleapis.com/my_test_metric"`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\MetricService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The metric descriptor on which to execute the request. The format - * is: - * projects/[PROJECT_ID_OR_NUMBER]/metricDescriptors/[METRIC_ID] - * An example of `[METRIC_ID]` is: - * `"custom.googleapis.com/my_test_metric"`. - * - * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The metric descriptor on which to execute the request. The format - * is: - * projects/[PROJECT_ID_OR_NUMBER]/metricDescriptors/[METRIC_ID] - * An example of `[METRIC_ID]` is: - * `"custom.googleapis.com/my_test_metric"`. - * - * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/DeleteNotificationChannelRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/DeleteNotificationChannelRequest.php deleted file mode 100644 index d547bd360b46..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/DeleteNotificationChannelRequest.php +++ /dev/null @@ -1,138 +0,0 @@ -google.monitoring.v3.DeleteNotificationChannelRequest - */ -class DeleteNotificationChannelRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The channel for which to execute the request. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID] - * - * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * If true, the notification channel will be deleted regardless of its - * use in alert policies (the policies will be updated to remove the - * channel). If false, this operation will fail if the notification channel - * is referenced by existing alerting policies. - * - * Generated from protobuf field bool force = 5; - */ - protected $force = false; - - /** - * @param string $name Required. The channel for which to execute the request. The format is: - * - * projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID] - * Please see {@see NotificationChannelServiceClient::notificationChannelName()} for help formatting this field. - * @param bool $force If true, the notification channel will be deleted regardless of its - * use in alert policies (the policies will be updated to remove the - * channel). If false, this operation will fail if the notification channel - * is referenced by existing alerting policies. - * - * @return \Google\Cloud\Monitoring\V3\DeleteNotificationChannelRequest - * - * @experimental - */ - public static function build(string $name, bool $force): self - { - return (new self()) - ->setName($name) - ->setForce($force); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The channel for which to execute the request. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID] - * @type bool $force - * If true, the notification channel will be deleted regardless of its - * use in alert policies (the policies will be updated to remove the - * channel). If false, this operation will fail if the notification channel - * is referenced by existing alerting policies. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\NotificationService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The channel for which to execute the request. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID] - * - * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The channel for which to execute the request. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID] - * - * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * If true, the notification channel will be deleted regardless of its - * use in alert policies (the policies will be updated to remove the - * channel). If false, this operation will fail if the notification channel - * is referenced by existing alerting policies. - * - * Generated from protobuf field bool force = 5; - * @return bool - */ - public function getForce() - { - return $this->force; - } - - /** - * If true, the notification channel will be deleted regardless of its - * use in alert policies (the policies will be updated to remove the - * channel). If false, this operation will fail if the notification channel - * is referenced by existing alerting policies. - * - * Generated from protobuf field bool force = 5; - * @param bool $var - * @return $this - */ - public function setForce($var) - { - GPBUtil::checkBool($var); - $this->force = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/DeleteServiceLevelObjectiveRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/DeleteServiceLevelObjectiveRequest.php deleted file mode 100644 index 8771b8fb4ab7..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/DeleteServiceLevelObjectiveRequest.php +++ /dev/null @@ -1,92 +0,0 @@ -google.monitoring.v3.DeleteServiceLevelObjectiveRequest - */ -class DeleteServiceLevelObjectiveRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource name of the `ServiceLevelObjective` to delete. The - * format is: - * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME] - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Resource name of the `ServiceLevelObjective` to delete. The - * format is: - * - * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME] - * Please see {@see ServiceMonitoringServiceClient::serviceLevelObjectiveName()} for help formatting this field. - * - * @return \Google\Cloud\Monitoring\V3\DeleteServiceLevelObjectiveRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Resource name of the `ServiceLevelObjective` to delete. The - * format is: - * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME] - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\ServiceService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource name of the `ServiceLevelObjective` to delete. The - * format is: - * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME] - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Resource name of the `ServiceLevelObjective` to delete. The - * format is: - * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME] - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/DeleteServiceRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/DeleteServiceRequest.php deleted file mode 100644 index 378fecd0724b..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/DeleteServiceRequest.php +++ /dev/null @@ -1,87 +0,0 @@ -google.monitoring.v3.DeleteServiceRequest - */ -class DeleteServiceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource name of the `Service` to delete. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Resource name of the `Service` to delete. The format is: - * - * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] - * Please see {@see ServiceMonitoringServiceClient::serviceName()} for help formatting this field. - * - * @return \Google\Cloud\Monitoring\V3\DeleteServiceRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Resource name of the `Service` to delete. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\ServiceService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource name of the `Service` to delete. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Resource name of the `Service` to delete. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/DeleteUptimeCheckConfigRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/DeleteUptimeCheckConfigRequest.php deleted file mode 100644 index dfda97aa0167..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/DeleteUptimeCheckConfigRequest.php +++ /dev/null @@ -1,87 +0,0 @@ -google.monitoring.v3.DeleteUptimeCheckConfigRequest - */ -class DeleteUptimeCheckConfigRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The Uptime check configuration to delete. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/uptimeCheckConfigs/[UPTIME_CHECK_ID] - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The Uptime check configuration to delete. The format is: - * - * projects/[PROJECT_ID_OR_NUMBER]/uptimeCheckConfigs/[UPTIME_CHECK_ID] - * Please see {@see UptimeCheckServiceClient::uptimeCheckConfigName()} for help formatting this field. - * - * @return \Google\Cloud\Monitoring\V3\DeleteUptimeCheckConfigRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The Uptime check configuration to delete. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/uptimeCheckConfigs/[UPTIME_CHECK_ID] - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\UptimeService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The Uptime check configuration to delete. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/uptimeCheckConfigs/[UPTIME_CHECK_ID] - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The Uptime check configuration to delete. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/uptimeCheckConfigs/[UPTIME_CHECK_ID] - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/DistributionCut.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/DistributionCut.php deleted file mode 100644 index cffd93e1651b..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/DistributionCut.php +++ /dev/null @@ -1,127 +0,0 @@ -google.monitoring.v3.DistributionCut - */ -class DistributionCut extends \Google\Protobuf\Internal\Message -{ - /** - * A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) - * specifying a `TimeSeries` aggregating values. Must have `ValueType = - * DISTRIBUTION` and `MetricKind = DELTA` or `MetricKind = CUMULATIVE`. - * - * Generated from protobuf field string distribution_filter = 4; - */ - protected $distribution_filter = ''; - /** - * Range of values considered "good." For a one-sided range, set one bound to - * an infinite value. - * - * Generated from protobuf field .google.monitoring.v3.Range range = 5; - */ - protected $range = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $distribution_filter - * A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) - * specifying a `TimeSeries` aggregating values. Must have `ValueType = - * DISTRIBUTION` and `MetricKind = DELTA` or `MetricKind = CUMULATIVE`. - * @type \Google\Cloud\Monitoring\V3\Range $range - * Range of values considered "good." For a one-sided range, set one bound to - * an infinite value. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\Service::initOnce(); - parent::__construct($data); - } - - /** - * A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) - * specifying a `TimeSeries` aggregating values. Must have `ValueType = - * DISTRIBUTION` and `MetricKind = DELTA` or `MetricKind = CUMULATIVE`. - * - * Generated from protobuf field string distribution_filter = 4; - * @return string - */ - public function getDistributionFilter() - { - return $this->distribution_filter; - } - - /** - * A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) - * specifying a `TimeSeries` aggregating values. Must have `ValueType = - * DISTRIBUTION` and `MetricKind = DELTA` or `MetricKind = CUMULATIVE`. - * - * Generated from protobuf field string distribution_filter = 4; - * @param string $var - * @return $this - */ - public function setDistributionFilter($var) - { - GPBUtil::checkString($var, True); - $this->distribution_filter = $var; - - return $this; - } - - /** - * Range of values considered "good." For a one-sided range, set one bound to - * an infinite value. - * - * Generated from protobuf field .google.monitoring.v3.Range range = 5; - * @return \Google\Cloud\Monitoring\V3\Range|null - */ - public function getRange() - { - return $this->range; - } - - public function hasRange() - { - return isset($this->range); - } - - public function clearRange() - { - unset($this->range); - } - - /** - * Range of values considered "good." For a one-sided range, set one bound to - * an infinite value. - * - * Generated from protobuf field .google.monitoring.v3.Range range = 5; - * @param \Google\Cloud\Monitoring\V3\Range $var - * @return $this - */ - public function setRange($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\Range::class); - $this->range = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/DroppedLabels.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/DroppedLabels.php deleted file mode 100644 index 4fb73d3bdd71..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/DroppedLabels.php +++ /dev/null @@ -1,80 +0,0 @@ -google.monitoring.v3.DroppedLabels - */ -class DroppedLabels extends \Google\Protobuf\Internal\Message -{ - /** - * Map from label to its value, for all labels dropped in any aggregation. - * - * Generated from protobuf field map label = 1; - */ - private $label; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\MapField $label - * Map from label to its value, for all labels dropped in any aggregation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\DroppedLabels::initOnce(); - parent::__construct($data); - } - - /** - * Map from label to its value, for all labels dropped in any aggregation. - * - * Generated from protobuf field map label = 1; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabel() - { - return $this->label; - } - - /** - * Map from label to its value, for all labels dropped in any aggregation. - * - * Generated from protobuf field map label = 1; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabel($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->label = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GetAlertPolicyRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GetAlertPolicyRequest.php deleted file mode 100644 index 573ae71a8ad5..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GetAlertPolicyRequest.php +++ /dev/null @@ -1,87 +0,0 @@ -google.monitoring.v3.GetAlertPolicyRequest - */ -class GetAlertPolicyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The alerting policy to retrieve. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID] - * - * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The alerting policy to retrieve. The format is: - * - * projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID] - * Please see {@see AlertPolicyServiceClient::alertPolicyName()} for help formatting this field. - * - * @return \Google\Cloud\Monitoring\V3\GetAlertPolicyRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The alerting policy to retrieve. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID] - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\AlertService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The alerting policy to retrieve. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID] - * - * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The alerting policy to retrieve. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID] - * - * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GetGroupRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GetGroupRequest.php deleted file mode 100644 index da9c56f0a13a..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GetGroupRequest.php +++ /dev/null @@ -1,87 +0,0 @@ -google.monitoring.v3.GetGroupRequest - */ -class GetGroupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The group to retrieve. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] - * - * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The group to retrieve. The format is: - * - * projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] - * Please see {@see GroupServiceClient::groupName()} for help formatting this field. - * - * @return \Google\Cloud\Monitoring\V3\GetGroupRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The group to retrieve. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\GroupService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The group to retrieve. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] - * - * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The group to retrieve. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] - * - * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GetMetricDescriptorRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GetMetricDescriptorRequest.php deleted file mode 100644 index 360bdfac4cc5..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GetMetricDescriptorRequest.php +++ /dev/null @@ -1,103 +0,0 @@ -google.monitoring.v3.GetMetricDescriptorRequest - */ -class GetMetricDescriptorRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The metric descriptor on which to execute the request. The format - * is: - * projects/[PROJECT_ID_OR_NUMBER]/metricDescriptors/[METRIC_ID] - * An example value of `[METRIC_ID]` is - * `"compute.googleapis.com/instance/disk/read_bytes_count"`. - * - * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The metric descriptor on which to execute the request. The format - * is: - * - * projects/[PROJECT_ID_OR_NUMBER]/metricDescriptors/[METRIC_ID] - * - * An example value of `[METRIC_ID]` is - * `"compute.googleapis.com/instance/disk/read_bytes_count"`. Please see - * {@see MetricServiceClient::metricDescriptorName()} for help formatting this field. - * - * @return \Google\Cloud\Monitoring\V3\GetMetricDescriptorRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The metric descriptor on which to execute the request. The format - * is: - * projects/[PROJECT_ID_OR_NUMBER]/metricDescriptors/[METRIC_ID] - * An example value of `[METRIC_ID]` is - * `"compute.googleapis.com/instance/disk/read_bytes_count"`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\MetricService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The metric descriptor on which to execute the request. The format - * is: - * projects/[PROJECT_ID_OR_NUMBER]/metricDescriptors/[METRIC_ID] - * An example value of `[METRIC_ID]` is - * `"compute.googleapis.com/instance/disk/read_bytes_count"`. - * - * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The metric descriptor on which to execute the request. The format - * is: - * projects/[PROJECT_ID_OR_NUMBER]/metricDescriptors/[METRIC_ID] - * An example value of `[METRIC_ID]` is - * `"compute.googleapis.com/instance/disk/read_bytes_count"`. - * - * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GetMonitoredResourceDescriptorRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GetMonitoredResourceDescriptorRequest.php deleted file mode 100644 index 82d4800c5e15..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GetMonitoredResourceDescriptorRequest.php +++ /dev/null @@ -1,98 +0,0 @@ -google.monitoring.v3.GetMonitoredResourceDescriptorRequest - */ -class GetMonitoredResourceDescriptorRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The monitored resource descriptor to get. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/monitoredResourceDescriptors/[RESOURCE_TYPE] - * The `[RESOURCE_TYPE]` is a predefined type, such as - * `cloudsql_database`. - * - * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The monitored resource descriptor to get. The format is: - * - * projects/[PROJECT_ID_OR_NUMBER]/monitoredResourceDescriptors/[RESOURCE_TYPE] - * - * The `[RESOURCE_TYPE]` is a predefined type, such as - * `cloudsql_database`. Please see - * {@see MetricServiceClient::monitoredResourceDescriptorName()} for help formatting this field. - * - * @return \Google\Cloud\Monitoring\V3\GetMonitoredResourceDescriptorRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The monitored resource descriptor to get. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/monitoredResourceDescriptors/[RESOURCE_TYPE] - * The `[RESOURCE_TYPE]` is a predefined type, such as - * `cloudsql_database`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\MetricService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The monitored resource descriptor to get. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/monitoredResourceDescriptors/[RESOURCE_TYPE] - * The `[RESOURCE_TYPE]` is a predefined type, such as - * `cloudsql_database`. - * - * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The monitored resource descriptor to get. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/monitoredResourceDescriptors/[RESOURCE_TYPE] - * The `[RESOURCE_TYPE]` is a predefined type, such as - * `cloudsql_database`. - * - * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GetNotificationChannelDescriptorRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GetNotificationChannelDescriptorRequest.php deleted file mode 100644 index f7ff869b7298..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GetNotificationChannelDescriptorRequest.php +++ /dev/null @@ -1,87 +0,0 @@ -google.monitoring.v3.GetNotificationChannelDescriptorRequest - */ -class GetNotificationChannelDescriptorRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The channel type for which to execute the request. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/notificationChannelDescriptors/[CHANNEL_TYPE] - * - * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The channel type for which to execute the request. The format is: - * - * projects/[PROJECT_ID_OR_NUMBER]/notificationChannelDescriptors/[CHANNEL_TYPE] - * Please see {@see NotificationChannelServiceClient::notificationChannelDescriptorName()} for help formatting this field. - * - * @return \Google\Cloud\Monitoring\V3\GetNotificationChannelDescriptorRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The channel type for which to execute the request. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/notificationChannelDescriptors/[CHANNEL_TYPE] - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\NotificationService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The channel type for which to execute the request. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/notificationChannelDescriptors/[CHANNEL_TYPE] - * - * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The channel type for which to execute the request. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/notificationChannelDescriptors/[CHANNEL_TYPE] - * - * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GetNotificationChannelRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GetNotificationChannelRequest.php deleted file mode 100644 index 708a1446cd9c..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GetNotificationChannelRequest.php +++ /dev/null @@ -1,87 +0,0 @@ -google.monitoring.v3.GetNotificationChannelRequest - */ -class GetNotificationChannelRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The channel for which to execute the request. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID] - * - * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The channel for which to execute the request. The format is: - * - * projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID] - * Please see {@see NotificationChannelServiceClient::notificationChannelName()} for help formatting this field. - * - * @return \Google\Cloud\Monitoring\V3\GetNotificationChannelRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The channel for which to execute the request. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID] - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\NotificationService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The channel for which to execute the request. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID] - * - * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The channel for which to execute the request. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID] - * - * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GetNotificationChannelVerificationCodeRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GetNotificationChannelVerificationCodeRequest.php deleted file mode 100644 index acb10877c211..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GetNotificationChannelVerificationCodeRequest.php +++ /dev/null @@ -1,167 +0,0 @@ -google.monitoring.v3.GetNotificationChannelVerificationCodeRequest - */ -class GetNotificationChannelVerificationCodeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The notification channel for which a verification code is to be - * generated and retrieved. This must name a channel that is already verified; - * if the specified channel is not verified, the request will fail. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * The desired expiration time. If specified, the API will guarantee that - * the returned code will not be valid after the specified timestamp; - * however, the API cannot guarantee that the returned code will be - * valid for at least as long as the requested time (the API puts an upper - * bound on the amount of time for which a code may be valid). If omitted, - * a default expiration will be used, which may be less than the max - * permissible expiration (so specifying an expiration may extend the - * code's lifetime over omitting an expiration, even though the API does - * impose an upper limit on the maximum expiration that is permitted). - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 2; - */ - protected $expire_time = null; - - /** - * @param string $name Required. The notification channel for which a verification code is to be - * generated and retrieved. This must name a channel that is already verified; - * if the specified channel is not verified, the request will fail. Please see - * {@see NotificationChannelServiceClient::notificationChannelName()} for help formatting this field. - * - * @return \Google\Cloud\Monitoring\V3\GetNotificationChannelVerificationCodeRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The notification channel for which a verification code is to be - * generated and retrieved. This must name a channel that is already verified; - * if the specified channel is not verified, the request will fail. - * @type \Google\Protobuf\Timestamp $expire_time - * The desired expiration time. If specified, the API will guarantee that - * the returned code will not be valid after the specified timestamp; - * however, the API cannot guarantee that the returned code will be - * valid for at least as long as the requested time (the API puts an upper - * bound on the amount of time for which a code may be valid). If omitted, - * a default expiration will be used, which may be less than the max - * permissible expiration (so specifying an expiration may extend the - * code's lifetime over omitting an expiration, even though the API does - * impose an upper limit on the maximum expiration that is permitted). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\NotificationService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The notification channel for which a verification code is to be - * generated and retrieved. This must name a channel that is already verified; - * if the specified channel is not verified, the request will fail. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The notification channel for which a verification code is to be - * generated and retrieved. This must name a channel that is already verified; - * if the specified channel is not verified, the request will fail. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The desired expiration time. If specified, the API will guarantee that - * the returned code will not be valid after the specified timestamp; - * however, the API cannot guarantee that the returned code will be - * valid for at least as long as the requested time (the API puts an upper - * bound on the amount of time for which a code may be valid). If omitted, - * a default expiration will be used, which may be less than the max - * permissible expiration (so specifying an expiration may extend the - * code's lifetime over omitting an expiration, even though the API does - * impose an upper limit on the maximum expiration that is permitted). - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getExpireTime() - { - return $this->expire_time; - } - - public function hasExpireTime() - { - return isset($this->expire_time); - } - - public function clearExpireTime() - { - unset($this->expire_time); - } - - /** - * The desired expiration time. If specified, the API will guarantee that - * the returned code will not be valid after the specified timestamp; - * however, the API cannot guarantee that the returned code will be - * valid for at least as long as the requested time (the API puts an upper - * bound on the amount of time for which a code may be valid). If omitted, - * a default expiration will be used, which may be less than the max - * permissible expiration (so specifying an expiration may extend the - * code's lifetime over omitting an expiration, even though the API does - * impose an upper limit on the maximum expiration that is permitted). - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setExpireTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->expire_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GetNotificationChannelVerificationCodeResponse.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GetNotificationChannelVerificationCodeResponse.php deleted file mode 100644 index b62d064177a3..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GetNotificationChannelVerificationCodeResponse.php +++ /dev/null @@ -1,131 +0,0 @@ -google.monitoring.v3.GetNotificationChannelVerificationCodeResponse - */ -class GetNotificationChannelVerificationCodeResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The verification code, which may be used to verify other channels - * that have an equivalent identity (i.e. other channels of the same - * type with the same fingerprint such as other email channels with - * the same email address or other sms channels with the same number). - * - * Generated from protobuf field string code = 1; - */ - protected $code = ''; - /** - * The expiration time associated with the code that was returned. If - * an expiration was provided in the request, this is the minimum of the - * requested expiration in the request and the max permitted expiration. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 2; - */ - protected $expire_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $code - * The verification code, which may be used to verify other channels - * that have an equivalent identity (i.e. other channels of the same - * type with the same fingerprint such as other email channels with - * the same email address or other sms channels with the same number). - * @type \Google\Protobuf\Timestamp $expire_time - * The expiration time associated with the code that was returned. If - * an expiration was provided in the request, this is the minimum of the - * requested expiration in the request and the max permitted expiration. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\NotificationService::initOnce(); - parent::__construct($data); - } - - /** - * The verification code, which may be used to verify other channels - * that have an equivalent identity (i.e. other channels of the same - * type with the same fingerprint such as other email channels with - * the same email address or other sms channels with the same number). - * - * Generated from protobuf field string code = 1; - * @return string - */ - public function getCode() - { - return $this->code; - } - - /** - * The verification code, which may be used to verify other channels - * that have an equivalent identity (i.e. other channels of the same - * type with the same fingerprint such as other email channels with - * the same email address or other sms channels with the same number). - * - * Generated from protobuf field string code = 1; - * @param string $var - * @return $this - */ - public function setCode($var) - { - GPBUtil::checkString($var, True); - $this->code = $var; - - return $this; - } - - /** - * The expiration time associated with the code that was returned. If - * an expiration was provided in the request, this is the minimum of the - * requested expiration in the request and the max permitted expiration. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getExpireTime() - { - return $this->expire_time; - } - - public function hasExpireTime() - { - return isset($this->expire_time); - } - - public function clearExpireTime() - { - unset($this->expire_time); - } - - /** - * The expiration time associated with the code that was returned. If - * an expiration was provided in the request, this is the minimum of the - * requested expiration in the request and the max permitted expiration. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setExpireTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->expire_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GetServiceLevelObjectiveRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GetServiceLevelObjectiveRequest.php deleted file mode 100644 index c22d24403f63..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GetServiceLevelObjectiveRequest.php +++ /dev/null @@ -1,138 +0,0 @@ -google.monitoring.v3.GetServiceLevelObjectiveRequest - */ -class GetServiceLevelObjectiveRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource name of the `ServiceLevelObjective` to get. The format - * is: - * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME] - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * View of the `ServiceLevelObjective` to return. If `DEFAULT`, return the - * `ServiceLevelObjective` as originally defined. If `EXPLICIT` and the - * `ServiceLevelObjective` is defined in terms of a `BasicSli`, replace the - * `BasicSli` with a `RequestBasedSli` spelling out how the SLI is computed. - * - * Generated from protobuf field .google.monitoring.v3.ServiceLevelObjective.View view = 2; - */ - protected $view = 0; - - /** - * @param string $name Required. Resource name of the `ServiceLevelObjective` to get. The format - * is: - * - * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME] - * Please see {@see ServiceMonitoringServiceClient::serviceLevelObjectiveName()} for help formatting this field. - * - * @return \Google\Cloud\Monitoring\V3\GetServiceLevelObjectiveRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Resource name of the `ServiceLevelObjective` to get. The format - * is: - * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME] - * @type int $view - * View of the `ServiceLevelObjective` to return. If `DEFAULT`, return the - * `ServiceLevelObjective` as originally defined. If `EXPLICIT` and the - * `ServiceLevelObjective` is defined in terms of a `BasicSli`, replace the - * `BasicSli` with a `RequestBasedSli` spelling out how the SLI is computed. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\ServiceService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource name of the `ServiceLevelObjective` to get. The format - * is: - * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME] - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Resource name of the `ServiceLevelObjective` to get. The format - * is: - * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME] - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * View of the `ServiceLevelObjective` to return. If `DEFAULT`, return the - * `ServiceLevelObjective` as originally defined. If `EXPLICIT` and the - * `ServiceLevelObjective` is defined in terms of a `BasicSli`, replace the - * `BasicSli` with a `RequestBasedSli` spelling out how the SLI is computed. - * - * Generated from protobuf field .google.monitoring.v3.ServiceLevelObjective.View view = 2; - * @return int - */ - public function getView() - { - return $this->view; - } - - /** - * View of the `ServiceLevelObjective` to return. If `DEFAULT`, return the - * `ServiceLevelObjective` as originally defined. If `EXPLICIT` and the - * `ServiceLevelObjective` is defined in terms of a `BasicSli`, replace the - * `BasicSli` with a `RequestBasedSli` spelling out how the SLI is computed. - * - * Generated from protobuf field .google.monitoring.v3.ServiceLevelObjective.View view = 2; - * @param int $var - * @return $this - */ - public function setView($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Monitoring\V3\ServiceLevelObjective\View::class); - $this->view = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GetServiceRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GetServiceRequest.php deleted file mode 100644 index 6113d513f423..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GetServiceRequest.php +++ /dev/null @@ -1,87 +0,0 @@ -google.monitoring.v3.GetServiceRequest - */ -class GetServiceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource name of the `Service`. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Resource name of the `Service`. The format is: - * - * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] - * Please see {@see ServiceMonitoringServiceClient::serviceName()} for help formatting this field. - * - * @return \Google\Cloud\Monitoring\V3\GetServiceRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Resource name of the `Service`. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\ServiceService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource name of the `Service`. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Resource name of the `Service`. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GetSnoozeRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GetSnoozeRequest.php deleted file mode 100644 index 83b9da5e20f6..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GetSnoozeRequest.php +++ /dev/null @@ -1,88 +0,0 @@ -google.monitoring.v3.GetSnoozeRequest - */ -class GetSnoozeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The ID of the `Snooze` to retrieve. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/snoozes/[SNOOZE_ID] - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The ID of the `Snooze` to retrieve. The format is: - * - * projects/[PROJECT_ID_OR_NUMBER]/snoozes/[SNOOZE_ID] - * Please see {@see SnoozeServiceClient::snoozeName()} for help formatting this field. - * - * @return \Google\Cloud\Monitoring\V3\GetSnoozeRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The ID of the `Snooze` to retrieve. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/snoozes/[SNOOZE_ID] - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\SnoozeService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The ID of the `Snooze` to retrieve. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/snoozes/[SNOOZE_ID] - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The ID of the `Snooze` to retrieve. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/snoozes/[SNOOZE_ID] - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GetUptimeCheckConfigRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GetUptimeCheckConfigRequest.php deleted file mode 100644 index 83b9a3f2eaa3..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GetUptimeCheckConfigRequest.php +++ /dev/null @@ -1,87 +0,0 @@ -google.monitoring.v3.GetUptimeCheckConfigRequest - */ -class GetUptimeCheckConfigRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The Uptime check configuration to retrieve. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/uptimeCheckConfigs/[UPTIME_CHECK_ID] - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The Uptime check configuration to retrieve. The format is: - * - * projects/[PROJECT_ID_OR_NUMBER]/uptimeCheckConfigs/[UPTIME_CHECK_ID] - * Please see {@see UptimeCheckServiceClient::uptimeCheckConfigName()} for help formatting this field. - * - * @return \Google\Cloud\Monitoring\V3\GetUptimeCheckConfigRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The Uptime check configuration to retrieve. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/uptimeCheckConfigs/[UPTIME_CHECK_ID] - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\UptimeService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The Uptime check configuration to retrieve. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/uptimeCheckConfigs/[UPTIME_CHECK_ID] - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The Uptime check configuration to retrieve. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/uptimeCheckConfigs/[UPTIME_CHECK_ID] - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Group.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Group.php deleted file mode 100644 index 4a768d02d746..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Group.php +++ /dev/null @@ -1,257 +0,0 @@ -google.monitoring.v3.Group - */ -class Group extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The name of this group. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] - * When creating a group, this field is ignored and a new name is created - * consisting of the project specified in the call to `CreateGroup` - * and a unique `[GROUP_ID]` that is generated automatically. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * A user-assigned name for this group, used only for display purposes. - * - * Generated from protobuf field string display_name = 2; - */ - protected $display_name = ''; - /** - * The name of the group's parent, if it has one. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] - * For groups with no parent, `parent_name` is the empty string, `""`. - * - * Generated from protobuf field string parent_name = 3; - */ - protected $parent_name = ''; - /** - * The filter used to determine which monitored resources belong to this - * group. - * - * Generated from protobuf field string filter = 5; - */ - protected $filter = ''; - /** - * If true, the members of this group are considered to be a cluster. - * The system can perform additional analysis on groups that are clusters. - * - * Generated from protobuf field bool is_cluster = 6; - */ - protected $is_cluster = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The name of this group. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] - * When creating a group, this field is ignored and a new name is created - * consisting of the project specified in the call to `CreateGroup` - * and a unique `[GROUP_ID]` that is generated automatically. - * @type string $display_name - * A user-assigned name for this group, used only for display purposes. - * @type string $parent_name - * The name of the group's parent, if it has one. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] - * For groups with no parent, `parent_name` is the empty string, `""`. - * @type string $filter - * The filter used to determine which monitored resources belong to this - * group. - * @type bool $is_cluster - * If true, the members of this group are considered to be a cluster. - * The system can perform additional analysis on groups that are clusters. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\Group::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The name of this group. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] - * When creating a group, this field is ignored and a new name is created - * consisting of the project specified in the call to `CreateGroup` - * and a unique `[GROUP_ID]` that is generated automatically. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The name of this group. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] - * When creating a group, this field is ignored and a new name is created - * consisting of the project specified in the call to `CreateGroup` - * and a unique `[GROUP_ID]` that is generated automatically. - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * A user-assigned name for this group, used only for display purposes. - * - * Generated from protobuf field string display_name = 2; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * A user-assigned name for this group, used only for display purposes. - * - * Generated from protobuf field string display_name = 2; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * The name of the group's parent, if it has one. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] - * For groups with no parent, `parent_name` is the empty string, `""`. - * - * Generated from protobuf field string parent_name = 3; - * @return string - */ - public function getParentName() - { - return $this->parent_name; - } - - /** - * The name of the group's parent, if it has one. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] - * For groups with no parent, `parent_name` is the empty string, `""`. - * - * Generated from protobuf field string parent_name = 3; - * @param string $var - * @return $this - */ - public function setParentName($var) - { - GPBUtil::checkString($var, True); - $this->parent_name = $var; - - return $this; - } - - /** - * The filter used to determine which monitored resources belong to this - * group. - * - * Generated from protobuf field string filter = 5; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * The filter used to determine which monitored resources belong to this - * group. - * - * Generated from protobuf field string filter = 5; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * If true, the members of this group are considered to be a cluster. - * The system can perform additional analysis on groups that are clusters. - * - * Generated from protobuf field bool is_cluster = 6; - * @return bool - */ - public function getIsCluster() - { - return $this->is_cluster; - } - - /** - * If true, the members of this group are considered to be a cluster. - * The system can perform additional analysis on groups that are clusters. - * - * Generated from protobuf field bool is_cluster = 6; - * @param bool $var - * @return $this - */ - public function setIsCluster($var) - { - GPBUtil::checkBool($var); - $this->is_cluster = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GroupResourceType.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GroupResourceType.php deleted file mode 100644 index ddf9d0eee1a8..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/GroupResourceType.php +++ /dev/null @@ -1,66 +0,0 @@ -google.monitoring.v3.GroupResourceType - */ -class GroupResourceType -{ - /** - * Default value (not valid). - * - * Generated from protobuf enum RESOURCE_TYPE_UNSPECIFIED = 0; - */ - const RESOURCE_TYPE_UNSPECIFIED = 0; - /** - * A group of instances from Google Cloud Platform (GCP) or - * Amazon Web Services (AWS). - * - * Generated from protobuf enum INSTANCE = 1; - */ - const INSTANCE = 1; - /** - * A group of Amazon ELB load balancers. - * - * Generated from protobuf enum AWS_ELB_LOAD_BALANCER = 2; - */ - const AWS_ELB_LOAD_BALANCER = 2; - - private static $valueToName = [ - self::RESOURCE_TYPE_UNSPECIFIED => 'RESOURCE_TYPE_UNSPECIFIED', - self::INSTANCE => 'INSTANCE', - self::AWS_ELB_LOAD_BALANCER => 'AWS_ELB_LOAD_BALANCER', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/InternalChecker.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/InternalChecker.php deleted file mode 100644 index 19273fdc3f2b..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/InternalChecker.php +++ /dev/null @@ -1,271 +0,0 @@ -google.monitoring.v3.InternalChecker - */ -class InternalChecker extends \Google\Protobuf\Internal\Message -{ - /** - * A unique resource name for this InternalChecker. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/internalCheckers/[INTERNAL_CHECKER_ID] - * `[PROJECT_ID_OR_NUMBER]` is the Cloud Monitoring Metrics Scope project for - * the Uptime check config associated with the internal checker. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The checker's human-readable name. The display name - * should be unique within a Cloud Monitoring Metrics Scope in order to make - * it easier to identify; however, uniqueness is not enforced. - * - * Generated from protobuf field string display_name = 2; - */ - protected $display_name = ''; - /** - * The [GCP VPC network](https://cloud.google.com/vpc/docs/vpc) where the - * internal resource lives (ex: "default"). - * - * Generated from protobuf field string network = 3; - */ - protected $network = ''; - /** - * The GCP zone the Uptime check should egress from. Only respected for - * internal Uptime checks, where internal_network is specified. - * - * Generated from protobuf field string gcp_zone = 4; - */ - protected $gcp_zone = ''; - /** - * The GCP project ID where the internal checker lives. Not necessary - * the same as the Metrics Scope project. - * - * Generated from protobuf field string peer_project_id = 6; - */ - protected $peer_project_id = ''; - /** - * The current operational state of the internal checker. - * - * Generated from protobuf field .google.monitoring.v3.InternalChecker.State state = 7; - */ - protected $state = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * A unique resource name for this InternalChecker. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/internalCheckers/[INTERNAL_CHECKER_ID] - * `[PROJECT_ID_OR_NUMBER]` is the Cloud Monitoring Metrics Scope project for - * the Uptime check config associated with the internal checker. - * @type string $display_name - * The checker's human-readable name. The display name - * should be unique within a Cloud Monitoring Metrics Scope in order to make - * it easier to identify; however, uniqueness is not enforced. - * @type string $network - * The [GCP VPC network](https://cloud.google.com/vpc/docs/vpc) where the - * internal resource lives (ex: "default"). - * @type string $gcp_zone - * The GCP zone the Uptime check should egress from. Only respected for - * internal Uptime checks, where internal_network is specified. - * @type string $peer_project_id - * The GCP project ID where the internal checker lives. Not necessary - * the same as the Metrics Scope project. - * @type int $state - * The current operational state of the internal checker. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\Uptime::initOnce(); - parent::__construct($data); - } - - /** - * A unique resource name for this InternalChecker. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/internalCheckers/[INTERNAL_CHECKER_ID] - * `[PROJECT_ID_OR_NUMBER]` is the Cloud Monitoring Metrics Scope project for - * the Uptime check config associated with the internal checker. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * A unique resource name for this InternalChecker. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/internalCheckers/[INTERNAL_CHECKER_ID] - * `[PROJECT_ID_OR_NUMBER]` is the Cloud Monitoring Metrics Scope project for - * the Uptime check config associated with the internal checker. - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The checker's human-readable name. The display name - * should be unique within a Cloud Monitoring Metrics Scope in order to make - * it easier to identify; however, uniqueness is not enforced. - * - * Generated from protobuf field string display_name = 2; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * The checker's human-readable name. The display name - * should be unique within a Cloud Monitoring Metrics Scope in order to make - * it easier to identify; however, uniqueness is not enforced. - * - * Generated from protobuf field string display_name = 2; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * The [GCP VPC network](https://cloud.google.com/vpc/docs/vpc) where the - * internal resource lives (ex: "default"). - * - * Generated from protobuf field string network = 3; - * @return string - */ - public function getNetwork() - { - return $this->network; - } - - /** - * The [GCP VPC network](https://cloud.google.com/vpc/docs/vpc) where the - * internal resource lives (ex: "default"). - * - * Generated from protobuf field string network = 3; - * @param string $var - * @return $this - */ - public function setNetwork($var) - { - GPBUtil::checkString($var, True); - $this->network = $var; - - return $this; - } - - /** - * The GCP zone the Uptime check should egress from. Only respected for - * internal Uptime checks, where internal_network is specified. - * - * Generated from protobuf field string gcp_zone = 4; - * @return string - */ - public function getGcpZone() - { - return $this->gcp_zone; - } - - /** - * The GCP zone the Uptime check should egress from. Only respected for - * internal Uptime checks, where internal_network is specified. - * - * Generated from protobuf field string gcp_zone = 4; - * @param string $var - * @return $this - */ - public function setGcpZone($var) - { - GPBUtil::checkString($var, True); - $this->gcp_zone = $var; - - return $this; - } - - /** - * The GCP project ID where the internal checker lives. Not necessary - * the same as the Metrics Scope project. - * - * Generated from protobuf field string peer_project_id = 6; - * @return string - */ - public function getPeerProjectId() - { - return $this->peer_project_id; - } - - /** - * The GCP project ID where the internal checker lives. Not necessary - * the same as the Metrics Scope project. - * - * Generated from protobuf field string peer_project_id = 6; - * @param string $var - * @return $this - */ - public function setPeerProjectId($var) - { - GPBUtil::checkString($var, True); - $this->peer_project_id = $var; - - return $this; - } - - /** - * The current operational state of the internal checker. - * - * Generated from protobuf field .google.monitoring.v3.InternalChecker.State state = 7; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * The current operational state of the internal checker. - * - * Generated from protobuf field .google.monitoring.v3.InternalChecker.State state = 7; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Monitoring\V3\InternalChecker\State::class); - $this->state = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/InternalChecker/State.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/InternalChecker/State.php deleted file mode 100644 index d006a60c773f..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/InternalChecker/State.php +++ /dev/null @@ -1,74 +0,0 @@ -google.monitoring.v3.InternalChecker.State - */ -class State -{ - /** - * An internal checker should never be in the unspecified state. - * - * Generated from protobuf enum UNSPECIFIED = 0; - */ - const UNSPECIFIED = 0; - /** - * The checker is being created, provisioned, and configured. A checker in - * this state can be returned by `ListInternalCheckers` or - * `GetInternalChecker`, as well as by examining the [long running - * Operation](https://cloud.google.com/apis/design/design_patterns#long_running_operations) - * that created it. - * - * Generated from protobuf enum CREATING = 1; - */ - const CREATING = 1; - /** - * The checker is running and available for use. A checker in this state - * can be returned by `ListInternalCheckers` or `GetInternalChecker` as - * well as by examining the [long running - * Operation](https://cloud.google.com/apis/design/design_patterns#long_running_operations) - * that created it. - * If a checker is being torn down, it is neither visible nor usable, so - * there is no "deleting" or "down" state. - * - * Generated from protobuf enum RUNNING = 2; - */ - const RUNNING = 2; - - private static $valueToName = [ - self::UNSPECIFIED => 'UNSPECIFIED', - self::CREATING => 'CREATING', - self::RUNNING => 'RUNNING', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\Monitoring\V3\InternalChecker_State::class); - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/LabelValue.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/LabelValue.php deleted file mode 100644 index 3a66a26a4359..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/LabelValue.php +++ /dev/null @@ -1,141 +0,0 @@ -google.monitoring.v3.LabelValue - */ -class LabelValue extends \Google\Protobuf\Internal\Message -{ - protected $value; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $bool_value - * A bool label value. - * @type int|string $int64_value - * An int64 label value. - * @type string $string_value - * A string label value. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\Metric::initOnce(); - parent::__construct($data); - } - - /** - * A bool label value. - * - * Generated from protobuf field bool bool_value = 1; - * @return bool - */ - public function getBoolValue() - { - return $this->readOneof(1); - } - - public function hasBoolValue() - { - return $this->hasOneof(1); - } - - /** - * A bool label value. - * - * Generated from protobuf field bool bool_value = 1; - * @param bool $var - * @return $this - */ - public function setBoolValue($var) - { - GPBUtil::checkBool($var); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * An int64 label value. - * - * Generated from protobuf field int64 int64_value = 2; - * @return int|string - */ - public function getInt64Value() - { - return $this->readOneof(2); - } - - public function hasInt64Value() - { - return $this->hasOneof(2); - } - - /** - * An int64 label value. - * - * Generated from protobuf field int64 int64_value = 2; - * @param int|string $var - * @return $this - */ - public function setInt64Value($var) - { - GPBUtil::checkInt64($var); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * A string label value. - * - * Generated from protobuf field string string_value = 3; - * @return string - */ - public function getStringValue() - { - return $this->readOneof(3); - } - - public function hasStringValue() - { - return $this->hasOneof(3); - } - - /** - * A string label value. - * - * Generated from protobuf field string string_value = 3; - * @param string $var - * @return $this - */ - public function setStringValue($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * @return string - */ - public function getValue() - { - return $this->whichOneof("value"); - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListAlertPoliciesRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListAlertPoliciesRequest.php deleted file mode 100644 index cf35d504f674..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListAlertPoliciesRequest.php +++ /dev/null @@ -1,298 +0,0 @@ -google.monitoring.v3.ListAlertPoliciesRequest - */ -class ListAlertPoliciesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The - * [project](https://cloud.google.com/monitoring/api/v3#project_name) whose - * alert policies are to be listed. The format is: - * projects/[PROJECT_ID_OR_NUMBER] - * Note that this field names the parent container in which the alerting - * policies to be listed are stored. To retrieve a single alerting policy - * by name, use the - * [GetAlertPolicy][google.monitoring.v3.AlertPolicyService.GetAlertPolicy] - * operation, instead. - * - * Generated from protobuf field string name = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. If provided, this field specifies the criteria that must be met - * by alert policies to be included in the response. - * For more details, see [sorting and - * filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering). - * - * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. A comma-separated list of fields by which to sort the result. - * Supports the same set of field references as the `filter` field. Entries - * can be prefixed with a minus sign to sort by the field in descending order. - * For more details, see [sorting and - * filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering). - * - * Generated from protobuf field string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - /** - * Optional. The maximum number of results to return in a single response. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. If this field is not empty then it must contain the - * `nextPageToken` value returned by a previous call to this method. Using - * this field causes the method to return more results from the previous - * method call. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * @param string $name Required. The - * [project](https://cloud.google.com/monitoring/api/v3#project_name) whose - * alert policies are to be listed. The format is: - * - * projects/[PROJECT_ID_OR_NUMBER] - * - * Note that this field names the parent container in which the alerting - * policies to be listed are stored. To retrieve a single alerting policy - * by name, use the - * [GetAlertPolicy][google.monitoring.v3.AlertPolicyService.GetAlertPolicy] - * operation, instead. - * - * @return \Google\Cloud\Monitoring\V3\ListAlertPoliciesRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The - * [project](https://cloud.google.com/monitoring/api/v3#project_name) whose - * alert policies are to be listed. The format is: - * projects/[PROJECT_ID_OR_NUMBER] - * Note that this field names the parent container in which the alerting - * policies to be listed are stored. To retrieve a single alerting policy - * by name, use the - * [GetAlertPolicy][google.monitoring.v3.AlertPolicyService.GetAlertPolicy] - * operation, instead. - * @type string $filter - * Optional. If provided, this field specifies the criteria that must be met - * by alert policies to be included in the response. - * For more details, see [sorting and - * filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering). - * @type string $order_by - * Optional. A comma-separated list of fields by which to sort the result. - * Supports the same set of field references as the `filter` field. Entries - * can be prefixed with a minus sign to sort by the field in descending order. - * For more details, see [sorting and - * filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering). - * @type int $page_size - * Optional. The maximum number of results to return in a single response. - * @type string $page_token - * Optional. If this field is not empty then it must contain the - * `nextPageToken` value returned by a previous call to this method. Using - * this field causes the method to return more results from the previous - * method call. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\AlertService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The - * [project](https://cloud.google.com/monitoring/api/v3#project_name) whose - * alert policies are to be listed. The format is: - * projects/[PROJECT_ID_OR_NUMBER] - * Note that this field names the parent container in which the alerting - * policies to be listed are stored. To retrieve a single alerting policy - * by name, use the - * [GetAlertPolicy][google.monitoring.v3.AlertPolicyService.GetAlertPolicy] - * operation, instead. - * - * Generated from protobuf field string name = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The - * [project](https://cloud.google.com/monitoring/api/v3#project_name) whose - * alert policies are to be listed. The format is: - * projects/[PROJECT_ID_OR_NUMBER] - * Note that this field names the parent container in which the alerting - * policies to be listed are stored. To retrieve a single alerting policy - * by name, use the - * [GetAlertPolicy][google.monitoring.v3.AlertPolicyService.GetAlertPolicy] - * operation, instead. - * - * Generated from protobuf field string name = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. If provided, this field specifies the criteria that must be met - * by alert policies to be included in the response. - * For more details, see [sorting and - * filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering). - * - * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. If provided, this field specifies the criteria that must be met - * by alert policies to be included in the response. - * For more details, see [sorting and - * filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering). - * - * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Optional. A comma-separated list of fields by which to sort the result. - * Supports the same set of field references as the `filter` field. Entries - * can be prefixed with a minus sign to sort by the field in descending order. - * For more details, see [sorting and - * filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering). - * - * Generated from protobuf field string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Optional. A comma-separated list of fields by which to sort the result. - * Supports the same set of field references as the `filter` field. Entries - * can be prefixed with a minus sign to sort by the field in descending order. - * For more details, see [sorting and - * filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering). - * - * Generated from protobuf field string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - - /** - * Optional. The maximum number of results to return in a single response. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of results to return in a single response. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. If this field is not empty then it must contain the - * `nextPageToken` value returned by a previous call to this method. Using - * this field causes the method to return more results from the previous - * method call. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. If this field is not empty then it must contain the - * `nextPageToken` value returned by a previous call to this method. Using - * this field causes the method to return more results from the previous - * method call. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListAlertPoliciesResponse.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListAlertPoliciesResponse.php deleted file mode 100644 index 45d31688ec1b..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListAlertPoliciesResponse.php +++ /dev/null @@ -1,147 +0,0 @@ -google.monitoring.v3.ListAlertPoliciesResponse - */ -class ListAlertPoliciesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The returned alert policies. - * - * Generated from protobuf field repeated .google.monitoring.v3.AlertPolicy alert_policies = 3; - */ - private $alert_policies; - /** - * If there might be more results than were returned, then this field is set - * to a non-empty value. To see the additional results, - * use that value as `page_token` in the next call to this method. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * The total number of alert policies in all pages. This number is only an - * estimate, and may change in subsequent pages. https://aip.dev/158 - * - * Generated from protobuf field int32 total_size = 4; - */ - protected $total_size = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Monitoring\V3\AlertPolicy>|\Google\Protobuf\Internal\RepeatedField $alert_policies - * The returned alert policies. - * @type string $next_page_token - * If there might be more results than were returned, then this field is set - * to a non-empty value. To see the additional results, - * use that value as `page_token` in the next call to this method. - * @type int $total_size - * The total number of alert policies in all pages. This number is only an - * estimate, and may change in subsequent pages. https://aip.dev/158 - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\AlertService::initOnce(); - parent::__construct($data); - } - - /** - * The returned alert policies. - * - * Generated from protobuf field repeated .google.monitoring.v3.AlertPolicy alert_policies = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAlertPolicies() - { - return $this->alert_policies; - } - - /** - * The returned alert policies. - * - * Generated from protobuf field repeated .google.monitoring.v3.AlertPolicy alert_policies = 3; - * @param array<\Google\Cloud\Monitoring\V3\AlertPolicy>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAlertPolicies($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Monitoring\V3\AlertPolicy::class); - $this->alert_policies = $arr; - - return $this; - } - - /** - * If there might be more results than were returned, then this field is set - * to a non-empty value. To see the additional results, - * use that value as `page_token` in the next call to this method. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * If there might be more results than were returned, then this field is set - * to a non-empty value. To see the additional results, - * use that value as `page_token` in the next call to this method. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * The total number of alert policies in all pages. This number is only an - * estimate, and may change in subsequent pages. https://aip.dev/158 - * - * Generated from protobuf field int32 total_size = 4; - * @return int - */ - public function getTotalSize() - { - return $this->total_size; - } - - /** - * The total number of alert policies in all pages. This number is only an - * estimate, and may change in subsequent pages. https://aip.dev/158 - * - * Generated from protobuf field int32 total_size = 4; - * @param int $var - * @return $this - */ - public function setTotalSize($var) - { - GPBUtil::checkInt32($var); - $this->total_size = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListGroupMembersRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListGroupMembersRequest.php deleted file mode 100644 index 876c5364c1a1..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListGroupMembersRequest.php +++ /dev/null @@ -1,277 +0,0 @@ -google.monitoring.v3.ListGroupMembersRequest - */ -class ListGroupMembersRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The group whose members are listed. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] - * - * Generated from protobuf field string name = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * A positive number that is the maximum number of results to return. - * - * Generated from protobuf field int32 page_size = 3; - */ - protected $page_size = 0; - /** - * If this field is not empty then it must contain the `next_page_token` value - * returned by a previous call to this method. Using this field causes the - * method to return additional results from the previous method call. - * - * Generated from protobuf field string page_token = 4; - */ - protected $page_token = ''; - /** - * An optional [list - * filter](https://cloud.google.com/monitoring/api/learn_more#filtering) - * describing the members to be returned. The filter may reference the type, - * labels, and metadata of monitored resources that comprise the group. For - * example, to return only resources representing Compute Engine VM instances, - * use this filter: - * `resource.type = "gce_instance"` - * - * Generated from protobuf field string filter = 5; - */ - protected $filter = ''; - /** - * An optional time interval for which results should be returned. Only - * members that were part of the group during the specified interval are - * included in the response. If no interval is provided then the group - * membership over the last minute is returned. - * - * Generated from protobuf field .google.monitoring.v3.TimeInterval interval = 6; - */ - protected $interval = null; - - /** - * @param string $name Required. The group whose members are listed. The format is: - * - * projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] - * Please see {@see GroupServiceClient::groupName()} for help formatting this field. - * - * @return \Google\Cloud\Monitoring\V3\ListGroupMembersRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The group whose members are listed. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] - * @type int $page_size - * A positive number that is the maximum number of results to return. - * @type string $page_token - * If this field is not empty then it must contain the `next_page_token` value - * returned by a previous call to this method. Using this field causes the - * method to return additional results from the previous method call. - * @type string $filter - * An optional [list - * filter](https://cloud.google.com/monitoring/api/learn_more#filtering) - * describing the members to be returned. The filter may reference the type, - * labels, and metadata of monitored resources that comprise the group. For - * example, to return only resources representing Compute Engine VM instances, - * use this filter: - * `resource.type = "gce_instance"` - * @type \Google\Cloud\Monitoring\V3\TimeInterval $interval - * An optional time interval for which results should be returned. Only - * members that were part of the group during the specified interval are - * included in the response. If no interval is provided then the group - * membership over the last minute is returned. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\GroupService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The group whose members are listed. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] - * - * Generated from protobuf field string name = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The group whose members are listed. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] - * - * Generated from protobuf field string name = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * A positive number that is the maximum number of results to return. - * - * Generated from protobuf field int32 page_size = 3; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * A positive number that is the maximum number of results to return. - * - * Generated from protobuf field int32 page_size = 3; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * If this field is not empty then it must contain the `next_page_token` value - * returned by a previous call to this method. Using this field causes the - * method to return additional results from the previous method call. - * - * Generated from protobuf field string page_token = 4; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * If this field is not empty then it must contain the `next_page_token` value - * returned by a previous call to this method. Using this field causes the - * method to return additional results from the previous method call. - * - * Generated from protobuf field string page_token = 4; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * An optional [list - * filter](https://cloud.google.com/monitoring/api/learn_more#filtering) - * describing the members to be returned. The filter may reference the type, - * labels, and metadata of monitored resources that comprise the group. For - * example, to return only resources representing Compute Engine VM instances, - * use this filter: - * `resource.type = "gce_instance"` - * - * Generated from protobuf field string filter = 5; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * An optional [list - * filter](https://cloud.google.com/monitoring/api/learn_more#filtering) - * describing the members to be returned. The filter may reference the type, - * labels, and metadata of monitored resources that comprise the group. For - * example, to return only resources representing Compute Engine VM instances, - * use this filter: - * `resource.type = "gce_instance"` - * - * Generated from protobuf field string filter = 5; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * An optional time interval for which results should be returned. Only - * members that were part of the group during the specified interval are - * included in the response. If no interval is provided then the group - * membership over the last minute is returned. - * - * Generated from protobuf field .google.monitoring.v3.TimeInterval interval = 6; - * @return \Google\Cloud\Monitoring\V3\TimeInterval|null - */ - public function getInterval() - { - return $this->interval; - } - - public function hasInterval() - { - return isset($this->interval); - } - - public function clearInterval() - { - unset($this->interval); - } - - /** - * An optional time interval for which results should be returned. Only - * members that were part of the group during the specified interval are - * included in the response. If no interval is provided then the group - * membership over the last minute is returned. - * - * Generated from protobuf field .google.monitoring.v3.TimeInterval interval = 6; - * @param \Google\Cloud\Monitoring\V3\TimeInterval $var - * @return $this - */ - public function setInterval($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\TimeInterval::class); - $this->interval = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListGroupMembersResponse.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListGroupMembersResponse.php deleted file mode 100644 index 8cfc0e8fcd34..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListGroupMembersResponse.php +++ /dev/null @@ -1,143 +0,0 @@ -google.monitoring.v3.ListGroupMembersResponse - */ -class ListGroupMembersResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A set of monitored resources in the group. - * - * Generated from protobuf field repeated .google.api.MonitoredResource members = 1; - */ - private $members; - /** - * If there are more results than have been returned, then this field is - * set to a non-empty value. To see the additional results, use that value as - * `page_token` in the next call to this method. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * The total number of elements matching this request. - * - * Generated from protobuf field int32 total_size = 3; - */ - protected $total_size = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Api\MonitoredResource>|\Google\Protobuf\Internal\RepeatedField $members - * A set of monitored resources in the group. - * @type string $next_page_token - * If there are more results than have been returned, then this field is - * set to a non-empty value. To see the additional results, use that value as - * `page_token` in the next call to this method. - * @type int $total_size - * The total number of elements matching this request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\GroupService::initOnce(); - parent::__construct($data); - } - - /** - * A set of monitored resources in the group. - * - * Generated from protobuf field repeated .google.api.MonitoredResource members = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMembers() - { - return $this->members; - } - - /** - * A set of monitored resources in the group. - * - * Generated from protobuf field repeated .google.api.MonitoredResource members = 1; - * @param array<\Google\Api\MonitoredResource>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMembers($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Api\MonitoredResource::class); - $this->members = $arr; - - return $this; - } - - /** - * If there are more results than have been returned, then this field is - * set to a non-empty value. To see the additional results, use that value as - * `page_token` in the next call to this method. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * If there are more results than have been returned, then this field is - * set to a non-empty value. To see the additional results, use that value as - * `page_token` in the next call to this method. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * The total number of elements matching this request. - * - * Generated from protobuf field int32 total_size = 3; - * @return int - */ - public function getTotalSize() - { - return $this->total_size; - } - - /** - * The total number of elements matching this request. - * - * Generated from protobuf field int32 total_size = 3; - * @param int $var - * @return $this - */ - public function setTotalSize($var) - { - GPBUtil::checkInt32($var); - $this->total_size = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListGroupsRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListGroupsRequest.php deleted file mode 100644 index 7203ea371000..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListGroupsRequest.php +++ /dev/null @@ -1,316 +0,0 @@ -google.monitoring.v3.ListGroupsRequest - */ -class ListGroupsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The - * [project](https://cloud.google.com/monitoring/api/v3#project_name) whose - * groups are to be listed. The format is: - * projects/[PROJECT_ID_OR_NUMBER] - * - * Generated from protobuf field string name = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * A positive number that is the maximum number of results to return. - * - * Generated from protobuf field int32 page_size = 5; - */ - protected $page_size = 0; - /** - * If this field is not empty then it must contain the `next_page_token` value - * returned by a previous call to this method. Using this field causes the - * method to return additional results from the previous method call. - * - * Generated from protobuf field string page_token = 6; - */ - protected $page_token = ''; - protected $filter; - - /** - * @param string $name Required. The - * [project](https://cloud.google.com/monitoring/api/v3#project_name) whose - * groups are to be listed. The format is: - * - * projects/[PROJECT_ID_OR_NUMBER] - * - * @return \Google\Cloud\Monitoring\V3\ListGroupsRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The - * [project](https://cloud.google.com/monitoring/api/v3#project_name) whose - * groups are to be listed. The format is: - * projects/[PROJECT_ID_OR_NUMBER] - * @type string $children_of_group - * A group name. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] - * Returns groups whose `parent_name` field contains the group - * name. If no groups have this parent, the results are empty. - * @type string $ancestors_of_group - * A group name. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] - * Returns groups that are ancestors of the specified group. - * The groups are returned in order, starting with the immediate parent and - * ending with the most distant ancestor. If the specified group has no - * immediate parent, the results are empty. - * @type string $descendants_of_group - * A group name. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] - * Returns the descendants of the specified group. This is a superset of - * the results returned by the `children_of_group` filter, and includes - * children-of-children, and so forth. - * @type int $page_size - * A positive number that is the maximum number of results to return. - * @type string $page_token - * If this field is not empty then it must contain the `next_page_token` value - * returned by a previous call to this method. Using this field causes the - * method to return additional results from the previous method call. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\GroupService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The - * [project](https://cloud.google.com/monitoring/api/v3#project_name) whose - * groups are to be listed. The format is: - * projects/[PROJECT_ID_OR_NUMBER] - * - * Generated from protobuf field string name = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The - * [project](https://cloud.google.com/monitoring/api/v3#project_name) whose - * groups are to be listed. The format is: - * projects/[PROJECT_ID_OR_NUMBER] - * - * Generated from protobuf field string name = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * A group name. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] - * Returns groups whose `parent_name` field contains the group - * name. If no groups have this parent, the results are empty. - * - * Generated from protobuf field string children_of_group = 2 [(.google.api.resource_reference) = { - * @return string - */ - public function getChildrenOfGroup() - { - return $this->readOneof(2); - } - - public function hasChildrenOfGroup() - { - return $this->hasOneof(2); - } - - /** - * A group name. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] - * Returns groups whose `parent_name` field contains the group - * name. If no groups have this parent, the results are empty. - * - * Generated from protobuf field string children_of_group = 2 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setChildrenOfGroup($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * A group name. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] - * Returns groups that are ancestors of the specified group. - * The groups are returned in order, starting with the immediate parent and - * ending with the most distant ancestor. If the specified group has no - * immediate parent, the results are empty. - * - * Generated from protobuf field string ancestors_of_group = 3 [(.google.api.resource_reference) = { - * @return string - */ - public function getAncestorsOfGroup() - { - return $this->readOneof(3); - } - - public function hasAncestorsOfGroup() - { - return $this->hasOneof(3); - } - - /** - * A group name. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] - * Returns groups that are ancestors of the specified group. - * The groups are returned in order, starting with the immediate parent and - * ending with the most distant ancestor. If the specified group has no - * immediate parent, the results are empty. - * - * Generated from protobuf field string ancestors_of_group = 3 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setAncestorsOfGroup($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * A group name. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] - * Returns the descendants of the specified group. This is a superset of - * the results returned by the `children_of_group` filter, and includes - * children-of-children, and so forth. - * - * Generated from protobuf field string descendants_of_group = 4 [(.google.api.resource_reference) = { - * @return string - */ - public function getDescendantsOfGroup() - { - return $this->readOneof(4); - } - - public function hasDescendantsOfGroup() - { - return $this->hasOneof(4); - } - - /** - * A group name. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] - * Returns the descendants of the specified group. This is a superset of - * the results returned by the `children_of_group` filter, and includes - * children-of-children, and so forth. - * - * Generated from protobuf field string descendants_of_group = 4 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setDescendantsOfGroup($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * A positive number that is the maximum number of results to return. - * - * Generated from protobuf field int32 page_size = 5; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * A positive number that is the maximum number of results to return. - * - * Generated from protobuf field int32 page_size = 5; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * If this field is not empty then it must contain the `next_page_token` value - * returned by a previous call to this method. Using this field causes the - * method to return additional results from the previous method call. - * - * Generated from protobuf field string page_token = 6; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * If this field is not empty then it must contain the `next_page_token` value - * returned by a previous call to this method. Using this field causes the - * method to return additional results from the previous method call. - * - * Generated from protobuf field string page_token = 6; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * @return string - */ - public function getFilter() - { - return $this->whichOneof("filter"); - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListGroupsResponse.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListGroupsResponse.php deleted file mode 100644 index 98e3257f20aa..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListGroupsResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -google.monitoring.v3.ListGroupsResponse - */ -class ListGroupsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The groups that match the specified filters. - * - * Generated from protobuf field repeated .google.monitoring.v3.Group group = 1; - */ - private $group; - /** - * If there are more results than have been returned, then this field is set - * to a non-empty value. To see the additional results, - * use that value as `page_token` in the next call to this method. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Monitoring\V3\Group>|\Google\Protobuf\Internal\RepeatedField $group - * The groups that match the specified filters. - * @type string $next_page_token - * If there are more results than have been returned, then this field is set - * to a non-empty value. To see the additional results, - * use that value as `page_token` in the next call to this method. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\GroupService::initOnce(); - parent::__construct($data); - } - - /** - * The groups that match the specified filters. - * - * Generated from protobuf field repeated .google.monitoring.v3.Group group = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getGroup() - { - return $this->group; - } - - /** - * The groups that match the specified filters. - * - * Generated from protobuf field repeated .google.monitoring.v3.Group group = 1; - * @param array<\Google\Cloud\Monitoring\V3\Group>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setGroup($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Monitoring\V3\Group::class); - $this->group = $arr; - - return $this; - } - - /** - * If there are more results than have been returned, then this field is set - * to a non-empty value. To see the additional results, - * use that value as `page_token` in the next call to this method. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * If there are more results than have been returned, then this field is set - * to a non-empty value. To see the additional results, - * use that value as `page_token` in the next call to this method. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListMetricDescriptorsRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListMetricDescriptorsRequest.php deleted file mode 100644 index 800b557691f2..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListMetricDescriptorsRequest.php +++ /dev/null @@ -1,238 +0,0 @@ -google.monitoring.v3.ListMetricDescriptorsRequest - */ -class ListMetricDescriptorsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The - * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which - * to execute the request. The format is: - * projects/[PROJECT_ID_OR_NUMBER] - * - * Generated from protobuf field string name = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * If this field is empty, all custom and - * system-defined metric descriptors are returned. - * Otherwise, the [filter](https://cloud.google.com/monitoring/api/v3/filters) - * specifies which metric descriptors are to be - * returned. For example, the following filter matches all - * [custom metrics](https://cloud.google.com/monitoring/custom-metrics): - * metric.type = starts_with("custom.googleapis.com/") - * - * Generated from protobuf field string filter = 2; - */ - protected $filter = ''; - /** - * A positive number that is the maximum number of results to return. The - * default and maximum value is 10,000. If a page_size <= 0 or > 10,000 is - * submitted, will instead return a maximum of 10,000 results. - * - * Generated from protobuf field int32 page_size = 3; - */ - protected $page_size = 0; - /** - * If this field is not empty then it must contain the `nextPageToken` value - * returned by a previous call to this method. Using this field causes the - * method to return additional results from the previous method call. - * - * Generated from protobuf field string page_token = 4; - */ - protected $page_token = ''; - - /** - * @param string $name Required. The - * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which - * to execute the request. The format is: - * - * projects/[PROJECT_ID_OR_NUMBER] - * - * @return \Google\Cloud\Monitoring\V3\ListMetricDescriptorsRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The - * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which - * to execute the request. The format is: - * projects/[PROJECT_ID_OR_NUMBER] - * @type string $filter - * If this field is empty, all custom and - * system-defined metric descriptors are returned. - * Otherwise, the [filter](https://cloud.google.com/monitoring/api/v3/filters) - * specifies which metric descriptors are to be - * returned. For example, the following filter matches all - * [custom metrics](https://cloud.google.com/monitoring/custom-metrics): - * metric.type = starts_with("custom.googleapis.com/") - * @type int $page_size - * A positive number that is the maximum number of results to return. The - * default and maximum value is 10,000. If a page_size <= 0 or > 10,000 is - * submitted, will instead return a maximum of 10,000 results. - * @type string $page_token - * If this field is not empty then it must contain the `nextPageToken` value - * returned by a previous call to this method. Using this field causes the - * method to return additional results from the previous method call. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\MetricService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The - * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which - * to execute the request. The format is: - * projects/[PROJECT_ID_OR_NUMBER] - * - * Generated from protobuf field string name = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The - * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which - * to execute the request. The format is: - * projects/[PROJECT_ID_OR_NUMBER] - * - * Generated from protobuf field string name = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * If this field is empty, all custom and - * system-defined metric descriptors are returned. - * Otherwise, the [filter](https://cloud.google.com/monitoring/api/v3/filters) - * specifies which metric descriptors are to be - * returned. For example, the following filter matches all - * [custom metrics](https://cloud.google.com/monitoring/custom-metrics): - * metric.type = starts_with("custom.googleapis.com/") - * - * Generated from protobuf field string filter = 2; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * If this field is empty, all custom and - * system-defined metric descriptors are returned. - * Otherwise, the [filter](https://cloud.google.com/monitoring/api/v3/filters) - * specifies which metric descriptors are to be - * returned. For example, the following filter matches all - * [custom metrics](https://cloud.google.com/monitoring/custom-metrics): - * metric.type = starts_with("custom.googleapis.com/") - * - * Generated from protobuf field string filter = 2; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * A positive number that is the maximum number of results to return. The - * default and maximum value is 10,000. If a page_size <= 0 or > 10,000 is - * submitted, will instead return a maximum of 10,000 results. - * - * Generated from protobuf field int32 page_size = 3; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * A positive number that is the maximum number of results to return. The - * default and maximum value is 10,000. If a page_size <= 0 or > 10,000 is - * submitted, will instead return a maximum of 10,000 results. - * - * Generated from protobuf field int32 page_size = 3; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * If this field is not empty then it must contain the `nextPageToken` value - * returned by a previous call to this method. Using this field causes the - * method to return additional results from the previous method call. - * - * Generated from protobuf field string page_token = 4; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * If this field is not empty then it must contain the `nextPageToken` value - * returned by a previous call to this method. Using this field causes the - * method to return additional results from the previous method call. - * - * Generated from protobuf field string page_token = 4; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListMetricDescriptorsResponse.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListMetricDescriptorsResponse.php deleted file mode 100644 index 4ea2039e212c..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListMetricDescriptorsResponse.php +++ /dev/null @@ -1,113 +0,0 @@ -google.monitoring.v3.ListMetricDescriptorsResponse - */ -class ListMetricDescriptorsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The metric descriptors that are available to the project - * and that match the value of `filter`, if present. - * - * Generated from protobuf field repeated .google.api.MetricDescriptor metric_descriptors = 1; - */ - private $metric_descriptors; - /** - * If there are more results than have been returned, then this field is set - * to a non-empty value. To see the additional results, - * use that value as `page_token` in the next call to this method. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Api\MetricDescriptor>|\Google\Protobuf\Internal\RepeatedField $metric_descriptors - * The metric descriptors that are available to the project - * and that match the value of `filter`, if present. - * @type string $next_page_token - * If there are more results than have been returned, then this field is set - * to a non-empty value. To see the additional results, - * use that value as `page_token` in the next call to this method. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\MetricService::initOnce(); - parent::__construct($data); - } - - /** - * The metric descriptors that are available to the project - * and that match the value of `filter`, if present. - * - * Generated from protobuf field repeated .google.api.MetricDescriptor metric_descriptors = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMetricDescriptors() - { - return $this->metric_descriptors; - } - - /** - * The metric descriptors that are available to the project - * and that match the value of `filter`, if present. - * - * Generated from protobuf field repeated .google.api.MetricDescriptor metric_descriptors = 1; - * @param array<\Google\Api\MetricDescriptor>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMetricDescriptors($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Api\MetricDescriptor::class); - $this->metric_descriptors = $arr; - - return $this; - } - - /** - * If there are more results than have been returned, then this field is set - * to a non-empty value. To see the additional results, - * use that value as `page_token` in the next call to this method. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * If there are more results than have been returned, then this field is set - * to a non-empty value. To see the additional results, - * use that value as `page_token` in the next call to this method. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListMonitoredResourceDescriptorsRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListMonitoredResourceDescriptorsRequest.php deleted file mode 100644 index 14696bd981c1..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListMonitoredResourceDescriptorsRequest.php +++ /dev/null @@ -1,222 +0,0 @@ -google.monitoring.v3.ListMonitoredResourceDescriptorsRequest - */ -class ListMonitoredResourceDescriptorsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The - * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which - * to execute the request. The format is: - * projects/[PROJECT_ID_OR_NUMBER] - * - * Generated from protobuf field string name = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * An optional [filter](https://cloud.google.com/monitoring/api/v3/filters) - * describing the descriptors to be returned. The filter can reference the - * descriptor's type and labels. For example, the following filter returns - * only Google Compute Engine descriptors that have an `id` label: - * resource.type = starts_with("gce_") AND resource.label:id - * - * Generated from protobuf field string filter = 2; - */ - protected $filter = ''; - /** - * A positive number that is the maximum number of results to return. - * - * Generated from protobuf field int32 page_size = 3; - */ - protected $page_size = 0; - /** - * If this field is not empty then it must contain the `nextPageToken` value - * returned by a previous call to this method. Using this field causes the - * method to return additional results from the previous method call. - * - * Generated from protobuf field string page_token = 4; - */ - protected $page_token = ''; - - /** - * @param string $name Required. The - * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which - * to execute the request. The format is: - * - * projects/[PROJECT_ID_OR_NUMBER] - * - * @return \Google\Cloud\Monitoring\V3\ListMonitoredResourceDescriptorsRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The - * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which - * to execute the request. The format is: - * projects/[PROJECT_ID_OR_NUMBER] - * @type string $filter - * An optional [filter](https://cloud.google.com/monitoring/api/v3/filters) - * describing the descriptors to be returned. The filter can reference the - * descriptor's type and labels. For example, the following filter returns - * only Google Compute Engine descriptors that have an `id` label: - * resource.type = starts_with("gce_") AND resource.label:id - * @type int $page_size - * A positive number that is the maximum number of results to return. - * @type string $page_token - * If this field is not empty then it must contain the `nextPageToken` value - * returned by a previous call to this method. Using this field causes the - * method to return additional results from the previous method call. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\MetricService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The - * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which - * to execute the request. The format is: - * projects/[PROJECT_ID_OR_NUMBER] - * - * Generated from protobuf field string name = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The - * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which - * to execute the request. The format is: - * projects/[PROJECT_ID_OR_NUMBER] - * - * Generated from protobuf field string name = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * An optional [filter](https://cloud.google.com/monitoring/api/v3/filters) - * describing the descriptors to be returned. The filter can reference the - * descriptor's type and labels. For example, the following filter returns - * only Google Compute Engine descriptors that have an `id` label: - * resource.type = starts_with("gce_") AND resource.label:id - * - * Generated from protobuf field string filter = 2; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * An optional [filter](https://cloud.google.com/monitoring/api/v3/filters) - * describing the descriptors to be returned. The filter can reference the - * descriptor's type and labels. For example, the following filter returns - * only Google Compute Engine descriptors that have an `id` label: - * resource.type = starts_with("gce_") AND resource.label:id - * - * Generated from protobuf field string filter = 2; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * A positive number that is the maximum number of results to return. - * - * Generated from protobuf field int32 page_size = 3; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * A positive number that is the maximum number of results to return. - * - * Generated from protobuf field int32 page_size = 3; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * If this field is not empty then it must contain the `nextPageToken` value - * returned by a previous call to this method. Using this field causes the - * method to return additional results from the previous method call. - * - * Generated from protobuf field string page_token = 4; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * If this field is not empty then it must contain the `nextPageToken` value - * returned by a previous call to this method. Using this field causes the - * method to return additional results from the previous method call. - * - * Generated from protobuf field string page_token = 4; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListMonitoredResourceDescriptorsResponse.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListMonitoredResourceDescriptorsResponse.php deleted file mode 100644 index 07992037c864..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListMonitoredResourceDescriptorsResponse.php +++ /dev/null @@ -1,113 +0,0 @@ -google.monitoring.v3.ListMonitoredResourceDescriptorsResponse - */ -class ListMonitoredResourceDescriptorsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The monitored resource descriptors that are available to this project - * and that match `filter`, if present. - * - * Generated from protobuf field repeated .google.api.MonitoredResourceDescriptor resource_descriptors = 1; - */ - private $resource_descriptors; - /** - * If there are more results than have been returned, then this field is set - * to a non-empty value. To see the additional results, - * use that value as `page_token` in the next call to this method. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Api\MonitoredResourceDescriptor>|\Google\Protobuf\Internal\RepeatedField $resource_descriptors - * The monitored resource descriptors that are available to this project - * and that match `filter`, if present. - * @type string $next_page_token - * If there are more results than have been returned, then this field is set - * to a non-empty value. To see the additional results, - * use that value as `page_token` in the next call to this method. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\MetricService::initOnce(); - parent::__construct($data); - } - - /** - * The monitored resource descriptors that are available to this project - * and that match `filter`, if present. - * - * Generated from protobuf field repeated .google.api.MonitoredResourceDescriptor resource_descriptors = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getResourceDescriptors() - { - return $this->resource_descriptors; - } - - /** - * The monitored resource descriptors that are available to this project - * and that match `filter`, if present. - * - * Generated from protobuf field repeated .google.api.MonitoredResourceDescriptor resource_descriptors = 1; - * @param array<\Google\Api\MonitoredResourceDescriptor>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setResourceDescriptors($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Api\MonitoredResourceDescriptor::class); - $this->resource_descriptors = $arr; - - return $this; - } - - /** - * If there are more results than have been returned, then this field is set - * to a non-empty value. To see the additional results, - * use that value as `page_token` in the next call to this method. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * If there are more results than have been returned, then this field is set - * to a non-empty value. To see the additional results, - * use that value as `page_token` in the next call to this method. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListNotificationChannelDescriptorsRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListNotificationChannelDescriptorsRequest.php deleted file mode 100644 index ef7d9522e6f2..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListNotificationChannelDescriptorsRequest.php +++ /dev/null @@ -1,206 +0,0 @@ -google.monitoring.v3.ListNotificationChannelDescriptorsRequest - */ -class ListNotificationChannelDescriptorsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The REST resource name of the parent from which to retrieve - * the notification channel descriptors. The expected syntax is: - * projects/[PROJECT_ID_OR_NUMBER] - * Note that this - * [names](https://cloud.google.com/monitoring/api/v3#project_name) the parent - * container in which to look for the descriptors; to retrieve a single - * descriptor by name, use the - * [GetNotificationChannelDescriptor][google.monitoring.v3.NotificationChannelService.GetNotificationChannelDescriptor] - * operation, instead. - * - * Generated from protobuf field string name = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * The maximum number of results to return in a single response. If - * not set to a positive number, a reasonable value will be chosen by the - * service. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * If non-empty, `page_token` must contain a value returned as the - * `next_page_token` in a previous response to request the next set - * of results. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $name Required. The REST resource name of the parent from which to retrieve - * the notification channel descriptors. The expected syntax is: - * - * projects/[PROJECT_ID_OR_NUMBER] - * - * Note that this - * [names](https://cloud.google.com/monitoring/api/v3#project_name) the parent - * container in which to look for the descriptors; to retrieve a single - * descriptor by name, use the - * [GetNotificationChannelDescriptor][google.monitoring.v3.NotificationChannelService.GetNotificationChannelDescriptor] - * operation, instead. - * - * @return \Google\Cloud\Monitoring\V3\ListNotificationChannelDescriptorsRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The REST resource name of the parent from which to retrieve - * the notification channel descriptors. The expected syntax is: - * projects/[PROJECT_ID_OR_NUMBER] - * Note that this - * [names](https://cloud.google.com/monitoring/api/v3#project_name) the parent - * container in which to look for the descriptors; to retrieve a single - * descriptor by name, use the - * [GetNotificationChannelDescriptor][google.monitoring.v3.NotificationChannelService.GetNotificationChannelDescriptor] - * operation, instead. - * @type int $page_size - * The maximum number of results to return in a single response. If - * not set to a positive number, a reasonable value will be chosen by the - * service. - * @type string $page_token - * If non-empty, `page_token` must contain a value returned as the - * `next_page_token` in a previous response to request the next set - * of results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\NotificationService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The REST resource name of the parent from which to retrieve - * the notification channel descriptors. The expected syntax is: - * projects/[PROJECT_ID_OR_NUMBER] - * Note that this - * [names](https://cloud.google.com/monitoring/api/v3#project_name) the parent - * container in which to look for the descriptors; to retrieve a single - * descriptor by name, use the - * [GetNotificationChannelDescriptor][google.monitoring.v3.NotificationChannelService.GetNotificationChannelDescriptor] - * operation, instead. - * - * Generated from protobuf field string name = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The REST resource name of the parent from which to retrieve - * the notification channel descriptors. The expected syntax is: - * projects/[PROJECT_ID_OR_NUMBER] - * Note that this - * [names](https://cloud.google.com/monitoring/api/v3#project_name) the parent - * container in which to look for the descriptors; to retrieve a single - * descriptor by name, use the - * [GetNotificationChannelDescriptor][google.monitoring.v3.NotificationChannelService.GetNotificationChannelDescriptor] - * operation, instead. - * - * Generated from protobuf field string name = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The maximum number of results to return in a single response. If - * not set to a positive number, a reasonable value will be chosen by the - * service. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of results to return in a single response. If - * not set to a positive number, a reasonable value will be chosen by the - * service. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * If non-empty, `page_token` must contain a value returned as the - * `next_page_token` in a previous response to request the next set - * of results. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * If non-empty, `page_token` must contain a value returned as the - * `next_page_token` in a previous response to request the next set - * of results. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListNotificationChannelDescriptorsResponse.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListNotificationChannelDescriptorsResponse.php deleted file mode 100644 index 93034ae15999..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListNotificationChannelDescriptorsResponse.php +++ /dev/null @@ -1,117 +0,0 @@ -google.monitoring.v3.ListNotificationChannelDescriptorsResponse - */ -class ListNotificationChannelDescriptorsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The monitored resource descriptors supported for the specified - * project, optionally filtered. - * - * Generated from protobuf field repeated .google.monitoring.v3.NotificationChannelDescriptor channel_descriptors = 1; - */ - private $channel_descriptors; - /** - * If not empty, indicates that there may be more results that match - * the request. Use the value in the `page_token` field in a - * subsequent request to fetch the next set of results. If empty, - * all results have been returned. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Monitoring\V3\NotificationChannelDescriptor>|\Google\Protobuf\Internal\RepeatedField $channel_descriptors - * The monitored resource descriptors supported for the specified - * project, optionally filtered. - * @type string $next_page_token - * If not empty, indicates that there may be more results that match - * the request. Use the value in the `page_token` field in a - * subsequent request to fetch the next set of results. If empty, - * all results have been returned. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\NotificationService::initOnce(); - parent::__construct($data); - } - - /** - * The monitored resource descriptors supported for the specified - * project, optionally filtered. - * - * Generated from protobuf field repeated .google.monitoring.v3.NotificationChannelDescriptor channel_descriptors = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getChannelDescriptors() - { - return $this->channel_descriptors; - } - - /** - * The monitored resource descriptors supported for the specified - * project, optionally filtered. - * - * Generated from protobuf field repeated .google.monitoring.v3.NotificationChannelDescriptor channel_descriptors = 1; - * @param array<\Google\Cloud\Monitoring\V3\NotificationChannelDescriptor>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setChannelDescriptors($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Monitoring\V3\NotificationChannelDescriptor::class); - $this->channel_descriptors = $arr; - - return $this; - } - - /** - * If not empty, indicates that there may be more results that match - * the request. Use the value in the `page_token` field in a - * subsequent request to fetch the next set of results. If empty, - * all results have been returned. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * If not empty, indicates that there may be more results that match - * the request. Use the value in the `page_token` field in a - * subsequent request to fetch the next set of results. If empty, - * all results have been returned. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListNotificationChannelsRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListNotificationChannelsRequest.php deleted file mode 100644 index ec2c80372ea3..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListNotificationChannelsRequest.php +++ /dev/null @@ -1,307 +0,0 @@ -google.monitoring.v3.ListNotificationChannelsRequest - */ -class ListNotificationChannelsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The - * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which - * to execute the request. The format is: - * projects/[PROJECT_ID_OR_NUMBER] - * This names the container - * in which to look for the notification channels; it does not name a - * specific channel. To query a specific channel by REST resource name, use - * the - * [`GetNotificationChannel`][google.monitoring.v3.NotificationChannelService.GetNotificationChannel] - * operation. - * - * Generated from protobuf field string name = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. If provided, this field specifies the criteria that must be met - * by notification channels to be included in the response. - * For more details, see [sorting and - * filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering). - * - * Generated from protobuf field string filter = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. A comma-separated list of fields by which to sort the result. - * Supports the same set of fields as in `filter`. Entries can be prefixed - * with a minus sign to sort in descending rather than ascending order. - * For more details, see [sorting and - * filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering). - * - * Generated from protobuf field string order_by = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - /** - * Optional. The maximum number of results to return in a single response. If - * not set to a positive number, a reasonable value will be chosen by the - * service. - * - * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. If non-empty, `page_token` must contain a value returned as the - * `next_page_token` in a previous response to request the next set - * of results. - * - * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * @param string $name Required. The - * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which - * to execute the request. The format is: - * - * projects/[PROJECT_ID_OR_NUMBER] - * - * This names the container - * in which to look for the notification channels; it does not name a - * specific channel. To query a specific channel by REST resource name, use - * the - * [`GetNotificationChannel`][google.monitoring.v3.NotificationChannelService.GetNotificationChannel] - * operation. - * - * @return \Google\Cloud\Monitoring\V3\ListNotificationChannelsRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The - * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which - * to execute the request. The format is: - * projects/[PROJECT_ID_OR_NUMBER] - * This names the container - * in which to look for the notification channels; it does not name a - * specific channel. To query a specific channel by REST resource name, use - * the - * [`GetNotificationChannel`][google.monitoring.v3.NotificationChannelService.GetNotificationChannel] - * operation. - * @type string $filter - * Optional. If provided, this field specifies the criteria that must be met - * by notification channels to be included in the response. - * For more details, see [sorting and - * filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering). - * @type string $order_by - * Optional. A comma-separated list of fields by which to sort the result. - * Supports the same set of fields as in `filter`. Entries can be prefixed - * with a minus sign to sort in descending rather than ascending order. - * For more details, see [sorting and - * filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering). - * @type int $page_size - * Optional. The maximum number of results to return in a single response. If - * not set to a positive number, a reasonable value will be chosen by the - * service. - * @type string $page_token - * Optional. If non-empty, `page_token` must contain a value returned as the - * `next_page_token` in a previous response to request the next set - * of results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\NotificationService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The - * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which - * to execute the request. The format is: - * projects/[PROJECT_ID_OR_NUMBER] - * This names the container - * in which to look for the notification channels; it does not name a - * specific channel. To query a specific channel by REST resource name, use - * the - * [`GetNotificationChannel`][google.monitoring.v3.NotificationChannelService.GetNotificationChannel] - * operation. - * - * Generated from protobuf field string name = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The - * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which - * to execute the request. The format is: - * projects/[PROJECT_ID_OR_NUMBER] - * This names the container - * in which to look for the notification channels; it does not name a - * specific channel. To query a specific channel by REST resource name, use - * the - * [`GetNotificationChannel`][google.monitoring.v3.NotificationChannelService.GetNotificationChannel] - * operation. - * - * Generated from protobuf field string name = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. If provided, this field specifies the criteria that must be met - * by notification channels to be included in the response. - * For more details, see [sorting and - * filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering). - * - * Generated from protobuf field string filter = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. If provided, this field specifies the criteria that must be met - * by notification channels to be included in the response. - * For more details, see [sorting and - * filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering). - * - * Generated from protobuf field string filter = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Optional. A comma-separated list of fields by which to sort the result. - * Supports the same set of fields as in `filter`. Entries can be prefixed - * with a minus sign to sort in descending rather than ascending order. - * For more details, see [sorting and - * filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering). - * - * Generated from protobuf field string order_by = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Optional. A comma-separated list of fields by which to sort the result. - * Supports the same set of fields as in `filter`. Entries can be prefixed - * with a minus sign to sort in descending rather than ascending order. - * For more details, see [sorting and - * filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering). - * - * Generated from protobuf field string order_by = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - - /** - * Optional. The maximum number of results to return in a single response. If - * not set to a positive number, a reasonable value will be chosen by the - * service. - * - * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of results to return in a single response. If - * not set to a positive number, a reasonable value will be chosen by the - * service. - * - * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. If non-empty, `page_token` must contain a value returned as the - * `next_page_token` in a previous response to request the next set - * of results. - * - * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. If non-empty, `page_token` must contain a value returned as the - * `next_page_token` in a previous response to request the next set - * of results. - * - * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListNotificationChannelsResponse.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListNotificationChannelsResponse.php deleted file mode 100644 index 28dc01fb0af2..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListNotificationChannelsResponse.php +++ /dev/null @@ -1,151 +0,0 @@ -google.monitoring.v3.ListNotificationChannelsResponse - */ -class ListNotificationChannelsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The notification channels defined for the specified project. - * - * Generated from protobuf field repeated .google.monitoring.v3.NotificationChannel notification_channels = 3; - */ - private $notification_channels; - /** - * If not empty, indicates that there may be more results that match - * the request. Use the value in the `page_token` field in a - * subsequent request to fetch the next set of results. If empty, - * all results have been returned. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * The total number of notification channels in all pages. This number is only - * an estimate, and may change in subsequent pages. https://aip.dev/158 - * - * Generated from protobuf field int32 total_size = 4; - */ - protected $total_size = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Monitoring\V3\NotificationChannel>|\Google\Protobuf\Internal\RepeatedField $notification_channels - * The notification channels defined for the specified project. - * @type string $next_page_token - * If not empty, indicates that there may be more results that match - * the request. Use the value in the `page_token` field in a - * subsequent request to fetch the next set of results. If empty, - * all results have been returned. - * @type int $total_size - * The total number of notification channels in all pages. This number is only - * an estimate, and may change in subsequent pages. https://aip.dev/158 - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\NotificationService::initOnce(); - parent::__construct($data); - } - - /** - * The notification channels defined for the specified project. - * - * Generated from protobuf field repeated .google.monitoring.v3.NotificationChannel notification_channels = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNotificationChannels() - { - return $this->notification_channels; - } - - /** - * The notification channels defined for the specified project. - * - * Generated from protobuf field repeated .google.monitoring.v3.NotificationChannel notification_channels = 3; - * @param array<\Google\Cloud\Monitoring\V3\NotificationChannel>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNotificationChannels($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Monitoring\V3\NotificationChannel::class); - $this->notification_channels = $arr; - - return $this; - } - - /** - * If not empty, indicates that there may be more results that match - * the request. Use the value in the `page_token` field in a - * subsequent request to fetch the next set of results. If empty, - * all results have been returned. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * If not empty, indicates that there may be more results that match - * the request. Use the value in the `page_token` field in a - * subsequent request to fetch the next set of results. If empty, - * all results have been returned. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * The total number of notification channels in all pages. This number is only - * an estimate, and may change in subsequent pages. https://aip.dev/158 - * - * Generated from protobuf field int32 total_size = 4; - * @return int - */ - public function getTotalSize() - { - return $this->total_size; - } - - /** - * The total number of notification channels in all pages. This number is only - * an estimate, and may change in subsequent pages. https://aip.dev/158 - * - * Generated from protobuf field int32 total_size = 4; - * @param int $var - * @return $this - */ - public function setTotalSize($var) - { - GPBUtil::checkInt32($var); - $this->total_size = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListServiceLevelObjectivesRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListServiceLevelObjectivesRequest.php deleted file mode 100644 index 19128d58f56f..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListServiceLevelObjectivesRequest.php +++ /dev/null @@ -1,257 +0,0 @@ -google.monitoring.v3.ListServiceLevelObjectivesRequest - */ -class ListServiceLevelObjectivesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource name of the parent containing the listed SLOs, either a - * project or a Monitoring Metrics Scope. The formats are: - * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] - * workspaces/[HOST_PROJECT_ID_OR_NUMBER]/services/- - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * A filter specifying what `ServiceLevelObjective`s to return. - * - * Generated from protobuf field string filter = 2; - */ - protected $filter = ''; - /** - * A non-negative number that is the maximum number of results to return. - * When 0, use default page size. - * - * Generated from protobuf field int32 page_size = 3; - */ - protected $page_size = 0; - /** - * If this field is not empty then it must contain the `nextPageToken` value - * returned by a previous call to this method. Using this field causes the - * method to return additional results from the previous method call. - * - * Generated from protobuf field string page_token = 4; - */ - protected $page_token = ''; - /** - * View of the `ServiceLevelObjective`s to return. If `DEFAULT`, return each - * `ServiceLevelObjective` as originally defined. If `EXPLICIT` and the - * `ServiceLevelObjective` is defined in terms of a `BasicSli`, replace the - * `BasicSli` with a `RequestBasedSli` spelling out how the SLI is computed. - * - * Generated from protobuf field .google.monitoring.v3.ServiceLevelObjective.View view = 5; - */ - protected $view = 0; - - /** - * @param string $parent Required. Resource name of the parent containing the listed SLOs, either a - * project or a Monitoring Metrics Scope. The formats are: - * - * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] - * workspaces/[HOST_PROJECT_ID_OR_NUMBER]/services/- - * Please see {@see ServiceMonitoringServiceClient::serviceName()} for help formatting this field. - * - * @return \Google\Cloud\Monitoring\V3\ListServiceLevelObjectivesRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Resource name of the parent containing the listed SLOs, either a - * project or a Monitoring Metrics Scope. The formats are: - * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] - * workspaces/[HOST_PROJECT_ID_OR_NUMBER]/services/- - * @type string $filter - * A filter specifying what `ServiceLevelObjective`s to return. - * @type int $page_size - * A non-negative number that is the maximum number of results to return. - * When 0, use default page size. - * @type string $page_token - * If this field is not empty then it must contain the `nextPageToken` value - * returned by a previous call to this method. Using this field causes the - * method to return additional results from the previous method call. - * @type int $view - * View of the `ServiceLevelObjective`s to return. If `DEFAULT`, return each - * `ServiceLevelObjective` as originally defined. If `EXPLICIT` and the - * `ServiceLevelObjective` is defined in terms of a `BasicSli`, replace the - * `BasicSli` with a `RequestBasedSli` spelling out how the SLI is computed. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\ServiceService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource name of the parent containing the listed SLOs, either a - * project or a Monitoring Metrics Scope. The formats are: - * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] - * workspaces/[HOST_PROJECT_ID_OR_NUMBER]/services/- - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Resource name of the parent containing the listed SLOs, either a - * project or a Monitoring Metrics Scope. The formats are: - * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] - * workspaces/[HOST_PROJECT_ID_OR_NUMBER]/services/- - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * A filter specifying what `ServiceLevelObjective`s to return. - * - * Generated from protobuf field string filter = 2; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * A filter specifying what `ServiceLevelObjective`s to return. - * - * Generated from protobuf field string filter = 2; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * A non-negative number that is the maximum number of results to return. - * When 0, use default page size. - * - * Generated from protobuf field int32 page_size = 3; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * A non-negative number that is the maximum number of results to return. - * When 0, use default page size. - * - * Generated from protobuf field int32 page_size = 3; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * If this field is not empty then it must contain the `nextPageToken` value - * returned by a previous call to this method. Using this field causes the - * method to return additional results from the previous method call. - * - * Generated from protobuf field string page_token = 4; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * If this field is not empty then it must contain the `nextPageToken` value - * returned by a previous call to this method. Using this field causes the - * method to return additional results from the previous method call. - * - * Generated from protobuf field string page_token = 4; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * View of the `ServiceLevelObjective`s to return. If `DEFAULT`, return each - * `ServiceLevelObjective` as originally defined. If `EXPLICIT` and the - * `ServiceLevelObjective` is defined in terms of a `BasicSli`, replace the - * `BasicSli` with a `RequestBasedSli` spelling out how the SLI is computed. - * - * Generated from protobuf field .google.monitoring.v3.ServiceLevelObjective.View view = 5; - * @return int - */ - public function getView() - { - return $this->view; - } - - /** - * View of the `ServiceLevelObjective`s to return. If `DEFAULT`, return each - * `ServiceLevelObjective` as originally defined. If `EXPLICIT` and the - * `ServiceLevelObjective` is defined in terms of a `BasicSli`, replace the - * `BasicSli` with a `RequestBasedSli` spelling out how the SLI is computed. - * - * Generated from protobuf field .google.monitoring.v3.ServiceLevelObjective.View view = 5; - * @param int $var - * @return $this - */ - public function setView($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Monitoring\V3\ServiceLevelObjective\View::class); - $this->view = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListServiceLevelObjectivesResponse.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListServiceLevelObjectivesResponse.php deleted file mode 100644 index 8e9d2ead1abf..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListServiceLevelObjectivesResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -google.monitoring.v3.ListServiceLevelObjectivesResponse - */ -class ListServiceLevelObjectivesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The `ServiceLevelObjective`s matching the specified filter. - * - * Generated from protobuf field repeated .google.monitoring.v3.ServiceLevelObjective service_level_objectives = 1; - */ - private $service_level_objectives; - /** - * If there are more results than have been returned, then this field is set - * to a non-empty value. To see the additional results, - * use that value as `page_token` in the next call to this method. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Monitoring\V3\ServiceLevelObjective>|\Google\Protobuf\Internal\RepeatedField $service_level_objectives - * The `ServiceLevelObjective`s matching the specified filter. - * @type string $next_page_token - * If there are more results than have been returned, then this field is set - * to a non-empty value. To see the additional results, - * use that value as `page_token` in the next call to this method. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\ServiceService::initOnce(); - parent::__construct($data); - } - - /** - * The `ServiceLevelObjective`s matching the specified filter. - * - * Generated from protobuf field repeated .google.monitoring.v3.ServiceLevelObjective service_level_objectives = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getServiceLevelObjectives() - { - return $this->service_level_objectives; - } - - /** - * The `ServiceLevelObjective`s matching the specified filter. - * - * Generated from protobuf field repeated .google.monitoring.v3.ServiceLevelObjective service_level_objectives = 1; - * @param array<\Google\Cloud\Monitoring\V3\ServiceLevelObjective>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setServiceLevelObjectives($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Monitoring\V3\ServiceLevelObjective::class); - $this->service_level_objectives = $arr; - - return $this; - } - - /** - * If there are more results than have been returned, then this field is set - * to a non-empty value. To see the additional results, - * use that value as `page_token` in the next call to this method. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * If there are more results than have been returned, then this field is set - * to a non-empty value. To see the additional results, - * use that value as `page_token` in the next call to this method. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListServicesRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListServicesRequest.php deleted file mode 100644 index 795a4e8e34eb..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListServicesRequest.php +++ /dev/null @@ -1,275 +0,0 @@ -google.monitoring.v3.ListServicesRequest - */ -class ListServicesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource name of the parent containing the listed services, - * either a [project](https://cloud.google.com/monitoring/api/v3#project_name) - * or a Monitoring Metrics Scope. The formats are: - * projects/[PROJECT_ID_OR_NUMBER] - * workspaces/[HOST_PROJECT_ID_OR_NUMBER] - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * A filter specifying what `Service`s to return. The filter supports - * filtering on a particular service-identifier type or one of its attributes. - * To filter on a particular service-identifier type, the `identifier_case` - * refers to which option in the `identifier` field is populated. For example, - * the filter `identifier_case = "CUSTOM"` would match all services with a - * value for the `custom` field. Valid options include "CUSTOM", "APP_ENGINE", - * "MESH_ISTIO", and the other options listed at - * https://cloud.google.com/monitoring/api/ref_v3/rest/v3/services#Service - * To filter on an attribute of a service-identifier type, apply the filter - * name by using the snake case of the service-identifier type and the - * attribute of that service-identifier type, and join the two with a period. - * For example, to filter by the `meshUid` field of the `MeshIstio` - * service-identifier type, you must filter on `mesh_istio.mesh_uid = - * "123"` to match all services with mesh UID "123". Service-identifier types - * and their attributes are described at - * https://cloud.google.com/monitoring/api/ref_v3/rest/v3/services#Service - * - * Generated from protobuf field string filter = 2; - */ - protected $filter = ''; - /** - * A non-negative number that is the maximum number of results to return. - * When 0, use default page size. - * - * Generated from protobuf field int32 page_size = 3; - */ - protected $page_size = 0; - /** - * If this field is not empty then it must contain the `nextPageToken` value - * returned by a previous call to this method. Using this field causes the - * method to return additional results from the previous method call. - * - * Generated from protobuf field string page_token = 4; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. Resource name of the parent containing the listed services, - * either a [project](https://cloud.google.com/monitoring/api/v3#project_name) - * or a Monitoring Metrics Scope. The formats are: - * - * projects/[PROJECT_ID_OR_NUMBER] - * workspaces/[HOST_PROJECT_ID_OR_NUMBER] - * - * @return \Google\Cloud\Monitoring\V3\ListServicesRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Resource name of the parent containing the listed services, - * either a [project](https://cloud.google.com/monitoring/api/v3#project_name) - * or a Monitoring Metrics Scope. The formats are: - * projects/[PROJECT_ID_OR_NUMBER] - * workspaces/[HOST_PROJECT_ID_OR_NUMBER] - * @type string $filter - * A filter specifying what `Service`s to return. The filter supports - * filtering on a particular service-identifier type or one of its attributes. - * To filter on a particular service-identifier type, the `identifier_case` - * refers to which option in the `identifier` field is populated. For example, - * the filter `identifier_case = "CUSTOM"` would match all services with a - * value for the `custom` field. Valid options include "CUSTOM", "APP_ENGINE", - * "MESH_ISTIO", and the other options listed at - * https://cloud.google.com/monitoring/api/ref_v3/rest/v3/services#Service - * To filter on an attribute of a service-identifier type, apply the filter - * name by using the snake case of the service-identifier type and the - * attribute of that service-identifier type, and join the two with a period. - * For example, to filter by the `meshUid` field of the `MeshIstio` - * service-identifier type, you must filter on `mesh_istio.mesh_uid = - * "123"` to match all services with mesh UID "123". Service-identifier types - * and their attributes are described at - * https://cloud.google.com/monitoring/api/ref_v3/rest/v3/services#Service - * @type int $page_size - * A non-negative number that is the maximum number of results to return. - * When 0, use default page size. - * @type string $page_token - * If this field is not empty then it must contain the `nextPageToken` value - * returned by a previous call to this method. Using this field causes the - * method to return additional results from the previous method call. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\ServiceService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource name of the parent containing the listed services, - * either a [project](https://cloud.google.com/monitoring/api/v3#project_name) - * or a Monitoring Metrics Scope. The formats are: - * projects/[PROJECT_ID_OR_NUMBER] - * workspaces/[HOST_PROJECT_ID_OR_NUMBER] - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Resource name of the parent containing the listed services, - * either a [project](https://cloud.google.com/monitoring/api/v3#project_name) - * or a Monitoring Metrics Scope. The formats are: - * projects/[PROJECT_ID_OR_NUMBER] - * workspaces/[HOST_PROJECT_ID_OR_NUMBER] - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * A filter specifying what `Service`s to return. The filter supports - * filtering on a particular service-identifier type or one of its attributes. - * To filter on a particular service-identifier type, the `identifier_case` - * refers to which option in the `identifier` field is populated. For example, - * the filter `identifier_case = "CUSTOM"` would match all services with a - * value for the `custom` field. Valid options include "CUSTOM", "APP_ENGINE", - * "MESH_ISTIO", and the other options listed at - * https://cloud.google.com/monitoring/api/ref_v3/rest/v3/services#Service - * To filter on an attribute of a service-identifier type, apply the filter - * name by using the snake case of the service-identifier type and the - * attribute of that service-identifier type, and join the two with a period. - * For example, to filter by the `meshUid` field of the `MeshIstio` - * service-identifier type, you must filter on `mesh_istio.mesh_uid = - * "123"` to match all services with mesh UID "123". Service-identifier types - * and their attributes are described at - * https://cloud.google.com/monitoring/api/ref_v3/rest/v3/services#Service - * - * Generated from protobuf field string filter = 2; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * A filter specifying what `Service`s to return. The filter supports - * filtering on a particular service-identifier type or one of its attributes. - * To filter on a particular service-identifier type, the `identifier_case` - * refers to which option in the `identifier` field is populated. For example, - * the filter `identifier_case = "CUSTOM"` would match all services with a - * value for the `custom` field. Valid options include "CUSTOM", "APP_ENGINE", - * "MESH_ISTIO", and the other options listed at - * https://cloud.google.com/monitoring/api/ref_v3/rest/v3/services#Service - * To filter on an attribute of a service-identifier type, apply the filter - * name by using the snake case of the service-identifier type and the - * attribute of that service-identifier type, and join the two with a period. - * For example, to filter by the `meshUid` field of the `MeshIstio` - * service-identifier type, you must filter on `mesh_istio.mesh_uid = - * "123"` to match all services with mesh UID "123". Service-identifier types - * and their attributes are described at - * https://cloud.google.com/monitoring/api/ref_v3/rest/v3/services#Service - * - * Generated from protobuf field string filter = 2; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * A non-negative number that is the maximum number of results to return. - * When 0, use default page size. - * - * Generated from protobuf field int32 page_size = 3; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * A non-negative number that is the maximum number of results to return. - * When 0, use default page size. - * - * Generated from protobuf field int32 page_size = 3; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * If this field is not empty then it must contain the `nextPageToken` value - * returned by a previous call to this method. Using this field causes the - * method to return additional results from the previous method call. - * - * Generated from protobuf field string page_token = 4; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * If this field is not empty then it must contain the `nextPageToken` value - * returned by a previous call to this method. Using this field causes the - * method to return additional results from the previous method call. - * - * Generated from protobuf field string page_token = 4; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListServicesResponse.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListServicesResponse.php deleted file mode 100644 index 4359a2689b2e..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListServicesResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -google.monitoring.v3.ListServicesResponse - */ -class ListServicesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The `Service`s matching the specified filter. - * - * Generated from protobuf field repeated .google.monitoring.v3.Service services = 1; - */ - private $services; - /** - * If there are more results than have been returned, then this field is set - * to a non-empty value. To see the additional results, - * use that value as `page_token` in the next call to this method. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Monitoring\V3\Service>|\Google\Protobuf\Internal\RepeatedField $services - * The `Service`s matching the specified filter. - * @type string $next_page_token - * If there are more results than have been returned, then this field is set - * to a non-empty value. To see the additional results, - * use that value as `page_token` in the next call to this method. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\ServiceService::initOnce(); - parent::__construct($data); - } - - /** - * The `Service`s matching the specified filter. - * - * Generated from protobuf field repeated .google.monitoring.v3.Service services = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getServices() - { - return $this->services; - } - - /** - * The `Service`s matching the specified filter. - * - * Generated from protobuf field repeated .google.monitoring.v3.Service services = 1; - * @param array<\Google\Cloud\Monitoring\V3\Service>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setServices($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Monitoring\V3\Service::class); - $this->services = $arr; - - return $this; - } - - /** - * If there are more results than have been returned, then this field is set - * to a non-empty value. To see the additional results, - * use that value as `page_token` in the next call to this method. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * If there are more results than have been returned, then this field is set - * to a non-empty value. To see the additional results, - * use that value as `page_token` in the next call to this method. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListSnoozesRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListSnoozesRequest.php deleted file mode 100644 index ff92a8e233fa..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListSnoozesRequest.php +++ /dev/null @@ -1,252 +0,0 @@ -google.monitoring.v3.ListSnoozesRequest - */ -class ListSnoozesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The - * [project](https://cloud.google.com/monitoring/api/v3#project_name) whose - * `Snooze`s should be listed. The format is: - * projects/[PROJECT_ID_OR_NUMBER] - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Optional filter to restrict results to the given criteria. The - * following fields are supported. - * * `interval.start_time` - * * `interval.end_time` - * For example: - * ``` - * interval.start_time > "2022-03-11T00:00:00-08:00" AND - * interval.end_time < "2022-03-12T00:00:00-08:00" - * ``` - * - * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. The maximum number of results to return for a single query. The - * server may further constrain the maximum number of results returned in a - * single page. The value should be in the range [1, 1000]. If the value given - * is outside this range, the server will decide the number of results to be - * returned. - * - * Generated from protobuf field int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. The `next_page_token` from a previous call to - * `ListSnoozesRequest` to get the next page of results. - * - * Generated from protobuf field string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The - * [project](https://cloud.google.com/monitoring/api/v3#project_name) whose - * `Snooze`s should be listed. The format is: - * - * projects/[PROJECT_ID_OR_NUMBER] - * Please see {@see SnoozeServiceClient::workspaceName()} for help formatting this field. - * - * @return \Google\Cloud\Monitoring\V3\ListSnoozesRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The - * [project](https://cloud.google.com/monitoring/api/v3#project_name) whose - * `Snooze`s should be listed. The format is: - * projects/[PROJECT_ID_OR_NUMBER] - * @type string $filter - * Optional. Optional filter to restrict results to the given criteria. The - * following fields are supported. - * * `interval.start_time` - * * `interval.end_time` - * For example: - * ``` - * interval.start_time > "2022-03-11T00:00:00-08:00" AND - * interval.end_time < "2022-03-12T00:00:00-08:00" - * ``` - * @type int $page_size - * Optional. The maximum number of results to return for a single query. The - * server may further constrain the maximum number of results returned in a - * single page. The value should be in the range [1, 1000]. If the value given - * is outside this range, the server will decide the number of results to be - * returned. - * @type string $page_token - * Optional. The `next_page_token` from a previous call to - * `ListSnoozesRequest` to get the next page of results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\SnoozeService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The - * [project](https://cloud.google.com/monitoring/api/v3#project_name) whose - * `Snooze`s should be listed. The format is: - * projects/[PROJECT_ID_OR_NUMBER] - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The - * [project](https://cloud.google.com/monitoring/api/v3#project_name) whose - * `Snooze`s should be listed. The format is: - * projects/[PROJECT_ID_OR_NUMBER] - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. Optional filter to restrict results to the given criteria. The - * following fields are supported. - * * `interval.start_time` - * * `interval.end_time` - * For example: - * ``` - * interval.start_time > "2022-03-11T00:00:00-08:00" AND - * interval.end_time < "2022-03-12T00:00:00-08:00" - * ``` - * - * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. Optional filter to restrict results to the given criteria. The - * following fields are supported. - * * `interval.start_time` - * * `interval.end_time` - * For example: - * ``` - * interval.start_time > "2022-03-11T00:00:00-08:00" AND - * interval.end_time < "2022-03-12T00:00:00-08:00" - * ``` - * - * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Optional. The maximum number of results to return for a single query. The - * server may further constrain the maximum number of results returned in a - * single page. The value should be in the range [1, 1000]. If the value given - * is outside this range, the server will decide the number of results to be - * returned. - * - * Generated from protobuf field int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of results to return for a single query. The - * server may further constrain the maximum number of results returned in a - * single page. The value should be in the range [1, 1000]. If the value given - * is outside this range, the server will decide the number of results to be - * returned. - * - * Generated from protobuf field int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. The `next_page_token` from a previous call to - * `ListSnoozesRequest` to get the next page of results. - * - * Generated from protobuf field string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. The `next_page_token` from a previous call to - * `ListSnoozesRequest` to get the next page of results. - * - * Generated from protobuf field string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListSnoozesResponse.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListSnoozesResponse.php deleted file mode 100644 index e22e8db840ef..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListSnoozesResponse.php +++ /dev/null @@ -1,106 +0,0 @@ -google.monitoring.v3.ListSnoozesResponse - */ -class ListSnoozesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * `Snooze`s matching this list call. - * - * Generated from protobuf field repeated .google.monitoring.v3.Snooze snoozes = 1; - */ - private $snoozes; - /** - * Page token for repeated calls to `ListSnoozes`, to fetch additional pages - * of results. If this is empty or missing, there are no more pages. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Monitoring\V3\Snooze>|\Google\Protobuf\Internal\RepeatedField $snoozes - * `Snooze`s matching this list call. - * @type string $next_page_token - * Page token for repeated calls to `ListSnoozes`, to fetch additional pages - * of results. If this is empty or missing, there are no more pages. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\SnoozeService::initOnce(); - parent::__construct($data); - } - - /** - * `Snooze`s matching this list call. - * - * Generated from protobuf field repeated .google.monitoring.v3.Snooze snoozes = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSnoozes() - { - return $this->snoozes; - } - - /** - * `Snooze`s matching this list call. - * - * Generated from protobuf field repeated .google.monitoring.v3.Snooze snoozes = 1; - * @param array<\Google\Cloud\Monitoring\V3\Snooze>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSnoozes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Monitoring\V3\Snooze::class); - $this->snoozes = $arr; - - return $this; - } - - /** - * Page token for repeated calls to `ListSnoozes`, to fetch additional pages - * of results. If this is empty or missing, there are no more pages. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Page token for repeated calls to `ListSnoozes`, to fetch additional pages - * of results. If this is empty or missing, there are no more pages. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListTimeSeriesRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListTimeSeriesRequest.php deleted file mode 100644 index 0b123db098c9..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListTimeSeriesRequest.php +++ /dev/null @@ -1,501 +0,0 @@ -google.monitoring.v3.ListTimeSeriesRequest - */ -class ListTimeSeriesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The - * [project](https://cloud.google.com/monitoring/api/v3#project_name), - * organization or folder on which to execute the request. The format is: - * projects/[PROJECT_ID_OR_NUMBER] - * organizations/[ORGANIZATION_ID] - * folders/[FOLDER_ID] - * - * Generated from protobuf field string name = 10 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. A [monitoring - * filter](https://cloud.google.com/monitoring/api/v3/filters) that specifies - * which time series should be returned. The filter must specify a single - * metric type, and can additionally specify metric labels and other - * information. For example: - * metric.type = "compute.googleapis.com/instance/cpu/usage_time" AND - * metric.labels.instance_name = "my-instance-name" - * - * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $filter = ''; - /** - * Required. The time interval for which results should be returned. Only time - * series that contain data points in the specified interval are included in - * the response. - * - * Generated from protobuf field .google.monitoring.v3.TimeInterval interval = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $interval = null; - /** - * Specifies the alignment of data points in individual time series as - * well as how to combine the retrieved time series across specified labels. - * By default (if no `aggregation` is explicitly specified), the raw time - * series data is returned. - * - * Generated from protobuf field .google.monitoring.v3.Aggregation aggregation = 5; - */ - protected $aggregation = null; - /** - * Apply a second aggregation after `aggregation` is applied. May only be - * specified if `aggregation` is specified. - * - * Generated from protobuf field .google.monitoring.v3.Aggregation secondary_aggregation = 11; - */ - protected $secondary_aggregation = null; - /** - * Unsupported: must be left blank. The points in each time series are - * currently returned in reverse time order (most recent to oldest). - * - * Generated from protobuf field string order_by = 6; - */ - protected $order_by = ''; - /** - * Required. Specifies which information is returned about the time series. - * - * Generated from protobuf field .google.monitoring.v3.ListTimeSeriesRequest.TimeSeriesView view = 7 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $view = 0; - /** - * A positive number that is the maximum number of results to return. If - * `page_size` is empty or more than 100,000 results, the effective - * `page_size` is 100,000 results. If `view` is set to `FULL`, this is the - * maximum number of `Points` returned. If `view` is set to `HEADERS`, this is - * the maximum number of `TimeSeries` returned. - * - * Generated from protobuf field int32 page_size = 8; - */ - protected $page_size = 0; - /** - * If this field is not empty then it must contain the `nextPageToken` value - * returned by a previous call to this method. Using this field causes the - * method to return additional results from the previous method call. - * - * Generated from protobuf field string page_token = 9; - */ - protected $page_token = ''; - - /** - * @param string $name Required. The - * [project](https://cloud.google.com/monitoring/api/v3#project_name), - * organization or folder on which to execute the request. The format is: - * - * projects/[PROJECT_ID_OR_NUMBER] - * organizations/[ORGANIZATION_ID] - * folders/[FOLDER_ID] - * Please see {@see MetricServiceClient::workspaceName()} for help formatting this field. - * @param string $filter Required. A [monitoring - * filter](https://cloud.google.com/monitoring/api/v3/filters) that specifies - * which time series should be returned. The filter must specify a single - * metric type, and can additionally specify metric labels and other - * information. For example: - * - * metric.type = "compute.googleapis.com/instance/cpu/usage_time" AND - * metric.labels.instance_name = "my-instance-name" - * @param \Google\Cloud\Monitoring\V3\TimeInterval $interval Required. The time interval for which results should be returned. Only time - * series that contain data points in the specified interval are included in - * the response. - * @param int $view Required. Specifies which information is returned about the time series. - * For allowed values, use constants defined on {@see \Google\Cloud\Monitoring\V3\ListTimeSeriesRequest\TimeSeriesView} - * - * @return \Google\Cloud\Monitoring\V3\ListTimeSeriesRequest - * - * @experimental - */ - public static function build(string $name, string $filter, \Google\Cloud\Monitoring\V3\TimeInterval $interval, int $view): self - { - return (new self()) - ->setName($name) - ->setFilter($filter) - ->setInterval($interval) - ->setView($view); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The - * [project](https://cloud.google.com/monitoring/api/v3#project_name), - * organization or folder on which to execute the request. The format is: - * projects/[PROJECT_ID_OR_NUMBER] - * organizations/[ORGANIZATION_ID] - * folders/[FOLDER_ID] - * @type string $filter - * Required. A [monitoring - * filter](https://cloud.google.com/monitoring/api/v3/filters) that specifies - * which time series should be returned. The filter must specify a single - * metric type, and can additionally specify metric labels and other - * information. For example: - * metric.type = "compute.googleapis.com/instance/cpu/usage_time" AND - * metric.labels.instance_name = "my-instance-name" - * @type \Google\Cloud\Monitoring\V3\TimeInterval $interval - * Required. The time interval for which results should be returned. Only time - * series that contain data points in the specified interval are included in - * the response. - * @type \Google\Cloud\Monitoring\V3\Aggregation $aggregation - * Specifies the alignment of data points in individual time series as - * well as how to combine the retrieved time series across specified labels. - * By default (if no `aggregation` is explicitly specified), the raw time - * series data is returned. - * @type \Google\Cloud\Monitoring\V3\Aggregation $secondary_aggregation - * Apply a second aggregation after `aggregation` is applied. May only be - * specified if `aggregation` is specified. - * @type string $order_by - * Unsupported: must be left blank. The points in each time series are - * currently returned in reverse time order (most recent to oldest). - * @type int $view - * Required. Specifies which information is returned about the time series. - * @type int $page_size - * A positive number that is the maximum number of results to return. If - * `page_size` is empty or more than 100,000 results, the effective - * `page_size` is 100,000 results. If `view` is set to `FULL`, this is the - * maximum number of `Points` returned. If `view` is set to `HEADERS`, this is - * the maximum number of `TimeSeries` returned. - * @type string $page_token - * If this field is not empty then it must contain the `nextPageToken` value - * returned by a previous call to this method. Using this field causes the - * method to return additional results from the previous method call. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\MetricService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The - * [project](https://cloud.google.com/monitoring/api/v3#project_name), - * organization or folder on which to execute the request. The format is: - * projects/[PROJECT_ID_OR_NUMBER] - * organizations/[ORGANIZATION_ID] - * folders/[FOLDER_ID] - * - * Generated from protobuf field string name = 10 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The - * [project](https://cloud.google.com/monitoring/api/v3#project_name), - * organization or folder on which to execute the request. The format is: - * projects/[PROJECT_ID_OR_NUMBER] - * organizations/[ORGANIZATION_ID] - * folders/[FOLDER_ID] - * - * Generated from protobuf field string name = 10 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. A [monitoring - * filter](https://cloud.google.com/monitoring/api/v3/filters) that specifies - * which time series should be returned. The filter must specify a single - * metric type, and can additionally specify metric labels and other - * information. For example: - * metric.type = "compute.googleapis.com/instance/cpu/usage_time" AND - * metric.labels.instance_name = "my-instance-name" - * - * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Required. A [monitoring - * filter](https://cloud.google.com/monitoring/api/v3/filters) that specifies - * which time series should be returned. The filter must specify a single - * metric type, and can additionally specify metric labels and other - * information. For example: - * metric.type = "compute.googleapis.com/instance/cpu/usage_time" AND - * metric.labels.instance_name = "my-instance-name" - * - * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Required. The time interval for which results should be returned. Only time - * series that contain data points in the specified interval are included in - * the response. - * - * Generated from protobuf field .google.monitoring.v3.TimeInterval interval = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Monitoring\V3\TimeInterval|null - */ - public function getInterval() - { - return $this->interval; - } - - public function hasInterval() - { - return isset($this->interval); - } - - public function clearInterval() - { - unset($this->interval); - } - - /** - * Required. The time interval for which results should be returned. Only time - * series that contain data points in the specified interval are included in - * the response. - * - * Generated from protobuf field .google.monitoring.v3.TimeInterval interval = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Monitoring\V3\TimeInterval $var - * @return $this - */ - public function setInterval($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\TimeInterval::class); - $this->interval = $var; - - return $this; - } - - /** - * Specifies the alignment of data points in individual time series as - * well as how to combine the retrieved time series across specified labels. - * By default (if no `aggregation` is explicitly specified), the raw time - * series data is returned. - * - * Generated from protobuf field .google.monitoring.v3.Aggregation aggregation = 5; - * @return \Google\Cloud\Monitoring\V3\Aggregation|null - */ - public function getAggregation() - { - return $this->aggregation; - } - - public function hasAggregation() - { - return isset($this->aggregation); - } - - public function clearAggregation() - { - unset($this->aggregation); - } - - /** - * Specifies the alignment of data points in individual time series as - * well as how to combine the retrieved time series across specified labels. - * By default (if no `aggregation` is explicitly specified), the raw time - * series data is returned. - * - * Generated from protobuf field .google.monitoring.v3.Aggregation aggregation = 5; - * @param \Google\Cloud\Monitoring\V3\Aggregation $var - * @return $this - */ - public function setAggregation($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\Aggregation::class); - $this->aggregation = $var; - - return $this; - } - - /** - * Apply a second aggregation after `aggregation` is applied. May only be - * specified if `aggregation` is specified. - * - * Generated from protobuf field .google.monitoring.v3.Aggregation secondary_aggregation = 11; - * @return \Google\Cloud\Monitoring\V3\Aggregation|null - */ - public function getSecondaryAggregation() - { - return $this->secondary_aggregation; - } - - public function hasSecondaryAggregation() - { - return isset($this->secondary_aggregation); - } - - public function clearSecondaryAggregation() - { - unset($this->secondary_aggregation); - } - - /** - * Apply a second aggregation after `aggregation` is applied. May only be - * specified if `aggregation` is specified. - * - * Generated from protobuf field .google.monitoring.v3.Aggregation secondary_aggregation = 11; - * @param \Google\Cloud\Monitoring\V3\Aggregation $var - * @return $this - */ - public function setSecondaryAggregation($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\Aggregation::class); - $this->secondary_aggregation = $var; - - return $this; - } - - /** - * Unsupported: must be left blank. The points in each time series are - * currently returned in reverse time order (most recent to oldest). - * - * Generated from protobuf field string order_by = 6; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Unsupported: must be left blank. The points in each time series are - * currently returned in reverse time order (most recent to oldest). - * - * Generated from protobuf field string order_by = 6; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - - /** - * Required. Specifies which information is returned about the time series. - * - * Generated from protobuf field .google.monitoring.v3.ListTimeSeriesRequest.TimeSeriesView view = 7 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getView() - { - return $this->view; - } - - /** - * Required. Specifies which information is returned about the time series. - * - * Generated from protobuf field .google.monitoring.v3.ListTimeSeriesRequest.TimeSeriesView view = 7 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setView($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Monitoring\V3\ListTimeSeriesRequest\TimeSeriesView::class); - $this->view = $var; - - return $this; - } - - /** - * A positive number that is the maximum number of results to return. If - * `page_size` is empty or more than 100,000 results, the effective - * `page_size` is 100,000 results. If `view` is set to `FULL`, this is the - * maximum number of `Points` returned. If `view` is set to `HEADERS`, this is - * the maximum number of `TimeSeries` returned. - * - * Generated from protobuf field int32 page_size = 8; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * A positive number that is the maximum number of results to return. If - * `page_size` is empty or more than 100,000 results, the effective - * `page_size` is 100,000 results. If `view` is set to `FULL`, this is the - * maximum number of `Points` returned. If `view` is set to `HEADERS`, this is - * the maximum number of `TimeSeries` returned. - * - * Generated from protobuf field int32 page_size = 8; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * If this field is not empty then it must contain the `nextPageToken` value - * returned by a previous call to this method. Using this field causes the - * method to return additional results from the previous method call. - * - * Generated from protobuf field string page_token = 9; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * If this field is not empty then it must contain the `nextPageToken` value - * returned by a previous call to this method. Using this field causes the - * method to return additional results from the previous method call. - * - * Generated from protobuf field string page_token = 9; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListTimeSeriesRequest/TimeSeriesView.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListTimeSeriesRequest/TimeSeriesView.php deleted file mode 100644 index cd4d2c1bcc55..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListTimeSeriesRequest/TimeSeriesView.php +++ /dev/null @@ -1,59 +0,0 @@ -google.monitoring.v3.ListTimeSeriesRequest.TimeSeriesView - */ -class TimeSeriesView -{ - /** - * Returns the identity of the metric(s), the time series, - * and the time series data. - * - * Generated from protobuf enum FULL = 0; - */ - const FULL = 0; - /** - * Returns the identity of the metric and the time series resource, - * but not the time series data. - * - * Generated from protobuf enum HEADERS = 1; - */ - const HEADERS = 1; - - private static $valueToName = [ - self::FULL => 'FULL', - self::HEADERS => 'HEADERS', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(TimeSeriesView::class, \Google\Cloud\Monitoring\V3\ListTimeSeriesRequest_TimeSeriesView::class); - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListTimeSeriesResponse.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListTimeSeriesResponse.php deleted file mode 100644 index f2d874bd3478..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListTimeSeriesResponse.php +++ /dev/null @@ -1,201 +0,0 @@ -google.monitoring.v3.ListTimeSeriesResponse - */ -class ListTimeSeriesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * One or more time series that match the filter included in the request. - * - * Generated from protobuf field repeated .google.monitoring.v3.TimeSeries time_series = 1; - */ - private $time_series; - /** - * If there are more results than have been returned, then this field is set - * to a non-empty value. To see the additional results, - * use that value as `page_token` in the next call to this method. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Query execution errors that may have caused the time series data returned - * to be incomplete. - * - * Generated from protobuf field repeated .google.rpc.Status execution_errors = 3; - */ - private $execution_errors; - /** - * The unit in which all `time_series` point values are reported. `unit` - * follows the UCUM format for units as seen in - * https://unitsofmeasure.org/ucum.html. - * If different `time_series` have different units (for example, because they - * come from different metric types, or a unit is absent), then `unit` will be - * "{not_a_unit}". - * - * Generated from protobuf field string unit = 5; - */ - protected $unit = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Monitoring\V3\TimeSeries>|\Google\Protobuf\Internal\RepeatedField $time_series - * One or more time series that match the filter included in the request. - * @type string $next_page_token - * If there are more results than have been returned, then this field is set - * to a non-empty value. To see the additional results, - * use that value as `page_token` in the next call to this method. - * @type array<\Google\Rpc\Status>|\Google\Protobuf\Internal\RepeatedField $execution_errors - * Query execution errors that may have caused the time series data returned - * to be incomplete. - * @type string $unit - * The unit in which all `time_series` point values are reported. `unit` - * follows the UCUM format for units as seen in - * https://unitsofmeasure.org/ucum.html. - * If different `time_series` have different units (for example, because they - * come from different metric types, or a unit is absent), then `unit` will be - * "{not_a_unit}". - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\MetricService::initOnce(); - parent::__construct($data); - } - - /** - * One or more time series that match the filter included in the request. - * - * Generated from protobuf field repeated .google.monitoring.v3.TimeSeries time_series = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTimeSeries() - { - return $this->time_series; - } - - /** - * One or more time series that match the filter included in the request. - * - * Generated from protobuf field repeated .google.monitoring.v3.TimeSeries time_series = 1; - * @param array<\Google\Cloud\Monitoring\V3\TimeSeries>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTimeSeries($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Monitoring\V3\TimeSeries::class); - $this->time_series = $arr; - - return $this; - } - - /** - * If there are more results than have been returned, then this field is set - * to a non-empty value. To see the additional results, - * use that value as `page_token` in the next call to this method. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * If there are more results than have been returned, then this field is set - * to a non-empty value. To see the additional results, - * use that value as `page_token` in the next call to this method. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Query execution errors that may have caused the time series data returned - * to be incomplete. - * - * Generated from protobuf field repeated .google.rpc.Status execution_errors = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getExecutionErrors() - { - return $this->execution_errors; - } - - /** - * Query execution errors that may have caused the time series data returned - * to be incomplete. - * - * Generated from protobuf field repeated .google.rpc.Status execution_errors = 3; - * @param array<\Google\Rpc\Status>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setExecutionErrors($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Rpc\Status::class); - $this->execution_errors = $arr; - - return $this; - } - - /** - * The unit in which all `time_series` point values are reported. `unit` - * follows the UCUM format for units as seen in - * https://unitsofmeasure.org/ucum.html. - * If different `time_series` have different units (for example, because they - * come from different metric types, or a unit is absent), then `unit` will be - * "{not_a_unit}". - * - * Generated from protobuf field string unit = 5; - * @return string - */ - public function getUnit() - { - return $this->unit; - } - - /** - * The unit in which all `time_series` point values are reported. `unit` - * follows the UCUM format for units as seen in - * https://unitsofmeasure.org/ucum.html. - * If different `time_series` have different units (for example, because they - * come from different metric types, or a unit is absent), then `unit` will be - * "{not_a_unit}". - * - * Generated from protobuf field string unit = 5; - * @param string $var - * @return $this - */ - public function setUnit($var) - { - GPBUtil::checkString($var, True); - $this->unit = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListUptimeCheckConfigsRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListUptimeCheckConfigsRequest.php deleted file mode 100644 index 0718e498334a..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListUptimeCheckConfigsRequest.php +++ /dev/null @@ -1,230 +0,0 @@ -google.monitoring.v3.ListUptimeCheckConfigsRequest - */ -class ListUptimeCheckConfigsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The - * [project](https://cloud.google.com/monitoring/api/v3#project_name) whose - * Uptime check configurations are listed. The format is: - * projects/[PROJECT_ID_OR_NUMBER] - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * If provided, this field specifies the criteria that must be met by - * uptime checks to be included in the response. - * For more details, see [Filtering - * syntax](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering#filter_syntax). - * - * Generated from protobuf field string filter = 2; - */ - protected $filter = ''; - /** - * The maximum number of results to return in a single response. The server - * may further constrain the maximum number of results returned in a single - * page. If the page_size is <=0, the server will decide the number of results - * to be returned. - * - * Generated from protobuf field int32 page_size = 3; - */ - protected $page_size = 0; - /** - * If this field is not empty then it must contain the `nextPageToken` value - * returned by a previous call to this method. Using this field causes the - * method to return more results from the previous method call. - * - * Generated from protobuf field string page_token = 4; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The - * [project](https://cloud.google.com/monitoring/api/v3#project_name) whose - * Uptime check configurations are listed. The format is: - * - * projects/[PROJECT_ID_OR_NUMBER] - * - * @return \Google\Cloud\Monitoring\V3\ListUptimeCheckConfigsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The - * [project](https://cloud.google.com/monitoring/api/v3#project_name) whose - * Uptime check configurations are listed. The format is: - * projects/[PROJECT_ID_OR_NUMBER] - * @type string $filter - * If provided, this field specifies the criteria that must be met by - * uptime checks to be included in the response. - * For more details, see [Filtering - * syntax](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering#filter_syntax). - * @type int $page_size - * The maximum number of results to return in a single response. The server - * may further constrain the maximum number of results returned in a single - * page. If the page_size is <=0, the server will decide the number of results - * to be returned. - * @type string $page_token - * If this field is not empty then it must contain the `nextPageToken` value - * returned by a previous call to this method. Using this field causes the - * method to return more results from the previous method call. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\UptimeService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The - * [project](https://cloud.google.com/monitoring/api/v3#project_name) whose - * Uptime check configurations are listed. The format is: - * projects/[PROJECT_ID_OR_NUMBER] - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The - * [project](https://cloud.google.com/monitoring/api/v3#project_name) whose - * Uptime check configurations are listed. The format is: - * projects/[PROJECT_ID_OR_NUMBER] - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * If provided, this field specifies the criteria that must be met by - * uptime checks to be included in the response. - * For more details, see [Filtering - * syntax](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering#filter_syntax). - * - * Generated from protobuf field string filter = 2; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * If provided, this field specifies the criteria that must be met by - * uptime checks to be included in the response. - * For more details, see [Filtering - * syntax](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering#filter_syntax). - * - * Generated from protobuf field string filter = 2; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * The maximum number of results to return in a single response. The server - * may further constrain the maximum number of results returned in a single - * page. If the page_size is <=0, the server will decide the number of results - * to be returned. - * - * Generated from protobuf field int32 page_size = 3; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of results to return in a single response. The server - * may further constrain the maximum number of results returned in a single - * page. If the page_size is <=0, the server will decide the number of results - * to be returned. - * - * Generated from protobuf field int32 page_size = 3; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * If this field is not empty then it must contain the `nextPageToken` value - * returned by a previous call to this method. Using this field causes the - * method to return more results from the previous method call. - * - * Generated from protobuf field string page_token = 4; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * If this field is not empty then it must contain the `nextPageToken` value - * returned by a previous call to this method. Using this field causes the - * method to return more results from the previous method call. - * - * Generated from protobuf field string page_token = 4; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListUptimeCheckConfigsResponse.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListUptimeCheckConfigsResponse.php deleted file mode 100644 index f12354762fe7..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListUptimeCheckConfigsResponse.php +++ /dev/null @@ -1,155 +0,0 @@ -google.monitoring.v3.ListUptimeCheckConfigsResponse - */ -class ListUptimeCheckConfigsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The returned Uptime check configurations. - * - * Generated from protobuf field repeated .google.monitoring.v3.UptimeCheckConfig uptime_check_configs = 1; - */ - private $uptime_check_configs; - /** - * This field represents the pagination token to retrieve the next page of - * results. If the value is empty, it means no further results for the - * request. To retrieve the next page of results, the value of the - * next_page_token is passed to the subsequent List method call (in the - * request message's page_token field). - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * The total number of Uptime check configurations for the project, - * irrespective of any pagination. - * - * Generated from protobuf field int32 total_size = 3; - */ - protected $total_size = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Monitoring\V3\UptimeCheckConfig>|\Google\Protobuf\Internal\RepeatedField $uptime_check_configs - * The returned Uptime check configurations. - * @type string $next_page_token - * This field represents the pagination token to retrieve the next page of - * results. If the value is empty, it means no further results for the - * request. To retrieve the next page of results, the value of the - * next_page_token is passed to the subsequent List method call (in the - * request message's page_token field). - * @type int $total_size - * The total number of Uptime check configurations for the project, - * irrespective of any pagination. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\UptimeService::initOnce(); - parent::__construct($data); - } - - /** - * The returned Uptime check configurations. - * - * Generated from protobuf field repeated .google.monitoring.v3.UptimeCheckConfig uptime_check_configs = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUptimeCheckConfigs() - { - return $this->uptime_check_configs; - } - - /** - * The returned Uptime check configurations. - * - * Generated from protobuf field repeated .google.monitoring.v3.UptimeCheckConfig uptime_check_configs = 1; - * @param array<\Google\Cloud\Monitoring\V3\UptimeCheckConfig>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUptimeCheckConfigs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Monitoring\V3\UptimeCheckConfig::class); - $this->uptime_check_configs = $arr; - - return $this; - } - - /** - * This field represents the pagination token to retrieve the next page of - * results. If the value is empty, it means no further results for the - * request. To retrieve the next page of results, the value of the - * next_page_token is passed to the subsequent List method call (in the - * request message's page_token field). - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * This field represents the pagination token to retrieve the next page of - * results. If the value is empty, it means no further results for the - * request. To retrieve the next page of results, the value of the - * next_page_token is passed to the subsequent List method call (in the - * request message's page_token field). - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * The total number of Uptime check configurations for the project, - * irrespective of any pagination. - * - * Generated from protobuf field int32 total_size = 3; - * @return int - */ - public function getTotalSize() - { - return $this->total_size; - } - - /** - * The total number of Uptime check configurations for the project, - * irrespective of any pagination. - * - * Generated from protobuf field int32 total_size = 3; - * @param int $var - * @return $this - */ - public function setTotalSize($var) - { - GPBUtil::checkInt32($var); - $this->total_size = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListUptimeCheckIpsRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListUptimeCheckIpsRequest.php deleted file mode 100644 index f2d106e88980..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListUptimeCheckIpsRequest.php +++ /dev/null @@ -1,129 +0,0 @@ -google.monitoring.v3.ListUptimeCheckIpsRequest - */ -class ListUptimeCheckIpsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The maximum number of results to return in a single response. The server - * may further constrain the maximum number of results returned in a single - * page. If the page_size is <=0, the server will decide the number of results - * to be returned. - * NOTE: this field is not yet implemented - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * If this field is not empty then it must contain the `nextPageToken` value - * returned by a previous call to this method. Using this field causes the - * method to return more results from the previous method call. - * NOTE: this field is not yet implemented - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $page_size - * The maximum number of results to return in a single response. The server - * may further constrain the maximum number of results returned in a single - * page. If the page_size is <=0, the server will decide the number of results - * to be returned. - * NOTE: this field is not yet implemented - * @type string $page_token - * If this field is not empty then it must contain the `nextPageToken` value - * returned by a previous call to this method. Using this field causes the - * method to return more results from the previous method call. - * NOTE: this field is not yet implemented - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\UptimeService::initOnce(); - parent::__construct($data); - } - - /** - * The maximum number of results to return in a single response. The server - * may further constrain the maximum number of results returned in a single - * page. If the page_size is <=0, the server will decide the number of results - * to be returned. - * NOTE: this field is not yet implemented - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of results to return in a single response. The server - * may further constrain the maximum number of results returned in a single - * page. If the page_size is <=0, the server will decide the number of results - * to be returned. - * NOTE: this field is not yet implemented - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * If this field is not empty then it must contain the `nextPageToken` value - * returned by a previous call to this method. Using this field causes the - * method to return more results from the previous method call. - * NOTE: this field is not yet implemented - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * If this field is not empty then it must contain the `nextPageToken` value - * returned by a previous call to this method. Using this field causes the - * method to return more results from the previous method call. - * NOTE: this field is not yet implemented - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListUptimeCheckIpsResponse.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListUptimeCheckIpsResponse.php deleted file mode 100644 index 26da2fcdd61f..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ListUptimeCheckIpsResponse.php +++ /dev/null @@ -1,125 +0,0 @@ -google.monitoring.v3.ListUptimeCheckIpsResponse - */ -class ListUptimeCheckIpsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The returned list of IP addresses (including region and location) that the - * checkers run from. - * - * Generated from protobuf field repeated .google.monitoring.v3.UptimeCheckIp uptime_check_ips = 1; - */ - private $uptime_check_ips; - /** - * This field represents the pagination token to retrieve the next page of - * results. If the value is empty, it means no further results for the - * request. To retrieve the next page of results, the value of the - * next_page_token is passed to the subsequent List method call (in the - * request message's page_token field). - * NOTE: this field is not yet implemented - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Monitoring\V3\UptimeCheckIp>|\Google\Protobuf\Internal\RepeatedField $uptime_check_ips - * The returned list of IP addresses (including region and location) that the - * checkers run from. - * @type string $next_page_token - * This field represents the pagination token to retrieve the next page of - * results. If the value is empty, it means no further results for the - * request. To retrieve the next page of results, the value of the - * next_page_token is passed to the subsequent List method call (in the - * request message's page_token field). - * NOTE: this field is not yet implemented - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\UptimeService::initOnce(); - parent::__construct($data); - } - - /** - * The returned list of IP addresses (including region and location) that the - * checkers run from. - * - * Generated from protobuf field repeated .google.monitoring.v3.UptimeCheckIp uptime_check_ips = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUptimeCheckIps() - { - return $this->uptime_check_ips; - } - - /** - * The returned list of IP addresses (including region and location) that the - * checkers run from. - * - * Generated from protobuf field repeated .google.monitoring.v3.UptimeCheckIp uptime_check_ips = 1; - * @param array<\Google\Cloud\Monitoring\V3\UptimeCheckIp>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUptimeCheckIps($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Monitoring\V3\UptimeCheckIp::class); - $this->uptime_check_ips = $arr; - - return $this; - } - - /** - * This field represents the pagination token to retrieve the next page of - * results. If the value is empty, it means no further results for the - * request. To retrieve the next page of results, the value of the - * next_page_token is passed to the subsequent List method call (in the - * request message's page_token field). - * NOTE: this field is not yet implemented - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * This field represents the pagination token to retrieve the next page of - * results. If the value is empty, it means no further results for the - * request. To retrieve the next page of results, the value of the - * next_page_token is passed to the subsequent List method call (in the - * request message's page_token field). - * NOTE: this field is not yet implemented - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/MutationRecord.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/MutationRecord.php deleted file mode 100644 index 73a1f82bce89..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/MutationRecord.php +++ /dev/null @@ -1,111 +0,0 @@ -google.monitoring.v3.MutationRecord - */ -class MutationRecord extends \Google\Protobuf\Internal\Message -{ - /** - * When the change occurred. - * - * Generated from protobuf field .google.protobuf.Timestamp mutate_time = 1; - */ - protected $mutate_time = null; - /** - * The email address of the user making the change. - * - * Generated from protobuf field string mutated_by = 2; - */ - protected $mutated_by = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $mutate_time - * When the change occurred. - * @type string $mutated_by - * The email address of the user making the change. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\MutationRecord::initOnce(); - parent::__construct($data); - } - - /** - * When the change occurred. - * - * Generated from protobuf field .google.protobuf.Timestamp mutate_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getMutateTime() - { - return $this->mutate_time; - } - - public function hasMutateTime() - { - return isset($this->mutate_time); - } - - public function clearMutateTime() - { - unset($this->mutate_time); - } - - /** - * When the change occurred. - * - * Generated from protobuf field .google.protobuf.Timestamp mutate_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setMutateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->mutate_time = $var; - - return $this; - } - - /** - * The email address of the user making the change. - * - * Generated from protobuf field string mutated_by = 2; - * @return string - */ - public function getMutatedBy() - { - return $this->mutated_by; - } - - /** - * The email address of the user making the change. - * - * Generated from protobuf field string mutated_by = 2; - * @param string $var - * @return $this - */ - public function setMutatedBy($var) - { - GPBUtil::checkString($var, True); - $this->mutated_by = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/NotificationChannel.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/NotificationChannel.php deleted file mode 100644 index a68ec145b595..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/NotificationChannel.php +++ /dev/null @@ -1,594 +0,0 @@ -google.monitoring.v3.NotificationChannel - */ -class NotificationChannel extends \Google\Protobuf\Internal\Message -{ - /** - * The type of the notification channel. This field matches the - * value of the - * [NotificationChannelDescriptor.type][google.monitoring.v3.NotificationChannelDescriptor.type] - * field. - * - * Generated from protobuf field string type = 1; - */ - protected $type = ''; - /** - * Identifier. The full REST resource name for this channel. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID] - * The `[CHANNEL_ID]` is automatically assigned by the server on creation. - * - * Generated from protobuf field string name = 6 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * An optional human-readable name for this notification channel. It is - * recommended that you specify a non-empty and unique name in order to - * make it easier to identify the channels in your project, though this is - * not enforced. The display name is limited to 512 Unicode characters. - * - * Generated from protobuf field string display_name = 3; - */ - protected $display_name = ''; - /** - * An optional human-readable description of this notification channel. This - * description may provide additional details, beyond the display - * name, for the channel. This may not exceed 1024 Unicode characters. - * - * Generated from protobuf field string description = 4; - */ - protected $description = ''; - /** - * Configuration fields that define the channel and its behavior. The - * permissible and required labels are specified in the - * [NotificationChannelDescriptor.labels][google.monitoring.v3.NotificationChannelDescriptor.labels] - * of the `NotificationChannelDescriptor` corresponding to the `type` field. - * - * Generated from protobuf field map labels = 5; - */ - private $labels; - /** - * User-supplied key/value data that does not need to conform to - * the corresponding `NotificationChannelDescriptor`'s schema, unlike - * the `labels` field. This field is intended to be used for organizing - * and identifying the `NotificationChannel` objects. - * The field can contain up to 64 entries. Each key and value is limited to - * 63 Unicode characters or 128 bytes, whichever is smaller. Labels and - * values can contain only lowercase letters, numerals, underscores, and - * dashes. Keys must begin with a letter. - * - * Generated from protobuf field map user_labels = 8; - */ - private $user_labels; - /** - * Indicates whether this channel has been verified or not. On a - * [`ListNotificationChannels`][google.monitoring.v3.NotificationChannelService.ListNotificationChannels] - * or - * [`GetNotificationChannel`][google.monitoring.v3.NotificationChannelService.GetNotificationChannel] - * operation, this field is expected to be populated. - * If the value is `UNVERIFIED`, then it indicates that the channel is - * non-functioning (it both requires verification and lacks verification); - * otherwise, it is assumed that the channel works. - * If the channel is neither `VERIFIED` nor `UNVERIFIED`, it implies that - * the channel is of a type that does not require verification or that - * this specific channel has been exempted from verification because it was - * created prior to verification being required for channels of this type. - * This field cannot be modified using a standard - * [`UpdateNotificationChannel`][google.monitoring.v3.NotificationChannelService.UpdateNotificationChannel] - * operation. To change the value of this field, you must call - * [`VerifyNotificationChannel`][google.monitoring.v3.NotificationChannelService.VerifyNotificationChannel]. - * - * Generated from protobuf field .google.monitoring.v3.NotificationChannel.VerificationStatus verification_status = 9; - */ - protected $verification_status = 0; - /** - * Whether notifications are forwarded to the described channel. This makes - * it possible to disable delivery of notifications to a particular channel - * without removing the channel from all alerting policies that reference - * the channel. This is a more convenient approach when the change is - * temporary and you want to receive notifications from the same set - * of alerting policies on the channel at some point in the future. - * - * Generated from protobuf field .google.protobuf.BoolValue enabled = 11; - */ - protected $enabled = null; - /** - * Record of the creation of this channel. - * - * Generated from protobuf field .google.monitoring.v3.MutationRecord creation_record = 12; - */ - protected $creation_record = null; - /** - * Records of the modification of this channel. - * - * Generated from protobuf field repeated .google.monitoring.v3.MutationRecord mutation_records = 13; - */ - private $mutation_records; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $type - * The type of the notification channel. This field matches the - * value of the - * [NotificationChannelDescriptor.type][google.monitoring.v3.NotificationChannelDescriptor.type] - * field. - * @type string $name - * Identifier. The full REST resource name for this channel. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID] - * The `[CHANNEL_ID]` is automatically assigned by the server on creation. - * @type string $display_name - * An optional human-readable name for this notification channel. It is - * recommended that you specify a non-empty and unique name in order to - * make it easier to identify the channels in your project, though this is - * not enforced. The display name is limited to 512 Unicode characters. - * @type string $description - * An optional human-readable description of this notification channel. This - * description may provide additional details, beyond the display - * name, for the channel. This may not exceed 1024 Unicode characters. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Configuration fields that define the channel and its behavior. The - * permissible and required labels are specified in the - * [NotificationChannelDescriptor.labels][google.monitoring.v3.NotificationChannelDescriptor.labels] - * of the `NotificationChannelDescriptor` corresponding to the `type` field. - * @type array|\Google\Protobuf\Internal\MapField $user_labels - * User-supplied key/value data that does not need to conform to - * the corresponding `NotificationChannelDescriptor`'s schema, unlike - * the `labels` field. This field is intended to be used for organizing - * and identifying the `NotificationChannel` objects. - * The field can contain up to 64 entries. Each key and value is limited to - * 63 Unicode characters or 128 bytes, whichever is smaller. Labels and - * values can contain only lowercase letters, numerals, underscores, and - * dashes. Keys must begin with a letter. - * @type int $verification_status - * Indicates whether this channel has been verified or not. On a - * [`ListNotificationChannels`][google.monitoring.v3.NotificationChannelService.ListNotificationChannels] - * or - * [`GetNotificationChannel`][google.monitoring.v3.NotificationChannelService.GetNotificationChannel] - * operation, this field is expected to be populated. - * If the value is `UNVERIFIED`, then it indicates that the channel is - * non-functioning (it both requires verification and lacks verification); - * otherwise, it is assumed that the channel works. - * If the channel is neither `VERIFIED` nor `UNVERIFIED`, it implies that - * the channel is of a type that does not require verification or that - * this specific channel has been exempted from verification because it was - * created prior to verification being required for channels of this type. - * This field cannot be modified using a standard - * [`UpdateNotificationChannel`][google.monitoring.v3.NotificationChannelService.UpdateNotificationChannel] - * operation. To change the value of this field, you must call - * [`VerifyNotificationChannel`][google.monitoring.v3.NotificationChannelService.VerifyNotificationChannel]. - * @type \Google\Protobuf\BoolValue $enabled - * Whether notifications are forwarded to the described channel. This makes - * it possible to disable delivery of notifications to a particular channel - * without removing the channel from all alerting policies that reference - * the channel. This is a more convenient approach when the change is - * temporary and you want to receive notifications from the same set - * of alerting policies on the channel at some point in the future. - * @type \Google\Cloud\Monitoring\V3\MutationRecord $creation_record - * Record of the creation of this channel. - * @type array<\Google\Cloud\Monitoring\V3\MutationRecord>|\Google\Protobuf\Internal\RepeatedField $mutation_records - * Records of the modification of this channel. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\Notification::initOnce(); - parent::__construct($data); - } - - /** - * The type of the notification channel. This field matches the - * value of the - * [NotificationChannelDescriptor.type][google.monitoring.v3.NotificationChannelDescriptor.type] - * field. - * - * Generated from protobuf field string type = 1; - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * The type of the notification channel. This field matches the - * value of the - * [NotificationChannelDescriptor.type][google.monitoring.v3.NotificationChannelDescriptor.type] - * field. - * - * Generated from protobuf field string type = 1; - * @param string $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkString($var, True); - $this->type = $var; - - return $this; - } - - /** - * Identifier. The full REST resource name for this channel. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID] - * The `[CHANNEL_ID]` is automatically assigned by the server on creation. - * - * Generated from protobuf field string name = 6 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. The full REST resource name for this channel. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID] - * The `[CHANNEL_ID]` is automatically assigned by the server on creation. - * - * Generated from protobuf field string name = 6 [(.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * An optional human-readable name for this notification channel. It is - * recommended that you specify a non-empty and unique name in order to - * make it easier to identify the channels in your project, though this is - * not enforced. The display name is limited to 512 Unicode characters. - * - * Generated from protobuf field string display_name = 3; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * An optional human-readable name for this notification channel. It is - * recommended that you specify a non-empty and unique name in order to - * make it easier to identify the channels in your project, though this is - * not enforced. The display name is limited to 512 Unicode characters. - * - * Generated from protobuf field string display_name = 3; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * An optional human-readable description of this notification channel. This - * description may provide additional details, beyond the display - * name, for the channel. This may not exceed 1024 Unicode characters. - * - * Generated from protobuf field string description = 4; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * An optional human-readable description of this notification channel. This - * description may provide additional details, beyond the display - * name, for the channel. This may not exceed 1024 Unicode characters. - * - * Generated from protobuf field string description = 4; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Configuration fields that define the channel and its behavior. The - * permissible and required labels are specified in the - * [NotificationChannelDescriptor.labels][google.monitoring.v3.NotificationChannelDescriptor.labels] - * of the `NotificationChannelDescriptor` corresponding to the `type` field. - * - * Generated from protobuf field map labels = 5; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Configuration fields that define the channel and its behavior. The - * permissible and required labels are specified in the - * [NotificationChannelDescriptor.labels][google.monitoring.v3.NotificationChannelDescriptor.labels] - * of the `NotificationChannelDescriptor` corresponding to the `type` field. - * - * Generated from protobuf field map labels = 5; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * User-supplied key/value data that does not need to conform to - * the corresponding `NotificationChannelDescriptor`'s schema, unlike - * the `labels` field. This field is intended to be used for organizing - * and identifying the `NotificationChannel` objects. - * The field can contain up to 64 entries. Each key and value is limited to - * 63 Unicode characters or 128 bytes, whichever is smaller. Labels and - * values can contain only lowercase letters, numerals, underscores, and - * dashes. Keys must begin with a letter. - * - * Generated from protobuf field map user_labels = 8; - * @return \Google\Protobuf\Internal\MapField - */ - public function getUserLabels() - { - return $this->user_labels; - } - - /** - * User-supplied key/value data that does not need to conform to - * the corresponding `NotificationChannelDescriptor`'s schema, unlike - * the `labels` field. This field is intended to be used for organizing - * and identifying the `NotificationChannel` objects. - * The field can contain up to 64 entries. Each key and value is limited to - * 63 Unicode characters or 128 bytes, whichever is smaller. Labels and - * values can contain only lowercase letters, numerals, underscores, and - * dashes. Keys must begin with a letter. - * - * Generated from protobuf field map user_labels = 8; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setUserLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->user_labels = $arr; - - return $this; - } - - /** - * Indicates whether this channel has been verified or not. On a - * [`ListNotificationChannels`][google.monitoring.v3.NotificationChannelService.ListNotificationChannels] - * or - * [`GetNotificationChannel`][google.monitoring.v3.NotificationChannelService.GetNotificationChannel] - * operation, this field is expected to be populated. - * If the value is `UNVERIFIED`, then it indicates that the channel is - * non-functioning (it both requires verification and lacks verification); - * otherwise, it is assumed that the channel works. - * If the channel is neither `VERIFIED` nor `UNVERIFIED`, it implies that - * the channel is of a type that does not require verification or that - * this specific channel has been exempted from verification because it was - * created prior to verification being required for channels of this type. - * This field cannot be modified using a standard - * [`UpdateNotificationChannel`][google.monitoring.v3.NotificationChannelService.UpdateNotificationChannel] - * operation. To change the value of this field, you must call - * [`VerifyNotificationChannel`][google.monitoring.v3.NotificationChannelService.VerifyNotificationChannel]. - * - * Generated from protobuf field .google.monitoring.v3.NotificationChannel.VerificationStatus verification_status = 9; - * @return int - */ - public function getVerificationStatus() - { - return $this->verification_status; - } - - /** - * Indicates whether this channel has been verified or not. On a - * [`ListNotificationChannels`][google.monitoring.v3.NotificationChannelService.ListNotificationChannels] - * or - * [`GetNotificationChannel`][google.monitoring.v3.NotificationChannelService.GetNotificationChannel] - * operation, this field is expected to be populated. - * If the value is `UNVERIFIED`, then it indicates that the channel is - * non-functioning (it both requires verification and lacks verification); - * otherwise, it is assumed that the channel works. - * If the channel is neither `VERIFIED` nor `UNVERIFIED`, it implies that - * the channel is of a type that does not require verification or that - * this specific channel has been exempted from verification because it was - * created prior to verification being required for channels of this type. - * This field cannot be modified using a standard - * [`UpdateNotificationChannel`][google.monitoring.v3.NotificationChannelService.UpdateNotificationChannel] - * operation. To change the value of this field, you must call - * [`VerifyNotificationChannel`][google.monitoring.v3.NotificationChannelService.VerifyNotificationChannel]. - * - * Generated from protobuf field .google.monitoring.v3.NotificationChannel.VerificationStatus verification_status = 9; - * @param int $var - * @return $this - */ - public function setVerificationStatus($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Monitoring\V3\NotificationChannel\VerificationStatus::class); - $this->verification_status = $var; - - return $this; - } - - /** - * Whether notifications are forwarded to the described channel. This makes - * it possible to disable delivery of notifications to a particular channel - * without removing the channel from all alerting policies that reference - * the channel. This is a more convenient approach when the change is - * temporary and you want to receive notifications from the same set - * of alerting policies on the channel at some point in the future. - * - * Generated from protobuf field .google.protobuf.BoolValue enabled = 11; - * @return \Google\Protobuf\BoolValue|null - */ - public function getEnabled() - { - return $this->enabled; - } - - public function hasEnabled() - { - return isset($this->enabled); - } - - public function clearEnabled() - { - unset($this->enabled); - } - - /** - * Returns the unboxed value from getEnabled() - - * Whether notifications are forwarded to the described channel. This makes - * it possible to disable delivery of notifications to a particular channel - * without removing the channel from all alerting policies that reference - * the channel. This is a more convenient approach when the change is - * temporary and you want to receive notifications from the same set - * of alerting policies on the channel at some point in the future. - * - * Generated from protobuf field .google.protobuf.BoolValue enabled = 11; - * @return bool|null - */ - public function getEnabledUnwrapped() - { - return $this->readWrapperValue("enabled"); - } - - /** - * Whether notifications are forwarded to the described channel. This makes - * it possible to disable delivery of notifications to a particular channel - * without removing the channel from all alerting policies that reference - * the channel. This is a more convenient approach when the change is - * temporary and you want to receive notifications from the same set - * of alerting policies on the channel at some point in the future. - * - * Generated from protobuf field .google.protobuf.BoolValue enabled = 11; - * @param \Google\Protobuf\BoolValue $var - * @return $this - */ - public function setEnabled($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); - $this->enabled = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. - - * Whether notifications are forwarded to the described channel. This makes - * it possible to disable delivery of notifications to a particular channel - * without removing the channel from all alerting policies that reference - * the channel. This is a more convenient approach when the change is - * temporary and you want to receive notifications from the same set - * of alerting policies on the channel at some point in the future. - * - * Generated from protobuf field .google.protobuf.BoolValue enabled = 11; - * @param bool|null $var - * @return $this - */ - public function setEnabledUnwrapped($var) - { - $this->writeWrapperValue("enabled", $var); - return $this;} - - /** - * Record of the creation of this channel. - * - * Generated from protobuf field .google.monitoring.v3.MutationRecord creation_record = 12; - * @return \Google\Cloud\Monitoring\V3\MutationRecord|null - */ - public function getCreationRecord() - { - return $this->creation_record; - } - - public function hasCreationRecord() - { - return isset($this->creation_record); - } - - public function clearCreationRecord() - { - unset($this->creation_record); - } - - /** - * Record of the creation of this channel. - * - * Generated from protobuf field .google.monitoring.v3.MutationRecord creation_record = 12; - * @param \Google\Cloud\Monitoring\V3\MutationRecord $var - * @return $this - */ - public function setCreationRecord($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\MutationRecord::class); - $this->creation_record = $var; - - return $this; - } - - /** - * Records of the modification of this channel. - * - * Generated from protobuf field repeated .google.monitoring.v3.MutationRecord mutation_records = 13; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMutationRecords() - { - return $this->mutation_records; - } - - /** - * Records of the modification of this channel. - * - * Generated from protobuf field repeated .google.monitoring.v3.MutationRecord mutation_records = 13; - * @param array<\Google\Cloud\Monitoring\V3\MutationRecord>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMutationRecords($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Monitoring\V3\MutationRecord::class); - $this->mutation_records = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/NotificationChannel/VerificationStatus.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/NotificationChannel/VerificationStatus.php deleted file mode 100644 index 2b70fa842873..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/NotificationChannel/VerificationStatus.php +++ /dev/null @@ -1,76 +0,0 @@ -google.monitoring.v3.NotificationChannel.VerificationStatus - */ -class VerificationStatus -{ - /** - * Sentinel value used to indicate that the state is unknown, omitted, or - * is not applicable (as in the case of channels that neither support - * nor require verification in order to function). - * - * Generated from protobuf enum VERIFICATION_STATUS_UNSPECIFIED = 0; - */ - const VERIFICATION_STATUS_UNSPECIFIED = 0; - /** - * The channel has yet to be verified and requires verification to function. - * Note that this state also applies to the case where the verification - * process has been initiated by sending a verification code but where - * the verification code has not been submitted to complete the process. - * - * Generated from protobuf enum UNVERIFIED = 1; - */ - const UNVERIFIED = 1; - /** - * It has been proven that notifications can be received on this - * notification channel and that someone on the project has access - * to messages that are delivered to that channel. - * - * Generated from protobuf enum VERIFIED = 2; - */ - const VERIFIED = 2; - - private static $valueToName = [ - self::VERIFICATION_STATUS_UNSPECIFIED => 'VERIFICATION_STATUS_UNSPECIFIED', - self::UNVERIFIED => 'UNVERIFIED', - self::VERIFIED => 'VERIFIED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(VerificationStatus::class, \Google\Cloud\Monitoring\V3\NotificationChannel_VerificationStatus::class); - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/NotificationChannelDescriptor.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/NotificationChannelDescriptor.php deleted file mode 100644 index f9e6c8c27145..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/NotificationChannelDescriptor.php +++ /dev/null @@ -1,326 +0,0 @@ -google.monitoring.v3.NotificationChannelDescriptor - */ -class NotificationChannelDescriptor extends \Google\Protobuf\Internal\Message -{ - /** - * The full REST resource name for this descriptor. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/notificationChannelDescriptors/[TYPE] - * In the above, `[TYPE]` is the value of the `type` field. - * - * Generated from protobuf field string name = 6; - */ - protected $name = ''; - /** - * The type of notification channel, such as "email" and "sms". To view the - * full list of channels, see - * [Channel - * descriptors](https://cloud.google.com/monitoring/alerts/using-channels-api#ncd). - * Notification channel types are globally unique. - * - * Generated from protobuf field string type = 1; - */ - protected $type = ''; - /** - * A human-readable name for the notification channel type. This - * form of the name is suitable for a user interface. - * - * Generated from protobuf field string display_name = 2; - */ - protected $display_name = ''; - /** - * A human-readable description of the notification channel - * type. The description may include a description of the properties - * of the channel and pointers to external documentation. - * - * Generated from protobuf field string description = 3; - */ - protected $description = ''; - /** - * The set of labels that must be defined to identify a particular - * channel of the corresponding type. Each label includes a - * description for how that field should be populated. - * - * Generated from protobuf field repeated .google.api.LabelDescriptor labels = 4; - */ - private $labels; - /** - * The tiers that support this notification channel; the project service tier - * must be one of the supported_tiers. - * - * Generated from protobuf field repeated .google.monitoring.v3.ServiceTier supported_tiers = 5 [deprecated = true]; - * @deprecated - */ - private $supported_tiers; - /** - * The product launch stage for channels of this type. - * - * Generated from protobuf field .google.api.LaunchStage launch_stage = 7; - */ - protected $launch_stage = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The full REST resource name for this descriptor. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/notificationChannelDescriptors/[TYPE] - * In the above, `[TYPE]` is the value of the `type` field. - * @type string $type - * The type of notification channel, such as "email" and "sms". To view the - * full list of channels, see - * [Channel - * descriptors](https://cloud.google.com/monitoring/alerts/using-channels-api#ncd). - * Notification channel types are globally unique. - * @type string $display_name - * A human-readable name for the notification channel type. This - * form of the name is suitable for a user interface. - * @type string $description - * A human-readable description of the notification channel - * type. The description may include a description of the properties - * of the channel and pointers to external documentation. - * @type array<\Google\Api\LabelDescriptor>|\Google\Protobuf\Internal\RepeatedField $labels - * The set of labels that must be defined to identify a particular - * channel of the corresponding type. Each label includes a - * description for how that field should be populated. - * @type array|\Google\Protobuf\Internal\RepeatedField $supported_tiers - * The tiers that support this notification channel; the project service tier - * must be one of the supported_tiers. - * @type int $launch_stage - * The product launch stage for channels of this type. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\Notification::initOnce(); - parent::__construct($data); - } - - /** - * The full REST resource name for this descriptor. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/notificationChannelDescriptors/[TYPE] - * In the above, `[TYPE]` is the value of the `type` field. - * - * Generated from protobuf field string name = 6; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The full REST resource name for this descriptor. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/notificationChannelDescriptors/[TYPE] - * In the above, `[TYPE]` is the value of the `type` field. - * - * Generated from protobuf field string name = 6; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The type of notification channel, such as "email" and "sms". To view the - * full list of channels, see - * [Channel - * descriptors](https://cloud.google.com/monitoring/alerts/using-channels-api#ncd). - * Notification channel types are globally unique. - * - * Generated from protobuf field string type = 1; - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * The type of notification channel, such as "email" and "sms". To view the - * full list of channels, see - * [Channel - * descriptors](https://cloud.google.com/monitoring/alerts/using-channels-api#ncd). - * Notification channel types are globally unique. - * - * Generated from protobuf field string type = 1; - * @param string $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkString($var, True); - $this->type = $var; - - return $this; - } - - /** - * A human-readable name for the notification channel type. This - * form of the name is suitable for a user interface. - * - * Generated from protobuf field string display_name = 2; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * A human-readable name for the notification channel type. This - * form of the name is suitable for a user interface. - * - * Generated from protobuf field string display_name = 2; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * A human-readable description of the notification channel - * type. The description may include a description of the properties - * of the channel and pointers to external documentation. - * - * Generated from protobuf field string description = 3; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * A human-readable description of the notification channel - * type. The description may include a description of the properties - * of the channel and pointers to external documentation. - * - * Generated from protobuf field string description = 3; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * The set of labels that must be defined to identify a particular - * channel of the corresponding type. Each label includes a - * description for how that field should be populated. - * - * Generated from protobuf field repeated .google.api.LabelDescriptor labels = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * The set of labels that must be defined to identify a particular - * channel of the corresponding type. Each label includes a - * description for how that field should be populated. - * - * Generated from protobuf field repeated .google.api.LabelDescriptor labels = 4; - * @param array<\Google\Api\LabelDescriptor>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Api\LabelDescriptor::class); - $this->labels = $arr; - - return $this; - } - - /** - * The tiers that support this notification channel; the project service tier - * must be one of the supported_tiers. - * - * Generated from protobuf field repeated .google.monitoring.v3.ServiceTier supported_tiers = 5 [deprecated = true]; - * @return \Google\Protobuf\Internal\RepeatedField - * @deprecated - */ - public function getSupportedTiers() - { - @trigger_error('supported_tiers is deprecated.', E_USER_DEPRECATED); - return $this->supported_tiers; - } - - /** - * The tiers that support this notification channel; the project service tier - * must be one of the supported_tiers. - * - * Generated from protobuf field repeated .google.monitoring.v3.ServiceTier supported_tiers = 5 [deprecated = true]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - * @deprecated - */ - public function setSupportedTiers($var) - { - @trigger_error('supported_tiers is deprecated.', E_USER_DEPRECATED); - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Monitoring\V3\ServiceTier::class); - $this->supported_tiers = $arr; - - return $this; - } - - /** - * The product launch stage for channels of this type. - * - * Generated from protobuf field .google.api.LaunchStage launch_stage = 7; - * @return int - */ - public function getLaunchStage() - { - return $this->launch_stage; - } - - /** - * The product launch stage for channels of this type. - * - * Generated from protobuf field .google.api.LaunchStage launch_stage = 7; - * @param int $var - * @return $this - */ - public function setLaunchStage($var) - { - GPBUtil::checkEnum($var, \Google\Api\LaunchStage::class); - $this->launch_stage = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Point.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Point.php deleted file mode 100644 index 5db4ed6c5b78..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Point.php +++ /dev/null @@ -1,153 +0,0 @@ -google.monitoring.v3.Point - */ -class Point extends \Google\Protobuf\Internal\Message -{ - /** - * The time interval to which the data point applies. For `GAUGE` metrics, - * the start time is optional, but if it is supplied, it must equal the - * end time. For `DELTA` metrics, the start - * and end time should specify a non-zero interval, with subsequent points - * specifying contiguous and non-overlapping intervals. For `CUMULATIVE` - * metrics, the start and end time should specify a non-zero interval, with - * subsequent points specifying the same start time and increasing end times, - * until an event resets the cumulative value to zero and sets a new start - * time for the following points. - * - * Generated from protobuf field .google.monitoring.v3.TimeInterval interval = 1; - */ - protected $interval = null; - /** - * The value of the data point. - * - * Generated from protobuf field .google.monitoring.v3.TypedValue value = 2; - */ - protected $value = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Monitoring\V3\TimeInterval $interval - * The time interval to which the data point applies. For `GAUGE` metrics, - * the start time is optional, but if it is supplied, it must equal the - * end time. For `DELTA` metrics, the start - * and end time should specify a non-zero interval, with subsequent points - * specifying contiguous and non-overlapping intervals. For `CUMULATIVE` - * metrics, the start and end time should specify a non-zero interval, with - * subsequent points specifying the same start time and increasing end times, - * until an event resets the cumulative value to zero and sets a new start - * time for the following points. - * @type \Google\Cloud\Monitoring\V3\TypedValue $value - * The value of the data point. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\Metric::initOnce(); - parent::__construct($data); - } - - /** - * The time interval to which the data point applies. For `GAUGE` metrics, - * the start time is optional, but if it is supplied, it must equal the - * end time. For `DELTA` metrics, the start - * and end time should specify a non-zero interval, with subsequent points - * specifying contiguous and non-overlapping intervals. For `CUMULATIVE` - * metrics, the start and end time should specify a non-zero interval, with - * subsequent points specifying the same start time and increasing end times, - * until an event resets the cumulative value to zero and sets a new start - * time for the following points. - * - * Generated from protobuf field .google.monitoring.v3.TimeInterval interval = 1; - * @return \Google\Cloud\Monitoring\V3\TimeInterval|null - */ - public function getInterval() - { - return $this->interval; - } - - public function hasInterval() - { - return isset($this->interval); - } - - public function clearInterval() - { - unset($this->interval); - } - - /** - * The time interval to which the data point applies. For `GAUGE` metrics, - * the start time is optional, but if it is supplied, it must equal the - * end time. For `DELTA` metrics, the start - * and end time should specify a non-zero interval, with subsequent points - * specifying contiguous and non-overlapping intervals. For `CUMULATIVE` - * metrics, the start and end time should specify a non-zero interval, with - * subsequent points specifying the same start time and increasing end times, - * until an event resets the cumulative value to zero and sets a new start - * time for the following points. - * - * Generated from protobuf field .google.monitoring.v3.TimeInterval interval = 1; - * @param \Google\Cloud\Monitoring\V3\TimeInterval $var - * @return $this - */ - public function setInterval($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\TimeInterval::class); - $this->interval = $var; - - return $this; - } - - /** - * The value of the data point. - * - * Generated from protobuf field .google.monitoring.v3.TypedValue value = 2; - * @return \Google\Cloud\Monitoring\V3\TypedValue|null - */ - public function getValue() - { - return $this->value; - } - - public function hasValue() - { - return isset($this->value); - } - - public function clearValue() - { - unset($this->value); - } - - /** - * The value of the data point. - * - * Generated from protobuf field .google.monitoring.v3.TypedValue value = 2; - * @param \Google\Cloud\Monitoring\V3\TypedValue $var - * @return $this - */ - public function setValue($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\TypedValue::class); - $this->value = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/QueryError.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/QueryError.php deleted file mode 100644 index 8ff8ad79a2a5..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/QueryError.php +++ /dev/null @@ -1,115 +0,0 @@ -google.monitoring.v3.QueryError - */ -class QueryError extends \Google\Protobuf\Internal\Message -{ - /** - * The location of the time series query language text that this error applies - * to. - * - * Generated from protobuf field .google.monitoring.v3.TextLocator locator = 1; - */ - protected $locator = null; - /** - * The error message. - * - * Generated from protobuf field string message = 2; - */ - protected $message = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Monitoring\V3\TextLocator $locator - * The location of the time series query language text that this error applies - * to. - * @type string $message - * The error message. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\Metric::initOnce(); - parent::__construct($data); - } - - /** - * The location of the time series query language text that this error applies - * to. - * - * Generated from protobuf field .google.monitoring.v3.TextLocator locator = 1; - * @return \Google\Cloud\Monitoring\V3\TextLocator|null - */ - public function getLocator() - { - return $this->locator; - } - - public function hasLocator() - { - return isset($this->locator); - } - - public function clearLocator() - { - unset($this->locator); - } - - /** - * The location of the time series query language text that this error applies - * to. - * - * Generated from protobuf field .google.monitoring.v3.TextLocator locator = 1; - * @param \Google\Cloud\Monitoring\V3\TextLocator $var - * @return $this - */ - public function setLocator($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\TextLocator::class); - $this->locator = $var; - - return $this; - } - - /** - * The error message. - * - * Generated from protobuf field string message = 2; - * @return string - */ - public function getMessage() - { - return $this->message; - } - - /** - * The error message. - * - * Generated from protobuf field string message = 2; - * @param string $var - * @return $this - */ - public function setMessage($var) - { - GPBUtil::checkString($var, True); - $this->message = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/QueryErrorList.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/QueryErrorList.php deleted file mode 100644 index 95542afd49b9..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/QueryErrorList.php +++ /dev/null @@ -1,105 +0,0 @@ -google.monitoring.v3.QueryErrorList - */ -class QueryErrorList extends \Google\Protobuf\Internal\Message -{ - /** - * Errors in parsing the time series query language text. The number of errors - * in the response may be limited. - * - * Generated from protobuf field repeated .google.monitoring.v3.QueryError errors = 1; - */ - private $errors; - /** - * A summary of all the errors. - * - * Generated from protobuf field string error_summary = 2; - */ - protected $error_summary = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Monitoring\V3\QueryError>|\Google\Protobuf\Internal\RepeatedField $errors - * Errors in parsing the time series query language text. The number of errors - * in the response may be limited. - * @type string $error_summary - * A summary of all the errors. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\MetricService::initOnce(); - parent::__construct($data); - } - - /** - * Errors in parsing the time series query language text. The number of errors - * in the response may be limited. - * - * Generated from protobuf field repeated .google.monitoring.v3.QueryError errors = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getErrors() - { - return $this->errors; - } - - /** - * Errors in parsing the time series query language text. The number of errors - * in the response may be limited. - * - * Generated from protobuf field repeated .google.monitoring.v3.QueryError errors = 1; - * @param array<\Google\Cloud\Monitoring\V3\QueryError>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setErrors($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Monitoring\V3\QueryError::class); - $this->errors = $arr; - - return $this; - } - - /** - * A summary of all the errors. - * - * Generated from protobuf field string error_summary = 2; - * @return string - */ - public function getErrorSummary() - { - return $this->error_summary; - } - - /** - * A summary of all the errors. - * - * Generated from protobuf field string error_summary = 2; - * @param string $var - * @return $this - */ - public function setErrorSummary($var) - { - GPBUtil::checkString($var, True); - $this->error_summary = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/QueryTimeSeriesRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/QueryTimeSeriesRequest.php deleted file mode 100644 index 05eb26d2f95a..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/QueryTimeSeriesRequest.php +++ /dev/null @@ -1,197 +0,0 @@ -google.monitoring.v3.QueryTimeSeriesRequest - */ -class QueryTimeSeriesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The - * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which - * to execute the request. The format is: - * projects/[PROJECT_ID_OR_NUMBER] - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Required. The query in the [Monitoring Query - * Language](https://cloud.google.com/monitoring/mql/reference) format. - * The default time zone is in UTC. - * - * Generated from protobuf field string query = 7 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $query = ''; - /** - * A positive number that is the maximum number of time_series_data to return. - * - * Generated from protobuf field int32 page_size = 9; - */ - protected $page_size = 0; - /** - * If this field is not empty then it must contain the `nextPageToken` value - * returned by a previous call to this method. Using this field causes the - * method to return additional results from the previous method call. - * - * Generated from protobuf field string page_token = 10; - */ - protected $page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The - * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which - * to execute the request. The format is: - * projects/[PROJECT_ID_OR_NUMBER] - * @type string $query - * Required. The query in the [Monitoring Query - * Language](https://cloud.google.com/monitoring/mql/reference) format. - * The default time zone is in UTC. - * @type int $page_size - * A positive number that is the maximum number of time_series_data to return. - * @type string $page_token - * If this field is not empty then it must contain the `nextPageToken` value - * returned by a previous call to this method. Using this field causes the - * method to return additional results from the previous method call. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\MetricService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The - * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which - * to execute the request. The format is: - * projects/[PROJECT_ID_OR_NUMBER] - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The - * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which - * to execute the request. The format is: - * projects/[PROJECT_ID_OR_NUMBER] - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. The query in the [Monitoring Query - * Language](https://cloud.google.com/monitoring/mql/reference) format. - * The default time zone is in UTC. - * - * Generated from protobuf field string query = 7 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getQuery() - { - return $this->query; - } - - /** - * Required. The query in the [Monitoring Query - * Language](https://cloud.google.com/monitoring/mql/reference) format. - * The default time zone is in UTC. - * - * Generated from protobuf field string query = 7 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setQuery($var) - { - GPBUtil::checkString($var, True); - $this->query = $var; - - return $this; - } - - /** - * A positive number that is the maximum number of time_series_data to return. - * - * Generated from protobuf field int32 page_size = 9; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * A positive number that is the maximum number of time_series_data to return. - * - * Generated from protobuf field int32 page_size = 9; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * If this field is not empty then it must contain the `nextPageToken` value - * returned by a previous call to this method. Using this field causes the - * method to return additional results from the previous method call. - * - * Generated from protobuf field string page_token = 10; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * If this field is not empty then it must contain the `nextPageToken` value - * returned by a previous call to this method. Using this field causes the - * method to return additional results from the previous method call. - * - * Generated from protobuf field string page_token = 10; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/QueryTimeSeriesResponse.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/QueryTimeSeriesResponse.php deleted file mode 100644 index 79b8487cb24d..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/QueryTimeSeriesResponse.php +++ /dev/null @@ -1,195 +0,0 @@ -google.monitoring.v3.QueryTimeSeriesResponse - */ -class QueryTimeSeriesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The descriptor for the time series data. - * - * Generated from protobuf field .google.monitoring.v3.TimeSeriesDescriptor time_series_descriptor = 8; - */ - protected $time_series_descriptor = null; - /** - * The time series data. - * - * Generated from protobuf field repeated .google.monitoring.v3.TimeSeriesData time_series_data = 9; - */ - private $time_series_data; - /** - * If there are more results than have been returned, then this field is set - * to a non-empty value. To see the additional results, use that value as - * `page_token` in the next call to this method. - * - * Generated from protobuf field string next_page_token = 10; - */ - protected $next_page_token = ''; - /** - * Query execution errors that may have caused the time series data returned - * to be incomplete. The available data will be available in the - * response. - * - * Generated from protobuf field repeated .google.rpc.Status partial_errors = 11; - */ - private $partial_errors; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Monitoring\V3\TimeSeriesDescriptor $time_series_descriptor - * The descriptor for the time series data. - * @type array<\Google\Cloud\Monitoring\V3\TimeSeriesData>|\Google\Protobuf\Internal\RepeatedField $time_series_data - * The time series data. - * @type string $next_page_token - * If there are more results than have been returned, then this field is set - * to a non-empty value. To see the additional results, use that value as - * `page_token` in the next call to this method. - * @type array<\Google\Rpc\Status>|\Google\Protobuf\Internal\RepeatedField $partial_errors - * Query execution errors that may have caused the time series data returned - * to be incomplete. The available data will be available in the - * response. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\MetricService::initOnce(); - parent::__construct($data); - } - - /** - * The descriptor for the time series data. - * - * Generated from protobuf field .google.monitoring.v3.TimeSeriesDescriptor time_series_descriptor = 8; - * @return \Google\Cloud\Monitoring\V3\TimeSeriesDescriptor|null - */ - public function getTimeSeriesDescriptor() - { - return $this->time_series_descriptor; - } - - public function hasTimeSeriesDescriptor() - { - return isset($this->time_series_descriptor); - } - - public function clearTimeSeriesDescriptor() - { - unset($this->time_series_descriptor); - } - - /** - * The descriptor for the time series data. - * - * Generated from protobuf field .google.monitoring.v3.TimeSeriesDescriptor time_series_descriptor = 8; - * @param \Google\Cloud\Monitoring\V3\TimeSeriesDescriptor $var - * @return $this - */ - public function setTimeSeriesDescriptor($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\TimeSeriesDescriptor::class); - $this->time_series_descriptor = $var; - - return $this; - } - - /** - * The time series data. - * - * Generated from protobuf field repeated .google.monitoring.v3.TimeSeriesData time_series_data = 9; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTimeSeriesData() - { - return $this->time_series_data; - } - - /** - * The time series data. - * - * Generated from protobuf field repeated .google.monitoring.v3.TimeSeriesData time_series_data = 9; - * @param array<\Google\Cloud\Monitoring\V3\TimeSeriesData>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTimeSeriesData($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Monitoring\V3\TimeSeriesData::class); - $this->time_series_data = $arr; - - return $this; - } - - /** - * If there are more results than have been returned, then this field is set - * to a non-empty value. To see the additional results, use that value as - * `page_token` in the next call to this method. - * - * Generated from protobuf field string next_page_token = 10; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * If there are more results than have been returned, then this field is set - * to a non-empty value. To see the additional results, use that value as - * `page_token` in the next call to this method. - * - * Generated from protobuf field string next_page_token = 10; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Query execution errors that may have caused the time series data returned - * to be incomplete. The available data will be available in the - * response. - * - * Generated from protobuf field repeated .google.rpc.Status partial_errors = 11; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPartialErrors() - { - return $this->partial_errors; - } - - /** - * Query execution errors that may have caused the time series data returned - * to be incomplete. The available data will be available in the - * response. - * - * Generated from protobuf field repeated .google.rpc.Status partial_errors = 11; - * @param array<\Google\Rpc\Status>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPartialErrors($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Rpc\Status::class); - $this->partial_errors = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Range.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Range.php deleted file mode 100644 index 3dd0db9c39f2..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Range.php +++ /dev/null @@ -1,101 +0,0 @@ -google.monitoring.v3.Range - */ -class Range extends \Google\Protobuf\Internal\Message -{ - /** - * Range minimum. - * - * Generated from protobuf field double min = 1; - */ - protected $min = 0.0; - /** - * Range maximum. - * - * Generated from protobuf field double max = 2; - */ - protected $max = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $min - * Range minimum. - * @type float $max - * Range maximum. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\Service::initOnce(); - parent::__construct($data); - } - - /** - * Range minimum. - * - * Generated from protobuf field double min = 1; - * @return float - */ - public function getMin() - { - return $this->min; - } - - /** - * Range minimum. - * - * Generated from protobuf field double min = 1; - * @param float $var - * @return $this - */ - public function setMin($var) - { - GPBUtil::checkDouble($var); - $this->min = $var; - - return $this; - } - - /** - * Range maximum. - * - * Generated from protobuf field double max = 2; - * @return float - */ - public function getMax() - { - return $this->max; - } - - /** - * Range maximum. - * - * Generated from protobuf field double max = 2; - * @param float $var - * @return $this - */ - public function setMax($var) - { - GPBUtil::checkDouble($var); - $this->max = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/RequestBasedSli.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/RequestBasedSli.php deleted file mode 100644 index e4820f273c21..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/RequestBasedSli.php +++ /dev/null @@ -1,121 +0,0 @@ -google.monitoring.v3.RequestBasedSli - */ -class RequestBasedSli extends \Google\Protobuf\Internal\Message -{ - protected $method; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Monitoring\V3\TimeSeriesRatio $good_total_ratio - * `good_total_ratio` is used when the ratio of `good_service` to - * `total_service` is computed from two `TimeSeries`. - * @type \Google\Cloud\Monitoring\V3\DistributionCut $distribution_cut - * `distribution_cut` is used when `good_service` is a count of values - * aggregated in a `Distribution` that fall into a good range. The - * `total_service` is the total count of all values aggregated in the - * `Distribution`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\Service::initOnce(); - parent::__construct($data); - } - - /** - * `good_total_ratio` is used when the ratio of `good_service` to - * `total_service` is computed from two `TimeSeries`. - * - * Generated from protobuf field .google.monitoring.v3.TimeSeriesRatio good_total_ratio = 1; - * @return \Google\Cloud\Monitoring\V3\TimeSeriesRatio|null - */ - public function getGoodTotalRatio() - { - return $this->readOneof(1); - } - - public function hasGoodTotalRatio() - { - return $this->hasOneof(1); - } - - /** - * `good_total_ratio` is used when the ratio of `good_service` to - * `total_service` is computed from two `TimeSeries`. - * - * Generated from protobuf field .google.monitoring.v3.TimeSeriesRatio good_total_ratio = 1; - * @param \Google\Cloud\Monitoring\V3\TimeSeriesRatio $var - * @return $this - */ - public function setGoodTotalRatio($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\TimeSeriesRatio::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * `distribution_cut` is used when `good_service` is a count of values - * aggregated in a `Distribution` that fall into a good range. The - * `total_service` is the total count of all values aggregated in the - * `Distribution`. - * - * Generated from protobuf field .google.monitoring.v3.DistributionCut distribution_cut = 3; - * @return \Google\Cloud\Monitoring\V3\DistributionCut|null - */ - public function getDistributionCut() - { - return $this->readOneof(3); - } - - public function hasDistributionCut() - { - return $this->hasOneof(3); - } - - /** - * `distribution_cut` is used when `good_service` is a count of values - * aggregated in a `Distribution` that fall into a good range. The - * `total_service` is the total count of all values aggregated in the - * `Distribution`. - * - * Generated from protobuf field .google.monitoring.v3.DistributionCut distribution_cut = 3; - * @param \Google\Cloud\Monitoring\V3\DistributionCut $var - * @return $this - */ - public function setDistributionCut($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\DistributionCut::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * @return string - */ - public function getMethod() - { - return $this->whichOneof("method"); - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/SendNotificationChannelVerificationCodeRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/SendNotificationChannelVerificationCodeRequest.php deleted file mode 100644 index efa0e97e35bc..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/SendNotificationChannelVerificationCodeRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.monitoring.v3.SendNotificationChannelVerificationCodeRequest - */ -class SendNotificationChannelVerificationCodeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The notification channel to which to send a verification code. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The notification channel to which to send a verification code. Please see - * {@see NotificationChannelServiceClient::notificationChannelName()} for help formatting this field. - * - * @return \Google\Cloud\Monitoring\V3\SendNotificationChannelVerificationCodeRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The notification channel to which to send a verification code. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\NotificationService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The notification channel to which to send a verification code. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The notification channel to which to send a verification code. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service.php deleted file mode 100644 index 8b8aa5f3c2fe..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service.php +++ /dev/null @@ -1,608 +0,0 @@ -google.monitoring.v3.Service - */ -class Service extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. Resource name for this Service. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Name used for UI elements listing this Service. - * - * Generated from protobuf field string display_name = 2; - */ - protected $display_name = ''; - /** - * Message that contains the service type and service labels of this service - * if it is a basic service. - * Documentation and examples - * [here](https://cloud.google.com/stackdriver/docs/solutions/slo-monitoring/api/api-structures#basic-svc-w-basic-sli). - * - * Generated from protobuf field .google.monitoring.v3.Service.BasicService basic_service = 19; - */ - protected $basic_service = null; - /** - * Configuration for how to query telemetry on a Service. - * - * Generated from protobuf field .google.monitoring.v3.Service.Telemetry telemetry = 13; - */ - protected $telemetry = null; - /** - * Labels which have been used to annotate the service. Label keys must start - * with a letter. Label keys and values may contain lowercase letters, - * numbers, underscores, and dashes. Label keys and values have a maximum - * length of 63 characters, and must be less than 128 bytes in size. Up to 64 - * label entries may be stored. For labels which do not have a semantic value, - * the empty string may be supplied for the label value. - * - * Generated from protobuf field map user_labels = 14; - */ - private $user_labels; - protected $identifier; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. Resource name for this Service. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] - * @type string $display_name - * Name used for UI elements listing this Service. - * @type \Google\Cloud\Monitoring\V3\Service\Custom $custom - * Custom service type. - * @type \Google\Cloud\Monitoring\V3\Service\AppEngine $app_engine - * Type used for App Engine services. - * @type \Google\Cloud\Monitoring\V3\Service\CloudEndpoints $cloud_endpoints - * Type used for Cloud Endpoints services. - * @type \Google\Cloud\Monitoring\V3\Service\ClusterIstio $cluster_istio - * Type used for Istio services that live in a Kubernetes cluster. - * @type \Google\Cloud\Monitoring\V3\Service\MeshIstio $mesh_istio - * Type used for Istio services scoped to an Istio mesh. - * @type \Google\Cloud\Monitoring\V3\Service\IstioCanonicalService $istio_canonical_service - * Type used for canonical services scoped to an Istio mesh. - * Metrics for Istio are - * [documented here](https://istio.io/latest/docs/reference/config/metrics/) - * @type \Google\Cloud\Monitoring\V3\Service\CloudRun $cloud_run - * Type used for Cloud Run services. - * @type \Google\Cloud\Monitoring\V3\Service\GkeNamespace $gke_namespace - * Type used for GKE Namespaces. - * @type \Google\Cloud\Monitoring\V3\Service\GkeWorkload $gke_workload - * Type used for GKE Workloads. - * @type \Google\Cloud\Monitoring\V3\Service\GkeService $gke_service - * Type used for GKE Services (the Kubernetes concept of a service). - * @type \Google\Cloud\Monitoring\V3\Service\BasicService $basic_service - * Message that contains the service type and service labels of this service - * if it is a basic service. - * Documentation and examples - * [here](https://cloud.google.com/stackdriver/docs/solutions/slo-monitoring/api/api-structures#basic-svc-w-basic-sli). - * @type \Google\Cloud\Monitoring\V3\Service\Telemetry $telemetry - * Configuration for how to query telemetry on a Service. - * @type array|\Google\Protobuf\Internal\MapField $user_labels - * Labels which have been used to annotate the service. Label keys must start - * with a letter. Label keys and values may contain lowercase letters, - * numbers, underscores, and dashes. Label keys and values have a maximum - * length of 63 characters, and must be less than 128 bytes in size. Up to 64 - * label entries may be stored. For labels which do not have a semantic value, - * the empty string may be supplied for the label value. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\Service::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. Resource name for this Service. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. Resource name for this Service. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Name used for UI elements listing this Service. - * - * Generated from protobuf field string display_name = 2; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Name used for UI elements listing this Service. - * - * Generated from protobuf field string display_name = 2; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Custom service type. - * - * Generated from protobuf field .google.monitoring.v3.Service.Custom custom = 6; - * @return \Google\Cloud\Monitoring\V3\Service\Custom|null - */ - public function getCustom() - { - return $this->readOneof(6); - } - - public function hasCustom() - { - return $this->hasOneof(6); - } - - /** - * Custom service type. - * - * Generated from protobuf field .google.monitoring.v3.Service.Custom custom = 6; - * @param \Google\Cloud\Monitoring\V3\Service\Custom $var - * @return $this - */ - public function setCustom($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\Service\Custom::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * Type used for App Engine services. - * - * Generated from protobuf field .google.monitoring.v3.Service.AppEngine app_engine = 7; - * @return \Google\Cloud\Monitoring\V3\Service\AppEngine|null - */ - public function getAppEngine() - { - return $this->readOneof(7); - } - - public function hasAppEngine() - { - return $this->hasOneof(7); - } - - /** - * Type used for App Engine services. - * - * Generated from protobuf field .google.monitoring.v3.Service.AppEngine app_engine = 7; - * @param \Google\Cloud\Monitoring\V3\Service\AppEngine $var - * @return $this - */ - public function setAppEngine($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\Service\AppEngine::class); - $this->writeOneof(7, $var); - - return $this; - } - - /** - * Type used for Cloud Endpoints services. - * - * Generated from protobuf field .google.monitoring.v3.Service.CloudEndpoints cloud_endpoints = 8; - * @return \Google\Cloud\Monitoring\V3\Service\CloudEndpoints|null - */ - public function getCloudEndpoints() - { - return $this->readOneof(8); - } - - public function hasCloudEndpoints() - { - return $this->hasOneof(8); - } - - /** - * Type used for Cloud Endpoints services. - * - * Generated from protobuf field .google.monitoring.v3.Service.CloudEndpoints cloud_endpoints = 8; - * @param \Google\Cloud\Monitoring\V3\Service\CloudEndpoints $var - * @return $this - */ - public function setCloudEndpoints($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\Service\CloudEndpoints::class); - $this->writeOneof(8, $var); - - return $this; - } - - /** - * Type used for Istio services that live in a Kubernetes cluster. - * - * Generated from protobuf field .google.monitoring.v3.Service.ClusterIstio cluster_istio = 9; - * @return \Google\Cloud\Monitoring\V3\Service\ClusterIstio|null - */ - public function getClusterIstio() - { - return $this->readOneof(9); - } - - public function hasClusterIstio() - { - return $this->hasOneof(9); - } - - /** - * Type used for Istio services that live in a Kubernetes cluster. - * - * Generated from protobuf field .google.monitoring.v3.Service.ClusterIstio cluster_istio = 9; - * @param \Google\Cloud\Monitoring\V3\Service\ClusterIstio $var - * @return $this - */ - public function setClusterIstio($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\Service\ClusterIstio::class); - $this->writeOneof(9, $var); - - return $this; - } - - /** - * Type used for Istio services scoped to an Istio mesh. - * - * Generated from protobuf field .google.monitoring.v3.Service.MeshIstio mesh_istio = 10; - * @return \Google\Cloud\Monitoring\V3\Service\MeshIstio|null - */ - public function getMeshIstio() - { - return $this->readOneof(10); - } - - public function hasMeshIstio() - { - return $this->hasOneof(10); - } - - /** - * Type used for Istio services scoped to an Istio mesh. - * - * Generated from protobuf field .google.monitoring.v3.Service.MeshIstio mesh_istio = 10; - * @param \Google\Cloud\Monitoring\V3\Service\MeshIstio $var - * @return $this - */ - public function setMeshIstio($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\Service\MeshIstio::class); - $this->writeOneof(10, $var); - - return $this; - } - - /** - * Type used for canonical services scoped to an Istio mesh. - * Metrics for Istio are - * [documented here](https://istio.io/latest/docs/reference/config/metrics/) - * - * Generated from protobuf field .google.monitoring.v3.Service.IstioCanonicalService istio_canonical_service = 11; - * @return \Google\Cloud\Monitoring\V3\Service\IstioCanonicalService|null - */ - public function getIstioCanonicalService() - { - return $this->readOneof(11); - } - - public function hasIstioCanonicalService() - { - return $this->hasOneof(11); - } - - /** - * Type used for canonical services scoped to an Istio mesh. - * Metrics for Istio are - * [documented here](https://istio.io/latest/docs/reference/config/metrics/) - * - * Generated from protobuf field .google.monitoring.v3.Service.IstioCanonicalService istio_canonical_service = 11; - * @param \Google\Cloud\Monitoring\V3\Service\IstioCanonicalService $var - * @return $this - */ - public function setIstioCanonicalService($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\Service\IstioCanonicalService::class); - $this->writeOneof(11, $var); - - return $this; - } - - /** - * Type used for Cloud Run services. - * - * Generated from protobuf field .google.monitoring.v3.Service.CloudRun cloud_run = 12; - * @return \Google\Cloud\Monitoring\V3\Service\CloudRun|null - */ - public function getCloudRun() - { - return $this->readOneof(12); - } - - public function hasCloudRun() - { - return $this->hasOneof(12); - } - - /** - * Type used for Cloud Run services. - * - * Generated from protobuf field .google.monitoring.v3.Service.CloudRun cloud_run = 12; - * @param \Google\Cloud\Monitoring\V3\Service\CloudRun $var - * @return $this - */ - public function setCloudRun($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\Service\CloudRun::class); - $this->writeOneof(12, $var); - - return $this; - } - - /** - * Type used for GKE Namespaces. - * - * Generated from protobuf field .google.monitoring.v3.Service.GkeNamespace gke_namespace = 15; - * @return \Google\Cloud\Monitoring\V3\Service\GkeNamespace|null - */ - public function getGkeNamespace() - { - return $this->readOneof(15); - } - - public function hasGkeNamespace() - { - return $this->hasOneof(15); - } - - /** - * Type used for GKE Namespaces. - * - * Generated from protobuf field .google.monitoring.v3.Service.GkeNamespace gke_namespace = 15; - * @param \Google\Cloud\Monitoring\V3\Service\GkeNamespace $var - * @return $this - */ - public function setGkeNamespace($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\Service\GkeNamespace::class); - $this->writeOneof(15, $var); - - return $this; - } - - /** - * Type used for GKE Workloads. - * - * Generated from protobuf field .google.monitoring.v3.Service.GkeWorkload gke_workload = 16; - * @return \Google\Cloud\Monitoring\V3\Service\GkeWorkload|null - */ - public function getGkeWorkload() - { - return $this->readOneof(16); - } - - public function hasGkeWorkload() - { - return $this->hasOneof(16); - } - - /** - * Type used for GKE Workloads. - * - * Generated from protobuf field .google.monitoring.v3.Service.GkeWorkload gke_workload = 16; - * @param \Google\Cloud\Monitoring\V3\Service\GkeWorkload $var - * @return $this - */ - public function setGkeWorkload($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\Service\GkeWorkload::class); - $this->writeOneof(16, $var); - - return $this; - } - - /** - * Type used for GKE Services (the Kubernetes concept of a service). - * - * Generated from protobuf field .google.monitoring.v3.Service.GkeService gke_service = 17; - * @return \Google\Cloud\Monitoring\V3\Service\GkeService|null - */ - public function getGkeService() - { - return $this->readOneof(17); - } - - public function hasGkeService() - { - return $this->hasOneof(17); - } - - /** - * Type used for GKE Services (the Kubernetes concept of a service). - * - * Generated from protobuf field .google.monitoring.v3.Service.GkeService gke_service = 17; - * @param \Google\Cloud\Monitoring\V3\Service\GkeService $var - * @return $this - */ - public function setGkeService($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\Service\GkeService::class); - $this->writeOneof(17, $var); - - return $this; - } - - /** - * Message that contains the service type and service labels of this service - * if it is a basic service. - * Documentation and examples - * [here](https://cloud.google.com/stackdriver/docs/solutions/slo-monitoring/api/api-structures#basic-svc-w-basic-sli). - * - * Generated from protobuf field .google.monitoring.v3.Service.BasicService basic_service = 19; - * @return \Google\Cloud\Monitoring\V3\Service\BasicService|null - */ - public function getBasicService() - { - return $this->basic_service; - } - - public function hasBasicService() - { - return isset($this->basic_service); - } - - public function clearBasicService() - { - unset($this->basic_service); - } - - /** - * Message that contains the service type and service labels of this service - * if it is a basic service. - * Documentation and examples - * [here](https://cloud.google.com/stackdriver/docs/solutions/slo-monitoring/api/api-structures#basic-svc-w-basic-sli). - * - * Generated from protobuf field .google.monitoring.v3.Service.BasicService basic_service = 19; - * @param \Google\Cloud\Monitoring\V3\Service\BasicService $var - * @return $this - */ - public function setBasicService($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\Service\BasicService::class); - $this->basic_service = $var; - - return $this; - } - - /** - * Configuration for how to query telemetry on a Service. - * - * Generated from protobuf field .google.monitoring.v3.Service.Telemetry telemetry = 13; - * @return \Google\Cloud\Monitoring\V3\Service\Telemetry|null - */ - public function getTelemetry() - { - return $this->telemetry; - } - - public function hasTelemetry() - { - return isset($this->telemetry); - } - - public function clearTelemetry() - { - unset($this->telemetry); - } - - /** - * Configuration for how to query telemetry on a Service. - * - * Generated from protobuf field .google.monitoring.v3.Service.Telemetry telemetry = 13; - * @param \Google\Cloud\Monitoring\V3\Service\Telemetry $var - * @return $this - */ - public function setTelemetry($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\Service\Telemetry::class); - $this->telemetry = $var; - - return $this; - } - - /** - * Labels which have been used to annotate the service. Label keys must start - * with a letter. Label keys and values may contain lowercase letters, - * numbers, underscores, and dashes. Label keys and values have a maximum - * length of 63 characters, and must be less than 128 bytes in size. Up to 64 - * label entries may be stored. For labels which do not have a semantic value, - * the empty string may be supplied for the label value. - * - * Generated from protobuf field map user_labels = 14; - * @return \Google\Protobuf\Internal\MapField - */ - public function getUserLabels() - { - return $this->user_labels; - } - - /** - * Labels which have been used to annotate the service. Label keys must start - * with a letter. Label keys and values may contain lowercase letters, - * numbers, underscores, and dashes. Label keys and values have a maximum - * length of 63 characters, and must be less than 128 bytes in size. Up to 64 - * label entries may be stored. For labels which do not have a semantic value, - * the empty string may be supplied for the label value. - * - * Generated from protobuf field map user_labels = 14; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setUserLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->user_labels = $arr; - - return $this; - } - - /** - * @return string - */ - public function getIdentifier() - { - return $this->whichOneof("identifier"); - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service/AppEngine.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service/AppEngine.php deleted file mode 100644 index 7dd90e27a87e..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service/AppEngine.php +++ /dev/null @@ -1,78 +0,0 @@ -google.monitoring.v3.Service.AppEngine - */ -class AppEngine extends \Google\Protobuf\Internal\Message -{ - /** - * The ID of the App Engine module underlying this service. Corresponds to - * the `module_id` resource label in the [`gae_app` monitored - * resource](https://cloud.google.com/monitoring/api/resources#tag_gae_app). - * - * Generated from protobuf field string module_id = 1; - */ - protected $module_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $module_id - * The ID of the App Engine module underlying this service. Corresponds to - * the `module_id` resource label in the [`gae_app` monitored - * resource](https://cloud.google.com/monitoring/api/resources#tag_gae_app). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\Service::initOnce(); - parent::__construct($data); - } - - /** - * The ID of the App Engine module underlying this service. Corresponds to - * the `module_id` resource label in the [`gae_app` monitored - * resource](https://cloud.google.com/monitoring/api/resources#tag_gae_app). - * - * Generated from protobuf field string module_id = 1; - * @return string - */ - public function getModuleId() - { - return $this->module_id; - } - - /** - * The ID of the App Engine module underlying this service. Corresponds to - * the `module_id` resource label in the [`gae_app` monitored - * resource](https://cloud.google.com/monitoring/api/resources#tag_gae_app). - * - * Generated from protobuf field string module_id = 1; - * @param string $var - * @return $this - */ - public function setModuleId($var) - { - GPBUtil::checkString($var, True); - $this->module_id = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(AppEngine::class, \Google\Cloud\Monitoring\V3\Service_AppEngine::class); - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service/BasicService.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service/BasicService.php deleted file mode 100644 index 5efe00c1cda5..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service/BasicService.php +++ /dev/null @@ -1,130 +0,0 @@ -google.monitoring.v3.Service.BasicService - */ -class BasicService extends \Google\Protobuf\Internal\Message -{ - /** - * The type of service that this basic service defines, e.g. - * APP_ENGINE service type. - * Documentation and valid values - * [here](https://cloud.google.com/stackdriver/docs/solutions/slo-monitoring/api/api-structures#basic-svc-w-basic-sli). - * - * Generated from protobuf field string service_type = 1; - */ - protected $service_type = ''; - /** - * Labels that specify the resource that emits the monitoring data which - * is used for SLO reporting of this `Service`. - * Documentation and valid values for given service types - * [here](https://cloud.google.com/stackdriver/docs/solutions/slo-monitoring/api/api-structures#basic-svc-w-basic-sli). - * - * Generated from protobuf field map service_labels = 2; - */ - private $service_labels; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $service_type - * The type of service that this basic service defines, e.g. - * APP_ENGINE service type. - * Documentation and valid values - * [here](https://cloud.google.com/stackdriver/docs/solutions/slo-monitoring/api/api-structures#basic-svc-w-basic-sli). - * @type array|\Google\Protobuf\Internal\MapField $service_labels - * Labels that specify the resource that emits the monitoring data which - * is used for SLO reporting of this `Service`. - * Documentation and valid values for given service types - * [here](https://cloud.google.com/stackdriver/docs/solutions/slo-monitoring/api/api-structures#basic-svc-w-basic-sli). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\Service::initOnce(); - parent::__construct($data); - } - - /** - * The type of service that this basic service defines, e.g. - * APP_ENGINE service type. - * Documentation and valid values - * [here](https://cloud.google.com/stackdriver/docs/solutions/slo-monitoring/api/api-structures#basic-svc-w-basic-sli). - * - * Generated from protobuf field string service_type = 1; - * @return string - */ - public function getServiceType() - { - return $this->service_type; - } - - /** - * The type of service that this basic service defines, e.g. - * APP_ENGINE service type. - * Documentation and valid values - * [here](https://cloud.google.com/stackdriver/docs/solutions/slo-monitoring/api/api-structures#basic-svc-w-basic-sli). - * - * Generated from protobuf field string service_type = 1; - * @param string $var - * @return $this - */ - public function setServiceType($var) - { - GPBUtil::checkString($var, True); - $this->service_type = $var; - - return $this; - } - - /** - * Labels that specify the resource that emits the monitoring data which - * is used for SLO reporting of this `Service`. - * Documentation and valid values for given service types - * [here](https://cloud.google.com/stackdriver/docs/solutions/slo-monitoring/api/api-structures#basic-svc-w-basic-sli). - * - * Generated from protobuf field map service_labels = 2; - * @return \Google\Protobuf\Internal\MapField - */ - public function getServiceLabels() - { - return $this->service_labels; - } - - /** - * Labels that specify the resource that emits the monitoring data which - * is used for SLO reporting of this `Service`. - * Documentation and valid values for given service types - * [here](https://cloud.google.com/stackdriver/docs/solutions/slo-monitoring/api/api-structures#basic-svc-w-basic-sli). - * - * Generated from protobuf field map service_labels = 2; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setServiceLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->service_labels = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(BasicService::class, \Google\Cloud\Monitoring\V3\Service_BasicService::class); - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service/CloudEndpoints.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service/CloudEndpoints.php deleted file mode 100644 index 6560ccb0626d..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service/CloudEndpoints.php +++ /dev/null @@ -1,78 +0,0 @@ -google.monitoring.v3.Service.CloudEndpoints - */ -class CloudEndpoints extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the Cloud Endpoints service underlying this service. - * Corresponds to the `service` resource label in the [`api` monitored - * resource](https://cloud.google.com/monitoring/api/resources#tag_api). - * - * Generated from protobuf field string service = 1; - */ - protected $service = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $service - * The name of the Cloud Endpoints service underlying this service. - * Corresponds to the `service` resource label in the [`api` monitored - * resource](https://cloud.google.com/monitoring/api/resources#tag_api). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\Service::initOnce(); - parent::__construct($data); - } - - /** - * The name of the Cloud Endpoints service underlying this service. - * Corresponds to the `service` resource label in the [`api` monitored - * resource](https://cloud.google.com/monitoring/api/resources#tag_api). - * - * Generated from protobuf field string service = 1; - * @return string - */ - public function getService() - { - return $this->service; - } - - /** - * The name of the Cloud Endpoints service underlying this service. - * Corresponds to the `service` resource label in the [`api` monitored - * resource](https://cloud.google.com/monitoring/api/resources#tag_api). - * - * Generated from protobuf field string service = 1; - * @param string $var - * @return $this - */ - public function setService($var) - { - GPBUtil::checkString($var, True); - $this->service = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CloudEndpoints::class, \Google\Cloud\Monitoring\V3\Service_CloudEndpoints::class); - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service/CloudRun.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service/CloudRun.php deleted file mode 100644 index 05dd1da04bf8..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service/CloudRun.php +++ /dev/null @@ -1,120 +0,0 @@ -google.monitoring.v3.Service.CloudRun - */ -class CloudRun extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the Cloud Run service. Corresponds to the `service_name` - * resource label in the [`cloud_run_revision` monitored - * resource](https://cloud.google.com/monitoring/api/resources#tag_cloud_run_revision). - * - * Generated from protobuf field string service_name = 1; - */ - protected $service_name = ''; - /** - * The location the service is run. Corresponds to the `location` - * resource label in the [`cloud_run_revision` monitored - * resource](https://cloud.google.com/monitoring/api/resources#tag_cloud_run_revision). - * - * Generated from protobuf field string location = 2; - */ - protected $location = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $service_name - * The name of the Cloud Run service. Corresponds to the `service_name` - * resource label in the [`cloud_run_revision` monitored - * resource](https://cloud.google.com/monitoring/api/resources#tag_cloud_run_revision). - * @type string $location - * The location the service is run. Corresponds to the `location` - * resource label in the [`cloud_run_revision` monitored - * resource](https://cloud.google.com/monitoring/api/resources#tag_cloud_run_revision). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\Service::initOnce(); - parent::__construct($data); - } - - /** - * The name of the Cloud Run service. Corresponds to the `service_name` - * resource label in the [`cloud_run_revision` monitored - * resource](https://cloud.google.com/monitoring/api/resources#tag_cloud_run_revision). - * - * Generated from protobuf field string service_name = 1; - * @return string - */ - public function getServiceName() - { - return $this->service_name; - } - - /** - * The name of the Cloud Run service. Corresponds to the `service_name` - * resource label in the [`cloud_run_revision` monitored - * resource](https://cloud.google.com/monitoring/api/resources#tag_cloud_run_revision). - * - * Generated from protobuf field string service_name = 1; - * @param string $var - * @return $this - */ - public function setServiceName($var) - { - GPBUtil::checkString($var, True); - $this->service_name = $var; - - return $this; - } - - /** - * The location the service is run. Corresponds to the `location` - * resource label in the [`cloud_run_revision` monitored - * resource](https://cloud.google.com/monitoring/api/resources#tag_cloud_run_revision). - * - * Generated from protobuf field string location = 2; - * @return string - */ - public function getLocation() - { - return $this->location; - } - - /** - * The location the service is run. Corresponds to the `location` - * resource label in the [`cloud_run_revision` monitored - * resource](https://cloud.google.com/monitoring/api/resources#tag_cloud_run_revision). - * - * Generated from protobuf field string location = 2; - * @param string $var - * @return $this - */ - public function setLocation($var) - { - GPBUtil::checkString($var, True); - $this->location = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CloudRun::class, \Google\Cloud\Monitoring\V3\Service_CloudRun::class); - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service/ClusterIstio.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service/ClusterIstio.php deleted file mode 100644 index bcbab5c1818c..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service/ClusterIstio.php +++ /dev/null @@ -1,198 +0,0 @@ -google.monitoring.v3.Service.ClusterIstio - */ -class ClusterIstio extends \Google\Protobuf\Internal\Message -{ - /** - * The location of the Kubernetes cluster in which this Istio service is - * defined. Corresponds to the `location` resource label in `k8s_cluster` - * resources. - * - * Generated from protobuf field string location = 1; - */ - protected $location = ''; - /** - * The name of the Kubernetes cluster in which this Istio service is - * defined. Corresponds to the `cluster_name` resource label in - * `k8s_cluster` resources. - * - * Generated from protobuf field string cluster_name = 2; - */ - protected $cluster_name = ''; - /** - * The namespace of the Istio service underlying this service. Corresponds - * to the `destination_service_namespace` metric label in Istio metrics. - * - * Generated from protobuf field string service_namespace = 3; - */ - protected $service_namespace = ''; - /** - * The name of the Istio service underlying this service. Corresponds to the - * `destination_service_name` metric label in Istio metrics. - * - * Generated from protobuf field string service_name = 4; - */ - protected $service_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $location - * The location of the Kubernetes cluster in which this Istio service is - * defined. Corresponds to the `location` resource label in `k8s_cluster` - * resources. - * @type string $cluster_name - * The name of the Kubernetes cluster in which this Istio service is - * defined. Corresponds to the `cluster_name` resource label in - * `k8s_cluster` resources. - * @type string $service_namespace - * The namespace of the Istio service underlying this service. Corresponds - * to the `destination_service_namespace` metric label in Istio metrics. - * @type string $service_name - * The name of the Istio service underlying this service. Corresponds to the - * `destination_service_name` metric label in Istio metrics. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\Service::initOnce(); - parent::__construct($data); - } - - /** - * The location of the Kubernetes cluster in which this Istio service is - * defined. Corresponds to the `location` resource label in `k8s_cluster` - * resources. - * - * Generated from protobuf field string location = 1; - * @return string - */ - public function getLocation() - { - return $this->location; - } - - /** - * The location of the Kubernetes cluster in which this Istio service is - * defined. Corresponds to the `location` resource label in `k8s_cluster` - * resources. - * - * Generated from protobuf field string location = 1; - * @param string $var - * @return $this - */ - public function setLocation($var) - { - GPBUtil::checkString($var, True); - $this->location = $var; - - return $this; - } - - /** - * The name of the Kubernetes cluster in which this Istio service is - * defined. Corresponds to the `cluster_name` resource label in - * `k8s_cluster` resources. - * - * Generated from protobuf field string cluster_name = 2; - * @return string - */ - public function getClusterName() - { - return $this->cluster_name; - } - - /** - * The name of the Kubernetes cluster in which this Istio service is - * defined. Corresponds to the `cluster_name` resource label in - * `k8s_cluster` resources. - * - * Generated from protobuf field string cluster_name = 2; - * @param string $var - * @return $this - */ - public function setClusterName($var) - { - GPBUtil::checkString($var, True); - $this->cluster_name = $var; - - return $this; - } - - /** - * The namespace of the Istio service underlying this service. Corresponds - * to the `destination_service_namespace` metric label in Istio metrics. - * - * Generated from protobuf field string service_namespace = 3; - * @return string - */ - public function getServiceNamespace() - { - return $this->service_namespace; - } - - /** - * The namespace of the Istio service underlying this service. Corresponds - * to the `destination_service_namespace` metric label in Istio metrics. - * - * Generated from protobuf field string service_namespace = 3; - * @param string $var - * @return $this - */ - public function setServiceNamespace($var) - { - GPBUtil::checkString($var, True); - $this->service_namespace = $var; - - return $this; - } - - /** - * The name of the Istio service underlying this service. Corresponds to the - * `destination_service_name` metric label in Istio metrics. - * - * Generated from protobuf field string service_name = 4; - * @return string - */ - public function getServiceName() - { - return $this->service_name; - } - - /** - * The name of the Istio service underlying this service. Corresponds to the - * `destination_service_name` metric label in Istio metrics. - * - * Generated from protobuf field string service_name = 4; - * @param string $var - * @return $this - */ - public function setServiceName($var) - { - GPBUtil::checkString($var, True); - $this->service_name = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ClusterIstio::class, \Google\Cloud\Monitoring\V3\Service_ClusterIstio::class); - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service/Custom.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service/Custom.php deleted file mode 100644 index 03fb8595f374..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service/Custom.php +++ /dev/null @@ -1,38 +0,0 @@ -google.monitoring.v3.Service.Custom - */ -class Custom extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\Service::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Custom::class, \Google\Cloud\Monitoring\V3\Service_Custom::class); - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service/GkeNamespace.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service/GkeNamespace.php deleted file mode 100644 index 65c6e82d342d..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service/GkeNamespace.php +++ /dev/null @@ -1,182 +0,0 @@ -google.monitoring.v3.Service.GkeNamespace - */ -class GkeNamespace extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The project this resource lives in. For legacy services - * migrated from the `Custom` type, this may be a distinct project from the - * one parenting the service itself. - * - * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $project_id = ''; - /** - * The location of the parent cluster. This may be a zone or region. - * - * Generated from protobuf field string location = 2; - */ - protected $location = ''; - /** - * The name of the parent cluster. - * - * Generated from protobuf field string cluster_name = 3; - */ - protected $cluster_name = ''; - /** - * The name of this namespace. - * - * Generated from protobuf field string namespace_name = 4; - */ - protected $namespace_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $project_id - * Output only. The project this resource lives in. For legacy services - * migrated from the `Custom` type, this may be a distinct project from the - * one parenting the service itself. - * @type string $location - * The location of the parent cluster. This may be a zone or region. - * @type string $cluster_name - * The name of the parent cluster. - * @type string $namespace_name - * The name of this namespace. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\Service::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The project this resource lives in. For legacy services - * migrated from the `Custom` type, this may be a distinct project from the - * one parenting the service itself. - * - * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getProjectId() - { - return $this->project_id; - } - - /** - * Output only. The project this resource lives in. For legacy services - * migrated from the `Custom` type, this may be a distinct project from the - * one parenting the service itself. - * - * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setProjectId($var) - { - GPBUtil::checkString($var, True); - $this->project_id = $var; - - return $this; - } - - /** - * The location of the parent cluster. This may be a zone or region. - * - * Generated from protobuf field string location = 2; - * @return string - */ - public function getLocation() - { - return $this->location; - } - - /** - * The location of the parent cluster. This may be a zone or region. - * - * Generated from protobuf field string location = 2; - * @param string $var - * @return $this - */ - public function setLocation($var) - { - GPBUtil::checkString($var, True); - $this->location = $var; - - return $this; - } - - /** - * The name of the parent cluster. - * - * Generated from protobuf field string cluster_name = 3; - * @return string - */ - public function getClusterName() - { - return $this->cluster_name; - } - - /** - * The name of the parent cluster. - * - * Generated from protobuf field string cluster_name = 3; - * @param string $var - * @return $this - */ - public function setClusterName($var) - { - GPBUtil::checkString($var, True); - $this->cluster_name = $var; - - return $this; - } - - /** - * The name of this namespace. - * - * Generated from protobuf field string namespace_name = 4; - * @return string - */ - public function getNamespaceName() - { - return $this->namespace_name; - } - - /** - * The name of this namespace. - * - * Generated from protobuf field string namespace_name = 4; - * @param string $var - * @return $this - */ - public function setNamespaceName($var) - { - GPBUtil::checkString($var, True); - $this->namespace_name = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(GkeNamespace::class, \Google\Cloud\Monitoring\V3\Service_GkeNamespace::class); - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service/GkeService.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service/GkeService.php deleted file mode 100644 index 4b9bbf7606d7..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service/GkeService.php +++ /dev/null @@ -1,219 +0,0 @@ -google.monitoring.v3.Service.GkeService - */ -class GkeService extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The project this resource lives in. For legacy services - * migrated from the `Custom` type, this may be a distinct project from the - * one parenting the service itself. - * - * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $project_id = ''; - /** - * The location of the parent cluster. This may be a zone or region. - * - * Generated from protobuf field string location = 2; - */ - protected $location = ''; - /** - * The name of the parent cluster. - * - * Generated from protobuf field string cluster_name = 3; - */ - protected $cluster_name = ''; - /** - * The name of the parent namespace. - * - * Generated from protobuf field string namespace_name = 4; - */ - protected $namespace_name = ''; - /** - * The name of this service. - * - * Generated from protobuf field string service_name = 5; - */ - protected $service_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $project_id - * Output only. The project this resource lives in. For legacy services - * migrated from the `Custom` type, this may be a distinct project from the - * one parenting the service itself. - * @type string $location - * The location of the parent cluster. This may be a zone or region. - * @type string $cluster_name - * The name of the parent cluster. - * @type string $namespace_name - * The name of the parent namespace. - * @type string $service_name - * The name of this service. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\Service::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The project this resource lives in. For legacy services - * migrated from the `Custom` type, this may be a distinct project from the - * one parenting the service itself. - * - * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getProjectId() - { - return $this->project_id; - } - - /** - * Output only. The project this resource lives in. For legacy services - * migrated from the `Custom` type, this may be a distinct project from the - * one parenting the service itself. - * - * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setProjectId($var) - { - GPBUtil::checkString($var, True); - $this->project_id = $var; - - return $this; - } - - /** - * The location of the parent cluster. This may be a zone or region. - * - * Generated from protobuf field string location = 2; - * @return string - */ - public function getLocation() - { - return $this->location; - } - - /** - * The location of the parent cluster. This may be a zone or region. - * - * Generated from protobuf field string location = 2; - * @param string $var - * @return $this - */ - public function setLocation($var) - { - GPBUtil::checkString($var, True); - $this->location = $var; - - return $this; - } - - /** - * The name of the parent cluster. - * - * Generated from protobuf field string cluster_name = 3; - * @return string - */ - public function getClusterName() - { - return $this->cluster_name; - } - - /** - * The name of the parent cluster. - * - * Generated from protobuf field string cluster_name = 3; - * @param string $var - * @return $this - */ - public function setClusterName($var) - { - GPBUtil::checkString($var, True); - $this->cluster_name = $var; - - return $this; - } - - /** - * The name of the parent namespace. - * - * Generated from protobuf field string namespace_name = 4; - * @return string - */ - public function getNamespaceName() - { - return $this->namespace_name; - } - - /** - * The name of the parent namespace. - * - * Generated from protobuf field string namespace_name = 4; - * @param string $var - * @return $this - */ - public function setNamespaceName($var) - { - GPBUtil::checkString($var, True); - $this->namespace_name = $var; - - return $this; - } - - /** - * The name of this service. - * - * Generated from protobuf field string service_name = 5; - * @return string - */ - public function getServiceName() - { - return $this->service_name; - } - - /** - * The name of this service. - * - * Generated from protobuf field string service_name = 5; - * @param string $var - * @return $this - */ - public function setServiceName($var) - { - GPBUtil::checkString($var, True); - $this->service_name = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(GkeService::class, \Google\Cloud\Monitoring\V3\Service_GkeService::class); - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service/GkeWorkload.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service/GkeWorkload.php deleted file mode 100644 index 7ec62cebfe7a..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service/GkeWorkload.php +++ /dev/null @@ -1,250 +0,0 @@ -google.monitoring.v3.Service.GkeWorkload - */ -class GkeWorkload extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The project this resource lives in. For legacy services - * migrated from the `Custom` type, this may be a distinct project from the - * one parenting the service itself. - * - * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $project_id = ''; - /** - * The location of the parent cluster. This may be a zone or region. - * - * Generated from protobuf field string location = 2; - */ - protected $location = ''; - /** - * The name of the parent cluster. - * - * Generated from protobuf field string cluster_name = 3; - */ - protected $cluster_name = ''; - /** - * The name of the parent namespace. - * - * Generated from protobuf field string namespace_name = 4; - */ - protected $namespace_name = ''; - /** - * The type of this workload (for example, "Deployment" or "DaemonSet") - * - * Generated from protobuf field string top_level_controller_type = 5; - */ - protected $top_level_controller_type = ''; - /** - * The name of this workload. - * - * Generated from protobuf field string top_level_controller_name = 6; - */ - protected $top_level_controller_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $project_id - * Output only. The project this resource lives in. For legacy services - * migrated from the `Custom` type, this may be a distinct project from the - * one parenting the service itself. - * @type string $location - * The location of the parent cluster. This may be a zone or region. - * @type string $cluster_name - * The name of the parent cluster. - * @type string $namespace_name - * The name of the parent namespace. - * @type string $top_level_controller_type - * The type of this workload (for example, "Deployment" or "DaemonSet") - * @type string $top_level_controller_name - * The name of this workload. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\Service::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The project this resource lives in. For legacy services - * migrated from the `Custom` type, this may be a distinct project from the - * one parenting the service itself. - * - * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getProjectId() - { - return $this->project_id; - } - - /** - * Output only. The project this resource lives in. For legacy services - * migrated from the `Custom` type, this may be a distinct project from the - * one parenting the service itself. - * - * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setProjectId($var) - { - GPBUtil::checkString($var, True); - $this->project_id = $var; - - return $this; - } - - /** - * The location of the parent cluster. This may be a zone or region. - * - * Generated from protobuf field string location = 2; - * @return string - */ - public function getLocation() - { - return $this->location; - } - - /** - * The location of the parent cluster. This may be a zone or region. - * - * Generated from protobuf field string location = 2; - * @param string $var - * @return $this - */ - public function setLocation($var) - { - GPBUtil::checkString($var, True); - $this->location = $var; - - return $this; - } - - /** - * The name of the parent cluster. - * - * Generated from protobuf field string cluster_name = 3; - * @return string - */ - public function getClusterName() - { - return $this->cluster_name; - } - - /** - * The name of the parent cluster. - * - * Generated from protobuf field string cluster_name = 3; - * @param string $var - * @return $this - */ - public function setClusterName($var) - { - GPBUtil::checkString($var, True); - $this->cluster_name = $var; - - return $this; - } - - /** - * The name of the parent namespace. - * - * Generated from protobuf field string namespace_name = 4; - * @return string - */ - public function getNamespaceName() - { - return $this->namespace_name; - } - - /** - * The name of the parent namespace. - * - * Generated from protobuf field string namespace_name = 4; - * @param string $var - * @return $this - */ - public function setNamespaceName($var) - { - GPBUtil::checkString($var, True); - $this->namespace_name = $var; - - return $this; - } - - /** - * The type of this workload (for example, "Deployment" or "DaemonSet") - * - * Generated from protobuf field string top_level_controller_type = 5; - * @return string - */ - public function getTopLevelControllerType() - { - return $this->top_level_controller_type; - } - - /** - * The type of this workload (for example, "Deployment" or "DaemonSet") - * - * Generated from protobuf field string top_level_controller_type = 5; - * @param string $var - * @return $this - */ - public function setTopLevelControllerType($var) - { - GPBUtil::checkString($var, True); - $this->top_level_controller_type = $var; - - return $this; - } - - /** - * The name of this workload. - * - * Generated from protobuf field string top_level_controller_name = 6; - * @return string - */ - public function getTopLevelControllerName() - { - return $this->top_level_controller_name; - } - - /** - * The name of this workload. - * - * Generated from protobuf field string top_level_controller_name = 6; - * @param string $var - * @return $this - */ - public function setTopLevelControllerName($var) - { - GPBUtil::checkString($var, True); - $this->top_level_controller_name = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(GkeWorkload::class, \Google\Cloud\Monitoring\V3\Service_GkeWorkload::class); - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service/IstioCanonicalService.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service/IstioCanonicalService.php deleted file mode 100644 index 0feb3f3aaa8c..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service/IstioCanonicalService.php +++ /dev/null @@ -1,171 +0,0 @@ -= - * 1.6.8 will have their services ingested as this type. - * - * Generated from protobuf message google.monitoring.v3.Service.IstioCanonicalService - */ -class IstioCanonicalService extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier for the Istio mesh in which this canonical service is defined. - * Corresponds to the `mesh_uid` metric label in - * [Istio metrics](https://cloud.google.com/monitoring/api/metrics_istio). - * - * Generated from protobuf field string mesh_uid = 1; - */ - protected $mesh_uid = ''; - /** - * The namespace of the canonical service underlying this service. - * Corresponds to the `destination_canonical_service_namespace` metric - * label in [Istio - * metrics](https://cloud.google.com/monitoring/api/metrics_istio). - * - * Generated from protobuf field string canonical_service_namespace = 3; - */ - protected $canonical_service_namespace = ''; - /** - * The name of the canonical service underlying this service. - * Corresponds to the `destination_canonical_service_name` metric label in - * label in [Istio - * metrics](https://cloud.google.com/monitoring/api/metrics_istio). - * - * Generated from protobuf field string canonical_service = 4; - */ - protected $canonical_service = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $mesh_uid - * Identifier for the Istio mesh in which this canonical service is defined. - * Corresponds to the `mesh_uid` metric label in - * [Istio metrics](https://cloud.google.com/monitoring/api/metrics_istio). - * @type string $canonical_service_namespace - * The namespace of the canonical service underlying this service. - * Corresponds to the `destination_canonical_service_namespace` metric - * label in [Istio - * metrics](https://cloud.google.com/monitoring/api/metrics_istio). - * @type string $canonical_service - * The name of the canonical service underlying this service. - * Corresponds to the `destination_canonical_service_name` metric label in - * label in [Istio - * metrics](https://cloud.google.com/monitoring/api/metrics_istio). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\Service::initOnce(); - parent::__construct($data); - } - - /** - * Identifier for the Istio mesh in which this canonical service is defined. - * Corresponds to the `mesh_uid` metric label in - * [Istio metrics](https://cloud.google.com/monitoring/api/metrics_istio). - * - * Generated from protobuf field string mesh_uid = 1; - * @return string - */ - public function getMeshUid() - { - return $this->mesh_uid; - } - - /** - * Identifier for the Istio mesh in which this canonical service is defined. - * Corresponds to the `mesh_uid` metric label in - * [Istio metrics](https://cloud.google.com/monitoring/api/metrics_istio). - * - * Generated from protobuf field string mesh_uid = 1; - * @param string $var - * @return $this - */ - public function setMeshUid($var) - { - GPBUtil::checkString($var, True); - $this->mesh_uid = $var; - - return $this; - } - - /** - * The namespace of the canonical service underlying this service. - * Corresponds to the `destination_canonical_service_namespace` metric - * label in [Istio - * metrics](https://cloud.google.com/monitoring/api/metrics_istio). - * - * Generated from protobuf field string canonical_service_namespace = 3; - * @return string - */ - public function getCanonicalServiceNamespace() - { - return $this->canonical_service_namespace; - } - - /** - * The namespace of the canonical service underlying this service. - * Corresponds to the `destination_canonical_service_namespace` metric - * label in [Istio - * metrics](https://cloud.google.com/monitoring/api/metrics_istio). - * - * Generated from protobuf field string canonical_service_namespace = 3; - * @param string $var - * @return $this - */ - public function setCanonicalServiceNamespace($var) - { - GPBUtil::checkString($var, True); - $this->canonical_service_namespace = $var; - - return $this; - } - - /** - * The name of the canonical service underlying this service. - * Corresponds to the `destination_canonical_service_name` metric label in - * label in [Istio - * metrics](https://cloud.google.com/monitoring/api/metrics_istio). - * - * Generated from protobuf field string canonical_service = 4; - * @return string - */ - public function getCanonicalService() - { - return $this->canonical_service; - } - - /** - * The name of the canonical service underlying this service. - * Corresponds to the `destination_canonical_service_name` metric label in - * label in [Istio - * metrics](https://cloud.google.com/monitoring/api/metrics_istio). - * - * Generated from protobuf field string canonical_service = 4; - * @param string $var - * @return $this - */ - public function setCanonicalService($var) - { - GPBUtil::checkString($var, True); - $this->canonical_service = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(IstioCanonicalService::class, \Google\Cloud\Monitoring\V3\Service_IstioCanonicalService::class); - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service/MeshIstio.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service/MeshIstio.php deleted file mode 100644 index e90ac6f8b63a..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service/MeshIstio.php +++ /dev/null @@ -1,151 +0,0 @@ -google.monitoring.v3.Service.MeshIstio - */ -class MeshIstio extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier for the mesh in which this Istio service is defined. - * Corresponds to the `mesh_uid` metric label in Istio metrics. - * - * Generated from protobuf field string mesh_uid = 1; - */ - protected $mesh_uid = ''; - /** - * The namespace of the Istio service underlying this service. Corresponds - * to the `destination_service_namespace` metric label in Istio metrics. - * - * Generated from protobuf field string service_namespace = 3; - */ - protected $service_namespace = ''; - /** - * The name of the Istio service underlying this service. Corresponds to the - * `destination_service_name` metric label in Istio metrics. - * - * Generated from protobuf field string service_name = 4; - */ - protected $service_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $mesh_uid - * Identifier for the mesh in which this Istio service is defined. - * Corresponds to the `mesh_uid` metric label in Istio metrics. - * @type string $service_namespace - * The namespace of the Istio service underlying this service. Corresponds - * to the `destination_service_namespace` metric label in Istio metrics. - * @type string $service_name - * The name of the Istio service underlying this service. Corresponds to the - * `destination_service_name` metric label in Istio metrics. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\Service::initOnce(); - parent::__construct($data); - } - - /** - * Identifier for the mesh in which this Istio service is defined. - * Corresponds to the `mesh_uid` metric label in Istio metrics. - * - * Generated from protobuf field string mesh_uid = 1; - * @return string - */ - public function getMeshUid() - { - return $this->mesh_uid; - } - - /** - * Identifier for the mesh in which this Istio service is defined. - * Corresponds to the `mesh_uid` metric label in Istio metrics. - * - * Generated from protobuf field string mesh_uid = 1; - * @param string $var - * @return $this - */ - public function setMeshUid($var) - { - GPBUtil::checkString($var, True); - $this->mesh_uid = $var; - - return $this; - } - - /** - * The namespace of the Istio service underlying this service. Corresponds - * to the `destination_service_namespace` metric label in Istio metrics. - * - * Generated from protobuf field string service_namespace = 3; - * @return string - */ - public function getServiceNamespace() - { - return $this->service_namespace; - } - - /** - * The namespace of the Istio service underlying this service. Corresponds - * to the `destination_service_namespace` metric label in Istio metrics. - * - * Generated from protobuf field string service_namespace = 3; - * @param string $var - * @return $this - */ - public function setServiceNamespace($var) - { - GPBUtil::checkString($var, True); - $this->service_namespace = $var; - - return $this; - } - - /** - * The name of the Istio service underlying this service. Corresponds to the - * `destination_service_name` metric label in Istio metrics. - * - * Generated from protobuf field string service_name = 4; - * @return string - */ - public function getServiceName() - { - return $this->service_name; - } - - /** - * The name of the Istio service underlying this service. Corresponds to the - * `destination_service_name` metric label in Istio metrics. - * - * Generated from protobuf field string service_name = 4; - * @param string $var - * @return $this - */ - public function setServiceName($var) - { - GPBUtil::checkString($var, True); - $this->service_name = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(MeshIstio::class, \Google\Cloud\Monitoring\V3\Service_MeshIstio::class); - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service/Telemetry.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service/Telemetry.php deleted file mode 100644 index 6bb4bd890866..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Service/Telemetry.php +++ /dev/null @@ -1,74 +0,0 @@ -google.monitoring.v3.Service.Telemetry - */ -class Telemetry extends \Google\Protobuf\Internal\Message -{ - /** - * The full name of the resource that defines this service. Formatted as - * described in https://cloud.google.com/apis/design/resource_names. - * - * Generated from protobuf field string resource_name = 1; - */ - protected $resource_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $resource_name - * The full name of the resource that defines this service. Formatted as - * described in https://cloud.google.com/apis/design/resource_names. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\Service::initOnce(); - parent::__construct($data); - } - - /** - * The full name of the resource that defines this service. Formatted as - * described in https://cloud.google.com/apis/design/resource_names. - * - * Generated from protobuf field string resource_name = 1; - * @return string - */ - public function getResourceName() - { - return $this->resource_name; - } - - /** - * The full name of the resource that defines this service. Formatted as - * described in https://cloud.google.com/apis/design/resource_names. - * - * Generated from protobuf field string resource_name = 1; - * @param string $var - * @return $this - */ - public function setResourceName($var) - { - GPBUtil::checkString($var, True); - $this->resource_name = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Telemetry::class, \Google\Cloud\Monitoring\V3\Service_Telemetry::class); - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ServiceLevelIndicator.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ServiceLevelIndicator.php deleted file mode 100644 index a1d08a4e348f..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ServiceLevelIndicator.php +++ /dev/null @@ -1,153 +0,0 @@ -google.monitoring.v3.ServiceLevelIndicator - */ -class ServiceLevelIndicator extends \Google\Protobuf\Internal\Message -{ - protected $type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Monitoring\V3\BasicSli $basic_sli - * Basic SLI on a well-known service type. - * @type \Google\Cloud\Monitoring\V3\RequestBasedSli $request_based - * Request-based SLIs - * @type \Google\Cloud\Monitoring\V3\WindowsBasedSli $windows_based - * Windows-based SLIs - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\Service::initOnce(); - parent::__construct($data); - } - - /** - * Basic SLI on a well-known service type. - * - * Generated from protobuf field .google.monitoring.v3.BasicSli basic_sli = 4; - * @return \Google\Cloud\Monitoring\V3\BasicSli|null - */ - public function getBasicSli() - { - return $this->readOneof(4); - } - - public function hasBasicSli() - { - return $this->hasOneof(4); - } - - /** - * Basic SLI on a well-known service type. - * - * Generated from protobuf field .google.monitoring.v3.BasicSli basic_sli = 4; - * @param \Google\Cloud\Monitoring\V3\BasicSli $var - * @return $this - */ - public function setBasicSli($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\BasicSli::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Request-based SLIs - * - * Generated from protobuf field .google.monitoring.v3.RequestBasedSli request_based = 1; - * @return \Google\Cloud\Monitoring\V3\RequestBasedSli|null - */ - public function getRequestBased() - { - return $this->readOneof(1); - } - - public function hasRequestBased() - { - return $this->hasOneof(1); - } - - /** - * Request-based SLIs - * - * Generated from protobuf field .google.monitoring.v3.RequestBasedSli request_based = 1; - * @param \Google\Cloud\Monitoring\V3\RequestBasedSli $var - * @return $this - */ - public function setRequestBased($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\RequestBasedSli::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Windows-based SLIs - * - * Generated from protobuf field .google.monitoring.v3.WindowsBasedSli windows_based = 2; - * @return \Google\Cloud\Monitoring\V3\WindowsBasedSli|null - */ - public function getWindowsBased() - { - return $this->readOneof(2); - } - - public function hasWindowsBased() - { - return $this->hasOneof(2); - } - - /** - * Windows-based SLIs - * - * Generated from protobuf field .google.monitoring.v3.WindowsBasedSli windows_based = 2; - * @param \Google\Cloud\Monitoring\V3\WindowsBasedSli $var - * @return $this - */ - public function setWindowsBased($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\WindowsBasedSli::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * @return string - */ - public function getType() - { - return $this->whichOneof("type"); - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ServiceLevelObjective.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ServiceLevelObjective.php deleted file mode 100644 index cbbc662feda8..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ServiceLevelObjective.php +++ /dev/null @@ -1,338 +0,0 @@ -google.monitoring.v3.ServiceLevelObjective - */ -class ServiceLevelObjective extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. Resource name for this `ServiceLevelObjective`. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME] - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Name used for UI elements listing this SLO. - * - * Generated from protobuf field string display_name = 11; - */ - protected $display_name = ''; - /** - * The definition of good service, used to measure and calculate the quality - * of the `Service`'s performance with respect to a single aspect of service - * quality. - * - * Generated from protobuf field .google.monitoring.v3.ServiceLevelIndicator service_level_indicator = 3; - */ - protected $service_level_indicator = null; - /** - * The fraction of service that must be good in order for this objective to be - * met. `0 < goal <= 0.999`. - * - * Generated from protobuf field double goal = 4; - */ - protected $goal = 0.0; - /** - * Labels which have been used to annotate the service-level objective. Label - * keys must start with a letter. Label keys and values may contain lowercase - * letters, numbers, underscores, and dashes. Label keys and values have a - * maximum length of 63 characters, and must be less than 128 bytes in size. - * Up to 64 label entries may be stored. For labels which do not have a - * semantic value, the empty string may be supplied for the label value. - * - * Generated from protobuf field map user_labels = 12; - */ - private $user_labels; - protected $period; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. Resource name for this `ServiceLevelObjective`. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME] - * @type string $display_name - * Name used for UI elements listing this SLO. - * @type \Google\Cloud\Monitoring\V3\ServiceLevelIndicator $service_level_indicator - * The definition of good service, used to measure and calculate the quality - * of the `Service`'s performance with respect to a single aspect of service - * quality. - * @type float $goal - * The fraction of service that must be good in order for this objective to be - * met. `0 < goal <= 0.999`. - * @type \Google\Protobuf\Duration $rolling_period - * A rolling time period, semantically "in the past ``". - * Must be an integer multiple of 1 day no larger than 30 days. - * @type int $calendar_period - * A calendar period, semantically "since the start of the current - * ``". At this time, only `DAY`, `WEEK`, `FORTNIGHT`, and - * `MONTH` are supported. - * @type array|\Google\Protobuf\Internal\MapField $user_labels - * Labels which have been used to annotate the service-level objective. Label - * keys must start with a letter. Label keys and values may contain lowercase - * letters, numbers, underscores, and dashes. Label keys and values have a - * maximum length of 63 characters, and must be less than 128 bytes in size. - * Up to 64 label entries may be stored. For labels which do not have a - * semantic value, the empty string may be supplied for the label value. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\Service::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. Resource name for this `ServiceLevelObjective`. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME] - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. Resource name for this `ServiceLevelObjective`. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME] - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Name used for UI elements listing this SLO. - * - * Generated from protobuf field string display_name = 11; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Name used for UI elements listing this SLO. - * - * Generated from protobuf field string display_name = 11; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * The definition of good service, used to measure and calculate the quality - * of the `Service`'s performance with respect to a single aspect of service - * quality. - * - * Generated from protobuf field .google.monitoring.v3.ServiceLevelIndicator service_level_indicator = 3; - * @return \Google\Cloud\Monitoring\V3\ServiceLevelIndicator|null - */ - public function getServiceLevelIndicator() - { - return $this->service_level_indicator; - } - - public function hasServiceLevelIndicator() - { - return isset($this->service_level_indicator); - } - - public function clearServiceLevelIndicator() - { - unset($this->service_level_indicator); - } - - /** - * The definition of good service, used to measure and calculate the quality - * of the `Service`'s performance with respect to a single aspect of service - * quality. - * - * Generated from protobuf field .google.monitoring.v3.ServiceLevelIndicator service_level_indicator = 3; - * @param \Google\Cloud\Monitoring\V3\ServiceLevelIndicator $var - * @return $this - */ - public function setServiceLevelIndicator($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\ServiceLevelIndicator::class); - $this->service_level_indicator = $var; - - return $this; - } - - /** - * The fraction of service that must be good in order for this objective to be - * met. `0 < goal <= 0.999`. - * - * Generated from protobuf field double goal = 4; - * @return float - */ - public function getGoal() - { - return $this->goal; - } - - /** - * The fraction of service that must be good in order for this objective to be - * met. `0 < goal <= 0.999`. - * - * Generated from protobuf field double goal = 4; - * @param float $var - * @return $this - */ - public function setGoal($var) - { - GPBUtil::checkDouble($var); - $this->goal = $var; - - return $this; - } - - /** - * A rolling time period, semantically "in the past ``". - * Must be an integer multiple of 1 day no larger than 30 days. - * - * Generated from protobuf field .google.protobuf.Duration rolling_period = 5; - * @return \Google\Protobuf\Duration|null - */ - public function getRollingPeriod() - { - return $this->readOneof(5); - } - - public function hasRollingPeriod() - { - return $this->hasOneof(5); - } - - /** - * A rolling time period, semantically "in the past ``". - * Must be an integer multiple of 1 day no larger than 30 days. - * - * Generated from protobuf field .google.protobuf.Duration rolling_period = 5; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setRollingPeriod($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * A calendar period, semantically "since the start of the current - * ``". At this time, only `DAY`, `WEEK`, `FORTNIGHT`, and - * `MONTH` are supported. - * - * Generated from protobuf field .google.type.CalendarPeriod calendar_period = 6; - * @return int - */ - public function getCalendarPeriod() - { - return $this->readOneof(6); - } - - public function hasCalendarPeriod() - { - return $this->hasOneof(6); - } - - /** - * A calendar period, semantically "since the start of the current - * ``". At this time, only `DAY`, `WEEK`, `FORTNIGHT`, and - * `MONTH` are supported. - * - * Generated from protobuf field .google.type.CalendarPeriod calendar_period = 6; - * @param int $var - * @return $this - */ - public function setCalendarPeriod($var) - { - GPBUtil::checkEnum($var, \Google\Type\CalendarPeriod::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * Labels which have been used to annotate the service-level objective. Label - * keys must start with a letter. Label keys and values may contain lowercase - * letters, numbers, underscores, and dashes. Label keys and values have a - * maximum length of 63 characters, and must be less than 128 bytes in size. - * Up to 64 label entries may be stored. For labels which do not have a - * semantic value, the empty string may be supplied for the label value. - * - * Generated from protobuf field map user_labels = 12; - * @return \Google\Protobuf\Internal\MapField - */ - public function getUserLabels() - { - return $this->user_labels; - } - - /** - * Labels which have been used to annotate the service-level objective. Label - * keys must start with a letter. Label keys and values may contain lowercase - * letters, numbers, underscores, and dashes. Label keys and values have a - * maximum length of 63 characters, and must be less than 128 bytes in size. - * Up to 64 label entries may be stored. For labels which do not have a - * semantic value, the empty string may be supplied for the label value. - * - * Generated from protobuf field map user_labels = 12; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setUserLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->user_labels = $arr; - - return $this; - } - - /** - * @return string - */ - public function getPeriod() - { - return $this->whichOneof("period"); - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ServiceLevelObjective/View.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ServiceLevelObjective/View.php deleted file mode 100644 index a21fbcb25964..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ServiceLevelObjective/View.php +++ /dev/null @@ -1,71 +0,0 @@ -google.monitoring.v3.ServiceLevelObjective.View - */ -class View -{ - /** - * Same as FULL. - * - * Generated from protobuf enum VIEW_UNSPECIFIED = 0; - */ - const VIEW_UNSPECIFIED = 0; - /** - * Return the embedded `ServiceLevelIndicator` in the form in which it was - * defined. If it was defined using a `BasicSli`, return that `BasicSli`. - * - * Generated from protobuf enum FULL = 2; - */ - const FULL = 2; - /** - * For `ServiceLevelIndicator`s using `BasicSli` articulation, instead - * return the `ServiceLevelIndicator` with its mode of computation fully - * spelled out as a `RequestBasedSli`. For `ServiceLevelIndicator`s using - * `RequestBasedSli` or `WindowsBasedSli`, return the - * `ServiceLevelIndicator` as it was provided. - * - * Generated from protobuf enum EXPLICIT = 1; - */ - const EXPLICIT = 1; - - private static $valueToName = [ - self::VIEW_UNSPECIFIED => 'VIEW_UNSPECIFIED', - self::FULL => 'FULL', - self::EXPLICIT => 'EXPLICIT', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(View::class, \Google\Cloud\Monitoring\V3\ServiceLevelObjective_View::class); - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ServiceTier.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ServiceTier.php deleted file mode 100644 index 906682308486..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/ServiceTier.php +++ /dev/null @@ -1,74 +0,0 @@ -google.monitoring.v3.ServiceTier - */ -class ServiceTier -{ - /** - * An invalid sentinel value, used to indicate that a tier has not - * been provided explicitly. - * - * Generated from protobuf enum SERVICE_TIER_UNSPECIFIED = 0; - */ - const SERVICE_TIER_UNSPECIFIED = 0; - /** - * The Cloud Monitoring Basic tier, a free tier of service that provides basic - * features, a moderate allotment of logs, and access to built-in metrics. - * A number of features are not available in this tier. For more details, - * see [the service tiers - * documentation](https://cloud.google.com/monitoring/workspaces/tiers). - * - * Generated from protobuf enum SERVICE_TIER_BASIC = 1; - */ - const SERVICE_TIER_BASIC = 1; - /** - * The Cloud Monitoring Premium tier, a higher, more expensive tier of service - * that provides access to all Cloud Monitoring features, lets you use Cloud - * Monitoring with AWS accounts, and has a larger allotments for logs and - * metrics. For more details, see [the service tiers - * documentation](https://cloud.google.com/monitoring/workspaces/tiers). - * - * Generated from protobuf enum SERVICE_TIER_PREMIUM = 2; - */ - const SERVICE_TIER_PREMIUM = 2; - - private static $valueToName = [ - self::SERVICE_TIER_UNSPECIFIED => 'SERVICE_TIER_UNSPECIFIED', - self::SERVICE_TIER_BASIC => 'SERVICE_TIER_BASIC', - self::SERVICE_TIER_PREMIUM => 'SERVICE_TIER_PREMIUM', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Snooze.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Snooze.php deleted file mode 100644 index c5f17a47719f..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Snooze.php +++ /dev/null @@ -1,224 +0,0 @@ -google.monitoring.v3.Snooze - */ -class Snooze extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Identifier. The name of the `Snooze`. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/snoozes/[SNOOZE_ID] - * The ID of the `Snooze` will be generated by the system. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Required. This defines the criteria for applying the `Snooze`. See - * `Criteria` for more information. - * - * Generated from protobuf field .google.monitoring.v3.Snooze.Criteria criteria = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $criteria = null; - /** - * Required. The `Snooze` will be active from `interval.start_time` through - * `interval.end_time`. - * `interval.start_time` cannot be in the past. There is a 15 second clock - * skew to account for the time it takes for a request to reach the API from - * the UI. - * - * Generated from protobuf field .google.monitoring.v3.TimeInterval interval = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $interval = null; - /** - * Required. A display name for the `Snooze`. This can be, at most, 512 - * unicode characters. - * - * Generated from protobuf field string display_name = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $display_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Identifier. The name of the `Snooze`. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/snoozes/[SNOOZE_ID] - * The ID of the `Snooze` will be generated by the system. - * @type \Google\Cloud\Monitoring\V3\Snooze\Criteria $criteria - * Required. This defines the criteria for applying the `Snooze`. See - * `Criteria` for more information. - * @type \Google\Cloud\Monitoring\V3\TimeInterval $interval - * Required. The `Snooze` will be active from `interval.start_time` through - * `interval.end_time`. - * `interval.start_time` cannot be in the past. There is a 15 second clock - * skew to account for the time it takes for a request to reach the API from - * the UI. - * @type string $display_name - * Required. A display name for the `Snooze`. This can be, at most, 512 - * unicode characters. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\Snooze::initOnce(); - parent::__construct($data); - } - - /** - * Required. Identifier. The name of the `Snooze`. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/snoozes/[SNOOZE_ID] - * The ID of the `Snooze` will be generated by the system. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Identifier. The name of the `Snooze`. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/snoozes/[SNOOZE_ID] - * The ID of the `Snooze` will be generated by the system. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. This defines the criteria for applying the `Snooze`. See - * `Criteria` for more information. - * - * Generated from protobuf field .google.monitoring.v3.Snooze.Criteria criteria = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Monitoring\V3\Snooze\Criteria|null - */ - public function getCriteria() - { - return $this->criteria; - } - - public function hasCriteria() - { - return isset($this->criteria); - } - - public function clearCriteria() - { - unset($this->criteria); - } - - /** - * Required. This defines the criteria for applying the `Snooze`. See - * `Criteria` for more information. - * - * Generated from protobuf field .google.monitoring.v3.Snooze.Criteria criteria = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Monitoring\V3\Snooze\Criteria $var - * @return $this - */ - public function setCriteria($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\Snooze\Criteria::class); - $this->criteria = $var; - - return $this; - } - - /** - * Required. The `Snooze` will be active from `interval.start_time` through - * `interval.end_time`. - * `interval.start_time` cannot be in the past. There is a 15 second clock - * skew to account for the time it takes for a request to reach the API from - * the UI. - * - * Generated from protobuf field .google.monitoring.v3.TimeInterval interval = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Monitoring\V3\TimeInterval|null - */ - public function getInterval() - { - return $this->interval; - } - - public function hasInterval() - { - return isset($this->interval); - } - - public function clearInterval() - { - unset($this->interval); - } - - /** - * Required. The `Snooze` will be active from `interval.start_time` through - * `interval.end_time`. - * `interval.start_time` cannot be in the past. There is a 15 second clock - * skew to account for the time it takes for a request to reach the API from - * the UI. - * - * Generated from protobuf field .google.monitoring.v3.TimeInterval interval = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Monitoring\V3\TimeInterval $var - * @return $this - */ - public function setInterval($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\TimeInterval::class); - $this->interval = $var; - - return $this; - } - - /** - * Required. A display name for the `Snooze`. This can be, at most, 512 - * unicode characters. - * - * Generated from protobuf field string display_name = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Required. A display name for the `Snooze`. This can be, at most, 512 - * unicode characters. - * - * Generated from protobuf field string display_name = 5 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Snooze/Criteria.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Snooze/Criteria.php deleted file mode 100644 index 13e62c6c1855..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/Snooze/Criteria.php +++ /dev/null @@ -1,88 +0,0 @@ -google.monitoring.v3.Snooze.Criteria - */ -class Criteria extends \Google\Protobuf\Internal\Message -{ - /** - * The specific `AlertPolicy` names for the alert that should be snoozed. - * The format is: - * projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[POLICY_ID] - * There is a limit of 16 policies per snooze. This limit is checked during - * snooze creation. - * - * Generated from protobuf field repeated string policies = 1 [(.google.api.resource_reference) = { - */ - private $policies; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $policies - * The specific `AlertPolicy` names for the alert that should be snoozed. - * The format is: - * projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[POLICY_ID] - * There is a limit of 16 policies per snooze. This limit is checked during - * snooze creation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\Snooze::initOnce(); - parent::__construct($data); - } - - /** - * The specific `AlertPolicy` names for the alert that should be snoozed. - * The format is: - * projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[POLICY_ID] - * There is a limit of 16 policies per snooze. This limit is checked during - * snooze creation. - * - * Generated from protobuf field repeated string policies = 1 [(.google.api.resource_reference) = { - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPolicies() - { - return $this->policies; - } - - /** - * The specific `AlertPolicy` names for the alert that should be snoozed. - * The format is: - * projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[POLICY_ID] - * There is a limit of 16 policies per snooze. This limit is checked during - * snooze creation. - * - * Generated from protobuf field repeated string policies = 1 [(.google.api.resource_reference) = { - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPolicies($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->policies = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Criteria::class, \Google\Cloud\Monitoring\V3\Snooze_Criteria::class); - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/SpanContext.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/SpanContext.php deleted file mode 100644 index cfeb31ba8340..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/SpanContext.php +++ /dev/null @@ -1,91 +0,0 @@ -google.monitoring.v3.SpanContext - */ -class SpanContext extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the span. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/traces/[TRACE_ID]/spans/[SPAN_ID] - * `[TRACE_ID]` is a unique identifier for a trace within a project; - * it is a 32-character hexadecimal encoding of a 16-byte array. - * `[SPAN_ID]` is a unique identifier for a span within a trace; it - * is a 16-character hexadecimal encoding of an 8-byte array. - * - * Generated from protobuf field string span_name = 1; - */ - protected $span_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $span_name - * The resource name of the span. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/traces/[TRACE_ID]/spans/[SPAN_ID] - * `[TRACE_ID]` is a unique identifier for a trace within a project; - * it is a 32-character hexadecimal encoding of a 16-byte array. - * `[SPAN_ID]` is a unique identifier for a span within a trace; it - * is a 16-character hexadecimal encoding of an 8-byte array. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\SpanContext::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the span. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/traces/[TRACE_ID]/spans/[SPAN_ID] - * `[TRACE_ID]` is a unique identifier for a trace within a project; - * it is a 32-character hexadecimal encoding of a 16-byte array. - * `[SPAN_ID]` is a unique identifier for a span within a trace; it - * is a 16-character hexadecimal encoding of an 8-byte array. - * - * Generated from protobuf field string span_name = 1; - * @return string - */ - public function getSpanName() - { - return $this->span_name; - } - - /** - * The resource name of the span. The format is: - * projects/[PROJECT_ID_OR_NUMBER]/traces/[TRACE_ID]/spans/[SPAN_ID] - * `[TRACE_ID]` is a unique identifier for a trace within a project; - * it is a 32-character hexadecimal encoding of a 16-byte array. - * `[SPAN_ID]` is a unique identifier for a span within a trace; it - * is a 16-character hexadecimal encoding of an 8-byte array. - * - * Generated from protobuf field string span_name = 1; - * @param string $var - * @return $this - */ - public function setSpanName($var) - { - GPBUtil::checkString($var, True); - $this->span_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/SyntheticMonitorTarget.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/SyntheticMonitorTarget.php deleted file mode 100644 index 8bbfac0f1098..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/SyntheticMonitorTarget.php +++ /dev/null @@ -1,75 +0,0 @@ -google.monitoring.v3.SyntheticMonitorTarget - */ -class SyntheticMonitorTarget extends \Google\Protobuf\Internal\Message -{ - protected $target; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Monitoring\V3\SyntheticMonitorTarget\CloudFunctionV2Target $cloud_function_v2 - * Target a Synthetic Monitor GCFv2 instance. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\Uptime::initOnce(); - parent::__construct($data); - } - - /** - * Target a Synthetic Monitor GCFv2 instance. - * - * Generated from protobuf field .google.monitoring.v3.SyntheticMonitorTarget.CloudFunctionV2Target cloud_function_v2 = 1; - * @return \Google\Cloud\Monitoring\V3\SyntheticMonitorTarget\CloudFunctionV2Target|null - */ - public function getCloudFunctionV2() - { - return $this->readOneof(1); - } - - public function hasCloudFunctionV2() - { - return $this->hasOneof(1); - } - - /** - * Target a Synthetic Monitor GCFv2 instance. - * - * Generated from protobuf field .google.monitoring.v3.SyntheticMonitorTarget.CloudFunctionV2Target cloud_function_v2 = 1; - * @param \Google\Cloud\Monitoring\V3\SyntheticMonitorTarget\CloudFunctionV2Target $var - * @return $this - */ - public function setCloudFunctionV2($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\SyntheticMonitorTarget\CloudFunctionV2Target::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * @return string - */ - public function getTarget() - { - return $this->whichOneof("target"); - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/SyntheticMonitorTarget/CloudFunctionV2Target.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/SyntheticMonitorTarget/CloudFunctionV2Target.php deleted file mode 100644 index 1f9b8d546857..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/SyntheticMonitorTarget/CloudFunctionV2Target.php +++ /dev/null @@ -1,134 +0,0 @@ -google.monitoring.v3.SyntheticMonitorTarget.CloudFunctionV2Target - */ -class CloudFunctionV2Target extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Fully qualified GCFv2 resource name - * i.e. `projects/{project}/locations/{location}/functions/{function}` - * Required. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Output only. The `cloud_run_revision` Monitored Resource associated with - * the GCFv2. The Synthetic Monitor execution results (metrics, logs, and - * spans) are reported against this Monitored Resource. This field is output - * only. - * - * Generated from protobuf field .google.api.MonitoredResource cloud_run_revision = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $cloud_run_revision = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Fully qualified GCFv2 resource name - * i.e. `projects/{project}/locations/{location}/functions/{function}` - * Required. - * @type \Google\Api\MonitoredResource $cloud_run_revision - * Output only. The `cloud_run_revision` Monitored Resource associated with - * the GCFv2. The Synthetic Monitor execution results (metrics, logs, and - * spans) are reported against this Monitored Resource. This field is output - * only. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\Uptime::initOnce(); - parent::__construct($data); - } - - /** - * Required. Fully qualified GCFv2 resource name - * i.e. `projects/{project}/locations/{location}/functions/{function}` - * Required. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Fully qualified GCFv2 resource name - * i.e. `projects/{project}/locations/{location}/functions/{function}` - * Required. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. The `cloud_run_revision` Monitored Resource associated with - * the GCFv2. The Synthetic Monitor execution results (metrics, logs, and - * spans) are reported against this Monitored Resource. This field is output - * only. - * - * Generated from protobuf field .google.api.MonitoredResource cloud_run_revision = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Api\MonitoredResource|null - */ - public function getCloudRunRevision() - { - return $this->cloud_run_revision; - } - - public function hasCloudRunRevision() - { - return isset($this->cloud_run_revision); - } - - public function clearCloudRunRevision() - { - unset($this->cloud_run_revision); - } - - /** - * Output only. The `cloud_run_revision` Monitored Resource associated with - * the GCFv2. The Synthetic Monitor execution results (metrics, logs, and - * spans) are reported against this Monitored Resource. This field is output - * only. - * - * Generated from protobuf field .google.api.MonitoredResource cloud_run_revision = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Api\MonitoredResource $var - * @return $this - */ - public function setCloudRunRevision($var) - { - GPBUtil::checkMessage($var, \Google\Api\MonitoredResource::class); - $this->cloud_run_revision = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CloudFunctionV2Target::class, \Google\Cloud\Monitoring\V3\SyntheticMonitorTarget_CloudFunctionV2Target::class); - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/TextLocator.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/TextLocator.php deleted file mode 100644 index 6c6c82460c63..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/TextLocator.php +++ /dev/null @@ -1,303 +0,0 @@ -google.monitoring.v3.TextLocator - */ -class TextLocator extends \Google\Protobuf\Internal\Message -{ - /** - * The source of the text. The source may be a field in the request, in which - * case its format is the format of the - * google.rpc.BadRequest.FieldViolation.field field in - * https://cloud.google.com/apis/design/errors#error_details. It may also be - * be a source other than the request field (e.g. a macro definition - * referenced in the text of the query), in which case this is the name of - * the source (e.g. the macro name). - * - * Generated from protobuf field string source = 1; - */ - protected $source = ''; - /** - * The position of the first byte within the text. - * - * Generated from protobuf field .google.monitoring.v3.TextLocator.Position start_position = 2; - */ - protected $start_position = null; - /** - * The position of the last byte within the text. - * - * Generated from protobuf field .google.monitoring.v3.TextLocator.Position end_position = 3; - */ - protected $end_position = null; - /** - * If `source`, `start_position`, and `end_position` describe a call on - * some object (e.g. a macro in the time series query language text) and a - * location is to be designated in that object's text, `nested_locator` - * identifies the location within that object. - * - * Generated from protobuf field .google.monitoring.v3.TextLocator nested_locator = 4; - */ - protected $nested_locator = null; - /** - * When `nested_locator` is set, this field gives the reason for the nesting. - * Usually, the reason is a macro invocation. In that case, the macro name - * (including the leading '@') signals the location of the macro call - * in the text and a macro argument name (including the leading '$') signals - * the location of the macro argument inside the macro body that got - * substituted away. - * - * Generated from protobuf field string nesting_reason = 5; - */ - protected $nesting_reason = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $source - * The source of the text. The source may be a field in the request, in which - * case its format is the format of the - * google.rpc.BadRequest.FieldViolation.field field in - * https://cloud.google.com/apis/design/errors#error_details. It may also be - * be a source other than the request field (e.g. a macro definition - * referenced in the text of the query), in which case this is the name of - * the source (e.g. the macro name). - * @type \Google\Cloud\Monitoring\V3\TextLocator\Position $start_position - * The position of the first byte within the text. - * @type \Google\Cloud\Monitoring\V3\TextLocator\Position $end_position - * The position of the last byte within the text. - * @type \Google\Cloud\Monitoring\V3\TextLocator $nested_locator - * If `source`, `start_position`, and `end_position` describe a call on - * some object (e.g. a macro in the time series query language text) and a - * location is to be designated in that object's text, `nested_locator` - * identifies the location within that object. - * @type string $nesting_reason - * When `nested_locator` is set, this field gives the reason for the nesting. - * Usually, the reason is a macro invocation. In that case, the macro name - * (including the leading '@') signals the location of the macro call - * in the text and a macro argument name (including the leading '$') signals - * the location of the macro argument inside the macro body that got - * substituted away. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\Metric::initOnce(); - parent::__construct($data); - } - - /** - * The source of the text. The source may be a field in the request, in which - * case its format is the format of the - * google.rpc.BadRequest.FieldViolation.field field in - * https://cloud.google.com/apis/design/errors#error_details. It may also be - * be a source other than the request field (e.g. a macro definition - * referenced in the text of the query), in which case this is the name of - * the source (e.g. the macro name). - * - * Generated from protobuf field string source = 1; - * @return string - */ - public function getSource() - { - return $this->source; - } - - /** - * The source of the text. The source may be a field in the request, in which - * case its format is the format of the - * google.rpc.BadRequest.FieldViolation.field field in - * https://cloud.google.com/apis/design/errors#error_details. It may also be - * be a source other than the request field (e.g. a macro definition - * referenced in the text of the query), in which case this is the name of - * the source (e.g. the macro name). - * - * Generated from protobuf field string source = 1; - * @param string $var - * @return $this - */ - public function setSource($var) - { - GPBUtil::checkString($var, True); - $this->source = $var; - - return $this; - } - - /** - * The position of the first byte within the text. - * - * Generated from protobuf field .google.monitoring.v3.TextLocator.Position start_position = 2; - * @return \Google\Cloud\Monitoring\V3\TextLocator\Position|null - */ - public function getStartPosition() - { - return $this->start_position; - } - - public function hasStartPosition() - { - return isset($this->start_position); - } - - public function clearStartPosition() - { - unset($this->start_position); - } - - /** - * The position of the first byte within the text. - * - * Generated from protobuf field .google.monitoring.v3.TextLocator.Position start_position = 2; - * @param \Google\Cloud\Monitoring\V3\TextLocator\Position $var - * @return $this - */ - public function setStartPosition($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\TextLocator\Position::class); - $this->start_position = $var; - - return $this; - } - - /** - * The position of the last byte within the text. - * - * Generated from protobuf field .google.monitoring.v3.TextLocator.Position end_position = 3; - * @return \Google\Cloud\Monitoring\V3\TextLocator\Position|null - */ - public function getEndPosition() - { - return $this->end_position; - } - - public function hasEndPosition() - { - return isset($this->end_position); - } - - public function clearEndPosition() - { - unset($this->end_position); - } - - /** - * The position of the last byte within the text. - * - * Generated from protobuf field .google.monitoring.v3.TextLocator.Position end_position = 3; - * @param \Google\Cloud\Monitoring\V3\TextLocator\Position $var - * @return $this - */ - public function setEndPosition($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\TextLocator\Position::class); - $this->end_position = $var; - - return $this; - } - - /** - * If `source`, `start_position`, and `end_position` describe a call on - * some object (e.g. a macro in the time series query language text) and a - * location is to be designated in that object's text, `nested_locator` - * identifies the location within that object. - * - * Generated from protobuf field .google.monitoring.v3.TextLocator nested_locator = 4; - * @return \Google\Cloud\Monitoring\V3\TextLocator|null - */ - public function getNestedLocator() - { - return $this->nested_locator; - } - - public function hasNestedLocator() - { - return isset($this->nested_locator); - } - - public function clearNestedLocator() - { - unset($this->nested_locator); - } - - /** - * If `source`, `start_position`, and `end_position` describe a call on - * some object (e.g. a macro in the time series query language text) and a - * location is to be designated in that object's text, `nested_locator` - * identifies the location within that object. - * - * Generated from protobuf field .google.monitoring.v3.TextLocator nested_locator = 4; - * @param \Google\Cloud\Monitoring\V3\TextLocator $var - * @return $this - */ - public function setNestedLocator($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\TextLocator::class); - $this->nested_locator = $var; - - return $this; - } - - /** - * When `nested_locator` is set, this field gives the reason for the nesting. - * Usually, the reason is a macro invocation. In that case, the macro name - * (including the leading '@') signals the location of the macro call - * in the text and a macro argument name (including the leading '$') signals - * the location of the macro argument inside the macro body that got - * substituted away. - * - * Generated from protobuf field string nesting_reason = 5; - * @return string - */ - public function getNestingReason() - { - return $this->nesting_reason; - } - - /** - * When `nested_locator` is set, this field gives the reason for the nesting. - * Usually, the reason is a macro invocation. In that case, the macro name - * (including the leading '@') signals the location of the macro call - * in the text and a macro argument name (including the leading '$') signals - * the location of the macro argument inside the macro body that got - * substituted away. - * - * Generated from protobuf field string nesting_reason = 5; - * @param string $var - * @return $this - */ - public function setNestingReason($var) - { - GPBUtil::checkString($var, True); - $this->nesting_reason = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/TextLocator/Position.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/TextLocator/Position.php deleted file mode 100644 index bd81e7bff71b..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/TextLocator/Position.php +++ /dev/null @@ -1,108 +0,0 @@ -google.monitoring.v3.TextLocator.Position - */ -class Position extends \Google\Protobuf\Internal\Message -{ - /** - * The line, starting with 1, where the byte is positioned. - * - * Generated from protobuf field int32 line = 1; - */ - protected $line = 0; - /** - * The column within the line, starting with 1, where the byte is - * positioned. This is a byte index even though the text is UTF-8. - * - * Generated from protobuf field int32 column = 2; - */ - protected $column = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $line - * The line, starting with 1, where the byte is positioned. - * @type int $column - * The column within the line, starting with 1, where the byte is - * positioned. This is a byte index even though the text is UTF-8. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\Metric::initOnce(); - parent::__construct($data); - } - - /** - * The line, starting with 1, where the byte is positioned. - * - * Generated from protobuf field int32 line = 1; - * @return int - */ - public function getLine() - { - return $this->line; - } - - /** - * The line, starting with 1, where the byte is positioned. - * - * Generated from protobuf field int32 line = 1; - * @param int $var - * @return $this - */ - public function setLine($var) - { - GPBUtil::checkInt32($var); - $this->line = $var; - - return $this; - } - - /** - * The column within the line, starting with 1, where the byte is - * positioned. This is a byte index even though the text is UTF-8. - * - * Generated from protobuf field int32 column = 2; - * @return int - */ - public function getColumn() - { - return $this->column; - } - - /** - * The column within the line, starting with 1, where the byte is - * positioned. This is a byte index even though the text is UTF-8. - * - * Generated from protobuf field int32 column = 2; - * @param int $var - * @return $this - */ - public function setColumn($var) - { - GPBUtil::checkInt32($var); - $this->column = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Position::class, \Google\Cloud\Monitoring\V3\TextLocator_Position::class); - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/TimeInterval.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/TimeInterval.php deleted file mode 100644 index 1869cd41c8a9..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/TimeInterval.php +++ /dev/null @@ -1,165 +0,0 @@ -google.monitoring.v3.TimeInterval - */ -class TimeInterval extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The end of the time interval. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - */ - protected $end_time = null; - /** - * Optional. The beginning of the time interval. The default value - * for the start time is the end time. The start time must not be - * later than the end time. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - */ - protected $start_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $end_time - * Required. The end of the time interval. - * @type \Google\Protobuf\Timestamp $start_time - * Optional. The beginning of the time interval. The default value - * for the start time is the end time. The start time must not be - * later than the end time. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\Common::initOnce(); - parent::__construct($data); - } - - /** - * Required. The end of the time interval. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * Required. The end of the time interval. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * Optional. The beginning of the time interval. The default value - * for the start time is the end time. The start time must not be - * later than the end time. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStartTime() - { - return $this->start_time; - } - - public function hasStartTime() - { - return isset($this->start_time); - } - - public function clearStartTime() - { - unset($this->start_time); - } - - /** - * Optional. The beginning of the time interval. The default value - * for the start time is the end time. The start time must not be - * later than the end time. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/TimeSeries.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/TimeSeries.php deleted file mode 100644 index 884802d3cdcc..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/TimeSeries.php +++ /dev/null @@ -1,404 +0,0 @@ -google.monitoring.v3.TimeSeries - */ -class TimeSeries extends \Google\Protobuf\Internal\Message -{ - /** - * The associated metric. A fully-specified metric used to identify the time - * series. - * - * Generated from protobuf field .google.api.Metric metric = 1; - */ - protected $metric = null; - /** - * The associated monitored resource. Custom metrics can use only certain - * monitored resource types in their time series data. For more information, - * see [Monitored resources for custom - * metrics](https://cloud.google.com/monitoring/custom-metrics/creating-metrics#custom-metric-resources). - * - * Generated from protobuf field .google.api.MonitoredResource resource = 2; - */ - protected $resource = null; - /** - * Output only. The associated monitored resource metadata. When reading a - * time series, this field will include metadata labels that are explicitly - * named in the reduction. When creating a time series, this field is ignored. - * - * Generated from protobuf field .google.api.MonitoredResourceMetadata metadata = 7; - */ - protected $metadata = null; - /** - * The metric kind of the time series. When listing time series, this metric - * kind might be different from the metric kind of the associated metric if - * this time series is an alignment or reduction of other time series. - * When creating a time series, this field is optional. If present, it must be - * the same as the metric kind of the associated metric. If the associated - * metric's descriptor must be auto-created, then this field specifies the - * metric kind of the new descriptor and must be either `GAUGE` (the default) - * or `CUMULATIVE`. - * - * Generated from protobuf field .google.api.MetricDescriptor.MetricKind metric_kind = 3; - */ - protected $metric_kind = 0; - /** - * The value type of the time series. When listing time series, this value - * type might be different from the value type of the associated metric if - * this time series is an alignment or reduction of other time series. - * When creating a time series, this field is optional. If present, it must be - * the same as the type of the data in the `points` field. - * - * Generated from protobuf field .google.api.MetricDescriptor.ValueType value_type = 4; - */ - protected $value_type = 0; - /** - * The data points of this time series. When listing time series, points are - * returned in reverse time order. - * When creating a time series, this field must contain exactly one point and - * the point's type must be the same as the value type of the associated - * metric. If the associated metric's descriptor must be auto-created, then - * the value type of the descriptor is determined by the point's type, which - * must be `BOOL`, `INT64`, `DOUBLE`, or `DISTRIBUTION`. - * - * Generated from protobuf field repeated .google.monitoring.v3.Point points = 5; - */ - private $points; - /** - * The units in which the metric value is reported. It is only applicable - * if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The `unit` - * defines the representation of the stored metric values. - * - * Generated from protobuf field string unit = 8; - */ - protected $unit = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Api\Metric $metric - * The associated metric. A fully-specified metric used to identify the time - * series. - * @type \Google\Api\MonitoredResource $resource - * The associated monitored resource. Custom metrics can use only certain - * monitored resource types in their time series data. For more information, - * see [Monitored resources for custom - * metrics](https://cloud.google.com/monitoring/custom-metrics/creating-metrics#custom-metric-resources). - * @type \Google\Api\MonitoredResourceMetadata $metadata - * Output only. The associated monitored resource metadata. When reading a - * time series, this field will include metadata labels that are explicitly - * named in the reduction. When creating a time series, this field is ignored. - * @type int $metric_kind - * The metric kind of the time series. When listing time series, this metric - * kind might be different from the metric kind of the associated metric if - * this time series is an alignment or reduction of other time series. - * When creating a time series, this field is optional. If present, it must be - * the same as the metric kind of the associated metric. If the associated - * metric's descriptor must be auto-created, then this field specifies the - * metric kind of the new descriptor and must be either `GAUGE` (the default) - * or `CUMULATIVE`. - * @type int $value_type - * The value type of the time series. When listing time series, this value - * type might be different from the value type of the associated metric if - * this time series is an alignment or reduction of other time series. - * When creating a time series, this field is optional. If present, it must be - * the same as the type of the data in the `points` field. - * @type array<\Google\Cloud\Monitoring\V3\Point>|\Google\Protobuf\Internal\RepeatedField $points - * The data points of this time series. When listing time series, points are - * returned in reverse time order. - * When creating a time series, this field must contain exactly one point and - * the point's type must be the same as the value type of the associated - * metric. If the associated metric's descriptor must be auto-created, then - * the value type of the descriptor is determined by the point's type, which - * must be `BOOL`, `INT64`, `DOUBLE`, or `DISTRIBUTION`. - * @type string $unit - * The units in which the metric value is reported. It is only applicable - * if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The `unit` - * defines the representation of the stored metric values. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\Metric::initOnce(); - parent::__construct($data); - } - - /** - * The associated metric. A fully-specified metric used to identify the time - * series. - * - * Generated from protobuf field .google.api.Metric metric = 1; - * @return \Google\Api\Metric|null - */ - public function getMetric() - { - return $this->metric; - } - - public function hasMetric() - { - return isset($this->metric); - } - - public function clearMetric() - { - unset($this->metric); - } - - /** - * The associated metric. A fully-specified metric used to identify the time - * series. - * - * Generated from protobuf field .google.api.Metric metric = 1; - * @param \Google\Api\Metric $var - * @return $this - */ - public function setMetric($var) - { - GPBUtil::checkMessage($var, \Google\Api\Metric::class); - $this->metric = $var; - - return $this; - } - - /** - * The associated monitored resource. Custom metrics can use only certain - * monitored resource types in their time series data. For more information, - * see [Monitored resources for custom - * metrics](https://cloud.google.com/monitoring/custom-metrics/creating-metrics#custom-metric-resources). - * - * Generated from protobuf field .google.api.MonitoredResource resource = 2; - * @return \Google\Api\MonitoredResource|null - */ - public function getResource() - { - return $this->resource; - } - - public function hasResource() - { - return isset($this->resource); - } - - public function clearResource() - { - unset($this->resource); - } - - /** - * The associated monitored resource. Custom metrics can use only certain - * monitored resource types in their time series data. For more information, - * see [Monitored resources for custom - * metrics](https://cloud.google.com/monitoring/custom-metrics/creating-metrics#custom-metric-resources). - * - * Generated from protobuf field .google.api.MonitoredResource resource = 2; - * @param \Google\Api\MonitoredResource $var - * @return $this - */ - public function setResource($var) - { - GPBUtil::checkMessage($var, \Google\Api\MonitoredResource::class); - $this->resource = $var; - - return $this; - } - - /** - * Output only. The associated monitored resource metadata. When reading a - * time series, this field will include metadata labels that are explicitly - * named in the reduction. When creating a time series, this field is ignored. - * - * Generated from protobuf field .google.api.MonitoredResourceMetadata metadata = 7; - * @return \Google\Api\MonitoredResourceMetadata|null - */ - public function getMetadata() - { - return $this->metadata; - } - - public function hasMetadata() - { - return isset($this->metadata); - } - - public function clearMetadata() - { - unset($this->metadata); - } - - /** - * Output only. The associated monitored resource metadata. When reading a - * time series, this field will include metadata labels that are explicitly - * named in the reduction. When creating a time series, this field is ignored. - * - * Generated from protobuf field .google.api.MonitoredResourceMetadata metadata = 7; - * @param \Google\Api\MonitoredResourceMetadata $var - * @return $this - */ - public function setMetadata($var) - { - GPBUtil::checkMessage($var, \Google\Api\MonitoredResourceMetadata::class); - $this->metadata = $var; - - return $this; - } - - /** - * The metric kind of the time series. When listing time series, this metric - * kind might be different from the metric kind of the associated metric if - * this time series is an alignment or reduction of other time series. - * When creating a time series, this field is optional. If present, it must be - * the same as the metric kind of the associated metric. If the associated - * metric's descriptor must be auto-created, then this field specifies the - * metric kind of the new descriptor and must be either `GAUGE` (the default) - * or `CUMULATIVE`. - * - * Generated from protobuf field .google.api.MetricDescriptor.MetricKind metric_kind = 3; - * @return int - */ - public function getMetricKind() - { - return $this->metric_kind; - } - - /** - * The metric kind of the time series. When listing time series, this metric - * kind might be different from the metric kind of the associated metric if - * this time series is an alignment or reduction of other time series. - * When creating a time series, this field is optional. If present, it must be - * the same as the metric kind of the associated metric. If the associated - * metric's descriptor must be auto-created, then this field specifies the - * metric kind of the new descriptor and must be either `GAUGE` (the default) - * or `CUMULATIVE`. - * - * Generated from protobuf field .google.api.MetricDescriptor.MetricKind metric_kind = 3; - * @param int $var - * @return $this - */ - public function setMetricKind($var) - { - GPBUtil::checkEnum($var, \Google\Api\MetricDescriptor\MetricKind::class); - $this->metric_kind = $var; - - return $this; - } - - /** - * The value type of the time series. When listing time series, this value - * type might be different from the value type of the associated metric if - * this time series is an alignment or reduction of other time series. - * When creating a time series, this field is optional. If present, it must be - * the same as the type of the data in the `points` field. - * - * Generated from protobuf field .google.api.MetricDescriptor.ValueType value_type = 4; - * @return int - */ - public function getValueType() - { - return $this->value_type; - } - - /** - * The value type of the time series. When listing time series, this value - * type might be different from the value type of the associated metric if - * this time series is an alignment or reduction of other time series. - * When creating a time series, this field is optional. If present, it must be - * the same as the type of the data in the `points` field. - * - * Generated from protobuf field .google.api.MetricDescriptor.ValueType value_type = 4; - * @param int $var - * @return $this - */ - public function setValueType($var) - { - GPBUtil::checkEnum($var, \Google\Api\MetricDescriptor\ValueType::class); - $this->value_type = $var; - - return $this; - } - - /** - * The data points of this time series. When listing time series, points are - * returned in reverse time order. - * When creating a time series, this field must contain exactly one point and - * the point's type must be the same as the value type of the associated - * metric. If the associated metric's descriptor must be auto-created, then - * the value type of the descriptor is determined by the point's type, which - * must be `BOOL`, `INT64`, `DOUBLE`, or `DISTRIBUTION`. - * - * Generated from protobuf field repeated .google.monitoring.v3.Point points = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPoints() - { - return $this->points; - } - - /** - * The data points of this time series. When listing time series, points are - * returned in reverse time order. - * When creating a time series, this field must contain exactly one point and - * the point's type must be the same as the value type of the associated - * metric. If the associated metric's descriptor must be auto-created, then - * the value type of the descriptor is determined by the point's type, which - * must be `BOOL`, `INT64`, `DOUBLE`, or `DISTRIBUTION`. - * - * Generated from protobuf field repeated .google.monitoring.v3.Point points = 5; - * @param array<\Google\Cloud\Monitoring\V3\Point>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPoints($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Monitoring\V3\Point::class); - $this->points = $arr; - - return $this; - } - - /** - * The units in which the metric value is reported. It is only applicable - * if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The `unit` - * defines the representation of the stored metric values. - * - * Generated from protobuf field string unit = 8; - * @return string - */ - public function getUnit() - { - return $this->unit; - } - - /** - * The units in which the metric value is reported. It is only applicable - * if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The `unit` - * defines the representation of the stored metric values. - * - * Generated from protobuf field string unit = 8; - * @param string $var - * @return $this - */ - public function setUnit($var) - { - GPBUtil::checkString($var, True); - $this->unit = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/TimeSeriesData.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/TimeSeriesData.php deleted file mode 100644 index 4c91cd6c80ab..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/TimeSeriesData.php +++ /dev/null @@ -1,114 +0,0 @@ -google.monitoring.v3.TimeSeriesData - */ -class TimeSeriesData extends \Google\Protobuf\Internal\Message -{ - /** - * The values of the labels in the time series identifier, given in the same - * order as the `label_descriptors` field of the TimeSeriesDescriptor - * associated with this object. Each value must have a value of the type - * given in the corresponding entry of `label_descriptors`. - * - * Generated from protobuf field repeated .google.monitoring.v3.LabelValue label_values = 1; - */ - private $label_values; - /** - * The points in the time series. - * - * Generated from protobuf field repeated .google.monitoring.v3.TimeSeriesData.PointData point_data = 2; - */ - private $point_data; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Monitoring\V3\LabelValue>|\Google\Protobuf\Internal\RepeatedField $label_values - * The values of the labels in the time series identifier, given in the same - * order as the `label_descriptors` field of the TimeSeriesDescriptor - * associated with this object. Each value must have a value of the type - * given in the corresponding entry of `label_descriptors`. - * @type array<\Google\Cloud\Monitoring\V3\TimeSeriesData\PointData>|\Google\Protobuf\Internal\RepeatedField $point_data - * The points in the time series. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\Metric::initOnce(); - parent::__construct($data); - } - - /** - * The values of the labels in the time series identifier, given in the same - * order as the `label_descriptors` field of the TimeSeriesDescriptor - * associated with this object. Each value must have a value of the type - * given in the corresponding entry of `label_descriptors`. - * - * Generated from protobuf field repeated .google.monitoring.v3.LabelValue label_values = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getLabelValues() - { - return $this->label_values; - } - - /** - * The values of the labels in the time series identifier, given in the same - * order as the `label_descriptors` field of the TimeSeriesDescriptor - * associated with this object. Each value must have a value of the type - * given in the corresponding entry of `label_descriptors`. - * - * Generated from protobuf field repeated .google.monitoring.v3.LabelValue label_values = 1; - * @param array<\Google\Cloud\Monitoring\V3\LabelValue>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setLabelValues($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Monitoring\V3\LabelValue::class); - $this->label_values = $arr; - - return $this; - } - - /** - * The points in the time series. - * - * Generated from protobuf field repeated .google.monitoring.v3.TimeSeriesData.PointData point_data = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPointData() - { - return $this->point_data; - } - - /** - * The points in the time series. - * - * Generated from protobuf field repeated .google.monitoring.v3.TimeSeriesData.PointData point_data = 2; - * @param array<\Google\Cloud\Monitoring\V3\TimeSeriesData\PointData>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPointData($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Monitoring\V3\TimeSeriesData\PointData::class); - $this->point_data = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/TimeSeriesData/PointData.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/TimeSeriesData/PointData.php deleted file mode 100644 index 9aa86421aa77..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/TimeSeriesData/PointData.php +++ /dev/null @@ -1,116 +0,0 @@ -google.monitoring.v3.TimeSeriesData.PointData - */ -class PointData extends \Google\Protobuf\Internal\Message -{ - /** - * The values that make up the point. - * - * Generated from protobuf field repeated .google.monitoring.v3.TypedValue values = 1; - */ - private $values; - /** - * The time interval associated with the point. - * - * Generated from protobuf field .google.monitoring.v3.TimeInterval time_interval = 2; - */ - protected $time_interval = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Monitoring\V3\TypedValue>|\Google\Protobuf\Internal\RepeatedField $values - * The values that make up the point. - * @type \Google\Cloud\Monitoring\V3\TimeInterval $time_interval - * The time interval associated with the point. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\Metric::initOnce(); - parent::__construct($data); - } - - /** - * The values that make up the point. - * - * Generated from protobuf field repeated .google.monitoring.v3.TypedValue values = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getValues() - { - return $this->values; - } - - /** - * The values that make up the point. - * - * Generated from protobuf field repeated .google.monitoring.v3.TypedValue values = 1; - * @param array<\Google\Cloud\Monitoring\V3\TypedValue>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setValues($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Monitoring\V3\TypedValue::class); - $this->values = $arr; - - return $this; - } - - /** - * The time interval associated with the point. - * - * Generated from protobuf field .google.monitoring.v3.TimeInterval time_interval = 2; - * @return \Google\Cloud\Monitoring\V3\TimeInterval|null - */ - public function getTimeInterval() - { - return $this->time_interval; - } - - public function hasTimeInterval() - { - return isset($this->time_interval); - } - - public function clearTimeInterval() - { - unset($this->time_interval); - } - - /** - * The time interval associated with the point. - * - * Generated from protobuf field .google.monitoring.v3.TimeInterval time_interval = 2; - * @param \Google\Cloud\Monitoring\V3\TimeInterval $var - * @return $this - */ - public function setTimeInterval($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\TimeInterval::class); - $this->time_interval = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(PointData::class, \Google\Cloud\Monitoring\V3\TimeSeriesData_PointData::class); - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/TimeSeriesDescriptor.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/TimeSeriesDescriptor.php deleted file mode 100644 index ec714c4abc24..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/TimeSeriesDescriptor.php +++ /dev/null @@ -1,101 +0,0 @@ -google.monitoring.v3.TimeSeriesDescriptor - */ -class TimeSeriesDescriptor extends \Google\Protobuf\Internal\Message -{ - /** - * Descriptors for the labels. - * - * Generated from protobuf field repeated .google.api.LabelDescriptor label_descriptors = 1; - */ - private $label_descriptors; - /** - * Descriptors for the point data value columns. - * - * Generated from protobuf field repeated .google.monitoring.v3.TimeSeriesDescriptor.ValueDescriptor point_descriptors = 5; - */ - private $point_descriptors; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Api\LabelDescriptor>|\Google\Protobuf\Internal\RepeatedField $label_descriptors - * Descriptors for the labels. - * @type array<\Google\Cloud\Monitoring\V3\TimeSeriesDescriptor\ValueDescriptor>|\Google\Protobuf\Internal\RepeatedField $point_descriptors - * Descriptors for the point data value columns. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\Metric::initOnce(); - parent::__construct($data); - } - - /** - * Descriptors for the labels. - * - * Generated from protobuf field repeated .google.api.LabelDescriptor label_descriptors = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getLabelDescriptors() - { - return $this->label_descriptors; - } - - /** - * Descriptors for the labels. - * - * Generated from protobuf field repeated .google.api.LabelDescriptor label_descriptors = 1; - * @param array<\Google\Api\LabelDescriptor>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setLabelDescriptors($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Api\LabelDescriptor::class); - $this->label_descriptors = $arr; - - return $this; - } - - /** - * Descriptors for the point data value columns. - * - * Generated from protobuf field repeated .google.monitoring.v3.TimeSeriesDescriptor.ValueDescriptor point_descriptors = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPointDescriptors() - { - return $this->point_descriptors; - } - - /** - * Descriptors for the point data value columns. - * - * Generated from protobuf field repeated .google.monitoring.v3.TimeSeriesDescriptor.ValueDescriptor point_descriptors = 5; - * @param array<\Google\Cloud\Monitoring\V3\TimeSeriesDescriptor\ValueDescriptor>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPointDescriptors($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Monitoring\V3\TimeSeriesDescriptor\ValueDescriptor::class); - $this->point_descriptors = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/TimeSeriesDescriptor/ValueDescriptor.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/TimeSeriesDescriptor/ValueDescriptor.php deleted file mode 100644 index ac5dbc3a79e6..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/TimeSeriesDescriptor/ValueDescriptor.php +++ /dev/null @@ -1,184 +0,0 @@ -google.monitoring.v3.TimeSeriesDescriptor.ValueDescriptor - */ -class ValueDescriptor extends \Google\Protobuf\Internal\Message -{ - /** - * The value key. - * - * Generated from protobuf field string key = 1; - */ - protected $key = ''; - /** - * The value type. - * - * Generated from protobuf field .google.api.MetricDescriptor.ValueType value_type = 2; - */ - protected $value_type = 0; - /** - * The value stream kind. - * - * Generated from protobuf field .google.api.MetricDescriptor.MetricKind metric_kind = 3; - */ - protected $metric_kind = 0; - /** - * The unit in which `time_series` point values are reported. `unit` - * follows the UCUM format for units as seen in - * https://unitsofmeasure.org/ucum.html. - * `unit` is only valid if `value_type` is INTEGER, DOUBLE, DISTRIBUTION. - * - * Generated from protobuf field string unit = 4; - */ - protected $unit = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $key - * The value key. - * @type int $value_type - * The value type. - * @type int $metric_kind - * The value stream kind. - * @type string $unit - * The unit in which `time_series` point values are reported. `unit` - * follows the UCUM format for units as seen in - * https://unitsofmeasure.org/ucum.html. - * `unit` is only valid if `value_type` is INTEGER, DOUBLE, DISTRIBUTION. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\Metric::initOnce(); - parent::__construct($data); - } - - /** - * The value key. - * - * Generated from protobuf field string key = 1; - * @return string - */ - public function getKey() - { - return $this->key; - } - - /** - * The value key. - * - * Generated from protobuf field string key = 1; - * @param string $var - * @return $this - */ - public function setKey($var) - { - GPBUtil::checkString($var, True); - $this->key = $var; - - return $this; - } - - /** - * The value type. - * - * Generated from protobuf field .google.api.MetricDescriptor.ValueType value_type = 2; - * @return int - */ - public function getValueType() - { - return $this->value_type; - } - - /** - * The value type. - * - * Generated from protobuf field .google.api.MetricDescriptor.ValueType value_type = 2; - * @param int $var - * @return $this - */ - public function setValueType($var) - { - GPBUtil::checkEnum($var, \Google\Api\MetricDescriptor\ValueType::class); - $this->value_type = $var; - - return $this; - } - - /** - * The value stream kind. - * - * Generated from protobuf field .google.api.MetricDescriptor.MetricKind metric_kind = 3; - * @return int - */ - public function getMetricKind() - { - return $this->metric_kind; - } - - /** - * The value stream kind. - * - * Generated from protobuf field .google.api.MetricDescriptor.MetricKind metric_kind = 3; - * @param int $var - * @return $this - */ - public function setMetricKind($var) - { - GPBUtil::checkEnum($var, \Google\Api\MetricDescriptor\MetricKind::class); - $this->metric_kind = $var; - - return $this; - } - - /** - * The unit in which `time_series` point values are reported. `unit` - * follows the UCUM format for units as seen in - * https://unitsofmeasure.org/ucum.html. - * `unit` is only valid if `value_type` is INTEGER, DOUBLE, DISTRIBUTION. - * - * Generated from protobuf field string unit = 4; - * @return string - */ - public function getUnit() - { - return $this->unit; - } - - /** - * The unit in which `time_series` point values are reported. `unit` - * follows the UCUM format for units as seen in - * https://unitsofmeasure.org/ucum.html. - * `unit` is only valid if `value_type` is INTEGER, DOUBLE, DISTRIBUTION. - * - * Generated from protobuf field string unit = 4; - * @param string $var - * @return $this - */ - public function setUnit($var) - { - GPBUtil::checkString($var, True); - $this->unit = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ValueDescriptor::class, \Google\Cloud\Monitoring\V3\TimeSeriesDescriptor_ValueDescriptor::class); - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/TimeSeriesRatio.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/TimeSeriesRatio.php deleted file mode 100644 index bbd4edb9bac9..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/TimeSeriesRatio.php +++ /dev/null @@ -1,180 +0,0 @@ -google.monitoring.v3.TimeSeriesRatio - */ -class TimeSeriesRatio extends \Google\Protobuf\Internal\Message -{ - /** - * A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) - * specifying a `TimeSeries` quantifying good service provided. Must have - * `ValueType = DOUBLE` or `ValueType = INT64` and must have `MetricKind = - * DELTA` or `MetricKind = CUMULATIVE`. - * - * Generated from protobuf field string good_service_filter = 4; - */ - protected $good_service_filter = ''; - /** - * A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) - * specifying a `TimeSeries` quantifying bad service, either demanded service - * that was not provided or demanded service that was of inadequate quality. - * Must have `ValueType = DOUBLE` or `ValueType = INT64` and must have - * `MetricKind = DELTA` or `MetricKind = CUMULATIVE`. - * - * Generated from protobuf field string bad_service_filter = 5; - */ - protected $bad_service_filter = ''; - /** - * A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) - * specifying a `TimeSeries` quantifying total demanded service. Must have - * `ValueType = DOUBLE` or `ValueType = INT64` and must have `MetricKind = - * DELTA` or `MetricKind = CUMULATIVE`. - * - * Generated from protobuf field string total_service_filter = 6; - */ - protected $total_service_filter = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $good_service_filter - * A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) - * specifying a `TimeSeries` quantifying good service provided. Must have - * `ValueType = DOUBLE` or `ValueType = INT64` and must have `MetricKind = - * DELTA` or `MetricKind = CUMULATIVE`. - * @type string $bad_service_filter - * A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) - * specifying a `TimeSeries` quantifying bad service, either demanded service - * that was not provided or demanded service that was of inadequate quality. - * Must have `ValueType = DOUBLE` or `ValueType = INT64` and must have - * `MetricKind = DELTA` or `MetricKind = CUMULATIVE`. - * @type string $total_service_filter - * A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) - * specifying a `TimeSeries` quantifying total demanded service. Must have - * `ValueType = DOUBLE` or `ValueType = INT64` and must have `MetricKind = - * DELTA` or `MetricKind = CUMULATIVE`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\Service::initOnce(); - parent::__construct($data); - } - - /** - * A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) - * specifying a `TimeSeries` quantifying good service provided. Must have - * `ValueType = DOUBLE` or `ValueType = INT64` and must have `MetricKind = - * DELTA` or `MetricKind = CUMULATIVE`. - * - * Generated from protobuf field string good_service_filter = 4; - * @return string - */ - public function getGoodServiceFilter() - { - return $this->good_service_filter; - } - - /** - * A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) - * specifying a `TimeSeries` quantifying good service provided. Must have - * `ValueType = DOUBLE` or `ValueType = INT64` and must have `MetricKind = - * DELTA` or `MetricKind = CUMULATIVE`. - * - * Generated from protobuf field string good_service_filter = 4; - * @param string $var - * @return $this - */ - public function setGoodServiceFilter($var) - { - GPBUtil::checkString($var, True); - $this->good_service_filter = $var; - - return $this; - } - - /** - * A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) - * specifying a `TimeSeries` quantifying bad service, either demanded service - * that was not provided or demanded service that was of inadequate quality. - * Must have `ValueType = DOUBLE` or `ValueType = INT64` and must have - * `MetricKind = DELTA` or `MetricKind = CUMULATIVE`. - * - * Generated from protobuf field string bad_service_filter = 5; - * @return string - */ - public function getBadServiceFilter() - { - return $this->bad_service_filter; - } - - /** - * A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) - * specifying a `TimeSeries` quantifying bad service, either demanded service - * that was not provided or demanded service that was of inadequate quality. - * Must have `ValueType = DOUBLE` or `ValueType = INT64` and must have - * `MetricKind = DELTA` or `MetricKind = CUMULATIVE`. - * - * Generated from protobuf field string bad_service_filter = 5; - * @param string $var - * @return $this - */ - public function setBadServiceFilter($var) - { - GPBUtil::checkString($var, True); - $this->bad_service_filter = $var; - - return $this; - } - - /** - * A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) - * specifying a `TimeSeries` quantifying total demanded service. Must have - * `ValueType = DOUBLE` or `ValueType = INT64` and must have `MetricKind = - * DELTA` or `MetricKind = CUMULATIVE`. - * - * Generated from protobuf field string total_service_filter = 6; - * @return string - */ - public function getTotalServiceFilter() - { - return $this->total_service_filter; - } - - /** - * A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) - * specifying a `TimeSeries` quantifying total demanded service. Must have - * `ValueType = DOUBLE` or `ValueType = INT64` and must have `MetricKind = - * DELTA` or `MetricKind = CUMULATIVE`. - * - * Generated from protobuf field string total_service_filter = 6; - * @param string $var - * @return $this - */ - public function setTotalServiceFilter($var) - { - GPBUtil::checkString($var, True); - $this->total_service_filter = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/TypedValue.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/TypedValue.php deleted file mode 100644 index 866bd8da0167..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/TypedValue.php +++ /dev/null @@ -1,213 +0,0 @@ -google.monitoring.v3.TypedValue - */ -class TypedValue extends \Google\Protobuf\Internal\Message -{ - protected $value; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $bool_value - * A Boolean value: `true` or `false`. - * @type int|string $int64_value - * A 64-bit integer. Its range is approximately ±9.2x1018. - * @type float $double_value - * A 64-bit double-precision floating-point number. Its magnitude - * is approximately ±10±300 and it has 16 - * significant digits of precision. - * @type string $string_value - * A variable-length string value. - * @type \Google\Api\Distribution $distribution_value - * A distribution value. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\Common::initOnce(); - parent::__construct($data); - } - - /** - * A Boolean value: `true` or `false`. - * - * Generated from protobuf field bool bool_value = 1; - * @return bool - */ - public function getBoolValue() - { - return $this->readOneof(1); - } - - public function hasBoolValue() - { - return $this->hasOneof(1); - } - - /** - * A Boolean value: `true` or `false`. - * - * Generated from protobuf field bool bool_value = 1; - * @param bool $var - * @return $this - */ - public function setBoolValue($var) - { - GPBUtil::checkBool($var); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * A 64-bit integer. Its range is approximately ±9.2x1018. - * - * Generated from protobuf field int64 int64_value = 2; - * @return int|string - */ - public function getInt64Value() - { - return $this->readOneof(2); - } - - public function hasInt64Value() - { - return $this->hasOneof(2); - } - - /** - * A 64-bit integer. Its range is approximately ±9.2x1018. - * - * Generated from protobuf field int64 int64_value = 2; - * @param int|string $var - * @return $this - */ - public function setInt64Value($var) - { - GPBUtil::checkInt64($var); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * A 64-bit double-precision floating-point number. Its magnitude - * is approximately ±10±300 and it has 16 - * significant digits of precision. - * - * Generated from protobuf field double double_value = 3; - * @return float - */ - public function getDoubleValue() - { - return $this->readOneof(3); - } - - public function hasDoubleValue() - { - return $this->hasOneof(3); - } - - /** - * A 64-bit double-precision floating-point number. Its magnitude - * is approximately ±10±300 and it has 16 - * significant digits of precision. - * - * Generated from protobuf field double double_value = 3; - * @param float $var - * @return $this - */ - public function setDoubleValue($var) - { - GPBUtil::checkDouble($var); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * A variable-length string value. - * - * Generated from protobuf field string string_value = 4; - * @return string - */ - public function getStringValue() - { - return $this->readOneof(4); - } - - public function hasStringValue() - { - return $this->hasOneof(4); - } - - /** - * A variable-length string value. - * - * Generated from protobuf field string string_value = 4; - * @param string $var - * @return $this - */ - public function setStringValue($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * A distribution value. - * - * Generated from protobuf field .google.api.Distribution distribution_value = 5; - * @return \Google\Api\Distribution|null - */ - public function getDistributionValue() - { - return $this->readOneof(5); - } - - public function hasDistributionValue() - { - return $this->hasOneof(5); - } - - /** - * A distribution value. - * - * Generated from protobuf field .google.api.Distribution distribution_value = 5; - * @param \Google\Api\Distribution $var - * @return $this - */ - public function setDistributionValue($var) - { - GPBUtil::checkMessage($var, \Google\Api\Distribution::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * @return string - */ - public function getValue() - { - return $this->whichOneof("value"); - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UpdateAlertPolicyRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UpdateAlertPolicyRequest.php deleted file mode 100644 index 4891765d0252..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UpdateAlertPolicyRequest.php +++ /dev/null @@ -1,239 +0,0 @@ -google.monitoring.v3.UpdateAlertPolicyRequest - */ -class UpdateAlertPolicyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. A list of alerting policy field names. If this field is not - * empty, each listed field in the existing alerting policy is set to the - * value of the corresponding field in the supplied policy (`alert_policy`), - * or to the field's default value if the field is not in the supplied - * alerting policy. Fields not listed retain their previous value. - * Examples of valid field masks include `display_name`, `documentation`, - * `documentation.content`, `documentation.mime_type`, `user_labels`, - * `user_label.nameofkey`, `enabled`, `conditions`, `combiner`, etc. - * If this field is empty, then the supplied alerting policy replaces the - * existing policy. It is the same as deleting the existing policy and - * adding the supplied policy, except for the following: - * + The new policy will have the same `[ALERT_POLICY_ID]` as the former - * policy. This gives you continuity with the former policy in your - * notifications and incidents. - * + Conditions in the new policy will keep their former `[CONDITION_ID]` if - * the supplied condition includes the `name` field with that - * `[CONDITION_ID]`. If the supplied condition omits the `name` field, - * then a new `[CONDITION_ID]` is created. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $update_mask = null; - /** - * Required. The updated alerting policy or the updated values for the - * fields listed in `update_mask`. - * If `update_mask` is not empty, any fields in this policy that are - * not in `update_mask` are ignored. - * - * Generated from protobuf field .google.monitoring.v3.AlertPolicy alert_policy = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $alert_policy = null; - - /** - * @param \Google\Protobuf\FieldMask $updateMask Optional. A list of alerting policy field names. If this field is not - * empty, each listed field in the existing alerting policy is set to the - * value of the corresponding field in the supplied policy (`alert_policy`), - * or to the field's default value if the field is not in the supplied - * alerting policy. Fields not listed retain their previous value. - * - * Examples of valid field masks include `display_name`, `documentation`, - * `documentation.content`, `documentation.mime_type`, `user_labels`, - * `user_label.nameofkey`, `enabled`, `conditions`, `combiner`, etc. - * - * If this field is empty, then the supplied alerting policy replaces the - * existing policy. It is the same as deleting the existing policy and - * adding the supplied policy, except for the following: - * - * + The new policy will have the same `[ALERT_POLICY_ID]` as the former - * policy. This gives you continuity with the former policy in your - * notifications and incidents. - * + Conditions in the new policy will keep their former `[CONDITION_ID]` if - * the supplied condition includes the `name` field with that - * `[CONDITION_ID]`. If the supplied condition omits the `name` field, - * then a new `[CONDITION_ID]` is created. - * @param \Google\Cloud\Monitoring\V3\AlertPolicy $alertPolicy Required. The updated alerting policy or the updated values for the - * fields listed in `update_mask`. - * If `update_mask` is not empty, any fields in this policy that are - * not in `update_mask` are ignored. - * - * @return \Google\Cloud\Monitoring\V3\UpdateAlertPolicyRequest - * - * @experimental - */ - public static function build(\Google\Protobuf\FieldMask $updateMask, \Google\Cloud\Monitoring\V3\AlertPolicy $alertPolicy): self - { - return (new self()) - ->setUpdateMask($updateMask) - ->setAlertPolicy($alertPolicy); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Optional. A list of alerting policy field names. If this field is not - * empty, each listed field in the existing alerting policy is set to the - * value of the corresponding field in the supplied policy (`alert_policy`), - * or to the field's default value if the field is not in the supplied - * alerting policy. Fields not listed retain their previous value. - * Examples of valid field masks include `display_name`, `documentation`, - * `documentation.content`, `documentation.mime_type`, `user_labels`, - * `user_label.nameofkey`, `enabled`, `conditions`, `combiner`, etc. - * If this field is empty, then the supplied alerting policy replaces the - * existing policy. It is the same as deleting the existing policy and - * adding the supplied policy, except for the following: - * + The new policy will have the same `[ALERT_POLICY_ID]` as the former - * policy. This gives you continuity with the former policy in your - * notifications and incidents. - * + Conditions in the new policy will keep their former `[CONDITION_ID]` if - * the supplied condition includes the `name` field with that - * `[CONDITION_ID]`. If the supplied condition omits the `name` field, - * then a new `[CONDITION_ID]` is created. - * @type \Google\Cloud\Monitoring\V3\AlertPolicy $alert_policy - * Required. The updated alerting policy or the updated values for the - * fields listed in `update_mask`. - * If `update_mask` is not empty, any fields in this policy that are - * not in `update_mask` are ignored. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\AlertService::initOnce(); - parent::__construct($data); - } - - /** - * Optional. A list of alerting policy field names. If this field is not - * empty, each listed field in the existing alerting policy is set to the - * value of the corresponding field in the supplied policy (`alert_policy`), - * or to the field's default value if the field is not in the supplied - * alerting policy. Fields not listed retain their previous value. - * Examples of valid field masks include `display_name`, `documentation`, - * `documentation.content`, `documentation.mime_type`, `user_labels`, - * `user_label.nameofkey`, `enabled`, `conditions`, `combiner`, etc. - * If this field is empty, then the supplied alerting policy replaces the - * existing policy. It is the same as deleting the existing policy and - * adding the supplied policy, except for the following: - * + The new policy will have the same `[ALERT_POLICY_ID]` as the former - * policy. This gives you continuity with the former policy in your - * notifications and incidents. - * + Conditions in the new policy will keep their former `[CONDITION_ID]` if - * the supplied condition includes the `name` field with that - * `[CONDITION_ID]`. If the supplied condition omits the `name` field, - * then a new `[CONDITION_ID]` is created. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Optional. A list of alerting policy field names. If this field is not - * empty, each listed field in the existing alerting policy is set to the - * value of the corresponding field in the supplied policy (`alert_policy`), - * or to the field's default value if the field is not in the supplied - * alerting policy. Fields not listed retain their previous value. - * Examples of valid field masks include `display_name`, `documentation`, - * `documentation.content`, `documentation.mime_type`, `user_labels`, - * `user_label.nameofkey`, `enabled`, `conditions`, `combiner`, etc. - * If this field is empty, then the supplied alerting policy replaces the - * existing policy. It is the same as deleting the existing policy and - * adding the supplied policy, except for the following: - * + The new policy will have the same `[ALERT_POLICY_ID]` as the former - * policy. This gives you continuity with the former policy in your - * notifications and incidents. - * + Conditions in the new policy will keep their former `[CONDITION_ID]` if - * the supplied condition includes the `name` field with that - * `[CONDITION_ID]`. If the supplied condition omits the `name` field, - * then a new `[CONDITION_ID]` is created. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * Required. The updated alerting policy or the updated values for the - * fields listed in `update_mask`. - * If `update_mask` is not empty, any fields in this policy that are - * not in `update_mask` are ignored. - * - * Generated from protobuf field .google.monitoring.v3.AlertPolicy alert_policy = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Monitoring\V3\AlertPolicy|null - */ - public function getAlertPolicy() - { - return $this->alert_policy; - } - - public function hasAlertPolicy() - { - return isset($this->alert_policy); - } - - public function clearAlertPolicy() - { - unset($this->alert_policy); - } - - /** - * Required. The updated alerting policy or the updated values for the - * fields listed in `update_mask`. - * If `update_mask` is not empty, any fields in this policy that are - * not in `update_mask` are ignored. - * - * Generated from protobuf field .google.monitoring.v3.AlertPolicy alert_policy = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Monitoring\V3\AlertPolicy $var - * @return $this - */ - public function setAlertPolicy($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\AlertPolicy::class); - $this->alert_policy = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UpdateGroupRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UpdateGroupRequest.php deleted file mode 100644 index 1acaca5a69df..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UpdateGroupRequest.php +++ /dev/null @@ -1,134 +0,0 @@ -google.monitoring.v3.UpdateGroupRequest - */ -class UpdateGroupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The new definition of the group. All fields of the existing - * group, excepting `name`, are replaced with the corresponding fields of this - * group. - * - * Generated from protobuf field .google.monitoring.v3.Group group = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $group = null; - /** - * If true, validate this request but do not update the existing group. - * - * Generated from protobuf field bool validate_only = 3; - */ - protected $validate_only = false; - - /** - * @param \Google\Cloud\Monitoring\V3\Group $group Required. The new definition of the group. All fields of the existing - * group, excepting `name`, are replaced with the corresponding fields of this - * group. - * - * @return \Google\Cloud\Monitoring\V3\UpdateGroupRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Monitoring\V3\Group $group): self - { - return (new self()) - ->setGroup($group); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Monitoring\V3\Group $group - * Required. The new definition of the group. All fields of the existing - * group, excepting `name`, are replaced with the corresponding fields of this - * group. - * @type bool $validate_only - * If true, validate this request but do not update the existing group. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\GroupService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The new definition of the group. All fields of the existing - * group, excepting `name`, are replaced with the corresponding fields of this - * group. - * - * Generated from protobuf field .google.monitoring.v3.Group group = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Monitoring\V3\Group|null - */ - public function getGroup() - { - return $this->group; - } - - public function hasGroup() - { - return isset($this->group); - } - - public function clearGroup() - { - unset($this->group); - } - - /** - * Required. The new definition of the group. All fields of the existing - * group, excepting `name`, are replaced with the corresponding fields of this - * group. - * - * Generated from protobuf field .google.monitoring.v3.Group group = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Monitoring\V3\Group $var - * @return $this - */ - public function setGroup($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\Group::class); - $this->group = $var; - - return $this; - } - - /** - * If true, validate this request but do not update the existing group. - * - * Generated from protobuf field bool validate_only = 3; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * If true, validate this request but do not update the existing group. - * - * Generated from protobuf field bool validate_only = 3; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UpdateNotificationChannelRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UpdateNotificationChannelRequest.php deleted file mode 100644 index d66db070896e..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UpdateNotificationChannelRequest.php +++ /dev/null @@ -1,151 +0,0 @@ -google.monitoring.v3.UpdateNotificationChannelRequest - */ -class UpdateNotificationChannelRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $update_mask = null; - /** - * Required. A description of the changes to be applied to the specified - * notification channel. The description must provide a definition for - * fields to be updated; the names of these fields should also be - * included in the `update_mask`. - * - * Generated from protobuf field .google.monitoring.v3.NotificationChannel notification_channel = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $notification_channel = null; - - /** - * @param \Google\Protobuf\FieldMask $updateMask Optional. The fields to update. - * @param \Google\Cloud\Monitoring\V3\NotificationChannel $notificationChannel Required. A description of the changes to be applied to the specified - * notification channel. The description must provide a definition for - * fields to be updated; the names of these fields should also be - * included in the `update_mask`. - * - * @return \Google\Cloud\Monitoring\V3\UpdateNotificationChannelRequest - * - * @experimental - */ - public static function build(\Google\Protobuf\FieldMask $updateMask, \Google\Cloud\Monitoring\V3\NotificationChannel $notificationChannel): self - { - return (new self()) - ->setUpdateMask($updateMask) - ->setNotificationChannel($notificationChannel); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Optional. The fields to update. - * @type \Google\Cloud\Monitoring\V3\NotificationChannel $notification_channel - * Required. A description of the changes to be applied to the specified - * notification channel. The description must provide a definition for - * fields to be updated; the names of these fields should also be - * included in the `update_mask`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\NotificationService::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Optional. The fields to update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * Required. A description of the changes to be applied to the specified - * notification channel. The description must provide a definition for - * fields to be updated; the names of these fields should also be - * included in the `update_mask`. - * - * Generated from protobuf field .google.monitoring.v3.NotificationChannel notification_channel = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Monitoring\V3\NotificationChannel|null - */ - public function getNotificationChannel() - { - return $this->notification_channel; - } - - public function hasNotificationChannel() - { - return isset($this->notification_channel); - } - - public function clearNotificationChannel() - { - unset($this->notification_channel); - } - - /** - * Required. A description of the changes to be applied to the specified - * notification channel. The description must provide a definition for - * fields to be updated; the names of these fields should also be - * included in the `update_mask`. - * - * Generated from protobuf field .google.monitoring.v3.NotificationChannel notification_channel = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Monitoring\V3\NotificationChannel $var - * @return $this - */ - public function setNotificationChannel($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\NotificationChannel::class); - $this->notification_channel = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UpdateServiceLevelObjectiveRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UpdateServiceLevelObjectiveRequest.php deleted file mode 100644 index c6521c3f2a33..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UpdateServiceLevelObjectiveRequest.php +++ /dev/null @@ -1,139 +0,0 @@ -google.monitoring.v3.UpdateServiceLevelObjectiveRequest - */ -class UpdateServiceLevelObjectiveRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The `ServiceLevelObjective` to draw updates from. - * The given `name` specifies the resource to update. - * - * Generated from protobuf field .google.monitoring.v3.ServiceLevelObjective service_level_objective = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $service_level_objective = null; - /** - * A set of field paths defining which fields to use for the update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\Monitoring\V3\ServiceLevelObjective $serviceLevelObjective Required. The `ServiceLevelObjective` to draw updates from. - * The given `name` specifies the resource to update. - * - * @return \Google\Cloud\Monitoring\V3\UpdateServiceLevelObjectiveRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Monitoring\V3\ServiceLevelObjective $serviceLevelObjective): self - { - return (new self()) - ->setServiceLevelObjective($serviceLevelObjective); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Monitoring\V3\ServiceLevelObjective $service_level_objective - * Required. The `ServiceLevelObjective` to draw updates from. - * The given `name` specifies the resource to update. - * @type \Google\Protobuf\FieldMask $update_mask - * A set of field paths defining which fields to use for the update. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\ServiceService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The `ServiceLevelObjective` to draw updates from. - * The given `name` specifies the resource to update. - * - * Generated from protobuf field .google.monitoring.v3.ServiceLevelObjective service_level_objective = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Monitoring\V3\ServiceLevelObjective|null - */ - public function getServiceLevelObjective() - { - return $this->service_level_objective; - } - - public function hasServiceLevelObjective() - { - return isset($this->service_level_objective); - } - - public function clearServiceLevelObjective() - { - unset($this->service_level_objective); - } - - /** - * Required. The `ServiceLevelObjective` to draw updates from. - * The given `name` specifies the resource to update. - * - * Generated from protobuf field .google.monitoring.v3.ServiceLevelObjective service_level_objective = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Monitoring\V3\ServiceLevelObjective $var - * @return $this - */ - public function setServiceLevelObjective($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\ServiceLevelObjective::class); - $this->service_level_objective = $var; - - return $this; - } - - /** - * A set of field paths defining which fields to use for the update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * A set of field paths defining which fields to use for the update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UpdateServiceRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UpdateServiceRequest.php deleted file mode 100644 index c672ae081a8d..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UpdateServiceRequest.php +++ /dev/null @@ -1,139 +0,0 @@ -google.monitoring.v3.UpdateServiceRequest - */ -class UpdateServiceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The `Service` to draw updates from. - * The given `name` specifies the resource to update. - * - * Generated from protobuf field .google.monitoring.v3.Service service = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $service = null; - /** - * A set of field paths defining which fields to use for the update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\Monitoring\V3\Service $service Required. The `Service` to draw updates from. - * The given `name` specifies the resource to update. - * - * @return \Google\Cloud\Monitoring\V3\UpdateServiceRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Monitoring\V3\Service $service): self - { - return (new self()) - ->setService($service); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Monitoring\V3\Service $service - * Required. The `Service` to draw updates from. - * The given `name` specifies the resource to update. - * @type \Google\Protobuf\FieldMask $update_mask - * A set of field paths defining which fields to use for the update. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\ServiceService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The `Service` to draw updates from. - * The given `name` specifies the resource to update. - * - * Generated from protobuf field .google.monitoring.v3.Service service = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Monitoring\V3\Service|null - */ - public function getService() - { - return $this->service; - } - - public function hasService() - { - return isset($this->service); - } - - public function clearService() - { - unset($this->service); - } - - /** - * Required. The `Service` to draw updates from. - * The given `name` specifies the resource to update. - * - * Generated from protobuf field .google.monitoring.v3.Service service = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Monitoring\V3\Service $var - * @return $this - */ - public function setService($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\Service::class); - $this->service = $var; - - return $this; - } - - /** - * A set of field paths defining which fields to use for the update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * A set of field paths defining which fields to use for the update. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UpdateSnoozeRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UpdateSnoozeRequest.php deleted file mode 100644 index d3091d8bda9b..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UpdateSnoozeRequest.php +++ /dev/null @@ -1,227 +0,0 @@ -google.monitoring.v3.UpdateSnoozeRequest - */ -class UpdateSnoozeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The `Snooze` to update. Must have the name field present. - * - * Generated from protobuf field .google.monitoring.v3.Snooze snooze = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $snooze = null; - /** - * Required. The fields to update. - * For each field listed in `update_mask`: - * * If the `Snooze` object supplied in the `UpdateSnoozeRequest` has a - * value for that field, the value of the field in the existing `Snooze` - * will be set to the value of the field in the supplied `Snooze`. - * * If the field does not have a value in the supplied `Snooze`, the field - * in the existing `Snooze` is set to its default value. - * Fields not listed retain their existing value. - * The following are the field names that are accepted in `update_mask`: - * * `display_name` - * * `interval.start_time` - * * `interval.end_time` - * That said, the start time and end time of the `Snooze` determines which - * fields can legally be updated. Before attempting an update, users should - * consult the documentation for `UpdateSnoozeRequest`, which talks about - * which fields can be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\Monitoring\V3\Snooze $snooze Required. The `Snooze` to update. Must have the name field present. - * @param \Google\Protobuf\FieldMask $updateMask Required. The fields to update. - * - * For each field listed in `update_mask`: - * - * * If the `Snooze` object supplied in the `UpdateSnoozeRequest` has a - * value for that field, the value of the field in the existing `Snooze` - * will be set to the value of the field in the supplied `Snooze`. - * * If the field does not have a value in the supplied `Snooze`, the field - * in the existing `Snooze` is set to its default value. - * - * Fields not listed retain their existing value. - * - * The following are the field names that are accepted in `update_mask`: - * - * * `display_name` - * * `interval.start_time` - * * `interval.end_time` - * - * That said, the start time and end time of the `Snooze` determines which - * fields can legally be updated. Before attempting an update, users should - * consult the documentation for `UpdateSnoozeRequest`, which talks about - * which fields can be updated. - * - * @return \Google\Cloud\Monitoring\V3\UpdateSnoozeRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Monitoring\V3\Snooze $snooze, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setSnooze($snooze) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Monitoring\V3\Snooze $snooze - * Required. The `Snooze` to update. Must have the name field present. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. The fields to update. - * For each field listed in `update_mask`: - * * If the `Snooze` object supplied in the `UpdateSnoozeRequest` has a - * value for that field, the value of the field in the existing `Snooze` - * will be set to the value of the field in the supplied `Snooze`. - * * If the field does not have a value in the supplied `Snooze`, the field - * in the existing `Snooze` is set to its default value. - * Fields not listed retain their existing value. - * The following are the field names that are accepted in `update_mask`: - * * `display_name` - * * `interval.start_time` - * * `interval.end_time` - * That said, the start time and end time of the `Snooze` determines which - * fields can legally be updated. Before attempting an update, users should - * consult the documentation for `UpdateSnoozeRequest`, which talks about - * which fields can be updated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\SnoozeService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The `Snooze` to update. Must have the name field present. - * - * Generated from protobuf field .google.monitoring.v3.Snooze snooze = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Monitoring\V3\Snooze|null - */ - public function getSnooze() - { - return $this->snooze; - } - - public function hasSnooze() - { - return isset($this->snooze); - } - - public function clearSnooze() - { - unset($this->snooze); - } - - /** - * Required. The `Snooze` to update. Must have the name field present. - * - * Generated from protobuf field .google.monitoring.v3.Snooze snooze = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Monitoring\V3\Snooze $var - * @return $this - */ - public function setSnooze($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\Snooze::class); - $this->snooze = $var; - - return $this; - } - - /** - * Required. The fields to update. - * For each field listed in `update_mask`: - * * If the `Snooze` object supplied in the `UpdateSnoozeRequest` has a - * value for that field, the value of the field in the existing `Snooze` - * will be set to the value of the field in the supplied `Snooze`. - * * If the field does not have a value in the supplied `Snooze`, the field - * in the existing `Snooze` is set to its default value. - * Fields not listed retain their existing value. - * The following are the field names that are accepted in `update_mask`: - * * `display_name` - * * `interval.start_time` - * * `interval.end_time` - * That said, the start time and end time of the `Snooze` determines which - * fields can legally be updated. Before attempting an update, users should - * consult the documentation for `UpdateSnoozeRequest`, which talks about - * which fields can be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Required. The fields to update. - * For each field listed in `update_mask`: - * * If the `Snooze` object supplied in the `UpdateSnoozeRequest` has a - * value for that field, the value of the field in the existing `Snooze` - * will be set to the value of the field in the supplied `Snooze`. - * * If the field does not have a value in the supplied `Snooze`, the field - * in the existing `Snooze` is set to its default value. - * Fields not listed retain their existing value. - * The following are the field names that are accepted in `update_mask`: - * * `display_name` - * * `interval.start_time` - * * `interval.end_time` - * That said, the start time and end time of the `Snooze` determines which - * fields can legally be updated. Before attempting an update, users should - * consult the documentation for `UpdateSnoozeRequest`, which talks about - * which fields can be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UpdateUptimeCheckConfigRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UpdateUptimeCheckConfigRequest.php deleted file mode 100644 index 151f44869152..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UpdateUptimeCheckConfigRequest.php +++ /dev/null @@ -1,192 +0,0 @@ -google.monitoring.v3.UpdateUptimeCheckConfigRequest - */ -class UpdateUptimeCheckConfigRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. If present, only the listed fields in the current Uptime check - * configuration are updated with values from the new configuration. If this - * field is empty, then the current configuration is completely replaced with - * the new configuration. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - /** - * Required. If an `updateMask` has been specified, this field gives - * the values for the set of fields mentioned in the `updateMask`. If an - * `updateMask` has not been given, this Uptime check configuration replaces - * the current configuration. If a field is mentioned in `updateMask` but - * the corresponding field is omitted in this partial Uptime check - * configuration, it has the effect of deleting/clearing the field from the - * configuration on the server. - * The following fields can be updated: `display_name`, - * `http_check`, `tcp_check`, `timeout`, `content_matchers`, and - * `selected_regions`. - * - * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig uptime_check_config = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $uptime_check_config = null; - - /** - * @param \Google\Cloud\Monitoring\V3\UptimeCheckConfig $uptimeCheckConfig Required. If an `updateMask` has been specified, this field gives - * the values for the set of fields mentioned in the `updateMask`. If an - * `updateMask` has not been given, this Uptime check configuration replaces - * the current configuration. If a field is mentioned in `updateMask` but - * the corresponding field is omitted in this partial Uptime check - * configuration, it has the effect of deleting/clearing the field from the - * configuration on the server. - * - * The following fields can be updated: `display_name`, - * `http_check`, `tcp_check`, `timeout`, `content_matchers`, and - * `selected_regions`. - * - * @return \Google\Cloud\Monitoring\V3\UpdateUptimeCheckConfigRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Monitoring\V3\UptimeCheckConfig $uptimeCheckConfig): self - { - return (new self()) - ->setUptimeCheckConfig($uptimeCheckConfig); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Optional. If present, only the listed fields in the current Uptime check - * configuration are updated with values from the new configuration. If this - * field is empty, then the current configuration is completely replaced with - * the new configuration. - * @type \Google\Cloud\Monitoring\V3\UptimeCheckConfig $uptime_check_config - * Required. If an `updateMask` has been specified, this field gives - * the values for the set of fields mentioned in the `updateMask`. If an - * `updateMask` has not been given, this Uptime check configuration replaces - * the current configuration. If a field is mentioned in `updateMask` but - * the corresponding field is omitted in this partial Uptime check - * configuration, it has the effect of deleting/clearing the field from the - * configuration on the server. - * The following fields can be updated: `display_name`, - * `http_check`, `tcp_check`, `timeout`, `content_matchers`, and - * `selected_regions`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\UptimeService::initOnce(); - parent::__construct($data); - } - - /** - * Optional. If present, only the listed fields in the current Uptime check - * configuration are updated with values from the new configuration. If this - * field is empty, then the current configuration is completely replaced with - * the new configuration. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Optional. If present, only the listed fields in the current Uptime check - * configuration are updated with values from the new configuration. If this - * field is empty, then the current configuration is completely replaced with - * the new configuration. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * Required. If an `updateMask` has been specified, this field gives - * the values for the set of fields mentioned in the `updateMask`. If an - * `updateMask` has not been given, this Uptime check configuration replaces - * the current configuration. If a field is mentioned in `updateMask` but - * the corresponding field is omitted in this partial Uptime check - * configuration, it has the effect of deleting/clearing the field from the - * configuration on the server. - * The following fields can be updated: `display_name`, - * `http_check`, `tcp_check`, `timeout`, `content_matchers`, and - * `selected_regions`. - * - * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig uptime_check_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Monitoring\V3\UptimeCheckConfig|null - */ - public function getUptimeCheckConfig() - { - return $this->uptime_check_config; - } - - public function hasUptimeCheckConfig() - { - return isset($this->uptime_check_config); - } - - public function clearUptimeCheckConfig() - { - unset($this->uptime_check_config); - } - - /** - * Required. If an `updateMask` has been specified, this field gives - * the values for the set of fields mentioned in the `updateMask`. If an - * `updateMask` has not been given, this Uptime check configuration replaces - * the current configuration. If a field is mentioned in `updateMask` but - * the corresponding field is omitted in this partial Uptime check - * configuration, it has the effect of deleting/clearing the field from the - * configuration on the server. - * The following fields can be updated: `display_name`, - * `http_check`, `tcp_check`, `timeout`, `content_matchers`, and - * `selected_regions`. - * - * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig uptime_check_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Monitoring\V3\UptimeCheckConfig $var - * @return $this - */ - public function setUptimeCheckConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\UptimeCheckConfig::class); - $this->uptime_check_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig.php deleted file mode 100644 index 8823604b32cb..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig.php +++ /dev/null @@ -1,748 +0,0 @@ -google.monitoring.v3.UptimeCheckConfig - */ -class UptimeCheckConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. A unique resource name for this Uptime check configuration. The - * format is: - * projects/[PROJECT_ID_OR_NUMBER]/uptimeCheckConfigs/[UPTIME_CHECK_ID] - * `[PROJECT_ID_OR_NUMBER]` is the Workspace host project associated with the - * Uptime check. - * This field should be omitted when creating the Uptime check configuration; - * on create, the resource name is assigned by the server and included in the - * response. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * A human-friendly name for the Uptime check configuration. The display name - * should be unique within a Cloud Monitoring Workspace in order to make it - * easier to identify; however, uniqueness is not enforced. Required. - * - * Generated from protobuf field string display_name = 2; - */ - protected $display_name = ''; - /** - * How often, in seconds, the Uptime check is performed. - * Currently, the only supported values are `60s` (1 minute), `300s` - * (5 minutes), `600s` (10 minutes), and `900s` (15 minutes). Optional, - * defaults to `60s`. - * - * Generated from protobuf field .google.protobuf.Duration period = 7; - */ - protected $period = null; - /** - * The maximum amount of time to wait for the request to complete (must be - * between 1 and 60 seconds). Required. - * - * Generated from protobuf field .google.protobuf.Duration timeout = 8; - */ - protected $timeout = null; - /** - * The content that is expected to appear in the data returned by the target - * server against which the check is run. Currently, only the first entry - * in the `content_matchers` list is supported, and additional entries will - * be ignored. This field is optional and should only be specified if a - * content match is required as part of the/ Uptime check. - * - * Generated from protobuf field repeated .google.monitoring.v3.UptimeCheckConfig.ContentMatcher content_matchers = 9; - */ - private $content_matchers; - /** - * The type of checkers to use to execute the Uptime check. - * - * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.CheckerType checker_type = 17; - */ - protected $checker_type = 0; - /** - * The list of regions from which the check will be run. - * Some regions contain one location, and others contain more than one. - * If this field is specified, enough regions must be provided to include a - * minimum of 3 locations. Not specifying this field will result in Uptime - * checks running from all available regions. - * - * Generated from protobuf field repeated .google.monitoring.v3.UptimeCheckRegion selected_regions = 10; - */ - private $selected_regions; - /** - * If this is `true`, then checks are made only from the 'internal_checkers'. - * If it is `false`, then checks are made only from the 'selected_regions'. - * It is an error to provide 'selected_regions' when is_internal is `true`, - * or to provide 'internal_checkers' when is_internal is `false`. - * - * Generated from protobuf field bool is_internal = 15 [deprecated = true]; - * @deprecated - */ - protected $is_internal = false; - /** - * The internal checkers that this check will egress from. If `is_internal` is - * `true` and this list is empty, the check will egress from all the - * InternalCheckers configured for the project that owns this - * `UptimeCheckConfig`. - * - * Generated from protobuf field repeated .google.monitoring.v3.InternalChecker internal_checkers = 14 [deprecated = true]; - * @deprecated - */ - private $internal_checkers; - /** - * User-supplied key/value data to be used for organizing and - * identifying the `UptimeCheckConfig` objects. - * The field can contain up to 64 entries. Each key and value is limited to - * 63 Unicode characters or 128 bytes, whichever is smaller. Labels and - * values can contain only lowercase letters, numerals, underscores, and - * dashes. Keys must begin with a letter. - * - * Generated from protobuf field map user_labels = 20; - */ - private $user_labels; - protected $resource; - protected $check_request_type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. A unique resource name for this Uptime check configuration. The - * format is: - * projects/[PROJECT_ID_OR_NUMBER]/uptimeCheckConfigs/[UPTIME_CHECK_ID] - * `[PROJECT_ID_OR_NUMBER]` is the Workspace host project associated with the - * Uptime check. - * This field should be omitted when creating the Uptime check configuration; - * on create, the resource name is assigned by the server and included in the - * response. - * @type string $display_name - * A human-friendly name for the Uptime check configuration. The display name - * should be unique within a Cloud Monitoring Workspace in order to make it - * easier to identify; however, uniqueness is not enforced. Required. - * @type \Google\Api\MonitoredResource $monitored_resource - * The [monitored - * resource](https://cloud.google.com/monitoring/api/resources) associated - * with the configuration. - * The following monitored resource types are valid for this field: - * `uptime_url`, - * `gce_instance`, - * `gae_app`, - * `aws_ec2_instance`, - * `aws_elb_load_balancer` - * `k8s_service` - * `servicedirectory_service` - * `cloud_run_revision` - * @type \Google\Cloud\Monitoring\V3\UptimeCheckConfig\ResourceGroup $resource_group - * The group resource associated with the configuration. - * @type \Google\Cloud\Monitoring\V3\SyntheticMonitorTarget $synthetic_monitor - * Specifies a Synthetic Monitor to invoke. - * @type \Google\Cloud\Monitoring\V3\UptimeCheckConfig\HttpCheck $http_check - * Contains information needed to make an HTTP or HTTPS check. - * @type \Google\Cloud\Monitoring\V3\UptimeCheckConfig\TcpCheck $tcp_check - * Contains information needed to make a TCP check. - * @type \Google\Protobuf\Duration $period - * How often, in seconds, the Uptime check is performed. - * Currently, the only supported values are `60s` (1 minute), `300s` - * (5 minutes), `600s` (10 minutes), and `900s` (15 minutes). Optional, - * defaults to `60s`. - * @type \Google\Protobuf\Duration $timeout - * The maximum amount of time to wait for the request to complete (must be - * between 1 and 60 seconds). Required. - * @type array<\Google\Cloud\Monitoring\V3\UptimeCheckConfig\ContentMatcher>|\Google\Protobuf\Internal\RepeatedField $content_matchers - * The content that is expected to appear in the data returned by the target - * server against which the check is run. Currently, only the first entry - * in the `content_matchers` list is supported, and additional entries will - * be ignored. This field is optional and should only be specified if a - * content match is required as part of the/ Uptime check. - * @type int $checker_type - * The type of checkers to use to execute the Uptime check. - * @type array|\Google\Protobuf\Internal\RepeatedField $selected_regions - * The list of regions from which the check will be run. - * Some regions contain one location, and others contain more than one. - * If this field is specified, enough regions must be provided to include a - * minimum of 3 locations. Not specifying this field will result in Uptime - * checks running from all available regions. - * @type bool $is_internal - * If this is `true`, then checks are made only from the 'internal_checkers'. - * If it is `false`, then checks are made only from the 'selected_regions'. - * It is an error to provide 'selected_regions' when is_internal is `true`, - * or to provide 'internal_checkers' when is_internal is `false`. - * @type array<\Google\Cloud\Monitoring\V3\InternalChecker>|\Google\Protobuf\Internal\RepeatedField $internal_checkers - * The internal checkers that this check will egress from. If `is_internal` is - * `true` and this list is empty, the check will egress from all the - * InternalCheckers configured for the project that owns this - * `UptimeCheckConfig`. - * @type array|\Google\Protobuf\Internal\MapField $user_labels - * User-supplied key/value data to be used for organizing and - * identifying the `UptimeCheckConfig` objects. - * The field can contain up to 64 entries. Each key and value is limited to - * 63 Unicode characters or 128 bytes, whichever is smaller. Labels and - * values can contain only lowercase letters, numerals, underscores, and - * dashes. Keys must begin with a letter. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\Uptime::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. A unique resource name for this Uptime check configuration. The - * format is: - * projects/[PROJECT_ID_OR_NUMBER]/uptimeCheckConfigs/[UPTIME_CHECK_ID] - * `[PROJECT_ID_OR_NUMBER]` is the Workspace host project associated with the - * Uptime check. - * This field should be omitted when creating the Uptime check configuration; - * on create, the resource name is assigned by the server and included in the - * response. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. A unique resource name for this Uptime check configuration. The - * format is: - * projects/[PROJECT_ID_OR_NUMBER]/uptimeCheckConfigs/[UPTIME_CHECK_ID] - * `[PROJECT_ID_OR_NUMBER]` is the Workspace host project associated with the - * Uptime check. - * This field should be omitted when creating the Uptime check configuration; - * on create, the resource name is assigned by the server and included in the - * response. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * A human-friendly name for the Uptime check configuration. The display name - * should be unique within a Cloud Monitoring Workspace in order to make it - * easier to identify; however, uniqueness is not enforced. Required. - * - * Generated from protobuf field string display_name = 2; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * A human-friendly name for the Uptime check configuration. The display name - * should be unique within a Cloud Monitoring Workspace in order to make it - * easier to identify; however, uniqueness is not enforced. Required. - * - * Generated from protobuf field string display_name = 2; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * The [monitored - * resource](https://cloud.google.com/monitoring/api/resources) associated - * with the configuration. - * The following monitored resource types are valid for this field: - * `uptime_url`, - * `gce_instance`, - * `gae_app`, - * `aws_ec2_instance`, - * `aws_elb_load_balancer` - * `k8s_service` - * `servicedirectory_service` - * `cloud_run_revision` - * - * Generated from protobuf field .google.api.MonitoredResource monitored_resource = 3; - * @return \Google\Api\MonitoredResource|null - */ - public function getMonitoredResource() - { - return $this->readOneof(3); - } - - public function hasMonitoredResource() - { - return $this->hasOneof(3); - } - - /** - * The [monitored - * resource](https://cloud.google.com/monitoring/api/resources) associated - * with the configuration. - * The following monitored resource types are valid for this field: - * `uptime_url`, - * `gce_instance`, - * `gae_app`, - * `aws_ec2_instance`, - * `aws_elb_load_balancer` - * `k8s_service` - * `servicedirectory_service` - * `cloud_run_revision` - * - * Generated from protobuf field .google.api.MonitoredResource monitored_resource = 3; - * @param \Google\Api\MonitoredResource $var - * @return $this - */ - public function setMonitoredResource($var) - { - GPBUtil::checkMessage($var, \Google\Api\MonitoredResource::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * The group resource associated with the configuration. - * - * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.ResourceGroup resource_group = 4; - * @return \Google\Cloud\Monitoring\V3\UptimeCheckConfig\ResourceGroup|null - */ - public function getResourceGroup() - { - return $this->readOneof(4); - } - - public function hasResourceGroup() - { - return $this->hasOneof(4); - } - - /** - * The group resource associated with the configuration. - * - * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.ResourceGroup resource_group = 4; - * @param \Google\Cloud\Monitoring\V3\UptimeCheckConfig\ResourceGroup $var - * @return $this - */ - public function setResourceGroup($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\UptimeCheckConfig\ResourceGroup::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Specifies a Synthetic Monitor to invoke. - * - * Generated from protobuf field .google.monitoring.v3.SyntheticMonitorTarget synthetic_monitor = 21; - * @return \Google\Cloud\Monitoring\V3\SyntheticMonitorTarget|null - */ - public function getSyntheticMonitor() - { - return $this->readOneof(21); - } - - public function hasSyntheticMonitor() - { - return $this->hasOneof(21); - } - - /** - * Specifies a Synthetic Monitor to invoke. - * - * Generated from protobuf field .google.monitoring.v3.SyntheticMonitorTarget synthetic_monitor = 21; - * @param \Google\Cloud\Monitoring\V3\SyntheticMonitorTarget $var - * @return $this - */ - public function setSyntheticMonitor($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\SyntheticMonitorTarget::class); - $this->writeOneof(21, $var); - - return $this; - } - - /** - * Contains information needed to make an HTTP or HTTPS check. - * - * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.HttpCheck http_check = 5; - * @return \Google\Cloud\Monitoring\V3\UptimeCheckConfig\HttpCheck|null - */ - public function getHttpCheck() - { - return $this->readOneof(5); - } - - public function hasHttpCheck() - { - return $this->hasOneof(5); - } - - /** - * Contains information needed to make an HTTP or HTTPS check. - * - * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.HttpCheck http_check = 5; - * @param \Google\Cloud\Monitoring\V3\UptimeCheckConfig\HttpCheck $var - * @return $this - */ - public function setHttpCheck($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\UptimeCheckConfig\HttpCheck::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * Contains information needed to make a TCP check. - * - * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.TcpCheck tcp_check = 6; - * @return \Google\Cloud\Monitoring\V3\UptimeCheckConfig\TcpCheck|null - */ - public function getTcpCheck() - { - return $this->readOneof(6); - } - - public function hasTcpCheck() - { - return $this->hasOneof(6); - } - - /** - * Contains information needed to make a TCP check. - * - * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.TcpCheck tcp_check = 6; - * @param \Google\Cloud\Monitoring\V3\UptimeCheckConfig\TcpCheck $var - * @return $this - */ - public function setTcpCheck($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\UptimeCheckConfig\TcpCheck::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * How often, in seconds, the Uptime check is performed. - * Currently, the only supported values are `60s` (1 minute), `300s` - * (5 minutes), `600s` (10 minutes), and `900s` (15 minutes). Optional, - * defaults to `60s`. - * - * Generated from protobuf field .google.protobuf.Duration period = 7; - * @return \Google\Protobuf\Duration|null - */ - public function getPeriod() - { - return $this->period; - } - - public function hasPeriod() - { - return isset($this->period); - } - - public function clearPeriod() - { - unset($this->period); - } - - /** - * How often, in seconds, the Uptime check is performed. - * Currently, the only supported values are `60s` (1 minute), `300s` - * (5 minutes), `600s` (10 minutes), and `900s` (15 minutes). Optional, - * defaults to `60s`. - * - * Generated from protobuf field .google.protobuf.Duration period = 7; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setPeriod($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->period = $var; - - return $this; - } - - /** - * The maximum amount of time to wait for the request to complete (must be - * between 1 and 60 seconds). Required. - * - * Generated from protobuf field .google.protobuf.Duration timeout = 8; - * @return \Google\Protobuf\Duration|null - */ - public function getTimeout() - { - return $this->timeout; - } - - public function hasTimeout() - { - return isset($this->timeout); - } - - public function clearTimeout() - { - unset($this->timeout); - } - - /** - * The maximum amount of time to wait for the request to complete (must be - * between 1 and 60 seconds). Required. - * - * Generated from protobuf field .google.protobuf.Duration timeout = 8; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setTimeout($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->timeout = $var; - - return $this; - } - - /** - * The content that is expected to appear in the data returned by the target - * server against which the check is run. Currently, only the first entry - * in the `content_matchers` list is supported, and additional entries will - * be ignored. This field is optional and should only be specified if a - * content match is required as part of the/ Uptime check. - * - * Generated from protobuf field repeated .google.monitoring.v3.UptimeCheckConfig.ContentMatcher content_matchers = 9; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getContentMatchers() - { - return $this->content_matchers; - } - - /** - * The content that is expected to appear in the data returned by the target - * server against which the check is run. Currently, only the first entry - * in the `content_matchers` list is supported, and additional entries will - * be ignored. This field is optional and should only be specified if a - * content match is required as part of the/ Uptime check. - * - * Generated from protobuf field repeated .google.monitoring.v3.UptimeCheckConfig.ContentMatcher content_matchers = 9; - * @param array<\Google\Cloud\Monitoring\V3\UptimeCheckConfig\ContentMatcher>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setContentMatchers($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Monitoring\V3\UptimeCheckConfig\ContentMatcher::class); - $this->content_matchers = $arr; - - return $this; - } - - /** - * The type of checkers to use to execute the Uptime check. - * - * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.CheckerType checker_type = 17; - * @return int - */ - public function getCheckerType() - { - return $this->checker_type; - } - - /** - * The type of checkers to use to execute the Uptime check. - * - * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.CheckerType checker_type = 17; - * @param int $var - * @return $this - */ - public function setCheckerType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Monitoring\V3\UptimeCheckConfig\CheckerType::class); - $this->checker_type = $var; - - return $this; - } - - /** - * The list of regions from which the check will be run. - * Some regions contain one location, and others contain more than one. - * If this field is specified, enough regions must be provided to include a - * minimum of 3 locations. Not specifying this field will result in Uptime - * checks running from all available regions. - * - * Generated from protobuf field repeated .google.monitoring.v3.UptimeCheckRegion selected_regions = 10; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSelectedRegions() - { - return $this->selected_regions; - } - - /** - * The list of regions from which the check will be run. - * Some regions contain one location, and others contain more than one. - * If this field is specified, enough regions must be provided to include a - * minimum of 3 locations. Not specifying this field will result in Uptime - * checks running from all available regions. - * - * Generated from protobuf field repeated .google.monitoring.v3.UptimeCheckRegion selected_regions = 10; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSelectedRegions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Monitoring\V3\UptimeCheckRegion::class); - $this->selected_regions = $arr; - - return $this; - } - - /** - * If this is `true`, then checks are made only from the 'internal_checkers'. - * If it is `false`, then checks are made only from the 'selected_regions'. - * It is an error to provide 'selected_regions' when is_internal is `true`, - * or to provide 'internal_checkers' when is_internal is `false`. - * - * Generated from protobuf field bool is_internal = 15 [deprecated = true]; - * @return bool - * @deprecated - */ - public function getIsInternal() - { - @trigger_error('is_internal is deprecated.', E_USER_DEPRECATED); - return $this->is_internal; - } - - /** - * If this is `true`, then checks are made only from the 'internal_checkers'. - * If it is `false`, then checks are made only from the 'selected_regions'. - * It is an error to provide 'selected_regions' when is_internal is `true`, - * or to provide 'internal_checkers' when is_internal is `false`. - * - * Generated from protobuf field bool is_internal = 15 [deprecated = true]; - * @param bool $var - * @return $this - * @deprecated - */ - public function setIsInternal($var) - { - @trigger_error('is_internal is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkBool($var); - $this->is_internal = $var; - - return $this; - } - - /** - * The internal checkers that this check will egress from. If `is_internal` is - * `true` and this list is empty, the check will egress from all the - * InternalCheckers configured for the project that owns this - * `UptimeCheckConfig`. - * - * Generated from protobuf field repeated .google.monitoring.v3.InternalChecker internal_checkers = 14 [deprecated = true]; - * @return \Google\Protobuf\Internal\RepeatedField - * @deprecated - */ - public function getInternalCheckers() - { - @trigger_error('internal_checkers is deprecated.', E_USER_DEPRECATED); - return $this->internal_checkers; - } - - /** - * The internal checkers that this check will egress from. If `is_internal` is - * `true` and this list is empty, the check will egress from all the - * InternalCheckers configured for the project that owns this - * `UptimeCheckConfig`. - * - * Generated from protobuf field repeated .google.monitoring.v3.InternalChecker internal_checkers = 14 [deprecated = true]; - * @param array<\Google\Cloud\Monitoring\V3\InternalChecker>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - * @deprecated - */ - public function setInternalCheckers($var) - { - @trigger_error('internal_checkers is deprecated.', E_USER_DEPRECATED); - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Monitoring\V3\InternalChecker::class); - $this->internal_checkers = $arr; - - return $this; - } - - /** - * User-supplied key/value data to be used for organizing and - * identifying the `UptimeCheckConfig` objects. - * The field can contain up to 64 entries. Each key and value is limited to - * 63 Unicode characters or 128 bytes, whichever is smaller. Labels and - * values can contain only lowercase letters, numerals, underscores, and - * dashes. Keys must begin with a letter. - * - * Generated from protobuf field map user_labels = 20; - * @return \Google\Protobuf\Internal\MapField - */ - public function getUserLabels() - { - return $this->user_labels; - } - - /** - * User-supplied key/value data to be used for organizing and - * identifying the `UptimeCheckConfig` objects. - * The field can contain up to 64 entries. Each key and value is limited to - * 63 Unicode characters or 128 bytes, whichever is smaller. Labels and - * values can contain only lowercase letters, numerals, underscores, and - * dashes. Keys must begin with a letter. - * - * Generated from protobuf field map user_labels = 20; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setUserLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->user_labels = $arr; - - return $this; - } - - /** - * @return string - */ - public function getResource() - { - return $this->whichOneof("resource"); - } - - /** - * @return string - */ - public function getCheckRequestType() - { - return $this->whichOneof("check_request_type"); - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/CheckerType.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/CheckerType.php deleted file mode 100644 index e97a33453e22..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/CheckerType.php +++ /dev/null @@ -1,69 +0,0 @@ -google.monitoring.v3.UptimeCheckConfig.CheckerType - */ -class CheckerType -{ - /** - * The default checker type. Currently converted to `STATIC_IP_CHECKERS` - * on creation, the default conversion behavior may change in the future. - * - * Generated from protobuf enum CHECKER_TYPE_UNSPECIFIED = 0; - */ - const CHECKER_TYPE_UNSPECIFIED = 0; - /** - * `STATIC_IP_CHECKERS` are used for uptime checks that perform egress - * across the public internet. `STATIC_IP_CHECKERS` use the static IP - * addresses returned by `ListUptimeCheckIps`. - * - * Generated from protobuf enum STATIC_IP_CHECKERS = 1; - */ - const STATIC_IP_CHECKERS = 1; - /** - * `VPC_CHECKERS` are used for uptime checks that perform egress using - * Service Directory and private network access. When using `VPC_CHECKERS`, - * the monitored resource type must be `servicedirectory_service`. - * - * Generated from protobuf enum VPC_CHECKERS = 3; - */ - const VPC_CHECKERS = 3; - - private static $valueToName = [ - self::CHECKER_TYPE_UNSPECIFIED => 'CHECKER_TYPE_UNSPECIFIED', - self::STATIC_IP_CHECKERS => 'STATIC_IP_CHECKERS', - self::VPC_CHECKERS => 'VPC_CHECKERS', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CheckerType::class, \Google\Cloud\Monitoring\V3\UptimeCheckConfig_CheckerType::class); - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/ContentMatcher.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/ContentMatcher.php deleted file mode 100644 index 6c5646dbef86..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/ContentMatcher.php +++ /dev/null @@ -1,158 +0,0 @@ -google.monitoring.v3.UptimeCheckConfig.ContentMatcher - */ -class ContentMatcher extends \Google\Protobuf\Internal\Message -{ - /** - * String, regex or JSON content to match. Maximum 1024 bytes. An empty - * `content` string indicates no content matching is to be performed. - * - * Generated from protobuf field string content = 1; - */ - protected $content = ''; - /** - * The type of content matcher that will be applied to the server output, - * compared to the `content` string when the check is run. - * - * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.ContentMatcher.ContentMatcherOption matcher = 2; - */ - protected $matcher = 0; - protected $additional_matcher_info; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $content - * String, regex or JSON content to match. Maximum 1024 bytes. An empty - * `content` string indicates no content matching is to be performed. - * @type int $matcher - * The type of content matcher that will be applied to the server output, - * compared to the `content` string when the check is run. - * @type \Google\Cloud\Monitoring\V3\UptimeCheckConfig\ContentMatcher\JsonPathMatcher $json_path_matcher - * Matcher information for `MATCHES_JSON_PATH` and `NOT_MATCHES_JSON_PATH` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\Uptime::initOnce(); - parent::__construct($data); - } - - /** - * String, regex or JSON content to match. Maximum 1024 bytes. An empty - * `content` string indicates no content matching is to be performed. - * - * Generated from protobuf field string content = 1; - * @return string - */ - public function getContent() - { - return $this->content; - } - - /** - * String, regex or JSON content to match. Maximum 1024 bytes. An empty - * `content` string indicates no content matching is to be performed. - * - * Generated from protobuf field string content = 1; - * @param string $var - * @return $this - */ - public function setContent($var) - { - GPBUtil::checkString($var, True); - $this->content = $var; - - return $this; - } - - /** - * The type of content matcher that will be applied to the server output, - * compared to the `content` string when the check is run. - * - * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.ContentMatcher.ContentMatcherOption matcher = 2; - * @return int - */ - public function getMatcher() - { - return $this->matcher; - } - - /** - * The type of content matcher that will be applied to the server output, - * compared to the `content` string when the check is run. - * - * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.ContentMatcher.ContentMatcherOption matcher = 2; - * @param int $var - * @return $this - */ - public function setMatcher($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Monitoring\V3\UptimeCheckConfig\ContentMatcher\ContentMatcherOption::class); - $this->matcher = $var; - - return $this; - } - - /** - * Matcher information for `MATCHES_JSON_PATH` and `NOT_MATCHES_JSON_PATH` - * - * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.ContentMatcher.JsonPathMatcher json_path_matcher = 3; - * @return \Google\Cloud\Monitoring\V3\UptimeCheckConfig\ContentMatcher\JsonPathMatcher|null - */ - public function getJsonPathMatcher() - { - return $this->readOneof(3); - } - - public function hasJsonPathMatcher() - { - return $this->hasOneof(3); - } - - /** - * Matcher information for `MATCHES_JSON_PATH` and `NOT_MATCHES_JSON_PATH` - * - * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.ContentMatcher.JsonPathMatcher json_path_matcher = 3; - * @param \Google\Cloud\Monitoring\V3\UptimeCheckConfig\ContentMatcher\JsonPathMatcher $var - * @return $this - */ - public function setJsonPathMatcher($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\UptimeCheckConfig\ContentMatcher\JsonPathMatcher::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * @return string - */ - public function getAdditionalMatcherInfo() - { - return $this->whichOneof("additional_matcher_info"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ContentMatcher::class, \Google\Cloud\Monitoring\V3\UptimeCheckConfig_ContentMatcher::class); - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/ContentMatcher/ContentMatcherOption.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/ContentMatcher/ContentMatcherOption.php deleted file mode 100644 index 3dffeaa7586f..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/ContentMatcher/ContentMatcherOption.php +++ /dev/null @@ -1,107 +0,0 @@ -google.monitoring.v3.UptimeCheckConfig.ContentMatcher.ContentMatcherOption - */ -class ContentMatcherOption -{ - /** - * No content matcher type specified (maintained for backward - * compatibility, but deprecated for future use). - * Treated as `CONTAINS_STRING`. - * - * Generated from protobuf enum CONTENT_MATCHER_OPTION_UNSPECIFIED = 0; - */ - const CONTENT_MATCHER_OPTION_UNSPECIFIED = 0; - /** - * Selects substring matching. The match succeeds if the output contains - * the `content` string. This is the default value for checks without - * a `matcher` option, or where the value of `matcher` is - * `CONTENT_MATCHER_OPTION_UNSPECIFIED`. - * - * Generated from protobuf enum CONTAINS_STRING = 1; - */ - const CONTAINS_STRING = 1; - /** - * Selects negation of substring matching. The match succeeds if the - * output does _NOT_ contain the `content` string. - * - * Generated from protobuf enum NOT_CONTAINS_STRING = 2; - */ - const NOT_CONTAINS_STRING = 2; - /** - * Selects regular-expression matching. The match succeeds if the output - * matches the regular expression specified in the `content` string. - * Regex matching is only supported for HTTP/HTTPS checks. - * - * Generated from protobuf enum MATCHES_REGEX = 3; - */ - const MATCHES_REGEX = 3; - /** - * Selects negation of regular-expression matching. The match succeeds if - * the output does _NOT_ match the regular expression specified in the - * `content` string. Regex matching is only supported for HTTP/HTTPS - * checks. - * - * Generated from protobuf enum NOT_MATCHES_REGEX = 4; - */ - const NOT_MATCHES_REGEX = 4; - /** - * Selects JSONPath matching. See `JsonPathMatcher` for details on when - * the match succeeds. JSONPath matching is only supported for HTTP/HTTPS - * checks. - * - * Generated from protobuf enum MATCHES_JSON_PATH = 5; - */ - const MATCHES_JSON_PATH = 5; - /** - * Selects JSONPath matching. See `JsonPathMatcher` for details on when - * the match succeeds. Succeeds when output does _NOT_ match as specified. - * JSONPath is only supported for HTTP/HTTPS checks. - * - * Generated from protobuf enum NOT_MATCHES_JSON_PATH = 6; - */ - const NOT_MATCHES_JSON_PATH = 6; - - private static $valueToName = [ - self::CONTENT_MATCHER_OPTION_UNSPECIFIED => 'CONTENT_MATCHER_OPTION_UNSPECIFIED', - self::CONTAINS_STRING => 'CONTAINS_STRING', - self::NOT_CONTAINS_STRING => 'NOT_CONTAINS_STRING', - self::MATCHES_REGEX => 'MATCHES_REGEX', - self::NOT_MATCHES_REGEX => 'NOT_MATCHES_REGEX', - self::MATCHES_JSON_PATH => 'MATCHES_JSON_PATH', - self::NOT_MATCHES_JSON_PATH => 'NOT_MATCHES_JSON_PATH', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ContentMatcherOption::class, \Google\Cloud\Monitoring\V3\UptimeCheckConfig_ContentMatcher_ContentMatcherOption::class); - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/ContentMatcher/JsonPathMatcher.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/ContentMatcher/JsonPathMatcher.php deleted file mode 100644 index 04e6f363bfab..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/ContentMatcher/JsonPathMatcher.php +++ /dev/null @@ -1,114 +0,0 @@ -google.monitoring.v3.UptimeCheckConfig.ContentMatcher.JsonPathMatcher - */ -class JsonPathMatcher extends \Google\Protobuf\Internal\Message -{ - /** - * JSONPath within the response output pointing to the expected - * `ContentMatcher::content` to match against. - * - * Generated from protobuf field string json_path = 1; - */ - protected $json_path = ''; - /** - * The type of JSONPath match that will be applied to the JSON output - * (`ContentMatcher.content`) - * - * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.ContentMatcher.JsonPathMatcher.JsonPathMatcherOption json_matcher = 2; - */ - protected $json_matcher = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $json_path - * JSONPath within the response output pointing to the expected - * `ContentMatcher::content` to match against. - * @type int $json_matcher - * The type of JSONPath match that will be applied to the JSON output - * (`ContentMatcher.content`) - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\Uptime::initOnce(); - parent::__construct($data); - } - - /** - * JSONPath within the response output pointing to the expected - * `ContentMatcher::content` to match against. - * - * Generated from protobuf field string json_path = 1; - * @return string - */ - public function getJsonPath() - { - return $this->json_path; - } - - /** - * JSONPath within the response output pointing to the expected - * `ContentMatcher::content` to match against. - * - * Generated from protobuf field string json_path = 1; - * @param string $var - * @return $this - */ - public function setJsonPath($var) - { - GPBUtil::checkString($var, True); - $this->json_path = $var; - - return $this; - } - - /** - * The type of JSONPath match that will be applied to the JSON output - * (`ContentMatcher.content`) - * - * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.ContentMatcher.JsonPathMatcher.JsonPathMatcherOption json_matcher = 2; - * @return int - */ - public function getJsonMatcher() - { - return $this->json_matcher; - } - - /** - * The type of JSONPath match that will be applied to the JSON output - * (`ContentMatcher.content`) - * - * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.ContentMatcher.JsonPathMatcher.JsonPathMatcherOption json_matcher = 2; - * @param int $var - * @return $this - */ - public function setJsonMatcher($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Monitoring\V3\UptimeCheckConfig\ContentMatcher\JsonPathMatcher\JsonPathMatcherOption::class); - $this->json_matcher = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(JsonPathMatcher::class, \Google\Cloud\Monitoring\V3\UptimeCheckConfig_ContentMatcher_JsonPathMatcher::class); - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/ContentMatcher/JsonPathMatcher/JsonPathMatcherOption.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/ContentMatcher/JsonPathMatcher/JsonPathMatcherOption.php deleted file mode 100644 index 965725688ee1..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/ContentMatcher/JsonPathMatcher/JsonPathMatcherOption.php +++ /dev/null @@ -1,68 +0,0 @@ -google.monitoring.v3.UptimeCheckConfig.ContentMatcher.JsonPathMatcher.JsonPathMatcherOption - */ -class JsonPathMatcherOption -{ - /** - * No JSONPath matcher type specified (not valid). - * - * Generated from protobuf enum JSON_PATH_MATCHER_OPTION_UNSPECIFIED = 0; - */ - const JSON_PATH_MATCHER_OPTION_UNSPECIFIED = 0; - /** - * Selects 'exact string' matching. The match succeeds if the content at - * the `json_path` within the output is exactly the same as the - * `content` string. - * - * Generated from protobuf enum EXACT_MATCH = 1; - */ - const EXACT_MATCH = 1; - /** - * Selects regular-expression matching. The match succeeds if the - * content at the `json_path` within the output matches the regular - * expression specified in the `content` string. - * - * Generated from protobuf enum REGEX_MATCH = 2; - */ - const REGEX_MATCH = 2; - - private static $valueToName = [ - self::JSON_PATH_MATCHER_OPTION_UNSPECIFIED => 'JSON_PATH_MATCHER_OPTION_UNSPECIFIED', - self::EXACT_MATCH => 'EXACT_MATCH', - self::REGEX_MATCH => 'REGEX_MATCH', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(JsonPathMatcherOption::class, \Google\Cloud\Monitoring\V3\UptimeCheckConfig_ContentMatcher_JsonPathMatcher_JsonPathMatcherOption::class); - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/HttpCheck.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/HttpCheck.php deleted file mode 100644 index 0c3ff2d2ed8d..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/HttpCheck.php +++ /dev/null @@ -1,730 +0,0 @@ -google.monitoring.v3.UptimeCheckConfig.HttpCheck - */ -class HttpCheck extends \Google\Protobuf\Internal\Message -{ - /** - * The HTTP request method to use for the check. If set to - * `METHOD_UNSPECIFIED` then `request_method` defaults to `GET`. - * - * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.HttpCheck.RequestMethod request_method = 8; - */ - protected $request_method = 0; - /** - * If `true`, use HTTPS instead of HTTP to run the check. - * - * Generated from protobuf field bool use_ssl = 1; - */ - protected $use_ssl = false; - /** - * Optional (defaults to "/"). The path to the page against which to run - * the check. Will be combined with the `host` (specified within the - * `monitored_resource`) and `port` to construct the full URL. If the - * provided path does not begin with "/", a "/" will be prepended - * automatically. - * - * Generated from protobuf field string path = 2; - */ - protected $path = ''; - /** - * Optional (defaults to 80 when `use_ssl` is `false`, and 443 when - * `use_ssl` is `true`). The TCP port on the HTTP server against which to - * run the check. Will be combined with host (specified within the - * `monitored_resource`) and `path` to construct the full URL. - * - * Generated from protobuf field int32 port = 3; - */ - protected $port = 0; - /** - * The authentication information. Optional when creating an HTTP check; - * defaults to empty. - * Do not set both `auth_method` and `auth_info`. - * - * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication auth_info = 4; - */ - protected $auth_info = null; - /** - * Boolean specifying whether to encrypt the header information. - * Encryption should be specified for any headers related to authentication - * that you do not wish to be seen when retrieving the configuration. The - * server will be responsible for encrypting the headers. - * On Get/List calls, if `mask_headers` is set to `true` then the headers - * will be obscured with `******.` - * - * Generated from protobuf field bool mask_headers = 5; - */ - protected $mask_headers = false; - /** - * The list of headers to send as part of the Uptime check request. - * If two headers have the same key and different values, they should - * be entered as a single header, with the value being a comma-separated - * list of all the desired values as described at - * https://www.w3.org/Protocols/rfc2616/rfc2616.txt (page 31). - * Entering two separate headers with the same key in a Create call will - * cause the first to be overwritten by the second. - * The maximum number of headers allowed is 100. - * - * Generated from protobuf field map headers = 6; - */ - private $headers; - /** - * The content type header to use for the check. The following - * configurations result in errors: - * 1. Content type is specified in both the `headers` field and the - * `content_type` field. - * 2. Request method is `GET` and `content_type` is not `TYPE_UNSPECIFIED` - * 3. Request method is `POST` and `content_type` is `TYPE_UNSPECIFIED`. - * 4. Request method is `POST` and a "Content-Type" header is provided via - * `headers` field. The `content_type` field should be used instead. - * - * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.HttpCheck.ContentType content_type = 9; - */ - protected $content_type = 0; - /** - * A user provided content type header to use for the check. The invalid - * configurations outlined in the `content_type` field apply to - * `custom_content_type`, as well as the following: - * 1. `content_type` is `URL_ENCODED` and `custom_content_type` is set. - * 2. `content_type` is `USER_PROVIDED` and `custom_content_type` is not - * set. - * - * Generated from protobuf field string custom_content_type = 13; - */ - protected $custom_content_type = ''; - /** - * Boolean specifying whether to include SSL certificate validation as a - * part of the Uptime check. Only applies to checks where - * `monitored_resource` is set to `uptime_url`. If `use_ssl` is `false`, - * setting `validate_ssl` to `true` has no effect. - * - * Generated from protobuf field bool validate_ssl = 7; - */ - protected $validate_ssl = false; - /** - * The request body associated with the HTTP POST request. If `content_type` - * is `URL_ENCODED`, the body passed in must be URL-encoded. Users can - * provide a `Content-Length` header via the `headers` field or the API will - * do so. If the `request_method` is `GET` and `body` is not empty, the API - * will return an error. The maximum byte size is 1 megabyte. - * Note: If client libraries aren't used (which performs the conversion - * automatically) base64 encode your `body` data since the field is of - * `bytes` type. - * - * Generated from protobuf field bytes body = 10; - */ - protected $body = ''; - /** - * If present, the check will only pass if the HTTP response status code is - * in this set of status codes. If empty, the HTTP status code will only - * pass if the HTTP status code is 200-299. - * - * Generated from protobuf field repeated .google.monitoring.v3.UptimeCheckConfig.HttpCheck.ResponseStatusCode accepted_response_status_codes = 11; - */ - private $accepted_response_status_codes; - /** - * Contains information needed to add pings to an HTTP check. - * - * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.PingConfig ping_config = 12; - */ - protected $ping_config = null; - protected $auth_method; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $request_method - * The HTTP request method to use for the check. If set to - * `METHOD_UNSPECIFIED` then `request_method` defaults to `GET`. - * @type bool $use_ssl - * If `true`, use HTTPS instead of HTTP to run the check. - * @type string $path - * Optional (defaults to "/"). The path to the page against which to run - * the check. Will be combined with the `host` (specified within the - * `monitored_resource`) and `port` to construct the full URL. If the - * provided path does not begin with "/", a "/" will be prepended - * automatically. - * @type int $port - * Optional (defaults to 80 when `use_ssl` is `false`, and 443 when - * `use_ssl` is `true`). The TCP port on the HTTP server against which to - * run the check. Will be combined with host (specified within the - * `monitored_resource`) and `path` to construct the full URL. - * @type \Google\Cloud\Monitoring\V3\UptimeCheckConfig\HttpCheck\BasicAuthentication $auth_info - * The authentication information. Optional when creating an HTTP check; - * defaults to empty. - * Do not set both `auth_method` and `auth_info`. - * @type bool $mask_headers - * Boolean specifying whether to encrypt the header information. - * Encryption should be specified for any headers related to authentication - * that you do not wish to be seen when retrieving the configuration. The - * server will be responsible for encrypting the headers. - * On Get/List calls, if `mask_headers` is set to `true` then the headers - * will be obscured with `******.` - * @type array|\Google\Protobuf\Internal\MapField $headers - * The list of headers to send as part of the Uptime check request. - * If two headers have the same key and different values, they should - * be entered as a single header, with the value being a comma-separated - * list of all the desired values as described at - * https://www.w3.org/Protocols/rfc2616/rfc2616.txt (page 31). - * Entering two separate headers with the same key in a Create call will - * cause the first to be overwritten by the second. - * The maximum number of headers allowed is 100. - * @type int $content_type - * The content type header to use for the check. The following - * configurations result in errors: - * 1. Content type is specified in both the `headers` field and the - * `content_type` field. - * 2. Request method is `GET` and `content_type` is not `TYPE_UNSPECIFIED` - * 3. Request method is `POST` and `content_type` is `TYPE_UNSPECIFIED`. - * 4. Request method is `POST` and a "Content-Type" header is provided via - * `headers` field. The `content_type` field should be used instead. - * @type string $custom_content_type - * A user provided content type header to use for the check. The invalid - * configurations outlined in the `content_type` field apply to - * `custom_content_type`, as well as the following: - * 1. `content_type` is `URL_ENCODED` and `custom_content_type` is set. - * 2. `content_type` is `USER_PROVIDED` and `custom_content_type` is not - * set. - * @type bool $validate_ssl - * Boolean specifying whether to include SSL certificate validation as a - * part of the Uptime check. Only applies to checks where - * `monitored_resource` is set to `uptime_url`. If `use_ssl` is `false`, - * setting `validate_ssl` to `true` has no effect. - * @type string $body - * The request body associated with the HTTP POST request. If `content_type` - * is `URL_ENCODED`, the body passed in must be URL-encoded. Users can - * provide a `Content-Length` header via the `headers` field or the API will - * do so. If the `request_method` is `GET` and `body` is not empty, the API - * will return an error. The maximum byte size is 1 megabyte. - * Note: If client libraries aren't used (which performs the conversion - * automatically) base64 encode your `body` data since the field is of - * `bytes` type. - * @type array<\Google\Cloud\Monitoring\V3\UptimeCheckConfig\HttpCheck\ResponseStatusCode>|\Google\Protobuf\Internal\RepeatedField $accepted_response_status_codes - * If present, the check will only pass if the HTTP response status code is - * in this set of status codes. If empty, the HTTP status code will only - * pass if the HTTP status code is 200-299. - * @type \Google\Cloud\Monitoring\V3\UptimeCheckConfig\PingConfig $ping_config - * Contains information needed to add pings to an HTTP check. - * @type \Google\Cloud\Monitoring\V3\UptimeCheckConfig\HttpCheck\ServiceAgentAuthentication $service_agent_authentication - * If specified, Uptime will generate and attach an OIDC JWT token for the - * Monitoring service agent service account as an `Authorization` header - * in the HTTP request when probing. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\Uptime::initOnce(); - parent::__construct($data); - } - - /** - * The HTTP request method to use for the check. If set to - * `METHOD_UNSPECIFIED` then `request_method` defaults to `GET`. - * - * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.HttpCheck.RequestMethod request_method = 8; - * @return int - */ - public function getRequestMethod() - { - return $this->request_method; - } - - /** - * The HTTP request method to use for the check. If set to - * `METHOD_UNSPECIFIED` then `request_method` defaults to `GET`. - * - * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.HttpCheck.RequestMethod request_method = 8; - * @param int $var - * @return $this - */ - public function setRequestMethod($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Monitoring\V3\UptimeCheckConfig\HttpCheck\RequestMethod::class); - $this->request_method = $var; - - return $this; - } - - /** - * If `true`, use HTTPS instead of HTTP to run the check. - * - * Generated from protobuf field bool use_ssl = 1; - * @return bool - */ - public function getUseSsl() - { - return $this->use_ssl; - } - - /** - * If `true`, use HTTPS instead of HTTP to run the check. - * - * Generated from protobuf field bool use_ssl = 1; - * @param bool $var - * @return $this - */ - public function setUseSsl($var) - { - GPBUtil::checkBool($var); - $this->use_ssl = $var; - - return $this; - } - - /** - * Optional (defaults to "/"). The path to the page against which to run - * the check. Will be combined with the `host` (specified within the - * `monitored_resource`) and `port` to construct the full URL. If the - * provided path does not begin with "/", a "/" will be prepended - * automatically. - * - * Generated from protobuf field string path = 2; - * @return string - */ - public function getPath() - { - return $this->path; - } - - /** - * Optional (defaults to "/"). The path to the page against which to run - * the check. Will be combined with the `host` (specified within the - * `monitored_resource`) and `port` to construct the full URL. If the - * provided path does not begin with "/", a "/" will be prepended - * automatically. - * - * Generated from protobuf field string path = 2; - * @param string $var - * @return $this - */ - public function setPath($var) - { - GPBUtil::checkString($var, True); - $this->path = $var; - - return $this; - } - - /** - * Optional (defaults to 80 when `use_ssl` is `false`, and 443 when - * `use_ssl` is `true`). The TCP port on the HTTP server against which to - * run the check. Will be combined with host (specified within the - * `monitored_resource`) and `path` to construct the full URL. - * - * Generated from protobuf field int32 port = 3; - * @return int - */ - public function getPort() - { - return $this->port; - } - - /** - * Optional (defaults to 80 when `use_ssl` is `false`, and 443 when - * `use_ssl` is `true`). The TCP port on the HTTP server against which to - * run the check. Will be combined with host (specified within the - * `monitored_resource`) and `path` to construct the full URL. - * - * Generated from protobuf field int32 port = 3; - * @param int $var - * @return $this - */ - public function setPort($var) - { - GPBUtil::checkInt32($var); - $this->port = $var; - - return $this; - } - - /** - * The authentication information. Optional when creating an HTTP check; - * defaults to empty. - * Do not set both `auth_method` and `auth_info`. - * - * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication auth_info = 4; - * @return \Google\Cloud\Monitoring\V3\UptimeCheckConfig\HttpCheck\BasicAuthentication|null - */ - public function getAuthInfo() - { - return $this->auth_info; - } - - public function hasAuthInfo() - { - return isset($this->auth_info); - } - - public function clearAuthInfo() - { - unset($this->auth_info); - } - - /** - * The authentication information. Optional when creating an HTTP check; - * defaults to empty. - * Do not set both `auth_method` and `auth_info`. - * - * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication auth_info = 4; - * @param \Google\Cloud\Monitoring\V3\UptimeCheckConfig\HttpCheck\BasicAuthentication $var - * @return $this - */ - public function setAuthInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\UptimeCheckConfig\HttpCheck\BasicAuthentication::class); - $this->auth_info = $var; - - return $this; - } - - /** - * Boolean specifying whether to encrypt the header information. - * Encryption should be specified for any headers related to authentication - * that you do not wish to be seen when retrieving the configuration. The - * server will be responsible for encrypting the headers. - * On Get/List calls, if `mask_headers` is set to `true` then the headers - * will be obscured with `******.` - * - * Generated from protobuf field bool mask_headers = 5; - * @return bool - */ - public function getMaskHeaders() - { - return $this->mask_headers; - } - - /** - * Boolean specifying whether to encrypt the header information. - * Encryption should be specified for any headers related to authentication - * that you do not wish to be seen when retrieving the configuration. The - * server will be responsible for encrypting the headers. - * On Get/List calls, if `mask_headers` is set to `true` then the headers - * will be obscured with `******.` - * - * Generated from protobuf field bool mask_headers = 5; - * @param bool $var - * @return $this - */ - public function setMaskHeaders($var) - { - GPBUtil::checkBool($var); - $this->mask_headers = $var; - - return $this; - } - - /** - * The list of headers to send as part of the Uptime check request. - * If two headers have the same key and different values, they should - * be entered as a single header, with the value being a comma-separated - * list of all the desired values as described at - * https://www.w3.org/Protocols/rfc2616/rfc2616.txt (page 31). - * Entering two separate headers with the same key in a Create call will - * cause the first to be overwritten by the second. - * The maximum number of headers allowed is 100. - * - * Generated from protobuf field map headers = 6; - * @return \Google\Protobuf\Internal\MapField - */ - public function getHeaders() - { - return $this->headers; - } - - /** - * The list of headers to send as part of the Uptime check request. - * If two headers have the same key and different values, they should - * be entered as a single header, with the value being a comma-separated - * list of all the desired values as described at - * https://www.w3.org/Protocols/rfc2616/rfc2616.txt (page 31). - * Entering two separate headers with the same key in a Create call will - * cause the first to be overwritten by the second. - * The maximum number of headers allowed is 100. - * - * Generated from protobuf field map headers = 6; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setHeaders($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->headers = $arr; - - return $this; - } - - /** - * The content type header to use for the check. The following - * configurations result in errors: - * 1. Content type is specified in both the `headers` field and the - * `content_type` field. - * 2. Request method is `GET` and `content_type` is not `TYPE_UNSPECIFIED` - * 3. Request method is `POST` and `content_type` is `TYPE_UNSPECIFIED`. - * 4. Request method is `POST` and a "Content-Type" header is provided via - * `headers` field. The `content_type` field should be used instead. - * - * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.HttpCheck.ContentType content_type = 9; - * @return int - */ - public function getContentType() - { - return $this->content_type; - } - - /** - * The content type header to use for the check. The following - * configurations result in errors: - * 1. Content type is specified in both the `headers` field and the - * `content_type` field. - * 2. Request method is `GET` and `content_type` is not `TYPE_UNSPECIFIED` - * 3. Request method is `POST` and `content_type` is `TYPE_UNSPECIFIED`. - * 4. Request method is `POST` and a "Content-Type" header is provided via - * `headers` field. The `content_type` field should be used instead. - * - * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.HttpCheck.ContentType content_type = 9; - * @param int $var - * @return $this - */ - public function setContentType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Monitoring\V3\UptimeCheckConfig\HttpCheck\ContentType::class); - $this->content_type = $var; - - return $this; - } - - /** - * A user provided content type header to use for the check. The invalid - * configurations outlined in the `content_type` field apply to - * `custom_content_type`, as well as the following: - * 1. `content_type` is `URL_ENCODED` and `custom_content_type` is set. - * 2. `content_type` is `USER_PROVIDED` and `custom_content_type` is not - * set. - * - * Generated from protobuf field string custom_content_type = 13; - * @return string - */ - public function getCustomContentType() - { - return $this->custom_content_type; - } - - /** - * A user provided content type header to use for the check. The invalid - * configurations outlined in the `content_type` field apply to - * `custom_content_type`, as well as the following: - * 1. `content_type` is `URL_ENCODED` and `custom_content_type` is set. - * 2. `content_type` is `USER_PROVIDED` and `custom_content_type` is not - * set. - * - * Generated from protobuf field string custom_content_type = 13; - * @param string $var - * @return $this - */ - public function setCustomContentType($var) - { - GPBUtil::checkString($var, True); - $this->custom_content_type = $var; - - return $this; - } - - /** - * Boolean specifying whether to include SSL certificate validation as a - * part of the Uptime check. Only applies to checks where - * `monitored_resource` is set to `uptime_url`. If `use_ssl` is `false`, - * setting `validate_ssl` to `true` has no effect. - * - * Generated from protobuf field bool validate_ssl = 7; - * @return bool - */ - public function getValidateSsl() - { - return $this->validate_ssl; - } - - /** - * Boolean specifying whether to include SSL certificate validation as a - * part of the Uptime check. Only applies to checks where - * `monitored_resource` is set to `uptime_url`. If `use_ssl` is `false`, - * setting `validate_ssl` to `true` has no effect. - * - * Generated from protobuf field bool validate_ssl = 7; - * @param bool $var - * @return $this - */ - public function setValidateSsl($var) - { - GPBUtil::checkBool($var); - $this->validate_ssl = $var; - - return $this; - } - - /** - * The request body associated with the HTTP POST request. If `content_type` - * is `URL_ENCODED`, the body passed in must be URL-encoded. Users can - * provide a `Content-Length` header via the `headers` field or the API will - * do so. If the `request_method` is `GET` and `body` is not empty, the API - * will return an error. The maximum byte size is 1 megabyte. - * Note: If client libraries aren't used (which performs the conversion - * automatically) base64 encode your `body` data since the field is of - * `bytes` type. - * - * Generated from protobuf field bytes body = 10; - * @return string - */ - public function getBody() - { - return $this->body; - } - - /** - * The request body associated with the HTTP POST request. If `content_type` - * is `URL_ENCODED`, the body passed in must be URL-encoded. Users can - * provide a `Content-Length` header via the `headers` field or the API will - * do so. If the `request_method` is `GET` and `body` is not empty, the API - * will return an error. The maximum byte size is 1 megabyte. - * Note: If client libraries aren't used (which performs the conversion - * automatically) base64 encode your `body` data since the field is of - * `bytes` type. - * - * Generated from protobuf field bytes body = 10; - * @param string $var - * @return $this - */ - public function setBody($var) - { - GPBUtil::checkString($var, False); - $this->body = $var; - - return $this; - } - - /** - * If present, the check will only pass if the HTTP response status code is - * in this set of status codes. If empty, the HTTP status code will only - * pass if the HTTP status code is 200-299. - * - * Generated from protobuf field repeated .google.monitoring.v3.UptimeCheckConfig.HttpCheck.ResponseStatusCode accepted_response_status_codes = 11; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAcceptedResponseStatusCodes() - { - return $this->accepted_response_status_codes; - } - - /** - * If present, the check will only pass if the HTTP response status code is - * in this set of status codes. If empty, the HTTP status code will only - * pass if the HTTP status code is 200-299. - * - * Generated from protobuf field repeated .google.monitoring.v3.UptimeCheckConfig.HttpCheck.ResponseStatusCode accepted_response_status_codes = 11; - * @param array<\Google\Cloud\Monitoring\V3\UptimeCheckConfig\HttpCheck\ResponseStatusCode>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAcceptedResponseStatusCodes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Monitoring\V3\UptimeCheckConfig\HttpCheck\ResponseStatusCode::class); - $this->accepted_response_status_codes = $arr; - - return $this; - } - - /** - * Contains information needed to add pings to an HTTP check. - * - * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.PingConfig ping_config = 12; - * @return \Google\Cloud\Monitoring\V3\UptimeCheckConfig\PingConfig|null - */ - public function getPingConfig() - { - return $this->ping_config; - } - - public function hasPingConfig() - { - return isset($this->ping_config); - } - - public function clearPingConfig() - { - unset($this->ping_config); - } - - /** - * Contains information needed to add pings to an HTTP check. - * - * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.PingConfig ping_config = 12; - * @param \Google\Cloud\Monitoring\V3\UptimeCheckConfig\PingConfig $var - * @return $this - */ - public function setPingConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\UptimeCheckConfig\PingConfig::class); - $this->ping_config = $var; - - return $this; - } - - /** - * If specified, Uptime will generate and attach an OIDC JWT token for the - * Monitoring service agent service account as an `Authorization` header - * in the HTTP request when probing. - * - * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.HttpCheck.ServiceAgentAuthentication service_agent_authentication = 14; - * @return \Google\Cloud\Monitoring\V3\UptimeCheckConfig\HttpCheck\ServiceAgentAuthentication|null - */ - public function getServiceAgentAuthentication() - { - return $this->readOneof(14); - } - - public function hasServiceAgentAuthentication() - { - return $this->hasOneof(14); - } - - /** - * If specified, Uptime will generate and attach an OIDC JWT token for the - * Monitoring service agent service account as an `Authorization` header - * in the HTTP request when probing. - * - * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.HttpCheck.ServiceAgentAuthentication service_agent_authentication = 14; - * @param \Google\Cloud\Monitoring\V3\UptimeCheckConfig\HttpCheck\ServiceAgentAuthentication $var - * @return $this - */ - public function setServiceAgentAuthentication($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\UptimeCheckConfig\HttpCheck\ServiceAgentAuthentication::class); - $this->writeOneof(14, $var); - - return $this; - } - - /** - * @return string - */ - public function getAuthMethod() - { - return $this->whichOneof("auth_method"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(HttpCheck::class, \Google\Cloud\Monitoring\V3\UptimeCheckConfig_HttpCheck::class); - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/HttpCheck/BasicAuthentication.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/HttpCheck/BasicAuthentication.php deleted file mode 100644 index d193ecd51c76..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/HttpCheck/BasicAuthentication.php +++ /dev/null @@ -1,107 +0,0 @@ -google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication - */ -class BasicAuthentication extends \Google\Protobuf\Internal\Message -{ - /** - * The username to use when authenticating with the HTTP server. - * - * Generated from protobuf field string username = 1; - */ - protected $username = ''; - /** - * The password to use when authenticating with the HTTP server. - * - * Generated from protobuf field string password = 2; - */ - protected $password = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $username - * The username to use when authenticating with the HTTP server. - * @type string $password - * The password to use when authenticating with the HTTP server. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\Uptime::initOnce(); - parent::__construct($data); - } - - /** - * The username to use when authenticating with the HTTP server. - * - * Generated from protobuf field string username = 1; - * @return string - */ - public function getUsername() - { - return $this->username; - } - - /** - * The username to use when authenticating with the HTTP server. - * - * Generated from protobuf field string username = 1; - * @param string $var - * @return $this - */ - public function setUsername($var) - { - GPBUtil::checkString($var, True); - $this->username = $var; - - return $this; - } - - /** - * The password to use when authenticating with the HTTP server. - * - * Generated from protobuf field string password = 2; - * @return string - */ - public function getPassword() - { - return $this->password; - } - - /** - * The password to use when authenticating with the HTTP server. - * - * Generated from protobuf field string password = 2; - * @param string $var - * @return $this - */ - public function setPassword($var) - { - GPBUtil::checkString($var, True); - $this->password = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(BasicAuthentication::class, \Google\Cloud\Monitoring\V3\UptimeCheckConfig_HttpCheck_BasicAuthentication::class); - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/HttpCheck/ContentType.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/HttpCheck/ContentType.php deleted file mode 100644 index 7eeb5f3ad046..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/HttpCheck/ContentType.php +++ /dev/null @@ -1,67 +0,0 @@ -google.monitoring.v3.UptimeCheckConfig.HttpCheck.ContentType - */ -class ContentType -{ - /** - * No content type specified. - * - * Generated from protobuf enum TYPE_UNSPECIFIED = 0; - */ - const TYPE_UNSPECIFIED = 0; - /** - * `body` is in URL-encoded form. Equivalent to setting the `Content-Type` - * to `application/x-www-form-urlencoded` in the HTTP request. - * - * Generated from protobuf enum URL_ENCODED = 1; - */ - const URL_ENCODED = 1; - /** - * `body` is in `custom_content_type` form. Equivalent to setting the - * `Content-Type` to the contents of `custom_content_type` in the HTTP - * request. - * - * Generated from protobuf enum USER_PROVIDED = 2; - */ - const USER_PROVIDED = 2; - - private static $valueToName = [ - self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', - self::URL_ENCODED => 'URL_ENCODED', - self::USER_PROVIDED => 'USER_PROVIDED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ContentType::class, \Google\Cloud\Monitoring\V3\UptimeCheckConfig_HttpCheck_ContentType::class); - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/HttpCheck/RequestMethod.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/HttpCheck/RequestMethod.php deleted file mode 100644 index 981e2cbc3729..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/HttpCheck/RequestMethod.php +++ /dev/null @@ -1,64 +0,0 @@ -google.monitoring.v3.UptimeCheckConfig.HttpCheck.RequestMethod - */ -class RequestMethod -{ - /** - * No request method specified. - * - * Generated from protobuf enum METHOD_UNSPECIFIED = 0; - */ - const METHOD_UNSPECIFIED = 0; - /** - * GET request. - * - * Generated from protobuf enum GET = 1; - */ - const GET = 1; - /** - * POST request. - * - * Generated from protobuf enum POST = 2; - */ - const POST = 2; - - private static $valueToName = [ - self::METHOD_UNSPECIFIED => 'METHOD_UNSPECIFIED', - self::GET => 'GET', - self::POST => 'POST', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(RequestMethod::class, \Google\Cloud\Monitoring\V3\UptimeCheckConfig_HttpCheck_RequestMethod::class); - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/HttpCheck/ResponseStatusCode.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/HttpCheck/ResponseStatusCode.php deleted file mode 100644 index 61fe31c3dabc..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/HttpCheck/ResponseStatusCode.php +++ /dev/null @@ -1,112 +0,0 @@ -google.monitoring.v3.UptimeCheckConfig.HttpCheck.ResponseStatusCode - */ -class ResponseStatusCode extends \Google\Protobuf\Internal\Message -{ - protected $status_code; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $status_value - * A status code to accept. - * @type int $status_class - * A class of status codes to accept. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\Uptime::initOnce(); - parent::__construct($data); - } - - /** - * A status code to accept. - * - * Generated from protobuf field int32 status_value = 1; - * @return int - */ - public function getStatusValue() - { - return $this->readOneof(1); - } - - public function hasStatusValue() - { - return $this->hasOneof(1); - } - - /** - * A status code to accept. - * - * Generated from protobuf field int32 status_value = 1; - * @param int $var - * @return $this - */ - public function setStatusValue($var) - { - GPBUtil::checkInt32($var); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * A class of status codes to accept. - * - * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.HttpCheck.ResponseStatusCode.StatusClass status_class = 2; - * @return int - */ - public function getStatusClass() - { - return $this->readOneof(2); - } - - public function hasStatusClass() - { - return $this->hasOneof(2); - } - - /** - * A class of status codes to accept. - * - * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.HttpCheck.ResponseStatusCode.StatusClass status_class = 2; - * @param int $var - * @return $this - */ - public function setStatusClass($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Monitoring\V3\UptimeCheckConfig\HttpCheck\ResponseStatusCode\StatusClass::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * @return string - */ - public function getStatusCode() - { - return $this->whichOneof("status_code"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ResponseStatusCode::class, \Google\Cloud\Monitoring\V3\UptimeCheckConfig_HttpCheck_ResponseStatusCode::class); - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/HttpCheck/ResponseStatusCode/StatusClass.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/HttpCheck/ResponseStatusCode/StatusClass.php deleted file mode 100644 index ec9ccc03c042..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/HttpCheck/ResponseStatusCode/StatusClass.php +++ /dev/null @@ -1,92 +0,0 @@ -google.monitoring.v3.UptimeCheckConfig.HttpCheck.ResponseStatusCode.StatusClass - */ -class StatusClass -{ - /** - * Default value that matches no status codes. - * - * Generated from protobuf enum STATUS_CLASS_UNSPECIFIED = 0; - */ - const STATUS_CLASS_UNSPECIFIED = 0; - /** - * The class of status codes between 100 and 199. - * - * Generated from protobuf enum STATUS_CLASS_1XX = 100; - */ - const STATUS_CLASS_1XX = 100; - /** - * The class of status codes between 200 and 299. - * - * Generated from protobuf enum STATUS_CLASS_2XX = 200; - */ - const STATUS_CLASS_2XX = 200; - /** - * The class of status codes between 300 and 399. - * - * Generated from protobuf enum STATUS_CLASS_3XX = 300; - */ - const STATUS_CLASS_3XX = 300; - /** - * The class of status codes between 400 and 499. - * - * Generated from protobuf enum STATUS_CLASS_4XX = 400; - */ - const STATUS_CLASS_4XX = 400; - /** - * The class of status codes between 500 and 599. - * - * Generated from protobuf enum STATUS_CLASS_5XX = 500; - */ - const STATUS_CLASS_5XX = 500; - /** - * The class of all status codes. - * - * Generated from protobuf enum STATUS_CLASS_ANY = 1000; - */ - const STATUS_CLASS_ANY = 1000; - - private static $valueToName = [ - self::STATUS_CLASS_UNSPECIFIED => 'STATUS_CLASS_UNSPECIFIED', - self::STATUS_CLASS_1XX => 'STATUS_CLASS_1XX', - self::STATUS_CLASS_2XX => 'STATUS_CLASS_2XX', - self::STATUS_CLASS_3XX => 'STATUS_CLASS_3XX', - self::STATUS_CLASS_4XX => 'STATUS_CLASS_4XX', - self::STATUS_CLASS_5XX => 'STATUS_CLASS_5XX', - self::STATUS_CLASS_ANY => 'STATUS_CLASS_ANY', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(StatusClass::class, \Google\Cloud\Monitoring\V3\UptimeCheckConfig_HttpCheck_ResponseStatusCode_StatusClass::class); - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/HttpCheck/ServiceAgentAuthentication.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/HttpCheck/ServiceAgentAuthentication.php deleted file mode 100644 index 2a119dd51c0a..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/HttpCheck/ServiceAgentAuthentication.php +++ /dev/null @@ -1,74 +0,0 @@ -google.monitoring.v3.UptimeCheckConfig.HttpCheck.ServiceAgentAuthentication - */ -class ServiceAgentAuthentication extends \Google\Protobuf\Internal\Message -{ - /** - * Type of authentication. - * - * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.HttpCheck.ServiceAgentAuthentication.ServiceAgentAuthenticationType type = 1; - */ - protected $type = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $type - * Type of authentication. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\Uptime::initOnce(); - parent::__construct($data); - } - - /** - * Type of authentication. - * - * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.HttpCheck.ServiceAgentAuthentication.ServiceAgentAuthenticationType type = 1; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Type of authentication. - * - * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.HttpCheck.ServiceAgentAuthentication.ServiceAgentAuthenticationType type = 1; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Monitoring\V3\UptimeCheckConfig\HttpCheck\ServiceAgentAuthentication\ServiceAgentAuthenticationType::class); - $this->type = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ServiceAgentAuthentication::class, \Google\Cloud\Monitoring\V3\UptimeCheckConfig_HttpCheck_ServiceAgentAuthentication::class); - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/HttpCheck/ServiceAgentAuthentication/ServiceAgentAuthenticationType.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/HttpCheck/ServiceAgentAuthentication/ServiceAgentAuthenticationType.php deleted file mode 100644 index 8b14271b462a..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/HttpCheck/ServiceAgentAuthentication/ServiceAgentAuthenticationType.php +++ /dev/null @@ -1,57 +0,0 @@ -google.monitoring.v3.UptimeCheckConfig.HttpCheck.ServiceAgentAuthentication.ServiceAgentAuthenticationType - */ -class ServiceAgentAuthenticationType -{ - /** - * Default value, will result in OIDC Authentication. - * - * Generated from protobuf enum SERVICE_AGENT_AUTHENTICATION_TYPE_UNSPECIFIED = 0; - */ - const SERVICE_AGENT_AUTHENTICATION_TYPE_UNSPECIFIED = 0; - /** - * OIDC Authentication - * - * Generated from protobuf enum OIDC_TOKEN = 1; - */ - const OIDC_TOKEN = 1; - - private static $valueToName = [ - self::SERVICE_AGENT_AUTHENTICATION_TYPE_UNSPECIFIED => 'SERVICE_AGENT_AUTHENTICATION_TYPE_UNSPECIFIED', - self::OIDC_TOKEN => 'OIDC_TOKEN', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ServiceAgentAuthenticationType::class, \Google\Cloud\Monitoring\V3\UptimeCheckConfig_HttpCheck_ServiceAgentAuthentication_ServiceAgentAuthenticationType::class); - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/PingConfig.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/PingConfig.php deleted file mode 100644 index ae85d7f10477..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/PingConfig.php +++ /dev/null @@ -1,72 +0,0 @@ -google.monitoring.v3.UptimeCheckConfig.PingConfig - */ -class PingConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Number of ICMP pings. A maximum of 3 ICMP pings is currently supported. - * - * Generated from protobuf field int32 pings_count = 1; - */ - protected $pings_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $pings_count - * Number of ICMP pings. A maximum of 3 ICMP pings is currently supported. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\Uptime::initOnce(); - parent::__construct($data); - } - - /** - * Number of ICMP pings. A maximum of 3 ICMP pings is currently supported. - * - * Generated from protobuf field int32 pings_count = 1; - * @return int - */ - public function getPingsCount() - { - return $this->pings_count; - } - - /** - * Number of ICMP pings. A maximum of 3 ICMP pings is currently supported. - * - * Generated from protobuf field int32 pings_count = 1; - * @param int $var - * @return $this - */ - public function setPingsCount($var) - { - GPBUtil::checkInt32($var); - $this->pings_count = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(PingConfig::class, \Google\Cloud\Monitoring\V3\UptimeCheckConfig_PingConfig::class); - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/ResourceGroup.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/ResourceGroup.php deleted file mode 100644 index 25ef6cb80c61..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/ResourceGroup.php +++ /dev/null @@ -1,113 +0,0 @@ -google.monitoring.v3.UptimeCheckConfig.ResourceGroup - */ -class ResourceGroup extends \Google\Protobuf\Internal\Message -{ - /** - * The group of resources being monitored. Should be only the `[GROUP_ID]`, - * and not the full-path - * `projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID]`. - * - * Generated from protobuf field string group_id = 1; - */ - protected $group_id = ''; - /** - * The resource type of the group members. - * - * Generated from protobuf field .google.monitoring.v3.GroupResourceType resource_type = 2; - */ - protected $resource_type = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $group_id - * The group of resources being monitored. Should be only the `[GROUP_ID]`, - * and not the full-path - * `projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID]`. - * @type int $resource_type - * The resource type of the group members. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\Uptime::initOnce(); - parent::__construct($data); - } - - /** - * The group of resources being monitored. Should be only the `[GROUP_ID]`, - * and not the full-path - * `projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID]`. - * - * Generated from protobuf field string group_id = 1; - * @return string - */ - public function getGroupId() - { - return $this->group_id; - } - - /** - * The group of resources being monitored. Should be only the `[GROUP_ID]`, - * and not the full-path - * `projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID]`. - * - * Generated from protobuf field string group_id = 1; - * @param string $var - * @return $this - */ - public function setGroupId($var) - { - GPBUtil::checkString($var, True); - $this->group_id = $var; - - return $this; - } - - /** - * The resource type of the group members. - * - * Generated from protobuf field .google.monitoring.v3.GroupResourceType resource_type = 2; - * @return int - */ - public function getResourceType() - { - return $this->resource_type; - } - - /** - * The resource type of the group members. - * - * Generated from protobuf field .google.monitoring.v3.GroupResourceType resource_type = 2; - * @param int $var - * @return $this - */ - public function setResourceType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Monitoring\V3\GroupResourceType::class); - $this->resource_type = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ResourceGroup::class, \Google\Cloud\Monitoring\V3\UptimeCheckConfig_ResourceGroup::class); - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/TcpCheck.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/TcpCheck.php deleted file mode 100644 index 09c0668c3b3b..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckConfig/TcpCheck.php +++ /dev/null @@ -1,122 +0,0 @@ -google.monitoring.v3.UptimeCheckConfig.TcpCheck - */ -class TcpCheck extends \Google\Protobuf\Internal\Message -{ - /** - * The TCP port on the server against which to run the check. Will be - * combined with host (specified within the `monitored_resource`) to - * construct the full URL. Required. - * - * Generated from protobuf field int32 port = 1; - */ - protected $port = 0; - /** - * Contains information needed to add pings to a TCP check. - * - * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.PingConfig ping_config = 2; - */ - protected $ping_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $port - * The TCP port on the server against which to run the check. Will be - * combined with host (specified within the `monitored_resource`) to - * construct the full URL. Required. - * @type \Google\Cloud\Monitoring\V3\UptimeCheckConfig\PingConfig $ping_config - * Contains information needed to add pings to a TCP check. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\Uptime::initOnce(); - parent::__construct($data); - } - - /** - * The TCP port on the server against which to run the check. Will be - * combined with host (specified within the `monitored_resource`) to - * construct the full URL. Required. - * - * Generated from protobuf field int32 port = 1; - * @return int - */ - public function getPort() - { - return $this->port; - } - - /** - * The TCP port on the server against which to run the check. Will be - * combined with host (specified within the `monitored_resource`) to - * construct the full URL. Required. - * - * Generated from protobuf field int32 port = 1; - * @param int $var - * @return $this - */ - public function setPort($var) - { - GPBUtil::checkInt32($var); - $this->port = $var; - - return $this; - } - - /** - * Contains information needed to add pings to a TCP check. - * - * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.PingConfig ping_config = 2; - * @return \Google\Cloud\Monitoring\V3\UptimeCheckConfig\PingConfig|null - */ - public function getPingConfig() - { - return $this->ping_config; - } - - public function hasPingConfig() - { - return isset($this->ping_config); - } - - public function clearPingConfig() - { - unset($this->ping_config); - } - - /** - * Contains information needed to add pings to a TCP check. - * - * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.PingConfig ping_config = 2; - * @param \Google\Cloud\Monitoring\V3\UptimeCheckConfig\PingConfig $var - * @return $this - */ - public function setPingConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\UptimeCheckConfig\PingConfig::class); - $this->ping_config = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(TcpCheck::class, \Google\Cloud\Monitoring\V3\UptimeCheckConfig_TcpCheck::class); - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckIp.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckIp.php deleted file mode 100644 index 8eb3b2a696b7..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckIp.php +++ /dev/null @@ -1,160 +0,0 @@ -google.monitoring.v3.UptimeCheckIp - */ -class UptimeCheckIp extends \Google\Protobuf\Internal\Message -{ - /** - * A broad region category in which the IP address is located. - * - * Generated from protobuf field .google.monitoring.v3.UptimeCheckRegion region = 1; - */ - protected $region = 0; - /** - * A more specific location within the region that typically encodes - * a particular city/town/metro (and its containing state/province or country) - * within the broader umbrella region category. - * - * Generated from protobuf field string location = 2; - */ - protected $location = ''; - /** - * The IP address from which the Uptime check originates. This is a fully - * specified IP address (not an IP address range). Most IP addresses, as of - * this publication, are in IPv4 format; however, one should not rely on the - * IP addresses being in IPv4 format indefinitely, and should support - * interpreting this field in either IPv4 or IPv6 format. - * - * Generated from protobuf field string ip_address = 3; - */ - protected $ip_address = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $region - * A broad region category in which the IP address is located. - * @type string $location - * A more specific location within the region that typically encodes - * a particular city/town/metro (and its containing state/province or country) - * within the broader umbrella region category. - * @type string $ip_address - * The IP address from which the Uptime check originates. This is a fully - * specified IP address (not an IP address range). Most IP addresses, as of - * this publication, are in IPv4 format; however, one should not rely on the - * IP addresses being in IPv4 format indefinitely, and should support - * interpreting this field in either IPv4 or IPv6 format. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\Uptime::initOnce(); - parent::__construct($data); - } - - /** - * A broad region category in which the IP address is located. - * - * Generated from protobuf field .google.monitoring.v3.UptimeCheckRegion region = 1; - * @return int - */ - public function getRegion() - { - return $this->region; - } - - /** - * A broad region category in which the IP address is located. - * - * Generated from protobuf field .google.monitoring.v3.UptimeCheckRegion region = 1; - * @param int $var - * @return $this - */ - public function setRegion($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Monitoring\V3\UptimeCheckRegion::class); - $this->region = $var; - - return $this; - } - - /** - * A more specific location within the region that typically encodes - * a particular city/town/metro (and its containing state/province or country) - * within the broader umbrella region category. - * - * Generated from protobuf field string location = 2; - * @return string - */ - public function getLocation() - { - return $this->location; - } - - /** - * A more specific location within the region that typically encodes - * a particular city/town/metro (and its containing state/province or country) - * within the broader umbrella region category. - * - * Generated from protobuf field string location = 2; - * @param string $var - * @return $this - */ - public function setLocation($var) - { - GPBUtil::checkString($var, True); - $this->location = $var; - - return $this; - } - - /** - * The IP address from which the Uptime check originates. This is a fully - * specified IP address (not an IP address range). Most IP addresses, as of - * this publication, are in IPv4 format; however, one should not rely on the - * IP addresses being in IPv4 format indefinitely, and should support - * interpreting this field in either IPv4 or IPv6 format. - * - * Generated from protobuf field string ip_address = 3; - * @return string - */ - public function getIpAddress() - { - return $this->ip_address; - } - - /** - * The IP address from which the Uptime check originates. This is a fully - * specified IP address (not an IP address range). Most IP addresses, as of - * this publication, are in IPv4 format; however, one should not rely on the - * IP addresses being in IPv4 format indefinitely, and should support - * interpreting this field in either IPv4 or IPv6 format. - * - * Generated from protobuf field string ip_address = 3; - * @param string $var - * @return $this - */ - public function setIpAddress($var) - { - GPBUtil::checkString($var, True); - $this->ip_address = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckRegion.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckRegion.php deleted file mode 100644 index 8524b68cf0f7..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/UptimeCheckRegion.php +++ /dev/null @@ -1,102 +0,0 @@ -google.monitoring.v3.UptimeCheckRegion - */ -class UptimeCheckRegion -{ - /** - * Default value if no region is specified. Will result in Uptime checks - * running from all regions. - * - * Generated from protobuf enum REGION_UNSPECIFIED = 0; - */ - const REGION_UNSPECIFIED = 0; - /** - * Allows checks to run from locations within the United States of America. - * - * Generated from protobuf enum USA = 1; - */ - const USA = 1; - /** - * Allows checks to run from locations within the continent of Europe. - * - * Generated from protobuf enum EUROPE = 2; - */ - const EUROPE = 2; - /** - * Allows checks to run from locations within the continent of South - * America. - * - * Generated from protobuf enum SOUTH_AMERICA = 3; - */ - const SOUTH_AMERICA = 3; - /** - * Allows checks to run from locations within the Asia Pacific area (ex: - * Singapore). - * - * Generated from protobuf enum ASIA_PACIFIC = 4; - */ - const ASIA_PACIFIC = 4; - /** - * Allows checks to run from locations within the western United States of - * America - * - * Generated from protobuf enum USA_OREGON = 5; - */ - const USA_OREGON = 5; - /** - * Allows checks to run from locations within the central United States of - * America - * - * Generated from protobuf enum USA_IOWA = 6; - */ - const USA_IOWA = 6; - /** - * Allows checks to run from locations within the eastern United States of - * America - * - * Generated from protobuf enum USA_VIRGINIA = 7; - */ - const USA_VIRGINIA = 7; - - private static $valueToName = [ - self::REGION_UNSPECIFIED => 'REGION_UNSPECIFIED', - self::USA => 'USA', - self::EUROPE => 'EUROPE', - self::SOUTH_AMERICA => 'SOUTH_AMERICA', - self::ASIA_PACIFIC => 'ASIA_PACIFIC', - self::USA_OREGON => 'USA_OREGON', - self::USA_IOWA => 'USA_IOWA', - self::USA_VIRGINIA => 'USA_VIRGINIA', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/VerifyNotificationChannelRequest.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/VerifyNotificationChannelRequest.php deleted file mode 100644 index 95410209d065..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/VerifyNotificationChannelRequest.php +++ /dev/null @@ -1,147 +0,0 @@ -google.monitoring.v3.VerifyNotificationChannelRequest - */ -class VerifyNotificationChannelRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The notification channel to verify. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. The verification code that was delivered to the channel as - * a result of invoking the `SendNotificationChannelVerificationCode` API - * method or that was retrieved from a verified channel via - * `GetNotificationChannelVerificationCode`. For example, one might have - * "G-123456" or "TKNZGhhd2EyN3I1MnRnMjRv" (in general, one is only - * guaranteed that the code is valid UTF-8; one should not - * make any assumptions regarding the structure or format of the code). - * - * Generated from protobuf field string code = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $code = ''; - - /** - * @param string $name Required. The notification channel to verify. Please see - * {@see NotificationChannelServiceClient::notificationChannelName()} for help formatting this field. - * @param string $code Required. The verification code that was delivered to the channel as - * a result of invoking the `SendNotificationChannelVerificationCode` API - * method or that was retrieved from a verified channel via - * `GetNotificationChannelVerificationCode`. For example, one might have - * "G-123456" or "TKNZGhhd2EyN3I1MnRnMjRv" (in general, one is only - * guaranteed that the code is valid UTF-8; one should not - * make any assumptions regarding the structure or format of the code). - * - * @return \Google\Cloud\Monitoring\V3\VerifyNotificationChannelRequest - * - * @experimental - */ - public static function build(string $name, string $code): self - { - return (new self()) - ->setName($name) - ->setCode($code); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The notification channel to verify. - * @type string $code - * Required. The verification code that was delivered to the channel as - * a result of invoking the `SendNotificationChannelVerificationCode` API - * method or that was retrieved from a verified channel via - * `GetNotificationChannelVerificationCode`. For example, one might have - * "G-123456" or "TKNZGhhd2EyN3I1MnRnMjRv" (in general, one is only - * guaranteed that the code is valid UTF-8; one should not - * make any assumptions regarding the structure or format of the code). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\NotificationService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The notification channel to verify. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The notification channel to verify. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. The verification code that was delivered to the channel as - * a result of invoking the `SendNotificationChannelVerificationCode` API - * method or that was retrieved from a verified channel via - * `GetNotificationChannelVerificationCode`. For example, one might have - * "G-123456" or "TKNZGhhd2EyN3I1MnRnMjRv" (in general, one is only - * guaranteed that the code is valid UTF-8; one should not - * make any assumptions regarding the structure or format of the code). - * - * Generated from protobuf field string code = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getCode() - { - return $this->code; - } - - /** - * Required. The verification code that was delivered to the channel as - * a result of invoking the `SendNotificationChannelVerificationCode` API - * method or that was retrieved from a verified channel via - * `GetNotificationChannelVerificationCode`. For example, one might have - * "G-123456" or "TKNZGhhd2EyN3I1MnRnMjRv" (in general, one is only - * guaranteed that the code is valid UTF-8; one should not - * make any assumptions regarding the structure or format of the code). - * - * Generated from protobuf field string code = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setCode($var) - { - GPBUtil::checkString($var, True); - $this->code = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/WindowsBasedSli.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/WindowsBasedSli.php deleted file mode 100644 index f049ead8c434..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/WindowsBasedSli.php +++ /dev/null @@ -1,236 +0,0 @@ -google.monitoring.v3.WindowsBasedSli - */ -class WindowsBasedSli extends \Google\Protobuf\Internal\Message -{ - /** - * Duration over which window quality is evaluated. Must be an integer - * fraction of a day and at least `60s`. - * - * Generated from protobuf field .google.protobuf.Duration window_period = 4; - */ - protected $window_period = null; - protected $window_criterion; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $good_bad_metric_filter - * A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) - * specifying a `TimeSeries` with `ValueType = BOOL`. The window is good if - * any `true` values appear in the window. - * @type \Google\Cloud\Monitoring\V3\WindowsBasedSli\PerformanceThreshold $good_total_ratio_threshold - * A window is good if its `performance` is high enough. - * @type \Google\Cloud\Monitoring\V3\WindowsBasedSli\MetricRange $metric_mean_in_range - * A window is good if the metric's value is in a good range, averaged - * across returned streams. - * @type \Google\Cloud\Monitoring\V3\WindowsBasedSli\MetricRange $metric_sum_in_range - * A window is good if the metric's value is in a good range, summed across - * returned streams. - * @type \Google\Protobuf\Duration $window_period - * Duration over which window quality is evaluated. Must be an integer - * fraction of a day and at least `60s`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\Service::initOnce(); - parent::__construct($data); - } - - /** - * A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) - * specifying a `TimeSeries` with `ValueType = BOOL`. The window is good if - * any `true` values appear in the window. - * - * Generated from protobuf field string good_bad_metric_filter = 5; - * @return string - */ - public function getGoodBadMetricFilter() - { - return $this->readOneof(5); - } - - public function hasGoodBadMetricFilter() - { - return $this->hasOneof(5); - } - - /** - * A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) - * specifying a `TimeSeries` with `ValueType = BOOL`. The window is good if - * any `true` values appear in the window. - * - * Generated from protobuf field string good_bad_metric_filter = 5; - * @param string $var - * @return $this - */ - public function setGoodBadMetricFilter($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * A window is good if its `performance` is high enough. - * - * Generated from protobuf field .google.monitoring.v3.WindowsBasedSli.PerformanceThreshold good_total_ratio_threshold = 2; - * @return \Google\Cloud\Monitoring\V3\WindowsBasedSli\PerformanceThreshold|null - */ - public function getGoodTotalRatioThreshold() - { - return $this->readOneof(2); - } - - public function hasGoodTotalRatioThreshold() - { - return $this->hasOneof(2); - } - - /** - * A window is good if its `performance` is high enough. - * - * Generated from protobuf field .google.monitoring.v3.WindowsBasedSli.PerformanceThreshold good_total_ratio_threshold = 2; - * @param \Google\Cloud\Monitoring\V3\WindowsBasedSli\PerformanceThreshold $var - * @return $this - */ - public function setGoodTotalRatioThreshold($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\WindowsBasedSli\PerformanceThreshold::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * A window is good if the metric's value is in a good range, averaged - * across returned streams. - * - * Generated from protobuf field .google.monitoring.v3.WindowsBasedSli.MetricRange metric_mean_in_range = 6; - * @return \Google\Cloud\Monitoring\V3\WindowsBasedSli\MetricRange|null - */ - public function getMetricMeanInRange() - { - return $this->readOneof(6); - } - - public function hasMetricMeanInRange() - { - return $this->hasOneof(6); - } - - /** - * A window is good if the metric's value is in a good range, averaged - * across returned streams. - * - * Generated from protobuf field .google.monitoring.v3.WindowsBasedSli.MetricRange metric_mean_in_range = 6; - * @param \Google\Cloud\Monitoring\V3\WindowsBasedSli\MetricRange $var - * @return $this - */ - public function setMetricMeanInRange($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\WindowsBasedSli\MetricRange::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * A window is good if the metric's value is in a good range, summed across - * returned streams. - * - * Generated from protobuf field .google.monitoring.v3.WindowsBasedSli.MetricRange metric_sum_in_range = 7; - * @return \Google\Cloud\Monitoring\V3\WindowsBasedSli\MetricRange|null - */ - public function getMetricSumInRange() - { - return $this->readOneof(7); - } - - public function hasMetricSumInRange() - { - return $this->hasOneof(7); - } - - /** - * A window is good if the metric's value is in a good range, summed across - * returned streams. - * - * Generated from protobuf field .google.monitoring.v3.WindowsBasedSli.MetricRange metric_sum_in_range = 7; - * @param \Google\Cloud\Monitoring\V3\WindowsBasedSli\MetricRange $var - * @return $this - */ - public function setMetricSumInRange($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\WindowsBasedSli\MetricRange::class); - $this->writeOneof(7, $var); - - return $this; - } - - /** - * Duration over which window quality is evaluated. Must be an integer - * fraction of a day and at least `60s`. - * - * Generated from protobuf field .google.protobuf.Duration window_period = 4; - * @return \Google\Protobuf\Duration|null - */ - public function getWindowPeriod() - { - return $this->window_period; - } - - public function hasWindowPeriod() - { - return isset($this->window_period); - } - - public function clearWindowPeriod() - { - unset($this->window_period); - } - - /** - * Duration over which window quality is evaluated. Must be an integer - * fraction of a day and at least `60s`. - * - * Generated from protobuf field .google.protobuf.Duration window_period = 4; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setWindowPeriod($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->window_period = $var; - - return $this; - } - - /** - * @return string - */ - public function getWindowCriterion() - { - return $this->whichOneof("window_criterion"); - } - -} - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/WindowsBasedSli/MetricRange.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/WindowsBasedSli/MetricRange.php deleted file mode 100644 index 2a86a24e4eab..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/WindowsBasedSli/MetricRange.php +++ /dev/null @@ -1,125 +0,0 @@ -google.monitoring.v3.WindowsBasedSli.MetricRange - */ -class MetricRange extends \Google\Protobuf\Internal\Message -{ - /** - * A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) - * specifying the `TimeSeries` to use for evaluating window quality. - * - * Generated from protobuf field string time_series = 1; - */ - protected $time_series = ''; - /** - * Range of values considered "good." For a one-sided range, set one bound - * to an infinite value. - * - * Generated from protobuf field .google.monitoring.v3.Range range = 4; - */ - protected $range = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $time_series - * A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) - * specifying the `TimeSeries` to use for evaluating window quality. - * @type \Google\Cloud\Monitoring\V3\Range $range - * Range of values considered "good." For a one-sided range, set one bound - * to an infinite value. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\Service::initOnce(); - parent::__construct($data); - } - - /** - * A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) - * specifying the `TimeSeries` to use for evaluating window quality. - * - * Generated from protobuf field string time_series = 1; - * @return string - */ - public function getTimeSeries() - { - return $this->time_series; - } - - /** - * A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) - * specifying the `TimeSeries` to use for evaluating window quality. - * - * Generated from protobuf field string time_series = 1; - * @param string $var - * @return $this - */ - public function setTimeSeries($var) - { - GPBUtil::checkString($var, True); - $this->time_series = $var; - - return $this; - } - - /** - * Range of values considered "good." For a one-sided range, set one bound - * to an infinite value. - * - * Generated from protobuf field .google.monitoring.v3.Range range = 4; - * @return \Google\Cloud\Monitoring\V3\Range|null - */ - public function getRange() - { - return $this->range; - } - - public function hasRange() - { - return isset($this->range); - } - - public function clearRange() - { - unset($this->range); - } - - /** - * Range of values considered "good." For a one-sided range, set one bound - * to an infinite value. - * - * Generated from protobuf field .google.monitoring.v3.Range range = 4; - * @param \Google\Cloud\Monitoring\V3\Range $var - * @return $this - */ - public function setRange($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\Range::class); - $this->range = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(MetricRange::class, \Google\Cloud\Monitoring\V3\WindowsBasedSli_MetricRange::class); - diff --git a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/WindowsBasedSli/PerformanceThreshold.php b/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/WindowsBasedSli/PerformanceThreshold.php deleted file mode 100644 index 7ff22f3a6770..000000000000 --- a/owl-bot-staging/Monitoring/v3/proto/src/Google/Cloud/Monitoring/V3/WindowsBasedSli/PerformanceThreshold.php +++ /dev/null @@ -1,146 +0,0 @@ -google.monitoring.v3.WindowsBasedSli.PerformanceThreshold - */ -class PerformanceThreshold extends \Google\Protobuf\Internal\Message -{ - /** - * If window `performance >= threshold`, the window is counted as good. - * - * Generated from protobuf field double threshold = 2; - */ - protected $threshold = 0.0; - protected $type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Monitoring\V3\RequestBasedSli $performance - * `RequestBasedSli` to evaluate to judge window quality. - * @type \Google\Cloud\Monitoring\V3\BasicSli $basic_sli_performance - * `BasicSli` to evaluate to judge window quality. - * @type float $threshold - * If window `performance >= threshold`, the window is counted as good. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Monitoring\V3\Service::initOnce(); - parent::__construct($data); - } - - /** - * `RequestBasedSli` to evaluate to judge window quality. - * - * Generated from protobuf field .google.monitoring.v3.RequestBasedSli performance = 1; - * @return \Google\Cloud\Monitoring\V3\RequestBasedSli|null - */ - public function getPerformance() - { - return $this->readOneof(1); - } - - public function hasPerformance() - { - return $this->hasOneof(1); - } - - /** - * `RequestBasedSli` to evaluate to judge window quality. - * - * Generated from protobuf field .google.monitoring.v3.RequestBasedSli performance = 1; - * @param \Google\Cloud\Monitoring\V3\RequestBasedSli $var - * @return $this - */ - public function setPerformance($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\RequestBasedSli::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * `BasicSli` to evaluate to judge window quality. - * - * Generated from protobuf field .google.monitoring.v3.BasicSli basic_sli_performance = 3; - * @return \Google\Cloud\Monitoring\V3\BasicSli|null - */ - public function getBasicSliPerformance() - { - return $this->readOneof(3); - } - - public function hasBasicSliPerformance() - { - return $this->hasOneof(3); - } - - /** - * `BasicSli` to evaluate to judge window quality. - * - * Generated from protobuf field .google.monitoring.v3.BasicSli basic_sli_performance = 3; - * @param \Google\Cloud\Monitoring\V3\BasicSli $var - * @return $this - */ - public function setBasicSliPerformance($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\BasicSli::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * If window `performance >= threshold`, the window is counted as good. - * - * Generated from protobuf field double threshold = 2; - * @return float - */ - public function getThreshold() - { - return $this->threshold; - } - - /** - * If window `performance >= threshold`, the window is counted as good. - * - * Generated from protobuf field double threshold = 2; - * @param float $var - * @return $this - */ - public function setThreshold($var) - { - GPBUtil::checkDouble($var); - $this->threshold = $var; - - return $this; - } - - /** - * @return string - */ - public function getType() - { - return $this->whichOneof("type"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(PerformanceThreshold::class, \Google\Cloud\Monitoring\V3\WindowsBasedSli_PerformanceThreshold::class); - diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/AlertPolicyServiceClient/create_alert_policy.php b/owl-bot-staging/Monitoring/v3/samples/V3/AlertPolicyServiceClient/create_alert_policy.php deleted file mode 100644 index 8da94f5c6a84..000000000000 --- a/owl-bot-staging/Monitoring/v3/samples/V3/AlertPolicyServiceClient/create_alert_policy.php +++ /dev/null @@ -1,88 +0,0 @@ -setName($name) - ->setAlertPolicy($alertPolicy); - - // Call the API and handle any network failures. - try { - /** @var AlertPolicy $response */ - $response = $alertPolicyServiceClient->createAlertPolicy($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $name = '[NAME]'; - - create_alert_policy_sample($name); -} -// [END monitoring_v3_generated_AlertPolicyService_CreateAlertPolicy_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/AlertPolicyServiceClient/delete_alert_policy.php b/owl-bot-staging/Monitoring/v3/samples/V3/AlertPolicyServiceClient/delete_alert_policy.php deleted file mode 100644 index 20341bb9cedc..000000000000 --- a/owl-bot-staging/Monitoring/v3/samples/V3/AlertPolicyServiceClient/delete_alert_policy.php +++ /dev/null @@ -1,77 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $alertPolicyServiceClient->deleteAlertPolicy($request); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = AlertPolicyServiceClient::alertPolicyName('[PROJECT]', '[ALERT_POLICY]'); - - delete_alert_policy_sample($formattedName); -} -// [END monitoring_v3_generated_AlertPolicyService_DeleteAlertPolicy_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/AlertPolicyServiceClient/get_alert_policy.php b/owl-bot-staging/Monitoring/v3/samples/V3/AlertPolicyServiceClient/get_alert_policy.php deleted file mode 100644 index a6b8ef21ad66..000000000000 --- a/owl-bot-staging/Monitoring/v3/samples/V3/AlertPolicyServiceClient/get_alert_policy.php +++ /dev/null @@ -1,73 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var AlertPolicy $response */ - $response = $alertPolicyServiceClient->getAlertPolicy($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = AlertPolicyServiceClient::alertPolicyName('[PROJECT]', '[ALERT_POLICY]'); - - get_alert_policy_sample($formattedName); -} -// [END monitoring_v3_generated_AlertPolicyService_GetAlertPolicy_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/AlertPolicyServiceClient/list_alert_policies.php b/owl-bot-staging/Monitoring/v3/samples/V3/AlertPolicyServiceClient/list_alert_policies.php deleted file mode 100644 index dc60fddad14f..000000000000 --- a/owl-bot-staging/Monitoring/v3/samples/V3/AlertPolicyServiceClient/list_alert_policies.php +++ /dev/null @@ -1,85 +0,0 @@ -setName($name); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $alertPolicyServiceClient->listAlertPolicies($request); - - /** @var AlertPolicy $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $name = '[NAME]'; - - list_alert_policies_sample($name); -} -// [END monitoring_v3_generated_AlertPolicyService_ListAlertPolicies_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/AlertPolicyServiceClient/update_alert_policy.php b/owl-bot-staging/Monitoring/v3/samples/V3/AlertPolicyServiceClient/update_alert_policy.php deleted file mode 100644 index d4f9c5060ec7..000000000000 --- a/owl-bot-staging/Monitoring/v3/samples/V3/AlertPolicyServiceClient/update_alert_policy.php +++ /dev/null @@ -1,66 +0,0 @@ -setAlertPolicy($alertPolicy); - - // Call the API and handle any network failures. - try { - /** @var AlertPolicy $response */ - $response = $alertPolicyServiceClient->updateAlertPolicy($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END monitoring_v3_generated_AlertPolicyService_UpdateAlertPolicy_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/GroupServiceClient/create_group.php b/owl-bot-staging/Monitoring/v3/samples/V3/GroupServiceClient/create_group.php deleted file mode 100644 index 5662f185f72e..000000000000 --- a/owl-bot-staging/Monitoring/v3/samples/V3/GroupServiceClient/create_group.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($name) - ->setGroup($group); - - // Call the API and handle any network failures. - try { - /** @var Group $response */ - $response = $groupServiceClient->createGroup($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $name = '[NAME]'; - - create_group_sample($name); -} -// [END monitoring_v3_generated_GroupService_CreateGroup_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/GroupServiceClient/delete_group.php b/owl-bot-staging/Monitoring/v3/samples/V3/GroupServiceClient/delete_group.php deleted file mode 100644 index 2b0b5d393b35..000000000000 --- a/owl-bot-staging/Monitoring/v3/samples/V3/GroupServiceClient/delete_group.php +++ /dev/null @@ -1,71 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $groupServiceClient->deleteGroup($request); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = GroupServiceClient::groupName('[PROJECT]', '[GROUP]'); - - delete_group_sample($formattedName); -} -// [END monitoring_v3_generated_GroupService_DeleteGroup_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/GroupServiceClient/get_group.php b/owl-bot-staging/Monitoring/v3/samples/V3/GroupServiceClient/get_group.php deleted file mode 100644 index 59d00116484a..000000000000 --- a/owl-bot-staging/Monitoring/v3/samples/V3/GroupServiceClient/get_group.php +++ /dev/null @@ -1,73 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Group $response */ - $response = $groupServiceClient->getGroup($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = GroupServiceClient::groupName('[PROJECT]', '[GROUP]'); - - get_group_sample($formattedName); -} -// [END monitoring_v3_generated_GroupService_GetGroup_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/GroupServiceClient/list_group_members.php b/owl-bot-staging/Monitoring/v3/samples/V3/GroupServiceClient/list_group_members.php deleted file mode 100644 index 810ef1fb51ce..000000000000 --- a/owl-bot-staging/Monitoring/v3/samples/V3/GroupServiceClient/list_group_members.php +++ /dev/null @@ -1,78 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $groupServiceClient->listGroupMembers($request); - - /** @var MonitoredResource $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = GroupServiceClient::groupName('[PROJECT]', '[GROUP]'); - - list_group_members_sample($formattedName); -} -// [END monitoring_v3_generated_GroupService_ListGroupMembers_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/GroupServiceClient/list_groups.php b/owl-bot-staging/Monitoring/v3/samples/V3/GroupServiceClient/list_groups.php deleted file mode 100644 index 073f54a6f17e..000000000000 --- a/owl-bot-staging/Monitoring/v3/samples/V3/GroupServiceClient/list_groups.php +++ /dev/null @@ -1,79 +0,0 @@ -setName($name); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $groupServiceClient->listGroups($request); - - /** @var Group $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $name = '[NAME]'; - - list_groups_sample($name); -} -// [END monitoring_v3_generated_GroupService_ListGroups_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/GroupServiceClient/update_group.php b/owl-bot-staging/Monitoring/v3/samples/V3/GroupServiceClient/update_group.php deleted file mode 100644 index 58d8ed1e52b3..000000000000 --- a/owl-bot-staging/Monitoring/v3/samples/V3/GroupServiceClient/update_group.php +++ /dev/null @@ -1,60 +0,0 @@ -setGroup($group); - - // Call the API and handle any network failures. - try { - /** @var Group $response */ - $response = $groupServiceClient->updateGroup($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END monitoring_v3_generated_GroupService_UpdateGroup_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/MetricServiceClient/create_metric_descriptor.php b/owl-bot-staging/Monitoring/v3/samples/V3/MetricServiceClient/create_metric_descriptor.php deleted file mode 100644 index c54f10ba5a8b..000000000000 --- a/owl-bot-staging/Monitoring/v3/samples/V3/MetricServiceClient/create_metric_descriptor.php +++ /dev/null @@ -1,81 +0,0 @@ -setName($name) - ->setMetricDescriptor($metricDescriptor); - - // Call the API and handle any network failures. - try { - /** @var MetricDescriptor $response */ - $response = $metricServiceClient->createMetricDescriptor($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $name = '[NAME]'; - - create_metric_descriptor_sample($name); -} -// [END monitoring_v3_generated_MetricService_CreateMetricDescriptor_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/MetricServiceClient/create_service_time_series.php b/owl-bot-staging/Monitoring/v3/samples/V3/MetricServiceClient/create_service_time_series.php deleted file mode 100644 index 3676da8a884a..000000000000 --- a/owl-bot-staging/Monitoring/v3/samples/V3/MetricServiceClient/create_service_time_series.php +++ /dev/null @@ -1,84 +0,0 @@ -setName($formattedName) - ->setTimeSeries($timeSeries); - - // Call the API and handle any network failures. - try { - $metricServiceClient->createServiceTimeSeries($request); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = MetricServiceClient::projectName('[PROJECT]'); - - create_service_time_series_sample($formattedName); -} -// [END monitoring_v3_generated_MetricService_CreateServiceTimeSeries_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/MetricServiceClient/create_time_series.php b/owl-bot-staging/Monitoring/v3/samples/V3/MetricServiceClient/create_time_series.php deleted file mode 100644 index 943e3d74156e..000000000000 --- a/owl-bot-staging/Monitoring/v3/samples/V3/MetricServiceClient/create_time_series.php +++ /dev/null @@ -1,82 +0,0 @@ -setName($formattedName) - ->setTimeSeries($timeSeries); - - // Call the API and handle any network failures. - try { - $metricServiceClient->createTimeSeries($request); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = MetricServiceClient::projectName('[PROJECT]'); - - create_time_series_sample($formattedName); -} -// [END monitoring_v3_generated_MetricService_CreateTimeSeries_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/MetricServiceClient/delete_metric_descriptor.php b/owl-bot-staging/Monitoring/v3/samples/V3/MetricServiceClient/delete_metric_descriptor.php deleted file mode 100644 index 5be71ec658ad..000000000000 --- a/owl-bot-staging/Monitoring/v3/samples/V3/MetricServiceClient/delete_metric_descriptor.php +++ /dev/null @@ -1,77 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $metricServiceClient->deleteMetricDescriptor($request); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = MetricServiceClient::metricDescriptorName('[PROJECT]', '[METRIC_DESCRIPTOR]'); - - delete_metric_descriptor_sample($formattedName); -} -// [END monitoring_v3_generated_MetricService_DeleteMetricDescriptor_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/MetricServiceClient/get_metric_descriptor.php b/owl-bot-staging/Monitoring/v3/samples/V3/MetricServiceClient/get_metric_descriptor.php deleted file mode 100644 index f1733d7ebcf3..000000000000 --- a/owl-bot-staging/Monitoring/v3/samples/V3/MetricServiceClient/get_metric_descriptor.php +++ /dev/null @@ -1,77 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var MetricDescriptor $response */ - $response = $metricServiceClient->getMetricDescriptor($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = MetricServiceClient::metricDescriptorName('[PROJECT]', '[METRIC_DESCRIPTOR]'); - - get_metric_descriptor_sample($formattedName); -} -// [END monitoring_v3_generated_MetricService_GetMetricDescriptor_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/MetricServiceClient/get_monitored_resource_descriptor.php b/owl-bot-staging/Monitoring/v3/samples/V3/MetricServiceClient/get_monitored_resource_descriptor.php deleted file mode 100644 index b80928f31d40..000000000000 --- a/owl-bot-staging/Monitoring/v3/samples/V3/MetricServiceClient/get_monitored_resource_descriptor.php +++ /dev/null @@ -1,79 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var MonitoredResourceDescriptor $response */ - $response = $metricServiceClient->getMonitoredResourceDescriptor($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = MetricServiceClient::monitoredResourceDescriptorName( - '[PROJECT]', - '[MONITORED_RESOURCE_DESCRIPTOR]' - ); - - get_monitored_resource_descriptor_sample($formattedName); -} -// [END monitoring_v3_generated_MetricService_GetMonitoredResourceDescriptor_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/MetricServiceClient/list_metric_descriptors.php b/owl-bot-staging/Monitoring/v3/samples/V3/MetricServiceClient/list_metric_descriptors.php deleted file mode 100644 index 2a60d376cdf4..000000000000 --- a/owl-bot-staging/Monitoring/v3/samples/V3/MetricServiceClient/list_metric_descriptors.php +++ /dev/null @@ -1,79 +0,0 @@ -setName($name); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $metricServiceClient->listMetricDescriptors($request); - - /** @var MetricDescriptor $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $name = '[NAME]'; - - list_metric_descriptors_sample($name); -} -// [END monitoring_v3_generated_MetricService_ListMetricDescriptors_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/MetricServiceClient/list_monitored_resource_descriptors.php b/owl-bot-staging/Monitoring/v3/samples/V3/MetricServiceClient/list_monitored_resource_descriptors.php deleted file mode 100644 index 8594af87cfce..000000000000 --- a/owl-bot-staging/Monitoring/v3/samples/V3/MetricServiceClient/list_monitored_resource_descriptors.php +++ /dev/null @@ -1,79 +0,0 @@ -setName($name); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $metricServiceClient->listMonitoredResourceDescriptors($request); - - /** @var MonitoredResourceDescriptor $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $name = '[NAME]'; - - list_monitored_resource_descriptors_sample($name); -} -// [END monitoring_v3_generated_MetricService_ListMonitoredResourceDescriptors_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/MetricServiceClient/list_time_series.php b/owl-bot-staging/Monitoring/v3/samples/V3/MetricServiceClient/list_time_series.php deleted file mode 100644 index 2d408169cc27..000000000000 --- a/owl-bot-staging/Monitoring/v3/samples/V3/MetricServiceClient/list_time_series.php +++ /dev/null @@ -1,99 +0,0 @@ -setName($formattedName) - ->setFilter($filter) - ->setInterval($interval) - ->setView($view); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $metricServiceClient->listTimeSeries($request); - - /** @var TimeSeries $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = MetricServiceClient::workspaceName('[PROJECT]'); - $filter = '[FILTER]'; - $view = TimeSeriesView::FULL; - - list_time_series_sample($formattedName, $filter, $view); -} -// [END monitoring_v3_generated_MetricService_ListTimeSeries_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/NotificationChannelServiceClient/create_notification_channel.php b/owl-bot-staging/Monitoring/v3/samples/V3/NotificationChannelServiceClient/create_notification_channel.php deleted file mode 100644 index 4e2647ee0231..000000000000 --- a/owl-bot-staging/Monitoring/v3/samples/V3/NotificationChannelServiceClient/create_notification_channel.php +++ /dev/null @@ -1,87 +0,0 @@ -setName($name) - ->setNotificationChannel($notificationChannel); - - // Call the API and handle any network failures. - try { - /** @var NotificationChannel $response */ - $response = $notificationChannelServiceClient->createNotificationChannel($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $name = '[NAME]'; - - create_notification_channel_sample($name); -} -// [END monitoring_v3_generated_NotificationChannelService_CreateNotificationChannel_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/NotificationChannelServiceClient/delete_notification_channel.php b/owl-bot-staging/Monitoring/v3/samples/V3/NotificationChannelServiceClient/delete_notification_channel.php deleted file mode 100644 index 1af1aacc41e0..000000000000 --- a/owl-bot-staging/Monitoring/v3/samples/V3/NotificationChannelServiceClient/delete_notification_channel.php +++ /dev/null @@ -1,79 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $notificationChannelServiceClient->deleteNotificationChannel($request); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = NotificationChannelServiceClient::notificationChannelName( - '[PROJECT]', - '[NOTIFICATION_CHANNEL]' - ); - - delete_notification_channel_sample($formattedName); -} -// [END monitoring_v3_generated_NotificationChannelService_DeleteNotificationChannel_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/NotificationChannelServiceClient/get_notification_channel.php b/owl-bot-staging/Monitoring/v3/samples/V3/NotificationChannelServiceClient/get_notification_channel.php deleted file mode 100644 index a1efeebeec4a..000000000000 --- a/owl-bot-staging/Monitoring/v3/samples/V3/NotificationChannelServiceClient/get_notification_channel.php +++ /dev/null @@ -1,80 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var NotificationChannel $response */ - $response = $notificationChannelServiceClient->getNotificationChannel($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = NotificationChannelServiceClient::notificationChannelName( - '[PROJECT]', - '[NOTIFICATION_CHANNEL]' - ); - - get_notification_channel_sample($formattedName); -} -// [END monitoring_v3_generated_NotificationChannelService_GetNotificationChannel_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/NotificationChannelServiceClient/get_notification_channel_descriptor.php b/owl-bot-staging/Monitoring/v3/samples/V3/NotificationChannelServiceClient/get_notification_channel_descriptor.php deleted file mode 100644 index 3f4bc0a77317..000000000000 --- a/owl-bot-staging/Monitoring/v3/samples/V3/NotificationChannelServiceClient/get_notification_channel_descriptor.php +++ /dev/null @@ -1,77 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var NotificationChannelDescriptor $response */ - $response = $notificationChannelServiceClient->getNotificationChannelDescriptor($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = NotificationChannelServiceClient::notificationChannelDescriptorName( - '[PROJECT]', - '[CHANNEL_DESCRIPTOR]' - ); - - get_notification_channel_descriptor_sample($formattedName); -} -// [END monitoring_v3_generated_NotificationChannelService_GetNotificationChannelDescriptor_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/NotificationChannelServiceClient/get_notification_channel_verification_code.php b/owl-bot-staging/Monitoring/v3/samples/V3/NotificationChannelServiceClient/get_notification_channel_verification_code.php deleted file mode 100644 index a63472001e29..000000000000 --- a/owl-bot-staging/Monitoring/v3/samples/V3/NotificationChannelServiceClient/get_notification_channel_verification_code.php +++ /dev/null @@ -1,96 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var GetNotificationChannelVerificationCodeResponse $response */ - $response = $notificationChannelServiceClient->getNotificationChannelVerificationCode($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = NotificationChannelServiceClient::notificationChannelName( - '[PROJECT]', - '[NOTIFICATION_CHANNEL]' - ); - - get_notification_channel_verification_code_sample($formattedName); -} -// [END monitoring_v3_generated_NotificationChannelService_GetNotificationChannelVerificationCode_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/NotificationChannelServiceClient/list_notification_channel_descriptors.php b/owl-bot-staging/Monitoring/v3/samples/V3/NotificationChannelServiceClient/list_notification_channel_descriptors.php deleted file mode 100644 index 0382fad734f1..000000000000 --- a/owl-bot-staging/Monitoring/v3/samples/V3/NotificationChannelServiceClient/list_notification_channel_descriptors.php +++ /dev/null @@ -1,86 +0,0 @@ -setName($name); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $notificationChannelServiceClient->listNotificationChannelDescriptors($request); - - /** @var NotificationChannelDescriptor $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $name = '[NAME]'; - - list_notification_channel_descriptors_sample($name); -} -// [END monitoring_v3_generated_NotificationChannelService_ListNotificationChannelDescriptors_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/NotificationChannelServiceClient/list_notification_channels.php b/owl-bot-staging/Monitoring/v3/samples/V3/NotificationChannelServiceClient/list_notification_channels.php deleted file mode 100644 index 4a236f89c3ab..000000000000 --- a/owl-bot-staging/Monitoring/v3/samples/V3/NotificationChannelServiceClient/list_notification_channels.php +++ /dev/null @@ -1,88 +0,0 @@ -setName($name); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $notificationChannelServiceClient->listNotificationChannels($request); - - /** @var NotificationChannel $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $name = '[NAME]'; - - list_notification_channels_sample($name); -} -// [END monitoring_v3_generated_NotificationChannelService_ListNotificationChannels_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/NotificationChannelServiceClient/send_notification_channel_verification_code.php b/owl-bot-staging/Monitoring/v3/samples/V3/NotificationChannelServiceClient/send_notification_channel_verification_code.php deleted file mode 100644 index b8810b7a3018..000000000000 --- a/owl-bot-staging/Monitoring/v3/samples/V3/NotificationChannelServiceClient/send_notification_channel_verification_code.php +++ /dev/null @@ -1,73 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $notificationChannelServiceClient->sendNotificationChannelVerificationCode($request); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = NotificationChannelServiceClient::notificationChannelName( - '[PROJECT]', - '[NOTIFICATION_CHANNEL]' - ); - - send_notification_channel_verification_code_sample($formattedName); -} -// [END monitoring_v3_generated_NotificationChannelService_SendNotificationChannelVerificationCode_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/NotificationChannelServiceClient/update_notification_channel.php b/owl-bot-staging/Monitoring/v3/samples/V3/NotificationChannelServiceClient/update_notification_channel.php deleted file mode 100644 index ad79286eff6b..000000000000 --- a/owl-bot-staging/Monitoring/v3/samples/V3/NotificationChannelServiceClient/update_notification_channel.php +++ /dev/null @@ -1,65 +0,0 @@ -setNotificationChannel($notificationChannel); - - // Call the API and handle any network failures. - try { - /** @var NotificationChannel $response */ - $response = $notificationChannelServiceClient->updateNotificationChannel($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END monitoring_v3_generated_NotificationChannelService_UpdateNotificationChannel_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/NotificationChannelServiceClient/verify_notification_channel.php b/owl-bot-staging/Monitoring/v3/samples/V3/NotificationChannelServiceClient/verify_notification_channel.php deleted file mode 100644 index 7603415aff57..000000000000 --- a/owl-bot-staging/Monitoring/v3/samples/V3/NotificationChannelServiceClient/verify_notification_channel.php +++ /dev/null @@ -1,85 +0,0 @@ -setName($formattedName) - ->setCode($code); - - // Call the API and handle any network failures. - try { - /** @var NotificationChannel $response */ - $response = $notificationChannelServiceClient->verifyNotificationChannel($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = NotificationChannelServiceClient::notificationChannelName( - '[PROJECT]', - '[NOTIFICATION_CHANNEL]' - ); - $code = '[CODE]'; - - verify_notification_channel_sample($formattedName, $code); -} -// [END monitoring_v3_generated_NotificationChannelService_VerifyNotificationChannel_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/QueryServiceClient/query_time_series.php b/owl-bot-staging/Monitoring/v3/samples/V3/QueryServiceClient/query_time_series.php deleted file mode 100644 index c9e9a6166ae4..000000000000 --- a/owl-bot-staging/Monitoring/v3/samples/V3/QueryServiceClient/query_time_series.php +++ /dev/null @@ -1,84 +0,0 @@ -setName($name) - ->setQuery($query); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $queryServiceClient->queryTimeSeries($request); - - /** @var TimeSeriesData $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $name = '[NAME]'; - $query = '[QUERY]'; - - query_time_series_sample($name, $query); -} -// [END monitoring_v3_generated_QueryService_QueryTimeSeries_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/ServiceMonitoringServiceClient/create_service.php b/owl-bot-staging/Monitoring/v3/samples/V3/ServiceMonitoringServiceClient/create_service.php deleted file mode 100644 index f1cd6dae9947..000000000000 --- a/owl-bot-staging/Monitoring/v3/samples/V3/ServiceMonitoringServiceClient/create_service.php +++ /dev/null @@ -1,76 +0,0 @@ -setParent($parent) - ->setService($service); - - // Call the API and handle any network failures. - try { - /** @var Service $response */ - $response = $serviceMonitoringServiceClient->createService($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $parent = '[PARENT]'; - - create_service_sample($parent); -} -// [END monitoring_v3_generated_ServiceMonitoringService_CreateService_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/ServiceMonitoringServiceClient/create_service_level_objective.php b/owl-bot-staging/Monitoring/v3/samples/V3/ServiceMonitoringServiceClient/create_service_level_objective.php deleted file mode 100644 index 2559795e52e7..000000000000 --- a/owl-bot-staging/Monitoring/v3/samples/V3/ServiceMonitoringServiceClient/create_service_level_objective.php +++ /dev/null @@ -1,75 +0,0 @@ -setParent($formattedParent) - ->setServiceLevelObjective($serviceLevelObjective); - - // Call the API and handle any network failures. - try { - /** @var ServiceLevelObjective $response */ - $response = $serviceMonitoringServiceClient->createServiceLevelObjective($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = ServiceMonitoringServiceClient::serviceName('[PROJECT]', '[SERVICE]'); - - create_service_level_objective_sample($formattedParent); -} -// [END monitoring_v3_generated_ServiceMonitoringService_CreateServiceLevelObjective_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/ServiceMonitoringServiceClient/delete_service.php b/owl-bot-staging/Monitoring/v3/samples/V3/ServiceMonitoringServiceClient/delete_service.php deleted file mode 100644 index dd319f9e6108..000000000000 --- a/owl-bot-staging/Monitoring/v3/samples/V3/ServiceMonitoringServiceClient/delete_service.php +++ /dev/null @@ -1,71 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $serviceMonitoringServiceClient->deleteService($request); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = ServiceMonitoringServiceClient::serviceName('[PROJECT]', '[SERVICE]'); - - delete_service_sample($formattedName); -} -// [END monitoring_v3_generated_ServiceMonitoringService_DeleteService_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/ServiceMonitoringServiceClient/delete_service_level_objective.php b/owl-bot-staging/Monitoring/v3/samples/V3/ServiceMonitoringServiceClient/delete_service_level_objective.php deleted file mode 100644 index ca3c81872464..000000000000 --- a/owl-bot-staging/Monitoring/v3/samples/V3/ServiceMonitoringServiceClient/delete_service_level_objective.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $serviceMonitoringServiceClient->deleteServiceLevelObjective($request); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = ServiceMonitoringServiceClient::serviceLevelObjectiveName( - '[PROJECT]', - '[SERVICE]', - '[SERVICE_LEVEL_OBJECTIVE]' - ); - - delete_service_level_objective_sample($formattedName); -} -// [END monitoring_v3_generated_ServiceMonitoringService_DeleteServiceLevelObjective_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/ServiceMonitoringServiceClient/get_service.php b/owl-bot-staging/Monitoring/v3/samples/V3/ServiceMonitoringServiceClient/get_service.php deleted file mode 100644 index cb12b2fcac7f..000000000000 --- a/owl-bot-staging/Monitoring/v3/samples/V3/ServiceMonitoringServiceClient/get_service.php +++ /dev/null @@ -1,73 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Service $response */ - $response = $serviceMonitoringServiceClient->getService($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = ServiceMonitoringServiceClient::serviceName('[PROJECT]', '[SERVICE]'); - - get_service_sample($formattedName); -} -// [END monitoring_v3_generated_ServiceMonitoringService_GetService_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/ServiceMonitoringServiceClient/get_service_level_objective.php b/owl-bot-staging/Monitoring/v3/samples/V3/ServiceMonitoringServiceClient/get_service_level_objective.php deleted file mode 100644 index 7bc8c814262f..000000000000 --- a/owl-bot-staging/Monitoring/v3/samples/V3/ServiceMonitoringServiceClient/get_service_level_objective.php +++ /dev/null @@ -1,78 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var ServiceLevelObjective $response */ - $response = $serviceMonitoringServiceClient->getServiceLevelObjective($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = ServiceMonitoringServiceClient::serviceLevelObjectiveName( - '[PROJECT]', - '[SERVICE]', - '[SERVICE_LEVEL_OBJECTIVE]' - ); - - get_service_level_objective_sample($formattedName); -} -// [END monitoring_v3_generated_ServiceMonitoringService_GetServiceLevelObjective_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/ServiceMonitoringServiceClient/list_service_level_objectives.php b/owl-bot-staging/Monitoring/v3/samples/V3/ServiceMonitoringServiceClient/list_service_level_objectives.php deleted file mode 100644 index 4476bfaaafda..000000000000 --- a/owl-bot-staging/Monitoring/v3/samples/V3/ServiceMonitoringServiceClient/list_service_level_objectives.php +++ /dev/null @@ -1,80 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $serviceMonitoringServiceClient->listServiceLevelObjectives($request); - - /** @var ServiceLevelObjective $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = ServiceMonitoringServiceClient::serviceName('[PROJECT]', '[SERVICE]'); - - list_service_level_objectives_sample($formattedParent); -} -// [END monitoring_v3_generated_ServiceMonitoringService_ListServiceLevelObjectives_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/ServiceMonitoringServiceClient/list_services.php b/owl-bot-staging/Monitoring/v3/samples/V3/ServiceMonitoringServiceClient/list_services.php deleted file mode 100644 index f1495ce77ad6..000000000000 --- a/owl-bot-staging/Monitoring/v3/samples/V3/ServiceMonitoringServiceClient/list_services.php +++ /dev/null @@ -1,80 +0,0 @@ -setParent($parent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $serviceMonitoringServiceClient->listServices($request); - - /** @var Service $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $parent = '[PARENT]'; - - list_services_sample($parent); -} -// [END monitoring_v3_generated_ServiceMonitoringService_ListServices_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/ServiceMonitoringServiceClient/update_service.php b/owl-bot-staging/Monitoring/v3/samples/V3/ServiceMonitoringServiceClient/update_service.php deleted file mode 100644 index 1a9fbecdfd95..000000000000 --- a/owl-bot-staging/Monitoring/v3/samples/V3/ServiceMonitoringServiceClient/update_service.php +++ /dev/null @@ -1,59 +0,0 @@ -setService($service); - - // Call the API and handle any network failures. - try { - /** @var Service $response */ - $response = $serviceMonitoringServiceClient->updateService($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END monitoring_v3_generated_ServiceMonitoringService_UpdateService_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/ServiceMonitoringServiceClient/update_service_level_objective.php b/owl-bot-staging/Monitoring/v3/samples/V3/ServiceMonitoringServiceClient/update_service_level_objective.php deleted file mode 100644 index 30611bd57c1b..000000000000 --- a/owl-bot-staging/Monitoring/v3/samples/V3/ServiceMonitoringServiceClient/update_service_level_objective.php +++ /dev/null @@ -1,59 +0,0 @@ -setServiceLevelObjective($serviceLevelObjective); - - // Call the API and handle any network failures. - try { - /** @var ServiceLevelObjective $response */ - $response = $serviceMonitoringServiceClient->updateServiceLevelObjective($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END monitoring_v3_generated_ServiceMonitoringService_UpdateServiceLevelObjective_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/SnoozeServiceClient/create_snooze.php b/owl-bot-staging/Monitoring/v3/samples/V3/SnoozeServiceClient/create_snooze.php deleted file mode 100644 index ee2cdecb18fb..000000000000 --- a/owl-bot-staging/Monitoring/v3/samples/V3/SnoozeServiceClient/create_snooze.php +++ /dev/null @@ -1,89 +0,0 @@ -setCriteria($snoozeCriteria) - ->setInterval($snoozeInterval) - ->setDisplayName($snoozeDisplayName); - $request = (new CreateSnoozeRequest()) - ->setParent($formattedParent) - ->setSnooze($snooze); - - // Call the API and handle any network failures. - try { - /** @var Snooze $response */ - $response = $snoozeServiceClient->createSnooze($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = SnoozeServiceClient::workspaceName('[PROJECT]'); - $snoozeDisplayName = '[DISPLAY_NAME]'; - - create_snooze_sample($formattedParent, $snoozeDisplayName); -} -// [END monitoring_v3_generated_SnoozeService_CreateSnooze_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/SnoozeServiceClient/get_snooze.php b/owl-bot-staging/Monitoring/v3/samples/V3/SnoozeServiceClient/get_snooze.php deleted file mode 100644 index cf467e5c3c3d..000000000000 --- a/owl-bot-staging/Monitoring/v3/samples/V3/SnoozeServiceClient/get_snooze.php +++ /dev/null @@ -1,73 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Snooze $response */ - $response = $snoozeServiceClient->getSnooze($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = SnoozeServiceClient::snoozeName('[PROJECT]', '[SNOOZE]'); - - get_snooze_sample($formattedName); -} -// [END monitoring_v3_generated_SnoozeService_GetSnooze_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/SnoozeServiceClient/list_snoozes.php b/owl-bot-staging/Monitoring/v3/samples/V3/SnoozeServiceClient/list_snoozes.php deleted file mode 100644 index f0fb94d66018..000000000000 --- a/owl-bot-staging/Monitoring/v3/samples/V3/SnoozeServiceClient/list_snoozes.php +++ /dev/null @@ -1,81 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $snoozeServiceClient->listSnoozes($request); - - /** @var Snooze $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = SnoozeServiceClient::workspaceName('[PROJECT]'); - - list_snoozes_sample($formattedParent); -} -// [END monitoring_v3_generated_SnoozeService_ListSnoozes_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/SnoozeServiceClient/update_snooze.php b/owl-bot-staging/Monitoring/v3/samples/V3/SnoozeServiceClient/update_snooze.php deleted file mode 100644 index 923e1a90c280..000000000000 --- a/owl-bot-staging/Monitoring/v3/samples/V3/SnoozeServiceClient/update_snooze.php +++ /dev/null @@ -1,83 +0,0 @@ -setCriteria($snoozeCriteria) - ->setInterval($snoozeInterval) - ->setDisplayName($snoozeDisplayName); - $updateMask = new FieldMask(); - $request = (new UpdateSnoozeRequest()) - ->setSnooze($snooze) - ->setUpdateMask($updateMask); - - // Call the API and handle any network failures. - try { - /** @var Snooze $response */ - $response = $snoozeServiceClient->updateSnooze($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $snoozeDisplayName = '[DISPLAY_NAME]'; - - update_snooze_sample($snoozeDisplayName); -} -// [END monitoring_v3_generated_SnoozeService_UpdateSnooze_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/UptimeCheckServiceClient/create_uptime_check_config.php b/owl-bot-staging/Monitoring/v3/samples/V3/UptimeCheckServiceClient/create_uptime_check_config.php deleted file mode 100644 index 6ad37bedcda5..000000000000 --- a/owl-bot-staging/Monitoring/v3/samples/V3/UptimeCheckServiceClient/create_uptime_check_config.php +++ /dev/null @@ -1,76 +0,0 @@ -setParent($parent) - ->setUptimeCheckConfig($uptimeCheckConfig); - - // Call the API and handle any network failures. - try { - /** @var UptimeCheckConfig $response */ - $response = $uptimeCheckServiceClient->createUptimeCheckConfig($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $parent = '[PARENT]'; - - create_uptime_check_config_sample($parent); -} -// [END monitoring_v3_generated_UptimeCheckService_CreateUptimeCheckConfig_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/UptimeCheckServiceClient/delete_uptime_check_config.php b/owl-bot-staging/Monitoring/v3/samples/V3/UptimeCheckServiceClient/delete_uptime_check_config.php deleted file mode 100644 index d33f28aec3ef..000000000000 --- a/owl-bot-staging/Monitoring/v3/samples/V3/UptimeCheckServiceClient/delete_uptime_check_config.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $uptimeCheckServiceClient->deleteUptimeCheckConfig($request); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = UptimeCheckServiceClient::uptimeCheckConfigName( - '[PROJECT]', - '[UPTIME_CHECK_CONFIG]' - ); - - delete_uptime_check_config_sample($formattedName); -} -// [END monitoring_v3_generated_UptimeCheckService_DeleteUptimeCheckConfig_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/UptimeCheckServiceClient/get_uptime_check_config.php b/owl-bot-staging/Monitoring/v3/samples/V3/UptimeCheckServiceClient/get_uptime_check_config.php deleted file mode 100644 index a3dbc0e2c419..000000000000 --- a/owl-bot-staging/Monitoring/v3/samples/V3/UptimeCheckServiceClient/get_uptime_check_config.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var UptimeCheckConfig $response */ - $response = $uptimeCheckServiceClient->getUptimeCheckConfig($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = UptimeCheckServiceClient::uptimeCheckConfigName( - '[PROJECT]', - '[UPTIME_CHECK_CONFIG]' - ); - - get_uptime_check_config_sample($formattedName); -} -// [END monitoring_v3_generated_UptimeCheckService_GetUptimeCheckConfig_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/UptimeCheckServiceClient/list_uptime_check_configs.php b/owl-bot-staging/Monitoring/v3/samples/V3/UptimeCheckServiceClient/list_uptime_check_configs.php deleted file mode 100644 index 7a681db45273..000000000000 --- a/owl-bot-staging/Monitoring/v3/samples/V3/UptimeCheckServiceClient/list_uptime_check_configs.php +++ /dev/null @@ -1,80 +0,0 @@ -setParent($parent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $uptimeCheckServiceClient->listUptimeCheckConfigs($request); - - /** @var UptimeCheckConfig $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $parent = '[PARENT]'; - - list_uptime_check_configs_sample($parent); -} -// [END monitoring_v3_generated_UptimeCheckService_ListUptimeCheckConfigs_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/UptimeCheckServiceClient/list_uptime_check_ips.php b/owl-bot-staging/Monitoring/v3/samples/V3/UptimeCheckServiceClient/list_uptime_check_ips.php deleted file mode 100644 index 9d96322e41fa..000000000000 --- a/owl-bot-staging/Monitoring/v3/samples/V3/UptimeCheckServiceClient/list_uptime_check_ips.php +++ /dev/null @@ -1,62 +0,0 @@ -listUptimeCheckIps($request); - - /** @var UptimeCheckIp $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END monitoring_v3_generated_UptimeCheckService_ListUptimeCheckIps_sync] diff --git a/owl-bot-staging/Monitoring/v3/samples/V3/UptimeCheckServiceClient/update_uptime_check_config.php b/owl-bot-staging/Monitoring/v3/samples/V3/UptimeCheckServiceClient/update_uptime_check_config.php deleted file mode 100644 index cdef12857a2e..000000000000 --- a/owl-bot-staging/Monitoring/v3/samples/V3/UptimeCheckServiceClient/update_uptime_check_config.php +++ /dev/null @@ -1,62 +0,0 @@ -setUptimeCheckConfig($uptimeCheckConfig); - - // Call the API and handle any network failures. - try { - /** @var UptimeCheckConfig $response */ - $response = $uptimeCheckServiceClient->updateUptimeCheckConfig($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END monitoring_v3_generated_UptimeCheckService_UpdateUptimeCheckConfig_sync] diff --git a/owl-bot-staging/Monitoring/v3/src/V3/AlertPolicyServiceClient.php b/owl-bot-staging/Monitoring/v3/src/V3/AlertPolicyServiceClient.php deleted file mode 100644 index 66d3410ff0cb..000000000000 --- a/owl-bot-staging/Monitoring/v3/src/V3/AlertPolicyServiceClient.php +++ /dev/null @@ -1,34 +0,0 @@ - createAlertPolicyAsync(CreateAlertPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteAlertPolicyAsync(DeleteAlertPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface getAlertPolicyAsync(GetAlertPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface listAlertPoliciesAsync(ListAlertPoliciesRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateAlertPolicyAsync(UpdateAlertPolicyRequest $request, array $optionalArgs = []) - */ -final class AlertPolicyServiceClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.monitoring.v3.AlertPolicyService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'monitoring.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'monitoring.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - 'https://www.googleapis.com/auth/monitoring', - 'https://www.googleapis.com/auth/monitoring.read', - ]; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/alert_policy_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/alert_policy_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/alert_policy_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/alert_policy_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a alert_policy - * resource. - * - * @param string $project - * @param string $alertPolicy - * - * @return string The formatted alert_policy resource. - */ - public static function alertPolicyName(string $project, string $alertPolicy): string - { - return self::getPathTemplate('alertPolicy')->render([ - 'project' => $project, - 'alert_policy' => $alertPolicy, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * alert_policy_condition resource. - * - * @param string $project - * @param string $alertPolicy - * @param string $condition - * - * @return string The formatted alert_policy_condition resource. - */ - public static function alertPolicyConditionName(string $project, string $alertPolicy, string $condition): string - { - return self::getPathTemplate('alertPolicyCondition')->render([ - 'project' => $project, - 'alert_policy' => $alertPolicy, - 'condition' => $condition, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * folder_alert_policy resource. - * - * @param string $folder - * @param string $alertPolicy - * - * @return string The formatted folder_alert_policy resource. - */ - public static function folderAlertPolicyName(string $folder, string $alertPolicy): string - { - return self::getPathTemplate('folderAlertPolicy')->render([ - 'folder' => $folder, - 'alert_policy' => $alertPolicy, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * folder_alert_policy_condition resource. - * - * @param string $folder - * @param string $alertPolicy - * @param string $condition - * - * @return string The formatted folder_alert_policy_condition resource. - */ - public static function folderAlertPolicyConditionName(string $folder, string $alertPolicy, string $condition): string - { - return self::getPathTemplate('folderAlertPolicyCondition')->render([ - 'folder' => $folder, - 'alert_policy' => $alertPolicy, - 'condition' => $condition, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_alert_policy resource. - * - * @param string $organization - * @param string $alertPolicy - * - * @return string The formatted organization_alert_policy resource. - */ - public static function organizationAlertPolicyName(string $organization, string $alertPolicy): string - { - return self::getPathTemplate('organizationAlertPolicy')->render([ - 'organization' => $organization, - 'alert_policy' => $alertPolicy, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_alert_policy_condition resource. - * - * @param string $organization - * @param string $alertPolicy - * @param string $condition - * - * @return string The formatted organization_alert_policy_condition resource. - */ - public static function organizationAlertPolicyConditionName(string $organization, string $alertPolicy, string $condition): string - { - return self::getPathTemplate('organizationAlertPolicyCondition')->render([ - 'organization' => $organization, - 'alert_policy' => $alertPolicy, - 'condition' => $condition, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_alert_policy resource. - * - * @param string $project - * @param string $alertPolicy - * - * @return string The formatted project_alert_policy resource. - */ - public static function projectAlertPolicyName(string $project, string $alertPolicy): string - { - return self::getPathTemplate('projectAlertPolicy')->render([ - 'project' => $project, - 'alert_policy' => $alertPolicy, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_alert_policy_condition resource. - * - * @param string $project - * @param string $alertPolicy - * @param string $condition - * - * @return string The formatted project_alert_policy_condition resource. - */ - public static function projectAlertPolicyConditionName(string $project, string $alertPolicy, string $condition): string - { - return self::getPathTemplate('projectAlertPolicyCondition')->render([ - 'project' => $project, - 'alert_policy' => $alertPolicy, - 'condition' => $condition, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - alertPolicy: projects/{project}/alertPolicies/{alert_policy} - * - alertPolicyCondition: projects/{project}/alertPolicies/{alert_policy}/conditions/{condition} - * - folderAlertPolicy: folders/{folder}/alertPolicies/{alert_policy} - * - folderAlertPolicyCondition: folders/{folder}/alertPolicies/{alert_policy}/conditions/{condition} - * - organizationAlertPolicy: organizations/{organization}/alertPolicies/{alert_policy} - * - organizationAlertPolicyCondition: organizations/{organization}/alertPolicies/{alert_policy}/conditions/{condition} - * - projectAlertPolicy: projects/{project}/alertPolicies/{alert_policy} - * - projectAlertPolicyCondition: projects/{project}/alertPolicies/{alert_policy}/conditions/{condition} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param ?string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, ?string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'monitoring.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Creates a new alerting policy. - * - * Design your application to single-thread API calls that modify the state of - * alerting policies in a single project. This includes calls to - * CreateAlertPolicy, DeleteAlertPolicy and UpdateAlertPolicy. - * - * The async variant is {@see AlertPolicyServiceClient::createAlertPolicyAsync()} . - * - * @example samples/V3/AlertPolicyServiceClient/create_alert_policy.php - * - * @param CreateAlertPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return AlertPolicy - * - * @throws ApiException Thrown if the API call fails. - */ - public function createAlertPolicy(CreateAlertPolicyRequest $request, array $callOptions = []): AlertPolicy - { - return $this->startApiCall('CreateAlertPolicy', $request, $callOptions)->wait(); - } - - /** - * Deletes an alerting policy. - * - * Design your application to single-thread API calls that modify the state of - * alerting policies in a single project. This includes calls to - * CreateAlertPolicy, DeleteAlertPolicy and UpdateAlertPolicy. - * - * The async variant is {@see AlertPolicyServiceClient::deleteAlertPolicyAsync()} . - * - * @example samples/V3/AlertPolicyServiceClient/delete_alert_policy.php - * - * @param DeleteAlertPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteAlertPolicy(DeleteAlertPolicyRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteAlertPolicy', $request, $callOptions)->wait(); - } - - /** - * Gets a single alerting policy. - * - * The async variant is {@see AlertPolicyServiceClient::getAlertPolicyAsync()} . - * - * @example samples/V3/AlertPolicyServiceClient/get_alert_policy.php - * - * @param GetAlertPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return AlertPolicy - * - * @throws ApiException Thrown if the API call fails. - */ - public function getAlertPolicy(GetAlertPolicyRequest $request, array $callOptions = []): AlertPolicy - { - return $this->startApiCall('GetAlertPolicy', $request, $callOptions)->wait(); - } - - /** - * Lists the existing alerting policies for the workspace. - * - * The async variant is {@see AlertPolicyServiceClient::listAlertPoliciesAsync()} . - * - * @example samples/V3/AlertPolicyServiceClient/list_alert_policies.php - * - * @param ListAlertPoliciesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listAlertPolicies(ListAlertPoliciesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListAlertPolicies', $request, $callOptions); - } - - /** - * Updates an alerting policy. You can either replace the entire policy with - * a new one or replace only certain fields in the current alerting policy by - * specifying the fields to be updated via `updateMask`. Returns the - * updated alerting policy. - * - * Design your application to single-thread API calls that modify the state of - * alerting policies in a single project. This includes calls to - * CreateAlertPolicy, DeleteAlertPolicy and UpdateAlertPolicy. - * - * The async variant is {@see AlertPolicyServiceClient::updateAlertPolicyAsync()} . - * - * @example samples/V3/AlertPolicyServiceClient/update_alert_policy.php - * - * @param UpdateAlertPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return AlertPolicy - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateAlertPolicy(UpdateAlertPolicyRequest $request, array $callOptions = []): AlertPolicy - { - return $this->startApiCall('UpdateAlertPolicy', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/Monitoring/v3/src/V3/Client/GroupServiceClient.php b/owl-bot-staging/Monitoring/v3/src/V3/Client/GroupServiceClient.php deleted file mode 100644 index 5300fa582fd7..000000000000 --- a/owl-bot-staging/Monitoring/v3/src/V3/Client/GroupServiceClient.php +++ /dev/null @@ -1,448 +0,0 @@ - createGroupAsync(CreateGroupRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteGroupAsync(DeleteGroupRequest $request, array $optionalArgs = []) - * @method PromiseInterface getGroupAsync(GetGroupRequest $request, array $optionalArgs = []) - * @method PromiseInterface listGroupMembersAsync(ListGroupMembersRequest $request, array $optionalArgs = []) - * @method PromiseInterface listGroupsAsync(ListGroupsRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateGroupAsync(UpdateGroupRequest $request, array $optionalArgs = []) - */ -final class GroupServiceClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.monitoring.v3.GroupService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'monitoring.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'monitoring.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - 'https://www.googleapis.com/auth/monitoring', - 'https://www.googleapis.com/auth/monitoring.read', - ]; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/group_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/group_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/group_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/group_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a folder_group - * resource. - * - * @param string $folder - * @param string $group - * - * @return string The formatted folder_group resource. - */ - public static function folderGroupName(string $folder, string $group): string - { - return self::getPathTemplate('folderGroup')->render([ - 'folder' => $folder, - 'group' => $group, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a group - * resource. - * - * @param string $project - * @param string $group - * - * @return string The formatted group resource. - */ - public static function groupName(string $project, string $group): string - { - return self::getPathTemplate('group')->render([ - 'project' => $project, - 'group' => $group, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_group resource. - * - * @param string $organization - * @param string $group - * - * @return string The formatted organization_group resource. - */ - public static function organizationGroupName(string $organization, string $group): string - { - return self::getPathTemplate('organizationGroup')->render([ - 'organization' => $organization, - 'group' => $group, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_group resource. - * - * @param string $project - * @param string $group - * - * @return string The formatted project_group resource. - */ - public static function projectGroupName(string $project, string $group): string - { - return self::getPathTemplate('projectGroup')->render([ - 'project' => $project, - 'group' => $group, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - folderGroup: folders/{folder}/groups/{group} - * - group: projects/{project}/groups/{group} - * - organizationGroup: organizations/{organization}/groups/{group} - * - projectGroup: projects/{project}/groups/{group} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param ?string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, ?string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'monitoring.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Creates a new group. - * - * The async variant is {@see GroupServiceClient::createGroupAsync()} . - * - * @example samples/V3/GroupServiceClient/create_group.php - * - * @param CreateGroupRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Group - * - * @throws ApiException Thrown if the API call fails. - */ - public function createGroup(CreateGroupRequest $request, array $callOptions = []): Group - { - return $this->startApiCall('CreateGroup', $request, $callOptions)->wait(); - } - - /** - * Deletes an existing group. - * - * The async variant is {@see GroupServiceClient::deleteGroupAsync()} . - * - * @example samples/V3/GroupServiceClient/delete_group.php - * - * @param DeleteGroupRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteGroup(DeleteGroupRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteGroup', $request, $callOptions)->wait(); - } - - /** - * Gets a single group. - * - * The async variant is {@see GroupServiceClient::getGroupAsync()} . - * - * @example samples/V3/GroupServiceClient/get_group.php - * - * @param GetGroupRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Group - * - * @throws ApiException Thrown if the API call fails. - */ - public function getGroup(GetGroupRequest $request, array $callOptions = []): Group - { - return $this->startApiCall('GetGroup', $request, $callOptions)->wait(); - } - - /** - * Lists the monitored resources that are members of a group. - * - * The async variant is {@see GroupServiceClient::listGroupMembersAsync()} . - * - * @example samples/V3/GroupServiceClient/list_group_members.php - * - * @param ListGroupMembersRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listGroupMembers(ListGroupMembersRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListGroupMembers', $request, $callOptions); - } - - /** - * Lists the existing groups. - * - * The async variant is {@see GroupServiceClient::listGroupsAsync()} . - * - * @example samples/V3/GroupServiceClient/list_groups.php - * - * @param ListGroupsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listGroups(ListGroupsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListGroups', $request, $callOptions); - } - - /** - * Updates an existing group. - * You can change any group attributes except `name`. - * - * The async variant is {@see GroupServiceClient::updateGroupAsync()} . - * - * @example samples/V3/GroupServiceClient/update_group.php - * - * @param UpdateGroupRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Group - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateGroup(UpdateGroupRequest $request, array $callOptions = []): Group - { - return $this->startApiCall('UpdateGroup', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/Monitoring/v3/src/V3/Client/MetricServiceClient.php b/owl-bot-staging/Monitoring/v3/src/V3/Client/MetricServiceClient.php deleted file mode 100644 index 543c25b8c7d1..000000000000 --- a/owl-bot-staging/Monitoring/v3/src/V3/Client/MetricServiceClient.php +++ /dev/null @@ -1,679 +0,0 @@ - createMetricDescriptorAsync(CreateMetricDescriptorRequest $request, array $optionalArgs = []) - * @method PromiseInterface createServiceTimeSeriesAsync(CreateTimeSeriesRequest $request, array $optionalArgs = []) - * @method PromiseInterface createTimeSeriesAsync(CreateTimeSeriesRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteMetricDescriptorAsync(DeleteMetricDescriptorRequest $request, array $optionalArgs = []) - * @method PromiseInterface getMetricDescriptorAsync(GetMetricDescriptorRequest $request, array $optionalArgs = []) - * @method PromiseInterface getMonitoredResourceDescriptorAsync(GetMonitoredResourceDescriptorRequest $request, array $optionalArgs = []) - * @method PromiseInterface listMetricDescriptorsAsync(ListMetricDescriptorsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listMonitoredResourceDescriptorsAsync(ListMonitoredResourceDescriptorsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listTimeSeriesAsync(ListTimeSeriesRequest $request, array $optionalArgs = []) - */ -final class MetricServiceClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.monitoring.v3.MetricService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'monitoring.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'monitoring.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - 'https://www.googleapis.com/auth/monitoring', - 'https://www.googleapis.com/auth/monitoring.read', - 'https://www.googleapis.com/auth/monitoring.write', - ]; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/metric_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/metric_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/metric_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/metric_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a folder - * resource. - * - * @param string $folder - * - * @return string The formatted folder resource. - */ - public static function folderName(string $folder): string - { - return self::getPathTemplate('folder')->render([ - 'folder' => $folder, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * folder_metric_descriptor resource. - * - * @param string $folder - * @param string $metricDescriptor - * - * @return string The formatted folder_metric_descriptor resource. - */ - public static function folderMetricDescriptorName(string $folder, string $metricDescriptor): string - { - return self::getPathTemplate('folderMetricDescriptor')->render([ - 'folder' => $folder, - 'metric_descriptor' => $metricDescriptor, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * folder_monitored_resource_descriptor resource. - * - * @param string $folder - * @param string $monitoredResourceDescriptor - * - * @return string The formatted folder_monitored_resource_descriptor resource. - */ - public static function folderMonitoredResourceDescriptorName(string $folder, string $monitoredResourceDescriptor): string - { - return self::getPathTemplate('folderMonitoredResourceDescriptor')->render([ - 'folder' => $folder, - 'monitored_resource_descriptor' => $monitoredResourceDescriptor, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * metric_descriptor resource. - * - * @param string $project - * @param string $metricDescriptor - * - * @return string The formatted metric_descriptor resource. - */ - public static function metricDescriptorName(string $project, string $metricDescriptor): string - { - return self::getPathTemplate('metricDescriptor')->render([ - 'project' => $project, - 'metric_descriptor' => $metricDescriptor, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * monitored_resource_descriptor resource. - * - * @param string $project - * @param string $monitoredResourceDescriptor - * - * @return string The formatted monitored_resource_descriptor resource. - */ - public static function monitoredResourceDescriptorName(string $project, string $monitoredResourceDescriptor): string - { - return self::getPathTemplate('monitoredResourceDescriptor')->render([ - 'project' => $project, - 'monitored_resource_descriptor' => $monitoredResourceDescriptor, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a organization - * resource. - * - * @param string $organization - * - * @return string The formatted organization resource. - */ - public static function organizationName(string $organization): string - { - return self::getPathTemplate('organization')->render([ - 'organization' => $organization, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_metric_descriptor resource. - * - * @param string $organization - * @param string $metricDescriptor - * - * @return string The formatted organization_metric_descriptor resource. - */ - public static function organizationMetricDescriptorName(string $organization, string $metricDescriptor): string - { - return self::getPathTemplate('organizationMetricDescriptor')->render([ - 'organization' => $organization, - 'metric_descriptor' => $metricDescriptor, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_monitored_resource_descriptor resource. - * - * @param string $organization - * @param string $monitoredResourceDescriptor - * - * @return string The formatted organization_monitored_resource_descriptor resource. - */ - public static function organizationMonitoredResourceDescriptorName(string $organization, string $monitoredResourceDescriptor): string - { - return self::getPathTemplate('organizationMonitoredResourceDescriptor')->render([ - 'organization' => $organization, - 'monitored_resource_descriptor' => $monitoredResourceDescriptor, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a project - * resource. - * - * @param string $project - * - * @return string The formatted project resource. - */ - public static function projectName(string $project): string - { - return self::getPathTemplate('project')->render([ - 'project' => $project, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_metric_descriptor resource. - * - * @param string $project - * @param string $metricDescriptor - * - * @return string The formatted project_metric_descriptor resource. - */ - public static function projectMetricDescriptorName(string $project, string $metricDescriptor): string - { - return self::getPathTemplate('projectMetricDescriptor')->render([ - 'project' => $project, - 'metric_descriptor' => $metricDescriptor, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_monitored_resource_descriptor resource. - * - * @param string $project - * @param string $monitoredResourceDescriptor - * - * @return string The formatted project_monitored_resource_descriptor resource. - */ - public static function projectMonitoredResourceDescriptorName(string $project, string $monitoredResourceDescriptor): string - { - return self::getPathTemplate('projectMonitoredResourceDescriptor')->render([ - 'project' => $project, - 'monitored_resource_descriptor' => $monitoredResourceDescriptor, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a workspace - * resource. - * - * @param string $project - * - * @return string The formatted workspace resource. - */ - public static function workspaceName(string $project): string - { - return self::getPathTemplate('workspace')->render([ - 'project' => $project, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - folder: folders/{folder} - * - folderMetricDescriptor: folders/{folder}/metricDescriptors/{metric_descriptor=**} - * - folderMonitoredResourceDescriptor: folders/{folder}/monitoredResourceDescriptors/{monitored_resource_descriptor} - * - metricDescriptor: projects/{project}/metricDescriptors/{metric_descriptor=**} - * - monitoredResourceDescriptor: projects/{project}/monitoredResourceDescriptors/{monitored_resource_descriptor} - * - organization: organizations/{organization} - * - organizationMetricDescriptor: organizations/{organization}/metricDescriptors/{metric_descriptor=**} - * - organizationMonitoredResourceDescriptor: organizations/{organization}/monitoredResourceDescriptors/{monitored_resource_descriptor} - * - project: projects/{project} - * - projectMetricDescriptor: projects/{project}/metricDescriptors/{metric_descriptor=**} - * - projectMonitoredResourceDescriptor: projects/{project}/monitoredResourceDescriptors/{monitored_resource_descriptor} - * - workspace: projects/{project} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param ?string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, ?string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'monitoring.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Creates a new metric descriptor. - * The creation is executed asynchronously. - * User-created metric descriptors define - * [custom metrics](https://cloud.google.com/monitoring/custom-metrics). - * The metric descriptor is updated if it already exists, - * except that metric labels are never removed. - * - * The async variant is {@see MetricServiceClient::createMetricDescriptorAsync()} . - * - * @example samples/V3/MetricServiceClient/create_metric_descriptor.php - * - * @param CreateMetricDescriptorRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return MetricDescriptor - * - * @throws ApiException Thrown if the API call fails. - */ - public function createMetricDescriptor(CreateMetricDescriptorRequest $request, array $callOptions = []): MetricDescriptor - { - return $this->startApiCall('CreateMetricDescriptor', $request, $callOptions)->wait(); - } - - /** - * Creates or adds data to one or more service time series. A service time - * series is a time series for a metric from a Google Cloud service. The - * response is empty if all time series in the request were written. If any - * time series could not be written, a corresponding failure message is - * included in the error response. This endpoint rejects writes to - * user-defined metrics. - * This method is only for use by Google Cloud services. Use - * [projects.timeSeries.create][google.monitoring.v3.MetricService.CreateTimeSeries] - * instead. - * - * The async variant is {@see MetricServiceClient::createServiceTimeSeriesAsync()} - * . - * - * @example samples/V3/MetricServiceClient/create_service_time_series.php - * - * @param CreateTimeSeriesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException Thrown if the API call fails. - */ - public function createServiceTimeSeries(CreateTimeSeriesRequest $request, array $callOptions = []): void - { - $this->startApiCall('CreateServiceTimeSeries', $request, $callOptions)->wait(); - } - - /** - * Creates or adds data to one or more time series. - * The response is empty if all time series in the request were written. - * If any time series could not be written, a corresponding failure message is - * included in the error response. - * This method does not support - * [resource locations constraint of an organization - * policy](https://cloud.google.com/resource-manager/docs/organization-policy/defining-locations#setting_the_organization_policy). - * - * The async variant is {@see MetricServiceClient::createTimeSeriesAsync()} . - * - * @example samples/V3/MetricServiceClient/create_time_series.php - * - * @param CreateTimeSeriesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException Thrown if the API call fails. - */ - public function createTimeSeries(CreateTimeSeriesRequest $request, array $callOptions = []): void - { - $this->startApiCall('CreateTimeSeries', $request, $callOptions)->wait(); - } - - /** - * Deletes a metric descriptor. Only user-created - * [custom metrics](https://cloud.google.com/monitoring/custom-metrics) can be - * deleted. - * - * The async variant is {@see MetricServiceClient::deleteMetricDescriptorAsync()} . - * - * @example samples/V3/MetricServiceClient/delete_metric_descriptor.php - * - * @param DeleteMetricDescriptorRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteMetricDescriptor(DeleteMetricDescriptorRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteMetricDescriptor', $request, $callOptions)->wait(); - } - - /** - * Gets a single metric descriptor. - * - * The async variant is {@see MetricServiceClient::getMetricDescriptorAsync()} . - * - * @example samples/V3/MetricServiceClient/get_metric_descriptor.php - * - * @param GetMetricDescriptorRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return MetricDescriptor - * - * @throws ApiException Thrown if the API call fails. - */ - public function getMetricDescriptor(GetMetricDescriptorRequest $request, array $callOptions = []): MetricDescriptor - { - return $this->startApiCall('GetMetricDescriptor', $request, $callOptions)->wait(); - } - - /** - * Gets a single monitored resource descriptor. - * - * The async variant is - * {@see MetricServiceClient::getMonitoredResourceDescriptorAsync()} . - * - * @example samples/V3/MetricServiceClient/get_monitored_resource_descriptor.php - * - * @param GetMonitoredResourceDescriptorRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return MonitoredResourceDescriptor - * - * @throws ApiException Thrown if the API call fails. - */ - public function getMonitoredResourceDescriptor(GetMonitoredResourceDescriptorRequest $request, array $callOptions = []): MonitoredResourceDescriptor - { - return $this->startApiCall('GetMonitoredResourceDescriptor', $request, $callOptions)->wait(); - } - - /** - * Lists metric descriptors that match a filter. - * - * The async variant is {@see MetricServiceClient::listMetricDescriptorsAsync()} . - * - * @example samples/V3/MetricServiceClient/list_metric_descriptors.php - * - * @param ListMetricDescriptorsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listMetricDescriptors(ListMetricDescriptorsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListMetricDescriptors', $request, $callOptions); - } - - /** - * Lists monitored resource descriptors that match a filter. - * - * The async variant is - * {@see MetricServiceClient::listMonitoredResourceDescriptorsAsync()} . - * - * @example samples/V3/MetricServiceClient/list_monitored_resource_descriptors.php - * - * @param ListMonitoredResourceDescriptorsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listMonitoredResourceDescriptors(ListMonitoredResourceDescriptorsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListMonitoredResourceDescriptors', $request, $callOptions); - } - - /** - * Lists time series that match a filter. - * - * The async variant is {@see MetricServiceClient::listTimeSeriesAsync()} . - * - * @example samples/V3/MetricServiceClient/list_time_series.php - * - * @param ListTimeSeriesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listTimeSeries(ListTimeSeriesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListTimeSeries', $request, $callOptions); - } -} diff --git a/owl-bot-staging/Monitoring/v3/src/V3/Client/NotificationChannelServiceClient.php b/owl-bot-staging/Monitoring/v3/src/V3/Client/NotificationChannelServiceClient.php deleted file mode 100644 index 581afdc21244..000000000000 --- a/owl-bot-staging/Monitoring/v3/src/V3/Client/NotificationChannelServiceClient.php +++ /dev/null @@ -1,683 +0,0 @@ - createNotificationChannelAsync(CreateNotificationChannelRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteNotificationChannelAsync(DeleteNotificationChannelRequest $request, array $optionalArgs = []) - * @method PromiseInterface getNotificationChannelAsync(GetNotificationChannelRequest $request, array $optionalArgs = []) - * @method PromiseInterface getNotificationChannelDescriptorAsync(GetNotificationChannelDescriptorRequest $request, array $optionalArgs = []) - * @method PromiseInterface getNotificationChannelVerificationCodeAsync(GetNotificationChannelVerificationCodeRequest $request, array $optionalArgs = []) - * @method PromiseInterface listNotificationChannelDescriptorsAsync(ListNotificationChannelDescriptorsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listNotificationChannelsAsync(ListNotificationChannelsRequest $request, array $optionalArgs = []) - * @method PromiseInterface sendNotificationChannelVerificationCodeAsync(SendNotificationChannelVerificationCodeRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateNotificationChannelAsync(UpdateNotificationChannelRequest $request, array $optionalArgs = []) - * @method PromiseInterface verifyNotificationChannelAsync(VerifyNotificationChannelRequest $request, array $optionalArgs = []) - */ -final class NotificationChannelServiceClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.monitoring.v3.NotificationChannelService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'monitoring.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'monitoring.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - 'https://www.googleapis.com/auth/monitoring', - 'https://www.googleapis.com/auth/monitoring.read', - ]; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/notification_channel_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/notification_channel_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/notification_channel_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/notification_channel_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a - * folder_channel_descriptor resource. - * - * @param string $folder - * @param string $channelDescriptor - * - * @return string The formatted folder_channel_descriptor resource. - */ - public static function folderChannelDescriptorName(string $folder, string $channelDescriptor): string - { - return self::getPathTemplate('folderChannelDescriptor')->render([ - 'folder' => $folder, - 'channel_descriptor' => $channelDescriptor, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * folder_notification_channel resource. - * - * @param string $folder - * @param string $notificationChannel - * - * @return string The formatted folder_notification_channel resource. - */ - public static function folderNotificationChannelName(string $folder, string $notificationChannel): string - { - return self::getPathTemplate('folderNotificationChannel')->render([ - 'folder' => $folder, - 'notification_channel' => $notificationChannel, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * notification_channel resource. - * - * @param string $project - * @param string $notificationChannel - * - * @return string The formatted notification_channel resource. - */ - public static function notificationChannelName(string $project, string $notificationChannel): string - { - return self::getPathTemplate('notificationChannel')->render([ - 'project' => $project, - 'notification_channel' => $notificationChannel, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * notification_channel_descriptor resource. - * - * @param string $project - * @param string $channelDescriptor - * - * @return string The formatted notification_channel_descriptor resource. - */ - public static function notificationChannelDescriptorName(string $project, string $channelDescriptor): string - { - return self::getPathTemplate('notificationChannelDescriptor')->render([ - 'project' => $project, - 'channel_descriptor' => $channelDescriptor, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_channel_descriptor resource. - * - * @param string $organization - * @param string $channelDescriptor - * - * @return string The formatted organization_channel_descriptor resource. - */ - public static function organizationChannelDescriptorName(string $organization, string $channelDescriptor): string - { - return self::getPathTemplate('organizationChannelDescriptor')->render([ - 'organization' => $organization, - 'channel_descriptor' => $channelDescriptor, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_notification_channel resource. - * - * @param string $organization - * @param string $notificationChannel - * - * @return string The formatted organization_notification_channel resource. - */ - public static function organizationNotificationChannelName(string $organization, string $notificationChannel): string - { - return self::getPathTemplate('organizationNotificationChannel')->render([ - 'organization' => $organization, - 'notification_channel' => $notificationChannel, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_channel_descriptor resource. - * - * @param string $project - * @param string $channelDescriptor - * - * @return string The formatted project_channel_descriptor resource. - */ - public static function projectChannelDescriptorName(string $project, string $channelDescriptor): string - { - return self::getPathTemplate('projectChannelDescriptor')->render([ - 'project' => $project, - 'channel_descriptor' => $channelDescriptor, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_notification_channel resource. - * - * @param string $project - * @param string $notificationChannel - * - * @return string The formatted project_notification_channel resource. - */ - public static function projectNotificationChannelName(string $project, string $notificationChannel): string - { - return self::getPathTemplate('projectNotificationChannel')->render([ - 'project' => $project, - 'notification_channel' => $notificationChannel, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - folderChannelDescriptor: folders/{folder}/notificationChannelDescriptors/{channel_descriptor} - * - folderNotificationChannel: folders/{folder}/notificationChannels/{notification_channel} - * - notificationChannel: projects/{project}/notificationChannels/{notification_channel} - * - notificationChannelDescriptor: projects/{project}/notificationChannelDescriptors/{channel_descriptor} - * - organizationChannelDescriptor: organizations/{organization}/notificationChannelDescriptors/{channel_descriptor} - * - organizationNotificationChannel: organizations/{organization}/notificationChannels/{notification_channel} - * - projectChannelDescriptor: projects/{project}/notificationChannelDescriptors/{channel_descriptor} - * - projectNotificationChannel: projects/{project}/notificationChannels/{notification_channel} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param ?string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, ?string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'monitoring.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Creates a new notification channel, representing a single notification - * endpoint such as an email address, SMS number, or PagerDuty service. - * - * Design your application to single-thread API calls that modify the state of - * notification channels in a single project. This includes calls to - * CreateNotificationChannel, DeleteNotificationChannel and - * UpdateNotificationChannel. - * - * The async variant is - * {@see NotificationChannelServiceClient::createNotificationChannelAsync()} . - * - * @example samples/V3/NotificationChannelServiceClient/create_notification_channel.php - * - * @param CreateNotificationChannelRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return NotificationChannel - * - * @throws ApiException Thrown if the API call fails. - */ - public function createNotificationChannel(CreateNotificationChannelRequest $request, array $callOptions = []): NotificationChannel - { - return $this->startApiCall('CreateNotificationChannel', $request, $callOptions)->wait(); - } - - /** - * Deletes a notification channel. - * - * Design your application to single-thread API calls that modify the state of - * notification channels in a single project. This includes calls to - * CreateNotificationChannel, DeleteNotificationChannel and - * UpdateNotificationChannel. - * - * The async variant is - * {@see NotificationChannelServiceClient::deleteNotificationChannelAsync()} . - * - * @example samples/V3/NotificationChannelServiceClient/delete_notification_channel.php - * - * @param DeleteNotificationChannelRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteNotificationChannel(DeleteNotificationChannelRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteNotificationChannel', $request, $callOptions)->wait(); - } - - /** - * Gets a single notification channel. The channel includes the relevant - * configuration details with which the channel was created. However, the - * response may truncate or omit passwords, API keys, or other private key - * matter and thus the response may not be 100% identical to the information - * that was supplied in the call to the create method. - * - * The async variant is - * {@see NotificationChannelServiceClient::getNotificationChannelAsync()} . - * - * @example samples/V3/NotificationChannelServiceClient/get_notification_channel.php - * - * @param GetNotificationChannelRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return NotificationChannel - * - * @throws ApiException Thrown if the API call fails. - */ - public function getNotificationChannel(GetNotificationChannelRequest $request, array $callOptions = []): NotificationChannel - { - return $this->startApiCall('GetNotificationChannel', $request, $callOptions)->wait(); - } - - /** - * Gets a single channel descriptor. The descriptor indicates which fields - * are expected / permitted for a notification channel of the given type. - * - * The async variant is - * {@see NotificationChannelServiceClient::getNotificationChannelDescriptorAsync()} - * . - * - * @example samples/V3/NotificationChannelServiceClient/get_notification_channel_descriptor.php - * - * @param GetNotificationChannelDescriptorRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return NotificationChannelDescriptor - * - * @throws ApiException Thrown if the API call fails. - */ - public function getNotificationChannelDescriptor(GetNotificationChannelDescriptorRequest $request, array $callOptions = []): NotificationChannelDescriptor - { - return $this->startApiCall('GetNotificationChannelDescriptor', $request, $callOptions)->wait(); - } - - /** - * Requests a verification code for an already verified channel that can then - * be used in a call to VerifyNotificationChannel() on a different channel - * with an equivalent identity in the same or in a different project. This - * makes it possible to copy a channel between projects without requiring - * manual reverification of the channel. If the channel is not in the - * verified state, this method will fail (in other words, this may only be - * used if the SendNotificationChannelVerificationCode and - * VerifyNotificationChannel paths have already been used to put the given - * channel into the verified state). - * - * There is no guarantee that the verification codes returned by this method - * will be of a similar structure or form as the ones that are delivered - * to the channel via SendNotificationChannelVerificationCode; while - * VerifyNotificationChannel() will recognize both the codes delivered via - * SendNotificationChannelVerificationCode() and returned from - * GetNotificationChannelVerificationCode(), it is typically the case that - * the verification codes delivered via - * SendNotificationChannelVerificationCode() will be shorter and also - * have a shorter expiration (e.g. codes such as "G-123456") whereas - * GetVerificationCode() will typically return a much longer, websafe base - * 64 encoded string that has a longer expiration time. - * - * The async variant is - * {@see NotificationChannelServiceClient::getNotificationChannelVerificationCodeAsync()} - * . - * - * @example samples/V3/NotificationChannelServiceClient/get_notification_channel_verification_code.php - * - * @param GetNotificationChannelVerificationCodeRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return GetNotificationChannelVerificationCodeResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function getNotificationChannelVerificationCode(GetNotificationChannelVerificationCodeRequest $request, array $callOptions = []): GetNotificationChannelVerificationCodeResponse - { - return $this->startApiCall('GetNotificationChannelVerificationCode', $request, $callOptions)->wait(); - } - - /** - * Lists the descriptors for supported channel types. The use of descriptors - * makes it possible for new channel types to be dynamically added. - * - * The async variant is - * {@see NotificationChannelServiceClient::listNotificationChannelDescriptorsAsync()} - * . - * - * @example samples/V3/NotificationChannelServiceClient/list_notification_channel_descriptors.php - * - * @param ListNotificationChannelDescriptorsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listNotificationChannelDescriptors(ListNotificationChannelDescriptorsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListNotificationChannelDescriptors', $request, $callOptions); - } - - /** - * Lists the notification channels that have been created for the project. - * To list the types of notification channels that are supported, use - * the `ListNotificationChannelDescriptors` method. - * - * The async variant is - * {@see NotificationChannelServiceClient::listNotificationChannelsAsync()} . - * - * @example samples/V3/NotificationChannelServiceClient/list_notification_channels.php - * - * @param ListNotificationChannelsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listNotificationChannels(ListNotificationChannelsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListNotificationChannels', $request, $callOptions); - } - - /** - * Causes a verification code to be delivered to the channel. The code - * can then be supplied in `VerifyNotificationChannel` to verify the channel. - * - * The async variant is - * {@see NotificationChannelServiceClient::sendNotificationChannelVerificationCodeAsync()} - * . - * - * @example samples/V3/NotificationChannelServiceClient/send_notification_channel_verification_code.php - * - * @param SendNotificationChannelVerificationCodeRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException Thrown if the API call fails. - */ - public function sendNotificationChannelVerificationCode(SendNotificationChannelVerificationCodeRequest $request, array $callOptions = []): void - { - $this->startApiCall('SendNotificationChannelVerificationCode', $request, $callOptions)->wait(); - } - - /** - * Updates a notification channel. Fields not specified in the field mask - * remain unchanged. - * - * Design your application to single-thread API calls that modify the state of - * notification channels in a single project. This includes calls to - * CreateNotificationChannel, DeleteNotificationChannel and - * UpdateNotificationChannel. - * - * The async variant is - * {@see NotificationChannelServiceClient::updateNotificationChannelAsync()} . - * - * @example samples/V3/NotificationChannelServiceClient/update_notification_channel.php - * - * @param UpdateNotificationChannelRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return NotificationChannel - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateNotificationChannel(UpdateNotificationChannelRequest $request, array $callOptions = []): NotificationChannel - { - return $this->startApiCall('UpdateNotificationChannel', $request, $callOptions)->wait(); - } - - /** - * Verifies a `NotificationChannel` by proving receipt of the code - * delivered to the channel as a result of calling - * `SendNotificationChannelVerificationCode`. - * - * The async variant is - * {@see NotificationChannelServiceClient::verifyNotificationChannelAsync()} . - * - * @example samples/V3/NotificationChannelServiceClient/verify_notification_channel.php - * - * @param VerifyNotificationChannelRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return NotificationChannel - * - * @throws ApiException Thrown if the API call fails. - */ - public function verifyNotificationChannel(VerifyNotificationChannelRequest $request, array $callOptions = []): NotificationChannel - { - return $this->startApiCall('VerifyNotificationChannel', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/Monitoring/v3/src/V3/Client/QueryServiceClient.php b/owl-bot-staging/Monitoring/v3/src/V3/Client/QueryServiceClient.php deleted file mode 100644 index 15cb43e010f9..000000000000 --- a/owl-bot-staging/Monitoring/v3/src/V3/Client/QueryServiceClient.php +++ /dev/null @@ -1,197 +0,0 @@ - queryTimeSeriesAsync(QueryTimeSeriesRequest $request, array $optionalArgs = []) - */ -final class QueryServiceClient -{ - use GapicClientTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.monitoring.v3.QueryService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'monitoring.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'monitoring.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - 'https://www.googleapis.com/auth/monitoring', - 'https://www.googleapis.com/auth/monitoring.read', - ]; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/query_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/query_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/query_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/query_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'monitoring.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Queries time series using Monitoring Query Language. - * - * The async variant is {@see QueryServiceClient::queryTimeSeriesAsync()} . - * - * @example samples/V3/QueryServiceClient/query_time_series.php - * - * @param QueryTimeSeriesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function queryTimeSeries(QueryTimeSeriesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('QueryTimeSeries', $request, $callOptions); - } -} diff --git a/owl-bot-staging/Monitoring/v3/src/V3/Client/ServiceMonitoringServiceClient.php b/owl-bot-staging/Monitoring/v3/src/V3/Client/ServiceMonitoringServiceClient.php deleted file mode 100644 index 202598491b2c..000000000000 --- a/owl-bot-staging/Monitoring/v3/src/V3/Client/ServiceMonitoringServiceClient.php +++ /dev/null @@ -1,639 +0,0 @@ - createServiceAsync(CreateServiceRequest $request, array $optionalArgs = []) - * @method PromiseInterface createServiceLevelObjectiveAsync(CreateServiceLevelObjectiveRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteServiceAsync(DeleteServiceRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteServiceLevelObjectiveAsync(DeleteServiceLevelObjectiveRequest $request, array $optionalArgs = []) - * @method PromiseInterface getServiceAsync(GetServiceRequest $request, array $optionalArgs = []) - * @method PromiseInterface getServiceLevelObjectiveAsync(GetServiceLevelObjectiveRequest $request, array $optionalArgs = []) - * @method PromiseInterface listServiceLevelObjectivesAsync(ListServiceLevelObjectivesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listServicesAsync(ListServicesRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateServiceAsync(UpdateServiceRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateServiceLevelObjectiveAsync(UpdateServiceLevelObjectiveRequest $request, array $optionalArgs = []) - */ -final class ServiceMonitoringServiceClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.monitoring.v3.ServiceMonitoringService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'monitoring.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'monitoring.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - 'https://www.googleapis.com/auth/monitoring', - 'https://www.googleapis.com/auth/monitoring.read', - ]; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/service_monitoring_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/service_monitoring_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/service_monitoring_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/service_monitoring_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a - * folder_service resource. - * - * @param string $folder - * @param string $service - * - * @return string The formatted folder_service resource. - */ - public static function folderServiceName(string $folder, string $service): string - { - return self::getPathTemplate('folderService')->render([ - 'folder' => $folder, - 'service' => $service, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * folder_service_service_level_objective resource. - * - * @param string $folder - * @param string $service - * @param string $serviceLevelObjective - * - * @return string The formatted folder_service_service_level_objective resource. - */ - public static function folderServiceServiceLevelObjectiveName(string $folder, string $service, string $serviceLevelObjective): string - { - return self::getPathTemplate('folderServiceServiceLevelObjective')->render([ - 'folder' => $folder, - 'service' => $service, - 'service_level_objective' => $serviceLevelObjective, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_service resource. - * - * @param string $organization - * @param string $service - * - * @return string The formatted organization_service resource. - */ - public static function organizationServiceName(string $organization, string $service): string - { - return self::getPathTemplate('organizationService')->render([ - 'organization' => $organization, - 'service' => $service, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_service_service_level_objective resource. - * - * @param string $organization - * @param string $service - * @param string $serviceLevelObjective - * - * @return string The formatted organization_service_service_level_objective resource. - */ - public static function organizationServiceServiceLevelObjectiveName(string $organization, string $service, string $serviceLevelObjective): string - { - return self::getPathTemplate('organizationServiceServiceLevelObjective')->render([ - 'organization' => $organization, - 'service' => $service, - 'service_level_objective' => $serviceLevelObjective, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_service resource. - * - * @param string $project - * @param string $service - * - * @return string The formatted project_service resource. - */ - public static function projectServiceName(string $project, string $service): string - { - return self::getPathTemplate('projectService')->render([ - 'project' => $project, - 'service' => $service, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_service_service_level_objective resource. - * - * @param string $project - * @param string $service - * @param string $serviceLevelObjective - * - * @return string The formatted project_service_service_level_objective resource. - */ - public static function projectServiceServiceLevelObjectiveName(string $project, string $service, string $serviceLevelObjective): string - { - return self::getPathTemplate('projectServiceServiceLevelObjective')->render([ - 'project' => $project, - 'service' => $service, - 'service_level_objective' => $serviceLevelObjective, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a service - * resource. - * - * @param string $project - * @param string $service - * - * @return string The formatted service resource. - */ - public static function serviceName(string $project, string $service): string - { - return self::getPathTemplate('service')->render([ - 'project' => $project, - 'service' => $service, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * service_level_objective resource. - * - * @param string $project - * @param string $service - * @param string $serviceLevelObjective - * - * @return string The formatted service_level_objective resource. - */ - public static function serviceLevelObjectiveName(string $project, string $service, string $serviceLevelObjective): string - { - return self::getPathTemplate('serviceLevelObjective')->render([ - 'project' => $project, - 'service' => $service, - 'service_level_objective' => $serviceLevelObjective, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - folderService: folders/{folder}/services/{service} - * - folderServiceServiceLevelObjective: folders/{folder}/services/{service}/serviceLevelObjectives/{service_level_objective} - * - organizationService: organizations/{organization}/services/{service} - * - organizationServiceServiceLevelObjective: organizations/{organization}/services/{service}/serviceLevelObjectives/{service_level_objective} - * - projectService: projects/{project}/services/{service} - * - projectServiceServiceLevelObjective: projects/{project}/services/{service}/serviceLevelObjectives/{service_level_objective} - * - service: projects/{project}/services/{service} - * - serviceLevelObjective: projects/{project}/services/{service}/serviceLevelObjectives/{service_level_objective} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param ?string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, ?string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'monitoring.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Create a `Service`. - * - * The async variant is {@see ServiceMonitoringServiceClient::createServiceAsync()} - * . - * - * @example samples/V3/ServiceMonitoringServiceClient/create_service.php - * - * @param CreateServiceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Service - * - * @throws ApiException Thrown if the API call fails. - */ - public function createService(CreateServiceRequest $request, array $callOptions = []): Service - { - return $this->startApiCall('CreateService', $request, $callOptions)->wait(); - } - - /** - * Create a `ServiceLevelObjective` for the given `Service`. - * - * The async variant is - * {@see ServiceMonitoringServiceClient::createServiceLevelObjectiveAsync()} . - * - * @example samples/V3/ServiceMonitoringServiceClient/create_service_level_objective.php - * - * @param CreateServiceLevelObjectiveRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return ServiceLevelObjective - * - * @throws ApiException Thrown if the API call fails. - */ - public function createServiceLevelObjective(CreateServiceLevelObjectiveRequest $request, array $callOptions = []): ServiceLevelObjective - { - return $this->startApiCall('CreateServiceLevelObjective', $request, $callOptions)->wait(); - } - - /** - * Soft delete this `Service`. - * - * The async variant is {@see ServiceMonitoringServiceClient::deleteServiceAsync()} - * . - * - * @example samples/V3/ServiceMonitoringServiceClient/delete_service.php - * - * @param DeleteServiceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteService(DeleteServiceRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteService', $request, $callOptions)->wait(); - } - - /** - * Delete the given `ServiceLevelObjective`. - * - * The async variant is - * {@see ServiceMonitoringServiceClient::deleteServiceLevelObjectiveAsync()} . - * - * @example samples/V3/ServiceMonitoringServiceClient/delete_service_level_objective.php - * - * @param DeleteServiceLevelObjectiveRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteServiceLevelObjective(DeleteServiceLevelObjectiveRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteServiceLevelObjective', $request, $callOptions)->wait(); - } - - /** - * Get the named `Service`. - * - * The async variant is {@see ServiceMonitoringServiceClient::getServiceAsync()} . - * - * @example samples/V3/ServiceMonitoringServiceClient/get_service.php - * - * @param GetServiceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Service - * - * @throws ApiException Thrown if the API call fails. - */ - public function getService(GetServiceRequest $request, array $callOptions = []): Service - { - return $this->startApiCall('GetService', $request, $callOptions)->wait(); - } - - /** - * Get a `ServiceLevelObjective` by name. - * - * The async variant is - * {@see ServiceMonitoringServiceClient::getServiceLevelObjectiveAsync()} . - * - * @example samples/V3/ServiceMonitoringServiceClient/get_service_level_objective.php - * - * @param GetServiceLevelObjectiveRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return ServiceLevelObjective - * - * @throws ApiException Thrown if the API call fails. - */ - public function getServiceLevelObjective(GetServiceLevelObjectiveRequest $request, array $callOptions = []): ServiceLevelObjective - { - return $this->startApiCall('GetServiceLevelObjective', $request, $callOptions)->wait(); - } - - /** - * List the `ServiceLevelObjective`s for the given `Service`. - * - * The async variant is - * {@see ServiceMonitoringServiceClient::listServiceLevelObjectivesAsync()} . - * - * @example samples/V3/ServiceMonitoringServiceClient/list_service_level_objectives.php - * - * @param ListServiceLevelObjectivesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listServiceLevelObjectives(ListServiceLevelObjectivesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListServiceLevelObjectives', $request, $callOptions); - } - - /** - * List `Service`s for this Metrics Scope. - * - * The async variant is {@see ServiceMonitoringServiceClient::listServicesAsync()} - * . - * - * @example samples/V3/ServiceMonitoringServiceClient/list_services.php - * - * @param ListServicesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listServices(ListServicesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListServices', $request, $callOptions); - } - - /** - * Update this `Service`. - * - * The async variant is {@see ServiceMonitoringServiceClient::updateServiceAsync()} - * . - * - * @example samples/V3/ServiceMonitoringServiceClient/update_service.php - * - * @param UpdateServiceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Service - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateService(UpdateServiceRequest $request, array $callOptions = []): Service - { - return $this->startApiCall('UpdateService', $request, $callOptions)->wait(); - } - - /** - * Update the given `ServiceLevelObjective`. - * - * The async variant is - * {@see ServiceMonitoringServiceClient::updateServiceLevelObjectiveAsync()} . - * - * @example samples/V3/ServiceMonitoringServiceClient/update_service_level_objective.php - * - * @param UpdateServiceLevelObjectiveRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return ServiceLevelObjective - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateServiceLevelObjective(UpdateServiceLevelObjectiveRequest $request, array $callOptions = []): ServiceLevelObjective - { - return $this->startApiCall('UpdateServiceLevelObjective', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/Monitoring/v3/src/V3/Client/SnoozeServiceClient.php b/owl-bot-staging/Monitoring/v3/src/V3/Client/SnoozeServiceClient.php deleted file mode 100644 index 9c00f00b9cbe..000000000000 --- a/owl-bot-staging/Monitoring/v3/src/V3/Client/SnoozeServiceClient.php +++ /dev/null @@ -1,438 +0,0 @@ - createSnoozeAsync(CreateSnoozeRequest $request, array $optionalArgs = []) - * @method PromiseInterface getSnoozeAsync(GetSnoozeRequest $request, array $optionalArgs = []) - * @method PromiseInterface listSnoozesAsync(ListSnoozesRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateSnoozeAsync(UpdateSnoozeRequest $request, array $optionalArgs = []) - */ -final class SnoozeServiceClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.monitoring.v3.SnoozeService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'monitoring.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'monitoring.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - 'https://www.googleapis.com/auth/monitoring', - 'https://www.googleapis.com/auth/monitoring.read', - ]; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/snooze_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/snooze_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/snooze_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/snooze_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a alert_policy - * resource. - * - * @param string $project - * @param string $alertPolicy - * - * @return string The formatted alert_policy resource. - */ - public static function alertPolicyName(string $project, string $alertPolicy): string - { - return self::getPathTemplate('alertPolicy')->render([ - 'project' => $project, - 'alert_policy' => $alertPolicy, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * folder_alert_policy resource. - * - * @param string $folder - * @param string $alertPolicy - * - * @return string The formatted folder_alert_policy resource. - */ - public static function folderAlertPolicyName(string $folder, string $alertPolicy): string - { - return self::getPathTemplate('folderAlertPolicy')->render([ - 'folder' => $folder, - 'alert_policy' => $alertPolicy, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_alert_policy resource. - * - * @param string $organization - * @param string $alertPolicy - * - * @return string The formatted organization_alert_policy resource. - */ - public static function organizationAlertPolicyName(string $organization, string $alertPolicy): string - { - return self::getPathTemplate('organizationAlertPolicy')->render([ - 'organization' => $organization, - 'alert_policy' => $alertPolicy, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a project - * resource. - * - * @param string $project - * - * @return string The formatted project resource. - */ - public static function projectName(string $project): string - { - return self::getPathTemplate('project')->render([ - 'project' => $project, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_alert_policy resource. - * - * @param string $project - * @param string $alertPolicy - * - * @return string The formatted project_alert_policy resource. - */ - public static function projectAlertPolicyName(string $project, string $alertPolicy): string - { - return self::getPathTemplate('projectAlertPolicy')->render([ - 'project' => $project, - 'alert_policy' => $alertPolicy, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a snooze - * resource. - * - * @param string $project - * @param string $snooze - * - * @return string The formatted snooze resource. - */ - public static function snoozeName(string $project, string $snooze): string - { - return self::getPathTemplate('snooze')->render([ - 'project' => $project, - 'snooze' => $snooze, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a workspace - * resource. - * - * @param string $project - * - * @return string The formatted workspace resource. - */ - public static function workspaceName(string $project): string - { - return self::getPathTemplate('workspace')->render([ - 'project' => $project, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - alertPolicy: projects/{project}/alertPolicies/{alert_policy} - * - folderAlertPolicy: folders/{folder}/alertPolicies/{alert_policy} - * - organizationAlertPolicy: organizations/{organization}/alertPolicies/{alert_policy} - * - project: projects/{project} - * - projectAlertPolicy: projects/{project}/alertPolicies/{alert_policy} - * - snooze: projects/{project}/snoozes/{snooze} - * - workspace: projects/{project} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param ?string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, ?string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'monitoring.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Creates a `Snooze` that will prevent alerts, which match the provided - * criteria, from being opened. The `Snooze` applies for a specific time - * interval. - * - * The async variant is {@see SnoozeServiceClient::createSnoozeAsync()} . - * - * @example samples/V3/SnoozeServiceClient/create_snooze.php - * - * @param CreateSnoozeRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Snooze - * - * @throws ApiException Thrown if the API call fails. - */ - public function createSnooze(CreateSnoozeRequest $request, array $callOptions = []): Snooze - { - return $this->startApiCall('CreateSnooze', $request, $callOptions)->wait(); - } - - /** - * Retrieves a `Snooze` by `name`. - * - * The async variant is {@see SnoozeServiceClient::getSnoozeAsync()} . - * - * @example samples/V3/SnoozeServiceClient/get_snooze.php - * - * @param GetSnoozeRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Snooze - * - * @throws ApiException Thrown if the API call fails. - */ - public function getSnooze(GetSnoozeRequest $request, array $callOptions = []): Snooze - { - return $this->startApiCall('GetSnooze', $request, $callOptions)->wait(); - } - - /** - * Lists the `Snooze`s associated with a project. Can optionally pass in - * `filter`, which specifies predicates to match `Snooze`s. - * - * The async variant is {@see SnoozeServiceClient::listSnoozesAsync()} . - * - * @example samples/V3/SnoozeServiceClient/list_snoozes.php - * - * @param ListSnoozesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listSnoozes(ListSnoozesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListSnoozes', $request, $callOptions); - } - - /** - * Updates a `Snooze`, identified by its `name`, with the parameters in the - * given `Snooze` object. - * - * The async variant is {@see SnoozeServiceClient::updateSnoozeAsync()} . - * - * @example samples/V3/SnoozeServiceClient/update_snooze.php - * - * @param UpdateSnoozeRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Snooze - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateSnooze(UpdateSnoozeRequest $request, array $callOptions = []): Snooze - { - return $this->startApiCall('UpdateSnooze', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/Monitoring/v3/src/V3/Client/UptimeCheckServiceClient.php b/owl-bot-staging/Monitoring/v3/src/V3/Client/UptimeCheckServiceClient.php deleted file mode 100644 index 9915c1762ca3..000000000000 --- a/owl-bot-staging/Monitoring/v3/src/V3/Client/UptimeCheckServiceClient.php +++ /dev/null @@ -1,475 +0,0 @@ - createUptimeCheckConfigAsync(CreateUptimeCheckConfigRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteUptimeCheckConfigAsync(DeleteUptimeCheckConfigRequest $request, array $optionalArgs = []) - * @method PromiseInterface getUptimeCheckConfigAsync(GetUptimeCheckConfigRequest $request, array $optionalArgs = []) - * @method PromiseInterface listUptimeCheckConfigsAsync(ListUptimeCheckConfigsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listUptimeCheckIpsAsync(ListUptimeCheckIpsRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateUptimeCheckConfigAsync(UpdateUptimeCheckConfigRequest $request, array $optionalArgs = []) - */ -final class UptimeCheckServiceClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.monitoring.v3.UptimeCheckService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'monitoring.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'monitoring.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - 'https://www.googleapis.com/auth/monitoring', - 'https://www.googleapis.com/auth/monitoring.read', - ]; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/uptime_check_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/uptime_check_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/uptime_check_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/uptime_check_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a - * folder_uptime_check_config resource. - * - * @param string $folder - * @param string $uptimeCheckConfig - * - * @return string The formatted folder_uptime_check_config resource. - */ - public static function folderUptimeCheckConfigName(string $folder, string $uptimeCheckConfig): string - { - return self::getPathTemplate('folderUptimeCheckConfig')->render([ - 'folder' => $folder, - 'uptime_check_config' => $uptimeCheckConfig, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a function - * resource. - * - * @param string $project - * @param string $location - * @param string $function - * - * @return string The formatted function resource. - */ - public static function functionName(string $project, string $location, string $function): string - { - return self::getPathTemplate('function')->render([ - 'project' => $project, - 'location' => $location, - 'function' => $function, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_uptime_check_config resource. - * - * @param string $organization - * @param string $uptimeCheckConfig - * - * @return string The formatted organization_uptime_check_config resource. - */ - public static function organizationUptimeCheckConfigName(string $organization, string $uptimeCheckConfig): string - { - return self::getPathTemplate('organizationUptimeCheckConfig')->render([ - 'organization' => $organization, - 'uptime_check_config' => $uptimeCheckConfig, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_uptime_check_config resource. - * - * @param string $project - * @param string $uptimeCheckConfig - * - * @return string The formatted project_uptime_check_config resource. - */ - public static function projectUptimeCheckConfigName(string $project, string $uptimeCheckConfig): string - { - return self::getPathTemplate('projectUptimeCheckConfig')->render([ - 'project' => $project, - 'uptime_check_config' => $uptimeCheckConfig, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * uptime_check_config resource. - * - * @param string $project - * @param string $uptimeCheckConfig - * - * @return string The formatted uptime_check_config resource. - */ - public static function uptimeCheckConfigName(string $project, string $uptimeCheckConfig): string - { - return self::getPathTemplate('uptimeCheckConfig')->render([ - 'project' => $project, - 'uptime_check_config' => $uptimeCheckConfig, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - folderUptimeCheckConfig: folders/{folder}/uptimeCheckConfigs/{uptime_check_config} - * - function: projects/{project}/locations/{location}/functions/{function} - * - organizationUptimeCheckConfig: organizations/{organization}/uptimeCheckConfigs/{uptime_check_config} - * - projectUptimeCheckConfig: projects/{project}/uptimeCheckConfigs/{uptime_check_config} - * - uptimeCheckConfig: projects/{project}/uptimeCheckConfigs/{uptime_check_config} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param ?string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, ?string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'monitoring.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Creates a new Uptime check configuration. - * - * The async variant is - * {@see UptimeCheckServiceClient::createUptimeCheckConfigAsync()} . - * - * @example samples/V3/UptimeCheckServiceClient/create_uptime_check_config.php - * - * @param CreateUptimeCheckConfigRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return UptimeCheckConfig - * - * @throws ApiException Thrown if the API call fails. - */ - public function createUptimeCheckConfig(CreateUptimeCheckConfigRequest $request, array $callOptions = []): UptimeCheckConfig - { - return $this->startApiCall('CreateUptimeCheckConfig', $request, $callOptions)->wait(); - } - - /** - * Deletes an Uptime check configuration. Note that this method will fail - * if the Uptime check configuration is referenced by an alert policy or - * other dependent configs that would be rendered invalid by the deletion. - * - * The async variant is - * {@see UptimeCheckServiceClient::deleteUptimeCheckConfigAsync()} . - * - * @example samples/V3/UptimeCheckServiceClient/delete_uptime_check_config.php - * - * @param DeleteUptimeCheckConfigRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteUptimeCheckConfig(DeleteUptimeCheckConfigRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteUptimeCheckConfig', $request, $callOptions)->wait(); - } - - /** - * Gets a single Uptime check configuration. - * - * The async variant is - * {@see UptimeCheckServiceClient::getUptimeCheckConfigAsync()} . - * - * @example samples/V3/UptimeCheckServiceClient/get_uptime_check_config.php - * - * @param GetUptimeCheckConfigRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return UptimeCheckConfig - * - * @throws ApiException Thrown if the API call fails. - */ - public function getUptimeCheckConfig(GetUptimeCheckConfigRequest $request, array $callOptions = []): UptimeCheckConfig - { - return $this->startApiCall('GetUptimeCheckConfig', $request, $callOptions)->wait(); - } - - /** - * Lists the existing valid Uptime check configurations for the project - * (leaving out any invalid configurations). - * - * The async variant is - * {@see UptimeCheckServiceClient::listUptimeCheckConfigsAsync()} . - * - * @example samples/V3/UptimeCheckServiceClient/list_uptime_check_configs.php - * - * @param ListUptimeCheckConfigsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listUptimeCheckConfigs(ListUptimeCheckConfigsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListUptimeCheckConfigs', $request, $callOptions); - } - - /** - * Returns the list of IP addresses that checkers run from - * - * The async variant is {@see UptimeCheckServiceClient::listUptimeCheckIpsAsync()} - * . - * - * @example samples/V3/UptimeCheckServiceClient/list_uptime_check_ips.php - * - * @param ListUptimeCheckIpsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listUptimeCheckIps(ListUptimeCheckIpsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListUptimeCheckIps', $request, $callOptions); - } - - /** - * Updates an Uptime check configuration. You can either replace the entire - * configuration with a new one or replace only certain fields in the current - * configuration by specifying the fields to be updated via `updateMask`. - * Returns the updated configuration. - * - * The async variant is - * {@see UptimeCheckServiceClient::updateUptimeCheckConfigAsync()} . - * - * @example samples/V3/UptimeCheckServiceClient/update_uptime_check_config.php - * - * @param UpdateUptimeCheckConfigRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return UptimeCheckConfig - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateUptimeCheckConfig(UpdateUptimeCheckConfigRequest $request, array $callOptions = []): UptimeCheckConfig - { - return $this->startApiCall('UpdateUptimeCheckConfig', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/Monitoring/v3/src/V3/Gapic/AlertPolicyServiceGapicClient.php b/owl-bot-staging/Monitoring/v3/src/V3/Gapic/AlertPolicyServiceGapicClient.php deleted file mode 100644 index b45a031630d8..000000000000 --- a/owl-bot-staging/Monitoring/v3/src/V3/Gapic/AlertPolicyServiceGapicClient.php +++ /dev/null @@ -1,806 +0,0 @@ -createAlertPolicy($name, $alertPolicy); - * } finally { - * $alertPolicyServiceClient->close(); - * } - * ``` - * - * Many parameters require resource names to be formatted in a particular way. To - * assist with these names, this class includes a format method for each type of - * name, and additionally a parseName method to extract the individual identifiers - * contained within formatted names that are returned by the API. - * - * @deprecated Please use the new service client {@see \Google\Cloud\Monitoring\V3\Client\AlertPolicyServiceClient}. - */ -class AlertPolicyServiceGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.monitoring.v3.AlertPolicyService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - const SERVICE_ADDRESS = 'monitoring.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'monitoring.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - 'https://www.googleapis.com/auth/monitoring', - 'https://www.googleapis.com/auth/monitoring.read', - ]; - - private static $alertPolicyNameTemplate; - - private static $alertPolicyConditionNameTemplate; - - private static $folderAlertPolicyNameTemplate; - - private static $folderAlertPolicyConditionNameTemplate; - - private static $organizationAlertPolicyNameTemplate; - - private static $organizationAlertPolicyConditionNameTemplate; - - private static $projectAlertPolicyNameTemplate; - - private static $projectAlertPolicyConditionNameTemplate; - - private static $pathTemplateMap; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/alert_policy_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/alert_policy_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/alert_policy_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/alert_policy_service_rest_client_config.php', - ], - ], - ]; - } - - private static function getAlertPolicyNameTemplate() - { - if (self::$alertPolicyNameTemplate == null) { - self::$alertPolicyNameTemplate = new PathTemplate('projects/{project}/alertPolicies/{alert_policy}'); - } - - return self::$alertPolicyNameTemplate; - } - - private static function getAlertPolicyConditionNameTemplate() - { - if (self::$alertPolicyConditionNameTemplate == null) { - self::$alertPolicyConditionNameTemplate = new PathTemplate('projects/{project}/alertPolicies/{alert_policy}/conditions/{condition}'); - } - - return self::$alertPolicyConditionNameTemplate; - } - - private static function getFolderAlertPolicyNameTemplate() - { - if (self::$folderAlertPolicyNameTemplate == null) { - self::$folderAlertPolicyNameTemplate = new PathTemplate('folders/{folder}/alertPolicies/{alert_policy}'); - } - - return self::$folderAlertPolicyNameTemplate; - } - - private static function getFolderAlertPolicyConditionNameTemplate() - { - if (self::$folderAlertPolicyConditionNameTemplate == null) { - self::$folderAlertPolicyConditionNameTemplate = new PathTemplate('folders/{folder}/alertPolicies/{alert_policy}/conditions/{condition}'); - } - - return self::$folderAlertPolicyConditionNameTemplate; - } - - private static function getOrganizationAlertPolicyNameTemplate() - { - if (self::$organizationAlertPolicyNameTemplate == null) { - self::$organizationAlertPolicyNameTemplate = new PathTemplate('organizations/{organization}/alertPolicies/{alert_policy}'); - } - - return self::$organizationAlertPolicyNameTemplate; - } - - private static function getOrganizationAlertPolicyConditionNameTemplate() - { - if (self::$organizationAlertPolicyConditionNameTemplate == null) { - self::$organizationAlertPolicyConditionNameTemplate = new PathTemplate('organizations/{organization}/alertPolicies/{alert_policy}/conditions/{condition}'); - } - - return self::$organizationAlertPolicyConditionNameTemplate; - } - - private static function getProjectAlertPolicyNameTemplate() - { - if (self::$projectAlertPolicyNameTemplate == null) { - self::$projectAlertPolicyNameTemplate = new PathTemplate('projects/{project}/alertPolicies/{alert_policy}'); - } - - return self::$projectAlertPolicyNameTemplate; - } - - private static function getProjectAlertPolicyConditionNameTemplate() - { - if (self::$projectAlertPolicyConditionNameTemplate == null) { - self::$projectAlertPolicyConditionNameTemplate = new PathTemplate('projects/{project}/alertPolicies/{alert_policy}/conditions/{condition}'); - } - - return self::$projectAlertPolicyConditionNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'alertPolicy' => self::getAlertPolicyNameTemplate(), - 'alertPolicyCondition' => self::getAlertPolicyConditionNameTemplate(), - 'folderAlertPolicy' => self::getFolderAlertPolicyNameTemplate(), - 'folderAlertPolicyCondition' => self::getFolderAlertPolicyConditionNameTemplate(), - 'organizationAlertPolicy' => self::getOrganizationAlertPolicyNameTemplate(), - 'organizationAlertPolicyCondition' => self::getOrganizationAlertPolicyConditionNameTemplate(), - 'projectAlertPolicy' => self::getProjectAlertPolicyNameTemplate(), - 'projectAlertPolicyCondition' => self::getProjectAlertPolicyConditionNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a alert_policy - * resource. - * - * @param string $project - * @param string $alertPolicy - * - * @return string The formatted alert_policy resource. - */ - public static function alertPolicyName($project, $alertPolicy) - { - return self::getAlertPolicyNameTemplate()->render([ - 'project' => $project, - 'alert_policy' => $alertPolicy, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * alert_policy_condition resource. - * - * @param string $project - * @param string $alertPolicy - * @param string $condition - * - * @return string The formatted alert_policy_condition resource. - */ - public static function alertPolicyConditionName($project, $alertPolicy, $condition) - { - return self::getAlertPolicyConditionNameTemplate()->render([ - 'project' => $project, - 'alert_policy' => $alertPolicy, - 'condition' => $condition, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * folder_alert_policy resource. - * - * @param string $folder - * @param string $alertPolicy - * - * @return string The formatted folder_alert_policy resource. - */ - public static function folderAlertPolicyName($folder, $alertPolicy) - { - return self::getFolderAlertPolicyNameTemplate()->render([ - 'folder' => $folder, - 'alert_policy' => $alertPolicy, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * folder_alert_policy_condition resource. - * - * @param string $folder - * @param string $alertPolicy - * @param string $condition - * - * @return string The formatted folder_alert_policy_condition resource. - */ - public static function folderAlertPolicyConditionName($folder, $alertPolicy, $condition) - { - return self::getFolderAlertPolicyConditionNameTemplate()->render([ - 'folder' => $folder, - 'alert_policy' => $alertPolicy, - 'condition' => $condition, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_alert_policy resource. - * - * @param string $organization - * @param string $alertPolicy - * - * @return string The formatted organization_alert_policy resource. - */ - public static function organizationAlertPolicyName($organization, $alertPolicy) - { - return self::getOrganizationAlertPolicyNameTemplate()->render([ - 'organization' => $organization, - 'alert_policy' => $alertPolicy, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_alert_policy_condition resource. - * - * @param string $organization - * @param string $alertPolicy - * @param string $condition - * - * @return string The formatted organization_alert_policy_condition resource. - */ - public static function organizationAlertPolicyConditionName($organization, $alertPolicy, $condition) - { - return self::getOrganizationAlertPolicyConditionNameTemplate()->render([ - 'organization' => $organization, - 'alert_policy' => $alertPolicy, - 'condition' => $condition, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_alert_policy resource. - * - * @param string $project - * @param string $alertPolicy - * - * @return string The formatted project_alert_policy resource. - */ - public static function projectAlertPolicyName($project, $alertPolicy) - { - return self::getProjectAlertPolicyNameTemplate()->render([ - 'project' => $project, - 'alert_policy' => $alertPolicy, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_alert_policy_condition resource. - * - * @param string $project - * @param string $alertPolicy - * @param string $condition - * - * @return string The formatted project_alert_policy_condition resource. - */ - public static function projectAlertPolicyConditionName($project, $alertPolicy, $condition) - { - return self::getProjectAlertPolicyConditionNameTemplate()->render([ - 'project' => $project, - 'alert_policy' => $alertPolicy, - 'condition' => $condition, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - alertPolicy: projects/{project}/alertPolicies/{alert_policy} - * - alertPolicyCondition: projects/{project}/alertPolicies/{alert_policy}/conditions/{condition} - * - folderAlertPolicy: folders/{folder}/alertPolicies/{alert_policy} - * - folderAlertPolicyCondition: folders/{folder}/alertPolicies/{alert_policy}/conditions/{condition} - * - organizationAlertPolicy: organizations/{organization}/alertPolicies/{alert_policy} - * - organizationAlertPolicyCondition: organizations/{organization}/alertPolicies/{alert_policy}/conditions/{condition} - * - projectAlertPolicy: projects/{project}/alertPolicies/{alert_policy} - * - projectAlertPolicyCondition: projects/{project}/alertPolicies/{alert_policy}/conditions/{condition} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName($formattedName, $template = null) - { - $templateMap = self::getPathTemplateMap(); - if ($template) { - if (!isset($templateMap[$template])) { - throw new ValidationException("Template name $template does not exist"); - } - - return $templateMap[$template]->match($formattedName); - } - - foreach ($templateMap as $templateName => $pathTemplate) { - try { - return $pathTemplate->match($formattedName); - } catch (ValidationException $ex) { - // Swallow the exception to continue trying other path templates - } - } - - throw new ValidationException("Input did not match any known format. Input: $formattedName"); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'monitoring.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** - * Creates a new alerting policy. - * - * Design your application to single-thread API calls that modify the state of - * alerting policies in a single project. This includes calls to - * CreateAlertPolicy, DeleteAlertPolicy and UpdateAlertPolicy. - * - * Sample code: - * ``` - * $alertPolicyServiceClient = new AlertPolicyServiceClient(); - * try { - * $name = 'name'; - * $alertPolicy = new AlertPolicy(); - * $response = $alertPolicyServiceClient->createAlertPolicy($name, $alertPolicy); - * } finally { - * $alertPolicyServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The - * [project](https://cloud.google.com/monitoring/api/v3#project_name) in which - * to create the alerting policy. The format is: - * - * projects/[PROJECT_ID_OR_NUMBER] - * - * Note that this field names the parent container in which the alerting - * policy will be written, not the name of the created policy. |name| must be - * a host project of a Metrics Scope, otherwise INVALID_ARGUMENT error will - * return. The alerting policy that is returned will have a name that contains - * a normalized representation of this name as a prefix but adds a suffix of - * the form `/alertPolicies/[ALERT_POLICY_ID]`, identifying the policy in the - * container. - * @param AlertPolicy $alertPolicy Required. The requested alerting policy. You should omit the `name` field - * in this policy. The name will be returned in the new policy, including a - * new `[ALERT_POLICY_ID]` value. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Monitoring\V3\AlertPolicy - * - * @throws ApiException if the remote call fails - */ - public function createAlertPolicy($name, $alertPolicy, array $optionalArgs = []) - { - $request = new CreateAlertPolicyRequest(); - $requestParamHeaders = []; - $request->setName($name); - $request->setAlertPolicy($alertPolicy); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateAlertPolicy', AlertPolicy::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes an alerting policy. - * - * Design your application to single-thread API calls that modify the state of - * alerting policies in a single project. This includes calls to - * CreateAlertPolicy, DeleteAlertPolicy and UpdateAlertPolicy. - * - * Sample code: - * ``` - * $alertPolicyServiceClient = new AlertPolicyServiceClient(); - * try { - * $formattedName = $alertPolicyServiceClient->alertPolicyName('[PROJECT]', '[ALERT_POLICY]'); - * $alertPolicyServiceClient->deleteAlertPolicy($formattedName); - * } finally { - * $alertPolicyServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The alerting policy to delete. The format is: - * - * projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID] - * - * For more information, see [AlertPolicy][google.monitoring.v3.AlertPolicy]. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException if the remote call fails - */ - public function deleteAlertPolicy($name, array $optionalArgs = []) - { - $request = new DeleteAlertPolicyRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteAlertPolicy', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets a single alerting policy. - * - * Sample code: - * ``` - * $alertPolicyServiceClient = new AlertPolicyServiceClient(); - * try { - * $formattedName = $alertPolicyServiceClient->alertPolicyName('[PROJECT]', '[ALERT_POLICY]'); - * $response = $alertPolicyServiceClient->getAlertPolicy($formattedName); - * } finally { - * $alertPolicyServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The alerting policy to retrieve. The format is: - * - * projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID] - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Monitoring\V3\AlertPolicy - * - * @throws ApiException if the remote call fails - */ - public function getAlertPolicy($name, array $optionalArgs = []) - { - $request = new GetAlertPolicyRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetAlertPolicy', AlertPolicy::class, $optionalArgs, $request)->wait(); - } - - /** - * Lists the existing alerting policies for the workspace. - * - * Sample code: - * ``` - * $alertPolicyServiceClient = new AlertPolicyServiceClient(); - * try { - * $name = 'name'; - * // Iterate over pages of elements - * $pagedResponse = $alertPolicyServiceClient->listAlertPolicies($name); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $alertPolicyServiceClient->listAlertPolicies($name); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $alertPolicyServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The - * [project](https://cloud.google.com/monitoring/api/v3#project_name) whose - * alert policies are to be listed. The format is: - * - * projects/[PROJECT_ID_OR_NUMBER] - * - * Note that this field names the parent container in which the alerting - * policies to be listed are stored. To retrieve a single alerting policy - * by name, use the - * [GetAlertPolicy][google.monitoring.v3.AlertPolicyService.GetAlertPolicy] - * operation, instead. - * @param array $optionalArgs { - * Optional. - * - * @type string $filter - * Optional. If provided, this field specifies the criteria that must be met - * by alert policies to be included in the response. - * - * For more details, see [sorting and - * filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering). - * @type string $orderBy - * Optional. A comma-separated list of fields by which to sort the result. - * Supports the same set of field references as the `filter` field. Entries - * can be prefixed with a minus sign to sort by the field in descending order. - * - * For more details, see [sorting and - * filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering). - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listAlertPolicies($name, array $optionalArgs = []) - { - $request = new ListAlertPoliciesRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['orderBy'])) { - $request->setOrderBy($optionalArgs['orderBy']); - } - - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListAlertPolicies', $optionalArgs, ListAlertPoliciesResponse::class, $request); - } - - /** - * Updates an alerting policy. You can either replace the entire policy with - * a new one or replace only certain fields in the current alerting policy by - * specifying the fields to be updated via `updateMask`. Returns the - * updated alerting policy. - * - * Design your application to single-thread API calls that modify the state of - * alerting policies in a single project. This includes calls to - * CreateAlertPolicy, DeleteAlertPolicy and UpdateAlertPolicy. - * - * Sample code: - * ``` - * $alertPolicyServiceClient = new AlertPolicyServiceClient(); - * try { - * $alertPolicy = new AlertPolicy(); - * $response = $alertPolicyServiceClient->updateAlertPolicy($alertPolicy); - * } finally { - * $alertPolicyServiceClient->close(); - * } - * ``` - * - * @param AlertPolicy $alertPolicy Required. The updated alerting policy or the updated values for the - * fields listed in `update_mask`. - * If `update_mask` is not empty, any fields in this policy that are - * not in `update_mask` are ignored. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * Optional. A list of alerting policy field names. If this field is not - * empty, each listed field in the existing alerting policy is set to the - * value of the corresponding field in the supplied policy (`alert_policy`), - * or to the field's default value if the field is not in the supplied - * alerting policy. Fields not listed retain their previous value. - * - * Examples of valid field masks include `display_name`, `documentation`, - * `documentation.content`, `documentation.mime_type`, `user_labels`, - * `user_label.nameofkey`, `enabled`, `conditions`, `combiner`, etc. - * - * If this field is empty, then the supplied alerting policy replaces the - * existing policy. It is the same as deleting the existing policy and - * adding the supplied policy, except for the following: - * - * + The new policy will have the same `[ALERT_POLICY_ID]` as the former - * policy. This gives you continuity with the former policy in your - * notifications and incidents. - * + Conditions in the new policy will keep their former `[CONDITION_ID]` if - * the supplied condition includes the `name` field with that - * `[CONDITION_ID]`. If the supplied condition omits the `name` field, - * then a new `[CONDITION_ID]` is created. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Monitoring\V3\AlertPolicy - * - * @throws ApiException if the remote call fails - */ - public function updateAlertPolicy($alertPolicy, array $optionalArgs = []) - { - $request = new UpdateAlertPolicyRequest(); - $requestParamHeaders = []; - $request->setAlertPolicy($alertPolicy); - $requestParamHeaders['alert_policy.name'] = $alertPolicy->getName(); - if (isset($optionalArgs['updateMask'])) { - $request->setUpdateMask($optionalArgs['updateMask']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateAlertPolicy', AlertPolicy::class, $optionalArgs, $request)->wait(); - } -} diff --git a/owl-bot-staging/Monitoring/v3/src/V3/Gapic/GroupServiceGapicClient.php b/owl-bot-staging/Monitoring/v3/src/V3/Gapic/GroupServiceGapicClient.php deleted file mode 100644 index 04306c6bc04e..000000000000 --- a/owl-bot-staging/Monitoring/v3/src/V3/Gapic/GroupServiceGapicClient.php +++ /dev/null @@ -1,752 +0,0 @@ -createGroup($name, $group); - * } finally { - * $groupServiceClient->close(); - * } - * ``` - * - * Many parameters require resource names to be formatted in a particular way. To - * assist with these names, this class includes a format method for each type of - * name, and additionally a parseName method to extract the individual identifiers - * contained within formatted names that are returned by the API. - * - * @deprecated Please use the new service client {@see \Google\Cloud\Monitoring\V3\Client\GroupServiceClient}. - */ -class GroupServiceGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.monitoring.v3.GroupService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - const SERVICE_ADDRESS = 'monitoring.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'monitoring.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - 'https://www.googleapis.com/auth/monitoring', - 'https://www.googleapis.com/auth/monitoring.read', - ]; - - private static $folderGroupNameTemplate; - - private static $groupNameTemplate; - - private static $organizationGroupNameTemplate; - - private static $projectGroupNameTemplate; - - private static $pathTemplateMap; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/group_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/group_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/group_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/group_service_rest_client_config.php', - ], - ], - ]; - } - - private static function getFolderGroupNameTemplate() - { - if (self::$folderGroupNameTemplate == null) { - self::$folderGroupNameTemplate = new PathTemplate('folders/{folder}/groups/{group}'); - } - - return self::$folderGroupNameTemplate; - } - - private static function getGroupNameTemplate() - { - if (self::$groupNameTemplate == null) { - self::$groupNameTemplate = new PathTemplate('projects/{project}/groups/{group}'); - } - - return self::$groupNameTemplate; - } - - private static function getOrganizationGroupNameTemplate() - { - if (self::$organizationGroupNameTemplate == null) { - self::$organizationGroupNameTemplate = new PathTemplate('organizations/{organization}/groups/{group}'); - } - - return self::$organizationGroupNameTemplate; - } - - private static function getProjectGroupNameTemplate() - { - if (self::$projectGroupNameTemplate == null) { - self::$projectGroupNameTemplate = new PathTemplate('projects/{project}/groups/{group}'); - } - - return self::$projectGroupNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'folderGroup' => self::getFolderGroupNameTemplate(), - 'group' => self::getGroupNameTemplate(), - 'organizationGroup' => self::getOrganizationGroupNameTemplate(), - 'projectGroup' => self::getProjectGroupNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a folder_group - * resource. - * - * @param string $folder - * @param string $group - * - * @return string The formatted folder_group resource. - */ - public static function folderGroupName($folder, $group) - { - return self::getFolderGroupNameTemplate()->render([ - 'folder' => $folder, - 'group' => $group, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a group - * resource. - * - * @param string $project - * @param string $group - * - * @return string The formatted group resource. - */ - public static function groupName($project, $group) - { - return self::getGroupNameTemplate()->render([ - 'project' => $project, - 'group' => $group, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_group resource. - * - * @param string $organization - * @param string $group - * - * @return string The formatted organization_group resource. - */ - public static function organizationGroupName($organization, $group) - { - return self::getOrganizationGroupNameTemplate()->render([ - 'organization' => $organization, - 'group' => $group, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_group resource. - * - * @param string $project - * @param string $group - * - * @return string The formatted project_group resource. - */ - public static function projectGroupName($project, $group) - { - return self::getProjectGroupNameTemplate()->render([ - 'project' => $project, - 'group' => $group, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - folderGroup: folders/{folder}/groups/{group} - * - group: projects/{project}/groups/{group} - * - organizationGroup: organizations/{organization}/groups/{group} - * - projectGroup: projects/{project}/groups/{group} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName($formattedName, $template = null) - { - $templateMap = self::getPathTemplateMap(); - if ($template) { - if (!isset($templateMap[$template])) { - throw new ValidationException("Template name $template does not exist"); - } - - return $templateMap[$template]->match($formattedName); - } - - foreach ($templateMap as $templateName => $pathTemplate) { - try { - return $pathTemplate->match($formattedName); - } catch (ValidationException $ex) { - // Swallow the exception to continue trying other path templates - } - } - - throw new ValidationException("Input did not match any known format. Input: $formattedName"); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'monitoring.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** - * Creates a new group. - * - * Sample code: - * ``` - * $groupServiceClient = new GroupServiceClient(); - * try { - * $name = 'name'; - * $group = new Group(); - * $response = $groupServiceClient->createGroup($name, $group); - * } finally { - * $groupServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The - * [project](https://cloud.google.com/monitoring/api/v3#project_name) in which - * to create the group. The format is: - * - * projects/[PROJECT_ID_OR_NUMBER] - * @param Group $group Required. A group definition. It is an error to define the `name` field - * because the system assigns the name. - * @param array $optionalArgs { - * Optional. - * - * @type bool $validateOnly - * If true, validate this request but do not create the group. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Monitoring\V3\Group - * - * @throws ApiException if the remote call fails - */ - public function createGroup($name, $group, array $optionalArgs = []) - { - $request = new CreateGroupRequest(); - $requestParamHeaders = []; - $request->setName($name); - $request->setGroup($group); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['validateOnly'])) { - $request->setValidateOnly($optionalArgs['validateOnly']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateGroup', Group::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes an existing group. - * - * Sample code: - * ``` - * $groupServiceClient = new GroupServiceClient(); - * try { - * $formattedName = $groupServiceClient->groupName('[PROJECT]', '[GROUP]'); - * $groupServiceClient->deleteGroup($formattedName); - * } finally { - * $groupServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The group to delete. The format is: - * - * projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] - * @param array $optionalArgs { - * Optional. - * - * @type bool $recursive - * If this field is true, then the request means to delete a group with all - * its descendants. Otherwise, the request means to delete a group only when - * it has no descendants. The default value is false. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException if the remote call fails - */ - public function deleteGroup($name, array $optionalArgs = []) - { - $request = new DeleteGroupRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['recursive'])) { - $request->setRecursive($optionalArgs['recursive']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteGroup', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets a single group. - * - * Sample code: - * ``` - * $groupServiceClient = new GroupServiceClient(); - * try { - * $formattedName = $groupServiceClient->groupName('[PROJECT]', '[GROUP]'); - * $response = $groupServiceClient->getGroup($formattedName); - * } finally { - * $groupServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The group to retrieve. The format is: - * - * projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Monitoring\V3\Group - * - * @throws ApiException if the remote call fails - */ - public function getGroup($name, array $optionalArgs = []) - { - $request = new GetGroupRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetGroup', Group::class, $optionalArgs, $request)->wait(); - } - - /** - * Lists the monitored resources that are members of a group. - * - * Sample code: - * ``` - * $groupServiceClient = new GroupServiceClient(); - * try { - * $formattedName = $groupServiceClient->groupName('[PROJECT]', '[GROUP]'); - * // Iterate over pages of elements - * $pagedResponse = $groupServiceClient->listGroupMembers($formattedName); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $groupServiceClient->listGroupMembers($formattedName); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $groupServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The group whose members are listed. The format is: - * - * projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type string $filter - * An optional [list - * filter](https://cloud.google.com/monitoring/api/learn_more#filtering) - * describing the members to be returned. The filter may reference the type, - * labels, and metadata of monitored resources that comprise the group. For - * example, to return only resources representing Compute Engine VM instances, - * use this filter: - * - * `resource.type = "gce_instance"` - * @type TimeInterval $interval - * An optional time interval for which results should be returned. Only - * members that were part of the group during the specified interval are - * included in the response. If no interval is provided then the group - * membership over the last minute is returned. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listGroupMembers($name, array $optionalArgs = []) - { - $request = new ListGroupMembersRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['interval'])) { - $request->setInterval($optionalArgs['interval']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListGroupMembers', $optionalArgs, ListGroupMembersResponse::class, $request); - } - - /** - * Lists the existing groups. - * - * Sample code: - * ``` - * $groupServiceClient = new GroupServiceClient(); - * try { - * $name = 'name'; - * // Iterate over pages of elements - * $pagedResponse = $groupServiceClient->listGroups($name); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $groupServiceClient->listGroups($name); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $groupServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The - * [project](https://cloud.google.com/monitoring/api/v3#project_name) whose - * groups are to be listed. The format is: - * - * projects/[PROJECT_ID_OR_NUMBER] - * @param array $optionalArgs { - * Optional. - * - * @type string $childrenOfGroup - * A group name. The format is: - * - * projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] - * - * Returns groups whose `parent_name` field contains the group - * name. If no groups have this parent, the results are empty. - * @type string $ancestorsOfGroup - * A group name. The format is: - * - * projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] - * - * Returns groups that are ancestors of the specified group. - * The groups are returned in order, starting with the immediate parent and - * ending with the most distant ancestor. If the specified group has no - * immediate parent, the results are empty. - * @type string $descendantsOfGroup - * A group name. The format is: - * - * projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] - * - * Returns the descendants of the specified group. This is a superset of - * the results returned by the `children_of_group` filter, and includes - * children-of-children, and so forth. - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listGroups($name, array $optionalArgs = []) - { - $request = new ListGroupsRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['childrenOfGroup'])) { - $request->setChildrenOfGroup($optionalArgs['childrenOfGroup']); - } - - if (isset($optionalArgs['ancestorsOfGroup'])) { - $request->setAncestorsOfGroup($optionalArgs['ancestorsOfGroup']); - } - - if (isset($optionalArgs['descendantsOfGroup'])) { - $request->setDescendantsOfGroup($optionalArgs['descendantsOfGroup']); - } - - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListGroups', $optionalArgs, ListGroupsResponse::class, $request); - } - - /** - * Updates an existing group. - * You can change any group attributes except `name`. - * - * Sample code: - * ``` - * $groupServiceClient = new GroupServiceClient(); - * try { - * $group = new Group(); - * $response = $groupServiceClient->updateGroup($group); - * } finally { - * $groupServiceClient->close(); - * } - * ``` - * - * @param Group $group Required. The new definition of the group. All fields of the existing - * group, excepting `name`, are replaced with the corresponding fields of this - * group. - * @param array $optionalArgs { - * Optional. - * - * @type bool $validateOnly - * If true, validate this request but do not update the existing group. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Monitoring\V3\Group - * - * @throws ApiException if the remote call fails - */ - public function updateGroup($group, array $optionalArgs = []) - { - $request = new UpdateGroupRequest(); - $requestParamHeaders = []; - $request->setGroup($group); - $requestParamHeaders['group.name'] = $group->getName(); - if (isset($optionalArgs['validateOnly'])) { - $request->setValidateOnly($optionalArgs['validateOnly']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateGroup', Group::class, $optionalArgs, $request)->wait(); - } -} diff --git a/owl-bot-staging/Monitoring/v3/src/V3/Gapic/MetricServiceGapicClient.php b/owl-bot-staging/Monitoring/v3/src/V3/Gapic/MetricServiceGapicClient.php deleted file mode 100644 index ca5159847791..000000000000 --- a/owl-bot-staging/Monitoring/v3/src/V3/Gapic/MetricServiceGapicClient.php +++ /dev/null @@ -1,1178 +0,0 @@ -createMetricDescriptor($name, $metricDescriptor); - * } finally { - * $metricServiceClient->close(); - * } - * ``` - * - * Many parameters require resource names to be formatted in a particular way. To - * assist with these names, this class includes a format method for each type of - * name, and additionally a parseName method to extract the individual identifiers - * contained within formatted names that are returned by the API. - * - * @deprecated Please use the new service client {@see \Google\Cloud\Monitoring\V3\Client\MetricServiceClient}. - */ -class MetricServiceGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.monitoring.v3.MetricService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - const SERVICE_ADDRESS = 'monitoring.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'monitoring.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - 'https://www.googleapis.com/auth/monitoring', - 'https://www.googleapis.com/auth/monitoring.read', - 'https://www.googleapis.com/auth/monitoring.write', - ]; - - private static $folderNameTemplate; - - private static $folderMetricDescriptorNameTemplate; - - private static $folderMonitoredResourceDescriptorNameTemplate; - - private static $metricDescriptorNameTemplate; - - private static $monitoredResourceDescriptorNameTemplate; - - private static $organizationNameTemplate; - - private static $organizationMetricDescriptorNameTemplate; - - private static $organizationMonitoredResourceDescriptorNameTemplate; - - private static $projectNameTemplate; - - private static $projectMetricDescriptorNameTemplate; - - private static $projectMonitoredResourceDescriptorNameTemplate; - - private static $workspaceNameTemplate; - - private static $pathTemplateMap; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/metric_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/metric_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/metric_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/metric_service_rest_client_config.php', - ], - ], - ]; - } - - private static function getFolderNameTemplate() - { - if (self::$folderNameTemplate == null) { - self::$folderNameTemplate = new PathTemplate('folders/{folder}'); - } - - return self::$folderNameTemplate; - } - - private static function getFolderMetricDescriptorNameTemplate() - { - if (self::$folderMetricDescriptorNameTemplate == null) { - self::$folderMetricDescriptorNameTemplate = new PathTemplate('folders/{folder}/metricDescriptors/{metric_descriptor=**}'); - } - - return self::$folderMetricDescriptorNameTemplate; - } - - private static function getFolderMonitoredResourceDescriptorNameTemplate() - { - if (self::$folderMonitoredResourceDescriptorNameTemplate == null) { - self::$folderMonitoredResourceDescriptorNameTemplate = new PathTemplate('folders/{folder}/monitoredResourceDescriptors/{monitored_resource_descriptor}'); - } - - return self::$folderMonitoredResourceDescriptorNameTemplate; - } - - private static function getMetricDescriptorNameTemplate() - { - if (self::$metricDescriptorNameTemplate == null) { - self::$metricDescriptorNameTemplate = new PathTemplate('projects/{project}/metricDescriptors/{metric_descriptor=**}'); - } - - return self::$metricDescriptorNameTemplate; - } - - private static function getMonitoredResourceDescriptorNameTemplate() - { - if (self::$monitoredResourceDescriptorNameTemplate == null) { - self::$monitoredResourceDescriptorNameTemplate = new PathTemplate('projects/{project}/monitoredResourceDescriptors/{monitored_resource_descriptor}'); - } - - return self::$monitoredResourceDescriptorNameTemplate; - } - - private static function getOrganizationNameTemplate() - { - if (self::$organizationNameTemplate == null) { - self::$organizationNameTemplate = new PathTemplate('organizations/{organization}'); - } - - return self::$organizationNameTemplate; - } - - private static function getOrganizationMetricDescriptorNameTemplate() - { - if (self::$organizationMetricDescriptorNameTemplate == null) { - self::$organizationMetricDescriptorNameTemplate = new PathTemplate('organizations/{organization}/metricDescriptors/{metric_descriptor=**}'); - } - - return self::$organizationMetricDescriptorNameTemplate; - } - - private static function getOrganizationMonitoredResourceDescriptorNameTemplate() - { - if (self::$organizationMonitoredResourceDescriptorNameTemplate == null) { - self::$organizationMonitoredResourceDescriptorNameTemplate = new PathTemplate('organizations/{organization}/monitoredResourceDescriptors/{monitored_resource_descriptor}'); - } - - return self::$organizationMonitoredResourceDescriptorNameTemplate; - } - - private static function getProjectNameTemplate() - { - if (self::$projectNameTemplate == null) { - self::$projectNameTemplate = new PathTemplate('projects/{project}'); - } - - return self::$projectNameTemplate; - } - - private static function getProjectMetricDescriptorNameTemplate() - { - if (self::$projectMetricDescriptorNameTemplate == null) { - self::$projectMetricDescriptorNameTemplate = new PathTemplate('projects/{project}/metricDescriptors/{metric_descriptor=**}'); - } - - return self::$projectMetricDescriptorNameTemplate; - } - - private static function getProjectMonitoredResourceDescriptorNameTemplate() - { - if (self::$projectMonitoredResourceDescriptorNameTemplate == null) { - self::$projectMonitoredResourceDescriptorNameTemplate = new PathTemplate('projects/{project}/monitoredResourceDescriptors/{monitored_resource_descriptor}'); - } - - return self::$projectMonitoredResourceDescriptorNameTemplate; - } - - private static function getWorkspaceNameTemplate() - { - if (self::$workspaceNameTemplate == null) { - self::$workspaceNameTemplate = new PathTemplate('projects/{project}'); - } - - return self::$workspaceNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'folder' => self::getFolderNameTemplate(), - 'folderMetricDescriptor' => self::getFolderMetricDescriptorNameTemplate(), - 'folderMonitoredResourceDescriptor' => self::getFolderMonitoredResourceDescriptorNameTemplate(), - 'metricDescriptor' => self::getMetricDescriptorNameTemplate(), - 'monitoredResourceDescriptor' => self::getMonitoredResourceDescriptorNameTemplate(), - 'organization' => self::getOrganizationNameTemplate(), - 'organizationMetricDescriptor' => self::getOrganizationMetricDescriptorNameTemplate(), - 'organizationMonitoredResourceDescriptor' => self::getOrganizationMonitoredResourceDescriptorNameTemplate(), - 'project' => self::getProjectNameTemplate(), - 'projectMetricDescriptor' => self::getProjectMetricDescriptorNameTemplate(), - 'projectMonitoredResourceDescriptor' => self::getProjectMonitoredResourceDescriptorNameTemplate(), - 'workspace' => self::getWorkspaceNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a folder - * resource. - * - * @param string $folder - * - * @return string The formatted folder resource. - */ - public static function folderName($folder) - { - return self::getFolderNameTemplate()->render([ - 'folder' => $folder, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * folder_metric_descriptor resource. - * - * @param string $folder - * @param string $metricDescriptor - * - * @return string The formatted folder_metric_descriptor resource. - */ - public static function folderMetricDescriptorName($folder, $metricDescriptor) - { - return self::getFolderMetricDescriptorNameTemplate()->render([ - 'folder' => $folder, - 'metric_descriptor' => $metricDescriptor, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * folder_monitored_resource_descriptor resource. - * - * @param string $folder - * @param string $monitoredResourceDescriptor - * - * @return string The formatted folder_monitored_resource_descriptor resource. - */ - public static function folderMonitoredResourceDescriptorName($folder, $monitoredResourceDescriptor) - { - return self::getFolderMonitoredResourceDescriptorNameTemplate()->render([ - 'folder' => $folder, - 'monitored_resource_descriptor' => $monitoredResourceDescriptor, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * metric_descriptor resource. - * - * @param string $project - * @param string $metricDescriptor - * - * @return string The formatted metric_descriptor resource. - */ - public static function metricDescriptorName($project, $metricDescriptor) - { - return self::getMetricDescriptorNameTemplate()->render([ - 'project' => $project, - 'metric_descriptor' => $metricDescriptor, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * monitored_resource_descriptor resource. - * - * @param string $project - * @param string $monitoredResourceDescriptor - * - * @return string The formatted monitored_resource_descriptor resource. - */ - public static function monitoredResourceDescriptorName($project, $monitoredResourceDescriptor) - { - return self::getMonitoredResourceDescriptorNameTemplate()->render([ - 'project' => $project, - 'monitored_resource_descriptor' => $monitoredResourceDescriptor, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a organization - * resource. - * - * @param string $organization - * - * @return string The formatted organization resource. - */ - public static function organizationName($organization) - { - return self::getOrganizationNameTemplate()->render([ - 'organization' => $organization, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_metric_descriptor resource. - * - * @param string $organization - * @param string $metricDescriptor - * - * @return string The formatted organization_metric_descriptor resource. - */ - public static function organizationMetricDescriptorName($organization, $metricDescriptor) - { - return self::getOrganizationMetricDescriptorNameTemplate()->render([ - 'organization' => $organization, - 'metric_descriptor' => $metricDescriptor, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_monitored_resource_descriptor resource. - * - * @param string $organization - * @param string $monitoredResourceDescriptor - * - * @return string The formatted organization_monitored_resource_descriptor resource. - */ - public static function organizationMonitoredResourceDescriptorName($organization, $monitoredResourceDescriptor) - { - return self::getOrganizationMonitoredResourceDescriptorNameTemplate()->render([ - 'organization' => $organization, - 'monitored_resource_descriptor' => $monitoredResourceDescriptor, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a project - * resource. - * - * @param string $project - * - * @return string The formatted project resource. - */ - public static function projectName($project) - { - return self::getProjectNameTemplate()->render([ - 'project' => $project, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_metric_descriptor resource. - * - * @param string $project - * @param string $metricDescriptor - * - * @return string The formatted project_metric_descriptor resource. - */ - public static function projectMetricDescriptorName($project, $metricDescriptor) - { - return self::getProjectMetricDescriptorNameTemplate()->render([ - 'project' => $project, - 'metric_descriptor' => $metricDescriptor, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_monitored_resource_descriptor resource. - * - * @param string $project - * @param string $monitoredResourceDescriptor - * - * @return string The formatted project_monitored_resource_descriptor resource. - */ - public static function projectMonitoredResourceDescriptorName($project, $monitoredResourceDescriptor) - { - return self::getProjectMonitoredResourceDescriptorNameTemplate()->render([ - 'project' => $project, - 'monitored_resource_descriptor' => $monitoredResourceDescriptor, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a workspace - * resource. - * - * @param string $project - * - * @return string The formatted workspace resource. - */ - public static function workspaceName($project) - { - return self::getWorkspaceNameTemplate()->render([ - 'project' => $project, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - folder: folders/{folder} - * - folderMetricDescriptor: folders/{folder}/metricDescriptors/{metric_descriptor=**} - * - folderMonitoredResourceDescriptor: folders/{folder}/monitoredResourceDescriptors/{monitored_resource_descriptor} - * - metricDescriptor: projects/{project}/metricDescriptors/{metric_descriptor=**} - * - monitoredResourceDescriptor: projects/{project}/monitoredResourceDescriptors/{monitored_resource_descriptor} - * - organization: organizations/{organization} - * - organizationMetricDescriptor: organizations/{organization}/metricDescriptors/{metric_descriptor=**} - * - organizationMonitoredResourceDescriptor: organizations/{organization}/monitoredResourceDescriptors/{monitored_resource_descriptor} - * - project: projects/{project} - * - projectMetricDescriptor: projects/{project}/metricDescriptors/{metric_descriptor=**} - * - projectMonitoredResourceDescriptor: projects/{project}/monitoredResourceDescriptors/{monitored_resource_descriptor} - * - workspace: projects/{project} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName($formattedName, $template = null) - { - $templateMap = self::getPathTemplateMap(); - if ($template) { - if (!isset($templateMap[$template])) { - throw new ValidationException("Template name $template does not exist"); - } - - return $templateMap[$template]->match($formattedName); - } - - foreach ($templateMap as $templateName => $pathTemplate) { - try { - return $pathTemplate->match($formattedName); - } catch (ValidationException $ex) { - // Swallow the exception to continue trying other path templates - } - } - - throw new ValidationException("Input did not match any known format. Input: $formattedName"); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'monitoring.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** - * Creates a new metric descriptor. - * The creation is executed asynchronously. - * User-created metric descriptors define - * [custom metrics](https://cloud.google.com/monitoring/custom-metrics). - * The metric descriptor is updated if it already exists, - * except that metric labels are never removed. - * - * Sample code: - * ``` - * $metricServiceClient = new MetricServiceClient(); - * try { - * $name = 'name'; - * $metricDescriptor = new MetricDescriptor(); - * $response = $metricServiceClient->createMetricDescriptor($name, $metricDescriptor); - * } finally { - * $metricServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The - * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which - * to execute the request. The format is: - * 4 - * projects/[PROJECT_ID_OR_NUMBER] - * @param MetricDescriptor $metricDescriptor Required. The new [custom - * metric](https://cloud.google.com/monitoring/custom-metrics) descriptor. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Api\MetricDescriptor - * - * @throws ApiException if the remote call fails - */ - public function createMetricDescriptor($name, $metricDescriptor, array $optionalArgs = []) - { - $request = new CreateMetricDescriptorRequest(); - $requestParamHeaders = []; - $request->setName($name); - $request->setMetricDescriptor($metricDescriptor); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateMetricDescriptor', MetricDescriptor::class, $optionalArgs, $request)->wait(); - } - - /** - * Creates or adds data to one or more service time series. A service time - * series is a time series for a metric from a Google Cloud service. The - * response is empty if all time series in the request were written. If any - * time series could not be written, a corresponding failure message is - * included in the error response. This endpoint rejects writes to - * user-defined metrics. - * This method is only for use by Google Cloud services. Use - * [projects.timeSeries.create][google.monitoring.v3.MetricService.CreateTimeSeries] - * instead. - * - * Sample code: - * ``` - * $metricServiceClient = new MetricServiceClient(); - * try { - * $formattedName = $metricServiceClient->projectName('[PROJECT]'); - * $timeSeries = []; - * $metricServiceClient->createServiceTimeSeries($formattedName, $timeSeries); - * } finally { - * $metricServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The - * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which - * to execute the request. The format is: - * - * projects/[PROJECT_ID_OR_NUMBER] - * @param TimeSeries[] $timeSeries Required. The new data to be added to a list of time series. - * Adds at most one data point to each of several time series. The new data - * point must be more recent than any other point in its time series. Each - * `TimeSeries` value must fully specify a unique time series by supplying - * all label values for the metric and the monitored resource. - * - * The maximum number of `TimeSeries` objects per `Create` request is 200. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException if the remote call fails - */ - public function createServiceTimeSeries($name, $timeSeries, array $optionalArgs = []) - { - $request = new CreateTimeSeriesRequest(); - $requestParamHeaders = []; - $request->setName($name); - $request->setTimeSeries($timeSeries); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateServiceTimeSeries', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Creates or adds data to one or more time series. - * The response is empty if all time series in the request were written. - * If any time series could not be written, a corresponding failure message is - * included in the error response. - * This method does not support - * [resource locations constraint of an organization - * policy](https://cloud.google.com/resource-manager/docs/organization-policy/defining-locations#setting_the_organization_policy). - * - * Sample code: - * ``` - * $metricServiceClient = new MetricServiceClient(); - * try { - * $formattedName = $metricServiceClient->projectName('[PROJECT]'); - * $timeSeries = []; - * $metricServiceClient->createTimeSeries($formattedName, $timeSeries); - * } finally { - * $metricServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The - * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which - * to execute the request. The format is: - * - * projects/[PROJECT_ID_OR_NUMBER] - * @param TimeSeries[] $timeSeries Required. The new data to be added to a list of time series. - * Adds at most one data point to each of several time series. The new data - * point must be more recent than any other point in its time series. Each - * `TimeSeries` value must fully specify a unique time series by supplying - * all label values for the metric and the monitored resource. - * - * The maximum number of `TimeSeries` objects per `Create` request is 200. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException if the remote call fails - */ - public function createTimeSeries($name, $timeSeries, array $optionalArgs = []) - { - $request = new CreateTimeSeriesRequest(); - $requestParamHeaders = []; - $request->setName($name); - $request->setTimeSeries($timeSeries); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateTimeSeries', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes a metric descriptor. Only user-created - * [custom metrics](https://cloud.google.com/monitoring/custom-metrics) can be - * deleted. - * - * Sample code: - * ``` - * $metricServiceClient = new MetricServiceClient(); - * try { - * $formattedName = $metricServiceClient->metricDescriptorName('[PROJECT]', '[METRIC_DESCRIPTOR]'); - * $metricServiceClient->deleteMetricDescriptor($formattedName); - * } finally { - * $metricServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The metric descriptor on which to execute the request. The format - * is: - * - * projects/[PROJECT_ID_OR_NUMBER]/metricDescriptors/[METRIC_ID] - * - * An example of `[METRIC_ID]` is: - * `"custom.googleapis.com/my_test_metric"`. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException if the remote call fails - */ - public function deleteMetricDescriptor($name, array $optionalArgs = []) - { - $request = new DeleteMetricDescriptorRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteMetricDescriptor', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets a single metric descriptor. - * - * Sample code: - * ``` - * $metricServiceClient = new MetricServiceClient(); - * try { - * $formattedName = $metricServiceClient->metricDescriptorName('[PROJECT]', '[METRIC_DESCRIPTOR]'); - * $response = $metricServiceClient->getMetricDescriptor($formattedName); - * } finally { - * $metricServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The metric descriptor on which to execute the request. The format - * is: - * - * projects/[PROJECT_ID_OR_NUMBER]/metricDescriptors/[METRIC_ID] - * - * An example value of `[METRIC_ID]` is - * `"compute.googleapis.com/instance/disk/read_bytes_count"`. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Api\MetricDescriptor - * - * @throws ApiException if the remote call fails - */ - public function getMetricDescriptor($name, array $optionalArgs = []) - { - $request = new GetMetricDescriptorRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetMetricDescriptor', MetricDescriptor::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets a single monitored resource descriptor. - * - * Sample code: - * ``` - * $metricServiceClient = new MetricServiceClient(); - * try { - * $formattedName = $metricServiceClient->monitoredResourceDescriptorName('[PROJECT]', '[MONITORED_RESOURCE_DESCRIPTOR]'); - * $response = $metricServiceClient->getMonitoredResourceDescriptor($formattedName); - * } finally { - * $metricServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The monitored resource descriptor to get. The format is: - * - * projects/[PROJECT_ID_OR_NUMBER]/monitoredResourceDescriptors/[RESOURCE_TYPE] - * - * The `[RESOURCE_TYPE]` is a predefined type, such as - * `cloudsql_database`. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Api\MonitoredResourceDescriptor - * - * @throws ApiException if the remote call fails - */ - public function getMonitoredResourceDescriptor($name, array $optionalArgs = []) - { - $request = new GetMonitoredResourceDescriptorRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetMonitoredResourceDescriptor', MonitoredResourceDescriptor::class, $optionalArgs, $request)->wait(); - } - - /** - * Lists metric descriptors that match a filter. - * - * Sample code: - * ``` - * $metricServiceClient = new MetricServiceClient(); - * try { - * $name = 'name'; - * // Iterate over pages of elements - * $pagedResponse = $metricServiceClient->listMetricDescriptors($name); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $metricServiceClient->listMetricDescriptors($name); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $metricServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The - * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which - * to execute the request. The format is: - * - * projects/[PROJECT_ID_OR_NUMBER] - * @param array $optionalArgs { - * Optional. - * - * @type string $filter - * If this field is empty, all custom and - * system-defined metric descriptors are returned. - * Otherwise, the [filter](https://cloud.google.com/monitoring/api/v3/filters) - * specifies which metric descriptors are to be - * returned. For example, the following filter matches all - * [custom metrics](https://cloud.google.com/monitoring/custom-metrics): - * - * metric.type = starts_with("custom.googleapis.com/") - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listMetricDescriptors($name, array $optionalArgs = []) - { - $request = new ListMetricDescriptorsRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListMetricDescriptors', $optionalArgs, ListMetricDescriptorsResponse::class, $request); - } - - /** - * Lists monitored resource descriptors that match a filter. - * - * Sample code: - * ``` - * $metricServiceClient = new MetricServiceClient(); - * try { - * $name = 'name'; - * // Iterate over pages of elements - * $pagedResponse = $metricServiceClient->listMonitoredResourceDescriptors($name); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $metricServiceClient->listMonitoredResourceDescriptors($name); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $metricServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The - * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which - * to execute the request. The format is: - * - * projects/[PROJECT_ID_OR_NUMBER] - * @param array $optionalArgs { - * Optional. - * - * @type string $filter - * An optional [filter](https://cloud.google.com/monitoring/api/v3/filters) - * describing the descriptors to be returned. The filter can reference the - * descriptor's type and labels. For example, the following filter returns - * only Google Compute Engine descriptors that have an `id` label: - * - * resource.type = starts_with("gce_") AND resource.label:id - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listMonitoredResourceDescriptors($name, array $optionalArgs = []) - { - $request = new ListMonitoredResourceDescriptorsRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListMonitoredResourceDescriptors', $optionalArgs, ListMonitoredResourceDescriptorsResponse::class, $request); - } - - /** - * Lists time series that match a filter. - * - * Sample code: - * ``` - * $metricServiceClient = new MetricServiceClient(); - * try { - * $formattedName = $metricServiceClient->workspaceName('[PROJECT]'); - * $filter = 'filter'; - * $interval = new TimeInterval(); - * $view = TimeSeriesView::FULL; - * // Iterate over pages of elements - * $pagedResponse = $metricServiceClient->listTimeSeries($formattedName, $filter, $interval, $view); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $metricServiceClient->listTimeSeries($formattedName, $filter, $interval, $view); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $metricServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The - * [project](https://cloud.google.com/monitoring/api/v3#project_name), - * organization or folder on which to execute the request. The format is: - * - * projects/[PROJECT_ID_OR_NUMBER] - * organizations/[ORGANIZATION_ID] - * folders/[FOLDER_ID] - * @param string $filter Required. A [monitoring - * filter](https://cloud.google.com/monitoring/api/v3/filters) that specifies - * which time series should be returned. The filter must specify a single - * metric type, and can additionally specify metric labels and other - * information. For example: - * - * metric.type = "compute.googleapis.com/instance/cpu/usage_time" AND - * metric.labels.instance_name = "my-instance-name" - * @param TimeInterval $interval Required. The time interval for which results should be returned. Only time - * series that contain data points in the specified interval are included in - * the response. - * @param int $view Required. Specifies which information is returned about the time series. - * For allowed values, use constants defined on {@see \Google\Cloud\Monitoring\V3\ListTimeSeriesRequest\TimeSeriesView} - * @param array $optionalArgs { - * Optional. - * - * @type Aggregation $aggregation - * Specifies the alignment of data points in individual time series as - * well as how to combine the retrieved time series across specified labels. - * - * By default (if no `aggregation` is explicitly specified), the raw time - * series data is returned. - * @type Aggregation $secondaryAggregation - * Apply a second aggregation after `aggregation` is applied. May only be - * specified if `aggregation` is specified. - * @type string $orderBy - * Unsupported: must be left blank. The points in each time series are - * currently returned in reverse time order (most recent to oldest). - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listTimeSeries($name, $filter, $interval, $view, array $optionalArgs = []) - { - $request = new ListTimeSeriesRequest(); - $requestParamHeaders = []; - $request->setName($name); - $request->setFilter($filter); - $request->setInterval($interval); - $request->setView($view); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['aggregation'])) { - $request->setAggregation($optionalArgs['aggregation']); - } - - if (isset($optionalArgs['secondaryAggregation'])) { - $request->setSecondaryAggregation($optionalArgs['secondaryAggregation']); - } - - if (isset($optionalArgs['orderBy'])) { - $request->setOrderBy($optionalArgs['orderBy']); - } - - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListTimeSeries', $optionalArgs, ListTimeSeriesResponse::class, $request); - } -} diff --git a/owl-bot-staging/Monitoring/v3/src/V3/Gapic/NotificationChannelServiceGapicClient.php b/owl-bot-staging/Monitoring/v3/src/V3/Gapic/NotificationChannelServiceGapicClient.php deleted file mode 100644 index 75cf9393bd47..000000000000 --- a/owl-bot-staging/Monitoring/v3/src/V3/Gapic/NotificationChannelServiceGapicClient.php +++ /dev/null @@ -1,1075 +0,0 @@ -createNotificationChannel($name, $notificationChannel); - * } finally { - * $notificationChannelServiceClient->close(); - * } - * ``` - * - * Many parameters require resource names to be formatted in a particular way. To - * assist with these names, this class includes a format method for each type of - * name, and additionally a parseName method to extract the individual identifiers - * contained within formatted names that are returned by the API. - * - * @deprecated Please use the new service client {@see \Google\Cloud\Monitoring\V3\Client\NotificationChannelServiceClient}. - */ -class NotificationChannelServiceGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.monitoring.v3.NotificationChannelService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - const SERVICE_ADDRESS = 'monitoring.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'monitoring.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - 'https://www.googleapis.com/auth/monitoring', - 'https://www.googleapis.com/auth/monitoring.read', - ]; - - private static $folderChannelDescriptorNameTemplate; - - private static $folderNotificationChannelNameTemplate; - - private static $notificationChannelNameTemplate; - - private static $notificationChannelDescriptorNameTemplate; - - private static $organizationChannelDescriptorNameTemplate; - - private static $organizationNotificationChannelNameTemplate; - - private static $projectChannelDescriptorNameTemplate; - - private static $projectNotificationChannelNameTemplate; - - private static $pathTemplateMap; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/notification_channel_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/notification_channel_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/notification_channel_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/notification_channel_service_rest_client_config.php', - ], - ], - ]; - } - - private static function getFolderChannelDescriptorNameTemplate() - { - if (self::$folderChannelDescriptorNameTemplate == null) { - self::$folderChannelDescriptorNameTemplate = new PathTemplate('folders/{folder}/notificationChannelDescriptors/{channel_descriptor}'); - } - - return self::$folderChannelDescriptorNameTemplate; - } - - private static function getFolderNotificationChannelNameTemplate() - { - if (self::$folderNotificationChannelNameTemplate == null) { - self::$folderNotificationChannelNameTemplate = new PathTemplate('folders/{folder}/notificationChannels/{notification_channel}'); - } - - return self::$folderNotificationChannelNameTemplate; - } - - private static function getNotificationChannelNameTemplate() - { - if (self::$notificationChannelNameTemplate == null) { - self::$notificationChannelNameTemplate = new PathTemplate('projects/{project}/notificationChannels/{notification_channel}'); - } - - return self::$notificationChannelNameTemplate; - } - - private static function getNotificationChannelDescriptorNameTemplate() - { - if (self::$notificationChannelDescriptorNameTemplate == null) { - self::$notificationChannelDescriptorNameTemplate = new PathTemplate('projects/{project}/notificationChannelDescriptors/{channel_descriptor}'); - } - - return self::$notificationChannelDescriptorNameTemplate; - } - - private static function getOrganizationChannelDescriptorNameTemplate() - { - if (self::$organizationChannelDescriptorNameTemplate == null) { - self::$organizationChannelDescriptorNameTemplate = new PathTemplate('organizations/{organization}/notificationChannelDescriptors/{channel_descriptor}'); - } - - return self::$organizationChannelDescriptorNameTemplate; - } - - private static function getOrganizationNotificationChannelNameTemplate() - { - if (self::$organizationNotificationChannelNameTemplate == null) { - self::$organizationNotificationChannelNameTemplate = new PathTemplate('organizations/{organization}/notificationChannels/{notification_channel}'); - } - - return self::$organizationNotificationChannelNameTemplate; - } - - private static function getProjectChannelDescriptorNameTemplate() - { - if (self::$projectChannelDescriptorNameTemplate == null) { - self::$projectChannelDescriptorNameTemplate = new PathTemplate('projects/{project}/notificationChannelDescriptors/{channel_descriptor}'); - } - - return self::$projectChannelDescriptorNameTemplate; - } - - private static function getProjectNotificationChannelNameTemplate() - { - if (self::$projectNotificationChannelNameTemplate == null) { - self::$projectNotificationChannelNameTemplate = new PathTemplate('projects/{project}/notificationChannels/{notification_channel}'); - } - - return self::$projectNotificationChannelNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'folderChannelDescriptor' => self::getFolderChannelDescriptorNameTemplate(), - 'folderNotificationChannel' => self::getFolderNotificationChannelNameTemplate(), - 'notificationChannel' => self::getNotificationChannelNameTemplate(), - 'notificationChannelDescriptor' => self::getNotificationChannelDescriptorNameTemplate(), - 'organizationChannelDescriptor' => self::getOrganizationChannelDescriptorNameTemplate(), - 'organizationNotificationChannel' => self::getOrganizationNotificationChannelNameTemplate(), - 'projectChannelDescriptor' => self::getProjectChannelDescriptorNameTemplate(), - 'projectNotificationChannel' => self::getProjectNotificationChannelNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a - * folder_channel_descriptor resource. - * - * @param string $folder - * @param string $channelDescriptor - * - * @return string The formatted folder_channel_descriptor resource. - */ - public static function folderChannelDescriptorName($folder, $channelDescriptor) - { - return self::getFolderChannelDescriptorNameTemplate()->render([ - 'folder' => $folder, - 'channel_descriptor' => $channelDescriptor, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * folder_notification_channel resource. - * - * @param string $folder - * @param string $notificationChannel - * - * @return string The formatted folder_notification_channel resource. - */ - public static function folderNotificationChannelName($folder, $notificationChannel) - { - return self::getFolderNotificationChannelNameTemplate()->render([ - 'folder' => $folder, - 'notification_channel' => $notificationChannel, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * notification_channel resource. - * - * @param string $project - * @param string $notificationChannel - * - * @return string The formatted notification_channel resource. - */ - public static function notificationChannelName($project, $notificationChannel) - { - return self::getNotificationChannelNameTemplate()->render([ - 'project' => $project, - 'notification_channel' => $notificationChannel, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * notification_channel_descriptor resource. - * - * @param string $project - * @param string $channelDescriptor - * - * @return string The formatted notification_channel_descriptor resource. - */ - public static function notificationChannelDescriptorName($project, $channelDescriptor) - { - return self::getNotificationChannelDescriptorNameTemplate()->render([ - 'project' => $project, - 'channel_descriptor' => $channelDescriptor, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_channel_descriptor resource. - * - * @param string $organization - * @param string $channelDescriptor - * - * @return string The formatted organization_channel_descriptor resource. - */ - public static function organizationChannelDescriptorName($organization, $channelDescriptor) - { - return self::getOrganizationChannelDescriptorNameTemplate()->render([ - 'organization' => $organization, - 'channel_descriptor' => $channelDescriptor, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_notification_channel resource. - * - * @param string $organization - * @param string $notificationChannel - * - * @return string The formatted organization_notification_channel resource. - */ - public static function organizationNotificationChannelName($organization, $notificationChannel) - { - return self::getOrganizationNotificationChannelNameTemplate()->render([ - 'organization' => $organization, - 'notification_channel' => $notificationChannel, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_channel_descriptor resource. - * - * @param string $project - * @param string $channelDescriptor - * - * @return string The formatted project_channel_descriptor resource. - */ - public static function projectChannelDescriptorName($project, $channelDescriptor) - { - return self::getProjectChannelDescriptorNameTemplate()->render([ - 'project' => $project, - 'channel_descriptor' => $channelDescriptor, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_notification_channel resource. - * - * @param string $project - * @param string $notificationChannel - * - * @return string The formatted project_notification_channel resource. - */ - public static function projectNotificationChannelName($project, $notificationChannel) - { - return self::getProjectNotificationChannelNameTemplate()->render([ - 'project' => $project, - 'notification_channel' => $notificationChannel, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - folderChannelDescriptor: folders/{folder}/notificationChannelDescriptors/{channel_descriptor} - * - folderNotificationChannel: folders/{folder}/notificationChannels/{notification_channel} - * - notificationChannel: projects/{project}/notificationChannels/{notification_channel} - * - notificationChannelDescriptor: projects/{project}/notificationChannelDescriptors/{channel_descriptor} - * - organizationChannelDescriptor: organizations/{organization}/notificationChannelDescriptors/{channel_descriptor} - * - organizationNotificationChannel: organizations/{organization}/notificationChannels/{notification_channel} - * - projectChannelDescriptor: projects/{project}/notificationChannelDescriptors/{channel_descriptor} - * - projectNotificationChannel: projects/{project}/notificationChannels/{notification_channel} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName($formattedName, $template = null) - { - $templateMap = self::getPathTemplateMap(); - if ($template) { - if (!isset($templateMap[$template])) { - throw new ValidationException("Template name $template does not exist"); - } - - return $templateMap[$template]->match($formattedName); - } - - foreach ($templateMap as $templateName => $pathTemplate) { - try { - return $pathTemplate->match($formattedName); - } catch (ValidationException $ex) { - // Swallow the exception to continue trying other path templates - } - } - - throw new ValidationException("Input did not match any known format. Input: $formattedName"); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'monitoring.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** - * Creates a new notification channel, representing a single notification - * endpoint such as an email address, SMS number, or PagerDuty service. - * - * Design your application to single-thread API calls that modify the state of - * notification channels in a single project. This includes calls to - * CreateNotificationChannel, DeleteNotificationChannel and - * UpdateNotificationChannel. - * - * Sample code: - * ``` - * $notificationChannelServiceClient = new NotificationChannelServiceClient(); - * try { - * $name = 'name'; - * $notificationChannel = new NotificationChannel(); - * $response = $notificationChannelServiceClient->createNotificationChannel($name, $notificationChannel); - * } finally { - * $notificationChannelServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The - * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which - * to execute the request. The format is: - * - * projects/[PROJECT_ID_OR_NUMBER] - * - * This names the container into which the channel will be - * written, this does not name the newly created channel. The resulting - * channel's name will have a normalized version of this field as a prefix, - * but will add `/notificationChannels/[CHANNEL_ID]` to identify the channel. - * @param NotificationChannel $notificationChannel Required. The definition of the `NotificationChannel` to create. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Monitoring\V3\NotificationChannel - * - * @throws ApiException if the remote call fails - */ - public function createNotificationChannel($name, $notificationChannel, array $optionalArgs = []) - { - $request = new CreateNotificationChannelRequest(); - $requestParamHeaders = []; - $request->setName($name); - $request->setNotificationChannel($notificationChannel); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateNotificationChannel', NotificationChannel::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes a notification channel. - * - * Design your application to single-thread API calls that modify the state of - * notification channels in a single project. This includes calls to - * CreateNotificationChannel, DeleteNotificationChannel and - * UpdateNotificationChannel. - * - * Sample code: - * ``` - * $notificationChannelServiceClient = new NotificationChannelServiceClient(); - * try { - * $formattedName = $notificationChannelServiceClient->notificationChannelName('[PROJECT]', '[NOTIFICATION_CHANNEL]'); - * $notificationChannelServiceClient->deleteNotificationChannel($formattedName); - * } finally { - * $notificationChannelServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The channel for which to execute the request. The format is: - * - * projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID] - * @param array $optionalArgs { - * Optional. - * - * @type bool $force - * If true, the notification channel will be deleted regardless of its - * use in alert policies (the policies will be updated to remove the - * channel). If false, this operation will fail if the notification channel - * is referenced by existing alerting policies. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException if the remote call fails - */ - public function deleteNotificationChannel($name, array $optionalArgs = []) - { - $request = new DeleteNotificationChannelRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['force'])) { - $request->setForce($optionalArgs['force']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteNotificationChannel', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets a single notification channel. The channel includes the relevant - * configuration details with which the channel was created. However, the - * response may truncate or omit passwords, API keys, or other private key - * matter and thus the response may not be 100% identical to the information - * that was supplied in the call to the create method. - * - * Sample code: - * ``` - * $notificationChannelServiceClient = new NotificationChannelServiceClient(); - * try { - * $formattedName = $notificationChannelServiceClient->notificationChannelName('[PROJECT]', '[NOTIFICATION_CHANNEL]'); - * $response = $notificationChannelServiceClient->getNotificationChannel($formattedName); - * } finally { - * $notificationChannelServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The channel for which to execute the request. The format is: - * - * projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID] - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Monitoring\V3\NotificationChannel - * - * @throws ApiException if the remote call fails - */ - public function getNotificationChannel($name, array $optionalArgs = []) - { - $request = new GetNotificationChannelRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetNotificationChannel', NotificationChannel::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets a single channel descriptor. The descriptor indicates which fields - * are expected / permitted for a notification channel of the given type. - * - * Sample code: - * ``` - * $notificationChannelServiceClient = new NotificationChannelServiceClient(); - * try { - * $formattedName = $notificationChannelServiceClient->notificationChannelDescriptorName('[PROJECT]', '[CHANNEL_DESCRIPTOR]'); - * $response = $notificationChannelServiceClient->getNotificationChannelDescriptor($formattedName); - * } finally { - * $notificationChannelServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The channel type for which to execute the request. The format is: - * - * projects/[PROJECT_ID_OR_NUMBER]/notificationChannelDescriptors/[CHANNEL_TYPE] - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Monitoring\V3\NotificationChannelDescriptor - * - * @throws ApiException if the remote call fails - */ - public function getNotificationChannelDescriptor($name, array $optionalArgs = []) - { - $request = new GetNotificationChannelDescriptorRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetNotificationChannelDescriptor', NotificationChannelDescriptor::class, $optionalArgs, $request)->wait(); - } - - /** - * Requests a verification code for an already verified channel that can then - * be used in a call to VerifyNotificationChannel() on a different channel - * with an equivalent identity in the same or in a different project. This - * makes it possible to copy a channel between projects without requiring - * manual reverification of the channel. If the channel is not in the - * verified state, this method will fail (in other words, this may only be - * used if the SendNotificationChannelVerificationCode and - * VerifyNotificationChannel paths have already been used to put the given - * channel into the verified state). - * - * There is no guarantee that the verification codes returned by this method - * will be of a similar structure or form as the ones that are delivered - * to the channel via SendNotificationChannelVerificationCode; while - * VerifyNotificationChannel() will recognize both the codes delivered via - * SendNotificationChannelVerificationCode() and returned from - * GetNotificationChannelVerificationCode(), it is typically the case that - * the verification codes delivered via - * SendNotificationChannelVerificationCode() will be shorter and also - * have a shorter expiration (e.g. codes such as "G-123456") whereas - * GetVerificationCode() will typically return a much longer, websafe base - * 64 encoded string that has a longer expiration time. - * - * Sample code: - * ``` - * $notificationChannelServiceClient = new NotificationChannelServiceClient(); - * try { - * $formattedName = $notificationChannelServiceClient->notificationChannelName('[PROJECT]', '[NOTIFICATION_CHANNEL]'); - * $response = $notificationChannelServiceClient->getNotificationChannelVerificationCode($formattedName); - * } finally { - * $notificationChannelServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The notification channel for which a verification code is to be - * generated and retrieved. This must name a channel that is already verified; - * if the specified channel is not verified, the request will fail. - * @param array $optionalArgs { - * Optional. - * - * @type Timestamp $expireTime - * The desired expiration time. If specified, the API will guarantee that - * the returned code will not be valid after the specified timestamp; - * however, the API cannot guarantee that the returned code will be - * valid for at least as long as the requested time (the API puts an upper - * bound on the amount of time for which a code may be valid). If omitted, - * a default expiration will be used, which may be less than the max - * permissible expiration (so specifying an expiration may extend the - * code's lifetime over omitting an expiration, even though the API does - * impose an upper limit on the maximum expiration that is permitted). - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Monitoring\V3\GetNotificationChannelVerificationCodeResponse - * - * @throws ApiException if the remote call fails - */ - public function getNotificationChannelVerificationCode($name, array $optionalArgs = []) - { - $request = new GetNotificationChannelVerificationCodeRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['expireTime'])) { - $request->setExpireTime($optionalArgs['expireTime']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetNotificationChannelVerificationCode', GetNotificationChannelVerificationCodeResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Lists the descriptors for supported channel types. The use of descriptors - * makes it possible for new channel types to be dynamically added. - * - * Sample code: - * ``` - * $notificationChannelServiceClient = new NotificationChannelServiceClient(); - * try { - * $name = 'name'; - * // Iterate over pages of elements - * $pagedResponse = $notificationChannelServiceClient->listNotificationChannelDescriptors($name); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $notificationChannelServiceClient->listNotificationChannelDescriptors($name); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $notificationChannelServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The REST resource name of the parent from which to retrieve - * the notification channel descriptors. The expected syntax is: - * - * projects/[PROJECT_ID_OR_NUMBER] - * - * Note that this - * [names](https://cloud.google.com/monitoring/api/v3#project_name) the parent - * container in which to look for the descriptors; to retrieve a single - * descriptor by name, use the - * [GetNotificationChannelDescriptor][google.monitoring.v3.NotificationChannelService.GetNotificationChannelDescriptor] - * operation, instead. - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listNotificationChannelDescriptors($name, array $optionalArgs = []) - { - $request = new ListNotificationChannelDescriptorsRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListNotificationChannelDescriptors', $optionalArgs, ListNotificationChannelDescriptorsResponse::class, $request); - } - - /** - * Lists the notification channels that have been created for the project. - * To list the types of notification channels that are supported, use - * the `ListNotificationChannelDescriptors` method. - * - * Sample code: - * ``` - * $notificationChannelServiceClient = new NotificationChannelServiceClient(); - * try { - * $name = 'name'; - * // Iterate over pages of elements - * $pagedResponse = $notificationChannelServiceClient->listNotificationChannels($name); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $notificationChannelServiceClient->listNotificationChannels($name); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $notificationChannelServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The - * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which - * to execute the request. The format is: - * - * projects/[PROJECT_ID_OR_NUMBER] - * - * This names the container - * in which to look for the notification channels; it does not name a - * specific channel. To query a specific channel by REST resource name, use - * the - * [`GetNotificationChannel`][google.monitoring.v3.NotificationChannelService.GetNotificationChannel] - * operation. - * @param array $optionalArgs { - * Optional. - * - * @type string $filter - * Optional. If provided, this field specifies the criteria that must be met - * by notification channels to be included in the response. - * - * For more details, see [sorting and - * filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering). - * @type string $orderBy - * Optional. A comma-separated list of fields by which to sort the result. - * Supports the same set of fields as in `filter`. Entries can be prefixed - * with a minus sign to sort in descending rather than ascending order. - * - * For more details, see [sorting and - * filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering). - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listNotificationChannels($name, array $optionalArgs = []) - { - $request = new ListNotificationChannelsRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['orderBy'])) { - $request->setOrderBy($optionalArgs['orderBy']); - } - - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListNotificationChannels', $optionalArgs, ListNotificationChannelsResponse::class, $request); - } - - /** - * Causes a verification code to be delivered to the channel. The code - * can then be supplied in `VerifyNotificationChannel` to verify the channel. - * - * Sample code: - * ``` - * $notificationChannelServiceClient = new NotificationChannelServiceClient(); - * try { - * $formattedName = $notificationChannelServiceClient->notificationChannelName('[PROJECT]', '[NOTIFICATION_CHANNEL]'); - * $notificationChannelServiceClient->sendNotificationChannelVerificationCode($formattedName); - * } finally { - * $notificationChannelServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The notification channel to which to send a verification code. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException if the remote call fails - */ - public function sendNotificationChannelVerificationCode($name, array $optionalArgs = []) - { - $request = new SendNotificationChannelVerificationCodeRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('SendNotificationChannelVerificationCode', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Updates a notification channel. Fields not specified in the field mask - * remain unchanged. - * - * Design your application to single-thread API calls that modify the state of - * notification channels in a single project. This includes calls to - * CreateNotificationChannel, DeleteNotificationChannel and - * UpdateNotificationChannel. - * - * Sample code: - * ``` - * $notificationChannelServiceClient = new NotificationChannelServiceClient(); - * try { - * $notificationChannel = new NotificationChannel(); - * $response = $notificationChannelServiceClient->updateNotificationChannel($notificationChannel); - * } finally { - * $notificationChannelServiceClient->close(); - * } - * ``` - * - * @param NotificationChannel $notificationChannel Required. A description of the changes to be applied to the specified - * notification channel. The description must provide a definition for - * fields to be updated; the names of these fields should also be - * included in the `update_mask`. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * Optional. The fields to update. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Monitoring\V3\NotificationChannel - * - * @throws ApiException if the remote call fails - */ - public function updateNotificationChannel($notificationChannel, array $optionalArgs = []) - { - $request = new UpdateNotificationChannelRequest(); - $requestParamHeaders = []; - $request->setNotificationChannel($notificationChannel); - $requestParamHeaders['notification_channel.name'] = $notificationChannel->getName(); - if (isset($optionalArgs['updateMask'])) { - $request->setUpdateMask($optionalArgs['updateMask']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateNotificationChannel', NotificationChannel::class, $optionalArgs, $request)->wait(); - } - - /** - * Verifies a `NotificationChannel` by proving receipt of the code - * delivered to the channel as a result of calling - * `SendNotificationChannelVerificationCode`. - * - * Sample code: - * ``` - * $notificationChannelServiceClient = new NotificationChannelServiceClient(); - * try { - * $formattedName = $notificationChannelServiceClient->notificationChannelName('[PROJECT]', '[NOTIFICATION_CHANNEL]'); - * $code = 'code'; - * $response = $notificationChannelServiceClient->verifyNotificationChannel($formattedName, $code); - * } finally { - * $notificationChannelServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The notification channel to verify. - * @param string $code Required. The verification code that was delivered to the channel as - * a result of invoking the `SendNotificationChannelVerificationCode` API - * method or that was retrieved from a verified channel via - * `GetNotificationChannelVerificationCode`. For example, one might have - * "G-123456" or "TKNZGhhd2EyN3I1MnRnMjRv" (in general, one is only - * guaranteed that the code is valid UTF-8; one should not - * make any assumptions regarding the structure or format of the code). - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Monitoring\V3\NotificationChannel - * - * @throws ApiException if the remote call fails - */ - public function verifyNotificationChannel($name, $code, array $optionalArgs = []) - { - $request = new VerifyNotificationChannelRequest(); - $requestParamHeaders = []; - $request->setName($name); - $request->setCode($code); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('VerifyNotificationChannel', NotificationChannel::class, $optionalArgs, $request)->wait(); - } -} diff --git a/owl-bot-staging/Monitoring/v3/src/V3/Gapic/QueryServiceGapicClient.php b/owl-bot-staging/Monitoring/v3/src/V3/Gapic/QueryServiceGapicClient.php deleted file mode 100644 index b083925f4ba9..000000000000 --- a/owl-bot-staging/Monitoring/v3/src/V3/Gapic/QueryServiceGapicClient.php +++ /dev/null @@ -1,256 +0,0 @@ -queryTimeSeries($name, $query); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $queryServiceClient->queryTimeSeries($name, $query); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $queryServiceClient->close(); - * } - * ``` - * - * @deprecated Please use the new service client {@see \Google\Cloud\Monitoring\V3\Client\QueryServiceClient}. - */ -class QueryServiceGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.monitoring.v3.QueryService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - const SERVICE_ADDRESS = 'monitoring.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'monitoring.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - 'https://www.googleapis.com/auth/monitoring', - 'https://www.googleapis.com/auth/monitoring.read', - ]; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/query_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/query_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/query_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/query_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'monitoring.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** - * Queries time series using Monitoring Query Language. - * - * Sample code: - * ``` - * $queryServiceClient = new QueryServiceClient(); - * try { - * $name = 'name'; - * $query = 'query'; - * // Iterate over pages of elements - * $pagedResponse = $queryServiceClient->queryTimeSeries($name, $query); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $queryServiceClient->queryTimeSeries($name, $query); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $queryServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The - * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which - * to execute the request. The format is: - * - * projects/[PROJECT_ID_OR_NUMBER] - * @param string $query Required. The query in the [Monitoring Query - * Language](https://cloud.google.com/monitoring/mql/reference) format. - * The default time zone is in UTC. - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function queryTimeSeries($name, $query, array $optionalArgs = []) - { - $request = new QueryTimeSeriesRequest(); - $requestParamHeaders = []; - $request->setName($name); - $request->setQuery($query); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('QueryTimeSeries', $optionalArgs, QueryTimeSeriesResponse::class, $request); - } -} diff --git a/owl-bot-staging/Monitoring/v3/src/V3/Gapic/ServiceMonitoringServiceGapicClient.php b/owl-bot-staging/Monitoring/v3/src/V3/Gapic/ServiceMonitoringServiceGapicClient.php deleted file mode 100644 index c7cc9a8589b9..000000000000 --- a/owl-bot-staging/Monitoring/v3/src/V3/Gapic/ServiceMonitoringServiceGapicClient.php +++ /dev/null @@ -1,1044 +0,0 @@ -createService($parent, $service); - * } finally { - * $serviceMonitoringServiceClient->close(); - * } - * ``` - * - * Many parameters require resource names to be formatted in a particular way. To - * assist with these names, this class includes a format method for each type of - * name, and additionally a parseName method to extract the individual identifiers - * contained within formatted names that are returned by the API. - * - * @deprecated Please use the new service client {@see \Google\Cloud\Monitoring\V3\Client\ServiceMonitoringServiceClient}. - */ -class ServiceMonitoringServiceGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.monitoring.v3.ServiceMonitoringService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - const SERVICE_ADDRESS = 'monitoring.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'monitoring.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - 'https://www.googleapis.com/auth/monitoring', - 'https://www.googleapis.com/auth/monitoring.read', - ]; - - private static $folderServiceNameTemplate; - - private static $folderServiceServiceLevelObjectiveNameTemplate; - - private static $organizationServiceNameTemplate; - - private static $organizationServiceServiceLevelObjectiveNameTemplate; - - private static $projectServiceNameTemplate; - - private static $projectServiceServiceLevelObjectiveNameTemplate; - - private static $serviceNameTemplate; - - private static $serviceLevelObjectiveNameTemplate; - - private static $pathTemplateMap; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/service_monitoring_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/service_monitoring_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/service_monitoring_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/service_monitoring_service_rest_client_config.php', - ], - ], - ]; - } - - private static function getFolderServiceNameTemplate() - { - if (self::$folderServiceNameTemplate == null) { - self::$folderServiceNameTemplate = new PathTemplate('folders/{folder}/services/{service}'); - } - - return self::$folderServiceNameTemplate; - } - - private static function getFolderServiceServiceLevelObjectiveNameTemplate() - { - if (self::$folderServiceServiceLevelObjectiveNameTemplate == null) { - self::$folderServiceServiceLevelObjectiveNameTemplate = new PathTemplate('folders/{folder}/services/{service}/serviceLevelObjectives/{service_level_objective}'); - } - - return self::$folderServiceServiceLevelObjectiveNameTemplate; - } - - private static function getOrganizationServiceNameTemplate() - { - if (self::$organizationServiceNameTemplate == null) { - self::$organizationServiceNameTemplate = new PathTemplate('organizations/{organization}/services/{service}'); - } - - return self::$organizationServiceNameTemplate; - } - - private static function getOrganizationServiceServiceLevelObjectiveNameTemplate() - { - if (self::$organizationServiceServiceLevelObjectiveNameTemplate == null) { - self::$organizationServiceServiceLevelObjectiveNameTemplate = new PathTemplate('organizations/{organization}/services/{service}/serviceLevelObjectives/{service_level_objective}'); - } - - return self::$organizationServiceServiceLevelObjectiveNameTemplate; - } - - private static function getProjectServiceNameTemplate() - { - if (self::$projectServiceNameTemplate == null) { - self::$projectServiceNameTemplate = new PathTemplate('projects/{project}/services/{service}'); - } - - return self::$projectServiceNameTemplate; - } - - private static function getProjectServiceServiceLevelObjectiveNameTemplate() - { - if (self::$projectServiceServiceLevelObjectiveNameTemplate == null) { - self::$projectServiceServiceLevelObjectiveNameTemplate = new PathTemplate('projects/{project}/services/{service}/serviceLevelObjectives/{service_level_objective}'); - } - - return self::$projectServiceServiceLevelObjectiveNameTemplate; - } - - private static function getServiceNameTemplate() - { - if (self::$serviceNameTemplate == null) { - self::$serviceNameTemplate = new PathTemplate('projects/{project}/services/{service}'); - } - - return self::$serviceNameTemplate; - } - - private static function getServiceLevelObjectiveNameTemplate() - { - if (self::$serviceLevelObjectiveNameTemplate == null) { - self::$serviceLevelObjectiveNameTemplate = new PathTemplate('projects/{project}/services/{service}/serviceLevelObjectives/{service_level_objective}'); - } - - return self::$serviceLevelObjectiveNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'folderService' => self::getFolderServiceNameTemplate(), - 'folderServiceServiceLevelObjective' => self::getFolderServiceServiceLevelObjectiveNameTemplate(), - 'organizationService' => self::getOrganizationServiceNameTemplate(), - 'organizationServiceServiceLevelObjective' => self::getOrganizationServiceServiceLevelObjectiveNameTemplate(), - 'projectService' => self::getProjectServiceNameTemplate(), - 'projectServiceServiceLevelObjective' => self::getProjectServiceServiceLevelObjectiveNameTemplate(), - 'service' => self::getServiceNameTemplate(), - 'serviceLevelObjective' => self::getServiceLevelObjectiveNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a - * folder_service resource. - * - * @param string $folder - * @param string $service - * - * @return string The formatted folder_service resource. - */ - public static function folderServiceName($folder, $service) - { - return self::getFolderServiceNameTemplate()->render([ - 'folder' => $folder, - 'service' => $service, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * folder_service_service_level_objective resource. - * - * @param string $folder - * @param string $service - * @param string $serviceLevelObjective - * - * @return string The formatted folder_service_service_level_objective resource. - */ - public static function folderServiceServiceLevelObjectiveName($folder, $service, $serviceLevelObjective) - { - return self::getFolderServiceServiceLevelObjectiveNameTemplate()->render([ - 'folder' => $folder, - 'service' => $service, - 'service_level_objective' => $serviceLevelObjective, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_service resource. - * - * @param string $organization - * @param string $service - * - * @return string The formatted organization_service resource. - */ - public static function organizationServiceName($organization, $service) - { - return self::getOrganizationServiceNameTemplate()->render([ - 'organization' => $organization, - 'service' => $service, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_service_service_level_objective resource. - * - * @param string $organization - * @param string $service - * @param string $serviceLevelObjective - * - * @return string The formatted organization_service_service_level_objective resource. - */ - public static function organizationServiceServiceLevelObjectiveName($organization, $service, $serviceLevelObjective) - { - return self::getOrganizationServiceServiceLevelObjectiveNameTemplate()->render([ - 'organization' => $organization, - 'service' => $service, - 'service_level_objective' => $serviceLevelObjective, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_service resource. - * - * @param string $project - * @param string $service - * - * @return string The formatted project_service resource. - */ - public static function projectServiceName($project, $service) - { - return self::getProjectServiceNameTemplate()->render([ - 'project' => $project, - 'service' => $service, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_service_service_level_objective resource. - * - * @param string $project - * @param string $service - * @param string $serviceLevelObjective - * - * @return string The formatted project_service_service_level_objective resource. - */ - public static function projectServiceServiceLevelObjectiveName($project, $service, $serviceLevelObjective) - { - return self::getProjectServiceServiceLevelObjectiveNameTemplate()->render([ - 'project' => $project, - 'service' => $service, - 'service_level_objective' => $serviceLevelObjective, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a service - * resource. - * - * @param string $project - * @param string $service - * - * @return string The formatted service resource. - */ - public static function serviceName($project, $service) - { - return self::getServiceNameTemplate()->render([ - 'project' => $project, - 'service' => $service, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * service_level_objective resource. - * - * @param string $project - * @param string $service - * @param string $serviceLevelObjective - * - * @return string The formatted service_level_objective resource. - */ - public static function serviceLevelObjectiveName($project, $service, $serviceLevelObjective) - { - return self::getServiceLevelObjectiveNameTemplate()->render([ - 'project' => $project, - 'service' => $service, - 'service_level_objective' => $serviceLevelObjective, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - folderService: folders/{folder}/services/{service} - * - folderServiceServiceLevelObjective: folders/{folder}/services/{service}/serviceLevelObjectives/{service_level_objective} - * - organizationService: organizations/{organization}/services/{service} - * - organizationServiceServiceLevelObjective: organizations/{organization}/services/{service}/serviceLevelObjectives/{service_level_objective} - * - projectService: projects/{project}/services/{service} - * - projectServiceServiceLevelObjective: projects/{project}/services/{service}/serviceLevelObjectives/{service_level_objective} - * - service: projects/{project}/services/{service} - * - serviceLevelObjective: projects/{project}/services/{service}/serviceLevelObjectives/{service_level_objective} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName($formattedName, $template = null) - { - $templateMap = self::getPathTemplateMap(); - if ($template) { - if (!isset($templateMap[$template])) { - throw new ValidationException("Template name $template does not exist"); - } - - return $templateMap[$template]->match($formattedName); - } - - foreach ($templateMap as $templateName => $pathTemplate) { - try { - return $pathTemplate->match($formattedName); - } catch (ValidationException $ex) { - // Swallow the exception to continue trying other path templates - } - } - - throw new ValidationException("Input did not match any known format. Input: $formattedName"); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'monitoring.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** - * Create a `Service`. - * - * Sample code: - * ``` - * $serviceMonitoringServiceClient = new ServiceMonitoringServiceClient(); - * try { - * $parent = 'parent'; - * $service = new Service(); - * $response = $serviceMonitoringServiceClient->createService($parent, $service); - * } finally { - * $serviceMonitoringServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. Resource - * [name](https://cloud.google.com/monitoring/api/v3#project_name) of the - * parent Metrics Scope. The format is: - * - * projects/[PROJECT_ID_OR_NUMBER] - * @param Service $service Required. The `Service` to create. - * @param array $optionalArgs { - * Optional. - * - * @type string $serviceId - * Optional. The Service id to use for this Service. If omitted, an id will be - * generated instead. Must match the pattern `[a-z0-9\-]+` - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Monitoring\V3\Service - * - * @throws ApiException if the remote call fails - */ - public function createService($parent, $service, array $optionalArgs = []) - { - $request = new CreateServiceRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setService($service); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['serviceId'])) { - $request->setServiceId($optionalArgs['serviceId']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateService', Service::class, $optionalArgs, $request)->wait(); - } - - /** - * Create a `ServiceLevelObjective` for the given `Service`. - * - * Sample code: - * ``` - * $serviceMonitoringServiceClient = new ServiceMonitoringServiceClient(); - * try { - * $formattedParent = $serviceMonitoringServiceClient->serviceName('[PROJECT]', '[SERVICE]'); - * $serviceLevelObjective = new ServiceLevelObjective(); - * $response = $serviceMonitoringServiceClient->createServiceLevelObjective($formattedParent, $serviceLevelObjective); - * } finally { - * $serviceMonitoringServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. Resource name of the parent `Service`. The format is: - * - * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] - * @param ServiceLevelObjective $serviceLevelObjective Required. The `ServiceLevelObjective` to create. - * The provided `name` will be respected if no `ServiceLevelObjective` exists - * with this name. - * @param array $optionalArgs { - * Optional. - * - * @type string $serviceLevelObjectiveId - * Optional. The ServiceLevelObjective id to use for this - * ServiceLevelObjective. If omitted, an id will be generated instead. Must - * match the pattern `^[a-zA-Z0-9-_:.]+$` - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Monitoring\V3\ServiceLevelObjective - * - * @throws ApiException if the remote call fails - */ - public function createServiceLevelObjective($parent, $serviceLevelObjective, array $optionalArgs = []) - { - $request = new CreateServiceLevelObjectiveRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setServiceLevelObjective($serviceLevelObjective); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['serviceLevelObjectiveId'])) { - $request->setServiceLevelObjectiveId($optionalArgs['serviceLevelObjectiveId']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateServiceLevelObjective', ServiceLevelObjective::class, $optionalArgs, $request)->wait(); - } - - /** - * Soft delete this `Service`. - * - * Sample code: - * ``` - * $serviceMonitoringServiceClient = new ServiceMonitoringServiceClient(); - * try { - * $formattedName = $serviceMonitoringServiceClient->serviceName('[PROJECT]', '[SERVICE]'); - * $serviceMonitoringServiceClient->deleteService($formattedName); - * } finally { - * $serviceMonitoringServiceClient->close(); - * } - * ``` - * - * @param string $name Required. Resource name of the `Service` to delete. The format is: - * - * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException if the remote call fails - */ - public function deleteService($name, array $optionalArgs = []) - { - $request = new DeleteServiceRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteService', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Delete the given `ServiceLevelObjective`. - * - * Sample code: - * ``` - * $serviceMonitoringServiceClient = new ServiceMonitoringServiceClient(); - * try { - * $formattedName = $serviceMonitoringServiceClient->serviceLevelObjectiveName('[PROJECT]', '[SERVICE]', '[SERVICE_LEVEL_OBJECTIVE]'); - * $serviceMonitoringServiceClient->deleteServiceLevelObjective($formattedName); - * } finally { - * $serviceMonitoringServiceClient->close(); - * } - * ``` - * - * @param string $name Required. Resource name of the `ServiceLevelObjective` to delete. The - * format is: - * - * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME] - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException if the remote call fails - */ - public function deleteServiceLevelObjective($name, array $optionalArgs = []) - { - $request = new DeleteServiceLevelObjectiveRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteServiceLevelObjective', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Get the named `Service`. - * - * Sample code: - * ``` - * $serviceMonitoringServiceClient = new ServiceMonitoringServiceClient(); - * try { - * $formattedName = $serviceMonitoringServiceClient->serviceName('[PROJECT]', '[SERVICE]'); - * $response = $serviceMonitoringServiceClient->getService($formattedName); - * } finally { - * $serviceMonitoringServiceClient->close(); - * } - * ``` - * - * @param string $name Required. Resource name of the `Service`. The format is: - * - * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Monitoring\V3\Service - * - * @throws ApiException if the remote call fails - */ - public function getService($name, array $optionalArgs = []) - { - $request = new GetServiceRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetService', Service::class, $optionalArgs, $request)->wait(); - } - - /** - * Get a `ServiceLevelObjective` by name. - * - * Sample code: - * ``` - * $serviceMonitoringServiceClient = new ServiceMonitoringServiceClient(); - * try { - * $formattedName = $serviceMonitoringServiceClient->serviceLevelObjectiveName('[PROJECT]', '[SERVICE]', '[SERVICE_LEVEL_OBJECTIVE]'); - * $response = $serviceMonitoringServiceClient->getServiceLevelObjective($formattedName); - * } finally { - * $serviceMonitoringServiceClient->close(); - * } - * ``` - * - * @param string $name Required. Resource name of the `ServiceLevelObjective` to get. The format - * is: - * - * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME] - * @param array $optionalArgs { - * Optional. - * - * @type int $view - * View of the `ServiceLevelObjective` to return. If `DEFAULT`, return the - * `ServiceLevelObjective` as originally defined. If `EXPLICIT` and the - * `ServiceLevelObjective` is defined in terms of a `BasicSli`, replace the - * `BasicSli` with a `RequestBasedSli` spelling out how the SLI is computed. - * For allowed values, use constants defined on {@see \Google\Cloud\Monitoring\V3\ServiceLevelObjective\View} - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Monitoring\V3\ServiceLevelObjective - * - * @throws ApiException if the remote call fails - */ - public function getServiceLevelObjective($name, array $optionalArgs = []) - { - $request = new GetServiceLevelObjectiveRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['view'])) { - $request->setView($optionalArgs['view']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetServiceLevelObjective', ServiceLevelObjective::class, $optionalArgs, $request)->wait(); - } - - /** - * List the `ServiceLevelObjective`s for the given `Service`. - * - * Sample code: - * ``` - * $serviceMonitoringServiceClient = new ServiceMonitoringServiceClient(); - * try { - * $formattedParent = $serviceMonitoringServiceClient->serviceName('[PROJECT]', '[SERVICE]'); - * // Iterate over pages of elements - * $pagedResponse = $serviceMonitoringServiceClient->listServiceLevelObjectives($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $serviceMonitoringServiceClient->listServiceLevelObjectives($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $serviceMonitoringServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. Resource name of the parent containing the listed SLOs, either a - * project or a Monitoring Metrics Scope. The formats are: - * - * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] - * workspaces/[HOST_PROJECT_ID_OR_NUMBER]/services/- - * @param array $optionalArgs { - * Optional. - * - * @type string $filter - * A filter specifying what `ServiceLevelObjective`s to return. - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type int $view - * View of the `ServiceLevelObjective`s to return. If `DEFAULT`, return each - * `ServiceLevelObjective` as originally defined. If `EXPLICIT` and the - * `ServiceLevelObjective` is defined in terms of a `BasicSli`, replace the - * `BasicSli` with a `RequestBasedSli` spelling out how the SLI is computed. - * For allowed values, use constants defined on {@see \Google\Cloud\Monitoring\V3\ServiceLevelObjective\View} - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listServiceLevelObjectives($parent, array $optionalArgs = []) - { - $request = new ListServiceLevelObjectivesRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - if (isset($optionalArgs['view'])) { - $request->setView($optionalArgs['view']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListServiceLevelObjectives', $optionalArgs, ListServiceLevelObjectivesResponse::class, $request); - } - - /** - * List `Service`s for this Metrics Scope. - * - * Sample code: - * ``` - * $serviceMonitoringServiceClient = new ServiceMonitoringServiceClient(); - * try { - * $parent = 'parent'; - * // Iterate over pages of elements - * $pagedResponse = $serviceMonitoringServiceClient->listServices($parent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $serviceMonitoringServiceClient->listServices($parent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $serviceMonitoringServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. Resource name of the parent containing the listed services, - * either a [project](https://cloud.google.com/monitoring/api/v3#project_name) - * or a Monitoring Metrics Scope. The formats are: - * - * projects/[PROJECT_ID_OR_NUMBER] - * workspaces/[HOST_PROJECT_ID_OR_NUMBER] - * @param array $optionalArgs { - * Optional. - * - * @type string $filter - * A filter specifying what `Service`s to return. The filter supports - * filtering on a particular service-identifier type or one of its attributes. - * - * To filter on a particular service-identifier type, the `identifier_case` - * refers to which option in the `identifier` field is populated. For example, - * the filter `identifier_case = "CUSTOM"` would match all services with a - * value for the `custom` field. Valid options include "CUSTOM", "APP_ENGINE", - * "MESH_ISTIO", and the other options listed at - * https://cloud.google.com/monitoring/api/ref_v3/rest/v3/services#Service - * - * To filter on an attribute of a service-identifier type, apply the filter - * name by using the snake case of the service-identifier type and the - * attribute of that service-identifier type, and join the two with a period. - * For example, to filter by the `meshUid` field of the `MeshIstio` - * service-identifier type, you must filter on `mesh_istio.mesh_uid = - * "123"` to match all services with mesh UID "123". Service-identifier types - * and their attributes are described at - * https://cloud.google.com/monitoring/api/ref_v3/rest/v3/services#Service - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listServices($parent, array $optionalArgs = []) - { - $request = new ListServicesRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListServices', $optionalArgs, ListServicesResponse::class, $request); - } - - /** - * Update this `Service`. - * - * Sample code: - * ``` - * $serviceMonitoringServiceClient = new ServiceMonitoringServiceClient(); - * try { - * $service = new Service(); - * $response = $serviceMonitoringServiceClient->updateService($service); - * } finally { - * $serviceMonitoringServiceClient->close(); - * } - * ``` - * - * @param Service $service Required. The `Service` to draw updates from. - * The given `name` specifies the resource to update. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * A set of field paths defining which fields to use for the update. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Monitoring\V3\Service - * - * @throws ApiException if the remote call fails - */ - public function updateService($service, array $optionalArgs = []) - { - $request = new UpdateServiceRequest(); - $requestParamHeaders = []; - $request->setService($service); - $requestParamHeaders['service.name'] = $service->getName(); - if (isset($optionalArgs['updateMask'])) { - $request->setUpdateMask($optionalArgs['updateMask']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateService', Service::class, $optionalArgs, $request)->wait(); - } - - /** - * Update the given `ServiceLevelObjective`. - * - * Sample code: - * ``` - * $serviceMonitoringServiceClient = new ServiceMonitoringServiceClient(); - * try { - * $serviceLevelObjective = new ServiceLevelObjective(); - * $response = $serviceMonitoringServiceClient->updateServiceLevelObjective($serviceLevelObjective); - * } finally { - * $serviceMonitoringServiceClient->close(); - * } - * ``` - * - * @param ServiceLevelObjective $serviceLevelObjective Required. The `ServiceLevelObjective` to draw updates from. - * The given `name` specifies the resource to update. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * A set of field paths defining which fields to use for the update. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Monitoring\V3\ServiceLevelObjective - * - * @throws ApiException if the remote call fails - */ - public function updateServiceLevelObjective($serviceLevelObjective, array $optionalArgs = []) - { - $request = new UpdateServiceLevelObjectiveRequest(); - $requestParamHeaders = []; - $request->setServiceLevelObjective($serviceLevelObjective); - $requestParamHeaders['service_level_objective.name'] = $serviceLevelObjective->getName(); - if (isset($optionalArgs['updateMask'])) { - $request->setUpdateMask($optionalArgs['updateMask']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateServiceLevelObjective', ServiceLevelObjective::class, $optionalArgs, $request)->wait(); - } -} diff --git a/owl-bot-staging/Monitoring/v3/src/V3/Gapic/SnoozeServiceGapicClient.php b/owl-bot-staging/Monitoring/v3/src/V3/Gapic/SnoozeServiceGapicClient.php deleted file mode 100644 index 08c130e17a09..000000000000 --- a/owl-bot-staging/Monitoring/v3/src/V3/Gapic/SnoozeServiceGapicClient.php +++ /dev/null @@ -1,680 +0,0 @@ -workspaceName('[PROJECT]'); - * $snooze = new Snooze(); - * $response = $snoozeServiceClient->createSnooze($formattedParent, $snooze); - * } finally { - * $snoozeServiceClient->close(); - * } - * ``` - * - * Many parameters require resource names to be formatted in a particular way. To - * assist with these names, this class includes a format method for each type of - * name, and additionally a parseName method to extract the individual identifiers - * contained within formatted names that are returned by the API. - * - * @deprecated Please use the new service client {@see \Google\Cloud\Monitoring\V3\Client\SnoozeServiceClient}. - */ -class SnoozeServiceGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.monitoring.v3.SnoozeService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - const SERVICE_ADDRESS = 'monitoring.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'monitoring.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - 'https://www.googleapis.com/auth/monitoring', - 'https://www.googleapis.com/auth/monitoring.read', - ]; - - private static $alertPolicyNameTemplate; - - private static $folderAlertPolicyNameTemplate; - - private static $organizationAlertPolicyNameTemplate; - - private static $projectNameTemplate; - - private static $projectAlertPolicyNameTemplate; - - private static $snoozeNameTemplate; - - private static $workspaceNameTemplate; - - private static $pathTemplateMap; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/snooze_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/snooze_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/snooze_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/snooze_service_rest_client_config.php', - ], - ], - ]; - } - - private static function getAlertPolicyNameTemplate() - { - if (self::$alertPolicyNameTemplate == null) { - self::$alertPolicyNameTemplate = new PathTemplate('projects/{project}/alertPolicies/{alert_policy}'); - } - - return self::$alertPolicyNameTemplate; - } - - private static function getFolderAlertPolicyNameTemplate() - { - if (self::$folderAlertPolicyNameTemplate == null) { - self::$folderAlertPolicyNameTemplate = new PathTemplate('folders/{folder}/alertPolicies/{alert_policy}'); - } - - return self::$folderAlertPolicyNameTemplate; - } - - private static function getOrganizationAlertPolicyNameTemplate() - { - if (self::$organizationAlertPolicyNameTemplate == null) { - self::$organizationAlertPolicyNameTemplate = new PathTemplate('organizations/{organization}/alertPolicies/{alert_policy}'); - } - - return self::$organizationAlertPolicyNameTemplate; - } - - private static function getProjectNameTemplate() - { - if (self::$projectNameTemplate == null) { - self::$projectNameTemplate = new PathTemplate('projects/{project}'); - } - - return self::$projectNameTemplate; - } - - private static function getProjectAlertPolicyNameTemplate() - { - if (self::$projectAlertPolicyNameTemplate == null) { - self::$projectAlertPolicyNameTemplate = new PathTemplate('projects/{project}/alertPolicies/{alert_policy}'); - } - - return self::$projectAlertPolicyNameTemplate; - } - - private static function getSnoozeNameTemplate() - { - if (self::$snoozeNameTemplate == null) { - self::$snoozeNameTemplate = new PathTemplate('projects/{project}/snoozes/{snooze}'); - } - - return self::$snoozeNameTemplate; - } - - private static function getWorkspaceNameTemplate() - { - if (self::$workspaceNameTemplate == null) { - self::$workspaceNameTemplate = new PathTemplate('projects/{project}'); - } - - return self::$workspaceNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'alertPolicy' => self::getAlertPolicyNameTemplate(), - 'folderAlertPolicy' => self::getFolderAlertPolicyNameTemplate(), - 'organizationAlertPolicy' => self::getOrganizationAlertPolicyNameTemplate(), - 'project' => self::getProjectNameTemplate(), - 'projectAlertPolicy' => self::getProjectAlertPolicyNameTemplate(), - 'snooze' => self::getSnoozeNameTemplate(), - 'workspace' => self::getWorkspaceNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a alert_policy - * resource. - * - * @param string $project - * @param string $alertPolicy - * - * @return string The formatted alert_policy resource. - */ - public static function alertPolicyName($project, $alertPolicy) - { - return self::getAlertPolicyNameTemplate()->render([ - 'project' => $project, - 'alert_policy' => $alertPolicy, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * folder_alert_policy resource. - * - * @param string $folder - * @param string $alertPolicy - * - * @return string The formatted folder_alert_policy resource. - */ - public static function folderAlertPolicyName($folder, $alertPolicy) - { - return self::getFolderAlertPolicyNameTemplate()->render([ - 'folder' => $folder, - 'alert_policy' => $alertPolicy, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_alert_policy resource. - * - * @param string $organization - * @param string $alertPolicy - * - * @return string The formatted organization_alert_policy resource. - */ - public static function organizationAlertPolicyName($organization, $alertPolicy) - { - return self::getOrganizationAlertPolicyNameTemplate()->render([ - 'organization' => $organization, - 'alert_policy' => $alertPolicy, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a project - * resource. - * - * @param string $project - * - * @return string The formatted project resource. - */ - public static function projectName($project) - { - return self::getProjectNameTemplate()->render([ - 'project' => $project, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_alert_policy resource. - * - * @param string $project - * @param string $alertPolicy - * - * @return string The formatted project_alert_policy resource. - */ - public static function projectAlertPolicyName($project, $alertPolicy) - { - return self::getProjectAlertPolicyNameTemplate()->render([ - 'project' => $project, - 'alert_policy' => $alertPolicy, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a snooze - * resource. - * - * @param string $project - * @param string $snooze - * - * @return string The formatted snooze resource. - */ - public static function snoozeName($project, $snooze) - { - return self::getSnoozeNameTemplate()->render([ - 'project' => $project, - 'snooze' => $snooze, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a workspace - * resource. - * - * @param string $project - * - * @return string The formatted workspace resource. - */ - public static function workspaceName($project) - { - return self::getWorkspaceNameTemplate()->render([ - 'project' => $project, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - alertPolicy: projects/{project}/alertPolicies/{alert_policy} - * - folderAlertPolicy: folders/{folder}/alertPolicies/{alert_policy} - * - organizationAlertPolicy: organizations/{organization}/alertPolicies/{alert_policy} - * - project: projects/{project} - * - projectAlertPolicy: projects/{project}/alertPolicies/{alert_policy} - * - snooze: projects/{project}/snoozes/{snooze} - * - workspace: projects/{project} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName($formattedName, $template = null) - { - $templateMap = self::getPathTemplateMap(); - if ($template) { - if (!isset($templateMap[$template])) { - throw new ValidationException("Template name $template does not exist"); - } - - return $templateMap[$template]->match($formattedName); - } - - foreach ($templateMap as $templateName => $pathTemplate) { - try { - return $pathTemplate->match($formattedName); - } catch (ValidationException $ex) { - // Swallow the exception to continue trying other path templates - } - } - - throw new ValidationException("Input did not match any known format. Input: $formattedName"); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'monitoring.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** - * Creates a `Snooze` that will prevent alerts, which match the provided - * criteria, from being opened. The `Snooze` applies for a specific time - * interval. - * - * Sample code: - * ``` - * $snoozeServiceClient = new SnoozeServiceClient(); - * try { - * $formattedParent = $snoozeServiceClient->workspaceName('[PROJECT]'); - * $snooze = new Snooze(); - * $response = $snoozeServiceClient->createSnooze($formattedParent, $snooze); - * } finally { - * $snoozeServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The - * [project](https://cloud.google.com/monitoring/api/v3#project_name) in which - * a `Snooze` should be created. The format is: - * - * projects/[PROJECT_ID_OR_NUMBER] - * @param Snooze $snooze Required. The `Snooze` to create. Omit the `name` field, as it will be - * filled in by the API. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Monitoring\V3\Snooze - * - * @throws ApiException if the remote call fails - */ - public function createSnooze($parent, $snooze, array $optionalArgs = []) - { - $request = new CreateSnoozeRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setSnooze($snooze); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateSnooze', Snooze::class, $optionalArgs, $request)->wait(); - } - - /** - * Retrieves a `Snooze` by `name`. - * - * Sample code: - * ``` - * $snoozeServiceClient = new SnoozeServiceClient(); - * try { - * $formattedName = $snoozeServiceClient->snoozeName('[PROJECT]', '[SNOOZE]'); - * $response = $snoozeServiceClient->getSnooze($formattedName); - * } finally { - * $snoozeServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The ID of the `Snooze` to retrieve. The format is: - * - * projects/[PROJECT_ID_OR_NUMBER]/snoozes/[SNOOZE_ID] - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Monitoring\V3\Snooze - * - * @throws ApiException if the remote call fails - */ - public function getSnooze($name, array $optionalArgs = []) - { - $request = new GetSnoozeRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetSnooze', Snooze::class, $optionalArgs, $request)->wait(); - } - - /** - * Lists the `Snooze`s associated with a project. Can optionally pass in - * `filter`, which specifies predicates to match `Snooze`s. - * - * Sample code: - * ``` - * $snoozeServiceClient = new SnoozeServiceClient(); - * try { - * $formattedParent = $snoozeServiceClient->workspaceName('[PROJECT]'); - * // Iterate over pages of elements - * $pagedResponse = $snoozeServiceClient->listSnoozes($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $snoozeServiceClient->listSnoozes($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $snoozeServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The - * [project](https://cloud.google.com/monitoring/api/v3#project_name) whose - * `Snooze`s should be listed. The format is: - * - * projects/[PROJECT_ID_OR_NUMBER] - * @param array $optionalArgs { - * Optional. - * - * @type string $filter - * Optional. Optional filter to restrict results to the given criteria. The - * following fields are supported. - * - * * `interval.start_time` - * * `interval.end_time` - * - * For example: - * - * ``` - * interval.start_time > "2022-03-11T00:00:00-08:00" AND - * interval.end_time < "2022-03-12T00:00:00-08:00" - * ``` - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listSnoozes($parent, array $optionalArgs = []) - { - $request = new ListSnoozesRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListSnoozes', $optionalArgs, ListSnoozesResponse::class, $request); - } - - /** - * Updates a `Snooze`, identified by its `name`, with the parameters in the - * given `Snooze` object. - * - * Sample code: - * ``` - * $snoozeServiceClient = new SnoozeServiceClient(); - * try { - * $snooze = new Snooze(); - * $updateMask = new FieldMask(); - * $response = $snoozeServiceClient->updateSnooze($snooze, $updateMask); - * } finally { - * $snoozeServiceClient->close(); - * } - * ``` - * - * @param Snooze $snooze Required. The `Snooze` to update. Must have the name field present. - * @param FieldMask $updateMask Required. The fields to update. - * - * For each field listed in `update_mask`: - * - * * If the `Snooze` object supplied in the `UpdateSnoozeRequest` has a - * value for that field, the value of the field in the existing `Snooze` - * will be set to the value of the field in the supplied `Snooze`. - * * If the field does not have a value in the supplied `Snooze`, the field - * in the existing `Snooze` is set to its default value. - * - * Fields not listed retain their existing value. - * - * The following are the field names that are accepted in `update_mask`: - * - * * `display_name` - * * `interval.start_time` - * * `interval.end_time` - * - * That said, the start time and end time of the `Snooze` determines which - * fields can legally be updated. Before attempting an update, users should - * consult the documentation for `UpdateSnoozeRequest`, which talks about - * which fields can be updated. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Monitoring\V3\Snooze - * - * @throws ApiException if the remote call fails - */ - public function updateSnooze($snooze, $updateMask, array $optionalArgs = []) - { - $request = new UpdateSnoozeRequest(); - $requestParamHeaders = []; - $request->setSnooze($snooze); - $request->setUpdateMask($updateMask); - $requestParamHeaders['snooze.name'] = $snooze->getName(); - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateSnooze', Snooze::class, $optionalArgs, $request)->wait(); - } -} diff --git a/owl-bot-staging/Monitoring/v3/src/V3/Gapic/UptimeCheckServiceGapicClient.php b/owl-bot-staging/Monitoring/v3/src/V3/Gapic/UptimeCheckServiceGapicClient.php deleted file mode 100644 index 5c178d847077..000000000000 --- a/owl-bot-staging/Monitoring/v3/src/V3/Gapic/UptimeCheckServiceGapicClient.php +++ /dev/null @@ -1,724 +0,0 @@ -createUptimeCheckConfig($parent, $uptimeCheckConfig); - * } finally { - * $uptimeCheckServiceClient->close(); - * } - * ``` - * - * Many parameters require resource names to be formatted in a particular way. To - * assist with these names, this class includes a format method for each type of - * name, and additionally a parseName method to extract the individual identifiers - * contained within formatted names that are returned by the API. - * - * @deprecated Please use the new service client {@see \Google\Cloud\Monitoring\V3\Client\UptimeCheckServiceClient}. - */ -class UptimeCheckServiceGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.monitoring.v3.UptimeCheckService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - const SERVICE_ADDRESS = 'monitoring.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'monitoring.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - 'https://www.googleapis.com/auth/monitoring', - 'https://www.googleapis.com/auth/monitoring.read', - ]; - - private static $folderUptimeCheckConfigNameTemplate; - - private static $functionNameTemplate; - - private static $organizationUptimeCheckConfigNameTemplate; - - private static $projectUptimeCheckConfigNameTemplate; - - private static $uptimeCheckConfigNameTemplate; - - private static $pathTemplateMap; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/uptime_check_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/uptime_check_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/uptime_check_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/uptime_check_service_rest_client_config.php', - ], - ], - ]; - } - - private static function getFolderUptimeCheckConfigNameTemplate() - { - if (self::$folderUptimeCheckConfigNameTemplate == null) { - self::$folderUptimeCheckConfigNameTemplate = new PathTemplate('folders/{folder}/uptimeCheckConfigs/{uptime_check_config}'); - } - - return self::$folderUptimeCheckConfigNameTemplate; - } - - private static function getFunctionNameTemplate() - { - if (self::$functionNameTemplate == null) { - self::$functionNameTemplate = new PathTemplate('projects/{project}/locations/{location}/functions/{function}'); - } - - return self::$functionNameTemplate; - } - - private static function getOrganizationUptimeCheckConfigNameTemplate() - { - if (self::$organizationUptimeCheckConfigNameTemplate == null) { - self::$organizationUptimeCheckConfigNameTemplate = new PathTemplate('organizations/{organization}/uptimeCheckConfigs/{uptime_check_config}'); - } - - return self::$organizationUptimeCheckConfigNameTemplate; - } - - private static function getProjectUptimeCheckConfigNameTemplate() - { - if (self::$projectUptimeCheckConfigNameTemplate == null) { - self::$projectUptimeCheckConfigNameTemplate = new PathTemplate('projects/{project}/uptimeCheckConfigs/{uptime_check_config}'); - } - - return self::$projectUptimeCheckConfigNameTemplate; - } - - private static function getUptimeCheckConfigNameTemplate() - { - if (self::$uptimeCheckConfigNameTemplate == null) { - self::$uptimeCheckConfigNameTemplate = new PathTemplate('projects/{project}/uptimeCheckConfigs/{uptime_check_config}'); - } - - return self::$uptimeCheckConfigNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'folderUptimeCheckConfig' => self::getFolderUptimeCheckConfigNameTemplate(), - 'function' => self::getFunctionNameTemplate(), - 'organizationUptimeCheckConfig' => self::getOrganizationUptimeCheckConfigNameTemplate(), - 'projectUptimeCheckConfig' => self::getProjectUptimeCheckConfigNameTemplate(), - 'uptimeCheckConfig' => self::getUptimeCheckConfigNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a - * folder_uptime_check_config resource. - * - * @param string $folder - * @param string $uptimeCheckConfig - * - * @return string The formatted folder_uptime_check_config resource. - */ - public static function folderUptimeCheckConfigName($folder, $uptimeCheckConfig) - { - return self::getFolderUptimeCheckConfigNameTemplate()->render([ - 'folder' => $folder, - 'uptime_check_config' => $uptimeCheckConfig, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a function - * resource. - * - * @param string $project - * @param string $location - * @param string $function - * - * @return string The formatted function resource. - */ - public static function functionName($project, $location, $function) - { - return self::getFunctionNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'function' => $function, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_uptime_check_config resource. - * - * @param string $organization - * @param string $uptimeCheckConfig - * - * @return string The formatted organization_uptime_check_config resource. - */ - public static function organizationUptimeCheckConfigName($organization, $uptimeCheckConfig) - { - return self::getOrganizationUptimeCheckConfigNameTemplate()->render([ - 'organization' => $organization, - 'uptime_check_config' => $uptimeCheckConfig, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_uptime_check_config resource. - * - * @param string $project - * @param string $uptimeCheckConfig - * - * @return string The formatted project_uptime_check_config resource. - */ - public static function projectUptimeCheckConfigName($project, $uptimeCheckConfig) - { - return self::getProjectUptimeCheckConfigNameTemplate()->render([ - 'project' => $project, - 'uptime_check_config' => $uptimeCheckConfig, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * uptime_check_config resource. - * - * @param string $project - * @param string $uptimeCheckConfig - * - * @return string The formatted uptime_check_config resource. - */ - public static function uptimeCheckConfigName($project, $uptimeCheckConfig) - { - return self::getUptimeCheckConfigNameTemplate()->render([ - 'project' => $project, - 'uptime_check_config' => $uptimeCheckConfig, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - folderUptimeCheckConfig: folders/{folder}/uptimeCheckConfigs/{uptime_check_config} - * - function: projects/{project}/locations/{location}/functions/{function} - * - organizationUptimeCheckConfig: organizations/{organization}/uptimeCheckConfigs/{uptime_check_config} - * - projectUptimeCheckConfig: projects/{project}/uptimeCheckConfigs/{uptime_check_config} - * - uptimeCheckConfig: projects/{project}/uptimeCheckConfigs/{uptime_check_config} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName($formattedName, $template = null) - { - $templateMap = self::getPathTemplateMap(); - if ($template) { - if (!isset($templateMap[$template])) { - throw new ValidationException("Template name $template does not exist"); - } - - return $templateMap[$template]->match($formattedName); - } - - foreach ($templateMap as $templateName => $pathTemplate) { - try { - return $pathTemplate->match($formattedName); - } catch (ValidationException $ex) { - // Swallow the exception to continue trying other path templates - } - } - - throw new ValidationException("Input did not match any known format. Input: $formattedName"); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'monitoring.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** - * Creates a new Uptime check configuration. - * - * Sample code: - * ``` - * $uptimeCheckServiceClient = new UptimeCheckServiceClient(); - * try { - * $parent = 'parent'; - * $uptimeCheckConfig = new UptimeCheckConfig(); - * $response = $uptimeCheckServiceClient->createUptimeCheckConfig($parent, $uptimeCheckConfig); - * } finally { - * $uptimeCheckServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The - * [project](https://cloud.google.com/monitoring/api/v3#project_name) in which - * to create the Uptime check. The format is: - * - * projects/[PROJECT_ID_OR_NUMBER] - * @param UptimeCheckConfig $uptimeCheckConfig Required. The new Uptime check configuration. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Monitoring\V3\UptimeCheckConfig - * - * @throws ApiException if the remote call fails - */ - public function createUptimeCheckConfig($parent, $uptimeCheckConfig, array $optionalArgs = []) - { - $request = new CreateUptimeCheckConfigRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setUptimeCheckConfig($uptimeCheckConfig); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateUptimeCheckConfig', UptimeCheckConfig::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes an Uptime check configuration. Note that this method will fail - * if the Uptime check configuration is referenced by an alert policy or - * other dependent configs that would be rendered invalid by the deletion. - * - * Sample code: - * ``` - * $uptimeCheckServiceClient = new UptimeCheckServiceClient(); - * try { - * $formattedName = $uptimeCheckServiceClient->uptimeCheckConfigName('[PROJECT]', '[UPTIME_CHECK_CONFIG]'); - * $uptimeCheckServiceClient->deleteUptimeCheckConfig($formattedName); - * } finally { - * $uptimeCheckServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The Uptime check configuration to delete. The format is: - * - * projects/[PROJECT_ID_OR_NUMBER]/uptimeCheckConfigs/[UPTIME_CHECK_ID] - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException if the remote call fails - */ - public function deleteUptimeCheckConfig($name, array $optionalArgs = []) - { - $request = new DeleteUptimeCheckConfigRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteUptimeCheckConfig', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets a single Uptime check configuration. - * - * Sample code: - * ``` - * $uptimeCheckServiceClient = new UptimeCheckServiceClient(); - * try { - * $formattedName = $uptimeCheckServiceClient->uptimeCheckConfigName('[PROJECT]', '[UPTIME_CHECK_CONFIG]'); - * $response = $uptimeCheckServiceClient->getUptimeCheckConfig($formattedName); - * } finally { - * $uptimeCheckServiceClient->close(); - * } - * ``` - * - * @param string $name Required. The Uptime check configuration to retrieve. The format is: - * - * projects/[PROJECT_ID_OR_NUMBER]/uptimeCheckConfigs/[UPTIME_CHECK_ID] - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Monitoring\V3\UptimeCheckConfig - * - * @throws ApiException if the remote call fails - */ - public function getUptimeCheckConfig($name, array $optionalArgs = []) - { - $request = new GetUptimeCheckConfigRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetUptimeCheckConfig', UptimeCheckConfig::class, $optionalArgs, $request)->wait(); - } - - /** - * Lists the existing valid Uptime check configurations for the project - * (leaving out any invalid configurations). - * - * Sample code: - * ``` - * $uptimeCheckServiceClient = new UptimeCheckServiceClient(); - * try { - * $parent = 'parent'; - * // Iterate over pages of elements - * $pagedResponse = $uptimeCheckServiceClient->listUptimeCheckConfigs($parent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $uptimeCheckServiceClient->listUptimeCheckConfigs($parent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $uptimeCheckServiceClient->close(); - * } - * ``` - * - * @param string $parent Required. The - * [project](https://cloud.google.com/monitoring/api/v3#project_name) whose - * Uptime check configurations are listed. The format is: - * - * projects/[PROJECT_ID_OR_NUMBER] - * @param array $optionalArgs { - * Optional. - * - * @type string $filter - * If provided, this field specifies the criteria that must be met by - * uptime checks to be included in the response. - * - * For more details, see [Filtering - * syntax](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering#filter_syntax). - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listUptimeCheckConfigs($parent, array $optionalArgs = []) - { - $request = new ListUptimeCheckConfigsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListUptimeCheckConfigs', $optionalArgs, ListUptimeCheckConfigsResponse::class, $request); - } - - /** - * Returns the list of IP addresses that checkers run from - * - * Sample code: - * ``` - * $uptimeCheckServiceClient = new UptimeCheckServiceClient(); - * try { - * // Iterate over pages of elements - * $pagedResponse = $uptimeCheckServiceClient->listUptimeCheckIps(); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $uptimeCheckServiceClient->listUptimeCheckIps(); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $uptimeCheckServiceClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listUptimeCheckIps(array $optionalArgs = []) - { - $request = new ListUptimeCheckIpsRequest(); - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - return $this->getPagedListResponse('ListUptimeCheckIps', $optionalArgs, ListUptimeCheckIpsResponse::class, $request); - } - - /** - * Updates an Uptime check configuration. You can either replace the entire - * configuration with a new one or replace only certain fields in the current - * configuration by specifying the fields to be updated via `updateMask`. - * Returns the updated configuration. - * - * Sample code: - * ``` - * $uptimeCheckServiceClient = new UptimeCheckServiceClient(); - * try { - * $uptimeCheckConfig = new UptimeCheckConfig(); - * $response = $uptimeCheckServiceClient->updateUptimeCheckConfig($uptimeCheckConfig); - * } finally { - * $uptimeCheckServiceClient->close(); - * } - * ``` - * - * @param UptimeCheckConfig $uptimeCheckConfig Required. If an `updateMask` has been specified, this field gives - * the values for the set of fields mentioned in the `updateMask`. If an - * `updateMask` has not been given, this Uptime check configuration replaces - * the current configuration. If a field is mentioned in `updateMask` but - * the corresponding field is omitted in this partial Uptime check - * configuration, it has the effect of deleting/clearing the field from the - * configuration on the server. - * - * The following fields can be updated: `display_name`, - * `http_check`, `tcp_check`, `timeout`, `content_matchers`, and - * `selected_regions`. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * Optional. If present, only the listed fields in the current Uptime check - * configuration are updated with values from the new configuration. If this - * field is empty, then the current configuration is completely replaced with - * the new configuration. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\Cloud\Monitoring\V3\UptimeCheckConfig - * - * @throws ApiException if the remote call fails - */ - public function updateUptimeCheckConfig($uptimeCheckConfig, array $optionalArgs = []) - { - $request = new UpdateUptimeCheckConfigRequest(); - $requestParamHeaders = []; - $request->setUptimeCheckConfig($uptimeCheckConfig); - $requestParamHeaders['uptime_check_config.name'] = $uptimeCheckConfig->getName(); - if (isset($optionalArgs['updateMask'])) { - $request->setUpdateMask($optionalArgs['updateMask']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateUptimeCheckConfig', UptimeCheckConfig::class, $optionalArgs, $request)->wait(); - } -} diff --git a/owl-bot-staging/Monitoring/v3/src/V3/GroupServiceClient.php b/owl-bot-staging/Monitoring/v3/src/V3/GroupServiceClient.php deleted file mode 100644 index c8b5d43074ef..000000000000 --- a/owl-bot-staging/Monitoring/v3/src/V3/GroupServiceClient.php +++ /dev/null @@ -1,34 +0,0 @@ - [ - 'google.monitoring.v3.AlertPolicyService' => [ - 'CreateAlertPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Monitoring\V3\AlertPolicy', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteAlertPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetAlertPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Monitoring\V3\AlertPolicy', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListAlertPolicies' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getAlertPolicies', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Monitoring\V3\ListAlertPoliciesResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateAlertPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Monitoring\V3\AlertPolicy', - 'headerParams' => [ - [ - 'keyName' => 'alert_policy.name', - 'fieldAccessors' => [ - 'getAlertPolicy', - 'getName', - ], - ], - ], - ], - 'templateMap' => [ - 'alertPolicy' => 'projects/{project}/alertPolicies/{alert_policy}', - 'alertPolicyCondition' => 'projects/{project}/alertPolicies/{alert_policy}/conditions/{condition}', - 'folderAlertPolicy' => 'folders/{folder}/alertPolicies/{alert_policy}', - 'folderAlertPolicyCondition' => 'folders/{folder}/alertPolicies/{alert_policy}/conditions/{condition}', - 'organizationAlertPolicy' => 'organizations/{organization}/alertPolicies/{alert_policy}', - 'organizationAlertPolicyCondition' => 'organizations/{organization}/alertPolicies/{alert_policy}/conditions/{condition}', - 'projectAlertPolicy' => 'projects/{project}/alertPolicies/{alert_policy}', - 'projectAlertPolicyCondition' => 'projects/{project}/alertPolicies/{alert_policy}/conditions/{condition}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Monitoring/v3/src/V3/resources/alert_policy_service_rest_client_config.php b/owl-bot-staging/Monitoring/v3/src/V3/resources/alert_policy_service_rest_client_config.php deleted file mode 100644 index bb65ee95b1d7..000000000000 --- a/owl-bot-staging/Monitoring/v3/src/V3/resources/alert_policy_service_rest_client_config.php +++ /dev/null @@ -1,87 +0,0 @@ - [ - 'google.monitoring.v3.AlertPolicyService' => [ - 'CreateAlertPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v3/{name=projects/*}/alertPolicies', - 'body' => 'alert_policy', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteAlertPolicy' => [ - 'method' => 'delete', - 'uriTemplate' => '/v3/{name=projects/*/alertPolicies/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetAlertPolicy' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/alertPolicies/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListAlertPolicies' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*}/alertPolicies', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'UpdateAlertPolicy' => [ - 'method' => 'patch', - 'uriTemplate' => '/v3/{alert_policy.name=projects/*/alertPolicies/*}', - 'body' => 'alert_policy', - 'placeholders' => [ - 'alert_policy.name' => [ - 'getters' => [ - 'getAlertPolicy', - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Monitoring/v3/src/V3/resources/group_service_client_config.json b/owl-bot-staging/Monitoring/v3/src/V3/resources/group_service_client_config.json deleted file mode 100644 index 3701e6baf28a..000000000000 --- a/owl-bot-staging/Monitoring/v3/src/V3/resources/group_service_client_config.json +++ /dev/null @@ -1,86 +0,0 @@ -{ - "interfaces": { - "google.monitoring.v3.GroupService": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE" - ], - "retry_policy_2_codes": [ - "UNAVAILABLE" - ], - "no_retry_2_codes": [] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "retry_policy_1_params": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 30000, - "initial_rpc_timeout_millis": 30000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 30000, - "total_timeout_millis": 30000 - }, - "retry_policy_2_params": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 30000, - "initial_rpc_timeout_millis": 180000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 180000, - "total_timeout_millis": 180000 - }, - "no_retry_2_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 30000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 30000, - "total_timeout_millis": 30000 - } - }, - "methods": { - "CreateGroup": { - "timeout_millis": 30000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" - }, - "DeleteGroup": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetGroup": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListGroupMembers": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListGroups": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateGroup": { - "timeout_millis": 180000, - "retry_codes_name": "retry_policy_2_codes", - "retry_params_name": "retry_policy_2_params" - } - } - } - } -} diff --git a/owl-bot-staging/Monitoring/v3/src/V3/resources/group_service_descriptor_config.php b/owl-bot-staging/Monitoring/v3/src/V3/resources/group_service_descriptor_config.php deleted file mode 100644 index dba3498cf7f6..000000000000 --- a/owl-bot-staging/Monitoring/v3/src/V3/resources/group_service_descriptor_config.php +++ /dev/null @@ -1,123 +0,0 @@ - [ - 'google.monitoring.v3.GroupService' => [ - 'CreateGroup' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Monitoring\V3\Group', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteGroup' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetGroup' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Monitoring\V3\Group', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListGroupMembers' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getMembers', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Monitoring\V3\ListGroupMembersResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListGroups' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getGroup', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Monitoring\V3\ListGroupsResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateGroup' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Monitoring\V3\Group', - 'headerParams' => [ - [ - 'keyName' => 'group.name', - 'fieldAccessors' => [ - 'getGroup', - 'getName', - ], - ], - ], - ], - 'templateMap' => [ - 'folderGroup' => 'folders/{folder}/groups/{group}', - 'group' => 'projects/{project}/groups/{group}', - 'organizationGroup' => 'organizations/{organization}/groups/{group}', - 'projectGroup' => 'projects/{project}/groups/{group}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Monitoring/v3/src/V3/resources/group_service_rest_client_config.php b/owl-bot-staging/Monitoring/v3/src/V3/resources/group_service_rest_client_config.php deleted file mode 100644 index 1ec3e238ee16..000000000000 --- a/owl-bot-staging/Monitoring/v3/src/V3/resources/group_service_rest_client_config.php +++ /dev/null @@ -1,98 +0,0 @@ - [ - 'google.monitoring.v3.GroupService' => [ - 'CreateGroup' => [ - 'method' => 'post', - 'uriTemplate' => '/v3/{name=projects/*}/groups', - 'body' => 'group', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteGroup' => [ - 'method' => 'delete', - 'uriTemplate' => '/v3/{name=projects/*/groups/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetGroup' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/groups/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListGroupMembers' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/groups/*}/members', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListGroups' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*}/groups', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'UpdateGroup' => [ - 'method' => 'put', - 'uriTemplate' => '/v3/{group.name=projects/*/groups/*}', - 'body' => 'group', - 'placeholders' => [ - 'group.name' => [ - 'getters' => [ - 'getGroup', - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Monitoring/v3/src/V3/resources/metric_service_client_config.json b/owl-bot-staging/Monitoring/v3/src/V3/resources/metric_service_client_config.json deleted file mode 100644 index 37d238c05841..000000000000 --- a/owl-bot-staging/Monitoring/v3/src/V3/resources/metric_service_client_config.json +++ /dev/null @@ -1,101 +0,0 @@ -{ - "interfaces": { - "google.monitoring.v3.MetricService": { - "retry_codes": { - "no_retry_codes": [], - "no_retry_3_codes": [], - "retry_policy_7_codes": [ - "UNAVAILABLE" - ], - "retry_policy_8_codes": [ - "UNAVAILABLE" - ] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "no_retry_3_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 12000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 12000, - "total_timeout_millis": 12000 - }, - "retry_policy_7_params": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 30000, - "initial_rpc_timeout_millis": 30000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 30000, - "total_timeout_millis": 30000 - }, - "retry_policy_8_params": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 30000, - "initial_rpc_timeout_millis": 90000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 90000, - "total_timeout_millis": 90000 - } - }, - "methods": { - "CreateMetricDescriptor": { - "timeout_millis": 12000, - "retry_codes_name": "no_retry_3_codes", - "retry_params_name": "no_retry_3_params" - }, - "CreateServiceTimeSeries": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "CreateTimeSeries": { - "timeout_millis": 12000, - "retry_codes_name": "no_retry_3_codes", - "retry_params_name": "no_retry_3_params" - }, - "DeleteMetricDescriptor": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_7_codes", - "retry_params_name": "retry_policy_7_params" - }, - "GetMetricDescriptor": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_7_codes", - "retry_params_name": "retry_policy_7_params" - }, - "GetMonitoredResourceDescriptor": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_7_codes", - "retry_params_name": "retry_policy_7_params" - }, - "ListMetricDescriptors": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_7_codes", - "retry_params_name": "retry_policy_7_params" - }, - "ListMonitoredResourceDescriptors": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_7_codes", - "retry_params_name": "retry_policy_7_params" - }, - "ListTimeSeries": { - "timeout_millis": 90000, - "retry_codes_name": "retry_policy_8_codes", - "retry_params_name": "retry_policy_8_params" - } - } - } - } -} diff --git a/owl-bot-staging/Monitoring/v3/src/V3/resources/metric_service_descriptor_config.php b/owl-bot-staging/Monitoring/v3/src/V3/resources/metric_service_descriptor_config.php deleted file mode 100644 index 7b8896801ebc..000000000000 --- a/owl-bot-staging/Monitoring/v3/src/V3/resources/metric_service_descriptor_config.php +++ /dev/null @@ -1,174 +0,0 @@ - [ - 'google.monitoring.v3.MetricService' => [ - 'CreateMetricDescriptor' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Api\MetricDescriptor', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'CreateServiceTimeSeries' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'CreateTimeSeries' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteMetricDescriptor' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetMetricDescriptor' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Api\MetricDescriptor', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetMonitoredResourceDescriptor' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Api\MonitoredResourceDescriptor', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListMetricDescriptors' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getMetricDescriptors', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Monitoring\V3\ListMetricDescriptorsResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListMonitoredResourceDescriptors' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getResourceDescriptors', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Monitoring\V3\ListMonitoredResourceDescriptorsResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListTimeSeries' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getTimeSeries', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Monitoring\V3\ListTimeSeriesResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'templateMap' => [ - 'folder' => 'folders/{folder}', - 'folderMetricDescriptor' => 'folders/{folder}/metricDescriptors/{metric_descriptor=**}', - 'folderMonitoredResourceDescriptor' => 'folders/{folder}/monitoredResourceDescriptors/{monitored_resource_descriptor}', - 'metricDescriptor' => 'projects/{project}/metricDescriptors/{metric_descriptor=**}', - 'monitoredResourceDescriptor' => 'projects/{project}/monitoredResourceDescriptors/{monitored_resource_descriptor}', - 'organization' => 'organizations/{organization}', - 'organizationMetricDescriptor' => 'organizations/{organization}/metricDescriptors/{metric_descriptor=**}', - 'organizationMonitoredResourceDescriptor' => 'organizations/{organization}/monitoredResourceDescriptors/{monitored_resource_descriptor}', - 'project' => 'projects/{project}', - 'projectMetricDescriptor' => 'projects/{project}/metricDescriptors/{metric_descriptor=**}', - 'projectMonitoredResourceDescriptor' => 'projects/{project}/monitoredResourceDescriptors/{monitored_resource_descriptor}', - 'workspace' => 'projects/{project}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Monitoring/v3/src/V3/resources/metric_service_rest_client_config.php b/owl-bot-staging/Monitoring/v3/src/V3/resources/metric_service_rest_client_config.php deleted file mode 100644 index 0367626add51..000000000000 --- a/owl-bot-staging/Monitoring/v3/src/V3/resources/metric_service_rest_client_config.php +++ /dev/null @@ -1,156 +0,0 @@ - [ - 'google.monitoring.v3.MetricService' => [ - 'CreateMetricDescriptor' => [ - 'method' => 'post', - 'uriTemplate' => '/v3/{name=projects/*}/metricDescriptors', - 'body' => 'metric_descriptor', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'CreateServiceTimeSeries' => [ - 'method' => 'post', - 'uriTemplate' => '/v3/{name=projects/*}/timeSeries:createService', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'CreateTimeSeries' => [ - 'method' => 'post', - 'uriTemplate' => '/v3/{name=projects/*}/timeSeries', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteMetricDescriptor' => [ - 'method' => 'delete', - 'uriTemplate' => '/v3/{name=projects/*/metricDescriptors/**}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetMetricDescriptor' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/metricDescriptors/**}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetMonitoredResourceDescriptor' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/monitoredResourceDescriptors/**}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListMetricDescriptors' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*}/metricDescriptors', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListMonitoredResourceDescriptors' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*}/monitoredResourceDescriptors', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListTimeSeries' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*}/timeSeries', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=organizations/*}/timeSeries', - 'queryParams' => [ - 'filter', - 'interval', - 'view', - ], - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=folders/*}/timeSeries', - 'queryParams' => [ - 'filter', - 'interval', - 'view', - ], - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - 'queryParams' => [ - 'filter', - 'interval', - 'view', - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Monitoring/v3/src/V3/resources/notification_channel_service_client_config.json b/owl-bot-staging/Monitoring/v3/src/V3/resources/notification_channel_service_client_config.json deleted file mode 100644 index 90437e7f64c3..000000000000 --- a/owl-bot-staging/Monitoring/v3/src/V3/resources/notification_channel_service_client_config.json +++ /dev/null @@ -1,94 +0,0 @@ -{ - "interfaces": { - "google.monitoring.v3.NotificationChannelService": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_3_codes": [ - "UNAVAILABLE" - ], - "no_retry_5_codes": [] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "retry_policy_3_params": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 30000, - "initial_rpc_timeout_millis": 30000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 30000, - "total_timeout_millis": 30000 - }, - "no_retry_5_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 30000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 30000, - "total_timeout_millis": 30000 - } - }, - "methods": { - "CreateNotificationChannel": { - "timeout_millis": 30000, - "retry_codes_name": "no_retry_5_codes", - "retry_params_name": "no_retry_5_params" - }, - "DeleteNotificationChannel": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params" - }, - "GetNotificationChannel": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params" - }, - "GetNotificationChannelDescriptor": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params" - }, - "GetNotificationChannelVerificationCode": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params" - }, - "ListNotificationChannelDescriptors": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params" - }, - "ListNotificationChannels": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params" - }, - "SendNotificationChannelVerificationCode": { - "timeout_millis": 30000, - "retry_codes_name": "no_retry_5_codes", - "retry_params_name": "no_retry_5_params" - }, - "UpdateNotificationChannel": { - "timeout_millis": 30000, - "retry_codes_name": "no_retry_5_codes", - "retry_params_name": "no_retry_5_params" - }, - "VerifyNotificationChannel": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params" - } - } - } - } -} diff --git a/owl-bot-staging/Monitoring/v3/src/V3/resources/notification_channel_service_descriptor_config.php b/owl-bot-staging/Monitoring/v3/src/V3/resources/notification_channel_service_descriptor_config.php deleted file mode 100644 index 6088b2f89bf7..000000000000 --- a/owl-bot-staging/Monitoring/v3/src/V3/resources/notification_channel_service_descriptor_config.php +++ /dev/null @@ -1,175 +0,0 @@ - [ - 'google.monitoring.v3.NotificationChannelService' => [ - 'CreateNotificationChannel' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Monitoring\V3\NotificationChannel', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteNotificationChannel' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetNotificationChannel' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Monitoring\V3\NotificationChannel', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetNotificationChannelDescriptor' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Monitoring\V3\NotificationChannelDescriptor', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetNotificationChannelVerificationCode' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Monitoring\V3\GetNotificationChannelVerificationCodeResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListNotificationChannelDescriptors' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getChannelDescriptors', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Monitoring\V3\ListNotificationChannelDescriptorsResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListNotificationChannels' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getNotificationChannels', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Monitoring\V3\ListNotificationChannelsResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'SendNotificationChannelVerificationCode' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateNotificationChannel' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Monitoring\V3\NotificationChannel', - 'headerParams' => [ - [ - 'keyName' => 'notification_channel.name', - 'fieldAccessors' => [ - 'getNotificationChannel', - 'getName', - ], - ], - ], - ], - 'VerifyNotificationChannel' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Monitoring\V3\NotificationChannel', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'templateMap' => [ - 'folderChannelDescriptor' => 'folders/{folder}/notificationChannelDescriptors/{channel_descriptor}', - 'folderNotificationChannel' => 'folders/{folder}/notificationChannels/{notification_channel}', - 'notificationChannel' => 'projects/{project}/notificationChannels/{notification_channel}', - 'notificationChannelDescriptor' => 'projects/{project}/notificationChannelDescriptors/{channel_descriptor}', - 'organizationChannelDescriptor' => 'organizations/{organization}/notificationChannelDescriptors/{channel_descriptor}', - 'organizationNotificationChannel' => 'organizations/{organization}/notificationChannels/{notification_channel}', - 'projectChannelDescriptor' => 'projects/{project}/notificationChannelDescriptors/{channel_descriptor}', - 'projectNotificationChannel' => 'projects/{project}/notificationChannels/{notification_channel}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Monitoring/v3/src/V3/resources/notification_channel_service_rest_client_config.php b/owl-bot-staging/Monitoring/v3/src/V3/resources/notification_channel_service_rest_client_config.php deleted file mode 100644 index 822c7ebc9340..000000000000 --- a/owl-bot-staging/Monitoring/v3/src/V3/resources/notification_channel_service_rest_client_config.php +++ /dev/null @@ -1,145 +0,0 @@ - [ - 'google.monitoring.v3.NotificationChannelService' => [ - 'CreateNotificationChannel' => [ - 'method' => 'post', - 'uriTemplate' => '/v3/{name=projects/*}/notificationChannels', - 'body' => 'notification_channel', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteNotificationChannel' => [ - 'method' => 'delete', - 'uriTemplate' => '/v3/{name=projects/*/notificationChannels/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetNotificationChannel' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/notificationChannels/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetNotificationChannelDescriptor' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/notificationChannelDescriptors/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetNotificationChannelVerificationCode' => [ - 'method' => 'post', - 'uriTemplate' => '/v3/{name=projects/*/notificationChannels/*}:getVerificationCode', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListNotificationChannelDescriptors' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*}/notificationChannelDescriptors', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListNotificationChannels' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*}/notificationChannels', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'SendNotificationChannelVerificationCode' => [ - 'method' => 'post', - 'uriTemplate' => '/v3/{name=projects/*/notificationChannels/*}:sendVerificationCode', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'UpdateNotificationChannel' => [ - 'method' => 'patch', - 'uriTemplate' => '/v3/{notification_channel.name=projects/*/notificationChannels/*}', - 'body' => 'notification_channel', - 'placeholders' => [ - 'notification_channel.name' => [ - 'getters' => [ - 'getNotificationChannel', - 'getName', - ], - ], - ], - ], - 'VerifyNotificationChannel' => [ - 'method' => 'post', - 'uriTemplate' => '/v3/{name=projects/*/notificationChannels/*}:verify', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Monitoring/v3/src/V3/resources/query_service_client_config.json b/owl-bot-staging/Monitoring/v3/src/V3/resources/query_service_client_config.json deleted file mode 100644 index c20408d0eced..000000000000 --- a/owl-bot-staging/Monitoring/v3/src/V3/resources/query_service_client_config.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "interfaces": { - "google.monitoring.v3.QueryService": { - "retry_codes": { - "no_retry_codes": [] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - } - }, - "methods": { - "QueryTimeSeries": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - } - } - } - } -} diff --git a/owl-bot-staging/Monitoring/v3/src/V3/resources/query_service_descriptor_config.php b/owl-bot-staging/Monitoring/v3/src/V3/resources/query_service_descriptor_config.php deleted file mode 100644 index 4b6dc680ebc6..000000000000 --- a/owl-bot-staging/Monitoring/v3/src/V3/resources/query_service_descriptor_config.php +++ /dev/null @@ -1,48 +0,0 @@ - [ - 'google.monitoring.v3.QueryService' => [ - 'QueryTimeSeries' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getTimeSeriesData', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Monitoring\V3\QueryTimeSeriesResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - ], - ], -]; diff --git a/owl-bot-staging/Monitoring/v3/src/V3/resources/query_service_rest_client_config.php b/owl-bot-staging/Monitoring/v3/src/V3/resources/query_service_rest_client_config.php deleted file mode 100644 index 38b688dbab52..000000000000 --- a/owl-bot-staging/Monitoring/v3/src/V3/resources/query_service_rest_client_config.php +++ /dev/null @@ -1,41 +0,0 @@ - [ - 'google.monitoring.v3.QueryService' => [ - 'QueryTimeSeries' => [ - 'method' => 'post', - 'uriTemplate' => '/v3/{name=projects/*}/timeSeries:query', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Monitoring/v3/src/V3/resources/service_monitoring_service_client_config.json b/owl-bot-staging/Monitoring/v3/src/V3/resources/service_monitoring_service_client_config.json deleted file mode 100644 index daae71bdd457..000000000000 --- a/owl-bot-staging/Monitoring/v3/src/V3/resources/service_monitoring_service_client_config.json +++ /dev/null @@ -1,94 +0,0 @@ -{ - "interfaces": { - "google.monitoring.v3.ServiceMonitoringService": { - "retry_codes": { - "no_retry_codes": [], - "no_retry_4_codes": [], - "retry_policy_4_codes": [ - "UNAVAILABLE" - ] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "no_retry_4_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 30000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 30000, - "total_timeout_millis": 30000 - }, - "retry_policy_4_params": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 30000, - "initial_rpc_timeout_millis": 30000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 30000, - "total_timeout_millis": 30000 - } - }, - "methods": { - "CreateService": { - "timeout_millis": 30000, - "retry_codes_name": "no_retry_4_codes", - "retry_params_name": "no_retry_4_params" - }, - "CreateServiceLevelObjective": { - "timeout_millis": 30000, - "retry_codes_name": "no_retry_4_codes", - "retry_params_name": "no_retry_4_params" - }, - "DeleteService": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_4_codes", - "retry_params_name": "retry_policy_4_params" - }, - "DeleteServiceLevelObjective": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_4_codes", - "retry_params_name": "retry_policy_4_params" - }, - "GetService": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_4_codes", - "retry_params_name": "retry_policy_4_params" - }, - "GetServiceLevelObjective": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_4_codes", - "retry_params_name": "retry_policy_4_params" - }, - "ListServiceLevelObjectives": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_4_codes", - "retry_params_name": "retry_policy_4_params" - }, - "ListServices": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_4_codes", - "retry_params_name": "retry_policy_4_params" - }, - "UpdateService": { - "timeout_millis": 30000, - "retry_codes_name": "no_retry_4_codes", - "retry_params_name": "no_retry_4_params" - }, - "UpdateServiceLevelObjective": { - "timeout_millis": 30000, - "retry_codes_name": "no_retry_4_codes", - "retry_params_name": "no_retry_4_params" - } - } - } - } -} diff --git a/owl-bot-staging/Monitoring/v3/src/V3/resources/service_monitoring_service_descriptor_config.php b/owl-bot-staging/Monitoring/v3/src/V3/resources/service_monitoring_service_descriptor_config.php deleted file mode 100644 index 739ca8709340..000000000000 --- a/owl-bot-staging/Monitoring/v3/src/V3/resources/service_monitoring_service_descriptor_config.php +++ /dev/null @@ -1,176 +0,0 @@ - [ - 'google.monitoring.v3.ServiceMonitoringService' => [ - 'CreateService' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Monitoring\V3\Service', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateServiceLevelObjective' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Monitoring\V3\ServiceLevelObjective', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteService' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteServiceLevelObjective' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetService' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Monitoring\V3\Service', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetServiceLevelObjective' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Monitoring\V3\ServiceLevelObjective', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListServiceLevelObjectives' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getServiceLevelObjectives', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Monitoring\V3\ListServiceLevelObjectivesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListServices' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getServices', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Monitoring\V3\ListServicesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateService' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Monitoring\V3\Service', - 'headerParams' => [ - [ - 'keyName' => 'service.name', - 'fieldAccessors' => [ - 'getService', - 'getName', - ], - ], - ], - ], - 'UpdateServiceLevelObjective' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Monitoring\V3\ServiceLevelObjective', - 'headerParams' => [ - [ - 'keyName' => 'service_level_objective.name', - 'fieldAccessors' => [ - 'getServiceLevelObjective', - 'getName', - ], - ], - ], - ], - 'templateMap' => [ - 'folderService' => 'folders/{folder}/services/{service}', - 'folderServiceServiceLevelObjective' => 'folders/{folder}/services/{service}/serviceLevelObjectives/{service_level_objective}', - 'organizationService' => 'organizations/{organization}/services/{service}', - 'organizationServiceServiceLevelObjective' => 'organizations/{organization}/services/{service}/serviceLevelObjectives/{service_level_objective}', - 'projectService' => 'projects/{project}/services/{service}', - 'projectServiceServiceLevelObjective' => 'projects/{project}/services/{service}/serviceLevelObjectives/{service_level_objective}', - 'service' => 'projects/{project}/services/{service}', - 'serviceLevelObjective' => 'projects/{project}/services/{service}/serviceLevelObjectives/{service_level_objective}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Monitoring/v3/src/V3/resources/service_monitoring_service_rest_client_config.php b/owl-bot-staging/Monitoring/v3/src/V3/resources/service_monitoring_service_rest_client_config.php deleted file mode 100644 index f7ca03dded7a..000000000000 --- a/owl-bot-staging/Monitoring/v3/src/V3/resources/service_monitoring_service_rest_client_config.php +++ /dev/null @@ -1,145 +0,0 @@ - [ - 'google.monitoring.v3.ServiceMonitoringService' => [ - 'CreateService' => [ - 'method' => 'post', - 'uriTemplate' => '/v3/{parent=*/*}/services', - 'body' => 'service', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CreateServiceLevelObjective' => [ - 'method' => 'post', - 'uriTemplate' => '/v3/{parent=*/*/services/*}/serviceLevelObjectives', - 'body' => 'service_level_objective', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteService' => [ - 'method' => 'delete', - 'uriTemplate' => '/v3/{name=*/*/services/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteServiceLevelObjective' => [ - 'method' => 'delete', - 'uriTemplate' => '/v3/{name=*/*/services/*/serviceLevelObjectives/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetService' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=*/*/services/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetServiceLevelObjective' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=*/*/services/*/serviceLevelObjectives/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListServiceLevelObjectives' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{parent=*/*/services/*}/serviceLevelObjectives', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListServices' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{parent=*/*}/services', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateService' => [ - 'method' => 'patch', - 'uriTemplate' => '/v3/{service.name=*/*/services/*}', - 'body' => 'service', - 'placeholders' => [ - 'service.name' => [ - 'getters' => [ - 'getService', - 'getName', - ], - ], - ], - ], - 'UpdateServiceLevelObjective' => [ - 'method' => 'patch', - 'uriTemplate' => '/v3/{service_level_objective.name=*/*/services/*/serviceLevelObjectives/*}', - 'body' => 'service_level_objective', - 'placeholders' => [ - 'service_level_objective.name' => [ - 'getters' => [ - 'getServiceLevelObjective', - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Monitoring/v3/src/V3/resources/snooze_service_client_config.json b/owl-bot-staging/Monitoring/v3/src/V3/resources/snooze_service_client_config.json deleted file mode 100644 index 0acb65e12bd9..000000000000 --- a/owl-bot-staging/Monitoring/v3/src/V3/resources/snooze_service_client_config.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "interfaces": { - "google.monitoring.v3.SnoozeService": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_9_codes": [ - "UNAVAILABLE" - ], - "no_retry_7_codes": [] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "retry_policy_9_params": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 30000, - "initial_rpc_timeout_millis": 30000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 30000, - "total_timeout_millis": 30000 - }, - "no_retry_7_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 30000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 30000, - "total_timeout_millis": 30000 - } - }, - "methods": { - "CreateSnooze": { - "timeout_millis": 30000, - "retry_codes_name": "no_retry_7_codes", - "retry_params_name": "no_retry_7_params" - }, - "GetSnooze": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_9_codes", - "retry_params_name": "retry_policy_9_params" - }, - "ListSnoozes": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_9_codes", - "retry_params_name": "retry_policy_9_params" - }, - "UpdateSnooze": { - "timeout_millis": 30000, - "retry_codes_name": "no_retry_7_codes", - "retry_params_name": "no_retry_7_params" - } - } - } - } -} diff --git a/owl-bot-staging/Monitoring/v3/src/V3/resources/snooze_service_descriptor_config.php b/owl-bot-staging/Monitoring/v3/src/V3/resources/snooze_service_descriptor_config.php deleted file mode 100644 index 57e5c8ab3863..000000000000 --- a/owl-bot-staging/Monitoring/v3/src/V3/resources/snooze_service_descriptor_config.php +++ /dev/null @@ -1,94 +0,0 @@ - [ - 'google.monitoring.v3.SnoozeService' => [ - 'CreateSnooze' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Monitoring\V3\Snooze', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'GetSnooze' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Monitoring\V3\Snooze', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListSnoozes' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getSnoozes', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Monitoring\V3\ListSnoozesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateSnooze' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Monitoring\V3\Snooze', - 'headerParams' => [ - [ - 'keyName' => 'snooze.name', - 'fieldAccessors' => [ - 'getSnooze', - 'getName', - ], - ], - ], - ], - 'templateMap' => [ - 'alertPolicy' => 'projects/{project}/alertPolicies/{alert_policy}', - 'folderAlertPolicy' => 'folders/{folder}/alertPolicies/{alert_policy}', - 'organizationAlertPolicy' => 'organizations/{organization}/alertPolicies/{alert_policy}', - 'project' => 'projects/{project}', - 'projectAlertPolicy' => 'projects/{project}/alertPolicies/{alert_policy}', - 'snooze' => 'projects/{project}/snoozes/{snooze}', - 'workspace' => 'projects/{project}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Monitoring/v3/src/V3/resources/snooze_service_rest_client_config.php b/owl-bot-staging/Monitoring/v3/src/V3/resources/snooze_service_rest_client_config.php deleted file mode 100644 index a3b5e3574b8e..000000000000 --- a/owl-bot-staging/Monitoring/v3/src/V3/resources/snooze_service_rest_client_config.php +++ /dev/null @@ -1,79 +0,0 @@ - [ - 'google.monitoring.v3.SnoozeService' => [ - 'CreateSnooze' => [ - 'method' => 'post', - 'uriTemplate' => '/v3/{parent=projects/*}/snoozes', - 'body' => 'snooze', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'GetSnooze' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/snoozes/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListSnoozes' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{parent=projects/*}/snoozes', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateSnooze' => [ - 'method' => 'patch', - 'uriTemplate' => '/v3/{snooze.name=projects/*/snoozes/*}', - 'body' => 'snooze', - 'placeholders' => [ - 'snooze.name' => [ - 'getters' => [ - 'getSnooze', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Monitoring/v3/src/V3/resources/uptime_check_service_client_config.json b/owl-bot-staging/Monitoring/v3/src/V3/resources/uptime_check_service_client_config.json deleted file mode 100644 index 4e19af233897..000000000000 --- a/owl-bot-staging/Monitoring/v3/src/V3/resources/uptime_check_service_client_config.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "interfaces": { - "google.monitoring.v3.UptimeCheckService": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_5_codes": [ - "UNAVAILABLE" - ], - "no_retry_6_codes": [] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "retry_policy_5_params": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 30000, - "initial_rpc_timeout_millis": 30000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 30000, - "total_timeout_millis": 30000 - }, - "no_retry_6_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 30000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 30000, - "total_timeout_millis": 30000 - } - }, - "methods": { - "CreateUptimeCheckConfig": { - "timeout_millis": 30000, - "retry_codes_name": "no_retry_6_codes", - "retry_params_name": "no_retry_6_params" - }, - "DeleteUptimeCheckConfig": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_5_codes", - "retry_params_name": "retry_policy_5_params" - }, - "GetUptimeCheckConfig": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_5_codes", - "retry_params_name": "retry_policy_5_params" - }, - "ListUptimeCheckConfigs": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_5_codes", - "retry_params_name": "retry_policy_5_params" - }, - "ListUptimeCheckIps": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_5_codes", - "retry_params_name": "retry_policy_5_params" - }, - "UpdateUptimeCheckConfig": { - "timeout_millis": 30000, - "retry_codes_name": "no_retry_6_codes", - "retry_params_name": "no_retry_6_params" - } - } - } - } -} diff --git a/owl-bot-staging/Monitoring/v3/src/V3/resources/uptime_check_service_descriptor_config.php b/owl-bot-staging/Monitoring/v3/src/V3/resources/uptime_check_service_descriptor_config.php deleted file mode 100644 index e1d4dafc1ca4..000000000000 --- a/owl-bot-staging/Monitoring/v3/src/V3/resources/uptime_check_service_descriptor_config.php +++ /dev/null @@ -1,116 +0,0 @@ - [ - 'google.monitoring.v3.UptimeCheckService' => [ - 'CreateUptimeCheckConfig' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Monitoring\V3\UptimeCheckConfig', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteUptimeCheckConfig' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetUptimeCheckConfig' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Monitoring\V3\UptimeCheckConfig', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListUptimeCheckConfigs' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getUptimeCheckConfigs', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Monitoring\V3\ListUptimeCheckConfigsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListUptimeCheckIps' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getUptimeCheckIps', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Monitoring\V3\ListUptimeCheckIpsResponse', - ], - 'UpdateUptimeCheckConfig' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Monitoring\V3\UptimeCheckConfig', - 'headerParams' => [ - [ - 'keyName' => 'uptime_check_config.name', - 'fieldAccessors' => [ - 'getUptimeCheckConfig', - 'getName', - ], - ], - ], - ], - 'templateMap' => [ - 'folderUptimeCheckConfig' => 'folders/{folder}/uptimeCheckConfigs/{uptime_check_config}', - 'function' => 'projects/{project}/locations/{location}/functions/{function}', - 'organizationUptimeCheckConfig' => 'organizations/{organization}/uptimeCheckConfigs/{uptime_check_config}', - 'projectUptimeCheckConfig' => 'projects/{project}/uptimeCheckConfigs/{uptime_check_config}', - 'uptimeCheckConfig' => 'projects/{project}/uptimeCheckConfigs/{uptime_check_config}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Monitoring/v3/src/V3/resources/uptime_check_service_rest_client_config.php b/owl-bot-staging/Monitoring/v3/src/V3/resources/uptime_check_service_rest_client_config.php deleted file mode 100644 index 4c50c3cd46b1..000000000000 --- a/owl-bot-staging/Monitoring/v3/src/V3/resources/uptime_check_service_rest_client_config.php +++ /dev/null @@ -1,91 +0,0 @@ - [ - 'google.monitoring.v3.UptimeCheckService' => [ - 'CreateUptimeCheckConfig' => [ - 'method' => 'post', - 'uriTemplate' => '/v3/{parent=projects/*}/uptimeCheckConfigs', - 'body' => 'uptime_check_config', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteUptimeCheckConfig' => [ - 'method' => 'delete', - 'uriTemplate' => '/v3/{name=projects/*/uptimeCheckConfigs/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetUptimeCheckConfig' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{name=projects/*/uptimeCheckConfigs/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListUptimeCheckConfigs' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/{parent=projects/*}/uptimeCheckConfigs', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListUptimeCheckIps' => [ - 'method' => 'get', - 'uriTemplate' => '/v3/uptimeCheckIps', - ], - 'UpdateUptimeCheckConfig' => [ - 'method' => 'patch', - 'uriTemplate' => '/v3/{uptime_check_config.name=projects/*/uptimeCheckConfigs/*}', - 'body' => 'uptime_check_config', - 'placeholders' => [ - 'uptime_check_config.name' => [ - 'getters' => [ - 'getUptimeCheckConfig', - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Monitoring/v3/tests/Unit/V3/AlertPolicyServiceClientTest.php b/owl-bot-staging/Monitoring/v3/tests/Unit/V3/AlertPolicyServiceClientTest.php deleted file mode 100644 index 9811f18bd6f3..000000000000 --- a/owl-bot-staging/Monitoring/v3/tests/Unit/V3/AlertPolicyServiceClientTest.php +++ /dev/null @@ -1,380 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return AlertPolicyServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new AlertPolicyServiceClient($options); - } - - /** @test */ - public function createAlertPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $expectedResponse = new AlertPolicy(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $alertPolicy = new AlertPolicy(); - $response = $gapicClient->createAlertPolicy($name, $alertPolicy); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.AlertPolicyService/CreateAlertPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $actualValue = $actualRequestObject->getAlertPolicy(); - $this->assertProtobufEquals($alertPolicy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createAlertPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $name = 'name3373707'; - $alertPolicy = new AlertPolicy(); - try { - $gapicClient->createAlertPolicy($name, $alertPolicy); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteAlertPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->alertPolicyName('[PROJECT]', '[ALERT_POLICY]'); - $gapicClient->deleteAlertPolicy($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.AlertPolicyService/DeleteAlertPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteAlertPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->alertPolicyName('[PROJECT]', '[ALERT_POLICY]'); - try { - $gapicClient->deleteAlertPolicy($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAlertPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $expectedResponse = new AlertPolicy(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->alertPolicyName('[PROJECT]', '[ALERT_POLICY]'); - $response = $gapicClient->getAlertPolicy($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.AlertPolicyService/GetAlertPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAlertPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->alertPolicyName('[PROJECT]', '[ALERT_POLICY]'); - try { - $gapicClient->getAlertPolicy($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAlertPoliciesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $totalSize = 705419236; - $alertPoliciesElement = new AlertPolicy(); - $alertPolicies = [ - $alertPoliciesElement, - ]; - $expectedResponse = new ListAlertPoliciesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setTotalSize($totalSize); - $expectedResponse->setAlertPolicies($alertPolicies); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $response = $gapicClient->listAlertPolicies($name); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getAlertPolicies()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.AlertPolicyService/ListAlertPolicies', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAlertPoliciesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $name = 'name3373707'; - try { - $gapicClient->listAlertPolicies($name); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateAlertPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $expectedResponse = new AlertPolicy(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $alertPolicy = new AlertPolicy(); - $response = $gapicClient->updateAlertPolicy($alertPolicy); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.AlertPolicyService/UpdateAlertPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getAlertPolicy(); - $this->assertProtobufEquals($alertPolicy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateAlertPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $alertPolicy = new AlertPolicy(); - try { - $gapicClient->updateAlertPolicy($alertPolicy); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Monitoring/v3/tests/Unit/V3/Client/AlertPolicyServiceClientTest.php b/owl-bot-staging/Monitoring/v3/tests/Unit/V3/Client/AlertPolicyServiceClientTest.php deleted file mode 100644 index 498d9a5be075..000000000000 --- a/owl-bot-staging/Monitoring/v3/tests/Unit/V3/Client/AlertPolicyServiceClientTest.php +++ /dev/null @@ -1,442 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return AlertPolicyServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new AlertPolicyServiceClient($options); - } - - /** @test */ - public function createAlertPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $expectedResponse = new AlertPolicy(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $alertPolicy = new AlertPolicy(); - $request = (new CreateAlertPolicyRequest()) - ->setName($name) - ->setAlertPolicy($alertPolicy); - $response = $gapicClient->createAlertPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.AlertPolicyService/CreateAlertPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $actualValue = $actualRequestObject->getAlertPolicy(); - $this->assertProtobufEquals($alertPolicy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createAlertPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $name = 'name3373707'; - $alertPolicy = new AlertPolicy(); - $request = (new CreateAlertPolicyRequest()) - ->setName($name) - ->setAlertPolicy($alertPolicy); - try { - $gapicClient->createAlertPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteAlertPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->alertPolicyName('[PROJECT]', '[ALERT_POLICY]'); - $request = (new DeleteAlertPolicyRequest()) - ->setName($formattedName); - $gapicClient->deleteAlertPolicy($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.AlertPolicyService/DeleteAlertPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteAlertPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->alertPolicyName('[PROJECT]', '[ALERT_POLICY]'); - $request = (new DeleteAlertPolicyRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteAlertPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAlertPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $expectedResponse = new AlertPolicy(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->alertPolicyName('[PROJECT]', '[ALERT_POLICY]'); - $request = (new GetAlertPolicyRequest()) - ->setName($formattedName); - $response = $gapicClient->getAlertPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.AlertPolicyService/GetAlertPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAlertPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->alertPolicyName('[PROJECT]', '[ALERT_POLICY]'); - $request = (new GetAlertPolicyRequest()) - ->setName($formattedName); - try { - $gapicClient->getAlertPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAlertPoliciesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $totalSize = 705419236; - $alertPoliciesElement = new AlertPolicy(); - $alertPolicies = [ - $alertPoliciesElement, - ]; - $expectedResponse = new ListAlertPoliciesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setTotalSize($totalSize); - $expectedResponse->setAlertPolicies($alertPolicies); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $request = (new ListAlertPoliciesRequest()) - ->setName($name); - $response = $gapicClient->listAlertPolicies($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getAlertPolicies()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.AlertPolicyService/ListAlertPolicies', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAlertPoliciesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $name = 'name3373707'; - $request = (new ListAlertPoliciesRequest()) - ->setName($name); - try { - $gapicClient->listAlertPolicies($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateAlertPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $expectedResponse = new AlertPolicy(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $alertPolicy = new AlertPolicy(); - $request = (new UpdateAlertPolicyRequest()) - ->setAlertPolicy($alertPolicy); - $response = $gapicClient->updateAlertPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.AlertPolicyService/UpdateAlertPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getAlertPolicy(); - $this->assertProtobufEquals($alertPolicy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateAlertPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $alertPolicy = new AlertPolicy(); - $request = (new UpdateAlertPolicyRequest()) - ->setAlertPolicy($alertPolicy); - try { - $gapicClient->updateAlertPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createAlertPolicyAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $expectedResponse = new AlertPolicy(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $alertPolicy = new AlertPolicy(); - $request = (new CreateAlertPolicyRequest()) - ->setName($name) - ->setAlertPolicy($alertPolicy); - $response = $gapicClient->createAlertPolicyAsync($request)->wait(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.AlertPolicyService/CreateAlertPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $actualValue = $actualRequestObject->getAlertPolicy(); - $this->assertProtobufEquals($alertPolicy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Monitoring/v3/tests/Unit/V3/Client/GroupServiceClientTest.php b/owl-bot-staging/Monitoring/v3/tests/Unit/V3/Client/GroupServiceClientTest.php deleted file mode 100644 index 5e7c3024f3ac..000000000000 --- a/owl-bot-staging/Monitoring/v3/tests/Unit/V3/Client/GroupServiceClientTest.php +++ /dev/null @@ -1,541 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return GroupServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new GroupServiceClient($options); - } - - /** @test */ - public function createGroupTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $parentName = 'parentName1015022848'; - $filter = 'filter-1274492040'; - $isCluster = false; - $expectedResponse = new Group(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setParentName($parentName); - $expectedResponse->setFilter($filter); - $expectedResponse->setIsCluster($isCluster); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $group = new Group(); - $request = (new CreateGroupRequest()) - ->setName($name) - ->setGroup($group); - $response = $gapicClient->createGroup($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.GroupService/CreateGroup', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $actualValue = $actualRequestObject->getGroup(); - $this->assertProtobufEquals($group, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createGroupExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $name = 'name3373707'; - $group = new Group(); - $request = (new CreateGroupRequest()) - ->setName($name) - ->setGroup($group); - try { - $gapicClient->createGroup($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteGroupTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->groupName('[PROJECT]', '[GROUP]'); - $request = (new DeleteGroupRequest()) - ->setName($formattedName); - $gapicClient->deleteGroup($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.GroupService/DeleteGroup', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteGroupExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->groupName('[PROJECT]', '[GROUP]'); - $request = (new DeleteGroupRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteGroup($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getGroupTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $parentName = 'parentName1015022848'; - $filter = 'filter-1274492040'; - $isCluster = false; - $expectedResponse = new Group(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setParentName($parentName); - $expectedResponse->setFilter($filter); - $expectedResponse->setIsCluster($isCluster); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->groupName('[PROJECT]', '[GROUP]'); - $request = (new GetGroupRequest()) - ->setName($formattedName); - $response = $gapicClient->getGroup($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.GroupService/GetGroup', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getGroupExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->groupName('[PROJECT]', '[GROUP]'); - $request = (new GetGroupRequest()) - ->setName($formattedName); - try { - $gapicClient->getGroup($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listGroupMembersTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $totalSize = 705419236; - $membersElement = new MonitoredResource(); - $members = [ - $membersElement, - ]; - $expectedResponse = new ListGroupMembersResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setTotalSize($totalSize); - $expectedResponse->setMembers($members); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->groupName('[PROJECT]', '[GROUP]'); - $request = (new ListGroupMembersRequest()) - ->setName($formattedName); - $response = $gapicClient->listGroupMembers($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getMembers()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.GroupService/ListGroupMembers', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listGroupMembersExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->groupName('[PROJECT]', '[GROUP]'); - $request = (new ListGroupMembersRequest()) - ->setName($formattedName); - try { - $gapicClient->listGroupMembers($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listGroupsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $groupElement = new Group(); - $group = [ - $groupElement, - ]; - $expectedResponse = new ListGroupsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setGroup($group); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $request = (new ListGroupsRequest()) - ->setName($name); - $response = $gapicClient->listGroups($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getGroup()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.GroupService/ListGroups', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listGroupsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $name = 'name3373707'; - $request = (new ListGroupsRequest()) - ->setName($name); - try { - $gapicClient->listGroups($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateGroupTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $parentName = 'parentName1015022848'; - $filter = 'filter-1274492040'; - $isCluster = false; - $expectedResponse = new Group(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setParentName($parentName); - $expectedResponse->setFilter($filter); - $expectedResponse->setIsCluster($isCluster); - $transport->addResponse($expectedResponse); - // Mock request - $group = new Group(); - $request = (new UpdateGroupRequest()) - ->setGroup($group); - $response = $gapicClient->updateGroup($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.GroupService/UpdateGroup', $actualFuncCall); - $actualValue = $actualRequestObject->getGroup(); - $this->assertProtobufEquals($group, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateGroupExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $group = new Group(); - $request = (new UpdateGroupRequest()) - ->setGroup($group); - try { - $gapicClient->updateGroup($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createGroupAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $parentName = 'parentName1015022848'; - $filter = 'filter-1274492040'; - $isCluster = false; - $expectedResponse = new Group(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setParentName($parentName); - $expectedResponse->setFilter($filter); - $expectedResponse->setIsCluster($isCluster); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $group = new Group(); - $request = (new CreateGroupRequest()) - ->setName($name) - ->setGroup($group); - $response = $gapicClient->createGroupAsync($request)->wait(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.GroupService/CreateGroup', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $actualValue = $actualRequestObject->getGroup(); - $this->assertProtobufEquals($group, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Monitoring/v3/tests/Unit/V3/Client/MetricServiceClientTest.php b/owl-bot-staging/Monitoring/v3/tests/Unit/V3/Client/MetricServiceClientTest.php deleted file mode 100644 index 8a38d03c86bc..000000000000 --- a/owl-bot-staging/Monitoring/v3/tests/Unit/V3/Client/MetricServiceClientTest.php +++ /dev/null @@ -1,769 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return MetricServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new MetricServiceClient($options); - } - - /** @test */ - public function createMetricDescriptorTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $type = 'type3575610'; - $unit = 'unit3594628'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $expectedResponse = new MetricDescriptor(); - $expectedResponse->setName($name2); - $expectedResponse->setType($type); - $expectedResponse->setUnit($unit); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $metricDescriptor = new MetricDescriptor(); - $request = (new CreateMetricDescriptorRequest()) - ->setName($name) - ->setMetricDescriptor($metricDescriptor); - $response = $gapicClient->createMetricDescriptor($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.MetricService/CreateMetricDescriptor', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $actualValue = $actualRequestObject->getMetricDescriptor(); - $this->assertProtobufEquals($metricDescriptor, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createMetricDescriptorExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $name = 'name3373707'; - $metricDescriptor = new MetricDescriptor(); - $request = (new CreateMetricDescriptorRequest()) - ->setName($name) - ->setMetricDescriptor($metricDescriptor); - try { - $gapicClient->createMetricDescriptor($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createServiceTimeSeriesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->projectName('[PROJECT]'); - $timeSeries = []; - $request = (new CreateTimeSeriesRequest()) - ->setName($formattedName) - ->setTimeSeries($timeSeries); - $gapicClient->createServiceTimeSeries($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.MetricService/CreateServiceTimeSeries', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getTimeSeries(); - $this->assertProtobufEquals($timeSeries, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createServiceTimeSeriesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->projectName('[PROJECT]'); - $timeSeries = []; - $request = (new CreateTimeSeriesRequest()) - ->setName($formattedName) - ->setTimeSeries($timeSeries); - try { - $gapicClient->createServiceTimeSeries($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createTimeSeriesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->projectName('[PROJECT]'); - $timeSeries = []; - $request = (new CreateTimeSeriesRequest()) - ->setName($formattedName) - ->setTimeSeries($timeSeries); - $gapicClient->createTimeSeries($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.MetricService/CreateTimeSeries', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getTimeSeries(); - $this->assertProtobufEquals($timeSeries, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createTimeSeriesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->projectName('[PROJECT]'); - $timeSeries = []; - $request = (new CreateTimeSeriesRequest()) - ->setName($formattedName) - ->setTimeSeries($timeSeries); - try { - $gapicClient->createTimeSeries($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteMetricDescriptorTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->metricDescriptorName('[PROJECT]', '[METRIC_DESCRIPTOR]'); - $request = (new DeleteMetricDescriptorRequest()) - ->setName($formattedName); - $gapicClient->deleteMetricDescriptor($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.MetricService/DeleteMetricDescriptor', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteMetricDescriptorExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->metricDescriptorName('[PROJECT]', '[METRIC_DESCRIPTOR]'); - $request = (new DeleteMetricDescriptorRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteMetricDescriptor($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getMetricDescriptorTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $type = 'type3575610'; - $unit = 'unit3594628'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $expectedResponse = new MetricDescriptor(); - $expectedResponse->setName($name2); - $expectedResponse->setType($type); - $expectedResponse->setUnit($unit); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->metricDescriptorName('[PROJECT]', '[METRIC_DESCRIPTOR]'); - $request = (new GetMetricDescriptorRequest()) - ->setName($formattedName); - $response = $gapicClient->getMetricDescriptor($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.MetricService/GetMetricDescriptor', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getMetricDescriptorExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->metricDescriptorName('[PROJECT]', '[METRIC_DESCRIPTOR]'); - $request = (new GetMetricDescriptorRequest()) - ->setName($formattedName); - try { - $gapicClient->getMetricDescriptor($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getMonitoredResourceDescriptorTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $type = 'type3575610'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $expectedResponse = new MonitoredResourceDescriptor(); - $expectedResponse->setName($name2); - $expectedResponse->setType($type); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->monitoredResourceDescriptorName('[PROJECT]', '[MONITORED_RESOURCE_DESCRIPTOR]'); - $request = (new GetMonitoredResourceDescriptorRequest()) - ->setName($formattedName); - $response = $gapicClient->getMonitoredResourceDescriptor($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.MetricService/GetMonitoredResourceDescriptor', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getMonitoredResourceDescriptorExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->monitoredResourceDescriptorName('[PROJECT]', '[MONITORED_RESOURCE_DESCRIPTOR]'); - $request = (new GetMonitoredResourceDescriptorRequest()) - ->setName($formattedName); - try { - $gapicClient->getMonitoredResourceDescriptor($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listMetricDescriptorsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $metricDescriptorsElement = new MetricDescriptor(); - $metricDescriptors = [ - $metricDescriptorsElement, - ]; - $expectedResponse = new ListMetricDescriptorsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setMetricDescriptors($metricDescriptors); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $request = (new ListMetricDescriptorsRequest()) - ->setName($name); - $response = $gapicClient->listMetricDescriptors($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getMetricDescriptors()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.MetricService/ListMetricDescriptors', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listMetricDescriptorsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $name = 'name3373707'; - $request = (new ListMetricDescriptorsRequest()) - ->setName($name); - try { - $gapicClient->listMetricDescriptors($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listMonitoredResourceDescriptorsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $resourceDescriptorsElement = new MonitoredResourceDescriptor(); - $resourceDescriptors = [ - $resourceDescriptorsElement, - ]; - $expectedResponse = new ListMonitoredResourceDescriptorsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setResourceDescriptors($resourceDescriptors); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $request = (new ListMonitoredResourceDescriptorsRequest()) - ->setName($name); - $response = $gapicClient->listMonitoredResourceDescriptors($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getResourceDescriptors()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.MetricService/ListMonitoredResourceDescriptors', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listMonitoredResourceDescriptorsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $name = 'name3373707'; - $request = (new ListMonitoredResourceDescriptorsRequest()) - ->setName($name); - try { - $gapicClient->listMonitoredResourceDescriptors($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listTimeSeriesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $unit = 'unit3594628'; - $timeSeriesElement = new TimeSeries(); - $timeSeries = [ - $timeSeriesElement, - ]; - $expectedResponse = new ListTimeSeriesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setUnit($unit); - $expectedResponse->setTimeSeries($timeSeries); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->workspaceName('[PROJECT]'); - $filter = 'filter-1274492040'; - $interval = new TimeInterval(); - $view = TimeSeriesView::FULL; - $request = (new ListTimeSeriesRequest()) - ->setName($formattedName) - ->setFilter($filter) - ->setInterval($interval) - ->setView($view); - $response = $gapicClient->listTimeSeries($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getTimeSeries()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.MetricService/ListTimeSeries', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getFilter(); - $this->assertProtobufEquals($filter, $actualValue); - $actualValue = $actualRequestObject->getInterval(); - $this->assertProtobufEquals($interval, $actualValue); - $actualValue = $actualRequestObject->getView(); - $this->assertProtobufEquals($view, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listTimeSeriesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->workspaceName('[PROJECT]'); - $filter = 'filter-1274492040'; - $interval = new TimeInterval(); - $view = TimeSeriesView::FULL; - $request = (new ListTimeSeriesRequest()) - ->setName($formattedName) - ->setFilter($filter) - ->setInterval($interval) - ->setView($view); - try { - $gapicClient->listTimeSeries($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createMetricDescriptorAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $type = 'type3575610'; - $unit = 'unit3594628'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $expectedResponse = new MetricDescriptor(); - $expectedResponse->setName($name2); - $expectedResponse->setType($type); - $expectedResponse->setUnit($unit); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $metricDescriptor = new MetricDescriptor(); - $request = (new CreateMetricDescriptorRequest()) - ->setName($name) - ->setMetricDescriptor($metricDescriptor); - $response = $gapicClient->createMetricDescriptorAsync($request)->wait(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.MetricService/CreateMetricDescriptor', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $actualValue = $actualRequestObject->getMetricDescriptor(); - $this->assertProtobufEquals($metricDescriptor, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Monitoring/v3/tests/Unit/V3/Client/NotificationChannelServiceClientTest.php b/owl-bot-staging/Monitoring/v3/tests/Unit/V3/Client/NotificationChannelServiceClientTest.php deleted file mode 100644 index 7a0e8fd53b02..000000000000 --- a/owl-bot-staging/Monitoring/v3/tests/Unit/V3/Client/NotificationChannelServiceClientTest.php +++ /dev/null @@ -1,809 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return NotificationChannelServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new NotificationChannelServiceClient($options); - } - - /** @test */ - public function createNotificationChannelTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $type = 'type3575610'; - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $expectedResponse = new NotificationChannel(); - $expectedResponse->setType($type); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $notificationChannel = new NotificationChannel(); - $request = (new CreateNotificationChannelRequest()) - ->setName($name) - ->setNotificationChannel($notificationChannel); - $response = $gapicClient->createNotificationChannel($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.NotificationChannelService/CreateNotificationChannel', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $actualValue = $actualRequestObject->getNotificationChannel(); - $this->assertProtobufEquals($notificationChannel, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createNotificationChannelExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $name = 'name3373707'; - $notificationChannel = new NotificationChannel(); - $request = (new CreateNotificationChannelRequest()) - ->setName($name) - ->setNotificationChannel($notificationChannel); - try { - $gapicClient->createNotificationChannel($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteNotificationChannelTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->notificationChannelName('[PROJECT]', '[NOTIFICATION_CHANNEL]'); - $request = (new DeleteNotificationChannelRequest()) - ->setName($formattedName); - $gapicClient->deleteNotificationChannel($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.NotificationChannelService/DeleteNotificationChannel', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteNotificationChannelExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->notificationChannelName('[PROJECT]', '[NOTIFICATION_CHANNEL]'); - $request = (new DeleteNotificationChannelRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteNotificationChannel($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getNotificationChannelTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $type = 'type3575610'; - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $expectedResponse = new NotificationChannel(); - $expectedResponse->setType($type); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->notificationChannelName('[PROJECT]', '[NOTIFICATION_CHANNEL]'); - $request = (new GetNotificationChannelRequest()) - ->setName($formattedName); - $response = $gapicClient->getNotificationChannel($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.NotificationChannelService/GetNotificationChannel', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getNotificationChannelExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->notificationChannelName('[PROJECT]', '[NOTIFICATION_CHANNEL]'); - $request = (new GetNotificationChannelRequest()) - ->setName($formattedName); - try { - $gapicClient->getNotificationChannel($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getNotificationChannelDescriptorTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $type = 'type3575610'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $expectedResponse = new NotificationChannelDescriptor(); - $expectedResponse->setName($name2); - $expectedResponse->setType($type); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->notificationChannelDescriptorName('[PROJECT]', '[CHANNEL_DESCRIPTOR]'); - $request = (new GetNotificationChannelDescriptorRequest()) - ->setName($formattedName); - $response = $gapicClient->getNotificationChannelDescriptor($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.NotificationChannelService/GetNotificationChannelDescriptor', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getNotificationChannelDescriptorExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->notificationChannelDescriptorName('[PROJECT]', '[CHANNEL_DESCRIPTOR]'); - $request = (new GetNotificationChannelDescriptorRequest()) - ->setName($formattedName); - try { - $gapicClient->getNotificationChannelDescriptor($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getNotificationChannelVerificationCodeTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $code = 'code3059181'; - $expectedResponse = new GetNotificationChannelVerificationCodeResponse(); - $expectedResponse->setCode($code); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->notificationChannelName('[PROJECT]', '[NOTIFICATION_CHANNEL]'); - $request = (new GetNotificationChannelVerificationCodeRequest()) - ->setName($formattedName); - $response = $gapicClient->getNotificationChannelVerificationCode($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.NotificationChannelService/GetNotificationChannelVerificationCode', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getNotificationChannelVerificationCodeExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->notificationChannelName('[PROJECT]', '[NOTIFICATION_CHANNEL]'); - $request = (new GetNotificationChannelVerificationCodeRequest()) - ->setName($formattedName); - try { - $gapicClient->getNotificationChannelVerificationCode($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listNotificationChannelDescriptorsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $channelDescriptorsElement = new NotificationChannelDescriptor(); - $channelDescriptors = [ - $channelDescriptorsElement, - ]; - $expectedResponse = new ListNotificationChannelDescriptorsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setChannelDescriptors($channelDescriptors); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $request = (new ListNotificationChannelDescriptorsRequest()) - ->setName($name); - $response = $gapicClient->listNotificationChannelDescriptors($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getChannelDescriptors()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.NotificationChannelService/ListNotificationChannelDescriptors', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listNotificationChannelDescriptorsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $name = 'name3373707'; - $request = (new ListNotificationChannelDescriptorsRequest()) - ->setName($name); - try { - $gapicClient->listNotificationChannelDescriptors($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listNotificationChannelsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $totalSize = 705419236; - $notificationChannelsElement = new NotificationChannel(); - $notificationChannels = [ - $notificationChannelsElement, - ]; - $expectedResponse = new ListNotificationChannelsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setTotalSize($totalSize); - $expectedResponse->setNotificationChannels($notificationChannels); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $request = (new ListNotificationChannelsRequest()) - ->setName($name); - $response = $gapicClient->listNotificationChannels($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getNotificationChannels()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.NotificationChannelService/ListNotificationChannels', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listNotificationChannelsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $name = 'name3373707'; - $request = (new ListNotificationChannelsRequest()) - ->setName($name); - try { - $gapicClient->listNotificationChannels($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function sendNotificationChannelVerificationCodeTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->notificationChannelName('[PROJECT]', '[NOTIFICATION_CHANNEL]'); - $request = (new SendNotificationChannelVerificationCodeRequest()) - ->setName($formattedName); - $gapicClient->sendNotificationChannelVerificationCode($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.NotificationChannelService/SendNotificationChannelVerificationCode', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function sendNotificationChannelVerificationCodeExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->notificationChannelName('[PROJECT]', '[NOTIFICATION_CHANNEL]'); - $request = (new SendNotificationChannelVerificationCodeRequest()) - ->setName($formattedName); - try { - $gapicClient->sendNotificationChannelVerificationCode($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateNotificationChannelTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $type = 'type3575610'; - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $expectedResponse = new NotificationChannel(); - $expectedResponse->setType($type); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $notificationChannel = new NotificationChannel(); - $request = (new UpdateNotificationChannelRequest()) - ->setNotificationChannel($notificationChannel); - $response = $gapicClient->updateNotificationChannel($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.NotificationChannelService/UpdateNotificationChannel', $actualFuncCall); - $actualValue = $actualRequestObject->getNotificationChannel(); - $this->assertProtobufEquals($notificationChannel, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateNotificationChannelExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $notificationChannel = new NotificationChannel(); - $request = (new UpdateNotificationChannelRequest()) - ->setNotificationChannel($notificationChannel); - try { - $gapicClient->updateNotificationChannel($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function verifyNotificationChannelTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $type = 'type3575610'; - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $expectedResponse = new NotificationChannel(); - $expectedResponse->setType($type); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->notificationChannelName('[PROJECT]', '[NOTIFICATION_CHANNEL]'); - $code = 'code3059181'; - $request = (new VerifyNotificationChannelRequest()) - ->setName($formattedName) - ->setCode($code); - $response = $gapicClient->verifyNotificationChannel($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.NotificationChannelService/VerifyNotificationChannel', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getCode(); - $this->assertProtobufEquals($code, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function verifyNotificationChannelExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->notificationChannelName('[PROJECT]', '[NOTIFICATION_CHANNEL]'); - $code = 'code3059181'; - $request = (new VerifyNotificationChannelRequest()) - ->setName($formattedName) - ->setCode($code); - try { - $gapicClient->verifyNotificationChannel($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createNotificationChannelAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $type = 'type3575610'; - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $expectedResponse = new NotificationChannel(); - $expectedResponse->setType($type); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $notificationChannel = new NotificationChannel(); - $request = (new CreateNotificationChannelRequest()) - ->setName($name) - ->setNotificationChannel($notificationChannel); - $response = $gapicClient->createNotificationChannelAsync($request)->wait(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.NotificationChannelService/CreateNotificationChannel', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $actualValue = $actualRequestObject->getNotificationChannel(); - $this->assertProtobufEquals($notificationChannel, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Monitoring/v3/tests/Unit/V3/Client/QueryServiceClientTest.php b/owl-bot-staging/Monitoring/v3/tests/Unit/V3/Client/QueryServiceClientTest.php deleted file mode 100644 index cd32140b2e9d..000000000000 --- a/owl-bot-staging/Monitoring/v3/tests/Unit/V3/Client/QueryServiceClientTest.php +++ /dev/null @@ -1,182 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return QueryServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new QueryServiceClient($options); - } - - /** @test */ - public function queryTimeSeriesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $timeSeriesDataElement = new TimeSeriesData(); - $timeSeriesData = [ - $timeSeriesDataElement, - ]; - $expectedResponse = new QueryTimeSeriesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setTimeSeriesData($timeSeriesData); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $query = 'query107944136'; - $request = (new QueryTimeSeriesRequest()) - ->setName($name) - ->setQuery($query); - $response = $gapicClient->queryTimeSeries($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getTimeSeriesData()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.QueryService/QueryTimeSeries', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $actualValue = $actualRequestObject->getQuery(); - $this->assertProtobufEquals($query, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function queryTimeSeriesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $name = 'name3373707'; - $query = 'query107944136'; - $request = (new QueryTimeSeriesRequest()) - ->setName($name) - ->setQuery($query); - try { - $gapicClient->queryTimeSeries($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function queryTimeSeriesAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $timeSeriesDataElement = new TimeSeriesData(); - $timeSeriesData = [ - $timeSeriesDataElement, - ]; - $expectedResponse = new QueryTimeSeriesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setTimeSeriesData($timeSeriesData); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $query = 'query107944136'; - $request = (new QueryTimeSeriesRequest()) - ->setName($name) - ->setQuery($query); - $response = $gapicClient->queryTimeSeriesAsync($request)->wait(); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getTimeSeriesData()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.QueryService/QueryTimeSeries', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $actualValue = $actualRequestObject->getQuery(); - $this->assertProtobufEquals($query, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Monitoring/v3/tests/Unit/V3/Client/ServiceMonitoringServiceClientTest.php b/owl-bot-staging/Monitoring/v3/tests/Unit/V3/Client/ServiceMonitoringServiceClientTest.php deleted file mode 100644 index d679066683c4..000000000000 --- a/owl-bot-staging/Monitoring/v3/tests/Unit/V3/Client/ServiceMonitoringServiceClientTest.php +++ /dev/null @@ -1,790 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return ServiceMonitoringServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new ServiceMonitoringServiceClient($options); - } - - /** @test */ - public function createServiceTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Service(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $parent = 'parent-995424086'; - $service = new Service(); - $request = (new CreateServiceRequest()) - ->setParent($parent) - ->setService($service); - $response = $gapicClient->createService($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.ServiceMonitoringService/CreateService', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); - $actualValue = $actualRequestObject->getService(); - $this->assertProtobufEquals($service, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createServiceExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $parent = 'parent-995424086'; - $service = new Service(); - $request = (new CreateServiceRequest()) - ->setParent($parent) - ->setService($service); - try { - $gapicClient->createService($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createServiceLevelObjectiveTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $goal = 317825.0; - $expectedResponse = new ServiceLevelObjective(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setGoal($goal); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->serviceName('[PROJECT]', '[SERVICE]'); - $serviceLevelObjective = new ServiceLevelObjective(); - $request = (new CreateServiceLevelObjectiveRequest()) - ->setParent($formattedParent) - ->setServiceLevelObjective($serviceLevelObjective); - $response = $gapicClient->createServiceLevelObjective($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.ServiceMonitoringService/CreateServiceLevelObjective', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getServiceLevelObjective(); - $this->assertProtobufEquals($serviceLevelObjective, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createServiceLevelObjectiveExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->serviceName('[PROJECT]', '[SERVICE]'); - $serviceLevelObjective = new ServiceLevelObjective(); - $request = (new CreateServiceLevelObjectiveRequest()) - ->setParent($formattedParent) - ->setServiceLevelObjective($serviceLevelObjective); - try { - $gapicClient->createServiceLevelObjective($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteServiceTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->serviceName('[PROJECT]', '[SERVICE]'); - $request = (new DeleteServiceRequest()) - ->setName($formattedName); - $gapicClient->deleteService($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.ServiceMonitoringService/DeleteService', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteServiceExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->serviceName('[PROJECT]', '[SERVICE]'); - $request = (new DeleteServiceRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteService($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteServiceLevelObjectiveTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->serviceLevelObjectiveName('[PROJECT]', '[SERVICE]', '[SERVICE_LEVEL_OBJECTIVE]'); - $request = (new DeleteServiceLevelObjectiveRequest()) - ->setName($formattedName); - $gapicClient->deleteServiceLevelObjective($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.ServiceMonitoringService/DeleteServiceLevelObjective', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteServiceLevelObjectiveExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->serviceLevelObjectiveName('[PROJECT]', '[SERVICE]', '[SERVICE_LEVEL_OBJECTIVE]'); - $request = (new DeleteServiceLevelObjectiveRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteServiceLevelObjective($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getServiceTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Service(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->serviceName('[PROJECT]', '[SERVICE]'); - $request = (new GetServiceRequest()) - ->setName($formattedName); - $response = $gapicClient->getService($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.ServiceMonitoringService/GetService', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getServiceExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->serviceName('[PROJECT]', '[SERVICE]'); - $request = (new GetServiceRequest()) - ->setName($formattedName); - try { - $gapicClient->getService($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getServiceLevelObjectiveTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $goal = 317825.0; - $expectedResponse = new ServiceLevelObjective(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setGoal($goal); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->serviceLevelObjectiveName('[PROJECT]', '[SERVICE]', '[SERVICE_LEVEL_OBJECTIVE]'); - $request = (new GetServiceLevelObjectiveRequest()) - ->setName($formattedName); - $response = $gapicClient->getServiceLevelObjective($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.ServiceMonitoringService/GetServiceLevelObjective', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getServiceLevelObjectiveExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->serviceLevelObjectiveName('[PROJECT]', '[SERVICE]', '[SERVICE_LEVEL_OBJECTIVE]'); - $request = (new GetServiceLevelObjectiveRequest()) - ->setName($formattedName); - try { - $gapicClient->getServiceLevelObjective($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listServiceLevelObjectivesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $serviceLevelObjectivesElement = new ServiceLevelObjective(); - $serviceLevelObjectives = [ - $serviceLevelObjectivesElement, - ]; - $expectedResponse = new ListServiceLevelObjectivesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setServiceLevelObjectives($serviceLevelObjectives); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->serviceName('[PROJECT]', '[SERVICE]'); - $request = (new ListServiceLevelObjectivesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listServiceLevelObjectives($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getServiceLevelObjectives()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.ServiceMonitoringService/ListServiceLevelObjectives', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listServiceLevelObjectivesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->serviceName('[PROJECT]', '[SERVICE]'); - $request = (new ListServiceLevelObjectivesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listServiceLevelObjectives($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listServicesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $servicesElement = new Service(); - $services = [ - $servicesElement, - ]; - $expectedResponse = new ListServicesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setServices($services); - $transport->addResponse($expectedResponse); - // Mock request - $parent = 'parent-995424086'; - $request = (new ListServicesRequest()) - ->setParent($parent); - $response = $gapicClient->listServices($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getServices()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.ServiceMonitoringService/ListServices', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listServicesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $parent = 'parent-995424086'; - $request = (new ListServicesRequest()) - ->setParent($parent); - try { - $gapicClient->listServices($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateServiceTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Service(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $service = new Service(); - $request = (new UpdateServiceRequest()) - ->setService($service); - $response = $gapicClient->updateService($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.ServiceMonitoringService/UpdateService', $actualFuncCall); - $actualValue = $actualRequestObject->getService(); - $this->assertProtobufEquals($service, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateServiceExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $service = new Service(); - $request = (new UpdateServiceRequest()) - ->setService($service); - try { - $gapicClient->updateService($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateServiceLevelObjectiveTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $goal = 317825.0; - $expectedResponse = new ServiceLevelObjective(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setGoal($goal); - $transport->addResponse($expectedResponse); - // Mock request - $serviceLevelObjective = new ServiceLevelObjective(); - $request = (new UpdateServiceLevelObjectiveRequest()) - ->setServiceLevelObjective($serviceLevelObjective); - $response = $gapicClient->updateServiceLevelObjective($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.ServiceMonitoringService/UpdateServiceLevelObjective', $actualFuncCall); - $actualValue = $actualRequestObject->getServiceLevelObjective(); - $this->assertProtobufEquals($serviceLevelObjective, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateServiceLevelObjectiveExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $serviceLevelObjective = new ServiceLevelObjective(); - $request = (new UpdateServiceLevelObjectiveRequest()) - ->setServiceLevelObjective($serviceLevelObjective); - try { - $gapicClient->updateServiceLevelObjective($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createServiceAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Service(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $parent = 'parent-995424086'; - $service = new Service(); - $request = (new CreateServiceRequest()) - ->setParent($parent) - ->setService($service); - $response = $gapicClient->createServiceAsync($request)->wait(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.ServiceMonitoringService/CreateService', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); - $actualValue = $actualRequestObject->getService(); - $this->assertProtobufEquals($service, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Monitoring/v3/tests/Unit/V3/Client/SnoozeServiceClientTest.php b/owl-bot-staging/Monitoring/v3/tests/Unit/V3/Client/SnoozeServiceClientTest.php deleted file mode 100644 index f46286b29e35..000000000000 --- a/owl-bot-staging/Monitoring/v3/tests/Unit/V3/Client/SnoozeServiceClientTest.php +++ /dev/null @@ -1,416 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return SnoozeServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new SnoozeServiceClient($options); - } - - /** @test */ - public function createSnoozeTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Snooze(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->workspaceName('[PROJECT]'); - $snooze = new Snooze(); - $snoozeCriteria = new Criteria(); - $snooze->setCriteria($snoozeCriteria); - $snoozeInterval = new TimeInterval(); - $snooze->setInterval($snoozeInterval); - $snoozeDisplayName = 'snoozeDisplayName-1956223833'; - $snooze->setDisplayName($snoozeDisplayName); - $request = (new CreateSnoozeRequest()) - ->setParent($formattedParent) - ->setSnooze($snooze); - $response = $gapicClient->createSnooze($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.SnoozeService/CreateSnooze', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getSnooze(); - $this->assertProtobufEquals($snooze, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createSnoozeExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->workspaceName('[PROJECT]'); - $snooze = new Snooze(); - $snoozeCriteria = new Criteria(); - $snooze->setCriteria($snoozeCriteria); - $snoozeInterval = new TimeInterval(); - $snooze->setInterval($snoozeInterval); - $snoozeDisplayName = 'snoozeDisplayName-1956223833'; - $snooze->setDisplayName($snoozeDisplayName); - $request = (new CreateSnoozeRequest()) - ->setParent($formattedParent) - ->setSnooze($snooze); - try { - $gapicClient->createSnooze($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getSnoozeTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Snooze(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->snoozeName('[PROJECT]', '[SNOOZE]'); - $request = (new GetSnoozeRequest()) - ->setName($formattedName); - $response = $gapicClient->getSnooze($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.SnoozeService/GetSnooze', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getSnoozeExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->snoozeName('[PROJECT]', '[SNOOZE]'); - $request = (new GetSnoozeRequest()) - ->setName($formattedName); - try { - $gapicClient->getSnooze($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listSnoozesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $snoozesElement = new Snooze(); - $snoozes = [ - $snoozesElement, - ]; - $expectedResponse = new ListSnoozesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setSnoozes($snoozes); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->workspaceName('[PROJECT]'); - $request = (new ListSnoozesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listSnoozes($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getSnoozes()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.SnoozeService/ListSnoozes', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listSnoozesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->workspaceName('[PROJECT]'); - $request = (new ListSnoozesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listSnoozes($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateSnoozeTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Snooze(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $snooze = new Snooze(); - $snoozeCriteria = new Criteria(); - $snooze->setCriteria($snoozeCriteria); - $snoozeInterval = new TimeInterval(); - $snooze->setInterval($snoozeInterval); - $snoozeDisplayName = 'snoozeDisplayName-1956223833'; - $snooze->setDisplayName($snoozeDisplayName); - $updateMask = new FieldMask(); - $request = (new UpdateSnoozeRequest()) - ->setSnooze($snooze) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateSnooze($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.SnoozeService/UpdateSnooze', $actualFuncCall); - $actualValue = $actualRequestObject->getSnooze(); - $this->assertProtobufEquals($snooze, $actualValue); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateSnoozeExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $snooze = new Snooze(); - $snoozeCriteria = new Criteria(); - $snooze->setCriteria($snoozeCriteria); - $snoozeInterval = new TimeInterval(); - $snooze->setInterval($snoozeInterval); - $snoozeDisplayName = 'snoozeDisplayName-1956223833'; - $snooze->setDisplayName($snoozeDisplayName); - $updateMask = new FieldMask(); - $request = (new UpdateSnoozeRequest()) - ->setSnooze($snooze) - ->setUpdateMask($updateMask); - try { - $gapicClient->updateSnooze($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createSnoozeAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Snooze(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->workspaceName('[PROJECT]'); - $snooze = new Snooze(); - $snoozeCriteria = new Criteria(); - $snooze->setCriteria($snoozeCriteria); - $snoozeInterval = new TimeInterval(); - $snooze->setInterval($snoozeInterval); - $snoozeDisplayName = 'snoozeDisplayName-1956223833'; - $snooze->setDisplayName($snoozeDisplayName); - $request = (new CreateSnoozeRequest()) - ->setParent($formattedParent) - ->setSnooze($snooze); - $response = $gapicClient->createSnoozeAsync($request)->wait(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.SnoozeService/CreateSnooze', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getSnooze(); - $this->assertProtobufEquals($snooze, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Monitoring/v3/tests/Unit/V3/Client/UptimeCheckServiceClientTest.php b/owl-bot-staging/Monitoring/v3/tests/Unit/V3/Client/UptimeCheckServiceClientTest.php deleted file mode 100644 index 8b1fc5ae6539..000000000000 --- a/owl-bot-staging/Monitoring/v3/tests/Unit/V3/Client/UptimeCheckServiceClientTest.php +++ /dev/null @@ -1,517 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return UptimeCheckServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new UptimeCheckServiceClient($options); - } - - /** @test */ - public function createUptimeCheckConfigTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $isInternal = true; - $expectedResponse = new UptimeCheckConfig(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setIsInternal($isInternal); - $transport->addResponse($expectedResponse); - // Mock request - $parent = 'parent-995424086'; - $uptimeCheckConfig = new UptimeCheckConfig(); - $request = (new CreateUptimeCheckConfigRequest()) - ->setParent($parent) - ->setUptimeCheckConfig($uptimeCheckConfig); - $response = $gapicClient->createUptimeCheckConfig($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.UptimeCheckService/CreateUptimeCheckConfig', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); - $actualValue = $actualRequestObject->getUptimeCheckConfig(); - $this->assertProtobufEquals($uptimeCheckConfig, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createUptimeCheckConfigExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $parent = 'parent-995424086'; - $uptimeCheckConfig = new UptimeCheckConfig(); - $request = (new CreateUptimeCheckConfigRequest()) - ->setParent($parent) - ->setUptimeCheckConfig($uptimeCheckConfig); - try { - $gapicClient->createUptimeCheckConfig($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteUptimeCheckConfigTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->uptimeCheckConfigName('[PROJECT]', '[UPTIME_CHECK_CONFIG]'); - $request = (new DeleteUptimeCheckConfigRequest()) - ->setName($formattedName); - $gapicClient->deleteUptimeCheckConfig($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.UptimeCheckService/DeleteUptimeCheckConfig', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteUptimeCheckConfigExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->uptimeCheckConfigName('[PROJECT]', '[UPTIME_CHECK_CONFIG]'); - $request = (new DeleteUptimeCheckConfigRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteUptimeCheckConfig($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getUptimeCheckConfigTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $isInternal = true; - $expectedResponse = new UptimeCheckConfig(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setIsInternal($isInternal); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->uptimeCheckConfigName('[PROJECT]', '[UPTIME_CHECK_CONFIG]'); - $request = (new GetUptimeCheckConfigRequest()) - ->setName($formattedName); - $response = $gapicClient->getUptimeCheckConfig($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.UptimeCheckService/GetUptimeCheckConfig', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getUptimeCheckConfigExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->uptimeCheckConfigName('[PROJECT]', '[UPTIME_CHECK_CONFIG]'); - $request = (new GetUptimeCheckConfigRequest()) - ->setName($formattedName); - try { - $gapicClient->getUptimeCheckConfig($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listUptimeCheckConfigsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $totalSize = 705419236; - $uptimeCheckConfigsElement = new UptimeCheckConfig(); - $uptimeCheckConfigs = [ - $uptimeCheckConfigsElement, - ]; - $expectedResponse = new ListUptimeCheckConfigsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setTotalSize($totalSize); - $expectedResponse->setUptimeCheckConfigs($uptimeCheckConfigs); - $transport->addResponse($expectedResponse); - // Mock request - $parent = 'parent-995424086'; - $request = (new ListUptimeCheckConfigsRequest()) - ->setParent($parent); - $response = $gapicClient->listUptimeCheckConfigs($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getUptimeCheckConfigs()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.UptimeCheckService/ListUptimeCheckConfigs', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listUptimeCheckConfigsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $parent = 'parent-995424086'; - $request = (new ListUptimeCheckConfigsRequest()) - ->setParent($parent); - try { - $gapicClient->listUptimeCheckConfigs($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listUptimeCheckIpsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $uptimeCheckIpsElement = new UptimeCheckIp(); - $uptimeCheckIps = [ - $uptimeCheckIpsElement, - ]; - $expectedResponse = new ListUptimeCheckIpsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setUptimeCheckIps($uptimeCheckIps); - $transport->addResponse($expectedResponse); - $request = new ListUptimeCheckIpsRequest(); - $response = $gapicClient->listUptimeCheckIps($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getUptimeCheckIps()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.UptimeCheckService/ListUptimeCheckIps', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listUptimeCheckIpsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new ListUptimeCheckIpsRequest(); - try { - $gapicClient->listUptimeCheckIps($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateUptimeCheckConfigTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $isInternal = true; - $expectedResponse = new UptimeCheckConfig(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setIsInternal($isInternal); - $transport->addResponse($expectedResponse); - // Mock request - $uptimeCheckConfig = new UptimeCheckConfig(); - $request = (new UpdateUptimeCheckConfigRequest()) - ->setUptimeCheckConfig($uptimeCheckConfig); - $response = $gapicClient->updateUptimeCheckConfig($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.UptimeCheckService/UpdateUptimeCheckConfig', $actualFuncCall); - $actualValue = $actualRequestObject->getUptimeCheckConfig(); - $this->assertProtobufEquals($uptimeCheckConfig, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateUptimeCheckConfigExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $uptimeCheckConfig = new UptimeCheckConfig(); - $request = (new UpdateUptimeCheckConfigRequest()) - ->setUptimeCheckConfig($uptimeCheckConfig); - try { - $gapicClient->updateUptimeCheckConfig($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createUptimeCheckConfigAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $isInternal = true; - $expectedResponse = new UptimeCheckConfig(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setIsInternal($isInternal); - $transport->addResponse($expectedResponse); - // Mock request - $parent = 'parent-995424086'; - $uptimeCheckConfig = new UptimeCheckConfig(); - $request = (new CreateUptimeCheckConfigRequest()) - ->setParent($parent) - ->setUptimeCheckConfig($uptimeCheckConfig); - $response = $gapicClient->createUptimeCheckConfigAsync($request)->wait(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.UptimeCheckService/CreateUptimeCheckConfig', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); - $actualValue = $actualRequestObject->getUptimeCheckConfig(); - $this->assertProtobufEquals($uptimeCheckConfig, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Monitoring/v3/tests/Unit/V3/GroupServiceClientTest.php b/owl-bot-staging/Monitoring/v3/tests/Unit/V3/GroupServiceClientTest.php deleted file mode 100644 index 6ac70404aed4..000000000000 --- a/owl-bot-staging/Monitoring/v3/tests/Unit/V3/GroupServiceClientTest.php +++ /dev/null @@ -1,468 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return GroupServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new GroupServiceClient($options); - } - - /** @test */ - public function createGroupTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $parentName = 'parentName1015022848'; - $filter = 'filter-1274492040'; - $isCluster = false; - $expectedResponse = new Group(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setParentName($parentName); - $expectedResponse->setFilter($filter); - $expectedResponse->setIsCluster($isCluster); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $group = new Group(); - $response = $gapicClient->createGroup($name, $group); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.GroupService/CreateGroup', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $actualValue = $actualRequestObject->getGroup(); - $this->assertProtobufEquals($group, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createGroupExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $name = 'name3373707'; - $group = new Group(); - try { - $gapicClient->createGroup($name, $group); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteGroupTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->groupName('[PROJECT]', '[GROUP]'); - $gapicClient->deleteGroup($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.GroupService/DeleteGroup', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteGroupExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->groupName('[PROJECT]', '[GROUP]'); - try { - $gapicClient->deleteGroup($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getGroupTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $parentName = 'parentName1015022848'; - $filter = 'filter-1274492040'; - $isCluster = false; - $expectedResponse = new Group(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setParentName($parentName); - $expectedResponse->setFilter($filter); - $expectedResponse->setIsCluster($isCluster); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->groupName('[PROJECT]', '[GROUP]'); - $response = $gapicClient->getGroup($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.GroupService/GetGroup', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getGroupExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->groupName('[PROJECT]', '[GROUP]'); - try { - $gapicClient->getGroup($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listGroupMembersTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $totalSize = 705419236; - $membersElement = new MonitoredResource(); - $members = [ - $membersElement, - ]; - $expectedResponse = new ListGroupMembersResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setTotalSize($totalSize); - $expectedResponse->setMembers($members); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->groupName('[PROJECT]', '[GROUP]'); - $response = $gapicClient->listGroupMembers($formattedName); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getMembers()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.GroupService/ListGroupMembers', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listGroupMembersExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->groupName('[PROJECT]', '[GROUP]'); - try { - $gapicClient->listGroupMembers($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listGroupsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $groupElement = new Group(); - $group = [ - $groupElement, - ]; - $expectedResponse = new ListGroupsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setGroup($group); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $response = $gapicClient->listGroups($name); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getGroup()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.GroupService/ListGroups', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listGroupsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $name = 'name3373707'; - try { - $gapicClient->listGroups($name); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateGroupTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $parentName = 'parentName1015022848'; - $filter = 'filter-1274492040'; - $isCluster = false; - $expectedResponse = new Group(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setParentName($parentName); - $expectedResponse->setFilter($filter); - $expectedResponse->setIsCluster($isCluster); - $transport->addResponse($expectedResponse); - // Mock request - $group = new Group(); - $response = $gapicClient->updateGroup($group); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.GroupService/UpdateGroup', $actualFuncCall); - $actualValue = $actualRequestObject->getGroup(); - $this->assertProtobufEquals($group, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateGroupExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $group = new Group(); - try { - $gapicClient->updateGroup($group); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Monitoring/v3/tests/Unit/V3/MetricServiceClientTest.php b/owl-bot-staging/Monitoring/v3/tests/Unit/V3/MetricServiceClientTest.php deleted file mode 100644 index 443a3f9faf17..000000000000 --- a/owl-bot-staging/Monitoring/v3/tests/Unit/V3/MetricServiceClientTest.php +++ /dev/null @@ -1,672 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return MetricServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new MetricServiceClient($options); - } - - /** @test */ - public function createMetricDescriptorTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $type = 'type3575610'; - $unit = 'unit3594628'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $expectedResponse = new MetricDescriptor(); - $expectedResponse->setName($name2); - $expectedResponse->setType($type); - $expectedResponse->setUnit($unit); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $metricDescriptor = new MetricDescriptor(); - $response = $gapicClient->createMetricDescriptor($name, $metricDescriptor); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.MetricService/CreateMetricDescriptor', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $actualValue = $actualRequestObject->getMetricDescriptor(); - $this->assertProtobufEquals($metricDescriptor, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createMetricDescriptorExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $name = 'name3373707'; - $metricDescriptor = new MetricDescriptor(); - try { - $gapicClient->createMetricDescriptor($name, $metricDescriptor); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createServiceTimeSeriesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->projectName('[PROJECT]'); - $timeSeries = []; - $gapicClient->createServiceTimeSeries($formattedName, $timeSeries); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.MetricService/CreateServiceTimeSeries', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getTimeSeries(); - $this->assertProtobufEquals($timeSeries, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createServiceTimeSeriesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->projectName('[PROJECT]'); - $timeSeries = []; - try { - $gapicClient->createServiceTimeSeries($formattedName, $timeSeries); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createTimeSeriesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->projectName('[PROJECT]'); - $timeSeries = []; - $gapicClient->createTimeSeries($formattedName, $timeSeries); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.MetricService/CreateTimeSeries', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getTimeSeries(); - $this->assertProtobufEquals($timeSeries, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createTimeSeriesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->projectName('[PROJECT]'); - $timeSeries = []; - try { - $gapicClient->createTimeSeries($formattedName, $timeSeries); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteMetricDescriptorTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->metricDescriptorName('[PROJECT]', '[METRIC_DESCRIPTOR]'); - $gapicClient->deleteMetricDescriptor($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.MetricService/DeleteMetricDescriptor', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteMetricDescriptorExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->metricDescriptorName('[PROJECT]', '[METRIC_DESCRIPTOR]'); - try { - $gapicClient->deleteMetricDescriptor($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getMetricDescriptorTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $type = 'type3575610'; - $unit = 'unit3594628'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $expectedResponse = new MetricDescriptor(); - $expectedResponse->setName($name2); - $expectedResponse->setType($type); - $expectedResponse->setUnit($unit); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->metricDescriptorName('[PROJECT]', '[METRIC_DESCRIPTOR]'); - $response = $gapicClient->getMetricDescriptor($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.MetricService/GetMetricDescriptor', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getMetricDescriptorExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->metricDescriptorName('[PROJECT]', '[METRIC_DESCRIPTOR]'); - try { - $gapicClient->getMetricDescriptor($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getMonitoredResourceDescriptorTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $type = 'type3575610'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $expectedResponse = new MonitoredResourceDescriptor(); - $expectedResponse->setName($name2); - $expectedResponse->setType($type); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->monitoredResourceDescriptorName('[PROJECT]', '[MONITORED_RESOURCE_DESCRIPTOR]'); - $response = $gapicClient->getMonitoredResourceDescriptor($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.MetricService/GetMonitoredResourceDescriptor', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getMonitoredResourceDescriptorExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->monitoredResourceDescriptorName('[PROJECT]', '[MONITORED_RESOURCE_DESCRIPTOR]'); - try { - $gapicClient->getMonitoredResourceDescriptor($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listMetricDescriptorsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $metricDescriptorsElement = new MetricDescriptor(); - $metricDescriptors = [ - $metricDescriptorsElement, - ]; - $expectedResponse = new ListMetricDescriptorsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setMetricDescriptors($metricDescriptors); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $response = $gapicClient->listMetricDescriptors($name); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getMetricDescriptors()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.MetricService/ListMetricDescriptors', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listMetricDescriptorsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $name = 'name3373707'; - try { - $gapicClient->listMetricDescriptors($name); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listMonitoredResourceDescriptorsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $resourceDescriptorsElement = new MonitoredResourceDescriptor(); - $resourceDescriptors = [ - $resourceDescriptorsElement, - ]; - $expectedResponse = new ListMonitoredResourceDescriptorsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setResourceDescriptors($resourceDescriptors); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $response = $gapicClient->listMonitoredResourceDescriptors($name); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getResourceDescriptors()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.MetricService/ListMonitoredResourceDescriptors', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listMonitoredResourceDescriptorsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $name = 'name3373707'; - try { - $gapicClient->listMonitoredResourceDescriptors($name); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listTimeSeriesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $unit = 'unit3594628'; - $timeSeriesElement = new TimeSeries(); - $timeSeries = [ - $timeSeriesElement, - ]; - $expectedResponse = new ListTimeSeriesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setUnit($unit); - $expectedResponse->setTimeSeries($timeSeries); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->workspaceName('[PROJECT]'); - $filter = 'filter-1274492040'; - $interval = new TimeInterval(); - $view = TimeSeriesView::FULL; - $response = $gapicClient->listTimeSeries($formattedName, $filter, $interval, $view); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getTimeSeries()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.MetricService/ListTimeSeries', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getFilter(); - $this->assertProtobufEquals($filter, $actualValue); - $actualValue = $actualRequestObject->getInterval(); - $this->assertProtobufEquals($interval, $actualValue); - $actualValue = $actualRequestObject->getView(); - $this->assertProtobufEquals($view, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listTimeSeriesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->workspaceName('[PROJECT]'); - $filter = 'filter-1274492040'; - $interval = new TimeInterval(); - $view = TimeSeriesView::FULL; - try { - $gapicClient->listTimeSeries($formattedName, $filter, $interval, $view); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Monitoring/v3/tests/Unit/V3/NotificationChannelServiceClientTest.php b/owl-bot-staging/Monitoring/v3/tests/Unit/V3/NotificationChannelServiceClientTest.php deleted file mode 100644 index 9b115e176970..000000000000 --- a/owl-bot-staging/Monitoring/v3/tests/Unit/V3/NotificationChannelServiceClientTest.php +++ /dev/null @@ -1,716 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return NotificationChannelServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new NotificationChannelServiceClient($options); - } - - /** @test */ - public function createNotificationChannelTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $type = 'type3575610'; - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $expectedResponse = new NotificationChannel(); - $expectedResponse->setType($type); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $notificationChannel = new NotificationChannel(); - $response = $gapicClient->createNotificationChannel($name, $notificationChannel); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.NotificationChannelService/CreateNotificationChannel', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $actualValue = $actualRequestObject->getNotificationChannel(); - $this->assertProtobufEquals($notificationChannel, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createNotificationChannelExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $name = 'name3373707'; - $notificationChannel = new NotificationChannel(); - try { - $gapicClient->createNotificationChannel($name, $notificationChannel); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteNotificationChannelTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->notificationChannelName('[PROJECT]', '[NOTIFICATION_CHANNEL]'); - $gapicClient->deleteNotificationChannel($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.NotificationChannelService/DeleteNotificationChannel', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteNotificationChannelExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->notificationChannelName('[PROJECT]', '[NOTIFICATION_CHANNEL]'); - try { - $gapicClient->deleteNotificationChannel($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getNotificationChannelTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $type = 'type3575610'; - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $expectedResponse = new NotificationChannel(); - $expectedResponse->setType($type); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->notificationChannelName('[PROJECT]', '[NOTIFICATION_CHANNEL]'); - $response = $gapicClient->getNotificationChannel($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.NotificationChannelService/GetNotificationChannel', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getNotificationChannelExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->notificationChannelName('[PROJECT]', '[NOTIFICATION_CHANNEL]'); - try { - $gapicClient->getNotificationChannel($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getNotificationChannelDescriptorTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $type = 'type3575610'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $expectedResponse = new NotificationChannelDescriptor(); - $expectedResponse->setName($name2); - $expectedResponse->setType($type); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->notificationChannelDescriptorName('[PROJECT]', '[CHANNEL_DESCRIPTOR]'); - $response = $gapicClient->getNotificationChannelDescriptor($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.NotificationChannelService/GetNotificationChannelDescriptor', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getNotificationChannelDescriptorExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->notificationChannelDescriptorName('[PROJECT]', '[CHANNEL_DESCRIPTOR]'); - try { - $gapicClient->getNotificationChannelDescriptor($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getNotificationChannelVerificationCodeTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $code = 'code3059181'; - $expectedResponse = new GetNotificationChannelVerificationCodeResponse(); - $expectedResponse->setCode($code); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->notificationChannelName('[PROJECT]', '[NOTIFICATION_CHANNEL]'); - $response = $gapicClient->getNotificationChannelVerificationCode($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.NotificationChannelService/GetNotificationChannelVerificationCode', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getNotificationChannelVerificationCodeExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->notificationChannelName('[PROJECT]', '[NOTIFICATION_CHANNEL]'); - try { - $gapicClient->getNotificationChannelVerificationCode($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listNotificationChannelDescriptorsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $channelDescriptorsElement = new NotificationChannelDescriptor(); - $channelDescriptors = [ - $channelDescriptorsElement, - ]; - $expectedResponse = new ListNotificationChannelDescriptorsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setChannelDescriptors($channelDescriptors); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $response = $gapicClient->listNotificationChannelDescriptors($name); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getChannelDescriptors()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.NotificationChannelService/ListNotificationChannelDescriptors', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listNotificationChannelDescriptorsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $name = 'name3373707'; - try { - $gapicClient->listNotificationChannelDescriptors($name); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listNotificationChannelsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $totalSize = 705419236; - $notificationChannelsElement = new NotificationChannel(); - $notificationChannels = [ - $notificationChannelsElement, - ]; - $expectedResponse = new ListNotificationChannelsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setTotalSize($totalSize); - $expectedResponse->setNotificationChannels($notificationChannels); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $response = $gapicClient->listNotificationChannels($name); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getNotificationChannels()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.NotificationChannelService/ListNotificationChannels', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listNotificationChannelsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $name = 'name3373707'; - try { - $gapicClient->listNotificationChannels($name); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function sendNotificationChannelVerificationCodeTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->notificationChannelName('[PROJECT]', '[NOTIFICATION_CHANNEL]'); - $gapicClient->sendNotificationChannelVerificationCode($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.NotificationChannelService/SendNotificationChannelVerificationCode', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function sendNotificationChannelVerificationCodeExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->notificationChannelName('[PROJECT]', '[NOTIFICATION_CHANNEL]'); - try { - $gapicClient->sendNotificationChannelVerificationCode($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateNotificationChannelTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $type = 'type3575610'; - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $expectedResponse = new NotificationChannel(); - $expectedResponse->setType($type); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $notificationChannel = new NotificationChannel(); - $response = $gapicClient->updateNotificationChannel($notificationChannel); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.NotificationChannelService/UpdateNotificationChannel', $actualFuncCall); - $actualValue = $actualRequestObject->getNotificationChannel(); - $this->assertProtobufEquals($notificationChannel, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateNotificationChannelExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $notificationChannel = new NotificationChannel(); - try { - $gapicClient->updateNotificationChannel($notificationChannel); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function verifyNotificationChannelTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $type = 'type3575610'; - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $expectedResponse = new NotificationChannel(); - $expectedResponse->setType($type); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->notificationChannelName('[PROJECT]', '[NOTIFICATION_CHANNEL]'); - $code = 'code3059181'; - $response = $gapicClient->verifyNotificationChannel($formattedName, $code); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.NotificationChannelService/VerifyNotificationChannel', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getCode(); - $this->assertProtobufEquals($code, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function verifyNotificationChannelExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->notificationChannelName('[PROJECT]', '[NOTIFICATION_CHANNEL]'); - $code = 'code3059181'; - try { - $gapicClient->verifyNotificationChannel($formattedName, $code); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Monitoring/v3/tests/Unit/V3/QueryServiceClientTest.php b/owl-bot-staging/Monitoring/v3/tests/Unit/V3/QueryServiceClientTest.php deleted file mode 100644 index c64caa89013d..000000000000 --- a/owl-bot-staging/Monitoring/v3/tests/Unit/V3/QueryServiceClientTest.php +++ /dev/null @@ -1,134 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return QueryServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new QueryServiceClient($options); - } - - /** @test */ - public function queryTimeSeriesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $timeSeriesDataElement = new TimeSeriesData(); - $timeSeriesData = [ - $timeSeriesDataElement, - ]; - $expectedResponse = new QueryTimeSeriesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setTimeSeriesData($timeSeriesData); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $query = 'query107944136'; - $response = $gapicClient->queryTimeSeries($name, $query); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getTimeSeriesData()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.QueryService/QueryTimeSeries', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $actualValue = $actualRequestObject->getQuery(); - $this->assertProtobufEquals($query, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function queryTimeSeriesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $name = 'name3373707'; - $query = 'query107944136'; - try { - $gapicClient->queryTimeSeries($name, $query); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Monitoring/v3/tests/Unit/V3/ServiceMonitoringServiceClientTest.php b/owl-bot-staging/Monitoring/v3/tests/Unit/V3/ServiceMonitoringServiceClientTest.php deleted file mode 100644 index 7651f7245bce..000000000000 --- a/owl-bot-staging/Monitoring/v3/tests/Unit/V3/ServiceMonitoringServiceClientTest.php +++ /dev/null @@ -1,701 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return ServiceMonitoringServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new ServiceMonitoringServiceClient($options); - } - - /** @test */ - public function createServiceTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Service(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $parent = 'parent-995424086'; - $service = new Service(); - $response = $gapicClient->createService($parent, $service); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.ServiceMonitoringService/CreateService', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); - $actualValue = $actualRequestObject->getService(); - $this->assertProtobufEquals($service, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createServiceExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $parent = 'parent-995424086'; - $service = new Service(); - try { - $gapicClient->createService($parent, $service); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createServiceLevelObjectiveTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $goal = 317825.0; - $expectedResponse = new ServiceLevelObjective(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setGoal($goal); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->serviceName('[PROJECT]', '[SERVICE]'); - $serviceLevelObjective = new ServiceLevelObjective(); - $response = $gapicClient->createServiceLevelObjective($formattedParent, $serviceLevelObjective); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.ServiceMonitoringService/CreateServiceLevelObjective', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getServiceLevelObjective(); - $this->assertProtobufEquals($serviceLevelObjective, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createServiceLevelObjectiveExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->serviceName('[PROJECT]', '[SERVICE]'); - $serviceLevelObjective = new ServiceLevelObjective(); - try { - $gapicClient->createServiceLevelObjective($formattedParent, $serviceLevelObjective); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteServiceTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->serviceName('[PROJECT]', '[SERVICE]'); - $gapicClient->deleteService($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.ServiceMonitoringService/DeleteService', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteServiceExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->serviceName('[PROJECT]', '[SERVICE]'); - try { - $gapicClient->deleteService($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteServiceLevelObjectiveTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->serviceLevelObjectiveName('[PROJECT]', '[SERVICE]', '[SERVICE_LEVEL_OBJECTIVE]'); - $gapicClient->deleteServiceLevelObjective($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.ServiceMonitoringService/DeleteServiceLevelObjective', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteServiceLevelObjectiveExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->serviceLevelObjectiveName('[PROJECT]', '[SERVICE]', '[SERVICE_LEVEL_OBJECTIVE]'); - try { - $gapicClient->deleteServiceLevelObjective($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getServiceTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Service(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->serviceName('[PROJECT]', '[SERVICE]'); - $response = $gapicClient->getService($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.ServiceMonitoringService/GetService', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getServiceExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->serviceName('[PROJECT]', '[SERVICE]'); - try { - $gapicClient->getService($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getServiceLevelObjectiveTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $goal = 317825.0; - $expectedResponse = new ServiceLevelObjective(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setGoal($goal); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->serviceLevelObjectiveName('[PROJECT]', '[SERVICE]', '[SERVICE_LEVEL_OBJECTIVE]'); - $response = $gapicClient->getServiceLevelObjective($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.ServiceMonitoringService/GetServiceLevelObjective', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getServiceLevelObjectiveExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->serviceLevelObjectiveName('[PROJECT]', '[SERVICE]', '[SERVICE_LEVEL_OBJECTIVE]'); - try { - $gapicClient->getServiceLevelObjective($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listServiceLevelObjectivesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $serviceLevelObjectivesElement = new ServiceLevelObjective(); - $serviceLevelObjectives = [ - $serviceLevelObjectivesElement, - ]; - $expectedResponse = new ListServiceLevelObjectivesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setServiceLevelObjectives($serviceLevelObjectives); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->serviceName('[PROJECT]', '[SERVICE]'); - $response = $gapicClient->listServiceLevelObjectives($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getServiceLevelObjectives()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.ServiceMonitoringService/ListServiceLevelObjectives', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listServiceLevelObjectivesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->serviceName('[PROJECT]', '[SERVICE]'); - try { - $gapicClient->listServiceLevelObjectives($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listServicesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $servicesElement = new Service(); - $services = [ - $servicesElement, - ]; - $expectedResponse = new ListServicesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setServices($services); - $transport->addResponse($expectedResponse); - // Mock request - $parent = 'parent-995424086'; - $response = $gapicClient->listServices($parent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getServices()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.ServiceMonitoringService/ListServices', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listServicesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $parent = 'parent-995424086'; - try { - $gapicClient->listServices($parent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateServiceTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Service(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $service = new Service(); - $response = $gapicClient->updateService($service); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.ServiceMonitoringService/UpdateService', $actualFuncCall); - $actualValue = $actualRequestObject->getService(); - $this->assertProtobufEquals($service, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateServiceExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $service = new Service(); - try { - $gapicClient->updateService($service); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateServiceLevelObjectiveTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $goal = 317825.0; - $expectedResponse = new ServiceLevelObjective(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setGoal($goal); - $transport->addResponse($expectedResponse); - // Mock request - $serviceLevelObjective = new ServiceLevelObjective(); - $response = $gapicClient->updateServiceLevelObjective($serviceLevelObjective); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.ServiceMonitoringService/UpdateServiceLevelObjective', $actualFuncCall); - $actualValue = $actualRequestObject->getServiceLevelObjective(); - $this->assertProtobufEquals($serviceLevelObjective, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateServiceLevelObjectiveExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $serviceLevelObjective = new ServiceLevelObjective(); - try { - $gapicClient->updateServiceLevelObjective($serviceLevelObjective); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Monitoring/v3/tests/Unit/V3/SnoozeServiceClientTest.php b/owl-bot-staging/Monitoring/v3/tests/Unit/V3/SnoozeServiceClientTest.php deleted file mode 100644 index e446ff828d47..000000000000 --- a/owl-bot-staging/Monitoring/v3/tests/Unit/V3/SnoozeServiceClientTest.php +++ /dev/null @@ -1,351 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return SnoozeServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new SnoozeServiceClient($options); - } - - /** @test */ - public function createSnoozeTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Snooze(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->workspaceName('[PROJECT]'); - $snooze = new Snooze(); - $snoozeCriteria = new Criteria(); - $snooze->setCriteria($snoozeCriteria); - $snoozeInterval = new TimeInterval(); - $snooze->setInterval($snoozeInterval); - $snoozeDisplayName = 'snoozeDisplayName-1956223833'; - $snooze->setDisplayName($snoozeDisplayName); - $response = $gapicClient->createSnooze($formattedParent, $snooze); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.SnoozeService/CreateSnooze', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getSnooze(); - $this->assertProtobufEquals($snooze, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createSnoozeExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->workspaceName('[PROJECT]'); - $snooze = new Snooze(); - $snoozeCriteria = new Criteria(); - $snooze->setCriteria($snoozeCriteria); - $snoozeInterval = new TimeInterval(); - $snooze->setInterval($snoozeInterval); - $snoozeDisplayName = 'snoozeDisplayName-1956223833'; - $snooze->setDisplayName($snoozeDisplayName); - try { - $gapicClient->createSnooze($formattedParent, $snooze); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getSnoozeTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Snooze(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->snoozeName('[PROJECT]', '[SNOOZE]'); - $response = $gapicClient->getSnooze($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.SnoozeService/GetSnooze', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getSnoozeExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->snoozeName('[PROJECT]', '[SNOOZE]'); - try { - $gapicClient->getSnooze($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listSnoozesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $snoozesElement = new Snooze(); - $snoozes = [ - $snoozesElement, - ]; - $expectedResponse = new ListSnoozesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setSnoozes($snoozes); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->workspaceName('[PROJECT]'); - $response = $gapicClient->listSnoozes($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getSnoozes()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.SnoozeService/ListSnoozes', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listSnoozesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->workspaceName('[PROJECT]'); - try { - $gapicClient->listSnoozes($formattedParent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateSnoozeTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Snooze(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - // Mock request - $snooze = new Snooze(); - $snoozeCriteria = new Criteria(); - $snooze->setCriteria($snoozeCriteria); - $snoozeInterval = new TimeInterval(); - $snooze->setInterval($snoozeInterval); - $snoozeDisplayName = 'snoozeDisplayName-1956223833'; - $snooze->setDisplayName($snoozeDisplayName); - $updateMask = new FieldMask(); - $response = $gapicClient->updateSnooze($snooze, $updateMask); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.SnoozeService/UpdateSnooze', $actualFuncCall); - $actualValue = $actualRequestObject->getSnooze(); - $this->assertProtobufEquals($snooze, $actualValue); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateSnoozeExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $snooze = new Snooze(); - $snoozeCriteria = new Criteria(); - $snooze->setCriteria($snoozeCriteria); - $snoozeInterval = new TimeInterval(); - $snooze->setInterval($snoozeInterval); - $snoozeDisplayName = 'snoozeDisplayName-1956223833'; - $snooze->setDisplayName($snoozeDisplayName); - $updateMask = new FieldMask(); - try { - $gapicClient->updateSnooze($snooze, $updateMask); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Monitoring/v3/tests/Unit/V3/UptimeCheckServiceClientTest.php b/owl-bot-staging/Monitoring/v3/tests/Unit/V3/UptimeCheckServiceClientTest.php deleted file mode 100644 index 40d14acd439f..000000000000 --- a/owl-bot-staging/Monitoring/v3/tests/Unit/V3/UptimeCheckServiceClientTest.php +++ /dev/null @@ -1,450 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return UptimeCheckServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new UptimeCheckServiceClient($options); - } - - /** @test */ - public function createUptimeCheckConfigTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $isInternal = true; - $expectedResponse = new UptimeCheckConfig(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setIsInternal($isInternal); - $transport->addResponse($expectedResponse); - // Mock request - $parent = 'parent-995424086'; - $uptimeCheckConfig = new UptimeCheckConfig(); - $response = $gapicClient->createUptimeCheckConfig($parent, $uptimeCheckConfig); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.UptimeCheckService/CreateUptimeCheckConfig', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); - $actualValue = $actualRequestObject->getUptimeCheckConfig(); - $this->assertProtobufEquals($uptimeCheckConfig, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createUptimeCheckConfigExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $parent = 'parent-995424086'; - $uptimeCheckConfig = new UptimeCheckConfig(); - try { - $gapicClient->createUptimeCheckConfig($parent, $uptimeCheckConfig); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteUptimeCheckConfigTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->uptimeCheckConfigName('[PROJECT]', '[UPTIME_CHECK_CONFIG]'); - $gapicClient->deleteUptimeCheckConfig($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.UptimeCheckService/DeleteUptimeCheckConfig', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteUptimeCheckConfigExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->uptimeCheckConfigName('[PROJECT]', '[UPTIME_CHECK_CONFIG]'); - try { - $gapicClient->deleteUptimeCheckConfig($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getUptimeCheckConfigTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $isInternal = true; - $expectedResponse = new UptimeCheckConfig(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setIsInternal($isInternal); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->uptimeCheckConfigName('[PROJECT]', '[UPTIME_CHECK_CONFIG]'); - $response = $gapicClient->getUptimeCheckConfig($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.UptimeCheckService/GetUptimeCheckConfig', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getUptimeCheckConfigExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->uptimeCheckConfigName('[PROJECT]', '[UPTIME_CHECK_CONFIG]'); - try { - $gapicClient->getUptimeCheckConfig($formattedName); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listUptimeCheckConfigsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $totalSize = 705419236; - $uptimeCheckConfigsElement = new UptimeCheckConfig(); - $uptimeCheckConfigs = [ - $uptimeCheckConfigsElement, - ]; - $expectedResponse = new ListUptimeCheckConfigsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setTotalSize($totalSize); - $expectedResponse->setUptimeCheckConfigs($uptimeCheckConfigs); - $transport->addResponse($expectedResponse); - // Mock request - $parent = 'parent-995424086'; - $response = $gapicClient->listUptimeCheckConfigs($parent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getUptimeCheckConfigs()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.UptimeCheckService/ListUptimeCheckConfigs', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listUptimeCheckConfigsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $parent = 'parent-995424086'; - try { - $gapicClient->listUptimeCheckConfigs($parent); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listUptimeCheckIpsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $uptimeCheckIpsElement = new UptimeCheckIp(); - $uptimeCheckIps = [ - $uptimeCheckIpsElement, - ]; - $expectedResponse = new ListUptimeCheckIpsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setUptimeCheckIps($uptimeCheckIps); - $transport->addResponse($expectedResponse); - $response = $gapicClient->listUptimeCheckIps(); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getUptimeCheckIps()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.UptimeCheckService/ListUptimeCheckIps', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listUptimeCheckIpsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - try { - $gapicClient->listUptimeCheckIps(); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateUptimeCheckConfigTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $isInternal = true; - $expectedResponse = new UptimeCheckConfig(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setIsInternal($isInternal); - $transport->addResponse($expectedResponse); - // Mock request - $uptimeCheckConfig = new UptimeCheckConfig(); - $response = $gapicClient->updateUptimeCheckConfig($uptimeCheckConfig); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.monitoring.v3.UptimeCheckService/UpdateUptimeCheckConfig', $actualFuncCall); - $actualValue = $actualRequestObject->getUptimeCheckConfig(); - $this->assertProtobufEquals($uptimeCheckConfig, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateUptimeCheckConfigExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $uptimeCheckConfig = new UptimeCheckConfig(); - try { - $gapicClient->updateUptimeCheckConfig($uptimeCheckConfig); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/NetApp/v1/proto/src/GPBMetadata/Google/Cloud/Netapp/V1/ActiveDirectory.php b/owl-bot-staging/NetApp/v1/proto/src/GPBMetadata/Google/Cloud/Netapp/V1/ActiveDirectory.php deleted file mode 100644 index bdc4c8460eec8625daac151cb7b8f2029d3a12c4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3025 zcmb_e-A)@v6s|FL%$R^#61pKtv!SVQsA_^ zEQo7#2ZlHy1`7ibIDuz$qh61Mh7+7I>XFbijM~1@+CMVtwdT=7Fy%oMI>a*iLD2U| z#qom3t@uP>#wzFQ73>IlPHdNk#1TO_FcmUFK0YIyVTTxv_V!aycd@{oh63sANRUoT zfpng&ZzAM)m~*45z-lQLdW8)5V^PM@b3}jHub5X*rPAuL0d)-dz=8q+q%8T z2gJZPq`|)Lkn&?A#+15`SO5fU8L3xo$qDe$Y5IbMKK42_!kv&Zcvl-#Evrw&kV$z` zewH&5rzJy@>>F248J;;a8_lsvrCERZj%#yPJ__0 zMz0!yTxEJdl0aVDYDkB=^(p43*S~RSdqg1(1U_Sz+o}+(eMJ+(tFAlbcNfyJJY+=j zvx@#$Kx^-mhuTuCZmP63L+$GbQ|h{1^cr+7`+)91>sX86#7k*}f-`5yHkne}P)yMzis=#tRx z4)mNnS@|i0?qA_4XMxX&wu7{Z8i#j)+u3q)qqAyW&aXM?@P}yLCohCO=Av|aMq5P1 z$PWp2PH@*F;CB|h`Uc%;kO}q%DR-M_S~iyn=Fs(+Tlot@vjg`DGT~wh|GuHwMWqS8 z1}Z}Dz}9va(m^xO;v|qw-8iyJW91ik%Q1t-devJ#2Xd8MWv^naxUrnZEKOf?Sm5!+ z|JMsvzDM_J#3NU__kNLleFM!;#1QIYJU4*Gf(9HoD&DrN(j*jbb1-aFl7p;PMLF5a zWkP1ka~o?ZXA^y7GSAIJX%s^&qP!cNVd}@l7jrv{ra1*zRef3sWnG`^d07du{GO~6 zVRvc3Z5EOqeWBkNN$;Y?AnaqGzJyU2z=X0R7;Jh$Rniig!-U(!cftXaVtoeA3)*c| zh`5|*@Om`Df@20V_c=5Ky*N6)k4jzaoJPzJm|Pixkn6LuD5ZZH?Jiv6p26VZA`vc) zgb$F$i4%oX492W)judX8*;CiCPXaEKJ9El$=u+~OGJRhChFAJMZcC@R{hW#u+jB9~ zOCT)Be&HrlSw3+=Spcq7fp*yUso&Q%rTP(CO31JQ-U)mkRunMe`l6EWpuC5>#N+xc zaIv`YzkhKl2=MU*`ygSc;LH&N~!dr_Q_ zGuG4>nU$9)r_u)^ws3ev zXc-3K6%pFLHPHy#a+PamzT1fFH62ngN&7*%yuxsW{WYGqthWmGs#2?GpNU1DY=kpq_obRr8 zd#E%*>Pw~exi9?;mHI{c*iVp`zT_k1sk6Ixh7d?lc;UP|zuDQ}{APB(`OZJ`VUcbz zmjxzgLpnI6{D@IM@VIAr4jn|J5eum0jeXl;fktV4kM8buXrtcjJVa>dMS;b1dgytF z4y#&@7Y(Z}jiPP5J|H%`ppo(_(b1Rog+Mp~=nOmW1{;1hls+p}m9U zH2}*o!;sdb3wQ|>|NLm+*cJ`B$?@Nk9rkV4=C}V-gccP!L$Scc==w_J+QdrbaeSq1fyNTMXOc)XTJc9pb zVDSc`BXi0~lgiYTGPRTC`TH^0^zCX86QXoFpNLti7DZ4U39kENymoByAO=q?cyc#o zQ2sXuIVD_j52l3fODUSFiQhOrP) z%cYF)Nge<>@tkPP`cY^evi{(dv#>OUdl`jVhr&QsQJ8oQ(IdN?5;TvNCzK9uBH$XB&4Vy*vK*mE1xEmuw*Yv|9kC$#s?BW}P!ot029@)Z=UfFS{W!EtFC;f0m?B=#f$+C*F`WF2yjIbcp$%F_%2o+N-vGDs-imc|X2 z2d9L>taW7CZa>6gKj#zhWX0$FQz%>n6d-fVPE~@*9mt-TPNZ_1*VC)1@))u*h2%51 zx8E^3jed7`ztz}iZZ;eB;w|zCOmDOsMyI*ERZO9Se7Ci|XVk^dG|592_v$Z-8DUp% zY&WFcl-Ovr+k5R|R%~=zb>$#e{u-u4?#QQ5?7V1QJ`5nYW9)W~ZFSWC#`8wKyNz+A z_1{ykjbBsOrBsQLbdd5Nn8m~D%lPZ8>Ub9RW6#C4?O1BT(#Ll1}-L6p(E@17eWy2Aunn^a{uVAu`^yHf?7dcvL)t@ zR_gl|)u)no0XyoUmyA`|WO1@mz0)78B_DsK=eFb|rO8Q3+hyGFeeGcRpJbyK&sbu} z!mS=oS+CRg6-d`5O4rq%t{*H9a?J4Qp*ZWjSvr;#lA0XViG%LZBqB`9hnPfd|5 zIdrQA-nU(J(;w)%+X6*DpsRjG*7=04dS^%}w56}n3sX8yN<=ozADoK*hY`~u3=KLUn{>t-?qVx=Dy6(+!Yy` z$1+3nd~+MXv<%-TWtpia6TxdB_;Z66rX@Z%IR33NUuQPs%&^#ZxRo8!F)W{Ag1f$* zz&1H^Y$5_qY?H1(C1FnCyXrc)^&K)OsV2}sB$|gdr=D$C%?kBRkGb6OYUrwIUCM_T ziZAO=qh&=p)*}^@MNN_!TYK{P`r789&p9!t&On~ zoQeop!OAnp#na^=bxHeSW0VJwzA~(U$~I)RL27KRZ6HRd)~f z4y%>fd&(3{?$)cN#^Le)Y(mLG8eb}(&nAVTQa!3lLrNH`_4-MDc0w4=YLze|t^JgE zTlz5pg@~FVe8@^)MI|oAQBd{})UT+?{o?EB>AGk+CQ71Xaes=`KYp=-#GnI(c`qd@C(9m#Qb!glaAM>p5E$*Vp8}a0V|_Q^j%~nRd!$|4jNXE zy%Q&YEZ~)gFk{nixgIM_NMu%-hg@JIQOpaWVOVWyJzMx0;W~41#-O9xfQl7JqttRq zp;3x8yz9cQ|7YG5&S1GhEjqfWf6a~ZZwNeU#C!N#o{K|J6LU>1@x@jsvyn&(h3Ptj z84g7U$GA|3+}8Hs;n(ESzMR)oIj^b5l$TsrJ>UFmU}#2@oEYWM)WlitZE`sb(li;R oX`xNi&No{bc{zN%HoVzC3@4-5ASD!@nIncM=^2hX*KiH+56PT%_y7O^ diff --git a/owl-bot-staging/NetApp/v1/proto/src/GPBMetadata/Google/Cloud/Netapp/V1/BackupVault.php b/owl-bot-staging/NetApp/v1/proto/src/GPBMetadata/Google/Cloud/Netapp/V1/BackupVault.php deleted file mode 100644 index 283d37baeecce8db835e1b172f832ff9a443a496..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2445 zcmbtW(QXO=3$?&3{MB-HZ4&fK|Y?mctvo%!||Kj*MX+RR}d z6>LmKS45mM!aY~GrfZW?FqtrqnC>OFZ06~NG>^#PQJ=J$o&G~~_1(ZTnL*B6_snKB z({_V#&0&IaUYl;!M%26r_;5-CTj&ZEz@eAS=hS4R-EBO_rDH1SpsfG~dlF!9r~n41 zTRQ-zO?{s<6ws-}fmcBA$Agh=nZy@V;NK(5A6kwjENWXnVIsR^LT#U+|IM|Nz%hm8 zIz&1gIVP)ANr)-eKH@GWzDweWx{?dzVbE~|^Bigqn#?yniwoE5;!?vnV`9#roT*f! zZ6%yFA(b#j!?+RTE)ib9lDiY)F%fvqj*43X%;sN%1$@=HHQ2Y9J#MgbI<;KSFs`$@ z2KkU{k3|Q#wAY*twd-^0Uo5}l+_!I`1O&b0i+$A*Jb7wGgxAO8IlucT!^)fy$ zXC10b>rcBEF4dJ(^-!w%bgT3rf}q^0c@Zt4WJ|HSm4HzSwTWbWc!|kJD?W{!=PN{< zVYs0DdIjJ({>>%g~EzyoV&eU)fWeTf>vX<8EuO zv)^eo3m<9gu(sE0)%%^pb|IzZAd7?Mi$Yo&nyrJDGGwHo)$1Mg3Mu<~ z+xpKbco-da$Sa<+uVZ7YCHU0#kf-mNDg4^2=xbK9T@zc3>)>4cIg1*b>PI*~O0>Dz zXY1iGG;Ze;qjDGSwwXxm*keBgSPI%#@93fWrk?)0zPUui<=;|p|G@H-n0^fU4XkqN zF-Jr)i(s`Sh}eJ}r)O;FV>eZT%xW5dniB2>bCkYvS^?HvZ_K>m=ql3AZCIUHHg-zX z4r;0VIt9g>@%bG2WSRlDlGOPar_|f#5_;3_!ySkHD29ocWZ~pAlyu-=C79=QWXnRx zU>JX57<;Nb7Lflxc=`nHBr_OVW5t##>9qC~A}xeBU{sXLq$jI0T|S0lli3VQ{QCNf z5BEPS=2xWRgyW^V2o<|XplqtUDcvmUBJ<|2;=GZkJc#9vQTaFiNI?lp@dL-+C?wMF z%ImnBdbu6;qPRz59iO@J!vjkj-yUJL^U+TH@q7ASTfH)L^~%r>nW%HFpKkpX8wSz) zLq0&zG{6_g+w_Cb$uN|cVT3lrINchpsinternalAddGeneratedFile( - ' -øb -1google/cloud/netapp/v1/cloud_netapp_service.protogoogle.cloud.netapp.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto-google/cloud/netapp/v1/active_directory.proto#google/cloud/netapp/v1/backup.proto*google/cloud/netapp/v1/backup_policy.proto)google/cloud/netapp/v1/backup_vault.proto google/cloud/netapp/v1/kms.proto(google/cloud/netapp/v1/replication.proto%google/cloud/netapp/v1/snapshot.proto)google/cloud/netapp/v1/storage_pool.proto#google/cloud/netapp/v1/volume.proto#google/longrunning/operations.protogoogle/protobuf/empty.protogoogle/protobuf/timestamp.proto"€ -OperationMetadata4 - create_time ( 2.google.protobuf.TimestampBàA1 -end_time ( 2.google.protobuf.TimestampBàA -target ( BàA -verb ( BàA -status_message ( BàA# -requested_cancellation (BàA - api_version ( BàA2ìY -NetApp¸ -ListStoragePools/.google.cloud.netapp.v1.ListStoragePoolsRequest0.google.cloud.netapp.v1.ListStoragePoolsResponse"AÚAparent‚Óä“20/v1/{parent=projects/*/locations/*}/storagePoolsö -CreateStoragePool0.google.cloud.netapp.v1.CreateStoragePoolRequest.google.longrunning.Operation"ÊA - StoragePoolOperationMetadataÚA#parent,storage_pool,storage_pool_id‚Óä“@"0/v1/{parent=projects/*/locations/*}/storagePools: storage_pool¥ -GetStoragePool-.google.cloud.netapp.v1.GetStoragePoolRequest#.google.cloud.netapp.v1.StoragePool"?ÚAname‚Óä“20/v1/{name=projects/*/locations/*/storagePools/*}ø -UpdateStoragePool0.google.cloud.netapp.v1.UpdateStoragePoolRequest.google.longrunning.Operation"‘ÊA - StoragePoolOperationMetadataÚAstorage_pool,update_mask‚Óä“M2=/v1/{storage_pool.name=projects/*/locations/*/storagePools/*}: storage_poolÒ -DeleteStoragePool0.google.cloud.netapp.v1.DeleteStoragePoolRequest.google.longrunning.Operation"lÊA* -google.protobuf.EmptyOperationMetadataÚAname‚Óä“2*0/v1/{name=projects/*/locations/*/storagePools/*}× -SwitchActiveReplicaZone6.google.cloud.netapp.v1.SwitchActiveReplicaZoneRequest.google.longrunning.Operation"eÊA - StoragePoolOperationMetadata‚Óä“<"7/v1/{name=projects/*/locations/*/storagePools/*}:switch:*¤ - ListVolumes*.google.cloud.netapp.v1.ListVolumesRequest+.google.cloud.netapp.v1.ListVolumesResponse"<ÚAparent‚Óä“-+/v1/{parent=projects/*/locations/*}/volumes‘ - GetVolume(.google.cloud.netapp.v1.GetVolumeRequest.google.cloud.netapp.v1.Volume":ÚAname‚Óä“-+/v1/{name=projects/*/locations/*/volumes/*}Ï - CreateVolume+.google.cloud.netapp.v1.CreateVolumeRequest.google.longrunning.Operation"sÊA -VolumeOperationMetadataÚAparent,volume,volume_id‚Óä“5"+/v1/{parent=projects/*/locations/*}/volumes:volumeÑ - UpdateVolume+.google.cloud.netapp.v1.UpdateVolumeRequest.google.longrunning.Operation"uÊA -VolumeOperationMetadataÚAvolume,update_mask‚Óä“<22/v1/{volume.name=projects/*/locations/*/volumes/*}:volumeà - DeleteVolume+.google.cloud.netapp.v1.DeleteVolumeRequest.google.longrunning.Operation"gÊA* -google.protobuf.EmptyOperationMetadataÚAname‚Óä“-*+/v1/{name=projects/*/locations/*/volumes/*}· - RevertVolume+.google.cloud.netapp.v1.RevertVolumeRequest.google.longrunning.Operation"[ÊA -VolumeOperationMetadata‚Óä“7"2/v1/{name=projects/*/locations/*/volumes/*}:revert:*¶ - ListSnapshots,.google.cloud.netapp.v1.ListSnapshotsRequest-.google.cloud.netapp.v1.ListSnapshotsResponse"HÚAparent‚Óä“97/v1/{parent=projects/*/locations/*/volumes/*}/snapshots£ - GetSnapshot*.google.cloud.netapp.v1.GetSnapshotRequest .google.cloud.netapp.v1.Snapshot"FÚAname‚Óä“97/v1/{name=projects/*/locations/*/volumes/*/snapshots/*}è -CreateSnapshot-.google.cloud.netapp.v1.CreateSnapshotRequest.google.longrunning.Operation"‡ÊA -SnapshotOperationMetadataÚAparent,snapshot,snapshot_id‚Óä“C"7/v1/{parent=projects/*/locations/*/volumes/*}/snapshots:snapshotÓ -DeleteSnapshot-.google.cloud.netapp.v1.DeleteSnapshotRequest.google.longrunning.Operation"sÊA* -google.protobuf.EmptyOperationMetadataÚAname‚Óä“9*7/v1/{name=projects/*/locations/*/volumes/*/snapshots/*}ê -UpdateSnapshot-.google.cloud.netapp.v1.UpdateSnapshotRequest.google.longrunning.Operation"‰ÊA -SnapshotOperationMetadataÚAsnapshot,update_mask‚Óä“L2@/v1/{snapshot.name=projects/*/locations/*/volumes/*/snapshots/*}:snapshotÌ -ListActiveDirectories4.google.cloud.netapp.v1.ListActiveDirectoriesRequest5.google.cloud.netapp.v1.ListActiveDirectoriesResponse"FÚAparent‚Óä“75/v1/{parent=projects/*/locations/*}/activeDirectories¶ -GetActiveDirectory1.google.cloud.netapp.v1.GetActiveDirectoryRequest\'.google.cloud.netapp.v1.ActiveDirectory"DÚAname‚Óä“75/v1/{name=projects/*/locations/*/activeDirectories/*}“ -CreateActiveDirectory4.google.cloud.netapp.v1.CreateActiveDirectoryRequest.google.longrunning.Operation"¤ÊA$ -ActiveDirectoryOperationMetadataÚA+parent,active_directory,active_directory_id‚Óä“I"5/v1/{parent=projects/*/locations/*}/activeDirectories:active_directory• -UpdateActiveDirectory4.google.cloud.netapp.v1.UpdateActiveDirectoryRequest.google.longrunning.Operation"¦ÊA$ -ActiveDirectoryOperationMetadataÚAactive_directory,update_mask‚Óä“Z2F/v1/{active_directory.name=projects/*/locations/*/activeDirectories/*}:active_directoryß -DeleteActiveDirectory4.google.cloud.netapp.v1.DeleteActiveDirectoryRequest.google.longrunning.Operation"qÊA* -google.protobuf.EmptyOperationMetadataÚAname‚Óä“7*5/v1/{name=projects/*/locations/*/activeDirectories/*}° -ListKmsConfigs-.google.cloud.netapp.v1.ListKmsConfigsRequest..google.cloud.netapp.v1.ListKmsConfigsResponse"?ÚAparent‚Óä“0./v1/{parent=projects/*/locations/*}/kmsConfigsè -CreateKmsConfig..google.cloud.netapp.v1.CreateKmsConfigRequest.google.longrunning.Operation"…ÊA - KmsConfigOperationMetadataÚAparent,kms_config,kms_config_id‚Óä“<"./v1/{parent=projects/*/locations/*}/kmsConfigs: -kms_config - GetKmsConfig+.google.cloud.netapp.v1.GetKmsConfigRequest!.google.cloud.netapp.v1.KmsConfig"=ÚAname‚Óä“0./v1/{name=projects/*/locations/*/kmsConfigs/*}ê -UpdateKmsConfig..google.cloud.netapp.v1.UpdateKmsConfigRequest.google.longrunning.Operation"‡ÊA - KmsConfigOperationMetadataÚAkms_config,update_mask‚Óä“G29/v1/{kms_config.name=projects/*/locations/*/kmsConfigs/*}: -kms_config -EncryptVolumes-.google.cloud.netapp.v1.EncryptVolumesRequest.google.longrunning.Operation"bÊA - KmsConfigOperationMetadata‚Óä“;"6/v1/{name=projects/*/locations/*/kmsConfigs/*}:encrypt:*´ -VerifyKmsConfig..google.cloud.netapp.v1.VerifyKmsConfigRequest/.google.cloud.netapp.v1.VerifyKmsConfigResponse"@‚Óä“:"5/v1/{name=projects/*/locations/*/kmsConfigs/*}:verify:*Ì -DeleteKmsConfig..google.cloud.netapp.v1.DeleteKmsConfigRequest.google.longrunning.Operation"jÊA* -google.protobuf.EmptyOperationMetadataÚAname‚Óä“0*./v1/{name=projects/*/locations/*/kmsConfigs/*} -ListReplications/.google.cloud.netapp.v1.ListReplicationsRequest0.google.cloud.netapp.v1.ListReplicationsResponse"KÚAparent‚Óä“<:/v1/{parent=projects/*/locations/*/volumes/*}/replications¯ -GetReplication-.google.cloud.netapp.v1.GetReplicationRequest#.google.cloud.netapp.v1.Replication"IÚAname‚Óä“<:/v1/{name=projects/*/locations/*/volumes/*/replications/*}ý -CreateReplication0.google.cloud.netapp.v1.CreateReplicationRequest.google.longrunning.Operation"–ÊA - ReplicationOperationMetadataÚA!parent,replication,replication_id‚Óä“I":/v1/{parent=projects/*/locations/*/volumes/*}/replications: replicationÜ -DeleteReplication0.google.cloud.netapp.v1.DeleteReplicationRequest.google.longrunning.Operation"vÊA* -google.protobuf.EmptyOperationMetadataÚAname‚Óä“<*:/v1/{name=projects/*/locations/*/volumes/*/replications/*}ÿ -UpdateReplication0.google.cloud.netapp.v1.UpdateReplicationRequest.google.longrunning.Operation"˜ÊA - ReplicationOperationMetadataÚAreplication,update_mask‚Óä“U2F/v1/{replication.name=projects/*/locations/*/volumes/*/replications/*}: replicationÏ -StopReplication..google.cloud.netapp.v1.StopReplicationRequest.google.longrunning.Operation"mÊA - ReplicationOperationMetadata‚Óä“D"?/v1/{name=projects/*/locations/*/volumes/*/replications/*}:stop:*Õ -ResumeReplication0.google.cloud.netapp.v1.ResumeReplicationRequest.google.longrunning.Operation"oÊA - ReplicationOperationMetadata‚Óä“F"A/v1/{name=projects/*/locations/*/volumes/*/replications/*}:resume:*ó -ReverseReplicationDirection:.google.cloud.netapp.v1.ReverseReplicationDirectionRequest.google.longrunning.Operation"yÊA - ReplicationOperationMetadata‚Óä“P"K/v1/{name=projects/*/locations/*/volumes/*/replications/*}:reverseDirection:*Ý -EstablishPeering/.google.cloud.netapp.v1.EstablishPeeringRequest.google.longrunning.Operation"yÊA - ReplicationOperationMetadata‚Óä“P"K/v1/{name=projects/*/locations/*/volumes/*/replications/*}:establishPeering:*Ï -SyncReplication..google.cloud.netapp.v1.SyncReplicationRequest.google.longrunning.Operation"mÊA - ReplicationOperationMetadata‚Óä“D"?/v1/{name=projects/*/locations/*/volumes/*/replications/*}:sync:*ö -CreateBackupVault0.google.cloud.netapp.v1.CreateBackupVaultRequest.google.longrunning.Operation"ÊA - BackupVaultOperationMetadataÚA#parent,backup_vault,backup_vault_id‚Óä“@"0/v1/{parent=projects/*/locations/*}/backupVaults: backup_vault¥ -GetBackupVault-.google.cloud.netapp.v1.GetBackupVaultRequest#.google.cloud.netapp.v1.BackupVault"?ÚAname‚Óä“20/v1/{name=projects/*/locations/*/backupVaults/*}¸ -ListBackupVaults/.google.cloud.netapp.v1.ListBackupVaultsRequest0.google.cloud.netapp.v1.ListBackupVaultsResponse"AÚAparent‚Óä“20/v1/{parent=projects/*/locations/*}/backupVaultsø -UpdateBackupVault0.google.cloud.netapp.v1.UpdateBackupVaultRequest.google.longrunning.Operation"‘ÊA - BackupVaultOperationMetadataÚAbackup_vault,update_mask‚Óä“M2=/v1/{backup_vault.name=projects/*/locations/*/backupVaults/*}: backup_vaultÒ -DeleteBackupVault0.google.cloud.netapp.v1.DeleteBackupVaultRequest.google.longrunning.Operation"lÊA* -google.protobuf.EmptyOperationMetadataÚAname‚Óä“2*0/v1/{name=projects/*/locations/*/backupVaults/*}ß - CreateBackup+.google.cloud.netapp.v1.CreateBackupRequest.google.longrunning.Operation"‚ÊA -BackupOperationMetadataÚAparent,backup,backup_id‚Óä“D":/v1/{parent=projects/*/locations/*/backupVaults/*}/backups:backup  - GetBackup(.google.cloud.netapp.v1.GetBackupRequest.google.cloud.netapp.v1.Backup"IÚAname‚Óä“<:/v1/{name=projects/*/locations/*/backupVaults/*/backups/*}³ - ListBackups*.google.cloud.netapp.v1.ListBackupsRequest+.google.cloud.netapp.v1.ListBackupsResponse"KÚAparent‚Óä“<:/v1/{parent=projects/*/locations/*/backupVaults/*}/backupsÒ - DeleteBackup+.google.cloud.netapp.v1.DeleteBackupRequest.google.longrunning.Operation"vÊA* -google.protobuf.EmptyOperationMetadataÚAname‚Óä“<*:/v1/{name=projects/*/locations/*/backupVaults/*/backups/*}á - UpdateBackup+.google.cloud.netapp.v1.UpdateBackupRequest.google.longrunning.Operation"„ÊA -BackupOperationMetadataÚAbackup,update_mask‚Óä“K2A/v1/{backup.name=projects/*/locations/*/backupVaults/*/backups/*}:backupþ -CreateBackupPolicy1.google.cloud.netapp.v1.CreateBackupPolicyRequest.google.longrunning.Operation"•ÊA! - BackupPolicyOperationMetadataÚA%parent,backup_policy,backup_policy_id‚Óä“C"2/v1/{parent=projects/*/locations/*}/backupPolicies: backup_policyª -GetBackupPolicy..google.cloud.netapp.v1.GetBackupPolicyRequest$.google.cloud.netapp.v1.BackupPolicy"AÚAname‚Óä“42/v1/{name=projects/*/locations/*/backupPolicies/*}À -ListBackupPolicies1.google.cloud.netapp.v1.ListBackupPoliciesRequest2.google.cloud.netapp.v1.ListBackupPoliciesResponse"CÚAparent‚Óä“42/v1/{parent=projects/*/locations/*}/backupPolicies€ -UpdateBackupPolicy1.google.cloud.netapp.v1.UpdateBackupPolicyRequest.google.longrunning.Operation"—ÊA! - BackupPolicyOperationMetadataÚAbackup_policy,update_mask‚Óä“Q2@/v1/{backup_policy.name=projects/*/locations/*/backupPolicies/*}: backup_policyÖ -DeleteBackupPolicy1.google.cloud.netapp.v1.DeleteBackupPolicyRequest.google.longrunning.Operation"nÊA* -google.protobuf.EmptyOperationMetadataÚAname‚Óä“4*2/v1/{name=projects/*/locations/*/backupPolicies/*}IÊAnetapp.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformBŠ -com.google.cloud.netapp.v1BCloudNetappServiceProtoPZ2cloud.google.com/go/netapp/apiv1/netapppb;netapppbªGoogle.Cloud.NetApp.V1ÊGoogle\\Cloud\\NetApp\\V1êGoogle::Cloud::NetApp::V1êAN -compute.googleapis.com/Network,projects/{project}/global/networks/{network}bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/GPBMetadata/Google/Cloud/Netapp/V1/Common.php b/owl-bot-staging/NetApp/v1/proto/src/GPBMetadata/Google/Cloud/Netapp/V1/Common.php deleted file mode 100644 index 8cb63d596909b5e28725ee7adc0a9dd328d9c669..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1126 zcma)5Z)?*)9JcMyd7Cpt7@H!VZm@1>O6R-GDQT0Iur>{CTDB1gX?pDr(%f;m6sGJe z_(24}h@ZmOehM$i(hawPd6Qi3d47MN=hGK@LBS4eqX;pdqX`^eLVkfDWrUM}gm9cp zr-;FT%qb2LQy|oP(CRtR&`sy9pvEL&0aD?NkXeXoK}eEGEkfL_%1aVFxC5s0@ zfNubbhbH3?2QcP77q49$ zdpN=z`yu`+sy~KPKa7!}-o;LnDBzexFeUV&09E&49y7)6QX;xNhD9-UIsnnUYepQg z$PZl|#R0>V6J`sjs?HE!jxGID-M>zohQm`>&1+QEJ4GHt&JuJxJA@4JghfYL-D!ZU z<(GTUs5FY*7DnNufiC<7CQMaty1EIHHTB^$zHULAOqLb5#5SwT9BIZq@O=gB{Kp#Q z%^aj;yH@gDD~tL&4@eynh{ceo*sXj5w&H|R!i2cI7_kKokQbr_3gfL3tW-A+ca{6Y zDT5r{Nx_ZEZ>@6Rf%V%z<=0?)VDv|3)9^aR$mn=OYhW8qvt=5(^hjOpV^Mt zvpna_HvUQS0z5Bj=xUbM7MV-(Gw`(8=?!)7q&twxjh`j(QW)WZMjLCn!ZXR)rSrpl zuEkWyyf!0+qkM{msq&H2@lo;dqrBP9Or&HcQiO>#N|jOlS8?H9+bi{#xN?QT{*Wk8+x>I5;dyLJ%R5wnDOu8DJV?yY>*3 zrt|^&1nnbqpQBe*AEMX$2)*h*Gq%YltP-W%;5q#NeDlrsAHI3%j$HJyT*o%{42t`5 zZz|IfmR--Gj_Fu(Z!#EQPd1&gODyauvRpfon@1g4t2H{$z|?mpo{3d?=r}_QmrTo< z^h-9ThU=Ejw@PPYU*XOWvW+qJUBkq3y;V7c9eslu-8#4HR+(M5$?dwQTRRAumf`#I z{@6zsNQR#~=~={-eQHqndro|v*n|?pB0mA{U3p+wJ_ft%dj}KSq{OjhW^iPixcEXA zKH1*qt^@bnl|v*gc6GRRw_#K4*@o4vVc+zKOC7HTTUB+4X+#*CDZU7fW$ws8E((mQ zdJW{ROuY%de7Y=qm`*%ikx7C+{(s#JvGMeVq5+Mo8OXv@N&N&@w*4AD@Kekem2l=S#+b^q%|Q( zg$q&h48^6P<64VRR>fDNJ0eCU+x6%NG85awhB-2N76ycIIRB3rTC2h&#gT{q&rTlQpF`J4pEH!M#Novx6`}bW zr|CAg;g)5D}XJ$JevK2~AiQ;b&7)I0W!5pEr8n*BPEO!-Z z6Rm2t=}ldF>R1y9_V6X{>JT8FVvh`_*WUK79x-}y&10a~57Ej98x|c+Ir}Nba9mnP z_r$D@JFhG4rK_~14reS{uzq8$AUPj#LaxX8t` z?w|y#9!%r0;)Ct(MyP`;d2Ajv$}!t7AcK0jwcdw9N-SSQu2=(^nLJu_mb7>bFOpf5 zs)ZFqUOy;*P(gD^9*(;xX&F5X{#STtZ{7^@fbZ9A>P;E3@35C*PQ`IRj*q=_Vq)De zO=kl6Egh}qH&N!YpA3ovg(3k;_fg{9uqGmVxyXNpz%?hjZRuMv9=7kGTCVAC&yYg z!5nDq_E9^VWJm04ul4FHt-7zbv}TQYS_!A2W75HW^;NlYpk-5lHeG8R!+`Bd^Yi!+ zU?H}6*r>O~ff@DZx8>=Lr9yfMiQ;=~QonQ&e9cOhV?wh8DYQndErWGf9$td$JB~_w=Faprg^AjLnmwnp}0XeDC(Wt+X+A3 zEUndf1E}x@P-$XXc3tIk>#uO38?=V3H-x1wG>31O)`gL(aw}C8YpQy>)l2e(`PoL) bGkhv~u1hT%3lU;2XwUdg(L~MA459x36kByb diff --git a/owl-bot-staging/NetApp/v1/proto/src/GPBMetadata/Google/Cloud/Netapp/V1/Replication.php b/owl-bot-staging/NetApp/v1/proto/src/GPBMetadata/Google/Cloud/Netapp/V1/Replication.php deleted file mode 100644 index f7ec4c4736ca48079b4f8aed99eec9340ac079d4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5576 zcmb_g&u-(!84o2}wm#XiOnYtF*=!lv#d?cGs+9m~v~jkQMcWE&NueYI8>nC@X>74e zlPpOYQ3IcPDbPa?Ezm>J7wD}$=K+cWz4ZZd&Lia1Z)QlDmZhxXjZW0e_iujR-I@~XPbAy1JgaLNQfF{+K^&=TUD>)poUA03Yf`n=l;m=y`7W}$ z*1+kKf^=zFmj=mo4QtTLnZ(m~AWay=B@m3DPk)lJ>gHADX$p5s8e z&J$ouprc2fa2qp$V^yo$Eo zKGKQNE0Ml-ty@l^aC@p-A=6kD;`?uAt}zF-&n;tcMP}DJg0noph(j+tfR!EiOmkm7 zfVZh*^m*EqJ(-tz|NT#O-`B-nZ{*q|On|+SGpK8x!q>a7H*4gJ8=NxBawN-hBzwKT zz2!^LY#sB3JA^08_RbXH*9>)^=!s9n@(Uw1*YlzE_k-LV?O)J{PyYMl9OIxrxwjKafT7hNUx<#y%ge5fu#suErm=n~o17!Z4 zghZ&ai>ok4y8{cQcq#f#aZx;gd0IXR3!G&BS%CFe5@kbTvNS>oWsi#6u*}%i9<~(S zaMLt|nCPf@1appMkTeaLWd4I$B!{#p$jWtm0qf3fds5wQpY#SOmxfd_|IrVW+wj?` z?1=aoEM4i;*(yhYMqDzVn?>ds;|pQ21q*$m8D4+LB4?3V&lC1TNOT=Cit9LPN#wsL zuKB@#31Sb6scy1DuJWRk24s$xb`kyWicjFNU*~wfV~KOKI85Yt+Yn2kDnbwFrV~u{ zPp2L5P7&f(ynvXYbqM-)Ns6M`Gl6r;IAqgvhGH5LcnsFku^*+Esr|eRb>N-*2UKm% z!63z9z)dHawNpa}CxrkVe&G6uwG{iNI7dDF93zy?Pyv1`KLEeaVWU6nIC@XD32}52 z)6D-xmrec_3*USXv&IOmt}>DTNF28E!b?FpN%%+nL4b5PDg767V*c5 zTtBTGqRLuTRcfc>rUJwowU%-yqoFI1D9a5rhf${@nLezABnDMN+yyBtwQ+bNms|HF zuR}^cmz9_5{?FC3O10IL8>j>IouIx`iUyvzT&&<{H1j6`5~1QDK8EyJg`%NO!gm?s zb+n+!5D_SjoEX86hzVF|G;8%b{)vhySZXT8YU2o@rSQ#(Tkxn^zs~jsFO#%DD#$m0B@V08LMwmAh zDg0IVw)kfO-kn^zLQW7HI8yzFbUiosmH%~<3z7!cg3p^AFO9gwKW@VJB3yND+sDn% zmO}sBd?NI(1hA<3C7iY2P}$1-O@Q@DSuJir+#PiAFsg3fc2+@LhXt&}SDM*ly_GdZ zLHq>P{8g2FY3t6A4=S{6zP2L>m=9p%bxIyB74q8w7D(}9 zh+#=3rsrGt49nto#T{`52dqNe)-H+a;-!zBVqV0kW=o#+ikQ6JW8^JbP7fSux3%9`+2hlAA;);JCO3 ziGhhNx7*h`I4eX^B&`~cj!77!0HTlX3`RacGel_Sj}dtLd%6&grb{kfWT|!Z-h0;r z(-br~2fgd!$QI`@t?GUpQ4hF%bg0T^IW};O_gFe|#rf!Qj3a=~dzWqDjef{HlE_aV z0XTJ?5!0R_ux34;5PT%QBRTU=^ztE_b3$<#VEhJQcmUxv_3t>d#0ND$Lhn+cET=$@ zrqoEL0qHU^aNL++@`J+yOMJS;E;19O;xOpX_4JC!LSj2A5llRwy|SPDaNH#NLQUc<<*5R^8E7XKS9vz z$fXs$S>g=^pDlUow>!^+kAFlqj@b)kmOX%FtHdkXcJ_S#Kfy-Zf4iiQm$=o&*UN7s xTb!v-U|fX)-zyZ(_d7B69P`1`(Tmc1{4p@}c1UkTdUwLRA*1B4dpB?c@PDl5>lXk3 diff --git a/owl-bot-staging/NetApp/v1/proto/src/GPBMetadata/Google/Cloud/Netapp/V1/Snapshot.php b/owl-bot-staging/NetApp/v1/proto/src/GPBMetadata/Google/Cloud/Netapp/V1/Snapshot.php deleted file mode 100644 index fb279f1d753015767dedc4420b28f018900c0d08..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2434 zcmbVOPj4GV6ld+&#N(!<3u#>+U@)b1QM;?86`)N6vSZgW${)*dB7rPfp&R;moJ^-Q#%_2Nc|MITj9c4yYkPp(t?uAsfU+=&UFzWdFx>a4 z?fPLdu>;CU6xqkiHVa6^4nl58j|c_ih_Z;d6nA>fO)#4fPKF%`9) zT7Qg{PhtBY3L)b)ti$OE5`chVH{di5h(Bym=Eh#c!?*{gjwFaSI2tY&5)ttVZMwUwYJ^H0c33_QKe4&aygl@-}Fn zrYCo8R7Qu~b(65e>+hIh2OgY1Cr8ocSa}3bzw%PT8mMy zQS%up>6&E_T)tjj!Pe#ESy@>3(0c*>k&n&=B7!TK@1t@O#FV%PWb9LjE)RQugUk-i zIMI|mM{}Y%{GSkX1tGQH479Wk8*r+F(f)2q@fT=b6CfGBM*ht_9G_W1Weps86Lk`D zrM8KdTGXc(W4u|;KSR#D5j4&VIX?%w<$_eHq_VtH)yJo0YGnni0>5d-wLj<3yrvzb zdH(!>k$KZW1p*#U8u2jfKlxL*~!n}->tTQRp3sm&Un8L>I$|87jW$+u)ydCiP zr1}(<&rQuT${*4bC2ey76^@CYC{{{N?n|TQqk>G`Ttatt28}^`w7a#_Yp-`-cH6DR zcgzwh^xKWrw~K~(3(c>?c+lPIEat?l)!t~!SzgR`do8s#C)c_=jphcpCfl;NHS*b3v=CC$8e2@!g7&j_ya$8uvr}+JJ5e4-VBpqw%U9{GPkp zkL%cj-X$Vh`*SY%&L`-OBp_mX>GTB_T5hGq!;2fP6TdH?_b diff --git a/owl-bot-staging/NetApp/v1/proto/src/GPBMetadata/Google/Cloud/Netapp/V1/StoragePool.php b/owl-bot-staging/NetApp/v1/proto/src/GPBMetadata/Google/Cloud/Netapp/V1/StoragePool.php deleted file mode 100644 index eae70ab7c3a2f2b596a51144027f635fb0fc5855..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3337 zcmb_eUvJw~6rYo&Yi_!>b7|*QX!F{!ridkKKmt5A$iIb(u8opx(xyn(jdPP;>i8P_ zIwPz41QI;*Iraufds`u;&juh(`vH^J0rfoBmzA2K$yNzt-d z&@VcKW7jQ?cZxn|9v%|YWy~%}RD>KnBEE|)qBokAhoIWW9CsTMpj#CH-F*qreY|rQ zA>Cg7lBq{Gh*dN#FmpJNVxx2SJYhjNN-`W!BDPak00Ct&}!?jUe1PMM<% zg9FDR`E5PK6uP$rSFn#6HH9z058Yjd6VJhRw?=%+qb@KKbPQui_|${qB)=VfR>0AL zo)0-1##D&uQ^6R?p5gvHXUCCPjoJ^m(GyGL{Y4-socE3Un@t88tFivlE3UZcd zi$noDx78Z~>Q>ok#GLbgb?Q#Z`XTm@-ods*A%!>|xwCC$2=CmdQNYUm{xm)hAdT}= zj|%^8p+8p8_PO&{T?(?R(?9!qaxiw7r_02QTp{&4nky2bjvPvM| ziUSc=a|9lWG;TyNQw<)wAyn9CqSXfBiBf5i?*ed?`YF07s!mgMC7-QqzbvQzDsQ5j z5%~}nc>4ulR7}`!{HmaOaG(YbfiAw%|jpYAGOx{PkoGob-(`+ZR0Ca3 z_9P#;r}MeeW+8OKn^7$!oB`~X9P&Lk6BGsath$17f#VTu9pau%fOk5d-S{17RN;`5 z1jhg1yZ6yj@&+dDOAls+2UF^Ow2+iaAD-`e(thI?VExF2jy#L?CvZQ;V23853JZaIthNcI6wrrO*zQ_k?cf)N5$L!Z1WBpO{11 zlW|UmA|0)anH`LX`I?3(8>x|2!8q1n0o1Q39$A5D^&ZNIX+^X-I9n`jpULQS9z%_Q zf%tY>T^HpAZ)P7RIJJH462QpROskMRmaGR;^et^3B(t(-+S@}!4dwdLyoHgiWn(-= zt)V#^_XvCh$r>)6hwGlSs5{)72z&)v<0WW=&zN_lb|1SYaYXa!Yl~n%AKp#0Ss$Aoc7{Y-lDP8DHMB$=%bU1j3o`k{ zCE7Ab7fZL#a$$X{-U00}GPlv{&}Kbso7l35@0-}R*)w2pMKVZf%GVcuRuuIHQl-Si z0cQ|<;!$U)si!pI23}Zy=5r`O?Y&c`P&@Kyb$YaZ2jvn$RC6eOL?+<~QZJ*-7~4TO zQ?f?tGiBo#Wn_M;tLRF*Q|{EwNBiw&y}J8gw_aPmpk`5~RWH|`EGy~)ny*i=B~&v~b+=uv>;dAOK&-b~2d(8x#!t$t@(;>6 z2CZ6!?)fcbkzYKHo=%E3vtYM{u~j^dA5Y?qTI`u{p6vA}AI7a;3QM_2DBda>S~F)x ztMZ$I)*;o;hcg|OJRSCM<(nHLl!UnP$#hWhe_-9?#2%{*#2Lou7yU1A*~D}lo`h3o!*?BHy>|Jm${F^Wje8Y Ti&jLf8GE|6n-Ow diff --git a/owl-bot-staging/NetApp/v1/proto/src/GPBMetadata/Google/Cloud/Netapp/V1/Volume.php b/owl-bot-staging/NetApp/v1/proto/src/GPBMetadata/Google/Cloud/Netapp/V1/Volume.php deleted file mode 100644 index 1fb7eb54dad79f6d17eb3ceb7763a09a1ac8b306..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7713 zcmb^$O>Z05F%ghaJdvEvXM!aq~xd|uvn3g(pJme z?e0>J5*TQ2y%q(EHt3<}0zLF^^jGv)D~n^ZJhYG4ag_yc&G9t`Jq; z)?2$eGdc=8)y{Rx$>oN(8WOn{wQP2+?}t`rzOvu=urZak3RbUYnQwmTKnrx)=bC%= z7Pw6vjn310_SLwg`42wReLd$poq<|+(d0JOAe704v{^7 zyms41)@*&N%TW!T`bx zq$2<_e~5szue+Y`I=9Y#-ACz3Phr;99AMo@Am@kPy5Zf@#qu8hz;94ir<~#1eJUz;DwDpKw{{h^;+VvX( zgQrC4CoqRVFD>UxjuGzrc(d2}G~DF{Mc-q-I0kW}BA}(8;pLfguD6+Lpau;&j_B8j zuOWcR2=;bZuG3a z>8X~@s~J~LQsA3N;5i4b5-cYWmF_^QZ|YyFHgkHq>k^FxQVw118O$2mF++Px5#h~A zoC%xH?h|m)^qdR9AbLv2FO`tCyf`Gi0}BHm@+B{koQjJ15tYv5 zB_t6MN8bZ!a6m_QSQ}08LcWOrF#)g)vA)YXWDv`^Oa>8^6iB+P-FLXHxZVZE{}tR! zZofB?FCV(Wfdy$4>lt&7nPa&sGkFr}$g9JXk!z!aTnAfnuoac|Af;htdd}1#&$n

3i<-94O|jrdbGn06NSRR{BaXH9S>Fzryh|6I7-AIy77Ui&`CTL;m4&<< zy^XDp%9X$!>K=LI#&z-%7+n08Da3Ufl7{ABpbUbJoDMjRNNAV6zTxS%!O#FYwuQx} zE8iaipaFV1b1)zTAt^(5nP`Ab0WJKZ6ycXa3-bk~er1_VUPlUk9LKywOYaSrkR@#I zI+#DO%;M!4`9$j>LikRh!kyELV@L0VX;)(oRGx{QJ#&c62MKXVmzzn5FX&Dw9&3v<{9#k5&VxhcSF7Bk>k>W5@FXnfS zQW0q$Vg>wemMeRyDgJAxxL>4SQU2?owj=hY@t}CU*l1Sk9CU_2%ZXia@#vb3sPs<`xs?hS}#7$5IAn z^Y$t0p#74$B_?N|5`i~-XknHZlsi~>hlp^?OiZo{b~yBa1{o)E@{+N$FcIG3Uc<=? z0v}KzbH+XtdwlOSOoo^5iS5?INpA97APfj`A5Z{dK?NdAWK>ENM@H{VU}INMmS9mG zXDHK!KFbRYfS0eCN^19L%U3Df5>IBu5qXLop$xAllI`#2|!%*_*Sa%)+#a z$eDjcU|~%EKNx@5mf{hvYITJPyd9@Jg^iHOyn;liRpBEc(WChV0nTT{Z?)Su43Rx> z;t>nlFw*0jbYU1W=5^D>39Mi4(a0(D3s}5V2xCdLASRvziwu&Qw2BQXS_1Z`A`|=h z>>VCU#YX0vDVPt}oKgW6{IpHokM1YqxUz{o!RFvT)=;Zc~Cxy2W+${eUs>TKL8?e&GAq209 zyi@FpPI(wfsQ? zYsD$bt|9&@k6nFy=8sXheNA;NeFlke%OeJ^-!XLw)!Dqmw;7i8qJR|B9-4Ae6~`k1 zZMTiSiw&aKr$MaPM-Qic_q-?e$U{bPbz9Xs9TcjI_ArADlRtyRqXV)*MLQfQMfemg zJR1=6BpN$32V;jAjUAp%Qv5Z7yEKdVo-M{^5sUm_T7%BNT&q``)k1Z@F=hnV7gTl| zhflE6@IRkon=uDboYthGn=b%{MJhL^e4$WmG}Pu%ZM=jjf&@1mArJ{TZ&r*j_)7Y2IRcrgz!siX_k8ro`29& z+~EyhyHwylrO>AOADhX!$Rr{Am=oTKG2l?bI!Sl*fDvy>B`JRCe+{YbnwhMp(+U|DZp@ia-0;sNm$yaMgoogle.cloud.netapp.v1.AccessType - */ -class AccessType -{ - /** - * Unspecified Access Type - * - * Generated from protobuf enum ACCESS_TYPE_UNSPECIFIED = 0; - */ - const ACCESS_TYPE_UNSPECIFIED = 0; - /** - * Read Only - * - * Generated from protobuf enum READ_ONLY = 1; - */ - const READ_ONLY = 1; - /** - * Read Write - * - * Generated from protobuf enum READ_WRITE = 2; - */ - const READ_WRITE = 2; - /** - * None - * - * Generated from protobuf enum READ_NONE = 3; - */ - const READ_NONE = 3; - - private static $valueToName = [ - self::ACCESS_TYPE_UNSPECIFIED => 'ACCESS_TYPE_UNSPECIFIED', - self::READ_ONLY => 'READ_ONLY', - self::READ_WRITE => 'READ_WRITE', - self::READ_NONE => 'READ_NONE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ActiveDirectory.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ActiveDirectory.php deleted file mode 100644 index 9176e1055524..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ActiveDirectory.php +++ /dev/null @@ -1,827 +0,0 @@ -google.cloud.netapp.v1.ActiveDirectory - */ -class ActiveDirectory extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. The resource name of the active directory. - * Format: - * `projects/{project_number}/locations/{location_id}/activeDirectories/{active_directory_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Output only. Create time of the active directory. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The state of the AD. - * - * Generated from protobuf field .google.cloud.netapp.v1.ActiveDirectory.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Required. Name of the Active Directory domain - * - * Generated from protobuf field string domain = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $domain = ''; - /** - * The Active Directory site the service will limit Domain Controller - * discovery too. - * - * Generated from protobuf field string site = 5; - */ - protected $site = ''; - /** - * Required. Comma separated list of DNS server IP addresses for the Active - * Directory domain. - * - * Generated from protobuf field string dns = 6 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $dns = ''; - /** - * Required. NetBIOSPrefix is used as a prefix for SMB server name. - * - * Generated from protobuf field string net_bios_prefix = 7 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $net_bios_prefix = ''; - /** - * The Organizational Unit (OU) within the Windows Active Directory the user - * belongs to. - * - * Generated from protobuf field string organizational_unit = 8; - */ - protected $organizational_unit = ''; - /** - * If enabled, AES encryption will be enabled for SMB communication. - * - * Generated from protobuf field bool aes_encryption = 9; - */ - protected $aes_encryption = false; - /** - * Required. Username of the Active Directory domain administrator. - * - * Generated from protobuf field string username = 10 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $username = ''; - /** - * Required. Password of the Active Directory domain administrator. - * - * Generated from protobuf field string password = 11 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $password = ''; - /** - * Optional. Users to be added to the Built-in Backup Operator active - * directory group. - * - * Generated from protobuf field repeated string backup_operators = 12 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $backup_operators; - /** - * Optional. Users to be added to the Built-in Admininstrators group. - * - * Generated from protobuf field repeated string administrators = 22 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $administrators; - /** - * Optional. Domain users to be given the SeSecurityPrivilege. - * - * Generated from protobuf field repeated string security_operators = 13 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $security_operators; - /** - * Name of the active directory machine. This optional parameter is used only - * while creating kerberos volume - * - * Generated from protobuf field string kdc_hostname = 14; - */ - protected $kdc_hostname = ''; - /** - * KDC server IP address for the active directory machine. - * - * Generated from protobuf field string kdc_ip = 15; - */ - protected $kdc_ip = ''; - /** - * If enabled, will allow access to local users and LDAP users. If access is - * needed for only LDAP users, it has to be disabled. - * - * Generated from protobuf field bool nfs_users_with_ldap = 16; - */ - protected $nfs_users_with_ldap = false; - /** - * Description of the active directory. - * - * Generated from protobuf field string description = 17; - */ - protected $description = ''; - /** - * Specifies whether or not the LDAP traffic needs to be signed. - * - * Generated from protobuf field bool ldap_signing = 18; - */ - protected $ldap_signing = false; - /** - * If enabled, traffic between the SMB server to Domain Controller (DC) will - * be encrypted. - * - * Generated from protobuf field bool encrypt_dc_connections = 19; - */ - protected $encrypt_dc_connections = false; - /** - * Labels for the active directory. - * - * Generated from protobuf field map labels = 20; - */ - private $labels; - /** - * Output only. The state details of the Active Directory. - * - * Generated from protobuf field string state_details = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state_details = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. The resource name of the active directory. - * Format: - * `projects/{project_number}/locations/{location_id}/activeDirectories/{active_directory_id}`. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. Create time of the active directory. - * @type int $state - * Output only. The state of the AD. - * @type string $domain - * Required. Name of the Active Directory domain - * @type string $site - * The Active Directory site the service will limit Domain Controller - * discovery too. - * @type string $dns - * Required. Comma separated list of DNS server IP addresses for the Active - * Directory domain. - * @type string $net_bios_prefix - * Required. NetBIOSPrefix is used as a prefix for SMB server name. - * @type string $organizational_unit - * The Organizational Unit (OU) within the Windows Active Directory the user - * belongs to. - * @type bool $aes_encryption - * If enabled, AES encryption will be enabled for SMB communication. - * @type string $username - * Required. Username of the Active Directory domain administrator. - * @type string $password - * Required. Password of the Active Directory domain administrator. - * @type array|\Google\Protobuf\Internal\RepeatedField $backup_operators - * Optional. Users to be added to the Built-in Backup Operator active - * directory group. - * @type array|\Google\Protobuf\Internal\RepeatedField $administrators - * Optional. Users to be added to the Built-in Admininstrators group. - * @type array|\Google\Protobuf\Internal\RepeatedField $security_operators - * Optional. Domain users to be given the SeSecurityPrivilege. - * @type string $kdc_hostname - * Name of the active directory machine. This optional parameter is used only - * while creating kerberos volume - * @type string $kdc_ip - * KDC server IP address for the active directory machine. - * @type bool $nfs_users_with_ldap - * If enabled, will allow access to local users and LDAP users. If access is - * needed for only LDAP users, it has to be disabled. - * @type string $description - * Description of the active directory. - * @type bool $ldap_signing - * Specifies whether or not the LDAP traffic needs to be signed. - * @type bool $encrypt_dc_connections - * If enabled, traffic between the SMB server to Domain Controller (DC) will - * be encrypted. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Labels for the active directory. - * @type string $state_details - * Output only. The state details of the Active Directory. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Netapp\V1\ActiveDirectory::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. The resource name of the active directory. - * Format: - * `projects/{project_number}/locations/{location_id}/activeDirectories/{active_directory_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. The resource name of the active directory. - * Format: - * `projects/{project_number}/locations/{location_id}/activeDirectories/{active_directory_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. Create time of the active directory. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. Create time of the active directory. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The state of the AD. - * - * Generated from protobuf field .google.cloud.netapp.v1.ActiveDirectory.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The state of the AD. - * - * Generated from protobuf field .google.cloud.netapp.v1.ActiveDirectory.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\NetApp\V1\ActiveDirectory\State::class); - $this->state = $var; - - return $this; - } - - /** - * Required. Name of the Active Directory domain - * - * Generated from protobuf field string domain = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDomain() - { - return $this->domain; - } - - /** - * Required. Name of the Active Directory domain - * - * Generated from protobuf field string domain = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDomain($var) - { - GPBUtil::checkString($var, True); - $this->domain = $var; - - return $this; - } - - /** - * The Active Directory site the service will limit Domain Controller - * discovery too. - * - * Generated from protobuf field string site = 5; - * @return string - */ - public function getSite() - { - return $this->site; - } - - /** - * The Active Directory site the service will limit Domain Controller - * discovery too. - * - * Generated from protobuf field string site = 5; - * @param string $var - * @return $this - */ - public function setSite($var) - { - GPBUtil::checkString($var, True); - $this->site = $var; - - return $this; - } - - /** - * Required. Comma separated list of DNS server IP addresses for the Active - * Directory domain. - * - * Generated from protobuf field string dns = 6 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDns() - { - return $this->dns; - } - - /** - * Required. Comma separated list of DNS server IP addresses for the Active - * Directory domain. - * - * Generated from protobuf field string dns = 6 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDns($var) - { - GPBUtil::checkString($var, True); - $this->dns = $var; - - return $this; - } - - /** - * Required. NetBIOSPrefix is used as a prefix for SMB server name. - * - * Generated from protobuf field string net_bios_prefix = 7 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getNetBiosPrefix() - { - return $this->net_bios_prefix; - } - - /** - * Required. NetBIOSPrefix is used as a prefix for SMB server name. - * - * Generated from protobuf field string net_bios_prefix = 7 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setNetBiosPrefix($var) - { - GPBUtil::checkString($var, True); - $this->net_bios_prefix = $var; - - return $this; - } - - /** - * The Organizational Unit (OU) within the Windows Active Directory the user - * belongs to. - * - * Generated from protobuf field string organizational_unit = 8; - * @return string - */ - public function getOrganizationalUnit() - { - return $this->organizational_unit; - } - - /** - * The Organizational Unit (OU) within the Windows Active Directory the user - * belongs to. - * - * Generated from protobuf field string organizational_unit = 8; - * @param string $var - * @return $this - */ - public function setOrganizationalUnit($var) - { - GPBUtil::checkString($var, True); - $this->organizational_unit = $var; - - return $this; - } - - /** - * If enabled, AES encryption will be enabled for SMB communication. - * - * Generated from protobuf field bool aes_encryption = 9; - * @return bool - */ - public function getAesEncryption() - { - return $this->aes_encryption; - } - - /** - * If enabled, AES encryption will be enabled for SMB communication. - * - * Generated from protobuf field bool aes_encryption = 9; - * @param bool $var - * @return $this - */ - public function setAesEncryption($var) - { - GPBUtil::checkBool($var); - $this->aes_encryption = $var; - - return $this; - } - - /** - * Required. Username of the Active Directory domain administrator. - * - * Generated from protobuf field string username = 10 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getUsername() - { - return $this->username; - } - - /** - * Required. Username of the Active Directory domain administrator. - * - * Generated from protobuf field string username = 10 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setUsername($var) - { - GPBUtil::checkString($var, True); - $this->username = $var; - - return $this; - } - - /** - * Required. Password of the Active Directory domain administrator. - * - * Generated from protobuf field string password = 11 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getPassword() - { - return $this->password; - } - - /** - * Required. Password of the Active Directory domain administrator. - * - * Generated from protobuf field string password = 11 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setPassword($var) - { - GPBUtil::checkString($var, True); - $this->password = $var; - - return $this; - } - - /** - * Optional. Users to be added to the Built-in Backup Operator active - * directory group. - * - * Generated from protobuf field repeated string backup_operators = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getBackupOperators() - { - return $this->backup_operators; - } - - /** - * Optional. Users to be added to the Built-in Backup Operator active - * directory group. - * - * Generated from protobuf field repeated string backup_operators = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setBackupOperators($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->backup_operators = $arr; - - return $this; - } - - /** - * Optional. Users to be added to the Built-in Admininstrators group. - * - * Generated from protobuf field repeated string administrators = 22 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAdministrators() - { - return $this->administrators; - } - - /** - * Optional. Users to be added to the Built-in Admininstrators group. - * - * Generated from protobuf field repeated string administrators = 22 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAdministrators($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->administrators = $arr; - - return $this; - } - - /** - * Optional. Domain users to be given the SeSecurityPrivilege. - * - * Generated from protobuf field repeated string security_operators = 13 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSecurityOperators() - { - return $this->security_operators; - } - - /** - * Optional. Domain users to be given the SeSecurityPrivilege. - * - * Generated from protobuf field repeated string security_operators = 13 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSecurityOperators($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->security_operators = $arr; - - return $this; - } - - /** - * Name of the active directory machine. This optional parameter is used only - * while creating kerberos volume - * - * Generated from protobuf field string kdc_hostname = 14; - * @return string - */ - public function getKdcHostname() - { - return $this->kdc_hostname; - } - - /** - * Name of the active directory machine. This optional parameter is used only - * while creating kerberos volume - * - * Generated from protobuf field string kdc_hostname = 14; - * @param string $var - * @return $this - */ - public function setKdcHostname($var) - { - GPBUtil::checkString($var, True); - $this->kdc_hostname = $var; - - return $this; - } - - /** - * KDC server IP address for the active directory machine. - * - * Generated from protobuf field string kdc_ip = 15; - * @return string - */ - public function getKdcIp() - { - return $this->kdc_ip; - } - - /** - * KDC server IP address for the active directory machine. - * - * Generated from protobuf field string kdc_ip = 15; - * @param string $var - * @return $this - */ - public function setKdcIp($var) - { - GPBUtil::checkString($var, True); - $this->kdc_ip = $var; - - return $this; - } - - /** - * If enabled, will allow access to local users and LDAP users. If access is - * needed for only LDAP users, it has to be disabled. - * - * Generated from protobuf field bool nfs_users_with_ldap = 16; - * @return bool - */ - public function getNfsUsersWithLdap() - { - return $this->nfs_users_with_ldap; - } - - /** - * If enabled, will allow access to local users and LDAP users. If access is - * needed for only LDAP users, it has to be disabled. - * - * Generated from protobuf field bool nfs_users_with_ldap = 16; - * @param bool $var - * @return $this - */ - public function setNfsUsersWithLdap($var) - { - GPBUtil::checkBool($var); - $this->nfs_users_with_ldap = $var; - - return $this; - } - - /** - * Description of the active directory. - * - * Generated from protobuf field string description = 17; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Description of the active directory. - * - * Generated from protobuf field string description = 17; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Specifies whether or not the LDAP traffic needs to be signed. - * - * Generated from protobuf field bool ldap_signing = 18; - * @return bool - */ - public function getLdapSigning() - { - return $this->ldap_signing; - } - - /** - * Specifies whether or not the LDAP traffic needs to be signed. - * - * Generated from protobuf field bool ldap_signing = 18; - * @param bool $var - * @return $this - */ - public function setLdapSigning($var) - { - GPBUtil::checkBool($var); - $this->ldap_signing = $var; - - return $this; - } - - /** - * If enabled, traffic between the SMB server to Domain Controller (DC) will - * be encrypted. - * - * Generated from protobuf field bool encrypt_dc_connections = 19; - * @return bool - */ - public function getEncryptDcConnections() - { - return $this->encrypt_dc_connections; - } - - /** - * If enabled, traffic between the SMB server to Domain Controller (DC) will - * be encrypted. - * - * Generated from protobuf field bool encrypt_dc_connections = 19; - * @param bool $var - * @return $this - */ - public function setEncryptDcConnections($var) - { - GPBUtil::checkBool($var); - $this->encrypt_dc_connections = $var; - - return $this; - } - - /** - * Labels for the active directory. - * - * Generated from protobuf field map labels = 20; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Labels for the active directory. - * - * Generated from protobuf field map labels = 20; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Output only. The state details of the Active Directory. - * - * Generated from protobuf field string state_details = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getStateDetails() - { - return $this->state_details; - } - - /** - * Output only. The state details of the Active Directory. - * - * Generated from protobuf field string state_details = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setStateDetails($var) - { - GPBUtil::checkString($var, True); - $this->state_details = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ActiveDirectory/State.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ActiveDirectory/State.php deleted file mode 100644 index 3a389d8644a2..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ActiveDirectory/State.php +++ /dev/null @@ -1,99 +0,0 @@ -google.cloud.netapp.v1.ActiveDirectory.State - */ -class State -{ - /** - * Unspecified Active Directory State - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Active Directory State is Creating - * - * Generated from protobuf enum CREATING = 1; - */ - const CREATING = 1; - /** - * Active Directory State is Ready - * - * Generated from protobuf enum READY = 2; - */ - const READY = 2; - /** - * Active Directory State is Updating - * - * Generated from protobuf enum UPDATING = 3; - */ - const UPDATING = 3; - /** - * Active Directory State is In use - * - * Generated from protobuf enum IN_USE = 4; - */ - const IN_USE = 4; - /** - * Active Directory State is Deleting - * - * Generated from protobuf enum DELETING = 5; - */ - const DELETING = 5; - /** - * Active Directory State is Error - * - * Generated from protobuf enum ERROR = 6; - */ - const ERROR = 6; - /** - * Active Directory State is Diagnosing. - * - * Generated from protobuf enum DIAGNOSING = 7; - */ - const DIAGNOSING = 7; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::CREATING => 'CREATING', - self::READY => 'READY', - self::UPDATING => 'UPDATING', - self::IN_USE => 'IN_USE', - self::DELETING => 'DELETING', - self::ERROR => 'ERROR', - self::DIAGNOSING => 'DIAGNOSING', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\NetApp\V1\ActiveDirectory_State::class); - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Backup.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Backup.php deleted file mode 100644 index 44d1e746525a..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Backup.php +++ /dev/null @@ -1,441 +0,0 @@ -google.cloud.netapp.v1.Backup - */ -class Backup extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. The resource name of the backup. - * Format: - * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Output only. The backup state. - * - * Generated from protobuf field .google.cloud.netapp.v1.Backup.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * A description of the backup with 2048 characters or less. - * Requests with longer descriptions will be rejected. - * - * Generated from protobuf field string description = 3; - */ - protected $description = ''; - /** - * Output only. Size of the file system when the backup was created. When - * creating a new volume from the backup, the volume capacity will have to be - * at least as big. - * - * Generated from protobuf field int64 volume_usage_bytes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $volume_usage_bytes = 0; - /** - * Output only. Type of backup, manually created or created by a backup - * policy. - * - * Generated from protobuf field .google.cloud.netapp.v1.Backup.Type backup_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $backup_type = 0; - /** - * Volume full name of this backup belongs to. - * Format: - * `projects/{projects_id}/locations/{location}/volumes/{volume_id}` - * - * Generated from protobuf field string source_volume = 6 [(.google.api.resource_reference) = { - */ - protected $source_volume = ''; - /** - * If specified, backup will be created from the given snapshot. - * If not specified, there will be a new snapshot taken to initiate the backup - * creation. Format: - * `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}` - * - * Generated from protobuf field optional string source_snapshot = 7 [(.google.api.resource_reference) = { - */ - protected $source_snapshot = null; - /** - * Output only. The time when the backup was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Resource labels to represent user provided metadata. - * - * Generated from protobuf field map labels = 9; - */ - private $labels; - /** - * Output only. Total size of all backups in a chain in bytes = baseline - * backup size + sum(incremental backup size) - * - * Generated from protobuf field int64 chain_storage_bytes = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $chain_storage_bytes = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. The resource name of the backup. - * Format: - * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}`. - * @type int $state - * Output only. The backup state. - * @type string $description - * A description of the backup with 2048 characters or less. - * Requests with longer descriptions will be rejected. - * @type int|string $volume_usage_bytes - * Output only. Size of the file system when the backup was created. When - * creating a new volume from the backup, the volume capacity will have to be - * at least as big. - * @type int $backup_type - * Output only. Type of backup, manually created or created by a backup - * policy. - * @type string $source_volume - * Volume full name of this backup belongs to. - * Format: - * `projects/{projects_id}/locations/{location}/volumes/{volume_id}` - * @type string $source_snapshot - * If specified, backup will be created from the given snapshot. - * If not specified, there will be a new snapshot taken to initiate the backup - * creation. Format: - * `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}` - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time when the backup was created. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Resource labels to represent user provided metadata. - * @type int|string $chain_storage_bytes - * Output only. Total size of all backups in a chain in bytes = baseline - * backup size + sum(incremental backup size) - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Netapp\V1\Backup::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. The resource name of the backup. - * Format: - * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. The resource name of the backup. - * Format: - * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. The backup state. - * - * Generated from protobuf field .google.cloud.netapp.v1.Backup.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The backup state. - * - * Generated from protobuf field .google.cloud.netapp.v1.Backup.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\NetApp\V1\Backup\State::class); - $this->state = $var; - - return $this; - } - - /** - * A description of the backup with 2048 characters or less. - * Requests with longer descriptions will be rejected. - * - * Generated from protobuf field string description = 3; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * A description of the backup with 2048 characters or less. - * Requests with longer descriptions will be rejected. - * - * Generated from protobuf field string description = 3; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Output only. Size of the file system when the backup was created. When - * creating a new volume from the backup, the volume capacity will have to be - * at least as big. - * - * Generated from protobuf field int64 volume_usage_bytes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getVolumeUsageBytes() - { - return $this->volume_usage_bytes; - } - - /** - * Output only. Size of the file system when the backup was created. When - * creating a new volume from the backup, the volume capacity will have to be - * at least as big. - * - * Generated from protobuf field int64 volume_usage_bytes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setVolumeUsageBytes($var) - { - GPBUtil::checkInt64($var); - $this->volume_usage_bytes = $var; - - return $this; - } - - /** - * Output only. Type of backup, manually created or created by a backup - * policy. - * - * Generated from protobuf field .google.cloud.netapp.v1.Backup.Type backup_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getBackupType() - { - return $this->backup_type; - } - - /** - * Output only. Type of backup, manually created or created by a backup - * policy. - * - * Generated from protobuf field .google.cloud.netapp.v1.Backup.Type backup_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setBackupType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\NetApp\V1\Backup\Type::class); - $this->backup_type = $var; - - return $this; - } - - /** - * Volume full name of this backup belongs to. - * Format: - * `projects/{projects_id}/locations/{location}/volumes/{volume_id}` - * - * Generated from protobuf field string source_volume = 6 [(.google.api.resource_reference) = { - * @return string - */ - public function getSourceVolume() - { - return $this->source_volume; - } - - /** - * Volume full name of this backup belongs to. - * Format: - * `projects/{projects_id}/locations/{location}/volumes/{volume_id}` - * - * Generated from protobuf field string source_volume = 6 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setSourceVolume($var) - { - GPBUtil::checkString($var, True); - $this->source_volume = $var; - - return $this; - } - - /** - * If specified, backup will be created from the given snapshot. - * If not specified, there will be a new snapshot taken to initiate the backup - * creation. Format: - * `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}` - * - * Generated from protobuf field optional string source_snapshot = 7 [(.google.api.resource_reference) = { - * @return string - */ - public function getSourceSnapshot() - { - return isset($this->source_snapshot) ? $this->source_snapshot : ''; - } - - public function hasSourceSnapshot() - { - return isset($this->source_snapshot); - } - - public function clearSourceSnapshot() - { - unset($this->source_snapshot); - } - - /** - * If specified, backup will be created from the given snapshot. - * If not specified, there will be a new snapshot taken to initiate the backup - * creation. Format: - * `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}` - * - * Generated from protobuf field optional string source_snapshot = 7 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setSourceSnapshot($var) - { - GPBUtil::checkString($var, True); - $this->source_snapshot = $var; - - return $this; - } - - /** - * Output only. The time when the backup was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The time when the backup was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Resource labels to represent user provided metadata. - * - * Generated from protobuf field map labels = 9; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Resource labels to represent user provided metadata. - * - * Generated from protobuf field map labels = 9; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Output only. Total size of all backups in a chain in bytes = baseline - * backup size + sum(incremental backup size) - * - * Generated from protobuf field int64 chain_storage_bytes = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getChainStorageBytes() - { - return $this->chain_storage_bytes; - } - - /** - * Output only. Total size of all backups in a chain in bytes = baseline - * backup size + sum(incremental backup size) - * - * Generated from protobuf field int64 chain_storage_bytes = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setChainStorageBytes($var) - { - GPBUtil::checkInt64($var); - $this->chain_storage_bytes = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Backup/State.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Backup/State.php deleted file mode 100644 index f70f0dc677d5..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Backup/State.php +++ /dev/null @@ -1,96 +0,0 @@ -google.cloud.netapp.v1.Backup.State - */ -class State -{ - /** - * State not set. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Backup is being created. While in this state, the snapshot for the backup - * point-in-time may not have been created yet, and so the point-in-time may - * not have been fixed. - * - * Generated from protobuf enum CREATING = 1; - */ - const CREATING = 1; - /** - * Backup is being uploaded. While in this state, none of the writes to the - * volume will be included in the backup. - * - * Generated from protobuf enum UPLOADING = 2; - */ - const UPLOADING = 2; - /** - * Backup is available for use. - * - * Generated from protobuf enum READY = 3; - */ - const READY = 3; - /** - * Backup is being deleted. - * - * Generated from protobuf enum DELETING = 4; - */ - const DELETING = 4; - /** - * Backup is not valid and cannot be used for creating new volumes or - * restoring existing volumes. - * - * Generated from protobuf enum ERROR = 5; - */ - const ERROR = 5; - /** - * Backup is being updated. - * - * Generated from protobuf enum UPDATING = 6; - */ - const UPDATING = 6; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::CREATING => 'CREATING', - self::UPLOADING => 'UPLOADING', - self::READY => 'READY', - self::DELETING => 'DELETING', - self::ERROR => 'ERROR', - self::UPDATING => 'UPDATING', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\NetApp\V1\Backup_State::class); - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Backup/Type.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Backup/Type.php deleted file mode 100644 index 0ab607ae7d6d..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Backup/Type.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.netapp.v1.Backup.Type - */ -class Type -{ - /** - * Unspecified backup type. - * - * Generated from protobuf enum TYPE_UNSPECIFIED = 0; - */ - const TYPE_UNSPECIFIED = 0; - /** - * Manual backup type. - * - * Generated from protobuf enum MANUAL = 1; - */ - const MANUAL = 1; - /** - * Scheduled backup type. - * - * Generated from protobuf enum SCHEDULED = 2; - */ - const SCHEDULED = 2; - - private static $valueToName = [ - self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', - self::MANUAL => 'MANUAL', - self::SCHEDULED => 'SCHEDULED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Type::class, \Google\Cloud\NetApp\V1\Backup_Type::class); - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/BackupConfig.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/BackupConfig.php deleted file mode 100644 index 93f0b682ab39..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/BackupConfig.php +++ /dev/null @@ -1,209 +0,0 @@ -google.cloud.netapp.v1.BackupConfig - */ -class BackupConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. When specified, schedule backups will be created based on the - * policy configuration. - * - * Generated from protobuf field repeated string backup_policies = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - private $backup_policies; - /** - * Optional. Name of backup vault. - * Format: - * projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id} - * - * Generated from protobuf field string backup_vault = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - protected $backup_vault = ''; - /** - * Optional. When set to true, scheduled backup is enabled on the volume. - * This field should be nil when there's no backup policy attached. - * - * Generated from protobuf field optional bool scheduled_backup_enabled = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $scheduled_backup_enabled = null; - /** - * Output only. Total size of all backups in a chain in bytes = baseline - * backup size + sum(incremental backup size). - * - * Generated from protobuf field optional int64 backup_chain_bytes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $backup_chain_bytes = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $backup_policies - * Optional. When specified, schedule backups will be created based on the - * policy configuration. - * @type string $backup_vault - * Optional. Name of backup vault. - * Format: - * projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id} - * @type bool $scheduled_backup_enabled - * Optional. When set to true, scheduled backup is enabled on the volume. - * This field should be nil when there's no backup policy attached. - * @type int|string $backup_chain_bytes - * Output only. Total size of all backups in a chain in bytes = baseline - * backup size + sum(incremental backup size). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Netapp\V1\Volume::initOnce(); - parent::__construct($data); - } - - /** - * Optional. When specified, schedule backups will be created based on the - * policy configuration. - * - * Generated from protobuf field repeated string backup_policies = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getBackupPolicies() - { - return $this->backup_policies; - } - - /** - * Optional. When specified, schedule backups will be created based on the - * policy configuration. - * - * Generated from protobuf field repeated string backup_policies = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setBackupPolicies($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->backup_policies = $arr; - - return $this; - } - - /** - * Optional. Name of backup vault. - * Format: - * projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id} - * - * Generated from protobuf field string backup_vault = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return string - */ - public function getBackupVault() - { - return $this->backup_vault; - } - - /** - * Optional. Name of backup vault. - * Format: - * projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id} - * - * Generated from protobuf field string backup_vault = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setBackupVault($var) - { - GPBUtil::checkString($var, True); - $this->backup_vault = $var; - - return $this; - } - - /** - * Optional. When set to true, scheduled backup is enabled on the volume. - * This field should be nil when there's no backup policy attached. - * - * Generated from protobuf field optional bool scheduled_backup_enabled = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getScheduledBackupEnabled() - { - return isset($this->scheduled_backup_enabled) ? $this->scheduled_backup_enabled : false; - } - - public function hasScheduledBackupEnabled() - { - return isset($this->scheduled_backup_enabled); - } - - public function clearScheduledBackupEnabled() - { - unset($this->scheduled_backup_enabled); - } - - /** - * Optional. When set to true, scheduled backup is enabled on the volume. - * This field should be nil when there's no backup policy attached. - * - * Generated from protobuf field optional bool scheduled_backup_enabled = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setScheduledBackupEnabled($var) - { - GPBUtil::checkBool($var); - $this->scheduled_backup_enabled = $var; - - return $this; - } - - /** - * Output only. Total size of all backups in a chain in bytes = baseline - * backup size + sum(incremental backup size). - * - * Generated from protobuf field optional int64 backup_chain_bytes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getBackupChainBytes() - { - return isset($this->backup_chain_bytes) ? $this->backup_chain_bytes : 0; - } - - public function hasBackupChainBytes() - { - return isset($this->backup_chain_bytes); - } - - public function clearBackupChainBytes() - { - unset($this->backup_chain_bytes); - } - - /** - * Output only. Total size of all backups in a chain in bytes = baseline - * backup size + sum(incremental backup size). - * - * Generated from protobuf field optional int64 backup_chain_bytes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setBackupChainBytes($var) - { - GPBUtil::checkInt64($var); - $this->backup_chain_bytes = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/BackupPolicy.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/BackupPolicy.php deleted file mode 100644 index 4da6f34e30a1..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/BackupPolicy.php +++ /dev/null @@ -1,471 +0,0 @@ -google.cloud.netapp.v1.BackupPolicy - */ -class BackupPolicy extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. The resource name of the backup policy. - * Format: - * `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Number of daily backups to keep. Note that the minimum daily backup limit - * is 2. - * - * Generated from protobuf field optional int32 daily_backup_limit = 2; - */ - protected $daily_backup_limit = null; - /** - * Number of weekly backups to keep. Note that the sum of daily, weekly and - * monthly backups should be greater than 1. - * - * Generated from protobuf field optional int32 weekly_backup_limit = 3; - */ - protected $weekly_backup_limit = null; - /** - * Number of monthly backups to keep. Note that the sum of daily, weekly and - * monthly backups should be greater than 1. - * - * Generated from protobuf field optional int32 monthly_backup_limit = 4; - */ - protected $monthly_backup_limit = null; - /** - * Description of the backup policy. - * - * Generated from protobuf field optional string description = 5; - */ - protected $description = null; - /** - * If enabled, make backups automatically according to the schedules. - * This will be applied to all volumes that have this policy attached and - * enforced on volume level. If not specified, default is true. - * - * Generated from protobuf field optional bool enabled = 6; - */ - protected $enabled = null; - /** - * Output only. The total number of volumes assigned by this backup policy. - * - * Generated from protobuf field optional int32 assigned_volume_count = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $assigned_volume_count = null; - /** - * Output only. The time when the backup policy was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Resource labels to represent user provided metadata. - * - * Generated from protobuf field map labels = 9; - */ - private $labels; - /** - * Output only. The backup policy state. - * - * Generated from protobuf field .google.cloud.netapp.v1.BackupPolicy.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. The resource name of the backup policy. - * Format: - * `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}`. - * @type int $daily_backup_limit - * Number of daily backups to keep. Note that the minimum daily backup limit - * is 2. - * @type int $weekly_backup_limit - * Number of weekly backups to keep. Note that the sum of daily, weekly and - * monthly backups should be greater than 1. - * @type int $monthly_backup_limit - * Number of monthly backups to keep. Note that the sum of daily, weekly and - * monthly backups should be greater than 1. - * @type string $description - * Description of the backup policy. - * @type bool $enabled - * If enabled, make backups automatically according to the schedules. - * This will be applied to all volumes that have this policy attached and - * enforced on volume level. If not specified, default is true. - * @type int $assigned_volume_count - * Output only. The total number of volumes assigned by this backup policy. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time when the backup policy was created. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Resource labels to represent user provided metadata. - * @type int $state - * Output only. The backup policy state. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Netapp\V1\BackupPolicy::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. The resource name of the backup policy. - * Format: - * `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. The resource name of the backup policy. - * Format: - * `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Number of daily backups to keep. Note that the minimum daily backup limit - * is 2. - * - * Generated from protobuf field optional int32 daily_backup_limit = 2; - * @return int - */ - public function getDailyBackupLimit() - { - return isset($this->daily_backup_limit) ? $this->daily_backup_limit : 0; - } - - public function hasDailyBackupLimit() - { - return isset($this->daily_backup_limit); - } - - public function clearDailyBackupLimit() - { - unset($this->daily_backup_limit); - } - - /** - * Number of daily backups to keep. Note that the minimum daily backup limit - * is 2. - * - * Generated from protobuf field optional int32 daily_backup_limit = 2; - * @param int $var - * @return $this - */ - public function setDailyBackupLimit($var) - { - GPBUtil::checkInt32($var); - $this->daily_backup_limit = $var; - - return $this; - } - - /** - * Number of weekly backups to keep. Note that the sum of daily, weekly and - * monthly backups should be greater than 1. - * - * Generated from protobuf field optional int32 weekly_backup_limit = 3; - * @return int - */ - public function getWeeklyBackupLimit() - { - return isset($this->weekly_backup_limit) ? $this->weekly_backup_limit : 0; - } - - public function hasWeeklyBackupLimit() - { - return isset($this->weekly_backup_limit); - } - - public function clearWeeklyBackupLimit() - { - unset($this->weekly_backup_limit); - } - - /** - * Number of weekly backups to keep. Note that the sum of daily, weekly and - * monthly backups should be greater than 1. - * - * Generated from protobuf field optional int32 weekly_backup_limit = 3; - * @param int $var - * @return $this - */ - public function setWeeklyBackupLimit($var) - { - GPBUtil::checkInt32($var); - $this->weekly_backup_limit = $var; - - return $this; - } - - /** - * Number of monthly backups to keep. Note that the sum of daily, weekly and - * monthly backups should be greater than 1. - * - * Generated from protobuf field optional int32 monthly_backup_limit = 4; - * @return int - */ - public function getMonthlyBackupLimit() - { - return isset($this->monthly_backup_limit) ? $this->monthly_backup_limit : 0; - } - - public function hasMonthlyBackupLimit() - { - return isset($this->monthly_backup_limit); - } - - public function clearMonthlyBackupLimit() - { - unset($this->monthly_backup_limit); - } - - /** - * Number of monthly backups to keep. Note that the sum of daily, weekly and - * monthly backups should be greater than 1. - * - * Generated from protobuf field optional int32 monthly_backup_limit = 4; - * @param int $var - * @return $this - */ - public function setMonthlyBackupLimit($var) - { - GPBUtil::checkInt32($var); - $this->monthly_backup_limit = $var; - - return $this; - } - - /** - * Description of the backup policy. - * - * Generated from protobuf field optional string description = 5; - * @return string - */ - public function getDescription() - { - return isset($this->description) ? $this->description : ''; - } - - public function hasDescription() - { - return isset($this->description); - } - - public function clearDescription() - { - unset($this->description); - } - - /** - * Description of the backup policy. - * - * Generated from protobuf field optional string description = 5; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * If enabled, make backups automatically according to the schedules. - * This will be applied to all volumes that have this policy attached and - * enforced on volume level. If not specified, default is true. - * - * Generated from protobuf field optional bool enabled = 6; - * @return bool - */ - public function getEnabled() - { - return isset($this->enabled) ? $this->enabled : false; - } - - public function hasEnabled() - { - return isset($this->enabled); - } - - public function clearEnabled() - { - unset($this->enabled); - } - - /** - * If enabled, make backups automatically according to the schedules. - * This will be applied to all volumes that have this policy attached and - * enforced on volume level. If not specified, default is true. - * - * Generated from protobuf field optional bool enabled = 6; - * @param bool $var - * @return $this - */ - public function setEnabled($var) - { - GPBUtil::checkBool($var); - $this->enabled = $var; - - return $this; - } - - /** - * Output only. The total number of volumes assigned by this backup policy. - * - * Generated from protobuf field optional int32 assigned_volume_count = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getAssignedVolumeCount() - { - return isset($this->assigned_volume_count) ? $this->assigned_volume_count : 0; - } - - public function hasAssignedVolumeCount() - { - return isset($this->assigned_volume_count); - } - - public function clearAssignedVolumeCount() - { - unset($this->assigned_volume_count); - } - - /** - * Output only. The total number of volumes assigned by this backup policy. - * - * Generated from protobuf field optional int32 assigned_volume_count = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setAssignedVolumeCount($var) - { - GPBUtil::checkInt32($var); - $this->assigned_volume_count = $var; - - return $this; - } - - /** - * Output only. The time when the backup policy was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The time when the backup policy was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Resource labels to represent user provided metadata. - * - * Generated from protobuf field map labels = 9; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Resource labels to represent user provided metadata. - * - * Generated from protobuf field map labels = 9; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Output only. The backup policy state. - * - * Generated from protobuf field .google.cloud.netapp.v1.BackupPolicy.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The backup policy state. - * - * Generated from protobuf field .google.cloud.netapp.v1.BackupPolicy.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\NetApp\V1\BackupPolicy\State::class); - $this->state = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/BackupPolicy/State.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/BackupPolicy/State.php deleted file mode 100644 index db7d55ef4764..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/BackupPolicy/State.php +++ /dev/null @@ -1,83 +0,0 @@ -google.cloud.netapp.v1.BackupPolicy.State - */ -class State -{ - /** - * State not set. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * BackupPolicy is being created. - * - * Generated from protobuf enum CREATING = 1; - */ - const CREATING = 1; - /** - * BackupPolicy is available for use. - * - * Generated from protobuf enum READY = 2; - */ - const READY = 2; - /** - * BackupPolicy is being deleted. - * - * Generated from protobuf enum DELETING = 3; - */ - const DELETING = 3; - /** - * BackupPolicy is not valid and cannot be used. - * - * Generated from protobuf enum ERROR = 4; - */ - const ERROR = 4; - /** - * BackupPolicy is being updated. - * - * Generated from protobuf enum UPDATING = 5; - */ - const UPDATING = 5; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::CREATING => 'CREATING', - self::READY => 'READY', - self::DELETING => 'DELETING', - self::ERROR => 'ERROR', - self::UPDATING => 'UPDATING', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\NetApp\V1\BackupPolicy_State::class); - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/BackupVault.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/BackupVault.php deleted file mode 100644 index c75d20e047a6..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/BackupVault.php +++ /dev/null @@ -1,221 +0,0 @@ -google.cloud.netapp.v1.BackupVault - */ -class BackupVault extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. The resource name of the backup vault. - * Format: - * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Output only. The backup vault state. - * - * Generated from protobuf field .google.cloud.netapp.v1.BackupVault.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. Create time of the backup vault. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Description of the backup vault. - * - * Generated from protobuf field string description = 4; - */ - protected $description = ''; - /** - * Resource labels to represent user provided metadata. - * - * Generated from protobuf field map labels = 5; - */ - private $labels; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. The resource name of the backup vault. - * Format: - * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`. - * @type int $state - * Output only. The backup vault state. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. Create time of the backup vault. - * @type string $description - * Description of the backup vault. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Resource labels to represent user provided metadata. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Netapp\V1\BackupVault::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. The resource name of the backup vault. - * Format: - * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. The resource name of the backup vault. - * Format: - * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. The backup vault state. - * - * Generated from protobuf field .google.cloud.netapp.v1.BackupVault.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The backup vault state. - * - * Generated from protobuf field .google.cloud.netapp.v1.BackupVault.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\NetApp\V1\BackupVault\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. Create time of the backup vault. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. Create time of the backup vault. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Description of the backup vault. - * - * Generated from protobuf field string description = 4; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Description of the backup vault. - * - * Generated from protobuf field string description = 4; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Resource labels to represent user provided metadata. - * - * Generated from protobuf field map labels = 5; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Resource labels to represent user provided metadata. - * - * Generated from protobuf field map labels = 5; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/BackupVault/State.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/BackupVault/State.php deleted file mode 100644 index 8fdad3c342b9..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/BackupVault/State.php +++ /dev/null @@ -1,85 +0,0 @@ -google.cloud.netapp.v1.BackupVault.State - */ -class State -{ - /** - * State not set. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * BackupVault is being created. - * - * Generated from protobuf enum CREATING = 1; - */ - const CREATING = 1; - /** - * BackupVault is available for use. - * - * Generated from protobuf enum READY = 2; - */ - const READY = 2; - /** - * BackupVault is being deleted. - * - * Generated from protobuf enum DELETING = 3; - */ - const DELETING = 3; - /** - * BackupVault is not valid and cannot be used. - * - * Generated from protobuf enum ERROR = 4; - */ - const ERROR = 4; - /** - * BackupVault is being updated. - * - * Generated from protobuf enum UPDATING = 5; - */ - const UPDATING = 5; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::CREATING => 'CREATING', - self::READY => 'READY', - self::DELETING => 'DELETING', - self::ERROR => 'ERROR', - self::UPDATING => 'UPDATING', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\NetApp\V1\BackupVault_State::class); - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateActiveDirectoryRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateActiveDirectoryRequest.php deleted file mode 100644 index 85f410d1b5f7..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateActiveDirectoryRequest.php +++ /dev/null @@ -1,178 +0,0 @@ -google.cloud.netapp.v1.CreateActiveDirectoryRequest - */ -class CreateActiveDirectoryRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Value for parent. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Fields of the to be created active directory. - * - * Generated from protobuf field .google.cloud.netapp.v1.ActiveDirectory active_directory = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $active_directory = null; - /** - * Required. ID of the active directory to create. Must be unique within the - * parent resource. Must contain only letters, numbers and hyphen, with the - * first character a letter , the last a letter or a number, and a 63 - * character maximum. - * - * Generated from protobuf field string active_directory_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $active_directory_id = ''; - - /** - * @param string $parent Required. Value for parent. Please see - * {@see NetAppClient::locationName()} for help formatting this field. - * @param \Google\Cloud\NetApp\V1\ActiveDirectory $activeDirectory Required. Fields of the to be created active directory. - * @param string $activeDirectoryId Required. ID of the active directory to create. Must be unique within the - * parent resource. Must contain only letters, numbers and hyphen, with the - * first character a letter , the last a letter or a number, and a 63 - * character maximum. - * - * @return \Google\Cloud\NetApp\V1\CreateActiveDirectoryRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\NetApp\V1\ActiveDirectory $activeDirectory, string $activeDirectoryId): self - { - return (new self()) - ->setParent($parent) - ->setActiveDirectory($activeDirectory) - ->setActiveDirectoryId($activeDirectoryId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Value for parent. - * @type \Google\Cloud\NetApp\V1\ActiveDirectory $active_directory - * Required. Fields of the to be created active directory. - * @type string $active_directory_id - * Required. ID of the active directory to create. Must be unique within the - * parent resource. Must contain only letters, numbers and hyphen, with the - * first character a letter , the last a letter or a number, and a 63 - * character maximum. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Netapp\V1\ActiveDirectory::initOnce(); - parent::__construct($data); - } - - /** - * Required. Value for parent. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Value for parent. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. Fields of the to be created active directory. - * - * Generated from protobuf field .google.cloud.netapp.v1.ActiveDirectory active_directory = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\NetApp\V1\ActiveDirectory|null - */ - public function getActiveDirectory() - { - return $this->active_directory; - } - - public function hasActiveDirectory() - { - return isset($this->active_directory); - } - - public function clearActiveDirectory() - { - unset($this->active_directory); - } - - /** - * Required. Fields of the to be created active directory. - * - * Generated from protobuf field .google.cloud.netapp.v1.ActiveDirectory active_directory = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\NetApp\V1\ActiveDirectory $var - * @return $this - */ - public function setActiveDirectory($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetApp\V1\ActiveDirectory::class); - $this->active_directory = $var; - - return $this; - } - - /** - * Required. ID of the active directory to create. Must be unique within the - * parent resource. Must contain only letters, numbers and hyphen, with the - * first character a letter , the last a letter or a number, and a 63 - * character maximum. - * - * Generated from protobuf field string active_directory_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getActiveDirectoryId() - { - return $this->active_directory_id; - } - - /** - * Required. ID of the active directory to create. Must be unique within the - * parent resource. Must contain only letters, numbers and hyphen, with the - * first character a letter , the last a letter or a number, and a 63 - * character maximum. - * - * Generated from protobuf field string active_directory_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setActiveDirectoryId($var) - { - GPBUtil::checkString($var, True); - $this->active_directory_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateBackupPolicyRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateBackupPolicyRequest.php deleted file mode 100644 index 3141db1c5cb2..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateBackupPolicyRequest.php +++ /dev/null @@ -1,188 +0,0 @@ -google.cloud.netapp.v1.CreateBackupPolicyRequest - */ -class CreateBackupPolicyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The location to create the backup policies of, in the format - * `projects/{project_id}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. A backupPolicy resource - * - * Generated from protobuf field .google.cloud.netapp.v1.BackupPolicy backup_policy = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $backup_policy = null; - /** - * Required. The ID to use for the backup policy. - * The ID must be unique within the specified location. - * Must contain only letters, numbers and hyphen, with the first - * character a letter, the last a letter or a - * number, and a 63 character maximum. - * - * Generated from protobuf field string backup_policy_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $backup_policy_id = ''; - - /** - * @param string $parent Required. The location to create the backup policies of, in the format - * `projects/{project_id}/locations/{location}` - * Please see {@see NetAppClient::locationName()} for help formatting this field. - * @param \Google\Cloud\NetApp\V1\BackupPolicy $backupPolicy Required. A backupPolicy resource - * @param string $backupPolicyId Required. The ID to use for the backup policy. - * The ID must be unique within the specified location. - * Must contain only letters, numbers and hyphen, with the first - * character a letter, the last a letter or a - * number, and a 63 character maximum. - * - * @return \Google\Cloud\NetApp\V1\CreateBackupPolicyRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\NetApp\V1\BackupPolicy $backupPolicy, string $backupPolicyId): self - { - return (new self()) - ->setParent($parent) - ->setBackupPolicy($backupPolicy) - ->setBackupPolicyId($backupPolicyId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The location to create the backup policies of, in the format - * `projects/{project_id}/locations/{location}` - * @type \Google\Cloud\NetApp\V1\BackupPolicy $backup_policy - * Required. A backupPolicy resource - * @type string $backup_policy_id - * Required. The ID to use for the backup policy. - * The ID must be unique within the specified location. - * Must contain only letters, numbers and hyphen, with the first - * character a letter, the last a letter or a - * number, and a 63 character maximum. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Netapp\V1\BackupPolicy::initOnce(); - parent::__construct($data); - } - - /** - * Required. The location to create the backup policies of, in the format - * `projects/{project_id}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The location to create the backup policies of, in the format - * `projects/{project_id}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. A backupPolicy resource - * - * Generated from protobuf field .google.cloud.netapp.v1.BackupPolicy backup_policy = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\NetApp\V1\BackupPolicy|null - */ - public function getBackupPolicy() - { - return $this->backup_policy; - } - - public function hasBackupPolicy() - { - return isset($this->backup_policy); - } - - public function clearBackupPolicy() - { - unset($this->backup_policy); - } - - /** - * Required. A backupPolicy resource - * - * Generated from protobuf field .google.cloud.netapp.v1.BackupPolicy backup_policy = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\NetApp\V1\BackupPolicy $var - * @return $this - */ - public function setBackupPolicy($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetApp\V1\BackupPolicy::class); - $this->backup_policy = $var; - - return $this; - } - - /** - * Required. The ID to use for the backup policy. - * The ID must be unique within the specified location. - * Must contain only letters, numbers and hyphen, with the first - * character a letter, the last a letter or a - * number, and a 63 character maximum. - * - * Generated from protobuf field string backup_policy_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getBackupPolicyId() - { - return $this->backup_policy_id; - } - - /** - * Required. The ID to use for the backup policy. - * The ID must be unique within the specified location. - * Must contain only letters, numbers and hyphen, with the first - * character a letter, the last a letter or a - * number, and a 63 character maximum. - * - * Generated from protobuf field string backup_policy_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setBackupPolicyId($var) - { - GPBUtil::checkString($var, True); - $this->backup_policy_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateBackupRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateBackupRequest.php deleted file mode 100644 index c596eeff07b0..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateBackupRequest.php +++ /dev/null @@ -1,188 +0,0 @@ -google.cloud.netapp.v1.CreateBackupRequest - */ -class CreateBackupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The NetApp backupVault to create the backups of, in the format - * `projects/*/locations/*/backupVaults/{backup_vault_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The ID to use for the backup. - * The ID must be unique within the specified backupVault. - * Must contain only letters, numbers and hyphen, with the first - * character a letter, the last a letter or a - * number, and a 63 character maximum. - * - * Generated from protobuf field string backup_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $backup_id = ''; - /** - * Required. A backup resource - * - * Generated from protobuf field .google.cloud.netapp.v1.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $backup = null; - - /** - * @param string $parent Required. The NetApp backupVault to create the backups of, in the format - * `projects/*/locations/*/backupVaults/{backup_vault_id}` - * Please see {@see NetAppClient::backupVaultName()} for help formatting this field. - * @param \Google\Cloud\NetApp\V1\Backup $backup Required. A backup resource - * @param string $backupId Required. The ID to use for the backup. - * The ID must be unique within the specified backupVault. - * Must contain only letters, numbers and hyphen, with the first - * character a letter, the last a letter or a - * number, and a 63 character maximum. - * - * @return \Google\Cloud\NetApp\V1\CreateBackupRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\NetApp\V1\Backup $backup, string $backupId): self - { - return (new self()) - ->setParent($parent) - ->setBackup($backup) - ->setBackupId($backupId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The NetApp backupVault to create the backups of, in the format - * `projects/*/locations/*/backupVaults/{backup_vault_id}` - * @type string $backup_id - * Required. The ID to use for the backup. - * The ID must be unique within the specified backupVault. - * Must contain only letters, numbers and hyphen, with the first - * character a letter, the last a letter or a - * number, and a 63 character maximum. - * @type \Google\Cloud\NetApp\V1\Backup $backup - * Required. A backup resource - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Netapp\V1\Backup::initOnce(); - parent::__construct($data); - } - - /** - * Required. The NetApp backupVault to create the backups of, in the format - * `projects/*/locations/*/backupVaults/{backup_vault_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The NetApp backupVault to create the backups of, in the format - * `projects/*/locations/*/backupVaults/{backup_vault_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The ID to use for the backup. - * The ID must be unique within the specified backupVault. - * Must contain only letters, numbers and hyphen, with the first - * character a letter, the last a letter or a - * number, and a 63 character maximum. - * - * Generated from protobuf field string backup_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getBackupId() - { - return $this->backup_id; - } - - /** - * Required. The ID to use for the backup. - * The ID must be unique within the specified backupVault. - * Must contain only letters, numbers and hyphen, with the first - * character a letter, the last a letter or a - * number, and a 63 character maximum. - * - * Generated from protobuf field string backup_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setBackupId($var) - { - GPBUtil::checkString($var, True); - $this->backup_id = $var; - - return $this; - } - - /** - * Required. A backup resource - * - * Generated from protobuf field .google.cloud.netapp.v1.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\NetApp\V1\Backup|null - */ - public function getBackup() - { - return $this->backup; - } - - public function hasBackup() - { - return isset($this->backup); - } - - public function clearBackup() - { - unset($this->backup); - } - - /** - * Required. A backup resource - * - * Generated from protobuf field .google.cloud.netapp.v1.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\NetApp\V1\Backup $var - * @return $this - */ - public function setBackup($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetApp\V1\Backup::class); - $this->backup = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateBackupVaultRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateBackupVaultRequest.php deleted file mode 100644 index ca894cae60dd..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateBackupVaultRequest.php +++ /dev/null @@ -1,188 +0,0 @@ -google.cloud.netapp.v1.CreateBackupVaultRequest - */ -class CreateBackupVaultRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The location to create the backup vaults, in the format - * `projects/{project_id}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The ID to use for the backupVault. - * The ID must be unique within the specified location. - * Must contain only letters, numbers and hyphen, with the first - * character a letter, the last a letter or a - * number, and a 63 character maximum. - * - * Generated from protobuf field string backup_vault_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $backup_vault_id = ''; - /** - * Required. A backupVault resource - * - * Generated from protobuf field .google.cloud.netapp.v1.BackupVault backup_vault = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $backup_vault = null; - - /** - * @param string $parent Required. The location to create the backup vaults, in the format - * `projects/{project_id}/locations/{location}` - * Please see {@see NetAppClient::locationName()} for help formatting this field. - * @param \Google\Cloud\NetApp\V1\BackupVault $backupVault Required. A backupVault resource - * @param string $backupVaultId Required. The ID to use for the backupVault. - * The ID must be unique within the specified location. - * Must contain only letters, numbers and hyphen, with the first - * character a letter, the last a letter or a - * number, and a 63 character maximum. - * - * @return \Google\Cloud\NetApp\V1\CreateBackupVaultRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\NetApp\V1\BackupVault $backupVault, string $backupVaultId): self - { - return (new self()) - ->setParent($parent) - ->setBackupVault($backupVault) - ->setBackupVaultId($backupVaultId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The location to create the backup vaults, in the format - * `projects/{project_id}/locations/{location}` - * @type string $backup_vault_id - * Required. The ID to use for the backupVault. - * The ID must be unique within the specified location. - * Must contain only letters, numbers and hyphen, with the first - * character a letter, the last a letter or a - * number, and a 63 character maximum. - * @type \Google\Cloud\NetApp\V1\BackupVault $backup_vault - * Required. A backupVault resource - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Netapp\V1\BackupVault::initOnce(); - parent::__construct($data); - } - - /** - * Required. The location to create the backup vaults, in the format - * `projects/{project_id}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The location to create the backup vaults, in the format - * `projects/{project_id}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The ID to use for the backupVault. - * The ID must be unique within the specified location. - * Must contain only letters, numbers and hyphen, with the first - * character a letter, the last a letter or a - * number, and a 63 character maximum. - * - * Generated from protobuf field string backup_vault_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getBackupVaultId() - { - return $this->backup_vault_id; - } - - /** - * Required. The ID to use for the backupVault. - * The ID must be unique within the specified location. - * Must contain only letters, numbers and hyphen, with the first - * character a letter, the last a letter or a - * number, and a 63 character maximum. - * - * Generated from protobuf field string backup_vault_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setBackupVaultId($var) - { - GPBUtil::checkString($var, True); - $this->backup_vault_id = $var; - - return $this; - } - - /** - * Required. A backupVault resource - * - * Generated from protobuf field .google.cloud.netapp.v1.BackupVault backup_vault = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\NetApp\V1\BackupVault|null - */ - public function getBackupVault() - { - return $this->backup_vault; - } - - public function hasBackupVault() - { - return isset($this->backup_vault); - } - - public function clearBackupVault() - { - unset($this->backup_vault); - } - - /** - * Required. A backupVault resource - * - * Generated from protobuf field .google.cloud.netapp.v1.BackupVault backup_vault = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\NetApp\V1\BackupVault $var - * @return $this - */ - public function setBackupVault($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetApp\V1\BackupVault::class); - $this->backup_vault = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateKmsConfigRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateKmsConfigRequest.php deleted file mode 100644 index 7de6031f29f5..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateKmsConfigRequest.php +++ /dev/null @@ -1,178 +0,0 @@ -google.cloud.netapp.v1.CreateKmsConfigRequest - */ -class CreateKmsConfigRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Value for parent. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Id of the requesting KmsConfig. Must be unique within the parent - * resource. Must contain only letters, numbers and hyphen, with the first - * character a letter, the last a letter or a - * number, and a 63 character maximum. - * - * Generated from protobuf field string kms_config_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $kms_config_id = ''; - /** - * Required. The required parameters to create a new KmsConfig. - * - * Generated from protobuf field .google.cloud.netapp.v1.KmsConfig kms_config = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $kms_config = null; - - /** - * @param string $parent Required. Value for parent. Please see - * {@see NetAppClient::locationName()} for help formatting this field. - * @param \Google\Cloud\NetApp\V1\KmsConfig $kmsConfig Required. The required parameters to create a new KmsConfig. - * @param string $kmsConfigId Required. Id of the requesting KmsConfig. Must be unique within the parent - * resource. Must contain only letters, numbers and hyphen, with the first - * character a letter, the last a letter or a - * number, and a 63 character maximum. - * - * @return \Google\Cloud\NetApp\V1\CreateKmsConfigRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\NetApp\V1\KmsConfig $kmsConfig, string $kmsConfigId): self - { - return (new self()) - ->setParent($parent) - ->setKmsConfig($kmsConfig) - ->setKmsConfigId($kmsConfigId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Value for parent. - * @type string $kms_config_id - * Required. Id of the requesting KmsConfig. Must be unique within the parent - * resource. Must contain only letters, numbers and hyphen, with the first - * character a letter, the last a letter or a - * number, and a 63 character maximum. - * @type \Google\Cloud\NetApp\V1\KmsConfig $kms_config - * Required. The required parameters to create a new KmsConfig. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Netapp\V1\Kms::initOnce(); - parent::__construct($data); - } - - /** - * Required. Value for parent. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Value for parent. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. Id of the requesting KmsConfig. Must be unique within the parent - * resource. Must contain only letters, numbers and hyphen, with the first - * character a letter, the last a letter or a - * number, and a 63 character maximum. - * - * Generated from protobuf field string kms_config_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getKmsConfigId() - { - return $this->kms_config_id; - } - - /** - * Required. Id of the requesting KmsConfig. Must be unique within the parent - * resource. Must contain only letters, numbers and hyphen, with the first - * character a letter, the last a letter or a - * number, and a 63 character maximum. - * - * Generated from protobuf field string kms_config_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setKmsConfigId($var) - { - GPBUtil::checkString($var, True); - $this->kms_config_id = $var; - - return $this; - } - - /** - * Required. The required parameters to create a new KmsConfig. - * - * Generated from protobuf field .google.cloud.netapp.v1.KmsConfig kms_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\NetApp\V1\KmsConfig|null - */ - public function getKmsConfig() - { - return $this->kms_config; - } - - public function hasKmsConfig() - { - return isset($this->kms_config); - } - - public function clearKmsConfig() - { - unset($this->kms_config); - } - - /** - * Required. The required parameters to create a new KmsConfig. - * - * Generated from protobuf field .google.cloud.netapp.v1.KmsConfig kms_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\NetApp\V1\KmsConfig $var - * @return $this - */ - public function setKmsConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetApp\V1\KmsConfig::class); - $this->kms_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateReplicationRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateReplicationRequest.php deleted file mode 100644 index e47ad2bac9ce..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateReplicationRequest.php +++ /dev/null @@ -1,183 +0,0 @@ -google.cloud.netapp.v1.CreateReplicationRequest - */ -class CreateReplicationRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The NetApp volume to create the replications of, in the format - * `projects/{project_id}/locations/{location}/volumes/{volume_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. A replication resource - * - * Generated from protobuf field .google.cloud.netapp.v1.Replication replication = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $replication = null; - /** - * Required. ID of the replication to create. Must be unique within the parent - * resource. Must contain only letters, numbers and hyphen, with the first - * character a letter, the last a letter or a - * number, and a 63 character maximum. - * - * Generated from protobuf field string replication_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $replication_id = ''; - - /** - * @param string $parent Required. The NetApp volume to create the replications of, in the format - * `projects/{project_id}/locations/{location}/volumes/{volume_id}` - * Please see {@see NetAppClient::volumeName()} for help formatting this field. - * @param \Google\Cloud\NetApp\V1\Replication $replication Required. A replication resource - * @param string $replicationId Required. ID of the replication to create. Must be unique within the parent - * resource. Must contain only letters, numbers and hyphen, with the first - * character a letter, the last a letter or a - * number, and a 63 character maximum. - * - * @return \Google\Cloud\NetApp\V1\CreateReplicationRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\NetApp\V1\Replication $replication, string $replicationId): self - { - return (new self()) - ->setParent($parent) - ->setReplication($replication) - ->setReplicationId($replicationId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The NetApp volume to create the replications of, in the format - * `projects/{project_id}/locations/{location}/volumes/{volume_id}` - * @type \Google\Cloud\NetApp\V1\Replication $replication - * Required. A replication resource - * @type string $replication_id - * Required. ID of the replication to create. Must be unique within the parent - * resource. Must contain only letters, numbers and hyphen, with the first - * character a letter, the last a letter or a - * number, and a 63 character maximum. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Netapp\V1\Replication::initOnce(); - parent::__construct($data); - } - - /** - * Required. The NetApp volume to create the replications of, in the format - * `projects/{project_id}/locations/{location}/volumes/{volume_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The NetApp volume to create the replications of, in the format - * `projects/{project_id}/locations/{location}/volumes/{volume_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. A replication resource - * - * Generated from protobuf field .google.cloud.netapp.v1.Replication replication = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\NetApp\V1\Replication|null - */ - public function getReplication() - { - return $this->replication; - } - - public function hasReplication() - { - return isset($this->replication); - } - - public function clearReplication() - { - unset($this->replication); - } - - /** - * Required. A replication resource - * - * Generated from protobuf field .google.cloud.netapp.v1.Replication replication = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\NetApp\V1\Replication $var - * @return $this - */ - public function setReplication($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetApp\V1\Replication::class); - $this->replication = $var; - - return $this; - } - - /** - * Required. ID of the replication to create. Must be unique within the parent - * resource. Must contain only letters, numbers and hyphen, with the first - * character a letter, the last a letter or a - * number, and a 63 character maximum. - * - * Generated from protobuf field string replication_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getReplicationId() - { - return $this->replication_id; - } - - /** - * Required. ID of the replication to create. Must be unique within the parent - * resource. Must contain only letters, numbers and hyphen, with the first - * character a letter, the last a letter or a - * number, and a 63 character maximum. - * - * Generated from protobuf field string replication_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setReplicationId($var) - { - GPBUtil::checkString($var, True); - $this->replication_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateSnapshotRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateSnapshotRequest.php deleted file mode 100644 index 0056836998ea..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateSnapshotRequest.php +++ /dev/null @@ -1,183 +0,0 @@ -google.cloud.netapp.v1.CreateSnapshotRequest - */ -class CreateSnapshotRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The NetApp volume to create the snapshots of, in the format - * `projects/{project_id}/locations/{location}/volumes/{volume_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. A snapshot resource - * - * Generated from protobuf field .google.cloud.netapp.v1.Snapshot snapshot = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $snapshot = null; - /** - * Required. ID of the snapshot to create. Must be unique within the parent - * resource. Must contain only letters, numbers and hyphen, with the first - * character a letter, the last a letter or a - * number, and a 63 character maximum. - * - * Generated from protobuf field string snapshot_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $snapshot_id = ''; - - /** - * @param string $parent Required. The NetApp volume to create the snapshots of, in the format - * `projects/{project_id}/locations/{location}/volumes/{volume_id}` - * Please see {@see NetAppClient::volumeName()} for help formatting this field. - * @param \Google\Cloud\NetApp\V1\Snapshot $snapshot Required. A snapshot resource - * @param string $snapshotId Required. ID of the snapshot to create. Must be unique within the parent - * resource. Must contain only letters, numbers and hyphen, with the first - * character a letter, the last a letter or a - * number, and a 63 character maximum. - * - * @return \Google\Cloud\NetApp\V1\CreateSnapshotRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\NetApp\V1\Snapshot $snapshot, string $snapshotId): self - { - return (new self()) - ->setParent($parent) - ->setSnapshot($snapshot) - ->setSnapshotId($snapshotId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The NetApp volume to create the snapshots of, in the format - * `projects/{project_id}/locations/{location}/volumes/{volume_id}` - * @type \Google\Cloud\NetApp\V1\Snapshot $snapshot - * Required. A snapshot resource - * @type string $snapshot_id - * Required. ID of the snapshot to create. Must be unique within the parent - * resource. Must contain only letters, numbers and hyphen, with the first - * character a letter, the last a letter or a - * number, and a 63 character maximum. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Netapp\V1\Snapshot::initOnce(); - parent::__construct($data); - } - - /** - * Required. The NetApp volume to create the snapshots of, in the format - * `projects/{project_id}/locations/{location}/volumes/{volume_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The NetApp volume to create the snapshots of, in the format - * `projects/{project_id}/locations/{location}/volumes/{volume_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. A snapshot resource - * - * Generated from protobuf field .google.cloud.netapp.v1.Snapshot snapshot = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\NetApp\V1\Snapshot|null - */ - public function getSnapshot() - { - return $this->snapshot; - } - - public function hasSnapshot() - { - return isset($this->snapshot); - } - - public function clearSnapshot() - { - unset($this->snapshot); - } - - /** - * Required. A snapshot resource - * - * Generated from protobuf field .google.cloud.netapp.v1.Snapshot snapshot = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\NetApp\V1\Snapshot $var - * @return $this - */ - public function setSnapshot($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetApp\V1\Snapshot::class); - $this->snapshot = $var; - - return $this; - } - - /** - * Required. ID of the snapshot to create. Must be unique within the parent - * resource. Must contain only letters, numbers and hyphen, with the first - * character a letter, the last a letter or a - * number, and a 63 character maximum. - * - * Generated from protobuf field string snapshot_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getSnapshotId() - { - return $this->snapshot_id; - } - - /** - * Required. ID of the snapshot to create. Must be unique within the parent - * resource. Must contain only letters, numbers and hyphen, with the first - * character a letter, the last a letter or a - * number, and a 63 character maximum. - * - * Generated from protobuf field string snapshot_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setSnapshotId($var) - { - GPBUtil::checkString($var, True); - $this->snapshot_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateStoragePoolRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateStoragePoolRequest.php deleted file mode 100644 index 3a318931d7d9..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateStoragePoolRequest.php +++ /dev/null @@ -1,178 +0,0 @@ -google.cloud.netapp.v1.CreateStoragePoolRequest - */ -class CreateStoragePoolRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Value for parent. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Id of the requesting storage pool. Must be unique within the - * parent resource. Must contain only letters, numbers and hyphen, with the - * first character a letter, the last a letter or a number, and a 63 character - * maximum. - * - * Generated from protobuf field string storage_pool_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $storage_pool_id = ''; - /** - * Required. The required parameters to create a new storage pool. - * - * Generated from protobuf field .google.cloud.netapp.v1.StoragePool storage_pool = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $storage_pool = null; - - /** - * @param string $parent Required. Value for parent. Please see - * {@see NetAppClient::locationName()} for help formatting this field. - * @param \Google\Cloud\NetApp\V1\StoragePool $storagePool Required. The required parameters to create a new storage pool. - * @param string $storagePoolId Required. Id of the requesting storage pool. Must be unique within the - * parent resource. Must contain only letters, numbers and hyphen, with the - * first character a letter, the last a letter or a number, and a 63 character - * maximum. - * - * @return \Google\Cloud\NetApp\V1\CreateStoragePoolRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\NetApp\V1\StoragePool $storagePool, string $storagePoolId): self - { - return (new self()) - ->setParent($parent) - ->setStoragePool($storagePool) - ->setStoragePoolId($storagePoolId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Value for parent. - * @type string $storage_pool_id - * Required. Id of the requesting storage pool. Must be unique within the - * parent resource. Must contain only letters, numbers and hyphen, with the - * first character a letter, the last a letter or a number, and a 63 character - * maximum. - * @type \Google\Cloud\NetApp\V1\StoragePool $storage_pool - * Required. The required parameters to create a new storage pool. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Netapp\V1\StoragePool::initOnce(); - parent::__construct($data); - } - - /** - * Required. Value for parent. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Value for parent. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. Id of the requesting storage pool. Must be unique within the - * parent resource. Must contain only letters, numbers and hyphen, with the - * first character a letter, the last a letter or a number, and a 63 character - * maximum. - * - * Generated from protobuf field string storage_pool_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getStoragePoolId() - { - return $this->storage_pool_id; - } - - /** - * Required. Id of the requesting storage pool. Must be unique within the - * parent resource. Must contain only letters, numbers and hyphen, with the - * first character a letter, the last a letter or a number, and a 63 character - * maximum. - * - * Generated from protobuf field string storage_pool_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setStoragePoolId($var) - { - GPBUtil::checkString($var, True); - $this->storage_pool_id = $var; - - return $this; - } - - /** - * Required. The required parameters to create a new storage pool. - * - * Generated from protobuf field .google.cloud.netapp.v1.StoragePool storage_pool = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\NetApp\V1\StoragePool|null - */ - public function getStoragePool() - { - return $this->storage_pool; - } - - public function hasStoragePool() - { - return isset($this->storage_pool); - } - - public function clearStoragePool() - { - unset($this->storage_pool); - } - - /** - * Required. The required parameters to create a new storage pool. - * - * Generated from protobuf field .google.cloud.netapp.v1.StoragePool storage_pool = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\NetApp\V1\StoragePool $var - * @return $this - */ - public function setStoragePool($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetApp\V1\StoragePool::class); - $this->storage_pool = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateVolumeRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateVolumeRequest.php deleted file mode 100644 index 835184512afe..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/CreateVolumeRequest.php +++ /dev/null @@ -1,178 +0,0 @@ -google.cloud.netapp.v1.CreateVolumeRequest - */ -class CreateVolumeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Value for parent. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Id of the requesting volume. Must be unique within the parent - * resource. Must contain only letters, numbers and hyphen, with the first - * character a letter, the last a letter or a number, - * and a 63 character maximum. - * - * Generated from protobuf field string volume_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $volume_id = ''; - /** - * Required. The volume being created. - * - * Generated from protobuf field .google.cloud.netapp.v1.Volume volume = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $volume = null; - - /** - * @param string $parent Required. Value for parent. Please see - * {@see NetAppClient::locationName()} for help formatting this field. - * @param \Google\Cloud\NetApp\V1\Volume $volume Required. The volume being created. - * @param string $volumeId Required. Id of the requesting volume. Must be unique within the parent - * resource. Must contain only letters, numbers and hyphen, with the first - * character a letter, the last a letter or a number, - * and a 63 character maximum. - * - * @return \Google\Cloud\NetApp\V1\CreateVolumeRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\NetApp\V1\Volume $volume, string $volumeId): self - { - return (new self()) - ->setParent($parent) - ->setVolume($volume) - ->setVolumeId($volumeId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Value for parent. - * @type string $volume_id - * Required. Id of the requesting volume. Must be unique within the parent - * resource. Must contain only letters, numbers and hyphen, with the first - * character a letter, the last a letter or a number, - * and a 63 character maximum. - * @type \Google\Cloud\NetApp\V1\Volume $volume - * Required. The volume being created. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Netapp\V1\Volume::initOnce(); - parent::__construct($data); - } - - /** - * Required. Value for parent. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Value for parent. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. Id of the requesting volume. Must be unique within the parent - * resource. Must contain only letters, numbers and hyphen, with the first - * character a letter, the last a letter or a number, - * and a 63 character maximum. - * - * Generated from protobuf field string volume_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getVolumeId() - { - return $this->volume_id; - } - - /** - * Required. Id of the requesting volume. Must be unique within the parent - * resource. Must contain only letters, numbers and hyphen, with the first - * character a letter, the last a letter or a number, - * and a 63 character maximum. - * - * Generated from protobuf field string volume_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setVolumeId($var) - { - GPBUtil::checkString($var, True); - $this->volume_id = $var; - - return $this; - } - - /** - * Required. The volume being created. - * - * Generated from protobuf field .google.cloud.netapp.v1.Volume volume = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\NetApp\V1\Volume|null - */ - public function getVolume() - { - return $this->volume; - } - - public function hasVolume() - { - return isset($this->volume); - } - - public function clearVolume() - { - unset($this->volume); - } - - /** - * Required. The volume being created. - * - * Generated from protobuf field .google.cloud.netapp.v1.Volume volume = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\NetApp\V1\Volume $var - * @return $this - */ - public function setVolume($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetApp\V1\Volume::class); - $this->volume = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DailySchedule.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DailySchedule.php deleted file mode 100644 index fb07517b84df..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DailySchedule.php +++ /dev/null @@ -1,169 +0,0 @@ -google.cloud.netapp.v1.DailySchedule - */ -class DailySchedule extends \Google\Protobuf\Internal\Message -{ - /** - * The maximum number of Snapshots to keep for the hourly schedule - * - * Generated from protobuf field optional double snapshots_to_keep = 1; - */ - protected $snapshots_to_keep = null; - /** - * Set the minute of the hour to start the snapshot (0-59), defaults to the - * top of the hour (0). - * - * Generated from protobuf field optional double minute = 2; - */ - protected $minute = null; - /** - * Set the hour to start the snapshot (0-23), defaults to midnight (0). - * - * Generated from protobuf field optional double hour = 3; - */ - protected $hour = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $snapshots_to_keep - * The maximum number of Snapshots to keep for the hourly schedule - * @type float $minute - * Set the minute of the hour to start the snapshot (0-59), defaults to the - * top of the hour (0). - * @type float $hour - * Set the hour to start the snapshot (0-23), defaults to midnight (0). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Netapp\V1\Volume::initOnce(); - parent::__construct($data); - } - - /** - * The maximum number of Snapshots to keep for the hourly schedule - * - * Generated from protobuf field optional double snapshots_to_keep = 1; - * @return float - */ - public function getSnapshotsToKeep() - { - return isset($this->snapshots_to_keep) ? $this->snapshots_to_keep : 0.0; - } - - public function hasSnapshotsToKeep() - { - return isset($this->snapshots_to_keep); - } - - public function clearSnapshotsToKeep() - { - unset($this->snapshots_to_keep); - } - - /** - * The maximum number of Snapshots to keep for the hourly schedule - * - * Generated from protobuf field optional double snapshots_to_keep = 1; - * @param float $var - * @return $this - */ - public function setSnapshotsToKeep($var) - { - GPBUtil::checkDouble($var); - $this->snapshots_to_keep = $var; - - return $this; - } - - /** - * Set the minute of the hour to start the snapshot (0-59), defaults to the - * top of the hour (0). - * - * Generated from protobuf field optional double minute = 2; - * @return float - */ - public function getMinute() - { - return isset($this->minute) ? $this->minute : 0.0; - } - - public function hasMinute() - { - return isset($this->minute); - } - - public function clearMinute() - { - unset($this->minute); - } - - /** - * Set the minute of the hour to start the snapshot (0-59), defaults to the - * top of the hour (0). - * - * Generated from protobuf field optional double minute = 2; - * @param float $var - * @return $this - */ - public function setMinute($var) - { - GPBUtil::checkDouble($var); - $this->minute = $var; - - return $this; - } - - /** - * Set the hour to start the snapshot (0-23), defaults to midnight (0). - * - * Generated from protobuf field optional double hour = 3; - * @return float - */ - public function getHour() - { - return isset($this->hour) ? $this->hour : 0.0; - } - - public function hasHour() - { - return isset($this->hour); - } - - public function clearHour() - { - unset($this->hour); - } - - /** - * Set the hour to start the snapshot (0-23), defaults to midnight (0). - * - * Generated from protobuf field optional double hour = 3; - * @param float $var - * @return $this - */ - public function setHour($var) - { - GPBUtil::checkDouble($var); - $this->hour = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteActiveDirectoryRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteActiveDirectoryRequest.php deleted file mode 100644 index 9f85f133b428..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteActiveDirectoryRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.netapp.v1.DeleteActiveDirectoryRequest - */ -class DeleteActiveDirectoryRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the active directory. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Name of the active directory. Please see - * {@see NetAppClient::activeDirectoryName()} for help formatting this field. - * - * @return \Google\Cloud\NetApp\V1\DeleteActiveDirectoryRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the active directory. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Netapp\V1\ActiveDirectory::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the active directory. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the active directory. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteBackupPolicyRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteBackupPolicyRequest.php deleted file mode 100644 index 524eae53e7bf..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteBackupPolicyRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.netapp.v1.DeleteBackupPolicyRequest - */ -class DeleteBackupPolicyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The backup policy resource name, in the format - * `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The backup policy resource name, in the format - * `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}` - * Please see {@see NetAppClient::backupPolicyName()} for help formatting this field. - * - * @return \Google\Cloud\NetApp\V1\DeleteBackupPolicyRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The backup policy resource name, in the format - * `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Netapp\V1\BackupPolicy::initOnce(); - parent::__construct($data); - } - - /** - * Required. The backup policy resource name, in the format - * `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The backup policy resource name, in the format - * `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteBackupRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteBackupRequest.php deleted file mode 100644 index 3b976a408b57..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteBackupRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.netapp.v1.DeleteBackupRequest - */ -class DeleteBackupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The backup resource name, in the format - * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The backup resource name, in the format - * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}` - * Please see {@see NetAppClient::backupName()} for help formatting this field. - * - * @return \Google\Cloud\NetApp\V1\DeleteBackupRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The backup resource name, in the format - * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Netapp\V1\Backup::initOnce(); - parent::__construct($data); - } - - /** - * Required. The backup resource name, in the format - * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The backup resource name, in the format - * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteBackupVaultRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteBackupVaultRequest.php deleted file mode 100644 index fa16dbed13a5..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteBackupVaultRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.netapp.v1.DeleteBackupVaultRequest - */ -class DeleteBackupVaultRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The backupVault resource name, in the format - * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The backupVault resource name, in the format - * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}` - * Please see {@see NetAppClient::backupVaultName()} for help formatting this field. - * - * @return \Google\Cloud\NetApp\V1\DeleteBackupVaultRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The backupVault resource name, in the format - * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Netapp\V1\BackupVault::initOnce(); - parent::__construct($data); - } - - /** - * Required. The backupVault resource name, in the format - * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The backupVault resource name, in the format - * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteKmsConfigRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteKmsConfigRequest.php deleted file mode 100644 index 368fe489c48a..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteKmsConfigRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.netapp.v1.DeleteKmsConfigRequest - */ -class DeleteKmsConfigRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the KmsConfig. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Name of the KmsConfig. Please see - * {@see NetAppClient::kmsConfigName()} for help formatting this field. - * - * @return \Google\Cloud\NetApp\V1\DeleteKmsConfigRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the KmsConfig. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Netapp\V1\Kms::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the KmsConfig. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the KmsConfig. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteReplicationRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteReplicationRequest.php deleted file mode 100644 index e22c8d6c3e0a..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteReplicationRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.netapp.v1.DeleteReplicationRequest - */ -class DeleteReplicationRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The replication resource name, in the format - * `projects/*/locations/*/volumes/*/replications/{replication_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The replication resource name, in the format - * `projects/*/locations/*/volumes/*/replications/{replication_id}` - * Please see {@see NetAppClient::replicationName()} for help formatting this field. - * - * @return \Google\Cloud\NetApp\V1\DeleteReplicationRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The replication resource name, in the format - * `projects/*/locations/*/volumes/*/replications/{replication_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Netapp\V1\Replication::initOnce(); - parent::__construct($data); - } - - /** - * Required. The replication resource name, in the format - * `projects/*/locations/*/volumes/*/replications/{replication_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The replication resource name, in the format - * `projects/*/locations/*/volumes/*/replications/{replication_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteSnapshotRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteSnapshotRequest.php deleted file mode 100644 index 90dfc2ca707f..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteSnapshotRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.netapp.v1.DeleteSnapshotRequest - */ -class DeleteSnapshotRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The snapshot resource name, in the format - * `projects/*/locations/*/volumes/*/snapshots/{snapshot_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The snapshot resource name, in the format - * `projects/*/locations/*/volumes/*/snapshots/{snapshot_id}` - * Please see {@see NetAppClient::snapshotName()} for help formatting this field. - * - * @return \Google\Cloud\NetApp\V1\DeleteSnapshotRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The snapshot resource name, in the format - * `projects/*/locations/*/volumes/*/snapshots/{snapshot_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Netapp\V1\Snapshot::initOnce(); - parent::__construct($data); - } - - /** - * Required. The snapshot resource name, in the format - * `projects/*/locations/*/volumes/*/snapshots/{snapshot_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The snapshot resource name, in the format - * `projects/*/locations/*/volumes/*/snapshots/{snapshot_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteStoragePoolRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteStoragePoolRequest.php deleted file mode 100644 index 44252d0f2869..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteStoragePoolRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.netapp.v1.DeleteStoragePoolRequest - */ -class DeleteStoragePoolRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the storage pool - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Name of the storage pool - * Please see {@see NetAppClient::storagePoolName()} for help formatting this field. - * - * @return \Google\Cloud\NetApp\V1\DeleteStoragePoolRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the storage pool - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Netapp\V1\StoragePool::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the storage pool - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the storage pool - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteVolumeRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteVolumeRequest.php deleted file mode 100644 index 93bbaa37288f..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DeleteVolumeRequest.php +++ /dev/null @@ -1,123 +0,0 @@ -google.cloud.netapp.v1.DeleteVolumeRequest - */ -class DeleteVolumeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the volume - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * If this field is set as true, CCFE will not block the volume resource - * deletion even if it has any snapshots resource. (Otherwise, the request - * will only work if the volume has no snapshots.) - * - * Generated from protobuf field bool force = 2; - */ - protected $force = false; - - /** - * @param string $name Required. Name of the volume - * Please see {@see NetAppClient::volumeName()} for help formatting this field. - * - * @return \Google\Cloud\NetApp\V1\DeleteVolumeRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the volume - * @type bool $force - * If this field is set as true, CCFE will not block the volume resource - * deletion even if it has any snapshots resource. (Otherwise, the request - * will only work if the volume has no snapshots.) - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Netapp\V1\Volume::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the volume - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the volume - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * If this field is set as true, CCFE will not block the volume resource - * deletion even if it has any snapshots resource. (Otherwise, the request - * will only work if the volume has no snapshots.) - * - * Generated from protobuf field bool force = 2; - * @return bool - */ - public function getForce() - { - return $this->force; - } - - /** - * If this field is set as true, CCFE will not block the volume resource - * deletion even if it has any snapshots resource. (Otherwise, the request - * will only work if the volume has no snapshots.) - * - * Generated from protobuf field bool force = 2; - * @param bool $var - * @return $this - */ - public function setForce($var) - { - GPBUtil::checkBool($var); - $this->force = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DestinationVolumeParameters.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DestinationVolumeParameters.php deleted file mode 100644 index c16912726bb3..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/DestinationVolumeParameters.php +++ /dev/null @@ -1,240 +0,0 @@ -google.cloud.netapp.v1.DestinationVolumeParameters - */ -class DestinationVolumeParameters extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Existing destination StoragePool name. - * - * Generated from protobuf field string storage_pool = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $storage_pool = ''; - /** - * Desired destination volume resource id. If not specified, source volume's - * resource id will be used. - * This value must start with a lowercase letter followed by up to 62 - * lowercase letters, numbers, or hyphens, and cannot end with a hyphen. - * - * Generated from protobuf field string volume_id = 2; - */ - protected $volume_id = ''; - /** - * Destination volume's share name. If not specified, source volume's share - * name will be used. - * - * Generated from protobuf field string share_name = 3; - */ - protected $share_name = ''; - /** - * Description for the destination volume. - * - * Generated from protobuf field optional string description = 4; - */ - protected $description = null; - /** - * Optional. Tiering policy for the volume. - * - * Generated from protobuf field optional .google.cloud.netapp.v1.TieringPolicy tiering_policy = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $tiering_policy = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $storage_pool - * Required. Existing destination StoragePool name. - * @type string $volume_id - * Desired destination volume resource id. If not specified, source volume's - * resource id will be used. - * This value must start with a lowercase letter followed by up to 62 - * lowercase letters, numbers, or hyphens, and cannot end with a hyphen. - * @type string $share_name - * Destination volume's share name. If not specified, source volume's share - * name will be used. - * @type string $description - * Description for the destination volume. - * @type \Google\Cloud\NetApp\V1\TieringPolicy $tiering_policy - * Optional. Tiering policy for the volume. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Netapp\V1\Replication::initOnce(); - parent::__construct($data); - } - - /** - * Required. Existing destination StoragePool name. - * - * Generated from protobuf field string storage_pool = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getStoragePool() - { - return $this->storage_pool; - } - - /** - * Required. Existing destination StoragePool name. - * - * Generated from protobuf field string storage_pool = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setStoragePool($var) - { - GPBUtil::checkString($var, True); - $this->storage_pool = $var; - - return $this; - } - - /** - * Desired destination volume resource id. If not specified, source volume's - * resource id will be used. - * This value must start with a lowercase letter followed by up to 62 - * lowercase letters, numbers, or hyphens, and cannot end with a hyphen. - * - * Generated from protobuf field string volume_id = 2; - * @return string - */ - public function getVolumeId() - { - return $this->volume_id; - } - - /** - * Desired destination volume resource id. If not specified, source volume's - * resource id will be used. - * This value must start with a lowercase letter followed by up to 62 - * lowercase letters, numbers, or hyphens, and cannot end with a hyphen. - * - * Generated from protobuf field string volume_id = 2; - * @param string $var - * @return $this - */ - public function setVolumeId($var) - { - GPBUtil::checkString($var, True); - $this->volume_id = $var; - - return $this; - } - - /** - * Destination volume's share name. If not specified, source volume's share - * name will be used. - * - * Generated from protobuf field string share_name = 3; - * @return string - */ - public function getShareName() - { - return $this->share_name; - } - - /** - * Destination volume's share name. If not specified, source volume's share - * name will be used. - * - * Generated from protobuf field string share_name = 3; - * @param string $var - * @return $this - */ - public function setShareName($var) - { - GPBUtil::checkString($var, True); - $this->share_name = $var; - - return $this; - } - - /** - * Description for the destination volume. - * - * Generated from protobuf field optional string description = 4; - * @return string - */ - public function getDescription() - { - return isset($this->description) ? $this->description : ''; - } - - public function hasDescription() - { - return isset($this->description); - } - - public function clearDescription() - { - unset($this->description); - } - - /** - * Description for the destination volume. - * - * Generated from protobuf field optional string description = 4; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Optional. Tiering policy for the volume. - * - * Generated from protobuf field optional .google.cloud.netapp.v1.TieringPolicy tiering_policy = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\NetApp\V1\TieringPolicy|null - */ - public function getTieringPolicy() - { - return $this->tiering_policy; - } - - public function hasTieringPolicy() - { - return isset($this->tiering_policy); - } - - public function clearTieringPolicy() - { - unset($this->tiering_policy); - } - - /** - * Optional. Tiering policy for the volume. - * - * Generated from protobuf field optional .google.cloud.netapp.v1.TieringPolicy tiering_policy = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\NetApp\V1\TieringPolicy $var - * @return $this - */ - public function setTieringPolicy($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetApp\V1\TieringPolicy::class); - $this->tiering_policy = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/EncryptVolumesRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/EncryptVolumesRequest.php deleted file mode 100644 index 7a744422eb39..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/EncryptVolumesRequest.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.netapp.v1.EncryptVolumesRequest - */ -class EncryptVolumesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the KmsConfig. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the KmsConfig. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Netapp\V1\Kms::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the KmsConfig. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the KmsConfig. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/EncryptionType.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/EncryptionType.php deleted file mode 100644 index 24cfc16d5a78..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/EncryptionType.php +++ /dev/null @@ -1,61 +0,0 @@ -google.cloud.netapp.v1.EncryptionType - */ -class EncryptionType -{ - /** - * The source of the encryption key is not specified. - * - * Generated from protobuf enum ENCRYPTION_TYPE_UNSPECIFIED = 0; - */ - const ENCRYPTION_TYPE_UNSPECIFIED = 0; - /** - * Google managed encryption key. - * - * Generated from protobuf enum SERVICE_MANAGED = 1; - */ - const SERVICE_MANAGED = 1; - /** - * Customer managed encryption key, which is stored in KMS. - * - * Generated from protobuf enum CLOUD_KMS = 2; - */ - const CLOUD_KMS = 2; - - private static $valueToName = [ - self::ENCRYPTION_TYPE_UNSPECIFIED => 'ENCRYPTION_TYPE_UNSPECIFIED', - self::SERVICE_MANAGED => 'SERVICE_MANAGED', - self::CLOUD_KMS => 'CLOUD_KMS', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/EstablishPeeringRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/EstablishPeeringRequest.php deleted file mode 100644 index 637a539ee544..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/EstablishPeeringRequest.php +++ /dev/null @@ -1,220 +0,0 @@ -google.cloud.netapp.v1.EstablishPeeringRequest - */ -class EstablishPeeringRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the replication, in the format of - * projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. Name of the user's local source cluster to be peered with the - * destination cluster. - * - * Generated from protobuf field string peer_cluster_name = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $peer_cluster_name = ''; - /** - * Required. Name of the user's local source vserver svm to be peered with the - * destination vserver svm. - * - * Generated from protobuf field string peer_svm_name = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $peer_svm_name = ''; - /** - * Optional. List of IPv4 ip addresses to be used for peering. - * - * Generated from protobuf field repeated string peer_ip_addresses = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $peer_ip_addresses; - /** - * Required. Name of the user's local source volume to be peered with the - * destination volume. - * - * Generated from protobuf field string peer_volume_name = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $peer_volume_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the replication, in the format of - * projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. - * @type string $peer_cluster_name - * Required. Name of the user's local source cluster to be peered with the - * destination cluster. - * @type string $peer_svm_name - * Required. Name of the user's local source vserver svm to be peered with the - * destination vserver svm. - * @type array|\Google\Protobuf\Internal\RepeatedField $peer_ip_addresses - * Optional. List of IPv4 ip addresses to be used for peering. - * @type string $peer_volume_name - * Required. Name of the user's local source volume to be peered with the - * destination volume. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Netapp\V1\Replication::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the replication, in the format of - * projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the replication, in the format of - * projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. Name of the user's local source cluster to be peered with the - * destination cluster. - * - * Generated from protobuf field string peer_cluster_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getPeerClusterName() - { - return $this->peer_cluster_name; - } - - /** - * Required. Name of the user's local source cluster to be peered with the - * destination cluster. - * - * Generated from protobuf field string peer_cluster_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setPeerClusterName($var) - { - GPBUtil::checkString($var, True); - $this->peer_cluster_name = $var; - - return $this; - } - - /** - * Required. Name of the user's local source vserver svm to be peered with the - * destination vserver svm. - * - * Generated from protobuf field string peer_svm_name = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getPeerSvmName() - { - return $this->peer_svm_name; - } - - /** - * Required. Name of the user's local source vserver svm to be peered with the - * destination vserver svm. - * - * Generated from protobuf field string peer_svm_name = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setPeerSvmName($var) - { - GPBUtil::checkString($var, True); - $this->peer_svm_name = $var; - - return $this; - } - - /** - * Optional. List of IPv4 ip addresses to be used for peering. - * - * Generated from protobuf field repeated string peer_ip_addresses = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPeerIpAddresses() - { - return $this->peer_ip_addresses; - } - - /** - * Optional. List of IPv4 ip addresses to be used for peering. - * - * Generated from protobuf field repeated string peer_ip_addresses = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPeerIpAddresses($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->peer_ip_addresses = $arr; - - return $this; - } - - /** - * Required. Name of the user's local source volume to be peered with the - * destination volume. - * - * Generated from protobuf field string peer_volume_name = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getPeerVolumeName() - { - return $this->peer_volume_name; - } - - /** - * Required. Name of the user's local source volume to be peered with the - * destination volume. - * - * Generated from protobuf field string peer_volume_name = 5 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setPeerVolumeName($var) - { - GPBUtil::checkString($var, True); - $this->peer_volume_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ExportPolicy.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ExportPolicy.php deleted file mode 100644 index 7452cf250eba..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ExportPolicy.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.netapp.v1.ExportPolicy - */ -class ExportPolicy extends \Google\Protobuf\Internal\Message -{ - /** - * Required. List of export policy rules - * - * Generated from protobuf field repeated .google.cloud.netapp.v1.SimpleExportPolicyRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - private $rules; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\NetApp\V1\SimpleExportPolicyRule>|\Google\Protobuf\Internal\RepeatedField $rules - * Required. List of export policy rules - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Netapp\V1\Volume::initOnce(); - parent::__construct($data); - } - - /** - * Required. List of export policy rules - * - * Generated from protobuf field repeated .google.cloud.netapp.v1.SimpleExportPolicyRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRules() - { - return $this->rules; - } - - /** - * Required. List of export policy rules - * - * Generated from protobuf field repeated .google.cloud.netapp.v1.SimpleExportPolicyRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param array<\Google\Cloud\NetApp\V1\SimpleExportPolicyRule>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRules($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetApp\V1\SimpleExportPolicyRule::class); - $this->rules = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetActiveDirectoryRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetActiveDirectoryRequest.php deleted file mode 100644 index 8125d94acc5a..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetActiveDirectoryRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.netapp.v1.GetActiveDirectoryRequest - */ -class GetActiveDirectoryRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the active directory. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Name of the active directory. Please see - * {@see NetAppClient::activeDirectoryName()} for help formatting this field. - * - * @return \Google\Cloud\NetApp\V1\GetActiveDirectoryRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the active directory. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Netapp\V1\ActiveDirectory::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the active directory. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the active directory. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetBackupPolicyRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetBackupPolicyRequest.php deleted file mode 100644 index afc95a636959..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetBackupPolicyRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.netapp.v1.GetBackupPolicyRequest - */ -class GetBackupPolicyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The backupPolicy resource name, in the format - * `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The backupPolicy resource name, in the format - * `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}` - * Please see {@see NetAppClient::backupPolicyName()} for help formatting this field. - * - * @return \Google\Cloud\NetApp\V1\GetBackupPolicyRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The backupPolicy resource name, in the format - * `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Netapp\V1\BackupPolicy::initOnce(); - parent::__construct($data); - } - - /** - * Required. The backupPolicy resource name, in the format - * `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The backupPolicy resource name, in the format - * `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetBackupRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetBackupRequest.php deleted file mode 100644 index 4f40eedc772b..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetBackupRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.netapp.v1.GetBackupRequest - */ -class GetBackupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The backup resource name, in the format - * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The backup resource name, in the format - * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}` - * Please see {@see NetAppClient::backupName()} for help formatting this field. - * - * @return \Google\Cloud\NetApp\V1\GetBackupRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The backup resource name, in the format - * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Netapp\V1\Backup::initOnce(); - parent::__construct($data); - } - - /** - * Required. The backup resource name, in the format - * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The backup resource name, in the format - * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetBackupVaultRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetBackupVaultRequest.php deleted file mode 100644 index 37d04bfb3d82..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetBackupVaultRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.netapp.v1.GetBackupVaultRequest - */ -class GetBackupVaultRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The backupVault resource name, in the format - * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The backupVault resource name, in the format - * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}` - * Please see {@see NetAppClient::backupVaultName()} for help formatting this field. - * - * @return \Google\Cloud\NetApp\V1\GetBackupVaultRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The backupVault resource name, in the format - * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Netapp\V1\BackupVault::initOnce(); - parent::__construct($data); - } - - /** - * Required. The backupVault resource name, in the format - * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The backupVault resource name, in the format - * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetKmsConfigRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetKmsConfigRequest.php deleted file mode 100644 index 391aa6fbb72a..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetKmsConfigRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.netapp.v1.GetKmsConfigRequest - */ -class GetKmsConfigRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the KmsConfig - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Name of the KmsConfig - * Please see {@see NetAppClient::kmsConfigName()} for help formatting this field. - * - * @return \Google\Cloud\NetApp\V1\GetKmsConfigRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the KmsConfig - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Netapp\V1\Kms::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the KmsConfig - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the KmsConfig - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetReplicationRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetReplicationRequest.php deleted file mode 100644 index 456237ad8ebb..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetReplicationRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.netapp.v1.GetReplicationRequest - */ -class GetReplicationRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The replication resource name, in the format - * `projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The replication resource name, in the format - * `projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}` - * Please see {@see NetAppClient::replicationName()} for help formatting this field. - * - * @return \Google\Cloud\NetApp\V1\GetReplicationRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The replication resource name, in the format - * `projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Netapp\V1\Replication::initOnce(); - parent::__construct($data); - } - - /** - * Required. The replication resource name, in the format - * `projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The replication resource name, in the format - * `projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetSnapshotRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetSnapshotRequest.php deleted file mode 100644 index 6bb68cf6807a..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetSnapshotRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.netapp.v1.GetSnapshotRequest - */ -class GetSnapshotRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The snapshot resource name, in the format - * `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The snapshot resource name, in the format - * `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}` - * Please see {@see NetAppClient::snapshotName()} for help formatting this field. - * - * @return \Google\Cloud\NetApp\V1\GetSnapshotRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The snapshot resource name, in the format - * `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Netapp\V1\Snapshot::initOnce(); - parent::__construct($data); - } - - /** - * Required. The snapshot resource name, in the format - * `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The snapshot resource name, in the format - * `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetStoragePoolRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetStoragePoolRequest.php deleted file mode 100644 index 43f77ba0f851..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetStoragePoolRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.netapp.v1.GetStoragePoolRequest - */ -class GetStoragePoolRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the storage pool - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Name of the storage pool - * Please see {@see NetAppClient::storagePoolName()} for help formatting this field. - * - * @return \Google\Cloud\NetApp\V1\GetStoragePoolRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the storage pool - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Netapp\V1\StoragePool::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the storage pool - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the storage pool - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetVolumeRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetVolumeRequest.php deleted file mode 100644 index fc00eb0d5379..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/GetVolumeRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.netapp.v1.GetVolumeRequest - */ -class GetVolumeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the volume - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Name of the volume - * Please see {@see NetAppClient::volumeName()} for help formatting this field. - * - * @return \Google\Cloud\NetApp\V1\GetVolumeRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the volume - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Netapp\V1\Volume::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the volume - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the volume - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/HourlySchedule.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/HourlySchedule.php deleted file mode 100644 index 262ca6d4df72..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/HourlySchedule.php +++ /dev/null @@ -1,125 +0,0 @@ -google.cloud.netapp.v1.HourlySchedule - */ -class HourlySchedule extends \Google\Protobuf\Internal\Message -{ - /** - * The maximum number of Snapshots to keep for the hourly schedule - * - * Generated from protobuf field optional double snapshots_to_keep = 1; - */ - protected $snapshots_to_keep = null; - /** - * Set the minute of the hour to start the snapshot (0-59), defaults to the - * top of the hour (0). - * - * Generated from protobuf field optional double minute = 2; - */ - protected $minute = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $snapshots_to_keep - * The maximum number of Snapshots to keep for the hourly schedule - * @type float $minute - * Set the minute of the hour to start the snapshot (0-59), defaults to the - * top of the hour (0). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Netapp\V1\Volume::initOnce(); - parent::__construct($data); - } - - /** - * The maximum number of Snapshots to keep for the hourly schedule - * - * Generated from protobuf field optional double snapshots_to_keep = 1; - * @return float - */ - public function getSnapshotsToKeep() - { - return isset($this->snapshots_to_keep) ? $this->snapshots_to_keep : 0.0; - } - - public function hasSnapshotsToKeep() - { - return isset($this->snapshots_to_keep); - } - - public function clearSnapshotsToKeep() - { - unset($this->snapshots_to_keep); - } - - /** - * The maximum number of Snapshots to keep for the hourly schedule - * - * Generated from protobuf field optional double snapshots_to_keep = 1; - * @param float $var - * @return $this - */ - public function setSnapshotsToKeep($var) - { - GPBUtil::checkDouble($var); - $this->snapshots_to_keep = $var; - - return $this; - } - - /** - * Set the minute of the hour to start the snapshot (0-59), defaults to the - * top of the hour (0). - * - * Generated from protobuf field optional double minute = 2; - * @return float - */ - public function getMinute() - { - return isset($this->minute) ? $this->minute : 0.0; - } - - public function hasMinute() - { - return isset($this->minute); - } - - public function clearMinute() - { - unset($this->minute); - } - - /** - * Set the minute of the hour to start the snapshot (0-59), defaults to the - * top of the hour (0). - * - * Generated from protobuf field optional double minute = 2; - * @param float $var - * @return $this - */ - public function setMinute($var) - { - GPBUtil::checkDouble($var); - $this->minute = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/HybridPeeringDetails.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/HybridPeeringDetails.php deleted file mode 100644 index ad8cfec53387..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/HybridPeeringDetails.php +++ /dev/null @@ -1,187 +0,0 @@ -google.cloud.netapp.v1.HybridPeeringDetails - */ -class HybridPeeringDetails extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. IP address of the subnet. - * - * Generated from protobuf field string subnet_ip = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $subnet_ip = ''; - /** - * Optional. Copy-paste-able commands to be used on user's ONTAP to accept - * peering requests. - * - * Generated from protobuf field string command = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $command = ''; - /** - * Optional. Expiration time for the peering command to be executed on user's - * ONTAP. - * - * Generated from protobuf field .google.protobuf.Timestamp command_expiry_time = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $command_expiry_time = null; - /** - * Optional. Temporary passphrase generated to accept cluster peering command. - * - * Generated from protobuf field string passphrase = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $passphrase = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $subnet_ip - * Optional. IP address of the subnet. - * @type string $command - * Optional. Copy-paste-able commands to be used on user's ONTAP to accept - * peering requests. - * @type \Google\Protobuf\Timestamp $command_expiry_time - * Optional. Expiration time for the peering command to be executed on user's - * ONTAP. - * @type string $passphrase - * Optional. Temporary passphrase generated to accept cluster peering command. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Netapp\V1\Replication::initOnce(); - parent::__construct($data); - } - - /** - * Optional. IP address of the subnet. - * - * Generated from protobuf field string subnet_ip = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getSubnetIp() - { - return $this->subnet_ip; - } - - /** - * Optional. IP address of the subnet. - * - * Generated from protobuf field string subnet_ip = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setSubnetIp($var) - { - GPBUtil::checkString($var, True); - $this->subnet_ip = $var; - - return $this; - } - - /** - * Optional. Copy-paste-able commands to be used on user's ONTAP to accept - * peering requests. - * - * Generated from protobuf field string command = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getCommand() - { - return $this->command; - } - - /** - * Optional. Copy-paste-able commands to be used on user's ONTAP to accept - * peering requests. - * - * Generated from protobuf field string command = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setCommand($var) - { - GPBUtil::checkString($var, True); - $this->command = $var; - - return $this; - } - - /** - * Optional. Expiration time for the peering command to be executed on user's - * ONTAP. - * - * Generated from protobuf field .google.protobuf.Timestamp command_expiry_time = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCommandExpiryTime() - { - return $this->command_expiry_time; - } - - public function hasCommandExpiryTime() - { - return isset($this->command_expiry_time); - } - - public function clearCommandExpiryTime() - { - unset($this->command_expiry_time); - } - - /** - * Optional. Expiration time for the peering command to be executed on user's - * ONTAP. - * - * Generated from protobuf field .google.protobuf.Timestamp command_expiry_time = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCommandExpiryTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->command_expiry_time = $var; - - return $this; - } - - /** - * Optional. Temporary passphrase generated to accept cluster peering command. - * - * Generated from protobuf field string passphrase = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPassphrase() - { - return $this->passphrase; - } - - /** - * Optional. Temporary passphrase generated to accept cluster peering command. - * - * Generated from protobuf field string passphrase = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPassphrase($var) - { - GPBUtil::checkString($var, True); - $this->passphrase = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/HybridReplicationParameters.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/HybridReplicationParameters.php deleted file mode 100644 index 1f575f542813..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/HybridReplicationParameters.php +++ /dev/null @@ -1,329 +0,0 @@ -google.cloud.netapp.v1.HybridReplicationParameters - */ -class HybridReplicationParameters extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Desired Identifier (name) of the replication which will be created for this volume. - * Format: - * `projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}` - * - * Generated from protobuf field string replication = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $replication = ''; - /** - * Required. Name of the user's local source volume to be peered with the - * destination volume. - * - * Generated from protobuf field string peer_volume_name = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $peer_volume_name = ''; - /** - * Required. Name of the user's local source cluster to be peered with the - * destination cluster. - * - * Generated from protobuf field string peer_cluster_name = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $peer_cluster_name = ''; - /** - * Required. Name of the user's local source vserver svm to be peered with the - * destination vserver svm. - * - * Generated from protobuf field string peer_svm_name = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $peer_svm_name = ''; - /** - * Required. List of node ip addresses to be peered with. - * - * Generated from protobuf field repeated string peer_ip_addresses = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - private $peer_ip_addresses; - /** - * Optional. Name of source cluster location associated with the Hybrid - * replication. This is a free-form field for the display purpose only. - * - * Generated from protobuf field string cluster_location = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $cluster_location = ''; - /** - * Optional. Description of the replication. - * - * Generated from protobuf field string description = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Optional. Labels to be added to the replication as the key value pairs. - * - * Generated from protobuf field map labels = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $replication - * Required. Desired Identifier (name) of the replication which will be created for this volume. - * Format: - * `projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}` - * @type string $peer_volume_name - * Required. Name of the user's local source volume to be peered with the - * destination volume. - * @type string $peer_cluster_name - * Required. Name of the user's local source cluster to be peered with the - * destination cluster. - * @type string $peer_svm_name - * Required. Name of the user's local source vserver svm to be peered with the - * destination vserver svm. - * @type array|\Google\Protobuf\Internal\RepeatedField $peer_ip_addresses - * Required. List of node ip addresses to be peered with. - * @type string $cluster_location - * Optional. Name of source cluster location associated with the Hybrid - * replication. This is a free-form field for the display purpose only. - * @type string $description - * Optional. Description of the replication. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. Labels to be added to the replication as the key value pairs. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Netapp\V1\Volume::initOnce(); - parent::__construct($data); - } - - /** - * Required. Desired Identifier (name) of the replication which will be created for this volume. - * Format: - * `projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}` - * - * Generated from protobuf field string replication = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getReplication() - { - return $this->replication; - } - - /** - * Required. Desired Identifier (name) of the replication which will be created for this volume. - * Format: - * `projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}` - * - * Generated from protobuf field string replication = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setReplication($var) - { - GPBUtil::checkString($var, True); - $this->replication = $var; - - return $this; - } - - /** - * Required. Name of the user's local source volume to be peered with the - * destination volume. - * - * Generated from protobuf field string peer_volume_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getPeerVolumeName() - { - return $this->peer_volume_name; - } - - /** - * Required. Name of the user's local source volume to be peered with the - * destination volume. - * - * Generated from protobuf field string peer_volume_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setPeerVolumeName($var) - { - GPBUtil::checkString($var, True); - $this->peer_volume_name = $var; - - return $this; - } - - /** - * Required. Name of the user's local source cluster to be peered with the - * destination cluster. - * - * Generated from protobuf field string peer_cluster_name = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getPeerClusterName() - { - return $this->peer_cluster_name; - } - - /** - * Required. Name of the user's local source cluster to be peered with the - * destination cluster. - * - * Generated from protobuf field string peer_cluster_name = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setPeerClusterName($var) - { - GPBUtil::checkString($var, True); - $this->peer_cluster_name = $var; - - return $this; - } - - /** - * Required. Name of the user's local source vserver svm to be peered with the - * destination vserver svm. - * - * Generated from protobuf field string peer_svm_name = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getPeerSvmName() - { - return $this->peer_svm_name; - } - - /** - * Required. Name of the user's local source vserver svm to be peered with the - * destination vserver svm. - * - * Generated from protobuf field string peer_svm_name = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setPeerSvmName($var) - { - GPBUtil::checkString($var, True); - $this->peer_svm_name = $var; - - return $this; - } - - /** - * Required. List of node ip addresses to be peered with. - * - * Generated from protobuf field repeated string peer_ip_addresses = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPeerIpAddresses() - { - return $this->peer_ip_addresses; - } - - /** - * Required. List of node ip addresses to be peered with. - * - * Generated from protobuf field repeated string peer_ip_addresses = 5 [(.google.api.field_behavior) = REQUIRED]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPeerIpAddresses($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->peer_ip_addresses = $arr; - - return $this; - } - - /** - * Optional. Name of source cluster location associated with the Hybrid - * replication. This is a free-form field for the display purpose only. - * - * Generated from protobuf field string cluster_location = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getClusterLocation() - { - return $this->cluster_location; - } - - /** - * Optional. Name of source cluster location associated with the Hybrid - * replication. This is a free-form field for the display purpose only. - * - * Generated from protobuf field string cluster_location = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setClusterLocation($var) - { - GPBUtil::checkString($var, True); - $this->cluster_location = $var; - - return $this; - } - - /** - * Optional. Description of the replication. - * - * Generated from protobuf field string description = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. Description of the replication. - * - * Generated from protobuf field string description = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Optional. Labels to be added to the replication as the key value pairs. - * - * Generated from protobuf field map labels = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. Labels to be added to the replication as the key value pairs. - * - * Generated from protobuf field map labels = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/KmsConfig.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/KmsConfig.php deleted file mode 100644 index 944e5aec0eb9..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/KmsConfig.php +++ /dev/null @@ -1,361 +0,0 @@ -google.cloud.netapp.v1.KmsConfig - */ -class KmsConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. Name of the KmsConfig. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Required. Customer managed crypto key resource full name. Format: - * projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{key}. - * - * Generated from protobuf field string crypto_key_name = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $crypto_key_name = ''; - /** - * Output only. State of the KmsConfig. - * - * Generated from protobuf field .google.cloud.netapp.v1.KmsConfig.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. State details of the KmsConfig. - * - * Generated from protobuf field string state_details = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state_details = ''; - /** - * Output only. Create time of the KmsConfig. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Description of the KmsConfig. - * - * Generated from protobuf field string description = 6; - */ - protected $description = ''; - /** - * Labels as key value pairs - * - * Generated from protobuf field map labels = 7; - */ - private $labels; - /** - * Output only. Instructions to provide the access to the customer provided - * encryption key. - * - * Generated from protobuf field string instructions = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $instructions = ''; - /** - * Output only. The Service account which will have access to the customer - * provided encryption key. - * - * Generated from protobuf field string service_account = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $service_account = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. Name of the KmsConfig. - * @type string $crypto_key_name - * Required. Customer managed crypto key resource full name. Format: - * projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{key}. - * @type int $state - * Output only. State of the KmsConfig. - * @type string $state_details - * Output only. State details of the KmsConfig. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. Create time of the KmsConfig. - * @type string $description - * Description of the KmsConfig. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Labels as key value pairs - * @type string $instructions - * Output only. Instructions to provide the access to the customer provided - * encryption key. - * @type string $service_account - * Output only. The Service account which will have access to the customer - * provided encryption key. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Netapp\V1\Kms::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. Name of the KmsConfig. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. Name of the KmsConfig. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. Customer managed crypto key resource full name. Format: - * projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{key}. - * - * Generated from protobuf field string crypto_key_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getCryptoKeyName() - { - return $this->crypto_key_name; - } - - /** - * Required. Customer managed crypto key resource full name. Format: - * projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{key}. - * - * Generated from protobuf field string crypto_key_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setCryptoKeyName($var) - { - GPBUtil::checkString($var, True); - $this->crypto_key_name = $var; - - return $this; - } - - /** - * Output only. State of the KmsConfig. - * - * Generated from protobuf field .google.cloud.netapp.v1.KmsConfig.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. State of the KmsConfig. - * - * Generated from protobuf field .google.cloud.netapp.v1.KmsConfig.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\NetApp\V1\KmsConfig\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. State details of the KmsConfig. - * - * Generated from protobuf field string state_details = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getStateDetails() - { - return $this->state_details; - } - - /** - * Output only. State details of the KmsConfig. - * - * Generated from protobuf field string state_details = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setStateDetails($var) - { - GPBUtil::checkString($var, True); - $this->state_details = $var; - - return $this; - } - - /** - * Output only. Create time of the KmsConfig. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. Create time of the KmsConfig. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Description of the KmsConfig. - * - * Generated from protobuf field string description = 6; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Description of the KmsConfig. - * - * Generated from protobuf field string description = 6; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Labels as key value pairs - * - * Generated from protobuf field map labels = 7; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Labels as key value pairs - * - * Generated from protobuf field map labels = 7; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Output only. Instructions to provide the access to the customer provided - * encryption key. - * - * Generated from protobuf field string instructions = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getInstructions() - { - return $this->instructions; - } - - /** - * Output only. Instructions to provide the access to the customer provided - * encryption key. - * - * Generated from protobuf field string instructions = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setInstructions($var) - { - GPBUtil::checkString($var, True); - $this->instructions = $var; - - return $this; - } - - /** - * Output only. The Service account which will have access to the customer - * provided encryption key. - * - * Generated from protobuf field string service_account = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getServiceAccount() - { - return $this->service_account; - } - - /** - * Output only. The Service account which will have access to the customer - * provided encryption key. - * - * Generated from protobuf field string service_account = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setServiceAccount($var) - { - GPBUtil::checkString($var, True); - $this->service_account = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/KmsConfig/State.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/KmsConfig/State.php deleted file mode 100644 index be95b3617df0..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/KmsConfig/State.php +++ /dev/null @@ -1,129 +0,0 @@ -google.cloud.netapp.v1.KmsConfig.State - */ -class State -{ - /** - * Unspecified KmsConfig State - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * KmsConfig State is Ready - * - * Generated from protobuf enum READY = 1; - */ - const READY = 1; - /** - * KmsConfig State is Creating - * - * Generated from protobuf enum CREATING = 2; - */ - const CREATING = 2; - /** - * KmsConfig State is Deleting - * - * Generated from protobuf enum DELETING = 3; - */ - const DELETING = 3; - /** - * KmsConfig State is Updating - * - * Generated from protobuf enum UPDATING = 4; - */ - const UPDATING = 4; - /** - * KmsConfig State is In Use. - * - * Generated from protobuf enum IN_USE = 5; - */ - const IN_USE = 5; - /** - * KmsConfig State is Error - * - * Generated from protobuf enum ERROR = 6; - */ - const ERROR = 6; - /** - * KmsConfig State is Pending to verify crypto key access. - * - * Generated from protobuf enum KEY_CHECK_PENDING = 7; - */ - const KEY_CHECK_PENDING = 7; - /** - * KmsConfig State is Not accessbile by the SDE service account to the - * crypto key. - * - * Generated from protobuf enum KEY_NOT_REACHABLE = 8; - */ - const KEY_NOT_REACHABLE = 8; - /** - * KmsConfig State is Disabling. - * - * Generated from protobuf enum DISABLING = 9; - */ - const DISABLING = 9; - /** - * KmsConfig State is Disabled. - * - * Generated from protobuf enum DISABLED = 10; - */ - const DISABLED = 10; - /** - * KmsConfig State is Migrating. - * The existing volumes are migrating from SMEK to CMEK. - * - * Generated from protobuf enum MIGRATING = 11; - */ - const MIGRATING = 11; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::READY => 'READY', - self::CREATING => 'CREATING', - self::DELETING => 'DELETING', - self::UPDATING => 'UPDATING', - self::IN_USE => 'IN_USE', - self::ERROR => 'ERROR', - self::KEY_CHECK_PENDING => 'KEY_CHECK_PENDING', - self::KEY_NOT_REACHABLE => 'KEY_NOT_REACHABLE', - self::DISABLING => 'DISABLING', - self::DISABLED => 'DISABLED', - self::MIGRATING => 'MIGRATING', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\NetApp\V1\KmsConfig_State::class); - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListActiveDirectoriesRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListActiveDirectoriesRequest.php deleted file mode 100644 index 4a250718ad7d..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListActiveDirectoriesRequest.php +++ /dev/null @@ -1,221 +0,0 @@ -google.cloud.netapp.v1.ListActiveDirectoriesRequest - */ -class ListActiveDirectoriesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Parent value for ListActiveDirectoriesRequest - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Requested page size. Server may return fewer items than requested. - * If unspecified, the server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * Filtering results - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - /** - * Hint for how to order the results - * - * Generated from protobuf field string order_by = 5; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. Parent value for ListActiveDirectoriesRequest - * Please see {@see NetAppClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\NetApp\V1\ListActiveDirectoriesRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Parent value for ListActiveDirectoriesRequest - * @type int $page_size - * Requested page size. Server may return fewer items than requested. - * If unspecified, the server will pick an appropriate default. - * @type string $page_token - * A token identifying a page of results the server should return. - * @type string $filter - * Filtering results - * @type string $order_by - * Hint for how to order the results - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Netapp\V1\ActiveDirectory::initOnce(); - parent::__construct($data); - } - - /** - * Required. Parent value for ListActiveDirectoriesRequest - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Parent value for ListActiveDirectoriesRequest - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Requested page size. Server may return fewer items than requested. - * If unspecified, the server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Requested page size. Server may return fewer items than requested. - * If unspecified, the server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Filtering results - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Filtering results - * - * Generated from protobuf field string filter = 4; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Hint for how to order the results - * - * Generated from protobuf field string order_by = 5; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Hint for how to order the results - * - * Generated from protobuf field string order_by = 5; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListActiveDirectoriesResponse.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListActiveDirectoriesResponse.php deleted file mode 100644 index 3a969308213a..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListActiveDirectoriesResponse.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.netapp.v1.ListActiveDirectoriesResponse - */ -class ListActiveDirectoriesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of active directories. - * - * Generated from protobuf field repeated .google.cloud.netapp.v1.ActiveDirectory active_directories = 1; - */ - private $active_directories; - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\NetApp\V1\ActiveDirectory>|\Google\Protobuf\Internal\RepeatedField $active_directories - * The list of active directories. - * @type string $next_page_token - * A token identifying a page of results the server should return. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Netapp\V1\ActiveDirectory::initOnce(); - parent::__construct($data); - } - - /** - * The list of active directories. - * - * Generated from protobuf field repeated .google.cloud.netapp.v1.ActiveDirectory active_directories = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getActiveDirectories() - { - return $this->active_directories; - } - - /** - * The list of active directories. - * - * Generated from protobuf field repeated .google.cloud.netapp.v1.ActiveDirectory active_directories = 1; - * @param array<\Google\Cloud\NetApp\V1\ActiveDirectory>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setActiveDirectories($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetApp\V1\ActiveDirectory::class); - $this->active_directories = $arr; - - return $this; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListBackupPoliciesRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListBackupPoliciesRequest.php deleted file mode 100644 index 3c09f390e605..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListBackupPoliciesRequest.php +++ /dev/null @@ -1,221 +0,0 @@ -google.cloud.netapp.v1.ListBackupPoliciesRequest - */ -class ListBackupPoliciesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Parent value for ListBackupPoliciesRequest - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Requested page size. Server may return fewer items than requested. - * If unspecified, the server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * Filtering results - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - /** - * Hint for how to order the results - * - * Generated from protobuf field string order_by = 5; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. Parent value for ListBackupPoliciesRequest - * Please see {@see NetAppClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\NetApp\V1\ListBackupPoliciesRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Parent value for ListBackupPoliciesRequest - * @type int $page_size - * Requested page size. Server may return fewer items than requested. - * If unspecified, the server will pick an appropriate default. - * @type string $page_token - * A token identifying a page of results the server should return. - * @type string $filter - * Filtering results - * @type string $order_by - * Hint for how to order the results - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Netapp\V1\BackupPolicy::initOnce(); - parent::__construct($data); - } - - /** - * Required. Parent value for ListBackupPoliciesRequest - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Parent value for ListBackupPoliciesRequest - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Requested page size. Server may return fewer items than requested. - * If unspecified, the server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Requested page size. Server may return fewer items than requested. - * If unspecified, the server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Filtering results - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Filtering results - * - * Generated from protobuf field string filter = 4; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Hint for how to order the results - * - * Generated from protobuf field string order_by = 5; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Hint for how to order the results - * - * Generated from protobuf field string order_by = 5; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListBackupPoliciesResponse.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListBackupPoliciesResponse.php deleted file mode 100644 index 4ba28b94e4f2..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListBackupPoliciesResponse.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.netapp.v1.ListBackupPoliciesResponse - */ -class ListBackupPoliciesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of backup policies. - * - * Generated from protobuf field repeated .google.cloud.netapp.v1.BackupPolicy backup_policies = 1; - */ - private $backup_policies; - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\NetApp\V1\BackupPolicy>|\Google\Protobuf\Internal\RepeatedField $backup_policies - * The list of backup policies. - * @type string $next_page_token - * A token identifying a page of results the server should return. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Netapp\V1\BackupPolicy::initOnce(); - parent::__construct($data); - } - - /** - * The list of backup policies. - * - * Generated from protobuf field repeated .google.cloud.netapp.v1.BackupPolicy backup_policies = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getBackupPolicies() - { - return $this->backup_policies; - } - - /** - * The list of backup policies. - * - * Generated from protobuf field repeated .google.cloud.netapp.v1.BackupPolicy backup_policies = 1; - * @param array<\Google\Cloud\NetApp\V1\BackupPolicy>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setBackupPolicies($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetApp\V1\BackupPolicy::class); - $this->backup_policies = $arr; - - return $this; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListBackupVaultsRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListBackupVaultsRequest.php deleted file mode 100644 index b70bf899489e..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListBackupVaultsRequest.php +++ /dev/null @@ -1,231 +0,0 @@ -google.cloud.netapp.v1.ListBackupVaultsRequest - */ -class ListBackupVaultsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The location for which to retrieve backupVault information, - * in the format - * `projects/{project_id}/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of items to return. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The next_page_token value to use if there are additional - * results to retrieve for this list request. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * Sort results. Supported values are "name", "name desc" or "" (unsorted). - * - * Generated from protobuf field string order_by = 4; - */ - protected $order_by = ''; - /** - * List filter. - * - * Generated from protobuf field string filter = 5; - */ - protected $filter = ''; - - /** - * @param string $parent Required. The location for which to retrieve backupVault information, - * in the format - * `projects/{project_id}/locations/{location}`. Please see - * {@see NetAppClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\NetApp\V1\ListBackupVaultsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The location for which to retrieve backupVault information, - * in the format - * `projects/{project_id}/locations/{location}`. - * @type int $page_size - * The maximum number of items to return. - * @type string $page_token - * The next_page_token value to use if there are additional - * results to retrieve for this list request. - * @type string $order_by - * Sort results. Supported values are "name", "name desc" or "" (unsorted). - * @type string $filter - * List filter. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Netapp\V1\BackupVault::initOnce(); - parent::__construct($data); - } - - /** - * Required. The location for which to retrieve backupVault information, - * in the format - * `projects/{project_id}/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The location for which to retrieve backupVault information, - * in the format - * `projects/{project_id}/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * The maximum number of items to return. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of items to return. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * The next_page_token value to use if there are additional - * results to retrieve for this list request. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The next_page_token value to use if there are additional - * results to retrieve for this list request. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Sort results. Supported values are "name", "name desc" or "" (unsorted). - * - * Generated from protobuf field string order_by = 4; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Sort results. Supported values are "name", "name desc" or "" (unsorted). - * - * Generated from protobuf field string order_by = 4; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - - /** - * List filter. - * - * Generated from protobuf field string filter = 5; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * List filter. - * - * Generated from protobuf field string filter = 5; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListBackupVaultsResponse.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListBackupVaultsResponse.php deleted file mode 100644 index 17aeb5e202f6..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListBackupVaultsResponse.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.netapp.v1.ListBackupVaultsResponse - */ -class ListBackupVaultsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of backupVaults in the project for the specified location. - * - * Generated from protobuf field repeated .google.cloud.netapp.v1.BackupVault backup_vaults = 1; - */ - private $backup_vaults; - /** - * The token you can use to retrieve the next page of results. Not returned - * if there are no more results in the list. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\NetApp\V1\BackupVault>|\Google\Protobuf\Internal\RepeatedField $backup_vaults - * A list of backupVaults in the project for the specified location. - * @type string $next_page_token - * The token you can use to retrieve the next page of results. Not returned - * if there are no more results in the list. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Netapp\V1\BackupVault::initOnce(); - parent::__construct($data); - } - - /** - * A list of backupVaults in the project for the specified location. - * - * Generated from protobuf field repeated .google.cloud.netapp.v1.BackupVault backup_vaults = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getBackupVaults() - { - return $this->backup_vaults; - } - - /** - * A list of backupVaults in the project for the specified location. - * - * Generated from protobuf field repeated .google.cloud.netapp.v1.BackupVault backup_vaults = 1; - * @param array<\Google\Cloud\NetApp\V1\BackupVault>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setBackupVaults($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetApp\V1\BackupVault::class); - $this->backup_vaults = $arr; - - return $this; - } - - /** - * The token you can use to retrieve the next page of results. Not returned - * if there are no more results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * The token you can use to retrieve the next page of results. Not returned - * if there are no more results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListBackupsRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListBackupsRequest.php deleted file mode 100644 index 8d3ddd06601e..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListBackupsRequest.php +++ /dev/null @@ -1,281 +0,0 @@ -google.cloud.netapp.v1.ListBackupsRequest - */ -class ListBackupsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The backupVault for which to retrieve backup information, - * in the format - * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`. - * To retrieve backup information for all locations, use "-" for the - * `{location}` value. - * To retrieve backup information for all backupVaults, use "-" for the - * `{backup_vault_id}` value. - * To retrieve backup information for a volume, use "-" for the - * `{backup_vault_id}` value and specify volume full name with the filter. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of items to return. The service may return fewer - * than this value. The maximum value - * is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The next_page_token value to use if there are additional - * results to retrieve for this list request. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * Sort results. Supported values are "name", "name desc" or "" (unsorted). - * - * Generated from protobuf field string order_by = 4; - */ - protected $order_by = ''; - /** - * The standard list filter. - * If specified, backups will be returned based on the attribute name that - * matches the filter expression. If empty, then no backups are filtered out. - * See https://google.aip.dev/160 - * - * Generated from protobuf field string filter = 5; - */ - protected $filter = ''; - - /** - * @param string $parent Required. The backupVault for which to retrieve backup information, - * in the format - * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`. - * To retrieve backup information for all locations, use "-" for the - * `{location}` value. - * To retrieve backup information for all backupVaults, use "-" for the - * `{backup_vault_id}` value. - * To retrieve backup information for a volume, use "-" for the - * `{backup_vault_id}` value and specify volume full name with the filter. Please see - * {@see NetAppClient::backupVaultName()} for help formatting this field. - * - * @return \Google\Cloud\NetApp\V1\ListBackupsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The backupVault for which to retrieve backup information, - * in the format - * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`. - * To retrieve backup information for all locations, use "-" for the - * `{location}` value. - * To retrieve backup information for all backupVaults, use "-" for the - * `{backup_vault_id}` value. - * To retrieve backup information for a volume, use "-" for the - * `{backup_vault_id}` value and specify volume full name with the filter. - * @type int $page_size - * The maximum number of items to return. The service may return fewer - * than this value. The maximum value - * is 1000; values above 1000 will be coerced to 1000. - * @type string $page_token - * The next_page_token value to use if there are additional - * results to retrieve for this list request. - * @type string $order_by - * Sort results. Supported values are "name", "name desc" or "" (unsorted). - * @type string $filter - * The standard list filter. - * If specified, backups will be returned based on the attribute name that - * matches the filter expression. If empty, then no backups are filtered out. - * See https://google.aip.dev/160 - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Netapp\V1\Backup::initOnce(); - parent::__construct($data); - } - - /** - * Required. The backupVault for which to retrieve backup information, - * in the format - * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`. - * To retrieve backup information for all locations, use "-" for the - * `{location}` value. - * To retrieve backup information for all backupVaults, use "-" for the - * `{backup_vault_id}` value. - * To retrieve backup information for a volume, use "-" for the - * `{backup_vault_id}` value and specify volume full name with the filter. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The backupVault for which to retrieve backup information, - * in the format - * `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`. - * To retrieve backup information for all locations, use "-" for the - * `{location}` value. - * To retrieve backup information for all backupVaults, use "-" for the - * `{backup_vault_id}` value. - * To retrieve backup information for a volume, use "-" for the - * `{backup_vault_id}` value and specify volume full name with the filter. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * The maximum number of items to return. The service may return fewer - * than this value. The maximum value - * is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of items to return. The service may return fewer - * than this value. The maximum value - * is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * The next_page_token value to use if there are additional - * results to retrieve for this list request. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The next_page_token value to use if there are additional - * results to retrieve for this list request. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Sort results. Supported values are "name", "name desc" or "" (unsorted). - * - * Generated from protobuf field string order_by = 4; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Sort results. Supported values are "name", "name desc" or "" (unsorted). - * - * Generated from protobuf field string order_by = 4; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - - /** - * The standard list filter. - * If specified, backups will be returned based on the attribute name that - * matches the filter expression. If empty, then no backups are filtered out. - * See https://google.aip.dev/160 - * - * Generated from protobuf field string filter = 5; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * The standard list filter. - * If specified, backups will be returned based on the attribute name that - * matches the filter expression. If empty, then no backups are filtered out. - * See https://google.aip.dev/160 - * - * Generated from protobuf field string filter = 5; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListBackupsResponse.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListBackupsResponse.php deleted file mode 100644 index 74b5007b5630..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListBackupsResponse.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.netapp.v1.ListBackupsResponse - */ -class ListBackupsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of backups in the project. - * - * Generated from protobuf field repeated .google.cloud.netapp.v1.Backup backups = 1; - */ - private $backups; - /** - * The token you can use to retrieve the next page of results. Not returned - * if there are no more results in the list. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\NetApp\V1\Backup>|\Google\Protobuf\Internal\RepeatedField $backups - * A list of backups in the project. - * @type string $next_page_token - * The token you can use to retrieve the next page of results. Not returned - * if there are no more results in the list. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Netapp\V1\Backup::initOnce(); - parent::__construct($data); - } - - /** - * A list of backups in the project. - * - * Generated from protobuf field repeated .google.cloud.netapp.v1.Backup backups = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getBackups() - { - return $this->backups; - } - - /** - * A list of backups in the project. - * - * Generated from protobuf field repeated .google.cloud.netapp.v1.Backup backups = 1; - * @param array<\Google\Cloud\NetApp\V1\Backup>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setBackups($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetApp\V1\Backup::class); - $this->backups = $arr; - - return $this; - } - - /** - * The token you can use to retrieve the next page of results. Not returned - * if there are no more results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * The token you can use to retrieve the next page of results. Not returned - * if there are no more results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListKmsConfigsRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListKmsConfigsRequest.php deleted file mode 100644 index 425b86bdb4c0..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListKmsConfigsRequest.php +++ /dev/null @@ -1,221 +0,0 @@ -google.cloud.netapp.v1.ListKmsConfigsRequest - */ -class ListKmsConfigsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Parent value - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of items to return. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The next_page_token value to use if there are additional - * results to retrieve for this list request. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * Sort results. Supported values are "name", "name desc" or "" (unsorted). - * - * Generated from protobuf field string order_by = 4; - */ - protected $order_by = ''; - /** - * List filter. - * - * Generated from protobuf field string filter = 5; - */ - protected $filter = ''; - - /** - * @param string $parent Required. Parent value - * Please see {@see NetAppClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\NetApp\V1\ListKmsConfigsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Parent value - * @type int $page_size - * The maximum number of items to return. - * @type string $page_token - * The next_page_token value to use if there are additional - * results to retrieve for this list request. - * @type string $order_by - * Sort results. Supported values are "name", "name desc" or "" (unsorted). - * @type string $filter - * List filter. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Netapp\V1\Kms::initOnce(); - parent::__construct($data); - } - - /** - * Required. Parent value - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Parent value - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * The maximum number of items to return. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of items to return. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * The next_page_token value to use if there are additional - * results to retrieve for this list request. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The next_page_token value to use if there are additional - * results to retrieve for this list request. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Sort results. Supported values are "name", "name desc" or "" (unsorted). - * - * Generated from protobuf field string order_by = 4; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Sort results. Supported values are "name", "name desc" or "" (unsorted). - * - * Generated from protobuf field string order_by = 4; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - - /** - * List filter. - * - * Generated from protobuf field string filter = 5; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * List filter. - * - * Generated from protobuf field string filter = 5; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListKmsConfigsResponse.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListKmsConfigsResponse.php deleted file mode 100644 index fd81c2db6c4a..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListKmsConfigsResponse.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.netapp.v1.ListKmsConfigsResponse - */ -class ListKmsConfigsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of KmsConfigs - * - * Generated from protobuf field repeated .google.cloud.netapp.v1.KmsConfig kms_configs = 1; - */ - private $kms_configs; - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\NetApp\V1\KmsConfig>|\Google\Protobuf\Internal\RepeatedField $kms_configs - * The list of KmsConfigs - * @type string $next_page_token - * A token identifying a page of results the server should return. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Netapp\V1\Kms::initOnce(); - parent::__construct($data); - } - - /** - * The list of KmsConfigs - * - * Generated from protobuf field repeated .google.cloud.netapp.v1.KmsConfig kms_configs = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getKmsConfigs() - { - return $this->kms_configs; - } - - /** - * The list of KmsConfigs - * - * Generated from protobuf field repeated .google.cloud.netapp.v1.KmsConfig kms_configs = 1; - * @param array<\Google\Cloud\NetApp\V1\KmsConfig>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setKmsConfigs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetApp\V1\KmsConfig::class); - $this->kms_configs = $arr; - - return $this; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListReplicationsRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListReplicationsRequest.php deleted file mode 100644 index 094c76678204..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListReplicationsRequest.php +++ /dev/null @@ -1,231 +0,0 @@ -google.cloud.netapp.v1.ListReplicationsRequest - */ -class ListReplicationsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The volume for which to retrieve replication information, - * in the format - * `projects/{project_id}/locations/{location}/volumes/{volume_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of items to return. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The next_page_token value to use if there are additional - * results to retrieve for this list request. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * Sort results. Supported values are "name", "name desc" or "" (unsorted). - * - * Generated from protobuf field string order_by = 4; - */ - protected $order_by = ''; - /** - * List filter. - * - * Generated from protobuf field string filter = 5; - */ - protected $filter = ''; - - /** - * @param string $parent Required. The volume for which to retrieve replication information, - * in the format - * `projects/{project_id}/locations/{location}/volumes/{volume_id}`. Please see - * {@see NetAppClient::volumeName()} for help formatting this field. - * - * @return \Google\Cloud\NetApp\V1\ListReplicationsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The volume for which to retrieve replication information, - * in the format - * `projects/{project_id}/locations/{location}/volumes/{volume_id}`. - * @type int $page_size - * The maximum number of items to return. - * @type string $page_token - * The next_page_token value to use if there are additional - * results to retrieve for this list request. - * @type string $order_by - * Sort results. Supported values are "name", "name desc" or "" (unsorted). - * @type string $filter - * List filter. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Netapp\V1\Replication::initOnce(); - parent::__construct($data); - } - - /** - * Required. The volume for which to retrieve replication information, - * in the format - * `projects/{project_id}/locations/{location}/volumes/{volume_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The volume for which to retrieve replication information, - * in the format - * `projects/{project_id}/locations/{location}/volumes/{volume_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * The maximum number of items to return. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of items to return. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * The next_page_token value to use if there are additional - * results to retrieve for this list request. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The next_page_token value to use if there are additional - * results to retrieve for this list request. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Sort results. Supported values are "name", "name desc" or "" (unsorted). - * - * Generated from protobuf field string order_by = 4; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Sort results. Supported values are "name", "name desc" or "" (unsorted). - * - * Generated from protobuf field string order_by = 4; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - - /** - * List filter. - * - * Generated from protobuf field string filter = 5; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * List filter. - * - * Generated from protobuf field string filter = 5; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListReplicationsResponse.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListReplicationsResponse.php deleted file mode 100644 index 49323c831c19..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListReplicationsResponse.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.netapp.v1.ListReplicationsResponse - */ -class ListReplicationsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of replications in the project for the specified volume. - * - * Generated from protobuf field repeated .google.cloud.netapp.v1.Replication replications = 1; - */ - private $replications; - /** - * The token you can use to retrieve the next page of results. Not returned - * if there are no more results in the list. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\NetApp\V1\Replication>|\Google\Protobuf\Internal\RepeatedField $replications - * A list of replications in the project for the specified volume. - * @type string $next_page_token - * The token you can use to retrieve the next page of results. Not returned - * if there are no more results in the list. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Netapp\V1\Replication::initOnce(); - parent::__construct($data); - } - - /** - * A list of replications in the project for the specified volume. - * - * Generated from protobuf field repeated .google.cloud.netapp.v1.Replication replications = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getReplications() - { - return $this->replications; - } - - /** - * A list of replications in the project for the specified volume. - * - * Generated from protobuf field repeated .google.cloud.netapp.v1.Replication replications = 1; - * @param array<\Google\Cloud\NetApp\V1\Replication>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setReplications($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetApp\V1\Replication::class); - $this->replications = $arr; - - return $this; - } - - /** - * The token you can use to retrieve the next page of results. Not returned - * if there are no more results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * The token you can use to retrieve the next page of results. Not returned - * if there are no more results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListSnapshotsRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListSnapshotsRequest.php deleted file mode 100644 index d2539ad77f88..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListSnapshotsRequest.php +++ /dev/null @@ -1,231 +0,0 @@ -google.cloud.netapp.v1.ListSnapshotsRequest - */ -class ListSnapshotsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The volume for which to retrieve snapshot information, - * in the format - * `projects/{project_id}/locations/{location}/volumes/{volume_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of items to return. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The next_page_token value to use if there are additional - * results to retrieve for this list request. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * Sort results. Supported values are "name", "name desc" or "" (unsorted). - * - * Generated from protobuf field string order_by = 4; - */ - protected $order_by = ''; - /** - * List filter. - * - * Generated from protobuf field string filter = 5; - */ - protected $filter = ''; - - /** - * @param string $parent Required. The volume for which to retrieve snapshot information, - * in the format - * `projects/{project_id}/locations/{location}/volumes/{volume_id}`. Please see - * {@see NetAppClient::volumeName()} for help formatting this field. - * - * @return \Google\Cloud\NetApp\V1\ListSnapshotsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The volume for which to retrieve snapshot information, - * in the format - * `projects/{project_id}/locations/{location}/volumes/{volume_id}`. - * @type int $page_size - * The maximum number of items to return. - * @type string $page_token - * The next_page_token value to use if there are additional - * results to retrieve for this list request. - * @type string $order_by - * Sort results. Supported values are "name", "name desc" or "" (unsorted). - * @type string $filter - * List filter. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Netapp\V1\Snapshot::initOnce(); - parent::__construct($data); - } - - /** - * Required. The volume for which to retrieve snapshot information, - * in the format - * `projects/{project_id}/locations/{location}/volumes/{volume_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The volume for which to retrieve snapshot information, - * in the format - * `projects/{project_id}/locations/{location}/volumes/{volume_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * The maximum number of items to return. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of items to return. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * The next_page_token value to use if there are additional - * results to retrieve for this list request. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The next_page_token value to use if there are additional - * results to retrieve for this list request. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Sort results. Supported values are "name", "name desc" or "" (unsorted). - * - * Generated from protobuf field string order_by = 4; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Sort results. Supported values are "name", "name desc" or "" (unsorted). - * - * Generated from protobuf field string order_by = 4; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - - /** - * List filter. - * - * Generated from protobuf field string filter = 5; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * List filter. - * - * Generated from protobuf field string filter = 5; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListSnapshotsResponse.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListSnapshotsResponse.php deleted file mode 100644 index 78b8503f9656..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListSnapshotsResponse.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.netapp.v1.ListSnapshotsResponse - */ -class ListSnapshotsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of snapshots in the project for the specified volume. - * - * Generated from protobuf field repeated .google.cloud.netapp.v1.Snapshot snapshots = 1; - */ - private $snapshots; - /** - * The token you can use to retrieve the next page of results. Not returned - * if there are no more results in the list. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\NetApp\V1\Snapshot>|\Google\Protobuf\Internal\RepeatedField $snapshots - * A list of snapshots in the project for the specified volume. - * @type string $next_page_token - * The token you can use to retrieve the next page of results. Not returned - * if there are no more results in the list. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Netapp\V1\Snapshot::initOnce(); - parent::__construct($data); - } - - /** - * A list of snapshots in the project for the specified volume. - * - * Generated from protobuf field repeated .google.cloud.netapp.v1.Snapshot snapshots = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSnapshots() - { - return $this->snapshots; - } - - /** - * A list of snapshots in the project for the specified volume. - * - * Generated from protobuf field repeated .google.cloud.netapp.v1.Snapshot snapshots = 1; - * @param array<\Google\Cloud\NetApp\V1\Snapshot>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSnapshots($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetApp\V1\Snapshot::class); - $this->snapshots = $arr; - - return $this; - } - - /** - * The token you can use to retrieve the next page of results. Not returned - * if there are no more results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * The token you can use to retrieve the next page of results. Not returned - * if there are no more results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListStoragePoolsRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListStoragePoolsRequest.php deleted file mode 100644 index 6569b9d2c4c5..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListStoragePoolsRequest.php +++ /dev/null @@ -1,225 +0,0 @@ -google.cloud.netapp.v1.ListStoragePoolsRequest - */ -class ListStoragePoolsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Parent value - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The maximum number of items to return. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. The next_page_token value to use if there are additional - * results to retrieve for this list request. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. Sort results. Supported values are "name", "name desc" or "" - * (unsorted). - * - * Generated from protobuf field string order_by = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - /** - * Optional. List filter. - * - * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - - /** - * @param string $parent Required. Parent value - * Please see {@see NetAppClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\NetApp\V1\ListStoragePoolsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Parent value - * @type int $page_size - * Optional. The maximum number of items to return. - * @type string $page_token - * Optional. The next_page_token value to use if there are additional - * results to retrieve for this list request. - * @type string $order_by - * Optional. Sort results. Supported values are "name", "name desc" or "" - * (unsorted). - * @type string $filter - * Optional. List filter. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Netapp\V1\StoragePool::initOnce(); - parent::__construct($data); - } - - /** - * Required. Parent value - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Parent value - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. The maximum number of items to return. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of items to return. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. The next_page_token value to use if there are additional - * results to retrieve for this list request. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. The next_page_token value to use if there are additional - * results to retrieve for this list request. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Optional. Sort results. Supported values are "name", "name desc" or "" - * (unsorted). - * - * Generated from protobuf field string order_by = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Optional. Sort results. Supported values are "name", "name desc" or "" - * (unsorted). - * - * Generated from protobuf field string order_by = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - - /** - * Optional. List filter. - * - * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. List filter. - * - * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListStoragePoolsResponse.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListStoragePoolsResponse.php deleted file mode 100644 index 2aa56a245d4d..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListStoragePoolsResponse.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.netapp.v1.ListStoragePoolsResponse - */ -class ListStoragePoolsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of StoragePools - * - * Generated from protobuf field repeated .google.cloud.netapp.v1.StoragePool storage_pools = 1; - */ - private $storage_pools; - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\NetApp\V1\StoragePool>|\Google\Protobuf\Internal\RepeatedField $storage_pools - * The list of StoragePools - * @type string $next_page_token - * A token identifying a page of results the server should return. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Netapp\V1\StoragePool::initOnce(); - parent::__construct($data); - } - - /** - * The list of StoragePools - * - * Generated from protobuf field repeated .google.cloud.netapp.v1.StoragePool storage_pools = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getStoragePools() - { - return $this->storage_pools; - } - - /** - * The list of StoragePools - * - * Generated from protobuf field repeated .google.cloud.netapp.v1.StoragePool storage_pools = 1; - * @param array<\Google\Cloud\NetApp\V1\StoragePool>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setStoragePools($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetApp\V1\StoragePool::class); - $this->storage_pools = $arr; - - return $this; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListVolumesRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListVolumesRequest.php deleted file mode 100644 index 68b888bed683..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListVolumesRequest.php +++ /dev/null @@ -1,221 +0,0 @@ -google.cloud.netapp.v1.ListVolumesRequest - */ -class ListVolumesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Parent value for ListVolumesRequest - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Requested page size. Server may return fewer items than requested. - * If unspecified, the server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * Filtering results - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - /** - * Hint for how to order the results - * - * Generated from protobuf field string order_by = 5; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. Parent value for ListVolumesRequest - * Please see {@see NetAppClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\NetApp\V1\ListVolumesRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Parent value for ListVolumesRequest - * @type int $page_size - * Requested page size. Server may return fewer items than requested. - * If unspecified, the server will pick an appropriate default. - * @type string $page_token - * A token identifying a page of results the server should return. - * @type string $filter - * Filtering results - * @type string $order_by - * Hint for how to order the results - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Netapp\V1\Volume::initOnce(); - parent::__construct($data); - } - - /** - * Required. Parent value for ListVolumesRequest - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Parent value for ListVolumesRequest - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Requested page size. Server may return fewer items than requested. - * If unspecified, the server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Requested page size. Server may return fewer items than requested. - * If unspecified, the server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Filtering results - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Filtering results - * - * Generated from protobuf field string filter = 4; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Hint for how to order the results - * - * Generated from protobuf field string order_by = 5; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Hint for how to order the results - * - * Generated from protobuf field string order_by = 5; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListVolumesResponse.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListVolumesResponse.php deleted file mode 100644 index 077e3a87033c..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ListVolumesResponse.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.netapp.v1.ListVolumesResponse - */ -class ListVolumesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of Volume - * - * Generated from protobuf field repeated .google.cloud.netapp.v1.Volume volumes = 1; - */ - private $volumes; - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\NetApp\V1\Volume>|\Google\Protobuf\Internal\RepeatedField $volumes - * The list of Volume - * @type string $next_page_token - * A token identifying a page of results the server should return. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Netapp\V1\Volume::initOnce(); - parent::__construct($data); - } - - /** - * The list of Volume - * - * Generated from protobuf field repeated .google.cloud.netapp.v1.Volume volumes = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getVolumes() - { - return $this->volumes; - } - - /** - * The list of Volume - * - * Generated from protobuf field repeated .google.cloud.netapp.v1.Volume volumes = 1; - * @param array<\Google\Cloud\NetApp\V1\Volume>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setVolumes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetApp\V1\Volume::class); - $this->volumes = $arr; - - return $this; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/LocationMetadata.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/LocationMetadata.php deleted file mode 100644 index 1718fe1bb168..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/LocationMetadata.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.netapp.v1.LocationMetadata - */ -class LocationMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Supported service levels in a location. - * - * Generated from protobuf field repeated .google.cloud.netapp.v1.ServiceLevel supported_service_levels = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $supported_service_levels; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $supported_service_levels - * Output only. Supported service levels in a location. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Netapp\V1\Common::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Supported service levels in a location. - * - * Generated from protobuf field repeated .google.cloud.netapp.v1.ServiceLevel supported_service_levels = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSupportedServiceLevels() - { - return $this->supported_service_levels; - } - - /** - * Output only. Supported service levels in a location. - * - * Generated from protobuf field repeated .google.cloud.netapp.v1.ServiceLevel supported_service_levels = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSupportedServiceLevels($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\NetApp\V1\ServiceLevel::class); - $this->supported_service_levels = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/MonthlySchedule.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/MonthlySchedule.php deleted file mode 100644 index 4cd932549523..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/MonthlySchedule.php +++ /dev/null @@ -1,217 +0,0 @@ -google.cloud.netapp.v1.MonthlySchedule - */ -class MonthlySchedule extends \Google\Protobuf\Internal\Message -{ - /** - * The maximum number of Snapshots to keep for the hourly schedule - * - * Generated from protobuf field optional double snapshots_to_keep = 1; - */ - protected $snapshots_to_keep = null; - /** - * Set the minute of the hour to start the snapshot (0-59), defaults to the - * top of the hour (0). - * - * Generated from protobuf field optional double minute = 2; - */ - protected $minute = null; - /** - * Set the hour to start the snapshot (0-23), defaults to midnight (0). - * - * Generated from protobuf field optional double hour = 3; - */ - protected $hour = null; - /** - * Set the day or days of the month to make a snapshot (1-31). Accepts a - * comma separated number of days. Defaults to '1'. - * - * Generated from protobuf field optional string days_of_month = 4; - */ - protected $days_of_month = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $snapshots_to_keep - * The maximum number of Snapshots to keep for the hourly schedule - * @type float $minute - * Set the minute of the hour to start the snapshot (0-59), defaults to the - * top of the hour (0). - * @type float $hour - * Set the hour to start the snapshot (0-23), defaults to midnight (0). - * @type string $days_of_month - * Set the day or days of the month to make a snapshot (1-31). Accepts a - * comma separated number of days. Defaults to '1'. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Netapp\V1\Volume::initOnce(); - parent::__construct($data); - } - - /** - * The maximum number of Snapshots to keep for the hourly schedule - * - * Generated from protobuf field optional double snapshots_to_keep = 1; - * @return float - */ - public function getSnapshotsToKeep() - { - return isset($this->snapshots_to_keep) ? $this->snapshots_to_keep : 0.0; - } - - public function hasSnapshotsToKeep() - { - return isset($this->snapshots_to_keep); - } - - public function clearSnapshotsToKeep() - { - unset($this->snapshots_to_keep); - } - - /** - * The maximum number of Snapshots to keep for the hourly schedule - * - * Generated from protobuf field optional double snapshots_to_keep = 1; - * @param float $var - * @return $this - */ - public function setSnapshotsToKeep($var) - { - GPBUtil::checkDouble($var); - $this->snapshots_to_keep = $var; - - return $this; - } - - /** - * Set the minute of the hour to start the snapshot (0-59), defaults to the - * top of the hour (0). - * - * Generated from protobuf field optional double minute = 2; - * @return float - */ - public function getMinute() - { - return isset($this->minute) ? $this->minute : 0.0; - } - - public function hasMinute() - { - return isset($this->minute); - } - - public function clearMinute() - { - unset($this->minute); - } - - /** - * Set the minute of the hour to start the snapshot (0-59), defaults to the - * top of the hour (0). - * - * Generated from protobuf field optional double minute = 2; - * @param float $var - * @return $this - */ - public function setMinute($var) - { - GPBUtil::checkDouble($var); - $this->minute = $var; - - return $this; - } - - /** - * Set the hour to start the snapshot (0-23), defaults to midnight (0). - * - * Generated from protobuf field optional double hour = 3; - * @return float - */ - public function getHour() - { - return isset($this->hour) ? $this->hour : 0.0; - } - - public function hasHour() - { - return isset($this->hour); - } - - public function clearHour() - { - unset($this->hour); - } - - /** - * Set the hour to start the snapshot (0-23), defaults to midnight (0). - * - * Generated from protobuf field optional double hour = 3; - * @param float $var - * @return $this - */ - public function setHour($var) - { - GPBUtil::checkDouble($var); - $this->hour = $var; - - return $this; - } - - /** - * Set the day or days of the month to make a snapshot (1-31). Accepts a - * comma separated number of days. Defaults to '1'. - * - * Generated from protobuf field optional string days_of_month = 4; - * @return string - */ - public function getDaysOfMonth() - { - return isset($this->days_of_month) ? $this->days_of_month : ''; - } - - public function hasDaysOfMonth() - { - return isset($this->days_of_month); - } - - public function clearDaysOfMonth() - { - unset($this->days_of_month); - } - - /** - * Set the day or days of the month to make a snapshot (1-31). Accepts a - * comma separated number of days. Defaults to '1'. - * - * Generated from protobuf field optional string days_of_month = 4; - * @param string $var - * @return $this - */ - public function setDaysOfMonth($var) - { - GPBUtil::checkString($var, True); - $this->days_of_month = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/MountOption.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/MountOption.php deleted file mode 100644 index 7b70200e1081..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/MountOption.php +++ /dev/null @@ -1,169 +0,0 @@ -google.cloud.netapp.v1.MountOption - */ -class MountOption extends \Google\Protobuf\Internal\Message -{ - /** - * Export string - * - * Generated from protobuf field string export = 1; - */ - protected $export = ''; - /** - * Full export string - * - * Generated from protobuf field string export_full = 2; - */ - protected $export_full = ''; - /** - * Protocol to mount with. - * - * Generated from protobuf field .google.cloud.netapp.v1.Protocols protocol = 3; - */ - protected $protocol = 0; - /** - * Instructions for mounting - * - * Generated from protobuf field string instructions = 4; - */ - protected $instructions = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $export - * Export string - * @type string $export_full - * Full export string - * @type int $protocol - * Protocol to mount with. - * @type string $instructions - * Instructions for mounting - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Netapp\V1\Volume::initOnce(); - parent::__construct($data); - } - - /** - * Export string - * - * Generated from protobuf field string export = 1; - * @return string - */ - public function getExport() - { - return $this->export; - } - - /** - * Export string - * - * Generated from protobuf field string export = 1; - * @param string $var - * @return $this - */ - public function setExport($var) - { - GPBUtil::checkString($var, True); - $this->export = $var; - - return $this; - } - - /** - * Full export string - * - * Generated from protobuf field string export_full = 2; - * @return string - */ - public function getExportFull() - { - return $this->export_full; - } - - /** - * Full export string - * - * Generated from protobuf field string export_full = 2; - * @param string $var - * @return $this - */ - public function setExportFull($var) - { - GPBUtil::checkString($var, True); - $this->export_full = $var; - - return $this; - } - - /** - * Protocol to mount with. - * - * Generated from protobuf field .google.cloud.netapp.v1.Protocols protocol = 3; - * @return int - */ - public function getProtocol() - { - return $this->protocol; - } - - /** - * Protocol to mount with. - * - * Generated from protobuf field .google.cloud.netapp.v1.Protocols protocol = 3; - * @param int $var - * @return $this - */ - public function setProtocol($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\NetApp\V1\Protocols::class); - $this->protocol = $var; - - return $this; - } - - /** - * Instructions for mounting - * - * Generated from protobuf field string instructions = 4; - * @return string - */ - public function getInstructions() - { - return $this->instructions; - } - - /** - * Instructions for mounting - * - * Generated from protobuf field string instructions = 4; - * @param string $var - * @return $this - */ - public function setInstructions($var) - { - GPBUtil::checkString($var, True); - $this->instructions = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/OperationMetadata.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/OperationMetadata.php deleted file mode 100644 index 58b129644ac9..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/OperationMetadata.php +++ /dev/null @@ -1,307 +0,0 @@ -google.cloud.netapp.v1.OperationMetadata - */ -class OperationMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $end_time = null; - /** - * Output only. Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $target = ''; - /** - * Output only. Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $verb = ''; - /** - * Output only. Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $status_message = ''; - /** - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have been canceled successfully - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. - * - * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $requested_cancellation = false; - /** - * Output only. API version used to start the operation. - * - * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $api_version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time the operation was created. - * @type \Google\Protobuf\Timestamp $end_time - * Output only. The time the operation finished running. - * @type string $target - * Output only. Server-defined resource path for the target of the operation. - * @type string $verb - * Output only. Name of the verb executed by the operation. - * @type string $status_message - * Output only. Human-readable status of the operation, if any. - * @type bool $requested_cancellation - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have been canceled successfully - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. - * @type string $api_version - * Output only. API version used to start the operation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Netapp\V1\CloudNetappService::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * Output only. The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * Output only. Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getTarget() - { - return $this->target; - } - - /** - * Output only. Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setTarget($var) - { - GPBUtil::checkString($var, True); - $this->target = $var; - - return $this; - } - - /** - * Output only. Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getVerb() - { - return $this->verb; - } - - /** - * Output only. Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setVerb($var) - { - GPBUtil::checkString($var, True); - $this->verb = $var; - - return $this; - } - - /** - * Output only. Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getStatusMessage() - { - return $this->status_message; - } - - /** - * Output only. Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setStatusMessage($var) - { - GPBUtil::checkString($var, True); - $this->status_message = $var; - - return $this; - } - - /** - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have been canceled successfully - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. - * - * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getRequestedCancellation() - { - return $this->requested_cancellation; - } - - /** - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have been canceled successfully - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. - * - * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setRequestedCancellation($var) - { - GPBUtil::checkBool($var); - $this->requested_cancellation = $var; - - return $this; - } - - /** - * Output only. API version used to start the operation. - * - * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getApiVersion() - { - return $this->api_version; - } - - /** - * Output only. API version used to start the operation. - * - * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setApiVersion($var) - { - GPBUtil::checkString($var, True); - $this->api_version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Protocols.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Protocols.php deleted file mode 100644 index bda324fe0c87..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Protocols.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.netapp.v1.Protocols - */ -class Protocols -{ - /** - * Unspecified protocol - * - * Generated from protobuf enum PROTOCOLS_UNSPECIFIED = 0; - */ - const PROTOCOLS_UNSPECIFIED = 0; - /** - * NFS V3 protocol - * - * Generated from protobuf enum NFSV3 = 1; - */ - const NFSV3 = 1; - /** - * NFS V4 protocol - * - * Generated from protobuf enum NFSV4 = 2; - */ - const NFSV4 = 2; - /** - * SMB protocol - * - * Generated from protobuf enum SMB = 3; - */ - const SMB = 3; - - private static $valueToName = [ - self::PROTOCOLS_UNSPECIFIED => 'PROTOCOLS_UNSPECIFIED', - self::NFSV3 => 'NFSV3', - self::NFSV4 => 'NFSV4', - self::SMB => 'SMB', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Replication.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Replication.php deleted file mode 100644 index 3d6b2d73def4..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Replication.php +++ /dev/null @@ -1,705 +0,0 @@ -google.cloud.netapp.v1.Replication - */ -class Replication extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. The resource name of the Replication. - * Format: - * `projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Output only. State of the replication. - * - * Generated from protobuf field .google.cloud.netapp.v1.Replication.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. State details of the replication. - * - * Generated from protobuf field string state_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state_details = ''; - /** - * Output only. Indicates whether this points to source or destination. - * - * Generated from protobuf field .google.cloud.netapp.v1.Replication.ReplicationRole role = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $role = 0; - /** - * Required. Indicates the schedule for replication. - * - * Generated from protobuf field .google.cloud.netapp.v1.Replication.ReplicationSchedule replication_schedule = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $replication_schedule = 0; - /** - * Output only. Indicates the state of mirroring. - * - * Generated from protobuf field .google.cloud.netapp.v1.Replication.MirrorState mirror_state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $mirror_state = 0; - /** - * Output only. Condition of the relationship. Can be one of the following: - * - true: The replication relationship is healthy. It has not missed the most - * recent scheduled transfer. - * - false: The replication relationship is not healthy. It has missed the - * most recent scheduled transfer. - * - * Generated from protobuf field optional bool healthy = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $healthy = null; - /** - * Output only. Replication create time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. Full name of destination volume resource. - * Example : "projects/{project}/locations/{location}/volumes/{volume_id}" - * - * Generated from protobuf field string destination_volume = 10 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $destination_volume = ''; - /** - * Output only. Replication transfer statistics. - * - * Generated from protobuf field .google.cloud.netapp.v1.TransferStats transfer_stats = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $transfer_stats = null; - /** - * Resource labels to represent user provided metadata. - * - * Generated from protobuf field map labels = 12; - */ - private $labels; - /** - * A description about this replication relationship. - * - * Generated from protobuf field optional string description = 13; - */ - protected $description = null; - /** - * Required. Input only. Destination volume parameters - * - * Generated from protobuf field .google.cloud.netapp.v1.DestinationVolumeParameters destination_volume_parameters = 14 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = REQUIRED]; - */ - protected $destination_volume_parameters = null; - /** - * Output only. Full name of source volume resource. - * Example : "projects/{project}/locations/{location}/volumes/{volume_id}" - * - * Generated from protobuf field string source_volume = 15 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $source_volume = ''; - /** - * Output only. Hybrid peering details. - * - * Generated from protobuf field .google.cloud.netapp.v1.HybridPeeringDetails hybrid_peering_details = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $hybrid_peering_details = null; - /** - * Optional. Location of the user cluster. - * - * Generated from protobuf field string cluster_location = 18 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $cluster_location = ''; - /** - * Output only. Type of the hybrid replication. - * - * Generated from protobuf field .google.cloud.netapp.v1.Replication.HybridReplicationType hybrid_replication_type = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $hybrid_replication_type = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. The resource name of the Replication. - * Format: - * `projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}`. - * @type int $state - * Output only. State of the replication. - * @type string $state_details - * Output only. State details of the replication. - * @type int $role - * Output only. Indicates whether this points to source or destination. - * @type int $replication_schedule - * Required. Indicates the schedule for replication. - * @type int $mirror_state - * Output only. Indicates the state of mirroring. - * @type bool $healthy - * Output only. Condition of the relationship. Can be one of the following: - * - true: The replication relationship is healthy. It has not missed the most - * recent scheduled transfer. - * - false: The replication relationship is not healthy. It has missed the - * most recent scheduled transfer. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. Replication create time. - * @type string $destination_volume - * Output only. Full name of destination volume resource. - * Example : "projects/{project}/locations/{location}/volumes/{volume_id}" - * @type \Google\Cloud\NetApp\V1\TransferStats $transfer_stats - * Output only. Replication transfer statistics. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Resource labels to represent user provided metadata. - * @type string $description - * A description about this replication relationship. - * @type \Google\Cloud\NetApp\V1\DestinationVolumeParameters $destination_volume_parameters - * Required. Input only. Destination volume parameters - * @type string $source_volume - * Output only. Full name of source volume resource. - * Example : "projects/{project}/locations/{location}/volumes/{volume_id}" - * @type \Google\Cloud\NetApp\V1\HybridPeeringDetails $hybrid_peering_details - * Output only. Hybrid peering details. - * @type string $cluster_location - * Optional. Location of the user cluster. - * @type int $hybrid_replication_type - * Output only. Type of the hybrid replication. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Netapp\V1\Replication::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. The resource name of the Replication. - * Format: - * `projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. The resource name of the Replication. - * Format: - * `projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. State of the replication. - * - * Generated from protobuf field .google.cloud.netapp.v1.Replication.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. State of the replication. - * - * Generated from protobuf field .google.cloud.netapp.v1.Replication.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\NetApp\V1\Replication\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. State details of the replication. - * - * Generated from protobuf field string state_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getStateDetails() - { - return $this->state_details; - } - - /** - * Output only. State details of the replication. - * - * Generated from protobuf field string state_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setStateDetails($var) - { - GPBUtil::checkString($var, True); - $this->state_details = $var; - - return $this; - } - - /** - * Output only. Indicates whether this points to source or destination. - * - * Generated from protobuf field .google.cloud.netapp.v1.Replication.ReplicationRole role = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getRole() - { - return $this->role; - } - - /** - * Output only. Indicates whether this points to source or destination. - * - * Generated from protobuf field .google.cloud.netapp.v1.Replication.ReplicationRole role = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setRole($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\NetApp\V1\Replication\ReplicationRole::class); - $this->role = $var; - - return $this; - } - - /** - * Required. Indicates the schedule for replication. - * - * Generated from protobuf field .google.cloud.netapp.v1.Replication.ReplicationSchedule replication_schedule = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getReplicationSchedule() - { - return $this->replication_schedule; - } - - /** - * Required. Indicates the schedule for replication. - * - * Generated from protobuf field .google.cloud.netapp.v1.Replication.ReplicationSchedule replication_schedule = 5 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setReplicationSchedule($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\NetApp\V1\Replication\ReplicationSchedule::class); - $this->replication_schedule = $var; - - return $this; - } - - /** - * Output only. Indicates the state of mirroring. - * - * Generated from protobuf field .google.cloud.netapp.v1.Replication.MirrorState mirror_state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getMirrorState() - { - return $this->mirror_state; - } - - /** - * Output only. Indicates the state of mirroring. - * - * Generated from protobuf field .google.cloud.netapp.v1.Replication.MirrorState mirror_state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setMirrorState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\NetApp\V1\Replication\MirrorState::class); - $this->mirror_state = $var; - - return $this; - } - - /** - * Output only. Condition of the relationship. Can be one of the following: - * - true: The replication relationship is healthy. It has not missed the most - * recent scheduled transfer. - * - false: The replication relationship is not healthy. It has missed the - * most recent scheduled transfer. - * - * Generated from protobuf field optional bool healthy = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getHealthy() - { - return isset($this->healthy) ? $this->healthy : false; - } - - public function hasHealthy() - { - return isset($this->healthy); - } - - public function clearHealthy() - { - unset($this->healthy); - } - - /** - * Output only. Condition of the relationship. Can be one of the following: - * - true: The replication relationship is healthy. It has not missed the most - * recent scheduled transfer. - * - false: The replication relationship is not healthy. It has missed the - * most recent scheduled transfer. - * - * Generated from protobuf field optional bool healthy = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setHealthy($var) - { - GPBUtil::checkBool($var); - $this->healthy = $var; - - return $this; - } - - /** - * Output only. Replication create time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. Replication create time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. Full name of destination volume resource. - * Example : "projects/{project}/locations/{location}/volumes/{volume_id}" - * - * Generated from protobuf field string destination_volume = 10 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getDestinationVolume() - { - return $this->destination_volume; - } - - /** - * Output only. Full name of destination volume resource. - * Example : "projects/{project}/locations/{location}/volumes/{volume_id}" - * - * Generated from protobuf field string destination_volume = 10 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setDestinationVolume($var) - { - GPBUtil::checkString($var, True); - $this->destination_volume = $var; - - return $this; - } - - /** - * Output only. Replication transfer statistics. - * - * Generated from protobuf field .google.cloud.netapp.v1.TransferStats transfer_stats = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\NetApp\V1\TransferStats|null - */ - public function getTransferStats() - { - return $this->transfer_stats; - } - - public function hasTransferStats() - { - return isset($this->transfer_stats); - } - - public function clearTransferStats() - { - unset($this->transfer_stats); - } - - /** - * Output only. Replication transfer statistics. - * - * Generated from protobuf field .google.cloud.netapp.v1.TransferStats transfer_stats = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\NetApp\V1\TransferStats $var - * @return $this - */ - public function setTransferStats($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetApp\V1\TransferStats::class); - $this->transfer_stats = $var; - - return $this; - } - - /** - * Resource labels to represent user provided metadata. - * - * Generated from protobuf field map labels = 12; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Resource labels to represent user provided metadata. - * - * Generated from protobuf field map labels = 12; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * A description about this replication relationship. - * - * Generated from protobuf field optional string description = 13; - * @return string - */ - public function getDescription() - { - return isset($this->description) ? $this->description : ''; - } - - public function hasDescription() - { - return isset($this->description); - } - - public function clearDescription() - { - unset($this->description); - } - - /** - * A description about this replication relationship. - * - * Generated from protobuf field optional string description = 13; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Required. Input only. Destination volume parameters - * - * Generated from protobuf field .google.cloud.netapp.v1.DestinationVolumeParameters destination_volume_parameters = 14 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\NetApp\V1\DestinationVolumeParameters|null - */ - public function getDestinationVolumeParameters() - { - return $this->destination_volume_parameters; - } - - public function hasDestinationVolumeParameters() - { - return isset($this->destination_volume_parameters); - } - - public function clearDestinationVolumeParameters() - { - unset($this->destination_volume_parameters); - } - - /** - * Required. Input only. Destination volume parameters - * - * Generated from protobuf field .google.cloud.netapp.v1.DestinationVolumeParameters destination_volume_parameters = 14 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\NetApp\V1\DestinationVolumeParameters $var - * @return $this - */ - public function setDestinationVolumeParameters($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetApp\V1\DestinationVolumeParameters::class); - $this->destination_volume_parameters = $var; - - return $this; - } - - /** - * Output only. Full name of source volume resource. - * Example : "projects/{project}/locations/{location}/volumes/{volume_id}" - * - * Generated from protobuf field string source_volume = 15 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getSourceVolume() - { - return $this->source_volume; - } - - /** - * Output only. Full name of source volume resource. - * Example : "projects/{project}/locations/{location}/volumes/{volume_id}" - * - * Generated from protobuf field string source_volume = 15 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setSourceVolume($var) - { - GPBUtil::checkString($var, True); - $this->source_volume = $var; - - return $this; - } - - /** - * Output only. Hybrid peering details. - * - * Generated from protobuf field .google.cloud.netapp.v1.HybridPeeringDetails hybrid_peering_details = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\NetApp\V1\HybridPeeringDetails|null - */ - public function getHybridPeeringDetails() - { - return $this->hybrid_peering_details; - } - - public function hasHybridPeeringDetails() - { - return isset($this->hybrid_peering_details); - } - - public function clearHybridPeeringDetails() - { - unset($this->hybrid_peering_details); - } - - /** - * Output only. Hybrid peering details. - * - * Generated from protobuf field .google.cloud.netapp.v1.HybridPeeringDetails hybrid_peering_details = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\NetApp\V1\HybridPeeringDetails $var - * @return $this - */ - public function setHybridPeeringDetails($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetApp\V1\HybridPeeringDetails::class); - $this->hybrid_peering_details = $var; - - return $this; - } - - /** - * Optional. Location of the user cluster. - * - * Generated from protobuf field string cluster_location = 18 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getClusterLocation() - { - return $this->cluster_location; - } - - /** - * Optional. Location of the user cluster. - * - * Generated from protobuf field string cluster_location = 18 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setClusterLocation($var) - { - GPBUtil::checkString($var, True); - $this->cluster_location = $var; - - return $this; - } - - /** - * Output only. Type of the hybrid replication. - * - * Generated from protobuf field .google.cloud.netapp.v1.Replication.HybridReplicationType hybrid_replication_type = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getHybridReplicationType() - { - return $this->hybrid_replication_type; - } - - /** - * Output only. Type of the hybrid replication. - * - * Generated from protobuf field .google.cloud.netapp.v1.Replication.HybridReplicationType hybrid_replication_type = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setHybridReplicationType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\NetApp\V1\Replication\HybridReplicationType::class); - $this->hybrid_replication_type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Replication/HybridReplicationType.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Replication/HybridReplicationType.php deleted file mode 100644 index bf912db51b2b..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Replication/HybridReplicationType.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.netapp.v1.Replication.HybridReplicationType - */ -class HybridReplicationType -{ - /** - * Unspecified hybrid replication type. - * - * Generated from protobuf enum HYBRID_REPLICATION_TYPE_UNSPECIFIED = 0; - */ - const HYBRID_REPLICATION_TYPE_UNSPECIFIED = 0; - /** - * Hybrid replication type for migration. - * - * Generated from protobuf enum MIGRATION = 1; - */ - const MIGRATION = 1; - /** - * Hybrid replication type for continuous replication. - * - * Generated from protobuf enum CONTINUOUS_REPLICATION = 2; - */ - const CONTINUOUS_REPLICATION = 2; - - private static $valueToName = [ - self::HYBRID_REPLICATION_TYPE_UNSPECIFIED => 'HYBRID_REPLICATION_TYPE_UNSPECIFIED', - self::MIGRATION => 'MIGRATION', - self::CONTINUOUS_REPLICATION => 'CONTINUOUS_REPLICATION', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(HybridReplicationType::class, \Google\Cloud\NetApp\V1\Replication_HybridReplicationType::class); - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Replication/MirrorState.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Replication/MirrorState.php deleted file mode 100644 index 1243ed864099..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Replication/MirrorState.php +++ /dev/null @@ -1,94 +0,0 @@ -google.cloud.netapp.v1.Replication.MirrorState - */ -class MirrorState -{ - /** - * Unspecified MirrorState - * - * Generated from protobuf enum MIRROR_STATE_UNSPECIFIED = 0; - */ - const MIRROR_STATE_UNSPECIFIED = 0; - /** - * Destination volume is being prepared. - * - * Generated from protobuf enum PREPARING = 1; - */ - const PREPARING = 1; - /** - * Destination volume has been initialized and is ready to receive - * replication transfers. - * - * Generated from protobuf enum MIRRORED = 2; - */ - const MIRRORED = 2; - /** - * Destination volume is not receiving replication transfers. - * - * Generated from protobuf enum STOPPED = 3; - */ - const STOPPED = 3; - /** - * Incremental replication is in progress. - * - * Generated from protobuf enum TRANSFERRING = 4; - */ - const TRANSFERRING = 4; - /** - * Baseline replication is in progress. - * - * Generated from protobuf enum BASELINE_TRANSFERRING = 5; - */ - const BASELINE_TRANSFERRING = 5; - /** - * Replication is aborted. - * - * Generated from protobuf enum ABORTED = 6; - */ - const ABORTED = 6; - - private static $valueToName = [ - self::MIRROR_STATE_UNSPECIFIED => 'MIRROR_STATE_UNSPECIFIED', - self::PREPARING => 'PREPARING', - self::MIRRORED => 'MIRRORED', - self::STOPPED => 'STOPPED', - self::TRANSFERRING => 'TRANSFERRING', - self::BASELINE_TRANSFERRING => 'BASELINE_TRANSFERRING', - self::ABORTED => 'ABORTED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(MirrorState::class, \Google\Cloud\NetApp\V1\Replication_MirrorState::class); - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Replication/ReplicationRole.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Replication/ReplicationRole.php deleted file mode 100644 index ecd795ef02ef..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Replication/ReplicationRole.php +++ /dev/null @@ -1,65 +0,0 @@ -google.cloud.netapp.v1.Replication.ReplicationRole - */ -class ReplicationRole -{ - /** - * Unspecified replication role - * - * Generated from protobuf enum REPLICATION_ROLE_UNSPECIFIED = 0; - */ - const REPLICATION_ROLE_UNSPECIFIED = 0; - /** - * Indicates Source volume. - * - * Generated from protobuf enum SOURCE = 1; - */ - const SOURCE = 1; - /** - * Indicates Destination volume. - * - * Generated from protobuf enum DESTINATION = 2; - */ - const DESTINATION = 2; - - private static $valueToName = [ - self::REPLICATION_ROLE_UNSPECIFIED => 'REPLICATION_ROLE_UNSPECIFIED', - self::SOURCE => 'SOURCE', - self::DESTINATION => 'DESTINATION', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ReplicationRole::class, \Google\Cloud\NetApp\V1\Replication_ReplicationRole::class); - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Replication/ReplicationSchedule.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Replication/ReplicationSchedule.php deleted file mode 100644 index 1846795c7b34..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Replication/ReplicationSchedule.php +++ /dev/null @@ -1,73 +0,0 @@ -google.cloud.netapp.v1.Replication.ReplicationSchedule - */ -class ReplicationSchedule -{ - /** - * Unspecified ReplicationSchedule - * - * Generated from protobuf enum REPLICATION_SCHEDULE_UNSPECIFIED = 0; - */ - const REPLICATION_SCHEDULE_UNSPECIFIED = 0; - /** - * Replication happens once every 10 minutes. - * - * Generated from protobuf enum EVERY_10_MINUTES = 1; - */ - const EVERY_10_MINUTES = 1; - /** - * Replication happens once every hour. - * - * Generated from protobuf enum HOURLY = 2; - */ - const HOURLY = 2; - /** - * Replication happens once every day. - * - * Generated from protobuf enum DAILY = 3; - */ - const DAILY = 3; - - private static $valueToName = [ - self::REPLICATION_SCHEDULE_UNSPECIFIED => 'REPLICATION_SCHEDULE_UNSPECIFIED', - self::EVERY_10_MINUTES => 'EVERY_10_MINUTES', - self::HOURLY => 'HOURLY', - self::DAILY => 'DAILY', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ReplicationSchedule::class, \Google\Cloud\NetApp\V1\Replication_ReplicationSchedule::class); - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Replication/State.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Replication/State.php deleted file mode 100644 index a83367709442..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Replication/State.php +++ /dev/null @@ -1,100 +0,0 @@ -google.cloud.netapp.v1.Replication.State - */ -class State -{ - /** - * Unspecified replication State - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Replication is creating. - * - * Generated from protobuf enum CREATING = 1; - */ - const CREATING = 1; - /** - * Replication is ready. - * - * Generated from protobuf enum READY = 2; - */ - const READY = 2; - /** - * Replication is updating. - * - * Generated from protobuf enum UPDATING = 3; - */ - const UPDATING = 3; - /** - * Replication is deleting. - * - * Generated from protobuf enum DELETING = 5; - */ - const DELETING = 5; - /** - * Replication is in error state. - * - * Generated from protobuf enum ERROR = 6; - */ - const ERROR = 6; - /** - * Replication is waiting for cluster peering to be established. - * - * Generated from protobuf enum PENDING_CLUSTER_PEERING = 8; - */ - const PENDING_CLUSTER_PEERING = 8; - /** - * Replication is waiting for SVM peering to be established. - * - * Generated from protobuf enum PENDING_SVM_PEERING = 9; - */ - const PENDING_SVM_PEERING = 9; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::CREATING => 'CREATING', - self::READY => 'READY', - self::UPDATING => 'UPDATING', - self::DELETING => 'DELETING', - self::ERROR => 'ERROR', - self::PENDING_CLUSTER_PEERING => 'PENDING_CLUSTER_PEERING', - self::PENDING_SVM_PEERING => 'PENDING_SVM_PEERING', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\NetApp\V1\Replication_State::class); - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/RestoreParameters.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/RestoreParameters.php deleted file mode 100644 index 4e7706a812ae..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/RestoreParameters.php +++ /dev/null @@ -1,120 +0,0 @@ -google.cloud.netapp.v1.RestoreParameters - */ -class RestoreParameters extends \Google\Protobuf\Internal\Message -{ - protected $source; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $source_snapshot - * Full name of the snapshot resource. - * Format: - * projects/{project}/locations/{location}/volumes/{volume}/snapshots/{snapshot} - * @type string $source_backup - * Full name of the backup resource. - * Format: - * projects/{project}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id} - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Netapp\V1\Volume::initOnce(); - parent::__construct($data); - } - - /** - * Full name of the snapshot resource. - * Format: - * projects/{project}/locations/{location}/volumes/{volume}/snapshots/{snapshot} - * - * Generated from protobuf field string source_snapshot = 1; - * @return string - */ - public function getSourceSnapshot() - { - return $this->readOneof(1); - } - - public function hasSourceSnapshot() - { - return $this->hasOneof(1); - } - - /** - * Full name of the snapshot resource. - * Format: - * projects/{project}/locations/{location}/volumes/{volume}/snapshots/{snapshot} - * - * Generated from protobuf field string source_snapshot = 1; - * @param string $var - * @return $this - */ - public function setSourceSnapshot($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Full name of the backup resource. - * Format: - * projects/{project}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id} - * - * Generated from protobuf field string source_backup = 2; - * @return string - */ - public function getSourceBackup() - { - return $this->readOneof(2); - } - - public function hasSourceBackup() - { - return $this->hasOneof(2); - } - - /** - * Full name of the backup resource. - * Format: - * projects/{project}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id} - * - * Generated from protobuf field string source_backup = 2; - * @param string $var - * @return $this - */ - public function setSourceBackup($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * @return string - */ - public function getSource() - { - return $this->whichOneof("source"); - } - -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/RestrictedAction.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/RestrictedAction.php deleted file mode 100644 index 7c9890392919..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/RestrictedAction.php +++ /dev/null @@ -1,54 +0,0 @@ -google.cloud.netapp.v1.RestrictedAction - */ -class RestrictedAction -{ - /** - * Unspecified restricted action - * - * Generated from protobuf enum RESTRICTED_ACTION_UNSPECIFIED = 0; - */ - const RESTRICTED_ACTION_UNSPECIFIED = 0; - /** - * Prevent volume from being deleted when mounted. - * - * Generated from protobuf enum DELETE = 1; - */ - const DELETE = 1; - - private static $valueToName = [ - self::RESTRICTED_ACTION_UNSPECIFIED => 'RESTRICTED_ACTION_UNSPECIFIED', - self::DELETE => 'DELETE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ResumeReplicationRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ResumeReplicationRequest.php deleted file mode 100644 index 2217e1e454f9..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ResumeReplicationRequest.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.netapp.v1.ResumeReplicationRequest - */ -class ResumeReplicationRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the replication, in the format of - * projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the replication, in the format of - * projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Netapp\V1\Replication::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the replication, in the format of - * projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the replication, in the format of - * projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ReverseReplicationDirectionRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ReverseReplicationDirectionRequest.php deleted file mode 100644 index 6f01e9c79792..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ReverseReplicationDirectionRequest.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.netapp.v1.ReverseReplicationDirectionRequest - */ -class ReverseReplicationDirectionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the replication, in the format of - * projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the replication, in the format of - * projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Netapp\V1\Replication::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the replication, in the format of - * projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the replication, in the format of - * projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/RevertVolumeRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/RevertVolumeRequest.php deleted file mode 100644 index b767dafea3eb..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/RevertVolumeRequest.php +++ /dev/null @@ -1,113 +0,0 @@ -google.cloud.netapp.v1.RevertVolumeRequest - */ -class RevertVolumeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the volume, in the format of - * projects/{project_id}/locations/{location}/volumes/{volume_id}. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. The snapshot resource ID, in the format 'my-snapshot', where the - * specified ID is the {snapshot_id} of the fully qualified name like - * projects/{project_id}/locations/{location_id}/volumes/{volume_id}/snapshots/{snapshot_id} - * - * Generated from protobuf field string snapshot_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $snapshot_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the volume, in the format of - * projects/{project_id}/locations/{location}/volumes/{volume_id}. - * @type string $snapshot_id - * Required. The snapshot resource ID, in the format 'my-snapshot', where the - * specified ID is the {snapshot_id} of the fully qualified name like - * projects/{project_id}/locations/{location_id}/volumes/{volume_id}/snapshots/{snapshot_id} - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Netapp\V1\Volume::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the volume, in the format of - * projects/{project_id}/locations/{location}/volumes/{volume_id}. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the volume, in the format of - * projects/{project_id}/locations/{location}/volumes/{volume_id}. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. The snapshot resource ID, in the format 'my-snapshot', where the - * specified ID is the {snapshot_id} of the fully qualified name like - * projects/{project_id}/locations/{location_id}/volumes/{volume_id}/snapshots/{snapshot_id} - * - * Generated from protobuf field string snapshot_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getSnapshotId() - { - return $this->snapshot_id; - } - - /** - * Required. The snapshot resource ID, in the format 'my-snapshot', where the - * specified ID is the {snapshot_id} of the fully qualified name like - * projects/{project_id}/locations/{location_id}/volumes/{volume_id}/snapshots/{snapshot_id} - * - * Generated from protobuf field string snapshot_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setSnapshotId($var) - { - GPBUtil::checkString($var, True); - $this->snapshot_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/SMBSettings.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/SMBSettings.php deleted file mode 100644 index 4f42ef7caabb..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/SMBSettings.php +++ /dev/null @@ -1,111 +0,0 @@ -google.cloud.netapp.v1.SMBSettings - */ -class SMBSettings -{ - /** - * Unspecified default option - * - * Generated from protobuf enum SMB_SETTINGS_UNSPECIFIED = 0; - */ - const SMB_SETTINGS_UNSPECIFIED = 0; - /** - * SMB setting encrypt data - * - * Generated from protobuf enum ENCRYPT_DATA = 1; - */ - const ENCRYPT_DATA = 1; - /** - * SMB setting browsable - * - * Generated from protobuf enum BROWSABLE = 2; - */ - const BROWSABLE = 2; - /** - * SMB setting notify change - * - * Generated from protobuf enum CHANGE_NOTIFY = 3; - */ - const CHANGE_NOTIFY = 3; - /** - * SMB setting not to notify change - * - * Generated from protobuf enum NON_BROWSABLE = 4; - */ - const NON_BROWSABLE = 4; - /** - * SMB setting oplocks - * - * Generated from protobuf enum OPLOCKS = 5; - */ - const OPLOCKS = 5; - /** - * SMB setting to show snapshots - * - * Generated from protobuf enum SHOW_SNAPSHOT = 6; - */ - const SHOW_SNAPSHOT = 6; - /** - * SMB setting to show previous versions - * - * Generated from protobuf enum SHOW_PREVIOUS_VERSIONS = 7; - */ - const SHOW_PREVIOUS_VERSIONS = 7; - /** - * SMB setting to access volume based on enumerartion - * - * Generated from protobuf enum ACCESS_BASED_ENUMERATION = 8; - */ - const ACCESS_BASED_ENUMERATION = 8; - /** - * Continuously available enumeration - * - * Generated from protobuf enum CONTINUOUSLY_AVAILABLE = 9; - */ - const CONTINUOUSLY_AVAILABLE = 9; - - private static $valueToName = [ - self::SMB_SETTINGS_UNSPECIFIED => 'SMB_SETTINGS_UNSPECIFIED', - self::ENCRYPT_DATA => 'ENCRYPT_DATA', - self::BROWSABLE => 'BROWSABLE', - self::CHANGE_NOTIFY => 'CHANGE_NOTIFY', - self::NON_BROWSABLE => 'NON_BROWSABLE', - self::OPLOCKS => 'OPLOCKS', - self::SHOW_SNAPSHOT => 'SHOW_SNAPSHOT', - self::SHOW_PREVIOUS_VERSIONS => 'SHOW_PREVIOUS_VERSIONS', - self::ACCESS_BASED_ENUMERATION => 'ACCESS_BASED_ENUMERATION', - self::CONTINUOUSLY_AVAILABLE => 'CONTINUOUSLY_AVAILABLE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/SecurityStyle.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/SecurityStyle.php deleted file mode 100644 index 4fbb24d18d97..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/SecurityStyle.php +++ /dev/null @@ -1,61 +0,0 @@ -google.cloud.netapp.v1.SecurityStyle - */ -class SecurityStyle -{ - /** - * SecurityStyle is unspecified - * - * Generated from protobuf enum SECURITY_STYLE_UNSPECIFIED = 0; - */ - const SECURITY_STYLE_UNSPECIFIED = 0; - /** - * SecurityStyle uses NTFS - * - * Generated from protobuf enum NTFS = 1; - */ - const NTFS = 1; - /** - * SecurityStyle uses UNIX - * - * Generated from protobuf enum UNIX = 2; - */ - const UNIX = 2; - - private static $valueToName = [ - self::SECURITY_STYLE_UNSPECIFIED => 'SECURITY_STYLE_UNSPECIFIED', - self::NTFS => 'NTFS', - self::UNIX => 'UNIX', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ServiceLevel.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ServiceLevel.php deleted file mode 100644 index 75c2df85fcfd..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/ServiceLevel.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.netapp.v1.ServiceLevel - */ -class ServiceLevel -{ - /** - * Unspecified service level. - * - * Generated from protobuf enum SERVICE_LEVEL_UNSPECIFIED = 0; - */ - const SERVICE_LEVEL_UNSPECIFIED = 0; - /** - * Premium service level. - * - * Generated from protobuf enum PREMIUM = 1; - */ - const PREMIUM = 1; - /** - * Extreme service level. - * - * Generated from protobuf enum EXTREME = 2; - */ - const EXTREME = 2; - /** - * Standard service level. - * - * Generated from protobuf enum STANDARD = 3; - */ - const STANDARD = 3; - /** - * Flex service level. - * - * Generated from protobuf enum FLEX = 4; - */ - const FLEX = 4; - - private static $valueToName = [ - self::SERVICE_LEVEL_UNSPECIFIED => 'SERVICE_LEVEL_UNSPECIFIED', - self::PREMIUM => 'PREMIUM', - self::EXTREME => 'EXTREME', - self::STANDARD => 'STANDARD', - self::FLEX => 'FLEX', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/SimpleExportPolicyRule.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/SimpleExportPolicyRule.php deleted file mode 100644 index 6008af6ff18d..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/SimpleExportPolicyRule.php +++ /dev/null @@ -1,577 +0,0 @@ -google.cloud.netapp.v1.SimpleExportPolicyRule - */ -class SimpleExportPolicyRule extends \Google\Protobuf\Internal\Message -{ - /** - * Comma separated list of allowed clients IP addresses - * - * Generated from protobuf field optional string allowed_clients = 1; - */ - protected $allowed_clients = null; - /** - * Whether Unix root access will be granted. - * - * Generated from protobuf field optional string has_root_access = 2; - */ - protected $has_root_access = null; - /** - * Access type (ReadWrite, ReadOnly, None) - * - * Generated from protobuf field optional .google.cloud.netapp.v1.AccessType access_type = 3; - */ - protected $access_type = null; - /** - * NFS V3 protocol. - * - * Generated from protobuf field optional bool nfsv3 = 4; - */ - protected $nfsv3 = null; - /** - * NFS V4 protocol. - * - * Generated from protobuf field optional bool nfsv4 = 5; - */ - protected $nfsv4 = null; - /** - * If enabled (true) the rule defines a read only access for clients matching - * the 'allowedClients' specification. It enables nfs clients to mount using - * 'authentication' kerberos security mode. - * - * Generated from protobuf field optional bool kerberos_5_read_only = 6; - */ - protected $kerberos_5_read_only = null; - /** - * If enabled (true) the rule defines read and write access for clients - * matching the 'allowedClients' specification. It enables nfs clients to - * mount using 'authentication' kerberos security mode. The - * 'kerberos5ReadOnly' value be ignored if this is enabled. - * - * Generated from protobuf field optional bool kerberos_5_read_write = 7; - */ - protected $kerberos_5_read_write = null; - /** - * If enabled (true) the rule defines a read only access for clients matching - * the 'allowedClients' specification. It enables nfs clients to mount using - * 'integrity' kerberos security mode. - * - * Generated from protobuf field optional bool kerberos_5i_read_only = 8; - */ - protected $kerberos_5i_read_only = null; - /** - * If enabled (true) the rule defines read and write access for clients - * matching the 'allowedClients' specification. It enables nfs clients to - * mount using 'integrity' kerberos security mode. The 'kerberos5iReadOnly' - * value be ignored if this is enabled. - * - * Generated from protobuf field optional bool kerberos_5i_read_write = 9; - */ - protected $kerberos_5i_read_write = null; - /** - * If enabled (true) the rule defines a read only access for clients matching - * the 'allowedClients' specification. It enables nfs clients to mount using - * 'privacy' kerberos security mode. - * - * Generated from protobuf field optional bool kerberos_5p_read_only = 10; - */ - protected $kerberos_5p_read_only = null; - /** - * If enabled (true) the rule defines read and write access for clients - * matching the 'allowedClients' specification. It enables nfs clients to - * mount using 'privacy' kerberos security mode. The 'kerberos5pReadOnly' - * value be ignored if this is enabled. - * - * Generated from protobuf field optional bool kerberos_5p_read_write = 11; - */ - protected $kerberos_5p_read_write = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $allowed_clients - * Comma separated list of allowed clients IP addresses - * @type string $has_root_access - * Whether Unix root access will be granted. - * @type int $access_type - * Access type (ReadWrite, ReadOnly, None) - * @type bool $nfsv3 - * NFS V3 protocol. - * @type bool $nfsv4 - * NFS V4 protocol. - * @type bool $kerberos_5_read_only - * If enabled (true) the rule defines a read only access for clients matching - * the 'allowedClients' specification. It enables nfs clients to mount using - * 'authentication' kerberos security mode. - * @type bool $kerberos_5_read_write - * If enabled (true) the rule defines read and write access for clients - * matching the 'allowedClients' specification. It enables nfs clients to - * mount using 'authentication' kerberos security mode. The - * 'kerberos5ReadOnly' value be ignored if this is enabled. - * @type bool $kerberos_5i_read_only - * If enabled (true) the rule defines a read only access for clients matching - * the 'allowedClients' specification. It enables nfs clients to mount using - * 'integrity' kerberos security mode. - * @type bool $kerberos_5i_read_write - * If enabled (true) the rule defines read and write access for clients - * matching the 'allowedClients' specification. It enables nfs clients to - * mount using 'integrity' kerberos security mode. The 'kerberos5iReadOnly' - * value be ignored if this is enabled. - * @type bool $kerberos_5p_read_only - * If enabled (true) the rule defines a read only access for clients matching - * the 'allowedClients' specification. It enables nfs clients to mount using - * 'privacy' kerberos security mode. - * @type bool $kerberos_5p_read_write - * If enabled (true) the rule defines read and write access for clients - * matching the 'allowedClients' specification. It enables nfs clients to - * mount using 'privacy' kerberos security mode. The 'kerberos5pReadOnly' - * value be ignored if this is enabled. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Netapp\V1\Volume::initOnce(); - parent::__construct($data); - } - - /** - * Comma separated list of allowed clients IP addresses - * - * Generated from protobuf field optional string allowed_clients = 1; - * @return string - */ - public function getAllowedClients() - { - return isset($this->allowed_clients) ? $this->allowed_clients : ''; - } - - public function hasAllowedClients() - { - return isset($this->allowed_clients); - } - - public function clearAllowedClients() - { - unset($this->allowed_clients); - } - - /** - * Comma separated list of allowed clients IP addresses - * - * Generated from protobuf field optional string allowed_clients = 1; - * @param string $var - * @return $this - */ - public function setAllowedClients($var) - { - GPBUtil::checkString($var, True); - $this->allowed_clients = $var; - - return $this; - } - - /** - * Whether Unix root access will be granted. - * - * Generated from protobuf field optional string has_root_access = 2; - * @return string - */ - public function getHasRootAccess() - { - return isset($this->has_root_access) ? $this->has_root_access : ''; - } - - public function hasHasRootAccess() - { - return isset($this->has_root_access); - } - - public function clearHasRootAccess() - { - unset($this->has_root_access); - } - - /** - * Whether Unix root access will be granted. - * - * Generated from protobuf field optional string has_root_access = 2; - * @param string $var - * @return $this - */ - public function setHasRootAccess($var) - { - GPBUtil::checkString($var, True); - $this->has_root_access = $var; - - return $this; - } - - /** - * Access type (ReadWrite, ReadOnly, None) - * - * Generated from protobuf field optional .google.cloud.netapp.v1.AccessType access_type = 3; - * @return int - */ - public function getAccessType() - { - return isset($this->access_type) ? $this->access_type : 0; - } - - public function hasAccessType() - { - return isset($this->access_type); - } - - public function clearAccessType() - { - unset($this->access_type); - } - - /** - * Access type (ReadWrite, ReadOnly, None) - * - * Generated from protobuf field optional .google.cloud.netapp.v1.AccessType access_type = 3; - * @param int $var - * @return $this - */ - public function setAccessType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\NetApp\V1\AccessType::class); - $this->access_type = $var; - - return $this; - } - - /** - * NFS V3 protocol. - * - * Generated from protobuf field optional bool nfsv3 = 4; - * @return bool - */ - public function getNfsv3() - { - return isset($this->nfsv3) ? $this->nfsv3 : false; - } - - public function hasNfsv3() - { - return isset($this->nfsv3); - } - - public function clearNfsv3() - { - unset($this->nfsv3); - } - - /** - * NFS V3 protocol. - * - * Generated from protobuf field optional bool nfsv3 = 4; - * @param bool $var - * @return $this - */ - public function setNfsv3($var) - { - GPBUtil::checkBool($var); - $this->nfsv3 = $var; - - return $this; - } - - /** - * NFS V4 protocol. - * - * Generated from protobuf field optional bool nfsv4 = 5; - * @return bool - */ - public function getNfsv4() - { - return isset($this->nfsv4) ? $this->nfsv4 : false; - } - - public function hasNfsv4() - { - return isset($this->nfsv4); - } - - public function clearNfsv4() - { - unset($this->nfsv4); - } - - /** - * NFS V4 protocol. - * - * Generated from protobuf field optional bool nfsv4 = 5; - * @param bool $var - * @return $this - */ - public function setNfsv4($var) - { - GPBUtil::checkBool($var); - $this->nfsv4 = $var; - - return $this; - } - - /** - * If enabled (true) the rule defines a read only access for clients matching - * the 'allowedClients' specification. It enables nfs clients to mount using - * 'authentication' kerberos security mode. - * - * Generated from protobuf field optional bool kerberos_5_read_only = 6; - * @return bool - */ - public function getKerberos5ReadOnly() - { - return isset($this->kerberos_5_read_only) ? $this->kerberos_5_read_only : false; - } - - public function hasKerberos5ReadOnly() - { - return isset($this->kerberos_5_read_only); - } - - public function clearKerberos5ReadOnly() - { - unset($this->kerberos_5_read_only); - } - - /** - * If enabled (true) the rule defines a read only access for clients matching - * the 'allowedClients' specification. It enables nfs clients to mount using - * 'authentication' kerberos security mode. - * - * Generated from protobuf field optional bool kerberos_5_read_only = 6; - * @param bool $var - * @return $this - */ - public function setKerberos5ReadOnly($var) - { - GPBUtil::checkBool($var); - $this->kerberos_5_read_only = $var; - - return $this; - } - - /** - * If enabled (true) the rule defines read and write access for clients - * matching the 'allowedClients' specification. It enables nfs clients to - * mount using 'authentication' kerberos security mode. The - * 'kerberos5ReadOnly' value be ignored if this is enabled. - * - * Generated from protobuf field optional bool kerberos_5_read_write = 7; - * @return bool - */ - public function getKerberos5ReadWrite() - { - return isset($this->kerberos_5_read_write) ? $this->kerberos_5_read_write : false; - } - - public function hasKerberos5ReadWrite() - { - return isset($this->kerberos_5_read_write); - } - - public function clearKerberos5ReadWrite() - { - unset($this->kerberos_5_read_write); - } - - /** - * If enabled (true) the rule defines read and write access for clients - * matching the 'allowedClients' specification. It enables nfs clients to - * mount using 'authentication' kerberos security mode. The - * 'kerberos5ReadOnly' value be ignored if this is enabled. - * - * Generated from protobuf field optional bool kerberos_5_read_write = 7; - * @param bool $var - * @return $this - */ - public function setKerberos5ReadWrite($var) - { - GPBUtil::checkBool($var); - $this->kerberos_5_read_write = $var; - - return $this; - } - - /** - * If enabled (true) the rule defines a read only access for clients matching - * the 'allowedClients' specification. It enables nfs clients to mount using - * 'integrity' kerberos security mode. - * - * Generated from protobuf field optional bool kerberos_5i_read_only = 8; - * @return bool - */ - public function getKerberos5IReadOnly() - { - return isset($this->kerberos_5i_read_only) ? $this->kerberos_5i_read_only : false; - } - - public function hasKerberos5IReadOnly() - { - return isset($this->kerberos_5i_read_only); - } - - public function clearKerberos5IReadOnly() - { - unset($this->kerberos_5i_read_only); - } - - /** - * If enabled (true) the rule defines a read only access for clients matching - * the 'allowedClients' specification. It enables nfs clients to mount using - * 'integrity' kerberos security mode. - * - * Generated from protobuf field optional bool kerberos_5i_read_only = 8; - * @param bool $var - * @return $this - */ - public function setKerberos5IReadOnly($var) - { - GPBUtil::checkBool($var); - $this->kerberos_5i_read_only = $var; - - return $this; - } - - /** - * If enabled (true) the rule defines read and write access for clients - * matching the 'allowedClients' specification. It enables nfs clients to - * mount using 'integrity' kerberos security mode. The 'kerberos5iReadOnly' - * value be ignored if this is enabled. - * - * Generated from protobuf field optional bool kerberos_5i_read_write = 9; - * @return bool - */ - public function getKerberos5IReadWrite() - { - return isset($this->kerberos_5i_read_write) ? $this->kerberos_5i_read_write : false; - } - - public function hasKerberos5IReadWrite() - { - return isset($this->kerberos_5i_read_write); - } - - public function clearKerberos5IReadWrite() - { - unset($this->kerberos_5i_read_write); - } - - /** - * If enabled (true) the rule defines read and write access for clients - * matching the 'allowedClients' specification. It enables nfs clients to - * mount using 'integrity' kerberos security mode. The 'kerberos5iReadOnly' - * value be ignored if this is enabled. - * - * Generated from protobuf field optional bool kerberos_5i_read_write = 9; - * @param bool $var - * @return $this - */ - public function setKerberos5IReadWrite($var) - { - GPBUtil::checkBool($var); - $this->kerberos_5i_read_write = $var; - - return $this; - } - - /** - * If enabled (true) the rule defines a read only access for clients matching - * the 'allowedClients' specification. It enables nfs clients to mount using - * 'privacy' kerberos security mode. - * - * Generated from protobuf field optional bool kerberos_5p_read_only = 10; - * @return bool - */ - public function getKerberos5PReadOnly() - { - return isset($this->kerberos_5p_read_only) ? $this->kerberos_5p_read_only : false; - } - - public function hasKerberos5PReadOnly() - { - return isset($this->kerberos_5p_read_only); - } - - public function clearKerberos5PReadOnly() - { - unset($this->kerberos_5p_read_only); - } - - /** - * If enabled (true) the rule defines a read only access for clients matching - * the 'allowedClients' specification. It enables nfs clients to mount using - * 'privacy' kerberos security mode. - * - * Generated from protobuf field optional bool kerberos_5p_read_only = 10; - * @param bool $var - * @return $this - */ - public function setKerberos5PReadOnly($var) - { - GPBUtil::checkBool($var); - $this->kerberos_5p_read_only = $var; - - return $this; - } - - /** - * If enabled (true) the rule defines read and write access for clients - * matching the 'allowedClients' specification. It enables nfs clients to - * mount using 'privacy' kerberos security mode. The 'kerberos5pReadOnly' - * value be ignored if this is enabled. - * - * Generated from protobuf field optional bool kerberos_5p_read_write = 11; - * @return bool - */ - public function getKerberos5PReadWrite() - { - return isset($this->kerberos_5p_read_write) ? $this->kerberos_5p_read_write : false; - } - - public function hasKerberos5PReadWrite() - { - return isset($this->kerberos_5p_read_write); - } - - public function clearKerberos5PReadWrite() - { - unset($this->kerberos_5p_read_write); - } - - /** - * If enabled (true) the rule defines read and write access for clients - * matching the 'allowedClients' specification. It enables nfs clients to - * mount using 'privacy' kerberos security mode. The 'kerberos5pReadOnly' - * value be ignored if this is enabled. - * - * Generated from protobuf field optional bool kerberos_5p_read_write = 11; - * @param bool $var - * @return $this - */ - public function setKerberos5PReadWrite($var) - { - GPBUtil::checkBool($var); - $this->kerberos_5p_read_write = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Snapshot.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Snapshot.php deleted file mode 100644 index bf48e9046ed6..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Snapshot.php +++ /dev/null @@ -1,293 +0,0 @@ -google.cloud.netapp.v1.Snapshot - */ -class Snapshot extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. The resource name of the snapshot. - * Format: - * `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Output only. The snapshot state. - * - * Generated from protobuf field .google.cloud.netapp.v1.Snapshot.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. State details of the storage pool - * - * Generated from protobuf field string state_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state_details = ''; - /** - * A description of the snapshot with 2048 characters or less. - * Requests with longer descriptions will be rejected. - * - * Generated from protobuf field string description = 4; - */ - protected $description = ''; - /** - * Output only. Current storage usage for the snapshot in bytes. - * - * Generated from protobuf field double used_bytes = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $used_bytes = 0.0; - /** - * Output only. The time when the snapshot was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Resource labels to represent user provided metadata. - * - * Generated from protobuf field map labels = 7; - */ - private $labels; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. The resource name of the snapshot. - * Format: - * `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}`. - * @type int $state - * Output only. The snapshot state. - * @type string $state_details - * Output only. State details of the storage pool - * @type string $description - * A description of the snapshot with 2048 characters or less. - * Requests with longer descriptions will be rejected. - * @type float $used_bytes - * Output only. Current storage usage for the snapshot in bytes. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time when the snapshot was created. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Resource labels to represent user provided metadata. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Netapp\V1\Snapshot::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. The resource name of the snapshot. - * Format: - * `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. The resource name of the snapshot. - * Format: - * `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. The snapshot state. - * - * Generated from protobuf field .google.cloud.netapp.v1.Snapshot.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The snapshot state. - * - * Generated from protobuf field .google.cloud.netapp.v1.Snapshot.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\NetApp\V1\Snapshot\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. State details of the storage pool - * - * Generated from protobuf field string state_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getStateDetails() - { - return $this->state_details; - } - - /** - * Output only. State details of the storage pool - * - * Generated from protobuf field string state_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setStateDetails($var) - { - GPBUtil::checkString($var, True); - $this->state_details = $var; - - return $this; - } - - /** - * A description of the snapshot with 2048 characters or less. - * Requests with longer descriptions will be rejected. - * - * Generated from protobuf field string description = 4; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * A description of the snapshot with 2048 characters or less. - * Requests with longer descriptions will be rejected. - * - * Generated from protobuf field string description = 4; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Output only. Current storage usage for the snapshot in bytes. - * - * Generated from protobuf field double used_bytes = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return float - */ - public function getUsedBytes() - { - return $this->used_bytes; - } - - /** - * Output only. Current storage usage for the snapshot in bytes. - * - * Generated from protobuf field double used_bytes = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param float $var - * @return $this - */ - public function setUsedBytes($var) - { - GPBUtil::checkDouble($var); - $this->used_bytes = $var; - - return $this; - } - - /** - * Output only. The time when the snapshot was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The time when the snapshot was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Resource labels to represent user provided metadata. - * - * Generated from protobuf field map labels = 7; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Resource labels to represent user provided metadata. - * - * Generated from protobuf field map labels = 7; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Snapshot/State.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Snapshot/State.php deleted file mode 100644 index e23fe61b5729..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Snapshot/State.php +++ /dev/null @@ -1,92 +0,0 @@ -google.cloud.netapp.v1.Snapshot.State - */ -class State -{ - /** - * Unspecified Snapshot State - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Snapshot State is Ready - * - * Generated from protobuf enum READY = 1; - */ - const READY = 1; - /** - * Snapshot State is Creating - * - * Generated from protobuf enum CREATING = 2; - */ - const CREATING = 2; - /** - * Snapshot State is Deleting - * - * Generated from protobuf enum DELETING = 3; - */ - const DELETING = 3; - /** - * Snapshot State is Updating - * - * Generated from protobuf enum UPDATING = 4; - */ - const UPDATING = 4; - /** - * Snapshot State is Disabled - * - * Generated from protobuf enum DISABLED = 5; - */ - const DISABLED = 5; - /** - * Snapshot State is Error - * - * Generated from protobuf enum ERROR = 6; - */ - const ERROR = 6; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::READY => 'READY', - self::CREATING => 'CREATING', - self::DELETING => 'DELETING', - self::UPDATING => 'UPDATING', - self::DISABLED => 'DISABLED', - self::ERROR => 'ERROR', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\NetApp\V1\Snapshot_State::class); - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/SnapshotPolicy.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/SnapshotPolicy.php deleted file mode 100644 index bb19264c49e5..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/SnapshotPolicy.php +++ /dev/null @@ -1,257 +0,0 @@ -google.cloud.netapp.v1.SnapshotPolicy - */ -class SnapshotPolicy extends \Google\Protobuf\Internal\Message -{ - /** - * If enabled, make snapshots automatically according to the schedules. - * Default is false. - * - * Generated from protobuf field optional bool enabled = 1; - */ - protected $enabled = null; - /** - * Hourly schedule policy. - * - * Generated from protobuf field optional .google.cloud.netapp.v1.HourlySchedule hourly_schedule = 2; - */ - protected $hourly_schedule = null; - /** - * Daily schedule policy. - * - * Generated from protobuf field optional .google.cloud.netapp.v1.DailySchedule daily_schedule = 3; - */ - protected $daily_schedule = null; - /** - * Weekly schedule policy. - * - * Generated from protobuf field optional .google.cloud.netapp.v1.WeeklySchedule weekly_schedule = 4; - */ - protected $weekly_schedule = null; - /** - * Monthly schedule policy. - * - * Generated from protobuf field optional .google.cloud.netapp.v1.MonthlySchedule monthly_schedule = 5; - */ - protected $monthly_schedule = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $enabled - * If enabled, make snapshots automatically according to the schedules. - * Default is false. - * @type \Google\Cloud\NetApp\V1\HourlySchedule $hourly_schedule - * Hourly schedule policy. - * @type \Google\Cloud\NetApp\V1\DailySchedule $daily_schedule - * Daily schedule policy. - * @type \Google\Cloud\NetApp\V1\WeeklySchedule $weekly_schedule - * Weekly schedule policy. - * @type \Google\Cloud\NetApp\V1\MonthlySchedule $monthly_schedule - * Monthly schedule policy. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Netapp\V1\Volume::initOnce(); - parent::__construct($data); - } - - /** - * If enabled, make snapshots automatically according to the schedules. - * Default is false. - * - * Generated from protobuf field optional bool enabled = 1; - * @return bool - */ - public function getEnabled() - { - return isset($this->enabled) ? $this->enabled : false; - } - - public function hasEnabled() - { - return isset($this->enabled); - } - - public function clearEnabled() - { - unset($this->enabled); - } - - /** - * If enabled, make snapshots automatically according to the schedules. - * Default is false. - * - * Generated from protobuf field optional bool enabled = 1; - * @param bool $var - * @return $this - */ - public function setEnabled($var) - { - GPBUtil::checkBool($var); - $this->enabled = $var; - - return $this; - } - - /** - * Hourly schedule policy. - * - * Generated from protobuf field optional .google.cloud.netapp.v1.HourlySchedule hourly_schedule = 2; - * @return \Google\Cloud\NetApp\V1\HourlySchedule|null - */ - public function getHourlySchedule() - { - return $this->hourly_schedule; - } - - public function hasHourlySchedule() - { - return isset($this->hourly_schedule); - } - - public function clearHourlySchedule() - { - unset($this->hourly_schedule); - } - - /** - * Hourly schedule policy. - * - * Generated from protobuf field optional .google.cloud.netapp.v1.HourlySchedule hourly_schedule = 2; - * @param \Google\Cloud\NetApp\V1\HourlySchedule $var - * @return $this - */ - public function setHourlySchedule($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetApp\V1\HourlySchedule::class); - $this->hourly_schedule = $var; - - return $this; - } - - /** - * Daily schedule policy. - * - * Generated from protobuf field optional .google.cloud.netapp.v1.DailySchedule daily_schedule = 3; - * @return \Google\Cloud\NetApp\V1\DailySchedule|null - */ - public function getDailySchedule() - { - return $this->daily_schedule; - } - - public function hasDailySchedule() - { - return isset($this->daily_schedule); - } - - public function clearDailySchedule() - { - unset($this->daily_schedule); - } - - /** - * Daily schedule policy. - * - * Generated from protobuf field optional .google.cloud.netapp.v1.DailySchedule daily_schedule = 3; - * @param \Google\Cloud\NetApp\V1\DailySchedule $var - * @return $this - */ - public function setDailySchedule($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetApp\V1\DailySchedule::class); - $this->daily_schedule = $var; - - return $this; - } - - /** - * Weekly schedule policy. - * - * Generated from protobuf field optional .google.cloud.netapp.v1.WeeklySchedule weekly_schedule = 4; - * @return \Google\Cloud\NetApp\V1\WeeklySchedule|null - */ - public function getWeeklySchedule() - { - return $this->weekly_schedule; - } - - public function hasWeeklySchedule() - { - return isset($this->weekly_schedule); - } - - public function clearWeeklySchedule() - { - unset($this->weekly_schedule); - } - - /** - * Weekly schedule policy. - * - * Generated from protobuf field optional .google.cloud.netapp.v1.WeeklySchedule weekly_schedule = 4; - * @param \Google\Cloud\NetApp\V1\WeeklySchedule $var - * @return $this - */ - public function setWeeklySchedule($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetApp\V1\WeeklySchedule::class); - $this->weekly_schedule = $var; - - return $this; - } - - /** - * Monthly schedule policy. - * - * Generated from protobuf field optional .google.cloud.netapp.v1.MonthlySchedule monthly_schedule = 5; - * @return \Google\Cloud\NetApp\V1\MonthlySchedule|null - */ - public function getMonthlySchedule() - { - return $this->monthly_schedule; - } - - public function hasMonthlySchedule() - { - return isset($this->monthly_schedule); - } - - public function clearMonthlySchedule() - { - unset($this->monthly_schedule); - } - - /** - * Monthly schedule policy. - * - * Generated from protobuf field optional .google.cloud.netapp.v1.MonthlySchedule monthly_schedule = 5; - * @param \Google\Cloud\NetApp\V1\MonthlySchedule $var - * @return $this - */ - public function setMonthlySchedule($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetApp\V1\MonthlySchedule::class); - $this->monthly_schedule = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/StopReplicationRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/StopReplicationRequest.php deleted file mode 100644 index 5b666e6fb64f..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/StopReplicationRequest.php +++ /dev/null @@ -1,125 +0,0 @@ -google.cloud.netapp.v1.StopReplicationRequest - */ -class StopReplicationRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the replication, in the format of - * projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Indicates whether to stop replication forcefully while data transfer is in - * progress. - * Warning! if force is true, this will abort any current transfers - * and can lead to data loss due to partial transfer. - * If force is false, stop replication will fail while data transfer is in - * progress and you will need to retry later. - * - * Generated from protobuf field bool force = 2; - */ - protected $force = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the replication, in the format of - * projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. - * @type bool $force - * Indicates whether to stop replication forcefully while data transfer is in - * progress. - * Warning! if force is true, this will abort any current transfers - * and can lead to data loss due to partial transfer. - * If force is false, stop replication will fail while data transfer is in - * progress and you will need to retry later. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Netapp\V1\Replication::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the replication, in the format of - * projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the replication, in the format of - * projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Indicates whether to stop replication forcefully while data transfer is in - * progress. - * Warning! if force is true, this will abort any current transfers - * and can lead to data loss due to partial transfer. - * If force is false, stop replication will fail while data transfer is in - * progress and you will need to retry later. - * - * Generated from protobuf field bool force = 2; - * @return bool - */ - public function getForce() - { - return $this->force; - } - - /** - * Indicates whether to stop replication forcefully while data transfer is in - * progress. - * Warning! if force is true, this will abort any current transfers - * and can lead to data loss due to partial transfer. - * If force is false, stop replication will fail while data transfer is in - * progress and you will need to retry later. - * - * Generated from protobuf field bool force = 2; - * @param bool $var - * @return $this - */ - public function setForce($var) - { - GPBUtil::checkBool($var); - $this->force = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/StoragePool.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/StoragePool.php deleted file mode 100644 index 6a36d1bae34c..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/StoragePool.php +++ /dev/null @@ -1,766 +0,0 @@ -google.cloud.netapp.v1.StoragePool - */ -class StoragePool extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. Name of the storage pool - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Required. Service level of the storage pool - * - * Generated from protobuf field .google.cloud.netapp.v1.ServiceLevel service_level = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $service_level = 0; - /** - * Required. Capacity in GIB of the pool - * - * Generated from protobuf field int64 capacity_gib = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $capacity_gib = 0; - /** - * Output only. Allocated size of all volumes in GIB in the storage pool - * - * Generated from protobuf field int64 volume_capacity_gib = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $volume_capacity_gib = 0; - /** - * Output only. Volume count of the storage pool - * - * Generated from protobuf field int32 volume_count = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $volume_count = 0; - /** - * Output only. State of the storage pool - * - * Generated from protobuf field .google.cloud.netapp.v1.StoragePool.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. State details of the storage pool - * - * Generated from protobuf field string state_details = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state_details = ''; - /** - * Output only. Create time of the storage pool - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Optional. Description of the storage pool - * - * Generated from protobuf field string description = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Optional. Labels as key value pairs - * - * Generated from protobuf field map labels = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - /** - * Required. VPC Network name. - * Format: projects/{project}/global/networks/{network} - * - * Generated from protobuf field string network = 11 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $network = ''; - /** - * Optional. Specifies the Active Directory to be used for creating a SMB - * volume. - * - * Generated from protobuf field string active_directory = 12 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - protected $active_directory = ''; - /** - * Optional. Specifies the KMS config to be used for volume encryption. - * - * Generated from protobuf field string kms_config = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - protected $kms_config = ''; - /** - * Optional. Flag indicating if the pool is NFS LDAP enabled or not. - * - * Generated from protobuf field bool ldap_enabled = 14 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $ldap_enabled = false; - /** - * Optional. This field is not implemented. The values provided in this field - * are ignored. - * - * Generated from protobuf field string psa_range = 15 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $psa_range = ''; - /** - * Output only. Specifies the current pool encryption key source. - * - * Generated from protobuf field .google.cloud.netapp.v1.EncryptionType encryption_type = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $encryption_type = 0; - /** - * Deprecated. Used to allow SO pool to access AD or DNS server from other - * regions. - * - * Generated from protobuf field optional bool global_access_allowed = 17 [deprecated = true]; - * @deprecated - */ - protected $global_access_allowed = null; - /** - * Optional. True if the storage pool supports Auto Tiering enabled volumes. - * Default is false. Auto-tiering can be enabled after storage pool creation - * but it can't be disabled once enabled. - * - * Generated from protobuf field bool allow_auto_tiering = 18 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $allow_auto_tiering = false; - /** - * Optional. Specifies the replica zone for regional storagePool. - * - * Generated from protobuf field string replica_zone = 20 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $replica_zone = ''; - /** - * Optional. Specifies the active zone for regional storagePool. - * - * Generated from protobuf field string zone = 21 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $zone = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. Name of the storage pool - * @type int $service_level - * Required. Service level of the storage pool - * @type int|string $capacity_gib - * Required. Capacity in GIB of the pool - * @type int|string $volume_capacity_gib - * Output only. Allocated size of all volumes in GIB in the storage pool - * @type int $volume_count - * Output only. Volume count of the storage pool - * @type int $state - * Output only. State of the storage pool - * @type string $state_details - * Output only. State details of the storage pool - * @type \Google\Protobuf\Timestamp $create_time - * Output only. Create time of the storage pool - * @type string $description - * Optional. Description of the storage pool - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. Labels as key value pairs - * @type string $network - * Required. VPC Network name. - * Format: projects/{project}/global/networks/{network} - * @type string $active_directory - * Optional. Specifies the Active Directory to be used for creating a SMB - * volume. - * @type string $kms_config - * Optional. Specifies the KMS config to be used for volume encryption. - * @type bool $ldap_enabled - * Optional. Flag indicating if the pool is NFS LDAP enabled or not. - * @type string $psa_range - * Optional. This field is not implemented. The values provided in this field - * are ignored. - * @type int $encryption_type - * Output only. Specifies the current pool encryption key source. - * @type bool $global_access_allowed - * Deprecated. Used to allow SO pool to access AD or DNS server from other - * regions. - * @type bool $allow_auto_tiering - * Optional. True if the storage pool supports Auto Tiering enabled volumes. - * Default is false. Auto-tiering can be enabled after storage pool creation - * but it can't be disabled once enabled. - * @type string $replica_zone - * Optional. Specifies the replica zone for regional storagePool. - * @type string $zone - * Optional. Specifies the active zone for regional storagePool. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Netapp\V1\StoragePool::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. Name of the storage pool - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. Name of the storage pool - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. Service level of the storage pool - * - * Generated from protobuf field .google.cloud.netapp.v1.ServiceLevel service_level = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getServiceLevel() - { - return $this->service_level; - } - - /** - * Required. Service level of the storage pool - * - * Generated from protobuf field .google.cloud.netapp.v1.ServiceLevel service_level = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setServiceLevel($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\NetApp\V1\ServiceLevel::class); - $this->service_level = $var; - - return $this; - } - - /** - * Required. Capacity in GIB of the pool - * - * Generated from protobuf field int64 capacity_gib = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return int|string - */ - public function getCapacityGib() - { - return $this->capacity_gib; - } - - /** - * Required. Capacity in GIB of the pool - * - * Generated from protobuf field int64 capacity_gib = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param int|string $var - * @return $this - */ - public function setCapacityGib($var) - { - GPBUtil::checkInt64($var); - $this->capacity_gib = $var; - - return $this; - } - - /** - * Output only. Allocated size of all volumes in GIB in the storage pool - * - * Generated from protobuf field int64 volume_capacity_gib = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getVolumeCapacityGib() - { - return $this->volume_capacity_gib; - } - - /** - * Output only. Allocated size of all volumes in GIB in the storage pool - * - * Generated from protobuf field int64 volume_capacity_gib = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setVolumeCapacityGib($var) - { - GPBUtil::checkInt64($var); - $this->volume_capacity_gib = $var; - - return $this; - } - - /** - * Output only. Volume count of the storage pool - * - * Generated from protobuf field int32 volume_count = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getVolumeCount() - { - return $this->volume_count; - } - - /** - * Output only. Volume count of the storage pool - * - * Generated from protobuf field int32 volume_count = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setVolumeCount($var) - { - GPBUtil::checkInt32($var); - $this->volume_count = $var; - - return $this; - } - - /** - * Output only. State of the storage pool - * - * Generated from protobuf field .google.cloud.netapp.v1.StoragePool.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. State of the storage pool - * - * Generated from protobuf field .google.cloud.netapp.v1.StoragePool.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\NetApp\V1\StoragePool\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. State details of the storage pool - * - * Generated from protobuf field string state_details = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getStateDetails() - { - return $this->state_details; - } - - /** - * Output only. State details of the storage pool - * - * Generated from protobuf field string state_details = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setStateDetails($var) - { - GPBUtil::checkString($var, True); - $this->state_details = $var; - - return $this; - } - - /** - * Output only. Create time of the storage pool - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. Create time of the storage pool - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Optional. Description of the storage pool - * - * Generated from protobuf field string description = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. Description of the storage pool - * - * Generated from protobuf field string description = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Optional. Labels as key value pairs - * - * Generated from protobuf field map labels = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. Labels as key value pairs - * - * Generated from protobuf field map labels = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Required. VPC Network name. - * Format: projects/{project}/global/networks/{network} - * - * Generated from protobuf field string network = 11 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getNetwork() - { - return $this->network; - } - - /** - * Required. VPC Network name. - * Format: projects/{project}/global/networks/{network} - * - * Generated from protobuf field string network = 11 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setNetwork($var) - { - GPBUtil::checkString($var, True); - $this->network = $var; - - return $this; - } - - /** - * Optional. Specifies the Active Directory to be used for creating a SMB - * volume. - * - * Generated from protobuf field string active_directory = 12 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return string - */ - public function getActiveDirectory() - { - return $this->active_directory; - } - - /** - * Optional. Specifies the Active Directory to be used for creating a SMB - * volume. - * - * Generated from protobuf field string active_directory = 12 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setActiveDirectory($var) - { - GPBUtil::checkString($var, True); - $this->active_directory = $var; - - return $this; - } - - /** - * Optional. Specifies the KMS config to be used for volume encryption. - * - * Generated from protobuf field string kms_config = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return string - */ - public function getKmsConfig() - { - return $this->kms_config; - } - - /** - * Optional. Specifies the KMS config to be used for volume encryption. - * - * Generated from protobuf field string kms_config = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setKmsConfig($var) - { - GPBUtil::checkString($var, True); - $this->kms_config = $var; - - return $this; - } - - /** - * Optional. Flag indicating if the pool is NFS LDAP enabled or not. - * - * Generated from protobuf field bool ldap_enabled = 14 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getLdapEnabled() - { - return $this->ldap_enabled; - } - - /** - * Optional. Flag indicating if the pool is NFS LDAP enabled or not. - * - * Generated from protobuf field bool ldap_enabled = 14 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setLdapEnabled($var) - { - GPBUtil::checkBool($var); - $this->ldap_enabled = $var; - - return $this; - } - - /** - * Optional. This field is not implemented. The values provided in this field - * are ignored. - * - * Generated from protobuf field string psa_range = 15 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPsaRange() - { - return $this->psa_range; - } - - /** - * Optional. This field is not implemented. The values provided in this field - * are ignored. - * - * Generated from protobuf field string psa_range = 15 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPsaRange($var) - { - GPBUtil::checkString($var, True); - $this->psa_range = $var; - - return $this; - } - - /** - * Output only. Specifies the current pool encryption key source. - * - * Generated from protobuf field .google.cloud.netapp.v1.EncryptionType encryption_type = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getEncryptionType() - { - return $this->encryption_type; - } - - /** - * Output only. Specifies the current pool encryption key source. - * - * Generated from protobuf field .google.cloud.netapp.v1.EncryptionType encryption_type = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setEncryptionType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\NetApp\V1\EncryptionType::class); - $this->encryption_type = $var; - - return $this; - } - - /** - * Deprecated. Used to allow SO pool to access AD or DNS server from other - * regions. - * - * Generated from protobuf field optional bool global_access_allowed = 17 [deprecated = true]; - * @return bool - * @deprecated - */ - public function getGlobalAccessAllowed() - { - @trigger_error('global_access_allowed is deprecated.', E_USER_DEPRECATED); - return isset($this->global_access_allowed) ? $this->global_access_allowed : false; - } - - public function hasGlobalAccessAllowed() - { - @trigger_error('global_access_allowed is deprecated.', E_USER_DEPRECATED); - return isset($this->global_access_allowed); - } - - public function clearGlobalAccessAllowed() - { - @trigger_error('global_access_allowed is deprecated.', E_USER_DEPRECATED); - unset($this->global_access_allowed); - } - - /** - * Deprecated. Used to allow SO pool to access AD or DNS server from other - * regions. - * - * Generated from protobuf field optional bool global_access_allowed = 17 [deprecated = true]; - * @param bool $var - * @return $this - * @deprecated - */ - public function setGlobalAccessAllowed($var) - { - @trigger_error('global_access_allowed is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkBool($var); - $this->global_access_allowed = $var; - - return $this; - } - - /** - * Optional. True if the storage pool supports Auto Tiering enabled volumes. - * Default is false. Auto-tiering can be enabled after storage pool creation - * but it can't be disabled once enabled. - * - * Generated from protobuf field bool allow_auto_tiering = 18 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getAllowAutoTiering() - { - return $this->allow_auto_tiering; - } - - /** - * Optional. True if the storage pool supports Auto Tiering enabled volumes. - * Default is false. Auto-tiering can be enabled after storage pool creation - * but it can't be disabled once enabled. - * - * Generated from protobuf field bool allow_auto_tiering = 18 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setAllowAutoTiering($var) - { - GPBUtil::checkBool($var); - $this->allow_auto_tiering = $var; - - return $this; - } - - /** - * Optional. Specifies the replica zone for regional storagePool. - * - * Generated from protobuf field string replica_zone = 20 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getReplicaZone() - { - return $this->replica_zone; - } - - /** - * Optional. Specifies the replica zone for regional storagePool. - * - * Generated from protobuf field string replica_zone = 20 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setReplicaZone($var) - { - GPBUtil::checkString($var, True); - $this->replica_zone = $var; - - return $this; - } - - /** - * Optional. Specifies the active zone for regional storagePool. - * - * Generated from protobuf field string zone = 21 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getZone() - { - return $this->zone; - } - - /** - * Optional. Specifies the active zone for regional storagePool. - * - * Generated from protobuf field string zone = 21 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setZone($var) - { - GPBUtil::checkString($var, True); - $this->zone = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/StoragePool/State.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/StoragePool/State.php deleted file mode 100644 index 54f30aa39562..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/StoragePool/State.php +++ /dev/null @@ -1,99 +0,0 @@ -google.cloud.netapp.v1.StoragePool.State - */ -class State -{ - /** - * Unspecified Storage Pool State - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Storage Pool State is Ready - * - * Generated from protobuf enum READY = 1; - */ - const READY = 1; - /** - * Storage Pool State is Creating - * - * Generated from protobuf enum CREATING = 2; - */ - const CREATING = 2; - /** - * Storage Pool State is Deleting - * - * Generated from protobuf enum DELETING = 3; - */ - const DELETING = 3; - /** - * Storage Pool State is Updating - * - * Generated from protobuf enum UPDATING = 4; - */ - const UPDATING = 4; - /** - * Storage Pool State is Restoring - * - * Generated from protobuf enum RESTORING = 5; - */ - const RESTORING = 5; - /** - * Storage Pool State is Disabled - * - * Generated from protobuf enum DISABLED = 6; - */ - const DISABLED = 6; - /** - * Storage Pool State is Error - * - * Generated from protobuf enum ERROR = 7; - */ - const ERROR = 7; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::READY => 'READY', - self::CREATING => 'CREATING', - self::DELETING => 'DELETING', - self::UPDATING => 'UPDATING', - self::RESTORING => 'RESTORING', - self::DISABLED => 'DISABLED', - self::ERROR => 'ERROR', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\NetApp\V1\StoragePool_State::class); - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/SwitchActiveReplicaZoneRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/SwitchActiveReplicaZoneRequest.php deleted file mode 100644 index bb834b099c23..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/SwitchActiveReplicaZoneRequest.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.netapp.v1.SwitchActiveReplicaZoneRequest - */ -class SwitchActiveReplicaZoneRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the storage pool - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the storage pool - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Netapp\V1\StoragePool::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the storage pool - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the storage pool - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/SyncReplicationRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/SyncReplicationRequest.php deleted file mode 100644 index c76ab8329d9d..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/SyncReplicationRequest.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.netapp.v1.SyncReplicationRequest - */ -class SyncReplicationRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the replication, in the format of - * projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the replication, in the format of - * projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Netapp\V1\Replication::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the replication, in the format of - * projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the replication, in the format of - * projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/TieringPolicy.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/TieringPolicy.php deleted file mode 100644 index 26a4a16e0cba..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/TieringPolicy.php +++ /dev/null @@ -1,129 +0,0 @@ -google.cloud.netapp.v1.TieringPolicy - */ -class TieringPolicy extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Flag indicating if the volume has tiering policy enable/pause. - * Default is PAUSED. - * - * Generated from protobuf field optional .google.cloud.netapp.v1.TieringPolicy.TierAction tier_action = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $tier_action = null; - /** - * Optional. Time in days to mark the volume's data block as cold and make it - * eligible for tiering, can be range from 7-183. Default is 31. - * - * Generated from protobuf field optional int32 cooling_threshold_days = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $cooling_threshold_days = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $tier_action - * Optional. Flag indicating if the volume has tiering policy enable/pause. - * Default is PAUSED. - * @type int $cooling_threshold_days - * Optional. Time in days to mark the volume's data block as cold and make it - * eligible for tiering, can be range from 7-183. Default is 31. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Netapp\V1\Volume::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Flag indicating if the volume has tiering policy enable/pause. - * Default is PAUSED. - * - * Generated from protobuf field optional .google.cloud.netapp.v1.TieringPolicy.TierAction tier_action = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getTierAction() - { - return isset($this->tier_action) ? $this->tier_action : 0; - } - - public function hasTierAction() - { - return isset($this->tier_action); - } - - public function clearTierAction() - { - unset($this->tier_action); - } - - /** - * Optional. Flag indicating if the volume has tiering policy enable/pause. - * Default is PAUSED. - * - * Generated from protobuf field optional .google.cloud.netapp.v1.TieringPolicy.TierAction tier_action = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setTierAction($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\NetApp\V1\TieringPolicy\TierAction::class); - $this->tier_action = $var; - - return $this; - } - - /** - * Optional. Time in days to mark the volume's data block as cold and make it - * eligible for tiering, can be range from 7-183. Default is 31. - * - * Generated from protobuf field optional int32 cooling_threshold_days = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getCoolingThresholdDays() - { - return isset($this->cooling_threshold_days) ? $this->cooling_threshold_days : 0; - } - - public function hasCoolingThresholdDays() - { - return isset($this->cooling_threshold_days); - } - - public function clearCoolingThresholdDays() - { - unset($this->cooling_threshold_days); - } - - /** - * Optional. Time in days to mark the volume's data block as cold and make it - * eligible for tiering, can be range from 7-183. Default is 31. - * - * Generated from protobuf field optional int32 cooling_threshold_days = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setCoolingThresholdDays($var) - { - GPBUtil::checkInt32($var); - $this->cooling_threshold_days = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/TieringPolicy/TierAction.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/TieringPolicy/TierAction.php deleted file mode 100644 index 81a17a01966a..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/TieringPolicy/TierAction.php +++ /dev/null @@ -1,65 +0,0 @@ -google.cloud.netapp.v1.TieringPolicy.TierAction - */ -class TierAction -{ - /** - * Unspecified. - * - * Generated from protobuf enum TIER_ACTION_UNSPECIFIED = 0; - */ - const TIER_ACTION_UNSPECIFIED = 0; - /** - * When tiering is enabled, new cold data will be tiered. - * - * Generated from protobuf enum ENABLED = 1; - */ - const ENABLED = 1; - /** - * When paused, tiering won't be performed on new data. Existing data stays - * tiered until accessed. - * - * Generated from protobuf enum PAUSED = 2; - */ - const PAUSED = 2; - - private static $valueToName = [ - self::TIER_ACTION_UNSPECIFIED => 'TIER_ACTION_UNSPECIFIED', - self::ENABLED => 'ENABLED', - self::PAUSED => 'PAUSED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(TierAction::class, \Google\Cloud\NetApp\V1\TieringPolicy_TierAction::class); - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/TransferStats.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/TransferStats.php deleted file mode 100644 index 4459ecf16afc..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/TransferStats.php +++ /dev/null @@ -1,393 +0,0 @@ -google.cloud.netapp.v1.TransferStats - */ -class TransferStats extends \Google\Protobuf\Internal\Message -{ - /** - * Cumulative bytes trasferred so far for the replication relatinonship. - * - * Generated from protobuf field optional int64 transfer_bytes = 1; - */ - protected $transfer_bytes = null; - /** - * Cumulative time taken across all transfers for the replication - * relationship. - * - * Generated from protobuf field optional .google.protobuf.Duration total_transfer_duration = 2; - */ - protected $total_transfer_duration = null; - /** - * Last transfer size in bytes. - * - * Generated from protobuf field optional int64 last_transfer_bytes = 3; - */ - protected $last_transfer_bytes = null; - /** - * Time taken during last transfer. - * - * Generated from protobuf field optional .google.protobuf.Duration last_transfer_duration = 4; - */ - protected $last_transfer_duration = null; - /** - * Lag duration indicates the duration by which Destination region volume - * content lags behind the primary region volume content. - * - * Generated from protobuf field optional .google.protobuf.Duration lag_duration = 5; - */ - protected $lag_duration = null; - /** - * Time when progress was updated last. - * - * Generated from protobuf field optional .google.protobuf.Timestamp update_time = 6; - */ - protected $update_time = null; - /** - * Time when last transfer completed. - * - * Generated from protobuf field optional .google.protobuf.Timestamp last_transfer_end_time = 7; - */ - protected $last_transfer_end_time = null; - /** - * A message describing the cause of the last transfer failure. - * - * Generated from protobuf field optional string last_transfer_error = 8; - */ - protected $last_transfer_error = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $transfer_bytes - * Cumulative bytes trasferred so far for the replication relatinonship. - * @type \Google\Protobuf\Duration $total_transfer_duration - * Cumulative time taken across all transfers for the replication - * relationship. - * @type int|string $last_transfer_bytes - * Last transfer size in bytes. - * @type \Google\Protobuf\Duration $last_transfer_duration - * Time taken during last transfer. - * @type \Google\Protobuf\Duration $lag_duration - * Lag duration indicates the duration by which Destination region volume - * content lags behind the primary region volume content. - * @type \Google\Protobuf\Timestamp $update_time - * Time when progress was updated last. - * @type \Google\Protobuf\Timestamp $last_transfer_end_time - * Time when last transfer completed. - * @type string $last_transfer_error - * A message describing the cause of the last transfer failure. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Netapp\V1\Replication::initOnce(); - parent::__construct($data); - } - - /** - * Cumulative bytes trasferred so far for the replication relatinonship. - * - * Generated from protobuf field optional int64 transfer_bytes = 1; - * @return int|string - */ - public function getTransferBytes() - { - return isset($this->transfer_bytes) ? $this->transfer_bytes : 0; - } - - public function hasTransferBytes() - { - return isset($this->transfer_bytes); - } - - public function clearTransferBytes() - { - unset($this->transfer_bytes); - } - - /** - * Cumulative bytes trasferred so far for the replication relatinonship. - * - * Generated from protobuf field optional int64 transfer_bytes = 1; - * @param int|string $var - * @return $this - */ - public function setTransferBytes($var) - { - GPBUtil::checkInt64($var); - $this->transfer_bytes = $var; - - return $this; - } - - /** - * Cumulative time taken across all transfers for the replication - * relationship. - * - * Generated from protobuf field optional .google.protobuf.Duration total_transfer_duration = 2; - * @return \Google\Protobuf\Duration|null - */ - public function getTotalTransferDuration() - { - return $this->total_transfer_duration; - } - - public function hasTotalTransferDuration() - { - return isset($this->total_transfer_duration); - } - - public function clearTotalTransferDuration() - { - unset($this->total_transfer_duration); - } - - /** - * Cumulative time taken across all transfers for the replication - * relationship. - * - * Generated from protobuf field optional .google.protobuf.Duration total_transfer_duration = 2; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setTotalTransferDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->total_transfer_duration = $var; - - return $this; - } - - /** - * Last transfer size in bytes. - * - * Generated from protobuf field optional int64 last_transfer_bytes = 3; - * @return int|string - */ - public function getLastTransferBytes() - { - return isset($this->last_transfer_bytes) ? $this->last_transfer_bytes : 0; - } - - public function hasLastTransferBytes() - { - return isset($this->last_transfer_bytes); - } - - public function clearLastTransferBytes() - { - unset($this->last_transfer_bytes); - } - - /** - * Last transfer size in bytes. - * - * Generated from protobuf field optional int64 last_transfer_bytes = 3; - * @param int|string $var - * @return $this - */ - public function setLastTransferBytes($var) - { - GPBUtil::checkInt64($var); - $this->last_transfer_bytes = $var; - - return $this; - } - - /** - * Time taken during last transfer. - * - * Generated from protobuf field optional .google.protobuf.Duration last_transfer_duration = 4; - * @return \Google\Protobuf\Duration|null - */ - public function getLastTransferDuration() - { - return $this->last_transfer_duration; - } - - public function hasLastTransferDuration() - { - return isset($this->last_transfer_duration); - } - - public function clearLastTransferDuration() - { - unset($this->last_transfer_duration); - } - - /** - * Time taken during last transfer. - * - * Generated from protobuf field optional .google.protobuf.Duration last_transfer_duration = 4; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setLastTransferDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->last_transfer_duration = $var; - - return $this; - } - - /** - * Lag duration indicates the duration by which Destination region volume - * content lags behind the primary region volume content. - * - * Generated from protobuf field optional .google.protobuf.Duration lag_duration = 5; - * @return \Google\Protobuf\Duration|null - */ - public function getLagDuration() - { - return $this->lag_duration; - } - - public function hasLagDuration() - { - return isset($this->lag_duration); - } - - public function clearLagDuration() - { - unset($this->lag_duration); - } - - /** - * Lag duration indicates the duration by which Destination region volume - * content lags behind the primary region volume content. - * - * Generated from protobuf field optional .google.protobuf.Duration lag_duration = 5; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setLagDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->lag_duration = $var; - - return $this; - } - - /** - * Time when progress was updated last. - * - * Generated from protobuf field optional .google.protobuf.Timestamp update_time = 6; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Time when progress was updated last. - * - * Generated from protobuf field optional .google.protobuf.Timestamp update_time = 6; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Time when last transfer completed. - * - * Generated from protobuf field optional .google.protobuf.Timestamp last_transfer_end_time = 7; - * @return \Google\Protobuf\Timestamp|null - */ - public function getLastTransferEndTime() - { - return $this->last_transfer_end_time; - } - - public function hasLastTransferEndTime() - { - return isset($this->last_transfer_end_time); - } - - public function clearLastTransferEndTime() - { - unset($this->last_transfer_end_time); - } - - /** - * Time when last transfer completed. - * - * Generated from protobuf field optional .google.protobuf.Timestamp last_transfer_end_time = 7; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setLastTransferEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->last_transfer_end_time = $var; - - return $this; - } - - /** - * A message describing the cause of the last transfer failure. - * - * Generated from protobuf field optional string last_transfer_error = 8; - * @return string - */ - public function getLastTransferError() - { - return isset($this->last_transfer_error) ? $this->last_transfer_error : ''; - } - - public function hasLastTransferError() - { - return isset($this->last_transfer_error); - } - - public function clearLastTransferError() - { - unset($this->last_transfer_error); - } - - /** - * A message describing the cause of the last transfer failure. - * - * Generated from protobuf field optional string last_transfer_error = 8; - * @param string $var - * @return $this - */ - public function setLastTransferError($var) - { - GPBUtil::checkString($var, True); - $this->last_transfer_error = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateActiveDirectoryRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateActiveDirectoryRequest.php deleted file mode 100644 index aff58d48c9a2..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateActiveDirectoryRequest.php +++ /dev/null @@ -1,156 +0,0 @@ -google.cloud.netapp.v1.UpdateActiveDirectoryRequest - */ -class UpdateActiveDirectoryRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * Active Directory resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * Required. The volume being updated - * - * Generated from protobuf field .google.cloud.netapp.v1.ActiveDirectory active_directory = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $active_directory = null; - - /** - * @param \Google\Cloud\NetApp\V1\ActiveDirectory $activeDirectory Required. The volume being updated - * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the - * Active Directory resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * @return \Google\Cloud\NetApp\V1\UpdateActiveDirectoryRequest - * - * @experimental - */ - public static function build(\Google\Cloud\NetApp\V1\ActiveDirectory $activeDirectory, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setActiveDirectory($activeDirectory) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Field mask is used to specify the fields to be overwritten in the - * Active Directory resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * @type \Google\Cloud\NetApp\V1\ActiveDirectory $active_directory - * Required. The volume being updated - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Netapp\V1\ActiveDirectory::initOnce(); - parent::__construct($data); - } - - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * Active Directory resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * Active Directory resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * Required. The volume being updated - * - * Generated from protobuf field .google.cloud.netapp.v1.ActiveDirectory active_directory = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\NetApp\V1\ActiveDirectory|null - */ - public function getActiveDirectory() - { - return $this->active_directory; - } - - public function hasActiveDirectory() - { - return isset($this->active_directory); - } - - public function clearActiveDirectory() - { - unset($this->active_directory); - } - - /** - * Required. The volume being updated - * - * Generated from protobuf field .google.cloud.netapp.v1.ActiveDirectory active_directory = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\NetApp\V1\ActiveDirectory $var - * @return $this - */ - public function setActiveDirectory($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetApp\V1\ActiveDirectory::class); - $this->active_directory = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateBackupPolicyRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateBackupPolicyRequest.php deleted file mode 100644 index e7e9619f9379..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateBackupPolicyRequest.php +++ /dev/null @@ -1,156 +0,0 @@ -google.cloud.netapp.v1.UpdateBackupPolicyRequest - */ -class UpdateBackupPolicyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * Backup Policy resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * Required. The backup policy being updated - * - * Generated from protobuf field .google.cloud.netapp.v1.BackupPolicy backup_policy = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $backup_policy = null; - - /** - * @param \Google\Cloud\NetApp\V1\BackupPolicy $backupPolicy Required. The backup policy being updated - * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the - * Backup Policy resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * @return \Google\Cloud\NetApp\V1\UpdateBackupPolicyRequest - * - * @experimental - */ - public static function build(\Google\Cloud\NetApp\V1\BackupPolicy $backupPolicy, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setBackupPolicy($backupPolicy) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Field mask is used to specify the fields to be overwritten in the - * Backup Policy resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * @type \Google\Cloud\NetApp\V1\BackupPolicy $backup_policy - * Required. The backup policy being updated - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Netapp\V1\BackupPolicy::initOnce(); - parent::__construct($data); - } - - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * Backup Policy resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * Backup Policy resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * Required. The backup policy being updated - * - * Generated from protobuf field .google.cloud.netapp.v1.BackupPolicy backup_policy = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\NetApp\V1\BackupPolicy|null - */ - public function getBackupPolicy() - { - return $this->backup_policy; - } - - public function hasBackupPolicy() - { - return isset($this->backup_policy); - } - - public function clearBackupPolicy() - { - unset($this->backup_policy); - } - - /** - * Required. The backup policy being updated - * - * Generated from protobuf field .google.cloud.netapp.v1.BackupPolicy backup_policy = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\NetApp\V1\BackupPolicy $var - * @return $this - */ - public function setBackupPolicy($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetApp\V1\BackupPolicy::class); - $this->backup_policy = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateBackupRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateBackupRequest.php deleted file mode 100644 index 423245df4e38..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateBackupRequest.php +++ /dev/null @@ -1,156 +0,0 @@ -google.cloud.netapp.v1.UpdateBackupRequest - */ -class UpdateBackupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * Backup resource to be updated. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * Required. The backup being updated - * - * Generated from protobuf field .google.cloud.netapp.v1.Backup backup = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $backup = null; - - /** - * @param \Google\Cloud\NetApp\V1\Backup $backup Required. The backup being updated - * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the - * Backup resource to be updated. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * @return \Google\Cloud\NetApp\V1\UpdateBackupRequest - * - * @experimental - */ - public static function build(\Google\Cloud\NetApp\V1\Backup $backup, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setBackup($backup) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Field mask is used to specify the fields to be overwritten in the - * Backup resource to be updated. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * @type \Google\Cloud\NetApp\V1\Backup $backup - * Required. The backup being updated - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Netapp\V1\Backup::initOnce(); - parent::__construct($data); - } - - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * Backup resource to be updated. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * Backup resource to be updated. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * Required. The backup being updated - * - * Generated from protobuf field .google.cloud.netapp.v1.Backup backup = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\NetApp\V1\Backup|null - */ - public function getBackup() - { - return $this->backup; - } - - public function hasBackup() - { - return isset($this->backup); - } - - public function clearBackup() - { - unset($this->backup); - } - - /** - * Required. The backup being updated - * - * Generated from protobuf field .google.cloud.netapp.v1.Backup backup = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\NetApp\V1\Backup $var - * @return $this - */ - public function setBackup($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetApp\V1\Backup::class); - $this->backup = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateBackupVaultRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateBackupVaultRequest.php deleted file mode 100644 index 5ae79183eba2..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateBackupVaultRequest.php +++ /dev/null @@ -1,156 +0,0 @@ -google.cloud.netapp.v1.UpdateBackupVaultRequest - */ -class UpdateBackupVaultRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * Backup resource to be updated. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * Required. The backupVault being updated - * - * Generated from protobuf field .google.cloud.netapp.v1.BackupVault backup_vault = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $backup_vault = null; - - /** - * @param \Google\Cloud\NetApp\V1\BackupVault $backupVault Required. The backupVault being updated - * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the - * Backup resource to be updated. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * @return \Google\Cloud\NetApp\V1\UpdateBackupVaultRequest - * - * @experimental - */ - public static function build(\Google\Cloud\NetApp\V1\BackupVault $backupVault, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setBackupVault($backupVault) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Field mask is used to specify the fields to be overwritten in the - * Backup resource to be updated. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * @type \Google\Cloud\NetApp\V1\BackupVault $backup_vault - * Required. The backupVault being updated - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Netapp\V1\BackupVault::initOnce(); - parent::__construct($data); - } - - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * Backup resource to be updated. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * Backup resource to be updated. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * Required. The backupVault being updated - * - * Generated from protobuf field .google.cloud.netapp.v1.BackupVault backup_vault = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\NetApp\V1\BackupVault|null - */ - public function getBackupVault() - { - return $this->backup_vault; - } - - public function hasBackupVault() - { - return isset($this->backup_vault); - } - - public function clearBackupVault() - { - unset($this->backup_vault); - } - - /** - * Required. The backupVault being updated - * - * Generated from protobuf field .google.cloud.netapp.v1.BackupVault backup_vault = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\NetApp\V1\BackupVault $var - * @return $this - */ - public function setBackupVault($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetApp\V1\BackupVault::class); - $this->backup_vault = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateKmsConfigRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateKmsConfigRequest.php deleted file mode 100644 index e7d21cc91040..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateKmsConfigRequest.php +++ /dev/null @@ -1,156 +0,0 @@ -google.cloud.netapp.v1.UpdateKmsConfigRequest - */ -class UpdateKmsConfigRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * KmsConfig resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * Required. The KmsConfig being updated - * - * Generated from protobuf field .google.cloud.netapp.v1.KmsConfig kms_config = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $kms_config = null; - - /** - * @param \Google\Cloud\NetApp\V1\KmsConfig $kmsConfig Required. The KmsConfig being updated - * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the - * KmsConfig resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * @return \Google\Cloud\NetApp\V1\UpdateKmsConfigRequest - * - * @experimental - */ - public static function build(\Google\Cloud\NetApp\V1\KmsConfig $kmsConfig, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setKmsConfig($kmsConfig) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Field mask is used to specify the fields to be overwritten in the - * KmsConfig resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * @type \Google\Cloud\NetApp\V1\KmsConfig $kms_config - * Required. The KmsConfig being updated - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Netapp\V1\Kms::initOnce(); - parent::__construct($data); - } - - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * KmsConfig resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * KmsConfig resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * Required. The KmsConfig being updated - * - * Generated from protobuf field .google.cloud.netapp.v1.KmsConfig kms_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\NetApp\V1\KmsConfig|null - */ - public function getKmsConfig() - { - return $this->kms_config; - } - - public function hasKmsConfig() - { - return isset($this->kms_config); - } - - public function clearKmsConfig() - { - unset($this->kms_config); - } - - /** - * Required. The KmsConfig being updated - * - * Generated from protobuf field .google.cloud.netapp.v1.KmsConfig kms_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\NetApp\V1\KmsConfig $var - * @return $this - */ - public function setKmsConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetApp\V1\KmsConfig::class); - $this->kms_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateReplicationRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateReplicationRequest.php deleted file mode 100644 index 74d52ea18a2a..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateReplicationRequest.php +++ /dev/null @@ -1,141 +0,0 @@ -google.cloud.netapp.v1.UpdateReplicationRequest - */ -class UpdateReplicationRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Mask of fields to update. At least one path must be supplied in - * this field. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * Required. A replication resource - * - * Generated from protobuf field .google.cloud.netapp.v1.Replication replication = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $replication = null; - - /** - * @param \Google\Cloud\NetApp\V1\Replication $replication Required. A replication resource - * @param \Google\Protobuf\FieldMask $updateMask Required. Mask of fields to update. At least one path must be supplied in - * this field. - * - * @return \Google\Cloud\NetApp\V1\UpdateReplicationRequest - * - * @experimental - */ - public static function build(\Google\Cloud\NetApp\V1\Replication $replication, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setReplication($replication) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Mask of fields to update. At least one path must be supplied in - * this field. - * @type \Google\Cloud\NetApp\V1\Replication $replication - * Required. A replication resource - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Netapp\V1\Replication::initOnce(); - parent::__construct($data); - } - - /** - * Required. Mask of fields to update. At least one path must be supplied in - * this field. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Required. Mask of fields to update. At least one path must be supplied in - * this field. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * Required. A replication resource - * - * Generated from protobuf field .google.cloud.netapp.v1.Replication replication = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\NetApp\V1\Replication|null - */ - public function getReplication() - { - return $this->replication; - } - - public function hasReplication() - { - return isset($this->replication); - } - - public function clearReplication() - { - unset($this->replication); - } - - /** - * Required. A replication resource - * - * Generated from protobuf field .google.cloud.netapp.v1.Replication replication = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\NetApp\V1\Replication $var - * @return $this - */ - public function setReplication($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetApp\V1\Replication::class); - $this->replication = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateSnapshotRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateSnapshotRequest.php deleted file mode 100644 index 245912940e92..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateSnapshotRequest.php +++ /dev/null @@ -1,141 +0,0 @@ -google.cloud.netapp.v1.UpdateSnapshotRequest - */ -class UpdateSnapshotRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Mask of fields to update. At least one path must be supplied in - * this field. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * Required. A snapshot resource - * - * Generated from protobuf field .google.cloud.netapp.v1.Snapshot snapshot = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $snapshot = null; - - /** - * @param \Google\Cloud\NetApp\V1\Snapshot $snapshot Required. A snapshot resource - * @param \Google\Protobuf\FieldMask $updateMask Required. Mask of fields to update. At least one path must be supplied in - * this field. - * - * @return \Google\Cloud\NetApp\V1\UpdateSnapshotRequest - * - * @experimental - */ - public static function build(\Google\Cloud\NetApp\V1\Snapshot $snapshot, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setSnapshot($snapshot) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Mask of fields to update. At least one path must be supplied in - * this field. - * @type \Google\Cloud\NetApp\V1\Snapshot $snapshot - * Required. A snapshot resource - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Netapp\V1\Snapshot::initOnce(); - parent::__construct($data); - } - - /** - * Required. Mask of fields to update. At least one path must be supplied in - * this field. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Required. Mask of fields to update. At least one path must be supplied in - * this field. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * Required. A snapshot resource - * - * Generated from protobuf field .google.cloud.netapp.v1.Snapshot snapshot = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\NetApp\V1\Snapshot|null - */ - public function getSnapshot() - { - return $this->snapshot; - } - - public function hasSnapshot() - { - return isset($this->snapshot); - } - - public function clearSnapshot() - { - unset($this->snapshot); - } - - /** - * Required. A snapshot resource - * - * Generated from protobuf field .google.cloud.netapp.v1.Snapshot snapshot = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\NetApp\V1\Snapshot $var - * @return $this - */ - public function setSnapshot($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetApp\V1\Snapshot::class); - $this->snapshot = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateStoragePoolRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateStoragePoolRequest.php deleted file mode 100644 index d6194402ffe3..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateStoragePoolRequest.php +++ /dev/null @@ -1,156 +0,0 @@ -google.cloud.netapp.v1.UpdateStoragePoolRequest - */ -class UpdateStoragePoolRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * StoragePool resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * Required. The pool being updated - * - * Generated from protobuf field .google.cloud.netapp.v1.StoragePool storage_pool = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $storage_pool = null; - - /** - * @param \Google\Cloud\NetApp\V1\StoragePool $storagePool Required. The pool being updated - * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the - * StoragePool resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * @return \Google\Cloud\NetApp\V1\UpdateStoragePoolRequest - * - * @experimental - */ - public static function build(\Google\Cloud\NetApp\V1\StoragePool $storagePool, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setStoragePool($storagePool) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Field mask is used to specify the fields to be overwritten in the - * StoragePool resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * @type \Google\Cloud\NetApp\V1\StoragePool $storage_pool - * Required. The pool being updated - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Netapp\V1\StoragePool::initOnce(); - parent::__construct($data); - } - - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * StoragePool resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * StoragePool resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * Required. The pool being updated - * - * Generated from protobuf field .google.cloud.netapp.v1.StoragePool storage_pool = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\NetApp\V1\StoragePool|null - */ - public function getStoragePool() - { - return $this->storage_pool; - } - - public function hasStoragePool() - { - return isset($this->storage_pool); - } - - public function clearStoragePool() - { - unset($this->storage_pool); - } - - /** - * Required. The pool being updated - * - * Generated from protobuf field .google.cloud.netapp.v1.StoragePool storage_pool = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\NetApp\V1\StoragePool $var - * @return $this - */ - public function setStoragePool($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetApp\V1\StoragePool::class); - $this->storage_pool = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateVolumeRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateVolumeRequest.php deleted file mode 100644 index 9ff480418046..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/UpdateVolumeRequest.php +++ /dev/null @@ -1,156 +0,0 @@ -google.cloud.netapp.v1.UpdateVolumeRequest - */ -class UpdateVolumeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * Volume resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * Required. The volume being updated - * - * Generated from protobuf field .google.cloud.netapp.v1.Volume volume = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $volume = null; - - /** - * @param \Google\Cloud\NetApp\V1\Volume $volume Required. The volume being updated - * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the - * Volume resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * @return \Google\Cloud\NetApp\V1\UpdateVolumeRequest - * - * @experimental - */ - public static function build(\Google\Cloud\NetApp\V1\Volume $volume, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setVolume($volume) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Field mask is used to specify the fields to be overwritten in the - * Volume resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * @type \Google\Cloud\NetApp\V1\Volume $volume - * Required. The volume being updated - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Netapp\V1\Volume::initOnce(); - parent::__construct($data); - } - - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * Volume resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * Volume resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * Required. The volume being updated - * - * Generated from protobuf field .google.cloud.netapp.v1.Volume volume = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\NetApp\V1\Volume|null - */ - public function getVolume() - { - return $this->volume; - } - - public function hasVolume() - { - return isset($this->volume); - } - - public function clearVolume() - { - unset($this->volume); - } - - /** - * Required. The volume being updated - * - * Generated from protobuf field .google.cloud.netapp.v1.Volume volume = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\NetApp\V1\Volume $var - * @return $this - */ - public function setVolume($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetApp\V1\Volume::class); - $this->volume = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/VerifyKmsConfigRequest.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/VerifyKmsConfigRequest.php deleted file mode 100644 index cbdbf82d59b6..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/VerifyKmsConfigRequest.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.netapp.v1.VerifyKmsConfigRequest - */ -class VerifyKmsConfigRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the KMS Config to be verified. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the KMS Config to be verified. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Netapp\V1\Kms::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the KMS Config to be verified. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the KMS Config to be verified. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/VerifyKmsConfigResponse.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/VerifyKmsConfigResponse.php deleted file mode 100644 index 317111a10436..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/VerifyKmsConfigResponse.php +++ /dev/null @@ -1,144 +0,0 @@ -google.cloud.netapp.v1.VerifyKmsConfigResponse - */ -class VerifyKmsConfigResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. If the customer key configured correctly to the encrypt - * volume. - * - * Generated from protobuf field bool healthy = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $healthy = false; - /** - * Output only. Error message if config is not healthy. - * - * Generated from protobuf field string health_error = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $health_error = ''; - /** - * Output only. Instructions for the customers to provide the access to the - * encryption key. - * - * Generated from protobuf field string instructions = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $instructions = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $healthy - * Output only. If the customer key configured correctly to the encrypt - * volume. - * @type string $health_error - * Output only. Error message if config is not healthy. - * @type string $instructions - * Output only. Instructions for the customers to provide the access to the - * encryption key. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Netapp\V1\Kms::initOnce(); - parent::__construct($data); - } - - /** - * Output only. If the customer key configured correctly to the encrypt - * volume. - * - * Generated from protobuf field bool healthy = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getHealthy() - { - return $this->healthy; - } - - /** - * Output only. If the customer key configured correctly to the encrypt - * volume. - * - * Generated from protobuf field bool healthy = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setHealthy($var) - { - GPBUtil::checkBool($var); - $this->healthy = $var; - - return $this; - } - - /** - * Output only. Error message if config is not healthy. - * - * Generated from protobuf field string health_error = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getHealthError() - { - return $this->health_error; - } - - /** - * Output only. Error message if config is not healthy. - * - * Generated from protobuf field string health_error = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setHealthError($var) - { - GPBUtil::checkString($var, True); - $this->health_error = $var; - - return $this; - } - - /** - * Output only. Instructions for the customers to provide the access to the - * encryption key. - * - * Generated from protobuf field string instructions = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getInstructions() - { - return $this->instructions; - } - - /** - * Output only. Instructions for the customers to provide the access to the - * encryption key. - * - * Generated from protobuf field string instructions = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setInstructions($var) - { - GPBUtil::checkString($var, True); - $this->instructions = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Volume.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Volume.php deleted file mode 100644 index 3c33402f966f..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Volume.php +++ /dev/null @@ -1,1443 +0,0 @@ -google.cloud.netapp.v1.Volume - */ -class Volume extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. Name of the volume - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Output only. State of the volume - * - * Generated from protobuf field .google.cloud.netapp.v1.Volume.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. State details of the volume - * - * Generated from protobuf field string state_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state_details = ''; - /** - * Output only. Create time of the volume - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Required. Share name of the volume - * - * Generated from protobuf field string share_name = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $share_name = ''; - /** - * Output only. This field is not implemented. The values provided in this - * field are ignored. - * - * Generated from protobuf field string psa_range = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $psa_range = ''; - /** - * Required. StoragePool name of the volume - * - * Generated from protobuf field string storage_pool = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $storage_pool = ''; - /** - * Output only. VPC Network name. - * Format: projects/{project}/global/networks/{network} - * - * Generated from protobuf field string network = 8 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $network = ''; - /** - * Output only. Service level of the volume - * - * Generated from protobuf field .google.cloud.netapp.v1.ServiceLevel service_level = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $service_level = 0; - /** - * Required. Capacity in GIB of the volume - * - * Generated from protobuf field int64 capacity_gib = 10 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $capacity_gib = 0; - /** - * Optional. Export policy of the volume - * - * Generated from protobuf field .google.cloud.netapp.v1.ExportPolicy export_policy = 11 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $export_policy = null; - /** - * Required. Protocols required for the volume - * - * Generated from protobuf field repeated .google.cloud.netapp.v1.Protocols protocols = 12 [(.google.api.field_behavior) = REQUIRED]; - */ - private $protocols; - /** - * Optional. SMB share settings for the volume. - * - * Generated from protobuf field repeated .google.cloud.netapp.v1.SMBSettings smb_settings = 13 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $smb_settings; - /** - * Output only. Mount options of this volume - * - * Generated from protobuf field repeated .google.cloud.netapp.v1.MountOption mount_options = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $mount_options; - /** - * Optional. Default unix style permission (e.g. 777) the mount point will be - * created with. Applicable for NFS protocol types only. - * - * Generated from protobuf field string unix_permissions = 15 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $unix_permissions = ''; - /** - * Optional. Labels as key value pairs - * - * Generated from protobuf field map labels = 16 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - /** - * Optional. Description of the volume - * - * Generated from protobuf field string description = 17 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Optional. SnapshotPolicy for a volume. - * - * Generated from protobuf field .google.cloud.netapp.v1.SnapshotPolicy snapshot_policy = 18 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $snapshot_policy = null; - /** - * Optional. Snap_reserve specifies percentage of volume storage reserved for - * snapshot storage. Default is 0 percent. - * - * Generated from protobuf field double snap_reserve = 19 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $snap_reserve = 0.0; - /** - * Optional. Snapshot_directory if enabled (true) the volume will contain a - * read-only .snapshot directory which provides access to each of the volume's - * snapshots. - * - * Generated from protobuf field bool snapshot_directory = 20 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $snapshot_directory = false; - /** - * Output only. Used capacity in GIB of the volume. This is computed - * periodically and it does not represent the realtime usage. - * - * Generated from protobuf field int64 used_gib = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $used_gib = 0; - /** - * Optional. Security Style of the Volume - * - * Generated from protobuf field .google.cloud.netapp.v1.SecurityStyle security_style = 22 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $security_style = 0; - /** - * Optional. Flag indicating if the volume is a kerberos volume or not, export - * policy rules control kerberos security modes (krb5, krb5i, krb5p). - * - * Generated from protobuf field bool kerberos_enabled = 23 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $kerberos_enabled = false; - /** - * Output only. Flag indicating if the volume is NFS LDAP enabled or not. - * - * Generated from protobuf field bool ldap_enabled = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $ldap_enabled = false; - /** - * Output only. Specifies the ActiveDirectory name of a SMB volume. - * - * Generated from protobuf field string active_directory = 25 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $active_directory = ''; - /** - * Optional. Specifies the source of the volume to be created from. - * - * Generated from protobuf field .google.cloud.netapp.v1.RestoreParameters restore_parameters = 26 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $restore_parameters = null; - /** - * Output only. Specifies the KMS config to be used for volume encryption. - * - * Generated from protobuf field string kms_config = 27 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $kms_config = ''; - /** - * Output only. Specified the current volume encryption key source. - * - * Generated from protobuf field .google.cloud.netapp.v1.EncryptionType encryption_type = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $encryption_type = 0; - /** - * Output only. Indicates whether the volume is part of a replication - * relationship. - * - * Generated from protobuf field bool has_replication = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $has_replication = false; - /** - * BackupConfig of the volume. - * - * Generated from protobuf field optional .google.cloud.netapp.v1.BackupConfig backup_config = 30; - */ - protected $backup_config = null; - /** - * Optional. List of actions that are restricted on this volume. - * - * Generated from protobuf field repeated .google.cloud.netapp.v1.RestrictedAction restricted_actions = 31 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $restricted_actions; - /** - * Optional. Flag indicating if the volume will be a large capacity volume or - * a regular volume. - * - * Generated from protobuf field bool large_capacity = 32 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $large_capacity = false; - /** - * Optional. Flag indicating if the volume will have an IP address per node - * for volumes supporting multiple IP endpoints. Only the volume with - * large_capacity will be allowed to have multiple endpoints. - * - * Generated from protobuf field bool multiple_endpoints = 33 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $multiple_endpoints = false; - /** - * Tiering policy for the volume. - * - * Generated from protobuf field optional .google.cloud.netapp.v1.TieringPolicy tiering_policy = 34; - */ - protected $tiering_policy = null; - /** - * Output only. Specifies the replica zone for regional volume. - * - * Generated from protobuf field string replica_zone = 36 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $replica_zone = ''; - /** - * Output only. Specifies the active zone for regional volume. - * - * Generated from protobuf field string zone = 37 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $zone = ''; - /** - * Output only. Size of the volume cold tier data in GiB. - * - * Generated from protobuf field int64 cold_tier_size_gib = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $cold_tier_size_gib = 0; - /** - * Optional. The Hybrid Replication parameters for the volume. - * - * Generated from protobuf field .google.cloud.netapp.v1.HybridReplicationParameters hybrid_replication_parameters = 40 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $hybrid_replication_parameters = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. Name of the volume - * @type int $state - * Output only. State of the volume - * @type string $state_details - * Output only. State details of the volume - * @type \Google\Protobuf\Timestamp $create_time - * Output only. Create time of the volume - * @type string $share_name - * Required. Share name of the volume - * @type string $psa_range - * Output only. This field is not implemented. The values provided in this - * field are ignored. - * @type string $storage_pool - * Required. StoragePool name of the volume - * @type string $network - * Output only. VPC Network name. - * Format: projects/{project}/global/networks/{network} - * @type int $service_level - * Output only. Service level of the volume - * @type int|string $capacity_gib - * Required. Capacity in GIB of the volume - * @type \Google\Cloud\NetApp\V1\ExportPolicy $export_policy - * Optional. Export policy of the volume - * @type array|\Google\Protobuf\Internal\RepeatedField $protocols - * Required. Protocols required for the volume - * @type array|\Google\Protobuf\Internal\RepeatedField $smb_settings - * Optional. SMB share settings for the volume. - * @type array<\Google\Cloud\NetApp\V1\MountOption>|\Google\Protobuf\Internal\RepeatedField $mount_options - * Output only. Mount options of this volume - * @type string $unix_permissions - * Optional. Default unix style permission (e.g. 777) the mount point will be - * created with. Applicable for NFS protocol types only. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. Labels as key value pairs - * @type string $description - * Optional. Description of the volume - * @type \Google\Cloud\NetApp\V1\SnapshotPolicy $snapshot_policy - * Optional. SnapshotPolicy for a volume. - * @type float $snap_reserve - * Optional. Snap_reserve specifies percentage of volume storage reserved for - * snapshot storage. Default is 0 percent. - * @type bool $snapshot_directory - * Optional. Snapshot_directory if enabled (true) the volume will contain a - * read-only .snapshot directory which provides access to each of the volume's - * snapshots. - * @type int|string $used_gib - * Output only. Used capacity in GIB of the volume. This is computed - * periodically and it does not represent the realtime usage. - * @type int $security_style - * Optional. Security Style of the Volume - * @type bool $kerberos_enabled - * Optional. Flag indicating if the volume is a kerberos volume or not, export - * policy rules control kerberos security modes (krb5, krb5i, krb5p). - * @type bool $ldap_enabled - * Output only. Flag indicating if the volume is NFS LDAP enabled or not. - * @type string $active_directory - * Output only. Specifies the ActiveDirectory name of a SMB volume. - * @type \Google\Cloud\NetApp\V1\RestoreParameters $restore_parameters - * Optional. Specifies the source of the volume to be created from. - * @type string $kms_config - * Output only. Specifies the KMS config to be used for volume encryption. - * @type int $encryption_type - * Output only. Specified the current volume encryption key source. - * @type bool $has_replication - * Output only. Indicates whether the volume is part of a replication - * relationship. - * @type \Google\Cloud\NetApp\V1\BackupConfig $backup_config - * BackupConfig of the volume. - * @type array|\Google\Protobuf\Internal\RepeatedField $restricted_actions - * Optional. List of actions that are restricted on this volume. - * @type bool $large_capacity - * Optional. Flag indicating if the volume will be a large capacity volume or - * a regular volume. - * @type bool $multiple_endpoints - * Optional. Flag indicating if the volume will have an IP address per node - * for volumes supporting multiple IP endpoints. Only the volume with - * large_capacity will be allowed to have multiple endpoints. - * @type \Google\Cloud\NetApp\V1\TieringPolicy $tiering_policy - * Tiering policy for the volume. - * @type string $replica_zone - * Output only. Specifies the replica zone for regional volume. - * @type string $zone - * Output only. Specifies the active zone for regional volume. - * @type int|string $cold_tier_size_gib - * Output only. Size of the volume cold tier data in GiB. - * @type \Google\Cloud\NetApp\V1\HybridReplicationParameters $hybrid_replication_parameters - * Optional. The Hybrid Replication parameters for the volume. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Netapp\V1\Volume::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. Name of the volume - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. Name of the volume - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. State of the volume - * - * Generated from protobuf field .google.cloud.netapp.v1.Volume.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. State of the volume - * - * Generated from protobuf field .google.cloud.netapp.v1.Volume.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\NetApp\V1\Volume\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. State details of the volume - * - * Generated from protobuf field string state_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getStateDetails() - { - return $this->state_details; - } - - /** - * Output only. State details of the volume - * - * Generated from protobuf field string state_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setStateDetails($var) - { - GPBUtil::checkString($var, True); - $this->state_details = $var; - - return $this; - } - - /** - * Output only. Create time of the volume - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. Create time of the volume - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Required. Share name of the volume - * - * Generated from protobuf field string share_name = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getShareName() - { - return $this->share_name; - } - - /** - * Required. Share name of the volume - * - * Generated from protobuf field string share_name = 5 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setShareName($var) - { - GPBUtil::checkString($var, True); - $this->share_name = $var; - - return $this; - } - - /** - * Output only. This field is not implemented. The values provided in this - * field are ignored. - * - * Generated from protobuf field string psa_range = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getPsaRange() - { - return $this->psa_range; - } - - /** - * Output only. This field is not implemented. The values provided in this - * field are ignored. - * - * Generated from protobuf field string psa_range = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setPsaRange($var) - { - GPBUtil::checkString($var, True); - $this->psa_range = $var; - - return $this; - } - - /** - * Required. StoragePool name of the volume - * - * Generated from protobuf field string storage_pool = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getStoragePool() - { - return $this->storage_pool; - } - - /** - * Required. StoragePool name of the volume - * - * Generated from protobuf field string storage_pool = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setStoragePool($var) - { - GPBUtil::checkString($var, True); - $this->storage_pool = $var; - - return $this; - } - - /** - * Output only. VPC Network name. - * Format: projects/{project}/global/networks/{network} - * - * Generated from protobuf field string network = 8 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getNetwork() - { - return $this->network; - } - - /** - * Output only. VPC Network name. - * Format: projects/{project}/global/networks/{network} - * - * Generated from protobuf field string network = 8 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setNetwork($var) - { - GPBUtil::checkString($var, True); - $this->network = $var; - - return $this; - } - - /** - * Output only. Service level of the volume - * - * Generated from protobuf field .google.cloud.netapp.v1.ServiceLevel service_level = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getServiceLevel() - { - return $this->service_level; - } - - /** - * Output only. Service level of the volume - * - * Generated from protobuf field .google.cloud.netapp.v1.ServiceLevel service_level = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setServiceLevel($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\NetApp\V1\ServiceLevel::class); - $this->service_level = $var; - - return $this; - } - - /** - * Required. Capacity in GIB of the volume - * - * Generated from protobuf field int64 capacity_gib = 10 [(.google.api.field_behavior) = REQUIRED]; - * @return int|string - */ - public function getCapacityGib() - { - return $this->capacity_gib; - } - - /** - * Required. Capacity in GIB of the volume - * - * Generated from protobuf field int64 capacity_gib = 10 [(.google.api.field_behavior) = REQUIRED]; - * @param int|string $var - * @return $this - */ - public function setCapacityGib($var) - { - GPBUtil::checkInt64($var); - $this->capacity_gib = $var; - - return $this; - } - - /** - * Optional. Export policy of the volume - * - * Generated from protobuf field .google.cloud.netapp.v1.ExportPolicy export_policy = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\NetApp\V1\ExportPolicy|null - */ - public function getExportPolicy() - { - return $this->export_policy; - } - - public function hasExportPolicy() - { - return isset($this->export_policy); - } - - public function clearExportPolicy() - { - unset($this->export_policy); - } - - /** - * Optional. Export policy of the volume - * - * Generated from protobuf field .google.cloud.netapp.v1.ExportPolicy export_policy = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\NetApp\V1\ExportPolicy $var - * @return $this - */ - public function setExportPolicy($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetApp\V1\ExportPolicy::class); - $this->export_policy = $var; - - return $this; - } - - /** - * Required. Protocols required for the volume - * - * Generated from protobuf field repeated .google.cloud.netapp.v1.Protocols protocols = 12 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getProtocols() - { - return $this->protocols; - } - - /** - * Required. Protocols required for the volume - * - * Generated from protobuf field repeated .google.cloud.netapp.v1.Protocols protocols = 12 [(.google.api.field_behavior) = REQUIRED]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setProtocols($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\NetApp\V1\Protocols::class); - $this->protocols = $arr; - - return $this; - } - - /** - * Optional. SMB share settings for the volume. - * - * Generated from protobuf field repeated .google.cloud.netapp.v1.SMBSettings smb_settings = 13 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSmbSettings() - { - return $this->smb_settings; - } - - /** - * Optional. SMB share settings for the volume. - * - * Generated from protobuf field repeated .google.cloud.netapp.v1.SMBSettings smb_settings = 13 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSmbSettings($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\NetApp\V1\SMBSettings::class); - $this->smb_settings = $arr; - - return $this; - } - - /** - * Output only. Mount options of this volume - * - * Generated from protobuf field repeated .google.cloud.netapp.v1.MountOption mount_options = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMountOptions() - { - return $this->mount_options; - } - - /** - * Output only. Mount options of this volume - * - * Generated from protobuf field repeated .google.cloud.netapp.v1.MountOption mount_options = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\NetApp\V1\MountOption>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMountOptions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetApp\V1\MountOption::class); - $this->mount_options = $arr; - - return $this; - } - - /** - * Optional. Default unix style permission (e.g. 777) the mount point will be - * created with. Applicable for NFS protocol types only. - * - * Generated from protobuf field string unix_permissions = 15 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getUnixPermissions() - { - return $this->unix_permissions; - } - - /** - * Optional. Default unix style permission (e.g. 777) the mount point will be - * created with. Applicable for NFS protocol types only. - * - * Generated from protobuf field string unix_permissions = 15 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setUnixPermissions($var) - { - GPBUtil::checkString($var, True); - $this->unix_permissions = $var; - - return $this; - } - - /** - * Optional. Labels as key value pairs - * - * Generated from protobuf field map labels = 16 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. Labels as key value pairs - * - * Generated from protobuf field map labels = 16 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Optional. Description of the volume - * - * Generated from protobuf field string description = 17 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. Description of the volume - * - * Generated from protobuf field string description = 17 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Optional. SnapshotPolicy for a volume. - * - * Generated from protobuf field .google.cloud.netapp.v1.SnapshotPolicy snapshot_policy = 18 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\NetApp\V1\SnapshotPolicy|null - */ - public function getSnapshotPolicy() - { - return $this->snapshot_policy; - } - - public function hasSnapshotPolicy() - { - return isset($this->snapshot_policy); - } - - public function clearSnapshotPolicy() - { - unset($this->snapshot_policy); - } - - /** - * Optional. SnapshotPolicy for a volume. - * - * Generated from protobuf field .google.cloud.netapp.v1.SnapshotPolicy snapshot_policy = 18 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\NetApp\V1\SnapshotPolicy $var - * @return $this - */ - public function setSnapshotPolicy($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetApp\V1\SnapshotPolicy::class); - $this->snapshot_policy = $var; - - return $this; - } - - /** - * Optional. Snap_reserve specifies percentage of volume storage reserved for - * snapshot storage. Default is 0 percent. - * - * Generated from protobuf field double snap_reserve = 19 [(.google.api.field_behavior) = OPTIONAL]; - * @return float - */ - public function getSnapReserve() - { - return $this->snap_reserve; - } - - /** - * Optional. Snap_reserve specifies percentage of volume storage reserved for - * snapshot storage. Default is 0 percent. - * - * Generated from protobuf field double snap_reserve = 19 [(.google.api.field_behavior) = OPTIONAL]; - * @param float $var - * @return $this - */ - public function setSnapReserve($var) - { - GPBUtil::checkDouble($var); - $this->snap_reserve = $var; - - return $this; - } - - /** - * Optional. Snapshot_directory if enabled (true) the volume will contain a - * read-only .snapshot directory which provides access to each of the volume's - * snapshots. - * - * Generated from protobuf field bool snapshot_directory = 20 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getSnapshotDirectory() - { - return $this->snapshot_directory; - } - - /** - * Optional. Snapshot_directory if enabled (true) the volume will contain a - * read-only .snapshot directory which provides access to each of the volume's - * snapshots. - * - * Generated from protobuf field bool snapshot_directory = 20 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setSnapshotDirectory($var) - { - GPBUtil::checkBool($var); - $this->snapshot_directory = $var; - - return $this; - } - - /** - * Output only. Used capacity in GIB of the volume. This is computed - * periodically and it does not represent the realtime usage. - * - * Generated from protobuf field int64 used_gib = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getUsedGib() - { - return $this->used_gib; - } - - /** - * Output only. Used capacity in GIB of the volume. This is computed - * periodically and it does not represent the realtime usage. - * - * Generated from protobuf field int64 used_gib = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setUsedGib($var) - { - GPBUtil::checkInt64($var); - $this->used_gib = $var; - - return $this; - } - - /** - * Optional. Security Style of the Volume - * - * Generated from protobuf field .google.cloud.netapp.v1.SecurityStyle security_style = 22 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getSecurityStyle() - { - return $this->security_style; - } - - /** - * Optional. Security Style of the Volume - * - * Generated from protobuf field .google.cloud.netapp.v1.SecurityStyle security_style = 22 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setSecurityStyle($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\NetApp\V1\SecurityStyle::class); - $this->security_style = $var; - - return $this; - } - - /** - * Optional. Flag indicating if the volume is a kerberos volume or not, export - * policy rules control kerberos security modes (krb5, krb5i, krb5p). - * - * Generated from protobuf field bool kerberos_enabled = 23 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getKerberosEnabled() - { - return $this->kerberos_enabled; - } - - /** - * Optional. Flag indicating if the volume is a kerberos volume or not, export - * policy rules control kerberos security modes (krb5, krb5i, krb5p). - * - * Generated from protobuf field bool kerberos_enabled = 23 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setKerberosEnabled($var) - { - GPBUtil::checkBool($var); - $this->kerberos_enabled = $var; - - return $this; - } - - /** - * Output only. Flag indicating if the volume is NFS LDAP enabled or not. - * - * Generated from protobuf field bool ldap_enabled = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getLdapEnabled() - { - return $this->ldap_enabled; - } - - /** - * Output only. Flag indicating if the volume is NFS LDAP enabled or not. - * - * Generated from protobuf field bool ldap_enabled = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setLdapEnabled($var) - { - GPBUtil::checkBool($var); - $this->ldap_enabled = $var; - - return $this; - } - - /** - * Output only. Specifies the ActiveDirectory name of a SMB volume. - * - * Generated from protobuf field string active_directory = 25 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getActiveDirectory() - { - return $this->active_directory; - } - - /** - * Output only. Specifies the ActiveDirectory name of a SMB volume. - * - * Generated from protobuf field string active_directory = 25 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setActiveDirectory($var) - { - GPBUtil::checkString($var, True); - $this->active_directory = $var; - - return $this; - } - - /** - * Optional. Specifies the source of the volume to be created from. - * - * Generated from protobuf field .google.cloud.netapp.v1.RestoreParameters restore_parameters = 26 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\NetApp\V1\RestoreParameters|null - */ - public function getRestoreParameters() - { - return $this->restore_parameters; - } - - public function hasRestoreParameters() - { - return isset($this->restore_parameters); - } - - public function clearRestoreParameters() - { - unset($this->restore_parameters); - } - - /** - * Optional. Specifies the source of the volume to be created from. - * - * Generated from protobuf field .google.cloud.netapp.v1.RestoreParameters restore_parameters = 26 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\NetApp\V1\RestoreParameters $var - * @return $this - */ - public function setRestoreParameters($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetApp\V1\RestoreParameters::class); - $this->restore_parameters = $var; - - return $this; - } - - /** - * Output only. Specifies the KMS config to be used for volume encryption. - * - * Generated from protobuf field string kms_config = 27 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getKmsConfig() - { - return $this->kms_config; - } - - /** - * Output only. Specifies the KMS config to be used for volume encryption. - * - * Generated from protobuf field string kms_config = 27 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setKmsConfig($var) - { - GPBUtil::checkString($var, True); - $this->kms_config = $var; - - return $this; - } - - /** - * Output only. Specified the current volume encryption key source. - * - * Generated from protobuf field .google.cloud.netapp.v1.EncryptionType encryption_type = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getEncryptionType() - { - return $this->encryption_type; - } - - /** - * Output only. Specified the current volume encryption key source. - * - * Generated from protobuf field .google.cloud.netapp.v1.EncryptionType encryption_type = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setEncryptionType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\NetApp\V1\EncryptionType::class); - $this->encryption_type = $var; - - return $this; - } - - /** - * Output only. Indicates whether the volume is part of a replication - * relationship. - * - * Generated from protobuf field bool has_replication = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getHasReplication() - { - return $this->has_replication; - } - - /** - * Output only. Indicates whether the volume is part of a replication - * relationship. - * - * Generated from protobuf field bool has_replication = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setHasReplication($var) - { - GPBUtil::checkBool($var); - $this->has_replication = $var; - - return $this; - } - - /** - * BackupConfig of the volume. - * - * Generated from protobuf field optional .google.cloud.netapp.v1.BackupConfig backup_config = 30; - * @return \Google\Cloud\NetApp\V1\BackupConfig|null - */ - public function getBackupConfig() - { - return $this->backup_config; - } - - public function hasBackupConfig() - { - return isset($this->backup_config); - } - - public function clearBackupConfig() - { - unset($this->backup_config); - } - - /** - * BackupConfig of the volume. - * - * Generated from protobuf field optional .google.cloud.netapp.v1.BackupConfig backup_config = 30; - * @param \Google\Cloud\NetApp\V1\BackupConfig $var - * @return $this - */ - public function setBackupConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetApp\V1\BackupConfig::class); - $this->backup_config = $var; - - return $this; - } - - /** - * Optional. List of actions that are restricted on this volume. - * - * Generated from protobuf field repeated .google.cloud.netapp.v1.RestrictedAction restricted_actions = 31 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRestrictedActions() - { - return $this->restricted_actions; - } - - /** - * Optional. List of actions that are restricted on this volume. - * - * Generated from protobuf field repeated .google.cloud.netapp.v1.RestrictedAction restricted_actions = 31 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRestrictedActions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\NetApp\V1\RestrictedAction::class); - $this->restricted_actions = $arr; - - return $this; - } - - /** - * Optional. Flag indicating if the volume will be a large capacity volume or - * a regular volume. - * - * Generated from protobuf field bool large_capacity = 32 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getLargeCapacity() - { - return $this->large_capacity; - } - - /** - * Optional. Flag indicating if the volume will be a large capacity volume or - * a regular volume. - * - * Generated from protobuf field bool large_capacity = 32 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setLargeCapacity($var) - { - GPBUtil::checkBool($var); - $this->large_capacity = $var; - - return $this; - } - - /** - * Optional. Flag indicating if the volume will have an IP address per node - * for volumes supporting multiple IP endpoints. Only the volume with - * large_capacity will be allowed to have multiple endpoints. - * - * Generated from protobuf field bool multiple_endpoints = 33 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getMultipleEndpoints() - { - return $this->multiple_endpoints; - } - - /** - * Optional. Flag indicating if the volume will have an IP address per node - * for volumes supporting multiple IP endpoints. Only the volume with - * large_capacity will be allowed to have multiple endpoints. - * - * Generated from protobuf field bool multiple_endpoints = 33 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setMultipleEndpoints($var) - { - GPBUtil::checkBool($var); - $this->multiple_endpoints = $var; - - return $this; - } - - /** - * Tiering policy for the volume. - * - * Generated from protobuf field optional .google.cloud.netapp.v1.TieringPolicy tiering_policy = 34; - * @return \Google\Cloud\NetApp\V1\TieringPolicy|null - */ - public function getTieringPolicy() - { - return $this->tiering_policy; - } - - public function hasTieringPolicy() - { - return isset($this->tiering_policy); - } - - public function clearTieringPolicy() - { - unset($this->tiering_policy); - } - - /** - * Tiering policy for the volume. - * - * Generated from protobuf field optional .google.cloud.netapp.v1.TieringPolicy tiering_policy = 34; - * @param \Google\Cloud\NetApp\V1\TieringPolicy $var - * @return $this - */ - public function setTieringPolicy($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetApp\V1\TieringPolicy::class); - $this->tiering_policy = $var; - - return $this; - } - - /** - * Output only. Specifies the replica zone for regional volume. - * - * Generated from protobuf field string replica_zone = 36 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getReplicaZone() - { - return $this->replica_zone; - } - - /** - * Output only. Specifies the replica zone for regional volume. - * - * Generated from protobuf field string replica_zone = 36 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setReplicaZone($var) - { - GPBUtil::checkString($var, True); - $this->replica_zone = $var; - - return $this; - } - - /** - * Output only. Specifies the active zone for regional volume. - * - * Generated from protobuf field string zone = 37 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getZone() - { - return $this->zone; - } - - /** - * Output only. Specifies the active zone for regional volume. - * - * Generated from protobuf field string zone = 37 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setZone($var) - { - GPBUtil::checkString($var, True); - $this->zone = $var; - - return $this; - } - - /** - * Output only. Size of the volume cold tier data in GiB. - * - * Generated from protobuf field int64 cold_tier_size_gib = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getColdTierSizeGib() - { - return $this->cold_tier_size_gib; - } - - /** - * Output only. Size of the volume cold tier data in GiB. - * - * Generated from protobuf field int64 cold_tier_size_gib = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setColdTierSizeGib($var) - { - GPBUtil::checkInt64($var); - $this->cold_tier_size_gib = $var; - - return $this; - } - - /** - * Optional. The Hybrid Replication parameters for the volume. - * - * Generated from protobuf field .google.cloud.netapp.v1.HybridReplicationParameters hybrid_replication_parameters = 40 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\NetApp\V1\HybridReplicationParameters|null - */ - public function getHybridReplicationParameters() - { - return $this->hybrid_replication_parameters; - } - - public function hasHybridReplicationParameters() - { - return isset($this->hybrid_replication_parameters); - } - - public function clearHybridReplicationParameters() - { - unset($this->hybrid_replication_parameters); - } - - /** - * Optional. The Hybrid Replication parameters for the volume. - * - * Generated from protobuf field .google.cloud.netapp.v1.HybridReplicationParameters hybrid_replication_parameters = 40 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\NetApp\V1\HybridReplicationParameters $var - * @return $this - */ - public function setHybridReplicationParameters($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetApp\V1\HybridReplicationParameters::class); - $this->hybrid_replication_parameters = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Volume/State.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Volume/State.php deleted file mode 100644 index 8c26d9d33682..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/Volume/State.php +++ /dev/null @@ -1,115 +0,0 @@ -google.cloud.netapp.v1.Volume.State - */ -class State -{ - /** - * Unspecified Volume State - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Volume State is Ready - * - * Generated from protobuf enum READY = 1; - */ - const READY = 1; - /** - * Volume State is Creating - * - * Generated from protobuf enum CREATING = 2; - */ - const CREATING = 2; - /** - * Volume State is Deleting - * - * Generated from protobuf enum DELETING = 3; - */ - const DELETING = 3; - /** - * Volume State is Updating - * - * Generated from protobuf enum UPDATING = 4; - */ - const UPDATING = 4; - /** - * Volume State is Restoring - * - * Generated from protobuf enum RESTORING = 5; - */ - const RESTORING = 5; - /** - * Volume State is Disabled - * - * Generated from protobuf enum DISABLED = 6; - */ - const DISABLED = 6; - /** - * Volume State is Error - * - * Generated from protobuf enum ERROR = 7; - */ - const ERROR = 7; - /** - * Volume State is Preparing. Note that this is different from CREATING - * where CREATING means the volume is being created, while PREPARING means - * the volume is created and now being prepared for the replication. - * - * Generated from protobuf enum PREPARING = 8; - */ - const PREPARING = 8; - /** - * Volume State is Read Only - * - * Generated from protobuf enum READ_ONLY = 9; - */ - const READ_ONLY = 9; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::READY => 'READY', - self::CREATING => 'CREATING', - self::DELETING => 'DELETING', - self::UPDATING => 'UPDATING', - self::RESTORING => 'RESTORING', - self::DISABLED => 'DISABLED', - self::ERROR => 'ERROR', - self::PREPARING => 'PREPARING', - self::READ_ONLY => 'READ_ONLY', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\NetApp\V1\Volume_State::class); - diff --git a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/WeeklySchedule.php b/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/WeeklySchedule.php deleted file mode 100644 index 8b126b6825cd..000000000000 --- a/owl-bot-staging/NetApp/v1/proto/src/Google/Cloud/NetApp/V1/WeeklySchedule.php +++ /dev/null @@ -1,218 +0,0 @@ -google.cloud.netapp.v1.WeeklySchedule - */ -class WeeklySchedule extends \Google\Protobuf\Internal\Message -{ - /** - * The maximum number of Snapshots to keep for the hourly schedule - * - * Generated from protobuf field optional double snapshots_to_keep = 1; - */ - protected $snapshots_to_keep = null; - /** - * Set the minute of the hour to start the snapshot (0-59), defaults to the - * top of the hour (0). - * - * Generated from protobuf field optional double minute = 2; - */ - protected $minute = null; - /** - * Set the hour to start the snapshot (0-23), defaults to midnight (0). - * - * Generated from protobuf field optional double hour = 3; - */ - protected $hour = null; - /** - * Set the day or days of the week to make a snapshot. Accepts a comma - * separated days of the week. Defaults to 'Sunday'. - * - * Generated from protobuf field optional string day = 4; - */ - protected $day = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $snapshots_to_keep - * The maximum number of Snapshots to keep for the hourly schedule - * @type float $minute - * Set the minute of the hour to start the snapshot (0-59), defaults to the - * top of the hour (0). - * @type float $hour - * Set the hour to start the snapshot (0-23), defaults to midnight (0). - * @type string $day - * Set the day or days of the week to make a snapshot. Accepts a comma - * separated days of the week. Defaults to 'Sunday'. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Netapp\V1\Volume::initOnce(); - parent::__construct($data); - } - - /** - * The maximum number of Snapshots to keep for the hourly schedule - * - * Generated from protobuf field optional double snapshots_to_keep = 1; - * @return float - */ - public function getSnapshotsToKeep() - { - return isset($this->snapshots_to_keep) ? $this->snapshots_to_keep : 0.0; - } - - public function hasSnapshotsToKeep() - { - return isset($this->snapshots_to_keep); - } - - public function clearSnapshotsToKeep() - { - unset($this->snapshots_to_keep); - } - - /** - * The maximum number of Snapshots to keep for the hourly schedule - * - * Generated from protobuf field optional double snapshots_to_keep = 1; - * @param float $var - * @return $this - */ - public function setSnapshotsToKeep($var) - { - GPBUtil::checkDouble($var); - $this->snapshots_to_keep = $var; - - return $this; - } - - /** - * Set the minute of the hour to start the snapshot (0-59), defaults to the - * top of the hour (0). - * - * Generated from protobuf field optional double minute = 2; - * @return float - */ - public function getMinute() - { - return isset($this->minute) ? $this->minute : 0.0; - } - - public function hasMinute() - { - return isset($this->minute); - } - - public function clearMinute() - { - unset($this->minute); - } - - /** - * Set the minute of the hour to start the snapshot (0-59), defaults to the - * top of the hour (0). - * - * Generated from protobuf field optional double minute = 2; - * @param float $var - * @return $this - */ - public function setMinute($var) - { - GPBUtil::checkDouble($var); - $this->minute = $var; - - return $this; - } - - /** - * Set the hour to start the snapshot (0-23), defaults to midnight (0). - * - * Generated from protobuf field optional double hour = 3; - * @return float - */ - public function getHour() - { - return isset($this->hour) ? $this->hour : 0.0; - } - - public function hasHour() - { - return isset($this->hour); - } - - public function clearHour() - { - unset($this->hour); - } - - /** - * Set the hour to start the snapshot (0-23), defaults to midnight (0). - * - * Generated from protobuf field optional double hour = 3; - * @param float $var - * @return $this - */ - public function setHour($var) - { - GPBUtil::checkDouble($var); - $this->hour = $var; - - return $this; - } - - /** - * Set the day or days of the week to make a snapshot. Accepts a comma - * separated days of the week. Defaults to 'Sunday'. - * - * Generated from protobuf field optional string day = 4; - * @return string - */ - public function getDay() - { - return isset($this->day) ? $this->day : ''; - } - - public function hasDay() - { - return isset($this->day); - } - - public function clearDay() - { - unset($this->day); - } - - /** - * Set the day or days of the week to make a snapshot. Accepts a comma - * separated days of the week. Defaults to 'Sunday'. - * - * Generated from protobuf field optional string day = 4; - * @param string $var - * @return $this - */ - public function setDay($var) - { - GPBUtil::checkString($var, True); - $this->day = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_active_directory.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_active_directory.php deleted file mode 100644 index 360838063eaa..000000000000 --- a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_active_directory.php +++ /dev/null @@ -1,123 +0,0 @@ -setDomain($activeDirectoryDomain) - ->setDns($activeDirectoryDns) - ->setNetBiosPrefix($activeDirectoryNetBiosPrefix) - ->setUsername($activeDirectoryUsername) - ->setPassword($activeDirectoryPassword); - $request = (new CreateActiveDirectoryRequest()) - ->setParent($formattedParent) - ->setActiveDirectory($activeDirectory) - ->setActiveDirectoryId($activeDirectoryId); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $netAppClient->createActiveDirectory($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var ActiveDirectory $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = NetAppClient::locationName('[PROJECT]', '[LOCATION]'); - $activeDirectoryDomain = '[DOMAIN]'; - $activeDirectoryDns = '[DNS]'; - $activeDirectoryNetBiosPrefix = '[NET_BIOS_PREFIX]'; - $activeDirectoryUsername = '[USERNAME]'; - $activeDirectoryPassword = '[PASSWORD]'; - $activeDirectoryId = '[ACTIVE_DIRECTORY_ID]'; - - create_active_directory_sample( - $formattedParent, - $activeDirectoryDomain, - $activeDirectoryDns, - $activeDirectoryNetBiosPrefix, - $activeDirectoryUsername, - $activeDirectoryPassword, - $activeDirectoryId - ); -} -// [END netapp_v1_generated_NetApp_CreateActiveDirectory_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_backup.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_backup.php deleted file mode 100644 index 99e4154c3e3a..000000000000 --- a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_backup.php +++ /dev/null @@ -1,96 +0,0 @@ -setParent($formattedParent) - ->setBackupId($backupId) - ->setBackup($backup); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $netAppClient->createBackup($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Backup $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = NetAppClient::backupVaultName('[PROJECT]', '[LOCATION]', '[BACKUP_VAULT]'); - $backupId = '[BACKUP_ID]'; - - create_backup_sample($formattedParent, $backupId); -} -// [END netapp_v1_generated_NetApp_CreateBackup_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_backup_policy.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_backup_policy.php deleted file mode 100644 index fbf433a991d6..000000000000 --- a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_backup_policy.php +++ /dev/null @@ -1,93 +0,0 @@ -setParent($formattedParent) - ->setBackupPolicy($backupPolicy) - ->setBackupPolicyId($backupPolicyId); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $netAppClient->createBackupPolicy($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var BackupPolicy $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = NetAppClient::locationName('[PROJECT]', '[LOCATION]'); - $backupPolicyId = '[BACKUP_POLICY_ID]'; - - create_backup_policy_sample($formattedParent, $backupPolicyId); -} -// [END netapp_v1_generated_NetApp_CreateBackupPolicy_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_backup_vault.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_backup_vault.php deleted file mode 100644 index d679748843da..000000000000 --- a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_backup_vault.php +++ /dev/null @@ -1,93 +0,0 @@ -setParent($formattedParent) - ->setBackupVaultId($backupVaultId) - ->setBackupVault($backupVault); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $netAppClient->createBackupVault($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var BackupVault $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = NetAppClient::locationName('[PROJECT]', '[LOCATION]'); - $backupVaultId = '[BACKUP_VAULT_ID]'; - - create_backup_vault_sample($formattedParent, $backupVaultId); -} -// [END netapp_v1_generated_NetApp_CreateBackupVault_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_kms_config.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_kms_config.php deleted file mode 100644 index aea45fdee4ec..000000000000 --- a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_kms_config.php +++ /dev/null @@ -1,98 +0,0 @@ -setCryptoKeyName($kmsConfigCryptoKeyName); - $request = (new CreateKmsConfigRequest()) - ->setParent($formattedParent) - ->setKmsConfigId($kmsConfigId) - ->setKmsConfig($kmsConfig); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $netAppClient->createKmsConfig($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var KmsConfig $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = NetAppClient::locationName('[PROJECT]', '[LOCATION]'); - $kmsConfigId = '[KMS_CONFIG_ID]'; - $kmsConfigCryptoKeyName = '[CRYPTO_KEY_NAME]'; - - create_kms_config_sample($formattedParent, $kmsConfigId, $kmsConfigCryptoKeyName); -} -// [END netapp_v1_generated_NetApp_CreateKmsConfig_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_replication.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_replication.php deleted file mode 100644 index 62b877f14aa7..000000000000 --- a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_replication.php +++ /dev/null @@ -1,116 +0,0 @@ -setStoragePool($formattedReplicationDestinationVolumeParametersStoragePool); - $replication = (new Replication()) - ->setReplicationSchedule($replicationReplicationSchedule) - ->setDestinationVolumeParameters($replicationDestinationVolumeParameters); - $request = (new CreateReplicationRequest()) - ->setParent($formattedParent) - ->setReplication($replication) - ->setReplicationId($replicationId); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $netAppClient->createReplication($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Replication $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = NetAppClient::volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); - $replicationReplicationSchedule = ReplicationSchedule::REPLICATION_SCHEDULE_UNSPECIFIED; - $formattedReplicationDestinationVolumeParametersStoragePool = NetAppClient::storagePoolName( - '[PROJECT]', - '[LOCATION]', - '[STORAGE_POOL]' - ); - $replicationId = '[REPLICATION_ID]'; - - create_replication_sample( - $formattedParent, - $replicationReplicationSchedule, - $formattedReplicationDestinationVolumeParametersStoragePool, - $replicationId - ); -} -// [END netapp_v1_generated_NetApp_CreateReplication_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_snapshot.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_snapshot.php deleted file mode 100644 index 1c26d056b2e1..000000000000 --- a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_snapshot.php +++ /dev/null @@ -1,92 +0,0 @@ -setParent($formattedParent) - ->setSnapshot($snapshot) - ->setSnapshotId($snapshotId); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $netAppClient->createSnapshot($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Snapshot $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = NetAppClient::volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); - $snapshotId = '[SNAPSHOT_ID]'; - - create_snapshot_sample($formattedParent, $snapshotId); -} -// [END netapp_v1_generated_NetApp_CreateSnapshot_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_storage_pool.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_storage_pool.php deleted file mode 100644 index c301410c7fbf..000000000000 --- a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_storage_pool.php +++ /dev/null @@ -1,114 +0,0 @@ -setServiceLevel($storagePoolServiceLevel) - ->setCapacityGib($storagePoolCapacityGib) - ->setNetwork($formattedStoragePoolNetwork); - $request = (new CreateStoragePoolRequest()) - ->setParent($formattedParent) - ->setStoragePoolId($storagePoolId) - ->setStoragePool($storagePool); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $netAppClient->createStoragePool($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var StoragePool $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = NetAppClient::locationName('[PROJECT]', '[LOCATION]'); - $storagePoolId = '[STORAGE_POOL_ID]'; - $storagePoolServiceLevel = ServiceLevel::SERVICE_LEVEL_UNSPECIFIED; - $storagePoolCapacityGib = 0; - $formattedStoragePoolNetwork = NetAppClient::networkName('[PROJECT]', '[NETWORK]'); - - create_storage_pool_sample( - $formattedParent, - $storagePoolId, - $storagePoolServiceLevel, - $storagePoolCapacityGib, - $formattedStoragePoolNetwork - ); -} -// [END netapp_v1_generated_NetApp_CreateStoragePool_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_volume.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_volume.php deleted file mode 100644 index 7af7fb7b6213..000000000000 --- a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/create_volume.php +++ /dev/null @@ -1,123 +0,0 @@ -setShareName($volumeShareName) - ->setStoragePool($formattedVolumeStoragePool) - ->setCapacityGib($volumeCapacityGib) - ->setProtocols($volumeProtocols); - $request = (new CreateVolumeRequest()) - ->setParent($formattedParent) - ->setVolumeId($volumeId) - ->setVolume($volume); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $netAppClient->createVolume($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Volume $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = NetAppClient::locationName('[PROJECT]', '[LOCATION]'); - $volumeId = '[VOLUME_ID]'; - $volumeShareName = '[SHARE_NAME]'; - $formattedVolumeStoragePool = NetAppClient::storagePoolName( - '[PROJECT]', - '[LOCATION]', - '[STORAGE_POOL]' - ); - $volumeCapacityGib = 0; - $volumeProtocolsElement = Protocols::PROTOCOLS_UNSPECIFIED; - - create_volume_sample( - $formattedParent, - $volumeId, - $volumeShareName, - $formattedVolumeStoragePool, - $volumeCapacityGib, - $volumeProtocolsElement - ); -} -// [END netapp_v1_generated_NetApp_CreateVolume_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_active_directory.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_active_directory.php deleted file mode 100644 index b4a0ff6a2a93..000000000000 --- a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_active_directory.php +++ /dev/null @@ -1,80 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $netAppClient->deleteActiveDirectory($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = NetAppClient::activeDirectoryName('[PROJECT]', '[LOCATION]', '[ACTIVE_DIRECTORY]'); - - delete_active_directory_sample($formattedName); -} -// [END netapp_v1_generated_NetApp_DeleteActiveDirectory_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_backup.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_backup.php deleted file mode 100644 index a3be0938a6c6..000000000000 --- a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_backup.php +++ /dev/null @@ -1,81 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $netAppClient->deleteBackup($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = NetAppClient::backupName('[PROJECT]', '[LOCATION]', '[BACKUP_VAULT]', '[BACKUP]'); - - delete_backup_sample($formattedName); -} -// [END netapp_v1_generated_NetApp_DeleteBackup_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_backup_policy.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_backup_policy.php deleted file mode 100644 index 2bc2925d7fd3..000000000000 --- a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_backup_policy.php +++ /dev/null @@ -1,81 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $netAppClient->deleteBackupPolicy($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = NetAppClient::backupPolicyName('[PROJECT]', '[LOCATION]', '[BACKUP_POLICY]'); - - delete_backup_policy_sample($formattedName); -} -// [END netapp_v1_generated_NetApp_DeleteBackupPolicy_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_backup_vault.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_backup_vault.php deleted file mode 100644 index ebcb45572c0d..000000000000 --- a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_backup_vault.php +++ /dev/null @@ -1,81 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $netAppClient->deleteBackupVault($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = NetAppClient::backupVaultName('[PROJECT]', '[LOCATION]', '[BACKUP_VAULT]'); - - delete_backup_vault_sample($formattedName); -} -// [END netapp_v1_generated_NetApp_DeleteBackupVault_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_kms_config.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_kms_config.php deleted file mode 100644 index 22e8dbaa4362..000000000000 --- a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_kms_config.php +++ /dev/null @@ -1,80 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $netAppClient->deleteKmsConfig($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = NetAppClient::kmsConfigName('[PROJECT]', '[LOCATION]', '[KMS_CONFIG]'); - - delete_kms_config_sample($formattedName); -} -// [END netapp_v1_generated_NetApp_DeleteKmsConfig_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_replication.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_replication.php deleted file mode 100644 index a9980d4e21c6..000000000000 --- a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_replication.php +++ /dev/null @@ -1,86 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $netAppClient->deleteReplication($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = NetAppClient::replicationName( - '[PROJECT]', - '[LOCATION]', - '[VOLUME]', - '[REPLICATION]' - ); - - delete_replication_sample($formattedName); -} -// [END netapp_v1_generated_NetApp_DeleteReplication_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_snapshot.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_snapshot.php deleted file mode 100644 index 6b35b9b7f641..000000000000 --- a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_snapshot.php +++ /dev/null @@ -1,81 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $netAppClient->deleteSnapshot($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = NetAppClient::snapshotName('[PROJECT]', '[LOCATION]', '[VOLUME]', '[SNAPSHOT]'); - - delete_snapshot_sample($formattedName); -} -// [END netapp_v1_generated_NetApp_DeleteSnapshot_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_storage_pool.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_storage_pool.php deleted file mode 100644 index 3307ad1739df..000000000000 --- a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_storage_pool.php +++ /dev/null @@ -1,80 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $netAppClient->deleteStoragePool($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = NetAppClient::storagePoolName('[PROJECT]', '[LOCATION]', '[STORAGE_POOL]'); - - delete_storage_pool_sample($formattedName); -} -// [END netapp_v1_generated_NetApp_DeleteStoragePool_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_volume.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_volume.php deleted file mode 100644 index fbe680b5f5f2..000000000000 --- a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/delete_volume.php +++ /dev/null @@ -1,80 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $netAppClient->deleteVolume($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = NetAppClient::volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); - - delete_volume_sample($formattedName); -} -// [END netapp_v1_generated_NetApp_DeleteVolume_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/encrypt_volumes.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/encrypt_volumes.php deleted file mode 100644 index fbe35c32d359..000000000000 --- a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/encrypt_volumes.php +++ /dev/null @@ -1,84 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $netAppClient->encryptVolumes($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var KmsConfig $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = NetAppClient::kmsConfigName('[PROJECT]', '[LOCATION]', '[KMS_CONFIG]'); - - encrypt_volumes_sample($formattedName); -} -// [END netapp_v1_generated_NetApp_EncryptVolumes_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/establish_peering.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/establish_peering.php deleted file mode 100644 index be35f66b1e4d..000000000000 --- a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/establish_peering.php +++ /dev/null @@ -1,105 +0,0 @@ -setName($formattedName) - ->setPeerClusterName($peerClusterName) - ->setPeerSvmName($peerSvmName) - ->setPeerVolumeName($peerVolumeName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $netAppClient->establishPeering($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Replication $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = NetAppClient::replicationName( - '[PROJECT]', - '[LOCATION]', - '[VOLUME]', - '[REPLICATION]' - ); - $peerClusterName = '[PEER_CLUSTER_NAME]'; - $peerSvmName = '[PEER_SVM_NAME]'; - $peerVolumeName = '[PEER_VOLUME_NAME]'; - - establish_peering_sample($formattedName, $peerClusterName, $peerSvmName, $peerVolumeName); -} -// [END netapp_v1_generated_NetApp_EstablishPeering_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_active_directory.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_active_directory.php deleted file mode 100644 index b3bedd34d954..000000000000 --- a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_active_directory.php +++ /dev/null @@ -1,71 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var ActiveDirectory $response */ - $response = $netAppClient->getActiveDirectory($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = NetAppClient::activeDirectoryName('[PROJECT]', '[LOCATION]', '[ACTIVE_DIRECTORY]'); - - get_active_directory_sample($formattedName); -} -// [END netapp_v1_generated_NetApp_GetActiveDirectory_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_backup.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_backup.php deleted file mode 100644 index e82ad8f83d81..000000000000 --- a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_backup.php +++ /dev/null @@ -1,72 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Backup $response */ - $response = $netAppClient->getBackup($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = NetAppClient::backupName('[PROJECT]', '[LOCATION]', '[BACKUP_VAULT]', '[BACKUP]'); - - get_backup_sample($formattedName); -} -// [END netapp_v1_generated_NetApp_GetBackup_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_backup_policy.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_backup_policy.php deleted file mode 100644 index d255b60a3689..000000000000 --- a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_backup_policy.php +++ /dev/null @@ -1,72 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var BackupPolicy $response */ - $response = $netAppClient->getBackupPolicy($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = NetAppClient::backupPolicyName('[PROJECT]', '[LOCATION]', '[BACKUP_POLICY]'); - - get_backup_policy_sample($formattedName); -} -// [END netapp_v1_generated_NetApp_GetBackupPolicy_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_backup_vault.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_backup_vault.php deleted file mode 100644 index ebfb08fa661c..000000000000 --- a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_backup_vault.php +++ /dev/null @@ -1,72 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var BackupVault $response */ - $response = $netAppClient->getBackupVault($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = NetAppClient::backupVaultName('[PROJECT]', '[LOCATION]', '[BACKUP_VAULT]'); - - get_backup_vault_sample($formattedName); -} -// [END netapp_v1_generated_NetApp_GetBackupVault_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_kms_config.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_kms_config.php deleted file mode 100644 index 910476a88480..000000000000 --- a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_kms_config.php +++ /dev/null @@ -1,71 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var KmsConfig $response */ - $response = $netAppClient->getKmsConfig($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = NetAppClient::kmsConfigName('[PROJECT]', '[LOCATION]', '[KMS_CONFIG]'); - - get_kms_config_sample($formattedName); -} -// [END netapp_v1_generated_NetApp_GetKmsConfig_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_location.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_location.php deleted file mode 100644 index da552a232fbb..000000000000 --- a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_location.php +++ /dev/null @@ -1,57 +0,0 @@ -getLocation($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END netapp_v1_generated_NetApp_GetLocation_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_replication.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_replication.php deleted file mode 100644 index 91b1aa4a238b..000000000000 --- a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_replication.php +++ /dev/null @@ -1,77 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Replication $response */ - $response = $netAppClient->getReplication($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = NetAppClient::replicationName( - '[PROJECT]', - '[LOCATION]', - '[VOLUME]', - '[REPLICATION]' - ); - - get_replication_sample($formattedName); -} -// [END netapp_v1_generated_NetApp_GetReplication_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_snapshot.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_snapshot.php deleted file mode 100644 index bbcc5660fac7..000000000000 --- a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_snapshot.php +++ /dev/null @@ -1,72 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Snapshot $response */ - $response = $netAppClient->getSnapshot($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = NetAppClient::snapshotName('[PROJECT]', '[LOCATION]', '[VOLUME]', '[SNAPSHOT]'); - - get_snapshot_sample($formattedName); -} -// [END netapp_v1_generated_NetApp_GetSnapshot_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_storage_pool.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_storage_pool.php deleted file mode 100644 index 31e2d35f0341..000000000000 --- a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_storage_pool.php +++ /dev/null @@ -1,71 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var StoragePool $response */ - $response = $netAppClient->getStoragePool($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = NetAppClient::storagePoolName('[PROJECT]', '[LOCATION]', '[STORAGE_POOL]'); - - get_storage_pool_sample($formattedName); -} -// [END netapp_v1_generated_NetApp_GetStoragePool_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_volume.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_volume.php deleted file mode 100644 index d5598718a06b..000000000000 --- a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/get_volume.php +++ /dev/null @@ -1,71 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Volume $response */ - $response = $netAppClient->getVolume($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = NetAppClient::volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); - - get_volume_sample($formattedName); -} -// [END netapp_v1_generated_NetApp_GetVolume_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_active_directories.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_active_directories.php deleted file mode 100644 index 6c11b9b031f1..000000000000 --- a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_active_directories.php +++ /dev/null @@ -1,76 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $netAppClient->listActiveDirectories($request); - - /** @var ActiveDirectory $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = NetAppClient::locationName('[PROJECT]', '[LOCATION]'); - - list_active_directories_sample($formattedParent); -} -// [END netapp_v1_generated_NetApp_ListActiveDirectories_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_backup_policies.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_backup_policies.php deleted file mode 100644 index fe0b33a9dbad..000000000000 --- a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_backup_policies.php +++ /dev/null @@ -1,76 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $netAppClient->listBackupPolicies($request); - - /** @var BackupPolicy $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = NetAppClient::locationName('[PROJECT]', '[LOCATION]'); - - list_backup_policies_sample($formattedParent); -} -// [END netapp_v1_generated_NetApp_ListBackupPolicies_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_backup_vaults.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_backup_vaults.php deleted file mode 100644 index 51fca830aeff..000000000000 --- a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_backup_vaults.php +++ /dev/null @@ -1,78 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $netAppClient->listBackupVaults($request); - - /** @var BackupVault $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = NetAppClient::locationName('[PROJECT]', '[LOCATION]'); - - list_backup_vaults_sample($formattedParent); -} -// [END netapp_v1_generated_NetApp_ListBackupVaults_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_backups.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_backups.php deleted file mode 100644 index 9d686d904e64..000000000000 --- a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_backups.php +++ /dev/null @@ -1,84 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $netAppClient->listBackups($request); - - /** @var Backup $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = NetAppClient::backupVaultName('[PROJECT]', '[LOCATION]', '[BACKUP_VAULT]'); - - list_backups_sample($formattedParent); -} -// [END netapp_v1_generated_NetApp_ListBackups_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_kms_configs.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_kms_configs.php deleted file mode 100644 index 641b28b9f7a1..000000000000 --- a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_kms_configs.php +++ /dev/null @@ -1,76 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $netAppClient->listKmsConfigs($request); - - /** @var KmsConfig $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = NetAppClient::locationName('[PROJECT]', '[LOCATION]'); - - list_kms_configs_sample($formattedParent); -} -// [END netapp_v1_generated_NetApp_ListKmsConfigs_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_locations.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_locations.php deleted file mode 100644 index 34e95bff6562..000000000000 --- a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_locations.php +++ /dev/null @@ -1,62 +0,0 @@ -listLocations($request); - - /** @var Location $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END netapp_v1_generated_NetApp_ListLocations_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_replications.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_replications.php deleted file mode 100644 index 98981f3ca891..000000000000 --- a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_replications.php +++ /dev/null @@ -1,78 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $netAppClient->listReplications($request); - - /** @var Replication $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = NetAppClient::volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); - - list_replications_sample($formattedParent); -} -// [END netapp_v1_generated_NetApp_ListReplications_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_snapshots.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_snapshots.php deleted file mode 100644 index e88ad83cb1a8..000000000000 --- a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_snapshots.php +++ /dev/null @@ -1,78 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $netAppClient->listSnapshots($request); - - /** @var Snapshot $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = NetAppClient::volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); - - list_snapshots_sample($formattedParent); -} -// [END netapp_v1_generated_NetApp_ListSnapshots_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_storage_pools.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_storage_pools.php deleted file mode 100644 index a700f8ae079f..000000000000 --- a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_storage_pools.php +++ /dev/null @@ -1,76 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $netAppClient->listStoragePools($request); - - /** @var StoragePool $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = NetAppClient::locationName('[PROJECT]', '[LOCATION]'); - - list_storage_pools_sample($formattedParent); -} -// [END netapp_v1_generated_NetApp_ListStoragePools_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_volumes.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_volumes.php deleted file mode 100644 index bde278d49961..000000000000 --- a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/list_volumes.php +++ /dev/null @@ -1,76 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $netAppClient->listVolumes($request); - - /** @var Volume $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = NetAppClient::locationName('[PROJECT]', '[LOCATION]'); - - list_volumes_sample($formattedParent); -} -// [END netapp_v1_generated_NetApp_ListVolumes_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/resume_replication.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/resume_replication.php deleted file mode 100644 index 6494667234b3..000000000000 --- a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/resume_replication.php +++ /dev/null @@ -1,89 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $netAppClient->resumeReplication($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Replication $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = NetAppClient::replicationName( - '[PROJECT]', - '[LOCATION]', - '[VOLUME]', - '[REPLICATION]' - ); - - resume_replication_sample($formattedName); -} -// [END netapp_v1_generated_NetApp_ResumeReplication_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/reverse_replication_direction.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/reverse_replication_direction.php deleted file mode 100644 index 970e1707c2e5..000000000000 --- a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/reverse_replication_direction.php +++ /dev/null @@ -1,90 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $netAppClient->reverseReplicationDirection($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Replication $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = NetAppClient::replicationName( - '[PROJECT]', - '[LOCATION]', - '[VOLUME]', - '[REPLICATION]' - ); - - reverse_replication_direction_sample($formattedName); -} -// [END netapp_v1_generated_NetApp_ReverseReplicationDirection_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/revert_volume.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/revert_volume.php deleted file mode 100644 index c5d4f3cf098d..000000000000 --- a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/revert_volume.php +++ /dev/null @@ -1,91 +0,0 @@ -setName($formattedName) - ->setSnapshotId($snapshotId); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $netAppClient->revertVolume($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Volume $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = NetAppClient::volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); - $snapshotId = '[SNAPSHOT_ID]'; - - revert_volume_sample($formattedName, $snapshotId); -} -// [END netapp_v1_generated_NetApp_RevertVolume_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/stop_replication.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/stop_replication.php deleted file mode 100644 index 6039951c757b..000000000000 --- a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/stop_replication.php +++ /dev/null @@ -1,89 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $netAppClient->stopReplication($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Replication $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = NetAppClient::replicationName( - '[PROJECT]', - '[LOCATION]', - '[VOLUME]', - '[REPLICATION]' - ); - - stop_replication_sample($formattedName); -} -// [END netapp_v1_generated_NetApp_StopReplication_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/switch_active_replica_zone.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/switch_active_replica_zone.php deleted file mode 100644 index e193a72329fb..000000000000 --- a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/switch_active_replica_zone.php +++ /dev/null @@ -1,84 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $netAppClient->switchActiveReplicaZone($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var StoragePool $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = NetAppClient::storagePoolName('[PROJECT]', '[LOCATION]', '[STORAGE_POOL]'); - - switch_active_replica_zone_sample($formattedName); -} -// [END netapp_v1_generated_NetApp_SwitchActiveReplicaZone_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/sync_replication.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/sync_replication.php deleted file mode 100644 index a5c56078ede4..000000000000 --- a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/sync_replication.php +++ /dev/null @@ -1,90 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $netAppClient->syncReplication($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Replication $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = NetAppClient::replicationName( - '[PROJECT]', - '[LOCATION]', - '[VOLUME]', - '[REPLICATION]' - ); - - sync_replication_sample($formattedName); -} -// [END netapp_v1_generated_NetApp_SyncReplication_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_active_directory.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_active_directory.php deleted file mode 100644 index 8dfc7a9b3277..000000000000 --- a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_active_directory.php +++ /dev/null @@ -1,111 +0,0 @@ -setDomain($activeDirectoryDomain) - ->setDns($activeDirectoryDns) - ->setNetBiosPrefix($activeDirectoryNetBiosPrefix) - ->setUsername($activeDirectoryUsername) - ->setPassword($activeDirectoryPassword); - $request = (new UpdateActiveDirectoryRequest()) - ->setUpdateMask($updateMask) - ->setActiveDirectory($activeDirectory); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $netAppClient->updateActiveDirectory($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var ActiveDirectory $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $activeDirectoryDomain = '[DOMAIN]'; - $activeDirectoryDns = '[DNS]'; - $activeDirectoryNetBiosPrefix = '[NET_BIOS_PREFIX]'; - $activeDirectoryUsername = '[USERNAME]'; - $activeDirectoryPassword = '[PASSWORD]'; - - update_active_directory_sample( - $activeDirectoryDomain, - $activeDirectoryDns, - $activeDirectoryNetBiosPrefix, - $activeDirectoryUsername, - $activeDirectoryPassword - ); -} -// [END netapp_v1_generated_NetApp_UpdateActiveDirectory_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_backup.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_backup.php deleted file mode 100644 index 5507ac77c7bd..000000000000 --- a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_backup.php +++ /dev/null @@ -1,74 +0,0 @@ -setUpdateMask($updateMask) - ->setBackup($backup); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $netAppClient->updateBackup($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Backup $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END netapp_v1_generated_NetApp_UpdateBackup_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_backup_policy.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_backup_policy.php deleted file mode 100644 index 5758fb82d93f..000000000000 --- a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_backup_policy.php +++ /dev/null @@ -1,74 +0,0 @@ -setUpdateMask($updateMask) - ->setBackupPolicy($backupPolicy); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $netAppClient->updateBackupPolicy($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var BackupPolicy $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END netapp_v1_generated_NetApp_UpdateBackupPolicy_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_backup_vault.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_backup_vault.php deleted file mode 100644 index 31be5bfad0cd..000000000000 --- a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_backup_vault.php +++ /dev/null @@ -1,74 +0,0 @@ -setUpdateMask($updateMask) - ->setBackupVault($backupVault); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $netAppClient->updateBackupVault($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var BackupVault $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END netapp_v1_generated_NetApp_UpdateBackupVault_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_kms_config.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_kms_config.php deleted file mode 100644 index 6a15a2399065..000000000000 --- a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_kms_config.php +++ /dev/null @@ -1,88 +0,0 @@ -setCryptoKeyName($kmsConfigCryptoKeyName); - $request = (new UpdateKmsConfigRequest()) - ->setUpdateMask($updateMask) - ->setKmsConfig($kmsConfig); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $netAppClient->updateKmsConfig($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var KmsConfig $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $kmsConfigCryptoKeyName = '[CRYPTO_KEY_NAME]'; - - update_kms_config_sample($kmsConfigCryptoKeyName); -} -// [END netapp_v1_generated_NetApp_UpdateKmsConfig_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_replication.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_replication.php deleted file mode 100644 index 7fa801ca481a..000000000000 --- a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_replication.php +++ /dev/null @@ -1,104 +0,0 @@ -setStoragePool($formattedReplicationDestinationVolumeParametersStoragePool); - $replication = (new Replication()) - ->setReplicationSchedule($replicationReplicationSchedule) - ->setDestinationVolumeParameters($replicationDestinationVolumeParameters); - $request = (new UpdateReplicationRequest()) - ->setUpdateMask($updateMask) - ->setReplication($replication); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $netAppClient->updateReplication($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Replication $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $replicationReplicationSchedule = ReplicationSchedule::REPLICATION_SCHEDULE_UNSPECIFIED; - $formattedReplicationDestinationVolumeParametersStoragePool = NetAppClient::storagePoolName( - '[PROJECT]', - '[LOCATION]', - '[STORAGE_POOL]' - ); - - update_replication_sample( - $replicationReplicationSchedule, - $formattedReplicationDestinationVolumeParametersStoragePool - ); -} -// [END netapp_v1_generated_NetApp_UpdateReplication_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_snapshot.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_snapshot.php deleted file mode 100644 index f5df91947284..000000000000 --- a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_snapshot.php +++ /dev/null @@ -1,74 +0,0 @@ -setUpdateMask($updateMask) - ->setSnapshot($snapshot); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $netAppClient->updateSnapshot($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Snapshot $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END netapp_v1_generated_NetApp_UpdateSnapshot_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_storage_pool.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_storage_pool.php deleted file mode 100644 index 838ed04c11e1..000000000000 --- a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_storage_pool.php +++ /dev/null @@ -1,103 +0,0 @@ -setServiceLevel($storagePoolServiceLevel) - ->setCapacityGib($storagePoolCapacityGib) - ->setNetwork($formattedStoragePoolNetwork); - $request = (new UpdateStoragePoolRequest()) - ->setUpdateMask($updateMask) - ->setStoragePool($storagePool); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $netAppClient->updateStoragePool($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var StoragePool $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $storagePoolServiceLevel = ServiceLevel::SERVICE_LEVEL_UNSPECIFIED; - $storagePoolCapacityGib = 0; - $formattedStoragePoolNetwork = NetAppClient::networkName('[PROJECT]', '[NETWORK]'); - - update_storage_pool_sample( - $storagePoolServiceLevel, - $storagePoolCapacityGib, - $formattedStoragePoolNetwork - ); -} -// [END netapp_v1_generated_NetApp_UpdateStoragePool_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_volume.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_volume.php deleted file mode 100644 index a4958e603c2c..000000000000 --- a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/update_volume.php +++ /dev/null @@ -1,112 +0,0 @@ -setShareName($volumeShareName) - ->setStoragePool($formattedVolumeStoragePool) - ->setCapacityGib($volumeCapacityGib) - ->setProtocols($volumeProtocols); - $request = (new UpdateVolumeRequest()) - ->setUpdateMask($updateMask) - ->setVolume($volume); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $netAppClient->updateVolume($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Volume $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $volumeShareName = '[SHARE_NAME]'; - $formattedVolumeStoragePool = NetAppClient::storagePoolName( - '[PROJECT]', - '[LOCATION]', - '[STORAGE_POOL]' - ); - $volumeCapacityGib = 0; - $volumeProtocolsElement = Protocols::PROTOCOLS_UNSPECIFIED; - - update_volume_sample( - $volumeShareName, - $formattedVolumeStoragePool, - $volumeCapacityGib, - $volumeProtocolsElement - ); -} -// [END netapp_v1_generated_NetApp_UpdateVolume_sync] diff --git a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/verify_kms_config.php b/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/verify_kms_config.php deleted file mode 100644 index 351da5a758e9..000000000000 --- a/owl-bot-staging/NetApp/v1/samples/V1/NetAppClient/verify_kms_config.php +++ /dev/null @@ -1,71 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var VerifyKmsConfigResponse $response */ - $response = $netAppClient->verifyKmsConfig($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = NetAppClient::kmsConfigName('[PROJECT]', '[LOCATION]', '[KMS_CONFIG]'); - - verify_kms_config_sample($formattedName); -} -// [END netapp_v1_generated_NetApp_VerifyKmsConfig_sync] diff --git a/owl-bot-staging/NetApp/v1/src/V1/Client/NetAppClient.php b/owl-bot-staging/NetApp/v1/src/V1/Client/NetAppClient.php deleted file mode 100644 index 44de60fef903..000000000000 --- a/owl-bot-staging/NetApp/v1/src/V1/Client/NetAppClient.php +++ /dev/null @@ -1,2060 +0,0 @@ - createActiveDirectoryAsync(CreateActiveDirectoryRequest $request, array $optionalArgs = []) - * @method PromiseInterface createBackupAsync(CreateBackupRequest $request, array $optionalArgs = []) - * @method PromiseInterface createBackupPolicyAsync(CreateBackupPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface createBackupVaultAsync(CreateBackupVaultRequest $request, array $optionalArgs = []) - * @method PromiseInterface createKmsConfigAsync(CreateKmsConfigRequest $request, array $optionalArgs = []) - * @method PromiseInterface createReplicationAsync(CreateReplicationRequest $request, array $optionalArgs = []) - * @method PromiseInterface createSnapshotAsync(CreateSnapshotRequest $request, array $optionalArgs = []) - * @method PromiseInterface createStoragePoolAsync(CreateStoragePoolRequest $request, array $optionalArgs = []) - * @method PromiseInterface createVolumeAsync(CreateVolumeRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteActiveDirectoryAsync(DeleteActiveDirectoryRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteBackupAsync(DeleteBackupRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteBackupPolicyAsync(DeleteBackupPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteBackupVaultAsync(DeleteBackupVaultRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteKmsConfigAsync(DeleteKmsConfigRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteReplicationAsync(DeleteReplicationRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteSnapshotAsync(DeleteSnapshotRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteStoragePoolAsync(DeleteStoragePoolRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteVolumeAsync(DeleteVolumeRequest $request, array $optionalArgs = []) - * @method PromiseInterface encryptVolumesAsync(EncryptVolumesRequest $request, array $optionalArgs = []) - * @method PromiseInterface establishPeeringAsync(EstablishPeeringRequest $request, array $optionalArgs = []) - * @method PromiseInterface getActiveDirectoryAsync(GetActiveDirectoryRequest $request, array $optionalArgs = []) - * @method PromiseInterface getBackupAsync(GetBackupRequest $request, array $optionalArgs = []) - * @method PromiseInterface getBackupPolicyAsync(GetBackupPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface getBackupVaultAsync(GetBackupVaultRequest $request, array $optionalArgs = []) - * @method PromiseInterface getKmsConfigAsync(GetKmsConfigRequest $request, array $optionalArgs = []) - * @method PromiseInterface getReplicationAsync(GetReplicationRequest $request, array $optionalArgs = []) - * @method PromiseInterface getSnapshotAsync(GetSnapshotRequest $request, array $optionalArgs = []) - * @method PromiseInterface getStoragePoolAsync(GetStoragePoolRequest $request, array $optionalArgs = []) - * @method PromiseInterface getVolumeAsync(GetVolumeRequest $request, array $optionalArgs = []) - * @method PromiseInterface listActiveDirectoriesAsync(ListActiveDirectoriesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listBackupPoliciesAsync(ListBackupPoliciesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listBackupVaultsAsync(ListBackupVaultsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listBackupsAsync(ListBackupsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listKmsConfigsAsync(ListKmsConfigsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listReplicationsAsync(ListReplicationsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listSnapshotsAsync(ListSnapshotsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listStoragePoolsAsync(ListStoragePoolsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listVolumesAsync(ListVolumesRequest $request, array $optionalArgs = []) - * @method PromiseInterface resumeReplicationAsync(ResumeReplicationRequest $request, array $optionalArgs = []) - * @method PromiseInterface reverseReplicationDirectionAsync(ReverseReplicationDirectionRequest $request, array $optionalArgs = []) - * @method PromiseInterface revertVolumeAsync(RevertVolumeRequest $request, array $optionalArgs = []) - * @method PromiseInterface stopReplicationAsync(StopReplicationRequest $request, array $optionalArgs = []) - * @method PromiseInterface switchActiveReplicaZoneAsync(SwitchActiveReplicaZoneRequest $request, array $optionalArgs = []) - * @method PromiseInterface syncReplicationAsync(SyncReplicationRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateActiveDirectoryAsync(UpdateActiveDirectoryRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateBackupAsync(UpdateBackupRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateBackupPolicyAsync(UpdateBackupPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateBackupVaultAsync(UpdateBackupVaultRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateKmsConfigAsync(UpdateKmsConfigRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateReplicationAsync(UpdateReplicationRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateSnapshotAsync(UpdateSnapshotRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateStoragePoolAsync(UpdateStoragePoolRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateVolumeAsync(UpdateVolumeRequest $request, array $optionalArgs = []) - * @method PromiseInterface verifyKmsConfigAsync(VerifyKmsConfigRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) - */ -final class NetAppClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.netapp.v1.NetApp'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'netapp.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'netapp.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/net_app_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/net_app_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/net_app_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/net_app_rest_client_config.php', - ], - ], - ]; - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Create the default operation client for the service. - * - * @param array $options ClientOptions for the client. - * - * @return OperationsClient - */ - private function createOperationsClient(array $options) - { - // Unset client-specific configuration options - unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); - - if (isset($options['operationsClient'])) { - return $options['operationsClient']; - } - - return new OperationsClient($options); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * active_directory resource. - * - * @param string $project - * @param string $location - * @param string $activeDirectory - * - * @return string The formatted active_directory resource. - */ - public static function activeDirectoryName(string $project, string $location, string $activeDirectory): string - { - return self::getPathTemplate('activeDirectory')->render([ - 'project' => $project, - 'location' => $location, - 'active_directory' => $activeDirectory, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a backup - * resource. - * - * @param string $project - * @param string $location - * @param string $backupVault - * @param string $backup - * - * @return string The formatted backup resource. - */ - public static function backupName(string $project, string $location, string $backupVault, string $backup): string - { - return self::getPathTemplate('backup')->render([ - 'project' => $project, - 'location' => $location, - 'backup_vault' => $backupVault, - 'backup' => $backup, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * backup_policy resource. - * - * @param string $project - * @param string $location - * @param string $backupPolicy - * - * @return string The formatted backup_policy resource. - */ - public static function backupPolicyName(string $project, string $location, string $backupPolicy): string - { - return self::getPathTemplate('backupPolicy')->render([ - 'project' => $project, - 'location' => $location, - 'backup_policy' => $backupPolicy, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a backup_vault - * resource. - * - * @param string $project - * @param string $location - * @param string $backupVault - * - * @return string The formatted backup_vault resource. - */ - public static function backupVaultName(string $project, string $location, string $backupVault): string - { - return self::getPathTemplate('backupVault')->render([ - 'project' => $project, - 'location' => $location, - 'backup_vault' => $backupVault, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a kms_config - * resource. - * - * @param string $project - * @param string $location - * @param string $kmsConfig - * - * @return string The formatted kms_config resource. - */ - public static function kmsConfigName(string $project, string $location, string $kmsConfig): string - { - return self::getPathTemplate('kmsConfig')->render([ - 'project' => $project, - 'location' => $location, - 'kms_config' => $kmsConfig, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a location - * resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted location resource. - */ - public static function locationName(string $project, string $location): string - { - return self::getPathTemplate('location')->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a network - * resource. - * - * @param string $project - * @param string $network - * - * @return string The formatted network resource. - */ - public static function networkName(string $project, string $network): string - { - return self::getPathTemplate('network')->render([ - 'project' => $project, - 'network' => $network, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a replication - * resource. - * - * @param string $project - * @param string $location - * @param string $volume - * @param string $replication - * - * @return string The formatted replication resource. - */ - public static function replicationName(string $project, string $location, string $volume, string $replication): string - { - return self::getPathTemplate('replication')->render([ - 'project' => $project, - 'location' => $location, - 'volume' => $volume, - 'replication' => $replication, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a snapshot - * resource. - * - * @param string $project - * @param string $location - * @param string $volume - * @param string $snapshot - * - * @return string The formatted snapshot resource. - */ - public static function snapshotName(string $project, string $location, string $volume, string $snapshot): string - { - return self::getPathTemplate('snapshot')->render([ - 'project' => $project, - 'location' => $location, - 'volume' => $volume, - 'snapshot' => $snapshot, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a storage_pool - * resource. - * - * @param string $project - * @param string $location - * @param string $storagePool - * - * @return string The formatted storage_pool resource. - */ - public static function storagePoolName(string $project, string $location, string $storagePool): string - { - return self::getPathTemplate('storagePool')->render([ - 'project' => $project, - 'location' => $location, - 'storage_pool' => $storagePool, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a volume - * resource. - * - * @param string $project - * @param string $location - * @param string $volume - * - * @return string The formatted volume resource. - */ - public static function volumeName(string $project, string $location, string $volume): string - { - return self::getPathTemplate('volume')->render([ - 'project' => $project, - 'location' => $location, - 'volume' => $volume, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - activeDirectory: projects/{project}/locations/{location}/activeDirectories/{active_directory} - * - backup: projects/{project}/locations/{location}/backupVaults/{backup_vault}/backups/{backup} - * - backupPolicy: projects/{project}/locations/{location}/backupPolicies/{backup_policy} - * - backupVault: projects/{project}/locations/{location}/backupVaults/{backup_vault} - * - kmsConfig: projects/{project}/locations/{location}/kmsConfigs/{kms_config} - * - location: projects/{project}/locations/{location} - * - network: projects/{project}/global/networks/{network} - * - replication: projects/{project}/locations/{location}/volumes/{volume}/replications/{replication} - * - snapshot: projects/{project}/locations/{location}/volumes/{volume}/snapshots/{snapshot} - * - storagePool: projects/{project}/locations/{location}/storagePools/{storage_pool} - * - volume: projects/{project}/locations/{location}/volumes/{volume} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param ?string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, ?string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'netapp.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * CreateActiveDirectory - * Creates the active directory specified in the request. - * - * The async variant is {@see NetAppClient::createActiveDirectoryAsync()} . - * - * @example samples/V1/NetAppClient/create_active_directory.php - * - * @param CreateActiveDirectoryRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createActiveDirectory(CreateActiveDirectoryRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateActiveDirectory', $request, $callOptions)->wait(); - } - - /** - * Creates a backup from the volume specified in the request - * The backup can be created from the given snapshot if specified in the - * request. If no snapshot specified, there'll be a new snapshot taken to - * initiate the backup creation. - * - * The async variant is {@see NetAppClient::createBackupAsync()} . - * - * @example samples/V1/NetAppClient/create_backup.php - * - * @param CreateBackupRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createBackup(CreateBackupRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateBackup', $request, $callOptions)->wait(); - } - - /** - * Creates new backup policy - * - * The async variant is {@see NetAppClient::createBackupPolicyAsync()} . - * - * @example samples/V1/NetAppClient/create_backup_policy.php - * - * @param CreateBackupPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createBackupPolicy(CreateBackupPolicyRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateBackupPolicy', $request, $callOptions)->wait(); - } - - /** - * Creates new backup vault - * - * The async variant is {@see NetAppClient::createBackupVaultAsync()} . - * - * @example samples/V1/NetAppClient/create_backup_vault.php - * - * @param CreateBackupVaultRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createBackupVault(CreateBackupVaultRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateBackupVault', $request, $callOptions)->wait(); - } - - /** - * Creates a new KMS config. - * - * The async variant is {@see NetAppClient::createKmsConfigAsync()} . - * - * @example samples/V1/NetAppClient/create_kms_config.php - * - * @param CreateKmsConfigRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createKmsConfig(CreateKmsConfigRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateKmsConfig', $request, $callOptions)->wait(); - } - - /** - * Create a new replication for a volume. - * - * The async variant is {@see NetAppClient::createReplicationAsync()} . - * - * @example samples/V1/NetAppClient/create_replication.php - * - * @param CreateReplicationRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createReplication(CreateReplicationRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateReplication', $request, $callOptions)->wait(); - } - - /** - * Create a new snapshot for a volume. - * - * The async variant is {@see NetAppClient::createSnapshotAsync()} . - * - * @example samples/V1/NetAppClient/create_snapshot.php - * - * @param CreateSnapshotRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createSnapshot(CreateSnapshotRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateSnapshot', $request, $callOptions)->wait(); - } - - /** - * Creates a new storage pool. - * - * The async variant is {@see NetAppClient::createStoragePoolAsync()} . - * - * @example samples/V1/NetAppClient/create_storage_pool.php - * - * @param CreateStoragePoolRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createStoragePool(CreateStoragePoolRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateStoragePool', $request, $callOptions)->wait(); - } - - /** - * Creates a new Volume in a given project and location. - * - * The async variant is {@see NetAppClient::createVolumeAsync()} . - * - * @example samples/V1/NetAppClient/create_volume.php - * - * @param CreateVolumeRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createVolume(CreateVolumeRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateVolume', $request, $callOptions)->wait(); - } - - /** - * Delete the active directory specified in the request. - * - * The async variant is {@see NetAppClient::deleteActiveDirectoryAsync()} . - * - * @example samples/V1/NetAppClient/delete_active_directory.php - * - * @param DeleteActiveDirectoryRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteActiveDirectory(DeleteActiveDirectoryRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteActiveDirectory', $request, $callOptions)->wait(); - } - - /** - * Warning! This operation will permanently delete the backup. - * - * The async variant is {@see NetAppClient::deleteBackupAsync()} . - * - * @example samples/V1/NetAppClient/delete_backup.php - * - * @param DeleteBackupRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteBackup(DeleteBackupRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteBackup', $request, $callOptions)->wait(); - } - - /** - * Warning! This operation will permanently delete the backup policy. - * - * The async variant is {@see NetAppClient::deleteBackupPolicyAsync()} . - * - * @example samples/V1/NetAppClient/delete_backup_policy.php - * - * @param DeleteBackupPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteBackupPolicy(DeleteBackupPolicyRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteBackupPolicy', $request, $callOptions)->wait(); - } - - /** - * Warning! This operation will permanently delete the backup vault. - * - * The async variant is {@see NetAppClient::deleteBackupVaultAsync()} . - * - * @example samples/V1/NetAppClient/delete_backup_vault.php - * - * @param DeleteBackupVaultRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteBackupVault(DeleteBackupVaultRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteBackupVault', $request, $callOptions)->wait(); - } - - /** - * Warning! This operation will permanently delete the Kms config. - * - * The async variant is {@see NetAppClient::deleteKmsConfigAsync()} . - * - * @example samples/V1/NetAppClient/delete_kms_config.php - * - * @param DeleteKmsConfigRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteKmsConfig(DeleteKmsConfigRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteKmsConfig', $request, $callOptions)->wait(); - } - - /** - * Deletes a replication. - * - * The async variant is {@see NetAppClient::deleteReplicationAsync()} . - * - * @example samples/V1/NetAppClient/delete_replication.php - * - * @param DeleteReplicationRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteReplication(DeleteReplicationRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteReplication', $request, $callOptions)->wait(); - } - - /** - * Deletes a snapshot. - * - * The async variant is {@see NetAppClient::deleteSnapshotAsync()} . - * - * @example samples/V1/NetAppClient/delete_snapshot.php - * - * @param DeleteSnapshotRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteSnapshot(DeleteSnapshotRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteSnapshot', $request, $callOptions)->wait(); - } - - /** - * Warning! This operation will permanently delete the storage pool. - * - * The async variant is {@see NetAppClient::deleteStoragePoolAsync()} . - * - * @example samples/V1/NetAppClient/delete_storage_pool.php - * - * @param DeleteStoragePoolRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteStoragePool(DeleteStoragePoolRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteStoragePool', $request, $callOptions)->wait(); - } - - /** - * Deletes a single Volume. - * - * The async variant is {@see NetAppClient::deleteVolumeAsync()} . - * - * @example samples/V1/NetAppClient/delete_volume.php - * - * @param DeleteVolumeRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteVolume(DeleteVolumeRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteVolume', $request, $callOptions)->wait(); - } - - /** - * Encrypt the existing volumes without CMEK encryption with the desired the - * KMS config for the whole region. - * - * The async variant is {@see NetAppClient::encryptVolumesAsync()} . - * - * @example samples/V1/NetAppClient/encrypt_volumes.php - * - * @param EncryptVolumesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function encryptVolumes(EncryptVolumesRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('EncryptVolumes', $request, $callOptions)->wait(); - } - - /** - * Establish replication peering. - * - * The async variant is {@see NetAppClient::establishPeeringAsync()} . - * - * @example samples/V1/NetAppClient/establish_peering.php - * - * @param EstablishPeeringRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function establishPeering(EstablishPeeringRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('EstablishPeering', $request, $callOptions)->wait(); - } - - /** - * Describes a specified active directory. - * - * The async variant is {@see NetAppClient::getActiveDirectoryAsync()} . - * - * @example samples/V1/NetAppClient/get_active_directory.php - * - * @param GetActiveDirectoryRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return ActiveDirectory - * - * @throws ApiException Thrown if the API call fails. - */ - public function getActiveDirectory(GetActiveDirectoryRequest $request, array $callOptions = []): ActiveDirectory - { - return $this->startApiCall('GetActiveDirectory', $request, $callOptions)->wait(); - } - - /** - * Returns the description of the specified backup - * - * The async variant is {@see NetAppClient::getBackupAsync()} . - * - * @example samples/V1/NetAppClient/get_backup.php - * - * @param GetBackupRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Backup - * - * @throws ApiException Thrown if the API call fails. - */ - public function getBackup(GetBackupRequest $request, array $callOptions = []): Backup - { - return $this->startApiCall('GetBackup', $request, $callOptions)->wait(); - } - - /** - * Returns the description of the specified backup policy by backup_policy_id. - * - * The async variant is {@see NetAppClient::getBackupPolicyAsync()} . - * - * @example samples/V1/NetAppClient/get_backup_policy.php - * - * @param GetBackupPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return BackupPolicy - * - * @throws ApiException Thrown if the API call fails. - */ - public function getBackupPolicy(GetBackupPolicyRequest $request, array $callOptions = []): BackupPolicy - { - return $this->startApiCall('GetBackupPolicy', $request, $callOptions)->wait(); - } - - /** - * Returns the description of the specified backup vault - * - * The async variant is {@see NetAppClient::getBackupVaultAsync()} . - * - * @example samples/V1/NetAppClient/get_backup_vault.php - * - * @param GetBackupVaultRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return BackupVault - * - * @throws ApiException Thrown if the API call fails. - */ - public function getBackupVault(GetBackupVaultRequest $request, array $callOptions = []): BackupVault - { - return $this->startApiCall('GetBackupVault', $request, $callOptions)->wait(); - } - - /** - * Returns the description of the specified KMS config by kms_config_id. - * - * The async variant is {@see NetAppClient::getKmsConfigAsync()} . - * - * @example samples/V1/NetAppClient/get_kms_config.php - * - * @param GetKmsConfigRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return KmsConfig - * - * @throws ApiException Thrown if the API call fails. - */ - public function getKmsConfig(GetKmsConfigRequest $request, array $callOptions = []): KmsConfig - { - return $this->startApiCall('GetKmsConfig', $request, $callOptions)->wait(); - } - - /** - * Describe a replication for a volume. - * - * The async variant is {@see NetAppClient::getReplicationAsync()} . - * - * @example samples/V1/NetAppClient/get_replication.php - * - * @param GetReplicationRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Replication - * - * @throws ApiException Thrown if the API call fails. - */ - public function getReplication(GetReplicationRequest $request, array $callOptions = []): Replication - { - return $this->startApiCall('GetReplication', $request, $callOptions)->wait(); - } - - /** - * Describe a snapshot for a volume. - * - * The async variant is {@see NetAppClient::getSnapshotAsync()} . - * - * @example samples/V1/NetAppClient/get_snapshot.php - * - * @param GetSnapshotRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Snapshot - * - * @throws ApiException Thrown if the API call fails. - */ - public function getSnapshot(GetSnapshotRequest $request, array $callOptions = []): Snapshot - { - return $this->startApiCall('GetSnapshot', $request, $callOptions)->wait(); - } - - /** - * Returns the description of the specified storage pool by poolId. - * - * The async variant is {@see NetAppClient::getStoragePoolAsync()} . - * - * @example samples/V1/NetAppClient/get_storage_pool.php - * - * @param GetStoragePoolRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return StoragePool - * - * @throws ApiException Thrown if the API call fails. - */ - public function getStoragePool(GetStoragePoolRequest $request, array $callOptions = []): StoragePool - { - return $this->startApiCall('GetStoragePool', $request, $callOptions)->wait(); - } - - /** - * Gets details of a single Volume. - * - * The async variant is {@see NetAppClient::getVolumeAsync()} . - * - * @example samples/V1/NetAppClient/get_volume.php - * - * @param GetVolumeRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Volume - * - * @throws ApiException Thrown if the API call fails. - */ - public function getVolume(GetVolumeRequest $request, array $callOptions = []): Volume - { - return $this->startApiCall('GetVolume', $request, $callOptions)->wait(); - } - - /** - * Lists active directories. - * - * The async variant is {@see NetAppClient::listActiveDirectoriesAsync()} . - * - * @example samples/V1/NetAppClient/list_active_directories.php - * - * @param ListActiveDirectoriesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listActiveDirectories(ListActiveDirectoriesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListActiveDirectories', $request, $callOptions); - } - - /** - * Returns list of all available backup policies. - * - * The async variant is {@see NetAppClient::listBackupPoliciesAsync()} . - * - * @example samples/V1/NetAppClient/list_backup_policies.php - * - * @param ListBackupPoliciesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listBackupPolicies(ListBackupPoliciesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListBackupPolicies', $request, $callOptions); - } - - /** - * Returns list of all available backup vaults. - * - * The async variant is {@see NetAppClient::listBackupVaultsAsync()} . - * - * @example samples/V1/NetAppClient/list_backup_vaults.php - * - * @param ListBackupVaultsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listBackupVaults(ListBackupVaultsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListBackupVaults', $request, $callOptions); - } - - /** - * Returns descriptions of all backups for a backupVault. - * - * The async variant is {@see NetAppClient::listBackupsAsync()} . - * - * @example samples/V1/NetAppClient/list_backups.php - * - * @param ListBackupsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listBackups(ListBackupsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListBackups', $request, $callOptions); - } - - /** - * Returns descriptions of all KMS configs owned by the caller. - * - * The async variant is {@see NetAppClient::listKmsConfigsAsync()} . - * - * @example samples/V1/NetAppClient/list_kms_configs.php - * - * @param ListKmsConfigsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listKmsConfigs(ListKmsConfigsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListKmsConfigs', $request, $callOptions); - } - - /** - * Returns descriptions of all replications for a volume. - * - * The async variant is {@see NetAppClient::listReplicationsAsync()} . - * - * @example samples/V1/NetAppClient/list_replications.php - * - * @param ListReplicationsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listReplications(ListReplicationsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListReplications', $request, $callOptions); - } - - /** - * Returns descriptions of all snapshots for a volume. - * - * The async variant is {@see NetAppClient::listSnapshotsAsync()} . - * - * @example samples/V1/NetAppClient/list_snapshots.php - * - * @param ListSnapshotsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listSnapshots(ListSnapshotsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListSnapshots', $request, $callOptions); - } - - /** - * Returns descriptions of all storage pools owned by the caller. - * - * The async variant is {@see NetAppClient::listStoragePoolsAsync()} . - * - * @example samples/V1/NetAppClient/list_storage_pools.php - * - * @param ListStoragePoolsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listStoragePools(ListStoragePoolsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListStoragePools', $request, $callOptions); - } - - /** - * Lists Volumes in a given project. - * - * The async variant is {@see NetAppClient::listVolumesAsync()} . - * - * @example samples/V1/NetAppClient/list_volumes.php - * - * @param ListVolumesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listVolumes(ListVolumesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListVolumes', $request, $callOptions); - } - - /** - * Resume Cross Region Replication. - * - * The async variant is {@see NetAppClient::resumeReplicationAsync()} . - * - * @example samples/V1/NetAppClient/resume_replication.php - * - * @param ResumeReplicationRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function resumeReplication(ResumeReplicationRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('ResumeReplication', $request, $callOptions)->wait(); - } - - /** - * Reverses direction of replication. Source becomes destination and - * destination becomes source. - * - * The async variant is {@see NetAppClient::reverseReplicationDirectionAsync()} . - * - * @example samples/V1/NetAppClient/reverse_replication_direction.php - * - * @param ReverseReplicationDirectionRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function reverseReplicationDirection(ReverseReplicationDirectionRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('ReverseReplicationDirection', $request, $callOptions)->wait(); - } - - /** - * Revert an existing volume to a specified snapshot. - * Warning! This operation will permanently revert all changes made after the - * snapshot was created. - * - * The async variant is {@see NetAppClient::revertVolumeAsync()} . - * - * @example samples/V1/NetAppClient/revert_volume.php - * - * @param RevertVolumeRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function revertVolume(RevertVolumeRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('RevertVolume', $request, $callOptions)->wait(); - } - - /** - * Stop Cross Region Replication. - * - * The async variant is {@see NetAppClient::stopReplicationAsync()} . - * - * @example samples/V1/NetAppClient/stop_replication.php - * - * @param StopReplicationRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function stopReplication(StopReplicationRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('StopReplication', $request, $callOptions)->wait(); - } - - /** - * This operation will switch the active/replica zone for a regional - * storagePool. - * - * The async variant is {@see NetAppClient::switchActiveReplicaZoneAsync()} . - * - * @example samples/V1/NetAppClient/switch_active_replica_zone.php - * - * @param SwitchActiveReplicaZoneRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function switchActiveReplicaZone(SwitchActiveReplicaZoneRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('SwitchActiveReplicaZone', $request, $callOptions)->wait(); - } - - /** - * Syncs the replication. This will invoke one time volume data transfer from - * source to destination. - * - * The async variant is {@see NetAppClient::syncReplicationAsync()} . - * - * @example samples/V1/NetAppClient/sync_replication.php - * - * @param SyncReplicationRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function syncReplication(SyncReplicationRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('SyncReplication', $request, $callOptions)->wait(); - } - - /** - * Update the parameters of an active directories. - * - * The async variant is {@see NetAppClient::updateActiveDirectoryAsync()} . - * - * @example samples/V1/NetAppClient/update_active_directory.php - * - * @param UpdateActiveDirectoryRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateActiveDirectory(UpdateActiveDirectoryRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateActiveDirectory', $request, $callOptions)->wait(); - } - - /** - * Update backup with full spec. - * - * The async variant is {@see NetAppClient::updateBackupAsync()} . - * - * @example samples/V1/NetAppClient/update_backup.php - * - * @param UpdateBackupRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateBackup(UpdateBackupRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateBackup', $request, $callOptions)->wait(); - } - - /** - * Updates settings of a specific backup policy. - * - * The async variant is {@see NetAppClient::updateBackupPolicyAsync()} . - * - * @example samples/V1/NetAppClient/update_backup_policy.php - * - * @param UpdateBackupPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateBackupPolicy(UpdateBackupPolicyRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateBackupPolicy', $request, $callOptions)->wait(); - } - - /** - * Updates the settings of a specific backup vault. - * - * The async variant is {@see NetAppClient::updateBackupVaultAsync()} . - * - * @example samples/V1/NetAppClient/update_backup_vault.php - * - * @param UpdateBackupVaultRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateBackupVault(UpdateBackupVaultRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateBackupVault', $request, $callOptions)->wait(); - } - - /** - * Updates the Kms config properties with the full spec - * - * The async variant is {@see NetAppClient::updateKmsConfigAsync()} . - * - * @example samples/V1/NetAppClient/update_kms_config.php - * - * @param UpdateKmsConfigRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateKmsConfig(UpdateKmsConfigRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateKmsConfig', $request, $callOptions)->wait(); - } - - /** - * Updates the settings of a specific replication. - * - * The async variant is {@see NetAppClient::updateReplicationAsync()} . - * - * @example samples/V1/NetAppClient/update_replication.php - * - * @param UpdateReplicationRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateReplication(UpdateReplicationRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateReplication', $request, $callOptions)->wait(); - } - - /** - * Updates the settings of a specific snapshot. - * - * The async variant is {@see NetAppClient::updateSnapshotAsync()} . - * - * @example samples/V1/NetAppClient/update_snapshot.php - * - * @param UpdateSnapshotRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateSnapshot(UpdateSnapshotRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateSnapshot', $request, $callOptions)->wait(); - } - - /** - * Updates the storage pool properties with the full spec - * - * The async variant is {@see NetAppClient::updateStoragePoolAsync()} . - * - * @example samples/V1/NetAppClient/update_storage_pool.php - * - * @param UpdateStoragePoolRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateStoragePool(UpdateStoragePoolRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateStoragePool', $request, $callOptions)->wait(); - } - - /** - * Updates the parameters of a single Volume. - * - * The async variant is {@see NetAppClient::updateVolumeAsync()} . - * - * @example samples/V1/NetAppClient/update_volume.php - * - * @param UpdateVolumeRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateVolume(UpdateVolumeRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateVolume', $request, $callOptions)->wait(); - } - - /** - * Verifies KMS config reachability. - * - * The async variant is {@see NetAppClient::verifyKmsConfigAsync()} . - * - * @example samples/V1/NetAppClient/verify_kms_config.php - * - * @param VerifyKmsConfigRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return VerifyKmsConfigResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function verifyKmsConfig(VerifyKmsConfigRequest $request, array $callOptions = []): VerifyKmsConfigResponse - { - return $this->startApiCall('VerifyKmsConfig', $request, $callOptions)->wait(); - } - - /** - * Gets information about a location. - * - * The async variant is {@see NetAppClient::getLocationAsync()} . - * - * @example samples/V1/NetAppClient/get_location.php - * - * @param GetLocationRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Location - * - * @throws ApiException Thrown if the API call fails. - */ - public function getLocation(GetLocationRequest $request, array $callOptions = []): Location - { - return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * The async variant is {@see NetAppClient::listLocationsAsync()} . - * - * @example samples/V1/NetAppClient/list_locations.php - * - * @param ListLocationsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListLocations', $request, $callOptions); - } -} diff --git a/owl-bot-staging/NetApp/v1/src/V1/gapic_metadata.json b/owl-bot-staging/NetApp/v1/src/V1/gapic_metadata.json deleted file mode 100644 index 3e8c0b03c7b4..000000000000 --- a/owl-bot-staging/NetApp/v1/src/V1/gapic_metadata.json +++ /dev/null @@ -1,298 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.netapp.v1", - "libraryPackage": "Google\\Cloud\\NetApp\\V1", - "services": { - "NetApp": { - "clients": { - "grpc": { - "libraryClient": "NetAppGapicClient", - "rpcs": { - "CreateActiveDirectory": { - "methods": [ - "createActiveDirectory" - ] - }, - "CreateBackup": { - "methods": [ - "createBackup" - ] - }, - "CreateBackupPolicy": { - "methods": [ - "createBackupPolicy" - ] - }, - "CreateBackupVault": { - "methods": [ - "createBackupVault" - ] - }, - "CreateKmsConfig": { - "methods": [ - "createKmsConfig" - ] - }, - "CreateReplication": { - "methods": [ - "createReplication" - ] - }, - "CreateSnapshot": { - "methods": [ - "createSnapshot" - ] - }, - "CreateStoragePool": { - "methods": [ - "createStoragePool" - ] - }, - "CreateVolume": { - "methods": [ - "createVolume" - ] - }, - "DeleteActiveDirectory": { - "methods": [ - "deleteActiveDirectory" - ] - }, - "DeleteBackup": { - "methods": [ - "deleteBackup" - ] - }, - "DeleteBackupPolicy": { - "methods": [ - "deleteBackupPolicy" - ] - }, - "DeleteBackupVault": { - "methods": [ - "deleteBackupVault" - ] - }, - "DeleteKmsConfig": { - "methods": [ - "deleteKmsConfig" - ] - }, - "DeleteReplication": { - "methods": [ - "deleteReplication" - ] - }, - "DeleteSnapshot": { - "methods": [ - "deleteSnapshot" - ] - }, - "DeleteStoragePool": { - "methods": [ - "deleteStoragePool" - ] - }, - "DeleteVolume": { - "methods": [ - "deleteVolume" - ] - }, - "EncryptVolumes": { - "methods": [ - "encryptVolumes" - ] - }, - "EstablishPeering": { - "methods": [ - "establishPeering" - ] - }, - "GetActiveDirectory": { - "methods": [ - "getActiveDirectory" - ] - }, - "GetBackup": { - "methods": [ - "getBackup" - ] - }, - "GetBackupPolicy": { - "methods": [ - "getBackupPolicy" - ] - }, - "GetBackupVault": { - "methods": [ - "getBackupVault" - ] - }, - "GetKmsConfig": { - "methods": [ - "getKmsConfig" - ] - }, - "GetReplication": { - "methods": [ - "getReplication" - ] - }, - "GetSnapshot": { - "methods": [ - "getSnapshot" - ] - }, - "GetStoragePool": { - "methods": [ - "getStoragePool" - ] - }, - "GetVolume": { - "methods": [ - "getVolume" - ] - }, - "ListActiveDirectories": { - "methods": [ - "listActiveDirectories" - ] - }, - "ListBackupPolicies": { - "methods": [ - "listBackupPolicies" - ] - }, - "ListBackupVaults": { - "methods": [ - "listBackupVaults" - ] - }, - "ListBackups": { - "methods": [ - "listBackups" - ] - }, - "ListKmsConfigs": { - "methods": [ - "listKmsConfigs" - ] - }, - "ListReplications": { - "methods": [ - "listReplications" - ] - }, - "ListSnapshots": { - "methods": [ - "listSnapshots" - ] - }, - "ListStoragePools": { - "methods": [ - "listStoragePools" - ] - }, - "ListVolumes": { - "methods": [ - "listVolumes" - ] - }, - "ResumeReplication": { - "methods": [ - "resumeReplication" - ] - }, - "ReverseReplicationDirection": { - "methods": [ - "reverseReplicationDirection" - ] - }, - "RevertVolume": { - "methods": [ - "revertVolume" - ] - }, - "StopReplication": { - "methods": [ - "stopReplication" - ] - }, - "SwitchActiveReplicaZone": { - "methods": [ - "switchActiveReplicaZone" - ] - }, - "SyncReplication": { - "methods": [ - "syncReplication" - ] - }, - "UpdateActiveDirectory": { - "methods": [ - "updateActiveDirectory" - ] - }, - "UpdateBackup": { - "methods": [ - "updateBackup" - ] - }, - "UpdateBackupPolicy": { - "methods": [ - "updateBackupPolicy" - ] - }, - "UpdateBackupVault": { - "methods": [ - "updateBackupVault" - ] - }, - "UpdateKmsConfig": { - "methods": [ - "updateKmsConfig" - ] - }, - "UpdateReplication": { - "methods": [ - "updateReplication" - ] - }, - "UpdateSnapshot": { - "methods": [ - "updateSnapshot" - ] - }, - "UpdateStoragePool": { - "methods": [ - "updateStoragePool" - ] - }, - "UpdateVolume": { - "methods": [ - "updateVolume" - ] - }, - "VerifyKmsConfig": { - "methods": [ - "verifyKmsConfig" - ] - }, - "GetLocation": { - "methods": [ - "getLocation" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/NetApp/v1/src/V1/resources/net_app_client_config.json b/owl-bot-staging/NetApp/v1/src/V1/resources/net_app_client_config.json deleted file mode 100644 index 3e5b75036741..000000000000 --- a/owl-bot-staging/NetApp/v1/src/V1/resources/net_app_client_config.json +++ /dev/null @@ -1,324 +0,0 @@ -{ - "interfaces": { - "google.cloud.netapp.v1.NetApp": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE" - ], - "no_retry_1_codes": [] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "retry_policy_1_params": { - "initial_retry_delay_millis": 1000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 10000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - }, - "no_retry_1_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": { - "CreateActiveDirectory": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateBackup": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateBackupPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateBackupVault": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateKmsConfig": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateReplication": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateSnapshot": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateStoragePool": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateVolume": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteActiveDirectory": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteBackup": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteBackupPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteBackupVault": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteKmsConfig": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteReplication": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteSnapshot": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteStoragePool": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteVolume": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "EncryptVolumes": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "EstablishPeering": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetActiveDirectory": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetBackup": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetBackupPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetBackupVault": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetKmsConfig": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetReplication": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetSnapshot": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetStoragePool": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetVolume": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListActiveDirectories": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListBackupPolicies": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListBackupVaults": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListBackups": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListKmsConfigs": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListReplications": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListSnapshots": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListStoragePools": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListVolumes": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ResumeReplication": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ReverseReplicationDirection": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "RevertVolume": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "StopReplication": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "SwitchActiveReplicaZone": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "SyncReplication": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "UpdateActiveDirectory": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateBackup": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateBackupPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateBackupVault": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateKmsConfig": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateReplication": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateSnapshot": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateStoragePool": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateVolume": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "VerifyKmsConfig": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetLocation": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListLocations": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - } - } - } - } -} diff --git a/owl-bot-staging/NetApp/v1/src/V1/resources/net_app_descriptor_config.php b/owl-bot-staging/NetApp/v1/src/V1/resources/net_app_descriptor_config.php deleted file mode 100644 index f57b74f7d6d9..000000000000 --- a/owl-bot-staging/NetApp/v1/src/V1/resources/net_app_descriptor_config.php +++ /dev/null @@ -1,1049 +0,0 @@ - [ - 'google.cloud.netapp.v1.NetApp' => [ - 'CreateActiveDirectory' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\NetApp\V1\ActiveDirectory', - 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateBackup' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\NetApp\V1\Backup', - 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateBackupPolicy' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\NetApp\V1\BackupPolicy', - 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateBackupVault' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\NetApp\V1\BackupVault', - 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateKmsConfig' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\NetApp\V1\KmsConfig', - 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateReplication' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\NetApp\V1\Replication', - 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateSnapshot' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\NetApp\V1\Snapshot', - 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateStoragePool' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\NetApp\V1\StoragePool', - 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateVolume' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\NetApp\V1\Volume', - 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteActiveDirectory' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteBackup' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteBackupPolicy' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteBackupVault' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteKmsConfig' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteReplication' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteSnapshot' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteStoragePool' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteVolume' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'EncryptVolumes' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\NetApp\V1\KmsConfig', - 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'EstablishPeering' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\NetApp\V1\Replication', - 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ResumeReplication' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\NetApp\V1\Replication', - 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ReverseReplicationDirection' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\NetApp\V1\Replication', - 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'RevertVolume' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\NetApp\V1\Volume', - 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'StopReplication' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\NetApp\V1\Replication', - 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'SwitchActiveReplicaZone' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\NetApp\V1\StoragePool', - 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'SyncReplication' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\NetApp\V1\Replication', - 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateActiveDirectory' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\NetApp\V1\ActiveDirectory', - 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'active_directory.name', - 'fieldAccessors' => [ - 'getActiveDirectory', - 'getName', - ], - ], - ], - ], - 'UpdateBackup' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\NetApp\V1\Backup', - 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'backup.name', - 'fieldAccessors' => [ - 'getBackup', - 'getName', - ], - ], - ], - ], - 'UpdateBackupPolicy' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\NetApp\V1\BackupPolicy', - 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'backup_policy.name', - 'fieldAccessors' => [ - 'getBackupPolicy', - 'getName', - ], - ], - ], - ], - 'UpdateBackupVault' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\NetApp\V1\BackupVault', - 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'backup_vault.name', - 'fieldAccessors' => [ - 'getBackupVault', - 'getName', - ], - ], - ], - ], - 'UpdateKmsConfig' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\NetApp\V1\KmsConfig', - 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'kms_config.name', - 'fieldAccessors' => [ - 'getKmsConfig', - 'getName', - ], - ], - ], - ], - 'UpdateReplication' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\NetApp\V1\Replication', - 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'replication.name', - 'fieldAccessors' => [ - 'getReplication', - 'getName', - ], - ], - ], - ], - 'UpdateSnapshot' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\NetApp\V1\Snapshot', - 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'snapshot.name', - 'fieldAccessors' => [ - 'getSnapshot', - 'getName', - ], - ], - ], - ], - 'UpdateStoragePool' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\NetApp\V1\StoragePool', - 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'storage_pool.name', - 'fieldAccessors' => [ - 'getStoragePool', - 'getName', - ], - ], - ], - ], - 'UpdateVolume' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\NetApp\V1\Volume', - 'metadataReturnType' => '\Google\Cloud\NetApp\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'volume.name', - 'fieldAccessors' => [ - 'getVolume', - 'getName', - ], - ], - ], - ], - 'GetActiveDirectory' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\NetApp\V1\ActiveDirectory', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetBackup' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\NetApp\V1\Backup', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetBackupPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\NetApp\V1\BackupPolicy', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetBackupVault' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\NetApp\V1\BackupVault', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetKmsConfig' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\NetApp\V1\KmsConfig', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetReplication' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\NetApp\V1\Replication', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetSnapshot' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\NetApp\V1\Snapshot', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetStoragePool' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\NetApp\V1\StoragePool', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetVolume' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\NetApp\V1\Volume', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListActiveDirectories' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getActiveDirectories', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\NetApp\V1\ListActiveDirectoriesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListBackupPolicies' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getBackupPolicies', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\NetApp\V1\ListBackupPoliciesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListBackupVaults' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getBackupVaults', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\NetApp\V1\ListBackupVaultsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListBackups' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getBackups', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\NetApp\V1\ListBackupsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListKmsConfigs' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getKmsConfigs', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\NetApp\V1\ListKmsConfigsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListReplications' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getReplications', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\NetApp\V1\ListReplicationsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListSnapshots' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getSnapshots', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\NetApp\V1\ListSnapshotsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListStoragePools' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getStoragePools', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\NetApp\V1\ListStoragePoolsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListVolumes' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getVolumes', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\NetApp\V1\ListVolumesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'VerifyKmsConfig' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\NetApp\V1\VerifyKmsConfigResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetLocation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Location\Location', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'ListLocations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLocations', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'templateMap' => [ - 'activeDirectory' => 'projects/{project}/locations/{location}/activeDirectories/{active_directory}', - 'backup' => 'projects/{project}/locations/{location}/backupVaults/{backup_vault}/backups/{backup}', - 'backupPolicy' => 'projects/{project}/locations/{location}/backupPolicies/{backup_policy}', - 'backupVault' => 'projects/{project}/locations/{location}/backupVaults/{backup_vault}', - 'kmsConfig' => 'projects/{project}/locations/{location}/kmsConfigs/{kms_config}', - 'location' => 'projects/{project}/locations/{location}', - 'network' => 'projects/{project}/global/networks/{network}', - 'replication' => 'projects/{project}/locations/{location}/volumes/{volume}/replications/{replication}', - 'snapshot' => 'projects/{project}/locations/{location}/volumes/{volume}/snapshots/{snapshot}', - 'storagePool' => 'projects/{project}/locations/{location}/storagePools/{storage_pool}', - 'volume' => 'projects/{project}/locations/{location}/volumes/{volume}', - ], - ], - ], -]; diff --git a/owl-bot-staging/NetApp/v1/src/V1/resources/net_app_rest_client_config.php b/owl-bot-staging/NetApp/v1/src/V1/resources/net_app_rest_client_config.php deleted file mode 100644 index 05f75ec17cd5..000000000000 --- a/owl-bot-staging/NetApp/v1/src/V1/resources/net_app_rest_client_config.php +++ /dev/null @@ -1,784 +0,0 @@ - [ - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.cloud.netapp.v1.NetApp' => [ - 'CreateActiveDirectory' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/activeDirectories', - 'body' => 'active_directory', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'active_directory_id', - ], - ], - 'CreateBackup' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/backupVaults/*}/backups', - 'body' => 'backup', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'backup_id', - ], - ], - 'CreateBackupPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/backupPolicies', - 'body' => 'backup_policy', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'backup_policy_id', - ], - ], - 'CreateBackupVault' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/backupVaults', - 'body' => 'backup_vault', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'backup_vault_id', - ], - ], - 'CreateKmsConfig' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/kmsConfigs', - 'body' => 'kms_config', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'kms_config_id', - ], - ], - 'CreateReplication' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/volumes/*}/replications', - 'body' => 'replication', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'replication_id', - ], - ], - 'CreateSnapshot' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/volumes/*}/snapshots', - 'body' => 'snapshot', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'snapshot_id', - ], - ], - 'CreateStoragePool' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/storagePools', - 'body' => 'storage_pool', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'storage_pool_id', - ], - ], - 'CreateVolume' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/volumes', - 'body' => 'volume', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'volume_id', - ], - ], - 'DeleteActiveDirectory' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/activeDirectories/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteBackup' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/backupVaults/*/backups/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteBackupPolicy' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/backupPolicies/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteBackupVault' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/backupVaults/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteKmsConfig' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/kmsConfigs/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteReplication' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/volumes/*/replications/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteSnapshot' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/volumes/*/snapshots/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteStoragePool' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/storagePools/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteVolume' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/volumes/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'EncryptVolumes' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/kmsConfigs/*}:encrypt', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'EstablishPeering' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/volumes/*/replications/*}:establishPeering', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetActiveDirectory' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/activeDirectories/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetBackup' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/backupVaults/*/backups/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetBackupPolicy' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/backupPolicies/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetBackupVault' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/backupVaults/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetKmsConfig' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/kmsConfigs/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetReplication' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/volumes/*/replications/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetSnapshot' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/volumes/*/snapshots/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetStoragePool' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/storagePools/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetVolume' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/volumes/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListActiveDirectories' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/activeDirectories', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListBackupPolicies' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/backupPolicies', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListBackupVaults' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/backupVaults', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListBackups' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/backupVaults/*}/backups', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListKmsConfigs' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/kmsConfigs', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListReplications' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/volumes/*}/replications', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListSnapshots' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/volumes/*}/snapshots', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListStoragePools' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/storagePools', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListVolumes' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/volumes', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ResumeReplication' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/volumes/*/replications/*}:resume', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ReverseReplicationDirection' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/volumes/*/replications/*}:reverseDirection', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'RevertVolume' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/volumes/*}:revert', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'StopReplication' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/volumes/*/replications/*}:stop', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'SwitchActiveReplicaZone' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/storagePools/*}:switch', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'SyncReplication' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/volumes/*/replications/*}:sync', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'UpdateActiveDirectory' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{active_directory.name=projects/*/locations/*/activeDirectories/*}', - 'body' => 'active_directory', - 'placeholders' => [ - 'active_directory.name' => [ - 'getters' => [ - 'getActiveDirectory', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdateBackup' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{backup.name=projects/*/locations/*/backupVaults/*/backups/*}', - 'body' => 'backup', - 'placeholders' => [ - 'backup.name' => [ - 'getters' => [ - 'getBackup', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdateBackupPolicy' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{backup_policy.name=projects/*/locations/*/backupPolicies/*}', - 'body' => 'backup_policy', - 'placeholders' => [ - 'backup_policy.name' => [ - 'getters' => [ - 'getBackupPolicy', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdateBackupVault' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{backup_vault.name=projects/*/locations/*/backupVaults/*}', - 'body' => 'backup_vault', - 'placeholders' => [ - 'backup_vault.name' => [ - 'getters' => [ - 'getBackupVault', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdateKmsConfig' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{kms_config.name=projects/*/locations/*/kmsConfigs/*}', - 'body' => 'kms_config', - 'placeholders' => [ - 'kms_config.name' => [ - 'getters' => [ - 'getKmsConfig', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdateReplication' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{replication.name=projects/*/locations/*/volumes/*/replications/*}', - 'body' => 'replication', - 'placeholders' => [ - 'replication.name' => [ - 'getters' => [ - 'getReplication', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdateSnapshot' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{snapshot.name=projects/*/locations/*/volumes/*/snapshots/*}', - 'body' => 'snapshot', - 'placeholders' => [ - 'snapshot.name' => [ - 'getters' => [ - 'getSnapshot', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdateStoragePool' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{storage_pool.name=projects/*/locations/*/storagePools/*}', - 'body' => 'storage_pool', - 'placeholders' => [ - 'storage_pool.name' => [ - 'getters' => [ - 'getStoragePool', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdateVolume' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{volume.name=projects/*/locations/*/volumes/*}', - 'body' => 'volume', - 'placeholders' => [ - 'volume.name' => [ - 'getters' => [ - 'getVolume', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'VerifyKmsConfig' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/kmsConfigs/*}:verify', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/NetApp/v1/tests/Unit/V1/Client/NetAppClientTest.php b/owl-bot-staging/NetApp/v1/tests/Unit/V1/Client/NetAppClientTest.php deleted file mode 100644 index 3f2bd4899e0d..000000000000 --- a/owl-bot-staging/NetApp/v1/tests/Unit/V1/Client/NetAppClientTest.php +++ /dev/null @@ -1,6873 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return NetAppClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new NetAppClient($options); - } - - /** @test */ - public function createActiveDirectoryTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createActiveDirectoryTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $domain = 'domain-1326197564'; - $site = 'site3530567'; - $dns = 'dns99625'; - $netBiosPrefix = 'netBiosPrefix865554756'; - $organizationalUnit = 'organizationalUnit-694432635'; - $aesEncryption = false; - $username = 'username-265713450'; - $password = 'password1216985755'; - $kdcHostname = 'kdcHostname-863813976'; - $kdcIp = 'kdcIp-1136252068'; - $nfsUsersWithLdap = false; - $description = 'description-1724546052'; - $ldapSigning = false; - $encryptDcConnections = false; - $stateDetails = 'stateDetails632437908'; - $expectedResponse = new ActiveDirectory(); - $expectedResponse->setName($name); - $expectedResponse->setDomain($domain); - $expectedResponse->setSite($site); - $expectedResponse->setDns($dns); - $expectedResponse->setNetBiosPrefix($netBiosPrefix); - $expectedResponse->setOrganizationalUnit($organizationalUnit); - $expectedResponse->setAesEncryption($aesEncryption); - $expectedResponse->setUsername($username); - $expectedResponse->setPassword($password); - $expectedResponse->setKdcHostname($kdcHostname); - $expectedResponse->setKdcIp($kdcIp); - $expectedResponse->setNfsUsersWithLdap($nfsUsersWithLdap); - $expectedResponse->setDescription($description); - $expectedResponse->setLdapSigning($ldapSigning); - $expectedResponse->setEncryptDcConnections($encryptDcConnections); - $expectedResponse->setStateDetails($stateDetails); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createActiveDirectoryTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $activeDirectory = new ActiveDirectory(); - $activeDirectoryDomain = 'activeDirectoryDomain1710368171'; - $activeDirectory->setDomain($activeDirectoryDomain); - $activeDirectoryDns = 'activeDirectoryDns1090270626'; - $activeDirectory->setDns($activeDirectoryDns); - $activeDirectoryNetBiosPrefix = 'activeDirectoryNetBiosPrefix-1870358125'; - $activeDirectory->setNetBiosPrefix($activeDirectoryNetBiosPrefix); - $activeDirectoryUsername = 'activeDirectoryUsername1591163901'; - $activeDirectory->setUsername($activeDirectoryUsername); - $activeDirectoryPassword = 'activeDirectoryPassword-1221104190'; - $activeDirectory->setPassword($activeDirectoryPassword); - $activeDirectoryId = 'activeDirectoryId1363092678'; - $request = (new CreateActiveDirectoryRequest()) - ->setParent($formattedParent) - ->setActiveDirectory($activeDirectory) - ->setActiveDirectoryId($activeDirectoryId); - $response = $gapicClient->createActiveDirectory($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.netapp.v1.NetApp/CreateActiveDirectory', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getActiveDirectory(); - $this->assertProtobufEquals($activeDirectory, $actualValue); - $actualValue = $actualApiRequestObject->getActiveDirectoryId(); - $this->assertProtobufEquals($activeDirectoryId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createActiveDirectoryTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createActiveDirectoryExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createActiveDirectoryTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $activeDirectory = new ActiveDirectory(); - $activeDirectoryDomain = 'activeDirectoryDomain1710368171'; - $activeDirectory->setDomain($activeDirectoryDomain); - $activeDirectoryDns = 'activeDirectoryDns1090270626'; - $activeDirectory->setDns($activeDirectoryDns); - $activeDirectoryNetBiosPrefix = 'activeDirectoryNetBiosPrefix-1870358125'; - $activeDirectory->setNetBiosPrefix($activeDirectoryNetBiosPrefix); - $activeDirectoryUsername = 'activeDirectoryUsername1591163901'; - $activeDirectory->setUsername($activeDirectoryUsername); - $activeDirectoryPassword = 'activeDirectoryPassword-1221104190'; - $activeDirectory->setPassword($activeDirectoryPassword); - $activeDirectoryId = 'activeDirectoryId1363092678'; - $request = (new CreateActiveDirectoryRequest()) - ->setParent($formattedParent) - ->setActiveDirectory($activeDirectory) - ->setActiveDirectoryId($activeDirectoryId); - $response = $gapicClient->createActiveDirectory($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createActiveDirectoryTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createBackupTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createBackupTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $volumeUsageBytes = 962433704; - $sourceVolume = 'sourceVolume327497662'; - $sourceSnapshot = 'sourceSnapshot-947679896'; - $chainStorageBytes = 1614651561; - $expectedResponse = new Backup(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setVolumeUsageBytes($volumeUsageBytes); - $expectedResponse->setSourceVolume($sourceVolume); - $expectedResponse->setSourceSnapshot($sourceSnapshot); - $expectedResponse->setChainStorageBytes($chainStorageBytes); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createBackupTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->backupVaultName('[PROJECT]', '[LOCATION]', '[BACKUP_VAULT]'); - $backupId = 'backupId1355353272'; - $backup = new Backup(); - $request = (new CreateBackupRequest()) - ->setParent($formattedParent) - ->setBackupId($backupId) - ->setBackup($backup); - $response = $gapicClient->createBackup($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.netapp.v1.NetApp/CreateBackup', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getBackupId(); - $this->assertProtobufEquals($backupId, $actualValue); - $actualValue = $actualApiRequestObject->getBackup(); - $this->assertProtobufEquals($backup, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createBackupTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createBackupExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createBackupTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->backupVaultName('[PROJECT]', '[LOCATION]', '[BACKUP_VAULT]'); - $backupId = 'backupId1355353272'; - $backup = new Backup(); - $request = (new CreateBackupRequest()) - ->setParent($formattedParent) - ->setBackupId($backupId) - ->setBackup($backup); - $response = $gapicClient->createBackup($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createBackupTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createBackupPolicyTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createBackupPolicyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $dailyBackupLimit = 532629348; - $weeklyBackupLimit = 2075144708; - $monthlyBackupLimit = 1253809680; - $description = 'description-1724546052'; - $enabled = false; - $assignedVolumeCount = 396892795; - $expectedResponse = new BackupPolicy(); - $expectedResponse->setName($name); - $expectedResponse->setDailyBackupLimit($dailyBackupLimit); - $expectedResponse->setWeeklyBackupLimit($weeklyBackupLimit); - $expectedResponse->setMonthlyBackupLimit($monthlyBackupLimit); - $expectedResponse->setDescription($description); - $expectedResponse->setEnabled($enabled); - $expectedResponse->setAssignedVolumeCount($assignedVolumeCount); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createBackupPolicyTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $backupPolicy = new BackupPolicy(); - $backupPolicyId = 'backupPolicyId-1316025077'; - $request = (new CreateBackupPolicyRequest()) - ->setParent($formattedParent) - ->setBackupPolicy($backupPolicy) - ->setBackupPolicyId($backupPolicyId); - $response = $gapicClient->createBackupPolicy($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.netapp.v1.NetApp/CreateBackupPolicy', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getBackupPolicy(); - $this->assertProtobufEquals($backupPolicy, $actualValue); - $actualValue = $actualApiRequestObject->getBackupPolicyId(); - $this->assertProtobufEquals($backupPolicyId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createBackupPolicyTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createBackupPolicyExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createBackupPolicyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $backupPolicy = new BackupPolicy(); - $backupPolicyId = 'backupPolicyId-1316025077'; - $request = (new CreateBackupPolicyRequest()) - ->setParent($formattedParent) - ->setBackupPolicy($backupPolicy) - ->setBackupPolicyId($backupPolicyId); - $response = $gapicClient->createBackupPolicy($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createBackupPolicyTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createBackupVaultTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createBackupVaultTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $expectedResponse = new BackupVault(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createBackupVaultTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $backupVaultId = 'backupVaultId467030053'; - $backupVault = new BackupVault(); - $request = (new CreateBackupVaultRequest()) - ->setParent($formattedParent) - ->setBackupVaultId($backupVaultId) - ->setBackupVault($backupVault); - $response = $gapicClient->createBackupVault($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.netapp.v1.NetApp/CreateBackupVault', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getBackupVaultId(); - $this->assertProtobufEquals($backupVaultId, $actualValue); - $actualValue = $actualApiRequestObject->getBackupVault(); - $this->assertProtobufEquals($backupVault, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createBackupVaultTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createBackupVaultExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createBackupVaultTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $backupVaultId = 'backupVaultId467030053'; - $backupVault = new BackupVault(); - $request = (new CreateBackupVaultRequest()) - ->setParent($formattedParent) - ->setBackupVaultId($backupVaultId) - ->setBackupVault($backupVault); - $response = $gapicClient->createBackupVault($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createBackupVaultTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createKmsConfigTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createKmsConfigTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $cryptoKeyName = 'cryptoKeyName-184663511'; - $stateDetails = 'stateDetails632437908'; - $description = 'description-1724546052'; - $instructions = 'instructions757376421'; - $serviceAccount = 'serviceAccount-1948028253'; - $expectedResponse = new KmsConfig(); - $expectedResponse->setName($name); - $expectedResponse->setCryptoKeyName($cryptoKeyName); - $expectedResponse->setStateDetails($stateDetails); - $expectedResponse->setDescription($description); - $expectedResponse->setInstructions($instructions); - $expectedResponse->setServiceAccount($serviceAccount); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createKmsConfigTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $kmsConfigId = 'kmsConfigId1366390730'; - $kmsConfig = new KmsConfig(); - $kmsConfigCryptoKeyName = 'kmsConfigCryptoKeyName2110252630'; - $kmsConfig->setCryptoKeyName($kmsConfigCryptoKeyName); - $request = (new CreateKmsConfigRequest()) - ->setParent($formattedParent) - ->setKmsConfigId($kmsConfigId) - ->setKmsConfig($kmsConfig); - $response = $gapicClient->createKmsConfig($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.netapp.v1.NetApp/CreateKmsConfig', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getKmsConfigId(); - $this->assertProtobufEquals($kmsConfigId, $actualValue); - $actualValue = $actualApiRequestObject->getKmsConfig(); - $this->assertProtobufEquals($kmsConfig, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createKmsConfigTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createKmsConfigExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createKmsConfigTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $kmsConfigId = 'kmsConfigId1366390730'; - $kmsConfig = new KmsConfig(); - $kmsConfigCryptoKeyName = 'kmsConfigCryptoKeyName2110252630'; - $kmsConfig->setCryptoKeyName($kmsConfigCryptoKeyName); - $request = (new CreateKmsConfigRequest()) - ->setParent($formattedParent) - ->setKmsConfigId($kmsConfigId) - ->setKmsConfig($kmsConfig); - $response = $gapicClient->createKmsConfig($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createKmsConfigTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createReplicationTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createReplicationTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $stateDetails = 'stateDetails632437908'; - $healthy = false; - $destinationVolume = 'destinationVolume-1177512853'; - $description = 'description-1724546052'; - $sourceVolume = 'sourceVolume327497662'; - $clusterLocation = 'clusterLocation-44738470'; - $expectedResponse = new Replication(); - $expectedResponse->setName($name); - $expectedResponse->setStateDetails($stateDetails); - $expectedResponse->setHealthy($healthy); - $expectedResponse->setDestinationVolume($destinationVolume); - $expectedResponse->setDescription($description); - $expectedResponse->setSourceVolume($sourceVolume); - $expectedResponse->setClusterLocation($clusterLocation); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createReplicationTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); - $replication = new Replication(); - $replicationReplicationSchedule = ReplicationSchedule::REPLICATION_SCHEDULE_UNSPECIFIED; - $replication->setReplicationSchedule($replicationReplicationSchedule); - $replicationDestinationVolumeParameters = new DestinationVolumeParameters(); - $destinationVolumeParametersStoragePool = $gapicClient->storagePoolName('[PROJECT]', '[LOCATION]', '[STORAGE_POOL]'); - $replicationDestinationVolumeParameters->setStoragePool($destinationVolumeParametersStoragePool); - $replication->setDestinationVolumeParameters($replicationDestinationVolumeParameters); - $replicationId = 'replicationId1935722094'; - $request = (new CreateReplicationRequest()) - ->setParent($formattedParent) - ->setReplication($replication) - ->setReplicationId($replicationId); - $response = $gapicClient->createReplication($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.netapp.v1.NetApp/CreateReplication', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getReplication(); - $this->assertProtobufEquals($replication, $actualValue); - $actualValue = $actualApiRequestObject->getReplicationId(); - $this->assertProtobufEquals($replicationId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createReplicationTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createReplicationExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createReplicationTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); - $replication = new Replication(); - $replicationReplicationSchedule = ReplicationSchedule::REPLICATION_SCHEDULE_UNSPECIFIED; - $replication->setReplicationSchedule($replicationReplicationSchedule); - $replicationDestinationVolumeParameters = new DestinationVolumeParameters(); - $destinationVolumeParametersStoragePool = $gapicClient->storagePoolName('[PROJECT]', '[LOCATION]', '[STORAGE_POOL]'); - $replicationDestinationVolumeParameters->setStoragePool($destinationVolumeParametersStoragePool); - $replication->setDestinationVolumeParameters($replicationDestinationVolumeParameters); - $replicationId = 'replicationId1935722094'; - $request = (new CreateReplicationRequest()) - ->setParent($formattedParent) - ->setReplication($replication) - ->setReplicationId($replicationId); - $response = $gapicClient->createReplication($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createReplicationTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createSnapshotTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createSnapshotTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $stateDetails = 'stateDetails632437908'; - $description = 'description-1724546052'; - $usedBytes = -1.91584322E8; - $expectedResponse = new Snapshot(); - $expectedResponse->setName($name); - $expectedResponse->setStateDetails($stateDetails); - $expectedResponse->setDescription($description); - $expectedResponse->setUsedBytes($usedBytes); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createSnapshotTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); - $snapshot = new Snapshot(); - $snapshotId = 'snapshotId-168585866'; - $request = (new CreateSnapshotRequest()) - ->setParent($formattedParent) - ->setSnapshot($snapshot) - ->setSnapshotId($snapshotId); - $response = $gapicClient->createSnapshot($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.netapp.v1.NetApp/CreateSnapshot', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getSnapshot(); - $this->assertProtobufEquals($snapshot, $actualValue); - $actualValue = $actualApiRequestObject->getSnapshotId(); - $this->assertProtobufEquals($snapshotId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createSnapshotTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createSnapshotExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createSnapshotTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); - $snapshot = new Snapshot(); - $snapshotId = 'snapshotId-168585866'; - $request = (new CreateSnapshotRequest()) - ->setParent($formattedParent) - ->setSnapshot($snapshot) - ->setSnapshotId($snapshotId); - $response = $gapicClient->createSnapshot($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createSnapshotTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createStoragePoolTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createStoragePoolTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $capacityGib = 498394811; - $volumeCapacityGib = 643777472; - $volumeCount = 1362665558; - $stateDetails = 'stateDetails632437908'; - $description = 'description-1724546052'; - $network = 'network1843485230'; - $activeDirectory = 'activeDirectory475662452'; - $kmsConfig = 'kmsConfig917255152'; - $ldapEnabled = false; - $psaRange = 'psaRange1004849276'; - $globalAccessAllowed = false; - $allowAutoTiering = true; - $replicaZone = 'replicaZone1404354259'; - $zone = 'zone3744684'; - $expectedResponse = new StoragePool(); - $expectedResponse->setName($name); - $expectedResponse->setCapacityGib($capacityGib); - $expectedResponse->setVolumeCapacityGib($volumeCapacityGib); - $expectedResponse->setVolumeCount($volumeCount); - $expectedResponse->setStateDetails($stateDetails); - $expectedResponse->setDescription($description); - $expectedResponse->setNetwork($network); - $expectedResponse->setActiveDirectory($activeDirectory); - $expectedResponse->setKmsConfig($kmsConfig); - $expectedResponse->setLdapEnabled($ldapEnabled); - $expectedResponse->setPsaRange($psaRange); - $expectedResponse->setGlobalAccessAllowed($globalAccessAllowed); - $expectedResponse->setAllowAutoTiering($allowAutoTiering); - $expectedResponse->setReplicaZone($replicaZone); - $expectedResponse->setZone($zone); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createStoragePoolTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $storagePoolId = 'storagePoolId909234778'; - $storagePool = new StoragePool(); - $storagePoolServiceLevel = ServiceLevel::SERVICE_LEVEL_UNSPECIFIED; - $storagePool->setServiceLevel($storagePoolServiceLevel); - $storagePoolCapacityGib = 1260910865; - $storagePool->setCapacityGib($storagePoolCapacityGib); - $storagePoolNetwork = $gapicClient->networkName('[PROJECT]', '[NETWORK]'); - $storagePool->setNetwork($storagePoolNetwork); - $request = (new CreateStoragePoolRequest()) - ->setParent($formattedParent) - ->setStoragePoolId($storagePoolId) - ->setStoragePool($storagePool); - $response = $gapicClient->createStoragePool($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.netapp.v1.NetApp/CreateStoragePool', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getStoragePoolId(); - $this->assertProtobufEquals($storagePoolId, $actualValue); - $actualValue = $actualApiRequestObject->getStoragePool(); - $this->assertProtobufEquals($storagePool, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createStoragePoolTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createStoragePoolExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createStoragePoolTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $storagePoolId = 'storagePoolId909234778'; - $storagePool = new StoragePool(); - $storagePoolServiceLevel = ServiceLevel::SERVICE_LEVEL_UNSPECIFIED; - $storagePool->setServiceLevel($storagePoolServiceLevel); - $storagePoolCapacityGib = 1260910865; - $storagePool->setCapacityGib($storagePoolCapacityGib); - $storagePoolNetwork = $gapicClient->networkName('[PROJECT]', '[NETWORK]'); - $storagePool->setNetwork($storagePoolNetwork); - $request = (new CreateStoragePoolRequest()) - ->setParent($formattedParent) - ->setStoragePoolId($storagePoolId) - ->setStoragePool($storagePool); - $response = $gapicClient->createStoragePool($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createStoragePoolTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createVolumeTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createVolumeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $stateDetails = 'stateDetails632437908'; - $shareName = 'shareName-1788152085'; - $psaRange = 'psaRange1004849276'; - $storagePool = 'storagePool897344352'; - $network = 'network1843485230'; - $capacityGib = 498394811; - $unixPermissions = 'unixPermissions1137975373'; - $description = 'description-1724546052'; - $snapReserve = -1.42958764E8; - $snapshotDirectory = true; - $usedGib = 279083970; - $kerberosEnabled = false; - $ldapEnabled = false; - $activeDirectory = 'activeDirectory475662452'; - $kmsConfig = 'kmsConfig917255152'; - $hasReplication = false; - $largeCapacity = true; - $multipleEndpoints = false; - $replicaZone = 'replicaZone1404354259'; - $zone = 'zone3744684'; - $coldTierSizeGib = 212809252; - $expectedResponse = new Volume(); - $expectedResponse->setName($name); - $expectedResponse->setStateDetails($stateDetails); - $expectedResponse->setShareName($shareName); - $expectedResponse->setPsaRange($psaRange); - $expectedResponse->setStoragePool($storagePool); - $expectedResponse->setNetwork($network); - $expectedResponse->setCapacityGib($capacityGib); - $expectedResponse->setUnixPermissions($unixPermissions); - $expectedResponse->setDescription($description); - $expectedResponse->setSnapReserve($snapReserve); - $expectedResponse->setSnapshotDirectory($snapshotDirectory); - $expectedResponse->setUsedGib($usedGib); - $expectedResponse->setKerberosEnabled($kerberosEnabled); - $expectedResponse->setLdapEnabled($ldapEnabled); - $expectedResponse->setActiveDirectory($activeDirectory); - $expectedResponse->setKmsConfig($kmsConfig); - $expectedResponse->setHasReplication($hasReplication); - $expectedResponse->setLargeCapacity($largeCapacity); - $expectedResponse->setMultipleEndpoints($multipleEndpoints); - $expectedResponse->setReplicaZone($replicaZone); - $expectedResponse->setZone($zone); - $expectedResponse->setColdTierSizeGib($coldTierSizeGib); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createVolumeTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $volumeId = 'volumeId-2128282528'; - $volume = new Volume(); - $volumeShareName = 'volumeShareName1564593424'; - $volume->setShareName($volumeShareName); - $volumeStoragePool = $gapicClient->storagePoolName('[PROJECT]', '[LOCATION]', '[STORAGE_POOL]'); - $volume->setStoragePool($volumeStoragePool); - $volumeCapacityGib = 1491387092; - $volume->setCapacityGib($volumeCapacityGib); - $volumeProtocols = []; - $volume->setProtocols($volumeProtocols); - $request = (new CreateVolumeRequest()) - ->setParent($formattedParent) - ->setVolumeId($volumeId) - ->setVolume($volume); - $response = $gapicClient->createVolume($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.netapp.v1.NetApp/CreateVolume', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getVolumeId(); - $this->assertProtobufEquals($volumeId, $actualValue); - $actualValue = $actualApiRequestObject->getVolume(); - $this->assertProtobufEquals($volume, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createVolumeTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createVolumeExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createVolumeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $volumeId = 'volumeId-2128282528'; - $volume = new Volume(); - $volumeShareName = 'volumeShareName1564593424'; - $volume->setShareName($volumeShareName); - $volumeStoragePool = $gapicClient->storagePoolName('[PROJECT]', '[LOCATION]', '[STORAGE_POOL]'); - $volume->setStoragePool($volumeStoragePool); - $volumeCapacityGib = 1491387092; - $volume->setCapacityGib($volumeCapacityGib); - $volumeProtocols = []; - $volume->setProtocols($volumeProtocols); - $request = (new CreateVolumeRequest()) - ->setParent($formattedParent) - ->setVolumeId($volumeId) - ->setVolume($volume); - $response = $gapicClient->createVolume($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createVolumeTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteActiveDirectoryTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteActiveDirectoryTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteActiveDirectoryTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->activeDirectoryName('[PROJECT]', '[LOCATION]', '[ACTIVE_DIRECTORY]'); - $request = (new DeleteActiveDirectoryRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteActiveDirectory($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.netapp.v1.NetApp/DeleteActiveDirectory', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteActiveDirectoryTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteActiveDirectoryExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteActiveDirectoryTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->activeDirectoryName('[PROJECT]', '[LOCATION]', '[ACTIVE_DIRECTORY]'); - $request = (new DeleteActiveDirectoryRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteActiveDirectory($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteActiveDirectoryTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteBackupTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteBackupTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteBackupTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP_VAULT]', '[BACKUP]'); - $request = (new DeleteBackupRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteBackup($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.netapp.v1.NetApp/DeleteBackup', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteBackupTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteBackupExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteBackupTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP_VAULT]', '[BACKUP]'); - $request = (new DeleteBackupRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteBackup($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteBackupTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteBackupPolicyTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteBackupPolicyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteBackupPolicyTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->backupPolicyName('[PROJECT]', '[LOCATION]', '[BACKUP_POLICY]'); - $request = (new DeleteBackupPolicyRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteBackupPolicy($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.netapp.v1.NetApp/DeleteBackupPolicy', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteBackupPolicyTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteBackupPolicyExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteBackupPolicyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->backupPolicyName('[PROJECT]', '[LOCATION]', '[BACKUP_POLICY]'); - $request = (new DeleteBackupPolicyRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteBackupPolicy($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteBackupPolicyTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteBackupVaultTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteBackupVaultTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteBackupVaultTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->backupVaultName('[PROJECT]', '[LOCATION]', '[BACKUP_VAULT]'); - $request = (new DeleteBackupVaultRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteBackupVault($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.netapp.v1.NetApp/DeleteBackupVault', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteBackupVaultTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteBackupVaultExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteBackupVaultTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->backupVaultName('[PROJECT]', '[LOCATION]', '[BACKUP_VAULT]'); - $request = (new DeleteBackupVaultRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteBackupVault($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteBackupVaultTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteKmsConfigTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteKmsConfigTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteKmsConfigTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->kmsConfigName('[PROJECT]', '[LOCATION]', '[KMS_CONFIG]'); - $request = (new DeleteKmsConfigRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteKmsConfig($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.netapp.v1.NetApp/DeleteKmsConfig', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteKmsConfigTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteKmsConfigExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteKmsConfigTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->kmsConfigName('[PROJECT]', '[LOCATION]', '[KMS_CONFIG]'); - $request = (new DeleteKmsConfigRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteKmsConfig($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteKmsConfigTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteReplicationTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteReplicationTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteReplicationTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->replicationName('[PROJECT]', '[LOCATION]', '[VOLUME]', '[REPLICATION]'); - $request = (new DeleteReplicationRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteReplication($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.netapp.v1.NetApp/DeleteReplication', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteReplicationTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteReplicationExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteReplicationTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->replicationName('[PROJECT]', '[LOCATION]', '[VOLUME]', '[REPLICATION]'); - $request = (new DeleteReplicationRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteReplication($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteReplicationTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteSnapshotTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteSnapshotTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteSnapshotTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->snapshotName('[PROJECT]', '[LOCATION]', '[VOLUME]', '[SNAPSHOT]'); - $request = (new DeleteSnapshotRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteSnapshot($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.netapp.v1.NetApp/DeleteSnapshot', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteSnapshotTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteSnapshotExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteSnapshotTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->snapshotName('[PROJECT]', '[LOCATION]', '[VOLUME]', '[SNAPSHOT]'); - $request = (new DeleteSnapshotRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteSnapshot($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteSnapshotTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteStoragePoolTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteStoragePoolTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteStoragePoolTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->storagePoolName('[PROJECT]', '[LOCATION]', '[STORAGE_POOL]'); - $request = (new DeleteStoragePoolRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteStoragePool($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.netapp.v1.NetApp/DeleteStoragePool', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteStoragePoolTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteStoragePoolExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteStoragePoolTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->storagePoolName('[PROJECT]', '[LOCATION]', '[STORAGE_POOL]'); - $request = (new DeleteStoragePoolRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteStoragePool($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteStoragePoolTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteVolumeTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteVolumeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteVolumeTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); - $request = (new DeleteVolumeRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteVolume($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.netapp.v1.NetApp/DeleteVolume', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteVolumeTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteVolumeExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteVolumeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); - $request = (new DeleteVolumeRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteVolume($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteVolumeTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function encryptVolumesTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/encryptVolumesTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $cryptoKeyName = 'cryptoKeyName-184663511'; - $stateDetails = 'stateDetails632437908'; - $description = 'description-1724546052'; - $instructions = 'instructions757376421'; - $serviceAccount = 'serviceAccount-1948028253'; - $expectedResponse = new KmsConfig(); - $expectedResponse->setName($name2); - $expectedResponse->setCryptoKeyName($cryptoKeyName); - $expectedResponse->setStateDetails($stateDetails); - $expectedResponse->setDescription($description); - $expectedResponse->setInstructions($instructions); - $expectedResponse->setServiceAccount($serviceAccount); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/encryptVolumesTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->kmsConfigName('[PROJECT]', '[LOCATION]', '[KMS_CONFIG]'); - $request = (new EncryptVolumesRequest()) - ->setName($formattedName); - $response = $gapicClient->encryptVolumes($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.netapp.v1.NetApp/EncryptVolumes', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/encryptVolumesTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function encryptVolumesExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/encryptVolumesTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->kmsConfigName('[PROJECT]', '[LOCATION]', '[KMS_CONFIG]'); - $request = (new EncryptVolumesRequest()) - ->setName($formattedName); - $response = $gapicClient->encryptVolumes($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/encryptVolumesTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function establishPeeringTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/establishPeeringTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $stateDetails = 'stateDetails632437908'; - $healthy = false; - $destinationVolume = 'destinationVolume-1177512853'; - $description = 'description-1724546052'; - $sourceVolume = 'sourceVolume327497662'; - $clusterLocation = 'clusterLocation-44738470'; - $expectedResponse = new Replication(); - $expectedResponse->setName($name2); - $expectedResponse->setStateDetails($stateDetails); - $expectedResponse->setHealthy($healthy); - $expectedResponse->setDestinationVolume($destinationVolume); - $expectedResponse->setDescription($description); - $expectedResponse->setSourceVolume($sourceVolume); - $expectedResponse->setClusterLocation($clusterLocation); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/establishPeeringTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->replicationName('[PROJECT]', '[LOCATION]', '[VOLUME]', '[REPLICATION]'); - $peerClusterName = 'peerClusterName-1759308435'; - $peerSvmName = 'peerSvmName-1166928515'; - $peerVolumeName = 'peerVolumeName486635827'; - $request = (new EstablishPeeringRequest()) - ->setName($formattedName) - ->setPeerClusterName($peerClusterName) - ->setPeerSvmName($peerSvmName) - ->setPeerVolumeName($peerVolumeName); - $response = $gapicClient->establishPeering($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.netapp.v1.NetApp/EstablishPeering', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualApiRequestObject->getPeerClusterName(); - $this->assertProtobufEquals($peerClusterName, $actualValue); - $actualValue = $actualApiRequestObject->getPeerSvmName(); - $this->assertProtobufEquals($peerSvmName, $actualValue); - $actualValue = $actualApiRequestObject->getPeerVolumeName(); - $this->assertProtobufEquals($peerVolumeName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/establishPeeringTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function establishPeeringExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/establishPeeringTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->replicationName('[PROJECT]', '[LOCATION]', '[VOLUME]', '[REPLICATION]'); - $peerClusterName = 'peerClusterName-1759308435'; - $peerSvmName = 'peerSvmName-1166928515'; - $peerVolumeName = 'peerVolumeName486635827'; - $request = (new EstablishPeeringRequest()) - ->setName($formattedName) - ->setPeerClusterName($peerClusterName) - ->setPeerSvmName($peerSvmName) - ->setPeerVolumeName($peerVolumeName); - $response = $gapicClient->establishPeering($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/establishPeeringTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getActiveDirectoryTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $domain = 'domain-1326197564'; - $site = 'site3530567'; - $dns = 'dns99625'; - $netBiosPrefix = 'netBiosPrefix865554756'; - $organizationalUnit = 'organizationalUnit-694432635'; - $aesEncryption = false; - $username = 'username-265713450'; - $password = 'password1216985755'; - $kdcHostname = 'kdcHostname-863813976'; - $kdcIp = 'kdcIp-1136252068'; - $nfsUsersWithLdap = false; - $description = 'description-1724546052'; - $ldapSigning = false; - $encryptDcConnections = false; - $stateDetails = 'stateDetails632437908'; - $expectedResponse = new ActiveDirectory(); - $expectedResponse->setName($name2); - $expectedResponse->setDomain($domain); - $expectedResponse->setSite($site); - $expectedResponse->setDns($dns); - $expectedResponse->setNetBiosPrefix($netBiosPrefix); - $expectedResponse->setOrganizationalUnit($organizationalUnit); - $expectedResponse->setAesEncryption($aesEncryption); - $expectedResponse->setUsername($username); - $expectedResponse->setPassword($password); - $expectedResponse->setKdcHostname($kdcHostname); - $expectedResponse->setKdcIp($kdcIp); - $expectedResponse->setNfsUsersWithLdap($nfsUsersWithLdap); - $expectedResponse->setDescription($description); - $expectedResponse->setLdapSigning($ldapSigning); - $expectedResponse->setEncryptDcConnections($encryptDcConnections); - $expectedResponse->setStateDetails($stateDetails); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->activeDirectoryName('[PROJECT]', '[LOCATION]', '[ACTIVE_DIRECTORY]'); - $request = (new GetActiveDirectoryRequest()) - ->setName($formattedName); - $response = $gapicClient->getActiveDirectory($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.netapp.v1.NetApp/GetActiveDirectory', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getActiveDirectoryExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->activeDirectoryName('[PROJECT]', '[LOCATION]', '[ACTIVE_DIRECTORY]'); - $request = (new GetActiveDirectoryRequest()) - ->setName($formattedName); - try { - $gapicClient->getActiveDirectory($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getBackupTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $volumeUsageBytes = 962433704; - $sourceVolume = 'sourceVolume327497662'; - $sourceSnapshot = 'sourceSnapshot-947679896'; - $chainStorageBytes = 1614651561; - $expectedResponse = new Backup(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setVolumeUsageBytes($volumeUsageBytes); - $expectedResponse->setSourceVolume($sourceVolume); - $expectedResponse->setSourceSnapshot($sourceSnapshot); - $expectedResponse->setChainStorageBytes($chainStorageBytes); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP_VAULT]', '[BACKUP]'); - $request = (new GetBackupRequest()) - ->setName($formattedName); - $response = $gapicClient->getBackup($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.netapp.v1.NetApp/GetBackup', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getBackupExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP_VAULT]', '[BACKUP]'); - $request = (new GetBackupRequest()) - ->setName($formattedName); - try { - $gapicClient->getBackup($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getBackupPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $dailyBackupLimit = 532629348; - $weeklyBackupLimit = 2075144708; - $monthlyBackupLimit = 1253809680; - $description = 'description-1724546052'; - $enabled = false; - $assignedVolumeCount = 396892795; - $expectedResponse = new BackupPolicy(); - $expectedResponse->setName($name2); - $expectedResponse->setDailyBackupLimit($dailyBackupLimit); - $expectedResponse->setWeeklyBackupLimit($weeklyBackupLimit); - $expectedResponse->setMonthlyBackupLimit($monthlyBackupLimit); - $expectedResponse->setDescription($description); - $expectedResponse->setEnabled($enabled); - $expectedResponse->setAssignedVolumeCount($assignedVolumeCount); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->backupPolicyName('[PROJECT]', '[LOCATION]', '[BACKUP_POLICY]'); - $request = (new GetBackupPolicyRequest()) - ->setName($formattedName); - $response = $gapicClient->getBackupPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.netapp.v1.NetApp/GetBackupPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getBackupPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->backupPolicyName('[PROJECT]', '[LOCATION]', '[BACKUP_POLICY]'); - $request = (new GetBackupPolicyRequest()) - ->setName($formattedName); - try { - $gapicClient->getBackupPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getBackupVaultTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $expectedResponse = new BackupVault(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->backupVaultName('[PROJECT]', '[LOCATION]', '[BACKUP_VAULT]'); - $request = (new GetBackupVaultRequest()) - ->setName($formattedName); - $response = $gapicClient->getBackupVault($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.netapp.v1.NetApp/GetBackupVault', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getBackupVaultExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->backupVaultName('[PROJECT]', '[LOCATION]', '[BACKUP_VAULT]'); - $request = (new GetBackupVaultRequest()) - ->setName($formattedName); - try { - $gapicClient->getBackupVault($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getKmsConfigTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $cryptoKeyName = 'cryptoKeyName-184663511'; - $stateDetails = 'stateDetails632437908'; - $description = 'description-1724546052'; - $instructions = 'instructions757376421'; - $serviceAccount = 'serviceAccount-1948028253'; - $expectedResponse = new KmsConfig(); - $expectedResponse->setName($name2); - $expectedResponse->setCryptoKeyName($cryptoKeyName); - $expectedResponse->setStateDetails($stateDetails); - $expectedResponse->setDescription($description); - $expectedResponse->setInstructions($instructions); - $expectedResponse->setServiceAccount($serviceAccount); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->kmsConfigName('[PROJECT]', '[LOCATION]', '[KMS_CONFIG]'); - $request = (new GetKmsConfigRequest()) - ->setName($formattedName); - $response = $gapicClient->getKmsConfig($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.netapp.v1.NetApp/GetKmsConfig', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getKmsConfigExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->kmsConfigName('[PROJECT]', '[LOCATION]', '[KMS_CONFIG]'); - $request = (new GetKmsConfigRequest()) - ->setName($formattedName); - try { - $gapicClient->getKmsConfig($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getReplicationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $stateDetails = 'stateDetails632437908'; - $healthy = false; - $destinationVolume = 'destinationVolume-1177512853'; - $description = 'description-1724546052'; - $sourceVolume = 'sourceVolume327497662'; - $clusterLocation = 'clusterLocation-44738470'; - $expectedResponse = new Replication(); - $expectedResponse->setName($name2); - $expectedResponse->setStateDetails($stateDetails); - $expectedResponse->setHealthy($healthy); - $expectedResponse->setDestinationVolume($destinationVolume); - $expectedResponse->setDescription($description); - $expectedResponse->setSourceVolume($sourceVolume); - $expectedResponse->setClusterLocation($clusterLocation); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->replicationName('[PROJECT]', '[LOCATION]', '[VOLUME]', '[REPLICATION]'); - $request = (new GetReplicationRequest()) - ->setName($formattedName); - $response = $gapicClient->getReplication($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.netapp.v1.NetApp/GetReplication', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getReplicationExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->replicationName('[PROJECT]', '[LOCATION]', '[VOLUME]', '[REPLICATION]'); - $request = (new GetReplicationRequest()) - ->setName($formattedName); - try { - $gapicClient->getReplication($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getSnapshotTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $stateDetails = 'stateDetails632437908'; - $description = 'description-1724546052'; - $usedBytes = -1.91584322E8; - $expectedResponse = new Snapshot(); - $expectedResponse->setName($name2); - $expectedResponse->setStateDetails($stateDetails); - $expectedResponse->setDescription($description); - $expectedResponse->setUsedBytes($usedBytes); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->snapshotName('[PROJECT]', '[LOCATION]', '[VOLUME]', '[SNAPSHOT]'); - $request = (new GetSnapshotRequest()) - ->setName($formattedName); - $response = $gapicClient->getSnapshot($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.netapp.v1.NetApp/GetSnapshot', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getSnapshotExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->snapshotName('[PROJECT]', '[LOCATION]', '[VOLUME]', '[SNAPSHOT]'); - $request = (new GetSnapshotRequest()) - ->setName($formattedName); - try { - $gapicClient->getSnapshot($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getStoragePoolTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $capacityGib = 498394811; - $volumeCapacityGib = 643777472; - $volumeCount = 1362665558; - $stateDetails = 'stateDetails632437908'; - $description = 'description-1724546052'; - $network = 'network1843485230'; - $activeDirectory = 'activeDirectory475662452'; - $kmsConfig = 'kmsConfig917255152'; - $ldapEnabled = false; - $psaRange = 'psaRange1004849276'; - $globalAccessAllowed = false; - $allowAutoTiering = true; - $replicaZone = 'replicaZone1404354259'; - $zone = 'zone3744684'; - $expectedResponse = new StoragePool(); - $expectedResponse->setName($name2); - $expectedResponse->setCapacityGib($capacityGib); - $expectedResponse->setVolumeCapacityGib($volumeCapacityGib); - $expectedResponse->setVolumeCount($volumeCount); - $expectedResponse->setStateDetails($stateDetails); - $expectedResponse->setDescription($description); - $expectedResponse->setNetwork($network); - $expectedResponse->setActiveDirectory($activeDirectory); - $expectedResponse->setKmsConfig($kmsConfig); - $expectedResponse->setLdapEnabled($ldapEnabled); - $expectedResponse->setPsaRange($psaRange); - $expectedResponse->setGlobalAccessAllowed($globalAccessAllowed); - $expectedResponse->setAllowAutoTiering($allowAutoTiering); - $expectedResponse->setReplicaZone($replicaZone); - $expectedResponse->setZone($zone); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->storagePoolName('[PROJECT]', '[LOCATION]', '[STORAGE_POOL]'); - $request = (new GetStoragePoolRequest()) - ->setName($formattedName); - $response = $gapicClient->getStoragePool($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.netapp.v1.NetApp/GetStoragePool', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getStoragePoolExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->storagePoolName('[PROJECT]', '[LOCATION]', '[STORAGE_POOL]'); - $request = (new GetStoragePoolRequest()) - ->setName($formattedName); - try { - $gapicClient->getStoragePool($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getVolumeTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $stateDetails = 'stateDetails632437908'; - $shareName = 'shareName-1788152085'; - $psaRange = 'psaRange1004849276'; - $storagePool = 'storagePool897344352'; - $network = 'network1843485230'; - $capacityGib = 498394811; - $unixPermissions = 'unixPermissions1137975373'; - $description = 'description-1724546052'; - $snapReserve = -1.42958764E8; - $snapshotDirectory = true; - $usedGib = 279083970; - $kerberosEnabled = false; - $ldapEnabled = false; - $activeDirectory = 'activeDirectory475662452'; - $kmsConfig = 'kmsConfig917255152'; - $hasReplication = false; - $largeCapacity = true; - $multipleEndpoints = false; - $replicaZone = 'replicaZone1404354259'; - $zone = 'zone3744684'; - $coldTierSizeGib = 212809252; - $expectedResponse = new Volume(); - $expectedResponse->setName($name2); - $expectedResponse->setStateDetails($stateDetails); - $expectedResponse->setShareName($shareName); - $expectedResponse->setPsaRange($psaRange); - $expectedResponse->setStoragePool($storagePool); - $expectedResponse->setNetwork($network); - $expectedResponse->setCapacityGib($capacityGib); - $expectedResponse->setUnixPermissions($unixPermissions); - $expectedResponse->setDescription($description); - $expectedResponse->setSnapReserve($snapReserve); - $expectedResponse->setSnapshotDirectory($snapshotDirectory); - $expectedResponse->setUsedGib($usedGib); - $expectedResponse->setKerberosEnabled($kerberosEnabled); - $expectedResponse->setLdapEnabled($ldapEnabled); - $expectedResponse->setActiveDirectory($activeDirectory); - $expectedResponse->setKmsConfig($kmsConfig); - $expectedResponse->setHasReplication($hasReplication); - $expectedResponse->setLargeCapacity($largeCapacity); - $expectedResponse->setMultipleEndpoints($multipleEndpoints); - $expectedResponse->setReplicaZone($replicaZone); - $expectedResponse->setZone($zone); - $expectedResponse->setColdTierSizeGib($coldTierSizeGib); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); - $request = (new GetVolumeRequest()) - ->setName($formattedName); - $response = $gapicClient->getVolume($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.netapp.v1.NetApp/GetVolume', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getVolumeExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); - $request = (new GetVolumeRequest()) - ->setName($formattedName); - try { - $gapicClient->getVolume($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listActiveDirectoriesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $activeDirectoriesElement = new ActiveDirectory(); - $activeDirectories = [ - $activeDirectoriesElement, - ]; - $expectedResponse = new ListActiveDirectoriesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setActiveDirectories($activeDirectories); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListActiveDirectoriesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listActiveDirectories($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getActiveDirectories()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.netapp.v1.NetApp/ListActiveDirectories', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listActiveDirectoriesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListActiveDirectoriesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listActiveDirectories($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listBackupPoliciesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $backupPoliciesElement = new BackupPolicy(); - $backupPolicies = [ - $backupPoliciesElement, - ]; - $expectedResponse = new ListBackupPoliciesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setBackupPolicies($backupPolicies); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListBackupPoliciesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listBackupPolicies($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getBackupPolicies()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.netapp.v1.NetApp/ListBackupPolicies', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listBackupPoliciesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListBackupPoliciesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listBackupPolicies($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listBackupVaultsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $backupVaultsElement = new BackupVault(); - $backupVaults = [ - $backupVaultsElement, - ]; - $expectedResponse = new ListBackupVaultsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setBackupVaults($backupVaults); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListBackupVaultsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listBackupVaults($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getBackupVaults()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.netapp.v1.NetApp/ListBackupVaults', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listBackupVaultsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListBackupVaultsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listBackupVaults($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listBackupsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $backupsElement = new Backup(); - $backups = [ - $backupsElement, - ]; - $expectedResponse = new ListBackupsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setBackups($backups); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->backupVaultName('[PROJECT]', '[LOCATION]', '[BACKUP_VAULT]'); - $request = (new ListBackupsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listBackups($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getBackups()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.netapp.v1.NetApp/ListBackups', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listBackupsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->backupVaultName('[PROJECT]', '[LOCATION]', '[BACKUP_VAULT]'); - $request = (new ListBackupsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listBackups($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listKmsConfigsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $kmsConfigsElement = new KmsConfig(); - $kmsConfigs = [ - $kmsConfigsElement, - ]; - $expectedResponse = new ListKmsConfigsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setKmsConfigs($kmsConfigs); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListKmsConfigsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listKmsConfigs($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getKmsConfigs()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.netapp.v1.NetApp/ListKmsConfigs', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listKmsConfigsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListKmsConfigsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listKmsConfigs($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listReplicationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $replicationsElement = new Replication(); - $replications = [ - $replicationsElement, - ]; - $expectedResponse = new ListReplicationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setReplications($replications); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); - $request = (new ListReplicationsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listReplications($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getReplications()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.netapp.v1.NetApp/ListReplications', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listReplicationsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); - $request = (new ListReplicationsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listReplications($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listSnapshotsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $snapshotsElement = new Snapshot(); - $snapshots = [ - $snapshotsElement, - ]; - $expectedResponse = new ListSnapshotsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setSnapshots($snapshots); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); - $request = (new ListSnapshotsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listSnapshots($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getSnapshots()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.netapp.v1.NetApp/ListSnapshots', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listSnapshotsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); - $request = (new ListSnapshotsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listSnapshots($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listStoragePoolsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $storagePoolsElement = new StoragePool(); - $storagePools = [ - $storagePoolsElement, - ]; - $expectedResponse = new ListStoragePoolsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setStoragePools($storagePools); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListStoragePoolsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listStoragePools($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getStoragePools()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.netapp.v1.NetApp/ListStoragePools', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listStoragePoolsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListStoragePoolsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listStoragePools($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listVolumesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $volumesElement = new Volume(); - $volumes = [ - $volumesElement, - ]; - $expectedResponse = new ListVolumesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setVolumes($volumes); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListVolumesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listVolumes($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getVolumes()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.netapp.v1.NetApp/ListVolumes', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listVolumesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListVolumesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listVolumes($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function resumeReplicationTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/resumeReplicationTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $stateDetails = 'stateDetails632437908'; - $healthy = false; - $destinationVolume = 'destinationVolume-1177512853'; - $description = 'description-1724546052'; - $sourceVolume = 'sourceVolume327497662'; - $clusterLocation = 'clusterLocation-44738470'; - $expectedResponse = new Replication(); - $expectedResponse->setName($name2); - $expectedResponse->setStateDetails($stateDetails); - $expectedResponse->setHealthy($healthy); - $expectedResponse->setDestinationVolume($destinationVolume); - $expectedResponse->setDescription($description); - $expectedResponse->setSourceVolume($sourceVolume); - $expectedResponse->setClusterLocation($clusterLocation); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/resumeReplicationTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->replicationName('[PROJECT]', '[LOCATION]', '[VOLUME]', '[REPLICATION]'); - $request = (new ResumeReplicationRequest()) - ->setName($formattedName); - $response = $gapicClient->resumeReplication($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.netapp.v1.NetApp/ResumeReplication', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/resumeReplicationTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function resumeReplicationExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/resumeReplicationTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->replicationName('[PROJECT]', '[LOCATION]', '[VOLUME]', '[REPLICATION]'); - $request = (new ResumeReplicationRequest()) - ->setName($formattedName); - $response = $gapicClient->resumeReplication($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/resumeReplicationTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function reverseReplicationDirectionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/reverseReplicationDirectionTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $stateDetails = 'stateDetails632437908'; - $healthy = false; - $destinationVolume = 'destinationVolume-1177512853'; - $description = 'description-1724546052'; - $sourceVolume = 'sourceVolume327497662'; - $clusterLocation = 'clusterLocation-44738470'; - $expectedResponse = new Replication(); - $expectedResponse->setName($name2); - $expectedResponse->setStateDetails($stateDetails); - $expectedResponse->setHealthy($healthy); - $expectedResponse->setDestinationVolume($destinationVolume); - $expectedResponse->setDescription($description); - $expectedResponse->setSourceVolume($sourceVolume); - $expectedResponse->setClusterLocation($clusterLocation); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/reverseReplicationDirectionTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->replicationName('[PROJECT]', '[LOCATION]', '[VOLUME]', '[REPLICATION]'); - $request = (new ReverseReplicationDirectionRequest()) - ->setName($formattedName); - $response = $gapicClient->reverseReplicationDirection($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.netapp.v1.NetApp/ReverseReplicationDirection', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/reverseReplicationDirectionTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function reverseReplicationDirectionExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/reverseReplicationDirectionTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->replicationName('[PROJECT]', '[LOCATION]', '[VOLUME]', '[REPLICATION]'); - $request = (new ReverseReplicationDirectionRequest()) - ->setName($formattedName); - $response = $gapicClient->reverseReplicationDirection($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/reverseReplicationDirectionTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function revertVolumeTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/revertVolumeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $stateDetails = 'stateDetails632437908'; - $shareName = 'shareName-1788152085'; - $psaRange = 'psaRange1004849276'; - $storagePool = 'storagePool897344352'; - $network = 'network1843485230'; - $capacityGib = 498394811; - $unixPermissions = 'unixPermissions1137975373'; - $description = 'description-1724546052'; - $snapReserve = -1.42958764E8; - $snapshotDirectory = true; - $usedGib = 279083970; - $kerberosEnabled = false; - $ldapEnabled = false; - $activeDirectory = 'activeDirectory475662452'; - $kmsConfig = 'kmsConfig917255152'; - $hasReplication = false; - $largeCapacity = true; - $multipleEndpoints = false; - $replicaZone = 'replicaZone1404354259'; - $zone = 'zone3744684'; - $coldTierSizeGib = 212809252; - $expectedResponse = new Volume(); - $expectedResponse->setName($name2); - $expectedResponse->setStateDetails($stateDetails); - $expectedResponse->setShareName($shareName); - $expectedResponse->setPsaRange($psaRange); - $expectedResponse->setStoragePool($storagePool); - $expectedResponse->setNetwork($network); - $expectedResponse->setCapacityGib($capacityGib); - $expectedResponse->setUnixPermissions($unixPermissions); - $expectedResponse->setDescription($description); - $expectedResponse->setSnapReserve($snapReserve); - $expectedResponse->setSnapshotDirectory($snapshotDirectory); - $expectedResponse->setUsedGib($usedGib); - $expectedResponse->setKerberosEnabled($kerberosEnabled); - $expectedResponse->setLdapEnabled($ldapEnabled); - $expectedResponse->setActiveDirectory($activeDirectory); - $expectedResponse->setKmsConfig($kmsConfig); - $expectedResponse->setHasReplication($hasReplication); - $expectedResponse->setLargeCapacity($largeCapacity); - $expectedResponse->setMultipleEndpoints($multipleEndpoints); - $expectedResponse->setReplicaZone($replicaZone); - $expectedResponse->setZone($zone); - $expectedResponse->setColdTierSizeGib($coldTierSizeGib); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/revertVolumeTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); - $snapshotId = 'snapshotId-168585866'; - $request = (new RevertVolumeRequest()) - ->setName($formattedName) - ->setSnapshotId($snapshotId); - $response = $gapicClient->revertVolume($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.netapp.v1.NetApp/RevertVolume', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualApiRequestObject->getSnapshotId(); - $this->assertProtobufEquals($snapshotId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/revertVolumeTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function revertVolumeExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/revertVolumeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->volumeName('[PROJECT]', '[LOCATION]', '[VOLUME]'); - $snapshotId = 'snapshotId-168585866'; - $request = (new RevertVolumeRequest()) - ->setName($formattedName) - ->setSnapshotId($snapshotId); - $response = $gapicClient->revertVolume($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/revertVolumeTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function stopReplicationTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/stopReplicationTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $stateDetails = 'stateDetails632437908'; - $healthy = false; - $destinationVolume = 'destinationVolume-1177512853'; - $description = 'description-1724546052'; - $sourceVolume = 'sourceVolume327497662'; - $clusterLocation = 'clusterLocation-44738470'; - $expectedResponse = new Replication(); - $expectedResponse->setName($name2); - $expectedResponse->setStateDetails($stateDetails); - $expectedResponse->setHealthy($healthy); - $expectedResponse->setDestinationVolume($destinationVolume); - $expectedResponse->setDescription($description); - $expectedResponse->setSourceVolume($sourceVolume); - $expectedResponse->setClusterLocation($clusterLocation); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/stopReplicationTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->replicationName('[PROJECT]', '[LOCATION]', '[VOLUME]', '[REPLICATION]'); - $request = (new StopReplicationRequest()) - ->setName($formattedName); - $response = $gapicClient->stopReplication($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.netapp.v1.NetApp/StopReplication', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/stopReplicationTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function stopReplicationExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/stopReplicationTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->replicationName('[PROJECT]', '[LOCATION]', '[VOLUME]', '[REPLICATION]'); - $request = (new StopReplicationRequest()) - ->setName($formattedName); - $response = $gapicClient->stopReplication($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/stopReplicationTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function switchActiveReplicaZoneTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/switchActiveReplicaZoneTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $capacityGib = 498394811; - $volumeCapacityGib = 643777472; - $volumeCount = 1362665558; - $stateDetails = 'stateDetails632437908'; - $description = 'description-1724546052'; - $network = 'network1843485230'; - $activeDirectory = 'activeDirectory475662452'; - $kmsConfig = 'kmsConfig917255152'; - $ldapEnabled = false; - $psaRange = 'psaRange1004849276'; - $globalAccessAllowed = false; - $allowAutoTiering = true; - $replicaZone = 'replicaZone1404354259'; - $zone = 'zone3744684'; - $expectedResponse = new StoragePool(); - $expectedResponse->setName($name2); - $expectedResponse->setCapacityGib($capacityGib); - $expectedResponse->setVolumeCapacityGib($volumeCapacityGib); - $expectedResponse->setVolumeCount($volumeCount); - $expectedResponse->setStateDetails($stateDetails); - $expectedResponse->setDescription($description); - $expectedResponse->setNetwork($network); - $expectedResponse->setActiveDirectory($activeDirectory); - $expectedResponse->setKmsConfig($kmsConfig); - $expectedResponse->setLdapEnabled($ldapEnabled); - $expectedResponse->setPsaRange($psaRange); - $expectedResponse->setGlobalAccessAllowed($globalAccessAllowed); - $expectedResponse->setAllowAutoTiering($allowAutoTiering); - $expectedResponse->setReplicaZone($replicaZone); - $expectedResponse->setZone($zone); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/switchActiveReplicaZoneTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->storagePoolName('[PROJECT]', '[LOCATION]', '[STORAGE_POOL]'); - $request = (new SwitchActiveReplicaZoneRequest()) - ->setName($formattedName); - $response = $gapicClient->switchActiveReplicaZone($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.netapp.v1.NetApp/SwitchActiveReplicaZone', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/switchActiveReplicaZoneTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function switchActiveReplicaZoneExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/switchActiveReplicaZoneTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->storagePoolName('[PROJECT]', '[LOCATION]', '[STORAGE_POOL]'); - $request = (new SwitchActiveReplicaZoneRequest()) - ->setName($formattedName); - $response = $gapicClient->switchActiveReplicaZone($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/switchActiveReplicaZoneTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function syncReplicationTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/syncReplicationTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $stateDetails = 'stateDetails632437908'; - $healthy = false; - $destinationVolume = 'destinationVolume-1177512853'; - $description = 'description-1724546052'; - $sourceVolume = 'sourceVolume327497662'; - $clusterLocation = 'clusterLocation-44738470'; - $expectedResponse = new Replication(); - $expectedResponse->setName($name2); - $expectedResponse->setStateDetails($stateDetails); - $expectedResponse->setHealthy($healthy); - $expectedResponse->setDestinationVolume($destinationVolume); - $expectedResponse->setDescription($description); - $expectedResponse->setSourceVolume($sourceVolume); - $expectedResponse->setClusterLocation($clusterLocation); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/syncReplicationTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->replicationName('[PROJECT]', '[LOCATION]', '[VOLUME]', '[REPLICATION]'); - $request = (new SyncReplicationRequest()) - ->setName($formattedName); - $response = $gapicClient->syncReplication($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.netapp.v1.NetApp/SyncReplication', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/syncReplicationTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function syncReplicationExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/syncReplicationTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->replicationName('[PROJECT]', '[LOCATION]', '[VOLUME]', '[REPLICATION]'); - $request = (new SyncReplicationRequest()) - ->setName($formattedName); - $response = $gapicClient->syncReplication($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/syncReplicationTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateActiveDirectoryTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateActiveDirectoryTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $domain = 'domain-1326197564'; - $site = 'site3530567'; - $dns = 'dns99625'; - $netBiosPrefix = 'netBiosPrefix865554756'; - $organizationalUnit = 'organizationalUnit-694432635'; - $aesEncryption = false; - $username = 'username-265713450'; - $password = 'password1216985755'; - $kdcHostname = 'kdcHostname-863813976'; - $kdcIp = 'kdcIp-1136252068'; - $nfsUsersWithLdap = false; - $description = 'description-1724546052'; - $ldapSigning = false; - $encryptDcConnections = false; - $stateDetails = 'stateDetails632437908'; - $expectedResponse = new ActiveDirectory(); - $expectedResponse->setName($name); - $expectedResponse->setDomain($domain); - $expectedResponse->setSite($site); - $expectedResponse->setDns($dns); - $expectedResponse->setNetBiosPrefix($netBiosPrefix); - $expectedResponse->setOrganizationalUnit($organizationalUnit); - $expectedResponse->setAesEncryption($aesEncryption); - $expectedResponse->setUsername($username); - $expectedResponse->setPassword($password); - $expectedResponse->setKdcHostname($kdcHostname); - $expectedResponse->setKdcIp($kdcIp); - $expectedResponse->setNfsUsersWithLdap($nfsUsersWithLdap); - $expectedResponse->setDescription($description); - $expectedResponse->setLdapSigning($ldapSigning); - $expectedResponse->setEncryptDcConnections($encryptDcConnections); - $expectedResponse->setStateDetails($stateDetails); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateActiveDirectoryTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $updateMask = new FieldMask(); - $activeDirectory = new ActiveDirectory(); - $activeDirectoryDomain = 'activeDirectoryDomain1710368171'; - $activeDirectory->setDomain($activeDirectoryDomain); - $activeDirectoryDns = 'activeDirectoryDns1090270626'; - $activeDirectory->setDns($activeDirectoryDns); - $activeDirectoryNetBiosPrefix = 'activeDirectoryNetBiosPrefix-1870358125'; - $activeDirectory->setNetBiosPrefix($activeDirectoryNetBiosPrefix); - $activeDirectoryUsername = 'activeDirectoryUsername1591163901'; - $activeDirectory->setUsername($activeDirectoryUsername); - $activeDirectoryPassword = 'activeDirectoryPassword-1221104190'; - $activeDirectory->setPassword($activeDirectoryPassword); - $request = (new UpdateActiveDirectoryRequest()) - ->setUpdateMask($updateMask) - ->setActiveDirectory($activeDirectory); - $response = $gapicClient->updateActiveDirectory($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.netapp.v1.NetApp/UpdateActiveDirectory', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $actualValue = $actualApiRequestObject->getActiveDirectory(); - $this->assertProtobufEquals($activeDirectory, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateActiveDirectoryTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateActiveDirectoryExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateActiveDirectoryTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $updateMask = new FieldMask(); - $activeDirectory = new ActiveDirectory(); - $activeDirectoryDomain = 'activeDirectoryDomain1710368171'; - $activeDirectory->setDomain($activeDirectoryDomain); - $activeDirectoryDns = 'activeDirectoryDns1090270626'; - $activeDirectory->setDns($activeDirectoryDns); - $activeDirectoryNetBiosPrefix = 'activeDirectoryNetBiosPrefix-1870358125'; - $activeDirectory->setNetBiosPrefix($activeDirectoryNetBiosPrefix); - $activeDirectoryUsername = 'activeDirectoryUsername1591163901'; - $activeDirectory->setUsername($activeDirectoryUsername); - $activeDirectoryPassword = 'activeDirectoryPassword-1221104190'; - $activeDirectory->setPassword($activeDirectoryPassword); - $request = (new UpdateActiveDirectoryRequest()) - ->setUpdateMask($updateMask) - ->setActiveDirectory($activeDirectory); - $response = $gapicClient->updateActiveDirectory($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateActiveDirectoryTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateBackupTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateBackupTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $volumeUsageBytes = 962433704; - $sourceVolume = 'sourceVolume327497662'; - $sourceSnapshot = 'sourceSnapshot-947679896'; - $chainStorageBytes = 1614651561; - $expectedResponse = new Backup(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setVolumeUsageBytes($volumeUsageBytes); - $expectedResponse->setSourceVolume($sourceVolume); - $expectedResponse->setSourceSnapshot($sourceSnapshot); - $expectedResponse->setChainStorageBytes($chainStorageBytes); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateBackupTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $updateMask = new FieldMask(); - $backup = new Backup(); - $request = (new UpdateBackupRequest()) - ->setUpdateMask($updateMask) - ->setBackup($backup); - $response = $gapicClient->updateBackup($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.netapp.v1.NetApp/UpdateBackup', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $actualValue = $actualApiRequestObject->getBackup(); - $this->assertProtobufEquals($backup, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateBackupTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateBackupExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateBackupTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $updateMask = new FieldMask(); - $backup = new Backup(); - $request = (new UpdateBackupRequest()) - ->setUpdateMask($updateMask) - ->setBackup($backup); - $response = $gapicClient->updateBackup($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateBackupTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateBackupPolicyTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateBackupPolicyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $dailyBackupLimit = 532629348; - $weeklyBackupLimit = 2075144708; - $monthlyBackupLimit = 1253809680; - $description = 'description-1724546052'; - $enabled = false; - $assignedVolumeCount = 396892795; - $expectedResponse = new BackupPolicy(); - $expectedResponse->setName($name); - $expectedResponse->setDailyBackupLimit($dailyBackupLimit); - $expectedResponse->setWeeklyBackupLimit($weeklyBackupLimit); - $expectedResponse->setMonthlyBackupLimit($monthlyBackupLimit); - $expectedResponse->setDescription($description); - $expectedResponse->setEnabled($enabled); - $expectedResponse->setAssignedVolumeCount($assignedVolumeCount); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateBackupPolicyTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $updateMask = new FieldMask(); - $backupPolicy = new BackupPolicy(); - $request = (new UpdateBackupPolicyRequest()) - ->setUpdateMask($updateMask) - ->setBackupPolicy($backupPolicy); - $response = $gapicClient->updateBackupPolicy($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.netapp.v1.NetApp/UpdateBackupPolicy', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $actualValue = $actualApiRequestObject->getBackupPolicy(); - $this->assertProtobufEquals($backupPolicy, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateBackupPolicyTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateBackupPolicyExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateBackupPolicyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $updateMask = new FieldMask(); - $backupPolicy = new BackupPolicy(); - $request = (new UpdateBackupPolicyRequest()) - ->setUpdateMask($updateMask) - ->setBackupPolicy($backupPolicy); - $response = $gapicClient->updateBackupPolicy($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateBackupPolicyTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateBackupVaultTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateBackupVaultTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $expectedResponse = new BackupVault(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateBackupVaultTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $updateMask = new FieldMask(); - $backupVault = new BackupVault(); - $request = (new UpdateBackupVaultRequest()) - ->setUpdateMask($updateMask) - ->setBackupVault($backupVault); - $response = $gapicClient->updateBackupVault($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.netapp.v1.NetApp/UpdateBackupVault', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $actualValue = $actualApiRequestObject->getBackupVault(); - $this->assertProtobufEquals($backupVault, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateBackupVaultTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateBackupVaultExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateBackupVaultTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $updateMask = new FieldMask(); - $backupVault = new BackupVault(); - $request = (new UpdateBackupVaultRequest()) - ->setUpdateMask($updateMask) - ->setBackupVault($backupVault); - $response = $gapicClient->updateBackupVault($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateBackupVaultTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateKmsConfigTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateKmsConfigTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $cryptoKeyName = 'cryptoKeyName-184663511'; - $stateDetails = 'stateDetails632437908'; - $description = 'description-1724546052'; - $instructions = 'instructions757376421'; - $serviceAccount = 'serviceAccount-1948028253'; - $expectedResponse = new KmsConfig(); - $expectedResponse->setName($name); - $expectedResponse->setCryptoKeyName($cryptoKeyName); - $expectedResponse->setStateDetails($stateDetails); - $expectedResponse->setDescription($description); - $expectedResponse->setInstructions($instructions); - $expectedResponse->setServiceAccount($serviceAccount); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateKmsConfigTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $updateMask = new FieldMask(); - $kmsConfig = new KmsConfig(); - $kmsConfigCryptoKeyName = 'kmsConfigCryptoKeyName2110252630'; - $kmsConfig->setCryptoKeyName($kmsConfigCryptoKeyName); - $request = (new UpdateKmsConfigRequest()) - ->setUpdateMask($updateMask) - ->setKmsConfig($kmsConfig); - $response = $gapicClient->updateKmsConfig($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.netapp.v1.NetApp/UpdateKmsConfig', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $actualValue = $actualApiRequestObject->getKmsConfig(); - $this->assertProtobufEquals($kmsConfig, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateKmsConfigTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateKmsConfigExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateKmsConfigTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $updateMask = new FieldMask(); - $kmsConfig = new KmsConfig(); - $kmsConfigCryptoKeyName = 'kmsConfigCryptoKeyName2110252630'; - $kmsConfig->setCryptoKeyName($kmsConfigCryptoKeyName); - $request = (new UpdateKmsConfigRequest()) - ->setUpdateMask($updateMask) - ->setKmsConfig($kmsConfig); - $response = $gapicClient->updateKmsConfig($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateKmsConfigTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateReplicationTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateReplicationTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $stateDetails = 'stateDetails632437908'; - $healthy = false; - $destinationVolume = 'destinationVolume-1177512853'; - $description = 'description-1724546052'; - $sourceVolume = 'sourceVolume327497662'; - $clusterLocation = 'clusterLocation-44738470'; - $expectedResponse = new Replication(); - $expectedResponse->setName($name); - $expectedResponse->setStateDetails($stateDetails); - $expectedResponse->setHealthy($healthy); - $expectedResponse->setDestinationVolume($destinationVolume); - $expectedResponse->setDescription($description); - $expectedResponse->setSourceVolume($sourceVolume); - $expectedResponse->setClusterLocation($clusterLocation); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateReplicationTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $updateMask = new FieldMask(); - $replication = new Replication(); - $replicationReplicationSchedule = ReplicationSchedule::REPLICATION_SCHEDULE_UNSPECIFIED; - $replication->setReplicationSchedule($replicationReplicationSchedule); - $replicationDestinationVolumeParameters = new DestinationVolumeParameters(); - $destinationVolumeParametersStoragePool = $gapicClient->storagePoolName('[PROJECT]', '[LOCATION]', '[STORAGE_POOL]'); - $replicationDestinationVolumeParameters->setStoragePool($destinationVolumeParametersStoragePool); - $replication->setDestinationVolumeParameters($replicationDestinationVolumeParameters); - $request = (new UpdateReplicationRequest()) - ->setUpdateMask($updateMask) - ->setReplication($replication); - $response = $gapicClient->updateReplication($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.netapp.v1.NetApp/UpdateReplication', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $actualValue = $actualApiRequestObject->getReplication(); - $this->assertProtobufEquals($replication, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateReplicationTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateReplicationExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateReplicationTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $updateMask = new FieldMask(); - $replication = new Replication(); - $replicationReplicationSchedule = ReplicationSchedule::REPLICATION_SCHEDULE_UNSPECIFIED; - $replication->setReplicationSchedule($replicationReplicationSchedule); - $replicationDestinationVolumeParameters = new DestinationVolumeParameters(); - $destinationVolumeParametersStoragePool = $gapicClient->storagePoolName('[PROJECT]', '[LOCATION]', '[STORAGE_POOL]'); - $replicationDestinationVolumeParameters->setStoragePool($destinationVolumeParametersStoragePool); - $replication->setDestinationVolumeParameters($replicationDestinationVolumeParameters); - $request = (new UpdateReplicationRequest()) - ->setUpdateMask($updateMask) - ->setReplication($replication); - $response = $gapicClient->updateReplication($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateReplicationTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateSnapshotTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateSnapshotTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $stateDetails = 'stateDetails632437908'; - $description = 'description-1724546052'; - $usedBytes = -1.91584322E8; - $expectedResponse = new Snapshot(); - $expectedResponse->setName($name); - $expectedResponse->setStateDetails($stateDetails); - $expectedResponse->setDescription($description); - $expectedResponse->setUsedBytes($usedBytes); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateSnapshotTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $updateMask = new FieldMask(); - $snapshot = new Snapshot(); - $request = (new UpdateSnapshotRequest()) - ->setUpdateMask($updateMask) - ->setSnapshot($snapshot); - $response = $gapicClient->updateSnapshot($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.netapp.v1.NetApp/UpdateSnapshot', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $actualValue = $actualApiRequestObject->getSnapshot(); - $this->assertProtobufEquals($snapshot, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateSnapshotTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateSnapshotExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateSnapshotTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $updateMask = new FieldMask(); - $snapshot = new Snapshot(); - $request = (new UpdateSnapshotRequest()) - ->setUpdateMask($updateMask) - ->setSnapshot($snapshot); - $response = $gapicClient->updateSnapshot($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateSnapshotTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateStoragePoolTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateStoragePoolTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $capacityGib = 498394811; - $volumeCapacityGib = 643777472; - $volumeCount = 1362665558; - $stateDetails = 'stateDetails632437908'; - $description = 'description-1724546052'; - $network = 'network1843485230'; - $activeDirectory = 'activeDirectory475662452'; - $kmsConfig = 'kmsConfig917255152'; - $ldapEnabled = false; - $psaRange = 'psaRange1004849276'; - $globalAccessAllowed = false; - $allowAutoTiering = true; - $replicaZone = 'replicaZone1404354259'; - $zone = 'zone3744684'; - $expectedResponse = new StoragePool(); - $expectedResponse->setName($name); - $expectedResponse->setCapacityGib($capacityGib); - $expectedResponse->setVolumeCapacityGib($volumeCapacityGib); - $expectedResponse->setVolumeCount($volumeCount); - $expectedResponse->setStateDetails($stateDetails); - $expectedResponse->setDescription($description); - $expectedResponse->setNetwork($network); - $expectedResponse->setActiveDirectory($activeDirectory); - $expectedResponse->setKmsConfig($kmsConfig); - $expectedResponse->setLdapEnabled($ldapEnabled); - $expectedResponse->setPsaRange($psaRange); - $expectedResponse->setGlobalAccessAllowed($globalAccessAllowed); - $expectedResponse->setAllowAutoTiering($allowAutoTiering); - $expectedResponse->setReplicaZone($replicaZone); - $expectedResponse->setZone($zone); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateStoragePoolTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $updateMask = new FieldMask(); - $storagePool = new StoragePool(); - $storagePoolServiceLevel = ServiceLevel::SERVICE_LEVEL_UNSPECIFIED; - $storagePool->setServiceLevel($storagePoolServiceLevel); - $storagePoolCapacityGib = 1260910865; - $storagePool->setCapacityGib($storagePoolCapacityGib); - $storagePoolNetwork = $gapicClient->networkName('[PROJECT]', '[NETWORK]'); - $storagePool->setNetwork($storagePoolNetwork); - $request = (new UpdateStoragePoolRequest()) - ->setUpdateMask($updateMask) - ->setStoragePool($storagePool); - $response = $gapicClient->updateStoragePool($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.netapp.v1.NetApp/UpdateStoragePool', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $actualValue = $actualApiRequestObject->getStoragePool(); - $this->assertProtobufEquals($storagePool, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateStoragePoolTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateStoragePoolExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateStoragePoolTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $updateMask = new FieldMask(); - $storagePool = new StoragePool(); - $storagePoolServiceLevel = ServiceLevel::SERVICE_LEVEL_UNSPECIFIED; - $storagePool->setServiceLevel($storagePoolServiceLevel); - $storagePoolCapacityGib = 1260910865; - $storagePool->setCapacityGib($storagePoolCapacityGib); - $storagePoolNetwork = $gapicClient->networkName('[PROJECT]', '[NETWORK]'); - $storagePool->setNetwork($storagePoolNetwork); - $request = (new UpdateStoragePoolRequest()) - ->setUpdateMask($updateMask) - ->setStoragePool($storagePool); - $response = $gapicClient->updateStoragePool($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateStoragePoolTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateVolumeTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateVolumeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $stateDetails = 'stateDetails632437908'; - $shareName = 'shareName-1788152085'; - $psaRange = 'psaRange1004849276'; - $storagePool = 'storagePool897344352'; - $network = 'network1843485230'; - $capacityGib = 498394811; - $unixPermissions = 'unixPermissions1137975373'; - $description = 'description-1724546052'; - $snapReserve = -1.42958764E8; - $snapshotDirectory = true; - $usedGib = 279083970; - $kerberosEnabled = false; - $ldapEnabled = false; - $activeDirectory = 'activeDirectory475662452'; - $kmsConfig = 'kmsConfig917255152'; - $hasReplication = false; - $largeCapacity = true; - $multipleEndpoints = false; - $replicaZone = 'replicaZone1404354259'; - $zone = 'zone3744684'; - $coldTierSizeGib = 212809252; - $expectedResponse = new Volume(); - $expectedResponse->setName($name); - $expectedResponse->setStateDetails($stateDetails); - $expectedResponse->setShareName($shareName); - $expectedResponse->setPsaRange($psaRange); - $expectedResponse->setStoragePool($storagePool); - $expectedResponse->setNetwork($network); - $expectedResponse->setCapacityGib($capacityGib); - $expectedResponse->setUnixPermissions($unixPermissions); - $expectedResponse->setDescription($description); - $expectedResponse->setSnapReserve($snapReserve); - $expectedResponse->setSnapshotDirectory($snapshotDirectory); - $expectedResponse->setUsedGib($usedGib); - $expectedResponse->setKerberosEnabled($kerberosEnabled); - $expectedResponse->setLdapEnabled($ldapEnabled); - $expectedResponse->setActiveDirectory($activeDirectory); - $expectedResponse->setKmsConfig($kmsConfig); - $expectedResponse->setHasReplication($hasReplication); - $expectedResponse->setLargeCapacity($largeCapacity); - $expectedResponse->setMultipleEndpoints($multipleEndpoints); - $expectedResponse->setReplicaZone($replicaZone); - $expectedResponse->setZone($zone); - $expectedResponse->setColdTierSizeGib($coldTierSizeGib); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateVolumeTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $updateMask = new FieldMask(); - $volume = new Volume(); - $volumeShareName = 'volumeShareName1564593424'; - $volume->setShareName($volumeShareName); - $volumeStoragePool = $gapicClient->storagePoolName('[PROJECT]', '[LOCATION]', '[STORAGE_POOL]'); - $volume->setStoragePool($volumeStoragePool); - $volumeCapacityGib = 1491387092; - $volume->setCapacityGib($volumeCapacityGib); - $volumeProtocols = []; - $volume->setProtocols($volumeProtocols); - $request = (new UpdateVolumeRequest()) - ->setUpdateMask($updateMask) - ->setVolume($volume); - $response = $gapicClient->updateVolume($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.netapp.v1.NetApp/UpdateVolume', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $actualValue = $actualApiRequestObject->getVolume(); - $this->assertProtobufEquals($volume, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateVolumeTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateVolumeExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateVolumeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $updateMask = new FieldMask(); - $volume = new Volume(); - $volumeShareName = 'volumeShareName1564593424'; - $volume->setShareName($volumeShareName); - $volumeStoragePool = $gapicClient->storagePoolName('[PROJECT]', '[LOCATION]', '[STORAGE_POOL]'); - $volume->setStoragePool($volumeStoragePool); - $volumeCapacityGib = 1491387092; - $volume->setCapacityGib($volumeCapacityGib); - $volumeProtocols = []; - $volume->setProtocols($volumeProtocols); - $request = (new UpdateVolumeRequest()) - ->setUpdateMask($updateMask) - ->setVolume($volume); - $response = $gapicClient->updateVolume($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateVolumeTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function verifyKmsConfigTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $healthy = false; - $healthError = 'healthError847905381'; - $instructions = 'instructions757376421'; - $expectedResponse = new VerifyKmsConfigResponse(); - $expectedResponse->setHealthy($healthy); - $expectedResponse->setHealthError($healthError); - $expectedResponse->setInstructions($instructions); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->kmsConfigName('[PROJECT]', '[LOCATION]', '[KMS_CONFIG]'); - $request = (new VerifyKmsConfigRequest()) - ->setName($formattedName); - $response = $gapicClient->verifyKmsConfig($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.netapp.v1.NetApp/VerifyKmsConfig', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function verifyKmsConfigExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->kmsConfigName('[PROJECT]', '[LOCATION]', '[KMS_CONFIG]'); - $request = (new VerifyKmsConfigRequest()) - ->setName($formattedName); - try { - $gapicClient->verifyKmsConfig($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $locationId = 'locationId552319461'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Location(); - $expectedResponse->setName($name2); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - $request = new GetLocationRequest(); - $response = $gapicClient->getLocation($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new GetLocationRequest(); - try { - $gapicClient->getLocation($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $locationsElement = new Location(); - $locations = [ - $locationsElement, - ]; - $expectedResponse = new ListLocationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLocations($locations); - $transport->addResponse($expectedResponse); - $request = new ListLocationsRequest(); - $response = $gapicClient->listLocations($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new ListLocationsRequest(); - try { - $gapicClient->listLocations($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createActiveDirectoryAsyncTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createActiveDirectoryTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $domain = 'domain-1326197564'; - $site = 'site3530567'; - $dns = 'dns99625'; - $netBiosPrefix = 'netBiosPrefix865554756'; - $organizationalUnit = 'organizationalUnit-694432635'; - $aesEncryption = false; - $username = 'username-265713450'; - $password = 'password1216985755'; - $kdcHostname = 'kdcHostname-863813976'; - $kdcIp = 'kdcIp-1136252068'; - $nfsUsersWithLdap = false; - $description = 'description-1724546052'; - $ldapSigning = false; - $encryptDcConnections = false; - $stateDetails = 'stateDetails632437908'; - $expectedResponse = new ActiveDirectory(); - $expectedResponse->setName($name); - $expectedResponse->setDomain($domain); - $expectedResponse->setSite($site); - $expectedResponse->setDns($dns); - $expectedResponse->setNetBiosPrefix($netBiosPrefix); - $expectedResponse->setOrganizationalUnit($organizationalUnit); - $expectedResponse->setAesEncryption($aesEncryption); - $expectedResponse->setUsername($username); - $expectedResponse->setPassword($password); - $expectedResponse->setKdcHostname($kdcHostname); - $expectedResponse->setKdcIp($kdcIp); - $expectedResponse->setNfsUsersWithLdap($nfsUsersWithLdap); - $expectedResponse->setDescription($description); - $expectedResponse->setLdapSigning($ldapSigning); - $expectedResponse->setEncryptDcConnections($encryptDcConnections); - $expectedResponse->setStateDetails($stateDetails); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createActiveDirectoryTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $activeDirectory = new ActiveDirectory(); - $activeDirectoryDomain = 'activeDirectoryDomain1710368171'; - $activeDirectory->setDomain($activeDirectoryDomain); - $activeDirectoryDns = 'activeDirectoryDns1090270626'; - $activeDirectory->setDns($activeDirectoryDns); - $activeDirectoryNetBiosPrefix = 'activeDirectoryNetBiosPrefix-1870358125'; - $activeDirectory->setNetBiosPrefix($activeDirectoryNetBiosPrefix); - $activeDirectoryUsername = 'activeDirectoryUsername1591163901'; - $activeDirectory->setUsername($activeDirectoryUsername); - $activeDirectoryPassword = 'activeDirectoryPassword-1221104190'; - $activeDirectory->setPassword($activeDirectoryPassword); - $activeDirectoryId = 'activeDirectoryId1363092678'; - $request = (new CreateActiveDirectoryRequest()) - ->setParent($formattedParent) - ->setActiveDirectory($activeDirectory) - ->setActiveDirectoryId($activeDirectoryId); - $response = $gapicClient->createActiveDirectoryAsync($request)->wait(); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.netapp.v1.NetApp/CreateActiveDirectory', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getActiveDirectory(); - $this->assertProtobufEquals($activeDirectory, $actualValue); - $actualValue = $actualApiRequestObject->getActiveDirectoryId(); - $this->assertProtobufEquals($activeDirectoryId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createActiveDirectoryTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } -} diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/GPBMetadata/Google/Cloud/Networkconnectivity/V1/Common.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/GPBMetadata/Google/Cloud/Networkconnectivity/V1/Common.php deleted file mode 100644 index 605cecbc47c5..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/proto/src/GPBMetadata/Google/Cloud/Networkconnectivity/V1/Common.php +++ /dev/null @@ -1,40 +0,0 @@ -internalAddGeneratedFile( - ' -û -0google/cloud/networkconnectivity/v1/common.proto#google.cloud.networkconnectivity.v1google/api/resource.protogoogle/protobuf/timestamp.proto"€ -OperationMetadata4 - create_time ( 2.google.protobuf.TimestampBàA1 -end_time ( 2.google.protobuf.TimestampBàA -target ( BàA -verb ( BàA -status_message ( BàA# -requested_cancellation (BàA - api_version ( BàABÚ -\'com.google.cloud.networkconnectivity.v1B CommonProtoPZYcloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb;networkconnectivitypbª#Google.Cloud.NetworkConnectivity.V1Ê#Google\\Cloud\\NetworkConnectivity\\V1ê&Google::Cloud::NetworkConnectivity::V1êAz --compute.googleapis.com/InterconnectAttachmentIprojects/{project}/regions/{region}/interconnectAttachments/{resource_id}êAR -compute.googleapis.com/Network0projects/{project}/global/networks/{resource_id}bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/GPBMetadata/Google/Cloud/Networkconnectivity/V1/Hub.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/GPBMetadata/Google/Cloud/Networkconnectivity/V1/Hub.php deleted file mode 100644 index cc94b2a47ae0425cbc4db33a3b58a2e11979b322..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 19414 zcmdTsOKc-Yc1uyxNW~d_YJRl*qkFvem^(vyIJS3&^RZi0kA`bWq)AG%iUssiWJ~G{ z#cp>uHI`?UAR8c91VJuAkV|q15+p!wiyQ*vkj3VZU?<52*xg_OAA&^^a1rFGa>Ezw&B|KhLM^t&n_BXy;=9_Yx9U?t-z41E$v6L zwsP$jA&pkubyN2{>*O&>!GCsVy=691u2=Wq<8{;3&9>>8^_KY=aC9fNQE#~h!0jKq z(P;yDRy)N2O6`Vm`K=Vk$;Q5JTOffuDW9w|6AB1qt=RSqr(JKY%^7aPF>TLs$}lva z-!!~Hl&z;Ro^i!=NO>H_J$P=tYQdlljiL(O3O!(+hKOt3kxzHJYN zMRmV=*A&XFHk*Mi-visf9B3cY#W%@Mem6$0MzVT(i4V`9lgJEk5}BQAGZzKUx^03t zVQR^J#>}gs2OCWH^mUZX;{3H5U(ke;GXF9BsqOiV;4$!3fV^K0ZMC;V6lN6Qt8*n0eD=EET&v zJ{$j~IzrzeiH2iqg5> z4yWQU%{%@yhplo32+u4anAY~3U3!)zn!=faQ6)zhFZ2Q#@3hTNI)-jGlVd)6ae9}G zFh^=6$Kkh$Tv}?zDudvRYUH$Ibv&?ReaCLNNrHrDrO;G3;7YkbU*Kp!T=n&q;U*J+ z1{WYs7s(mdwjLU~+u7c(JG;r#D9me8Q&bsbl>>5uizH!N5aV|BZL4V{&mh}!^p+8B z5x^L#82yM$+Mxf2r+XIQv^IB>6Nv7*6m4aMtqD+$@+CryPi@QbblYttCjr|SKDht2 z@5f>@S4kqg&28@of)mvcVm5cC%%z*IO*>famb<-s~BY(7U86zfMSKIo~Gnj$;Zly7Wv< zkylvS)A0-;nP6&>nb7x1&M`jen2yoZH!MeQ8;^9?WcFk6PnOi^o>OnTkVNUI5iVLI z3Mj7pAVEfOwZCj5zSn2O?@1{Gl76%q-y(64esUBPV|+FP{^^-|S$c`zCnK9+takDu zg1-$q{7g-g%Muzg&)`7eY0GRsgeBUs+qwtwoB66~z?R6pE5+slg0I-^8V9Bi$*Te- z21}9V>UGbnH@3DRV!26*_-7;F$D~rAQoERFo4h6_19l+q)a$n0GV746LYfP15Wcv{ zvp8KL!gNgW4M+8H6@656B_yu~s5EBs$#ch$S3}qd_Y#}rMZpJ{YO~V-PQdvF6U^WQ zcOr057HC%N-idmmMgq_ZpBzLD=An)eH5SMzh^a2**2(i2FrpX21bv1xOL^HpLkwgePEt25|3lc0Hn8@9dN0|v>$rJzuog}9qV|44A z!a>t>*lADZ;q2LWXhpIWko!&1w4bQnjoViua1z+|<`7B@<M`rW7MF1ae<@4H;l`-d*>zQiDlt`!9W3ypv9q;607#TXeu#KB6V(lguJmuC-y zJfi2>EZ3EQI#14+w%#zCjt&V0m?Y-=R3*dcK?tseoCo28@;wM$CFk14r=GrL**z|q zZyV&i+!7$TZ`r-Rc!YNIiqQxz6X`olGnwLzQ=ys9abp0<23k3!@+@pXvH`h@T(ZHP z%6T&8I}S|wMd*Q_Z3n6(PzS^0JiiuOOGf4V$|kA zSp#P3iJV;0Am+i9*`GD=SwA7EVAcZ?qvRASyIfu*<{X?D;gnHb$#2J=s=pN@-;i)7 zu)RQL>4WFxO1P8p{mY*6qhT__Q`9ec2j3q<g+5{?X&>{TX zQ__TVIiW9+b0K-?K5B>*P?%7DKSm}OOxFX=b}O)Lg<2rJNk;9u13MNTO=jQvr8@LX zy#!khe-|zC$6)WfARa(C9Je7egpKZJJUtwNRFB|K9@H<|JUOHjWOT!9!BzvxL)>YP zSxysj$n{-bijA}SQl|~+ zdt-}bZ9p572vlk24JHp?9JhN)X|PoVVMuRPmA{HX0*qz15Xuus_$(O(A+XvP^1u{z zi01ibniuD!1;b%462j^gu<#5it_Nzr@<%}VGM4^Aly}R4tSX5LGAK<6D$?AL1bsYr zI1zn8o)uF}GBszk49^IWccQfdMG1={kZ(-+haqxKs3V5-z*J5;-y~)hdSFn)_gL+&c9}THtuRjcaMipgTwdLQ^Id_9TV?lGj*Hvof~df-b(_fDJvL|i ziZHnCQT{DP}WkW; z1m;hG1D?S2aB#d7CZLihF(;(58vvATLU|g~L*xlpuTLnUROT-s@bNtk^VUr6zQUX= zmno2OTt%H7m+|=`>s%kzAt6=Cg?^%8HkLBn^tFdoz7n#>zKm~$DTN-_@-DiTY{Y7;QbU)8$bGy}whT2bTt~cD zBNb*8uz3s-h&KokTHlWLcqI3x({j{UiQTOT7e0|kv@~P|U6lS5(bPAC~6wg0GxnSR+_;oT2@qkZ0KKu1&szR`BbU^<^aFk9J zGIMal1jd#zdW$5&2gN*8ya8vZ&m>wj6ms5dH(H%0q$1ncqk@MgF4UexvrbI;&lq`` zvopBV?9vZ-a7$k@0R<0k^f=QX7~9Fn%={ z|JRVh`pp9Ldbr;Q^a+yYqg#GJpNvnrK8Z#mp-))N;d}Rx&h?JLsv{q>NY27uxZ4H+ zHvABx0c)Ydb0<*lC>i{Zhe(pIEbNaFYxg7$c73P(HV)n+2+YE{*3rz?z&Z_Q$AnfB zXiR}tHqoM8sUMK3Kp;M~xSgJjVCsXHCM5O)mxc?T zonR;}a`7N#zC$K=OvmfgTlzMXlFhckiwd)^KT}^LuO8?UpeO@vI;=hpN4WK76PoD! z=7|QlQc+U(+u*?nr~NXaz5#8V9T*Q2#i5!Y*InsjyvKnRjZBNfw2)dv?srrE6wJuS z;~zNET-b~x-TsYUm(KSPQZ09f2MiV)#*`m`n-gRnw2;@rM9VGS7fbWsKnxNz9}q#_ z50iYH5cI_|@Mk0Bbd@AmZ|(evy{h8*f3FF~}s2>hj&~uI5w8ZA}pV;Ay@O`|s{NA*SiapeDF{ zfoPvg@7jT+D7=1#X>WHU6yA(RsbwG;sQ;PmljF|s18HT_nxNKmMi_;dr5MxTC8b$t)v$gO3QOl@P#v=DioJ5 zlC%C3{1gv{(k(KMZkK5=J2k45mKlQ8azE}1ghCrV)S`=vYGqZgF3&D$HNXsWvfry3 zl!xa+PljN}d1h{PNnI=!bi_IpPs84E1eK4TC)3rM3RCs=A40ET0Se++0gti%LKSM< zD;iY8;mMq~py87^^rDZeg@RVbKgZagyhV{!&d1r<^EM$)%DxO>gVMjBM|=-|*mK5mCAOxhh&7zW1~L_`RVly~=JTKIUBz-ENHZ zzIz0Fc#(iY4m8S}253&o@$;w%8lI#TICE0m+C_9skj}E^c#rh$TnH#xls6Fs3BfB)5A+|n2OM@gs!FWlAV13f$ zeE+2{ym?5c2dr2~-O_xKWO<_h93y9hJ!6=6soa5X4~)-N-dDRrZ;w+V8-pe-1&zKl+pm8vbyfaLHsA z&x~${rS4ODuqvgqz$4UfvfzFH1@2^o4pga}yh0E@y+?T9_7im`xIs3+qR$H-jFer$ ze| zC>qcGu&`F_Z1)S}xsFY~0nh&g8XP)_*E$b}0QmVG#GMapt-c=g#jdUGT84Sj1OIHRA7&T*WLpCMDZ zgeIV|=j3@t?nr4Lu;6l`mrGyoq`BM+vq_;#hGi94L6O(HaG_^LPVW#z(ZYIngT5C@ z?=~Im{s&F_JE3WaG>WEifasd$!-+M3JUhIN_8Ez=2AmiA??Fm|Ge|mQo>Cx$&&m<0 z(swbX;ByQLHq%JYzLY}C-NqHdr-!5z;VXsdERJTGV4h!IpILdL!i}tbFGUh*w12tc zr)p-)^K3Vt%|3ecsPADGu6Atk_bXksTXhfmRJUjUHcr;wgkvX}e0+B7erFwy2R*AC z`;}F`w-TE}z>wXv2EMilXoLF50NU;KTLXXni=j*N_!_57fxX5lv&7jhgx&>}S-JMa zAGIdl_T<0rDLifs-uLu$=nal8pGSQ8`~ZacJPcI7Bhheh8x9%!-x%Q-o9snCaPbqr z>}BCa0phAZ`%Ux(o6Wta>Vu;X`Q8~Y!)I0-HU^K`$6hu#U(Y`FzwWJ%0+eT6e=~T= d&K3SbsL=bPSee{x40v}Gj^yun+9P{}{4d--PHO-F diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/GPBMetadata/Google/Cloud/Networkconnectivity/V1/PolicyBasedRouting.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/GPBMetadata/Google/Cloud/Networkconnectivity/V1/PolicyBasedRouting.php deleted file mode 100644 index fd12e2e50a40d76de4d2c629182857b345a3baf4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5510 zcmb_g&2uA170<{Y*e$S~c6qHRn=p}+tar(du#*&^U2hnDtXITqDYC5;psK0Ss3i{` z%?vXw8?)sDQ2Yh(55O@8ioauTgbTH&P;d$d4&1oF>yMe$N@GVW#}})n`+fBL{oZ@s z@BT;rv5z*?UE-3!q@<&^&sBO%R6p>jXL*j=9(21TP%W?T+YSjdRV~-l{o0{gDOV5Q z0@2VL1Qsc%J41HMi~|WI1LSs&%ft$dosPZuA7H z@aGTOU{?*PN#Wnyc4*kHO>NV$e+ehvQM;xS5>PX~w>xmbea}^yK+Uzt=51BzWP9KC zJ&4eb8hKe~L4$y`sxBpgYdWnm39Z2PsTb5?YoX91G!8ZUvUyvYW$Ns%x+#1t6vmv~ zQE4zB!`4+bAaoG8_qg9o!A1P5l@LSSw_CdFdMpZ_8x{)B&-7fyWr8KgCN6zBnTIxU zIz@79p4wjUa-t0)X*IEvS23hj^7?(xo!o^z&+P>R*9CgEYCg-1my1|T1c0H^_v!iM zreo1V8}fmgeLq>2bMNj0TQW`WbYfyXghbtpslbSF3w@qL53ZM?ctgl*Jj1nw4A)M# zvg^`_>Dy2W7-vL&XTLqP&}GCh+L9S^!)rqu0tvrd`mS8MvbI2l0*s}E^fm812Qu%) zK*~+8OSQZJLE7dCgGw$&{>Ff4}C*sT4tVqefJAJ^~fi{#u{8;y+U|f~H;{=3S0yK7OD`r0+eA(9 zM*)8XL9=(!jbwh~RWu)v9t(WTC?)$p1O+3%pmct1{~nG=kdPKq-&b-+XqGt*$gX~>H}dajh((odQy(hwH#sdGSM(9;%1(mA3#FkAE0^P3|ONRsd}4N!wvLS?1yAf ze2P8kAe4kf9~fYSaOvj_Vh&@3_$TU}5LZwGFU56pmZdFTK?`2cfo9e|7j-%J2L-)x ziIbrZ7i)qWXm$L|q8O#OKb(r=Ks?cXha6^IZV{?idf-CuvyRQS!w3!)FV{oaT{0HN zD2mk=8t6S9!w;w8MDE`Zj1up>qnJg;t^rvNt&PXgusa++UQts}nDF=>j^(tW=Eakh z@Ia7`8RT4G3rg-caN;s?2ql-D`0ESrh!-4i?#1>$7SL-W_MrhEkl@s|2>zFX))Fa- zC%dd9%1S`9#fb=fi3*V+xsRXeGLe7%*MI&lbsrblc;Jc1?VY&J+!?Dc7jlLWzw$|l z|E8eT1h(UkCUP`EGCJvWshX=k)A>s1FEKUePmS|4%OwSAK-WyNGginxCJUI2-HE=H^BtHI+f^H;d z=Y#=E7M?I*r%&}eXidKKfW>?or11#=P72x(P40+DOhuDy^QoTu>W==ot{qeAhlPCp z?CeZJA2&*KK##@r?ym2cwCe@^;_p+abqih<5lyaoI~3Q)>rtJBpsxJn$3ifA0>d+< z=OxYv!5gRp2}kkU_Y%K;mfG0mBSNjjMughF7!j6+29H{E>uI#BB`1l|C~google.cloud.networkconnectivity.v1.AcceptHubSpokeRequest - */ -class AcceptHubSpokeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the hub into which to accept the spoke. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. The URI of the spoke to accept into the hub. - * - * Generated from protobuf field string spoke_uri = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $spoke_uri = ''; - /** - * Optional. A request ID to identify requests. Specify a unique request ID so - * that if you must retry your request, the server knows to ignore the request - * if it has already been completed. The server guarantees that a request - * doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check to see whether the original operation - * was received. If it was, the server ignores the second request. This - * behavior prevents clients from mistakenly creating duplicate commitments. - * The request ID must be a valid UUID, with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param string $name Required. The name of the hub into which to accept the spoke. Please see - * {@see HubServiceClient::hubName()} for help formatting this field. - * @param string $spokeUri Required. The URI of the spoke to accept into the hub. Please see - * {@see HubServiceClient::spokeName()} for help formatting this field. - * - * @return \Google\Cloud\NetworkConnectivity\V1\AcceptHubSpokeRequest - * - * @experimental - */ - public static function build(string $name, string $spokeUri): self - { - return (new self()) - ->setName($name) - ->setSpokeUri($spokeUri); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the hub into which to accept the spoke. - * @type string $spoke_uri - * Required. The URI of the spoke to accept into the hub. - * @type string $request_id - * Optional. A request ID to identify requests. Specify a unique request ID so - * that if you must retry your request, the server knows to ignore the request - * if it has already been completed. The server guarantees that a request - * doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check to see whether the original operation - * was received. If it was, the server ignores the second request. This - * behavior prevents clients from mistakenly creating duplicate commitments. - * The request ID must be a valid UUID, with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the hub into which to accept the spoke. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the hub into which to accept the spoke. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. The URI of the spoke to accept into the hub. - * - * Generated from protobuf field string spoke_uri = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getSpokeUri() - { - return $this->spoke_uri; - } - - /** - * Required. The URI of the spoke to accept into the hub. - * - * Generated from protobuf field string spoke_uri = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setSpokeUri($var) - { - GPBUtil::checkString($var, True); - $this->spoke_uri = $var; - - return $this; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID so - * that if you must retry your request, the server knows to ignore the request - * if it has already been completed. The server guarantees that a request - * doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check to see whether the original operation - * was received. If it was, the server ignores the second request. This - * behavior prevents clients from mistakenly creating duplicate commitments. - * The request ID must be a valid UUID, with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID so - * that if you must retry your request, the server knows to ignore the request - * if it has already been completed. The server guarantees that a request - * doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check to see whether the original operation - * was received. If it was, the server ignores the second request. This - * behavior prevents clients from mistakenly creating duplicate commitments. - * The request ID must be a valid UUID, with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/AcceptHubSpokeResponse.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/AcceptHubSpokeResponse.php deleted file mode 100644 index 48fe6468b2b9..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/AcceptHubSpokeResponse.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.networkconnectivity.v1.AcceptHubSpokeResponse - */ -class AcceptHubSpokeResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The spoke that was operated on. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.Spoke spoke = 1; - */ - protected $spoke = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\NetworkConnectivity\V1\Spoke $spoke - * The spoke that was operated on. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); - parent::__construct($data); - } - - /** - * The spoke that was operated on. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.Spoke spoke = 1; - * @return \Google\Cloud\NetworkConnectivity\V1\Spoke|null - */ - public function getSpoke() - { - return $this->spoke; - } - - public function hasSpoke() - { - return isset($this->spoke); - } - - public function clearSpoke() - { - unset($this->spoke); - } - - /** - * The spoke that was operated on. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.Spoke spoke = 1; - * @param \Google\Cloud\NetworkConnectivity\V1\Spoke $var - * @return $this - */ - public function setSpoke($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkConnectivity\V1\Spoke::class); - $this->spoke = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/AutoAccept.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/AutoAccept.php deleted file mode 100644 index 902bb3e0eb89..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/AutoAccept.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.networkconnectivity.v1.AutoAccept - */ -class AutoAccept extends \Google\Protobuf\Internal\Message -{ - /** - * A list of project ids or project numbers for which you want - * to enable auto-accept. The auto-accept setting is applied to - * spokes being created or updated in these projects. - * - * Generated from protobuf field repeated string auto_accept_projects = 1; - */ - private $auto_accept_projects; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $auto_accept_projects - * A list of project ids or project numbers for which you want - * to enable auto-accept. The auto-accept setting is applied to - * spokes being created or updated in these projects. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); - parent::__construct($data); - } - - /** - * A list of project ids or project numbers for which you want - * to enable auto-accept. The auto-accept setting is applied to - * spokes being created or updated in these projects. - * - * Generated from protobuf field repeated string auto_accept_projects = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAutoAcceptProjects() - { - return $this->auto_accept_projects; - } - - /** - * A list of project ids or project numbers for which you want - * to enable auto-accept. The auto-accept setting is applied to - * spokes being created or updated in these projects. - * - * Generated from protobuf field repeated string auto_accept_projects = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAutoAcceptProjects($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->auto_accept_projects = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/CreateHubRequest.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/CreateHubRequest.php deleted file mode 100644 index 94e90f9d1b6c..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/CreateHubRequest.php +++ /dev/null @@ -1,243 +0,0 @@ -google.cloud.networkconnectivity.v1.CreateHubRequest - */ -class CreateHubRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. A unique identifier for the hub. - * - * Generated from protobuf field string hub_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $hub_id = ''; - /** - * Required. The initial values for a new hub. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.Hub hub = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $hub = null; - /** - * Optional. A request ID to identify requests. Specify a unique request ID so - * that if you must retry your request, the server knows to ignore the request - * if it has already been completed. The server guarantees that a request - * doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check to see whether the original operation - * was received. If it was, the server ignores the second request. This - * behavior prevents clients from mistakenly creating duplicate commitments. - * The request ID must be a valid UUID, with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param string $parent Required. The parent resource. Please see - * {@see HubServiceClient::locationName()} for help formatting this field. - * @param \Google\Cloud\NetworkConnectivity\V1\Hub $hub Required. The initial values for a new hub. - * @param string $hubId Required. A unique identifier for the hub. - * - * @return \Google\Cloud\NetworkConnectivity\V1\CreateHubRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\NetworkConnectivity\V1\Hub $hub, string $hubId): self - { - return (new self()) - ->setParent($parent) - ->setHub($hub) - ->setHubId($hubId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource. - * @type string $hub_id - * Required. A unique identifier for the hub. - * @type \Google\Cloud\NetworkConnectivity\V1\Hub $hub - * Required. The initial values for a new hub. - * @type string $request_id - * Optional. A request ID to identify requests. Specify a unique request ID so - * that if you must retry your request, the server knows to ignore the request - * if it has already been completed. The server guarantees that a request - * doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check to see whether the original operation - * was received. If it was, the server ignores the second request. This - * behavior prevents clients from mistakenly creating duplicate commitments. - * The request ID must be a valid UUID, with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. A unique identifier for the hub. - * - * Generated from protobuf field string hub_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getHubId() - { - return $this->hub_id; - } - - /** - * Required. A unique identifier for the hub. - * - * Generated from protobuf field string hub_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setHubId($var) - { - GPBUtil::checkString($var, True); - $this->hub_id = $var; - - return $this; - } - - /** - * Required. The initial values for a new hub. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.Hub hub = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\NetworkConnectivity\V1\Hub|null - */ - public function getHub() - { - return $this->hub; - } - - public function hasHub() - { - return isset($this->hub); - } - - public function clearHub() - { - unset($this->hub); - } - - /** - * Required. The initial values for a new hub. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.Hub hub = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\NetworkConnectivity\V1\Hub $var - * @return $this - */ - public function setHub($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkConnectivity\V1\Hub::class); - $this->hub = $var; - - return $this; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID so - * that if you must retry your request, the server knows to ignore the request - * if it has already been completed. The server guarantees that a request - * doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check to see whether the original operation - * was received. If it was, the server ignores the second request. This - * behavior prevents clients from mistakenly creating duplicate commitments. - * The request ID must be a valid UUID, with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID so - * that if you must retry your request, the server knows to ignore the request - * if it has already been completed. The server guarantees that a request - * doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check to see whether the original operation - * was received. If it was, the server ignores the second request. This - * behavior prevents clients from mistakenly creating duplicate commitments. - * The request ID must be a valid UUID, with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/CreatePolicyBasedRouteRequest.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/CreatePolicyBasedRouteRequest.php deleted file mode 100644 index 39cc389b0596..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/CreatePolicyBasedRouteRequest.php +++ /dev/null @@ -1,237 +0,0 @@ -google.cloud.networkconnectivity.v1.CreatePolicyBasedRouteRequest - */ -class CreatePolicyBasedRouteRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource's name of the PolicyBasedRoute. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Unique id for the Policy Based Route to create. - * - * Generated from protobuf field string policy_based_route_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $policy_based_route_id = ''; - /** - * Required. Initial values for a new Policy Based Route. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.PolicyBasedRoute policy_based_route = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $policy_based_route = null; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param string $parent Required. The parent resource's name of the PolicyBasedRoute. Please see - * {@see PolicyBasedRoutingServiceClient::locationName()} for help formatting this field. - * @param \Google\Cloud\NetworkConnectivity\V1\PolicyBasedRoute $policyBasedRoute Required. Initial values for a new Policy Based Route. - * @param string $policyBasedRouteId Required. Unique id for the Policy Based Route to create. - * - * @return \Google\Cloud\NetworkConnectivity\V1\CreatePolicyBasedRouteRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\NetworkConnectivity\V1\PolicyBasedRoute $policyBasedRoute, string $policyBasedRouteId): self - { - return (new self()) - ->setParent($parent) - ->setPolicyBasedRoute($policyBasedRoute) - ->setPolicyBasedRouteId($policyBasedRouteId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource's name of the PolicyBasedRoute. - * @type string $policy_based_route_id - * Required. Unique id for the Policy Based Route to create. - * @type \Google\Cloud\NetworkConnectivity\V1\PolicyBasedRoute $policy_based_route - * Required. Initial values for a new Policy Based Route. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkconnectivity\V1\PolicyBasedRouting::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource's name of the PolicyBasedRoute. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource's name of the PolicyBasedRoute. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. Unique id for the Policy Based Route to create. - * - * Generated from protobuf field string policy_based_route_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getPolicyBasedRouteId() - { - return $this->policy_based_route_id; - } - - /** - * Required. Unique id for the Policy Based Route to create. - * - * Generated from protobuf field string policy_based_route_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setPolicyBasedRouteId($var) - { - GPBUtil::checkString($var, True); - $this->policy_based_route_id = $var; - - return $this; - } - - /** - * Required. Initial values for a new Policy Based Route. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.PolicyBasedRoute policy_based_route = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\NetworkConnectivity\V1\PolicyBasedRoute|null - */ - public function getPolicyBasedRoute() - { - return $this->policy_based_route; - } - - public function hasPolicyBasedRoute() - { - return isset($this->policy_based_route); - } - - public function clearPolicyBasedRoute() - { - unset($this->policy_based_route); - } - - /** - * Required. Initial values for a new Policy Based Route. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.PolicyBasedRoute policy_based_route = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\NetworkConnectivity\V1\PolicyBasedRoute $var - * @return $this - */ - public function setPolicyBasedRoute($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkConnectivity\V1\PolicyBasedRoute::class); - $this->policy_based_route = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/CreateSpokeRequest.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/CreateSpokeRequest.php deleted file mode 100644 index ac28e3725546..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/CreateSpokeRequest.php +++ /dev/null @@ -1,242 +0,0 @@ -google.cloud.networkconnectivity.v1.CreateSpokeRequest - */ -class CreateSpokeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Unique id for the spoke to create. - * - * Generated from protobuf field string spoke_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $spoke_id = ''; - /** - * Required. The initial values for a new spoke. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.Spoke spoke = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $spoke = null; - /** - * Optional. A request ID to identify requests. Specify a unique request ID so - * that if you must retry your request, the server knows to ignore the request - * if it has already been completed. The server guarantees that a request - * doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check to see whether the original operation - * was received. If it was, the server ignores the second request. This - * behavior prevents clients from mistakenly creating duplicate commitments. - * The request ID must be a valid UUID, with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param string $parent Required. The parent resource. Please see - * {@see HubServiceClient::locationName()} for help formatting this field. - * @param \Google\Cloud\NetworkConnectivity\V1\Spoke $spoke Required. The initial values for a new spoke. - * @param string $spokeId Required. Unique id for the spoke to create. - * - * @return \Google\Cloud\NetworkConnectivity\V1\CreateSpokeRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\NetworkConnectivity\V1\Spoke $spoke, string $spokeId): self - { - return (new self()) - ->setParent($parent) - ->setSpoke($spoke) - ->setSpokeId($spokeId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource. - * @type string $spoke_id - * Required. Unique id for the spoke to create. - * @type \Google\Cloud\NetworkConnectivity\V1\Spoke $spoke - * Required. The initial values for a new spoke. - * @type string $request_id - * Optional. A request ID to identify requests. Specify a unique request ID so - * that if you must retry your request, the server knows to ignore the request - * if it has already been completed. The server guarantees that a request - * doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check to see whether the original operation - * was received. If it was, the server ignores the second request. This - * behavior prevents clients from mistakenly creating duplicate commitments. - * The request ID must be a valid UUID, with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. Unique id for the spoke to create. - * - * Generated from protobuf field string spoke_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getSpokeId() - { - return $this->spoke_id; - } - - /** - * Required. Unique id for the spoke to create. - * - * Generated from protobuf field string spoke_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setSpokeId($var) - { - GPBUtil::checkString($var, True); - $this->spoke_id = $var; - - return $this; - } - - /** - * Required. The initial values for a new spoke. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.Spoke spoke = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\NetworkConnectivity\V1\Spoke|null - */ - public function getSpoke() - { - return $this->spoke; - } - - public function hasSpoke() - { - return isset($this->spoke); - } - - public function clearSpoke() - { - unset($this->spoke); - } - - /** - * Required. The initial values for a new spoke. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.Spoke spoke = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\NetworkConnectivity\V1\Spoke $var - * @return $this - */ - public function setSpoke($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkConnectivity\V1\Spoke::class); - $this->spoke = $var; - - return $this; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID so - * that if you must retry your request, the server knows to ignore the request - * if it has already been completed. The server guarantees that a request - * doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check to see whether the original operation - * was received. If it was, the server ignores the second request. This - * behavior prevents clients from mistakenly creating duplicate commitments. - * The request ID must be a valid UUID, with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID so - * that if you must retry your request, the server knows to ignore the request - * if it has already been completed. The server guarantees that a request - * doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check to see whether the original operation - * was received. If it was, the server ignores the second request. This - * behavior prevents clients from mistakenly creating duplicate commitments. - * The request ID must be a valid UUID, with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/DeleteHubRequest.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/DeleteHubRequest.php deleted file mode 100644 index c9c7d31d1486..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/DeleteHubRequest.php +++ /dev/null @@ -1,160 +0,0 @@ -google.cloud.networkconnectivity.v1.DeleteHubRequest - */ -class DeleteHubRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the hub to delete. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. A request ID to identify requests. Specify a unique request ID so - * that if you must retry your request, the server knows to ignore the request - * if it has already been completed. The server guarantees that a request - * doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check to see whether the original operation - * was received. If it was, the server ignores the second request. This - * behavior prevents clients from mistakenly creating duplicate commitments. - * The request ID must be a valid UUID, with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param string $name Required. The name of the hub to delete. Please see - * {@see HubServiceClient::hubName()} for help formatting this field. - * - * @return \Google\Cloud\NetworkConnectivity\V1\DeleteHubRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the hub to delete. - * @type string $request_id - * Optional. A request ID to identify requests. Specify a unique request ID so - * that if you must retry your request, the server knows to ignore the request - * if it has already been completed. The server guarantees that a request - * doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check to see whether the original operation - * was received. If it was, the server ignores the second request. This - * behavior prevents clients from mistakenly creating duplicate commitments. - * The request ID must be a valid UUID, with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the hub to delete. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the hub to delete. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID so - * that if you must retry your request, the server knows to ignore the request - * if it has already been completed. The server guarantees that a request - * doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check to see whether the original operation - * was received. If it was, the server ignores the second request. This - * behavior prevents clients from mistakenly creating duplicate commitments. - * The request ID must be a valid UUID, with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID so - * that if you must retry your request, the server knows to ignore the request - * if it has already been completed. The server guarantees that a request - * doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check to see whether the original operation - * was received. If it was, the server ignores the second request. This - * behavior prevents clients from mistakenly creating duplicate commitments. - * The request ID must be a valid UUID, with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/DeletePolicyBasedRouteRequest.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/DeletePolicyBasedRouteRequest.php deleted file mode 100644 index ee4a3805d495..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/DeletePolicyBasedRouteRequest.php +++ /dev/null @@ -1,155 +0,0 @@ -google.cloud.networkconnectivity.v1.DeletePolicyBasedRouteRequest - */ -class DeletePolicyBasedRouteRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the PolicyBasedRoute resource to delete. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param string $name Required. Name of the PolicyBasedRoute resource to delete. Please see - * {@see PolicyBasedRoutingServiceClient::policyBasedRouteName()} for help formatting this field. - * - * @return \Google\Cloud\NetworkConnectivity\V1\DeletePolicyBasedRouteRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the PolicyBasedRoute resource to delete. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkconnectivity\V1\PolicyBasedRouting::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the PolicyBasedRoute resource to delete. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the PolicyBasedRoute resource to delete. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/DeleteSpokeRequest.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/DeleteSpokeRequest.php deleted file mode 100644 index 647e4efa1128..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/DeleteSpokeRequest.php +++ /dev/null @@ -1,160 +0,0 @@ -google.cloud.networkconnectivity.v1.DeleteSpokeRequest - */ -class DeleteSpokeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the spoke to delete. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. A request ID to identify requests. Specify a unique request ID so - * that if you must retry your request, the server knows to ignore the request - * if it has already been completed. The server guarantees that a request - * doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check to see whether the original operation - * was received. If it was, the server ignores the second request. This - * behavior prevents clients from mistakenly creating duplicate commitments. - * The request ID must be a valid UUID, with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param string $name Required. The name of the spoke to delete. Please see - * {@see HubServiceClient::spokeName()} for help formatting this field. - * - * @return \Google\Cloud\NetworkConnectivity\V1\DeleteSpokeRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the spoke to delete. - * @type string $request_id - * Optional. A request ID to identify requests. Specify a unique request ID so - * that if you must retry your request, the server knows to ignore the request - * if it has already been completed. The server guarantees that a request - * doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check to see whether the original operation - * was received. If it was, the server ignores the second request. This - * behavior prevents clients from mistakenly creating duplicate commitments. - * The request ID must be a valid UUID, with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the spoke to delete. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the spoke to delete. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID so - * that if you must retry your request, the server knows to ignore the request - * if it has already been completed. The server guarantees that a request - * doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check to see whether the original operation - * was received. If it was, the server ignores the second request. This - * behavior prevents clients from mistakenly creating duplicate commitments. - * The request ID must be a valid UUID, with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID so - * that if you must retry your request, the server knows to ignore the request - * if it has already been completed. The server guarantees that a request - * doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check to see whether the original operation - * was received. If it was, the server ignores the second request. This - * behavior prevents clients from mistakenly creating duplicate commitments. - * The request ID must be a valid UUID, with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/GetGroupRequest.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/GetGroupRequest.php deleted file mode 100644 index b81f16b129b7..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/GetGroupRequest.php +++ /dev/null @@ -1,82 +0,0 @@ -google.cloud.networkconnectivity.v1.GetGroupRequest - */ -class GetGroupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the route table resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the route table resource. Please see - * {@see HubServiceClient::groupName()} for help formatting this field. - * - * @return \Google\Cloud\NetworkConnectivity\V1\GetGroupRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the route table resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the route table resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the route table resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/GetHubRequest.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/GetHubRequest.php deleted file mode 100644 index 71dba213b11a..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/GetHubRequest.php +++ /dev/null @@ -1,83 +0,0 @@ -google.cloud.networkconnectivity.v1.GetHubRequest - */ -class GetHubRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the hub resource to get. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the hub resource to get. Please see - * {@see HubServiceClient::hubName()} for help formatting this field. - * - * @return \Google\Cloud\NetworkConnectivity\V1\GetHubRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the hub resource to get. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the hub resource to get. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the hub resource to get. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/GetPolicyBasedRouteRequest.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/GetPolicyBasedRouteRequest.php deleted file mode 100644 index c86de4e35afd..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/GetPolicyBasedRouteRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.networkconnectivity.v1.GetPolicyBasedRouteRequest - */ -class GetPolicyBasedRouteRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the PolicyBasedRoute resource to get. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Name of the PolicyBasedRoute resource to get. Please see - * {@see PolicyBasedRoutingServiceClient::policyBasedRouteName()} for help formatting this field. - * - * @return \Google\Cloud\NetworkConnectivity\V1\GetPolicyBasedRouteRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the PolicyBasedRoute resource to get. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkconnectivity\V1\PolicyBasedRouting::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the PolicyBasedRoute resource to get. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the PolicyBasedRoute resource to get. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/GetRouteRequest.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/GetRouteRequest.php deleted file mode 100644 index beaedda82648..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/GetRouteRequest.php +++ /dev/null @@ -1,82 +0,0 @@ -google.cloud.networkconnectivity.v1.GetRouteRequest - */ -class GetRouteRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the route resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the route resource. Please see - * {@see HubServiceClient::hubRouteName()} for help formatting this field. - * - * @return \Google\Cloud\NetworkConnectivity\V1\GetRouteRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the route resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the route resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the route resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/GetRouteTableRequest.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/GetRouteTableRequest.php deleted file mode 100644 index bea2175034fb..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/GetRouteTableRequest.php +++ /dev/null @@ -1,82 +0,0 @@ -google.cloud.networkconnectivity.v1.GetRouteTableRequest - */ -class GetRouteTableRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the route table resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the route table resource. Please see - * {@see HubServiceClient::routeTableName()} for help formatting this field. - * - * @return \Google\Cloud\NetworkConnectivity\V1\GetRouteTableRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the route table resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the route table resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the route table resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/GetSpokeRequest.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/GetSpokeRequest.php deleted file mode 100644 index bd9bbd634b42..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/GetSpokeRequest.php +++ /dev/null @@ -1,82 +0,0 @@ -google.cloud.networkconnectivity.v1.GetSpokeRequest - */ -class GetSpokeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the spoke resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the spoke resource. Please see - * {@see HubServiceClient::spokeName()} for help formatting this field. - * - * @return \Google\Cloud\NetworkConnectivity\V1\GetSpokeRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the spoke resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the spoke resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the spoke resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/Group.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/Group.php deleted file mode 100644 index b13397c41ba0..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/Group.php +++ /dev/null @@ -1,405 +0,0 @@ -google.cloud.networkconnectivity.v1.Group - */ -class Group extends \Google\Protobuf\Internal\Message -{ - /** - * Immutable. The name of the group. Group names must be unique. They - * use the following form: - * `projects/{project_number}/locations/global/hubs/{hub}/groups/{group_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $name = ''; - /** - * Output only. The time the group was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time the group was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Optional. Labels in key-value pair format. For more information about - * labels, see [Requirements for - * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements). - * - * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - /** - * Optional. The description of the group. - * - * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Output only. The Google-generated UUID for the group. This value is unique - * across all group resources. If a group is deleted and - * another with the same name is created, the new route table is assigned - * a different unique_id. - * - * Generated from protobuf field string uid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - /** - * Output only. The current lifecycle state of this group. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Optional. The auto-accept setting for this group. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.AutoAccept auto_accept = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $auto_accept = null; - /** - * Output only. The name of the route table that corresponds to this group. - * They use the following form: - * `projects/{project_number}/locations/global/hubs/{hub_id}/routeTables/{route_table_id}` - * - * Generated from protobuf field string route_table = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $route_table = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Immutable. The name of the group. Group names must be unique. They - * use the following form: - * `projects/{project_number}/locations/global/hubs/{hub}/groups/{group_id}` - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time the group was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The time the group was last updated. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. Labels in key-value pair format. For more information about - * labels, see [Requirements for - * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements). - * @type string $description - * Optional. The description of the group. - * @type string $uid - * Output only. The Google-generated UUID for the group. This value is unique - * across all group resources. If a group is deleted and - * another with the same name is created, the new route table is assigned - * a different unique_id. - * @type int $state - * Output only. The current lifecycle state of this group. - * @type \Google\Cloud\NetworkConnectivity\V1\AutoAccept $auto_accept - * Optional. The auto-accept setting for this group. - * @type string $route_table - * Output only. The name of the route table that corresponds to this group. - * They use the following form: - * `projects/{project_number}/locations/global/hubs/{hub_id}/routeTables/{route_table_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); - parent::__construct($data); - } - - /** - * Immutable. The name of the group. Group names must be unique. They - * use the following form: - * `projects/{project_number}/locations/global/hubs/{hub}/groups/{group_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Immutable. The name of the group. Group names must be unique. They - * use the following form: - * `projects/{project_number}/locations/global/hubs/{hub}/groups/{group_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. The time the group was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The time the group was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The time the group was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The time the group was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Optional. Labels in key-value pair format. For more information about - * labels, see [Requirements for - * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements). - * - * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. Labels in key-value pair format. For more information about - * labels, see [Requirements for - * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements). - * - * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Optional. The description of the group. - * - * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. The description of the group. - * - * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Output only. The Google-generated UUID for the group. This value is unique - * across all group resources. If a group is deleted and - * another with the same name is created, the new route table is assigned - * a different unique_id. - * - * Generated from protobuf field string uid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. The Google-generated UUID for the group. This value is unique - * across all group resources. If a group is deleted and - * another with the same name is created, the new route table is assigned - * a different unique_id. - * - * Generated from protobuf field string uid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkString($var, True); - $this->uid = $var; - - return $this; - } - - /** - * Output only. The current lifecycle state of this group. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The current lifecycle state of this group. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\NetworkConnectivity\V1\State::class); - $this->state = $var; - - return $this; - } - - /** - * Optional. The auto-accept setting for this group. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.AutoAccept auto_accept = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\NetworkConnectivity\V1\AutoAccept|null - */ - public function getAutoAccept() - { - return $this->auto_accept; - } - - public function hasAutoAccept() - { - return isset($this->auto_accept); - } - - public function clearAutoAccept() - { - unset($this->auto_accept); - } - - /** - * Optional. The auto-accept setting for this group. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.AutoAccept auto_accept = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\NetworkConnectivity\V1\AutoAccept $var - * @return $this - */ - public function setAutoAccept($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkConnectivity\V1\AutoAccept::class); - $this->auto_accept = $var; - - return $this; - } - - /** - * Output only. The name of the route table that corresponds to this group. - * They use the following form: - * `projects/{project_number}/locations/global/hubs/{hub_id}/routeTables/{route_table_id}` - * - * Generated from protobuf field string route_table = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getRouteTable() - { - return $this->route_table; - } - - /** - * Output only. The name of the route table that corresponds to this group. - * They use the following form: - * `projects/{project_number}/locations/global/hubs/{hub_id}/routeTables/{route_table_id}` - * - * Generated from protobuf field string route_table = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setRouteTable($var) - { - GPBUtil::checkString($var, True); - $this->route_table = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/Hub.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/Hub.php deleted file mode 100644 index b6c849960ad8..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/Hub.php +++ /dev/null @@ -1,620 +0,0 @@ -google.cloud.networkconnectivity.v1.Hub - */ -class Hub extends \Google\Protobuf\Internal\Message -{ - /** - * Immutable. The name of the hub. Hub names must be unique. They use the - * following form: - * `projects/{project_number}/locations/global/hubs/{hub_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $name = ''; - /** - * Output only. The time the hub was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time the hub was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Optional labels in key-value pair format. For more information about - * labels, see [Requirements for - * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements). - * - * Generated from protobuf field map labels = 4; - */ - private $labels; - /** - * An optional description of the hub. - * - * Generated from protobuf field string description = 5; - */ - protected $description = ''; - /** - * Output only. The Google-generated UUID for the hub. This value is unique - * across all hub resources. If a hub is deleted and another with the same - * name is created, the new hub is assigned a different unique_id. - * - * Generated from protobuf field string unique_id = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $unique_id = ''; - /** - * Output only. The current lifecycle state of this hub. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * The VPC networks associated with this hub's spokes. - * This field is read-only. Network Connectivity Center automatically - * populates it based on the set of spokes attached to the hub. - * - * Generated from protobuf field repeated .google.cloud.networkconnectivity.v1.RoutingVPC routing_vpcs = 10; - */ - private $routing_vpcs; - /** - * Output only. The route tables that belong to this hub. They use the - * following form: - * `projects/{project_number}/locations/global/hubs/{hub_id}/routeTables/{route_table_id}` - * This field is read-only. Network Connectivity Center automatically - * populates it based on the route tables nested under the hub. - * - * Generated from protobuf field repeated string route_tables = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $route_tables; - /** - * Output only. A summary of the spokes associated with a hub. The - * summary includes a count of spokes according to type - * and according to state. If any spokes are inactive, - * the summary also lists the reasons they are inactive, - * including a count for each reason. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.SpokeSummary spoke_summary = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $spoke_summary = null; - /** - * Optional. The policy mode of this hub. This field can be either - * PRESET or CUSTOM. If unspecified, the - * policy_mode defaults to PRESET. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.PolicyMode policy_mode = 13 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $policy_mode = 0; - /** - * Optional. The topology implemented in this hub. Currently, this field is - * only used when policy_mode = PRESET. The available preset topologies are - * MESH and STAR. If preset_topology is unspecified and policy_mode = PRESET, - * the preset_topology defaults to MESH. When policy_mode = CUSTOM, - * the preset_topology is set to PRESET_TOPOLOGY_UNSPECIFIED. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.PresetTopology preset_topology = 14 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $preset_topology = 0; - /** - * Optional. Whether Private Service Connect transitivity is enabled for the - * hub. If true, Private Service Connect endpoints in VPC spokes attached to - * the hub are made accessible to other VPC spokes attached to the hub. - * The default value is false. - * - * Generated from protobuf field optional bool export_psc = 15 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $export_psc = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Immutable. The name of the hub. Hub names must be unique. They use the - * following form: - * `projects/{project_number}/locations/global/hubs/{hub_id}` - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time the hub was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The time the hub was last updated. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional labels in key-value pair format. For more information about - * labels, see [Requirements for - * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements). - * @type string $description - * An optional description of the hub. - * @type string $unique_id - * Output only. The Google-generated UUID for the hub. This value is unique - * across all hub resources. If a hub is deleted and another with the same - * name is created, the new hub is assigned a different unique_id. - * @type int $state - * Output only. The current lifecycle state of this hub. - * @type array<\Google\Cloud\NetworkConnectivity\V1\RoutingVPC>|\Google\Protobuf\Internal\RepeatedField $routing_vpcs - * The VPC networks associated with this hub's spokes. - * This field is read-only. Network Connectivity Center automatically - * populates it based on the set of spokes attached to the hub. - * @type array|\Google\Protobuf\Internal\RepeatedField $route_tables - * Output only. The route tables that belong to this hub. They use the - * following form: - * `projects/{project_number}/locations/global/hubs/{hub_id}/routeTables/{route_table_id}` - * This field is read-only. Network Connectivity Center automatically - * populates it based on the route tables nested under the hub. - * @type \Google\Cloud\NetworkConnectivity\V1\SpokeSummary $spoke_summary - * Output only. A summary of the spokes associated with a hub. The - * summary includes a count of spokes according to type - * and according to state. If any spokes are inactive, - * the summary also lists the reasons they are inactive, - * including a count for each reason. - * @type int $policy_mode - * Optional. The policy mode of this hub. This field can be either - * PRESET or CUSTOM. If unspecified, the - * policy_mode defaults to PRESET. - * @type int $preset_topology - * Optional. The topology implemented in this hub. Currently, this field is - * only used when policy_mode = PRESET. The available preset topologies are - * MESH and STAR. If preset_topology is unspecified and policy_mode = PRESET, - * the preset_topology defaults to MESH. When policy_mode = CUSTOM, - * the preset_topology is set to PRESET_TOPOLOGY_UNSPECIFIED. - * @type bool $export_psc - * Optional. Whether Private Service Connect transitivity is enabled for the - * hub. If true, Private Service Connect endpoints in VPC spokes attached to - * the hub are made accessible to other VPC spokes attached to the hub. - * The default value is false. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); - parent::__construct($data); - } - - /** - * Immutable. The name of the hub. Hub names must be unique. They use the - * following form: - * `projects/{project_number}/locations/global/hubs/{hub_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Immutable. The name of the hub. Hub names must be unique. They use the - * following form: - * `projects/{project_number}/locations/global/hubs/{hub_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. The time the hub was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The time the hub was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The time the hub was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The time the hub was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Optional labels in key-value pair format. For more information about - * labels, see [Requirements for - * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements). - * - * Generated from protobuf field map labels = 4; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional labels in key-value pair format. For more information about - * labels, see [Requirements for - * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements). - * - * Generated from protobuf field map labels = 4; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * An optional description of the hub. - * - * Generated from protobuf field string description = 5; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * An optional description of the hub. - * - * Generated from protobuf field string description = 5; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Output only. The Google-generated UUID for the hub. This value is unique - * across all hub resources. If a hub is deleted and another with the same - * name is created, the new hub is assigned a different unique_id. - * - * Generated from protobuf field string unique_id = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUniqueId() - { - return $this->unique_id; - } - - /** - * Output only. The Google-generated UUID for the hub. This value is unique - * across all hub resources. If a hub is deleted and another with the same - * name is created, the new hub is assigned a different unique_id. - * - * Generated from protobuf field string unique_id = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUniqueId($var) - { - GPBUtil::checkString($var, True); - $this->unique_id = $var; - - return $this; - } - - /** - * Output only. The current lifecycle state of this hub. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The current lifecycle state of this hub. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\NetworkConnectivity\V1\State::class); - $this->state = $var; - - return $this; - } - - /** - * The VPC networks associated with this hub's spokes. - * This field is read-only. Network Connectivity Center automatically - * populates it based on the set of spokes attached to the hub. - * - * Generated from protobuf field repeated .google.cloud.networkconnectivity.v1.RoutingVPC routing_vpcs = 10; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRoutingVpcs() - { - return $this->routing_vpcs; - } - - /** - * The VPC networks associated with this hub's spokes. - * This field is read-only. Network Connectivity Center automatically - * populates it based on the set of spokes attached to the hub. - * - * Generated from protobuf field repeated .google.cloud.networkconnectivity.v1.RoutingVPC routing_vpcs = 10; - * @param array<\Google\Cloud\NetworkConnectivity\V1\RoutingVPC>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRoutingVpcs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkConnectivity\V1\RoutingVPC::class); - $this->routing_vpcs = $arr; - - return $this; - } - - /** - * Output only. The route tables that belong to this hub. They use the - * following form: - * `projects/{project_number}/locations/global/hubs/{hub_id}/routeTables/{route_table_id}` - * This field is read-only. Network Connectivity Center automatically - * populates it based on the route tables nested under the hub. - * - * Generated from protobuf field repeated string route_tables = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRouteTables() - { - return $this->route_tables; - } - - /** - * Output only. The route tables that belong to this hub. They use the - * following form: - * `projects/{project_number}/locations/global/hubs/{hub_id}/routeTables/{route_table_id}` - * This field is read-only. Network Connectivity Center automatically - * populates it based on the route tables nested under the hub. - * - * Generated from protobuf field repeated string route_tables = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRouteTables($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->route_tables = $arr; - - return $this; - } - - /** - * Output only. A summary of the spokes associated with a hub. The - * summary includes a count of spokes according to type - * and according to state. If any spokes are inactive, - * the summary also lists the reasons they are inactive, - * including a count for each reason. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.SpokeSummary spoke_summary = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\NetworkConnectivity\V1\SpokeSummary|null - */ - public function getSpokeSummary() - { - return $this->spoke_summary; - } - - public function hasSpokeSummary() - { - return isset($this->spoke_summary); - } - - public function clearSpokeSummary() - { - unset($this->spoke_summary); - } - - /** - * Output only. A summary of the spokes associated with a hub. The - * summary includes a count of spokes according to type - * and according to state. If any spokes are inactive, - * the summary also lists the reasons they are inactive, - * including a count for each reason. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.SpokeSummary spoke_summary = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\NetworkConnectivity\V1\SpokeSummary $var - * @return $this - */ - public function setSpokeSummary($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkConnectivity\V1\SpokeSummary::class); - $this->spoke_summary = $var; - - return $this; - } - - /** - * Optional. The policy mode of this hub. This field can be either - * PRESET or CUSTOM. If unspecified, the - * policy_mode defaults to PRESET. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.PolicyMode policy_mode = 13 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPolicyMode() - { - return $this->policy_mode; - } - - /** - * Optional. The policy mode of this hub. This field can be either - * PRESET or CUSTOM. If unspecified, the - * policy_mode defaults to PRESET. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.PolicyMode policy_mode = 13 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPolicyMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\NetworkConnectivity\V1\PolicyMode::class); - $this->policy_mode = $var; - - return $this; - } - - /** - * Optional. The topology implemented in this hub. Currently, this field is - * only used when policy_mode = PRESET. The available preset topologies are - * MESH and STAR. If preset_topology is unspecified and policy_mode = PRESET, - * the preset_topology defaults to MESH. When policy_mode = CUSTOM, - * the preset_topology is set to PRESET_TOPOLOGY_UNSPECIFIED. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.PresetTopology preset_topology = 14 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPresetTopology() - { - return $this->preset_topology; - } - - /** - * Optional. The topology implemented in this hub. Currently, this field is - * only used when policy_mode = PRESET. The available preset topologies are - * MESH and STAR. If preset_topology is unspecified and policy_mode = PRESET, - * the preset_topology defaults to MESH. When policy_mode = CUSTOM, - * the preset_topology is set to PRESET_TOPOLOGY_UNSPECIFIED. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.PresetTopology preset_topology = 14 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPresetTopology($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\NetworkConnectivity\V1\PresetTopology::class); - $this->preset_topology = $var; - - return $this; - } - - /** - * Optional. Whether Private Service Connect transitivity is enabled for the - * hub. If true, Private Service Connect endpoints in VPC spokes attached to - * the hub are made accessible to other VPC spokes attached to the hub. - * The default value is false. - * - * Generated from protobuf field optional bool export_psc = 15 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getExportPsc() - { - return isset($this->export_psc) ? $this->export_psc : false; - } - - public function hasExportPsc() - { - return isset($this->export_psc); - } - - public function clearExportPsc() - { - unset($this->export_psc); - } - - /** - * Optional. Whether Private Service Connect transitivity is enabled for the - * hub. If true, Private Service Connect endpoints in VPC spokes attached to - * the hub are made accessible to other VPC spokes attached to the hub. - * The default value is false. - * - * Generated from protobuf field optional bool export_psc = 15 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setExportPsc($var) - { - GPBUtil::checkBool($var); - $this->export_psc = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/HubStatusEntry.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/HubStatusEntry.php deleted file mode 100644 index b4bc5e82a6ab..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/HubStatusEntry.php +++ /dev/null @@ -1,158 +0,0 @@ -google.cloud.networkconnectivity.v1.HubStatusEntry - */ -class HubStatusEntry extends \Google\Protobuf\Internal\Message -{ - /** - * The number of propagated Private Service Connect connections with this - * status. If the `group_by` field was not set in the request message, the - * value of this field is 1. - * - * Generated from protobuf field int32 count = 1; - */ - protected $count = 0; - /** - * The fields that this entry is grouped by. This has the same value as the - * `group_by` field in the request message. - * - * Generated from protobuf field string group_by = 2; - */ - protected $group_by = ''; - /** - * The Private Service Connect propagation status. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.PscPropagationStatus psc_propagation_status = 3; - */ - protected $psc_propagation_status = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $count - * The number of propagated Private Service Connect connections with this - * status. If the `group_by` field was not set in the request message, the - * value of this field is 1. - * @type string $group_by - * The fields that this entry is grouped by. This has the same value as the - * `group_by` field in the request message. - * @type \Google\Cloud\NetworkConnectivity\V1\PscPropagationStatus $psc_propagation_status - * The Private Service Connect propagation status. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); - parent::__construct($data); - } - - /** - * The number of propagated Private Service Connect connections with this - * status. If the `group_by` field was not set in the request message, the - * value of this field is 1. - * - * Generated from protobuf field int32 count = 1; - * @return int - */ - public function getCount() - { - return $this->count; - } - - /** - * The number of propagated Private Service Connect connections with this - * status. If the `group_by` field was not set in the request message, the - * value of this field is 1. - * - * Generated from protobuf field int32 count = 1; - * @param int $var - * @return $this - */ - public function setCount($var) - { - GPBUtil::checkInt32($var); - $this->count = $var; - - return $this; - } - - /** - * The fields that this entry is grouped by. This has the same value as the - * `group_by` field in the request message. - * - * Generated from protobuf field string group_by = 2; - * @return string - */ - public function getGroupBy() - { - return $this->group_by; - } - - /** - * The fields that this entry is grouped by. This has the same value as the - * `group_by` field in the request message. - * - * Generated from protobuf field string group_by = 2; - * @param string $var - * @return $this - */ - public function setGroupBy($var) - { - GPBUtil::checkString($var, True); - $this->group_by = $var; - - return $this; - } - - /** - * The Private Service Connect propagation status. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.PscPropagationStatus psc_propagation_status = 3; - * @return \Google\Cloud\NetworkConnectivity\V1\PscPropagationStatus|null - */ - public function getPscPropagationStatus() - { - return $this->psc_propagation_status; - } - - public function hasPscPropagationStatus() - { - return isset($this->psc_propagation_status); - } - - public function clearPscPropagationStatus() - { - unset($this->psc_propagation_status); - } - - /** - * The Private Service Connect propagation status. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.PscPropagationStatus psc_propagation_status = 3; - * @param \Google\Cloud\NetworkConnectivity\V1\PscPropagationStatus $var - * @return $this - */ - public function setPscPropagationStatus($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkConnectivity\V1\PscPropagationStatus::class); - $this->psc_propagation_status = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/LinkedInterconnectAttachments.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/LinkedInterconnectAttachments.php deleted file mode 100644 index 4d4ccdaf5b9d..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/LinkedInterconnectAttachments.php +++ /dev/null @@ -1,188 +0,0 @@ -google.cloud.networkconnectivity.v1.LinkedInterconnectAttachments - */ -class LinkedInterconnectAttachments extends \Google\Protobuf\Internal\Message -{ - /** - * The URIs of linked interconnect attachment resources - * - * Generated from protobuf field repeated string uris = 1 [(.google.api.resource_reference) = { - */ - private $uris; - /** - * A value that controls whether site-to-site data transfer is enabled for - * these resources. Data transfer is available only in [supported - * locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations). - * - * Generated from protobuf field bool site_to_site_data_transfer = 2; - */ - protected $site_to_site_data_transfer = false; - /** - * Output only. The VPC network where these VLAN attachments are located. - * - * Generated from protobuf field string vpc_network = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $vpc_network = ''; - /** - * Optional. IP ranges allowed to be included during import from hub (does not - * control transit connectivity). The only allowed value for now is - * "ALL_IPV4_RANGES". - * - * Generated from protobuf field repeated string include_import_ranges = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $include_import_ranges; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $uris - * The URIs of linked interconnect attachment resources - * @type bool $site_to_site_data_transfer - * A value that controls whether site-to-site data transfer is enabled for - * these resources. Data transfer is available only in [supported - * locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations). - * @type string $vpc_network - * Output only. The VPC network where these VLAN attachments are located. - * @type array|\Google\Protobuf\Internal\RepeatedField $include_import_ranges - * Optional. IP ranges allowed to be included during import from hub (does not - * control transit connectivity). The only allowed value for now is - * "ALL_IPV4_RANGES". - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); - parent::__construct($data); - } - - /** - * The URIs of linked interconnect attachment resources - * - * Generated from protobuf field repeated string uris = 1 [(.google.api.resource_reference) = { - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUris() - { - return $this->uris; - } - - /** - * The URIs of linked interconnect attachment resources - * - * Generated from protobuf field repeated string uris = 1 [(.google.api.resource_reference) = { - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUris($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->uris = $arr; - - return $this; - } - - /** - * A value that controls whether site-to-site data transfer is enabled for - * these resources. Data transfer is available only in [supported - * locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations). - * - * Generated from protobuf field bool site_to_site_data_transfer = 2; - * @return bool - */ - public function getSiteToSiteDataTransfer() - { - return $this->site_to_site_data_transfer; - } - - /** - * A value that controls whether site-to-site data transfer is enabled for - * these resources. Data transfer is available only in [supported - * locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations). - * - * Generated from protobuf field bool site_to_site_data_transfer = 2; - * @param bool $var - * @return $this - */ - public function setSiteToSiteDataTransfer($var) - { - GPBUtil::checkBool($var); - $this->site_to_site_data_transfer = $var; - - return $this; - } - - /** - * Output only. The VPC network where these VLAN attachments are located. - * - * Generated from protobuf field string vpc_network = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getVpcNetwork() - { - return $this->vpc_network; - } - - /** - * Output only. The VPC network where these VLAN attachments are located. - * - * Generated from protobuf field string vpc_network = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setVpcNetwork($var) - { - GPBUtil::checkString($var, True); - $this->vpc_network = $var; - - return $this; - } - - /** - * Optional. IP ranges allowed to be included during import from hub (does not - * control transit connectivity). The only allowed value for now is - * "ALL_IPV4_RANGES". - * - * Generated from protobuf field repeated string include_import_ranges = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getIncludeImportRanges() - { - return $this->include_import_ranges; - } - - /** - * Optional. IP ranges allowed to be included during import from hub (does not - * control transit connectivity). The only allowed value for now is - * "ALL_IPV4_RANGES". - * - * Generated from protobuf field repeated string include_import_ranges = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setIncludeImportRanges($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->include_import_ranges = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/LinkedProducerVpcNetwork.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/LinkedProducerVpcNetwork.php deleted file mode 100644 index bdf9e96486cf..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/LinkedProducerVpcNetwork.php +++ /dev/null @@ -1,247 +0,0 @@ -google.cloud.networkconnectivity.v1.LinkedProducerVpcNetwork - */ -class LinkedProducerVpcNetwork extends \Google\Protobuf\Internal\Message -{ - /** - * Immutable. The URI of the Service Consumer VPC that the Producer VPC is - * peered with. - * - * Generated from protobuf field string network = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { - */ - protected $network = ''; - /** - * Output only. The Service Consumer Network spoke. - * - * Generated from protobuf field string service_consumer_vpc_spoke = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $service_consumer_vpc_spoke = ''; - /** - * Immutable. The name of the VPC peering between the Service Consumer VPC and - * the Producer VPC (defined in the Tenant project) which is added to the NCC - * hub. This peering must be in ACTIVE state. - * - * Generated from protobuf field string peering = 2 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $peering = ''; - /** - * Output only. The URI of the Producer VPC. - * - * Generated from protobuf field string producer_network = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $producer_network = ''; - /** - * Optional. IP ranges encompassing the subnets to be excluded from peering. - * - * Generated from protobuf field repeated string exclude_export_ranges = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $exclude_export_ranges; - /** - * Optional. IP ranges allowed to be included from peering. - * - * Generated from protobuf field repeated string include_export_ranges = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $include_export_ranges; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $network - * Immutable. The URI of the Service Consumer VPC that the Producer VPC is - * peered with. - * @type string $service_consumer_vpc_spoke - * Output only. The Service Consumer Network spoke. - * @type string $peering - * Immutable. The name of the VPC peering between the Service Consumer VPC and - * the Producer VPC (defined in the Tenant project) which is added to the NCC - * hub. This peering must be in ACTIVE state. - * @type string $producer_network - * Output only. The URI of the Producer VPC. - * @type array|\Google\Protobuf\Internal\RepeatedField $exclude_export_ranges - * Optional. IP ranges encompassing the subnets to be excluded from peering. - * @type array|\Google\Protobuf\Internal\RepeatedField $include_export_ranges - * Optional. IP ranges allowed to be included from peering. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); - parent::__construct($data); - } - - /** - * Immutable. The URI of the Service Consumer VPC that the Producer VPC is - * peered with. - * - * Generated from protobuf field string network = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { - * @return string - */ - public function getNetwork() - { - return $this->network; - } - - /** - * Immutable. The URI of the Service Consumer VPC that the Producer VPC is - * peered with. - * - * Generated from protobuf field string network = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setNetwork($var) - { - GPBUtil::checkString($var, True); - $this->network = $var; - - return $this; - } - - /** - * Output only. The Service Consumer Network spoke. - * - * Generated from protobuf field string service_consumer_vpc_spoke = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getServiceConsumerVpcSpoke() - { - return $this->service_consumer_vpc_spoke; - } - - /** - * Output only. The Service Consumer Network spoke. - * - * Generated from protobuf field string service_consumer_vpc_spoke = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setServiceConsumerVpcSpoke($var) - { - GPBUtil::checkString($var, True); - $this->service_consumer_vpc_spoke = $var; - - return $this; - } - - /** - * Immutable. The name of the VPC peering between the Service Consumer VPC and - * the Producer VPC (defined in the Tenant project) which is added to the NCC - * hub. This peering must be in ACTIVE state. - * - * Generated from protobuf field string peering = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getPeering() - { - return $this->peering; - } - - /** - * Immutable. The name of the VPC peering between the Service Consumer VPC and - * the Producer VPC (defined in the Tenant project) which is added to the NCC - * hub. This peering must be in ACTIVE state. - * - * Generated from protobuf field string peering = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setPeering($var) - { - GPBUtil::checkString($var, True); - $this->peering = $var; - - return $this; - } - - /** - * Output only. The URI of the Producer VPC. - * - * Generated from protobuf field string producer_network = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getProducerNetwork() - { - return $this->producer_network; - } - - /** - * Output only. The URI of the Producer VPC. - * - * Generated from protobuf field string producer_network = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setProducerNetwork($var) - { - GPBUtil::checkString($var, True); - $this->producer_network = $var; - - return $this; - } - - /** - * Optional. IP ranges encompassing the subnets to be excluded from peering. - * - * Generated from protobuf field repeated string exclude_export_ranges = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getExcludeExportRanges() - { - return $this->exclude_export_ranges; - } - - /** - * Optional. IP ranges encompassing the subnets to be excluded from peering. - * - * Generated from protobuf field repeated string exclude_export_ranges = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setExcludeExportRanges($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->exclude_export_ranges = $arr; - - return $this; - } - - /** - * Optional. IP ranges allowed to be included from peering. - * - * Generated from protobuf field repeated string include_export_ranges = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getIncludeExportRanges() - { - return $this->include_export_ranges; - } - - /** - * Optional. IP ranges allowed to be included from peering. - * - * Generated from protobuf field repeated string include_export_ranges = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setIncludeExportRanges($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->include_export_ranges = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/LinkedRouterApplianceInstances.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/LinkedRouterApplianceInstances.php deleted file mode 100644 index b014d55b68c9..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/LinkedRouterApplianceInstances.php +++ /dev/null @@ -1,192 +0,0 @@ -google.cloud.networkconnectivity.v1.LinkedRouterApplianceInstances - */ -class LinkedRouterApplianceInstances extends \Google\Protobuf\Internal\Message -{ - /** - * The list of router appliance instances. - * - * Generated from protobuf field repeated .google.cloud.networkconnectivity.v1.RouterApplianceInstance instances = 1; - */ - private $instances; - /** - * A value that controls whether site-to-site data transfer is enabled for - * these resources. Data transfer is available only in [supported - * locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations). - * - * Generated from protobuf field bool site_to_site_data_transfer = 2; - */ - protected $site_to_site_data_transfer = false; - /** - * Output only. The VPC network where these router appliance instances are - * located. - * - * Generated from protobuf field string vpc_network = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $vpc_network = ''; - /** - * Optional. IP ranges allowed to be included during import from hub (does not - * control transit connectivity). The only allowed value for now is - * "ALL_IPV4_RANGES". - * - * Generated from protobuf field repeated string include_import_ranges = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $include_import_ranges; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\NetworkConnectivity\V1\RouterApplianceInstance>|\Google\Protobuf\Internal\RepeatedField $instances - * The list of router appliance instances. - * @type bool $site_to_site_data_transfer - * A value that controls whether site-to-site data transfer is enabled for - * these resources. Data transfer is available only in [supported - * locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations). - * @type string $vpc_network - * Output only. The VPC network where these router appliance instances are - * located. - * @type array|\Google\Protobuf\Internal\RepeatedField $include_import_ranges - * Optional. IP ranges allowed to be included during import from hub (does not - * control transit connectivity). The only allowed value for now is - * "ALL_IPV4_RANGES". - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); - parent::__construct($data); - } - - /** - * The list of router appliance instances. - * - * Generated from protobuf field repeated .google.cloud.networkconnectivity.v1.RouterApplianceInstance instances = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getInstances() - { - return $this->instances; - } - - /** - * The list of router appliance instances. - * - * Generated from protobuf field repeated .google.cloud.networkconnectivity.v1.RouterApplianceInstance instances = 1; - * @param array<\Google\Cloud\NetworkConnectivity\V1\RouterApplianceInstance>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setInstances($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkConnectivity\V1\RouterApplianceInstance::class); - $this->instances = $arr; - - return $this; - } - - /** - * A value that controls whether site-to-site data transfer is enabled for - * these resources. Data transfer is available only in [supported - * locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations). - * - * Generated from protobuf field bool site_to_site_data_transfer = 2; - * @return bool - */ - public function getSiteToSiteDataTransfer() - { - return $this->site_to_site_data_transfer; - } - - /** - * A value that controls whether site-to-site data transfer is enabled for - * these resources. Data transfer is available only in [supported - * locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations). - * - * Generated from protobuf field bool site_to_site_data_transfer = 2; - * @param bool $var - * @return $this - */ - public function setSiteToSiteDataTransfer($var) - { - GPBUtil::checkBool($var); - $this->site_to_site_data_transfer = $var; - - return $this; - } - - /** - * Output only. The VPC network where these router appliance instances are - * located. - * - * Generated from protobuf field string vpc_network = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getVpcNetwork() - { - return $this->vpc_network; - } - - /** - * Output only. The VPC network where these router appliance instances are - * located. - * - * Generated from protobuf field string vpc_network = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setVpcNetwork($var) - { - GPBUtil::checkString($var, True); - $this->vpc_network = $var; - - return $this; - } - - /** - * Optional. IP ranges allowed to be included during import from hub (does not - * control transit connectivity). The only allowed value for now is - * "ALL_IPV4_RANGES". - * - * Generated from protobuf field repeated string include_import_ranges = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getIncludeImportRanges() - { - return $this->include_import_ranges; - } - - /** - * Optional. IP ranges allowed to be included during import from hub (does not - * control transit connectivity). The only allowed value for now is - * "ALL_IPV4_RANGES". - * - * Generated from protobuf field repeated string include_import_ranges = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setIncludeImportRanges($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->include_import_ranges = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/LinkedVpcNetwork.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/LinkedVpcNetwork.php deleted file mode 100644 index 69ef64e53839..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/LinkedVpcNetwork.php +++ /dev/null @@ -1,177 +0,0 @@ -google.cloud.networkconnectivity.v1.LinkedVpcNetwork - */ -class LinkedVpcNetwork extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The URI of the VPC network resource. - * - * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $uri = ''; - /** - * Optional. IP ranges encompassing the subnets to be excluded from peering. - * - * Generated from protobuf field repeated string exclude_export_ranges = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $exclude_export_ranges; - /** - * Optional. IP ranges allowed to be included from peering. - * - * Generated from protobuf field repeated string include_export_ranges = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $include_export_ranges; - /** - * Output only. The list of Producer VPC spokes that this VPC spoke is a - * service consumer VPC spoke for. These producer VPCs are connected through - * VPC peering to this spoke's backing VPC network. - * - * Generated from protobuf field repeated string producer_vpc_spokes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - private $producer_vpc_spokes; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $uri - * Required. The URI of the VPC network resource. - * @type array|\Google\Protobuf\Internal\RepeatedField $exclude_export_ranges - * Optional. IP ranges encompassing the subnets to be excluded from peering. - * @type array|\Google\Protobuf\Internal\RepeatedField $include_export_ranges - * Optional. IP ranges allowed to be included from peering. - * @type array|\Google\Protobuf\Internal\RepeatedField $producer_vpc_spokes - * Output only. The list of Producer VPC spokes that this VPC spoke is a - * service consumer VPC spoke for. These producer VPCs are connected through - * VPC peering to this spoke's backing VPC network. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); - parent::__construct($data); - } - - /** - * Required. The URI of the VPC network resource. - * - * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * Required. The URI of the VPC network resource. - * - * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - - /** - * Optional. IP ranges encompassing the subnets to be excluded from peering. - * - * Generated from protobuf field repeated string exclude_export_ranges = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getExcludeExportRanges() - { - return $this->exclude_export_ranges; - } - - /** - * Optional. IP ranges encompassing the subnets to be excluded from peering. - * - * Generated from protobuf field repeated string exclude_export_ranges = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setExcludeExportRanges($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->exclude_export_ranges = $arr; - - return $this; - } - - /** - * Optional. IP ranges allowed to be included from peering. - * - * Generated from protobuf field repeated string include_export_ranges = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getIncludeExportRanges() - { - return $this->include_export_ranges; - } - - /** - * Optional. IP ranges allowed to be included from peering. - * - * Generated from protobuf field repeated string include_export_ranges = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setIncludeExportRanges($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->include_export_ranges = $arr; - - return $this; - } - - /** - * Output only. The list of Producer VPC spokes that this VPC spoke is a - * service consumer VPC spoke for. These producer VPCs are connected through - * VPC peering to this spoke's backing VPC network. - * - * Generated from protobuf field repeated string producer_vpc_spokes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getProducerVpcSpokes() - { - return $this->producer_vpc_spokes; - } - - /** - * Output only. The list of Producer VPC spokes that this VPC spoke is a - * service consumer VPC spoke for. These producer VPCs are connected through - * VPC peering to this spoke's backing VPC network. - * - * Generated from protobuf field repeated string producer_vpc_spokes = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setProducerVpcSpokes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->producer_vpc_spokes = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/LinkedVpnTunnels.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/LinkedVpnTunnels.php deleted file mode 100644 index 7a91b8dd5fe5..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/LinkedVpnTunnels.php +++ /dev/null @@ -1,188 +0,0 @@ -google.cloud.networkconnectivity.v1.LinkedVpnTunnels - */ -class LinkedVpnTunnels extends \Google\Protobuf\Internal\Message -{ - /** - * The URIs of linked VPN tunnel resources. - * - * Generated from protobuf field repeated string uris = 1 [(.google.api.resource_reference) = { - */ - private $uris; - /** - * A value that controls whether site-to-site data transfer is enabled for - * these resources. Data transfer is available only in [supported - * locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations). - * - * Generated from protobuf field bool site_to_site_data_transfer = 2; - */ - protected $site_to_site_data_transfer = false; - /** - * Output only. The VPC network where these VPN tunnels are located. - * - * Generated from protobuf field string vpc_network = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $vpc_network = ''; - /** - * Optional. IP ranges allowed to be included during import from hub (does not - * control transit connectivity). The only allowed value for now is - * "ALL_IPV4_RANGES". - * - * Generated from protobuf field repeated string include_import_ranges = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $include_import_ranges; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $uris - * The URIs of linked VPN tunnel resources. - * @type bool $site_to_site_data_transfer - * A value that controls whether site-to-site data transfer is enabled for - * these resources. Data transfer is available only in [supported - * locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations). - * @type string $vpc_network - * Output only. The VPC network where these VPN tunnels are located. - * @type array|\Google\Protobuf\Internal\RepeatedField $include_import_ranges - * Optional. IP ranges allowed to be included during import from hub (does not - * control transit connectivity). The only allowed value for now is - * "ALL_IPV4_RANGES". - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); - parent::__construct($data); - } - - /** - * The URIs of linked VPN tunnel resources. - * - * Generated from protobuf field repeated string uris = 1 [(.google.api.resource_reference) = { - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUris() - { - return $this->uris; - } - - /** - * The URIs of linked VPN tunnel resources. - * - * Generated from protobuf field repeated string uris = 1 [(.google.api.resource_reference) = { - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUris($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->uris = $arr; - - return $this; - } - - /** - * A value that controls whether site-to-site data transfer is enabled for - * these resources. Data transfer is available only in [supported - * locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations). - * - * Generated from protobuf field bool site_to_site_data_transfer = 2; - * @return bool - */ - public function getSiteToSiteDataTransfer() - { - return $this->site_to_site_data_transfer; - } - - /** - * A value that controls whether site-to-site data transfer is enabled for - * these resources. Data transfer is available only in [supported - * locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations). - * - * Generated from protobuf field bool site_to_site_data_transfer = 2; - * @param bool $var - * @return $this - */ - public function setSiteToSiteDataTransfer($var) - { - GPBUtil::checkBool($var); - $this->site_to_site_data_transfer = $var; - - return $this; - } - - /** - * Output only. The VPC network where these VPN tunnels are located. - * - * Generated from protobuf field string vpc_network = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getVpcNetwork() - { - return $this->vpc_network; - } - - /** - * Output only. The VPC network where these VPN tunnels are located. - * - * Generated from protobuf field string vpc_network = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setVpcNetwork($var) - { - GPBUtil::checkString($var, True); - $this->vpc_network = $var; - - return $this; - } - - /** - * Optional. IP ranges allowed to be included during import from hub (does not - * control transit connectivity). The only allowed value for now is - * "ALL_IPV4_RANGES". - * - * Generated from protobuf field repeated string include_import_ranges = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getIncludeImportRanges() - { - return $this->include_import_ranges; - } - - /** - * Optional. IP ranges allowed to be included during import from hub (does not - * control transit connectivity). The only allowed value for now is - * "ALL_IPV4_RANGES". - * - * Generated from protobuf field repeated string include_import_ranges = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setIncludeImportRanges($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->include_import_ranges = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListGroupsRequest.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListGroupsRequest.php deleted file mode 100644 index 085e83e39803..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListGroupsRequest.php +++ /dev/null @@ -1,219 +0,0 @@ -google.cloud.networkconnectivity.v1.ListGroupsRequest - */ -class ListGroupsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource's name. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of results to return per page. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The page token. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * An expression that filters the list of results. - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - /** - * Sort the results by a certain order. - * - * Generated from protobuf field string order_by = 5; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The parent resource's name. Please see - * {@see HubServiceClient::hubName()} for help formatting this field. - * - * @return \Google\Cloud\NetworkConnectivity\V1\ListGroupsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource's name. - * @type int $page_size - * The maximum number of results to return per page. - * @type string $page_token - * The page token. - * @type string $filter - * An expression that filters the list of results. - * @type string $order_by - * Sort the results by a certain order. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource's name. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource's name. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * The maximum number of results to return per page. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of results to return per page. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * The page token. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The page token. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * An expression that filters the list of results. - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * An expression that filters the list of results. - * - * Generated from protobuf field string filter = 4; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Sort the results by a certain order. - * - * Generated from protobuf field string order_by = 5; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Sort the results by a certain order. - * - * Generated from protobuf field string order_by = 5; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListGroupsResponse.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListGroupsResponse.php deleted file mode 100644 index 46f49f57e807..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListGroupsResponse.php +++ /dev/null @@ -1,145 +0,0 @@ -google.cloud.networkconnectivity.v1.ListGroupsResponse - */ -class ListGroupsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The requested groups. - * - * Generated from protobuf field repeated .google.cloud.networkconnectivity.v1.Group groups = 1; - */ - private $groups; - /** - * The token for the next page of the response. To see more results, - * use this value as the page_token for your next request. If this value - * is empty, there are no more results. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Hubs that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\NetworkConnectivity\V1\Group>|\Google\Protobuf\Internal\RepeatedField $groups - * The requested groups. - * @type string $next_page_token - * The token for the next page of the response. To see more results, - * use this value as the page_token for your next request. If this value - * is empty, there are no more results. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Hubs that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); - parent::__construct($data); - } - - /** - * The requested groups. - * - * Generated from protobuf field repeated .google.cloud.networkconnectivity.v1.Group groups = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getGroups() - { - return $this->groups; - } - - /** - * The requested groups. - * - * Generated from protobuf field repeated .google.cloud.networkconnectivity.v1.Group groups = 1; - * @param array<\Google\Cloud\NetworkConnectivity\V1\Group>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setGroups($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkConnectivity\V1\Group::class); - $this->groups = $arr; - - return $this; - } - - /** - * The token for the next page of the response. To see more results, - * use this value as the page_token for your next request. If this value - * is empty, there are no more results. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * The token for the next page of the response. To see more results, - * use this value as the page_token for your next request. If this value - * is empty, there are no more results. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Hubs that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Hubs that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListHubSpokesRequest.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListHubSpokesRequest.php deleted file mode 100644 index 62c06d3b7a07..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListHubSpokesRequest.php +++ /dev/null @@ -1,322 +0,0 @@ -google.cloud.networkconnectivity.v1.ListHubSpokesRequest - */ -class ListHubSpokesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the hub. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * A list of locations. - * Specify one of the following: `[global]`, a single region (for - * example, `[us-central1]`), or a combination of - * values (for example, `[global, us-central1, us-west1]`). - * If the spoke_locations field is populated, the list of results - * includes only spokes in the specified location. - * If the spoke_locations field is not populated, the list of results - * includes spokes in all locations. - * - * Generated from protobuf field repeated string spoke_locations = 2; - */ - private $spoke_locations; - /** - * The maximum number of results to return per page. - * - * Generated from protobuf field int32 page_size = 3; - */ - protected $page_size = 0; - /** - * The page token. - * - * Generated from protobuf field string page_token = 4; - */ - protected $page_token = ''; - /** - * An expression that filters the list of results. - * - * Generated from protobuf field string filter = 5; - */ - protected $filter = ''; - /** - * Sort the results by name or create_time. - * - * Generated from protobuf field string order_by = 6; - */ - protected $order_by = ''; - /** - * The view of the spoke to return. - * The view that you use determines which spoke fields are included in the - * response. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.ListHubSpokesRequest.SpokeView view = 7; - */ - protected $view = 0; - - /** - * @param string $name Required. The name of the hub. Please see - * {@see HubServiceClient::hubName()} for help formatting this field. - * - * @return \Google\Cloud\NetworkConnectivity\V1\ListHubSpokesRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the hub. - * @type array|\Google\Protobuf\Internal\RepeatedField $spoke_locations - * A list of locations. - * Specify one of the following: `[global]`, a single region (for - * example, `[us-central1]`), or a combination of - * values (for example, `[global, us-central1, us-west1]`). - * If the spoke_locations field is populated, the list of results - * includes only spokes in the specified location. - * If the spoke_locations field is not populated, the list of results - * includes spokes in all locations. - * @type int $page_size - * The maximum number of results to return per page. - * @type string $page_token - * The page token. - * @type string $filter - * An expression that filters the list of results. - * @type string $order_by - * Sort the results by name or create_time. - * @type int $view - * The view of the spoke to return. - * The view that you use determines which spoke fields are included in the - * response. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the hub. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the hub. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * A list of locations. - * Specify one of the following: `[global]`, a single region (for - * example, `[us-central1]`), or a combination of - * values (for example, `[global, us-central1, us-west1]`). - * If the spoke_locations field is populated, the list of results - * includes only spokes in the specified location. - * If the spoke_locations field is not populated, the list of results - * includes spokes in all locations. - * - * Generated from protobuf field repeated string spoke_locations = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSpokeLocations() - { - return $this->spoke_locations; - } - - /** - * A list of locations. - * Specify one of the following: `[global]`, a single region (for - * example, `[us-central1]`), or a combination of - * values (for example, `[global, us-central1, us-west1]`). - * If the spoke_locations field is populated, the list of results - * includes only spokes in the specified location. - * If the spoke_locations field is not populated, the list of results - * includes spokes in all locations. - * - * Generated from protobuf field repeated string spoke_locations = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSpokeLocations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->spoke_locations = $arr; - - return $this; - } - - /** - * The maximum number of results to return per page. - * - * Generated from protobuf field int32 page_size = 3; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of results to return per page. - * - * Generated from protobuf field int32 page_size = 3; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * The page token. - * - * Generated from protobuf field string page_token = 4; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The page token. - * - * Generated from protobuf field string page_token = 4; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * An expression that filters the list of results. - * - * Generated from protobuf field string filter = 5; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * An expression that filters the list of results. - * - * Generated from protobuf field string filter = 5; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Sort the results by name or create_time. - * - * Generated from protobuf field string order_by = 6; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Sort the results by name or create_time. - * - * Generated from protobuf field string order_by = 6; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - - /** - * The view of the spoke to return. - * The view that you use determines which spoke fields are included in the - * response. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.ListHubSpokesRequest.SpokeView view = 7; - * @return int - */ - public function getView() - { - return $this->view; - } - - /** - * The view of the spoke to return. - * The view that you use determines which spoke fields are included in the - * response. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.ListHubSpokesRequest.SpokeView view = 7; - * @param int $var - * @return $this - */ - public function setView($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\NetworkConnectivity\V1\ListHubSpokesRequest\SpokeView::class); - $this->view = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListHubSpokesRequest/SpokeView.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListHubSpokesRequest/SpokeView.php deleted file mode 100644 index 2c01fda36de9..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListHubSpokesRequest/SpokeView.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.networkconnectivity.v1.ListHubSpokesRequest.SpokeView - */ -class SpokeView -{ - /** - * The spoke view is unspecified. When the spoke view is unspecified, the - * API returns the same fields as the `BASIC` view. - * - * Generated from protobuf enum SPOKE_VIEW_UNSPECIFIED = 0; - */ - const SPOKE_VIEW_UNSPECIFIED = 0; - /** - * Includes `name`, `create_time`, `hub`, `unique_id`, `state`, `reasons`, - * and `spoke_type`. This is the default value. - * - * Generated from protobuf enum BASIC = 1; - */ - const BASIC = 1; - /** - * Includes all spoke fields except `labels`. - * You can use the `DETAILED` view only when you set the `spoke_locations` - * field to `[global]`. - * - * Generated from protobuf enum DETAILED = 2; - */ - const DETAILED = 2; - - private static $valueToName = [ - self::SPOKE_VIEW_UNSPECIFIED => 'SPOKE_VIEW_UNSPECIFIED', - self::BASIC => 'BASIC', - self::DETAILED => 'DETAILED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SpokeView::class, \Google\Cloud\NetworkConnectivity\V1\ListHubSpokesRequest_SpokeView::class); - diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListHubSpokesResponse.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListHubSpokesResponse.php deleted file mode 100644 index 0cfab298026e..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListHubSpokesResponse.php +++ /dev/null @@ -1,152 +0,0 @@ -google.cloud.networkconnectivity.v1.ListHubSpokesResponse - */ -class ListHubSpokesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The requested spokes. - * The spoke fields can be partially populated based on the `view` field in - * the request message. - * - * Generated from protobuf field repeated .google.cloud.networkconnectivity.v1.Spoke spokes = 1; - */ - private $spokes; - /** - * The token for the next page of the response. To see more results, - * use this value as the page_token for your next request. If this value - * is empty, there are no more results. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\NetworkConnectivity\V1\Spoke>|\Google\Protobuf\Internal\RepeatedField $spokes - * The requested spokes. - * The spoke fields can be partially populated based on the `view` field in - * the request message. - * @type string $next_page_token - * The token for the next page of the response. To see more results, - * use this value as the page_token for your next request. If this value - * is empty, there are no more results. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); - parent::__construct($data); - } - - /** - * The requested spokes. - * The spoke fields can be partially populated based on the `view` field in - * the request message. - * - * Generated from protobuf field repeated .google.cloud.networkconnectivity.v1.Spoke spokes = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSpokes() - { - return $this->spokes; - } - - /** - * The requested spokes. - * The spoke fields can be partially populated based on the `view` field in - * the request message. - * - * Generated from protobuf field repeated .google.cloud.networkconnectivity.v1.Spoke spokes = 1; - * @param array<\Google\Cloud\NetworkConnectivity\V1\Spoke>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSpokes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkConnectivity\V1\Spoke::class); - $this->spokes = $arr; - - return $this; - } - - /** - * The token for the next page of the response. To see more results, - * use this value as the page_token for your next request. If this value - * is empty, there are no more results. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * The token for the next page of the response. To see more results, - * use this value as the page_token for your next request. If this value - * is empty, there are no more results. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListHubsRequest.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListHubsRequest.php deleted file mode 100644 index e7c1d8cb3332..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListHubsRequest.php +++ /dev/null @@ -1,219 +0,0 @@ -google.cloud.networkconnectivity.v1.ListHubsRequest - */ -class ListHubsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource's name. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of results per page to return. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The page token. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * An expression that filters the list of results. - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - /** - * Sort the results by a certain order. - * - * Generated from protobuf field string order_by = 5; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The parent resource's name. Please see - * {@see HubServiceClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\NetworkConnectivity\V1\ListHubsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource's name. - * @type int $page_size - * The maximum number of results per page to return. - * @type string $page_token - * The page token. - * @type string $filter - * An expression that filters the list of results. - * @type string $order_by - * Sort the results by a certain order. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource's name. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource's name. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * The maximum number of results per page to return. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of results per page to return. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * The page token. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The page token. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * An expression that filters the list of results. - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * An expression that filters the list of results. - * - * Generated from protobuf field string filter = 4; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Sort the results by a certain order. - * - * Generated from protobuf field string order_by = 5; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Sort the results by a certain order. - * - * Generated from protobuf field string order_by = 5; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListHubsResponse.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListHubsResponse.php deleted file mode 100644 index bf9e4e2a2c5a..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListHubsResponse.php +++ /dev/null @@ -1,145 +0,0 @@ -google.cloud.networkconnectivity.v1.ListHubsResponse - */ -class ListHubsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The requested hubs. - * - * Generated from protobuf field repeated .google.cloud.networkconnectivity.v1.Hub hubs = 1; - */ - private $hubs; - /** - * The token for the next page of the response. To see more results, - * use this value as the page_token for your next request. If this value - * is empty, there are no more results. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\NetworkConnectivity\V1\Hub>|\Google\Protobuf\Internal\RepeatedField $hubs - * The requested hubs. - * @type string $next_page_token - * The token for the next page of the response. To see more results, - * use this value as the page_token for your next request. If this value - * is empty, there are no more results. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); - parent::__construct($data); - } - - /** - * The requested hubs. - * - * Generated from protobuf field repeated .google.cloud.networkconnectivity.v1.Hub hubs = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getHubs() - { - return $this->hubs; - } - - /** - * The requested hubs. - * - * Generated from protobuf field repeated .google.cloud.networkconnectivity.v1.Hub hubs = 1; - * @param array<\Google\Cloud\NetworkConnectivity\V1\Hub>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setHubs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkConnectivity\V1\Hub::class); - $this->hubs = $arr; - - return $this; - } - - /** - * The token for the next page of the response. To see more results, - * use this value as the page_token for your next request. If this value - * is empty, there are no more results. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * The token for the next page of the response. To see more results, - * use this value as the page_token for your next request. If this value - * is empty, there are no more results. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListPolicyBasedRoutesRequest.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListPolicyBasedRoutesRequest.php deleted file mode 100644 index e8db9931970a..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListPolicyBasedRoutesRequest.php +++ /dev/null @@ -1,217 +0,0 @@ -google.cloud.networkconnectivity.v1.ListPolicyBasedRoutesRequest - */ -class ListPolicyBasedRoutesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource's name. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of results per page that should be returned. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The page token. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * A filter expression that filters the results listed in the response. - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - /** - * Sort the results by a certain order. - * - * Generated from protobuf field string order_by = 5; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The parent resource's name. Please see - * {@see PolicyBasedRoutingServiceClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\NetworkConnectivity\V1\ListPolicyBasedRoutesRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource's name. - * @type int $page_size - * The maximum number of results per page that should be returned. - * @type string $page_token - * The page token. - * @type string $filter - * A filter expression that filters the results listed in the response. - * @type string $order_by - * Sort the results by a certain order. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkconnectivity\V1\PolicyBasedRouting::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource's name. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource's name. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * The maximum number of results per page that should be returned. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of results per page that should be returned. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * The page token. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The page token. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * A filter expression that filters the results listed in the response. - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * A filter expression that filters the results listed in the response. - * - * Generated from protobuf field string filter = 4; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Sort the results by a certain order. - * - * Generated from protobuf field string order_by = 5; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Sort the results by a certain order. - * - * Generated from protobuf field string order_by = 5; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListPolicyBasedRoutesResponse.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListPolicyBasedRoutesResponse.php deleted file mode 100644 index b339ada59758..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListPolicyBasedRoutesResponse.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.networkconnectivity.v1.ListPolicyBasedRoutesResponse - */ -class ListPolicyBasedRoutesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Policy based routes to be returned. - * - * Generated from protobuf field repeated .google.cloud.networkconnectivity.v1.PolicyBasedRoute policy_based_routes = 1; - */ - private $policy_based_routes; - /** - * The next pagination token in the List response. It should be used as - * page_token for the following request. An empty value means no more result. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\NetworkConnectivity\V1\PolicyBasedRoute>|\Google\Protobuf\Internal\RepeatedField $policy_based_routes - * Policy based routes to be returned. - * @type string $next_page_token - * The next pagination token in the List response. It should be used as - * page_token for the following request. An empty value means no more result. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkconnectivity\V1\PolicyBasedRouting::initOnce(); - parent::__construct($data); - } - - /** - * Policy based routes to be returned. - * - * Generated from protobuf field repeated .google.cloud.networkconnectivity.v1.PolicyBasedRoute policy_based_routes = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPolicyBasedRoutes() - { - return $this->policy_based_routes; - } - - /** - * Policy based routes to be returned. - * - * Generated from protobuf field repeated .google.cloud.networkconnectivity.v1.PolicyBasedRoute policy_based_routes = 1; - * @param array<\Google\Cloud\NetworkConnectivity\V1\PolicyBasedRoute>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPolicyBasedRoutes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkConnectivity\V1\PolicyBasedRoute::class); - $this->policy_based_routes = $arr; - - return $this; - } - - /** - * The next pagination token in the List response. It should be used as - * page_token for the following request. An empty value means no more result. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * The next pagination token in the List response. It should be used as - * page_token for the following request. An empty value means no more result. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListRouteTablesRequest.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListRouteTablesRequest.php deleted file mode 100644 index b0611b5da8e4..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListRouteTablesRequest.php +++ /dev/null @@ -1,219 +0,0 @@ -google.cloud.networkconnectivity.v1.ListRouteTablesRequest - */ -class ListRouteTablesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource's name. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of results to return per page. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The page token. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * An expression that filters the list of results. - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - /** - * Sort the results by a certain order. - * - * Generated from protobuf field string order_by = 5; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The parent resource's name. Please see - * {@see HubServiceClient::hubName()} for help formatting this field. - * - * @return \Google\Cloud\NetworkConnectivity\V1\ListRouteTablesRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource's name. - * @type int $page_size - * The maximum number of results to return per page. - * @type string $page_token - * The page token. - * @type string $filter - * An expression that filters the list of results. - * @type string $order_by - * Sort the results by a certain order. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource's name. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource's name. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * The maximum number of results to return per page. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of results to return per page. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * The page token. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The page token. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * An expression that filters the list of results. - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * An expression that filters the list of results. - * - * Generated from protobuf field string filter = 4; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Sort the results by a certain order. - * - * Generated from protobuf field string order_by = 5; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Sort the results by a certain order. - * - * Generated from protobuf field string order_by = 5; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListRouteTablesResponse.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListRouteTablesResponse.php deleted file mode 100644 index 3e25d8233472..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListRouteTablesResponse.php +++ /dev/null @@ -1,145 +0,0 @@ -google.cloud.networkconnectivity.v1.ListRouteTablesResponse - */ -class ListRouteTablesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The requested route tables. - * - * Generated from protobuf field repeated .google.cloud.networkconnectivity.v1.RouteTable route_tables = 1; - */ - private $route_tables; - /** - * The token for the next page of the response. To see more results, - * use this value as the page_token for your next request. If this value - * is empty, there are no more results. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Hubs that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\NetworkConnectivity\V1\RouteTable>|\Google\Protobuf\Internal\RepeatedField $route_tables - * The requested route tables. - * @type string $next_page_token - * The token for the next page of the response. To see more results, - * use this value as the page_token for your next request. If this value - * is empty, there are no more results. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Hubs that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); - parent::__construct($data); - } - - /** - * The requested route tables. - * - * Generated from protobuf field repeated .google.cloud.networkconnectivity.v1.RouteTable route_tables = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRouteTables() - { - return $this->route_tables; - } - - /** - * The requested route tables. - * - * Generated from protobuf field repeated .google.cloud.networkconnectivity.v1.RouteTable route_tables = 1; - * @param array<\Google\Cloud\NetworkConnectivity\V1\RouteTable>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRouteTables($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkConnectivity\V1\RouteTable::class); - $this->route_tables = $arr; - - return $this; - } - - /** - * The token for the next page of the response. To see more results, - * use this value as the page_token for your next request. If this value - * is empty, there are no more results. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * The token for the next page of the response. To see more results, - * use this value as the page_token for your next request. If this value - * is empty, there are no more results. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Hubs that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Hubs that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListRoutesRequest.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListRoutesRequest.php deleted file mode 100644 index 3a72b0a33561..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListRoutesRequest.php +++ /dev/null @@ -1,219 +0,0 @@ -google.cloud.networkconnectivity.v1.ListRoutesRequest - */ -class ListRoutesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource's name. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of results to return per page. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The page token. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * An expression that filters the list of results. - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - /** - * Sort the results by a certain order. - * - * Generated from protobuf field string order_by = 5; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The parent resource's name. Please see - * {@see HubServiceClient::routeTableName()} for help formatting this field. - * - * @return \Google\Cloud\NetworkConnectivity\V1\ListRoutesRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource's name. - * @type int $page_size - * The maximum number of results to return per page. - * @type string $page_token - * The page token. - * @type string $filter - * An expression that filters the list of results. - * @type string $order_by - * Sort the results by a certain order. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource's name. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource's name. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * The maximum number of results to return per page. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of results to return per page. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * The page token. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The page token. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * An expression that filters the list of results. - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * An expression that filters the list of results. - * - * Generated from protobuf field string filter = 4; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Sort the results by a certain order. - * - * Generated from protobuf field string order_by = 5; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Sort the results by a certain order. - * - * Generated from protobuf field string order_by = 5; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListRoutesResponse.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListRoutesResponse.php deleted file mode 100644 index dd5886f2dfed..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListRoutesResponse.php +++ /dev/null @@ -1,145 +0,0 @@ -google.cloud.networkconnectivity.v1.ListRoutesResponse - */ -class ListRoutesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The requested routes. - * - * Generated from protobuf field repeated .google.cloud.networkconnectivity.v1.Route routes = 1; - */ - private $routes; - /** - * The token for the next page of the response. To see more results, - * use this value as the page_token for your next request. If this value - * is empty, there are no more results. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * RouteTables that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\NetworkConnectivity\V1\Route>|\Google\Protobuf\Internal\RepeatedField $routes - * The requested routes. - * @type string $next_page_token - * The token for the next page of the response. To see more results, - * use this value as the page_token for your next request. If this value - * is empty, there are no more results. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * RouteTables that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); - parent::__construct($data); - } - - /** - * The requested routes. - * - * Generated from protobuf field repeated .google.cloud.networkconnectivity.v1.Route routes = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRoutes() - { - return $this->routes; - } - - /** - * The requested routes. - * - * Generated from protobuf field repeated .google.cloud.networkconnectivity.v1.Route routes = 1; - * @param array<\Google\Cloud\NetworkConnectivity\V1\Route>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRoutes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkConnectivity\V1\Route::class); - $this->routes = $arr; - - return $this; - } - - /** - * The token for the next page of the response. To see more results, - * use this value as the page_token for your next request. If this value - * is empty, there are no more results. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * The token for the next page of the response. To see more results, - * use this value as the page_token for your next request. If this value - * is empty, there are no more results. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * RouteTables that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * RouteTables that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListSpokesRequest.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListSpokesRequest.php deleted file mode 100644 index cd61a254e3ed..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListSpokesRequest.php +++ /dev/null @@ -1,218 +0,0 @@ -google.cloud.networkconnectivity.v1.ListSpokesRequest - */ -class ListSpokesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of results to return per page. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The page token. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * An expression that filters the list of results. - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - /** - * Sort the results by a certain order. - * - * Generated from protobuf field string order_by = 5; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The parent resource. Please see - * {@see HubServiceClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\NetworkConnectivity\V1\ListSpokesRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource. - * @type int $page_size - * The maximum number of results to return per page. - * @type string $page_token - * The page token. - * @type string $filter - * An expression that filters the list of results. - * @type string $order_by - * Sort the results by a certain order. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * The maximum number of results to return per page. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of results to return per page. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * The page token. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The page token. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * An expression that filters the list of results. - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * An expression that filters the list of results. - * - * Generated from protobuf field string filter = 4; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Sort the results by a certain order. - * - * Generated from protobuf field string order_by = 5; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Sort the results by a certain order. - * - * Generated from protobuf field string order_by = 5; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListSpokesResponse.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListSpokesResponse.php deleted file mode 100644 index f5ce899c5452..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/ListSpokesResponse.php +++ /dev/null @@ -1,144 +0,0 @@ -google.cloud.networkconnectivity.v1.ListSpokesResponse - */ -class ListSpokesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The requested spokes. - * - * Generated from protobuf field repeated .google.cloud.networkconnectivity.v1.Spoke spokes = 1; - */ - private $spokes; - /** - * The token for the next page of the response. To see more results, - * use this value as the page_token for your next request. If this value - * is empty, there are no more results. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\NetworkConnectivity\V1\Spoke>|\Google\Protobuf\Internal\RepeatedField $spokes - * The requested spokes. - * @type string $next_page_token - * The token for the next page of the response. To see more results, - * use this value as the page_token for your next request. If this value - * is empty, there are no more results. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); - parent::__construct($data); - } - - /** - * The requested spokes. - * - * Generated from protobuf field repeated .google.cloud.networkconnectivity.v1.Spoke spokes = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSpokes() - { - return $this->spokes; - } - - /** - * The requested spokes. - * - * Generated from protobuf field repeated .google.cloud.networkconnectivity.v1.Spoke spokes = 1; - * @param array<\Google\Cloud\NetworkConnectivity\V1\Spoke>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSpokes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkConnectivity\V1\Spoke::class); - $this->spokes = $arr; - - return $this; - } - - /** - * The token for the next page of the response. To see more results, - * use this value as the page_token for your next request. If this value - * is empty, there are no more results. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * The token for the next page of the response. To see more results, - * use this value as the page_token for your next request. If this value - * is empty, there are no more results. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/LocationFeature.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/LocationFeature.php deleted file mode 100644 index 892573fec480..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/LocationFeature.php +++ /dev/null @@ -1,61 +0,0 @@ -google.cloud.networkconnectivity.v1.LocationFeature - */ -class LocationFeature -{ - /** - * No publicly supported feature in this location - * - * Generated from protobuf enum LOCATION_FEATURE_UNSPECIFIED = 0; - */ - const LOCATION_FEATURE_UNSPECIFIED = 0; - /** - * Site-to-cloud spokes are supported in this location - * - * Generated from protobuf enum SITE_TO_CLOUD_SPOKES = 1; - */ - const SITE_TO_CLOUD_SPOKES = 1; - /** - * Site-to-site spokes are supported in this location - * - * Generated from protobuf enum SITE_TO_SITE_SPOKES = 2; - */ - const SITE_TO_SITE_SPOKES = 2; - - private static $valueToName = [ - self::LOCATION_FEATURE_UNSPECIFIED => 'LOCATION_FEATURE_UNSPECIFIED', - self::SITE_TO_CLOUD_SPOKES => 'SITE_TO_CLOUD_SPOKES', - self::SITE_TO_SITE_SPOKES => 'SITE_TO_SITE_SPOKES', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/LocationMetadata.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/LocationMetadata.php deleted file mode 100644 index bce4d8e03bb8..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/LocationMetadata.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.networkconnectivity.v1.LocationMetadata - */ -class LocationMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * List of supported features - * - * Generated from protobuf field repeated .google.cloud.networkconnectivity.v1.LocationFeature location_features = 1; - */ - private $location_features; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $location_features - * List of supported features - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); - parent::__construct($data); - } - - /** - * List of supported features - * - * Generated from protobuf field repeated .google.cloud.networkconnectivity.v1.LocationFeature location_features = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getLocationFeatures() - { - return $this->location_features; - } - - /** - * List of supported features - * - * Generated from protobuf field repeated .google.cloud.networkconnectivity.v1.LocationFeature location_features = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setLocationFeatures($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\NetworkConnectivity\V1\LocationFeature::class); - $this->location_features = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/NextHopInterconnectAttachment.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/NextHopInterconnectAttachment.php deleted file mode 100644 index 2a2c6b219e0d..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/NextHopInterconnectAttachment.php +++ /dev/null @@ -1,147 +0,0 @@ -google.cloud.networkconnectivity.v1.NextHopInterconnectAttachment - */ -class NextHopInterconnectAttachment extends \Google\Protobuf\Internal\Message -{ - /** - * The URI of the interconnect attachment resource. - * - * Generated from protobuf field string uri = 1 [(.google.api.resource_reference) = { - */ - protected $uri = ''; - /** - * The VPC network where this interconnect attachment is located. - * - * Generated from protobuf field string vpc_network = 2 [(.google.api.resource_reference) = { - */ - protected $vpc_network = ''; - /** - * Indicates whether site-to-site data transfer is allowed for this - * interconnect attachment resource. Data transfer is available only in - * [supported - * locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations). - * - * Generated from protobuf field bool site_to_site_data_transfer = 3; - */ - protected $site_to_site_data_transfer = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $uri - * The URI of the interconnect attachment resource. - * @type string $vpc_network - * The VPC network where this interconnect attachment is located. - * @type bool $site_to_site_data_transfer - * Indicates whether site-to-site data transfer is allowed for this - * interconnect attachment resource. Data transfer is available only in - * [supported - * locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); - parent::__construct($data); - } - - /** - * The URI of the interconnect attachment resource. - * - * Generated from protobuf field string uri = 1 [(.google.api.resource_reference) = { - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * The URI of the interconnect attachment resource. - * - * Generated from protobuf field string uri = 1 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - - /** - * The VPC network where this interconnect attachment is located. - * - * Generated from protobuf field string vpc_network = 2 [(.google.api.resource_reference) = { - * @return string - */ - public function getVpcNetwork() - { - return $this->vpc_network; - } - - /** - * The VPC network where this interconnect attachment is located. - * - * Generated from protobuf field string vpc_network = 2 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setVpcNetwork($var) - { - GPBUtil::checkString($var, True); - $this->vpc_network = $var; - - return $this; - } - - /** - * Indicates whether site-to-site data transfer is allowed for this - * interconnect attachment resource. Data transfer is available only in - * [supported - * locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations). - * - * Generated from protobuf field bool site_to_site_data_transfer = 3; - * @return bool - */ - public function getSiteToSiteDataTransfer() - { - return $this->site_to_site_data_transfer; - } - - /** - * Indicates whether site-to-site data transfer is allowed for this - * interconnect attachment resource. Data transfer is available only in - * [supported - * locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations). - * - * Generated from protobuf field bool site_to_site_data_transfer = 3; - * @param bool $var - * @return $this - */ - public function setSiteToSiteDataTransfer($var) - { - GPBUtil::checkBool($var); - $this->site_to_site_data_transfer = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/NextHopRouterApplianceInstance.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/NextHopRouterApplianceInstance.php deleted file mode 100644 index f54c72306457..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/NextHopRouterApplianceInstance.php +++ /dev/null @@ -1,143 +0,0 @@ -google.cloud.networkconnectivity.v1.NextHopRouterApplianceInstance - */ -class NextHopRouterApplianceInstance extends \Google\Protobuf\Internal\Message -{ - /** - * The URI of the Router appliance instance. - * - * Generated from protobuf field string uri = 1 [(.google.api.resource_reference) = { - */ - protected $uri = ''; - /** - * The VPC network where this VM is located. - * - * Generated from protobuf field string vpc_network = 2 [(.google.api.resource_reference) = { - */ - protected $vpc_network = ''; - /** - * Indicates whether site-to-site data transfer is allowed for this Router - * appliance instance resource. Data transfer is available only in [supported - * locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations). - * - * Generated from protobuf field bool site_to_site_data_transfer = 3; - */ - protected $site_to_site_data_transfer = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $uri - * The URI of the Router appliance instance. - * @type string $vpc_network - * The VPC network where this VM is located. - * @type bool $site_to_site_data_transfer - * Indicates whether site-to-site data transfer is allowed for this Router - * appliance instance resource. Data transfer is available only in [supported - * locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); - parent::__construct($data); - } - - /** - * The URI of the Router appliance instance. - * - * Generated from protobuf field string uri = 1 [(.google.api.resource_reference) = { - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * The URI of the Router appliance instance. - * - * Generated from protobuf field string uri = 1 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - - /** - * The VPC network where this VM is located. - * - * Generated from protobuf field string vpc_network = 2 [(.google.api.resource_reference) = { - * @return string - */ - public function getVpcNetwork() - { - return $this->vpc_network; - } - - /** - * The VPC network where this VM is located. - * - * Generated from protobuf field string vpc_network = 2 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setVpcNetwork($var) - { - GPBUtil::checkString($var, True); - $this->vpc_network = $var; - - return $this; - } - - /** - * Indicates whether site-to-site data transfer is allowed for this Router - * appliance instance resource. Data transfer is available only in [supported - * locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations). - * - * Generated from protobuf field bool site_to_site_data_transfer = 3; - * @return bool - */ - public function getSiteToSiteDataTransfer() - { - return $this->site_to_site_data_transfer; - } - - /** - * Indicates whether site-to-site data transfer is allowed for this Router - * appliance instance resource. Data transfer is available only in [supported - * locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations). - * - * Generated from protobuf field bool site_to_site_data_transfer = 3; - * @param bool $var - * @return $this - */ - public function setSiteToSiteDataTransfer($var) - { - GPBUtil::checkBool($var); - $this->site_to_site_data_transfer = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/NextHopVPNTunnel.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/NextHopVPNTunnel.php deleted file mode 100644 index 87bc17cab869..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/NextHopVPNTunnel.php +++ /dev/null @@ -1,143 +0,0 @@ -google.cloud.networkconnectivity.v1.NextHopVPNTunnel - */ -class NextHopVPNTunnel extends \Google\Protobuf\Internal\Message -{ - /** - * The URI of the VPN tunnel resource. - * - * Generated from protobuf field string uri = 1 [(.google.api.resource_reference) = { - */ - protected $uri = ''; - /** - * The VPC network where this VPN tunnel is located. - * - * Generated from protobuf field string vpc_network = 2 [(.google.api.resource_reference) = { - */ - protected $vpc_network = ''; - /** - * Indicates whether site-to-site data transfer is allowed for this VPN tunnel - * resource. Data transfer is available only in [supported - * locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations). - * - * Generated from protobuf field bool site_to_site_data_transfer = 3; - */ - protected $site_to_site_data_transfer = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $uri - * The URI of the VPN tunnel resource. - * @type string $vpc_network - * The VPC network where this VPN tunnel is located. - * @type bool $site_to_site_data_transfer - * Indicates whether site-to-site data transfer is allowed for this VPN tunnel - * resource. Data transfer is available only in [supported - * locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); - parent::__construct($data); - } - - /** - * The URI of the VPN tunnel resource. - * - * Generated from protobuf field string uri = 1 [(.google.api.resource_reference) = { - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * The URI of the VPN tunnel resource. - * - * Generated from protobuf field string uri = 1 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - - /** - * The VPC network where this VPN tunnel is located. - * - * Generated from protobuf field string vpc_network = 2 [(.google.api.resource_reference) = { - * @return string - */ - public function getVpcNetwork() - { - return $this->vpc_network; - } - - /** - * The VPC network where this VPN tunnel is located. - * - * Generated from protobuf field string vpc_network = 2 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setVpcNetwork($var) - { - GPBUtil::checkString($var, True); - $this->vpc_network = $var; - - return $this; - } - - /** - * Indicates whether site-to-site data transfer is allowed for this VPN tunnel - * resource. Data transfer is available only in [supported - * locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations). - * - * Generated from protobuf field bool site_to_site_data_transfer = 3; - * @return bool - */ - public function getSiteToSiteDataTransfer() - { - return $this->site_to_site_data_transfer; - } - - /** - * Indicates whether site-to-site data transfer is allowed for this VPN tunnel - * resource. Data transfer is available only in [supported - * locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations). - * - * Generated from protobuf field bool site_to_site_data_transfer = 3; - * @param bool $var - * @return $this - */ - public function setSiteToSiteDataTransfer($var) - { - GPBUtil::checkBool($var); - $this->site_to_site_data_transfer = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/NextHopVpcNetwork.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/NextHopVpcNetwork.php deleted file mode 100644 index 925d449792c9..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/NextHopVpcNetwork.php +++ /dev/null @@ -1,65 +0,0 @@ -google.cloud.networkconnectivity.v1.NextHopVpcNetwork - */ -class NextHopVpcNetwork extends \Google\Protobuf\Internal\Message -{ - /** - * The URI of the VPC network resource - * - * Generated from protobuf field string uri = 1 [(.google.api.resource_reference) = { - */ - protected $uri = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $uri - * The URI of the VPC network resource - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); - parent::__construct($data); - } - - /** - * The URI of the VPC network resource - * - * Generated from protobuf field string uri = 1 [(.google.api.resource_reference) = { - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * The URI of the VPC network resource - * - * Generated from protobuf field string uri = 1 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/OperationMetadata.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/OperationMetadata.php deleted file mode 100644 index 95de1b39336b..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/OperationMetadata.php +++ /dev/null @@ -1,307 +0,0 @@ -google.cloud.networkconnectivity.v1.OperationMetadata - */ -class OperationMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $end_time = null; - /** - * Output only. Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $target = ''; - /** - * Output only. Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $verb = ''; - /** - * Output only. Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $status_message = ''; - /** - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have been cancelled successfully - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. - * - * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $requested_cancellation = false; - /** - * Output only. API version used to start the operation. - * - * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $api_version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time the operation was created. - * @type \Google\Protobuf\Timestamp $end_time - * Output only. The time the operation finished running. - * @type string $target - * Output only. Server-defined resource path for the target of the operation. - * @type string $verb - * Output only. Name of the verb executed by the operation. - * @type string $status_message - * Output only. Human-readable status of the operation, if any. - * @type bool $requested_cancellation - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have been cancelled successfully - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. - * @type string $api_version - * Output only. API version used to start the operation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Common::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * Output only. The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * Output only. Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getTarget() - { - return $this->target; - } - - /** - * Output only. Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setTarget($var) - { - GPBUtil::checkString($var, True); - $this->target = $var; - - return $this; - } - - /** - * Output only. Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getVerb() - { - return $this->verb; - } - - /** - * Output only. Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setVerb($var) - { - GPBUtil::checkString($var, True); - $this->verb = $var; - - return $this; - } - - /** - * Output only. Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getStatusMessage() - { - return $this->status_message; - } - - /** - * Output only. Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setStatusMessage($var) - { - GPBUtil::checkString($var, True); - $this->status_message = $var; - - return $this; - } - - /** - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have been cancelled successfully - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. - * - * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getRequestedCancellation() - { - return $this->requested_cancellation; - } - - /** - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have been cancelled successfully - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. - * - * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setRequestedCancellation($var) - { - GPBUtil::checkBool($var); - $this->requested_cancellation = $var; - - return $this; - } - - /** - * Output only. API version used to start the operation. - * - * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getApiVersion() - { - return $this->api_version; - } - - /** - * Output only. API version used to start the operation. - * - * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setApiVersion($var) - { - GPBUtil::checkString($var, True); - $this->api_version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/PolicyBasedRoute.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/PolicyBasedRoute.php deleted file mode 100644 index c8c841af24f3..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/PolicyBasedRoute.php +++ /dev/null @@ -1,636 +0,0 @@ -google.cloud.networkconnectivity.v1.PolicyBasedRoute - */ -class PolicyBasedRoute extends \Google\Protobuf\Internal\Message -{ - /** - * Immutable. A unique name of the resource in the form of - * `projects/{project_number}/locations/global/PolicyBasedRoutes/{policy_based_route_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $name = ''; - /** - * Output only. Time when the PolicyBasedRoute was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. Time when the PolicyBasedRoute was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * User-defined labels. - * - * Generated from protobuf field map labels = 4; - */ - private $labels; - /** - * Optional. An optional description of this resource. Provide this field when - * you create the resource. - * - * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Required. Fully-qualified URL of the network that this route applies to. - * e.g. projects/my-project/global/networks/my-network. - * - * Generated from protobuf field string network = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $network = ''; - /** - * Required. The filter to match L4 traffic. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.PolicyBasedRoute.Filter filter = 10 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $filter = null; - /** - * Optional. The priority of this policy based route. Priority is used to - * break ties in cases where there are more than one matching policy based - * routes found. In cases where multiple policy based routes are matched, the - * one with the lowest-numbered priority value wins. The default value is - * 1000. The priority value must be from 1 to 65535, inclusive. - * - * Generated from protobuf field int32 priority = 11 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $priority = 0; - /** - * Output only. If potential misconfigurations are detected for this route, - * this field will be populated with warning messages. - * - * Generated from protobuf field repeated .google.cloud.networkconnectivity.v1.PolicyBasedRoute.Warnings warnings = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $warnings; - /** - * Output only. Server-defined fully-qualified URL for this resource. - * - * Generated from protobuf field string self_link = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $self_link = ''; - /** - * Output only. Type of this resource. Always - * networkconnectivity#policyBasedRoute for Policy Based Route resources. - * - * Generated from protobuf field string kind = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $kind = ''; - protected $target; - protected $next_hop; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\NetworkConnectivity\V1\PolicyBasedRoute\VirtualMachine $virtual_machine - * Optional. VM instances to which this policy based route applies to. - * @type \Google\Cloud\NetworkConnectivity\V1\PolicyBasedRoute\InterconnectAttachment $interconnect_attachment - * Optional. The interconnect attachments to which this route applies to. - * @type string $next_hop_ilb_ip - * Optional. The IP of a global access enabled L4 ILB that should be the - * next hop to handle matching packets. For this version, only - * next_hop_ilb_ip is supported. - * @type int $next_hop_other_routes - * Optional. Other routes that will be referenced to determine the next hop - * of the packet. - * @type string $name - * Immutable. A unique name of the resource in the form of - * `projects/{project_number}/locations/global/PolicyBasedRoutes/{policy_based_route_id}` - * @type \Google\Protobuf\Timestamp $create_time - * Output only. Time when the PolicyBasedRoute was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. Time when the PolicyBasedRoute was updated. - * @type array|\Google\Protobuf\Internal\MapField $labels - * User-defined labels. - * @type string $description - * Optional. An optional description of this resource. Provide this field when - * you create the resource. - * @type string $network - * Required. Fully-qualified URL of the network that this route applies to. - * e.g. projects/my-project/global/networks/my-network. - * @type \Google\Cloud\NetworkConnectivity\V1\PolicyBasedRoute\Filter $filter - * Required. The filter to match L4 traffic. - * @type int $priority - * Optional. The priority of this policy based route. Priority is used to - * break ties in cases where there are more than one matching policy based - * routes found. In cases where multiple policy based routes are matched, the - * one with the lowest-numbered priority value wins. The default value is - * 1000. The priority value must be from 1 to 65535, inclusive. - * @type array<\Google\Cloud\NetworkConnectivity\V1\PolicyBasedRoute\Warnings>|\Google\Protobuf\Internal\RepeatedField $warnings - * Output only. If potential misconfigurations are detected for this route, - * this field will be populated with warning messages. - * @type string $self_link - * Output only. Server-defined fully-qualified URL for this resource. - * @type string $kind - * Output only. Type of this resource. Always - * networkconnectivity#policyBasedRoute for Policy Based Route resources. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkconnectivity\V1\PolicyBasedRouting::initOnce(); - parent::__construct($data); - } - - /** - * Optional. VM instances to which this policy based route applies to. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.PolicyBasedRoute.VirtualMachine virtual_machine = 18 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\NetworkConnectivity\V1\PolicyBasedRoute\VirtualMachine|null - */ - public function getVirtualMachine() - { - return $this->readOneof(18); - } - - public function hasVirtualMachine() - { - return $this->hasOneof(18); - } - - /** - * Optional. VM instances to which this policy based route applies to. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.PolicyBasedRoute.VirtualMachine virtual_machine = 18 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\NetworkConnectivity\V1\PolicyBasedRoute\VirtualMachine $var - * @return $this - */ - public function setVirtualMachine($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkConnectivity\V1\PolicyBasedRoute\VirtualMachine::class); - $this->writeOneof(18, $var); - - return $this; - } - - /** - * Optional. The interconnect attachments to which this route applies to. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.PolicyBasedRoute.InterconnectAttachment interconnect_attachment = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\NetworkConnectivity\V1\PolicyBasedRoute\InterconnectAttachment|null - */ - public function getInterconnectAttachment() - { - return $this->readOneof(9); - } - - public function hasInterconnectAttachment() - { - return $this->hasOneof(9); - } - - /** - * Optional. The interconnect attachments to which this route applies to. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.PolicyBasedRoute.InterconnectAttachment interconnect_attachment = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\NetworkConnectivity\V1\PolicyBasedRoute\InterconnectAttachment $var - * @return $this - */ - public function setInterconnectAttachment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkConnectivity\V1\PolicyBasedRoute\InterconnectAttachment::class); - $this->writeOneof(9, $var); - - return $this; - } - - /** - * Optional. The IP of a global access enabled L4 ILB that should be the - * next hop to handle matching packets. For this version, only - * next_hop_ilb_ip is supported. - * - * Generated from protobuf field string next_hop_ilb_ip = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getNextHopIlbIp() - { - return $this->readOneof(12); - } - - public function hasNextHopIlbIp() - { - return $this->hasOneof(12); - } - - /** - * Optional. The IP of a global access enabled L4 ILB that should be the - * next hop to handle matching packets. For this version, only - * next_hop_ilb_ip is supported. - * - * Generated from protobuf field string next_hop_ilb_ip = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setNextHopIlbIp($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(12, $var); - - return $this; - } - - /** - * Optional. Other routes that will be referenced to determine the next hop - * of the packet. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.PolicyBasedRoute.OtherRoutes next_hop_other_routes = 21 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getNextHopOtherRoutes() - { - return $this->readOneof(21); - } - - public function hasNextHopOtherRoutes() - { - return $this->hasOneof(21); - } - - /** - * Optional. Other routes that will be referenced to determine the next hop - * of the packet. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.PolicyBasedRoute.OtherRoutes next_hop_other_routes = 21 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setNextHopOtherRoutes($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\NetworkConnectivity\V1\PolicyBasedRoute\OtherRoutes::class); - $this->writeOneof(21, $var); - - return $this; - } - - /** - * Immutable. A unique name of the resource in the form of - * `projects/{project_number}/locations/global/PolicyBasedRoutes/{policy_based_route_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Immutable. A unique name of the resource in the form of - * `projects/{project_number}/locations/global/PolicyBasedRoutes/{policy_based_route_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. Time when the PolicyBasedRoute was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. Time when the PolicyBasedRoute was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. Time when the PolicyBasedRoute was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. Time when the PolicyBasedRoute was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * User-defined labels. - * - * Generated from protobuf field map labels = 4; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * User-defined labels. - * - * Generated from protobuf field map labels = 4; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Optional. An optional description of this resource. Provide this field when - * you create the resource. - * - * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. An optional description of this resource. Provide this field when - * you create the resource. - * - * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Required. Fully-qualified URL of the network that this route applies to. - * e.g. projects/my-project/global/networks/my-network. - * - * Generated from protobuf field string network = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getNetwork() - { - return $this->network; - } - - /** - * Required. Fully-qualified URL of the network that this route applies to. - * e.g. projects/my-project/global/networks/my-network. - * - * Generated from protobuf field string network = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setNetwork($var) - { - GPBUtil::checkString($var, True); - $this->network = $var; - - return $this; - } - - /** - * Required. The filter to match L4 traffic. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.PolicyBasedRoute.Filter filter = 10 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\NetworkConnectivity\V1\PolicyBasedRoute\Filter|null - */ - public function getFilter() - { - return $this->filter; - } - - public function hasFilter() - { - return isset($this->filter); - } - - public function clearFilter() - { - unset($this->filter); - } - - /** - * Required. The filter to match L4 traffic. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.PolicyBasedRoute.Filter filter = 10 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\NetworkConnectivity\V1\PolicyBasedRoute\Filter $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkConnectivity\V1\PolicyBasedRoute\Filter::class); - $this->filter = $var; - - return $this; - } - - /** - * Optional. The priority of this policy based route. Priority is used to - * break ties in cases where there are more than one matching policy based - * routes found. In cases where multiple policy based routes are matched, the - * one with the lowest-numbered priority value wins. The default value is - * 1000. The priority value must be from 1 to 65535, inclusive. - * - * Generated from protobuf field int32 priority = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPriority() - { - return $this->priority; - } - - /** - * Optional. The priority of this policy based route. Priority is used to - * break ties in cases where there are more than one matching policy based - * routes found. In cases where multiple policy based routes are matched, the - * one with the lowest-numbered priority value wins. The default value is - * 1000. The priority value must be from 1 to 65535, inclusive. - * - * Generated from protobuf field int32 priority = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPriority($var) - { - GPBUtil::checkInt32($var); - $this->priority = $var; - - return $this; - } - - /** - * Output only. If potential misconfigurations are detected for this route, - * this field will be populated with warning messages. - * - * Generated from protobuf field repeated .google.cloud.networkconnectivity.v1.PolicyBasedRoute.Warnings warnings = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getWarnings() - { - return $this->warnings; - } - - /** - * Output only. If potential misconfigurations are detected for this route, - * this field will be populated with warning messages. - * - * Generated from protobuf field repeated .google.cloud.networkconnectivity.v1.PolicyBasedRoute.Warnings warnings = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\NetworkConnectivity\V1\PolicyBasedRoute\Warnings>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setWarnings($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkConnectivity\V1\PolicyBasedRoute\Warnings::class); - $this->warnings = $arr; - - return $this; - } - - /** - * Output only. Server-defined fully-qualified URL for this resource. - * - * Generated from protobuf field string self_link = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getSelfLink() - { - return $this->self_link; - } - - /** - * Output only. Server-defined fully-qualified URL for this resource. - * - * Generated from protobuf field string self_link = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setSelfLink($var) - { - GPBUtil::checkString($var, True); - $this->self_link = $var; - - return $this; - } - - /** - * Output only. Type of this resource. Always - * networkconnectivity#policyBasedRoute for Policy Based Route resources. - * - * Generated from protobuf field string kind = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getKind() - { - return $this->kind; - } - - /** - * Output only. Type of this resource. Always - * networkconnectivity#policyBasedRoute for Policy Based Route resources. - * - * Generated from protobuf field string kind = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setKind($var) - { - GPBUtil::checkString($var, True); - $this->kind = $var; - - return $this; - } - - /** - * @return string - */ - public function getTarget() - { - return $this->whichOneof("target"); - } - - /** - * @return string - */ - public function getNextHop() - { - return $this->whichOneof("next_hop"); - } - -} - diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/PolicyBasedRoute/Filter.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/PolicyBasedRoute/Filter.php deleted file mode 100644 index 96851bab4477..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/PolicyBasedRoute/Filter.php +++ /dev/null @@ -1,192 +0,0 @@ -google.cloud.networkconnectivity.v1.PolicyBasedRoute.Filter - */ -class Filter extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The IP protocol that this policy based route applies to. Valid - * values are 'TCP', 'UDP', and 'ALL'. Default is 'ALL'. - * - * Generated from protobuf field string ip_protocol = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $ip_protocol = ''; - /** - * Optional. The source IP range of outgoing packets that this policy based - * route applies to. Default is "0.0.0.0/0" if protocol version is IPv4. - * - * Generated from protobuf field string src_range = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $src_range = ''; - /** - * Optional. The destination IP range of outgoing packets that this policy - * based route applies to. Default is "0.0.0.0/0" if protocol version is - * IPv4. - * - * Generated from protobuf field string dest_range = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $dest_range = ''; - /** - * Required. Internet protocol versions this policy based route applies to. - * For this version, only IPV4 is supported. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.PolicyBasedRoute.Filter.ProtocolVersion protocol_version = 6 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $protocol_version = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $ip_protocol - * Optional. The IP protocol that this policy based route applies to. Valid - * values are 'TCP', 'UDP', and 'ALL'. Default is 'ALL'. - * @type string $src_range - * Optional. The source IP range of outgoing packets that this policy based - * route applies to. Default is "0.0.0.0/0" if protocol version is IPv4. - * @type string $dest_range - * Optional. The destination IP range of outgoing packets that this policy - * based route applies to. Default is "0.0.0.0/0" if protocol version is - * IPv4. - * @type int $protocol_version - * Required. Internet protocol versions this policy based route applies to. - * For this version, only IPV4 is supported. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkconnectivity\V1\PolicyBasedRouting::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The IP protocol that this policy based route applies to. Valid - * values are 'TCP', 'UDP', and 'ALL'. Default is 'ALL'. - * - * Generated from protobuf field string ip_protocol = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getIpProtocol() - { - return $this->ip_protocol; - } - - /** - * Optional. The IP protocol that this policy based route applies to. Valid - * values are 'TCP', 'UDP', and 'ALL'. Default is 'ALL'. - * - * Generated from protobuf field string ip_protocol = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setIpProtocol($var) - { - GPBUtil::checkString($var, True); - $this->ip_protocol = $var; - - return $this; - } - - /** - * Optional. The source IP range of outgoing packets that this policy based - * route applies to. Default is "0.0.0.0/0" if protocol version is IPv4. - * - * Generated from protobuf field string src_range = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getSrcRange() - { - return $this->src_range; - } - - /** - * Optional. The source IP range of outgoing packets that this policy based - * route applies to. Default is "0.0.0.0/0" if protocol version is IPv4. - * - * Generated from protobuf field string src_range = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setSrcRange($var) - { - GPBUtil::checkString($var, True); - $this->src_range = $var; - - return $this; - } - - /** - * Optional. The destination IP range of outgoing packets that this policy - * based route applies to. Default is "0.0.0.0/0" if protocol version is - * IPv4. - * - * Generated from protobuf field string dest_range = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDestRange() - { - return $this->dest_range; - } - - /** - * Optional. The destination IP range of outgoing packets that this policy - * based route applies to. Default is "0.0.0.0/0" if protocol version is - * IPv4. - * - * Generated from protobuf field string dest_range = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDestRange($var) - { - GPBUtil::checkString($var, True); - $this->dest_range = $var; - - return $this; - } - - /** - * Required. Internet protocol versions this policy based route applies to. - * For this version, only IPV4 is supported. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.PolicyBasedRoute.Filter.ProtocolVersion protocol_version = 6 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getProtocolVersion() - { - return $this->protocol_version; - } - - /** - * Required. Internet protocol versions this policy based route applies to. - * For this version, only IPV4 is supported. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.PolicyBasedRoute.Filter.ProtocolVersion protocol_version = 6 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setProtocolVersion($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\NetworkConnectivity\V1\PolicyBasedRoute\Filter\ProtocolVersion::class); - $this->protocol_version = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Filter::class, \Google\Cloud\NetworkConnectivity\V1\PolicyBasedRoute_Filter::class); - diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/PolicyBasedRoute/Filter/ProtocolVersion.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/PolicyBasedRoute/Filter/ProtocolVersion.php deleted file mode 100644 index 72918016a089..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/PolicyBasedRoute/Filter/ProtocolVersion.php +++ /dev/null @@ -1,57 +0,0 @@ -google.cloud.networkconnectivity.v1.PolicyBasedRoute.Filter.ProtocolVersion - */ -class ProtocolVersion -{ - /** - * Default value. - * - * Generated from protobuf enum PROTOCOL_VERSION_UNSPECIFIED = 0; - */ - const PROTOCOL_VERSION_UNSPECIFIED = 0; - /** - * The PBR is for IPv4 internet protocol traffic. - * - * Generated from protobuf enum IPV4 = 1; - */ - const IPV4 = 1; - - private static $valueToName = [ - self::PROTOCOL_VERSION_UNSPECIFIED => 'PROTOCOL_VERSION_UNSPECIFIED', - self::IPV4 => 'IPV4', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ProtocolVersion::class, \Google\Cloud\NetworkConnectivity\V1\PolicyBasedRoute_Filter_ProtocolVersion::class); - diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/PolicyBasedRoute/InterconnectAttachment.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/PolicyBasedRoute/InterconnectAttachment.php deleted file mode 100644 index 1b199374c88e..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/PolicyBasedRoute/InterconnectAttachment.php +++ /dev/null @@ -1,74 +0,0 @@ -google.cloud.networkconnectivity.v1.PolicyBasedRoute.InterconnectAttachment - */ -class InterconnectAttachment extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Cloud region to install this policy based route on interconnect - * attachment. Use `all` to install it on all interconnect attachments. - * - * Generated from protobuf field string region = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $region = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $region - * Optional. Cloud region to install this policy based route on interconnect - * attachment. Use `all` to install it on all interconnect attachments. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkconnectivity\V1\PolicyBasedRouting::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Cloud region to install this policy based route on interconnect - * attachment. Use `all` to install it on all interconnect attachments. - * - * Generated from protobuf field string region = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRegion() - { - return $this->region; - } - - /** - * Optional. Cloud region to install this policy based route on interconnect - * attachment. Use `all` to install it on all interconnect attachments. - * - * Generated from protobuf field string region = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRegion($var) - { - GPBUtil::checkString($var, True); - $this->region = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(InterconnectAttachment::class, \Google\Cloud\NetworkConnectivity\V1\PolicyBasedRoute_InterconnectAttachment::class); - diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/PolicyBasedRoute/OtherRoutes.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/PolicyBasedRoute/OtherRoutes.php deleted file mode 100644 index a85797f988b2..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/PolicyBasedRoute/OtherRoutes.php +++ /dev/null @@ -1,60 +0,0 @@ -google.cloud.networkconnectivity.v1.PolicyBasedRoute.OtherRoutes - */ -class OtherRoutes -{ - /** - * Default value. - * - * Generated from protobuf enum OTHER_ROUTES_UNSPECIFIED = 0; - */ - const OTHER_ROUTES_UNSPECIFIED = 0; - /** - * Use the routes from the default routing tables (system-generated routes, - * custom routes, peering route) to determine the next hop. This will - * effectively exclude matching packets being applied on other PBRs with a - * lower priority. - * - * Generated from protobuf enum DEFAULT_ROUTING = 1; - */ - const DEFAULT_ROUTING = 1; - - private static $valueToName = [ - self::OTHER_ROUTES_UNSPECIFIED => 'OTHER_ROUTES_UNSPECIFIED', - self::DEFAULT_ROUTING => 'DEFAULT_ROUTING', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(OtherRoutes::class, \Google\Cloud\NetworkConnectivity\V1\PolicyBasedRoute_OtherRoutes::class); - diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/PolicyBasedRoute/VirtualMachine.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/PolicyBasedRoute/VirtualMachine.php deleted file mode 100644 index 47ae79b35b98..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/PolicyBasedRoute/VirtualMachine.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.networkconnectivity.v1.PolicyBasedRoute.VirtualMachine - */ -class VirtualMachine extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. A list of VM instance tags to which this policy based route - * applies to. VM instances that have ANY of tags specified here will - * install this PBR. - * - * Generated from protobuf field repeated string tags = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $tags; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $tags - * Optional. A list of VM instance tags to which this policy based route - * applies to. VM instances that have ANY of tags specified here will - * install this PBR. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkconnectivity\V1\PolicyBasedRouting::initOnce(); - parent::__construct($data); - } - - /** - * Optional. A list of VM instance tags to which this policy based route - * applies to. VM instances that have ANY of tags specified here will - * install this PBR. - * - * Generated from protobuf field repeated string tags = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTags() - { - return $this->tags; - } - - /** - * Optional. A list of VM instance tags to which this policy based route - * applies to. VM instances that have ANY of tags specified here will - * install this PBR. - * - * Generated from protobuf field repeated string tags = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTags($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->tags = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(VirtualMachine::class, \Google\Cloud\NetworkConnectivity\V1\PolicyBasedRoute_VirtualMachine::class); - diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/PolicyBasedRoute/Warnings.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/PolicyBasedRoute/Warnings.php deleted file mode 100644 index 51e7b0be9636..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/PolicyBasedRoute/Warnings.php +++ /dev/null @@ -1,158 +0,0 @@ -google.cloud.networkconnectivity.v1.PolicyBasedRoute.Warnings - */ -class Warnings extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. A warning code, if applicable. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.PolicyBasedRoute.Warnings.Code code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $code = 0; - /** - * Output only. Metadata about this warning in key: value format. The key - * should provides more detail on the warning being returned. For example, - * for warnings where there are no results in a list request for a - * particular zone, this key might be scope and the key value might be the - * zone name. Other examples might be a key indicating a deprecated resource - * and a suggested replacement. - * - * Generated from protobuf field map data = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $data; - /** - * Output only. A human-readable description of the warning code. - * - * Generated from protobuf field string warning_message = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $warning_message = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $code - * Output only. A warning code, if applicable. - * @type array|\Google\Protobuf\Internal\MapField $data - * Output only. Metadata about this warning in key: value format. The key - * should provides more detail on the warning being returned. For example, - * for warnings where there are no results in a list request for a - * particular zone, this key might be scope and the key value might be the - * zone name. Other examples might be a key indicating a deprecated resource - * and a suggested replacement. - * @type string $warning_message - * Output only. A human-readable description of the warning code. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkconnectivity\V1\PolicyBasedRouting::initOnce(); - parent::__construct($data); - } - - /** - * Output only. A warning code, if applicable. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.PolicyBasedRoute.Warnings.Code code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getCode() - { - return $this->code; - } - - /** - * Output only. A warning code, if applicable. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.PolicyBasedRoute.Warnings.Code code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setCode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\NetworkConnectivity\V1\PolicyBasedRoute\Warnings\Code::class); - $this->code = $var; - - return $this; - } - - /** - * Output only. Metadata about this warning in key: value format. The key - * should provides more detail on the warning being returned. For example, - * for warnings where there are no results in a list request for a - * particular zone, this key might be scope and the key value might be the - * zone name. Other examples might be a key indicating a deprecated resource - * and a suggested replacement. - * - * Generated from protobuf field map data = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getData() - { - return $this->data; - } - - /** - * Output only. Metadata about this warning in key: value format. The key - * should provides more detail on the warning being returned. For example, - * for warnings where there are no results in a list request for a - * particular zone, this key might be scope and the key value might be the - * zone name. Other examples might be a key indicating a deprecated resource - * and a suggested replacement. - * - * Generated from protobuf field map data = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setData($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->data = $arr; - - return $this; - } - - /** - * Output only. A human-readable description of the warning code. - * - * Generated from protobuf field string warning_message = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getWarningMessage() - { - return $this->warning_message; - } - - /** - * Output only. A human-readable description of the warning code. - * - * Generated from protobuf field string warning_message = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setWarningMessage($var) - { - GPBUtil::checkString($var, True); - $this->warning_message = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Warnings::class, \Google\Cloud\NetworkConnectivity\V1\PolicyBasedRoute_Warnings::class); - diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/PolicyBasedRoute/Warnings/Code.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/PolicyBasedRoute/Warnings/Code.php deleted file mode 100644 index 6d1ed38b0417..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/PolicyBasedRoute/Warnings/Code.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.networkconnectivity.v1.PolicyBasedRoute.Warnings.Code - */ -class Code -{ - /** - * Default value. - * - * Generated from protobuf enum WARNING_UNSPECIFIED = 0; - */ - const WARNING_UNSPECIFIED = 0; - /** - * The policy based route is not active and functioning. Common causes are - * the dependent network was deleted or the resource project was turned - * off. - * - * Generated from protobuf enum RESOURCE_NOT_ACTIVE = 1; - */ - const RESOURCE_NOT_ACTIVE = 1; - /** - * The policy based route is being modified (e.g. created/deleted) at this - * time. - * - * Generated from protobuf enum RESOURCE_BEING_MODIFIED = 2; - */ - const RESOURCE_BEING_MODIFIED = 2; - - private static $valueToName = [ - self::WARNING_UNSPECIFIED => 'WARNING_UNSPECIFIED', - self::RESOURCE_NOT_ACTIVE => 'RESOURCE_NOT_ACTIVE', - self::RESOURCE_BEING_MODIFIED => 'RESOURCE_BEING_MODIFIED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Code::class, \Google\Cloud\NetworkConnectivity\V1\PolicyBasedRoute_Warnings_Code::class); - diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/PolicyMode.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/PolicyMode.php deleted file mode 100644 index ac11aeace43b..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/PolicyMode.php +++ /dev/null @@ -1,55 +0,0 @@ -google.cloud.networkconnectivity.v1.PolicyMode - */ -class PolicyMode -{ - /** - * Policy mode is unspecified. It defaults to PRESET - * with preset_topology = MESH. - * - * Generated from protobuf enum POLICY_MODE_UNSPECIFIED = 0; - */ - const POLICY_MODE_UNSPECIFIED = 0; - /** - * Hub uses one of the preset topologies. - * - * Generated from protobuf enum PRESET = 1; - */ - const PRESET = 1; - - private static $valueToName = [ - self::POLICY_MODE_UNSPECIFIED => 'POLICY_MODE_UNSPECIFIED', - self::PRESET => 'PRESET', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/PresetTopology.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/PresetTopology.php deleted file mode 100644 index bc5ed8fb2706..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/PresetTopology.php +++ /dev/null @@ -1,65 +0,0 @@ -google.cloud.networkconnectivity.v1.PresetTopology - */ -class PresetTopology -{ - /** - * Preset topology is unspecified. When policy_mode = PRESET, - * it defaults to MESH. - * - * Generated from protobuf enum PRESET_TOPOLOGY_UNSPECIFIED = 0; - */ - const PRESET_TOPOLOGY_UNSPECIFIED = 0; - /** - * Mesh topology is implemented. Group `default` is automatically created. - * All spokes in the hub are added to group `default`. - * - * Generated from protobuf enum MESH = 2; - */ - const MESH = 2; - /** - * Star topology is implemented. Two groups, `center` and `edge`, are - * automatically created along with hub creation. Spokes have to join one of - * the groups during creation. - * - * Generated from protobuf enum STAR = 3; - */ - const STAR = 3; - - private static $valueToName = [ - self::PRESET_TOPOLOGY_UNSPECIFIED => 'PRESET_TOPOLOGY_UNSPECIFIED', - self::MESH => 'MESH', - self::STAR => 'STAR', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/PscPropagationStatus.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/PscPropagationStatus.php deleted file mode 100644 index 97115d1eefe5..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/PscPropagationStatus.php +++ /dev/null @@ -1,276 +0,0 @@ -google.cloud.networkconnectivity.v1.PscPropagationStatus - */ -class PscPropagationStatus extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the spoke that the source forwarding rule belongs to. - * - * Generated from protobuf field string source_spoke = 1; - */ - protected $source_spoke = ''; - /** - * The name of the group that the source spoke belongs to. - * - * Generated from protobuf field string source_group = 2; - */ - protected $source_group = ''; - /** - * The name of the forwarding rule exported to the hub. - * - * Generated from protobuf field string source_forwarding_rule = 3; - */ - protected $source_forwarding_rule = ''; - /** - * The name of the spoke that the source forwarding rule propagates to. - * - * Generated from protobuf field string target_spoke = 4; - */ - protected $target_spoke = ''; - /** - * The name of the group that the target spoke belongs to. - * - * Generated from protobuf field string target_group = 5; - */ - protected $target_group = ''; - /** - * The propagation status. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.PscPropagationStatus.Code code = 6; - */ - protected $code = 0; - /** - * The human-readable summary of the Private Service Connect connection - * propagation status. - * - * Generated from protobuf field string message = 7; - */ - protected $message = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $source_spoke - * The name of the spoke that the source forwarding rule belongs to. - * @type string $source_group - * The name of the group that the source spoke belongs to. - * @type string $source_forwarding_rule - * The name of the forwarding rule exported to the hub. - * @type string $target_spoke - * The name of the spoke that the source forwarding rule propagates to. - * @type string $target_group - * The name of the group that the target spoke belongs to. - * @type int $code - * The propagation status. - * @type string $message - * The human-readable summary of the Private Service Connect connection - * propagation status. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); - parent::__construct($data); - } - - /** - * The name of the spoke that the source forwarding rule belongs to. - * - * Generated from protobuf field string source_spoke = 1; - * @return string - */ - public function getSourceSpoke() - { - return $this->source_spoke; - } - - /** - * The name of the spoke that the source forwarding rule belongs to. - * - * Generated from protobuf field string source_spoke = 1; - * @param string $var - * @return $this - */ - public function setSourceSpoke($var) - { - GPBUtil::checkString($var, True); - $this->source_spoke = $var; - - return $this; - } - - /** - * The name of the group that the source spoke belongs to. - * - * Generated from protobuf field string source_group = 2; - * @return string - */ - public function getSourceGroup() - { - return $this->source_group; - } - - /** - * The name of the group that the source spoke belongs to. - * - * Generated from protobuf field string source_group = 2; - * @param string $var - * @return $this - */ - public function setSourceGroup($var) - { - GPBUtil::checkString($var, True); - $this->source_group = $var; - - return $this; - } - - /** - * The name of the forwarding rule exported to the hub. - * - * Generated from protobuf field string source_forwarding_rule = 3; - * @return string - */ - public function getSourceForwardingRule() - { - return $this->source_forwarding_rule; - } - - /** - * The name of the forwarding rule exported to the hub. - * - * Generated from protobuf field string source_forwarding_rule = 3; - * @param string $var - * @return $this - */ - public function setSourceForwardingRule($var) - { - GPBUtil::checkString($var, True); - $this->source_forwarding_rule = $var; - - return $this; - } - - /** - * The name of the spoke that the source forwarding rule propagates to. - * - * Generated from protobuf field string target_spoke = 4; - * @return string - */ - public function getTargetSpoke() - { - return $this->target_spoke; - } - - /** - * The name of the spoke that the source forwarding rule propagates to. - * - * Generated from protobuf field string target_spoke = 4; - * @param string $var - * @return $this - */ - public function setTargetSpoke($var) - { - GPBUtil::checkString($var, True); - $this->target_spoke = $var; - - return $this; - } - - /** - * The name of the group that the target spoke belongs to. - * - * Generated from protobuf field string target_group = 5; - * @return string - */ - public function getTargetGroup() - { - return $this->target_group; - } - - /** - * The name of the group that the target spoke belongs to. - * - * Generated from protobuf field string target_group = 5; - * @param string $var - * @return $this - */ - public function setTargetGroup($var) - { - GPBUtil::checkString($var, True); - $this->target_group = $var; - - return $this; - } - - /** - * The propagation status. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.PscPropagationStatus.Code code = 6; - * @return int - */ - public function getCode() - { - return $this->code; - } - - /** - * The propagation status. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.PscPropagationStatus.Code code = 6; - * @param int $var - * @return $this - */ - public function setCode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\NetworkConnectivity\V1\PscPropagationStatus\Code::class); - $this->code = $var; - - return $this; - } - - /** - * The human-readable summary of the Private Service Connect connection - * propagation status. - * - * Generated from protobuf field string message = 7; - * @return string - */ - public function getMessage() - { - return $this->message; - } - - /** - * The human-readable summary of the Private Service Connect connection - * propagation status. - * - * Generated from protobuf field string message = 7; - * @param string $var - * @return $this - */ - public function setMessage($var) - { - GPBUtil::checkString($var, True); - $this->message = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/PscPropagationStatus/Code.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/PscPropagationStatus/Code.php deleted file mode 100644 index ac929c1c2300..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/PscPropagationStatus/Code.php +++ /dev/null @@ -1,103 +0,0 @@ -google.cloud.networkconnectivity.v1.PscPropagationStatus.Code - */ -class Code -{ - /** - * The code is unspecified. - * - * Generated from protobuf enum CODE_UNSPECIFIED = 0; - */ - const CODE_UNSPECIFIED = 0; - /** - * The propagated Private Service Connect connection is ready. - * - * Generated from protobuf enum READY = 1; - */ - const READY = 1; - /** - * The Private Service Connect connection is propagating. This is a - * transient state. - * - * Generated from protobuf enum PROPAGATING = 2; - */ - const PROPAGATING = 2; - /** - * The Private Service Connect connection propagation failed because the VPC - * network or the project of the target spoke has exceeded the connection - * limit set by the producer. - * - * Generated from protobuf enum ERROR_PRODUCER_PROPAGATED_CONNECTION_LIMIT_EXCEEDED = 3; - */ - const ERROR_PRODUCER_PROPAGATED_CONNECTION_LIMIT_EXCEEDED = 3; - /** - * The Private Service Connect connection propagation failed because the NAT - * IP subnet space has been exhausted. It is equivalent to the `Needs - * attention` status of the Private Service Connect connection. See - * https://cloud.google.com/vpc/docs/about-accessing-vpc-hosted-services-endpoints#connection-statuses. - * - * Generated from protobuf enum ERROR_PRODUCER_NAT_IP_SPACE_EXHAUSTED = 4; - */ - const ERROR_PRODUCER_NAT_IP_SPACE_EXHAUSTED = 4; - /** - * The Private Service Connect connection propagation failed because the - * `PSC_ILB_CONSUMER_FORWARDING_RULES_PER_PRODUCER_NETWORK` quota in the - * producer VPC network has been exceeded. - * - * Generated from protobuf enum ERROR_PRODUCER_QUOTA_EXCEEDED = 5; - */ - const ERROR_PRODUCER_QUOTA_EXCEEDED = 5; - /** - * The Private Service Connect connection propagation failed because the - * `PSC_PROPAGATED_CONNECTIONS_PER_VPC_NETWORK` quota in the consumer - * VPC network has been exceeded. - * - * Generated from protobuf enum ERROR_CONSUMER_QUOTA_EXCEEDED = 6; - */ - const ERROR_CONSUMER_QUOTA_EXCEEDED = 6; - - private static $valueToName = [ - self::CODE_UNSPECIFIED => 'CODE_UNSPECIFIED', - self::READY => 'READY', - self::PROPAGATING => 'PROPAGATING', - self::ERROR_PRODUCER_PROPAGATED_CONNECTION_LIMIT_EXCEEDED => 'ERROR_PRODUCER_PROPAGATED_CONNECTION_LIMIT_EXCEEDED', - self::ERROR_PRODUCER_NAT_IP_SPACE_EXHAUSTED => 'ERROR_PRODUCER_NAT_IP_SPACE_EXHAUSTED', - self::ERROR_PRODUCER_QUOTA_EXCEEDED => 'ERROR_PRODUCER_QUOTA_EXCEEDED', - self::ERROR_CONSUMER_QUOTA_EXCEEDED => 'ERROR_CONSUMER_QUOTA_EXCEEDED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Code::class, \Google\Cloud\NetworkConnectivity\V1\PscPropagationStatus_Code::class); - diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/QueryHubStatusRequest.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/QueryHubStatusRequest.php deleted file mode 100644 index b03702611276..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/QueryHubStatusRequest.php +++ /dev/null @@ -1,348 +0,0 @@ -google.cloud.networkconnectivity.v1.QueryHubStatusRequest - */ -class QueryHubStatusRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the hub. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. The maximum number of results to return per page. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. The page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. An expression that filters the list of results. - * The filter can be used to filter the results by the following fields: - * * `psc_propagation_status.source_spoke` - * * `psc_propagation_status.source_group` - * * `psc_propagation_status.source_forwarding_rule` - * * `psc_propagation_status.target_spoke` - * * `psc_propagation_status.target_group` - * * `psc_propagation_status.code` - * * `psc_propagation_status.message` - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. Sort the results in ascending order by the specified fields. - * A comma-separated list of any of these fields: - * * `psc_propagation_status.source_spoke` - * * `psc_propagation_status.source_group` - * * `psc_propagation_status.source_forwarding_rule` - * * `psc_propagation_status.target_spoke` - * * `psc_propagation_status.target_group` - * * `psc_propagation_status.code` - * If `group_by` is set, the value of the `order_by` field must be the - * same as or a subset of the `group_by` field. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - /** - * Optional. Aggregate the results by the specified fields. - * A comma-separated list of any of these fields: - * * `psc_propagation_status.source_spoke` - * * `psc_propagation_status.source_group` - * * `psc_propagation_status.source_forwarding_rule` - * * `psc_propagation_status.target_spoke` - * * `psc_propagation_status.target_group` - * * `psc_propagation_status.code` - * - * Generated from protobuf field string group_by = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $group_by = ''; - - /** - * @param string $name Required. The name of the hub. Please see - * {@see HubServiceClient::hubName()} for help formatting this field. - * - * @return \Google\Cloud\NetworkConnectivity\V1\QueryHubStatusRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the hub. - * @type int $page_size - * Optional. The maximum number of results to return per page. - * @type string $page_token - * Optional. The page token. - * @type string $filter - * Optional. An expression that filters the list of results. - * The filter can be used to filter the results by the following fields: - * * `psc_propagation_status.source_spoke` - * * `psc_propagation_status.source_group` - * * `psc_propagation_status.source_forwarding_rule` - * * `psc_propagation_status.target_spoke` - * * `psc_propagation_status.target_group` - * * `psc_propagation_status.code` - * * `psc_propagation_status.message` - * @type string $order_by - * Optional. Sort the results in ascending order by the specified fields. - * A comma-separated list of any of these fields: - * * `psc_propagation_status.source_spoke` - * * `psc_propagation_status.source_group` - * * `psc_propagation_status.source_forwarding_rule` - * * `psc_propagation_status.target_spoke` - * * `psc_propagation_status.target_group` - * * `psc_propagation_status.code` - * If `group_by` is set, the value of the `order_by` field must be the - * same as or a subset of the `group_by` field. - * @type string $group_by - * Optional. Aggregate the results by the specified fields. - * A comma-separated list of any of these fields: - * * `psc_propagation_status.source_spoke` - * * `psc_propagation_status.source_group` - * * `psc_propagation_status.source_forwarding_rule` - * * `psc_propagation_status.target_spoke` - * * `psc_propagation_status.target_group` - * * `psc_propagation_status.code` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the hub. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the hub. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. The maximum number of results to return per page. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of results to return per page. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. The page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. The page token. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Optional. An expression that filters the list of results. - * The filter can be used to filter the results by the following fields: - * * `psc_propagation_status.source_spoke` - * * `psc_propagation_status.source_group` - * * `psc_propagation_status.source_forwarding_rule` - * * `psc_propagation_status.target_spoke` - * * `psc_propagation_status.target_group` - * * `psc_propagation_status.code` - * * `psc_propagation_status.message` - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. An expression that filters the list of results. - * The filter can be used to filter the results by the following fields: - * * `psc_propagation_status.source_spoke` - * * `psc_propagation_status.source_group` - * * `psc_propagation_status.source_forwarding_rule` - * * `psc_propagation_status.target_spoke` - * * `psc_propagation_status.target_group` - * * `psc_propagation_status.code` - * * `psc_propagation_status.message` - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Optional. Sort the results in ascending order by the specified fields. - * A comma-separated list of any of these fields: - * * `psc_propagation_status.source_spoke` - * * `psc_propagation_status.source_group` - * * `psc_propagation_status.source_forwarding_rule` - * * `psc_propagation_status.target_spoke` - * * `psc_propagation_status.target_group` - * * `psc_propagation_status.code` - * If `group_by` is set, the value of the `order_by` field must be the - * same as or a subset of the `group_by` field. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Optional. Sort the results in ascending order by the specified fields. - * A comma-separated list of any of these fields: - * * `psc_propagation_status.source_spoke` - * * `psc_propagation_status.source_group` - * * `psc_propagation_status.source_forwarding_rule` - * * `psc_propagation_status.target_spoke` - * * `psc_propagation_status.target_group` - * * `psc_propagation_status.code` - * If `group_by` is set, the value of the `order_by` field must be the - * same as or a subset of the `group_by` field. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - - /** - * Optional. Aggregate the results by the specified fields. - * A comma-separated list of any of these fields: - * * `psc_propagation_status.source_spoke` - * * `psc_propagation_status.source_group` - * * `psc_propagation_status.source_forwarding_rule` - * * `psc_propagation_status.target_spoke` - * * `psc_propagation_status.target_group` - * * `psc_propagation_status.code` - * - * Generated from protobuf field string group_by = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getGroupBy() - { - return $this->group_by; - } - - /** - * Optional. Aggregate the results by the specified fields. - * A comma-separated list of any of these fields: - * * `psc_propagation_status.source_spoke` - * * `psc_propagation_status.source_group` - * * `psc_propagation_status.source_forwarding_rule` - * * `psc_propagation_status.target_spoke` - * * `psc_propagation_status.target_group` - * * `psc_propagation_status.code` - * - * Generated from protobuf field string group_by = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setGroupBy($var) - { - GPBUtil::checkString($var, True); - $this->group_by = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/QueryHubStatusResponse.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/QueryHubStatusResponse.php deleted file mode 100644 index 6d24361a01e5..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/QueryHubStatusResponse.php +++ /dev/null @@ -1,110 +0,0 @@ -google.cloud.networkconnectivity.v1.QueryHubStatusResponse - */ -class QueryHubStatusResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of hub status. - * - * Generated from protobuf field repeated .google.cloud.networkconnectivity.v1.HubStatusEntry hub_status_entries = 1; - */ - private $hub_status_entries; - /** - * The token for the next page of the response. To see more results, - * use this value as the page_token for your next request. If this value - * is empty, there are no more results. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\NetworkConnectivity\V1\HubStatusEntry>|\Google\Protobuf\Internal\RepeatedField $hub_status_entries - * The list of hub status. - * @type string $next_page_token - * The token for the next page of the response. To see more results, - * use this value as the page_token for your next request. If this value - * is empty, there are no more results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); - parent::__construct($data); - } - - /** - * The list of hub status. - * - * Generated from protobuf field repeated .google.cloud.networkconnectivity.v1.HubStatusEntry hub_status_entries = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getHubStatusEntries() - { - return $this->hub_status_entries; - } - - /** - * The list of hub status. - * - * Generated from protobuf field repeated .google.cloud.networkconnectivity.v1.HubStatusEntry hub_status_entries = 1; - * @param array<\Google\Cloud\NetworkConnectivity\V1\HubStatusEntry>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setHubStatusEntries($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkConnectivity\V1\HubStatusEntry::class); - $this->hub_status_entries = $arr; - - return $this; - } - - /** - * The token for the next page of the response. To see more results, - * use this value as the page_token for your next request. If this value - * is empty, there are no more results. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * The token for the next page of the response. To see more results, - * use this value as the page_token for your next request. If this value - * is empty, there are no more results. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/RejectHubSpokeRequest.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/RejectHubSpokeRequest.php deleted file mode 100644 index 5dc16ed99792..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/RejectHubSpokeRequest.php +++ /dev/null @@ -1,231 +0,0 @@ -google.cloud.networkconnectivity.v1.RejectHubSpokeRequest - */ -class RejectHubSpokeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the hub from which to reject the spoke. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. The URI of the spoke to reject from the hub. - * - * Generated from protobuf field string spoke_uri = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $spoke_uri = ''; - /** - * Optional. A request ID to identify requests. Specify a unique request ID so - * that if you must retry your request, the server knows to ignore the request - * if it has already been completed. The server guarantees that a request - * doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check to see whether the original operation - * was received. If it was, the server ignores the second request. This - * behavior prevents clients from mistakenly creating duplicate commitments. - * The request ID must be a valid UUID, with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - /** - * Optional. Additional information provided by the hub administrator. - * - * Generated from protobuf field string details = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $details = ''; - - /** - * @param string $name Required. The name of the hub from which to reject the spoke. Please see - * {@see HubServiceClient::hubName()} for help formatting this field. - * @param string $spokeUri Required. The URI of the spoke to reject from the hub. Please see - * {@see HubServiceClient::spokeName()} for help formatting this field. - * - * @return \Google\Cloud\NetworkConnectivity\V1\RejectHubSpokeRequest - * - * @experimental - */ - public static function build(string $name, string $spokeUri): self - { - return (new self()) - ->setName($name) - ->setSpokeUri($spokeUri); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the hub from which to reject the spoke. - * @type string $spoke_uri - * Required. The URI of the spoke to reject from the hub. - * @type string $request_id - * Optional. A request ID to identify requests. Specify a unique request ID so - * that if you must retry your request, the server knows to ignore the request - * if it has already been completed. The server guarantees that a request - * doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check to see whether the original operation - * was received. If it was, the server ignores the second request. This - * behavior prevents clients from mistakenly creating duplicate commitments. - * The request ID must be a valid UUID, with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @type string $details - * Optional. Additional information provided by the hub administrator. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the hub from which to reject the spoke. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the hub from which to reject the spoke. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. The URI of the spoke to reject from the hub. - * - * Generated from protobuf field string spoke_uri = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getSpokeUri() - { - return $this->spoke_uri; - } - - /** - * Required. The URI of the spoke to reject from the hub. - * - * Generated from protobuf field string spoke_uri = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setSpokeUri($var) - { - GPBUtil::checkString($var, True); - $this->spoke_uri = $var; - - return $this; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID so - * that if you must retry your request, the server knows to ignore the request - * if it has already been completed. The server guarantees that a request - * doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check to see whether the original operation - * was received. If it was, the server ignores the second request. This - * behavior prevents clients from mistakenly creating duplicate commitments. - * The request ID must be a valid UUID, with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID so - * that if you must retry your request, the server knows to ignore the request - * if it has already been completed. The server guarantees that a request - * doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check to see whether the original operation - * was received. If it was, the server ignores the second request. This - * behavior prevents clients from mistakenly creating duplicate commitments. - * The request ID must be a valid UUID, with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - - /** - * Optional. Additional information provided by the hub administrator. - * - * Generated from protobuf field string details = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDetails() - { - return $this->details; - } - - /** - * Optional. Additional information provided by the hub administrator. - * - * Generated from protobuf field string details = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDetails($var) - { - GPBUtil::checkString($var, True); - $this->details = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/RejectHubSpokeResponse.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/RejectHubSpokeResponse.php deleted file mode 100644 index 6a01f4ea38ee..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/RejectHubSpokeResponse.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.networkconnectivity.v1.RejectHubSpokeResponse - */ -class RejectHubSpokeResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The spoke that was operated on. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.Spoke spoke = 1; - */ - protected $spoke = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\NetworkConnectivity\V1\Spoke $spoke - * The spoke that was operated on. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); - parent::__construct($data); - } - - /** - * The spoke that was operated on. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.Spoke spoke = 1; - * @return \Google\Cloud\NetworkConnectivity\V1\Spoke|null - */ - public function getSpoke() - { - return $this->spoke; - } - - public function hasSpoke() - { - return isset($this->spoke); - } - - public function clearSpoke() - { - unset($this->spoke); - } - - /** - * The spoke that was operated on. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.Spoke spoke = 1; - * @param \Google\Cloud\NetworkConnectivity\V1\Spoke $var - * @return $this - */ - public function setSpoke($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkConnectivity\V1\Spoke::class); - $this->spoke = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/Route.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/Route.php deleted file mode 100644 index 141de04fc5fd..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/Route.php +++ /dev/null @@ -1,694 +0,0 @@ -google.cloud.networkconnectivity.v1.Route - */ -class Route extends \Google\Protobuf\Internal\Message -{ - /** - * Immutable. The name of the route. Route names must be unique. Route names - * use the following form: - * `projects/{project_number}/locations/global/hubs/{hub}/routeTables/{route_table_id}/routes/{route_id}` - * - * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $name = ''; - /** - * Output only. The time the route was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time the route was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * The destination IP address range. - * - * Generated from protobuf field string ip_cidr_range = 1; - */ - protected $ip_cidr_range = ''; - /** - * Output only. The route's type. Its type is determined by the properties of - * its IP address range. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.RouteType type = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $type = 0; - /** - * Immutable. The destination VPC network for packets on this route. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.NextHopVpcNetwork next_hop_vpc_network = 2 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $next_hop_vpc_network = null; - /** - * Optional labels in key-value pair format. For more information about - * labels, see [Requirements for - * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements). - * - * Generated from protobuf field map labels = 6; - */ - private $labels; - /** - * An optional description of the route. - * - * Generated from protobuf field string description = 7; - */ - protected $description = ''; - /** - * Output only. The Google-generated UUID for the route. This value is unique - * across all Network Connectivity Center route resources. If a - * route is deleted and another with the same name is created, - * the new route is assigned a different `uid`. - * - * Generated from protobuf field string uid = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - /** - * Output only. The current lifecycle state of the route. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Immutable. The spoke that this route leads to. - * Example: projects/12345/locations/global/spokes/SPOKE - * - * Generated from protobuf field string spoke = 11 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { - */ - protected $spoke = ''; - /** - * Output only. The origin location of the route. - * Uses the following form: "projects/{project}/locations/{location}" - * Example: projects/1234/locations/us-central1 - * - * Generated from protobuf field string location = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $location = ''; - /** - * Output only. The priority of this route. Priority is used to break ties in - * cases where a destination matches more than one route. In these cases the - * route with the lowest-numbered priority value wins. - * - * Generated from protobuf field int64 priority = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $priority = 0; - /** - * Immutable. The next-hop VPN tunnel for packets on this route. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.NextHopVPNTunnel next_hop_vpn_tunnel = 14 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $next_hop_vpn_tunnel = null; - /** - * Immutable. The next-hop Router appliance instance for packets on this - * route. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.NextHopRouterApplianceInstance next_hop_router_appliance_instance = 15 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $next_hop_router_appliance_instance = null; - /** - * Immutable. The next-hop VLAN attachment for packets on this route. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.NextHopInterconnectAttachment next_hop_interconnect_attachment = 16 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $next_hop_interconnect_attachment = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Immutable. The name of the route. Route names must be unique. Route names - * use the following form: - * `projects/{project_number}/locations/global/hubs/{hub}/routeTables/{route_table_id}/routes/{route_id}` - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time the route was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The time the route was last updated. - * @type string $ip_cidr_range - * The destination IP address range. - * @type int $type - * Output only. The route's type. Its type is determined by the properties of - * its IP address range. - * @type \Google\Cloud\NetworkConnectivity\V1\NextHopVpcNetwork $next_hop_vpc_network - * Immutable. The destination VPC network for packets on this route. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional labels in key-value pair format. For more information about - * labels, see [Requirements for - * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements). - * @type string $description - * An optional description of the route. - * @type string $uid - * Output only. The Google-generated UUID for the route. This value is unique - * across all Network Connectivity Center route resources. If a - * route is deleted and another with the same name is created, - * the new route is assigned a different `uid`. - * @type int $state - * Output only. The current lifecycle state of the route. - * @type string $spoke - * Immutable. The spoke that this route leads to. - * Example: projects/12345/locations/global/spokes/SPOKE - * @type string $location - * Output only. The origin location of the route. - * Uses the following form: "projects/{project}/locations/{location}" - * Example: projects/1234/locations/us-central1 - * @type int|string $priority - * Output only. The priority of this route. Priority is used to break ties in - * cases where a destination matches more than one route. In these cases the - * route with the lowest-numbered priority value wins. - * @type \Google\Cloud\NetworkConnectivity\V1\NextHopVPNTunnel $next_hop_vpn_tunnel - * Immutable. The next-hop VPN tunnel for packets on this route. - * @type \Google\Cloud\NetworkConnectivity\V1\NextHopRouterApplianceInstance $next_hop_router_appliance_instance - * Immutable. The next-hop Router appliance instance for packets on this - * route. - * @type \Google\Cloud\NetworkConnectivity\V1\NextHopInterconnectAttachment $next_hop_interconnect_attachment - * Immutable. The next-hop VLAN attachment for packets on this route. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); - parent::__construct($data); - } - - /** - * Immutable. The name of the route. Route names must be unique. Route names - * use the following form: - * `projects/{project_number}/locations/global/hubs/{hub}/routeTables/{route_table_id}/routes/{route_id}` - * - * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Immutable. The name of the route. Route names must be unique. Route names - * use the following form: - * `projects/{project_number}/locations/global/hubs/{hub}/routeTables/{route_table_id}/routes/{route_id}` - * - * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. The time the route was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The time the route was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The time the route was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The time the route was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * The destination IP address range. - * - * Generated from protobuf field string ip_cidr_range = 1; - * @return string - */ - public function getIpCidrRange() - { - return $this->ip_cidr_range; - } - - /** - * The destination IP address range. - * - * Generated from protobuf field string ip_cidr_range = 1; - * @param string $var - * @return $this - */ - public function setIpCidrRange($var) - { - GPBUtil::checkString($var, True); - $this->ip_cidr_range = $var; - - return $this; - } - - /** - * Output only. The route's type. Its type is determined by the properties of - * its IP address range. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.RouteType type = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Output only. The route's type. Its type is determined by the properties of - * its IP address range. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.RouteType type = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\NetworkConnectivity\V1\RouteType::class); - $this->type = $var; - - return $this; - } - - /** - * Immutable. The destination VPC network for packets on this route. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.NextHopVpcNetwork next_hop_vpc_network = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * @return \Google\Cloud\NetworkConnectivity\V1\NextHopVpcNetwork|null - */ - public function getNextHopVpcNetwork() - { - return $this->next_hop_vpc_network; - } - - public function hasNextHopVpcNetwork() - { - return isset($this->next_hop_vpc_network); - } - - public function clearNextHopVpcNetwork() - { - unset($this->next_hop_vpc_network); - } - - /** - * Immutable. The destination VPC network for packets on this route. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.NextHopVpcNetwork next_hop_vpc_network = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * @param \Google\Cloud\NetworkConnectivity\V1\NextHopVpcNetwork $var - * @return $this - */ - public function setNextHopVpcNetwork($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkConnectivity\V1\NextHopVpcNetwork::class); - $this->next_hop_vpc_network = $var; - - return $this; - } - - /** - * Optional labels in key-value pair format. For more information about - * labels, see [Requirements for - * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements). - * - * Generated from protobuf field map labels = 6; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional labels in key-value pair format. For more information about - * labels, see [Requirements for - * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements). - * - * Generated from protobuf field map labels = 6; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * An optional description of the route. - * - * Generated from protobuf field string description = 7; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * An optional description of the route. - * - * Generated from protobuf field string description = 7; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Output only. The Google-generated UUID for the route. This value is unique - * across all Network Connectivity Center route resources. If a - * route is deleted and another with the same name is created, - * the new route is assigned a different `uid`. - * - * Generated from protobuf field string uid = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. The Google-generated UUID for the route. This value is unique - * across all Network Connectivity Center route resources. If a - * route is deleted and another with the same name is created, - * the new route is assigned a different `uid`. - * - * Generated from protobuf field string uid = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkString($var, True); - $this->uid = $var; - - return $this; - } - - /** - * Output only. The current lifecycle state of the route. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The current lifecycle state of the route. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\NetworkConnectivity\V1\State::class); - $this->state = $var; - - return $this; - } - - /** - * Immutable. The spoke that this route leads to. - * Example: projects/12345/locations/global/spokes/SPOKE - * - * Generated from protobuf field string spoke = 11 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { - * @return string - */ - public function getSpoke() - { - return $this->spoke; - } - - /** - * Immutable. The spoke that this route leads to. - * Example: projects/12345/locations/global/spokes/SPOKE - * - * Generated from protobuf field string spoke = 11 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setSpoke($var) - { - GPBUtil::checkString($var, True); - $this->spoke = $var; - - return $this; - } - - /** - * Output only. The origin location of the route. - * Uses the following form: "projects/{project}/locations/{location}" - * Example: projects/1234/locations/us-central1 - * - * Generated from protobuf field string location = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getLocation() - { - return $this->location; - } - - /** - * Output only. The origin location of the route. - * Uses the following form: "projects/{project}/locations/{location}" - * Example: projects/1234/locations/us-central1 - * - * Generated from protobuf field string location = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setLocation($var) - { - GPBUtil::checkString($var, True); - $this->location = $var; - - return $this; - } - - /** - * Output only. The priority of this route. Priority is used to break ties in - * cases where a destination matches more than one route. In these cases the - * route with the lowest-numbered priority value wins. - * - * Generated from protobuf field int64 priority = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getPriority() - { - return $this->priority; - } - - /** - * Output only. The priority of this route. Priority is used to break ties in - * cases where a destination matches more than one route. In these cases the - * route with the lowest-numbered priority value wins. - * - * Generated from protobuf field int64 priority = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setPriority($var) - { - GPBUtil::checkInt64($var); - $this->priority = $var; - - return $this; - } - - /** - * Immutable. The next-hop VPN tunnel for packets on this route. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.NextHopVPNTunnel next_hop_vpn_tunnel = 14 [(.google.api.field_behavior) = IMMUTABLE]; - * @return \Google\Cloud\NetworkConnectivity\V1\NextHopVPNTunnel|null - */ - public function getNextHopVpnTunnel() - { - return $this->next_hop_vpn_tunnel; - } - - public function hasNextHopVpnTunnel() - { - return isset($this->next_hop_vpn_tunnel); - } - - public function clearNextHopVpnTunnel() - { - unset($this->next_hop_vpn_tunnel); - } - - /** - * Immutable. The next-hop VPN tunnel for packets on this route. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.NextHopVPNTunnel next_hop_vpn_tunnel = 14 [(.google.api.field_behavior) = IMMUTABLE]; - * @param \Google\Cloud\NetworkConnectivity\V1\NextHopVPNTunnel $var - * @return $this - */ - public function setNextHopVpnTunnel($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkConnectivity\V1\NextHopVPNTunnel::class); - $this->next_hop_vpn_tunnel = $var; - - return $this; - } - - /** - * Immutable. The next-hop Router appliance instance for packets on this - * route. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.NextHopRouterApplianceInstance next_hop_router_appliance_instance = 15 [(.google.api.field_behavior) = IMMUTABLE]; - * @return \Google\Cloud\NetworkConnectivity\V1\NextHopRouterApplianceInstance|null - */ - public function getNextHopRouterApplianceInstance() - { - return $this->next_hop_router_appliance_instance; - } - - public function hasNextHopRouterApplianceInstance() - { - return isset($this->next_hop_router_appliance_instance); - } - - public function clearNextHopRouterApplianceInstance() - { - unset($this->next_hop_router_appliance_instance); - } - - /** - * Immutable. The next-hop Router appliance instance for packets on this - * route. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.NextHopRouterApplianceInstance next_hop_router_appliance_instance = 15 [(.google.api.field_behavior) = IMMUTABLE]; - * @param \Google\Cloud\NetworkConnectivity\V1\NextHopRouterApplianceInstance $var - * @return $this - */ - public function setNextHopRouterApplianceInstance($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkConnectivity\V1\NextHopRouterApplianceInstance::class); - $this->next_hop_router_appliance_instance = $var; - - return $this; - } - - /** - * Immutable. The next-hop VLAN attachment for packets on this route. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.NextHopInterconnectAttachment next_hop_interconnect_attachment = 16 [(.google.api.field_behavior) = IMMUTABLE]; - * @return \Google\Cloud\NetworkConnectivity\V1\NextHopInterconnectAttachment|null - */ - public function getNextHopInterconnectAttachment() - { - return $this->next_hop_interconnect_attachment; - } - - public function hasNextHopInterconnectAttachment() - { - return isset($this->next_hop_interconnect_attachment); - } - - public function clearNextHopInterconnectAttachment() - { - unset($this->next_hop_interconnect_attachment); - } - - /** - * Immutable. The next-hop VLAN attachment for packets on this route. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.NextHopInterconnectAttachment next_hop_interconnect_attachment = 16 [(.google.api.field_behavior) = IMMUTABLE]; - * @param \Google\Cloud\NetworkConnectivity\V1\NextHopInterconnectAttachment $var - * @return $this - */ - public function setNextHopInterconnectAttachment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkConnectivity\V1\NextHopInterconnectAttachment::class); - $this->next_hop_interconnect_attachment = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/RouteTable.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/RouteTable.php deleted file mode 100644 index c48d43791198..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/RouteTable.php +++ /dev/null @@ -1,317 +0,0 @@ -google.cloud.networkconnectivity.v1.RouteTable - */ -class RouteTable extends \Google\Protobuf\Internal\Message -{ - /** - * Immutable. The name of the route table. Route table names must be unique. - * They use the following form: - * `projects/{project_number}/locations/global/hubs/{hub}/routeTables/{route_table_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $name = ''; - /** - * Output only. The time the route table was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time the route table was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Optional labels in key-value pair format. For more information about - * labels, see [Requirements for - * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements). - * - * Generated from protobuf field map labels = 4; - */ - private $labels; - /** - * An optional description of the route table. - * - * Generated from protobuf field string description = 5; - */ - protected $description = ''; - /** - * Output only. The Google-generated UUID for the route table. This value is - * unique across all route table resources. If a route table is deleted and - * another with the same name is created, the new route table is assigned - * a different `uid`. - * - * Generated from protobuf field string uid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - /** - * Output only. The current lifecycle state of this route table. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Immutable. The name of the route table. Route table names must be unique. - * They use the following form: - * `projects/{project_number}/locations/global/hubs/{hub}/routeTables/{route_table_id}` - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time the route table was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The time the route table was last updated. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional labels in key-value pair format. For more information about - * labels, see [Requirements for - * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements). - * @type string $description - * An optional description of the route table. - * @type string $uid - * Output only. The Google-generated UUID for the route table. This value is - * unique across all route table resources. If a route table is deleted and - * another with the same name is created, the new route table is assigned - * a different `uid`. - * @type int $state - * Output only. The current lifecycle state of this route table. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); - parent::__construct($data); - } - - /** - * Immutable. The name of the route table. Route table names must be unique. - * They use the following form: - * `projects/{project_number}/locations/global/hubs/{hub}/routeTables/{route_table_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Immutable. The name of the route table. Route table names must be unique. - * They use the following form: - * `projects/{project_number}/locations/global/hubs/{hub}/routeTables/{route_table_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. The time the route table was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The time the route table was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The time the route table was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The time the route table was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Optional labels in key-value pair format. For more information about - * labels, see [Requirements for - * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements). - * - * Generated from protobuf field map labels = 4; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional labels in key-value pair format. For more information about - * labels, see [Requirements for - * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements). - * - * Generated from protobuf field map labels = 4; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * An optional description of the route table. - * - * Generated from protobuf field string description = 5; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * An optional description of the route table. - * - * Generated from protobuf field string description = 5; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Output only. The Google-generated UUID for the route table. This value is - * unique across all route table resources. If a route table is deleted and - * another with the same name is created, the new route table is assigned - * a different `uid`. - * - * Generated from protobuf field string uid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. The Google-generated UUID for the route table. This value is - * unique across all route table resources. If a route table is deleted and - * another with the same name is created, the new route table is assigned - * a different `uid`. - * - * Generated from protobuf field string uid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkString($var, True); - $this->uid = $var; - - return $this; - } - - /** - * Output only. The current lifecycle state of this route table. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The current lifecycle state of this route table. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\NetworkConnectivity\V1\State::class); - $this->state = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/RouteType.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/RouteType.php deleted file mode 100644 index 4f4fd0bc2186..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/RouteType.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.networkconnectivity.v1.RouteType - */ -class RouteType -{ - /** - * No route type information specified - * - * Generated from protobuf enum ROUTE_TYPE_UNSPECIFIED = 0; - */ - const ROUTE_TYPE_UNSPECIFIED = 0; - /** - * The route leads to a destination within the primary address range of the - * VPC network's subnet. - * - * Generated from protobuf enum VPC_PRIMARY_SUBNET = 1; - */ - const VPC_PRIMARY_SUBNET = 1; - /** - * The route leads to a destination within the secondary address range of the - * VPC network's subnet. - * - * Generated from protobuf enum VPC_SECONDARY_SUBNET = 2; - */ - const VPC_SECONDARY_SUBNET = 2; - /** - * The route leads to a destination in a dynamic route. Dynamic routes are - * derived from Border Gateway Protocol (BGP) advertisements received from an - * NCC hybrid spoke. - * - * Generated from protobuf enum DYNAMIC_ROUTE = 3; - */ - const DYNAMIC_ROUTE = 3; - - private static $valueToName = [ - self::ROUTE_TYPE_UNSPECIFIED => 'ROUTE_TYPE_UNSPECIFIED', - self::VPC_PRIMARY_SUBNET => 'VPC_PRIMARY_SUBNET', - self::VPC_SECONDARY_SUBNET => 'VPC_SECONDARY_SUBNET', - self::DYNAMIC_ROUTE => 'DYNAMIC_ROUTE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/RouterApplianceInstance.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/RouterApplianceInstance.php deleted file mode 100644 index 97d6be00b42d..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/RouterApplianceInstance.php +++ /dev/null @@ -1,104 +0,0 @@ -google.cloud.networkconnectivity.v1.RouterApplianceInstance - */ -class RouterApplianceInstance extends \Google\Protobuf\Internal\Message -{ - /** - * The URI of the VM. - * - * Generated from protobuf field string virtual_machine = 1 [(.google.api.resource_reference) = { - */ - protected $virtual_machine = ''; - /** - * The IP address on the VM to use for peering. - * - * Generated from protobuf field string ip_address = 3; - */ - protected $ip_address = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $virtual_machine - * The URI of the VM. - * @type string $ip_address - * The IP address on the VM to use for peering. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); - parent::__construct($data); - } - - /** - * The URI of the VM. - * - * Generated from protobuf field string virtual_machine = 1 [(.google.api.resource_reference) = { - * @return string - */ - public function getVirtualMachine() - { - return $this->virtual_machine; - } - - /** - * The URI of the VM. - * - * Generated from protobuf field string virtual_machine = 1 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setVirtualMachine($var) - { - GPBUtil::checkString($var, True); - $this->virtual_machine = $var; - - return $this; - } - - /** - * The IP address on the VM to use for peering. - * - * Generated from protobuf field string ip_address = 3; - * @return string - */ - public function getIpAddress() - { - return $this->ip_address; - } - - /** - * The IP address on the VM to use for peering. - * - * Generated from protobuf field string ip_address = 3; - * @param string $var - * @return $this - */ - public function setIpAddress($var) - { - GPBUtil::checkString($var, True); - $this->ip_address = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/RoutingVPC.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/RoutingVPC.php deleted file mode 100644 index 2ef9e562490d..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/RoutingVPC.php +++ /dev/null @@ -1,118 +0,0 @@ -google.cloud.networkconnectivity.v1.RoutingVPC - */ -class RoutingVPC extends \Google\Protobuf\Internal\Message -{ - /** - * The URI of the VPC network. - * - * Generated from protobuf field string uri = 1 [(.google.api.resource_reference) = { - */ - protected $uri = ''; - /** - * Output only. If true, indicates that this VPC network is currently - * associated with spokes that use the data transfer feature (spokes where the - * site_to_site_data_transfer field is set to true). If you create new spokes - * that use data transfer, they must be associated with this VPC network. At - * most, one VPC network will have this field set to true. - * - * Generated from protobuf field bool required_for_new_site_to_site_data_transfer_spokes = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $required_for_new_site_to_site_data_transfer_spokes = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $uri - * The URI of the VPC network. - * @type bool $required_for_new_site_to_site_data_transfer_spokes - * Output only. If true, indicates that this VPC network is currently - * associated with spokes that use the data transfer feature (spokes where the - * site_to_site_data_transfer field is set to true). If you create new spokes - * that use data transfer, they must be associated with this VPC network. At - * most, one VPC network will have this field set to true. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); - parent::__construct($data); - } - - /** - * The URI of the VPC network. - * - * Generated from protobuf field string uri = 1 [(.google.api.resource_reference) = { - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * The URI of the VPC network. - * - * Generated from protobuf field string uri = 1 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - - /** - * Output only. If true, indicates that this VPC network is currently - * associated with spokes that use the data transfer feature (spokes where the - * site_to_site_data_transfer field is set to true). If you create new spokes - * that use data transfer, they must be associated with this VPC network. At - * most, one VPC network will have this field set to true. - * - * Generated from protobuf field bool required_for_new_site_to_site_data_transfer_spokes = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getRequiredForNewSiteToSiteDataTransferSpokes() - { - return $this->required_for_new_site_to_site_data_transfer_spokes; - } - - /** - * Output only. If true, indicates that this VPC network is currently - * associated with spokes that use the data transfer feature (spokes where the - * site_to_site_data_transfer field is set to true). If you create new spokes - * that use data transfer, they must be associated with this VPC network. At - * most, one VPC network will have this field set to true. - * - * Generated from protobuf field bool required_for_new_site_to_site_data_transfer_spokes = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setRequiredForNewSiteToSiteDataTransferSpokes($var) - { - GPBUtil::checkBool($var); - $this->required_for_new_site_to_site_data_transfer_spokes = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/Spoke.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/Spoke.php deleted file mode 100644 index 839f405f7bba..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/Spoke.php +++ /dev/null @@ -1,682 +0,0 @@ -google.cloud.networkconnectivity.v1.Spoke - */ -class Spoke extends \Google\Protobuf\Internal\Message -{ - /** - * Immutable. The name of the spoke. Spoke names must be unique. They use the - * following form: - * `projects/{project_number}/locations/{region}/spokes/{spoke_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $name = ''; - /** - * Output only. The time the spoke was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time the spoke was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Optional labels in key-value pair format. For more information about - * labels, see [Requirements for - * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements). - * - * Generated from protobuf field map labels = 4; - */ - private $labels; - /** - * An optional description of the spoke. - * - * Generated from protobuf field string description = 5; - */ - protected $description = ''; - /** - * Immutable. The name of the hub that this spoke is attached to. - * - * Generated from protobuf field string hub = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { - */ - protected $hub = ''; - /** - * Optional. The name of the group that this spoke is associated with. - * - * Generated from protobuf field string group = 23 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - protected $group = ''; - /** - * VPN tunnels that are associated with the spoke. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.LinkedVpnTunnels linked_vpn_tunnels = 17; - */ - protected $linked_vpn_tunnels = null; - /** - * VLAN attachments that are associated with the spoke. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.LinkedInterconnectAttachments linked_interconnect_attachments = 18; - */ - protected $linked_interconnect_attachments = null; - /** - * Router appliance instances that are associated with the spoke. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.LinkedRouterApplianceInstances linked_router_appliance_instances = 19; - */ - protected $linked_router_appliance_instances = null; - /** - * Optional. VPC network that is associated with the spoke. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.LinkedVpcNetwork linked_vpc_network = 20 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $linked_vpc_network = null; - /** - * Optional. The linked producer VPC that is associated with the spoke. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.LinkedProducerVpcNetwork linked_producer_vpc_network = 26 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $linked_producer_vpc_network = null; - /** - * Output only. The Google-generated UUID for the spoke. This value is unique - * across all spoke resources. If a spoke is deleted and another with the same - * name is created, the new spoke is assigned a different `unique_id`. - * - * Generated from protobuf field string unique_id = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $unique_id = ''; - /** - * Output only. The current lifecycle state of this spoke. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.State state = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. The reasons for current state of the spoke. Only present when - * the spoke is in the `INACTIVE` state. - * - * Generated from protobuf field repeated .google.cloud.networkconnectivity.v1.Spoke.StateReason reasons = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $reasons; - /** - * Output only. The type of resource associated with the spoke. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.SpokeType spoke_type = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $spoke_type = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Immutable. The name of the spoke. Spoke names must be unique. They use the - * following form: - * `projects/{project_number}/locations/{region}/spokes/{spoke_id}` - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time the spoke was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The time the spoke was last updated. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional labels in key-value pair format. For more information about - * labels, see [Requirements for - * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements). - * @type string $description - * An optional description of the spoke. - * @type string $hub - * Immutable. The name of the hub that this spoke is attached to. - * @type string $group - * Optional. The name of the group that this spoke is associated with. - * @type \Google\Cloud\NetworkConnectivity\V1\LinkedVpnTunnels $linked_vpn_tunnels - * VPN tunnels that are associated with the spoke. - * @type \Google\Cloud\NetworkConnectivity\V1\LinkedInterconnectAttachments $linked_interconnect_attachments - * VLAN attachments that are associated with the spoke. - * @type \Google\Cloud\NetworkConnectivity\V1\LinkedRouterApplianceInstances $linked_router_appliance_instances - * Router appliance instances that are associated with the spoke. - * @type \Google\Cloud\NetworkConnectivity\V1\LinkedVpcNetwork $linked_vpc_network - * Optional. VPC network that is associated with the spoke. - * @type \Google\Cloud\NetworkConnectivity\V1\LinkedProducerVpcNetwork $linked_producer_vpc_network - * Optional. The linked producer VPC that is associated with the spoke. - * @type string $unique_id - * Output only. The Google-generated UUID for the spoke. This value is unique - * across all spoke resources. If a spoke is deleted and another with the same - * name is created, the new spoke is assigned a different `unique_id`. - * @type int $state - * Output only. The current lifecycle state of this spoke. - * @type array<\Google\Cloud\NetworkConnectivity\V1\Spoke\StateReason>|\Google\Protobuf\Internal\RepeatedField $reasons - * Output only. The reasons for current state of the spoke. Only present when - * the spoke is in the `INACTIVE` state. - * @type int $spoke_type - * Output only. The type of resource associated with the spoke. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); - parent::__construct($data); - } - - /** - * Immutable. The name of the spoke. Spoke names must be unique. They use the - * following form: - * `projects/{project_number}/locations/{region}/spokes/{spoke_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Immutable. The name of the spoke. Spoke names must be unique. They use the - * following form: - * `projects/{project_number}/locations/{region}/spokes/{spoke_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. The time the spoke was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The time the spoke was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The time the spoke was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The time the spoke was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Optional labels in key-value pair format. For more information about - * labels, see [Requirements for - * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements). - * - * Generated from protobuf field map labels = 4; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional labels in key-value pair format. For more information about - * labels, see [Requirements for - * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements). - * - * Generated from protobuf field map labels = 4; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * An optional description of the spoke. - * - * Generated from protobuf field string description = 5; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * An optional description of the spoke. - * - * Generated from protobuf field string description = 5; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Immutable. The name of the hub that this spoke is attached to. - * - * Generated from protobuf field string hub = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { - * @return string - */ - public function getHub() - { - return $this->hub; - } - - /** - * Immutable. The name of the hub that this spoke is attached to. - * - * Generated from protobuf field string hub = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setHub($var) - { - GPBUtil::checkString($var, True); - $this->hub = $var; - - return $this; - } - - /** - * Optional. The name of the group that this spoke is associated with. - * - * Generated from protobuf field string group = 23 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return string - */ - public function getGroup() - { - return $this->group; - } - - /** - * Optional. The name of the group that this spoke is associated with. - * - * Generated from protobuf field string group = 23 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setGroup($var) - { - GPBUtil::checkString($var, True); - $this->group = $var; - - return $this; - } - - /** - * VPN tunnels that are associated with the spoke. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.LinkedVpnTunnels linked_vpn_tunnels = 17; - * @return \Google\Cloud\NetworkConnectivity\V1\LinkedVpnTunnels|null - */ - public function getLinkedVpnTunnels() - { - return $this->linked_vpn_tunnels; - } - - public function hasLinkedVpnTunnels() - { - return isset($this->linked_vpn_tunnels); - } - - public function clearLinkedVpnTunnels() - { - unset($this->linked_vpn_tunnels); - } - - /** - * VPN tunnels that are associated with the spoke. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.LinkedVpnTunnels linked_vpn_tunnels = 17; - * @param \Google\Cloud\NetworkConnectivity\V1\LinkedVpnTunnels $var - * @return $this - */ - public function setLinkedVpnTunnels($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkConnectivity\V1\LinkedVpnTunnels::class); - $this->linked_vpn_tunnels = $var; - - return $this; - } - - /** - * VLAN attachments that are associated with the spoke. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.LinkedInterconnectAttachments linked_interconnect_attachments = 18; - * @return \Google\Cloud\NetworkConnectivity\V1\LinkedInterconnectAttachments|null - */ - public function getLinkedInterconnectAttachments() - { - return $this->linked_interconnect_attachments; - } - - public function hasLinkedInterconnectAttachments() - { - return isset($this->linked_interconnect_attachments); - } - - public function clearLinkedInterconnectAttachments() - { - unset($this->linked_interconnect_attachments); - } - - /** - * VLAN attachments that are associated with the spoke. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.LinkedInterconnectAttachments linked_interconnect_attachments = 18; - * @param \Google\Cloud\NetworkConnectivity\V1\LinkedInterconnectAttachments $var - * @return $this - */ - public function setLinkedInterconnectAttachments($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkConnectivity\V1\LinkedInterconnectAttachments::class); - $this->linked_interconnect_attachments = $var; - - return $this; - } - - /** - * Router appliance instances that are associated with the spoke. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.LinkedRouterApplianceInstances linked_router_appliance_instances = 19; - * @return \Google\Cloud\NetworkConnectivity\V1\LinkedRouterApplianceInstances|null - */ - public function getLinkedRouterApplianceInstances() - { - return $this->linked_router_appliance_instances; - } - - public function hasLinkedRouterApplianceInstances() - { - return isset($this->linked_router_appliance_instances); - } - - public function clearLinkedRouterApplianceInstances() - { - unset($this->linked_router_appliance_instances); - } - - /** - * Router appliance instances that are associated with the spoke. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.LinkedRouterApplianceInstances linked_router_appliance_instances = 19; - * @param \Google\Cloud\NetworkConnectivity\V1\LinkedRouterApplianceInstances $var - * @return $this - */ - public function setLinkedRouterApplianceInstances($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkConnectivity\V1\LinkedRouterApplianceInstances::class); - $this->linked_router_appliance_instances = $var; - - return $this; - } - - /** - * Optional. VPC network that is associated with the spoke. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.LinkedVpcNetwork linked_vpc_network = 20 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\NetworkConnectivity\V1\LinkedVpcNetwork|null - */ - public function getLinkedVpcNetwork() - { - return $this->linked_vpc_network; - } - - public function hasLinkedVpcNetwork() - { - return isset($this->linked_vpc_network); - } - - public function clearLinkedVpcNetwork() - { - unset($this->linked_vpc_network); - } - - /** - * Optional. VPC network that is associated with the spoke. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.LinkedVpcNetwork linked_vpc_network = 20 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\NetworkConnectivity\V1\LinkedVpcNetwork $var - * @return $this - */ - public function setLinkedVpcNetwork($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkConnectivity\V1\LinkedVpcNetwork::class); - $this->linked_vpc_network = $var; - - return $this; - } - - /** - * Optional. The linked producer VPC that is associated with the spoke. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.LinkedProducerVpcNetwork linked_producer_vpc_network = 26 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\NetworkConnectivity\V1\LinkedProducerVpcNetwork|null - */ - public function getLinkedProducerVpcNetwork() - { - return $this->linked_producer_vpc_network; - } - - public function hasLinkedProducerVpcNetwork() - { - return isset($this->linked_producer_vpc_network); - } - - public function clearLinkedProducerVpcNetwork() - { - unset($this->linked_producer_vpc_network); - } - - /** - * Optional. The linked producer VPC that is associated with the spoke. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.LinkedProducerVpcNetwork linked_producer_vpc_network = 26 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\NetworkConnectivity\V1\LinkedProducerVpcNetwork $var - * @return $this - */ - public function setLinkedProducerVpcNetwork($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkConnectivity\V1\LinkedProducerVpcNetwork::class); - $this->linked_producer_vpc_network = $var; - - return $this; - } - - /** - * Output only. The Google-generated UUID for the spoke. This value is unique - * across all spoke resources. If a spoke is deleted and another with the same - * name is created, the new spoke is assigned a different `unique_id`. - * - * Generated from protobuf field string unique_id = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUniqueId() - { - return $this->unique_id; - } - - /** - * Output only. The Google-generated UUID for the spoke. This value is unique - * across all spoke resources. If a spoke is deleted and another with the same - * name is created, the new spoke is assigned a different `unique_id`. - * - * Generated from protobuf field string unique_id = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUniqueId($var) - { - GPBUtil::checkString($var, True); - $this->unique_id = $var; - - return $this; - } - - /** - * Output only. The current lifecycle state of this spoke. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.State state = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The current lifecycle state of this spoke. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.State state = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\NetworkConnectivity\V1\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. The reasons for current state of the spoke. Only present when - * the spoke is in the `INACTIVE` state. - * - * Generated from protobuf field repeated .google.cloud.networkconnectivity.v1.Spoke.StateReason reasons = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getReasons() - { - return $this->reasons; - } - - /** - * Output only. The reasons for current state of the spoke. Only present when - * the spoke is in the `INACTIVE` state. - * - * Generated from protobuf field repeated .google.cloud.networkconnectivity.v1.Spoke.StateReason reasons = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\NetworkConnectivity\V1\Spoke\StateReason>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setReasons($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkConnectivity\V1\Spoke\StateReason::class); - $this->reasons = $arr; - - return $this; - } - - /** - * Output only. The type of resource associated with the spoke. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.SpokeType spoke_type = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getSpokeType() - { - return $this->spoke_type; - } - - /** - * Output only. The type of resource associated with the spoke. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.SpokeType spoke_type = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setSpokeType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\NetworkConnectivity\V1\SpokeType::class); - $this->spoke_type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/Spoke/StateReason.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/Spoke/StateReason.php deleted file mode 100644 index 05de662c4ed7..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/Spoke/StateReason.php +++ /dev/null @@ -1,138 +0,0 @@ -google.cloud.networkconnectivity.v1.Spoke.StateReason - */ -class StateReason extends \Google\Protobuf\Internal\Message -{ - /** - * The code associated with this reason. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.Spoke.StateReason.Code code = 1; - */ - protected $code = 0; - /** - * Human-readable details about this reason. - * - * Generated from protobuf field string message = 2; - */ - protected $message = ''; - /** - * Additional information provided by the user in the RejectSpoke call. - * - * Generated from protobuf field string user_details = 3; - */ - protected $user_details = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $code - * The code associated with this reason. - * @type string $message - * Human-readable details about this reason. - * @type string $user_details - * Additional information provided by the user in the RejectSpoke call. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); - parent::__construct($data); - } - - /** - * The code associated with this reason. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.Spoke.StateReason.Code code = 1; - * @return int - */ - public function getCode() - { - return $this->code; - } - - /** - * The code associated with this reason. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.Spoke.StateReason.Code code = 1; - * @param int $var - * @return $this - */ - public function setCode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\NetworkConnectivity\V1\Spoke\StateReason\Code::class); - $this->code = $var; - - return $this; - } - - /** - * Human-readable details about this reason. - * - * Generated from protobuf field string message = 2; - * @return string - */ - public function getMessage() - { - return $this->message; - } - - /** - * Human-readable details about this reason. - * - * Generated from protobuf field string message = 2; - * @param string $var - * @return $this - */ - public function setMessage($var) - { - GPBUtil::checkString($var, True); - $this->message = $var; - - return $this; - } - - /** - * Additional information provided by the user in the RejectSpoke call. - * - * Generated from protobuf field string user_details = 3; - * @return string - */ - public function getUserDetails() - { - return $this->user_details; - } - - /** - * Additional information provided by the user in the RejectSpoke call. - * - * Generated from protobuf field string user_details = 3; - * @param string $var - * @return $this - */ - public function setUserDetails($var) - { - GPBUtil::checkString($var, True); - $this->user_details = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(StateReason::class, \Google\Cloud\NetworkConnectivity\V1\Spoke_StateReason::class); - diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/Spoke/StateReason/Code.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/Spoke/StateReason/Code.php deleted file mode 100644 index dd6c8c0e1b53..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/Spoke/StateReason/Code.php +++ /dev/null @@ -1,79 +0,0 @@ -google.cloud.networkconnectivity.v1.Spoke.StateReason.Code - */ -class Code -{ - /** - * No information available. - * - * Generated from protobuf enum CODE_UNSPECIFIED = 0; - */ - const CODE_UNSPECIFIED = 0; - /** - * The proposed spoke is pending review. - * - * Generated from protobuf enum PENDING_REVIEW = 1; - */ - const PENDING_REVIEW = 1; - /** - * The proposed spoke has been rejected by the hub administrator. - * - * Generated from protobuf enum REJECTED = 2; - */ - const REJECTED = 2; - /** - * The spoke has been deactivated internally. - * - * Generated from protobuf enum PAUSED = 3; - */ - const PAUSED = 3; - /** - * Network Connectivity Center encountered errors while accepting - * the spoke. - * - * Generated from protobuf enum FAILED = 4; - */ - const FAILED = 4; - - private static $valueToName = [ - self::CODE_UNSPECIFIED => 'CODE_UNSPECIFIED', - self::PENDING_REVIEW => 'PENDING_REVIEW', - self::REJECTED => 'REJECTED', - self::PAUSED => 'PAUSED', - self::FAILED => 'FAILED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Code::class, \Google\Cloud\NetworkConnectivity\V1\Spoke_StateReason_Code::class); - diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/SpokeSummary.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/SpokeSummary.php deleted file mode 100644 index 8fbaff13fdbf..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/SpokeSummary.php +++ /dev/null @@ -1,151 +0,0 @@ -google.cloud.networkconnectivity.v1.SpokeSummary - */ -class SpokeSummary extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Counts the number of spokes of each type that are - * associated with a specific hub. - * - * Generated from protobuf field repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount spoke_type_counts = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $spoke_type_counts; - /** - * Output only. Counts the number of spokes that are in each state - * and associated with a given hub. - * - * Generated from protobuf field repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount spoke_state_counts = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $spoke_state_counts; - /** - * Output only. Counts the number of spokes that are inactive for each - * possible reason and associated with a given hub. - * - * Generated from protobuf field repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount spoke_state_reason_counts = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $spoke_state_reason_counts; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\NetworkConnectivity\V1\SpokeSummary\SpokeTypeCount>|\Google\Protobuf\Internal\RepeatedField $spoke_type_counts - * Output only. Counts the number of spokes of each type that are - * associated with a specific hub. - * @type array<\Google\Cloud\NetworkConnectivity\V1\SpokeSummary\SpokeStateCount>|\Google\Protobuf\Internal\RepeatedField $spoke_state_counts - * Output only. Counts the number of spokes that are in each state - * and associated with a given hub. - * @type array<\Google\Cloud\NetworkConnectivity\V1\SpokeSummary\SpokeStateReasonCount>|\Google\Protobuf\Internal\RepeatedField $spoke_state_reason_counts - * Output only. Counts the number of spokes that are inactive for each - * possible reason and associated with a given hub. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Counts the number of spokes of each type that are - * associated with a specific hub. - * - * Generated from protobuf field repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount spoke_type_counts = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSpokeTypeCounts() - { - return $this->spoke_type_counts; - } - - /** - * Output only. Counts the number of spokes of each type that are - * associated with a specific hub. - * - * Generated from protobuf field repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount spoke_type_counts = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\NetworkConnectivity\V1\SpokeSummary\SpokeTypeCount>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSpokeTypeCounts($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkConnectivity\V1\SpokeSummary\SpokeTypeCount::class); - $this->spoke_type_counts = $arr; - - return $this; - } - - /** - * Output only. Counts the number of spokes that are in each state - * and associated with a given hub. - * - * Generated from protobuf field repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount spoke_state_counts = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSpokeStateCounts() - { - return $this->spoke_state_counts; - } - - /** - * Output only. Counts the number of spokes that are in each state - * and associated with a given hub. - * - * Generated from protobuf field repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount spoke_state_counts = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\NetworkConnectivity\V1\SpokeSummary\SpokeStateCount>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSpokeStateCounts($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkConnectivity\V1\SpokeSummary\SpokeStateCount::class); - $this->spoke_state_counts = $arr; - - return $this; - } - - /** - * Output only. Counts the number of spokes that are inactive for each - * possible reason and associated with a given hub. - * - * Generated from protobuf field repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount spoke_state_reason_counts = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSpokeStateReasonCounts() - { - return $this->spoke_state_reason_counts; - } - - /** - * Output only. Counts the number of spokes that are inactive for each - * possible reason and associated with a given hub. - * - * Generated from protobuf field repeated .google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount spoke_state_reason_counts = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\NetworkConnectivity\V1\SpokeSummary\SpokeStateReasonCount>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSpokeStateReasonCounts($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkConnectivity\V1\SpokeSummary\SpokeStateReasonCount::class); - $this->spoke_state_reason_counts = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/SpokeSummary/SpokeStateCount.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/SpokeSummary/SpokeStateCount.php deleted file mode 100644 index 259b5c409586..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/SpokeSummary/SpokeStateCount.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateCount - */ -class SpokeStateCount extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The state of the spokes. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. The total number of spokes that are in this state - * and associated with a given hub. - * - * Generated from protobuf field int64 count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $state - * Output only. The state of the spokes. - * @type int|string $count - * Output only. The total number of spokes that are in this state - * and associated with a given hub. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The state of the spokes. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The state of the spokes. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\NetworkConnectivity\V1\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. The total number of spokes that are in this state - * and associated with a given hub. - * - * Generated from protobuf field int64 count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getCount() - { - return $this->count; - } - - /** - * Output only. The total number of spokes that are in this state - * and associated with a given hub. - * - * Generated from protobuf field int64 count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setCount($var) - { - GPBUtil::checkInt64($var); - $this->count = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SpokeStateCount::class, \Google\Cloud\NetworkConnectivity\V1\SpokeSummary_SpokeStateCount::class); - diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/SpokeSummary/SpokeStateReasonCount.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/SpokeSummary/SpokeStateReasonCount.php deleted file mode 100644 index c06c8e1e020d..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/SpokeSummary/SpokeStateReasonCount.php +++ /dev/null @@ -1,108 +0,0 @@ -google.cloud.networkconnectivity.v1.SpokeSummary.SpokeStateReasonCount - */ -class SpokeStateReasonCount extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The reason that a spoke is inactive. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.Spoke.StateReason.Code state_reason_code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state_reason_code = 0; - /** - * Output only. The total number of spokes that are inactive for a - * particular reason and associated with a given hub. - * - * Generated from protobuf field int64 count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $state_reason_code - * Output only. The reason that a spoke is inactive. - * @type int|string $count - * Output only. The total number of spokes that are inactive for a - * particular reason and associated with a given hub. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The reason that a spoke is inactive. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.Spoke.StateReason.Code state_reason_code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getStateReasonCode() - { - return $this->state_reason_code; - } - - /** - * Output only. The reason that a spoke is inactive. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.Spoke.StateReason.Code state_reason_code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setStateReasonCode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\NetworkConnectivity\V1\Spoke\StateReason\Code::class); - $this->state_reason_code = $var; - - return $this; - } - - /** - * Output only. The total number of spokes that are inactive for a - * particular reason and associated with a given hub. - * - * Generated from protobuf field int64 count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getCount() - { - return $this->count; - } - - /** - * Output only. The total number of spokes that are inactive for a - * particular reason and associated with a given hub. - * - * Generated from protobuf field int64 count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setCount($var) - { - GPBUtil::checkInt64($var); - $this->count = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SpokeStateReasonCount::class, \Google\Cloud\NetworkConnectivity\V1\SpokeSummary_SpokeStateReasonCount::class); - diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/SpokeSummary/SpokeTypeCount.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/SpokeSummary/SpokeTypeCount.php deleted file mode 100644 index 3e70871d3ccd..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/SpokeSummary/SpokeTypeCount.php +++ /dev/null @@ -1,110 +0,0 @@ -google.cloud.networkconnectivity.v1.SpokeSummary.SpokeTypeCount - */ -class SpokeTypeCount extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The type of the spokes. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.SpokeType spoke_type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $spoke_type = 0; - /** - * Output only. The total number of spokes of this type that are - * associated with the hub. - * - * Generated from protobuf field int64 count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $spoke_type - * Output only. The type of the spokes. - * @type int|string $count - * Output only. The total number of spokes of this type that are - * associated with the hub. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The type of the spokes. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.SpokeType spoke_type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getSpokeType() - { - return $this->spoke_type; - } - - /** - * Output only. The type of the spokes. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.SpokeType spoke_type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setSpokeType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\NetworkConnectivity\V1\SpokeType::class); - $this->spoke_type = $var; - - return $this; - } - - /** - * Output only. The total number of spokes of this type that are - * associated with the hub. - * - * Generated from protobuf field int64 count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getCount() - { - return $this->count; - } - - /** - * Output only. The total number of spokes of this type that are - * associated with the hub. - * - * Generated from protobuf field int64 count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setCount($var) - { - GPBUtil::checkInt64($var); - $this->count = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SpokeTypeCount::class, \Google\Cloud\NetworkConnectivity\V1\SpokeSummary_SpokeTypeCount::class); - diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/SpokeType.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/SpokeType.php deleted file mode 100644 index 259ac3a1d64c..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/SpokeType.php +++ /dev/null @@ -1,83 +0,0 @@ -google.cloud.networkconnectivity.v1.SpokeType - */ -class SpokeType -{ - /** - * Unspecified spoke type. - * - * Generated from protobuf enum SPOKE_TYPE_UNSPECIFIED = 0; - */ - const SPOKE_TYPE_UNSPECIFIED = 0; - /** - * Spokes associated with VPN tunnels. - * - * Generated from protobuf enum VPN_TUNNEL = 1; - */ - const VPN_TUNNEL = 1; - /** - * Spokes associated with VLAN attachments. - * - * Generated from protobuf enum INTERCONNECT_ATTACHMENT = 2; - */ - const INTERCONNECT_ATTACHMENT = 2; - /** - * Spokes associated with router appliance instances. - * - * Generated from protobuf enum ROUTER_APPLIANCE = 3; - */ - const ROUTER_APPLIANCE = 3; - /** - * Spokes associated with VPC networks. - * - * Generated from protobuf enum VPC_NETWORK = 4; - */ - const VPC_NETWORK = 4; - /** - * Spokes that are backed by a producer VPC network. - * - * Generated from protobuf enum PRODUCER_VPC_NETWORK = 7; - */ - const PRODUCER_VPC_NETWORK = 7; - - private static $valueToName = [ - self::SPOKE_TYPE_UNSPECIFIED => 'SPOKE_TYPE_UNSPECIFIED', - self::VPN_TUNNEL => 'VPN_TUNNEL', - self::INTERCONNECT_ATTACHMENT => 'INTERCONNECT_ATTACHMENT', - self::ROUTER_APPLIANCE => 'ROUTER_APPLIANCE', - self::VPC_NETWORK => 'VPC_NETWORK', - self::PRODUCER_VPC_NETWORK => 'PRODUCER_VPC_NETWORK', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/State.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/State.php deleted file mode 100644 index 7150b775ecb7..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/State.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.networkconnectivity.v1.State - */ -class State -{ - /** - * No state information available - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The resource's create operation is in progress. - * - * Generated from protobuf enum CREATING = 1; - */ - const CREATING = 1; - /** - * The resource is active - * - * Generated from protobuf enum ACTIVE = 2; - */ - const ACTIVE = 2; - /** - * The resource's delete operation is in progress. - * - * Generated from protobuf enum DELETING = 3; - */ - const DELETING = 3; - /** - * The resource's accept operation is in progress. - * - * Generated from protobuf enum ACCEPTING = 8; - */ - const ACCEPTING = 8; - /** - * The resource's reject operation is in progress. - * - * Generated from protobuf enum REJECTING = 9; - */ - const REJECTING = 9; - /** - * The resource's update operation is in progress. - * - * Generated from protobuf enum UPDATING = 6; - */ - const UPDATING = 6; - /** - * The resource is inactive. - * - * Generated from protobuf enum INACTIVE = 7; - */ - const INACTIVE = 7; - /** - * The hub associated with this spoke resource has been deleted. - * This state applies to spoke resources only. - * - * Generated from protobuf enum OBSOLETE = 10; - */ - const OBSOLETE = 10; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::CREATING => 'CREATING', - self::ACTIVE => 'ACTIVE', - self::DELETING => 'DELETING', - self::ACCEPTING => 'ACCEPTING', - self::REJECTING => 'REJECTING', - self::UPDATING => 'UPDATING', - self::INACTIVE => 'INACTIVE', - self::OBSOLETE => 'OBSOLETE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/UpdateGroupRequest.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/UpdateGroupRequest.php deleted file mode 100644 index 9d995629f967..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/UpdateGroupRequest.php +++ /dev/null @@ -1,236 +0,0 @@ -google.cloud.networkconnectivity.v1.UpdateGroupRequest - */ -class UpdateGroupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. In the case of an update to an existing group, field mask is used - * to specify the fields to be overwritten. The fields specified in the - * update_mask are relative to the resource, not the full request. A field is - * overwritten if it is in the mask. If the user does not provide a mask, then - * all fields are overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $update_mask = null; - /** - * Required. The state that the group should be in after the update. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.Group group = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $group = null; - /** - * Optional. A request ID to identify requests. Specify a unique request ID so - * that if you must retry your request, the server knows to ignore the request - * if it has already been completed. The server guarantees that a request - * doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check to see whether the original operation - * was received. If it was, the server ignores the second request. This - * behavior prevents clients from mistakenly creating duplicate commitments. - * The request ID must be a valid UUID, with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param \Google\Cloud\NetworkConnectivity\V1\Group $group Required. The state that the group should be in after the update. - * @param \Google\Protobuf\FieldMask $updateMask Optional. In the case of an update to an existing group, field mask is used - * to specify the fields to be overwritten. The fields specified in the - * update_mask are relative to the resource, not the full request. A field is - * overwritten if it is in the mask. If the user does not provide a mask, then - * all fields are overwritten. - * - * @return \Google\Cloud\NetworkConnectivity\V1\UpdateGroupRequest - * - * @experimental - */ - public static function build(\Google\Cloud\NetworkConnectivity\V1\Group $group, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setGroup($group) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Optional. In the case of an update to an existing group, field mask is used - * to specify the fields to be overwritten. The fields specified in the - * update_mask are relative to the resource, not the full request. A field is - * overwritten if it is in the mask. If the user does not provide a mask, then - * all fields are overwritten. - * @type \Google\Cloud\NetworkConnectivity\V1\Group $group - * Required. The state that the group should be in after the update. - * @type string $request_id - * Optional. A request ID to identify requests. Specify a unique request ID so - * that if you must retry your request, the server knows to ignore the request - * if it has already been completed. The server guarantees that a request - * doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check to see whether the original operation - * was received. If it was, the server ignores the second request. This - * behavior prevents clients from mistakenly creating duplicate commitments. - * The request ID must be a valid UUID, with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); - parent::__construct($data); - } - - /** - * Optional. In the case of an update to an existing group, field mask is used - * to specify the fields to be overwritten. The fields specified in the - * update_mask are relative to the resource, not the full request. A field is - * overwritten if it is in the mask. If the user does not provide a mask, then - * all fields are overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Optional. In the case of an update to an existing group, field mask is used - * to specify the fields to be overwritten. The fields specified in the - * update_mask are relative to the resource, not the full request. A field is - * overwritten if it is in the mask. If the user does not provide a mask, then - * all fields are overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * Required. The state that the group should be in after the update. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.Group group = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\NetworkConnectivity\V1\Group|null - */ - public function getGroup() - { - return $this->group; - } - - public function hasGroup() - { - return isset($this->group); - } - - public function clearGroup() - { - unset($this->group); - } - - /** - * Required. The state that the group should be in after the update. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.Group group = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\NetworkConnectivity\V1\Group $var - * @return $this - */ - public function setGroup($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkConnectivity\V1\Group::class); - $this->group = $var; - - return $this; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID so - * that if you must retry your request, the server knows to ignore the request - * if it has already been completed. The server guarantees that a request - * doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check to see whether the original operation - * was received. If it was, the server ignores the second request. This - * behavior prevents clients from mistakenly creating duplicate commitments. - * The request ID must be a valid UUID, with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID so - * that if you must retry your request, the server knows to ignore the request - * if it has already been completed. The server guarantees that a request - * doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check to see whether the original operation - * was received. If it was, the server ignores the second request. This - * behavior prevents clients from mistakenly creating duplicate commitments. - * The request ID must be a valid UUID, with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/UpdateHubRequest.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/UpdateHubRequest.php deleted file mode 100644 index 17e009bf5bd7..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/UpdateHubRequest.php +++ /dev/null @@ -1,236 +0,0 @@ -google.cloud.networkconnectivity.v1.UpdateHubRequest - */ -class UpdateHubRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. In the case of an update to an existing hub, field mask is used - * to specify the fields to be overwritten. The fields specified in the - * update_mask are relative to the resource, not the full request. A field is - * overwritten if it is in the mask. If the user does not provide a mask, then - * all fields are overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $update_mask = null; - /** - * Required. The state that the hub should be in after the update. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.Hub hub = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $hub = null; - /** - * Optional. A request ID to identify requests. Specify a unique request ID so - * that if you must retry your request, the server knows to ignore the request - * if it has already been completed. The server guarantees that a request - * doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check to see whether the original operation - * was received. If it was, the server ignores the second request. This - * behavior prevents clients from mistakenly creating duplicate commitments. - * The request ID must be a valid UUID, with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param \Google\Cloud\NetworkConnectivity\V1\Hub $hub Required. The state that the hub should be in after the update. - * @param \Google\Protobuf\FieldMask $updateMask Optional. In the case of an update to an existing hub, field mask is used - * to specify the fields to be overwritten. The fields specified in the - * update_mask are relative to the resource, not the full request. A field is - * overwritten if it is in the mask. If the user does not provide a mask, then - * all fields are overwritten. - * - * @return \Google\Cloud\NetworkConnectivity\V1\UpdateHubRequest - * - * @experimental - */ - public static function build(\Google\Cloud\NetworkConnectivity\V1\Hub $hub, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setHub($hub) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Optional. In the case of an update to an existing hub, field mask is used - * to specify the fields to be overwritten. The fields specified in the - * update_mask are relative to the resource, not the full request. A field is - * overwritten if it is in the mask. If the user does not provide a mask, then - * all fields are overwritten. - * @type \Google\Cloud\NetworkConnectivity\V1\Hub $hub - * Required. The state that the hub should be in after the update. - * @type string $request_id - * Optional. A request ID to identify requests. Specify a unique request ID so - * that if you must retry your request, the server knows to ignore the request - * if it has already been completed. The server guarantees that a request - * doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check to see whether the original operation - * was received. If it was, the server ignores the second request. This - * behavior prevents clients from mistakenly creating duplicate commitments. - * The request ID must be a valid UUID, with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); - parent::__construct($data); - } - - /** - * Optional. In the case of an update to an existing hub, field mask is used - * to specify the fields to be overwritten. The fields specified in the - * update_mask are relative to the resource, not the full request. A field is - * overwritten if it is in the mask. If the user does not provide a mask, then - * all fields are overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Optional. In the case of an update to an existing hub, field mask is used - * to specify the fields to be overwritten. The fields specified in the - * update_mask are relative to the resource, not the full request. A field is - * overwritten if it is in the mask. If the user does not provide a mask, then - * all fields are overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * Required. The state that the hub should be in after the update. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.Hub hub = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\NetworkConnectivity\V1\Hub|null - */ - public function getHub() - { - return $this->hub; - } - - public function hasHub() - { - return isset($this->hub); - } - - public function clearHub() - { - unset($this->hub); - } - - /** - * Required. The state that the hub should be in after the update. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.Hub hub = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\NetworkConnectivity\V1\Hub $var - * @return $this - */ - public function setHub($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkConnectivity\V1\Hub::class); - $this->hub = $var; - - return $this; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID so - * that if you must retry your request, the server knows to ignore the request - * if it has already been completed. The server guarantees that a request - * doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check to see whether the original operation - * was received. If it was, the server ignores the second request. This - * behavior prevents clients from mistakenly creating duplicate commitments. - * The request ID must be a valid UUID, with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID so - * that if you must retry your request, the server knows to ignore the request - * if it has already been completed. The server guarantees that a request - * doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check to see whether the original operation - * was received. If it was, the server ignores the second request. This - * behavior prevents clients from mistakenly creating duplicate commitments. - * The request ID must be a valid UUID, with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/UpdateSpokeRequest.php b/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/UpdateSpokeRequest.php deleted file mode 100644 index ee50dce1145a..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/proto/src/Google/Cloud/NetworkConnectivity/V1/UpdateSpokeRequest.php +++ /dev/null @@ -1,236 +0,0 @@ -google.cloud.networkconnectivity.v1.UpdateSpokeRequest - */ -class UpdateSpokeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. In the case of an update to an existing spoke, field mask is used - * to specify the fields to be overwritten. The fields specified in the - * update_mask are relative to the resource, not the full request. A field is - * overwritten if it is in the mask. If the user does not provide a mask, then - * all fields are overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $update_mask = null; - /** - * Required. The state that the spoke should be in after the update. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.Spoke spoke = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $spoke = null; - /** - * Optional. A request ID to identify requests. Specify a unique request ID so - * that if you must retry your request, the server knows to ignore the request - * if it has already been completed. The server guarantees that a request - * doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check to see whether the original operation - * was received. If it was, the server ignores the second request. This - * behavior prevents clients from mistakenly creating duplicate commitments. - * The request ID must be a valid UUID, with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param \Google\Cloud\NetworkConnectivity\V1\Spoke $spoke Required. The state that the spoke should be in after the update. - * @param \Google\Protobuf\FieldMask $updateMask Optional. In the case of an update to an existing spoke, field mask is used - * to specify the fields to be overwritten. The fields specified in the - * update_mask are relative to the resource, not the full request. A field is - * overwritten if it is in the mask. If the user does not provide a mask, then - * all fields are overwritten. - * - * @return \Google\Cloud\NetworkConnectivity\V1\UpdateSpokeRequest - * - * @experimental - */ - public static function build(\Google\Cloud\NetworkConnectivity\V1\Spoke $spoke, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setSpoke($spoke) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Optional. In the case of an update to an existing spoke, field mask is used - * to specify the fields to be overwritten. The fields specified in the - * update_mask are relative to the resource, not the full request. A field is - * overwritten if it is in the mask. If the user does not provide a mask, then - * all fields are overwritten. - * @type \Google\Cloud\NetworkConnectivity\V1\Spoke $spoke - * Required. The state that the spoke should be in after the update. - * @type string $request_id - * Optional. A request ID to identify requests. Specify a unique request ID so - * that if you must retry your request, the server knows to ignore the request - * if it has already been completed. The server guarantees that a request - * doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check to see whether the original operation - * was received. If it was, the server ignores the second request. This - * behavior prevents clients from mistakenly creating duplicate commitments. - * The request ID must be a valid UUID, with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkconnectivity\V1\Hub::initOnce(); - parent::__construct($data); - } - - /** - * Optional. In the case of an update to an existing spoke, field mask is used - * to specify the fields to be overwritten. The fields specified in the - * update_mask are relative to the resource, not the full request. A field is - * overwritten if it is in the mask. If the user does not provide a mask, then - * all fields are overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Optional. In the case of an update to an existing spoke, field mask is used - * to specify the fields to be overwritten. The fields specified in the - * update_mask are relative to the resource, not the full request. A field is - * overwritten if it is in the mask. If the user does not provide a mask, then - * all fields are overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * Required. The state that the spoke should be in after the update. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.Spoke spoke = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\NetworkConnectivity\V1\Spoke|null - */ - public function getSpoke() - { - return $this->spoke; - } - - public function hasSpoke() - { - return isset($this->spoke); - } - - public function clearSpoke() - { - unset($this->spoke); - } - - /** - * Required. The state that the spoke should be in after the update. - * - * Generated from protobuf field .google.cloud.networkconnectivity.v1.Spoke spoke = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\NetworkConnectivity\V1\Spoke $var - * @return $this - */ - public function setSpoke($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkConnectivity\V1\Spoke::class); - $this->spoke = $var; - - return $this; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID so - * that if you must retry your request, the server knows to ignore the request - * if it has already been completed. The server guarantees that a request - * doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check to see whether the original operation - * was received. If it was, the server ignores the second request. This - * behavior prevents clients from mistakenly creating duplicate commitments. - * The request ID must be a valid UUID, with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. A request ID to identify requests. Specify a unique request ID so - * that if you must retry your request, the server knows to ignore the request - * if it has already been completed. The server guarantees that a request - * doesn't result in creation of duplicate commitments for at least 60 - * minutes. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check to see whether the original operation - * was received. If it was, the server ignores the second request. This - * behavior prevents clients from mistakenly creating duplicate commitments. - * The request ID must be a valid UUID, with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/accept_hub_spoke.php b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/accept_hub_spoke.php deleted file mode 100644 index cfa6ad8e734e..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/accept_hub_spoke.php +++ /dev/null @@ -1,88 +0,0 @@ -setName($formattedName) - ->setSpokeUri($formattedSpokeUri); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $hubServiceClient->acceptHubSpoke($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var AcceptHubSpokeResponse $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = HubServiceClient::hubName('[PROJECT]', '[HUB]'); - $formattedSpokeUri = HubServiceClient::spokeName('[PROJECT]', '[LOCATION]', '[SPOKE]'); - - accept_hub_spoke_sample($formattedName, $formattedSpokeUri); -} -// [END networkconnectivity_v1_generated_HubService_AcceptHubSpoke_sync] diff --git a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/create_hub.php b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/create_hub.php deleted file mode 100644 index ee735dc229f4..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/create_hub.php +++ /dev/null @@ -1,88 +0,0 @@ -setParent($formattedParent) - ->setHubId($hubId) - ->setHub($hub); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $hubServiceClient->createHub($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Hub $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = HubServiceClient::locationName('[PROJECT]', '[LOCATION]'); - $hubId = '[HUB_ID]'; - - create_hub_sample($formattedParent, $hubId); -} -// [END networkconnectivity_v1_generated_HubService_CreateHub_sync] diff --git a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/create_spoke.php b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/create_spoke.php deleted file mode 100644 index 2d1e5233f0e4..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/create_spoke.php +++ /dev/null @@ -1,88 +0,0 @@ -setParent($formattedParent) - ->setSpokeId($spokeId) - ->setSpoke($spoke); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $hubServiceClient->createSpoke($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Spoke $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = HubServiceClient::locationName('[PROJECT]', '[LOCATION]'); - $spokeId = '[SPOKE_ID]'; - - create_spoke_sample($formattedParent, $spokeId); -} -// [END networkconnectivity_v1_generated_HubService_CreateSpoke_sync] diff --git a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/delete_hub.php b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/delete_hub.php deleted file mode 100644 index d5743264c678..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/delete_hub.php +++ /dev/null @@ -1,80 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $hubServiceClient->deleteHub($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = HubServiceClient::hubName('[PROJECT]', '[HUB]'); - - delete_hub_sample($formattedName); -} -// [END networkconnectivity_v1_generated_HubService_DeleteHub_sync] diff --git a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/delete_spoke.php b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/delete_spoke.php deleted file mode 100644 index 0973d4a3bdef..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/delete_spoke.php +++ /dev/null @@ -1,80 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $hubServiceClient->deleteSpoke($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = HubServiceClient::spokeName('[PROJECT]', '[LOCATION]', '[SPOKE]'); - - delete_spoke_sample($formattedName); -} -// [END networkconnectivity_v1_generated_HubService_DeleteSpoke_sync] diff --git a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/get_group.php b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/get_group.php deleted file mode 100644 index 213b3b239611..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/get_group.php +++ /dev/null @@ -1,71 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Group $response */ - $response = $hubServiceClient->getGroup($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = HubServiceClient::groupName('[PROJECT]', '[HUB]', '[GROUP]'); - - get_group_sample($formattedName); -} -// [END networkconnectivity_v1_generated_HubService_GetGroup_sync] diff --git a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/get_hub.php b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/get_hub.php deleted file mode 100644 index 013cd4af6571..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/get_hub.php +++ /dev/null @@ -1,71 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Hub $response */ - $response = $hubServiceClient->getHub($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = HubServiceClient::hubName('[PROJECT]', '[HUB]'); - - get_hub_sample($formattedName); -} -// [END networkconnectivity_v1_generated_HubService_GetHub_sync] diff --git a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/get_iam_policy.php b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/get_iam_policy.php deleted file mode 100644 index 6b0d6d62e6ae..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/get_iam_policy.php +++ /dev/null @@ -1,72 +0,0 @@ -setResource($resource); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $hubServiceClient->getIamPolicy($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - - get_iam_policy_sample($resource); -} -// [END networkconnectivity_v1_generated_HubService_GetIamPolicy_sync] diff --git a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/get_location.php b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/get_location.php deleted file mode 100644 index 4433077b71b1..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/get_location.php +++ /dev/null @@ -1,57 +0,0 @@ -getLocation($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END networkconnectivity_v1_generated_HubService_GetLocation_sync] diff --git a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/get_route.php b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/get_route.php deleted file mode 100644 index 949a84a3fca1..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/get_route.php +++ /dev/null @@ -1,71 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Route $response */ - $response = $hubServiceClient->getRoute($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = HubServiceClient::hubRouteName('[PROJECT]', '[HUB]', '[ROUTE_TABLE]', '[ROUTE]'); - - get_route_sample($formattedName); -} -// [END networkconnectivity_v1_generated_HubService_GetRoute_sync] diff --git a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/get_route_table.php b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/get_route_table.php deleted file mode 100644 index 4c9ed73913a6..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/get_route_table.php +++ /dev/null @@ -1,71 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var RouteTable $response */ - $response = $hubServiceClient->getRouteTable($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = HubServiceClient::routeTableName('[PROJECT]', '[HUB]', '[ROUTE_TABLE]'); - - get_route_table_sample($formattedName); -} -// [END networkconnectivity_v1_generated_HubService_GetRouteTable_sync] diff --git a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/get_spoke.php b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/get_spoke.php deleted file mode 100644 index a6dd1dec8400..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/get_spoke.php +++ /dev/null @@ -1,71 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Spoke $response */ - $response = $hubServiceClient->getSpoke($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = HubServiceClient::spokeName('[PROJECT]', '[LOCATION]', '[SPOKE]'); - - get_spoke_sample($formattedName); -} -// [END networkconnectivity_v1_generated_HubService_GetSpoke_sync] diff --git a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/list_groups.php b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/list_groups.php deleted file mode 100644 index a479e7595269..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/list_groups.php +++ /dev/null @@ -1,76 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $hubServiceClient->listGroups($request); - - /** @var Group $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = HubServiceClient::hubName('[PROJECT]', '[HUB]'); - - list_groups_sample($formattedParent); -} -// [END networkconnectivity_v1_generated_HubService_ListGroups_sync] diff --git a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/list_hub_spokes.php b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/list_hub_spokes.php deleted file mode 100644 index a0eb0a48862f..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/list_hub_spokes.php +++ /dev/null @@ -1,78 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $hubServiceClient->listHubSpokes($request); - - /** @var Spoke $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = HubServiceClient::hubName('[PROJECT]', '[HUB]'); - - list_hub_spokes_sample($formattedName); -} -// [END networkconnectivity_v1_generated_HubService_ListHubSpokes_sync] diff --git a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/list_hubs.php b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/list_hubs.php deleted file mode 100644 index 20aabe5bd2ff..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/list_hubs.php +++ /dev/null @@ -1,76 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $hubServiceClient->listHubs($request); - - /** @var Hub $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = HubServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - list_hubs_sample($formattedParent); -} -// [END networkconnectivity_v1_generated_HubService_ListHubs_sync] diff --git a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/list_locations.php b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/list_locations.php deleted file mode 100644 index 468f1045ebef..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/list_locations.php +++ /dev/null @@ -1,62 +0,0 @@ -listLocations($request); - - /** @var Location $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END networkconnectivity_v1_generated_HubService_ListLocations_sync] diff --git a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/list_route_tables.php b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/list_route_tables.php deleted file mode 100644 index 1f9354f25f8f..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/list_route_tables.php +++ /dev/null @@ -1,76 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $hubServiceClient->listRouteTables($request); - - /** @var RouteTable $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = HubServiceClient::hubName('[PROJECT]', '[HUB]'); - - list_route_tables_sample($formattedParent); -} -// [END networkconnectivity_v1_generated_HubService_ListRouteTables_sync] diff --git a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/list_routes.php b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/list_routes.php deleted file mode 100644 index 01bd9120ca1d..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/list_routes.php +++ /dev/null @@ -1,76 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $hubServiceClient->listRoutes($request); - - /** @var Route $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = HubServiceClient::routeTableName('[PROJECT]', '[HUB]', '[ROUTE_TABLE]'); - - list_routes_sample($formattedParent); -} -// [END networkconnectivity_v1_generated_HubService_ListRoutes_sync] diff --git a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/list_spokes.php b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/list_spokes.php deleted file mode 100644 index 029f836e46c5..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/list_spokes.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $hubServiceClient->listSpokes($request); - - /** @var Spoke $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = HubServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - list_spokes_sample($formattedParent); -} -// [END networkconnectivity_v1_generated_HubService_ListSpokes_sync] diff --git a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/query_hub_status.php b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/query_hub_status.php deleted file mode 100644 index d2b8662793f7..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/query_hub_status.php +++ /dev/null @@ -1,77 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $hubServiceClient->queryHubStatus($request); - - /** @var HubStatusEntry $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = HubServiceClient::hubName('[PROJECT]', '[HUB]'); - - query_hub_status_sample($formattedName); -} -// [END networkconnectivity_v1_generated_HubService_QueryHubStatus_sync] diff --git a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/reject_hub_spoke.php b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/reject_hub_spoke.php deleted file mode 100644 index d2a899f91c8c..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/reject_hub_spoke.php +++ /dev/null @@ -1,90 +0,0 @@ -setName($formattedName) - ->setSpokeUri($formattedSpokeUri); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $hubServiceClient->rejectHubSpoke($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var RejectHubSpokeResponse $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = HubServiceClient::hubName('[PROJECT]', '[HUB]'); - $formattedSpokeUri = HubServiceClient::spokeName('[PROJECT]', '[LOCATION]', '[SPOKE]'); - - reject_hub_spoke_sample($formattedName, $formattedSpokeUri); -} -// [END networkconnectivity_v1_generated_HubService_RejectHubSpoke_sync] diff --git a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/set_iam_policy.php b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/set_iam_policy.php deleted file mode 100644 index eec7c2e038f6..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/set_iam_policy.php +++ /dev/null @@ -1,77 +0,0 @@ -setResource($resource) - ->setPolicy($policy); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $hubServiceClient->setIamPolicy($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - - set_iam_policy_sample($resource); -} -// [END networkconnectivity_v1_generated_HubService_SetIamPolicy_sync] diff --git a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/test_iam_permissions.php b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/test_iam_permissions.php deleted file mode 100644 index 5246dabfd46a..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/test_iam_permissions.php +++ /dev/null @@ -1,84 +0,0 @@ -setResource($resource) - ->setPermissions($permissions); - - // Call the API and handle any network failures. - try { - /** @var TestIamPermissionsResponse $response */ - $response = $hubServiceClient->testIamPermissions($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - $permissionsElement = '[PERMISSIONS]'; - - test_iam_permissions_sample($resource, $permissionsElement); -} -// [END networkconnectivity_v1_generated_HubService_TestIamPermissions_sync] diff --git a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/update_group.php b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/update_group.php deleted file mode 100644 index ddda479d7372..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/update_group.php +++ /dev/null @@ -1,71 +0,0 @@ -setGroup($group); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $hubServiceClient->updateGroup($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Group $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END networkconnectivity_v1_generated_HubService_UpdateGroup_sync] diff --git a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/update_hub.php b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/update_hub.php deleted file mode 100644 index 808d67ae2de5..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/update_hub.php +++ /dev/null @@ -1,72 +0,0 @@ -setHub($hub); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $hubServiceClient->updateHub($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Hub $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END networkconnectivity_v1_generated_HubService_UpdateHub_sync] diff --git a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/update_spoke.php b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/update_spoke.php deleted file mode 100644 index 0f33c890de08..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/HubServiceClient/update_spoke.php +++ /dev/null @@ -1,71 +0,0 @@ -setSpoke($spoke); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $hubServiceClient->updateSpoke($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Spoke $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END networkconnectivity_v1_generated_HubService_UpdateSpoke_sync] diff --git a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/PolicyBasedRoutingServiceClient/create_policy_based_route.php b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/PolicyBasedRoutingServiceClient/create_policy_based_route.php deleted file mode 100644 index 384feebf2f1a..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/PolicyBasedRoutingServiceClient/create_policy_based_route.php +++ /dev/null @@ -1,113 +0,0 @@ -setProtocolVersion($policyBasedRouteFilterProtocolVersion); - $policyBasedRoute = (new PolicyBasedRoute()) - ->setNetwork($formattedPolicyBasedRouteNetwork) - ->setFilter($policyBasedRouteFilter); - $request = (new CreatePolicyBasedRouteRequest()) - ->setParent($formattedParent) - ->setPolicyBasedRouteId($policyBasedRouteId) - ->setPolicyBasedRoute($policyBasedRoute); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $policyBasedRoutingServiceClient->createPolicyBasedRoute($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var PolicyBasedRoute $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = PolicyBasedRoutingServiceClient::locationName('[PROJECT]', '[LOCATION]'); - $policyBasedRouteId = '[POLICY_BASED_ROUTE_ID]'; - $formattedPolicyBasedRouteNetwork = PolicyBasedRoutingServiceClient::networkName( - '[PROJECT]', - '[RESOURCE_ID]' - ); - $policyBasedRouteFilterProtocolVersion = ProtocolVersion::PROTOCOL_VERSION_UNSPECIFIED; - - create_policy_based_route_sample( - $formattedParent, - $policyBasedRouteId, - $formattedPolicyBasedRouteNetwork, - $policyBasedRouteFilterProtocolVersion - ); -} -// [END networkconnectivity_v1_generated_PolicyBasedRoutingService_CreatePolicyBasedRoute_sync] diff --git a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/PolicyBasedRoutingServiceClient/delete_policy_based_route.php b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/PolicyBasedRoutingServiceClient/delete_policy_based_route.php deleted file mode 100644 index 13d9c7af90cb..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/PolicyBasedRoutingServiceClient/delete_policy_based_route.php +++ /dev/null @@ -1,83 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $policyBasedRoutingServiceClient->deletePolicyBasedRoute($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = PolicyBasedRoutingServiceClient::policyBasedRouteName( - '[PROJECT]', - '[POLICY_BASED_ROUTE]' - ); - - delete_policy_based_route_sample($formattedName); -} -// [END networkconnectivity_v1_generated_PolicyBasedRoutingService_DeletePolicyBasedRoute_sync] diff --git a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/PolicyBasedRoutingServiceClient/get_iam_policy.php b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/PolicyBasedRoutingServiceClient/get_iam_policy.php deleted file mode 100644 index 9545cedfe2e5..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/PolicyBasedRoutingServiceClient/get_iam_policy.php +++ /dev/null @@ -1,72 +0,0 @@ -setResource($resource); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $policyBasedRoutingServiceClient->getIamPolicy($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - - get_iam_policy_sample($resource); -} -// [END networkconnectivity_v1_generated_PolicyBasedRoutingService_GetIamPolicy_sync] diff --git a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/PolicyBasedRoutingServiceClient/get_location.php b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/PolicyBasedRoutingServiceClient/get_location.php deleted file mode 100644 index 0c2a0f44a2f0..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/PolicyBasedRoutingServiceClient/get_location.php +++ /dev/null @@ -1,57 +0,0 @@ -getLocation($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END networkconnectivity_v1_generated_PolicyBasedRoutingService_GetLocation_sync] diff --git a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/PolicyBasedRoutingServiceClient/get_policy_based_route.php b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/PolicyBasedRoutingServiceClient/get_policy_based_route.php deleted file mode 100644 index aefb84686f98..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/PolicyBasedRoutingServiceClient/get_policy_based_route.php +++ /dev/null @@ -1,74 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var PolicyBasedRoute $response */ - $response = $policyBasedRoutingServiceClient->getPolicyBasedRoute($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = PolicyBasedRoutingServiceClient::policyBasedRouteName( - '[PROJECT]', - '[POLICY_BASED_ROUTE]' - ); - - get_policy_based_route_sample($formattedName); -} -// [END networkconnectivity_v1_generated_PolicyBasedRoutingService_GetPolicyBasedRoute_sync] diff --git a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/PolicyBasedRoutingServiceClient/list_locations.php b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/PolicyBasedRoutingServiceClient/list_locations.php deleted file mode 100644 index 888add0b93bd..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/PolicyBasedRoutingServiceClient/list_locations.php +++ /dev/null @@ -1,62 +0,0 @@ -listLocations($request); - - /** @var Location $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END networkconnectivity_v1_generated_PolicyBasedRoutingService_ListLocations_sync] diff --git a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/PolicyBasedRoutingServiceClient/list_policy_based_routes.php b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/PolicyBasedRoutingServiceClient/list_policy_based_routes.php deleted file mode 100644 index e422c41f7199..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/PolicyBasedRoutingServiceClient/list_policy_based_routes.php +++ /dev/null @@ -1,76 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $policyBasedRoutingServiceClient->listPolicyBasedRoutes($request); - - /** @var PolicyBasedRoute $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = PolicyBasedRoutingServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - list_policy_based_routes_sample($formattedParent); -} -// [END networkconnectivity_v1_generated_PolicyBasedRoutingService_ListPolicyBasedRoutes_sync] diff --git a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/PolicyBasedRoutingServiceClient/set_iam_policy.php b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/PolicyBasedRoutingServiceClient/set_iam_policy.php deleted file mode 100644 index 816615b0fc4f..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/PolicyBasedRoutingServiceClient/set_iam_policy.php +++ /dev/null @@ -1,77 +0,0 @@ -setResource($resource) - ->setPolicy($policy); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $policyBasedRoutingServiceClient->setIamPolicy($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - - set_iam_policy_sample($resource); -} -// [END networkconnectivity_v1_generated_PolicyBasedRoutingService_SetIamPolicy_sync] diff --git a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/PolicyBasedRoutingServiceClient/test_iam_permissions.php b/owl-bot-staging/NetworkConnectivity/v1/samples/V1/PolicyBasedRoutingServiceClient/test_iam_permissions.php deleted file mode 100644 index 53f7df6b74a0..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/samples/V1/PolicyBasedRoutingServiceClient/test_iam_permissions.php +++ /dev/null @@ -1,84 +0,0 @@ -setResource($resource) - ->setPermissions($permissions); - - // Call the API and handle any network failures. - try { - /** @var TestIamPermissionsResponse $response */ - $response = $policyBasedRoutingServiceClient->testIamPermissions($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - $permissionsElement = '[PERMISSIONS]'; - - test_iam_permissions_sample($resource, $permissionsElement); -} -// [END networkconnectivity_v1_generated_PolicyBasedRoutingService_TestIamPermissions_sync] diff --git a/owl-bot-staging/NetworkConnectivity/v1/src/V1/Client/HubServiceClient.php b/owl-bot-staging/NetworkConnectivity/v1/src/V1/Client/HubServiceClient.php deleted file mode 100644 index a8da4029a111..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/src/V1/Client/HubServiceClient.php +++ /dev/null @@ -1,1203 +0,0 @@ - acceptHubSpokeAsync(AcceptHubSpokeRequest $request, array $optionalArgs = []) - * @method PromiseInterface createHubAsync(CreateHubRequest $request, array $optionalArgs = []) - * @method PromiseInterface createSpokeAsync(CreateSpokeRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteHubAsync(DeleteHubRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteSpokeAsync(DeleteSpokeRequest $request, array $optionalArgs = []) - * @method PromiseInterface getGroupAsync(GetGroupRequest $request, array $optionalArgs = []) - * @method PromiseInterface getHubAsync(GetHubRequest $request, array $optionalArgs = []) - * @method PromiseInterface getRouteAsync(GetRouteRequest $request, array $optionalArgs = []) - * @method PromiseInterface getRouteTableAsync(GetRouteTableRequest $request, array $optionalArgs = []) - * @method PromiseInterface getSpokeAsync(GetSpokeRequest $request, array $optionalArgs = []) - * @method PromiseInterface listGroupsAsync(ListGroupsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listHubSpokesAsync(ListHubSpokesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listHubsAsync(ListHubsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listRouteTablesAsync(ListRouteTablesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listRoutesAsync(ListRoutesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listSpokesAsync(ListSpokesRequest $request, array $optionalArgs = []) - * @method PromiseInterface queryHubStatusAsync(QueryHubStatusRequest $request, array $optionalArgs = []) - * @method PromiseInterface rejectHubSpokeAsync(RejectHubSpokeRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateGroupAsync(UpdateGroupRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateHubAsync(UpdateHubRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateSpokeAsync(UpdateSpokeRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) - * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) - */ -final class HubServiceClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.networkconnectivity.v1.HubService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'networkconnectivity.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'networkconnectivity.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/hub_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/hub_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/hub_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/hub_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Create the default operation client for the service. - * - * @param array $options ClientOptions for the client. - * - * @return OperationsClient - */ - private function createOperationsClient(array $options) - { - // Unset client-specific configuration options - unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); - - if (isset($options['operationsClient'])) { - return $options['operationsClient']; - } - - return new OperationsClient($options); - } - - /** - * Formats a string containing the fully-qualified path to represent a group - * resource. - * - * @param string $project - * @param string $hub - * @param string $group - * - * @return string The formatted group resource. - */ - public static function groupName(string $project, string $hub, string $group): string - { - return self::getPathTemplate('group')->render([ - 'project' => $project, - 'hub' => $hub, - 'group' => $group, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a hub - * resource. - * - * @param string $project - * @param string $hub - * - * @return string The formatted hub resource. - */ - public static function hubName(string $project, string $hub): string - { - return self::getPathTemplate('hub')->render([ - 'project' => $project, - 'hub' => $hub, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a hub_route - * resource. - * - * @param string $project - * @param string $hub - * @param string $routeTable - * @param string $route - * - * @return string The formatted hub_route resource. - */ - public static function hubRouteName(string $project, string $hub, string $routeTable, string $route): string - { - return self::getPathTemplate('hubRoute')->render([ - 'project' => $project, - 'hub' => $hub, - 'route_table' => $routeTable, - 'route' => $route, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a instance - * resource. - * - * @param string $project - * @param string $zone - * @param string $instance - * - * @return string The formatted instance resource. - */ - public static function instanceName(string $project, string $zone, string $instance): string - { - return self::getPathTemplate('instance')->render([ - 'project' => $project, - 'zone' => $zone, - 'instance' => $instance, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * interconnect_attachment resource. - * - * @param string $project - * @param string $region - * @param string $resourceId - * - * @return string The formatted interconnect_attachment resource. - */ - public static function interconnectAttachmentName(string $project, string $region, string $resourceId): string - { - return self::getPathTemplate('interconnectAttachment')->render([ - 'project' => $project, - 'region' => $region, - 'resource_id' => $resourceId, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a location - * resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted location resource. - */ - public static function locationName(string $project, string $location): string - { - return self::getPathTemplate('location')->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a network - * resource. - * - * @param string $project - * @param string $resourceId - * - * @return string The formatted network resource. - */ - public static function networkName(string $project, string $resourceId): string - { - return self::getPathTemplate('network')->render([ - 'project' => $project, - 'resource_id' => $resourceId, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a route_table - * resource. - * - * @param string $project - * @param string $hub - * @param string $routeTable - * - * @return string The formatted route_table resource. - */ - public static function routeTableName(string $project, string $hub, string $routeTable): string - { - return self::getPathTemplate('routeTable')->render([ - 'project' => $project, - 'hub' => $hub, - 'route_table' => $routeTable, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a spoke - * resource. - * - * @param string $project - * @param string $location - * @param string $spoke - * - * @return string The formatted spoke resource. - */ - public static function spokeName(string $project, string $location, string $spoke): string - { - return self::getPathTemplate('spoke')->render([ - 'project' => $project, - 'location' => $location, - 'spoke' => $spoke, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a vpn_tunnel - * resource. - * - * @param string $project - * @param string $region - * @param string $resourceId - * - * @return string The formatted vpn_tunnel resource. - */ - public static function vpnTunnelName(string $project, string $region, string $resourceId): string - { - return self::getPathTemplate('vpnTunnel')->render([ - 'project' => $project, - 'region' => $region, - 'resource_id' => $resourceId, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - group: projects/{project}/locations/global/hubs/{hub}/groups/{group} - * - hub: projects/{project}/locations/global/hubs/{hub} - * - hubRoute: projects/{project}/locations/global/hubs/{hub}/routeTables/{route_table}/routes/{route} - * - instance: projects/{project}/zones/{zone}/instances/{instance} - * - interconnectAttachment: projects/{project}/regions/{region}/interconnectAttachments/{resource_id} - * - location: projects/{project}/locations/{location} - * - network: projects/{project}/global/networks/{resource_id} - * - routeTable: projects/{project}/locations/global/hubs/{hub}/routeTables/{route_table} - * - spoke: projects/{project}/locations/{location}/spokes/{spoke} - * - vpnTunnel: projects/{project}/regions/{region}/vpnTunnels/{resource_id} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param ?string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, ?string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'networkconnectivity.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Accepts a proposal to attach a Network Connectivity Center spoke - * to a hub. - * - * The async variant is {@see HubServiceClient::acceptHubSpokeAsync()} . - * - * @example samples/V1/HubServiceClient/accept_hub_spoke.php - * - * @param AcceptHubSpokeRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function acceptHubSpoke(AcceptHubSpokeRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('AcceptHubSpoke', $request, $callOptions)->wait(); - } - - /** - * Creates a new Network Connectivity Center hub in the specified project. - * - * The async variant is {@see HubServiceClient::createHubAsync()} . - * - * @example samples/V1/HubServiceClient/create_hub.php - * - * @param CreateHubRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createHub(CreateHubRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateHub', $request, $callOptions)->wait(); - } - - /** - * Creates a Network Connectivity Center spoke. - * - * The async variant is {@see HubServiceClient::createSpokeAsync()} . - * - * @example samples/V1/HubServiceClient/create_spoke.php - * - * @param CreateSpokeRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createSpoke(CreateSpokeRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateSpoke', $request, $callOptions)->wait(); - } - - /** - * Deletes a Network Connectivity Center hub. - * - * The async variant is {@see HubServiceClient::deleteHubAsync()} . - * - * @example samples/V1/HubServiceClient/delete_hub.php - * - * @param DeleteHubRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteHub(DeleteHubRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteHub', $request, $callOptions)->wait(); - } - - /** - * Deletes a Network Connectivity Center spoke. - * - * The async variant is {@see HubServiceClient::deleteSpokeAsync()} . - * - * @example samples/V1/HubServiceClient/delete_spoke.php - * - * @param DeleteSpokeRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteSpoke(DeleteSpokeRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteSpoke', $request, $callOptions)->wait(); - } - - /** - * Gets details about a Network Connectivity Center group. - * - * The async variant is {@see HubServiceClient::getGroupAsync()} . - * - * @example samples/V1/HubServiceClient/get_group.php - * - * @param GetGroupRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Group - * - * @throws ApiException Thrown if the API call fails. - */ - public function getGroup(GetGroupRequest $request, array $callOptions = []): Group - { - return $this->startApiCall('GetGroup', $request, $callOptions)->wait(); - } - - /** - * Gets details about a Network Connectivity Center hub. - * - * The async variant is {@see HubServiceClient::getHubAsync()} . - * - * @example samples/V1/HubServiceClient/get_hub.php - * - * @param GetHubRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Hub - * - * @throws ApiException Thrown if the API call fails. - */ - public function getHub(GetHubRequest $request, array $callOptions = []): Hub - { - return $this->startApiCall('GetHub', $request, $callOptions)->wait(); - } - - /** - * Gets details about the specified route. - * - * The async variant is {@see HubServiceClient::getRouteAsync()} . - * - * @example samples/V1/HubServiceClient/get_route.php - * - * @param GetRouteRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Route - * - * @throws ApiException Thrown if the API call fails. - */ - public function getRoute(GetRouteRequest $request, array $callOptions = []): Route - { - return $this->startApiCall('GetRoute', $request, $callOptions)->wait(); - } - - /** - * Gets details about a Network Connectivity Center route table. - * - * The async variant is {@see HubServiceClient::getRouteTableAsync()} . - * - * @example samples/V1/HubServiceClient/get_route_table.php - * - * @param GetRouteTableRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return RouteTable - * - * @throws ApiException Thrown if the API call fails. - */ - public function getRouteTable(GetRouteTableRequest $request, array $callOptions = []): RouteTable - { - return $this->startApiCall('GetRouteTable', $request, $callOptions)->wait(); - } - - /** - * Gets details about a Network Connectivity Center spoke. - * - * The async variant is {@see HubServiceClient::getSpokeAsync()} . - * - * @example samples/V1/HubServiceClient/get_spoke.php - * - * @param GetSpokeRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Spoke - * - * @throws ApiException Thrown if the API call fails. - */ - public function getSpoke(GetSpokeRequest $request, array $callOptions = []): Spoke - { - return $this->startApiCall('GetSpoke', $request, $callOptions)->wait(); - } - - /** - * Lists groups in a given hub. - * - * The async variant is {@see HubServiceClient::listGroupsAsync()} . - * - * @example samples/V1/HubServiceClient/list_groups.php - * - * @param ListGroupsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listGroups(ListGroupsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListGroups', $request, $callOptions); - } - - /** - * Lists the Network Connectivity Center spokes associated with a - * specified hub and location. The list includes both spokes that are attached - * to the hub and spokes that have been proposed but not yet accepted. - * - * The async variant is {@see HubServiceClient::listHubSpokesAsync()} . - * - * @example samples/V1/HubServiceClient/list_hub_spokes.php - * - * @param ListHubSpokesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listHubSpokes(ListHubSpokesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListHubSpokes', $request, $callOptions); - } - - /** - * Lists the Network Connectivity Center hubs associated with a given project. - * - * The async variant is {@see HubServiceClient::listHubsAsync()} . - * - * @example samples/V1/HubServiceClient/list_hubs.php - * - * @param ListHubsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listHubs(ListHubsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListHubs', $request, $callOptions); - } - - /** - * Lists route tables in a given hub. - * - * The async variant is {@see HubServiceClient::listRouteTablesAsync()} . - * - * @example samples/V1/HubServiceClient/list_route_tables.php - * - * @param ListRouteTablesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listRouteTables(ListRouteTablesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListRouteTables', $request, $callOptions); - } - - /** - * Lists routes in a given route table. - * - * The async variant is {@see HubServiceClient::listRoutesAsync()} . - * - * @example samples/V1/HubServiceClient/list_routes.php - * - * @param ListRoutesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listRoutes(ListRoutesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListRoutes', $request, $callOptions); - } - - /** - * Lists the Network Connectivity Center spokes in a specified project and - * location. - * - * The async variant is {@see HubServiceClient::listSpokesAsync()} . - * - * @example samples/V1/HubServiceClient/list_spokes.php - * - * @param ListSpokesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listSpokes(ListSpokesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListSpokes', $request, $callOptions); - } - - /** - * Query the Private Service Connect propagation status of a Network - * Connectivity Center hub. - * - * The async variant is {@see HubServiceClient::queryHubStatusAsync()} . - * - * @example samples/V1/HubServiceClient/query_hub_status.php - * - * @param QueryHubStatusRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function queryHubStatus(QueryHubStatusRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('QueryHubStatus', $request, $callOptions); - } - - /** - * Rejects a Network Connectivity Center spoke from being attached to a hub. - * If the spoke was previously in the `ACTIVE` state, it - * transitions to the `INACTIVE` state and is no longer able to - * connect to other spokes that are attached to the hub. - * - * The async variant is {@see HubServiceClient::rejectHubSpokeAsync()} . - * - * @example samples/V1/HubServiceClient/reject_hub_spoke.php - * - * @param RejectHubSpokeRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function rejectHubSpoke(RejectHubSpokeRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('RejectHubSpoke', $request, $callOptions)->wait(); - } - - /** - * Updates the parameters of a Network Connectivity Center group. - * - * The async variant is {@see HubServiceClient::updateGroupAsync()} . - * - * @example samples/V1/HubServiceClient/update_group.php - * - * @param UpdateGroupRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateGroup(UpdateGroupRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateGroup', $request, $callOptions)->wait(); - } - - /** - * Updates the description and/or labels of a Network Connectivity Center - * hub. - * - * The async variant is {@see HubServiceClient::updateHubAsync()} . - * - * @example samples/V1/HubServiceClient/update_hub.php - * - * @param UpdateHubRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateHub(UpdateHubRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateHub', $request, $callOptions)->wait(); - } - - /** - * Updates the parameters of a Network Connectivity Center spoke. - * - * The async variant is {@see HubServiceClient::updateSpokeAsync()} . - * - * @example samples/V1/HubServiceClient/update_spoke.php - * - * @param UpdateSpokeRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateSpoke(UpdateSpokeRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateSpoke', $request, $callOptions)->wait(); - } - - /** - * Gets information about a location. - * - * The async variant is {@see HubServiceClient::getLocationAsync()} . - * - * @example samples/V1/HubServiceClient/get_location.php - * - * @param GetLocationRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Location - * - * @throws ApiException Thrown if the API call fails. - */ - public function getLocation(GetLocationRequest $request, array $callOptions = []): Location - { - return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * The async variant is {@see HubServiceClient::listLocationsAsync()} . - * - * @example samples/V1/HubServiceClient/list_locations.php - * - * @param ListLocationsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListLocations', $request, $callOptions); - } - - /** - * Gets the access control policy for a resource. Returns an empty policy - if the resource exists and does not have a policy set. - * - * The async variant is {@see HubServiceClient::getIamPolicyAsync()} . - * - * @example samples/V1/HubServiceClient/get_iam_policy.php - * - * @param GetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * Sets the access control policy on the specified resource. Replaces - any existing policy. - - Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` - errors. - * - * The async variant is {@see HubServiceClient::setIamPolicyAsync()} . - * - * @example samples/V1/HubServiceClient/set_iam_policy.php - * - * @param SetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * Returns permissions that a caller has on the specified resource. If the - resource does not exist, this will return an empty set of - permissions, not a `NOT_FOUND` error. - - Note: This operation is designed to be used for building - permission-aware UIs and command-line tools, not for authorization - checking. This operation may "fail open" without warning. - * - * The async variant is {@see HubServiceClient::testIamPermissionsAsync()} . - * - * @example samples/V1/HubServiceClient/test_iam_permissions.php - * - * @param TestIamPermissionsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return TestIamPermissionsResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse - { - return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/NetworkConnectivity/v1/src/V1/Client/PolicyBasedRoutingServiceClient.php b/owl-bot-staging/NetworkConnectivity/v1/src/V1/Client/PolicyBasedRoutingServiceClient.php deleted file mode 100644 index e171929c6d56..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/src/V1/Client/PolicyBasedRoutingServiceClient.php +++ /dev/null @@ -1,580 +0,0 @@ - createPolicyBasedRouteAsync(CreatePolicyBasedRouteRequest $request, array $optionalArgs = []) - * @method PromiseInterface deletePolicyBasedRouteAsync(DeletePolicyBasedRouteRequest $request, array $optionalArgs = []) - * @method PromiseInterface getPolicyBasedRouteAsync(GetPolicyBasedRouteRequest $request, array $optionalArgs = []) - * @method PromiseInterface listPolicyBasedRoutesAsync(ListPolicyBasedRoutesRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) - * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) - */ -final class PolicyBasedRoutingServiceClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.networkconnectivity.v1.PolicyBasedRoutingService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'networkconnectivity.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'networkconnectivity.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/policy_based_routing_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/policy_based_routing_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/policy_based_routing_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/policy_based_routing_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Create the default operation client for the service. - * - * @param array $options ClientOptions for the client. - * - * @return OperationsClient - */ - private function createOperationsClient(array $options) - { - // Unset client-specific configuration options - unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); - - if (isset($options['operationsClient'])) { - return $options['operationsClient']; - } - - return new OperationsClient($options); - } - - /** - * Formats a string containing the fully-qualified path to represent a location - * resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted location resource. - */ - public static function locationName(string $project, string $location): string - { - return self::getPathTemplate('location')->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a network - * resource. - * - * @param string $project - * @param string $resourceId - * - * @return string The formatted network resource. - */ - public static function networkName(string $project, string $resourceId): string - { - return self::getPathTemplate('network')->render([ - 'project' => $project, - 'resource_id' => $resourceId, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * policy_based_route resource. - * - * @param string $project - * @param string $policyBasedRoute - * - * @return string The formatted policy_based_route resource. - */ - public static function policyBasedRouteName(string $project, string $policyBasedRoute): string - { - return self::getPathTemplate('policyBasedRoute')->render([ - 'project' => $project, - 'policy_based_route' => $policyBasedRoute, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - location: projects/{project}/locations/{location} - * - network: projects/{project}/global/networks/{resource_id} - * - policyBasedRoute: projects/{project}/locations/global/PolicyBasedRoutes/{policy_based_route} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param ?string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, ?string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'networkconnectivity.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Creates a new PolicyBasedRoute in a given project and location. - * - * The async variant is - * {@see PolicyBasedRoutingServiceClient::createPolicyBasedRouteAsync()} . - * - * @example samples/V1/PolicyBasedRoutingServiceClient/create_policy_based_route.php - * - * @param CreatePolicyBasedRouteRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createPolicyBasedRoute(CreatePolicyBasedRouteRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreatePolicyBasedRoute', $request, $callOptions)->wait(); - } - - /** - * Deletes a single PolicyBasedRoute. - * - * The async variant is - * {@see PolicyBasedRoutingServiceClient::deletePolicyBasedRouteAsync()} . - * - * @example samples/V1/PolicyBasedRoutingServiceClient/delete_policy_based_route.php - * - * @param DeletePolicyBasedRouteRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deletePolicyBasedRoute(DeletePolicyBasedRouteRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeletePolicyBasedRoute', $request, $callOptions)->wait(); - } - - /** - * Gets details of a single PolicyBasedRoute. - * - * The async variant is - * {@see PolicyBasedRoutingServiceClient::getPolicyBasedRouteAsync()} . - * - * @example samples/V1/PolicyBasedRoutingServiceClient/get_policy_based_route.php - * - * @param GetPolicyBasedRouteRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PolicyBasedRoute - * - * @throws ApiException Thrown if the API call fails. - */ - public function getPolicyBasedRoute(GetPolicyBasedRouteRequest $request, array $callOptions = []): PolicyBasedRoute - { - return $this->startApiCall('GetPolicyBasedRoute', $request, $callOptions)->wait(); - } - - /** - * Lists PolicyBasedRoutes in a given project and location. - * - * The async variant is - * {@see PolicyBasedRoutingServiceClient::listPolicyBasedRoutesAsync()} . - * - * @example samples/V1/PolicyBasedRoutingServiceClient/list_policy_based_routes.php - * - * @param ListPolicyBasedRoutesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listPolicyBasedRoutes(ListPolicyBasedRoutesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListPolicyBasedRoutes', $request, $callOptions); - } - - /** - * Gets information about a location. - * - * The async variant is {@see PolicyBasedRoutingServiceClient::getLocationAsync()} - * . - * - * @example samples/V1/PolicyBasedRoutingServiceClient/get_location.php - * - * @param GetLocationRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Location - * - * @throws ApiException Thrown if the API call fails. - */ - public function getLocation(GetLocationRequest $request, array $callOptions = []): Location - { - return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * The async variant is - * {@see PolicyBasedRoutingServiceClient::listLocationsAsync()} . - * - * @example samples/V1/PolicyBasedRoutingServiceClient/list_locations.php - * - * @param ListLocationsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListLocations', $request, $callOptions); - } - - /** - * Gets the access control policy for a resource. Returns an empty policy - if the resource exists and does not have a policy set. - * - * The async variant is {@see PolicyBasedRoutingServiceClient::getIamPolicyAsync()} - * . - * - * @example samples/V1/PolicyBasedRoutingServiceClient/get_iam_policy.php - * - * @param GetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * Sets the access control policy on the specified resource. Replaces - any existing policy. - - Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` - errors. - * - * The async variant is {@see PolicyBasedRoutingServiceClient::setIamPolicyAsync()} - * . - * - * @example samples/V1/PolicyBasedRoutingServiceClient/set_iam_policy.php - * - * @param SetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * Returns permissions that a caller has on the specified resource. If the - resource does not exist, this will return an empty set of - permissions, not a `NOT_FOUND` error. - - Note: This operation is designed to be used for building - permission-aware UIs and command-line tools, not for authorization - checking. This operation may "fail open" without warning. - * - * The async variant is - * {@see PolicyBasedRoutingServiceClient::testIamPermissionsAsync()} . - * - * @example samples/V1/PolicyBasedRoutingServiceClient/test_iam_permissions.php - * - * @param TestIamPermissionsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return TestIamPermissionsResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse - { - return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/NetworkConnectivity/v1/src/V1/gapic_metadata.json b/owl-bot-staging/NetworkConnectivity/v1/src/V1/gapic_metadata.json deleted file mode 100644 index 2525c2d62829..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/src/V1/gapic_metadata.json +++ /dev/null @@ -1,202 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.networkconnectivity.v1", - "libraryPackage": "Google\\Cloud\\NetworkConnectivity\\V1", - "services": { - "HubService": { - "clients": { - "grpc": { - "libraryClient": "HubServiceGapicClient", - "rpcs": { - "AcceptHubSpoke": { - "methods": [ - "acceptHubSpoke" - ] - }, - "CreateHub": { - "methods": [ - "createHub" - ] - }, - "CreateSpoke": { - "methods": [ - "createSpoke" - ] - }, - "DeleteHub": { - "methods": [ - "deleteHub" - ] - }, - "DeleteSpoke": { - "methods": [ - "deleteSpoke" - ] - }, - "GetGroup": { - "methods": [ - "getGroup" - ] - }, - "GetHub": { - "methods": [ - "getHub" - ] - }, - "GetRoute": { - "methods": [ - "getRoute" - ] - }, - "GetRouteTable": { - "methods": [ - "getRouteTable" - ] - }, - "GetSpoke": { - "methods": [ - "getSpoke" - ] - }, - "ListGroups": { - "methods": [ - "listGroups" - ] - }, - "ListHubSpokes": { - "methods": [ - "listHubSpokes" - ] - }, - "ListHubs": { - "methods": [ - "listHubs" - ] - }, - "ListRouteTables": { - "methods": [ - "listRouteTables" - ] - }, - "ListRoutes": { - "methods": [ - "listRoutes" - ] - }, - "ListSpokes": { - "methods": [ - "listSpokes" - ] - }, - "QueryHubStatus": { - "methods": [ - "queryHubStatus" - ] - }, - "RejectHubSpoke": { - "methods": [ - "rejectHubSpoke" - ] - }, - "UpdateGroup": { - "methods": [ - "updateGroup" - ] - }, - "UpdateHub": { - "methods": [ - "updateHub" - ] - }, - "UpdateSpoke": { - "methods": [ - "updateSpoke" - ] - }, - "GetLocation": { - "methods": [ - "getLocation" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - }, - "GetIamPolicy": { - "methods": [ - "getIamPolicy" - ] - }, - "SetIamPolicy": { - "methods": [ - "setIamPolicy" - ] - }, - "TestIamPermissions": { - "methods": [ - "testIamPermissions" - ] - } - } - } - } - }, - "PolicyBasedRoutingService": { - "clients": { - "grpc": { - "libraryClient": "PolicyBasedRoutingServiceGapicClient", - "rpcs": { - "CreatePolicyBasedRoute": { - "methods": [ - "createPolicyBasedRoute" - ] - }, - "DeletePolicyBasedRoute": { - "methods": [ - "deletePolicyBasedRoute" - ] - }, - "GetPolicyBasedRoute": { - "methods": [ - "getPolicyBasedRoute" - ] - }, - "ListPolicyBasedRoutes": { - "methods": [ - "listPolicyBasedRoutes" - ] - }, - "GetLocation": { - "methods": [ - "getLocation" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - }, - "GetIamPolicy": { - "methods": [ - "getIamPolicy" - ] - }, - "SetIamPolicy": { - "methods": [ - "setIamPolicy" - ] - }, - "TestIamPermissions": { - "methods": [ - "testIamPermissions" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/NetworkConnectivity/v1/src/V1/resources/hub_service_client_config.json b/owl-bot-staging/NetworkConnectivity/v1/src/V1/resources/hub_service_client_config.json deleted file mode 100644 index 7194f4dfd22f..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/src/V1/resources/hub_service_client_config.json +++ /dev/null @@ -1,174 +0,0 @@ -{ - "interfaces": { - "google.cloud.networkconnectivity.v1.HubService": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE" - ], - "no_retry_1_codes": [] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "retry_policy_1_params": { - "initial_retry_delay_millis": 1000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 10000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - }, - "no_retry_1_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": { - "AcceptHubSpoke": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "CreateHub": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateSpoke": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteHub": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteSpoke": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetGroup": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetHub": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetRoute": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetRouteTable": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetSpoke": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListGroups": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListHubSpokes": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListHubs": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListRouteTables": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListRoutes": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListSpokes": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "QueryHubStatus": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "RejectHubSpoke": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateGroup": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateHub": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateSpoke": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetLocation": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListLocations": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "SetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "TestIamPermissions": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/NetworkConnectivity/v1/src/V1/resources/hub_service_descriptor_config.php b/owl-bot-staging/NetworkConnectivity/v1/src/V1/resources/hub_service_descriptor_config.php deleted file mode 100644 index 3d8593713266..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/src/V1/resources/hub_service_descriptor_config.php +++ /dev/null @@ -1,487 +0,0 @@ - [ - 'google.cloud.networkconnectivity.v1.HubService' => [ - 'AcceptHubSpoke' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\NetworkConnectivity\V1\AcceptHubSpokeResponse', - 'metadataReturnType' => '\Google\Cloud\NetworkConnectivity\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'CreateHub' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\NetworkConnectivity\V1\Hub', - 'metadataReturnType' => '\Google\Cloud\NetworkConnectivity\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateSpoke' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\NetworkConnectivity\V1\Spoke', - 'metadataReturnType' => '\Google\Cloud\NetworkConnectivity\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteHub' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\NetworkConnectivity\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteSpoke' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\NetworkConnectivity\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'RejectHubSpoke' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\NetworkConnectivity\V1\RejectHubSpokeResponse', - 'metadataReturnType' => '\Google\Cloud\NetworkConnectivity\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateGroup' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\NetworkConnectivity\V1\Group', - 'metadataReturnType' => '\Google\Cloud\NetworkConnectivity\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'group.name', - 'fieldAccessors' => [ - 'getGroup', - 'getName', - ], - ], - ], - ], - 'UpdateHub' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\NetworkConnectivity\V1\Hub', - 'metadataReturnType' => '\Google\Cloud\NetworkConnectivity\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'hub.name', - 'fieldAccessors' => [ - 'getHub', - 'getName', - ], - ], - ], - ], - 'UpdateSpoke' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\NetworkConnectivity\V1\Spoke', - 'metadataReturnType' => '\Google\Cloud\NetworkConnectivity\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'spoke.name', - 'fieldAccessors' => [ - 'getSpoke', - 'getName', - ], - ], - ], - ], - 'GetGroup' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\NetworkConnectivity\V1\Group', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetHub' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\NetworkConnectivity\V1\Hub', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetRoute' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\NetworkConnectivity\V1\Route', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetRouteTable' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\NetworkConnectivity\V1\RouteTable', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetSpoke' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\NetworkConnectivity\V1\Spoke', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListGroups' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getGroups', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\NetworkConnectivity\V1\ListGroupsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListHubSpokes' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getSpokes', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\NetworkConnectivity\V1\ListHubSpokesResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListHubs' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getHubs', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\NetworkConnectivity\V1\ListHubsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListRouteTables' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getRouteTables', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\NetworkConnectivity\V1\ListRouteTablesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListRoutes' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getRoutes', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\NetworkConnectivity\V1\ListRoutesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListSpokes' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getSpokes', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\NetworkConnectivity\V1\ListSpokesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'QueryHubStatus' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getHubStatusEntries', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\NetworkConnectivity\V1\QueryHubStatusResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetLocation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Location\Location', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'ListLocations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLocations', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'GetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'SetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'TestIamPermissions' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'templateMap' => [ - 'group' => 'projects/{project}/locations/global/hubs/{hub}/groups/{group}', - 'hub' => 'projects/{project}/locations/global/hubs/{hub}', - 'hubRoute' => 'projects/{project}/locations/global/hubs/{hub}/routeTables/{route_table}/routes/{route}', - 'instance' => 'projects/{project}/zones/{zone}/instances/{instance}', - 'interconnectAttachment' => 'projects/{project}/regions/{region}/interconnectAttachments/{resource_id}', - 'location' => 'projects/{project}/locations/{location}', - 'network' => 'projects/{project}/global/networks/{resource_id}', - 'routeTable' => 'projects/{project}/locations/global/hubs/{hub}/routeTables/{route_table}', - 'spoke' => 'projects/{project}/locations/{location}/spokes/{spoke}', - 'vpnTunnel' => 'projects/{project}/regions/{region}/vpnTunnels/{resource_id}', - ], - ], - ], -]; diff --git a/owl-bot-staging/NetworkConnectivity/v1/src/V1/resources/hub_service_rest_client_config.php b/owl-bot-staging/NetworkConnectivity/v1/src/V1/resources/hub_service_rest_client_config.php deleted file mode 100644 index 93730e459cfc..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/src/V1/resources/hub_service_rest_client_config.php +++ /dev/null @@ -1,432 +0,0 @@ - [ - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.cloud.networkconnectivity.v1.HubService' => [ - 'AcceptHubSpoke' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/global/hubs/*}:acceptSpoke', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'CreateHub' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/global}/hubs', - 'body' => 'hub', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'hub_id', - ], - ], - 'CreateSpoke' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/spokes', - 'body' => 'spoke', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'spoke_id', - ], - ], - 'DeleteHub' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/global/hubs/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteSpoke' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/spokes/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetGroup' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/global/hubs/*/groups/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetHub' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/global/hubs/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetRoute' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/global/hubs/*/routeTables/*/routes/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetRouteTable' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/global/hubs/*/routeTables/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetSpoke' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/spokes/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListGroups' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/global/hubs/*}/groups', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListHubSpokes' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/global/hubs/*}:listSpokes', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListHubs' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/global}/hubs', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListRouteTables' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/global/hubs/*}/routeTables', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListRoutes' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/global/hubs/*/routeTables/*}/routes', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListSpokes' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/spokes', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'QueryHubStatus' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/global/hubs/*}:queryStatus', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'RejectHubSpoke' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/global/hubs/*}:rejectSpoke', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'UpdateGroup' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{group.name=projects/*/locations/global/hubs/*/groups/*}', - 'body' => 'group', - 'placeholders' => [ - 'group.name' => [ - 'getters' => [ - 'getGroup', - 'getName', - ], - ], - ], - ], - 'UpdateHub' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{hub.name=projects/*/locations/global/hubs/*}', - 'body' => 'hub', - 'placeholders' => [ - 'hub.name' => [ - 'getters' => [ - 'getHub', - 'getName', - ], - ], - ], - ], - 'UpdateSpoke' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{spoke.name=projects/*/locations/*/spokes/*}', - 'body' => 'spoke', - 'placeholders' => [ - 'spoke.name' => [ - 'getters' => [ - 'getSpoke', - 'getName', - ], - ], - ], - ], - ], - 'google.iam.v1.IAMPolicy' => [ - 'GetIamPolicy' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/global/hubs/*}:getIamPolicy', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/global/hubs/*/groups/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/spokes/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/global/policyBasedRoutes/*}:getIamPolicy', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/global/hubs/*}:setIamPolicy', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/global/hubs/*/groups/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/spokes/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/global/policyBasedRoutes/*}:setIamPolicy', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/global/hubs/*}:testIamPermissions', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/global/hubs/*/groups/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/spokes/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/global/policyBasedRoutes/*}:testIamPermissions', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/NetworkConnectivity/v1/src/V1/resources/policy_based_routing_service_client_config.json b/owl-bot-staging/NetworkConnectivity/v1/src/V1/resources/policy_based_routing_service_client_config.json deleted file mode 100644 index f15e176fb5db..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/src/V1/resources/policy_based_routing_service_client_config.json +++ /dev/null @@ -1,89 +0,0 @@ -{ - "interfaces": { - "google.cloud.networkconnectivity.v1.PolicyBasedRoutingService": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE" - ], - "no_retry_1_codes": [] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "retry_policy_1_params": { - "initial_retry_delay_millis": 1000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 10000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - }, - "no_retry_1_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": { - "CreatePolicyBasedRoute": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeletePolicyBasedRoute": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetPolicyBasedRoute": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListPolicyBasedRoutes": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetLocation": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListLocations": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "SetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "TestIamPermissions": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/NetworkConnectivity/v1/src/V1/resources/policy_based_routing_service_descriptor_config.php b/owl-bot-staging/NetworkConnectivity/v1/src/V1/resources/policy_based_routing_service_descriptor_config.php deleted file mode 100644 index 43fb2ee993b3..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/src/V1/resources/policy_based_routing_service_descriptor_config.php +++ /dev/null @@ -1,176 +0,0 @@ - [ - 'google.cloud.networkconnectivity.v1.PolicyBasedRoutingService' => [ - 'CreatePolicyBasedRoute' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\NetworkConnectivity\V1\PolicyBasedRoute', - 'metadataReturnType' => '\Google\Cloud\NetworkConnectivity\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeletePolicyBasedRoute' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\NetworkConnectivity\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetPolicyBasedRoute' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\NetworkConnectivity\V1\PolicyBasedRoute', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListPolicyBasedRoutes' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getPolicyBasedRoutes', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\NetworkConnectivity\V1\ListPolicyBasedRoutesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'GetLocation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Location\Location', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'ListLocations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLocations', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'GetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'SetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'TestIamPermissions' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'templateMap' => [ - 'location' => 'projects/{project}/locations/{location}', - 'network' => 'projects/{project}/global/networks/{resource_id}', - 'policyBasedRoute' => 'projects/{project}/locations/global/PolicyBasedRoutes/{policy_based_route}', - ], - ], - ], -]; diff --git a/owl-bot-staging/NetworkConnectivity/v1/src/V1/resources/policy_based_routing_service_rest_client_config.php b/owl-bot-staging/NetworkConnectivity/v1/src/V1/resources/policy_based_routing_service_rest_client_config.php deleted file mode 100644 index 185f9fcd591a..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/src/V1/resources/policy_based_routing_service_rest_client_config.php +++ /dev/null @@ -1,233 +0,0 @@ - [ - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.cloud.networkconnectivity.v1.PolicyBasedRoutingService' => [ - 'CreatePolicyBasedRoute' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/global}/policyBasedRoutes', - 'body' => 'policy_based_route', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'policy_based_route_id', - ], - ], - 'DeletePolicyBasedRoute' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/global/policyBasedRoutes/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetPolicyBasedRoute' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/global/policyBasedRoutes/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListPolicyBasedRoutes' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/global}/policyBasedRoutes', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - ], - 'google.iam.v1.IAMPolicy' => [ - 'GetIamPolicy' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/global/hubs/*}:getIamPolicy', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/global/hubs/*/groups/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/spokes/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/global/policyBasedRoutes/*}:getIamPolicy', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/global/hubs/*}:setIamPolicy', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/global/hubs/*/groups/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/spokes/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/global/policyBasedRoutes/*}:setIamPolicy', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/global/hubs/*}:testIamPermissions', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/global/hubs/*/groups/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/spokes/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/global/policyBasedRoutes/*}:testIamPermissions', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/NetworkConnectivity/v1/tests/Unit/V1/Client/HubServiceClientTest.php b/owl-bot-staging/NetworkConnectivity/v1/tests/Unit/V1/Client/HubServiceClientTest.php deleted file mode 100644 index 8089a7f377cc..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/tests/Unit/V1/Client/HubServiceClientTest.php +++ /dev/null @@ -1,2537 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return HubServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new HubServiceClient($options); - } - - /** @test */ - public function acceptHubSpokeTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/acceptHubSpokeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new AcceptHubSpokeResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/acceptHubSpokeTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->hubName('[PROJECT]', '[HUB]'); - $formattedSpokeUri = $gapicClient->spokeName('[PROJECT]', '[LOCATION]', '[SPOKE]'); - $request = (new AcceptHubSpokeRequest()) - ->setName($formattedName) - ->setSpokeUri($formattedSpokeUri); - $response = $gapicClient->acceptHubSpoke($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkconnectivity.v1.HubService/AcceptHubSpoke', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualApiRequestObject->getSpokeUri(); - $this->assertProtobufEquals($formattedSpokeUri, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/acceptHubSpokeTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function acceptHubSpokeExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/acceptHubSpokeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->hubName('[PROJECT]', '[HUB]'); - $formattedSpokeUri = $gapicClient->spokeName('[PROJECT]', '[LOCATION]', '[SPOKE]'); - $request = (new AcceptHubSpokeRequest()) - ->setName($formattedName) - ->setSpokeUri($formattedSpokeUri); - $response = $gapicClient->acceptHubSpoke($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/acceptHubSpokeTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createHubTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createHubTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $uniqueId = 'uniqueId-538310583'; - $exportPsc = false; - $expectedResponse = new Hub(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setUniqueId($uniqueId); - $expectedResponse->setExportPsc($exportPsc); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createHubTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $hubId = 'hubId-1206469467'; - $hub = new Hub(); - $request = (new CreateHubRequest()) - ->setParent($formattedParent) - ->setHubId($hubId) - ->setHub($hub); - $response = $gapicClient->createHub($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkconnectivity.v1.HubService/CreateHub', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getHubId(); - $this->assertProtobufEquals($hubId, $actualValue); - $actualValue = $actualApiRequestObject->getHub(); - $this->assertProtobufEquals($hub, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createHubTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createHubExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createHubTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $hubId = 'hubId-1206469467'; - $hub = new Hub(); - $request = (new CreateHubRequest()) - ->setParent($formattedParent) - ->setHubId($hubId) - ->setHub($hub); - $response = $gapicClient->createHub($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createHubTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createSpokeTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createSpokeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $hub = 'hub103669'; - $group = 'group98629247'; - $uniqueId = 'uniqueId-538310583'; - $expectedResponse = new Spoke(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setHub($hub); - $expectedResponse->setGroup($group); - $expectedResponse->setUniqueId($uniqueId); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createSpokeTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $spokeId = 'spokeId-1839321170'; - $spoke = new Spoke(); - $request = (new CreateSpokeRequest()) - ->setParent($formattedParent) - ->setSpokeId($spokeId) - ->setSpoke($spoke); - $response = $gapicClient->createSpoke($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkconnectivity.v1.HubService/CreateSpoke', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getSpokeId(); - $this->assertProtobufEquals($spokeId, $actualValue); - $actualValue = $actualApiRequestObject->getSpoke(); - $this->assertProtobufEquals($spoke, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createSpokeTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createSpokeExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createSpokeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $spokeId = 'spokeId-1839321170'; - $spoke = new Spoke(); - $request = (new CreateSpokeRequest()) - ->setParent($formattedParent) - ->setSpokeId($spokeId) - ->setSpoke($spoke); - $response = $gapicClient->createSpoke($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createSpokeTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteHubTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteHubTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteHubTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->hubName('[PROJECT]', '[HUB]'); - $request = (new DeleteHubRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteHub($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkconnectivity.v1.HubService/DeleteHub', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteHubTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteHubExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteHubTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->hubName('[PROJECT]', '[HUB]'); - $request = (new DeleteHubRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteHub($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteHubTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteSpokeTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteSpokeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteSpokeTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->spokeName('[PROJECT]', '[LOCATION]', '[SPOKE]'); - $request = (new DeleteSpokeRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteSpoke($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkconnectivity.v1.HubService/DeleteSpoke', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteSpokeTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteSpokeExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteSpokeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->spokeName('[PROJECT]', '[LOCATION]', '[SPOKE]'); - $request = (new DeleteSpokeRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteSpoke($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteSpokeTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getGroupTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $uid = 'uid115792'; - $routeTable = 'routeTable-1769949608'; - $expectedResponse = new Group(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setUid($uid); - $expectedResponse->setRouteTable($routeTable); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->groupName('[PROJECT]', '[HUB]', '[GROUP]'); - $request = (new GetGroupRequest()) - ->setName($formattedName); - $response = $gapicClient->getGroup($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkconnectivity.v1.HubService/GetGroup', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getGroupExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->groupName('[PROJECT]', '[HUB]', '[GROUP]'); - $request = (new GetGroupRequest()) - ->setName($formattedName); - try { - $gapicClient->getGroup($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getHubTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $uniqueId = 'uniqueId-538310583'; - $exportPsc = false; - $expectedResponse = new Hub(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setUniqueId($uniqueId); - $expectedResponse->setExportPsc($exportPsc); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->hubName('[PROJECT]', '[HUB]'); - $request = (new GetHubRequest()) - ->setName($formattedName); - $response = $gapicClient->getHub($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkconnectivity.v1.HubService/GetHub', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getHubExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->hubName('[PROJECT]', '[HUB]'); - $request = (new GetHubRequest()) - ->setName($formattedName); - try { - $gapicClient->getHub($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getRouteTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $ipCidrRange = 'ipCidrRange-2049366326'; - $description = 'description-1724546052'; - $uid = 'uid115792'; - $spoke = 'spoke109651596'; - $location = 'location1901043637'; - $priority = 1165461084; - $expectedResponse = new Route(); - $expectedResponse->setName($name2); - $expectedResponse->setIpCidrRange($ipCidrRange); - $expectedResponse->setDescription($description); - $expectedResponse->setUid($uid); - $expectedResponse->setSpoke($spoke); - $expectedResponse->setLocation($location); - $expectedResponse->setPriority($priority); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->hubRouteName('[PROJECT]', '[HUB]', '[ROUTE_TABLE]', '[ROUTE]'); - $request = (new GetRouteRequest()) - ->setName($formattedName); - $response = $gapicClient->getRoute($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkconnectivity.v1.HubService/GetRoute', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getRouteExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->hubRouteName('[PROJECT]', '[HUB]', '[ROUTE_TABLE]', '[ROUTE]'); - $request = (new GetRouteRequest()) - ->setName($formattedName); - try { - $gapicClient->getRoute($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getRouteTableTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $uid = 'uid115792'; - $expectedResponse = new RouteTable(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setUid($uid); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->routeTableName('[PROJECT]', '[HUB]', '[ROUTE_TABLE]'); - $request = (new GetRouteTableRequest()) - ->setName($formattedName); - $response = $gapicClient->getRouteTable($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkconnectivity.v1.HubService/GetRouteTable', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getRouteTableExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->routeTableName('[PROJECT]', '[HUB]', '[ROUTE_TABLE]'); - $request = (new GetRouteTableRequest()) - ->setName($formattedName); - try { - $gapicClient->getRouteTable($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getSpokeTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $hub = 'hub103669'; - $group = 'group98629247'; - $uniqueId = 'uniqueId-538310583'; - $expectedResponse = new Spoke(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setHub($hub); - $expectedResponse->setGroup($group); - $expectedResponse->setUniqueId($uniqueId); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->spokeName('[PROJECT]', '[LOCATION]', '[SPOKE]'); - $request = (new GetSpokeRequest()) - ->setName($formattedName); - $response = $gapicClient->getSpoke($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkconnectivity.v1.HubService/GetSpoke', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getSpokeExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->spokeName('[PROJECT]', '[LOCATION]', '[SPOKE]'); - $request = (new GetSpokeRequest()) - ->setName($formattedName); - try { - $gapicClient->getSpoke($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listGroupsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $groupsElement = new Group(); - $groups = [ - $groupsElement, - ]; - $expectedResponse = new ListGroupsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setGroups($groups); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->hubName('[PROJECT]', '[HUB]'); - $request = (new ListGroupsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listGroups($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getGroups()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkconnectivity.v1.HubService/ListGroups', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listGroupsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->hubName('[PROJECT]', '[HUB]'); - $request = (new ListGroupsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listGroups($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listHubSpokesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $spokesElement = new Spoke(); - $spokes = [ - $spokesElement, - ]; - $expectedResponse = new ListHubSpokesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setSpokes($spokes); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->hubName('[PROJECT]', '[HUB]'); - $request = (new ListHubSpokesRequest()) - ->setName($formattedName); - $response = $gapicClient->listHubSpokes($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getSpokes()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkconnectivity.v1.HubService/ListHubSpokes', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listHubSpokesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->hubName('[PROJECT]', '[HUB]'); - $request = (new ListHubSpokesRequest()) - ->setName($formattedName); - try { - $gapicClient->listHubSpokes($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listHubsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $hubsElement = new Hub(); - $hubs = [ - $hubsElement, - ]; - $expectedResponse = new ListHubsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setHubs($hubs); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListHubsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listHubs($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getHubs()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkconnectivity.v1.HubService/ListHubs', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listHubsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListHubsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listHubs($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listRouteTablesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $routeTablesElement = new RouteTable(); - $routeTables = [ - $routeTablesElement, - ]; - $expectedResponse = new ListRouteTablesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setRouteTables($routeTables); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->hubName('[PROJECT]', '[HUB]'); - $request = (new ListRouteTablesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listRouteTables($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getRouteTables()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkconnectivity.v1.HubService/ListRouteTables', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listRouteTablesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->hubName('[PROJECT]', '[HUB]'); - $request = (new ListRouteTablesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listRouteTables($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listRoutesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $routesElement = new Route(); - $routes = [ - $routesElement, - ]; - $expectedResponse = new ListRoutesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setRoutes($routes); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->routeTableName('[PROJECT]', '[HUB]', '[ROUTE_TABLE]'); - $request = (new ListRoutesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listRoutes($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getRoutes()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkconnectivity.v1.HubService/ListRoutes', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listRoutesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->routeTableName('[PROJECT]', '[HUB]', '[ROUTE_TABLE]'); - $request = (new ListRoutesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listRoutes($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listSpokesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $spokesElement = new Spoke(); - $spokes = [ - $spokesElement, - ]; - $expectedResponse = new ListSpokesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setSpokes($spokes); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListSpokesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listSpokes($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getSpokes()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkconnectivity.v1.HubService/ListSpokes', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listSpokesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListSpokesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listSpokes($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function queryHubStatusTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $hubStatusEntriesElement = new HubStatusEntry(); - $hubStatusEntries = [ - $hubStatusEntriesElement, - ]; - $expectedResponse = new QueryHubStatusResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setHubStatusEntries($hubStatusEntries); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->hubName('[PROJECT]', '[HUB]'); - $request = (new QueryHubStatusRequest()) - ->setName($formattedName); - $response = $gapicClient->queryHubStatus($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getHubStatusEntries()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkconnectivity.v1.HubService/QueryHubStatus', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function queryHubStatusExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->hubName('[PROJECT]', '[HUB]'); - $request = (new QueryHubStatusRequest()) - ->setName($formattedName); - try { - $gapicClient->queryHubStatus($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function rejectHubSpokeTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/rejectHubSpokeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new RejectHubSpokeResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/rejectHubSpokeTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->hubName('[PROJECT]', '[HUB]'); - $formattedSpokeUri = $gapicClient->spokeName('[PROJECT]', '[LOCATION]', '[SPOKE]'); - $request = (new RejectHubSpokeRequest()) - ->setName($formattedName) - ->setSpokeUri($formattedSpokeUri); - $response = $gapicClient->rejectHubSpoke($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkconnectivity.v1.HubService/RejectHubSpoke', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualApiRequestObject->getSpokeUri(); - $this->assertProtobufEquals($formattedSpokeUri, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/rejectHubSpokeTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function rejectHubSpokeExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/rejectHubSpokeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->hubName('[PROJECT]', '[HUB]'); - $formattedSpokeUri = $gapicClient->spokeName('[PROJECT]', '[LOCATION]', '[SPOKE]'); - $request = (new RejectHubSpokeRequest()) - ->setName($formattedName) - ->setSpokeUri($formattedSpokeUri); - $response = $gapicClient->rejectHubSpoke($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/rejectHubSpokeTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateGroupTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateGroupTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $uid = 'uid115792'; - $routeTable = 'routeTable-1769949608'; - $expectedResponse = new Group(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setUid($uid); - $expectedResponse->setRouteTable($routeTable); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateGroupTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $group = new Group(); - $request = (new UpdateGroupRequest()) - ->setGroup($group); - $response = $gapicClient->updateGroup($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkconnectivity.v1.HubService/UpdateGroup', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getGroup(); - $this->assertProtobufEquals($group, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateGroupTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateGroupExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateGroupTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $group = new Group(); - $request = (new UpdateGroupRequest()) - ->setGroup($group); - $response = $gapicClient->updateGroup($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateGroupTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateHubTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateHubTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $uniqueId = 'uniqueId-538310583'; - $exportPsc = false; - $expectedResponse = new Hub(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setUniqueId($uniqueId); - $expectedResponse->setExportPsc($exportPsc); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateHubTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $hub = new Hub(); - $request = (new UpdateHubRequest()) - ->setHub($hub); - $response = $gapicClient->updateHub($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkconnectivity.v1.HubService/UpdateHub', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getHub(); - $this->assertProtobufEquals($hub, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateHubTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateHubExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateHubTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $hub = new Hub(); - $request = (new UpdateHubRequest()) - ->setHub($hub); - $response = $gapicClient->updateHub($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateHubTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateSpokeTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateSpokeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $hub = 'hub103669'; - $group = 'group98629247'; - $uniqueId = 'uniqueId-538310583'; - $expectedResponse = new Spoke(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setHub($hub); - $expectedResponse->setGroup($group); - $expectedResponse->setUniqueId($uniqueId); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateSpokeTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $spoke = new Spoke(); - $request = (new UpdateSpokeRequest()) - ->setSpoke($spoke); - $response = $gapicClient->updateSpoke($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkconnectivity.v1.HubService/UpdateSpoke', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getSpoke(); - $this->assertProtobufEquals($spoke, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateSpokeTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateSpokeExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateSpokeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $spoke = new Spoke(); - $request = (new UpdateSpokeRequest()) - ->setSpoke($spoke); - $response = $gapicClient->updateSpoke($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateSpokeTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getLocationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $locationId = 'locationId552319461'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Location(); - $expectedResponse->setName($name2); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - $request = new GetLocationRequest(); - $response = $gapicClient->getLocation($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new GetLocationRequest(); - try { - $gapicClient->getLocation($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $locationsElement = new Location(); - $locations = [ - $locationsElement, - ]; - $expectedResponse = new ListLocationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLocations($locations); - $transport->addResponse($expectedResponse); - $request = new ListLocationsRequest(); - $response = $gapicClient->listLocations($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new ListLocationsRequest(); - try { - $gapicClient->listLocations($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); - $response = $gapicClient->getIamPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); - try { - $gapicClient->getIamPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); - $response = $gapicClient->setIamPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPolicy(); - $this->assertProtobufEquals($policy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); - try { - $gapicClient->setIamPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new TestIamPermissionsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); - $response = $gapicClient->testIamPermissions($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPermissions(); - $this->assertProtobufEquals($permissions, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); - try { - $gapicClient->testIamPermissions($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function acceptHubSpokeAsyncTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/acceptHubSpokeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new AcceptHubSpokeResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/acceptHubSpokeTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->hubName('[PROJECT]', '[HUB]'); - $formattedSpokeUri = $gapicClient->spokeName('[PROJECT]', '[LOCATION]', '[SPOKE]'); - $request = (new AcceptHubSpokeRequest()) - ->setName($formattedName) - ->setSpokeUri($formattedSpokeUri); - $response = $gapicClient->acceptHubSpokeAsync($request)->wait(); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkconnectivity.v1.HubService/AcceptHubSpoke', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualApiRequestObject->getSpokeUri(); - $this->assertProtobufEquals($formattedSpokeUri, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/acceptHubSpokeTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } -} diff --git a/owl-bot-staging/NetworkConnectivity/v1/tests/Unit/V1/Client/PolicyBasedRoutingServiceClientTest.php b/owl-bot-staging/NetworkConnectivity/v1/tests/Unit/V1/Client/PolicyBasedRoutingServiceClientTest.php deleted file mode 100644 index fcea95db91e9..000000000000 --- a/owl-bot-staging/NetworkConnectivity/v1/tests/Unit/V1/Client/PolicyBasedRoutingServiceClientTest.php +++ /dev/null @@ -1,932 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return PolicyBasedRoutingServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new PolicyBasedRoutingServiceClient($options); - } - - /** @test */ - public function createPolicyBasedRouteTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createPolicyBasedRouteTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $nextHopIlbIp = 'nextHopIlbIp-1739392183'; - $name = 'name3373707'; - $description = 'description-1724546052'; - $network = 'network1843485230'; - $priority = 1165461084; - $selfLink = 'selfLink-1691268851'; - $kind = 'kind3292052'; - $expectedResponse = new PolicyBasedRoute(); - $expectedResponse->setNextHopIlbIp($nextHopIlbIp); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setNetwork($network); - $expectedResponse->setPriority($priority); - $expectedResponse->setSelfLink($selfLink); - $expectedResponse->setKind($kind); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createPolicyBasedRouteTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $policyBasedRouteId = 'policyBasedRouteId-103152502'; - $policyBasedRoute = new PolicyBasedRoute(); - $policyBasedRouteNetwork = $gapicClient->networkName('[PROJECT]', '[RESOURCE_ID]'); - $policyBasedRoute->setNetwork($policyBasedRouteNetwork); - $policyBasedRouteFilter = new Filter(); - $filterProtocolVersion = ProtocolVersion::PROTOCOL_VERSION_UNSPECIFIED; - $policyBasedRouteFilter->setProtocolVersion($filterProtocolVersion); - $policyBasedRoute->setFilter($policyBasedRouteFilter); - $request = (new CreatePolicyBasedRouteRequest()) - ->setParent($formattedParent) - ->setPolicyBasedRouteId($policyBasedRouteId) - ->setPolicyBasedRoute($policyBasedRoute); - $response = $gapicClient->createPolicyBasedRoute($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkconnectivity.v1.PolicyBasedRoutingService/CreatePolicyBasedRoute', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getPolicyBasedRouteId(); - $this->assertProtobufEquals($policyBasedRouteId, $actualValue); - $actualValue = $actualApiRequestObject->getPolicyBasedRoute(); - $this->assertProtobufEquals($policyBasedRoute, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createPolicyBasedRouteTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createPolicyBasedRouteExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createPolicyBasedRouteTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $policyBasedRouteId = 'policyBasedRouteId-103152502'; - $policyBasedRoute = new PolicyBasedRoute(); - $policyBasedRouteNetwork = $gapicClient->networkName('[PROJECT]', '[RESOURCE_ID]'); - $policyBasedRoute->setNetwork($policyBasedRouteNetwork); - $policyBasedRouteFilter = new Filter(); - $filterProtocolVersion = ProtocolVersion::PROTOCOL_VERSION_UNSPECIFIED; - $policyBasedRouteFilter->setProtocolVersion($filterProtocolVersion); - $policyBasedRoute->setFilter($policyBasedRouteFilter); - $request = (new CreatePolicyBasedRouteRequest()) - ->setParent($formattedParent) - ->setPolicyBasedRouteId($policyBasedRouteId) - ->setPolicyBasedRoute($policyBasedRoute); - $response = $gapicClient->createPolicyBasedRoute($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createPolicyBasedRouteTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deletePolicyBasedRouteTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deletePolicyBasedRouteTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deletePolicyBasedRouteTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->policyBasedRouteName('[PROJECT]', '[POLICY_BASED_ROUTE]'); - $request = (new DeletePolicyBasedRouteRequest()) - ->setName($formattedName); - $response = $gapicClient->deletePolicyBasedRoute($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkconnectivity.v1.PolicyBasedRoutingService/DeletePolicyBasedRoute', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deletePolicyBasedRouteTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deletePolicyBasedRouteExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deletePolicyBasedRouteTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->policyBasedRouteName('[PROJECT]', '[POLICY_BASED_ROUTE]'); - $request = (new DeletePolicyBasedRouteRequest()) - ->setName($formattedName); - $response = $gapicClient->deletePolicyBasedRoute($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deletePolicyBasedRouteTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getPolicyBasedRouteTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextHopIlbIp = 'nextHopIlbIp-1739392183'; - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $network = 'network1843485230'; - $priority = 1165461084; - $selfLink = 'selfLink-1691268851'; - $kind = 'kind3292052'; - $expectedResponse = new PolicyBasedRoute(); - $expectedResponse->setNextHopIlbIp($nextHopIlbIp); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setNetwork($network); - $expectedResponse->setPriority($priority); - $expectedResponse->setSelfLink($selfLink); - $expectedResponse->setKind($kind); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->policyBasedRouteName('[PROJECT]', '[POLICY_BASED_ROUTE]'); - $request = (new GetPolicyBasedRouteRequest()) - ->setName($formattedName); - $response = $gapicClient->getPolicyBasedRoute($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkconnectivity.v1.PolicyBasedRoutingService/GetPolicyBasedRoute', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getPolicyBasedRouteExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->policyBasedRouteName('[PROJECT]', '[POLICY_BASED_ROUTE]'); - $request = (new GetPolicyBasedRouteRequest()) - ->setName($formattedName); - try { - $gapicClient->getPolicyBasedRoute($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listPolicyBasedRoutesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $policyBasedRoutesElement = new PolicyBasedRoute(); - $policyBasedRoutes = [ - $policyBasedRoutesElement, - ]; - $expectedResponse = new ListPolicyBasedRoutesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setPolicyBasedRoutes($policyBasedRoutes); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListPolicyBasedRoutesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listPolicyBasedRoutes($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getPolicyBasedRoutes()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkconnectivity.v1.PolicyBasedRoutingService/ListPolicyBasedRoutes', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listPolicyBasedRoutesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListPolicyBasedRoutesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listPolicyBasedRoutes($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $locationId = 'locationId552319461'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Location(); - $expectedResponse->setName($name2); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - $request = new GetLocationRequest(); - $response = $gapicClient->getLocation($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new GetLocationRequest(); - try { - $gapicClient->getLocation($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $locationsElement = new Location(); - $locations = [ - $locationsElement, - ]; - $expectedResponse = new ListLocationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLocations($locations); - $transport->addResponse($expectedResponse); - $request = new ListLocationsRequest(); - $response = $gapicClient->listLocations($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new ListLocationsRequest(); - try { - $gapicClient->listLocations($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); - $response = $gapicClient->getIamPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); - try { - $gapicClient->getIamPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); - $response = $gapicClient->setIamPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPolicy(); - $this->assertProtobufEquals($policy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); - try { - $gapicClient->setIamPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new TestIamPermissionsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); - $response = $gapicClient->testIamPermissions($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPermissions(); - $this->assertProtobufEquals($permissions, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); - try { - $gapicClient->testIamPermissions($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createPolicyBasedRouteAsyncTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createPolicyBasedRouteTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $nextHopIlbIp = 'nextHopIlbIp-1739392183'; - $name = 'name3373707'; - $description = 'description-1724546052'; - $network = 'network1843485230'; - $priority = 1165461084; - $selfLink = 'selfLink-1691268851'; - $kind = 'kind3292052'; - $expectedResponse = new PolicyBasedRoute(); - $expectedResponse->setNextHopIlbIp($nextHopIlbIp); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setNetwork($network); - $expectedResponse->setPriority($priority); - $expectedResponse->setSelfLink($selfLink); - $expectedResponse->setKind($kind); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createPolicyBasedRouteTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $policyBasedRouteId = 'policyBasedRouteId-103152502'; - $policyBasedRoute = new PolicyBasedRoute(); - $policyBasedRouteNetwork = $gapicClient->networkName('[PROJECT]', '[RESOURCE_ID]'); - $policyBasedRoute->setNetwork($policyBasedRouteNetwork); - $policyBasedRouteFilter = new Filter(); - $filterProtocolVersion = ProtocolVersion::PROTOCOL_VERSION_UNSPECIFIED; - $policyBasedRouteFilter->setProtocolVersion($filterProtocolVersion); - $policyBasedRoute->setFilter($policyBasedRouteFilter); - $request = (new CreatePolicyBasedRouteRequest()) - ->setParent($formattedParent) - ->setPolicyBasedRouteId($policyBasedRouteId) - ->setPolicyBasedRoute($policyBasedRoute); - $response = $gapicClient->createPolicyBasedRouteAsync($request)->wait(); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkconnectivity.v1.PolicyBasedRoutingService/CreatePolicyBasedRoute', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getPolicyBasedRouteId(); - $this->assertProtobufEquals($policyBasedRouteId, $actualValue); - $actualValue = $actualApiRequestObject->getPolicyBasedRoute(); - $this->assertProtobufEquals($policyBasedRoute, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createPolicyBasedRouteTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } -} diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/GPBMetadata/Google/Cloud/Networkmanagement/V1/ConnectivityTest.php b/owl-bot-staging/NetworkManagement/v1/proto/src/GPBMetadata/Google/Cloud/Networkmanagement/V1/ConnectivityTest.php deleted file mode 100644 index 0161d6dc7f450cf7a5891a2e56dbfed4d70d4cc2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4939 zcmcIoTXWmS6%MKUp+r%u*rt^>h8ee(r!_fJGHpuRNk9^kIi*O3gygEjnJow`DZ~%} z<06mh(M%uvTl&x+()YG+oj&J3bf#w)07X(%Lc3GFP*|M(&e?PQu+P7C&s_LSI%GEU zw162>|56IhnB;m+;OLGe^~1q{d6Mp&yQamwq9oN?QnRH>O0BLw#I3#)dO9mhL&q6f ztfX5`Xq0Rgymh?S=bEhz**UX=(#2j$cWj&Kfq7vDmo#90P!w7KZ0(%+uBJ2Tuw6M~ zfo5od);kn{y($OnHKzf4CwtETbW8JnsX7L%A}+iG3IE)%Z<)H}2U>tXk4&GMwi%e3 zW&RNl`a&9Lmd_C6rtBcJ(N4#f_=c9Pv)w0Bgvn(exehw!g_Ky>=DtEd_3C!OJX^DR zHRkJ{=?0G1M$vM4$bylF`O5B-SS^P$2hwh2W4V08$QM%Jg=}2ABzY_dJ^Pukn*&^p z{_D-~pX{2w1Cv=sg`H^^rsI{%*QdG$xovBQ#Q~ms*X;r8sU8M-e*GiIswO5#pq;z( z@9nsHuZxin{n>j&5TAZ!#vzjpV-%qSO!VE6Pq~L5!#^ItZ$3D~$-`)CQ4~ka=$dPmyx8Yaee68_am4|5Y%KmD78k{ZX;}&q@5KW5Vgb+9OFZ#HKYCI4>k8zi zYl&>ZBCpSUN=ognRTlm&uaa%Z7;%PUk>u0-4fzI^qfE&!;B#jG7sW`;4;;Fv*oNz1 z2smt-C;~PxZLC*>UHm|p9IT3?WB1B03DfeB^O(ik8^t%@VGr{2%hCcGeIM2h(|0ZH zl8QsFaCvUc0%^grrS+NR=T}iQv;XxR=b3h1u^|u?JMb>a7m(3ChE`A>kUWUv?Ifs4 zw2Gr#kIcYbp^N=6-j$he*C~9As`N9hZ(6+D8rW1#Jj%M*{;Ndk?fF>jjBT$)yA!`` zqOEo+M=HUHsow$#Qg20e)#{IepEV7@T~*`K5P!d|nm)xdy9A4H5LC z=~B%wuzmQkrR%WhI$j_QT_RW+ri~Sk15Fg^8o39X1IK%-c?OTC7g{X8fyZAX-@)Cf z7c|g3oMU+&?CkzGa|AoFtava|(LoKWz!Ayx@}obeQltPm%h3#qN9Cq@)HFmIM1}Y= z#br)`Ov(h8F3a;g$nJkWhb;|MP>JzX+#0D*bLbr)!`Fg{;T0mt3#&JX#}nU?W;jfQeW>g=_?sP>r}B$a9=! zvMh7uhNmj9Th~~PK*+bK2^n!Ul@1{}XsJ#!o?7E5oIf*dFHAKdHp^XK4VG0dV zZ+R~b;sBk{?!*`)4V$nM*OC|mYvc&l;{_@r&l`Jo|JUzxoMuEJdGvX$#O215ZJCE; z=MmhQ?NF@!&@-co+UY%p{H>0;A$jWo$0ZBjLT22!pFqB;sIOX`-%|CotE`-p5p=CInPu|zI~(|EJlYSQt=bm0;{o>g_^=TJCkbzaGxTD^HlJI4)$s&eO0 zQKz)5!)m?RRpn+?K^0rD(P+svT9F%krISl@Gfvv5RaTW(@@Z~?tiVFMTg@$2?!!Gg zyLVK!VT(?dv1wH9!1mN4k8t7dY1p1IgfJ79vB8B_AOe!ze=$c6%)r3`$3aL5GFT$! z0KZ81ROVbJv;PBAnLLCg=6Q}6(;SkhM>bWA2q*axmIWd6k$-UNu$#z;s+r0Eih>#! zG+2)9x(lSEbdMX;f!Tnyjv`lI%9RF>42I#jdA*Rv*|a7fRqBVwt>bQP5nKNHakHkV zO6REF#Qa$*Jcq3Y(g|C?Y%~0Dvjb$i2(#iwPr|E91lt)WOejUqP2F>R;hBZP8EnV9 zYo?C_yB~6{M!tpZL_EepR6d0G@xPek_%}={{A(GqlXQVovWd{oL&+u~it*$BG5EiO zjMm4QOLZ;unP^|x{puVpm~E-dv8o)3AdU4gUYx`B8P$<91%lu%5hOEysOvcQ2cb3b zp0~CoasV4FrrJ2429B6+nf=lnRwXUDj@vK*BkmW68_6**n0XlGth~|T6a11$C_iOG zjIWQ~AR<8dH39zB9A-{APceq95u@xpf%WlcB>h|GEbtuHL2j(sR6~v#b@#%bQm`?Z zBA>!eyVI(OZuueg_*1wamuJ0ES5IlZS#34D^{%QkRqUG6^|@FW!d7g-Sm-~42ZP+7FX@Me;>xEe zre-l7iASS5q~gim-x8T#d@qz-3|&k0@Mh@y^rHx>Tozd6@(r+Z`DCxZjHMJfpFbXb c?Ef;lZW+6s;UCDRKI3LaNJjT3S8xUJU-^1GbpQYW diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/GPBMetadata/Google/Cloud/Networkmanagement/V1/Reachability.php b/owl-bot-staging/NetworkManagement/v1/proto/src/GPBMetadata/Google/Cloud/Networkmanagement/V1/Reachability.php deleted file mode 100644 index 20446620128e..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/GPBMetadata/Google/Cloud/Networkmanagement/V1/Reachability.php +++ /dev/null @@ -1,84 +0,0 @@ -internalAddGeneratedFile( - ' -à -4google/cloud/networkmanagement/v1/reachability.proto!google.cloud.networkmanagement.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto9google/cloud/networkmanagement/v1/connectivity_test.proto#google/longrunning/operations.protogoogle/protobuf/empty.proto google/protobuf/field_mask.protogoogle/protobuf/timestamp.proto"¬ -ListConnectivityTestsRequestC -parent ( B3àAúA- -+cloudresourcemanager.googleapis.com/Project - page_size ( - -page_token (  -filter (  -order_by ( "• -ListConnectivityTestsResponseF - resources ( 23.google.cloud.networkmanagement.v1.ConnectivityTest -next_page_token (  - unreachable ( "e -GetConnectivityTestRequestG -name ( B9àAúA3 -1networkmanagement.googleapis.com/ConnectivityTest"Æ -CreateConnectivityTestRequestC -parent ( B3àAúA- -+cloudresourcemanager.googleapis.com/Project -test_id ( BàAJ -resource ( 23.google.cloud.networkmanagement.v1.ConnectivityTestBàA"¡ -UpdateConnectivityTestRequest4 - update_mask ( 2.google.protobuf.FieldMaskBàAJ -resource ( 23.google.cloud.networkmanagement.v1.ConnectivityTestBàA"h -DeleteConnectivityTestRequestG -name ( B9àAúA3 -1networkmanagement.googleapis.com/ConnectivityTest"g -RerunConnectivityTestRequestG -name ( B9àAúA3 -1networkmanagement.googleapis.com/ConnectivityTest"Ö -OperationMetadata/ - create_time ( 2.google.protobuf.Timestamp, -end_time ( 2.google.protobuf.Timestamp -target (  -verb (  - status_detail (  -cancel_requested ( - api_version ( 2– -ReachabilityServiceç -ListConnectivityTests?.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest@.google.cloud.networkmanagement.v1.ListConnectivityTestsResponse"KÚAparent‚Óä“<:/v1/{parent=projects/*/locations/global}/connectivityTestsÔ -GetConnectivityTest=.google.cloud.networkmanagement.v1.GetConnectivityTestRequest3.google.cloud.networkmanagement.v1.ConnectivityTest"IÚAname‚Óä“<:/v1/{name=projects/*/locations/global/connectivityTests/*}¬ -CreateConnectivityTest@.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest.google.longrunning.Operation"°ÊAG -2google.cloud.networkmanagement.v1.ConnectivityTestOperationMetadataÚAparent,test_id,resource‚Óä“F":/v1/{parent=projects/*/locations/global}/connectivityTests:resource² -UpdateConnectivityTest@.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest.google.longrunning.Operation"¶ÊAG -2google.cloud.networkmanagement.v1.ConnectivityTestOperationMetadataÚAupdate_mask,resource‚Óä“O2C/v1/{resource.name=projects/*/locations/global/connectivityTests/*}:resource -RerunConnectivityTest?.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest.google.longrunning.Operation"•ÊAG -2google.cloud.networkmanagement.v1.ConnectivityTestOperationMetadata‚Óä“E"@/v1/{name=projects/*/locations/global/connectivityTests/*}:rerun:*ñ -DeleteConnectivityTest@.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest.google.longrunning.Operation"vÊA* -google.protobuf.EmptyOperationMetadataÚAname‚Óä“<*:/v1/{name=projects/*/locations/global/connectivityTests/*}TÊA networkmanagement.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformB‡ -%com.google.cloud.networkmanagement.v1BReachabilityServiceProtoPZScloud.google.com/go/networkmanagement/apiv1/networkmanagementpb;networkmanagementpbª!Google.Cloud.NetworkManagement.V1Ê!Google\\Cloud\\NetworkManagement\\V1ê$Google::Cloud::NetworkManagement::V1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/GPBMetadata/Google/Cloud/Networkmanagement/V1/Trace.php b/owl-bot-staging/NetworkManagement/v1/proto/src/GPBMetadata/Google/Cloud/Networkmanagement/V1/Trace.php deleted file mode 100644 index ee6ae38809db3e085a585c6f82c9435d2130466a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 17481 zcmbtcO^h4KbvEZu!DB z+q=<4(_OD#y?XWDtM}LZ@Vld@BXK8N_6PpBJN1vUPhMoFPyOs@Je&@D!_(}Ov*Tlb zob3&tjrynlcsrXdHL~?aJL{CH?c10-8J>-M{%-bUI6OJ^@ApoJXGix3{`9lq_|s?I zLHERe<`1U#pFg-i9d~>FHe(iI(0%4lMtG4eHw*jzw0qQ@b`Q&pdk~C!0ck|&>*Du* zGbP^nQX*mBmf+hgLEAGDwEg_S)-{E(JL=y*rmf-AV|Y8khFyXWY0w9qSxroXdB)gCU2ICZ@FxEFc^^Eej@?GJt;Pr>0+Y7SP^T_M+5H!hx}RhMMf~T2MMqp zj0R;nNnzR(f-p_b1_S>zv&M+No(xf&=O{civGIJ=^Lj(z>B0JCUSU-4CPLLK>S+pF zUYtAfPy5gPab}(IY$w1|k~2aSis_k+#3&TA6$;2=_sMWP&1^D)B(j(%cs2b4vBYY3 zo@c+6WCzevHMuD^PKVti?@9NRv~rxW7)ug<)-bQ2rV+NnLM8>N22Yg<&0I*#5Ow1! zq980MpZeajE{xzfV>6Z{!cuE7g5PhpRh;kn58zL|he>UHL z=%v4yvZn&=&ef=WB4G`5?}B1jCXvC(Iq(pMpu;6)TTk5+_ZKvGM5rl#~a>L zu1Uzm?r7xsgOmQi_n;~hx;8E+W@3Ica(M26oEoB)WRA}U-q?TMXS7!mqh(Uvvw^Fo zDzx7gi-YbobCvPDnc$4;U9Cs1uyA4h_=Pquw9PHX^L_$6aM6DJLfIG0ROEajwj$~U zJ?njnn?rgB*BJY50_>))6(kC^0*-qEI|y&rdvXTc)68|onnV~|a$R#0;SzoiSh>Ljbw!J;K zvF}yuc&Ha0D>XCFcHFwtwifIg;;J#D+-Q_*j@NSBgDU1-vu}zmW4P&74`@+LebjIt zT8s8o@rp4Ho8j%}TR?8TV&4`wjG9b0OClk~R>mbcpkN*M z*66hR!lU?EMGb3W@oe1Zm?3Rn5NVFlju9Sn2#}_@K)C`Q!BHT>FLf;E^+y~A@Js*4 zGPI?a72JJR3~e15cCtVduowXwrk(;w*sIold*G zr<4X@0>~Rq=bno-!`(=-wJl*k>rQ)5{UdL3_5{co8wD_Fin#Pxf8>q3gA-qEbW^O1 z{S&%HcsseDE{kCQwo7K>ET-Kt z(gdEt%Uj}#dKqKs1Uw~XW3kZ?DUKH$Nu)Wb<7egox$$ZH@KD$~AmgaRo4y$N94u_^ zd@sS}W-?`4KTs6X2AGHa2?QWSR|kg5aKs2} zVoee^=?x)I6dY~tByrnAbo^I~rYBLhP+=)VNJBCLhCgpHqtf}PH!|cY1-nD zos)*a)JsyqWy052L5Qh@Fmsb}FIB%cN%5|kOg?tMh z!#Nl{kuO25+f{n@bAPu$w?!zFxJB!51H4M3IgezxHNkMT3A$lj!WY`NU4S%N!Ryd7 zHQy>?;Yz`=2wURoG(+h6^#MM#W zb3Ex!He9dby_MZF9>@!x0u8n8=jRmYsv*O{ISpqDyI=X>2sWl^o?NArGFE;nWmwp+%Nk$ z%1@&UFb&ISM`L#Oc-eQ<{$=1TMg2=@xo?P9$Ol#8fQkW(Jvm;S^-SmfYDrjTI8Sl1 z{YiYyDY;N2TAMqi1kw{nxNW{*DY-7Jr+)Wz`qYCT+xwKQGD)ZOn=4{fWhN%zG1VNB zxB=!ODl1`k#JbLL@E+(OHg~@JRra7zGWl>{HQL~c&HYX)%1VZWYZ#3Z=eUM2w9@v$ z#cCIuUZ+H=fh$5;oZ#gGiGHQsZc2rLDnK)62I~(r0gtU#O+7B>j>VcuHL?LJMxCdV zSWl1Yz&k~OF|r|L7-ht>HK-z>)QccDvY7kt1#xj6_Y=fvQ*kXK2!ZR4Tqf!vpa-V8sZGDWaF)hi~@TXI|C&`(Z>y-(*rFB5d` zM9+)uSZN=;Fq&U9Lq)FuyMKWRm&Y@ZXgjC#0DZ{O#a7$*Z>(}Z6pa5K(6jBUD1(*;QiQt zHk|rFrAM02tKvfRJ;mmd9t=fM(NGX+ezB2t#X9+wbf#=3WU%mI02iO* zB-V^-mhA-BrM!8P)D4aK+ikw*ND?8@GF~8KEtzmVBJC`Ah1Gxk`9J*A>cZ+0GIjAZ zwiLmaUZyODx&K)ZD{58b`jnlF=9kySYG621Ha}4ok2A?pzef5wVLq6svgag$m&qlc zpEzCN*aJD$&=rzF1%WG{h)Uy|M)H6%s+3vTjHPM?$1Jh*^%?=j636SD=bX(JZ-n$m zQpB5(r^|{!ovzRq(0Rfi%W7L>2cxO%3%P$sU}Tgrzmn`2^Zy^Rllx`r3xxpMuA@Jk z0xUaTm^s=7QvXPBMUka2iUUiW4kV0!Obd^$6}0TG?mW%GtxFe%@-xsW$w374&qJ%s~Jq*E>fpPA{}K7 zG<5WixCS#u9UT+zS${Gi<2~}n{3o)UG2dy$({e~(bm|Z5jYsvM zCX-^`7z3I&i#!0^P;Yoa@*Q#YIevdrT<+BA(CQ^5!AedGwjL=0B*#~I{5I-DjgDJ% zP(~>=8-Vn{dvCANLCruW?E!)dem~zv{Dbm`gw|o_I%9cF+%!V6jc=3T zU~}~Tv6BTGY0CM!2;W4q31C^992rGlwdv(cB`&+reya62;a4aaGqU_8r%tuDCFE&d zn|TeMcv4=$JgP9j{b`}3@{V|8E-cJd$OH|3Rv-HHz}wmP!1p z^@Dt^TJqopclMon8^s~mB+6tuUc1pinFa+5Hkg4A@3<~1CW5ru$cv&z0z+*a3K)mf z4wuO+`!$gx^?oP|F4co-`>}N6$tTpQRn$|EFafKjWJvlADY9+kbq~U_rQ)9fks&`s zhZQsPuM+yeC7l`GB15N#9xTwk9ta=TDHh2=f?~4F z!C>INlHwQU0y*m_Up{i7ih&hhA@d>!^lfMyBC7-`QjJQpZ<6%HU;`}+jr3bo6p4Xp zXU>bR{$SqfD&dN?>(K4$e%?jJx@qm$+v3d_+PH9nRoZe`?~+8t;KOt)?+lj@q?W7b z)_YVPih;+`b3~#no%IcSM{H}Z>plqSq{8A6<=nzhZ63U@Ex+|PDV9M5+0Ysa_%*H` zhqS+AAHFW`7=W&`-#|aaEaWy-_4QgXw|jflA}ueiEd1qjWEeDnQa)AnGNfwNeouUT zKGZ=q4<}fssU!M-pL5y9EwAM_P4-hucVO`KsG!j}Z-aANBkLR=1)sGDwNRV?mUu5v zfdZJw)v{;;NhfK{JOXO>$gyigQn*pnN3e-{Jxm#0EvoM$GI)(jm!aLAi{LtSPsD60 z=>(j3UZ5oJBJ_HEf|(7G;?-H%XuBZ*8#y zY&cs=pXijRuZ^S_f9p`-4I+|+le}p-E~O6jGZ|ruSFSbC=cKjr>nvq)_&C-3om#uv zgzrQVYRh_`I;X-T)5{sIk+n-?L+r@)m$g>3azUyHRx4M&-Od*)?1_JyctvAiBGet{ zN?tQD0()rYsmfTgzK5o%yOqZU7d|{~k1k(Ta#g{yinpw95*K2S@*bNH|E*94&4dOM z;5zxzW3;!?Z5J~+=4Ldntyf9CqjtWMM|&Gxx72E-D$j?nlM61HNKC@Gx_g|Kb&s+J zbkS3evDQHQ)d%FT#Fn3Lv#jqBXp{hb(dYMsN-7e$Tq&7r~aP&>)FKs(d2tS3O-%b}#FaaM z#QKBh{qb->y{=Lia%Ev1jG~`BB|$#JpWJ^gqWeaECSiXhmbhLg3q(miY*aJ1xj1iD z!em(}rfhOQ=#(4c8%tF~3d9?)2mWWqYZenqxD#|Nmm;fU7^5k%F3#0*0|bWZV-Lr>L<4qL467$kczqMyRpJx_fEK}!#u0Q4~+M%5NwdlbsIwU%;! zfcAps><2B8LZ<9{nmH+Xsxv1g&vpJuNhO(oQu2i7oD?1J+>@fSefder1I9VdJt=w0 zI4PseTQ>E?#FRUqbN{s@uFUDe;EtYkv1D}0k`EI;hQ^j}sKHUc%#f-6j)!f`uix>7=mu%lu;Q?^EK|oc0hCkb;!pit?391%{Q*9&g6~mDxzHO=^<;q`g=+=@2&ReN(W+>_~<9cW( zTaJ0u}Ba>o^Kw+64|bx=_+;)~{oofgwhtcsjfOc?zmTDSA|r%4#BXH$+rnLmYIm1$?e5MX+uc2Q@MML%VcvZ` g`00kXgoogle.cloud.networkmanagement.v1.AbortInfo - */ -class AbortInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Causes that the analysis is aborted. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.AbortInfo.Cause cause = 1; - */ - protected $cause = 0; - /** - * URI of the resource that caused the abort. - * - * Generated from protobuf field string resource_uri = 2; - */ - protected $resource_uri = ''; - /** - * IP address that caused the abort. - * - * Generated from protobuf field string ip_address = 4 [(.google.api.field_info) = { - */ - protected $ip_address = ''; - /** - * List of project IDs the user specified in the request but lacks access to. - * In this case, analysis is aborted with the PERMISSION_DENIED cause. - * - * Generated from protobuf field repeated string projects_missing_permission = 3; - */ - private $projects_missing_permission; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $cause - * Causes that the analysis is aborted. - * @type string $resource_uri - * URI of the resource that caused the abort. - * @type string $ip_address - * IP address that caused the abort. - * @type array|\Google\Protobuf\Internal\RepeatedField $projects_missing_permission - * List of project IDs the user specified in the request but lacks access to. - * In this case, analysis is aborted with the PERMISSION_DENIED cause. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkmanagement\V1\Trace::initOnce(); - parent::__construct($data); - } - - /** - * Causes that the analysis is aborted. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.AbortInfo.Cause cause = 1; - * @return int - */ - public function getCause() - { - return $this->cause; - } - - /** - * Causes that the analysis is aborted. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.AbortInfo.Cause cause = 1; - * @param int $var - * @return $this - */ - public function setCause($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\NetworkManagement\V1\AbortInfo\Cause::class); - $this->cause = $var; - - return $this; - } - - /** - * URI of the resource that caused the abort. - * - * Generated from protobuf field string resource_uri = 2; - * @return string - */ - public function getResourceUri() - { - return $this->resource_uri; - } - - /** - * URI of the resource that caused the abort. - * - * Generated from protobuf field string resource_uri = 2; - * @param string $var - * @return $this - */ - public function setResourceUri($var) - { - GPBUtil::checkString($var, True); - $this->resource_uri = $var; - - return $this; - } - - /** - * IP address that caused the abort. - * - * Generated from protobuf field string ip_address = 4 [(.google.api.field_info) = { - * @return string - */ - public function getIpAddress() - { - return $this->ip_address; - } - - /** - * IP address that caused the abort. - * - * Generated from protobuf field string ip_address = 4 [(.google.api.field_info) = { - * @param string $var - * @return $this - */ - public function setIpAddress($var) - { - GPBUtil::checkString($var, True); - $this->ip_address = $var; - - return $this; - } - - /** - * List of project IDs the user specified in the request but lacks access to. - * In this case, analysis is aborted with the PERMISSION_DENIED cause. - * - * Generated from protobuf field repeated string projects_missing_permission = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getProjectsMissingPermission() - { - return $this->projects_missing_permission; - } - - /** - * List of project IDs the user specified in the request but lacks access to. - * In this case, analysis is aborted with the PERMISSION_DENIED cause. - * - * Generated from protobuf field repeated string projects_missing_permission = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setProjectsMissingPermission($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->projects_missing_permission = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/AbortInfo/Cause.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/AbortInfo/Cause.php deleted file mode 100644 index 1c962a2f7dc8..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/AbortInfo/Cause.php +++ /dev/null @@ -1,327 +0,0 @@ -google.cloud.networkmanagement.v1.AbortInfo.Cause - */ -class Cause -{ - /** - * Cause is unspecified. - * - * Generated from protobuf enum CAUSE_UNSPECIFIED = 0; - */ - const CAUSE_UNSPECIFIED = 0; - /** - * Aborted due to unknown network. Deprecated, not used in the new tests. - * - * Generated from protobuf enum UNKNOWN_NETWORK = 1 [deprecated = true]; - */ - const UNKNOWN_NETWORK = 1; - /** - * Aborted because no project information can be derived from the test - * input. Deprecated, not used in the new tests. - * - * Generated from protobuf enum UNKNOWN_PROJECT = 3 [deprecated = true]; - */ - const UNKNOWN_PROJECT = 3; - /** - * Aborted because traffic is sent from a public IP to an instance without - * an external IP. Deprecated, not used in the new tests. - * - * Generated from protobuf enum NO_EXTERNAL_IP = 7 [deprecated = true]; - */ - const NO_EXTERNAL_IP = 7; - /** - * Aborted because none of the traces matches destination information - * specified in the input test request. Deprecated, not used in the new - * tests. - * - * Generated from protobuf enum UNINTENDED_DESTINATION = 8 [deprecated = true]; - */ - const UNINTENDED_DESTINATION = 8; - /** - * Aborted because the source endpoint could not be found. Deprecated, not - * used in the new tests. - * - * Generated from protobuf enum SOURCE_ENDPOINT_NOT_FOUND = 11 [deprecated = true]; - */ - const SOURCE_ENDPOINT_NOT_FOUND = 11; - /** - * Aborted because the source network does not match the source endpoint. - * Deprecated, not used in the new tests. - * - * Generated from protobuf enum MISMATCHED_SOURCE_NETWORK = 12 [deprecated = true]; - */ - const MISMATCHED_SOURCE_NETWORK = 12; - /** - * Aborted because the destination endpoint could not be found. Deprecated, - * not used in the new tests. - * - * Generated from protobuf enum DESTINATION_ENDPOINT_NOT_FOUND = 13 [deprecated = true]; - */ - const DESTINATION_ENDPOINT_NOT_FOUND = 13; - /** - * Aborted because the destination network does not match the destination - * endpoint. Deprecated, not used in the new tests. - * - * Generated from protobuf enum MISMATCHED_DESTINATION_NETWORK = 14 [deprecated = true]; - */ - const MISMATCHED_DESTINATION_NETWORK = 14; - /** - * Aborted because no endpoint with the packet's destination IP address is - * found. - * - * Generated from protobuf enum UNKNOWN_IP = 2; - */ - const UNKNOWN_IP = 2; - /** - * Aborted because no endpoint with the packet's destination IP is found in - * the Google-managed project. - * - * Generated from protobuf enum GOOGLE_MANAGED_SERVICE_UNKNOWN_IP = 32; - */ - const GOOGLE_MANAGED_SERVICE_UNKNOWN_IP = 32; - /** - * Aborted because the source IP address doesn't belong to any of the - * subnets of the source VPC network. - * - * Generated from protobuf enum SOURCE_IP_ADDRESS_NOT_IN_SOURCE_NETWORK = 23; - */ - const SOURCE_IP_ADDRESS_NOT_IN_SOURCE_NETWORK = 23; - /** - * Aborted because user lacks permission to access all or part of the - * network configurations required to run the test. - * - * Generated from protobuf enum PERMISSION_DENIED = 4; - */ - const PERMISSION_DENIED = 4; - /** - * Aborted because user lacks permission to access Cloud NAT configs - * required to run the test. - * - * Generated from protobuf enum PERMISSION_DENIED_NO_CLOUD_NAT_CONFIGS = 28; - */ - const PERMISSION_DENIED_NO_CLOUD_NAT_CONFIGS = 28; - /** - * Aborted because user lacks permission to access Network endpoint group - * endpoint configs required to run the test. - * - * Generated from protobuf enum PERMISSION_DENIED_NO_NEG_ENDPOINT_CONFIGS = 29; - */ - const PERMISSION_DENIED_NO_NEG_ENDPOINT_CONFIGS = 29; - /** - * Aborted because user lacks permission to access Cloud Router configs - * required to run the test. - * - * Generated from protobuf enum PERMISSION_DENIED_NO_CLOUD_ROUTER_CONFIGS = 36; - */ - const PERMISSION_DENIED_NO_CLOUD_ROUTER_CONFIGS = 36; - /** - * Aborted because no valid source or destination endpoint is derived from - * the input test request. - * - * Generated from protobuf enum NO_SOURCE_LOCATION = 5; - */ - const NO_SOURCE_LOCATION = 5; - /** - * Aborted because the source or destination endpoint specified in - * the request is invalid. Some examples: - * - The request might contain malformed resource URI, project ID, or IP - * address. - * - The request might contain inconsistent information (for example, the - * request might include both the instance and the network, but the instance - * might not have a NIC in that network). - * - * Generated from protobuf enum INVALID_ARGUMENT = 6; - */ - const INVALID_ARGUMENT = 6; - /** - * Aborted because the number of steps in the trace exceeds a certain - * limit. It might be caused by a routing loop. - * - * Generated from protobuf enum TRACE_TOO_LONG = 9; - */ - const TRACE_TOO_LONG = 9; - /** - * Aborted due to internal server error. - * - * Generated from protobuf enum INTERNAL_ERROR = 10; - */ - const INTERNAL_ERROR = 10; - /** - * Aborted because the test scenario is not supported. - * - * Generated from protobuf enum UNSUPPORTED = 15; - */ - const UNSUPPORTED = 15; - /** - * Aborted because the source and destination resources have no common IP - * version. - * - * Generated from protobuf enum MISMATCHED_IP_VERSION = 16; - */ - const MISMATCHED_IP_VERSION = 16; - /** - * Aborted because the connection between the control plane and the node of - * the source cluster is initiated by the node and managed by the - * Konnectivity proxy. - * - * Generated from protobuf enum GKE_KONNECTIVITY_PROXY_UNSUPPORTED = 17; - */ - const GKE_KONNECTIVITY_PROXY_UNSUPPORTED = 17; - /** - * Aborted because expected resource configuration was missing. - * - * Generated from protobuf enum RESOURCE_CONFIG_NOT_FOUND = 18; - */ - const RESOURCE_CONFIG_NOT_FOUND = 18; - /** - * Aborted because expected VM instance configuration was missing. - * - * Generated from protobuf enum VM_INSTANCE_CONFIG_NOT_FOUND = 24; - */ - const VM_INSTANCE_CONFIG_NOT_FOUND = 24; - /** - * Aborted because expected network configuration was missing. - * - * Generated from protobuf enum NETWORK_CONFIG_NOT_FOUND = 25; - */ - const NETWORK_CONFIG_NOT_FOUND = 25; - /** - * Aborted because expected firewall configuration was missing. - * - * Generated from protobuf enum FIREWALL_CONFIG_NOT_FOUND = 26; - */ - const FIREWALL_CONFIG_NOT_FOUND = 26; - /** - * Aborted because expected route configuration was missing. - * - * Generated from protobuf enum ROUTE_CONFIG_NOT_FOUND = 27; - */ - const ROUTE_CONFIG_NOT_FOUND = 27; - /** - * Aborted because a PSC endpoint selection for the Google-managed service - * is ambiguous (several PSC endpoints satisfy test input). - * - * Generated from protobuf enum GOOGLE_MANAGED_SERVICE_AMBIGUOUS_PSC_ENDPOINT = 19; - */ - const GOOGLE_MANAGED_SERVICE_AMBIGUOUS_PSC_ENDPOINT = 19; - /** - * Aborted because tests with a PSC-based Cloud SQL instance as a source are - * not supported. - * - * Generated from protobuf enum SOURCE_PSC_CLOUD_SQL_UNSUPPORTED = 20; - */ - const SOURCE_PSC_CLOUD_SQL_UNSUPPORTED = 20; - /** - * Aborted because tests with a Redis Cluster as a source are not supported. - * - * Generated from protobuf enum SOURCE_REDIS_CLUSTER_UNSUPPORTED = 34; - */ - const SOURCE_REDIS_CLUSTER_UNSUPPORTED = 34; - /** - * Aborted because tests with a Redis Instance as a source are not - * supported. - * - * Generated from protobuf enum SOURCE_REDIS_INSTANCE_UNSUPPORTED = 35; - */ - const SOURCE_REDIS_INSTANCE_UNSUPPORTED = 35; - /** - * Aborted because tests with a forwarding rule as a source are not - * supported. - * - * Generated from protobuf enum SOURCE_FORWARDING_RULE_UNSUPPORTED = 21; - */ - const SOURCE_FORWARDING_RULE_UNSUPPORTED = 21; - /** - * Aborted because one of the endpoints is a non-routable IP address - * (loopback, link-local, etc). - * - * Generated from protobuf enum NON_ROUTABLE_IP_ADDRESS = 22; - */ - const NON_ROUTABLE_IP_ADDRESS = 22; - /** - * Aborted due to an unknown issue in the Google-managed project. - * - * Generated from protobuf enum UNKNOWN_ISSUE_IN_GOOGLE_MANAGED_PROJECT = 30; - */ - const UNKNOWN_ISSUE_IN_GOOGLE_MANAGED_PROJECT = 30; - /** - * Aborted due to an unsupported configuration of the Google-managed - * project. - * - * Generated from protobuf enum UNSUPPORTED_GOOGLE_MANAGED_PROJECT_CONFIG = 31; - */ - const UNSUPPORTED_GOOGLE_MANAGED_PROJECT_CONFIG = 31; - - private static $valueToName = [ - self::CAUSE_UNSPECIFIED => 'CAUSE_UNSPECIFIED', - self::UNKNOWN_NETWORK => 'UNKNOWN_NETWORK', - self::UNKNOWN_PROJECT => 'UNKNOWN_PROJECT', - self::NO_EXTERNAL_IP => 'NO_EXTERNAL_IP', - self::UNINTENDED_DESTINATION => 'UNINTENDED_DESTINATION', - self::SOURCE_ENDPOINT_NOT_FOUND => 'SOURCE_ENDPOINT_NOT_FOUND', - self::MISMATCHED_SOURCE_NETWORK => 'MISMATCHED_SOURCE_NETWORK', - self::DESTINATION_ENDPOINT_NOT_FOUND => 'DESTINATION_ENDPOINT_NOT_FOUND', - self::MISMATCHED_DESTINATION_NETWORK => 'MISMATCHED_DESTINATION_NETWORK', - self::UNKNOWN_IP => 'UNKNOWN_IP', - self::GOOGLE_MANAGED_SERVICE_UNKNOWN_IP => 'GOOGLE_MANAGED_SERVICE_UNKNOWN_IP', - self::SOURCE_IP_ADDRESS_NOT_IN_SOURCE_NETWORK => 'SOURCE_IP_ADDRESS_NOT_IN_SOURCE_NETWORK', - self::PERMISSION_DENIED => 'PERMISSION_DENIED', - self::PERMISSION_DENIED_NO_CLOUD_NAT_CONFIGS => 'PERMISSION_DENIED_NO_CLOUD_NAT_CONFIGS', - self::PERMISSION_DENIED_NO_NEG_ENDPOINT_CONFIGS => 'PERMISSION_DENIED_NO_NEG_ENDPOINT_CONFIGS', - self::PERMISSION_DENIED_NO_CLOUD_ROUTER_CONFIGS => 'PERMISSION_DENIED_NO_CLOUD_ROUTER_CONFIGS', - self::NO_SOURCE_LOCATION => 'NO_SOURCE_LOCATION', - self::INVALID_ARGUMENT => 'INVALID_ARGUMENT', - self::TRACE_TOO_LONG => 'TRACE_TOO_LONG', - self::INTERNAL_ERROR => 'INTERNAL_ERROR', - self::UNSUPPORTED => 'UNSUPPORTED', - self::MISMATCHED_IP_VERSION => 'MISMATCHED_IP_VERSION', - self::GKE_KONNECTIVITY_PROXY_UNSUPPORTED => 'GKE_KONNECTIVITY_PROXY_UNSUPPORTED', - self::RESOURCE_CONFIG_NOT_FOUND => 'RESOURCE_CONFIG_NOT_FOUND', - self::VM_INSTANCE_CONFIG_NOT_FOUND => 'VM_INSTANCE_CONFIG_NOT_FOUND', - self::NETWORK_CONFIG_NOT_FOUND => 'NETWORK_CONFIG_NOT_FOUND', - self::FIREWALL_CONFIG_NOT_FOUND => 'FIREWALL_CONFIG_NOT_FOUND', - self::ROUTE_CONFIG_NOT_FOUND => 'ROUTE_CONFIG_NOT_FOUND', - self::GOOGLE_MANAGED_SERVICE_AMBIGUOUS_PSC_ENDPOINT => 'GOOGLE_MANAGED_SERVICE_AMBIGUOUS_PSC_ENDPOINT', - self::SOURCE_PSC_CLOUD_SQL_UNSUPPORTED => 'SOURCE_PSC_CLOUD_SQL_UNSUPPORTED', - self::SOURCE_REDIS_CLUSTER_UNSUPPORTED => 'SOURCE_REDIS_CLUSTER_UNSUPPORTED', - self::SOURCE_REDIS_INSTANCE_UNSUPPORTED => 'SOURCE_REDIS_INSTANCE_UNSUPPORTED', - self::SOURCE_FORWARDING_RULE_UNSUPPORTED => 'SOURCE_FORWARDING_RULE_UNSUPPORTED', - self::NON_ROUTABLE_IP_ADDRESS => 'NON_ROUTABLE_IP_ADDRESS', - self::UNKNOWN_ISSUE_IN_GOOGLE_MANAGED_PROJECT => 'UNKNOWN_ISSUE_IN_GOOGLE_MANAGED_PROJECT', - self::UNSUPPORTED_GOOGLE_MANAGED_PROJECT_CONFIG => 'UNSUPPORTED_GOOGLE_MANAGED_PROJECT_CONFIG', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Cause::class, \Google\Cloud\NetworkManagement\V1\AbortInfo_Cause::class); - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/AppEngineVersionInfo.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/AppEngineVersionInfo.php deleted file mode 100644 index 070e54ea76de..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/AppEngineVersionInfo.php +++ /dev/null @@ -1,169 +0,0 @@ -google.cloud.networkmanagement.v1.AppEngineVersionInfo - */ -class AppEngineVersionInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Name of an App Engine version. - * - * Generated from protobuf field string display_name = 1; - */ - protected $display_name = ''; - /** - * URI of an App Engine version. - * - * Generated from protobuf field string uri = 2; - */ - protected $uri = ''; - /** - * Runtime of the App Engine version. - * - * Generated from protobuf field string runtime = 3; - */ - protected $runtime = ''; - /** - * App Engine execution environment for a version. - * - * Generated from protobuf field string environment = 4; - */ - protected $environment = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $display_name - * Name of an App Engine version. - * @type string $uri - * URI of an App Engine version. - * @type string $runtime - * Runtime of the App Engine version. - * @type string $environment - * App Engine execution environment for a version. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkmanagement\V1\Trace::initOnce(); - parent::__construct($data); - } - - /** - * Name of an App Engine version. - * - * Generated from protobuf field string display_name = 1; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Name of an App Engine version. - * - * Generated from protobuf field string display_name = 1; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * URI of an App Engine version. - * - * Generated from protobuf field string uri = 2; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * URI of an App Engine version. - * - * Generated from protobuf field string uri = 2; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - - /** - * Runtime of the App Engine version. - * - * Generated from protobuf field string runtime = 3; - * @return string - */ - public function getRuntime() - { - return $this->runtime; - } - - /** - * Runtime of the App Engine version. - * - * Generated from protobuf field string runtime = 3; - * @param string $var - * @return $this - */ - public function setRuntime($var) - { - GPBUtil::checkString($var, True); - $this->runtime = $var; - - return $this; - } - - /** - * App Engine execution environment for a version. - * - * Generated from protobuf field string environment = 4; - * @return string - */ - public function getEnvironment() - { - return $this->environment; - } - - /** - * App Engine execution environment for a version. - * - * Generated from protobuf field string environment = 4; - * @param string $var - * @return $this - */ - public function setEnvironment($var) - { - GPBUtil::checkString($var, True); - $this->environment = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/CloudFunctionInfo.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/CloudFunctionInfo.php deleted file mode 100644 index 0706272a11a9..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/CloudFunctionInfo.php +++ /dev/null @@ -1,169 +0,0 @@ -google.cloud.networkmanagement.v1.CloudFunctionInfo - */ -class CloudFunctionInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Name of a Cloud Function. - * - * Generated from protobuf field string display_name = 1; - */ - protected $display_name = ''; - /** - * URI of a Cloud Function. - * - * Generated from protobuf field string uri = 2; - */ - protected $uri = ''; - /** - * Location in which the Cloud Function is deployed. - * - * Generated from protobuf field string location = 3; - */ - protected $location = ''; - /** - * Latest successfully deployed version id of the Cloud Function. - * - * Generated from protobuf field int64 version_id = 4; - */ - protected $version_id = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $display_name - * Name of a Cloud Function. - * @type string $uri - * URI of a Cloud Function. - * @type string $location - * Location in which the Cloud Function is deployed. - * @type int|string $version_id - * Latest successfully deployed version id of the Cloud Function. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkmanagement\V1\Trace::initOnce(); - parent::__construct($data); - } - - /** - * Name of a Cloud Function. - * - * Generated from protobuf field string display_name = 1; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Name of a Cloud Function. - * - * Generated from protobuf field string display_name = 1; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * URI of a Cloud Function. - * - * Generated from protobuf field string uri = 2; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * URI of a Cloud Function. - * - * Generated from protobuf field string uri = 2; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - - /** - * Location in which the Cloud Function is deployed. - * - * Generated from protobuf field string location = 3; - * @return string - */ - public function getLocation() - { - return $this->location; - } - - /** - * Location in which the Cloud Function is deployed. - * - * Generated from protobuf field string location = 3; - * @param string $var - * @return $this - */ - public function setLocation($var) - { - GPBUtil::checkString($var, True); - $this->location = $var; - - return $this; - } - - /** - * Latest successfully deployed version id of the Cloud Function. - * - * Generated from protobuf field int64 version_id = 4; - * @return int|string - */ - public function getVersionId() - { - return $this->version_id; - } - - /** - * Latest successfully deployed version id of the Cloud Function. - * - * Generated from protobuf field int64 version_id = 4; - * @param int|string $var - * @return $this - */ - public function setVersionId($var) - { - GPBUtil::checkInt64($var); - $this->version_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/CloudRunRevisionInfo.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/CloudRunRevisionInfo.php deleted file mode 100644 index 4848d1718d60..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/CloudRunRevisionInfo.php +++ /dev/null @@ -1,169 +0,0 @@ -google.cloud.networkmanagement.v1.CloudRunRevisionInfo - */ -class CloudRunRevisionInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Name of a Cloud Run revision. - * - * Generated from protobuf field string display_name = 1; - */ - protected $display_name = ''; - /** - * URI of a Cloud Run revision. - * - * Generated from protobuf field string uri = 2; - */ - protected $uri = ''; - /** - * Location in which this revision is deployed. - * - * Generated from protobuf field string location = 4; - */ - protected $location = ''; - /** - * URI of Cloud Run service this revision belongs to. - * - * Generated from protobuf field string service_uri = 5; - */ - protected $service_uri = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $display_name - * Name of a Cloud Run revision. - * @type string $uri - * URI of a Cloud Run revision. - * @type string $location - * Location in which this revision is deployed. - * @type string $service_uri - * URI of Cloud Run service this revision belongs to. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkmanagement\V1\Trace::initOnce(); - parent::__construct($data); - } - - /** - * Name of a Cloud Run revision. - * - * Generated from protobuf field string display_name = 1; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Name of a Cloud Run revision. - * - * Generated from protobuf field string display_name = 1; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * URI of a Cloud Run revision. - * - * Generated from protobuf field string uri = 2; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * URI of a Cloud Run revision. - * - * Generated from protobuf field string uri = 2; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - - /** - * Location in which this revision is deployed. - * - * Generated from protobuf field string location = 4; - * @return string - */ - public function getLocation() - { - return $this->location; - } - - /** - * Location in which this revision is deployed. - * - * Generated from protobuf field string location = 4; - * @param string $var - * @return $this - */ - public function setLocation($var) - { - GPBUtil::checkString($var, True); - $this->location = $var; - - return $this; - } - - /** - * URI of Cloud Run service this revision belongs to. - * - * Generated from protobuf field string service_uri = 5; - * @return string - */ - public function getServiceUri() - { - return $this->service_uri; - } - - /** - * URI of Cloud Run service this revision belongs to. - * - * Generated from protobuf field string service_uri = 5; - * @param string $var - * @return $this - */ - public function setServiceUri($var) - { - GPBUtil::checkString($var, True); - $this->service_uri = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/CloudSQLInstanceInfo.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/CloudSQLInstanceInfo.php deleted file mode 100644 index 6dc47236ce8f..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/CloudSQLInstanceInfo.php +++ /dev/null @@ -1,241 +0,0 @@ -google.cloud.networkmanagement.v1.CloudSQLInstanceInfo - */ -class CloudSQLInstanceInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Name of a Cloud SQL instance. - * - * Generated from protobuf field string display_name = 1; - */ - protected $display_name = ''; - /** - * URI of a Cloud SQL instance. - * - * Generated from protobuf field string uri = 2; - */ - protected $uri = ''; - /** - * URI of a Cloud SQL instance network or empty string if the instance does - * not have one. - * - * Generated from protobuf field string network_uri = 4; - */ - protected $network_uri = ''; - /** - * Internal IP address of a Cloud SQL instance. - * - * Generated from protobuf field string internal_ip = 5; - */ - protected $internal_ip = ''; - /** - * External IP address of a Cloud SQL instance. - * - * Generated from protobuf field string external_ip = 6; - */ - protected $external_ip = ''; - /** - * Region in which the Cloud SQL instance is running. - * - * Generated from protobuf field string region = 7; - */ - protected $region = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $display_name - * Name of a Cloud SQL instance. - * @type string $uri - * URI of a Cloud SQL instance. - * @type string $network_uri - * URI of a Cloud SQL instance network or empty string if the instance does - * not have one. - * @type string $internal_ip - * Internal IP address of a Cloud SQL instance. - * @type string $external_ip - * External IP address of a Cloud SQL instance. - * @type string $region - * Region in which the Cloud SQL instance is running. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkmanagement\V1\Trace::initOnce(); - parent::__construct($data); - } - - /** - * Name of a Cloud SQL instance. - * - * Generated from protobuf field string display_name = 1; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Name of a Cloud SQL instance. - * - * Generated from protobuf field string display_name = 1; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * URI of a Cloud SQL instance. - * - * Generated from protobuf field string uri = 2; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * URI of a Cloud SQL instance. - * - * Generated from protobuf field string uri = 2; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - - /** - * URI of a Cloud SQL instance network or empty string if the instance does - * not have one. - * - * Generated from protobuf field string network_uri = 4; - * @return string - */ - public function getNetworkUri() - { - return $this->network_uri; - } - - /** - * URI of a Cloud SQL instance network or empty string if the instance does - * not have one. - * - * Generated from protobuf field string network_uri = 4; - * @param string $var - * @return $this - */ - public function setNetworkUri($var) - { - GPBUtil::checkString($var, True); - $this->network_uri = $var; - - return $this; - } - - /** - * Internal IP address of a Cloud SQL instance. - * - * Generated from protobuf field string internal_ip = 5; - * @return string - */ - public function getInternalIp() - { - return $this->internal_ip; - } - - /** - * Internal IP address of a Cloud SQL instance. - * - * Generated from protobuf field string internal_ip = 5; - * @param string $var - * @return $this - */ - public function setInternalIp($var) - { - GPBUtil::checkString($var, True); - $this->internal_ip = $var; - - return $this; - } - - /** - * External IP address of a Cloud SQL instance. - * - * Generated from protobuf field string external_ip = 6; - * @return string - */ - public function getExternalIp() - { - return $this->external_ip; - } - - /** - * External IP address of a Cloud SQL instance. - * - * Generated from protobuf field string external_ip = 6; - * @param string $var - * @return $this - */ - public function setExternalIp($var) - { - GPBUtil::checkString($var, True); - $this->external_ip = $var; - - return $this; - } - - /** - * Region in which the Cloud SQL instance is running. - * - * Generated from protobuf field string region = 7; - * @return string - */ - public function getRegion() - { - return $this->region; - } - - /** - * Region in which the Cloud SQL instance is running. - * - * Generated from protobuf field string region = 7; - * @param string $var - * @return $this - */ - public function setRegion($var) - { - GPBUtil::checkString($var, True); - $this->region = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ConnectivityTest.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ConnectivityTest.php deleted file mode 100644 index 9885cd7ca58e..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ConnectivityTest.php +++ /dev/null @@ -1,781 +0,0 @@ -google.cloud.networkmanagement.v1.ConnectivityTest - */ -class ConnectivityTest extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. Unique name of the resource using the form: - * `projects/{project_id}/locations/global/connectivityTests/{test_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * The user-supplied description of the Connectivity Test. - * Maximum of 512 characters. - * - * Generated from protobuf field string description = 2; - */ - protected $description = ''; - /** - * Required. Source specification of the Connectivity Test. - * You can use a combination of source IP address, virtual machine - * (VM) instance, or Compute Engine network to uniquely identify - * the source location. - * Examples: - * If the source IP address is an internal IP address within a Google Cloud - * Virtual Private Cloud (VPC) network, then you must also specify the VPC - * network. Otherwise, specify the VM instance, which already contains its - * internal IP address and VPC network information. - * If the source of the test is within an on-premises network, then you must - * provide the destination VPC network. - * If the source endpoint is a Compute Engine VM instance with multiple - * network interfaces, the instance itself is not sufficient to identify the - * endpoint. So, you must also specify the source IP address or VPC network. - * A reachability analysis proceeds even if the source location is - * ambiguous. However, the test result may include endpoints that you don't - * intend to test. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.Endpoint source = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $source = null; - /** - * Required. Destination specification of the Connectivity Test. - * You can use a combination of destination IP address, Compute Engine - * VM instance, or VPC network to uniquely identify the destination - * location. - * Even if the destination IP address is not unique, the source IP - * location is unique. Usually, the analysis can infer the destination - * endpoint from route information. - * If the destination you specify is a VM instance and the instance has - * multiple network interfaces, then you must also specify either - * a destination IP address or VPC network to identify the destination - * interface. - * A reachability analysis proceeds even if the destination location is - * ambiguous. However, the result can include endpoints that you don't - * intend to test. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.Endpoint destination = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $destination = null; - /** - * IP Protocol of the test. When not provided, "TCP" is assumed. - * - * Generated from protobuf field string protocol = 5; - */ - protected $protocol = ''; - /** - * Other projects that may be relevant for reachability analysis. - * This is applicable to scenarios where a test can cross project boundaries. - * - * Generated from protobuf field repeated string related_projects = 6; - */ - private $related_projects; - /** - * Output only. The display name of a Connectivity Test. - * - * Generated from protobuf field string display_name = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $display_name = ''; - /** - * Resource labels to represent user-provided metadata. - * - * Generated from protobuf field map labels = 8; - */ - private $labels; - /** - * Output only. The time the test was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time the test's configuration was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Output only. The reachability details of this test from the latest run. - * The details are updated when creating a new test, updating an - * existing test, or triggering a one-time rerun of an existing test. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.ReachabilityDetails reachability_details = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $reachability_details = null; - /** - * Output only. The probing details of this test from the latest run, present - * for applicable tests only. The details are updated when creating a new - * test, updating an existing test, or triggering a one-time rerun of an - * existing test. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.ProbingDetails probing_details = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $probing_details = null; - /** - * Whether run analysis for the return path from destination to source. - * Default value is false. - * - * Generated from protobuf field bool round_trip = 15; - */ - protected $round_trip = false; - /** - * Output only. The reachability details of this test from the latest run for - * the return path. The details are updated when creating a new test, - * updating an existing test, or triggering a one-time rerun of an existing - * test. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.ReachabilityDetails return_reachability_details = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $return_reachability_details = null; - /** - * Whether the test should skip firewall checking. - * If not provided, we assume false. - * - * Generated from protobuf field bool bypass_firewall_checks = 17; - */ - protected $bypass_firewall_checks = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. Unique name of the resource using the form: - * `projects/{project_id}/locations/global/connectivityTests/{test_id}` - * @type string $description - * The user-supplied description of the Connectivity Test. - * Maximum of 512 characters. - * @type \Google\Cloud\NetworkManagement\V1\Endpoint $source - * Required. Source specification of the Connectivity Test. - * You can use a combination of source IP address, virtual machine - * (VM) instance, or Compute Engine network to uniquely identify - * the source location. - * Examples: - * If the source IP address is an internal IP address within a Google Cloud - * Virtual Private Cloud (VPC) network, then you must also specify the VPC - * network. Otherwise, specify the VM instance, which already contains its - * internal IP address and VPC network information. - * If the source of the test is within an on-premises network, then you must - * provide the destination VPC network. - * If the source endpoint is a Compute Engine VM instance with multiple - * network interfaces, the instance itself is not sufficient to identify the - * endpoint. So, you must also specify the source IP address or VPC network. - * A reachability analysis proceeds even if the source location is - * ambiguous. However, the test result may include endpoints that you don't - * intend to test. - * @type \Google\Cloud\NetworkManagement\V1\Endpoint $destination - * Required. Destination specification of the Connectivity Test. - * You can use a combination of destination IP address, Compute Engine - * VM instance, or VPC network to uniquely identify the destination - * location. - * Even if the destination IP address is not unique, the source IP - * location is unique. Usually, the analysis can infer the destination - * endpoint from route information. - * If the destination you specify is a VM instance and the instance has - * multiple network interfaces, then you must also specify either - * a destination IP address or VPC network to identify the destination - * interface. - * A reachability analysis proceeds even if the destination location is - * ambiguous. However, the result can include endpoints that you don't - * intend to test. - * @type string $protocol - * IP Protocol of the test. When not provided, "TCP" is assumed. - * @type array|\Google\Protobuf\Internal\RepeatedField $related_projects - * Other projects that may be relevant for reachability analysis. - * This is applicable to scenarios where a test can cross project boundaries. - * @type string $display_name - * Output only. The display name of a Connectivity Test. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Resource labels to represent user-provided metadata. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time the test was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The time the test's configuration was updated. - * @type \Google\Cloud\NetworkManagement\V1\ReachabilityDetails $reachability_details - * Output only. The reachability details of this test from the latest run. - * The details are updated when creating a new test, updating an - * existing test, or triggering a one-time rerun of an existing test. - * @type \Google\Cloud\NetworkManagement\V1\ProbingDetails $probing_details - * Output only. The probing details of this test from the latest run, present - * for applicable tests only. The details are updated when creating a new - * test, updating an existing test, or triggering a one-time rerun of an - * existing test. - * @type bool $round_trip - * Whether run analysis for the return path from destination to source. - * Default value is false. - * @type \Google\Cloud\NetworkManagement\V1\ReachabilityDetails $return_reachability_details - * Output only. The reachability details of this test from the latest run for - * the return path. The details are updated when creating a new test, - * updating an existing test, or triggering a one-time rerun of an existing - * test. - * @type bool $bypass_firewall_checks - * Whether the test should skip firewall checking. - * If not provided, we assume false. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkmanagement\V1\ConnectivityTest::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. Unique name of the resource using the form: - * `projects/{project_id}/locations/global/connectivityTests/{test_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. Unique name of the resource using the form: - * `projects/{project_id}/locations/global/connectivityTests/{test_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The user-supplied description of the Connectivity Test. - * Maximum of 512 characters. - * - * Generated from protobuf field string description = 2; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * The user-supplied description of the Connectivity Test. - * Maximum of 512 characters. - * - * Generated from protobuf field string description = 2; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Required. Source specification of the Connectivity Test. - * You can use a combination of source IP address, virtual machine - * (VM) instance, or Compute Engine network to uniquely identify - * the source location. - * Examples: - * If the source IP address is an internal IP address within a Google Cloud - * Virtual Private Cloud (VPC) network, then you must also specify the VPC - * network. Otherwise, specify the VM instance, which already contains its - * internal IP address and VPC network information. - * If the source of the test is within an on-premises network, then you must - * provide the destination VPC network. - * If the source endpoint is a Compute Engine VM instance with multiple - * network interfaces, the instance itself is not sufficient to identify the - * endpoint. So, you must also specify the source IP address or VPC network. - * A reachability analysis proceeds even if the source location is - * ambiguous. However, the test result may include endpoints that you don't - * intend to test. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.Endpoint source = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\NetworkManagement\V1\Endpoint|null - */ - public function getSource() - { - return $this->source; - } - - public function hasSource() - { - return isset($this->source); - } - - public function clearSource() - { - unset($this->source); - } - - /** - * Required. Source specification of the Connectivity Test. - * You can use a combination of source IP address, virtual machine - * (VM) instance, or Compute Engine network to uniquely identify - * the source location. - * Examples: - * If the source IP address is an internal IP address within a Google Cloud - * Virtual Private Cloud (VPC) network, then you must also specify the VPC - * network. Otherwise, specify the VM instance, which already contains its - * internal IP address and VPC network information. - * If the source of the test is within an on-premises network, then you must - * provide the destination VPC network. - * If the source endpoint is a Compute Engine VM instance with multiple - * network interfaces, the instance itself is not sufficient to identify the - * endpoint. So, you must also specify the source IP address or VPC network. - * A reachability analysis proceeds even if the source location is - * ambiguous. However, the test result may include endpoints that you don't - * intend to test. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.Endpoint source = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\NetworkManagement\V1\Endpoint $var - * @return $this - */ - public function setSource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\Endpoint::class); - $this->source = $var; - - return $this; - } - - /** - * Required. Destination specification of the Connectivity Test. - * You can use a combination of destination IP address, Compute Engine - * VM instance, or VPC network to uniquely identify the destination - * location. - * Even if the destination IP address is not unique, the source IP - * location is unique. Usually, the analysis can infer the destination - * endpoint from route information. - * If the destination you specify is a VM instance and the instance has - * multiple network interfaces, then you must also specify either - * a destination IP address or VPC network to identify the destination - * interface. - * A reachability analysis proceeds even if the destination location is - * ambiguous. However, the result can include endpoints that you don't - * intend to test. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.Endpoint destination = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\NetworkManagement\V1\Endpoint|null - */ - public function getDestination() - { - return $this->destination; - } - - public function hasDestination() - { - return isset($this->destination); - } - - public function clearDestination() - { - unset($this->destination); - } - - /** - * Required. Destination specification of the Connectivity Test. - * You can use a combination of destination IP address, Compute Engine - * VM instance, or VPC network to uniquely identify the destination - * location. - * Even if the destination IP address is not unique, the source IP - * location is unique. Usually, the analysis can infer the destination - * endpoint from route information. - * If the destination you specify is a VM instance and the instance has - * multiple network interfaces, then you must also specify either - * a destination IP address or VPC network to identify the destination - * interface. - * A reachability analysis proceeds even if the destination location is - * ambiguous. However, the result can include endpoints that you don't - * intend to test. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.Endpoint destination = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\NetworkManagement\V1\Endpoint $var - * @return $this - */ - public function setDestination($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\Endpoint::class); - $this->destination = $var; - - return $this; - } - - /** - * IP Protocol of the test. When not provided, "TCP" is assumed. - * - * Generated from protobuf field string protocol = 5; - * @return string - */ - public function getProtocol() - { - return $this->protocol; - } - - /** - * IP Protocol of the test. When not provided, "TCP" is assumed. - * - * Generated from protobuf field string protocol = 5; - * @param string $var - * @return $this - */ - public function setProtocol($var) - { - GPBUtil::checkString($var, True); - $this->protocol = $var; - - return $this; - } - - /** - * Other projects that may be relevant for reachability analysis. - * This is applicable to scenarios where a test can cross project boundaries. - * - * Generated from protobuf field repeated string related_projects = 6; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRelatedProjects() - { - return $this->related_projects; - } - - /** - * Other projects that may be relevant for reachability analysis. - * This is applicable to scenarios where a test can cross project boundaries. - * - * Generated from protobuf field repeated string related_projects = 6; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRelatedProjects($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->related_projects = $arr; - - return $this; - } - - /** - * Output only. The display name of a Connectivity Test. - * - * Generated from protobuf field string display_name = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Output only. The display name of a Connectivity Test. - * - * Generated from protobuf field string display_name = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Resource labels to represent user-provided metadata. - * - * Generated from protobuf field map labels = 8; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Resource labels to represent user-provided metadata. - * - * Generated from protobuf field map labels = 8; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Output only. The time the test was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The time the test was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The time the test's configuration was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The time the test's configuration was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Output only. The reachability details of this test from the latest run. - * The details are updated when creating a new test, updating an - * existing test, or triggering a one-time rerun of an existing test. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.ReachabilityDetails reachability_details = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\NetworkManagement\V1\ReachabilityDetails|null - */ - public function getReachabilityDetails() - { - return $this->reachability_details; - } - - public function hasReachabilityDetails() - { - return isset($this->reachability_details); - } - - public function clearReachabilityDetails() - { - unset($this->reachability_details); - } - - /** - * Output only. The reachability details of this test from the latest run. - * The details are updated when creating a new test, updating an - * existing test, or triggering a one-time rerun of an existing test. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.ReachabilityDetails reachability_details = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\NetworkManagement\V1\ReachabilityDetails $var - * @return $this - */ - public function setReachabilityDetails($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\ReachabilityDetails::class); - $this->reachability_details = $var; - - return $this; - } - - /** - * Output only. The probing details of this test from the latest run, present - * for applicable tests only. The details are updated when creating a new - * test, updating an existing test, or triggering a one-time rerun of an - * existing test. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.ProbingDetails probing_details = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\NetworkManagement\V1\ProbingDetails|null - */ - public function getProbingDetails() - { - return $this->probing_details; - } - - public function hasProbingDetails() - { - return isset($this->probing_details); - } - - public function clearProbingDetails() - { - unset($this->probing_details); - } - - /** - * Output only. The probing details of this test from the latest run, present - * for applicable tests only. The details are updated when creating a new - * test, updating an existing test, or triggering a one-time rerun of an - * existing test. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.ProbingDetails probing_details = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\NetworkManagement\V1\ProbingDetails $var - * @return $this - */ - public function setProbingDetails($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\ProbingDetails::class); - $this->probing_details = $var; - - return $this; - } - - /** - * Whether run analysis for the return path from destination to source. - * Default value is false. - * - * Generated from protobuf field bool round_trip = 15; - * @return bool - */ - public function getRoundTrip() - { - return $this->round_trip; - } - - /** - * Whether run analysis for the return path from destination to source. - * Default value is false. - * - * Generated from protobuf field bool round_trip = 15; - * @param bool $var - * @return $this - */ - public function setRoundTrip($var) - { - GPBUtil::checkBool($var); - $this->round_trip = $var; - - return $this; - } - - /** - * Output only. The reachability details of this test from the latest run for - * the return path. The details are updated when creating a new test, - * updating an existing test, or triggering a one-time rerun of an existing - * test. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.ReachabilityDetails return_reachability_details = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\NetworkManagement\V1\ReachabilityDetails|null - */ - public function getReturnReachabilityDetails() - { - return $this->return_reachability_details; - } - - public function hasReturnReachabilityDetails() - { - return isset($this->return_reachability_details); - } - - public function clearReturnReachabilityDetails() - { - unset($this->return_reachability_details); - } - - /** - * Output only. The reachability details of this test from the latest run for - * the return path. The details are updated when creating a new test, - * updating an existing test, or triggering a one-time rerun of an existing - * test. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.ReachabilityDetails return_reachability_details = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\NetworkManagement\V1\ReachabilityDetails $var - * @return $this - */ - public function setReturnReachabilityDetails($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\ReachabilityDetails::class); - $this->return_reachability_details = $var; - - return $this; - } - - /** - * Whether the test should skip firewall checking. - * If not provided, we assume false. - * - * Generated from protobuf field bool bypass_firewall_checks = 17; - * @return bool - */ - public function getBypassFirewallChecks() - { - return $this->bypass_firewall_checks; - } - - /** - * Whether the test should skip firewall checking. - * If not provided, we assume false. - * - * Generated from protobuf field bool bypass_firewall_checks = 17; - * @param bool $var - * @return $this - */ - public function setBypassFirewallChecks($var) - { - GPBUtil::checkBool($var); - $this->bypass_firewall_checks = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/CreateConnectivityTestRequest.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/CreateConnectivityTestRequest.php deleted file mode 100644 index 1fdd275480d8..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/CreateConnectivityTestRequest.php +++ /dev/null @@ -1,199 +0,0 @@ -google.cloud.networkmanagement.v1.CreateConnectivityTestRequest - */ -class CreateConnectivityTestRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource of the Connectivity Test to create: - * `projects/{project_id}/locations/global` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The logical name of the Connectivity Test in your project - * with the following restrictions: - * * Must contain only lowercase letters, numbers, and hyphens. - * * Must start with a letter. - * * Must be between 1-40 characters. - * * Must end with a number or a letter. - * * Must be unique within the customer project - * - * Generated from protobuf field string test_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $test_id = ''; - /** - * Required. A `ConnectivityTest` resource - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.ConnectivityTest resource = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $resource = null; - - /** - * @param string $parent Required. The parent resource of the Connectivity Test to create: - * `projects/{project_id}/locations/global` - * Please see {@see ReachabilityServiceClient::projectName()} for help formatting this field. - * @param string $testId Required. The logical name of the Connectivity Test in your project - * with the following restrictions: - * - * * Must contain only lowercase letters, numbers, and hyphens. - * * Must start with a letter. - * * Must be between 1-40 characters. - * * Must end with a number or a letter. - * * Must be unique within the customer project - * @param \Google\Cloud\NetworkManagement\V1\ConnectivityTest $resource Required. A `ConnectivityTest` resource - * - * @return \Google\Cloud\NetworkManagement\V1\CreateConnectivityTestRequest - * - * @experimental - */ - public static function build(string $parent, string $testId, \Google\Cloud\NetworkManagement\V1\ConnectivityTest $resource): self - { - return (new self()) - ->setParent($parent) - ->setTestId($testId) - ->setResource($resource); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource of the Connectivity Test to create: - * `projects/{project_id}/locations/global` - * @type string $test_id - * Required. The logical name of the Connectivity Test in your project - * with the following restrictions: - * * Must contain only lowercase letters, numbers, and hyphens. - * * Must start with a letter. - * * Must be between 1-40 characters. - * * Must end with a number or a letter. - * * Must be unique within the customer project - * @type \Google\Cloud\NetworkManagement\V1\ConnectivityTest $resource - * Required. A `ConnectivityTest` resource - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkmanagement\V1\Reachability::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource of the Connectivity Test to create: - * `projects/{project_id}/locations/global` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource of the Connectivity Test to create: - * `projects/{project_id}/locations/global` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The logical name of the Connectivity Test in your project - * with the following restrictions: - * * Must contain only lowercase letters, numbers, and hyphens. - * * Must start with a letter. - * * Must be between 1-40 characters. - * * Must end with a number or a letter. - * * Must be unique within the customer project - * - * Generated from protobuf field string test_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getTestId() - { - return $this->test_id; - } - - /** - * Required. The logical name of the Connectivity Test in your project - * with the following restrictions: - * * Must contain only lowercase letters, numbers, and hyphens. - * * Must start with a letter. - * * Must be between 1-40 characters. - * * Must end with a number or a letter. - * * Must be unique within the customer project - * - * Generated from protobuf field string test_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setTestId($var) - { - GPBUtil::checkString($var, True); - $this->test_id = $var; - - return $this; - } - - /** - * Required. A `ConnectivityTest` resource - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.ConnectivityTest resource = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\NetworkManagement\V1\ConnectivityTest|null - */ - public function getResource() - { - return $this->resource; - } - - public function hasResource() - { - return isset($this->resource); - } - - public function clearResource() - { - unset($this->resource); - } - - /** - * Required. A `ConnectivityTest` resource - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.ConnectivityTest resource = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\NetworkManagement\V1\ConnectivityTest $var - * @return $this - */ - public function setResource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\ConnectivityTest::class); - $this->resource = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/DeleteConnectivityTestRequest.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/DeleteConnectivityTestRequest.php deleted file mode 100644 index 32c0612f03aa..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/DeleteConnectivityTestRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest - */ -class DeleteConnectivityTestRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Connectivity Test resource name using the form: - * `projects/{project_id}/locations/global/connectivityTests/{test_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Connectivity Test resource name using the form: - * `projects/{project_id}/locations/global/connectivityTests/{test_id}` - * Please see {@see ReachabilityServiceClient::connectivityTestName()} for help formatting this field. - * - * @return \Google\Cloud\NetworkManagement\V1\DeleteConnectivityTestRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Connectivity Test resource name using the form: - * `projects/{project_id}/locations/global/connectivityTests/{test_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkmanagement\V1\Reachability::initOnce(); - parent::__construct($data); - } - - /** - * Required. Connectivity Test resource name using the form: - * `projects/{project_id}/locations/global/connectivityTests/{test_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Connectivity Test resource name using the form: - * `projects/{project_id}/locations/global/connectivityTests/{test_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/DeliverInfo.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/DeliverInfo.php deleted file mode 100644 index c21cb8450cb3..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/DeliverInfo.php +++ /dev/null @@ -1,207 +0,0 @@ -google.cloud.networkmanagement.v1.DeliverInfo - */ -class DeliverInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Target type where the packet is delivered to. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.DeliverInfo.Target target = 1; - */ - protected $target = 0; - /** - * URI of the resource that the packet is delivered to. - * - * Generated from protobuf field string resource_uri = 2; - */ - protected $resource_uri = ''; - /** - * IP address of the target (if applicable). - * - * Generated from protobuf field string ip_address = 3 [(.google.api.field_info) = { - */ - protected $ip_address = ''; - /** - * Name of the Cloud Storage Bucket the packet is delivered to (if - * applicable). - * - * Generated from protobuf field string storage_bucket = 4; - */ - protected $storage_bucket = ''; - /** - * PSC Google API target the packet is delivered to (if applicable). - * - * Generated from protobuf field string psc_google_api_target = 5; - */ - protected $psc_google_api_target = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $target - * Target type where the packet is delivered to. - * @type string $resource_uri - * URI of the resource that the packet is delivered to. - * @type string $ip_address - * IP address of the target (if applicable). - * @type string $storage_bucket - * Name of the Cloud Storage Bucket the packet is delivered to (if - * applicable). - * @type string $psc_google_api_target - * PSC Google API target the packet is delivered to (if applicable). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkmanagement\V1\Trace::initOnce(); - parent::__construct($data); - } - - /** - * Target type where the packet is delivered to. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.DeliverInfo.Target target = 1; - * @return int - */ - public function getTarget() - { - return $this->target; - } - - /** - * Target type where the packet is delivered to. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.DeliverInfo.Target target = 1; - * @param int $var - * @return $this - */ - public function setTarget($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\NetworkManagement\V1\DeliverInfo\Target::class); - $this->target = $var; - - return $this; - } - - /** - * URI of the resource that the packet is delivered to. - * - * Generated from protobuf field string resource_uri = 2; - * @return string - */ - public function getResourceUri() - { - return $this->resource_uri; - } - - /** - * URI of the resource that the packet is delivered to. - * - * Generated from protobuf field string resource_uri = 2; - * @param string $var - * @return $this - */ - public function setResourceUri($var) - { - GPBUtil::checkString($var, True); - $this->resource_uri = $var; - - return $this; - } - - /** - * IP address of the target (if applicable). - * - * Generated from protobuf field string ip_address = 3 [(.google.api.field_info) = { - * @return string - */ - public function getIpAddress() - { - return $this->ip_address; - } - - /** - * IP address of the target (if applicable). - * - * Generated from protobuf field string ip_address = 3 [(.google.api.field_info) = { - * @param string $var - * @return $this - */ - public function setIpAddress($var) - { - GPBUtil::checkString($var, True); - $this->ip_address = $var; - - return $this; - } - - /** - * Name of the Cloud Storage Bucket the packet is delivered to (if - * applicable). - * - * Generated from protobuf field string storage_bucket = 4; - * @return string - */ - public function getStorageBucket() - { - return $this->storage_bucket; - } - - /** - * Name of the Cloud Storage Bucket the packet is delivered to (if - * applicable). - * - * Generated from protobuf field string storage_bucket = 4; - * @param string $var - * @return $this - */ - public function setStorageBucket($var) - { - GPBUtil::checkString($var, True); - $this->storage_bucket = $var; - - return $this; - } - - /** - * PSC Google API target the packet is delivered to (if applicable). - * - * Generated from protobuf field string psc_google_api_target = 5; - * @return string - */ - public function getPscGoogleApiTarget() - { - return $this->psc_google_api_target; - } - - /** - * PSC Google API target the packet is delivered to (if applicable). - * - * Generated from protobuf field string psc_google_api_target = 5; - * @param string $var - * @return $this - */ - public function setPscGoogleApiTarget($var) - { - GPBUtil::checkString($var, True); - $this->psc_google_api_target = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/DeliverInfo/Target.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/DeliverInfo/Target.php deleted file mode 100644 index 4264db7ba3ae..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/DeliverInfo/Target.php +++ /dev/null @@ -1,172 +0,0 @@ -google.cloud.networkmanagement.v1.DeliverInfo.Target - */ -class Target -{ - /** - * Target not specified. - * - * Generated from protobuf enum TARGET_UNSPECIFIED = 0; - */ - const TARGET_UNSPECIFIED = 0; - /** - * Target is a Compute Engine instance. - * - * Generated from protobuf enum INSTANCE = 1; - */ - const INSTANCE = 1; - /** - * Target is the internet. - * - * Generated from protobuf enum INTERNET = 2; - */ - const INTERNET = 2; - /** - * Target is a Google API. - * - * Generated from protobuf enum GOOGLE_API = 3; - */ - const GOOGLE_API = 3; - /** - * Target is a Google Kubernetes Engine cluster master. - * - * Generated from protobuf enum GKE_MASTER = 4; - */ - const GKE_MASTER = 4; - /** - * Target is a Cloud SQL instance. - * - * Generated from protobuf enum CLOUD_SQL_INSTANCE = 5; - */ - const CLOUD_SQL_INSTANCE = 5; - /** - * Target is a published service that uses [Private Service - * Connect](https://cloud.google.com/vpc/docs/configure-private-service-connect-services). - * - * Generated from protobuf enum PSC_PUBLISHED_SERVICE = 6; - */ - const PSC_PUBLISHED_SERVICE = 6; - /** - * Target is Google APIs that use [Private Service - * Connect](https://cloud.google.com/vpc/docs/configure-private-service-connect-apis). - * - * Generated from protobuf enum PSC_GOOGLE_API = 7; - */ - const PSC_GOOGLE_API = 7; - /** - * Target is a VPC-SC that uses [Private Service - * Connect](https://cloud.google.com/vpc/docs/configure-private-service-connect-apis). - * - * Generated from protobuf enum PSC_VPC_SC = 8; - */ - const PSC_VPC_SC = 8; - /** - * Target is a serverless network endpoint group. - * - * Generated from protobuf enum SERVERLESS_NEG = 9; - */ - const SERVERLESS_NEG = 9; - /** - * Target is a Cloud Storage bucket. - * - * Generated from protobuf enum STORAGE_BUCKET = 10; - */ - const STORAGE_BUCKET = 10; - /** - * Target is a private network. Used only for return traces. - * - * Generated from protobuf enum PRIVATE_NETWORK = 11; - */ - const PRIVATE_NETWORK = 11; - /** - * Target is a Cloud Function. Used only for return traces. - * - * Generated from protobuf enum CLOUD_FUNCTION = 12; - */ - const CLOUD_FUNCTION = 12; - /** - * Target is a App Engine service version. Used only for return traces. - * - * Generated from protobuf enum APP_ENGINE_VERSION = 13; - */ - const APP_ENGINE_VERSION = 13; - /** - * Target is a Cloud Run revision. Used only for return traces. - * - * Generated from protobuf enum CLOUD_RUN_REVISION = 14; - */ - const CLOUD_RUN_REVISION = 14; - /** - * Target is a Google-managed service. Used only for return traces. - * - * Generated from protobuf enum GOOGLE_MANAGED_SERVICE = 15; - */ - const GOOGLE_MANAGED_SERVICE = 15; - /** - * Target is a Redis Instance. - * - * Generated from protobuf enum REDIS_INSTANCE = 16; - */ - const REDIS_INSTANCE = 16; - /** - * Target is a Redis Cluster. - * - * Generated from protobuf enum REDIS_CLUSTER = 17; - */ - const REDIS_CLUSTER = 17; - - private static $valueToName = [ - self::TARGET_UNSPECIFIED => 'TARGET_UNSPECIFIED', - self::INSTANCE => 'INSTANCE', - self::INTERNET => 'INTERNET', - self::GOOGLE_API => 'GOOGLE_API', - self::GKE_MASTER => 'GKE_MASTER', - self::CLOUD_SQL_INSTANCE => 'CLOUD_SQL_INSTANCE', - self::PSC_PUBLISHED_SERVICE => 'PSC_PUBLISHED_SERVICE', - self::PSC_GOOGLE_API => 'PSC_GOOGLE_API', - self::PSC_VPC_SC => 'PSC_VPC_SC', - self::SERVERLESS_NEG => 'SERVERLESS_NEG', - self::STORAGE_BUCKET => 'STORAGE_BUCKET', - self::PRIVATE_NETWORK => 'PRIVATE_NETWORK', - self::CLOUD_FUNCTION => 'CLOUD_FUNCTION', - self::APP_ENGINE_VERSION => 'APP_ENGINE_VERSION', - self::CLOUD_RUN_REVISION => 'CLOUD_RUN_REVISION', - self::GOOGLE_MANAGED_SERVICE => 'GOOGLE_MANAGED_SERVICE', - self::REDIS_INSTANCE => 'REDIS_INSTANCE', - self::REDIS_CLUSTER => 'REDIS_CLUSTER', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Target::class, \Google\Cloud\NetworkManagement\V1\DeliverInfo_Target::class); - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/DropInfo.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/DropInfo.php deleted file mode 100644 index b8cb02168001..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/DropInfo.php +++ /dev/null @@ -1,203 +0,0 @@ -google.cloud.networkmanagement.v1.DropInfo - */ -class DropInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Cause that the packet is dropped. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.DropInfo.Cause cause = 1; - */ - protected $cause = 0; - /** - * URI of the resource that caused the drop. - * - * Generated from protobuf field string resource_uri = 2; - */ - protected $resource_uri = ''; - /** - * Source IP address of the dropped packet (if relevant). - * - * Generated from protobuf field string source_ip = 3; - */ - protected $source_ip = ''; - /** - * Destination IP address of the dropped packet (if relevant). - * - * Generated from protobuf field string destination_ip = 4; - */ - protected $destination_ip = ''; - /** - * Region of the dropped packet (if relevant). - * - * Generated from protobuf field string region = 5; - */ - protected $region = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $cause - * Cause that the packet is dropped. - * @type string $resource_uri - * URI of the resource that caused the drop. - * @type string $source_ip - * Source IP address of the dropped packet (if relevant). - * @type string $destination_ip - * Destination IP address of the dropped packet (if relevant). - * @type string $region - * Region of the dropped packet (if relevant). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkmanagement\V1\Trace::initOnce(); - parent::__construct($data); - } - - /** - * Cause that the packet is dropped. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.DropInfo.Cause cause = 1; - * @return int - */ - public function getCause() - { - return $this->cause; - } - - /** - * Cause that the packet is dropped. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.DropInfo.Cause cause = 1; - * @param int $var - * @return $this - */ - public function setCause($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\NetworkManagement\V1\DropInfo\Cause::class); - $this->cause = $var; - - return $this; - } - - /** - * URI of the resource that caused the drop. - * - * Generated from protobuf field string resource_uri = 2; - * @return string - */ - public function getResourceUri() - { - return $this->resource_uri; - } - - /** - * URI of the resource that caused the drop. - * - * Generated from protobuf field string resource_uri = 2; - * @param string $var - * @return $this - */ - public function setResourceUri($var) - { - GPBUtil::checkString($var, True); - $this->resource_uri = $var; - - return $this; - } - - /** - * Source IP address of the dropped packet (if relevant). - * - * Generated from protobuf field string source_ip = 3; - * @return string - */ - public function getSourceIp() - { - return $this->source_ip; - } - - /** - * Source IP address of the dropped packet (if relevant). - * - * Generated from protobuf field string source_ip = 3; - * @param string $var - * @return $this - */ - public function setSourceIp($var) - { - GPBUtil::checkString($var, True); - $this->source_ip = $var; - - return $this; - } - - /** - * Destination IP address of the dropped packet (if relevant). - * - * Generated from protobuf field string destination_ip = 4; - * @return string - */ - public function getDestinationIp() - { - return $this->destination_ip; - } - - /** - * Destination IP address of the dropped packet (if relevant). - * - * Generated from protobuf field string destination_ip = 4; - * @param string $var - * @return $this - */ - public function setDestinationIp($var) - { - GPBUtil::checkString($var, True); - $this->destination_ip = $var; - - return $this; - } - - /** - * Region of the dropped packet (if relevant). - * - * Generated from protobuf field string region = 5; - * @return string - */ - public function getRegion() - { - return $this->region; - } - - /** - * Region of the dropped packet (if relevant). - * - * Generated from protobuf field string region = 5; - * @param string $var - * @return $this - */ - public function setRegion($var) - { - GPBUtil::checkString($var, True); - $this->region = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/DropInfo/Cause.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/DropInfo/Cause.php deleted file mode 100644 index 213b40fcbb9a..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/DropInfo/Cause.php +++ /dev/null @@ -1,711 +0,0 @@ -google.cloud.networkmanagement.v1.DropInfo.Cause - */ -class Cause -{ - /** - * Cause is unspecified. - * - * Generated from protobuf enum CAUSE_UNSPECIFIED = 0; - */ - const CAUSE_UNSPECIFIED = 0; - /** - * Destination external address cannot be resolved to a known target. If - * the address is used in a Google Cloud project, provide the project ID - * as test input. - * - * Generated from protobuf enum UNKNOWN_EXTERNAL_ADDRESS = 1; - */ - const UNKNOWN_EXTERNAL_ADDRESS = 1; - /** - * A Compute Engine instance can only send or receive a packet with a - * foreign IP address if ip_forward is enabled. - * - * Generated from protobuf enum FOREIGN_IP_DISALLOWED = 2; - */ - const FOREIGN_IP_DISALLOWED = 2; - /** - * Dropped due to a firewall rule, unless allowed due to connection - * tracking. - * - * Generated from protobuf enum FIREWALL_RULE = 3; - */ - const FIREWALL_RULE = 3; - /** - * Dropped due to no matching routes. - * - * Generated from protobuf enum NO_ROUTE = 4; - */ - const NO_ROUTE = 4; - /** - * Dropped due to invalid route. Route's next hop is a blackhole. - * - * Generated from protobuf enum ROUTE_BLACKHOLE = 5; - */ - const ROUTE_BLACKHOLE = 5; - /** - * Packet is sent to a wrong (unintended) network. Example: you trace a - * packet from VM1:Network1 to VM2:Network2, however, the route configured - * in Network1 sends the packet destined for VM2's IP address to Network3. - * - * Generated from protobuf enum ROUTE_WRONG_NETWORK = 6; - */ - const ROUTE_WRONG_NETWORK = 6; - /** - * Route's next hop IP address cannot be resolved to a GCP resource. - * - * Generated from protobuf enum ROUTE_NEXT_HOP_IP_ADDRESS_NOT_RESOLVED = 42; - */ - const ROUTE_NEXT_HOP_IP_ADDRESS_NOT_RESOLVED = 42; - /** - * Route's next hop resource is not found. - * - * Generated from protobuf enum ROUTE_NEXT_HOP_RESOURCE_NOT_FOUND = 43; - */ - const ROUTE_NEXT_HOP_RESOURCE_NOT_FOUND = 43; - /** - * Route's next hop instance doesn't have a NIC in the route's network. - * - * Generated from protobuf enum ROUTE_NEXT_HOP_INSTANCE_WRONG_NETWORK = 49; - */ - const ROUTE_NEXT_HOP_INSTANCE_WRONG_NETWORK = 49; - /** - * Route's next hop IP address is not a primary IP address of the next hop - * instance. - * - * Generated from protobuf enum ROUTE_NEXT_HOP_INSTANCE_NON_PRIMARY_IP = 50; - */ - const ROUTE_NEXT_HOP_INSTANCE_NON_PRIMARY_IP = 50; - /** - * Route's next hop forwarding rule doesn't match next hop IP address. - * - * Generated from protobuf enum ROUTE_NEXT_HOP_FORWARDING_RULE_IP_MISMATCH = 51; - */ - const ROUTE_NEXT_HOP_FORWARDING_RULE_IP_MISMATCH = 51; - /** - * Route's next hop VPN tunnel is down (does not have valid IKE SAs). - * - * Generated from protobuf enum ROUTE_NEXT_HOP_VPN_TUNNEL_NOT_ESTABLISHED = 52; - */ - const ROUTE_NEXT_HOP_VPN_TUNNEL_NOT_ESTABLISHED = 52; - /** - * Route's next hop forwarding rule type is invalid (it's not a forwarding - * rule of the internal passthrough load balancer). - * - * Generated from protobuf enum ROUTE_NEXT_HOP_FORWARDING_RULE_TYPE_INVALID = 53; - */ - const ROUTE_NEXT_HOP_FORWARDING_RULE_TYPE_INVALID = 53; - /** - * Packet is sent from the Internet to the private IPv6 address. - * - * Generated from protobuf enum NO_ROUTE_FROM_INTERNET_TO_PRIVATE_IPV6_ADDRESS = 44; - */ - const NO_ROUTE_FROM_INTERNET_TO_PRIVATE_IPV6_ADDRESS = 44; - /** - * The packet does not match a policy-based VPN tunnel local selector. - * - * Generated from protobuf enum VPN_TUNNEL_LOCAL_SELECTOR_MISMATCH = 45; - */ - const VPN_TUNNEL_LOCAL_SELECTOR_MISMATCH = 45; - /** - * The packet does not match a policy-based VPN tunnel remote selector. - * - * Generated from protobuf enum VPN_TUNNEL_REMOTE_SELECTOR_MISMATCH = 46; - */ - const VPN_TUNNEL_REMOTE_SELECTOR_MISMATCH = 46; - /** - * Packet with internal destination address sent to the internet gateway. - * - * Generated from protobuf enum PRIVATE_TRAFFIC_TO_INTERNET = 7; - */ - const PRIVATE_TRAFFIC_TO_INTERNET = 7; - /** - * Instance with only an internal IP address tries to access Google API and - * services, but private Google access is not enabled in the subnet. - * - * Generated from protobuf enum PRIVATE_GOOGLE_ACCESS_DISALLOWED = 8; - */ - const PRIVATE_GOOGLE_ACCESS_DISALLOWED = 8; - /** - * Source endpoint tries to access Google API and services through the VPN - * tunnel to another network, but Private Google Access needs to be enabled - * in the source endpoint network. - * - * Generated from protobuf enum PRIVATE_GOOGLE_ACCESS_VIA_VPN_TUNNEL_UNSUPPORTED = 47; - */ - const PRIVATE_GOOGLE_ACCESS_VIA_VPN_TUNNEL_UNSUPPORTED = 47; - /** - * Instance with only an internal IP address tries to access external hosts, - * but Cloud NAT is not enabled in the subnet, unless special configurations - * on a VM allow this connection. - * - * Generated from protobuf enum NO_EXTERNAL_ADDRESS = 9; - */ - const NO_EXTERNAL_ADDRESS = 9; - /** - * Destination internal address cannot be resolved to a known target. If - * this is a shared VPC scenario, verify if the service project ID is - * provided as test input. Otherwise, verify if the IP address is being - * used in the project. - * - * Generated from protobuf enum UNKNOWN_INTERNAL_ADDRESS = 10; - */ - const UNKNOWN_INTERNAL_ADDRESS = 10; - /** - * Forwarding rule's protocol and ports do not match the packet header. - * - * Generated from protobuf enum FORWARDING_RULE_MISMATCH = 11; - */ - const FORWARDING_RULE_MISMATCH = 11; - /** - * Forwarding rule does not have backends configured. - * - * Generated from protobuf enum FORWARDING_RULE_NO_INSTANCES = 12; - */ - const FORWARDING_RULE_NO_INSTANCES = 12; - /** - * Firewalls block the health check probes to the backends and cause - * the backends to be unavailable for traffic from the load balancer. - * For more details, see [Health check firewall - * rules](https://cloud.google.com/load-balancing/docs/health-checks#firewall_rules). - * - * Generated from protobuf enum FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK = 13; - */ - const FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK = 13; - /** - * Packet is sent from or to a Compute Engine instance that is not in a - * running state. - * - * Generated from protobuf enum INSTANCE_NOT_RUNNING = 14; - */ - const INSTANCE_NOT_RUNNING = 14; - /** - * Packet sent from or to a GKE cluster that is not in running state. - * - * Generated from protobuf enum GKE_CLUSTER_NOT_RUNNING = 27; - */ - const GKE_CLUSTER_NOT_RUNNING = 27; - /** - * Packet sent from or to a Cloud SQL instance that is not in running state. - * - * Generated from protobuf enum CLOUD_SQL_INSTANCE_NOT_RUNNING = 28; - */ - const CLOUD_SQL_INSTANCE_NOT_RUNNING = 28; - /** - * Packet sent from or to a Redis Instance that is not in running state. - * - * Generated from protobuf enum REDIS_INSTANCE_NOT_RUNNING = 68; - */ - const REDIS_INSTANCE_NOT_RUNNING = 68; - /** - * Packet sent from or to a Redis Cluster that is not in running state. - * - * Generated from protobuf enum REDIS_CLUSTER_NOT_RUNNING = 69; - */ - const REDIS_CLUSTER_NOT_RUNNING = 69; - /** - * The type of traffic is blocked and the user cannot configure a firewall - * rule to enable it. See [Always blocked - * traffic](https://cloud.google.com/vpc/docs/firewalls#blockedtraffic) for - * more details. - * - * Generated from protobuf enum TRAFFIC_TYPE_BLOCKED = 15; - */ - const TRAFFIC_TYPE_BLOCKED = 15; - /** - * Access to Google Kubernetes Engine cluster master's endpoint is not - * authorized. See [Access to the cluster - * endpoints](https://cloud.google.com/kubernetes-engine/docs/how-to/private-clusters#access_to_the_cluster_endpoints) - * for more details. - * - * Generated from protobuf enum GKE_MASTER_UNAUTHORIZED_ACCESS = 16; - */ - const GKE_MASTER_UNAUTHORIZED_ACCESS = 16; - /** - * Access to the Cloud SQL instance endpoint is not authorized. - * See [Authorizing with authorized - * networks](https://cloud.google.com/sql/docs/mysql/authorize-networks) for - * more details. - * - * Generated from protobuf enum CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS = 17; - */ - const CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS = 17; - /** - * Packet was dropped inside Google Kubernetes Engine Service. - * - * Generated from protobuf enum DROPPED_INSIDE_GKE_SERVICE = 18; - */ - const DROPPED_INSIDE_GKE_SERVICE = 18; - /** - * Packet was dropped inside Cloud SQL Service. - * - * Generated from protobuf enum DROPPED_INSIDE_CLOUD_SQL_SERVICE = 19; - */ - const DROPPED_INSIDE_CLOUD_SQL_SERVICE = 19; - /** - * Packet was dropped because there is no peering between the originating - * network and the Google Managed Services Network. - * - * Generated from protobuf enum GOOGLE_MANAGED_SERVICE_NO_PEERING = 20; - */ - const GOOGLE_MANAGED_SERVICE_NO_PEERING = 20; - /** - * Packet was dropped because the Google-managed service uses Private - * Service Connect (PSC), but the PSC endpoint is not found in the project. - * - * Generated from protobuf enum GOOGLE_MANAGED_SERVICE_NO_PSC_ENDPOINT = 38; - */ - const GOOGLE_MANAGED_SERVICE_NO_PSC_ENDPOINT = 38; - /** - * Packet was dropped because the GKE cluster uses Private Service Connect - * (PSC), but the PSC endpoint is not found in the project. - * - * Generated from protobuf enum GKE_PSC_ENDPOINT_MISSING = 36; - */ - const GKE_PSC_ENDPOINT_MISSING = 36; - /** - * Packet was dropped because the Cloud SQL instance has neither a private - * nor a public IP address. - * - * Generated from protobuf enum CLOUD_SQL_INSTANCE_NO_IP_ADDRESS = 21; - */ - const CLOUD_SQL_INSTANCE_NO_IP_ADDRESS = 21; - /** - * Packet was dropped because a GKE cluster private endpoint is - * unreachable from a region different from the cluster's region. - * - * Generated from protobuf enum GKE_CONTROL_PLANE_REGION_MISMATCH = 30; - */ - const GKE_CONTROL_PLANE_REGION_MISMATCH = 30; - /** - * Packet sent from a public GKE cluster control plane to a private - * IP address. - * - * Generated from protobuf enum PUBLIC_GKE_CONTROL_PLANE_TO_PRIVATE_DESTINATION = 31; - */ - const PUBLIC_GKE_CONTROL_PLANE_TO_PRIVATE_DESTINATION = 31; - /** - * Packet was dropped because there is no route from a GKE cluster - * control plane to a destination network. - * - * Generated from protobuf enum GKE_CONTROL_PLANE_NO_ROUTE = 32; - */ - const GKE_CONTROL_PLANE_NO_ROUTE = 32; - /** - * Packet sent from a Cloud SQL instance to an external IP address is not - * allowed. The Cloud SQL instance is not configured to send packets to - * external IP addresses. - * - * Generated from protobuf enum CLOUD_SQL_INSTANCE_NOT_CONFIGURED_FOR_EXTERNAL_TRAFFIC = 33; - */ - const CLOUD_SQL_INSTANCE_NOT_CONFIGURED_FOR_EXTERNAL_TRAFFIC = 33; - /** - * Packet sent from a Cloud SQL instance with only a public IP address to a - * private IP address. - * - * Generated from protobuf enum PUBLIC_CLOUD_SQL_INSTANCE_TO_PRIVATE_DESTINATION = 34; - */ - const PUBLIC_CLOUD_SQL_INSTANCE_TO_PRIVATE_DESTINATION = 34; - /** - * Packet was dropped because there is no route from a Cloud SQL - * instance to a destination network. - * - * Generated from protobuf enum CLOUD_SQL_INSTANCE_NO_ROUTE = 35; - */ - const CLOUD_SQL_INSTANCE_NO_ROUTE = 35; - /** - * Packet was dropped because the Cloud SQL instance requires all - * connections to use Cloud SQL connectors and to target the Cloud SQL proxy - * port (3307). - * - * Generated from protobuf enum CLOUD_SQL_CONNECTOR_REQUIRED = 63; - */ - const CLOUD_SQL_CONNECTOR_REQUIRED = 63; - /** - * Packet could be dropped because the Cloud Function is not in an active - * status. - * - * Generated from protobuf enum CLOUD_FUNCTION_NOT_ACTIVE = 22; - */ - const CLOUD_FUNCTION_NOT_ACTIVE = 22; - /** - * Packet could be dropped because no VPC connector is set. - * - * Generated from protobuf enum VPC_CONNECTOR_NOT_SET = 23; - */ - const VPC_CONNECTOR_NOT_SET = 23; - /** - * Packet could be dropped because the VPC connector is not in a running - * state. - * - * Generated from protobuf enum VPC_CONNECTOR_NOT_RUNNING = 24; - */ - const VPC_CONNECTOR_NOT_RUNNING = 24; - /** - * Packet could be dropped because the traffic from the serverless service - * to the VPC connector is not allowed. - * - * Generated from protobuf enum VPC_CONNECTOR_SERVERLESS_TRAFFIC_BLOCKED = 60; - */ - const VPC_CONNECTOR_SERVERLESS_TRAFFIC_BLOCKED = 60; - /** - * Packet could be dropped because the health check traffic to the VPC - * connector is not allowed. - * - * Generated from protobuf enum VPC_CONNECTOR_HEALTH_CHECK_TRAFFIC_BLOCKED = 61; - */ - const VPC_CONNECTOR_HEALTH_CHECK_TRAFFIC_BLOCKED = 61; - /** - * Packet could be dropped because it was sent from a different region - * to a regional forwarding without global access. - * - * Generated from protobuf enum FORWARDING_RULE_REGION_MISMATCH = 25; - */ - const FORWARDING_RULE_REGION_MISMATCH = 25; - /** - * The Private Service Connect endpoint is in a project that is not approved - * to connect to the service. - * - * Generated from protobuf enum PSC_CONNECTION_NOT_ACCEPTED = 26; - */ - const PSC_CONNECTION_NOT_ACCEPTED = 26; - /** - * The packet is sent to the Private Service Connect endpoint over the - * peering, but [it's not - * supported](https://cloud.google.com/vpc/docs/configure-private-service-connect-services#on-premises). - * - * Generated from protobuf enum PSC_ENDPOINT_ACCESSED_FROM_PEERED_NETWORK = 41; - */ - const PSC_ENDPOINT_ACCESSED_FROM_PEERED_NETWORK = 41; - /** - * The packet is sent to the Private Service Connect backend (network - * endpoint group), but the producer PSC forwarding rule does not have - * global access enabled. - * - * Generated from protobuf enum PSC_NEG_PRODUCER_ENDPOINT_NO_GLOBAL_ACCESS = 48; - */ - const PSC_NEG_PRODUCER_ENDPOINT_NO_GLOBAL_ACCESS = 48; - /** - * The packet is sent to the Private Service Connect backend (network - * endpoint group), but the producer PSC forwarding rule has multiple ports - * specified. - * - * Generated from protobuf enum PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS = 54; - */ - const PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS = 54; - /** - * The packet is sent to the Private Service Connect backend (network - * endpoint group) targeting a Cloud SQL service attachment, but this - * configuration is not supported. - * - * Generated from protobuf enum CLOUD_SQL_PSC_NEG_UNSUPPORTED = 58; - */ - const CLOUD_SQL_PSC_NEG_UNSUPPORTED = 58; - /** - * No NAT subnets are defined for the PSC service attachment. - * - * Generated from protobuf enum NO_NAT_SUBNETS_FOR_PSC_SERVICE_ATTACHMENT = 57; - */ - const NO_NAT_SUBNETS_FOR_PSC_SERVICE_ATTACHMENT = 57; - /** - * PSC endpoint is accessed via NCC, but PSC transitivity configuration is - * not yet propagated. - * - * Generated from protobuf enum PSC_TRANSITIVITY_NOT_PROPAGATED = 64; - */ - const PSC_TRANSITIVITY_NOT_PROPAGATED = 64; - /** - * The packet sent from the hybrid NEG proxy matches a non-dynamic route, - * but such a configuration is not supported. - * - * Generated from protobuf enum HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED = 55; - */ - const HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED = 55; - /** - * The packet sent from the hybrid NEG proxy matches a dynamic route with a - * next hop in a different region, but such a configuration is not - * supported. - * - * Generated from protobuf enum HYBRID_NEG_NON_LOCAL_DYNAMIC_ROUTE_MATCHED = 56; - */ - const HYBRID_NEG_NON_LOCAL_DYNAMIC_ROUTE_MATCHED = 56; - /** - * Packet sent from a Cloud Run revision that is not ready. - * - * Generated from protobuf enum CLOUD_RUN_REVISION_NOT_READY = 29; - */ - const CLOUD_RUN_REVISION_NOT_READY = 29; - /** - * Packet was dropped inside Private Service Connect service producer. - * - * Generated from protobuf enum DROPPED_INSIDE_PSC_SERVICE_PRODUCER = 37; - */ - const DROPPED_INSIDE_PSC_SERVICE_PRODUCER = 37; - /** - * Packet sent to a load balancer, which requires a proxy-only subnet and - * the subnet is not found. - * - * Generated from protobuf enum LOAD_BALANCER_HAS_NO_PROXY_SUBNET = 39; - */ - const LOAD_BALANCER_HAS_NO_PROXY_SUBNET = 39; - /** - * Packet sent to Cloud Nat without active NAT IPs. - * - * Generated from protobuf enum CLOUD_NAT_NO_ADDRESSES = 40; - */ - const CLOUD_NAT_NO_ADDRESSES = 40; - /** - * Packet is stuck in a routing loop. - * - * Generated from protobuf enum ROUTING_LOOP = 59; - */ - const ROUTING_LOOP = 59; - /** - * Packet is dropped inside a Google-managed service due to being delivered - * in return trace to an endpoint that doesn't match the endpoint the packet - * was sent from in forward trace. Used only for return traces. - * - * Generated from protobuf enum DROPPED_INSIDE_GOOGLE_MANAGED_SERVICE = 62; - */ - const DROPPED_INSIDE_GOOGLE_MANAGED_SERVICE = 62; - /** - * Packet is dropped due to a load balancer backend instance not having a - * network interface in the network expected by the load balancer. - * - * Generated from protobuf enum LOAD_BALANCER_BACKEND_INVALID_NETWORK = 65; - */ - const LOAD_BALANCER_BACKEND_INVALID_NETWORK = 65; - /** - * Packet is dropped due to a backend service named port not being defined - * on the instance group level. - * - * Generated from protobuf enum BACKEND_SERVICE_NAMED_PORT_NOT_DEFINED = 66; - */ - const BACKEND_SERVICE_NAMED_PORT_NOT_DEFINED = 66; - /** - * Packet is dropped due to a destination IP range being part of a Private - * NAT IP range. - * - * Generated from protobuf enum DESTINATION_IS_PRIVATE_NAT_IP_RANGE = 67; - */ - const DESTINATION_IS_PRIVATE_NAT_IP_RANGE = 67; - /** - * Generic drop cause for a packet being dropped inside a Redis Instance - * service project. - * - * Generated from protobuf enum DROPPED_INSIDE_REDIS_INSTANCE_SERVICE = 70; - */ - const DROPPED_INSIDE_REDIS_INSTANCE_SERVICE = 70; - /** - * Packet is dropped due to an unsupported port being used to connect to a - * Redis Instance. Port 6379 should be used to connect to a Redis Instance. - * - * Generated from protobuf enum REDIS_INSTANCE_UNSUPPORTED_PORT = 71; - */ - const REDIS_INSTANCE_UNSUPPORTED_PORT = 71; - /** - * Packet is dropped due to connecting from PUPI address to a PSA based - * Redis Instance. - * - * Generated from protobuf enum REDIS_INSTANCE_CONNECTING_FROM_PUPI_ADDRESS = 72; - */ - const REDIS_INSTANCE_CONNECTING_FROM_PUPI_ADDRESS = 72; - /** - * Packet is dropped due to no route to the destination network. - * - * Generated from protobuf enum REDIS_INSTANCE_NO_ROUTE_TO_DESTINATION_NETWORK = 73; - */ - const REDIS_INSTANCE_NO_ROUTE_TO_DESTINATION_NETWORK = 73; - /** - * Redis Instance does not have an external IP address. - * - * Generated from protobuf enum REDIS_INSTANCE_NO_EXTERNAL_IP = 74; - */ - const REDIS_INSTANCE_NO_EXTERNAL_IP = 74; - /** - * Packet is dropped due to an unsupported protocol being used to connect to - * a Redis Instance. Only TCP connections are accepted by a Redis Instance. - * - * Generated from protobuf enum REDIS_INSTANCE_UNSUPPORTED_PROTOCOL = 78; - */ - const REDIS_INSTANCE_UNSUPPORTED_PROTOCOL = 78; - /** - * Generic drop cause for a packet being dropped inside a Redis Cluster - * service project. - * - * Generated from protobuf enum DROPPED_INSIDE_REDIS_CLUSTER_SERVICE = 75; - */ - const DROPPED_INSIDE_REDIS_CLUSTER_SERVICE = 75; - /** - * Packet is dropped due to an unsupported port being used to connect to a - * Redis Cluster. Ports 6379 and 11000 to 13047 should be used to connect to - * a Redis Cluster. - * - * Generated from protobuf enum REDIS_CLUSTER_UNSUPPORTED_PORT = 76; - */ - const REDIS_CLUSTER_UNSUPPORTED_PORT = 76; - /** - * Redis Cluster does not have an external IP address. - * - * Generated from protobuf enum REDIS_CLUSTER_NO_EXTERNAL_IP = 77; - */ - const REDIS_CLUSTER_NO_EXTERNAL_IP = 77; - /** - * Packet is dropped due to an unsupported protocol being used to connect to - * a Redis Cluster. Only TCP connections are accepted by a Redis Cluster. - * - * Generated from protobuf enum REDIS_CLUSTER_UNSUPPORTED_PROTOCOL = 79; - */ - const REDIS_CLUSTER_UNSUPPORTED_PROTOCOL = 79; - /** - * Packet from the non-GCP (on-prem) or unknown GCP network is dropped due - * to the destination IP address not belonging to any IP prefix advertised - * via BGP by the Cloud Router. - * - * Generated from protobuf enum NO_ADVERTISED_ROUTE_TO_GCP_DESTINATION = 80; - */ - const NO_ADVERTISED_ROUTE_TO_GCP_DESTINATION = 80; - /** - * Packet from the non-GCP (on-prem) or unknown GCP network is dropped due - * to the destination IP address not belonging to any IP prefix included to - * the local traffic selector of the VPN tunnel. - * - * Generated from protobuf enum NO_TRAFFIC_SELECTOR_TO_GCP_DESTINATION = 81; - */ - const NO_TRAFFIC_SELECTOR_TO_GCP_DESTINATION = 81; - /** - * Packet from the unknown peered network is dropped due to no known route - * from the source network to the destination IP address. - * - * Generated from protobuf enum NO_KNOWN_ROUTE_FROM_PEERED_NETWORK_TO_DESTINATION = 82; - */ - const NO_KNOWN_ROUTE_FROM_PEERED_NETWORK_TO_DESTINATION = 82; - /** - * Sending packets processed by the Private NAT Gateways to the Private - * Service Connect endpoints is not supported. - * - * Generated from protobuf enum PRIVATE_NAT_TO_PSC_ENDPOINT_UNSUPPORTED = 83; - */ - const PRIVATE_NAT_TO_PSC_ENDPOINT_UNSUPPORTED = 83; - - private static $valueToName = [ - self::CAUSE_UNSPECIFIED => 'CAUSE_UNSPECIFIED', - self::UNKNOWN_EXTERNAL_ADDRESS => 'UNKNOWN_EXTERNAL_ADDRESS', - self::FOREIGN_IP_DISALLOWED => 'FOREIGN_IP_DISALLOWED', - self::FIREWALL_RULE => 'FIREWALL_RULE', - self::NO_ROUTE => 'NO_ROUTE', - self::ROUTE_BLACKHOLE => 'ROUTE_BLACKHOLE', - self::ROUTE_WRONG_NETWORK => 'ROUTE_WRONG_NETWORK', - self::ROUTE_NEXT_HOP_IP_ADDRESS_NOT_RESOLVED => 'ROUTE_NEXT_HOP_IP_ADDRESS_NOT_RESOLVED', - self::ROUTE_NEXT_HOP_RESOURCE_NOT_FOUND => 'ROUTE_NEXT_HOP_RESOURCE_NOT_FOUND', - self::ROUTE_NEXT_HOP_INSTANCE_WRONG_NETWORK => 'ROUTE_NEXT_HOP_INSTANCE_WRONG_NETWORK', - self::ROUTE_NEXT_HOP_INSTANCE_NON_PRIMARY_IP => 'ROUTE_NEXT_HOP_INSTANCE_NON_PRIMARY_IP', - self::ROUTE_NEXT_HOP_FORWARDING_RULE_IP_MISMATCH => 'ROUTE_NEXT_HOP_FORWARDING_RULE_IP_MISMATCH', - self::ROUTE_NEXT_HOP_VPN_TUNNEL_NOT_ESTABLISHED => 'ROUTE_NEXT_HOP_VPN_TUNNEL_NOT_ESTABLISHED', - self::ROUTE_NEXT_HOP_FORWARDING_RULE_TYPE_INVALID => 'ROUTE_NEXT_HOP_FORWARDING_RULE_TYPE_INVALID', - self::NO_ROUTE_FROM_INTERNET_TO_PRIVATE_IPV6_ADDRESS => 'NO_ROUTE_FROM_INTERNET_TO_PRIVATE_IPV6_ADDRESS', - self::VPN_TUNNEL_LOCAL_SELECTOR_MISMATCH => 'VPN_TUNNEL_LOCAL_SELECTOR_MISMATCH', - self::VPN_TUNNEL_REMOTE_SELECTOR_MISMATCH => 'VPN_TUNNEL_REMOTE_SELECTOR_MISMATCH', - self::PRIVATE_TRAFFIC_TO_INTERNET => 'PRIVATE_TRAFFIC_TO_INTERNET', - self::PRIVATE_GOOGLE_ACCESS_DISALLOWED => 'PRIVATE_GOOGLE_ACCESS_DISALLOWED', - self::PRIVATE_GOOGLE_ACCESS_VIA_VPN_TUNNEL_UNSUPPORTED => 'PRIVATE_GOOGLE_ACCESS_VIA_VPN_TUNNEL_UNSUPPORTED', - self::NO_EXTERNAL_ADDRESS => 'NO_EXTERNAL_ADDRESS', - self::UNKNOWN_INTERNAL_ADDRESS => 'UNKNOWN_INTERNAL_ADDRESS', - self::FORWARDING_RULE_MISMATCH => 'FORWARDING_RULE_MISMATCH', - self::FORWARDING_RULE_NO_INSTANCES => 'FORWARDING_RULE_NO_INSTANCES', - self::FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK => 'FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK', - self::INSTANCE_NOT_RUNNING => 'INSTANCE_NOT_RUNNING', - self::GKE_CLUSTER_NOT_RUNNING => 'GKE_CLUSTER_NOT_RUNNING', - self::CLOUD_SQL_INSTANCE_NOT_RUNNING => 'CLOUD_SQL_INSTANCE_NOT_RUNNING', - self::REDIS_INSTANCE_NOT_RUNNING => 'REDIS_INSTANCE_NOT_RUNNING', - self::REDIS_CLUSTER_NOT_RUNNING => 'REDIS_CLUSTER_NOT_RUNNING', - self::TRAFFIC_TYPE_BLOCKED => 'TRAFFIC_TYPE_BLOCKED', - self::GKE_MASTER_UNAUTHORIZED_ACCESS => 'GKE_MASTER_UNAUTHORIZED_ACCESS', - self::CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS => 'CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS', - self::DROPPED_INSIDE_GKE_SERVICE => 'DROPPED_INSIDE_GKE_SERVICE', - self::DROPPED_INSIDE_CLOUD_SQL_SERVICE => 'DROPPED_INSIDE_CLOUD_SQL_SERVICE', - self::GOOGLE_MANAGED_SERVICE_NO_PEERING => 'GOOGLE_MANAGED_SERVICE_NO_PEERING', - self::GOOGLE_MANAGED_SERVICE_NO_PSC_ENDPOINT => 'GOOGLE_MANAGED_SERVICE_NO_PSC_ENDPOINT', - self::GKE_PSC_ENDPOINT_MISSING => 'GKE_PSC_ENDPOINT_MISSING', - self::CLOUD_SQL_INSTANCE_NO_IP_ADDRESS => 'CLOUD_SQL_INSTANCE_NO_IP_ADDRESS', - self::GKE_CONTROL_PLANE_REGION_MISMATCH => 'GKE_CONTROL_PLANE_REGION_MISMATCH', - self::PUBLIC_GKE_CONTROL_PLANE_TO_PRIVATE_DESTINATION => 'PUBLIC_GKE_CONTROL_PLANE_TO_PRIVATE_DESTINATION', - self::GKE_CONTROL_PLANE_NO_ROUTE => 'GKE_CONTROL_PLANE_NO_ROUTE', - self::CLOUD_SQL_INSTANCE_NOT_CONFIGURED_FOR_EXTERNAL_TRAFFIC => 'CLOUD_SQL_INSTANCE_NOT_CONFIGURED_FOR_EXTERNAL_TRAFFIC', - self::PUBLIC_CLOUD_SQL_INSTANCE_TO_PRIVATE_DESTINATION => 'PUBLIC_CLOUD_SQL_INSTANCE_TO_PRIVATE_DESTINATION', - self::CLOUD_SQL_INSTANCE_NO_ROUTE => 'CLOUD_SQL_INSTANCE_NO_ROUTE', - self::CLOUD_SQL_CONNECTOR_REQUIRED => 'CLOUD_SQL_CONNECTOR_REQUIRED', - self::CLOUD_FUNCTION_NOT_ACTIVE => 'CLOUD_FUNCTION_NOT_ACTIVE', - self::VPC_CONNECTOR_NOT_SET => 'VPC_CONNECTOR_NOT_SET', - self::VPC_CONNECTOR_NOT_RUNNING => 'VPC_CONNECTOR_NOT_RUNNING', - self::VPC_CONNECTOR_SERVERLESS_TRAFFIC_BLOCKED => 'VPC_CONNECTOR_SERVERLESS_TRAFFIC_BLOCKED', - self::VPC_CONNECTOR_HEALTH_CHECK_TRAFFIC_BLOCKED => 'VPC_CONNECTOR_HEALTH_CHECK_TRAFFIC_BLOCKED', - self::FORWARDING_RULE_REGION_MISMATCH => 'FORWARDING_RULE_REGION_MISMATCH', - self::PSC_CONNECTION_NOT_ACCEPTED => 'PSC_CONNECTION_NOT_ACCEPTED', - self::PSC_ENDPOINT_ACCESSED_FROM_PEERED_NETWORK => 'PSC_ENDPOINT_ACCESSED_FROM_PEERED_NETWORK', - self::PSC_NEG_PRODUCER_ENDPOINT_NO_GLOBAL_ACCESS => 'PSC_NEG_PRODUCER_ENDPOINT_NO_GLOBAL_ACCESS', - self::PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS => 'PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS', - self::CLOUD_SQL_PSC_NEG_UNSUPPORTED => 'CLOUD_SQL_PSC_NEG_UNSUPPORTED', - self::NO_NAT_SUBNETS_FOR_PSC_SERVICE_ATTACHMENT => 'NO_NAT_SUBNETS_FOR_PSC_SERVICE_ATTACHMENT', - self::PSC_TRANSITIVITY_NOT_PROPAGATED => 'PSC_TRANSITIVITY_NOT_PROPAGATED', - self::HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED => 'HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED', - self::HYBRID_NEG_NON_LOCAL_DYNAMIC_ROUTE_MATCHED => 'HYBRID_NEG_NON_LOCAL_DYNAMIC_ROUTE_MATCHED', - self::CLOUD_RUN_REVISION_NOT_READY => 'CLOUD_RUN_REVISION_NOT_READY', - self::DROPPED_INSIDE_PSC_SERVICE_PRODUCER => 'DROPPED_INSIDE_PSC_SERVICE_PRODUCER', - self::LOAD_BALANCER_HAS_NO_PROXY_SUBNET => 'LOAD_BALANCER_HAS_NO_PROXY_SUBNET', - self::CLOUD_NAT_NO_ADDRESSES => 'CLOUD_NAT_NO_ADDRESSES', - self::ROUTING_LOOP => 'ROUTING_LOOP', - self::DROPPED_INSIDE_GOOGLE_MANAGED_SERVICE => 'DROPPED_INSIDE_GOOGLE_MANAGED_SERVICE', - self::LOAD_BALANCER_BACKEND_INVALID_NETWORK => 'LOAD_BALANCER_BACKEND_INVALID_NETWORK', - self::BACKEND_SERVICE_NAMED_PORT_NOT_DEFINED => 'BACKEND_SERVICE_NAMED_PORT_NOT_DEFINED', - self::DESTINATION_IS_PRIVATE_NAT_IP_RANGE => 'DESTINATION_IS_PRIVATE_NAT_IP_RANGE', - self::DROPPED_INSIDE_REDIS_INSTANCE_SERVICE => 'DROPPED_INSIDE_REDIS_INSTANCE_SERVICE', - self::REDIS_INSTANCE_UNSUPPORTED_PORT => 'REDIS_INSTANCE_UNSUPPORTED_PORT', - self::REDIS_INSTANCE_CONNECTING_FROM_PUPI_ADDRESS => 'REDIS_INSTANCE_CONNECTING_FROM_PUPI_ADDRESS', - self::REDIS_INSTANCE_NO_ROUTE_TO_DESTINATION_NETWORK => 'REDIS_INSTANCE_NO_ROUTE_TO_DESTINATION_NETWORK', - self::REDIS_INSTANCE_NO_EXTERNAL_IP => 'REDIS_INSTANCE_NO_EXTERNAL_IP', - self::REDIS_INSTANCE_UNSUPPORTED_PROTOCOL => 'REDIS_INSTANCE_UNSUPPORTED_PROTOCOL', - self::DROPPED_INSIDE_REDIS_CLUSTER_SERVICE => 'DROPPED_INSIDE_REDIS_CLUSTER_SERVICE', - self::REDIS_CLUSTER_UNSUPPORTED_PORT => 'REDIS_CLUSTER_UNSUPPORTED_PORT', - self::REDIS_CLUSTER_NO_EXTERNAL_IP => 'REDIS_CLUSTER_NO_EXTERNAL_IP', - self::REDIS_CLUSTER_UNSUPPORTED_PROTOCOL => 'REDIS_CLUSTER_UNSUPPORTED_PROTOCOL', - self::NO_ADVERTISED_ROUTE_TO_GCP_DESTINATION => 'NO_ADVERTISED_ROUTE_TO_GCP_DESTINATION', - self::NO_TRAFFIC_SELECTOR_TO_GCP_DESTINATION => 'NO_TRAFFIC_SELECTOR_TO_GCP_DESTINATION', - self::NO_KNOWN_ROUTE_FROM_PEERED_NETWORK_TO_DESTINATION => 'NO_KNOWN_ROUTE_FROM_PEERED_NETWORK_TO_DESTINATION', - self::PRIVATE_NAT_TO_PSC_ENDPOINT_UNSUPPORTED => 'PRIVATE_NAT_TO_PSC_ENDPOINT_UNSUPPORTED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Cause::class, \Google\Cloud\NetworkManagement\V1\DropInfo_Cause::class); - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Endpoint.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Endpoint.php deleted file mode 100644 index eea02063830d..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Endpoint.php +++ /dev/null @@ -1,805 +0,0 @@ -google.cloud.networkmanagement.v1.Endpoint - */ -class Endpoint extends \Google\Protobuf\Internal\Message -{ - /** - * The IP address of the endpoint, which can be an external or internal IP. - * - * Generated from protobuf field string ip_address = 1; - */ - protected $ip_address = ''; - /** - * The IP protocol port of the endpoint. - * Only applicable when protocol is TCP or UDP. - * - * Generated from protobuf field int32 port = 2; - */ - protected $port = 0; - /** - * A Compute Engine instance URI. - * - * Generated from protobuf field string instance = 3; - */ - protected $instance = ''; - /** - * A forwarding rule and its corresponding IP address represent the frontend - * configuration of a Google Cloud load balancer. Forwarding rules are also - * used for protocol forwarding, Private Service Connect and other network - * services to provide forwarding information in the control plane. Format: - * projects/{project}/global/forwardingRules/{id} or - * projects/{project}/regions/{region}/forwardingRules/{id} - * - * Generated from protobuf field string forwarding_rule = 13; - */ - protected $forwarding_rule = ''; - /** - * Output only. Specifies the type of the target of the forwarding rule. - * - * Generated from protobuf field optional .google.cloud.networkmanagement.v1.Endpoint.ForwardingRuleTarget forwarding_rule_target = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $forwarding_rule_target = null; - /** - * Output only. ID of the load balancer the forwarding rule points to. Empty - * for forwarding rules not related to load balancers. - * - * Generated from protobuf field optional string load_balancer_id = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $load_balancer_id = null; - /** - * Output only. Type of the load balancer the forwarding rule points to. - * - * Generated from protobuf field optional .google.cloud.networkmanagement.v1.LoadBalancerType load_balancer_type = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $load_balancer_type = null; - /** - * A cluster URI for [Google Kubernetes Engine cluster control - * plane](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture). - * - * Generated from protobuf field string gke_master_cluster = 7; - */ - protected $gke_master_cluster = ''; - /** - * DNS endpoint of [Google Kubernetes Engine cluster control - * plane](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture). - * Requires gke_master_cluster to be set, can't be used simultaneoulsly with - * ip_address or network. Applicable only to destination endpoint. - * - * Generated from protobuf field string fqdn = 19; - */ - protected $fqdn = ''; - /** - * A [Cloud SQL](https://cloud.google.com/sql) instance URI. - * - * Generated from protobuf field string cloud_sql_instance = 8; - */ - protected $cloud_sql_instance = ''; - /** - * A [Redis Instance](https://cloud.google.com/memorystore/docs/redis) - * URI. - * - * Generated from protobuf field string redis_instance = 17; - */ - protected $redis_instance = ''; - /** - * A [Redis Cluster](https://cloud.google.com/memorystore/docs/cluster) - * URI. - * - * Generated from protobuf field string redis_cluster = 18; - */ - protected $redis_cluster = ''; - /** - * A [Cloud Function](https://cloud.google.com/functions). - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint cloud_function = 10; - */ - protected $cloud_function = null; - /** - * An [App Engine](https://cloud.google.com/appengine) [service - * version](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions). - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint app_engine_version = 11; - */ - protected $app_engine_version = null; - /** - * A [Cloud Run](https://cloud.google.com/run) - * [revision](https://cloud.google.com/run/docs/reference/rest/v1/namespaces.revisions/get) - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint cloud_run_revision = 12; - */ - protected $cloud_run_revision = null; - /** - * A Compute Engine network URI. - * - * Generated from protobuf field string network = 4; - */ - protected $network = ''; - /** - * Type of the network where the endpoint is located. - * Applicable only to source endpoint, as destination network type can be - * inferred from the source. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.Endpoint.NetworkType network_type = 5; - */ - protected $network_type = 0; - /** - * Project ID where the endpoint is located. - * The Project ID can be derived from the URI if you provide a VM instance or - * network URI. - * The following are two cases where you must provide the project ID: - * 1. Only the IP address is specified, and the IP address is within a Google - * Cloud project. - * 2. When you are using Shared VPC and the IP address that you provide is - * from the service project. In this case, the network that the IP address - * resides in is defined in the host project. - * - * Generated from protobuf field string project_id = 6; - */ - protected $project_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $ip_address - * The IP address of the endpoint, which can be an external or internal IP. - * @type int $port - * The IP protocol port of the endpoint. - * Only applicable when protocol is TCP or UDP. - * @type string $instance - * A Compute Engine instance URI. - * @type string $forwarding_rule - * A forwarding rule and its corresponding IP address represent the frontend - * configuration of a Google Cloud load balancer. Forwarding rules are also - * used for protocol forwarding, Private Service Connect and other network - * services to provide forwarding information in the control plane. Format: - * projects/{project}/global/forwardingRules/{id} or - * projects/{project}/regions/{region}/forwardingRules/{id} - * @type int $forwarding_rule_target - * Output only. Specifies the type of the target of the forwarding rule. - * @type string $load_balancer_id - * Output only. ID of the load balancer the forwarding rule points to. Empty - * for forwarding rules not related to load balancers. - * @type int $load_balancer_type - * Output only. Type of the load balancer the forwarding rule points to. - * @type string $gke_master_cluster - * A cluster URI for [Google Kubernetes Engine cluster control - * plane](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture). - * @type string $fqdn - * DNS endpoint of [Google Kubernetes Engine cluster control - * plane](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture). - * Requires gke_master_cluster to be set, can't be used simultaneoulsly with - * ip_address or network. Applicable only to destination endpoint. - * @type string $cloud_sql_instance - * A [Cloud SQL](https://cloud.google.com/sql) instance URI. - * @type string $redis_instance - * A [Redis Instance](https://cloud.google.com/memorystore/docs/redis) - * URI. - * @type string $redis_cluster - * A [Redis Cluster](https://cloud.google.com/memorystore/docs/cluster) - * URI. - * @type \Google\Cloud\NetworkManagement\V1\Endpoint\CloudFunctionEndpoint $cloud_function - * A [Cloud Function](https://cloud.google.com/functions). - * @type \Google\Cloud\NetworkManagement\V1\Endpoint\AppEngineVersionEndpoint $app_engine_version - * An [App Engine](https://cloud.google.com/appengine) [service - * version](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions). - * @type \Google\Cloud\NetworkManagement\V1\Endpoint\CloudRunRevisionEndpoint $cloud_run_revision - * A [Cloud Run](https://cloud.google.com/run) - * [revision](https://cloud.google.com/run/docs/reference/rest/v1/namespaces.revisions/get) - * @type string $network - * A Compute Engine network URI. - * @type int $network_type - * Type of the network where the endpoint is located. - * Applicable only to source endpoint, as destination network type can be - * inferred from the source. - * @type string $project_id - * Project ID where the endpoint is located. - * The Project ID can be derived from the URI if you provide a VM instance or - * network URI. - * The following are two cases where you must provide the project ID: - * 1. Only the IP address is specified, and the IP address is within a Google - * Cloud project. - * 2. When you are using Shared VPC and the IP address that you provide is - * from the service project. In this case, the network that the IP address - * resides in is defined in the host project. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkmanagement\V1\ConnectivityTest::initOnce(); - parent::__construct($data); - } - - /** - * The IP address of the endpoint, which can be an external or internal IP. - * - * Generated from protobuf field string ip_address = 1; - * @return string - */ - public function getIpAddress() - { - return $this->ip_address; - } - - /** - * The IP address of the endpoint, which can be an external or internal IP. - * - * Generated from protobuf field string ip_address = 1; - * @param string $var - * @return $this - */ - public function setIpAddress($var) - { - GPBUtil::checkString($var, True); - $this->ip_address = $var; - - return $this; - } - - /** - * The IP protocol port of the endpoint. - * Only applicable when protocol is TCP or UDP. - * - * Generated from protobuf field int32 port = 2; - * @return int - */ - public function getPort() - { - return $this->port; - } - - /** - * The IP protocol port of the endpoint. - * Only applicable when protocol is TCP or UDP. - * - * Generated from protobuf field int32 port = 2; - * @param int $var - * @return $this - */ - public function setPort($var) - { - GPBUtil::checkInt32($var); - $this->port = $var; - - return $this; - } - - /** - * A Compute Engine instance URI. - * - * Generated from protobuf field string instance = 3; - * @return string - */ - public function getInstance() - { - return $this->instance; - } - - /** - * A Compute Engine instance URI. - * - * Generated from protobuf field string instance = 3; - * @param string $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkString($var, True); - $this->instance = $var; - - return $this; - } - - /** - * A forwarding rule and its corresponding IP address represent the frontend - * configuration of a Google Cloud load balancer. Forwarding rules are also - * used for protocol forwarding, Private Service Connect and other network - * services to provide forwarding information in the control plane. Format: - * projects/{project}/global/forwardingRules/{id} or - * projects/{project}/regions/{region}/forwardingRules/{id} - * - * Generated from protobuf field string forwarding_rule = 13; - * @return string - */ - public function getForwardingRule() - { - return $this->forwarding_rule; - } - - /** - * A forwarding rule and its corresponding IP address represent the frontend - * configuration of a Google Cloud load balancer. Forwarding rules are also - * used for protocol forwarding, Private Service Connect and other network - * services to provide forwarding information in the control plane. Format: - * projects/{project}/global/forwardingRules/{id} or - * projects/{project}/regions/{region}/forwardingRules/{id} - * - * Generated from protobuf field string forwarding_rule = 13; - * @param string $var - * @return $this - */ - public function setForwardingRule($var) - { - GPBUtil::checkString($var, True); - $this->forwarding_rule = $var; - - return $this; - } - - /** - * Output only. Specifies the type of the target of the forwarding rule. - * - * Generated from protobuf field optional .google.cloud.networkmanagement.v1.Endpoint.ForwardingRuleTarget forwarding_rule_target = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getForwardingRuleTarget() - { - return isset($this->forwarding_rule_target) ? $this->forwarding_rule_target : 0; - } - - public function hasForwardingRuleTarget() - { - return isset($this->forwarding_rule_target); - } - - public function clearForwardingRuleTarget() - { - unset($this->forwarding_rule_target); - } - - /** - * Output only. Specifies the type of the target of the forwarding rule. - * - * Generated from protobuf field optional .google.cloud.networkmanagement.v1.Endpoint.ForwardingRuleTarget forwarding_rule_target = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setForwardingRuleTarget($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\NetworkManagement\V1\Endpoint\ForwardingRuleTarget::class); - $this->forwarding_rule_target = $var; - - return $this; - } - - /** - * Output only. ID of the load balancer the forwarding rule points to. Empty - * for forwarding rules not related to load balancers. - * - * Generated from protobuf field optional string load_balancer_id = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getLoadBalancerId() - { - return isset($this->load_balancer_id) ? $this->load_balancer_id : ''; - } - - public function hasLoadBalancerId() - { - return isset($this->load_balancer_id); - } - - public function clearLoadBalancerId() - { - unset($this->load_balancer_id); - } - - /** - * Output only. ID of the load balancer the forwarding rule points to. Empty - * for forwarding rules not related to load balancers. - * - * Generated from protobuf field optional string load_balancer_id = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setLoadBalancerId($var) - { - GPBUtil::checkString($var, True); - $this->load_balancer_id = $var; - - return $this; - } - - /** - * Output only. Type of the load balancer the forwarding rule points to. - * - * Generated from protobuf field optional .google.cloud.networkmanagement.v1.LoadBalancerType load_balancer_type = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getLoadBalancerType() - { - return isset($this->load_balancer_type) ? $this->load_balancer_type : 0; - } - - public function hasLoadBalancerType() - { - return isset($this->load_balancer_type); - } - - public function clearLoadBalancerType() - { - unset($this->load_balancer_type); - } - - /** - * Output only. Type of the load balancer the forwarding rule points to. - * - * Generated from protobuf field optional .google.cloud.networkmanagement.v1.LoadBalancerType load_balancer_type = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setLoadBalancerType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\NetworkManagement\V1\LoadBalancerType::class); - $this->load_balancer_type = $var; - - return $this; - } - - /** - * A cluster URI for [Google Kubernetes Engine cluster control - * plane](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture). - * - * Generated from protobuf field string gke_master_cluster = 7; - * @return string - */ - public function getGkeMasterCluster() - { - return $this->gke_master_cluster; - } - - /** - * A cluster URI for [Google Kubernetes Engine cluster control - * plane](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture). - * - * Generated from protobuf field string gke_master_cluster = 7; - * @param string $var - * @return $this - */ - public function setGkeMasterCluster($var) - { - GPBUtil::checkString($var, True); - $this->gke_master_cluster = $var; - - return $this; - } - - /** - * DNS endpoint of [Google Kubernetes Engine cluster control - * plane](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture). - * Requires gke_master_cluster to be set, can't be used simultaneoulsly with - * ip_address or network. Applicable only to destination endpoint. - * - * Generated from protobuf field string fqdn = 19; - * @return string - */ - public function getFqdn() - { - return $this->fqdn; - } - - /** - * DNS endpoint of [Google Kubernetes Engine cluster control - * plane](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture). - * Requires gke_master_cluster to be set, can't be used simultaneoulsly with - * ip_address or network. Applicable only to destination endpoint. - * - * Generated from protobuf field string fqdn = 19; - * @param string $var - * @return $this - */ - public function setFqdn($var) - { - GPBUtil::checkString($var, True); - $this->fqdn = $var; - - return $this; - } - - /** - * A [Cloud SQL](https://cloud.google.com/sql) instance URI. - * - * Generated from protobuf field string cloud_sql_instance = 8; - * @return string - */ - public function getCloudSqlInstance() - { - return $this->cloud_sql_instance; - } - - /** - * A [Cloud SQL](https://cloud.google.com/sql) instance URI. - * - * Generated from protobuf field string cloud_sql_instance = 8; - * @param string $var - * @return $this - */ - public function setCloudSqlInstance($var) - { - GPBUtil::checkString($var, True); - $this->cloud_sql_instance = $var; - - return $this; - } - - /** - * A [Redis Instance](https://cloud.google.com/memorystore/docs/redis) - * URI. - * - * Generated from protobuf field string redis_instance = 17; - * @return string - */ - public function getRedisInstance() - { - return $this->redis_instance; - } - - /** - * A [Redis Instance](https://cloud.google.com/memorystore/docs/redis) - * URI. - * - * Generated from protobuf field string redis_instance = 17; - * @param string $var - * @return $this - */ - public function setRedisInstance($var) - { - GPBUtil::checkString($var, True); - $this->redis_instance = $var; - - return $this; - } - - /** - * A [Redis Cluster](https://cloud.google.com/memorystore/docs/cluster) - * URI. - * - * Generated from protobuf field string redis_cluster = 18; - * @return string - */ - public function getRedisCluster() - { - return $this->redis_cluster; - } - - /** - * A [Redis Cluster](https://cloud.google.com/memorystore/docs/cluster) - * URI. - * - * Generated from protobuf field string redis_cluster = 18; - * @param string $var - * @return $this - */ - public function setRedisCluster($var) - { - GPBUtil::checkString($var, True); - $this->redis_cluster = $var; - - return $this; - } - - /** - * A [Cloud Function](https://cloud.google.com/functions). - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint cloud_function = 10; - * @return \Google\Cloud\NetworkManagement\V1\Endpoint\CloudFunctionEndpoint|null - */ - public function getCloudFunction() - { - return $this->cloud_function; - } - - public function hasCloudFunction() - { - return isset($this->cloud_function); - } - - public function clearCloudFunction() - { - unset($this->cloud_function); - } - - /** - * A [Cloud Function](https://cloud.google.com/functions). - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint cloud_function = 10; - * @param \Google\Cloud\NetworkManagement\V1\Endpoint\CloudFunctionEndpoint $var - * @return $this - */ - public function setCloudFunction($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\Endpoint\CloudFunctionEndpoint::class); - $this->cloud_function = $var; - - return $this; - } - - /** - * An [App Engine](https://cloud.google.com/appengine) [service - * version](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions). - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint app_engine_version = 11; - * @return \Google\Cloud\NetworkManagement\V1\Endpoint\AppEngineVersionEndpoint|null - */ - public function getAppEngineVersion() - { - return $this->app_engine_version; - } - - public function hasAppEngineVersion() - { - return isset($this->app_engine_version); - } - - public function clearAppEngineVersion() - { - unset($this->app_engine_version); - } - - /** - * An [App Engine](https://cloud.google.com/appengine) [service - * version](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions). - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint app_engine_version = 11; - * @param \Google\Cloud\NetworkManagement\V1\Endpoint\AppEngineVersionEndpoint $var - * @return $this - */ - public function setAppEngineVersion($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\Endpoint\AppEngineVersionEndpoint::class); - $this->app_engine_version = $var; - - return $this; - } - - /** - * A [Cloud Run](https://cloud.google.com/run) - * [revision](https://cloud.google.com/run/docs/reference/rest/v1/namespaces.revisions/get) - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint cloud_run_revision = 12; - * @return \Google\Cloud\NetworkManagement\V1\Endpoint\CloudRunRevisionEndpoint|null - */ - public function getCloudRunRevision() - { - return $this->cloud_run_revision; - } - - public function hasCloudRunRevision() - { - return isset($this->cloud_run_revision); - } - - public function clearCloudRunRevision() - { - unset($this->cloud_run_revision); - } - - /** - * A [Cloud Run](https://cloud.google.com/run) - * [revision](https://cloud.google.com/run/docs/reference/rest/v1/namespaces.revisions/get) - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint cloud_run_revision = 12; - * @param \Google\Cloud\NetworkManagement\V1\Endpoint\CloudRunRevisionEndpoint $var - * @return $this - */ - public function setCloudRunRevision($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\Endpoint\CloudRunRevisionEndpoint::class); - $this->cloud_run_revision = $var; - - return $this; - } - - /** - * A Compute Engine network URI. - * - * Generated from protobuf field string network = 4; - * @return string - */ - public function getNetwork() - { - return $this->network; - } - - /** - * A Compute Engine network URI. - * - * Generated from protobuf field string network = 4; - * @param string $var - * @return $this - */ - public function setNetwork($var) - { - GPBUtil::checkString($var, True); - $this->network = $var; - - return $this; - } - - /** - * Type of the network where the endpoint is located. - * Applicable only to source endpoint, as destination network type can be - * inferred from the source. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.Endpoint.NetworkType network_type = 5; - * @return int - */ - public function getNetworkType() - { - return $this->network_type; - } - - /** - * Type of the network where the endpoint is located. - * Applicable only to source endpoint, as destination network type can be - * inferred from the source. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.Endpoint.NetworkType network_type = 5; - * @param int $var - * @return $this - */ - public function setNetworkType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\NetworkManagement\V1\Endpoint\NetworkType::class); - $this->network_type = $var; - - return $this; - } - - /** - * Project ID where the endpoint is located. - * The Project ID can be derived from the URI if you provide a VM instance or - * network URI. - * The following are two cases where you must provide the project ID: - * 1. Only the IP address is specified, and the IP address is within a Google - * Cloud project. - * 2. When you are using Shared VPC and the IP address that you provide is - * from the service project. In this case, the network that the IP address - * resides in is defined in the host project. - * - * Generated from protobuf field string project_id = 6; - * @return string - */ - public function getProjectId() - { - return $this->project_id; - } - - /** - * Project ID where the endpoint is located. - * The Project ID can be derived from the URI if you provide a VM instance or - * network URI. - * The following are two cases where you must provide the project ID: - * 1. Only the IP address is specified, and the IP address is within a Google - * Cloud project. - * 2. When you are using Shared VPC and the IP address that you provide is - * from the service project. In this case, the network that the IP address - * resides in is defined in the host project. - * - * Generated from protobuf field string project_id = 6; - * @param string $var - * @return $this - */ - public function setProjectId($var) - { - GPBUtil::checkString($var, True); - $this->project_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Endpoint/AppEngineVersionEndpoint.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Endpoint/AppEngineVersionEndpoint.php deleted file mode 100644 index 00601e729f56..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Endpoint/AppEngineVersionEndpoint.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint - */ -class AppEngineVersionEndpoint extends \Google\Protobuf\Internal\Message -{ - /** - * An [App Engine](https://cloud.google.com/appengine) [service - * version](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions) - * name. - * - * Generated from protobuf field string uri = 1; - */ - protected $uri = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $uri - * An [App Engine](https://cloud.google.com/appengine) [service - * version](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions) - * name. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkmanagement\V1\ConnectivityTest::initOnce(); - parent::__construct($data); - } - - /** - * An [App Engine](https://cloud.google.com/appengine) [service - * version](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions) - * name. - * - * Generated from protobuf field string uri = 1; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * An [App Engine](https://cloud.google.com/appengine) [service - * version](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions) - * name. - * - * Generated from protobuf field string uri = 1; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(AppEngineVersionEndpoint::class, \Google\Cloud\NetworkManagement\V1\Endpoint_AppEngineVersionEndpoint::class); - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Endpoint/CloudFunctionEndpoint.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Endpoint/CloudFunctionEndpoint.php deleted file mode 100644 index dfc3b0f413a5..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Endpoint/CloudFunctionEndpoint.php +++ /dev/null @@ -1,70 +0,0 @@ -google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint - */ -class CloudFunctionEndpoint extends \Google\Protobuf\Internal\Message -{ - /** - * A [Cloud Function](https://cloud.google.com/functions) name. - * - * Generated from protobuf field string uri = 1; - */ - protected $uri = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $uri - * A [Cloud Function](https://cloud.google.com/functions) name. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkmanagement\V1\ConnectivityTest::initOnce(); - parent::__construct($data); - } - - /** - * A [Cloud Function](https://cloud.google.com/functions) name. - * - * Generated from protobuf field string uri = 1; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * A [Cloud Function](https://cloud.google.com/functions) name. - * - * Generated from protobuf field string uri = 1; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CloudFunctionEndpoint::class, \Google\Cloud\NetworkManagement\V1\Endpoint_CloudFunctionEndpoint::class); - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Endpoint/CloudRunRevisionEndpoint.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Endpoint/CloudRunRevisionEndpoint.php deleted file mode 100644 index 4b4c40adef9c..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Endpoint/CloudRunRevisionEndpoint.php +++ /dev/null @@ -1,82 +0,0 @@ -google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint - */ -class CloudRunRevisionEndpoint extends \Google\Protobuf\Internal\Message -{ - /** - * A [Cloud Run](https://cloud.google.com/run) - * [revision](https://cloud.google.com/run/docs/reference/rest/v1/namespaces.revisions/get) - * URI. The format is: - * projects/{project}/locations/{location}/revisions/{revision} - * - * Generated from protobuf field string uri = 1; - */ - protected $uri = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $uri - * A [Cloud Run](https://cloud.google.com/run) - * [revision](https://cloud.google.com/run/docs/reference/rest/v1/namespaces.revisions/get) - * URI. The format is: - * projects/{project}/locations/{location}/revisions/{revision} - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkmanagement\V1\ConnectivityTest::initOnce(); - parent::__construct($data); - } - - /** - * A [Cloud Run](https://cloud.google.com/run) - * [revision](https://cloud.google.com/run/docs/reference/rest/v1/namespaces.revisions/get) - * URI. The format is: - * projects/{project}/locations/{location}/revisions/{revision} - * - * Generated from protobuf field string uri = 1; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * A [Cloud Run](https://cloud.google.com/run) - * [revision](https://cloud.google.com/run/docs/reference/rest/v1/namespaces.revisions/get) - * URI. The format is: - * projects/{project}/locations/{location}/revisions/{revision} - * - * Generated from protobuf field string uri = 1; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CloudRunRevisionEndpoint::class, \Google\Cloud\NetworkManagement\V1\Endpoint_CloudRunRevisionEndpoint::class); - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Endpoint/ForwardingRuleTarget.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Endpoint/ForwardingRuleTarget.php deleted file mode 100644 index 7f8ffa54e280..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Endpoint/ForwardingRuleTarget.php +++ /dev/null @@ -1,79 +0,0 @@ -google.cloud.networkmanagement.v1.Endpoint.ForwardingRuleTarget - */ -class ForwardingRuleTarget -{ - /** - * Forwarding rule target is unknown. - * - * Generated from protobuf enum FORWARDING_RULE_TARGET_UNSPECIFIED = 0; - */ - const FORWARDING_RULE_TARGET_UNSPECIFIED = 0; - /** - * Compute Engine instance for protocol forwarding. - * - * Generated from protobuf enum INSTANCE = 1; - */ - const INSTANCE = 1; - /** - * Load Balancer. The specific type can be found from [load_balancer_type] - * [google.cloud.networkmanagement.v1.Endpoint.load_balancer_type]. - * - * Generated from protobuf enum LOAD_BALANCER = 2; - */ - const LOAD_BALANCER = 2; - /** - * Classic Cloud VPN Gateway. - * - * Generated from protobuf enum VPN_GATEWAY = 3; - */ - const VPN_GATEWAY = 3; - /** - * Forwarding Rule is a Private Service Connect endpoint. - * - * Generated from protobuf enum PSC = 4; - */ - const PSC = 4; - - private static $valueToName = [ - self::FORWARDING_RULE_TARGET_UNSPECIFIED => 'FORWARDING_RULE_TARGET_UNSPECIFIED', - self::INSTANCE => 'INSTANCE', - self::LOAD_BALANCER => 'LOAD_BALANCER', - self::VPN_GATEWAY => 'VPN_GATEWAY', - self::PSC => 'PSC', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ForwardingRuleTarget::class, \Google\Cloud\NetworkManagement\V1\Endpoint_ForwardingRuleTarget::class); - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Endpoint/NetworkType.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Endpoint/NetworkType.php deleted file mode 100644 index cdd595a94e5e..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Endpoint/NetworkType.php +++ /dev/null @@ -1,69 +0,0 @@ -google.cloud.networkmanagement.v1.Endpoint.NetworkType - */ -class NetworkType -{ - /** - * Default type if unspecified. - * - * Generated from protobuf enum NETWORK_TYPE_UNSPECIFIED = 0; - */ - const NETWORK_TYPE_UNSPECIFIED = 0; - /** - * A network hosted within Google Cloud. - * To receive more detailed output, specify the URI for the source or - * destination network. - * - * Generated from protobuf enum GCP_NETWORK = 1; - */ - const GCP_NETWORK = 1; - /** - * A network hosted outside of Google Cloud. - * This can be an on-premises network, or a network hosted by another cloud - * provider. - * - * Generated from protobuf enum NON_GCP_NETWORK = 2; - */ - const NON_GCP_NETWORK = 2; - - private static $valueToName = [ - self::NETWORK_TYPE_UNSPECIFIED => 'NETWORK_TYPE_UNSPECIFIED', - self::GCP_NETWORK => 'GCP_NETWORK', - self::NON_GCP_NETWORK => 'NON_GCP_NETWORK', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(NetworkType::class, \Google\Cloud\NetworkManagement\V1\Endpoint_NetworkType::class); - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/EndpointInfo.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/EndpointInfo.php deleted file mode 100644 index d87bc1cea5b2..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/EndpointInfo.php +++ /dev/null @@ -1,307 +0,0 @@ -google.cloud.networkmanagement.v1.EndpointInfo - */ -class EndpointInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Source IP address. - * - * Generated from protobuf field string source_ip = 1; - */ - protected $source_ip = ''; - /** - * Destination IP address. - * - * Generated from protobuf field string destination_ip = 2; - */ - protected $destination_ip = ''; - /** - * IP protocol in string format, for example: "TCP", "UDP", "ICMP". - * - * Generated from protobuf field string protocol = 3; - */ - protected $protocol = ''; - /** - * Source port. Only valid when protocol is TCP or UDP. - * - * Generated from protobuf field int32 source_port = 4; - */ - protected $source_port = 0; - /** - * Destination port. Only valid when protocol is TCP or UDP. - * - * Generated from protobuf field int32 destination_port = 5; - */ - protected $destination_port = 0; - /** - * URI of the network where this packet originates from. - * - * Generated from protobuf field string source_network_uri = 6; - */ - protected $source_network_uri = ''; - /** - * URI of the network where this packet is sent to. - * - * Generated from protobuf field string destination_network_uri = 7; - */ - protected $destination_network_uri = ''; - /** - * URI of the source telemetry agent this packet originates from. - * - * Generated from protobuf field string source_agent_uri = 8; - */ - protected $source_agent_uri = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $source_ip - * Source IP address. - * @type string $destination_ip - * Destination IP address. - * @type string $protocol - * IP protocol in string format, for example: "TCP", "UDP", "ICMP". - * @type int $source_port - * Source port. Only valid when protocol is TCP or UDP. - * @type int $destination_port - * Destination port. Only valid when protocol is TCP or UDP. - * @type string $source_network_uri - * URI of the network where this packet originates from. - * @type string $destination_network_uri - * URI of the network where this packet is sent to. - * @type string $source_agent_uri - * URI of the source telemetry agent this packet originates from. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkmanagement\V1\Trace::initOnce(); - parent::__construct($data); - } - - /** - * Source IP address. - * - * Generated from protobuf field string source_ip = 1; - * @return string - */ - public function getSourceIp() - { - return $this->source_ip; - } - - /** - * Source IP address. - * - * Generated from protobuf field string source_ip = 1; - * @param string $var - * @return $this - */ - public function setSourceIp($var) - { - GPBUtil::checkString($var, True); - $this->source_ip = $var; - - return $this; - } - - /** - * Destination IP address. - * - * Generated from protobuf field string destination_ip = 2; - * @return string - */ - public function getDestinationIp() - { - return $this->destination_ip; - } - - /** - * Destination IP address. - * - * Generated from protobuf field string destination_ip = 2; - * @param string $var - * @return $this - */ - public function setDestinationIp($var) - { - GPBUtil::checkString($var, True); - $this->destination_ip = $var; - - return $this; - } - - /** - * IP protocol in string format, for example: "TCP", "UDP", "ICMP". - * - * Generated from protobuf field string protocol = 3; - * @return string - */ - public function getProtocol() - { - return $this->protocol; - } - - /** - * IP protocol in string format, for example: "TCP", "UDP", "ICMP". - * - * Generated from protobuf field string protocol = 3; - * @param string $var - * @return $this - */ - public function setProtocol($var) - { - GPBUtil::checkString($var, True); - $this->protocol = $var; - - return $this; - } - - /** - * Source port. Only valid when protocol is TCP or UDP. - * - * Generated from protobuf field int32 source_port = 4; - * @return int - */ - public function getSourcePort() - { - return $this->source_port; - } - - /** - * Source port. Only valid when protocol is TCP or UDP. - * - * Generated from protobuf field int32 source_port = 4; - * @param int $var - * @return $this - */ - public function setSourcePort($var) - { - GPBUtil::checkInt32($var); - $this->source_port = $var; - - return $this; - } - - /** - * Destination port. Only valid when protocol is TCP or UDP. - * - * Generated from protobuf field int32 destination_port = 5; - * @return int - */ - public function getDestinationPort() - { - return $this->destination_port; - } - - /** - * Destination port. Only valid when protocol is TCP or UDP. - * - * Generated from protobuf field int32 destination_port = 5; - * @param int $var - * @return $this - */ - public function setDestinationPort($var) - { - GPBUtil::checkInt32($var); - $this->destination_port = $var; - - return $this; - } - - /** - * URI of the network where this packet originates from. - * - * Generated from protobuf field string source_network_uri = 6; - * @return string - */ - public function getSourceNetworkUri() - { - return $this->source_network_uri; - } - - /** - * URI of the network where this packet originates from. - * - * Generated from protobuf field string source_network_uri = 6; - * @param string $var - * @return $this - */ - public function setSourceNetworkUri($var) - { - GPBUtil::checkString($var, True); - $this->source_network_uri = $var; - - return $this; - } - - /** - * URI of the network where this packet is sent to. - * - * Generated from protobuf field string destination_network_uri = 7; - * @return string - */ - public function getDestinationNetworkUri() - { - return $this->destination_network_uri; - } - - /** - * URI of the network where this packet is sent to. - * - * Generated from protobuf field string destination_network_uri = 7; - * @param string $var - * @return $this - */ - public function setDestinationNetworkUri($var) - { - GPBUtil::checkString($var, True); - $this->destination_network_uri = $var; - - return $this; - } - - /** - * URI of the source telemetry agent this packet originates from. - * - * Generated from protobuf field string source_agent_uri = 8; - * @return string - */ - public function getSourceAgentUri() - { - return $this->source_agent_uri; - } - - /** - * URI of the source telemetry agent this packet originates from. - * - * Generated from protobuf field string source_agent_uri = 8; - * @param string $var - * @return $this - */ - public function setSourceAgentUri($var) - { - GPBUtil::checkString($var, True); - $this->source_agent_uri = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/FirewallInfo.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/FirewallInfo.php deleted file mode 100644 index 7f3337c1308b..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/FirewallInfo.php +++ /dev/null @@ -1,440 +0,0 @@ -google.cloud.networkmanagement.v1.FirewallInfo - */ -class FirewallInfo extends \Google\Protobuf\Internal\Message -{ - /** - * The display name of the firewall rule. This field might be empty for - * firewall policy rules. - * - * Generated from protobuf field string display_name = 1; - */ - protected $display_name = ''; - /** - * The URI of the firewall rule. This field is not applicable to implied - * VPC firewall rules. - * - * Generated from protobuf field string uri = 2; - */ - protected $uri = ''; - /** - * Possible values: INGRESS, EGRESS - * - * Generated from protobuf field string direction = 3; - */ - protected $direction = ''; - /** - * Possible values: ALLOW, DENY, APPLY_SECURITY_PROFILE_GROUP - * - * Generated from protobuf field string action = 4; - */ - protected $action = ''; - /** - * The priority of the firewall rule. - * - * Generated from protobuf field int32 priority = 5; - */ - protected $priority = 0; - /** - * The URI of the VPC network that the firewall rule is associated with. - * This field is not applicable to hierarchical firewall policy rules. - * - * Generated from protobuf field string network_uri = 6; - */ - protected $network_uri = ''; - /** - * The target tags defined by the VPC firewall rule. This field is not - * applicable to firewall policy rules. - * - * Generated from protobuf field repeated string target_tags = 7; - */ - private $target_tags; - /** - * The target service accounts specified by the firewall rule. - * - * Generated from protobuf field repeated string target_service_accounts = 8; - */ - private $target_service_accounts; - /** - * The name of the firewall policy that this rule is associated with. - * This field is not applicable to VPC firewall rules and implied VPC firewall - * rules. - * - * Generated from protobuf field string policy = 9; - */ - protected $policy = ''; - /** - * The URI of the firewall policy that this rule is associated with. - * This field is not applicable to VPC firewall rules and implied VPC firewall - * rules. - * - * Generated from protobuf field string policy_uri = 11; - */ - protected $policy_uri = ''; - /** - * The firewall rule's type. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType firewall_rule_type = 10; - */ - protected $firewall_rule_type = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $display_name - * The display name of the firewall rule. This field might be empty for - * firewall policy rules. - * @type string $uri - * The URI of the firewall rule. This field is not applicable to implied - * VPC firewall rules. - * @type string $direction - * Possible values: INGRESS, EGRESS - * @type string $action - * Possible values: ALLOW, DENY, APPLY_SECURITY_PROFILE_GROUP - * @type int $priority - * The priority of the firewall rule. - * @type string $network_uri - * The URI of the VPC network that the firewall rule is associated with. - * This field is not applicable to hierarchical firewall policy rules. - * @type array|\Google\Protobuf\Internal\RepeatedField $target_tags - * The target tags defined by the VPC firewall rule. This field is not - * applicable to firewall policy rules. - * @type array|\Google\Protobuf\Internal\RepeatedField $target_service_accounts - * The target service accounts specified by the firewall rule. - * @type string $policy - * The name of the firewall policy that this rule is associated with. - * This field is not applicable to VPC firewall rules and implied VPC firewall - * rules. - * @type string $policy_uri - * The URI of the firewall policy that this rule is associated with. - * This field is not applicable to VPC firewall rules and implied VPC firewall - * rules. - * @type int $firewall_rule_type - * The firewall rule's type. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkmanagement\V1\Trace::initOnce(); - parent::__construct($data); - } - - /** - * The display name of the firewall rule. This field might be empty for - * firewall policy rules. - * - * Generated from protobuf field string display_name = 1; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * The display name of the firewall rule. This field might be empty for - * firewall policy rules. - * - * Generated from protobuf field string display_name = 1; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * The URI of the firewall rule. This field is not applicable to implied - * VPC firewall rules. - * - * Generated from protobuf field string uri = 2; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * The URI of the firewall rule. This field is not applicable to implied - * VPC firewall rules. - * - * Generated from protobuf field string uri = 2; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - - /** - * Possible values: INGRESS, EGRESS - * - * Generated from protobuf field string direction = 3; - * @return string - */ - public function getDirection() - { - return $this->direction; - } - - /** - * Possible values: INGRESS, EGRESS - * - * Generated from protobuf field string direction = 3; - * @param string $var - * @return $this - */ - public function setDirection($var) - { - GPBUtil::checkString($var, True); - $this->direction = $var; - - return $this; - } - - /** - * Possible values: ALLOW, DENY, APPLY_SECURITY_PROFILE_GROUP - * - * Generated from protobuf field string action = 4; - * @return string - */ - public function getAction() - { - return $this->action; - } - - /** - * Possible values: ALLOW, DENY, APPLY_SECURITY_PROFILE_GROUP - * - * Generated from protobuf field string action = 4; - * @param string $var - * @return $this - */ - public function setAction($var) - { - GPBUtil::checkString($var, True); - $this->action = $var; - - return $this; - } - - /** - * The priority of the firewall rule. - * - * Generated from protobuf field int32 priority = 5; - * @return int - */ - public function getPriority() - { - return $this->priority; - } - - /** - * The priority of the firewall rule. - * - * Generated from protobuf field int32 priority = 5; - * @param int $var - * @return $this - */ - public function setPriority($var) - { - GPBUtil::checkInt32($var); - $this->priority = $var; - - return $this; - } - - /** - * The URI of the VPC network that the firewall rule is associated with. - * This field is not applicable to hierarchical firewall policy rules. - * - * Generated from protobuf field string network_uri = 6; - * @return string - */ - public function getNetworkUri() - { - return $this->network_uri; - } - - /** - * The URI of the VPC network that the firewall rule is associated with. - * This field is not applicable to hierarchical firewall policy rules. - * - * Generated from protobuf field string network_uri = 6; - * @param string $var - * @return $this - */ - public function setNetworkUri($var) - { - GPBUtil::checkString($var, True); - $this->network_uri = $var; - - return $this; - } - - /** - * The target tags defined by the VPC firewall rule. This field is not - * applicable to firewall policy rules. - * - * Generated from protobuf field repeated string target_tags = 7; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTargetTags() - { - return $this->target_tags; - } - - /** - * The target tags defined by the VPC firewall rule. This field is not - * applicable to firewall policy rules. - * - * Generated from protobuf field repeated string target_tags = 7; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTargetTags($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->target_tags = $arr; - - return $this; - } - - /** - * The target service accounts specified by the firewall rule. - * - * Generated from protobuf field repeated string target_service_accounts = 8; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTargetServiceAccounts() - { - return $this->target_service_accounts; - } - - /** - * The target service accounts specified by the firewall rule. - * - * Generated from protobuf field repeated string target_service_accounts = 8; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTargetServiceAccounts($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->target_service_accounts = $arr; - - return $this; - } - - /** - * The name of the firewall policy that this rule is associated with. - * This field is not applicable to VPC firewall rules and implied VPC firewall - * rules. - * - * Generated from protobuf field string policy = 9; - * @return string - */ - public function getPolicy() - { - return $this->policy; - } - - /** - * The name of the firewall policy that this rule is associated with. - * This field is not applicable to VPC firewall rules and implied VPC firewall - * rules. - * - * Generated from protobuf field string policy = 9; - * @param string $var - * @return $this - */ - public function setPolicy($var) - { - GPBUtil::checkString($var, True); - $this->policy = $var; - - return $this; - } - - /** - * The URI of the firewall policy that this rule is associated with. - * This field is not applicable to VPC firewall rules and implied VPC firewall - * rules. - * - * Generated from protobuf field string policy_uri = 11; - * @return string - */ - public function getPolicyUri() - { - return $this->policy_uri; - } - - /** - * The URI of the firewall policy that this rule is associated with. - * This field is not applicable to VPC firewall rules and implied VPC firewall - * rules. - * - * Generated from protobuf field string policy_uri = 11; - * @param string $var - * @return $this - */ - public function setPolicyUri($var) - { - GPBUtil::checkString($var, True); - $this->policy_uri = $var; - - return $this; - } - - /** - * The firewall rule's type. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType firewall_rule_type = 10; - * @return int - */ - public function getFirewallRuleType() - { - return $this->firewall_rule_type; - } - - /** - * The firewall rule's type. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType firewall_rule_type = 10; - * @param int $var - * @return $this - */ - public function setFirewallRuleType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\NetworkManagement\V1\FirewallInfo\FirewallRuleType::class); - $this->firewall_rule_type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/FirewallInfo/FirewallRuleType.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/FirewallInfo/FirewallRuleType.php deleted file mode 100644 index c167afa5d089..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/FirewallInfo/FirewallRuleType.php +++ /dev/null @@ -1,125 +0,0 @@ -google.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType - */ -class FirewallRuleType -{ - /** - * Unspecified type. - * - * Generated from protobuf enum FIREWALL_RULE_TYPE_UNSPECIFIED = 0; - */ - const FIREWALL_RULE_TYPE_UNSPECIFIED = 0; - /** - * Hierarchical firewall policy rule. For details, see - * [Hierarchical firewall policies - * overview](https://cloud.google.com/vpc/docs/firewall-policies). - * - * Generated from protobuf enum HIERARCHICAL_FIREWALL_POLICY_RULE = 1; - */ - const HIERARCHICAL_FIREWALL_POLICY_RULE = 1; - /** - * VPC firewall rule. For details, see - * [VPC firewall rules - * overview](https://cloud.google.com/vpc/docs/firewalls). - * - * Generated from protobuf enum VPC_FIREWALL_RULE = 2; - */ - const VPC_FIREWALL_RULE = 2; - /** - * Implied VPC firewall rule. For details, see - * [Implied - * rules](https://cloud.google.com/vpc/docs/firewalls#default_firewall_rules). - * - * Generated from protobuf enum IMPLIED_VPC_FIREWALL_RULE = 3; - */ - const IMPLIED_VPC_FIREWALL_RULE = 3; - /** - * Implicit firewall rules that are managed by serverless VPC access to - * allow ingress access. They are not visible in the Google Cloud console. - * For details, see [VPC connector's implicit - * rules](https://cloud.google.com/functions/docs/networking/connecting-vpc#restrict-access). - * - * Generated from protobuf enum SERVERLESS_VPC_ACCESS_MANAGED_FIREWALL_RULE = 4; - */ - const SERVERLESS_VPC_ACCESS_MANAGED_FIREWALL_RULE = 4; - /** - * Global network firewall policy rule. - * For details, see [Network firewall - * policies](https://cloud.google.com/vpc/docs/network-firewall-policies). - * - * Generated from protobuf enum NETWORK_FIREWALL_POLICY_RULE = 5; - */ - const NETWORK_FIREWALL_POLICY_RULE = 5; - /** - * Regional network firewall policy rule. - * For details, see [Regional network firewall - * policies](https://cloud.google.com/firewall/docs/regional-firewall-policies). - * - * Generated from protobuf enum NETWORK_REGIONAL_FIREWALL_POLICY_RULE = 6; - */ - const NETWORK_REGIONAL_FIREWALL_POLICY_RULE = 6; - /** - * Firewall policy rule containing attributes not yet supported in - * Connectivity tests. Firewall analysis is skipped if such a rule can - * potentially be matched. Please see the [list of unsupported - * configurations](https://cloud.google.com/network-intelligence-center/docs/connectivity-tests/concepts/overview#unsupported-configs). - * - * Generated from protobuf enum UNSUPPORTED_FIREWALL_POLICY_RULE = 100; - */ - const UNSUPPORTED_FIREWALL_POLICY_RULE = 100; - /** - * Tracking state for response traffic created when request traffic goes - * through allow firewall rule. - * For details, see [firewall rules - * specifications](https://cloud.google.com/firewall/docs/firewalls#specifications) - * - * Generated from protobuf enum TRACKING_STATE = 101; - */ - const TRACKING_STATE = 101; - - private static $valueToName = [ - self::FIREWALL_RULE_TYPE_UNSPECIFIED => 'FIREWALL_RULE_TYPE_UNSPECIFIED', - self::HIERARCHICAL_FIREWALL_POLICY_RULE => 'HIERARCHICAL_FIREWALL_POLICY_RULE', - self::VPC_FIREWALL_RULE => 'VPC_FIREWALL_RULE', - self::IMPLIED_VPC_FIREWALL_RULE => 'IMPLIED_VPC_FIREWALL_RULE', - self::SERVERLESS_VPC_ACCESS_MANAGED_FIREWALL_RULE => 'SERVERLESS_VPC_ACCESS_MANAGED_FIREWALL_RULE', - self::NETWORK_FIREWALL_POLICY_RULE => 'NETWORK_FIREWALL_POLICY_RULE', - self::NETWORK_REGIONAL_FIREWALL_POLICY_RULE => 'NETWORK_REGIONAL_FIREWALL_POLICY_RULE', - self::UNSUPPORTED_FIREWALL_POLICY_RULE => 'UNSUPPORTED_FIREWALL_POLICY_RULE', - self::TRACKING_STATE => 'TRACKING_STATE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(FirewallRuleType::class, \Google\Cloud\NetworkManagement\V1\FirewallInfo_FirewallRuleType::class); - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ForwardInfo.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ForwardInfo.php deleted file mode 100644 index f2c3ac4705a2..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ForwardInfo.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.networkmanagement.v1.ForwardInfo - */ -class ForwardInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Target type where this packet is forwarded to. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.ForwardInfo.Target target = 1; - */ - protected $target = 0; - /** - * URI of the resource that the packet is forwarded to. - * - * Generated from protobuf field string resource_uri = 2; - */ - protected $resource_uri = ''; - /** - * IP address of the target (if applicable). - * - * Generated from protobuf field string ip_address = 3 [(.google.api.field_info) = { - */ - protected $ip_address = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $target - * Target type where this packet is forwarded to. - * @type string $resource_uri - * URI of the resource that the packet is forwarded to. - * @type string $ip_address - * IP address of the target (if applicable). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkmanagement\V1\Trace::initOnce(); - parent::__construct($data); - } - - /** - * Target type where this packet is forwarded to. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.ForwardInfo.Target target = 1; - * @return int - */ - public function getTarget() - { - return $this->target; - } - - /** - * Target type where this packet is forwarded to. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.ForwardInfo.Target target = 1; - * @param int $var - * @return $this - */ - public function setTarget($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\NetworkManagement\V1\ForwardInfo\Target::class); - $this->target = $var; - - return $this; - } - - /** - * URI of the resource that the packet is forwarded to. - * - * Generated from protobuf field string resource_uri = 2; - * @return string - */ - public function getResourceUri() - { - return $this->resource_uri; - } - - /** - * URI of the resource that the packet is forwarded to. - * - * Generated from protobuf field string resource_uri = 2; - * @param string $var - * @return $this - */ - public function setResourceUri($var) - { - GPBUtil::checkString($var, True); - $this->resource_uri = $var; - - return $this; - } - - /** - * IP address of the target (if applicable). - * - * Generated from protobuf field string ip_address = 3 [(.google.api.field_info) = { - * @return string - */ - public function getIpAddress() - { - return $this->ip_address; - } - - /** - * IP address of the target (if applicable). - * - * Generated from protobuf field string ip_address = 3 [(.google.api.field_info) = { - * @param string $var - * @return $this - */ - public function setIpAddress($var) - { - GPBUtil::checkString($var, True); - $this->ip_address = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ForwardInfo/Target.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ForwardInfo/Target.php deleted file mode 100644 index eb8e65ec9c58..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ForwardInfo/Target.php +++ /dev/null @@ -1,113 +0,0 @@ -google.cloud.networkmanagement.v1.ForwardInfo.Target - */ -class Target -{ - /** - * Target not specified. - * - * Generated from protobuf enum TARGET_UNSPECIFIED = 0; - */ - const TARGET_UNSPECIFIED = 0; - /** - * Forwarded to a VPC peering network. - * - * Generated from protobuf enum PEERING_VPC = 1; - */ - const PEERING_VPC = 1; - /** - * Forwarded to a Cloud VPN gateway. - * - * Generated from protobuf enum VPN_GATEWAY = 2; - */ - const VPN_GATEWAY = 2; - /** - * Forwarded to a Cloud Interconnect connection. - * - * Generated from protobuf enum INTERCONNECT = 3; - */ - const INTERCONNECT = 3; - /** - * Forwarded to a Google Kubernetes Engine Container cluster master. - * - * Generated from protobuf enum GKE_MASTER = 4 [deprecated = true]; - */ - const GKE_MASTER = 4; - /** - * Forwarded to the next hop of a custom route imported from a peering VPC. - * - * Generated from protobuf enum IMPORTED_CUSTOM_ROUTE_NEXT_HOP = 5; - */ - const IMPORTED_CUSTOM_ROUTE_NEXT_HOP = 5; - /** - * Forwarded to a Cloud SQL instance. - * - * Generated from protobuf enum CLOUD_SQL_INSTANCE = 6 [deprecated = true]; - */ - const CLOUD_SQL_INSTANCE = 6; - /** - * Forwarded to a VPC network in another project. - * - * Generated from protobuf enum ANOTHER_PROJECT = 7; - */ - const ANOTHER_PROJECT = 7; - /** - * Forwarded to an NCC Hub. - * - * Generated from protobuf enum NCC_HUB = 8; - */ - const NCC_HUB = 8; - /** - * Forwarded to a router appliance. - * - * Generated from protobuf enum ROUTER_APPLIANCE = 9; - */ - const ROUTER_APPLIANCE = 9; - - private static $valueToName = [ - self::TARGET_UNSPECIFIED => 'TARGET_UNSPECIFIED', - self::PEERING_VPC => 'PEERING_VPC', - self::VPN_GATEWAY => 'VPN_GATEWAY', - self::INTERCONNECT => 'INTERCONNECT', - self::GKE_MASTER => 'GKE_MASTER', - self::IMPORTED_CUSTOM_ROUTE_NEXT_HOP => 'IMPORTED_CUSTOM_ROUTE_NEXT_HOP', - self::CLOUD_SQL_INSTANCE => 'CLOUD_SQL_INSTANCE', - self::ANOTHER_PROJECT => 'ANOTHER_PROJECT', - self::NCC_HUB => 'NCC_HUB', - self::ROUTER_APPLIANCE => 'ROUTER_APPLIANCE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Target::class, \Google\Cloud\NetworkManagement\V1\ForwardInfo_Target::class); - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ForwardingRuleInfo.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ForwardingRuleInfo.php deleted file mode 100644 index 831116bed4ee..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ForwardingRuleInfo.php +++ /dev/null @@ -1,415 +0,0 @@ -google.cloud.networkmanagement.v1.ForwardingRuleInfo - */ -class ForwardingRuleInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Name of the forwarding rule. - * - * Generated from protobuf field string display_name = 1; - */ - protected $display_name = ''; - /** - * URI of the forwarding rule. - * - * Generated from protobuf field string uri = 2; - */ - protected $uri = ''; - /** - * Protocol defined in the forwarding rule that matches the packet. - * - * Generated from protobuf field string matched_protocol = 3; - */ - protected $matched_protocol = ''; - /** - * Port range defined in the forwarding rule that matches the packet. - * - * Generated from protobuf field string matched_port_range = 6; - */ - protected $matched_port_range = ''; - /** - * VIP of the forwarding rule. - * - * Generated from protobuf field string vip = 4; - */ - protected $vip = ''; - /** - * Target type of the forwarding rule. - * - * Generated from protobuf field string target = 5; - */ - protected $target = ''; - /** - * Network URI. - * - * Generated from protobuf field string network_uri = 7; - */ - protected $network_uri = ''; - /** - * Region of the forwarding rule. Set only for regional forwarding rules. - * - * Generated from protobuf field string region = 8; - */ - protected $region = ''; - /** - * Name of the load balancer the forwarding rule belongs to. Empty for - * forwarding rules not related to load balancers (like PSC forwarding rules). - * - * Generated from protobuf field string load_balancer_name = 9; - */ - protected $load_balancer_name = ''; - /** - * URI of the PSC service attachment this forwarding rule targets (if - * applicable). - * - * Generated from protobuf field string psc_service_attachment_uri = 10; - */ - protected $psc_service_attachment_uri = ''; - /** - * PSC Google API target this forwarding rule targets (if applicable). - * - * Generated from protobuf field string psc_google_api_target = 11; - */ - protected $psc_google_api_target = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $display_name - * Name of the forwarding rule. - * @type string $uri - * URI of the forwarding rule. - * @type string $matched_protocol - * Protocol defined in the forwarding rule that matches the packet. - * @type string $matched_port_range - * Port range defined in the forwarding rule that matches the packet. - * @type string $vip - * VIP of the forwarding rule. - * @type string $target - * Target type of the forwarding rule. - * @type string $network_uri - * Network URI. - * @type string $region - * Region of the forwarding rule. Set only for regional forwarding rules. - * @type string $load_balancer_name - * Name of the load balancer the forwarding rule belongs to. Empty for - * forwarding rules not related to load balancers (like PSC forwarding rules). - * @type string $psc_service_attachment_uri - * URI of the PSC service attachment this forwarding rule targets (if - * applicable). - * @type string $psc_google_api_target - * PSC Google API target this forwarding rule targets (if applicable). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkmanagement\V1\Trace::initOnce(); - parent::__construct($data); - } - - /** - * Name of the forwarding rule. - * - * Generated from protobuf field string display_name = 1; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Name of the forwarding rule. - * - * Generated from protobuf field string display_name = 1; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * URI of the forwarding rule. - * - * Generated from protobuf field string uri = 2; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * URI of the forwarding rule. - * - * Generated from protobuf field string uri = 2; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - - /** - * Protocol defined in the forwarding rule that matches the packet. - * - * Generated from protobuf field string matched_protocol = 3; - * @return string - */ - public function getMatchedProtocol() - { - return $this->matched_protocol; - } - - /** - * Protocol defined in the forwarding rule that matches the packet. - * - * Generated from protobuf field string matched_protocol = 3; - * @param string $var - * @return $this - */ - public function setMatchedProtocol($var) - { - GPBUtil::checkString($var, True); - $this->matched_protocol = $var; - - return $this; - } - - /** - * Port range defined in the forwarding rule that matches the packet. - * - * Generated from protobuf field string matched_port_range = 6; - * @return string - */ - public function getMatchedPortRange() - { - return $this->matched_port_range; - } - - /** - * Port range defined in the forwarding rule that matches the packet. - * - * Generated from protobuf field string matched_port_range = 6; - * @param string $var - * @return $this - */ - public function setMatchedPortRange($var) - { - GPBUtil::checkString($var, True); - $this->matched_port_range = $var; - - return $this; - } - - /** - * VIP of the forwarding rule. - * - * Generated from protobuf field string vip = 4; - * @return string - */ - public function getVip() - { - return $this->vip; - } - - /** - * VIP of the forwarding rule. - * - * Generated from protobuf field string vip = 4; - * @param string $var - * @return $this - */ - public function setVip($var) - { - GPBUtil::checkString($var, True); - $this->vip = $var; - - return $this; - } - - /** - * Target type of the forwarding rule. - * - * Generated from protobuf field string target = 5; - * @return string - */ - public function getTarget() - { - return $this->target; - } - - /** - * Target type of the forwarding rule. - * - * Generated from protobuf field string target = 5; - * @param string $var - * @return $this - */ - public function setTarget($var) - { - GPBUtil::checkString($var, True); - $this->target = $var; - - return $this; - } - - /** - * Network URI. - * - * Generated from protobuf field string network_uri = 7; - * @return string - */ - public function getNetworkUri() - { - return $this->network_uri; - } - - /** - * Network URI. - * - * Generated from protobuf field string network_uri = 7; - * @param string $var - * @return $this - */ - public function setNetworkUri($var) - { - GPBUtil::checkString($var, True); - $this->network_uri = $var; - - return $this; - } - - /** - * Region of the forwarding rule. Set only for regional forwarding rules. - * - * Generated from protobuf field string region = 8; - * @return string - */ - public function getRegion() - { - return $this->region; - } - - /** - * Region of the forwarding rule. Set only for regional forwarding rules. - * - * Generated from protobuf field string region = 8; - * @param string $var - * @return $this - */ - public function setRegion($var) - { - GPBUtil::checkString($var, True); - $this->region = $var; - - return $this; - } - - /** - * Name of the load balancer the forwarding rule belongs to. Empty for - * forwarding rules not related to load balancers (like PSC forwarding rules). - * - * Generated from protobuf field string load_balancer_name = 9; - * @return string - */ - public function getLoadBalancerName() - { - return $this->load_balancer_name; - } - - /** - * Name of the load balancer the forwarding rule belongs to. Empty for - * forwarding rules not related to load balancers (like PSC forwarding rules). - * - * Generated from protobuf field string load_balancer_name = 9; - * @param string $var - * @return $this - */ - public function setLoadBalancerName($var) - { - GPBUtil::checkString($var, True); - $this->load_balancer_name = $var; - - return $this; - } - - /** - * URI of the PSC service attachment this forwarding rule targets (if - * applicable). - * - * Generated from protobuf field string psc_service_attachment_uri = 10; - * @return string - */ - public function getPscServiceAttachmentUri() - { - return $this->psc_service_attachment_uri; - } - - /** - * URI of the PSC service attachment this forwarding rule targets (if - * applicable). - * - * Generated from protobuf field string psc_service_attachment_uri = 10; - * @param string $var - * @return $this - */ - public function setPscServiceAttachmentUri($var) - { - GPBUtil::checkString($var, True); - $this->psc_service_attachment_uri = $var; - - return $this; - } - - /** - * PSC Google API target this forwarding rule targets (if applicable). - * - * Generated from protobuf field string psc_google_api_target = 11; - * @return string - */ - public function getPscGoogleApiTarget() - { - return $this->psc_google_api_target; - } - - /** - * PSC Google API target this forwarding rule targets (if applicable). - * - * Generated from protobuf field string psc_google_api_target = 11; - * @param string $var - * @return $this - */ - public function setPscGoogleApiTarget($var) - { - GPBUtil::checkString($var, True); - $this->psc_google_api_target = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/GKEMasterInfo.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/GKEMasterInfo.php deleted file mode 100644 index d3b1ea0afb97..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/GKEMasterInfo.php +++ /dev/null @@ -1,204 +0,0 @@ -google.cloud.networkmanagement.v1.GKEMasterInfo - */ -class GKEMasterInfo extends \Google\Protobuf\Internal\Message -{ - /** - * URI of a GKE cluster. - * - * Generated from protobuf field string cluster_uri = 2; - */ - protected $cluster_uri = ''; - /** - * URI of a GKE cluster network. - * - * Generated from protobuf field string cluster_network_uri = 4; - */ - protected $cluster_network_uri = ''; - /** - * Internal IP address of a GKE cluster control plane. - * - * Generated from protobuf field string internal_ip = 5; - */ - protected $internal_ip = ''; - /** - * External IP address of a GKE cluster control plane. - * - * Generated from protobuf field string external_ip = 6; - */ - protected $external_ip = ''; - /** - * DNS endpoint of a GKE cluster control plane. - * - * Generated from protobuf field string dns_endpoint = 7; - */ - protected $dns_endpoint = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $cluster_uri - * URI of a GKE cluster. - * @type string $cluster_network_uri - * URI of a GKE cluster network. - * @type string $internal_ip - * Internal IP address of a GKE cluster control plane. - * @type string $external_ip - * External IP address of a GKE cluster control plane. - * @type string $dns_endpoint - * DNS endpoint of a GKE cluster control plane. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkmanagement\V1\Trace::initOnce(); - parent::__construct($data); - } - - /** - * URI of a GKE cluster. - * - * Generated from protobuf field string cluster_uri = 2; - * @return string - */ - public function getClusterUri() - { - return $this->cluster_uri; - } - - /** - * URI of a GKE cluster. - * - * Generated from protobuf field string cluster_uri = 2; - * @param string $var - * @return $this - */ - public function setClusterUri($var) - { - GPBUtil::checkString($var, True); - $this->cluster_uri = $var; - - return $this; - } - - /** - * URI of a GKE cluster network. - * - * Generated from protobuf field string cluster_network_uri = 4; - * @return string - */ - public function getClusterNetworkUri() - { - return $this->cluster_network_uri; - } - - /** - * URI of a GKE cluster network. - * - * Generated from protobuf field string cluster_network_uri = 4; - * @param string $var - * @return $this - */ - public function setClusterNetworkUri($var) - { - GPBUtil::checkString($var, True); - $this->cluster_network_uri = $var; - - return $this; - } - - /** - * Internal IP address of a GKE cluster control plane. - * - * Generated from protobuf field string internal_ip = 5; - * @return string - */ - public function getInternalIp() - { - return $this->internal_ip; - } - - /** - * Internal IP address of a GKE cluster control plane. - * - * Generated from protobuf field string internal_ip = 5; - * @param string $var - * @return $this - */ - public function setInternalIp($var) - { - GPBUtil::checkString($var, True); - $this->internal_ip = $var; - - return $this; - } - - /** - * External IP address of a GKE cluster control plane. - * - * Generated from protobuf field string external_ip = 6; - * @return string - */ - public function getExternalIp() - { - return $this->external_ip; - } - - /** - * External IP address of a GKE cluster control plane. - * - * Generated from protobuf field string external_ip = 6; - * @param string $var - * @return $this - */ - public function setExternalIp($var) - { - GPBUtil::checkString($var, True); - $this->external_ip = $var; - - return $this; - } - - /** - * DNS endpoint of a GKE cluster control plane. - * - * Generated from protobuf field string dns_endpoint = 7; - * @return string - */ - public function getDnsEndpoint() - { - return $this->dns_endpoint; - } - - /** - * DNS endpoint of a GKE cluster control plane. - * - * Generated from protobuf field string dns_endpoint = 7; - * @param string $var - * @return $this - */ - public function setDnsEndpoint($var) - { - GPBUtil::checkString($var, True); - $this->dns_endpoint = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/GetConnectivityTestRequest.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/GetConnectivityTestRequest.php deleted file mode 100644 index dcd27f465a8a..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/GetConnectivityTestRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.networkmanagement.v1.GetConnectivityTestRequest - */ -class GetConnectivityTestRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. `ConnectivityTest` resource name using the form: - * `projects/{project_id}/locations/global/connectivityTests/{test_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. `ConnectivityTest` resource name using the form: - * `projects/{project_id}/locations/global/connectivityTests/{test_id}` - * Please see {@see ReachabilityServiceClient::connectivityTestName()} for help formatting this field. - * - * @return \Google\Cloud\NetworkManagement\V1\GetConnectivityTestRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. `ConnectivityTest` resource name using the form: - * `projects/{project_id}/locations/global/connectivityTests/{test_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkmanagement\V1\Reachability::initOnce(); - parent::__construct($data); - } - - /** - * Required. `ConnectivityTest` resource name using the form: - * `projects/{project_id}/locations/global/connectivityTests/{test_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. `ConnectivityTest` resource name using the form: - * `projects/{project_id}/locations/global/connectivityTests/{test_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/GoogleServiceInfo.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/GoogleServiceInfo.php deleted file mode 100644 index d402ca6ee52f..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/GoogleServiceInfo.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.networkmanagement.v1.GoogleServiceInfo - */ -class GoogleServiceInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Source IP address. - * - * Generated from protobuf field string source_ip = 1; - */ - protected $source_ip = ''; - /** - * Recognized type of a Google Service. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.GoogleServiceInfo.GoogleServiceType google_service_type = 2; - */ - protected $google_service_type = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $source_ip - * Source IP address. - * @type int $google_service_type - * Recognized type of a Google Service. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkmanagement\V1\Trace::initOnce(); - parent::__construct($data); - } - - /** - * Source IP address. - * - * Generated from protobuf field string source_ip = 1; - * @return string - */ - public function getSourceIp() - { - return $this->source_ip; - } - - /** - * Source IP address. - * - * Generated from protobuf field string source_ip = 1; - * @param string $var - * @return $this - */ - public function setSourceIp($var) - { - GPBUtil::checkString($var, True); - $this->source_ip = $var; - - return $this; - } - - /** - * Recognized type of a Google Service. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.GoogleServiceInfo.GoogleServiceType google_service_type = 2; - * @return int - */ - public function getGoogleServiceType() - { - return $this->google_service_type; - } - - /** - * Recognized type of a Google Service. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.GoogleServiceInfo.GoogleServiceType google_service_type = 2; - * @param int $var - * @return $this - */ - public function setGoogleServiceType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\NetworkManagement\V1\GoogleServiceInfo\GoogleServiceType::class); - $this->google_service_type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/GoogleServiceInfo/GoogleServiceType.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/GoogleServiceInfo/GoogleServiceType.php deleted file mode 100644 index 5d379eb881e6..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/GoogleServiceInfo/GoogleServiceType.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.networkmanagement.v1.GoogleServiceInfo.GoogleServiceType - */ -class GoogleServiceType -{ - /** - * Unspecified Google Service. - * - * Generated from protobuf enum GOOGLE_SERVICE_TYPE_UNSPECIFIED = 0; - */ - const GOOGLE_SERVICE_TYPE_UNSPECIFIED = 0; - /** - * Identity aware proxy. - * https://cloud.google.com/iap/docs/using-tcp-forwarding - * - * Generated from protobuf enum IAP = 1; - */ - const IAP = 1; - /** - * One of two services sharing IP ranges: - * * Load Balancer proxy - * * Centralized Health Check prober - * https://cloud.google.com/load-balancing/docs/firewall-rules - * - * Generated from protobuf enum GFE_PROXY_OR_HEALTH_CHECK_PROBER = 2; - */ - const GFE_PROXY_OR_HEALTH_CHECK_PROBER = 2; - /** - * Connectivity from Cloud DNS to forwarding targets or alternate name - * servers that use private routing. - * https://cloud.google.com/dns/docs/zones/forwarding-zones#firewall-rules - * https://cloud.google.com/dns/docs/policies#firewall-rules - * - * Generated from protobuf enum CLOUD_DNS = 3; - */ - const CLOUD_DNS = 3; - /** - * private.googleapis.com and restricted.googleapis.com - * - * Generated from protobuf enum GOOGLE_API = 4; - */ - const GOOGLE_API = 4; - /** - * Google API via Private Service Connect. - * https://cloud.google.com/vpc/docs/configure-private-service-connect-apis - * - * Generated from protobuf enum GOOGLE_API_PSC = 5; - */ - const GOOGLE_API_PSC = 5; - /** - * Google API via VPC Service Controls. - * https://cloud.google.com/vpc/docs/configure-private-service-connect-apis - * - * Generated from protobuf enum GOOGLE_API_VPC_SC = 6; - */ - const GOOGLE_API_VPC_SC = 6; - - private static $valueToName = [ - self::GOOGLE_SERVICE_TYPE_UNSPECIFIED => 'GOOGLE_SERVICE_TYPE_UNSPECIFIED', - self::IAP => 'IAP', - self::GFE_PROXY_OR_HEALTH_CHECK_PROBER => 'GFE_PROXY_OR_HEALTH_CHECK_PROBER', - self::CLOUD_DNS => 'CLOUD_DNS', - self::GOOGLE_API => 'GOOGLE_API', - self::GOOGLE_API_PSC => 'GOOGLE_API_PSC', - self::GOOGLE_API_VPC_SC => 'GOOGLE_API_VPC_SC', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(GoogleServiceType::class, \Google\Cloud\NetworkManagement\V1\GoogleServiceInfo_GoogleServiceType::class); - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/InstanceInfo.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/InstanceInfo.php deleted file mode 100644 index a4e9c57509fd..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/InstanceInfo.php +++ /dev/null @@ -1,344 +0,0 @@ -google.cloud.networkmanagement.v1.InstanceInfo - */ -class InstanceInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Name of a Compute Engine instance. - * - * Generated from protobuf field string display_name = 1; - */ - protected $display_name = ''; - /** - * URI of a Compute Engine instance. - * - * Generated from protobuf field string uri = 2; - */ - protected $uri = ''; - /** - * Name of the network interface of a Compute Engine instance. - * - * Generated from protobuf field string interface = 3; - */ - protected $interface = ''; - /** - * URI of a Compute Engine network. - * - * Generated from protobuf field string network_uri = 4; - */ - protected $network_uri = ''; - /** - * Internal IP address of the network interface. - * - * Generated from protobuf field string internal_ip = 5; - */ - protected $internal_ip = ''; - /** - * External IP address of the network interface. - * - * Generated from protobuf field string external_ip = 6; - */ - protected $external_ip = ''; - /** - * Network tags configured on the instance. - * - * Generated from protobuf field repeated string network_tags = 7; - */ - private $network_tags; - /** - * Service account authorized for the instance. - * - * Generated from protobuf field string service_account = 8 [deprecated = true]; - * @deprecated - */ - protected $service_account = ''; - /** - * URI of the PSC network attachment the NIC is attached to (if relevant). - * - * Generated from protobuf field string psc_network_attachment_uri = 9; - */ - protected $psc_network_attachment_uri = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $display_name - * Name of a Compute Engine instance. - * @type string $uri - * URI of a Compute Engine instance. - * @type string $interface - * Name of the network interface of a Compute Engine instance. - * @type string $network_uri - * URI of a Compute Engine network. - * @type string $internal_ip - * Internal IP address of the network interface. - * @type string $external_ip - * External IP address of the network interface. - * @type array|\Google\Protobuf\Internal\RepeatedField $network_tags - * Network tags configured on the instance. - * @type string $service_account - * Service account authorized for the instance. - * @type string $psc_network_attachment_uri - * URI of the PSC network attachment the NIC is attached to (if relevant). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkmanagement\V1\Trace::initOnce(); - parent::__construct($data); - } - - /** - * Name of a Compute Engine instance. - * - * Generated from protobuf field string display_name = 1; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Name of a Compute Engine instance. - * - * Generated from protobuf field string display_name = 1; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * URI of a Compute Engine instance. - * - * Generated from protobuf field string uri = 2; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * URI of a Compute Engine instance. - * - * Generated from protobuf field string uri = 2; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - - /** - * Name of the network interface of a Compute Engine instance. - * - * Generated from protobuf field string interface = 3; - * @return string - */ - public function getInterface() - { - return $this->interface; - } - - /** - * Name of the network interface of a Compute Engine instance. - * - * Generated from protobuf field string interface = 3; - * @param string $var - * @return $this - */ - public function setInterface($var) - { - GPBUtil::checkString($var, True); - $this->interface = $var; - - return $this; - } - - /** - * URI of a Compute Engine network. - * - * Generated from protobuf field string network_uri = 4; - * @return string - */ - public function getNetworkUri() - { - return $this->network_uri; - } - - /** - * URI of a Compute Engine network. - * - * Generated from protobuf field string network_uri = 4; - * @param string $var - * @return $this - */ - public function setNetworkUri($var) - { - GPBUtil::checkString($var, True); - $this->network_uri = $var; - - return $this; - } - - /** - * Internal IP address of the network interface. - * - * Generated from protobuf field string internal_ip = 5; - * @return string - */ - public function getInternalIp() - { - return $this->internal_ip; - } - - /** - * Internal IP address of the network interface. - * - * Generated from protobuf field string internal_ip = 5; - * @param string $var - * @return $this - */ - public function setInternalIp($var) - { - GPBUtil::checkString($var, True); - $this->internal_ip = $var; - - return $this; - } - - /** - * External IP address of the network interface. - * - * Generated from protobuf field string external_ip = 6; - * @return string - */ - public function getExternalIp() - { - return $this->external_ip; - } - - /** - * External IP address of the network interface. - * - * Generated from protobuf field string external_ip = 6; - * @param string $var - * @return $this - */ - public function setExternalIp($var) - { - GPBUtil::checkString($var, True); - $this->external_ip = $var; - - return $this; - } - - /** - * Network tags configured on the instance. - * - * Generated from protobuf field repeated string network_tags = 7; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNetworkTags() - { - return $this->network_tags; - } - - /** - * Network tags configured on the instance. - * - * Generated from protobuf field repeated string network_tags = 7; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNetworkTags($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->network_tags = $arr; - - return $this; - } - - /** - * Service account authorized for the instance. - * - * Generated from protobuf field string service_account = 8 [deprecated = true]; - * @return string - * @deprecated - */ - public function getServiceAccount() - { - @trigger_error('service_account is deprecated.', E_USER_DEPRECATED); - return $this->service_account; - } - - /** - * Service account authorized for the instance. - * - * Generated from protobuf field string service_account = 8 [deprecated = true]; - * @param string $var - * @return $this - * @deprecated - */ - public function setServiceAccount($var) - { - @trigger_error('service_account is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkString($var, True); - $this->service_account = $var; - - return $this; - } - - /** - * URI of the PSC network attachment the NIC is attached to (if relevant). - * - * Generated from protobuf field string psc_network_attachment_uri = 9; - * @return string - */ - public function getPscNetworkAttachmentUri() - { - return $this->psc_network_attachment_uri; - } - - /** - * URI of the PSC network attachment the NIC is attached to (if relevant). - * - * Generated from protobuf field string psc_network_attachment_uri = 9; - * @param string $var - * @return $this - */ - public function setPscNetworkAttachmentUri($var) - { - GPBUtil::checkString($var, True); - $this->psc_network_attachment_uri = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LatencyDistribution.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LatencyDistribution.php deleted file mode 100644 index 0c62df4ba113..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LatencyDistribution.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.networkmanagement.v1.LatencyDistribution - */ -class LatencyDistribution extends \Google\Protobuf\Internal\Message -{ - /** - * Representative latency percentiles. - * - * Generated from protobuf field repeated .google.cloud.networkmanagement.v1.LatencyPercentile latency_percentiles = 1; - */ - private $latency_percentiles; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\NetworkManagement\V1\LatencyPercentile>|\Google\Protobuf\Internal\RepeatedField $latency_percentiles - * Representative latency percentiles. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkmanagement\V1\ConnectivityTest::initOnce(); - parent::__construct($data); - } - - /** - * Representative latency percentiles. - * - * Generated from protobuf field repeated .google.cloud.networkmanagement.v1.LatencyPercentile latency_percentiles = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getLatencyPercentiles() - { - return $this->latency_percentiles; - } - - /** - * Representative latency percentiles. - * - * Generated from protobuf field repeated .google.cloud.networkmanagement.v1.LatencyPercentile latency_percentiles = 1; - * @param array<\Google\Cloud\NetworkManagement\V1\LatencyPercentile>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setLatencyPercentiles($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkManagement\V1\LatencyPercentile::class); - $this->latency_percentiles = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LatencyPercentile.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LatencyPercentile.php deleted file mode 100644 index 850e7f81bad8..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LatencyPercentile.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.networkmanagement.v1.LatencyPercentile - */ -class LatencyPercentile extends \Google\Protobuf\Internal\Message -{ - /** - * Percentage of samples this data point applies to. - * - * Generated from protobuf field int32 percent = 1; - */ - protected $percent = 0; - /** - * percent-th percentile of latency observed, in microseconds. - * Fraction of percent/100 of samples have latency lower or - * equal to the value of this field. - * - * Generated from protobuf field int64 latency_micros = 2; - */ - protected $latency_micros = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $percent - * Percentage of samples this data point applies to. - * @type int|string $latency_micros - * percent-th percentile of latency observed, in microseconds. - * Fraction of percent/100 of samples have latency lower or - * equal to the value of this field. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkmanagement\V1\ConnectivityTest::initOnce(); - parent::__construct($data); - } - - /** - * Percentage of samples this data point applies to. - * - * Generated from protobuf field int32 percent = 1; - * @return int - */ - public function getPercent() - { - return $this->percent; - } - - /** - * Percentage of samples this data point applies to. - * - * Generated from protobuf field int32 percent = 1; - * @param int $var - * @return $this - */ - public function setPercent($var) - { - GPBUtil::checkInt32($var); - $this->percent = $var; - - return $this; - } - - /** - * percent-th percentile of latency observed, in microseconds. - * Fraction of percent/100 of samples have latency lower or - * equal to the value of this field. - * - * Generated from protobuf field int64 latency_micros = 2; - * @return int|string - */ - public function getLatencyMicros() - { - return $this->latency_micros; - } - - /** - * percent-th percentile of latency observed, in microseconds. - * Fraction of percent/100 of samples have latency lower or - * equal to the value of this field. - * - * Generated from protobuf field int64 latency_micros = 2; - * @param int|string $var - * @return $this - */ - public function setLatencyMicros($var) - { - GPBUtil::checkInt64($var); - $this->latency_micros = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ListConnectivityTestsRequest.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ListConnectivityTestsRequest.php deleted file mode 100644 index 60845fff13b3..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ListConnectivityTestsRequest.php +++ /dev/null @@ -1,282 +0,0 @@ -google.cloud.networkmanagement.v1.ListConnectivityTestsRequest - */ -class ListConnectivityTestsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource of the Connectivity Tests: - * `projects/{project_id}/locations/global` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Number of `ConnectivityTests` to return. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * Page token from an earlier query, as returned in `next_page_token`. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * Lists the `ConnectivityTests` that match the filter expression. A filter - * expression filters the resources listed in the response. The expression - * must be of the form ` ` where operators: `<`, `>`, - * `<=`, - * `>=`, - * `!=`, `=`, `:` are supported (colon `:` represents a HAS operator which is - * roughly synonymous with equality). can refer to a proto or JSON - * field, or a synthetic field. Field names can be camelCase or snake_case. - * Examples: - * - Filter by name: - * name = "projects/proj-1/locations/global/connectivityTests/test-1 - * - Filter by labels: - * - Resources that have a key called `foo` - * labels.foo:* - * - Resources that have a key called `foo` whose value is `bar` - * labels.foo = bar - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - /** - * Field to use to sort the list. - * - * Generated from protobuf field string order_by = 5; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The parent resource of the Connectivity Tests: - * `projects/{project_id}/locations/global` - * Please see {@see ReachabilityServiceClient::projectName()} for help formatting this field. - * - * @return \Google\Cloud\NetworkManagement\V1\ListConnectivityTestsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource of the Connectivity Tests: - * `projects/{project_id}/locations/global` - * @type int $page_size - * Number of `ConnectivityTests` to return. - * @type string $page_token - * Page token from an earlier query, as returned in `next_page_token`. - * @type string $filter - * Lists the `ConnectivityTests` that match the filter expression. A filter - * expression filters the resources listed in the response. The expression - * must be of the form ` ` where operators: `<`, `>`, - * `<=`, - * `>=`, - * `!=`, `=`, `:` are supported (colon `:` represents a HAS operator which is - * roughly synonymous with equality). can refer to a proto or JSON - * field, or a synthetic field. Field names can be camelCase or snake_case. - * Examples: - * - Filter by name: - * name = "projects/proj-1/locations/global/connectivityTests/test-1 - * - Filter by labels: - * - Resources that have a key called `foo` - * labels.foo:* - * - Resources that have a key called `foo` whose value is `bar` - * labels.foo = bar - * @type string $order_by - * Field to use to sort the list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkmanagement\V1\Reachability::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource of the Connectivity Tests: - * `projects/{project_id}/locations/global` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource of the Connectivity Tests: - * `projects/{project_id}/locations/global` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Number of `ConnectivityTests` to return. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Number of `ConnectivityTests` to return. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Page token from an earlier query, as returned in `next_page_token`. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Page token from an earlier query, as returned in `next_page_token`. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Lists the `ConnectivityTests` that match the filter expression. A filter - * expression filters the resources listed in the response. The expression - * must be of the form ` ` where operators: `<`, `>`, - * `<=`, - * `>=`, - * `!=`, `=`, `:` are supported (colon `:` represents a HAS operator which is - * roughly synonymous with equality). can refer to a proto or JSON - * field, or a synthetic field. Field names can be camelCase or snake_case. - * Examples: - * - Filter by name: - * name = "projects/proj-1/locations/global/connectivityTests/test-1 - * - Filter by labels: - * - Resources that have a key called `foo` - * labels.foo:* - * - Resources that have a key called `foo` whose value is `bar` - * labels.foo = bar - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Lists the `ConnectivityTests` that match the filter expression. A filter - * expression filters the resources listed in the response. The expression - * must be of the form ` ` where operators: `<`, `>`, - * `<=`, - * `>=`, - * `!=`, `=`, `:` are supported (colon `:` represents a HAS operator which is - * roughly synonymous with equality). can refer to a proto or JSON - * field, or a synthetic field. Field names can be camelCase or snake_case. - * Examples: - * - Filter by name: - * name = "projects/proj-1/locations/global/connectivityTests/test-1 - * - Filter by labels: - * - Resources that have a key called `foo` - * labels.foo:* - * - Resources that have a key called `foo` whose value is `bar` - * labels.foo = bar - * - * Generated from protobuf field string filter = 4; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Field to use to sort the list. - * - * Generated from protobuf field string order_by = 5; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Field to use to sort the list. - * - * Generated from protobuf field string order_by = 5; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ListConnectivityTestsResponse.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ListConnectivityTestsResponse.php deleted file mode 100644 index c026cd03326a..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ListConnectivityTestsResponse.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.networkmanagement.v1.ListConnectivityTestsResponse - */ -class ListConnectivityTestsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * List of Connectivity Tests. - * - * Generated from protobuf field repeated .google.cloud.networkmanagement.v1.ConnectivityTest resources = 1; - */ - private $resources; - /** - * Page token to fetch the next set of Connectivity Tests. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Locations that could not be reached (when querying all locations with `-`). - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\NetworkManagement\V1\ConnectivityTest>|\Google\Protobuf\Internal\RepeatedField $resources - * List of Connectivity Tests. - * @type string $next_page_token - * Page token to fetch the next set of Connectivity Tests. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached (when querying all locations with `-`). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkmanagement\V1\Reachability::initOnce(); - parent::__construct($data); - } - - /** - * List of Connectivity Tests. - * - * Generated from protobuf field repeated .google.cloud.networkmanagement.v1.ConnectivityTest resources = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getResources() - { - return $this->resources; - } - - /** - * List of Connectivity Tests. - * - * Generated from protobuf field repeated .google.cloud.networkmanagement.v1.ConnectivityTest resources = 1; - * @param array<\Google\Cloud\NetworkManagement\V1\ConnectivityTest>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setResources($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkManagement\V1\ConnectivityTest::class); - $this->resources = $arr; - - return $this; - } - - /** - * Page token to fetch the next set of Connectivity Tests. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Page token to fetch the next set of Connectivity Tests. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Locations that could not be reached (when querying all locations with `-`). - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached (when querying all locations with `-`). - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LoadBalancerBackend.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LoadBalancerBackend.php deleted file mode 100644 index b4b0114164fb..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LoadBalancerBackend.php +++ /dev/null @@ -1,203 +0,0 @@ -google.cloud.networkmanagement.v1.LoadBalancerBackend - */ -class LoadBalancerBackend extends \Google\Protobuf\Internal\Message -{ - /** - * Name of a Compute Engine instance or network endpoint. - * - * Generated from protobuf field string display_name = 1; - */ - protected $display_name = ''; - /** - * URI of a Compute Engine instance or network endpoint. - * - * Generated from protobuf field string uri = 2; - */ - protected $uri = ''; - /** - * State of the health check firewall configuration. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState health_check_firewall_state = 3; - */ - protected $health_check_firewall_state = 0; - /** - * A list of firewall rule URIs allowing probes from health check IP ranges. - * - * Generated from protobuf field repeated string health_check_allowing_firewall_rules = 4; - */ - private $health_check_allowing_firewall_rules; - /** - * A list of firewall rule URIs blocking probes from health check IP ranges. - * - * Generated from protobuf field repeated string health_check_blocking_firewall_rules = 5; - */ - private $health_check_blocking_firewall_rules; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $display_name - * Name of a Compute Engine instance or network endpoint. - * @type string $uri - * URI of a Compute Engine instance or network endpoint. - * @type int $health_check_firewall_state - * State of the health check firewall configuration. - * @type array|\Google\Protobuf\Internal\RepeatedField $health_check_allowing_firewall_rules - * A list of firewall rule URIs allowing probes from health check IP ranges. - * @type array|\Google\Protobuf\Internal\RepeatedField $health_check_blocking_firewall_rules - * A list of firewall rule URIs blocking probes from health check IP ranges. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkmanagement\V1\Trace::initOnce(); - parent::__construct($data); - } - - /** - * Name of a Compute Engine instance or network endpoint. - * - * Generated from protobuf field string display_name = 1; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Name of a Compute Engine instance or network endpoint. - * - * Generated from protobuf field string display_name = 1; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * URI of a Compute Engine instance or network endpoint. - * - * Generated from protobuf field string uri = 2; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * URI of a Compute Engine instance or network endpoint. - * - * Generated from protobuf field string uri = 2; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - - /** - * State of the health check firewall configuration. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState health_check_firewall_state = 3; - * @return int - */ - public function getHealthCheckFirewallState() - { - return $this->health_check_firewall_state; - } - - /** - * State of the health check firewall configuration. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState health_check_firewall_state = 3; - * @param int $var - * @return $this - */ - public function setHealthCheckFirewallState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\NetworkManagement\V1\LoadBalancerBackend\HealthCheckFirewallState::class); - $this->health_check_firewall_state = $var; - - return $this; - } - - /** - * A list of firewall rule URIs allowing probes from health check IP ranges. - * - * Generated from protobuf field repeated string health_check_allowing_firewall_rules = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getHealthCheckAllowingFirewallRules() - { - return $this->health_check_allowing_firewall_rules; - } - - /** - * A list of firewall rule URIs allowing probes from health check IP ranges. - * - * Generated from protobuf field repeated string health_check_allowing_firewall_rules = 4; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setHealthCheckAllowingFirewallRules($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->health_check_allowing_firewall_rules = $arr; - - return $this; - } - - /** - * A list of firewall rule URIs blocking probes from health check IP ranges. - * - * Generated from protobuf field repeated string health_check_blocking_firewall_rules = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getHealthCheckBlockingFirewallRules() - { - return $this->health_check_blocking_firewall_rules; - } - - /** - * A list of firewall rule URIs blocking probes from health check IP ranges. - * - * Generated from protobuf field repeated string health_check_blocking_firewall_rules = 5; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setHealthCheckBlockingFirewallRules($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->health_check_blocking_firewall_rules = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LoadBalancerBackend/HealthCheckFirewallState.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LoadBalancerBackend/HealthCheckFirewallState.php deleted file mode 100644 index ebf941b4b52e..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LoadBalancerBackend/HealthCheckFirewallState.php +++ /dev/null @@ -1,69 +0,0 @@ -google.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState - */ -class HealthCheckFirewallState -{ - /** - * State is unspecified. Default state if not populated. - * - * Generated from protobuf enum HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED = 0; - */ - const HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED = 0; - /** - * There are configured firewall rules to allow health check probes to the - * backend. - * - * Generated from protobuf enum CONFIGURED = 1; - */ - const CONFIGURED = 1; - /** - * There are firewall rules configured to allow partial health check ranges - * or block all health check ranges. - * If a health check probe is sent from denied IP ranges, - * the health check to the backend will fail. Then, the backend will be - * marked unhealthy and will not receive traffic sent to the load balancer. - * - * Generated from protobuf enum MISCONFIGURED = 2; - */ - const MISCONFIGURED = 2; - - private static $valueToName = [ - self::HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED => 'HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED', - self::CONFIGURED => 'CONFIGURED', - self::MISCONFIGURED => 'MISCONFIGURED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(HealthCheckFirewallState::class, \Google\Cloud\NetworkManagement\V1\LoadBalancerBackend_HealthCheckFirewallState::class); - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LoadBalancerBackendInfo.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LoadBalancerBackendInfo.php deleted file mode 100644 index 0fb0d2efa27b..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LoadBalancerBackendInfo.php +++ /dev/null @@ -1,409 +0,0 @@ -google.cloud.networkmanagement.v1.LoadBalancerBackendInfo - */ -class LoadBalancerBackendInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Display name of the backend. For example, it might be an instance name for - * the instance group backends, or an IP address and port for zonal network - * endpoint group backends. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * URI of the backend instance (if applicable). Populated for instance group - * backends, and zonal NEG backends. - * - * Generated from protobuf field string instance_uri = 2; - */ - protected $instance_uri = ''; - /** - * URI of the backend service this backend belongs to (if applicable). - * - * Generated from protobuf field string backend_service_uri = 3; - */ - protected $backend_service_uri = ''; - /** - * URI of the instance group this backend belongs to (if applicable). - * - * Generated from protobuf field string instance_group_uri = 4; - */ - protected $instance_group_uri = ''; - /** - * URI of the network endpoint group this backend belongs to (if applicable). - * - * Generated from protobuf field string network_endpoint_group_uri = 5; - */ - protected $network_endpoint_group_uri = ''; - /** - * URI of the backend bucket this backend targets (if applicable). - * - * Generated from protobuf field string backend_bucket_uri = 8; - */ - protected $backend_bucket_uri = ''; - /** - * URI of the PSC service attachment this PSC NEG backend targets (if - * applicable). - * - * Generated from protobuf field string psc_service_attachment_uri = 9; - */ - protected $psc_service_attachment_uri = ''; - /** - * PSC Google API target this PSC NEG backend targets (if applicable). - * - * Generated from protobuf field string psc_google_api_target = 10; - */ - protected $psc_google_api_target = ''; - /** - * URI of the health check attached to this backend (if applicable). - * - * Generated from protobuf field string health_check_uri = 6; - */ - protected $health_check_uri = ''; - /** - * Output only. Health check firewalls configuration state for the backend. - * This is a result of the static firewall analysis (verifying that health - * check traffic from required IP ranges to the backend is allowed or not). - * The backend might still be unhealthy even if these firewalls are - * configured. Please refer to the documentation for more information: - * https://cloud.google.com/load-balancing/docs/firewall-rules - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigState health_check_firewalls_config_state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $health_check_firewalls_config_state = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Display name of the backend. For example, it might be an instance name for - * the instance group backends, or an IP address and port for zonal network - * endpoint group backends. - * @type string $instance_uri - * URI of the backend instance (if applicable). Populated for instance group - * backends, and zonal NEG backends. - * @type string $backend_service_uri - * URI of the backend service this backend belongs to (if applicable). - * @type string $instance_group_uri - * URI of the instance group this backend belongs to (if applicable). - * @type string $network_endpoint_group_uri - * URI of the network endpoint group this backend belongs to (if applicable). - * @type string $backend_bucket_uri - * URI of the backend bucket this backend targets (if applicable). - * @type string $psc_service_attachment_uri - * URI of the PSC service attachment this PSC NEG backend targets (if - * applicable). - * @type string $psc_google_api_target - * PSC Google API target this PSC NEG backend targets (if applicable). - * @type string $health_check_uri - * URI of the health check attached to this backend (if applicable). - * @type int $health_check_firewalls_config_state - * Output only. Health check firewalls configuration state for the backend. - * This is a result of the static firewall analysis (verifying that health - * check traffic from required IP ranges to the backend is allowed or not). - * The backend might still be unhealthy even if these firewalls are - * configured. Please refer to the documentation for more information: - * https://cloud.google.com/load-balancing/docs/firewall-rules - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkmanagement\V1\Trace::initOnce(); - parent::__construct($data); - } - - /** - * Display name of the backend. For example, it might be an instance name for - * the instance group backends, or an IP address and port for zonal network - * endpoint group backends. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Display name of the backend. For example, it might be an instance name for - * the instance group backends, or an IP address and port for zonal network - * endpoint group backends. - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * URI of the backend instance (if applicable). Populated for instance group - * backends, and zonal NEG backends. - * - * Generated from protobuf field string instance_uri = 2; - * @return string - */ - public function getInstanceUri() - { - return $this->instance_uri; - } - - /** - * URI of the backend instance (if applicable). Populated for instance group - * backends, and zonal NEG backends. - * - * Generated from protobuf field string instance_uri = 2; - * @param string $var - * @return $this - */ - public function setInstanceUri($var) - { - GPBUtil::checkString($var, True); - $this->instance_uri = $var; - - return $this; - } - - /** - * URI of the backend service this backend belongs to (if applicable). - * - * Generated from protobuf field string backend_service_uri = 3; - * @return string - */ - public function getBackendServiceUri() - { - return $this->backend_service_uri; - } - - /** - * URI of the backend service this backend belongs to (if applicable). - * - * Generated from protobuf field string backend_service_uri = 3; - * @param string $var - * @return $this - */ - public function setBackendServiceUri($var) - { - GPBUtil::checkString($var, True); - $this->backend_service_uri = $var; - - return $this; - } - - /** - * URI of the instance group this backend belongs to (if applicable). - * - * Generated from protobuf field string instance_group_uri = 4; - * @return string - */ - public function getInstanceGroupUri() - { - return $this->instance_group_uri; - } - - /** - * URI of the instance group this backend belongs to (if applicable). - * - * Generated from protobuf field string instance_group_uri = 4; - * @param string $var - * @return $this - */ - public function setInstanceGroupUri($var) - { - GPBUtil::checkString($var, True); - $this->instance_group_uri = $var; - - return $this; - } - - /** - * URI of the network endpoint group this backend belongs to (if applicable). - * - * Generated from protobuf field string network_endpoint_group_uri = 5; - * @return string - */ - public function getNetworkEndpointGroupUri() - { - return $this->network_endpoint_group_uri; - } - - /** - * URI of the network endpoint group this backend belongs to (if applicable). - * - * Generated from protobuf field string network_endpoint_group_uri = 5; - * @param string $var - * @return $this - */ - public function setNetworkEndpointGroupUri($var) - { - GPBUtil::checkString($var, True); - $this->network_endpoint_group_uri = $var; - - return $this; - } - - /** - * URI of the backend bucket this backend targets (if applicable). - * - * Generated from protobuf field string backend_bucket_uri = 8; - * @return string - */ - public function getBackendBucketUri() - { - return $this->backend_bucket_uri; - } - - /** - * URI of the backend bucket this backend targets (if applicable). - * - * Generated from protobuf field string backend_bucket_uri = 8; - * @param string $var - * @return $this - */ - public function setBackendBucketUri($var) - { - GPBUtil::checkString($var, True); - $this->backend_bucket_uri = $var; - - return $this; - } - - /** - * URI of the PSC service attachment this PSC NEG backend targets (if - * applicable). - * - * Generated from protobuf field string psc_service_attachment_uri = 9; - * @return string - */ - public function getPscServiceAttachmentUri() - { - return $this->psc_service_attachment_uri; - } - - /** - * URI of the PSC service attachment this PSC NEG backend targets (if - * applicable). - * - * Generated from protobuf field string psc_service_attachment_uri = 9; - * @param string $var - * @return $this - */ - public function setPscServiceAttachmentUri($var) - { - GPBUtil::checkString($var, True); - $this->psc_service_attachment_uri = $var; - - return $this; - } - - /** - * PSC Google API target this PSC NEG backend targets (if applicable). - * - * Generated from protobuf field string psc_google_api_target = 10; - * @return string - */ - public function getPscGoogleApiTarget() - { - return $this->psc_google_api_target; - } - - /** - * PSC Google API target this PSC NEG backend targets (if applicable). - * - * Generated from protobuf field string psc_google_api_target = 10; - * @param string $var - * @return $this - */ - public function setPscGoogleApiTarget($var) - { - GPBUtil::checkString($var, True); - $this->psc_google_api_target = $var; - - return $this; - } - - /** - * URI of the health check attached to this backend (if applicable). - * - * Generated from protobuf field string health_check_uri = 6; - * @return string - */ - public function getHealthCheckUri() - { - return $this->health_check_uri; - } - - /** - * URI of the health check attached to this backend (if applicable). - * - * Generated from protobuf field string health_check_uri = 6; - * @param string $var - * @return $this - */ - public function setHealthCheckUri($var) - { - GPBUtil::checkString($var, True); - $this->health_check_uri = $var; - - return $this; - } - - /** - * Output only. Health check firewalls configuration state for the backend. - * This is a result of the static firewall analysis (verifying that health - * check traffic from required IP ranges to the backend is allowed or not). - * The backend might still be unhealthy even if these firewalls are - * configured. Please refer to the documentation for more information: - * https://cloud.google.com/load-balancing/docs/firewall-rules - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigState health_check_firewalls_config_state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getHealthCheckFirewallsConfigState() - { - return $this->health_check_firewalls_config_state; - } - - /** - * Output only. Health check firewalls configuration state for the backend. - * This is a result of the static firewall analysis (verifying that health - * check traffic from required IP ranges to the backend is allowed or not). - * The backend might still be unhealthy even if these firewalls are - * configured. Please refer to the documentation for more information: - * https://cloud.google.com/load-balancing/docs/firewall-rules - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigState health_check_firewalls_config_state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setHealthCheckFirewallsConfigState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\NetworkManagement\V1\LoadBalancerBackendInfo\HealthCheckFirewallsConfigState::class); - $this->health_check_firewalls_config_state = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LoadBalancerBackendInfo/HealthCheckFirewallsConfigState.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LoadBalancerBackendInfo/HealthCheckFirewallsConfigState.php deleted file mode 100644 index 4ca34e3878b2..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LoadBalancerBackendInfo/HealthCheckFirewallsConfigState.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigState - */ -class HealthCheckFirewallsConfigState -{ - /** - * Configuration state unspecified. It usually means that the backend has - * no health check attached, or there was an unexpected configuration error - * preventing Connectivity tests from verifying health check configuration. - * - * Generated from protobuf enum HEALTH_CHECK_FIREWALLS_CONFIG_STATE_UNSPECIFIED = 0; - */ - const HEALTH_CHECK_FIREWALLS_CONFIG_STATE_UNSPECIFIED = 0; - /** - * Firewall rules (policies) allowing health check traffic from all required - * IP ranges to the backend are configured. - * - * Generated from protobuf enum FIREWALLS_CONFIGURED = 1; - */ - const FIREWALLS_CONFIGURED = 1; - /** - * Firewall rules (policies) allow health check traffic only from a part of - * required IP ranges. - * - * Generated from protobuf enum FIREWALLS_PARTIALLY_CONFIGURED = 2; - */ - const FIREWALLS_PARTIALLY_CONFIGURED = 2; - /** - * Firewall rules (policies) deny health check traffic from all required - * IP ranges to the backend. - * - * Generated from protobuf enum FIREWALLS_NOT_CONFIGURED = 3; - */ - const FIREWALLS_NOT_CONFIGURED = 3; - /** - * The network contains firewall rules of unsupported types, so Connectivity - * tests were not able to verify health check configuration status. Please - * refer to the documentation for the list of unsupported configurations: - * https://cloud.google.com/network-intelligence-center/docs/connectivity-tests/concepts/overview#unsupported-configs - * - * Generated from protobuf enum FIREWALLS_UNSUPPORTED = 4; - */ - const FIREWALLS_UNSUPPORTED = 4; - - private static $valueToName = [ - self::HEALTH_CHECK_FIREWALLS_CONFIG_STATE_UNSPECIFIED => 'HEALTH_CHECK_FIREWALLS_CONFIG_STATE_UNSPECIFIED', - self::FIREWALLS_CONFIGURED => 'FIREWALLS_CONFIGURED', - self::FIREWALLS_PARTIALLY_CONFIGURED => 'FIREWALLS_PARTIALLY_CONFIGURED', - self::FIREWALLS_NOT_CONFIGURED => 'FIREWALLS_NOT_CONFIGURED', - self::FIREWALLS_UNSUPPORTED => 'FIREWALLS_UNSUPPORTED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(HealthCheckFirewallsConfigState::class, \Google\Cloud\NetworkManagement\V1\LoadBalancerBackendInfo_HealthCheckFirewallsConfigState::class); - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LoadBalancerInfo.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LoadBalancerInfo.php deleted file mode 100644 index a2d316979dcf..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LoadBalancerInfo.php +++ /dev/null @@ -1,216 +0,0 @@ -google.cloud.networkmanagement.v1.LoadBalancerInfo - */ -class LoadBalancerInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Type of the load balancer. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType load_balancer_type = 1; - */ - protected $load_balancer_type = 0; - /** - * URI of the health check for the load balancer. Deprecated and no longer - * populated as different load balancer backends might have different health - * checks. - * - * Generated from protobuf field string health_check_uri = 2 [deprecated = true]; - * @deprecated - */ - protected $health_check_uri = ''; - /** - * Information for the loadbalancer backends. - * - * Generated from protobuf field repeated .google.cloud.networkmanagement.v1.LoadBalancerBackend backends = 3; - */ - private $backends; - /** - * Type of load balancer's backend configuration. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType backend_type = 4; - */ - protected $backend_type = 0; - /** - * Backend configuration URI. - * - * Generated from protobuf field string backend_uri = 5; - */ - protected $backend_uri = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $load_balancer_type - * Type of the load balancer. - * @type string $health_check_uri - * URI of the health check for the load balancer. Deprecated and no longer - * populated as different load balancer backends might have different health - * checks. - * @type array<\Google\Cloud\NetworkManagement\V1\LoadBalancerBackend>|\Google\Protobuf\Internal\RepeatedField $backends - * Information for the loadbalancer backends. - * @type int $backend_type - * Type of load balancer's backend configuration. - * @type string $backend_uri - * Backend configuration URI. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkmanagement\V1\Trace::initOnce(); - parent::__construct($data); - } - - /** - * Type of the load balancer. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType load_balancer_type = 1; - * @return int - */ - public function getLoadBalancerType() - { - return $this->load_balancer_type; - } - - /** - * Type of the load balancer. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType load_balancer_type = 1; - * @param int $var - * @return $this - */ - public function setLoadBalancerType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\NetworkManagement\V1\LoadBalancerInfo\LoadBalancerType::class); - $this->load_balancer_type = $var; - - return $this; - } - - /** - * URI of the health check for the load balancer. Deprecated and no longer - * populated as different load balancer backends might have different health - * checks. - * - * Generated from protobuf field string health_check_uri = 2 [deprecated = true]; - * @return string - * @deprecated - */ - public function getHealthCheckUri() - { - @trigger_error('health_check_uri is deprecated.', E_USER_DEPRECATED); - return $this->health_check_uri; - } - - /** - * URI of the health check for the load balancer. Deprecated and no longer - * populated as different load balancer backends might have different health - * checks. - * - * Generated from protobuf field string health_check_uri = 2 [deprecated = true]; - * @param string $var - * @return $this - * @deprecated - */ - public function setHealthCheckUri($var) - { - @trigger_error('health_check_uri is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkString($var, True); - $this->health_check_uri = $var; - - return $this; - } - - /** - * Information for the loadbalancer backends. - * - * Generated from protobuf field repeated .google.cloud.networkmanagement.v1.LoadBalancerBackend backends = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getBackends() - { - return $this->backends; - } - - /** - * Information for the loadbalancer backends. - * - * Generated from protobuf field repeated .google.cloud.networkmanagement.v1.LoadBalancerBackend backends = 3; - * @param array<\Google\Cloud\NetworkManagement\V1\LoadBalancerBackend>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setBackends($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkManagement\V1\LoadBalancerBackend::class); - $this->backends = $arr; - - return $this; - } - - /** - * Type of load balancer's backend configuration. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType backend_type = 4; - * @return int - */ - public function getBackendType() - { - return $this->backend_type; - } - - /** - * Type of load balancer's backend configuration. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType backend_type = 4; - * @param int $var - * @return $this - */ - public function setBackendType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\NetworkManagement\V1\LoadBalancerInfo\BackendType::class); - $this->backend_type = $var; - - return $this; - } - - /** - * Backend configuration URI. - * - * Generated from protobuf field string backend_uri = 5; - * @return string - */ - public function getBackendUri() - { - return $this->backend_uri; - } - - /** - * Backend configuration URI. - * - * Generated from protobuf field string backend_uri = 5; - * @param string $var - * @return $this - */ - public function setBackendUri($var) - { - GPBUtil::checkString($var, True); - $this->backend_uri = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LoadBalancerInfo/BackendType.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LoadBalancerInfo/BackendType.php deleted file mode 100644 index 6b984fd67be6..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LoadBalancerInfo/BackendType.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType - */ -class BackendType -{ - /** - * Type is unspecified. - * - * Generated from protobuf enum BACKEND_TYPE_UNSPECIFIED = 0; - */ - const BACKEND_TYPE_UNSPECIFIED = 0; - /** - * Backend Service as the load balancer's backend. - * - * Generated from protobuf enum BACKEND_SERVICE = 1; - */ - const BACKEND_SERVICE = 1; - /** - * Target Pool as the load balancer's backend. - * - * Generated from protobuf enum TARGET_POOL = 2; - */ - const TARGET_POOL = 2; - /** - * Target Instance as the load balancer's backend. - * - * Generated from protobuf enum TARGET_INSTANCE = 3; - */ - const TARGET_INSTANCE = 3; - - private static $valueToName = [ - self::BACKEND_TYPE_UNSPECIFIED => 'BACKEND_TYPE_UNSPECIFIED', - self::BACKEND_SERVICE => 'BACKEND_SERVICE', - self::TARGET_POOL => 'TARGET_POOL', - self::TARGET_INSTANCE => 'TARGET_INSTANCE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(BackendType::class, \Google\Cloud\NetworkManagement\V1\LoadBalancerInfo_BackendType::class); - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LoadBalancerInfo/LoadBalancerType.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LoadBalancerInfo/LoadBalancerType.php deleted file mode 100644 index ee000a238478..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LoadBalancerInfo/LoadBalancerType.php +++ /dev/null @@ -1,85 +0,0 @@ -google.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType - */ -class LoadBalancerType -{ - /** - * Type is unspecified. - * - * Generated from protobuf enum LOAD_BALANCER_TYPE_UNSPECIFIED = 0; - */ - const LOAD_BALANCER_TYPE_UNSPECIFIED = 0; - /** - * Internal TCP/UDP load balancer. - * - * Generated from protobuf enum INTERNAL_TCP_UDP = 1; - */ - const INTERNAL_TCP_UDP = 1; - /** - * Network TCP/UDP load balancer. - * - * Generated from protobuf enum NETWORK_TCP_UDP = 2; - */ - const NETWORK_TCP_UDP = 2; - /** - * HTTP(S) proxy load balancer. - * - * Generated from protobuf enum HTTP_PROXY = 3; - */ - const HTTP_PROXY = 3; - /** - * TCP proxy load balancer. - * - * Generated from protobuf enum TCP_PROXY = 4; - */ - const TCP_PROXY = 4; - /** - * SSL proxy load balancer. - * - * Generated from protobuf enum SSL_PROXY = 5; - */ - const SSL_PROXY = 5; - - private static $valueToName = [ - self::LOAD_BALANCER_TYPE_UNSPECIFIED => 'LOAD_BALANCER_TYPE_UNSPECIFIED', - self::INTERNAL_TCP_UDP => 'INTERNAL_TCP_UDP', - self::NETWORK_TCP_UDP => 'NETWORK_TCP_UDP', - self::HTTP_PROXY => 'HTTP_PROXY', - self::TCP_PROXY => 'TCP_PROXY', - self::SSL_PROXY => 'SSL_PROXY', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(LoadBalancerType::class, \Google\Cloud\NetworkManagement\V1\LoadBalancerInfo_LoadBalancerType::class); - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LoadBalancerType.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LoadBalancerType.php deleted file mode 100644 index 12dcb4c5e14b..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/LoadBalancerType.php +++ /dev/null @@ -1,120 +0,0 @@ -google.cloud.networkmanagement.v1.LoadBalancerType - */ -class LoadBalancerType -{ - /** - * Forwarding rule points to a different target than a load balancer or a - * load balancer type is unknown. - * - * Generated from protobuf enum LOAD_BALANCER_TYPE_UNSPECIFIED = 0; - */ - const LOAD_BALANCER_TYPE_UNSPECIFIED = 0; - /** - * Global external HTTP(S) load balancer. - * - * Generated from protobuf enum HTTPS_ADVANCED_LOAD_BALANCER = 1; - */ - const HTTPS_ADVANCED_LOAD_BALANCER = 1; - /** - * Global external HTTP(S) load balancer (classic) - * - * Generated from protobuf enum HTTPS_LOAD_BALANCER = 2; - */ - const HTTPS_LOAD_BALANCER = 2; - /** - * Regional external HTTP(S) load balancer. - * - * Generated from protobuf enum REGIONAL_HTTPS_LOAD_BALANCER = 3; - */ - const REGIONAL_HTTPS_LOAD_BALANCER = 3; - /** - * Internal HTTP(S) load balancer. - * - * Generated from protobuf enum INTERNAL_HTTPS_LOAD_BALANCER = 4; - */ - const INTERNAL_HTTPS_LOAD_BALANCER = 4; - /** - * External SSL proxy load balancer. - * - * Generated from protobuf enum SSL_PROXY_LOAD_BALANCER = 5; - */ - const SSL_PROXY_LOAD_BALANCER = 5; - /** - * External TCP proxy load balancer. - * - * Generated from protobuf enum TCP_PROXY_LOAD_BALANCER = 6; - */ - const TCP_PROXY_LOAD_BALANCER = 6; - /** - * Internal regional TCP proxy load balancer. - * - * Generated from protobuf enum INTERNAL_TCP_PROXY_LOAD_BALANCER = 7; - */ - const INTERNAL_TCP_PROXY_LOAD_BALANCER = 7; - /** - * External TCP/UDP Network load balancer. - * - * Generated from protobuf enum NETWORK_LOAD_BALANCER = 8; - */ - const NETWORK_LOAD_BALANCER = 8; - /** - * Target-pool based external TCP/UDP Network load balancer. - * - * Generated from protobuf enum LEGACY_NETWORK_LOAD_BALANCER = 9; - */ - const LEGACY_NETWORK_LOAD_BALANCER = 9; - /** - * Internal TCP/UDP load balancer. - * - * Generated from protobuf enum TCP_UDP_INTERNAL_LOAD_BALANCER = 10; - */ - const TCP_UDP_INTERNAL_LOAD_BALANCER = 10; - - private static $valueToName = [ - self::LOAD_BALANCER_TYPE_UNSPECIFIED => 'LOAD_BALANCER_TYPE_UNSPECIFIED', - self::HTTPS_ADVANCED_LOAD_BALANCER => 'HTTPS_ADVANCED_LOAD_BALANCER', - self::HTTPS_LOAD_BALANCER => 'HTTPS_LOAD_BALANCER', - self::REGIONAL_HTTPS_LOAD_BALANCER => 'REGIONAL_HTTPS_LOAD_BALANCER', - self::INTERNAL_HTTPS_LOAD_BALANCER => 'INTERNAL_HTTPS_LOAD_BALANCER', - self::SSL_PROXY_LOAD_BALANCER => 'SSL_PROXY_LOAD_BALANCER', - self::TCP_PROXY_LOAD_BALANCER => 'TCP_PROXY_LOAD_BALANCER', - self::INTERNAL_TCP_PROXY_LOAD_BALANCER => 'INTERNAL_TCP_PROXY_LOAD_BALANCER', - self::NETWORK_LOAD_BALANCER => 'NETWORK_LOAD_BALANCER', - self::LEGACY_NETWORK_LOAD_BALANCER => 'LEGACY_NETWORK_LOAD_BALANCER', - self::TCP_UDP_INTERNAL_LOAD_BALANCER => 'TCP_UDP_INTERNAL_LOAD_BALANCER', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/NatInfo.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/NatInfo.php deleted file mode 100644 index 0b290c387878..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/NatInfo.php +++ /dev/null @@ -1,483 +0,0 @@ -google.cloud.networkmanagement.v1.NatInfo - */ -class NatInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Type of NAT. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.NatInfo.Type type = 1; - */ - protected $type = 0; - /** - * IP protocol in string format, for example: "TCP", "UDP", "ICMP". - * - * Generated from protobuf field string protocol = 2; - */ - protected $protocol = ''; - /** - * URI of the network where NAT translation takes place. - * - * Generated from protobuf field string network_uri = 3; - */ - protected $network_uri = ''; - /** - * Source IP address before NAT translation. - * - * Generated from protobuf field string old_source_ip = 4; - */ - protected $old_source_ip = ''; - /** - * Source IP address after NAT translation. - * - * Generated from protobuf field string new_source_ip = 5; - */ - protected $new_source_ip = ''; - /** - * Destination IP address before NAT translation. - * - * Generated from protobuf field string old_destination_ip = 6; - */ - protected $old_destination_ip = ''; - /** - * Destination IP address after NAT translation. - * - * Generated from protobuf field string new_destination_ip = 7; - */ - protected $new_destination_ip = ''; - /** - * Source port before NAT translation. Only valid when protocol is TCP or UDP. - * - * Generated from protobuf field int32 old_source_port = 8; - */ - protected $old_source_port = 0; - /** - * Source port after NAT translation. Only valid when protocol is TCP or UDP. - * - * Generated from protobuf field int32 new_source_port = 9; - */ - protected $new_source_port = 0; - /** - * Destination port before NAT translation. Only valid when protocol is TCP or - * UDP. - * - * Generated from protobuf field int32 old_destination_port = 10; - */ - protected $old_destination_port = 0; - /** - * Destination port after NAT translation. Only valid when protocol is TCP or - * UDP. - * - * Generated from protobuf field int32 new_destination_port = 11; - */ - protected $new_destination_port = 0; - /** - * Uri of the Cloud Router. Only valid when type is CLOUD_NAT. - * - * Generated from protobuf field string router_uri = 12; - */ - protected $router_uri = ''; - /** - * The name of Cloud NAT Gateway. Only valid when type is CLOUD_NAT. - * - * Generated from protobuf field string nat_gateway_name = 13; - */ - protected $nat_gateway_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $type - * Type of NAT. - * @type string $protocol - * IP protocol in string format, for example: "TCP", "UDP", "ICMP". - * @type string $network_uri - * URI of the network where NAT translation takes place. - * @type string $old_source_ip - * Source IP address before NAT translation. - * @type string $new_source_ip - * Source IP address after NAT translation. - * @type string $old_destination_ip - * Destination IP address before NAT translation. - * @type string $new_destination_ip - * Destination IP address after NAT translation. - * @type int $old_source_port - * Source port before NAT translation. Only valid when protocol is TCP or UDP. - * @type int $new_source_port - * Source port after NAT translation. Only valid when protocol is TCP or UDP. - * @type int $old_destination_port - * Destination port before NAT translation. Only valid when protocol is TCP or - * UDP. - * @type int $new_destination_port - * Destination port after NAT translation. Only valid when protocol is TCP or - * UDP. - * @type string $router_uri - * Uri of the Cloud Router. Only valid when type is CLOUD_NAT. - * @type string $nat_gateway_name - * The name of Cloud NAT Gateway. Only valid when type is CLOUD_NAT. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkmanagement\V1\Trace::initOnce(); - parent::__construct($data); - } - - /** - * Type of NAT. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.NatInfo.Type type = 1; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Type of NAT. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.NatInfo.Type type = 1; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\NetworkManagement\V1\NatInfo\Type::class); - $this->type = $var; - - return $this; - } - - /** - * IP protocol in string format, for example: "TCP", "UDP", "ICMP". - * - * Generated from protobuf field string protocol = 2; - * @return string - */ - public function getProtocol() - { - return $this->protocol; - } - - /** - * IP protocol in string format, for example: "TCP", "UDP", "ICMP". - * - * Generated from protobuf field string protocol = 2; - * @param string $var - * @return $this - */ - public function setProtocol($var) - { - GPBUtil::checkString($var, True); - $this->protocol = $var; - - return $this; - } - - /** - * URI of the network where NAT translation takes place. - * - * Generated from protobuf field string network_uri = 3; - * @return string - */ - public function getNetworkUri() - { - return $this->network_uri; - } - - /** - * URI of the network where NAT translation takes place. - * - * Generated from protobuf field string network_uri = 3; - * @param string $var - * @return $this - */ - public function setNetworkUri($var) - { - GPBUtil::checkString($var, True); - $this->network_uri = $var; - - return $this; - } - - /** - * Source IP address before NAT translation. - * - * Generated from protobuf field string old_source_ip = 4; - * @return string - */ - public function getOldSourceIp() - { - return $this->old_source_ip; - } - - /** - * Source IP address before NAT translation. - * - * Generated from protobuf field string old_source_ip = 4; - * @param string $var - * @return $this - */ - public function setOldSourceIp($var) - { - GPBUtil::checkString($var, True); - $this->old_source_ip = $var; - - return $this; - } - - /** - * Source IP address after NAT translation. - * - * Generated from protobuf field string new_source_ip = 5; - * @return string - */ - public function getNewSourceIp() - { - return $this->new_source_ip; - } - - /** - * Source IP address after NAT translation. - * - * Generated from protobuf field string new_source_ip = 5; - * @param string $var - * @return $this - */ - public function setNewSourceIp($var) - { - GPBUtil::checkString($var, True); - $this->new_source_ip = $var; - - return $this; - } - - /** - * Destination IP address before NAT translation. - * - * Generated from protobuf field string old_destination_ip = 6; - * @return string - */ - public function getOldDestinationIp() - { - return $this->old_destination_ip; - } - - /** - * Destination IP address before NAT translation. - * - * Generated from protobuf field string old_destination_ip = 6; - * @param string $var - * @return $this - */ - public function setOldDestinationIp($var) - { - GPBUtil::checkString($var, True); - $this->old_destination_ip = $var; - - return $this; - } - - /** - * Destination IP address after NAT translation. - * - * Generated from protobuf field string new_destination_ip = 7; - * @return string - */ - public function getNewDestinationIp() - { - return $this->new_destination_ip; - } - - /** - * Destination IP address after NAT translation. - * - * Generated from protobuf field string new_destination_ip = 7; - * @param string $var - * @return $this - */ - public function setNewDestinationIp($var) - { - GPBUtil::checkString($var, True); - $this->new_destination_ip = $var; - - return $this; - } - - /** - * Source port before NAT translation. Only valid when protocol is TCP or UDP. - * - * Generated from protobuf field int32 old_source_port = 8; - * @return int - */ - public function getOldSourcePort() - { - return $this->old_source_port; - } - - /** - * Source port before NAT translation. Only valid when protocol is TCP or UDP. - * - * Generated from protobuf field int32 old_source_port = 8; - * @param int $var - * @return $this - */ - public function setOldSourcePort($var) - { - GPBUtil::checkInt32($var); - $this->old_source_port = $var; - - return $this; - } - - /** - * Source port after NAT translation. Only valid when protocol is TCP or UDP. - * - * Generated from protobuf field int32 new_source_port = 9; - * @return int - */ - public function getNewSourcePort() - { - return $this->new_source_port; - } - - /** - * Source port after NAT translation. Only valid when protocol is TCP or UDP. - * - * Generated from protobuf field int32 new_source_port = 9; - * @param int $var - * @return $this - */ - public function setNewSourcePort($var) - { - GPBUtil::checkInt32($var); - $this->new_source_port = $var; - - return $this; - } - - /** - * Destination port before NAT translation. Only valid when protocol is TCP or - * UDP. - * - * Generated from protobuf field int32 old_destination_port = 10; - * @return int - */ - public function getOldDestinationPort() - { - return $this->old_destination_port; - } - - /** - * Destination port before NAT translation. Only valid when protocol is TCP or - * UDP. - * - * Generated from protobuf field int32 old_destination_port = 10; - * @param int $var - * @return $this - */ - public function setOldDestinationPort($var) - { - GPBUtil::checkInt32($var); - $this->old_destination_port = $var; - - return $this; - } - - /** - * Destination port after NAT translation. Only valid when protocol is TCP or - * UDP. - * - * Generated from protobuf field int32 new_destination_port = 11; - * @return int - */ - public function getNewDestinationPort() - { - return $this->new_destination_port; - } - - /** - * Destination port after NAT translation. Only valid when protocol is TCP or - * UDP. - * - * Generated from protobuf field int32 new_destination_port = 11; - * @param int $var - * @return $this - */ - public function setNewDestinationPort($var) - { - GPBUtil::checkInt32($var); - $this->new_destination_port = $var; - - return $this; - } - - /** - * Uri of the Cloud Router. Only valid when type is CLOUD_NAT. - * - * Generated from protobuf field string router_uri = 12; - * @return string - */ - public function getRouterUri() - { - return $this->router_uri; - } - - /** - * Uri of the Cloud Router. Only valid when type is CLOUD_NAT. - * - * Generated from protobuf field string router_uri = 12; - * @param string $var - * @return $this - */ - public function setRouterUri($var) - { - GPBUtil::checkString($var, True); - $this->router_uri = $var; - - return $this; - } - - /** - * The name of Cloud NAT Gateway. Only valid when type is CLOUD_NAT. - * - * Generated from protobuf field string nat_gateway_name = 13; - * @return string - */ - public function getNatGatewayName() - { - return $this->nat_gateway_name; - } - - /** - * The name of Cloud NAT Gateway. Only valid when type is CLOUD_NAT. - * - * Generated from protobuf field string nat_gateway_name = 13; - * @param string $var - * @return $this - */ - public function setNatGatewayName($var) - { - GPBUtil::checkString($var, True); - $this->nat_gateway_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/NatInfo/Type.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/NatInfo/Type.php deleted file mode 100644 index ef9862445568..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/NatInfo/Type.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.networkmanagement.v1.NatInfo.Type - */ -class Type -{ - /** - * Type is unspecified. - * - * Generated from protobuf enum TYPE_UNSPECIFIED = 0; - */ - const TYPE_UNSPECIFIED = 0; - /** - * From Compute Engine instance's internal address to external address. - * - * Generated from protobuf enum INTERNAL_TO_EXTERNAL = 1; - */ - const INTERNAL_TO_EXTERNAL = 1; - /** - * From Compute Engine instance's external address to internal address. - * - * Generated from protobuf enum EXTERNAL_TO_INTERNAL = 2; - */ - const EXTERNAL_TO_INTERNAL = 2; - /** - * Cloud NAT Gateway. - * - * Generated from protobuf enum CLOUD_NAT = 3; - */ - const CLOUD_NAT = 3; - /** - * Private service connect NAT. - * - * Generated from protobuf enum PRIVATE_SERVICE_CONNECT = 4; - */ - const PRIVATE_SERVICE_CONNECT = 4; - - private static $valueToName = [ - self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', - self::INTERNAL_TO_EXTERNAL => 'INTERNAL_TO_EXTERNAL', - self::EXTERNAL_TO_INTERNAL => 'EXTERNAL_TO_INTERNAL', - self::CLOUD_NAT => 'CLOUD_NAT', - self::PRIVATE_SERVICE_CONNECT => 'PRIVATE_SERVICE_CONNECT', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Type::class, \Google\Cloud\NetworkManagement\V1\NatInfo_Type::class); - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/NetworkInfo.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/NetworkInfo.php deleted file mode 100644 index d148d0ea4fcb..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/NetworkInfo.php +++ /dev/null @@ -1,204 +0,0 @@ -google.cloud.networkmanagement.v1.NetworkInfo - */ -class NetworkInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Name of a Compute Engine network. - * - * Generated from protobuf field string display_name = 1; - */ - protected $display_name = ''; - /** - * URI of a Compute Engine network. - * - * Generated from protobuf field string uri = 2; - */ - protected $uri = ''; - /** - * URI of the subnet matching the source IP address of the test. - * - * Generated from protobuf field string matched_subnet_uri = 5; - */ - protected $matched_subnet_uri = ''; - /** - * The IP range of the subnet matching the source IP address of the test. - * - * Generated from protobuf field string matched_ip_range = 4; - */ - protected $matched_ip_range = ''; - /** - * The region of the subnet matching the source IP address of the test. - * - * Generated from protobuf field string region = 6; - */ - protected $region = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $display_name - * Name of a Compute Engine network. - * @type string $uri - * URI of a Compute Engine network. - * @type string $matched_subnet_uri - * URI of the subnet matching the source IP address of the test. - * @type string $matched_ip_range - * The IP range of the subnet matching the source IP address of the test. - * @type string $region - * The region of the subnet matching the source IP address of the test. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkmanagement\V1\Trace::initOnce(); - parent::__construct($data); - } - - /** - * Name of a Compute Engine network. - * - * Generated from protobuf field string display_name = 1; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Name of a Compute Engine network. - * - * Generated from protobuf field string display_name = 1; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * URI of a Compute Engine network. - * - * Generated from protobuf field string uri = 2; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * URI of a Compute Engine network. - * - * Generated from protobuf field string uri = 2; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - - /** - * URI of the subnet matching the source IP address of the test. - * - * Generated from protobuf field string matched_subnet_uri = 5; - * @return string - */ - public function getMatchedSubnetUri() - { - return $this->matched_subnet_uri; - } - - /** - * URI of the subnet matching the source IP address of the test. - * - * Generated from protobuf field string matched_subnet_uri = 5; - * @param string $var - * @return $this - */ - public function setMatchedSubnetUri($var) - { - GPBUtil::checkString($var, True); - $this->matched_subnet_uri = $var; - - return $this; - } - - /** - * The IP range of the subnet matching the source IP address of the test. - * - * Generated from protobuf field string matched_ip_range = 4; - * @return string - */ - public function getMatchedIpRange() - { - return $this->matched_ip_range; - } - - /** - * The IP range of the subnet matching the source IP address of the test. - * - * Generated from protobuf field string matched_ip_range = 4; - * @param string $var - * @return $this - */ - public function setMatchedIpRange($var) - { - GPBUtil::checkString($var, True); - $this->matched_ip_range = $var; - - return $this; - } - - /** - * The region of the subnet matching the source IP address of the test. - * - * Generated from protobuf field string region = 6; - * @return string - */ - public function getRegion() - { - return $this->region; - } - - /** - * The region of the subnet matching the source IP address of the test. - * - * Generated from protobuf field string region = 6; - * @param string $var - * @return $this - */ - public function setRegion($var) - { - GPBUtil::checkString($var, True); - $this->region = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/OperationMetadata.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/OperationMetadata.php deleted file mode 100644 index c063a6d1f374..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/OperationMetadata.php +++ /dev/null @@ -1,295 +0,0 @@ -google.cloud.networkmanagement.v1.OperationMetadata - */ -class OperationMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; - */ - protected $create_time = null; - /** - * The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - */ - protected $end_time = null; - /** - * Target of the operation - for example - * projects/project-1/locations/global/connectivityTests/test-1 - * - * Generated from protobuf field string target = 3; - */ - protected $target = ''; - /** - * Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4; - */ - protected $verb = ''; - /** - * Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_detail = 5; - */ - protected $status_detail = ''; - /** - * Specifies if cancellation was requested for the operation. - * - * Generated from protobuf field bool cancel_requested = 6; - */ - protected $cancel_requested = false; - /** - * API version. - * - * Generated from protobuf field string api_version = 7; - */ - protected $api_version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $create_time - * The time the operation was created. - * @type \Google\Protobuf\Timestamp $end_time - * The time the operation finished running. - * @type string $target - * Target of the operation - for example - * projects/project-1/locations/global/connectivityTests/test-1 - * @type string $verb - * Name of the verb executed by the operation. - * @type string $status_detail - * Human-readable status of the operation, if any. - * @type bool $cancel_requested - * Specifies if cancellation was requested for the operation. - * @type string $api_version - * API version. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkmanagement\V1\Reachability::initOnce(); - parent::__construct($data); - } - - /** - * The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * Target of the operation - for example - * projects/project-1/locations/global/connectivityTests/test-1 - * - * Generated from protobuf field string target = 3; - * @return string - */ - public function getTarget() - { - return $this->target; - } - - /** - * Target of the operation - for example - * projects/project-1/locations/global/connectivityTests/test-1 - * - * Generated from protobuf field string target = 3; - * @param string $var - * @return $this - */ - public function setTarget($var) - { - GPBUtil::checkString($var, True); - $this->target = $var; - - return $this; - } - - /** - * Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4; - * @return string - */ - public function getVerb() - { - return $this->verb; - } - - /** - * Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4; - * @param string $var - * @return $this - */ - public function setVerb($var) - { - GPBUtil::checkString($var, True); - $this->verb = $var; - - return $this; - } - - /** - * Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_detail = 5; - * @return string - */ - public function getStatusDetail() - { - return $this->status_detail; - } - - /** - * Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_detail = 5; - * @param string $var - * @return $this - */ - public function setStatusDetail($var) - { - GPBUtil::checkString($var, True); - $this->status_detail = $var; - - return $this; - } - - /** - * Specifies if cancellation was requested for the operation. - * - * Generated from protobuf field bool cancel_requested = 6; - * @return bool - */ - public function getCancelRequested() - { - return $this->cancel_requested; - } - - /** - * Specifies if cancellation was requested for the operation. - * - * Generated from protobuf field bool cancel_requested = 6; - * @param bool $var - * @return $this - */ - public function setCancelRequested($var) - { - GPBUtil::checkBool($var); - $this->cancel_requested = $var; - - return $this; - } - - /** - * API version. - * - * Generated from protobuf field string api_version = 7; - * @return string - */ - public function getApiVersion() - { - return $this->api_version; - } - - /** - * API version. - * - * Generated from protobuf field string api_version = 7; - * @param string $var - * @return $this - */ - public function setApiVersion($var) - { - GPBUtil::checkString($var, True); - $this->api_version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ProbingDetails.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ProbingDetails.php deleted file mode 100644 index 254b6271a30e..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ProbingDetails.php +++ /dev/null @@ -1,417 +0,0 @@ -google.cloud.networkmanagement.v1.ProbingDetails - */ -class ProbingDetails extends \Google\Protobuf\Internal\Message -{ - /** - * The overall result of active probing. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.ProbingDetails.ProbingResult result = 1; - */ - protected $result = 0; - /** - * The time that reachability was assessed through active probing. - * - * Generated from protobuf field .google.protobuf.Timestamp verify_time = 2; - */ - protected $verify_time = null; - /** - * Details about an internal failure or the cancellation of active probing. - * - * Generated from protobuf field .google.rpc.Status error = 3; - */ - protected $error = null; - /** - * The reason probing was aborted. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.ProbingDetails.ProbingAbortCause abort_cause = 4; - */ - protected $abort_cause = 0; - /** - * Number of probes sent. - * - * Generated from protobuf field int32 sent_probe_count = 5; - */ - protected $sent_probe_count = 0; - /** - * Number of probes that reached the destination. - * - * Generated from protobuf field int32 successful_probe_count = 6; - */ - protected $successful_probe_count = 0; - /** - * The source and destination endpoints derived from the test input and used - * for active probing. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.EndpointInfo endpoint_info = 7; - */ - protected $endpoint_info = null; - /** - * Latency as measured by active probing in one direction: - * from the source to the destination endpoint. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.LatencyDistribution probing_latency = 8; - */ - protected $probing_latency = null; - /** - * The EdgeLocation from which a packet destined for/originating from the - * internet will egress/ingress the Google network. - * This will only be populated for a connectivity test which has an internet - * destination/source address. - * The absence of this field *must not* be used as an indication that the - * destination/source is part of the Google network. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation destination_egress_location = 9; - */ - protected $destination_egress_location = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $result - * The overall result of active probing. - * @type \Google\Protobuf\Timestamp $verify_time - * The time that reachability was assessed through active probing. - * @type \Google\Rpc\Status $error - * Details about an internal failure or the cancellation of active probing. - * @type int $abort_cause - * The reason probing was aborted. - * @type int $sent_probe_count - * Number of probes sent. - * @type int $successful_probe_count - * Number of probes that reached the destination. - * @type \Google\Cloud\NetworkManagement\V1\EndpointInfo $endpoint_info - * The source and destination endpoints derived from the test input and used - * for active probing. - * @type \Google\Cloud\NetworkManagement\V1\LatencyDistribution $probing_latency - * Latency as measured by active probing in one direction: - * from the source to the destination endpoint. - * @type \Google\Cloud\NetworkManagement\V1\ProbingDetails\EdgeLocation $destination_egress_location - * The EdgeLocation from which a packet destined for/originating from the - * internet will egress/ingress the Google network. - * This will only be populated for a connectivity test which has an internet - * destination/source address. - * The absence of this field *must not* be used as an indication that the - * destination/source is part of the Google network. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkmanagement\V1\ConnectivityTest::initOnce(); - parent::__construct($data); - } - - /** - * The overall result of active probing. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.ProbingDetails.ProbingResult result = 1; - * @return int - */ - public function getResult() - { - return $this->result; - } - - /** - * The overall result of active probing. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.ProbingDetails.ProbingResult result = 1; - * @param int $var - * @return $this - */ - public function setResult($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\NetworkManagement\V1\ProbingDetails\ProbingResult::class); - $this->result = $var; - - return $this; - } - - /** - * The time that reachability was assessed through active probing. - * - * Generated from protobuf field .google.protobuf.Timestamp verify_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getVerifyTime() - { - return $this->verify_time; - } - - public function hasVerifyTime() - { - return isset($this->verify_time); - } - - public function clearVerifyTime() - { - unset($this->verify_time); - } - - /** - * The time that reachability was assessed through active probing. - * - * Generated from protobuf field .google.protobuf.Timestamp verify_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setVerifyTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->verify_time = $var; - - return $this; - } - - /** - * Details about an internal failure or the cancellation of active probing. - * - * Generated from protobuf field .google.rpc.Status error = 3; - * @return \Google\Rpc\Status|null - */ - public function getError() - { - return $this->error; - } - - public function hasError() - { - return isset($this->error); - } - - public function clearError() - { - unset($this->error); - } - - /** - * Details about an internal failure or the cancellation of active probing. - * - * Generated from protobuf field .google.rpc.Status error = 3; - * @param \Google\Rpc\Status $var - * @return $this - */ - public function setError($var) - { - GPBUtil::checkMessage($var, \Google\Rpc\Status::class); - $this->error = $var; - - return $this; - } - - /** - * The reason probing was aborted. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.ProbingDetails.ProbingAbortCause abort_cause = 4; - * @return int - */ - public function getAbortCause() - { - return $this->abort_cause; - } - - /** - * The reason probing was aborted. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.ProbingDetails.ProbingAbortCause abort_cause = 4; - * @param int $var - * @return $this - */ - public function setAbortCause($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\NetworkManagement\V1\ProbingDetails\ProbingAbortCause::class); - $this->abort_cause = $var; - - return $this; - } - - /** - * Number of probes sent. - * - * Generated from protobuf field int32 sent_probe_count = 5; - * @return int - */ - public function getSentProbeCount() - { - return $this->sent_probe_count; - } - - /** - * Number of probes sent. - * - * Generated from protobuf field int32 sent_probe_count = 5; - * @param int $var - * @return $this - */ - public function setSentProbeCount($var) - { - GPBUtil::checkInt32($var); - $this->sent_probe_count = $var; - - return $this; - } - - /** - * Number of probes that reached the destination. - * - * Generated from protobuf field int32 successful_probe_count = 6; - * @return int - */ - public function getSuccessfulProbeCount() - { - return $this->successful_probe_count; - } - - /** - * Number of probes that reached the destination. - * - * Generated from protobuf field int32 successful_probe_count = 6; - * @param int $var - * @return $this - */ - public function setSuccessfulProbeCount($var) - { - GPBUtil::checkInt32($var); - $this->successful_probe_count = $var; - - return $this; - } - - /** - * The source and destination endpoints derived from the test input and used - * for active probing. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.EndpointInfo endpoint_info = 7; - * @return \Google\Cloud\NetworkManagement\V1\EndpointInfo|null - */ - public function getEndpointInfo() - { - return $this->endpoint_info; - } - - public function hasEndpointInfo() - { - return isset($this->endpoint_info); - } - - public function clearEndpointInfo() - { - unset($this->endpoint_info); - } - - /** - * The source and destination endpoints derived from the test input and used - * for active probing. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.EndpointInfo endpoint_info = 7; - * @param \Google\Cloud\NetworkManagement\V1\EndpointInfo $var - * @return $this - */ - public function setEndpointInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\EndpointInfo::class); - $this->endpoint_info = $var; - - return $this; - } - - /** - * Latency as measured by active probing in one direction: - * from the source to the destination endpoint. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.LatencyDistribution probing_latency = 8; - * @return \Google\Cloud\NetworkManagement\V1\LatencyDistribution|null - */ - public function getProbingLatency() - { - return $this->probing_latency; - } - - public function hasProbingLatency() - { - return isset($this->probing_latency); - } - - public function clearProbingLatency() - { - unset($this->probing_latency); - } - - /** - * Latency as measured by active probing in one direction: - * from the source to the destination endpoint. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.LatencyDistribution probing_latency = 8; - * @param \Google\Cloud\NetworkManagement\V1\LatencyDistribution $var - * @return $this - */ - public function setProbingLatency($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\LatencyDistribution::class); - $this->probing_latency = $var; - - return $this; - } - - /** - * The EdgeLocation from which a packet destined for/originating from the - * internet will egress/ingress the Google network. - * This will only be populated for a connectivity test which has an internet - * destination/source address. - * The absence of this field *must not* be used as an indication that the - * destination/source is part of the Google network. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation destination_egress_location = 9; - * @return \Google\Cloud\NetworkManagement\V1\ProbingDetails\EdgeLocation|null - */ - public function getDestinationEgressLocation() - { - return $this->destination_egress_location; - } - - public function hasDestinationEgressLocation() - { - return isset($this->destination_egress_location); - } - - public function clearDestinationEgressLocation() - { - unset($this->destination_egress_location); - } - - /** - * The EdgeLocation from which a packet destined for/originating from the - * internet will egress/ingress the Google network. - * This will only be populated for a connectivity test which has an internet - * destination/source address. - * The absence of this field *must not* be used as an indication that the - * destination/source is part of the Google network. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation destination_egress_location = 9; - * @param \Google\Cloud\NetworkManagement\V1\ProbingDetails\EdgeLocation $var - * @return $this - */ - public function setDestinationEgressLocation($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\ProbingDetails\EdgeLocation::class); - $this->destination_egress_location = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ProbingDetails/EdgeLocation.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ProbingDetails/EdgeLocation.php deleted file mode 100644 index b2c41ea9e303..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ProbingDetails/EdgeLocation.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation - */ -class EdgeLocation extends \Google\Protobuf\Internal\Message -{ - /** - * Name of the metropolitan area. - * - * Generated from protobuf field string metropolitan_area = 1; - */ - protected $metropolitan_area = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $metropolitan_area - * Name of the metropolitan area. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkmanagement\V1\ConnectivityTest::initOnce(); - parent::__construct($data); - } - - /** - * Name of the metropolitan area. - * - * Generated from protobuf field string metropolitan_area = 1; - * @return string - */ - public function getMetropolitanArea() - { - return $this->metropolitan_area; - } - - /** - * Name of the metropolitan area. - * - * Generated from protobuf field string metropolitan_area = 1; - * @param string $var - * @return $this - */ - public function setMetropolitanArea($var) - { - GPBUtil::checkString($var, True); - $this->metropolitan_area = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(EdgeLocation::class, \Google\Cloud\NetworkManagement\V1\ProbingDetails_EdgeLocation::class); - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ProbingDetails/ProbingAbortCause.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ProbingDetails/ProbingAbortCause.php deleted file mode 100644 index a35527cc41eb..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ProbingDetails/ProbingAbortCause.php +++ /dev/null @@ -1,65 +0,0 @@ -google.cloud.networkmanagement.v1.ProbingDetails.ProbingAbortCause - */ -class ProbingAbortCause -{ - /** - * No reason was specified. - * - * Generated from protobuf enum PROBING_ABORT_CAUSE_UNSPECIFIED = 0; - */ - const PROBING_ABORT_CAUSE_UNSPECIFIED = 0; - /** - * The user lacks permission to access some of the - * network resources required to run the test. - * - * Generated from protobuf enum PERMISSION_DENIED = 1; - */ - const PERMISSION_DENIED = 1; - /** - * No valid source endpoint could be derived from the request. - * - * Generated from protobuf enum NO_SOURCE_LOCATION = 2; - */ - const NO_SOURCE_LOCATION = 2; - - private static $valueToName = [ - self::PROBING_ABORT_CAUSE_UNSPECIFIED => 'PROBING_ABORT_CAUSE_UNSPECIFIED', - self::PERMISSION_DENIED => 'PERMISSION_DENIED', - self::NO_SOURCE_LOCATION => 'NO_SOURCE_LOCATION', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ProbingAbortCause::class, \Google\Cloud\NetworkManagement\V1\ProbingDetails_ProbingAbortCause::class); - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ProbingDetails/ProbingResult.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ProbingDetails/ProbingResult.php deleted file mode 100644 index 567ea2be878f..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ProbingDetails/ProbingResult.php +++ /dev/null @@ -1,82 +0,0 @@ -google.cloud.networkmanagement.v1.ProbingDetails.ProbingResult - */ -class ProbingResult -{ - /** - * No result was specified. - * - * Generated from protobuf enum PROBING_RESULT_UNSPECIFIED = 0; - */ - const PROBING_RESULT_UNSPECIFIED = 0; - /** - * At least 95% of packets reached the destination. - * - * Generated from protobuf enum REACHABLE = 1; - */ - const REACHABLE = 1; - /** - * No packets reached the destination. - * - * Generated from protobuf enum UNREACHABLE = 2; - */ - const UNREACHABLE = 2; - /** - * Less than 95% of packets reached the destination. - * - * Generated from protobuf enum REACHABILITY_INCONSISTENT = 3; - */ - const REACHABILITY_INCONSISTENT = 3; - /** - * Reachability could not be determined. Possible reasons are: - * * The user lacks permission to access some of the network resources - * required to run the test. - * * No valid source endpoint could be derived from the request. - * * An internal error occurred. - * - * Generated from protobuf enum UNDETERMINED = 4; - */ - const UNDETERMINED = 4; - - private static $valueToName = [ - self::PROBING_RESULT_UNSPECIFIED => 'PROBING_RESULT_UNSPECIFIED', - self::REACHABLE => 'REACHABLE', - self::UNREACHABLE => 'UNREACHABLE', - self::REACHABILITY_INCONSISTENT => 'REACHABILITY_INCONSISTENT', - self::UNDETERMINED => 'UNDETERMINED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ProbingResult::class, \Google\Cloud\NetworkManagement\V1\ProbingDetails_ProbingResult::class); - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ProxyConnectionInfo.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ProxyConnectionInfo.php deleted file mode 100644 index feb1c10943c7..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ProxyConnectionInfo.php +++ /dev/null @@ -1,419 +0,0 @@ -google.cloud.networkmanagement.v1.ProxyConnectionInfo - */ -class ProxyConnectionInfo extends \Google\Protobuf\Internal\Message -{ - /** - * IP protocol in string format, for example: "TCP", "UDP", "ICMP". - * - * Generated from protobuf field string protocol = 1; - */ - protected $protocol = ''; - /** - * Source IP address of an original connection. - * - * Generated from protobuf field string old_source_ip = 2; - */ - protected $old_source_ip = ''; - /** - * Source IP address of a new connection. - * - * Generated from protobuf field string new_source_ip = 3; - */ - protected $new_source_ip = ''; - /** - * Destination IP address of an original connection - * - * Generated from protobuf field string old_destination_ip = 4; - */ - protected $old_destination_ip = ''; - /** - * Destination IP address of a new connection. - * - * Generated from protobuf field string new_destination_ip = 5; - */ - protected $new_destination_ip = ''; - /** - * Source port of an original connection. Only valid when protocol is TCP or - * UDP. - * - * Generated from protobuf field int32 old_source_port = 6; - */ - protected $old_source_port = 0; - /** - * Source port of a new connection. Only valid when protocol is TCP or UDP. - * - * Generated from protobuf field int32 new_source_port = 7; - */ - protected $new_source_port = 0; - /** - * Destination port of an original connection. Only valid when protocol is TCP - * or UDP. - * - * Generated from protobuf field int32 old_destination_port = 8; - */ - protected $old_destination_port = 0; - /** - * Destination port of a new connection. Only valid when protocol is TCP or - * UDP. - * - * Generated from protobuf field int32 new_destination_port = 9; - */ - protected $new_destination_port = 0; - /** - * Uri of proxy subnet. - * - * Generated from protobuf field string subnet_uri = 10; - */ - protected $subnet_uri = ''; - /** - * URI of the network where connection is proxied. - * - * Generated from protobuf field string network_uri = 11; - */ - protected $network_uri = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $protocol - * IP protocol in string format, for example: "TCP", "UDP", "ICMP". - * @type string $old_source_ip - * Source IP address of an original connection. - * @type string $new_source_ip - * Source IP address of a new connection. - * @type string $old_destination_ip - * Destination IP address of an original connection - * @type string $new_destination_ip - * Destination IP address of a new connection. - * @type int $old_source_port - * Source port of an original connection. Only valid when protocol is TCP or - * UDP. - * @type int $new_source_port - * Source port of a new connection. Only valid when protocol is TCP or UDP. - * @type int $old_destination_port - * Destination port of an original connection. Only valid when protocol is TCP - * or UDP. - * @type int $new_destination_port - * Destination port of a new connection. Only valid when protocol is TCP or - * UDP. - * @type string $subnet_uri - * Uri of proxy subnet. - * @type string $network_uri - * URI of the network where connection is proxied. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkmanagement\V1\Trace::initOnce(); - parent::__construct($data); - } - - /** - * IP protocol in string format, for example: "TCP", "UDP", "ICMP". - * - * Generated from protobuf field string protocol = 1; - * @return string - */ - public function getProtocol() - { - return $this->protocol; - } - - /** - * IP protocol in string format, for example: "TCP", "UDP", "ICMP". - * - * Generated from protobuf field string protocol = 1; - * @param string $var - * @return $this - */ - public function setProtocol($var) - { - GPBUtil::checkString($var, True); - $this->protocol = $var; - - return $this; - } - - /** - * Source IP address of an original connection. - * - * Generated from protobuf field string old_source_ip = 2; - * @return string - */ - public function getOldSourceIp() - { - return $this->old_source_ip; - } - - /** - * Source IP address of an original connection. - * - * Generated from protobuf field string old_source_ip = 2; - * @param string $var - * @return $this - */ - public function setOldSourceIp($var) - { - GPBUtil::checkString($var, True); - $this->old_source_ip = $var; - - return $this; - } - - /** - * Source IP address of a new connection. - * - * Generated from protobuf field string new_source_ip = 3; - * @return string - */ - public function getNewSourceIp() - { - return $this->new_source_ip; - } - - /** - * Source IP address of a new connection. - * - * Generated from protobuf field string new_source_ip = 3; - * @param string $var - * @return $this - */ - public function setNewSourceIp($var) - { - GPBUtil::checkString($var, True); - $this->new_source_ip = $var; - - return $this; - } - - /** - * Destination IP address of an original connection - * - * Generated from protobuf field string old_destination_ip = 4; - * @return string - */ - public function getOldDestinationIp() - { - return $this->old_destination_ip; - } - - /** - * Destination IP address of an original connection - * - * Generated from protobuf field string old_destination_ip = 4; - * @param string $var - * @return $this - */ - public function setOldDestinationIp($var) - { - GPBUtil::checkString($var, True); - $this->old_destination_ip = $var; - - return $this; - } - - /** - * Destination IP address of a new connection. - * - * Generated from protobuf field string new_destination_ip = 5; - * @return string - */ - public function getNewDestinationIp() - { - return $this->new_destination_ip; - } - - /** - * Destination IP address of a new connection. - * - * Generated from protobuf field string new_destination_ip = 5; - * @param string $var - * @return $this - */ - public function setNewDestinationIp($var) - { - GPBUtil::checkString($var, True); - $this->new_destination_ip = $var; - - return $this; - } - - /** - * Source port of an original connection. Only valid when protocol is TCP or - * UDP. - * - * Generated from protobuf field int32 old_source_port = 6; - * @return int - */ - public function getOldSourcePort() - { - return $this->old_source_port; - } - - /** - * Source port of an original connection. Only valid when protocol is TCP or - * UDP. - * - * Generated from protobuf field int32 old_source_port = 6; - * @param int $var - * @return $this - */ - public function setOldSourcePort($var) - { - GPBUtil::checkInt32($var); - $this->old_source_port = $var; - - return $this; - } - - /** - * Source port of a new connection. Only valid when protocol is TCP or UDP. - * - * Generated from protobuf field int32 new_source_port = 7; - * @return int - */ - public function getNewSourcePort() - { - return $this->new_source_port; - } - - /** - * Source port of a new connection. Only valid when protocol is TCP or UDP. - * - * Generated from protobuf field int32 new_source_port = 7; - * @param int $var - * @return $this - */ - public function setNewSourcePort($var) - { - GPBUtil::checkInt32($var); - $this->new_source_port = $var; - - return $this; - } - - /** - * Destination port of an original connection. Only valid when protocol is TCP - * or UDP. - * - * Generated from protobuf field int32 old_destination_port = 8; - * @return int - */ - public function getOldDestinationPort() - { - return $this->old_destination_port; - } - - /** - * Destination port of an original connection. Only valid when protocol is TCP - * or UDP. - * - * Generated from protobuf field int32 old_destination_port = 8; - * @param int $var - * @return $this - */ - public function setOldDestinationPort($var) - { - GPBUtil::checkInt32($var); - $this->old_destination_port = $var; - - return $this; - } - - /** - * Destination port of a new connection. Only valid when protocol is TCP or - * UDP. - * - * Generated from protobuf field int32 new_destination_port = 9; - * @return int - */ - public function getNewDestinationPort() - { - return $this->new_destination_port; - } - - /** - * Destination port of a new connection. Only valid when protocol is TCP or - * UDP. - * - * Generated from protobuf field int32 new_destination_port = 9; - * @param int $var - * @return $this - */ - public function setNewDestinationPort($var) - { - GPBUtil::checkInt32($var); - $this->new_destination_port = $var; - - return $this; - } - - /** - * Uri of proxy subnet. - * - * Generated from protobuf field string subnet_uri = 10; - * @return string - */ - public function getSubnetUri() - { - return $this->subnet_uri; - } - - /** - * Uri of proxy subnet. - * - * Generated from protobuf field string subnet_uri = 10; - * @param string $var - * @return $this - */ - public function setSubnetUri($var) - { - GPBUtil::checkString($var, True); - $this->subnet_uri = $var; - - return $this; - } - - /** - * URI of the network where connection is proxied. - * - * Generated from protobuf field string network_uri = 11; - * @return string - */ - public function getNetworkUri() - { - return $this->network_uri; - } - - /** - * URI of the network where connection is proxied. - * - * Generated from protobuf field string network_uri = 11; - * @param string $var - * @return $this - */ - public function setNetworkUri($var) - { - GPBUtil::checkString($var, True); - $this->network_uri = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ReachabilityDetails.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ReachabilityDetails.php deleted file mode 100644 index 487aecd9228d..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ReachabilityDetails.php +++ /dev/null @@ -1,197 +0,0 @@ -google.cloud.networkmanagement.v1.ReachabilityDetails - */ -class ReachabilityDetails extends \Google\Protobuf\Internal\Message -{ - /** - * The overall result of the test's configuration analysis. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.ReachabilityDetails.Result result = 1; - */ - protected $result = 0; - /** - * The time of the configuration analysis. - * - * Generated from protobuf field .google.protobuf.Timestamp verify_time = 2; - */ - protected $verify_time = null; - /** - * The details of a failure or a cancellation of reachability analysis. - * - * Generated from protobuf field .google.rpc.Status error = 3; - */ - protected $error = null; - /** - * Result may contain a list of traces if a test has multiple possible - * paths in the network, such as when destination endpoint is a load balancer - * with multiple backends. - * - * Generated from protobuf field repeated .google.cloud.networkmanagement.v1.Trace traces = 5; - */ - private $traces; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $result - * The overall result of the test's configuration analysis. - * @type \Google\Protobuf\Timestamp $verify_time - * The time of the configuration analysis. - * @type \Google\Rpc\Status $error - * The details of a failure or a cancellation of reachability analysis. - * @type array<\Google\Cloud\NetworkManagement\V1\Trace>|\Google\Protobuf\Internal\RepeatedField $traces - * Result may contain a list of traces if a test has multiple possible - * paths in the network, such as when destination endpoint is a load balancer - * with multiple backends. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkmanagement\V1\ConnectivityTest::initOnce(); - parent::__construct($data); - } - - /** - * The overall result of the test's configuration analysis. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.ReachabilityDetails.Result result = 1; - * @return int - */ - public function getResult() - { - return $this->result; - } - - /** - * The overall result of the test's configuration analysis. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.ReachabilityDetails.Result result = 1; - * @param int $var - * @return $this - */ - public function setResult($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\NetworkManagement\V1\ReachabilityDetails\Result::class); - $this->result = $var; - - return $this; - } - - /** - * The time of the configuration analysis. - * - * Generated from protobuf field .google.protobuf.Timestamp verify_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getVerifyTime() - { - return $this->verify_time; - } - - public function hasVerifyTime() - { - return isset($this->verify_time); - } - - public function clearVerifyTime() - { - unset($this->verify_time); - } - - /** - * The time of the configuration analysis. - * - * Generated from protobuf field .google.protobuf.Timestamp verify_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setVerifyTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->verify_time = $var; - - return $this; - } - - /** - * The details of a failure or a cancellation of reachability analysis. - * - * Generated from protobuf field .google.rpc.Status error = 3; - * @return \Google\Rpc\Status|null - */ - public function getError() - { - return $this->error; - } - - public function hasError() - { - return isset($this->error); - } - - public function clearError() - { - unset($this->error); - } - - /** - * The details of a failure or a cancellation of reachability analysis. - * - * Generated from protobuf field .google.rpc.Status error = 3; - * @param \Google\Rpc\Status $var - * @return $this - */ - public function setError($var) - { - GPBUtil::checkMessage($var, \Google\Rpc\Status::class); - $this->error = $var; - - return $this; - } - - /** - * Result may contain a list of traces if a test has multiple possible - * paths in the network, such as when destination endpoint is a load balancer - * with multiple backends. - * - * Generated from protobuf field repeated .google.cloud.networkmanagement.v1.Trace traces = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTraces() - { - return $this->traces; - } - - /** - * Result may contain a list of traces if a test has multiple possible - * paths in the network, such as when destination endpoint is a load balancer - * with multiple backends. - * - * Generated from protobuf field repeated .google.cloud.networkmanagement.v1.Trace traces = 5; - * @param array<\Google\Cloud\NetworkManagement\V1\Trace>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTraces($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkManagement\V1\Trace::class); - $this->traces = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ReachabilityDetails/Result.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ReachabilityDetails/Result.php deleted file mode 100644 index 5b4ca4a91831..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ReachabilityDetails/Result.php +++ /dev/null @@ -1,94 +0,0 @@ -google.cloud.networkmanagement.v1.ReachabilityDetails.Result - */ -class Result -{ - /** - * No result was specified. - * - * Generated from protobuf enum RESULT_UNSPECIFIED = 0; - */ - const RESULT_UNSPECIFIED = 0; - /** - * Possible scenarios are: - * * The configuration analysis determined that a packet originating from - * the source is expected to reach the destination. - * * The analysis didn't complete because the user lacks permission for - * some of the resources in the trace. However, at the time the user's - * permission became insufficient, the trace had been successful so far. - * - * Generated from protobuf enum REACHABLE = 1; - */ - const REACHABLE = 1; - /** - * A packet originating from the source is expected to be dropped before - * reaching the destination. - * - * Generated from protobuf enum UNREACHABLE = 2; - */ - const UNREACHABLE = 2; - /** - * The source and destination endpoints do not uniquely identify - * the test location in the network, and the reachability result contains - * multiple traces. For some traces, a packet could be delivered, and for - * others, it would not be. This result is also assigned to - * configuration analysis of return path if on its own it should be - * REACHABLE, but configuration analysis of forward path is AMBIGUOUS. - * - * Generated from protobuf enum AMBIGUOUS = 4; - */ - const AMBIGUOUS = 4; - /** - * The configuration analysis did not complete. Possible reasons are: - * * A permissions error occurred--for example, the user might not have - * read permission for all of the resources named in the test. - * * An internal error occurred. - * * The analyzer received an invalid or unsupported argument or was unable - * to identify a known endpoint. - * - * Generated from protobuf enum UNDETERMINED = 5; - */ - const UNDETERMINED = 5; - - private static $valueToName = [ - self::RESULT_UNSPECIFIED => 'RESULT_UNSPECIFIED', - self::REACHABLE => 'REACHABLE', - self::UNREACHABLE => 'UNREACHABLE', - self::AMBIGUOUS => 'AMBIGUOUS', - self::UNDETERMINED => 'UNDETERMINED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Result::class, \Google\Cloud\NetworkManagement\V1\ReachabilityDetails_Result::class); - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/RedisClusterInfo.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/RedisClusterInfo.php deleted file mode 100644 index f0d07036a9fe..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/RedisClusterInfo.php +++ /dev/null @@ -1,249 +0,0 @@ -google.cloud.networkmanagement.v1.RedisClusterInfo - */ -class RedisClusterInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Name of a Redis Cluster. - * - * Generated from protobuf field string display_name = 1; - */ - protected $display_name = ''; - /** - * URI of a Redis Cluster in format - * "projects/{project_id}/locations/{location}/clusters/{cluster_id}" - * - * Generated from protobuf field string uri = 2; - */ - protected $uri = ''; - /** - * URI of a Redis Cluster network in format - * "projects/{project_id}/global/networks/{network_id}". - * - * Generated from protobuf field string network_uri = 3; - */ - protected $network_uri = ''; - /** - * Discovery endpoint IP address of a Redis Cluster. - * - * Generated from protobuf field string discovery_endpoint_ip_address = 4 [(.google.api.field_info) = { - */ - protected $discovery_endpoint_ip_address = ''; - /** - * Secondary endpoint IP address of a Redis Cluster. - * - * Generated from protobuf field string secondary_endpoint_ip_address = 5 [(.google.api.field_info) = { - */ - protected $secondary_endpoint_ip_address = ''; - /** - * Name of the region in which the Redis Cluster is defined. For example, - * "us-central1". - * - * Generated from protobuf field string location = 6; - */ - protected $location = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $display_name - * Name of a Redis Cluster. - * @type string $uri - * URI of a Redis Cluster in format - * "projects/{project_id}/locations/{location}/clusters/{cluster_id}" - * @type string $network_uri - * URI of a Redis Cluster network in format - * "projects/{project_id}/global/networks/{network_id}". - * @type string $discovery_endpoint_ip_address - * Discovery endpoint IP address of a Redis Cluster. - * @type string $secondary_endpoint_ip_address - * Secondary endpoint IP address of a Redis Cluster. - * @type string $location - * Name of the region in which the Redis Cluster is defined. For example, - * "us-central1". - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkmanagement\V1\Trace::initOnce(); - parent::__construct($data); - } - - /** - * Name of a Redis Cluster. - * - * Generated from protobuf field string display_name = 1; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Name of a Redis Cluster. - * - * Generated from protobuf field string display_name = 1; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * URI of a Redis Cluster in format - * "projects/{project_id}/locations/{location}/clusters/{cluster_id}" - * - * Generated from protobuf field string uri = 2; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * URI of a Redis Cluster in format - * "projects/{project_id}/locations/{location}/clusters/{cluster_id}" - * - * Generated from protobuf field string uri = 2; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - - /** - * URI of a Redis Cluster network in format - * "projects/{project_id}/global/networks/{network_id}". - * - * Generated from protobuf field string network_uri = 3; - * @return string - */ - public function getNetworkUri() - { - return $this->network_uri; - } - - /** - * URI of a Redis Cluster network in format - * "projects/{project_id}/global/networks/{network_id}". - * - * Generated from protobuf field string network_uri = 3; - * @param string $var - * @return $this - */ - public function setNetworkUri($var) - { - GPBUtil::checkString($var, True); - $this->network_uri = $var; - - return $this; - } - - /** - * Discovery endpoint IP address of a Redis Cluster. - * - * Generated from protobuf field string discovery_endpoint_ip_address = 4 [(.google.api.field_info) = { - * @return string - */ - public function getDiscoveryEndpointIpAddress() - { - return $this->discovery_endpoint_ip_address; - } - - /** - * Discovery endpoint IP address of a Redis Cluster. - * - * Generated from protobuf field string discovery_endpoint_ip_address = 4 [(.google.api.field_info) = { - * @param string $var - * @return $this - */ - public function setDiscoveryEndpointIpAddress($var) - { - GPBUtil::checkString($var, True); - $this->discovery_endpoint_ip_address = $var; - - return $this; - } - - /** - * Secondary endpoint IP address of a Redis Cluster. - * - * Generated from protobuf field string secondary_endpoint_ip_address = 5 [(.google.api.field_info) = { - * @return string - */ - public function getSecondaryEndpointIpAddress() - { - return $this->secondary_endpoint_ip_address; - } - - /** - * Secondary endpoint IP address of a Redis Cluster. - * - * Generated from protobuf field string secondary_endpoint_ip_address = 5 [(.google.api.field_info) = { - * @param string $var - * @return $this - */ - public function setSecondaryEndpointIpAddress($var) - { - GPBUtil::checkString($var, True); - $this->secondary_endpoint_ip_address = $var; - - return $this; - } - - /** - * Name of the region in which the Redis Cluster is defined. For example, - * "us-central1". - * - * Generated from protobuf field string location = 6; - * @return string - */ - public function getLocation() - { - return $this->location; - } - - /** - * Name of the region in which the Redis Cluster is defined. For example, - * "us-central1". - * - * Generated from protobuf field string location = 6; - * @param string $var - * @return $this - */ - public function setLocation($var) - { - GPBUtil::checkString($var, True); - $this->location = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/RedisInstanceInfo.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/RedisInstanceInfo.php deleted file mode 100644 index 7e8a8f9bf987..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/RedisInstanceInfo.php +++ /dev/null @@ -1,237 +0,0 @@ -google.cloud.networkmanagement.v1.RedisInstanceInfo - */ -class RedisInstanceInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Name of a Cloud Redis Instance. - * - * Generated from protobuf field string display_name = 1; - */ - protected $display_name = ''; - /** - * URI of a Cloud Redis Instance. - * - * Generated from protobuf field string uri = 2; - */ - protected $uri = ''; - /** - * URI of a Cloud Redis Instance network. - * - * Generated from protobuf field string network_uri = 3; - */ - protected $network_uri = ''; - /** - * Primary endpoint IP address of a Cloud Redis Instance. - * - * Generated from protobuf field string primary_endpoint_ip = 4; - */ - protected $primary_endpoint_ip = ''; - /** - * Read endpoint IP address of a Cloud Redis Instance (if applicable). - * - * Generated from protobuf field string read_endpoint_ip = 5; - */ - protected $read_endpoint_ip = ''; - /** - * Region in which the Cloud Redis Instance is defined. - * - * Generated from protobuf field string region = 6; - */ - protected $region = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $display_name - * Name of a Cloud Redis Instance. - * @type string $uri - * URI of a Cloud Redis Instance. - * @type string $network_uri - * URI of a Cloud Redis Instance network. - * @type string $primary_endpoint_ip - * Primary endpoint IP address of a Cloud Redis Instance. - * @type string $read_endpoint_ip - * Read endpoint IP address of a Cloud Redis Instance (if applicable). - * @type string $region - * Region in which the Cloud Redis Instance is defined. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkmanagement\V1\Trace::initOnce(); - parent::__construct($data); - } - - /** - * Name of a Cloud Redis Instance. - * - * Generated from protobuf field string display_name = 1; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Name of a Cloud Redis Instance. - * - * Generated from protobuf field string display_name = 1; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * URI of a Cloud Redis Instance. - * - * Generated from protobuf field string uri = 2; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * URI of a Cloud Redis Instance. - * - * Generated from protobuf field string uri = 2; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - - /** - * URI of a Cloud Redis Instance network. - * - * Generated from protobuf field string network_uri = 3; - * @return string - */ - public function getNetworkUri() - { - return $this->network_uri; - } - - /** - * URI of a Cloud Redis Instance network. - * - * Generated from protobuf field string network_uri = 3; - * @param string $var - * @return $this - */ - public function setNetworkUri($var) - { - GPBUtil::checkString($var, True); - $this->network_uri = $var; - - return $this; - } - - /** - * Primary endpoint IP address of a Cloud Redis Instance. - * - * Generated from protobuf field string primary_endpoint_ip = 4; - * @return string - */ - public function getPrimaryEndpointIp() - { - return $this->primary_endpoint_ip; - } - - /** - * Primary endpoint IP address of a Cloud Redis Instance. - * - * Generated from protobuf field string primary_endpoint_ip = 4; - * @param string $var - * @return $this - */ - public function setPrimaryEndpointIp($var) - { - GPBUtil::checkString($var, True); - $this->primary_endpoint_ip = $var; - - return $this; - } - - /** - * Read endpoint IP address of a Cloud Redis Instance (if applicable). - * - * Generated from protobuf field string read_endpoint_ip = 5; - * @return string - */ - public function getReadEndpointIp() - { - return $this->read_endpoint_ip; - } - - /** - * Read endpoint IP address of a Cloud Redis Instance (if applicable). - * - * Generated from protobuf field string read_endpoint_ip = 5; - * @param string $var - * @return $this - */ - public function setReadEndpointIp($var) - { - GPBUtil::checkString($var, True); - $this->read_endpoint_ip = $var; - - return $this; - } - - /** - * Region in which the Cloud Redis Instance is defined. - * - * Generated from protobuf field string region = 6; - * @return string - */ - public function getRegion() - { - return $this->region; - } - - /** - * Region in which the Cloud Redis Instance is defined. - * - * Generated from protobuf field string region = 6; - * @param string $var - * @return $this - */ - public function setRegion($var) - { - GPBUtil::checkString($var, True); - $this->region = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/RerunConnectivityTestRequest.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/RerunConnectivityTestRequest.php deleted file mode 100644 index 6a28cefac964..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/RerunConnectivityTestRequest.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.networkmanagement.v1.RerunConnectivityTestRequest - */ -class RerunConnectivityTestRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Connectivity Test resource name using the form: - * `projects/{project_id}/locations/global/connectivityTests/{test_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Connectivity Test resource name using the form: - * `projects/{project_id}/locations/global/connectivityTests/{test_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkmanagement\V1\Reachability::initOnce(); - parent::__construct($data); - } - - /** - * Required. Connectivity Test resource name using the form: - * `projects/{project_id}/locations/global/connectivityTests/{test_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Connectivity Test resource name using the form: - * `projects/{project_id}/locations/global/connectivityTests/{test_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/RouteInfo.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/RouteInfo.php deleted file mode 100644 index e457ff0ffe52..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/RouteInfo.php +++ /dev/null @@ -1,735 +0,0 @@ -google.cloud.networkmanagement.v1.RouteInfo - */ -class RouteInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Type of route. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.RouteInfo.RouteType route_type = 8; - */ - protected $route_type = 0; - /** - * Type of next hop. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.RouteInfo.NextHopType next_hop_type = 9; - */ - protected $next_hop_type = 0; - /** - * Indicates where route is applicable. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.RouteInfo.RouteScope route_scope = 14; - */ - protected $route_scope = 0; - /** - * Name of a route. - * - * Generated from protobuf field string display_name = 1; - */ - protected $display_name = ''; - /** - * URI of a route (if applicable). - * - * Generated from protobuf field string uri = 2; - */ - protected $uri = ''; - /** - * Region of the route (if applicable). - * - * Generated from protobuf field string region = 19; - */ - protected $region = ''; - /** - * Destination IP range of the route. - * - * Generated from protobuf field string dest_ip_range = 3; - */ - protected $dest_ip_range = ''; - /** - * Next hop of the route. - * - * Generated from protobuf field string next_hop = 4; - */ - protected $next_hop = ''; - /** - * URI of a Compute Engine network. NETWORK routes only. - * - * Generated from protobuf field string network_uri = 5; - */ - protected $network_uri = ''; - /** - * Priority of the route. - * - * Generated from protobuf field int32 priority = 6; - */ - protected $priority = 0; - /** - * Instance tags of the route. - * - * Generated from protobuf field repeated string instance_tags = 7; - */ - private $instance_tags; - /** - * Source IP address range of the route. Policy based routes only. - * - * Generated from protobuf field string src_ip_range = 10; - */ - protected $src_ip_range = ''; - /** - * Destination port ranges of the route. Policy based routes only. - * - * Generated from protobuf field repeated string dest_port_ranges = 11; - */ - private $dest_port_ranges; - /** - * Source port ranges of the route. Policy based routes only. - * - * Generated from protobuf field repeated string src_port_ranges = 12; - */ - private $src_port_ranges; - /** - * Protocols of the route. Policy based routes only. - * - * Generated from protobuf field repeated string protocols = 13; - */ - private $protocols; - /** - * URI of a NCC Hub. NCC_HUB routes only. - * - * Generated from protobuf field optional string ncc_hub_uri = 15; - */ - protected $ncc_hub_uri = null; - /** - * URI of a NCC Spoke. NCC_HUB routes only. - * - * Generated from protobuf field optional string ncc_spoke_uri = 16; - */ - protected $ncc_spoke_uri = null; - /** - * For advertised dynamic routes, the URI of the Cloud Router that advertised - * the corresponding IP prefix. - * - * Generated from protobuf field optional string advertised_route_source_router_uri = 17; - */ - protected $advertised_route_source_router_uri = null; - /** - * For advertised routes, the URI of their next hop, i.e. the URI of the - * hybrid endpoint (VPN tunnel, Interconnect attachment, NCC router appliance) - * the advertised prefix is advertised through, or URI of the source peered - * network. - * - * Generated from protobuf field optional string advertised_route_next_hop_uri = 18; - */ - protected $advertised_route_next_hop_uri = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $route_type - * Type of route. - * @type int $next_hop_type - * Type of next hop. - * @type int $route_scope - * Indicates where route is applicable. - * @type string $display_name - * Name of a route. - * @type string $uri - * URI of a route (if applicable). - * @type string $region - * Region of the route (if applicable). - * @type string $dest_ip_range - * Destination IP range of the route. - * @type string $next_hop - * Next hop of the route. - * @type string $network_uri - * URI of a Compute Engine network. NETWORK routes only. - * @type int $priority - * Priority of the route. - * @type array|\Google\Protobuf\Internal\RepeatedField $instance_tags - * Instance tags of the route. - * @type string $src_ip_range - * Source IP address range of the route. Policy based routes only. - * @type array|\Google\Protobuf\Internal\RepeatedField $dest_port_ranges - * Destination port ranges of the route. Policy based routes only. - * @type array|\Google\Protobuf\Internal\RepeatedField $src_port_ranges - * Source port ranges of the route. Policy based routes only. - * @type array|\Google\Protobuf\Internal\RepeatedField $protocols - * Protocols of the route. Policy based routes only. - * @type string $ncc_hub_uri - * URI of a NCC Hub. NCC_HUB routes only. - * @type string $ncc_spoke_uri - * URI of a NCC Spoke. NCC_HUB routes only. - * @type string $advertised_route_source_router_uri - * For advertised dynamic routes, the URI of the Cloud Router that advertised - * the corresponding IP prefix. - * @type string $advertised_route_next_hop_uri - * For advertised routes, the URI of their next hop, i.e. the URI of the - * hybrid endpoint (VPN tunnel, Interconnect attachment, NCC router appliance) - * the advertised prefix is advertised through, or URI of the source peered - * network. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkmanagement\V1\Trace::initOnce(); - parent::__construct($data); - } - - /** - * Type of route. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.RouteInfo.RouteType route_type = 8; - * @return int - */ - public function getRouteType() - { - return $this->route_type; - } - - /** - * Type of route. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.RouteInfo.RouteType route_type = 8; - * @param int $var - * @return $this - */ - public function setRouteType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\NetworkManagement\V1\RouteInfo\RouteType::class); - $this->route_type = $var; - - return $this; - } - - /** - * Type of next hop. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.RouteInfo.NextHopType next_hop_type = 9; - * @return int - */ - public function getNextHopType() - { - return $this->next_hop_type; - } - - /** - * Type of next hop. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.RouteInfo.NextHopType next_hop_type = 9; - * @param int $var - * @return $this - */ - public function setNextHopType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\NetworkManagement\V1\RouteInfo\NextHopType::class); - $this->next_hop_type = $var; - - return $this; - } - - /** - * Indicates where route is applicable. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.RouteInfo.RouteScope route_scope = 14; - * @return int - */ - public function getRouteScope() - { - return $this->route_scope; - } - - /** - * Indicates where route is applicable. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.RouteInfo.RouteScope route_scope = 14; - * @param int $var - * @return $this - */ - public function setRouteScope($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\NetworkManagement\V1\RouteInfo\RouteScope::class); - $this->route_scope = $var; - - return $this; - } - - /** - * Name of a route. - * - * Generated from protobuf field string display_name = 1; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Name of a route. - * - * Generated from protobuf field string display_name = 1; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * URI of a route (if applicable). - * - * Generated from protobuf field string uri = 2; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * URI of a route (if applicable). - * - * Generated from protobuf field string uri = 2; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - - /** - * Region of the route (if applicable). - * - * Generated from protobuf field string region = 19; - * @return string - */ - public function getRegion() - { - return $this->region; - } - - /** - * Region of the route (if applicable). - * - * Generated from protobuf field string region = 19; - * @param string $var - * @return $this - */ - public function setRegion($var) - { - GPBUtil::checkString($var, True); - $this->region = $var; - - return $this; - } - - /** - * Destination IP range of the route. - * - * Generated from protobuf field string dest_ip_range = 3; - * @return string - */ - public function getDestIpRange() - { - return $this->dest_ip_range; - } - - /** - * Destination IP range of the route. - * - * Generated from protobuf field string dest_ip_range = 3; - * @param string $var - * @return $this - */ - public function setDestIpRange($var) - { - GPBUtil::checkString($var, True); - $this->dest_ip_range = $var; - - return $this; - } - - /** - * Next hop of the route. - * - * Generated from protobuf field string next_hop = 4; - * @return string - */ - public function getNextHop() - { - return $this->next_hop; - } - - /** - * Next hop of the route. - * - * Generated from protobuf field string next_hop = 4; - * @param string $var - * @return $this - */ - public function setNextHop($var) - { - GPBUtil::checkString($var, True); - $this->next_hop = $var; - - return $this; - } - - /** - * URI of a Compute Engine network. NETWORK routes only. - * - * Generated from protobuf field string network_uri = 5; - * @return string - */ - public function getNetworkUri() - { - return $this->network_uri; - } - - /** - * URI of a Compute Engine network. NETWORK routes only. - * - * Generated from protobuf field string network_uri = 5; - * @param string $var - * @return $this - */ - public function setNetworkUri($var) - { - GPBUtil::checkString($var, True); - $this->network_uri = $var; - - return $this; - } - - /** - * Priority of the route. - * - * Generated from protobuf field int32 priority = 6; - * @return int - */ - public function getPriority() - { - return $this->priority; - } - - /** - * Priority of the route. - * - * Generated from protobuf field int32 priority = 6; - * @param int $var - * @return $this - */ - public function setPriority($var) - { - GPBUtil::checkInt32($var); - $this->priority = $var; - - return $this; - } - - /** - * Instance tags of the route. - * - * Generated from protobuf field repeated string instance_tags = 7; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getInstanceTags() - { - return $this->instance_tags; - } - - /** - * Instance tags of the route. - * - * Generated from protobuf field repeated string instance_tags = 7; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setInstanceTags($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->instance_tags = $arr; - - return $this; - } - - /** - * Source IP address range of the route. Policy based routes only. - * - * Generated from protobuf field string src_ip_range = 10; - * @return string - */ - public function getSrcIpRange() - { - return $this->src_ip_range; - } - - /** - * Source IP address range of the route. Policy based routes only. - * - * Generated from protobuf field string src_ip_range = 10; - * @param string $var - * @return $this - */ - public function setSrcIpRange($var) - { - GPBUtil::checkString($var, True); - $this->src_ip_range = $var; - - return $this; - } - - /** - * Destination port ranges of the route. Policy based routes only. - * - * Generated from protobuf field repeated string dest_port_ranges = 11; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDestPortRanges() - { - return $this->dest_port_ranges; - } - - /** - * Destination port ranges of the route. Policy based routes only. - * - * Generated from protobuf field repeated string dest_port_ranges = 11; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDestPortRanges($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->dest_port_ranges = $arr; - - return $this; - } - - /** - * Source port ranges of the route. Policy based routes only. - * - * Generated from protobuf field repeated string src_port_ranges = 12; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSrcPortRanges() - { - return $this->src_port_ranges; - } - - /** - * Source port ranges of the route. Policy based routes only. - * - * Generated from protobuf field repeated string src_port_ranges = 12; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSrcPortRanges($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->src_port_ranges = $arr; - - return $this; - } - - /** - * Protocols of the route. Policy based routes only. - * - * Generated from protobuf field repeated string protocols = 13; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getProtocols() - { - return $this->protocols; - } - - /** - * Protocols of the route. Policy based routes only. - * - * Generated from protobuf field repeated string protocols = 13; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setProtocols($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->protocols = $arr; - - return $this; - } - - /** - * URI of a NCC Hub. NCC_HUB routes only. - * - * Generated from protobuf field optional string ncc_hub_uri = 15; - * @return string - */ - public function getNccHubUri() - { - return isset($this->ncc_hub_uri) ? $this->ncc_hub_uri : ''; - } - - public function hasNccHubUri() - { - return isset($this->ncc_hub_uri); - } - - public function clearNccHubUri() - { - unset($this->ncc_hub_uri); - } - - /** - * URI of a NCC Hub. NCC_HUB routes only. - * - * Generated from protobuf field optional string ncc_hub_uri = 15; - * @param string $var - * @return $this - */ - public function setNccHubUri($var) - { - GPBUtil::checkString($var, True); - $this->ncc_hub_uri = $var; - - return $this; - } - - /** - * URI of a NCC Spoke. NCC_HUB routes only. - * - * Generated from protobuf field optional string ncc_spoke_uri = 16; - * @return string - */ - public function getNccSpokeUri() - { - return isset($this->ncc_spoke_uri) ? $this->ncc_spoke_uri : ''; - } - - public function hasNccSpokeUri() - { - return isset($this->ncc_spoke_uri); - } - - public function clearNccSpokeUri() - { - unset($this->ncc_spoke_uri); - } - - /** - * URI of a NCC Spoke. NCC_HUB routes only. - * - * Generated from protobuf field optional string ncc_spoke_uri = 16; - * @param string $var - * @return $this - */ - public function setNccSpokeUri($var) - { - GPBUtil::checkString($var, True); - $this->ncc_spoke_uri = $var; - - return $this; - } - - /** - * For advertised dynamic routes, the URI of the Cloud Router that advertised - * the corresponding IP prefix. - * - * Generated from protobuf field optional string advertised_route_source_router_uri = 17; - * @return string - */ - public function getAdvertisedRouteSourceRouterUri() - { - return isset($this->advertised_route_source_router_uri) ? $this->advertised_route_source_router_uri : ''; - } - - public function hasAdvertisedRouteSourceRouterUri() - { - return isset($this->advertised_route_source_router_uri); - } - - public function clearAdvertisedRouteSourceRouterUri() - { - unset($this->advertised_route_source_router_uri); - } - - /** - * For advertised dynamic routes, the URI of the Cloud Router that advertised - * the corresponding IP prefix. - * - * Generated from protobuf field optional string advertised_route_source_router_uri = 17; - * @param string $var - * @return $this - */ - public function setAdvertisedRouteSourceRouterUri($var) - { - GPBUtil::checkString($var, True); - $this->advertised_route_source_router_uri = $var; - - return $this; - } - - /** - * For advertised routes, the URI of their next hop, i.e. the URI of the - * hybrid endpoint (VPN tunnel, Interconnect attachment, NCC router appliance) - * the advertised prefix is advertised through, or URI of the source peered - * network. - * - * Generated from protobuf field optional string advertised_route_next_hop_uri = 18; - * @return string - */ - public function getAdvertisedRouteNextHopUri() - { - return isset($this->advertised_route_next_hop_uri) ? $this->advertised_route_next_hop_uri : ''; - } - - public function hasAdvertisedRouteNextHopUri() - { - return isset($this->advertised_route_next_hop_uri); - } - - public function clearAdvertisedRouteNextHopUri() - { - unset($this->advertised_route_next_hop_uri); - } - - /** - * For advertised routes, the URI of their next hop, i.e. the URI of the - * hybrid endpoint (VPN tunnel, Interconnect attachment, NCC router appliance) - * the advertised prefix is advertised through, or URI of the source peered - * network. - * - * Generated from protobuf field optional string advertised_route_next_hop_uri = 18; - * @param string $var - * @return $this - */ - public function setAdvertisedRouteNextHopUri($var) - { - GPBUtil::checkString($var, True); - $this->advertised_route_next_hop_uri = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/RouteInfo/NextHopType.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/RouteInfo/NextHopType.php deleted file mode 100644 index 68b5c2112fd8..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/RouteInfo/NextHopType.php +++ /dev/null @@ -1,140 +0,0 @@ -google.cloud.networkmanagement.v1.RouteInfo.NextHopType - */ -class NextHopType -{ - /** - * Unspecified type. Default value. - * - * Generated from protobuf enum NEXT_HOP_TYPE_UNSPECIFIED = 0; - */ - const NEXT_HOP_TYPE_UNSPECIFIED = 0; - /** - * Next hop is an IP address. - * - * Generated from protobuf enum NEXT_HOP_IP = 1; - */ - const NEXT_HOP_IP = 1; - /** - * Next hop is a Compute Engine instance. - * - * Generated from protobuf enum NEXT_HOP_INSTANCE = 2; - */ - const NEXT_HOP_INSTANCE = 2; - /** - * Next hop is a VPC network gateway. - * - * Generated from protobuf enum NEXT_HOP_NETWORK = 3; - */ - const NEXT_HOP_NETWORK = 3; - /** - * Next hop is a peering VPC. - * - * Generated from protobuf enum NEXT_HOP_PEERING = 4; - */ - const NEXT_HOP_PEERING = 4; - /** - * Next hop is an interconnect. - * - * Generated from protobuf enum NEXT_HOP_INTERCONNECT = 5; - */ - const NEXT_HOP_INTERCONNECT = 5; - /** - * Next hop is a VPN tunnel. - * - * Generated from protobuf enum NEXT_HOP_VPN_TUNNEL = 6; - */ - const NEXT_HOP_VPN_TUNNEL = 6; - /** - * Next hop is a VPN gateway. This scenario only happens when tracing - * connectivity from an on-premises network to Google Cloud through a VPN. - * The analysis simulates a packet departing from the on-premises network - * through a VPN tunnel and arriving at a Cloud VPN gateway. - * - * Generated from protobuf enum NEXT_HOP_VPN_GATEWAY = 7; - */ - const NEXT_HOP_VPN_GATEWAY = 7; - /** - * Next hop is an internet gateway. - * - * Generated from protobuf enum NEXT_HOP_INTERNET_GATEWAY = 8; - */ - const NEXT_HOP_INTERNET_GATEWAY = 8; - /** - * Next hop is blackhole; that is, the next hop either does not exist or is - * not running. - * - * Generated from protobuf enum NEXT_HOP_BLACKHOLE = 9; - */ - const NEXT_HOP_BLACKHOLE = 9; - /** - * Next hop is the forwarding rule of an Internal Load Balancer. - * - * Generated from protobuf enum NEXT_HOP_ILB = 10; - */ - const NEXT_HOP_ILB = 10; - /** - * Next hop is a - * [router appliance - * instance](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/ra-overview). - * - * Generated from protobuf enum NEXT_HOP_ROUTER_APPLIANCE = 11; - */ - const NEXT_HOP_ROUTER_APPLIANCE = 11; - /** - * Next hop is an NCC hub. - * - * Generated from protobuf enum NEXT_HOP_NCC_HUB = 12; - */ - const NEXT_HOP_NCC_HUB = 12; - - private static $valueToName = [ - self::NEXT_HOP_TYPE_UNSPECIFIED => 'NEXT_HOP_TYPE_UNSPECIFIED', - self::NEXT_HOP_IP => 'NEXT_HOP_IP', - self::NEXT_HOP_INSTANCE => 'NEXT_HOP_INSTANCE', - self::NEXT_HOP_NETWORK => 'NEXT_HOP_NETWORK', - self::NEXT_HOP_PEERING => 'NEXT_HOP_PEERING', - self::NEXT_HOP_INTERCONNECT => 'NEXT_HOP_INTERCONNECT', - self::NEXT_HOP_VPN_TUNNEL => 'NEXT_HOP_VPN_TUNNEL', - self::NEXT_HOP_VPN_GATEWAY => 'NEXT_HOP_VPN_GATEWAY', - self::NEXT_HOP_INTERNET_GATEWAY => 'NEXT_HOP_INTERNET_GATEWAY', - self::NEXT_HOP_BLACKHOLE => 'NEXT_HOP_BLACKHOLE', - self::NEXT_HOP_ILB => 'NEXT_HOP_ILB', - self::NEXT_HOP_ROUTER_APPLIANCE => 'NEXT_HOP_ROUTER_APPLIANCE', - self::NEXT_HOP_NCC_HUB => 'NEXT_HOP_NCC_HUB', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(NextHopType::class, \Google\Cloud\NetworkManagement\V1\RouteInfo_NextHopType::class); - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/RouteInfo/RouteScope.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/RouteInfo/RouteScope.php deleted file mode 100644 index 63ab17217fcb..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/RouteInfo/RouteScope.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.networkmanagement.v1.RouteInfo.RouteScope - */ -class RouteScope -{ - /** - * Unspecified scope. Default value. - * - * Generated from protobuf enum ROUTE_SCOPE_UNSPECIFIED = 0; - */ - const ROUTE_SCOPE_UNSPECIFIED = 0; - /** - * Route is applicable to packets in Network. - * - * Generated from protobuf enum NETWORK = 1; - */ - const NETWORK = 1; - /** - * Route is applicable to packets using NCC Hub's routing table. - * - * Generated from protobuf enum NCC_HUB = 2; - */ - const NCC_HUB = 2; - - private static $valueToName = [ - self::ROUTE_SCOPE_UNSPECIFIED => 'ROUTE_SCOPE_UNSPECIFIED', - self::NETWORK => 'NETWORK', - self::NCC_HUB => 'NCC_HUB', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(RouteScope::class, \Google\Cloud\NetworkManagement\V1\RouteInfo_RouteScope::class); - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/RouteInfo/RouteType.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/RouteInfo/RouteType.php deleted file mode 100644 index 11b80b17fb94..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/RouteInfo/RouteType.php +++ /dev/null @@ -1,112 +0,0 @@ -google.cloud.networkmanagement.v1.RouteInfo.RouteType - */ -class RouteType -{ - /** - * Unspecified type. Default value. - * - * Generated from protobuf enum ROUTE_TYPE_UNSPECIFIED = 0; - */ - const ROUTE_TYPE_UNSPECIFIED = 0; - /** - * Route is a subnet route automatically created by the system. - * - * Generated from protobuf enum SUBNET = 1; - */ - const SUBNET = 1; - /** - * Static route created by the user, including the default route to the - * internet. - * - * Generated from protobuf enum STATIC = 2; - */ - const PBSTATIC = 2; - /** - * Dynamic route exchanged between BGP peers. - * - * Generated from protobuf enum DYNAMIC = 3; - */ - const DYNAMIC = 3; - /** - * A subnet route received from peering network. - * - * Generated from protobuf enum PEERING_SUBNET = 4; - */ - const PEERING_SUBNET = 4; - /** - * A static route received from peering network. - * - * Generated from protobuf enum PEERING_STATIC = 5; - */ - const PEERING_STATIC = 5; - /** - * A dynamic route received from peering network. - * - * Generated from protobuf enum PEERING_DYNAMIC = 6; - */ - const PEERING_DYNAMIC = 6; - /** - * Policy based route. - * - * Generated from protobuf enum POLICY_BASED = 7; - */ - const POLICY_BASED = 7; - /** - * Advertised route. Synthetic route which is used to transition from the - * StartFromPrivateNetwork state in Connectivity tests. - * - * Generated from protobuf enum ADVERTISED = 101; - */ - const ADVERTISED = 101; - - private static $valueToName = [ - self::ROUTE_TYPE_UNSPECIFIED => 'ROUTE_TYPE_UNSPECIFIED', - self::SUBNET => 'SUBNET', - self::PBSTATIC => 'STATIC', - self::DYNAMIC => 'DYNAMIC', - self::PEERING_SUBNET => 'PEERING_SUBNET', - self::PEERING_STATIC => 'PEERING_STATIC', - self::PEERING_DYNAMIC => 'PEERING_DYNAMIC', - self::POLICY_BASED => 'POLICY_BASED', - self::ADVERTISED => 'ADVERTISED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - $pbconst = __CLASS__. '::PB' . strtoupper($name); - if (!defined($pbconst)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($pbconst); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(RouteType::class, \Google\Cloud\NetworkManagement\V1\RouteInfo_RouteType::class); - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ServerlessNegInfo.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ServerlessNegInfo.php deleted file mode 100644 index 582fd758a26c..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/ServerlessNegInfo.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.networkmanagement.v1.ServerlessNegInfo - */ -class ServerlessNegInfo extends \Google\Protobuf\Internal\Message -{ - /** - * URI of the serverless network endpoint group. - * - * Generated from protobuf field string neg_uri = 1; - */ - protected $neg_uri = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $neg_uri - * URI of the serverless network endpoint group. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkmanagement\V1\Trace::initOnce(); - parent::__construct($data); - } - - /** - * URI of the serverless network endpoint group. - * - * Generated from protobuf field string neg_uri = 1; - * @return string - */ - public function getNegUri() - { - return $this->neg_uri; - } - - /** - * URI of the serverless network endpoint group. - * - * Generated from protobuf field string neg_uri = 1; - * @param string $var - * @return $this - */ - public function setNegUri($var) - { - GPBUtil::checkString($var, True); - $this->neg_uri = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Step.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Step.php deleted file mode 100644 index 80fb590eea88..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Step.php +++ /dev/null @@ -1,1090 +0,0 @@ -google.cloud.networkmanagement.v1.Step - */ -class Step extends \Google\Protobuf\Internal\Message -{ - /** - * A description of the step. Usually this is a summary of the state. - * - * Generated from protobuf field string description = 1; - */ - protected $description = ''; - /** - * Each step is in one of the pre-defined states. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.Step.State state = 2; - */ - protected $state = 0; - /** - * This is a step that leads to the final state Drop. - * - * Generated from protobuf field bool causes_drop = 3; - */ - protected $causes_drop = false; - /** - * Project ID that contains the configuration this step is validating. - * - * Generated from protobuf field string project_id = 4; - */ - protected $project_id = ''; - protected $step_info; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $description - * A description of the step. Usually this is a summary of the state. - * @type int $state - * Each step is in one of the pre-defined states. - * @type bool $causes_drop - * This is a step that leads to the final state Drop. - * @type string $project_id - * Project ID that contains the configuration this step is validating. - * @type \Google\Cloud\NetworkManagement\V1\InstanceInfo $instance - * Display information of a Compute Engine instance. - * @type \Google\Cloud\NetworkManagement\V1\FirewallInfo $firewall - * Display information of a Compute Engine firewall rule. - * @type \Google\Cloud\NetworkManagement\V1\RouteInfo $route - * Display information of a Compute Engine route. - * @type \Google\Cloud\NetworkManagement\V1\EndpointInfo $endpoint - * Display information of the source and destination under analysis. - * The endpoint information in an intermediate state may differ with the - * initial input, as it might be modified by state like NAT, - * or Connection Proxy. - * @type \Google\Cloud\NetworkManagement\V1\GoogleServiceInfo $google_service - * Display information of a Google service - * @type \Google\Cloud\NetworkManagement\V1\ForwardingRuleInfo $forwarding_rule - * Display information of a Compute Engine forwarding rule. - * @type \Google\Cloud\NetworkManagement\V1\VpnGatewayInfo $vpn_gateway - * Display information of a Compute Engine VPN gateway. - * @type \Google\Cloud\NetworkManagement\V1\VpnTunnelInfo $vpn_tunnel - * Display information of a Compute Engine VPN tunnel. - * @type \Google\Cloud\NetworkManagement\V1\VpcConnectorInfo $vpc_connector - * Display information of a VPC connector. - * @type \Google\Cloud\NetworkManagement\V1\DeliverInfo $deliver - * Display information of the final state "deliver" and reason. - * @type \Google\Cloud\NetworkManagement\V1\ForwardInfo $forward - * Display information of the final state "forward" and reason. - * @type \Google\Cloud\NetworkManagement\V1\AbortInfo $abort - * Display information of the final state "abort" and reason. - * @type \Google\Cloud\NetworkManagement\V1\DropInfo $drop - * Display information of the final state "drop" and reason. - * @type \Google\Cloud\NetworkManagement\V1\LoadBalancerInfo $load_balancer - * Display information of the load balancers. Deprecated in favor of the - * `load_balancer_backend_info` field, not used in new tests. - * @type \Google\Cloud\NetworkManagement\V1\NetworkInfo $network - * Display information of a Google Cloud network. - * @type \Google\Cloud\NetworkManagement\V1\GKEMasterInfo $gke_master - * Display information of a Google Kubernetes Engine cluster master. - * @type \Google\Cloud\NetworkManagement\V1\CloudSQLInstanceInfo $cloud_sql_instance - * Display information of a Cloud SQL instance. - * @type \Google\Cloud\NetworkManagement\V1\RedisInstanceInfo $redis_instance - * Display information of a Redis Instance. - * @type \Google\Cloud\NetworkManagement\V1\RedisClusterInfo $redis_cluster - * Display information of a Redis Cluster. - * @type \Google\Cloud\NetworkManagement\V1\CloudFunctionInfo $cloud_function - * Display information of a Cloud Function. - * @type \Google\Cloud\NetworkManagement\V1\AppEngineVersionInfo $app_engine_version - * Display information of an App Engine service version. - * @type \Google\Cloud\NetworkManagement\V1\CloudRunRevisionInfo $cloud_run_revision - * Display information of a Cloud Run revision. - * @type \Google\Cloud\NetworkManagement\V1\NatInfo $nat - * Display information of a NAT. - * @type \Google\Cloud\NetworkManagement\V1\ProxyConnectionInfo $proxy_connection - * Display information of a ProxyConnection. - * @type \Google\Cloud\NetworkManagement\V1\LoadBalancerBackendInfo $load_balancer_backend_info - * Display information of a specific load balancer backend. - * @type \Google\Cloud\NetworkManagement\V1\StorageBucketInfo $storage_bucket - * Display information of a Storage Bucket. Used only for return traces. - * @type \Google\Cloud\NetworkManagement\V1\ServerlessNegInfo $serverless_neg - * Display information of a Serverless network endpoint group backend. Used - * only for return traces. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkmanagement\V1\Trace::initOnce(); - parent::__construct($data); - } - - /** - * A description of the step. Usually this is a summary of the state. - * - * Generated from protobuf field string description = 1; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * A description of the step. Usually this is a summary of the state. - * - * Generated from protobuf field string description = 1; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Each step is in one of the pre-defined states. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.Step.State state = 2; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Each step is in one of the pre-defined states. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.Step.State state = 2; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\NetworkManagement\V1\Step\State::class); - $this->state = $var; - - return $this; - } - - /** - * This is a step that leads to the final state Drop. - * - * Generated from protobuf field bool causes_drop = 3; - * @return bool - */ - public function getCausesDrop() - { - return $this->causes_drop; - } - - /** - * This is a step that leads to the final state Drop. - * - * Generated from protobuf field bool causes_drop = 3; - * @param bool $var - * @return $this - */ - public function setCausesDrop($var) - { - GPBUtil::checkBool($var); - $this->causes_drop = $var; - - return $this; - } - - /** - * Project ID that contains the configuration this step is validating. - * - * Generated from protobuf field string project_id = 4; - * @return string - */ - public function getProjectId() - { - return $this->project_id; - } - - /** - * Project ID that contains the configuration this step is validating. - * - * Generated from protobuf field string project_id = 4; - * @param string $var - * @return $this - */ - public function setProjectId($var) - { - GPBUtil::checkString($var, True); - $this->project_id = $var; - - return $this; - } - - /** - * Display information of a Compute Engine instance. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.InstanceInfo instance = 5; - * @return \Google\Cloud\NetworkManagement\V1\InstanceInfo|null - */ - public function getInstance() - { - return $this->readOneof(5); - } - - public function hasInstance() - { - return $this->hasOneof(5); - } - - /** - * Display information of a Compute Engine instance. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.InstanceInfo instance = 5; - * @param \Google\Cloud\NetworkManagement\V1\InstanceInfo $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\InstanceInfo::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * Display information of a Compute Engine firewall rule. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.FirewallInfo firewall = 6; - * @return \Google\Cloud\NetworkManagement\V1\FirewallInfo|null - */ - public function getFirewall() - { - return $this->readOneof(6); - } - - public function hasFirewall() - { - return $this->hasOneof(6); - } - - /** - * Display information of a Compute Engine firewall rule. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.FirewallInfo firewall = 6; - * @param \Google\Cloud\NetworkManagement\V1\FirewallInfo $var - * @return $this - */ - public function setFirewall($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\FirewallInfo::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * Display information of a Compute Engine route. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.RouteInfo route = 7; - * @return \Google\Cloud\NetworkManagement\V1\RouteInfo|null - */ - public function getRoute() - { - return $this->readOneof(7); - } - - public function hasRoute() - { - return $this->hasOneof(7); - } - - /** - * Display information of a Compute Engine route. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.RouteInfo route = 7; - * @param \Google\Cloud\NetworkManagement\V1\RouteInfo $var - * @return $this - */ - public function setRoute($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\RouteInfo::class); - $this->writeOneof(7, $var); - - return $this; - } - - /** - * Display information of the source and destination under analysis. - * The endpoint information in an intermediate state may differ with the - * initial input, as it might be modified by state like NAT, - * or Connection Proxy. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.EndpointInfo endpoint = 8; - * @return \Google\Cloud\NetworkManagement\V1\EndpointInfo|null - */ - public function getEndpoint() - { - return $this->readOneof(8); - } - - public function hasEndpoint() - { - return $this->hasOneof(8); - } - - /** - * Display information of the source and destination under analysis. - * The endpoint information in an intermediate state may differ with the - * initial input, as it might be modified by state like NAT, - * or Connection Proxy. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.EndpointInfo endpoint = 8; - * @param \Google\Cloud\NetworkManagement\V1\EndpointInfo $var - * @return $this - */ - public function setEndpoint($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\EndpointInfo::class); - $this->writeOneof(8, $var); - - return $this; - } - - /** - * Display information of a Google service - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.GoogleServiceInfo google_service = 24; - * @return \Google\Cloud\NetworkManagement\V1\GoogleServiceInfo|null - */ - public function getGoogleService() - { - return $this->readOneof(24); - } - - public function hasGoogleService() - { - return $this->hasOneof(24); - } - - /** - * Display information of a Google service - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.GoogleServiceInfo google_service = 24; - * @param \Google\Cloud\NetworkManagement\V1\GoogleServiceInfo $var - * @return $this - */ - public function setGoogleService($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\GoogleServiceInfo::class); - $this->writeOneof(24, $var); - - return $this; - } - - /** - * Display information of a Compute Engine forwarding rule. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.ForwardingRuleInfo forwarding_rule = 9; - * @return \Google\Cloud\NetworkManagement\V1\ForwardingRuleInfo|null - */ - public function getForwardingRule() - { - return $this->readOneof(9); - } - - public function hasForwardingRule() - { - return $this->hasOneof(9); - } - - /** - * Display information of a Compute Engine forwarding rule. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.ForwardingRuleInfo forwarding_rule = 9; - * @param \Google\Cloud\NetworkManagement\V1\ForwardingRuleInfo $var - * @return $this - */ - public function setForwardingRule($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\ForwardingRuleInfo::class); - $this->writeOneof(9, $var); - - return $this; - } - - /** - * Display information of a Compute Engine VPN gateway. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.VpnGatewayInfo vpn_gateway = 10; - * @return \Google\Cloud\NetworkManagement\V1\VpnGatewayInfo|null - */ - public function getVpnGateway() - { - return $this->readOneof(10); - } - - public function hasVpnGateway() - { - return $this->hasOneof(10); - } - - /** - * Display information of a Compute Engine VPN gateway. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.VpnGatewayInfo vpn_gateway = 10; - * @param \Google\Cloud\NetworkManagement\V1\VpnGatewayInfo $var - * @return $this - */ - public function setVpnGateway($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\VpnGatewayInfo::class); - $this->writeOneof(10, $var); - - return $this; - } - - /** - * Display information of a Compute Engine VPN tunnel. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.VpnTunnelInfo vpn_tunnel = 11; - * @return \Google\Cloud\NetworkManagement\V1\VpnTunnelInfo|null - */ - public function getVpnTunnel() - { - return $this->readOneof(11); - } - - public function hasVpnTunnel() - { - return $this->hasOneof(11); - } - - /** - * Display information of a Compute Engine VPN tunnel. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.VpnTunnelInfo vpn_tunnel = 11; - * @param \Google\Cloud\NetworkManagement\V1\VpnTunnelInfo $var - * @return $this - */ - public function setVpnTunnel($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\VpnTunnelInfo::class); - $this->writeOneof(11, $var); - - return $this; - } - - /** - * Display information of a VPC connector. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.VpcConnectorInfo vpc_connector = 21; - * @return \Google\Cloud\NetworkManagement\V1\VpcConnectorInfo|null - */ - public function getVpcConnector() - { - return $this->readOneof(21); - } - - public function hasVpcConnector() - { - return $this->hasOneof(21); - } - - /** - * Display information of a VPC connector. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.VpcConnectorInfo vpc_connector = 21; - * @param \Google\Cloud\NetworkManagement\V1\VpcConnectorInfo $var - * @return $this - */ - public function setVpcConnector($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\VpcConnectorInfo::class); - $this->writeOneof(21, $var); - - return $this; - } - - /** - * Display information of the final state "deliver" and reason. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.DeliverInfo deliver = 12; - * @return \Google\Cloud\NetworkManagement\V1\DeliverInfo|null - */ - public function getDeliver() - { - return $this->readOneof(12); - } - - public function hasDeliver() - { - return $this->hasOneof(12); - } - - /** - * Display information of the final state "deliver" and reason. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.DeliverInfo deliver = 12; - * @param \Google\Cloud\NetworkManagement\V1\DeliverInfo $var - * @return $this - */ - public function setDeliver($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\DeliverInfo::class); - $this->writeOneof(12, $var); - - return $this; - } - - /** - * Display information of the final state "forward" and reason. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.ForwardInfo forward = 13; - * @return \Google\Cloud\NetworkManagement\V1\ForwardInfo|null - */ - public function getForward() - { - return $this->readOneof(13); - } - - public function hasForward() - { - return $this->hasOneof(13); - } - - /** - * Display information of the final state "forward" and reason. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.ForwardInfo forward = 13; - * @param \Google\Cloud\NetworkManagement\V1\ForwardInfo $var - * @return $this - */ - public function setForward($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\ForwardInfo::class); - $this->writeOneof(13, $var); - - return $this; - } - - /** - * Display information of the final state "abort" and reason. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.AbortInfo abort = 14; - * @return \Google\Cloud\NetworkManagement\V1\AbortInfo|null - */ - public function getAbort() - { - return $this->readOneof(14); - } - - public function hasAbort() - { - return $this->hasOneof(14); - } - - /** - * Display information of the final state "abort" and reason. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.AbortInfo abort = 14; - * @param \Google\Cloud\NetworkManagement\V1\AbortInfo $var - * @return $this - */ - public function setAbort($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\AbortInfo::class); - $this->writeOneof(14, $var); - - return $this; - } - - /** - * Display information of the final state "drop" and reason. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.DropInfo drop = 15; - * @return \Google\Cloud\NetworkManagement\V1\DropInfo|null - */ - public function getDrop() - { - return $this->readOneof(15); - } - - public function hasDrop() - { - return $this->hasOneof(15); - } - - /** - * Display information of the final state "drop" and reason. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.DropInfo drop = 15; - * @param \Google\Cloud\NetworkManagement\V1\DropInfo $var - * @return $this - */ - public function setDrop($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\DropInfo::class); - $this->writeOneof(15, $var); - - return $this; - } - - /** - * Display information of the load balancers. Deprecated in favor of the - * `load_balancer_backend_info` field, not used in new tests. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.LoadBalancerInfo load_balancer = 16 [deprecated = true]; - * @return \Google\Cloud\NetworkManagement\V1\LoadBalancerInfo|null - * @deprecated - */ - public function getLoadBalancer() - { - @trigger_error('load_balancer is deprecated.', E_USER_DEPRECATED); - return $this->readOneof(16); - } - - public function hasLoadBalancer() - { - @trigger_error('load_balancer is deprecated.', E_USER_DEPRECATED); - return $this->hasOneof(16); - } - - /** - * Display information of the load balancers. Deprecated in favor of the - * `load_balancer_backend_info` field, not used in new tests. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.LoadBalancerInfo load_balancer = 16 [deprecated = true]; - * @param \Google\Cloud\NetworkManagement\V1\LoadBalancerInfo $var - * @return $this - * @deprecated - */ - public function setLoadBalancer($var) - { - @trigger_error('load_balancer is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\LoadBalancerInfo::class); - $this->writeOneof(16, $var); - - return $this; - } - - /** - * Display information of a Google Cloud network. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.NetworkInfo network = 17; - * @return \Google\Cloud\NetworkManagement\V1\NetworkInfo|null - */ - public function getNetwork() - { - return $this->readOneof(17); - } - - public function hasNetwork() - { - return $this->hasOneof(17); - } - - /** - * Display information of a Google Cloud network. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.NetworkInfo network = 17; - * @param \Google\Cloud\NetworkManagement\V1\NetworkInfo $var - * @return $this - */ - public function setNetwork($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\NetworkInfo::class); - $this->writeOneof(17, $var); - - return $this; - } - - /** - * Display information of a Google Kubernetes Engine cluster master. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.GKEMasterInfo gke_master = 18; - * @return \Google\Cloud\NetworkManagement\V1\GKEMasterInfo|null - */ - public function getGkeMaster() - { - return $this->readOneof(18); - } - - public function hasGkeMaster() - { - return $this->hasOneof(18); - } - - /** - * Display information of a Google Kubernetes Engine cluster master. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.GKEMasterInfo gke_master = 18; - * @param \Google\Cloud\NetworkManagement\V1\GKEMasterInfo $var - * @return $this - */ - public function setGkeMaster($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\GKEMasterInfo::class); - $this->writeOneof(18, $var); - - return $this; - } - - /** - * Display information of a Cloud SQL instance. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.CloudSQLInstanceInfo cloud_sql_instance = 19; - * @return \Google\Cloud\NetworkManagement\V1\CloudSQLInstanceInfo|null - */ - public function getCloudSqlInstance() - { - return $this->readOneof(19); - } - - public function hasCloudSqlInstance() - { - return $this->hasOneof(19); - } - - /** - * Display information of a Cloud SQL instance. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.CloudSQLInstanceInfo cloud_sql_instance = 19; - * @param \Google\Cloud\NetworkManagement\V1\CloudSQLInstanceInfo $var - * @return $this - */ - public function setCloudSqlInstance($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\CloudSQLInstanceInfo::class); - $this->writeOneof(19, $var); - - return $this; - } - - /** - * Display information of a Redis Instance. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.RedisInstanceInfo redis_instance = 30; - * @return \Google\Cloud\NetworkManagement\V1\RedisInstanceInfo|null - */ - public function getRedisInstance() - { - return $this->readOneof(30); - } - - public function hasRedisInstance() - { - return $this->hasOneof(30); - } - - /** - * Display information of a Redis Instance. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.RedisInstanceInfo redis_instance = 30; - * @param \Google\Cloud\NetworkManagement\V1\RedisInstanceInfo $var - * @return $this - */ - public function setRedisInstance($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\RedisInstanceInfo::class); - $this->writeOneof(30, $var); - - return $this; - } - - /** - * Display information of a Redis Cluster. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.RedisClusterInfo redis_cluster = 31; - * @return \Google\Cloud\NetworkManagement\V1\RedisClusterInfo|null - */ - public function getRedisCluster() - { - return $this->readOneof(31); - } - - public function hasRedisCluster() - { - return $this->hasOneof(31); - } - - /** - * Display information of a Redis Cluster. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.RedisClusterInfo redis_cluster = 31; - * @param \Google\Cloud\NetworkManagement\V1\RedisClusterInfo $var - * @return $this - */ - public function setRedisCluster($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\RedisClusterInfo::class); - $this->writeOneof(31, $var); - - return $this; - } - - /** - * Display information of a Cloud Function. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.CloudFunctionInfo cloud_function = 20; - * @return \Google\Cloud\NetworkManagement\V1\CloudFunctionInfo|null - */ - public function getCloudFunction() - { - return $this->readOneof(20); - } - - public function hasCloudFunction() - { - return $this->hasOneof(20); - } - - /** - * Display information of a Cloud Function. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.CloudFunctionInfo cloud_function = 20; - * @param \Google\Cloud\NetworkManagement\V1\CloudFunctionInfo $var - * @return $this - */ - public function setCloudFunction($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\CloudFunctionInfo::class); - $this->writeOneof(20, $var); - - return $this; - } - - /** - * Display information of an App Engine service version. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.AppEngineVersionInfo app_engine_version = 22; - * @return \Google\Cloud\NetworkManagement\V1\AppEngineVersionInfo|null - */ - public function getAppEngineVersion() - { - return $this->readOneof(22); - } - - public function hasAppEngineVersion() - { - return $this->hasOneof(22); - } - - /** - * Display information of an App Engine service version. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.AppEngineVersionInfo app_engine_version = 22; - * @param \Google\Cloud\NetworkManagement\V1\AppEngineVersionInfo $var - * @return $this - */ - public function setAppEngineVersion($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\AppEngineVersionInfo::class); - $this->writeOneof(22, $var); - - return $this; - } - - /** - * Display information of a Cloud Run revision. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.CloudRunRevisionInfo cloud_run_revision = 23; - * @return \Google\Cloud\NetworkManagement\V1\CloudRunRevisionInfo|null - */ - public function getCloudRunRevision() - { - return $this->readOneof(23); - } - - public function hasCloudRunRevision() - { - return $this->hasOneof(23); - } - - /** - * Display information of a Cloud Run revision. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.CloudRunRevisionInfo cloud_run_revision = 23; - * @param \Google\Cloud\NetworkManagement\V1\CloudRunRevisionInfo $var - * @return $this - */ - public function setCloudRunRevision($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\CloudRunRevisionInfo::class); - $this->writeOneof(23, $var); - - return $this; - } - - /** - * Display information of a NAT. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.NatInfo nat = 25; - * @return \Google\Cloud\NetworkManagement\V1\NatInfo|null - */ - public function getNat() - { - return $this->readOneof(25); - } - - public function hasNat() - { - return $this->hasOneof(25); - } - - /** - * Display information of a NAT. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.NatInfo nat = 25; - * @param \Google\Cloud\NetworkManagement\V1\NatInfo $var - * @return $this - */ - public function setNat($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\NatInfo::class); - $this->writeOneof(25, $var); - - return $this; - } - - /** - * Display information of a ProxyConnection. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.ProxyConnectionInfo proxy_connection = 26; - * @return \Google\Cloud\NetworkManagement\V1\ProxyConnectionInfo|null - */ - public function getProxyConnection() - { - return $this->readOneof(26); - } - - public function hasProxyConnection() - { - return $this->hasOneof(26); - } - - /** - * Display information of a ProxyConnection. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.ProxyConnectionInfo proxy_connection = 26; - * @param \Google\Cloud\NetworkManagement\V1\ProxyConnectionInfo $var - * @return $this - */ - public function setProxyConnection($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\ProxyConnectionInfo::class); - $this->writeOneof(26, $var); - - return $this; - } - - /** - * Display information of a specific load balancer backend. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.LoadBalancerBackendInfo load_balancer_backend_info = 27; - * @return \Google\Cloud\NetworkManagement\V1\LoadBalancerBackendInfo|null - */ - public function getLoadBalancerBackendInfo() - { - return $this->readOneof(27); - } - - public function hasLoadBalancerBackendInfo() - { - return $this->hasOneof(27); - } - - /** - * Display information of a specific load balancer backend. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.LoadBalancerBackendInfo load_balancer_backend_info = 27; - * @param \Google\Cloud\NetworkManagement\V1\LoadBalancerBackendInfo $var - * @return $this - */ - public function setLoadBalancerBackendInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\LoadBalancerBackendInfo::class); - $this->writeOneof(27, $var); - - return $this; - } - - /** - * Display information of a Storage Bucket. Used only for return traces. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.StorageBucketInfo storage_bucket = 28; - * @return \Google\Cloud\NetworkManagement\V1\StorageBucketInfo|null - */ - public function getStorageBucket() - { - return $this->readOneof(28); - } - - public function hasStorageBucket() - { - return $this->hasOneof(28); - } - - /** - * Display information of a Storage Bucket. Used only for return traces. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.StorageBucketInfo storage_bucket = 28; - * @param \Google\Cloud\NetworkManagement\V1\StorageBucketInfo $var - * @return $this - */ - public function setStorageBucket($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\StorageBucketInfo::class); - $this->writeOneof(28, $var); - - return $this; - } - - /** - * Display information of a Serverless network endpoint group backend. Used - * only for return traces. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.ServerlessNegInfo serverless_neg = 29; - * @return \Google\Cloud\NetworkManagement\V1\ServerlessNegInfo|null - */ - public function getServerlessNeg() - { - return $this->readOneof(29); - } - - public function hasServerlessNeg() - { - return $this->hasOneof(29); - } - - /** - * Display information of a Serverless network endpoint group backend. Used - * only for return traces. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.ServerlessNegInfo serverless_neg = 29; - * @param \Google\Cloud\NetworkManagement\V1\ServerlessNegInfo $var - * @return $this - */ - public function setServerlessNeg($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\ServerlessNegInfo::class); - $this->writeOneof(29, $var); - - return $this; - } - - /** - * @return string - */ - public function getStepInfo() - { - return $this->whichOneof("step_info"); - } - -} - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Step/State.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Step/State.php deleted file mode 100644 index 291d2e7875d6..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Step/State.php +++ /dev/null @@ -1,304 +0,0 @@ -google.cloud.networkmanagement.v1.Step.State - */ -class State -{ - /** - * Unspecified state. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Initial state: packet originating from a Compute Engine instance. - * An InstanceInfo is populated with starting instance information. - * - * Generated from protobuf enum START_FROM_INSTANCE = 1; - */ - const START_FROM_INSTANCE = 1; - /** - * Initial state: packet originating from the internet. - * The endpoint information is populated. - * - * Generated from protobuf enum START_FROM_INTERNET = 2; - */ - const START_FROM_INTERNET = 2; - /** - * Initial state: packet originating from a Google service. - * The google_service information is populated. - * - * Generated from protobuf enum START_FROM_GOOGLE_SERVICE = 27; - */ - const START_FROM_GOOGLE_SERVICE = 27; - /** - * Initial state: packet originating from a VPC or on-premises network - * with internal source IP. - * If the source is a VPC network visible to the user, a NetworkInfo - * is populated with details of the network. - * - * Generated from protobuf enum START_FROM_PRIVATE_NETWORK = 3; - */ - const START_FROM_PRIVATE_NETWORK = 3; - /** - * Initial state: packet originating from a Google Kubernetes Engine cluster - * master. A GKEMasterInfo is populated with starting instance information. - * - * Generated from protobuf enum START_FROM_GKE_MASTER = 21; - */ - const START_FROM_GKE_MASTER = 21; - /** - * Initial state: packet originating from a Cloud SQL instance. - * A CloudSQLInstanceInfo is populated with starting instance information. - * - * Generated from protobuf enum START_FROM_CLOUD_SQL_INSTANCE = 22; - */ - const START_FROM_CLOUD_SQL_INSTANCE = 22; - /** - * Initial state: packet originating from a Redis instance. - * A RedisInstanceInfo is populated with starting instance information. - * - * Generated from protobuf enum START_FROM_REDIS_INSTANCE = 32; - */ - const START_FROM_REDIS_INSTANCE = 32; - /** - * Initial state: packet originating from a Redis Cluster. - * A RedisClusterInfo is populated with starting Cluster information. - * - * Generated from protobuf enum START_FROM_REDIS_CLUSTER = 33; - */ - const START_FROM_REDIS_CLUSTER = 33; - /** - * Initial state: packet originating from a Cloud Function. - * A CloudFunctionInfo is populated with starting function information. - * - * Generated from protobuf enum START_FROM_CLOUD_FUNCTION = 23; - */ - const START_FROM_CLOUD_FUNCTION = 23; - /** - * Initial state: packet originating from an App Engine service version. - * An AppEngineVersionInfo is populated with starting version information. - * - * Generated from protobuf enum START_FROM_APP_ENGINE_VERSION = 25; - */ - const START_FROM_APP_ENGINE_VERSION = 25; - /** - * Initial state: packet originating from a Cloud Run revision. - * A CloudRunRevisionInfo is populated with starting revision information. - * - * Generated from protobuf enum START_FROM_CLOUD_RUN_REVISION = 26; - */ - const START_FROM_CLOUD_RUN_REVISION = 26; - /** - * Initial state: packet originating from a Storage Bucket. Used only for - * return traces. - * The storage_bucket information is populated. - * - * Generated from protobuf enum START_FROM_STORAGE_BUCKET = 29; - */ - const START_FROM_STORAGE_BUCKET = 29; - /** - * Initial state: packet originating from a published service that uses - * Private Service Connect. Used only for return traces. - * - * Generated from protobuf enum START_FROM_PSC_PUBLISHED_SERVICE = 30; - */ - const START_FROM_PSC_PUBLISHED_SERVICE = 30; - /** - * Initial state: packet originating from a serverless network endpoint - * group backend. Used only for return traces. - * The serverless_neg information is populated. - * - * Generated from protobuf enum START_FROM_SERVERLESS_NEG = 31; - */ - const START_FROM_SERVERLESS_NEG = 31; - /** - * Config checking state: verify ingress firewall rule. - * - * Generated from protobuf enum APPLY_INGRESS_FIREWALL_RULE = 4; - */ - const APPLY_INGRESS_FIREWALL_RULE = 4; - /** - * Config checking state: verify egress firewall rule. - * - * Generated from protobuf enum APPLY_EGRESS_FIREWALL_RULE = 5; - */ - const APPLY_EGRESS_FIREWALL_RULE = 5; - /** - * Config checking state: verify route. - * - * Generated from protobuf enum APPLY_ROUTE = 6; - */ - const APPLY_ROUTE = 6; - /** - * Config checking state: match forwarding rule. - * - * Generated from protobuf enum APPLY_FORWARDING_RULE = 7; - */ - const APPLY_FORWARDING_RULE = 7; - /** - * Config checking state: verify load balancer backend configuration. - * - * Generated from protobuf enum ANALYZE_LOAD_BALANCER_BACKEND = 28; - */ - const ANALYZE_LOAD_BALANCER_BACKEND = 28; - /** - * Config checking state: packet sent or received under foreign IP - * address and allowed. - * - * Generated from protobuf enum SPOOFING_APPROVED = 8; - */ - const SPOOFING_APPROVED = 8; - /** - * Forwarding state: arriving at a Compute Engine instance. - * - * Generated from protobuf enum ARRIVE_AT_INSTANCE = 9; - */ - const ARRIVE_AT_INSTANCE = 9; - /** - * Forwarding state: arriving at a Compute Engine internal load balancer. - * - * Generated from protobuf enum ARRIVE_AT_INTERNAL_LOAD_BALANCER = 10 [deprecated = true]; - */ - const ARRIVE_AT_INTERNAL_LOAD_BALANCER = 10; - /** - * Forwarding state: arriving at a Compute Engine external load balancer. - * - * Generated from protobuf enum ARRIVE_AT_EXTERNAL_LOAD_BALANCER = 11 [deprecated = true]; - */ - const ARRIVE_AT_EXTERNAL_LOAD_BALANCER = 11; - /** - * Forwarding state: arriving at a Cloud VPN gateway. - * - * Generated from protobuf enum ARRIVE_AT_VPN_GATEWAY = 12; - */ - const ARRIVE_AT_VPN_GATEWAY = 12; - /** - * Forwarding state: arriving at a Cloud VPN tunnel. - * - * Generated from protobuf enum ARRIVE_AT_VPN_TUNNEL = 13; - */ - const ARRIVE_AT_VPN_TUNNEL = 13; - /** - * Forwarding state: arriving at a VPC connector. - * - * Generated from protobuf enum ARRIVE_AT_VPC_CONNECTOR = 24; - */ - const ARRIVE_AT_VPC_CONNECTOR = 24; - /** - * Transition state: packet header translated. - * - * Generated from protobuf enum NAT = 14; - */ - const NAT = 14; - /** - * Transition state: original connection is terminated and a new proxied - * connection is initiated. - * - * Generated from protobuf enum PROXY_CONNECTION = 15; - */ - const PROXY_CONNECTION = 15; - /** - * Final state: packet could be delivered. - * - * Generated from protobuf enum DELIVER = 16; - */ - const DELIVER = 16; - /** - * Final state: packet could be dropped. - * - * Generated from protobuf enum DROP = 17; - */ - const DROP = 17; - /** - * Final state: packet could be forwarded to a network with an unknown - * configuration. - * - * Generated from protobuf enum FORWARD = 18; - */ - const FORWARD = 18; - /** - * Final state: analysis is aborted. - * - * Generated from protobuf enum ABORT = 19; - */ - const ABORT = 19; - /** - * Special state: viewer of the test result does not have permission to - * see the configuration in this step. - * - * Generated from protobuf enum VIEWER_PERMISSION_MISSING = 20; - */ - const VIEWER_PERMISSION_MISSING = 20; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::START_FROM_INSTANCE => 'START_FROM_INSTANCE', - self::START_FROM_INTERNET => 'START_FROM_INTERNET', - self::START_FROM_GOOGLE_SERVICE => 'START_FROM_GOOGLE_SERVICE', - self::START_FROM_PRIVATE_NETWORK => 'START_FROM_PRIVATE_NETWORK', - self::START_FROM_GKE_MASTER => 'START_FROM_GKE_MASTER', - self::START_FROM_CLOUD_SQL_INSTANCE => 'START_FROM_CLOUD_SQL_INSTANCE', - self::START_FROM_REDIS_INSTANCE => 'START_FROM_REDIS_INSTANCE', - self::START_FROM_REDIS_CLUSTER => 'START_FROM_REDIS_CLUSTER', - self::START_FROM_CLOUD_FUNCTION => 'START_FROM_CLOUD_FUNCTION', - self::START_FROM_APP_ENGINE_VERSION => 'START_FROM_APP_ENGINE_VERSION', - self::START_FROM_CLOUD_RUN_REVISION => 'START_FROM_CLOUD_RUN_REVISION', - self::START_FROM_STORAGE_BUCKET => 'START_FROM_STORAGE_BUCKET', - self::START_FROM_PSC_PUBLISHED_SERVICE => 'START_FROM_PSC_PUBLISHED_SERVICE', - self::START_FROM_SERVERLESS_NEG => 'START_FROM_SERVERLESS_NEG', - self::APPLY_INGRESS_FIREWALL_RULE => 'APPLY_INGRESS_FIREWALL_RULE', - self::APPLY_EGRESS_FIREWALL_RULE => 'APPLY_EGRESS_FIREWALL_RULE', - self::APPLY_ROUTE => 'APPLY_ROUTE', - self::APPLY_FORWARDING_RULE => 'APPLY_FORWARDING_RULE', - self::ANALYZE_LOAD_BALANCER_BACKEND => 'ANALYZE_LOAD_BALANCER_BACKEND', - self::SPOOFING_APPROVED => 'SPOOFING_APPROVED', - self::ARRIVE_AT_INSTANCE => 'ARRIVE_AT_INSTANCE', - self::ARRIVE_AT_INTERNAL_LOAD_BALANCER => 'ARRIVE_AT_INTERNAL_LOAD_BALANCER', - self::ARRIVE_AT_EXTERNAL_LOAD_BALANCER => 'ARRIVE_AT_EXTERNAL_LOAD_BALANCER', - self::ARRIVE_AT_VPN_GATEWAY => 'ARRIVE_AT_VPN_GATEWAY', - self::ARRIVE_AT_VPN_TUNNEL => 'ARRIVE_AT_VPN_TUNNEL', - self::ARRIVE_AT_VPC_CONNECTOR => 'ARRIVE_AT_VPC_CONNECTOR', - self::NAT => 'NAT', - self::PROXY_CONNECTION => 'PROXY_CONNECTION', - self::DELIVER => 'DELIVER', - self::DROP => 'DROP', - self::FORWARD => 'FORWARD', - self::ABORT => 'ABORT', - self::VIEWER_PERMISSION_MISSING => 'VIEWER_PERMISSION_MISSING', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\NetworkManagement\V1\Step_State::class); - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/StorageBucketInfo.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/StorageBucketInfo.php deleted file mode 100644 index 58b34cf98567..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/StorageBucketInfo.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.networkmanagement.v1.StorageBucketInfo - */ -class StorageBucketInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Cloud Storage Bucket name. - * - * Generated from protobuf field string bucket = 1; - */ - protected $bucket = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $bucket - * Cloud Storage Bucket name. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkmanagement\V1\Trace::initOnce(); - parent::__construct($data); - } - - /** - * Cloud Storage Bucket name. - * - * Generated from protobuf field string bucket = 1; - * @return string - */ - public function getBucket() - { - return $this->bucket; - } - - /** - * Cloud Storage Bucket name. - * - * Generated from protobuf field string bucket = 1; - * @param string $var - * @return $this - */ - public function setBucket($var) - { - GPBUtil::checkString($var, True); - $this->bucket = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Trace.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Trace.php deleted file mode 100644 index 02548d666c07..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/Trace.php +++ /dev/null @@ -1,190 +0,0 @@ -google.cloud.networkmanagement.v1.Trace - */ -class Trace extends \Google\Protobuf\Internal\Message -{ - /** - * Derived from the source and destination endpoints definition specified by - * user request, and validated by the data plane model. - * If there are multiple traces starting from different source locations, then - * the endpoint_info may be different between traces. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.EndpointInfo endpoint_info = 1; - */ - protected $endpoint_info = null; - /** - * A trace of a test contains multiple steps from the initial state to the - * final state (delivered, dropped, forwarded, or aborted). - * The steps are ordered by the processing sequence within the simulated - * network state machine. It is critical to preserve the order of the steps - * and avoid reordering or sorting them. - * - * Generated from protobuf field repeated .google.cloud.networkmanagement.v1.Step steps = 2; - */ - private $steps; - /** - * ID of trace. For forward traces, this ID is unique for each trace. For - * return traces, it matches ID of associated forward trace. A single forward - * trace can be associated with none, one or more than one return trace. - * - * Generated from protobuf field int32 forward_trace_id = 4; - */ - protected $forward_trace_id = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\NetworkManagement\V1\EndpointInfo $endpoint_info - * Derived from the source and destination endpoints definition specified by - * user request, and validated by the data plane model. - * If there are multiple traces starting from different source locations, then - * the endpoint_info may be different between traces. - * @type array<\Google\Cloud\NetworkManagement\V1\Step>|\Google\Protobuf\Internal\RepeatedField $steps - * A trace of a test contains multiple steps from the initial state to the - * final state (delivered, dropped, forwarded, or aborted). - * The steps are ordered by the processing sequence within the simulated - * network state machine. It is critical to preserve the order of the steps - * and avoid reordering or sorting them. - * @type int $forward_trace_id - * ID of trace. For forward traces, this ID is unique for each trace. For - * return traces, it matches ID of associated forward trace. A single forward - * trace can be associated with none, one or more than one return trace. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkmanagement\V1\Trace::initOnce(); - parent::__construct($data); - } - - /** - * Derived from the source and destination endpoints definition specified by - * user request, and validated by the data plane model. - * If there are multiple traces starting from different source locations, then - * the endpoint_info may be different between traces. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.EndpointInfo endpoint_info = 1; - * @return \Google\Cloud\NetworkManagement\V1\EndpointInfo|null - */ - public function getEndpointInfo() - { - return $this->endpoint_info; - } - - public function hasEndpointInfo() - { - return isset($this->endpoint_info); - } - - public function clearEndpointInfo() - { - unset($this->endpoint_info); - } - - /** - * Derived from the source and destination endpoints definition specified by - * user request, and validated by the data plane model. - * If there are multiple traces starting from different source locations, then - * the endpoint_info may be different between traces. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.EndpointInfo endpoint_info = 1; - * @param \Google\Cloud\NetworkManagement\V1\EndpointInfo $var - * @return $this - */ - public function setEndpointInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\EndpointInfo::class); - $this->endpoint_info = $var; - - return $this; - } - - /** - * A trace of a test contains multiple steps from the initial state to the - * final state (delivered, dropped, forwarded, or aborted). - * The steps are ordered by the processing sequence within the simulated - * network state machine. It is critical to preserve the order of the steps - * and avoid reordering or sorting them. - * - * Generated from protobuf field repeated .google.cloud.networkmanagement.v1.Step steps = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSteps() - { - return $this->steps; - } - - /** - * A trace of a test contains multiple steps from the initial state to the - * final state (delivered, dropped, forwarded, or aborted). - * The steps are ordered by the processing sequence within the simulated - * network state machine. It is critical to preserve the order of the steps - * and avoid reordering or sorting them. - * - * Generated from protobuf field repeated .google.cloud.networkmanagement.v1.Step steps = 2; - * @param array<\Google\Cloud\NetworkManagement\V1\Step>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSteps($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkManagement\V1\Step::class); - $this->steps = $arr; - - return $this; - } - - /** - * ID of trace. For forward traces, this ID is unique for each trace. For - * return traces, it matches ID of associated forward trace. A single forward - * trace can be associated with none, one or more than one return trace. - * - * Generated from protobuf field int32 forward_trace_id = 4; - * @return int - */ - public function getForwardTraceId() - { - return $this->forward_trace_id; - } - - /** - * ID of trace. For forward traces, this ID is unique for each trace. For - * return traces, it matches ID of associated forward trace. A single forward - * trace can be associated with none, one or more than one return trace. - * - * Generated from protobuf field int32 forward_trace_id = 4; - * @param int $var - * @return $this - */ - public function setForwardTraceId($var) - { - GPBUtil::checkInt32($var); - $this->forward_trace_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/UpdateConnectivityTestRequest.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/UpdateConnectivityTestRequest.php deleted file mode 100644 index 095a3a882e67..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/UpdateConnectivityTestRequest.php +++ /dev/null @@ -1,141 +0,0 @@ -google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest - */ -class UpdateConnectivityTestRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Mask of fields to update. At least one path must be supplied in - * this field. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * Required. Only fields specified in update_mask are updated. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.ConnectivityTest resource = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $resource = null; - - /** - * @param \Google\Protobuf\FieldMask $updateMask Required. Mask of fields to update. At least one path must be supplied in - * this field. - * @param \Google\Cloud\NetworkManagement\V1\ConnectivityTest $resource Required. Only fields specified in update_mask are updated. - * - * @return \Google\Cloud\NetworkManagement\V1\UpdateConnectivityTestRequest - * - * @experimental - */ - public static function build(\Google\Protobuf\FieldMask $updateMask, \Google\Cloud\NetworkManagement\V1\ConnectivityTest $resource): self - { - return (new self()) - ->setUpdateMask($updateMask) - ->setResource($resource); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Mask of fields to update. At least one path must be supplied in - * this field. - * @type \Google\Cloud\NetworkManagement\V1\ConnectivityTest $resource - * Required. Only fields specified in update_mask are updated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkmanagement\V1\Reachability::initOnce(); - parent::__construct($data); - } - - /** - * Required. Mask of fields to update. At least one path must be supplied in - * this field. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Required. Mask of fields to update. At least one path must be supplied in - * this field. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * Required. Only fields specified in update_mask are updated. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.ConnectivityTest resource = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\NetworkManagement\V1\ConnectivityTest|null - */ - public function getResource() - { - return $this->resource; - } - - public function hasResource() - { - return isset($this->resource); - } - - public function clearResource() - { - unset($this->resource); - } - - /** - * Required. Only fields specified in update_mask are updated. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.ConnectivityTest resource = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\NetworkManagement\V1\ConnectivityTest $var - * @return $this - */ - public function setResource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\ConnectivityTest::class); - $this->resource = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/VpcConnectorInfo.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/VpcConnectorInfo.php deleted file mode 100644 index c96a59d85686..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/VpcConnectorInfo.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.networkmanagement.v1.VpcConnectorInfo - */ -class VpcConnectorInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Name of a VPC connector. - * - * Generated from protobuf field string display_name = 1; - */ - protected $display_name = ''; - /** - * URI of a VPC connector. - * - * Generated from protobuf field string uri = 2; - */ - protected $uri = ''; - /** - * Location in which the VPC connector is deployed. - * - * Generated from protobuf field string location = 3; - */ - protected $location = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $display_name - * Name of a VPC connector. - * @type string $uri - * URI of a VPC connector. - * @type string $location - * Location in which the VPC connector is deployed. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkmanagement\V1\Trace::initOnce(); - parent::__construct($data); - } - - /** - * Name of a VPC connector. - * - * Generated from protobuf field string display_name = 1; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Name of a VPC connector. - * - * Generated from protobuf field string display_name = 1; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * URI of a VPC connector. - * - * Generated from protobuf field string uri = 2; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * URI of a VPC connector. - * - * Generated from protobuf field string uri = 2; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - - /** - * Location in which the VPC connector is deployed. - * - * Generated from protobuf field string location = 3; - * @return string - */ - public function getLocation() - { - return $this->location; - } - - /** - * Location in which the VPC connector is deployed. - * - * Generated from protobuf field string location = 3; - * @param string $var - * @return $this - */ - public function setLocation($var) - { - GPBUtil::checkString($var, True); - $this->location = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/VpnGatewayInfo.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/VpnGatewayInfo.php deleted file mode 100644 index 61f964197e52..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/VpnGatewayInfo.php +++ /dev/null @@ -1,245 +0,0 @@ -google.cloud.networkmanagement.v1.VpnGatewayInfo - */ -class VpnGatewayInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Name of a VPN gateway. - * - * Generated from protobuf field string display_name = 1; - */ - protected $display_name = ''; - /** - * URI of a VPN gateway. - * - * Generated from protobuf field string uri = 2; - */ - protected $uri = ''; - /** - * URI of a Compute Engine network where the VPN gateway is configured. - * - * Generated from protobuf field string network_uri = 3; - */ - protected $network_uri = ''; - /** - * IP address of the VPN gateway. - * - * Generated from protobuf field string ip_address = 4; - */ - protected $ip_address = ''; - /** - * A VPN tunnel that is associated with this VPN gateway. - * There may be multiple VPN tunnels configured on a VPN gateway, and only - * the one relevant to the test is displayed. - * - * Generated from protobuf field string vpn_tunnel_uri = 5; - */ - protected $vpn_tunnel_uri = ''; - /** - * Name of a Google Cloud region where this VPN gateway is configured. - * - * Generated from protobuf field string region = 6; - */ - protected $region = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $display_name - * Name of a VPN gateway. - * @type string $uri - * URI of a VPN gateway. - * @type string $network_uri - * URI of a Compute Engine network where the VPN gateway is configured. - * @type string $ip_address - * IP address of the VPN gateway. - * @type string $vpn_tunnel_uri - * A VPN tunnel that is associated with this VPN gateway. - * There may be multiple VPN tunnels configured on a VPN gateway, and only - * the one relevant to the test is displayed. - * @type string $region - * Name of a Google Cloud region where this VPN gateway is configured. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkmanagement\V1\Trace::initOnce(); - parent::__construct($data); - } - - /** - * Name of a VPN gateway. - * - * Generated from protobuf field string display_name = 1; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Name of a VPN gateway. - * - * Generated from protobuf field string display_name = 1; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * URI of a VPN gateway. - * - * Generated from protobuf field string uri = 2; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * URI of a VPN gateway. - * - * Generated from protobuf field string uri = 2; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - - /** - * URI of a Compute Engine network where the VPN gateway is configured. - * - * Generated from protobuf field string network_uri = 3; - * @return string - */ - public function getNetworkUri() - { - return $this->network_uri; - } - - /** - * URI of a Compute Engine network where the VPN gateway is configured. - * - * Generated from protobuf field string network_uri = 3; - * @param string $var - * @return $this - */ - public function setNetworkUri($var) - { - GPBUtil::checkString($var, True); - $this->network_uri = $var; - - return $this; - } - - /** - * IP address of the VPN gateway. - * - * Generated from protobuf field string ip_address = 4; - * @return string - */ - public function getIpAddress() - { - return $this->ip_address; - } - - /** - * IP address of the VPN gateway. - * - * Generated from protobuf field string ip_address = 4; - * @param string $var - * @return $this - */ - public function setIpAddress($var) - { - GPBUtil::checkString($var, True); - $this->ip_address = $var; - - return $this; - } - - /** - * A VPN tunnel that is associated with this VPN gateway. - * There may be multiple VPN tunnels configured on a VPN gateway, and only - * the one relevant to the test is displayed. - * - * Generated from protobuf field string vpn_tunnel_uri = 5; - * @return string - */ - public function getVpnTunnelUri() - { - return $this->vpn_tunnel_uri; - } - - /** - * A VPN tunnel that is associated with this VPN gateway. - * There may be multiple VPN tunnels configured on a VPN gateway, and only - * the one relevant to the test is displayed. - * - * Generated from protobuf field string vpn_tunnel_uri = 5; - * @param string $var - * @return $this - */ - public function setVpnTunnelUri($var) - { - GPBUtil::checkString($var, True); - $this->vpn_tunnel_uri = $var; - - return $this; - } - - /** - * Name of a Google Cloud region where this VPN gateway is configured. - * - * Generated from protobuf field string region = 6; - * @return string - */ - public function getRegion() - { - return $this->region; - } - - /** - * Name of a Google Cloud region where this VPN gateway is configured. - * - * Generated from protobuf field string region = 6; - * @param string $var - * @return $this - */ - public function setRegion($var) - { - GPBUtil::checkString($var, True); - $this->region = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/VpnTunnelInfo.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/VpnTunnelInfo.php deleted file mode 100644 index 8785392491d0..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/VpnTunnelInfo.php +++ /dev/null @@ -1,339 +0,0 @@ -google.cloud.networkmanagement.v1.VpnTunnelInfo - */ -class VpnTunnelInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Name of a VPN tunnel. - * - * Generated from protobuf field string display_name = 1; - */ - protected $display_name = ''; - /** - * URI of a VPN tunnel. - * - * Generated from protobuf field string uri = 2; - */ - protected $uri = ''; - /** - * URI of the VPN gateway at local end of the tunnel. - * - * Generated from protobuf field string source_gateway = 3; - */ - protected $source_gateway = ''; - /** - * URI of a VPN gateway at remote end of the tunnel. - * - * Generated from protobuf field string remote_gateway = 4; - */ - protected $remote_gateway = ''; - /** - * Remote VPN gateway's IP address. - * - * Generated from protobuf field string remote_gateway_ip = 5; - */ - protected $remote_gateway_ip = ''; - /** - * Local VPN gateway's IP address. - * - * Generated from protobuf field string source_gateway_ip = 6; - */ - protected $source_gateway_ip = ''; - /** - * URI of a Compute Engine network where the VPN tunnel is configured. - * - * Generated from protobuf field string network_uri = 7; - */ - protected $network_uri = ''; - /** - * Name of a Google Cloud region where this VPN tunnel is configured. - * - * Generated from protobuf field string region = 8; - */ - protected $region = ''; - /** - * Type of the routing policy. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType routing_type = 9; - */ - protected $routing_type = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $display_name - * Name of a VPN tunnel. - * @type string $uri - * URI of a VPN tunnel. - * @type string $source_gateway - * URI of the VPN gateway at local end of the tunnel. - * @type string $remote_gateway - * URI of a VPN gateway at remote end of the tunnel. - * @type string $remote_gateway_ip - * Remote VPN gateway's IP address. - * @type string $source_gateway_ip - * Local VPN gateway's IP address. - * @type string $network_uri - * URI of a Compute Engine network where the VPN tunnel is configured. - * @type string $region - * Name of a Google Cloud region where this VPN tunnel is configured. - * @type int $routing_type - * Type of the routing policy. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkmanagement\V1\Trace::initOnce(); - parent::__construct($data); - } - - /** - * Name of a VPN tunnel. - * - * Generated from protobuf field string display_name = 1; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Name of a VPN tunnel. - * - * Generated from protobuf field string display_name = 1; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * URI of a VPN tunnel. - * - * Generated from protobuf field string uri = 2; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * URI of a VPN tunnel. - * - * Generated from protobuf field string uri = 2; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - - /** - * URI of the VPN gateway at local end of the tunnel. - * - * Generated from protobuf field string source_gateway = 3; - * @return string - */ - public function getSourceGateway() - { - return $this->source_gateway; - } - - /** - * URI of the VPN gateway at local end of the tunnel. - * - * Generated from protobuf field string source_gateway = 3; - * @param string $var - * @return $this - */ - public function setSourceGateway($var) - { - GPBUtil::checkString($var, True); - $this->source_gateway = $var; - - return $this; - } - - /** - * URI of a VPN gateway at remote end of the tunnel. - * - * Generated from protobuf field string remote_gateway = 4; - * @return string - */ - public function getRemoteGateway() - { - return $this->remote_gateway; - } - - /** - * URI of a VPN gateway at remote end of the tunnel. - * - * Generated from protobuf field string remote_gateway = 4; - * @param string $var - * @return $this - */ - public function setRemoteGateway($var) - { - GPBUtil::checkString($var, True); - $this->remote_gateway = $var; - - return $this; - } - - /** - * Remote VPN gateway's IP address. - * - * Generated from protobuf field string remote_gateway_ip = 5; - * @return string - */ - public function getRemoteGatewayIp() - { - return $this->remote_gateway_ip; - } - - /** - * Remote VPN gateway's IP address. - * - * Generated from protobuf field string remote_gateway_ip = 5; - * @param string $var - * @return $this - */ - public function setRemoteGatewayIp($var) - { - GPBUtil::checkString($var, True); - $this->remote_gateway_ip = $var; - - return $this; - } - - /** - * Local VPN gateway's IP address. - * - * Generated from protobuf field string source_gateway_ip = 6; - * @return string - */ - public function getSourceGatewayIp() - { - return $this->source_gateway_ip; - } - - /** - * Local VPN gateway's IP address. - * - * Generated from protobuf field string source_gateway_ip = 6; - * @param string $var - * @return $this - */ - public function setSourceGatewayIp($var) - { - GPBUtil::checkString($var, True); - $this->source_gateway_ip = $var; - - return $this; - } - - /** - * URI of a Compute Engine network where the VPN tunnel is configured. - * - * Generated from protobuf field string network_uri = 7; - * @return string - */ - public function getNetworkUri() - { - return $this->network_uri; - } - - /** - * URI of a Compute Engine network where the VPN tunnel is configured. - * - * Generated from protobuf field string network_uri = 7; - * @param string $var - * @return $this - */ - public function setNetworkUri($var) - { - GPBUtil::checkString($var, True); - $this->network_uri = $var; - - return $this; - } - - /** - * Name of a Google Cloud region where this VPN tunnel is configured. - * - * Generated from protobuf field string region = 8; - * @return string - */ - public function getRegion() - { - return $this->region; - } - - /** - * Name of a Google Cloud region where this VPN tunnel is configured. - * - * Generated from protobuf field string region = 8; - * @param string $var - * @return $this - */ - public function setRegion($var) - { - GPBUtil::checkString($var, True); - $this->region = $var; - - return $this; - } - - /** - * Type of the routing policy. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType routing_type = 9; - * @return int - */ - public function getRoutingType() - { - return $this->routing_type; - } - - /** - * Type of the routing policy. - * - * Generated from protobuf field .google.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType routing_type = 9; - * @param int $var - * @return $this - */ - public function setRoutingType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\NetworkManagement\V1\VpnTunnelInfo\RoutingType::class); - $this->routing_type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/VpnTunnelInfo/RoutingType.php b/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/VpnTunnelInfo/RoutingType.php deleted file mode 100644 index 2550fd4408aa..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/proto/src/Google/Cloud/NetworkManagement/V1/VpnTunnelInfo/RoutingType.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType - */ -class RoutingType -{ - /** - * Unspecified type. Default value. - * - * Generated from protobuf enum ROUTING_TYPE_UNSPECIFIED = 0; - */ - const ROUTING_TYPE_UNSPECIFIED = 0; - /** - * Route based VPN. - * - * Generated from protobuf enum ROUTE_BASED = 1; - */ - const ROUTE_BASED = 1; - /** - * Policy based routing. - * - * Generated from protobuf enum POLICY_BASED = 2; - */ - const POLICY_BASED = 2; - /** - * Dynamic (BGP) routing. - * - * Generated from protobuf enum DYNAMIC = 3; - */ - const DYNAMIC = 3; - - private static $valueToName = [ - self::ROUTING_TYPE_UNSPECIFIED => 'ROUTING_TYPE_UNSPECIFIED', - self::ROUTE_BASED => 'ROUTE_BASED', - self::POLICY_BASED => 'POLICY_BASED', - self::DYNAMIC => 'DYNAMIC', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(RoutingType::class, \Google\Cloud\NetworkManagement\V1\VpnTunnelInfo_RoutingType::class); - diff --git a/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/create_connectivity_test.php b/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/create_connectivity_test.php deleted file mode 100644 index 83ef844fa379..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/create_connectivity_test.php +++ /dev/null @@ -1,113 +0,0 @@ -AMBIGUOUS. For more information, - * see the Connectivity Test documentation. - * - * @param string $formattedParent The parent resource of the Connectivity Test to create: - * `projects/{project_id}/locations/global` - * Please see {@see ReachabilityServiceClient::projectName()} for help formatting this field. - * @param string $testId The logical name of the Connectivity Test in your project - * with the following restrictions: - * - * * Must contain only lowercase letters, numbers, and hyphens. - * * Must start with a letter. - * * Must be between 1-40 characters. - * * Must end with a number or a letter. - * * Must be unique within the customer project - */ -function create_connectivity_test_sample(string $formattedParent, string $testId): void -{ - // Create a client. - $reachabilityServiceClient = new ReachabilityServiceClient(); - - // Prepare the request message. - $resourceSource = new Endpoint(); - $resourceDestination = new Endpoint(); - $resource = (new ConnectivityTest()) - ->setSource($resourceSource) - ->setDestination($resourceDestination); - $request = (new CreateConnectivityTestRequest()) - ->setParent($formattedParent) - ->setTestId($testId) - ->setResource($resource); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $reachabilityServiceClient->createConnectivityTest($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var ConnectivityTest $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = ReachabilityServiceClient::projectName('[PROJECT]'); - $testId = '[TEST_ID]'; - - create_connectivity_test_sample($formattedParent, $testId); -} -// [END networkmanagement_v1_generated_ReachabilityService_CreateConnectivityTest_sync] diff --git a/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/delete_connectivity_test.php b/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/delete_connectivity_test.php deleted file mode 100644 index 1ffa29724401..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/delete_connectivity_test.php +++ /dev/null @@ -1,81 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $reachabilityServiceClient->deleteConnectivityTest($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = ReachabilityServiceClient::connectivityTestName('[PROJECT]', '[TEST]'); - - delete_connectivity_test_sample($formattedName); -} -// [END networkmanagement_v1_generated_ReachabilityService_DeleteConnectivityTest_sync] diff --git a/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/get_connectivity_test.php b/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/get_connectivity_test.php deleted file mode 100644 index 1999744026dc..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/get_connectivity_test.php +++ /dev/null @@ -1,72 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var ConnectivityTest $response */ - $response = $reachabilityServiceClient->getConnectivityTest($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = ReachabilityServiceClient::connectivityTestName('[PROJECT]', '[TEST]'); - - get_connectivity_test_sample($formattedName); -} -// [END networkmanagement_v1_generated_ReachabilityService_GetConnectivityTest_sync] diff --git a/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/get_iam_policy.php b/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/get_iam_policy.php deleted file mode 100644 index e4226170ac96..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/get_iam_policy.php +++ /dev/null @@ -1,72 +0,0 @@ -setResource($resource); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $reachabilityServiceClient->getIamPolicy($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - - get_iam_policy_sample($resource); -} -// [END networkmanagement_v1_generated_ReachabilityService_GetIamPolicy_sync] diff --git a/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/get_location.php b/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/get_location.php deleted file mode 100644 index e594c2cfd061..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/get_location.php +++ /dev/null @@ -1,57 +0,0 @@ -getLocation($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END networkmanagement_v1_generated_ReachabilityService_GetLocation_sync] diff --git a/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/list_connectivity_tests.php b/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/list_connectivity_tests.php deleted file mode 100644 index 8ee577e167dd..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/list_connectivity_tests.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $reachabilityServiceClient->listConnectivityTests($request); - - /** @var ConnectivityTest $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = ReachabilityServiceClient::projectName('[PROJECT]'); - - list_connectivity_tests_sample($formattedParent); -} -// [END networkmanagement_v1_generated_ReachabilityService_ListConnectivityTests_sync] diff --git a/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/list_locations.php b/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/list_locations.php deleted file mode 100644 index e91b67957674..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/list_locations.php +++ /dev/null @@ -1,62 +0,0 @@ -listLocations($request); - - /** @var Location $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END networkmanagement_v1_generated_ReachabilityService_ListLocations_sync] diff --git a/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/rerun_connectivity_test.php b/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/rerun_connectivity_test.php deleted file mode 100644 index 1376f628e3f9..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/rerun_connectivity_test.php +++ /dev/null @@ -1,95 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $reachabilityServiceClient->rerunConnectivityTest($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var ConnectivityTest $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = ReachabilityServiceClient::connectivityTestName('[PROJECT]', '[TEST]'); - - rerun_connectivity_test_sample($formattedName); -} -// [END networkmanagement_v1_generated_ReachabilityService_RerunConnectivityTest_sync] diff --git a/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/set_iam_policy.php b/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/set_iam_policy.php deleted file mode 100644 index 8a0d67908524..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/set_iam_policy.php +++ /dev/null @@ -1,77 +0,0 @@ -setResource($resource) - ->setPolicy($policy); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $reachabilityServiceClient->setIamPolicy($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - - set_iam_policy_sample($resource); -} -// [END networkmanagement_v1_generated_ReachabilityService_SetIamPolicy_sync] diff --git a/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/test_iam_permissions.php b/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/test_iam_permissions.php deleted file mode 100644 index 000a79d492e0..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/test_iam_permissions.php +++ /dev/null @@ -1,84 +0,0 @@ -setResource($resource) - ->setPermissions($permissions); - - // Call the API and handle any network failures. - try { - /** @var TestIamPermissionsResponse $response */ - $response = $reachabilityServiceClient->testIamPermissions($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - $permissionsElement = '[PERMISSIONS]'; - - test_iam_permissions_sample($resource, $permissionsElement); -} -// [END networkmanagement_v1_generated_ReachabilityService_TestIamPermissions_sync] diff --git a/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/update_connectivity_test.php b/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/update_connectivity_test.php deleted file mode 100644 index a14b7457b4ba..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/samples/V1/ReachabilityServiceClient/update_connectivity_test.php +++ /dev/null @@ -1,92 +0,0 @@ -UNKNOWN. - * - * If the endpoint specifications in `ConnectivityTest` are incomplete, the - * reachability result returns a value of `AMBIGUOUS`. See the documentation - * in `ConnectivityTest` for more details. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function update_connectivity_test_sample(): void -{ - // Create a client. - $reachabilityServiceClient = new ReachabilityServiceClient(); - - // Prepare the request message. - $updateMask = new FieldMask(); - $resourceSource = new Endpoint(); - $resourceDestination = new Endpoint(); - $resource = (new ConnectivityTest()) - ->setSource($resourceSource) - ->setDestination($resourceDestination); - $request = (new UpdateConnectivityTestRequest()) - ->setUpdateMask($updateMask) - ->setResource($resource); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $reachabilityServiceClient->updateConnectivityTest($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var ConnectivityTest $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END networkmanagement_v1_generated_ReachabilityService_UpdateConnectivityTest_sync] diff --git a/owl-bot-staging/NetworkManagement/v1/src/V1/Client/ReachabilityServiceClient.php b/owl-bot-staging/NetworkManagement/v1/src/V1/Client/ReachabilityServiceClient.php deleted file mode 100644 index 5e746d2b25f9..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/src/V1/Client/ReachabilityServiceClient.php +++ /dev/null @@ -1,656 +0,0 @@ - createConnectivityTestAsync(CreateConnectivityTestRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteConnectivityTestAsync(DeleteConnectivityTestRequest $request, array $optionalArgs = []) - * @method PromiseInterface getConnectivityTestAsync(GetConnectivityTestRequest $request, array $optionalArgs = []) - * @method PromiseInterface listConnectivityTestsAsync(ListConnectivityTestsRequest $request, array $optionalArgs = []) - * @method PromiseInterface rerunConnectivityTestAsync(RerunConnectivityTestRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateConnectivityTestAsync(UpdateConnectivityTestRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) - * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) - */ -final class ReachabilityServiceClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.networkmanagement.v1.ReachabilityService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'networkmanagement.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'networkmanagement.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/reachability_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/reachability_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/reachability_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/reachability_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Create the default operation client for the service. - * - * @param array $options ClientOptions for the client. - * - * @return OperationsClient - */ - private function createOperationsClient(array $options) - { - // Unset client-specific configuration options - unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); - - if (isset($options['operationsClient'])) { - return $options['operationsClient']; - } - - return new OperationsClient($options); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * connectivity_test resource. - * - * @param string $project - * @param string $test - * - * @return string The formatted connectivity_test resource. - */ - public static function connectivityTestName(string $project, string $test): string - { - return self::getPathTemplate('connectivityTest')->render([ - 'project' => $project, - 'test' => $test, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a project - * resource. - * - * @param string $project - * - * @return string The formatted project resource. - */ - public static function projectName(string $project): string - { - return self::getPathTemplate('project')->render([ - 'project' => $project, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - connectivityTest: projects/{project}/locations/global/connectivityTests/{test} - * - project: projects/{project} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param ?string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, ?string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'networkmanagement.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Creates a new Connectivity Test. - * After you create a test, the reachability analysis is performed as part - * of the long running operation, which completes when the analysis completes. - * - * If the endpoint specifications in `ConnectivityTest` are invalid - * (for example, containing non-existent resources in the network, or you - * don't have read permissions to the network configurations of listed - * projects), then the reachability result returns a value of `UNKNOWN`. - * - * If the endpoint specifications in `ConnectivityTest` are - * incomplete, the reachability result returns a value of - * AMBIGUOUS. For more information, - * see the Connectivity Test documentation. - * - * The async variant is - * {@see ReachabilityServiceClient::createConnectivityTestAsync()} . - * - * @example samples/V1/ReachabilityServiceClient/create_connectivity_test.php - * - * @param CreateConnectivityTestRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createConnectivityTest(CreateConnectivityTestRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateConnectivityTest', $request, $callOptions)->wait(); - } - - /** - * Deletes a specific `ConnectivityTest`. - * - * The async variant is - * {@see ReachabilityServiceClient::deleteConnectivityTestAsync()} . - * - * @example samples/V1/ReachabilityServiceClient/delete_connectivity_test.php - * - * @param DeleteConnectivityTestRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteConnectivityTest(DeleteConnectivityTestRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteConnectivityTest', $request, $callOptions)->wait(); - } - - /** - * Gets the details of a specific Connectivity Test. - * - * The async variant is - * {@see ReachabilityServiceClient::getConnectivityTestAsync()} . - * - * @example samples/V1/ReachabilityServiceClient/get_connectivity_test.php - * - * @param GetConnectivityTestRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return ConnectivityTest - * - * @throws ApiException Thrown if the API call fails. - */ - public function getConnectivityTest(GetConnectivityTestRequest $request, array $callOptions = []): ConnectivityTest - { - return $this->startApiCall('GetConnectivityTest', $request, $callOptions)->wait(); - } - - /** - * Lists all Connectivity Tests owned by a project. - * - * The async variant is - * {@see ReachabilityServiceClient::listConnectivityTestsAsync()} . - * - * @example samples/V1/ReachabilityServiceClient/list_connectivity_tests.php - * - * @param ListConnectivityTestsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listConnectivityTests(ListConnectivityTestsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListConnectivityTests', $request, $callOptions); - } - - /** - * Rerun an existing `ConnectivityTest`. - * After the user triggers the rerun, the reachability analysis is performed - * as part of the long running operation, which completes when the analysis - * completes. - * - * Even though the test configuration remains the same, the reachability - * result may change due to underlying network configuration changes. - * - * If the endpoint specifications in `ConnectivityTest` become invalid (for - * example, specified resources are deleted in the network, or you lost - * read permissions to the network configurations of listed projects), then - * the reachability result returns a value of `UNKNOWN`. - * - * The async variant is - * {@see ReachabilityServiceClient::rerunConnectivityTestAsync()} . - * - * @example samples/V1/ReachabilityServiceClient/rerun_connectivity_test.php - * - * @param RerunConnectivityTestRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function rerunConnectivityTest(RerunConnectivityTestRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('RerunConnectivityTest', $request, $callOptions)->wait(); - } - - /** - * Updates the configuration of an existing `ConnectivityTest`. - * After you update a test, the reachability analysis is performed as part - * of the long running operation, which completes when the analysis completes. - * The Reachability state in the test resource is updated with the new result. - * - * If the endpoint specifications in `ConnectivityTest` are invalid - * (for example, they contain non-existent resources in the network, or the - * user does not have read permissions to the network configurations of - * listed projects), then the reachability result returns a value of - * UNKNOWN. - * - * If the endpoint specifications in `ConnectivityTest` are incomplete, the - * reachability result returns a value of `AMBIGUOUS`. See the documentation - * in `ConnectivityTest` for more details. - * - * The async variant is - * {@see ReachabilityServiceClient::updateConnectivityTestAsync()} . - * - * @example samples/V1/ReachabilityServiceClient/update_connectivity_test.php - * - * @param UpdateConnectivityTestRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateConnectivityTest(UpdateConnectivityTestRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateConnectivityTest', $request, $callOptions)->wait(); - } - - /** - * Gets information about a location. - * - * The async variant is {@see ReachabilityServiceClient::getLocationAsync()} . - * - * @example samples/V1/ReachabilityServiceClient/get_location.php - * - * @param GetLocationRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Location - * - * @throws ApiException Thrown if the API call fails. - */ - public function getLocation(GetLocationRequest $request, array $callOptions = []): Location - { - return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * The async variant is {@see ReachabilityServiceClient::listLocationsAsync()} . - * - * @example samples/V1/ReachabilityServiceClient/list_locations.php - * - * @param ListLocationsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListLocations', $request, $callOptions); - } - - /** - * Gets the access control policy for a resource. Returns an empty policy - if the resource exists and does not have a policy set. - * - * The async variant is {@see ReachabilityServiceClient::getIamPolicyAsync()} . - * - * @example samples/V1/ReachabilityServiceClient/get_iam_policy.php - * - * @param GetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * Sets the access control policy on the specified resource. Replaces - any existing policy. - - Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` - errors. - * - * The async variant is {@see ReachabilityServiceClient::setIamPolicyAsync()} . - * - * @example samples/V1/ReachabilityServiceClient/set_iam_policy.php - * - * @param SetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * Returns permissions that a caller has on the specified resource. If the - resource does not exist, this will return an empty set of - permissions, not a `NOT_FOUND` error. - - Note: This operation is designed to be used for building - permission-aware UIs and command-line tools, not for authorization - checking. This operation may "fail open" without warning. - * - * The async variant is {@see ReachabilityServiceClient::testIamPermissionsAsync()} - * . - * - * @example samples/V1/ReachabilityServiceClient/test_iam_permissions.php - * - * @param TestIamPermissionsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return TestIamPermissionsResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse - { - return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/NetworkManagement/v1/src/V1/gapic_metadata.json b/owl-bot-staging/NetworkManagement/v1/src/V1/gapic_metadata.json deleted file mode 100644 index 9ff198a5359c..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/src/V1/gapic_metadata.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.networkmanagement.v1", - "libraryPackage": "Google\\Cloud\\NetworkManagement\\V1", - "services": { - "ReachabilityService": { - "clients": { - "grpc": { - "libraryClient": "ReachabilityServiceGapicClient", - "rpcs": { - "CreateConnectivityTest": { - "methods": [ - "createConnectivityTest" - ] - }, - "DeleteConnectivityTest": { - "methods": [ - "deleteConnectivityTest" - ] - }, - "GetConnectivityTest": { - "methods": [ - "getConnectivityTest" - ] - }, - "ListConnectivityTests": { - "methods": [ - "listConnectivityTests" - ] - }, - "RerunConnectivityTest": { - "methods": [ - "rerunConnectivityTest" - ] - }, - "UpdateConnectivityTest": { - "methods": [ - "updateConnectivityTest" - ] - }, - "GetLocation": { - "methods": [ - "getLocation" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - }, - "GetIamPolicy": { - "methods": [ - "getIamPolicy" - ] - }, - "SetIamPolicy": { - "methods": [ - "setIamPolicy" - ] - }, - "TestIamPermissions": { - "methods": [ - "testIamPermissions" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/NetworkManagement/v1/src/V1/resources/reachability_service_client_config.json b/owl-bot-staging/NetworkManagement/v1/src/V1/resources/reachability_service_client_config.json deleted file mode 100644 index a3be86836334..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/src/V1/resources/reachability_service_client_config.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "interfaces": { - "google.cloud.networkmanagement.v1.ReachabilityService": { - "retry_codes": { - "no_retry_codes": [], - "no_retry_1_codes": [] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "no_retry_1_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": { - "CreateConnectivityTest": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteConnectivityTest": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetConnectivityTest": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListConnectivityTests": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "RerunConnectivityTest": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateConnectivityTest": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetLocation": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListLocations": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "SetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "TestIamPermissions": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/NetworkManagement/v1/src/V1/resources/reachability_service_descriptor_config.php b/owl-bot-staging/NetworkManagement/v1/src/V1/resources/reachability_service_descriptor_config.php deleted file mode 100644 index 5e5df79c8de4..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/src/V1/resources/reachability_service_descriptor_config.php +++ /dev/null @@ -1,214 +0,0 @@ - [ - 'google.cloud.networkmanagement.v1.ReachabilityService' => [ - 'CreateConnectivityTest' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\NetworkManagement\V1\ConnectivityTest', - 'metadataReturnType' => '\Google\Cloud\NetworkManagement\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteConnectivityTest' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\NetworkManagement\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'RerunConnectivityTest' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\NetworkManagement\V1\ConnectivityTest', - 'metadataReturnType' => '\Google\Cloud\NetworkManagement\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateConnectivityTest' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\NetworkManagement\V1\ConnectivityTest', - 'metadataReturnType' => '\Google\Cloud\NetworkManagement\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'resource.name', - 'fieldAccessors' => [ - 'getResource', - 'getName', - ], - ], - ], - ], - 'GetConnectivityTest' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\NetworkManagement\V1\ConnectivityTest', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListConnectivityTests' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getResources', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\NetworkManagement\V1\ListConnectivityTestsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'GetLocation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Location\Location', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'ListLocations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLocations', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'GetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'SetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'TestIamPermissions' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'templateMap' => [ - 'connectivityTest' => 'projects/{project}/locations/global/connectivityTests/{test}', - 'project' => 'projects/{project}', - ], - ], - ], -]; diff --git a/owl-bot-staging/NetworkManagement/v1/src/V1/resources/reachability_service_rest_client_config.php b/owl-bot-staging/NetworkManagement/v1/src/V1/resources/reachability_service_rest_client_config.php deleted file mode 100644 index 0d396f9a9e19..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/src/V1/resources/reachability_service_rest_client_config.php +++ /dev/null @@ -1,213 +0,0 @@ - [ - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.cloud.networkmanagement.v1.ReachabilityService' => [ - 'CreateConnectivityTest' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/global}/connectivityTests', - 'body' => 'resource', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'test_id', - ], - ], - 'DeleteConnectivityTest' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/global/connectivityTests/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetConnectivityTest' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/global/connectivityTests/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListConnectivityTests' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/global}/connectivityTests', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'RerunConnectivityTest' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/global/connectivityTests/*}:rerun', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'UpdateConnectivityTest' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{resource.name=projects/*/locations/global/connectivityTests/*}', - 'body' => 'resource', - 'placeholders' => [ - 'resource.name' => [ - 'getters' => [ - 'getResource', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - ], - 'google.iam.v1.IAMPolicy' => [ - 'GetIamPolicy' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/global/connectivityTests/*}:getIamPolicy', - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/global/connectivityTests/*}:setIamPolicy', - 'body' => '*', - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/global/connectivityTests/*}:testIamPermissions', - 'body' => '*', - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/global/operations/*}:cancel', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/global/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/global/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/global}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/NetworkManagement/v1/tests/Unit/V1/Client/ReachabilityServiceClientTest.php b/owl-bot-staging/NetworkManagement/v1/tests/Unit/V1/Client/ReachabilityServiceClientTest.php deleted file mode 100644 index d7b501615df8..000000000000 --- a/owl-bot-staging/NetworkManagement/v1/tests/Unit/V1/Client/ReachabilityServiceClientTest.php +++ /dev/null @@ -1,1202 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return ReachabilityServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new ReachabilityServiceClient($options); - } - - /** @test */ - public function createConnectivityTestTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createConnectivityTestTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $protocol = 'protocol-989163880'; - $displayName = 'displayName1615086568'; - $roundTrip = true; - $bypassFirewallChecks = false; - $expectedResponse = new ConnectivityTest(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setProtocol($protocol); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setRoundTrip($roundTrip); - $expectedResponse->setBypassFirewallChecks($bypassFirewallChecks); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createConnectivityTestTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $testId = 'testId-1422455832'; - $resource = new ConnectivityTest(); - $resourceSource = new Endpoint(); - $resource->setSource($resourceSource); - $resourceDestination = new Endpoint(); - $resource->setDestination($resourceDestination); - $request = (new CreateConnectivityTestRequest()) - ->setParent($formattedParent) - ->setTestId($testId) - ->setResource($resource); - $response = $gapicClient->createConnectivityTest($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkmanagement.v1.ReachabilityService/CreateConnectivityTest', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getTestId(); - $this->assertProtobufEquals($testId, $actualValue); - $actualValue = $actualApiRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createConnectivityTestTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createConnectivityTestExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createConnectivityTestTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $testId = 'testId-1422455832'; - $resource = new ConnectivityTest(); - $resourceSource = new Endpoint(); - $resource->setSource($resourceSource); - $resourceDestination = new Endpoint(); - $resource->setDestination($resourceDestination); - $request = (new CreateConnectivityTestRequest()) - ->setParent($formattedParent) - ->setTestId($testId) - ->setResource($resource); - $response = $gapicClient->createConnectivityTest($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createConnectivityTestTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteConnectivityTestTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteConnectivityTestTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteConnectivityTestTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->connectivityTestName('[PROJECT]', '[TEST]'); - $request = (new DeleteConnectivityTestRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteConnectivityTest($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkmanagement.v1.ReachabilityService/DeleteConnectivityTest', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteConnectivityTestTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteConnectivityTestExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteConnectivityTestTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->connectivityTestName('[PROJECT]', '[TEST]'); - $request = (new DeleteConnectivityTestRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteConnectivityTest($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteConnectivityTestTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getConnectivityTestTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $protocol = 'protocol-989163880'; - $displayName = 'displayName1615086568'; - $roundTrip = true; - $bypassFirewallChecks = false; - $expectedResponse = new ConnectivityTest(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setProtocol($protocol); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setRoundTrip($roundTrip); - $expectedResponse->setBypassFirewallChecks($bypassFirewallChecks); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->connectivityTestName('[PROJECT]', '[TEST]'); - $request = (new GetConnectivityTestRequest()) - ->setName($formattedName); - $response = $gapicClient->getConnectivityTest($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkmanagement.v1.ReachabilityService/GetConnectivityTest', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getConnectivityTestExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->connectivityTestName('[PROJECT]', '[TEST]'); - $request = (new GetConnectivityTestRequest()) - ->setName($formattedName); - try { - $gapicClient->getConnectivityTest($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listConnectivityTestsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $resourcesElement = new ConnectivityTest(); - $resources = [ - $resourcesElement, - ]; - $expectedResponse = new ListConnectivityTestsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setResources($resources); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $request = (new ListConnectivityTestsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listConnectivityTests($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getResources()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkmanagement.v1.ReachabilityService/ListConnectivityTests', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listConnectivityTestsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $request = (new ListConnectivityTestsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listConnectivityTests($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function rerunConnectivityTestTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/rerunConnectivityTestTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $protocol = 'protocol-989163880'; - $displayName = 'displayName1615086568'; - $roundTrip = true; - $bypassFirewallChecks = false; - $expectedResponse = new ConnectivityTest(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setProtocol($protocol); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setRoundTrip($roundTrip); - $expectedResponse->setBypassFirewallChecks($bypassFirewallChecks); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/rerunConnectivityTestTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->connectivityTestName('[PROJECT]', '[TEST]'); - $request = (new RerunConnectivityTestRequest()) - ->setName($formattedName); - $response = $gapicClient->rerunConnectivityTest($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkmanagement.v1.ReachabilityService/RerunConnectivityTest', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/rerunConnectivityTestTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function rerunConnectivityTestExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/rerunConnectivityTestTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->connectivityTestName('[PROJECT]', '[TEST]'); - $request = (new RerunConnectivityTestRequest()) - ->setName($formattedName); - $response = $gapicClient->rerunConnectivityTest($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/rerunConnectivityTestTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateConnectivityTestTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateConnectivityTestTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $protocol = 'protocol-989163880'; - $displayName = 'displayName1615086568'; - $roundTrip = true; - $bypassFirewallChecks = false; - $expectedResponse = new ConnectivityTest(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setProtocol($protocol); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setRoundTrip($roundTrip); - $expectedResponse->setBypassFirewallChecks($bypassFirewallChecks); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateConnectivityTestTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $updateMask = new FieldMask(); - $resource = new ConnectivityTest(); - $resourceSource = new Endpoint(); - $resource->setSource($resourceSource); - $resourceDestination = new Endpoint(); - $resource->setDestination($resourceDestination); - $request = (new UpdateConnectivityTestRequest()) - ->setUpdateMask($updateMask) - ->setResource($resource); - $response = $gapicClient->updateConnectivityTest($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkmanagement.v1.ReachabilityService/UpdateConnectivityTest', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $actualValue = $actualApiRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateConnectivityTestTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateConnectivityTestExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateConnectivityTestTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $updateMask = new FieldMask(); - $resource = new ConnectivityTest(); - $resourceSource = new Endpoint(); - $resource->setSource($resourceSource); - $resourceDestination = new Endpoint(); - $resource->setDestination($resourceDestination); - $request = (new UpdateConnectivityTestRequest()) - ->setUpdateMask($updateMask) - ->setResource($resource); - $response = $gapicClient->updateConnectivityTest($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateConnectivityTestTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getLocationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $locationId = 'locationId552319461'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Location(); - $expectedResponse->setName($name2); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - $request = new GetLocationRequest(); - $response = $gapicClient->getLocation($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new GetLocationRequest(); - try { - $gapicClient->getLocation($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $locationsElement = new Location(); - $locations = [ - $locationsElement, - ]; - $expectedResponse = new ListLocationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLocations($locations); - $transport->addResponse($expectedResponse); - $request = new ListLocationsRequest(); - $response = $gapicClient->listLocations($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new ListLocationsRequest(); - try { - $gapicClient->listLocations($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); - $response = $gapicClient->getIamPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); - try { - $gapicClient->getIamPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); - $response = $gapicClient->setIamPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPolicy(); - $this->assertProtobufEquals($policy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); - try { - $gapicClient->setIamPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new TestIamPermissionsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); - $response = $gapicClient->testIamPermissions($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPermissions(); - $this->assertProtobufEquals($permissions, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); - try { - $gapicClient->testIamPermissions($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createConnectivityTestAsyncTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createConnectivityTestTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $protocol = 'protocol-989163880'; - $displayName = 'displayName1615086568'; - $roundTrip = true; - $bypassFirewallChecks = false; - $expectedResponse = new ConnectivityTest(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setProtocol($protocol); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setRoundTrip($roundTrip); - $expectedResponse->setBypassFirewallChecks($bypassFirewallChecks); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createConnectivityTestTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $testId = 'testId-1422455832'; - $resource = new ConnectivityTest(); - $resourceSource = new Endpoint(); - $resource->setSource($resourceSource); - $resourceDestination = new Endpoint(); - $resource->setDestination($resourceDestination); - $request = (new CreateConnectivityTestRequest()) - ->setParent($formattedParent) - ->setTestId($testId) - ->setResource($resource); - $response = $gapicClient->createConnectivityTestAsync($request)->wait(); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkmanagement.v1.ReachabilityService/CreateConnectivityTest', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getTestId(); - $this->assertProtobufEquals($testId, $actualValue); - $actualValue = $actualApiRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createConnectivityTestTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } -} diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/AuthorizationPolicy.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/AuthorizationPolicy.php deleted file mode 100644 index e0bcb9d6fdf16f34c447f704182e9e3826697a04..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3391 zcmb_fTW{k;6kexkN>5m}YpUH43GHlJX$ zWwTY^ctQvX_!qqG-{4p9yb?bEo;WjOyJ?!1Dr}yd@tp76zH{+sU-)ewCde9fX<%{M zBFzrrZA$#Wz<8&8I#aeH-u43a%Hqs(8@}f-yJJW-0IqdHL*KF~S*tE?QEs&? zZq?T$Vtq*<*0(Ps)(>Xp0c^(#LsIERu1a7y1A;$4YN8qva#U)QNftJk%Q&+f_6l8H zAcvL{QpCA>_b_s8VJHy-JFZQqrisE7cPD)hL$g2<6RRRx7^(V(%W2?RPJNk%cEEh@ z1y#Iinn#qUF%~CN)3I6s#}3Jqve7iJ7`Z@r5YcY!ganjFfjckl769kzQ@u|BD?Y2Q zGU~JzY1=wwUSOIRUR{7(C%Q}H6yI7Z4TsdaWrfGL*Od{;EC_*Lh1D=yx)iA`hCcX(kW;}n;Kml`m>VJ3y^Qc+(Y^nGRYfF zpM$&|P%QF>fG-T;oBV9ih&@Ym8)@7H-jI-rd@RRUDtkMreaJahlR9Bxm<*wsFB3J_ z1<>f@p0Oz*R$Lx*gfW_4g`6eJvXDbN-kY5t2(}_2RJgWaIEWk?7Dl9<&jteAMFeSJ z@s})Q#XtQ3MpV^=n4G~QAh3)**;4r;zU=vYv;bW7<(AtKWs;Q_G2{s#7!b zsaE;~a*CiBX1%gh+t}G|>~HT?SC%$bH&&L%?&za1T-n^*c`>Hx??85WW&5kKjQO+n zrt+f(v%S4Zl{dDf(7+j9?o(!Z4Qu~fYV)vs7C)VrF}I3g<+J4R{PGBwgO*VgvbyJQ zJlW4nKWIQUS;((yM4?^!U4+Ebk!-#dP?yIoY#LkGKa~l1oG1!Ht%F)!^|BW`w@yhE%V?gFarMp>g%j4MI39pnEQT$s1ip zN$!*we7HvYM5dF(W&KiPH)T}j21#z|FHFOdZ2MOek*a&%lZIHKJ_ws8;bEUpb{edu zNUlo$1&sH*6;Gvs!YzSIuhHLqIk0Z<_hP7tDJ;3yZxp8Mi|h>gbvBEf=4bzh%?^-d z>QGK^F!`-9V)1VcCa@L!7o!&oeXOa9MYpPby`|=OvK3)tIr6S7{aCZO_xCg;zd3*9 z@HM#2>a@RMu)vmu6e?1rnGk+vE>hb45@;#8;spAL1n@mZ;n5M)r%^o1rJeXinternalAddGeneratedFile( - ' -¯ -7google/cloud/networksecurity/v1/client_tls_policy.protogoogle.cloud.networksecurity.v1google/api/resource.proto)google/cloud/networksecurity/v1/tls.proto google/protobuf/field_mask.protogoogle/protobuf/timestamp.proto"ì -ClientTlsPolicy -name ( BàA - description ( BàA4 - create_time ( 2.google.protobuf.TimestampBàA4 - update_time ( 2.google.protobuf.TimestampBàAQ -labels ( 2<.google.cloud.networksecurity.v1.ClientTlsPolicy.LabelsEntryBàA -sni ( BàAU -client_certificate ( 24.google.cloud.networksecurity.v1.CertificateProviderBàAP -server_validation_ca ( 2-.google.cloud.networksecurity.v1.ValidationCABàA- - LabelsEntry -key (  -value ( :8:‚êA -.networksecurity.googleapis.com/ClientTlsPolicyMprojects/{project}/locations/{location}/clientTlsPolicies/{client_tls_policy}"€ -ListClientTlsPoliciesRequest9 -parent ( B)àAúA# -!locations.googleapis.com/Location - page_size ( - -page_token ( "‡ -ListClientTlsPoliciesResponseM -client_tls_policies ( 20.google.cloud.networksecurity.v1.ClientTlsPolicy -next_page_token ( "a -GetClientTlsPolicyRequestD -name ( B6àAúA0 -.networksecurity.googleapis.com/ClientTlsPolicy"Û -CreateClientTlsPolicyRequestF -parent ( B6àAúA0.networksecurity.googleapis.com/ClientTlsPolicy! -client_tls_policy_id ( BàAP -client_tls_policy ( 20.google.cloud.networksecurity.v1.ClientTlsPolicyBàA"¦ -UpdateClientTlsPolicyRequest4 - update_mask ( 2.google.protobuf.FieldMaskBàAP -client_tls_policy ( 20.google.cloud.networksecurity.v1.ClientTlsPolicyBàA"d -DeleteClientTlsPolicyRequestD -name ( B6àAúA0 -.networksecurity.googleapis.com/ClientTlsPolicyBõ -#com.google.cloud.networksecurity.v1BClientTlsPolicyProtoPZMcloud.google.com/go/networksecurity/apiv1/networksecuritypb;networksecuritypbªGoogle.Cloud.NetworkSecurity.V1ÊGoogle\\Cloud\\NetworkSecurity\\V1ê"Google::Cloud::NetworkSecurity::V1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/Common.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/Common.php deleted file mode 100644 index e25fa07630ca..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/Common.php +++ /dev/null @@ -1,37 +0,0 @@ -internalAddGeneratedFile( - ' -ê -,google/cloud/networksecurity/v1/common.protogoogle.cloud.networksecurity.v1google/protobuf/timestamp.proto"€ -OperationMetadata4 - create_time ( 2.google.protobuf.TimestampBàA1 -end_time ( 2.google.protobuf.TimestampBàA -target ( BàA -verb ( BàA -status_message ( BàA# -requested_cancellation (BàA - api_version ( BàABì -#com.google.cloud.networksecurity.v1B CommonProtoPZMcloud.google.com/go/networksecurity/apiv1/networksecuritypb;networksecuritypbªGoogle.Cloud.NetworkSecurity.V1ÊGoogle\\Cloud\\NetworkSecurity\\V1ê"Google::Cloud::NetworkSecurity::V1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/NetworkSecurity.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/NetworkSecurity.php deleted file mode 100644 index f1cb186679a8..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/NetworkSecurity.php +++ /dev/null @@ -1,58 +0,0 @@ -internalAddGeneratedFile( - ' -¯% -6google/cloud/networksecurity/v1/network_security.protogoogle.cloud.networksecurity.v1google/api/client.proto:google/cloud/networksecurity/v1/authorization_policy.proto7google/cloud/networksecurity/v1/client_tls_policy.proto7google/cloud/networksecurity/v1/server_tls_policy.proto#google/longrunning/operations.proto2ý -NetworkSecurityî -ListAuthorizationPoliciesA.google.cloud.networksecurity.v1.ListAuthorizationPoliciesRequestB.google.cloud.networksecurity.v1.ListAuthorizationPoliciesResponse"JÚAparent‚Óä“;9/v1/{parent=projects/*/locations/*}/authorizationPoliciesØ -GetAuthorizationPolicy>.google.cloud.networksecurity.v1.GetAuthorizationPolicyRequest4.google.cloud.networksecurity.v1.AuthorizationPolicy"HÚAname‚Óä“;9/v1/{name=projects/*/locations/*/authorizationPolicies/*}Ø -CreateAuthorizationPolicyA.google.cloud.networksecurity.v1.CreateAuthorizationPolicyRequest.google.longrunning.Operation"ØÊAH -AuthorizationPolicy1google.cloud.networksecurity.v1.OperationMetadataÚA3parent,authorization_policy,authorization_policy_id‚Óä“Q"9/v1/{parent=projects/*/locations/*}/authorizationPolicies:authorization_policyÚ -UpdateAuthorizationPolicyA.google.cloud.networksecurity.v1.UpdateAuthorizationPolicyRequest.google.longrunning.Operation"ÚÊAH -AuthorizationPolicy1google.cloud.networksecurity.v1.OperationMetadataÚA authorization_policy,update_mask‚Óä“f2N/v1/{authorization_policy.name=projects/*/locations/*/authorizationPolicies/*}:authorization_policy• -DeleteAuthorizationPolicyA.google.cloud.networksecurity.v1.DeleteAuthorizationPolicyRequest.google.longrunning.Operation"•ÊAJ -google.protobuf.Empty1google.cloud.networksecurity.v1.OperationMetadataÚAname‚Óä“;*9/v1/{name=projects/*/locations/*/authorizationPolicies/*}Þ -ListServerTlsPolicies=.google.cloud.networksecurity.v1.ListServerTlsPoliciesRequest>.google.cloud.networksecurity.v1.ListServerTlsPoliciesResponse"FÚAparent‚Óä“75/v1/{parent=projects/*/locations/*}/serverTlsPoliciesÈ -GetServerTlsPolicy:.google.cloud.networksecurity.v1.GetServerTlsPolicyRequest0.google.cloud.networksecurity.v1.ServerTlsPolicy"DÚAname‚Óä“75/v1/{name=projects/*/locations/*/serverTlsPolicies/*}¿ -CreateServerTlsPolicy=.google.cloud.networksecurity.v1.CreateServerTlsPolicyRequest.google.longrunning.Operation"ÇÊAD -ServerTlsPolicy1google.cloud.networksecurity.v1.OperationMetadataÚA-parent,server_tls_policy,server_tls_policy_id‚Óä“J"5/v1/{parent=projects/*/locations/*}/serverTlsPolicies:server_tls_policyÁ -UpdateServerTlsPolicy=.google.cloud.networksecurity.v1.UpdateServerTlsPolicyRequest.google.longrunning.Operation"ÉÊAD -ServerTlsPolicy1google.cloud.networksecurity.v1.OperationMetadataÚAserver_tls_policy,update_mask‚Óä“\\2G/v1/{server_tls_policy.name=projects/*/locations/*/serverTlsPolicies/*}:server_tls_policy‰ -DeleteServerTlsPolicy=.google.cloud.networksecurity.v1.DeleteServerTlsPolicyRequest.google.longrunning.Operation"‘ÊAJ -google.protobuf.Empty1google.cloud.networksecurity.v1.OperationMetadataÚAname‚Óä“7*5/v1/{name=projects/*/locations/*/serverTlsPolicies/*}Þ -ListClientTlsPolicies=.google.cloud.networksecurity.v1.ListClientTlsPoliciesRequest>.google.cloud.networksecurity.v1.ListClientTlsPoliciesResponse"FÚAparent‚Óä“75/v1/{parent=projects/*/locations/*}/clientTlsPoliciesÈ -GetClientTlsPolicy:.google.cloud.networksecurity.v1.GetClientTlsPolicyRequest0.google.cloud.networksecurity.v1.ClientTlsPolicy"DÚAname‚Óä“75/v1/{name=projects/*/locations/*/clientTlsPolicies/*}¿ -CreateClientTlsPolicy=.google.cloud.networksecurity.v1.CreateClientTlsPolicyRequest.google.longrunning.Operation"ÇÊAD -ClientTlsPolicy1google.cloud.networksecurity.v1.OperationMetadataÚA-parent,client_tls_policy,client_tls_policy_id‚Óä“J"5/v1/{parent=projects/*/locations/*}/clientTlsPolicies:client_tls_policyÁ -UpdateClientTlsPolicy=.google.cloud.networksecurity.v1.UpdateClientTlsPolicyRequest.google.longrunning.Operation"ÉÊAD -ClientTlsPolicy1google.cloud.networksecurity.v1.OperationMetadataÚAclient_tls_policy,update_mask‚Óä“\\2G/v1/{client_tls_policy.name=projects/*/locations/*/clientTlsPolicies/*}:client_tls_policy‰ -DeleteClientTlsPolicy=.google.cloud.networksecurity.v1.DeleteClientTlsPolicyRequest.google.longrunning.Operation"‘ÊAJ -google.protobuf.Empty1google.cloud.networksecurity.v1.OperationMetadataÚAname‚Óä“7*5/v1/{name=projects/*/locations/*/clientTlsPolicies/*}RÊAnetworksecurity.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformBß -#com.google.cloud.networksecurity.v1PZMcloud.google.com/go/networksecurity/apiv1/networksecuritypb;networksecuritypbªGoogle.Cloud.NetworkSecurity.V1ÊGoogle\\Cloud\\NetworkSecurity\\V1ê"Google::Cloud::NetworkSecurity::V1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/ServerTlsPolicy.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/ServerTlsPolicy.php deleted file mode 100644 index 60b80b36eda1..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/ServerTlsPolicy.php +++ /dev/null @@ -1,71 +0,0 @@ -internalAddGeneratedFile( - ' -ý -7google/cloud/networksecurity/v1/server_tls_policy.protogoogle.cloud.networksecurity.v1google/api/resource.proto)google/cloud/networksecurity/v1/tls.proto google/protobuf/field_mask.protogoogle/protobuf/timestamp.proto"º -ServerTlsPolicy -name ( BàA - description ( 4 - create_time ( 2.google.protobuf.TimestampBàA4 - update_time ( 2.google.protobuf.TimestampBàAL -labels ( 2<.google.cloud.networksecurity.v1.ServerTlsPolicy.LabelsEntry - -allow_open (P -server_certificate ( 24.google.cloud.networksecurity.v1.CertificateProviderP - mtls_policy ( 2;.google.cloud.networksecurity.v1.ServerTlsPolicy.MTLSPolicyY - -MTLSPolicyK -client_validation_ca ( 2-.google.cloud.networksecurity.v1.ValidationCA- - LabelsEntry -key (  -value ( :8:‚êA -.networksecurity.googleapis.com/ServerTlsPolicyMprojects/{project}/locations/{location}/serverTlsPolicies/{server_tls_policy}"€ -ListServerTlsPoliciesRequest9 -parent ( B)àAúA# -!locations.googleapis.com/Location - page_size ( - -page_token ( "‡ -ListServerTlsPoliciesResponseM -server_tls_policies ( 20.google.cloud.networksecurity.v1.ServerTlsPolicy -next_page_token ( "a -GetServerTlsPolicyRequestD -name ( B6àAúA0 -.networksecurity.googleapis.com/ServerTlsPolicy"Û -CreateServerTlsPolicyRequestF -parent ( B6àAúA0.networksecurity.googleapis.com/ServerTlsPolicy! -server_tls_policy_id ( BàAP -server_tls_policy ( 20.google.cloud.networksecurity.v1.ServerTlsPolicyBàA"¦ -UpdateServerTlsPolicyRequest4 - update_mask ( 2.google.protobuf.FieldMaskBàAP -server_tls_policy ( 20.google.cloud.networksecurity.v1.ServerTlsPolicyBàA"d -DeleteServerTlsPolicyRequestD -name ( B6àAúA0 -.networksecurity.googleapis.com/ServerTlsPolicyBõ -#com.google.cloud.networksecurity.v1BServerTlsPolicyProtoPZMcloud.google.com/go/networksecurity/apiv1/networksecuritypb;networksecuritypbªGoogle.Cloud.NetworkSecurity.V1ÊGoogle\\Cloud\\NetworkSecurity\\V1ê"Google::Cloud::NetworkSecurity::V1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/Tls.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/GPBMetadata/Google/Cloud/Networksecurity/V1/Tls.php deleted file mode 100644 index e40948760b1b3445bf5629949c4a60db1904f917..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1442 zcmdT^%Wl&^6m3#e!BB)07Oe!RLt3e+L>&colNOZpk#^BG5>*z+QZyOgBqOGt(RdtG zP=APjV95sY5p3ZrxPIh8Qz%=!v1Ofm?(5vM^V$pzS*I-s!Ey%y?Ojqg1Zu2yT4+Uk zala3i3VmUu0_#z_e@0Kw&gsGa@%b|hjdW}UFgnnBpr9(0j)Q6l?!C6}A`r2a?y@?n zRh^2wl$DT>UqEEI0NQFdPr&hjJMOnq0)HX0S@XQ6<~7R@*l?1s_U`7Rxo)J}$h zgYb_-2R7u&--k$8X`Hrggfcb&HyL5_r?Qo&P3UBwRreDn7)`Rwg-;jGN^1650Ca zm6p~rsF!ZvyS9CAR4ez2@TgMzQ>*K$bhW zLevBp^nW^w z=8pndM+doWvdz1A+v%~j3vW*{Esd9~FRBAQ=PTSuw3cgnGrjuUpHIcLR_ZTa>MvgI zFK=>#@;bGzV}zeu(Aa~<7#~gOXR(~oFqZN#c8!R!POZ0u+H(5k=H#TFXGcEc34ip1 M6q#M^6}ckh7o%wCd;kCd diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthorizationPolicy.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthorizationPolicy.php deleted file mode 100644 index f865e6de8be7..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthorizationPolicy.php +++ /dev/null @@ -1,314 +0,0 @@ -google.cloud.networksecurity.v1.AuthorizationPolicy - */ -class AuthorizationPolicy extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the AuthorizationPolicy resource. It matches pattern - * `projects/{project}/locations/{location}/authorizationPolicies/`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Optional. Free-text description of the resource. - * - * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Output only. The timestamp when the resource was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The timestamp when the resource was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Optional. Set of label tags associated with the AuthorizationPolicy resource. - * - * Generated from protobuf field map labels = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - /** - * Required. The action to take when a rule match is found. Possible values - * are "ALLOW" or "DENY". - * - * Generated from protobuf field .google.cloud.networksecurity.v1.AuthorizationPolicy.Action action = 6 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $action = 0; - /** - * Optional. List of rules to match. Note that at least one of the rules must match in - * order for the action specified in the 'action' field to be taken. A rule is - * a match if there is a matching source and destination. If left blank, the - * action specified in the `action` field will be applied on every request. - * - * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule rules = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $rules; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the AuthorizationPolicy resource. It matches pattern - * `projects/{project}/locations/{location}/authorizationPolicies/`. - * @type string $description - * Optional. Free-text description of the resource. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The timestamp when the resource was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The timestamp when the resource was updated. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. Set of label tags associated with the AuthorizationPolicy resource. - * @type int $action - * Required. The action to take when a rule match is found. Possible values - * are "ALLOW" or "DENY". - * @type array<\Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy\Rule>|\Google\Protobuf\Internal\RepeatedField $rules - * Optional. List of rules to match. Note that at least one of the rules must match in - * order for the action specified in the 'action' field to be taken. A rule is - * a match if there is a matching source and destination. If left blank, the - * action specified in the `action` field will be applied on every request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networksecurity\V1\AuthorizationPolicy::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the AuthorizationPolicy resource. It matches pattern - * `projects/{project}/locations/{location}/authorizationPolicies/`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the AuthorizationPolicy resource. It matches pattern - * `projects/{project}/locations/{location}/authorizationPolicies/`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. Free-text description of the resource. - * - * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. Free-text description of the resource. - * - * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Output only. The timestamp when the resource was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The timestamp when the resource was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The timestamp when the resource was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The timestamp when the resource was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Optional. Set of label tags associated with the AuthorizationPolicy resource. - * - * Generated from protobuf field map labels = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. Set of label tags associated with the AuthorizationPolicy resource. - * - * Generated from protobuf field map labels = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Required. The action to take when a rule match is found. Possible values - * are "ALLOW" or "DENY". - * - * Generated from protobuf field .google.cloud.networksecurity.v1.AuthorizationPolicy.Action action = 6 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getAction() - { - return $this->action; - } - - /** - * Required. The action to take when a rule match is found. Possible values - * are "ALLOW" or "DENY". - * - * Generated from protobuf field .google.cloud.networksecurity.v1.AuthorizationPolicy.Action action = 6 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setAction($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy\Action::class); - $this->action = $var; - - return $this; - } - - /** - * Optional. List of rules to match. Note that at least one of the rules must match in - * order for the action specified in the 'action' field to be taken. A rule is - * a match if there is a matching source and destination. If left blank, the - * action specified in the `action` field will be applied on every request. - * - * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule rules = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRules() - { - return $this->rules; - } - - /** - * Optional. List of rules to match. Note that at least one of the rules must match in - * order for the action specified in the 'action' field to be taken. A rule is - * a match if there is a matching source and destination. If left blank, the - * action specified in the `action` field will be applied on every request. - * - * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule rules = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy\Rule>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRules($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy\Rule::class); - $this->rules = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthorizationPolicy/Action.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthorizationPolicy/Action.php deleted file mode 100644 index 0f5f8a546eb7..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthorizationPolicy/Action.php +++ /dev/null @@ -1,66 +0,0 @@ -google.cloud.networksecurity.v1.AuthorizationPolicy.Action - */ -class Action -{ - /** - * Default value. - * - * Generated from protobuf enum ACTION_UNSPECIFIED = 0; - */ - const ACTION_UNSPECIFIED = 0; - /** - * Grant access. - * - * Generated from protobuf enum ALLOW = 1; - */ - const ALLOW = 1; - /** - * Deny access. - * Deny rules should be avoided unless they are used to provide a default - * "deny all" fallback. - * - * Generated from protobuf enum DENY = 2; - */ - const DENY = 2; - - private static $valueToName = [ - self::ACTION_UNSPECIFIED => 'ACTION_UNSPECIFIED', - self::ALLOW => 'ALLOW', - self::DENY => 'DENY', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Action::class, \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy_Action::class); - diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthorizationPolicy/Rule.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthorizationPolicy/Rule.php deleted file mode 100644 index 00f7a6dbb253..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthorizationPolicy/Rule.php +++ /dev/null @@ -1,132 +0,0 @@ -google.cloud.networksecurity.v1.AuthorizationPolicy.Rule - */ -class Rule extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. List of attributes for the traffic source. All of the sources must match. - * A source is a match if both principals and ip_blocks match. If not set, - * the action specified in the 'action' field will be applied without any - * rule checks for the source. - * - * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Source sources = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $sources; - /** - * Optional. List of attributes for the traffic destination. All of the destinations - * must match. A destination is a match if a request matches all the - * specified hosts, ports, methods and headers. If not set, the - * action specified in the 'action' field will be applied without any rule - * checks for the destination. - * - * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Destination destinations = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $destinations; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy\Rule\Source>|\Google\Protobuf\Internal\RepeatedField $sources - * Optional. List of attributes for the traffic source. All of the sources must match. - * A source is a match if both principals and ip_blocks match. If not set, - * the action specified in the 'action' field will be applied without any - * rule checks for the source. - * @type array<\Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy\Rule\Destination>|\Google\Protobuf\Internal\RepeatedField $destinations - * Optional. List of attributes for the traffic destination. All of the destinations - * must match. A destination is a match if a request matches all the - * specified hosts, ports, methods and headers. If not set, the - * action specified in the 'action' field will be applied without any rule - * checks for the destination. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networksecurity\V1\AuthorizationPolicy::initOnce(); - parent::__construct($data); - } - - /** - * Optional. List of attributes for the traffic source. All of the sources must match. - * A source is a match if both principals and ip_blocks match. If not set, - * the action specified in the 'action' field will be applied without any - * rule checks for the source. - * - * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Source sources = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSources() - { - return $this->sources; - } - - /** - * Optional. List of attributes for the traffic source. All of the sources must match. - * A source is a match if both principals and ip_blocks match. If not set, - * the action specified in the 'action' field will be applied without any - * rule checks for the source. - * - * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Source sources = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy\Rule\Source>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSources($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy\Rule\Source::class); - $this->sources = $arr; - - return $this; - } - - /** - * Optional. List of attributes for the traffic destination. All of the destinations - * must match. A destination is a match if a request matches all the - * specified hosts, ports, methods and headers. If not set, the - * action specified in the 'action' field will be applied without any rule - * checks for the destination. - * - * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Destination destinations = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDestinations() - { - return $this->destinations; - } - - /** - * Optional. List of attributes for the traffic destination. All of the destinations - * must match. A destination is a match if a request matches all the - * specified hosts, ports, methods and headers. If not set, the - * action specified in the 'action' field will be applied without any rule - * checks for the destination. - * - * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Destination destinations = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy\Rule\Destination>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDestinations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy\Rule\Destination::class); - $this->destinations = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Rule::class, \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy_Rule::class); - diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthorizationPolicy/Rule/Destination.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthorizationPolicy/Rule/Destination.php deleted file mode 100644 index 525242cc7ff9..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthorizationPolicy/Rule/Destination.php +++ /dev/null @@ -1,214 +0,0 @@ -google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Destination - */ -class Destination extends \Google\Protobuf\Internal\Message -{ - /** - * Required. List of host names to match. Matched against the ":authority" header in - * http requests. At least one host should match. Each host can be an - * exact match, or a prefix match (example "mydomain.*") or a suffix - * match (example "*.myorg.com") or a presence (any) match "*". - * - * Generated from protobuf field repeated string hosts = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - private $hosts; - /** - * Required. List of destination ports to match. At least one port should match. - * - * Generated from protobuf field repeated uint32 ports = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private $ports; - /** - * Optional. A list of HTTP methods to match. At least one method should - * match. Should not be set for gRPC services. - * - * Generated from protobuf field repeated string methods = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $methods; - /** - * Optional. Match against key:value pair in http header. Provides a flexible match - * based on HTTP headers, for potentially advanced use cases. At least one - * header should match. Avoid using header matches to make authorization - * decisions unless there is a strong guarantee that requests arrive - * through a trusted client or proxy. - * - * Generated from protobuf field .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatch http_header_match = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $http_header_match = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $hosts - * Required. List of host names to match. Matched against the ":authority" header in - * http requests. At least one host should match. Each host can be an - * exact match, or a prefix match (example "mydomain.*") or a suffix - * match (example "*.myorg.com") or a presence (any) match "*". - * @type array|\Google\Protobuf\Internal\RepeatedField $ports - * Required. List of destination ports to match. At least one port should match. - * @type array|\Google\Protobuf\Internal\RepeatedField $methods - * Optional. A list of HTTP methods to match. At least one method should - * match. Should not be set for gRPC services. - * @type \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy\Rule\Destination\HttpHeaderMatch $http_header_match - * Optional. Match against key:value pair in http header. Provides a flexible match - * based on HTTP headers, for potentially advanced use cases. At least one - * header should match. Avoid using header matches to make authorization - * decisions unless there is a strong guarantee that requests arrive - * through a trusted client or proxy. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networksecurity\V1\AuthorizationPolicy::initOnce(); - parent::__construct($data); - } - - /** - * Required. List of host names to match. Matched against the ":authority" header in - * http requests. At least one host should match. Each host can be an - * exact match, or a prefix match (example "mydomain.*") or a suffix - * match (example "*.myorg.com") or a presence (any) match "*". - * - * Generated from protobuf field repeated string hosts = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getHosts() - { - return $this->hosts; - } - - /** - * Required. List of host names to match. Matched against the ":authority" header in - * http requests. At least one host should match. Each host can be an - * exact match, or a prefix match (example "mydomain.*") or a suffix - * match (example "*.myorg.com") or a presence (any) match "*". - * - * Generated from protobuf field repeated string hosts = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setHosts($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->hosts = $arr; - - return $this; - } - - /** - * Required. List of destination ports to match. At least one port should match. - * - * Generated from protobuf field repeated uint32 ports = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPorts() - { - return $this->ports; - } - - /** - * Required. List of destination ports to match. At least one port should match. - * - * Generated from protobuf field repeated uint32 ports = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPorts($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::UINT32); - $this->ports = $arr; - - return $this; - } - - /** - * Optional. A list of HTTP methods to match. At least one method should - * match. Should not be set for gRPC services. - * - * Generated from protobuf field repeated string methods = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMethods() - { - return $this->methods; - } - - /** - * Optional. A list of HTTP methods to match. At least one method should - * match. Should not be set for gRPC services. - * - * Generated from protobuf field repeated string methods = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMethods($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->methods = $arr; - - return $this; - } - - /** - * Optional. Match against key:value pair in http header. Provides a flexible match - * based on HTTP headers, for potentially advanced use cases. At least one - * header should match. Avoid using header matches to make authorization - * decisions unless there is a strong guarantee that requests arrive - * through a trusted client or proxy. - * - * Generated from protobuf field .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatch http_header_match = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy\Rule\Destination\HttpHeaderMatch|null - */ - public function getHttpHeaderMatch() - { - return $this->http_header_match; - } - - public function hasHttpHeaderMatch() - { - return isset($this->http_header_match); - } - - public function clearHttpHeaderMatch() - { - unset($this->http_header_match); - } - - /** - * Optional. Match against key:value pair in http header. Provides a flexible match - * based on HTTP headers, for potentially advanced use cases. At least one - * header should match. Avoid using header matches to make authorization - * decisions unless there is a strong guarantee that requests arrive - * through a trusted client or proxy. - * - * Generated from protobuf field .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatch http_header_match = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy\Rule\Destination\HttpHeaderMatch $var - * @return $this - */ - public function setHttpHeaderMatch($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy\Rule\Destination\HttpHeaderMatch::class); - $this->http_header_match = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Destination::class, \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy_Rule_Destination::class); - diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthorizationPolicy/Rule/Destination/HttpHeaderMatch.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthorizationPolicy/Rule/Destination/HttpHeaderMatch.php deleted file mode 100644 index a5b39bc370f2..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthorizationPolicy/Rule/Destination/HttpHeaderMatch.php +++ /dev/null @@ -1,142 +0,0 @@ -google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatch - */ -class HttpHeaderMatch extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the HTTP header to match. For matching - * against the HTTP request's authority, use a headerMatch - * with the header name ":authority". For matching a - * request's method, use the headerName ":method". - * - * Generated from protobuf field string header_name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $header_name = ''; - protected $type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $regex_match - * Required. The value of the header must match the regular expression - * specified in regexMatch. For regular expression grammar, - * please see: en.cppreference.com/w/cpp/regex/ecmascript - * For matching against a port specified in the HTTP - * request, use a headerMatch with headerName set to Host - * and a regular expression that satisfies the RFC2616 Host - * header's port specifier. - * @type string $header_name - * Required. The name of the HTTP header to match. For matching - * against the HTTP request's authority, use a headerMatch - * with the header name ":authority". For matching a - * request's method, use the headerName ":method". - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networksecurity\V1\AuthorizationPolicy::initOnce(); - parent::__construct($data); - } - - /** - * Required. The value of the header must match the regular expression - * specified in regexMatch. For regular expression grammar, - * please see: en.cppreference.com/w/cpp/regex/ecmascript - * For matching against a port specified in the HTTP - * request, use a headerMatch with headerName set to Host - * and a regular expression that satisfies the RFC2616 Host - * header's port specifier. - * - * Generated from protobuf field string regex_match = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getRegexMatch() - { - return $this->readOneof(2); - } - - public function hasRegexMatch() - { - return $this->hasOneof(2); - } - - /** - * Required. The value of the header must match the regular expression - * specified in regexMatch. For regular expression grammar, - * please see: en.cppreference.com/w/cpp/regex/ecmascript - * For matching against a port specified in the HTTP - * request, use a headerMatch with headerName set to Host - * and a regular expression that satisfies the RFC2616 Host - * header's port specifier. - * - * Generated from protobuf field string regex_match = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setRegexMatch($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Required. The name of the HTTP header to match. For matching - * against the HTTP request's authority, use a headerMatch - * with the header name ":authority". For matching a - * request's method, use the headerName ":method". - * - * Generated from protobuf field string header_name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getHeaderName() - { - return $this->header_name; - } - - /** - * Required. The name of the HTTP header to match. For matching - * against the HTTP request's authority, use a headerMatch - * with the header name ":authority". For matching a - * request's method, use the headerName ":method". - * - * Generated from protobuf field string header_name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setHeaderName($var) - { - GPBUtil::checkString($var, True); - $this->header_name = $var; - - return $this; - } - - /** - * @return string - */ - public function getType() - { - return $this->whichOneof("type"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(HttpHeaderMatch::class, \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy_Rule_Destination_HttpHeaderMatch::class); - diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthorizationPolicy/Rule/Source.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthorizationPolicy/Rule/Source.php deleted file mode 100644 index 41a7658703bd..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/AuthorizationPolicy/Rule/Source.php +++ /dev/null @@ -1,140 +0,0 @@ -google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Source - */ -class Source extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. List of peer identities to match for authorization. At least one - * principal should match. Each peer can be an exact match, or a prefix - * match (example, "namespace/*") or a suffix match (example, - * "*/service-account") or a presence match "*". Authorization based on - * the principal name without certificate validation (configured by - * ServerTlsPolicy resource) is considered insecure. - * - * Generated from protobuf field repeated string principals = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $principals; - /** - * Optional. List of CIDR ranges to match based on source IP address. At least one - * IP block should match. Single IP (e.g., "1.2.3.4") and CIDR (e.g., - * "1.2.3.0/24") are supported. Authorization based on source IP alone - * should be avoided. The IP addresses of any load balancers or proxies - * should be considered untrusted. - * - * Generated from protobuf field repeated string ip_blocks = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $ip_blocks; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $principals - * Optional. List of peer identities to match for authorization. At least one - * principal should match. Each peer can be an exact match, or a prefix - * match (example, "namespace/*") or a suffix match (example, - * "*/service-account") or a presence match "*". Authorization based on - * the principal name without certificate validation (configured by - * ServerTlsPolicy resource) is considered insecure. - * @type array|\Google\Protobuf\Internal\RepeatedField $ip_blocks - * Optional. List of CIDR ranges to match based on source IP address. At least one - * IP block should match. Single IP (e.g., "1.2.3.4") and CIDR (e.g., - * "1.2.3.0/24") are supported. Authorization based on source IP alone - * should be avoided. The IP addresses of any load balancers or proxies - * should be considered untrusted. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networksecurity\V1\AuthorizationPolicy::initOnce(); - parent::__construct($data); - } - - /** - * Optional. List of peer identities to match for authorization. At least one - * principal should match. Each peer can be an exact match, or a prefix - * match (example, "namespace/*") or a suffix match (example, - * "*/service-account") or a presence match "*". Authorization based on - * the principal name without certificate validation (configured by - * ServerTlsPolicy resource) is considered insecure. - * - * Generated from protobuf field repeated string principals = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPrincipals() - { - return $this->principals; - } - - /** - * Optional. List of peer identities to match for authorization. At least one - * principal should match. Each peer can be an exact match, or a prefix - * match (example, "namespace/*") or a suffix match (example, - * "*/service-account") or a presence match "*". Authorization based on - * the principal name without certificate validation (configured by - * ServerTlsPolicy resource) is considered insecure. - * - * Generated from protobuf field repeated string principals = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPrincipals($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->principals = $arr; - - return $this; - } - - /** - * Optional. List of CIDR ranges to match based on source IP address. At least one - * IP block should match. Single IP (e.g., "1.2.3.4") and CIDR (e.g., - * "1.2.3.0/24") are supported. Authorization based on source IP alone - * should be avoided. The IP addresses of any load balancers or proxies - * should be considered untrusted. - * - * Generated from protobuf field repeated string ip_blocks = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getIpBlocks() - { - return $this->ip_blocks; - } - - /** - * Optional. List of CIDR ranges to match based on source IP address. At least one - * IP block should match. Single IP (e.g., "1.2.3.4") and CIDR (e.g., - * "1.2.3.0/24") are supported. Authorization based on source IP alone - * should be avoided. The IP addresses of any load balancers or proxies - * should be considered untrusted. - * - * Generated from protobuf field repeated string ip_blocks = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setIpBlocks($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->ip_blocks = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Source::class, \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy_Rule_Source::class); - diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CertificateProvider.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CertificateProvider.php deleted file mode 100644 index 5678fa26bd93..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CertificateProvider.php +++ /dev/null @@ -1,118 +0,0 @@ -google.cloud.networksecurity.v1.CertificateProvider - */ -class CertificateProvider extends \Google\Protobuf\Internal\Message -{ - protected $type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\NetworkSecurity\V1\GrpcEndpoint $grpc_endpoint - * gRPC specific configuration to access the gRPC server to - * obtain the cert and private key. - * @type \Google\Cloud\NetworkSecurity\V1\CertificateProviderInstance $certificate_provider_instance - * The certificate provider instance specification that will be passed to - * the data plane, which will be used to load necessary credential - * information. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networksecurity\V1\Tls::initOnce(); - parent::__construct($data); - } - - /** - * gRPC specific configuration to access the gRPC server to - * obtain the cert and private key. - * - * Generated from protobuf field .google.cloud.networksecurity.v1.GrpcEndpoint grpc_endpoint = 2; - * @return \Google\Cloud\NetworkSecurity\V1\GrpcEndpoint|null - */ - public function getGrpcEndpoint() - { - return $this->readOneof(2); - } - - public function hasGrpcEndpoint() - { - return $this->hasOneof(2); - } - - /** - * gRPC specific configuration to access the gRPC server to - * obtain the cert and private key. - * - * Generated from protobuf field .google.cloud.networksecurity.v1.GrpcEndpoint grpc_endpoint = 2; - * @param \Google\Cloud\NetworkSecurity\V1\GrpcEndpoint $var - * @return $this - */ - public function setGrpcEndpoint($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\GrpcEndpoint::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * The certificate provider instance specification that will be passed to - * the data plane, which will be used to load necessary credential - * information. - * - * Generated from protobuf field .google.cloud.networksecurity.v1.CertificateProviderInstance certificate_provider_instance = 3; - * @return \Google\Cloud\NetworkSecurity\V1\CertificateProviderInstance|null - */ - public function getCertificateProviderInstance() - { - return $this->readOneof(3); - } - - public function hasCertificateProviderInstance() - { - return $this->hasOneof(3); - } - - /** - * The certificate provider instance specification that will be passed to - * the data plane, which will be used to load necessary credential - * information. - * - * Generated from protobuf field .google.cloud.networksecurity.v1.CertificateProviderInstance certificate_provider_instance = 3; - * @param \Google\Cloud\NetworkSecurity\V1\CertificateProviderInstance $var - * @return $this - */ - public function setCertificateProviderInstance($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\CertificateProviderInstance::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * @return string - */ - public function getType() - { - return $this->whichOneof("type"); - } - -} - diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CertificateProviderInstance.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CertificateProviderInstance.php deleted file mode 100644 index ccd059520027..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CertificateProviderInstance.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.networksecurity.v1.CertificateProviderInstance - */ -class CertificateProviderInstance extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Plugin instance name, used to locate and load CertificateProvider instance - * configuration. Set to "google_cloud_private_spiffe" to use Certificate - * Authority Service certificate provider instance. - * - * Generated from protobuf field string plugin_instance = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $plugin_instance = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $plugin_instance - * Required. Plugin instance name, used to locate and load CertificateProvider instance - * configuration. Set to "google_cloud_private_spiffe" to use Certificate - * Authority Service certificate provider instance. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networksecurity\V1\Tls::initOnce(); - parent::__construct($data); - } - - /** - * Required. Plugin instance name, used to locate and load CertificateProvider instance - * configuration. Set to "google_cloud_private_spiffe" to use Certificate - * Authority Service certificate provider instance. - * - * Generated from protobuf field string plugin_instance = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getPluginInstance() - { - return $this->plugin_instance; - } - - /** - * Required. Plugin instance name, used to locate and load CertificateProvider instance - * configuration. Set to "google_cloud_private_spiffe" to use Certificate - * Authority Service certificate provider instance. - * - * Generated from protobuf field string plugin_instance = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setPluginInstance($var) - { - GPBUtil::checkString($var, True); - $this->plugin_instance = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ClientTlsPolicy.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ClientTlsPolicy.php deleted file mode 100644 index 8beb057fb1a7..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ClientTlsPolicy.php +++ /dev/null @@ -1,357 +0,0 @@ -google.cloud.networksecurity.v1.ClientTlsPolicy - */ -class ClientTlsPolicy extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the ClientTlsPolicy resource. It matches the pattern - * `projects/*/locations/{location}/clientTlsPolicies/{client_tls_policy}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Optional. Free-text description of the resource. - * - * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Output only. The timestamp when the resource was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The timestamp when the resource was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Optional. Set of label tags associated with the resource. - * - * Generated from protobuf field map labels = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - /** - * Optional. Server Name Indication string to present to the server during TLS - * handshake. E.g: "secure.example.com". - * - * Generated from protobuf field string sni = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $sni = ''; - /** - * Optional. Defines a mechanism to provision client identity (public and private keys) - * for peer to peer authentication. The presence of this dictates mTLS. - * - * Generated from protobuf field .google.cloud.networksecurity.v1.CertificateProvider client_certificate = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $client_certificate = null; - /** - * Optional. Defines the mechanism to obtain the Certificate Authority certificate to - * validate the server certificate. If empty, client does not validate the - * server certificate. - * - * Generated from protobuf field repeated .google.cloud.networksecurity.v1.ValidationCA server_validation_ca = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $server_validation_ca; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the ClientTlsPolicy resource. It matches the pattern - * `projects/*/locations/{location}/clientTlsPolicies/{client_tls_policy}` - * @type string $description - * Optional. Free-text description of the resource. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The timestamp when the resource was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The timestamp when the resource was updated. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. Set of label tags associated with the resource. - * @type string $sni - * Optional. Server Name Indication string to present to the server during TLS - * handshake. E.g: "secure.example.com". - * @type \Google\Cloud\NetworkSecurity\V1\CertificateProvider $client_certificate - * Optional. Defines a mechanism to provision client identity (public and private keys) - * for peer to peer authentication. The presence of this dictates mTLS. - * @type array<\Google\Cloud\NetworkSecurity\V1\ValidationCA>|\Google\Protobuf\Internal\RepeatedField $server_validation_ca - * Optional. Defines the mechanism to obtain the Certificate Authority certificate to - * validate the server certificate. If empty, client does not validate the - * server certificate. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networksecurity\V1\ClientTlsPolicy::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the ClientTlsPolicy resource. It matches the pattern - * `projects/*/locations/{location}/clientTlsPolicies/{client_tls_policy}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the ClientTlsPolicy resource. It matches the pattern - * `projects/*/locations/{location}/clientTlsPolicies/{client_tls_policy}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. Free-text description of the resource. - * - * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. Free-text description of the resource. - * - * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Output only. The timestamp when the resource was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The timestamp when the resource was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The timestamp when the resource was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The timestamp when the resource was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Optional. Set of label tags associated with the resource. - * - * Generated from protobuf field map labels = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. Set of label tags associated with the resource. - * - * Generated from protobuf field map labels = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Optional. Server Name Indication string to present to the server during TLS - * handshake. E.g: "secure.example.com". - * - * Generated from protobuf field string sni = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getSni() - { - return $this->sni; - } - - /** - * Optional. Server Name Indication string to present to the server during TLS - * handshake. E.g: "secure.example.com". - * - * Generated from protobuf field string sni = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setSni($var) - { - GPBUtil::checkString($var, True); - $this->sni = $var; - - return $this; - } - - /** - * Optional. Defines a mechanism to provision client identity (public and private keys) - * for peer to peer authentication. The presence of this dictates mTLS. - * - * Generated from protobuf field .google.cloud.networksecurity.v1.CertificateProvider client_certificate = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\NetworkSecurity\V1\CertificateProvider|null - */ - public function getClientCertificate() - { - return $this->client_certificate; - } - - public function hasClientCertificate() - { - return isset($this->client_certificate); - } - - public function clearClientCertificate() - { - unset($this->client_certificate); - } - - /** - * Optional. Defines a mechanism to provision client identity (public and private keys) - * for peer to peer authentication. The presence of this dictates mTLS. - * - * Generated from protobuf field .google.cloud.networksecurity.v1.CertificateProvider client_certificate = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\NetworkSecurity\V1\CertificateProvider $var - * @return $this - */ - public function setClientCertificate($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\CertificateProvider::class); - $this->client_certificate = $var; - - return $this; - } - - /** - * Optional. Defines the mechanism to obtain the Certificate Authority certificate to - * validate the server certificate. If empty, client does not validate the - * server certificate. - * - * Generated from protobuf field repeated .google.cloud.networksecurity.v1.ValidationCA server_validation_ca = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getServerValidationCa() - { - return $this->server_validation_ca; - } - - /** - * Optional. Defines the mechanism to obtain the Certificate Authority certificate to - * validate the server certificate. If empty, client does not validate the - * server certificate. - * - * Generated from protobuf field repeated .google.cloud.networksecurity.v1.ValidationCA server_validation_ca = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\NetworkSecurity\V1\ValidationCA>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setServerValidationCa($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkSecurity\V1\ValidationCA::class); - $this->server_validation_ca = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateAuthorizationPolicyRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateAuthorizationPolicyRequest.php deleted file mode 100644 index 66a7be6c12fb..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateAuthorizationPolicyRequest.php +++ /dev/null @@ -1,183 +0,0 @@ -google.cloud.networksecurity.v1.CreateAuthorizationPolicyRequest - */ -class CreateAuthorizationPolicyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource of the AuthorizationPolicy. Must be in the - * format `projects/{project}/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Short name of the AuthorizationPolicy resource to be created. - * This value should be 1-63 characters long, containing only - * letters, numbers, hyphens, and underscores, and should not start - * with a number. E.g. "authz_policy". - * - * Generated from protobuf field string authorization_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $authorization_policy_id = ''; - /** - * Required. AuthorizationPolicy resource to be created. - * - * Generated from protobuf field .google.cloud.networksecurity.v1.AuthorizationPolicy authorization_policy = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $authorization_policy = null; - - /** - * @param string $parent Required. The parent resource of the AuthorizationPolicy. Must be in the - * format `projects/{project}/locations/{location}`. Please see - * {@see NetworkSecurityClient::locationName()} for help formatting this field. - * @param \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy $authorizationPolicy Required. AuthorizationPolicy resource to be created. - * @param string $authorizationPolicyId Required. Short name of the AuthorizationPolicy resource to be created. - * This value should be 1-63 characters long, containing only - * letters, numbers, hyphens, and underscores, and should not start - * with a number. E.g. "authz_policy". - * - * @return \Google\Cloud\NetworkSecurity\V1\CreateAuthorizationPolicyRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy $authorizationPolicy, string $authorizationPolicyId): self - { - return (new self()) - ->setParent($parent) - ->setAuthorizationPolicy($authorizationPolicy) - ->setAuthorizationPolicyId($authorizationPolicyId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource of the AuthorizationPolicy. Must be in the - * format `projects/{project}/locations/{location}`. - * @type string $authorization_policy_id - * Required. Short name of the AuthorizationPolicy resource to be created. - * This value should be 1-63 characters long, containing only - * letters, numbers, hyphens, and underscores, and should not start - * with a number. E.g. "authz_policy". - * @type \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy $authorization_policy - * Required. AuthorizationPolicy resource to be created. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networksecurity\V1\AuthorizationPolicy::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource of the AuthorizationPolicy. Must be in the - * format `projects/{project}/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource of the AuthorizationPolicy. Must be in the - * format `projects/{project}/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. Short name of the AuthorizationPolicy resource to be created. - * This value should be 1-63 characters long, containing only - * letters, numbers, hyphens, and underscores, and should not start - * with a number. E.g. "authz_policy". - * - * Generated from protobuf field string authorization_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getAuthorizationPolicyId() - { - return $this->authorization_policy_id; - } - - /** - * Required. Short name of the AuthorizationPolicy resource to be created. - * This value should be 1-63 characters long, containing only - * letters, numbers, hyphens, and underscores, and should not start - * with a number. E.g. "authz_policy". - * - * Generated from protobuf field string authorization_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setAuthorizationPolicyId($var) - { - GPBUtil::checkString($var, True); - $this->authorization_policy_id = $var; - - return $this; - } - - /** - * Required. AuthorizationPolicy resource to be created. - * - * Generated from protobuf field .google.cloud.networksecurity.v1.AuthorizationPolicy authorization_policy = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy|null - */ - public function getAuthorizationPolicy() - { - return $this->authorization_policy; - } - - public function hasAuthorizationPolicy() - { - return isset($this->authorization_policy); - } - - public function clearAuthorizationPolicy() - { - unset($this->authorization_policy); - } - - /** - * Required. AuthorizationPolicy resource to be created. - * - * Generated from protobuf field .google.cloud.networksecurity.v1.AuthorizationPolicy authorization_policy = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy $var - * @return $this - */ - public function setAuthorizationPolicy($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy::class); - $this->authorization_policy = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateClientTlsPolicyRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateClientTlsPolicyRequest.php deleted file mode 100644 index 3d3def4d330b..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateClientTlsPolicyRequest.php +++ /dev/null @@ -1,178 +0,0 @@ -google.cloud.networksecurity.v1.CreateClientTlsPolicyRequest - */ -class CreateClientTlsPolicyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource of the ClientTlsPolicy. Must be in - * the format `projects/*/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Short name of the ClientTlsPolicy resource to be created. This value should - * be 1-63 characters long, containing only letters, numbers, hyphens, and - * underscores, and should not start with a number. E.g. "client_mtls_policy". - * - * Generated from protobuf field string client_tls_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $client_tls_policy_id = ''; - /** - * Required. ClientTlsPolicy resource to be created. - * - * Generated from protobuf field .google.cloud.networksecurity.v1.ClientTlsPolicy client_tls_policy = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $client_tls_policy = null; - - /** - * @param string $parent Required. The parent resource of the ClientTlsPolicy. Must be in - * the format `projects/*/locations/{location}`. Please see - * {@see NetworkSecurityClient::locationName()} for help formatting this field. - * @param \Google\Cloud\NetworkSecurity\V1\ClientTlsPolicy $clientTlsPolicy Required. ClientTlsPolicy resource to be created. - * @param string $clientTlsPolicyId Required. Short name of the ClientTlsPolicy resource to be created. This value should - * be 1-63 characters long, containing only letters, numbers, hyphens, and - * underscores, and should not start with a number. E.g. "client_mtls_policy". - * - * @return \Google\Cloud\NetworkSecurity\V1\CreateClientTlsPolicyRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\NetworkSecurity\V1\ClientTlsPolicy $clientTlsPolicy, string $clientTlsPolicyId): self - { - return (new self()) - ->setParent($parent) - ->setClientTlsPolicy($clientTlsPolicy) - ->setClientTlsPolicyId($clientTlsPolicyId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource of the ClientTlsPolicy. Must be in - * the format `projects/*/locations/{location}`. - * @type string $client_tls_policy_id - * Required. Short name of the ClientTlsPolicy resource to be created. This value should - * be 1-63 characters long, containing only letters, numbers, hyphens, and - * underscores, and should not start with a number. E.g. "client_mtls_policy". - * @type \Google\Cloud\NetworkSecurity\V1\ClientTlsPolicy $client_tls_policy - * Required. ClientTlsPolicy resource to be created. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networksecurity\V1\ClientTlsPolicy::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource of the ClientTlsPolicy. Must be in - * the format `projects/*/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource of the ClientTlsPolicy. Must be in - * the format `projects/*/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. Short name of the ClientTlsPolicy resource to be created. This value should - * be 1-63 characters long, containing only letters, numbers, hyphens, and - * underscores, and should not start with a number. E.g. "client_mtls_policy". - * - * Generated from protobuf field string client_tls_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getClientTlsPolicyId() - { - return $this->client_tls_policy_id; - } - - /** - * Required. Short name of the ClientTlsPolicy resource to be created. This value should - * be 1-63 characters long, containing only letters, numbers, hyphens, and - * underscores, and should not start with a number. E.g. "client_mtls_policy". - * - * Generated from protobuf field string client_tls_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setClientTlsPolicyId($var) - { - GPBUtil::checkString($var, True); - $this->client_tls_policy_id = $var; - - return $this; - } - - /** - * Required. ClientTlsPolicy resource to be created. - * - * Generated from protobuf field .google.cloud.networksecurity.v1.ClientTlsPolicy client_tls_policy = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\NetworkSecurity\V1\ClientTlsPolicy|null - */ - public function getClientTlsPolicy() - { - return $this->client_tls_policy; - } - - public function hasClientTlsPolicy() - { - return isset($this->client_tls_policy); - } - - public function clearClientTlsPolicy() - { - unset($this->client_tls_policy); - } - - /** - * Required. ClientTlsPolicy resource to be created. - * - * Generated from protobuf field .google.cloud.networksecurity.v1.ClientTlsPolicy client_tls_policy = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\NetworkSecurity\V1\ClientTlsPolicy $var - * @return $this - */ - public function setClientTlsPolicy($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\ClientTlsPolicy::class); - $this->client_tls_policy = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateServerTlsPolicyRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateServerTlsPolicyRequest.php deleted file mode 100644 index f0b3382517ab..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/CreateServerTlsPolicyRequest.php +++ /dev/null @@ -1,178 +0,0 @@ -google.cloud.networksecurity.v1.CreateServerTlsPolicyRequest - */ -class CreateServerTlsPolicyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource of the ServerTlsPolicy. Must be in - * the format `projects/*/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Short name of the ServerTlsPolicy resource to be created. This value should - * be 1-63 characters long, containing only letters, numbers, hyphens, and - * underscores, and should not start with a number. E.g. "server_mtls_policy". - * - * Generated from protobuf field string server_tls_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $server_tls_policy_id = ''; - /** - * Required. ServerTlsPolicy resource to be created. - * - * Generated from protobuf field .google.cloud.networksecurity.v1.ServerTlsPolicy server_tls_policy = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $server_tls_policy = null; - - /** - * @param string $parent Required. The parent resource of the ServerTlsPolicy. Must be in - * the format `projects/*/locations/{location}`. Please see - * {@see NetworkSecurityClient::locationName()} for help formatting this field. - * @param \Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy $serverTlsPolicy Required. ServerTlsPolicy resource to be created. - * @param string $serverTlsPolicyId Required. Short name of the ServerTlsPolicy resource to be created. This value should - * be 1-63 characters long, containing only letters, numbers, hyphens, and - * underscores, and should not start with a number. E.g. "server_mtls_policy". - * - * @return \Google\Cloud\NetworkSecurity\V1\CreateServerTlsPolicyRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy $serverTlsPolicy, string $serverTlsPolicyId): self - { - return (new self()) - ->setParent($parent) - ->setServerTlsPolicy($serverTlsPolicy) - ->setServerTlsPolicyId($serverTlsPolicyId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource of the ServerTlsPolicy. Must be in - * the format `projects/*/locations/{location}`. - * @type string $server_tls_policy_id - * Required. Short name of the ServerTlsPolicy resource to be created. This value should - * be 1-63 characters long, containing only letters, numbers, hyphens, and - * underscores, and should not start with a number. E.g. "server_mtls_policy". - * @type \Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy $server_tls_policy - * Required. ServerTlsPolicy resource to be created. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networksecurity\V1\ServerTlsPolicy::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource of the ServerTlsPolicy. Must be in - * the format `projects/*/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource of the ServerTlsPolicy. Must be in - * the format `projects/*/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. Short name of the ServerTlsPolicy resource to be created. This value should - * be 1-63 characters long, containing only letters, numbers, hyphens, and - * underscores, and should not start with a number. E.g. "server_mtls_policy". - * - * Generated from protobuf field string server_tls_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getServerTlsPolicyId() - { - return $this->server_tls_policy_id; - } - - /** - * Required. Short name of the ServerTlsPolicy resource to be created. This value should - * be 1-63 characters long, containing only letters, numbers, hyphens, and - * underscores, and should not start with a number. E.g. "server_mtls_policy". - * - * Generated from protobuf field string server_tls_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setServerTlsPolicyId($var) - { - GPBUtil::checkString($var, True); - $this->server_tls_policy_id = $var; - - return $this; - } - - /** - * Required. ServerTlsPolicy resource to be created. - * - * Generated from protobuf field .google.cloud.networksecurity.v1.ServerTlsPolicy server_tls_policy = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy|null - */ - public function getServerTlsPolicy() - { - return $this->server_tls_policy; - } - - public function hasServerTlsPolicy() - { - return isset($this->server_tls_policy); - } - - public function clearServerTlsPolicy() - { - unset($this->server_tls_policy); - } - - /** - * Required. ServerTlsPolicy resource to be created. - * - * Generated from protobuf field .google.cloud.networksecurity.v1.ServerTlsPolicy server_tls_policy = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy $var - * @return $this - */ - public function setServerTlsPolicy($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy::class); - $this->server_tls_policy = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteAuthorizationPolicyRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteAuthorizationPolicyRequest.php deleted file mode 100644 index 5a77695ce1e8..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteAuthorizationPolicyRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.networksecurity.v1.DeleteAuthorizationPolicyRequest - */ -class DeleteAuthorizationPolicyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A name of the AuthorizationPolicy to delete. Must be in the format - * `projects/{project}/locations/{location}/authorizationPolicies/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. A name of the AuthorizationPolicy to delete. Must be in the format - * `projects/{project}/locations/{location}/authorizationPolicies/*`. Please see - * {@see NetworkSecurityClient::authorizationPolicyName()} for help formatting this field. - * - * @return \Google\Cloud\NetworkSecurity\V1\DeleteAuthorizationPolicyRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. A name of the AuthorizationPolicy to delete. Must be in the format - * `projects/{project}/locations/{location}/authorizationPolicies/*`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networksecurity\V1\AuthorizationPolicy::initOnce(); - parent::__construct($data); - } - - /** - * Required. A name of the AuthorizationPolicy to delete. Must be in the format - * `projects/{project}/locations/{location}/authorizationPolicies/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. A name of the AuthorizationPolicy to delete. Must be in the format - * `projects/{project}/locations/{location}/authorizationPolicies/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteClientTlsPolicyRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteClientTlsPolicyRequest.php deleted file mode 100644 index 0c6c459b85a8..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteClientTlsPolicyRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.networksecurity.v1.DeleteClientTlsPolicyRequest - */ -class DeleteClientTlsPolicyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A name of the ClientTlsPolicy to delete. Must be in - * the format `projects/*/locations/{location}/clientTlsPolicies/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. A name of the ClientTlsPolicy to delete. Must be in - * the format `projects/*/locations/{location}/clientTlsPolicies/*`. Please see - * {@see NetworkSecurityClient::clientTlsPolicyName()} for help formatting this field. - * - * @return \Google\Cloud\NetworkSecurity\V1\DeleteClientTlsPolicyRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. A name of the ClientTlsPolicy to delete. Must be in - * the format `projects/*/locations/{location}/clientTlsPolicies/*`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networksecurity\V1\ClientTlsPolicy::initOnce(); - parent::__construct($data); - } - - /** - * Required. A name of the ClientTlsPolicy to delete. Must be in - * the format `projects/*/locations/{location}/clientTlsPolicies/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. A name of the ClientTlsPolicy to delete. Must be in - * the format `projects/*/locations/{location}/clientTlsPolicies/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteServerTlsPolicyRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteServerTlsPolicyRequest.php deleted file mode 100644 index 2382596f1242..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/DeleteServerTlsPolicyRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.networksecurity.v1.DeleteServerTlsPolicyRequest - */ -class DeleteServerTlsPolicyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A name of the ServerTlsPolicy to delete. Must be in - * the format `projects/*/locations/{location}/serverTlsPolicies/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. A name of the ServerTlsPolicy to delete. Must be in - * the format `projects/*/locations/{location}/serverTlsPolicies/*`. Please see - * {@see NetworkSecurityClient::serverTlsPolicyName()} for help formatting this field. - * - * @return \Google\Cloud\NetworkSecurity\V1\DeleteServerTlsPolicyRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. A name of the ServerTlsPolicy to delete. Must be in - * the format `projects/*/locations/{location}/serverTlsPolicies/*`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networksecurity\V1\ServerTlsPolicy::initOnce(); - parent::__construct($data); - } - - /** - * Required. A name of the ServerTlsPolicy to delete. Must be in - * the format `projects/*/locations/{location}/serverTlsPolicies/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. A name of the ServerTlsPolicy to delete. Must be in - * the format `projects/*/locations/{location}/serverTlsPolicies/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetAuthorizationPolicyRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetAuthorizationPolicyRequest.php deleted file mode 100644 index 27f763ad28d2..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetAuthorizationPolicyRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.networksecurity.v1.GetAuthorizationPolicyRequest - */ -class GetAuthorizationPolicyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A name of the AuthorizationPolicy to get. Must be in the format - * `projects/{project}/locations/{location}/authorizationPolicies/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. A name of the AuthorizationPolicy to get. Must be in the format - * `projects/{project}/locations/{location}/authorizationPolicies/*`. Please see - * {@see NetworkSecurityClient::authorizationPolicyName()} for help formatting this field. - * - * @return \Google\Cloud\NetworkSecurity\V1\GetAuthorizationPolicyRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. A name of the AuthorizationPolicy to get. Must be in the format - * `projects/{project}/locations/{location}/authorizationPolicies/*`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networksecurity\V1\AuthorizationPolicy::initOnce(); - parent::__construct($data); - } - - /** - * Required. A name of the AuthorizationPolicy to get. Must be in the format - * `projects/{project}/locations/{location}/authorizationPolicies/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. A name of the AuthorizationPolicy to get. Must be in the format - * `projects/{project}/locations/{location}/authorizationPolicies/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetClientTlsPolicyRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetClientTlsPolicyRequest.php deleted file mode 100644 index 90b8fe9b0751..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetClientTlsPolicyRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.networksecurity.v1.GetClientTlsPolicyRequest - */ -class GetClientTlsPolicyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A name of the ClientTlsPolicy to get. Must be in the format - * `projects/*/locations/{location}/clientTlsPolicies/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. A name of the ClientTlsPolicy to get. Must be in the format - * `projects/*/locations/{location}/clientTlsPolicies/*`. Please see - * {@see NetworkSecurityClient::clientTlsPolicyName()} for help formatting this field. - * - * @return \Google\Cloud\NetworkSecurity\V1\GetClientTlsPolicyRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. A name of the ClientTlsPolicy to get. Must be in the format - * `projects/*/locations/{location}/clientTlsPolicies/*`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networksecurity\V1\ClientTlsPolicy::initOnce(); - parent::__construct($data); - } - - /** - * Required. A name of the ClientTlsPolicy to get. Must be in the format - * `projects/*/locations/{location}/clientTlsPolicies/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. A name of the ClientTlsPolicy to get. Must be in the format - * `projects/*/locations/{location}/clientTlsPolicies/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetServerTlsPolicyRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetServerTlsPolicyRequest.php deleted file mode 100644 index a79106ecdb46..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GetServerTlsPolicyRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.networksecurity.v1.GetServerTlsPolicyRequest - */ -class GetServerTlsPolicyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A name of the ServerTlsPolicy to get. Must be in the format - * `projects/*/locations/{location}/serverTlsPolicies/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. A name of the ServerTlsPolicy to get. Must be in the format - * `projects/*/locations/{location}/serverTlsPolicies/*`. Please see - * {@see NetworkSecurityClient::serverTlsPolicyName()} for help formatting this field. - * - * @return \Google\Cloud\NetworkSecurity\V1\GetServerTlsPolicyRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. A name of the ServerTlsPolicy to get. Must be in the format - * `projects/*/locations/{location}/serverTlsPolicies/*`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networksecurity\V1\ServerTlsPolicy::initOnce(); - parent::__construct($data); - } - - /** - * Required. A name of the ServerTlsPolicy to get. Must be in the format - * `projects/*/locations/{location}/serverTlsPolicies/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. A name of the ServerTlsPolicy to get. Must be in the format - * `projects/*/locations/{location}/serverTlsPolicies/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GrpcEndpoint.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GrpcEndpoint.php deleted file mode 100644 index 34031be7a624..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/GrpcEndpoint.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.networksecurity.v1.GrpcEndpoint - */ -class GrpcEndpoint extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The target URI of the gRPC endpoint. Only UDS path is supported, and - * should start with "unix:". - * - * Generated from protobuf field string target_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $target_uri = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $target_uri - * Required. The target URI of the gRPC endpoint. Only UDS path is supported, and - * should start with "unix:". - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networksecurity\V1\Tls::initOnce(); - parent::__construct($data); - } - - /** - * Required. The target URI of the gRPC endpoint. Only UDS path is supported, and - * should start with "unix:". - * - * Generated from protobuf field string target_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getTargetUri() - { - return $this->target_uri; - } - - /** - * Required. The target URI of the gRPC endpoint. Only UDS path is supported, and - * should start with "unix:". - * - * Generated from protobuf field string target_uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setTargetUri($var) - { - GPBUtil::checkString($var, True); - $this->target_uri = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListAuthorizationPoliciesRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListAuthorizationPoliciesRequest.php deleted file mode 100644 index bcc6a41e53dd..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListAuthorizationPoliciesRequest.php +++ /dev/null @@ -1,171 +0,0 @@ -google.cloud.networksecurity.v1.ListAuthorizationPoliciesRequest - */ -class ListAuthorizationPoliciesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project and location from which the AuthorizationPolicies - * should be listed, specified in the format - * `projects/{project}/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Maximum number of AuthorizationPolicies to return per call. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The value returned by the last - * `ListAuthorizationPoliciesResponse` Indicates that this is a - * continuation of a prior `ListAuthorizationPolicies` call, and - * that the system should return the next page of data. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The project and location from which the AuthorizationPolicies - * should be listed, specified in the format - * `projects/{project}/locations/{location}`. Please see - * {@see NetworkSecurityClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\NetworkSecurity\V1\ListAuthorizationPoliciesRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The project and location from which the AuthorizationPolicies - * should be listed, specified in the format - * `projects/{project}/locations/{location}`. - * @type int $page_size - * Maximum number of AuthorizationPolicies to return per call. - * @type string $page_token - * The value returned by the last - * `ListAuthorizationPoliciesResponse` Indicates that this is a - * continuation of a prior `ListAuthorizationPolicies` call, and - * that the system should return the next page of data. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networksecurity\V1\AuthorizationPolicy::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project and location from which the AuthorizationPolicies - * should be listed, specified in the format - * `projects/{project}/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The project and location from which the AuthorizationPolicies - * should be listed, specified in the format - * `projects/{project}/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Maximum number of AuthorizationPolicies to return per call. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Maximum number of AuthorizationPolicies to return per call. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * The value returned by the last - * `ListAuthorizationPoliciesResponse` Indicates that this is a - * continuation of a prior `ListAuthorizationPolicies` call, and - * that the system should return the next page of data. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The value returned by the last - * `ListAuthorizationPoliciesResponse` Indicates that this is a - * continuation of a prior `ListAuthorizationPolicies` call, and - * that the system should return the next page of data. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListAuthorizationPoliciesResponse.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListAuthorizationPoliciesResponse.php deleted file mode 100644 index 729cad84d2b8..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListAuthorizationPoliciesResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.networksecurity.v1.ListAuthorizationPoliciesResponse - */ -class ListAuthorizationPoliciesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * List of AuthorizationPolicies resources. - * - * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AuthorizationPolicy authorization_policies = 1; - */ - private $authorization_policies; - /** - * If there might be more results than those appearing in this response, then - * `next_page_token` is included. To get the next set of results, call this - * method again using the value of `next_page_token` as `page_token`. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy>|\Google\Protobuf\Internal\RepeatedField $authorization_policies - * List of AuthorizationPolicies resources. - * @type string $next_page_token - * If there might be more results than those appearing in this response, then - * `next_page_token` is included. To get the next set of results, call this - * method again using the value of `next_page_token` as `page_token`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networksecurity\V1\AuthorizationPolicy::initOnce(); - parent::__construct($data); - } - - /** - * List of AuthorizationPolicies resources. - * - * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AuthorizationPolicy authorization_policies = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAuthorizationPolicies() - { - return $this->authorization_policies; - } - - /** - * List of AuthorizationPolicies resources. - * - * Generated from protobuf field repeated .google.cloud.networksecurity.v1.AuthorizationPolicy authorization_policies = 1; - * @param array<\Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAuthorizationPolicies($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy::class); - $this->authorization_policies = $arr; - - return $this; - } - - /** - * If there might be more results than those appearing in this response, then - * `next_page_token` is included. To get the next set of results, call this - * method again using the value of `next_page_token` as `page_token`. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * If there might be more results than those appearing in this response, then - * `next_page_token` is included. To get the next set of results, call this - * method again using the value of `next_page_token` as `page_token`. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListClientTlsPoliciesRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListClientTlsPoliciesRequest.php deleted file mode 100644 index b7d754f60f82..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListClientTlsPoliciesRequest.php +++ /dev/null @@ -1,166 +0,0 @@ -google.cloud.networksecurity.v1.ListClientTlsPoliciesRequest - */ -class ListClientTlsPoliciesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project and location from which the ClientTlsPolicies should - * be listed, specified in the format `projects/*/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Maximum number of ClientTlsPolicies to return per call. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The value returned by the last `ListClientTlsPoliciesResponse` - * Indicates that this is a continuation of a prior - * `ListClientTlsPolicies` call, and that the system - * should return the next page of data. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The project and location from which the ClientTlsPolicies should - * be listed, specified in the format `projects/*/locations/{location}`. Please see - * {@see NetworkSecurityClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\NetworkSecurity\V1\ListClientTlsPoliciesRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The project and location from which the ClientTlsPolicies should - * be listed, specified in the format `projects/*/locations/{location}`. - * @type int $page_size - * Maximum number of ClientTlsPolicies to return per call. - * @type string $page_token - * The value returned by the last `ListClientTlsPoliciesResponse` - * Indicates that this is a continuation of a prior - * `ListClientTlsPolicies` call, and that the system - * should return the next page of data. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networksecurity\V1\ClientTlsPolicy::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project and location from which the ClientTlsPolicies should - * be listed, specified in the format `projects/*/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The project and location from which the ClientTlsPolicies should - * be listed, specified in the format `projects/*/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Maximum number of ClientTlsPolicies to return per call. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Maximum number of ClientTlsPolicies to return per call. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * The value returned by the last `ListClientTlsPoliciesResponse` - * Indicates that this is a continuation of a prior - * `ListClientTlsPolicies` call, and that the system - * should return the next page of data. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The value returned by the last `ListClientTlsPoliciesResponse` - * Indicates that this is a continuation of a prior - * `ListClientTlsPolicies` call, and that the system - * should return the next page of data. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListClientTlsPoliciesResponse.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListClientTlsPoliciesResponse.php deleted file mode 100644 index a5b57f958e01..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListClientTlsPoliciesResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.networksecurity.v1.ListClientTlsPoliciesResponse - */ -class ListClientTlsPoliciesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * List of ClientTlsPolicy resources. - * - * Generated from protobuf field repeated .google.cloud.networksecurity.v1.ClientTlsPolicy client_tls_policies = 1; - */ - private $client_tls_policies; - /** - * If there might be more results than those appearing in this response, then - * `next_page_token` is included. To get the next set of results, call this - * method again using the value of `next_page_token` as `page_token`. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\NetworkSecurity\V1\ClientTlsPolicy>|\Google\Protobuf\Internal\RepeatedField $client_tls_policies - * List of ClientTlsPolicy resources. - * @type string $next_page_token - * If there might be more results than those appearing in this response, then - * `next_page_token` is included. To get the next set of results, call this - * method again using the value of `next_page_token` as `page_token`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networksecurity\V1\ClientTlsPolicy::initOnce(); - parent::__construct($data); - } - - /** - * List of ClientTlsPolicy resources. - * - * Generated from protobuf field repeated .google.cloud.networksecurity.v1.ClientTlsPolicy client_tls_policies = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getClientTlsPolicies() - { - return $this->client_tls_policies; - } - - /** - * List of ClientTlsPolicy resources. - * - * Generated from protobuf field repeated .google.cloud.networksecurity.v1.ClientTlsPolicy client_tls_policies = 1; - * @param array<\Google\Cloud\NetworkSecurity\V1\ClientTlsPolicy>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setClientTlsPolicies($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkSecurity\V1\ClientTlsPolicy::class); - $this->client_tls_policies = $arr; - - return $this; - } - - /** - * If there might be more results than those appearing in this response, then - * `next_page_token` is included. To get the next set of results, call this - * method again using the value of `next_page_token` as `page_token`. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * If there might be more results than those appearing in this response, then - * `next_page_token` is included. To get the next set of results, call this - * method again using the value of `next_page_token` as `page_token`. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListServerTlsPoliciesRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListServerTlsPoliciesRequest.php deleted file mode 100644 index 2d8e83a2f998..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListServerTlsPoliciesRequest.php +++ /dev/null @@ -1,166 +0,0 @@ -google.cloud.networksecurity.v1.ListServerTlsPoliciesRequest - */ -class ListServerTlsPoliciesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project and location from which the ServerTlsPolicies should - * be listed, specified in the format `projects/*/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Maximum number of ServerTlsPolicies to return per call. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The value returned by the last `ListServerTlsPoliciesResponse` - * Indicates that this is a continuation of a prior - * `ListServerTlsPolicies` call, and that the system - * should return the next page of data. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The project and location from which the ServerTlsPolicies should - * be listed, specified in the format `projects/*/locations/{location}`. Please see - * {@see NetworkSecurityClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\NetworkSecurity\V1\ListServerTlsPoliciesRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The project and location from which the ServerTlsPolicies should - * be listed, specified in the format `projects/*/locations/{location}`. - * @type int $page_size - * Maximum number of ServerTlsPolicies to return per call. - * @type string $page_token - * The value returned by the last `ListServerTlsPoliciesResponse` - * Indicates that this is a continuation of a prior - * `ListServerTlsPolicies` call, and that the system - * should return the next page of data. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networksecurity\V1\ServerTlsPolicy::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project and location from which the ServerTlsPolicies should - * be listed, specified in the format `projects/*/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The project and location from which the ServerTlsPolicies should - * be listed, specified in the format `projects/*/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Maximum number of ServerTlsPolicies to return per call. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Maximum number of ServerTlsPolicies to return per call. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * The value returned by the last `ListServerTlsPoliciesResponse` - * Indicates that this is a continuation of a prior - * `ListServerTlsPolicies` call, and that the system - * should return the next page of data. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The value returned by the last `ListServerTlsPoliciesResponse` - * Indicates that this is a continuation of a prior - * `ListServerTlsPolicies` call, and that the system - * should return the next page of data. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListServerTlsPoliciesResponse.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListServerTlsPoliciesResponse.php deleted file mode 100644 index 1e9c223a096d..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ListServerTlsPoliciesResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.networksecurity.v1.ListServerTlsPoliciesResponse - */ -class ListServerTlsPoliciesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * List of ServerTlsPolicy resources. - * - * Generated from protobuf field repeated .google.cloud.networksecurity.v1.ServerTlsPolicy server_tls_policies = 1; - */ - private $server_tls_policies; - /** - * If there might be more results than those appearing in this response, then - * `next_page_token` is included. To get the next set of results, call this - * method again using the value of `next_page_token` as `page_token`. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy>|\Google\Protobuf\Internal\RepeatedField $server_tls_policies - * List of ServerTlsPolicy resources. - * @type string $next_page_token - * If there might be more results than those appearing in this response, then - * `next_page_token` is included. To get the next set of results, call this - * method again using the value of `next_page_token` as `page_token`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networksecurity\V1\ServerTlsPolicy::initOnce(); - parent::__construct($data); - } - - /** - * List of ServerTlsPolicy resources. - * - * Generated from protobuf field repeated .google.cloud.networksecurity.v1.ServerTlsPolicy server_tls_policies = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getServerTlsPolicies() - { - return $this->server_tls_policies; - } - - /** - * List of ServerTlsPolicy resources. - * - * Generated from protobuf field repeated .google.cloud.networksecurity.v1.ServerTlsPolicy server_tls_policies = 1; - * @param array<\Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setServerTlsPolicies($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy::class); - $this->server_tls_policies = $arr; - - return $this; - } - - /** - * If there might be more results than those appearing in this response, then - * `next_page_token` is included. To get the next set of results, call this - * method again using the value of `next_page_token` as `page_token`. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * If there might be more results than those appearing in this response, then - * `next_page_token` is included. To get the next set of results, call this - * method again using the value of `next_page_token` as `page_token`. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/OperationMetadata.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/OperationMetadata.php deleted file mode 100644 index c7ce8290e617..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/OperationMetadata.php +++ /dev/null @@ -1,303 +0,0 @@ -google.cloud.networksecurity.v1.OperationMetadata - */ -class OperationMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $end_time = null; - /** - * Output only. Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $target = ''; - /** - * Output only. Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $verb = ''; - /** - * Output only. Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $status_message = ''; - /** - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have successfully been cancelled - * have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, - * corresponding to `Code.CANCELLED`. - * - * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $requested_cancellation = false; - /** - * Output only. API version used to start the operation. - * - * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $api_version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time the operation was created. - * @type \Google\Protobuf\Timestamp $end_time - * Output only. The time the operation finished running. - * @type string $target - * Output only. Server-defined resource path for the target of the operation. - * @type string $verb - * Output only. Name of the verb executed by the operation. - * @type string $status_message - * Output only. Human-readable status of the operation, if any. - * @type bool $requested_cancellation - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have successfully been cancelled - * have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, - * corresponding to `Code.CANCELLED`. - * @type string $api_version - * Output only. API version used to start the operation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networksecurity\V1\Common::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * Output only. The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * Output only. Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getTarget() - { - return $this->target; - } - - /** - * Output only. Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setTarget($var) - { - GPBUtil::checkString($var, True); - $this->target = $var; - - return $this; - } - - /** - * Output only. Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getVerb() - { - return $this->verb; - } - - /** - * Output only. Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setVerb($var) - { - GPBUtil::checkString($var, True); - $this->verb = $var; - - return $this; - } - - /** - * Output only. Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getStatusMessage() - { - return $this->status_message; - } - - /** - * Output only. Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setStatusMessage($var) - { - GPBUtil::checkString($var, True); - $this->status_message = $var; - - return $this; - } - - /** - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have successfully been cancelled - * have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, - * corresponding to `Code.CANCELLED`. - * - * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getRequestedCancellation() - { - return $this->requested_cancellation; - } - - /** - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have successfully been cancelled - * have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, - * corresponding to `Code.CANCELLED`. - * - * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setRequestedCancellation($var) - { - GPBUtil::checkBool($var); - $this->requested_cancellation = $var; - - return $this; - } - - /** - * Output only. API version used to start the operation. - * - * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getApiVersion() - { - return $this->api_version; - } - - /** - * Output only. API version used to start the operation. - * - * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setApiVersion($var) - { - GPBUtil::checkString($var, True); - $this->api_version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ServerTlsPolicy.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ServerTlsPolicy.php deleted file mode 100644 index 3c2d7c1b7c04..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ServerTlsPolicy.php +++ /dev/null @@ -1,403 +0,0 @@ -google.cloud.networksecurity.v1.ServerTlsPolicy - */ -class ServerTlsPolicy extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the ServerTlsPolicy resource. It matches the pattern - * `projects/*/locations/{location}/serverTlsPolicies/{server_tls_policy}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Free-text description of the resource. - * - * Generated from protobuf field string description = 2; - */ - protected $description = ''; - /** - * Output only. The timestamp when the resource was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The timestamp when the resource was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Set of label tags associated with the resource. - * - * Generated from protobuf field map labels = 5; - */ - private $labels; - /** - * Determines if server allows plaintext connections. If set to true, server - * allows plain text connections. By default, it is set to false. This setting - * is not exclusive of other encryption modes. For example, if `allow_open` - * and `mtls_policy` are set, server allows both plain text and mTLS - * connections. See documentation of other encryption modes to confirm - * compatibility. - * Consider using it if you wish to upgrade in place your deployment to TLS - * while having mixed TLS and non-TLS traffic reaching port :80. - * - * Generated from protobuf field bool allow_open = 6; - */ - protected $allow_open = false; - /** - * Defines a mechanism to provision server identity (public and private keys). - * Cannot be combined with `allow_open` as a permissive mode that allows both - * plain text and TLS is not supported. - * - * Generated from protobuf field .google.cloud.networksecurity.v1.CertificateProvider server_certificate = 7; - */ - protected $server_certificate = null; - /** - * Defines a mechanism to provision peer validation certificates for peer to - * peer authentication (Mutual TLS - mTLS). If not specified, client - * certificate will not be requested. The connection is treated as TLS and not - * mTLS. If `allow_open` and `mtls_policy` are set, server allows both plain - * text and mTLS connections. - * - * Generated from protobuf field .google.cloud.networksecurity.v1.ServerTlsPolicy.MTLSPolicy mtls_policy = 8; - */ - protected $mtls_policy = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the ServerTlsPolicy resource. It matches the pattern - * `projects/*/locations/{location}/serverTlsPolicies/{server_tls_policy}` - * @type string $description - * Free-text description of the resource. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The timestamp when the resource was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The timestamp when the resource was updated. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Set of label tags associated with the resource. - * @type bool $allow_open - * Determines if server allows plaintext connections. If set to true, server - * allows plain text connections. By default, it is set to false. This setting - * is not exclusive of other encryption modes. For example, if `allow_open` - * and `mtls_policy` are set, server allows both plain text and mTLS - * connections. See documentation of other encryption modes to confirm - * compatibility. - * Consider using it if you wish to upgrade in place your deployment to TLS - * while having mixed TLS and non-TLS traffic reaching port :80. - * @type \Google\Cloud\NetworkSecurity\V1\CertificateProvider $server_certificate - * Defines a mechanism to provision server identity (public and private keys). - * Cannot be combined with `allow_open` as a permissive mode that allows both - * plain text and TLS is not supported. - * @type \Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy\MTLSPolicy $mtls_policy - * Defines a mechanism to provision peer validation certificates for peer to - * peer authentication (Mutual TLS - mTLS). If not specified, client - * certificate will not be requested. The connection is treated as TLS and not - * mTLS. If `allow_open` and `mtls_policy` are set, server allows both plain - * text and mTLS connections. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networksecurity\V1\ServerTlsPolicy::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the ServerTlsPolicy resource. It matches the pattern - * `projects/*/locations/{location}/serverTlsPolicies/{server_tls_policy}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the ServerTlsPolicy resource. It matches the pattern - * `projects/*/locations/{location}/serverTlsPolicies/{server_tls_policy}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Free-text description of the resource. - * - * Generated from protobuf field string description = 2; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Free-text description of the resource. - * - * Generated from protobuf field string description = 2; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Output only. The timestamp when the resource was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The timestamp when the resource was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The timestamp when the resource was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The timestamp when the resource was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Set of label tags associated with the resource. - * - * Generated from protobuf field map labels = 5; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Set of label tags associated with the resource. - * - * Generated from protobuf field map labels = 5; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Determines if server allows plaintext connections. If set to true, server - * allows plain text connections. By default, it is set to false. This setting - * is not exclusive of other encryption modes. For example, if `allow_open` - * and `mtls_policy` are set, server allows both plain text and mTLS - * connections. See documentation of other encryption modes to confirm - * compatibility. - * Consider using it if you wish to upgrade in place your deployment to TLS - * while having mixed TLS and non-TLS traffic reaching port :80. - * - * Generated from protobuf field bool allow_open = 6; - * @return bool - */ - public function getAllowOpen() - { - return $this->allow_open; - } - - /** - * Determines if server allows plaintext connections. If set to true, server - * allows plain text connections. By default, it is set to false. This setting - * is not exclusive of other encryption modes. For example, if `allow_open` - * and `mtls_policy` are set, server allows both plain text and mTLS - * connections. See documentation of other encryption modes to confirm - * compatibility. - * Consider using it if you wish to upgrade in place your deployment to TLS - * while having mixed TLS and non-TLS traffic reaching port :80. - * - * Generated from protobuf field bool allow_open = 6; - * @param bool $var - * @return $this - */ - public function setAllowOpen($var) - { - GPBUtil::checkBool($var); - $this->allow_open = $var; - - return $this; - } - - /** - * Defines a mechanism to provision server identity (public and private keys). - * Cannot be combined with `allow_open` as a permissive mode that allows both - * plain text and TLS is not supported. - * - * Generated from protobuf field .google.cloud.networksecurity.v1.CertificateProvider server_certificate = 7; - * @return \Google\Cloud\NetworkSecurity\V1\CertificateProvider|null - */ - public function getServerCertificate() - { - return $this->server_certificate; - } - - public function hasServerCertificate() - { - return isset($this->server_certificate); - } - - public function clearServerCertificate() - { - unset($this->server_certificate); - } - - /** - * Defines a mechanism to provision server identity (public and private keys). - * Cannot be combined with `allow_open` as a permissive mode that allows both - * plain text and TLS is not supported. - * - * Generated from protobuf field .google.cloud.networksecurity.v1.CertificateProvider server_certificate = 7; - * @param \Google\Cloud\NetworkSecurity\V1\CertificateProvider $var - * @return $this - */ - public function setServerCertificate($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\CertificateProvider::class); - $this->server_certificate = $var; - - return $this; - } - - /** - * Defines a mechanism to provision peer validation certificates for peer to - * peer authentication (Mutual TLS - mTLS). If not specified, client - * certificate will not be requested. The connection is treated as TLS and not - * mTLS. If `allow_open` and `mtls_policy` are set, server allows both plain - * text and mTLS connections. - * - * Generated from protobuf field .google.cloud.networksecurity.v1.ServerTlsPolicy.MTLSPolicy mtls_policy = 8; - * @return \Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy\MTLSPolicy|null - */ - public function getMtlsPolicy() - { - return $this->mtls_policy; - } - - public function hasMtlsPolicy() - { - return isset($this->mtls_policy); - } - - public function clearMtlsPolicy() - { - unset($this->mtls_policy); - } - - /** - * Defines a mechanism to provision peer validation certificates for peer to - * peer authentication (Mutual TLS - mTLS). If not specified, client - * certificate will not be requested. The connection is treated as TLS and not - * mTLS. If `allow_open` and `mtls_policy` are set, server allows both plain - * text and mTLS connections. - * - * Generated from protobuf field .google.cloud.networksecurity.v1.ServerTlsPolicy.MTLSPolicy mtls_policy = 8; - * @param \Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy\MTLSPolicy $var - * @return $this - */ - public function setMtlsPolicy($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy\MTLSPolicy::class); - $this->mtls_policy = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ServerTlsPolicy/MTLSPolicy.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ServerTlsPolicy/MTLSPolicy.php deleted file mode 100644 index 3bc9f9b8d37a..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ServerTlsPolicy/MTLSPolicy.php +++ /dev/null @@ -1,74 +0,0 @@ -google.cloud.networksecurity.v1.ServerTlsPolicy.MTLSPolicy - */ -class MTLSPolicy extends \Google\Protobuf\Internal\Message -{ - /** - * Defines the mechanism to obtain the Certificate Authority certificate to - * validate the client certificate. - * - * Generated from protobuf field repeated .google.cloud.networksecurity.v1.ValidationCA client_validation_ca = 1; - */ - private $client_validation_ca; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\NetworkSecurity\V1\ValidationCA>|\Google\Protobuf\Internal\RepeatedField $client_validation_ca - * Defines the mechanism to obtain the Certificate Authority certificate to - * validate the client certificate. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networksecurity\V1\ServerTlsPolicy::initOnce(); - parent::__construct($data); - } - - /** - * Defines the mechanism to obtain the Certificate Authority certificate to - * validate the client certificate. - * - * Generated from protobuf field repeated .google.cloud.networksecurity.v1.ValidationCA client_validation_ca = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getClientValidationCa() - { - return $this->client_validation_ca; - } - - /** - * Defines the mechanism to obtain the Certificate Authority certificate to - * validate the client certificate. - * - * Generated from protobuf field repeated .google.cloud.networksecurity.v1.ValidationCA client_validation_ca = 1; - * @param array<\Google\Cloud\NetworkSecurity\V1\ValidationCA>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setClientValidationCa($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkSecurity\V1\ValidationCA::class); - $this->client_validation_ca = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(MTLSPolicy::class, \Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy_MTLSPolicy::class); - diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateAuthorizationPolicyRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateAuthorizationPolicyRequest.php deleted file mode 100644 index 664831a9e0ce..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateAuthorizationPolicyRequest.php +++ /dev/null @@ -1,156 +0,0 @@ -google.cloud.networksecurity.v1.UpdateAuthorizationPolicyRequest - */ -class UpdateAuthorizationPolicyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Field mask is used to specify the fields to be overwritten in the - * AuthorizationPolicy resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $update_mask = null; - /** - * Required. Updated AuthorizationPolicy resource. - * - * Generated from protobuf field .google.cloud.networksecurity.v1.AuthorizationPolicy authorization_policy = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $authorization_policy = null; - - /** - * @param \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy $authorizationPolicy Required. Updated AuthorizationPolicy resource. - * @param \Google\Protobuf\FieldMask $updateMask Optional. Field mask is used to specify the fields to be overwritten in the - * AuthorizationPolicy resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * @return \Google\Cloud\NetworkSecurity\V1\UpdateAuthorizationPolicyRequest - * - * @experimental - */ - public static function build(\Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy $authorizationPolicy, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setAuthorizationPolicy($authorizationPolicy) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Optional. Field mask is used to specify the fields to be overwritten in the - * AuthorizationPolicy resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * @type \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy $authorization_policy - * Required. Updated AuthorizationPolicy resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networksecurity\V1\AuthorizationPolicy::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Field mask is used to specify the fields to be overwritten in the - * AuthorizationPolicy resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Optional. Field mask is used to specify the fields to be overwritten in the - * AuthorizationPolicy resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * Required. Updated AuthorizationPolicy resource. - * - * Generated from protobuf field .google.cloud.networksecurity.v1.AuthorizationPolicy authorization_policy = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy|null - */ - public function getAuthorizationPolicy() - { - return $this->authorization_policy; - } - - public function hasAuthorizationPolicy() - { - return isset($this->authorization_policy); - } - - public function clearAuthorizationPolicy() - { - unset($this->authorization_policy); - } - - /** - * Required. Updated AuthorizationPolicy resource. - * - * Generated from protobuf field .google.cloud.networksecurity.v1.AuthorizationPolicy authorization_policy = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy $var - * @return $this - */ - public function setAuthorizationPolicy($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy::class); - $this->authorization_policy = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateClientTlsPolicyRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateClientTlsPolicyRequest.php deleted file mode 100644 index aa872a5d72f3..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateClientTlsPolicyRequest.php +++ /dev/null @@ -1,161 +0,0 @@ -google.cloud.networksecurity.v1.UpdateClientTlsPolicyRequest - */ -class UpdateClientTlsPolicyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Field mask is used to specify the fields to be overwritten in the - * ClientTlsPolicy resource by the update. The fields - * specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the - * mask. If the user does not provide a mask then all fields will be - * overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $update_mask = null; - /** - * Required. Updated ClientTlsPolicy resource. - * - * Generated from protobuf field .google.cloud.networksecurity.v1.ClientTlsPolicy client_tls_policy = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $client_tls_policy = null; - - /** - * @param \Google\Cloud\NetworkSecurity\V1\ClientTlsPolicy $clientTlsPolicy Required. Updated ClientTlsPolicy resource. - * @param \Google\Protobuf\FieldMask $updateMask Optional. Field mask is used to specify the fields to be overwritten in the - * ClientTlsPolicy resource by the update. The fields - * specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the - * mask. If the user does not provide a mask then all fields will be - * overwritten. - * - * @return \Google\Cloud\NetworkSecurity\V1\UpdateClientTlsPolicyRequest - * - * @experimental - */ - public static function build(\Google\Cloud\NetworkSecurity\V1\ClientTlsPolicy $clientTlsPolicy, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setClientTlsPolicy($clientTlsPolicy) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Optional. Field mask is used to specify the fields to be overwritten in the - * ClientTlsPolicy resource by the update. The fields - * specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the - * mask. If the user does not provide a mask then all fields will be - * overwritten. - * @type \Google\Cloud\NetworkSecurity\V1\ClientTlsPolicy $client_tls_policy - * Required. Updated ClientTlsPolicy resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networksecurity\V1\ClientTlsPolicy::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Field mask is used to specify the fields to be overwritten in the - * ClientTlsPolicy resource by the update. The fields - * specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the - * mask. If the user does not provide a mask then all fields will be - * overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Optional. Field mask is used to specify the fields to be overwritten in the - * ClientTlsPolicy resource by the update. The fields - * specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the - * mask. If the user does not provide a mask then all fields will be - * overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * Required. Updated ClientTlsPolicy resource. - * - * Generated from protobuf field .google.cloud.networksecurity.v1.ClientTlsPolicy client_tls_policy = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\NetworkSecurity\V1\ClientTlsPolicy|null - */ - public function getClientTlsPolicy() - { - return $this->client_tls_policy; - } - - public function hasClientTlsPolicy() - { - return isset($this->client_tls_policy); - } - - public function clearClientTlsPolicy() - { - unset($this->client_tls_policy); - } - - /** - * Required. Updated ClientTlsPolicy resource. - * - * Generated from protobuf field .google.cloud.networksecurity.v1.ClientTlsPolicy client_tls_policy = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\NetworkSecurity\V1\ClientTlsPolicy $var - * @return $this - */ - public function setClientTlsPolicy($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\ClientTlsPolicy::class); - $this->client_tls_policy = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateServerTlsPolicyRequest.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateServerTlsPolicyRequest.php deleted file mode 100644 index e93610fbe81b..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/UpdateServerTlsPolicyRequest.php +++ /dev/null @@ -1,161 +0,0 @@ -google.cloud.networksecurity.v1.UpdateServerTlsPolicyRequest - */ -class UpdateServerTlsPolicyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Field mask is used to specify the fields to be overwritten in the - * ServerTlsPolicy resource by the update. The fields - * specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the - * mask. If the user does not provide a mask then all fields will be - * overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $update_mask = null; - /** - * Required. Updated ServerTlsPolicy resource. - * - * Generated from protobuf field .google.cloud.networksecurity.v1.ServerTlsPolicy server_tls_policy = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $server_tls_policy = null; - - /** - * @param \Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy $serverTlsPolicy Required. Updated ServerTlsPolicy resource. - * @param \Google\Protobuf\FieldMask $updateMask Optional. Field mask is used to specify the fields to be overwritten in the - * ServerTlsPolicy resource by the update. The fields - * specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the - * mask. If the user does not provide a mask then all fields will be - * overwritten. - * - * @return \Google\Cloud\NetworkSecurity\V1\UpdateServerTlsPolicyRequest - * - * @experimental - */ - public static function build(\Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy $serverTlsPolicy, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setServerTlsPolicy($serverTlsPolicy) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Optional. Field mask is used to specify the fields to be overwritten in the - * ServerTlsPolicy resource by the update. The fields - * specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the - * mask. If the user does not provide a mask then all fields will be - * overwritten. - * @type \Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy $server_tls_policy - * Required. Updated ServerTlsPolicy resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networksecurity\V1\ServerTlsPolicy::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Field mask is used to specify the fields to be overwritten in the - * ServerTlsPolicy resource by the update. The fields - * specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the - * mask. If the user does not provide a mask then all fields will be - * overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Optional. Field mask is used to specify the fields to be overwritten in the - * ServerTlsPolicy resource by the update. The fields - * specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the - * mask. If the user does not provide a mask then all fields will be - * overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * Required. Updated ServerTlsPolicy resource. - * - * Generated from protobuf field .google.cloud.networksecurity.v1.ServerTlsPolicy server_tls_policy = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy|null - */ - public function getServerTlsPolicy() - { - return $this->server_tls_policy; - } - - public function hasServerTlsPolicy() - { - return isset($this->server_tls_policy); - } - - public function clearServerTlsPolicy() - { - unset($this->server_tls_policy); - } - - /** - * Required. Updated ServerTlsPolicy resource. - * - * Generated from protobuf field .google.cloud.networksecurity.v1.ServerTlsPolicy server_tls_policy = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy $var - * @return $this - */ - public function setServerTlsPolicy($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy::class); - $this->server_tls_policy = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ValidationCA.php b/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ValidationCA.php deleted file mode 100644 index 83c8197bdee2..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/proto/src/Google/Cloud/NetworkSecurity/V1/ValidationCA.php +++ /dev/null @@ -1,118 +0,0 @@ -google.cloud.networksecurity.v1.ValidationCA - */ -class ValidationCA extends \Google\Protobuf\Internal\Message -{ - protected $type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\NetworkSecurity\V1\GrpcEndpoint $grpc_endpoint - * gRPC specific configuration to access the gRPC server to - * obtain the CA certificate. - * @type \Google\Cloud\NetworkSecurity\V1\CertificateProviderInstance $certificate_provider_instance - * The certificate provider instance specification that will be passed to - * the data plane, which will be used to load necessary credential - * information. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networksecurity\V1\Tls::initOnce(); - parent::__construct($data); - } - - /** - * gRPC specific configuration to access the gRPC server to - * obtain the CA certificate. - * - * Generated from protobuf field .google.cloud.networksecurity.v1.GrpcEndpoint grpc_endpoint = 2; - * @return \Google\Cloud\NetworkSecurity\V1\GrpcEndpoint|null - */ - public function getGrpcEndpoint() - { - return $this->readOneof(2); - } - - public function hasGrpcEndpoint() - { - return $this->hasOneof(2); - } - - /** - * gRPC specific configuration to access the gRPC server to - * obtain the CA certificate. - * - * Generated from protobuf field .google.cloud.networksecurity.v1.GrpcEndpoint grpc_endpoint = 2; - * @param \Google\Cloud\NetworkSecurity\V1\GrpcEndpoint $var - * @return $this - */ - public function setGrpcEndpoint($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\GrpcEndpoint::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * The certificate provider instance specification that will be passed to - * the data plane, which will be used to load necessary credential - * information. - * - * Generated from protobuf field .google.cloud.networksecurity.v1.CertificateProviderInstance certificate_provider_instance = 3; - * @return \Google\Cloud\NetworkSecurity\V1\CertificateProviderInstance|null - */ - public function getCertificateProviderInstance() - { - return $this->readOneof(3); - } - - public function hasCertificateProviderInstance() - { - return $this->hasOneof(3); - } - - /** - * The certificate provider instance specification that will be passed to - * the data plane, which will be used to load necessary credential - * information. - * - * Generated from protobuf field .google.cloud.networksecurity.v1.CertificateProviderInstance certificate_provider_instance = 3; - * @param \Google\Cloud\NetworkSecurity\V1\CertificateProviderInstance $var - * @return $this - */ - public function setCertificateProviderInstance($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkSecurity\V1\CertificateProviderInstance::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * @return string - */ - public function getType() - { - return $this->whichOneof("type"); - } - -} - diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/create_authorization_policy.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/create_authorization_policy.php deleted file mode 100644 index 8aab042afbcf..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/create_authorization_policy.php +++ /dev/null @@ -1,110 +0,0 @@ -`. - * @param int $authorizationPolicyAction The action to take when a rule match is found. Possible values - * are "ALLOW" or "DENY". - */ -function create_authorization_policy_sample( - string $formattedParent, - string $authorizationPolicyId, - string $authorizationPolicyName, - int $authorizationPolicyAction -): void { - // Create a client. - $networkSecurityClient = new NetworkSecurityClient(); - - // Prepare the request message. - $authorizationPolicy = (new AuthorizationPolicy()) - ->setName($authorizationPolicyName) - ->setAction($authorizationPolicyAction); - $request = (new CreateAuthorizationPolicyRequest()) - ->setParent($formattedParent) - ->setAuthorizationPolicyId($authorizationPolicyId) - ->setAuthorizationPolicy($authorizationPolicy); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $networkSecurityClient->createAuthorizationPolicy($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var AuthorizationPolicy $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = NetworkSecurityClient::locationName('[PROJECT]', '[LOCATION]'); - $authorizationPolicyId = '[AUTHORIZATION_POLICY_ID]'; - $authorizationPolicyName = '[NAME]'; - $authorizationPolicyAction = Action::ACTION_UNSPECIFIED; - - create_authorization_policy_sample( - $formattedParent, - $authorizationPolicyId, - $authorizationPolicyName, - $authorizationPolicyAction - ); -} -// [END networksecurity_v1_generated_NetworkSecurity_CreateAuthorizationPolicy_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/create_client_tls_policy.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/create_client_tls_policy.php deleted file mode 100644 index af2e77c799b6..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/create_client_tls_policy.php +++ /dev/null @@ -1,98 +0,0 @@ -setName($clientTlsPolicyName); - $request = (new CreateClientTlsPolicyRequest()) - ->setParent($formattedParent) - ->setClientTlsPolicyId($clientTlsPolicyId) - ->setClientTlsPolicy($clientTlsPolicy); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $networkSecurityClient->createClientTlsPolicy($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var ClientTlsPolicy $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = NetworkSecurityClient::locationName('[PROJECT]', '[LOCATION]'); - $clientTlsPolicyId = '[CLIENT_TLS_POLICY_ID]'; - $clientTlsPolicyName = '[NAME]'; - - create_client_tls_policy_sample($formattedParent, $clientTlsPolicyId, $clientTlsPolicyName); -} -// [END networksecurity_v1_generated_NetworkSecurity_CreateClientTlsPolicy_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/create_server_tls_policy.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/create_server_tls_policy.php deleted file mode 100644 index d242a080ffd8..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/create_server_tls_policy.php +++ /dev/null @@ -1,98 +0,0 @@ -setName($serverTlsPolicyName); - $request = (new CreateServerTlsPolicyRequest()) - ->setParent($formattedParent) - ->setServerTlsPolicyId($serverTlsPolicyId) - ->setServerTlsPolicy($serverTlsPolicy); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $networkSecurityClient->createServerTlsPolicy($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var ServerTlsPolicy $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = NetworkSecurityClient::locationName('[PROJECT]', '[LOCATION]'); - $serverTlsPolicyId = '[SERVER_TLS_POLICY_ID]'; - $serverTlsPolicyName = '[NAME]'; - - create_server_tls_policy_sample($formattedParent, $serverTlsPolicyId, $serverTlsPolicyName); -} -// [END networksecurity_v1_generated_NetworkSecurity_CreateServerTlsPolicy_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/delete_authorization_policy.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/delete_authorization_policy.php deleted file mode 100644 index a58f71e007df..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/delete_authorization_policy.php +++ /dev/null @@ -1,85 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $networkSecurityClient->deleteAuthorizationPolicy($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = NetworkSecurityClient::authorizationPolicyName( - '[PROJECT]', - '[LOCATION]', - '[AUTHORIZATION_POLICY]' - ); - - delete_authorization_policy_sample($formattedName); -} -// [END networksecurity_v1_generated_NetworkSecurity_DeleteAuthorizationPolicy_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/delete_client_tls_policy.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/delete_client_tls_policy.php deleted file mode 100644 index f85d452e25c7..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/delete_client_tls_policy.php +++ /dev/null @@ -1,85 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $networkSecurityClient->deleteClientTlsPolicy($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = NetworkSecurityClient::clientTlsPolicyName( - '[PROJECT]', - '[LOCATION]', - '[CLIENT_TLS_POLICY]' - ); - - delete_client_tls_policy_sample($formattedName); -} -// [END networksecurity_v1_generated_NetworkSecurity_DeleteClientTlsPolicy_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/delete_server_tls_policy.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/delete_server_tls_policy.php deleted file mode 100644 index 9baab29369b1..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/delete_server_tls_policy.php +++ /dev/null @@ -1,85 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $networkSecurityClient->deleteServerTlsPolicy($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = NetworkSecurityClient::serverTlsPolicyName( - '[PROJECT]', - '[LOCATION]', - '[SERVER_TLS_POLICY]' - ); - - delete_server_tls_policy_sample($formattedName); -} -// [END networksecurity_v1_generated_NetworkSecurity_DeleteServerTlsPolicy_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_authorization_policy.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_authorization_policy.php deleted file mode 100644 index 21e1b7b225f5..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_authorization_policy.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var AuthorizationPolicy $response */ - $response = $networkSecurityClient->getAuthorizationPolicy($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = NetworkSecurityClient::authorizationPolicyName( - '[PROJECT]', - '[LOCATION]', - '[AUTHORIZATION_POLICY]' - ); - - get_authorization_policy_sample($formattedName); -} -// [END networksecurity_v1_generated_NetworkSecurity_GetAuthorizationPolicy_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_client_tls_policy.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_client_tls_policy.php deleted file mode 100644 index bb357c1e3519..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_client_tls_policy.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var ClientTlsPolicy $response */ - $response = $networkSecurityClient->getClientTlsPolicy($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = NetworkSecurityClient::clientTlsPolicyName( - '[PROJECT]', - '[LOCATION]', - '[CLIENT_TLS_POLICY]' - ); - - get_client_tls_policy_sample($formattedName); -} -// [END networksecurity_v1_generated_NetworkSecurity_GetClientTlsPolicy_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_iam_policy.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_iam_policy.php deleted file mode 100644 index 2ebfa35aa7e6..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_iam_policy.php +++ /dev/null @@ -1,72 +0,0 @@ -setResource($resource); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $networkSecurityClient->getIamPolicy($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - - get_iam_policy_sample($resource); -} -// [END networksecurity_v1_generated_NetworkSecurity_GetIamPolicy_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_location.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_location.php deleted file mode 100644 index db5c0113c76a..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_location.php +++ /dev/null @@ -1,57 +0,0 @@ -getLocation($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END networksecurity_v1_generated_NetworkSecurity_GetLocation_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_server_tls_policy.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_server_tls_policy.php deleted file mode 100644 index 0a41bea6cc98..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/get_server_tls_policy.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var ServerTlsPolicy $response */ - $response = $networkSecurityClient->getServerTlsPolicy($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = NetworkSecurityClient::serverTlsPolicyName( - '[PROJECT]', - '[LOCATION]', - '[SERVER_TLS_POLICY]' - ); - - get_server_tls_policy_sample($formattedName); -} -// [END networksecurity_v1_generated_NetworkSecurity_GetServerTlsPolicy_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_authorization_policies.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_authorization_policies.php deleted file mode 100644 index 700bff4f8071..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_authorization_policies.php +++ /dev/null @@ -1,78 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $networkSecurityClient->listAuthorizationPolicies($request); - - /** @var AuthorizationPolicy $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = NetworkSecurityClient::locationName('[PROJECT]', '[LOCATION]'); - - list_authorization_policies_sample($formattedParent); -} -// [END networksecurity_v1_generated_NetworkSecurity_ListAuthorizationPolicies_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_client_tls_policies.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_client_tls_policies.php deleted file mode 100644 index 6a7041b1cdeb..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_client_tls_policies.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $networkSecurityClient->listClientTlsPolicies($request); - - /** @var ClientTlsPolicy $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = NetworkSecurityClient::locationName('[PROJECT]', '[LOCATION]'); - - list_client_tls_policies_sample($formattedParent); -} -// [END networksecurity_v1_generated_NetworkSecurity_ListClientTlsPolicies_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_locations.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_locations.php deleted file mode 100644 index cda36ef56eea..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_locations.php +++ /dev/null @@ -1,62 +0,0 @@ -listLocations($request); - - /** @var Location $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END networksecurity_v1_generated_NetworkSecurity_ListLocations_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_server_tls_policies.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_server_tls_policies.php deleted file mode 100644 index ae2ed36ab018..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/list_server_tls_policies.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $networkSecurityClient->listServerTlsPolicies($request); - - /** @var ServerTlsPolicy $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = NetworkSecurityClient::locationName('[PROJECT]', '[LOCATION]'); - - list_server_tls_policies_sample($formattedParent); -} -// [END networksecurity_v1_generated_NetworkSecurity_ListServerTlsPolicies_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/set_iam_policy.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/set_iam_policy.php deleted file mode 100644 index 007d006d4b92..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/set_iam_policy.php +++ /dev/null @@ -1,77 +0,0 @@ -setResource($resource) - ->setPolicy($policy); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $networkSecurityClient->setIamPolicy($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - - set_iam_policy_sample($resource); -} -// [END networksecurity_v1_generated_NetworkSecurity_SetIamPolicy_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/test_iam_permissions.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/test_iam_permissions.php deleted file mode 100644 index a80ff52d18ad..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/test_iam_permissions.php +++ /dev/null @@ -1,84 +0,0 @@ -setResource($resource) - ->setPermissions($permissions); - - // Call the API and handle any network failures. - try { - /** @var TestIamPermissionsResponse $response */ - $response = $networkSecurityClient->testIamPermissions($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - $permissionsElement = '[PERMISSIONS]'; - - test_iam_permissions_sample($resource, $permissionsElement); -} -// [END networksecurity_v1_generated_NetworkSecurity_TestIamPermissions_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/update_authorization_policy.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/update_authorization_policy.php deleted file mode 100644 index 254f14c4f0f9..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/update_authorization_policy.php +++ /dev/null @@ -1,92 +0,0 @@ -`. - * @param int $authorizationPolicyAction The action to take when a rule match is found. Possible values - * are "ALLOW" or "DENY". - */ -function update_authorization_policy_sample( - string $authorizationPolicyName, - int $authorizationPolicyAction -): void { - // Create a client. - $networkSecurityClient = new NetworkSecurityClient(); - - // Prepare the request message. - $authorizationPolicy = (new AuthorizationPolicy()) - ->setName($authorizationPolicyName) - ->setAction($authorizationPolicyAction); - $request = (new UpdateAuthorizationPolicyRequest()) - ->setAuthorizationPolicy($authorizationPolicy); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $networkSecurityClient->updateAuthorizationPolicy($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var AuthorizationPolicy $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $authorizationPolicyName = '[NAME]'; - $authorizationPolicyAction = Action::ACTION_UNSPECIFIED; - - update_authorization_policy_sample($authorizationPolicyName, $authorizationPolicyAction); -} -// [END networksecurity_v1_generated_NetworkSecurity_UpdateAuthorizationPolicy_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/update_client_tls_policy.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/update_client_tls_policy.php deleted file mode 100644 index e2578036f7ac..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/update_client_tls_policy.php +++ /dev/null @@ -1,85 +0,0 @@ -setName($clientTlsPolicyName); - $request = (new UpdateClientTlsPolicyRequest()) - ->setClientTlsPolicy($clientTlsPolicy); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $networkSecurityClient->updateClientTlsPolicy($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var ClientTlsPolicy $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $clientTlsPolicyName = '[NAME]'; - - update_client_tls_policy_sample($clientTlsPolicyName); -} -// [END networksecurity_v1_generated_NetworkSecurity_UpdateClientTlsPolicy_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/update_server_tls_policy.php b/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/update_server_tls_policy.php deleted file mode 100644 index e0d71e30161f..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/samples/V1/NetworkSecurityClient/update_server_tls_policy.php +++ /dev/null @@ -1,85 +0,0 @@ -setName($serverTlsPolicyName); - $request = (new UpdateServerTlsPolicyRequest()) - ->setServerTlsPolicy($serverTlsPolicy); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $networkSecurityClient->updateServerTlsPolicy($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var ServerTlsPolicy $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $serverTlsPolicyName = '[NAME]'; - - update_server_tls_policy_sample($serverTlsPolicyName); -} -// [END networksecurity_v1_generated_NetworkSecurity_UpdateServerTlsPolicy_sync] diff --git a/owl-bot-staging/NetworkSecurity/v1/src/V1/Client/NetworkSecurityClient.php b/owl-bot-staging/NetworkSecurity/v1/src/V1/Client/NetworkSecurityClient.php deleted file mode 100644 index e2149f4d8230..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/src/V1/Client/NetworkSecurityClient.php +++ /dev/null @@ -1,919 +0,0 @@ - createAuthorizationPolicyAsync(CreateAuthorizationPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface createClientTlsPolicyAsync(CreateClientTlsPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface createServerTlsPolicyAsync(CreateServerTlsPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteAuthorizationPolicyAsync(DeleteAuthorizationPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteClientTlsPolicyAsync(DeleteClientTlsPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteServerTlsPolicyAsync(DeleteServerTlsPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface getAuthorizationPolicyAsync(GetAuthorizationPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface getClientTlsPolicyAsync(GetClientTlsPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface getServerTlsPolicyAsync(GetServerTlsPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface listAuthorizationPoliciesAsync(ListAuthorizationPoliciesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listClientTlsPoliciesAsync(ListClientTlsPoliciesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listServerTlsPoliciesAsync(ListServerTlsPoliciesRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateAuthorizationPolicyAsync(UpdateAuthorizationPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateClientTlsPolicyAsync(UpdateClientTlsPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateServerTlsPolicyAsync(UpdateServerTlsPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) - * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) - */ -final class NetworkSecurityClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.networksecurity.v1.NetworkSecurity'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'networksecurity.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'networksecurity.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/network_security_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/network_security_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/network_security_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/network_security_rest_client_config.php', - ], - ], - ]; - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Create the default operation client for the service. - * - * @param array $options ClientOptions for the client. - * - * @return OperationsClient - */ - private function createOperationsClient(array $options) - { - // Unset client-specific configuration options - unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); - - if (isset($options['operationsClient'])) { - return $options['operationsClient']; - } - - return new OperationsClient($options); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * authorization_policy resource. - * - * @param string $project - * @param string $location - * @param string $authorizationPolicy - * - * @return string The formatted authorization_policy resource. - */ - public static function authorizationPolicyName(string $project, string $location, string $authorizationPolicy): string - { - return self::getPathTemplate('authorizationPolicy')->render([ - 'project' => $project, - 'location' => $location, - 'authorization_policy' => $authorizationPolicy, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * client_tls_policy resource. - * - * @param string $project - * @param string $location - * @param string $clientTlsPolicy - * - * @return string The formatted client_tls_policy resource. - */ - public static function clientTlsPolicyName(string $project, string $location, string $clientTlsPolicy): string - { - return self::getPathTemplate('clientTlsPolicy')->render([ - 'project' => $project, - 'location' => $location, - 'client_tls_policy' => $clientTlsPolicy, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a location - * resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted location resource. - */ - public static function locationName(string $project, string $location): string - { - return self::getPathTemplate('location')->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * server_tls_policy resource. - * - * @param string $project - * @param string $location - * @param string $serverTlsPolicy - * - * @return string The formatted server_tls_policy resource. - */ - public static function serverTlsPolicyName(string $project, string $location, string $serverTlsPolicy): string - { - return self::getPathTemplate('serverTlsPolicy')->render([ - 'project' => $project, - 'location' => $location, - 'server_tls_policy' => $serverTlsPolicy, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - authorizationPolicy: projects/{project}/locations/{location}/authorizationPolicies/{authorization_policy} - * - clientTlsPolicy: projects/{project}/locations/{location}/clientTlsPolicies/{client_tls_policy} - * - location: projects/{project}/locations/{location} - * - serverTlsPolicy: projects/{project}/locations/{location}/serverTlsPolicies/{server_tls_policy} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param ?string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, ?string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'networksecurity.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Creates a new AuthorizationPolicy in a given project and location. - * - * The async variant is - * {@see NetworkSecurityClient::createAuthorizationPolicyAsync()} . - * - * @example samples/V1/NetworkSecurityClient/create_authorization_policy.php - * - * @param CreateAuthorizationPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createAuthorizationPolicy(CreateAuthorizationPolicyRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateAuthorizationPolicy', $request, $callOptions)->wait(); - } - - /** - * Creates a new ClientTlsPolicy in a given project and location. - * - * The async variant is {@see NetworkSecurityClient::createClientTlsPolicyAsync()} - * . - * - * @example samples/V1/NetworkSecurityClient/create_client_tls_policy.php - * - * @param CreateClientTlsPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createClientTlsPolicy(CreateClientTlsPolicyRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateClientTlsPolicy', $request, $callOptions)->wait(); - } - - /** - * Creates a new ServerTlsPolicy in a given project and location. - * - * The async variant is {@see NetworkSecurityClient::createServerTlsPolicyAsync()} - * . - * - * @example samples/V1/NetworkSecurityClient/create_server_tls_policy.php - * - * @param CreateServerTlsPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createServerTlsPolicy(CreateServerTlsPolicyRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateServerTlsPolicy', $request, $callOptions)->wait(); - } - - /** - * Deletes a single AuthorizationPolicy. - * - * The async variant is - * {@see NetworkSecurityClient::deleteAuthorizationPolicyAsync()} . - * - * @example samples/V1/NetworkSecurityClient/delete_authorization_policy.php - * - * @param DeleteAuthorizationPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteAuthorizationPolicy(DeleteAuthorizationPolicyRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteAuthorizationPolicy', $request, $callOptions)->wait(); - } - - /** - * Deletes a single ClientTlsPolicy. - * - * The async variant is {@see NetworkSecurityClient::deleteClientTlsPolicyAsync()} - * . - * - * @example samples/V1/NetworkSecurityClient/delete_client_tls_policy.php - * - * @param DeleteClientTlsPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteClientTlsPolicy(DeleteClientTlsPolicyRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteClientTlsPolicy', $request, $callOptions)->wait(); - } - - /** - * Deletes a single ServerTlsPolicy. - * - * The async variant is {@see NetworkSecurityClient::deleteServerTlsPolicyAsync()} - * . - * - * @example samples/V1/NetworkSecurityClient/delete_server_tls_policy.php - * - * @param DeleteServerTlsPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteServerTlsPolicy(DeleteServerTlsPolicyRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteServerTlsPolicy', $request, $callOptions)->wait(); - } - - /** - * Gets details of a single AuthorizationPolicy. - * - * The async variant is {@see NetworkSecurityClient::getAuthorizationPolicyAsync()} - * . - * - * @example samples/V1/NetworkSecurityClient/get_authorization_policy.php - * - * @param GetAuthorizationPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return AuthorizationPolicy - * - * @throws ApiException Thrown if the API call fails. - */ - public function getAuthorizationPolicy(GetAuthorizationPolicyRequest $request, array $callOptions = []): AuthorizationPolicy - { - return $this->startApiCall('GetAuthorizationPolicy', $request, $callOptions)->wait(); - } - - /** - * Gets details of a single ClientTlsPolicy. - * - * The async variant is {@see NetworkSecurityClient::getClientTlsPolicyAsync()} . - * - * @example samples/V1/NetworkSecurityClient/get_client_tls_policy.php - * - * @param GetClientTlsPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return ClientTlsPolicy - * - * @throws ApiException Thrown if the API call fails. - */ - public function getClientTlsPolicy(GetClientTlsPolicyRequest $request, array $callOptions = []): ClientTlsPolicy - { - return $this->startApiCall('GetClientTlsPolicy', $request, $callOptions)->wait(); - } - - /** - * Gets details of a single ServerTlsPolicy. - * - * The async variant is {@see NetworkSecurityClient::getServerTlsPolicyAsync()} . - * - * @example samples/V1/NetworkSecurityClient/get_server_tls_policy.php - * - * @param GetServerTlsPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return ServerTlsPolicy - * - * @throws ApiException Thrown if the API call fails. - */ - public function getServerTlsPolicy(GetServerTlsPolicyRequest $request, array $callOptions = []): ServerTlsPolicy - { - return $this->startApiCall('GetServerTlsPolicy', $request, $callOptions)->wait(); - } - - /** - * Lists AuthorizationPolicies in a given project and location. - * - * The async variant is - * {@see NetworkSecurityClient::listAuthorizationPoliciesAsync()} . - * - * @example samples/V1/NetworkSecurityClient/list_authorization_policies.php - * - * @param ListAuthorizationPoliciesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listAuthorizationPolicies(ListAuthorizationPoliciesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListAuthorizationPolicies', $request, $callOptions); - } - - /** - * Lists ClientTlsPolicies in a given project and location. - * - * The async variant is {@see NetworkSecurityClient::listClientTlsPoliciesAsync()} - * . - * - * @example samples/V1/NetworkSecurityClient/list_client_tls_policies.php - * - * @param ListClientTlsPoliciesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listClientTlsPolicies(ListClientTlsPoliciesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListClientTlsPolicies', $request, $callOptions); - } - - /** - * Lists ServerTlsPolicies in a given project and location. - * - * The async variant is {@see NetworkSecurityClient::listServerTlsPoliciesAsync()} - * . - * - * @example samples/V1/NetworkSecurityClient/list_server_tls_policies.php - * - * @param ListServerTlsPoliciesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listServerTlsPolicies(ListServerTlsPoliciesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListServerTlsPolicies', $request, $callOptions); - } - - /** - * Updates the parameters of a single AuthorizationPolicy. - * - * The async variant is - * {@see NetworkSecurityClient::updateAuthorizationPolicyAsync()} . - * - * @example samples/V1/NetworkSecurityClient/update_authorization_policy.php - * - * @param UpdateAuthorizationPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateAuthorizationPolicy(UpdateAuthorizationPolicyRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateAuthorizationPolicy', $request, $callOptions)->wait(); - } - - /** - * Updates the parameters of a single ClientTlsPolicy. - * - * The async variant is {@see NetworkSecurityClient::updateClientTlsPolicyAsync()} - * . - * - * @example samples/V1/NetworkSecurityClient/update_client_tls_policy.php - * - * @param UpdateClientTlsPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateClientTlsPolicy(UpdateClientTlsPolicyRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateClientTlsPolicy', $request, $callOptions)->wait(); - } - - /** - * Updates the parameters of a single ServerTlsPolicy. - * - * The async variant is {@see NetworkSecurityClient::updateServerTlsPolicyAsync()} - * . - * - * @example samples/V1/NetworkSecurityClient/update_server_tls_policy.php - * - * @param UpdateServerTlsPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateServerTlsPolicy(UpdateServerTlsPolicyRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateServerTlsPolicy', $request, $callOptions)->wait(); - } - - /** - * Gets information about a location. - * - * The async variant is {@see NetworkSecurityClient::getLocationAsync()} . - * - * @example samples/V1/NetworkSecurityClient/get_location.php - * - * @param GetLocationRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Location - * - * @throws ApiException Thrown if the API call fails. - */ - public function getLocation(GetLocationRequest $request, array $callOptions = []): Location - { - return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * The async variant is {@see NetworkSecurityClient::listLocationsAsync()} . - * - * @example samples/V1/NetworkSecurityClient/list_locations.php - * - * @param ListLocationsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListLocations', $request, $callOptions); - } - - /** - * Gets the access control policy for a resource. Returns an empty policy - if the resource exists and does not have a policy set. - * - * The async variant is {@see NetworkSecurityClient::getIamPolicyAsync()} . - * - * @example samples/V1/NetworkSecurityClient/get_iam_policy.php - * - * @param GetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * Sets the access control policy on the specified resource. Replaces - any existing policy. - - Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` - errors. - * - * The async variant is {@see NetworkSecurityClient::setIamPolicyAsync()} . - * - * @example samples/V1/NetworkSecurityClient/set_iam_policy.php - * - * @param SetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * Returns permissions that a caller has on the specified resource. If the - resource does not exist, this will return an empty set of - permissions, not a `NOT_FOUND` error. - - Note: This operation is designed to be used for building - permission-aware UIs and command-line tools, not for authorization - checking. This operation may "fail open" without warning. - * - * The async variant is {@see NetworkSecurityClient::testIamPermissionsAsync()} . - * - * @example samples/V1/NetworkSecurityClient/test_iam_permissions.php - * - * @param TestIamPermissionsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return TestIamPermissionsResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse - { - return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/NetworkSecurity/v1/src/V1/gapic_metadata.json b/owl-bot-staging/NetworkSecurity/v1/src/V1/gapic_metadata.json deleted file mode 100644 index b76db28952f1..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/src/V1/gapic_metadata.json +++ /dev/null @@ -1,118 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.networksecurity.v1", - "libraryPackage": "Google\\Cloud\\NetworkSecurity\\V1", - "services": { - "NetworkSecurity": { - "clients": { - "grpc": { - "libraryClient": "NetworkSecurityGapicClient", - "rpcs": { - "CreateAuthorizationPolicy": { - "methods": [ - "createAuthorizationPolicy" - ] - }, - "CreateClientTlsPolicy": { - "methods": [ - "createClientTlsPolicy" - ] - }, - "CreateServerTlsPolicy": { - "methods": [ - "createServerTlsPolicy" - ] - }, - "DeleteAuthorizationPolicy": { - "methods": [ - "deleteAuthorizationPolicy" - ] - }, - "DeleteClientTlsPolicy": { - "methods": [ - "deleteClientTlsPolicy" - ] - }, - "DeleteServerTlsPolicy": { - "methods": [ - "deleteServerTlsPolicy" - ] - }, - "GetAuthorizationPolicy": { - "methods": [ - "getAuthorizationPolicy" - ] - }, - "GetClientTlsPolicy": { - "methods": [ - "getClientTlsPolicy" - ] - }, - "GetServerTlsPolicy": { - "methods": [ - "getServerTlsPolicy" - ] - }, - "ListAuthorizationPolicies": { - "methods": [ - "listAuthorizationPolicies" - ] - }, - "ListClientTlsPolicies": { - "methods": [ - "listClientTlsPolicies" - ] - }, - "ListServerTlsPolicies": { - "methods": [ - "listServerTlsPolicies" - ] - }, - "UpdateAuthorizationPolicy": { - "methods": [ - "updateAuthorizationPolicy" - ] - }, - "UpdateClientTlsPolicy": { - "methods": [ - "updateClientTlsPolicy" - ] - }, - "UpdateServerTlsPolicy": { - "methods": [ - "updateServerTlsPolicy" - ] - }, - "GetLocation": { - "methods": [ - "getLocation" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - }, - "GetIamPolicy": { - "methods": [ - "getIamPolicy" - ] - }, - "SetIamPolicy": { - "methods": [ - "setIamPolicy" - ] - }, - "TestIamPermissions": { - "methods": [ - "testIamPermissions" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/network_security_client_config.json b/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/network_security_client_config.json deleted file mode 100644 index b5df05cb5c82..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/network_security_client_config.json +++ /dev/null @@ -1,132 +0,0 @@ -{ - "interfaces": { - "google.cloud.networksecurity.v1.NetworkSecurity": { - "retry_codes": { - "no_retry_codes": [], - "no_retry_1_codes": [] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "no_retry_1_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": { - "CreateAuthorizationPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateClientTlsPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateServerTlsPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteAuthorizationPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteClientTlsPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteServerTlsPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetAuthorizationPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetClientTlsPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetServerTlsPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListAuthorizationPolicies": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListClientTlsPolicies": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListServerTlsPolicies": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateAuthorizationPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateClientTlsPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateServerTlsPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetLocation": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListLocations": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "SetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "TestIamPermissions": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/network_security_descriptor_config.php b/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/network_security_descriptor_config.php deleted file mode 100644 index 37aaa8d95d71..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/network_security_descriptor_config.php +++ /dev/null @@ -1,377 +0,0 @@ - [ - 'google.cloud.networksecurity.v1.NetworkSecurity' => [ - 'CreateAuthorizationPolicy' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy', - 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateClientTlsPolicy' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\ClientTlsPolicy', - 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateServerTlsPolicy' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy', - 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteAuthorizationPolicy' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteClientTlsPolicy' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteServerTlsPolicy' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateAuthorizationPolicy' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy', - 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'authorization_policy.name', - 'fieldAccessors' => [ - 'getAuthorizationPolicy', - 'getName', - ], - ], - ], - ], - 'UpdateClientTlsPolicy' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\ClientTlsPolicy', - 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'client_tls_policy.name', - 'fieldAccessors' => [ - 'getClientTlsPolicy', - 'getName', - ], - ], - ], - ], - 'UpdateServerTlsPolicy' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy', - 'metadataReturnType' => '\Google\Cloud\NetworkSecurity\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'server_tls_policy.name', - 'fieldAccessors' => [ - 'getServerTlsPolicy', - 'getName', - ], - ], - ], - ], - 'GetAuthorizationPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\NetworkSecurity\V1\AuthorizationPolicy', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetClientTlsPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\NetworkSecurity\V1\ClientTlsPolicy', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetServerTlsPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\NetworkSecurity\V1\ServerTlsPolicy', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListAuthorizationPolicies' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getAuthorizationPolicies', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\NetworkSecurity\V1\ListAuthorizationPoliciesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListClientTlsPolicies' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getClientTlsPolicies', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\NetworkSecurity\V1\ListClientTlsPoliciesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListServerTlsPolicies' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getServerTlsPolicies', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\NetworkSecurity\V1\ListServerTlsPoliciesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'GetLocation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Location\Location', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'ListLocations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLocations', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'GetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'SetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'TestIamPermissions' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'templateMap' => [ - 'authorizationPolicy' => 'projects/{project}/locations/{location}/authorizationPolicies/{authorization_policy}', - 'clientTlsPolicy' => 'projects/{project}/locations/{location}/clientTlsPolicies/{client_tls_policy}', - 'location' => 'projects/{project}/locations/{location}', - 'serverTlsPolicy' => 'projects/{project}/locations/{location}/serverTlsPolicies/{server_tls_policy}', - ], - ], - ], -]; diff --git a/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/network_security_rest_client_config.php b/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/network_security_rest_client_config.php deleted file mode 100644 index 0364328337cf..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/src/V1/resources/network_security_rest_client_config.php +++ /dev/null @@ -1,354 +0,0 @@ - [ - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.cloud.networksecurity.v1.NetworkSecurity' => [ - 'CreateAuthorizationPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/authorizationPolicies', - 'body' => 'authorization_policy', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'authorization_policy_id', - ], - ], - 'CreateClientTlsPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/clientTlsPolicies', - 'body' => 'client_tls_policy', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'client_tls_policy_id', - ], - ], - 'CreateServerTlsPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/serverTlsPolicies', - 'body' => 'server_tls_policy', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'server_tls_policy_id', - ], - ], - 'DeleteAuthorizationPolicy' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/authorizationPolicies/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteClientTlsPolicy' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/clientTlsPolicies/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteServerTlsPolicy' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/serverTlsPolicies/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetAuthorizationPolicy' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/authorizationPolicies/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetClientTlsPolicy' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/clientTlsPolicies/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetServerTlsPolicy' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/serverTlsPolicies/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListAuthorizationPolicies' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/authorizationPolicies', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListClientTlsPolicies' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/clientTlsPolicies', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListServerTlsPolicies' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/serverTlsPolicies', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateAuthorizationPolicy' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{authorization_policy.name=projects/*/locations/*/authorizationPolicies/*}', - 'body' => 'authorization_policy', - 'placeholders' => [ - 'authorization_policy.name' => [ - 'getters' => [ - 'getAuthorizationPolicy', - 'getName', - ], - ], - ], - ], - 'UpdateClientTlsPolicy' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{client_tls_policy.name=projects/*/locations/*/clientTlsPolicies/*}', - 'body' => 'client_tls_policy', - 'placeholders' => [ - 'client_tls_policy.name' => [ - 'getters' => [ - 'getClientTlsPolicy', - 'getName', - ], - ], - ], - ], - 'UpdateServerTlsPolicy' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{server_tls_policy.name=projects/*/locations/*/serverTlsPolicies/*}', - 'body' => 'server_tls_policy', - 'placeholders' => [ - 'server_tls_policy.name' => [ - 'getters' => [ - 'getServerTlsPolicy', - 'getName', - ], - ], - ], - ], - ], - 'google.iam.v1.IAMPolicy' => [ - 'GetIamPolicy' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authorizationPolicies/*}:getIamPolicy', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/serverTlsPolicies/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientTlsPolicies/*}:getIamPolicy', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authorizationPolicies/*}:setIamPolicy', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/serverTlsPolicies/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientTlsPolicies/*}:setIamPolicy', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/authorizationPolicies/*}:testIamPermissions', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/serverTlsPolicies/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/clientTlsPolicies/*}:testIamPermissions', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/NetworkSecurity/v1/tests/Unit/V1/Client/NetworkSecurityClientTest.php b/owl-bot-staging/NetworkSecurity/v1/tests/Unit/V1/Client/NetworkSecurityClientTest.php deleted file mode 100644 index d1106085d6f4..000000000000 --- a/owl-bot-staging/NetworkSecurity/v1/tests/Unit/V1/Client/NetworkSecurityClientTest.php +++ /dev/null @@ -1,2113 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return NetworkSecurityClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new NetworkSecurityClient($options); - } - - /** @test */ - public function createAuthorizationPolicyTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createAuthorizationPolicyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $expectedResponse = new AuthorizationPolicy(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createAuthorizationPolicyTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $authorizationPolicyId = 'authorizationPolicyId-730349822'; - $authorizationPolicy = new AuthorizationPolicy(); - $authorizationPolicyName = 'authorizationPolicyName276096054'; - $authorizationPolicy->setName($authorizationPolicyName); - $authorizationPolicyAction = Action::ACTION_UNSPECIFIED; - $authorizationPolicy->setAction($authorizationPolicyAction); - $request = (new CreateAuthorizationPolicyRequest()) - ->setParent($formattedParent) - ->setAuthorizationPolicyId($authorizationPolicyId) - ->setAuthorizationPolicy($authorizationPolicy); - $response = $gapicClient->createAuthorizationPolicy($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/CreateAuthorizationPolicy', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getAuthorizationPolicyId(); - $this->assertProtobufEquals($authorizationPolicyId, $actualValue); - $actualValue = $actualApiRequestObject->getAuthorizationPolicy(); - $this->assertProtobufEquals($authorizationPolicy, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createAuthorizationPolicyTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createAuthorizationPolicyExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createAuthorizationPolicyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $authorizationPolicyId = 'authorizationPolicyId-730349822'; - $authorizationPolicy = new AuthorizationPolicy(); - $authorizationPolicyName = 'authorizationPolicyName276096054'; - $authorizationPolicy->setName($authorizationPolicyName); - $authorizationPolicyAction = Action::ACTION_UNSPECIFIED; - $authorizationPolicy->setAction($authorizationPolicyAction); - $request = (new CreateAuthorizationPolicyRequest()) - ->setParent($formattedParent) - ->setAuthorizationPolicyId($authorizationPolicyId) - ->setAuthorizationPolicy($authorizationPolicy); - $response = $gapicClient->createAuthorizationPolicy($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createAuthorizationPolicyTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createClientTlsPolicyTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createClientTlsPolicyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $sni = 'sni114030'; - $expectedResponse = new ClientTlsPolicy(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setSni($sni); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createClientTlsPolicyTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $clientTlsPolicyId = 'clientTlsPolicyId244525968'; - $clientTlsPolicy = new ClientTlsPolicy(); - $clientTlsPolicyName = 'clientTlsPolicyName-1176139731'; - $clientTlsPolicy->setName($clientTlsPolicyName); - $request = (new CreateClientTlsPolicyRequest()) - ->setParent($formattedParent) - ->setClientTlsPolicyId($clientTlsPolicyId) - ->setClientTlsPolicy($clientTlsPolicy); - $response = $gapicClient->createClientTlsPolicy($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/CreateClientTlsPolicy', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getClientTlsPolicyId(); - $this->assertProtobufEquals($clientTlsPolicyId, $actualValue); - $actualValue = $actualApiRequestObject->getClientTlsPolicy(); - $this->assertProtobufEquals($clientTlsPolicy, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createClientTlsPolicyTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createClientTlsPolicyExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createClientTlsPolicyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $clientTlsPolicyId = 'clientTlsPolicyId244525968'; - $clientTlsPolicy = new ClientTlsPolicy(); - $clientTlsPolicyName = 'clientTlsPolicyName-1176139731'; - $clientTlsPolicy->setName($clientTlsPolicyName); - $request = (new CreateClientTlsPolicyRequest()) - ->setParent($formattedParent) - ->setClientTlsPolicyId($clientTlsPolicyId) - ->setClientTlsPolicy($clientTlsPolicy); - $response = $gapicClient->createClientTlsPolicy($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createClientTlsPolicyTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createServerTlsPolicyTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createServerTlsPolicyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $allowOpen = true; - $expectedResponse = new ServerTlsPolicy(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setAllowOpen($allowOpen); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createServerTlsPolicyTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $serverTlsPolicyId = 'serverTlsPolicyId-1952910072'; - $serverTlsPolicy = new ServerTlsPolicy(); - $serverTlsPolicyName = 'serverTlsPolicyName415543221'; - $serverTlsPolicy->setName($serverTlsPolicyName); - $request = (new CreateServerTlsPolicyRequest()) - ->setParent($formattedParent) - ->setServerTlsPolicyId($serverTlsPolicyId) - ->setServerTlsPolicy($serverTlsPolicy); - $response = $gapicClient->createServerTlsPolicy($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/CreateServerTlsPolicy', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getServerTlsPolicyId(); - $this->assertProtobufEquals($serverTlsPolicyId, $actualValue); - $actualValue = $actualApiRequestObject->getServerTlsPolicy(); - $this->assertProtobufEquals($serverTlsPolicy, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createServerTlsPolicyTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createServerTlsPolicyExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createServerTlsPolicyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $serverTlsPolicyId = 'serverTlsPolicyId-1952910072'; - $serverTlsPolicy = new ServerTlsPolicy(); - $serverTlsPolicyName = 'serverTlsPolicyName415543221'; - $serverTlsPolicy->setName($serverTlsPolicyName); - $request = (new CreateServerTlsPolicyRequest()) - ->setParent($formattedParent) - ->setServerTlsPolicyId($serverTlsPolicyId) - ->setServerTlsPolicy($serverTlsPolicy); - $response = $gapicClient->createServerTlsPolicy($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createServerTlsPolicyTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteAuthorizationPolicyTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteAuthorizationPolicyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteAuthorizationPolicyTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->authorizationPolicyName('[PROJECT]', '[LOCATION]', '[AUTHORIZATION_POLICY]'); - $request = (new DeleteAuthorizationPolicyRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteAuthorizationPolicy($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/DeleteAuthorizationPolicy', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteAuthorizationPolicyTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteAuthorizationPolicyExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteAuthorizationPolicyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->authorizationPolicyName('[PROJECT]', '[LOCATION]', '[AUTHORIZATION_POLICY]'); - $request = (new DeleteAuthorizationPolicyRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteAuthorizationPolicy($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteAuthorizationPolicyTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteClientTlsPolicyTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteClientTlsPolicyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteClientTlsPolicyTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->clientTlsPolicyName('[PROJECT]', '[LOCATION]', '[CLIENT_TLS_POLICY]'); - $request = (new DeleteClientTlsPolicyRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteClientTlsPolicy($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/DeleteClientTlsPolicy', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteClientTlsPolicyTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteClientTlsPolicyExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteClientTlsPolicyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->clientTlsPolicyName('[PROJECT]', '[LOCATION]', '[CLIENT_TLS_POLICY]'); - $request = (new DeleteClientTlsPolicyRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteClientTlsPolicy($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteClientTlsPolicyTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteServerTlsPolicyTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteServerTlsPolicyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteServerTlsPolicyTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->serverTlsPolicyName('[PROJECT]', '[LOCATION]', '[SERVER_TLS_POLICY]'); - $request = (new DeleteServerTlsPolicyRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteServerTlsPolicy($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/DeleteServerTlsPolicy', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteServerTlsPolicyTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteServerTlsPolicyExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteServerTlsPolicyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->serverTlsPolicyName('[PROJECT]', '[LOCATION]', '[SERVER_TLS_POLICY]'); - $request = (new DeleteServerTlsPolicyRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteServerTlsPolicy($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteServerTlsPolicyTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getAuthorizationPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $expectedResponse = new AuthorizationPolicy(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->authorizationPolicyName('[PROJECT]', '[LOCATION]', '[AUTHORIZATION_POLICY]'); - $request = (new GetAuthorizationPolicyRequest()) - ->setName($formattedName); - $response = $gapicClient->getAuthorizationPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/GetAuthorizationPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAuthorizationPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->authorizationPolicyName('[PROJECT]', '[LOCATION]', '[AUTHORIZATION_POLICY]'); - $request = (new GetAuthorizationPolicyRequest()) - ->setName($formattedName); - try { - $gapicClient->getAuthorizationPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getClientTlsPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $sni = 'sni114030'; - $expectedResponse = new ClientTlsPolicy(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setSni($sni); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->clientTlsPolicyName('[PROJECT]', '[LOCATION]', '[CLIENT_TLS_POLICY]'); - $request = (new GetClientTlsPolicyRequest()) - ->setName($formattedName); - $response = $gapicClient->getClientTlsPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/GetClientTlsPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getClientTlsPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->clientTlsPolicyName('[PROJECT]', '[LOCATION]', '[CLIENT_TLS_POLICY]'); - $request = (new GetClientTlsPolicyRequest()) - ->setName($formattedName); - try { - $gapicClient->getClientTlsPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getServerTlsPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $allowOpen = true; - $expectedResponse = new ServerTlsPolicy(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setAllowOpen($allowOpen); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->serverTlsPolicyName('[PROJECT]', '[LOCATION]', '[SERVER_TLS_POLICY]'); - $request = (new GetServerTlsPolicyRequest()) - ->setName($formattedName); - $response = $gapicClient->getServerTlsPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/GetServerTlsPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getServerTlsPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->serverTlsPolicyName('[PROJECT]', '[LOCATION]', '[SERVER_TLS_POLICY]'); - $request = (new GetServerTlsPolicyRequest()) - ->setName($formattedName); - try { - $gapicClient->getServerTlsPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAuthorizationPoliciesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $authorizationPoliciesElement = new AuthorizationPolicy(); - $authorizationPolicies = [ - $authorizationPoliciesElement, - ]; - $expectedResponse = new ListAuthorizationPoliciesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setAuthorizationPolicies($authorizationPolicies); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListAuthorizationPoliciesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listAuthorizationPolicies($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getAuthorizationPolicies()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/ListAuthorizationPolicies', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAuthorizationPoliciesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListAuthorizationPoliciesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listAuthorizationPolicies($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listClientTlsPoliciesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $clientTlsPoliciesElement = new ClientTlsPolicy(); - $clientTlsPolicies = [ - $clientTlsPoliciesElement, - ]; - $expectedResponse = new ListClientTlsPoliciesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setClientTlsPolicies($clientTlsPolicies); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListClientTlsPoliciesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listClientTlsPolicies($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getClientTlsPolicies()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/ListClientTlsPolicies', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listClientTlsPoliciesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListClientTlsPoliciesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listClientTlsPolicies($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listServerTlsPoliciesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $serverTlsPoliciesElement = new ServerTlsPolicy(); - $serverTlsPolicies = [ - $serverTlsPoliciesElement, - ]; - $expectedResponse = new ListServerTlsPoliciesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setServerTlsPolicies($serverTlsPolicies); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListServerTlsPoliciesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listServerTlsPolicies($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getServerTlsPolicies()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/ListServerTlsPolicies', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listServerTlsPoliciesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListServerTlsPoliciesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listServerTlsPolicies($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateAuthorizationPolicyTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateAuthorizationPolicyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $expectedResponse = new AuthorizationPolicy(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateAuthorizationPolicyTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $authorizationPolicy = new AuthorizationPolicy(); - $authorizationPolicyName = 'authorizationPolicyName276096054'; - $authorizationPolicy->setName($authorizationPolicyName); - $authorizationPolicyAction = Action::ACTION_UNSPECIFIED; - $authorizationPolicy->setAction($authorizationPolicyAction); - $request = (new UpdateAuthorizationPolicyRequest()) - ->setAuthorizationPolicy($authorizationPolicy); - $response = $gapicClient->updateAuthorizationPolicy($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/UpdateAuthorizationPolicy', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getAuthorizationPolicy(); - $this->assertProtobufEquals($authorizationPolicy, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateAuthorizationPolicyTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateAuthorizationPolicyExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateAuthorizationPolicyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $authorizationPolicy = new AuthorizationPolicy(); - $authorizationPolicyName = 'authorizationPolicyName276096054'; - $authorizationPolicy->setName($authorizationPolicyName); - $authorizationPolicyAction = Action::ACTION_UNSPECIFIED; - $authorizationPolicy->setAction($authorizationPolicyAction); - $request = (new UpdateAuthorizationPolicyRequest()) - ->setAuthorizationPolicy($authorizationPolicy); - $response = $gapicClient->updateAuthorizationPolicy($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateAuthorizationPolicyTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateClientTlsPolicyTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateClientTlsPolicyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $sni = 'sni114030'; - $expectedResponse = new ClientTlsPolicy(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setSni($sni); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateClientTlsPolicyTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $clientTlsPolicy = new ClientTlsPolicy(); - $clientTlsPolicyName = 'clientTlsPolicyName-1176139731'; - $clientTlsPolicy->setName($clientTlsPolicyName); - $request = (new UpdateClientTlsPolicyRequest()) - ->setClientTlsPolicy($clientTlsPolicy); - $response = $gapicClient->updateClientTlsPolicy($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/UpdateClientTlsPolicy', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getClientTlsPolicy(); - $this->assertProtobufEquals($clientTlsPolicy, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateClientTlsPolicyTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateClientTlsPolicyExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateClientTlsPolicyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $clientTlsPolicy = new ClientTlsPolicy(); - $clientTlsPolicyName = 'clientTlsPolicyName-1176139731'; - $clientTlsPolicy->setName($clientTlsPolicyName); - $request = (new UpdateClientTlsPolicyRequest()) - ->setClientTlsPolicy($clientTlsPolicy); - $response = $gapicClient->updateClientTlsPolicy($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateClientTlsPolicyTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateServerTlsPolicyTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateServerTlsPolicyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $allowOpen = true; - $expectedResponse = new ServerTlsPolicy(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setAllowOpen($allowOpen); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateServerTlsPolicyTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $serverTlsPolicy = new ServerTlsPolicy(); - $serverTlsPolicyName = 'serverTlsPolicyName415543221'; - $serverTlsPolicy->setName($serverTlsPolicyName); - $request = (new UpdateServerTlsPolicyRequest()) - ->setServerTlsPolicy($serverTlsPolicy); - $response = $gapicClient->updateServerTlsPolicy($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/UpdateServerTlsPolicy', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getServerTlsPolicy(); - $this->assertProtobufEquals($serverTlsPolicy, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateServerTlsPolicyTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateServerTlsPolicyExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateServerTlsPolicyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $serverTlsPolicy = new ServerTlsPolicy(); - $serverTlsPolicyName = 'serverTlsPolicyName415543221'; - $serverTlsPolicy->setName($serverTlsPolicyName); - $request = (new UpdateServerTlsPolicyRequest()) - ->setServerTlsPolicy($serverTlsPolicy); - $response = $gapicClient->updateServerTlsPolicy($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateServerTlsPolicyTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getLocationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $locationId = 'locationId552319461'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Location(); - $expectedResponse->setName($name2); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - $request = new GetLocationRequest(); - $response = $gapicClient->getLocation($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new GetLocationRequest(); - try { - $gapicClient->getLocation($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $locationsElement = new Location(); - $locations = [ - $locationsElement, - ]; - $expectedResponse = new ListLocationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLocations($locations); - $transport->addResponse($expectedResponse); - $request = new ListLocationsRequest(); - $response = $gapicClient->listLocations($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new ListLocationsRequest(); - try { - $gapicClient->listLocations($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); - $response = $gapicClient->getIamPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); - try { - $gapicClient->getIamPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); - $response = $gapicClient->setIamPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPolicy(); - $this->assertProtobufEquals($policy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); - try { - $gapicClient->setIamPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new TestIamPermissionsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); - $response = $gapicClient->testIamPermissions($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPermissions(); - $this->assertProtobufEquals($permissions, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); - try { - $gapicClient->testIamPermissions($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createAuthorizationPolicyAsyncTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createAuthorizationPolicyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $expectedResponse = new AuthorizationPolicy(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createAuthorizationPolicyTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $authorizationPolicyId = 'authorizationPolicyId-730349822'; - $authorizationPolicy = new AuthorizationPolicy(); - $authorizationPolicyName = 'authorizationPolicyName276096054'; - $authorizationPolicy->setName($authorizationPolicyName); - $authorizationPolicyAction = Action::ACTION_UNSPECIFIED; - $authorizationPolicy->setAction($authorizationPolicyAction); - $request = (new CreateAuthorizationPolicyRequest()) - ->setParent($formattedParent) - ->setAuthorizationPolicyId($authorizationPolicyId) - ->setAuthorizationPolicy($authorizationPolicy); - $response = $gapicClient->createAuthorizationPolicyAsync($request)->wait(); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networksecurity.v1.NetworkSecurity/CreateAuthorizationPolicy', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getAuthorizationPolicyId(); - $this->assertProtobufEquals($authorizationPolicyId, $actualValue); - $actualValue = $actualApiRequestObject->getAuthorizationPolicy(); - $this->assertProtobufEquals($authorizationPolicy, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createAuthorizationPolicyTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } -} diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/GPBMetadata/Google/Cloud/Networkservices/V1/Common.php b/owl-bot-staging/NetworkServices/v1/proto/src/GPBMetadata/Google/Cloud/Networkservices/V1/Common.php deleted file mode 100644 index ced22555a28e0bda23dd6e53811e2908d4937469..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1930 zcmcIl+iu%N5RD|qiC3-TFhL@yD6*9UL8zeCpyz5FsBAY2?s=3QBzXlgwuqPl+FabiHajjRRLu7U0C;FmR!{ zg;UJL_F>3m{<}D5HBL$*%V7@!0X!hS-Gj*GG!%@FrKw@eKoo^czBIS8un8QU;%3Ux zFs_i?#e&ChK03x6M9hO7#XA8wE&ka{YG#Ji-lO1q9XKHi%D7>iWpxI!%(Y0&qOvK1 z%){lrsvu9kqgnc<=M~xRNo_O>ehJ%0==~ac{BJ~|JxHx}B_aKig!Dzbo*A^1hGZvN zA}5^6s_{!1-98KxCCjens?wgJs>?yD+ez$eC0uG&x9fTqEeF$!>^qge%!<}VHzDv+ zm-0Vzxr0^(;Zg;)igZ{@ac-lP1@K92;HwyR07P@0`GM!R)%(yrLA6%(VO+(j1`5wva zD=D*5nFlN}uq;hq53X6W8LyN!-dCg3~s^du`=KQG(onxtPs)blnB6SOSM z^K13rE9maBBkk7``g$1!M_x5~?t=DZIl6U`NK`A!>Q%R`{~>f# z@1pe!1&Or#2&Fwprlm?-X{xNr_NNC6;>RFaWoj!oD5_roQ3WqDdV;n_eaq~bmgx-5 zPJif(Oso6c>Ao0P{TBn%`QhMb-0u$d2L0Z~HSJ5ZmY$mjFE>i(UWdbta%UZVk!iyb z??UK&ETK&~@1Lgp-{sUw$h;*jGzL zS4%|CmdH`Ii1g$3AGw8{?U{Vh16vi+Vj$vE^GK}N)WL3?Mr;m!k_c$Hn S=cfK=C%&>w=kh5!Md%Y%t$Vuw diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/GPBMetadata/Google/Cloud/Networkservices/V1/Dep.php b/owl-bot-staging/NetworkServices/v1/proto/src/GPBMetadata/Google/Cloud/Networkservices/V1/Dep.php deleted file mode 100644 index 42c11411c28f82972ec10af861f1f0e4e725d52b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9040 zcmeHN&2QVt6))x3vB%v+nS5C5O=7N+MI0lMU}cLm%6hl7r8q`q*_9Pzw-8ED)W~K- zlU$Or*A0AVfue`)t>>Ql1#D5EK)dKa&_m%KT67N!!2I*DzS*G`J^G&4`qLs$c}6Kwr-npz13_ISJv%4 z$1sVTk>$dMT;8b4#ll+kbujhpmaCJzykpxtCduli-D+el;vd-VQ;)d&hEBZf{$jR4 zoJ`;qAxqmMo}=kRUfonqpZtMZvbbeEuY+6BoS%Lb0E7mI2u_THXt4L*Izwszc>Wf|5^ZNs5SG91VucM2_L zJNVS0DQtRi&+!jOFb(!(tGP z@WR|z5F%m?UTRDp1IG`BbsWwU_?*3q&UH?OUqk0~Vyff=2R5CC+ZN&Mza=ykdWeJI z3YyYd{;usB{$UV%0F8t%p|iYn!oowq)=<)GIgaf@omR;{FxN|+fw<1)7W&6UhgT0B zLIaU-7M-P=X1Dy*cmVmU!h_hTBXo*gO_l+XHx=X30KjCsnv|v#-+i%WOB~xB}CEo#?)oea8Pf z%9^&$%60ac_!Ay>@exeSy6Q8QLMn6NI$F3GGd732AEtjJq3b2X^SjsORml4-D28|q zO*onhNyr7_0qoPilzVuDP$3r`ZHK5Hw7Ef=j5CtWAQU|J?Wd5Wp>Rm}BARF#CbX^~ z7hFvwd>KvJE+nj4KMXX0r|b_TG}ki}&w&P$;0n+y1~3moqbhq(Fk*<5!87Q*1<SdT!f^oI#Fw-TsQ_uh)hPH}5* zqM0~kRiklI9ujyPU5XnOZ24&Lv*eyb$Ype;6Edz$L%I0#cYpWkWMWcE{~pNkBv9Ml zXq*T#Z72e^#|d)Sm@@A63W+rYqcAEiB$g8$A$?staw|6&P;tRM-7EtVfavHY=wqL(dv2il5d zC*Zg|c&Y5PWQEeD>})TS7t9D_y<9T-DE(^*U1fD8;!~*TYNSBk4+`WW9y+}LYI*#= zgs$}ngBQm#g0?}8fFw%e;?U_aWMS0NY)}|GK^7PnJCuYYJT!sQ-%OxuqA12sbZVQK z4qA-}nvrr?LC}*$5$DBlc);W8MocL@1|o=37>~hdg)lxCRt8Ten3y8?9SBAg!T4ZK zhdF%<;KC2-ky)Ho@hrMh+%A@@YW2O%qWYw~wOL$Qd$d+8BtHjz;rUAOD^H4BRrPUE zDHJPPNeL&>=f%V2jlz4$1QgF?rMR`ZQQj(sJU5oUGzn7_q?V8xYw#&mzcx#>hSUOf}w_>kkE`+1R?=jDn zdu-e8#GN%_AA&9i0Bxj4-S&L!!3KW}unDmp0k&SI1H$&J;b4D!mLMb8aBLLUSbU@&|V`Twd=6AV}{K1cCnc$}k97nje6kA{n8XgGz zM-YzK4s8J8h_w^J_P>?xVa~M?G^AY{@8d5Frj4Bi*~7n;(8ZV@4?h&i-}Blf#!3V? zd~1;|v}>Y>=H(j}2_*}P_@e~6B4n-eHSQ01yrGDxj~f0I()x{<<8~Y~vnNvMb{>DI z5Jnye8T@j3v>ndJw6pjpfRoU%p>c{g91y3U4T013ZZz&hmG5i0$3poc!1d9+&agdT zPb^X|By>dxSEtDUjEXlL5UKY^*1P))j4H#X&urybx&HFY@;@k94Y+0RCnw93(3fsfRo|4py3RyL{B8$#^gDL+EpiT&Mo9>&Zunxz*rnkjx7G8YEL@UxV-_*vo7$9*Yq*{=ta&VnmFo!6zdx5^3fp spAY=x^ASh+{PtpfBB)IFZiPQP-(jC*w0*(R^XrXZB>T$Z2pu8xAC@>P!2kdN diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/GPBMetadata/Google/Cloud/Networkservices/V1/EndpointPolicy.php b/owl-bot-staging/NetworkServices/v1/proto/src/GPBMetadata/Google/Cloud/Networkservices/V1/EndpointPolicy.php deleted file mode 100644 index 6d16490baf6516f855ead7843eadb90caae3c517..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3659 zcmb_fO>g5=6eVdpkQX{_4I@GasgF#h=}1#&S~>{16qK(<88wL~O{*!2upH;5HFa!b zzZ5c6V1dK}_!TVqDXiJBW8I%HE3V(O-8f0rq?&GOIrrndbMHI%`pd8FGaEg^C1Mgs zrKF8peN4{?wjGOFnq}ZtuhSt8)~v3r8^jSYF4SnE8h=flq>(n3_ z&9Hjyj7jJZmUHeB=R((ro4MG^5VLJtx=9t=GIXskvJ42BYL~dSsu5h0a}`3>wo27z zi3MxsySjmA;xVxJyWB)Wn#~vW@=>P3Fa|9+jZLlLiTWgPWCtgewt;I630}HW`VexqubPS zWH6PaQ$j;#y*C?A{Ip&;y@NM6MoAh2xreFKBg5G-b_ne`<}SnS1sH@+%?aFPZN0g# z6Qi9YXX=G+Ig)gJs_P&(xz>qa*r~m4DpoUZb-R{1efp4B2EU@Z=XdaJ=+IYG?b?%l zSuHoef_`L`%eLELq4uHAH$rMXq93DwAE4)VYH(qVyNT>xh$Htxyx3a(*pI8)ddBfd z=a*yk>1`?DRsyrWb#MdO#e%lXbiC>-UEt5R@Udh<3mTBb4bp$ShwewOl(2&4y(^lE z;n+qZH}_vQF6^MB<`7T|#q&?a;g{t0s^}jy2rh;d@Vw?cubvH;+xMEA&Pzu347EiJ zH#LvvAkA)&<|aPHD1PyPc^6IU^gSFg;RwyszD-gK0O0<1Zq|6w@C}H>NqL1nRD1Ny za`e|AJC^CoTZqNLt^r7gDlRdI2AY*ZEb7j!Q5)P_2IoWHmvfs!$+jUUXI8(?x^AAI= zZldH+zX(Y*cTW1e^@T;WaG@GK-tP%1{zWYPEfU7tL0Ct)SS`r4aQhP{c^Fe{0`i!#lv!;n9tS~xn6s9vK$kZP_k5)^U7hdeq5|C$EBaHvX^Kx zY#BaFM_VR}KzIT7?>i``o4NF#1{uTBSWm*c;BgSnW5%WqGx{>@GMi1)LHhR?dU&9_ zG?D^L>*V_$h^tUU_iWXH3i#^q9Ms`WHY3akc?BhG^^_p-(2Gac#?ViSPogM2`Sa0huQonOl20a>l;!5n3|IkFczGz&Hv|=MrfJrAj2q zNI&2sAJIymjTsA={s&0UGkJ|d3X;4f($|m>C9ALKZN|Q@@)fi+V!-M!JC{s!(tpCS zj+p*WKGyYk@CFuZs7XU5TnV_~OaRHp(X0jMAY15R0R)Yb$r#^8eRIDqphqC}w>4z$ zgD3{sTQ=p`Hx)kkf~^8(#;G;7Zo@o*jeA5m?AGqso4?{~CAMmdYAMg2kUrX(}aEeDxT(HB#Fh5q>(_91V-84Vs{#VjcFw~Xm5KINYsLtiO3 PexWc+{v9zu1BCtu@jv!t diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/GPBMetadata/Google/Cloud/Networkservices/V1/Gateway.php b/owl-bot-staging/NetworkServices/v1/proto/src/GPBMetadata/Google/Cloud/Networkservices/V1/Gateway.php deleted file mode 100644 index 47966104bb94cfe9dd1bbd42fb30280ea9bcfbfc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2567 zcmbtW!EW0|5Upg%iAHs6vu>mM&}@~UQGl9)(;Nyqb}PxWY9N+XTXv8_06|eJnH5d4 z+?7)`)gSardg*`kD|!wP^xjivmrKT$ZA3wI5wV$}{wJ@+@f(H0rl9;4`c)pjuU9qtA` z5e^5wLn{wSj45pIhXFFMMUu4If)pgAyXSKn`L@^Hq0EWgkOxs4O$}p6c}k@?sXSC+ z1)Mt|l{iPkxRT@+;nA30j7~^I`8e`7W!?f{nm%=}A*~j=-CdV@{W?9h&)pz0j5oJ> z19Fq=Ayt)}+bg9*M%}mBX#R+)Z^uO)aQiI0-dC1jecM%p*ZTdG-(A#WC1phL^8j8i z!TLK1QM((P>r%J+jBfSwjkV7eo*lZ?NO2U4crDSqlr-w1IuP_*XUK%IQ0Udvf+yFF z4a)!K;Fc1zwgNfP6{QTxR0{Qle`;CnGbk|X4J^;~N2R6Yd_j8*MJJ-z1eO3SW${h% z(VDLAl0?%}as`_78i&|t%4=ahuRU1w>>l-4DMuDC%;O}?O_b^CLi$tbX8Jsuhy*fP z35tEyG1zpad~%_T_C4hIB&4N9Jo@O-`rIKp=p?Z7ng;nWh&U@1G0S{R-=~mgPJpnt zWu!%Mt%RN{{I{fvbs946N|a)Zwi9Qaw$pUf|&P3w%6F9;eCB#j{~N zF{kC<;ghE>;|hu$(qG2dfZ8@JhIT}KuH>g9SO3*2+Po>PKq0h;)M7Yur5;5^Kpyd6 zME#ObTcJFH)yvUYh$&OefZHlVh6xCnRp!-zb_YK8>95?n5KJ^gq5LDPG;tuuH%~75 zGd)&eo(ut?e+;xi6>A>m^^(dz^*}PX->aR0!4;$odlBs{FqPE4C zyq)=JKb~R9Hvn5~7+hIiu>Ej0<{Tq7et*0J(?Wuo2&pqeTdrp13D+%#6u?rVG+I_!$@Ap1;AI&>m2X4r9 zVi8xRM3;AZGVK!CacydAwkhxU?KW{`&E9hilek4$Ufht^H@4*3;>y;?DC*h1tC6zY zvF(mYN}6f=ddVX6rS0x|#N9VE;+6JiN*&kH6xa4CDROWCOWh-$qiRI1H>zuds=7+m zR-NOt78p)z{U}cB*~}b(W~!bi*AcJD;NUgL_~-aLrlH9mRVn_vX?TiZ8Prfs<9jsg zvD{WokD&C)y=~vps9{?&6WFjcQn(`vOt$x?VRO)*Hmx!f5>hb7(`Uv zb557#-n;k22z*u1^~g0#7|(@>Oh)Z(`1?b+KWHFJ*M&rphko%`=oj~Aa@PV#)iFwL zz_3Vy+(*F@PYH~wk{-|)tcPh8t+$zTl|3XY*b$swigwVD5wRiv<7G%k$s%2XVU~B< zgq$d(t3&@(lF~G!Jz};M)3A24ZkS z!AuUMhWe9w3L~bvLrgC_EDzx^Uxde;MQSlJskq7oYZi5TOofD$g^V8LBnD(Q6`GV_ zrgm+Q^2(DP!IJ_C=3oTFs7t(Tnt%KhVcu14!HwhI6vm??y&{&x(i#d$U%^-h?R}~C zyex3>A{Q^fC+`uj3o&UKQm${}>7(5EhXWYTOJEa)xi52Xl90ht+O_pHm1Lxof`l+hEm)@2tn;N80UpNsO&r_0uGUNzO=`W&oajcD>6)Ksz(%$SRR(-eS%I- z6vjB>@`X2vM1CHI*%{ImnA&>Ls43g)n~mDS%F;@0aq5DUhE(l&WnpWIIZ$fW>f5W8 zrc!&}Xx272S2otClGRIaQ8{`>?#~2dmWiqp_q21*CLhs=a{I+5l;C8eVac zf$_*@(CUuu3SBd^=Z3B@uw`a#jzWqbBt3vk+jvEEC2qvE(1@r|haFldb``)OIJsF= z?TF%@;;_|87*}F&)d|QbhdXm<5Z8fK*)FAy!loJDDAtXoaw{=#y|lc&PnEqx8+ zu>cXGgXK^xpn2d)I!w1&OyRg01eN0OsNz*1Gdmypp^r{>S}=)IN-)ZrFwVQ!BUm3k z+r2^nEfqus%8YTTLE37Jb`F{QB?0NE-AGSibdR+d#zhqn!B9`lJg+AF;d zejSudTjM1TzlA>!_=Sh-hF^JOblGj?Apb)GK3Fw88VxXBlYHl6*}_3$#8F+$NS;jT z>U~}s?@IkEcL~xCrnBPVrAJgpNy0p5pQw#hRCK1i3)9Cn@ElAfBFzU)oa-8T_HO^4 zm9D}?i@c&r>`YE|ej6^=@nRJ67~1^g$UGWY+`l{We8Ms>WFJ_o=P-?p zg-~)rsdIX(`fmbmV4HtmJXI&7lN;>1-AH`1Cdy}U`Czkm$3F4QfO9#%G#pE1XJ_uj zmtT|D>-?RexWL{SitFN?A(%0|;*v diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/GPBMetadata/Google/Cloud/Networkservices/V1/HttpRoute.php b/owl-bot-staging/NetworkServices/v1/proto/src/GPBMetadata/Google/Cloud/Networkservices/V1/HttpRoute.php deleted file mode 100644 index 0953f461d643b9f753622093ef5e65d24de80fb5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6027 zcmb_g&2!t<5f3R-78kNCL$*w@ZGy^4t*8xYF=?lzYbz8|h|^kwgUn z=mV&aW;E03q5nWyZhVS zx4&NY`#wC-)`&}}5fV$=JJG^E(R}KKp6NN--k{qhR5QH;-*yNsXj-kIZ8zFly|&T* zF^UG>fSRPN^*pcVkfP~$1FPtg@W`Y40ilPsNrK|xQn4R~zD~VCND3Srz%>p?;2S2< z)|x9@Bs44|G&*Y>r&DD(o$a$Yo##uB0ZhjT0&N}fS_}?80S*88gFVMKwIDP?{O@f$ z&~4WaZNstujMsXibqyyVD1C8nci@_#?YSBgXt*X>cvlmcZ13B?hh})9MT#|>vq9x5Jzelu+zjv8)^#e4P+#ydd#yi5uB4We* zf8T^`OcwPH++e)RrL@#Sc4h4AN?M(TY(Si@?%3{rPKnmX)Ep?53~lslE**VIsULu1 zQiAzHXNTp+@QYH)7o;5`O$xDZ*g0cNYTzTsrPPh&I1b8$eQ8q8U*Ul> zF5@i4^(#C)1B%^qJxX-b2uO}=rLMtEVbOpSELkv*cuM^Urq5k23hAc_e1D1cnTwiu zd2Wup4hq)X&~|yjK{8LuMnfM-ZHq4}ormxaYg|~*aV`t280J0(z>a88SWF!eyVnmz zMCAWA1`{n}*_4c`osqN{@t`x2eI1XBwJAiIn2Ays0f88tKW z|46~)8PFfWT&up*Y;5n;^=hM5*LSyfn)T|&>PEdb{f3I4w;IpuHN9DHZB@4G+wIMd z^;&(kvb))yPN`YQtTuMHYtw1uU3RBl*BkBidTV+Nl~vpIt!ATDX??7>u!n5btL^C< zY(0h=u4nT9NyFV$W8j1v?jO+?ScjS(ws|LN8!{Ggj1%q*rBqK~#>?;uH3r5|jXksv z4}<>$YK4L2pFu{z7eK*WNi2O-^|?s(xNb(Rl&S*w1iNcDGU zgFxoB%OpNc!<1yHXW7_5P_+SL0b#k2m9CXYfoqhmvp9tv67n*}01b=f)7J#V22B7W zBPluX4jFy0=3_peh!4Z$y-$Savn;V68qPqNCtFVcGR5}BIIr5f46xhUYzeBWKY$s| z>2nO`$(9uwnFj=~Ip6a>C@q4OT*hS%rmn2Qw{#qz=L@n^N}b;EZ_2+qEbwN?s&sOGa{P{>v0V z)uVyL#HP#;iqg5N!)%x3IDE0nB&Yk_ zr@THZrR4;mmnAp#1>C11Vx)2P1DOf1;4`&c>-lexV;EBBZ{%uP)b)*jD?9{vGhZh3nU@aXioS8+>6YAz!@947dUK^ z-sm#oqmfLcY6Qw&a7rnOk%mOif0lx5{G?D<8TatrfRq-cA_?k9|GEm}_y&m{k;(Wr z!ruIQpp3koSQG!h>Ok53rm_zUuXxbK&oXrx3ozqfQ2a#xIxRY$$(u}Ei+-N+Q5IJV zS9uAhEW@16|0MRDI zJ3l=$X^=O*zB}f>NWpBCPZ?r+M$oTs&OG+?@jz0y#Y<4mL#hD7Z?YUGFcg1?&;K2@ z-{sSe3)&CoAZ&~y3-!h6Njw!3GlH{PiE5KrtB+t7J5hYpUQp^ay|waf3LfBF>s9fz zG8LcPWP{XZ>cy65JLT|*jc9t_g#j{-Z*Ycuj>`Vt;|nYQOux0pC&+~=n;;jq#ROSC z^n$|krLUqL9XVuNzV(Ia+%|l%jbZ~<>yO#internalAddGeneratedFile( - ' -÷ -*google/cloud/networkservices/v1/mesh.protogoogle.cloud.networkservices.v1google/api/resource.proto google/protobuf/field_mask.protogoogle/protobuf/timestamp.proto"¯ -Mesh -name ( BàA - self_link ( BàA4 - create_time ( 2.google.protobuf.TimestampBàA4 - update_time ( 2.google.protobuf.TimestampBàAF -labels ( 21.google.cloud.networkservices.v1.Mesh.LabelsEntryBàA - description ( BàA -interception_port (BàA- - LabelsEntry -key (  -value ( :8:_êA\\ -#networkservices.googleapis.com/Mesh5projects/{project}/locations/{location}/meshes/{mesh}"w -ListMeshesRequest; -parent ( B+àAúA%#networkservices.googleapis.com/Mesh - page_size ( - -page_token ( "d -ListMeshesResponse5 -meshes ( 2%.google.cloud.networkservices.v1.Mesh -next_page_token ( "K -GetMeshRequest9 -name ( B+àAúA% -#networkservices.googleapis.com/Mesh"  -CreateMeshRequest; -parent ( B+àAúA%#networkservices.googleapis.com/Mesh -mesh_id ( BàA8 -mesh ( 2%.google.cloud.networkservices.v1.MeshBàA"ƒ -UpdateMeshRequest4 - update_mask ( 2.google.protobuf.FieldMaskBàA8 -mesh ( 2%.google.cloud.networkservices.v1.MeshBàA"N -DeleteMeshRequest9 -name ( B+àAúA% -#networkservices.googleapis.com/MeshBê -#com.google.cloud.networkservices.v1B MeshProtoPZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespbªGoogle.Cloud.NetworkServices.V1ÊGoogle\\Cloud\\NetworkServices\\V1ê"Google::Cloud::NetworkServices::V1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/GPBMetadata/Google/Cloud/Networkservices/V1/NetworkServices.php b/owl-bot-staging/NetworkServices/v1/proto/src/GPBMetadata/Google/Cloud/Networkservices/V1/NetworkServices.php deleted file mode 100644 index 40934b680b86..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/GPBMetadata/Google/Cloud/Networkservices/V1/NetworkServices.php +++ /dev/null @@ -1,110 +0,0 @@ -internalAddGeneratedFile( - ' -¬N -6google/cloud/networkservices/v1/network_services.protogoogle.cloud.networkservices.v1google/api/client.proto5google/cloud/networkservices/v1/endpoint_policy.proto-google/cloud/networkservices/v1/gateway.proto0google/cloud/networkservices/v1/grpc_route.proto0google/cloud/networkservices/v1/http_route.proto*google/cloud/networkservices/v1/mesh.proto5google/cloud/networkservices/v1/service_binding.proto/google/cloud/networkservices/v1/tcp_route.proto/google/cloud/networkservices/v1/tls_route.proto#google/longrunning/operations.proto2™H -NetworkServicesÚ -ListEndpointPolicies<.google.cloud.networkservices.v1.ListEndpointPoliciesRequest=.google.cloud.networkservices.v1.ListEndpointPoliciesResponse"EÚAparent‚Óä“64/v1/{parent=projects/*/locations/*}/endpointPoliciesÄ -GetEndpointPolicy9.google.cloud.networkservices.v1.GetEndpointPolicyRequest/.google.cloud.networkservices.v1.EndpointPolicy"CÚAname‚Óä“64/v1/{name=projects/*/locations/*/endpointPolicies/*}µ -CreateEndpointPolicy<.google.cloud.networkservices.v1.CreateEndpointPolicyRequest.google.longrunning.Operation"¿ÊAC -EndpointPolicy1google.cloud.networkservices.v1.OperationMetadataÚA)parent,endpoint_policy,endpoint_policy_id‚Óä“G"4/v1/{parent=projects/*/locations/*}/endpointPolicies:endpoint_policy· -UpdateEndpointPolicy<.google.cloud.networkservices.v1.UpdateEndpointPolicyRequest.google.longrunning.Operation"ÁÊAC -EndpointPolicy1google.cloud.networkservices.v1.OperationMetadataÚAendpoint_policy,update_mask‚Óä“W2D/v1/{endpoint_policy.name=projects/*/locations/*/endpointPolicies/*}:endpoint_policy† -DeleteEndpointPolicy<.google.cloud.networkservices.v1.DeleteEndpointPolicyRequest.google.longrunning.Operation"ÊAJ -google.protobuf.Empty1google.cloud.networkservices.v1.OperationMetadataÚAname‚Óä“6*4/v1/{name=projects/*/locations/*/endpointPolicies/*}º - ListGateways4.google.cloud.networkservices.v1.ListGatewaysRequest5.google.cloud.networkservices.v1.ListGatewaysResponse"=ÚAparent‚Óä“.,/v1/{parent=projects/*/locations/*}/gateways§ - -GetGateway2.google.cloud.networkservices.v1.GetGatewayRequest(.google.cloud.networkservices.v1.Gateway";ÚAname‚Óä“.,/v1/{name=projects/*/locations/*/gateways/*}€ - CreateGateway5.google.cloud.networkservices.v1.CreateGatewayRequest.google.longrunning.Operation"˜ÊA< -Gateway1google.cloud.networkservices.v1.OperationMetadataÚAparent,gateway,gateway_id‚Óä“7",/v1/{parent=projects/*/locations/*}/gateways:gateway‚ - UpdateGateway5.google.cloud.networkservices.v1.UpdateGatewayRequest.google.longrunning.Operation"šÊA< -Gateway1google.cloud.networkservices.v1.OperationMetadataÚAgateway,update_mask‚Óä“?24/v1/{gateway.name=projects/*/locations/*/gateways/*}:gatewayð - DeleteGateway5.google.cloud.networkservices.v1.DeleteGatewayRequest.google.longrunning.Operation"ˆÊAJ -google.protobuf.Empty1google.cloud.networkservices.v1.OperationMetadataÚAname‚Óä“.*,/v1/{name=projects/*/locations/*/gateways/*} -ListGrpcRoutes6.google.cloud.networkservices.v1.ListGrpcRoutesRequest7.google.cloud.networkservices.v1.ListGrpcRoutesResponse"?ÚAparent‚Óä“0./v1/{parent=projects/*/locations/*}/grpcRoutes¯ - GetGrpcRoute4.google.cloud.networkservices.v1.GetGrpcRouteRequest*.google.cloud.networkservices.v1.GrpcRoute"=ÚAname‚Óä“0./v1/{name=projects/*/locations/*/grpcRoutes/*}‘ -CreateGrpcRoute7.google.cloud.networkservices.v1.CreateGrpcRouteRequest.google.longrunning.Operation"¥ÊA> - GrpcRoute1google.cloud.networkservices.v1.OperationMetadataÚAparent,grpc_route,grpc_route_id‚Óä“<"./v1/{parent=projects/*/locations/*}/grpcRoutes: -grpc_route“ -UpdateGrpcRoute7.google.cloud.networkservices.v1.UpdateGrpcRouteRequest.google.longrunning.Operation"§ÊA> - GrpcRoute1google.cloud.networkservices.v1.OperationMetadataÚAgrpc_route,update_mask‚Óä“G29/v1/{grpc_route.name=projects/*/locations/*/grpcRoutes/*}: -grpc_routeö -DeleteGrpcRoute7.google.cloud.networkservices.v1.DeleteGrpcRouteRequest.google.longrunning.Operation"ŠÊAJ -google.protobuf.Empty1google.cloud.networkservices.v1.OperationMetadataÚAname‚Óä“0*./v1/{name=projects/*/locations/*/grpcRoutes/*} -ListHttpRoutes6.google.cloud.networkservices.v1.ListHttpRoutesRequest7.google.cloud.networkservices.v1.ListHttpRoutesResponse"?ÚAparent‚Óä“0./v1/{parent=projects/*/locations/*}/httpRoutes¯ - GetHttpRoute4.google.cloud.networkservices.v1.GetHttpRouteRequest*.google.cloud.networkservices.v1.HttpRoute"=ÚAname‚Óä“0./v1/{name=projects/*/locations/*/httpRoutes/*}‘ -CreateHttpRoute7.google.cloud.networkservices.v1.CreateHttpRouteRequest.google.longrunning.Operation"¥ÊA> - HttpRoute1google.cloud.networkservices.v1.OperationMetadataÚAparent,http_route,http_route_id‚Óä“<"./v1/{parent=projects/*/locations/*}/httpRoutes: -http_route“ -UpdateHttpRoute7.google.cloud.networkservices.v1.UpdateHttpRouteRequest.google.longrunning.Operation"§ÊA> - HttpRoute1google.cloud.networkservices.v1.OperationMetadataÚAhttp_route,update_mask‚Óä“G29/v1/{http_route.name=projects/*/locations/*/httpRoutes/*}: -http_routeö -DeleteHttpRoute7.google.cloud.networkservices.v1.DeleteHttpRouteRequest.google.longrunning.Operation"ŠÊAJ -google.protobuf.Empty1google.cloud.networkservices.v1.OperationMetadataÚAname‚Óä“0*./v1/{name=projects/*/locations/*/httpRoutes/*}¾ - ListTcpRoutes5.google.cloud.networkservices.v1.ListTcpRoutesRequest6.google.cloud.networkservices.v1.ListTcpRoutesResponse">ÚAparent‚Óä“/-/v1/{parent=projects/*/locations/*}/tcpRoutes« - GetTcpRoute3.google.cloud.networkservices.v1.GetTcpRouteRequest).google.cloud.networkservices.v1.TcpRoute"<ÚAname‚Óä“/-/v1/{name=projects/*/locations/*/tcpRoutes/*}Š -CreateTcpRoute6.google.cloud.networkservices.v1.CreateTcpRouteRequest.google.longrunning.Operation" ÊA= -TcpRoute1google.cloud.networkservices.v1.OperationMetadataÚAparent,tcp_route,tcp_route_id‚Óä“:"-/v1/{parent=projects/*/locations/*}/tcpRoutes: tcp_routeŒ -UpdateTcpRoute6.google.cloud.networkservices.v1.UpdateTcpRouteRequest.google.longrunning.Operation"¢ÊA= -TcpRoute1google.cloud.networkservices.v1.OperationMetadataÚAtcp_route,update_mask‚Óä“D27/v1/{tcp_route.name=projects/*/locations/*/tcpRoutes/*}: tcp_routeó -DeleteTcpRoute6.google.cloud.networkservices.v1.DeleteTcpRouteRequest.google.longrunning.Operation"‰ÊAJ -google.protobuf.Empty1google.cloud.networkservices.v1.OperationMetadataÚAname‚Óä“/*-/v1/{name=projects/*/locations/*/tcpRoutes/*}¾ - ListTlsRoutes5.google.cloud.networkservices.v1.ListTlsRoutesRequest6.google.cloud.networkservices.v1.ListTlsRoutesResponse">ÚAparent‚Óä“/-/v1/{parent=projects/*/locations/*}/tlsRoutes« - GetTlsRoute3.google.cloud.networkservices.v1.GetTlsRouteRequest).google.cloud.networkservices.v1.TlsRoute"<ÚAname‚Óä“/-/v1/{name=projects/*/locations/*/tlsRoutes/*}Š -CreateTlsRoute6.google.cloud.networkservices.v1.CreateTlsRouteRequest.google.longrunning.Operation" ÊA= -TlsRoute1google.cloud.networkservices.v1.OperationMetadataÚAparent,tls_route,tls_route_id‚Óä“:"-/v1/{parent=projects/*/locations/*}/tlsRoutes: tls_routeŒ -UpdateTlsRoute6.google.cloud.networkservices.v1.UpdateTlsRouteRequest.google.longrunning.Operation"¢ÊA= -TlsRoute1google.cloud.networkservices.v1.OperationMetadataÚAtls_route,update_mask‚Óä“D27/v1/{tls_route.name=projects/*/locations/*/tlsRoutes/*}: tls_routeó -DeleteTlsRoute6.google.cloud.networkservices.v1.DeleteTlsRouteRequest.google.longrunning.Operation"‰ÊAJ -google.protobuf.Empty1google.cloud.networkservices.v1.OperationMetadataÚAname‚Óä“/*-/v1/{name=projects/*/locations/*/tlsRoutes/*}Ö -ListServiceBindings;.google.cloud.networkservices.v1.ListServiceBindingsRequest<.google.cloud.networkservices.v1.ListServiceBindingsResponse"DÚAparent‚Óä“53/v1/{parent=projects/*/locations/*}/serviceBindingsà -GetServiceBinding9.google.cloud.networkservices.v1.GetServiceBindingRequest/.google.cloud.networkservices.v1.ServiceBinding"BÚAname‚Óä“53/v1/{name=projects/*/locations/*/serviceBindings/*}´ -CreateServiceBinding<.google.cloud.networkservices.v1.CreateServiceBindingRequest.google.longrunning.Operation"¾ÊAC -ServiceBinding1google.cloud.networkservices.v1.OperationMetadataÚA)parent,service_binding,service_binding_id‚Óä“F"3/v1/{parent=projects/*/locations/*}/serviceBindings:service_binding… -DeleteServiceBinding<.google.cloud.networkservices.v1.DeleteServiceBindingRequest.google.longrunning.Operation"ÊAJ -google.protobuf.Empty1google.cloud.networkservices.v1.OperationMetadataÚAname‚Óä“5*3/v1/{name=projects/*/locations/*/serviceBindings/*}² - -ListMeshes2.google.cloud.networkservices.v1.ListMeshesRequest3.google.cloud.networkservices.v1.ListMeshesResponse";ÚAparent‚Óä“,*/v1/{parent=projects/*/locations/*}/meshesœ -GetMesh/.google.cloud.networkservices.v1.GetMeshRequest%.google.cloud.networkservices.v1.Mesh"9ÚAname‚Óä“,*/v1/{name=projects/*/locations/*/meshes/*}ì - -CreateMesh2.google.cloud.networkservices.v1.CreateMeshRequest.google.longrunning.Operation"ŠÊA9 -Mesh1google.cloud.networkservices.v1.OperationMetadataÚAparent,mesh,mesh_id‚Óä“2"*/v1/{parent=projects/*/locations/*}/meshes:meshî - -UpdateMesh2.google.cloud.networkservices.v1.UpdateMeshRequest.google.longrunning.Operation"ŒÊA9 -Mesh1google.cloud.networkservices.v1.OperationMetadataÚAmesh,update_mask‚Óä“72//v1/{mesh.name=projects/*/locations/*/meshes/*}:meshè - -DeleteMesh2.google.cloud.networkservices.v1.DeleteMeshRequest.google.longrunning.Operation"†ÊAJ -google.protobuf.Empty1google.cloud.networkservices.v1.OperationMetadataÚAname‚Óä“,**/v1/{name=projects/*/locations/*/meshes/*}RÊAnetworkservices.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformBß -#com.google.cloud.networkservices.v1PZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespbªGoogle.Cloud.NetworkServices.V1ÊGoogle\\Cloud\\NetworkServices\\V1ê"Google::Cloud::NetworkServices::V1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/GPBMetadata/Google/Cloud/Networkservices/V1/ServiceBinding.php b/owl-bot-staging/NetworkServices/v1/proto/src/GPBMetadata/Google/Cloud/Networkservices/V1/ServiceBinding.php deleted file mode 100644 index 23a6be8c3ca8..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/GPBMetadata/Google/Cloud/Networkservices/V1/ServiceBinding.php +++ /dev/null @@ -1,59 +0,0 @@ -internalAddGeneratedFile( - ' -‚ -5google/cloud/networkservices/v1/service_binding.protogoogle.cloud.networkservices.v1google/api/resource.protogoogle/protobuf/timestamp.proto"¿ -ServiceBinding -name ( BàA - description ( BàA4 - create_time ( 2.google.protobuf.TimestampBàA4 - update_time ( 2.google.protobuf.TimestampBàA -service ( BàAP -labels ( 2;.google.cloud.networkservices.v1.ServiceBinding.LabelsEntryBàA- - LabelsEntry -key (  -value ( :8:}êAz --networkservices.googleapis.com/ServiceBindingIprojects/{project}/locations/{location}/serviceBindings/{service_binding}"Š -ListServiceBindingsRequestE -parent ( B5àAúA/-networkservices.googleapis.com/ServiceBinding - page_size ( - -page_token ( " -ListServiceBindingsResponseI -service_bindings ( 2/.google.cloud.networkservices.v1.ServiceBinding -next_page_token ( "_ -GetServiceBindingRequestC -name ( B5àAúA/ --networkservices.googleapis.com/ServiceBinding"Ô -CreateServiceBindingRequestE -parent ( B5àAúA/-networkservices.googleapis.com/ServiceBinding -service_binding_id ( BàAM -service_binding ( 2/.google.cloud.networkservices.v1.ServiceBindingBàA"b -DeleteServiceBindingRequestC -name ( B5àAúA/ --networkservices.googleapis.com/ServiceBindingBô -#com.google.cloud.networkservices.v1BServiceBindingProtoPZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespbªGoogle.Cloud.NetworkServices.V1ÊGoogle\\Cloud\\NetworkServices\\V1ê"Google::Cloud::NetworkServices::V1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/GPBMetadata/Google/Cloud/Networkservices/V1/TcpRoute.php b/owl-bot-staging/NetworkServices/v1/proto/src/GPBMetadata/Google/Cloud/Networkservices/V1/TcpRoute.php deleted file mode 100644 index 35505dfd4a1c..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/GPBMetadata/Google/Cloud/Networkservices/V1/TcpRoute.php +++ /dev/null @@ -1,85 +0,0 @@ -internalAddGeneratedFile( - ' -Ë -/google/cloud/networkservices/v1/tcp_route.protogoogle.cloud.networkservices.v1google/api/resource.proto google/protobuf/field_mask.protogoogle/protobuf/timestamp.proto"À -TcpRoute -name ( BàA - self_link ( BàA4 - create_time ( 2.google.protobuf.TimestampBàA4 - update_time ( 2.google.protobuf.TimestampBàA - description ( BàAG -rules ( 23.google.cloud.networkservices.v1.TcpRoute.RouteRuleBàA; -meshes ( B+àAúA% -#networkservices.googleapis.com/Mesh@ -gateways ( B.àAúA( -&networkservices.googleapis.com/GatewayJ -labels - ( 25.google.cloud.networkservices.v1.TcpRoute.LabelsEntryBàA£ - RouteRuleJ -matches ( 24.google.cloud.networkservices.v1.TcpRoute.RouteMatchBàAJ -action ( 25.google.cloud.networkservices.v1.TcpRoute.RouteActionBàA5 - -RouteMatch -address ( BàA -port ( BàA‡ - RouteActionU - destinations ( 2:.google.cloud.networkservices.v1.TcpRoute.RouteDestinationBàA! -original_destination (BàAl -RouteDestinationC - service_name ( B-àAúA\' -%compute.googleapis.com/BackendService -weight (BàA- - LabelsEntry -key (  -value ( :8:kêAh -\'networkservices.googleapis.com/TcpRoute=projects/{project}/locations/{location}/tcpRoutes/{tcp_route}"~ -ListTcpRoutesRequest? -parent ( B/àAúA)\'networkservices.googleapis.com/TcpRoute - page_size ( - -page_token ( "o -ListTcpRoutesResponse= - -tcp_routes ( 2).google.cloud.networkservices.v1.TcpRoute -next_page_token ( "S -GetTcpRouteRequest= -name ( B/àAúA) -\'networkservices.googleapis.com/TcpRoute"¶ -CreateTcpRouteRequest? -parent ( B/àAúA)\'networkservices.googleapis.com/TcpRoute - tcp_route_id ( BàAA - tcp_route ( 2).google.cloud.networkservices.v1.TcpRouteBàA" -UpdateTcpRouteRequest4 - update_mask ( 2.google.protobuf.FieldMaskBàAA - tcp_route ( 2).google.cloud.networkservices.v1.TcpRouteBàA"V -DeleteTcpRouteRequest= -name ( B/àAúA) -\'networkservices.googleapis.com/TcpRouteBã -#com.google.cloud.networkservices.v1B TcpRouteProtoPZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespbªGoogle.Cloud.NetworkServices.V1ÊGoogle\\Cloud\\NetworkServices\\V1ê"Google::Cloud::NetworkServices::V1êAr -%compute.googleapis.com/BackendServiceIprojects/{project}/locations/{location}/backendServices/{backend_service}bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/GPBMetadata/Google/Cloud/Networkservices/V1/TlsRoute.php b/owl-bot-staging/NetworkServices/v1/proto/src/GPBMetadata/Google/Cloud/Networkservices/V1/TlsRoute.php deleted file mode 100644 index 1687a1119d3c..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/GPBMetadata/Google/Cloud/Networkservices/V1/TlsRoute.php +++ /dev/null @@ -1,78 +0,0 @@ -internalAddGeneratedFile( - ' -¸ -/google/cloud/networkservices/v1/tls_route.protogoogle.cloud.networkservices.v1google/api/resource.proto google/protobuf/field_mask.protogoogle/protobuf/timestamp.proto"¢ -TlsRoute -name ( BàA - self_link ( BàA4 - create_time ( 2.google.protobuf.TimestampBàA4 - update_time ( 2.google.protobuf.TimestampBàA - description ( BàAG -rules ( 23.google.cloud.networkservices.v1.TlsRoute.RouteRuleBàA; -meshes ( B+àAúA% -#networkservices.googleapis.com/Mesh@ -gateways ( B.àAúA( -&networkservices.googleapis.com/Gateway£ - RouteRuleJ -matches ( 24.google.cloud.networkservices.v1.TlsRoute.RouteMatchBàAJ -action ( 25.google.cloud.networkservices.v1.TlsRoute.RouteActionBàA6 - -RouteMatch -sni_host ( BàA -alpn ( BàAd - RouteActionU - destinations ( 2:.google.cloud.networkservices.v1.TlsRoute.RouteDestinationBàAl -RouteDestinationC - service_name ( B-àAúA\' -%compute.googleapis.com/BackendService -weight (BàA:kêAh -\'networkservices.googleapis.com/TlsRoute=projects/{project}/locations/{location}/tlsRoutes/{tls_route}"~ -ListTlsRoutesRequest? -parent ( B/àAúA)\'networkservices.googleapis.com/TlsRoute - page_size ( - -page_token ( "o -ListTlsRoutesResponse= - -tls_routes ( 2).google.cloud.networkservices.v1.TlsRoute -next_page_token ( "S -GetTlsRouteRequest= -name ( B/àAúA) -\'networkservices.googleapis.com/TlsRoute"¶ -CreateTlsRouteRequest? -parent ( B/àAúA)\'networkservices.googleapis.com/TlsRoute - tls_route_id ( BàAA - tls_route ( 2).google.cloud.networkservices.v1.TlsRouteBàA" -UpdateTlsRouteRequest4 - update_mask ( 2.google.protobuf.FieldMaskBàAA - tls_route ( 2).google.cloud.networkservices.v1.TlsRouteBàA"V -DeleteTlsRouteRequest= -name ( B/àAúA) -\'networkservices.googleapis.com/TlsRouteBî -#com.google.cloud.networkservices.v1B TlsRouteProtoPZMcloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespbªGoogle.Cloud.NetworkServices.V1ÊGoogle\\Cloud\\NetworkServices\\V1ê"Google::Cloud::NetworkServices::V1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/CreateEndpointPolicyRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/CreateEndpointPolicyRequest.php deleted file mode 100644 index dfa74aa4713d..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/CreateEndpointPolicyRequest.php +++ /dev/null @@ -1,173 +0,0 @@ -google.cloud.networkservices.v1.CreateEndpointPolicyRequest - */ -class CreateEndpointPolicyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource of the EndpointPolicy. Must be in the - * format `projects/*/locations/global`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Short name of the EndpointPolicy resource to be created. - * E.g. "CustomECS". - * - * Generated from protobuf field string endpoint_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $endpoint_policy_id = ''; - /** - * Required. EndpointPolicy resource to be created. - * - * Generated from protobuf field .google.cloud.networkservices.v1.EndpointPolicy endpoint_policy = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $endpoint_policy = null; - - /** - * @param string $parent Required. The parent resource of the EndpointPolicy. Must be in the - * format `projects/*/locations/global`. Please see - * {@see NetworkServicesClient::locationName()} for help formatting this field. - * @param \Google\Cloud\NetworkServices\V1\EndpointPolicy $endpointPolicy Required. EndpointPolicy resource to be created. - * @param string $endpointPolicyId Required. Short name of the EndpointPolicy resource to be created. - * E.g. "CustomECS". - * - * @return \Google\Cloud\NetworkServices\V1\CreateEndpointPolicyRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\NetworkServices\V1\EndpointPolicy $endpointPolicy, string $endpointPolicyId): self - { - return (new self()) - ->setParent($parent) - ->setEndpointPolicy($endpointPolicy) - ->setEndpointPolicyId($endpointPolicyId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource of the EndpointPolicy. Must be in the - * format `projects/*/locations/global`. - * @type string $endpoint_policy_id - * Required. Short name of the EndpointPolicy resource to be created. - * E.g. "CustomECS". - * @type \Google\Cloud\NetworkServices\V1\EndpointPolicy $endpoint_policy - * Required. EndpointPolicy resource to be created. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\EndpointPolicy::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource of the EndpointPolicy. Must be in the - * format `projects/*/locations/global`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource of the EndpointPolicy. Must be in the - * format `projects/*/locations/global`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. Short name of the EndpointPolicy resource to be created. - * E.g. "CustomECS". - * - * Generated from protobuf field string endpoint_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getEndpointPolicyId() - { - return $this->endpoint_policy_id; - } - - /** - * Required. Short name of the EndpointPolicy resource to be created. - * E.g. "CustomECS". - * - * Generated from protobuf field string endpoint_policy_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setEndpointPolicyId($var) - { - GPBUtil::checkString($var, True); - $this->endpoint_policy_id = $var; - - return $this; - } - - /** - * Required. EndpointPolicy resource to be created. - * - * Generated from protobuf field .google.cloud.networkservices.v1.EndpointPolicy endpoint_policy = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\NetworkServices\V1\EndpointPolicy|null - */ - public function getEndpointPolicy() - { - return $this->endpoint_policy; - } - - public function hasEndpointPolicy() - { - return isset($this->endpoint_policy); - } - - public function clearEndpointPolicy() - { - unset($this->endpoint_policy); - } - - /** - * Required. EndpointPolicy resource to be created. - * - * Generated from protobuf field .google.cloud.networkservices.v1.EndpointPolicy endpoint_policy = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\NetworkServices\V1\EndpointPolicy $var - * @return $this - */ - public function setEndpointPolicy($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkServices\V1\EndpointPolicy::class); - $this->endpoint_policy = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/CreateGatewayRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/CreateGatewayRequest.php deleted file mode 100644 index a934d19f6d76..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/CreateGatewayRequest.php +++ /dev/null @@ -1,168 +0,0 @@ -google.cloud.networkservices.v1.CreateGatewayRequest - */ -class CreateGatewayRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource of the Gateway. Must be in the - * format `projects/*/locations/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Short name of the Gateway resource to be created. - * - * Generated from protobuf field string gateway_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $gateway_id = ''; - /** - * Required. Gateway resource to be created. - * - * Generated from protobuf field .google.cloud.networkservices.v1.Gateway gateway = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $gateway = null; - - /** - * @param string $parent Required. The parent resource of the Gateway. Must be in the - * format `projects/*/locations/*`. Please see - * {@see NetworkServicesClient::locationName()} for help formatting this field. - * @param \Google\Cloud\NetworkServices\V1\Gateway $gateway Required. Gateway resource to be created. - * @param string $gatewayId Required. Short name of the Gateway resource to be created. - * - * @return \Google\Cloud\NetworkServices\V1\CreateGatewayRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\NetworkServices\V1\Gateway $gateway, string $gatewayId): self - { - return (new self()) - ->setParent($parent) - ->setGateway($gateway) - ->setGatewayId($gatewayId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource of the Gateway. Must be in the - * format `projects/*/locations/*`. - * @type string $gateway_id - * Required. Short name of the Gateway resource to be created. - * @type \Google\Cloud\NetworkServices\V1\Gateway $gateway - * Required. Gateway resource to be created. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\Gateway::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource of the Gateway. Must be in the - * format `projects/*/locations/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource of the Gateway. Must be in the - * format `projects/*/locations/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. Short name of the Gateway resource to be created. - * - * Generated from protobuf field string gateway_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getGatewayId() - { - return $this->gateway_id; - } - - /** - * Required. Short name of the Gateway resource to be created. - * - * Generated from protobuf field string gateway_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setGatewayId($var) - { - GPBUtil::checkString($var, True); - $this->gateway_id = $var; - - return $this; - } - - /** - * Required. Gateway resource to be created. - * - * Generated from protobuf field .google.cloud.networkservices.v1.Gateway gateway = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\NetworkServices\V1\Gateway|null - */ - public function getGateway() - { - return $this->gateway; - } - - public function hasGateway() - { - return isset($this->gateway); - } - - public function clearGateway() - { - unset($this->gateway); - } - - /** - * Required. Gateway resource to be created. - * - * Generated from protobuf field .google.cloud.networkservices.v1.Gateway gateway = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\NetworkServices\V1\Gateway $var - * @return $this - */ - public function setGateway($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkServices\V1\Gateway::class); - $this->gateway = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/CreateGrpcRouteRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/CreateGrpcRouteRequest.php deleted file mode 100644 index bc0d25e92239..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/CreateGrpcRouteRequest.php +++ /dev/null @@ -1,168 +0,0 @@ -google.cloud.networkservices.v1.CreateGrpcRouteRequest - */ -class CreateGrpcRouteRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource of the GrpcRoute. Must be in the - * format `projects/*/locations/global`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Short name of the GrpcRoute resource to be created. - * - * Generated from protobuf field string grpc_route_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $grpc_route_id = ''; - /** - * Required. GrpcRoute resource to be created. - * - * Generated from protobuf field .google.cloud.networkservices.v1.GrpcRoute grpc_route = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $grpc_route = null; - - /** - * @param string $parent Required. The parent resource of the GrpcRoute. Must be in the - * format `projects/*/locations/global`. Please see - * {@see NetworkServicesClient::locationName()} for help formatting this field. - * @param \Google\Cloud\NetworkServices\V1\GrpcRoute $grpcRoute Required. GrpcRoute resource to be created. - * @param string $grpcRouteId Required. Short name of the GrpcRoute resource to be created. - * - * @return \Google\Cloud\NetworkServices\V1\CreateGrpcRouteRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\NetworkServices\V1\GrpcRoute $grpcRoute, string $grpcRouteId): self - { - return (new self()) - ->setParent($parent) - ->setGrpcRoute($grpcRoute) - ->setGrpcRouteId($grpcRouteId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource of the GrpcRoute. Must be in the - * format `projects/*/locations/global`. - * @type string $grpc_route_id - * Required. Short name of the GrpcRoute resource to be created. - * @type \Google\Cloud\NetworkServices\V1\GrpcRoute $grpc_route - * Required. GrpcRoute resource to be created. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\GrpcRoute::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource of the GrpcRoute. Must be in the - * format `projects/*/locations/global`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource of the GrpcRoute. Must be in the - * format `projects/*/locations/global`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. Short name of the GrpcRoute resource to be created. - * - * Generated from protobuf field string grpc_route_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getGrpcRouteId() - { - return $this->grpc_route_id; - } - - /** - * Required. Short name of the GrpcRoute resource to be created. - * - * Generated from protobuf field string grpc_route_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setGrpcRouteId($var) - { - GPBUtil::checkString($var, True); - $this->grpc_route_id = $var; - - return $this; - } - - /** - * Required. GrpcRoute resource to be created. - * - * Generated from protobuf field .google.cloud.networkservices.v1.GrpcRoute grpc_route = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\NetworkServices\V1\GrpcRoute|null - */ - public function getGrpcRoute() - { - return $this->grpc_route; - } - - public function hasGrpcRoute() - { - return isset($this->grpc_route); - } - - public function clearGrpcRoute() - { - unset($this->grpc_route); - } - - /** - * Required. GrpcRoute resource to be created. - * - * Generated from protobuf field .google.cloud.networkservices.v1.GrpcRoute grpc_route = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\NetworkServices\V1\GrpcRoute $var - * @return $this - */ - public function setGrpcRoute($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkServices\V1\GrpcRoute::class); - $this->grpc_route = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/CreateHttpRouteRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/CreateHttpRouteRequest.php deleted file mode 100644 index c513e3d6eecf..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/CreateHttpRouteRequest.php +++ /dev/null @@ -1,168 +0,0 @@ -google.cloud.networkservices.v1.CreateHttpRouteRequest - */ -class CreateHttpRouteRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource of the HttpRoute. Must be in the - * format `projects/*/locations/global`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Short name of the HttpRoute resource to be created. - * - * Generated from protobuf field string http_route_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $http_route_id = ''; - /** - * Required. HttpRoute resource to be created. - * - * Generated from protobuf field .google.cloud.networkservices.v1.HttpRoute http_route = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $http_route = null; - - /** - * @param string $parent Required. The parent resource of the HttpRoute. Must be in the - * format `projects/*/locations/global`. Please see - * {@see NetworkServicesClient::locationName()} for help formatting this field. - * @param \Google\Cloud\NetworkServices\V1\HttpRoute $httpRoute Required. HttpRoute resource to be created. - * @param string $httpRouteId Required. Short name of the HttpRoute resource to be created. - * - * @return \Google\Cloud\NetworkServices\V1\CreateHttpRouteRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\NetworkServices\V1\HttpRoute $httpRoute, string $httpRouteId): self - { - return (new self()) - ->setParent($parent) - ->setHttpRoute($httpRoute) - ->setHttpRouteId($httpRouteId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource of the HttpRoute. Must be in the - * format `projects/*/locations/global`. - * @type string $http_route_id - * Required. Short name of the HttpRoute resource to be created. - * @type \Google\Cloud\NetworkServices\V1\HttpRoute $http_route - * Required. HttpRoute resource to be created. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\HttpRoute::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource of the HttpRoute. Must be in the - * format `projects/*/locations/global`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource of the HttpRoute. Must be in the - * format `projects/*/locations/global`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. Short name of the HttpRoute resource to be created. - * - * Generated from protobuf field string http_route_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getHttpRouteId() - { - return $this->http_route_id; - } - - /** - * Required. Short name of the HttpRoute resource to be created. - * - * Generated from protobuf field string http_route_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setHttpRouteId($var) - { - GPBUtil::checkString($var, True); - $this->http_route_id = $var; - - return $this; - } - - /** - * Required. HttpRoute resource to be created. - * - * Generated from protobuf field .google.cloud.networkservices.v1.HttpRoute http_route = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\NetworkServices\V1\HttpRoute|null - */ - public function getHttpRoute() - { - return $this->http_route; - } - - public function hasHttpRoute() - { - return isset($this->http_route); - } - - public function clearHttpRoute() - { - unset($this->http_route); - } - - /** - * Required. HttpRoute resource to be created. - * - * Generated from protobuf field .google.cloud.networkservices.v1.HttpRoute http_route = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\NetworkServices\V1\HttpRoute $var - * @return $this - */ - public function setHttpRoute($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkServices\V1\HttpRoute::class); - $this->http_route = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/CreateLbRouteExtensionRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/CreateLbRouteExtensionRequest.php deleted file mode 100644 index c23c18e694bb..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/CreateLbRouteExtensionRequest.php +++ /dev/null @@ -1,247 +0,0 @@ -google.cloud.networkservices.v1.CreateLbRouteExtensionRequest - */ -class CreateLbRouteExtensionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource of the `LbRouteExtension` resource. Must be - * in the format `projects/{project}/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. User-provided ID of the `LbRouteExtension` resource to be - * created. - * - * Generated from protobuf field string lb_route_extension_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $lb_route_extension_id = ''; - /** - * Required. `LbRouteExtension` resource to be created. - * - * Generated from protobuf field .google.cloud.networkservices.v1.LbRouteExtension lb_route_extension = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $lb_route_extension = null; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server can ignore - * the request if it has already been completed. The server guarantees - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, ignores the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - */ - protected $request_id = ''; - - /** - * @param string $parent Required. The parent resource of the `LbRouteExtension` resource. Must be - * in the format `projects/{project}/locations/{location}`. Please see - * {@see DepServiceClient::locationName()} for help formatting this field. - * @param \Google\Cloud\NetworkServices\V1\LbRouteExtension $lbRouteExtension Required. `LbRouteExtension` resource to be created. - * @param string $lbRouteExtensionId Required. User-provided ID of the `LbRouteExtension` resource to be - * created. - * - * @return \Google\Cloud\NetworkServices\V1\CreateLbRouteExtensionRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\NetworkServices\V1\LbRouteExtension $lbRouteExtension, string $lbRouteExtensionId): self - { - return (new self()) - ->setParent($parent) - ->setLbRouteExtension($lbRouteExtension) - ->setLbRouteExtensionId($lbRouteExtensionId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource of the `LbRouteExtension` resource. Must be - * in the format `projects/{project}/locations/{location}`. - * @type string $lb_route_extension_id - * Required. User-provided ID of the `LbRouteExtension` resource to be - * created. - * @type \Google\Cloud\NetworkServices\V1\LbRouteExtension $lb_route_extension - * Required. `LbRouteExtension` resource to be created. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server can ignore - * the request if it has already been completed. The server guarantees - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, ignores the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\Dep::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource of the `LbRouteExtension` resource. Must be - * in the format `projects/{project}/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource of the `LbRouteExtension` resource. Must be - * in the format `projects/{project}/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. User-provided ID of the `LbRouteExtension` resource to be - * created. - * - * Generated from protobuf field string lb_route_extension_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getLbRouteExtensionId() - { - return $this->lb_route_extension_id; - } - - /** - * Required. User-provided ID of the `LbRouteExtension` resource to be - * created. - * - * Generated from protobuf field string lb_route_extension_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setLbRouteExtensionId($var) - { - GPBUtil::checkString($var, True); - $this->lb_route_extension_id = $var; - - return $this; - } - - /** - * Required. `LbRouteExtension` resource to be created. - * - * Generated from protobuf field .google.cloud.networkservices.v1.LbRouteExtension lb_route_extension = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\NetworkServices\V1\LbRouteExtension|null - */ - public function getLbRouteExtension() - { - return $this->lb_route_extension; - } - - public function hasLbRouteExtension() - { - return isset($this->lb_route_extension); - } - - public function clearLbRouteExtension() - { - unset($this->lb_route_extension); - } - - /** - * Required. `LbRouteExtension` resource to be created. - * - * Generated from protobuf field .google.cloud.networkservices.v1.LbRouteExtension lb_route_extension = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\NetworkServices\V1\LbRouteExtension $var - * @return $this - */ - public function setLbRouteExtension($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkServices\V1\LbRouteExtension::class); - $this->lb_route_extension = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server can ignore - * the request if it has already been completed. The server guarantees - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, ignores the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server can ignore - * the request if it has already been completed. The server guarantees - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, ignores the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/CreateLbTrafficExtensionRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/CreateLbTrafficExtensionRequest.php deleted file mode 100644 index 750bdff5a36b..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/CreateLbTrafficExtensionRequest.php +++ /dev/null @@ -1,247 +0,0 @@ -google.cloud.networkservices.v1.CreateLbTrafficExtensionRequest - */ -class CreateLbTrafficExtensionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource of the `LbTrafficExtension` resource. Must be - * in the format `projects/{project}/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. User-provided ID of the `LbTrafficExtension` resource to be - * created. - * - * Generated from protobuf field string lb_traffic_extension_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $lb_traffic_extension_id = ''; - /** - * Required. `LbTrafficExtension` resource to be created. - * - * Generated from protobuf field .google.cloud.networkservices.v1.LbTrafficExtension lb_traffic_extension = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $lb_traffic_extension = null; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server can ignore - * the request if it has already been completed. The server guarantees - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, ignores the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - */ - protected $request_id = ''; - - /** - * @param string $parent Required. The parent resource of the `LbTrafficExtension` resource. Must be - * in the format `projects/{project}/locations/{location}`. Please see - * {@see DepServiceClient::locationName()} for help formatting this field. - * @param \Google\Cloud\NetworkServices\V1\LbTrafficExtension $lbTrafficExtension Required. `LbTrafficExtension` resource to be created. - * @param string $lbTrafficExtensionId Required. User-provided ID of the `LbTrafficExtension` resource to be - * created. - * - * @return \Google\Cloud\NetworkServices\V1\CreateLbTrafficExtensionRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\NetworkServices\V1\LbTrafficExtension $lbTrafficExtension, string $lbTrafficExtensionId): self - { - return (new self()) - ->setParent($parent) - ->setLbTrafficExtension($lbTrafficExtension) - ->setLbTrafficExtensionId($lbTrafficExtensionId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource of the `LbTrafficExtension` resource. Must be - * in the format `projects/{project}/locations/{location}`. - * @type string $lb_traffic_extension_id - * Required. User-provided ID of the `LbTrafficExtension` resource to be - * created. - * @type \Google\Cloud\NetworkServices\V1\LbTrafficExtension $lb_traffic_extension - * Required. `LbTrafficExtension` resource to be created. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server can ignore - * the request if it has already been completed. The server guarantees - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, ignores the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\Dep::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource of the `LbTrafficExtension` resource. Must be - * in the format `projects/{project}/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource of the `LbTrafficExtension` resource. Must be - * in the format `projects/{project}/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. User-provided ID of the `LbTrafficExtension` resource to be - * created. - * - * Generated from protobuf field string lb_traffic_extension_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getLbTrafficExtensionId() - { - return $this->lb_traffic_extension_id; - } - - /** - * Required. User-provided ID of the `LbTrafficExtension` resource to be - * created. - * - * Generated from protobuf field string lb_traffic_extension_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setLbTrafficExtensionId($var) - { - GPBUtil::checkString($var, True); - $this->lb_traffic_extension_id = $var; - - return $this; - } - - /** - * Required. `LbTrafficExtension` resource to be created. - * - * Generated from protobuf field .google.cloud.networkservices.v1.LbTrafficExtension lb_traffic_extension = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\NetworkServices\V1\LbTrafficExtension|null - */ - public function getLbTrafficExtension() - { - return $this->lb_traffic_extension; - } - - public function hasLbTrafficExtension() - { - return isset($this->lb_traffic_extension); - } - - public function clearLbTrafficExtension() - { - unset($this->lb_traffic_extension); - } - - /** - * Required. `LbTrafficExtension` resource to be created. - * - * Generated from protobuf field .google.cloud.networkservices.v1.LbTrafficExtension lb_traffic_extension = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\NetworkServices\V1\LbTrafficExtension $var - * @return $this - */ - public function setLbTrafficExtension($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkServices\V1\LbTrafficExtension::class); - $this->lb_traffic_extension = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server can ignore - * the request if it has already been completed. The server guarantees - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, ignores the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server can ignore - * the request if it has already been completed. The server guarantees - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, ignores the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/CreateMeshRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/CreateMeshRequest.php deleted file mode 100644 index 592b91ab71bc..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/CreateMeshRequest.php +++ /dev/null @@ -1,168 +0,0 @@ -google.cloud.networkservices.v1.CreateMeshRequest - */ -class CreateMeshRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource of the Mesh. Must be in the - * format `projects/*/locations/global`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Short name of the Mesh resource to be created. - * - * Generated from protobuf field string mesh_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $mesh_id = ''; - /** - * Required. Mesh resource to be created. - * - * Generated from protobuf field .google.cloud.networkservices.v1.Mesh mesh = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $mesh = null; - - /** - * @param string $parent Required. The parent resource of the Mesh. Must be in the - * format `projects/*/locations/global`. Please see - * {@see NetworkServicesClient::locationName()} for help formatting this field. - * @param \Google\Cloud\NetworkServices\V1\Mesh $mesh Required. Mesh resource to be created. - * @param string $meshId Required. Short name of the Mesh resource to be created. - * - * @return \Google\Cloud\NetworkServices\V1\CreateMeshRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\NetworkServices\V1\Mesh $mesh, string $meshId): self - { - return (new self()) - ->setParent($parent) - ->setMesh($mesh) - ->setMeshId($meshId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource of the Mesh. Must be in the - * format `projects/*/locations/global`. - * @type string $mesh_id - * Required. Short name of the Mesh resource to be created. - * @type \Google\Cloud\NetworkServices\V1\Mesh $mesh - * Required. Mesh resource to be created. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\Mesh::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource of the Mesh. Must be in the - * format `projects/*/locations/global`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource of the Mesh. Must be in the - * format `projects/*/locations/global`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. Short name of the Mesh resource to be created. - * - * Generated from protobuf field string mesh_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getMeshId() - { - return $this->mesh_id; - } - - /** - * Required. Short name of the Mesh resource to be created. - * - * Generated from protobuf field string mesh_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setMeshId($var) - { - GPBUtil::checkString($var, True); - $this->mesh_id = $var; - - return $this; - } - - /** - * Required. Mesh resource to be created. - * - * Generated from protobuf field .google.cloud.networkservices.v1.Mesh mesh = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\NetworkServices\V1\Mesh|null - */ - public function getMesh() - { - return $this->mesh; - } - - public function hasMesh() - { - return isset($this->mesh); - } - - public function clearMesh() - { - unset($this->mesh); - } - - /** - * Required. Mesh resource to be created. - * - * Generated from protobuf field .google.cloud.networkservices.v1.Mesh mesh = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\NetworkServices\V1\Mesh $var - * @return $this - */ - public function setMesh($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkServices\V1\Mesh::class); - $this->mesh = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/CreateServiceBindingRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/CreateServiceBindingRequest.php deleted file mode 100644 index 479d96d0052e..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/CreateServiceBindingRequest.php +++ /dev/null @@ -1,168 +0,0 @@ -google.cloud.networkservices.v1.CreateServiceBindingRequest - */ -class CreateServiceBindingRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource of the ServiceBinding. Must be in the - * format `projects/*/locations/global`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Short name of the ServiceBinding resource to be created. - * - * Generated from protobuf field string service_binding_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $service_binding_id = ''; - /** - * Required. ServiceBinding resource to be created. - * - * Generated from protobuf field .google.cloud.networkservices.v1.ServiceBinding service_binding = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $service_binding = null; - - /** - * @param string $parent Required. The parent resource of the ServiceBinding. Must be in the - * format `projects/*/locations/global`. Please see - * {@see NetworkServicesClient::locationName()} for help formatting this field. - * @param \Google\Cloud\NetworkServices\V1\ServiceBinding $serviceBinding Required. ServiceBinding resource to be created. - * @param string $serviceBindingId Required. Short name of the ServiceBinding resource to be created. - * - * @return \Google\Cloud\NetworkServices\V1\CreateServiceBindingRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\NetworkServices\V1\ServiceBinding $serviceBinding, string $serviceBindingId): self - { - return (new self()) - ->setParent($parent) - ->setServiceBinding($serviceBinding) - ->setServiceBindingId($serviceBindingId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource of the ServiceBinding. Must be in the - * format `projects/*/locations/global`. - * @type string $service_binding_id - * Required. Short name of the ServiceBinding resource to be created. - * @type \Google\Cloud\NetworkServices\V1\ServiceBinding $service_binding - * Required. ServiceBinding resource to be created. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\ServiceBinding::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource of the ServiceBinding. Must be in the - * format `projects/*/locations/global`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource of the ServiceBinding. Must be in the - * format `projects/*/locations/global`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. Short name of the ServiceBinding resource to be created. - * - * Generated from protobuf field string service_binding_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getServiceBindingId() - { - return $this->service_binding_id; - } - - /** - * Required. Short name of the ServiceBinding resource to be created. - * - * Generated from protobuf field string service_binding_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setServiceBindingId($var) - { - GPBUtil::checkString($var, True); - $this->service_binding_id = $var; - - return $this; - } - - /** - * Required. ServiceBinding resource to be created. - * - * Generated from protobuf field .google.cloud.networkservices.v1.ServiceBinding service_binding = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\NetworkServices\V1\ServiceBinding|null - */ - public function getServiceBinding() - { - return $this->service_binding; - } - - public function hasServiceBinding() - { - return isset($this->service_binding); - } - - public function clearServiceBinding() - { - unset($this->service_binding); - } - - /** - * Required. ServiceBinding resource to be created. - * - * Generated from protobuf field .google.cloud.networkservices.v1.ServiceBinding service_binding = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\NetworkServices\V1\ServiceBinding $var - * @return $this - */ - public function setServiceBinding($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkServices\V1\ServiceBinding::class); - $this->service_binding = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/CreateTcpRouteRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/CreateTcpRouteRequest.php deleted file mode 100644 index 46a6bc15cd6a..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/CreateTcpRouteRequest.php +++ /dev/null @@ -1,168 +0,0 @@ -google.cloud.networkservices.v1.CreateTcpRouteRequest - */ -class CreateTcpRouteRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource of the TcpRoute. Must be in the - * format `projects/*/locations/global`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Short name of the TcpRoute resource to be created. - * - * Generated from protobuf field string tcp_route_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $tcp_route_id = ''; - /** - * Required. TcpRoute resource to be created. - * - * Generated from protobuf field .google.cloud.networkservices.v1.TcpRoute tcp_route = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $tcp_route = null; - - /** - * @param string $parent Required. The parent resource of the TcpRoute. Must be in the - * format `projects/*/locations/global`. Please see - * {@see NetworkServicesClient::locationName()} for help formatting this field. - * @param \Google\Cloud\NetworkServices\V1\TcpRoute $tcpRoute Required. TcpRoute resource to be created. - * @param string $tcpRouteId Required. Short name of the TcpRoute resource to be created. - * - * @return \Google\Cloud\NetworkServices\V1\CreateTcpRouteRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\NetworkServices\V1\TcpRoute $tcpRoute, string $tcpRouteId): self - { - return (new self()) - ->setParent($parent) - ->setTcpRoute($tcpRoute) - ->setTcpRouteId($tcpRouteId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource of the TcpRoute. Must be in the - * format `projects/*/locations/global`. - * @type string $tcp_route_id - * Required. Short name of the TcpRoute resource to be created. - * @type \Google\Cloud\NetworkServices\V1\TcpRoute $tcp_route - * Required. TcpRoute resource to be created. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\TcpRoute::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource of the TcpRoute. Must be in the - * format `projects/*/locations/global`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource of the TcpRoute. Must be in the - * format `projects/*/locations/global`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. Short name of the TcpRoute resource to be created. - * - * Generated from protobuf field string tcp_route_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getTcpRouteId() - { - return $this->tcp_route_id; - } - - /** - * Required. Short name of the TcpRoute resource to be created. - * - * Generated from protobuf field string tcp_route_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setTcpRouteId($var) - { - GPBUtil::checkString($var, True); - $this->tcp_route_id = $var; - - return $this; - } - - /** - * Required. TcpRoute resource to be created. - * - * Generated from protobuf field .google.cloud.networkservices.v1.TcpRoute tcp_route = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\NetworkServices\V1\TcpRoute|null - */ - public function getTcpRoute() - { - return $this->tcp_route; - } - - public function hasTcpRoute() - { - return isset($this->tcp_route); - } - - public function clearTcpRoute() - { - unset($this->tcp_route); - } - - /** - * Required. TcpRoute resource to be created. - * - * Generated from protobuf field .google.cloud.networkservices.v1.TcpRoute tcp_route = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\NetworkServices\V1\TcpRoute $var - * @return $this - */ - public function setTcpRoute($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkServices\V1\TcpRoute::class); - $this->tcp_route = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/CreateTlsRouteRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/CreateTlsRouteRequest.php deleted file mode 100644 index 22f48cfb790f..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/CreateTlsRouteRequest.php +++ /dev/null @@ -1,168 +0,0 @@ -google.cloud.networkservices.v1.CreateTlsRouteRequest - */ -class CreateTlsRouteRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource of the TlsRoute. Must be in the - * format `projects/*/locations/global`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Short name of the TlsRoute resource to be created. - * - * Generated from protobuf field string tls_route_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $tls_route_id = ''; - /** - * Required. TlsRoute resource to be created. - * - * Generated from protobuf field .google.cloud.networkservices.v1.TlsRoute tls_route = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $tls_route = null; - - /** - * @param string $parent Required. The parent resource of the TlsRoute. Must be in the - * format `projects/*/locations/global`. Please see - * {@see NetworkServicesClient::locationName()} for help formatting this field. - * @param \Google\Cloud\NetworkServices\V1\TlsRoute $tlsRoute Required. TlsRoute resource to be created. - * @param string $tlsRouteId Required. Short name of the TlsRoute resource to be created. - * - * @return \Google\Cloud\NetworkServices\V1\CreateTlsRouteRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\NetworkServices\V1\TlsRoute $tlsRoute, string $tlsRouteId): self - { - return (new self()) - ->setParent($parent) - ->setTlsRoute($tlsRoute) - ->setTlsRouteId($tlsRouteId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource of the TlsRoute. Must be in the - * format `projects/*/locations/global`. - * @type string $tls_route_id - * Required. Short name of the TlsRoute resource to be created. - * @type \Google\Cloud\NetworkServices\V1\TlsRoute $tls_route - * Required. TlsRoute resource to be created. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\TlsRoute::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource of the TlsRoute. Must be in the - * format `projects/*/locations/global`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource of the TlsRoute. Must be in the - * format `projects/*/locations/global`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. Short name of the TlsRoute resource to be created. - * - * Generated from protobuf field string tls_route_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getTlsRouteId() - { - return $this->tls_route_id; - } - - /** - * Required. Short name of the TlsRoute resource to be created. - * - * Generated from protobuf field string tls_route_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setTlsRouteId($var) - { - GPBUtil::checkString($var, True); - $this->tls_route_id = $var; - - return $this; - } - - /** - * Required. TlsRoute resource to be created. - * - * Generated from protobuf field .google.cloud.networkservices.v1.TlsRoute tls_route = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\NetworkServices\V1\TlsRoute|null - */ - public function getTlsRoute() - { - return $this->tls_route; - } - - public function hasTlsRoute() - { - return isset($this->tls_route); - } - - public function clearTlsRoute() - { - unset($this->tls_route); - } - - /** - * Required. TlsRoute resource to be created. - * - * Generated from protobuf field .google.cloud.networkservices.v1.TlsRoute tls_route = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\NetworkServices\V1\TlsRoute $var - * @return $this - */ - public function setTlsRoute($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkServices\V1\TlsRoute::class); - $this->tls_route = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/DeleteEndpointPolicyRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/DeleteEndpointPolicyRequest.php deleted file mode 100644 index 78d9db7d70b1..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/DeleteEndpointPolicyRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.networkservices.v1.DeleteEndpointPolicyRequest - */ -class DeleteEndpointPolicyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A name of the EndpointPolicy to delete. Must be in the format - * `projects/*/locations/global/endpointPolicies/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. A name of the EndpointPolicy to delete. Must be in the format - * `projects/*/locations/global/endpointPolicies/*`. Please see - * {@see NetworkServicesClient::endpointPolicyName()} for help formatting this field. - * - * @return \Google\Cloud\NetworkServices\V1\DeleteEndpointPolicyRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. A name of the EndpointPolicy to delete. Must be in the format - * `projects/*/locations/global/endpointPolicies/*`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\EndpointPolicy::initOnce(); - parent::__construct($data); - } - - /** - * Required. A name of the EndpointPolicy to delete. Must be in the format - * `projects/*/locations/global/endpointPolicies/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. A name of the EndpointPolicy to delete. Must be in the format - * `projects/*/locations/global/endpointPolicies/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/DeleteGatewayRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/DeleteGatewayRequest.php deleted file mode 100644 index 4bec0a3ce9eb..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/DeleteGatewayRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.networkservices.v1.DeleteGatewayRequest - */ -class DeleteGatewayRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A name of the Gateway to delete. Must be in the format - * `projects/*/locations/*/gateways/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. A name of the Gateway to delete. Must be in the format - * `projects/*/locations/*/gateways/*`. Please see - * {@see NetworkServicesClient::gatewayName()} for help formatting this field. - * - * @return \Google\Cloud\NetworkServices\V1\DeleteGatewayRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. A name of the Gateway to delete. Must be in the format - * `projects/*/locations/*/gateways/*`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\Gateway::initOnce(); - parent::__construct($data); - } - - /** - * Required. A name of the Gateway to delete. Must be in the format - * `projects/*/locations/*/gateways/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. A name of the Gateway to delete. Must be in the format - * `projects/*/locations/*/gateways/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/DeleteGrpcRouteRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/DeleteGrpcRouteRequest.php deleted file mode 100644 index bced7bb70ce5..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/DeleteGrpcRouteRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.networkservices.v1.DeleteGrpcRouteRequest - */ -class DeleteGrpcRouteRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A name of the GrpcRoute to delete. Must be in the format - * `projects/*/locations/global/grpcRoutes/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. A name of the GrpcRoute to delete. Must be in the format - * `projects/*/locations/global/grpcRoutes/*`. Please see - * {@see NetworkServicesClient::grpcRouteName()} for help formatting this field. - * - * @return \Google\Cloud\NetworkServices\V1\DeleteGrpcRouteRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. A name of the GrpcRoute to delete. Must be in the format - * `projects/*/locations/global/grpcRoutes/*`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\GrpcRoute::initOnce(); - parent::__construct($data); - } - - /** - * Required. A name of the GrpcRoute to delete. Must be in the format - * `projects/*/locations/global/grpcRoutes/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. A name of the GrpcRoute to delete. Must be in the format - * `projects/*/locations/global/grpcRoutes/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/DeleteHttpRouteRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/DeleteHttpRouteRequest.php deleted file mode 100644 index 2d9d2972f122..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/DeleteHttpRouteRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.networkservices.v1.DeleteHttpRouteRequest - */ -class DeleteHttpRouteRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A name of the HttpRoute to delete. Must be in the format - * `projects/*/locations/global/httpRoutes/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. A name of the HttpRoute to delete. Must be in the format - * `projects/*/locations/global/httpRoutes/*`. Please see - * {@see NetworkServicesClient::httpRouteName()} for help formatting this field. - * - * @return \Google\Cloud\NetworkServices\V1\DeleteHttpRouteRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. A name of the HttpRoute to delete. Must be in the format - * `projects/*/locations/global/httpRoutes/*`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\HttpRoute::initOnce(); - parent::__construct($data); - } - - /** - * Required. A name of the HttpRoute to delete. Must be in the format - * `projects/*/locations/global/httpRoutes/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. A name of the HttpRoute to delete. Must be in the format - * `projects/*/locations/global/httpRoutes/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/DeleteLbRouteExtensionRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/DeleteLbRouteExtensionRequest.php deleted file mode 100644 index 97d3ddce41ad..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/DeleteLbRouteExtensionRequest.php +++ /dev/null @@ -1,165 +0,0 @@ -google.cloud.networkservices.v1.DeleteLbRouteExtensionRequest - */ -class DeleteLbRouteExtensionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the `LbRouteExtension` resource to delete. Must be in - * the format - * `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server can ignore - * the request if it has already been completed. The server guarantees - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, ignores the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - */ - protected $request_id = ''; - - /** - * @param string $name Required. The name of the `LbRouteExtension` resource to delete. Must be in - * the format - * `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}`. Please see - * {@see DepServiceClient::lbRouteExtensionName()} for help formatting this field. - * - * @return \Google\Cloud\NetworkServices\V1\DeleteLbRouteExtensionRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the `LbRouteExtension` resource to delete. Must be in - * the format - * `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}`. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server can ignore - * the request if it has already been completed. The server guarantees - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, ignores the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\Dep::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the `LbRouteExtension` resource to delete. Must be in - * the format - * `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the `LbRouteExtension` resource to delete. Must be in - * the format - * `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server can ignore - * the request if it has already been completed. The server guarantees - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, ignores the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server can ignore - * the request if it has already been completed. The server guarantees - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, ignores the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/DeleteLbTrafficExtensionRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/DeleteLbTrafficExtensionRequest.php deleted file mode 100644 index ee2e63986c3f..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/DeleteLbTrafficExtensionRequest.php +++ /dev/null @@ -1,165 +0,0 @@ -google.cloud.networkservices.v1.DeleteLbTrafficExtensionRequest - */ -class DeleteLbTrafficExtensionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the `LbTrafficExtension` resource to delete. Must be - * in the format - * `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server can ignore - * the request if it has already been completed. The server guarantees - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, ignores the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - */ - protected $request_id = ''; - - /** - * @param string $name Required. The name of the `LbTrafficExtension` resource to delete. Must be - * in the format - * `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}`. Please see - * {@see DepServiceClient::lbTrafficExtensionName()} for help formatting this field. - * - * @return \Google\Cloud\NetworkServices\V1\DeleteLbTrafficExtensionRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the `LbTrafficExtension` resource to delete. Must be - * in the format - * `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}`. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server can ignore - * the request if it has already been completed. The server guarantees - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, ignores the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\Dep::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the `LbTrafficExtension` resource to delete. Must be - * in the format - * `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the `LbTrafficExtension` resource to delete. Must be - * in the format - * `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server can ignore - * the request if it has already been completed. The server guarantees - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, ignores the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server can ignore - * the request if it has already been completed. The server guarantees - * that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, ignores the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/DeleteMeshRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/DeleteMeshRequest.php deleted file mode 100644 index b7be12709d4b..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/DeleteMeshRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.networkservices.v1.DeleteMeshRequest - */ -class DeleteMeshRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A name of the Mesh to delete. Must be in the format - * `projects/*/locations/global/meshes/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. A name of the Mesh to delete. Must be in the format - * `projects/*/locations/global/meshes/*`. Please see - * {@see NetworkServicesClient::meshName()} for help formatting this field. - * - * @return \Google\Cloud\NetworkServices\V1\DeleteMeshRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. A name of the Mesh to delete. Must be in the format - * `projects/*/locations/global/meshes/*`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\Mesh::initOnce(); - parent::__construct($data); - } - - /** - * Required. A name of the Mesh to delete. Must be in the format - * `projects/*/locations/global/meshes/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. A name of the Mesh to delete. Must be in the format - * `projects/*/locations/global/meshes/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/DeleteServiceBindingRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/DeleteServiceBindingRequest.php deleted file mode 100644 index 8a3ba9b8d09b..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/DeleteServiceBindingRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.networkservices.v1.DeleteServiceBindingRequest - */ -class DeleteServiceBindingRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A name of the ServiceBinding to delete. Must be in the format - * `projects/*/locations/global/serviceBindings/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. A name of the ServiceBinding to delete. Must be in the format - * `projects/*/locations/global/serviceBindings/*`. Please see - * {@see NetworkServicesClient::serviceBindingName()} for help formatting this field. - * - * @return \Google\Cloud\NetworkServices\V1\DeleteServiceBindingRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. A name of the ServiceBinding to delete. Must be in the format - * `projects/*/locations/global/serviceBindings/*`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\ServiceBinding::initOnce(); - parent::__construct($data); - } - - /** - * Required. A name of the ServiceBinding to delete. Must be in the format - * `projects/*/locations/global/serviceBindings/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. A name of the ServiceBinding to delete. Must be in the format - * `projects/*/locations/global/serviceBindings/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/DeleteTcpRouteRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/DeleteTcpRouteRequest.php deleted file mode 100644 index 004019812ad5..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/DeleteTcpRouteRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.networkservices.v1.DeleteTcpRouteRequest - */ -class DeleteTcpRouteRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A name of the TcpRoute to delete. Must be in the format - * `projects/*/locations/global/tcpRoutes/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. A name of the TcpRoute to delete. Must be in the format - * `projects/*/locations/global/tcpRoutes/*`. Please see - * {@see NetworkServicesClient::tcpRouteName()} for help formatting this field. - * - * @return \Google\Cloud\NetworkServices\V1\DeleteTcpRouteRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. A name of the TcpRoute to delete. Must be in the format - * `projects/*/locations/global/tcpRoutes/*`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\TcpRoute::initOnce(); - parent::__construct($data); - } - - /** - * Required. A name of the TcpRoute to delete. Must be in the format - * `projects/*/locations/global/tcpRoutes/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. A name of the TcpRoute to delete. Must be in the format - * `projects/*/locations/global/tcpRoutes/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/DeleteTlsRouteRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/DeleteTlsRouteRequest.php deleted file mode 100644 index 107c2d2bc37b..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/DeleteTlsRouteRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.networkservices.v1.DeleteTlsRouteRequest - */ -class DeleteTlsRouteRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A name of the TlsRoute to delete. Must be in the format - * `projects/*/locations/global/tlsRoutes/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. A name of the TlsRoute to delete. Must be in the format - * `projects/*/locations/global/tlsRoutes/*`. Please see - * {@see NetworkServicesClient::tlsRouteName()} for help formatting this field. - * - * @return \Google\Cloud\NetworkServices\V1\DeleteTlsRouteRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. A name of the TlsRoute to delete. Must be in the format - * `projects/*/locations/global/tlsRoutes/*`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\TlsRoute::initOnce(); - parent::__construct($data); - } - - /** - * Required. A name of the TlsRoute to delete. Must be in the format - * `projects/*/locations/global/tlsRoutes/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. A name of the TlsRoute to delete. Must be in the format - * `projects/*/locations/global/tlsRoutes/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/EndpointMatcher.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/EndpointMatcher.php deleted file mode 100644 index e03be7be44e8..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/EndpointMatcher.php +++ /dev/null @@ -1,76 +0,0 @@ -google.cloud.networkservices.v1.EndpointMatcher - */ -class EndpointMatcher extends \Google\Protobuf\Internal\Message -{ - protected $matcher_type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\NetworkServices\V1\EndpointMatcher\MetadataLabelMatcher $metadata_label_matcher - * The matcher is based on node metadata presented by xDS clients. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\Common::initOnce(); - parent::__construct($data); - } - - /** - * The matcher is based on node metadata presented by xDS clients. - * - * Generated from protobuf field .google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcher metadata_label_matcher = 1; - * @return \Google\Cloud\NetworkServices\V1\EndpointMatcher\MetadataLabelMatcher|null - */ - public function getMetadataLabelMatcher() - { - return $this->readOneof(1); - } - - public function hasMetadataLabelMatcher() - { - return $this->hasOneof(1); - } - - /** - * The matcher is based on node metadata presented by xDS clients. - * - * Generated from protobuf field .google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcher metadata_label_matcher = 1; - * @param \Google\Cloud\NetworkServices\V1\EndpointMatcher\MetadataLabelMatcher $var - * @return $this - */ - public function setMetadataLabelMatcher($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkServices\V1\EndpointMatcher\MetadataLabelMatcher::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * @return string - */ - public function getMatcherType() - { - return $this->whichOneof("matcher_type"); - } - -} - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/EndpointMatcher/MetadataLabelMatcher.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/EndpointMatcher/MetadataLabelMatcher.php deleted file mode 100644 index dd0d98126ecf..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/EndpointMatcher/MetadataLabelMatcher.php +++ /dev/null @@ -1,196 +0,0 @@ -google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcher - */ -class MetadataLabelMatcher extends \Google\Protobuf\Internal\Message -{ - /** - * Specifies how matching should be done. - * Supported values are: - * MATCH_ANY: At least one of the Labels specified in the - * matcher should match the metadata presented by xDS client. - * MATCH_ALL: The metadata presented by the xDS client should - * contain all of the labels specified here. - * The selection is determined based on the best match. For - * example, suppose there are three EndpointPolicy - * resources P1, P2 and P3 and if P1 has a the matcher as - * MATCH_ANY , P2 has MATCH_ALL , and P3 has - * MATCH_ALL . - * If a client with label connects, the config from P1 - * will be selected. - * If a client with label connects, the config from P2 - * will be selected. - * If a client with label connects, the config - * from P3 will be selected. - * If there is more than one best match, (for example, if a - * config P4 with selector exists and if a client with - * label connects), an error will be thrown. - * - * Generated from protobuf field .google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcher.MetadataLabelMatchCriteria metadata_label_match_criteria = 1; - */ - protected $metadata_label_match_criteria = 0; - /** - * The list of label value pairs that must match labels in the - * provided metadata based on filterMatchCriteria This list can - * have at most 64 entries. The list can be empty if the match - * criteria is MATCH_ANY, to specify a wildcard match (i.e this - * matches any client). - * - * Generated from protobuf field repeated .google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcher.MetadataLabels metadata_labels = 2; - */ - private $metadata_labels; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $metadata_label_match_criteria - * Specifies how matching should be done. - * Supported values are: - * MATCH_ANY: At least one of the Labels specified in the - * matcher should match the metadata presented by xDS client. - * MATCH_ALL: The metadata presented by the xDS client should - * contain all of the labels specified here. - * The selection is determined based on the best match. For - * example, suppose there are three EndpointPolicy - * resources P1, P2 and P3 and if P1 has a the matcher as - * MATCH_ANY , P2 has MATCH_ALL , and P3 has - * MATCH_ALL . - * If a client with label connects, the config from P1 - * will be selected. - * If a client with label connects, the config from P2 - * will be selected. - * If a client with label connects, the config - * from P3 will be selected. - * If there is more than one best match, (for example, if a - * config P4 with selector exists and if a client with - * label connects), an error will be thrown. - * @type array<\Google\Cloud\NetworkServices\V1\EndpointMatcher\MetadataLabelMatcher\MetadataLabels>|\Google\Protobuf\Internal\RepeatedField $metadata_labels - * The list of label value pairs that must match labels in the - * provided metadata based on filterMatchCriteria This list can - * have at most 64 entries. The list can be empty if the match - * criteria is MATCH_ANY, to specify a wildcard match (i.e this - * matches any client). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\Common::initOnce(); - parent::__construct($data); - } - - /** - * Specifies how matching should be done. - * Supported values are: - * MATCH_ANY: At least one of the Labels specified in the - * matcher should match the metadata presented by xDS client. - * MATCH_ALL: The metadata presented by the xDS client should - * contain all of the labels specified here. - * The selection is determined based on the best match. For - * example, suppose there are three EndpointPolicy - * resources P1, P2 and P3 and if P1 has a the matcher as - * MATCH_ANY , P2 has MATCH_ALL , and P3 has - * MATCH_ALL . - * If a client with label connects, the config from P1 - * will be selected. - * If a client with label connects, the config from P2 - * will be selected. - * If a client with label connects, the config - * from P3 will be selected. - * If there is more than one best match, (for example, if a - * config P4 with selector exists and if a client with - * label connects), an error will be thrown. - * - * Generated from protobuf field .google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcher.MetadataLabelMatchCriteria metadata_label_match_criteria = 1; - * @return int - */ - public function getMetadataLabelMatchCriteria() - { - return $this->metadata_label_match_criteria; - } - - /** - * Specifies how matching should be done. - * Supported values are: - * MATCH_ANY: At least one of the Labels specified in the - * matcher should match the metadata presented by xDS client. - * MATCH_ALL: The metadata presented by the xDS client should - * contain all of the labels specified here. - * The selection is determined based on the best match. For - * example, suppose there are three EndpointPolicy - * resources P1, P2 and P3 and if P1 has a the matcher as - * MATCH_ANY , P2 has MATCH_ALL , and P3 has - * MATCH_ALL . - * If a client with label connects, the config from P1 - * will be selected. - * If a client with label connects, the config from P2 - * will be selected. - * If a client with label connects, the config - * from P3 will be selected. - * If there is more than one best match, (for example, if a - * config P4 with selector exists and if a client with - * label connects), an error will be thrown. - * - * Generated from protobuf field .google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcher.MetadataLabelMatchCriteria metadata_label_match_criteria = 1; - * @param int $var - * @return $this - */ - public function setMetadataLabelMatchCriteria($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\NetworkServices\V1\EndpointMatcher\MetadataLabelMatcher\MetadataLabelMatchCriteria::class); - $this->metadata_label_match_criteria = $var; - - return $this; - } - - /** - * The list of label value pairs that must match labels in the - * provided metadata based on filterMatchCriteria This list can - * have at most 64 entries. The list can be empty if the match - * criteria is MATCH_ANY, to specify a wildcard match (i.e this - * matches any client). - * - * Generated from protobuf field repeated .google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcher.MetadataLabels metadata_labels = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMetadataLabels() - { - return $this->metadata_labels; - } - - /** - * The list of label value pairs that must match labels in the - * provided metadata based on filterMatchCriteria This list can - * have at most 64 entries. The list can be empty if the match - * criteria is MATCH_ANY, to specify a wildcard match (i.e this - * matches any client). - * - * Generated from protobuf field repeated .google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcher.MetadataLabels metadata_labels = 2; - * @param array<\Google\Cloud\NetworkServices\V1\EndpointMatcher\MetadataLabelMatcher\MetadataLabels>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMetadataLabels($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkServices\V1\EndpointMatcher\MetadataLabelMatcher\MetadataLabels::class); - $this->metadata_labels = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(MetadataLabelMatcher::class, \Google\Cloud\NetworkServices\V1\EndpointMatcher_MetadataLabelMatcher::class); - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/EndpointMatcher/MetadataLabelMatcher/MetadataLabelMatchCriteria.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/EndpointMatcher/MetadataLabelMatcher/MetadataLabelMatchCriteria.php deleted file mode 100644 index efc8ad586af8..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/EndpointMatcher/MetadataLabelMatcher/MetadataLabelMatchCriteria.php +++ /dev/null @@ -1,66 +0,0 @@ -google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcher.MetadataLabelMatchCriteria - */ -class MetadataLabelMatchCriteria -{ - /** - * Default value. Should not be used. - * - * Generated from protobuf enum METADATA_LABEL_MATCH_CRITERIA_UNSPECIFIED = 0; - */ - const METADATA_LABEL_MATCH_CRITERIA_UNSPECIFIED = 0; - /** - * At least one of the Labels specified in the matcher should match the - * metadata presented by xDS client. - * - * Generated from protobuf enum MATCH_ANY = 1; - */ - const MATCH_ANY = 1; - /** - * The metadata presented by the xDS client should contain all of the - * labels specified here. - * - * Generated from protobuf enum MATCH_ALL = 2; - */ - const MATCH_ALL = 2; - - private static $valueToName = [ - self::METADATA_LABEL_MATCH_CRITERIA_UNSPECIFIED => 'METADATA_LABEL_MATCH_CRITERIA_UNSPECIFIED', - self::MATCH_ANY => 'MATCH_ANY', - self::MATCH_ALL => 'MATCH_ALL', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(MetadataLabelMatchCriteria::class, \Google\Cloud\NetworkServices\V1\EndpointMatcher_MetadataLabelMatcher_MetadataLabelMatchCriteria::class); - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/EndpointMatcher/MetadataLabelMatcher/MetadataLabels.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/EndpointMatcher/MetadataLabelMatcher/MetadataLabels.php deleted file mode 100644 index 46a7f1ae194f..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/EndpointMatcher/MetadataLabelMatcher/MetadataLabels.php +++ /dev/null @@ -1,108 +0,0 @@ -google.cloud.networkservices.v1.EndpointMatcher.MetadataLabelMatcher.MetadataLabels - */ -class MetadataLabels extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Label name presented as key in xDS Node Metadata. - * - * Generated from protobuf field string label_name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $label_name = ''; - /** - * Required. Label value presented as value corresponding to the above - * key, in xDS Node Metadata. - * - * Generated from protobuf field string label_value = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $label_value = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $label_name - * Required. Label name presented as key in xDS Node Metadata. - * @type string $label_value - * Required. Label value presented as value corresponding to the above - * key, in xDS Node Metadata. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\Common::initOnce(); - parent::__construct($data); - } - - /** - * Required. Label name presented as key in xDS Node Metadata. - * - * Generated from protobuf field string label_name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getLabelName() - { - return $this->label_name; - } - - /** - * Required. Label name presented as key in xDS Node Metadata. - * - * Generated from protobuf field string label_name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setLabelName($var) - { - GPBUtil::checkString($var, True); - $this->label_name = $var; - - return $this; - } - - /** - * Required. Label value presented as value corresponding to the above - * key, in xDS Node Metadata. - * - * Generated from protobuf field string label_value = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getLabelValue() - { - return $this->label_value; - } - - /** - * Required. Label value presented as value corresponding to the above - * key, in xDS Node Metadata. - * - * Generated from protobuf field string label_value = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setLabelValue($var) - { - GPBUtil::checkString($var, True); - $this->label_value = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(MetadataLabels::class, \Google\Cloud\NetworkServices\V1\EndpointMatcher_MetadataLabelMatcher_MetadataLabels::class); - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/EndpointPolicy.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/EndpointPolicy.php deleted file mode 100644 index 1bde99da2ce8..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/EndpointPolicy.php +++ /dev/null @@ -1,526 +0,0 @@ -google.cloud.networkservices.v1.EndpointPolicy - */ -class EndpointPolicy extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the EndpointPolicy resource. It matches pattern - * `projects/{project}/locations/global/endpointPolicies/{endpoint_policy}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Output only. The timestamp when the resource was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The timestamp when the resource was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Optional. Set of label tags associated with the EndpointPolicy resource. - * - * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - /** - * Required. The type of endpoint policy. This is primarily used to validate - * the configuration. - * - * Generated from protobuf field .google.cloud.networkservices.v1.EndpointPolicy.EndpointPolicyType type = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $type = 0; - /** - * Optional. This field specifies the URL of AuthorizationPolicy resource that - * applies authorization policies to the inbound traffic at the - * matched endpoints. Refer to Authorization. If this field is not - * specified, authorization is disabled(no authz checks) for this - * endpoint. - * - * Generated from protobuf field string authorization_policy = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - protected $authorization_policy = ''; - /** - * Required. A matcher that selects endpoints to which the policies should be - * applied. - * - * Generated from protobuf field .google.cloud.networkservices.v1.EndpointMatcher endpoint_matcher = 9 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $endpoint_matcher = null; - /** - * Optional. Port selector for the (matched) endpoints. If no port selector is - * provided, the matched config is applied to all ports. - * - * Generated from protobuf field .google.cloud.networkservices.v1.TrafficPortSelector traffic_port_selector = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $traffic_port_selector = null; - /** - * Optional. A free-text description of the resource. Max length 1024 - * characters. - * - * Generated from protobuf field string description = 11 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Optional. A URL referring to ServerTlsPolicy resource. ServerTlsPolicy is - * used to determine the authentication policy to be applied to terminate the - * inbound traffic at the identified backends. If this field is not set, - * authentication is disabled(open) for this endpoint. - * - * Generated from protobuf field string server_tls_policy = 12 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - protected $server_tls_policy = ''; - /** - * Optional. A URL referring to a ClientTlsPolicy resource. ClientTlsPolicy - * can be set to specify the authentication for traffic from the proxy to the - * actual endpoints. More specifically, it is applied to the outgoing traffic - * from the proxy to the endpoint. This is typically used for sidecar model - * where the proxy identifies itself as endpoint to the control plane, with - * the connection between sidecar and endpoint requiring authentication. If - * this field is not set, authentication is disabled(open). Applicable only - * when EndpointPolicyType is SIDECAR_PROXY. - * - * Generated from protobuf field string client_tls_policy = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - protected $client_tls_policy = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the EndpointPolicy resource. It matches pattern - * `projects/{project}/locations/global/endpointPolicies/{endpoint_policy}`. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The timestamp when the resource was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The timestamp when the resource was updated. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. Set of label tags associated with the EndpointPolicy resource. - * @type int $type - * Required. The type of endpoint policy. This is primarily used to validate - * the configuration. - * @type string $authorization_policy - * Optional. This field specifies the URL of AuthorizationPolicy resource that - * applies authorization policies to the inbound traffic at the - * matched endpoints. Refer to Authorization. If this field is not - * specified, authorization is disabled(no authz checks) for this - * endpoint. - * @type \Google\Cloud\NetworkServices\V1\EndpointMatcher $endpoint_matcher - * Required. A matcher that selects endpoints to which the policies should be - * applied. - * @type \Google\Cloud\NetworkServices\V1\TrafficPortSelector $traffic_port_selector - * Optional. Port selector for the (matched) endpoints. If no port selector is - * provided, the matched config is applied to all ports. - * @type string $description - * Optional. A free-text description of the resource. Max length 1024 - * characters. - * @type string $server_tls_policy - * Optional. A URL referring to ServerTlsPolicy resource. ServerTlsPolicy is - * used to determine the authentication policy to be applied to terminate the - * inbound traffic at the identified backends. If this field is not set, - * authentication is disabled(open) for this endpoint. - * @type string $client_tls_policy - * Optional. A URL referring to a ClientTlsPolicy resource. ClientTlsPolicy - * can be set to specify the authentication for traffic from the proxy to the - * actual endpoints. More specifically, it is applied to the outgoing traffic - * from the proxy to the endpoint. This is typically used for sidecar model - * where the proxy identifies itself as endpoint to the control plane, with - * the connection between sidecar and endpoint requiring authentication. If - * this field is not set, authentication is disabled(open). Applicable only - * when EndpointPolicyType is SIDECAR_PROXY. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\EndpointPolicy::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the EndpointPolicy resource. It matches pattern - * `projects/{project}/locations/global/endpointPolicies/{endpoint_policy}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the EndpointPolicy resource. It matches pattern - * `projects/{project}/locations/global/endpointPolicies/{endpoint_policy}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. The timestamp when the resource was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The timestamp when the resource was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The timestamp when the resource was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The timestamp when the resource was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Optional. Set of label tags associated with the EndpointPolicy resource. - * - * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. Set of label tags associated with the EndpointPolicy resource. - * - * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Required. The type of endpoint policy. This is primarily used to validate - * the configuration. - * - * Generated from protobuf field .google.cloud.networkservices.v1.EndpointPolicy.EndpointPolicyType type = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Required. The type of endpoint policy. This is primarily used to validate - * the configuration. - * - * Generated from protobuf field .google.cloud.networkservices.v1.EndpointPolicy.EndpointPolicyType type = 5 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\NetworkServices\V1\EndpointPolicy\EndpointPolicyType::class); - $this->type = $var; - - return $this; - } - - /** - * Optional. This field specifies the URL of AuthorizationPolicy resource that - * applies authorization policies to the inbound traffic at the - * matched endpoints. Refer to Authorization. If this field is not - * specified, authorization is disabled(no authz checks) for this - * endpoint. - * - * Generated from protobuf field string authorization_policy = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return string - */ - public function getAuthorizationPolicy() - { - return $this->authorization_policy; - } - - /** - * Optional. This field specifies the URL of AuthorizationPolicy resource that - * applies authorization policies to the inbound traffic at the - * matched endpoints. Refer to Authorization. If this field is not - * specified, authorization is disabled(no authz checks) for this - * endpoint. - * - * Generated from protobuf field string authorization_policy = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setAuthorizationPolicy($var) - { - GPBUtil::checkString($var, True); - $this->authorization_policy = $var; - - return $this; - } - - /** - * Required. A matcher that selects endpoints to which the policies should be - * applied. - * - * Generated from protobuf field .google.cloud.networkservices.v1.EndpointMatcher endpoint_matcher = 9 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\NetworkServices\V1\EndpointMatcher|null - */ - public function getEndpointMatcher() - { - return $this->endpoint_matcher; - } - - public function hasEndpointMatcher() - { - return isset($this->endpoint_matcher); - } - - public function clearEndpointMatcher() - { - unset($this->endpoint_matcher); - } - - /** - * Required. A matcher that selects endpoints to which the policies should be - * applied. - * - * Generated from protobuf field .google.cloud.networkservices.v1.EndpointMatcher endpoint_matcher = 9 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\NetworkServices\V1\EndpointMatcher $var - * @return $this - */ - public function setEndpointMatcher($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkServices\V1\EndpointMatcher::class); - $this->endpoint_matcher = $var; - - return $this; - } - - /** - * Optional. Port selector for the (matched) endpoints. If no port selector is - * provided, the matched config is applied to all ports. - * - * Generated from protobuf field .google.cloud.networkservices.v1.TrafficPortSelector traffic_port_selector = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\NetworkServices\V1\TrafficPortSelector|null - */ - public function getTrafficPortSelector() - { - return $this->traffic_port_selector; - } - - public function hasTrafficPortSelector() - { - return isset($this->traffic_port_selector); - } - - public function clearTrafficPortSelector() - { - unset($this->traffic_port_selector); - } - - /** - * Optional. Port selector for the (matched) endpoints. If no port selector is - * provided, the matched config is applied to all ports. - * - * Generated from protobuf field .google.cloud.networkservices.v1.TrafficPortSelector traffic_port_selector = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\NetworkServices\V1\TrafficPortSelector $var - * @return $this - */ - public function setTrafficPortSelector($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkServices\V1\TrafficPortSelector::class); - $this->traffic_port_selector = $var; - - return $this; - } - - /** - * Optional. A free-text description of the resource. Max length 1024 - * characters. - * - * Generated from protobuf field string description = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. A free-text description of the resource. Max length 1024 - * characters. - * - * Generated from protobuf field string description = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Optional. A URL referring to ServerTlsPolicy resource. ServerTlsPolicy is - * used to determine the authentication policy to be applied to terminate the - * inbound traffic at the identified backends. If this field is not set, - * authentication is disabled(open) for this endpoint. - * - * Generated from protobuf field string server_tls_policy = 12 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return string - */ - public function getServerTlsPolicy() - { - return $this->server_tls_policy; - } - - /** - * Optional. A URL referring to ServerTlsPolicy resource. ServerTlsPolicy is - * used to determine the authentication policy to be applied to terminate the - * inbound traffic at the identified backends. If this field is not set, - * authentication is disabled(open) for this endpoint. - * - * Generated from protobuf field string server_tls_policy = 12 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setServerTlsPolicy($var) - { - GPBUtil::checkString($var, True); - $this->server_tls_policy = $var; - - return $this; - } - - /** - * Optional. A URL referring to a ClientTlsPolicy resource. ClientTlsPolicy - * can be set to specify the authentication for traffic from the proxy to the - * actual endpoints. More specifically, it is applied to the outgoing traffic - * from the proxy to the endpoint. This is typically used for sidecar model - * where the proxy identifies itself as endpoint to the control plane, with - * the connection between sidecar and endpoint requiring authentication. If - * this field is not set, authentication is disabled(open). Applicable only - * when EndpointPolicyType is SIDECAR_PROXY. - * - * Generated from protobuf field string client_tls_policy = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return string - */ - public function getClientTlsPolicy() - { - return $this->client_tls_policy; - } - - /** - * Optional. A URL referring to a ClientTlsPolicy resource. ClientTlsPolicy - * can be set to specify the authentication for traffic from the proxy to the - * actual endpoints. More specifically, it is applied to the outgoing traffic - * from the proxy to the endpoint. This is typically used for sidecar model - * where the proxy identifies itself as endpoint to the control plane, with - * the connection between sidecar and endpoint requiring authentication. If - * this field is not set, authentication is disabled(open). Applicable only - * when EndpointPolicyType is SIDECAR_PROXY. - * - * Generated from protobuf field string client_tls_policy = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setClientTlsPolicy($var) - { - GPBUtil::checkString($var, True); - $this->client_tls_policy = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/EndpointPolicy/EndpointPolicyType.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/EndpointPolicy/EndpointPolicyType.php deleted file mode 100644 index 98d7dae9e798..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/EndpointPolicy/EndpointPolicyType.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.networkservices.v1.EndpointPolicy.EndpointPolicyType - */ -class EndpointPolicyType -{ - /** - * Default value. Must not be used. - * - * Generated from protobuf enum ENDPOINT_POLICY_TYPE_UNSPECIFIED = 0; - */ - const ENDPOINT_POLICY_TYPE_UNSPECIFIED = 0; - /** - * Represents a proxy deployed as a sidecar. - * - * Generated from protobuf enum SIDECAR_PROXY = 1; - */ - const SIDECAR_PROXY = 1; - /** - * Represents a proxyless gRPC backend. - * - * Generated from protobuf enum GRPC_SERVER = 2; - */ - const GRPC_SERVER = 2; - - private static $valueToName = [ - self::ENDPOINT_POLICY_TYPE_UNSPECIFIED => 'ENDPOINT_POLICY_TYPE_UNSPECIFIED', - self::SIDECAR_PROXY => 'SIDECAR_PROXY', - self::GRPC_SERVER => 'GRPC_SERVER', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(EndpointPolicyType::class, \Google\Cloud\NetworkServices\V1\EndpointPolicy_EndpointPolicyType::class); - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/EventType.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/EventType.php deleted file mode 100644 index fd2bd9ecfea8..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/EventType.php +++ /dev/null @@ -1,95 +0,0 @@ -google.cloud.networkservices.v1.EventType - */ -class EventType -{ - /** - * Unspecified value. Do not use. - * - * Generated from protobuf enum EVENT_TYPE_UNSPECIFIED = 0; - */ - const EVENT_TYPE_UNSPECIFIED = 0; - /** - * If included in `supported_events`, - * the extension is called when the HTTP request headers arrive. - * - * Generated from protobuf enum REQUEST_HEADERS = 1; - */ - const REQUEST_HEADERS = 1; - /** - * If included in `supported_events`, - * the extension is called when the HTTP request body arrives. - * - * Generated from protobuf enum REQUEST_BODY = 2; - */ - const REQUEST_BODY = 2; - /** - * If included in `supported_events`, - * the extension is called when the HTTP response headers arrive. - * - * Generated from protobuf enum RESPONSE_HEADERS = 3; - */ - const RESPONSE_HEADERS = 3; - /** - * If included in `supported_events`, - * the extension is called when the HTTP response body arrives. - * - * Generated from protobuf enum RESPONSE_BODY = 4; - */ - const RESPONSE_BODY = 4; - /** - * If included in `supported_events`, - * the extension is called when the HTTP request trailers arrives. - * - * Generated from protobuf enum REQUEST_TRAILERS = 5; - */ - const REQUEST_TRAILERS = 5; - /** - * If included in `supported_events`, - * the extension is called when the HTTP response trailers arrives. - * - * Generated from protobuf enum RESPONSE_TRAILERS = 6; - */ - const RESPONSE_TRAILERS = 6; - - private static $valueToName = [ - self::EVENT_TYPE_UNSPECIFIED => 'EVENT_TYPE_UNSPECIFIED', - self::REQUEST_HEADERS => 'REQUEST_HEADERS', - self::REQUEST_BODY => 'REQUEST_BODY', - self::RESPONSE_HEADERS => 'RESPONSE_HEADERS', - self::RESPONSE_BODY => 'RESPONSE_BODY', - self::REQUEST_TRAILERS => 'REQUEST_TRAILERS', - self::RESPONSE_TRAILERS => 'RESPONSE_TRAILERS', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ExtensionChain.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ExtensionChain.php deleted file mode 100644 index 4da12b6f0838..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ExtensionChain.php +++ /dev/null @@ -1,182 +0,0 @@ -google.cloud.networkservices.v1.ExtensionChain - */ -class ExtensionChain extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name for this extension chain. - * The name is logged as part of the HTTP request logs. - * The name must conform with RFC-1034, is restricted to lower-cased letters, - * numbers and hyphens, and can have a maximum length of 63 characters. - * Additionally, the first character must be a letter and the last a letter or - * a number. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Required. Conditions under which this chain is invoked for a request. - * - * Generated from protobuf field .google.cloud.networkservices.v1.ExtensionChain.MatchCondition match_condition = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $match_condition = null; - /** - * Required. A set of extensions to execute for the matching request. - * At least one extension is required. - * Up to 3 extensions can be defined for each extension chain - * for `LbTrafficExtension` resource. - * `LbRouteExtension` chains are limited to 1 extension per extension chain. - * - * Generated from protobuf field repeated .google.cloud.networkservices.v1.ExtensionChain.Extension extensions = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - private $extensions; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name for this extension chain. - * The name is logged as part of the HTTP request logs. - * The name must conform with RFC-1034, is restricted to lower-cased letters, - * numbers and hyphens, and can have a maximum length of 63 characters. - * Additionally, the first character must be a letter and the last a letter or - * a number. - * @type \Google\Cloud\NetworkServices\V1\ExtensionChain\MatchCondition $match_condition - * Required. Conditions under which this chain is invoked for a request. - * @type array<\Google\Cloud\NetworkServices\V1\ExtensionChain\Extension>|\Google\Protobuf\Internal\RepeatedField $extensions - * Required. A set of extensions to execute for the matching request. - * At least one extension is required. - * Up to 3 extensions can be defined for each extension chain - * for `LbTrafficExtension` resource. - * `LbRouteExtension` chains are limited to 1 extension per extension chain. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\Dep::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name for this extension chain. - * The name is logged as part of the HTTP request logs. - * The name must conform with RFC-1034, is restricted to lower-cased letters, - * numbers and hyphens, and can have a maximum length of 63 characters. - * Additionally, the first character must be a letter and the last a letter or - * a number. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name for this extension chain. - * The name is logged as part of the HTTP request logs. - * The name must conform with RFC-1034, is restricted to lower-cased letters, - * numbers and hyphens, and can have a maximum length of 63 characters. - * Additionally, the first character must be a letter and the last a letter or - * a number. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. Conditions under which this chain is invoked for a request. - * - * Generated from protobuf field .google.cloud.networkservices.v1.ExtensionChain.MatchCondition match_condition = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\NetworkServices\V1\ExtensionChain\MatchCondition|null - */ - public function getMatchCondition() - { - return $this->match_condition; - } - - public function hasMatchCondition() - { - return isset($this->match_condition); - } - - public function clearMatchCondition() - { - unset($this->match_condition); - } - - /** - * Required. Conditions under which this chain is invoked for a request. - * - * Generated from protobuf field .google.cloud.networkservices.v1.ExtensionChain.MatchCondition match_condition = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\NetworkServices\V1\ExtensionChain\MatchCondition $var - * @return $this - */ - public function setMatchCondition($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkServices\V1\ExtensionChain\MatchCondition::class); - $this->match_condition = $var; - - return $this; - } - - /** - * Required. A set of extensions to execute for the matching request. - * At least one extension is required. - * Up to 3 extensions can be defined for each extension chain - * for `LbTrafficExtension` resource. - * `LbRouteExtension` chains are limited to 1 extension per extension chain. - * - * Generated from protobuf field repeated .google.cloud.networkservices.v1.ExtensionChain.Extension extensions = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getExtensions() - { - return $this->extensions; - } - - /** - * Required. A set of extensions to execute for the matching request. - * At least one extension is required. - * Up to 3 extensions can be defined for each extension chain - * for `LbTrafficExtension` resource. - * `LbRouteExtension` chains are limited to 1 extension per extension chain. - * - * Generated from protobuf field repeated .google.cloud.networkservices.v1.ExtensionChain.Extension extensions = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param array<\Google\Cloud\NetworkServices\V1\ExtensionChain\Extension>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setExtensions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkServices\V1\ExtensionChain\Extension::class); - $this->extensions = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ExtensionChain/Extension.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ExtensionChain/Extension.php deleted file mode 100644 index d2820bcd18b7..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ExtensionChain/Extension.php +++ /dev/null @@ -1,416 +0,0 @@ -google.cloud.networkservices.v1.ExtensionChain.Extension - */ -class Extension extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name for this extension. - * The name is logged as part of the HTTP request logs. - * The name must conform with RFC-1034, is restricted to lower-cased - * letters, numbers and hyphens, and can have a maximum length of 63 - * characters. Additionally, the first character must be a letter and the - * last a letter or a number. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Optional. The `:authority` header in the gRPC request sent from Envoy - * to the extension service. - * Required for Callout extensions. - * - * Generated from protobuf field string authority = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $authority = ''; - /** - * Required. The reference to the service that runs the extension. - * Currently only callout extensions are supported here. - * To configure a callout extension, `service` must be a fully-qualified - * reference - * to a [backend - * service](https://cloud.google.com/compute/docs/reference/rest/v1/backendServices) - * in the format: - * `https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/backendServices/{backendService}` - * or - * `https://www.googleapis.com/compute/v1/projects/{project}/global/backendServices/{backendService}`. - * - * Generated from protobuf field string service = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $service = ''; - /** - * Optional. A set of events during request or response processing for which - * this extension is called. This field is required for the - * `LbTrafficExtension` resource. It must not be set for the - * `LbRouteExtension` resource. - * - * Generated from protobuf field repeated .google.cloud.networkservices.v1.EventType supported_events = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $supported_events; - /** - * Optional. Specifies the timeout for each individual message on the - * stream. The timeout must be between 10-1000 milliseconds. Required for - * Callout extensions. - * - * Generated from protobuf field .google.protobuf.Duration timeout = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $timeout = null; - /** - * Optional. Determines how the proxy behaves if the call to the extension - * fails or times out. - * When set to `TRUE`, request or response processing continues without - * error. Any subsequent extensions in the extension chain are also - * executed. When set to `FALSE` or the default setting of `FALSE` is used, - * one of the following happens: - * * If response headers have not been delivered to the downstream client, - * a generic 500 error is returned to the client. The error response can be - * tailored by configuring a custom error response in the load balancer. - * * If response headers have been delivered, then the HTTP stream to the - * downstream client is reset. - * - * Generated from protobuf field bool fail_open = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $fail_open = false; - /** - * Optional. List of the HTTP headers to forward to the extension - * (from the client or backend). If omitted, all headers are sent. - * Each element is a string indicating the header name. - * - * Generated from protobuf field repeated string forward_headers = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $forward_headers; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name for this extension. - * The name is logged as part of the HTTP request logs. - * The name must conform with RFC-1034, is restricted to lower-cased - * letters, numbers and hyphens, and can have a maximum length of 63 - * characters. Additionally, the first character must be a letter and the - * last a letter or a number. - * @type string $authority - * Optional. The `:authority` header in the gRPC request sent from Envoy - * to the extension service. - * Required for Callout extensions. - * @type string $service - * Required. The reference to the service that runs the extension. - * Currently only callout extensions are supported here. - * To configure a callout extension, `service` must be a fully-qualified - * reference - * to a [backend - * service](https://cloud.google.com/compute/docs/reference/rest/v1/backendServices) - * in the format: - * `https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/backendServices/{backendService}` - * or - * `https://www.googleapis.com/compute/v1/projects/{project}/global/backendServices/{backendService}`. - * @type array|\Google\Protobuf\Internal\RepeatedField $supported_events - * Optional. A set of events during request or response processing for which - * this extension is called. This field is required for the - * `LbTrafficExtension` resource. It must not be set for the - * `LbRouteExtension` resource. - * @type \Google\Protobuf\Duration $timeout - * Optional. Specifies the timeout for each individual message on the - * stream. The timeout must be between 10-1000 milliseconds. Required for - * Callout extensions. - * @type bool $fail_open - * Optional. Determines how the proxy behaves if the call to the extension - * fails or times out. - * When set to `TRUE`, request or response processing continues without - * error. Any subsequent extensions in the extension chain are also - * executed. When set to `FALSE` or the default setting of `FALSE` is used, - * one of the following happens: - * * If response headers have not been delivered to the downstream client, - * a generic 500 error is returned to the client. The error response can be - * tailored by configuring a custom error response in the load balancer. - * * If response headers have been delivered, then the HTTP stream to the - * downstream client is reset. - * @type array|\Google\Protobuf\Internal\RepeatedField $forward_headers - * Optional. List of the HTTP headers to forward to the extension - * (from the client or backend). If omitted, all headers are sent. - * Each element is a string indicating the header name. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\Dep::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name for this extension. - * The name is logged as part of the HTTP request logs. - * The name must conform with RFC-1034, is restricted to lower-cased - * letters, numbers and hyphens, and can have a maximum length of 63 - * characters. Additionally, the first character must be a letter and the - * last a letter or a number. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name for this extension. - * The name is logged as part of the HTTP request logs. - * The name must conform with RFC-1034, is restricted to lower-cased - * letters, numbers and hyphens, and can have a maximum length of 63 - * characters. Additionally, the first character must be a letter and the - * last a letter or a number. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. The `:authority` header in the gRPC request sent from Envoy - * to the extension service. - * Required for Callout extensions. - * - * Generated from protobuf field string authority = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getAuthority() - { - return $this->authority; - } - - /** - * Optional. The `:authority` header in the gRPC request sent from Envoy - * to the extension service. - * Required for Callout extensions. - * - * Generated from protobuf field string authority = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setAuthority($var) - { - GPBUtil::checkString($var, True); - $this->authority = $var; - - return $this; - } - - /** - * Required. The reference to the service that runs the extension. - * Currently only callout extensions are supported here. - * To configure a callout extension, `service` must be a fully-qualified - * reference - * to a [backend - * service](https://cloud.google.com/compute/docs/reference/rest/v1/backendServices) - * in the format: - * `https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/backendServices/{backendService}` - * or - * `https://www.googleapis.com/compute/v1/projects/{project}/global/backendServices/{backendService}`. - * - * Generated from protobuf field string service = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getService() - { - return $this->service; - } - - /** - * Required. The reference to the service that runs the extension. - * Currently only callout extensions are supported here. - * To configure a callout extension, `service` must be a fully-qualified - * reference - * to a [backend - * service](https://cloud.google.com/compute/docs/reference/rest/v1/backendServices) - * in the format: - * `https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/backendServices/{backendService}` - * or - * `https://www.googleapis.com/compute/v1/projects/{project}/global/backendServices/{backendService}`. - * - * Generated from protobuf field string service = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setService($var) - { - GPBUtil::checkString($var, True); - $this->service = $var; - - return $this; - } - - /** - * Optional. A set of events during request or response processing for which - * this extension is called. This field is required for the - * `LbTrafficExtension` resource. It must not be set for the - * `LbRouteExtension` resource. - * - * Generated from protobuf field repeated .google.cloud.networkservices.v1.EventType supported_events = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSupportedEvents() - { - return $this->supported_events; - } - - /** - * Optional. A set of events during request or response processing for which - * this extension is called. This field is required for the - * `LbTrafficExtension` resource. It must not be set for the - * `LbRouteExtension` resource. - * - * Generated from protobuf field repeated .google.cloud.networkservices.v1.EventType supported_events = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSupportedEvents($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\NetworkServices\V1\EventType::class); - $this->supported_events = $arr; - - return $this; - } - - /** - * Optional. Specifies the timeout for each individual message on the - * stream. The timeout must be between 10-1000 milliseconds. Required for - * Callout extensions. - * - * Generated from protobuf field .google.protobuf.Duration timeout = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Duration|null - */ - public function getTimeout() - { - return $this->timeout; - } - - public function hasTimeout() - { - return isset($this->timeout); - } - - public function clearTimeout() - { - unset($this->timeout); - } - - /** - * Optional. Specifies the timeout for each individual message on the - * stream. The timeout must be between 10-1000 milliseconds. Required for - * Callout extensions. - * - * Generated from protobuf field .google.protobuf.Duration timeout = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setTimeout($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->timeout = $var; - - return $this; - } - - /** - * Optional. Determines how the proxy behaves if the call to the extension - * fails or times out. - * When set to `TRUE`, request or response processing continues without - * error. Any subsequent extensions in the extension chain are also - * executed. When set to `FALSE` or the default setting of `FALSE` is used, - * one of the following happens: - * * If response headers have not been delivered to the downstream client, - * a generic 500 error is returned to the client. The error response can be - * tailored by configuring a custom error response in the load balancer. - * * If response headers have been delivered, then the HTTP stream to the - * downstream client is reset. - * - * Generated from protobuf field bool fail_open = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getFailOpen() - { - return $this->fail_open; - } - - /** - * Optional. Determines how the proxy behaves if the call to the extension - * fails or times out. - * When set to `TRUE`, request or response processing continues without - * error. Any subsequent extensions in the extension chain are also - * executed. When set to `FALSE` or the default setting of `FALSE` is used, - * one of the following happens: - * * If response headers have not been delivered to the downstream client, - * a generic 500 error is returned to the client. The error response can be - * tailored by configuring a custom error response in the load balancer. - * * If response headers have been delivered, then the HTTP stream to the - * downstream client is reset. - * - * Generated from protobuf field bool fail_open = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setFailOpen($var) - { - GPBUtil::checkBool($var); - $this->fail_open = $var; - - return $this; - } - - /** - * Optional. List of the HTTP headers to forward to the extension - * (from the client or backend). If omitted, all headers are sent. - * Each element is a string indicating the header name. - * - * Generated from protobuf field repeated string forward_headers = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getForwardHeaders() - { - return $this->forward_headers; - } - - /** - * Optional. List of the HTTP headers to forward to the extension - * (from the client or backend). If omitted, all headers are sent. - * Each element is a string indicating the header name. - * - * Generated from protobuf field repeated string forward_headers = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setForwardHeaders($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->forward_headers = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Extension::class, \Google\Cloud\NetworkServices\V1\ExtensionChain_Extension::class); - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ExtensionChain/MatchCondition.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ExtensionChain/MatchCondition.php deleted file mode 100644 index b6cffb76dc23..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ExtensionChain/MatchCondition.php +++ /dev/null @@ -1,82 +0,0 @@ -google.cloud.networkservices.v1.ExtensionChain.MatchCondition - */ -class MatchCondition extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A Common Expression Language (CEL) expression that is used to - * match requests for which the extension chain is executed. - * For more information, see [CEL matcher language - * reference](https://cloud.google.com/service-extensions/docs/cel-matcher-language-reference). - * - * Generated from protobuf field string cel_expression = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $cel_expression = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $cel_expression - * Required. A Common Expression Language (CEL) expression that is used to - * match requests for which the extension chain is executed. - * For more information, see [CEL matcher language - * reference](https://cloud.google.com/service-extensions/docs/cel-matcher-language-reference). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\Dep::initOnce(); - parent::__construct($data); - } - - /** - * Required. A Common Expression Language (CEL) expression that is used to - * match requests for which the extension chain is executed. - * For more information, see [CEL matcher language - * reference](https://cloud.google.com/service-extensions/docs/cel-matcher-language-reference). - * - * Generated from protobuf field string cel_expression = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getCelExpression() - { - return $this->cel_expression; - } - - /** - * Required. A Common Expression Language (CEL) expression that is used to - * match requests for which the extension chain is executed. - * For more information, see [CEL matcher language - * reference](https://cloud.google.com/service-extensions/docs/cel-matcher-language-reference). - * - * Generated from protobuf field string cel_expression = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setCelExpression($var) - { - GPBUtil::checkString($var, True); - $this->cel_expression = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(MatchCondition::class, \Google\Cloud\NetworkServices\V1\ExtensionChain_MatchCondition::class); - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/Gateway.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/Gateway.php deleted file mode 100644 index 234827599ae4..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/Gateway.php +++ /dev/null @@ -1,444 +0,0 @@ -google.cloud.networkservices.v1.Gateway - */ -class Gateway extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the Gateway resource. It matches pattern - * `projects/*/locations/*/gateways/`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Output only. Server-defined URL of this resource - * - * Generated from protobuf field string self_link = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $self_link = ''; - /** - * Output only. The timestamp when the resource was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The timestamp when the resource was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Optional. Set of label tags associated with the Gateway resource. - * - * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - /** - * Optional. A free-text description of the resource. Max length 1024 - * characters. - * - * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Immutable. The type of the customer managed gateway. - * This field is required. If unspecified, an error is returned. - * - * Generated from protobuf field .google.cloud.networkservices.v1.Gateway.Type type = 6 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $type = 0; - /** - * Required. One or more ports that the Gateway must receive traffic on. The - * proxy binds to the ports specified. Gateway listen on 0.0.0.0 on the ports - * specified below. - * - * Generated from protobuf field repeated int32 ports = 11 [(.google.api.field_behavior) = REQUIRED]; - */ - private $ports; - /** - * Required. Immutable. Scope determines how configuration across multiple - * Gateway instances are merged. The configuration for multiple Gateway - * instances with the same scope will be merged as presented as a single - * coniguration to the proxy/load balancer. - * Max length 64 characters. - * Scope should start with a letter and can only have letters, numbers, - * hyphens. - * - * Generated from protobuf field string scope = 8 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - */ - protected $scope = ''; - /** - * Optional. A fully-qualified ServerTLSPolicy URL reference. Specifies how - * TLS traffic is terminated. If empty, TLS termination is disabled. - * - * Generated from protobuf field string server_tls_policy = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $server_tls_policy = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the Gateway resource. It matches pattern - * `projects/*/locations/*/gateways/`. - * @type string $self_link - * Output only. Server-defined URL of this resource - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The timestamp when the resource was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The timestamp when the resource was updated. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. Set of label tags associated with the Gateway resource. - * @type string $description - * Optional. A free-text description of the resource. Max length 1024 - * characters. - * @type int $type - * Immutable. The type of the customer managed gateway. - * This field is required. If unspecified, an error is returned. - * @type array|\Google\Protobuf\Internal\RepeatedField $ports - * Required. One or more ports that the Gateway must receive traffic on. The - * proxy binds to the ports specified. Gateway listen on 0.0.0.0 on the ports - * specified below. - * @type string $scope - * Required. Immutable. Scope determines how configuration across multiple - * Gateway instances are merged. The configuration for multiple Gateway - * instances with the same scope will be merged as presented as a single - * coniguration to the proxy/load balancer. - * Max length 64 characters. - * Scope should start with a letter and can only have letters, numbers, - * hyphens. - * @type string $server_tls_policy - * Optional. A fully-qualified ServerTLSPolicy URL reference. Specifies how - * TLS traffic is terminated. If empty, TLS termination is disabled. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\Gateway::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the Gateway resource. It matches pattern - * `projects/*/locations/*/gateways/`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the Gateway resource. It matches pattern - * `projects/*/locations/*/gateways/`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. Server-defined URL of this resource - * - * Generated from protobuf field string self_link = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getSelfLink() - { - return $this->self_link; - } - - /** - * Output only. Server-defined URL of this resource - * - * Generated from protobuf field string self_link = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setSelfLink($var) - { - GPBUtil::checkString($var, True); - $this->self_link = $var; - - return $this; - } - - /** - * Output only. The timestamp when the resource was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The timestamp when the resource was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The timestamp when the resource was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The timestamp when the resource was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Optional. Set of label tags associated with the Gateway resource. - * - * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. Set of label tags associated with the Gateway resource. - * - * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Optional. A free-text description of the resource. Max length 1024 - * characters. - * - * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. A free-text description of the resource. Max length 1024 - * characters. - * - * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Immutable. The type of the customer managed gateway. - * This field is required. If unspecified, an error is returned. - * - * Generated from protobuf field .google.cloud.networkservices.v1.Gateway.Type type = 6 [(.google.api.field_behavior) = IMMUTABLE]; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Immutable. The type of the customer managed gateway. - * This field is required. If unspecified, an error is returned. - * - * Generated from protobuf field .google.cloud.networkservices.v1.Gateway.Type type = 6 [(.google.api.field_behavior) = IMMUTABLE]; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\NetworkServices\V1\Gateway\Type::class); - $this->type = $var; - - return $this; - } - - /** - * Required. One or more ports that the Gateway must receive traffic on. The - * proxy binds to the ports specified. Gateway listen on 0.0.0.0 on the ports - * specified below. - * - * Generated from protobuf field repeated int32 ports = 11 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPorts() - { - return $this->ports; - } - - /** - * Required. One or more ports that the Gateway must receive traffic on. The - * proxy binds to the ports specified. Gateway listen on 0.0.0.0 on the ports - * specified below. - * - * Generated from protobuf field repeated int32 ports = 11 [(.google.api.field_behavior) = REQUIRED]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPorts($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); - $this->ports = $arr; - - return $this; - } - - /** - * Required. Immutable. Scope determines how configuration across multiple - * Gateway instances are merged. The configuration for multiple Gateway - * instances with the same scope will be merged as presented as a single - * coniguration to the proxy/load balancer. - * Max length 64 characters. - * Scope should start with a letter and can only have letters, numbers, - * hyphens. - * - * Generated from protobuf field string scope = 8 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getScope() - { - return $this->scope; - } - - /** - * Required. Immutable. Scope determines how configuration across multiple - * Gateway instances are merged. The configuration for multiple Gateway - * instances with the same scope will be merged as presented as a single - * coniguration to the proxy/load balancer. - * Max length 64 characters. - * Scope should start with a letter and can only have letters, numbers, - * hyphens. - * - * Generated from protobuf field string scope = 8 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setScope($var) - { - GPBUtil::checkString($var, True); - $this->scope = $var; - - return $this; - } - - /** - * Optional. A fully-qualified ServerTLSPolicy URL reference. Specifies how - * TLS traffic is terminated. If empty, TLS termination is disabled. - * - * Generated from protobuf field string server_tls_policy = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getServerTlsPolicy() - { - return $this->server_tls_policy; - } - - /** - * Optional. A fully-qualified ServerTLSPolicy URL reference. Specifies how - * TLS traffic is terminated. If empty, TLS termination is disabled. - * - * Generated from protobuf field string server_tls_policy = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setServerTlsPolicy($var) - { - GPBUtil::checkString($var, True); - $this->server_tls_policy = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/Gateway/Type.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/Gateway/Type.php deleted file mode 100644 index 94d7aa0e2f27..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/Gateway/Type.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.networkservices.v1.Gateway.Type - */ -class Type -{ - /** - * The type of the customer managed gateway is unspecified. - * - * Generated from protobuf enum TYPE_UNSPECIFIED = 0; - */ - const TYPE_UNSPECIFIED = 0; - /** - * The type of the customer managed gateway is TrafficDirector Open - * Mesh. - * - * Generated from protobuf enum OPEN_MESH = 1; - */ - const OPEN_MESH = 1; - /** - * The type of the customer managed gateway is SecureWebGateway (SWG). - * - * Generated from protobuf enum SECURE_WEB_GATEWAY = 2; - */ - const SECURE_WEB_GATEWAY = 2; - - private static $valueToName = [ - self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', - self::OPEN_MESH => 'OPEN_MESH', - self::SECURE_WEB_GATEWAY => 'SECURE_WEB_GATEWAY', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Type::class, \Google\Cloud\NetworkServices\V1\Gateway_Type::class); - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GetEndpointPolicyRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GetEndpointPolicyRequest.php deleted file mode 100644 index c16edadac31e..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GetEndpointPolicyRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.networkservices.v1.GetEndpointPolicyRequest - */ -class GetEndpointPolicyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A name of the EndpointPolicy to get. Must be in the format - * `projects/*/locations/global/endpointPolicies/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. A name of the EndpointPolicy to get. Must be in the format - * `projects/*/locations/global/endpointPolicies/*`. Please see - * {@see NetworkServicesClient::endpointPolicyName()} for help formatting this field. - * - * @return \Google\Cloud\NetworkServices\V1\GetEndpointPolicyRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. A name of the EndpointPolicy to get. Must be in the format - * `projects/*/locations/global/endpointPolicies/*`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\EndpointPolicy::initOnce(); - parent::__construct($data); - } - - /** - * Required. A name of the EndpointPolicy to get. Must be in the format - * `projects/*/locations/global/endpointPolicies/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. A name of the EndpointPolicy to get. Must be in the format - * `projects/*/locations/global/endpointPolicies/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GetGatewayRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GetGatewayRequest.php deleted file mode 100644 index 5c9c39116dcf..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GetGatewayRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.networkservices.v1.GetGatewayRequest - */ -class GetGatewayRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A name of the Gateway to get. Must be in the format - * `projects/*/locations/*/gateways/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. A name of the Gateway to get. Must be in the format - * `projects/*/locations/*/gateways/*`. Please see - * {@see NetworkServicesClient::gatewayName()} for help formatting this field. - * - * @return \Google\Cloud\NetworkServices\V1\GetGatewayRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. A name of the Gateway to get. Must be in the format - * `projects/*/locations/*/gateways/*`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\Gateway::initOnce(); - parent::__construct($data); - } - - /** - * Required. A name of the Gateway to get. Must be in the format - * `projects/*/locations/*/gateways/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. A name of the Gateway to get. Must be in the format - * `projects/*/locations/*/gateways/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GetGrpcRouteRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GetGrpcRouteRequest.php deleted file mode 100644 index c668d636f16f..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GetGrpcRouteRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.networkservices.v1.GetGrpcRouteRequest - */ -class GetGrpcRouteRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A name of the GrpcRoute to get. Must be in the format - * `projects/*/locations/global/grpcRoutes/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. A name of the GrpcRoute to get. Must be in the format - * `projects/*/locations/global/grpcRoutes/*`. Please see - * {@see NetworkServicesClient::grpcRouteName()} for help formatting this field. - * - * @return \Google\Cloud\NetworkServices\V1\GetGrpcRouteRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. A name of the GrpcRoute to get. Must be in the format - * `projects/*/locations/global/grpcRoutes/*`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\GrpcRoute::initOnce(); - parent::__construct($data); - } - - /** - * Required. A name of the GrpcRoute to get. Must be in the format - * `projects/*/locations/global/grpcRoutes/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. A name of the GrpcRoute to get. Must be in the format - * `projects/*/locations/global/grpcRoutes/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GetHttpRouteRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GetHttpRouteRequest.php deleted file mode 100644 index 5b99dbcaa7d9..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GetHttpRouteRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.networkservices.v1.GetHttpRouteRequest - */ -class GetHttpRouteRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A name of the HttpRoute to get. Must be in the format - * `projects/*/locations/global/httpRoutes/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. A name of the HttpRoute to get. Must be in the format - * `projects/*/locations/global/httpRoutes/*`. Please see - * {@see NetworkServicesClient::httpRouteName()} for help formatting this field. - * - * @return \Google\Cloud\NetworkServices\V1\GetHttpRouteRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. A name of the HttpRoute to get. Must be in the format - * `projects/*/locations/global/httpRoutes/*`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\HttpRoute::initOnce(); - parent::__construct($data); - } - - /** - * Required. A name of the HttpRoute to get. Must be in the format - * `projects/*/locations/global/httpRoutes/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. A name of the HttpRoute to get. Must be in the format - * `projects/*/locations/global/httpRoutes/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GetLbRouteExtensionRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GetLbRouteExtensionRequest.php deleted file mode 100644 index 42db13d6da9d..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GetLbRouteExtensionRequest.php +++ /dev/null @@ -1,91 +0,0 @@ -google.cloud.networkservices.v1.GetLbRouteExtensionRequest - */ -class GetLbRouteExtensionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A name of the `LbRouteExtension` resource to get. Must be in the - * format - * `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. A name of the `LbRouteExtension` resource to get. Must be in the - * format - * `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}`. Please see - * {@see DepServiceClient::lbRouteExtensionName()} for help formatting this field. - * - * @return \Google\Cloud\NetworkServices\V1\GetLbRouteExtensionRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. A name of the `LbRouteExtension` resource to get. Must be in the - * format - * `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\Dep::initOnce(); - parent::__construct($data); - } - - /** - * Required. A name of the `LbRouteExtension` resource to get. Must be in the - * format - * `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. A name of the `LbRouteExtension` resource to get. Must be in the - * format - * `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GetLbTrafficExtensionRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GetLbTrafficExtensionRequest.php deleted file mode 100644 index eebf6df47dc9..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GetLbTrafficExtensionRequest.php +++ /dev/null @@ -1,91 +0,0 @@ -google.cloud.networkservices.v1.GetLbTrafficExtensionRequest - */ -class GetLbTrafficExtensionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A name of the `LbTrafficExtension` resource to get. Must be in - * the format - * `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. A name of the `LbTrafficExtension` resource to get. Must be in - * the format - * `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}`. Please see - * {@see DepServiceClient::lbTrafficExtensionName()} for help formatting this field. - * - * @return \Google\Cloud\NetworkServices\V1\GetLbTrafficExtensionRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. A name of the `LbTrafficExtension` resource to get. Must be in - * the format - * `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\Dep::initOnce(); - parent::__construct($data); - } - - /** - * Required. A name of the `LbTrafficExtension` resource to get. Must be in - * the format - * `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. A name of the `LbTrafficExtension` resource to get. Must be in - * the format - * `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GetMeshRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GetMeshRequest.php deleted file mode 100644 index ae35fe07d164..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GetMeshRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.networkservices.v1.GetMeshRequest - */ -class GetMeshRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A name of the Mesh to get. Must be in the format - * `projects/*/locations/global/meshes/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. A name of the Mesh to get. Must be in the format - * `projects/*/locations/global/meshes/*`. Please see - * {@see NetworkServicesClient::meshName()} for help formatting this field. - * - * @return \Google\Cloud\NetworkServices\V1\GetMeshRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. A name of the Mesh to get. Must be in the format - * `projects/*/locations/global/meshes/*`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\Mesh::initOnce(); - parent::__construct($data); - } - - /** - * Required. A name of the Mesh to get. Must be in the format - * `projects/*/locations/global/meshes/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. A name of the Mesh to get. Must be in the format - * `projects/*/locations/global/meshes/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GetServiceBindingRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GetServiceBindingRequest.php deleted file mode 100644 index f84ff9576bac..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GetServiceBindingRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.networkservices.v1.GetServiceBindingRequest - */ -class GetServiceBindingRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A name of the ServiceBinding to get. Must be in the format - * `projects/*/locations/global/serviceBindings/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. A name of the ServiceBinding to get. Must be in the format - * `projects/*/locations/global/serviceBindings/*`. Please see - * {@see NetworkServicesClient::serviceBindingName()} for help formatting this field. - * - * @return \Google\Cloud\NetworkServices\V1\GetServiceBindingRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. A name of the ServiceBinding to get. Must be in the format - * `projects/*/locations/global/serviceBindings/*`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\ServiceBinding::initOnce(); - parent::__construct($data); - } - - /** - * Required. A name of the ServiceBinding to get. Must be in the format - * `projects/*/locations/global/serviceBindings/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. A name of the ServiceBinding to get. Must be in the format - * `projects/*/locations/global/serviceBindings/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GetTcpRouteRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GetTcpRouteRequest.php deleted file mode 100644 index 94c302d6af56..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GetTcpRouteRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.networkservices.v1.GetTcpRouteRequest - */ -class GetTcpRouteRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A name of the TcpRoute to get. Must be in the format - * `projects/*/locations/global/tcpRoutes/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. A name of the TcpRoute to get. Must be in the format - * `projects/*/locations/global/tcpRoutes/*`. Please see - * {@see NetworkServicesClient::tcpRouteName()} for help formatting this field. - * - * @return \Google\Cloud\NetworkServices\V1\GetTcpRouteRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. A name of the TcpRoute to get. Must be in the format - * `projects/*/locations/global/tcpRoutes/*`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\TcpRoute::initOnce(); - parent::__construct($data); - } - - /** - * Required. A name of the TcpRoute to get. Must be in the format - * `projects/*/locations/global/tcpRoutes/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. A name of the TcpRoute to get. Must be in the format - * `projects/*/locations/global/tcpRoutes/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GetTlsRouteRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GetTlsRouteRequest.php deleted file mode 100644 index 327101152fdd..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GetTlsRouteRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.networkservices.v1.GetTlsRouteRequest - */ -class GetTlsRouteRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A name of the TlsRoute to get. Must be in the format - * `projects/*/locations/global/tlsRoutes/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. A name of the TlsRoute to get. Must be in the format - * `projects/*/locations/global/tlsRoutes/*`. Please see - * {@see NetworkServicesClient::tlsRouteName()} for help formatting this field. - * - * @return \Google\Cloud\NetworkServices\V1\GetTlsRouteRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. A name of the TlsRoute to get. Must be in the format - * `projects/*/locations/global/tlsRoutes/*`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\TlsRoute::initOnce(); - parent::__construct($data); - } - - /** - * Required. A name of the TlsRoute to get. Must be in the format - * `projects/*/locations/global/tlsRoutes/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. A name of the TlsRoute to get. Must be in the format - * `projects/*/locations/global/tlsRoutes/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute.php deleted file mode 100644 index 2404004aec76..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute.php +++ /dev/null @@ -1,534 +0,0 @@ -google.cloud.networkservices.v1.GrpcRoute - */ -class GrpcRoute extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the GrpcRoute resource. It matches pattern - * `projects/*/locations/global/grpcRoutes/` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Output only. Server-defined URL of this resource - * - * Generated from protobuf field string self_link = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $self_link = ''; - /** - * Output only. The timestamp when the resource was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The timestamp when the resource was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Optional. Set of label tags associated with the GrpcRoute resource. - * - * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - /** - * Optional. A free-text description of the resource. Max length 1024 - * characters. - * - * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Required. Service hostnames with an optional port for which this route - * describes traffic. - * Format: [:] - * Hostname is the fully qualified domain name of a network host. This matches - * the RFC 1123 definition of a hostname with 2 notable exceptions: - * - IPs are not allowed. - * - A hostname may be prefixed with a wildcard label (`*.`). The wildcard - * label must appear by itself as the first label. - * Hostname can be "precise" which is a domain name without the terminating - * dot of a network host (e.g. `foo.example.com`) or "wildcard", which is a - * domain name prefixed with a single wildcard label (e.g. `*.example.com`). - * Note that as per RFC1035 and RFC1123, a label must consist of lower case - * alphanumeric characters or '-', and must start and end with an alphanumeric - * character. No other punctuation is allowed. - * The routes associated with a Mesh or Gateway must have unique hostnames. If - * you attempt to attach multiple routes with conflicting hostnames, the - * configuration will be rejected. - * For example, while it is acceptable for routes for the hostnames - * `*.foo.bar.com` and `*.bar.com` to be associated with the same route, it is - * not possible to associate two routes both with `*.bar.com` or both with - * `bar.com`. - * If a port is specified, then gRPC clients must use the channel URI with the - * port to match this rule (i.e. "xds:///service:123"), otherwise they must - * supply the URI without a port (i.e. "xds:///service"). - * - * Generated from protobuf field repeated string hostnames = 6 [(.google.api.field_behavior) = REQUIRED]; - */ - private $hostnames; - /** - * Optional. Meshes defines a list of meshes this GrpcRoute is attached to, as - * one of the routing rules to route the requests served by the mesh. - * Each mesh reference should match the pattern: - * `projects/*/locations/global/meshes/` - * - * Generated from protobuf field repeated string meshes = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - private $meshes; - /** - * Optional. Gateways defines a list of gateways this GrpcRoute is attached - * to, as one of the routing rules to route the requests served by the - * gateway. - * Each gateway reference should match the pattern: - * `projects/*/locations/global/gateways/` - * - * Generated from protobuf field repeated string gateways = 10 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - private $gateways; - /** - * Required. A list of detailed rules defining how to route traffic. - * Within a single GrpcRoute, the GrpcRoute.RouteAction associated with the - * first matching GrpcRoute.RouteRule will be executed. At least one rule - * must be supplied. - * - * Generated from protobuf field repeated .google.cloud.networkservices.v1.GrpcRoute.RouteRule rules = 7 [(.google.api.field_behavior) = REQUIRED]; - */ - private $rules; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the GrpcRoute resource. It matches pattern - * `projects/*/locations/global/grpcRoutes/` - * @type string $self_link - * Output only. Server-defined URL of this resource - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The timestamp when the resource was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The timestamp when the resource was updated. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. Set of label tags associated with the GrpcRoute resource. - * @type string $description - * Optional. A free-text description of the resource. Max length 1024 - * characters. - * @type array|\Google\Protobuf\Internal\RepeatedField $hostnames - * Required. Service hostnames with an optional port for which this route - * describes traffic. - * Format: [:] - * Hostname is the fully qualified domain name of a network host. This matches - * the RFC 1123 definition of a hostname with 2 notable exceptions: - * - IPs are not allowed. - * - A hostname may be prefixed with a wildcard label (`*.`). The wildcard - * label must appear by itself as the first label. - * Hostname can be "precise" which is a domain name without the terminating - * dot of a network host (e.g. `foo.example.com`) or "wildcard", which is a - * domain name prefixed with a single wildcard label (e.g. `*.example.com`). - * Note that as per RFC1035 and RFC1123, a label must consist of lower case - * alphanumeric characters or '-', and must start and end with an alphanumeric - * character. No other punctuation is allowed. - * The routes associated with a Mesh or Gateway must have unique hostnames. If - * you attempt to attach multiple routes with conflicting hostnames, the - * configuration will be rejected. - * For example, while it is acceptable for routes for the hostnames - * `*.foo.bar.com` and `*.bar.com` to be associated with the same route, it is - * not possible to associate two routes both with `*.bar.com` or both with - * `bar.com`. - * If a port is specified, then gRPC clients must use the channel URI with the - * port to match this rule (i.e. "xds:///service:123"), otherwise they must - * supply the URI without a port (i.e. "xds:///service"). - * @type array|\Google\Protobuf\Internal\RepeatedField $meshes - * Optional. Meshes defines a list of meshes this GrpcRoute is attached to, as - * one of the routing rules to route the requests served by the mesh. - * Each mesh reference should match the pattern: - * `projects/*/locations/global/meshes/` - * @type array|\Google\Protobuf\Internal\RepeatedField $gateways - * Optional. Gateways defines a list of gateways this GrpcRoute is attached - * to, as one of the routing rules to route the requests served by the - * gateway. - * Each gateway reference should match the pattern: - * `projects/*/locations/global/gateways/` - * @type array<\Google\Cloud\NetworkServices\V1\GrpcRoute\RouteRule>|\Google\Protobuf\Internal\RepeatedField $rules - * Required. A list of detailed rules defining how to route traffic. - * Within a single GrpcRoute, the GrpcRoute.RouteAction associated with the - * first matching GrpcRoute.RouteRule will be executed. At least one rule - * must be supplied. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\GrpcRoute::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the GrpcRoute resource. It matches pattern - * `projects/*/locations/global/grpcRoutes/` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the GrpcRoute resource. It matches pattern - * `projects/*/locations/global/grpcRoutes/` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. Server-defined URL of this resource - * - * Generated from protobuf field string self_link = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getSelfLink() - { - return $this->self_link; - } - - /** - * Output only. Server-defined URL of this resource - * - * Generated from protobuf field string self_link = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setSelfLink($var) - { - GPBUtil::checkString($var, True); - $this->self_link = $var; - - return $this; - } - - /** - * Output only. The timestamp when the resource was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The timestamp when the resource was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The timestamp when the resource was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The timestamp when the resource was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Optional. Set of label tags associated with the GrpcRoute resource. - * - * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. Set of label tags associated with the GrpcRoute resource. - * - * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Optional. A free-text description of the resource. Max length 1024 - * characters. - * - * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. A free-text description of the resource. Max length 1024 - * characters. - * - * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Required. Service hostnames with an optional port for which this route - * describes traffic. - * Format: [:] - * Hostname is the fully qualified domain name of a network host. This matches - * the RFC 1123 definition of a hostname with 2 notable exceptions: - * - IPs are not allowed. - * - A hostname may be prefixed with a wildcard label (`*.`). The wildcard - * label must appear by itself as the first label. - * Hostname can be "precise" which is a domain name without the terminating - * dot of a network host (e.g. `foo.example.com`) or "wildcard", which is a - * domain name prefixed with a single wildcard label (e.g. `*.example.com`). - * Note that as per RFC1035 and RFC1123, a label must consist of lower case - * alphanumeric characters or '-', and must start and end with an alphanumeric - * character. No other punctuation is allowed. - * The routes associated with a Mesh or Gateway must have unique hostnames. If - * you attempt to attach multiple routes with conflicting hostnames, the - * configuration will be rejected. - * For example, while it is acceptable for routes for the hostnames - * `*.foo.bar.com` and `*.bar.com` to be associated with the same route, it is - * not possible to associate two routes both with `*.bar.com` or both with - * `bar.com`. - * If a port is specified, then gRPC clients must use the channel URI with the - * port to match this rule (i.e. "xds:///service:123"), otherwise they must - * supply the URI without a port (i.e. "xds:///service"). - * - * Generated from protobuf field repeated string hostnames = 6 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getHostnames() - { - return $this->hostnames; - } - - /** - * Required. Service hostnames with an optional port for which this route - * describes traffic. - * Format: [:] - * Hostname is the fully qualified domain name of a network host. This matches - * the RFC 1123 definition of a hostname with 2 notable exceptions: - * - IPs are not allowed. - * - A hostname may be prefixed with a wildcard label (`*.`). The wildcard - * label must appear by itself as the first label. - * Hostname can be "precise" which is a domain name without the terminating - * dot of a network host (e.g. `foo.example.com`) or "wildcard", which is a - * domain name prefixed with a single wildcard label (e.g. `*.example.com`). - * Note that as per RFC1035 and RFC1123, a label must consist of lower case - * alphanumeric characters or '-', and must start and end with an alphanumeric - * character. No other punctuation is allowed. - * The routes associated with a Mesh or Gateway must have unique hostnames. If - * you attempt to attach multiple routes with conflicting hostnames, the - * configuration will be rejected. - * For example, while it is acceptable for routes for the hostnames - * `*.foo.bar.com` and `*.bar.com` to be associated with the same route, it is - * not possible to associate two routes both with `*.bar.com` or both with - * `bar.com`. - * If a port is specified, then gRPC clients must use the channel URI with the - * port to match this rule (i.e. "xds:///service:123"), otherwise they must - * supply the URI without a port (i.e. "xds:///service"). - * - * Generated from protobuf field repeated string hostnames = 6 [(.google.api.field_behavior) = REQUIRED]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setHostnames($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->hostnames = $arr; - - return $this; - } - - /** - * Optional. Meshes defines a list of meshes this GrpcRoute is attached to, as - * one of the routing rules to route the requests served by the mesh. - * Each mesh reference should match the pattern: - * `projects/*/locations/global/meshes/` - * - * Generated from protobuf field repeated string meshes = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMeshes() - { - return $this->meshes; - } - - /** - * Optional. Meshes defines a list of meshes this GrpcRoute is attached to, as - * one of the routing rules to route the requests served by the mesh. - * Each mesh reference should match the pattern: - * `projects/*/locations/global/meshes/` - * - * Generated from protobuf field repeated string meshes = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMeshes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->meshes = $arr; - - return $this; - } - - /** - * Optional. Gateways defines a list of gateways this GrpcRoute is attached - * to, as one of the routing rules to route the requests served by the - * gateway. - * Each gateway reference should match the pattern: - * `projects/*/locations/global/gateways/` - * - * Generated from protobuf field repeated string gateways = 10 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getGateways() - { - return $this->gateways; - } - - /** - * Optional. Gateways defines a list of gateways this GrpcRoute is attached - * to, as one of the routing rules to route the requests served by the - * gateway. - * Each gateway reference should match the pattern: - * `projects/*/locations/global/gateways/` - * - * Generated from protobuf field repeated string gateways = 10 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setGateways($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->gateways = $arr; - - return $this; - } - - /** - * Required. A list of detailed rules defining how to route traffic. - * Within a single GrpcRoute, the GrpcRoute.RouteAction associated with the - * first matching GrpcRoute.RouteRule will be executed. At least one rule - * must be supplied. - * - * Generated from protobuf field repeated .google.cloud.networkservices.v1.GrpcRoute.RouteRule rules = 7 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRules() - { - return $this->rules; - } - - /** - * Required. A list of detailed rules defining how to route traffic. - * Within a single GrpcRoute, the GrpcRoute.RouteAction associated with the - * first matching GrpcRoute.RouteRule will be executed. At least one rule - * must be supplied. - * - * Generated from protobuf field repeated .google.cloud.networkservices.v1.GrpcRoute.RouteRule rules = 7 [(.google.api.field_behavior) = REQUIRED]; - * @param array<\Google\Cloud\NetworkServices\V1\GrpcRoute\RouteRule>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRules($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkServices\V1\GrpcRoute\RouteRule::class); - $this->rules = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute/Destination.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute/Destination.php deleted file mode 100644 index 97af98df7e7b..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute/Destination.php +++ /dev/null @@ -1,165 +0,0 @@ -google.cloud.networkservices.v1.GrpcRoute.Destination - */ -class Destination extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Specifies the proportion of requests forwarded to the backend - * referenced by the serviceName field. This is computed as: - * - weight/Sum(weights in this destination list). - * For non-zero values, there may be some epsilon from the exact proportion - * defined here depending on the precision an implementation supports. - * If only one serviceName is specified and it has a weight greater than 0, - * 100% of the traffic is forwarded to that backend. - * If weights are specified for any one service name, they need to be - * specified for all of them. - * If weights are unspecified for all services, then, traffic is distributed - * in equal proportions to all of them. - * - * Generated from protobuf field optional int32 weight = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $weight = null; - protected $destination_type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $service_name - * Required. The URL of a destination service to which to route traffic. - * Must refer to either a BackendService or ServiceDirectoryService. - * @type int $weight - * Optional. Specifies the proportion of requests forwarded to the backend - * referenced by the serviceName field. This is computed as: - * - weight/Sum(weights in this destination list). - * For non-zero values, there may be some epsilon from the exact proportion - * defined here depending on the precision an implementation supports. - * If only one serviceName is specified and it has a weight greater than 0, - * 100% of the traffic is forwarded to that backend. - * If weights are specified for any one service name, they need to be - * specified for all of them. - * If weights are unspecified for all services, then, traffic is distributed - * in equal proportions to all of them. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\GrpcRoute::initOnce(); - parent::__construct($data); - } - - /** - * Required. The URL of a destination service to which to route traffic. - * Must refer to either a BackendService or ServiceDirectoryService. - * - * Generated from protobuf field string service_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getServiceName() - { - return $this->readOneof(1); - } - - public function hasServiceName() - { - return $this->hasOneof(1); - } - - /** - * Required. The URL of a destination service to which to route traffic. - * Must refer to either a BackendService or ServiceDirectoryService. - * - * Generated from protobuf field string service_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setServiceName($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Optional. Specifies the proportion of requests forwarded to the backend - * referenced by the serviceName field. This is computed as: - * - weight/Sum(weights in this destination list). - * For non-zero values, there may be some epsilon from the exact proportion - * defined here depending on the precision an implementation supports. - * If only one serviceName is specified and it has a weight greater than 0, - * 100% of the traffic is forwarded to that backend. - * If weights are specified for any one service name, they need to be - * specified for all of them. - * If weights are unspecified for all services, then, traffic is distributed - * in equal proportions to all of them. - * - * Generated from protobuf field optional int32 weight = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getWeight() - { - return isset($this->weight) ? $this->weight : 0; - } - - public function hasWeight() - { - return isset($this->weight); - } - - public function clearWeight() - { - unset($this->weight); - } - - /** - * Optional. Specifies the proportion of requests forwarded to the backend - * referenced by the serviceName field. This is computed as: - * - weight/Sum(weights in this destination list). - * For non-zero values, there may be some epsilon from the exact proportion - * defined here depending on the precision an implementation supports. - * If only one serviceName is specified and it has a weight greater than 0, - * 100% of the traffic is forwarded to that backend. - * If weights are specified for any one service name, they need to be - * specified for all of them. - * If weights are unspecified for all services, then, traffic is distributed - * in equal proportions to all of them. - * - * Generated from protobuf field optional int32 weight = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setWeight($var) - { - GPBUtil::checkInt32($var); - $this->weight = $var; - - return $this; - } - - /** - * @return string - */ - public function getDestinationType() - { - return $this->whichOneof("destination_type"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Destination::class, \Google\Cloud\NetworkServices\V1\GrpcRoute_Destination::class); - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute/FaultInjectionPolicy.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute/FaultInjectionPolicy.php deleted file mode 100644 index 57b6a7b3da3a..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute/FaultInjectionPolicy.php +++ /dev/null @@ -1,129 +0,0 @@ -google.cloud.networkservices.v1.GrpcRoute.FaultInjectionPolicy - */ -class FaultInjectionPolicy extends \Google\Protobuf\Internal\Message -{ - /** - * The specification for injecting delay to client requests. - * - * Generated from protobuf field optional .google.cloud.networkservices.v1.GrpcRoute.FaultInjectionPolicy.Delay delay = 1; - */ - protected $delay = null; - /** - * The specification for aborting to client requests. - * - * Generated from protobuf field optional .google.cloud.networkservices.v1.GrpcRoute.FaultInjectionPolicy.Abort abort = 2; - */ - protected $abort = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\NetworkServices\V1\GrpcRoute\FaultInjectionPolicy\Delay $delay - * The specification for injecting delay to client requests. - * @type \Google\Cloud\NetworkServices\V1\GrpcRoute\FaultInjectionPolicy\Abort $abort - * The specification for aborting to client requests. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\GrpcRoute::initOnce(); - parent::__construct($data); - } - - /** - * The specification for injecting delay to client requests. - * - * Generated from protobuf field optional .google.cloud.networkservices.v1.GrpcRoute.FaultInjectionPolicy.Delay delay = 1; - * @return \Google\Cloud\NetworkServices\V1\GrpcRoute\FaultInjectionPolicy\Delay|null - */ - public function getDelay() - { - return $this->delay; - } - - public function hasDelay() - { - return isset($this->delay); - } - - public function clearDelay() - { - unset($this->delay); - } - - /** - * The specification for injecting delay to client requests. - * - * Generated from protobuf field optional .google.cloud.networkservices.v1.GrpcRoute.FaultInjectionPolicy.Delay delay = 1; - * @param \Google\Cloud\NetworkServices\V1\GrpcRoute\FaultInjectionPolicy\Delay $var - * @return $this - */ - public function setDelay($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkServices\V1\GrpcRoute\FaultInjectionPolicy\Delay::class); - $this->delay = $var; - - return $this; - } - - /** - * The specification for aborting to client requests. - * - * Generated from protobuf field optional .google.cloud.networkservices.v1.GrpcRoute.FaultInjectionPolicy.Abort abort = 2; - * @return \Google\Cloud\NetworkServices\V1\GrpcRoute\FaultInjectionPolicy\Abort|null - */ - public function getAbort() - { - return $this->abort; - } - - public function hasAbort() - { - return isset($this->abort); - } - - public function clearAbort() - { - unset($this->abort); - } - - /** - * The specification for aborting to client requests. - * - * Generated from protobuf field optional .google.cloud.networkservices.v1.GrpcRoute.FaultInjectionPolicy.Abort abort = 2; - * @param \Google\Cloud\NetworkServices\V1\GrpcRoute\FaultInjectionPolicy\Abort $var - * @return $this - */ - public function setAbort($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkServices\V1\GrpcRoute\FaultInjectionPolicy\Abort::class); - $this->abort = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(FaultInjectionPolicy::class, \Google\Cloud\NetworkServices\V1\GrpcRoute_FaultInjectionPolicy::class); - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute/FaultInjectionPolicy/Abort.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute/FaultInjectionPolicy/Abort.php deleted file mode 100644 index fbbfc30a96a4..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute/FaultInjectionPolicy/Abort.php +++ /dev/null @@ -1,133 +0,0 @@ -google.cloud.networkservices.v1.GrpcRoute.FaultInjectionPolicy.Abort - */ -class Abort extends \Google\Protobuf\Internal\Message -{ - /** - * The HTTP status code used to abort the request. - * The value must be between 200 and 599 inclusive. - * - * Generated from protobuf field optional int32 http_status = 1; - */ - protected $http_status = null; - /** - * The percentage of traffic which will be aborted. - * The value must be between [0, 100] - * - * Generated from protobuf field optional int32 percentage = 2; - */ - protected $percentage = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $http_status - * The HTTP status code used to abort the request. - * The value must be between 200 and 599 inclusive. - * @type int $percentage - * The percentage of traffic which will be aborted. - * The value must be between [0, 100] - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\GrpcRoute::initOnce(); - parent::__construct($data); - } - - /** - * The HTTP status code used to abort the request. - * The value must be between 200 and 599 inclusive. - * - * Generated from protobuf field optional int32 http_status = 1; - * @return int - */ - public function getHttpStatus() - { - return isset($this->http_status) ? $this->http_status : 0; - } - - public function hasHttpStatus() - { - return isset($this->http_status); - } - - public function clearHttpStatus() - { - unset($this->http_status); - } - - /** - * The HTTP status code used to abort the request. - * The value must be between 200 and 599 inclusive. - * - * Generated from protobuf field optional int32 http_status = 1; - * @param int $var - * @return $this - */ - public function setHttpStatus($var) - { - GPBUtil::checkInt32($var); - $this->http_status = $var; - - return $this; - } - - /** - * The percentage of traffic which will be aborted. - * The value must be between [0, 100] - * - * Generated from protobuf field optional int32 percentage = 2; - * @return int - */ - public function getPercentage() - { - return isset($this->percentage) ? $this->percentage : 0; - } - - public function hasPercentage() - { - return isset($this->percentage); - } - - public function clearPercentage() - { - unset($this->percentage); - } - - /** - * The percentage of traffic which will be aborted. - * The value must be between [0, 100] - * - * Generated from protobuf field optional int32 percentage = 2; - * @param int $var - * @return $this - */ - public function setPercentage($var) - { - GPBUtil::checkInt32($var); - $this->percentage = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Abort::class, \Google\Cloud\NetworkServices\V1\GrpcRoute_FaultInjectionPolicy_Abort::class); - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute/FaultInjectionPolicy/Delay.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute/FaultInjectionPolicy/Delay.php deleted file mode 100644 index e36e4c35da19..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute/FaultInjectionPolicy/Delay.php +++ /dev/null @@ -1,129 +0,0 @@ -google.cloud.networkservices.v1.GrpcRoute.FaultInjectionPolicy.Delay - */ -class Delay extends \Google\Protobuf\Internal\Message -{ - /** - * Specify a fixed delay before forwarding the request. - * - * Generated from protobuf field optional .google.protobuf.Duration fixed_delay = 1; - */ - protected $fixed_delay = null; - /** - * The percentage of traffic on which delay will be injected. - * The value must be between [0, 100] - * - * Generated from protobuf field optional int32 percentage = 2; - */ - protected $percentage = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Duration $fixed_delay - * Specify a fixed delay before forwarding the request. - * @type int $percentage - * The percentage of traffic on which delay will be injected. - * The value must be between [0, 100] - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\GrpcRoute::initOnce(); - parent::__construct($data); - } - - /** - * Specify a fixed delay before forwarding the request. - * - * Generated from protobuf field optional .google.protobuf.Duration fixed_delay = 1; - * @return \Google\Protobuf\Duration|null - */ - public function getFixedDelay() - { - return $this->fixed_delay; - } - - public function hasFixedDelay() - { - return isset($this->fixed_delay); - } - - public function clearFixedDelay() - { - unset($this->fixed_delay); - } - - /** - * Specify a fixed delay before forwarding the request. - * - * Generated from protobuf field optional .google.protobuf.Duration fixed_delay = 1; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setFixedDelay($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->fixed_delay = $var; - - return $this; - } - - /** - * The percentage of traffic on which delay will be injected. - * The value must be between [0, 100] - * - * Generated from protobuf field optional int32 percentage = 2; - * @return int - */ - public function getPercentage() - { - return isset($this->percentage) ? $this->percentage : 0; - } - - public function hasPercentage() - { - return isset($this->percentage); - } - - public function clearPercentage() - { - unset($this->percentage); - } - - /** - * The percentage of traffic on which delay will be injected. - * The value must be between [0, 100] - * - * Generated from protobuf field optional int32 percentage = 2; - * @param int $var - * @return $this - */ - public function setPercentage($var) - { - GPBUtil::checkInt32($var); - $this->percentage = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Delay::class, \Google\Cloud\NetworkServices\V1\GrpcRoute_FaultInjectionPolicy_Delay::class); - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute/HeaderMatch.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute/HeaderMatch.php deleted file mode 100644 index f66b13869032..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute/HeaderMatch.php +++ /dev/null @@ -1,142 +0,0 @@ -google.cloud.networkservices.v1.GrpcRoute.HeaderMatch - */ -class HeaderMatch extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Specifies how to match against the value of the header. If not - * specified, a default value of EXACT is used. - * - * Generated from protobuf field .google.cloud.networkservices.v1.GrpcRoute.HeaderMatch.Type type = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $type = 0; - /** - * Required. The key of the header. - * - * Generated from protobuf field string key = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $key = ''; - /** - * Required. The value of the header. - * - * Generated from protobuf field string value = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $value = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $type - * Optional. Specifies how to match against the value of the header. If not - * specified, a default value of EXACT is used. - * @type string $key - * Required. The key of the header. - * @type string $value - * Required. The value of the header. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\GrpcRoute::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Specifies how to match against the value of the header. If not - * specified, a default value of EXACT is used. - * - * Generated from protobuf field .google.cloud.networkservices.v1.GrpcRoute.HeaderMatch.Type type = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Optional. Specifies how to match against the value of the header. If not - * specified, a default value of EXACT is used. - * - * Generated from protobuf field .google.cloud.networkservices.v1.GrpcRoute.HeaderMatch.Type type = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\NetworkServices\V1\GrpcRoute\HeaderMatch\Type::class); - $this->type = $var; - - return $this; - } - - /** - * Required. The key of the header. - * - * Generated from protobuf field string key = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getKey() - { - return $this->key; - } - - /** - * Required. The key of the header. - * - * Generated from protobuf field string key = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setKey($var) - { - GPBUtil::checkString($var, True); - $this->key = $var; - - return $this; - } - - /** - * Required. The value of the header. - * - * Generated from protobuf field string value = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getValue() - { - return $this->value; - } - - /** - * Required. The value of the header. - * - * Generated from protobuf field string value = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setValue($var) - { - GPBUtil::checkString($var, True); - $this->value = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(HeaderMatch::class, \Google\Cloud\NetworkServices\V1\GrpcRoute_HeaderMatch::class); - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute/HeaderMatch/Type.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute/HeaderMatch/Type.php deleted file mode 100644 index 488ce2d6f01c..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute/HeaderMatch/Type.php +++ /dev/null @@ -1,65 +0,0 @@ -google.cloud.networkservices.v1.GrpcRoute.HeaderMatch.Type - */ -class Type -{ - /** - * Unspecified. - * - * Generated from protobuf enum TYPE_UNSPECIFIED = 0; - */ - const TYPE_UNSPECIFIED = 0; - /** - * Will only match the exact value provided. - * - * Generated from protobuf enum EXACT = 1; - */ - const EXACT = 1; - /** - * Will match paths conforming to the prefix specified by value. RE2 - * syntax is supported. - * - * Generated from protobuf enum REGULAR_EXPRESSION = 2; - */ - const REGULAR_EXPRESSION = 2; - - private static $valueToName = [ - self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', - self::EXACT => 'EXACT', - self::REGULAR_EXPRESSION => 'REGULAR_EXPRESSION', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Type::class, \Google\Cloud\NetworkServices\V1\GrpcRoute_HeaderMatch_Type::class); - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute/MethodMatch.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute/MethodMatch.php deleted file mode 100644 index 6fe009dd5e9e..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute/MethodMatch.php +++ /dev/null @@ -1,202 +0,0 @@ -google.cloud.networkservices.v1.GrpcRoute.MethodMatch - */ -class MethodMatch extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Specifies how to match against the name. If not specified, a - * default value of "EXACT" is used. - * - * Generated from protobuf field .google.cloud.networkservices.v1.GrpcRoute.MethodMatch.Type type = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $type = 0; - /** - * Required. Name of the service to match against. If unspecified, will - * match all services. - * - * Generated from protobuf field string grpc_service = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $grpc_service = ''; - /** - * Required. Name of the method to match against. If unspecified, will match - * all methods. - * - * Generated from protobuf field string grpc_method = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $grpc_method = ''; - /** - * Optional. Specifies that matches are case sensitive. The default value - * is true. case_sensitive must not be used with a type of - * REGULAR_EXPRESSION. - * - * Generated from protobuf field optional bool case_sensitive = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $case_sensitive = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $type - * Optional. Specifies how to match against the name. If not specified, a - * default value of "EXACT" is used. - * @type string $grpc_service - * Required. Name of the service to match against. If unspecified, will - * match all services. - * @type string $grpc_method - * Required. Name of the method to match against. If unspecified, will match - * all methods. - * @type bool $case_sensitive - * Optional. Specifies that matches are case sensitive. The default value - * is true. case_sensitive must not be used with a type of - * REGULAR_EXPRESSION. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\GrpcRoute::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Specifies how to match against the name. If not specified, a - * default value of "EXACT" is used. - * - * Generated from protobuf field .google.cloud.networkservices.v1.GrpcRoute.MethodMatch.Type type = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Optional. Specifies how to match against the name. If not specified, a - * default value of "EXACT" is used. - * - * Generated from protobuf field .google.cloud.networkservices.v1.GrpcRoute.MethodMatch.Type type = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\NetworkServices\V1\GrpcRoute\MethodMatch\Type::class); - $this->type = $var; - - return $this; - } - - /** - * Required. Name of the service to match against. If unspecified, will - * match all services. - * - * Generated from protobuf field string grpc_service = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getGrpcService() - { - return $this->grpc_service; - } - - /** - * Required. Name of the service to match against. If unspecified, will - * match all services. - * - * Generated from protobuf field string grpc_service = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setGrpcService($var) - { - GPBUtil::checkString($var, True); - $this->grpc_service = $var; - - return $this; - } - - /** - * Required. Name of the method to match against. If unspecified, will match - * all methods. - * - * Generated from protobuf field string grpc_method = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getGrpcMethod() - { - return $this->grpc_method; - } - - /** - * Required. Name of the method to match against. If unspecified, will match - * all methods. - * - * Generated from protobuf field string grpc_method = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setGrpcMethod($var) - { - GPBUtil::checkString($var, True); - $this->grpc_method = $var; - - return $this; - } - - /** - * Optional. Specifies that matches are case sensitive. The default value - * is true. case_sensitive must not be used with a type of - * REGULAR_EXPRESSION. - * - * Generated from protobuf field optional bool case_sensitive = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getCaseSensitive() - { - return isset($this->case_sensitive) ? $this->case_sensitive : false; - } - - public function hasCaseSensitive() - { - return isset($this->case_sensitive); - } - - public function clearCaseSensitive() - { - unset($this->case_sensitive); - } - - /** - * Optional. Specifies that matches are case sensitive. The default value - * is true. case_sensitive must not be used with a type of - * REGULAR_EXPRESSION. - * - * Generated from protobuf field optional bool case_sensitive = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setCaseSensitive($var) - { - GPBUtil::checkBool($var); - $this->case_sensitive = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(MethodMatch::class, \Google\Cloud\NetworkServices\V1\GrpcRoute_MethodMatch::class); - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute/MethodMatch/Type.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute/MethodMatch/Type.php deleted file mode 100644 index cbef63937f7f..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute/MethodMatch/Type.php +++ /dev/null @@ -1,65 +0,0 @@ -google.cloud.networkservices.v1.GrpcRoute.MethodMatch.Type - */ -class Type -{ - /** - * Unspecified. - * - * Generated from protobuf enum TYPE_UNSPECIFIED = 0; - */ - const TYPE_UNSPECIFIED = 0; - /** - * Will only match the exact name provided. - * - * Generated from protobuf enum EXACT = 1; - */ - const EXACT = 1; - /** - * Will interpret grpc_method and grpc_service as regexes. RE2 syntax is - * supported. - * - * Generated from protobuf enum REGULAR_EXPRESSION = 2; - */ - const REGULAR_EXPRESSION = 2; - - private static $valueToName = [ - self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', - self::EXACT => 'EXACT', - self::REGULAR_EXPRESSION => 'REGULAR_EXPRESSION', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Type::class, \Google\Cloud\NetworkServices\V1\GrpcRoute_MethodMatch_Type::class); - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute/RetryPolicy.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute/RetryPolicy.php deleted file mode 100644 index cd34c9523201..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute/RetryPolicy.php +++ /dev/null @@ -1,168 +0,0 @@ -google.cloud.networkservices.v1.GrpcRoute.RetryPolicy - */ -class RetryPolicy extends \Google\Protobuf\Internal\Message -{ - /** - * - connect-failure: Router will retry on failures connecting to Backend - * Services, for example due to connection timeouts. - * - refused-stream: Router will retry if the backend service resets the - * stream - * with a REFUSED_STREAM error code. This reset type indicates that it is - * safe to retry. - * - cancelled: Router will retry if the gRPC status code in the response - * header - * is set to cancelled - * - deadline-exceeded: Router will retry if the gRPC status code in the - * response - * header is set to deadline-exceeded - * - resource-exhausted: Router will retry if the gRPC status code in the - * response header is set to resource-exhausted - * - unavailable: Router will retry if the gRPC status code in the response - * header is set to unavailable - * - * Generated from protobuf field repeated string retry_conditions = 1; - */ - private $retry_conditions; - /** - * Specifies the allowed number of retries. This number must be > 0. If not - * specified, default to 1. - * - * Generated from protobuf field uint32 num_retries = 2; - */ - protected $num_retries = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $retry_conditions - * - connect-failure: Router will retry on failures connecting to Backend - * Services, for example due to connection timeouts. - * - refused-stream: Router will retry if the backend service resets the - * stream - * with a REFUSED_STREAM error code. This reset type indicates that it is - * safe to retry. - * - cancelled: Router will retry if the gRPC status code in the response - * header - * is set to cancelled - * - deadline-exceeded: Router will retry if the gRPC status code in the - * response - * header is set to deadline-exceeded - * - resource-exhausted: Router will retry if the gRPC status code in the - * response header is set to resource-exhausted - * - unavailable: Router will retry if the gRPC status code in the response - * header is set to unavailable - * @type int $num_retries - * Specifies the allowed number of retries. This number must be > 0. If not - * specified, default to 1. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\GrpcRoute::initOnce(); - parent::__construct($data); - } - - /** - * - connect-failure: Router will retry on failures connecting to Backend - * Services, for example due to connection timeouts. - * - refused-stream: Router will retry if the backend service resets the - * stream - * with a REFUSED_STREAM error code. This reset type indicates that it is - * safe to retry. - * - cancelled: Router will retry if the gRPC status code in the response - * header - * is set to cancelled - * - deadline-exceeded: Router will retry if the gRPC status code in the - * response - * header is set to deadline-exceeded - * - resource-exhausted: Router will retry if the gRPC status code in the - * response header is set to resource-exhausted - * - unavailable: Router will retry if the gRPC status code in the response - * header is set to unavailable - * - * Generated from protobuf field repeated string retry_conditions = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRetryConditions() - { - return $this->retry_conditions; - } - - /** - * - connect-failure: Router will retry on failures connecting to Backend - * Services, for example due to connection timeouts. - * - refused-stream: Router will retry if the backend service resets the - * stream - * with a REFUSED_STREAM error code. This reset type indicates that it is - * safe to retry. - * - cancelled: Router will retry if the gRPC status code in the response - * header - * is set to cancelled - * - deadline-exceeded: Router will retry if the gRPC status code in the - * response - * header is set to deadline-exceeded - * - resource-exhausted: Router will retry if the gRPC status code in the - * response header is set to resource-exhausted - * - unavailable: Router will retry if the gRPC status code in the response - * header is set to unavailable - * - * Generated from protobuf field repeated string retry_conditions = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRetryConditions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->retry_conditions = $arr; - - return $this; - } - - /** - * Specifies the allowed number of retries. This number must be > 0. If not - * specified, default to 1. - * - * Generated from protobuf field uint32 num_retries = 2; - * @return int - */ - public function getNumRetries() - { - return $this->num_retries; - } - - /** - * Specifies the allowed number of retries. This number must be > 0. If not - * specified, default to 1. - * - * Generated from protobuf field uint32 num_retries = 2; - * @param int $var - * @return $this - */ - public function setNumRetries($var) - { - GPBUtil::checkUint32($var); - $this->num_retries = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(RetryPolicy::class, \Google\Cloud\NetworkServices\V1\GrpcRoute_RetryPolicy::class); - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute/RouteAction.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute/RouteAction.php deleted file mode 100644 index dfc6a40eb1b7..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute/RouteAction.php +++ /dev/null @@ -1,250 +0,0 @@ -google.cloud.networkservices.v1.GrpcRoute.RouteAction - */ -class RouteAction extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The destination services to which traffic should be forwarded. - * If multiple destinations are specified, traffic will be split between - * Backend Service(s) according to the weight field of these destinations. - * - * Generated from protobuf field repeated .google.cloud.networkservices.v1.GrpcRoute.Destination destinations = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $destinations; - /** - * Optional. The specification for fault injection introduced into traffic to test the - * resiliency of clients to destination service failure. As part of fault - * injection, when clients send requests to a destination, delays can be - * introduced on a percentage of requests before sending those requests to - * the destination service. Similarly requests from clients can be aborted - * by for a percentage of requests. - * timeout and retry_policy will be ignored by clients that are configured - * with a fault_injection_policy - * - * Generated from protobuf field .google.cloud.networkservices.v1.GrpcRoute.FaultInjectionPolicy fault_injection_policy = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $fault_injection_policy = null; - /** - * Optional. Specifies the timeout for selected route. Timeout is computed - * from the time the request has been fully processed (i.e. end of stream) - * up until the response has been completely processed. Timeout includes all - * retries. - * - * Generated from protobuf field .google.protobuf.Duration timeout = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $timeout = null; - /** - * Optional. Specifies the retry policy associated with this route. - * - * Generated from protobuf field .google.cloud.networkservices.v1.GrpcRoute.RetryPolicy retry_policy = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $retry_policy = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\NetworkServices\V1\GrpcRoute\Destination>|\Google\Protobuf\Internal\RepeatedField $destinations - * Optional. The destination services to which traffic should be forwarded. - * If multiple destinations are specified, traffic will be split between - * Backend Service(s) according to the weight field of these destinations. - * @type \Google\Cloud\NetworkServices\V1\GrpcRoute\FaultInjectionPolicy $fault_injection_policy - * Optional. The specification for fault injection introduced into traffic to test the - * resiliency of clients to destination service failure. As part of fault - * injection, when clients send requests to a destination, delays can be - * introduced on a percentage of requests before sending those requests to - * the destination service. Similarly requests from clients can be aborted - * by for a percentage of requests. - * timeout and retry_policy will be ignored by clients that are configured - * with a fault_injection_policy - * @type \Google\Protobuf\Duration $timeout - * Optional. Specifies the timeout for selected route. Timeout is computed - * from the time the request has been fully processed (i.e. end of stream) - * up until the response has been completely processed. Timeout includes all - * retries. - * @type \Google\Cloud\NetworkServices\V1\GrpcRoute\RetryPolicy $retry_policy - * Optional. Specifies the retry policy associated with this route. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\GrpcRoute::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The destination services to which traffic should be forwarded. - * If multiple destinations are specified, traffic will be split between - * Backend Service(s) according to the weight field of these destinations. - * - * Generated from protobuf field repeated .google.cloud.networkservices.v1.GrpcRoute.Destination destinations = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDestinations() - { - return $this->destinations; - } - - /** - * Optional. The destination services to which traffic should be forwarded. - * If multiple destinations are specified, traffic will be split between - * Backend Service(s) according to the weight field of these destinations. - * - * Generated from protobuf field repeated .google.cloud.networkservices.v1.GrpcRoute.Destination destinations = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\NetworkServices\V1\GrpcRoute\Destination>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDestinations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkServices\V1\GrpcRoute\Destination::class); - $this->destinations = $arr; - - return $this; - } - - /** - * Optional. The specification for fault injection introduced into traffic to test the - * resiliency of clients to destination service failure. As part of fault - * injection, when clients send requests to a destination, delays can be - * introduced on a percentage of requests before sending those requests to - * the destination service. Similarly requests from clients can be aborted - * by for a percentage of requests. - * timeout and retry_policy will be ignored by clients that are configured - * with a fault_injection_policy - * - * Generated from protobuf field .google.cloud.networkservices.v1.GrpcRoute.FaultInjectionPolicy fault_injection_policy = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\NetworkServices\V1\GrpcRoute\FaultInjectionPolicy|null - */ - public function getFaultInjectionPolicy() - { - return $this->fault_injection_policy; - } - - public function hasFaultInjectionPolicy() - { - return isset($this->fault_injection_policy); - } - - public function clearFaultInjectionPolicy() - { - unset($this->fault_injection_policy); - } - - /** - * Optional. The specification for fault injection introduced into traffic to test the - * resiliency of clients to destination service failure. As part of fault - * injection, when clients send requests to a destination, delays can be - * introduced on a percentage of requests before sending those requests to - * the destination service. Similarly requests from clients can be aborted - * by for a percentage of requests. - * timeout and retry_policy will be ignored by clients that are configured - * with a fault_injection_policy - * - * Generated from protobuf field .google.cloud.networkservices.v1.GrpcRoute.FaultInjectionPolicy fault_injection_policy = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\NetworkServices\V1\GrpcRoute\FaultInjectionPolicy $var - * @return $this - */ - public function setFaultInjectionPolicy($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkServices\V1\GrpcRoute\FaultInjectionPolicy::class); - $this->fault_injection_policy = $var; - - return $this; - } - - /** - * Optional. Specifies the timeout for selected route. Timeout is computed - * from the time the request has been fully processed (i.e. end of stream) - * up until the response has been completely processed. Timeout includes all - * retries. - * - * Generated from protobuf field .google.protobuf.Duration timeout = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Duration|null - */ - public function getTimeout() - { - return $this->timeout; - } - - public function hasTimeout() - { - return isset($this->timeout); - } - - public function clearTimeout() - { - unset($this->timeout); - } - - /** - * Optional. Specifies the timeout for selected route. Timeout is computed - * from the time the request has been fully processed (i.e. end of stream) - * up until the response has been completely processed. Timeout includes all - * retries. - * - * Generated from protobuf field .google.protobuf.Duration timeout = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setTimeout($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->timeout = $var; - - return $this; - } - - /** - * Optional. Specifies the retry policy associated with this route. - * - * Generated from protobuf field .google.cloud.networkservices.v1.GrpcRoute.RetryPolicy retry_policy = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\NetworkServices\V1\GrpcRoute\RetryPolicy|null - */ - public function getRetryPolicy() - { - return $this->retry_policy; - } - - public function hasRetryPolicy() - { - return isset($this->retry_policy); - } - - public function clearRetryPolicy() - { - unset($this->retry_policy); - } - - /** - * Optional. Specifies the retry policy associated with this route. - * - * Generated from protobuf field .google.cloud.networkservices.v1.GrpcRoute.RetryPolicy retry_policy = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\NetworkServices\V1\GrpcRoute\RetryPolicy $var - * @return $this - */ - public function setRetryPolicy($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkServices\V1\GrpcRoute\RetryPolicy::class); - $this->retry_policy = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(RouteAction::class, \Google\Cloud\NetworkServices\V1\GrpcRoute_RouteAction::class); - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute/RouteMatch.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute/RouteMatch.php deleted file mode 100644 index 4dd41c36b91b..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute/RouteMatch.php +++ /dev/null @@ -1,119 +0,0 @@ -google.cloud.networkservices.v1.GrpcRoute.RouteMatch - */ -class RouteMatch extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. A gRPC method to match against. If this field is empty or - * omitted, will match all methods. - * - * Generated from protobuf field optional .google.cloud.networkservices.v1.GrpcRoute.MethodMatch method = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $method = null; - /** - * Optional. Specifies a collection of headers to match. - * - * Generated from protobuf field repeated .google.cloud.networkservices.v1.GrpcRoute.HeaderMatch headers = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $headers; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\NetworkServices\V1\GrpcRoute\MethodMatch $method - * Optional. A gRPC method to match against. If this field is empty or - * omitted, will match all methods. - * @type array<\Google\Cloud\NetworkServices\V1\GrpcRoute\HeaderMatch>|\Google\Protobuf\Internal\RepeatedField $headers - * Optional. Specifies a collection of headers to match. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\GrpcRoute::initOnce(); - parent::__construct($data); - } - - /** - * Optional. A gRPC method to match against. If this field is empty or - * omitted, will match all methods. - * - * Generated from protobuf field optional .google.cloud.networkservices.v1.GrpcRoute.MethodMatch method = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\NetworkServices\V1\GrpcRoute\MethodMatch|null - */ - public function getMethod() - { - return $this->method; - } - - public function hasMethod() - { - return isset($this->method); - } - - public function clearMethod() - { - unset($this->method); - } - - /** - * Optional. A gRPC method to match against. If this field is empty or - * omitted, will match all methods. - * - * Generated from protobuf field optional .google.cloud.networkservices.v1.GrpcRoute.MethodMatch method = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\NetworkServices\V1\GrpcRoute\MethodMatch $var - * @return $this - */ - public function setMethod($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkServices\V1\GrpcRoute\MethodMatch::class); - $this->method = $var; - - return $this; - } - - /** - * Optional. Specifies a collection of headers to match. - * - * Generated from protobuf field repeated .google.cloud.networkservices.v1.GrpcRoute.HeaderMatch headers = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getHeaders() - { - return $this->headers; - } - - /** - * Optional. Specifies a collection of headers to match. - * - * Generated from protobuf field repeated .google.cloud.networkservices.v1.GrpcRoute.HeaderMatch headers = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\NetworkServices\V1\GrpcRoute\HeaderMatch>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setHeaders($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkServices\V1\GrpcRoute\HeaderMatch::class); - $this->headers = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(RouteMatch::class, \Google\Cloud\NetworkServices\V1\GrpcRoute_RouteMatch::class); - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute/RouteRule.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute/RouteRule.php deleted file mode 100644 index c1eb735a0ee0..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/GrpcRoute/RouteRule.php +++ /dev/null @@ -1,130 +0,0 @@ -google.cloud.networkservices.v1.GrpcRoute.RouteRule - */ -class RouteRule extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Matches define conditions used for matching the rule against - * incoming gRPC requests. Each match is independent, i.e. this rule will be - * matched if ANY one of the matches is satisfied. If no matches field is - * specified, this rule will unconditionally match traffic. - * - * Generated from protobuf field repeated .google.cloud.networkservices.v1.GrpcRoute.RouteMatch matches = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $matches; - /** - * Required. A detailed rule defining how to route traffic. This field is - * required. - * - * Generated from protobuf field .google.cloud.networkservices.v1.GrpcRoute.RouteAction action = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $action = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\NetworkServices\V1\GrpcRoute\RouteMatch>|\Google\Protobuf\Internal\RepeatedField $matches - * Optional. Matches define conditions used for matching the rule against - * incoming gRPC requests. Each match is independent, i.e. this rule will be - * matched if ANY one of the matches is satisfied. If no matches field is - * specified, this rule will unconditionally match traffic. - * @type \Google\Cloud\NetworkServices\V1\GrpcRoute\RouteAction $action - * Required. A detailed rule defining how to route traffic. This field is - * required. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\GrpcRoute::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Matches define conditions used for matching the rule against - * incoming gRPC requests. Each match is independent, i.e. this rule will be - * matched if ANY one of the matches is satisfied. If no matches field is - * specified, this rule will unconditionally match traffic. - * - * Generated from protobuf field repeated .google.cloud.networkservices.v1.GrpcRoute.RouteMatch matches = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMatches() - { - return $this->matches; - } - - /** - * Optional. Matches define conditions used for matching the rule against - * incoming gRPC requests. Each match is independent, i.e. this rule will be - * matched if ANY one of the matches is satisfied. If no matches field is - * specified, this rule will unconditionally match traffic. - * - * Generated from protobuf field repeated .google.cloud.networkservices.v1.GrpcRoute.RouteMatch matches = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\NetworkServices\V1\GrpcRoute\RouteMatch>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMatches($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkServices\V1\GrpcRoute\RouteMatch::class); - $this->matches = $arr; - - return $this; - } - - /** - * Required. A detailed rule defining how to route traffic. This field is - * required. - * - * Generated from protobuf field .google.cloud.networkservices.v1.GrpcRoute.RouteAction action = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\NetworkServices\V1\GrpcRoute\RouteAction|null - */ - public function getAction() - { - return $this->action; - } - - public function hasAction() - { - return isset($this->action); - } - - public function clearAction() - { - unset($this->action); - } - - /** - * Required. A detailed rule defining how to route traffic. This field is - * required. - * - * Generated from protobuf field .google.cloud.networkservices.v1.GrpcRoute.RouteAction action = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\NetworkServices\V1\GrpcRoute\RouteAction $var - * @return $this - */ - public function setAction($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkServices\V1\GrpcRoute\RouteAction::class); - $this->action = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(RouteRule::class, \Google\Cloud\NetworkServices\V1\GrpcRoute_RouteRule::class); - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute.php deleted file mode 100644 index 7663ee89f61e..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute.php +++ /dev/null @@ -1,518 +0,0 @@ -google.cloud.networkservices.v1.HttpRoute - */ -class HttpRoute extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the HttpRoute resource. It matches pattern - * `projects/*/locations/global/httpRoutes/http_route_name>`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Output only. Server-defined URL of this resource - * - * Generated from protobuf field string self_link = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $self_link = ''; - /** - * Optional. A free-text description of the resource. Max length 1024 - * characters. - * - * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Output only. The timestamp when the resource was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The timestamp when the resource was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Required. Hostnames define a set of hosts that should match against the - * HTTP host header to select a HttpRoute to process the request. Hostname is - * the fully qualified domain name of a network host, as defined by RFC 1123 - * with the exception that: - * - IPs are not allowed. - * - A hostname may be prefixed with a wildcard label (`*.`). The wildcard - * label must appear by itself as the first label. - * Hostname can be "precise" which is a domain name without the terminating - * dot of a network host (e.g. `foo.example.com`) or "wildcard", which is a - * domain name prefixed with a single wildcard label (e.g. `*.example.com`). - * Note that as per RFC1035 and RFC1123, a label must consist of lower case - * alphanumeric characters or '-', and must start and end with an alphanumeric - * character. No other punctuation is allowed. - * The routes associated with a Mesh or Gateways must have unique hostnames. - * If you attempt to attach multiple routes with conflicting hostnames, - * the configuration will be rejected. - * For example, while it is acceptable for routes for the hostnames - * `*.foo.bar.com` and `*.bar.com` to be associated with the same Mesh (or - * Gateways under the same scope), it is not possible to associate two routes - * both with `*.bar.com` or both with `bar.com`. - * - * Generated from protobuf field repeated string hostnames = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - private $hostnames; - /** - * Optional. Meshes defines a list of meshes this HttpRoute is attached to, as - * one of the routing rules to route the requests served by the mesh. - * Each mesh reference should match the pattern: - * `projects/*/locations/global/meshes/` - * The attached Mesh should be of a type SIDECAR - * - * Generated from protobuf field repeated string meshes = 8 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - private $meshes; - /** - * Optional. Gateways defines a list of gateways this HttpRoute is attached - * to, as one of the routing rules to route the requests served by the - * gateway. - * Each gateway reference should match the pattern: - * `projects/*/locations/global/gateways/` - * - * Generated from protobuf field repeated string gateways = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - private $gateways; - /** - * Optional. Set of label tags associated with the HttpRoute resource. - * - * Generated from protobuf field map labels = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - /** - * Required. Rules that define how traffic is routed and handled. - * Rules will be matched sequentially based on the RouteMatch specified for - * the rule. - * - * Generated from protobuf field repeated .google.cloud.networkservices.v1.HttpRoute.RouteRule rules = 6 [(.google.api.field_behavior) = REQUIRED]; - */ - private $rules; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the HttpRoute resource. It matches pattern - * `projects/*/locations/global/httpRoutes/http_route_name>`. - * @type string $self_link - * Output only. Server-defined URL of this resource - * @type string $description - * Optional. A free-text description of the resource. Max length 1024 - * characters. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The timestamp when the resource was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The timestamp when the resource was updated. - * @type array|\Google\Protobuf\Internal\RepeatedField $hostnames - * Required. Hostnames define a set of hosts that should match against the - * HTTP host header to select a HttpRoute to process the request. Hostname is - * the fully qualified domain name of a network host, as defined by RFC 1123 - * with the exception that: - * - IPs are not allowed. - * - A hostname may be prefixed with a wildcard label (`*.`). The wildcard - * label must appear by itself as the first label. - * Hostname can be "precise" which is a domain name without the terminating - * dot of a network host (e.g. `foo.example.com`) or "wildcard", which is a - * domain name prefixed with a single wildcard label (e.g. `*.example.com`). - * Note that as per RFC1035 and RFC1123, a label must consist of lower case - * alphanumeric characters or '-', and must start and end with an alphanumeric - * character. No other punctuation is allowed. - * The routes associated with a Mesh or Gateways must have unique hostnames. - * If you attempt to attach multiple routes with conflicting hostnames, - * the configuration will be rejected. - * For example, while it is acceptable for routes for the hostnames - * `*.foo.bar.com` and `*.bar.com` to be associated with the same Mesh (or - * Gateways under the same scope), it is not possible to associate two routes - * both with `*.bar.com` or both with `bar.com`. - * @type array|\Google\Protobuf\Internal\RepeatedField $meshes - * Optional. Meshes defines a list of meshes this HttpRoute is attached to, as - * one of the routing rules to route the requests served by the mesh. - * Each mesh reference should match the pattern: - * `projects/*/locations/global/meshes/` - * The attached Mesh should be of a type SIDECAR - * @type array|\Google\Protobuf\Internal\RepeatedField $gateways - * Optional. Gateways defines a list of gateways this HttpRoute is attached - * to, as one of the routing rules to route the requests served by the - * gateway. - * Each gateway reference should match the pattern: - * `projects/*/locations/global/gateways/` - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. Set of label tags associated with the HttpRoute resource. - * @type array<\Google\Cloud\NetworkServices\V1\HttpRoute\RouteRule>|\Google\Protobuf\Internal\RepeatedField $rules - * Required. Rules that define how traffic is routed and handled. - * Rules will be matched sequentially based on the RouteMatch specified for - * the rule. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\HttpRoute::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the HttpRoute resource. It matches pattern - * `projects/*/locations/global/httpRoutes/http_route_name>`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the HttpRoute resource. It matches pattern - * `projects/*/locations/global/httpRoutes/http_route_name>`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. Server-defined URL of this resource - * - * Generated from protobuf field string self_link = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getSelfLink() - { - return $this->self_link; - } - - /** - * Output only. Server-defined URL of this resource - * - * Generated from protobuf field string self_link = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setSelfLink($var) - { - GPBUtil::checkString($var, True); - $this->self_link = $var; - - return $this; - } - - /** - * Optional. A free-text description of the resource. Max length 1024 - * characters. - * - * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. A free-text description of the resource. Max length 1024 - * characters. - * - * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Output only. The timestamp when the resource was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The timestamp when the resource was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The timestamp when the resource was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The timestamp when the resource was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Required. Hostnames define a set of hosts that should match against the - * HTTP host header to select a HttpRoute to process the request. Hostname is - * the fully qualified domain name of a network host, as defined by RFC 1123 - * with the exception that: - * - IPs are not allowed. - * - A hostname may be prefixed with a wildcard label (`*.`). The wildcard - * label must appear by itself as the first label. - * Hostname can be "precise" which is a domain name without the terminating - * dot of a network host (e.g. `foo.example.com`) or "wildcard", which is a - * domain name prefixed with a single wildcard label (e.g. `*.example.com`). - * Note that as per RFC1035 and RFC1123, a label must consist of lower case - * alphanumeric characters or '-', and must start and end with an alphanumeric - * character. No other punctuation is allowed. - * The routes associated with a Mesh or Gateways must have unique hostnames. - * If you attempt to attach multiple routes with conflicting hostnames, - * the configuration will be rejected. - * For example, while it is acceptable for routes for the hostnames - * `*.foo.bar.com` and `*.bar.com` to be associated with the same Mesh (or - * Gateways under the same scope), it is not possible to associate two routes - * both with `*.bar.com` or both with `bar.com`. - * - * Generated from protobuf field repeated string hostnames = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getHostnames() - { - return $this->hostnames; - } - - /** - * Required. Hostnames define a set of hosts that should match against the - * HTTP host header to select a HttpRoute to process the request. Hostname is - * the fully qualified domain name of a network host, as defined by RFC 1123 - * with the exception that: - * - IPs are not allowed. - * - A hostname may be prefixed with a wildcard label (`*.`). The wildcard - * label must appear by itself as the first label. - * Hostname can be "precise" which is a domain name without the terminating - * dot of a network host (e.g. `foo.example.com`) or "wildcard", which is a - * domain name prefixed with a single wildcard label (e.g. `*.example.com`). - * Note that as per RFC1035 and RFC1123, a label must consist of lower case - * alphanumeric characters or '-', and must start and end with an alphanumeric - * character. No other punctuation is allowed. - * The routes associated with a Mesh or Gateways must have unique hostnames. - * If you attempt to attach multiple routes with conflicting hostnames, - * the configuration will be rejected. - * For example, while it is acceptable for routes for the hostnames - * `*.foo.bar.com` and `*.bar.com` to be associated with the same Mesh (or - * Gateways under the same scope), it is not possible to associate two routes - * both with `*.bar.com` or both with `bar.com`. - * - * Generated from protobuf field repeated string hostnames = 5 [(.google.api.field_behavior) = REQUIRED]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setHostnames($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->hostnames = $arr; - - return $this; - } - - /** - * Optional. Meshes defines a list of meshes this HttpRoute is attached to, as - * one of the routing rules to route the requests served by the mesh. - * Each mesh reference should match the pattern: - * `projects/*/locations/global/meshes/` - * The attached Mesh should be of a type SIDECAR - * - * Generated from protobuf field repeated string meshes = 8 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMeshes() - { - return $this->meshes; - } - - /** - * Optional. Meshes defines a list of meshes this HttpRoute is attached to, as - * one of the routing rules to route the requests served by the mesh. - * Each mesh reference should match the pattern: - * `projects/*/locations/global/meshes/` - * The attached Mesh should be of a type SIDECAR - * - * Generated from protobuf field repeated string meshes = 8 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMeshes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->meshes = $arr; - - return $this; - } - - /** - * Optional. Gateways defines a list of gateways this HttpRoute is attached - * to, as one of the routing rules to route the requests served by the - * gateway. - * Each gateway reference should match the pattern: - * `projects/*/locations/global/gateways/` - * - * Generated from protobuf field repeated string gateways = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getGateways() - { - return $this->gateways; - } - - /** - * Optional. Gateways defines a list of gateways this HttpRoute is attached - * to, as one of the routing rules to route the requests served by the - * gateway. - * Each gateway reference should match the pattern: - * `projects/*/locations/global/gateways/` - * - * Generated from protobuf field repeated string gateways = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setGateways($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->gateways = $arr; - - return $this; - } - - /** - * Optional. Set of label tags associated with the HttpRoute resource. - * - * Generated from protobuf field map labels = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. Set of label tags associated with the HttpRoute resource. - * - * Generated from protobuf field map labels = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Required. Rules that define how traffic is routed and handled. - * Rules will be matched sequentially based on the RouteMatch specified for - * the rule. - * - * Generated from protobuf field repeated .google.cloud.networkservices.v1.HttpRoute.RouteRule rules = 6 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRules() - { - return $this->rules; - } - - /** - * Required. Rules that define how traffic is routed and handled. - * Rules will be matched sequentially based on the RouteMatch specified for - * the rule. - * - * Generated from protobuf field repeated .google.cloud.networkservices.v1.HttpRoute.RouteRule rules = 6 [(.google.api.field_behavior) = REQUIRED]; - * @param array<\Google\Cloud\NetworkServices\V1\HttpRoute\RouteRule>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRules($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkServices\V1\HttpRoute\RouteRule::class); - $this->rules = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/CorsPolicy.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/CorsPolicy.php deleted file mode 100644 index 5d4f95014991..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/CorsPolicy.php +++ /dev/null @@ -1,344 +0,0 @@ -google.cloud.networkservices.v1.HttpRoute.CorsPolicy - */ -class CorsPolicy extends \Google\Protobuf\Internal\Message -{ - /** - * Specifies the list of origins that will be allowed to do CORS requests. - * An origin is allowed if it matches either an item in allow_origins or - * an item in allow_origin_regexes. - * - * Generated from protobuf field repeated string allow_origins = 1; - */ - private $allow_origins; - /** - * Specifies the regular expression patterns that match allowed origins. For - * regular expression grammar, please see - * https://github.com/google/re2/wiki/Syntax. - * - * Generated from protobuf field repeated string allow_origin_regexes = 2; - */ - private $allow_origin_regexes; - /** - * Specifies the content for Access-Control-Allow-Methods header. - * - * Generated from protobuf field repeated string allow_methods = 3; - */ - private $allow_methods; - /** - * Specifies the content for Access-Control-Allow-Headers header. - * - * Generated from protobuf field repeated string allow_headers = 4; - */ - private $allow_headers; - /** - * Specifies the content for Access-Control-Expose-Headers header. - * - * Generated from protobuf field repeated string expose_headers = 5; - */ - private $expose_headers; - /** - * Specifies how long result of a preflight request can be cached in - * seconds. This translates to the Access-Control-Max-Age header. - * - * Generated from protobuf field string max_age = 6; - */ - protected $max_age = ''; - /** - * In response to a preflight request, setting this to true indicates that - * the actual request can include user credentials. This translates to the - * Access-Control-Allow-Credentials header. - * Default value is false. - * - * Generated from protobuf field bool allow_credentials = 7; - */ - protected $allow_credentials = false; - /** - * If true, the CORS policy is disabled. The default value is false, which - * indicates that the CORS policy is in effect. - * - * Generated from protobuf field bool disabled = 8; - */ - protected $disabled = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $allow_origins - * Specifies the list of origins that will be allowed to do CORS requests. - * An origin is allowed if it matches either an item in allow_origins or - * an item in allow_origin_regexes. - * @type array|\Google\Protobuf\Internal\RepeatedField $allow_origin_regexes - * Specifies the regular expression patterns that match allowed origins. For - * regular expression grammar, please see - * https://github.com/google/re2/wiki/Syntax. - * @type array|\Google\Protobuf\Internal\RepeatedField $allow_methods - * Specifies the content for Access-Control-Allow-Methods header. - * @type array|\Google\Protobuf\Internal\RepeatedField $allow_headers - * Specifies the content for Access-Control-Allow-Headers header. - * @type array|\Google\Protobuf\Internal\RepeatedField $expose_headers - * Specifies the content for Access-Control-Expose-Headers header. - * @type string $max_age - * Specifies how long result of a preflight request can be cached in - * seconds. This translates to the Access-Control-Max-Age header. - * @type bool $allow_credentials - * In response to a preflight request, setting this to true indicates that - * the actual request can include user credentials. This translates to the - * Access-Control-Allow-Credentials header. - * Default value is false. - * @type bool $disabled - * If true, the CORS policy is disabled. The default value is false, which - * indicates that the CORS policy is in effect. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\HttpRoute::initOnce(); - parent::__construct($data); - } - - /** - * Specifies the list of origins that will be allowed to do CORS requests. - * An origin is allowed if it matches either an item in allow_origins or - * an item in allow_origin_regexes. - * - * Generated from protobuf field repeated string allow_origins = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAllowOrigins() - { - return $this->allow_origins; - } - - /** - * Specifies the list of origins that will be allowed to do CORS requests. - * An origin is allowed if it matches either an item in allow_origins or - * an item in allow_origin_regexes. - * - * Generated from protobuf field repeated string allow_origins = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAllowOrigins($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->allow_origins = $arr; - - return $this; - } - - /** - * Specifies the regular expression patterns that match allowed origins. For - * regular expression grammar, please see - * https://github.com/google/re2/wiki/Syntax. - * - * Generated from protobuf field repeated string allow_origin_regexes = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAllowOriginRegexes() - { - return $this->allow_origin_regexes; - } - - /** - * Specifies the regular expression patterns that match allowed origins. For - * regular expression grammar, please see - * https://github.com/google/re2/wiki/Syntax. - * - * Generated from protobuf field repeated string allow_origin_regexes = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAllowOriginRegexes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->allow_origin_regexes = $arr; - - return $this; - } - - /** - * Specifies the content for Access-Control-Allow-Methods header. - * - * Generated from protobuf field repeated string allow_methods = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAllowMethods() - { - return $this->allow_methods; - } - - /** - * Specifies the content for Access-Control-Allow-Methods header. - * - * Generated from protobuf field repeated string allow_methods = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAllowMethods($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->allow_methods = $arr; - - return $this; - } - - /** - * Specifies the content for Access-Control-Allow-Headers header. - * - * Generated from protobuf field repeated string allow_headers = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAllowHeaders() - { - return $this->allow_headers; - } - - /** - * Specifies the content for Access-Control-Allow-Headers header. - * - * Generated from protobuf field repeated string allow_headers = 4; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAllowHeaders($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->allow_headers = $arr; - - return $this; - } - - /** - * Specifies the content for Access-Control-Expose-Headers header. - * - * Generated from protobuf field repeated string expose_headers = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getExposeHeaders() - { - return $this->expose_headers; - } - - /** - * Specifies the content for Access-Control-Expose-Headers header. - * - * Generated from protobuf field repeated string expose_headers = 5; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setExposeHeaders($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->expose_headers = $arr; - - return $this; - } - - /** - * Specifies how long result of a preflight request can be cached in - * seconds. This translates to the Access-Control-Max-Age header. - * - * Generated from protobuf field string max_age = 6; - * @return string - */ - public function getMaxAge() - { - return $this->max_age; - } - - /** - * Specifies how long result of a preflight request can be cached in - * seconds. This translates to the Access-Control-Max-Age header. - * - * Generated from protobuf field string max_age = 6; - * @param string $var - * @return $this - */ - public function setMaxAge($var) - { - GPBUtil::checkString($var, True); - $this->max_age = $var; - - return $this; - } - - /** - * In response to a preflight request, setting this to true indicates that - * the actual request can include user credentials. This translates to the - * Access-Control-Allow-Credentials header. - * Default value is false. - * - * Generated from protobuf field bool allow_credentials = 7; - * @return bool - */ - public function getAllowCredentials() - { - return $this->allow_credentials; - } - - /** - * In response to a preflight request, setting this to true indicates that - * the actual request can include user credentials. This translates to the - * Access-Control-Allow-Credentials header. - * Default value is false. - * - * Generated from protobuf field bool allow_credentials = 7; - * @param bool $var - * @return $this - */ - public function setAllowCredentials($var) - { - GPBUtil::checkBool($var); - $this->allow_credentials = $var; - - return $this; - } - - /** - * If true, the CORS policy is disabled. The default value is false, which - * indicates that the CORS policy is in effect. - * - * Generated from protobuf field bool disabled = 8; - * @return bool - */ - public function getDisabled() - { - return $this->disabled; - } - - /** - * If true, the CORS policy is disabled. The default value is false, which - * indicates that the CORS policy is in effect. - * - * Generated from protobuf field bool disabled = 8; - * @param bool $var - * @return $this - */ - public function setDisabled($var) - { - GPBUtil::checkBool($var); - $this->disabled = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CorsPolicy::class, \Google\Cloud\NetworkServices\V1\HttpRoute_CorsPolicy::class); - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/Destination.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/Destination.php deleted file mode 100644 index 95357636b4b1..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/Destination.php +++ /dev/null @@ -1,144 +0,0 @@ -google.cloud.networkservices.v1.HttpRoute.Destination - */ -class Destination extends \Google\Protobuf\Internal\Message -{ - /** - * The URL of a BackendService to route traffic to. - * - * Generated from protobuf field string service_name = 1 [(.google.api.resource_reference) = { - */ - protected $service_name = ''; - /** - * Specifies the proportion of requests forwarded to the backend referenced - * by the serviceName field. This is computed as: - * - weight/Sum(weights in this destination list). - * For non-zero values, there may be some epsilon from the exact proportion - * defined here depending on the precision an implementation supports. - * If only one serviceName is specified and it has a weight greater than 0, - * 100% of the traffic is forwarded to that backend. - * If weights are specified for any one service name, they need to be - * specified for all of them. - * If weights are unspecified for all services, then, traffic is distributed - * in equal proportions to all of them. - * - * Generated from protobuf field int32 weight = 2; - */ - protected $weight = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $service_name - * The URL of a BackendService to route traffic to. - * @type int $weight - * Specifies the proportion of requests forwarded to the backend referenced - * by the serviceName field. This is computed as: - * - weight/Sum(weights in this destination list). - * For non-zero values, there may be some epsilon from the exact proportion - * defined here depending on the precision an implementation supports. - * If only one serviceName is specified and it has a weight greater than 0, - * 100% of the traffic is forwarded to that backend. - * If weights are specified for any one service name, they need to be - * specified for all of them. - * If weights are unspecified for all services, then, traffic is distributed - * in equal proportions to all of them. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\HttpRoute::initOnce(); - parent::__construct($data); - } - - /** - * The URL of a BackendService to route traffic to. - * - * Generated from protobuf field string service_name = 1 [(.google.api.resource_reference) = { - * @return string - */ - public function getServiceName() - { - return $this->service_name; - } - - /** - * The URL of a BackendService to route traffic to. - * - * Generated from protobuf field string service_name = 1 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setServiceName($var) - { - GPBUtil::checkString($var, True); - $this->service_name = $var; - - return $this; - } - - /** - * Specifies the proportion of requests forwarded to the backend referenced - * by the serviceName field. This is computed as: - * - weight/Sum(weights in this destination list). - * For non-zero values, there may be some epsilon from the exact proportion - * defined here depending on the precision an implementation supports. - * If only one serviceName is specified and it has a weight greater than 0, - * 100% of the traffic is forwarded to that backend. - * If weights are specified for any one service name, they need to be - * specified for all of them. - * If weights are unspecified for all services, then, traffic is distributed - * in equal proportions to all of them. - * - * Generated from protobuf field int32 weight = 2; - * @return int - */ - public function getWeight() - { - return $this->weight; - } - - /** - * Specifies the proportion of requests forwarded to the backend referenced - * by the serviceName field. This is computed as: - * - weight/Sum(weights in this destination list). - * For non-zero values, there may be some epsilon from the exact proportion - * defined here depending on the precision an implementation supports. - * If only one serviceName is specified and it has a weight greater than 0, - * 100% of the traffic is forwarded to that backend. - * If weights are specified for any one service name, they need to be - * specified for all of them. - * If weights are unspecified for all services, then, traffic is distributed - * in equal proportions to all of them. - * - * Generated from protobuf field int32 weight = 2; - * @param int $var - * @return $this - */ - public function setWeight($var) - { - GPBUtil::checkInt32($var); - $this->weight = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Destination::class, \Google\Cloud\NetworkServices\V1\HttpRoute_Destination::class); - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/FaultInjectionPolicy.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/FaultInjectionPolicy.php deleted file mode 100644 index 359d7b636738..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/FaultInjectionPolicy.php +++ /dev/null @@ -1,129 +0,0 @@ -google.cloud.networkservices.v1.HttpRoute.FaultInjectionPolicy - */ -class FaultInjectionPolicy extends \Google\Protobuf\Internal\Message -{ - /** - * The specification for injecting delay to client requests. - * - * Generated from protobuf field .google.cloud.networkservices.v1.HttpRoute.FaultInjectionPolicy.Delay delay = 1; - */ - protected $delay = null; - /** - * The specification for aborting to client requests. - * - * Generated from protobuf field .google.cloud.networkservices.v1.HttpRoute.FaultInjectionPolicy.Abort abort = 2; - */ - protected $abort = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\NetworkServices\V1\HttpRoute\FaultInjectionPolicy\Delay $delay - * The specification for injecting delay to client requests. - * @type \Google\Cloud\NetworkServices\V1\HttpRoute\FaultInjectionPolicy\Abort $abort - * The specification for aborting to client requests. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\HttpRoute::initOnce(); - parent::__construct($data); - } - - /** - * The specification for injecting delay to client requests. - * - * Generated from protobuf field .google.cloud.networkservices.v1.HttpRoute.FaultInjectionPolicy.Delay delay = 1; - * @return \Google\Cloud\NetworkServices\V1\HttpRoute\FaultInjectionPolicy\Delay|null - */ - public function getDelay() - { - return $this->delay; - } - - public function hasDelay() - { - return isset($this->delay); - } - - public function clearDelay() - { - unset($this->delay); - } - - /** - * The specification for injecting delay to client requests. - * - * Generated from protobuf field .google.cloud.networkservices.v1.HttpRoute.FaultInjectionPolicy.Delay delay = 1; - * @param \Google\Cloud\NetworkServices\V1\HttpRoute\FaultInjectionPolicy\Delay $var - * @return $this - */ - public function setDelay($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkServices\V1\HttpRoute\FaultInjectionPolicy\Delay::class); - $this->delay = $var; - - return $this; - } - - /** - * The specification for aborting to client requests. - * - * Generated from protobuf field .google.cloud.networkservices.v1.HttpRoute.FaultInjectionPolicy.Abort abort = 2; - * @return \Google\Cloud\NetworkServices\V1\HttpRoute\FaultInjectionPolicy\Abort|null - */ - public function getAbort() - { - return $this->abort; - } - - public function hasAbort() - { - return isset($this->abort); - } - - public function clearAbort() - { - unset($this->abort); - } - - /** - * The specification for aborting to client requests. - * - * Generated from protobuf field .google.cloud.networkservices.v1.HttpRoute.FaultInjectionPolicy.Abort abort = 2; - * @param \Google\Cloud\NetworkServices\V1\HttpRoute\FaultInjectionPolicy\Abort $var - * @return $this - */ - public function setAbort($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkServices\V1\HttpRoute\FaultInjectionPolicy\Abort::class); - $this->abort = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(FaultInjectionPolicy::class, \Google\Cloud\NetworkServices\V1\HttpRoute_FaultInjectionPolicy::class); - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/FaultInjectionPolicy/Abort.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/FaultInjectionPolicy/Abort.php deleted file mode 100644 index f190f0610d77..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/FaultInjectionPolicy/Abort.php +++ /dev/null @@ -1,113 +0,0 @@ -google.cloud.networkservices.v1.HttpRoute.FaultInjectionPolicy.Abort - */ -class Abort extends \Google\Protobuf\Internal\Message -{ - /** - * The HTTP status code used to abort the request. - * The value must be between 200 and 599 inclusive. - * - * Generated from protobuf field int32 http_status = 1; - */ - protected $http_status = 0; - /** - * The percentage of traffic which will be aborted. - * The value must be between [0, 100] - * - * Generated from protobuf field int32 percentage = 2; - */ - protected $percentage = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $http_status - * The HTTP status code used to abort the request. - * The value must be between 200 and 599 inclusive. - * @type int $percentage - * The percentage of traffic which will be aborted. - * The value must be between [0, 100] - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\HttpRoute::initOnce(); - parent::__construct($data); - } - - /** - * The HTTP status code used to abort the request. - * The value must be between 200 and 599 inclusive. - * - * Generated from protobuf field int32 http_status = 1; - * @return int - */ - public function getHttpStatus() - { - return $this->http_status; - } - - /** - * The HTTP status code used to abort the request. - * The value must be between 200 and 599 inclusive. - * - * Generated from protobuf field int32 http_status = 1; - * @param int $var - * @return $this - */ - public function setHttpStatus($var) - { - GPBUtil::checkInt32($var); - $this->http_status = $var; - - return $this; - } - - /** - * The percentage of traffic which will be aborted. - * The value must be between [0, 100] - * - * Generated from protobuf field int32 percentage = 2; - * @return int - */ - public function getPercentage() - { - return $this->percentage; - } - - /** - * The percentage of traffic which will be aborted. - * The value must be between [0, 100] - * - * Generated from protobuf field int32 percentage = 2; - * @param int $var - * @return $this - */ - public function setPercentage($var) - { - GPBUtil::checkInt32($var); - $this->percentage = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Abort::class, \Google\Cloud\NetworkServices\V1\HttpRoute_FaultInjectionPolicy_Abort::class); - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/FaultInjectionPolicy/Delay.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/FaultInjectionPolicy/Delay.php deleted file mode 100644 index 3fb9852742e7..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/FaultInjectionPolicy/Delay.php +++ /dev/null @@ -1,119 +0,0 @@ -google.cloud.networkservices.v1.HttpRoute.FaultInjectionPolicy.Delay - */ -class Delay extends \Google\Protobuf\Internal\Message -{ - /** - * Specify a fixed delay before forwarding the request. - * - * Generated from protobuf field .google.protobuf.Duration fixed_delay = 1; - */ - protected $fixed_delay = null; - /** - * The percentage of traffic on which delay will be injected. - * The value must be between [0, 100] - * - * Generated from protobuf field int32 percentage = 2; - */ - protected $percentage = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Duration $fixed_delay - * Specify a fixed delay before forwarding the request. - * @type int $percentage - * The percentage of traffic on which delay will be injected. - * The value must be between [0, 100] - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\HttpRoute::initOnce(); - parent::__construct($data); - } - - /** - * Specify a fixed delay before forwarding the request. - * - * Generated from protobuf field .google.protobuf.Duration fixed_delay = 1; - * @return \Google\Protobuf\Duration|null - */ - public function getFixedDelay() - { - return $this->fixed_delay; - } - - public function hasFixedDelay() - { - return isset($this->fixed_delay); - } - - public function clearFixedDelay() - { - unset($this->fixed_delay); - } - - /** - * Specify a fixed delay before forwarding the request. - * - * Generated from protobuf field .google.protobuf.Duration fixed_delay = 1; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setFixedDelay($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->fixed_delay = $var; - - return $this; - } - - /** - * The percentage of traffic on which delay will be injected. - * The value must be between [0, 100] - * - * Generated from protobuf field int32 percentage = 2; - * @return int - */ - public function getPercentage() - { - return $this->percentage; - } - - /** - * The percentage of traffic on which delay will be injected. - * The value must be between [0, 100] - * - * Generated from protobuf field int32 percentage = 2; - * @param int $var - * @return $this - */ - public function setPercentage($var) - { - GPBUtil::checkInt32($var); - $this->percentage = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Delay::class, \Google\Cloud\NetworkServices\V1\HttpRoute_FaultInjectionPolicy_Delay::class); - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/HeaderMatch.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/HeaderMatch.php deleted file mode 100644 index 9bb4ffab022a..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/HeaderMatch.php +++ /dev/null @@ -1,330 +0,0 @@ -google.cloud.networkservices.v1.HttpRoute.HeaderMatch - */ -class HeaderMatch extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the HTTP header to match against. - * - * Generated from protobuf field string header = 1; - */ - protected $header = ''; - /** - * If specified, the match result will be inverted before checking. Default - * value is set to false. - * - * Generated from protobuf field bool invert_match = 8; - */ - protected $invert_match = false; - protected $MatchType; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $exact_match - * The value of the header should match exactly the content of - * exact_match. - * @type string $regex_match - * The value of the header must match the regular expression specified in - * regex_match. For regular expression grammar, please see: - * https://github.com/google/re2/wiki/Syntax - * @type string $prefix_match - * The value of the header must start with the contents of prefix_match. - * @type bool $present_match - * A header with header_name must exist. The match takes place whether or - * not the header has a value. - * @type string $suffix_match - * The value of the header must end with the contents of suffix_match. - * @type \Google\Cloud\NetworkServices\V1\HttpRoute\HeaderMatch\IntegerRange $range_match - * If specified, the rule will match if the request header value is within - * the range. - * @type string $header - * The name of the HTTP header to match against. - * @type bool $invert_match - * If specified, the match result will be inverted before checking. Default - * value is set to false. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\HttpRoute::initOnce(); - parent::__construct($data); - } - - /** - * The value of the header should match exactly the content of - * exact_match. - * - * Generated from protobuf field string exact_match = 2; - * @return string - */ - public function getExactMatch() - { - return $this->readOneof(2); - } - - public function hasExactMatch() - { - return $this->hasOneof(2); - } - - /** - * The value of the header should match exactly the content of - * exact_match. - * - * Generated from protobuf field string exact_match = 2; - * @param string $var - * @return $this - */ - public function setExactMatch($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * The value of the header must match the regular expression specified in - * regex_match. For regular expression grammar, please see: - * https://github.com/google/re2/wiki/Syntax - * - * Generated from protobuf field string regex_match = 3; - * @return string - */ - public function getRegexMatch() - { - return $this->readOneof(3); - } - - public function hasRegexMatch() - { - return $this->hasOneof(3); - } - - /** - * The value of the header must match the regular expression specified in - * regex_match. For regular expression grammar, please see: - * https://github.com/google/re2/wiki/Syntax - * - * Generated from protobuf field string regex_match = 3; - * @param string $var - * @return $this - */ - public function setRegexMatch($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * The value of the header must start with the contents of prefix_match. - * - * Generated from protobuf field string prefix_match = 4; - * @return string - */ - public function getPrefixMatch() - { - return $this->readOneof(4); - } - - public function hasPrefixMatch() - { - return $this->hasOneof(4); - } - - /** - * The value of the header must start with the contents of prefix_match. - * - * Generated from protobuf field string prefix_match = 4; - * @param string $var - * @return $this - */ - public function setPrefixMatch($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * A header with header_name must exist. The match takes place whether or - * not the header has a value. - * - * Generated from protobuf field bool present_match = 5; - * @return bool - */ - public function getPresentMatch() - { - return $this->readOneof(5); - } - - public function hasPresentMatch() - { - return $this->hasOneof(5); - } - - /** - * A header with header_name must exist. The match takes place whether or - * not the header has a value. - * - * Generated from protobuf field bool present_match = 5; - * @param bool $var - * @return $this - */ - public function setPresentMatch($var) - { - GPBUtil::checkBool($var); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * The value of the header must end with the contents of suffix_match. - * - * Generated from protobuf field string suffix_match = 6; - * @return string - */ - public function getSuffixMatch() - { - return $this->readOneof(6); - } - - public function hasSuffixMatch() - { - return $this->hasOneof(6); - } - - /** - * The value of the header must end with the contents of suffix_match. - * - * Generated from protobuf field string suffix_match = 6; - * @param string $var - * @return $this - */ - public function setSuffixMatch($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * If specified, the rule will match if the request header value is within - * the range. - * - * Generated from protobuf field .google.cloud.networkservices.v1.HttpRoute.HeaderMatch.IntegerRange range_match = 7; - * @return \Google\Cloud\NetworkServices\V1\HttpRoute\HeaderMatch\IntegerRange|null - */ - public function getRangeMatch() - { - return $this->readOneof(7); - } - - public function hasRangeMatch() - { - return $this->hasOneof(7); - } - - /** - * If specified, the rule will match if the request header value is within - * the range. - * - * Generated from protobuf field .google.cloud.networkservices.v1.HttpRoute.HeaderMatch.IntegerRange range_match = 7; - * @param \Google\Cloud\NetworkServices\V1\HttpRoute\HeaderMatch\IntegerRange $var - * @return $this - */ - public function setRangeMatch($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkServices\V1\HttpRoute\HeaderMatch\IntegerRange::class); - $this->writeOneof(7, $var); - - return $this; - } - - /** - * The name of the HTTP header to match against. - * - * Generated from protobuf field string header = 1; - * @return string - */ - public function getHeader() - { - return $this->header; - } - - /** - * The name of the HTTP header to match against. - * - * Generated from protobuf field string header = 1; - * @param string $var - * @return $this - */ - public function setHeader($var) - { - GPBUtil::checkString($var, True); - $this->header = $var; - - return $this; - } - - /** - * If specified, the match result will be inverted before checking. Default - * value is set to false. - * - * Generated from protobuf field bool invert_match = 8; - * @return bool - */ - public function getInvertMatch() - { - return $this->invert_match; - } - - /** - * If specified, the match result will be inverted before checking. Default - * value is set to false. - * - * Generated from protobuf field bool invert_match = 8; - * @param bool $var - * @return $this - */ - public function setInvertMatch($var) - { - GPBUtil::checkBool($var); - $this->invert_match = $var; - - return $this; - } - - /** - * @return string - */ - public function getMatchType() - { - return $this->whichOneof("MatchType"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(HeaderMatch::class, \Google\Cloud\NetworkServices\V1\HttpRoute_HeaderMatch::class); - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/HeaderMatch/IntegerRange.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/HeaderMatch/IntegerRange.php deleted file mode 100644 index 553192944963..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/HeaderMatch/IntegerRange.php +++ /dev/null @@ -1,104 +0,0 @@ -google.cloud.networkservices.v1.HttpRoute.HeaderMatch.IntegerRange - */ -class IntegerRange extends \Google\Protobuf\Internal\Message -{ - /** - * Start of the range (inclusive) - * - * Generated from protobuf field int32 start = 1; - */ - protected $start = 0; - /** - * End of the range (exclusive) - * - * Generated from protobuf field int32 end = 2; - */ - protected $end = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $start - * Start of the range (inclusive) - * @type int $end - * End of the range (exclusive) - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\HttpRoute::initOnce(); - parent::__construct($data); - } - - /** - * Start of the range (inclusive) - * - * Generated from protobuf field int32 start = 1; - * @return int - */ - public function getStart() - { - return $this->start; - } - - /** - * Start of the range (inclusive) - * - * Generated from protobuf field int32 start = 1; - * @param int $var - * @return $this - */ - public function setStart($var) - { - GPBUtil::checkInt32($var); - $this->start = $var; - - return $this; - } - - /** - * End of the range (exclusive) - * - * Generated from protobuf field int32 end = 2; - * @return int - */ - public function getEnd() - { - return $this->end; - } - - /** - * End of the range (exclusive) - * - * Generated from protobuf field int32 end = 2; - * @param int $var - * @return $this - */ - public function setEnd($var) - { - GPBUtil::checkInt32($var); - $this->end = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(IntegerRange::class, \Google\Cloud\NetworkServices\V1\HttpRoute_HeaderMatch_IntegerRange::class); - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/HeaderModifier.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/HeaderModifier.php deleted file mode 100644 index 236b99df598d..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/HeaderModifier.php +++ /dev/null @@ -1,147 +0,0 @@ -google.cloud.networkservices.v1.HttpRoute.HeaderModifier - */ -class HeaderModifier extends \Google\Protobuf\Internal\Message -{ - /** - * Completely overwrite/replace the headers with given map where key is the - * name of the header, value is the value of the header. - * - * Generated from protobuf field map set = 1; - */ - private $set; - /** - * Add the headers with given map where key is the name of the header, value - * is the value of the header. - * - * Generated from protobuf field map add = 2; - */ - private $add; - /** - * Remove headers (matching by header names) specified in the list. - * - * Generated from protobuf field repeated string remove = 3; - */ - private $remove; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\MapField $set - * Completely overwrite/replace the headers with given map where key is the - * name of the header, value is the value of the header. - * @type array|\Google\Protobuf\Internal\MapField $add - * Add the headers with given map where key is the name of the header, value - * is the value of the header. - * @type array|\Google\Protobuf\Internal\RepeatedField $remove - * Remove headers (matching by header names) specified in the list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\HttpRoute::initOnce(); - parent::__construct($data); - } - - /** - * Completely overwrite/replace the headers with given map where key is the - * name of the header, value is the value of the header. - * - * Generated from protobuf field map set = 1; - * @return \Google\Protobuf\Internal\MapField - */ - public function getSet() - { - return $this->set; - } - - /** - * Completely overwrite/replace the headers with given map where key is the - * name of the header, value is the value of the header. - * - * Generated from protobuf field map set = 1; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setSet($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->set = $arr; - - return $this; - } - - /** - * Add the headers with given map where key is the name of the header, value - * is the value of the header. - * - * Generated from protobuf field map add = 2; - * @return \Google\Protobuf\Internal\MapField - */ - public function getAdd() - { - return $this->add; - } - - /** - * Add the headers with given map where key is the name of the header, value - * is the value of the header. - * - * Generated from protobuf field map add = 2; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setAdd($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->add = $arr; - - return $this; - } - - /** - * Remove headers (matching by header names) specified in the list. - * - * Generated from protobuf field repeated string remove = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRemove() - { - return $this->remove; - } - - /** - * Remove headers (matching by header names) specified in the list. - * - * Generated from protobuf field repeated string remove = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRemove($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->remove = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(HeaderModifier::class, \Google\Cloud\NetworkServices\V1\HttpRoute_HeaderModifier::class); - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/QueryParameterMatch.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/QueryParameterMatch.php deleted file mode 100644 index 498cf9ce46be..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/QueryParameterMatch.php +++ /dev/null @@ -1,202 +0,0 @@ -google.cloud.networkservices.v1.HttpRoute.QueryParameterMatch - */ -class QueryParameterMatch extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the query parameter to match. - * - * Generated from protobuf field string query_parameter = 1; - */ - protected $query_parameter = ''; - protected $MatchType; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $exact_match - * The value of the query parameter must exactly match the contents of - * exact_match. - * Only one of exact_match, regex_match, or present_match must be set. - * @type string $regex_match - * The value of the query parameter must match the regular expression - * specified by regex_match. For regular expression grammar, please see - * https://github.com/google/re2/wiki/Syntax - * Only one of exact_match, regex_match, or present_match must be set. - * @type bool $present_match - * Specifies that the QueryParameterMatcher matches if request contains - * query parameter, irrespective of whether the parameter has a value or - * not. - * Only one of exact_match, regex_match, or present_match must be set. - * @type string $query_parameter - * The name of the query parameter to match. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\HttpRoute::initOnce(); - parent::__construct($data); - } - - /** - * The value of the query parameter must exactly match the contents of - * exact_match. - * Only one of exact_match, regex_match, or present_match must be set. - * - * Generated from protobuf field string exact_match = 2; - * @return string - */ - public function getExactMatch() - { - return $this->readOneof(2); - } - - public function hasExactMatch() - { - return $this->hasOneof(2); - } - - /** - * The value of the query parameter must exactly match the contents of - * exact_match. - * Only one of exact_match, regex_match, or present_match must be set. - * - * Generated from protobuf field string exact_match = 2; - * @param string $var - * @return $this - */ - public function setExactMatch($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * The value of the query parameter must match the regular expression - * specified by regex_match. For regular expression grammar, please see - * https://github.com/google/re2/wiki/Syntax - * Only one of exact_match, regex_match, or present_match must be set. - * - * Generated from protobuf field string regex_match = 3; - * @return string - */ - public function getRegexMatch() - { - return $this->readOneof(3); - } - - public function hasRegexMatch() - { - return $this->hasOneof(3); - } - - /** - * The value of the query parameter must match the regular expression - * specified by regex_match. For regular expression grammar, please see - * https://github.com/google/re2/wiki/Syntax - * Only one of exact_match, regex_match, or present_match must be set. - * - * Generated from protobuf field string regex_match = 3; - * @param string $var - * @return $this - */ - public function setRegexMatch($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Specifies that the QueryParameterMatcher matches if request contains - * query parameter, irrespective of whether the parameter has a value or - * not. - * Only one of exact_match, regex_match, or present_match must be set. - * - * Generated from protobuf field bool present_match = 4; - * @return bool - */ - public function getPresentMatch() - { - return $this->readOneof(4); - } - - public function hasPresentMatch() - { - return $this->hasOneof(4); - } - - /** - * Specifies that the QueryParameterMatcher matches if request contains - * query parameter, irrespective of whether the parameter has a value or - * not. - * Only one of exact_match, regex_match, or present_match must be set. - * - * Generated from protobuf field bool present_match = 4; - * @param bool $var - * @return $this - */ - public function setPresentMatch($var) - { - GPBUtil::checkBool($var); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * The name of the query parameter to match. - * - * Generated from protobuf field string query_parameter = 1; - * @return string - */ - public function getQueryParameter() - { - return $this->query_parameter; - } - - /** - * The name of the query parameter to match. - * - * Generated from protobuf field string query_parameter = 1; - * @param string $var - * @return $this - */ - public function setQueryParameter($var) - { - GPBUtil::checkString($var, True); - $this->query_parameter = $var; - - return $this; - } - - /** - * @return string - */ - public function getMatchType() - { - return $this->whichOneof("MatchType"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(QueryParameterMatch::class, \Google\Cloud\NetworkServices\V1\HttpRoute_QueryParameterMatch::class); - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/Redirect.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/Redirect.php deleted file mode 100644 index 044a694184e1..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/Redirect.php +++ /dev/null @@ -1,330 +0,0 @@ -google.cloud.networkservices.v1.HttpRoute.Redirect - */ -class Redirect extends \Google\Protobuf\Internal\Message -{ - /** - * The host that will be used in the redirect response instead of the one - * that was supplied in the request. - * - * Generated from protobuf field string host_redirect = 1; - */ - protected $host_redirect = ''; - /** - * The path that will be used in the redirect response instead of the one - * that was supplied in the request. - * path_redirect can not be supplied together with prefix_redirect. Supply - * one alone or neither. If neither is supplied, the path of the original - * request will be used for the redirect. - * - * Generated from protobuf field string path_redirect = 2; - */ - protected $path_redirect = ''; - /** - * Indicates that during redirection, the matched prefix (or path) should be - * swapped with this value. This option allows URLs be dynamically created - * based on the request. - * - * Generated from protobuf field string prefix_rewrite = 3; - */ - protected $prefix_rewrite = ''; - /** - * The HTTP Status code to use for the redirect. - * - * Generated from protobuf field .google.cloud.networkservices.v1.HttpRoute.Redirect.ResponseCode response_code = 4; - */ - protected $response_code = 0; - /** - * If set to true, the URL scheme in the redirected request is set to https. - * If set to false, the URL scheme of the redirected request will remain the - * same as that of the request. - * The default is set to false. - * - * Generated from protobuf field bool https_redirect = 5; - */ - protected $https_redirect = false; - /** - * if set to true, any accompanying query portion of the original URL is - * removed prior to redirecting the request. If set to false, the query - * portion of the original URL is retained. - * The default is set to false. - * - * Generated from protobuf field bool strip_query = 6; - */ - protected $strip_query = false; - /** - * The port that will be used in the redirected request instead of the one - * that was supplied in the request. - * - * Generated from protobuf field int32 port_redirect = 7; - */ - protected $port_redirect = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $host_redirect - * The host that will be used in the redirect response instead of the one - * that was supplied in the request. - * @type string $path_redirect - * The path that will be used in the redirect response instead of the one - * that was supplied in the request. - * path_redirect can not be supplied together with prefix_redirect. Supply - * one alone or neither. If neither is supplied, the path of the original - * request will be used for the redirect. - * @type string $prefix_rewrite - * Indicates that during redirection, the matched prefix (or path) should be - * swapped with this value. This option allows URLs be dynamically created - * based on the request. - * @type int $response_code - * The HTTP Status code to use for the redirect. - * @type bool $https_redirect - * If set to true, the URL scheme in the redirected request is set to https. - * If set to false, the URL scheme of the redirected request will remain the - * same as that of the request. - * The default is set to false. - * @type bool $strip_query - * if set to true, any accompanying query portion of the original URL is - * removed prior to redirecting the request. If set to false, the query - * portion of the original URL is retained. - * The default is set to false. - * @type int $port_redirect - * The port that will be used in the redirected request instead of the one - * that was supplied in the request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\HttpRoute::initOnce(); - parent::__construct($data); - } - - /** - * The host that will be used in the redirect response instead of the one - * that was supplied in the request. - * - * Generated from protobuf field string host_redirect = 1; - * @return string - */ - public function getHostRedirect() - { - return $this->host_redirect; - } - - /** - * The host that will be used in the redirect response instead of the one - * that was supplied in the request. - * - * Generated from protobuf field string host_redirect = 1; - * @param string $var - * @return $this - */ - public function setHostRedirect($var) - { - GPBUtil::checkString($var, True); - $this->host_redirect = $var; - - return $this; - } - - /** - * The path that will be used in the redirect response instead of the one - * that was supplied in the request. - * path_redirect can not be supplied together with prefix_redirect. Supply - * one alone or neither. If neither is supplied, the path of the original - * request will be used for the redirect. - * - * Generated from protobuf field string path_redirect = 2; - * @return string - */ - public function getPathRedirect() - { - return $this->path_redirect; - } - - /** - * The path that will be used in the redirect response instead of the one - * that was supplied in the request. - * path_redirect can not be supplied together with prefix_redirect. Supply - * one alone or neither. If neither is supplied, the path of the original - * request will be used for the redirect. - * - * Generated from protobuf field string path_redirect = 2; - * @param string $var - * @return $this - */ - public function setPathRedirect($var) - { - GPBUtil::checkString($var, True); - $this->path_redirect = $var; - - return $this; - } - - /** - * Indicates that during redirection, the matched prefix (or path) should be - * swapped with this value. This option allows URLs be dynamically created - * based on the request. - * - * Generated from protobuf field string prefix_rewrite = 3; - * @return string - */ - public function getPrefixRewrite() - { - return $this->prefix_rewrite; - } - - /** - * Indicates that during redirection, the matched prefix (or path) should be - * swapped with this value. This option allows URLs be dynamically created - * based on the request. - * - * Generated from protobuf field string prefix_rewrite = 3; - * @param string $var - * @return $this - */ - public function setPrefixRewrite($var) - { - GPBUtil::checkString($var, True); - $this->prefix_rewrite = $var; - - return $this; - } - - /** - * The HTTP Status code to use for the redirect. - * - * Generated from protobuf field .google.cloud.networkservices.v1.HttpRoute.Redirect.ResponseCode response_code = 4; - * @return int - */ - public function getResponseCode() - { - return $this->response_code; - } - - /** - * The HTTP Status code to use for the redirect. - * - * Generated from protobuf field .google.cloud.networkservices.v1.HttpRoute.Redirect.ResponseCode response_code = 4; - * @param int $var - * @return $this - */ - public function setResponseCode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\NetworkServices\V1\HttpRoute\Redirect\ResponseCode::class); - $this->response_code = $var; - - return $this; - } - - /** - * If set to true, the URL scheme in the redirected request is set to https. - * If set to false, the URL scheme of the redirected request will remain the - * same as that of the request. - * The default is set to false. - * - * Generated from protobuf field bool https_redirect = 5; - * @return bool - */ - public function getHttpsRedirect() - { - return $this->https_redirect; - } - - /** - * If set to true, the URL scheme in the redirected request is set to https. - * If set to false, the URL scheme of the redirected request will remain the - * same as that of the request. - * The default is set to false. - * - * Generated from protobuf field bool https_redirect = 5; - * @param bool $var - * @return $this - */ - public function setHttpsRedirect($var) - { - GPBUtil::checkBool($var); - $this->https_redirect = $var; - - return $this; - } - - /** - * if set to true, any accompanying query portion of the original URL is - * removed prior to redirecting the request. If set to false, the query - * portion of the original URL is retained. - * The default is set to false. - * - * Generated from protobuf field bool strip_query = 6; - * @return bool - */ - public function getStripQuery() - { - return $this->strip_query; - } - - /** - * if set to true, any accompanying query portion of the original URL is - * removed prior to redirecting the request. If set to false, the query - * portion of the original URL is retained. - * The default is set to false. - * - * Generated from protobuf field bool strip_query = 6; - * @param bool $var - * @return $this - */ - public function setStripQuery($var) - { - GPBUtil::checkBool($var); - $this->strip_query = $var; - - return $this; - } - - /** - * The port that will be used in the redirected request instead of the one - * that was supplied in the request. - * - * Generated from protobuf field int32 port_redirect = 7; - * @return int - */ - public function getPortRedirect() - { - return $this->port_redirect; - } - - /** - * The port that will be used in the redirected request instead of the one - * that was supplied in the request. - * - * Generated from protobuf field int32 port_redirect = 7; - * @param int $var - * @return $this - */ - public function setPortRedirect($var) - { - GPBUtil::checkInt32($var); - $this->port_redirect = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Redirect::class, \Google\Cloud\NetworkServices\V1\HttpRoute_Redirect::class); - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/Redirect/ResponseCode.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/Redirect/ResponseCode.php deleted file mode 100644 index 15f341d6c08f..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/Redirect/ResponseCode.php +++ /dev/null @@ -1,85 +0,0 @@ -google.cloud.networkservices.v1.HttpRoute.Redirect.ResponseCode - */ -class ResponseCode -{ - /** - * Default value - * - * Generated from protobuf enum RESPONSE_CODE_UNSPECIFIED = 0; - */ - const RESPONSE_CODE_UNSPECIFIED = 0; - /** - * Corresponds to 301. - * - * Generated from protobuf enum MOVED_PERMANENTLY_DEFAULT = 1; - */ - const MOVED_PERMANENTLY_DEFAULT = 1; - /** - * Corresponds to 302. - * - * Generated from protobuf enum FOUND = 2; - */ - const FOUND = 2; - /** - * Corresponds to 303. - * - * Generated from protobuf enum SEE_OTHER = 3; - */ - const SEE_OTHER = 3; - /** - * Corresponds to 307. In this case, the request method will be retained. - * - * Generated from protobuf enum TEMPORARY_REDIRECT = 4; - */ - const TEMPORARY_REDIRECT = 4; - /** - * Corresponds to 308. In this case, the request method will be retained. - * - * Generated from protobuf enum PERMANENT_REDIRECT = 5; - */ - const PERMANENT_REDIRECT = 5; - - private static $valueToName = [ - self::RESPONSE_CODE_UNSPECIFIED => 'RESPONSE_CODE_UNSPECIFIED', - self::MOVED_PERMANENTLY_DEFAULT => 'MOVED_PERMANENTLY_DEFAULT', - self::FOUND => 'FOUND', - self::SEE_OTHER => 'SEE_OTHER', - self::TEMPORARY_REDIRECT => 'TEMPORARY_REDIRECT', - self::PERMANENT_REDIRECT => 'PERMANENT_REDIRECT', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ResponseCode::class, \Google\Cloud\NetworkServices\V1\HttpRoute_Redirect_ResponseCode::class); - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/RequestMirrorPolicy.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/RequestMirrorPolicy.php deleted file mode 100644 index 706091e03e04..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/RequestMirrorPolicy.php +++ /dev/null @@ -1,87 +0,0 @@ -google.cloud.networkservices.v1.HttpRoute.RequestMirrorPolicy - */ -class RequestMirrorPolicy extends \Google\Protobuf\Internal\Message -{ - /** - * The destination the requests will be mirrored to. The weight of the - * destination will be ignored. - * - * Generated from protobuf field .google.cloud.networkservices.v1.HttpRoute.Destination destination = 1; - */ - protected $destination = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\NetworkServices\V1\HttpRoute\Destination $destination - * The destination the requests will be mirrored to. The weight of the - * destination will be ignored. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\HttpRoute::initOnce(); - parent::__construct($data); - } - - /** - * The destination the requests will be mirrored to. The weight of the - * destination will be ignored. - * - * Generated from protobuf field .google.cloud.networkservices.v1.HttpRoute.Destination destination = 1; - * @return \Google\Cloud\NetworkServices\V1\HttpRoute\Destination|null - */ - public function getDestination() - { - return $this->destination; - } - - public function hasDestination() - { - return isset($this->destination); - } - - public function clearDestination() - { - unset($this->destination); - } - - /** - * The destination the requests will be mirrored to. The weight of the - * destination will be ignored. - * - * Generated from protobuf field .google.cloud.networkservices.v1.HttpRoute.Destination destination = 1; - * @param \Google\Cloud\NetworkServices\V1\HttpRoute\Destination $var - * @return $this - */ - public function setDestination($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkServices\V1\HttpRoute\Destination::class); - $this->destination = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(RequestMirrorPolicy::class, \Google\Cloud\NetworkServices\V1\HttpRoute_RequestMirrorPolicy::class); - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/RetryPolicy.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/RetryPolicy.php deleted file mode 100644 index eafe92344ce6..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/RetryPolicy.php +++ /dev/null @@ -1,216 +0,0 @@ -google.cloud.networkservices.v1.HttpRoute.RetryPolicy - */ -class RetryPolicy extends \Google\Protobuf\Internal\Message -{ - /** - * Specifies one or more conditions when this retry policy applies. Valid - * values are: - * 5xx: Proxy will attempt a retry if the destination service responds - * with any 5xx response code, of if the destination service does not - * respond at all, example: disconnect, reset, read timeout, connection - * failure and refused streams. - * gateway-error: Similar to 5xx, but only applies to response codes 502, - * 503, 504. - * reset: Proxy will attempt a retry if the destination service does not - * respond at all (disconnect/reset/read timeout) - * connect-failure: Proxy will retry on failures connecting to destination - * for example due to connection timeouts. - * retriable-4xx: Proxy will retry fro retriable 4xx response codes. - * Currently the only retriable error supported is 409. - * refused-stream: Proxy will retry if the destination resets the stream - * with a REFUSED_STREAM error code. This reset type indicates that it - * is safe to retry. - * - * Generated from protobuf field repeated string retry_conditions = 1; - */ - private $retry_conditions; - /** - * Specifies the allowed number of retries. This number must be > 0. If not - * specified, default to 1. - * - * Generated from protobuf field int32 num_retries = 2; - */ - protected $num_retries = 0; - /** - * Specifies a non-zero timeout per retry attempt. - * - * Generated from protobuf field .google.protobuf.Duration per_try_timeout = 3; - */ - protected $per_try_timeout = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $retry_conditions - * Specifies one or more conditions when this retry policy applies. Valid - * values are: - * 5xx: Proxy will attempt a retry if the destination service responds - * with any 5xx response code, of if the destination service does not - * respond at all, example: disconnect, reset, read timeout, connection - * failure and refused streams. - * gateway-error: Similar to 5xx, but only applies to response codes 502, - * 503, 504. - * reset: Proxy will attempt a retry if the destination service does not - * respond at all (disconnect/reset/read timeout) - * connect-failure: Proxy will retry on failures connecting to destination - * for example due to connection timeouts. - * retriable-4xx: Proxy will retry fro retriable 4xx response codes. - * Currently the only retriable error supported is 409. - * refused-stream: Proxy will retry if the destination resets the stream - * with a REFUSED_STREAM error code. This reset type indicates that it - * is safe to retry. - * @type int $num_retries - * Specifies the allowed number of retries. This number must be > 0. If not - * specified, default to 1. - * @type \Google\Protobuf\Duration $per_try_timeout - * Specifies a non-zero timeout per retry attempt. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\HttpRoute::initOnce(); - parent::__construct($data); - } - - /** - * Specifies one or more conditions when this retry policy applies. Valid - * values are: - * 5xx: Proxy will attempt a retry if the destination service responds - * with any 5xx response code, of if the destination service does not - * respond at all, example: disconnect, reset, read timeout, connection - * failure and refused streams. - * gateway-error: Similar to 5xx, but only applies to response codes 502, - * 503, 504. - * reset: Proxy will attempt a retry if the destination service does not - * respond at all (disconnect/reset/read timeout) - * connect-failure: Proxy will retry on failures connecting to destination - * for example due to connection timeouts. - * retriable-4xx: Proxy will retry fro retriable 4xx response codes. - * Currently the only retriable error supported is 409. - * refused-stream: Proxy will retry if the destination resets the stream - * with a REFUSED_STREAM error code. This reset type indicates that it - * is safe to retry. - * - * Generated from protobuf field repeated string retry_conditions = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRetryConditions() - { - return $this->retry_conditions; - } - - /** - * Specifies one or more conditions when this retry policy applies. Valid - * values are: - * 5xx: Proxy will attempt a retry if the destination service responds - * with any 5xx response code, of if the destination service does not - * respond at all, example: disconnect, reset, read timeout, connection - * failure and refused streams. - * gateway-error: Similar to 5xx, but only applies to response codes 502, - * 503, 504. - * reset: Proxy will attempt a retry if the destination service does not - * respond at all (disconnect/reset/read timeout) - * connect-failure: Proxy will retry on failures connecting to destination - * for example due to connection timeouts. - * retriable-4xx: Proxy will retry fro retriable 4xx response codes. - * Currently the only retriable error supported is 409. - * refused-stream: Proxy will retry if the destination resets the stream - * with a REFUSED_STREAM error code. This reset type indicates that it - * is safe to retry. - * - * Generated from protobuf field repeated string retry_conditions = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRetryConditions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->retry_conditions = $arr; - - return $this; - } - - /** - * Specifies the allowed number of retries. This number must be > 0. If not - * specified, default to 1. - * - * Generated from protobuf field int32 num_retries = 2; - * @return int - */ - public function getNumRetries() - { - return $this->num_retries; - } - - /** - * Specifies the allowed number of retries. This number must be > 0. If not - * specified, default to 1. - * - * Generated from protobuf field int32 num_retries = 2; - * @param int $var - * @return $this - */ - public function setNumRetries($var) - { - GPBUtil::checkInt32($var); - $this->num_retries = $var; - - return $this; - } - - /** - * Specifies a non-zero timeout per retry attempt. - * - * Generated from protobuf field .google.protobuf.Duration per_try_timeout = 3; - * @return \Google\Protobuf\Duration|null - */ - public function getPerTryTimeout() - { - return $this->per_try_timeout; - } - - public function hasPerTryTimeout() - { - return isset($this->per_try_timeout); - } - - public function clearPerTryTimeout() - { - unset($this->per_try_timeout); - } - - /** - * Specifies a non-zero timeout per retry attempt. - * - * Generated from protobuf field .google.protobuf.Duration per_try_timeout = 3; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setPerTryTimeout($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->per_try_timeout = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(RetryPolicy::class, \Google\Cloud\NetworkServices\V1\HttpRoute_RetryPolicy::class); - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/RouteAction.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/RouteAction.php deleted file mode 100644 index 863e7c5acd62..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/RouteAction.php +++ /dev/null @@ -1,546 +0,0 @@ -google.cloud.networkservices.v1.HttpRoute.RouteAction - */ -class RouteAction extends \Google\Protobuf\Internal\Message -{ - /** - * The destination to which traffic should be forwarded. - * - * Generated from protobuf field repeated .google.cloud.networkservices.v1.HttpRoute.Destination destinations = 1; - */ - private $destinations; - /** - * If set, the request is directed as configured by this field. - * - * Generated from protobuf field .google.cloud.networkservices.v1.HttpRoute.Redirect redirect = 2; - */ - protected $redirect = null; - /** - * The specification for fault injection introduced into traffic to test the - * resiliency of clients to backend service failure. As part of fault - * injection, when clients send requests to a backend service, delays can be - * introduced on a percentage of requests before sending those requests to - * the backend service. Similarly requests from clients can be aborted for a - * percentage of requests. - * timeout and retry_policy will be ignored by clients that are configured - * with a fault_injection_policy - * - * Generated from protobuf field .google.cloud.networkservices.v1.HttpRoute.FaultInjectionPolicy fault_injection_policy = 4; - */ - protected $fault_injection_policy = null; - /** - * The specification for modifying the headers of a matching request prior - * to delivery of the request to the destination. If HeaderModifiers are set - * on both the Destination and the RouteAction, they will be merged. - * Conflicts between the two will not be resolved on the configuration. - * - * Generated from protobuf field .google.cloud.networkservices.v1.HttpRoute.HeaderModifier request_header_modifier = 5; - */ - protected $request_header_modifier = null; - /** - * The specification for modifying the headers of a response prior to - * sending the response back to the client. If HeaderModifiers are set - * on both the Destination and the RouteAction, they will be merged. - * Conflicts between the two will not be resolved on the configuration. - * - * Generated from protobuf field .google.cloud.networkservices.v1.HttpRoute.HeaderModifier response_header_modifier = 6; - */ - protected $response_header_modifier = null; - /** - * The specification for rewrite URL before forwarding requests to the - * destination. - * - * Generated from protobuf field .google.cloud.networkservices.v1.HttpRoute.URLRewrite url_rewrite = 7; - */ - protected $url_rewrite = null; - /** - * Specifies the timeout for selected route. Timeout is computed from the - * time the request has been fully processed (i.e. end of stream) up until - * the response has been completely processed. Timeout includes all retries. - * - * Generated from protobuf field .google.protobuf.Duration timeout = 8; - */ - protected $timeout = null; - /** - * Specifies the retry policy associated with this route. - * - * Generated from protobuf field .google.cloud.networkservices.v1.HttpRoute.RetryPolicy retry_policy = 9; - */ - protected $retry_policy = null; - /** - * Specifies the policy on how requests intended for the routes destination - * are shadowed to a separate mirrored destination. Proxy will not wait for - * the shadow destination to respond before returning the response. Prior to - * sending traffic to the shadow service, the host/authority header is - * suffixed with -shadow. - * - * Generated from protobuf field .google.cloud.networkservices.v1.HttpRoute.RequestMirrorPolicy request_mirror_policy = 10; - */ - protected $request_mirror_policy = null; - /** - * The specification for allowing client side cross-origin requests. - * - * Generated from protobuf field .google.cloud.networkservices.v1.HttpRoute.CorsPolicy cors_policy = 11; - */ - protected $cors_policy = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\NetworkServices\V1\HttpRoute\Destination>|\Google\Protobuf\Internal\RepeatedField $destinations - * The destination to which traffic should be forwarded. - * @type \Google\Cloud\NetworkServices\V1\HttpRoute\Redirect $redirect - * If set, the request is directed as configured by this field. - * @type \Google\Cloud\NetworkServices\V1\HttpRoute\FaultInjectionPolicy $fault_injection_policy - * The specification for fault injection introduced into traffic to test the - * resiliency of clients to backend service failure. As part of fault - * injection, when clients send requests to a backend service, delays can be - * introduced on a percentage of requests before sending those requests to - * the backend service. Similarly requests from clients can be aborted for a - * percentage of requests. - * timeout and retry_policy will be ignored by clients that are configured - * with a fault_injection_policy - * @type \Google\Cloud\NetworkServices\V1\HttpRoute\HeaderModifier $request_header_modifier - * The specification for modifying the headers of a matching request prior - * to delivery of the request to the destination. If HeaderModifiers are set - * on both the Destination and the RouteAction, they will be merged. - * Conflicts between the two will not be resolved on the configuration. - * @type \Google\Cloud\NetworkServices\V1\HttpRoute\HeaderModifier $response_header_modifier - * The specification for modifying the headers of a response prior to - * sending the response back to the client. If HeaderModifiers are set - * on both the Destination and the RouteAction, they will be merged. - * Conflicts between the two will not be resolved on the configuration. - * @type \Google\Cloud\NetworkServices\V1\HttpRoute\URLRewrite $url_rewrite - * The specification for rewrite URL before forwarding requests to the - * destination. - * @type \Google\Protobuf\Duration $timeout - * Specifies the timeout for selected route. Timeout is computed from the - * time the request has been fully processed (i.e. end of stream) up until - * the response has been completely processed. Timeout includes all retries. - * @type \Google\Cloud\NetworkServices\V1\HttpRoute\RetryPolicy $retry_policy - * Specifies the retry policy associated with this route. - * @type \Google\Cloud\NetworkServices\V1\HttpRoute\RequestMirrorPolicy $request_mirror_policy - * Specifies the policy on how requests intended for the routes destination - * are shadowed to a separate mirrored destination. Proxy will not wait for - * the shadow destination to respond before returning the response. Prior to - * sending traffic to the shadow service, the host/authority header is - * suffixed with -shadow. - * @type \Google\Cloud\NetworkServices\V1\HttpRoute\CorsPolicy $cors_policy - * The specification for allowing client side cross-origin requests. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\HttpRoute::initOnce(); - parent::__construct($data); - } - - /** - * The destination to which traffic should be forwarded. - * - * Generated from protobuf field repeated .google.cloud.networkservices.v1.HttpRoute.Destination destinations = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDestinations() - { - return $this->destinations; - } - - /** - * The destination to which traffic should be forwarded. - * - * Generated from protobuf field repeated .google.cloud.networkservices.v1.HttpRoute.Destination destinations = 1; - * @param array<\Google\Cloud\NetworkServices\V1\HttpRoute\Destination>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDestinations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkServices\V1\HttpRoute\Destination::class); - $this->destinations = $arr; - - return $this; - } - - /** - * If set, the request is directed as configured by this field. - * - * Generated from protobuf field .google.cloud.networkservices.v1.HttpRoute.Redirect redirect = 2; - * @return \Google\Cloud\NetworkServices\V1\HttpRoute\Redirect|null - */ - public function getRedirect() - { - return $this->redirect; - } - - public function hasRedirect() - { - return isset($this->redirect); - } - - public function clearRedirect() - { - unset($this->redirect); - } - - /** - * If set, the request is directed as configured by this field. - * - * Generated from protobuf field .google.cloud.networkservices.v1.HttpRoute.Redirect redirect = 2; - * @param \Google\Cloud\NetworkServices\V1\HttpRoute\Redirect $var - * @return $this - */ - public function setRedirect($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkServices\V1\HttpRoute\Redirect::class); - $this->redirect = $var; - - return $this; - } - - /** - * The specification for fault injection introduced into traffic to test the - * resiliency of clients to backend service failure. As part of fault - * injection, when clients send requests to a backend service, delays can be - * introduced on a percentage of requests before sending those requests to - * the backend service. Similarly requests from clients can be aborted for a - * percentage of requests. - * timeout and retry_policy will be ignored by clients that are configured - * with a fault_injection_policy - * - * Generated from protobuf field .google.cloud.networkservices.v1.HttpRoute.FaultInjectionPolicy fault_injection_policy = 4; - * @return \Google\Cloud\NetworkServices\V1\HttpRoute\FaultInjectionPolicy|null - */ - public function getFaultInjectionPolicy() - { - return $this->fault_injection_policy; - } - - public function hasFaultInjectionPolicy() - { - return isset($this->fault_injection_policy); - } - - public function clearFaultInjectionPolicy() - { - unset($this->fault_injection_policy); - } - - /** - * The specification for fault injection introduced into traffic to test the - * resiliency of clients to backend service failure. As part of fault - * injection, when clients send requests to a backend service, delays can be - * introduced on a percentage of requests before sending those requests to - * the backend service. Similarly requests from clients can be aborted for a - * percentage of requests. - * timeout and retry_policy will be ignored by clients that are configured - * with a fault_injection_policy - * - * Generated from protobuf field .google.cloud.networkservices.v1.HttpRoute.FaultInjectionPolicy fault_injection_policy = 4; - * @param \Google\Cloud\NetworkServices\V1\HttpRoute\FaultInjectionPolicy $var - * @return $this - */ - public function setFaultInjectionPolicy($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkServices\V1\HttpRoute\FaultInjectionPolicy::class); - $this->fault_injection_policy = $var; - - return $this; - } - - /** - * The specification for modifying the headers of a matching request prior - * to delivery of the request to the destination. If HeaderModifiers are set - * on both the Destination and the RouteAction, they will be merged. - * Conflicts between the two will not be resolved on the configuration. - * - * Generated from protobuf field .google.cloud.networkservices.v1.HttpRoute.HeaderModifier request_header_modifier = 5; - * @return \Google\Cloud\NetworkServices\V1\HttpRoute\HeaderModifier|null - */ - public function getRequestHeaderModifier() - { - return $this->request_header_modifier; - } - - public function hasRequestHeaderModifier() - { - return isset($this->request_header_modifier); - } - - public function clearRequestHeaderModifier() - { - unset($this->request_header_modifier); - } - - /** - * The specification for modifying the headers of a matching request prior - * to delivery of the request to the destination. If HeaderModifiers are set - * on both the Destination and the RouteAction, they will be merged. - * Conflicts between the two will not be resolved on the configuration. - * - * Generated from protobuf field .google.cloud.networkservices.v1.HttpRoute.HeaderModifier request_header_modifier = 5; - * @param \Google\Cloud\NetworkServices\V1\HttpRoute\HeaderModifier $var - * @return $this - */ - public function setRequestHeaderModifier($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkServices\V1\HttpRoute\HeaderModifier::class); - $this->request_header_modifier = $var; - - return $this; - } - - /** - * The specification for modifying the headers of a response prior to - * sending the response back to the client. If HeaderModifiers are set - * on both the Destination and the RouteAction, they will be merged. - * Conflicts between the two will not be resolved on the configuration. - * - * Generated from protobuf field .google.cloud.networkservices.v1.HttpRoute.HeaderModifier response_header_modifier = 6; - * @return \Google\Cloud\NetworkServices\V1\HttpRoute\HeaderModifier|null - */ - public function getResponseHeaderModifier() - { - return $this->response_header_modifier; - } - - public function hasResponseHeaderModifier() - { - return isset($this->response_header_modifier); - } - - public function clearResponseHeaderModifier() - { - unset($this->response_header_modifier); - } - - /** - * The specification for modifying the headers of a response prior to - * sending the response back to the client. If HeaderModifiers are set - * on both the Destination and the RouteAction, they will be merged. - * Conflicts between the two will not be resolved on the configuration. - * - * Generated from protobuf field .google.cloud.networkservices.v1.HttpRoute.HeaderModifier response_header_modifier = 6; - * @param \Google\Cloud\NetworkServices\V1\HttpRoute\HeaderModifier $var - * @return $this - */ - public function setResponseHeaderModifier($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkServices\V1\HttpRoute\HeaderModifier::class); - $this->response_header_modifier = $var; - - return $this; - } - - /** - * The specification for rewrite URL before forwarding requests to the - * destination. - * - * Generated from protobuf field .google.cloud.networkservices.v1.HttpRoute.URLRewrite url_rewrite = 7; - * @return \Google\Cloud\NetworkServices\V1\HttpRoute\URLRewrite|null - */ - public function getUrlRewrite() - { - return $this->url_rewrite; - } - - public function hasUrlRewrite() - { - return isset($this->url_rewrite); - } - - public function clearUrlRewrite() - { - unset($this->url_rewrite); - } - - /** - * The specification for rewrite URL before forwarding requests to the - * destination. - * - * Generated from protobuf field .google.cloud.networkservices.v1.HttpRoute.URLRewrite url_rewrite = 7; - * @param \Google\Cloud\NetworkServices\V1\HttpRoute\URLRewrite $var - * @return $this - */ - public function setUrlRewrite($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkServices\V1\HttpRoute\URLRewrite::class); - $this->url_rewrite = $var; - - return $this; - } - - /** - * Specifies the timeout for selected route. Timeout is computed from the - * time the request has been fully processed (i.e. end of stream) up until - * the response has been completely processed. Timeout includes all retries. - * - * Generated from protobuf field .google.protobuf.Duration timeout = 8; - * @return \Google\Protobuf\Duration|null - */ - public function getTimeout() - { - return $this->timeout; - } - - public function hasTimeout() - { - return isset($this->timeout); - } - - public function clearTimeout() - { - unset($this->timeout); - } - - /** - * Specifies the timeout for selected route. Timeout is computed from the - * time the request has been fully processed (i.e. end of stream) up until - * the response has been completely processed. Timeout includes all retries. - * - * Generated from protobuf field .google.protobuf.Duration timeout = 8; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setTimeout($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->timeout = $var; - - return $this; - } - - /** - * Specifies the retry policy associated with this route. - * - * Generated from protobuf field .google.cloud.networkservices.v1.HttpRoute.RetryPolicy retry_policy = 9; - * @return \Google\Cloud\NetworkServices\V1\HttpRoute\RetryPolicy|null - */ - public function getRetryPolicy() - { - return $this->retry_policy; - } - - public function hasRetryPolicy() - { - return isset($this->retry_policy); - } - - public function clearRetryPolicy() - { - unset($this->retry_policy); - } - - /** - * Specifies the retry policy associated with this route. - * - * Generated from protobuf field .google.cloud.networkservices.v1.HttpRoute.RetryPolicy retry_policy = 9; - * @param \Google\Cloud\NetworkServices\V1\HttpRoute\RetryPolicy $var - * @return $this - */ - public function setRetryPolicy($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkServices\V1\HttpRoute\RetryPolicy::class); - $this->retry_policy = $var; - - return $this; - } - - /** - * Specifies the policy on how requests intended for the routes destination - * are shadowed to a separate mirrored destination. Proxy will not wait for - * the shadow destination to respond before returning the response. Prior to - * sending traffic to the shadow service, the host/authority header is - * suffixed with -shadow. - * - * Generated from protobuf field .google.cloud.networkservices.v1.HttpRoute.RequestMirrorPolicy request_mirror_policy = 10; - * @return \Google\Cloud\NetworkServices\V1\HttpRoute\RequestMirrorPolicy|null - */ - public function getRequestMirrorPolicy() - { - return $this->request_mirror_policy; - } - - public function hasRequestMirrorPolicy() - { - return isset($this->request_mirror_policy); - } - - public function clearRequestMirrorPolicy() - { - unset($this->request_mirror_policy); - } - - /** - * Specifies the policy on how requests intended for the routes destination - * are shadowed to a separate mirrored destination. Proxy will not wait for - * the shadow destination to respond before returning the response. Prior to - * sending traffic to the shadow service, the host/authority header is - * suffixed with -shadow. - * - * Generated from protobuf field .google.cloud.networkservices.v1.HttpRoute.RequestMirrorPolicy request_mirror_policy = 10; - * @param \Google\Cloud\NetworkServices\V1\HttpRoute\RequestMirrorPolicy $var - * @return $this - */ - public function setRequestMirrorPolicy($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkServices\V1\HttpRoute\RequestMirrorPolicy::class); - $this->request_mirror_policy = $var; - - return $this; - } - - /** - * The specification for allowing client side cross-origin requests. - * - * Generated from protobuf field .google.cloud.networkservices.v1.HttpRoute.CorsPolicy cors_policy = 11; - * @return \Google\Cloud\NetworkServices\V1\HttpRoute\CorsPolicy|null - */ - public function getCorsPolicy() - { - return $this->cors_policy; - } - - public function hasCorsPolicy() - { - return isset($this->cors_policy); - } - - public function clearCorsPolicy() - { - unset($this->cors_policy); - } - - /** - * The specification for allowing client side cross-origin requests. - * - * Generated from protobuf field .google.cloud.networkservices.v1.HttpRoute.CorsPolicy cors_policy = 11; - * @param \Google\Cloud\NetworkServices\V1\HttpRoute\CorsPolicy $var - * @return $this - */ - public function setCorsPolicy($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkServices\V1\HttpRoute\CorsPolicy::class); - $this->cors_policy = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(RouteAction::class, \Google\Cloud\NetworkServices\V1\HttpRoute_RouteAction::class); - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/RouteMatch.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/RouteMatch.php deleted file mode 100644 index b8df819973f3..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/RouteMatch.php +++ /dev/null @@ -1,290 +0,0 @@ -google.cloud.networkservices.v1.HttpRoute.RouteMatch - */ -class RouteMatch extends \Google\Protobuf\Internal\Message -{ - /** - * Specifies if prefix_match and full_path_match matches are case sensitive. - * The default value is false. - * - * Generated from protobuf field bool ignore_case = 4; - */ - protected $ignore_case = false; - /** - * Specifies a list of HTTP request headers to match against. ALL of the - * supplied headers must be matched. - * - * Generated from protobuf field repeated .google.cloud.networkservices.v1.HttpRoute.HeaderMatch headers = 5; - */ - private $headers; - /** - * Specifies a list of query parameters to match against. ALL of the query - * parameters must be matched. - * - * Generated from protobuf field repeated .google.cloud.networkservices.v1.HttpRoute.QueryParameterMatch query_parameters = 6; - */ - private $query_parameters; - protected $PathMatch; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $full_path_match - * The HTTP request path value should exactly match this value. - * Only one of full_path_match, prefix_match, or regex_match should be - * used. - * @type string $prefix_match - * The HTTP request path value must begin with specified prefix_match. - * prefix_match must begin with a /. - * Only one of full_path_match, prefix_match, or regex_match should be - * used. - * @type string $regex_match - * The HTTP request path value must satisfy the regular expression - * specified by regex_match after removing any query parameters and anchor - * supplied with the original URL. For regular expression grammar, please - * see https://github.com/google/re2/wiki/Syntax - * Only one of full_path_match, prefix_match, or regex_match should be - * used. - * @type bool $ignore_case - * Specifies if prefix_match and full_path_match matches are case sensitive. - * The default value is false. - * @type array<\Google\Cloud\NetworkServices\V1\HttpRoute\HeaderMatch>|\Google\Protobuf\Internal\RepeatedField $headers - * Specifies a list of HTTP request headers to match against. ALL of the - * supplied headers must be matched. - * @type array<\Google\Cloud\NetworkServices\V1\HttpRoute\QueryParameterMatch>|\Google\Protobuf\Internal\RepeatedField $query_parameters - * Specifies a list of query parameters to match against. ALL of the query - * parameters must be matched. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\HttpRoute::initOnce(); - parent::__construct($data); - } - - /** - * The HTTP request path value should exactly match this value. - * Only one of full_path_match, prefix_match, or regex_match should be - * used. - * - * Generated from protobuf field string full_path_match = 1; - * @return string - */ - public function getFullPathMatch() - { - return $this->readOneof(1); - } - - public function hasFullPathMatch() - { - return $this->hasOneof(1); - } - - /** - * The HTTP request path value should exactly match this value. - * Only one of full_path_match, prefix_match, or regex_match should be - * used. - * - * Generated from protobuf field string full_path_match = 1; - * @param string $var - * @return $this - */ - public function setFullPathMatch($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * The HTTP request path value must begin with specified prefix_match. - * prefix_match must begin with a /. - * Only one of full_path_match, prefix_match, or regex_match should be - * used. - * - * Generated from protobuf field string prefix_match = 2; - * @return string - */ - public function getPrefixMatch() - { - return $this->readOneof(2); - } - - public function hasPrefixMatch() - { - return $this->hasOneof(2); - } - - /** - * The HTTP request path value must begin with specified prefix_match. - * prefix_match must begin with a /. - * Only one of full_path_match, prefix_match, or regex_match should be - * used. - * - * Generated from protobuf field string prefix_match = 2; - * @param string $var - * @return $this - */ - public function setPrefixMatch($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * The HTTP request path value must satisfy the regular expression - * specified by regex_match after removing any query parameters and anchor - * supplied with the original URL. For regular expression grammar, please - * see https://github.com/google/re2/wiki/Syntax - * Only one of full_path_match, prefix_match, or regex_match should be - * used. - * - * Generated from protobuf field string regex_match = 3; - * @return string - */ - public function getRegexMatch() - { - return $this->readOneof(3); - } - - public function hasRegexMatch() - { - return $this->hasOneof(3); - } - - /** - * The HTTP request path value must satisfy the regular expression - * specified by regex_match after removing any query parameters and anchor - * supplied with the original URL. For regular expression grammar, please - * see https://github.com/google/re2/wiki/Syntax - * Only one of full_path_match, prefix_match, or regex_match should be - * used. - * - * Generated from protobuf field string regex_match = 3; - * @param string $var - * @return $this - */ - public function setRegexMatch($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Specifies if prefix_match and full_path_match matches are case sensitive. - * The default value is false. - * - * Generated from protobuf field bool ignore_case = 4; - * @return bool - */ - public function getIgnoreCase() - { - return $this->ignore_case; - } - - /** - * Specifies if prefix_match and full_path_match matches are case sensitive. - * The default value is false. - * - * Generated from protobuf field bool ignore_case = 4; - * @param bool $var - * @return $this - */ - public function setIgnoreCase($var) - { - GPBUtil::checkBool($var); - $this->ignore_case = $var; - - return $this; - } - - /** - * Specifies a list of HTTP request headers to match against. ALL of the - * supplied headers must be matched. - * - * Generated from protobuf field repeated .google.cloud.networkservices.v1.HttpRoute.HeaderMatch headers = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getHeaders() - { - return $this->headers; - } - - /** - * Specifies a list of HTTP request headers to match against. ALL of the - * supplied headers must be matched. - * - * Generated from protobuf field repeated .google.cloud.networkservices.v1.HttpRoute.HeaderMatch headers = 5; - * @param array<\Google\Cloud\NetworkServices\V1\HttpRoute\HeaderMatch>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setHeaders($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkServices\V1\HttpRoute\HeaderMatch::class); - $this->headers = $arr; - - return $this; - } - - /** - * Specifies a list of query parameters to match against. ALL of the query - * parameters must be matched. - * - * Generated from protobuf field repeated .google.cloud.networkservices.v1.HttpRoute.QueryParameterMatch query_parameters = 6; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getQueryParameters() - { - return $this->query_parameters; - } - - /** - * Specifies a list of query parameters to match against. ALL of the query - * parameters must be matched. - * - * Generated from protobuf field repeated .google.cloud.networkservices.v1.HttpRoute.QueryParameterMatch query_parameters = 6; - * @param array<\Google\Cloud\NetworkServices\V1\HttpRoute\QueryParameterMatch>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setQueryParameters($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkServices\V1\HttpRoute\QueryParameterMatch::class); - $this->query_parameters = $arr; - - return $this; - } - - /** - * @return string - */ - public function getPathMatch() - { - return $this->whichOneof("PathMatch"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(RouteMatch::class, \Google\Cloud\NetworkServices\V1\HttpRoute_RouteMatch::class); - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/RouteRule.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/RouteRule.php deleted file mode 100644 index c81a5486d91d..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/RouteRule.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.networkservices.v1.HttpRoute.RouteRule - */ -class RouteRule extends \Google\Protobuf\Internal\Message -{ - /** - * A list of matches define conditions used for matching the rule against - * incoming HTTP requests. Each match is independent, i.e. this rule will be - * matched if ANY one of the matches is satisfied. - * If no matches field is specified, this rule will unconditionally match - * traffic. - * If a default rule is desired to be configured, add a rule with no matches - * specified to the end of the rules list. - * - * Generated from protobuf field repeated .google.cloud.networkservices.v1.HttpRoute.RouteMatch matches = 1; - */ - private $matches; - /** - * The detailed rule defining how to route matched traffic. - * - * Generated from protobuf field .google.cloud.networkservices.v1.HttpRoute.RouteAction action = 2; - */ - protected $action = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\NetworkServices\V1\HttpRoute\RouteMatch>|\Google\Protobuf\Internal\RepeatedField $matches - * A list of matches define conditions used for matching the rule against - * incoming HTTP requests. Each match is independent, i.e. this rule will be - * matched if ANY one of the matches is satisfied. - * If no matches field is specified, this rule will unconditionally match - * traffic. - * If a default rule is desired to be configured, add a rule with no matches - * specified to the end of the rules list. - * @type \Google\Cloud\NetworkServices\V1\HttpRoute\RouteAction $action - * The detailed rule defining how to route matched traffic. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\HttpRoute::initOnce(); - parent::__construct($data); - } - - /** - * A list of matches define conditions used for matching the rule against - * incoming HTTP requests. Each match is independent, i.e. this rule will be - * matched if ANY one of the matches is satisfied. - * If no matches field is specified, this rule will unconditionally match - * traffic. - * If a default rule is desired to be configured, add a rule with no matches - * specified to the end of the rules list. - * - * Generated from protobuf field repeated .google.cloud.networkservices.v1.HttpRoute.RouteMatch matches = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMatches() - { - return $this->matches; - } - - /** - * A list of matches define conditions used for matching the rule against - * incoming HTTP requests. Each match is independent, i.e. this rule will be - * matched if ANY one of the matches is satisfied. - * If no matches field is specified, this rule will unconditionally match - * traffic. - * If a default rule is desired to be configured, add a rule with no matches - * specified to the end of the rules list. - * - * Generated from protobuf field repeated .google.cloud.networkservices.v1.HttpRoute.RouteMatch matches = 1; - * @param array<\Google\Cloud\NetworkServices\V1\HttpRoute\RouteMatch>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMatches($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkServices\V1\HttpRoute\RouteMatch::class); - $this->matches = $arr; - - return $this; - } - - /** - * The detailed rule defining how to route matched traffic. - * - * Generated from protobuf field .google.cloud.networkservices.v1.HttpRoute.RouteAction action = 2; - * @return \Google\Cloud\NetworkServices\V1\HttpRoute\RouteAction|null - */ - public function getAction() - { - return $this->action; - } - - public function hasAction() - { - return isset($this->action); - } - - public function clearAction() - { - unset($this->action); - } - - /** - * The detailed rule defining how to route matched traffic. - * - * Generated from protobuf field .google.cloud.networkservices.v1.HttpRoute.RouteAction action = 2; - * @param \Google\Cloud\NetworkServices\V1\HttpRoute\RouteAction $var - * @return $this - */ - public function setAction($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkServices\V1\HttpRoute\RouteAction::class); - $this->action = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(RouteRule::class, \Google\Cloud\NetworkServices\V1\HttpRoute_RouteRule::class); - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/URLRewrite.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/URLRewrite.php deleted file mode 100644 index a5668baf2c48..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/HttpRoute/URLRewrite.php +++ /dev/null @@ -1,113 +0,0 @@ -google.cloud.networkservices.v1.HttpRoute.URLRewrite - */ -class URLRewrite extends \Google\Protobuf\Internal\Message -{ - /** - * Prior to forwarding the request to the selected destination, the matching - * portion of the requests path is replaced by this value. - * - * Generated from protobuf field string path_prefix_rewrite = 1; - */ - protected $path_prefix_rewrite = ''; - /** - * Prior to forwarding the request to the selected destination, the requests - * host header is replaced by this value. - * - * Generated from protobuf field string host_rewrite = 2; - */ - protected $host_rewrite = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $path_prefix_rewrite - * Prior to forwarding the request to the selected destination, the matching - * portion of the requests path is replaced by this value. - * @type string $host_rewrite - * Prior to forwarding the request to the selected destination, the requests - * host header is replaced by this value. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\HttpRoute::initOnce(); - parent::__construct($data); - } - - /** - * Prior to forwarding the request to the selected destination, the matching - * portion of the requests path is replaced by this value. - * - * Generated from protobuf field string path_prefix_rewrite = 1; - * @return string - */ - public function getPathPrefixRewrite() - { - return $this->path_prefix_rewrite; - } - - /** - * Prior to forwarding the request to the selected destination, the matching - * portion of the requests path is replaced by this value. - * - * Generated from protobuf field string path_prefix_rewrite = 1; - * @param string $var - * @return $this - */ - public function setPathPrefixRewrite($var) - { - GPBUtil::checkString($var, True); - $this->path_prefix_rewrite = $var; - - return $this; - } - - /** - * Prior to forwarding the request to the selected destination, the requests - * host header is replaced by this value. - * - * Generated from protobuf field string host_rewrite = 2; - * @return string - */ - public function getHostRewrite() - { - return $this->host_rewrite; - } - - /** - * Prior to forwarding the request to the selected destination, the requests - * host header is replaced by this value. - * - * Generated from protobuf field string host_rewrite = 2; - * @param string $var - * @return $this - */ - public function setHostRewrite($var) - { - GPBUtil::checkString($var, True); - $this->host_rewrite = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(URLRewrite::class, \Google\Cloud\NetworkServices\V1\HttpRoute_URLRewrite::class); - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/LbRouteExtension.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/LbRouteExtension.php deleted file mode 100644 index 9609aa638c89..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/LbRouteExtension.php +++ /dev/null @@ -1,462 +0,0 @@ -google.cloud.networkservices.v1.LbRouteExtension - */ -class LbRouteExtension extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Identifier. Name of the `LbRouteExtension` resource in the - * following format: - * `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Output only. The timestamp when the resource was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The timestamp when the resource was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Optional. A human-readable description of the resource. - * - * Generated from protobuf field string description = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Optional. Set of labels associated with the `LbRouteExtension` resource. - * The format must comply with [the requirements for - * labels](https://cloud.google.com/compute/docs/labeling-resources#requirements) - * for Google Cloud resources. - * - * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - /** - * Required. A list of references to the forwarding rules to which this - * service extension is attached to. At least one forwarding rule is required. - * There can be only one `LbRouteExtension` resource per forwarding rule. - * - * Generated from protobuf field repeated string forwarding_rules = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - private $forwarding_rules; - /** - * Required. A set of ordered extension chains that contain the match - * conditions and extensions to execute. Match conditions for each extension - * chain are evaluated in sequence for a given request. The first extension - * chain that has a condition that matches the request is executed. - * Any subsequent extension chains do not execute. - * Limited to 5 extension chains per resource. - * - * Generated from protobuf field repeated .google.cloud.networkservices.v1.ExtensionChain extension_chains = 7 [(.google.api.field_behavior) = REQUIRED]; - */ - private $extension_chains; - /** - * Required. All backend services and forwarding rules referenced by this - * extension must share the same load balancing scheme. Supported values: - * `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. For more information, refer to - * [Choosing a load - * balancer](https://cloud.google.com/load-balancing/docs/backend-service). - * - * Generated from protobuf field .google.cloud.networkservices.v1.LoadBalancingScheme load_balancing_scheme = 8 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $load_balancing_scheme = 0; - /** - * Optional. The metadata provided here is included as part of the - * `metadata_context` (of type `google.protobuf.Struct`) in the - * `ProcessingRequest` message sent to the extension - * server. The metadata is available under the namespace - * `com.google.lb_route_extension.`. - * The following variables are supported in the metadata Struct: - * `{forwarding_rule_id}` - substituted with the forwarding rule's fully - * qualified resource name. - * - * Generated from protobuf field .google.protobuf.Struct metadata = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $metadata = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Identifier. Name of the `LbRouteExtension` resource in the - * following format: - * `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}`. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The timestamp when the resource was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The timestamp when the resource was updated. - * @type string $description - * Optional. A human-readable description of the resource. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. Set of labels associated with the `LbRouteExtension` resource. - * The format must comply with [the requirements for - * labels](https://cloud.google.com/compute/docs/labeling-resources#requirements) - * for Google Cloud resources. - * @type array|\Google\Protobuf\Internal\RepeatedField $forwarding_rules - * Required. A list of references to the forwarding rules to which this - * service extension is attached to. At least one forwarding rule is required. - * There can be only one `LbRouteExtension` resource per forwarding rule. - * @type array<\Google\Cloud\NetworkServices\V1\ExtensionChain>|\Google\Protobuf\Internal\RepeatedField $extension_chains - * Required. A set of ordered extension chains that contain the match - * conditions and extensions to execute. Match conditions for each extension - * chain are evaluated in sequence for a given request. The first extension - * chain that has a condition that matches the request is executed. - * Any subsequent extension chains do not execute. - * Limited to 5 extension chains per resource. - * @type int $load_balancing_scheme - * Required. All backend services and forwarding rules referenced by this - * extension must share the same load balancing scheme. Supported values: - * `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. For more information, refer to - * [Choosing a load - * balancer](https://cloud.google.com/load-balancing/docs/backend-service). - * @type \Google\Protobuf\Struct $metadata - * Optional. The metadata provided here is included as part of the - * `metadata_context` (of type `google.protobuf.Struct`) in the - * `ProcessingRequest` message sent to the extension - * server. The metadata is available under the namespace - * `com.google.lb_route_extension.`. - * The following variables are supported in the metadata Struct: - * `{forwarding_rule_id}` - substituted with the forwarding rule's fully - * qualified resource name. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\Dep::initOnce(); - parent::__construct($data); - } - - /** - * Required. Identifier. Name of the `LbRouteExtension` resource in the - * following format: - * `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Identifier. Name of the `LbRouteExtension` resource in the - * following format: - * `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. The timestamp when the resource was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The timestamp when the resource was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The timestamp when the resource was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The timestamp when the resource was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Optional. A human-readable description of the resource. - * - * Generated from protobuf field string description = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. A human-readable description of the resource. - * - * Generated from protobuf field string description = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Optional. Set of labels associated with the `LbRouteExtension` resource. - * The format must comply with [the requirements for - * labels](https://cloud.google.com/compute/docs/labeling-resources#requirements) - * for Google Cloud resources. - * - * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. Set of labels associated with the `LbRouteExtension` resource. - * The format must comply with [the requirements for - * labels](https://cloud.google.com/compute/docs/labeling-resources#requirements) - * for Google Cloud resources. - * - * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Required. A list of references to the forwarding rules to which this - * service extension is attached to. At least one forwarding rule is required. - * There can be only one `LbRouteExtension` resource per forwarding rule. - * - * Generated from protobuf field repeated string forwarding_rules = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getForwardingRules() - { - return $this->forwarding_rules; - } - - /** - * Required. A list of references to the forwarding rules to which this - * service extension is attached to. At least one forwarding rule is required. - * There can be only one `LbRouteExtension` resource per forwarding rule. - * - * Generated from protobuf field repeated string forwarding_rules = 5 [(.google.api.field_behavior) = REQUIRED]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setForwardingRules($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->forwarding_rules = $arr; - - return $this; - } - - /** - * Required. A set of ordered extension chains that contain the match - * conditions and extensions to execute. Match conditions for each extension - * chain are evaluated in sequence for a given request. The first extension - * chain that has a condition that matches the request is executed. - * Any subsequent extension chains do not execute. - * Limited to 5 extension chains per resource. - * - * Generated from protobuf field repeated .google.cloud.networkservices.v1.ExtensionChain extension_chains = 7 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getExtensionChains() - { - return $this->extension_chains; - } - - /** - * Required. A set of ordered extension chains that contain the match - * conditions and extensions to execute. Match conditions for each extension - * chain are evaluated in sequence for a given request. The first extension - * chain that has a condition that matches the request is executed. - * Any subsequent extension chains do not execute. - * Limited to 5 extension chains per resource. - * - * Generated from protobuf field repeated .google.cloud.networkservices.v1.ExtensionChain extension_chains = 7 [(.google.api.field_behavior) = REQUIRED]; - * @param array<\Google\Cloud\NetworkServices\V1\ExtensionChain>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setExtensionChains($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkServices\V1\ExtensionChain::class); - $this->extension_chains = $arr; - - return $this; - } - - /** - * Required. All backend services and forwarding rules referenced by this - * extension must share the same load balancing scheme. Supported values: - * `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. For more information, refer to - * [Choosing a load - * balancer](https://cloud.google.com/load-balancing/docs/backend-service). - * - * Generated from protobuf field .google.cloud.networkservices.v1.LoadBalancingScheme load_balancing_scheme = 8 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getLoadBalancingScheme() - { - return $this->load_balancing_scheme; - } - - /** - * Required. All backend services and forwarding rules referenced by this - * extension must share the same load balancing scheme. Supported values: - * `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. For more information, refer to - * [Choosing a load - * balancer](https://cloud.google.com/load-balancing/docs/backend-service). - * - * Generated from protobuf field .google.cloud.networkservices.v1.LoadBalancingScheme load_balancing_scheme = 8 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setLoadBalancingScheme($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\NetworkServices\V1\LoadBalancingScheme::class); - $this->load_balancing_scheme = $var; - - return $this; - } - - /** - * Optional. The metadata provided here is included as part of the - * `metadata_context` (of type `google.protobuf.Struct`) in the - * `ProcessingRequest` message sent to the extension - * server. The metadata is available under the namespace - * `com.google.lb_route_extension.`. - * The following variables are supported in the metadata Struct: - * `{forwarding_rule_id}` - substituted with the forwarding rule's fully - * qualified resource name. - * - * Generated from protobuf field .google.protobuf.Struct metadata = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Struct|null - */ - public function getMetadata() - { - return $this->metadata; - } - - public function hasMetadata() - { - return isset($this->metadata); - } - - public function clearMetadata() - { - unset($this->metadata); - } - - /** - * Optional. The metadata provided here is included as part of the - * `metadata_context` (of type `google.protobuf.Struct`) in the - * `ProcessingRequest` message sent to the extension - * server. The metadata is available under the namespace - * `com.google.lb_route_extension.`. - * The following variables are supported in the metadata Struct: - * `{forwarding_rule_id}` - substituted with the forwarding rule's fully - * qualified resource name. - * - * Generated from protobuf field .google.protobuf.Struct metadata = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Struct $var - * @return $this - */ - public function setMetadata($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); - $this->metadata = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/LbTrafficExtension.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/LbTrafficExtension.php deleted file mode 100644 index 250a492185ab..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/LbTrafficExtension.php +++ /dev/null @@ -1,460 +0,0 @@ -google.cloud.networkservices.v1.LbTrafficExtension - */ -class LbTrafficExtension extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Identifier. Name of the `LbTrafficExtension` resource in the - * following format: - * `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Output only. The timestamp when the resource was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The timestamp when the resource was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Optional. A human-readable description of the resource. - * - * Generated from protobuf field string description = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Optional. Set of labels associated with the `LbTrafficExtension` resource. - * The format must comply with [the requirements for - * labels](https://cloud.google.com/compute/docs/labeling-resources#requirements) - * for Google Cloud resources. - * - * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - /** - * Required. A list of references to the forwarding rules to which this - * service extension is attached to. At least one forwarding rule is required. - * There can be only one `LBTrafficExtension` resource per forwarding rule. - * - * Generated from protobuf field repeated string forwarding_rules = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - private $forwarding_rules; - /** - * Required. A set of ordered extension chains that contain the match - * conditions and extensions to execute. Match conditions for each extension - * chain are evaluated in sequence for a given request. The first extension - * chain that has a condition that matches the request is executed. - * Any subsequent extension chains do not execute. - * Limited to 5 extension chains per resource. - * - * Generated from protobuf field repeated .google.cloud.networkservices.v1.ExtensionChain extension_chains = 7 [(.google.api.field_behavior) = REQUIRED]; - */ - private $extension_chains; - /** - * Required. All backend services and forwarding rules referenced by this - * extension must share the same load balancing scheme. Supported values: - * `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. For more information, refer to - * [Choosing a load - * balancer](https://cloud.google.com/load-balancing/docs/backend-service). - * - * Generated from protobuf field .google.cloud.networkservices.v1.LoadBalancingScheme load_balancing_scheme = 8 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $load_balancing_scheme = 0; - /** - * Optional. The metadata provided here is included in the - * `ProcessingRequest.metadata_context.filter_metadata` map field. The - * metadata is available under the key - * `com.google.lb_traffic_extension.`. - * The following variables are supported in the metadata: - * `{forwarding_rule_id}` - substituted with the forwarding rule's fully - * qualified resource name. - * - * Generated from protobuf field .google.protobuf.Struct metadata = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $metadata = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Identifier. Name of the `LbTrafficExtension` resource in the - * following format: - * `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}`. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The timestamp when the resource was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The timestamp when the resource was updated. - * @type string $description - * Optional. A human-readable description of the resource. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. Set of labels associated with the `LbTrafficExtension` resource. - * The format must comply with [the requirements for - * labels](https://cloud.google.com/compute/docs/labeling-resources#requirements) - * for Google Cloud resources. - * @type array|\Google\Protobuf\Internal\RepeatedField $forwarding_rules - * Required. A list of references to the forwarding rules to which this - * service extension is attached to. At least one forwarding rule is required. - * There can be only one `LBTrafficExtension` resource per forwarding rule. - * @type array<\Google\Cloud\NetworkServices\V1\ExtensionChain>|\Google\Protobuf\Internal\RepeatedField $extension_chains - * Required. A set of ordered extension chains that contain the match - * conditions and extensions to execute. Match conditions for each extension - * chain are evaluated in sequence for a given request. The first extension - * chain that has a condition that matches the request is executed. - * Any subsequent extension chains do not execute. - * Limited to 5 extension chains per resource. - * @type int $load_balancing_scheme - * Required. All backend services and forwarding rules referenced by this - * extension must share the same load balancing scheme. Supported values: - * `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. For more information, refer to - * [Choosing a load - * balancer](https://cloud.google.com/load-balancing/docs/backend-service). - * @type \Google\Protobuf\Struct $metadata - * Optional. The metadata provided here is included in the - * `ProcessingRequest.metadata_context.filter_metadata` map field. The - * metadata is available under the key - * `com.google.lb_traffic_extension.`. - * The following variables are supported in the metadata: - * `{forwarding_rule_id}` - substituted with the forwarding rule's fully - * qualified resource name. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\Dep::initOnce(); - parent::__construct($data); - } - - /** - * Required. Identifier. Name of the `LbTrafficExtension` resource in the - * following format: - * `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Identifier. Name of the `LbTrafficExtension` resource in the - * following format: - * `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. The timestamp when the resource was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The timestamp when the resource was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The timestamp when the resource was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The timestamp when the resource was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Optional. A human-readable description of the resource. - * - * Generated from protobuf field string description = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. A human-readable description of the resource. - * - * Generated from protobuf field string description = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Optional. Set of labels associated with the `LbTrafficExtension` resource. - * The format must comply with [the requirements for - * labels](https://cloud.google.com/compute/docs/labeling-resources#requirements) - * for Google Cloud resources. - * - * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. Set of labels associated with the `LbTrafficExtension` resource. - * The format must comply with [the requirements for - * labels](https://cloud.google.com/compute/docs/labeling-resources#requirements) - * for Google Cloud resources. - * - * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Required. A list of references to the forwarding rules to which this - * service extension is attached to. At least one forwarding rule is required. - * There can be only one `LBTrafficExtension` resource per forwarding rule. - * - * Generated from protobuf field repeated string forwarding_rules = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getForwardingRules() - { - return $this->forwarding_rules; - } - - /** - * Required. A list of references to the forwarding rules to which this - * service extension is attached to. At least one forwarding rule is required. - * There can be only one `LBTrafficExtension` resource per forwarding rule. - * - * Generated from protobuf field repeated string forwarding_rules = 5 [(.google.api.field_behavior) = REQUIRED]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setForwardingRules($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->forwarding_rules = $arr; - - return $this; - } - - /** - * Required. A set of ordered extension chains that contain the match - * conditions and extensions to execute. Match conditions for each extension - * chain are evaluated in sequence for a given request. The first extension - * chain that has a condition that matches the request is executed. - * Any subsequent extension chains do not execute. - * Limited to 5 extension chains per resource. - * - * Generated from protobuf field repeated .google.cloud.networkservices.v1.ExtensionChain extension_chains = 7 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getExtensionChains() - { - return $this->extension_chains; - } - - /** - * Required. A set of ordered extension chains that contain the match - * conditions and extensions to execute. Match conditions for each extension - * chain are evaluated in sequence for a given request. The first extension - * chain that has a condition that matches the request is executed. - * Any subsequent extension chains do not execute. - * Limited to 5 extension chains per resource. - * - * Generated from protobuf field repeated .google.cloud.networkservices.v1.ExtensionChain extension_chains = 7 [(.google.api.field_behavior) = REQUIRED]; - * @param array<\Google\Cloud\NetworkServices\V1\ExtensionChain>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setExtensionChains($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkServices\V1\ExtensionChain::class); - $this->extension_chains = $arr; - - return $this; - } - - /** - * Required. All backend services and forwarding rules referenced by this - * extension must share the same load balancing scheme. Supported values: - * `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. For more information, refer to - * [Choosing a load - * balancer](https://cloud.google.com/load-balancing/docs/backend-service). - * - * Generated from protobuf field .google.cloud.networkservices.v1.LoadBalancingScheme load_balancing_scheme = 8 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getLoadBalancingScheme() - { - return $this->load_balancing_scheme; - } - - /** - * Required. All backend services and forwarding rules referenced by this - * extension must share the same load balancing scheme. Supported values: - * `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. For more information, refer to - * [Choosing a load - * balancer](https://cloud.google.com/load-balancing/docs/backend-service). - * - * Generated from protobuf field .google.cloud.networkservices.v1.LoadBalancingScheme load_balancing_scheme = 8 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setLoadBalancingScheme($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\NetworkServices\V1\LoadBalancingScheme::class); - $this->load_balancing_scheme = $var; - - return $this; - } - - /** - * Optional. The metadata provided here is included in the - * `ProcessingRequest.metadata_context.filter_metadata` map field. The - * metadata is available under the key - * `com.google.lb_traffic_extension.`. - * The following variables are supported in the metadata: - * `{forwarding_rule_id}` - substituted with the forwarding rule's fully - * qualified resource name. - * - * Generated from protobuf field .google.protobuf.Struct metadata = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Struct|null - */ - public function getMetadata() - { - return $this->metadata; - } - - public function hasMetadata() - { - return isset($this->metadata); - } - - public function clearMetadata() - { - unset($this->metadata); - } - - /** - * Optional. The metadata provided here is included in the - * `ProcessingRequest.metadata_context.filter_metadata` map field. The - * metadata is available under the key - * `com.google.lb_traffic_extension.`. - * The following variables are supported in the metadata: - * `{forwarding_rule_id}` - substituted with the forwarding rule's fully - * qualified resource name. - * - * Generated from protobuf field .google.protobuf.Struct metadata = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Struct $var - * @return $this - */ - public function setMetadata($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); - $this->metadata = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListEndpointPoliciesRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListEndpointPoliciesRequest.php deleted file mode 100644 index 9c5c3580e4e3..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListEndpointPoliciesRequest.php +++ /dev/null @@ -1,166 +0,0 @@ -google.cloud.networkservices.v1.ListEndpointPoliciesRequest - */ -class ListEndpointPoliciesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project and location from which the EndpointPolicies should - * be listed, specified in the format `projects/*/locations/global`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Maximum number of EndpointPolicies to return per call. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The value returned by the last `ListEndpointPoliciesResponse` - * Indicates that this is a continuation of a prior - * `ListEndpointPolicies` call, and that the system should return the - * next page of data. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The project and location from which the EndpointPolicies should - * be listed, specified in the format `projects/*/locations/global`. Please see - * {@see NetworkServicesClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\NetworkServices\V1\ListEndpointPoliciesRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The project and location from which the EndpointPolicies should - * be listed, specified in the format `projects/*/locations/global`. - * @type int $page_size - * Maximum number of EndpointPolicies to return per call. - * @type string $page_token - * The value returned by the last `ListEndpointPoliciesResponse` - * Indicates that this is a continuation of a prior - * `ListEndpointPolicies` call, and that the system should return the - * next page of data. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\EndpointPolicy::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project and location from which the EndpointPolicies should - * be listed, specified in the format `projects/*/locations/global`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The project and location from which the EndpointPolicies should - * be listed, specified in the format `projects/*/locations/global`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Maximum number of EndpointPolicies to return per call. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Maximum number of EndpointPolicies to return per call. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * The value returned by the last `ListEndpointPoliciesResponse` - * Indicates that this is a continuation of a prior - * `ListEndpointPolicies` call, and that the system should return the - * next page of data. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The value returned by the last `ListEndpointPoliciesResponse` - * Indicates that this is a continuation of a prior - * `ListEndpointPolicies` call, and that the system should return the - * next page of data. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListEndpointPoliciesResponse.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListEndpointPoliciesResponse.php deleted file mode 100644 index 05c64b8047f8..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListEndpointPoliciesResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.networkservices.v1.ListEndpointPoliciesResponse - */ -class ListEndpointPoliciesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * List of EndpointPolicy resources. - * - * Generated from protobuf field repeated .google.cloud.networkservices.v1.EndpointPolicy endpoint_policies = 1; - */ - private $endpoint_policies; - /** - * If there might be more results than those appearing in this response, then - * `next_page_token` is included. To get the next set of results, call this - * method again using the value of `next_page_token` as `page_token`. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\NetworkServices\V1\EndpointPolicy>|\Google\Protobuf\Internal\RepeatedField $endpoint_policies - * List of EndpointPolicy resources. - * @type string $next_page_token - * If there might be more results than those appearing in this response, then - * `next_page_token` is included. To get the next set of results, call this - * method again using the value of `next_page_token` as `page_token`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\EndpointPolicy::initOnce(); - parent::__construct($data); - } - - /** - * List of EndpointPolicy resources. - * - * Generated from protobuf field repeated .google.cloud.networkservices.v1.EndpointPolicy endpoint_policies = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEndpointPolicies() - { - return $this->endpoint_policies; - } - - /** - * List of EndpointPolicy resources. - * - * Generated from protobuf field repeated .google.cloud.networkservices.v1.EndpointPolicy endpoint_policies = 1; - * @param array<\Google\Cloud\NetworkServices\V1\EndpointPolicy>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEndpointPolicies($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkServices\V1\EndpointPolicy::class); - $this->endpoint_policies = $arr; - - return $this; - } - - /** - * If there might be more results than those appearing in this response, then - * `next_page_token` is included. To get the next set of results, call this - * method again using the value of `next_page_token` as `page_token`. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * If there might be more results than those appearing in this response, then - * `next_page_token` is included. To get the next set of results, call this - * method again using the value of `next_page_token` as `page_token`. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListGatewaysRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListGatewaysRequest.php deleted file mode 100644 index a38b600672fa..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListGatewaysRequest.php +++ /dev/null @@ -1,162 +0,0 @@ -google.cloud.networkservices.v1.ListGatewaysRequest - */ -class ListGatewaysRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project and location from which the Gateways should be - * listed, specified in the format `projects/*/locations/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Maximum number of Gateways to return per call. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The value returned by the last `ListGatewaysResponse` - * Indicates that this is a continuation of a prior `ListGateways` call, - * and that the system should return the next page of data. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The project and location from which the Gateways should be - * listed, specified in the format `projects/*/locations/*`. Please see - * {@see NetworkServicesClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\NetworkServices\V1\ListGatewaysRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The project and location from which the Gateways should be - * listed, specified in the format `projects/*/locations/*`. - * @type int $page_size - * Maximum number of Gateways to return per call. - * @type string $page_token - * The value returned by the last `ListGatewaysResponse` - * Indicates that this is a continuation of a prior `ListGateways` call, - * and that the system should return the next page of data. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\Gateway::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project and location from which the Gateways should be - * listed, specified in the format `projects/*/locations/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The project and location from which the Gateways should be - * listed, specified in the format `projects/*/locations/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Maximum number of Gateways to return per call. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Maximum number of Gateways to return per call. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * The value returned by the last `ListGatewaysResponse` - * Indicates that this is a continuation of a prior `ListGateways` call, - * and that the system should return the next page of data. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The value returned by the last `ListGatewaysResponse` - * Indicates that this is a continuation of a prior `ListGateways` call, - * and that the system should return the next page of data. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListGatewaysResponse.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListGatewaysResponse.php deleted file mode 100644 index 4e2ad9ad2a55..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListGatewaysResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.networkservices.v1.ListGatewaysResponse - */ -class ListGatewaysResponse extends \Google\Protobuf\Internal\Message -{ - /** - * List of Gateway resources. - * - * Generated from protobuf field repeated .google.cloud.networkservices.v1.Gateway gateways = 1; - */ - private $gateways; - /** - * If there might be more results than those appearing in this response, then - * `next_page_token` is included. To get the next set of results, call this - * method again using the value of `next_page_token` as `page_token`. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\NetworkServices\V1\Gateway>|\Google\Protobuf\Internal\RepeatedField $gateways - * List of Gateway resources. - * @type string $next_page_token - * If there might be more results than those appearing in this response, then - * `next_page_token` is included. To get the next set of results, call this - * method again using the value of `next_page_token` as `page_token`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\Gateway::initOnce(); - parent::__construct($data); - } - - /** - * List of Gateway resources. - * - * Generated from protobuf field repeated .google.cloud.networkservices.v1.Gateway gateways = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getGateways() - { - return $this->gateways; - } - - /** - * List of Gateway resources. - * - * Generated from protobuf field repeated .google.cloud.networkservices.v1.Gateway gateways = 1; - * @param array<\Google\Cloud\NetworkServices\V1\Gateway>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setGateways($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkServices\V1\Gateway::class); - $this->gateways = $arr; - - return $this; - } - - /** - * If there might be more results than those appearing in this response, then - * `next_page_token` is included. To get the next set of results, call this - * method again using the value of `next_page_token` as `page_token`. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * If there might be more results than those appearing in this response, then - * `next_page_token` is included. To get the next set of results, call this - * method again using the value of `next_page_token` as `page_token`. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListGrpcRoutesRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListGrpcRoutesRequest.php deleted file mode 100644 index ddf47f2dcb9f..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListGrpcRoutesRequest.php +++ /dev/null @@ -1,162 +0,0 @@ -google.cloud.networkservices.v1.ListGrpcRoutesRequest - */ -class ListGrpcRoutesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project and location from which the GrpcRoutes should be - * listed, specified in the format `projects/*/locations/global`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Maximum number of GrpcRoutes to return per call. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The value returned by the last `ListGrpcRoutesResponse` - * Indicates that this is a continuation of a prior `ListGrpcRoutes` call, - * and that the system should return the next page of data. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The project and location from which the GrpcRoutes should be - * listed, specified in the format `projects/*/locations/global`. Please see - * {@see NetworkServicesClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\NetworkServices\V1\ListGrpcRoutesRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The project and location from which the GrpcRoutes should be - * listed, specified in the format `projects/*/locations/global`. - * @type int $page_size - * Maximum number of GrpcRoutes to return per call. - * @type string $page_token - * The value returned by the last `ListGrpcRoutesResponse` - * Indicates that this is a continuation of a prior `ListGrpcRoutes` call, - * and that the system should return the next page of data. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\GrpcRoute::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project and location from which the GrpcRoutes should be - * listed, specified in the format `projects/*/locations/global`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The project and location from which the GrpcRoutes should be - * listed, specified in the format `projects/*/locations/global`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Maximum number of GrpcRoutes to return per call. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Maximum number of GrpcRoutes to return per call. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * The value returned by the last `ListGrpcRoutesResponse` - * Indicates that this is a continuation of a prior `ListGrpcRoutes` call, - * and that the system should return the next page of data. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The value returned by the last `ListGrpcRoutesResponse` - * Indicates that this is a continuation of a prior `ListGrpcRoutes` call, - * and that the system should return the next page of data. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListGrpcRoutesResponse.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListGrpcRoutesResponse.php deleted file mode 100644 index 25ae1ebe88f6..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListGrpcRoutesResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.networkservices.v1.ListGrpcRoutesResponse - */ -class ListGrpcRoutesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * List of GrpcRoute resources. - * - * Generated from protobuf field repeated .google.cloud.networkservices.v1.GrpcRoute grpc_routes = 1; - */ - private $grpc_routes; - /** - * If there might be more results than those appearing in this response, then - * `next_page_token` is included. To get the next set of results, call this - * method again using the value of `next_page_token` as `page_token`. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\NetworkServices\V1\GrpcRoute>|\Google\Protobuf\Internal\RepeatedField $grpc_routes - * List of GrpcRoute resources. - * @type string $next_page_token - * If there might be more results than those appearing in this response, then - * `next_page_token` is included. To get the next set of results, call this - * method again using the value of `next_page_token` as `page_token`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\GrpcRoute::initOnce(); - parent::__construct($data); - } - - /** - * List of GrpcRoute resources. - * - * Generated from protobuf field repeated .google.cloud.networkservices.v1.GrpcRoute grpc_routes = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getGrpcRoutes() - { - return $this->grpc_routes; - } - - /** - * List of GrpcRoute resources. - * - * Generated from protobuf field repeated .google.cloud.networkservices.v1.GrpcRoute grpc_routes = 1; - * @param array<\Google\Cloud\NetworkServices\V1\GrpcRoute>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setGrpcRoutes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkServices\V1\GrpcRoute::class); - $this->grpc_routes = $arr; - - return $this; - } - - /** - * If there might be more results than those appearing in this response, then - * `next_page_token` is included. To get the next set of results, call this - * method again using the value of `next_page_token` as `page_token`. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * If there might be more results than those appearing in this response, then - * `next_page_token` is included. To get the next set of results, call this - * method again using the value of `next_page_token` as `page_token`. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListHttpRoutesRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListHttpRoutesRequest.php deleted file mode 100644 index 6a3b4554a25c..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListHttpRoutesRequest.php +++ /dev/null @@ -1,162 +0,0 @@ -google.cloud.networkservices.v1.ListHttpRoutesRequest - */ -class ListHttpRoutesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project and location from which the HttpRoutes should be - * listed, specified in the format `projects/*/locations/global`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Maximum number of HttpRoutes to return per call. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The value returned by the last `ListHttpRoutesResponse` - * Indicates that this is a continuation of a prior `ListHttpRoutes` call, - * and that the system should return the next page of data. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The project and location from which the HttpRoutes should be - * listed, specified in the format `projects/*/locations/global`. Please see - * {@see NetworkServicesClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\NetworkServices\V1\ListHttpRoutesRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The project and location from which the HttpRoutes should be - * listed, specified in the format `projects/*/locations/global`. - * @type int $page_size - * Maximum number of HttpRoutes to return per call. - * @type string $page_token - * The value returned by the last `ListHttpRoutesResponse` - * Indicates that this is a continuation of a prior `ListHttpRoutes` call, - * and that the system should return the next page of data. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\HttpRoute::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project and location from which the HttpRoutes should be - * listed, specified in the format `projects/*/locations/global`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The project and location from which the HttpRoutes should be - * listed, specified in the format `projects/*/locations/global`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Maximum number of HttpRoutes to return per call. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Maximum number of HttpRoutes to return per call. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * The value returned by the last `ListHttpRoutesResponse` - * Indicates that this is a continuation of a prior `ListHttpRoutes` call, - * and that the system should return the next page of data. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The value returned by the last `ListHttpRoutesResponse` - * Indicates that this is a continuation of a prior `ListHttpRoutes` call, - * and that the system should return the next page of data. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListHttpRoutesResponse.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListHttpRoutesResponse.php deleted file mode 100644 index 121684e24a3e..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListHttpRoutesResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.networkservices.v1.ListHttpRoutesResponse - */ -class ListHttpRoutesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * List of HttpRoute resources. - * - * Generated from protobuf field repeated .google.cloud.networkservices.v1.HttpRoute http_routes = 1; - */ - private $http_routes; - /** - * If there might be more results than those appearing in this response, then - * `next_page_token` is included. To get the next set of results, call this - * method again using the value of `next_page_token` as `page_token`. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\NetworkServices\V1\HttpRoute>|\Google\Protobuf\Internal\RepeatedField $http_routes - * List of HttpRoute resources. - * @type string $next_page_token - * If there might be more results than those appearing in this response, then - * `next_page_token` is included. To get the next set of results, call this - * method again using the value of `next_page_token` as `page_token`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\HttpRoute::initOnce(); - parent::__construct($data); - } - - /** - * List of HttpRoute resources. - * - * Generated from protobuf field repeated .google.cloud.networkservices.v1.HttpRoute http_routes = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getHttpRoutes() - { - return $this->http_routes; - } - - /** - * List of HttpRoute resources. - * - * Generated from protobuf field repeated .google.cloud.networkservices.v1.HttpRoute http_routes = 1; - * @param array<\Google\Cloud\NetworkServices\V1\HttpRoute>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setHttpRoutes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkServices\V1\HttpRoute::class); - $this->http_routes = $arr; - - return $this; - } - - /** - * If there might be more results than those appearing in this response, then - * `next_page_token` is included. To get the next set of results, call this - * method again using the value of `next_page_token` as `page_token`. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * If there might be more results than those appearing in this response, then - * `next_page_token` is included. To get the next set of results, call this - * method again using the value of `next_page_token` as `page_token`. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListLbRouteExtensionsRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListLbRouteExtensionsRequest.php deleted file mode 100644 index 050aaac97ca2..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListLbRouteExtensionsRequest.php +++ /dev/null @@ -1,231 +0,0 @@ -google.cloud.networkservices.v1.ListLbRouteExtensionsRequest - */ -class ListLbRouteExtensionsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project and location from which the `LbRouteExtension` - * resources are listed, specified in the following format: - * `projects/{project}/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Requested page size. The server might return fewer items than - * requested. If unspecified, the server picks an appropriate default. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. A token identifying a page of results that the server returns. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. Filtering results. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. Hint for how to order the results. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The project and location from which the `LbRouteExtension` - * resources are listed, specified in the following format: - * `projects/{project}/locations/{location}`. Please see - * {@see DepServiceClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\NetworkServices\V1\ListLbRouteExtensionsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The project and location from which the `LbRouteExtension` - * resources are listed, specified in the following format: - * `projects/{project}/locations/{location}`. - * @type int $page_size - * Optional. Requested page size. The server might return fewer items than - * requested. If unspecified, the server picks an appropriate default. - * @type string $page_token - * Optional. A token identifying a page of results that the server returns. - * @type string $filter - * Optional. Filtering results. - * @type string $order_by - * Optional. Hint for how to order the results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\Dep::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project and location from which the `LbRouteExtension` - * resources are listed, specified in the following format: - * `projects/{project}/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The project and location from which the `LbRouteExtension` - * resources are listed, specified in the following format: - * `projects/{project}/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. Requested page size. The server might return fewer items than - * requested. If unspecified, the server picks an appropriate default. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. Requested page size. The server might return fewer items than - * requested. If unspecified, the server picks an appropriate default. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. A token identifying a page of results that the server returns. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. A token identifying a page of results that the server returns. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Optional. Filtering results. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. Filtering results. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Optional. Hint for how to order the results. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Optional. Hint for how to order the results. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListLbRouteExtensionsResponse.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListLbRouteExtensionsResponse.php deleted file mode 100644 index eefc0f3e2d60..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListLbRouteExtensionsResponse.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.networkservices.v1.ListLbRouteExtensionsResponse - */ -class ListLbRouteExtensionsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of `LbRouteExtension` resources. - * - * Generated from protobuf field repeated .google.cloud.networkservices.v1.LbRouteExtension lb_route_extensions = 1; - */ - private $lb_route_extensions; - /** - * A token identifying a page of results that the server returns. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\NetworkServices\V1\LbRouteExtension>|\Google\Protobuf\Internal\RepeatedField $lb_route_extensions - * The list of `LbRouteExtension` resources. - * @type string $next_page_token - * A token identifying a page of results that the server returns. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\Dep::initOnce(); - parent::__construct($data); - } - - /** - * The list of `LbRouteExtension` resources. - * - * Generated from protobuf field repeated .google.cloud.networkservices.v1.LbRouteExtension lb_route_extensions = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getLbRouteExtensions() - { - return $this->lb_route_extensions; - } - - /** - * The list of `LbRouteExtension` resources. - * - * Generated from protobuf field repeated .google.cloud.networkservices.v1.LbRouteExtension lb_route_extensions = 1; - * @param array<\Google\Cloud\NetworkServices\V1\LbRouteExtension>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setLbRouteExtensions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkServices\V1\LbRouteExtension::class); - $this->lb_route_extensions = $arr; - - return $this; - } - - /** - * A token identifying a page of results that the server returns. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token identifying a page of results that the server returns. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListLbTrafficExtensionsRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListLbTrafficExtensionsRequest.php deleted file mode 100644 index c8e8eaf2dfea..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListLbTrafficExtensionsRequest.php +++ /dev/null @@ -1,231 +0,0 @@ -google.cloud.networkservices.v1.ListLbTrafficExtensionsRequest - */ -class ListLbTrafficExtensionsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project and location from which the `LbTrafficExtension` - * resources are listed, specified in the following format: - * `projects/{project}/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Requested page size. The server might return fewer items than - * requested. If unspecified, the server picks an appropriate default. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. A token identifying a page of results that the server returns. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. Filtering results. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. Hint for how to order the results. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The project and location from which the `LbTrafficExtension` - * resources are listed, specified in the following format: - * `projects/{project}/locations/{location}`. Please see - * {@see DepServiceClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\NetworkServices\V1\ListLbTrafficExtensionsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The project and location from which the `LbTrafficExtension` - * resources are listed, specified in the following format: - * `projects/{project}/locations/{location}`. - * @type int $page_size - * Optional. Requested page size. The server might return fewer items than - * requested. If unspecified, the server picks an appropriate default. - * @type string $page_token - * Optional. A token identifying a page of results that the server returns. - * @type string $filter - * Optional. Filtering results. - * @type string $order_by - * Optional. Hint for how to order the results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\Dep::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project and location from which the `LbTrafficExtension` - * resources are listed, specified in the following format: - * `projects/{project}/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The project and location from which the `LbTrafficExtension` - * resources are listed, specified in the following format: - * `projects/{project}/locations/{location}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. Requested page size. The server might return fewer items than - * requested. If unspecified, the server picks an appropriate default. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. Requested page size. The server might return fewer items than - * requested. If unspecified, the server picks an appropriate default. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. A token identifying a page of results that the server returns. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. A token identifying a page of results that the server returns. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Optional. Filtering results. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. Filtering results. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Optional. Hint for how to order the results. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Optional. Hint for how to order the results. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListLbTrafficExtensionsResponse.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListLbTrafficExtensionsResponse.php deleted file mode 100644 index f87a63f11b09..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListLbTrafficExtensionsResponse.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.networkservices.v1.ListLbTrafficExtensionsResponse - */ -class ListLbTrafficExtensionsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of `LbTrafficExtension` resources. - * - * Generated from protobuf field repeated .google.cloud.networkservices.v1.LbTrafficExtension lb_traffic_extensions = 1; - */ - private $lb_traffic_extensions; - /** - * A token identifying a page of results that the server returns. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\NetworkServices\V1\LbTrafficExtension>|\Google\Protobuf\Internal\RepeatedField $lb_traffic_extensions - * The list of `LbTrafficExtension` resources. - * @type string $next_page_token - * A token identifying a page of results that the server returns. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\Dep::initOnce(); - parent::__construct($data); - } - - /** - * The list of `LbTrafficExtension` resources. - * - * Generated from protobuf field repeated .google.cloud.networkservices.v1.LbTrafficExtension lb_traffic_extensions = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getLbTrafficExtensions() - { - return $this->lb_traffic_extensions; - } - - /** - * The list of `LbTrafficExtension` resources. - * - * Generated from protobuf field repeated .google.cloud.networkservices.v1.LbTrafficExtension lb_traffic_extensions = 1; - * @param array<\Google\Cloud\NetworkServices\V1\LbTrafficExtension>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setLbTrafficExtensions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkServices\V1\LbTrafficExtension::class); - $this->lb_traffic_extensions = $arr; - - return $this; - } - - /** - * A token identifying a page of results that the server returns. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token identifying a page of results that the server returns. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListMeshesRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListMeshesRequest.php deleted file mode 100644 index 88d0ba55df31..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListMeshesRequest.php +++ /dev/null @@ -1,162 +0,0 @@ -google.cloud.networkservices.v1.ListMeshesRequest - */ -class ListMeshesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project and location from which the Meshes should be - * listed, specified in the format `projects/*/locations/global`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Maximum number of Meshes to return per call. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The value returned by the last `ListMeshesResponse` - * Indicates that this is a continuation of a prior `ListMeshes` call, - * and that the system should return the next page of data. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The project and location from which the Meshes should be - * listed, specified in the format `projects/*/locations/global`. Please see - * {@see NetworkServicesClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\NetworkServices\V1\ListMeshesRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The project and location from which the Meshes should be - * listed, specified in the format `projects/*/locations/global`. - * @type int $page_size - * Maximum number of Meshes to return per call. - * @type string $page_token - * The value returned by the last `ListMeshesResponse` - * Indicates that this is a continuation of a prior `ListMeshes` call, - * and that the system should return the next page of data. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\Mesh::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project and location from which the Meshes should be - * listed, specified in the format `projects/*/locations/global`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The project and location from which the Meshes should be - * listed, specified in the format `projects/*/locations/global`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Maximum number of Meshes to return per call. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Maximum number of Meshes to return per call. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * The value returned by the last `ListMeshesResponse` - * Indicates that this is a continuation of a prior `ListMeshes` call, - * and that the system should return the next page of data. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The value returned by the last `ListMeshesResponse` - * Indicates that this is a continuation of a prior `ListMeshes` call, - * and that the system should return the next page of data. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListMeshesResponse.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListMeshesResponse.php deleted file mode 100644 index 4fc4bf9fd178..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListMeshesResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.networkservices.v1.ListMeshesResponse - */ -class ListMeshesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * List of Mesh resources. - * - * Generated from protobuf field repeated .google.cloud.networkservices.v1.Mesh meshes = 1; - */ - private $meshes; - /** - * If there might be more results than those appearing in this response, then - * `next_page_token` is included. To get the next set of results, call this - * method again using the value of `next_page_token` as `page_token`. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\NetworkServices\V1\Mesh>|\Google\Protobuf\Internal\RepeatedField $meshes - * List of Mesh resources. - * @type string $next_page_token - * If there might be more results than those appearing in this response, then - * `next_page_token` is included. To get the next set of results, call this - * method again using the value of `next_page_token` as `page_token`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\Mesh::initOnce(); - parent::__construct($data); - } - - /** - * List of Mesh resources. - * - * Generated from protobuf field repeated .google.cloud.networkservices.v1.Mesh meshes = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMeshes() - { - return $this->meshes; - } - - /** - * List of Mesh resources. - * - * Generated from protobuf field repeated .google.cloud.networkservices.v1.Mesh meshes = 1; - * @param array<\Google\Cloud\NetworkServices\V1\Mesh>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMeshes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkServices\V1\Mesh::class); - $this->meshes = $arr; - - return $this; - } - - /** - * If there might be more results than those appearing in this response, then - * `next_page_token` is included. To get the next set of results, call this - * method again using the value of `next_page_token` as `page_token`. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * If there might be more results than those appearing in this response, then - * `next_page_token` is included. To get the next set of results, call this - * method again using the value of `next_page_token` as `page_token`. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListServiceBindingsRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListServiceBindingsRequest.php deleted file mode 100644 index c165f3df88a8..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListServiceBindingsRequest.php +++ /dev/null @@ -1,162 +0,0 @@ -google.cloud.networkservices.v1.ListServiceBindingsRequest - */ -class ListServiceBindingsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project and location from which the ServiceBindings should be - * listed, specified in the format `projects/*/locations/global`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Maximum number of ServiceBindings to return per call. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The value returned by the last `ListServiceBindingsResponse` - * Indicates that this is a continuation of a prior `ListRouters` call, - * and that the system should return the next page of data. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The project and location from which the ServiceBindings should be - * listed, specified in the format `projects/*/locations/global`. Please see - * {@see NetworkServicesClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\NetworkServices\V1\ListServiceBindingsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The project and location from which the ServiceBindings should be - * listed, specified in the format `projects/*/locations/global`. - * @type int $page_size - * Maximum number of ServiceBindings to return per call. - * @type string $page_token - * The value returned by the last `ListServiceBindingsResponse` - * Indicates that this is a continuation of a prior `ListRouters` call, - * and that the system should return the next page of data. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\ServiceBinding::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project and location from which the ServiceBindings should be - * listed, specified in the format `projects/*/locations/global`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The project and location from which the ServiceBindings should be - * listed, specified in the format `projects/*/locations/global`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Maximum number of ServiceBindings to return per call. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Maximum number of ServiceBindings to return per call. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * The value returned by the last `ListServiceBindingsResponse` - * Indicates that this is a continuation of a prior `ListRouters` call, - * and that the system should return the next page of data. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The value returned by the last `ListServiceBindingsResponse` - * Indicates that this is a continuation of a prior `ListRouters` call, - * and that the system should return the next page of data. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListServiceBindingsResponse.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListServiceBindingsResponse.php deleted file mode 100644 index e1ebc8bef520..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListServiceBindingsResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.networkservices.v1.ListServiceBindingsResponse - */ -class ListServiceBindingsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * List of ServiceBinding resources. - * - * Generated from protobuf field repeated .google.cloud.networkservices.v1.ServiceBinding service_bindings = 1; - */ - private $service_bindings; - /** - * If there might be more results than those appearing in this response, then - * `next_page_token` is included. To get the next set of results, call this - * method again using the value of `next_page_token` as `page_token`. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\NetworkServices\V1\ServiceBinding>|\Google\Protobuf\Internal\RepeatedField $service_bindings - * List of ServiceBinding resources. - * @type string $next_page_token - * If there might be more results than those appearing in this response, then - * `next_page_token` is included. To get the next set of results, call this - * method again using the value of `next_page_token` as `page_token`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\ServiceBinding::initOnce(); - parent::__construct($data); - } - - /** - * List of ServiceBinding resources. - * - * Generated from protobuf field repeated .google.cloud.networkservices.v1.ServiceBinding service_bindings = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getServiceBindings() - { - return $this->service_bindings; - } - - /** - * List of ServiceBinding resources. - * - * Generated from protobuf field repeated .google.cloud.networkservices.v1.ServiceBinding service_bindings = 1; - * @param array<\Google\Cloud\NetworkServices\V1\ServiceBinding>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setServiceBindings($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkServices\V1\ServiceBinding::class); - $this->service_bindings = $arr; - - return $this; - } - - /** - * If there might be more results than those appearing in this response, then - * `next_page_token` is included. To get the next set of results, call this - * method again using the value of `next_page_token` as `page_token`. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * If there might be more results than those appearing in this response, then - * `next_page_token` is included. To get the next set of results, call this - * method again using the value of `next_page_token` as `page_token`. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListTcpRoutesRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListTcpRoutesRequest.php deleted file mode 100644 index 54a6448de8af..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListTcpRoutesRequest.php +++ /dev/null @@ -1,162 +0,0 @@ -google.cloud.networkservices.v1.ListTcpRoutesRequest - */ -class ListTcpRoutesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project and location from which the TcpRoutes should be - * listed, specified in the format `projects/*/locations/global`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Maximum number of TcpRoutes to return per call. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The value returned by the last `ListTcpRoutesResponse` - * Indicates that this is a continuation of a prior `ListTcpRoutes` call, - * and that the system should return the next page of data. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The project and location from which the TcpRoutes should be - * listed, specified in the format `projects/*/locations/global`. Please see - * {@see NetworkServicesClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\NetworkServices\V1\ListTcpRoutesRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The project and location from which the TcpRoutes should be - * listed, specified in the format `projects/*/locations/global`. - * @type int $page_size - * Maximum number of TcpRoutes to return per call. - * @type string $page_token - * The value returned by the last `ListTcpRoutesResponse` - * Indicates that this is a continuation of a prior `ListTcpRoutes` call, - * and that the system should return the next page of data. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\TcpRoute::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project and location from which the TcpRoutes should be - * listed, specified in the format `projects/*/locations/global`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The project and location from which the TcpRoutes should be - * listed, specified in the format `projects/*/locations/global`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Maximum number of TcpRoutes to return per call. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Maximum number of TcpRoutes to return per call. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * The value returned by the last `ListTcpRoutesResponse` - * Indicates that this is a continuation of a prior `ListTcpRoutes` call, - * and that the system should return the next page of data. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The value returned by the last `ListTcpRoutesResponse` - * Indicates that this is a continuation of a prior `ListTcpRoutes` call, - * and that the system should return the next page of data. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListTcpRoutesResponse.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListTcpRoutesResponse.php deleted file mode 100644 index ed511f17c5f4..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListTcpRoutesResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.networkservices.v1.ListTcpRoutesResponse - */ -class ListTcpRoutesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * List of TcpRoute resources. - * - * Generated from protobuf field repeated .google.cloud.networkservices.v1.TcpRoute tcp_routes = 1; - */ - private $tcp_routes; - /** - * If there might be more results than those appearing in this response, then - * `next_page_token` is included. To get the next set of results, call this - * method again using the value of `next_page_token` as `page_token`. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\NetworkServices\V1\TcpRoute>|\Google\Protobuf\Internal\RepeatedField $tcp_routes - * List of TcpRoute resources. - * @type string $next_page_token - * If there might be more results than those appearing in this response, then - * `next_page_token` is included. To get the next set of results, call this - * method again using the value of `next_page_token` as `page_token`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\TcpRoute::initOnce(); - parent::__construct($data); - } - - /** - * List of TcpRoute resources. - * - * Generated from protobuf field repeated .google.cloud.networkservices.v1.TcpRoute tcp_routes = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTcpRoutes() - { - return $this->tcp_routes; - } - - /** - * List of TcpRoute resources. - * - * Generated from protobuf field repeated .google.cloud.networkservices.v1.TcpRoute tcp_routes = 1; - * @param array<\Google\Cloud\NetworkServices\V1\TcpRoute>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTcpRoutes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkServices\V1\TcpRoute::class); - $this->tcp_routes = $arr; - - return $this; - } - - /** - * If there might be more results than those appearing in this response, then - * `next_page_token` is included. To get the next set of results, call this - * method again using the value of `next_page_token` as `page_token`. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * If there might be more results than those appearing in this response, then - * `next_page_token` is included. To get the next set of results, call this - * method again using the value of `next_page_token` as `page_token`. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListTlsRoutesRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListTlsRoutesRequest.php deleted file mode 100644 index f8209d936e49..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListTlsRoutesRequest.php +++ /dev/null @@ -1,162 +0,0 @@ -google.cloud.networkservices.v1.ListTlsRoutesRequest - */ -class ListTlsRoutesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project and location from which the TlsRoutes should be - * listed, specified in the format `projects/*/locations/global`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Maximum number of TlsRoutes to return per call. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The value returned by the last `ListTlsRoutesResponse` - * Indicates that this is a continuation of a prior `ListTlsRoutes` call, - * and that the system should return the next page of data. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The project and location from which the TlsRoutes should be - * listed, specified in the format `projects/*/locations/global`. Please see - * {@see NetworkServicesClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\NetworkServices\V1\ListTlsRoutesRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The project and location from which the TlsRoutes should be - * listed, specified in the format `projects/*/locations/global`. - * @type int $page_size - * Maximum number of TlsRoutes to return per call. - * @type string $page_token - * The value returned by the last `ListTlsRoutesResponse` - * Indicates that this is a continuation of a prior `ListTlsRoutes` call, - * and that the system should return the next page of data. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\TlsRoute::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project and location from which the TlsRoutes should be - * listed, specified in the format `projects/*/locations/global`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The project and location from which the TlsRoutes should be - * listed, specified in the format `projects/*/locations/global`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Maximum number of TlsRoutes to return per call. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Maximum number of TlsRoutes to return per call. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * The value returned by the last `ListTlsRoutesResponse` - * Indicates that this is a continuation of a prior `ListTlsRoutes` call, - * and that the system should return the next page of data. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The value returned by the last `ListTlsRoutesResponse` - * Indicates that this is a continuation of a prior `ListTlsRoutes` call, - * and that the system should return the next page of data. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListTlsRoutesResponse.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListTlsRoutesResponse.php deleted file mode 100644 index baf951142c4e..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ListTlsRoutesResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.networkservices.v1.ListTlsRoutesResponse - */ -class ListTlsRoutesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * List of TlsRoute resources. - * - * Generated from protobuf field repeated .google.cloud.networkservices.v1.TlsRoute tls_routes = 1; - */ - private $tls_routes; - /** - * If there might be more results than those appearing in this response, then - * `next_page_token` is included. To get the next set of results, call this - * method again using the value of `next_page_token` as `page_token`. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\NetworkServices\V1\TlsRoute>|\Google\Protobuf\Internal\RepeatedField $tls_routes - * List of TlsRoute resources. - * @type string $next_page_token - * If there might be more results than those appearing in this response, then - * `next_page_token` is included. To get the next set of results, call this - * method again using the value of `next_page_token` as `page_token`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\TlsRoute::initOnce(); - parent::__construct($data); - } - - /** - * List of TlsRoute resources. - * - * Generated from protobuf field repeated .google.cloud.networkservices.v1.TlsRoute tls_routes = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTlsRoutes() - { - return $this->tls_routes; - } - - /** - * List of TlsRoute resources. - * - * Generated from protobuf field repeated .google.cloud.networkservices.v1.TlsRoute tls_routes = 1; - * @param array<\Google\Cloud\NetworkServices\V1\TlsRoute>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTlsRoutes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkServices\V1\TlsRoute::class); - $this->tls_routes = $arr; - - return $this; - } - - /** - * If there might be more results than those appearing in this response, then - * `next_page_token` is included. To get the next set of results, call this - * method again using the value of `next_page_token` as `page_token`. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * If there might be more results than those appearing in this response, then - * `next_page_token` is included. To get the next set of results, call this - * method again using the value of `next_page_token` as `page_token`. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/LoadBalancingScheme.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/LoadBalancingScheme.php deleted file mode 100644 index 263ab38300d8..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/LoadBalancingScheme.php +++ /dev/null @@ -1,65 +0,0 @@ -google.cloud.networkservices.v1.LoadBalancingScheme - */ -class LoadBalancingScheme -{ - /** - * Default value. Do not use. - * - * Generated from protobuf enum LOAD_BALANCING_SCHEME_UNSPECIFIED = 0; - */ - const LOAD_BALANCING_SCHEME_UNSPECIFIED = 0; - /** - * Signifies that this is used for Internal HTTP(S) Load Balancing. - * - * Generated from protobuf enum INTERNAL_MANAGED = 1; - */ - const INTERNAL_MANAGED = 1; - /** - * Signifies that this is used for External Managed HTTP(S) Load - * Balancing. - * - * Generated from protobuf enum EXTERNAL_MANAGED = 2; - */ - const EXTERNAL_MANAGED = 2; - - private static $valueToName = [ - self::LOAD_BALANCING_SCHEME_UNSPECIFIED => 'LOAD_BALANCING_SCHEME_UNSPECIFIED', - self::INTERNAL_MANAGED => 'INTERNAL_MANAGED', - self::EXTERNAL_MANAGED => 'EXTERNAL_MANAGED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/Mesh.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/Mesh.php deleted file mode 100644 index 14d967fcf671..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/Mesh.php +++ /dev/null @@ -1,321 +0,0 @@ -google.cloud.networkservices.v1.Mesh - */ -class Mesh extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the Mesh resource. It matches pattern - * `projects/*/locations/global/meshes/`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Output only. Server-defined URL of this resource - * - * Generated from protobuf field string self_link = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $self_link = ''; - /** - * Output only. The timestamp when the resource was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The timestamp when the resource was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Optional. Set of label tags associated with the Mesh resource. - * - * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - /** - * Optional. A free-text description of the resource. Max length 1024 - * characters. - * - * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Optional. If set to a valid TCP port (1-65535), instructs the SIDECAR proxy - * to listen on the specified port of localhost (127.0.0.1) address. The - * SIDECAR proxy will expect all traffic to be redirected to this port - * regardless of its actual ip:port destination. If unset, a port '15001' is - * used as the interception port. This is applicable only for sidecar proxy - * deployments. - * - * Generated from protobuf field int32 interception_port = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $interception_port = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the Mesh resource. It matches pattern - * `projects/*/locations/global/meshes/`. - * @type string $self_link - * Output only. Server-defined URL of this resource - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The timestamp when the resource was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The timestamp when the resource was updated. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. Set of label tags associated with the Mesh resource. - * @type string $description - * Optional. A free-text description of the resource. Max length 1024 - * characters. - * @type int $interception_port - * Optional. If set to a valid TCP port (1-65535), instructs the SIDECAR proxy - * to listen on the specified port of localhost (127.0.0.1) address. The - * SIDECAR proxy will expect all traffic to be redirected to this port - * regardless of its actual ip:port destination. If unset, a port '15001' is - * used as the interception port. This is applicable only for sidecar proxy - * deployments. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\Mesh::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the Mesh resource. It matches pattern - * `projects/*/locations/global/meshes/`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the Mesh resource. It matches pattern - * `projects/*/locations/global/meshes/`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. Server-defined URL of this resource - * - * Generated from protobuf field string self_link = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getSelfLink() - { - return $this->self_link; - } - - /** - * Output only. Server-defined URL of this resource - * - * Generated from protobuf field string self_link = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setSelfLink($var) - { - GPBUtil::checkString($var, True); - $this->self_link = $var; - - return $this; - } - - /** - * Output only. The timestamp when the resource was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The timestamp when the resource was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The timestamp when the resource was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The timestamp when the resource was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Optional. Set of label tags associated with the Mesh resource. - * - * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. Set of label tags associated with the Mesh resource. - * - * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Optional. A free-text description of the resource. Max length 1024 - * characters. - * - * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. A free-text description of the resource. Max length 1024 - * characters. - * - * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Optional. If set to a valid TCP port (1-65535), instructs the SIDECAR proxy - * to listen on the specified port of localhost (127.0.0.1) address. The - * SIDECAR proxy will expect all traffic to be redirected to this port - * regardless of its actual ip:port destination. If unset, a port '15001' is - * used as the interception port. This is applicable only for sidecar proxy - * deployments. - * - * Generated from protobuf field int32 interception_port = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getInterceptionPort() - { - return $this->interception_port; - } - - /** - * Optional. If set to a valid TCP port (1-65535), instructs the SIDECAR proxy - * to listen on the specified port of localhost (127.0.0.1) address. The - * SIDECAR proxy will expect all traffic to be redirected to this port - * regardless of its actual ip:port destination. If unset, a port '15001' is - * used as the interception port. This is applicable only for sidecar proxy - * deployments. - * - * Generated from protobuf field int32 interception_port = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setInterceptionPort($var) - { - GPBUtil::checkInt32($var); - $this->interception_port = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/OperationMetadata.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/OperationMetadata.php deleted file mode 100644 index 36e7066401a5..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/OperationMetadata.php +++ /dev/null @@ -1,307 +0,0 @@ -google.cloud.networkservices.v1.OperationMetadata - */ -class OperationMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $end_time = null; - /** - * Output only. Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $target = ''; - /** - * Output only. Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $verb = ''; - /** - * Output only. Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $status_message = ''; - /** - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have successfully been cancelled - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. - * - * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $requested_cancellation = false; - /** - * Output only. API version used to start the operation. - * - * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $api_version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time the operation was created. - * @type \Google\Protobuf\Timestamp $end_time - * Output only. The time the operation finished running. - * @type string $target - * Output only. Server-defined resource path for the target of the operation. - * @type string $verb - * Output only. Name of the verb executed by the operation. - * @type string $status_message - * Output only. Human-readable status of the operation, if any. - * @type bool $requested_cancellation - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have successfully been cancelled - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. - * @type string $api_version - * Output only. API version used to start the operation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\Common::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * Output only. The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * Output only. Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getTarget() - { - return $this->target; - } - - /** - * Output only. Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setTarget($var) - { - GPBUtil::checkString($var, True); - $this->target = $var; - - return $this; - } - - /** - * Output only. Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getVerb() - { - return $this->verb; - } - - /** - * Output only. Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setVerb($var) - { - GPBUtil::checkString($var, True); - $this->verb = $var; - - return $this; - } - - /** - * Output only. Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getStatusMessage() - { - return $this->status_message; - } - - /** - * Output only. Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setStatusMessage($var) - { - GPBUtil::checkString($var, True); - $this->status_message = $var; - - return $this; - } - - /** - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have successfully been cancelled - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. - * - * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getRequestedCancellation() - { - return $this->requested_cancellation; - } - - /** - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have successfully been cancelled - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. - * - * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setRequestedCancellation($var) - { - GPBUtil::checkBool($var); - $this->requested_cancellation = $var; - - return $this; - } - - /** - * Output only. API version used to start the operation. - * - * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getApiVersion() - { - return $this->api_version; - } - - /** - * Output only. API version used to start the operation. - * - * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setApiVersion($var) - { - GPBUtil::checkString($var, True); - $this->api_version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ServiceBinding.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ServiceBinding.php deleted file mode 100644 index 93e657a35992..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/ServiceBinding.php +++ /dev/null @@ -1,270 +0,0 @@ -google.cloud.networkservices.v1.ServiceBinding - */ -class ServiceBinding extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the ServiceBinding resource. It matches pattern - * `projects/*/locations/global/serviceBindings/service_binding_name`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Optional. A free-text description of the resource. Max length 1024 - * characters. - * - * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Output only. The timestamp when the resource was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The timestamp when the resource was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Required. The full service directory service name of the format - * /projects/*/locations/*/namespaces/*/services/* - * - * Generated from protobuf field string service = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $service = ''; - /** - * Optional. Set of label tags associated with the ServiceBinding resource. - * - * Generated from protobuf field map labels = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the ServiceBinding resource. It matches pattern - * `projects/*/locations/global/serviceBindings/service_binding_name`. - * @type string $description - * Optional. A free-text description of the resource. Max length 1024 - * characters. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The timestamp when the resource was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The timestamp when the resource was updated. - * @type string $service - * Required. The full service directory service name of the format - * /projects/*/locations/*/namespaces/*/services/* - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. Set of label tags associated with the ServiceBinding resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\ServiceBinding::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the ServiceBinding resource. It matches pattern - * `projects/*/locations/global/serviceBindings/service_binding_name`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the ServiceBinding resource. It matches pattern - * `projects/*/locations/global/serviceBindings/service_binding_name`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. A free-text description of the resource. Max length 1024 - * characters. - * - * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. A free-text description of the resource. Max length 1024 - * characters. - * - * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Output only. The timestamp when the resource was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The timestamp when the resource was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The timestamp when the resource was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The timestamp when the resource was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Required. The full service directory service name of the format - * /projects/*/locations/*/namespaces/*/services/* - * - * Generated from protobuf field string service = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getService() - { - return $this->service; - } - - /** - * Required. The full service directory service name of the format - * /projects/*/locations/*/namespaces/*/services/* - * - * Generated from protobuf field string service = 5 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setService($var) - { - GPBUtil::checkString($var, True); - $this->service = $var; - - return $this; - } - - /** - * Optional. Set of label tags associated with the ServiceBinding resource. - * - * Generated from protobuf field map labels = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. Set of label tags associated with the ServiceBinding resource. - * - * Generated from protobuf field map labels = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/TcpRoute.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/TcpRoute.php deleted file mode 100644 index 00624114cb2f..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/TcpRoute.php +++ /dev/null @@ -1,404 +0,0 @@ -google.cloud.networkservices.v1.TcpRoute - */ -class TcpRoute extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the TcpRoute resource. It matches pattern - * `projects/*/locations/global/tcpRoutes/tcp_route_name>`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Output only. Server-defined URL of this resource - * - * Generated from protobuf field string self_link = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $self_link = ''; - /** - * Output only. The timestamp when the resource was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The timestamp when the resource was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Optional. A free-text description of the resource. Max length 1024 - * characters. - * - * Generated from protobuf field string description = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Required. Rules that define how traffic is routed and handled. At least one - * RouteRule must be supplied. If there are multiple rules then the action - * taken will be the first rule to match. - * - * Generated from protobuf field repeated .google.cloud.networkservices.v1.TcpRoute.RouteRule rules = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - private $rules; - /** - * Optional. Meshes defines a list of meshes this TcpRoute is attached to, as - * one of the routing rules to route the requests served by the mesh. - * Each mesh reference should match the pattern: - * `projects/*/locations/global/meshes/` - * The attached Mesh should be of a type SIDECAR - * - * Generated from protobuf field repeated string meshes = 8 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - private $meshes; - /** - * Optional. Gateways defines a list of gateways this TcpRoute is attached to, - * as one of the routing rules to route the requests served by the gateway. - * Each gateway reference should match the pattern: - * `projects/*/locations/global/gateways/` - * - * Generated from protobuf field repeated string gateways = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - private $gateways; - /** - * Optional. Set of label tags associated with the TcpRoute resource. - * - * Generated from protobuf field map labels = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the TcpRoute resource. It matches pattern - * `projects/*/locations/global/tcpRoutes/tcp_route_name>`. - * @type string $self_link - * Output only. Server-defined URL of this resource - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The timestamp when the resource was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The timestamp when the resource was updated. - * @type string $description - * Optional. A free-text description of the resource. Max length 1024 - * characters. - * @type array<\Google\Cloud\NetworkServices\V1\TcpRoute\RouteRule>|\Google\Protobuf\Internal\RepeatedField $rules - * Required. Rules that define how traffic is routed and handled. At least one - * RouteRule must be supplied. If there are multiple rules then the action - * taken will be the first rule to match. - * @type array|\Google\Protobuf\Internal\RepeatedField $meshes - * Optional. Meshes defines a list of meshes this TcpRoute is attached to, as - * one of the routing rules to route the requests served by the mesh. - * Each mesh reference should match the pattern: - * `projects/*/locations/global/meshes/` - * The attached Mesh should be of a type SIDECAR - * @type array|\Google\Protobuf\Internal\RepeatedField $gateways - * Optional. Gateways defines a list of gateways this TcpRoute is attached to, - * as one of the routing rules to route the requests served by the gateway. - * Each gateway reference should match the pattern: - * `projects/*/locations/global/gateways/` - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. Set of label tags associated with the TcpRoute resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\TcpRoute::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the TcpRoute resource. It matches pattern - * `projects/*/locations/global/tcpRoutes/tcp_route_name>`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the TcpRoute resource. It matches pattern - * `projects/*/locations/global/tcpRoutes/tcp_route_name>`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. Server-defined URL of this resource - * - * Generated from protobuf field string self_link = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getSelfLink() - { - return $this->self_link; - } - - /** - * Output only. Server-defined URL of this resource - * - * Generated from protobuf field string self_link = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setSelfLink($var) - { - GPBUtil::checkString($var, True); - $this->self_link = $var; - - return $this; - } - - /** - * Output only. The timestamp when the resource was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The timestamp when the resource was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The timestamp when the resource was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The timestamp when the resource was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Optional. A free-text description of the resource. Max length 1024 - * characters. - * - * Generated from protobuf field string description = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. A free-text description of the resource. Max length 1024 - * characters. - * - * Generated from protobuf field string description = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Required. Rules that define how traffic is routed and handled. At least one - * RouteRule must be supplied. If there are multiple rules then the action - * taken will be the first rule to match. - * - * Generated from protobuf field repeated .google.cloud.networkservices.v1.TcpRoute.RouteRule rules = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRules() - { - return $this->rules; - } - - /** - * Required. Rules that define how traffic is routed and handled. At least one - * RouteRule must be supplied. If there are multiple rules then the action - * taken will be the first rule to match. - * - * Generated from protobuf field repeated .google.cloud.networkservices.v1.TcpRoute.RouteRule rules = 5 [(.google.api.field_behavior) = REQUIRED]; - * @param array<\Google\Cloud\NetworkServices\V1\TcpRoute\RouteRule>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRules($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkServices\V1\TcpRoute\RouteRule::class); - $this->rules = $arr; - - return $this; - } - - /** - * Optional. Meshes defines a list of meshes this TcpRoute is attached to, as - * one of the routing rules to route the requests served by the mesh. - * Each mesh reference should match the pattern: - * `projects/*/locations/global/meshes/` - * The attached Mesh should be of a type SIDECAR - * - * Generated from protobuf field repeated string meshes = 8 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMeshes() - { - return $this->meshes; - } - - /** - * Optional. Meshes defines a list of meshes this TcpRoute is attached to, as - * one of the routing rules to route the requests served by the mesh. - * Each mesh reference should match the pattern: - * `projects/*/locations/global/meshes/` - * The attached Mesh should be of a type SIDECAR - * - * Generated from protobuf field repeated string meshes = 8 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMeshes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->meshes = $arr; - - return $this; - } - - /** - * Optional. Gateways defines a list of gateways this TcpRoute is attached to, - * as one of the routing rules to route the requests served by the gateway. - * Each gateway reference should match the pattern: - * `projects/*/locations/global/gateways/` - * - * Generated from protobuf field repeated string gateways = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getGateways() - { - return $this->gateways; - } - - /** - * Optional. Gateways defines a list of gateways this TcpRoute is attached to, - * as one of the routing rules to route the requests served by the gateway. - * Each gateway reference should match the pattern: - * `projects/*/locations/global/gateways/` - * - * Generated from protobuf field repeated string gateways = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setGateways($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->gateways = $arr; - - return $this; - } - - /** - * Optional. Set of label tags associated with the TcpRoute resource. - * - * Generated from protobuf field map labels = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. Set of label tags associated with the TcpRoute resource. - * - * Generated from protobuf field map labels = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/TcpRoute/RouteAction.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/TcpRoute/RouteAction.php deleted file mode 100644 index b2e0e11f070f..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/TcpRoute/RouteAction.php +++ /dev/null @@ -1,120 +0,0 @@ -google.cloud.networkservices.v1.TcpRoute.RouteAction - */ -class RouteAction extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The destination services to which traffic should be forwarded. - * At least one destination service is required. Only one of route - * destination or original destination can be set. - * - * Generated from protobuf field repeated .google.cloud.networkservices.v1.TcpRoute.RouteDestination destinations = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $destinations; - /** - * Optional. If true, Router will use the destination IP and port of the - * original connection as the destination of the request. Default is false. - * Only one of route destinations or original destination can be set. - * - * Generated from protobuf field bool original_destination = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $original_destination = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\NetworkServices\V1\TcpRoute\RouteDestination>|\Google\Protobuf\Internal\RepeatedField $destinations - * Optional. The destination services to which traffic should be forwarded. - * At least one destination service is required. Only one of route - * destination or original destination can be set. - * @type bool $original_destination - * Optional. If true, Router will use the destination IP and port of the - * original connection as the destination of the request. Default is false. - * Only one of route destinations or original destination can be set. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\TcpRoute::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The destination services to which traffic should be forwarded. - * At least one destination service is required. Only one of route - * destination or original destination can be set. - * - * Generated from protobuf field repeated .google.cloud.networkservices.v1.TcpRoute.RouteDestination destinations = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDestinations() - { - return $this->destinations; - } - - /** - * Optional. The destination services to which traffic should be forwarded. - * At least one destination service is required. Only one of route - * destination or original destination can be set. - * - * Generated from protobuf field repeated .google.cloud.networkservices.v1.TcpRoute.RouteDestination destinations = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\NetworkServices\V1\TcpRoute\RouteDestination>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDestinations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkServices\V1\TcpRoute\RouteDestination::class); - $this->destinations = $arr; - - return $this; - } - - /** - * Optional. If true, Router will use the destination IP and port of the - * original connection as the destination of the request. Default is false. - * Only one of route destinations or original destination can be set. - * - * Generated from protobuf field bool original_destination = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getOriginalDestination() - { - return $this->original_destination; - } - - /** - * Optional. If true, Router will use the destination IP and port of the - * original connection as the destination of the request. Default is false. - * Only one of route destinations or original destination can be set. - * - * Generated from protobuf field bool original_destination = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setOriginalDestination($var) - { - GPBUtil::checkBool($var); - $this->original_destination = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(RouteAction::class, \Google\Cloud\NetworkServices\V1\TcpRoute_RouteAction::class); - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/TcpRoute/RouteDestination.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/TcpRoute/RouteDestination.php deleted file mode 100644 index e663cca2b90f..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/TcpRoute/RouteDestination.php +++ /dev/null @@ -1,144 +0,0 @@ -google.cloud.networkservices.v1.TcpRoute.RouteDestination - */ -class RouteDestination extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The URL of a BackendService to route traffic to. - * - * Generated from protobuf field string service_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $service_name = ''; - /** - * Optional. Specifies the proportion of requests forwarded to the backend - * referenced by the serviceName field. This is computed as: - * - weight/Sum(weights in this destination list). - * For non-zero values, there may be some epsilon from the exact proportion - * defined here depending on the precision an implementation supports. - * If only one serviceName is specified and it has a weight greater than 0, - * 100% of the traffic is forwarded to that backend. - * If weights are specified for any one service name, they need to be - * specified for all of them. - * If weights are unspecified for all services, then, traffic is distributed - * in equal proportions to all of them. - * - * Generated from protobuf field int32 weight = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $weight = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $service_name - * Required. The URL of a BackendService to route traffic to. - * @type int $weight - * Optional. Specifies the proportion of requests forwarded to the backend - * referenced by the serviceName field. This is computed as: - * - weight/Sum(weights in this destination list). - * For non-zero values, there may be some epsilon from the exact proportion - * defined here depending on the precision an implementation supports. - * If only one serviceName is specified and it has a weight greater than 0, - * 100% of the traffic is forwarded to that backend. - * If weights are specified for any one service name, they need to be - * specified for all of them. - * If weights are unspecified for all services, then, traffic is distributed - * in equal proportions to all of them. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\TcpRoute::initOnce(); - parent::__construct($data); - } - - /** - * Required. The URL of a BackendService to route traffic to. - * - * Generated from protobuf field string service_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getServiceName() - { - return $this->service_name; - } - - /** - * Required. The URL of a BackendService to route traffic to. - * - * Generated from protobuf field string service_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setServiceName($var) - { - GPBUtil::checkString($var, True); - $this->service_name = $var; - - return $this; - } - - /** - * Optional. Specifies the proportion of requests forwarded to the backend - * referenced by the serviceName field. This is computed as: - * - weight/Sum(weights in this destination list). - * For non-zero values, there may be some epsilon from the exact proportion - * defined here depending on the precision an implementation supports. - * If only one serviceName is specified and it has a weight greater than 0, - * 100% of the traffic is forwarded to that backend. - * If weights are specified for any one service name, they need to be - * specified for all of them. - * If weights are unspecified for all services, then, traffic is distributed - * in equal proportions to all of them. - * - * Generated from protobuf field int32 weight = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getWeight() - { - return $this->weight; - } - - /** - * Optional. Specifies the proportion of requests forwarded to the backend - * referenced by the serviceName field. This is computed as: - * - weight/Sum(weights in this destination list). - * For non-zero values, there may be some epsilon from the exact proportion - * defined here depending on the precision an implementation supports. - * If only one serviceName is specified and it has a weight greater than 0, - * 100% of the traffic is forwarded to that backend. - * If weights are specified for any one service name, they need to be - * specified for all of them. - * If weights are unspecified for all services, then, traffic is distributed - * in equal proportions to all of them. - * - * Generated from protobuf field int32 weight = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setWeight($var) - { - GPBUtil::checkInt32($var); - $this->weight = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(RouteDestination::class, \Google\Cloud\NetworkServices\V1\TcpRoute_RouteDestination::class); - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/TcpRoute/RouteMatch.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/TcpRoute/RouteMatch.php deleted file mode 100644 index a084049f5c79..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/TcpRoute/RouteMatch.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.networkservices.v1.TcpRoute.RouteMatch - */ -class RouteMatch extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Must be specified in the CIDR range format. A CIDR range - * consists of an IP Address and a prefix length to construct the subnet - * mask. By default, the prefix length is 32 (i.e. matches a single IP - * address). Only IPV4 addresses are supported. - * Examples: - * "10.0.0.1" - matches against this exact IP address. - * "10.0.0.0/8" - matches against any IP address within the 10.0.0.0 subnet - * and 255.255.255.0 mask. - * "0.0.0.0/0" - matches against any IP address'. - * - * Generated from protobuf field string address = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $address = ''; - /** - * Required. Specifies the destination port to match against. - * - * Generated from protobuf field string port = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $port = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $address - * Required. Must be specified in the CIDR range format. A CIDR range - * consists of an IP Address and a prefix length to construct the subnet - * mask. By default, the prefix length is 32 (i.e. matches a single IP - * address). Only IPV4 addresses are supported. - * Examples: - * "10.0.0.1" - matches against this exact IP address. - * "10.0.0.0/8" - matches against any IP address within the 10.0.0.0 subnet - * and 255.255.255.0 mask. - * "0.0.0.0/0" - matches against any IP address'. - * @type string $port - * Required. Specifies the destination port to match against. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\TcpRoute::initOnce(); - parent::__construct($data); - } - - /** - * Required. Must be specified in the CIDR range format. A CIDR range - * consists of an IP Address and a prefix length to construct the subnet - * mask. By default, the prefix length is 32 (i.e. matches a single IP - * address). Only IPV4 addresses are supported. - * Examples: - * "10.0.0.1" - matches against this exact IP address. - * "10.0.0.0/8" - matches against any IP address within the 10.0.0.0 subnet - * and 255.255.255.0 mask. - * "0.0.0.0/0" - matches against any IP address'. - * - * Generated from protobuf field string address = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getAddress() - { - return $this->address; - } - - /** - * Required. Must be specified in the CIDR range format. A CIDR range - * consists of an IP Address and a prefix length to construct the subnet - * mask. By default, the prefix length is 32 (i.e. matches a single IP - * address). Only IPV4 addresses are supported. - * Examples: - * "10.0.0.1" - matches against this exact IP address. - * "10.0.0.0/8" - matches against any IP address within the 10.0.0.0 subnet - * and 255.255.255.0 mask. - * "0.0.0.0/0" - matches against any IP address'. - * - * Generated from protobuf field string address = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setAddress($var) - { - GPBUtil::checkString($var, True); - $this->address = $var; - - return $this; - } - - /** - * Required. Specifies the destination port to match against. - * - * Generated from protobuf field string port = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getPort() - { - return $this->port; - } - - /** - * Required. Specifies the destination port to match against. - * - * Generated from protobuf field string port = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setPort($var) - { - GPBUtil::checkString($var, True); - $this->port = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(RouteMatch::class, \Google\Cloud\NetworkServices\V1\TcpRoute_RouteMatch::class); - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/TcpRoute/RouteRule.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/TcpRoute/RouteRule.php deleted file mode 100644 index 9653ee3d112e..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/TcpRoute/RouteRule.php +++ /dev/null @@ -1,127 +0,0 @@ -google.cloud.networkservices.v1.TcpRoute.RouteRule - */ -class RouteRule extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. RouteMatch defines the predicate used to match requests to a - * given action. Multiple match types are "OR"ed for evaluation. If no - * routeMatch field is specified, this rule will unconditionally match - * traffic. - * - * Generated from protobuf field repeated .google.cloud.networkservices.v1.TcpRoute.RouteMatch matches = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $matches; - /** - * Required. The detailed rule defining how to route matched traffic. - * - * Generated from protobuf field .google.cloud.networkservices.v1.TcpRoute.RouteAction action = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $action = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\NetworkServices\V1\TcpRoute\RouteMatch>|\Google\Protobuf\Internal\RepeatedField $matches - * Optional. RouteMatch defines the predicate used to match requests to a - * given action. Multiple match types are "OR"ed for evaluation. If no - * routeMatch field is specified, this rule will unconditionally match - * traffic. - * @type \Google\Cloud\NetworkServices\V1\TcpRoute\RouteAction $action - * Required. The detailed rule defining how to route matched traffic. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\TcpRoute::initOnce(); - parent::__construct($data); - } - - /** - * Optional. RouteMatch defines the predicate used to match requests to a - * given action. Multiple match types are "OR"ed for evaluation. If no - * routeMatch field is specified, this rule will unconditionally match - * traffic. - * - * Generated from protobuf field repeated .google.cloud.networkservices.v1.TcpRoute.RouteMatch matches = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMatches() - { - return $this->matches; - } - - /** - * Optional. RouteMatch defines the predicate used to match requests to a - * given action. Multiple match types are "OR"ed for evaluation. If no - * routeMatch field is specified, this rule will unconditionally match - * traffic. - * - * Generated from protobuf field repeated .google.cloud.networkservices.v1.TcpRoute.RouteMatch matches = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\NetworkServices\V1\TcpRoute\RouteMatch>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMatches($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkServices\V1\TcpRoute\RouteMatch::class); - $this->matches = $arr; - - return $this; - } - - /** - * Required. The detailed rule defining how to route matched traffic. - * - * Generated from protobuf field .google.cloud.networkservices.v1.TcpRoute.RouteAction action = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\NetworkServices\V1\TcpRoute\RouteAction|null - */ - public function getAction() - { - return $this->action; - } - - public function hasAction() - { - return isset($this->action); - } - - public function clearAction() - { - unset($this->action); - } - - /** - * Required. The detailed rule defining how to route matched traffic. - * - * Generated from protobuf field .google.cloud.networkservices.v1.TcpRoute.RouteAction action = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\NetworkServices\V1\TcpRoute\RouteAction $var - * @return $this - */ - public function setAction($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkServices\V1\TcpRoute\RouteAction::class); - $this->action = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(RouteRule::class, \Google\Cloud\NetworkServices\V1\TcpRoute_RouteRule::class); - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/TlsRoute.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/TlsRoute.php deleted file mode 100644 index 9d44cf7d5e26..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/TlsRoute.php +++ /dev/null @@ -1,370 +0,0 @@ -google.cloud.networkservices.v1.TlsRoute - */ -class TlsRoute extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the TlsRoute resource. It matches pattern - * `projects/*/locations/global/tlsRoutes/tls_route_name>`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Output only. Server-defined URL of this resource - * - * Generated from protobuf field string self_link = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $self_link = ''; - /** - * Output only. The timestamp when the resource was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The timestamp when the resource was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Optional. A free-text description of the resource. Max length 1024 - * characters. - * - * Generated from protobuf field string description = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Required. Rules that define how traffic is routed and handled. At least one - * RouteRule must be supplied. If there are multiple rules then the action - * taken will be the first rule to match. - * - * Generated from protobuf field repeated .google.cloud.networkservices.v1.TlsRoute.RouteRule rules = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - private $rules; - /** - * Optional. Meshes defines a list of meshes this TlsRoute is attached to, as - * one of the routing rules to route the requests served by the mesh. - * Each mesh reference should match the pattern: - * `projects/*/locations/global/meshes/` - * The attached Mesh should be of a type SIDECAR - * - * Generated from protobuf field repeated string meshes = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - private $meshes; - /** - * Optional. Gateways defines a list of gateways this TlsRoute is attached to, - * as one of the routing rules to route the requests served by the gateway. - * Each gateway reference should match the pattern: - * `projects/*/locations/global/gateways/` - * - * Generated from protobuf field repeated string gateways = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - private $gateways; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the TlsRoute resource. It matches pattern - * `projects/*/locations/global/tlsRoutes/tls_route_name>`. - * @type string $self_link - * Output only. Server-defined URL of this resource - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The timestamp when the resource was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The timestamp when the resource was updated. - * @type string $description - * Optional. A free-text description of the resource. Max length 1024 - * characters. - * @type array<\Google\Cloud\NetworkServices\V1\TlsRoute\RouteRule>|\Google\Protobuf\Internal\RepeatedField $rules - * Required. Rules that define how traffic is routed and handled. At least one - * RouteRule must be supplied. If there are multiple rules then the action - * taken will be the first rule to match. - * @type array|\Google\Protobuf\Internal\RepeatedField $meshes - * Optional. Meshes defines a list of meshes this TlsRoute is attached to, as - * one of the routing rules to route the requests served by the mesh. - * Each mesh reference should match the pattern: - * `projects/*/locations/global/meshes/` - * The attached Mesh should be of a type SIDECAR - * @type array|\Google\Protobuf\Internal\RepeatedField $gateways - * Optional. Gateways defines a list of gateways this TlsRoute is attached to, - * as one of the routing rules to route the requests served by the gateway. - * Each gateway reference should match the pattern: - * `projects/*/locations/global/gateways/` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\TlsRoute::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the TlsRoute resource. It matches pattern - * `projects/*/locations/global/tlsRoutes/tls_route_name>`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the TlsRoute resource. It matches pattern - * `projects/*/locations/global/tlsRoutes/tls_route_name>`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. Server-defined URL of this resource - * - * Generated from protobuf field string self_link = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getSelfLink() - { - return $this->self_link; - } - - /** - * Output only. Server-defined URL of this resource - * - * Generated from protobuf field string self_link = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setSelfLink($var) - { - GPBUtil::checkString($var, True); - $this->self_link = $var; - - return $this; - } - - /** - * Output only. The timestamp when the resource was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The timestamp when the resource was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The timestamp when the resource was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The timestamp when the resource was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Optional. A free-text description of the resource. Max length 1024 - * characters. - * - * Generated from protobuf field string description = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. A free-text description of the resource. Max length 1024 - * characters. - * - * Generated from protobuf field string description = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Required. Rules that define how traffic is routed and handled. At least one - * RouteRule must be supplied. If there are multiple rules then the action - * taken will be the first rule to match. - * - * Generated from protobuf field repeated .google.cloud.networkservices.v1.TlsRoute.RouteRule rules = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRules() - { - return $this->rules; - } - - /** - * Required. Rules that define how traffic is routed and handled. At least one - * RouteRule must be supplied. If there are multiple rules then the action - * taken will be the first rule to match. - * - * Generated from protobuf field repeated .google.cloud.networkservices.v1.TlsRoute.RouteRule rules = 5 [(.google.api.field_behavior) = REQUIRED]; - * @param array<\Google\Cloud\NetworkServices\V1\TlsRoute\RouteRule>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRules($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkServices\V1\TlsRoute\RouteRule::class); - $this->rules = $arr; - - return $this; - } - - /** - * Optional. Meshes defines a list of meshes this TlsRoute is attached to, as - * one of the routing rules to route the requests served by the mesh. - * Each mesh reference should match the pattern: - * `projects/*/locations/global/meshes/` - * The attached Mesh should be of a type SIDECAR - * - * Generated from protobuf field repeated string meshes = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMeshes() - { - return $this->meshes; - } - - /** - * Optional. Meshes defines a list of meshes this TlsRoute is attached to, as - * one of the routing rules to route the requests served by the mesh. - * Each mesh reference should match the pattern: - * `projects/*/locations/global/meshes/` - * The attached Mesh should be of a type SIDECAR - * - * Generated from protobuf field repeated string meshes = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMeshes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->meshes = $arr; - - return $this; - } - - /** - * Optional. Gateways defines a list of gateways this TlsRoute is attached to, - * as one of the routing rules to route the requests served by the gateway. - * Each gateway reference should match the pattern: - * `projects/*/locations/global/gateways/` - * - * Generated from protobuf field repeated string gateways = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getGateways() - { - return $this->gateways; - } - - /** - * Optional. Gateways defines a list of gateways this TlsRoute is attached to, - * as one of the routing rules to route the requests served by the gateway. - * Each gateway reference should match the pattern: - * `projects/*/locations/global/gateways/` - * - * Generated from protobuf field repeated string gateways = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setGateways($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->gateways = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/TlsRoute/RouteAction.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/TlsRoute/RouteAction.php deleted file mode 100644 index a59aab54d550..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/TlsRoute/RouteAction.php +++ /dev/null @@ -1,74 +0,0 @@ -google.cloud.networkservices.v1.TlsRoute.RouteAction - */ -class RouteAction extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The destination services to which traffic should be forwarded. - * At least one destination service is required. - * - * Generated from protobuf field repeated .google.cloud.networkservices.v1.TlsRoute.RouteDestination destinations = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - private $destinations; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\NetworkServices\V1\TlsRoute\RouteDestination>|\Google\Protobuf\Internal\RepeatedField $destinations - * Required. The destination services to which traffic should be forwarded. - * At least one destination service is required. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\TlsRoute::initOnce(); - parent::__construct($data); - } - - /** - * Required. The destination services to which traffic should be forwarded. - * At least one destination service is required. - * - * Generated from protobuf field repeated .google.cloud.networkservices.v1.TlsRoute.RouteDestination destinations = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDestinations() - { - return $this->destinations; - } - - /** - * Required. The destination services to which traffic should be forwarded. - * At least one destination service is required. - * - * Generated from protobuf field repeated .google.cloud.networkservices.v1.TlsRoute.RouteDestination destinations = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param array<\Google\Cloud\NetworkServices\V1\TlsRoute\RouteDestination>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDestinations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkServices\V1\TlsRoute\RouteDestination::class); - $this->destinations = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(RouteAction::class, \Google\Cloud\NetworkServices\V1\TlsRoute_RouteAction::class); - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/TlsRoute/RouteDestination.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/TlsRoute/RouteDestination.php deleted file mode 100644 index 804ee9ad6ef1..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/TlsRoute/RouteDestination.php +++ /dev/null @@ -1,116 +0,0 @@ -google.cloud.networkservices.v1.TlsRoute.RouteDestination - */ -class RouteDestination extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The URL of a BackendService to route traffic to. - * - * Generated from protobuf field string service_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $service_name = ''; - /** - * Optional. Specifies the proportion of requests forwareded to the backend - * referenced by the service_name field. This is computed as: - * - weight/Sum(weights in destinations) - * Weights in all destinations does not need to sum up to 100. - * - * Generated from protobuf field int32 weight = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $weight = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $service_name - * Required. The URL of a BackendService to route traffic to. - * @type int $weight - * Optional. Specifies the proportion of requests forwareded to the backend - * referenced by the service_name field. This is computed as: - * - weight/Sum(weights in destinations) - * Weights in all destinations does not need to sum up to 100. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\TlsRoute::initOnce(); - parent::__construct($data); - } - - /** - * Required. The URL of a BackendService to route traffic to. - * - * Generated from protobuf field string service_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getServiceName() - { - return $this->service_name; - } - - /** - * Required. The URL of a BackendService to route traffic to. - * - * Generated from protobuf field string service_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setServiceName($var) - { - GPBUtil::checkString($var, True); - $this->service_name = $var; - - return $this; - } - - /** - * Optional. Specifies the proportion of requests forwareded to the backend - * referenced by the service_name field. This is computed as: - * - weight/Sum(weights in destinations) - * Weights in all destinations does not need to sum up to 100. - * - * Generated from protobuf field int32 weight = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getWeight() - { - return $this->weight; - } - - /** - * Optional. Specifies the proportion of requests forwareded to the backend - * referenced by the service_name field. This is computed as: - * - weight/Sum(weights in destinations) - * Weights in all destinations does not need to sum up to 100. - * - * Generated from protobuf field int32 weight = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setWeight($var) - { - GPBUtil::checkInt32($var); - $this->weight = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(RouteDestination::class, \Google\Cloud\NetworkServices\V1\TlsRoute_RouteDestination::class); - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/TlsRoute/RouteMatch.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/TlsRoute/RouteMatch.php deleted file mode 100644 index a9c60595ff5f..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/TlsRoute/RouteMatch.php +++ /dev/null @@ -1,147 +0,0 @@ -google.cloud.networkservices.v1.TlsRoute.RouteMatch - */ -class RouteMatch extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. SNI (server name indicator) to match against. - * SNI will be matched against all wildcard domains, i.e. `www.example.com` - * will be first matched against `www.example.com`, then `*.example.com`, - * then `*.com.` - * Partial wildcards are not supported, and values like *w.example.com are - * invalid. - * At least one of sni_host and alpn is required. - * Up to 5 sni hosts across all matches can be set. - * - * Generated from protobuf field repeated string sni_host = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $sni_host; - /** - * Optional. ALPN (Application-Layer Protocol Negotiation) to match against. - * Examples: "http/1.1", "h2". - * At least one of sni_host and alpn is required. - * Up to 5 alpns across all matches can be set. - * - * Generated from protobuf field repeated string alpn = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $alpn; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $sni_host - * Optional. SNI (server name indicator) to match against. - * SNI will be matched against all wildcard domains, i.e. `www.example.com` - * will be first matched against `www.example.com`, then `*.example.com`, - * then `*.com.` - * Partial wildcards are not supported, and values like *w.example.com are - * invalid. - * At least one of sni_host and alpn is required. - * Up to 5 sni hosts across all matches can be set. - * @type array|\Google\Protobuf\Internal\RepeatedField $alpn - * Optional. ALPN (Application-Layer Protocol Negotiation) to match against. - * Examples: "http/1.1", "h2". - * At least one of sni_host and alpn is required. - * Up to 5 alpns across all matches can be set. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\TlsRoute::initOnce(); - parent::__construct($data); - } - - /** - * Optional. SNI (server name indicator) to match against. - * SNI will be matched against all wildcard domains, i.e. `www.example.com` - * will be first matched against `www.example.com`, then `*.example.com`, - * then `*.com.` - * Partial wildcards are not supported, and values like *w.example.com are - * invalid. - * At least one of sni_host and alpn is required. - * Up to 5 sni hosts across all matches can be set. - * - * Generated from protobuf field repeated string sni_host = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSniHost() - { - return $this->sni_host; - } - - /** - * Optional. SNI (server name indicator) to match against. - * SNI will be matched against all wildcard domains, i.e. `www.example.com` - * will be first matched against `www.example.com`, then `*.example.com`, - * then `*.com.` - * Partial wildcards are not supported, and values like *w.example.com are - * invalid. - * At least one of sni_host and alpn is required. - * Up to 5 sni hosts across all matches can be set. - * - * Generated from protobuf field repeated string sni_host = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSniHost($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->sni_host = $arr; - - return $this; - } - - /** - * Optional. ALPN (Application-Layer Protocol Negotiation) to match against. - * Examples: "http/1.1", "h2". - * At least one of sni_host and alpn is required. - * Up to 5 alpns across all matches can be set. - * - * Generated from protobuf field repeated string alpn = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAlpn() - { - return $this->alpn; - } - - /** - * Optional. ALPN (Application-Layer Protocol Negotiation) to match against. - * Examples: "http/1.1", "h2". - * At least one of sni_host and alpn is required. - * Up to 5 alpns across all matches can be set. - * - * Generated from protobuf field repeated string alpn = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAlpn($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->alpn = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(RouteMatch::class, \Google\Cloud\NetworkServices\V1\TlsRoute_RouteMatch::class); - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/TlsRoute/RouteRule.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/TlsRoute/RouteRule.php deleted file mode 100644 index 639817fa9d0d..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/TlsRoute/RouteRule.php +++ /dev/null @@ -1,119 +0,0 @@ -google.cloud.networkservices.v1.TlsRoute.RouteRule - */ -class RouteRule extends \Google\Protobuf\Internal\Message -{ - /** - * Required. RouteMatch defines the predicate used to match requests to a - * given action. Multiple match types are "OR"ed for evaluation. - * - * Generated from protobuf field repeated .google.cloud.networkservices.v1.TlsRoute.RouteMatch matches = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - private $matches; - /** - * Required. The detailed rule defining how to route matched traffic. - * - * Generated from protobuf field .google.cloud.networkservices.v1.TlsRoute.RouteAction action = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $action = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\NetworkServices\V1\TlsRoute\RouteMatch>|\Google\Protobuf\Internal\RepeatedField $matches - * Required. RouteMatch defines the predicate used to match requests to a - * given action. Multiple match types are "OR"ed for evaluation. - * @type \Google\Cloud\NetworkServices\V1\TlsRoute\RouteAction $action - * Required. The detailed rule defining how to route matched traffic. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\TlsRoute::initOnce(); - parent::__construct($data); - } - - /** - * Required. RouteMatch defines the predicate used to match requests to a - * given action. Multiple match types are "OR"ed for evaluation. - * - * Generated from protobuf field repeated .google.cloud.networkservices.v1.TlsRoute.RouteMatch matches = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMatches() - { - return $this->matches; - } - - /** - * Required. RouteMatch defines the predicate used to match requests to a - * given action. Multiple match types are "OR"ed for evaluation. - * - * Generated from protobuf field repeated .google.cloud.networkservices.v1.TlsRoute.RouteMatch matches = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param array<\Google\Cloud\NetworkServices\V1\TlsRoute\RouteMatch>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMatches($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\NetworkServices\V1\TlsRoute\RouteMatch::class); - $this->matches = $arr; - - return $this; - } - - /** - * Required. The detailed rule defining how to route matched traffic. - * - * Generated from protobuf field .google.cloud.networkservices.v1.TlsRoute.RouteAction action = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\NetworkServices\V1\TlsRoute\RouteAction|null - */ - public function getAction() - { - return $this->action; - } - - public function hasAction() - { - return isset($this->action); - } - - public function clearAction() - { - unset($this->action); - } - - /** - * Required. The detailed rule defining how to route matched traffic. - * - * Generated from protobuf field .google.cloud.networkservices.v1.TlsRoute.RouteAction action = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\NetworkServices\V1\TlsRoute\RouteAction $var - * @return $this - */ - public function setAction($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkServices\V1\TlsRoute\RouteAction::class); - $this->action = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(RouteRule::class, \Google\Cloud\NetworkServices\V1\TlsRoute_RouteRule::class); - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/TrafficPortSelector.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/TrafficPortSelector.php deleted file mode 100644 index 409d32c196e4..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/TrafficPortSelector.php +++ /dev/null @@ -1,79 +0,0 @@ -google.cloud.networkservices.v1.TrafficPortSelector - */ -class TrafficPortSelector extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. A list of ports. Can be port numbers or port range - * (example, [80-90] specifies all ports from 80 to 90, including - * 80 and 90) or named ports or * to specify all ports. If the - * list is empty, all ports are selected. - * - * Generated from protobuf field repeated string ports = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $ports; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $ports - * Optional. A list of ports. Can be port numbers or port range - * (example, [80-90] specifies all ports from 80 to 90, including - * 80 and 90) or named ports or * to specify all ports. If the - * list is empty, all ports are selected. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\Common::initOnce(); - parent::__construct($data); - } - - /** - * Optional. A list of ports. Can be port numbers or port range - * (example, [80-90] specifies all ports from 80 to 90, including - * 80 and 90) or named ports or * to specify all ports. If the - * list is empty, all ports are selected. - * - * Generated from protobuf field repeated string ports = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPorts() - { - return $this->ports; - } - - /** - * Optional. A list of ports. Can be port numbers or port range - * (example, [80-90] specifies all ports from 80 to 90, including - * 80 and 90) or named ports or * to specify all ports. If the - * list is empty, all ports are selected. - * - * Generated from protobuf field repeated string ports = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPorts($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->ports = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/UpdateEndpointPolicyRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/UpdateEndpointPolicyRequest.php deleted file mode 100644 index f33c3d157691..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/UpdateEndpointPolicyRequest.php +++ /dev/null @@ -1,156 +0,0 @@ -google.cloud.networkservices.v1.UpdateEndpointPolicyRequest - */ -class UpdateEndpointPolicyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Field mask is used to specify the fields to be overwritten in the - * EndpointPolicy resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $update_mask = null; - /** - * Required. Updated EndpointPolicy resource. - * - * Generated from protobuf field .google.cloud.networkservices.v1.EndpointPolicy endpoint_policy = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $endpoint_policy = null; - - /** - * @param \Google\Cloud\NetworkServices\V1\EndpointPolicy $endpointPolicy Required. Updated EndpointPolicy resource. - * @param \Google\Protobuf\FieldMask $updateMask Optional. Field mask is used to specify the fields to be overwritten in the - * EndpointPolicy resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * @return \Google\Cloud\NetworkServices\V1\UpdateEndpointPolicyRequest - * - * @experimental - */ - public static function build(\Google\Cloud\NetworkServices\V1\EndpointPolicy $endpointPolicy, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setEndpointPolicy($endpointPolicy) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Optional. Field mask is used to specify the fields to be overwritten in the - * EndpointPolicy resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * @type \Google\Cloud\NetworkServices\V1\EndpointPolicy $endpoint_policy - * Required. Updated EndpointPolicy resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\EndpointPolicy::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Field mask is used to specify the fields to be overwritten in the - * EndpointPolicy resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Optional. Field mask is used to specify the fields to be overwritten in the - * EndpointPolicy resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * Required. Updated EndpointPolicy resource. - * - * Generated from protobuf field .google.cloud.networkservices.v1.EndpointPolicy endpoint_policy = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\NetworkServices\V1\EndpointPolicy|null - */ - public function getEndpointPolicy() - { - return $this->endpoint_policy; - } - - public function hasEndpointPolicy() - { - return isset($this->endpoint_policy); - } - - public function clearEndpointPolicy() - { - unset($this->endpoint_policy); - } - - /** - * Required. Updated EndpointPolicy resource. - * - * Generated from protobuf field .google.cloud.networkservices.v1.EndpointPolicy endpoint_policy = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\NetworkServices\V1\EndpointPolicy $var - * @return $this - */ - public function setEndpointPolicy($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkServices\V1\EndpointPolicy::class); - $this->endpoint_policy = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/UpdateGatewayRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/UpdateGatewayRequest.php deleted file mode 100644 index 843926a5faea..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/UpdateGatewayRequest.php +++ /dev/null @@ -1,156 +0,0 @@ -google.cloud.networkservices.v1.UpdateGatewayRequest - */ -class UpdateGatewayRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Field mask is used to specify the fields to be overwritten in the - * Gateway resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $update_mask = null; - /** - * Required. Updated Gateway resource. - * - * Generated from protobuf field .google.cloud.networkservices.v1.Gateway gateway = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $gateway = null; - - /** - * @param \Google\Cloud\NetworkServices\V1\Gateway $gateway Required. Updated Gateway resource. - * @param \Google\Protobuf\FieldMask $updateMask Optional. Field mask is used to specify the fields to be overwritten in the - * Gateway resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * @return \Google\Cloud\NetworkServices\V1\UpdateGatewayRequest - * - * @experimental - */ - public static function build(\Google\Cloud\NetworkServices\V1\Gateway $gateway, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setGateway($gateway) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Optional. Field mask is used to specify the fields to be overwritten in the - * Gateway resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * @type \Google\Cloud\NetworkServices\V1\Gateway $gateway - * Required. Updated Gateway resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\Gateway::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Field mask is used to specify the fields to be overwritten in the - * Gateway resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Optional. Field mask is used to specify the fields to be overwritten in the - * Gateway resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * Required. Updated Gateway resource. - * - * Generated from protobuf field .google.cloud.networkservices.v1.Gateway gateway = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\NetworkServices\V1\Gateway|null - */ - public function getGateway() - { - return $this->gateway; - } - - public function hasGateway() - { - return isset($this->gateway); - } - - public function clearGateway() - { - unset($this->gateway); - } - - /** - * Required. Updated Gateway resource. - * - * Generated from protobuf field .google.cloud.networkservices.v1.Gateway gateway = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\NetworkServices\V1\Gateway $var - * @return $this - */ - public function setGateway($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkServices\V1\Gateway::class); - $this->gateway = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/UpdateGrpcRouteRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/UpdateGrpcRouteRequest.php deleted file mode 100644 index c0b1c553d481..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/UpdateGrpcRouteRequest.php +++ /dev/null @@ -1,156 +0,0 @@ -google.cloud.networkservices.v1.UpdateGrpcRouteRequest - */ -class UpdateGrpcRouteRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Field mask is used to specify the fields to be overwritten in the - * GrpcRoute resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $update_mask = null; - /** - * Required. Updated GrpcRoute resource. - * - * Generated from protobuf field .google.cloud.networkservices.v1.GrpcRoute grpc_route = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $grpc_route = null; - - /** - * @param \Google\Cloud\NetworkServices\V1\GrpcRoute $grpcRoute Required. Updated GrpcRoute resource. - * @param \Google\Protobuf\FieldMask $updateMask Optional. Field mask is used to specify the fields to be overwritten in the - * GrpcRoute resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * @return \Google\Cloud\NetworkServices\V1\UpdateGrpcRouteRequest - * - * @experimental - */ - public static function build(\Google\Cloud\NetworkServices\V1\GrpcRoute $grpcRoute, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setGrpcRoute($grpcRoute) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Optional. Field mask is used to specify the fields to be overwritten in the - * GrpcRoute resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * @type \Google\Cloud\NetworkServices\V1\GrpcRoute $grpc_route - * Required. Updated GrpcRoute resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\GrpcRoute::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Field mask is used to specify the fields to be overwritten in the - * GrpcRoute resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Optional. Field mask is used to specify the fields to be overwritten in the - * GrpcRoute resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * Required. Updated GrpcRoute resource. - * - * Generated from protobuf field .google.cloud.networkservices.v1.GrpcRoute grpc_route = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\NetworkServices\V1\GrpcRoute|null - */ - public function getGrpcRoute() - { - return $this->grpc_route; - } - - public function hasGrpcRoute() - { - return isset($this->grpc_route); - } - - public function clearGrpcRoute() - { - unset($this->grpc_route); - } - - /** - * Required. Updated GrpcRoute resource. - * - * Generated from protobuf field .google.cloud.networkservices.v1.GrpcRoute grpc_route = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\NetworkServices\V1\GrpcRoute $var - * @return $this - */ - public function setGrpcRoute($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkServices\V1\GrpcRoute::class); - $this->grpc_route = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/UpdateHttpRouteRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/UpdateHttpRouteRequest.php deleted file mode 100644 index 183df9d0f1f0..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/UpdateHttpRouteRequest.php +++ /dev/null @@ -1,156 +0,0 @@ -google.cloud.networkservices.v1.UpdateHttpRouteRequest - */ -class UpdateHttpRouteRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Field mask is used to specify the fields to be overwritten in the - * HttpRoute resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $update_mask = null; - /** - * Required. Updated HttpRoute resource. - * - * Generated from protobuf field .google.cloud.networkservices.v1.HttpRoute http_route = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $http_route = null; - - /** - * @param \Google\Cloud\NetworkServices\V1\HttpRoute $httpRoute Required. Updated HttpRoute resource. - * @param \Google\Protobuf\FieldMask $updateMask Optional. Field mask is used to specify the fields to be overwritten in the - * HttpRoute resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * @return \Google\Cloud\NetworkServices\V1\UpdateHttpRouteRequest - * - * @experimental - */ - public static function build(\Google\Cloud\NetworkServices\V1\HttpRoute $httpRoute, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setHttpRoute($httpRoute) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Optional. Field mask is used to specify the fields to be overwritten in the - * HttpRoute resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * @type \Google\Cloud\NetworkServices\V1\HttpRoute $http_route - * Required. Updated HttpRoute resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\HttpRoute::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Field mask is used to specify the fields to be overwritten in the - * HttpRoute resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Optional. Field mask is used to specify the fields to be overwritten in the - * HttpRoute resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * Required. Updated HttpRoute resource. - * - * Generated from protobuf field .google.cloud.networkservices.v1.HttpRoute http_route = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\NetworkServices\V1\HttpRoute|null - */ - public function getHttpRoute() - { - return $this->http_route; - } - - public function hasHttpRoute() - { - return isset($this->http_route); - } - - public function clearHttpRoute() - { - unset($this->http_route); - } - - /** - * Required. Updated HttpRoute resource. - * - * Generated from protobuf field .google.cloud.networkservices.v1.HttpRoute http_route = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\NetworkServices\V1\HttpRoute $var - * @return $this - */ - public function setHttpRoute($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkServices\V1\HttpRoute::class); - $this->http_route = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/UpdateLbRouteExtensionRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/UpdateLbRouteExtensionRequest.php deleted file mode 100644 index cc4045456b2f..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/UpdateLbRouteExtensionRequest.php +++ /dev/null @@ -1,230 +0,0 @@ -google.cloud.networkservices.v1.UpdateLbRouteExtensionRequest - */ -class UpdateLbRouteExtensionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Used to specify the fields to be overwritten in the - * `LbRouteExtension` resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field is overwritten if it is in the mask. If the - * user does not specify a mask, then all fields are overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $update_mask = null; - /** - * Required. `LbRouteExtension` resource being updated. - * - * Generated from protobuf field .google.cloud.networkservices.v1.LbRouteExtension lb_route_extension = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $lb_route_extension = null; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server can ignore - * the request if it has already been completed. The server guarantees - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, ignores the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - */ - protected $request_id = ''; - - /** - * @param \Google\Cloud\NetworkServices\V1\LbRouteExtension $lbRouteExtension Required. `LbRouteExtension` resource being updated. - * @param \Google\Protobuf\FieldMask $updateMask Optional. Used to specify the fields to be overwritten in the - * `LbRouteExtension` resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field is overwritten if it is in the mask. If the - * user does not specify a mask, then all fields are overwritten. - * - * @return \Google\Cloud\NetworkServices\V1\UpdateLbRouteExtensionRequest - * - * @experimental - */ - public static function build(\Google\Cloud\NetworkServices\V1\LbRouteExtension $lbRouteExtension, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setLbRouteExtension($lbRouteExtension) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Optional. Used to specify the fields to be overwritten in the - * `LbRouteExtension` resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field is overwritten if it is in the mask. If the - * user does not specify a mask, then all fields are overwritten. - * @type \Google\Cloud\NetworkServices\V1\LbRouteExtension $lb_route_extension - * Required. `LbRouteExtension` resource being updated. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server can ignore - * the request if it has already been completed. The server guarantees - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, ignores the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\Dep::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Used to specify the fields to be overwritten in the - * `LbRouteExtension` resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field is overwritten if it is in the mask. If the - * user does not specify a mask, then all fields are overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Optional. Used to specify the fields to be overwritten in the - * `LbRouteExtension` resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field is overwritten if it is in the mask. If the - * user does not specify a mask, then all fields are overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * Required. `LbRouteExtension` resource being updated. - * - * Generated from protobuf field .google.cloud.networkservices.v1.LbRouteExtension lb_route_extension = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\NetworkServices\V1\LbRouteExtension|null - */ - public function getLbRouteExtension() - { - return $this->lb_route_extension; - } - - public function hasLbRouteExtension() - { - return isset($this->lb_route_extension); - } - - public function clearLbRouteExtension() - { - unset($this->lb_route_extension); - } - - /** - * Required. `LbRouteExtension` resource being updated. - * - * Generated from protobuf field .google.cloud.networkservices.v1.LbRouteExtension lb_route_extension = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\NetworkServices\V1\LbRouteExtension $var - * @return $this - */ - public function setLbRouteExtension($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkServices\V1\LbRouteExtension::class); - $this->lb_route_extension = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server can ignore - * the request if it has already been completed. The server guarantees - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, ignores the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server can ignore - * the request if it has already been completed. The server guarantees - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, ignores the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/UpdateLbTrafficExtensionRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/UpdateLbTrafficExtensionRequest.php deleted file mode 100644 index 61e7550161c1..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/UpdateLbTrafficExtensionRequest.php +++ /dev/null @@ -1,230 +0,0 @@ -google.cloud.networkservices.v1.UpdateLbTrafficExtensionRequest - */ -class UpdateLbTrafficExtensionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Used to specify the fields to be overwritten in the - * `LbTrafficExtension` resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field is overwritten if it is in the mask. If the - * user does not specify a mask, then all fields are overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $update_mask = null; - /** - * Required. `LbTrafficExtension` resource being updated. - * - * Generated from protobuf field .google.cloud.networkservices.v1.LbTrafficExtension lb_traffic_extension = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $lb_traffic_extension = null; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server can ignore - * the request if it has already been completed. The server guarantees - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, ignores the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - */ - protected $request_id = ''; - - /** - * @param \Google\Cloud\NetworkServices\V1\LbTrafficExtension $lbTrafficExtension Required. `LbTrafficExtension` resource being updated. - * @param \Google\Protobuf\FieldMask $updateMask Optional. Used to specify the fields to be overwritten in the - * `LbTrafficExtension` resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field is overwritten if it is in the mask. If the - * user does not specify a mask, then all fields are overwritten. - * - * @return \Google\Cloud\NetworkServices\V1\UpdateLbTrafficExtensionRequest - * - * @experimental - */ - public static function build(\Google\Cloud\NetworkServices\V1\LbTrafficExtension $lbTrafficExtension, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setLbTrafficExtension($lbTrafficExtension) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Optional. Used to specify the fields to be overwritten in the - * `LbTrafficExtension` resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field is overwritten if it is in the mask. If the - * user does not specify a mask, then all fields are overwritten. - * @type \Google\Cloud\NetworkServices\V1\LbTrafficExtension $lb_traffic_extension - * Required. `LbTrafficExtension` resource being updated. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server can ignore - * the request if it has already been completed. The server guarantees - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, ignores the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\Dep::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Used to specify the fields to be overwritten in the - * `LbTrafficExtension` resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field is overwritten if it is in the mask. If the - * user does not specify a mask, then all fields are overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Optional. Used to specify the fields to be overwritten in the - * `LbTrafficExtension` resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field is overwritten if it is in the mask. If the - * user does not specify a mask, then all fields are overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * Required. `LbTrafficExtension` resource being updated. - * - * Generated from protobuf field .google.cloud.networkservices.v1.LbTrafficExtension lb_traffic_extension = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\NetworkServices\V1\LbTrafficExtension|null - */ - public function getLbTrafficExtension() - { - return $this->lb_traffic_extension; - } - - public function hasLbTrafficExtension() - { - return isset($this->lb_traffic_extension); - } - - public function clearLbTrafficExtension() - { - unset($this->lb_traffic_extension); - } - - /** - * Required. `LbTrafficExtension` resource being updated. - * - * Generated from protobuf field .google.cloud.networkservices.v1.LbTrafficExtension lb_traffic_extension = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\NetworkServices\V1\LbTrafficExtension $var - * @return $this - */ - public function setLbTrafficExtension($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkServices\V1\LbTrafficExtension::class); - $this->lb_traffic_extension = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server can ignore - * the request if it has already been completed. The server guarantees - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, ignores the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server can ignore - * the request if it has already been completed. The server guarantees - * that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, ignores the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/UpdateMeshRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/UpdateMeshRequest.php deleted file mode 100644 index d3395efe3cad..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/UpdateMeshRequest.php +++ /dev/null @@ -1,156 +0,0 @@ -google.cloud.networkservices.v1.UpdateMeshRequest - */ -class UpdateMeshRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Field mask is used to specify the fields to be overwritten in the - * Mesh resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $update_mask = null; - /** - * Required. Updated Mesh resource. - * - * Generated from protobuf field .google.cloud.networkservices.v1.Mesh mesh = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $mesh = null; - - /** - * @param \Google\Cloud\NetworkServices\V1\Mesh $mesh Required. Updated Mesh resource. - * @param \Google\Protobuf\FieldMask $updateMask Optional. Field mask is used to specify the fields to be overwritten in the - * Mesh resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * @return \Google\Cloud\NetworkServices\V1\UpdateMeshRequest - * - * @experimental - */ - public static function build(\Google\Cloud\NetworkServices\V1\Mesh $mesh, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setMesh($mesh) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Optional. Field mask is used to specify the fields to be overwritten in the - * Mesh resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * @type \Google\Cloud\NetworkServices\V1\Mesh $mesh - * Required. Updated Mesh resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\Mesh::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Field mask is used to specify the fields to be overwritten in the - * Mesh resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Optional. Field mask is used to specify the fields to be overwritten in the - * Mesh resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * Required. Updated Mesh resource. - * - * Generated from protobuf field .google.cloud.networkservices.v1.Mesh mesh = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\NetworkServices\V1\Mesh|null - */ - public function getMesh() - { - return $this->mesh; - } - - public function hasMesh() - { - return isset($this->mesh); - } - - public function clearMesh() - { - unset($this->mesh); - } - - /** - * Required. Updated Mesh resource. - * - * Generated from protobuf field .google.cloud.networkservices.v1.Mesh mesh = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\NetworkServices\V1\Mesh $var - * @return $this - */ - public function setMesh($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkServices\V1\Mesh::class); - $this->mesh = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/UpdateTcpRouteRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/UpdateTcpRouteRequest.php deleted file mode 100644 index 217a1be3a5f8..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/UpdateTcpRouteRequest.php +++ /dev/null @@ -1,156 +0,0 @@ -google.cloud.networkservices.v1.UpdateTcpRouteRequest - */ -class UpdateTcpRouteRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Field mask is used to specify the fields to be overwritten in the - * TcpRoute resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $update_mask = null; - /** - * Required. Updated TcpRoute resource. - * - * Generated from protobuf field .google.cloud.networkservices.v1.TcpRoute tcp_route = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $tcp_route = null; - - /** - * @param \Google\Cloud\NetworkServices\V1\TcpRoute $tcpRoute Required. Updated TcpRoute resource. - * @param \Google\Protobuf\FieldMask $updateMask Optional. Field mask is used to specify the fields to be overwritten in the - * TcpRoute resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * @return \Google\Cloud\NetworkServices\V1\UpdateTcpRouteRequest - * - * @experimental - */ - public static function build(\Google\Cloud\NetworkServices\V1\TcpRoute $tcpRoute, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setTcpRoute($tcpRoute) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Optional. Field mask is used to specify the fields to be overwritten in the - * TcpRoute resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * @type \Google\Cloud\NetworkServices\V1\TcpRoute $tcp_route - * Required. Updated TcpRoute resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\TcpRoute::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Field mask is used to specify the fields to be overwritten in the - * TcpRoute resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Optional. Field mask is used to specify the fields to be overwritten in the - * TcpRoute resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * Required. Updated TcpRoute resource. - * - * Generated from protobuf field .google.cloud.networkservices.v1.TcpRoute tcp_route = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\NetworkServices\V1\TcpRoute|null - */ - public function getTcpRoute() - { - return $this->tcp_route; - } - - public function hasTcpRoute() - { - return isset($this->tcp_route); - } - - public function clearTcpRoute() - { - unset($this->tcp_route); - } - - /** - * Required. Updated TcpRoute resource. - * - * Generated from protobuf field .google.cloud.networkservices.v1.TcpRoute tcp_route = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\NetworkServices\V1\TcpRoute $var - * @return $this - */ - public function setTcpRoute($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkServices\V1\TcpRoute::class); - $this->tcp_route = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/UpdateTlsRouteRequest.php b/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/UpdateTlsRouteRequest.php deleted file mode 100644 index ce62c4f6a851..000000000000 --- a/owl-bot-staging/NetworkServices/v1/proto/src/Google/Cloud/NetworkServices/V1/UpdateTlsRouteRequest.php +++ /dev/null @@ -1,156 +0,0 @@ -google.cloud.networkservices.v1.UpdateTlsRouteRequest - */ -class UpdateTlsRouteRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Field mask is used to specify the fields to be overwritten in the - * TlsRoute resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $update_mask = null; - /** - * Required. Updated TlsRoute resource. - * - * Generated from protobuf field .google.cloud.networkservices.v1.TlsRoute tls_route = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $tls_route = null; - - /** - * @param \Google\Cloud\NetworkServices\V1\TlsRoute $tlsRoute Required. Updated TlsRoute resource. - * @param \Google\Protobuf\FieldMask $updateMask Optional. Field mask is used to specify the fields to be overwritten in the - * TlsRoute resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * @return \Google\Cloud\NetworkServices\V1\UpdateTlsRouteRequest - * - * @experimental - */ - public static function build(\Google\Cloud\NetworkServices\V1\TlsRoute $tlsRoute, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setTlsRoute($tlsRoute) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Optional. Field mask is used to specify the fields to be overwritten in the - * TlsRoute resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * @type \Google\Cloud\NetworkServices\V1\TlsRoute $tls_route - * Required. Updated TlsRoute resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Networkservices\V1\TlsRoute::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Field mask is used to specify the fields to be overwritten in the - * TlsRoute resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Optional. Field mask is used to specify the fields to be overwritten in the - * TlsRoute resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * Required. Updated TlsRoute resource. - * - * Generated from protobuf field .google.cloud.networkservices.v1.TlsRoute tls_route = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\NetworkServices\V1\TlsRoute|null - */ - public function getTlsRoute() - { - return $this->tls_route; - } - - public function hasTlsRoute() - { - return isset($this->tls_route); - } - - public function clearTlsRoute() - { - unset($this->tls_route); - } - - /** - * Required. Updated TlsRoute resource. - * - * Generated from protobuf field .google.cloud.networkservices.v1.TlsRoute tls_route = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\NetworkServices\V1\TlsRoute $var - * @return $this - */ - public function setTlsRoute($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\NetworkServices\V1\TlsRoute::class); - $this->tls_route = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/create_lb_route_extension.php b/owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/create_lb_route_extension.php deleted file mode 100644 index a716c00416a3..000000000000 --- a/owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/create_lb_route_extension.php +++ /dev/null @@ -1,176 +0,0 @@ -setCelExpression($lbRouteExtensionExtensionChainsMatchConditionCelExpression); - $extension = (new Extension()) - ->setName($lbRouteExtensionExtensionChainsExtensionsName) - ->setService($lbRouteExtensionExtensionChainsExtensionsService); - $lbRouteExtensionExtensionChainsExtensions = [$extension,]; - $extensionChain = (new ExtensionChain()) - ->setName($lbRouteExtensionExtensionChainsName) - ->setMatchCondition($lbRouteExtensionExtensionChainsMatchCondition) - ->setExtensions($lbRouteExtensionExtensionChainsExtensions); - $lbRouteExtensionExtensionChains = [$extensionChain,]; - $lbRouteExtension = (new LbRouteExtension()) - ->setName($lbRouteExtensionName) - ->setForwardingRules($lbRouteExtensionForwardingRules) - ->setExtensionChains($lbRouteExtensionExtensionChains) - ->setLoadBalancingScheme($lbRouteExtensionLoadBalancingScheme); - $request = (new CreateLbRouteExtensionRequest()) - ->setParent($formattedParent) - ->setLbRouteExtensionId($lbRouteExtensionId) - ->setLbRouteExtension($lbRouteExtension); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $depServiceClient->createLbRouteExtension($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var LbRouteExtension $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = DepServiceClient::locationName('[PROJECT]', '[LOCATION]'); - $lbRouteExtensionId = '[LB_ROUTE_EXTENSION_ID]'; - $lbRouteExtensionName = '[NAME]'; - $lbRouteExtensionForwardingRulesElement = '[FORWARDING_RULES]'; - $lbRouteExtensionExtensionChainsName = '[NAME]'; - $lbRouteExtensionExtensionChainsMatchConditionCelExpression = '[CEL_EXPRESSION]'; - $lbRouteExtensionExtensionChainsExtensionsName = '[NAME]'; - $lbRouteExtensionExtensionChainsExtensionsService = '[SERVICE]'; - $lbRouteExtensionLoadBalancingScheme = LoadBalancingScheme::LOAD_BALANCING_SCHEME_UNSPECIFIED; - - create_lb_route_extension_sample( - $formattedParent, - $lbRouteExtensionId, - $lbRouteExtensionName, - $lbRouteExtensionForwardingRulesElement, - $lbRouteExtensionExtensionChainsName, - $lbRouteExtensionExtensionChainsMatchConditionCelExpression, - $lbRouteExtensionExtensionChainsExtensionsName, - $lbRouteExtensionExtensionChainsExtensionsService, - $lbRouteExtensionLoadBalancingScheme - ); -} -// [END networkservices_v1_generated_DepService_CreateLbRouteExtension_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/create_lb_traffic_extension.php b/owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/create_lb_traffic_extension.php deleted file mode 100644 index 339156557e5e..000000000000 --- a/owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/create_lb_traffic_extension.php +++ /dev/null @@ -1,177 +0,0 @@ -setCelExpression($lbTrafficExtensionExtensionChainsMatchConditionCelExpression); - $extension = (new Extension()) - ->setName($lbTrafficExtensionExtensionChainsExtensionsName) - ->setService($lbTrafficExtensionExtensionChainsExtensionsService); - $lbTrafficExtensionExtensionChainsExtensions = [$extension,]; - $extensionChain = (new ExtensionChain()) - ->setName($lbTrafficExtensionExtensionChainsName) - ->setMatchCondition($lbTrafficExtensionExtensionChainsMatchCondition) - ->setExtensions($lbTrafficExtensionExtensionChainsExtensions); - $lbTrafficExtensionExtensionChains = [$extensionChain,]; - $lbTrafficExtension = (new LbTrafficExtension()) - ->setName($lbTrafficExtensionName) - ->setForwardingRules($lbTrafficExtensionForwardingRules) - ->setExtensionChains($lbTrafficExtensionExtensionChains) - ->setLoadBalancingScheme($lbTrafficExtensionLoadBalancingScheme); - $request = (new CreateLbTrafficExtensionRequest()) - ->setParent($formattedParent) - ->setLbTrafficExtensionId($lbTrafficExtensionId) - ->setLbTrafficExtension($lbTrafficExtension); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $depServiceClient->createLbTrafficExtension($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var LbTrafficExtension $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = DepServiceClient::locationName('[PROJECT]', '[LOCATION]'); - $lbTrafficExtensionId = '[LB_TRAFFIC_EXTENSION_ID]'; - $lbTrafficExtensionName = '[NAME]'; - $lbTrafficExtensionForwardingRulesElement = '[FORWARDING_RULES]'; - $lbTrafficExtensionExtensionChainsName = '[NAME]'; - $lbTrafficExtensionExtensionChainsMatchConditionCelExpression = '[CEL_EXPRESSION]'; - $lbTrafficExtensionExtensionChainsExtensionsName = '[NAME]'; - $lbTrafficExtensionExtensionChainsExtensionsService = '[SERVICE]'; - $lbTrafficExtensionLoadBalancingScheme = LoadBalancingScheme::LOAD_BALANCING_SCHEME_UNSPECIFIED; - - create_lb_traffic_extension_sample( - $formattedParent, - $lbTrafficExtensionId, - $lbTrafficExtensionName, - $lbTrafficExtensionForwardingRulesElement, - $lbTrafficExtensionExtensionChainsName, - $lbTrafficExtensionExtensionChainsMatchConditionCelExpression, - $lbTrafficExtensionExtensionChainsExtensionsName, - $lbTrafficExtensionExtensionChainsExtensionsService, - $lbTrafficExtensionLoadBalancingScheme - ); -} -// [END networkservices_v1_generated_DepService_CreateLbTrafficExtension_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/delete_lb_route_extension.php b/owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/delete_lb_route_extension.php deleted file mode 100644 index 4cf15b782b0d..000000000000 --- a/owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/delete_lb_route_extension.php +++ /dev/null @@ -1,86 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $depServiceClient->deleteLbRouteExtension($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = DepServiceClient::lbRouteExtensionName( - '[PROJECT]', - '[LOCATION]', - '[LB_ROUTE_EXTENSION]' - ); - - delete_lb_route_extension_sample($formattedName); -} -// [END networkservices_v1_generated_DepService_DeleteLbRouteExtension_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/delete_lb_traffic_extension.php b/owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/delete_lb_traffic_extension.php deleted file mode 100644 index 4e02416bad2b..000000000000 --- a/owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/delete_lb_traffic_extension.php +++ /dev/null @@ -1,86 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $depServiceClient->deleteLbTrafficExtension($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = DepServiceClient::lbTrafficExtensionName( - '[PROJECT]', - '[LOCATION]', - '[LB_TRAFFIC_EXTENSION]' - ); - - delete_lb_traffic_extension_sample($formattedName); -} -// [END networkservices_v1_generated_DepService_DeleteLbTrafficExtension_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/get_iam_policy.php b/owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/get_iam_policy.php deleted file mode 100644 index 9832fc979d5e..000000000000 --- a/owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/get_iam_policy.php +++ /dev/null @@ -1,72 +0,0 @@ -setResource($resource); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $depServiceClient->getIamPolicy($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - - get_iam_policy_sample($resource); -} -// [END networkservices_v1_generated_DepService_GetIamPolicy_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/get_lb_route_extension.php b/owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/get_lb_route_extension.php deleted file mode 100644 index 4e412ec7df38..000000000000 --- a/owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/get_lb_route_extension.php +++ /dev/null @@ -1,77 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var LbRouteExtension $response */ - $response = $depServiceClient->getLbRouteExtension($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = DepServiceClient::lbRouteExtensionName( - '[PROJECT]', - '[LOCATION]', - '[LB_ROUTE_EXTENSION]' - ); - - get_lb_route_extension_sample($formattedName); -} -// [END networkservices_v1_generated_DepService_GetLbRouteExtension_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/get_lb_traffic_extension.php b/owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/get_lb_traffic_extension.php deleted file mode 100644 index aef664e5735a..000000000000 --- a/owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/get_lb_traffic_extension.php +++ /dev/null @@ -1,77 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var LbTrafficExtension $response */ - $response = $depServiceClient->getLbTrafficExtension($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = DepServiceClient::lbTrafficExtensionName( - '[PROJECT]', - '[LOCATION]', - '[LB_TRAFFIC_EXTENSION]' - ); - - get_lb_traffic_extension_sample($formattedName); -} -// [END networkservices_v1_generated_DepService_GetLbTrafficExtension_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/get_location.php b/owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/get_location.php deleted file mode 100644 index 81207391a882..000000000000 --- a/owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/get_location.php +++ /dev/null @@ -1,57 +0,0 @@ -getLocation($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END networkservices_v1_generated_DepService_GetLocation_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/list_lb_route_extensions.php b/owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/list_lb_route_extensions.php deleted file mode 100644 index 16186e72a2d5..000000000000 --- a/owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/list_lb_route_extensions.php +++ /dev/null @@ -1,78 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $depServiceClient->listLbRouteExtensions($request); - - /** @var LbRouteExtension $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = DepServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - list_lb_route_extensions_sample($formattedParent); -} -// [END networkservices_v1_generated_DepService_ListLbRouteExtensions_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/list_lb_traffic_extensions.php b/owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/list_lb_traffic_extensions.php deleted file mode 100644 index e9e8dc69c70a..000000000000 --- a/owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/list_lb_traffic_extensions.php +++ /dev/null @@ -1,78 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $depServiceClient->listLbTrafficExtensions($request); - - /** @var LbTrafficExtension $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = DepServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - list_lb_traffic_extensions_sample($formattedParent); -} -// [END networkservices_v1_generated_DepService_ListLbTrafficExtensions_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/list_locations.php b/owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/list_locations.php deleted file mode 100644 index e59d3adb5090..000000000000 --- a/owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/list_locations.php +++ /dev/null @@ -1,62 +0,0 @@ -listLocations($request); - - /** @var Location $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END networkservices_v1_generated_DepService_ListLocations_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/set_iam_policy.php b/owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/set_iam_policy.php deleted file mode 100644 index 0d46ca464538..000000000000 --- a/owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/set_iam_policy.php +++ /dev/null @@ -1,77 +0,0 @@ -setResource($resource) - ->setPolicy($policy); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $depServiceClient->setIamPolicy($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - - set_iam_policy_sample($resource); -} -// [END networkservices_v1_generated_DepService_SetIamPolicy_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/test_iam_permissions.php b/owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/test_iam_permissions.php deleted file mode 100644 index 39b69eb6f9c8..000000000000 --- a/owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/test_iam_permissions.php +++ /dev/null @@ -1,84 +0,0 @@ -setResource($resource) - ->setPermissions($permissions); - - // Call the API and handle any network failures. - try { - /** @var TestIamPermissionsResponse $response */ - $response = $depServiceClient->testIamPermissions($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - $permissionsElement = '[PERMISSIONS]'; - - test_iam_permissions_sample($resource, $permissionsElement); -} -// [END networkservices_v1_generated_DepService_TestIamPermissions_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/update_lb_route_extension.php b/owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/update_lb_route_extension.php deleted file mode 100644 index 7f1bc725487b..000000000000 --- a/owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/update_lb_route_extension.php +++ /dev/null @@ -1,163 +0,0 @@ -setCelExpression($lbRouteExtensionExtensionChainsMatchConditionCelExpression); - $extension = (new Extension()) - ->setName($lbRouteExtensionExtensionChainsExtensionsName) - ->setService($lbRouteExtensionExtensionChainsExtensionsService); - $lbRouteExtensionExtensionChainsExtensions = [$extension,]; - $extensionChain = (new ExtensionChain()) - ->setName($lbRouteExtensionExtensionChainsName) - ->setMatchCondition($lbRouteExtensionExtensionChainsMatchCondition) - ->setExtensions($lbRouteExtensionExtensionChainsExtensions); - $lbRouteExtensionExtensionChains = [$extensionChain,]; - $lbRouteExtension = (new LbRouteExtension()) - ->setName($lbRouteExtensionName) - ->setForwardingRules($lbRouteExtensionForwardingRules) - ->setExtensionChains($lbRouteExtensionExtensionChains) - ->setLoadBalancingScheme($lbRouteExtensionLoadBalancingScheme); - $request = (new UpdateLbRouteExtensionRequest()) - ->setLbRouteExtension($lbRouteExtension); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $depServiceClient->updateLbRouteExtension($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var LbRouteExtension $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $lbRouteExtensionName = '[NAME]'; - $lbRouteExtensionForwardingRulesElement = '[FORWARDING_RULES]'; - $lbRouteExtensionExtensionChainsName = '[NAME]'; - $lbRouteExtensionExtensionChainsMatchConditionCelExpression = '[CEL_EXPRESSION]'; - $lbRouteExtensionExtensionChainsExtensionsName = '[NAME]'; - $lbRouteExtensionExtensionChainsExtensionsService = '[SERVICE]'; - $lbRouteExtensionLoadBalancingScheme = LoadBalancingScheme::LOAD_BALANCING_SCHEME_UNSPECIFIED; - - update_lb_route_extension_sample( - $lbRouteExtensionName, - $lbRouteExtensionForwardingRulesElement, - $lbRouteExtensionExtensionChainsName, - $lbRouteExtensionExtensionChainsMatchConditionCelExpression, - $lbRouteExtensionExtensionChainsExtensionsName, - $lbRouteExtensionExtensionChainsExtensionsService, - $lbRouteExtensionLoadBalancingScheme - ); -} -// [END networkservices_v1_generated_DepService_UpdateLbRouteExtension_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/update_lb_traffic_extension.php b/owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/update_lb_traffic_extension.php deleted file mode 100644 index 3d958ffd3f08..000000000000 --- a/owl-bot-staging/NetworkServices/v1/samples/V1/DepServiceClient/update_lb_traffic_extension.php +++ /dev/null @@ -1,163 +0,0 @@ -setCelExpression($lbTrafficExtensionExtensionChainsMatchConditionCelExpression); - $extension = (new Extension()) - ->setName($lbTrafficExtensionExtensionChainsExtensionsName) - ->setService($lbTrafficExtensionExtensionChainsExtensionsService); - $lbTrafficExtensionExtensionChainsExtensions = [$extension,]; - $extensionChain = (new ExtensionChain()) - ->setName($lbTrafficExtensionExtensionChainsName) - ->setMatchCondition($lbTrafficExtensionExtensionChainsMatchCondition) - ->setExtensions($lbTrafficExtensionExtensionChainsExtensions); - $lbTrafficExtensionExtensionChains = [$extensionChain,]; - $lbTrafficExtension = (new LbTrafficExtension()) - ->setName($lbTrafficExtensionName) - ->setForwardingRules($lbTrafficExtensionForwardingRules) - ->setExtensionChains($lbTrafficExtensionExtensionChains) - ->setLoadBalancingScheme($lbTrafficExtensionLoadBalancingScheme); - $request = (new UpdateLbTrafficExtensionRequest()) - ->setLbTrafficExtension($lbTrafficExtension); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $depServiceClient->updateLbTrafficExtension($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var LbTrafficExtension $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $lbTrafficExtensionName = '[NAME]'; - $lbTrafficExtensionForwardingRulesElement = '[FORWARDING_RULES]'; - $lbTrafficExtensionExtensionChainsName = '[NAME]'; - $lbTrafficExtensionExtensionChainsMatchConditionCelExpression = '[CEL_EXPRESSION]'; - $lbTrafficExtensionExtensionChainsExtensionsName = '[NAME]'; - $lbTrafficExtensionExtensionChainsExtensionsService = '[SERVICE]'; - $lbTrafficExtensionLoadBalancingScheme = LoadBalancingScheme::LOAD_BALANCING_SCHEME_UNSPECIFIED; - - update_lb_traffic_extension_sample( - $lbTrafficExtensionName, - $lbTrafficExtensionForwardingRulesElement, - $lbTrafficExtensionExtensionChainsName, - $lbTrafficExtensionExtensionChainsMatchConditionCelExpression, - $lbTrafficExtensionExtensionChainsExtensionsName, - $lbTrafficExtensionExtensionChainsExtensionsService, - $lbTrafficExtensionLoadBalancingScheme - ); -} -// [END networkservices_v1_generated_DepService_UpdateLbTrafficExtension_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/create_endpoint_policy.php b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/create_endpoint_policy.php deleted file mode 100644 index a08bbf2e9130..000000000000 --- a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/create_endpoint_policy.php +++ /dev/null @@ -1,111 +0,0 @@ -setName($endpointPolicyName) - ->setType($endpointPolicyType) - ->setEndpointMatcher($endpointPolicyEndpointMatcher); - $request = (new CreateEndpointPolicyRequest()) - ->setParent($formattedParent) - ->setEndpointPolicyId($endpointPolicyId) - ->setEndpointPolicy($endpointPolicy); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $networkServicesClient->createEndpointPolicy($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var EndpointPolicy $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = NetworkServicesClient::locationName('[PROJECT]', '[LOCATION]'); - $endpointPolicyId = '[ENDPOINT_POLICY_ID]'; - $endpointPolicyName = '[NAME]'; - $endpointPolicyType = EndpointPolicyType::ENDPOINT_POLICY_TYPE_UNSPECIFIED; - - create_endpoint_policy_sample( - $formattedParent, - $endpointPolicyId, - $endpointPolicyName, - $endpointPolicyType - ); -} -// [END networkservices_v1_generated_NetworkServices_CreateEndpointPolicy_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/create_gateway.php b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/create_gateway.php deleted file mode 100644 index 53d9241884f8..000000000000 --- a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/create_gateway.php +++ /dev/null @@ -1,120 +0,0 @@ -`. - * @param int $gatewayPortsElement One or more ports that the Gateway must receive traffic on. The - * proxy binds to the ports specified. Gateway listen on 0.0.0.0 on the ports - * specified below. - * @param string $gatewayScope Immutable. Scope determines how configuration across multiple - * Gateway instances are merged. The configuration for multiple Gateway - * instances with the same scope will be merged as presented as a single - * coniguration to the proxy/load balancer. - * - * Max length 64 characters. - * Scope should start with a letter and can only have letters, numbers, - * hyphens. - */ -function create_gateway_sample( - string $formattedParent, - string $gatewayId, - string $gatewayName, - int $gatewayPortsElement, - string $gatewayScope -): void { - // Create a client. - $networkServicesClient = new NetworkServicesClient(); - - // Prepare the request message. - $gatewayPorts = [$gatewayPortsElement,]; - $gateway = (new Gateway()) - ->setName($gatewayName) - ->setPorts($gatewayPorts) - ->setScope($gatewayScope); - $request = (new CreateGatewayRequest()) - ->setParent($formattedParent) - ->setGatewayId($gatewayId) - ->setGateway($gateway); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $networkServicesClient->createGateway($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Gateway $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = NetworkServicesClient::locationName('[PROJECT]', '[LOCATION]'); - $gatewayId = '[GATEWAY_ID]'; - $gatewayName = '[NAME]'; - $gatewayPortsElement = 0; - $gatewayScope = '[SCOPE]'; - - create_gateway_sample( - $formattedParent, - $gatewayId, - $gatewayName, - $gatewayPortsElement, - $gatewayScope - ); -} -// [END networkservices_v1_generated_NetworkServices_CreateGateway_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/create_grpc_route.php b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/create_grpc_route.php deleted file mode 100644 index 3b447df5c8bc..000000000000 --- a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/create_grpc_route.php +++ /dev/null @@ -1,143 +0,0 @@ -` - * @param string $grpcRouteHostnamesElement Service hostnames with an optional port for which this route - * describes traffic. - * - * Format: [:] - * - * Hostname is the fully qualified domain name of a network host. This matches - * the RFC 1123 definition of a hostname with 2 notable exceptions: - * - IPs are not allowed. - * - A hostname may be prefixed with a wildcard label (`*.`). The wildcard - * label must appear by itself as the first label. - * - * Hostname can be "precise" which is a domain name without the terminating - * dot of a network host (e.g. `foo.example.com`) or "wildcard", which is a - * domain name prefixed with a single wildcard label (e.g. `*.example.com`). - * - * Note that as per RFC1035 and RFC1123, a label must consist of lower case - * alphanumeric characters or '-', and must start and end with an alphanumeric - * character. No other punctuation is allowed. - * - * The routes associated with a Mesh or Gateway must have unique hostnames. If - * you attempt to attach multiple routes with conflicting hostnames, the - * configuration will be rejected. - * - * For example, while it is acceptable for routes for the hostnames - * `*.foo.bar.com` and `*.bar.com` to be associated with the same route, it is - * not possible to associate two routes both with `*.bar.com` or both with - * `bar.com`. - * - * If a port is specified, then gRPC clients must use the channel URI with the - * port to match this rule (i.e. "xds:///service:123"), otherwise they must - * supply the URI without a port (i.e. "xds:///service"). - */ -function create_grpc_route_sample( - string $formattedParent, - string $grpcRouteId, - string $grpcRouteName, - string $grpcRouteHostnamesElement -): void { - // Create a client. - $networkServicesClient = new NetworkServicesClient(); - - // Prepare the request message. - $grpcRouteHostnames = [$grpcRouteHostnamesElement,]; - $grpcRouteRulesAction = new RouteAction(); - $routeRule = (new RouteRule()) - ->setAction($grpcRouteRulesAction); - $grpcRouteRules = [$routeRule,]; - $grpcRoute = (new GrpcRoute()) - ->setName($grpcRouteName) - ->setHostnames($grpcRouteHostnames) - ->setRules($grpcRouteRules); - $request = (new CreateGrpcRouteRequest()) - ->setParent($formattedParent) - ->setGrpcRouteId($grpcRouteId) - ->setGrpcRoute($grpcRoute); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $networkServicesClient->createGrpcRoute($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var GrpcRoute $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = NetworkServicesClient::locationName('[PROJECT]', '[LOCATION]'); - $grpcRouteId = '[GRPC_ROUTE_ID]'; - $grpcRouteName = '[NAME]'; - $grpcRouteHostnamesElement = '[HOSTNAMES]'; - - create_grpc_route_sample( - $formattedParent, - $grpcRouteId, - $grpcRouteName, - $grpcRouteHostnamesElement - ); -} -// [END networkservices_v1_generated_NetworkServices_CreateGrpcRoute_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/create_http_route.php b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/create_http_route.php deleted file mode 100644 index 3af6b03cba9d..000000000000 --- a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/create_http_route.php +++ /dev/null @@ -1,132 +0,0 @@ -`. - * @param string $httpRouteHostnamesElement Hostnames define a set of hosts that should match against the - * HTTP host header to select a HttpRoute to process the request. Hostname is - * the fully qualified domain name of a network host, as defined by RFC 1123 - * with the exception that: - * - IPs are not allowed. - * - A hostname may be prefixed with a wildcard label (`*.`). The wildcard - * label must appear by itself as the first label. - * - * Hostname can be "precise" which is a domain name without the terminating - * dot of a network host (e.g. `foo.example.com`) or "wildcard", which is a - * domain name prefixed with a single wildcard label (e.g. `*.example.com`). - * - * Note that as per RFC1035 and RFC1123, a label must consist of lower case - * alphanumeric characters or '-', and must start and end with an alphanumeric - * character. No other punctuation is allowed. - * - * The routes associated with a Mesh or Gateways must have unique hostnames. - * If you attempt to attach multiple routes with conflicting hostnames, - * the configuration will be rejected. - * - * For example, while it is acceptable for routes for the hostnames - * `*.foo.bar.com` and `*.bar.com` to be associated with the same Mesh (or - * Gateways under the same scope), it is not possible to associate two routes - * both with `*.bar.com` or both with `bar.com`. - */ -function create_http_route_sample( - string $formattedParent, - string $httpRouteId, - string $httpRouteName, - string $httpRouteHostnamesElement -): void { - // Create a client. - $networkServicesClient = new NetworkServicesClient(); - - // Prepare the request message. - $httpRouteHostnames = [$httpRouteHostnamesElement,]; - $httpRouteRules = [new RouteRule()]; - $httpRoute = (new HttpRoute()) - ->setName($httpRouteName) - ->setHostnames($httpRouteHostnames) - ->setRules($httpRouteRules); - $request = (new CreateHttpRouteRequest()) - ->setParent($formattedParent) - ->setHttpRouteId($httpRouteId) - ->setHttpRoute($httpRoute); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $networkServicesClient->createHttpRoute($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var HttpRoute $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = NetworkServicesClient::locationName('[PROJECT]', '[LOCATION]'); - $httpRouteId = '[HTTP_ROUTE_ID]'; - $httpRouteName = '[NAME]'; - $httpRouteHostnamesElement = '[HOSTNAMES]'; - - create_http_route_sample( - $formattedParent, - $httpRouteId, - $httpRouteName, - $httpRouteHostnamesElement - ); -} -// [END networkservices_v1_generated_NetworkServices_CreateHttpRoute_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/create_mesh.php b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/create_mesh.php deleted file mode 100644 index 2a31c542d016..000000000000 --- a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/create_mesh.php +++ /dev/null @@ -1,93 +0,0 @@ -`. - */ -function create_mesh_sample(string $formattedParent, string $meshId, string $meshName): void -{ - // Create a client. - $networkServicesClient = new NetworkServicesClient(); - - // Prepare the request message. - $mesh = (new Mesh()) - ->setName($meshName); - $request = (new CreateMeshRequest()) - ->setParent($formattedParent) - ->setMeshId($meshId) - ->setMesh($mesh); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $networkServicesClient->createMesh($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Mesh $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = NetworkServicesClient::locationName('[PROJECT]', '[LOCATION]'); - $meshId = '[MESH_ID]'; - $meshName = '[NAME]'; - - create_mesh_sample($formattedParent, $meshId, $meshName); -} -// [END networkservices_v1_generated_NetworkServices_CreateMesh_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/create_service_binding.php b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/create_service_binding.php deleted file mode 100644 index acdc290edfec..000000000000 --- a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/create_service_binding.php +++ /dev/null @@ -1,106 +0,0 @@ -setName($serviceBindingName) - ->setService($serviceBindingService); - $request = (new CreateServiceBindingRequest()) - ->setParent($formattedParent) - ->setServiceBindingId($serviceBindingId) - ->setServiceBinding($serviceBinding); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $networkServicesClient->createServiceBinding($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var ServiceBinding $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = NetworkServicesClient::locationName('[PROJECT]', '[LOCATION]'); - $serviceBindingId = '[SERVICE_BINDING_ID]'; - $serviceBindingName = '[NAME]'; - $serviceBindingService = '[SERVICE]'; - - create_service_binding_sample( - $formattedParent, - $serviceBindingId, - $serviceBindingName, - $serviceBindingService - ); -} -// [END networkservices_v1_generated_NetworkServices_CreateServiceBinding_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/create_tcp_route.php b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/create_tcp_route.php deleted file mode 100644 index 58d1dc8d5841..000000000000 --- a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/create_tcp_route.php +++ /dev/null @@ -1,103 +0,0 @@ -`. - */ -function create_tcp_route_sample( - string $formattedParent, - string $tcpRouteId, - string $tcpRouteName -): void { - // Create a client. - $networkServicesClient = new NetworkServicesClient(); - - // Prepare the request message. - $tcpRouteRulesAction = new RouteAction(); - $routeRule = (new RouteRule()) - ->setAction($tcpRouteRulesAction); - $tcpRouteRules = [$routeRule,]; - $tcpRoute = (new TcpRoute()) - ->setName($tcpRouteName) - ->setRules($tcpRouteRules); - $request = (new CreateTcpRouteRequest()) - ->setParent($formattedParent) - ->setTcpRouteId($tcpRouteId) - ->setTcpRoute($tcpRoute); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $networkServicesClient->createTcpRoute($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var TcpRoute $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = NetworkServicesClient::locationName('[PROJECT]', '[LOCATION]'); - $tcpRouteId = '[TCP_ROUTE_ID]'; - $tcpRouteName = '[NAME]'; - - create_tcp_route_sample($formattedParent, $tcpRouteId, $tcpRouteName); -} -// [END networkservices_v1_generated_NetworkServices_CreateTcpRoute_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/create_tls_route.php b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/create_tls_route.php deleted file mode 100644 index fd15f0e7108a..000000000000 --- a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/create_tls_route.php +++ /dev/null @@ -1,124 +0,0 @@ -`. - * @param string $formattedTlsRouteRulesActionDestinationsServiceName The URL of a BackendService to route traffic to. Please see - * {@see NetworkServicesClient::backendServiceName()} for help formatting this field. - */ -function create_tls_route_sample( - string $formattedParent, - string $tlsRouteId, - string $tlsRouteName, - string $formattedTlsRouteRulesActionDestinationsServiceName -): void { - // Create a client. - $networkServicesClient = new NetworkServicesClient(); - - // Prepare the request message. - $tlsRouteRulesMatches = [new RouteMatch()]; - $routeDestination = (new RouteDestination()) - ->setServiceName($formattedTlsRouteRulesActionDestinationsServiceName); - $tlsRouteRulesActionDestinations = [$routeDestination,]; - $tlsRouteRulesAction = (new RouteAction()) - ->setDestinations($tlsRouteRulesActionDestinations); - $routeRule = (new RouteRule()) - ->setMatches($tlsRouteRulesMatches) - ->setAction($tlsRouteRulesAction); - $tlsRouteRules = [$routeRule,]; - $tlsRoute = (new TlsRoute()) - ->setName($tlsRouteName) - ->setRules($tlsRouteRules); - $request = (new CreateTlsRouteRequest()) - ->setParent($formattedParent) - ->setTlsRouteId($tlsRouteId) - ->setTlsRoute($tlsRoute); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $networkServicesClient->createTlsRoute($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var TlsRoute $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = NetworkServicesClient::locationName('[PROJECT]', '[LOCATION]'); - $tlsRouteId = '[TLS_ROUTE_ID]'; - $tlsRouteName = '[NAME]'; - $formattedTlsRouteRulesActionDestinationsServiceName = NetworkServicesClient::backendServiceName( - '[PROJECT]', - '[LOCATION]', - '[BACKEND_SERVICE]' - ); - - create_tls_route_sample( - $formattedParent, - $tlsRouteId, - $tlsRouteName, - $formattedTlsRouteRulesActionDestinationsServiceName - ); -} -// [END networkservices_v1_generated_NetworkServices_CreateTlsRoute_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/delete_endpoint_policy.php b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/delete_endpoint_policy.php deleted file mode 100644 index 21aa166606a1..000000000000 --- a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/delete_endpoint_policy.php +++ /dev/null @@ -1,85 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $networkServicesClient->deleteEndpointPolicy($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = NetworkServicesClient::endpointPolicyName( - '[PROJECT]', - '[LOCATION]', - '[ENDPOINT_POLICY]' - ); - - delete_endpoint_policy_sample($formattedName); -} -// [END networkservices_v1_generated_NetworkServices_DeleteEndpointPolicy_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/delete_gateway.php b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/delete_gateway.php deleted file mode 100644 index 9243f92a4482..000000000000 --- a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/delete_gateway.php +++ /dev/null @@ -1,81 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $networkServicesClient->deleteGateway($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = NetworkServicesClient::gatewayName('[PROJECT]', '[LOCATION]', '[GATEWAY]'); - - delete_gateway_sample($formattedName); -} -// [END networkservices_v1_generated_NetworkServices_DeleteGateway_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/delete_grpc_route.php b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/delete_grpc_route.php deleted file mode 100644 index 8e0fbf43f063..000000000000 --- a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/delete_grpc_route.php +++ /dev/null @@ -1,81 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $networkServicesClient->deleteGrpcRoute($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = NetworkServicesClient::grpcRouteName('[PROJECT]', '[LOCATION]', '[GRPC_ROUTE]'); - - delete_grpc_route_sample($formattedName); -} -// [END networkservices_v1_generated_NetworkServices_DeleteGrpcRoute_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/delete_http_route.php b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/delete_http_route.php deleted file mode 100644 index 1025e1ed8414..000000000000 --- a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/delete_http_route.php +++ /dev/null @@ -1,81 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $networkServicesClient->deleteHttpRoute($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = NetworkServicesClient::httpRouteName('[PROJECT]', '[LOCATION]', '[HTTP_ROUTE]'); - - delete_http_route_sample($formattedName); -} -// [END networkservices_v1_generated_NetworkServices_DeleteHttpRoute_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/delete_mesh.php b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/delete_mesh.php deleted file mode 100644 index 0cc75a1cc66f..000000000000 --- a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/delete_mesh.php +++ /dev/null @@ -1,81 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $networkServicesClient->deleteMesh($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = NetworkServicesClient::meshName('[PROJECT]', '[LOCATION]', '[MESH]'); - - delete_mesh_sample($formattedName); -} -// [END networkservices_v1_generated_NetworkServices_DeleteMesh_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/delete_service_binding.php b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/delete_service_binding.php deleted file mode 100644 index fa3f76daeb3c..000000000000 --- a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/delete_service_binding.php +++ /dev/null @@ -1,85 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $networkServicesClient->deleteServiceBinding($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = NetworkServicesClient::serviceBindingName( - '[PROJECT]', - '[LOCATION]', - '[SERVICE_BINDING]' - ); - - delete_service_binding_sample($formattedName); -} -// [END networkservices_v1_generated_NetworkServices_DeleteServiceBinding_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/delete_tcp_route.php b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/delete_tcp_route.php deleted file mode 100644 index b2665659f782..000000000000 --- a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/delete_tcp_route.php +++ /dev/null @@ -1,81 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $networkServicesClient->deleteTcpRoute($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = NetworkServicesClient::tcpRouteName('[PROJECT]', '[LOCATION]', '[TCP_ROUTE]'); - - delete_tcp_route_sample($formattedName); -} -// [END networkservices_v1_generated_NetworkServices_DeleteTcpRoute_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/delete_tls_route.php b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/delete_tls_route.php deleted file mode 100644 index fc163b20db69..000000000000 --- a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/delete_tls_route.php +++ /dev/null @@ -1,81 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $networkServicesClient->deleteTlsRoute($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = NetworkServicesClient::tlsRouteName('[PROJECT]', '[LOCATION]', '[TLS_ROUTE]'); - - delete_tls_route_sample($formattedName); -} -// [END networkservices_v1_generated_NetworkServices_DeleteTlsRoute_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/get_endpoint_policy.php b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/get_endpoint_policy.php deleted file mode 100644 index dd6ee4b3123e..000000000000 --- a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/get_endpoint_policy.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var EndpointPolicy $response */ - $response = $networkServicesClient->getEndpointPolicy($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = NetworkServicesClient::endpointPolicyName( - '[PROJECT]', - '[LOCATION]', - '[ENDPOINT_POLICY]' - ); - - get_endpoint_policy_sample($formattedName); -} -// [END networkservices_v1_generated_NetworkServices_GetEndpointPolicy_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/get_gateway.php b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/get_gateway.php deleted file mode 100644 index 72248e7ae0e1..000000000000 --- a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/get_gateway.php +++ /dev/null @@ -1,72 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Gateway $response */ - $response = $networkServicesClient->getGateway($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = NetworkServicesClient::gatewayName('[PROJECT]', '[LOCATION]', '[GATEWAY]'); - - get_gateway_sample($formattedName); -} -// [END networkservices_v1_generated_NetworkServices_GetGateway_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/get_grpc_route.php b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/get_grpc_route.php deleted file mode 100644 index c4291a78065d..000000000000 --- a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/get_grpc_route.php +++ /dev/null @@ -1,72 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var GrpcRoute $response */ - $response = $networkServicesClient->getGrpcRoute($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = NetworkServicesClient::grpcRouteName('[PROJECT]', '[LOCATION]', '[GRPC_ROUTE]'); - - get_grpc_route_sample($formattedName); -} -// [END networkservices_v1_generated_NetworkServices_GetGrpcRoute_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/get_http_route.php b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/get_http_route.php deleted file mode 100644 index f96e9556d53e..000000000000 --- a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/get_http_route.php +++ /dev/null @@ -1,72 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var HttpRoute $response */ - $response = $networkServicesClient->getHttpRoute($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = NetworkServicesClient::httpRouteName('[PROJECT]', '[LOCATION]', '[HTTP_ROUTE]'); - - get_http_route_sample($formattedName); -} -// [END networkservices_v1_generated_NetworkServices_GetHttpRoute_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/get_iam_policy.php b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/get_iam_policy.php deleted file mode 100644 index d6c6cdf8d8bf..000000000000 --- a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/get_iam_policy.php +++ /dev/null @@ -1,72 +0,0 @@ -setResource($resource); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $networkServicesClient->getIamPolicy($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - - get_iam_policy_sample($resource); -} -// [END networkservices_v1_generated_NetworkServices_GetIamPolicy_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/get_location.php b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/get_location.php deleted file mode 100644 index 34b662d77f10..000000000000 --- a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/get_location.php +++ /dev/null @@ -1,57 +0,0 @@ -getLocation($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END networkservices_v1_generated_NetworkServices_GetLocation_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/get_mesh.php b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/get_mesh.php deleted file mode 100644 index 556f0075b79d..000000000000 --- a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/get_mesh.php +++ /dev/null @@ -1,72 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Mesh $response */ - $response = $networkServicesClient->getMesh($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = NetworkServicesClient::meshName('[PROJECT]', '[LOCATION]', '[MESH]'); - - get_mesh_sample($formattedName); -} -// [END networkservices_v1_generated_NetworkServices_GetMesh_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/get_service_binding.php b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/get_service_binding.php deleted file mode 100644 index 89a73a29f6c5..000000000000 --- a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/get_service_binding.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var ServiceBinding $response */ - $response = $networkServicesClient->getServiceBinding($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = NetworkServicesClient::serviceBindingName( - '[PROJECT]', - '[LOCATION]', - '[SERVICE_BINDING]' - ); - - get_service_binding_sample($formattedName); -} -// [END networkservices_v1_generated_NetworkServices_GetServiceBinding_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/get_tcp_route.php b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/get_tcp_route.php deleted file mode 100644 index dc5e487b9a95..000000000000 --- a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/get_tcp_route.php +++ /dev/null @@ -1,72 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var TcpRoute $response */ - $response = $networkServicesClient->getTcpRoute($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = NetworkServicesClient::tcpRouteName('[PROJECT]', '[LOCATION]', '[TCP_ROUTE]'); - - get_tcp_route_sample($formattedName); -} -// [END networkservices_v1_generated_NetworkServices_GetTcpRoute_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/get_tls_route.php b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/get_tls_route.php deleted file mode 100644 index 91b87307f61a..000000000000 --- a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/get_tls_route.php +++ /dev/null @@ -1,72 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var TlsRoute $response */ - $response = $networkServicesClient->getTlsRoute($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = NetworkServicesClient::tlsRouteName('[PROJECT]', '[LOCATION]', '[TLS_ROUTE]'); - - get_tls_route_sample($formattedName); -} -// [END networkservices_v1_generated_NetworkServices_GetTlsRoute_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/list_endpoint_policies.php b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/list_endpoint_policies.php deleted file mode 100644 index b0cfae488ffc..000000000000 --- a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/list_endpoint_policies.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $networkServicesClient->listEndpointPolicies($request); - - /** @var EndpointPolicy $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = NetworkServicesClient::locationName('[PROJECT]', '[LOCATION]'); - - list_endpoint_policies_sample($formattedParent); -} -// [END networkservices_v1_generated_NetworkServices_ListEndpointPolicies_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/list_gateways.php b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/list_gateways.php deleted file mode 100644 index 403719c5013e..000000000000 --- a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/list_gateways.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $networkServicesClient->listGateways($request); - - /** @var Gateway $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = NetworkServicesClient::locationName('[PROJECT]', '[LOCATION]'); - - list_gateways_sample($formattedParent); -} -// [END networkservices_v1_generated_NetworkServices_ListGateways_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/list_grpc_routes.php b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/list_grpc_routes.php deleted file mode 100644 index fb8f6926291e..000000000000 --- a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/list_grpc_routes.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $networkServicesClient->listGrpcRoutes($request); - - /** @var GrpcRoute $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = NetworkServicesClient::locationName('[PROJECT]', '[LOCATION]'); - - list_grpc_routes_sample($formattedParent); -} -// [END networkservices_v1_generated_NetworkServices_ListGrpcRoutes_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/list_http_routes.php b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/list_http_routes.php deleted file mode 100644 index da2023ae07df..000000000000 --- a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/list_http_routes.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $networkServicesClient->listHttpRoutes($request); - - /** @var HttpRoute $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = NetworkServicesClient::locationName('[PROJECT]', '[LOCATION]'); - - list_http_routes_sample($formattedParent); -} -// [END networkservices_v1_generated_NetworkServices_ListHttpRoutes_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/list_locations.php b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/list_locations.php deleted file mode 100644 index 0a1a7a1f1e3f..000000000000 --- a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/list_locations.php +++ /dev/null @@ -1,62 +0,0 @@ -listLocations($request); - - /** @var Location $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END networkservices_v1_generated_NetworkServices_ListLocations_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/list_meshes.php b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/list_meshes.php deleted file mode 100644 index 34f29c274347..000000000000 --- a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/list_meshes.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $networkServicesClient->listMeshes($request); - - /** @var Mesh $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = NetworkServicesClient::locationName('[PROJECT]', '[LOCATION]'); - - list_meshes_sample($formattedParent); -} -// [END networkservices_v1_generated_NetworkServices_ListMeshes_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/list_service_bindings.php b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/list_service_bindings.php deleted file mode 100644 index a86408bd6943..000000000000 --- a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/list_service_bindings.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $networkServicesClient->listServiceBindings($request); - - /** @var ServiceBinding $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = NetworkServicesClient::locationName('[PROJECT]', '[LOCATION]'); - - list_service_bindings_sample($formattedParent); -} -// [END networkservices_v1_generated_NetworkServices_ListServiceBindings_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/list_tcp_routes.php b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/list_tcp_routes.php deleted file mode 100644 index 1655f17e99d1..000000000000 --- a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/list_tcp_routes.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $networkServicesClient->listTcpRoutes($request); - - /** @var TcpRoute $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = NetworkServicesClient::locationName('[PROJECT]', '[LOCATION]'); - - list_tcp_routes_sample($formattedParent); -} -// [END networkservices_v1_generated_NetworkServices_ListTcpRoutes_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/list_tls_routes.php b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/list_tls_routes.php deleted file mode 100644 index 2ea399d74385..000000000000 --- a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/list_tls_routes.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $networkServicesClient->listTlsRoutes($request); - - /** @var TlsRoute $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = NetworkServicesClient::locationName('[PROJECT]', '[LOCATION]'); - - list_tls_routes_sample($formattedParent); -} -// [END networkservices_v1_generated_NetworkServices_ListTlsRoutes_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/set_iam_policy.php b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/set_iam_policy.php deleted file mode 100644 index 360d9e41c521..000000000000 --- a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/set_iam_policy.php +++ /dev/null @@ -1,77 +0,0 @@ -setResource($resource) - ->setPolicy($policy); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $networkServicesClient->setIamPolicy($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - - set_iam_policy_sample($resource); -} -// [END networkservices_v1_generated_NetworkServices_SetIamPolicy_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/test_iam_permissions.php b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/test_iam_permissions.php deleted file mode 100644 index 18aad4d95f00..000000000000 --- a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/test_iam_permissions.php +++ /dev/null @@ -1,84 +0,0 @@ -setResource($resource) - ->setPermissions($permissions); - - // Call the API and handle any network failures. - try { - /** @var TestIamPermissionsResponse $response */ - $response = $networkServicesClient->testIamPermissions($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - $permissionsElement = '[PERMISSIONS]'; - - test_iam_permissions_sample($resource, $permissionsElement); -} -// [END networkservices_v1_generated_NetworkServices_TestIamPermissions_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/update_endpoint_policy.php b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/update_endpoint_policy.php deleted file mode 100644 index 15b809ac404f..000000000000 --- a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/update_endpoint_policy.php +++ /dev/null @@ -1,93 +0,0 @@ -setName($endpointPolicyName) - ->setType($endpointPolicyType) - ->setEndpointMatcher($endpointPolicyEndpointMatcher); - $request = (new UpdateEndpointPolicyRequest()) - ->setEndpointPolicy($endpointPolicy); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $networkServicesClient->updateEndpointPolicy($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var EndpointPolicy $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $endpointPolicyName = '[NAME]'; - $endpointPolicyType = EndpointPolicyType::ENDPOINT_POLICY_TYPE_UNSPECIFIED; - - update_endpoint_policy_sample($endpointPolicyName, $endpointPolicyType); -} -// [END networkservices_v1_generated_NetworkServices_UpdateEndpointPolicy_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/update_gateway.php b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/update_gateway.php deleted file mode 100644 index d86d940c7619..000000000000 --- a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/update_gateway.php +++ /dev/null @@ -1,104 +0,0 @@ -`. - * @param int $gatewayPortsElement One or more ports that the Gateway must receive traffic on. The - * proxy binds to the ports specified. Gateway listen on 0.0.0.0 on the ports - * specified below. - * @param string $gatewayScope Immutable. Scope determines how configuration across multiple - * Gateway instances are merged. The configuration for multiple Gateway - * instances with the same scope will be merged as presented as a single - * coniguration to the proxy/load balancer. - * - * Max length 64 characters. - * Scope should start with a letter and can only have letters, numbers, - * hyphens. - */ -function update_gateway_sample( - string $gatewayName, - int $gatewayPortsElement, - string $gatewayScope -): void { - // Create a client. - $networkServicesClient = new NetworkServicesClient(); - - // Prepare the request message. - $gatewayPorts = [$gatewayPortsElement,]; - $gateway = (new Gateway()) - ->setName($gatewayName) - ->setPorts($gatewayPorts) - ->setScope($gatewayScope); - $request = (new UpdateGatewayRequest()) - ->setGateway($gateway); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $networkServicesClient->updateGateway($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Gateway $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $gatewayName = '[NAME]'; - $gatewayPortsElement = 0; - $gatewayScope = '[SCOPE]'; - - update_gateway_sample($gatewayName, $gatewayPortsElement, $gatewayScope); -} -// [END networkservices_v1_generated_NetworkServices_UpdateGateway_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/update_grpc_route.php b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/update_grpc_route.php deleted file mode 100644 index cb1507ecafa9..000000000000 --- a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/update_grpc_route.php +++ /dev/null @@ -1,126 +0,0 @@ -` - * @param string $grpcRouteHostnamesElement Service hostnames with an optional port for which this route - * describes traffic. - * - * Format: [:] - * - * Hostname is the fully qualified domain name of a network host. This matches - * the RFC 1123 definition of a hostname with 2 notable exceptions: - * - IPs are not allowed. - * - A hostname may be prefixed with a wildcard label (`*.`). The wildcard - * label must appear by itself as the first label. - * - * Hostname can be "precise" which is a domain name without the terminating - * dot of a network host (e.g. `foo.example.com`) or "wildcard", which is a - * domain name prefixed with a single wildcard label (e.g. `*.example.com`). - * - * Note that as per RFC1035 and RFC1123, a label must consist of lower case - * alphanumeric characters or '-', and must start and end with an alphanumeric - * character. No other punctuation is allowed. - * - * The routes associated with a Mesh or Gateway must have unique hostnames. If - * you attempt to attach multiple routes with conflicting hostnames, the - * configuration will be rejected. - * - * For example, while it is acceptable for routes for the hostnames - * `*.foo.bar.com` and `*.bar.com` to be associated with the same route, it is - * not possible to associate two routes both with `*.bar.com` or both with - * `bar.com`. - * - * If a port is specified, then gRPC clients must use the channel URI with the - * port to match this rule (i.e. "xds:///service:123"), otherwise they must - * supply the URI without a port (i.e. "xds:///service"). - */ -function update_grpc_route_sample(string $grpcRouteName, string $grpcRouteHostnamesElement): void -{ - // Create a client. - $networkServicesClient = new NetworkServicesClient(); - - // Prepare the request message. - $grpcRouteHostnames = [$grpcRouteHostnamesElement,]; - $grpcRouteRulesAction = new RouteAction(); - $routeRule = (new RouteRule()) - ->setAction($grpcRouteRulesAction); - $grpcRouteRules = [$routeRule,]; - $grpcRoute = (new GrpcRoute()) - ->setName($grpcRouteName) - ->setHostnames($grpcRouteHostnames) - ->setRules($grpcRouteRules); - $request = (new UpdateGrpcRouteRequest()) - ->setGrpcRoute($grpcRoute); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $networkServicesClient->updateGrpcRoute($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var GrpcRoute $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $grpcRouteName = '[NAME]'; - $grpcRouteHostnamesElement = '[HOSTNAMES]'; - - update_grpc_route_sample($grpcRouteName, $grpcRouteHostnamesElement); -} -// [END networkservices_v1_generated_NetworkServices_UpdateGrpcRoute_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/update_http_route.php b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/update_http_route.php deleted file mode 100644 index eac28fb201f4..000000000000 --- a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/update_http_route.php +++ /dev/null @@ -1,115 +0,0 @@ -`. - * @param string $httpRouteHostnamesElement Hostnames define a set of hosts that should match against the - * HTTP host header to select a HttpRoute to process the request. Hostname is - * the fully qualified domain name of a network host, as defined by RFC 1123 - * with the exception that: - * - IPs are not allowed. - * - A hostname may be prefixed with a wildcard label (`*.`). The wildcard - * label must appear by itself as the first label. - * - * Hostname can be "precise" which is a domain name without the terminating - * dot of a network host (e.g. `foo.example.com`) or "wildcard", which is a - * domain name prefixed with a single wildcard label (e.g. `*.example.com`). - * - * Note that as per RFC1035 and RFC1123, a label must consist of lower case - * alphanumeric characters or '-', and must start and end with an alphanumeric - * character. No other punctuation is allowed. - * - * The routes associated with a Mesh or Gateways must have unique hostnames. - * If you attempt to attach multiple routes with conflicting hostnames, - * the configuration will be rejected. - * - * For example, while it is acceptable for routes for the hostnames - * `*.foo.bar.com` and `*.bar.com` to be associated with the same Mesh (or - * Gateways under the same scope), it is not possible to associate two routes - * both with `*.bar.com` or both with `bar.com`. - */ -function update_http_route_sample(string $httpRouteName, string $httpRouteHostnamesElement): void -{ - // Create a client. - $networkServicesClient = new NetworkServicesClient(); - - // Prepare the request message. - $httpRouteHostnames = [$httpRouteHostnamesElement,]; - $httpRouteRules = [new RouteRule()]; - $httpRoute = (new HttpRoute()) - ->setName($httpRouteName) - ->setHostnames($httpRouteHostnames) - ->setRules($httpRouteRules); - $request = (new UpdateHttpRouteRequest()) - ->setHttpRoute($httpRoute); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $networkServicesClient->updateHttpRoute($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var HttpRoute $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $httpRouteName = '[NAME]'; - $httpRouteHostnamesElement = '[HOSTNAMES]'; - - update_http_route_sample($httpRouteName, $httpRouteHostnamesElement); -} -// [END networkservices_v1_generated_NetworkServices_UpdateHttpRoute_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/update_mesh.php b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/update_mesh.php deleted file mode 100644 index aad5960d1742..000000000000 --- a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/update_mesh.php +++ /dev/null @@ -1,85 +0,0 @@ -`. - */ -function update_mesh_sample(string $meshName): void -{ - // Create a client. - $networkServicesClient = new NetworkServicesClient(); - - // Prepare the request message. - $mesh = (new Mesh()) - ->setName($meshName); - $request = (new UpdateMeshRequest()) - ->setMesh($mesh); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $networkServicesClient->updateMesh($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Mesh $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $meshName = '[NAME]'; - - update_mesh_sample($meshName); -} -// [END networkservices_v1_generated_NetworkServices_UpdateMesh_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/update_tcp_route.php b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/update_tcp_route.php deleted file mode 100644 index 8f9c6a326f2d..000000000000 --- a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/update_tcp_route.php +++ /dev/null @@ -1,92 +0,0 @@ -`. - */ -function update_tcp_route_sample(string $tcpRouteName): void -{ - // Create a client. - $networkServicesClient = new NetworkServicesClient(); - - // Prepare the request message. - $tcpRouteRulesAction = new RouteAction(); - $routeRule = (new RouteRule()) - ->setAction($tcpRouteRulesAction); - $tcpRouteRules = [$routeRule,]; - $tcpRoute = (new TcpRoute()) - ->setName($tcpRouteName) - ->setRules($tcpRouteRules); - $request = (new UpdateTcpRouteRequest()) - ->setTcpRoute($tcpRoute); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $networkServicesClient->updateTcpRoute($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var TcpRoute $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $tcpRouteName = '[NAME]'; - - update_tcp_route_sample($tcpRouteName); -} -// [END networkservices_v1_generated_NetworkServices_UpdateTcpRoute_sync] diff --git a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/update_tls_route.php b/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/update_tls_route.php deleted file mode 100644 index 50f4c2b95eec..000000000000 --- a/owl-bot-staging/NetworkServices/v1/samples/V1/NetworkServicesClient/update_tls_route.php +++ /dev/null @@ -1,109 +0,0 @@ -`. - * @param string $formattedTlsRouteRulesActionDestinationsServiceName The URL of a BackendService to route traffic to. Please see - * {@see NetworkServicesClient::backendServiceName()} for help formatting this field. - */ -function update_tls_route_sample( - string $tlsRouteName, - string $formattedTlsRouteRulesActionDestinationsServiceName -): void { - // Create a client. - $networkServicesClient = new NetworkServicesClient(); - - // Prepare the request message. - $tlsRouteRulesMatches = [new RouteMatch()]; - $routeDestination = (new RouteDestination()) - ->setServiceName($formattedTlsRouteRulesActionDestinationsServiceName); - $tlsRouteRulesActionDestinations = [$routeDestination,]; - $tlsRouteRulesAction = (new RouteAction()) - ->setDestinations($tlsRouteRulesActionDestinations); - $routeRule = (new RouteRule()) - ->setMatches($tlsRouteRulesMatches) - ->setAction($tlsRouteRulesAction); - $tlsRouteRules = [$routeRule,]; - $tlsRoute = (new TlsRoute()) - ->setName($tlsRouteName) - ->setRules($tlsRouteRules); - $request = (new UpdateTlsRouteRequest()) - ->setTlsRoute($tlsRoute); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $networkServicesClient->updateTlsRoute($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var TlsRoute $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $tlsRouteName = '[NAME]'; - $formattedTlsRouteRulesActionDestinationsServiceName = NetworkServicesClient::backendServiceName( - '[PROJECT]', - '[LOCATION]', - '[BACKEND_SERVICE]' - ); - - update_tls_route_sample($tlsRouteName, $formattedTlsRouteRulesActionDestinationsServiceName); -} -// [END networkservices_v1_generated_NetworkServices_UpdateTlsRoute_sync] diff --git a/owl-bot-staging/NetworkServices/v1/src/V1/Client/DepServiceClient.php b/owl-bot-staging/NetworkServices/v1/src/V1/Client/DepServiceClient.php deleted file mode 100644 index fa881f493d29..000000000000 --- a/owl-bot-staging/NetworkServices/v1/src/V1/Client/DepServiceClient.php +++ /dev/null @@ -1,744 +0,0 @@ - createLbRouteExtensionAsync(CreateLbRouteExtensionRequest $request, array $optionalArgs = []) - * @method PromiseInterface createLbTrafficExtensionAsync(CreateLbTrafficExtensionRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteLbRouteExtensionAsync(DeleteLbRouteExtensionRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteLbTrafficExtensionAsync(DeleteLbTrafficExtensionRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLbRouteExtensionAsync(GetLbRouteExtensionRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLbTrafficExtensionAsync(GetLbTrafficExtensionRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLbRouteExtensionsAsync(ListLbRouteExtensionsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLbTrafficExtensionsAsync(ListLbTrafficExtensionsRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateLbRouteExtensionAsync(UpdateLbRouteExtensionRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateLbTrafficExtensionAsync(UpdateLbTrafficExtensionRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) - * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) - */ -final class DepServiceClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.networkservices.v1.DepService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'networkservices.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'networkservices.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/dep_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/dep_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/dep_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/dep_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Create the default operation client for the service. - * - * @param array $options ClientOptions for the client. - * - * @return OperationsClient - */ - private function createOperationsClient(array $options) - { - // Unset client-specific configuration options - unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); - - if (isset($options['operationsClient'])) { - return $options['operationsClient']; - } - - return new OperationsClient($options); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * lb_route_extension resource. - * - * @param string $project - * @param string $location - * @param string $lbRouteExtension - * - * @return string The formatted lb_route_extension resource. - */ - public static function lbRouteExtensionName(string $project, string $location, string $lbRouteExtension): string - { - return self::getPathTemplate('lbRouteExtension')->render([ - 'project' => $project, - 'location' => $location, - 'lb_route_extension' => $lbRouteExtension, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * lb_traffic_extension resource. - * - * @param string $project - * @param string $location - * @param string $lbTrafficExtension - * - * @return string The formatted lb_traffic_extension resource. - */ - public static function lbTrafficExtensionName(string $project, string $location, string $lbTrafficExtension): string - { - return self::getPathTemplate('lbTrafficExtension')->render([ - 'project' => $project, - 'location' => $location, - 'lb_traffic_extension' => $lbTrafficExtension, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a location - * resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted location resource. - */ - public static function locationName(string $project, string $location): string - { - return self::getPathTemplate('location')->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - lbRouteExtension: projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension} - * - lbTrafficExtension: projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension} - * - location: projects/{project}/locations/{location} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param ?string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, ?string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'networkservices.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Creates a new `LbRouteExtension` resource in a given project and location. - * - * The async variant is {@see DepServiceClient::createLbRouteExtensionAsync()} . - * - * @example samples/V1/DepServiceClient/create_lb_route_extension.php - * - * @param CreateLbRouteExtensionRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createLbRouteExtension(CreateLbRouteExtensionRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateLbRouteExtension', $request, $callOptions)->wait(); - } - - /** - * Creates a new `LbTrafficExtension` resource in a given project and - * location. - * - * The async variant is {@see DepServiceClient::createLbTrafficExtensionAsync()} . - * - * @example samples/V1/DepServiceClient/create_lb_traffic_extension.php - * - * @param CreateLbTrafficExtensionRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createLbTrafficExtension(CreateLbTrafficExtensionRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateLbTrafficExtension', $request, $callOptions)->wait(); - } - - /** - * Deletes the specified `LbRouteExtension` resource. - * - * The async variant is {@see DepServiceClient::deleteLbRouteExtensionAsync()} . - * - * @example samples/V1/DepServiceClient/delete_lb_route_extension.php - * - * @param DeleteLbRouteExtensionRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteLbRouteExtension(DeleteLbRouteExtensionRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteLbRouteExtension', $request, $callOptions)->wait(); - } - - /** - * Deletes the specified `LbTrafficExtension` resource. - * - * The async variant is {@see DepServiceClient::deleteLbTrafficExtensionAsync()} . - * - * @example samples/V1/DepServiceClient/delete_lb_traffic_extension.php - * - * @param DeleteLbTrafficExtensionRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteLbTrafficExtension(DeleteLbTrafficExtensionRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteLbTrafficExtension', $request, $callOptions)->wait(); - } - - /** - * Gets details of the specified `LbRouteExtension` resource. - * - * The async variant is {@see DepServiceClient::getLbRouteExtensionAsync()} . - * - * @example samples/V1/DepServiceClient/get_lb_route_extension.php - * - * @param GetLbRouteExtensionRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return LbRouteExtension - * - * @throws ApiException Thrown if the API call fails. - */ - public function getLbRouteExtension(GetLbRouteExtensionRequest $request, array $callOptions = []): LbRouteExtension - { - return $this->startApiCall('GetLbRouteExtension', $request, $callOptions)->wait(); - } - - /** - * Gets details of the specified `LbTrafficExtension` resource. - * - * The async variant is {@see DepServiceClient::getLbTrafficExtensionAsync()} . - * - * @example samples/V1/DepServiceClient/get_lb_traffic_extension.php - * - * @param GetLbTrafficExtensionRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return LbTrafficExtension - * - * @throws ApiException Thrown if the API call fails. - */ - public function getLbTrafficExtension(GetLbTrafficExtensionRequest $request, array $callOptions = []): LbTrafficExtension - { - return $this->startApiCall('GetLbTrafficExtension', $request, $callOptions)->wait(); - } - - /** - * Lists `LbRouteExtension` resources in a given project and location. - * - * The async variant is {@see DepServiceClient::listLbRouteExtensionsAsync()} . - * - * @example samples/V1/DepServiceClient/list_lb_route_extensions.php - * - * @param ListLbRouteExtensionsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listLbRouteExtensions(ListLbRouteExtensionsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListLbRouteExtensions', $request, $callOptions); - } - - /** - * Lists `LbTrafficExtension` resources in a given project and location. - * - * The async variant is {@see DepServiceClient::listLbTrafficExtensionsAsync()} . - * - * @example samples/V1/DepServiceClient/list_lb_traffic_extensions.php - * - * @param ListLbTrafficExtensionsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listLbTrafficExtensions(ListLbTrafficExtensionsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListLbTrafficExtensions', $request, $callOptions); - } - - /** - * Updates the parameters of the specified `LbRouteExtension` resource. - * - * The async variant is {@see DepServiceClient::updateLbRouteExtensionAsync()} . - * - * @example samples/V1/DepServiceClient/update_lb_route_extension.php - * - * @param UpdateLbRouteExtensionRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateLbRouteExtension(UpdateLbRouteExtensionRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateLbRouteExtension', $request, $callOptions)->wait(); - } - - /** - * Updates the parameters of the specified `LbTrafficExtension` resource. - * - * The async variant is {@see DepServiceClient::updateLbTrafficExtensionAsync()} . - * - * @example samples/V1/DepServiceClient/update_lb_traffic_extension.php - * - * @param UpdateLbTrafficExtensionRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateLbTrafficExtension(UpdateLbTrafficExtensionRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateLbTrafficExtension', $request, $callOptions)->wait(); - } - - /** - * Gets information about a location. - * - * The async variant is {@see DepServiceClient::getLocationAsync()} . - * - * @example samples/V1/DepServiceClient/get_location.php - * - * @param GetLocationRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Location - * - * @throws ApiException Thrown if the API call fails. - */ - public function getLocation(GetLocationRequest $request, array $callOptions = []): Location - { - return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * The async variant is {@see DepServiceClient::listLocationsAsync()} . - * - * @example samples/V1/DepServiceClient/list_locations.php - * - * @param ListLocationsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListLocations', $request, $callOptions); - } - - /** - * Gets the access control policy for a resource. Returns an empty policy - if the resource exists and does not have a policy set. - * - * The async variant is {@see DepServiceClient::getIamPolicyAsync()} . - * - * @example samples/V1/DepServiceClient/get_iam_policy.php - * - * @param GetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * Sets the access control policy on the specified resource. Replaces - any existing policy. - - Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` - errors. - * - * The async variant is {@see DepServiceClient::setIamPolicyAsync()} . - * - * @example samples/V1/DepServiceClient/set_iam_policy.php - * - * @param SetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * Returns permissions that a caller has on the specified resource. If the - resource does not exist, this will return an empty set of - permissions, not a `NOT_FOUND` error. - - Note: This operation is designed to be used for building - permission-aware UIs and command-line tools, not for authorization - checking. This operation may "fail open" without warning. - * - * The async variant is {@see DepServiceClient::testIamPermissionsAsync()} . - * - * @example samples/V1/DepServiceClient/test_iam_permissions.php - * - * @param TestIamPermissionsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return TestIamPermissionsResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse - { - return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/NetworkServices/v1/src/V1/Client/NetworkServicesClient.php b/owl-bot-staging/NetworkServices/v1/src/V1/Client/NetworkServicesClient.php deleted file mode 100644 index 25824901c198..000000000000 --- a/owl-bot-staging/NetworkServices/v1/src/V1/Client/NetworkServicesClient.php +++ /dev/null @@ -1,1761 +0,0 @@ - createEndpointPolicyAsync(CreateEndpointPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface createGatewayAsync(CreateGatewayRequest $request, array $optionalArgs = []) - * @method PromiseInterface createGrpcRouteAsync(CreateGrpcRouteRequest $request, array $optionalArgs = []) - * @method PromiseInterface createHttpRouteAsync(CreateHttpRouteRequest $request, array $optionalArgs = []) - * @method PromiseInterface createMeshAsync(CreateMeshRequest $request, array $optionalArgs = []) - * @method PromiseInterface createServiceBindingAsync(CreateServiceBindingRequest $request, array $optionalArgs = []) - * @method PromiseInterface createTcpRouteAsync(CreateTcpRouteRequest $request, array $optionalArgs = []) - * @method PromiseInterface createTlsRouteAsync(CreateTlsRouteRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteEndpointPolicyAsync(DeleteEndpointPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteGatewayAsync(DeleteGatewayRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteGrpcRouteAsync(DeleteGrpcRouteRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteHttpRouteAsync(DeleteHttpRouteRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteMeshAsync(DeleteMeshRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteServiceBindingAsync(DeleteServiceBindingRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteTcpRouteAsync(DeleteTcpRouteRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteTlsRouteAsync(DeleteTlsRouteRequest $request, array $optionalArgs = []) - * @method PromiseInterface getEndpointPolicyAsync(GetEndpointPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface getGatewayAsync(GetGatewayRequest $request, array $optionalArgs = []) - * @method PromiseInterface getGrpcRouteAsync(GetGrpcRouteRequest $request, array $optionalArgs = []) - * @method PromiseInterface getHttpRouteAsync(GetHttpRouteRequest $request, array $optionalArgs = []) - * @method PromiseInterface getMeshAsync(GetMeshRequest $request, array $optionalArgs = []) - * @method PromiseInterface getServiceBindingAsync(GetServiceBindingRequest $request, array $optionalArgs = []) - * @method PromiseInterface getTcpRouteAsync(GetTcpRouteRequest $request, array $optionalArgs = []) - * @method PromiseInterface getTlsRouteAsync(GetTlsRouteRequest $request, array $optionalArgs = []) - * @method PromiseInterface listEndpointPoliciesAsync(ListEndpointPoliciesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listGatewaysAsync(ListGatewaysRequest $request, array $optionalArgs = []) - * @method PromiseInterface listGrpcRoutesAsync(ListGrpcRoutesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listHttpRoutesAsync(ListHttpRoutesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listMeshesAsync(ListMeshesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listServiceBindingsAsync(ListServiceBindingsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listTcpRoutesAsync(ListTcpRoutesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listTlsRoutesAsync(ListTlsRoutesRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateEndpointPolicyAsync(UpdateEndpointPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateGatewayAsync(UpdateGatewayRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateGrpcRouteAsync(UpdateGrpcRouteRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateHttpRouteAsync(UpdateHttpRouteRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateMeshAsync(UpdateMeshRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateTcpRouteAsync(UpdateTcpRouteRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateTlsRouteAsync(UpdateTlsRouteRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) - * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) - */ -final class NetworkServicesClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.networkservices.v1.NetworkServices'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'networkservices.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'networkservices.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/network_services_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/network_services_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/network_services_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/network_services_rest_client_config.php', - ], - ], - ]; - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Create the default operation client for the service. - * - * @param array $options ClientOptions for the client. - * - * @return OperationsClient - */ - private function createOperationsClient(array $options) - { - // Unset client-specific configuration options - unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); - - if (isset($options['operationsClient'])) { - return $options['operationsClient']; - } - - return new OperationsClient($options); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * authorization_policy resource. - * - * @param string $project - * @param string $location - * @param string $authorizationPolicy - * - * @return string The formatted authorization_policy resource. - */ - public static function authorizationPolicyName(string $project, string $location, string $authorizationPolicy): string - { - return self::getPathTemplate('authorizationPolicy')->render([ - 'project' => $project, - 'location' => $location, - 'authorization_policy' => $authorizationPolicy, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * backend_service resource. - * - * @param string $project - * @param string $location - * @param string $backendService - * - * @return string The formatted backend_service resource. - */ - public static function backendServiceName(string $project, string $location, string $backendService): string - { - return self::getPathTemplate('backendService')->render([ - 'project' => $project, - 'location' => $location, - 'backend_service' => $backendService, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * client_tls_policy resource. - * - * @param string $project - * @param string $location - * @param string $clientTlsPolicy - * - * @return string The formatted client_tls_policy resource. - */ - public static function clientTlsPolicyName(string $project, string $location, string $clientTlsPolicy): string - { - return self::getPathTemplate('clientTlsPolicy')->render([ - 'project' => $project, - 'location' => $location, - 'client_tls_policy' => $clientTlsPolicy, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * endpoint_policy resource. - * - * @param string $project - * @param string $location - * @param string $endpointPolicy - * - * @return string The formatted endpoint_policy resource. - */ - public static function endpointPolicyName(string $project, string $location, string $endpointPolicy): string - { - return self::getPathTemplate('endpointPolicy')->render([ - 'project' => $project, - 'location' => $location, - 'endpoint_policy' => $endpointPolicy, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a gateway - * resource. - * - * @param string $project - * @param string $location - * @param string $gateway - * - * @return string The formatted gateway resource. - */ - public static function gatewayName(string $project, string $location, string $gateway): string - { - return self::getPathTemplate('gateway')->render([ - 'project' => $project, - 'location' => $location, - 'gateway' => $gateway, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a grpc_route - * resource. - * - * @param string $project - * @param string $location - * @param string $grpcRoute - * - * @return string The formatted grpc_route resource. - */ - public static function grpcRouteName(string $project, string $location, string $grpcRoute): string - { - return self::getPathTemplate('grpcRoute')->render([ - 'project' => $project, - 'location' => $location, - 'grpc_route' => $grpcRoute, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a http_route - * resource. - * - * @param string $project - * @param string $location - * @param string $httpRoute - * - * @return string The formatted http_route resource. - */ - public static function httpRouteName(string $project, string $location, string $httpRoute): string - { - return self::getPathTemplate('httpRoute')->render([ - 'project' => $project, - 'location' => $location, - 'http_route' => $httpRoute, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a location - * resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted location resource. - */ - public static function locationName(string $project, string $location): string - { - return self::getPathTemplate('location')->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a mesh - * resource. - * - * @param string $project - * @param string $location - * @param string $mesh - * - * @return string The formatted mesh resource. - */ - public static function meshName(string $project, string $location, string $mesh): string - { - return self::getPathTemplate('mesh')->render([ - 'project' => $project, - 'location' => $location, - 'mesh' => $mesh, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * server_tls_policy resource. - * - * @param string $project - * @param string $location - * @param string $serverTlsPolicy - * - * @return string The formatted server_tls_policy resource. - */ - public static function serverTlsPolicyName(string $project, string $location, string $serverTlsPolicy): string - { - return self::getPathTemplate('serverTlsPolicy')->render([ - 'project' => $project, - 'location' => $location, - 'server_tls_policy' => $serverTlsPolicy, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * service_binding resource. - * - * @param string $project - * @param string $location - * @param string $serviceBinding - * - * @return string The formatted service_binding resource. - */ - public static function serviceBindingName(string $project, string $location, string $serviceBinding): string - { - return self::getPathTemplate('serviceBinding')->render([ - 'project' => $project, - 'location' => $location, - 'service_binding' => $serviceBinding, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a tcp_route - * resource. - * - * @param string $project - * @param string $location - * @param string $tcpRoute - * - * @return string The formatted tcp_route resource. - */ - public static function tcpRouteName(string $project, string $location, string $tcpRoute): string - { - return self::getPathTemplate('tcpRoute')->render([ - 'project' => $project, - 'location' => $location, - 'tcp_route' => $tcpRoute, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a tls_route - * resource. - * - * @param string $project - * @param string $location - * @param string $tlsRoute - * - * @return string The formatted tls_route resource. - */ - public static function tlsRouteName(string $project, string $location, string $tlsRoute): string - { - return self::getPathTemplate('tlsRoute')->render([ - 'project' => $project, - 'location' => $location, - 'tls_route' => $tlsRoute, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - authorizationPolicy: projects/{project}/locations/{location}/authorizationPolicies/{authorization_policy} - * - backendService: projects/{project}/locations/{location}/backendServices/{backend_service} - * - clientTlsPolicy: projects/{project}/locations/{location}/clientTlsPolicies/{client_tls_policy} - * - endpointPolicy: projects/{project}/locations/{location}/endpointPolicies/{endpoint_policy} - * - gateway: projects/{project}/locations/{location}/gateways/{gateway} - * - grpcRoute: projects/{project}/locations/{location}/grpcRoutes/{grpc_route} - * - httpRoute: projects/{project}/locations/{location}/httpRoutes/{http_route} - * - location: projects/{project}/locations/{location} - * - mesh: projects/{project}/locations/{location}/meshes/{mesh} - * - serverTlsPolicy: projects/{project}/locations/{location}/serverTlsPolicies/{server_tls_policy} - * - serviceBinding: projects/{project}/locations/{location}/serviceBindings/{service_binding} - * - tcpRoute: projects/{project}/locations/{location}/tcpRoutes/{tcp_route} - * - tlsRoute: projects/{project}/locations/{location}/tlsRoutes/{tls_route} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param ?string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, ?string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'networkservices.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Creates a new EndpointPolicy in a given project and location. - * - * The async variant is {@see NetworkServicesClient::createEndpointPolicyAsync()} . - * - * @example samples/V1/NetworkServicesClient/create_endpoint_policy.php - * - * @param CreateEndpointPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createEndpointPolicy(CreateEndpointPolicyRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateEndpointPolicy', $request, $callOptions)->wait(); - } - - /** - * Creates a new Gateway in a given project and location. - * - * The async variant is {@see NetworkServicesClient::createGatewayAsync()} . - * - * @example samples/V1/NetworkServicesClient/create_gateway.php - * - * @param CreateGatewayRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createGateway(CreateGatewayRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateGateway', $request, $callOptions)->wait(); - } - - /** - * Creates a new GrpcRoute in a given project and location. - * - * The async variant is {@see NetworkServicesClient::createGrpcRouteAsync()} . - * - * @example samples/V1/NetworkServicesClient/create_grpc_route.php - * - * @param CreateGrpcRouteRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createGrpcRoute(CreateGrpcRouteRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateGrpcRoute', $request, $callOptions)->wait(); - } - - /** - * Creates a new HttpRoute in a given project and location. - * - * The async variant is {@see NetworkServicesClient::createHttpRouteAsync()} . - * - * @example samples/V1/NetworkServicesClient/create_http_route.php - * - * @param CreateHttpRouteRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createHttpRoute(CreateHttpRouteRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateHttpRoute', $request, $callOptions)->wait(); - } - - /** - * Creates a new Mesh in a given project and location. - * - * The async variant is {@see NetworkServicesClient::createMeshAsync()} . - * - * @example samples/V1/NetworkServicesClient/create_mesh.php - * - * @param CreateMeshRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createMesh(CreateMeshRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateMesh', $request, $callOptions)->wait(); - } - - /** - * Creates a new ServiceBinding in a given project and location. - * - * The async variant is {@see NetworkServicesClient::createServiceBindingAsync()} . - * - * @example samples/V1/NetworkServicesClient/create_service_binding.php - * - * @param CreateServiceBindingRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createServiceBinding(CreateServiceBindingRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateServiceBinding', $request, $callOptions)->wait(); - } - - /** - * Creates a new TcpRoute in a given project and location. - * - * The async variant is {@see NetworkServicesClient::createTcpRouteAsync()} . - * - * @example samples/V1/NetworkServicesClient/create_tcp_route.php - * - * @param CreateTcpRouteRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createTcpRoute(CreateTcpRouteRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateTcpRoute', $request, $callOptions)->wait(); - } - - /** - * Creates a new TlsRoute in a given project and location. - * - * The async variant is {@see NetworkServicesClient::createTlsRouteAsync()} . - * - * @example samples/V1/NetworkServicesClient/create_tls_route.php - * - * @param CreateTlsRouteRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createTlsRoute(CreateTlsRouteRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateTlsRoute', $request, $callOptions)->wait(); - } - - /** - * Deletes a single EndpointPolicy. - * - * The async variant is {@see NetworkServicesClient::deleteEndpointPolicyAsync()} . - * - * @example samples/V1/NetworkServicesClient/delete_endpoint_policy.php - * - * @param DeleteEndpointPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteEndpointPolicy(DeleteEndpointPolicyRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteEndpointPolicy', $request, $callOptions)->wait(); - } - - /** - * Deletes a single Gateway. - * - * The async variant is {@see NetworkServicesClient::deleteGatewayAsync()} . - * - * @example samples/V1/NetworkServicesClient/delete_gateway.php - * - * @param DeleteGatewayRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteGateway(DeleteGatewayRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteGateway', $request, $callOptions)->wait(); - } - - /** - * Deletes a single GrpcRoute. - * - * The async variant is {@see NetworkServicesClient::deleteGrpcRouteAsync()} . - * - * @example samples/V1/NetworkServicesClient/delete_grpc_route.php - * - * @param DeleteGrpcRouteRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteGrpcRoute(DeleteGrpcRouteRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteGrpcRoute', $request, $callOptions)->wait(); - } - - /** - * Deletes a single HttpRoute. - * - * The async variant is {@see NetworkServicesClient::deleteHttpRouteAsync()} . - * - * @example samples/V1/NetworkServicesClient/delete_http_route.php - * - * @param DeleteHttpRouteRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteHttpRoute(DeleteHttpRouteRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteHttpRoute', $request, $callOptions)->wait(); - } - - /** - * Deletes a single Mesh. - * - * The async variant is {@see NetworkServicesClient::deleteMeshAsync()} . - * - * @example samples/V1/NetworkServicesClient/delete_mesh.php - * - * @param DeleteMeshRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteMesh(DeleteMeshRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteMesh', $request, $callOptions)->wait(); - } - - /** - * Deletes a single ServiceBinding. - * - * The async variant is {@see NetworkServicesClient::deleteServiceBindingAsync()} . - * - * @example samples/V1/NetworkServicesClient/delete_service_binding.php - * - * @param DeleteServiceBindingRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteServiceBinding(DeleteServiceBindingRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteServiceBinding', $request, $callOptions)->wait(); - } - - /** - * Deletes a single TcpRoute. - * - * The async variant is {@see NetworkServicesClient::deleteTcpRouteAsync()} . - * - * @example samples/V1/NetworkServicesClient/delete_tcp_route.php - * - * @param DeleteTcpRouteRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteTcpRoute(DeleteTcpRouteRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteTcpRoute', $request, $callOptions)->wait(); - } - - /** - * Deletes a single TlsRoute. - * - * The async variant is {@see NetworkServicesClient::deleteTlsRouteAsync()} . - * - * @example samples/V1/NetworkServicesClient/delete_tls_route.php - * - * @param DeleteTlsRouteRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteTlsRoute(DeleteTlsRouteRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteTlsRoute', $request, $callOptions)->wait(); - } - - /** - * Gets details of a single EndpointPolicy. - * - * The async variant is {@see NetworkServicesClient::getEndpointPolicyAsync()} . - * - * @example samples/V1/NetworkServicesClient/get_endpoint_policy.php - * - * @param GetEndpointPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return EndpointPolicy - * - * @throws ApiException Thrown if the API call fails. - */ - public function getEndpointPolicy(GetEndpointPolicyRequest $request, array $callOptions = []): EndpointPolicy - { - return $this->startApiCall('GetEndpointPolicy', $request, $callOptions)->wait(); - } - - /** - * Gets details of a single Gateway. - * - * The async variant is {@see NetworkServicesClient::getGatewayAsync()} . - * - * @example samples/V1/NetworkServicesClient/get_gateway.php - * - * @param GetGatewayRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Gateway - * - * @throws ApiException Thrown if the API call fails. - */ - public function getGateway(GetGatewayRequest $request, array $callOptions = []): Gateway - { - return $this->startApiCall('GetGateway', $request, $callOptions)->wait(); - } - - /** - * Gets details of a single GrpcRoute. - * - * The async variant is {@see NetworkServicesClient::getGrpcRouteAsync()} . - * - * @example samples/V1/NetworkServicesClient/get_grpc_route.php - * - * @param GetGrpcRouteRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return GrpcRoute - * - * @throws ApiException Thrown if the API call fails. - */ - public function getGrpcRoute(GetGrpcRouteRequest $request, array $callOptions = []): GrpcRoute - { - return $this->startApiCall('GetGrpcRoute', $request, $callOptions)->wait(); - } - - /** - * Gets details of a single HttpRoute. - * - * The async variant is {@see NetworkServicesClient::getHttpRouteAsync()} . - * - * @example samples/V1/NetworkServicesClient/get_http_route.php - * - * @param GetHttpRouteRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return HttpRoute - * - * @throws ApiException Thrown if the API call fails. - */ - public function getHttpRoute(GetHttpRouteRequest $request, array $callOptions = []): HttpRoute - { - return $this->startApiCall('GetHttpRoute', $request, $callOptions)->wait(); - } - - /** - * Gets details of a single Mesh. - * - * The async variant is {@see NetworkServicesClient::getMeshAsync()} . - * - * @example samples/V1/NetworkServicesClient/get_mesh.php - * - * @param GetMeshRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Mesh - * - * @throws ApiException Thrown if the API call fails. - */ - public function getMesh(GetMeshRequest $request, array $callOptions = []): Mesh - { - return $this->startApiCall('GetMesh', $request, $callOptions)->wait(); - } - - /** - * Gets details of a single ServiceBinding. - * - * The async variant is {@see NetworkServicesClient::getServiceBindingAsync()} . - * - * @example samples/V1/NetworkServicesClient/get_service_binding.php - * - * @param GetServiceBindingRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return ServiceBinding - * - * @throws ApiException Thrown if the API call fails. - */ - public function getServiceBinding(GetServiceBindingRequest $request, array $callOptions = []): ServiceBinding - { - return $this->startApiCall('GetServiceBinding', $request, $callOptions)->wait(); - } - - /** - * Gets details of a single TcpRoute. - * - * The async variant is {@see NetworkServicesClient::getTcpRouteAsync()} . - * - * @example samples/V1/NetworkServicesClient/get_tcp_route.php - * - * @param GetTcpRouteRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return TcpRoute - * - * @throws ApiException Thrown if the API call fails. - */ - public function getTcpRoute(GetTcpRouteRequest $request, array $callOptions = []): TcpRoute - { - return $this->startApiCall('GetTcpRoute', $request, $callOptions)->wait(); - } - - /** - * Gets details of a single TlsRoute. - * - * The async variant is {@see NetworkServicesClient::getTlsRouteAsync()} . - * - * @example samples/V1/NetworkServicesClient/get_tls_route.php - * - * @param GetTlsRouteRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return TlsRoute - * - * @throws ApiException Thrown if the API call fails. - */ - public function getTlsRoute(GetTlsRouteRequest $request, array $callOptions = []): TlsRoute - { - return $this->startApiCall('GetTlsRoute', $request, $callOptions)->wait(); - } - - /** - * Lists EndpointPolicies in a given project and location. - * - * The async variant is {@see NetworkServicesClient::listEndpointPoliciesAsync()} . - * - * @example samples/V1/NetworkServicesClient/list_endpoint_policies.php - * - * @param ListEndpointPoliciesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listEndpointPolicies(ListEndpointPoliciesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListEndpointPolicies', $request, $callOptions); - } - - /** - * Lists Gateways in a given project and location. - * - * The async variant is {@see NetworkServicesClient::listGatewaysAsync()} . - * - * @example samples/V1/NetworkServicesClient/list_gateways.php - * - * @param ListGatewaysRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listGateways(ListGatewaysRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListGateways', $request, $callOptions); - } - - /** - * Lists GrpcRoutes in a given project and location. - * - * The async variant is {@see NetworkServicesClient::listGrpcRoutesAsync()} . - * - * @example samples/V1/NetworkServicesClient/list_grpc_routes.php - * - * @param ListGrpcRoutesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listGrpcRoutes(ListGrpcRoutesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListGrpcRoutes', $request, $callOptions); - } - - /** - * Lists HttpRoute in a given project and location. - * - * The async variant is {@see NetworkServicesClient::listHttpRoutesAsync()} . - * - * @example samples/V1/NetworkServicesClient/list_http_routes.php - * - * @param ListHttpRoutesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listHttpRoutes(ListHttpRoutesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListHttpRoutes', $request, $callOptions); - } - - /** - * Lists Meshes in a given project and location. - * - * The async variant is {@see NetworkServicesClient::listMeshesAsync()} . - * - * @example samples/V1/NetworkServicesClient/list_meshes.php - * - * @param ListMeshesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listMeshes(ListMeshesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListMeshes', $request, $callOptions); - } - - /** - * Lists ServiceBinding in a given project and location. - * - * The async variant is {@see NetworkServicesClient::listServiceBindingsAsync()} . - * - * @example samples/V1/NetworkServicesClient/list_service_bindings.php - * - * @param ListServiceBindingsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listServiceBindings(ListServiceBindingsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListServiceBindings', $request, $callOptions); - } - - /** - * Lists TcpRoute in a given project and location. - * - * The async variant is {@see NetworkServicesClient::listTcpRoutesAsync()} . - * - * @example samples/V1/NetworkServicesClient/list_tcp_routes.php - * - * @param ListTcpRoutesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listTcpRoutes(ListTcpRoutesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListTcpRoutes', $request, $callOptions); - } - - /** - * Lists TlsRoute in a given project and location. - * - * The async variant is {@see NetworkServicesClient::listTlsRoutesAsync()} . - * - * @example samples/V1/NetworkServicesClient/list_tls_routes.php - * - * @param ListTlsRoutesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listTlsRoutes(ListTlsRoutesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListTlsRoutes', $request, $callOptions); - } - - /** - * Updates the parameters of a single EndpointPolicy. - * - * The async variant is {@see NetworkServicesClient::updateEndpointPolicyAsync()} . - * - * @example samples/V1/NetworkServicesClient/update_endpoint_policy.php - * - * @param UpdateEndpointPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateEndpointPolicy(UpdateEndpointPolicyRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateEndpointPolicy', $request, $callOptions)->wait(); - } - - /** - * Updates the parameters of a single Gateway. - * - * The async variant is {@see NetworkServicesClient::updateGatewayAsync()} . - * - * @example samples/V1/NetworkServicesClient/update_gateway.php - * - * @param UpdateGatewayRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateGateway(UpdateGatewayRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateGateway', $request, $callOptions)->wait(); - } - - /** - * Updates the parameters of a single GrpcRoute. - * - * The async variant is {@see NetworkServicesClient::updateGrpcRouteAsync()} . - * - * @example samples/V1/NetworkServicesClient/update_grpc_route.php - * - * @param UpdateGrpcRouteRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateGrpcRoute(UpdateGrpcRouteRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateGrpcRoute', $request, $callOptions)->wait(); - } - - /** - * Updates the parameters of a single HttpRoute. - * - * The async variant is {@see NetworkServicesClient::updateHttpRouteAsync()} . - * - * @example samples/V1/NetworkServicesClient/update_http_route.php - * - * @param UpdateHttpRouteRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateHttpRoute(UpdateHttpRouteRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateHttpRoute', $request, $callOptions)->wait(); - } - - /** - * Updates the parameters of a single Mesh. - * - * The async variant is {@see NetworkServicesClient::updateMeshAsync()} . - * - * @example samples/V1/NetworkServicesClient/update_mesh.php - * - * @param UpdateMeshRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateMesh(UpdateMeshRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateMesh', $request, $callOptions)->wait(); - } - - /** - * Updates the parameters of a single TcpRoute. - * - * The async variant is {@see NetworkServicesClient::updateTcpRouteAsync()} . - * - * @example samples/V1/NetworkServicesClient/update_tcp_route.php - * - * @param UpdateTcpRouteRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateTcpRoute(UpdateTcpRouteRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateTcpRoute', $request, $callOptions)->wait(); - } - - /** - * Updates the parameters of a single TlsRoute. - * - * The async variant is {@see NetworkServicesClient::updateTlsRouteAsync()} . - * - * @example samples/V1/NetworkServicesClient/update_tls_route.php - * - * @param UpdateTlsRouteRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateTlsRoute(UpdateTlsRouteRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateTlsRoute', $request, $callOptions)->wait(); - } - - /** - * Gets information about a location. - * - * The async variant is {@see NetworkServicesClient::getLocationAsync()} . - * - * @example samples/V1/NetworkServicesClient/get_location.php - * - * @param GetLocationRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Location - * - * @throws ApiException Thrown if the API call fails. - */ - public function getLocation(GetLocationRequest $request, array $callOptions = []): Location - { - return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * The async variant is {@see NetworkServicesClient::listLocationsAsync()} . - * - * @example samples/V1/NetworkServicesClient/list_locations.php - * - * @param ListLocationsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListLocations', $request, $callOptions); - } - - /** - * Gets the access control policy for a resource. Returns an empty policy - if the resource exists and does not have a policy set. - * - * The async variant is {@see NetworkServicesClient::getIamPolicyAsync()} . - * - * @example samples/V1/NetworkServicesClient/get_iam_policy.php - * - * @param GetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * Sets the access control policy on the specified resource. Replaces - any existing policy. - - Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` - errors. - * - * The async variant is {@see NetworkServicesClient::setIamPolicyAsync()} . - * - * @example samples/V1/NetworkServicesClient/set_iam_policy.php - * - * @param SetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * Returns permissions that a caller has on the specified resource. If the - resource does not exist, this will return an empty set of - permissions, not a `NOT_FOUND` error. - - Note: This operation is designed to be used for building - permission-aware UIs and command-line tools, not for authorization - checking. This operation may "fail open" without warning. - * - * The async variant is {@see NetworkServicesClient::testIamPermissionsAsync()} . - * - * @example samples/V1/NetworkServicesClient/test_iam_permissions.php - * - * @param TestIamPermissionsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return TestIamPermissionsResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse - { - return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/NetworkServices/v1/src/V1/gapic_metadata.json b/owl-bot-staging/NetworkServices/v1/src/V1/gapic_metadata.json deleted file mode 100644 index 6242fe95cd6a..000000000000 --- a/owl-bot-staging/NetworkServices/v1/src/V1/gapic_metadata.json +++ /dev/null @@ -1,322 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.networkservices.v1", - "libraryPackage": "Google\\Cloud\\NetworkServices\\V1", - "services": { - "DepService": { - "clients": { - "grpc": { - "libraryClient": "DepServiceGapicClient", - "rpcs": { - "CreateLbRouteExtension": { - "methods": [ - "createLbRouteExtension" - ] - }, - "CreateLbTrafficExtension": { - "methods": [ - "createLbTrafficExtension" - ] - }, - "DeleteLbRouteExtension": { - "methods": [ - "deleteLbRouteExtension" - ] - }, - "DeleteLbTrafficExtension": { - "methods": [ - "deleteLbTrafficExtension" - ] - }, - "GetLbRouteExtension": { - "methods": [ - "getLbRouteExtension" - ] - }, - "GetLbTrafficExtension": { - "methods": [ - "getLbTrafficExtension" - ] - }, - "ListLbRouteExtensions": { - "methods": [ - "listLbRouteExtensions" - ] - }, - "ListLbTrafficExtensions": { - "methods": [ - "listLbTrafficExtensions" - ] - }, - "UpdateLbRouteExtension": { - "methods": [ - "updateLbRouteExtension" - ] - }, - "UpdateLbTrafficExtension": { - "methods": [ - "updateLbTrafficExtension" - ] - }, - "GetLocation": { - "methods": [ - "getLocation" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - }, - "GetIamPolicy": { - "methods": [ - "getIamPolicy" - ] - }, - "SetIamPolicy": { - "methods": [ - "setIamPolicy" - ] - }, - "TestIamPermissions": { - "methods": [ - "testIamPermissions" - ] - } - } - } - } - }, - "NetworkServices": { - "clients": { - "grpc": { - "libraryClient": "NetworkServicesGapicClient", - "rpcs": { - "CreateEndpointPolicy": { - "methods": [ - "createEndpointPolicy" - ] - }, - "CreateGateway": { - "methods": [ - "createGateway" - ] - }, - "CreateGrpcRoute": { - "methods": [ - "createGrpcRoute" - ] - }, - "CreateHttpRoute": { - "methods": [ - "createHttpRoute" - ] - }, - "CreateMesh": { - "methods": [ - "createMesh" - ] - }, - "CreateServiceBinding": { - "methods": [ - "createServiceBinding" - ] - }, - "CreateTcpRoute": { - "methods": [ - "createTcpRoute" - ] - }, - "CreateTlsRoute": { - "methods": [ - "createTlsRoute" - ] - }, - "DeleteEndpointPolicy": { - "methods": [ - "deleteEndpointPolicy" - ] - }, - "DeleteGateway": { - "methods": [ - "deleteGateway" - ] - }, - "DeleteGrpcRoute": { - "methods": [ - "deleteGrpcRoute" - ] - }, - "DeleteHttpRoute": { - "methods": [ - "deleteHttpRoute" - ] - }, - "DeleteMesh": { - "methods": [ - "deleteMesh" - ] - }, - "DeleteServiceBinding": { - "methods": [ - "deleteServiceBinding" - ] - }, - "DeleteTcpRoute": { - "methods": [ - "deleteTcpRoute" - ] - }, - "DeleteTlsRoute": { - "methods": [ - "deleteTlsRoute" - ] - }, - "GetEndpointPolicy": { - "methods": [ - "getEndpointPolicy" - ] - }, - "GetGateway": { - "methods": [ - "getGateway" - ] - }, - "GetGrpcRoute": { - "methods": [ - "getGrpcRoute" - ] - }, - "GetHttpRoute": { - "methods": [ - "getHttpRoute" - ] - }, - "GetMesh": { - "methods": [ - "getMesh" - ] - }, - "GetServiceBinding": { - "methods": [ - "getServiceBinding" - ] - }, - "GetTcpRoute": { - "methods": [ - "getTcpRoute" - ] - }, - "GetTlsRoute": { - "methods": [ - "getTlsRoute" - ] - }, - "ListEndpointPolicies": { - "methods": [ - "listEndpointPolicies" - ] - }, - "ListGateways": { - "methods": [ - "listGateways" - ] - }, - "ListGrpcRoutes": { - "methods": [ - "listGrpcRoutes" - ] - }, - "ListHttpRoutes": { - "methods": [ - "listHttpRoutes" - ] - }, - "ListMeshes": { - "methods": [ - "listMeshes" - ] - }, - "ListServiceBindings": { - "methods": [ - "listServiceBindings" - ] - }, - "ListTcpRoutes": { - "methods": [ - "listTcpRoutes" - ] - }, - "ListTlsRoutes": { - "methods": [ - "listTlsRoutes" - ] - }, - "UpdateEndpointPolicy": { - "methods": [ - "updateEndpointPolicy" - ] - }, - "UpdateGateway": { - "methods": [ - "updateGateway" - ] - }, - "UpdateGrpcRoute": { - "methods": [ - "updateGrpcRoute" - ] - }, - "UpdateHttpRoute": { - "methods": [ - "updateHttpRoute" - ] - }, - "UpdateMesh": { - "methods": [ - "updateMesh" - ] - }, - "UpdateTcpRoute": { - "methods": [ - "updateTcpRoute" - ] - }, - "UpdateTlsRoute": { - "methods": [ - "updateTlsRoute" - ] - }, - "GetLocation": { - "methods": [ - "getLocation" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - }, - "GetIamPolicy": { - "methods": [ - "getIamPolicy" - ] - }, - "SetIamPolicy": { - "methods": [ - "setIamPolicy" - ] - }, - "TestIamPermissions": { - "methods": [ - "testIamPermissions" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/NetworkServices/v1/src/V1/resources/dep_service_client_config.json b/owl-bot-staging/NetworkServices/v1/src/V1/resources/dep_service_client_config.json deleted file mode 100644 index dad488e147d4..000000000000 --- a/owl-bot-staging/NetworkServices/v1/src/V1/resources/dep_service_client_config.json +++ /dev/null @@ -1,107 +0,0 @@ -{ - "interfaces": { - "google.cloud.networkservices.v1.DepService": { - "retry_codes": { - "no_retry_codes": [], - "no_retry_1_codes": [] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "no_retry_1_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": { - "CreateLbRouteExtension": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateLbTrafficExtension": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteLbRouteExtension": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteLbTrafficExtension": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetLbRouteExtension": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetLbTrafficExtension": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListLbRouteExtensions": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListLbTrafficExtensions": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateLbRouteExtension": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateLbTrafficExtension": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetLocation": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListLocations": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "SetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "TestIamPermissions": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/NetworkServices/v1/src/V1/resources/dep_service_descriptor_config.php b/owl-bot-staging/NetworkServices/v1/src/V1/resources/dep_service_descriptor_config.php deleted file mode 100644 index 41dbb1f04eb9..000000000000 --- a/owl-bot-staging/NetworkServices/v1/src/V1/resources/dep_service_descriptor_config.php +++ /dev/null @@ -1,286 +0,0 @@ - [ - 'google.cloud.networkservices.v1.DepService' => [ - 'CreateLbRouteExtension' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\NetworkServices\V1\LbRouteExtension', - 'metadataReturnType' => '\Google\Cloud\NetworkServices\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateLbTrafficExtension' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\NetworkServices\V1\LbTrafficExtension', - 'metadataReturnType' => '\Google\Cloud\NetworkServices\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteLbRouteExtension' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\NetworkServices\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteLbTrafficExtension' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\NetworkServices\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateLbRouteExtension' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\NetworkServices\V1\LbRouteExtension', - 'metadataReturnType' => '\Google\Cloud\NetworkServices\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'lb_route_extension.name', - 'fieldAccessors' => [ - 'getLbRouteExtension', - 'getName', - ], - ], - ], - ], - 'UpdateLbTrafficExtension' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\NetworkServices\V1\LbTrafficExtension', - 'metadataReturnType' => '\Google\Cloud\NetworkServices\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'lb_traffic_extension.name', - 'fieldAccessors' => [ - 'getLbTrafficExtension', - 'getName', - ], - ], - ], - ], - 'GetLbRouteExtension' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\NetworkServices\V1\LbRouteExtension', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetLbTrafficExtension' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\NetworkServices\V1\LbTrafficExtension', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListLbRouteExtensions' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLbRouteExtensions', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\NetworkServices\V1\ListLbRouteExtensionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListLbTrafficExtensions' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLbTrafficExtensions', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\NetworkServices\V1\ListLbTrafficExtensionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'GetLocation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Location\Location', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'ListLocations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLocations', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'GetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'SetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'TestIamPermissions' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'templateMap' => [ - 'lbRouteExtension' => 'projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}', - 'lbTrafficExtension' => 'projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}', - 'location' => 'projects/{project}/locations/{location}', - ], - ], - ], -]; diff --git a/owl-bot-staging/NetworkServices/v1/src/V1/resources/dep_service_rest_client_config.php b/owl-bot-staging/NetworkServices/v1/src/V1/resources/dep_service_rest_client_config.php deleted file mode 100644 index 00779b775bb0..000000000000 --- a/owl-bot-staging/NetworkServices/v1/src/V1/resources/dep_service_rest_client_config.php +++ /dev/null @@ -1,349 +0,0 @@ - [ - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.cloud.networkservices.v1.DepService' => [ - 'CreateLbRouteExtension' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/lbRouteExtensions', - 'body' => 'lb_route_extension', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'lb_route_extension_id', - ], - ], - 'CreateLbTrafficExtension' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/lbTrafficExtensions', - 'body' => 'lb_traffic_extension', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'lb_traffic_extension_id', - ], - ], - 'DeleteLbRouteExtension' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/lbRouteExtensions/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteLbTrafficExtension' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/lbTrafficExtensions/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetLbRouteExtension' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/lbRouteExtensions/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetLbTrafficExtension' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/lbTrafficExtensions/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLbRouteExtensions' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/lbRouteExtensions', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListLbTrafficExtensions' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/lbTrafficExtensions', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateLbRouteExtension' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{lb_route_extension.name=projects/*/locations/*/lbRouteExtensions/*}', - 'body' => 'lb_route_extension', - 'placeholders' => [ - 'lb_route_extension.name' => [ - 'getters' => [ - 'getLbRouteExtension', - 'getName', - ], - ], - ], - ], - 'UpdateLbTrafficExtension' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{lb_traffic_extension.name=projects/*/locations/*/lbTrafficExtensions/*}', - 'body' => 'lb_traffic_extension', - 'placeholders' => [ - 'lb_traffic_extension.name' => [ - 'getters' => [ - 'getLbTrafficExtension', - 'getName', - ], - ], - ], - ], - ], - 'google.iam.v1.IAMPolicy' => [ - 'GetIamPolicy' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/edgeCacheKeysets/*}:getIamPolicy', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/edgeCacheOrigins/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/edgeCacheServices/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/endpointPolicies/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/serviceBindings/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/meshes/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/gateways/*}:getIamPolicy', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/edgeCacheKeysets/*}:setIamPolicy', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/edgeCacheOrigins/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/edgeCacheServices/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/endpointPolicies/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/serviceBindings/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/meshes/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/gateways/*}:setIamPolicy', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/edgeCacheKeysets/*}:testIamPermissions', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/edgeCacheOrigins/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/edgeCacheServices/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/endpointPolicies/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/serviceBindings/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/meshes/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/gateways/*}:testIamPermissions', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/NetworkServices/v1/src/V1/resources/network_services_client_config.json b/owl-bot-staging/NetworkServices/v1/src/V1/resources/network_services_client_config.json deleted file mode 100644 index 39cf35750a4b..000000000000 --- a/owl-bot-staging/NetworkServices/v1/src/V1/resources/network_services_client_config.json +++ /dev/null @@ -1,252 +0,0 @@ -{ - "interfaces": { - "google.cloud.networkservices.v1.NetworkServices": { - "retry_codes": { - "no_retry_codes": [], - "no_retry_1_codes": [] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "no_retry_1_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": { - "CreateEndpointPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateGateway": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateGrpcRoute": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateHttpRoute": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateMesh": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateServiceBinding": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateTcpRoute": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateTlsRoute": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteEndpointPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteGateway": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteGrpcRoute": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteHttpRoute": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteMesh": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteServiceBinding": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteTcpRoute": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteTlsRoute": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetEndpointPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetGateway": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetGrpcRoute": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetHttpRoute": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetMesh": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetServiceBinding": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetTcpRoute": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetTlsRoute": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListEndpointPolicies": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListGateways": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListGrpcRoutes": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListHttpRoutes": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListMeshes": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListServiceBindings": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListTcpRoutes": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListTlsRoutes": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateEndpointPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateGateway": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateGrpcRoute": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateHttpRoute": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateMesh": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateTcpRoute": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateTlsRoute": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetLocation": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListLocations": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "SetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "TestIamPermissions": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/NetworkServices/v1/src/V1/resources/network_services_descriptor_config.php b/owl-bot-staging/NetworkServices/v1/src/V1/resources/network_services_descriptor_config.php deleted file mode 100644 index 809f6071f19b..000000000000 --- a/owl-bot-staging/NetworkServices/v1/src/V1/resources/network_services_descriptor_config.php +++ /dev/null @@ -1,816 +0,0 @@ - [ - 'google.cloud.networkservices.v1.NetworkServices' => [ - 'CreateEndpointPolicy' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\NetworkServices\V1\EndpointPolicy', - 'metadataReturnType' => '\Google\Cloud\NetworkServices\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateGateway' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\NetworkServices\V1\Gateway', - 'metadataReturnType' => '\Google\Cloud\NetworkServices\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateGrpcRoute' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\NetworkServices\V1\GrpcRoute', - 'metadataReturnType' => '\Google\Cloud\NetworkServices\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateHttpRoute' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\NetworkServices\V1\HttpRoute', - 'metadataReturnType' => '\Google\Cloud\NetworkServices\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateMesh' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\NetworkServices\V1\Mesh', - 'metadataReturnType' => '\Google\Cloud\NetworkServices\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateServiceBinding' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\NetworkServices\V1\ServiceBinding', - 'metadataReturnType' => '\Google\Cloud\NetworkServices\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateTcpRoute' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\NetworkServices\V1\TcpRoute', - 'metadataReturnType' => '\Google\Cloud\NetworkServices\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateTlsRoute' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\NetworkServices\V1\TlsRoute', - 'metadataReturnType' => '\Google\Cloud\NetworkServices\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteEndpointPolicy' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\NetworkServices\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteGateway' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\NetworkServices\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteGrpcRoute' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\NetworkServices\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteHttpRoute' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\NetworkServices\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteMesh' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\NetworkServices\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteServiceBinding' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\NetworkServices\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteTcpRoute' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\NetworkServices\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteTlsRoute' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\NetworkServices\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateEndpointPolicy' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\NetworkServices\V1\EndpointPolicy', - 'metadataReturnType' => '\Google\Cloud\NetworkServices\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'endpoint_policy.name', - 'fieldAccessors' => [ - 'getEndpointPolicy', - 'getName', - ], - ], - ], - ], - 'UpdateGateway' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\NetworkServices\V1\Gateway', - 'metadataReturnType' => '\Google\Cloud\NetworkServices\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'gateway.name', - 'fieldAccessors' => [ - 'getGateway', - 'getName', - ], - ], - ], - ], - 'UpdateGrpcRoute' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\NetworkServices\V1\GrpcRoute', - 'metadataReturnType' => '\Google\Cloud\NetworkServices\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'grpc_route.name', - 'fieldAccessors' => [ - 'getGrpcRoute', - 'getName', - ], - ], - ], - ], - 'UpdateHttpRoute' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\NetworkServices\V1\HttpRoute', - 'metadataReturnType' => '\Google\Cloud\NetworkServices\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'http_route.name', - 'fieldAccessors' => [ - 'getHttpRoute', - 'getName', - ], - ], - ], - ], - 'UpdateMesh' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\NetworkServices\V1\Mesh', - 'metadataReturnType' => '\Google\Cloud\NetworkServices\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'mesh.name', - 'fieldAccessors' => [ - 'getMesh', - 'getName', - ], - ], - ], - ], - 'UpdateTcpRoute' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\NetworkServices\V1\TcpRoute', - 'metadataReturnType' => '\Google\Cloud\NetworkServices\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'tcp_route.name', - 'fieldAccessors' => [ - 'getTcpRoute', - 'getName', - ], - ], - ], - ], - 'UpdateTlsRoute' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\NetworkServices\V1\TlsRoute', - 'metadataReturnType' => '\Google\Cloud\NetworkServices\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'tls_route.name', - 'fieldAccessors' => [ - 'getTlsRoute', - 'getName', - ], - ], - ], - ], - 'GetEndpointPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\NetworkServices\V1\EndpointPolicy', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetGateway' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\NetworkServices\V1\Gateway', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetGrpcRoute' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\NetworkServices\V1\GrpcRoute', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetHttpRoute' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\NetworkServices\V1\HttpRoute', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetMesh' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\NetworkServices\V1\Mesh', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetServiceBinding' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\NetworkServices\V1\ServiceBinding', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetTcpRoute' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\NetworkServices\V1\TcpRoute', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetTlsRoute' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\NetworkServices\V1\TlsRoute', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListEndpointPolicies' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getEndpointPolicies', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\NetworkServices\V1\ListEndpointPoliciesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListGateways' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getGateways', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\NetworkServices\V1\ListGatewaysResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListGrpcRoutes' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getGrpcRoutes', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\NetworkServices\V1\ListGrpcRoutesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListHttpRoutes' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getHttpRoutes', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\NetworkServices\V1\ListHttpRoutesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListMeshes' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getMeshes', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\NetworkServices\V1\ListMeshesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListServiceBindings' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getServiceBindings', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\NetworkServices\V1\ListServiceBindingsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListTcpRoutes' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getTcpRoutes', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\NetworkServices\V1\ListTcpRoutesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListTlsRoutes' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getTlsRoutes', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\NetworkServices\V1\ListTlsRoutesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'GetLocation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Location\Location', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'ListLocations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLocations', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'GetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'SetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'TestIamPermissions' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'templateMap' => [ - 'authorizationPolicy' => 'projects/{project}/locations/{location}/authorizationPolicies/{authorization_policy}', - 'backendService' => 'projects/{project}/locations/{location}/backendServices/{backend_service}', - 'clientTlsPolicy' => 'projects/{project}/locations/{location}/clientTlsPolicies/{client_tls_policy}', - 'endpointPolicy' => 'projects/{project}/locations/{location}/endpointPolicies/{endpoint_policy}', - 'gateway' => 'projects/{project}/locations/{location}/gateways/{gateway}', - 'grpcRoute' => 'projects/{project}/locations/{location}/grpcRoutes/{grpc_route}', - 'httpRoute' => 'projects/{project}/locations/{location}/httpRoutes/{http_route}', - 'location' => 'projects/{project}/locations/{location}', - 'mesh' => 'projects/{project}/locations/{location}/meshes/{mesh}', - 'serverTlsPolicy' => 'projects/{project}/locations/{location}/serverTlsPolicies/{server_tls_policy}', - 'serviceBinding' => 'projects/{project}/locations/{location}/serviceBindings/{service_binding}', - 'tcpRoute' => 'projects/{project}/locations/{location}/tcpRoutes/{tcp_route}', - 'tlsRoute' => 'projects/{project}/locations/{location}/tlsRoutes/{tls_route}', - ], - ], - ], -]; diff --git a/owl-bot-staging/NetworkServices/v1/src/V1/resources/network_services_rest_client_config.php b/owl-bot-staging/NetworkServices/v1/src/V1/resources/network_services_rest_client_config.php deleted file mode 100644 index ca9776abdda5..000000000000 --- a/owl-bot-staging/NetworkServices/v1/src/V1/resources/network_services_rest_client_config.php +++ /dev/null @@ -1,702 +0,0 @@ - [ - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.cloud.networkservices.v1.NetworkServices' => [ - 'CreateEndpointPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/endpointPolicies', - 'body' => 'endpoint_policy', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'endpoint_policy_id', - ], - ], - 'CreateGateway' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/gateways', - 'body' => 'gateway', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'gateway_id', - ], - ], - 'CreateGrpcRoute' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/grpcRoutes', - 'body' => 'grpc_route', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'grpc_route_id', - ], - ], - 'CreateHttpRoute' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/httpRoutes', - 'body' => 'http_route', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'http_route_id', - ], - ], - 'CreateMesh' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/meshes', - 'body' => 'mesh', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'mesh_id', - ], - ], - 'CreateServiceBinding' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/serviceBindings', - 'body' => 'service_binding', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'service_binding_id', - ], - ], - 'CreateTcpRoute' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/tcpRoutes', - 'body' => 'tcp_route', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'tcp_route_id', - ], - ], - 'CreateTlsRoute' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/tlsRoutes', - 'body' => 'tls_route', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'tls_route_id', - ], - ], - 'DeleteEndpointPolicy' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/endpointPolicies/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteGateway' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/gateways/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteGrpcRoute' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/grpcRoutes/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteHttpRoute' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/httpRoutes/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteMesh' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/meshes/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteServiceBinding' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/serviceBindings/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteTcpRoute' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/tcpRoutes/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteTlsRoute' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/tlsRoutes/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetEndpointPolicy' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/endpointPolicies/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetGateway' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/gateways/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetGrpcRoute' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/grpcRoutes/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetHttpRoute' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/httpRoutes/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetMesh' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/meshes/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetServiceBinding' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/serviceBindings/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetTcpRoute' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/tcpRoutes/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetTlsRoute' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/tlsRoutes/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListEndpointPolicies' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/endpointPolicies', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListGateways' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/gateways', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListGrpcRoutes' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/grpcRoutes', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListHttpRoutes' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/httpRoutes', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListMeshes' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/meshes', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListServiceBindings' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/serviceBindings', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListTcpRoutes' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/tcpRoutes', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListTlsRoutes' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/tlsRoutes', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateEndpointPolicy' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{endpoint_policy.name=projects/*/locations/*/endpointPolicies/*}', - 'body' => 'endpoint_policy', - 'placeholders' => [ - 'endpoint_policy.name' => [ - 'getters' => [ - 'getEndpointPolicy', - 'getName', - ], - ], - ], - ], - 'UpdateGateway' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{gateway.name=projects/*/locations/*/gateways/*}', - 'body' => 'gateway', - 'placeholders' => [ - 'gateway.name' => [ - 'getters' => [ - 'getGateway', - 'getName', - ], - ], - ], - ], - 'UpdateGrpcRoute' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{grpc_route.name=projects/*/locations/*/grpcRoutes/*}', - 'body' => 'grpc_route', - 'placeholders' => [ - 'grpc_route.name' => [ - 'getters' => [ - 'getGrpcRoute', - 'getName', - ], - ], - ], - ], - 'UpdateHttpRoute' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{http_route.name=projects/*/locations/*/httpRoutes/*}', - 'body' => 'http_route', - 'placeholders' => [ - 'http_route.name' => [ - 'getters' => [ - 'getHttpRoute', - 'getName', - ], - ], - ], - ], - 'UpdateMesh' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{mesh.name=projects/*/locations/*/meshes/*}', - 'body' => 'mesh', - 'placeholders' => [ - 'mesh.name' => [ - 'getters' => [ - 'getMesh', - 'getName', - ], - ], - ], - ], - 'UpdateTcpRoute' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{tcp_route.name=projects/*/locations/*/tcpRoutes/*}', - 'body' => 'tcp_route', - 'placeholders' => [ - 'tcp_route.name' => [ - 'getters' => [ - 'getTcpRoute', - 'getName', - ], - ], - ], - ], - 'UpdateTlsRoute' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{tls_route.name=projects/*/locations/*/tlsRoutes/*}', - 'body' => 'tls_route', - 'placeholders' => [ - 'tls_route.name' => [ - 'getters' => [ - 'getTlsRoute', - 'getName', - ], - ], - ], - ], - ], - 'google.iam.v1.IAMPolicy' => [ - 'GetIamPolicy' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/edgeCacheKeysets/*}:getIamPolicy', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/edgeCacheOrigins/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/edgeCacheServices/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/endpointPolicies/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/serviceBindings/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/meshes/*}:getIamPolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/gateways/*}:getIamPolicy', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/edgeCacheKeysets/*}:setIamPolicy', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/edgeCacheOrigins/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/edgeCacheServices/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/endpointPolicies/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/serviceBindings/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/meshes/*}:setIamPolicy', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/gateways/*}:setIamPolicy', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/edgeCacheKeysets/*}:testIamPermissions', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/edgeCacheOrigins/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/edgeCacheServices/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/endpointPolicies/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/serviceBindings/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/meshes/*}:testIamPermissions', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/gateways/*}:testIamPermissions', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/NetworkServices/v1/tests/Unit/V1/Client/DepServiceClientTest.php b/owl-bot-staging/NetworkServices/v1/tests/Unit/V1/Client/DepServiceClientTest.php deleted file mode 100644 index f695dae0e7b6..000000000000 --- a/owl-bot-staging/NetworkServices/v1/tests/Unit/V1/Client/DepServiceClientTest.php +++ /dev/null @@ -1,1609 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return DepServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new DepServiceClient($options); - } - - /** @test */ - public function createLbRouteExtensionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createLbRouteExtensionTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $expectedResponse = new LbRouteExtension(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createLbRouteExtensionTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $lbRouteExtensionId = 'lbRouteExtensionId1673910458'; - $lbRouteExtension = new LbRouteExtension(); - $lbRouteExtensionName = 'lbRouteExtensionName-498882633'; - $lbRouteExtension->setName($lbRouteExtensionName); - $lbRouteExtensionForwardingRules = []; - $lbRouteExtension->setForwardingRules($lbRouteExtensionForwardingRules); - $lbRouteExtensionExtensionChains = []; - $lbRouteExtension->setExtensionChains($lbRouteExtensionExtensionChains); - $lbRouteExtensionLoadBalancingScheme = LoadBalancingScheme::LOAD_BALANCING_SCHEME_UNSPECIFIED; - $lbRouteExtension->setLoadBalancingScheme($lbRouteExtensionLoadBalancingScheme); - $request = (new CreateLbRouteExtensionRequest()) - ->setParent($formattedParent) - ->setLbRouteExtensionId($lbRouteExtensionId) - ->setLbRouteExtension($lbRouteExtension); - $response = $gapicClient->createLbRouteExtension($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkservices.v1.DepService/CreateLbRouteExtension', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getLbRouteExtensionId(); - $this->assertProtobufEquals($lbRouteExtensionId, $actualValue); - $actualValue = $actualApiRequestObject->getLbRouteExtension(); - $this->assertProtobufEquals($lbRouteExtension, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createLbRouteExtensionTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createLbRouteExtensionExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createLbRouteExtensionTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $lbRouteExtensionId = 'lbRouteExtensionId1673910458'; - $lbRouteExtension = new LbRouteExtension(); - $lbRouteExtensionName = 'lbRouteExtensionName-498882633'; - $lbRouteExtension->setName($lbRouteExtensionName); - $lbRouteExtensionForwardingRules = []; - $lbRouteExtension->setForwardingRules($lbRouteExtensionForwardingRules); - $lbRouteExtensionExtensionChains = []; - $lbRouteExtension->setExtensionChains($lbRouteExtensionExtensionChains); - $lbRouteExtensionLoadBalancingScheme = LoadBalancingScheme::LOAD_BALANCING_SCHEME_UNSPECIFIED; - $lbRouteExtension->setLoadBalancingScheme($lbRouteExtensionLoadBalancingScheme); - $request = (new CreateLbRouteExtensionRequest()) - ->setParent($formattedParent) - ->setLbRouteExtensionId($lbRouteExtensionId) - ->setLbRouteExtension($lbRouteExtension); - $response = $gapicClient->createLbRouteExtension($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createLbRouteExtensionTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createLbTrafficExtensionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createLbTrafficExtensionTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $expectedResponse = new LbTrafficExtension(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createLbTrafficExtensionTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $lbTrafficExtensionId = 'lbTrafficExtensionId1573377862'; - $lbTrafficExtension = new LbTrafficExtension(); - $lbTrafficExtensionName = 'lbTrafficExtensionName1872015107'; - $lbTrafficExtension->setName($lbTrafficExtensionName); - $lbTrafficExtensionForwardingRules = []; - $lbTrafficExtension->setForwardingRules($lbTrafficExtensionForwardingRules); - $lbTrafficExtensionExtensionChains = []; - $lbTrafficExtension->setExtensionChains($lbTrafficExtensionExtensionChains); - $lbTrafficExtensionLoadBalancingScheme = LoadBalancingScheme::LOAD_BALANCING_SCHEME_UNSPECIFIED; - $lbTrafficExtension->setLoadBalancingScheme($lbTrafficExtensionLoadBalancingScheme); - $request = (new CreateLbTrafficExtensionRequest()) - ->setParent($formattedParent) - ->setLbTrafficExtensionId($lbTrafficExtensionId) - ->setLbTrafficExtension($lbTrafficExtension); - $response = $gapicClient->createLbTrafficExtension($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkservices.v1.DepService/CreateLbTrafficExtension', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getLbTrafficExtensionId(); - $this->assertProtobufEquals($lbTrafficExtensionId, $actualValue); - $actualValue = $actualApiRequestObject->getLbTrafficExtension(); - $this->assertProtobufEquals($lbTrafficExtension, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createLbTrafficExtensionTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createLbTrafficExtensionExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createLbTrafficExtensionTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $lbTrafficExtensionId = 'lbTrafficExtensionId1573377862'; - $lbTrafficExtension = new LbTrafficExtension(); - $lbTrafficExtensionName = 'lbTrafficExtensionName1872015107'; - $lbTrafficExtension->setName($lbTrafficExtensionName); - $lbTrafficExtensionForwardingRules = []; - $lbTrafficExtension->setForwardingRules($lbTrafficExtensionForwardingRules); - $lbTrafficExtensionExtensionChains = []; - $lbTrafficExtension->setExtensionChains($lbTrafficExtensionExtensionChains); - $lbTrafficExtensionLoadBalancingScheme = LoadBalancingScheme::LOAD_BALANCING_SCHEME_UNSPECIFIED; - $lbTrafficExtension->setLoadBalancingScheme($lbTrafficExtensionLoadBalancingScheme); - $request = (new CreateLbTrafficExtensionRequest()) - ->setParent($formattedParent) - ->setLbTrafficExtensionId($lbTrafficExtensionId) - ->setLbTrafficExtension($lbTrafficExtension); - $response = $gapicClient->createLbTrafficExtension($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createLbTrafficExtensionTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteLbRouteExtensionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteLbRouteExtensionTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteLbRouteExtensionTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->lbRouteExtensionName('[PROJECT]', '[LOCATION]', '[LB_ROUTE_EXTENSION]'); - $request = (new DeleteLbRouteExtensionRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteLbRouteExtension($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkservices.v1.DepService/DeleteLbRouteExtension', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteLbRouteExtensionTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteLbRouteExtensionExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteLbRouteExtensionTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->lbRouteExtensionName('[PROJECT]', '[LOCATION]', '[LB_ROUTE_EXTENSION]'); - $request = (new DeleteLbRouteExtensionRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteLbRouteExtension($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteLbRouteExtensionTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteLbTrafficExtensionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteLbTrafficExtensionTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteLbTrafficExtensionTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->lbTrafficExtensionName('[PROJECT]', '[LOCATION]', '[LB_TRAFFIC_EXTENSION]'); - $request = (new DeleteLbTrafficExtensionRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteLbTrafficExtension($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkservices.v1.DepService/DeleteLbTrafficExtension', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteLbTrafficExtensionTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteLbTrafficExtensionExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteLbTrafficExtensionTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->lbTrafficExtensionName('[PROJECT]', '[LOCATION]', '[LB_TRAFFIC_EXTENSION]'); - $request = (new DeleteLbTrafficExtensionRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteLbTrafficExtension($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteLbTrafficExtensionTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getLbRouteExtensionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $expectedResponse = new LbRouteExtension(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->lbRouteExtensionName('[PROJECT]', '[LOCATION]', '[LB_ROUTE_EXTENSION]'); - $request = (new GetLbRouteExtensionRequest()) - ->setName($formattedName); - $response = $gapicClient->getLbRouteExtension($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkservices.v1.DepService/GetLbRouteExtension', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLbRouteExtensionExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->lbRouteExtensionName('[PROJECT]', '[LOCATION]', '[LB_ROUTE_EXTENSION]'); - $request = (new GetLbRouteExtensionRequest()) - ->setName($formattedName); - try { - $gapicClient->getLbRouteExtension($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLbTrafficExtensionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $expectedResponse = new LbTrafficExtension(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->lbTrafficExtensionName('[PROJECT]', '[LOCATION]', '[LB_TRAFFIC_EXTENSION]'); - $request = (new GetLbTrafficExtensionRequest()) - ->setName($formattedName); - $response = $gapicClient->getLbTrafficExtension($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkservices.v1.DepService/GetLbTrafficExtension', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLbTrafficExtensionExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->lbTrafficExtensionName('[PROJECT]', '[LOCATION]', '[LB_TRAFFIC_EXTENSION]'); - $request = (new GetLbTrafficExtensionRequest()) - ->setName($formattedName); - try { - $gapicClient->getLbTrafficExtension($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLbRouteExtensionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $lbRouteExtensionsElement = new LbRouteExtension(); - $lbRouteExtensions = [ - $lbRouteExtensionsElement, - ]; - $expectedResponse = new ListLbRouteExtensionsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLbRouteExtensions($lbRouteExtensions); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListLbRouteExtensionsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listLbRouteExtensions($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLbRouteExtensions()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkservices.v1.DepService/ListLbRouteExtensions', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLbRouteExtensionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListLbRouteExtensionsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listLbRouteExtensions($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLbTrafficExtensionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $lbTrafficExtensionsElement = new LbTrafficExtension(); - $lbTrafficExtensions = [ - $lbTrafficExtensionsElement, - ]; - $expectedResponse = new ListLbTrafficExtensionsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLbTrafficExtensions($lbTrafficExtensions); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListLbTrafficExtensionsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listLbTrafficExtensions($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLbTrafficExtensions()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkservices.v1.DepService/ListLbTrafficExtensions', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLbTrafficExtensionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListLbTrafficExtensionsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listLbTrafficExtensions($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateLbRouteExtensionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateLbRouteExtensionTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $expectedResponse = new LbRouteExtension(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateLbRouteExtensionTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $lbRouteExtension = new LbRouteExtension(); - $lbRouteExtensionName = 'lbRouteExtensionName-498882633'; - $lbRouteExtension->setName($lbRouteExtensionName); - $lbRouteExtensionForwardingRules = []; - $lbRouteExtension->setForwardingRules($lbRouteExtensionForwardingRules); - $lbRouteExtensionExtensionChains = []; - $lbRouteExtension->setExtensionChains($lbRouteExtensionExtensionChains); - $lbRouteExtensionLoadBalancingScheme = LoadBalancingScheme::LOAD_BALANCING_SCHEME_UNSPECIFIED; - $lbRouteExtension->setLoadBalancingScheme($lbRouteExtensionLoadBalancingScheme); - $request = (new UpdateLbRouteExtensionRequest()) - ->setLbRouteExtension($lbRouteExtension); - $response = $gapicClient->updateLbRouteExtension($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkservices.v1.DepService/UpdateLbRouteExtension', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getLbRouteExtension(); - $this->assertProtobufEquals($lbRouteExtension, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateLbRouteExtensionTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateLbRouteExtensionExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateLbRouteExtensionTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $lbRouteExtension = new LbRouteExtension(); - $lbRouteExtensionName = 'lbRouteExtensionName-498882633'; - $lbRouteExtension->setName($lbRouteExtensionName); - $lbRouteExtensionForwardingRules = []; - $lbRouteExtension->setForwardingRules($lbRouteExtensionForwardingRules); - $lbRouteExtensionExtensionChains = []; - $lbRouteExtension->setExtensionChains($lbRouteExtensionExtensionChains); - $lbRouteExtensionLoadBalancingScheme = LoadBalancingScheme::LOAD_BALANCING_SCHEME_UNSPECIFIED; - $lbRouteExtension->setLoadBalancingScheme($lbRouteExtensionLoadBalancingScheme); - $request = (new UpdateLbRouteExtensionRequest()) - ->setLbRouteExtension($lbRouteExtension); - $response = $gapicClient->updateLbRouteExtension($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateLbRouteExtensionTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateLbTrafficExtensionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateLbTrafficExtensionTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $expectedResponse = new LbTrafficExtension(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateLbTrafficExtensionTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $lbTrafficExtension = new LbTrafficExtension(); - $lbTrafficExtensionName = 'lbTrafficExtensionName1872015107'; - $lbTrafficExtension->setName($lbTrafficExtensionName); - $lbTrafficExtensionForwardingRules = []; - $lbTrafficExtension->setForwardingRules($lbTrafficExtensionForwardingRules); - $lbTrafficExtensionExtensionChains = []; - $lbTrafficExtension->setExtensionChains($lbTrafficExtensionExtensionChains); - $lbTrafficExtensionLoadBalancingScheme = LoadBalancingScheme::LOAD_BALANCING_SCHEME_UNSPECIFIED; - $lbTrafficExtension->setLoadBalancingScheme($lbTrafficExtensionLoadBalancingScheme); - $request = (new UpdateLbTrafficExtensionRequest()) - ->setLbTrafficExtension($lbTrafficExtension); - $response = $gapicClient->updateLbTrafficExtension($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkservices.v1.DepService/UpdateLbTrafficExtension', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getLbTrafficExtension(); - $this->assertProtobufEquals($lbTrafficExtension, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateLbTrafficExtensionTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateLbTrafficExtensionExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateLbTrafficExtensionTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $lbTrafficExtension = new LbTrafficExtension(); - $lbTrafficExtensionName = 'lbTrafficExtensionName1872015107'; - $lbTrafficExtension->setName($lbTrafficExtensionName); - $lbTrafficExtensionForwardingRules = []; - $lbTrafficExtension->setForwardingRules($lbTrafficExtensionForwardingRules); - $lbTrafficExtensionExtensionChains = []; - $lbTrafficExtension->setExtensionChains($lbTrafficExtensionExtensionChains); - $lbTrafficExtensionLoadBalancingScheme = LoadBalancingScheme::LOAD_BALANCING_SCHEME_UNSPECIFIED; - $lbTrafficExtension->setLoadBalancingScheme($lbTrafficExtensionLoadBalancingScheme); - $request = (new UpdateLbTrafficExtensionRequest()) - ->setLbTrafficExtension($lbTrafficExtension); - $response = $gapicClient->updateLbTrafficExtension($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateLbTrafficExtensionTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getLocationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $locationId = 'locationId552319461'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Location(); - $expectedResponse->setName($name2); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - $request = new GetLocationRequest(); - $response = $gapicClient->getLocation($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new GetLocationRequest(); - try { - $gapicClient->getLocation($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $locationsElement = new Location(); - $locations = [ - $locationsElement, - ]; - $expectedResponse = new ListLocationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLocations($locations); - $transport->addResponse($expectedResponse); - $request = new ListLocationsRequest(); - $response = $gapicClient->listLocations($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new ListLocationsRequest(); - try { - $gapicClient->listLocations($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); - $response = $gapicClient->getIamPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); - try { - $gapicClient->getIamPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); - $response = $gapicClient->setIamPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPolicy(); - $this->assertProtobufEquals($policy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); - try { - $gapicClient->setIamPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new TestIamPermissionsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); - $response = $gapicClient->testIamPermissions($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPermissions(); - $this->assertProtobufEquals($permissions, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); - try { - $gapicClient->testIamPermissions($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createLbRouteExtensionAsyncTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createLbRouteExtensionTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $expectedResponse = new LbRouteExtension(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createLbRouteExtensionTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $lbRouteExtensionId = 'lbRouteExtensionId1673910458'; - $lbRouteExtension = new LbRouteExtension(); - $lbRouteExtensionName = 'lbRouteExtensionName-498882633'; - $lbRouteExtension->setName($lbRouteExtensionName); - $lbRouteExtensionForwardingRules = []; - $lbRouteExtension->setForwardingRules($lbRouteExtensionForwardingRules); - $lbRouteExtensionExtensionChains = []; - $lbRouteExtension->setExtensionChains($lbRouteExtensionExtensionChains); - $lbRouteExtensionLoadBalancingScheme = LoadBalancingScheme::LOAD_BALANCING_SCHEME_UNSPECIFIED; - $lbRouteExtension->setLoadBalancingScheme($lbRouteExtensionLoadBalancingScheme); - $request = (new CreateLbRouteExtensionRequest()) - ->setParent($formattedParent) - ->setLbRouteExtensionId($lbRouteExtensionId) - ->setLbRouteExtension($lbRouteExtension); - $response = $gapicClient->createLbRouteExtensionAsync($request)->wait(); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkservices.v1.DepService/CreateLbRouteExtension', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getLbRouteExtensionId(); - $this->assertProtobufEquals($lbRouteExtensionId, $actualValue); - $actualValue = $actualApiRequestObject->getLbRouteExtension(); - $this->assertProtobufEquals($lbRouteExtension, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createLbRouteExtensionTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } -} diff --git a/owl-bot-staging/NetworkServices/v1/tests/Unit/V1/Client/NetworkServicesClientTest.php b/owl-bot-staging/NetworkServices/v1/tests/Unit/V1/Client/NetworkServicesClientTest.php deleted file mode 100644 index 0032e21ee36e..000000000000 --- a/owl-bot-staging/NetworkServices/v1/tests/Unit/V1/Client/NetworkServicesClientTest.php +++ /dev/null @@ -1,4812 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return NetworkServicesClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new NetworkServicesClient($options); - } - - /** @test */ - public function createEndpointPolicyTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createEndpointPolicyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $authorizationPolicy = 'authorizationPolicy-1576667208'; - $description = 'description-1724546052'; - $serverTlsPolicy = 'serverTlsPolicy1906438002'; - $clientTlsPolicy = 'clientTlsPolicy-611416598'; - $expectedResponse = new EndpointPolicy(); - $expectedResponse->setName($name); - $expectedResponse->setAuthorizationPolicy($authorizationPolicy); - $expectedResponse->setDescription($description); - $expectedResponse->setServerTlsPolicy($serverTlsPolicy); - $expectedResponse->setClientTlsPolicy($clientTlsPolicy); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createEndpointPolicyTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $endpointPolicyId = 'endpointPolicyId-969914082'; - $endpointPolicy = new EndpointPolicy(); - $endpointPolicyName = 'endpointPolicyName36531794'; - $endpointPolicy->setName($endpointPolicyName); - $endpointPolicyType = EndpointPolicyType::ENDPOINT_POLICY_TYPE_UNSPECIFIED; - $endpointPolicy->setType($endpointPolicyType); - $endpointPolicyEndpointMatcher = new EndpointMatcher(); - $endpointPolicy->setEndpointMatcher($endpointPolicyEndpointMatcher); - $request = (new CreateEndpointPolicyRequest()) - ->setParent($formattedParent) - ->setEndpointPolicyId($endpointPolicyId) - ->setEndpointPolicy($endpointPolicy); - $response = $gapicClient->createEndpointPolicy($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkservices.v1.NetworkServices/CreateEndpointPolicy', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getEndpointPolicyId(); - $this->assertProtobufEquals($endpointPolicyId, $actualValue); - $actualValue = $actualApiRequestObject->getEndpointPolicy(); - $this->assertProtobufEquals($endpointPolicy, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createEndpointPolicyTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createEndpointPolicyExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createEndpointPolicyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $endpointPolicyId = 'endpointPolicyId-969914082'; - $endpointPolicy = new EndpointPolicy(); - $endpointPolicyName = 'endpointPolicyName36531794'; - $endpointPolicy->setName($endpointPolicyName); - $endpointPolicyType = EndpointPolicyType::ENDPOINT_POLICY_TYPE_UNSPECIFIED; - $endpointPolicy->setType($endpointPolicyType); - $endpointPolicyEndpointMatcher = new EndpointMatcher(); - $endpointPolicy->setEndpointMatcher($endpointPolicyEndpointMatcher); - $request = (new CreateEndpointPolicyRequest()) - ->setParent($formattedParent) - ->setEndpointPolicyId($endpointPolicyId) - ->setEndpointPolicy($endpointPolicy); - $response = $gapicClient->createEndpointPolicy($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createEndpointPolicyTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createGatewayTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createGatewayTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $selfLink = 'selfLink-1691268851'; - $description = 'description-1724546052'; - $scope = 'scope109264468'; - $serverTlsPolicy = 'serverTlsPolicy1906438002'; - $expectedResponse = new Gateway(); - $expectedResponse->setName($name); - $expectedResponse->setSelfLink($selfLink); - $expectedResponse->setDescription($description); - $expectedResponse->setScope($scope); - $expectedResponse->setServerTlsPolicy($serverTlsPolicy); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createGatewayTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $gatewayId = 'gatewayId955798774'; - $gateway = new Gateway(); - $gatewayName = 'gatewayName-435522833'; - $gateway->setName($gatewayName); - $gatewayPorts = []; - $gateway->setPorts($gatewayPorts); - $gatewayScope = 'gatewayScope-611626384'; - $gateway->setScope($gatewayScope); - $request = (new CreateGatewayRequest()) - ->setParent($formattedParent) - ->setGatewayId($gatewayId) - ->setGateway($gateway); - $response = $gapicClient->createGateway($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkservices.v1.NetworkServices/CreateGateway', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getGatewayId(); - $this->assertProtobufEquals($gatewayId, $actualValue); - $actualValue = $actualApiRequestObject->getGateway(); - $this->assertProtobufEquals($gateway, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createGatewayTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createGatewayExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createGatewayTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $gatewayId = 'gatewayId955798774'; - $gateway = new Gateway(); - $gatewayName = 'gatewayName-435522833'; - $gateway->setName($gatewayName); - $gatewayPorts = []; - $gateway->setPorts($gatewayPorts); - $gatewayScope = 'gatewayScope-611626384'; - $gateway->setScope($gatewayScope); - $request = (new CreateGatewayRequest()) - ->setParent($formattedParent) - ->setGatewayId($gatewayId) - ->setGateway($gateway); - $response = $gapicClient->createGateway($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createGatewayTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createGrpcRouteTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createGrpcRouteTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $selfLink = 'selfLink-1691268851'; - $description = 'description-1724546052'; - $expectedResponse = new GrpcRoute(); - $expectedResponse->setName($name); - $expectedResponse->setSelfLink($selfLink); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createGrpcRouteTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $grpcRouteId = 'grpcRouteId100668882'; - $grpcRoute = new GrpcRoute(); - $grpcRouteName = 'grpcRouteName-2118800906'; - $grpcRoute->setName($grpcRouteName); - $grpcRouteHostnames = []; - $grpcRoute->setHostnames($grpcRouteHostnames); - $grpcRouteRules = []; - $grpcRoute->setRules($grpcRouteRules); - $request = (new CreateGrpcRouteRequest()) - ->setParent($formattedParent) - ->setGrpcRouteId($grpcRouteId) - ->setGrpcRoute($grpcRoute); - $response = $gapicClient->createGrpcRoute($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkservices.v1.NetworkServices/CreateGrpcRoute', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getGrpcRouteId(); - $this->assertProtobufEquals($grpcRouteId, $actualValue); - $actualValue = $actualApiRequestObject->getGrpcRoute(); - $this->assertProtobufEquals($grpcRoute, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createGrpcRouteTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createGrpcRouteExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createGrpcRouteTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $grpcRouteId = 'grpcRouteId100668882'; - $grpcRoute = new GrpcRoute(); - $grpcRouteName = 'grpcRouteName-2118800906'; - $grpcRoute->setName($grpcRouteName); - $grpcRouteHostnames = []; - $grpcRoute->setHostnames($grpcRouteHostnames); - $grpcRouteRules = []; - $grpcRoute->setRules($grpcRouteRules); - $request = (new CreateGrpcRouteRequest()) - ->setParent($formattedParent) - ->setGrpcRouteId($grpcRouteId) - ->setGrpcRoute($grpcRoute); - $response = $gapicClient->createGrpcRoute($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createGrpcRouteTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createHttpRouteTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createHttpRouteTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $selfLink = 'selfLink-1691268851'; - $description = 'description-1724546052'; - $expectedResponse = new HttpRoute(); - $expectedResponse->setName($name); - $expectedResponse->setSelfLink($selfLink); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createHttpRouteTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $httpRouteId = 'httpRouteId-1087115096'; - $httpRoute = new HttpRoute(); - $httpRouteName = 'httpRouteName988382412'; - $httpRoute->setName($httpRouteName); - $httpRouteHostnames = []; - $httpRoute->setHostnames($httpRouteHostnames); - $httpRouteRules = []; - $httpRoute->setRules($httpRouteRules); - $request = (new CreateHttpRouteRequest()) - ->setParent($formattedParent) - ->setHttpRouteId($httpRouteId) - ->setHttpRoute($httpRoute); - $response = $gapicClient->createHttpRoute($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkservices.v1.NetworkServices/CreateHttpRoute', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getHttpRouteId(); - $this->assertProtobufEquals($httpRouteId, $actualValue); - $actualValue = $actualApiRequestObject->getHttpRoute(); - $this->assertProtobufEquals($httpRoute, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createHttpRouteTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createHttpRouteExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createHttpRouteTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $httpRouteId = 'httpRouteId-1087115096'; - $httpRoute = new HttpRoute(); - $httpRouteName = 'httpRouteName988382412'; - $httpRoute->setName($httpRouteName); - $httpRouteHostnames = []; - $httpRoute->setHostnames($httpRouteHostnames); - $httpRouteRules = []; - $httpRoute->setRules($httpRouteRules); - $request = (new CreateHttpRouteRequest()) - ->setParent($formattedParent) - ->setHttpRouteId($httpRouteId) - ->setHttpRoute($httpRoute); - $response = $gapicClient->createHttpRoute($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createHttpRouteTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createMeshTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createMeshTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $selfLink = 'selfLink-1691268851'; - $description = 'description-1724546052'; - $interceptionPort = 537115930; - $expectedResponse = new Mesh(); - $expectedResponse->setName($name); - $expectedResponse->setSelfLink($selfLink); - $expectedResponse->setDescription($description); - $expectedResponse->setInterceptionPort($interceptionPort); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createMeshTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $meshId = 'meshId954595501'; - $mesh = new Mesh(); - $meshName = 'meshName-472824296'; - $mesh->setName($meshName); - $request = (new CreateMeshRequest()) - ->setParent($formattedParent) - ->setMeshId($meshId) - ->setMesh($mesh); - $response = $gapicClient->createMesh($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkservices.v1.NetworkServices/CreateMesh', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getMeshId(); - $this->assertProtobufEquals($meshId, $actualValue); - $actualValue = $actualApiRequestObject->getMesh(); - $this->assertProtobufEquals($mesh, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createMeshTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createMeshExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createMeshTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $meshId = 'meshId954595501'; - $mesh = new Mesh(); - $meshName = 'meshName-472824296'; - $mesh->setName($meshName); - $request = (new CreateMeshRequest()) - ->setParent($formattedParent) - ->setMeshId($meshId) - ->setMesh($mesh); - $response = $gapicClient->createMesh($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createMeshTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createServiceBindingTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createServiceBindingTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $service = 'service1984153269'; - $expectedResponse = new ServiceBinding(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setService($service); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createServiceBindingTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $serviceBindingId = 'serviceBindingId-2088291105'; - $serviceBinding = new ServiceBinding(); - $serviceBindingName = 'serviceBindingName985981115'; - $serviceBinding->setName($serviceBindingName); - $serviceBindingService = 'serviceBindingService344355461'; - $serviceBinding->setService($serviceBindingService); - $request = (new CreateServiceBindingRequest()) - ->setParent($formattedParent) - ->setServiceBindingId($serviceBindingId) - ->setServiceBinding($serviceBinding); - $response = $gapicClient->createServiceBinding($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkservices.v1.NetworkServices/CreateServiceBinding', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getServiceBindingId(); - $this->assertProtobufEquals($serviceBindingId, $actualValue); - $actualValue = $actualApiRequestObject->getServiceBinding(); - $this->assertProtobufEquals($serviceBinding, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createServiceBindingTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createServiceBindingExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createServiceBindingTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $serviceBindingId = 'serviceBindingId-2088291105'; - $serviceBinding = new ServiceBinding(); - $serviceBindingName = 'serviceBindingName985981115'; - $serviceBinding->setName($serviceBindingName); - $serviceBindingService = 'serviceBindingService344355461'; - $serviceBinding->setService($serviceBindingService); - $request = (new CreateServiceBindingRequest()) - ->setParent($formattedParent) - ->setServiceBindingId($serviceBindingId) - ->setServiceBinding($serviceBinding); - $response = $gapicClient->createServiceBinding($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createServiceBindingTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createTcpRouteTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createTcpRouteTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $selfLink = 'selfLink-1691268851'; - $description = 'description-1724546052'; - $expectedResponse = new TcpRoute(); - $expectedResponse->setName($name); - $expectedResponse->setSelfLink($selfLink); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createTcpRouteTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $tcpRouteId = 'tcpRouteId-154571409'; - $tcpRoute = new TcpRoute(); - $tcpRouteName = 'tcpRouteName1920926099'; - $tcpRoute->setName($tcpRouteName); - $tcpRouteRules = []; - $tcpRoute->setRules($tcpRouteRules); - $request = (new CreateTcpRouteRequest()) - ->setParent($formattedParent) - ->setTcpRouteId($tcpRouteId) - ->setTcpRoute($tcpRoute); - $response = $gapicClient->createTcpRoute($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkservices.v1.NetworkServices/CreateTcpRoute', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getTcpRouteId(); - $this->assertProtobufEquals($tcpRouteId, $actualValue); - $actualValue = $actualApiRequestObject->getTcpRoute(); - $this->assertProtobufEquals($tcpRoute, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createTcpRouteTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createTcpRouteExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createTcpRouteTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $tcpRouteId = 'tcpRouteId-154571409'; - $tcpRoute = new TcpRoute(); - $tcpRouteName = 'tcpRouteName1920926099'; - $tcpRoute->setName($tcpRouteName); - $tcpRouteRules = []; - $tcpRoute->setRules($tcpRouteRules); - $request = (new CreateTcpRouteRequest()) - ->setParent($formattedParent) - ->setTcpRouteId($tcpRouteId) - ->setTcpRoute($tcpRoute); - $response = $gapicClient->createTcpRoute($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createTcpRouteTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createTlsRouteTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createTlsRouteTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $selfLink = 'selfLink-1691268851'; - $description = 'description-1724546052'; - $expectedResponse = new TlsRoute(); - $expectedResponse->setName($name); - $expectedResponse->setSelfLink($selfLink); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createTlsRouteTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $tlsRouteId = 'tlsRouteId263195029'; - $tlsRoute = new TlsRoute(); - $tlsRouteName = 'tlsRouteName-1956274759'; - $tlsRoute->setName($tlsRouteName); - $tlsRouteRules = []; - $tlsRoute->setRules($tlsRouteRules); - $request = (new CreateTlsRouteRequest()) - ->setParent($formattedParent) - ->setTlsRouteId($tlsRouteId) - ->setTlsRoute($tlsRoute); - $response = $gapicClient->createTlsRoute($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkservices.v1.NetworkServices/CreateTlsRoute', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getTlsRouteId(); - $this->assertProtobufEquals($tlsRouteId, $actualValue); - $actualValue = $actualApiRequestObject->getTlsRoute(); - $this->assertProtobufEquals($tlsRoute, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createTlsRouteTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createTlsRouteExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createTlsRouteTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $tlsRouteId = 'tlsRouteId263195029'; - $tlsRoute = new TlsRoute(); - $tlsRouteName = 'tlsRouteName-1956274759'; - $tlsRoute->setName($tlsRouteName); - $tlsRouteRules = []; - $tlsRoute->setRules($tlsRouteRules); - $request = (new CreateTlsRouteRequest()) - ->setParent($formattedParent) - ->setTlsRouteId($tlsRouteId) - ->setTlsRoute($tlsRoute); - $response = $gapicClient->createTlsRoute($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createTlsRouteTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteEndpointPolicyTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteEndpointPolicyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteEndpointPolicyTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->endpointPolicyName('[PROJECT]', '[LOCATION]', '[ENDPOINT_POLICY]'); - $request = (new DeleteEndpointPolicyRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteEndpointPolicy($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkservices.v1.NetworkServices/DeleteEndpointPolicy', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteEndpointPolicyTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteEndpointPolicyExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteEndpointPolicyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->endpointPolicyName('[PROJECT]', '[LOCATION]', '[ENDPOINT_POLICY]'); - $request = (new DeleteEndpointPolicyRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteEndpointPolicy($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteEndpointPolicyTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteGatewayTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteGatewayTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteGatewayTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->gatewayName('[PROJECT]', '[LOCATION]', '[GATEWAY]'); - $request = (new DeleteGatewayRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteGateway($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkservices.v1.NetworkServices/DeleteGateway', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteGatewayTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteGatewayExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteGatewayTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->gatewayName('[PROJECT]', '[LOCATION]', '[GATEWAY]'); - $request = (new DeleteGatewayRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteGateway($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteGatewayTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteGrpcRouteTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteGrpcRouteTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteGrpcRouteTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->grpcRouteName('[PROJECT]', '[LOCATION]', '[GRPC_ROUTE]'); - $request = (new DeleteGrpcRouteRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteGrpcRoute($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkservices.v1.NetworkServices/DeleteGrpcRoute', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteGrpcRouteTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteGrpcRouteExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteGrpcRouteTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->grpcRouteName('[PROJECT]', '[LOCATION]', '[GRPC_ROUTE]'); - $request = (new DeleteGrpcRouteRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteGrpcRoute($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteGrpcRouteTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteHttpRouteTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteHttpRouteTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteHttpRouteTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->httpRouteName('[PROJECT]', '[LOCATION]', '[HTTP_ROUTE]'); - $request = (new DeleteHttpRouteRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteHttpRoute($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkservices.v1.NetworkServices/DeleteHttpRoute', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteHttpRouteTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteHttpRouteExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteHttpRouteTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->httpRouteName('[PROJECT]', '[LOCATION]', '[HTTP_ROUTE]'); - $request = (new DeleteHttpRouteRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteHttpRoute($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteHttpRouteTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteMeshTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteMeshTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteMeshTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->meshName('[PROJECT]', '[LOCATION]', '[MESH]'); - $request = (new DeleteMeshRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteMesh($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkservices.v1.NetworkServices/DeleteMesh', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteMeshTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteMeshExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteMeshTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->meshName('[PROJECT]', '[LOCATION]', '[MESH]'); - $request = (new DeleteMeshRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteMesh($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteMeshTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteServiceBindingTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteServiceBindingTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteServiceBindingTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->serviceBindingName('[PROJECT]', '[LOCATION]', '[SERVICE_BINDING]'); - $request = (new DeleteServiceBindingRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteServiceBinding($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkservices.v1.NetworkServices/DeleteServiceBinding', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteServiceBindingTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteServiceBindingExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteServiceBindingTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->serviceBindingName('[PROJECT]', '[LOCATION]', '[SERVICE_BINDING]'); - $request = (new DeleteServiceBindingRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteServiceBinding($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteServiceBindingTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteTcpRouteTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteTcpRouteTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteTcpRouteTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->tcpRouteName('[PROJECT]', '[LOCATION]', '[TCP_ROUTE]'); - $request = (new DeleteTcpRouteRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteTcpRoute($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkservices.v1.NetworkServices/DeleteTcpRoute', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteTcpRouteTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteTcpRouteExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteTcpRouteTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->tcpRouteName('[PROJECT]', '[LOCATION]', '[TCP_ROUTE]'); - $request = (new DeleteTcpRouteRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteTcpRoute($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteTcpRouteTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteTlsRouteTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteTlsRouteTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteTlsRouteTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->tlsRouteName('[PROJECT]', '[LOCATION]', '[TLS_ROUTE]'); - $request = (new DeleteTlsRouteRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteTlsRoute($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkservices.v1.NetworkServices/DeleteTlsRoute', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteTlsRouteTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteTlsRouteExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteTlsRouteTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->tlsRouteName('[PROJECT]', '[LOCATION]', '[TLS_ROUTE]'); - $request = (new DeleteTlsRouteRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteTlsRoute($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteTlsRouteTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getEndpointPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $authorizationPolicy = 'authorizationPolicy-1576667208'; - $description = 'description-1724546052'; - $serverTlsPolicy = 'serverTlsPolicy1906438002'; - $clientTlsPolicy = 'clientTlsPolicy-611416598'; - $expectedResponse = new EndpointPolicy(); - $expectedResponse->setName($name2); - $expectedResponse->setAuthorizationPolicy($authorizationPolicy); - $expectedResponse->setDescription($description); - $expectedResponse->setServerTlsPolicy($serverTlsPolicy); - $expectedResponse->setClientTlsPolicy($clientTlsPolicy); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->endpointPolicyName('[PROJECT]', '[LOCATION]', '[ENDPOINT_POLICY]'); - $request = (new GetEndpointPolicyRequest()) - ->setName($formattedName); - $response = $gapicClient->getEndpointPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkservices.v1.NetworkServices/GetEndpointPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getEndpointPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->endpointPolicyName('[PROJECT]', '[LOCATION]', '[ENDPOINT_POLICY]'); - $request = (new GetEndpointPolicyRequest()) - ->setName($formattedName); - try { - $gapicClient->getEndpointPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getGatewayTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $selfLink = 'selfLink-1691268851'; - $description = 'description-1724546052'; - $scope = 'scope109264468'; - $serverTlsPolicy = 'serverTlsPolicy1906438002'; - $expectedResponse = new Gateway(); - $expectedResponse->setName($name2); - $expectedResponse->setSelfLink($selfLink); - $expectedResponse->setDescription($description); - $expectedResponse->setScope($scope); - $expectedResponse->setServerTlsPolicy($serverTlsPolicy); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->gatewayName('[PROJECT]', '[LOCATION]', '[GATEWAY]'); - $request = (new GetGatewayRequest()) - ->setName($formattedName); - $response = $gapicClient->getGateway($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkservices.v1.NetworkServices/GetGateway', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getGatewayExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->gatewayName('[PROJECT]', '[LOCATION]', '[GATEWAY]'); - $request = (new GetGatewayRequest()) - ->setName($formattedName); - try { - $gapicClient->getGateway($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getGrpcRouteTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $selfLink = 'selfLink-1691268851'; - $description = 'description-1724546052'; - $expectedResponse = new GrpcRoute(); - $expectedResponse->setName($name2); - $expectedResponse->setSelfLink($selfLink); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->grpcRouteName('[PROJECT]', '[LOCATION]', '[GRPC_ROUTE]'); - $request = (new GetGrpcRouteRequest()) - ->setName($formattedName); - $response = $gapicClient->getGrpcRoute($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkservices.v1.NetworkServices/GetGrpcRoute', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getGrpcRouteExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->grpcRouteName('[PROJECT]', '[LOCATION]', '[GRPC_ROUTE]'); - $request = (new GetGrpcRouteRequest()) - ->setName($formattedName); - try { - $gapicClient->getGrpcRoute($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getHttpRouteTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $selfLink = 'selfLink-1691268851'; - $description = 'description-1724546052'; - $expectedResponse = new HttpRoute(); - $expectedResponse->setName($name2); - $expectedResponse->setSelfLink($selfLink); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->httpRouteName('[PROJECT]', '[LOCATION]', '[HTTP_ROUTE]'); - $request = (new GetHttpRouteRequest()) - ->setName($formattedName); - $response = $gapicClient->getHttpRoute($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkservices.v1.NetworkServices/GetHttpRoute', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getHttpRouteExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->httpRouteName('[PROJECT]', '[LOCATION]', '[HTTP_ROUTE]'); - $request = (new GetHttpRouteRequest()) - ->setName($formattedName); - try { - $gapicClient->getHttpRoute($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getMeshTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $selfLink = 'selfLink-1691268851'; - $description = 'description-1724546052'; - $interceptionPort = 537115930; - $expectedResponse = new Mesh(); - $expectedResponse->setName($name2); - $expectedResponse->setSelfLink($selfLink); - $expectedResponse->setDescription($description); - $expectedResponse->setInterceptionPort($interceptionPort); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->meshName('[PROJECT]', '[LOCATION]', '[MESH]'); - $request = (new GetMeshRequest()) - ->setName($formattedName); - $response = $gapicClient->getMesh($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkservices.v1.NetworkServices/GetMesh', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getMeshExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->meshName('[PROJECT]', '[LOCATION]', '[MESH]'); - $request = (new GetMeshRequest()) - ->setName($formattedName); - try { - $gapicClient->getMesh($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getServiceBindingTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $service = 'service1984153269'; - $expectedResponse = new ServiceBinding(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setService($service); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->serviceBindingName('[PROJECT]', '[LOCATION]', '[SERVICE_BINDING]'); - $request = (new GetServiceBindingRequest()) - ->setName($formattedName); - $response = $gapicClient->getServiceBinding($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkservices.v1.NetworkServices/GetServiceBinding', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getServiceBindingExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->serviceBindingName('[PROJECT]', '[LOCATION]', '[SERVICE_BINDING]'); - $request = (new GetServiceBindingRequest()) - ->setName($formattedName); - try { - $gapicClient->getServiceBinding($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getTcpRouteTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $selfLink = 'selfLink-1691268851'; - $description = 'description-1724546052'; - $expectedResponse = new TcpRoute(); - $expectedResponse->setName($name2); - $expectedResponse->setSelfLink($selfLink); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->tcpRouteName('[PROJECT]', '[LOCATION]', '[TCP_ROUTE]'); - $request = (new GetTcpRouteRequest()) - ->setName($formattedName); - $response = $gapicClient->getTcpRoute($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkservices.v1.NetworkServices/GetTcpRoute', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getTcpRouteExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->tcpRouteName('[PROJECT]', '[LOCATION]', '[TCP_ROUTE]'); - $request = (new GetTcpRouteRequest()) - ->setName($formattedName); - try { - $gapicClient->getTcpRoute($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getTlsRouteTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $selfLink = 'selfLink-1691268851'; - $description = 'description-1724546052'; - $expectedResponse = new TlsRoute(); - $expectedResponse->setName($name2); - $expectedResponse->setSelfLink($selfLink); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->tlsRouteName('[PROJECT]', '[LOCATION]', '[TLS_ROUTE]'); - $request = (new GetTlsRouteRequest()) - ->setName($formattedName); - $response = $gapicClient->getTlsRoute($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkservices.v1.NetworkServices/GetTlsRoute', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getTlsRouteExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->tlsRouteName('[PROJECT]', '[LOCATION]', '[TLS_ROUTE]'); - $request = (new GetTlsRouteRequest()) - ->setName($formattedName); - try { - $gapicClient->getTlsRoute($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listEndpointPoliciesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $endpointPoliciesElement = new EndpointPolicy(); - $endpointPolicies = [ - $endpointPoliciesElement, - ]; - $expectedResponse = new ListEndpointPoliciesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setEndpointPolicies($endpointPolicies); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListEndpointPoliciesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listEndpointPolicies($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getEndpointPolicies()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkservices.v1.NetworkServices/ListEndpointPolicies', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listEndpointPoliciesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListEndpointPoliciesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listEndpointPolicies($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listGatewaysTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $gatewaysElement = new Gateway(); - $gateways = [ - $gatewaysElement, - ]; - $expectedResponse = new ListGatewaysResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setGateways($gateways); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListGatewaysRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listGateways($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getGateways()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkservices.v1.NetworkServices/ListGateways', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listGatewaysExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListGatewaysRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listGateways($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listGrpcRoutesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $grpcRoutesElement = new GrpcRoute(); - $grpcRoutes = [ - $grpcRoutesElement, - ]; - $expectedResponse = new ListGrpcRoutesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setGrpcRoutes($grpcRoutes); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListGrpcRoutesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listGrpcRoutes($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getGrpcRoutes()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkservices.v1.NetworkServices/ListGrpcRoutes', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listGrpcRoutesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListGrpcRoutesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listGrpcRoutes($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listHttpRoutesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $httpRoutesElement = new HttpRoute(); - $httpRoutes = [ - $httpRoutesElement, - ]; - $expectedResponse = new ListHttpRoutesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setHttpRoutes($httpRoutes); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListHttpRoutesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listHttpRoutes($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getHttpRoutes()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkservices.v1.NetworkServices/ListHttpRoutes', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listHttpRoutesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListHttpRoutesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listHttpRoutes($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listMeshesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $meshesElement = new Mesh(); - $meshes = [ - $meshesElement, - ]; - $expectedResponse = new ListMeshesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setMeshes($meshes); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListMeshesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listMeshes($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getMeshes()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkservices.v1.NetworkServices/ListMeshes', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listMeshesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListMeshesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listMeshes($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listServiceBindingsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $serviceBindingsElement = new ServiceBinding(); - $serviceBindings = [ - $serviceBindingsElement, - ]; - $expectedResponse = new ListServiceBindingsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setServiceBindings($serviceBindings); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListServiceBindingsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listServiceBindings($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getServiceBindings()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkservices.v1.NetworkServices/ListServiceBindings', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listServiceBindingsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListServiceBindingsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listServiceBindings($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listTcpRoutesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $tcpRoutesElement = new TcpRoute(); - $tcpRoutes = [ - $tcpRoutesElement, - ]; - $expectedResponse = new ListTcpRoutesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setTcpRoutes($tcpRoutes); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListTcpRoutesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listTcpRoutes($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getTcpRoutes()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkservices.v1.NetworkServices/ListTcpRoutes', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listTcpRoutesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListTcpRoutesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listTcpRoutes($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listTlsRoutesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $tlsRoutesElement = new TlsRoute(); - $tlsRoutes = [ - $tlsRoutesElement, - ]; - $expectedResponse = new ListTlsRoutesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setTlsRoutes($tlsRoutes); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListTlsRoutesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listTlsRoutes($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getTlsRoutes()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkservices.v1.NetworkServices/ListTlsRoutes', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listTlsRoutesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListTlsRoutesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listTlsRoutes($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateEndpointPolicyTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateEndpointPolicyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $authorizationPolicy = 'authorizationPolicy-1576667208'; - $description = 'description-1724546052'; - $serverTlsPolicy = 'serverTlsPolicy1906438002'; - $clientTlsPolicy = 'clientTlsPolicy-611416598'; - $expectedResponse = new EndpointPolicy(); - $expectedResponse->setName($name); - $expectedResponse->setAuthorizationPolicy($authorizationPolicy); - $expectedResponse->setDescription($description); - $expectedResponse->setServerTlsPolicy($serverTlsPolicy); - $expectedResponse->setClientTlsPolicy($clientTlsPolicy); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateEndpointPolicyTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $endpointPolicy = new EndpointPolicy(); - $endpointPolicyName = 'endpointPolicyName36531794'; - $endpointPolicy->setName($endpointPolicyName); - $endpointPolicyType = EndpointPolicyType::ENDPOINT_POLICY_TYPE_UNSPECIFIED; - $endpointPolicy->setType($endpointPolicyType); - $endpointPolicyEndpointMatcher = new EndpointMatcher(); - $endpointPolicy->setEndpointMatcher($endpointPolicyEndpointMatcher); - $request = (new UpdateEndpointPolicyRequest()) - ->setEndpointPolicy($endpointPolicy); - $response = $gapicClient->updateEndpointPolicy($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkservices.v1.NetworkServices/UpdateEndpointPolicy', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getEndpointPolicy(); - $this->assertProtobufEquals($endpointPolicy, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateEndpointPolicyTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateEndpointPolicyExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateEndpointPolicyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $endpointPolicy = new EndpointPolicy(); - $endpointPolicyName = 'endpointPolicyName36531794'; - $endpointPolicy->setName($endpointPolicyName); - $endpointPolicyType = EndpointPolicyType::ENDPOINT_POLICY_TYPE_UNSPECIFIED; - $endpointPolicy->setType($endpointPolicyType); - $endpointPolicyEndpointMatcher = new EndpointMatcher(); - $endpointPolicy->setEndpointMatcher($endpointPolicyEndpointMatcher); - $request = (new UpdateEndpointPolicyRequest()) - ->setEndpointPolicy($endpointPolicy); - $response = $gapicClient->updateEndpointPolicy($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateEndpointPolicyTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateGatewayTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateGatewayTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $selfLink = 'selfLink-1691268851'; - $description = 'description-1724546052'; - $scope = 'scope109264468'; - $serverTlsPolicy = 'serverTlsPolicy1906438002'; - $expectedResponse = new Gateway(); - $expectedResponse->setName($name); - $expectedResponse->setSelfLink($selfLink); - $expectedResponse->setDescription($description); - $expectedResponse->setScope($scope); - $expectedResponse->setServerTlsPolicy($serverTlsPolicy); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateGatewayTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $gateway = new Gateway(); - $gatewayName = 'gatewayName-435522833'; - $gateway->setName($gatewayName); - $gatewayPorts = []; - $gateway->setPorts($gatewayPorts); - $gatewayScope = 'gatewayScope-611626384'; - $gateway->setScope($gatewayScope); - $request = (new UpdateGatewayRequest()) - ->setGateway($gateway); - $response = $gapicClient->updateGateway($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkservices.v1.NetworkServices/UpdateGateway', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getGateway(); - $this->assertProtobufEquals($gateway, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateGatewayTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateGatewayExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateGatewayTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $gateway = new Gateway(); - $gatewayName = 'gatewayName-435522833'; - $gateway->setName($gatewayName); - $gatewayPorts = []; - $gateway->setPorts($gatewayPorts); - $gatewayScope = 'gatewayScope-611626384'; - $gateway->setScope($gatewayScope); - $request = (new UpdateGatewayRequest()) - ->setGateway($gateway); - $response = $gapicClient->updateGateway($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateGatewayTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateGrpcRouteTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateGrpcRouteTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $selfLink = 'selfLink-1691268851'; - $description = 'description-1724546052'; - $expectedResponse = new GrpcRoute(); - $expectedResponse->setName($name); - $expectedResponse->setSelfLink($selfLink); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateGrpcRouteTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $grpcRoute = new GrpcRoute(); - $grpcRouteName = 'grpcRouteName-2118800906'; - $grpcRoute->setName($grpcRouteName); - $grpcRouteHostnames = []; - $grpcRoute->setHostnames($grpcRouteHostnames); - $grpcRouteRules = []; - $grpcRoute->setRules($grpcRouteRules); - $request = (new UpdateGrpcRouteRequest()) - ->setGrpcRoute($grpcRoute); - $response = $gapicClient->updateGrpcRoute($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkservices.v1.NetworkServices/UpdateGrpcRoute', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getGrpcRoute(); - $this->assertProtobufEquals($grpcRoute, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateGrpcRouteTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateGrpcRouteExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateGrpcRouteTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $grpcRoute = new GrpcRoute(); - $grpcRouteName = 'grpcRouteName-2118800906'; - $grpcRoute->setName($grpcRouteName); - $grpcRouteHostnames = []; - $grpcRoute->setHostnames($grpcRouteHostnames); - $grpcRouteRules = []; - $grpcRoute->setRules($grpcRouteRules); - $request = (new UpdateGrpcRouteRequest()) - ->setGrpcRoute($grpcRoute); - $response = $gapicClient->updateGrpcRoute($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateGrpcRouteTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateHttpRouteTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateHttpRouteTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $selfLink = 'selfLink-1691268851'; - $description = 'description-1724546052'; - $expectedResponse = new HttpRoute(); - $expectedResponse->setName($name); - $expectedResponse->setSelfLink($selfLink); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateHttpRouteTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $httpRoute = new HttpRoute(); - $httpRouteName = 'httpRouteName988382412'; - $httpRoute->setName($httpRouteName); - $httpRouteHostnames = []; - $httpRoute->setHostnames($httpRouteHostnames); - $httpRouteRules = []; - $httpRoute->setRules($httpRouteRules); - $request = (new UpdateHttpRouteRequest()) - ->setHttpRoute($httpRoute); - $response = $gapicClient->updateHttpRoute($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkservices.v1.NetworkServices/UpdateHttpRoute', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getHttpRoute(); - $this->assertProtobufEquals($httpRoute, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateHttpRouteTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateHttpRouteExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateHttpRouteTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $httpRoute = new HttpRoute(); - $httpRouteName = 'httpRouteName988382412'; - $httpRoute->setName($httpRouteName); - $httpRouteHostnames = []; - $httpRoute->setHostnames($httpRouteHostnames); - $httpRouteRules = []; - $httpRoute->setRules($httpRouteRules); - $request = (new UpdateHttpRouteRequest()) - ->setHttpRoute($httpRoute); - $response = $gapicClient->updateHttpRoute($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateHttpRouteTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateMeshTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateMeshTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $selfLink = 'selfLink-1691268851'; - $description = 'description-1724546052'; - $interceptionPort = 537115930; - $expectedResponse = new Mesh(); - $expectedResponse->setName($name); - $expectedResponse->setSelfLink($selfLink); - $expectedResponse->setDescription($description); - $expectedResponse->setInterceptionPort($interceptionPort); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateMeshTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $mesh = new Mesh(); - $meshName = 'meshName-472824296'; - $mesh->setName($meshName); - $request = (new UpdateMeshRequest()) - ->setMesh($mesh); - $response = $gapicClient->updateMesh($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkservices.v1.NetworkServices/UpdateMesh', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getMesh(); - $this->assertProtobufEquals($mesh, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateMeshTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateMeshExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateMeshTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $mesh = new Mesh(); - $meshName = 'meshName-472824296'; - $mesh->setName($meshName); - $request = (new UpdateMeshRequest()) - ->setMesh($mesh); - $response = $gapicClient->updateMesh($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateMeshTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateTcpRouteTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateTcpRouteTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $selfLink = 'selfLink-1691268851'; - $description = 'description-1724546052'; - $expectedResponse = new TcpRoute(); - $expectedResponse->setName($name); - $expectedResponse->setSelfLink($selfLink); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateTcpRouteTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $tcpRoute = new TcpRoute(); - $tcpRouteName = 'tcpRouteName1920926099'; - $tcpRoute->setName($tcpRouteName); - $tcpRouteRules = []; - $tcpRoute->setRules($tcpRouteRules); - $request = (new UpdateTcpRouteRequest()) - ->setTcpRoute($tcpRoute); - $response = $gapicClient->updateTcpRoute($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkservices.v1.NetworkServices/UpdateTcpRoute', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getTcpRoute(); - $this->assertProtobufEquals($tcpRoute, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateTcpRouteTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateTcpRouteExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateTcpRouteTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $tcpRoute = new TcpRoute(); - $tcpRouteName = 'tcpRouteName1920926099'; - $tcpRoute->setName($tcpRouteName); - $tcpRouteRules = []; - $tcpRoute->setRules($tcpRouteRules); - $request = (new UpdateTcpRouteRequest()) - ->setTcpRoute($tcpRoute); - $response = $gapicClient->updateTcpRoute($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateTcpRouteTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateTlsRouteTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateTlsRouteTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $selfLink = 'selfLink-1691268851'; - $description = 'description-1724546052'; - $expectedResponse = new TlsRoute(); - $expectedResponse->setName($name); - $expectedResponse->setSelfLink($selfLink); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateTlsRouteTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $tlsRoute = new TlsRoute(); - $tlsRouteName = 'tlsRouteName-1956274759'; - $tlsRoute->setName($tlsRouteName); - $tlsRouteRules = []; - $tlsRoute->setRules($tlsRouteRules); - $request = (new UpdateTlsRouteRequest()) - ->setTlsRoute($tlsRoute); - $response = $gapicClient->updateTlsRoute($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkservices.v1.NetworkServices/UpdateTlsRoute', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getTlsRoute(); - $this->assertProtobufEquals($tlsRoute, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateTlsRouteTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateTlsRouteExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateTlsRouteTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $tlsRoute = new TlsRoute(); - $tlsRouteName = 'tlsRouteName-1956274759'; - $tlsRoute->setName($tlsRouteName); - $tlsRouteRules = []; - $tlsRoute->setRules($tlsRouteRules); - $request = (new UpdateTlsRouteRequest()) - ->setTlsRoute($tlsRoute); - $response = $gapicClient->updateTlsRoute($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateTlsRouteTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getLocationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $locationId = 'locationId552319461'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Location(); - $expectedResponse->setName($name2); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - $request = new GetLocationRequest(); - $response = $gapicClient->getLocation($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new GetLocationRequest(); - try { - $gapicClient->getLocation($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $locationsElement = new Location(); - $locations = [ - $locationsElement, - ]; - $expectedResponse = new ListLocationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLocations($locations); - $transport->addResponse($expectedResponse); - $request = new ListLocationsRequest(); - $response = $gapicClient->listLocations($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new ListLocationsRequest(); - try { - $gapicClient->listLocations($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); - $response = $gapicClient->getIamPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); - try { - $gapicClient->getIamPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); - $response = $gapicClient->setIamPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPolicy(); - $this->assertProtobufEquals($policy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); - try { - $gapicClient->setIamPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new TestIamPermissionsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); - $response = $gapicClient->testIamPermissions($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPermissions(); - $this->assertProtobufEquals($permissions, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); - try { - $gapicClient->testIamPermissions($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createEndpointPolicyAsyncTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createEndpointPolicyTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $authorizationPolicy = 'authorizationPolicy-1576667208'; - $description = 'description-1724546052'; - $serverTlsPolicy = 'serverTlsPolicy1906438002'; - $clientTlsPolicy = 'clientTlsPolicy-611416598'; - $expectedResponse = new EndpointPolicy(); - $expectedResponse->setName($name); - $expectedResponse->setAuthorizationPolicy($authorizationPolicy); - $expectedResponse->setDescription($description); - $expectedResponse->setServerTlsPolicy($serverTlsPolicy); - $expectedResponse->setClientTlsPolicy($clientTlsPolicy); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createEndpointPolicyTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $endpointPolicyId = 'endpointPolicyId-969914082'; - $endpointPolicy = new EndpointPolicy(); - $endpointPolicyName = 'endpointPolicyName36531794'; - $endpointPolicy->setName($endpointPolicyName); - $endpointPolicyType = EndpointPolicyType::ENDPOINT_POLICY_TYPE_UNSPECIFIED; - $endpointPolicy->setType($endpointPolicyType); - $endpointPolicyEndpointMatcher = new EndpointMatcher(); - $endpointPolicy->setEndpointMatcher($endpointPolicyEndpointMatcher); - $request = (new CreateEndpointPolicyRequest()) - ->setParent($formattedParent) - ->setEndpointPolicyId($endpointPolicyId) - ->setEndpointPolicy($endpointPolicy); - $response = $gapicClient->createEndpointPolicyAsync($request)->wait(); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.networkservices.v1.NetworkServices/CreateEndpointPolicy', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getEndpointPolicyId(); - $this->assertProtobufEquals($endpointPolicyId, $actualValue); - $actualValue = $actualApiRequestObject->getEndpointPolicy(); - $this->assertProtobufEquals($endpointPolicy, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createEndpointPolicyTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } -} diff --git a/owl-bot-staging/Notebooks/v1/proto/src/GPBMetadata/Google/Cloud/Notebooks/V1/DiagnosticConfig.php b/owl-bot-staging/Notebooks/v1/proto/src/GPBMetadata/Google/Cloud/Notebooks/V1/DiagnosticConfig.php deleted file mode 100644 index 50f02d8fca10..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/GPBMetadata/Google/Cloud/Notebooks/V1/DiagnosticConfig.php +++ /dev/null @@ -1,35 +0,0 @@ -internalAddGeneratedFile( - ' -Ž -1google/cloud/notebooks/v1/diagnostic_config.protogoogle.cloud.notebooks.v1"¾ -DiagnosticConfig - -gcs_bucket ( BàA - relative_path ( BàA -repair_flag_enabled (BàA( -packet_capture_flag_enabled (BàA) -copy_home_files_flag_enabled (BàABu -com.google.cloud.notebooks.v1BDiagnosticConfigProtoPZ;cloud.google.com/go/notebooks/apiv1/notebookspb;notebookspbbproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/GPBMetadata/Google/Cloud/Notebooks/V1/Environment.php b/owl-bot-staging/Notebooks/v1/proto/src/GPBMetadata/Google/Cloud/Notebooks/V1/Environment.php deleted file mode 100644 index 815e9b0bbb2bfd9f1598eb12d331ebf71bbaa18a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1607 zcmb7EU2oGc6kS_bH+SNrL(mNnrc7EVSfT>jL&`wyx^;V?tI((rid4CY+ZmGBa-2$K z>Kng?KZ3-s;CT}N0mu1h&^82pX>@(h@xA9>pI2|#DFaVn2YZ+!fo(XPLUD>A<5WBC~_AH9^mZl z5OOR6?ln~1A;B#DGB1&=$%uJCuw%FIDVh+<4P)Nboa8F#I~-5(pHZnCCqzzCAeUW! zqmps^HHk%Q+IFhZf!wEB+Ev)&Cit}op8m%omDi$VO>Lc)Zk;x%ug6C^VnpY0f6@A_ zKZ>tV%P426i=>Gtq58D|N|{wF-v-yhjjiNhuD0AN{A?D=cfg8GeCD9(Kpo}7qw*>! z+3{M)&8iesa0e_++yQaX7*`f$r1ZS1U0Ju*caOr%!-aAi+_b1C5Rq>)h8Gol>o4%V z1d*`Z2dj+wVjzdaMZgBp(pHvKX)i&^;#fZXK`23GS<$a2^oc%NI%L(m@!`Dr9&F6j zj+&7|`?H= zPM?oJ>UI~bL?k2R5@#As;c%f<1lLu(x&vnISSmBJl^K`; F@EhZ=3E%(# diff --git a/owl-bot-staging/Notebooks/v1/proto/src/GPBMetadata/Google/Cloud/Notebooks/V1/Event.php b/owl-bot-staging/Notebooks/v1/proto/src/GPBMetadata/Google/Cloud/Notebooks/V1/Event.php deleted file mode 100644 index 0208536c47c1f3e82cfea6fe66f6371811b73561..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1205 zcma)5?QYXB6r~><)a9ef4^%24%otjSSfY(TQ%XT;n{Ac0tYTpjD5!E1w=+v)%W*0d zw0GfYcn%%~$7!=l+XVTMFP(Glx!32u|Hv*Fcm)q}ggFv8fTKAS7Z@^51@&nNN6C1M zIrQn2kq~no!rm!#PF-mC`tD0fjcLMtY{ChplMowzNRz;bsK6siFJoi2Yv37^5+B9_3HjJ0 z@sLDB5EPOhvV%4pqcFyjc@sNMB3}?1!IW?s`M9|aGtCsc$*AnO4VQKX=@8@qynZAw zk5K6KaO`u!1myz>HO&bY`RLL=&Fw|mRE~^cGxKPgH%zvn;0a!>4k5=P;ZaNZP6e*= zH}95VS&VoG1cyNfU!WPG+%&Jdx)!;Onm6VWc^U#u+3j34kev@?(Y_S~dAA2L4b9wN z>UInKDudVm6$9;A2Gdnq^gJ#4Y`5`Zp`h|2hi{0b$1Fk{zl&f^r9m@5m19P^7^awd z0T!Coy@tNfUJB@WliEHgi#fyfqC`I4d$UB|bfK#P+1-^4tqbl4GOQ$w>m^u{Wp@5a z?qzs85`5k%{jmxS9Xwq9sZ~Mg63>tJ8S5 Xl_%zHmj9J?xpP$%G7Iz-xB}oWsTq6k diff --git a/owl-bot-staging/Notebooks/v1/proto/src/GPBMetadata/Google/Cloud/Notebooks/V1/Execution.php b/owl-bot-staging/Notebooks/v1/proto/src/GPBMetadata/Google/Cloud/Notebooks/V1/Execution.php deleted file mode 100644 index 1ff8869b94e5b18ea6e9571ea0f67c5967c690c0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3375 zcmbVOTT|Oc6pk^*_?UpB(A05nDoq-~BzAC^PR5j^vMoR<7{`{GG~=m8me-&lOB!9= zP==Sz^mp{N|EYb*OyBYo`qZ;4SvDA2s9&tzJ?GnV&VJ|e?F;+RhOhW7ViHI7NSE&% z^WGuhZO8H~%`*6o-|G>F*Q~y+8^p=;e07hn?a91YmEBApcP*e2O2#7uD-aH^&e z%rh0KrD&Gf(+{$7JWCh1u6f@f>G}vHjPNQ9j@yPAL+ud5%}(=i1b%ic;2owanx1pa zeFC?2)Al`O7=ERP@0v|8U+@s^_f#D#i=y|{1ETnjo}FQbpTix?_s*(XMi+ydWanAP z*s7!UUFBHq8v*PrJK+G>3Bl00*%aIR7#3XO40Mes7(UB4y)3YUO_+Uab%F?|ac91` zb}eULS{)f*hx-w3(-MWO(Uh^<=MXYod~q$vYKT*(?lC8}Z*U4M4v6ECcZ#ZyUvTq( zT(Hl81nJBL$hIS_T*OdZn`qg27M&N6_K4|PPRCN6ZgzogmRJ53+7IBqs#E6oET3QBMRUN?CAR{z!*4DP z@gs5^-ggrc1J&@uDo~nw7Rx<`^mwNIhxpP7q@oJL<={@UBJ7BYEQt-JRcqG8inJ+- z)yxep1&OlIlq#7RHxJO1g<4f;RF&1t6n7I+^@g}BwRUkCr%NWOY}H$t>CsZgWda{z zrqXK4d%KyLrN3g3z4Wva^cos}ep6mU7tR9+6ac7a=%TV;%*;gJ zPczA-?;trW2U%ErxmUi(0}R@}*pS87iXfrsb1+*KWTD>Jt7N9i8JMTlXjDL!en~(o z>J?a+IWnAZ6ff*Oj3VjcqwBDcy9Lv9#tOPhIsRUVb9Z5`tGk%g#|k^5O(hi^VR7h& z^9+te*cE6iT7$Ia5Nv+f^AL&F^mH*dv|`vl^U(+pK%tgzW2p?aXtBS7)^kYE`G~OM zKVMuK-ZI(SN1Zj_q#D7kpTgoqH=&Iv=opKTq+zGchqVi)v-DdG5)6X!0P{dTPe$ay ztCrZptciuGQ5PCgZ40TFhGe5vtI-9^lV%HfEml!I zgljxbQW)`dU25PW#bsbls!6gW>_~5@G?aQD1PzvktK64l`mZ#M8X-V)7o3n$^% zX~D2G9EvToa5DTl9nIk=7!mEX{AUb4!@_=f(984DU3EGM*JE$igQpozK-d-ztg)dV zjl{V>GTrX1k9~g-j;`2WxbnYvhE9xJ8|!1ZKejsU%pitmJ$(>On~#Etdu%|bEuH4PnqPnwr?BuNIIDe2F#TVd+eAa<`yNX){yFrj-=Go&O;>i?1^iziZrzC z;fR%tkv-{`EZb)%wteQ6&i6{D<@vg0up$Qqu=FwW9Nl2jVRQd2^Yy;&>%Bux->VXR zuO89&x_d7HjFIknk{aT`Paxr+GdUTVhJ@HY{(EeCnrWH7sgKM*p&qZKfj;sW5??<% zm{^8y+LlBF4U}y6sT5$+*~gBJdcTq)iJD{zG(%6deCAsEs8?g2;hK(byG=Y=sSKGv zH6X3*J`LFtoH>wo0~sroYeK$~e0Rd;xl5AE{E2J5>ZeF)Zb^P z`nhSlmC8)38OWzdTP*b7(p1+S)Kjc;)3vQJv;5_`PtDpfF&un->@23`?)dt(85&>i z_ouc#z=+(PT8C`)1pe|6c9#uB;ZAU}$b+^x4cg-QUOwC^>5f@)Ln8$Nod5FE_-tm0 z@bH81FpqtVqLLq}8yqP7Ck9*S1?HY(9NU&W7?A%ig!dpCw&hL6Ohf+Bw&q_rOpHmf z-E8@J@sr{g7a$fpNV=c+w;U64kT_!(VjN-8!O9k_p6jCt^TdRd2p0<)B#B1YhFs@e zQ_+s=?WR&y4^*X=`%DlZTW@GBrLDBOaz|~{b1`8HHst!dON((qgzb>7dTA$7_}e{5 zMOiIuLXs*2SB^`S5Pl1(^RZ@*^&#WJX3B*dbncE-I{E!)LJc<1cD`<6RSU@zsB5PD z^ak>3L=mCfg)PVSd<}!s^(T%NB)yms5bnW7RPQwV1M>I8 z)ySer;d9s^SDFUXbi=SGmM^YxxJR&aWdqsS4*KIkL>&|E!1`D>PEo5M3{nx>xbS-r z5RhSo*0C&UsQthkifKHMDgWjMr6cPXR@8pxSl#(QSk0g!R{0q#3AQX7lX+~PGi`cO zyo)DNfiO+j;3_lAa4#Gx2jT{oro61;%9Jud+=jKYv8PeC=MahKRZ{pCR)~)$-oxO^ zly{d!4?L@b=$%r_VSQ}57$ew0qlmkYOfu!lGJx$6BMP1%?1)7SE6zHaD(LW<>4=+T zBg!6H!;vRL>;&gxr zFp+BFV0wjA;!;%kA7Jx(36#-c%k|qRi0A7l@0|ipueMA1LB*arZX*BpI3%e`VY|%e z6W`YQSh%s!Qd>_6>yV_1#m}bbNT2bB!J8wsu{5OzuM<&`p_Y^oTCh394(@BVrw!25 z6Z9drCd%-oqKQN*9uh*sI|%57Td-nUefA?ZF=DX^X+DSzaC#3r7m9m^M?~I?aI#3@ zP|hq5S*Iz?Nu9CX54uQ@nEb-PI|1M27Up$7e;=|}_#^ey1L?d4JBzCZbsJ{sCnKhL z%s|C8ZoOV83B z?-bocJkq51rAZ}C#R|LdwHYK$HXOJ(=$tusM2E@A)Vp97VmC%$_a3iemoy zpjwA&UyCZk54xbrV!{t^7C(#%NX}Wz}ttv_lf5tK6Ru5$L z2)`4Bm#{kJB*;}7Q?HD%h;-aMY{@kRk=7yAY8)Ny%hflzc>Zh1%=dsyFf|7b$Hd?R zGY_Y9CH_q;UxHhg>-{ef6#g8?ad|d(@p>V_JsDLwQd)AS(b5*o-8hZcyJ}69wT{w0 zlC?MAJVVLRPM21jd(WPsEv_ziX*of2`sLFva>;9pofo;4YXC9 zl&}GrmU5`JJ4%ZdsHQ>t7;iZB8vTYK9Qkhq%oGerQDx=cMeEem_M1g+Mc8IdLv`vk zxkXWpR-uJ9g>strB`quzUZ&4BspL6n=f2z7ye^8IF}7_is`0o<1+^|1$<( zAkwF+&i<{4Nt51fnz8pUgQ6MTl~IhLJ@-I`!r>d$RAlGm<=ppQ<981EyHt@sdlc)@ zyHv5e_pfNL7d~3ey;|Y3)z9&J0coYeX)Bc}ai!ATJ6YxP%kwAG_lvKBx1hPFBOI;q SX=}l=5kDC`?tFxg0RIC%rsL}X diff --git a/owl-bot-staging/Notebooks/v1/proto/src/GPBMetadata/Google/Cloud/Notebooks/V1/InstanceConfig.php b/owl-bot-staging/Notebooks/v1/proto/src/GPBMetadata/Google/Cloud/Notebooks/V1/InstanceConfig.php deleted file mode 100644 index 3b49f1edbedb..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/GPBMetadata/Google/Cloud/Notebooks/V1/InstanceConfig.php +++ /dev/null @@ -1,30 +0,0 @@ -internalAddGeneratedFile( - ' -ø -/google/cloud/notebooks/v1/instance_config.protogoogle.cloud.notebooks.v1"U -InstanceConfig! -notebook_upgrade_schedule (  -enable_health_monitoring (BÊ -com.google.cloud.notebooks.v1BInstanceConfigProtoPZ;cloud.google.com/go/notebooks/apiv1/notebookspb;notebookspbªGoogle.Cloud.Notebooks.V1ÊGoogle\\Cloud\\Notebooks\\V1êGoogle::Cloud::Notebooks::V1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/GPBMetadata/Google/Cloud/Notebooks/V1/ManagedService.php b/owl-bot-staging/Notebooks/v1/proto/src/GPBMetadata/Google/Cloud/Notebooks/V1/ManagedService.php deleted file mode 100644 index 6b55c034699c..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/GPBMetadata/Google/Cloud/Notebooks/V1/ManagedService.php +++ /dev/null @@ -1,131 +0,0 @@ -internalAddGeneratedFile( - ' -ù\' -/google/cloud/notebooks/v1/managed_service.protogoogle.cloud.notebooks.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto1google/cloud/notebooks/v1/diagnostic_config.proto%google/cloud/notebooks/v1/event.proto\'google/cloud/notebooks/v1/runtime.proto#google/longrunning/operations.proto google/protobuf/field_mask.protogoogle/protobuf/timestamp.proto"v -ListRuntimesRequest8 -parent ( B(àAúA" notebooks.googleapis.com/Runtime - page_size ( - -page_token ( "z -ListRuntimesResponse4 -runtimes ( 2".google.cloud.notebooks.v1.Runtime -next_page_token (  - unreachable ( "K -GetRuntimeRequest6 -name ( B(àAúA" - notebooks.googleapis.com/Runtime"· -CreateRuntimeRequest8 -parent ( B(àAúA" - notebooks.googleapis.com/Runtime - -runtime_id ( BàA8 -runtime ( 2".google.cloud.notebooks.v1.RuntimeBàA - -request_id ( "b -DeleteRuntimeRequest6 -name ( B(àAúA" - notebooks.googleapis.com/Runtime - -request_id ( "< -StartRuntimeRequest -name ( BàA - -request_id ( "; -StopRuntimeRequest -name ( BàA - -request_id ( "¤ -SwitchRuntimeRequest -name ( BàA - machine_type ( O -accelerator_config ( 23.google.cloud.notebooks.v1.RuntimeAcceleratorConfig - -request_id ( "< -ResetRuntimeRequest -name ( BàA - -request_id ( "> -UpgradeRuntimeRequest -name ( BàA - -request_id ( " -ReportRuntimeEventRequest6 -name ( B(àAúA" - notebooks.googleapis.com/Runtime -vm_id ( BàA4 -event ( 2 .google.cloud.notebooks.v1.EventBàA"š -UpdateRuntimeRequest8 -runtime ( 2".google.cloud.notebooks.v1.RuntimeBàA4 - update_mask ( 2.google.protobuf.FieldMaskBàA - -request_id ( "p -"RefreshRuntimeTokenInternalRequest6 -name ( B(àAúA" - notebooks.googleapis.com/Runtime -vm_id ( BàA"q -#RefreshRuntimeTokenInternalResponse - access_token ( 4 - expire_time ( 2.google.protobuf.TimestampBàA" -DiagnoseRuntimeRequest6 -name ( B(àAúA" - notebooks.googleapis.com/RuntimeK -diagnostic_config ( 2+.google.cloud.notebooks.v1.DiagnosticConfigBàA2Ò -ManagedNotebookService® - ListRuntimes..google.cloud.notebooks.v1.ListRuntimesRequest/.google.cloud.notebooks.v1.ListRuntimesResponse"=ÚAparent‚Óä“.,/v1/{parent=projects/*/locations/*}/runtimes› - -GetRuntime,.google.cloud.notebooks.v1.GetRuntimeRequest".google.cloud.notebooks.v1.Runtime";ÚAname‚Óä“.,/v1/{name=projects/*/locations/*/runtimes/*}Ù - CreateRuntime/.google.cloud.notebooks.v1.CreateRuntimeRequest.google.longrunning.Operation"xÊA -RuntimeOperationMetadataÚAparent,runtime_id,runtime‚Óä“7",/v1/{parent=projects/*/locations/*}/runtimes:runtimeÛ - UpdateRuntime/.google.cloud.notebooks.v1.UpdateRuntimeRequest.google.longrunning.Operation"zÊA -RuntimeOperationMetadataÚAruntime,update_mask‚Óä“?24/v1/{runtime.name=projects/*/locations/*/runtimes/*}:runtimeÉ - DeleteRuntime/.google.cloud.notebooks.v1.DeleteRuntimeRequest.google.longrunning.Operation"hÊA* -google.protobuf.EmptyOperationMetadataÚAname‚Óä“.*,/v1/{name=projects/*/locations/*/runtimes/*}Â - StartRuntime..google.cloud.notebooks.v1.StartRuntimeRequest.google.longrunning.Operation"cÊA -RuntimeOperationMetadataÚAname‚Óä“7"2/v1/{name=projects/*/locations/*/runtimes/*}:start:*¿ - StopRuntime-.google.cloud.notebooks.v1.StopRuntimeRequest.google.longrunning.Operation"bÊA -RuntimeOperationMetadataÚAname‚Óä“6"1/v1/{name=projects/*/locations/*/runtimes/*}:stop:*Å - SwitchRuntime/.google.cloud.notebooks.v1.SwitchRuntimeRequest.google.longrunning.Operation"dÊA -RuntimeOperationMetadataÚAname‚Óä“8"3/v1/{name=projects/*/locations/*/runtimes/*}:switch:*Â - ResetRuntime..google.cloud.notebooks.v1.ResetRuntimeRequest.google.longrunning.Operation"cÊA -RuntimeOperationMetadataÚAname‚Óä“7"2/v1/{name=projects/*/locations/*/runtimes/*}:reset:*È -UpgradeRuntime0.google.cloud.notebooks.v1.UpgradeRuntimeRequest.google.longrunning.Operation"eÊA -RuntimeOperationMetadataÚAname‚Óä“9"4/v1/{name=projects/*/locations/*/runtimes/*}:upgrade:*Ô -ReportRuntimeEvent4.google.cloud.notebooks.v1.ReportRuntimeEventRequest.google.longrunning.Operation"iÊA -RuntimeOperationMetadataÚAname‚Óä“="8/v1/{name=projects/*/locations/*/runtimes/*}:reportEvent:*þ -RefreshRuntimeTokenInternal=.google.cloud.notebooks.v1.RefreshRuntimeTokenInternalRequest>.google.cloud.notebooks.v1.RefreshRuntimeTokenInternalResponse"`ÚA -name,vm_id‚Óä“M"H/v1/{name=projects/*/locations/*/runtimes/*}:refreshRuntimeTokenInternal:*Ý -DiagnoseRuntime1.google.cloud.notebooks.v1.DiagnoseRuntimeRequest.google.longrunning.Operation"xÊA -RuntimeOperationMetadataÚAname,diagnostic_config‚Óä“:"5/v1/{name=projects/*/locations/*/runtimes/*}:diagnose:*LÊAnotebooks.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformBÌ -com.google.cloud.notebooks.v1BManagedNotebooksProtoPZ;cloud.google.com/go/notebooks/apiv1/notebookspb;notebookspbªGoogle.Cloud.Notebooks.V1ÊGoogle\\Cloud\\Notebooks\\V1êGoogle::Cloud::Notebooks::V1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/GPBMetadata/Google/Cloud/Notebooks/V1/Runtime.php b/owl-bot-staging/Notebooks/v1/proto/src/GPBMetadata/Google/Cloud/Notebooks/V1/Runtime.php deleted file mode 100644 index 016bc8df1f3e82c590538b695ef23d0ebb615923..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6123 zcmbVQTW=f36*fs-$U|MImE}^h-E3$FmXUZ+#G>swvwW>vLRRV!6pEtfR?V-)qA zz%^-J?Kn=SOLJz|3EDZ^@oCF(j=kK;M$Qdv-|EpU#{{sA9`*W$N!6WN@eTEjw&5EG zJ6!x=n~5J(Lh*y<#&ZC(Yj~bo7clT0sQA|pT3yRjJ>T&0-$TnImTmc#(Y3zCQ@m6U zjjl&g_Tt*Zz&3r$u~jBewN1MISQVIT?Zdub?Niq_x(6ldnXc9M z9k+%{^Z5?-2j*iV>yPEO49+@K*M*Mx`~@Xns=gc0(cM+mrGDVr&$-?V;B4@9aEZAJ zee2+rMZ4`HJu*%#$Ia)5ry7D>C0eJ_dpDN4=%0hKePX$e-J`aD^W6t#)iE;AK)wFu zvfLe?e_=`E7uxNCtzTh0t`DrkZ1o8K^%xEw-7pfBRk1M3LpD1I+3d;2nw-iReJkfm zBZ>H3`}AsfI<$mb{E=MDLm#6k#}a`bS1ic7#d0GZQ6uY#V(j0Am{Nj8 zG_D^QUD7kmBg>}gD9$D~A7`&rKHC%$Z-l_^E#(DFvlyi57|Jeeu1}Dax?~${z0g5} zxg%AztX6cx3yPVxs$+CiNkx1Erqo?y4EbGVq$HzR%0_$N)l!pI{reKX*N|V@0B^sj4}_2{n}2w zP+}`*8LC#%bgi(by<;Qs%zH?Vcv`s!>D_W+Pv0e%sfZhi*|(@6gRX=>qslK}xv*2N z=mhHv(JCmuw}%SF*l~vw_5BJz&Q#v`sqi(Z!^9OSfjR4Cv0mlEyvm~&{zy&V%Y7%m z&T?JH#KPg&I2L}Mg@p>oTv2PziVH9&zlnd^r#`aMjsMLdBQ zHn+ndxX3Trt01x?pgKY+=rYscVU8N{+>d3xkHX^lbt>E|Y;U8}>IJ=8C;Hpk`PfK9 zs?yX-T7l^0#$JKEe)c34S&POa%(`PUwT&lFFj&qHH`#DZS%$^&)ms=o=LhvI45RY^ z1qLv~f>5vRljbG{Q~3Qf6=&Wb1J<`l^Q%TGp{&Bn*aXv$Pr(J5nvh9m9zd#Wo9=0! zIa#`A5oV8j9yz9`f?_j&k3nJ&1EE{8ykjK|Nh9zb(nhZ$S27lki)=+=#%4yCUk>5o zHa)RSN;qXRVwIHr4wgCray)T7a)`tbVEsr>sWBw&{Dg=Y=n=-o4g;xruLOipM1g6` zZqsi#Z%&Ib9hQcj59u4O(eu)R4!3TypEhWlYFw6~PGK!d@S1yweHv%R1S?O+xO+N2 zJnIU?u?eHLheu4{5v2*{V5;Y|X&Tr{WdUYHmyu5L-#E*&WRCq>`vg{GGK?P>Nobf% ziOdf%SRI(?yvodVZP}HfyN3ldqTGQ*8=Wh>#7ZYuF@iBQ$HzTv7fGkZD`SiuJ)-PO z5w4^tb}xU9A+s#1SP~11?!!#iXwj~R&SSyw+n;Fzc3rFKq*&f9G&QW=<4qj~8HOe) zH_P?6LIfiZ>wT&ERb{VQC=pCja(+d$co$a5RiRW&!2%fz64vO1G06^GT!tlb{_sVB zIFU!rd>?@YX;9e^D{o=JJN10pBVkV+;eqhtdY?#$Y=g_oUjv$pt!;sFaq3#O3*dg} z^CNakrfrRdKHm8yBVjT~8+p{kN=S3U|(3|HAtY+bFr2n_$>+1;lwX z|4G2@%O+TH|JK3V<%n8XBITWvx4uKYqRK9$%rJq8#WL7K24Yq1Lv#KG7F&G&VWD=+ z2`ahyaKfPmEdaAmRCx_cbkOC6rV)3_PbZ+9?+ke*RS2X#8726ZB*G-b6#dk*378Y( zOl+Wo!pfh#GlbCM+WGW)XjbvY?i&L2Hq6@8fA6@*!_JIVrWr42;RL5q+4LZvg%2sj z>J!KAo^saYJ#B==fNylX^gMb}N|=xm&8*?$owpVE=;#IR=+Xp*FN?4&Z|@2Nm|<=! zI>eDL_%mR7k%Ld_w=M-o!r<}))QD0W^jj&8`TRo_9%-wDr7IA(EmI`J66W8+=C3~# zvtpTHM;O6syM%WG>YmUxbBAl#9hz1USQ@_$!01RMSbCXf{BJ&V$08yOYwTJQ5`&So zU%~CmymB3_uH|5U%;47wd|;FM1H^YY;)tE;oO0I*&cb?#<%UCqW6SoKF?+I`GIgg-`r@;U<2zr gPah3lIX@FG#v>2R$W!$WrR8C&{*s*Rt1$ zi}DBkntoBA`xV{w4Wtk$dC9J4&Rou%osXZrk%!*kGjPGTIM}#tJ+L8)E zgK4-NeAjZ!1_Z>X9%p`AxK^t};2DAPOSzJymEq_Bm*X0%)u|$nG514woE>8yc<8&e zsBRfxlAX*a_|iRUo>Fk^I*hDq%KU2ep{s`=v!LG~ncv)~=>eI|8z7-1bpG5Ksa-0> zz^$?OG&UN>+fOv1UbpRx=~JP{a>k8hY9IYsLFIXcsBFcaY9v`TldO7uxSg0Z%cGi~ zP!!8|yD~dIq&y_9uM^iu_d-D$Pn(S$c7Ny5YN~3bh?eBbC@tWH@>)IjSI;S1Xx*lP z=UBJB$h7!idVvadB11uZDJLz;2b7mmgVK_?K0m6cGdon%v}#8Jl$U6O_{{C4Z?%+< z0v6Glthsl`TqrF^pWdSa@j+mE(o$Lx9}7p@X{NMQHJfYPi9m&(c;^Xfbw1P=q-31- zIE)1oqPevQe2}J`9-o>CvYTL(1}geMz~#LxU{FFhCu-lDCs5SI?hVSPbQL>Yz1!?v zwmR+RiE(N)8=KFR0$ORd^!mBDEGP&qxAn`8I4>&eXtiNY&z;2X`Z&+iS31}T1g(Ye1IiRImX_J$AQZTM(;N;OmR#Nv!RnPaL<7ZTzRDuyh&kKCh=) z&kQrOPTeXJs!&geOC=5ni31k|;=+LgLU2NYfI#BUB?75P98fP@5C=|tZ{GW6XJ=>M z&f2NSCHBnseee5y?|a|B=ed2y-m%HW>;g5ZqkFWP-P+H3J2Y!MmSLd$TeGZMo#rcbt5MCHmPfZN>w%l!o65V? z*)u9M=gTC-)OV?C>lK<^Se>~~J-w=XdTGIDFU>Oc(lWA_-k7>YNTsg3Zg!oEA@7qc z{IeTdb)%AXJ>7%&AP4VmiC6*If#{?X=qsv*H<+nPm(sW`&Ml$#R*D z_L6M@>gg;hw8{(tMkpLGB|4+280Mt z-?igy;h)i~uNdM)7OU0Z0N#ZlH69!pc7QIEk0~i#P8gn)vz#zjVSy+Y#IfAo)Yusz zL$?hGbL{N!kT&+&(2H$$K+0R&P_xRZ`?^vOlVhIlKsw0u z1MQ$PM2_rHXDf5W|80~EvqaEv%i!CtUZa_#{__iD)S+K%fWOmfxxxZKz3v~J%rSUB zpqwIUaGNqna^W;(p7EJRe8p@FjzDIBJyF-lvrC5SVGwcGxJ+O_X6p|4stX>kA^s!JdO%GMKz&3`M`XG-WErZwOa{>-T#(xjX1s`IY(F?T zR7yERPMGvvuN+#5tv<*=HcZ%>%8tHOr?7lKKq_4($^s1_A)=Gy2rD5%c+?M4BPFN0<EA!u$$xr3+UQVB|v8AE!trWYHyk zi`Ii95@XC2a;)ytz*5Y+??{&FBsa%bnKwOWf9xtrhkjMkr2hfk=Ps-qCr9`6dV_D> zpw@RIrT!vC)K=?Y5L@)lqm?Wh6TUP*J@QYIUB9eR& z)#XuS@u2E*aR=A;+kw98J1m3KYGSu6l}N@FOwfezB2J_~;i;Mg7Os_Ms2I9!J@fsb!LF9b98Sv z5`#C$z^>>D{X~#1%t*}Fak(6x81BA#a=hh1R}bDN=N4Tw&!$~-^eSb^3DI02C$TyV zc0H7nl$$N__;V5nLO6!tl=>by-(hKSYFN5#YUHmvz>=$Y7!(UUxjsvV@Pz@};m7nr zm(D(x%a4E_jVBS^_I+g1uBXE7B7%CRf)wq%F1zt;ShL!I_p>7CTStu$Iip~+#zH$kM>=P zWySunDRP3Z89eXmSr17%q^5F?WbVxump1N|*EfnA^X1Lu_0{>=#k-61b0ePtVbAcl zZ;hlNQw(k{b;?`&yj{hf5Cwy7!W*C`#8w_%LDmzZfFAwezTXleGde-9hXwi7RV=RX z$)P3wAZSISA`h{9(6G8aywHkGzsvg*$-v#u3yui^? z;JaGHcPISn;Sy0hRuA(iusp9LQb(jhD)Kp z-DoMTdN2+Qenv%bd3rLTdm9xIG%EBk`v}v3z{U|jzD)*$SHh7KS>N~Mi3UlF8i5tj ztfJanU05s5&6hXcT8&mzP#odgyKBY!^KY)Ky$-e2Fd_JOWqqVi86iXX`|Rdi5vr;a zu!;~1h1STC!q2Xg6U*YNO59E{ClkC{G}MgvMf_Iiqqz0w|s(A*@;=SjEC^A68Pw(_rusQa=VhJ?UqqFuXF(0bdohCf;6sxw&sPLXq5%lIjq@=8~D z@r(&!HWI;HDZF+NnDLr1*uRBqu+X966KF+tH_%3%5a3oKfVT_Rdjklkk1Ng4e3FV@ z8Q?_EA51ILUH1@UdkY^T?Ct^`*hLav^5f>+La{f9+*MmNVqkv<39ohTD@}N>WjT?4~!%o zk8Q}$Q)DPSF;{XDcMB6H)c-4q^uMkadez^unfh!4TE_U&4QQcE2;fuN0EgW@Fa(cN zL}{P)D=$g5p`AP-mU5!axT(I>+h#ca-3SBoS7?-DXZ*@_37%LEge0r1IxvdJwdzN% z*OYr4jp%5CTa6?Ix@Ned17mk2%I_iZgc=1t?v^H=Hfn?=+us-_0cknhZ4{L|z3o%2 zdD|sa|5b{dh>W3?DalSnXc0`8fc(`&Zl|fA?+s3a5B-_n`AtS-HZN~7BE$)i^wwk~ zO(U8kv|&*G4*gPedM6TGq&Ug|Oty{PTNM}M7T?V+ykDyG0C=?p(OUtxYQdBTxkk(qX&A%~PHi^OTUHlcAq+s&Yr|d1tinrH%3z0N!>5BL&_@oe+5az%_MY zf`ja3Lvh-O1N`pO#()y>$i`^wW{uJ_wpRe%V#g%SV zD=DIo6{b-Rai$@)gl`b8DY-?a{Ba=C$D1(&J*L({1q|i@6=ovt2EpfB5jBsEmU@MAIAI4*xRk zsttc!zim0YGY~P(!yl=2E~00K@ovxcKTKIoed!jzg%J}o_9t#NEA*`!tOwU_fr|Fl zt^r;Qf8&;$^*=2Mgy-IvdW`Q%;sdzQ7jWgoogle.cloud.notebooks.v1.ContainerImage - */ -class ContainerImage extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The path to the container image repository. For example: - * `gcr.io/{project_id}/{image_name}` - * - * Generated from protobuf field string repository = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $repository = ''; - /** - * The tag of the container image. If not specified, this defaults - * to the latest tag. - * - * Generated from protobuf field string tag = 2; - */ - protected $tag = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $repository - * Required. The path to the container image repository. For example: - * `gcr.io/{project_id}/{image_name}` - * @type string $tag - * The tag of the container image. If not specified, this defaults - * to the latest tag. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V1\Environment::initOnce(); - parent::__construct($data); - } - - /** - * Required. The path to the container image repository. For example: - * `gcr.io/{project_id}/{image_name}` - * - * Generated from protobuf field string repository = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getRepository() - { - return $this->repository; - } - - /** - * Required. The path to the container image repository. For example: - * `gcr.io/{project_id}/{image_name}` - * - * Generated from protobuf field string repository = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setRepository($var) - { - GPBUtil::checkString($var, True); - $this->repository = $var; - - return $this; - } - - /** - * The tag of the container image. If not specified, this defaults - * to the latest tag. - * - * Generated from protobuf field string tag = 2; - * @return string - */ - public function getTag() - { - return $this->tag; - } - - /** - * The tag of the container image. If not specified, this defaults - * to the latest tag. - * - * Generated from protobuf field string tag = 2; - * @param string $var - * @return $this - */ - public function setTag($var) - { - GPBUtil::checkString($var, True); - $this->tag = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/CreateEnvironmentRequest.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/CreateEnvironmentRequest.php deleted file mode 100644 index ec9ffc493c20..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/CreateEnvironmentRequest.php +++ /dev/null @@ -1,177 +0,0 @@ -google.cloud.notebooks.v1.CreateEnvironmentRequest - */ -class CreateEnvironmentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Format: `projects/{project_id}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $parent = ''; - /** - * Required. User-defined unique ID of this environment. The `environment_id` must - * be 1 to 63 characters long and contain only lowercase letters, - * numeric characters, and dashes. The first character must be a lowercase - * letter and the last character cannot be a dash. - * - * Generated from protobuf field string environment_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $environment_id = ''; - /** - * Required. The environment to be created. - * - * Generated from protobuf field .google.cloud.notebooks.v1.Environment environment = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $environment = null; - - /** - * @param string $parent Required. Format: `projects/{project_id}/locations/{location}` - * @param \Google\Cloud\Notebooks\V1\Environment $environment Required. The environment to be created. - * @param string $environmentId Required. User-defined unique ID of this environment. The `environment_id` must - * be 1 to 63 characters long and contain only lowercase letters, - * numeric characters, and dashes. The first character must be a lowercase - * letter and the last character cannot be a dash. - * - * @return \Google\Cloud\Notebooks\V1\CreateEnvironmentRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Notebooks\V1\Environment $environment, string $environmentId): self - { - return (new self()) - ->setParent($parent) - ->setEnvironment($environment) - ->setEnvironmentId($environmentId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Format: `projects/{project_id}/locations/{location}` - * @type string $environment_id - * Required. User-defined unique ID of this environment. The `environment_id` must - * be 1 to 63 characters long and contain only lowercase letters, - * numeric characters, and dashes. The first character must be a lowercase - * letter and the last character cannot be a dash. - * @type \Google\Cloud\Notebooks\V1\Environment $environment - * Required. The environment to be created. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. Format: `projects/{project_id}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Format: `projects/{project_id}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. User-defined unique ID of this environment. The `environment_id` must - * be 1 to 63 characters long and contain only lowercase letters, - * numeric characters, and dashes. The first character must be a lowercase - * letter and the last character cannot be a dash. - * - * Generated from protobuf field string environment_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getEnvironmentId() - { - return $this->environment_id; - } - - /** - * Required. User-defined unique ID of this environment. The `environment_id` must - * be 1 to 63 characters long and contain only lowercase letters, - * numeric characters, and dashes. The first character must be a lowercase - * letter and the last character cannot be a dash. - * - * Generated from protobuf field string environment_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setEnvironmentId($var) - { - GPBUtil::checkString($var, True); - $this->environment_id = $var; - - return $this; - } - - /** - * Required. The environment to be created. - * - * Generated from protobuf field .google.cloud.notebooks.v1.Environment environment = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Notebooks\V1\Environment|null - */ - public function getEnvironment() - { - return $this->environment; - } - - public function hasEnvironment() - { - return isset($this->environment); - } - - public function clearEnvironment() - { - unset($this->environment); - } - - /** - * Required. The environment to be created. - * - * Generated from protobuf field .google.cloud.notebooks.v1.Environment environment = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Notebooks\V1\Environment $var - * @return $this - */ - public function setEnvironment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V1\Environment::class); - $this->environment = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/CreateExecutionRequest.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/CreateExecutionRequest.php deleted file mode 100644 index 1a9830086a8e..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/CreateExecutionRequest.php +++ /dev/null @@ -1,168 +0,0 @@ -google.cloud.notebooks.v1.CreateExecutionRequest - */ -class CreateExecutionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Format: - * `parent=projects/{project_id}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. User-defined unique ID of this execution. - * - * Generated from protobuf field string execution_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $execution_id = ''; - /** - * Required. The execution to be created. - * - * Generated from protobuf field .google.cloud.notebooks.v1.Execution execution = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $execution = null; - - /** - * @param string $parent Required. Format: - * `parent=projects/{project_id}/locations/{location}` - * Please see {@see NotebookServiceClient::executionName()} for help formatting this field. - * @param \Google\Cloud\Notebooks\V1\Execution $execution Required. The execution to be created. - * @param string $executionId Required. User-defined unique ID of this execution. - * - * @return \Google\Cloud\Notebooks\V1\CreateExecutionRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Notebooks\V1\Execution $execution, string $executionId): self - { - return (new self()) - ->setParent($parent) - ->setExecution($execution) - ->setExecutionId($executionId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Format: - * `parent=projects/{project_id}/locations/{location}` - * @type string $execution_id - * Required. User-defined unique ID of this execution. - * @type \Google\Cloud\Notebooks\V1\Execution $execution - * Required. The execution to be created. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. Format: - * `parent=projects/{project_id}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Format: - * `parent=projects/{project_id}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. User-defined unique ID of this execution. - * - * Generated from protobuf field string execution_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getExecutionId() - { - return $this->execution_id; - } - - /** - * Required. User-defined unique ID of this execution. - * - * Generated from protobuf field string execution_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setExecutionId($var) - { - GPBUtil::checkString($var, True); - $this->execution_id = $var; - - return $this; - } - - /** - * Required. The execution to be created. - * - * Generated from protobuf field .google.cloud.notebooks.v1.Execution execution = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Notebooks\V1\Execution|null - */ - public function getExecution() - { - return $this->execution; - } - - public function hasExecution() - { - return isset($this->execution); - } - - public function clearExecution() - { - unset($this->execution); - } - - /** - * Required. The execution to be created. - * - * Generated from protobuf field .google.cloud.notebooks.v1.Execution execution = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Notebooks\V1\Execution $var - * @return $this - */ - public function setExecution($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V1\Execution::class); - $this->execution = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/CreateInstanceRequest.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/CreateInstanceRequest.php deleted file mode 100644 index 939cf437387c..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/CreateInstanceRequest.php +++ /dev/null @@ -1,167 +0,0 @@ -google.cloud.notebooks.v1.CreateInstanceRequest - */ -class CreateInstanceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Format: - * `parent=projects/{project_id}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $parent = ''; - /** - * Required. User-defined unique ID of this instance. - * - * Generated from protobuf field string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $instance_id = ''; - /** - * Required. The instance to be created. - * - * Generated from protobuf field .google.cloud.notebooks.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $instance = null; - - /** - * @param string $parent Required. Format: - * `parent=projects/{project_id}/locations/{location}` - * @param \Google\Cloud\Notebooks\V1\Instance $instance Required. The instance to be created. - * @param string $instanceId Required. User-defined unique ID of this instance. - * - * @return \Google\Cloud\Notebooks\V1\CreateInstanceRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Notebooks\V1\Instance $instance, string $instanceId): self - { - return (new self()) - ->setParent($parent) - ->setInstance($instance) - ->setInstanceId($instanceId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Format: - * `parent=projects/{project_id}/locations/{location}` - * @type string $instance_id - * Required. User-defined unique ID of this instance. - * @type \Google\Cloud\Notebooks\V1\Instance $instance - * Required. The instance to be created. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. Format: - * `parent=projects/{project_id}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Format: - * `parent=projects/{project_id}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. User-defined unique ID of this instance. - * - * Generated from protobuf field string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getInstanceId() - { - return $this->instance_id; - } - - /** - * Required. User-defined unique ID of this instance. - * - * Generated from protobuf field string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setInstanceId($var) - { - GPBUtil::checkString($var, True); - $this->instance_id = $var; - - return $this; - } - - /** - * Required. The instance to be created. - * - * Generated from protobuf field .google.cloud.notebooks.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Notebooks\V1\Instance|null - */ - public function getInstance() - { - return $this->instance; - } - - public function hasInstance() - { - return isset($this->instance); - } - - public function clearInstance() - { - unset($this->instance); - } - - /** - * Required. The instance to be created. - * - * Generated from protobuf field .google.cloud.notebooks.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Notebooks\V1\Instance $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V1\Instance::class); - $this->instance = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/CreateRuntimeRequest.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/CreateRuntimeRequest.php deleted file mode 100644 index e243650c684a..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/CreateRuntimeRequest.php +++ /dev/null @@ -1,202 +0,0 @@ -google.cloud.notebooks.v1.CreateRuntimeRequest - */ -class CreateRuntimeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Format: - * `parent=projects/{project_id}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. User-defined unique ID of this Runtime. - * - * Generated from protobuf field string runtime_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $runtime_id = ''; - /** - * Required. The Runtime to be created. - * - * Generated from protobuf field .google.cloud.notebooks.v1.Runtime runtime = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $runtime = null; - /** - * Idempotent request UUID. - * - * Generated from protobuf field string request_id = 4; - */ - protected $request_id = ''; - - /** - * @param string $parent Required. Format: - * `parent=projects/{project_id}/locations/{location}` - * Please see {@see ManagedNotebookServiceClient::runtimeName()} for help formatting this field. - * @param string $runtimeId Required. User-defined unique ID of this Runtime. - * @param \Google\Cloud\Notebooks\V1\Runtime $runtime Required. The Runtime to be created. - * - * @return \Google\Cloud\Notebooks\V1\CreateRuntimeRequest - * - * @experimental - */ - public static function build(string $parent, string $runtimeId, \Google\Cloud\Notebooks\V1\Runtime $runtime): self - { - return (new self()) - ->setParent($parent) - ->setRuntimeId($runtimeId) - ->setRuntime($runtime); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Format: - * `parent=projects/{project_id}/locations/{location}` - * @type string $runtime_id - * Required. User-defined unique ID of this Runtime. - * @type \Google\Cloud\Notebooks\V1\Runtime $runtime - * Required. The Runtime to be created. - * @type string $request_id - * Idempotent request UUID. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V1\ManagedService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Format: - * `parent=projects/{project_id}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Format: - * `parent=projects/{project_id}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. User-defined unique ID of this Runtime. - * - * Generated from protobuf field string runtime_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getRuntimeId() - { - return $this->runtime_id; - } - - /** - * Required. User-defined unique ID of this Runtime. - * - * Generated from protobuf field string runtime_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setRuntimeId($var) - { - GPBUtil::checkString($var, True); - $this->runtime_id = $var; - - return $this; - } - - /** - * Required. The Runtime to be created. - * - * Generated from protobuf field .google.cloud.notebooks.v1.Runtime runtime = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Notebooks\V1\Runtime|null - */ - public function getRuntime() - { - return $this->runtime; - } - - public function hasRuntime() - { - return isset($this->runtime); - } - - public function clearRuntime() - { - unset($this->runtime); - } - - /** - * Required. The Runtime to be created. - * - * Generated from protobuf field .google.cloud.notebooks.v1.Runtime runtime = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Notebooks\V1\Runtime $var - * @return $this - */ - public function setRuntime($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V1\Runtime::class); - $this->runtime = $var; - - return $this; - } - - /** - * Idempotent request UUID. - * - * Generated from protobuf field string request_id = 4; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Idempotent request UUID. - * - * Generated from protobuf field string request_id = 4; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/CreateScheduleRequest.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/CreateScheduleRequest.php deleted file mode 100644 index 888985827ce4..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/CreateScheduleRequest.php +++ /dev/null @@ -1,168 +0,0 @@ -google.cloud.notebooks.v1.CreateScheduleRequest - */ -class CreateScheduleRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Format: - * `parent=projects/{project_id}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. User-defined unique ID of this schedule. - * - * Generated from protobuf field string schedule_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $schedule_id = ''; - /** - * Required. The schedule to be created. - * - * Generated from protobuf field .google.cloud.notebooks.v1.Schedule schedule = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $schedule = null; - - /** - * @param string $parent Required. Format: - * `parent=projects/{project_id}/locations/{location}` - * Please see {@see NotebookServiceClient::scheduleName()} for help formatting this field. - * @param \Google\Cloud\Notebooks\V1\Schedule $schedule Required. The schedule to be created. - * @param string $scheduleId Required. User-defined unique ID of this schedule. - * - * @return \Google\Cloud\Notebooks\V1\CreateScheduleRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Notebooks\V1\Schedule $schedule, string $scheduleId): self - { - return (new self()) - ->setParent($parent) - ->setSchedule($schedule) - ->setScheduleId($scheduleId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Format: - * `parent=projects/{project_id}/locations/{location}` - * @type string $schedule_id - * Required. User-defined unique ID of this schedule. - * @type \Google\Cloud\Notebooks\V1\Schedule $schedule - * Required. The schedule to be created. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. Format: - * `parent=projects/{project_id}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Format: - * `parent=projects/{project_id}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. User-defined unique ID of this schedule. - * - * Generated from protobuf field string schedule_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getScheduleId() - { - return $this->schedule_id; - } - - /** - * Required. User-defined unique ID of this schedule. - * - * Generated from protobuf field string schedule_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setScheduleId($var) - { - GPBUtil::checkString($var, True); - $this->schedule_id = $var; - - return $this; - } - - /** - * Required. The schedule to be created. - * - * Generated from protobuf field .google.cloud.notebooks.v1.Schedule schedule = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Notebooks\V1\Schedule|null - */ - public function getSchedule() - { - return $this->schedule; - } - - public function hasSchedule() - { - return isset($this->schedule); - } - - public function clearSchedule() - { - unset($this->schedule); - } - - /** - * Required. The schedule to be created. - * - * Generated from protobuf field .google.cloud.notebooks.v1.Schedule schedule = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Notebooks\V1\Schedule $var - * @return $this - */ - public function setSchedule($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V1\Schedule::class); - $this->schedule = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/DeleteEnvironmentRequest.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/DeleteEnvironmentRequest.php deleted file mode 100644 index 5e6b4395d2c5..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/DeleteEnvironmentRequest.php +++ /dev/null @@ -1,85 +0,0 @@ -google.cloud.notebooks.v1.DeleteEnvironmentRequest - */ -class DeleteEnvironmentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/environments/{environment_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - - /** - * @param string $name Required. Format: - * `projects/{project_id}/locations/{location}/environments/{environment_id}` - * - * @return \Google\Cloud\Notebooks\V1\DeleteEnvironmentRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Format: - * `projects/{project_id}/locations/{location}/environments/{environment_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/environments/{environment_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/environments/{environment_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/DeleteExecutionRequest.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/DeleteExecutionRequest.php deleted file mode 100644 index 6435f7ee1ac0..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/DeleteExecutionRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.notebooks.v1.DeleteExecutionRequest - */ -class DeleteExecutionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/executions/{execution_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Format: - * `projects/{project_id}/locations/{location}/executions/{execution_id}` - * Please see {@see NotebookServiceClient::executionName()} for help formatting this field. - * - * @return \Google\Cloud\Notebooks\V1\DeleteExecutionRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Format: - * `projects/{project_id}/locations/{location}/executions/{execution_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/executions/{execution_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/executions/{execution_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/DeleteInstanceRequest.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/DeleteInstanceRequest.php deleted file mode 100644 index 0cfd481b0578..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/DeleteInstanceRequest.php +++ /dev/null @@ -1,85 +0,0 @@ -google.cloud.notebooks.v1.DeleteInstanceRequest - */ -class DeleteInstanceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - - /** - * @param string $name Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * - * @return \Google\Cloud\Notebooks\V1\DeleteInstanceRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/DeleteRuntimeRequest.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/DeleteRuntimeRequest.php deleted file mode 100644 index 0235ff0c569f..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/DeleteRuntimeRequest.php +++ /dev/null @@ -1,120 +0,0 @@ -google.cloud.notebooks.v1.DeleteRuntimeRequest - */ -class DeleteRuntimeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Idempotent request UUID. - * - * Generated from protobuf field string request_id = 2; - */ - protected $request_id = ''; - - /** - * @param string $name Required. Format: - * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` - * Please see {@see ManagedNotebookServiceClient::runtimeName()} for help formatting this field. - * - * @return \Google\Cloud\Notebooks\V1\DeleteRuntimeRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Format: - * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` - * @type string $request_id - * Idempotent request UUID. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V1\ManagedService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Idempotent request UUID. - * - * Generated from protobuf field string request_id = 2; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Idempotent request UUID. - * - * Generated from protobuf field string request_id = 2; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/DeleteScheduleRequest.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/DeleteScheduleRequest.php deleted file mode 100644 index b39703383d85..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/DeleteScheduleRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.notebooks.v1.DeleteScheduleRequest - */ -class DeleteScheduleRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/schedules/{schedule_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Format: - * `projects/{project_id}/locations/{location}/schedules/{schedule_id}` - * Please see {@see NotebookServiceClient::scheduleName()} for help formatting this field. - * - * @return \Google\Cloud\Notebooks\V1\DeleteScheduleRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Format: - * `projects/{project_id}/locations/{location}/schedules/{schedule_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/schedules/{schedule_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/schedules/{schedule_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/DiagnoseInstanceRequest.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/DiagnoseInstanceRequest.php deleted file mode 100644 index 3d75ec3995b2..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/DiagnoseInstanceRequest.php +++ /dev/null @@ -1,132 +0,0 @@ -google.cloud.notebooks.v1.DiagnoseInstanceRequest - */ -class DiagnoseInstanceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. Defines flags that are used to run the diagnostic tool - * - * Generated from protobuf field .google.cloud.notebooks.v1.DiagnosticConfig diagnostic_config = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $diagnostic_config = null; - - /** - * @param string $name Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * Please see {@see NotebookServiceClient::instanceName()} for help formatting this field. - * @param \Google\Cloud\Notebooks\V1\DiagnosticConfig $diagnosticConfig Required. Defines flags that are used to run the diagnostic tool - * - * @return \Google\Cloud\Notebooks\V1\DiagnoseInstanceRequest - * - * @experimental - */ - public static function build(string $name, \Google\Cloud\Notebooks\V1\DiagnosticConfig $diagnosticConfig): self - { - return (new self()) - ->setName($name) - ->setDiagnosticConfig($diagnosticConfig); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * @type \Google\Cloud\Notebooks\V1\DiagnosticConfig $diagnostic_config - * Required. Defines flags that are used to run the diagnostic tool - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. Defines flags that are used to run the diagnostic tool - * - * Generated from protobuf field .google.cloud.notebooks.v1.DiagnosticConfig diagnostic_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Notebooks\V1\DiagnosticConfig|null - */ - public function getDiagnosticConfig() - { - return $this->diagnostic_config; - } - - public function hasDiagnosticConfig() - { - return isset($this->diagnostic_config); - } - - public function clearDiagnosticConfig() - { - unset($this->diagnostic_config); - } - - /** - * Required. Defines flags that are used to run the diagnostic tool - * - * Generated from protobuf field .google.cloud.notebooks.v1.DiagnosticConfig diagnostic_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Notebooks\V1\DiagnosticConfig $var - * @return $this - */ - public function setDiagnosticConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V1\DiagnosticConfig::class); - $this->diagnostic_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/DiagnoseRuntimeRequest.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/DiagnoseRuntimeRequest.php deleted file mode 100644 index 3a76ddd8406b..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/DiagnoseRuntimeRequest.php +++ /dev/null @@ -1,132 +0,0 @@ -google.cloud.notebooks.v1.DiagnoseRuntimeRequest - */ -class DiagnoseRuntimeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/runtimes/{runtimes_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. Defines flags that are used to run the diagnostic tool - * - * Generated from protobuf field .google.cloud.notebooks.v1.DiagnosticConfig diagnostic_config = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $diagnostic_config = null; - - /** - * @param string $name Required. Format: - * `projects/{project_id}/locations/{location}/runtimes/{runtimes_id}` - * Please see {@see ManagedNotebookServiceClient::runtimeName()} for help formatting this field. - * @param \Google\Cloud\Notebooks\V1\DiagnosticConfig $diagnosticConfig Required. Defines flags that are used to run the diagnostic tool - * - * @return \Google\Cloud\Notebooks\V1\DiagnoseRuntimeRequest - * - * @experimental - */ - public static function build(string $name, \Google\Cloud\Notebooks\V1\DiagnosticConfig $diagnosticConfig): self - { - return (new self()) - ->setName($name) - ->setDiagnosticConfig($diagnosticConfig); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Format: - * `projects/{project_id}/locations/{location}/runtimes/{runtimes_id}` - * @type \Google\Cloud\Notebooks\V1\DiagnosticConfig $diagnostic_config - * Required. Defines flags that are used to run the diagnostic tool - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V1\ManagedService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/runtimes/{runtimes_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/runtimes/{runtimes_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. Defines flags that are used to run the diagnostic tool - * - * Generated from protobuf field .google.cloud.notebooks.v1.DiagnosticConfig diagnostic_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Notebooks\V1\DiagnosticConfig|null - */ - public function getDiagnosticConfig() - { - return $this->diagnostic_config; - } - - public function hasDiagnosticConfig() - { - return isset($this->diagnostic_config); - } - - public function clearDiagnosticConfig() - { - unset($this->diagnostic_config); - } - - /** - * Required. Defines flags that are used to run the diagnostic tool - * - * Generated from protobuf field .google.cloud.notebooks.v1.DiagnosticConfig diagnostic_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Notebooks\V1\DiagnosticConfig $var - * @return $this - */ - public function setDiagnosticConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V1\DiagnosticConfig::class); - $this->diagnostic_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/DiagnosticConfig.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/DiagnosticConfig.php deleted file mode 100644 index 9e051f4082f2..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/DiagnosticConfig.php +++ /dev/null @@ -1,263 +0,0 @@ -google.cloud.notebooks.v1.DiagnosticConfig - */ -class DiagnosticConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Required. User Cloud Storage bucket location (REQUIRED). - * Must be formatted with path prefix (`gs://$GCS_BUCKET`). - * Permissions: - * User Managed Notebooks: - * - storage.buckets.writer: Must be given to the project's service account - * attached to VM. - * Google Managed Notebooks: - * - storage.buckets.writer: Must be given to the project's service account or - * user credentials attached to VM depending on authentication mode. - * Cloud Storage bucket Log file will be written to - * `gs://$GCS_BUCKET/$RELATIVE_PATH/$VM_DATE_$TIME.tar.gz` - * - * Generated from protobuf field string gcs_bucket = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $gcs_bucket = ''; - /** - * Optional. Defines the relative storage path in the Cloud Storage bucket - * where the diagnostic logs will be written: Default path will be the root - * directory of the Cloud Storage bucket - * (`gs://$GCS_BUCKET/$DATE_$TIME.tar.gz`) - * Example of full path where Log file will be written: - * `gs://$GCS_BUCKET/$RELATIVE_PATH/` - * - * Generated from protobuf field string relative_path = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $relative_path = ''; - /** - * Optional. Enables flag to repair service for instance - * - * Generated from protobuf field bool repair_flag_enabled = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $repair_flag_enabled = false; - /** - * Optional. Enables flag to capture packets from the instance for 30 seconds - * - * Generated from protobuf field bool packet_capture_flag_enabled = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $packet_capture_flag_enabled = false; - /** - * Optional. Enables flag to copy all `/home/jupyter` folder contents - * - * Generated from protobuf field bool copy_home_files_flag_enabled = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $copy_home_files_flag_enabled = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $gcs_bucket - * Required. User Cloud Storage bucket location (REQUIRED). - * Must be formatted with path prefix (`gs://$GCS_BUCKET`). - * Permissions: - * User Managed Notebooks: - * - storage.buckets.writer: Must be given to the project's service account - * attached to VM. - * Google Managed Notebooks: - * - storage.buckets.writer: Must be given to the project's service account or - * user credentials attached to VM depending on authentication mode. - * Cloud Storage bucket Log file will be written to - * `gs://$GCS_BUCKET/$RELATIVE_PATH/$VM_DATE_$TIME.tar.gz` - * @type string $relative_path - * Optional. Defines the relative storage path in the Cloud Storage bucket - * where the diagnostic logs will be written: Default path will be the root - * directory of the Cloud Storage bucket - * (`gs://$GCS_BUCKET/$DATE_$TIME.tar.gz`) - * Example of full path where Log file will be written: - * `gs://$GCS_BUCKET/$RELATIVE_PATH/` - * @type bool $repair_flag_enabled - * Optional. Enables flag to repair service for instance - * @type bool $packet_capture_flag_enabled - * Optional. Enables flag to capture packets from the instance for 30 seconds - * @type bool $copy_home_files_flag_enabled - * Optional. Enables flag to copy all `/home/jupyter` folder contents - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V1\DiagnosticConfig::initOnce(); - parent::__construct($data); - } - - /** - * Required. User Cloud Storage bucket location (REQUIRED). - * Must be formatted with path prefix (`gs://$GCS_BUCKET`). - * Permissions: - * User Managed Notebooks: - * - storage.buckets.writer: Must be given to the project's service account - * attached to VM. - * Google Managed Notebooks: - * - storage.buckets.writer: Must be given to the project's service account or - * user credentials attached to VM depending on authentication mode. - * Cloud Storage bucket Log file will be written to - * `gs://$GCS_BUCKET/$RELATIVE_PATH/$VM_DATE_$TIME.tar.gz` - * - * Generated from protobuf field string gcs_bucket = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getGcsBucket() - { - return $this->gcs_bucket; - } - - /** - * Required. User Cloud Storage bucket location (REQUIRED). - * Must be formatted with path prefix (`gs://$GCS_BUCKET`). - * Permissions: - * User Managed Notebooks: - * - storage.buckets.writer: Must be given to the project's service account - * attached to VM. - * Google Managed Notebooks: - * - storage.buckets.writer: Must be given to the project's service account or - * user credentials attached to VM depending on authentication mode. - * Cloud Storage bucket Log file will be written to - * `gs://$GCS_BUCKET/$RELATIVE_PATH/$VM_DATE_$TIME.tar.gz` - * - * Generated from protobuf field string gcs_bucket = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setGcsBucket($var) - { - GPBUtil::checkString($var, True); - $this->gcs_bucket = $var; - - return $this; - } - - /** - * Optional. Defines the relative storage path in the Cloud Storage bucket - * where the diagnostic logs will be written: Default path will be the root - * directory of the Cloud Storage bucket - * (`gs://$GCS_BUCKET/$DATE_$TIME.tar.gz`) - * Example of full path where Log file will be written: - * `gs://$GCS_BUCKET/$RELATIVE_PATH/` - * - * Generated from protobuf field string relative_path = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRelativePath() - { - return $this->relative_path; - } - - /** - * Optional. Defines the relative storage path in the Cloud Storage bucket - * where the diagnostic logs will be written: Default path will be the root - * directory of the Cloud Storage bucket - * (`gs://$GCS_BUCKET/$DATE_$TIME.tar.gz`) - * Example of full path where Log file will be written: - * `gs://$GCS_BUCKET/$RELATIVE_PATH/` - * - * Generated from protobuf field string relative_path = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRelativePath($var) - { - GPBUtil::checkString($var, True); - $this->relative_path = $var; - - return $this; - } - - /** - * Optional. Enables flag to repair service for instance - * - * Generated from protobuf field bool repair_flag_enabled = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getRepairFlagEnabled() - { - return $this->repair_flag_enabled; - } - - /** - * Optional. Enables flag to repair service for instance - * - * Generated from protobuf field bool repair_flag_enabled = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setRepairFlagEnabled($var) - { - GPBUtil::checkBool($var); - $this->repair_flag_enabled = $var; - - return $this; - } - - /** - * Optional. Enables flag to capture packets from the instance for 30 seconds - * - * Generated from protobuf field bool packet_capture_flag_enabled = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getPacketCaptureFlagEnabled() - { - return $this->packet_capture_flag_enabled; - } - - /** - * Optional. Enables flag to capture packets from the instance for 30 seconds - * - * Generated from protobuf field bool packet_capture_flag_enabled = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setPacketCaptureFlagEnabled($var) - { - GPBUtil::checkBool($var); - $this->packet_capture_flag_enabled = $var; - - return $this; - } - - /** - * Optional. Enables flag to copy all `/home/jupyter` folder contents - * - * Generated from protobuf field bool copy_home_files_flag_enabled = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getCopyHomeFilesFlagEnabled() - { - return $this->copy_home_files_flag_enabled; - } - - /** - * Optional. Enables flag to copy all `/home/jupyter` folder contents - * - * Generated from protobuf field bool copy_home_files_flag_enabled = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setCopyHomeFilesFlagEnabled($var) - { - GPBUtil::checkBool($var); - $this->copy_home_files_flag_enabled = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/EncryptionConfig.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/EncryptionConfig.php deleted file mode 100644 index 0c4d23f850e9..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/EncryptionConfig.php +++ /dev/null @@ -1,80 +0,0 @@ -google.cloud.notebooks.v1.EncryptionConfig - */ -class EncryptionConfig extends \Google\Protobuf\Internal\Message -{ - /** - * The Cloud KMS resource identifier of the customer-managed encryption key - * used to protect a resource, such as a disks. It has the following - * format: - * `projects/{PROJECT_ID}/locations/{REGION}/keyRings/{KEY_RING_NAME}/cryptoKeys/{KEY_NAME}` - * - * Generated from protobuf field string kms_key = 1; - */ - protected $kms_key = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $kms_key - * The Cloud KMS resource identifier of the customer-managed encryption key - * used to protect a resource, such as a disks. It has the following - * format: - * `projects/{PROJECT_ID}/locations/{REGION}/keyRings/{KEY_RING_NAME}/cryptoKeys/{KEY_NAME}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V1\Runtime::initOnce(); - parent::__construct($data); - } - - /** - * The Cloud KMS resource identifier of the customer-managed encryption key - * used to protect a resource, such as a disks. It has the following - * format: - * `projects/{PROJECT_ID}/locations/{REGION}/keyRings/{KEY_RING_NAME}/cryptoKeys/{KEY_NAME}` - * - * Generated from protobuf field string kms_key = 1; - * @return string - */ - public function getKmsKey() - { - return $this->kms_key; - } - - /** - * The Cloud KMS resource identifier of the customer-managed encryption key - * used to protect a resource, such as a disks. It has the following - * format: - * `projects/{PROJECT_ID}/locations/{REGION}/keyRings/{KEY_RING_NAME}/cryptoKeys/{KEY_NAME}` - * - * Generated from protobuf field string kms_key = 1; - * @param string $var - * @return $this - */ - public function setKmsKey($var) - { - GPBUtil::checkString($var, True); - $this->kms_key = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Environment.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Environment.php deleted file mode 100644 index acba5f6f762f..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Environment.php +++ /dev/null @@ -1,305 +0,0 @@ -google.cloud.notebooks.v1.Environment - */ -class Environment extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Name of this environment. - * Format: - * `projects/{project_id}/locations/{location}/environments/{environment_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Display name of this environment for the UI. - * - * Generated from protobuf field string display_name = 2; - */ - protected $display_name = ''; - /** - * A brief description of this environment. - * - * Generated from protobuf field string description = 3; - */ - protected $description = ''; - /** - * Path to a Bash script that automatically runs after a notebook instance - * fully boots up. The path must be a URL or - * Cloud Storage path. Example: `"gs://path-to-file/file-name"` - * - * Generated from protobuf field string post_startup_script = 8; - */ - protected $post_startup_script = ''; - /** - * Output only. The time at which this environment was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - protected $image_type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. Name of this environment. - * Format: - * `projects/{project_id}/locations/{location}/environments/{environment_id}` - * @type string $display_name - * Display name of this environment for the UI. - * @type string $description - * A brief description of this environment. - * @type \Google\Cloud\Notebooks\V1\VmImage $vm_image - * Use a Compute Engine VM image to start the notebook instance. - * @type \Google\Cloud\Notebooks\V1\ContainerImage $container_image - * Use a container image to start the notebook instance. - * @type string $post_startup_script - * Path to a Bash script that automatically runs after a notebook instance - * fully boots up. The path must be a URL or - * Cloud Storage path. Example: `"gs://path-to-file/file-name"` - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time at which this environment was created. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V1\Environment::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Name of this environment. - * Format: - * `projects/{project_id}/locations/{location}/environments/{environment_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. Name of this environment. - * Format: - * `projects/{project_id}/locations/{location}/environments/{environment_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Display name of this environment for the UI. - * - * Generated from protobuf field string display_name = 2; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Display name of this environment for the UI. - * - * Generated from protobuf field string display_name = 2; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * A brief description of this environment. - * - * Generated from protobuf field string description = 3; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * A brief description of this environment. - * - * Generated from protobuf field string description = 3; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Use a Compute Engine VM image to start the notebook instance. - * - * Generated from protobuf field .google.cloud.notebooks.v1.VmImage vm_image = 6; - * @return \Google\Cloud\Notebooks\V1\VmImage|null - */ - public function getVmImage() - { - return $this->readOneof(6); - } - - public function hasVmImage() - { - return $this->hasOneof(6); - } - - /** - * Use a Compute Engine VM image to start the notebook instance. - * - * Generated from protobuf field .google.cloud.notebooks.v1.VmImage vm_image = 6; - * @param \Google\Cloud\Notebooks\V1\VmImage $var - * @return $this - */ - public function setVmImage($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V1\VmImage::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * Use a container image to start the notebook instance. - * - * Generated from protobuf field .google.cloud.notebooks.v1.ContainerImage container_image = 7; - * @return \Google\Cloud\Notebooks\V1\ContainerImage|null - */ - public function getContainerImage() - { - return $this->readOneof(7); - } - - public function hasContainerImage() - { - return $this->hasOneof(7); - } - - /** - * Use a container image to start the notebook instance. - * - * Generated from protobuf field .google.cloud.notebooks.v1.ContainerImage container_image = 7; - * @param \Google\Cloud\Notebooks\V1\ContainerImage $var - * @return $this - */ - public function setContainerImage($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V1\ContainerImage::class); - $this->writeOneof(7, $var); - - return $this; - } - - /** - * Path to a Bash script that automatically runs after a notebook instance - * fully boots up. The path must be a URL or - * Cloud Storage path. Example: `"gs://path-to-file/file-name"` - * - * Generated from protobuf field string post_startup_script = 8; - * @return string - */ - public function getPostStartupScript() - { - return $this->post_startup_script; - } - - /** - * Path to a Bash script that automatically runs after a notebook instance - * fully boots up. The path must be a URL or - * Cloud Storage path. Example: `"gs://path-to-file/file-name"` - * - * Generated from protobuf field string post_startup_script = 8; - * @param string $var - * @return $this - */ - public function setPostStartupScript($var) - { - GPBUtil::checkString($var, True); - $this->post_startup_script = $var; - - return $this; - } - - /** - * Output only. The time at which this environment was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The time at which this environment was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * @return string - */ - public function getImageType() - { - return $this->whichOneof("image_type"); - } - -} - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Event.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Event.php deleted file mode 100644 index e283621af63c..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Event.php +++ /dev/null @@ -1,145 +0,0 @@ -google.cloud.notebooks.v1.Event - */ -class Event extends \Google\Protobuf\Internal\Message -{ - /** - * Event report time. - * - * Generated from protobuf field .google.protobuf.Timestamp report_time = 1; - */ - protected $report_time = null; - /** - * Event type. - * - * Generated from protobuf field .google.cloud.notebooks.v1.Event.EventType type = 2; - */ - protected $type = 0; - /** - * Optional. Event details. This field is used to pass event information. - * - * Generated from protobuf field map details = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $details; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $report_time - * Event report time. - * @type int $type - * Event type. - * @type array|\Google\Protobuf\Internal\MapField $details - * Optional. Event details. This field is used to pass event information. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V1\Event::initOnce(); - parent::__construct($data); - } - - /** - * Event report time. - * - * Generated from protobuf field .google.protobuf.Timestamp report_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getReportTime() - { - return $this->report_time; - } - - public function hasReportTime() - { - return isset($this->report_time); - } - - public function clearReportTime() - { - unset($this->report_time); - } - - /** - * Event report time. - * - * Generated from protobuf field .google.protobuf.Timestamp report_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setReportTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->report_time = $var; - - return $this; - } - - /** - * Event type. - * - * Generated from protobuf field .google.cloud.notebooks.v1.Event.EventType type = 2; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Event type. - * - * Generated from protobuf field .google.cloud.notebooks.v1.Event.EventType type = 2; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Notebooks\V1\Event\EventType::class); - $this->type = $var; - - return $this; - } - - /** - * Optional. Event details. This field is used to pass event information. - * - * Generated from protobuf field map details = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getDetails() - { - return $this->details; - } - - /** - * Optional. Event details. This field is used to pass event information. - * - * Generated from protobuf field map details = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setDetails($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->details = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Event/EventType.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Event/EventType.php deleted file mode 100644 index 40fde28d60fd..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Event/EventType.php +++ /dev/null @@ -1,84 +0,0 @@ -google.cloud.notebooks.v1.Event.EventType - */ -class EventType -{ - /** - * Event is not specified. - * - * Generated from protobuf enum EVENT_TYPE_UNSPECIFIED = 0; - */ - const EVENT_TYPE_UNSPECIFIED = 0; - /** - * The instance / runtime is idle - * - * Generated from protobuf enum IDLE = 1; - */ - const IDLE = 1; - /** - * The instance / runtime is available. - * This event indicates that instance / runtime underlying compute is - * operational. - * - * Generated from protobuf enum HEARTBEAT = 2; - */ - const HEARTBEAT = 2; - /** - * The instance / runtime health is available. - * This event indicates that instance / runtime health information. - * - * Generated from protobuf enum HEALTH = 3; - */ - const HEALTH = 3; - /** - * The instance / runtime is available. - * This event allows instance / runtime to send Host maintenance - * information to Control Plane. - * https://cloud.google.com/compute/docs/gpus/gpu-host-maintenance - * - * Generated from protobuf enum MAINTENANCE = 4; - */ - const MAINTENANCE = 4; - - private static $valueToName = [ - self::EVENT_TYPE_UNSPECIFIED => 'EVENT_TYPE_UNSPECIFIED', - self::IDLE => 'IDLE', - self::HEARTBEAT => 'HEARTBEAT', - self::HEALTH => 'HEALTH', - self::MAINTENANCE => 'MAINTENANCE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(EventType::class, \Google\Cloud\Notebooks\V1\Event_EventType::class); - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Execution.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Execution.php deleted file mode 100644 index df7bc7abdea9..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Execution.php +++ /dev/null @@ -1,377 +0,0 @@ -google.cloud.notebooks.v1.Execution - */ -class Execution extends \Google\Protobuf\Internal\Message -{ - /** - * execute metadata including name, hardware spec, region, labels, etc. - * - * Generated from protobuf field .google.cloud.notebooks.v1.ExecutionTemplate execution_template = 1; - */ - protected $execution_template = null; - /** - * Output only. The resource name of the execute. Format: - * `projects/{project_id}/locations/{location}/executions/{execution_id}` - * - * Generated from protobuf field string name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. Name used for UI purposes. - * Name can only contain alphanumeric characters and underscores '_'. - * - * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $display_name = ''; - /** - * A brief description of this execution. - * - * Generated from protobuf field string description = 4; - */ - protected $description = ''; - /** - * Output only. Time the Execution was instantiated. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. Time the Execution was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Output only. State of the underlying AI Platform job. - * - * Generated from protobuf field .google.cloud.notebooks.v1.Execution.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output notebook file generated by this execution - * - * Generated from protobuf field string output_notebook_file = 8; - */ - protected $output_notebook_file = ''; - /** - * Output only. The URI of the external job used to execute the notebook. - * - * Generated from protobuf field string job_uri = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $job_uri = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Notebooks\V1\ExecutionTemplate $execution_template - * execute metadata including name, hardware spec, region, labels, etc. - * @type string $name - * Output only. The resource name of the execute. Format: - * `projects/{project_id}/locations/{location}/executions/{execution_id}` - * @type string $display_name - * Output only. Name used for UI purposes. - * Name can only contain alphanumeric characters and underscores '_'. - * @type string $description - * A brief description of this execution. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. Time the Execution was instantiated. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. Time the Execution was last updated. - * @type int $state - * Output only. State of the underlying AI Platform job. - * @type string $output_notebook_file - * Output notebook file generated by this execution - * @type string $job_uri - * Output only. The URI of the external job used to execute the notebook. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V1\Execution::initOnce(); - parent::__construct($data); - } - - /** - * execute metadata including name, hardware spec, region, labels, etc. - * - * Generated from protobuf field .google.cloud.notebooks.v1.ExecutionTemplate execution_template = 1; - * @return \Google\Cloud\Notebooks\V1\ExecutionTemplate|null - */ - public function getExecutionTemplate() - { - return $this->execution_template; - } - - public function hasExecutionTemplate() - { - return isset($this->execution_template); - } - - public function clearExecutionTemplate() - { - unset($this->execution_template); - } - - /** - * execute metadata including name, hardware spec, region, labels, etc. - * - * Generated from protobuf field .google.cloud.notebooks.v1.ExecutionTemplate execution_template = 1; - * @param \Google\Cloud\Notebooks\V1\ExecutionTemplate $var - * @return $this - */ - public function setExecutionTemplate($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V1\ExecutionTemplate::class); - $this->execution_template = $var; - - return $this; - } - - /** - * Output only. The resource name of the execute. Format: - * `projects/{project_id}/locations/{location}/executions/{execution_id}` - * - * Generated from protobuf field string name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The resource name of the execute. Format: - * `projects/{project_id}/locations/{location}/executions/{execution_id}` - * - * Generated from protobuf field string name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. Name used for UI purposes. - * Name can only contain alphanumeric characters and underscores '_'. - * - * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Output only. Name used for UI purposes. - * Name can only contain alphanumeric characters and underscores '_'. - * - * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * A brief description of this execution. - * - * Generated from protobuf field string description = 4; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * A brief description of this execution. - * - * Generated from protobuf field string description = 4; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Output only. Time the Execution was instantiated. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. Time the Execution was instantiated. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. Time the Execution was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. Time the Execution was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Output only. State of the underlying AI Platform job. - * - * Generated from protobuf field .google.cloud.notebooks.v1.Execution.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. State of the underlying AI Platform job. - * - * Generated from protobuf field .google.cloud.notebooks.v1.Execution.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Notebooks\V1\Execution\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output notebook file generated by this execution - * - * Generated from protobuf field string output_notebook_file = 8; - * @return string - */ - public function getOutputNotebookFile() - { - return $this->output_notebook_file; - } - - /** - * Output notebook file generated by this execution - * - * Generated from protobuf field string output_notebook_file = 8; - * @param string $var - * @return $this - */ - public function setOutputNotebookFile($var) - { - GPBUtil::checkString($var, True); - $this->output_notebook_file = $var; - - return $this; - } - - /** - * Output only. The URI of the external job used to execute the notebook. - * - * Generated from protobuf field string job_uri = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getJobUri() - { - return $this->job_uri; - } - - /** - * Output only. The URI of the external job used to execute the notebook. - * - * Generated from protobuf field string job_uri = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setJobUri($var) - { - GPBUtil::checkString($var, True); - $this->job_uri = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Execution/State.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Execution/State.php deleted file mode 100644 index 5aee6d68273a..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Execution/State.php +++ /dev/null @@ -1,117 +0,0 @@ -google.cloud.notebooks.v1.Execution.State - */ -class State -{ - /** - * The job state is unspecified. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The job has been just created and processing has not yet begun. - * - * Generated from protobuf enum QUEUED = 1; - */ - const QUEUED = 1; - /** - * The service is preparing to execution the job. - * - * Generated from protobuf enum PREPARING = 2; - */ - const PREPARING = 2; - /** - * The job is in progress. - * - * Generated from protobuf enum RUNNING = 3; - */ - const RUNNING = 3; - /** - * The job completed successfully. - * - * Generated from protobuf enum SUCCEEDED = 4; - */ - const SUCCEEDED = 4; - /** - * The job failed. - * `error_message` should contain the details of the failure. - * - * Generated from protobuf enum FAILED = 5; - */ - const FAILED = 5; - /** - * The job is being cancelled. - * `error_message` should describe the reason for the cancellation. - * - * Generated from protobuf enum CANCELLING = 6; - */ - const CANCELLING = 6; - /** - * The job has been cancelled. - * `error_message` should describe the reason for the cancellation. - * - * Generated from protobuf enum CANCELLED = 7; - */ - const CANCELLED = 7; - /** - * The job has become expired (relevant to Vertex AI jobs) - * https://cloud.google.com/vertex-ai/docs/reference/rest/v1/JobState - * - * Generated from protobuf enum EXPIRED = 9; - */ - const EXPIRED = 9; - /** - * The Execution is being created. - * - * Generated from protobuf enum INITIALIZING = 10; - */ - const INITIALIZING = 10; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::QUEUED => 'QUEUED', - self::PREPARING => 'PREPARING', - self::RUNNING => 'RUNNING', - self::SUCCEEDED => 'SUCCEEDED', - self::FAILED => 'FAILED', - self::CANCELLING => 'CANCELLING', - self::CANCELLED => 'CANCELLED', - self::EXPIRED => 'EXPIRED', - self::INITIALIZING => 'INITIALIZING', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\Notebooks\V1\Execution_State::class); - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ExecutionTemplate.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ExecutionTemplate.php deleted file mode 100644 index ef49f88b9317..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ExecutionTemplate.php +++ /dev/null @@ -1,829 +0,0 @@ -google.cloud.notebooks.v1.ExecutionTemplate - */ -class ExecutionTemplate extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Scale tier of the hardware used for notebook execution. - * DEPRECATED Will be discontinued. As right now only CUSTOM is supported. - * - * Generated from protobuf field .google.cloud.notebooks.v1.ExecutionTemplate.ScaleTier scale_tier = 1 [deprecated = true, (.google.api.field_behavior) = REQUIRED]; - * @deprecated - */ - protected $scale_tier = 0; - /** - * Specifies the type of virtual machine to use for your training - * job's master worker. You must specify this field when `scaleTier` is set to - * `CUSTOM`. - * You can use certain Compute Engine machine types directly in this field. - * The following types are supported: - * - `n1-standard-4` - * - `n1-standard-8` - * - `n1-standard-16` - * - `n1-standard-32` - * - `n1-standard-64` - * - `n1-standard-96` - * - `n1-highmem-2` - * - `n1-highmem-4` - * - `n1-highmem-8` - * - `n1-highmem-16` - * - `n1-highmem-32` - * - `n1-highmem-64` - * - `n1-highmem-96` - * - `n1-highcpu-16` - * - `n1-highcpu-32` - * - `n1-highcpu-64` - * - `n1-highcpu-96` - * Alternatively, you can use the following legacy machine types: - * - `standard` - * - `large_model` - * - `complex_model_s` - * - `complex_model_m` - * - `complex_model_l` - * - `standard_gpu` - * - `complex_model_m_gpu` - * - `complex_model_l_gpu` - * - `standard_p100` - * - `complex_model_m_p100` - * - `standard_v100` - * - `large_model_v100` - * - `complex_model_m_v100` - * - `complex_model_l_v100` - * Finally, if you want to use a TPU for training, specify `cloud_tpu` in this - * field. Learn more about the [special configuration options for training - * with - * TPU](https://cloud.google.com/ai-platform/training/docs/using-tpus#configuring_a_custom_tpu_machine). - * - * Generated from protobuf field string master_type = 2; - */ - protected $master_type = ''; - /** - * Configuration (count and accelerator type) for hardware running notebook - * execution. - * - * Generated from protobuf field .google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig accelerator_config = 3; - */ - protected $accelerator_config = null; - /** - * Labels for execution. - * If execution is scheduled, a field included will be 'nbs-scheduled'. - * Otherwise, it is an immediate execution, and an included field will be - * 'nbs-immediate'. Use fields to efficiently index between various types of - * executions. - * - * Generated from protobuf field map labels = 4; - */ - private $labels; - /** - * Path to the notebook file to execute. - * Must be in a Google Cloud Storage bucket. - * Format: `gs://{bucket_name}/{folder}/{notebook_file_name}` - * Ex: `gs://notebook_user/scheduled_notebooks/sentiment_notebook.ipynb` - * - * Generated from protobuf field string input_notebook_file = 5; - */ - protected $input_notebook_file = ''; - /** - * Container Image URI to a DLVM - * Example: 'gcr.io/deeplearning-platform-release/base-cu100' - * More examples can be found at: - * https://cloud.google.com/ai-platform/deep-learning-containers/docs/choosing-container - * - * Generated from protobuf field string container_image_uri = 6; - */ - protected $container_image_uri = ''; - /** - * Path to the notebook folder to write to. - * Must be in a Google Cloud Storage bucket path. - * Format: `gs://{bucket_name}/{folder}` - * Ex: `gs://notebook_user/scheduled_notebooks` - * - * Generated from protobuf field string output_notebook_folder = 7; - */ - protected $output_notebook_folder = ''; - /** - * Parameters to be overridden in the notebook during execution. - * Ref https://papermill.readthedocs.io/en/latest/usage-parameterize.html on - * how to specifying parameters in the input notebook and pass them here - * in an YAML file. - * Ex: `gs://notebook_user/scheduled_notebooks/sentiment_notebook_params.yaml` - * - * Generated from protobuf field string params_yaml_file = 8; - */ - protected $params_yaml_file = ''; - /** - * Parameters used within the 'input_notebook_file' notebook. - * - * Generated from protobuf field string parameters = 9; - */ - protected $parameters = ''; - /** - * The email address of a service account to use when running the execution. - * You must have the `iam.serviceAccounts.actAs` permission for the specified - * service account. - * - * Generated from protobuf field string service_account = 10; - */ - protected $service_account = ''; - /** - * The type of Job to be used on this execution. - * - * Generated from protobuf field .google.cloud.notebooks.v1.ExecutionTemplate.JobType job_type = 11; - */ - protected $job_type = 0; - /** - * Name of the kernel spec to use. This must be specified if the - * kernel spec name on the execution target does not match the name in the - * input notebook file. - * - * Generated from protobuf field string kernel_spec = 14; - */ - protected $kernel_spec = ''; - /** - * The name of a Vertex AI [Tensorboard] resource to which this execution - * will upload Tensorboard logs. - * Format: - * `projects/{project}/locations/{location}/tensorboards/{tensorboard}` - * - * Generated from protobuf field string tensorboard = 15 [(.google.api.resource_reference) = { - */ - protected $tensorboard = ''; - protected $job_parameters; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $scale_tier - * Required. Scale tier of the hardware used for notebook execution. - * DEPRECATED Will be discontinued. As right now only CUSTOM is supported. - * @type string $master_type - * Specifies the type of virtual machine to use for your training - * job's master worker. You must specify this field when `scaleTier` is set to - * `CUSTOM`. - * You can use certain Compute Engine machine types directly in this field. - * The following types are supported: - * - `n1-standard-4` - * - `n1-standard-8` - * - `n1-standard-16` - * - `n1-standard-32` - * - `n1-standard-64` - * - `n1-standard-96` - * - `n1-highmem-2` - * - `n1-highmem-4` - * - `n1-highmem-8` - * - `n1-highmem-16` - * - `n1-highmem-32` - * - `n1-highmem-64` - * - `n1-highmem-96` - * - `n1-highcpu-16` - * - `n1-highcpu-32` - * - `n1-highcpu-64` - * - `n1-highcpu-96` - * Alternatively, you can use the following legacy machine types: - * - `standard` - * - `large_model` - * - `complex_model_s` - * - `complex_model_m` - * - `complex_model_l` - * - `standard_gpu` - * - `complex_model_m_gpu` - * - `complex_model_l_gpu` - * - `standard_p100` - * - `complex_model_m_p100` - * - `standard_v100` - * - `large_model_v100` - * - `complex_model_m_v100` - * - `complex_model_l_v100` - * Finally, if you want to use a TPU for training, specify `cloud_tpu` in this - * field. Learn more about the [special configuration options for training - * with - * TPU](https://cloud.google.com/ai-platform/training/docs/using-tpus#configuring_a_custom_tpu_machine). - * @type \Google\Cloud\Notebooks\V1\ExecutionTemplate\SchedulerAcceleratorConfig $accelerator_config - * Configuration (count and accelerator type) for hardware running notebook - * execution. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Labels for execution. - * If execution is scheduled, a field included will be 'nbs-scheduled'. - * Otherwise, it is an immediate execution, and an included field will be - * 'nbs-immediate'. Use fields to efficiently index between various types of - * executions. - * @type string $input_notebook_file - * Path to the notebook file to execute. - * Must be in a Google Cloud Storage bucket. - * Format: `gs://{bucket_name}/{folder}/{notebook_file_name}` - * Ex: `gs://notebook_user/scheduled_notebooks/sentiment_notebook.ipynb` - * @type string $container_image_uri - * Container Image URI to a DLVM - * Example: 'gcr.io/deeplearning-platform-release/base-cu100' - * More examples can be found at: - * https://cloud.google.com/ai-platform/deep-learning-containers/docs/choosing-container - * @type string $output_notebook_folder - * Path to the notebook folder to write to. - * Must be in a Google Cloud Storage bucket path. - * Format: `gs://{bucket_name}/{folder}` - * Ex: `gs://notebook_user/scheduled_notebooks` - * @type string $params_yaml_file - * Parameters to be overridden in the notebook during execution. - * Ref https://papermill.readthedocs.io/en/latest/usage-parameterize.html on - * how to specifying parameters in the input notebook and pass them here - * in an YAML file. - * Ex: `gs://notebook_user/scheduled_notebooks/sentiment_notebook_params.yaml` - * @type string $parameters - * Parameters used within the 'input_notebook_file' notebook. - * @type string $service_account - * The email address of a service account to use when running the execution. - * You must have the `iam.serviceAccounts.actAs` permission for the specified - * service account. - * @type int $job_type - * The type of Job to be used on this execution. - * @type \Google\Cloud\Notebooks\V1\ExecutionTemplate\DataprocParameters $dataproc_parameters - * Parameters used in Dataproc JobType executions. - * @type \Google\Cloud\Notebooks\V1\ExecutionTemplate\VertexAIParameters $vertex_ai_parameters - * Parameters used in Vertex AI JobType executions. - * @type string $kernel_spec - * Name of the kernel spec to use. This must be specified if the - * kernel spec name on the execution target does not match the name in the - * input notebook file. - * @type string $tensorboard - * The name of a Vertex AI [Tensorboard] resource to which this execution - * will upload Tensorboard logs. - * Format: - * `projects/{project}/locations/{location}/tensorboards/{tensorboard}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V1\Execution::initOnce(); - parent::__construct($data); - } - - /** - * Required. Scale tier of the hardware used for notebook execution. - * DEPRECATED Will be discontinued. As right now only CUSTOM is supported. - * - * Generated from protobuf field .google.cloud.notebooks.v1.ExecutionTemplate.ScaleTier scale_tier = 1 [deprecated = true, (.google.api.field_behavior) = REQUIRED]; - * @return int - * @deprecated - */ - public function getScaleTier() - { - @trigger_error('scale_tier is deprecated.', E_USER_DEPRECATED); - return $this->scale_tier; - } - - /** - * Required. Scale tier of the hardware used for notebook execution. - * DEPRECATED Will be discontinued. As right now only CUSTOM is supported. - * - * Generated from protobuf field .google.cloud.notebooks.v1.ExecutionTemplate.ScaleTier scale_tier = 1 [deprecated = true, (.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - * @deprecated - */ - public function setScaleTier($var) - { - @trigger_error('scale_tier is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkEnum($var, \Google\Cloud\Notebooks\V1\ExecutionTemplate\ScaleTier::class); - $this->scale_tier = $var; - - return $this; - } - - /** - * Specifies the type of virtual machine to use for your training - * job's master worker. You must specify this field when `scaleTier` is set to - * `CUSTOM`. - * You can use certain Compute Engine machine types directly in this field. - * The following types are supported: - * - `n1-standard-4` - * - `n1-standard-8` - * - `n1-standard-16` - * - `n1-standard-32` - * - `n1-standard-64` - * - `n1-standard-96` - * - `n1-highmem-2` - * - `n1-highmem-4` - * - `n1-highmem-8` - * - `n1-highmem-16` - * - `n1-highmem-32` - * - `n1-highmem-64` - * - `n1-highmem-96` - * - `n1-highcpu-16` - * - `n1-highcpu-32` - * - `n1-highcpu-64` - * - `n1-highcpu-96` - * Alternatively, you can use the following legacy machine types: - * - `standard` - * - `large_model` - * - `complex_model_s` - * - `complex_model_m` - * - `complex_model_l` - * - `standard_gpu` - * - `complex_model_m_gpu` - * - `complex_model_l_gpu` - * - `standard_p100` - * - `complex_model_m_p100` - * - `standard_v100` - * - `large_model_v100` - * - `complex_model_m_v100` - * - `complex_model_l_v100` - * Finally, if you want to use a TPU for training, specify `cloud_tpu` in this - * field. Learn more about the [special configuration options for training - * with - * TPU](https://cloud.google.com/ai-platform/training/docs/using-tpus#configuring_a_custom_tpu_machine). - * - * Generated from protobuf field string master_type = 2; - * @return string - */ - public function getMasterType() - { - return $this->master_type; - } - - /** - * Specifies the type of virtual machine to use for your training - * job's master worker. You must specify this field when `scaleTier` is set to - * `CUSTOM`. - * You can use certain Compute Engine machine types directly in this field. - * The following types are supported: - * - `n1-standard-4` - * - `n1-standard-8` - * - `n1-standard-16` - * - `n1-standard-32` - * - `n1-standard-64` - * - `n1-standard-96` - * - `n1-highmem-2` - * - `n1-highmem-4` - * - `n1-highmem-8` - * - `n1-highmem-16` - * - `n1-highmem-32` - * - `n1-highmem-64` - * - `n1-highmem-96` - * - `n1-highcpu-16` - * - `n1-highcpu-32` - * - `n1-highcpu-64` - * - `n1-highcpu-96` - * Alternatively, you can use the following legacy machine types: - * - `standard` - * - `large_model` - * - `complex_model_s` - * - `complex_model_m` - * - `complex_model_l` - * - `standard_gpu` - * - `complex_model_m_gpu` - * - `complex_model_l_gpu` - * - `standard_p100` - * - `complex_model_m_p100` - * - `standard_v100` - * - `large_model_v100` - * - `complex_model_m_v100` - * - `complex_model_l_v100` - * Finally, if you want to use a TPU for training, specify `cloud_tpu` in this - * field. Learn more about the [special configuration options for training - * with - * TPU](https://cloud.google.com/ai-platform/training/docs/using-tpus#configuring_a_custom_tpu_machine). - * - * Generated from protobuf field string master_type = 2; - * @param string $var - * @return $this - */ - public function setMasterType($var) - { - GPBUtil::checkString($var, True); - $this->master_type = $var; - - return $this; - } - - /** - * Configuration (count and accelerator type) for hardware running notebook - * execution. - * - * Generated from protobuf field .google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig accelerator_config = 3; - * @return \Google\Cloud\Notebooks\V1\ExecutionTemplate\SchedulerAcceleratorConfig|null - */ - public function getAcceleratorConfig() - { - return $this->accelerator_config; - } - - public function hasAcceleratorConfig() - { - return isset($this->accelerator_config); - } - - public function clearAcceleratorConfig() - { - unset($this->accelerator_config); - } - - /** - * Configuration (count and accelerator type) for hardware running notebook - * execution. - * - * Generated from protobuf field .google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig accelerator_config = 3; - * @param \Google\Cloud\Notebooks\V1\ExecutionTemplate\SchedulerAcceleratorConfig $var - * @return $this - */ - public function setAcceleratorConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V1\ExecutionTemplate\SchedulerAcceleratorConfig::class); - $this->accelerator_config = $var; - - return $this; - } - - /** - * Labels for execution. - * If execution is scheduled, a field included will be 'nbs-scheduled'. - * Otherwise, it is an immediate execution, and an included field will be - * 'nbs-immediate'. Use fields to efficiently index between various types of - * executions. - * - * Generated from protobuf field map labels = 4; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Labels for execution. - * If execution is scheduled, a field included will be 'nbs-scheduled'. - * Otherwise, it is an immediate execution, and an included field will be - * 'nbs-immediate'. Use fields to efficiently index between various types of - * executions. - * - * Generated from protobuf field map labels = 4; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Path to the notebook file to execute. - * Must be in a Google Cloud Storage bucket. - * Format: `gs://{bucket_name}/{folder}/{notebook_file_name}` - * Ex: `gs://notebook_user/scheduled_notebooks/sentiment_notebook.ipynb` - * - * Generated from protobuf field string input_notebook_file = 5; - * @return string - */ - public function getInputNotebookFile() - { - return $this->input_notebook_file; - } - - /** - * Path to the notebook file to execute. - * Must be in a Google Cloud Storage bucket. - * Format: `gs://{bucket_name}/{folder}/{notebook_file_name}` - * Ex: `gs://notebook_user/scheduled_notebooks/sentiment_notebook.ipynb` - * - * Generated from protobuf field string input_notebook_file = 5; - * @param string $var - * @return $this - */ - public function setInputNotebookFile($var) - { - GPBUtil::checkString($var, True); - $this->input_notebook_file = $var; - - return $this; - } - - /** - * Container Image URI to a DLVM - * Example: 'gcr.io/deeplearning-platform-release/base-cu100' - * More examples can be found at: - * https://cloud.google.com/ai-platform/deep-learning-containers/docs/choosing-container - * - * Generated from protobuf field string container_image_uri = 6; - * @return string - */ - public function getContainerImageUri() - { - return $this->container_image_uri; - } - - /** - * Container Image URI to a DLVM - * Example: 'gcr.io/deeplearning-platform-release/base-cu100' - * More examples can be found at: - * https://cloud.google.com/ai-platform/deep-learning-containers/docs/choosing-container - * - * Generated from protobuf field string container_image_uri = 6; - * @param string $var - * @return $this - */ - public function setContainerImageUri($var) - { - GPBUtil::checkString($var, True); - $this->container_image_uri = $var; - - return $this; - } - - /** - * Path to the notebook folder to write to. - * Must be in a Google Cloud Storage bucket path. - * Format: `gs://{bucket_name}/{folder}` - * Ex: `gs://notebook_user/scheduled_notebooks` - * - * Generated from protobuf field string output_notebook_folder = 7; - * @return string - */ - public function getOutputNotebookFolder() - { - return $this->output_notebook_folder; - } - - /** - * Path to the notebook folder to write to. - * Must be in a Google Cloud Storage bucket path. - * Format: `gs://{bucket_name}/{folder}` - * Ex: `gs://notebook_user/scheduled_notebooks` - * - * Generated from protobuf field string output_notebook_folder = 7; - * @param string $var - * @return $this - */ - public function setOutputNotebookFolder($var) - { - GPBUtil::checkString($var, True); - $this->output_notebook_folder = $var; - - return $this; - } - - /** - * Parameters to be overridden in the notebook during execution. - * Ref https://papermill.readthedocs.io/en/latest/usage-parameterize.html on - * how to specifying parameters in the input notebook and pass them here - * in an YAML file. - * Ex: `gs://notebook_user/scheduled_notebooks/sentiment_notebook_params.yaml` - * - * Generated from protobuf field string params_yaml_file = 8; - * @return string - */ - public function getParamsYamlFile() - { - return $this->params_yaml_file; - } - - /** - * Parameters to be overridden in the notebook during execution. - * Ref https://papermill.readthedocs.io/en/latest/usage-parameterize.html on - * how to specifying parameters in the input notebook and pass them here - * in an YAML file. - * Ex: `gs://notebook_user/scheduled_notebooks/sentiment_notebook_params.yaml` - * - * Generated from protobuf field string params_yaml_file = 8; - * @param string $var - * @return $this - */ - public function setParamsYamlFile($var) - { - GPBUtil::checkString($var, True); - $this->params_yaml_file = $var; - - return $this; - } - - /** - * Parameters used within the 'input_notebook_file' notebook. - * - * Generated from protobuf field string parameters = 9; - * @return string - */ - public function getParameters() - { - return $this->parameters; - } - - /** - * Parameters used within the 'input_notebook_file' notebook. - * - * Generated from protobuf field string parameters = 9; - * @param string $var - * @return $this - */ - public function setParameters($var) - { - GPBUtil::checkString($var, True); - $this->parameters = $var; - - return $this; - } - - /** - * The email address of a service account to use when running the execution. - * You must have the `iam.serviceAccounts.actAs` permission for the specified - * service account. - * - * Generated from protobuf field string service_account = 10; - * @return string - */ - public function getServiceAccount() - { - return $this->service_account; - } - - /** - * The email address of a service account to use when running the execution. - * You must have the `iam.serviceAccounts.actAs` permission for the specified - * service account. - * - * Generated from protobuf field string service_account = 10; - * @param string $var - * @return $this - */ - public function setServiceAccount($var) - { - GPBUtil::checkString($var, True); - $this->service_account = $var; - - return $this; - } - - /** - * The type of Job to be used on this execution. - * - * Generated from protobuf field .google.cloud.notebooks.v1.ExecutionTemplate.JobType job_type = 11; - * @return int - */ - public function getJobType() - { - return $this->job_type; - } - - /** - * The type of Job to be used on this execution. - * - * Generated from protobuf field .google.cloud.notebooks.v1.ExecutionTemplate.JobType job_type = 11; - * @param int $var - * @return $this - */ - public function setJobType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Notebooks\V1\ExecutionTemplate\JobType::class); - $this->job_type = $var; - - return $this; - } - - /** - * Parameters used in Dataproc JobType executions. - * - * Generated from protobuf field .google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters dataproc_parameters = 12; - * @return \Google\Cloud\Notebooks\V1\ExecutionTemplate\DataprocParameters|null - */ - public function getDataprocParameters() - { - return $this->readOneof(12); - } - - public function hasDataprocParameters() - { - return $this->hasOneof(12); - } - - /** - * Parameters used in Dataproc JobType executions. - * - * Generated from protobuf field .google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters dataproc_parameters = 12; - * @param \Google\Cloud\Notebooks\V1\ExecutionTemplate\DataprocParameters $var - * @return $this - */ - public function setDataprocParameters($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V1\ExecutionTemplate\DataprocParameters::class); - $this->writeOneof(12, $var); - - return $this; - } - - /** - * Parameters used in Vertex AI JobType executions. - * - * Generated from protobuf field .google.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters vertex_ai_parameters = 13; - * @return \Google\Cloud\Notebooks\V1\ExecutionTemplate\VertexAIParameters|null - */ - public function getVertexAiParameters() - { - return $this->readOneof(13); - } - - public function hasVertexAiParameters() - { - return $this->hasOneof(13); - } - - /** - * Parameters used in Vertex AI JobType executions. - * - * Generated from protobuf field .google.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters vertex_ai_parameters = 13; - * @param \Google\Cloud\Notebooks\V1\ExecutionTemplate\VertexAIParameters $var - * @return $this - */ - public function setVertexAiParameters($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V1\ExecutionTemplate\VertexAIParameters::class); - $this->writeOneof(13, $var); - - return $this; - } - - /** - * Name of the kernel spec to use. This must be specified if the - * kernel spec name on the execution target does not match the name in the - * input notebook file. - * - * Generated from protobuf field string kernel_spec = 14; - * @return string - */ - public function getKernelSpec() - { - return $this->kernel_spec; - } - - /** - * Name of the kernel spec to use. This must be specified if the - * kernel spec name on the execution target does not match the name in the - * input notebook file. - * - * Generated from protobuf field string kernel_spec = 14; - * @param string $var - * @return $this - */ - public function setKernelSpec($var) - { - GPBUtil::checkString($var, True); - $this->kernel_spec = $var; - - return $this; - } - - /** - * The name of a Vertex AI [Tensorboard] resource to which this execution - * will upload Tensorboard logs. - * Format: - * `projects/{project}/locations/{location}/tensorboards/{tensorboard}` - * - * Generated from protobuf field string tensorboard = 15 [(.google.api.resource_reference) = { - * @return string - */ - public function getTensorboard() - { - return $this->tensorboard; - } - - /** - * The name of a Vertex AI [Tensorboard] resource to which this execution - * will upload Tensorboard logs. - * Format: - * `projects/{project}/locations/{location}/tensorboards/{tensorboard}` - * - * Generated from protobuf field string tensorboard = 15 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setTensorboard($var) - { - GPBUtil::checkString($var, True); - $this->tensorboard = $var; - - return $this; - } - - /** - * @return string - */ - public function getJobParameters() - { - return $this->whichOneof("job_parameters"); - } - -} - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ExecutionTemplate/DataprocParameters.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ExecutionTemplate/DataprocParameters.php deleted file mode 100644 index 24e9b73605c2..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ExecutionTemplate/DataprocParameters.php +++ /dev/null @@ -1,74 +0,0 @@ -google.cloud.notebooks.v1.ExecutionTemplate.DataprocParameters - */ -class DataprocParameters extends \Google\Protobuf\Internal\Message -{ - /** - * URI for cluster used to run Dataproc execution. - * Format: `projects/{PROJECT_ID}/regions/{REGION}/clusters/{CLUSTER_NAME}` - * - * Generated from protobuf field string cluster = 1; - */ - protected $cluster = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $cluster - * URI for cluster used to run Dataproc execution. - * Format: `projects/{PROJECT_ID}/regions/{REGION}/clusters/{CLUSTER_NAME}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V1\Execution::initOnce(); - parent::__construct($data); - } - - /** - * URI for cluster used to run Dataproc execution. - * Format: `projects/{PROJECT_ID}/regions/{REGION}/clusters/{CLUSTER_NAME}` - * - * Generated from protobuf field string cluster = 1; - * @return string - */ - public function getCluster() - { - return $this->cluster; - } - - /** - * URI for cluster used to run Dataproc execution. - * Format: `projects/{PROJECT_ID}/regions/{REGION}/clusters/{CLUSTER_NAME}` - * - * Generated from protobuf field string cluster = 1; - * @param string $var - * @return $this - */ - public function setCluster($var) - { - GPBUtil::checkString($var, True); - $this->cluster = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DataprocParameters::class, \Google\Cloud\Notebooks\V1\ExecutionTemplate_DataprocParameters::class); - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ExecutionTemplate/JobType.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ExecutionTemplate/JobType.php deleted file mode 100644 index 7977f67eb20a..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ExecutionTemplate/JobType.php +++ /dev/null @@ -1,66 +0,0 @@ -google.cloud.notebooks.v1.ExecutionTemplate.JobType - */ -class JobType -{ - /** - * No type specified. - * - * Generated from protobuf enum JOB_TYPE_UNSPECIFIED = 0; - */ - const JOB_TYPE_UNSPECIFIED = 0; - /** - * Custom Job in `aiplatform.googleapis.com`. - * Default value for an execution. - * - * Generated from protobuf enum VERTEX_AI = 1; - */ - const VERTEX_AI = 1; - /** - * Run execution on a cluster with Dataproc as a job. - * https://cloud.google.com/dataproc/docs/reference/rest/v1/projects.regions.jobs - * - * Generated from protobuf enum DATAPROC = 2; - */ - const DATAPROC = 2; - - private static $valueToName = [ - self::JOB_TYPE_UNSPECIFIED => 'JOB_TYPE_UNSPECIFIED', - self::VERTEX_AI => 'VERTEX_AI', - self::DATAPROC => 'DATAPROC', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(JobType::class, \Google\Cloud\Notebooks\V1\ExecutionTemplate_JobType::class); - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ExecutionTemplate/ScaleTier.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ExecutionTemplate/ScaleTier.php deleted file mode 100644 index be85f68c19bd..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ExecutionTemplate/ScaleTier.php +++ /dev/null @@ -1,99 +0,0 @@ -google.cloud.notebooks.v1.ExecutionTemplate.ScaleTier - */ -class ScaleTier -{ - /** - * Unspecified Scale Tier. - * - * Generated from protobuf enum SCALE_TIER_UNSPECIFIED = 0; - */ - const SCALE_TIER_UNSPECIFIED = 0; - /** - * A single worker instance. This tier is suitable for learning how to use - * Cloud ML, and for experimenting with new models using small datasets. - * - * Generated from protobuf enum BASIC = 1; - */ - const BASIC = 1; - /** - * Many workers and a few parameter servers. - * - * Generated from protobuf enum STANDARD_1 = 2; - */ - const STANDARD_1 = 2; - /** - * A large number of workers with many parameter servers. - * - * Generated from protobuf enum PREMIUM_1 = 3; - */ - const PREMIUM_1 = 3; - /** - * A single worker instance with a K80 GPU. - * - * Generated from protobuf enum BASIC_GPU = 4; - */ - const BASIC_GPU = 4; - /** - * A single worker instance with a Cloud TPU. - * - * Generated from protobuf enum BASIC_TPU = 5; - */ - const BASIC_TPU = 5; - /** - * The CUSTOM tier is not a set tier, but rather enables you to use your - * own cluster specification. When you use this tier, set values to - * configure your processing cluster according to these guidelines: - * * You _must_ set `ExecutionTemplate.masterType` to specify the type - * of machine to use for your master node. This is the only required - * setting. - * - * Generated from protobuf enum CUSTOM = 6; - */ - const CUSTOM = 6; - - private static $valueToName = [ - self::SCALE_TIER_UNSPECIFIED => 'SCALE_TIER_UNSPECIFIED', - self::BASIC => 'BASIC', - self::STANDARD_1 => 'STANDARD_1', - self::PREMIUM_1 => 'PREMIUM_1', - self::BASIC_GPU => 'BASIC_GPU', - self::BASIC_TPU => 'BASIC_TPU', - self::CUSTOM => 'CUSTOM', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ScaleTier::class, \Google\Cloud\Notebooks\V1\ExecutionTemplate_ScaleTier::class); - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ExecutionTemplate/SchedulerAcceleratorConfig.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ExecutionTemplate/SchedulerAcceleratorConfig.php deleted file mode 100644 index 1cceb92e601a..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ExecutionTemplate/SchedulerAcceleratorConfig.php +++ /dev/null @@ -1,107 +0,0 @@ -google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorConfig - */ -class SchedulerAcceleratorConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Type of this accelerator. - * - * Generated from protobuf field .google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorType type = 1; - */ - protected $type = 0; - /** - * Count of cores of this accelerator. - * - * Generated from protobuf field int64 core_count = 2; - */ - protected $core_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $type - * Type of this accelerator. - * @type int|string $core_count - * Count of cores of this accelerator. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V1\Execution::initOnce(); - parent::__construct($data); - } - - /** - * Type of this accelerator. - * - * Generated from protobuf field .google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorType type = 1; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Type of this accelerator. - * - * Generated from protobuf field .google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorType type = 1; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Notebooks\V1\ExecutionTemplate\SchedulerAcceleratorType::class); - $this->type = $var; - - return $this; - } - - /** - * Count of cores of this accelerator. - * - * Generated from protobuf field int64 core_count = 2; - * @return int|string - */ - public function getCoreCount() - { - return $this->core_count; - } - - /** - * Count of cores of this accelerator. - * - * Generated from protobuf field int64 core_count = 2; - * @param int|string $var - * @return $this - */ - public function setCoreCount($var) - { - GPBUtil::checkInt64($var); - $this->core_count = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SchedulerAcceleratorConfig::class, \Google\Cloud\Notebooks\V1\ExecutionTemplate_SchedulerAcceleratorConfig::class); - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ExecutionTemplate/SchedulerAcceleratorType.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ExecutionTemplate/SchedulerAcceleratorType.php deleted file mode 100644 index 63a5af02a0c9..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ExecutionTemplate/SchedulerAcceleratorType.php +++ /dev/null @@ -1,106 +0,0 @@ -google.cloud.notebooks.v1.ExecutionTemplate.SchedulerAcceleratorType - */ -class SchedulerAcceleratorType -{ - /** - * Unspecified accelerator type. Default to no GPU. - * - * Generated from protobuf enum SCHEDULER_ACCELERATOR_TYPE_UNSPECIFIED = 0; - */ - const SCHEDULER_ACCELERATOR_TYPE_UNSPECIFIED = 0; - /** - * Nvidia Tesla K80 GPU. - * - * Generated from protobuf enum NVIDIA_TESLA_K80 = 1; - */ - const NVIDIA_TESLA_K80 = 1; - /** - * Nvidia Tesla P100 GPU. - * - * Generated from protobuf enum NVIDIA_TESLA_P100 = 2; - */ - const NVIDIA_TESLA_P100 = 2; - /** - * Nvidia Tesla V100 GPU. - * - * Generated from protobuf enum NVIDIA_TESLA_V100 = 3; - */ - const NVIDIA_TESLA_V100 = 3; - /** - * Nvidia Tesla P4 GPU. - * - * Generated from protobuf enum NVIDIA_TESLA_P4 = 4; - */ - const NVIDIA_TESLA_P4 = 4; - /** - * Nvidia Tesla T4 GPU. - * - * Generated from protobuf enum NVIDIA_TESLA_T4 = 5; - */ - const NVIDIA_TESLA_T4 = 5; - /** - * Nvidia Tesla A100 GPU. - * - * Generated from protobuf enum NVIDIA_TESLA_A100 = 10; - */ - const NVIDIA_TESLA_A100 = 10; - /** - * TPU v2. - * - * Generated from protobuf enum TPU_V2 = 6; - */ - const TPU_V2 = 6; - /** - * TPU v3. - * - * Generated from protobuf enum TPU_V3 = 7; - */ - const TPU_V3 = 7; - - private static $valueToName = [ - self::SCHEDULER_ACCELERATOR_TYPE_UNSPECIFIED => 'SCHEDULER_ACCELERATOR_TYPE_UNSPECIFIED', - self::NVIDIA_TESLA_K80 => 'NVIDIA_TESLA_K80', - self::NVIDIA_TESLA_P100 => 'NVIDIA_TESLA_P100', - self::NVIDIA_TESLA_V100 => 'NVIDIA_TESLA_V100', - self::NVIDIA_TESLA_P4 => 'NVIDIA_TESLA_P4', - self::NVIDIA_TESLA_T4 => 'NVIDIA_TESLA_T4', - self::NVIDIA_TESLA_A100 => 'NVIDIA_TESLA_A100', - self::TPU_V2 => 'TPU_V2', - self::TPU_V3 => 'TPU_V3', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SchedulerAcceleratorType::class, \Google\Cloud\Notebooks\V1\ExecutionTemplate_SchedulerAcceleratorType::class); - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ExecutionTemplate/VertexAIParameters.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ExecutionTemplate/VertexAIParameters.php deleted file mode 100644 index 4b950b16d390..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ExecutionTemplate/VertexAIParameters.php +++ /dev/null @@ -1,148 +0,0 @@ -google.cloud.notebooks.v1.ExecutionTemplate.VertexAIParameters - */ -class VertexAIParameters extends \Google\Protobuf\Internal\Message -{ - /** - * The full name of the Compute Engine - * [network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks) - * to which the Job should be peered. For example, - * `projects/12345/global/networks/myVPC`. - * [Format](https://cloud.google.com/compute/docs/reference/rest/v1/networks/insert) - * is of the form `projects/{project}/global/networks/{network}`. - * Where `{project}` is a project number, as in `12345`, and `{network}` is - * a network name. - * Private services access must already be configured for the network. If - * left unspecified, the job is not peered with any network. - * - * Generated from protobuf field string network = 1; - */ - protected $network = ''; - /** - * Environment variables. - * At most 100 environment variables can be specified and unique. - * Example: `GCP_BUCKET=gs://my-bucket/samples/` - * - * Generated from protobuf field map env = 2; - */ - private $env; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $network - * The full name of the Compute Engine - * [network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks) - * to which the Job should be peered. For example, - * `projects/12345/global/networks/myVPC`. - * [Format](https://cloud.google.com/compute/docs/reference/rest/v1/networks/insert) - * is of the form `projects/{project}/global/networks/{network}`. - * Where `{project}` is a project number, as in `12345`, and `{network}` is - * a network name. - * Private services access must already be configured for the network. If - * left unspecified, the job is not peered with any network. - * @type array|\Google\Protobuf\Internal\MapField $env - * Environment variables. - * At most 100 environment variables can be specified and unique. - * Example: `GCP_BUCKET=gs://my-bucket/samples/` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V1\Execution::initOnce(); - parent::__construct($data); - } - - /** - * The full name of the Compute Engine - * [network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks) - * to which the Job should be peered. For example, - * `projects/12345/global/networks/myVPC`. - * [Format](https://cloud.google.com/compute/docs/reference/rest/v1/networks/insert) - * is of the form `projects/{project}/global/networks/{network}`. - * Where `{project}` is a project number, as in `12345`, and `{network}` is - * a network name. - * Private services access must already be configured for the network. If - * left unspecified, the job is not peered with any network. - * - * Generated from protobuf field string network = 1; - * @return string - */ - public function getNetwork() - { - return $this->network; - } - - /** - * The full name of the Compute Engine - * [network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks) - * to which the Job should be peered. For example, - * `projects/12345/global/networks/myVPC`. - * [Format](https://cloud.google.com/compute/docs/reference/rest/v1/networks/insert) - * is of the form `projects/{project}/global/networks/{network}`. - * Where `{project}` is a project number, as in `12345`, and `{network}` is - * a network name. - * Private services access must already be configured for the network. If - * left unspecified, the job is not peered with any network. - * - * Generated from protobuf field string network = 1; - * @param string $var - * @return $this - */ - public function setNetwork($var) - { - GPBUtil::checkString($var, True); - $this->network = $var; - - return $this; - } - - /** - * Environment variables. - * At most 100 environment variables can be specified and unique. - * Example: `GCP_BUCKET=gs://my-bucket/samples/` - * - * Generated from protobuf field map env = 2; - * @return \Google\Protobuf\Internal\MapField - */ - public function getEnv() - { - return $this->env; - } - - /** - * Environment variables. - * At most 100 environment variables can be specified and unique. - * Example: `GCP_BUCKET=gs://my-bucket/samples/` - * - * Generated from protobuf field map env = 2; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setEnv($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->env = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(VertexAIParameters::class, \Google\Cloud\Notebooks\V1\ExecutionTemplate_VertexAIParameters::class); - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/GetEnvironmentRequest.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/GetEnvironmentRequest.php deleted file mode 100644 index 62e81c7994b0..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/GetEnvironmentRequest.php +++ /dev/null @@ -1,85 +0,0 @@ -google.cloud.notebooks.v1.GetEnvironmentRequest - */ -class GetEnvironmentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/environments/{environment_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - - /** - * @param string $name Required. Format: - * `projects/{project_id}/locations/{location}/environments/{environment_id}` - * - * @return \Google\Cloud\Notebooks\V1\GetEnvironmentRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Format: - * `projects/{project_id}/locations/{location}/environments/{environment_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/environments/{environment_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/environments/{environment_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/GetExecutionRequest.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/GetExecutionRequest.php deleted file mode 100644 index b4da531db6e5..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/GetExecutionRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.notebooks.v1.GetExecutionRequest - */ -class GetExecutionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/executions/{execution_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Format: - * `projects/{project_id}/locations/{location}/executions/{execution_id}` - * Please see {@see NotebookServiceClient::executionName()} for help formatting this field. - * - * @return \Google\Cloud\Notebooks\V1\GetExecutionRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Format: - * `projects/{project_id}/locations/{location}/executions/{execution_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/executions/{execution_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/executions/{execution_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/GetInstanceHealthRequest.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/GetInstanceHealthRequest.php deleted file mode 100644 index 362418036f21..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/GetInstanceHealthRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.notebooks.v1.GetInstanceHealthRequest - */ -class GetInstanceHealthRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * Please see {@see NotebookServiceClient::instanceName()} for help formatting this field. - * - * @return \Google\Cloud\Notebooks\V1\GetInstanceHealthRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/GetInstanceHealthResponse.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/GetInstanceHealthResponse.php deleted file mode 100644 index 70d662501f62..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/GetInstanceHealthResponse.php +++ /dev/null @@ -1,133 +0,0 @@ -google.cloud.notebooks.v1.GetInstanceHealthResponse - */ -class GetInstanceHealthResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Runtime health_state. - * - * Generated from protobuf field .google.cloud.notebooks.v1.GetInstanceHealthResponse.HealthState health_state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $health_state = 0; - /** - * Output only. Additional information about instance health. - * Example: - * healthInfo": { - * "docker_proxy_agent_status": "1", - * "docker_status": "1", - * "jupyterlab_api_status": "-1", - * "jupyterlab_status": "-1", - * "updated": "2020-10-18 09:40:03.573409" - * } - * - * Generated from protobuf field map health_info = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $health_info; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $health_state - * Output only. Runtime health_state. - * @type array|\Google\Protobuf\Internal\MapField $health_info - * Output only. Additional information about instance health. - * Example: - * healthInfo": { - * "docker_proxy_agent_status": "1", - * "docker_status": "1", - * "jupyterlab_api_status": "-1", - * "jupyterlab_status": "-1", - * "updated": "2020-10-18 09:40:03.573409" - * } - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Runtime health_state. - * - * Generated from protobuf field .google.cloud.notebooks.v1.GetInstanceHealthResponse.HealthState health_state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getHealthState() - { - return $this->health_state; - } - - /** - * Output only. Runtime health_state. - * - * Generated from protobuf field .google.cloud.notebooks.v1.GetInstanceHealthResponse.HealthState health_state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setHealthState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Notebooks\V1\GetInstanceHealthResponse\HealthState::class); - $this->health_state = $var; - - return $this; - } - - /** - * Output only. Additional information about instance health. - * Example: - * healthInfo": { - * "docker_proxy_agent_status": "1", - * "docker_status": "1", - * "jupyterlab_api_status": "-1", - * "jupyterlab_status": "-1", - * "updated": "2020-10-18 09:40:03.573409" - * } - * - * Generated from protobuf field map health_info = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getHealthInfo() - { - return $this->health_info; - } - - /** - * Output only. Additional information about instance health. - * Example: - * healthInfo": { - * "docker_proxy_agent_status": "1", - * "docker_status": "1", - * "jupyterlab_api_status": "-1", - * "jupyterlab_status": "-1", - * "updated": "2020-10-18 09:40:03.573409" - * } - * - * Generated from protobuf field map health_info = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setHealthInfo($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->health_info = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/GetInstanceHealthResponse/HealthState.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/GetInstanceHealthResponse/HealthState.php deleted file mode 100644 index 5ecda3012ea2..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/GetInstanceHealthResponse/HealthState.php +++ /dev/null @@ -1,84 +0,0 @@ -google.cloud.notebooks.v1.GetInstanceHealthResponse.HealthState - */ -class HealthState -{ - /** - * The instance substate is unknown. - * - * Generated from protobuf enum HEALTH_STATE_UNSPECIFIED = 0; - */ - const HEALTH_STATE_UNSPECIFIED = 0; - /** - * The instance is known to be in an healthy state - * (for example, critical daemons are running) - * Applies to ACTIVE state. - * - * Generated from protobuf enum HEALTHY = 1; - */ - const HEALTHY = 1; - /** - * The instance is known to be in an unhealthy state - * (for example, critical daemons are not running) - * Applies to ACTIVE state. - * - * Generated from protobuf enum UNHEALTHY = 2; - */ - const UNHEALTHY = 2; - /** - * The instance has not installed health monitoring agent. - * Applies to ACTIVE state. - * - * Generated from protobuf enum AGENT_NOT_INSTALLED = 3; - */ - const AGENT_NOT_INSTALLED = 3; - /** - * The instance health monitoring agent is not running. - * Applies to ACTIVE state. - * - * Generated from protobuf enum AGENT_NOT_RUNNING = 4; - */ - const AGENT_NOT_RUNNING = 4; - - private static $valueToName = [ - self::HEALTH_STATE_UNSPECIFIED => 'HEALTH_STATE_UNSPECIFIED', - self::HEALTHY => 'HEALTHY', - self::UNHEALTHY => 'UNHEALTHY', - self::AGENT_NOT_INSTALLED => 'AGENT_NOT_INSTALLED', - self::AGENT_NOT_RUNNING => 'AGENT_NOT_RUNNING', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(HealthState::class, \Google\Cloud\Notebooks\V1\GetInstanceHealthResponse_HealthState::class); - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/GetInstanceRequest.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/GetInstanceRequest.php deleted file mode 100644 index 4f5d9539fda5..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/GetInstanceRequest.php +++ /dev/null @@ -1,85 +0,0 @@ -google.cloud.notebooks.v1.GetInstanceRequest - */ -class GetInstanceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - - /** - * @param string $name Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * - * @return \Google\Cloud\Notebooks\V1\GetInstanceRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/GetRuntimeRequest.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/GetRuntimeRequest.php deleted file mode 100644 index 3bf80c4ed391..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/GetRuntimeRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.notebooks.v1.GetRuntimeRequest - */ -class GetRuntimeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Format: - * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` - * Please see {@see ManagedNotebookServiceClient::runtimeName()} for help formatting this field. - * - * @return \Google\Cloud\Notebooks\V1\GetRuntimeRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Format: - * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V1\ManagedService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/GetScheduleRequest.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/GetScheduleRequest.php deleted file mode 100644 index 46cef98735dd..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/GetScheduleRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.notebooks.v1.GetScheduleRequest - */ -class GetScheduleRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/schedules/{schedule_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Format: - * `projects/{project_id}/locations/{location}/schedules/{schedule_id}` - * Please see {@see NotebookServiceClient::scheduleName()} for help formatting this field. - * - * @return \Google\Cloud\Notebooks\V1\GetScheduleRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Format: - * `projects/{project_id}/locations/{location}/schedules/{schedule_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/schedules/{schedule_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/schedules/{schedule_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance.php deleted file mode 100644 index accb7b274f41..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance.php +++ /dev/null @@ -1,1522 +0,0 @@ -google.cloud.notebooks.v1.Instance - */ -class Instance extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The name of this notebook instance. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Path to a Bash script that automatically runs after a notebook instance - * fully boots up. The path must be a URL or - * Cloud Storage path (`gs://path-to-file/file-name`). - * - * Generated from protobuf field string post_startup_script = 4; - */ - protected $post_startup_script = ''; - /** - * Output only. The proxy endpoint that is used to access the Jupyter notebook. - * - * Generated from protobuf field string proxy_uri = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $proxy_uri = ''; - /** - * Input only. The owner of this instance after creation. Format: `alias@example.com` - * Currently supports one owner only. If not specified, all of the service - * account users of your VM instance's service account can use - * the instance. - * - * Generated from protobuf field repeated string instance_owners = 6 [(.google.api.field_behavior) = INPUT_ONLY]; - */ - private $instance_owners; - /** - * The service account on this instance, giving access to other Google - * Cloud services. - * You can use any service account within the same project, but you - * must have the service account user permission to use the instance. - * If not specified, the [Compute Engine default service - * account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account) - * is used. - * - * Generated from protobuf field string service_account = 7; - */ - protected $service_account = ''; - /** - * Optional. The URIs of service account scopes to be included in - * Compute Engine instances. - * If not specified, the following - * [scopes](https://cloud.google.com/compute/docs/access/service-accounts#accesscopesiam) - * are defined: - * - https://www.googleapis.com/auth/cloud-platform - * - https://www.googleapis.com/auth/userinfo.email - * If not using default scopes, you need at least: - * https://www.googleapis.com/auth/compute - * - * Generated from protobuf field repeated string service_account_scopes = 31 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $service_account_scopes; - /** - * Required. The [Compute Engine machine - * type](https://cloud.google.com/compute/docs/machine-types) of this - * instance. - * - * Generated from protobuf field string machine_type = 8 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $machine_type = ''; - /** - * The hardware accelerator used on this instance. If you use - * accelerators, make sure that your configuration has - * [enough vCPUs and memory to support the `machine_type` you have - * selected](https://cloud.google.com/compute/docs/gpus/#gpus-list). - * - * Generated from protobuf field .google.cloud.notebooks.v1.Instance.AcceleratorConfig accelerator_config = 9; - */ - protected $accelerator_config = null; - /** - * Output only. The state of this instance. - * - * Generated from protobuf field .google.cloud.notebooks.v1.Instance.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Whether the end user authorizes Google Cloud to install GPU driver - * on this instance. - * If this field is empty or set to false, the GPU driver won't be installed. - * Only applicable to instances with GPUs. - * - * Generated from protobuf field bool install_gpu_driver = 11; - */ - protected $install_gpu_driver = false; - /** - * Specify a custom Cloud Storage path where the GPU driver is stored. - * If not specified, we'll automatically choose from official GPU drivers. - * - * Generated from protobuf field string custom_gpu_driver_path = 12; - */ - protected $custom_gpu_driver_path = ''; - /** - * Input only. The type of the boot disk attached to this instance, defaults to - * standard persistent disk (`PD_STANDARD`). - * - * Generated from protobuf field .google.cloud.notebooks.v1.Instance.DiskType boot_disk_type = 13 [(.google.api.field_behavior) = INPUT_ONLY]; - */ - protected $boot_disk_type = 0; - /** - * Input only. The size of the boot disk in GB attached to this instance, up to a maximum - * of 64000 GB (64 TB). The minimum recommended value is 100 GB. If not - * specified, this defaults to 100. - * - * Generated from protobuf field int64 boot_disk_size_gb = 14 [(.google.api.field_behavior) = INPUT_ONLY]; - */ - protected $boot_disk_size_gb = 0; - /** - * Input only. The type of the data disk attached to this instance, defaults to - * standard persistent disk (`PD_STANDARD`). - * - * Generated from protobuf field .google.cloud.notebooks.v1.Instance.DiskType data_disk_type = 25 [(.google.api.field_behavior) = INPUT_ONLY]; - */ - protected $data_disk_type = 0; - /** - * Input only. The size of the data disk in GB attached to this instance, up to a maximum - * of 64000 GB (64 TB). You can choose the size of the data disk based on how - * big your notebooks and data are. If not specified, this defaults to 100. - * - * Generated from protobuf field int64 data_disk_size_gb = 26 [(.google.api.field_behavior) = INPUT_ONLY]; - */ - protected $data_disk_size_gb = 0; - /** - * Input only. If true, the data disk will not be auto deleted when deleting the instance. - * - * Generated from protobuf field bool no_remove_data_disk = 27 [(.google.api.field_behavior) = INPUT_ONLY]; - */ - protected $no_remove_data_disk = false; - /** - * Input only. Disk encryption method used on the boot and data disks, defaults to GMEK. - * - * Generated from protobuf field .google.cloud.notebooks.v1.Instance.DiskEncryption disk_encryption = 15 [(.google.api.field_behavior) = INPUT_ONLY]; - */ - protected $disk_encryption = 0; - /** - * Input only. The KMS key used to encrypt the disks, only applicable if disk_encryption - * is CMEK. - * Format: - * `projects/{project_id}/locations/{location}/keyRings/{key_ring_id}/cryptoKeys/{key_id}` - * Learn more about [using your own encryption keys](/kms/docs/quickstart). - * - * Generated from protobuf field string kms_key = 16 [(.google.api.field_behavior) = INPUT_ONLY]; - */ - protected $kms_key = ''; - /** - * Output only. Attached disks to notebook instance. - * - * Generated from protobuf field repeated .google.cloud.notebooks.v1.Instance.Disk disks = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $disks; - /** - * Optional. Shielded VM configuration. - * [Images using supported Shielded VM - * features](https://cloud.google.com/compute/docs/instances/modifying-shielded-vm). - * - * Generated from protobuf field .google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig shielded_instance_config = 30 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $shielded_instance_config = null; - /** - * If true, no public IP will be assigned to this instance. - * - * Generated from protobuf field bool no_public_ip = 17; - */ - protected $no_public_ip = false; - /** - * If true, the notebook instance will not register with the proxy. - * - * Generated from protobuf field bool no_proxy_access = 18; - */ - protected $no_proxy_access = false; - /** - * The name of the VPC that this instance is in. - * Format: - * `projects/{project_id}/global/networks/{network_id}` - * - * Generated from protobuf field string network = 19; - */ - protected $network = ''; - /** - * The name of the subnet that this instance is in. - * Format: - * `projects/{project_id}/regions/{region}/subnetworks/{subnetwork_id}` - * - * Generated from protobuf field string subnet = 20; - */ - protected $subnet = ''; - /** - * Labels to apply to this instance. - * These can be later modified by the setLabels method. - * - * Generated from protobuf field map labels = 21; - */ - private $labels; - /** - * Custom metadata to apply to this instance. - * - * Generated from protobuf field map metadata = 22; - */ - private $metadata; - /** - * Optional. The Compute Engine tags to add to runtime (see [Tagging - * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)). - * - * Generated from protobuf field repeated string tags = 32 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $tags; - /** - * The upgrade history of this instance. - * - * Generated from protobuf field repeated .google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry upgrade_history = 29; - */ - private $upgrade_history; - /** - * Optional. The type of vNIC to be used on this interface. This may be gVNIC or - * VirtioNet. - * - * Generated from protobuf field .google.cloud.notebooks.v1.Instance.NicType nic_type = 33 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $nic_type = 0; - /** - * Optional. The optional reservation affinity. Setting this field will apply - * the specified [Zonal Compute - * Reservation](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources) - * to this notebook instance. - * - * Generated from protobuf field .google.cloud.notebooks.v1.ReservationAffinity reservation_affinity = 34 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $reservation_affinity = null; - /** - * Output only. Email address of entity that sent original CreateInstance request. - * - * Generated from protobuf field string creator = 36 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $creator = ''; - /** - * Optional. Flag to enable ip forwarding or not, default false/off. - * https://cloud.google.com/vpc/docs/using-routes#canipforward - * - * Generated from protobuf field bool can_ip_forward = 39 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $can_ip_forward = false; - /** - * Output only. Instance creation time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. Instance update time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - protected $environment; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The name of this notebook instance. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * @type \Google\Cloud\Notebooks\V1\VmImage $vm_image - * Use a Compute Engine VM image to start the notebook instance. - * @type \Google\Cloud\Notebooks\V1\ContainerImage $container_image - * Use a container image to start the notebook instance. - * @type string $post_startup_script - * Path to a Bash script that automatically runs after a notebook instance - * fully boots up. The path must be a URL or - * Cloud Storage path (`gs://path-to-file/file-name`). - * @type string $proxy_uri - * Output only. The proxy endpoint that is used to access the Jupyter notebook. - * @type array|\Google\Protobuf\Internal\RepeatedField $instance_owners - * Input only. The owner of this instance after creation. Format: `alias@example.com` - * Currently supports one owner only. If not specified, all of the service - * account users of your VM instance's service account can use - * the instance. - * @type string $service_account - * The service account on this instance, giving access to other Google - * Cloud services. - * You can use any service account within the same project, but you - * must have the service account user permission to use the instance. - * If not specified, the [Compute Engine default service - * account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account) - * is used. - * @type array|\Google\Protobuf\Internal\RepeatedField $service_account_scopes - * Optional. The URIs of service account scopes to be included in - * Compute Engine instances. - * If not specified, the following - * [scopes](https://cloud.google.com/compute/docs/access/service-accounts#accesscopesiam) - * are defined: - * - https://www.googleapis.com/auth/cloud-platform - * - https://www.googleapis.com/auth/userinfo.email - * If not using default scopes, you need at least: - * https://www.googleapis.com/auth/compute - * @type string $machine_type - * Required. The [Compute Engine machine - * type](https://cloud.google.com/compute/docs/machine-types) of this - * instance. - * @type \Google\Cloud\Notebooks\V1\Instance\AcceleratorConfig $accelerator_config - * The hardware accelerator used on this instance. If you use - * accelerators, make sure that your configuration has - * [enough vCPUs and memory to support the `machine_type` you have - * selected](https://cloud.google.com/compute/docs/gpus/#gpus-list). - * @type int $state - * Output only. The state of this instance. - * @type bool $install_gpu_driver - * Whether the end user authorizes Google Cloud to install GPU driver - * on this instance. - * If this field is empty or set to false, the GPU driver won't be installed. - * Only applicable to instances with GPUs. - * @type string $custom_gpu_driver_path - * Specify a custom Cloud Storage path where the GPU driver is stored. - * If not specified, we'll automatically choose from official GPU drivers. - * @type int $boot_disk_type - * Input only. The type of the boot disk attached to this instance, defaults to - * standard persistent disk (`PD_STANDARD`). - * @type int|string $boot_disk_size_gb - * Input only. The size of the boot disk in GB attached to this instance, up to a maximum - * of 64000 GB (64 TB). The minimum recommended value is 100 GB. If not - * specified, this defaults to 100. - * @type int $data_disk_type - * Input only. The type of the data disk attached to this instance, defaults to - * standard persistent disk (`PD_STANDARD`). - * @type int|string $data_disk_size_gb - * Input only. The size of the data disk in GB attached to this instance, up to a maximum - * of 64000 GB (64 TB). You can choose the size of the data disk based on how - * big your notebooks and data are. If not specified, this defaults to 100. - * @type bool $no_remove_data_disk - * Input only. If true, the data disk will not be auto deleted when deleting the instance. - * @type int $disk_encryption - * Input only. Disk encryption method used on the boot and data disks, defaults to GMEK. - * @type string $kms_key - * Input only. The KMS key used to encrypt the disks, only applicable if disk_encryption - * is CMEK. - * Format: - * `projects/{project_id}/locations/{location}/keyRings/{key_ring_id}/cryptoKeys/{key_id}` - * Learn more about [using your own encryption keys](/kms/docs/quickstart). - * @type array<\Google\Cloud\Notebooks\V1\Instance\Disk>|\Google\Protobuf\Internal\RepeatedField $disks - * Output only. Attached disks to notebook instance. - * @type \Google\Cloud\Notebooks\V1\Instance\ShieldedInstanceConfig $shielded_instance_config - * Optional. Shielded VM configuration. - * [Images using supported Shielded VM - * features](https://cloud.google.com/compute/docs/instances/modifying-shielded-vm). - * @type bool $no_public_ip - * If true, no public IP will be assigned to this instance. - * @type bool $no_proxy_access - * If true, the notebook instance will not register with the proxy. - * @type string $network - * The name of the VPC that this instance is in. - * Format: - * `projects/{project_id}/global/networks/{network_id}` - * @type string $subnet - * The name of the subnet that this instance is in. - * Format: - * `projects/{project_id}/regions/{region}/subnetworks/{subnetwork_id}` - * @type array|\Google\Protobuf\Internal\MapField $labels - * Labels to apply to this instance. - * These can be later modified by the setLabels method. - * @type array|\Google\Protobuf\Internal\MapField $metadata - * Custom metadata to apply to this instance. - * @type array|\Google\Protobuf\Internal\RepeatedField $tags - * Optional. The Compute Engine tags to add to runtime (see [Tagging - * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)). - * @type array<\Google\Cloud\Notebooks\V1\Instance\UpgradeHistoryEntry>|\Google\Protobuf\Internal\RepeatedField $upgrade_history - * The upgrade history of this instance. - * @type int $nic_type - * Optional. The type of vNIC to be used on this interface. This may be gVNIC or - * VirtioNet. - * @type \Google\Cloud\Notebooks\V1\ReservationAffinity $reservation_affinity - * Optional. The optional reservation affinity. Setting this field will apply - * the specified [Zonal Compute - * Reservation](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources) - * to this notebook instance. - * @type string $creator - * Output only. Email address of entity that sent original CreateInstance request. - * @type bool $can_ip_forward - * Optional. Flag to enable ip forwarding or not, default false/off. - * https://cloud.google.com/vpc/docs/using-routes#canipforward - * @type \Google\Protobuf\Timestamp $create_time - * Output only. Instance creation time. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. Instance update time. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V1\Instance::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The name of this notebook instance. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The name of this notebook instance. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Use a Compute Engine VM image to start the notebook instance. - * - * Generated from protobuf field .google.cloud.notebooks.v1.VmImage vm_image = 2; - * @return \Google\Cloud\Notebooks\V1\VmImage|null - */ - public function getVmImage() - { - return $this->readOneof(2); - } - - public function hasVmImage() - { - return $this->hasOneof(2); - } - - /** - * Use a Compute Engine VM image to start the notebook instance. - * - * Generated from protobuf field .google.cloud.notebooks.v1.VmImage vm_image = 2; - * @param \Google\Cloud\Notebooks\V1\VmImage $var - * @return $this - */ - public function setVmImage($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V1\VmImage::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Use a container image to start the notebook instance. - * - * Generated from protobuf field .google.cloud.notebooks.v1.ContainerImage container_image = 3; - * @return \Google\Cloud\Notebooks\V1\ContainerImage|null - */ - public function getContainerImage() - { - return $this->readOneof(3); - } - - public function hasContainerImage() - { - return $this->hasOneof(3); - } - - /** - * Use a container image to start the notebook instance. - * - * Generated from protobuf field .google.cloud.notebooks.v1.ContainerImage container_image = 3; - * @param \Google\Cloud\Notebooks\V1\ContainerImage $var - * @return $this - */ - public function setContainerImage($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V1\ContainerImage::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Path to a Bash script that automatically runs after a notebook instance - * fully boots up. The path must be a URL or - * Cloud Storage path (`gs://path-to-file/file-name`). - * - * Generated from protobuf field string post_startup_script = 4; - * @return string - */ - public function getPostStartupScript() - { - return $this->post_startup_script; - } - - /** - * Path to a Bash script that automatically runs after a notebook instance - * fully boots up. The path must be a URL or - * Cloud Storage path (`gs://path-to-file/file-name`). - * - * Generated from protobuf field string post_startup_script = 4; - * @param string $var - * @return $this - */ - public function setPostStartupScript($var) - { - GPBUtil::checkString($var, True); - $this->post_startup_script = $var; - - return $this; - } - - /** - * Output only. The proxy endpoint that is used to access the Jupyter notebook. - * - * Generated from protobuf field string proxy_uri = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getProxyUri() - { - return $this->proxy_uri; - } - - /** - * Output only. The proxy endpoint that is used to access the Jupyter notebook. - * - * Generated from protobuf field string proxy_uri = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setProxyUri($var) - { - GPBUtil::checkString($var, True); - $this->proxy_uri = $var; - - return $this; - } - - /** - * Input only. The owner of this instance after creation. Format: `alias@example.com` - * Currently supports one owner only. If not specified, all of the service - * account users of your VM instance's service account can use - * the instance. - * - * Generated from protobuf field repeated string instance_owners = 6 [(.google.api.field_behavior) = INPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getInstanceOwners() - { - return $this->instance_owners; - } - - /** - * Input only. The owner of this instance after creation. Format: `alias@example.com` - * Currently supports one owner only. If not specified, all of the service - * account users of your VM instance's service account can use - * the instance. - * - * Generated from protobuf field repeated string instance_owners = 6 [(.google.api.field_behavior) = INPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setInstanceOwners($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->instance_owners = $arr; - - return $this; - } - - /** - * The service account on this instance, giving access to other Google - * Cloud services. - * You can use any service account within the same project, but you - * must have the service account user permission to use the instance. - * If not specified, the [Compute Engine default service - * account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account) - * is used. - * - * Generated from protobuf field string service_account = 7; - * @return string - */ - public function getServiceAccount() - { - return $this->service_account; - } - - /** - * The service account on this instance, giving access to other Google - * Cloud services. - * You can use any service account within the same project, but you - * must have the service account user permission to use the instance. - * If not specified, the [Compute Engine default service - * account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account) - * is used. - * - * Generated from protobuf field string service_account = 7; - * @param string $var - * @return $this - */ - public function setServiceAccount($var) - { - GPBUtil::checkString($var, True); - $this->service_account = $var; - - return $this; - } - - /** - * Optional. The URIs of service account scopes to be included in - * Compute Engine instances. - * If not specified, the following - * [scopes](https://cloud.google.com/compute/docs/access/service-accounts#accesscopesiam) - * are defined: - * - https://www.googleapis.com/auth/cloud-platform - * - https://www.googleapis.com/auth/userinfo.email - * If not using default scopes, you need at least: - * https://www.googleapis.com/auth/compute - * - * Generated from protobuf field repeated string service_account_scopes = 31 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getServiceAccountScopes() - { - return $this->service_account_scopes; - } - - /** - * Optional. The URIs of service account scopes to be included in - * Compute Engine instances. - * If not specified, the following - * [scopes](https://cloud.google.com/compute/docs/access/service-accounts#accesscopesiam) - * are defined: - * - https://www.googleapis.com/auth/cloud-platform - * - https://www.googleapis.com/auth/userinfo.email - * If not using default scopes, you need at least: - * https://www.googleapis.com/auth/compute - * - * Generated from protobuf field repeated string service_account_scopes = 31 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setServiceAccountScopes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->service_account_scopes = $arr; - - return $this; - } - - /** - * Required. The [Compute Engine machine - * type](https://cloud.google.com/compute/docs/machine-types) of this - * instance. - * - * Generated from protobuf field string machine_type = 8 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getMachineType() - { - return $this->machine_type; - } - - /** - * Required. The [Compute Engine machine - * type](https://cloud.google.com/compute/docs/machine-types) of this - * instance. - * - * Generated from protobuf field string machine_type = 8 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setMachineType($var) - { - GPBUtil::checkString($var, True); - $this->machine_type = $var; - - return $this; - } - - /** - * The hardware accelerator used on this instance. If you use - * accelerators, make sure that your configuration has - * [enough vCPUs and memory to support the `machine_type` you have - * selected](https://cloud.google.com/compute/docs/gpus/#gpus-list). - * - * Generated from protobuf field .google.cloud.notebooks.v1.Instance.AcceleratorConfig accelerator_config = 9; - * @return \Google\Cloud\Notebooks\V1\Instance\AcceleratorConfig|null - */ - public function getAcceleratorConfig() - { - return $this->accelerator_config; - } - - public function hasAcceleratorConfig() - { - return isset($this->accelerator_config); - } - - public function clearAcceleratorConfig() - { - unset($this->accelerator_config); - } - - /** - * The hardware accelerator used on this instance. If you use - * accelerators, make sure that your configuration has - * [enough vCPUs and memory to support the `machine_type` you have - * selected](https://cloud.google.com/compute/docs/gpus/#gpus-list). - * - * Generated from protobuf field .google.cloud.notebooks.v1.Instance.AcceleratorConfig accelerator_config = 9; - * @param \Google\Cloud\Notebooks\V1\Instance\AcceleratorConfig $var - * @return $this - */ - public function setAcceleratorConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V1\Instance\AcceleratorConfig::class); - $this->accelerator_config = $var; - - return $this; - } - - /** - * Output only. The state of this instance. - * - * Generated from protobuf field .google.cloud.notebooks.v1.Instance.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The state of this instance. - * - * Generated from protobuf field .google.cloud.notebooks.v1.Instance.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Notebooks\V1\Instance\State::class); - $this->state = $var; - - return $this; - } - - /** - * Whether the end user authorizes Google Cloud to install GPU driver - * on this instance. - * If this field is empty or set to false, the GPU driver won't be installed. - * Only applicable to instances with GPUs. - * - * Generated from protobuf field bool install_gpu_driver = 11; - * @return bool - */ - public function getInstallGpuDriver() - { - return $this->install_gpu_driver; - } - - /** - * Whether the end user authorizes Google Cloud to install GPU driver - * on this instance. - * If this field is empty or set to false, the GPU driver won't be installed. - * Only applicable to instances with GPUs. - * - * Generated from protobuf field bool install_gpu_driver = 11; - * @param bool $var - * @return $this - */ - public function setInstallGpuDriver($var) - { - GPBUtil::checkBool($var); - $this->install_gpu_driver = $var; - - return $this; - } - - /** - * Specify a custom Cloud Storage path where the GPU driver is stored. - * If not specified, we'll automatically choose from official GPU drivers. - * - * Generated from protobuf field string custom_gpu_driver_path = 12; - * @return string - */ - public function getCustomGpuDriverPath() - { - return $this->custom_gpu_driver_path; - } - - /** - * Specify a custom Cloud Storage path where the GPU driver is stored. - * If not specified, we'll automatically choose from official GPU drivers. - * - * Generated from protobuf field string custom_gpu_driver_path = 12; - * @param string $var - * @return $this - */ - public function setCustomGpuDriverPath($var) - { - GPBUtil::checkString($var, True); - $this->custom_gpu_driver_path = $var; - - return $this; - } - - /** - * Input only. The type of the boot disk attached to this instance, defaults to - * standard persistent disk (`PD_STANDARD`). - * - * Generated from protobuf field .google.cloud.notebooks.v1.Instance.DiskType boot_disk_type = 13 [(.google.api.field_behavior) = INPUT_ONLY]; - * @return int - */ - public function getBootDiskType() - { - return $this->boot_disk_type; - } - - /** - * Input only. The type of the boot disk attached to this instance, defaults to - * standard persistent disk (`PD_STANDARD`). - * - * Generated from protobuf field .google.cloud.notebooks.v1.Instance.DiskType boot_disk_type = 13 [(.google.api.field_behavior) = INPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setBootDiskType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Notebooks\V1\Instance\DiskType::class); - $this->boot_disk_type = $var; - - return $this; - } - - /** - * Input only. The size of the boot disk in GB attached to this instance, up to a maximum - * of 64000 GB (64 TB). The minimum recommended value is 100 GB. If not - * specified, this defaults to 100. - * - * Generated from protobuf field int64 boot_disk_size_gb = 14 [(.google.api.field_behavior) = INPUT_ONLY]; - * @return int|string - */ - public function getBootDiskSizeGb() - { - return $this->boot_disk_size_gb; - } - - /** - * Input only. The size of the boot disk in GB attached to this instance, up to a maximum - * of 64000 GB (64 TB). The minimum recommended value is 100 GB. If not - * specified, this defaults to 100. - * - * Generated from protobuf field int64 boot_disk_size_gb = 14 [(.google.api.field_behavior) = INPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setBootDiskSizeGb($var) - { - GPBUtil::checkInt64($var); - $this->boot_disk_size_gb = $var; - - return $this; - } - - /** - * Input only. The type of the data disk attached to this instance, defaults to - * standard persistent disk (`PD_STANDARD`). - * - * Generated from protobuf field .google.cloud.notebooks.v1.Instance.DiskType data_disk_type = 25 [(.google.api.field_behavior) = INPUT_ONLY]; - * @return int - */ - public function getDataDiskType() - { - return $this->data_disk_type; - } - - /** - * Input only. The type of the data disk attached to this instance, defaults to - * standard persistent disk (`PD_STANDARD`). - * - * Generated from protobuf field .google.cloud.notebooks.v1.Instance.DiskType data_disk_type = 25 [(.google.api.field_behavior) = INPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setDataDiskType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Notebooks\V1\Instance\DiskType::class); - $this->data_disk_type = $var; - - return $this; - } - - /** - * Input only. The size of the data disk in GB attached to this instance, up to a maximum - * of 64000 GB (64 TB). You can choose the size of the data disk based on how - * big your notebooks and data are. If not specified, this defaults to 100. - * - * Generated from protobuf field int64 data_disk_size_gb = 26 [(.google.api.field_behavior) = INPUT_ONLY]; - * @return int|string - */ - public function getDataDiskSizeGb() - { - return $this->data_disk_size_gb; - } - - /** - * Input only. The size of the data disk in GB attached to this instance, up to a maximum - * of 64000 GB (64 TB). You can choose the size of the data disk based on how - * big your notebooks and data are. If not specified, this defaults to 100. - * - * Generated from protobuf field int64 data_disk_size_gb = 26 [(.google.api.field_behavior) = INPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setDataDiskSizeGb($var) - { - GPBUtil::checkInt64($var); - $this->data_disk_size_gb = $var; - - return $this; - } - - /** - * Input only. If true, the data disk will not be auto deleted when deleting the instance. - * - * Generated from protobuf field bool no_remove_data_disk = 27 [(.google.api.field_behavior) = INPUT_ONLY]; - * @return bool - */ - public function getNoRemoveDataDisk() - { - return $this->no_remove_data_disk; - } - - /** - * Input only. If true, the data disk will not be auto deleted when deleting the instance. - * - * Generated from protobuf field bool no_remove_data_disk = 27 [(.google.api.field_behavior) = INPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setNoRemoveDataDisk($var) - { - GPBUtil::checkBool($var); - $this->no_remove_data_disk = $var; - - return $this; - } - - /** - * Input only. Disk encryption method used on the boot and data disks, defaults to GMEK. - * - * Generated from protobuf field .google.cloud.notebooks.v1.Instance.DiskEncryption disk_encryption = 15 [(.google.api.field_behavior) = INPUT_ONLY]; - * @return int - */ - public function getDiskEncryption() - { - return $this->disk_encryption; - } - - /** - * Input only. Disk encryption method used on the boot and data disks, defaults to GMEK. - * - * Generated from protobuf field .google.cloud.notebooks.v1.Instance.DiskEncryption disk_encryption = 15 [(.google.api.field_behavior) = INPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setDiskEncryption($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Notebooks\V1\Instance\DiskEncryption::class); - $this->disk_encryption = $var; - - return $this; - } - - /** - * Input only. The KMS key used to encrypt the disks, only applicable if disk_encryption - * is CMEK. - * Format: - * `projects/{project_id}/locations/{location}/keyRings/{key_ring_id}/cryptoKeys/{key_id}` - * Learn more about [using your own encryption keys](/kms/docs/quickstart). - * - * Generated from protobuf field string kms_key = 16 [(.google.api.field_behavior) = INPUT_ONLY]; - * @return string - */ - public function getKmsKey() - { - return $this->kms_key; - } - - /** - * Input only. The KMS key used to encrypt the disks, only applicable if disk_encryption - * is CMEK. - * Format: - * `projects/{project_id}/locations/{location}/keyRings/{key_ring_id}/cryptoKeys/{key_id}` - * Learn more about [using your own encryption keys](/kms/docs/quickstart). - * - * Generated from protobuf field string kms_key = 16 [(.google.api.field_behavior) = INPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setKmsKey($var) - { - GPBUtil::checkString($var, True); - $this->kms_key = $var; - - return $this; - } - - /** - * Output only. Attached disks to notebook instance. - * - * Generated from protobuf field repeated .google.cloud.notebooks.v1.Instance.Disk disks = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDisks() - { - return $this->disks; - } - - /** - * Output only. Attached disks to notebook instance. - * - * Generated from protobuf field repeated .google.cloud.notebooks.v1.Instance.Disk disks = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\Notebooks\V1\Instance\Disk>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDisks($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Notebooks\V1\Instance\Disk::class); - $this->disks = $arr; - - return $this; - } - - /** - * Optional. Shielded VM configuration. - * [Images using supported Shielded VM - * features](https://cloud.google.com/compute/docs/instances/modifying-shielded-vm). - * - * Generated from protobuf field .google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig shielded_instance_config = 30 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Notebooks\V1\Instance\ShieldedInstanceConfig|null - */ - public function getShieldedInstanceConfig() - { - return $this->shielded_instance_config; - } - - public function hasShieldedInstanceConfig() - { - return isset($this->shielded_instance_config); - } - - public function clearShieldedInstanceConfig() - { - unset($this->shielded_instance_config); - } - - /** - * Optional. Shielded VM configuration. - * [Images using supported Shielded VM - * features](https://cloud.google.com/compute/docs/instances/modifying-shielded-vm). - * - * Generated from protobuf field .google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig shielded_instance_config = 30 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Notebooks\V1\Instance\ShieldedInstanceConfig $var - * @return $this - */ - public function setShieldedInstanceConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V1\Instance\ShieldedInstanceConfig::class); - $this->shielded_instance_config = $var; - - return $this; - } - - /** - * If true, no public IP will be assigned to this instance. - * - * Generated from protobuf field bool no_public_ip = 17; - * @return bool - */ - public function getNoPublicIp() - { - return $this->no_public_ip; - } - - /** - * If true, no public IP will be assigned to this instance. - * - * Generated from protobuf field bool no_public_ip = 17; - * @param bool $var - * @return $this - */ - public function setNoPublicIp($var) - { - GPBUtil::checkBool($var); - $this->no_public_ip = $var; - - return $this; - } - - /** - * If true, the notebook instance will not register with the proxy. - * - * Generated from protobuf field bool no_proxy_access = 18; - * @return bool - */ - public function getNoProxyAccess() - { - return $this->no_proxy_access; - } - - /** - * If true, the notebook instance will not register with the proxy. - * - * Generated from protobuf field bool no_proxy_access = 18; - * @param bool $var - * @return $this - */ - public function setNoProxyAccess($var) - { - GPBUtil::checkBool($var); - $this->no_proxy_access = $var; - - return $this; - } - - /** - * The name of the VPC that this instance is in. - * Format: - * `projects/{project_id}/global/networks/{network_id}` - * - * Generated from protobuf field string network = 19; - * @return string - */ - public function getNetwork() - { - return $this->network; - } - - /** - * The name of the VPC that this instance is in. - * Format: - * `projects/{project_id}/global/networks/{network_id}` - * - * Generated from protobuf field string network = 19; - * @param string $var - * @return $this - */ - public function setNetwork($var) - { - GPBUtil::checkString($var, True); - $this->network = $var; - - return $this; - } - - /** - * The name of the subnet that this instance is in. - * Format: - * `projects/{project_id}/regions/{region}/subnetworks/{subnetwork_id}` - * - * Generated from protobuf field string subnet = 20; - * @return string - */ - public function getSubnet() - { - return $this->subnet; - } - - /** - * The name of the subnet that this instance is in. - * Format: - * `projects/{project_id}/regions/{region}/subnetworks/{subnetwork_id}` - * - * Generated from protobuf field string subnet = 20; - * @param string $var - * @return $this - */ - public function setSubnet($var) - { - GPBUtil::checkString($var, True); - $this->subnet = $var; - - return $this; - } - - /** - * Labels to apply to this instance. - * These can be later modified by the setLabels method. - * - * Generated from protobuf field map labels = 21; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Labels to apply to this instance. - * These can be later modified by the setLabels method. - * - * Generated from protobuf field map labels = 21; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Custom metadata to apply to this instance. - * - * Generated from protobuf field map metadata = 22; - * @return \Google\Protobuf\Internal\MapField - */ - public function getMetadata() - { - return $this->metadata; - } - - /** - * Custom metadata to apply to this instance. - * - * Generated from protobuf field map metadata = 22; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setMetadata($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->metadata = $arr; - - return $this; - } - - /** - * Optional. The Compute Engine tags to add to runtime (see [Tagging - * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)). - * - * Generated from protobuf field repeated string tags = 32 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTags() - { - return $this->tags; - } - - /** - * Optional. The Compute Engine tags to add to runtime (see [Tagging - * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)). - * - * Generated from protobuf field repeated string tags = 32 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTags($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->tags = $arr; - - return $this; - } - - /** - * The upgrade history of this instance. - * - * Generated from protobuf field repeated .google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry upgrade_history = 29; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUpgradeHistory() - { - return $this->upgrade_history; - } - - /** - * The upgrade history of this instance. - * - * Generated from protobuf field repeated .google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry upgrade_history = 29; - * @param array<\Google\Cloud\Notebooks\V1\Instance\UpgradeHistoryEntry>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUpgradeHistory($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Notebooks\V1\Instance\UpgradeHistoryEntry::class); - $this->upgrade_history = $arr; - - return $this; - } - - /** - * Optional. The type of vNIC to be used on this interface. This may be gVNIC or - * VirtioNet. - * - * Generated from protobuf field .google.cloud.notebooks.v1.Instance.NicType nic_type = 33 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getNicType() - { - return $this->nic_type; - } - - /** - * Optional. The type of vNIC to be used on this interface. This may be gVNIC or - * VirtioNet. - * - * Generated from protobuf field .google.cloud.notebooks.v1.Instance.NicType nic_type = 33 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setNicType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Notebooks\V1\Instance\NicType::class); - $this->nic_type = $var; - - return $this; - } - - /** - * Optional. The optional reservation affinity. Setting this field will apply - * the specified [Zonal Compute - * Reservation](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources) - * to this notebook instance. - * - * Generated from protobuf field .google.cloud.notebooks.v1.ReservationAffinity reservation_affinity = 34 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Notebooks\V1\ReservationAffinity|null - */ - public function getReservationAffinity() - { - return $this->reservation_affinity; - } - - public function hasReservationAffinity() - { - return isset($this->reservation_affinity); - } - - public function clearReservationAffinity() - { - unset($this->reservation_affinity); - } - - /** - * Optional. The optional reservation affinity. Setting this field will apply - * the specified [Zonal Compute - * Reservation](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources) - * to this notebook instance. - * - * Generated from protobuf field .google.cloud.notebooks.v1.ReservationAffinity reservation_affinity = 34 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Notebooks\V1\ReservationAffinity $var - * @return $this - */ - public function setReservationAffinity($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V1\ReservationAffinity::class); - $this->reservation_affinity = $var; - - return $this; - } - - /** - * Output only. Email address of entity that sent original CreateInstance request. - * - * Generated from protobuf field string creator = 36 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getCreator() - { - return $this->creator; - } - - /** - * Output only. Email address of entity that sent original CreateInstance request. - * - * Generated from protobuf field string creator = 36 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setCreator($var) - { - GPBUtil::checkString($var, True); - $this->creator = $var; - - return $this; - } - - /** - * Optional. Flag to enable ip forwarding or not, default false/off. - * https://cloud.google.com/vpc/docs/using-routes#canipforward - * - * Generated from protobuf field bool can_ip_forward = 39 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getCanIpForward() - { - return $this->can_ip_forward; - } - - /** - * Optional. Flag to enable ip forwarding or not, default false/off. - * https://cloud.google.com/vpc/docs/using-routes#canipforward - * - * Generated from protobuf field bool can_ip_forward = 39 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setCanIpForward($var) - { - GPBUtil::checkBool($var); - $this->can_ip_forward = $var; - - return $this; - } - - /** - * Output only. Instance creation time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. Instance creation time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. Instance update time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. Instance update time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * @return string - */ - public function getEnvironment() - { - return $this->whichOneof("environment"); - } - -} - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance/AcceleratorConfig.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance/AcceleratorConfig.php deleted file mode 100644 index 03690da04700..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance/AcceleratorConfig.php +++ /dev/null @@ -1,107 +0,0 @@ -google.cloud.notebooks.v1.Instance.AcceleratorConfig - */ -class AcceleratorConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Type of this accelerator. - * - * Generated from protobuf field .google.cloud.notebooks.v1.Instance.AcceleratorType type = 1; - */ - protected $type = 0; - /** - * Count of cores of this accelerator. - * - * Generated from protobuf field int64 core_count = 2; - */ - protected $core_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $type - * Type of this accelerator. - * @type int|string $core_count - * Count of cores of this accelerator. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V1\Instance::initOnce(); - parent::__construct($data); - } - - /** - * Type of this accelerator. - * - * Generated from protobuf field .google.cloud.notebooks.v1.Instance.AcceleratorType type = 1; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Type of this accelerator. - * - * Generated from protobuf field .google.cloud.notebooks.v1.Instance.AcceleratorType type = 1; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Notebooks\V1\Instance\AcceleratorType::class); - $this->type = $var; - - return $this; - } - - /** - * Count of cores of this accelerator. - * - * Generated from protobuf field int64 core_count = 2; - * @return int|string - */ - public function getCoreCount() - { - return $this->core_count; - } - - /** - * Count of cores of this accelerator. - * - * Generated from protobuf field int64 core_count = 2; - * @param int|string $var - * @return $this - */ - public function setCoreCount($var) - { - GPBUtil::checkInt64($var); - $this->core_count = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(AcceleratorConfig::class, \Google\Cloud\Notebooks\V1\Instance_AcceleratorConfig::class); - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance/AcceleratorType.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance/AcceleratorType.php deleted file mode 100644 index 9831175c0a2b..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance/AcceleratorType.php +++ /dev/null @@ -1,128 +0,0 @@ -google.cloud.notebooks.v1.Instance.AcceleratorType - */ -class AcceleratorType -{ - /** - * Accelerator type is not specified. - * - * Generated from protobuf enum ACCELERATOR_TYPE_UNSPECIFIED = 0; - */ - const ACCELERATOR_TYPE_UNSPECIFIED = 0; - /** - * Accelerator type is Nvidia Tesla K80. - * - * Generated from protobuf enum NVIDIA_TESLA_K80 = 1; - */ - const NVIDIA_TESLA_K80 = 1; - /** - * Accelerator type is Nvidia Tesla P100. - * - * Generated from protobuf enum NVIDIA_TESLA_P100 = 2; - */ - const NVIDIA_TESLA_P100 = 2; - /** - * Accelerator type is Nvidia Tesla V100. - * - * Generated from protobuf enum NVIDIA_TESLA_V100 = 3; - */ - const NVIDIA_TESLA_V100 = 3; - /** - * Accelerator type is Nvidia Tesla P4. - * - * Generated from protobuf enum NVIDIA_TESLA_P4 = 4; - */ - const NVIDIA_TESLA_P4 = 4; - /** - * Accelerator type is Nvidia Tesla T4. - * - * Generated from protobuf enum NVIDIA_TESLA_T4 = 5; - */ - const NVIDIA_TESLA_T4 = 5; - /** - * Accelerator type is Nvidia Tesla A100. - * - * Generated from protobuf enum NVIDIA_TESLA_A100 = 11; - */ - const NVIDIA_TESLA_A100 = 11; - /** - * Accelerator type is NVIDIA Tesla T4 Virtual Workstations. - * - * Generated from protobuf enum NVIDIA_TESLA_T4_VWS = 8; - */ - const NVIDIA_TESLA_T4_VWS = 8; - /** - * Accelerator type is NVIDIA Tesla P100 Virtual Workstations. - * - * Generated from protobuf enum NVIDIA_TESLA_P100_VWS = 9; - */ - const NVIDIA_TESLA_P100_VWS = 9; - /** - * Accelerator type is NVIDIA Tesla P4 Virtual Workstations. - * - * Generated from protobuf enum NVIDIA_TESLA_P4_VWS = 10; - */ - const NVIDIA_TESLA_P4_VWS = 10; - /** - * (Coming soon) Accelerator type is TPU V2. - * - * Generated from protobuf enum TPU_V2 = 6; - */ - const TPU_V2 = 6; - /** - * (Coming soon) Accelerator type is TPU V3. - * - * Generated from protobuf enum TPU_V3 = 7; - */ - const TPU_V3 = 7; - - private static $valueToName = [ - self::ACCELERATOR_TYPE_UNSPECIFIED => 'ACCELERATOR_TYPE_UNSPECIFIED', - self::NVIDIA_TESLA_K80 => 'NVIDIA_TESLA_K80', - self::NVIDIA_TESLA_P100 => 'NVIDIA_TESLA_P100', - self::NVIDIA_TESLA_V100 => 'NVIDIA_TESLA_V100', - self::NVIDIA_TESLA_P4 => 'NVIDIA_TESLA_P4', - self::NVIDIA_TESLA_T4 => 'NVIDIA_TESLA_T4', - self::NVIDIA_TESLA_A100 => 'NVIDIA_TESLA_A100', - self::NVIDIA_TESLA_T4_VWS => 'NVIDIA_TESLA_T4_VWS', - self::NVIDIA_TESLA_P100_VWS => 'NVIDIA_TESLA_P100_VWS', - self::NVIDIA_TESLA_P4_VWS => 'NVIDIA_TESLA_P4_VWS', - self::TPU_V2 => 'TPU_V2', - self::TPU_V3 => 'TPU_V3', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(AcceleratorType::class, \Google\Cloud\Notebooks\V1\Instance_AcceleratorType::class); - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance/Disk.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance/Disk.php deleted file mode 100644 index b6b53e111ba1..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance/Disk.php +++ /dev/null @@ -1,568 +0,0 @@ -google.cloud.notebooks.v1.Instance.Disk - */ -class Disk extends \Google\Protobuf\Internal\Message -{ - /** - * Indicates whether the disk will be auto-deleted when the instance is - * deleted (but not when the disk is detached from the instance). - * - * Generated from protobuf field bool auto_delete = 1; - */ - protected $auto_delete = false; - /** - * Indicates that this is a boot disk. The virtual machine will use the - * first partition of the disk for its root filesystem. - * - * Generated from protobuf field bool boot = 2; - */ - protected $boot = false; - /** - * Indicates a unique device name of your choice that is reflected into the - * `/dev/disk/by-id/google-*` tree of a Linux operating system running - * within the instance. This name can be used to reference the device for - * mounting, resizing, and so on, from within the instance. - * If not specified, the server chooses a default device name to apply to - * this disk, in the form persistent-disk-x, where x is a number assigned by - * Google Compute Engine.This field is only applicable for persistent disks. - * - * Generated from protobuf field string device_name = 3; - */ - protected $device_name = ''; - /** - * Indicates the size of the disk in base-2 GB. - * - * Generated from protobuf field int64 disk_size_gb = 4; - */ - protected $disk_size_gb = 0; - /** - * Indicates a list of features to enable on the guest operating system. - * Applicable only for bootable images. Read Enabling guest operating - * system features to see a list of available options. - * - * Generated from protobuf field repeated .google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature guest_os_features = 5; - */ - private $guest_os_features; - /** - * A zero-based index to this disk, where 0 is reserved for the - * boot disk. If you have many disks attached to an instance, each disk - * would have a unique index number. - * - * Generated from protobuf field int64 index = 6; - */ - protected $index = 0; - /** - * Indicates the disk interface to use for attaching this disk, which is - * either SCSI or NVME. The default is SCSI. Persistent disks must always - * use SCSI and the request will fail if you attempt to attach a persistent - * disk in any other format than SCSI. Local SSDs can use either NVME or - * SCSI. For performance characteristics of SCSI over NVMe, see Local SSD - * performance. - * Valid values: - * * `NVME` - * * `SCSI` - * - * Generated from protobuf field string interface = 7; - */ - protected $interface = ''; - /** - * Type of the resource. Always compute#attachedDisk for attached - * disks. - * - * Generated from protobuf field string kind = 8; - */ - protected $kind = ''; - /** - * A list of publicly visible licenses. Reserved for Google's use. - * A License represents billing and aggregate usage data for public - * and marketplace images. - * - * Generated from protobuf field repeated string licenses = 9; - */ - private $licenses; - /** - * The mode in which to attach this disk, either `READ_WRITE` or - * `READ_ONLY`. If not specified, the default is to attach the disk in - * `READ_WRITE` mode. Valid values: - * * `READ_ONLY` - * * `READ_WRITE` - * - * Generated from protobuf field string mode = 10; - */ - protected $mode = ''; - /** - * Indicates a valid partial or full URL to an existing Persistent Disk - * resource. - * - * Generated from protobuf field string source = 11; - */ - protected $source = ''; - /** - * Indicates the type of the disk, either `SCRATCH` or `PERSISTENT`. - * Valid values: - * * `PERSISTENT` - * * `SCRATCH` - * - * Generated from protobuf field string type = 12; - */ - protected $type = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $auto_delete - * Indicates whether the disk will be auto-deleted when the instance is - * deleted (but not when the disk is detached from the instance). - * @type bool $boot - * Indicates that this is a boot disk. The virtual machine will use the - * first partition of the disk for its root filesystem. - * @type string $device_name - * Indicates a unique device name of your choice that is reflected into the - * `/dev/disk/by-id/google-*` tree of a Linux operating system running - * within the instance. This name can be used to reference the device for - * mounting, resizing, and so on, from within the instance. - * If not specified, the server chooses a default device name to apply to - * this disk, in the form persistent-disk-x, where x is a number assigned by - * Google Compute Engine.This field is only applicable for persistent disks. - * @type int|string $disk_size_gb - * Indicates the size of the disk in base-2 GB. - * @type array<\Google\Cloud\Notebooks\V1\Instance\Disk\GuestOsFeature>|\Google\Protobuf\Internal\RepeatedField $guest_os_features - * Indicates a list of features to enable on the guest operating system. - * Applicable only for bootable images. Read Enabling guest operating - * system features to see a list of available options. - * @type int|string $index - * A zero-based index to this disk, where 0 is reserved for the - * boot disk. If you have many disks attached to an instance, each disk - * would have a unique index number. - * @type string $interface - * Indicates the disk interface to use for attaching this disk, which is - * either SCSI or NVME. The default is SCSI. Persistent disks must always - * use SCSI and the request will fail if you attempt to attach a persistent - * disk in any other format than SCSI. Local SSDs can use either NVME or - * SCSI. For performance characteristics of SCSI over NVMe, see Local SSD - * performance. - * Valid values: - * * `NVME` - * * `SCSI` - * @type string $kind - * Type of the resource. Always compute#attachedDisk for attached - * disks. - * @type array|\Google\Protobuf\Internal\RepeatedField $licenses - * A list of publicly visible licenses. Reserved for Google's use. - * A License represents billing and aggregate usage data for public - * and marketplace images. - * @type string $mode - * The mode in which to attach this disk, either `READ_WRITE` or - * `READ_ONLY`. If not specified, the default is to attach the disk in - * `READ_WRITE` mode. Valid values: - * * `READ_ONLY` - * * `READ_WRITE` - * @type string $source - * Indicates a valid partial or full URL to an existing Persistent Disk - * resource. - * @type string $type - * Indicates the type of the disk, either `SCRATCH` or `PERSISTENT`. - * Valid values: - * * `PERSISTENT` - * * `SCRATCH` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V1\Instance::initOnce(); - parent::__construct($data); - } - - /** - * Indicates whether the disk will be auto-deleted when the instance is - * deleted (but not when the disk is detached from the instance). - * - * Generated from protobuf field bool auto_delete = 1; - * @return bool - */ - public function getAutoDelete() - { - return $this->auto_delete; - } - - /** - * Indicates whether the disk will be auto-deleted when the instance is - * deleted (but not when the disk is detached from the instance). - * - * Generated from protobuf field bool auto_delete = 1; - * @param bool $var - * @return $this - */ - public function setAutoDelete($var) - { - GPBUtil::checkBool($var); - $this->auto_delete = $var; - - return $this; - } - - /** - * Indicates that this is a boot disk. The virtual machine will use the - * first partition of the disk for its root filesystem. - * - * Generated from protobuf field bool boot = 2; - * @return bool - */ - public function getBoot() - { - return $this->boot; - } - - /** - * Indicates that this is a boot disk. The virtual machine will use the - * first partition of the disk for its root filesystem. - * - * Generated from protobuf field bool boot = 2; - * @param bool $var - * @return $this - */ - public function setBoot($var) - { - GPBUtil::checkBool($var); - $this->boot = $var; - - return $this; - } - - /** - * Indicates a unique device name of your choice that is reflected into the - * `/dev/disk/by-id/google-*` tree of a Linux operating system running - * within the instance. This name can be used to reference the device for - * mounting, resizing, and so on, from within the instance. - * If not specified, the server chooses a default device name to apply to - * this disk, in the form persistent-disk-x, where x is a number assigned by - * Google Compute Engine.This field is only applicable for persistent disks. - * - * Generated from protobuf field string device_name = 3; - * @return string - */ - public function getDeviceName() - { - return $this->device_name; - } - - /** - * Indicates a unique device name of your choice that is reflected into the - * `/dev/disk/by-id/google-*` tree of a Linux operating system running - * within the instance. This name can be used to reference the device for - * mounting, resizing, and so on, from within the instance. - * If not specified, the server chooses a default device name to apply to - * this disk, in the form persistent-disk-x, where x is a number assigned by - * Google Compute Engine.This field is only applicable for persistent disks. - * - * Generated from protobuf field string device_name = 3; - * @param string $var - * @return $this - */ - public function setDeviceName($var) - { - GPBUtil::checkString($var, True); - $this->device_name = $var; - - return $this; - } - - /** - * Indicates the size of the disk in base-2 GB. - * - * Generated from protobuf field int64 disk_size_gb = 4; - * @return int|string - */ - public function getDiskSizeGb() - { - return $this->disk_size_gb; - } - - /** - * Indicates the size of the disk in base-2 GB. - * - * Generated from protobuf field int64 disk_size_gb = 4; - * @param int|string $var - * @return $this - */ - public function setDiskSizeGb($var) - { - GPBUtil::checkInt64($var); - $this->disk_size_gb = $var; - - return $this; - } - - /** - * Indicates a list of features to enable on the guest operating system. - * Applicable only for bootable images. Read Enabling guest operating - * system features to see a list of available options. - * - * Generated from protobuf field repeated .google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature guest_os_features = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getGuestOsFeatures() - { - return $this->guest_os_features; - } - - /** - * Indicates a list of features to enable on the guest operating system. - * Applicable only for bootable images. Read Enabling guest operating - * system features to see a list of available options. - * - * Generated from protobuf field repeated .google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature guest_os_features = 5; - * @param array<\Google\Cloud\Notebooks\V1\Instance\Disk\GuestOsFeature>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setGuestOsFeatures($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Notebooks\V1\Instance\Disk\GuestOsFeature::class); - $this->guest_os_features = $arr; - - return $this; - } - - /** - * A zero-based index to this disk, where 0 is reserved for the - * boot disk. If you have many disks attached to an instance, each disk - * would have a unique index number. - * - * Generated from protobuf field int64 index = 6; - * @return int|string - */ - public function getIndex() - { - return $this->index; - } - - /** - * A zero-based index to this disk, where 0 is reserved for the - * boot disk. If you have many disks attached to an instance, each disk - * would have a unique index number. - * - * Generated from protobuf field int64 index = 6; - * @param int|string $var - * @return $this - */ - public function setIndex($var) - { - GPBUtil::checkInt64($var); - $this->index = $var; - - return $this; - } - - /** - * Indicates the disk interface to use for attaching this disk, which is - * either SCSI or NVME. The default is SCSI. Persistent disks must always - * use SCSI and the request will fail if you attempt to attach a persistent - * disk in any other format than SCSI. Local SSDs can use either NVME or - * SCSI. For performance characteristics of SCSI over NVMe, see Local SSD - * performance. - * Valid values: - * * `NVME` - * * `SCSI` - * - * Generated from protobuf field string interface = 7; - * @return string - */ - public function getInterface() - { - return $this->interface; - } - - /** - * Indicates the disk interface to use for attaching this disk, which is - * either SCSI or NVME. The default is SCSI. Persistent disks must always - * use SCSI and the request will fail if you attempt to attach a persistent - * disk in any other format than SCSI. Local SSDs can use either NVME or - * SCSI. For performance characteristics of SCSI over NVMe, see Local SSD - * performance. - * Valid values: - * * `NVME` - * * `SCSI` - * - * Generated from protobuf field string interface = 7; - * @param string $var - * @return $this - */ - public function setInterface($var) - { - GPBUtil::checkString($var, True); - $this->interface = $var; - - return $this; - } - - /** - * Type of the resource. Always compute#attachedDisk for attached - * disks. - * - * Generated from protobuf field string kind = 8; - * @return string - */ - public function getKind() - { - return $this->kind; - } - - /** - * Type of the resource. Always compute#attachedDisk for attached - * disks. - * - * Generated from protobuf field string kind = 8; - * @param string $var - * @return $this - */ - public function setKind($var) - { - GPBUtil::checkString($var, True); - $this->kind = $var; - - return $this; - } - - /** - * A list of publicly visible licenses. Reserved for Google's use. - * A License represents billing and aggregate usage data for public - * and marketplace images. - * - * Generated from protobuf field repeated string licenses = 9; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getLicenses() - { - return $this->licenses; - } - - /** - * A list of publicly visible licenses. Reserved for Google's use. - * A License represents billing and aggregate usage data for public - * and marketplace images. - * - * Generated from protobuf field repeated string licenses = 9; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setLicenses($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->licenses = $arr; - - return $this; - } - - /** - * The mode in which to attach this disk, either `READ_WRITE` or - * `READ_ONLY`. If not specified, the default is to attach the disk in - * `READ_WRITE` mode. Valid values: - * * `READ_ONLY` - * * `READ_WRITE` - * - * Generated from protobuf field string mode = 10; - * @return string - */ - public function getMode() - { - return $this->mode; - } - - /** - * The mode in which to attach this disk, either `READ_WRITE` or - * `READ_ONLY`. If not specified, the default is to attach the disk in - * `READ_WRITE` mode. Valid values: - * * `READ_ONLY` - * * `READ_WRITE` - * - * Generated from protobuf field string mode = 10; - * @param string $var - * @return $this - */ - public function setMode($var) - { - GPBUtil::checkString($var, True); - $this->mode = $var; - - return $this; - } - - /** - * Indicates a valid partial or full URL to an existing Persistent Disk - * resource. - * - * Generated from protobuf field string source = 11; - * @return string - */ - public function getSource() - { - return $this->source; - } - - /** - * Indicates a valid partial or full URL to an existing Persistent Disk - * resource. - * - * Generated from protobuf field string source = 11; - * @param string $var - * @return $this - */ - public function setSource($var) - { - GPBUtil::checkString($var, True); - $this->source = $var; - - return $this; - } - - /** - * Indicates the type of the disk, either `SCRATCH` or `PERSISTENT`. - * Valid values: - * * `PERSISTENT` - * * `SCRATCH` - * - * Generated from protobuf field string type = 12; - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * Indicates the type of the disk, either `SCRATCH` or `PERSISTENT`. - * Valid values: - * * `PERSISTENT` - * * `SCRATCH` - * - * Generated from protobuf field string type = 12; - * @param string $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkString($var, True); - $this->type = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Disk::class, \Google\Cloud\Notebooks\V1\Instance_Disk::class); - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance/Disk/GuestOsFeature.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance/Disk/GuestOsFeature.php deleted file mode 100644 index cd6cf2cc820e..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance/Disk/GuestOsFeature.php +++ /dev/null @@ -1,102 +0,0 @@ -google.cloud.notebooks.v1.Instance.Disk.GuestOsFeature - */ -class GuestOsFeature extends \Google\Protobuf\Internal\Message -{ - /** - * The ID of a supported feature. Read Enabling guest operating system - * features to see a list of available options. - * Valid values: - * * `FEATURE_TYPE_UNSPECIFIED` - * * `MULTI_IP_SUBNET` - * * `SECURE_BOOT` - * * `UEFI_COMPATIBLE` - * * `VIRTIO_SCSI_MULTIQUEUE` - * * `WINDOWS` - * - * Generated from protobuf field string type = 1; - */ - protected $type = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $type - * The ID of a supported feature. Read Enabling guest operating system - * features to see a list of available options. - * Valid values: - * * `FEATURE_TYPE_UNSPECIFIED` - * * `MULTI_IP_SUBNET` - * * `SECURE_BOOT` - * * `UEFI_COMPATIBLE` - * * `VIRTIO_SCSI_MULTIQUEUE` - * * `WINDOWS` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V1\Instance::initOnce(); - parent::__construct($data); - } - - /** - * The ID of a supported feature. Read Enabling guest operating system - * features to see a list of available options. - * Valid values: - * * `FEATURE_TYPE_UNSPECIFIED` - * * `MULTI_IP_SUBNET` - * * `SECURE_BOOT` - * * `UEFI_COMPATIBLE` - * * `VIRTIO_SCSI_MULTIQUEUE` - * * `WINDOWS` - * - * Generated from protobuf field string type = 1; - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * The ID of a supported feature. Read Enabling guest operating system - * features to see a list of available options. - * Valid values: - * * `FEATURE_TYPE_UNSPECIFIED` - * * `MULTI_IP_SUBNET` - * * `SECURE_BOOT` - * * `UEFI_COMPATIBLE` - * * `VIRTIO_SCSI_MULTIQUEUE` - * * `WINDOWS` - * - * Generated from protobuf field string type = 1; - * @param string $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkString($var, True); - $this->type = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(GuestOsFeature::class, \Google\Cloud\Notebooks\V1\Instance_Disk_GuestOsFeature::class); - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance/DiskEncryption.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance/DiskEncryption.php deleted file mode 100644 index ed653659e11e..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance/DiskEncryption.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.notebooks.v1.Instance.DiskEncryption - */ -class DiskEncryption -{ - /** - * Disk encryption is not specified. - * - * Generated from protobuf enum DISK_ENCRYPTION_UNSPECIFIED = 0; - */ - const DISK_ENCRYPTION_UNSPECIFIED = 0; - /** - * Use Google managed encryption keys to encrypt the boot disk. - * - * Generated from protobuf enum GMEK = 1; - */ - const GMEK = 1; - /** - * Use customer managed encryption keys to encrypt the boot disk. - * - * Generated from protobuf enum CMEK = 2; - */ - const CMEK = 2; - - private static $valueToName = [ - self::DISK_ENCRYPTION_UNSPECIFIED => 'DISK_ENCRYPTION_UNSPECIFIED', - self::GMEK => 'GMEK', - self::CMEK => 'CMEK', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DiskEncryption::class, \Google\Cloud\Notebooks\V1\Instance_DiskEncryption::class); - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance/DiskType.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance/DiskType.php deleted file mode 100644 index 268219224d84..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance/DiskType.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.notebooks.v1.Instance.DiskType - */ -class DiskType -{ - /** - * Disk type not set. - * - * Generated from protobuf enum DISK_TYPE_UNSPECIFIED = 0; - */ - const DISK_TYPE_UNSPECIFIED = 0; - /** - * Standard persistent disk type. - * - * Generated from protobuf enum PD_STANDARD = 1; - */ - const PD_STANDARD = 1; - /** - * SSD persistent disk type. - * - * Generated from protobuf enum PD_SSD = 2; - */ - const PD_SSD = 2; - /** - * Balanced persistent disk type. - * - * Generated from protobuf enum PD_BALANCED = 3; - */ - const PD_BALANCED = 3; - /** - * Extreme persistent disk type. - * - * Generated from protobuf enum PD_EXTREME = 4; - */ - const PD_EXTREME = 4; - - private static $valueToName = [ - self::DISK_TYPE_UNSPECIFIED => 'DISK_TYPE_UNSPECIFIED', - self::PD_STANDARD => 'PD_STANDARD', - self::PD_SSD => 'PD_SSD', - self::PD_BALANCED => 'PD_BALANCED', - self::PD_EXTREME => 'PD_EXTREME', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DiskType::class, \Google\Cloud\Notebooks\V1\Instance_DiskType::class); - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance/NicType.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance/NicType.php deleted file mode 100644 index c2da464bc534..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance/NicType.php +++ /dev/null @@ -1,65 +0,0 @@ -google.cloud.notebooks.v1.Instance.NicType - */ -class NicType -{ - /** - * No type specified. - * - * Generated from protobuf enum UNSPECIFIED_NIC_TYPE = 0; - */ - const UNSPECIFIED_NIC_TYPE = 0; - /** - * VIRTIO - * - * Generated from protobuf enum VIRTIO_NET = 1; - */ - const VIRTIO_NET = 1; - /** - * GVNIC - * - * Generated from protobuf enum GVNIC = 2; - */ - const GVNIC = 2; - - private static $valueToName = [ - self::UNSPECIFIED_NIC_TYPE => 'UNSPECIFIED_NIC_TYPE', - self::VIRTIO_NET => 'VIRTIO_NET', - self::GVNIC => 'GVNIC', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(NicType::class, \Google\Cloud\Notebooks\V1\Instance_NicType::class); - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance/ShieldedInstanceConfig.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance/ShieldedInstanceConfig.php deleted file mode 100644 index f98e6dc4ca98..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance/ShieldedInstanceConfig.php +++ /dev/null @@ -1,169 +0,0 @@ -google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig - */ -class ShieldedInstanceConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Defines whether the instance has Secure Boot enabled. - * Secure Boot helps ensure that the system only runs authentic software by - * verifying the digital signature of all boot components, and halting the - * boot process if signature verification fails. Disabled by default. - * - * Generated from protobuf field bool enable_secure_boot = 1; - */ - protected $enable_secure_boot = false; - /** - * Defines whether the instance has the vTPM enabled. Enabled by default. - * - * Generated from protobuf field bool enable_vtpm = 2; - */ - protected $enable_vtpm = false; - /** - * Defines whether the instance has integrity monitoring enabled. - * Enables monitoring and attestation of the boot integrity of the instance. - * The attestation is performed against the integrity policy baseline. This - * baseline is initially derived from the implicitly trusted boot image when - * the instance is created. Enabled by default. - * - * Generated from protobuf field bool enable_integrity_monitoring = 3; - */ - protected $enable_integrity_monitoring = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $enable_secure_boot - * Defines whether the instance has Secure Boot enabled. - * Secure Boot helps ensure that the system only runs authentic software by - * verifying the digital signature of all boot components, and halting the - * boot process if signature verification fails. Disabled by default. - * @type bool $enable_vtpm - * Defines whether the instance has the vTPM enabled. Enabled by default. - * @type bool $enable_integrity_monitoring - * Defines whether the instance has integrity monitoring enabled. - * Enables monitoring and attestation of the boot integrity of the instance. - * The attestation is performed against the integrity policy baseline. This - * baseline is initially derived from the implicitly trusted boot image when - * the instance is created. Enabled by default. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V1\Instance::initOnce(); - parent::__construct($data); - } - - /** - * Defines whether the instance has Secure Boot enabled. - * Secure Boot helps ensure that the system only runs authentic software by - * verifying the digital signature of all boot components, and halting the - * boot process if signature verification fails. Disabled by default. - * - * Generated from protobuf field bool enable_secure_boot = 1; - * @return bool - */ - public function getEnableSecureBoot() - { - return $this->enable_secure_boot; - } - - /** - * Defines whether the instance has Secure Boot enabled. - * Secure Boot helps ensure that the system only runs authentic software by - * verifying the digital signature of all boot components, and halting the - * boot process if signature verification fails. Disabled by default. - * - * Generated from protobuf field bool enable_secure_boot = 1; - * @param bool $var - * @return $this - */ - public function setEnableSecureBoot($var) - { - GPBUtil::checkBool($var); - $this->enable_secure_boot = $var; - - return $this; - } - - /** - * Defines whether the instance has the vTPM enabled. Enabled by default. - * - * Generated from protobuf field bool enable_vtpm = 2; - * @return bool - */ - public function getEnableVtpm() - { - return $this->enable_vtpm; - } - - /** - * Defines whether the instance has the vTPM enabled. Enabled by default. - * - * Generated from protobuf field bool enable_vtpm = 2; - * @param bool $var - * @return $this - */ - public function setEnableVtpm($var) - { - GPBUtil::checkBool($var); - $this->enable_vtpm = $var; - - return $this; - } - - /** - * Defines whether the instance has integrity monitoring enabled. - * Enables monitoring and attestation of the boot integrity of the instance. - * The attestation is performed against the integrity policy baseline. This - * baseline is initially derived from the implicitly trusted boot image when - * the instance is created. Enabled by default. - * - * Generated from protobuf field bool enable_integrity_monitoring = 3; - * @return bool - */ - public function getEnableIntegrityMonitoring() - { - return $this->enable_integrity_monitoring; - } - - /** - * Defines whether the instance has integrity monitoring enabled. - * Enables monitoring and attestation of the boot integrity of the instance. - * The attestation is performed against the integrity policy baseline. This - * baseline is initially derived from the implicitly trusted boot image when - * the instance is created. Enabled by default. - * - * Generated from protobuf field bool enable_integrity_monitoring = 3; - * @param bool $var - * @return $this - */ - public function setEnableIntegrityMonitoring($var) - { - GPBUtil::checkBool($var); - $this->enable_integrity_monitoring = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ShieldedInstanceConfig::class, \Google\Cloud\Notebooks\V1\Instance_ShieldedInstanceConfig::class); - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance/State.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance/State.php deleted file mode 100644 index 7787b107121a..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance/State.php +++ /dev/null @@ -1,128 +0,0 @@ -google.cloud.notebooks.v1.Instance.State - */ -class State -{ - /** - * State is not specified. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The control logic is starting the instance. - * - * Generated from protobuf enum STARTING = 1; - */ - const STARTING = 1; - /** - * The control logic is installing required frameworks and registering the - * instance with notebook proxy - * - * Generated from protobuf enum PROVISIONING = 2; - */ - const PROVISIONING = 2; - /** - * The instance is running. - * - * Generated from protobuf enum ACTIVE = 3; - */ - const ACTIVE = 3; - /** - * The control logic is stopping the instance. - * - * Generated from protobuf enum STOPPING = 4; - */ - const STOPPING = 4; - /** - * The instance is stopped. - * - * Generated from protobuf enum STOPPED = 5; - */ - const STOPPED = 5; - /** - * The instance is deleted. - * - * Generated from protobuf enum DELETED = 6; - */ - const DELETED = 6; - /** - * The instance is upgrading. - * - * Generated from protobuf enum UPGRADING = 7; - */ - const UPGRADING = 7; - /** - * The instance is being created. - * - * Generated from protobuf enum INITIALIZING = 8; - */ - const INITIALIZING = 8; - /** - * The instance is getting registered. - * - * Generated from protobuf enum REGISTERING = 9; - */ - const REGISTERING = 9; - /** - * The instance is suspending. - * - * Generated from protobuf enum SUSPENDING = 10; - */ - const SUSPENDING = 10; - /** - * The instance is suspended. - * - * Generated from protobuf enum SUSPENDED = 11; - */ - const SUSPENDED = 11; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::STARTING => 'STARTING', - self::PROVISIONING => 'PROVISIONING', - self::ACTIVE => 'ACTIVE', - self::STOPPING => 'STOPPING', - self::STOPPED => 'STOPPED', - self::DELETED => 'DELETED', - self::UPGRADING => 'UPGRADING', - self::INITIALIZING => 'INITIALIZING', - self::REGISTERING => 'REGISTERING', - self::SUSPENDING => 'SUSPENDING', - self::SUSPENDED => 'SUSPENDED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\Notebooks\V1\Instance_State::class); - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance/UpgradeHistoryEntry.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance/UpgradeHistoryEntry.php deleted file mode 100644 index 92cf695b5a6a..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance/UpgradeHistoryEntry.php +++ /dev/null @@ -1,391 +0,0 @@ -google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry - */ -class UpgradeHistoryEntry extends \Google\Protobuf\Internal\Message -{ - /** - * The snapshot of the boot disk of this notebook instance before upgrade. - * - * Generated from protobuf field string snapshot = 1; - */ - protected $snapshot = ''; - /** - * The VM image before this instance upgrade. - * - * Generated from protobuf field string vm_image = 2; - */ - protected $vm_image = ''; - /** - * The container image before this instance upgrade. - * - * Generated from protobuf field string container_image = 3; - */ - protected $container_image = ''; - /** - * The framework of this notebook instance. - * - * Generated from protobuf field string framework = 4; - */ - protected $framework = ''; - /** - * The version of the notebook instance before this upgrade. - * - * Generated from protobuf field string version = 5; - */ - protected $version = ''; - /** - * The state of this instance upgrade history entry. - * - * Generated from protobuf field .google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.State state = 6; - */ - protected $state = 0; - /** - * The time that this instance upgrade history entry is created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 7; - */ - protected $create_time = null; - /** - * Target VM Image. Format: `ainotebooks-vm/project/image-name/name`. - * - * Generated from protobuf field string target_image = 8 [deprecated = true]; - * @deprecated - */ - protected $target_image = ''; - /** - * Action. Rolloback or Upgrade. - * - * Generated from protobuf field .google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Action action = 9; - */ - protected $action = 0; - /** - * Target VM Version, like m63. - * - * Generated from protobuf field string target_version = 10; - */ - protected $target_version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $snapshot - * The snapshot of the boot disk of this notebook instance before upgrade. - * @type string $vm_image - * The VM image before this instance upgrade. - * @type string $container_image - * The container image before this instance upgrade. - * @type string $framework - * The framework of this notebook instance. - * @type string $version - * The version of the notebook instance before this upgrade. - * @type int $state - * The state of this instance upgrade history entry. - * @type \Google\Protobuf\Timestamp $create_time - * The time that this instance upgrade history entry is created. - * @type string $target_image - * Target VM Image. Format: `ainotebooks-vm/project/image-name/name`. - * @type int $action - * Action. Rolloback or Upgrade. - * @type string $target_version - * Target VM Version, like m63. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V1\Instance::initOnce(); - parent::__construct($data); - } - - /** - * The snapshot of the boot disk of this notebook instance before upgrade. - * - * Generated from protobuf field string snapshot = 1; - * @return string - */ - public function getSnapshot() - { - return $this->snapshot; - } - - /** - * The snapshot of the boot disk of this notebook instance before upgrade. - * - * Generated from protobuf field string snapshot = 1; - * @param string $var - * @return $this - */ - public function setSnapshot($var) - { - GPBUtil::checkString($var, True); - $this->snapshot = $var; - - return $this; - } - - /** - * The VM image before this instance upgrade. - * - * Generated from protobuf field string vm_image = 2; - * @return string - */ - public function getVmImage() - { - return $this->vm_image; - } - - /** - * The VM image before this instance upgrade. - * - * Generated from protobuf field string vm_image = 2; - * @param string $var - * @return $this - */ - public function setVmImage($var) - { - GPBUtil::checkString($var, True); - $this->vm_image = $var; - - return $this; - } - - /** - * The container image before this instance upgrade. - * - * Generated from protobuf field string container_image = 3; - * @return string - */ - public function getContainerImage() - { - return $this->container_image; - } - - /** - * The container image before this instance upgrade. - * - * Generated from protobuf field string container_image = 3; - * @param string $var - * @return $this - */ - public function setContainerImage($var) - { - GPBUtil::checkString($var, True); - $this->container_image = $var; - - return $this; - } - - /** - * The framework of this notebook instance. - * - * Generated from protobuf field string framework = 4; - * @return string - */ - public function getFramework() - { - return $this->framework; - } - - /** - * The framework of this notebook instance. - * - * Generated from protobuf field string framework = 4; - * @param string $var - * @return $this - */ - public function setFramework($var) - { - GPBUtil::checkString($var, True); - $this->framework = $var; - - return $this; - } - - /** - * The version of the notebook instance before this upgrade. - * - * Generated from protobuf field string version = 5; - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * The version of the notebook instance before this upgrade. - * - * Generated from protobuf field string version = 5; - * @param string $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkString($var, True); - $this->version = $var; - - return $this; - } - - /** - * The state of this instance upgrade history entry. - * - * Generated from protobuf field .google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.State state = 6; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * The state of this instance upgrade history entry. - * - * Generated from protobuf field .google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.State state = 6; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Notebooks\V1\Instance\UpgradeHistoryEntry\State::class); - $this->state = $var; - - return $this; - } - - /** - * The time that this instance upgrade history entry is created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 7; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * The time that this instance upgrade history entry is created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 7; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Target VM Image. Format: `ainotebooks-vm/project/image-name/name`. - * - * Generated from protobuf field string target_image = 8 [deprecated = true]; - * @return string - * @deprecated - */ - public function getTargetImage() - { - @trigger_error('target_image is deprecated.', E_USER_DEPRECATED); - return $this->target_image; - } - - /** - * Target VM Image. Format: `ainotebooks-vm/project/image-name/name`. - * - * Generated from protobuf field string target_image = 8 [deprecated = true]; - * @param string $var - * @return $this - * @deprecated - */ - public function setTargetImage($var) - { - @trigger_error('target_image is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkString($var, True); - $this->target_image = $var; - - return $this; - } - - /** - * Action. Rolloback or Upgrade. - * - * Generated from protobuf field .google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Action action = 9; - * @return int - */ - public function getAction() - { - return $this->action; - } - - /** - * Action. Rolloback or Upgrade. - * - * Generated from protobuf field .google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Action action = 9; - * @param int $var - * @return $this - */ - public function setAction($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Notebooks\V1\Instance\UpgradeHistoryEntry\Action::class); - $this->action = $var; - - return $this; - } - - /** - * Target VM Version, like m63. - * - * Generated from protobuf field string target_version = 10; - * @return string - */ - public function getTargetVersion() - { - return $this->target_version; - } - - /** - * Target VM Version, like m63. - * - * Generated from protobuf field string target_version = 10; - * @param string $var - * @return $this - */ - public function setTargetVersion($var) - { - GPBUtil::checkString($var, True); - $this->target_version = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(UpgradeHistoryEntry::class, \Google\Cloud\Notebooks\V1\Instance_UpgradeHistoryEntry::class); - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance/UpgradeHistoryEntry/Action.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance/UpgradeHistoryEntry/Action.php deleted file mode 100644 index 6dc76ab38872..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance/UpgradeHistoryEntry/Action.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.Action - */ -class Action -{ - /** - * Operation is not specified. - * - * Generated from protobuf enum ACTION_UNSPECIFIED = 0; - */ - const ACTION_UNSPECIFIED = 0; - /** - * Upgrade. - * - * Generated from protobuf enum UPGRADE = 1; - */ - const UPGRADE = 1; - /** - * Rollback. - * - * Generated from protobuf enum ROLLBACK = 2; - */ - const ROLLBACK = 2; - - private static $valueToName = [ - self::ACTION_UNSPECIFIED => 'ACTION_UNSPECIFIED', - self::UPGRADE => 'UPGRADE', - self::ROLLBACK => 'ROLLBACK', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Action::class, \Google\Cloud\Notebooks\V1\Instance_UpgradeHistoryEntry_Action::class); - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance/UpgradeHistoryEntry/State.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance/UpgradeHistoryEntry/State.php deleted file mode 100644 index 911247394eb3..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Instance/UpgradeHistoryEntry/State.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.notebooks.v1.Instance.UpgradeHistoryEntry.State - */ -class State -{ - /** - * State is not specified. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The instance upgrade is started. - * - * Generated from protobuf enum STARTED = 1; - */ - const STARTED = 1; - /** - * The instance upgrade is succeeded. - * - * Generated from protobuf enum SUCCEEDED = 2; - */ - const SUCCEEDED = 2; - /** - * The instance upgrade is failed. - * - * Generated from protobuf enum FAILED = 3; - */ - const FAILED = 3; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::STARTED => 'STARTED', - self::SUCCEEDED => 'SUCCEEDED', - self::FAILED => 'FAILED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\Notebooks\V1\Instance_UpgradeHistoryEntry_State::class); - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/InstanceConfig.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/InstanceConfig.php deleted file mode 100644 index cda436e61847..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/InstanceConfig.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.notebooks.v1.InstanceConfig - */ -class InstanceConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Cron expression in UTC timezone, used to schedule instance auto upgrade. - * Please follow the [cron format](https://en.wikipedia.org/wiki/Cron). - * - * Generated from protobuf field string notebook_upgrade_schedule = 1; - */ - protected $notebook_upgrade_schedule = ''; - /** - * Verifies core internal services are running. - * - * Generated from protobuf field bool enable_health_monitoring = 2; - */ - protected $enable_health_monitoring = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $notebook_upgrade_schedule - * Cron expression in UTC timezone, used to schedule instance auto upgrade. - * Please follow the [cron format](https://en.wikipedia.org/wiki/Cron). - * @type bool $enable_health_monitoring - * Verifies core internal services are running. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V1\InstanceConfig::initOnce(); - parent::__construct($data); - } - - /** - * Cron expression in UTC timezone, used to schedule instance auto upgrade. - * Please follow the [cron format](https://en.wikipedia.org/wiki/Cron). - * - * Generated from protobuf field string notebook_upgrade_schedule = 1; - * @return string - */ - public function getNotebookUpgradeSchedule() - { - return $this->notebook_upgrade_schedule; - } - - /** - * Cron expression in UTC timezone, used to schedule instance auto upgrade. - * Please follow the [cron format](https://en.wikipedia.org/wiki/Cron). - * - * Generated from protobuf field string notebook_upgrade_schedule = 1; - * @param string $var - * @return $this - */ - public function setNotebookUpgradeSchedule($var) - { - GPBUtil::checkString($var, True); - $this->notebook_upgrade_schedule = $var; - - return $this; - } - - /** - * Verifies core internal services are running. - * - * Generated from protobuf field bool enable_health_monitoring = 2; - * @return bool - */ - public function getEnableHealthMonitoring() - { - return $this->enable_health_monitoring; - } - - /** - * Verifies core internal services are running. - * - * Generated from protobuf field bool enable_health_monitoring = 2; - * @param bool $var - * @return $this - */ - public function setEnableHealthMonitoring($var) - { - GPBUtil::checkBool($var); - $this->enable_health_monitoring = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/IsInstanceUpgradeableRequest.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/IsInstanceUpgradeableRequest.php deleted file mode 100644 index 8bf9e2313d97..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/IsInstanceUpgradeableRequest.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.notebooks.v1.IsInstanceUpgradeableRequest - */ -class IsInstanceUpgradeableRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * - * Generated from protobuf field string notebook_instance = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $notebook_instance = ''; - /** - * Optional. The optional UpgradeType. Setting this field will search for additional - * compute images to upgrade this instance. - * - * Generated from protobuf field .google.cloud.notebooks.v1.UpgradeType type = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $type = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $notebook_instance - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * @type int $type - * Optional. The optional UpgradeType. Setting this field will search for additional - * compute images to upgrade this instance. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * - * Generated from protobuf field string notebook_instance = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getNotebookInstance() - { - return $this->notebook_instance; - } - - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * - * Generated from protobuf field string notebook_instance = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setNotebookInstance($var) - { - GPBUtil::checkString($var, True); - $this->notebook_instance = $var; - - return $this; - } - - /** - * Optional. The optional UpgradeType. Setting this field will search for additional - * compute images to upgrade this instance. - * - * Generated from protobuf field .google.cloud.notebooks.v1.UpgradeType type = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Optional. The optional UpgradeType. Setting this field will search for additional - * compute images to upgrade this instance. - * - * Generated from protobuf field .google.cloud.notebooks.v1.UpgradeType type = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Notebooks\V1\UpgradeType::class); - $this->type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/IsInstanceUpgradeableResponse.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/IsInstanceUpgradeableResponse.php deleted file mode 100644 index 397995bcd0c7..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/IsInstanceUpgradeableResponse.php +++ /dev/null @@ -1,181 +0,0 @@ -google.cloud.notebooks.v1.IsInstanceUpgradeableResponse - */ -class IsInstanceUpgradeableResponse extends \Google\Protobuf\Internal\Message -{ - /** - * If an instance is upgradeable. - * - * Generated from protobuf field bool upgradeable = 1; - */ - protected $upgradeable = false; - /** - * The version this instance will be upgraded to if calling the upgrade - * endpoint. This field will only be populated if field upgradeable is true. - * - * Generated from protobuf field string upgrade_version = 2; - */ - protected $upgrade_version = ''; - /** - * Additional information about upgrade. - * - * Generated from protobuf field string upgrade_info = 3; - */ - protected $upgrade_info = ''; - /** - * The new image self link this instance will be upgraded to if calling the - * upgrade endpoint. This field will only be populated if field upgradeable - * is true. - * - * Generated from protobuf field string upgrade_image = 4; - */ - protected $upgrade_image = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $upgradeable - * If an instance is upgradeable. - * @type string $upgrade_version - * The version this instance will be upgraded to if calling the upgrade - * endpoint. This field will only be populated if field upgradeable is true. - * @type string $upgrade_info - * Additional information about upgrade. - * @type string $upgrade_image - * The new image self link this instance will be upgraded to if calling the - * upgrade endpoint. This field will only be populated if field upgradeable - * is true. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * If an instance is upgradeable. - * - * Generated from protobuf field bool upgradeable = 1; - * @return bool - */ - public function getUpgradeable() - { - return $this->upgradeable; - } - - /** - * If an instance is upgradeable. - * - * Generated from protobuf field bool upgradeable = 1; - * @param bool $var - * @return $this - */ - public function setUpgradeable($var) - { - GPBUtil::checkBool($var); - $this->upgradeable = $var; - - return $this; - } - - /** - * The version this instance will be upgraded to if calling the upgrade - * endpoint. This field will only be populated if field upgradeable is true. - * - * Generated from protobuf field string upgrade_version = 2; - * @return string - */ - public function getUpgradeVersion() - { - return $this->upgrade_version; - } - - /** - * The version this instance will be upgraded to if calling the upgrade - * endpoint. This field will only be populated if field upgradeable is true. - * - * Generated from protobuf field string upgrade_version = 2; - * @param string $var - * @return $this - */ - public function setUpgradeVersion($var) - { - GPBUtil::checkString($var, True); - $this->upgrade_version = $var; - - return $this; - } - - /** - * Additional information about upgrade. - * - * Generated from protobuf field string upgrade_info = 3; - * @return string - */ - public function getUpgradeInfo() - { - return $this->upgrade_info; - } - - /** - * Additional information about upgrade. - * - * Generated from protobuf field string upgrade_info = 3; - * @param string $var - * @return $this - */ - public function setUpgradeInfo($var) - { - GPBUtil::checkString($var, True); - $this->upgrade_info = $var; - - return $this; - } - - /** - * The new image self link this instance will be upgraded to if calling the - * upgrade endpoint. This field will only be populated if field upgradeable - * is true. - * - * Generated from protobuf field string upgrade_image = 4; - * @return string - */ - public function getUpgradeImage() - { - return $this->upgrade_image; - } - - /** - * The new image self link this instance will be upgraded to if calling the - * upgrade endpoint. This field will only be populated if field upgradeable - * is true. - * - * Generated from protobuf field string upgrade_image = 4; - * @param string $var - * @return $this - */ - public function setUpgradeImage($var) - { - GPBUtil::checkString($var, True); - $this->upgrade_image = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ListEnvironmentsRequest.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ListEnvironmentsRequest.php deleted file mode 100644 index 9ccab752a6a3..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ListEnvironmentsRequest.php +++ /dev/null @@ -1,152 +0,0 @@ -google.cloud.notebooks.v1.ListEnvironmentsRequest - */ -class ListEnvironmentsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Format: `projects/{project_id}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $parent = ''; - /** - * Maximum return size of the list call. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A previous returned page token that can be used to continue listing from - * the last result. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. Format: `projects/{project_id}/locations/{location}` - * - * @return \Google\Cloud\Notebooks\V1\ListEnvironmentsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Format: `projects/{project_id}/locations/{location}` - * @type int $page_size - * Maximum return size of the list call. - * @type string $page_token - * A previous returned page token that can be used to continue listing from - * the last result. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. Format: `projects/{project_id}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Format: `projects/{project_id}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Maximum return size of the list call. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Maximum return size of the list call. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A previous returned page token that can be used to continue listing from - * the last result. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A previous returned page token that can be used to continue listing from - * the last result. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ListEnvironmentsResponse.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ListEnvironmentsResponse.php deleted file mode 100644 index 9b06c1ea14f6..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ListEnvironmentsResponse.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.notebooks.v1.ListEnvironmentsResponse - */ -class ListEnvironmentsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of returned environments. - * - * Generated from protobuf field repeated .google.cloud.notebooks.v1.Environment environments = 1; - */ - private $environments; - /** - * A page token that can be used to continue listing from the last result - * in the next list call. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Notebooks\V1\Environment>|\Google\Protobuf\Internal\RepeatedField $environments - * A list of returned environments. - * @type string $next_page_token - * A page token that can be used to continue listing from the last result - * in the next list call. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * A list of returned environments. - * - * Generated from protobuf field repeated .google.cloud.notebooks.v1.Environment environments = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEnvironments() - { - return $this->environments; - } - - /** - * A list of returned environments. - * - * Generated from protobuf field repeated .google.cloud.notebooks.v1.Environment environments = 1; - * @param array<\Google\Cloud\Notebooks\V1\Environment>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEnvironments($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Notebooks\V1\Environment::class); - $this->environments = $arr; - - return $this; - } - - /** - * A page token that can be used to continue listing from the last result - * in the next list call. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A page token that can be used to continue listing from the last result - * in the next list call. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ListExecutionsRequest.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ListExecutionsRequest.php deleted file mode 100644 index d77a6a1ed25b..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ListExecutionsRequest.php +++ /dev/null @@ -1,234 +0,0 @@ -google.cloud.notebooks.v1.ListExecutionsRequest - */ -class ListExecutionsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Format: - * `parent=projects/{project_id}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Maximum return size of the list call. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A previous returned page token that can be used to continue listing - * from the last result. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * Filter applied to resulting executions. Currently only supports filtering - * executions by a specified `schedule_id`. - * Format: `schedule_id=` - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - /** - * Sort by field. - * - * Generated from protobuf field string order_by = 5; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. Format: - * `parent=projects/{project_id}/locations/{location}` - * Please see {@see NotebookServiceClient::executionName()} for help formatting this field. - * - * @return \Google\Cloud\Notebooks\V1\ListExecutionsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Format: - * `parent=projects/{project_id}/locations/{location}` - * @type int $page_size - * Maximum return size of the list call. - * @type string $page_token - * A previous returned page token that can be used to continue listing - * from the last result. - * @type string $filter - * Filter applied to resulting executions. Currently only supports filtering - * executions by a specified `schedule_id`. - * Format: `schedule_id=` - * @type string $order_by - * Sort by field. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. Format: - * `parent=projects/{project_id}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Format: - * `parent=projects/{project_id}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Maximum return size of the list call. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Maximum return size of the list call. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A previous returned page token that can be used to continue listing - * from the last result. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A previous returned page token that can be used to continue listing - * from the last result. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Filter applied to resulting executions. Currently only supports filtering - * executions by a specified `schedule_id`. - * Format: `schedule_id=` - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Filter applied to resulting executions. Currently only supports filtering - * executions by a specified `schedule_id`. - * Format: `schedule_id=` - * - * Generated from protobuf field string filter = 4; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Sort by field. - * - * Generated from protobuf field string order_by = 5; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Sort by field. - * - * Generated from protobuf field string order_by = 5; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ListExecutionsResponse.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ListExecutionsResponse.php deleted file mode 100644 index 368324e19d2f..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ListExecutionsResponse.php +++ /dev/null @@ -1,147 +0,0 @@ -google.cloud.notebooks.v1.ListExecutionsResponse - */ -class ListExecutionsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of returned instances. - * - * Generated from protobuf field repeated .google.cloud.notebooks.v1.Execution executions = 1; - */ - private $executions; - /** - * Page token that can be used to continue listing from the last result in the - * next list call. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Executions IDs that could not be reached. For example: - * ['projects/{project_id}/location/{location}/executions/imagenet_test1', - * 'projects/{project_id}/location/{location}/executions/classifier_train1'] - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Notebooks\V1\Execution>|\Google\Protobuf\Internal\RepeatedField $executions - * A list of returned instances. - * @type string $next_page_token - * Page token that can be used to continue listing from the last result in the - * next list call. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Executions IDs that could not be reached. For example: - * ['projects/{project_id}/location/{location}/executions/imagenet_test1', - * 'projects/{project_id}/location/{location}/executions/classifier_train1'] - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * A list of returned instances. - * - * Generated from protobuf field repeated .google.cloud.notebooks.v1.Execution executions = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getExecutions() - { - return $this->executions; - } - - /** - * A list of returned instances. - * - * Generated from protobuf field repeated .google.cloud.notebooks.v1.Execution executions = 1; - * @param array<\Google\Cloud\Notebooks\V1\Execution>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setExecutions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Notebooks\V1\Execution::class); - $this->executions = $arr; - - return $this; - } - - /** - * Page token that can be used to continue listing from the last result in the - * next list call. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Page token that can be used to continue listing from the last result in the - * next list call. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Executions IDs that could not be reached. For example: - * ['projects/{project_id}/location/{location}/executions/imagenet_test1', - * 'projects/{project_id}/location/{location}/executions/classifier_train1'] - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Executions IDs that could not be reached. For example: - * ['projects/{project_id}/location/{location}/executions/imagenet_test1', - * 'projects/{project_id}/location/{location}/executions/classifier_train1'] - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ListInstancesRequest.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ListInstancesRequest.php deleted file mode 100644 index 22cb60a12a02..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ListInstancesRequest.php +++ /dev/null @@ -1,157 +0,0 @@ -google.cloud.notebooks.v1.ListInstancesRequest - */ -class ListInstancesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Format: - * `parent=projects/{project_id}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $parent = ''; - /** - * Maximum return size of the list call. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A previous returned page token that can be used to continue listing - * from the last result. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. Format: - * `parent=projects/{project_id}/locations/{location}` - * - * @return \Google\Cloud\Notebooks\V1\ListInstancesRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Format: - * `parent=projects/{project_id}/locations/{location}` - * @type int $page_size - * Maximum return size of the list call. - * @type string $page_token - * A previous returned page token that can be used to continue listing - * from the last result. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. Format: - * `parent=projects/{project_id}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Format: - * `parent=projects/{project_id}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Maximum return size of the list call. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Maximum return size of the list call. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A previous returned page token that can be used to continue listing - * from the last result. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A previous returned page token that can be used to continue listing - * from the last result. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ListInstancesResponse.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ListInstancesResponse.php deleted file mode 100644 index f621f82fdf0f..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ListInstancesResponse.php +++ /dev/null @@ -1,147 +0,0 @@ -google.cloud.notebooks.v1.ListInstancesResponse - */ -class ListInstancesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of returned instances. - * - * Generated from protobuf field repeated .google.cloud.notebooks.v1.Instance instances = 1; - */ - private $instances; - /** - * Page token that can be used to continue listing from the last result in the - * next list call. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Locations that could not be reached. For example, - * `['us-west1-a', 'us-central1-b']`. - * A ListInstancesResponse will only contain either instances or unreachables, - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Notebooks\V1\Instance>|\Google\Protobuf\Internal\RepeatedField $instances - * A list of returned instances. - * @type string $next_page_token - * Page token that can be used to continue listing from the last result in the - * next list call. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached. For example, - * `['us-west1-a', 'us-central1-b']`. - * A ListInstancesResponse will only contain either instances or unreachables, - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * A list of returned instances. - * - * Generated from protobuf field repeated .google.cloud.notebooks.v1.Instance instances = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getInstances() - { - return $this->instances; - } - - /** - * A list of returned instances. - * - * Generated from protobuf field repeated .google.cloud.notebooks.v1.Instance instances = 1; - * @param array<\Google\Cloud\Notebooks\V1\Instance>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setInstances($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Notebooks\V1\Instance::class); - $this->instances = $arr; - - return $this; - } - - /** - * Page token that can be used to continue listing from the last result in the - * next list call. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Page token that can be used to continue listing from the last result in the - * next list call. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Locations that could not be reached. For example, - * `['us-west1-a', 'us-central1-b']`. - * A ListInstancesResponse will only contain either instances or unreachables, - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached. For example, - * `['us-west1-a', 'us-central1-b']`. - * A ListInstancesResponse will only contain either instances or unreachables, - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ListRuntimesRequest.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ListRuntimesRequest.php deleted file mode 100644 index 8e6cda6cbd5b..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ListRuntimesRequest.php +++ /dev/null @@ -1,158 +0,0 @@ -google.cloud.notebooks.v1.ListRuntimesRequest - */ -class ListRuntimesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Format: - * `parent=projects/{project_id}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Maximum return size of the list call. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A previous returned page token that can be used to continue listing - * from the last result. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. Format: - * `parent=projects/{project_id}/locations/{location}` - * Please see {@see ManagedNotebookServiceClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\Notebooks\V1\ListRuntimesRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Format: - * `parent=projects/{project_id}/locations/{location}` - * @type int $page_size - * Maximum return size of the list call. - * @type string $page_token - * A previous returned page token that can be used to continue listing - * from the last result. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V1\ManagedService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Format: - * `parent=projects/{project_id}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Format: - * `parent=projects/{project_id}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Maximum return size of the list call. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Maximum return size of the list call. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A previous returned page token that can be used to continue listing - * from the last result. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A previous returned page token that can be used to continue listing - * from the last result. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ListRuntimesResponse.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ListRuntimesResponse.php deleted file mode 100644 index c2339d4e4dfb..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ListRuntimesResponse.php +++ /dev/null @@ -1,147 +0,0 @@ -google.cloud.notebooks.v1.ListRuntimesResponse - */ -class ListRuntimesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of returned Runtimes. - * - * Generated from protobuf field repeated .google.cloud.notebooks.v1.Runtime runtimes = 1; - */ - private $runtimes; - /** - * Page token that can be used to continue listing from the last result in the - * next list call. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Locations that could not be reached. For example, - * `['us-west1', 'us-central1']`. - * A ListRuntimesResponse will only contain either runtimes or unreachables, - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Notebooks\V1\Runtime>|\Google\Protobuf\Internal\RepeatedField $runtimes - * A list of returned Runtimes. - * @type string $next_page_token - * Page token that can be used to continue listing from the last result in the - * next list call. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached. For example, - * `['us-west1', 'us-central1']`. - * A ListRuntimesResponse will only contain either runtimes or unreachables, - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V1\ManagedService::initOnce(); - parent::__construct($data); - } - - /** - * A list of returned Runtimes. - * - * Generated from protobuf field repeated .google.cloud.notebooks.v1.Runtime runtimes = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRuntimes() - { - return $this->runtimes; - } - - /** - * A list of returned Runtimes. - * - * Generated from protobuf field repeated .google.cloud.notebooks.v1.Runtime runtimes = 1; - * @param array<\Google\Cloud\Notebooks\V1\Runtime>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRuntimes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Notebooks\V1\Runtime::class); - $this->runtimes = $arr; - - return $this; - } - - /** - * Page token that can be used to continue listing from the last result in the - * next list call. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Page token that can be used to continue listing from the last result in the - * next list call. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Locations that could not be reached. For example, - * `['us-west1', 'us-central1']`. - * A ListRuntimesResponse will only contain either runtimes or unreachables, - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached. For example, - * `['us-west1', 'us-central1']`. - * A ListRuntimesResponse will only contain either runtimes or unreachables, - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ListSchedulesRequest.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ListSchedulesRequest.php deleted file mode 100644 index 7fb6ed52536e..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ListSchedulesRequest.php +++ /dev/null @@ -1,226 +0,0 @@ -google.cloud.notebooks.v1.ListSchedulesRequest - */ -class ListSchedulesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Format: - * `parent=projects/{project_id}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Maximum return size of the list call. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A previous returned page token that can be used to continue listing - * from the last result. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * Filter applied to resulting schedules. - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - /** - * Field to order results by. - * - * Generated from protobuf field string order_by = 5; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. Format: - * `parent=projects/{project_id}/locations/{location}` - * Please see {@see NotebookServiceClient::scheduleName()} for help formatting this field. - * - * @return \Google\Cloud\Notebooks\V1\ListSchedulesRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Format: - * `parent=projects/{project_id}/locations/{location}` - * @type int $page_size - * Maximum return size of the list call. - * @type string $page_token - * A previous returned page token that can be used to continue listing - * from the last result. - * @type string $filter - * Filter applied to resulting schedules. - * @type string $order_by - * Field to order results by. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. Format: - * `parent=projects/{project_id}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Format: - * `parent=projects/{project_id}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Maximum return size of the list call. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Maximum return size of the list call. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A previous returned page token that can be used to continue listing - * from the last result. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A previous returned page token that can be used to continue listing - * from the last result. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Filter applied to resulting schedules. - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Filter applied to resulting schedules. - * - * Generated from protobuf field string filter = 4; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Field to order results by. - * - * Generated from protobuf field string order_by = 5; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Field to order results by. - * - * Generated from protobuf field string order_by = 5; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ListSchedulesResponse.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ListSchedulesResponse.php deleted file mode 100644 index 21f314072c1d..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ListSchedulesResponse.php +++ /dev/null @@ -1,147 +0,0 @@ -google.cloud.notebooks.v1.ListSchedulesResponse - */ -class ListSchedulesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of returned instances. - * - * Generated from protobuf field repeated .google.cloud.notebooks.v1.Schedule schedules = 1; - */ - private $schedules; - /** - * Page token that can be used to continue listing from the last result in the - * next list call. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Schedules that could not be reached. For example: - * ['projects/{project_id}/location/{location}/schedules/monthly_digest', - * 'projects/{project_id}/location/{location}/schedules/weekly_sentiment'] - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Notebooks\V1\Schedule>|\Google\Protobuf\Internal\RepeatedField $schedules - * A list of returned instances. - * @type string $next_page_token - * Page token that can be used to continue listing from the last result in the - * next list call. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Schedules that could not be reached. For example: - * ['projects/{project_id}/location/{location}/schedules/monthly_digest', - * 'projects/{project_id}/location/{location}/schedules/weekly_sentiment'] - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * A list of returned instances. - * - * Generated from protobuf field repeated .google.cloud.notebooks.v1.Schedule schedules = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSchedules() - { - return $this->schedules; - } - - /** - * A list of returned instances. - * - * Generated from protobuf field repeated .google.cloud.notebooks.v1.Schedule schedules = 1; - * @param array<\Google\Cloud\Notebooks\V1\Schedule>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSchedules($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Notebooks\V1\Schedule::class); - $this->schedules = $arr; - - return $this; - } - - /** - * Page token that can be used to continue listing from the last result in the - * next list call. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Page token that can be used to continue listing from the last result in the - * next list call. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Schedules that could not be reached. For example: - * ['projects/{project_id}/location/{location}/schedules/monthly_digest', - * 'projects/{project_id}/location/{location}/schedules/weekly_sentiment'] - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Schedules that could not be reached. For example: - * ['projects/{project_id}/location/{location}/schedules/monthly_digest', - * 'projects/{project_id}/location/{location}/schedules/weekly_sentiment'] - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/LocalDisk.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/LocalDisk.php deleted file mode 100644 index 97bb2321a01a..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/LocalDisk.php +++ /dev/null @@ -1,583 +0,0 @@ -google.cloud.notebooks.v1.LocalDisk - */ -class LocalDisk extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Output only. Specifies whether the disk will be auto-deleted when the - * instance is deleted (but not when the disk is detached from the instance). - * - * Generated from protobuf field bool auto_delete = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $auto_delete = false; - /** - * Optional. Output only. Indicates that this is a boot disk. The virtual machine - * will use the first partition of the disk for its root filesystem. - * - * Generated from protobuf field bool boot = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $boot = false; - /** - * Optional. Output only. Specifies a unique device name - * of your choice that is reflected into the - * `/dev/disk/by-id/google-*` tree of a Linux operating system running within - * the instance. This name can be used to reference the device for mounting, - * resizing, and so on, from within the instance. - * If not specified, the server chooses a default device name to apply to this - * disk, in the form persistent-disk-x, where x is a number assigned by Google - * Compute Engine. This field is only applicable for persistent disks. - * - * Generated from protobuf field string device_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $device_name = ''; - /** - * Output only. Indicates a list of features to enable on the guest operating system. - * Applicable only for bootable images. Read Enabling guest operating - * system features to see a list of available options. - * - * Generated from protobuf field repeated .google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature guest_os_features = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $guest_os_features; - /** - * Output only. A zero-based index to this disk, where 0 is reserved for the - * boot disk. If you have many disks attached to an instance, each disk would - * have a unique index number. - * - * Generated from protobuf field int32 index = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $index = 0; - /** - * Input only. Specifies the parameters for a new disk that will be created - * alongside the new instance. Use initialization parameters to create boot - * disks or local SSDs attached to the new instance. - * This property is mutually exclusive with the source property; you can only - * define one or the other, but not both. - * - * Generated from protobuf field .google.cloud.notebooks.v1.LocalDiskInitializeParams initialize_params = 6 [(.google.api.field_behavior) = INPUT_ONLY]; - */ - protected $initialize_params = null; - /** - * Specifies the disk interface to use for attaching this disk, which is - * either SCSI or NVME. The default is SCSI. Persistent disks must always use - * SCSI and the request will fail if you attempt to attach a persistent disk - * in any other format than SCSI. Local SSDs can use either NVME or SCSI. For - * performance characteristics of SCSI over NVMe, see Local SSD performance. - * Valid values: - * * `NVME` - * * `SCSI` - * - * Generated from protobuf field string interface = 7; - */ - protected $interface = ''; - /** - * Output only. Type of the resource. Always compute#attachedDisk for attached disks. - * - * Generated from protobuf field string kind = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $kind = ''; - /** - * Output only. Any valid publicly visible licenses. - * - * Generated from protobuf field repeated string licenses = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $licenses; - /** - * The mode in which to attach this disk, either `READ_WRITE` or `READ_ONLY`. - * If not specified, the default is to attach the disk in `READ_WRITE` mode. - * Valid values: - * * `READ_ONLY` - * * `READ_WRITE` - * - * Generated from protobuf field string mode = 10; - */ - protected $mode = ''; - /** - * Specifies a valid partial or full URL to an existing Persistent Disk - * resource. - * - * Generated from protobuf field string source = 11; - */ - protected $source = ''; - /** - * Specifies the type of the disk, either `SCRATCH` or `PERSISTENT`. If not - * specified, the default is `PERSISTENT`. - * Valid values: - * * `PERSISTENT` - * * `SCRATCH` - * - * Generated from protobuf field string type = 12; - */ - protected $type = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $auto_delete - * Optional. Output only. Specifies whether the disk will be auto-deleted when the - * instance is deleted (but not when the disk is detached from the instance). - * @type bool $boot - * Optional. Output only. Indicates that this is a boot disk. The virtual machine - * will use the first partition of the disk for its root filesystem. - * @type string $device_name - * Optional. Output only. Specifies a unique device name - * of your choice that is reflected into the - * `/dev/disk/by-id/google-*` tree of a Linux operating system running within - * the instance. This name can be used to reference the device for mounting, - * resizing, and so on, from within the instance. - * If not specified, the server chooses a default device name to apply to this - * disk, in the form persistent-disk-x, where x is a number assigned by Google - * Compute Engine. This field is only applicable for persistent disks. - * @type array<\Google\Cloud\Notebooks\V1\LocalDisk\RuntimeGuestOsFeature>|\Google\Protobuf\Internal\RepeatedField $guest_os_features - * Output only. Indicates a list of features to enable on the guest operating system. - * Applicable only for bootable images. Read Enabling guest operating - * system features to see a list of available options. - * @type int $index - * Output only. A zero-based index to this disk, where 0 is reserved for the - * boot disk. If you have many disks attached to an instance, each disk would - * have a unique index number. - * @type \Google\Cloud\Notebooks\V1\LocalDiskInitializeParams $initialize_params - * Input only. Specifies the parameters for a new disk that will be created - * alongside the new instance. Use initialization parameters to create boot - * disks or local SSDs attached to the new instance. - * This property is mutually exclusive with the source property; you can only - * define one or the other, but not both. - * @type string $interface - * Specifies the disk interface to use for attaching this disk, which is - * either SCSI or NVME. The default is SCSI. Persistent disks must always use - * SCSI and the request will fail if you attempt to attach a persistent disk - * in any other format than SCSI. Local SSDs can use either NVME or SCSI. For - * performance characteristics of SCSI over NVMe, see Local SSD performance. - * Valid values: - * * `NVME` - * * `SCSI` - * @type string $kind - * Output only. Type of the resource. Always compute#attachedDisk for attached disks. - * @type array|\Google\Protobuf\Internal\RepeatedField $licenses - * Output only. Any valid publicly visible licenses. - * @type string $mode - * The mode in which to attach this disk, either `READ_WRITE` or `READ_ONLY`. - * If not specified, the default is to attach the disk in `READ_WRITE` mode. - * Valid values: - * * `READ_ONLY` - * * `READ_WRITE` - * @type string $source - * Specifies a valid partial or full URL to an existing Persistent Disk - * resource. - * @type string $type - * Specifies the type of the disk, either `SCRATCH` or `PERSISTENT`. If not - * specified, the default is `PERSISTENT`. - * Valid values: - * * `PERSISTENT` - * * `SCRATCH` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V1\Runtime::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Output only. Specifies whether the disk will be auto-deleted when the - * instance is deleted (but not when the disk is detached from the instance). - * - * Generated from protobuf field bool auto_delete = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getAutoDelete() - { - return $this->auto_delete; - } - - /** - * Optional. Output only. Specifies whether the disk will be auto-deleted when the - * instance is deleted (but not when the disk is detached from the instance). - * - * Generated from protobuf field bool auto_delete = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setAutoDelete($var) - { - GPBUtil::checkBool($var); - $this->auto_delete = $var; - - return $this; - } - - /** - * Optional. Output only. Indicates that this is a boot disk. The virtual machine - * will use the first partition of the disk for its root filesystem. - * - * Generated from protobuf field bool boot = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getBoot() - { - return $this->boot; - } - - /** - * Optional. Output only. Indicates that this is a boot disk. The virtual machine - * will use the first partition of the disk for its root filesystem. - * - * Generated from protobuf field bool boot = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setBoot($var) - { - GPBUtil::checkBool($var); - $this->boot = $var; - - return $this; - } - - /** - * Optional. Output only. Specifies a unique device name - * of your choice that is reflected into the - * `/dev/disk/by-id/google-*` tree of a Linux operating system running within - * the instance. This name can be used to reference the device for mounting, - * resizing, and so on, from within the instance. - * If not specified, the server chooses a default device name to apply to this - * disk, in the form persistent-disk-x, where x is a number assigned by Google - * Compute Engine. This field is only applicable for persistent disks. - * - * Generated from protobuf field string device_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getDeviceName() - { - return $this->device_name; - } - - /** - * Optional. Output only. Specifies a unique device name - * of your choice that is reflected into the - * `/dev/disk/by-id/google-*` tree of a Linux operating system running within - * the instance. This name can be used to reference the device for mounting, - * resizing, and so on, from within the instance. - * If not specified, the server chooses a default device name to apply to this - * disk, in the form persistent-disk-x, where x is a number assigned by Google - * Compute Engine. This field is only applicable for persistent disks. - * - * Generated from protobuf field string device_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setDeviceName($var) - { - GPBUtil::checkString($var, True); - $this->device_name = $var; - - return $this; - } - - /** - * Output only. Indicates a list of features to enable on the guest operating system. - * Applicable only for bootable images. Read Enabling guest operating - * system features to see a list of available options. - * - * Generated from protobuf field repeated .google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature guest_os_features = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getGuestOsFeatures() - { - return $this->guest_os_features; - } - - /** - * Output only. Indicates a list of features to enable on the guest operating system. - * Applicable only for bootable images. Read Enabling guest operating - * system features to see a list of available options. - * - * Generated from protobuf field repeated .google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature guest_os_features = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\Notebooks\V1\LocalDisk\RuntimeGuestOsFeature>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setGuestOsFeatures($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Notebooks\V1\LocalDisk\RuntimeGuestOsFeature::class); - $this->guest_os_features = $arr; - - return $this; - } - - /** - * Output only. A zero-based index to this disk, where 0 is reserved for the - * boot disk. If you have many disks attached to an instance, each disk would - * have a unique index number. - * - * Generated from protobuf field int32 index = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getIndex() - { - return $this->index; - } - - /** - * Output only. A zero-based index to this disk, where 0 is reserved for the - * boot disk. If you have many disks attached to an instance, each disk would - * have a unique index number. - * - * Generated from protobuf field int32 index = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setIndex($var) - { - GPBUtil::checkInt32($var); - $this->index = $var; - - return $this; - } - - /** - * Input only. Specifies the parameters for a new disk that will be created - * alongside the new instance. Use initialization parameters to create boot - * disks or local SSDs attached to the new instance. - * This property is mutually exclusive with the source property; you can only - * define one or the other, but not both. - * - * Generated from protobuf field .google.cloud.notebooks.v1.LocalDiskInitializeParams initialize_params = 6 [(.google.api.field_behavior) = INPUT_ONLY]; - * @return \Google\Cloud\Notebooks\V1\LocalDiskInitializeParams|null - */ - public function getInitializeParams() - { - return $this->initialize_params; - } - - public function hasInitializeParams() - { - return isset($this->initialize_params); - } - - public function clearInitializeParams() - { - unset($this->initialize_params); - } - - /** - * Input only. Specifies the parameters for a new disk that will be created - * alongside the new instance. Use initialization parameters to create boot - * disks or local SSDs attached to the new instance. - * This property is mutually exclusive with the source property; you can only - * define one or the other, but not both. - * - * Generated from protobuf field .google.cloud.notebooks.v1.LocalDiskInitializeParams initialize_params = 6 [(.google.api.field_behavior) = INPUT_ONLY]; - * @param \Google\Cloud\Notebooks\V1\LocalDiskInitializeParams $var - * @return $this - */ - public function setInitializeParams($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V1\LocalDiskInitializeParams::class); - $this->initialize_params = $var; - - return $this; - } - - /** - * Specifies the disk interface to use for attaching this disk, which is - * either SCSI or NVME. The default is SCSI. Persistent disks must always use - * SCSI and the request will fail if you attempt to attach a persistent disk - * in any other format than SCSI. Local SSDs can use either NVME or SCSI. For - * performance characteristics of SCSI over NVMe, see Local SSD performance. - * Valid values: - * * `NVME` - * * `SCSI` - * - * Generated from protobuf field string interface = 7; - * @return string - */ - public function getInterface() - { - return $this->interface; - } - - /** - * Specifies the disk interface to use for attaching this disk, which is - * either SCSI or NVME. The default is SCSI. Persistent disks must always use - * SCSI and the request will fail if you attempt to attach a persistent disk - * in any other format than SCSI. Local SSDs can use either NVME or SCSI. For - * performance characteristics of SCSI over NVMe, see Local SSD performance. - * Valid values: - * * `NVME` - * * `SCSI` - * - * Generated from protobuf field string interface = 7; - * @param string $var - * @return $this - */ - public function setInterface($var) - { - GPBUtil::checkString($var, True); - $this->interface = $var; - - return $this; - } - - /** - * Output only. Type of the resource. Always compute#attachedDisk for attached disks. - * - * Generated from protobuf field string kind = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getKind() - { - return $this->kind; - } - - /** - * Output only. Type of the resource. Always compute#attachedDisk for attached disks. - * - * Generated from protobuf field string kind = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setKind($var) - { - GPBUtil::checkString($var, True); - $this->kind = $var; - - return $this; - } - - /** - * Output only. Any valid publicly visible licenses. - * - * Generated from protobuf field repeated string licenses = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getLicenses() - { - return $this->licenses; - } - - /** - * Output only. Any valid publicly visible licenses. - * - * Generated from protobuf field repeated string licenses = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setLicenses($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->licenses = $arr; - - return $this; - } - - /** - * The mode in which to attach this disk, either `READ_WRITE` or `READ_ONLY`. - * If not specified, the default is to attach the disk in `READ_WRITE` mode. - * Valid values: - * * `READ_ONLY` - * * `READ_WRITE` - * - * Generated from protobuf field string mode = 10; - * @return string - */ - public function getMode() - { - return $this->mode; - } - - /** - * The mode in which to attach this disk, either `READ_WRITE` or `READ_ONLY`. - * If not specified, the default is to attach the disk in `READ_WRITE` mode. - * Valid values: - * * `READ_ONLY` - * * `READ_WRITE` - * - * Generated from protobuf field string mode = 10; - * @param string $var - * @return $this - */ - public function setMode($var) - { - GPBUtil::checkString($var, True); - $this->mode = $var; - - return $this; - } - - /** - * Specifies a valid partial or full URL to an existing Persistent Disk - * resource. - * - * Generated from protobuf field string source = 11; - * @return string - */ - public function getSource() - { - return $this->source; - } - - /** - * Specifies a valid partial or full URL to an existing Persistent Disk - * resource. - * - * Generated from protobuf field string source = 11; - * @param string $var - * @return $this - */ - public function setSource($var) - { - GPBUtil::checkString($var, True); - $this->source = $var; - - return $this; - } - - /** - * Specifies the type of the disk, either `SCRATCH` or `PERSISTENT`. If not - * specified, the default is `PERSISTENT`. - * Valid values: - * * `PERSISTENT` - * * `SCRATCH` - * - * Generated from protobuf field string type = 12; - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * Specifies the type of the disk, either `SCRATCH` or `PERSISTENT`. If not - * specified, the default is `PERSISTENT`. - * Valid values: - * * `PERSISTENT` - * * `SCRATCH` - * - * Generated from protobuf field string type = 12; - * @param string $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkString($var, True); - $this->type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/LocalDisk/RuntimeGuestOsFeature.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/LocalDisk/RuntimeGuestOsFeature.php deleted file mode 100644 index bb75c0045509..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/LocalDisk/RuntimeGuestOsFeature.php +++ /dev/null @@ -1,111 +0,0 @@ -google.cloud.notebooks.v1.LocalDisk.RuntimeGuestOsFeature - */ -class RuntimeGuestOsFeature extends \Google\Protobuf\Internal\Message -{ - /** - * The ID of a supported feature. Read [Enabling guest operating system - * features](https://cloud.google.com/compute/docs/images/create-delete-deprecate-private-images#guest-os-features) - * to see a list of available options. - * Valid values: - * * `FEATURE_TYPE_UNSPECIFIED` - * * `MULTI_IP_SUBNET` - * * `SECURE_BOOT` - * * `UEFI_COMPATIBLE` - * * `VIRTIO_SCSI_MULTIQUEUE` - * * `WINDOWS` - * - * Generated from protobuf field string type = 1; - */ - protected $type = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $type - * The ID of a supported feature. Read [Enabling guest operating system - * features](https://cloud.google.com/compute/docs/images/create-delete-deprecate-private-images#guest-os-features) - * to see a list of available options. - * Valid values: - * * `FEATURE_TYPE_UNSPECIFIED` - * * `MULTI_IP_SUBNET` - * * `SECURE_BOOT` - * * `UEFI_COMPATIBLE` - * * `VIRTIO_SCSI_MULTIQUEUE` - * * `WINDOWS` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V1\Runtime::initOnce(); - parent::__construct($data); - } - - /** - * The ID of a supported feature. Read [Enabling guest operating system - * features](https://cloud.google.com/compute/docs/images/create-delete-deprecate-private-images#guest-os-features) - * to see a list of available options. - * Valid values: - * * `FEATURE_TYPE_UNSPECIFIED` - * * `MULTI_IP_SUBNET` - * * `SECURE_BOOT` - * * `UEFI_COMPATIBLE` - * * `VIRTIO_SCSI_MULTIQUEUE` - * * `WINDOWS` - * - * Generated from protobuf field string type = 1; - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * The ID of a supported feature. Read [Enabling guest operating system - * features](https://cloud.google.com/compute/docs/images/create-delete-deprecate-private-images#guest-os-features) - * to see a list of available options. - * Valid values: - * * `FEATURE_TYPE_UNSPECIFIED` - * * `MULTI_IP_SUBNET` - * * `SECURE_BOOT` - * * `UEFI_COMPATIBLE` - * * `VIRTIO_SCSI_MULTIQUEUE` - * * `WINDOWS` - * - * Generated from protobuf field string type = 1; - * @param string $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkString($var, True); - $this->type = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(RuntimeGuestOsFeature::class, \Google\Cloud\Notebooks\V1\LocalDisk_RuntimeGuestOsFeature::class); - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/LocalDiskInitializeParams.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/LocalDiskInitializeParams.php deleted file mode 100644 index f731a6094b6b..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/LocalDiskInitializeParams.php +++ /dev/null @@ -1,231 +0,0 @@ -google.cloud.notebooks.v1.LocalDiskInitializeParams - */ -class LocalDiskInitializeParams extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Provide this property when creating the disk. - * - * Generated from protobuf field string description = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Optional. Specifies the disk name. If not specified, the default is to use the name - * of the instance. If the disk with the instance name exists already in the - * given zone/region, a new name will be automatically generated. - * - * Generated from protobuf field string disk_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $disk_name = ''; - /** - * Optional. Specifies the size of the disk in base-2 GB. If not specified, the disk - * will be the same size as the image (usually 10GB). If specified, the size - * must be equal to or larger than 10GB. Default 100 GB. - * - * Generated from protobuf field int64 disk_size_gb = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $disk_size_gb = 0; - /** - * Input only. The type of the boot disk attached to this instance, defaults to - * standard persistent disk (`PD_STANDARD`). - * - * Generated from protobuf field .google.cloud.notebooks.v1.LocalDiskInitializeParams.DiskType disk_type = 4 [(.google.api.field_behavior) = INPUT_ONLY]; - */ - protected $disk_type = 0; - /** - * Optional. Labels to apply to this disk. These can be later modified by the - * disks.setLabels method. This field is only applicable for persistent disks. - * - * Generated from protobuf field map labels = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $description - * Optional. Provide this property when creating the disk. - * @type string $disk_name - * Optional. Specifies the disk name. If not specified, the default is to use the name - * of the instance. If the disk with the instance name exists already in the - * given zone/region, a new name will be automatically generated. - * @type int|string $disk_size_gb - * Optional. Specifies the size of the disk in base-2 GB. If not specified, the disk - * will be the same size as the image (usually 10GB). If specified, the size - * must be equal to or larger than 10GB. Default 100 GB. - * @type int $disk_type - * Input only. The type of the boot disk attached to this instance, defaults to - * standard persistent disk (`PD_STANDARD`). - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. Labels to apply to this disk. These can be later modified by the - * disks.setLabels method. This field is only applicable for persistent disks. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V1\Runtime::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Provide this property when creating the disk. - * - * Generated from protobuf field string description = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. Provide this property when creating the disk. - * - * Generated from protobuf field string description = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Optional. Specifies the disk name. If not specified, the default is to use the name - * of the instance. If the disk with the instance name exists already in the - * given zone/region, a new name will be automatically generated. - * - * Generated from protobuf field string disk_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDiskName() - { - return $this->disk_name; - } - - /** - * Optional. Specifies the disk name. If not specified, the default is to use the name - * of the instance. If the disk with the instance name exists already in the - * given zone/region, a new name will be automatically generated. - * - * Generated from protobuf field string disk_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDiskName($var) - { - GPBUtil::checkString($var, True); - $this->disk_name = $var; - - return $this; - } - - /** - * Optional. Specifies the size of the disk in base-2 GB. If not specified, the disk - * will be the same size as the image (usually 10GB). If specified, the size - * must be equal to or larger than 10GB. Default 100 GB. - * - * Generated from protobuf field int64 disk_size_gb = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return int|string - */ - public function getDiskSizeGb() - { - return $this->disk_size_gb; - } - - /** - * Optional. Specifies the size of the disk in base-2 GB. If not specified, the disk - * will be the same size as the image (usually 10GB). If specified, the size - * must be equal to or larger than 10GB. Default 100 GB. - * - * Generated from protobuf field int64 disk_size_gb = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param int|string $var - * @return $this - */ - public function setDiskSizeGb($var) - { - GPBUtil::checkInt64($var); - $this->disk_size_gb = $var; - - return $this; - } - - /** - * Input only. The type of the boot disk attached to this instance, defaults to - * standard persistent disk (`PD_STANDARD`). - * - * Generated from protobuf field .google.cloud.notebooks.v1.LocalDiskInitializeParams.DiskType disk_type = 4 [(.google.api.field_behavior) = INPUT_ONLY]; - * @return int - */ - public function getDiskType() - { - return $this->disk_type; - } - - /** - * Input only. The type of the boot disk attached to this instance, defaults to - * standard persistent disk (`PD_STANDARD`). - * - * Generated from protobuf field .google.cloud.notebooks.v1.LocalDiskInitializeParams.DiskType disk_type = 4 [(.google.api.field_behavior) = INPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setDiskType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Notebooks\V1\LocalDiskInitializeParams\DiskType::class); - $this->disk_type = $var; - - return $this; - } - - /** - * Optional. Labels to apply to this disk. These can be later modified by the - * disks.setLabels method. This field is only applicable for persistent disks. - * - * Generated from protobuf field map labels = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. Labels to apply to this disk. These can be later modified by the - * disks.setLabels method. This field is only applicable for persistent disks. - * - * Generated from protobuf field map labels = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/LocalDiskInitializeParams/DiskType.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/LocalDiskInitializeParams/DiskType.php deleted file mode 100644 index 8c1eaa5a9195..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/LocalDiskInitializeParams/DiskType.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.notebooks.v1.LocalDiskInitializeParams.DiskType - */ -class DiskType -{ - /** - * Disk type not set. - * - * Generated from protobuf enum DISK_TYPE_UNSPECIFIED = 0; - */ - const DISK_TYPE_UNSPECIFIED = 0; - /** - * Standard persistent disk type. - * - * Generated from protobuf enum PD_STANDARD = 1; - */ - const PD_STANDARD = 1; - /** - * SSD persistent disk type. - * - * Generated from protobuf enum PD_SSD = 2; - */ - const PD_SSD = 2; - /** - * Balanced persistent disk type. - * - * Generated from protobuf enum PD_BALANCED = 3; - */ - const PD_BALANCED = 3; - /** - * Extreme persistent disk type. - * - * Generated from protobuf enum PD_EXTREME = 4; - */ - const PD_EXTREME = 4; - - private static $valueToName = [ - self::DISK_TYPE_UNSPECIFIED => 'DISK_TYPE_UNSPECIFIED', - self::PD_STANDARD => 'PD_STANDARD', - self::PD_SSD => 'PD_SSD', - self::PD_BALANCED => 'PD_BALANCED', - self::PD_EXTREME => 'PD_EXTREME', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DiskType::class, \Google\Cloud\Notebooks\V1\LocalDiskInitializeParams_DiskType::class); - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/OperationMetadata.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/OperationMetadata.php deleted file mode 100644 index 49db986749ec..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/OperationMetadata.php +++ /dev/null @@ -1,337 +0,0 @@ -google.cloud.notebooks.v1.OperationMetadata - */ -class OperationMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; - */ - protected $create_time = null; - /** - * The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - */ - protected $end_time = null; - /** - * Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3; - */ - protected $target = ''; - /** - * Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4; - */ - protected $verb = ''; - /** - * Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_message = 5; - */ - protected $status_message = ''; - /** - * Identifies whether the user has requested cancellation - * of the operation. Operations that have successfully been cancelled - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to `Code.CANCELLED`. - * - * Generated from protobuf field bool requested_cancellation = 6; - */ - protected $requested_cancellation = false; - /** - * API version used to start the operation. - * - * Generated from protobuf field string api_version = 7; - */ - protected $api_version = ''; - /** - * API endpoint name of this operation. - * - * Generated from protobuf field string endpoint = 8; - */ - protected $endpoint = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $create_time - * The time the operation was created. - * @type \Google\Protobuf\Timestamp $end_time - * The time the operation finished running. - * @type string $target - * Server-defined resource path for the target of the operation. - * @type string $verb - * Name of the verb executed by the operation. - * @type string $status_message - * Human-readable status of the operation, if any. - * @type bool $requested_cancellation - * Identifies whether the user has requested cancellation - * of the operation. Operations that have successfully been cancelled - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to `Code.CANCELLED`. - * @type string $api_version - * API version used to start the operation. - * @type string $endpoint - * API endpoint name of this operation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3; - * @return string - */ - public function getTarget() - { - return $this->target; - } - - /** - * Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3; - * @param string $var - * @return $this - */ - public function setTarget($var) - { - GPBUtil::checkString($var, True); - $this->target = $var; - - return $this; - } - - /** - * Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4; - * @return string - */ - public function getVerb() - { - return $this->verb; - } - - /** - * Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4; - * @param string $var - * @return $this - */ - public function setVerb($var) - { - GPBUtil::checkString($var, True); - $this->verb = $var; - - return $this; - } - - /** - * Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_message = 5; - * @return string - */ - public function getStatusMessage() - { - return $this->status_message; - } - - /** - * Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_message = 5; - * @param string $var - * @return $this - */ - public function setStatusMessage($var) - { - GPBUtil::checkString($var, True); - $this->status_message = $var; - - return $this; - } - - /** - * Identifies whether the user has requested cancellation - * of the operation. Operations that have successfully been cancelled - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to `Code.CANCELLED`. - * - * Generated from protobuf field bool requested_cancellation = 6; - * @return bool - */ - public function getRequestedCancellation() - { - return $this->requested_cancellation; - } - - /** - * Identifies whether the user has requested cancellation - * of the operation. Operations that have successfully been cancelled - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to `Code.CANCELLED`. - * - * Generated from protobuf field bool requested_cancellation = 6; - * @param bool $var - * @return $this - */ - public function setRequestedCancellation($var) - { - GPBUtil::checkBool($var); - $this->requested_cancellation = $var; - - return $this; - } - - /** - * API version used to start the operation. - * - * Generated from protobuf field string api_version = 7; - * @return string - */ - public function getApiVersion() - { - return $this->api_version; - } - - /** - * API version used to start the operation. - * - * Generated from protobuf field string api_version = 7; - * @param string $var - * @return $this - */ - public function setApiVersion($var) - { - GPBUtil::checkString($var, True); - $this->api_version = $var; - - return $this; - } - - /** - * API endpoint name of this operation. - * - * Generated from protobuf field string endpoint = 8; - * @return string - */ - public function getEndpoint() - { - return $this->endpoint; - } - - /** - * API endpoint name of this operation. - * - * Generated from protobuf field string endpoint = 8; - * @param string $var - * @return $this - */ - public function setEndpoint($var) - { - GPBUtil::checkString($var, True); - $this->endpoint = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/RefreshRuntimeTokenInternalRequest.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/RefreshRuntimeTokenInternalRequest.php deleted file mode 100644 index 6662c576c620..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/RefreshRuntimeTokenInternalRequest.php +++ /dev/null @@ -1,127 +0,0 @@ -google.cloud.notebooks.v1.RefreshRuntimeTokenInternalRequest - */ -class RefreshRuntimeTokenInternalRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. The VM hardware token for authenticating the VM. - * https://cloud.google.com/compute/docs/instances/verifying-instance-identity - * - * Generated from protobuf field string vm_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $vm_id = ''; - - /** - * @param string $name Required. Format: - * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` - * Please see {@see ManagedNotebookServiceClient::runtimeName()} for help formatting this field. - * @param string $vmId Required. The VM hardware token for authenticating the VM. - * https://cloud.google.com/compute/docs/instances/verifying-instance-identity - * - * @return \Google\Cloud\Notebooks\V1\RefreshRuntimeTokenInternalRequest - * - * @experimental - */ - public static function build(string $name, string $vmId): self - { - return (new self()) - ->setName($name) - ->setVmId($vmId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Format: - * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` - * @type string $vm_id - * Required. The VM hardware token for authenticating the VM. - * https://cloud.google.com/compute/docs/instances/verifying-instance-identity - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V1\ManagedService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. The VM hardware token for authenticating the VM. - * https://cloud.google.com/compute/docs/instances/verifying-instance-identity - * - * Generated from protobuf field string vm_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getVmId() - { - return $this->vm_id; - } - - /** - * Required. The VM hardware token for authenticating the VM. - * https://cloud.google.com/compute/docs/instances/verifying-instance-identity - * - * Generated from protobuf field string vm_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setVmId($var) - { - GPBUtil::checkString($var, True); - $this->vm_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/RefreshRuntimeTokenInternalResponse.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/RefreshRuntimeTokenInternalResponse.php deleted file mode 100644 index a9e31bde51a9..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/RefreshRuntimeTokenInternalResponse.php +++ /dev/null @@ -1,111 +0,0 @@ -google.cloud.notebooks.v1.RefreshRuntimeTokenInternalResponse - */ -class RefreshRuntimeTokenInternalResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The OAuth 2.0 access token. - * - * Generated from protobuf field string access_token = 1; - */ - protected $access_token = ''; - /** - * Output only. Token expiration time. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $expire_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $access_token - * The OAuth 2.0 access token. - * @type \Google\Protobuf\Timestamp $expire_time - * Output only. Token expiration time. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V1\ManagedService::initOnce(); - parent::__construct($data); - } - - /** - * The OAuth 2.0 access token. - * - * Generated from protobuf field string access_token = 1; - * @return string - */ - public function getAccessToken() - { - return $this->access_token; - } - - /** - * The OAuth 2.0 access token. - * - * Generated from protobuf field string access_token = 1; - * @param string $var - * @return $this - */ - public function setAccessToken($var) - { - GPBUtil::checkString($var, True); - $this->access_token = $var; - - return $this; - } - - /** - * Output only. Token expiration time. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getExpireTime() - { - return $this->expire_time; - } - - public function hasExpireTime() - { - return isset($this->expire_time); - } - - public function clearExpireTime() - { - unset($this->expire_time); - } - - /** - * Output only. Token expiration time. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setExpireTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->expire_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/RegisterInstanceRequest.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/RegisterInstanceRequest.php deleted file mode 100644 index 96eb12f68d0b..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/RegisterInstanceRequest.php +++ /dev/null @@ -1,117 +0,0 @@ -google.cloud.notebooks.v1.RegisterInstanceRequest - */ -class RegisterInstanceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Format: - * `parent=projects/{project_id}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $parent = ''; - /** - * Required. User defined unique ID of this instance. The `instance_id` must - * be 1 to 63 characters long and contain only lowercase letters, - * numeric characters, and dashes. The first character must be a lowercase - * letter and the last character cannot be a dash. - * - * Generated from protobuf field string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $instance_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Format: - * `parent=projects/{project_id}/locations/{location}` - * @type string $instance_id - * Required. User defined unique ID of this instance. The `instance_id` must - * be 1 to 63 characters long and contain only lowercase letters, - * numeric characters, and dashes. The first character must be a lowercase - * letter and the last character cannot be a dash. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. Format: - * `parent=projects/{project_id}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Format: - * `parent=projects/{project_id}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. User defined unique ID of this instance. The `instance_id` must - * be 1 to 63 characters long and contain only lowercase letters, - * numeric characters, and dashes. The first character must be a lowercase - * letter and the last character cannot be a dash. - * - * Generated from protobuf field string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getInstanceId() - { - return $this->instance_id; - } - - /** - * Required. User defined unique ID of this instance. The `instance_id` must - * be 1 to 63 characters long and contain only lowercase letters, - * numeric characters, and dashes. The first character must be a lowercase - * letter and the last character cannot be a dash. - * - * Generated from protobuf field string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setInstanceId($var) - { - GPBUtil::checkString($var, True); - $this->instance_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ReportInstanceInfoRequest.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ReportInstanceInfoRequest.php deleted file mode 100644 index 8fbf0ac26d2d..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ReportInstanceInfoRequest.php +++ /dev/null @@ -1,147 +0,0 @@ -google.cloud.notebooks.v1.ReportInstanceInfoRequest - */ -class ReportInstanceInfoRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Required. The VM hardware token for authenticating the VM. - * https://cloud.google.com/compute/docs/instances/verifying-instance-identity - * - * Generated from protobuf field string vm_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $vm_id = ''; - /** - * The metadata reported to Notebooks API. This will be merged to the instance - * metadata store - * - * Generated from protobuf field map metadata = 3; - */ - private $metadata; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * @type string $vm_id - * Required. The VM hardware token for authenticating the VM. - * https://cloud.google.com/compute/docs/instances/verifying-instance-identity - * @type array|\Google\Protobuf\Internal\MapField $metadata - * The metadata reported to Notebooks API. This will be merged to the instance - * metadata store - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. The VM hardware token for authenticating the VM. - * https://cloud.google.com/compute/docs/instances/verifying-instance-identity - * - * Generated from protobuf field string vm_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getVmId() - { - return $this->vm_id; - } - - /** - * Required. The VM hardware token for authenticating the VM. - * https://cloud.google.com/compute/docs/instances/verifying-instance-identity - * - * Generated from protobuf field string vm_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setVmId($var) - { - GPBUtil::checkString($var, True); - $this->vm_id = $var; - - return $this; - } - - /** - * The metadata reported to Notebooks API. This will be merged to the instance - * metadata store - * - * Generated from protobuf field map metadata = 3; - * @return \Google\Protobuf\Internal\MapField - */ - public function getMetadata() - { - return $this->metadata; - } - - /** - * The metadata reported to Notebooks API. This will be merged to the instance - * metadata store - * - * Generated from protobuf field map metadata = 3; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setMetadata($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->metadata = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ReportRuntimeEventRequest.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ReportRuntimeEventRequest.php deleted file mode 100644 index 8d785cdc3c76..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ReportRuntimeEventRequest.php +++ /dev/null @@ -1,168 +0,0 @@ -google.cloud.notebooks.v1.ReportRuntimeEventRequest - */ -class ReportRuntimeEventRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. The VM hardware token for authenticating the VM. - * https://cloud.google.com/compute/docs/instances/verifying-instance-identity - * - * Generated from protobuf field string vm_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $vm_id = ''; - /** - * Required. The Event to be reported. - * - * Generated from protobuf field .google.cloud.notebooks.v1.Event event = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $event = null; - - /** - * @param string $name Required. Format: - * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` - * Please see {@see ManagedNotebookServiceClient::runtimeName()} for help formatting this field. - * - * @return \Google\Cloud\Notebooks\V1\ReportRuntimeEventRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Format: - * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` - * @type string $vm_id - * Required. The VM hardware token for authenticating the VM. - * https://cloud.google.com/compute/docs/instances/verifying-instance-identity - * @type \Google\Cloud\Notebooks\V1\Event $event - * Required. The Event to be reported. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V1\ManagedService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. The VM hardware token for authenticating the VM. - * https://cloud.google.com/compute/docs/instances/verifying-instance-identity - * - * Generated from protobuf field string vm_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getVmId() - { - return $this->vm_id; - } - - /** - * Required. The VM hardware token for authenticating the VM. - * https://cloud.google.com/compute/docs/instances/verifying-instance-identity - * - * Generated from protobuf field string vm_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setVmId($var) - { - GPBUtil::checkString($var, True); - $this->vm_id = $var; - - return $this; - } - - /** - * Required. The Event to be reported. - * - * Generated from protobuf field .google.cloud.notebooks.v1.Event event = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Notebooks\V1\Event|null - */ - public function getEvent() - { - return $this->event; - } - - public function hasEvent() - { - return isset($this->event); - } - - public function clearEvent() - { - unset($this->event); - } - - /** - * Required. The Event to be reported. - * - * Generated from protobuf field .google.cloud.notebooks.v1.Event event = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Notebooks\V1\Event $var - * @return $this - */ - public function setEvent($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V1\Event::class); - $this->event = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ReservationAffinity.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ReservationAffinity.php deleted file mode 100644 index b22aec5c428f..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ReservationAffinity.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.notebooks.v1.ReservationAffinity - */ -class ReservationAffinity extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Type of reservation to consume - * - * Generated from protobuf field .google.cloud.notebooks.v1.ReservationAffinity.Type consume_reservation_type = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $consume_reservation_type = 0; - /** - * Optional. Corresponds to the label key of reservation resource. - * - * Generated from protobuf field string key = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $key = ''; - /** - * Optional. Corresponds to the label values of reservation resource. - * - * Generated from protobuf field repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $values; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $consume_reservation_type - * Optional. Type of reservation to consume - * @type string $key - * Optional. Corresponds to the label key of reservation resource. - * @type array|\Google\Protobuf\Internal\RepeatedField $values - * Optional. Corresponds to the label values of reservation resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V1\Instance::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Type of reservation to consume - * - * Generated from protobuf field .google.cloud.notebooks.v1.ReservationAffinity.Type consume_reservation_type = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getConsumeReservationType() - { - return $this->consume_reservation_type; - } - - /** - * Optional. Type of reservation to consume - * - * Generated from protobuf field .google.cloud.notebooks.v1.ReservationAffinity.Type consume_reservation_type = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setConsumeReservationType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Notebooks\V1\ReservationAffinity\Type::class); - $this->consume_reservation_type = $var; - - return $this; - } - - /** - * Optional. Corresponds to the label key of reservation resource. - * - * Generated from protobuf field string key = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getKey() - { - return $this->key; - } - - /** - * Optional. Corresponds to the label key of reservation resource. - * - * Generated from protobuf field string key = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setKey($var) - { - GPBUtil::checkString($var, True); - $this->key = $var; - - return $this; - } - - /** - * Optional. Corresponds to the label values of reservation resource. - * - * Generated from protobuf field repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getValues() - { - return $this->values; - } - - /** - * Optional. Corresponds to the label values of reservation resource. - * - * Generated from protobuf field repeated string values = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setValues($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->values = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ReservationAffinity/Type.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ReservationAffinity/Type.php deleted file mode 100644 index af2ee3dd3de4..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ReservationAffinity/Type.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.notebooks.v1.ReservationAffinity.Type - */ -class Type -{ - /** - * Default type. - * - * Generated from protobuf enum TYPE_UNSPECIFIED = 0; - */ - const TYPE_UNSPECIFIED = 0; - /** - * Do not consume from any allocated capacity. - * - * Generated from protobuf enum NO_RESERVATION = 1; - */ - const NO_RESERVATION = 1; - /** - * Consume any reservation available. - * - * Generated from protobuf enum ANY_RESERVATION = 2; - */ - const ANY_RESERVATION = 2; - /** - * Must consume from a specific reservation. Must specify key value fields - * for specifying the reservations. - * - * Generated from protobuf enum SPECIFIC_RESERVATION = 3; - */ - const SPECIFIC_RESERVATION = 3; - - private static $valueToName = [ - self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', - self::NO_RESERVATION => 'NO_RESERVATION', - self::ANY_RESERVATION => 'ANY_RESERVATION', - self::SPECIFIC_RESERVATION => 'SPECIFIC_RESERVATION', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Type::class, \Google\Cloud\Notebooks\V1\ReservationAffinity_Type::class); - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ResetInstanceRequest.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ResetInstanceRequest.php deleted file mode 100644 index e9c2bf7e8038..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ResetInstanceRequest.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.notebooks.v1.ResetInstanceRequest - */ -class ResetInstanceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ResetRuntimeRequest.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ResetRuntimeRequest.php deleted file mode 100644 index 61cbd7275467..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/ResetRuntimeRequest.php +++ /dev/null @@ -1,119 +0,0 @@ -google.cloud.notebooks.v1.ResetRuntimeRequest - */ -class ResetRuntimeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Idempotent request UUID. - * - * Generated from protobuf field string request_id = 2; - */ - protected $request_id = ''; - - /** - * @param string $name Required. Format: - * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` - * - * @return \Google\Cloud\Notebooks\V1\ResetRuntimeRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Format: - * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` - * @type string $request_id - * Idempotent request UUID. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V1\ManagedService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Idempotent request UUID. - * - * Generated from protobuf field string request_id = 2; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Idempotent request UUID. - * - * Generated from protobuf field string request_id = 2; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/RollbackInstanceRequest.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/RollbackInstanceRequest.php deleted file mode 100644 index f9491707036b..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/RollbackInstanceRequest.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.notebooks.v1.RollbackInstanceRequest - */ -class RollbackInstanceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Required. The snapshot for rollback. - * Example: `projects/test-project/global/snapshots/krwlzipynril`. - * - * Generated from protobuf field string target_snapshot = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $target_snapshot = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * @type string $target_snapshot - * Required. The snapshot for rollback. - * Example: `projects/test-project/global/snapshots/krwlzipynril`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. The snapshot for rollback. - * Example: `projects/test-project/global/snapshots/krwlzipynril`. - * - * Generated from protobuf field string target_snapshot = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getTargetSnapshot() - { - return $this->target_snapshot; - } - - /** - * Required. The snapshot for rollback. - * Example: `projects/test-project/global/snapshots/krwlzipynril`. - * - * Generated from protobuf field string target_snapshot = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setTargetSnapshot($var) - { - GPBUtil::checkString($var, True); - $this->target_snapshot = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Runtime.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Runtime.php deleted file mode 100644 index 1911c7430ba6..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Runtime.php +++ /dev/null @@ -1,409 +0,0 @@ -google.cloud.notebooks.v1.Runtime - */ -class Runtime extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The resource name of the runtime. - * Format: - * `projects/{project}/locations/{location}/runtimes/{runtimeId}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. Runtime state. - * - * Generated from protobuf field .google.cloud.notebooks.v1.Runtime.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. Runtime health_state. - * - * Generated from protobuf field .google.cloud.notebooks.v1.Runtime.HealthState health_state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $health_state = 0; - /** - * The config settings for accessing runtime. - * - * Generated from protobuf field .google.cloud.notebooks.v1.RuntimeAccessConfig access_config = 5; - */ - protected $access_config = null; - /** - * The config settings for software inside the runtime. - * - * Generated from protobuf field .google.cloud.notebooks.v1.RuntimeSoftwareConfig software_config = 6; - */ - protected $software_config = null; - /** - * Output only. Contains Runtime daemon metrics such as Service status and JupyterLab - * stats. - * - * Generated from protobuf field .google.cloud.notebooks.v1.RuntimeMetrics metrics = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $metrics = null; - /** - * Output only. Runtime creation time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. Runtime update time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - protected $runtime_type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The resource name of the runtime. - * Format: - * `projects/{project}/locations/{location}/runtimes/{runtimeId}` - * @type \Google\Cloud\Notebooks\V1\VirtualMachine $virtual_machine - * Use a Compute Engine VM image to start the managed notebook instance. - * @type int $state - * Output only. Runtime state. - * @type int $health_state - * Output only. Runtime health_state. - * @type \Google\Cloud\Notebooks\V1\RuntimeAccessConfig $access_config - * The config settings for accessing runtime. - * @type \Google\Cloud\Notebooks\V1\RuntimeSoftwareConfig $software_config - * The config settings for software inside the runtime. - * @type \Google\Cloud\Notebooks\V1\RuntimeMetrics $metrics - * Output only. Contains Runtime daemon metrics such as Service status and JupyterLab - * stats. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. Runtime creation time. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. Runtime update time. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V1\Runtime::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The resource name of the runtime. - * Format: - * `projects/{project}/locations/{location}/runtimes/{runtimeId}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The resource name of the runtime. - * Format: - * `projects/{project}/locations/{location}/runtimes/{runtimeId}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Use a Compute Engine VM image to start the managed notebook instance. - * - * Generated from protobuf field .google.cloud.notebooks.v1.VirtualMachine virtual_machine = 2; - * @return \Google\Cloud\Notebooks\V1\VirtualMachine|null - */ - public function getVirtualMachine() - { - return $this->readOneof(2); - } - - public function hasVirtualMachine() - { - return $this->hasOneof(2); - } - - /** - * Use a Compute Engine VM image to start the managed notebook instance. - * - * Generated from protobuf field .google.cloud.notebooks.v1.VirtualMachine virtual_machine = 2; - * @param \Google\Cloud\Notebooks\V1\VirtualMachine $var - * @return $this - */ - public function setVirtualMachine($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V1\VirtualMachine::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Output only. Runtime state. - * - * Generated from protobuf field .google.cloud.notebooks.v1.Runtime.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. Runtime state. - * - * Generated from protobuf field .google.cloud.notebooks.v1.Runtime.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Notebooks\V1\Runtime\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. Runtime health_state. - * - * Generated from protobuf field .google.cloud.notebooks.v1.Runtime.HealthState health_state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getHealthState() - { - return $this->health_state; - } - - /** - * Output only. Runtime health_state. - * - * Generated from protobuf field .google.cloud.notebooks.v1.Runtime.HealthState health_state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setHealthState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Notebooks\V1\Runtime\HealthState::class); - $this->health_state = $var; - - return $this; - } - - /** - * The config settings for accessing runtime. - * - * Generated from protobuf field .google.cloud.notebooks.v1.RuntimeAccessConfig access_config = 5; - * @return \Google\Cloud\Notebooks\V1\RuntimeAccessConfig|null - */ - public function getAccessConfig() - { - return $this->access_config; - } - - public function hasAccessConfig() - { - return isset($this->access_config); - } - - public function clearAccessConfig() - { - unset($this->access_config); - } - - /** - * The config settings for accessing runtime. - * - * Generated from protobuf field .google.cloud.notebooks.v1.RuntimeAccessConfig access_config = 5; - * @param \Google\Cloud\Notebooks\V1\RuntimeAccessConfig $var - * @return $this - */ - public function setAccessConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V1\RuntimeAccessConfig::class); - $this->access_config = $var; - - return $this; - } - - /** - * The config settings for software inside the runtime. - * - * Generated from protobuf field .google.cloud.notebooks.v1.RuntimeSoftwareConfig software_config = 6; - * @return \Google\Cloud\Notebooks\V1\RuntimeSoftwareConfig|null - */ - public function getSoftwareConfig() - { - return $this->software_config; - } - - public function hasSoftwareConfig() - { - return isset($this->software_config); - } - - public function clearSoftwareConfig() - { - unset($this->software_config); - } - - /** - * The config settings for software inside the runtime. - * - * Generated from protobuf field .google.cloud.notebooks.v1.RuntimeSoftwareConfig software_config = 6; - * @param \Google\Cloud\Notebooks\V1\RuntimeSoftwareConfig $var - * @return $this - */ - public function setSoftwareConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V1\RuntimeSoftwareConfig::class); - $this->software_config = $var; - - return $this; - } - - /** - * Output only. Contains Runtime daemon metrics such as Service status and JupyterLab - * stats. - * - * Generated from protobuf field .google.cloud.notebooks.v1.RuntimeMetrics metrics = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Notebooks\V1\RuntimeMetrics|null - */ - public function getMetrics() - { - return $this->metrics; - } - - public function hasMetrics() - { - return isset($this->metrics); - } - - public function clearMetrics() - { - unset($this->metrics); - } - - /** - * Output only. Contains Runtime daemon metrics such as Service status and JupyterLab - * stats. - * - * Generated from protobuf field .google.cloud.notebooks.v1.RuntimeMetrics metrics = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Notebooks\V1\RuntimeMetrics $var - * @return $this - */ - public function setMetrics($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V1\RuntimeMetrics::class); - $this->metrics = $var; - - return $this; - } - - /** - * Output only. Runtime creation time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. Runtime creation time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. Runtime update time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. Runtime update time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * @return string - */ - public function getRuntimeType() - { - return $this->whichOneof("runtime_type"); - } - -} - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Runtime/HealthState.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Runtime/HealthState.php deleted file mode 100644 index 9a0f048b360a..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Runtime/HealthState.php +++ /dev/null @@ -1,84 +0,0 @@ -google.cloud.notebooks.v1.Runtime.HealthState - */ -class HealthState -{ - /** - * The runtime substate is unknown. - * - * Generated from protobuf enum HEALTH_STATE_UNSPECIFIED = 0; - */ - const HEALTH_STATE_UNSPECIFIED = 0; - /** - * The runtime is known to be in an healthy state - * (for example, critical daemons are running) - * Applies to ACTIVE state. - * - * Generated from protobuf enum HEALTHY = 1; - */ - const HEALTHY = 1; - /** - * The runtime is known to be in an unhealthy state - * (for example, critical daemons are not running) - * Applies to ACTIVE state. - * - * Generated from protobuf enum UNHEALTHY = 2; - */ - const UNHEALTHY = 2; - /** - * The runtime has not installed health monitoring agent. - * Applies to ACTIVE state. - * - * Generated from protobuf enum AGENT_NOT_INSTALLED = 3; - */ - const AGENT_NOT_INSTALLED = 3; - /** - * The runtime health monitoring agent is not running. - * Applies to ACTIVE state. - * - * Generated from protobuf enum AGENT_NOT_RUNNING = 4; - */ - const AGENT_NOT_RUNNING = 4; - - private static $valueToName = [ - self::HEALTH_STATE_UNSPECIFIED => 'HEALTH_STATE_UNSPECIFIED', - self::HEALTHY => 'HEALTHY', - self::UNHEALTHY => 'UNHEALTHY', - self::AGENT_NOT_INSTALLED => 'AGENT_NOT_INSTALLED', - self::AGENT_NOT_RUNNING => 'AGENT_NOT_RUNNING', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(HealthState::class, \Google\Cloud\Notebooks\V1\Runtime_HealthState::class); - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Runtime/State.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Runtime/State.php deleted file mode 100644 index a3e9c1f5c8f0..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Runtime/State.php +++ /dev/null @@ -1,107 +0,0 @@ -google.cloud.notebooks.v1.Runtime.State - */ -class State -{ - /** - * State is not specified. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The compute layer is starting the runtime. It is not ready for use. - * - * Generated from protobuf enum STARTING = 1; - */ - const STARTING = 1; - /** - * The compute layer is installing required frameworks and registering the - * runtime with notebook proxy. It cannot be used. - * - * Generated from protobuf enum PROVISIONING = 2; - */ - const PROVISIONING = 2; - /** - * The runtime is currently running. It is ready for use. - * - * Generated from protobuf enum ACTIVE = 3; - */ - const ACTIVE = 3; - /** - * The control logic is stopping the runtime. It cannot be used. - * - * Generated from protobuf enum STOPPING = 4; - */ - const STOPPING = 4; - /** - * The runtime is stopped. It cannot be used. - * - * Generated from protobuf enum STOPPED = 5; - */ - const STOPPED = 5; - /** - * The runtime is being deleted. It cannot be used. - * - * Generated from protobuf enum DELETING = 6; - */ - const DELETING = 6; - /** - * The runtime is upgrading. It cannot be used. - * - * Generated from protobuf enum UPGRADING = 7; - */ - const UPGRADING = 7; - /** - * The runtime is being created and set up. It is not ready for use. - * - * Generated from protobuf enum INITIALIZING = 8; - */ - const INITIALIZING = 8; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::STARTING => 'STARTING', - self::PROVISIONING => 'PROVISIONING', - self::ACTIVE => 'ACTIVE', - self::STOPPING => 'STOPPING', - self::STOPPED => 'STOPPED', - self::DELETING => 'DELETING', - self::UPGRADING => 'UPGRADING', - self::INITIALIZING => 'INITIALIZING', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\Notebooks\V1\Runtime_State::class); - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/RuntimeAcceleratorConfig.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/RuntimeAcceleratorConfig.php deleted file mode 100644 index 10aff3fbdc09..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/RuntimeAcceleratorConfig.php +++ /dev/null @@ -1,111 +0,0 @@ -google.cloud.notebooks.v1.RuntimeAcceleratorConfig - */ -class RuntimeAcceleratorConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Accelerator model. - * - * Generated from protobuf field .google.cloud.notebooks.v1.RuntimeAcceleratorConfig.AcceleratorType type = 1; - */ - protected $type = 0; - /** - * Count of cores of this accelerator. - * - * Generated from protobuf field int64 core_count = 2; - */ - protected $core_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $type - * Accelerator model. - * @type int|string $core_count - * Count of cores of this accelerator. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V1\Runtime::initOnce(); - parent::__construct($data); - } - - /** - * Accelerator model. - * - * Generated from protobuf field .google.cloud.notebooks.v1.RuntimeAcceleratorConfig.AcceleratorType type = 1; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Accelerator model. - * - * Generated from protobuf field .google.cloud.notebooks.v1.RuntimeAcceleratorConfig.AcceleratorType type = 1; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Notebooks\V1\RuntimeAcceleratorConfig\AcceleratorType::class); - $this->type = $var; - - return $this; - } - - /** - * Count of cores of this accelerator. - * - * Generated from protobuf field int64 core_count = 2; - * @return int|string - */ - public function getCoreCount() - { - return $this->core_count; - } - - /** - * Count of cores of this accelerator. - * - * Generated from protobuf field int64 core_count = 2; - * @param int|string $var - * @return $this - */ - public function setCoreCount($var) - { - GPBUtil::checkInt64($var); - $this->core_count = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/RuntimeAcceleratorConfig/AcceleratorType.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/RuntimeAcceleratorConfig/AcceleratorType.php deleted file mode 100644 index 2804e7e85158..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/RuntimeAcceleratorConfig/AcceleratorType.php +++ /dev/null @@ -1,127 +0,0 @@ -google.cloud.notebooks.v1.RuntimeAcceleratorConfig.AcceleratorType - */ -class AcceleratorType -{ - /** - * Accelerator type is not specified. - * - * Generated from protobuf enum ACCELERATOR_TYPE_UNSPECIFIED = 0; - */ - const ACCELERATOR_TYPE_UNSPECIFIED = 0; - /** - * Accelerator type is Nvidia Tesla K80. - * - * Generated from protobuf enum NVIDIA_TESLA_K80 = 1 [deprecated = true]; - */ - const NVIDIA_TESLA_K80 = 1; - /** - * Accelerator type is Nvidia Tesla P100. - * - * Generated from protobuf enum NVIDIA_TESLA_P100 = 2; - */ - const NVIDIA_TESLA_P100 = 2; - /** - * Accelerator type is Nvidia Tesla V100. - * - * Generated from protobuf enum NVIDIA_TESLA_V100 = 3; - */ - const NVIDIA_TESLA_V100 = 3; - /** - * Accelerator type is Nvidia Tesla P4. - * - * Generated from protobuf enum NVIDIA_TESLA_P4 = 4; - */ - const NVIDIA_TESLA_P4 = 4; - /** - * Accelerator type is Nvidia Tesla T4. - * - * Generated from protobuf enum NVIDIA_TESLA_T4 = 5; - */ - const NVIDIA_TESLA_T4 = 5; - /** - * Accelerator type is Nvidia Tesla A100. - * - * Generated from protobuf enum NVIDIA_TESLA_A100 = 6; - */ - const NVIDIA_TESLA_A100 = 6; - /** - * (Coming soon) Accelerator type is TPU V2. - * - * Generated from protobuf enum TPU_V2 = 7; - */ - const TPU_V2 = 7; - /** - * (Coming soon) Accelerator type is TPU V3. - * - * Generated from protobuf enum TPU_V3 = 8; - */ - const TPU_V3 = 8; - /** - * Accelerator type is NVIDIA Tesla T4 Virtual Workstations. - * - * Generated from protobuf enum NVIDIA_TESLA_T4_VWS = 9; - */ - const NVIDIA_TESLA_T4_VWS = 9; - /** - * Accelerator type is NVIDIA Tesla P100 Virtual Workstations. - * - * Generated from protobuf enum NVIDIA_TESLA_P100_VWS = 10; - */ - const NVIDIA_TESLA_P100_VWS = 10; - /** - * Accelerator type is NVIDIA Tesla P4 Virtual Workstations. - * - * Generated from protobuf enum NVIDIA_TESLA_P4_VWS = 11; - */ - const NVIDIA_TESLA_P4_VWS = 11; - - private static $valueToName = [ - self::ACCELERATOR_TYPE_UNSPECIFIED => 'ACCELERATOR_TYPE_UNSPECIFIED', - self::NVIDIA_TESLA_K80 => 'NVIDIA_TESLA_K80', - self::NVIDIA_TESLA_P100 => 'NVIDIA_TESLA_P100', - self::NVIDIA_TESLA_V100 => 'NVIDIA_TESLA_V100', - self::NVIDIA_TESLA_P4 => 'NVIDIA_TESLA_P4', - self::NVIDIA_TESLA_T4 => 'NVIDIA_TESLA_T4', - self::NVIDIA_TESLA_A100 => 'NVIDIA_TESLA_A100', - self::TPU_V2 => 'TPU_V2', - self::TPU_V3 => 'TPU_V3', - self::NVIDIA_TESLA_T4_VWS => 'NVIDIA_TESLA_T4_VWS', - self::NVIDIA_TESLA_P100_VWS => 'NVIDIA_TESLA_P100_VWS', - self::NVIDIA_TESLA_P4_VWS => 'NVIDIA_TESLA_P4_VWS', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(AcceleratorType::class, \Google\Cloud\Notebooks\V1\RuntimeAcceleratorConfig_AcceleratorType::class); - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/RuntimeAccessConfig.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/RuntimeAccessConfig.php deleted file mode 100644 index 48279d238329..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/RuntimeAccessConfig.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.notebooks.v1.RuntimeAccessConfig - */ -class RuntimeAccessConfig extends \Google\Protobuf\Internal\Message -{ - /** - * The type of access mode this instance. - * - * Generated from protobuf field .google.cloud.notebooks.v1.RuntimeAccessConfig.RuntimeAccessType access_type = 1; - */ - protected $access_type = 0; - /** - * The owner of this runtime after creation. Format: `alias@example.com` - * Currently supports one owner only. - * - * Generated from protobuf field string runtime_owner = 2; - */ - protected $runtime_owner = ''; - /** - * Output only. The proxy endpoint that is used to access the runtime. - * - * Generated from protobuf field string proxy_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $proxy_uri = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $access_type - * The type of access mode this instance. - * @type string $runtime_owner - * The owner of this runtime after creation. Format: `alias@example.com` - * Currently supports one owner only. - * @type string $proxy_uri - * Output only. The proxy endpoint that is used to access the runtime. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V1\Runtime::initOnce(); - parent::__construct($data); - } - - /** - * The type of access mode this instance. - * - * Generated from protobuf field .google.cloud.notebooks.v1.RuntimeAccessConfig.RuntimeAccessType access_type = 1; - * @return int - */ - public function getAccessType() - { - return $this->access_type; - } - - /** - * The type of access mode this instance. - * - * Generated from protobuf field .google.cloud.notebooks.v1.RuntimeAccessConfig.RuntimeAccessType access_type = 1; - * @param int $var - * @return $this - */ - public function setAccessType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Notebooks\V1\RuntimeAccessConfig\RuntimeAccessType::class); - $this->access_type = $var; - - return $this; - } - - /** - * The owner of this runtime after creation. Format: `alias@example.com` - * Currently supports one owner only. - * - * Generated from protobuf field string runtime_owner = 2; - * @return string - */ - public function getRuntimeOwner() - { - return $this->runtime_owner; - } - - /** - * The owner of this runtime after creation. Format: `alias@example.com` - * Currently supports one owner only. - * - * Generated from protobuf field string runtime_owner = 2; - * @param string $var - * @return $this - */ - public function setRuntimeOwner($var) - { - GPBUtil::checkString($var, True); - $this->runtime_owner = $var; - - return $this; - } - - /** - * Output only. The proxy endpoint that is used to access the runtime. - * - * Generated from protobuf field string proxy_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getProxyUri() - { - return $this->proxy_uri; - } - - /** - * Output only. The proxy endpoint that is used to access the runtime. - * - * Generated from protobuf field string proxy_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setProxyUri($var) - { - GPBUtil::checkString($var, True); - $this->proxy_uri = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/RuntimeAccessConfig/RuntimeAccessType.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/RuntimeAccessConfig/RuntimeAccessType.php deleted file mode 100644 index 4893e511e971..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/RuntimeAccessConfig/RuntimeAccessType.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.notebooks.v1.RuntimeAccessConfig.RuntimeAccessType - */ -class RuntimeAccessType -{ - /** - * Unspecified access. - * - * Generated from protobuf enum RUNTIME_ACCESS_TYPE_UNSPECIFIED = 0; - */ - const RUNTIME_ACCESS_TYPE_UNSPECIFIED = 0; - /** - * Single user login. - * - * Generated from protobuf enum SINGLE_USER = 1; - */ - const SINGLE_USER = 1; - /** - * Service Account mode. - * In Service Account mode, Runtime creator will specify a SA that exists - * in the consumer project. Using Runtime Service Account field. - * Users accessing the Runtime need ActAs (Service Account User) permission. - * - * Generated from protobuf enum SERVICE_ACCOUNT = 2; - */ - const SERVICE_ACCOUNT = 2; - - private static $valueToName = [ - self::RUNTIME_ACCESS_TYPE_UNSPECIFIED => 'RUNTIME_ACCESS_TYPE_UNSPECIFIED', - self::SINGLE_USER => 'SINGLE_USER', - self::SERVICE_ACCOUNT => 'SERVICE_ACCOUNT', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(RuntimeAccessType::class, \Google\Cloud\Notebooks\V1\RuntimeAccessConfig_RuntimeAccessType::class); - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/RuntimeMetrics.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/RuntimeMetrics.php deleted file mode 100644 index 32b134095fa0..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/RuntimeMetrics.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.notebooks.v1.RuntimeMetrics - */ -class RuntimeMetrics extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The system metrics. - * - * Generated from protobuf field map system_metrics = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $system_metrics; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\MapField $system_metrics - * Output only. The system metrics. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V1\Runtime::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The system metrics. - * - * Generated from protobuf field map system_metrics = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getSystemMetrics() - { - return $this->system_metrics; - } - - /** - * Output only. The system metrics. - * - * Generated from protobuf field map system_metrics = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setSystemMetrics($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->system_metrics = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/RuntimeShieldedInstanceConfig.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/RuntimeShieldedInstanceConfig.php deleted file mode 100644 index 278de0fa9476..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/RuntimeShieldedInstanceConfig.php +++ /dev/null @@ -1,166 +0,0 @@ -google.cloud.notebooks.v1.RuntimeShieldedInstanceConfig - */ -class RuntimeShieldedInstanceConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Defines whether the instance has Secure Boot enabled. - * Secure Boot helps ensure that the system only runs authentic software by - * verifying the digital signature of all boot components, and halting the - * boot process if signature verification fails. Disabled by default. - * - * Generated from protobuf field bool enable_secure_boot = 1; - */ - protected $enable_secure_boot = false; - /** - * Defines whether the instance has the vTPM enabled. Enabled by default. - * - * Generated from protobuf field bool enable_vtpm = 2; - */ - protected $enable_vtpm = false; - /** - * Defines whether the instance has integrity monitoring enabled. - * Enables monitoring and attestation of the boot integrity of the instance. - * The attestation is performed against the integrity policy baseline. This - * baseline is initially derived from the implicitly trusted boot image when - * the instance is created. Enabled by default. - * - * Generated from protobuf field bool enable_integrity_monitoring = 3; - */ - protected $enable_integrity_monitoring = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $enable_secure_boot - * Defines whether the instance has Secure Boot enabled. - * Secure Boot helps ensure that the system only runs authentic software by - * verifying the digital signature of all boot components, and halting the - * boot process if signature verification fails. Disabled by default. - * @type bool $enable_vtpm - * Defines whether the instance has the vTPM enabled. Enabled by default. - * @type bool $enable_integrity_monitoring - * Defines whether the instance has integrity monitoring enabled. - * Enables monitoring and attestation of the boot integrity of the instance. - * The attestation is performed against the integrity policy baseline. This - * baseline is initially derived from the implicitly trusted boot image when - * the instance is created. Enabled by default. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V1\Runtime::initOnce(); - parent::__construct($data); - } - - /** - * Defines whether the instance has Secure Boot enabled. - * Secure Boot helps ensure that the system only runs authentic software by - * verifying the digital signature of all boot components, and halting the - * boot process if signature verification fails. Disabled by default. - * - * Generated from protobuf field bool enable_secure_boot = 1; - * @return bool - */ - public function getEnableSecureBoot() - { - return $this->enable_secure_boot; - } - - /** - * Defines whether the instance has Secure Boot enabled. - * Secure Boot helps ensure that the system only runs authentic software by - * verifying the digital signature of all boot components, and halting the - * boot process if signature verification fails. Disabled by default. - * - * Generated from protobuf field bool enable_secure_boot = 1; - * @param bool $var - * @return $this - */ - public function setEnableSecureBoot($var) - { - GPBUtil::checkBool($var); - $this->enable_secure_boot = $var; - - return $this; - } - - /** - * Defines whether the instance has the vTPM enabled. Enabled by default. - * - * Generated from protobuf field bool enable_vtpm = 2; - * @return bool - */ - public function getEnableVtpm() - { - return $this->enable_vtpm; - } - - /** - * Defines whether the instance has the vTPM enabled. Enabled by default. - * - * Generated from protobuf field bool enable_vtpm = 2; - * @param bool $var - * @return $this - */ - public function setEnableVtpm($var) - { - GPBUtil::checkBool($var); - $this->enable_vtpm = $var; - - return $this; - } - - /** - * Defines whether the instance has integrity monitoring enabled. - * Enables monitoring and attestation of the boot integrity of the instance. - * The attestation is performed against the integrity policy baseline. This - * baseline is initially derived from the implicitly trusted boot image when - * the instance is created. Enabled by default. - * - * Generated from protobuf field bool enable_integrity_monitoring = 3; - * @return bool - */ - public function getEnableIntegrityMonitoring() - { - return $this->enable_integrity_monitoring; - } - - /** - * Defines whether the instance has integrity monitoring enabled. - * Enables monitoring and attestation of the boot integrity of the instance. - * The attestation is performed against the integrity policy baseline. This - * baseline is initially derived from the implicitly trusted boot image when - * the instance is created. Enabled by default. - * - * Generated from protobuf field bool enable_integrity_monitoring = 3; - * @param bool $var - * @return $this - */ - public function setEnableIntegrityMonitoring($var) - { - GPBUtil::checkBool($var); - $this->enable_integrity_monitoring = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/RuntimeSoftwareConfig.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/RuntimeSoftwareConfig.php deleted file mode 100644 index 6aff9234d908..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/RuntimeSoftwareConfig.php +++ /dev/null @@ -1,528 +0,0 @@ -google.cloud.notebooks.v1.RuntimeSoftwareConfig - */ -class RuntimeSoftwareConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Cron expression in UTC timezone, used to schedule instance auto upgrade. - * Please follow the [cron format](https://en.wikipedia.org/wiki/Cron). - * - * Generated from protobuf field string notebook_upgrade_schedule = 1; - */ - protected $notebook_upgrade_schedule = ''; - /** - * Verifies core internal services are running. - * Default: True - * - * Generated from protobuf field optional bool enable_health_monitoring = 2; - */ - protected $enable_health_monitoring = null; - /** - * Runtime will automatically shutdown after idle_shutdown_time. - * Default: True - * - * Generated from protobuf field optional bool idle_shutdown = 3; - */ - protected $idle_shutdown = null; - /** - * Time in minutes to wait before shutting down runtime. Default: 180 minutes - * - * Generated from protobuf field int32 idle_shutdown_timeout = 4; - */ - protected $idle_shutdown_timeout = 0; - /** - * Install Nvidia Driver automatically. - * Default: True - * - * Generated from protobuf field bool install_gpu_driver = 5; - */ - protected $install_gpu_driver = false; - /** - * Specify a custom Cloud Storage path where the GPU driver is stored. - * If not specified, we'll automatically choose from official GPU drivers. - * - * Generated from protobuf field string custom_gpu_driver_path = 6; - */ - protected $custom_gpu_driver_path = ''; - /** - * Path to a Bash script that automatically runs after a notebook instance - * fully boots up. The path must be a URL or - * Cloud Storage path (`gs://path-to-file/file-name`). - * - * Generated from protobuf field string post_startup_script = 7; - */ - protected $post_startup_script = ''; - /** - * Optional. Use a list of container images to use as Kernels in the notebook instance. - * - * Generated from protobuf field repeated .google.cloud.notebooks.v1.ContainerImage kernels = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $kernels; - /** - * Output only. Bool indicating whether an newer image is available in an image family. - * - * Generated from protobuf field optional bool upgradeable = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $upgradeable = null; - /** - * Behavior for the post startup script. - * - * Generated from protobuf field .google.cloud.notebooks.v1.RuntimeSoftwareConfig.PostStartupScriptBehavior post_startup_script_behavior = 10; - */ - protected $post_startup_script_behavior = 0; - /** - * Bool indicating whether JupyterLab terminal will be available or not. - * Default: False - * - * Generated from protobuf field optional bool disable_terminal = 11; - */ - protected $disable_terminal = null; - /** - * Output only. version of boot image such as M100, from release label of the image. - * - * Generated from protobuf field optional string version = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $version = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $notebook_upgrade_schedule - * Cron expression in UTC timezone, used to schedule instance auto upgrade. - * Please follow the [cron format](https://en.wikipedia.org/wiki/Cron). - * @type bool $enable_health_monitoring - * Verifies core internal services are running. - * Default: True - * @type bool $idle_shutdown - * Runtime will automatically shutdown after idle_shutdown_time. - * Default: True - * @type int $idle_shutdown_timeout - * Time in minutes to wait before shutting down runtime. Default: 180 minutes - * @type bool $install_gpu_driver - * Install Nvidia Driver automatically. - * Default: True - * @type string $custom_gpu_driver_path - * Specify a custom Cloud Storage path where the GPU driver is stored. - * If not specified, we'll automatically choose from official GPU drivers. - * @type string $post_startup_script - * Path to a Bash script that automatically runs after a notebook instance - * fully boots up. The path must be a URL or - * Cloud Storage path (`gs://path-to-file/file-name`). - * @type array<\Google\Cloud\Notebooks\V1\ContainerImage>|\Google\Protobuf\Internal\RepeatedField $kernels - * Optional. Use a list of container images to use as Kernels in the notebook instance. - * @type bool $upgradeable - * Output only. Bool indicating whether an newer image is available in an image family. - * @type int $post_startup_script_behavior - * Behavior for the post startup script. - * @type bool $disable_terminal - * Bool indicating whether JupyterLab terminal will be available or not. - * Default: False - * @type string $version - * Output only. version of boot image such as M100, from release label of the image. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V1\Runtime::initOnce(); - parent::__construct($data); - } - - /** - * Cron expression in UTC timezone, used to schedule instance auto upgrade. - * Please follow the [cron format](https://en.wikipedia.org/wiki/Cron). - * - * Generated from protobuf field string notebook_upgrade_schedule = 1; - * @return string - */ - public function getNotebookUpgradeSchedule() - { - return $this->notebook_upgrade_schedule; - } - - /** - * Cron expression in UTC timezone, used to schedule instance auto upgrade. - * Please follow the [cron format](https://en.wikipedia.org/wiki/Cron). - * - * Generated from protobuf field string notebook_upgrade_schedule = 1; - * @param string $var - * @return $this - */ - public function setNotebookUpgradeSchedule($var) - { - GPBUtil::checkString($var, True); - $this->notebook_upgrade_schedule = $var; - - return $this; - } - - /** - * Verifies core internal services are running. - * Default: True - * - * Generated from protobuf field optional bool enable_health_monitoring = 2; - * @return bool - */ - public function getEnableHealthMonitoring() - { - return isset($this->enable_health_monitoring) ? $this->enable_health_monitoring : false; - } - - public function hasEnableHealthMonitoring() - { - return isset($this->enable_health_monitoring); - } - - public function clearEnableHealthMonitoring() - { - unset($this->enable_health_monitoring); - } - - /** - * Verifies core internal services are running. - * Default: True - * - * Generated from protobuf field optional bool enable_health_monitoring = 2; - * @param bool $var - * @return $this - */ - public function setEnableHealthMonitoring($var) - { - GPBUtil::checkBool($var); - $this->enable_health_monitoring = $var; - - return $this; - } - - /** - * Runtime will automatically shutdown after idle_shutdown_time. - * Default: True - * - * Generated from protobuf field optional bool idle_shutdown = 3; - * @return bool - */ - public function getIdleShutdown() - { - return isset($this->idle_shutdown) ? $this->idle_shutdown : false; - } - - public function hasIdleShutdown() - { - return isset($this->idle_shutdown); - } - - public function clearIdleShutdown() - { - unset($this->idle_shutdown); - } - - /** - * Runtime will automatically shutdown after idle_shutdown_time. - * Default: True - * - * Generated from protobuf field optional bool idle_shutdown = 3; - * @param bool $var - * @return $this - */ - public function setIdleShutdown($var) - { - GPBUtil::checkBool($var); - $this->idle_shutdown = $var; - - return $this; - } - - /** - * Time in minutes to wait before shutting down runtime. Default: 180 minutes - * - * Generated from protobuf field int32 idle_shutdown_timeout = 4; - * @return int - */ - public function getIdleShutdownTimeout() - { - return $this->idle_shutdown_timeout; - } - - /** - * Time in minutes to wait before shutting down runtime. Default: 180 minutes - * - * Generated from protobuf field int32 idle_shutdown_timeout = 4; - * @param int $var - * @return $this - */ - public function setIdleShutdownTimeout($var) - { - GPBUtil::checkInt32($var); - $this->idle_shutdown_timeout = $var; - - return $this; - } - - /** - * Install Nvidia Driver automatically. - * Default: True - * - * Generated from protobuf field bool install_gpu_driver = 5; - * @return bool - */ - public function getInstallGpuDriver() - { - return $this->install_gpu_driver; - } - - /** - * Install Nvidia Driver automatically. - * Default: True - * - * Generated from protobuf field bool install_gpu_driver = 5; - * @param bool $var - * @return $this - */ - public function setInstallGpuDriver($var) - { - GPBUtil::checkBool($var); - $this->install_gpu_driver = $var; - - return $this; - } - - /** - * Specify a custom Cloud Storage path where the GPU driver is stored. - * If not specified, we'll automatically choose from official GPU drivers. - * - * Generated from protobuf field string custom_gpu_driver_path = 6; - * @return string - */ - public function getCustomGpuDriverPath() - { - return $this->custom_gpu_driver_path; - } - - /** - * Specify a custom Cloud Storage path where the GPU driver is stored. - * If not specified, we'll automatically choose from official GPU drivers. - * - * Generated from protobuf field string custom_gpu_driver_path = 6; - * @param string $var - * @return $this - */ - public function setCustomGpuDriverPath($var) - { - GPBUtil::checkString($var, True); - $this->custom_gpu_driver_path = $var; - - return $this; - } - - /** - * Path to a Bash script that automatically runs after a notebook instance - * fully boots up. The path must be a URL or - * Cloud Storage path (`gs://path-to-file/file-name`). - * - * Generated from protobuf field string post_startup_script = 7; - * @return string - */ - public function getPostStartupScript() - { - return $this->post_startup_script; - } - - /** - * Path to a Bash script that automatically runs after a notebook instance - * fully boots up. The path must be a URL or - * Cloud Storage path (`gs://path-to-file/file-name`). - * - * Generated from protobuf field string post_startup_script = 7; - * @param string $var - * @return $this - */ - public function setPostStartupScript($var) - { - GPBUtil::checkString($var, True); - $this->post_startup_script = $var; - - return $this; - } - - /** - * Optional. Use a list of container images to use as Kernels in the notebook instance. - * - * Generated from protobuf field repeated .google.cloud.notebooks.v1.ContainerImage kernels = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getKernels() - { - return $this->kernels; - } - - /** - * Optional. Use a list of container images to use as Kernels in the notebook instance. - * - * Generated from protobuf field repeated .google.cloud.notebooks.v1.ContainerImage kernels = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\Notebooks\V1\ContainerImage>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setKernels($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Notebooks\V1\ContainerImage::class); - $this->kernels = $arr; - - return $this; - } - - /** - * Output only. Bool indicating whether an newer image is available in an image family. - * - * Generated from protobuf field optional bool upgradeable = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getUpgradeable() - { - return isset($this->upgradeable) ? $this->upgradeable : false; - } - - public function hasUpgradeable() - { - return isset($this->upgradeable); - } - - public function clearUpgradeable() - { - unset($this->upgradeable); - } - - /** - * Output only. Bool indicating whether an newer image is available in an image family. - * - * Generated from protobuf field optional bool upgradeable = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setUpgradeable($var) - { - GPBUtil::checkBool($var); - $this->upgradeable = $var; - - return $this; - } - - /** - * Behavior for the post startup script. - * - * Generated from protobuf field .google.cloud.notebooks.v1.RuntimeSoftwareConfig.PostStartupScriptBehavior post_startup_script_behavior = 10; - * @return int - */ - public function getPostStartupScriptBehavior() - { - return $this->post_startup_script_behavior; - } - - /** - * Behavior for the post startup script. - * - * Generated from protobuf field .google.cloud.notebooks.v1.RuntimeSoftwareConfig.PostStartupScriptBehavior post_startup_script_behavior = 10; - * @param int $var - * @return $this - */ - public function setPostStartupScriptBehavior($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Notebooks\V1\RuntimeSoftwareConfig\PostStartupScriptBehavior::class); - $this->post_startup_script_behavior = $var; - - return $this; - } - - /** - * Bool indicating whether JupyterLab terminal will be available or not. - * Default: False - * - * Generated from protobuf field optional bool disable_terminal = 11; - * @return bool - */ - public function getDisableTerminal() - { - return isset($this->disable_terminal) ? $this->disable_terminal : false; - } - - public function hasDisableTerminal() - { - return isset($this->disable_terminal); - } - - public function clearDisableTerminal() - { - unset($this->disable_terminal); - } - - /** - * Bool indicating whether JupyterLab terminal will be available or not. - * Default: False - * - * Generated from protobuf field optional bool disable_terminal = 11; - * @param bool $var - * @return $this - */ - public function setDisableTerminal($var) - { - GPBUtil::checkBool($var); - $this->disable_terminal = $var; - - return $this; - } - - /** - * Output only. version of boot image such as M100, from release label of the image. - * - * Generated from protobuf field optional string version = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getVersion() - { - return isset($this->version) ? $this->version : ''; - } - - public function hasVersion() - { - return isset($this->version); - } - - public function clearVersion() - { - unset($this->version); - } - - /** - * Output only. version of boot image such as M100, from release label of the image. - * - * Generated from protobuf field optional string version = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkString($var, True); - $this->version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/RuntimeSoftwareConfig/PostStartupScriptBehavior.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/RuntimeSoftwareConfig/PostStartupScriptBehavior.php deleted file mode 100644 index 2f94ae4c207c..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/RuntimeSoftwareConfig/PostStartupScriptBehavior.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.notebooks.v1.RuntimeSoftwareConfig.PostStartupScriptBehavior - */ -class PostStartupScriptBehavior -{ - /** - * Unspecified post startup script behavior. Will run only once at creation. - * - * Generated from protobuf enum POST_STARTUP_SCRIPT_BEHAVIOR_UNSPECIFIED = 0; - */ - const POST_STARTUP_SCRIPT_BEHAVIOR_UNSPECIFIED = 0; - /** - * Runs the post startup script provided during creation at every start. - * - * Generated from protobuf enum RUN_EVERY_START = 1; - */ - const RUN_EVERY_START = 1; - /** - * Downloads and runs the provided post startup script at every start. - * - * Generated from protobuf enum DOWNLOAD_AND_RUN_EVERY_START = 2; - */ - const DOWNLOAD_AND_RUN_EVERY_START = 2; - - private static $valueToName = [ - self::POST_STARTUP_SCRIPT_BEHAVIOR_UNSPECIFIED => 'POST_STARTUP_SCRIPT_BEHAVIOR_UNSPECIFIED', - self::RUN_EVERY_START => 'RUN_EVERY_START', - self::DOWNLOAD_AND_RUN_EVERY_START => 'DOWNLOAD_AND_RUN_EVERY_START', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(PostStartupScriptBehavior::class, \Google\Cloud\Notebooks\V1\RuntimeSoftwareConfig_PostStartupScriptBehavior::class); - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Schedule.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Schedule.php deleted file mode 100644 index b71b84c1a035..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Schedule.php +++ /dev/null @@ -1,448 +0,0 @@ -google.cloud.notebooks.v1.Schedule - */ -class Schedule extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The name of this schedule. Format: - * `projects/{project_id}/locations/{location}/schedules/{schedule_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. Display name used for UI purposes. - * Name can only contain alphanumeric characters, hyphens `-`, - * and underscores `_`. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $display_name = ''; - /** - * A brief description of this environment. - * - * Generated from protobuf field string description = 3; - */ - protected $description = ''; - /** - * Generated from protobuf field .google.cloud.notebooks.v1.Schedule.State state = 4; - */ - protected $state = 0; - /** - * Cron-tab formatted schedule by which the job will execute. - * Format: minute, hour, day of month, month, day of week, - * e.g. `0 0 * * WED` = every Wednesday - * More examples: https://crontab.guru/examples.html - * - * Generated from protobuf field string cron_schedule = 5; - */ - protected $cron_schedule = ''; - /** - * Timezone on which the cron_schedule. - * The value of this field must be a time zone name from the tz database. - * TZ Database: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones - * Note that some time zones include a provision for daylight savings time. - * The rules for daylight saving time are determined by the chosen tz. - * For UTC use the string "utc". If a time zone is not specified, - * the default will be in UTC (also known as GMT). - * - * Generated from protobuf field string time_zone = 6; - */ - protected $time_zone = ''; - /** - * Output only. Time the schedule was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. Time the schedule was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Notebook Execution Template corresponding to this schedule. - * - * Generated from protobuf field .google.cloud.notebooks.v1.ExecutionTemplate execution_template = 9; - */ - protected $execution_template = null; - /** - * Output only. The most recent execution names triggered from this schedule and their - * corresponding states. - * - * Generated from protobuf field repeated .google.cloud.notebooks.v1.Execution recent_executions = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $recent_executions; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The name of this schedule. Format: - * `projects/{project_id}/locations/{location}/schedules/{schedule_id}` - * @type string $display_name - * Output only. Display name used for UI purposes. - * Name can only contain alphanumeric characters, hyphens `-`, - * and underscores `_`. - * @type string $description - * A brief description of this environment. - * @type int $state - * @type string $cron_schedule - * Cron-tab formatted schedule by which the job will execute. - * Format: minute, hour, day of month, month, day of week, - * e.g. `0 0 * * WED` = every Wednesday - * More examples: https://crontab.guru/examples.html - * @type string $time_zone - * Timezone on which the cron_schedule. - * The value of this field must be a time zone name from the tz database. - * TZ Database: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones - * Note that some time zones include a provision for daylight savings time. - * The rules for daylight saving time are determined by the chosen tz. - * For UTC use the string "utc". If a time zone is not specified, - * the default will be in UTC (also known as GMT). - * @type \Google\Protobuf\Timestamp $create_time - * Output only. Time the schedule was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. Time the schedule was last updated. - * @type \Google\Cloud\Notebooks\V1\ExecutionTemplate $execution_template - * Notebook Execution Template corresponding to this schedule. - * @type array<\Google\Cloud\Notebooks\V1\Execution>|\Google\Protobuf\Internal\RepeatedField $recent_executions - * Output only. The most recent execution names triggered from this schedule and their - * corresponding states. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V1\Schedule::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The name of this schedule. Format: - * `projects/{project_id}/locations/{location}/schedules/{schedule_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The name of this schedule. Format: - * `projects/{project_id}/locations/{location}/schedules/{schedule_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. Display name used for UI purposes. - * Name can only contain alphanumeric characters, hyphens `-`, - * and underscores `_`. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Output only. Display name used for UI purposes. - * Name can only contain alphanumeric characters, hyphens `-`, - * and underscores `_`. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * A brief description of this environment. - * - * Generated from protobuf field string description = 3; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * A brief description of this environment. - * - * Generated from protobuf field string description = 3; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Generated from protobuf field .google.cloud.notebooks.v1.Schedule.State state = 4; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Generated from protobuf field .google.cloud.notebooks.v1.Schedule.State state = 4; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Notebooks\V1\Schedule\State::class); - $this->state = $var; - - return $this; - } - - /** - * Cron-tab formatted schedule by which the job will execute. - * Format: minute, hour, day of month, month, day of week, - * e.g. `0 0 * * WED` = every Wednesday - * More examples: https://crontab.guru/examples.html - * - * Generated from protobuf field string cron_schedule = 5; - * @return string - */ - public function getCronSchedule() - { - return $this->cron_schedule; - } - - /** - * Cron-tab formatted schedule by which the job will execute. - * Format: minute, hour, day of month, month, day of week, - * e.g. `0 0 * * WED` = every Wednesday - * More examples: https://crontab.guru/examples.html - * - * Generated from protobuf field string cron_schedule = 5; - * @param string $var - * @return $this - */ - public function setCronSchedule($var) - { - GPBUtil::checkString($var, True); - $this->cron_schedule = $var; - - return $this; - } - - /** - * Timezone on which the cron_schedule. - * The value of this field must be a time zone name from the tz database. - * TZ Database: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones - * Note that some time zones include a provision for daylight savings time. - * The rules for daylight saving time are determined by the chosen tz. - * For UTC use the string "utc". If a time zone is not specified, - * the default will be in UTC (also known as GMT). - * - * Generated from protobuf field string time_zone = 6; - * @return string - */ - public function getTimeZone() - { - return $this->time_zone; - } - - /** - * Timezone on which the cron_schedule. - * The value of this field must be a time zone name from the tz database. - * TZ Database: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones - * Note that some time zones include a provision for daylight savings time. - * The rules for daylight saving time are determined by the chosen tz. - * For UTC use the string "utc". If a time zone is not specified, - * the default will be in UTC (also known as GMT). - * - * Generated from protobuf field string time_zone = 6; - * @param string $var - * @return $this - */ - public function setTimeZone($var) - { - GPBUtil::checkString($var, True); - $this->time_zone = $var; - - return $this; - } - - /** - * Output only. Time the schedule was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. Time the schedule was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. Time the schedule was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. Time the schedule was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Notebook Execution Template corresponding to this schedule. - * - * Generated from protobuf field .google.cloud.notebooks.v1.ExecutionTemplate execution_template = 9; - * @return \Google\Cloud\Notebooks\V1\ExecutionTemplate|null - */ - public function getExecutionTemplate() - { - return $this->execution_template; - } - - public function hasExecutionTemplate() - { - return isset($this->execution_template); - } - - public function clearExecutionTemplate() - { - unset($this->execution_template); - } - - /** - * Notebook Execution Template corresponding to this schedule. - * - * Generated from protobuf field .google.cloud.notebooks.v1.ExecutionTemplate execution_template = 9; - * @param \Google\Cloud\Notebooks\V1\ExecutionTemplate $var - * @return $this - */ - public function setExecutionTemplate($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V1\ExecutionTemplate::class); - $this->execution_template = $var; - - return $this; - } - - /** - * Output only. The most recent execution names triggered from this schedule and their - * corresponding states. - * - * Generated from protobuf field repeated .google.cloud.notebooks.v1.Execution recent_executions = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRecentExecutions() - { - return $this->recent_executions; - } - - /** - * Output only. The most recent execution names triggered from this schedule and their - * corresponding states. - * - * Generated from protobuf field repeated .google.cloud.notebooks.v1.Execution recent_executions = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\Notebooks\V1\Execution>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRecentExecutions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Notebooks\V1\Execution::class); - $this->recent_executions = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Schedule/State.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Schedule/State.php deleted file mode 100644 index c75aef0bb897..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/Schedule/State.php +++ /dev/null @@ -1,97 +0,0 @@ -google.cloud.notebooks.v1.Schedule.State - */ -class State -{ - /** - * Unspecified state. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The job is executing normally. - * - * Generated from protobuf enum ENABLED = 1; - */ - const ENABLED = 1; - /** - * The job is paused by the user. It will not execute. A user can - * intentionally pause the job using - * [PauseJobRequest][]. - * - * Generated from protobuf enum PAUSED = 2; - */ - const PAUSED = 2; - /** - * The job is disabled by the system due to error. The user - * cannot directly set a job to be disabled. - * - * Generated from protobuf enum DISABLED = 3; - */ - const DISABLED = 3; - /** - * The job state resulting from a failed [CloudScheduler.UpdateJob][] - * operation. To recover a job from this state, retry - * [CloudScheduler.UpdateJob][] until a successful response is received. - * - * Generated from protobuf enum UPDATE_FAILED = 4; - */ - const UPDATE_FAILED = 4; - /** - * The schedule resource is being created. - * - * Generated from protobuf enum INITIALIZING = 5; - */ - const INITIALIZING = 5; - /** - * The schedule resource is being deleted. - * - * Generated from protobuf enum DELETING = 6; - */ - const DELETING = 6; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::ENABLED => 'ENABLED', - self::PAUSED => 'PAUSED', - self::DISABLED => 'DISABLED', - self::UPDATE_FAILED => 'UPDATE_FAILED', - self::INITIALIZING => 'INITIALIZING', - self::DELETING => 'DELETING', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\Notebooks\V1\Schedule_State::class); - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/SetInstanceAcceleratorRequest.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/SetInstanceAcceleratorRequest.php deleted file mode 100644 index a8991d313283..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/SetInstanceAcceleratorRequest.php +++ /dev/null @@ -1,151 +0,0 @@ -google.cloud.notebooks.v1.SetInstanceAcceleratorRequest - */ -class SetInstanceAcceleratorRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Required. Type of this accelerator. - * - * Generated from protobuf field .google.cloud.notebooks.v1.Instance.AcceleratorType type = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $type = 0; - /** - * Required. Count of cores of this accelerator. Note that not all combinations - * of `type` and `core_count` are valid. Check [GPUs on - * Compute Engine](https://cloud.google.com/compute/docs/gpus/#gpus-list) to - * find a valid combination. TPUs are not supported. - * - * Generated from protobuf field int64 core_count = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $core_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * @type int $type - * Required. Type of this accelerator. - * @type int|string $core_count - * Required. Count of cores of this accelerator. Note that not all combinations - * of `type` and `core_count` are valid. Check [GPUs on - * Compute Engine](https://cloud.google.com/compute/docs/gpus/#gpus-list) to - * find a valid combination. TPUs are not supported. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. Type of this accelerator. - * - * Generated from protobuf field .google.cloud.notebooks.v1.Instance.AcceleratorType type = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Required. Type of this accelerator. - * - * Generated from protobuf field .google.cloud.notebooks.v1.Instance.AcceleratorType type = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Notebooks\V1\Instance\AcceleratorType::class); - $this->type = $var; - - return $this; - } - - /** - * Required. Count of cores of this accelerator. Note that not all combinations - * of `type` and `core_count` are valid. Check [GPUs on - * Compute Engine](https://cloud.google.com/compute/docs/gpus/#gpus-list) to - * find a valid combination. TPUs are not supported. - * - * Generated from protobuf field int64 core_count = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return int|string - */ - public function getCoreCount() - { - return $this->core_count; - } - - /** - * Required. Count of cores of this accelerator. Note that not all combinations - * of `type` and `core_count` are valid. Check [GPUs on - * Compute Engine](https://cloud.google.com/compute/docs/gpus/#gpus-list) to - * find a valid combination. TPUs are not supported. - * - * Generated from protobuf field int64 core_count = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param int|string $var - * @return $this - */ - public function setCoreCount($var) - { - GPBUtil::checkInt64($var); - $this->core_count = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/SetInstanceLabelsRequest.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/SetInstanceLabelsRequest.php deleted file mode 100644 index 1b05aa04ab3c..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/SetInstanceLabelsRequest.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.notebooks.v1.SetInstanceLabelsRequest - */ -class SetInstanceLabelsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Labels to apply to this instance. - * These can be later modified by the setLabels method - * - * Generated from protobuf field map labels = 2; - */ - private $labels; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * @type array|\Google\Protobuf\Internal\MapField $labels - * Labels to apply to this instance. - * These can be later modified by the setLabels method - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Labels to apply to this instance. - * These can be later modified by the setLabels method - * - * Generated from protobuf field map labels = 2; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Labels to apply to this instance. - * These can be later modified by the setLabels method - * - * Generated from protobuf field map labels = 2; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/SetInstanceMachineTypeRequest.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/SetInstanceMachineTypeRequest.php deleted file mode 100644 index 0046af14c896..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/SetInstanceMachineTypeRequest.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.notebooks.v1.SetInstanceMachineTypeRequest - */ -class SetInstanceMachineTypeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Required. The [Compute Engine machine - * type](https://cloud.google.com/compute/docs/machine-types). - * - * Generated from protobuf field string machine_type = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $machine_type = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * @type string $machine_type - * Required. The [Compute Engine machine - * type](https://cloud.google.com/compute/docs/machine-types). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. The [Compute Engine machine - * type](https://cloud.google.com/compute/docs/machine-types). - * - * Generated from protobuf field string machine_type = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getMachineType() - { - return $this->machine_type; - } - - /** - * Required. The [Compute Engine machine - * type](https://cloud.google.com/compute/docs/machine-types). - * - * Generated from protobuf field string machine_type = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setMachineType($var) - { - GPBUtil::checkString($var, True); - $this->machine_type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/StartInstanceRequest.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/StartInstanceRequest.php deleted file mode 100644 index fd0251b536cd..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/StartInstanceRequest.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.notebooks.v1.StartInstanceRequest - */ -class StartInstanceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/StartRuntimeRequest.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/StartRuntimeRequest.php deleted file mode 100644 index da0fff0d9c0f..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/StartRuntimeRequest.php +++ /dev/null @@ -1,119 +0,0 @@ -google.cloud.notebooks.v1.StartRuntimeRequest - */ -class StartRuntimeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Idempotent request UUID. - * - * Generated from protobuf field string request_id = 2; - */ - protected $request_id = ''; - - /** - * @param string $name Required. Format: - * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` - * - * @return \Google\Cloud\Notebooks\V1\StartRuntimeRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Format: - * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` - * @type string $request_id - * Idempotent request UUID. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V1\ManagedService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Idempotent request UUID. - * - * Generated from protobuf field string request_id = 2; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Idempotent request UUID. - * - * Generated from protobuf field string request_id = 2; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/StopInstanceRequest.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/StopInstanceRequest.php deleted file mode 100644 index 8ece20d7764e..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/StopInstanceRequest.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.notebooks.v1.StopInstanceRequest - */ -class StopInstanceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/StopRuntimeRequest.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/StopRuntimeRequest.php deleted file mode 100644 index 9214951474e6..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/StopRuntimeRequest.php +++ /dev/null @@ -1,119 +0,0 @@ -google.cloud.notebooks.v1.StopRuntimeRequest - */ -class StopRuntimeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Idempotent request UUID. - * - * Generated from protobuf field string request_id = 2; - */ - protected $request_id = ''; - - /** - * @param string $name Required. Format: - * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` - * - * @return \Google\Cloud\Notebooks\V1\StopRuntimeRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Format: - * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` - * @type string $request_id - * Idempotent request UUID. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V1\ManagedService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Idempotent request UUID. - * - * Generated from protobuf field string request_id = 2; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Idempotent request UUID. - * - * Generated from protobuf field string request_id = 2; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/SwitchRuntimeRequest.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/SwitchRuntimeRequest.php deleted file mode 100644 index 7b9edc1008cc..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/SwitchRuntimeRequest.php +++ /dev/null @@ -1,197 +0,0 @@ -google.cloud.notebooks.v1.SwitchRuntimeRequest - */ -class SwitchRuntimeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * machine type. - * - * Generated from protobuf field string machine_type = 2; - */ - protected $machine_type = ''; - /** - * accelerator config. - * - * Generated from protobuf field .google.cloud.notebooks.v1.RuntimeAcceleratorConfig accelerator_config = 3; - */ - protected $accelerator_config = null; - /** - * Idempotent request UUID. - * - * Generated from protobuf field string request_id = 4; - */ - protected $request_id = ''; - - /** - * @param string $name Required. Format: - * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` - * - * @return \Google\Cloud\Notebooks\V1\SwitchRuntimeRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Format: - * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` - * @type string $machine_type - * machine type. - * @type \Google\Cloud\Notebooks\V1\RuntimeAcceleratorConfig $accelerator_config - * accelerator config. - * @type string $request_id - * Idempotent request UUID. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V1\ManagedService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * machine type. - * - * Generated from protobuf field string machine_type = 2; - * @return string - */ - public function getMachineType() - { - return $this->machine_type; - } - - /** - * machine type. - * - * Generated from protobuf field string machine_type = 2; - * @param string $var - * @return $this - */ - public function setMachineType($var) - { - GPBUtil::checkString($var, True); - $this->machine_type = $var; - - return $this; - } - - /** - * accelerator config. - * - * Generated from protobuf field .google.cloud.notebooks.v1.RuntimeAcceleratorConfig accelerator_config = 3; - * @return \Google\Cloud\Notebooks\V1\RuntimeAcceleratorConfig|null - */ - public function getAcceleratorConfig() - { - return $this->accelerator_config; - } - - public function hasAcceleratorConfig() - { - return isset($this->accelerator_config); - } - - public function clearAcceleratorConfig() - { - unset($this->accelerator_config); - } - - /** - * accelerator config. - * - * Generated from protobuf field .google.cloud.notebooks.v1.RuntimeAcceleratorConfig accelerator_config = 3; - * @param \Google\Cloud\Notebooks\V1\RuntimeAcceleratorConfig $var - * @return $this - */ - public function setAcceleratorConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V1\RuntimeAcceleratorConfig::class); - $this->accelerator_config = $var; - - return $this; - } - - /** - * Idempotent request UUID. - * - * Generated from protobuf field string request_id = 4; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Idempotent request UUID. - * - * Generated from protobuf field string request_id = 4; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/TriggerScheduleRequest.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/TriggerScheduleRequest.php deleted file mode 100644 index c3e6b514d541..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/TriggerScheduleRequest.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.notebooks.v1.TriggerScheduleRequest - */ -class TriggerScheduleRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Format: - * `parent=projects/{project_id}/locations/{location}/schedules/{schedule_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Format: - * `parent=projects/{project_id}/locations/{location}/schedules/{schedule_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. Format: - * `parent=projects/{project_id}/locations/{location}/schedules/{schedule_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Format: - * `parent=projects/{project_id}/locations/{location}/schedules/{schedule_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/UpdateInstanceConfigRequest.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/UpdateInstanceConfigRequest.php deleted file mode 100644 index 2078a1ee9c1a..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/UpdateInstanceConfigRequest.php +++ /dev/null @@ -1,115 +0,0 @@ -google.cloud.notebooks.v1.UpdateInstanceConfigRequest - */ -class UpdateInstanceConfigRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * The instance configurations to be updated. - * - * Generated from protobuf field .google.cloud.notebooks.v1.InstanceConfig config = 2; - */ - protected $config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * @type \Google\Cloud\Notebooks\V1\InstanceConfig $config - * The instance configurations to be updated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The instance configurations to be updated. - * - * Generated from protobuf field .google.cloud.notebooks.v1.InstanceConfig config = 2; - * @return \Google\Cloud\Notebooks\V1\InstanceConfig|null - */ - public function getConfig() - { - return $this->config; - } - - public function hasConfig() - { - return isset($this->config); - } - - public function clearConfig() - { - unset($this->config); - } - - /** - * The instance configurations to be updated. - * - * Generated from protobuf field .google.cloud.notebooks.v1.InstanceConfig config = 2; - * @param \Google\Cloud\Notebooks\V1\InstanceConfig $var - * @return $this - */ - public function setConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V1\InstanceConfig::class); - $this->config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/UpdateInstanceMetadataItemsRequest.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/UpdateInstanceMetadataItemsRequest.php deleted file mode 100644 index 397f1889d94f..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/UpdateInstanceMetadataItemsRequest.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.notebooks.v1.UpdateInstanceMetadataItemsRequest - */ -class UpdateInstanceMetadataItemsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Metadata items to add/update for the instance. - * - * Generated from protobuf field map items = 2; - */ - private $items; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * @type array|\Google\Protobuf\Internal\MapField $items - * Metadata items to add/update for the instance. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Metadata items to add/update for the instance. - * - * Generated from protobuf field map items = 2; - * @return \Google\Protobuf\Internal\MapField - */ - public function getItems() - { - return $this->items; - } - - /** - * Metadata items to add/update for the instance. - * - * Generated from protobuf field map items = 2; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setItems($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->items = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/UpdateInstanceMetadataItemsResponse.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/UpdateInstanceMetadataItemsResponse.php deleted file mode 100644 index 4ac62442669d..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/UpdateInstanceMetadataItemsResponse.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.notebooks.v1.UpdateInstanceMetadataItemsResponse - */ -class UpdateInstanceMetadataItemsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Map of items that were added/updated to/in the metadata. - * - * Generated from protobuf field map items = 1; - */ - private $items; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\MapField $items - * Map of items that were added/updated to/in the metadata. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Map of items that were added/updated to/in the metadata. - * - * Generated from protobuf field map items = 1; - * @return \Google\Protobuf\Internal\MapField - */ - public function getItems() - { - return $this->items; - } - - /** - * Map of items that were added/updated to/in the metadata. - * - * Generated from protobuf field map items = 1; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setItems($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->items = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/UpdateRuntimeRequest.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/UpdateRuntimeRequest.php deleted file mode 100644 index a91ad274204a..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/UpdateRuntimeRequest.php +++ /dev/null @@ -1,268 +0,0 @@ -google.cloud.notebooks.v1.UpdateRuntimeRequest - */ -class UpdateRuntimeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The Runtime to be updated. - * - * Generated from protobuf field .google.cloud.notebooks.v1.Runtime runtime = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $runtime = null; - /** - * Required. Specifies the path, relative to `Runtime`, of - * the field to update. For example, to change the software configuration - * kernels, the `update_mask` parameter would be - * specified as `software_config.kernels`, - * and the `PATCH` request body would specify the new value, as follows: - * { - * "software_config":{ - * "kernels": [{ - * 'repository': - * 'gcr.io/deeplearning-platform-release/pytorch-gpu', 'tag': - * 'latest' }], - * } - * } - * Currently, only the following fields can be updated: - * - `software_config.kernels` - * - `software_config.post_startup_script` - * - `software_config.custom_gpu_driver_path` - * - `software_config.idle_shutdown` - * - `software_config.idle_shutdown_timeout` - * - `software_config.disable_terminal` - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * Idempotent request UUID. - * - * Generated from protobuf field string request_id = 3; - */ - protected $request_id = ''; - - /** - * @param \Google\Cloud\Notebooks\V1\Runtime $runtime Required. The Runtime to be updated. - * @param \Google\Protobuf\FieldMask $updateMask Required. Specifies the path, relative to `Runtime`, of - * the field to update. For example, to change the software configuration - * kernels, the `update_mask` parameter would be - * specified as `software_config.kernels`, - * and the `PATCH` request body would specify the new value, as follows: - * - * { - * "software_config":{ - * "kernels": [{ - * 'repository': - * 'gcr.io/deeplearning-platform-release/pytorch-gpu', 'tag': - * 'latest' }], - * } - * } - * - * - * Currently, only the following fields can be updated: - * - `software_config.kernels` - * - `software_config.post_startup_script` - * - `software_config.custom_gpu_driver_path` - * - `software_config.idle_shutdown` - * - `software_config.idle_shutdown_timeout` - * - `software_config.disable_terminal` - * - * @return \Google\Cloud\Notebooks\V1\UpdateRuntimeRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Notebooks\V1\Runtime $runtime, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setRuntime($runtime) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Notebooks\V1\Runtime $runtime - * Required. The Runtime to be updated. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Specifies the path, relative to `Runtime`, of - * the field to update. For example, to change the software configuration - * kernels, the `update_mask` parameter would be - * specified as `software_config.kernels`, - * and the `PATCH` request body would specify the new value, as follows: - * { - * "software_config":{ - * "kernels": [{ - * 'repository': - * 'gcr.io/deeplearning-platform-release/pytorch-gpu', 'tag': - * 'latest' }], - * } - * } - * Currently, only the following fields can be updated: - * - `software_config.kernels` - * - `software_config.post_startup_script` - * - `software_config.custom_gpu_driver_path` - * - `software_config.idle_shutdown` - * - `software_config.idle_shutdown_timeout` - * - `software_config.disable_terminal` - * @type string $request_id - * Idempotent request UUID. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V1\ManagedService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The Runtime to be updated. - * - * Generated from protobuf field .google.cloud.notebooks.v1.Runtime runtime = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Notebooks\V1\Runtime|null - */ - public function getRuntime() - { - return $this->runtime; - } - - public function hasRuntime() - { - return isset($this->runtime); - } - - public function clearRuntime() - { - unset($this->runtime); - } - - /** - * Required. The Runtime to be updated. - * - * Generated from protobuf field .google.cloud.notebooks.v1.Runtime runtime = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Notebooks\V1\Runtime $var - * @return $this - */ - public function setRuntime($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V1\Runtime::class); - $this->runtime = $var; - - return $this; - } - - /** - * Required. Specifies the path, relative to `Runtime`, of - * the field to update. For example, to change the software configuration - * kernels, the `update_mask` parameter would be - * specified as `software_config.kernels`, - * and the `PATCH` request body would specify the new value, as follows: - * { - * "software_config":{ - * "kernels": [{ - * 'repository': - * 'gcr.io/deeplearning-platform-release/pytorch-gpu', 'tag': - * 'latest' }], - * } - * } - * Currently, only the following fields can be updated: - * - `software_config.kernels` - * - `software_config.post_startup_script` - * - `software_config.custom_gpu_driver_path` - * - `software_config.idle_shutdown` - * - `software_config.idle_shutdown_timeout` - * - `software_config.disable_terminal` - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Required. Specifies the path, relative to `Runtime`, of - * the field to update. For example, to change the software configuration - * kernels, the `update_mask` parameter would be - * specified as `software_config.kernels`, - * and the `PATCH` request body would specify the new value, as follows: - * { - * "software_config":{ - * "kernels": [{ - * 'repository': - * 'gcr.io/deeplearning-platform-release/pytorch-gpu', 'tag': - * 'latest' }], - * } - * } - * Currently, only the following fields can be updated: - * - `software_config.kernels` - * - `software_config.post_startup_script` - * - `software_config.custom_gpu_driver_path` - * - `software_config.idle_shutdown` - * - `software_config.idle_shutdown_timeout` - * - `software_config.disable_terminal` - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * Idempotent request UUID. - * - * Generated from protobuf field string request_id = 3; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Idempotent request UUID. - * - * Generated from protobuf field string request_id = 3; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/UpdateShieldedInstanceConfigRequest.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/UpdateShieldedInstanceConfigRequest.php deleted file mode 100644 index 7c09308bcf3c..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/UpdateShieldedInstanceConfigRequest.php +++ /dev/null @@ -1,116 +0,0 @@ -google.cloud.notebooks.v1.UpdateShieldedInstanceConfigRequest - */ -class UpdateShieldedInstanceConfigRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * ShieldedInstance configuration to be updated. - * - * Generated from protobuf field .google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig shielded_instance_config = 2; - */ - protected $shielded_instance_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * @type \Google\Cloud\Notebooks\V1\Instance\ShieldedInstanceConfig $shielded_instance_config - * ShieldedInstance configuration to be updated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * ShieldedInstance configuration to be updated. - * - * Generated from protobuf field .google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig shielded_instance_config = 2; - * @return \Google\Cloud\Notebooks\V1\Instance\ShieldedInstanceConfig|null - */ - public function getShieldedInstanceConfig() - { - return $this->shielded_instance_config; - } - - public function hasShieldedInstanceConfig() - { - return isset($this->shielded_instance_config); - } - - public function clearShieldedInstanceConfig() - { - unset($this->shielded_instance_config); - } - - /** - * ShieldedInstance configuration to be updated. - * - * Generated from protobuf field .google.cloud.notebooks.v1.Instance.ShieldedInstanceConfig shielded_instance_config = 2; - * @param \Google\Cloud\Notebooks\V1\Instance\ShieldedInstanceConfig $var - * @return $this - */ - public function setShieldedInstanceConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V1\Instance\ShieldedInstanceConfig::class); - $this->shielded_instance_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/UpgradeInstanceInternalRequest.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/UpgradeInstanceInternalRequest.php deleted file mode 100644 index 583a3256c765..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/UpgradeInstanceInternalRequest.php +++ /dev/null @@ -1,147 +0,0 @@ -google.cloud.notebooks.v1.UpgradeInstanceInternalRequest - */ -class UpgradeInstanceInternalRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Required. The VM hardware token for authenticating the VM. - * https://cloud.google.com/compute/docs/instances/verifying-instance-identity - * - * Generated from protobuf field string vm_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $vm_id = ''; - /** - * Optional. The optional UpgradeType. Setting this field will search for additional - * compute images to upgrade this instance. - * - * Generated from protobuf field .google.cloud.notebooks.v1.UpgradeType type = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $type = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * @type string $vm_id - * Required. The VM hardware token for authenticating the VM. - * https://cloud.google.com/compute/docs/instances/verifying-instance-identity - * @type int $type - * Optional. The optional UpgradeType. Setting this field will search for additional - * compute images to upgrade this instance. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. The VM hardware token for authenticating the VM. - * https://cloud.google.com/compute/docs/instances/verifying-instance-identity - * - * Generated from protobuf field string vm_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getVmId() - { - return $this->vm_id; - } - - /** - * Required. The VM hardware token for authenticating the VM. - * https://cloud.google.com/compute/docs/instances/verifying-instance-identity - * - * Generated from protobuf field string vm_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setVmId($var) - { - GPBUtil::checkString($var, True); - $this->vm_id = $var; - - return $this; - } - - /** - * Optional. The optional UpgradeType. Setting this field will search for additional - * compute images to upgrade this instance. - * - * Generated from protobuf field .google.cloud.notebooks.v1.UpgradeType type = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Optional. The optional UpgradeType. Setting this field will search for additional - * compute images to upgrade this instance. - * - * Generated from protobuf field .google.cloud.notebooks.v1.UpgradeType type = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Notebooks\V1\UpgradeType::class); - $this->type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/UpgradeInstanceRequest.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/UpgradeInstanceRequest.php deleted file mode 100644 index 16e89def7081..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/UpgradeInstanceRequest.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.notebooks.v1.UpgradeInstanceRequest - */ -class UpgradeInstanceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Optional. The optional UpgradeType. Setting this field will search for additional - * compute images to upgrade this instance. - * - * Generated from protobuf field .google.cloud.notebooks.v1.UpgradeType type = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $type = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * @type int $type - * Optional. The optional UpgradeType. Setting this field will search for additional - * compute images to upgrade this instance. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V1\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. The optional UpgradeType. Setting this field will search for additional - * compute images to upgrade this instance. - * - * Generated from protobuf field .google.cloud.notebooks.v1.UpgradeType type = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Optional. The optional UpgradeType. Setting this field will search for additional - * compute images to upgrade this instance. - * - * Generated from protobuf field .google.cloud.notebooks.v1.UpgradeType type = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Notebooks\V1\UpgradeType::class); - $this->type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/UpgradeRuntimeRequest.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/UpgradeRuntimeRequest.php deleted file mode 100644 index 019158ec9b8d..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/UpgradeRuntimeRequest.php +++ /dev/null @@ -1,121 +0,0 @@ -google.cloud.notebooks.v1.UpgradeRuntimeRequest - */ -class UpgradeRuntimeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Idempotent request UUID. - * - * Generated from protobuf field string request_id = 2; - */ - protected $request_id = ''; - - /** - * @param string $name Required. Format: - * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` - * - * @return \Google\Cloud\Notebooks\V1\UpgradeRuntimeRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Format: - * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` - * @type string $request_id - * Idempotent request UUID. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V1\ManagedService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/runtimes/{runtime_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Idempotent request UUID. - * - * Generated from protobuf field string request_id = 2; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Idempotent request UUID. - * - * Generated from protobuf field string request_id = 2; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/UpgradeType.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/UpgradeType.php deleted file mode 100644 index 8026bbb702eb..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/UpgradeType.php +++ /dev/null @@ -1,76 +0,0 @@ -google.cloud.notebooks.v1.UpgradeType - */ -class UpgradeType -{ - /** - * Upgrade type is not specified. - * - * Generated from protobuf enum UPGRADE_TYPE_UNSPECIFIED = 0; - */ - const UPGRADE_TYPE_UNSPECIFIED = 0; - /** - * Upgrade ML framework. - * - * Generated from protobuf enum UPGRADE_FRAMEWORK = 1; - */ - const UPGRADE_FRAMEWORK = 1; - /** - * Upgrade Operating System. - * - * Generated from protobuf enum UPGRADE_OS = 2; - */ - const UPGRADE_OS = 2; - /** - * Upgrade CUDA. - * - * Generated from protobuf enum UPGRADE_CUDA = 3; - */ - const UPGRADE_CUDA = 3; - /** - * Upgrade All (OS, Framework and CUDA). - * - * Generated from protobuf enum UPGRADE_ALL = 4; - */ - const UPGRADE_ALL = 4; - - private static $valueToName = [ - self::UPGRADE_TYPE_UNSPECIFIED => 'UPGRADE_TYPE_UNSPECIFIED', - self::UPGRADE_FRAMEWORK => 'UPGRADE_FRAMEWORK', - self::UPGRADE_OS => 'UPGRADE_OS', - self::UPGRADE_CUDA => 'UPGRADE_CUDA', - self::UPGRADE_ALL => 'UPGRADE_ALL', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/VirtualMachine.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/VirtualMachine.php deleted file mode 100644 index 7f76639f36dc..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/VirtualMachine.php +++ /dev/null @@ -1,145 +0,0 @@ -google.cloud.notebooks.v1.VirtualMachine - */ -class VirtualMachine extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The user-friendly name of the Managed Compute Engine instance. - * - * Generated from protobuf field string instance_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $instance_name = ''; - /** - * Output only. The unique identifier of the Managed Compute Engine instance. - * - * Generated from protobuf field string instance_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $instance_id = ''; - /** - * Virtual Machine configuration settings. - * - * Generated from protobuf field .google.cloud.notebooks.v1.VirtualMachineConfig virtual_machine_config = 3; - */ - protected $virtual_machine_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $instance_name - * Output only. The user-friendly name of the Managed Compute Engine instance. - * @type string $instance_id - * Output only. The unique identifier of the Managed Compute Engine instance. - * @type \Google\Cloud\Notebooks\V1\VirtualMachineConfig $virtual_machine_config - * Virtual Machine configuration settings. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V1\Runtime::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The user-friendly name of the Managed Compute Engine instance. - * - * Generated from protobuf field string instance_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getInstanceName() - { - return $this->instance_name; - } - - /** - * Output only. The user-friendly name of the Managed Compute Engine instance. - * - * Generated from protobuf field string instance_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setInstanceName($var) - { - GPBUtil::checkString($var, True); - $this->instance_name = $var; - - return $this; - } - - /** - * Output only. The unique identifier of the Managed Compute Engine instance. - * - * Generated from protobuf field string instance_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getInstanceId() - { - return $this->instance_id; - } - - /** - * Output only. The unique identifier of the Managed Compute Engine instance. - * - * Generated from protobuf field string instance_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setInstanceId($var) - { - GPBUtil::checkString($var, True); - $this->instance_id = $var; - - return $this; - } - - /** - * Virtual Machine configuration settings. - * - * Generated from protobuf field .google.cloud.notebooks.v1.VirtualMachineConfig virtual_machine_config = 3; - * @return \Google\Cloud\Notebooks\V1\VirtualMachineConfig|null - */ - public function getVirtualMachineConfig() - { - return $this->virtual_machine_config; - } - - public function hasVirtualMachineConfig() - { - return isset($this->virtual_machine_config); - } - - public function clearVirtualMachineConfig() - { - unset($this->virtual_machine_config); - } - - /** - * Virtual Machine configuration settings. - * - * Generated from protobuf field .google.cloud.notebooks.v1.VirtualMachineConfig virtual_machine_config = 3; - * @param \Google\Cloud\Notebooks\V1\VirtualMachineConfig $var - * @return $this - */ - public function setVirtualMachineConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V1\VirtualMachineConfig::class); - $this->virtual_machine_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/VirtualMachineConfig.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/VirtualMachineConfig.php deleted file mode 100644 index b4298431489c..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/VirtualMachineConfig.php +++ /dev/null @@ -1,873 +0,0 @@ -google.cloud.notebooks.v1.VirtualMachineConfig - */ -class VirtualMachineConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The zone where the virtual machine is located. - * If using regional request, the notebooks service will pick a location - * in the corresponding runtime region. - * On a get request, zone will always be present. Example: - * * `us-central1-b` - * - * Generated from protobuf field string zone = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $zone = ''; - /** - * Required. The Compute Engine machine type used for runtimes. - * Short name is valid. Examples: - * * `n1-standard-2` - * * `e2-standard-8` - * - * Generated from protobuf field string machine_type = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $machine_type = ''; - /** - * Optional. Use a list of container images to use as Kernels in the notebook instance. - * - * Generated from protobuf field repeated .google.cloud.notebooks.v1.ContainerImage container_images = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $container_images; - /** - * Required. Data disk option configuration settings. - * - * Generated from protobuf field .google.cloud.notebooks.v1.LocalDisk data_disk = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $data_disk = null; - /** - * Optional. Encryption settings for virtual machine data disk. - * - * Generated from protobuf field .google.cloud.notebooks.v1.EncryptionConfig encryption_config = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $encryption_config = null; - /** - * Optional. Shielded VM Instance configuration settings. - * - * Generated from protobuf field .google.cloud.notebooks.v1.RuntimeShieldedInstanceConfig shielded_instance_config = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $shielded_instance_config = null; - /** - * Optional. The Compute Engine accelerator configuration for this runtime. - * - * Generated from protobuf field .google.cloud.notebooks.v1.RuntimeAcceleratorConfig accelerator_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $accelerator_config = null; - /** - * Optional. The Compute Engine network to be used for machine - * communications. Cannot be specified with subnetwork. If neither - * `network` nor `subnet` is specified, the "default" network of - * the project is used, if it exists. - * A full URL or partial URI. Examples: - * * `https://www.googleapis.com/compute/v1/projects/[project_id]/global/networks/default` - * * `projects/[project_id]/global/networks/default` - * Runtimes are managed resources inside Google Infrastructure. - * Runtimes support the following network configurations: - * * Google Managed Network (Network & subnet are empty) - * * Consumer Project VPC (network & subnet are required). Requires - * configuring Private Service Access. - * * Shared VPC (network & subnet are required). Requires configuring Private - * Service Access. - * - * Generated from protobuf field string network = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $network = ''; - /** - * Optional. The Compute Engine subnetwork to be used for machine - * communications. Cannot be specified with network. - * A full URL or partial URI are valid. Examples: - * * `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/us-east1/subnetworks/sub0` - * * `projects/[project_id]/regions/us-east1/subnetworks/sub0` - * - * Generated from protobuf field string subnet = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $subnet = ''; - /** - * Optional. If true, runtime will only have internal IP - * addresses. By default, runtimes are not restricted to internal IP - * addresses, and will have ephemeral external IP addresses assigned to each - * vm. This `internal_ip_only` restriction can only be enabled for - * subnetwork enabled networks, and all dependencies must be - * configured to be accessible without external IP addresses. - * - * Generated from protobuf field bool internal_ip_only = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $internal_ip_only = false; - /** - * Optional. The Compute Engine tags to add to runtime (see [Tagging - * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)). - * - * Generated from protobuf field repeated string tags = 13 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $tags; - /** - * Output only. The Compute Engine guest attributes. (see - * [Project and instance - * guest - * attributes](https://cloud.google.com/compute/docs/storing-retrieving-metadata#guest_attributes)). - * - * Generated from protobuf field map guest_attributes = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $guest_attributes; - /** - * Optional. The Compute Engine metadata entries to add to virtual machine. (see - * [Project and instance - * metadata](https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)). - * - * Generated from protobuf field map metadata = 15 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $metadata; - /** - * Optional. The labels to associate with this runtime. - * Label **keys** must contain 1 to 63 characters, and must conform to - * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). - * Label **values** may be empty, but, if present, must contain 1 to 63 - * characters, and must conform to [RFC - * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be - * associated with a cluster. - * - * Generated from protobuf field map labels = 16 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - /** - * Optional. The type of vNIC to be used on this interface. This may be gVNIC or - * VirtioNet. - * - * Generated from protobuf field .google.cloud.notebooks.v1.VirtualMachineConfig.NicType nic_type = 17 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $nic_type = 0; - /** - * Optional. Reserved IP Range name is used for VPC Peering. - * The subnetwork allocation will use the range *name* if it's assigned. - * Example: managed-notebooks-range-c - * PEERING_RANGE_NAME_3=managed-notebooks-range-c - * gcloud compute addresses create $PEERING_RANGE_NAME_3 \ - * --global \ - * --prefix-length=24 \ - * --description="Google Cloud Managed Notebooks Range 24 c" \ - * --network=$NETWORK \ - * --addresses=192.168.0.0 \ - * --purpose=VPC_PEERING - * Field value will be: `managed-notebooks-range-c` - * - * Generated from protobuf field string reserved_ip_range = 18 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $reserved_ip_range = ''; - /** - * Optional. Boot image metadata used for runtime upgradeability. - * - * Generated from protobuf field .google.cloud.notebooks.v1.VirtualMachineConfig.BootImage boot_image = 19 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $boot_image = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $zone - * Output only. The zone where the virtual machine is located. - * If using regional request, the notebooks service will pick a location - * in the corresponding runtime region. - * On a get request, zone will always be present. Example: - * * `us-central1-b` - * @type string $machine_type - * Required. The Compute Engine machine type used for runtimes. - * Short name is valid. Examples: - * * `n1-standard-2` - * * `e2-standard-8` - * @type array<\Google\Cloud\Notebooks\V1\ContainerImage>|\Google\Protobuf\Internal\RepeatedField $container_images - * Optional. Use a list of container images to use as Kernels in the notebook instance. - * @type \Google\Cloud\Notebooks\V1\LocalDisk $data_disk - * Required. Data disk option configuration settings. - * @type \Google\Cloud\Notebooks\V1\EncryptionConfig $encryption_config - * Optional. Encryption settings for virtual machine data disk. - * @type \Google\Cloud\Notebooks\V1\RuntimeShieldedInstanceConfig $shielded_instance_config - * Optional. Shielded VM Instance configuration settings. - * @type \Google\Cloud\Notebooks\V1\RuntimeAcceleratorConfig $accelerator_config - * Optional. The Compute Engine accelerator configuration for this runtime. - * @type string $network - * Optional. The Compute Engine network to be used for machine - * communications. Cannot be specified with subnetwork. If neither - * `network` nor `subnet` is specified, the "default" network of - * the project is used, if it exists. - * A full URL or partial URI. Examples: - * * `https://www.googleapis.com/compute/v1/projects/[project_id]/global/networks/default` - * * `projects/[project_id]/global/networks/default` - * Runtimes are managed resources inside Google Infrastructure. - * Runtimes support the following network configurations: - * * Google Managed Network (Network & subnet are empty) - * * Consumer Project VPC (network & subnet are required). Requires - * configuring Private Service Access. - * * Shared VPC (network & subnet are required). Requires configuring Private - * Service Access. - * @type string $subnet - * Optional. The Compute Engine subnetwork to be used for machine - * communications. Cannot be specified with network. - * A full URL or partial URI are valid. Examples: - * * `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/us-east1/subnetworks/sub0` - * * `projects/[project_id]/regions/us-east1/subnetworks/sub0` - * @type bool $internal_ip_only - * Optional. If true, runtime will only have internal IP - * addresses. By default, runtimes are not restricted to internal IP - * addresses, and will have ephemeral external IP addresses assigned to each - * vm. This `internal_ip_only` restriction can only be enabled for - * subnetwork enabled networks, and all dependencies must be - * configured to be accessible without external IP addresses. - * @type array|\Google\Protobuf\Internal\RepeatedField $tags - * Optional. The Compute Engine tags to add to runtime (see [Tagging - * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)). - * @type array|\Google\Protobuf\Internal\MapField $guest_attributes - * Output only. The Compute Engine guest attributes. (see - * [Project and instance - * guest - * attributes](https://cloud.google.com/compute/docs/storing-retrieving-metadata#guest_attributes)). - * @type array|\Google\Protobuf\Internal\MapField $metadata - * Optional. The Compute Engine metadata entries to add to virtual machine. (see - * [Project and instance - * metadata](https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)). - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. The labels to associate with this runtime. - * Label **keys** must contain 1 to 63 characters, and must conform to - * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). - * Label **values** may be empty, but, if present, must contain 1 to 63 - * characters, and must conform to [RFC - * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be - * associated with a cluster. - * @type int $nic_type - * Optional. The type of vNIC to be used on this interface. This may be gVNIC or - * VirtioNet. - * @type string $reserved_ip_range - * Optional. Reserved IP Range name is used for VPC Peering. - * The subnetwork allocation will use the range *name* if it's assigned. - * Example: managed-notebooks-range-c - * PEERING_RANGE_NAME_3=managed-notebooks-range-c - * gcloud compute addresses create $PEERING_RANGE_NAME_3 \ - * --global \ - * --prefix-length=24 \ - * --description="Google Cloud Managed Notebooks Range 24 c" \ - * --network=$NETWORK \ - * --addresses=192.168.0.0 \ - * --purpose=VPC_PEERING - * Field value will be: `managed-notebooks-range-c` - * @type \Google\Cloud\Notebooks\V1\VirtualMachineConfig\BootImage $boot_image - * Optional. Boot image metadata used for runtime upgradeability. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V1\Runtime::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The zone where the virtual machine is located. - * If using regional request, the notebooks service will pick a location - * in the corresponding runtime region. - * On a get request, zone will always be present. Example: - * * `us-central1-b` - * - * Generated from protobuf field string zone = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getZone() - { - return $this->zone; - } - - /** - * Output only. The zone where the virtual machine is located. - * If using regional request, the notebooks service will pick a location - * in the corresponding runtime region. - * On a get request, zone will always be present. Example: - * * `us-central1-b` - * - * Generated from protobuf field string zone = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setZone($var) - { - GPBUtil::checkString($var, True); - $this->zone = $var; - - return $this; - } - - /** - * Required. The Compute Engine machine type used for runtimes. - * Short name is valid. Examples: - * * `n1-standard-2` - * * `e2-standard-8` - * - * Generated from protobuf field string machine_type = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getMachineType() - { - return $this->machine_type; - } - - /** - * Required. The Compute Engine machine type used for runtimes. - * Short name is valid. Examples: - * * `n1-standard-2` - * * `e2-standard-8` - * - * Generated from protobuf field string machine_type = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setMachineType($var) - { - GPBUtil::checkString($var, True); - $this->machine_type = $var; - - return $this; - } - - /** - * Optional. Use a list of container images to use as Kernels in the notebook instance. - * - * Generated from protobuf field repeated .google.cloud.notebooks.v1.ContainerImage container_images = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getContainerImages() - { - return $this->container_images; - } - - /** - * Optional. Use a list of container images to use as Kernels in the notebook instance. - * - * Generated from protobuf field repeated .google.cloud.notebooks.v1.ContainerImage container_images = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\Notebooks\V1\ContainerImage>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setContainerImages($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Notebooks\V1\ContainerImage::class); - $this->container_images = $arr; - - return $this; - } - - /** - * Required. Data disk option configuration settings. - * - * Generated from protobuf field .google.cloud.notebooks.v1.LocalDisk data_disk = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Notebooks\V1\LocalDisk|null - */ - public function getDataDisk() - { - return $this->data_disk; - } - - public function hasDataDisk() - { - return isset($this->data_disk); - } - - public function clearDataDisk() - { - unset($this->data_disk); - } - - /** - * Required. Data disk option configuration settings. - * - * Generated from protobuf field .google.cloud.notebooks.v1.LocalDisk data_disk = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Notebooks\V1\LocalDisk $var - * @return $this - */ - public function setDataDisk($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V1\LocalDisk::class); - $this->data_disk = $var; - - return $this; - } - - /** - * Optional. Encryption settings for virtual machine data disk. - * - * Generated from protobuf field .google.cloud.notebooks.v1.EncryptionConfig encryption_config = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Notebooks\V1\EncryptionConfig|null - */ - public function getEncryptionConfig() - { - return $this->encryption_config; - } - - public function hasEncryptionConfig() - { - return isset($this->encryption_config); - } - - public function clearEncryptionConfig() - { - unset($this->encryption_config); - } - - /** - * Optional. Encryption settings for virtual machine data disk. - * - * Generated from protobuf field .google.cloud.notebooks.v1.EncryptionConfig encryption_config = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Notebooks\V1\EncryptionConfig $var - * @return $this - */ - public function setEncryptionConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V1\EncryptionConfig::class); - $this->encryption_config = $var; - - return $this; - } - - /** - * Optional. Shielded VM Instance configuration settings. - * - * Generated from protobuf field .google.cloud.notebooks.v1.RuntimeShieldedInstanceConfig shielded_instance_config = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Notebooks\V1\RuntimeShieldedInstanceConfig|null - */ - public function getShieldedInstanceConfig() - { - return $this->shielded_instance_config; - } - - public function hasShieldedInstanceConfig() - { - return isset($this->shielded_instance_config); - } - - public function clearShieldedInstanceConfig() - { - unset($this->shielded_instance_config); - } - - /** - * Optional. Shielded VM Instance configuration settings. - * - * Generated from protobuf field .google.cloud.notebooks.v1.RuntimeShieldedInstanceConfig shielded_instance_config = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Notebooks\V1\RuntimeShieldedInstanceConfig $var - * @return $this - */ - public function setShieldedInstanceConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V1\RuntimeShieldedInstanceConfig::class); - $this->shielded_instance_config = $var; - - return $this; - } - - /** - * Optional. The Compute Engine accelerator configuration for this runtime. - * - * Generated from protobuf field .google.cloud.notebooks.v1.RuntimeAcceleratorConfig accelerator_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Notebooks\V1\RuntimeAcceleratorConfig|null - */ - public function getAcceleratorConfig() - { - return $this->accelerator_config; - } - - public function hasAcceleratorConfig() - { - return isset($this->accelerator_config); - } - - public function clearAcceleratorConfig() - { - unset($this->accelerator_config); - } - - /** - * Optional. The Compute Engine accelerator configuration for this runtime. - * - * Generated from protobuf field .google.cloud.notebooks.v1.RuntimeAcceleratorConfig accelerator_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Notebooks\V1\RuntimeAcceleratorConfig $var - * @return $this - */ - public function setAcceleratorConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V1\RuntimeAcceleratorConfig::class); - $this->accelerator_config = $var; - - return $this; - } - - /** - * Optional. The Compute Engine network to be used for machine - * communications. Cannot be specified with subnetwork. If neither - * `network` nor `subnet` is specified, the "default" network of - * the project is used, if it exists. - * A full URL or partial URI. Examples: - * * `https://www.googleapis.com/compute/v1/projects/[project_id]/global/networks/default` - * * `projects/[project_id]/global/networks/default` - * Runtimes are managed resources inside Google Infrastructure. - * Runtimes support the following network configurations: - * * Google Managed Network (Network & subnet are empty) - * * Consumer Project VPC (network & subnet are required). Requires - * configuring Private Service Access. - * * Shared VPC (network & subnet are required). Requires configuring Private - * Service Access. - * - * Generated from protobuf field string network = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getNetwork() - { - return $this->network; - } - - /** - * Optional. The Compute Engine network to be used for machine - * communications. Cannot be specified with subnetwork. If neither - * `network` nor `subnet` is specified, the "default" network of - * the project is used, if it exists. - * A full URL or partial URI. Examples: - * * `https://www.googleapis.com/compute/v1/projects/[project_id]/global/networks/default` - * * `projects/[project_id]/global/networks/default` - * Runtimes are managed resources inside Google Infrastructure. - * Runtimes support the following network configurations: - * * Google Managed Network (Network & subnet are empty) - * * Consumer Project VPC (network & subnet are required). Requires - * configuring Private Service Access. - * * Shared VPC (network & subnet are required). Requires configuring Private - * Service Access. - * - * Generated from protobuf field string network = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setNetwork($var) - { - GPBUtil::checkString($var, True); - $this->network = $var; - - return $this; - } - - /** - * Optional. The Compute Engine subnetwork to be used for machine - * communications. Cannot be specified with network. - * A full URL or partial URI are valid. Examples: - * * `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/us-east1/subnetworks/sub0` - * * `projects/[project_id]/regions/us-east1/subnetworks/sub0` - * - * Generated from protobuf field string subnet = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getSubnet() - { - return $this->subnet; - } - - /** - * Optional. The Compute Engine subnetwork to be used for machine - * communications. Cannot be specified with network. - * A full URL or partial URI are valid. Examples: - * * `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/us-east1/subnetworks/sub0` - * * `projects/[project_id]/regions/us-east1/subnetworks/sub0` - * - * Generated from protobuf field string subnet = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setSubnet($var) - { - GPBUtil::checkString($var, True); - $this->subnet = $var; - - return $this; - } - - /** - * Optional. If true, runtime will only have internal IP - * addresses. By default, runtimes are not restricted to internal IP - * addresses, and will have ephemeral external IP addresses assigned to each - * vm. This `internal_ip_only` restriction can only be enabled for - * subnetwork enabled networks, and all dependencies must be - * configured to be accessible without external IP addresses. - * - * Generated from protobuf field bool internal_ip_only = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getInternalIpOnly() - { - return $this->internal_ip_only; - } - - /** - * Optional. If true, runtime will only have internal IP - * addresses. By default, runtimes are not restricted to internal IP - * addresses, and will have ephemeral external IP addresses assigned to each - * vm. This `internal_ip_only` restriction can only be enabled for - * subnetwork enabled networks, and all dependencies must be - * configured to be accessible without external IP addresses. - * - * Generated from protobuf field bool internal_ip_only = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setInternalIpOnly($var) - { - GPBUtil::checkBool($var); - $this->internal_ip_only = $var; - - return $this; - } - - /** - * Optional. The Compute Engine tags to add to runtime (see [Tagging - * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)). - * - * Generated from protobuf field repeated string tags = 13 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTags() - { - return $this->tags; - } - - /** - * Optional. The Compute Engine tags to add to runtime (see [Tagging - * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)). - * - * Generated from protobuf field repeated string tags = 13 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTags($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->tags = $arr; - - return $this; - } - - /** - * Output only. The Compute Engine guest attributes. (see - * [Project and instance - * guest - * attributes](https://cloud.google.com/compute/docs/storing-retrieving-metadata#guest_attributes)). - * - * Generated from protobuf field map guest_attributes = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getGuestAttributes() - { - return $this->guest_attributes; - } - - /** - * Output only. The Compute Engine guest attributes. (see - * [Project and instance - * guest - * attributes](https://cloud.google.com/compute/docs/storing-retrieving-metadata#guest_attributes)). - * - * Generated from protobuf field map guest_attributes = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setGuestAttributes($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->guest_attributes = $arr; - - return $this; - } - - /** - * Optional. The Compute Engine metadata entries to add to virtual machine. (see - * [Project and instance - * metadata](https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)). - * - * Generated from protobuf field map metadata = 15 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getMetadata() - { - return $this->metadata; - } - - /** - * Optional. The Compute Engine metadata entries to add to virtual machine. (see - * [Project and instance - * metadata](https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)). - * - * Generated from protobuf field map metadata = 15 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setMetadata($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->metadata = $arr; - - return $this; - } - - /** - * Optional. The labels to associate with this runtime. - * Label **keys** must contain 1 to 63 characters, and must conform to - * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). - * Label **values** may be empty, but, if present, must contain 1 to 63 - * characters, and must conform to [RFC - * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be - * associated with a cluster. - * - * Generated from protobuf field map labels = 16 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. The labels to associate with this runtime. - * Label **keys** must contain 1 to 63 characters, and must conform to - * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). - * Label **values** may be empty, but, if present, must contain 1 to 63 - * characters, and must conform to [RFC - * 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be - * associated with a cluster. - * - * Generated from protobuf field map labels = 16 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Optional. The type of vNIC to be used on this interface. This may be gVNIC or - * VirtioNet. - * - * Generated from protobuf field .google.cloud.notebooks.v1.VirtualMachineConfig.NicType nic_type = 17 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getNicType() - { - return $this->nic_type; - } - - /** - * Optional. The type of vNIC to be used on this interface. This may be gVNIC or - * VirtioNet. - * - * Generated from protobuf field .google.cloud.notebooks.v1.VirtualMachineConfig.NicType nic_type = 17 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setNicType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Notebooks\V1\VirtualMachineConfig\NicType::class); - $this->nic_type = $var; - - return $this; - } - - /** - * Optional. Reserved IP Range name is used for VPC Peering. - * The subnetwork allocation will use the range *name* if it's assigned. - * Example: managed-notebooks-range-c - * PEERING_RANGE_NAME_3=managed-notebooks-range-c - * gcloud compute addresses create $PEERING_RANGE_NAME_3 \ - * --global \ - * --prefix-length=24 \ - * --description="Google Cloud Managed Notebooks Range 24 c" \ - * --network=$NETWORK \ - * --addresses=192.168.0.0 \ - * --purpose=VPC_PEERING - * Field value will be: `managed-notebooks-range-c` - * - * Generated from protobuf field string reserved_ip_range = 18 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getReservedIpRange() - { - return $this->reserved_ip_range; - } - - /** - * Optional. Reserved IP Range name is used for VPC Peering. - * The subnetwork allocation will use the range *name* if it's assigned. - * Example: managed-notebooks-range-c - * PEERING_RANGE_NAME_3=managed-notebooks-range-c - * gcloud compute addresses create $PEERING_RANGE_NAME_3 \ - * --global \ - * --prefix-length=24 \ - * --description="Google Cloud Managed Notebooks Range 24 c" \ - * --network=$NETWORK \ - * --addresses=192.168.0.0 \ - * --purpose=VPC_PEERING - * Field value will be: `managed-notebooks-range-c` - * - * Generated from protobuf field string reserved_ip_range = 18 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setReservedIpRange($var) - { - GPBUtil::checkString($var, True); - $this->reserved_ip_range = $var; - - return $this; - } - - /** - * Optional. Boot image metadata used for runtime upgradeability. - * - * Generated from protobuf field .google.cloud.notebooks.v1.VirtualMachineConfig.BootImage boot_image = 19 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Notebooks\V1\VirtualMachineConfig\BootImage|null - */ - public function getBootImage() - { - return $this->boot_image; - } - - public function hasBootImage() - { - return isset($this->boot_image); - } - - public function clearBootImage() - { - unset($this->boot_image); - } - - /** - * Optional. Boot image metadata used for runtime upgradeability. - * - * Generated from protobuf field .google.cloud.notebooks.v1.VirtualMachineConfig.BootImage boot_image = 19 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Notebooks\V1\VirtualMachineConfig\BootImage $var - * @return $this - */ - public function setBootImage($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V1\VirtualMachineConfig\BootImage::class); - $this->boot_image = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/VirtualMachineConfig/BootImage.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/VirtualMachineConfig/BootImage.php deleted file mode 100644 index 62c028e84006..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/VirtualMachineConfig/BootImage.php +++ /dev/null @@ -1,37 +0,0 @@ -google.cloud.notebooks.v1.VirtualMachineConfig.BootImage - */ -class BootImage extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V1\Runtime::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(BootImage::class, \Google\Cloud\Notebooks\V1\VirtualMachineConfig_BootImage::class); - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/VirtualMachineConfig/NicType.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/VirtualMachineConfig/NicType.php deleted file mode 100644 index 2432a9b28a55..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/VirtualMachineConfig/NicType.php +++ /dev/null @@ -1,65 +0,0 @@ -google.cloud.notebooks.v1.VirtualMachineConfig.NicType - */ -class NicType -{ - /** - * No type specified. - * - * Generated from protobuf enum UNSPECIFIED_NIC_TYPE = 0; - */ - const UNSPECIFIED_NIC_TYPE = 0; - /** - * VIRTIO - * - * Generated from protobuf enum VIRTIO_NET = 1; - */ - const VIRTIO_NET = 1; - /** - * GVNIC - * - * Generated from protobuf enum GVNIC = 2; - */ - const GVNIC = 2; - - private static $valueToName = [ - self::UNSPECIFIED_NIC_TYPE => 'UNSPECIFIED_NIC_TYPE', - self::VIRTIO_NET => 'VIRTIO_NET', - self::GVNIC => 'GVNIC', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(NicType::class, \Google\Cloud\Notebooks\V1\VirtualMachineConfig_NicType::class); - diff --git a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/VmImage.php b/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/VmImage.php deleted file mode 100644 index e4c537d0a018..000000000000 --- a/owl-bot-staging/Notebooks/v1/proto/src/Google/Cloud/Notebooks/V1/VmImage.php +++ /dev/null @@ -1,150 +0,0 @@ -google.cloud.notebooks.v1.VmImage - */ -class VmImage extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the Google Cloud project that this VM image belongs to. - * Format: `{project_id}` - * - * Generated from protobuf field string project = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $project = ''; - protected $image; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $project - * Required. The name of the Google Cloud project that this VM image belongs to. - * Format: `{project_id}` - * @type string $image_name - * Use VM image name to find the image. - * @type string $image_family - * Use this VM image family to find the image; the newest image in this - * family will be used. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V1\Environment::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the Google Cloud project that this VM image belongs to. - * Format: `{project_id}` - * - * Generated from protobuf field string project = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getProject() - { - return $this->project; - } - - /** - * Required. The name of the Google Cloud project that this VM image belongs to. - * Format: `{project_id}` - * - * Generated from protobuf field string project = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setProject($var) - { - GPBUtil::checkString($var, True); - $this->project = $var; - - return $this; - } - - /** - * Use VM image name to find the image. - * - * Generated from protobuf field string image_name = 2; - * @return string - */ - public function getImageName() - { - return $this->readOneof(2); - } - - public function hasImageName() - { - return $this->hasOneof(2); - } - - /** - * Use VM image name to find the image. - * - * Generated from protobuf field string image_name = 2; - * @param string $var - * @return $this - */ - public function setImageName($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Use this VM image family to find the image; the newest image in this - * family will be used. - * - * Generated from protobuf field string image_family = 3; - * @return string - */ - public function getImageFamily() - { - return $this->readOneof(3); - } - - public function hasImageFamily() - { - return $this->hasOneof(3); - } - - /** - * Use this VM image family to find the image; the newest image in this - * family will be used. - * - * Generated from protobuf field string image_family = 3; - * @param string $var - * @return $this - */ - public function setImageFamily($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * @return string - */ - public function getImage() - { - return $this->whichOneof("image"); - } - -} - diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/create_runtime.php b/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/create_runtime.php deleted file mode 100644 index 642fc678aafc..000000000000 --- a/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/create_runtime.php +++ /dev/null @@ -1,93 +0,0 @@ -setParent($formattedParent) - ->setRuntimeId($runtimeId) - ->setRuntime($runtime); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $managedNotebookServiceClient->createRuntime($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Runtime $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = ManagedNotebookServiceClient::runtimeName( - '[PROJECT]', - '[LOCATION]', - '[RUNTIME]' - ); - $runtimeId = '[RUNTIME_ID]'; - - create_runtime_sample($formattedParent, $runtimeId); -} -// [END notebooks_v1_generated_ManagedNotebookService_CreateRuntime_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/delete_runtime.php b/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/delete_runtime.php deleted file mode 100644 index d62ac63d47a9..000000000000 --- a/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/delete_runtime.php +++ /dev/null @@ -1,81 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $managedNotebookServiceClient->deleteRuntime($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = ManagedNotebookServiceClient::runtimeName('[PROJECT]', '[LOCATION]', '[RUNTIME]'); - - delete_runtime_sample($formattedName); -} -// [END notebooks_v1_generated_ManagedNotebookService_DeleteRuntime_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/diagnose_runtime.php b/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/diagnose_runtime.php deleted file mode 100644 index b338b3ea5bfc..000000000000 --- a/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/diagnose_runtime.php +++ /dev/null @@ -1,102 +0,0 @@ -setGcsBucket($diagnosticConfigGcsBucket); - $request = (new DiagnoseRuntimeRequest()) - ->setName($formattedName) - ->setDiagnosticConfig($diagnosticConfig); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $managedNotebookServiceClient->diagnoseRuntime($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Runtime $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = ManagedNotebookServiceClient::runtimeName('[PROJECT]', '[LOCATION]', '[RUNTIME]'); - $diagnosticConfigGcsBucket = '[GCS_BUCKET]'; - - diagnose_runtime_sample($formattedName, $diagnosticConfigGcsBucket); -} -// [END notebooks_v1_generated_ManagedNotebookService_DiagnoseRuntime_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/get_iam_policy.php b/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/get_iam_policy.php deleted file mode 100644 index 38dddd89e3dc..000000000000 --- a/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/get_iam_policy.php +++ /dev/null @@ -1,72 +0,0 @@ -setResource($resource); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $managedNotebookServiceClient->getIamPolicy($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - - get_iam_policy_sample($resource); -} -// [END notebooks_v1_generated_ManagedNotebookService_GetIamPolicy_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/get_location.php b/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/get_location.php deleted file mode 100644 index 1e354abd2ea3..000000000000 --- a/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/get_location.php +++ /dev/null @@ -1,57 +0,0 @@ -getLocation($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END notebooks_v1_generated_ManagedNotebookService_GetLocation_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/get_runtime.php b/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/get_runtime.php deleted file mode 100644 index e36777b31947..000000000000 --- a/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/get_runtime.php +++ /dev/null @@ -1,73 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Runtime $response */ - $response = $managedNotebookServiceClient->getRuntime($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = ManagedNotebookServiceClient::runtimeName('[PROJECT]', '[LOCATION]', '[RUNTIME]'); - - get_runtime_sample($formattedName); -} -// [END notebooks_v1_generated_ManagedNotebookService_GetRuntime_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/list_locations.php b/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/list_locations.php deleted file mode 100644 index 74b6cff3ce49..000000000000 --- a/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/list_locations.php +++ /dev/null @@ -1,62 +0,0 @@ -listLocations($request); - - /** @var Location $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END notebooks_v1_generated_ManagedNotebookService_ListLocations_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/list_runtimes.php b/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/list_runtimes.php deleted file mode 100644 index 10e351405179..000000000000 --- a/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/list_runtimes.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $managedNotebookServiceClient->listRuntimes($request); - - /** @var Runtime $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = ManagedNotebookServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - list_runtimes_sample($formattedParent); -} -// [END notebooks_v1_generated_ManagedNotebookService_ListRuntimes_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/refresh_runtime_token_internal.php b/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/refresh_runtime_token_internal.php deleted file mode 100644 index ca7cd48ef727..000000000000 --- a/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/refresh_runtime_token_internal.php +++ /dev/null @@ -1,77 +0,0 @@ -setName($formattedName) - ->setVmId($vmId); - - // Call the API and handle any network failures. - try { - /** @var RefreshRuntimeTokenInternalResponse $response */ - $response = $managedNotebookServiceClient->refreshRuntimeTokenInternal($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = ManagedNotebookServiceClient::runtimeName('[PROJECT]', '[LOCATION]', '[RUNTIME]'); - $vmId = '[VM_ID]'; - - refresh_runtime_token_internal_sample($formattedName, $vmId); -} -// [END notebooks_v1_generated_ManagedNotebookService_RefreshRuntimeTokenInternal_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/report_runtime_event.php b/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/report_runtime_event.php deleted file mode 100644 index 765a729e9cab..000000000000 --- a/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/report_runtime_event.php +++ /dev/null @@ -1,91 +0,0 @@ -setName($formattedName) - ->setVmId($vmId) - ->setEvent($event); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $managedNotebookServiceClient->reportRuntimeEvent($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Runtime $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = ManagedNotebookServiceClient::runtimeName('[PROJECT]', '[LOCATION]', '[RUNTIME]'); - $vmId = '[VM_ID]'; - - report_runtime_event_sample($formattedName, $vmId); -} -// [END notebooks_v1_generated_ManagedNotebookService_ReportRuntimeEvent_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/reset_runtime.php b/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/reset_runtime.php deleted file mode 100644 index 22cee58f6125..000000000000 --- a/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/reset_runtime.php +++ /dev/null @@ -1,83 +0,0 @@ -setName($name); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $managedNotebookServiceClient->resetRuntime($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Runtime $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $name = '[NAME]'; - - reset_runtime_sample($name); -} -// [END notebooks_v1_generated_ManagedNotebookService_ResetRuntime_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/set_iam_policy.php b/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/set_iam_policy.php deleted file mode 100644 index ad98f14f8624..000000000000 --- a/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/set_iam_policy.php +++ /dev/null @@ -1,77 +0,0 @@ -setResource($resource) - ->setPolicy($policy); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $managedNotebookServiceClient->setIamPolicy($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - - set_iam_policy_sample($resource); -} -// [END notebooks_v1_generated_ManagedNotebookService_SetIamPolicy_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/start_runtime.php b/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/start_runtime.php deleted file mode 100644 index 06af3072b902..000000000000 --- a/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/start_runtime.php +++ /dev/null @@ -1,87 +0,0 @@ -setName($name); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $managedNotebookServiceClient->startRuntime($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Runtime $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $name = '[NAME]'; - - start_runtime_sample($name); -} -// [END notebooks_v1_generated_ManagedNotebookService_StartRuntime_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/stop_runtime.php b/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/stop_runtime.php deleted file mode 100644 index 8f4abc6986f4..000000000000 --- a/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/stop_runtime.php +++ /dev/null @@ -1,87 +0,0 @@ -setName($name); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $managedNotebookServiceClient->stopRuntime($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Runtime $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $name = '[NAME]'; - - stop_runtime_sample($name); -} -// [END notebooks_v1_generated_ManagedNotebookService_StopRuntime_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/switch_runtime.php b/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/switch_runtime.php deleted file mode 100644 index 0e62a84c02ab..000000000000 --- a/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/switch_runtime.php +++ /dev/null @@ -1,83 +0,0 @@ -setName($name); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $managedNotebookServiceClient->switchRuntime($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Runtime $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $name = '[NAME]'; - - switch_runtime_sample($name); -} -// [END notebooks_v1_generated_ManagedNotebookService_SwitchRuntime_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/test_iam_permissions.php b/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/test_iam_permissions.php deleted file mode 100644 index 3ec39b091919..000000000000 --- a/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/test_iam_permissions.php +++ /dev/null @@ -1,84 +0,0 @@ -setResource($resource) - ->setPermissions($permissions); - - // Call the API and handle any network failures. - try { - /** @var TestIamPermissionsResponse $response */ - $response = $managedNotebookServiceClient->testIamPermissions($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - $permissionsElement = '[PERMISSIONS]'; - - test_iam_permissions_sample($resource, $permissionsElement); -} -// [END notebooks_v1_generated_ManagedNotebookService_TestIamPermissions_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/update_runtime.php b/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/update_runtime.php deleted file mode 100644 index 9b433e65ba4f..000000000000 --- a/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/update_runtime.php +++ /dev/null @@ -1,74 +0,0 @@ -setRuntime($runtime) - ->setUpdateMask($updateMask); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $managedNotebookServiceClient->updateRuntime($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Runtime $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END notebooks_v1_generated_ManagedNotebookService_UpdateRuntime_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/upgrade_runtime.php b/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/upgrade_runtime.php deleted file mode 100644 index 1c21ed1eb5ed..000000000000 --- a/owl-bot-staging/Notebooks/v1/samples/V1/ManagedNotebookServiceClient/upgrade_runtime.php +++ /dev/null @@ -1,83 +0,0 @@ -setName($name); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $managedNotebookServiceClient->upgradeRuntime($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Runtime $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $name = '[NAME]'; - - upgrade_runtime_sample($name); -} -// [END notebooks_v1_generated_ManagedNotebookService_UpgradeRuntime_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/create_environment.php b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/create_environment.php deleted file mode 100644 index ac86d6b739fe..000000000000 --- a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/create_environment.php +++ /dev/null @@ -1,90 +0,0 @@ -setParent($parent) - ->setEnvironmentId($environmentId) - ->setEnvironment($environment); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $notebookServiceClient->createEnvironment($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Environment $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $parent = '[PARENT]'; - $environmentId = '[ENVIRONMENT_ID]'; - - create_environment_sample($parent, $environmentId); -} -// [END notebooks_v1_generated_NotebookService_CreateEnvironment_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/create_execution.php b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/create_execution.php deleted file mode 100644 index 6c4e2bee3f8d..000000000000 --- a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/create_execution.php +++ /dev/null @@ -1,89 +0,0 @@ -setParent($formattedParent) - ->setExecutionId($executionId) - ->setExecution($execution); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $notebookServiceClient->createExecution($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Execution $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = NotebookServiceClient::executionName('[PROJECT]', '[LOCATION]', '[EXECUTION]'); - $executionId = '[EXECUTION_ID]'; - - create_execution_sample($formattedParent, $executionId); -} -// [END notebooks_v1_generated_NotebookService_CreateExecution_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/create_instance.php b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/create_instance.php deleted file mode 100644 index c9e2140dd10e..000000000000 --- a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/create_instance.php +++ /dev/null @@ -1,96 +0,0 @@ -setMachineType($instanceMachineType); - $request = (new CreateInstanceRequest()) - ->setParent($parent) - ->setInstanceId($instanceId) - ->setInstance($instance); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $notebookServiceClient->createInstance($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Instance $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $parent = '[PARENT]'; - $instanceId = '[INSTANCE_ID]'; - $instanceMachineType = '[MACHINE_TYPE]'; - - create_instance_sample($parent, $instanceId, $instanceMachineType); -} -// [END notebooks_v1_generated_NotebookService_CreateInstance_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/create_schedule.php b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/create_schedule.php deleted file mode 100644 index 37761fb78a10..000000000000 --- a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/create_schedule.php +++ /dev/null @@ -1,89 +0,0 @@ -setParent($formattedParent) - ->setScheduleId($scheduleId) - ->setSchedule($schedule); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $notebookServiceClient->createSchedule($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Schedule $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = NotebookServiceClient::scheduleName('[PROJECT]', '[LOCATION]', '[SCHEDULE]'); - $scheduleId = '[SCHEDULE_ID]'; - - create_schedule_sample($formattedParent, $scheduleId); -} -// [END notebooks_v1_generated_NotebookService_CreateSchedule_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/delete_environment.php b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/delete_environment.php deleted file mode 100644 index 1fc2066499ad..000000000000 --- a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/delete_environment.php +++ /dev/null @@ -1,80 +0,0 @@ -setName($name); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $notebookServiceClient->deleteEnvironment($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $name = '[NAME]'; - - delete_environment_sample($name); -} -// [END notebooks_v1_generated_NotebookService_DeleteEnvironment_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/delete_execution.php b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/delete_execution.php deleted file mode 100644 index ea779350e05a..000000000000 --- a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/delete_execution.php +++ /dev/null @@ -1,81 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $notebookServiceClient->deleteExecution($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = NotebookServiceClient::executionName('[PROJECT]', '[LOCATION]', '[EXECUTION]'); - - delete_execution_sample($formattedName); -} -// [END notebooks_v1_generated_NotebookService_DeleteExecution_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/delete_instance.php b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/delete_instance.php deleted file mode 100644 index 4ef4fd614520..000000000000 --- a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/delete_instance.php +++ /dev/null @@ -1,80 +0,0 @@ -setName($name); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $notebookServiceClient->deleteInstance($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $name = '[NAME]'; - - delete_instance_sample($name); -} -// [END notebooks_v1_generated_NotebookService_DeleteInstance_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/delete_schedule.php b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/delete_schedule.php deleted file mode 100644 index 062f8d2c50d1..000000000000 --- a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/delete_schedule.php +++ /dev/null @@ -1,81 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $notebookServiceClient->deleteSchedule($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = NotebookServiceClient::scheduleName('[PROJECT]', '[LOCATION]', '[SCHEDULE]'); - - delete_schedule_sample($formattedName); -} -// [END notebooks_v1_generated_NotebookService_DeleteSchedule_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/diagnose_instance.php b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/diagnose_instance.php deleted file mode 100644 index 2c39ba54b887..000000000000 --- a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/diagnose_instance.php +++ /dev/null @@ -1,102 +0,0 @@ -setGcsBucket($diagnosticConfigGcsBucket); - $request = (new DiagnoseInstanceRequest()) - ->setName($formattedName) - ->setDiagnosticConfig($diagnosticConfig); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $notebookServiceClient->diagnoseInstance($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Instance $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = NotebookServiceClient::instanceName('[PROJECT]', '[INSTANCE]'); - $diagnosticConfigGcsBucket = '[GCS_BUCKET]'; - - diagnose_instance_sample($formattedName, $diagnosticConfigGcsBucket); -} -// [END notebooks_v1_generated_NotebookService_DiagnoseInstance_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/get_environment.php b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/get_environment.php deleted file mode 100644 index 2dcb4f290792..000000000000 --- a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/get_environment.php +++ /dev/null @@ -1,71 +0,0 @@ -setName($name); - - // Call the API and handle any network failures. - try { - /** @var Environment $response */ - $response = $notebookServiceClient->getEnvironment($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $name = '[NAME]'; - - get_environment_sample($name); -} -// [END notebooks_v1_generated_NotebookService_GetEnvironment_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/get_execution.php b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/get_execution.php deleted file mode 100644 index 530197452485..000000000000 --- a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/get_execution.php +++ /dev/null @@ -1,72 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Execution $response */ - $response = $notebookServiceClient->getExecution($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = NotebookServiceClient::executionName('[PROJECT]', '[LOCATION]', '[EXECUTION]'); - - get_execution_sample($formattedName); -} -// [END notebooks_v1_generated_NotebookService_GetExecution_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/get_iam_policy.php b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/get_iam_policy.php deleted file mode 100644 index 72778be43a7a..000000000000 --- a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/get_iam_policy.php +++ /dev/null @@ -1,72 +0,0 @@ -setResource($resource); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $notebookServiceClient->getIamPolicy($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - - get_iam_policy_sample($resource); -} -// [END notebooks_v1_generated_NotebookService_GetIamPolicy_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/get_instance.php b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/get_instance.php deleted file mode 100644 index bdb38a65ae5d..000000000000 --- a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/get_instance.php +++ /dev/null @@ -1,71 +0,0 @@ -setName($name); - - // Call the API and handle any network failures. - try { - /** @var Instance $response */ - $response = $notebookServiceClient->getInstance($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $name = '[NAME]'; - - get_instance_sample($name); -} -// [END notebooks_v1_generated_NotebookService_GetInstance_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/get_instance_health.php b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/get_instance_health.php deleted file mode 100644 index 7be999230850..000000000000 --- a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/get_instance_health.php +++ /dev/null @@ -1,72 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var GetInstanceHealthResponse $response */ - $response = $notebookServiceClient->getInstanceHealth($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = NotebookServiceClient::instanceName('[PROJECT]', '[INSTANCE]'); - - get_instance_health_sample($formattedName); -} -// [END notebooks_v1_generated_NotebookService_GetInstanceHealth_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/get_location.php b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/get_location.php deleted file mode 100644 index 3433764feacd..000000000000 --- a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/get_location.php +++ /dev/null @@ -1,57 +0,0 @@ -getLocation($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END notebooks_v1_generated_NotebookService_GetLocation_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/get_schedule.php b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/get_schedule.php deleted file mode 100644 index 17eb5a7d25e6..000000000000 --- a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/get_schedule.php +++ /dev/null @@ -1,72 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Schedule $response */ - $response = $notebookServiceClient->getSchedule($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = NotebookServiceClient::scheduleName('[PROJECT]', '[LOCATION]', '[SCHEDULE]'); - - get_schedule_sample($formattedName); -} -// [END notebooks_v1_generated_NotebookService_GetSchedule_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/is_instance_upgradeable.php b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/is_instance_upgradeable.php deleted file mode 100644 index 2e79b7cecc80..000000000000 --- a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/is_instance_upgradeable.php +++ /dev/null @@ -1,71 +0,0 @@ -setNotebookInstance($notebookInstance); - - // Call the API and handle any network failures. - try { - /** @var IsInstanceUpgradeableResponse $response */ - $response = $notebookServiceClient->isInstanceUpgradeable($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $notebookInstance = '[NOTEBOOK_INSTANCE]'; - - is_instance_upgradeable_sample($notebookInstance); -} -// [END notebooks_v1_generated_NotebookService_IsInstanceUpgradeable_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/list_environments.php b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/list_environments.php deleted file mode 100644 index cc1ae0077a60..000000000000 --- a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/list_environments.php +++ /dev/null @@ -1,75 +0,0 @@ -setParent($parent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $notebookServiceClient->listEnvironments($request); - - /** @var Environment $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $parent = '[PARENT]'; - - list_environments_sample($parent); -} -// [END notebooks_v1_generated_NotebookService_ListEnvironments_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/list_executions.php b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/list_executions.php deleted file mode 100644 index 2bb356b00a36..000000000000 --- a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/list_executions.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $notebookServiceClient->listExecutions($request); - - /** @var Execution $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = NotebookServiceClient::executionName('[PROJECT]', '[LOCATION]', '[EXECUTION]'); - - list_executions_sample($formattedParent); -} -// [END notebooks_v1_generated_NotebookService_ListExecutions_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/list_instances.php b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/list_instances.php deleted file mode 100644 index fd7f377060da..000000000000 --- a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/list_instances.php +++ /dev/null @@ -1,76 +0,0 @@ -setParent($parent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $notebookServiceClient->listInstances($request); - - /** @var Instance $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $parent = '[PARENT]'; - - list_instances_sample($parent); -} -// [END notebooks_v1_generated_NotebookService_ListInstances_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/list_locations.php b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/list_locations.php deleted file mode 100644 index ccaff781f693..000000000000 --- a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/list_locations.php +++ /dev/null @@ -1,62 +0,0 @@ -listLocations($request); - - /** @var Location $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END notebooks_v1_generated_NotebookService_ListLocations_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/list_schedules.php b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/list_schedules.php deleted file mode 100644 index e485b4414bb5..000000000000 --- a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/list_schedules.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $notebookServiceClient->listSchedules($request); - - /** @var Schedule $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = NotebookServiceClient::scheduleName('[PROJECT]', '[LOCATION]', '[SCHEDULE]'); - - list_schedules_sample($formattedParent); -} -// [END notebooks_v1_generated_NotebookService_ListSchedules_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/register_instance.php b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/register_instance.php deleted file mode 100644 index 098a73ba6239..000000000000 --- a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/register_instance.php +++ /dev/null @@ -1,92 +0,0 @@ -setParent($parent) - ->setInstanceId($instanceId); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $notebookServiceClient->registerInstance($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Instance $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $parent = '[PARENT]'; - $instanceId = '[INSTANCE_ID]'; - - register_instance_sample($parent, $instanceId); -} -// [END notebooks_v1_generated_NotebookService_RegisterInstance_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/report_instance_info.php b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/report_instance_info.php deleted file mode 100644 index 05521ca4c846..000000000000 --- a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/report_instance_info.php +++ /dev/null @@ -1,90 +0,0 @@ -setName($name) - ->setVmId($vmId); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $notebookServiceClient->reportInstanceInfo($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Instance $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $name = '[NAME]'; - $vmId = '[VM_ID]'; - - report_instance_info_sample($name, $vmId); -} -// [END notebooks_v1_generated_NotebookService_ReportInstanceInfo_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/reset_instance.php b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/reset_instance.php deleted file mode 100644 index c9c78a21a778..000000000000 --- a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/reset_instance.php +++ /dev/null @@ -1,83 +0,0 @@ -setName($name); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $notebookServiceClient->resetInstance($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Instance $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $name = '[NAME]'; - - reset_instance_sample($name); -} -// [END notebooks_v1_generated_NotebookService_ResetInstance_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/rollback_instance.php b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/rollback_instance.php deleted file mode 100644 index 460edee8f928..000000000000 --- a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/rollback_instance.php +++ /dev/null @@ -1,87 +0,0 @@ -setName($name) - ->setTargetSnapshot($targetSnapshot); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $notebookServiceClient->rollbackInstance($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Instance $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $name = '[NAME]'; - $targetSnapshot = '[TARGET_SNAPSHOT]'; - - rollback_instance_sample($name, $targetSnapshot); -} -// [END notebooks_v1_generated_NotebookService_RollbackInstance_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/set_iam_policy.php b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/set_iam_policy.php deleted file mode 100644 index 71b8e6f06e9d..000000000000 --- a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/set_iam_policy.php +++ /dev/null @@ -1,77 +0,0 @@ -setResource($resource) - ->setPolicy($policy); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $notebookServiceClient->setIamPolicy($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - - set_iam_policy_sample($resource); -} -// [END notebooks_v1_generated_NotebookService_SetIamPolicy_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/set_instance_accelerator.php b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/set_instance_accelerator.php deleted file mode 100644 index 9eb8d490098b..000000000000 --- a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/set_instance_accelerator.php +++ /dev/null @@ -1,93 +0,0 @@ -setName($name) - ->setType($type) - ->setCoreCount($coreCount); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $notebookServiceClient->setInstanceAccelerator($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Instance $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $name = '[NAME]'; - $type = AcceleratorType::ACCELERATOR_TYPE_UNSPECIFIED; - $coreCount = 0; - - set_instance_accelerator_sample($name, $type, $coreCount); -} -// [END notebooks_v1_generated_NotebookService_SetInstanceAccelerator_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/set_instance_labels.php b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/set_instance_labels.php deleted file mode 100644 index 4f0e0b7403f6..000000000000 --- a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/set_instance_labels.php +++ /dev/null @@ -1,83 +0,0 @@ -setName($name); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $notebookServiceClient->setInstanceLabels($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Instance $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $name = '[NAME]'; - - set_instance_labels_sample($name); -} -// [END notebooks_v1_generated_NotebookService_SetInstanceLabels_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/set_instance_machine_type.php b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/set_instance_machine_type.php deleted file mode 100644 index 3de79607e2f9..000000000000 --- a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/set_instance_machine_type.php +++ /dev/null @@ -1,87 +0,0 @@ -setName($name) - ->setMachineType($machineType); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $notebookServiceClient->setInstanceMachineType($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Instance $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $name = '[NAME]'; - $machineType = '[MACHINE_TYPE]'; - - set_instance_machine_type_sample($name, $machineType); -} -// [END notebooks_v1_generated_NotebookService_SetInstanceMachineType_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/start_instance.php b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/start_instance.php deleted file mode 100644 index 18326baad0b9..000000000000 --- a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/start_instance.php +++ /dev/null @@ -1,83 +0,0 @@ -setName($name); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $notebookServiceClient->startInstance($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Instance $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $name = '[NAME]'; - - start_instance_sample($name); -} -// [END notebooks_v1_generated_NotebookService_StartInstance_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/stop_instance.php b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/stop_instance.php deleted file mode 100644 index e8925768f320..000000000000 --- a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/stop_instance.php +++ /dev/null @@ -1,83 +0,0 @@ -setName($name); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $notebookServiceClient->stopInstance($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Instance $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $name = '[NAME]'; - - stop_instance_sample($name); -} -// [END notebooks_v1_generated_NotebookService_StopInstance_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/test_iam_permissions.php b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/test_iam_permissions.php deleted file mode 100644 index 1013e1a0b04f..000000000000 --- a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/test_iam_permissions.php +++ /dev/null @@ -1,84 +0,0 @@ -setResource($resource) - ->setPermissions($permissions); - - // Call the API and handle any network failures. - try { - /** @var TestIamPermissionsResponse $response */ - $response = $notebookServiceClient->testIamPermissions($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - $permissionsElement = '[PERMISSIONS]'; - - test_iam_permissions_sample($resource, $permissionsElement); -} -// [END notebooks_v1_generated_NotebookService_TestIamPermissions_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/trigger_schedule.php b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/trigger_schedule.php deleted file mode 100644 index 0cdcf946344e..000000000000 --- a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/trigger_schedule.php +++ /dev/null @@ -1,84 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $notebookServiceClient->triggerSchedule($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Schedule $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = NotebookServiceClient::scheduleName('[PROJECT]', '[LOCATION]', '[SCHEDULE]'); - - trigger_schedule_sample($formattedName); -} -// [END notebooks_v1_generated_NotebookService_TriggerSchedule_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/update_instance_config.php b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/update_instance_config.php deleted file mode 100644 index 36a2aea7adea..000000000000 --- a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/update_instance_config.php +++ /dev/null @@ -1,83 +0,0 @@ -setName($name); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $notebookServiceClient->updateInstanceConfig($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Instance $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $name = '[NAME]'; - - update_instance_config_sample($name); -} -// [END notebooks_v1_generated_NotebookService_UpdateInstanceConfig_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/update_instance_metadata_items.php b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/update_instance_metadata_items.php deleted file mode 100644 index f772bc909edf..000000000000 --- a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/update_instance_metadata_items.php +++ /dev/null @@ -1,71 +0,0 @@ -setName($name); - - // Call the API and handle any network failures. - try { - /** @var UpdateInstanceMetadataItemsResponse $response */ - $response = $notebookServiceClient->updateInstanceMetadataItems($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $name = '[NAME]'; - - update_instance_metadata_items_sample($name); -} -// [END notebooks_v1_generated_NotebookService_UpdateInstanceMetadataItems_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/update_shielded_instance_config.php b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/update_shielded_instance_config.php deleted file mode 100644 index 5be3ea2bb035..000000000000 --- a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/update_shielded_instance_config.php +++ /dev/null @@ -1,83 +0,0 @@ -setName($name); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $notebookServiceClient->updateShieldedInstanceConfig($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Instance $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $name = '[NAME]'; - - update_shielded_instance_config_sample($name); -} -// [END notebooks_v1_generated_NotebookService_UpdateShieldedInstanceConfig_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/upgrade_instance.php b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/upgrade_instance.php deleted file mode 100644 index 7b459065e2f3..000000000000 --- a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/upgrade_instance.php +++ /dev/null @@ -1,83 +0,0 @@ -setName($name); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $notebookServiceClient->upgradeInstance($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Instance $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $name = '[NAME]'; - - upgrade_instance_sample($name); -} -// [END notebooks_v1_generated_NotebookService_UpgradeInstance_sync] diff --git a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/upgrade_instance_internal.php b/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/upgrade_instance_internal.php deleted file mode 100644 index 123dab178fab..000000000000 --- a/owl-bot-staging/Notebooks/v1/samples/V1/NotebookServiceClient/upgrade_instance_internal.php +++ /dev/null @@ -1,88 +0,0 @@ -setName($name) - ->setVmId($vmId); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $notebookServiceClient->upgradeInstanceInternal($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Instance $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $name = '[NAME]'; - $vmId = '[VM_ID]'; - - upgrade_instance_internal_sample($name, $vmId); -} -// [END notebooks_v1_generated_NotebookService_UpgradeInstanceInternal_sync] diff --git a/owl-bot-staging/Notebooks/v1/src/V1/Client/ManagedNotebookServiceClient.php b/owl-bot-staging/Notebooks/v1/src/V1/Client/ManagedNotebookServiceClient.php deleted file mode 100644 index 1be96d61bd2b..000000000000 --- a/owl-bot-staging/Notebooks/v1/src/V1/Client/ManagedNotebookServiceClient.php +++ /dev/null @@ -1,822 +0,0 @@ - createRuntimeAsync(CreateRuntimeRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteRuntimeAsync(DeleteRuntimeRequest $request, array $optionalArgs = []) - * @method PromiseInterface diagnoseRuntimeAsync(DiagnoseRuntimeRequest $request, array $optionalArgs = []) - * @method PromiseInterface getRuntimeAsync(GetRuntimeRequest $request, array $optionalArgs = []) - * @method PromiseInterface listRuntimesAsync(ListRuntimesRequest $request, array $optionalArgs = []) - * @method PromiseInterface refreshRuntimeTokenInternalAsync(RefreshRuntimeTokenInternalRequest $request, array $optionalArgs = []) - * @method PromiseInterface reportRuntimeEventAsync(ReportRuntimeEventRequest $request, array $optionalArgs = []) - * @method PromiseInterface resetRuntimeAsync(ResetRuntimeRequest $request, array $optionalArgs = []) - * @method PromiseInterface startRuntimeAsync(StartRuntimeRequest $request, array $optionalArgs = []) - * @method PromiseInterface stopRuntimeAsync(StopRuntimeRequest $request, array $optionalArgs = []) - * @method PromiseInterface switchRuntimeAsync(SwitchRuntimeRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateRuntimeAsync(UpdateRuntimeRequest $request, array $optionalArgs = []) - * @method PromiseInterface upgradeRuntimeAsync(UpgradeRuntimeRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) - * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) - */ -final class ManagedNotebookServiceClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.notebooks.v1.ManagedNotebookService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'notebooks.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'notebooks.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/managed_notebook_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/managed_notebook_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/managed_notebook_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/managed_notebook_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Create the default operation client for the service. - * - * @param array $options ClientOptions for the client. - * - * @return OperationsClient - */ - private function createOperationsClient(array $options) - { - // Unset client-specific configuration options - unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); - - if (isset($options['operationsClient'])) { - return $options['operationsClient']; - } - - return new OperationsClient($options); - } - - /** - * Formats a string containing the fully-qualified path to represent a location - * resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted location resource. - */ - public static function locationName(string $project, string $location): string - { - return self::getPathTemplate('location')->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a runtime - * resource. - * - * @param string $project - * @param string $location - * @param string $runtime - * - * @return string The formatted runtime resource. - */ - public static function runtimeName(string $project, string $location, string $runtime): string - { - return self::getPathTemplate('runtime')->render([ - 'project' => $project, - 'location' => $location, - 'runtime' => $runtime, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - location: projects/{project}/locations/{location} - * - runtime: projects/{project}/locations/{location}/runtimes/{runtime} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param ?string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, ?string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'notebooks.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Creates a new Runtime in a given project and location. - * - * The async variant is {@see ManagedNotebookServiceClient::createRuntimeAsync()} . - * - * @example samples/V1/ManagedNotebookServiceClient/create_runtime.php - * - * @param CreateRuntimeRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createRuntime(CreateRuntimeRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateRuntime', $request, $callOptions)->wait(); - } - - /** - * Deletes a single Runtime. - * - * The async variant is {@see ManagedNotebookServiceClient::deleteRuntimeAsync()} . - * - * @example samples/V1/ManagedNotebookServiceClient/delete_runtime.php - * - * @param DeleteRuntimeRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteRuntime(DeleteRuntimeRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteRuntime', $request, $callOptions)->wait(); - } - - /** - * Creates a Diagnostic File and runs Diagnostic Tool given a Runtime. - * - * The async variant is {@see ManagedNotebookServiceClient::diagnoseRuntimeAsync()} - * . - * - * @example samples/V1/ManagedNotebookServiceClient/diagnose_runtime.php - * - * @param DiagnoseRuntimeRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function diagnoseRuntime(DiagnoseRuntimeRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DiagnoseRuntime', $request, $callOptions)->wait(); - } - - /** - * Gets details of a single Runtime. The location must be a regional endpoint - * rather than zonal. - * - * The async variant is {@see ManagedNotebookServiceClient::getRuntimeAsync()} . - * - * @example samples/V1/ManagedNotebookServiceClient/get_runtime.php - * - * @param GetRuntimeRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Runtime - * - * @throws ApiException Thrown if the API call fails. - */ - public function getRuntime(GetRuntimeRequest $request, array $callOptions = []): Runtime - { - return $this->startApiCall('GetRuntime', $request, $callOptions)->wait(); - } - - /** - * Lists Runtimes in a given project and location. - * - * The async variant is {@see ManagedNotebookServiceClient::listRuntimesAsync()} . - * - * @example samples/V1/ManagedNotebookServiceClient/list_runtimes.php - * - * @param ListRuntimesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listRuntimes(ListRuntimesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListRuntimes', $request, $callOptions); - } - - /** - * Gets an access token for the consumer service account that the customer - * attached to the runtime. Only accessible from the tenant instance. - * - * The async variant is - * {@see ManagedNotebookServiceClient::refreshRuntimeTokenInternalAsync()} . - * - * @example samples/V1/ManagedNotebookServiceClient/refresh_runtime_token_internal.php - * - * @param RefreshRuntimeTokenInternalRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return RefreshRuntimeTokenInternalResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function refreshRuntimeTokenInternal(RefreshRuntimeTokenInternalRequest $request, array $callOptions = []): RefreshRuntimeTokenInternalResponse - { - return $this->startApiCall('RefreshRuntimeTokenInternal', $request, $callOptions)->wait(); - } - - /** - * Report and process a runtime event. - * - * The async variant is - * {@see ManagedNotebookServiceClient::reportRuntimeEventAsync()} . - * - * @example samples/V1/ManagedNotebookServiceClient/report_runtime_event.php - * - * @param ReportRuntimeEventRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function reportRuntimeEvent(ReportRuntimeEventRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('ReportRuntimeEvent', $request, $callOptions)->wait(); - } - - /** - * Resets a Managed Notebook Runtime. - * - * The async variant is {@see ManagedNotebookServiceClient::resetRuntimeAsync()} . - * - * @example samples/V1/ManagedNotebookServiceClient/reset_runtime.php - * - * @param ResetRuntimeRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function resetRuntime(ResetRuntimeRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('ResetRuntime', $request, $callOptions)->wait(); - } - - /** - * Starts a Managed Notebook Runtime. - * Perform "Start" on GPU instances; "Resume" on CPU instances - * See: - * https://cloud.google.com/compute/docs/instances/stop-start-instance - * https://cloud.google.com/compute/docs/instances/suspend-resume-instance - * - * The async variant is {@see ManagedNotebookServiceClient::startRuntimeAsync()} . - * - * @example samples/V1/ManagedNotebookServiceClient/start_runtime.php - * - * @param StartRuntimeRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function startRuntime(StartRuntimeRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('StartRuntime', $request, $callOptions)->wait(); - } - - /** - * Stops a Managed Notebook Runtime. - * Perform "Stop" on GPU instances; "Suspend" on CPU instances - * See: - * https://cloud.google.com/compute/docs/instances/stop-start-instance - * https://cloud.google.com/compute/docs/instances/suspend-resume-instance - * - * The async variant is {@see ManagedNotebookServiceClient::stopRuntimeAsync()} . - * - * @example samples/V1/ManagedNotebookServiceClient/stop_runtime.php - * - * @param StopRuntimeRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function stopRuntime(StopRuntimeRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('StopRuntime', $request, $callOptions)->wait(); - } - - /** - * Switch a Managed Notebook Runtime. - * - * The async variant is {@see ManagedNotebookServiceClient::switchRuntimeAsync()} . - * - * @example samples/V1/ManagedNotebookServiceClient/switch_runtime.php - * - * @param SwitchRuntimeRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function switchRuntime(SwitchRuntimeRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('SwitchRuntime', $request, $callOptions)->wait(); - } - - /** - * Update Notebook Runtime configuration. - * - * The async variant is {@see ManagedNotebookServiceClient::updateRuntimeAsync()} . - * - * @example samples/V1/ManagedNotebookServiceClient/update_runtime.php - * - * @param UpdateRuntimeRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateRuntime(UpdateRuntimeRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateRuntime', $request, $callOptions)->wait(); - } - - /** - * Upgrades a Managed Notebook Runtime to the latest version. - * - * The async variant is {@see ManagedNotebookServiceClient::upgradeRuntimeAsync()} - * . - * - * @example samples/V1/ManagedNotebookServiceClient/upgrade_runtime.php - * - * @param UpgradeRuntimeRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function upgradeRuntime(UpgradeRuntimeRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpgradeRuntime', $request, $callOptions)->wait(); - } - - /** - * Gets information about a location. - * - * The async variant is {@see ManagedNotebookServiceClient::getLocationAsync()} . - * - * @example samples/V1/ManagedNotebookServiceClient/get_location.php - * - * @param GetLocationRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Location - * - * @throws ApiException Thrown if the API call fails. - */ - public function getLocation(GetLocationRequest $request, array $callOptions = []): Location - { - return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * The async variant is {@see ManagedNotebookServiceClient::listLocationsAsync()} . - * - * @example samples/V1/ManagedNotebookServiceClient/list_locations.php - * - * @param ListLocationsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListLocations', $request, $callOptions); - } - - /** - * Gets the access control policy for a resource. Returns an empty policy - if the resource exists and does not have a policy set. - * - * The async variant is {@see ManagedNotebookServiceClient::getIamPolicyAsync()} . - * - * @example samples/V1/ManagedNotebookServiceClient/get_iam_policy.php - * - * @param GetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * Sets the access control policy on the specified resource. Replaces - any existing policy. - - Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` - errors. - * - * The async variant is {@see ManagedNotebookServiceClient::setIamPolicyAsync()} . - * - * @example samples/V1/ManagedNotebookServiceClient/set_iam_policy.php - * - * @param SetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * Returns permissions that a caller has on the specified resource. If the - resource does not exist, this will return an empty set of - permissions, not a `NOT_FOUND` error. - - Note: This operation is designed to be used for building - permission-aware UIs and command-line tools, not for authorization - checking. This operation may "fail open" without warning. - * - * The async variant is - * {@see ManagedNotebookServiceClient::testIamPermissionsAsync()} . - * - * @example samples/V1/ManagedNotebookServiceClient/test_iam_permissions.php - * - * @param TestIamPermissionsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return TestIamPermissionsResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse - { - return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/Notebooks/v1/src/V1/Client/NotebookServiceClient.php b/owl-bot-staging/Notebooks/v1/src/V1/Client/NotebookServiceClient.php deleted file mode 100644 index 7d7a07553e32..000000000000 --- a/owl-bot-staging/Notebooks/v1/src/V1/Client/NotebookServiceClient.php +++ /dev/null @@ -1,1471 +0,0 @@ - createEnvironmentAsync(CreateEnvironmentRequest $request, array $optionalArgs = []) - * @method PromiseInterface createExecutionAsync(CreateExecutionRequest $request, array $optionalArgs = []) - * @method PromiseInterface createInstanceAsync(CreateInstanceRequest $request, array $optionalArgs = []) - * @method PromiseInterface createScheduleAsync(CreateScheduleRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteEnvironmentAsync(DeleteEnvironmentRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteExecutionAsync(DeleteExecutionRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteInstanceAsync(DeleteInstanceRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteScheduleAsync(DeleteScheduleRequest $request, array $optionalArgs = []) - * @method PromiseInterface diagnoseInstanceAsync(DiagnoseInstanceRequest $request, array $optionalArgs = []) - * @method PromiseInterface getEnvironmentAsync(GetEnvironmentRequest $request, array $optionalArgs = []) - * @method PromiseInterface getExecutionAsync(GetExecutionRequest $request, array $optionalArgs = []) - * @method PromiseInterface getInstanceAsync(GetInstanceRequest $request, array $optionalArgs = []) - * @method PromiseInterface getInstanceHealthAsync(GetInstanceHealthRequest $request, array $optionalArgs = []) - * @method PromiseInterface getScheduleAsync(GetScheduleRequest $request, array $optionalArgs = []) - * @method PromiseInterface isInstanceUpgradeableAsync(IsInstanceUpgradeableRequest $request, array $optionalArgs = []) - * @method PromiseInterface listEnvironmentsAsync(ListEnvironmentsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listExecutionsAsync(ListExecutionsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listInstancesAsync(ListInstancesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listSchedulesAsync(ListSchedulesRequest $request, array $optionalArgs = []) - * @method PromiseInterface registerInstanceAsync(RegisterInstanceRequest $request, array $optionalArgs = []) - * @method PromiseInterface reportInstanceInfoAsync(ReportInstanceInfoRequest $request, array $optionalArgs = []) - * @method PromiseInterface resetInstanceAsync(ResetInstanceRequest $request, array $optionalArgs = []) - * @method PromiseInterface rollbackInstanceAsync(RollbackInstanceRequest $request, array $optionalArgs = []) - * @method PromiseInterface setInstanceAcceleratorAsync(SetInstanceAcceleratorRequest $request, array $optionalArgs = []) - * @method PromiseInterface setInstanceLabelsAsync(SetInstanceLabelsRequest $request, array $optionalArgs = []) - * @method PromiseInterface setInstanceMachineTypeAsync(SetInstanceMachineTypeRequest $request, array $optionalArgs = []) - * @method PromiseInterface startInstanceAsync(StartInstanceRequest $request, array $optionalArgs = []) - * @method PromiseInterface stopInstanceAsync(StopInstanceRequest $request, array $optionalArgs = []) - * @method PromiseInterface triggerScheduleAsync(TriggerScheduleRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateInstanceConfigAsync(UpdateInstanceConfigRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateInstanceMetadataItemsAsync(UpdateInstanceMetadataItemsRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateShieldedInstanceConfigAsync(UpdateShieldedInstanceConfigRequest $request, array $optionalArgs = []) - * @method PromiseInterface upgradeInstanceAsync(UpgradeInstanceRequest $request, array $optionalArgs = []) - * @method PromiseInterface upgradeInstanceInternalAsync(UpgradeInstanceInternalRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) - * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) - */ -final class NotebookServiceClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.notebooks.v1.NotebookService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'notebooks.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'notebooks.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/notebook_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/notebook_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/notebook_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/notebook_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Create the default operation client for the service. - * - * @param array $options ClientOptions for the client. - * - * @return OperationsClient - */ - private function createOperationsClient(array $options) - { - // Unset client-specific configuration options - unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); - - if (isset($options['operationsClient'])) { - return $options['operationsClient']; - } - - return new OperationsClient($options); - } - - /** - * Formats a string containing the fully-qualified path to represent a environment - * resource. - * - * @param string $project - * @param string $environment - * - * @return string The formatted environment resource. - */ - public static function environmentName(string $project, string $environment): string - { - return self::getPathTemplate('environment')->render([ - 'project' => $project, - 'environment' => $environment, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a execution - * resource. - * - * @param string $project - * @param string $location - * @param string $execution - * - * @return string The formatted execution resource. - */ - public static function executionName(string $project, string $location, string $execution): string - { - return self::getPathTemplate('execution')->render([ - 'project' => $project, - 'location' => $location, - 'execution' => $execution, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a instance - * resource. - * - * @param string $project - * @param string $instance - * - * @return string The formatted instance resource. - */ - public static function instanceName(string $project, string $instance): string - { - return self::getPathTemplate('instance')->render([ - 'project' => $project, - 'instance' => $instance, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a schedule - * resource. - * - * @param string $project - * @param string $location - * @param string $schedule - * - * @return string The formatted schedule resource. - */ - public static function scheduleName(string $project, string $location, string $schedule): string - { - return self::getPathTemplate('schedule')->render([ - 'project' => $project, - 'location' => $location, - 'schedule' => $schedule, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a tensorboard - * resource. - * - * @param string $project - * @param string $location - * @param string $tensorboard - * - * @return string The formatted tensorboard resource. - */ - public static function tensorboardName(string $project, string $location, string $tensorboard): string - { - return self::getPathTemplate('tensorboard')->render([ - 'project' => $project, - 'location' => $location, - 'tensorboard' => $tensorboard, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - environment: projects/{project}/environments/{environment} - * - execution: projects/{project}/location/{location}/executions/{execution} - * - instance: projects/{project}/instances/{instance} - * - schedule: projects/{project}/location/{location}/schedules/{schedule} - * - tensorboard: projects/{project}/locations/{location}/tensorboards/{tensorboard} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param ?string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, ?string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'notebooks.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Creates a new Environment. - * - * The async variant is {@see NotebookServiceClient::createEnvironmentAsync()} . - * - * @example samples/V1/NotebookServiceClient/create_environment.php - * - * @param CreateEnvironmentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createEnvironment(CreateEnvironmentRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateEnvironment', $request, $callOptions)->wait(); - } - - /** - * Creates a new Execution in a given project and location. - * - * The async variant is {@see NotebookServiceClient::createExecutionAsync()} . - * - * @example samples/V1/NotebookServiceClient/create_execution.php - * - * @param CreateExecutionRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createExecution(CreateExecutionRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateExecution', $request, $callOptions)->wait(); - } - - /** - * Creates a new Instance in a given project and location. - * - * The async variant is {@see NotebookServiceClient::createInstanceAsync()} . - * - * @example samples/V1/NotebookServiceClient/create_instance.php - * - * @param CreateInstanceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createInstance(CreateInstanceRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateInstance', $request, $callOptions)->wait(); - } - - /** - * Creates a new Scheduled Notebook in a given project and location. - * - * The async variant is {@see NotebookServiceClient::createScheduleAsync()} . - * - * @example samples/V1/NotebookServiceClient/create_schedule.php - * - * @param CreateScheduleRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createSchedule(CreateScheduleRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateSchedule', $request, $callOptions)->wait(); - } - - /** - * Deletes a single Environment. - * - * The async variant is {@see NotebookServiceClient::deleteEnvironmentAsync()} . - * - * @example samples/V1/NotebookServiceClient/delete_environment.php - * - * @param DeleteEnvironmentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteEnvironment(DeleteEnvironmentRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteEnvironment', $request, $callOptions)->wait(); - } - - /** - * Deletes execution - * - * The async variant is {@see NotebookServiceClient::deleteExecutionAsync()} . - * - * @example samples/V1/NotebookServiceClient/delete_execution.php - * - * @param DeleteExecutionRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteExecution(DeleteExecutionRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteExecution', $request, $callOptions)->wait(); - } - - /** - * Deletes a single Instance. - * - * The async variant is {@see NotebookServiceClient::deleteInstanceAsync()} . - * - * @example samples/V1/NotebookServiceClient/delete_instance.php - * - * @param DeleteInstanceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteInstance(DeleteInstanceRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteInstance', $request, $callOptions)->wait(); - } - - /** - * Deletes schedule and all underlying jobs - * - * The async variant is {@see NotebookServiceClient::deleteScheduleAsync()} . - * - * @example samples/V1/NotebookServiceClient/delete_schedule.php - * - * @param DeleteScheduleRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteSchedule(DeleteScheduleRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteSchedule', $request, $callOptions)->wait(); - } - - /** - * Creates a Diagnostic File and runs Diagnostic Tool given an Instance. - * - * The async variant is {@see NotebookServiceClient::diagnoseInstanceAsync()} . - * - * @example samples/V1/NotebookServiceClient/diagnose_instance.php - * - * @param DiagnoseInstanceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function diagnoseInstance(DiagnoseInstanceRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DiagnoseInstance', $request, $callOptions)->wait(); - } - - /** - * Gets details of a single Environment. - * - * The async variant is {@see NotebookServiceClient::getEnvironmentAsync()} . - * - * @example samples/V1/NotebookServiceClient/get_environment.php - * - * @param GetEnvironmentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Environment - * - * @throws ApiException Thrown if the API call fails. - */ - public function getEnvironment(GetEnvironmentRequest $request, array $callOptions = []): Environment - { - return $this->startApiCall('GetEnvironment', $request, $callOptions)->wait(); - } - - /** - * Gets details of executions - * - * The async variant is {@see NotebookServiceClient::getExecutionAsync()} . - * - * @example samples/V1/NotebookServiceClient/get_execution.php - * - * @param GetExecutionRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Execution - * - * @throws ApiException Thrown if the API call fails. - */ - public function getExecution(GetExecutionRequest $request, array $callOptions = []): Execution - { - return $this->startApiCall('GetExecution', $request, $callOptions)->wait(); - } - - /** - * Gets details of a single Instance. - * - * The async variant is {@see NotebookServiceClient::getInstanceAsync()} . - * - * @example samples/V1/NotebookServiceClient/get_instance.php - * - * @param GetInstanceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Instance - * - * @throws ApiException Thrown if the API call fails. - */ - public function getInstance(GetInstanceRequest $request, array $callOptions = []): Instance - { - return $this->startApiCall('GetInstance', $request, $callOptions)->wait(); - } - - /** - * Check if a notebook instance is healthy. - * - * The async variant is {@see NotebookServiceClient::getInstanceHealthAsync()} . - * - * @example samples/V1/NotebookServiceClient/get_instance_health.php - * - * @param GetInstanceHealthRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return GetInstanceHealthResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function getInstanceHealth(GetInstanceHealthRequest $request, array $callOptions = []): GetInstanceHealthResponse - { - return $this->startApiCall('GetInstanceHealth', $request, $callOptions)->wait(); - } - - /** - * Gets details of schedule - * - * The async variant is {@see NotebookServiceClient::getScheduleAsync()} . - * - * @example samples/V1/NotebookServiceClient/get_schedule.php - * - * @param GetScheduleRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Schedule - * - * @throws ApiException Thrown if the API call fails. - */ - public function getSchedule(GetScheduleRequest $request, array $callOptions = []): Schedule - { - return $this->startApiCall('GetSchedule', $request, $callOptions)->wait(); - } - - /** - * Check if a notebook instance is upgradable. - * - * The async variant is {@see NotebookServiceClient::isInstanceUpgradeableAsync()} - * . - * - * @example samples/V1/NotebookServiceClient/is_instance_upgradeable.php - * - * @param IsInstanceUpgradeableRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return IsInstanceUpgradeableResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function isInstanceUpgradeable(IsInstanceUpgradeableRequest $request, array $callOptions = []): IsInstanceUpgradeableResponse - { - return $this->startApiCall('IsInstanceUpgradeable', $request, $callOptions)->wait(); - } - - /** - * Lists environments in a project. - * - * The async variant is {@see NotebookServiceClient::listEnvironmentsAsync()} . - * - * @example samples/V1/NotebookServiceClient/list_environments.php - * - * @param ListEnvironmentsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listEnvironments(ListEnvironmentsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListEnvironments', $request, $callOptions); - } - - /** - * Lists executions in a given project and location - * - * The async variant is {@see NotebookServiceClient::listExecutionsAsync()} . - * - * @example samples/V1/NotebookServiceClient/list_executions.php - * - * @param ListExecutionsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listExecutions(ListExecutionsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListExecutions', $request, $callOptions); - } - - /** - * Lists instances in a given project and location. - * - * The async variant is {@see NotebookServiceClient::listInstancesAsync()} . - * - * @example samples/V1/NotebookServiceClient/list_instances.php - * - * @param ListInstancesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listInstances(ListInstancesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListInstances', $request, $callOptions); - } - - /** - * Lists schedules in a given project and location. - * - * The async variant is {@see NotebookServiceClient::listSchedulesAsync()} . - * - * @example samples/V1/NotebookServiceClient/list_schedules.php - * - * @param ListSchedulesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listSchedules(ListSchedulesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListSchedules', $request, $callOptions); - } - - /** - * Registers an existing legacy notebook instance to the Notebooks API server. - * Legacy instances are instances created with the legacy Compute Engine - * calls. They are not manageable by the Notebooks API out of the box. This - * call makes these instances manageable by the Notebooks API. - * - * The async variant is {@see NotebookServiceClient::registerInstanceAsync()} . - * - * @example samples/V1/NotebookServiceClient/register_instance.php - * - * @param RegisterInstanceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function registerInstance(RegisterInstanceRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('RegisterInstance', $request, $callOptions)->wait(); - } - - /** - * Allows notebook instances to - * report their latest instance information to the Notebooks - * API server. The server will merge the reported information to - * the instance metadata store. Do not use this method directly. - * - * The async variant is {@see NotebookServiceClient::reportInstanceInfoAsync()} . - * - * @example samples/V1/NotebookServiceClient/report_instance_info.php - * - * @param ReportInstanceInfoRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function reportInstanceInfo(ReportInstanceInfoRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('ReportInstanceInfo', $request, $callOptions)->wait(); - } - - /** - * Resets a notebook instance. - * - * The async variant is {@see NotebookServiceClient::resetInstanceAsync()} . - * - * @example samples/V1/NotebookServiceClient/reset_instance.php - * - * @param ResetInstanceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function resetInstance(ResetInstanceRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('ResetInstance', $request, $callOptions)->wait(); - } - - /** - * Rollbacks a notebook instance to the previous version. - * - * The async variant is {@see NotebookServiceClient::rollbackInstanceAsync()} . - * - * @example samples/V1/NotebookServiceClient/rollback_instance.php - * - * @param RollbackInstanceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function rollbackInstance(RollbackInstanceRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('RollbackInstance', $request, $callOptions)->wait(); - } - - /** - * Updates the guest accelerators of a single Instance. - * - * The async variant is {@see NotebookServiceClient::setInstanceAcceleratorAsync()} - * . - * - * @example samples/V1/NotebookServiceClient/set_instance_accelerator.php - * - * @param SetInstanceAcceleratorRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function setInstanceAccelerator(SetInstanceAcceleratorRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('SetInstanceAccelerator', $request, $callOptions)->wait(); - } - - /** - * Replaces all the labels of an Instance. - * - * The async variant is {@see NotebookServiceClient::setInstanceLabelsAsync()} . - * - * @example samples/V1/NotebookServiceClient/set_instance_labels.php - * - * @param SetInstanceLabelsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function setInstanceLabels(SetInstanceLabelsRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('SetInstanceLabels', $request, $callOptions)->wait(); - } - - /** - * Updates the machine type of a single Instance. - * - * The async variant is {@see NotebookServiceClient::setInstanceMachineTypeAsync()} - * . - * - * @example samples/V1/NotebookServiceClient/set_instance_machine_type.php - * - * @param SetInstanceMachineTypeRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function setInstanceMachineType(SetInstanceMachineTypeRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('SetInstanceMachineType', $request, $callOptions)->wait(); - } - - /** - * Starts a notebook instance. - * - * The async variant is {@see NotebookServiceClient::startInstanceAsync()} . - * - * @example samples/V1/NotebookServiceClient/start_instance.php - * - * @param StartInstanceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function startInstance(StartInstanceRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('StartInstance', $request, $callOptions)->wait(); - } - - /** - * Stops a notebook instance. - * - * The async variant is {@see NotebookServiceClient::stopInstanceAsync()} . - * - * @example samples/V1/NotebookServiceClient/stop_instance.php - * - * @param StopInstanceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function stopInstance(StopInstanceRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('StopInstance', $request, $callOptions)->wait(); - } - - /** - * Triggers execution of an existing schedule. - * - * The async variant is {@see NotebookServiceClient::triggerScheduleAsync()} . - * - * @example samples/V1/NotebookServiceClient/trigger_schedule.php - * - * @param TriggerScheduleRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function triggerSchedule(TriggerScheduleRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('TriggerSchedule', $request, $callOptions)->wait(); - } - - /** - * Update Notebook Instance configurations. - * - * The async variant is {@see NotebookServiceClient::updateInstanceConfigAsync()} . - * - * @example samples/V1/NotebookServiceClient/update_instance_config.php - * - * @param UpdateInstanceConfigRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateInstanceConfig(UpdateInstanceConfigRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateInstanceConfig', $request, $callOptions)->wait(); - } - - /** - * Add/update metadata items for an instance. - * - * The async variant is - * {@see NotebookServiceClient::updateInstanceMetadataItemsAsync()} . - * - * @example samples/V1/NotebookServiceClient/update_instance_metadata_items.php - * - * @param UpdateInstanceMetadataItemsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return UpdateInstanceMetadataItemsResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateInstanceMetadataItems(UpdateInstanceMetadataItemsRequest $request, array $callOptions = []): UpdateInstanceMetadataItemsResponse - { - return $this->startApiCall('UpdateInstanceMetadataItems', $request, $callOptions)->wait(); - } - - /** - * Updates the Shielded instance configuration of a single Instance. - * - * The async variant is - * {@see NotebookServiceClient::updateShieldedInstanceConfigAsync()} . - * - * @example samples/V1/NotebookServiceClient/update_shielded_instance_config.php - * - * @param UpdateShieldedInstanceConfigRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateShieldedInstanceConfig(UpdateShieldedInstanceConfigRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateShieldedInstanceConfig', $request, $callOptions)->wait(); - } - - /** - * Upgrades a notebook instance to the latest version. - * - * The async variant is {@see NotebookServiceClient::upgradeInstanceAsync()} . - * - * @example samples/V1/NotebookServiceClient/upgrade_instance.php - * - * @param UpgradeInstanceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function upgradeInstance(UpgradeInstanceRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpgradeInstance', $request, $callOptions)->wait(); - } - - /** - * Allows notebook instances to - * call this endpoint to upgrade themselves. Do not use this method directly. - * - * The async variant is - * {@see NotebookServiceClient::upgradeInstanceInternalAsync()} . - * - * @example samples/V1/NotebookServiceClient/upgrade_instance_internal.php - * - * @param UpgradeInstanceInternalRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function upgradeInstanceInternal(UpgradeInstanceInternalRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpgradeInstanceInternal', $request, $callOptions)->wait(); - } - - /** - * Gets information about a location. - * - * The async variant is {@see NotebookServiceClient::getLocationAsync()} . - * - * @example samples/V1/NotebookServiceClient/get_location.php - * - * @param GetLocationRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Location - * - * @throws ApiException Thrown if the API call fails. - */ - public function getLocation(GetLocationRequest $request, array $callOptions = []): Location - { - return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * The async variant is {@see NotebookServiceClient::listLocationsAsync()} . - * - * @example samples/V1/NotebookServiceClient/list_locations.php - * - * @param ListLocationsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListLocations', $request, $callOptions); - } - - /** - * Gets the access control policy for a resource. Returns an empty policy - if the resource exists and does not have a policy set. - * - * The async variant is {@see NotebookServiceClient::getIamPolicyAsync()} . - * - * @example samples/V1/NotebookServiceClient/get_iam_policy.php - * - * @param GetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * Sets the access control policy on the specified resource. Replaces - any existing policy. - - Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` - errors. - * - * The async variant is {@see NotebookServiceClient::setIamPolicyAsync()} . - * - * @example samples/V1/NotebookServiceClient/set_iam_policy.php - * - * @param SetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * Returns permissions that a caller has on the specified resource. If the - resource does not exist, this will return an empty set of - permissions, not a `NOT_FOUND` error. - - Note: This operation is designed to be used for building - permission-aware UIs and command-line tools, not for authorization - checking. This operation may "fail open" without warning. - * - * The async variant is {@see NotebookServiceClient::testIamPermissionsAsync()} . - * - * @example samples/V1/NotebookServiceClient/test_iam_permissions.php - * - * @param TestIamPermissionsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return TestIamPermissionsResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse - { - return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/Notebooks/v1/src/V1/gapic_metadata.json b/owl-bot-staging/Notebooks/v1/src/V1/gapic_metadata.json deleted file mode 100644 index 3d59111ebb81..000000000000 --- a/owl-bot-staging/Notebooks/v1/src/V1/gapic_metadata.json +++ /dev/null @@ -1,312 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.notebooks.v1", - "libraryPackage": "Google\\Cloud\\Notebooks\\V1", - "services": { - "ManagedNotebookService": { - "clients": { - "grpc": { - "libraryClient": "ManagedNotebookServiceGapicClient", - "rpcs": { - "CreateRuntime": { - "methods": [ - "createRuntime" - ] - }, - "DeleteRuntime": { - "methods": [ - "deleteRuntime" - ] - }, - "DiagnoseRuntime": { - "methods": [ - "diagnoseRuntime" - ] - }, - "GetRuntime": { - "methods": [ - "getRuntime" - ] - }, - "ListRuntimes": { - "methods": [ - "listRuntimes" - ] - }, - "RefreshRuntimeTokenInternal": { - "methods": [ - "refreshRuntimeTokenInternal" - ] - }, - "ReportRuntimeEvent": { - "methods": [ - "reportRuntimeEvent" - ] - }, - "ResetRuntime": { - "methods": [ - "resetRuntime" - ] - }, - "StartRuntime": { - "methods": [ - "startRuntime" - ] - }, - "StopRuntime": { - "methods": [ - "stopRuntime" - ] - }, - "SwitchRuntime": { - "methods": [ - "switchRuntime" - ] - }, - "UpdateRuntime": { - "methods": [ - "updateRuntime" - ] - }, - "UpgradeRuntime": { - "methods": [ - "upgradeRuntime" - ] - }, - "GetLocation": { - "methods": [ - "getLocation" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - }, - "GetIamPolicy": { - "methods": [ - "getIamPolicy" - ] - }, - "SetIamPolicy": { - "methods": [ - "setIamPolicy" - ] - }, - "TestIamPermissions": { - "methods": [ - "testIamPermissions" - ] - } - } - } - } - }, - "NotebookService": { - "clients": { - "grpc": { - "libraryClient": "NotebookServiceGapicClient", - "rpcs": { - "CreateEnvironment": { - "methods": [ - "createEnvironment" - ] - }, - "CreateExecution": { - "methods": [ - "createExecution" - ] - }, - "CreateInstance": { - "methods": [ - "createInstance" - ] - }, - "CreateSchedule": { - "methods": [ - "createSchedule" - ] - }, - "DeleteEnvironment": { - "methods": [ - "deleteEnvironment" - ] - }, - "DeleteExecution": { - "methods": [ - "deleteExecution" - ] - }, - "DeleteInstance": { - "methods": [ - "deleteInstance" - ] - }, - "DeleteSchedule": { - "methods": [ - "deleteSchedule" - ] - }, - "DiagnoseInstance": { - "methods": [ - "diagnoseInstance" - ] - }, - "GetEnvironment": { - "methods": [ - "getEnvironment" - ] - }, - "GetExecution": { - "methods": [ - "getExecution" - ] - }, - "GetInstance": { - "methods": [ - "getInstance" - ] - }, - "GetInstanceHealth": { - "methods": [ - "getInstanceHealth" - ] - }, - "GetSchedule": { - "methods": [ - "getSchedule" - ] - }, - "IsInstanceUpgradeable": { - "methods": [ - "isInstanceUpgradeable" - ] - }, - "ListEnvironments": { - "methods": [ - "listEnvironments" - ] - }, - "ListExecutions": { - "methods": [ - "listExecutions" - ] - }, - "ListInstances": { - "methods": [ - "listInstances" - ] - }, - "ListSchedules": { - "methods": [ - "listSchedules" - ] - }, - "RegisterInstance": { - "methods": [ - "registerInstance" - ] - }, - "ReportInstanceInfo": { - "methods": [ - "reportInstanceInfo" - ] - }, - "ResetInstance": { - "methods": [ - "resetInstance" - ] - }, - "RollbackInstance": { - "methods": [ - "rollbackInstance" - ] - }, - "SetInstanceAccelerator": { - "methods": [ - "setInstanceAccelerator" - ] - }, - "SetInstanceLabels": { - "methods": [ - "setInstanceLabels" - ] - }, - "SetInstanceMachineType": { - "methods": [ - "setInstanceMachineType" - ] - }, - "StartInstance": { - "methods": [ - "startInstance" - ] - }, - "StopInstance": { - "methods": [ - "stopInstance" - ] - }, - "TriggerSchedule": { - "methods": [ - "triggerSchedule" - ] - }, - "UpdateInstanceConfig": { - "methods": [ - "updateInstanceConfig" - ] - }, - "UpdateInstanceMetadataItems": { - "methods": [ - "updateInstanceMetadataItems" - ] - }, - "UpdateShieldedInstanceConfig": { - "methods": [ - "updateShieldedInstanceConfig" - ] - }, - "UpgradeInstance": { - "methods": [ - "upgradeInstance" - ] - }, - "UpgradeInstanceInternal": { - "methods": [ - "upgradeInstanceInternal" - ] - }, - "GetLocation": { - "methods": [ - "getLocation" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - }, - "GetIamPolicy": { - "methods": [ - "getIamPolicy" - ] - }, - "SetIamPolicy": { - "methods": [ - "setIamPolicy" - ] - }, - "TestIamPermissions": { - "methods": [ - "testIamPermissions" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/Notebooks/v1/src/V1/resources/managed_notebook_service_client_config.json b/owl-bot-staging/Notebooks/v1/src/V1/resources/managed_notebook_service_client_config.json deleted file mode 100644 index e5ec07cbdb99..000000000000 --- a/owl-bot-staging/Notebooks/v1/src/V1/resources/managed_notebook_service_client_config.json +++ /dev/null @@ -1,134 +0,0 @@ -{ - "interfaces": { - "google.cloud.notebooks.v1.ManagedNotebookService": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE" - ], - "no_retry_1_codes": [] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "retry_policy_1_params": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - }, - "no_retry_1_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": { - "CreateRuntime": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteRuntime": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DiagnoseRuntime": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetRuntime": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListRuntimes": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "RefreshRuntimeTokenInternal": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ReportRuntimeEvent": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ResetRuntime": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "StartRuntime": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "StopRuntime": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "SwitchRuntime": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateRuntime": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpgradeRuntime": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetLocation": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListLocations": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "SetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "TestIamPermissions": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/Notebooks/v1/src/V1/resources/managed_notebook_service_descriptor_config.php b/owl-bot-staging/Notebooks/v1/src/V1/resources/managed_notebook_service_descriptor_config.php deleted file mode 100644 index 6398bbee3ac6..000000000000 --- a/owl-bot-staging/Notebooks/v1/src/V1/resources/managed_notebook_service_descriptor_config.php +++ /dev/null @@ -1,340 +0,0 @@ - [ - 'google.cloud.notebooks.v1.ManagedNotebookService' => [ - 'CreateRuntime' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Notebooks\V1\Runtime', - 'metadataReturnType' => '\Google\Cloud\Notebooks\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteRuntime' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\Notebooks\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DiagnoseRuntime' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Notebooks\V1\Runtime', - 'metadataReturnType' => '\Google\Cloud\Notebooks\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ReportRuntimeEvent' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Notebooks\V1\Runtime', - 'metadataReturnType' => '\Google\Cloud\Notebooks\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ResetRuntime' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Notebooks\V1\Runtime', - 'metadataReturnType' => '\Google\Cloud\Notebooks\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'StartRuntime' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Notebooks\V1\Runtime', - 'metadataReturnType' => '\Google\Cloud\Notebooks\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'StopRuntime' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Notebooks\V1\Runtime', - 'metadataReturnType' => '\Google\Cloud\Notebooks\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'SwitchRuntime' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Notebooks\V1\Runtime', - 'metadataReturnType' => '\Google\Cloud\Notebooks\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateRuntime' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Notebooks\V1\Runtime', - 'metadataReturnType' => '\Google\Cloud\Notebooks\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'runtime.name', - 'fieldAccessors' => [ - 'getRuntime', - 'getName', - ], - ], - ], - ], - 'UpgradeRuntime' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Notebooks\V1\Runtime', - 'metadataReturnType' => '\Google\Cloud\Notebooks\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetRuntime' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Notebooks\V1\Runtime', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListRuntimes' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getRuntimes', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Notebooks\V1\ListRuntimesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'RefreshRuntimeTokenInternal' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Notebooks\V1\RefreshRuntimeTokenInternalResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetLocation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Location\Location', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'ListLocations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLocations', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'GetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'SetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'TestIamPermissions' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'templateMap' => [ - 'location' => 'projects/{project}/locations/{location}', - 'runtime' => 'projects/{project}/locations/{location}/runtimes/{runtime}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Notebooks/v1/src/V1/resources/managed_notebook_service_rest_client_config.php b/owl-bot-staging/Notebooks/v1/src/V1/resources/managed_notebook_service_rest_client_config.php deleted file mode 100644 index 8a16450224c1..000000000000 --- a/owl-bot-staging/Notebooks/v1/src/V1/resources/managed_notebook_service_rest_client_config.php +++ /dev/null @@ -1,317 +0,0 @@ - [ - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.cloud.notebooks.v1.ManagedNotebookService' => [ - 'CreateRuntime' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/runtimes', - 'body' => 'runtime', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'runtime_id', - ], - ], - 'DeleteRuntime' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/runtimes/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DiagnoseRuntime' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/runtimes/*}:diagnose', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetRuntime' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/runtimes/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListRuntimes' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/runtimes', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'RefreshRuntimeTokenInternal' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/runtimes/*}:refreshRuntimeTokenInternal', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ReportRuntimeEvent' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/runtimes/*}:reportEvent', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ResetRuntime' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/runtimes/*}:reset', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'StartRuntime' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/runtimes/*}:start', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'StopRuntime' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/runtimes/*}:stop', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'SwitchRuntime' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/runtimes/*}:switch', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'UpdateRuntime' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{runtime.name=projects/*/locations/*/runtimes/*}', - 'body' => 'runtime', - 'placeholders' => [ - 'runtime.name' => [ - 'getters' => [ - 'getRuntime', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpgradeRuntime' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/runtimes/*}:upgrade', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.iam.v1.IAMPolicy' => [ - 'GetIamPolicy' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/instances/*}:getIamPolicy', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/runtimes/*}:getIamPolicy', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/instances/*}:setIamPolicy', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/runtimes/*}:setIamPolicy', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/instances/*}:testIamPermissions', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/runtimes/*}:testIamPermissions', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Notebooks/v1/src/V1/resources/notebook_service_client_config.json b/owl-bot-staging/Notebooks/v1/src/V1/resources/notebook_service_client_config.json deleted file mode 100644 index d99ebdb4339e..000000000000 --- a/owl-bot-staging/Notebooks/v1/src/V1/resources/notebook_service_client_config.json +++ /dev/null @@ -1,239 +0,0 @@ -{ - "interfaces": { - "google.cloud.notebooks.v1.NotebookService": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE" - ], - "no_retry_1_codes": [] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "retry_policy_1_params": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - }, - "no_retry_1_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": { - "CreateEnvironment": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateExecution": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateInstance": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateSchedule": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteEnvironment": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteExecution": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteInstance": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteSchedule": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DiagnoseInstance": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetEnvironment": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetExecution": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetInstance": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetInstanceHealth": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetSchedule": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "IsInstanceUpgradeable": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListEnvironments": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListExecutions": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListInstances": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListSchedules": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "RegisterInstance": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ReportInstanceInfo": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ResetInstance": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "RollbackInstance": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "SetInstanceAccelerator": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "SetInstanceLabels": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "SetInstanceMachineType": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "StartInstance": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "StopInstance": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "TriggerSchedule": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateInstanceConfig": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateInstanceMetadataItems": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateShieldedInstanceConfig": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpgradeInstance": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpgradeInstanceInternal": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetLocation": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListLocations": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "SetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "TestIamPermissions": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/Notebooks/v1/src/V1/resources/notebook_service_descriptor_config.php b/owl-bot-staging/Notebooks/v1/src/V1/resources/notebook_service_descriptor_config.php deleted file mode 100644 index 4bfb6bac1601..000000000000 --- a/owl-bot-staging/Notebooks/v1/src/V1/resources/notebook_service_descriptor_config.php +++ /dev/null @@ -1,709 +0,0 @@ - [ - 'google.cloud.notebooks.v1.NotebookService' => [ - 'CreateEnvironment' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Notebooks\V1\Environment', - 'metadataReturnType' => '\Google\Cloud\Notebooks\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateExecution' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Notebooks\V1\Execution', - 'metadataReturnType' => '\Google\Cloud\Notebooks\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateInstance' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Notebooks\V1\Instance', - 'metadataReturnType' => '\Google\Cloud\Notebooks\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateSchedule' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Notebooks\V1\Schedule', - 'metadataReturnType' => '\Google\Cloud\Notebooks\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteEnvironment' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\Notebooks\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteExecution' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\Notebooks\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteInstance' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\Notebooks\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteSchedule' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\Notebooks\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DiagnoseInstance' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Notebooks\V1\Instance', - 'metadataReturnType' => '\Google\Cloud\Notebooks\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'RegisterInstance' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Notebooks\V1\Instance', - 'metadataReturnType' => '\Google\Cloud\Notebooks\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ReportInstanceInfo' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Notebooks\V1\Instance', - 'metadataReturnType' => '\Google\Cloud\Notebooks\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ResetInstance' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Notebooks\V1\Instance', - 'metadataReturnType' => '\Google\Cloud\Notebooks\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'RollbackInstance' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Notebooks\V1\Instance', - 'metadataReturnType' => '\Google\Cloud\Notebooks\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'SetInstanceAccelerator' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Notebooks\V1\Instance', - 'metadataReturnType' => '\Google\Cloud\Notebooks\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'SetInstanceLabels' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Notebooks\V1\Instance', - 'metadataReturnType' => '\Google\Cloud\Notebooks\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'SetInstanceMachineType' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Notebooks\V1\Instance', - 'metadataReturnType' => '\Google\Cloud\Notebooks\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'StartInstance' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Notebooks\V1\Instance', - 'metadataReturnType' => '\Google\Cloud\Notebooks\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'StopInstance' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Notebooks\V1\Instance', - 'metadataReturnType' => '\Google\Cloud\Notebooks\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'TriggerSchedule' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Notebooks\V1\Schedule', - 'metadataReturnType' => '\Google\Cloud\Notebooks\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateInstanceConfig' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Notebooks\V1\Instance', - 'metadataReturnType' => '\Google\Cloud\Notebooks\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateShieldedInstanceConfig' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Notebooks\V1\Instance', - 'metadataReturnType' => '\Google\Cloud\Notebooks\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpgradeInstance' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Notebooks\V1\Instance', - 'metadataReturnType' => '\Google\Cloud\Notebooks\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpgradeInstanceInternal' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Notebooks\V1\Instance', - 'metadataReturnType' => '\Google\Cloud\Notebooks\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetEnvironment' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Notebooks\V1\Environment', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetExecution' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Notebooks\V1\Execution', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetInstance' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Notebooks\V1\Instance', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetInstanceHealth' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Notebooks\V1\GetInstanceHealthResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetSchedule' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Notebooks\V1\Schedule', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'IsInstanceUpgradeable' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Notebooks\V1\IsInstanceUpgradeableResponse', - 'headerParams' => [ - [ - 'keyName' => 'notebook_instance', - 'fieldAccessors' => [ - 'getNotebookInstance', - ], - ], - ], - ], - 'ListEnvironments' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getEnvironments', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Notebooks\V1\ListEnvironmentsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListExecutions' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getExecutions', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Notebooks\V1\ListExecutionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListInstances' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getInstances', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Notebooks\V1\ListInstancesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListSchedules' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getSchedules', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Notebooks\V1\ListSchedulesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateInstanceMetadataItems' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Notebooks\V1\UpdateInstanceMetadataItemsResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetLocation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Location\Location', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'ListLocations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLocations', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'GetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'SetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'TestIamPermissions' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'templateMap' => [ - 'environment' => 'projects/{project}/environments/{environment}', - 'execution' => 'projects/{project}/location/{location}/executions/{execution}', - 'instance' => 'projects/{project}/instances/{instance}', - 'schedule' => 'projects/{project}/location/{location}/schedules/{schedule}', - 'tensorboard' => 'projects/{project}/locations/{location}/tensorboards/{tensorboard}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Notebooks/v1/src/V1/resources/notebook_service_rest_client_config.php b/owl-bot-staging/Notebooks/v1/src/V1/resources/notebook_service_rest_client_config.php deleted file mode 100644 index ab6bb270a12e..000000000000 --- a/owl-bot-staging/Notebooks/v1/src/V1/resources/notebook_service_rest_client_config.php +++ /dev/null @@ -1,563 +0,0 @@ - [ - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.cloud.notebooks.v1.NotebookService' => [ - 'CreateEnvironment' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/environments', - 'body' => 'environment', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'environment_id', - ], - ], - 'CreateExecution' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/executions', - 'body' => 'execution', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'execution_id', - ], - ], - 'CreateInstance' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/instances', - 'body' => 'instance', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'instance_id', - ], - ], - 'CreateSchedule' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/schedules', - 'body' => 'schedule', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'schedule_id', - ], - ], - 'DeleteEnvironment' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/environments/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteExecution' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/executions/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteInstance' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteSchedule' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/schedules/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DiagnoseInstance' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*}:diagnose', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetEnvironment' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/environments/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetExecution' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/executions/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetInstance' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetInstanceHealth' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*}:getInstanceHealth', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetSchedule' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/schedules/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'IsInstanceUpgradeable' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{notebook_instance=projects/*/locations/*/instances/*}:isUpgradeable', - 'placeholders' => [ - 'notebook_instance' => [ - 'getters' => [ - 'getNotebookInstance', - ], - ], - ], - ], - 'ListEnvironments' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/environments', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListExecutions' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/executions', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListInstances' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/instances', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListSchedules' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/schedules', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'RegisterInstance' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/instances:register', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ReportInstanceInfo' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*}:report', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ResetInstance' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*}:reset', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'RollbackInstance' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*}:rollback', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'SetInstanceAccelerator' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*}:setAccelerator', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'SetInstanceLabels' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*}:setLabels', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'SetInstanceMachineType' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*}:setMachineType', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'StartInstance' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*}:start', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'StopInstance' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*}:stop', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'TriggerSchedule' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/schedules/*}:trigger', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'UpdateInstanceConfig' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*}:updateConfig', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'UpdateInstanceMetadataItems' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*}:updateMetadataItems', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'UpdateShieldedInstanceConfig' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*}:updateShieldedInstanceConfig', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'UpgradeInstance' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*}:upgrade', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'UpgradeInstanceInternal' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*}:upgradeInternal', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.iam.v1.IAMPolicy' => [ - 'GetIamPolicy' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/instances/*}:getIamPolicy', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/runtimes/*}:getIamPolicy', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/instances/*}:setIamPolicy', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/runtimes/*}:setIamPolicy', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/instances/*}:testIamPermissions', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{resource=projects/*/locations/*/runtimes/*}:testIamPermissions', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Notebooks/v1/tests/Unit/V1/Client/ManagedNotebookServiceClientTest.php b/owl-bot-staging/Notebooks/v1/tests/Unit/V1/Client/ManagedNotebookServiceClientTest.php deleted file mode 100644 index 561fca0d704c..000000000000 --- a/owl-bot-staging/Notebooks/v1/tests/Unit/V1/Client/ManagedNotebookServiceClientTest.php +++ /dev/null @@ -1,1971 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return ManagedNotebookServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new ManagedNotebookServiceClient($options); - } - - /** @test */ - public function createRuntimeTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createRuntimeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $expectedResponse = new Runtime(); - $expectedResponse->setName($name); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createRuntimeTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->runtimeName('[PROJECT]', '[LOCATION]', '[RUNTIME]'); - $runtimeId = 'runtimeId-529829150'; - $runtime = new Runtime(); - $request = (new CreateRuntimeRequest()) - ->setParent($formattedParent) - ->setRuntimeId($runtimeId) - ->setRuntime($runtime); - $response = $gapicClient->createRuntime($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.notebooks.v1.ManagedNotebookService/CreateRuntime', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getRuntimeId(); - $this->assertProtobufEquals($runtimeId, $actualValue); - $actualValue = $actualApiRequestObject->getRuntime(); - $this->assertProtobufEquals($runtime, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createRuntimeTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createRuntimeExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createRuntimeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->runtimeName('[PROJECT]', '[LOCATION]', '[RUNTIME]'); - $runtimeId = 'runtimeId-529829150'; - $runtime = new Runtime(); - $request = (new CreateRuntimeRequest()) - ->setParent($formattedParent) - ->setRuntimeId($runtimeId) - ->setRuntime($runtime); - $response = $gapicClient->createRuntime($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createRuntimeTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteRuntimeTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteRuntimeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteRuntimeTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->runtimeName('[PROJECT]', '[LOCATION]', '[RUNTIME]'); - $request = (new DeleteRuntimeRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteRuntime($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.notebooks.v1.ManagedNotebookService/DeleteRuntime', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteRuntimeTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteRuntimeExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteRuntimeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->runtimeName('[PROJECT]', '[LOCATION]', '[RUNTIME]'); - $request = (new DeleteRuntimeRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteRuntime($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteRuntimeTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function diagnoseRuntimeTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/diagnoseRuntimeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $expectedResponse = new Runtime(); - $expectedResponse->setName($name2); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/diagnoseRuntimeTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->runtimeName('[PROJECT]', '[LOCATION]', '[RUNTIME]'); - $diagnosticConfig = new DiagnosticConfig(); - $diagnosticConfigGcsBucket = 'diagnosticConfigGcsBucket-1116063720'; - $diagnosticConfig->setGcsBucket($diagnosticConfigGcsBucket); - $request = (new DiagnoseRuntimeRequest()) - ->setName($formattedName) - ->setDiagnosticConfig($diagnosticConfig); - $response = $gapicClient->diagnoseRuntime($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.notebooks.v1.ManagedNotebookService/DiagnoseRuntime', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualApiRequestObject->getDiagnosticConfig(); - $this->assertProtobufEquals($diagnosticConfig, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/diagnoseRuntimeTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function diagnoseRuntimeExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/diagnoseRuntimeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->runtimeName('[PROJECT]', '[LOCATION]', '[RUNTIME]'); - $diagnosticConfig = new DiagnosticConfig(); - $diagnosticConfigGcsBucket = 'diagnosticConfigGcsBucket-1116063720'; - $diagnosticConfig->setGcsBucket($diagnosticConfigGcsBucket); - $request = (new DiagnoseRuntimeRequest()) - ->setName($formattedName) - ->setDiagnosticConfig($diagnosticConfig); - $response = $gapicClient->diagnoseRuntime($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/diagnoseRuntimeTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getRuntimeTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new Runtime(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->runtimeName('[PROJECT]', '[LOCATION]', '[RUNTIME]'); - $request = (new GetRuntimeRequest()) - ->setName($formattedName); - $response = $gapicClient->getRuntime($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.notebooks.v1.ManagedNotebookService/GetRuntime', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getRuntimeExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->runtimeName('[PROJECT]', '[LOCATION]', '[RUNTIME]'); - $request = (new GetRuntimeRequest()) - ->setName($formattedName); - try { - $gapicClient->getRuntime($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listRuntimesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $runtimesElement = new Runtime(); - $runtimes = [ - $runtimesElement, - ]; - $expectedResponse = new ListRuntimesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setRuntimes($runtimes); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListRuntimesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listRuntimes($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getRuntimes()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.notebooks.v1.ManagedNotebookService/ListRuntimes', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listRuntimesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListRuntimesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listRuntimes($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function refreshRuntimeTokenInternalTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $accessToken = 'accessToken-1938933922'; - $expectedResponse = new RefreshRuntimeTokenInternalResponse(); - $expectedResponse->setAccessToken($accessToken); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->runtimeName('[PROJECT]', '[LOCATION]', '[RUNTIME]'); - $vmId = 'vmId112317347'; - $request = (new RefreshRuntimeTokenInternalRequest()) - ->setName($formattedName) - ->setVmId($vmId); - $response = $gapicClient->refreshRuntimeTokenInternal($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.notebooks.v1.ManagedNotebookService/RefreshRuntimeTokenInternal', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getVmId(); - $this->assertProtobufEquals($vmId, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function refreshRuntimeTokenInternalExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->runtimeName('[PROJECT]', '[LOCATION]', '[RUNTIME]'); - $vmId = 'vmId112317347'; - $request = (new RefreshRuntimeTokenInternalRequest()) - ->setName($formattedName) - ->setVmId($vmId); - try { - $gapicClient->refreshRuntimeTokenInternal($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function reportRuntimeEventTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/reportRuntimeEventTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $expectedResponse = new Runtime(); - $expectedResponse->setName($name2); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/reportRuntimeEventTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->runtimeName('[PROJECT]', '[LOCATION]', '[RUNTIME]'); - $vmId = 'vmId112317347'; - $event = new Event(); - $request = (new ReportRuntimeEventRequest()) - ->setName($formattedName) - ->setVmId($vmId) - ->setEvent($event); - $response = $gapicClient->reportRuntimeEvent($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.notebooks.v1.ManagedNotebookService/ReportRuntimeEvent', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualApiRequestObject->getVmId(); - $this->assertProtobufEquals($vmId, $actualValue); - $actualValue = $actualApiRequestObject->getEvent(); - $this->assertProtobufEquals($event, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/reportRuntimeEventTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function reportRuntimeEventExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/reportRuntimeEventTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->runtimeName('[PROJECT]', '[LOCATION]', '[RUNTIME]'); - $vmId = 'vmId112317347'; - $event = new Event(); - $request = (new ReportRuntimeEventRequest()) - ->setName($formattedName) - ->setVmId($vmId) - ->setEvent($event); - $response = $gapicClient->reportRuntimeEvent($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/reportRuntimeEventTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function resetRuntimeTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/resetRuntimeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $expectedResponse = new Runtime(); - $expectedResponse->setName($name2); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/resetRuntimeTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $name = 'name3373707'; - $request = (new ResetRuntimeRequest()) - ->setName($name); - $response = $gapicClient->resetRuntime($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.notebooks.v1.ManagedNotebookService/ResetRuntime', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/resetRuntimeTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function resetRuntimeExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/resetRuntimeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $name = 'name3373707'; - $request = (new ResetRuntimeRequest()) - ->setName($name); - $response = $gapicClient->resetRuntime($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/resetRuntimeTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function startRuntimeTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/startRuntimeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $expectedResponse = new Runtime(); - $expectedResponse->setName($name2); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/startRuntimeTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $name = 'name3373707'; - $request = (new StartRuntimeRequest()) - ->setName($name); - $response = $gapicClient->startRuntime($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.notebooks.v1.ManagedNotebookService/StartRuntime', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/startRuntimeTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function startRuntimeExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/startRuntimeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $name = 'name3373707'; - $request = (new StartRuntimeRequest()) - ->setName($name); - $response = $gapicClient->startRuntime($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/startRuntimeTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function stopRuntimeTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/stopRuntimeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $expectedResponse = new Runtime(); - $expectedResponse->setName($name2); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/stopRuntimeTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $name = 'name3373707'; - $request = (new StopRuntimeRequest()) - ->setName($name); - $response = $gapicClient->stopRuntime($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.notebooks.v1.ManagedNotebookService/StopRuntime', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/stopRuntimeTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function stopRuntimeExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/stopRuntimeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $name = 'name3373707'; - $request = (new StopRuntimeRequest()) - ->setName($name); - $response = $gapicClient->stopRuntime($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/stopRuntimeTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function switchRuntimeTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/switchRuntimeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $expectedResponse = new Runtime(); - $expectedResponse->setName($name2); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/switchRuntimeTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $name = 'name3373707'; - $request = (new SwitchRuntimeRequest()) - ->setName($name); - $response = $gapicClient->switchRuntime($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.notebooks.v1.ManagedNotebookService/SwitchRuntime', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/switchRuntimeTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function switchRuntimeExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/switchRuntimeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $name = 'name3373707'; - $request = (new SwitchRuntimeRequest()) - ->setName($name); - $response = $gapicClient->switchRuntime($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/switchRuntimeTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateRuntimeTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateRuntimeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $expectedResponse = new Runtime(); - $expectedResponse->setName($name); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateRuntimeTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $runtime = new Runtime(); - $updateMask = new FieldMask(); - $request = (new UpdateRuntimeRequest()) - ->setRuntime($runtime) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateRuntime($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.notebooks.v1.ManagedNotebookService/UpdateRuntime', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getRuntime(); - $this->assertProtobufEquals($runtime, $actualValue); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateRuntimeTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateRuntimeExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateRuntimeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $runtime = new Runtime(); - $updateMask = new FieldMask(); - $request = (new UpdateRuntimeRequest()) - ->setRuntime($runtime) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateRuntime($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateRuntimeTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function upgradeRuntimeTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/upgradeRuntimeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $expectedResponse = new Runtime(); - $expectedResponse->setName($name2); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/upgradeRuntimeTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $name = 'name3373707'; - $request = (new UpgradeRuntimeRequest()) - ->setName($name); - $response = $gapicClient->upgradeRuntime($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.notebooks.v1.ManagedNotebookService/UpgradeRuntime', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/upgradeRuntimeTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function upgradeRuntimeExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/upgradeRuntimeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $name = 'name3373707'; - $request = (new UpgradeRuntimeRequest()) - ->setName($name); - $response = $gapicClient->upgradeRuntime($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/upgradeRuntimeTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getLocationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $locationId = 'locationId552319461'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Location(); - $expectedResponse->setName($name2); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - $request = new GetLocationRequest(); - $response = $gapicClient->getLocation($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new GetLocationRequest(); - try { - $gapicClient->getLocation($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $locationsElement = new Location(); - $locations = [ - $locationsElement, - ]; - $expectedResponse = new ListLocationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLocations($locations); - $transport->addResponse($expectedResponse); - $request = new ListLocationsRequest(); - $response = $gapicClient->listLocations($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new ListLocationsRequest(); - try { - $gapicClient->listLocations($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); - $response = $gapicClient->getIamPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); - try { - $gapicClient->getIamPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); - $response = $gapicClient->setIamPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPolicy(); - $this->assertProtobufEquals($policy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); - try { - $gapicClient->setIamPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new TestIamPermissionsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); - $response = $gapicClient->testIamPermissions($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPermissions(); - $this->assertProtobufEquals($permissions, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); - try { - $gapicClient->testIamPermissions($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createRuntimeAsyncTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createRuntimeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $expectedResponse = new Runtime(); - $expectedResponse->setName($name); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createRuntimeTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->runtimeName('[PROJECT]', '[LOCATION]', '[RUNTIME]'); - $runtimeId = 'runtimeId-529829150'; - $runtime = new Runtime(); - $request = (new CreateRuntimeRequest()) - ->setParent($formattedParent) - ->setRuntimeId($runtimeId) - ->setRuntime($runtime); - $response = $gapicClient->createRuntimeAsync($request)->wait(); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.notebooks.v1.ManagedNotebookService/CreateRuntime', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getRuntimeId(); - $this->assertProtobufEquals($runtimeId, $actualValue); - $actualValue = $actualApiRequestObject->getRuntime(); - $this->assertProtobufEquals($runtime, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createRuntimeTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } -} diff --git a/owl-bot-staging/Notebooks/v1/tests/Unit/V1/Client/NotebookServiceClientTest.php b/owl-bot-staging/Notebooks/v1/tests/Unit/V1/Client/NotebookServiceClientTest.php deleted file mode 100644 index 48455ba3ee8a..000000000000 --- a/owl-bot-staging/Notebooks/v1/tests/Unit/V1/Client/NotebookServiceClientTest.php +++ /dev/null @@ -1,4758 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return NotebookServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new NotebookServiceClient($options); - } - - /** @test */ - public function createEnvironmentTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createEnvironmentTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $postStartupScript = 'postStartupScript355382860'; - $expectedResponse = new Environment(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setPostStartupScript($postStartupScript); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createEnvironmentTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $parent = 'parent-995424086'; - $environmentId = 'environmentId608412359'; - $environment = new Environment(); - $request = (new CreateEnvironmentRequest()) - ->setParent($parent) - ->setEnvironmentId($environmentId) - ->setEnvironment($environment); - $response = $gapicClient->createEnvironment($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.notebooks.v1.NotebookService/CreateEnvironment', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); - $actualValue = $actualApiRequestObject->getEnvironmentId(); - $this->assertProtobufEquals($environmentId, $actualValue); - $actualValue = $actualApiRequestObject->getEnvironment(); - $this->assertProtobufEquals($environment, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createEnvironmentTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createEnvironmentExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createEnvironmentTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $parent = 'parent-995424086'; - $environmentId = 'environmentId608412359'; - $environment = new Environment(); - $request = (new CreateEnvironmentRequest()) - ->setParent($parent) - ->setEnvironmentId($environmentId) - ->setEnvironment($environment); - $response = $gapicClient->createEnvironment($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createEnvironmentTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createExecutionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createExecutionTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $outputNotebookFile = 'outputNotebookFile-1905093982'; - $jobUri = 'jobUri-1437570582'; - $expectedResponse = new Execution(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setOutputNotebookFile($outputNotebookFile); - $expectedResponse->setJobUri($jobUri); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createExecutionTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->executionName('[PROJECT]', '[LOCATION]', '[EXECUTION]'); - $executionId = 'executionId-1217171550'; - $execution = new Execution(); - $request = (new CreateExecutionRequest()) - ->setParent($formattedParent) - ->setExecutionId($executionId) - ->setExecution($execution); - $response = $gapicClient->createExecution($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.notebooks.v1.NotebookService/CreateExecution', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getExecutionId(); - $this->assertProtobufEquals($executionId, $actualValue); - $actualValue = $actualApiRequestObject->getExecution(); - $this->assertProtobufEquals($execution, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createExecutionTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createExecutionExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createExecutionTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->executionName('[PROJECT]', '[LOCATION]', '[EXECUTION]'); - $executionId = 'executionId-1217171550'; - $execution = new Execution(); - $request = (new CreateExecutionRequest()) - ->setParent($formattedParent) - ->setExecutionId($executionId) - ->setExecution($execution); - $response = $gapicClient->createExecution($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createExecutionTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createInstanceTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createInstanceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $postStartupScript = 'postStartupScript355382860'; - $proxyUri = 'proxyUri-475670501'; - $serviceAccount = 'serviceAccount-1948028253'; - $machineType = 'machineType1838323762'; - $installGpuDriver = false; - $customGpuDriverPath = 'customGpuDriverPath1863223803'; - $bootDiskSizeGb = 1398920548; - $dataDiskSizeGb = 1668379732; - $noRemoveDataDisk = false; - $kmsKey = 'kmsKey-591635343'; - $noPublicIp = false; - $noProxyAccess = false; - $network = 'network1843485230'; - $subnet = 'subnet-891534499'; - $creator = 'creator1028554796'; - $canIpForward = true; - $expectedResponse = new Instance(); - $expectedResponse->setName($name); - $expectedResponse->setPostStartupScript($postStartupScript); - $expectedResponse->setProxyUri($proxyUri); - $expectedResponse->setServiceAccount($serviceAccount); - $expectedResponse->setMachineType($machineType); - $expectedResponse->setInstallGpuDriver($installGpuDriver); - $expectedResponse->setCustomGpuDriverPath($customGpuDriverPath); - $expectedResponse->setBootDiskSizeGb($bootDiskSizeGb); - $expectedResponse->setDataDiskSizeGb($dataDiskSizeGb); - $expectedResponse->setNoRemoveDataDisk($noRemoveDataDisk); - $expectedResponse->setKmsKey($kmsKey); - $expectedResponse->setNoPublicIp($noPublicIp); - $expectedResponse->setNoProxyAccess($noProxyAccess); - $expectedResponse->setNetwork($network); - $expectedResponse->setSubnet($subnet); - $expectedResponse->setCreator($creator); - $expectedResponse->setCanIpForward($canIpForward); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createInstanceTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $parent = 'parent-995424086'; - $instanceId = 'instanceId-2101995259'; - $instance = new Instance(); - $instanceMachineType = 'instanceMachineType-107765684'; - $instance->setMachineType($instanceMachineType); - $request = (new CreateInstanceRequest()) - ->setParent($parent) - ->setInstanceId($instanceId) - ->setInstance($instance); - $response = $gapicClient->createInstance($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.notebooks.v1.NotebookService/CreateInstance', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); - $actualValue = $actualApiRequestObject->getInstanceId(); - $this->assertProtobufEquals($instanceId, $actualValue); - $actualValue = $actualApiRequestObject->getInstance(); - $this->assertProtobufEquals($instance, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createInstanceTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createInstanceExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createInstanceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $parent = 'parent-995424086'; - $instanceId = 'instanceId-2101995259'; - $instance = new Instance(); - $instanceMachineType = 'instanceMachineType-107765684'; - $instance->setMachineType($instanceMachineType); - $request = (new CreateInstanceRequest()) - ->setParent($parent) - ->setInstanceId($instanceId) - ->setInstance($instance); - $response = $gapicClient->createInstance($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createInstanceTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createScheduleTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createScheduleTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $cronSchedule = 'cronSchedule206244136'; - $timeZone = 'timeZone36848094'; - $expectedResponse = new Schedule(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setCronSchedule($cronSchedule); - $expectedResponse->setTimeZone($timeZone); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createScheduleTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->scheduleName('[PROJECT]', '[LOCATION]', '[SCHEDULE]'); - $scheduleId = 'scheduleId176047043'; - $schedule = new Schedule(); - $request = (new CreateScheduleRequest()) - ->setParent($formattedParent) - ->setScheduleId($scheduleId) - ->setSchedule($schedule); - $response = $gapicClient->createSchedule($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.notebooks.v1.NotebookService/CreateSchedule', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getScheduleId(); - $this->assertProtobufEquals($scheduleId, $actualValue); - $actualValue = $actualApiRequestObject->getSchedule(); - $this->assertProtobufEquals($schedule, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createScheduleTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createScheduleExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createScheduleTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->scheduleName('[PROJECT]', '[LOCATION]', '[SCHEDULE]'); - $scheduleId = 'scheduleId176047043'; - $schedule = new Schedule(); - $request = (new CreateScheduleRequest()) - ->setParent($formattedParent) - ->setScheduleId($scheduleId) - ->setSchedule($schedule); - $response = $gapicClient->createSchedule($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createScheduleTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteEnvironmentTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteEnvironmentTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteEnvironmentTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $name = 'name3373707'; - $request = (new DeleteEnvironmentRequest()) - ->setName($name); - $response = $gapicClient->deleteEnvironment($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.notebooks.v1.NotebookService/DeleteEnvironment', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteEnvironmentTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteEnvironmentExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteEnvironmentTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $name = 'name3373707'; - $request = (new DeleteEnvironmentRequest()) - ->setName($name); - $response = $gapicClient->deleteEnvironment($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteEnvironmentTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteExecutionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteExecutionTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteExecutionTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->executionName('[PROJECT]', '[LOCATION]', '[EXECUTION]'); - $request = (new DeleteExecutionRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteExecution($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.notebooks.v1.NotebookService/DeleteExecution', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteExecutionTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteExecutionExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteExecutionTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->executionName('[PROJECT]', '[LOCATION]', '[EXECUTION]'); - $request = (new DeleteExecutionRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteExecution($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteExecutionTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteInstanceTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteInstanceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteInstanceTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $name = 'name3373707'; - $request = (new DeleteInstanceRequest()) - ->setName($name); - $response = $gapicClient->deleteInstance($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.notebooks.v1.NotebookService/DeleteInstance', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteInstanceTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteInstanceExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteInstanceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $name = 'name3373707'; - $request = (new DeleteInstanceRequest()) - ->setName($name); - $response = $gapicClient->deleteInstance($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteInstanceTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteScheduleTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteScheduleTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteScheduleTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->scheduleName('[PROJECT]', '[LOCATION]', '[SCHEDULE]'); - $request = (new DeleteScheduleRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteSchedule($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.notebooks.v1.NotebookService/DeleteSchedule', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteScheduleTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteScheduleExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteScheduleTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->scheduleName('[PROJECT]', '[LOCATION]', '[SCHEDULE]'); - $request = (new DeleteScheduleRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteSchedule($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteScheduleTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function diagnoseInstanceTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/diagnoseInstanceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $postStartupScript = 'postStartupScript355382860'; - $proxyUri = 'proxyUri-475670501'; - $serviceAccount = 'serviceAccount-1948028253'; - $machineType = 'machineType1838323762'; - $installGpuDriver = false; - $customGpuDriverPath = 'customGpuDriverPath1863223803'; - $bootDiskSizeGb = 1398920548; - $dataDiskSizeGb = 1668379732; - $noRemoveDataDisk = false; - $kmsKey = 'kmsKey-591635343'; - $noPublicIp = false; - $noProxyAccess = false; - $network = 'network1843485230'; - $subnet = 'subnet-891534499'; - $creator = 'creator1028554796'; - $canIpForward = true; - $expectedResponse = new Instance(); - $expectedResponse->setName($name2); - $expectedResponse->setPostStartupScript($postStartupScript); - $expectedResponse->setProxyUri($proxyUri); - $expectedResponse->setServiceAccount($serviceAccount); - $expectedResponse->setMachineType($machineType); - $expectedResponse->setInstallGpuDriver($installGpuDriver); - $expectedResponse->setCustomGpuDriverPath($customGpuDriverPath); - $expectedResponse->setBootDiskSizeGb($bootDiskSizeGb); - $expectedResponse->setDataDiskSizeGb($dataDiskSizeGb); - $expectedResponse->setNoRemoveDataDisk($noRemoveDataDisk); - $expectedResponse->setKmsKey($kmsKey); - $expectedResponse->setNoPublicIp($noPublicIp); - $expectedResponse->setNoProxyAccess($noProxyAccess); - $expectedResponse->setNetwork($network); - $expectedResponse->setSubnet($subnet); - $expectedResponse->setCreator($creator); - $expectedResponse->setCanIpForward($canIpForward); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/diagnoseInstanceTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->instanceName('[PROJECT]', '[INSTANCE]'); - $diagnosticConfig = new DiagnosticConfig(); - $diagnosticConfigGcsBucket = 'diagnosticConfigGcsBucket-1116063720'; - $diagnosticConfig->setGcsBucket($diagnosticConfigGcsBucket); - $request = (new DiagnoseInstanceRequest()) - ->setName($formattedName) - ->setDiagnosticConfig($diagnosticConfig); - $response = $gapicClient->diagnoseInstance($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.notebooks.v1.NotebookService/DiagnoseInstance', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualApiRequestObject->getDiagnosticConfig(); - $this->assertProtobufEquals($diagnosticConfig, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/diagnoseInstanceTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function diagnoseInstanceExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/diagnoseInstanceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->instanceName('[PROJECT]', '[INSTANCE]'); - $diagnosticConfig = new DiagnosticConfig(); - $diagnosticConfigGcsBucket = 'diagnosticConfigGcsBucket-1116063720'; - $diagnosticConfig->setGcsBucket($diagnosticConfigGcsBucket); - $request = (new DiagnoseInstanceRequest()) - ->setName($formattedName) - ->setDiagnosticConfig($diagnosticConfig); - $response = $gapicClient->diagnoseInstance($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/diagnoseInstanceTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getEnvironmentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $postStartupScript = 'postStartupScript355382860'; - $expectedResponse = new Environment(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setPostStartupScript($postStartupScript); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $request = (new GetEnvironmentRequest()) - ->setName($name); - $response = $gapicClient->getEnvironment($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.notebooks.v1.NotebookService/GetEnvironment', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getEnvironmentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $name = 'name3373707'; - $request = (new GetEnvironmentRequest()) - ->setName($name); - try { - $gapicClient->getEnvironment($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getExecutionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $outputNotebookFile = 'outputNotebookFile-1905093982'; - $jobUri = 'jobUri-1437570582'; - $expectedResponse = new Execution(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setOutputNotebookFile($outputNotebookFile); - $expectedResponse->setJobUri($jobUri); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->executionName('[PROJECT]', '[LOCATION]', '[EXECUTION]'); - $request = (new GetExecutionRequest()) - ->setName($formattedName); - $response = $gapicClient->getExecution($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.notebooks.v1.NotebookService/GetExecution', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getExecutionExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->executionName('[PROJECT]', '[LOCATION]', '[EXECUTION]'); - $request = (new GetExecutionRequest()) - ->setName($formattedName); - try { - $gapicClient->getExecution($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getInstanceTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $postStartupScript = 'postStartupScript355382860'; - $proxyUri = 'proxyUri-475670501'; - $serviceAccount = 'serviceAccount-1948028253'; - $machineType = 'machineType1838323762'; - $installGpuDriver = false; - $customGpuDriverPath = 'customGpuDriverPath1863223803'; - $bootDiskSizeGb = 1398920548; - $dataDiskSizeGb = 1668379732; - $noRemoveDataDisk = false; - $kmsKey = 'kmsKey-591635343'; - $noPublicIp = false; - $noProxyAccess = false; - $network = 'network1843485230'; - $subnet = 'subnet-891534499'; - $creator = 'creator1028554796'; - $canIpForward = true; - $expectedResponse = new Instance(); - $expectedResponse->setName($name2); - $expectedResponse->setPostStartupScript($postStartupScript); - $expectedResponse->setProxyUri($proxyUri); - $expectedResponse->setServiceAccount($serviceAccount); - $expectedResponse->setMachineType($machineType); - $expectedResponse->setInstallGpuDriver($installGpuDriver); - $expectedResponse->setCustomGpuDriverPath($customGpuDriverPath); - $expectedResponse->setBootDiskSizeGb($bootDiskSizeGb); - $expectedResponse->setDataDiskSizeGb($dataDiskSizeGb); - $expectedResponse->setNoRemoveDataDisk($noRemoveDataDisk); - $expectedResponse->setKmsKey($kmsKey); - $expectedResponse->setNoPublicIp($noPublicIp); - $expectedResponse->setNoProxyAccess($noProxyAccess); - $expectedResponse->setNetwork($network); - $expectedResponse->setSubnet($subnet); - $expectedResponse->setCreator($creator); - $expectedResponse->setCanIpForward($canIpForward); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $request = (new GetInstanceRequest()) - ->setName($name); - $response = $gapicClient->getInstance($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.notebooks.v1.NotebookService/GetInstance', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getInstanceExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $name = 'name3373707'; - $request = (new GetInstanceRequest()) - ->setName($name); - try { - $gapicClient->getInstance($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getInstanceHealthTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GetInstanceHealthResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->instanceName('[PROJECT]', '[INSTANCE]'); - $request = (new GetInstanceHealthRequest()) - ->setName($formattedName); - $response = $gapicClient->getInstanceHealth($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.notebooks.v1.NotebookService/GetInstanceHealth', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getInstanceHealthExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->instanceName('[PROJECT]', '[INSTANCE]'); - $request = (new GetInstanceHealthRequest()) - ->setName($formattedName); - try { - $gapicClient->getInstanceHealth($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getScheduleTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $cronSchedule = 'cronSchedule206244136'; - $timeZone = 'timeZone36848094'; - $expectedResponse = new Schedule(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setCronSchedule($cronSchedule); - $expectedResponse->setTimeZone($timeZone); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->scheduleName('[PROJECT]', '[LOCATION]', '[SCHEDULE]'); - $request = (new GetScheduleRequest()) - ->setName($formattedName); - $response = $gapicClient->getSchedule($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.notebooks.v1.NotebookService/GetSchedule', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getScheduleExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->scheduleName('[PROJECT]', '[LOCATION]', '[SCHEDULE]'); - $request = (new GetScheduleRequest()) - ->setName($formattedName); - try { - $gapicClient->getSchedule($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function isInstanceUpgradeableTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $upgradeable = true; - $upgradeVersion = 'upgradeVersion1040155061'; - $upgradeInfo = 'upgradeInfo-1337232143'; - $upgradeImage = 'upgradeImage1495441784'; - $expectedResponse = new IsInstanceUpgradeableResponse(); - $expectedResponse->setUpgradeable($upgradeable); - $expectedResponse->setUpgradeVersion($upgradeVersion); - $expectedResponse->setUpgradeInfo($upgradeInfo); - $expectedResponse->setUpgradeImage($upgradeImage); - $transport->addResponse($expectedResponse); - // Mock request - $notebookInstance = 'notebookInstance-1078982023'; - $request = (new IsInstanceUpgradeableRequest()) - ->setNotebookInstance($notebookInstance); - $response = $gapicClient->isInstanceUpgradeable($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.notebooks.v1.NotebookService/IsInstanceUpgradeable', $actualFuncCall); - $actualValue = $actualRequestObject->getNotebookInstance(); - $this->assertProtobufEquals($notebookInstance, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function isInstanceUpgradeableExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $notebookInstance = 'notebookInstance-1078982023'; - $request = (new IsInstanceUpgradeableRequest()) - ->setNotebookInstance($notebookInstance); - try { - $gapicClient->isInstanceUpgradeable($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listEnvironmentsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $environmentsElement = new Environment(); - $environments = [ - $environmentsElement, - ]; - $expectedResponse = new ListEnvironmentsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setEnvironments($environments); - $transport->addResponse($expectedResponse); - // Mock request - $parent = 'parent-995424086'; - $request = (new ListEnvironmentsRequest()) - ->setParent($parent); - $response = $gapicClient->listEnvironments($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getEnvironments()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.notebooks.v1.NotebookService/ListEnvironments', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listEnvironmentsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $parent = 'parent-995424086'; - $request = (new ListEnvironmentsRequest()) - ->setParent($parent); - try { - $gapicClient->listEnvironments($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listExecutionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $executionsElement = new Execution(); - $executions = [ - $executionsElement, - ]; - $expectedResponse = new ListExecutionsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setExecutions($executions); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->executionName('[PROJECT]', '[LOCATION]', '[EXECUTION]'); - $request = (new ListExecutionsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listExecutions($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getExecutions()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.notebooks.v1.NotebookService/ListExecutions', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listExecutionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->executionName('[PROJECT]', '[LOCATION]', '[EXECUTION]'); - $request = (new ListExecutionsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listExecutions($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listInstancesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $instancesElement = new Instance(); - $instances = [ - $instancesElement, - ]; - $expectedResponse = new ListInstancesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setInstances($instances); - $transport->addResponse($expectedResponse); - // Mock request - $parent = 'parent-995424086'; - $request = (new ListInstancesRequest()) - ->setParent($parent); - $response = $gapicClient->listInstances($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getInstances()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.notebooks.v1.NotebookService/ListInstances', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listInstancesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $parent = 'parent-995424086'; - $request = (new ListInstancesRequest()) - ->setParent($parent); - try { - $gapicClient->listInstances($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listSchedulesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $schedulesElement = new Schedule(); - $schedules = [ - $schedulesElement, - ]; - $expectedResponse = new ListSchedulesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setSchedules($schedules); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->scheduleName('[PROJECT]', '[LOCATION]', '[SCHEDULE]'); - $request = (new ListSchedulesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listSchedules($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getSchedules()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.notebooks.v1.NotebookService/ListSchedules', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listSchedulesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->scheduleName('[PROJECT]', '[LOCATION]', '[SCHEDULE]'); - $request = (new ListSchedulesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listSchedules($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function registerInstanceTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/registerInstanceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $postStartupScript = 'postStartupScript355382860'; - $proxyUri = 'proxyUri-475670501'; - $serviceAccount = 'serviceAccount-1948028253'; - $machineType = 'machineType1838323762'; - $installGpuDriver = false; - $customGpuDriverPath = 'customGpuDriverPath1863223803'; - $bootDiskSizeGb = 1398920548; - $dataDiskSizeGb = 1668379732; - $noRemoveDataDisk = false; - $kmsKey = 'kmsKey-591635343'; - $noPublicIp = false; - $noProxyAccess = false; - $network = 'network1843485230'; - $subnet = 'subnet-891534499'; - $creator = 'creator1028554796'; - $canIpForward = true; - $expectedResponse = new Instance(); - $expectedResponse->setName($name); - $expectedResponse->setPostStartupScript($postStartupScript); - $expectedResponse->setProxyUri($proxyUri); - $expectedResponse->setServiceAccount($serviceAccount); - $expectedResponse->setMachineType($machineType); - $expectedResponse->setInstallGpuDriver($installGpuDriver); - $expectedResponse->setCustomGpuDriverPath($customGpuDriverPath); - $expectedResponse->setBootDiskSizeGb($bootDiskSizeGb); - $expectedResponse->setDataDiskSizeGb($dataDiskSizeGb); - $expectedResponse->setNoRemoveDataDisk($noRemoveDataDisk); - $expectedResponse->setKmsKey($kmsKey); - $expectedResponse->setNoPublicIp($noPublicIp); - $expectedResponse->setNoProxyAccess($noProxyAccess); - $expectedResponse->setNetwork($network); - $expectedResponse->setSubnet($subnet); - $expectedResponse->setCreator($creator); - $expectedResponse->setCanIpForward($canIpForward); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/registerInstanceTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $parent = 'parent-995424086'; - $instanceId = 'instanceId-2101995259'; - $request = (new RegisterInstanceRequest()) - ->setParent($parent) - ->setInstanceId($instanceId); - $response = $gapicClient->registerInstance($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.notebooks.v1.NotebookService/RegisterInstance', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); - $actualValue = $actualApiRequestObject->getInstanceId(); - $this->assertProtobufEquals($instanceId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/registerInstanceTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function registerInstanceExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/registerInstanceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $parent = 'parent-995424086'; - $instanceId = 'instanceId-2101995259'; - $request = (new RegisterInstanceRequest()) - ->setParent($parent) - ->setInstanceId($instanceId); - $response = $gapicClient->registerInstance($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/registerInstanceTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function reportInstanceInfoTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/reportInstanceInfoTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $postStartupScript = 'postStartupScript355382860'; - $proxyUri = 'proxyUri-475670501'; - $serviceAccount = 'serviceAccount-1948028253'; - $machineType = 'machineType1838323762'; - $installGpuDriver = false; - $customGpuDriverPath = 'customGpuDriverPath1863223803'; - $bootDiskSizeGb = 1398920548; - $dataDiskSizeGb = 1668379732; - $noRemoveDataDisk = false; - $kmsKey = 'kmsKey-591635343'; - $noPublicIp = false; - $noProxyAccess = false; - $network = 'network1843485230'; - $subnet = 'subnet-891534499'; - $creator = 'creator1028554796'; - $canIpForward = true; - $expectedResponse = new Instance(); - $expectedResponse->setName($name2); - $expectedResponse->setPostStartupScript($postStartupScript); - $expectedResponse->setProxyUri($proxyUri); - $expectedResponse->setServiceAccount($serviceAccount); - $expectedResponse->setMachineType($machineType); - $expectedResponse->setInstallGpuDriver($installGpuDriver); - $expectedResponse->setCustomGpuDriverPath($customGpuDriverPath); - $expectedResponse->setBootDiskSizeGb($bootDiskSizeGb); - $expectedResponse->setDataDiskSizeGb($dataDiskSizeGb); - $expectedResponse->setNoRemoveDataDisk($noRemoveDataDisk); - $expectedResponse->setKmsKey($kmsKey); - $expectedResponse->setNoPublicIp($noPublicIp); - $expectedResponse->setNoProxyAccess($noProxyAccess); - $expectedResponse->setNetwork($network); - $expectedResponse->setSubnet($subnet); - $expectedResponse->setCreator($creator); - $expectedResponse->setCanIpForward($canIpForward); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/reportInstanceInfoTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $name = 'name3373707'; - $vmId = 'vmId112317347'; - $request = (new ReportInstanceInfoRequest()) - ->setName($name) - ->setVmId($vmId); - $response = $gapicClient->reportInstanceInfo($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.notebooks.v1.NotebookService/ReportInstanceInfo', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $actualValue = $actualApiRequestObject->getVmId(); - $this->assertProtobufEquals($vmId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/reportInstanceInfoTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function reportInstanceInfoExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/reportInstanceInfoTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $name = 'name3373707'; - $vmId = 'vmId112317347'; - $request = (new ReportInstanceInfoRequest()) - ->setName($name) - ->setVmId($vmId); - $response = $gapicClient->reportInstanceInfo($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/reportInstanceInfoTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function resetInstanceTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/resetInstanceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $postStartupScript = 'postStartupScript355382860'; - $proxyUri = 'proxyUri-475670501'; - $serviceAccount = 'serviceAccount-1948028253'; - $machineType = 'machineType1838323762'; - $installGpuDriver = false; - $customGpuDriverPath = 'customGpuDriverPath1863223803'; - $bootDiskSizeGb = 1398920548; - $dataDiskSizeGb = 1668379732; - $noRemoveDataDisk = false; - $kmsKey = 'kmsKey-591635343'; - $noPublicIp = false; - $noProxyAccess = false; - $network = 'network1843485230'; - $subnet = 'subnet-891534499'; - $creator = 'creator1028554796'; - $canIpForward = true; - $expectedResponse = new Instance(); - $expectedResponse->setName($name2); - $expectedResponse->setPostStartupScript($postStartupScript); - $expectedResponse->setProxyUri($proxyUri); - $expectedResponse->setServiceAccount($serviceAccount); - $expectedResponse->setMachineType($machineType); - $expectedResponse->setInstallGpuDriver($installGpuDriver); - $expectedResponse->setCustomGpuDriverPath($customGpuDriverPath); - $expectedResponse->setBootDiskSizeGb($bootDiskSizeGb); - $expectedResponse->setDataDiskSizeGb($dataDiskSizeGb); - $expectedResponse->setNoRemoveDataDisk($noRemoveDataDisk); - $expectedResponse->setKmsKey($kmsKey); - $expectedResponse->setNoPublicIp($noPublicIp); - $expectedResponse->setNoProxyAccess($noProxyAccess); - $expectedResponse->setNetwork($network); - $expectedResponse->setSubnet($subnet); - $expectedResponse->setCreator($creator); - $expectedResponse->setCanIpForward($canIpForward); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/resetInstanceTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $name = 'name3373707'; - $request = (new ResetInstanceRequest()) - ->setName($name); - $response = $gapicClient->resetInstance($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.notebooks.v1.NotebookService/ResetInstance', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/resetInstanceTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function resetInstanceExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/resetInstanceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $name = 'name3373707'; - $request = (new ResetInstanceRequest()) - ->setName($name); - $response = $gapicClient->resetInstance($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/resetInstanceTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function rollbackInstanceTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/rollbackInstanceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $postStartupScript = 'postStartupScript355382860'; - $proxyUri = 'proxyUri-475670501'; - $serviceAccount = 'serviceAccount-1948028253'; - $machineType = 'machineType1838323762'; - $installGpuDriver = false; - $customGpuDriverPath = 'customGpuDriverPath1863223803'; - $bootDiskSizeGb = 1398920548; - $dataDiskSizeGb = 1668379732; - $noRemoveDataDisk = false; - $kmsKey = 'kmsKey-591635343'; - $noPublicIp = false; - $noProxyAccess = false; - $network = 'network1843485230'; - $subnet = 'subnet-891534499'; - $creator = 'creator1028554796'; - $canIpForward = true; - $expectedResponse = new Instance(); - $expectedResponse->setName($name2); - $expectedResponse->setPostStartupScript($postStartupScript); - $expectedResponse->setProxyUri($proxyUri); - $expectedResponse->setServiceAccount($serviceAccount); - $expectedResponse->setMachineType($machineType); - $expectedResponse->setInstallGpuDriver($installGpuDriver); - $expectedResponse->setCustomGpuDriverPath($customGpuDriverPath); - $expectedResponse->setBootDiskSizeGb($bootDiskSizeGb); - $expectedResponse->setDataDiskSizeGb($dataDiskSizeGb); - $expectedResponse->setNoRemoveDataDisk($noRemoveDataDisk); - $expectedResponse->setKmsKey($kmsKey); - $expectedResponse->setNoPublicIp($noPublicIp); - $expectedResponse->setNoProxyAccess($noProxyAccess); - $expectedResponse->setNetwork($network); - $expectedResponse->setSubnet($subnet); - $expectedResponse->setCreator($creator); - $expectedResponse->setCanIpForward($canIpForward); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/rollbackInstanceTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $name = 'name3373707'; - $targetSnapshot = 'targetSnapshot556386482'; - $request = (new RollbackInstanceRequest()) - ->setName($name) - ->setTargetSnapshot($targetSnapshot); - $response = $gapicClient->rollbackInstance($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.notebooks.v1.NotebookService/RollbackInstance', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $actualValue = $actualApiRequestObject->getTargetSnapshot(); - $this->assertProtobufEquals($targetSnapshot, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/rollbackInstanceTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function rollbackInstanceExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/rollbackInstanceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $name = 'name3373707'; - $targetSnapshot = 'targetSnapshot556386482'; - $request = (new RollbackInstanceRequest()) - ->setName($name) - ->setTargetSnapshot($targetSnapshot); - $response = $gapicClient->rollbackInstance($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/rollbackInstanceTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function setInstanceAcceleratorTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/setInstanceAcceleratorTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $postStartupScript = 'postStartupScript355382860'; - $proxyUri = 'proxyUri-475670501'; - $serviceAccount = 'serviceAccount-1948028253'; - $machineType = 'machineType1838323762'; - $installGpuDriver = false; - $customGpuDriverPath = 'customGpuDriverPath1863223803'; - $bootDiskSizeGb = 1398920548; - $dataDiskSizeGb = 1668379732; - $noRemoveDataDisk = false; - $kmsKey = 'kmsKey-591635343'; - $noPublicIp = false; - $noProxyAccess = false; - $network = 'network1843485230'; - $subnet = 'subnet-891534499'; - $creator = 'creator1028554796'; - $canIpForward = true; - $expectedResponse = new Instance(); - $expectedResponse->setName($name2); - $expectedResponse->setPostStartupScript($postStartupScript); - $expectedResponse->setProxyUri($proxyUri); - $expectedResponse->setServiceAccount($serviceAccount); - $expectedResponse->setMachineType($machineType); - $expectedResponse->setInstallGpuDriver($installGpuDriver); - $expectedResponse->setCustomGpuDriverPath($customGpuDriverPath); - $expectedResponse->setBootDiskSizeGb($bootDiskSizeGb); - $expectedResponse->setDataDiskSizeGb($dataDiskSizeGb); - $expectedResponse->setNoRemoveDataDisk($noRemoveDataDisk); - $expectedResponse->setKmsKey($kmsKey); - $expectedResponse->setNoPublicIp($noPublicIp); - $expectedResponse->setNoProxyAccess($noProxyAccess); - $expectedResponse->setNetwork($network); - $expectedResponse->setSubnet($subnet); - $expectedResponse->setCreator($creator); - $expectedResponse->setCanIpForward($canIpForward); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/setInstanceAcceleratorTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $name = 'name3373707'; - $type = AcceleratorType::ACCELERATOR_TYPE_UNSPECIFIED; - $coreCount = 1963855761; - $request = (new SetInstanceAcceleratorRequest()) - ->setName($name) - ->setType($type) - ->setCoreCount($coreCount); - $response = $gapicClient->setInstanceAccelerator($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.notebooks.v1.NotebookService/SetInstanceAccelerator', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $actualValue = $actualApiRequestObject->getType(); - $this->assertProtobufEquals($type, $actualValue); - $actualValue = $actualApiRequestObject->getCoreCount(); - $this->assertProtobufEquals($coreCount, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/setInstanceAcceleratorTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function setInstanceAcceleratorExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/setInstanceAcceleratorTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $name = 'name3373707'; - $type = AcceleratorType::ACCELERATOR_TYPE_UNSPECIFIED; - $coreCount = 1963855761; - $request = (new SetInstanceAcceleratorRequest()) - ->setName($name) - ->setType($type) - ->setCoreCount($coreCount); - $response = $gapicClient->setInstanceAccelerator($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/setInstanceAcceleratorTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function setInstanceLabelsTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/setInstanceLabelsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $postStartupScript = 'postStartupScript355382860'; - $proxyUri = 'proxyUri-475670501'; - $serviceAccount = 'serviceAccount-1948028253'; - $machineType = 'machineType1838323762'; - $installGpuDriver = false; - $customGpuDriverPath = 'customGpuDriverPath1863223803'; - $bootDiskSizeGb = 1398920548; - $dataDiskSizeGb = 1668379732; - $noRemoveDataDisk = false; - $kmsKey = 'kmsKey-591635343'; - $noPublicIp = false; - $noProxyAccess = false; - $network = 'network1843485230'; - $subnet = 'subnet-891534499'; - $creator = 'creator1028554796'; - $canIpForward = true; - $expectedResponse = new Instance(); - $expectedResponse->setName($name2); - $expectedResponse->setPostStartupScript($postStartupScript); - $expectedResponse->setProxyUri($proxyUri); - $expectedResponse->setServiceAccount($serviceAccount); - $expectedResponse->setMachineType($machineType); - $expectedResponse->setInstallGpuDriver($installGpuDriver); - $expectedResponse->setCustomGpuDriverPath($customGpuDriverPath); - $expectedResponse->setBootDiskSizeGb($bootDiskSizeGb); - $expectedResponse->setDataDiskSizeGb($dataDiskSizeGb); - $expectedResponse->setNoRemoveDataDisk($noRemoveDataDisk); - $expectedResponse->setKmsKey($kmsKey); - $expectedResponse->setNoPublicIp($noPublicIp); - $expectedResponse->setNoProxyAccess($noProxyAccess); - $expectedResponse->setNetwork($network); - $expectedResponse->setSubnet($subnet); - $expectedResponse->setCreator($creator); - $expectedResponse->setCanIpForward($canIpForward); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/setInstanceLabelsTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $name = 'name3373707'; - $request = (new SetInstanceLabelsRequest()) - ->setName($name); - $response = $gapicClient->setInstanceLabels($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.notebooks.v1.NotebookService/SetInstanceLabels', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/setInstanceLabelsTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function setInstanceLabelsExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/setInstanceLabelsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $name = 'name3373707'; - $request = (new SetInstanceLabelsRequest()) - ->setName($name); - $response = $gapicClient->setInstanceLabels($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/setInstanceLabelsTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function setInstanceMachineTypeTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/setInstanceMachineTypeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $postStartupScript = 'postStartupScript355382860'; - $proxyUri = 'proxyUri-475670501'; - $serviceAccount = 'serviceAccount-1948028253'; - $machineType2 = 'machineType21397579621'; - $installGpuDriver = false; - $customGpuDriverPath = 'customGpuDriverPath1863223803'; - $bootDiskSizeGb = 1398920548; - $dataDiskSizeGb = 1668379732; - $noRemoveDataDisk = false; - $kmsKey = 'kmsKey-591635343'; - $noPublicIp = false; - $noProxyAccess = false; - $network = 'network1843485230'; - $subnet = 'subnet-891534499'; - $creator = 'creator1028554796'; - $canIpForward = true; - $expectedResponse = new Instance(); - $expectedResponse->setName($name2); - $expectedResponse->setPostStartupScript($postStartupScript); - $expectedResponse->setProxyUri($proxyUri); - $expectedResponse->setServiceAccount($serviceAccount); - $expectedResponse->setMachineType($machineType2); - $expectedResponse->setInstallGpuDriver($installGpuDriver); - $expectedResponse->setCustomGpuDriverPath($customGpuDriverPath); - $expectedResponse->setBootDiskSizeGb($bootDiskSizeGb); - $expectedResponse->setDataDiskSizeGb($dataDiskSizeGb); - $expectedResponse->setNoRemoveDataDisk($noRemoveDataDisk); - $expectedResponse->setKmsKey($kmsKey); - $expectedResponse->setNoPublicIp($noPublicIp); - $expectedResponse->setNoProxyAccess($noProxyAccess); - $expectedResponse->setNetwork($network); - $expectedResponse->setSubnet($subnet); - $expectedResponse->setCreator($creator); - $expectedResponse->setCanIpForward($canIpForward); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/setInstanceMachineTypeTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $name = 'name3373707'; - $machineType = 'machineType1838323762'; - $request = (new SetInstanceMachineTypeRequest()) - ->setName($name) - ->setMachineType($machineType); - $response = $gapicClient->setInstanceMachineType($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.notebooks.v1.NotebookService/SetInstanceMachineType', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $actualValue = $actualApiRequestObject->getMachineType(); - $this->assertProtobufEquals($machineType, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/setInstanceMachineTypeTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function setInstanceMachineTypeExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/setInstanceMachineTypeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $name = 'name3373707'; - $machineType = 'machineType1838323762'; - $request = (new SetInstanceMachineTypeRequest()) - ->setName($name) - ->setMachineType($machineType); - $response = $gapicClient->setInstanceMachineType($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/setInstanceMachineTypeTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function startInstanceTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/startInstanceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $postStartupScript = 'postStartupScript355382860'; - $proxyUri = 'proxyUri-475670501'; - $serviceAccount = 'serviceAccount-1948028253'; - $machineType = 'machineType1838323762'; - $installGpuDriver = false; - $customGpuDriverPath = 'customGpuDriverPath1863223803'; - $bootDiskSizeGb = 1398920548; - $dataDiskSizeGb = 1668379732; - $noRemoveDataDisk = false; - $kmsKey = 'kmsKey-591635343'; - $noPublicIp = false; - $noProxyAccess = false; - $network = 'network1843485230'; - $subnet = 'subnet-891534499'; - $creator = 'creator1028554796'; - $canIpForward = true; - $expectedResponse = new Instance(); - $expectedResponse->setName($name2); - $expectedResponse->setPostStartupScript($postStartupScript); - $expectedResponse->setProxyUri($proxyUri); - $expectedResponse->setServiceAccount($serviceAccount); - $expectedResponse->setMachineType($machineType); - $expectedResponse->setInstallGpuDriver($installGpuDriver); - $expectedResponse->setCustomGpuDriverPath($customGpuDriverPath); - $expectedResponse->setBootDiskSizeGb($bootDiskSizeGb); - $expectedResponse->setDataDiskSizeGb($dataDiskSizeGb); - $expectedResponse->setNoRemoveDataDisk($noRemoveDataDisk); - $expectedResponse->setKmsKey($kmsKey); - $expectedResponse->setNoPublicIp($noPublicIp); - $expectedResponse->setNoProxyAccess($noProxyAccess); - $expectedResponse->setNetwork($network); - $expectedResponse->setSubnet($subnet); - $expectedResponse->setCreator($creator); - $expectedResponse->setCanIpForward($canIpForward); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/startInstanceTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $name = 'name3373707'; - $request = (new StartInstanceRequest()) - ->setName($name); - $response = $gapicClient->startInstance($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.notebooks.v1.NotebookService/StartInstance', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/startInstanceTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function startInstanceExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/startInstanceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $name = 'name3373707'; - $request = (new StartInstanceRequest()) - ->setName($name); - $response = $gapicClient->startInstance($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/startInstanceTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function stopInstanceTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/stopInstanceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $postStartupScript = 'postStartupScript355382860'; - $proxyUri = 'proxyUri-475670501'; - $serviceAccount = 'serviceAccount-1948028253'; - $machineType = 'machineType1838323762'; - $installGpuDriver = false; - $customGpuDriverPath = 'customGpuDriverPath1863223803'; - $bootDiskSizeGb = 1398920548; - $dataDiskSizeGb = 1668379732; - $noRemoveDataDisk = false; - $kmsKey = 'kmsKey-591635343'; - $noPublicIp = false; - $noProxyAccess = false; - $network = 'network1843485230'; - $subnet = 'subnet-891534499'; - $creator = 'creator1028554796'; - $canIpForward = true; - $expectedResponse = new Instance(); - $expectedResponse->setName($name2); - $expectedResponse->setPostStartupScript($postStartupScript); - $expectedResponse->setProxyUri($proxyUri); - $expectedResponse->setServiceAccount($serviceAccount); - $expectedResponse->setMachineType($machineType); - $expectedResponse->setInstallGpuDriver($installGpuDriver); - $expectedResponse->setCustomGpuDriverPath($customGpuDriverPath); - $expectedResponse->setBootDiskSizeGb($bootDiskSizeGb); - $expectedResponse->setDataDiskSizeGb($dataDiskSizeGb); - $expectedResponse->setNoRemoveDataDisk($noRemoveDataDisk); - $expectedResponse->setKmsKey($kmsKey); - $expectedResponse->setNoPublicIp($noPublicIp); - $expectedResponse->setNoProxyAccess($noProxyAccess); - $expectedResponse->setNetwork($network); - $expectedResponse->setSubnet($subnet); - $expectedResponse->setCreator($creator); - $expectedResponse->setCanIpForward($canIpForward); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/stopInstanceTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $name = 'name3373707'; - $request = (new StopInstanceRequest()) - ->setName($name); - $response = $gapicClient->stopInstance($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.notebooks.v1.NotebookService/StopInstance', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/stopInstanceTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function stopInstanceExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/stopInstanceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $name = 'name3373707'; - $request = (new StopInstanceRequest()) - ->setName($name); - $response = $gapicClient->stopInstance($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/stopInstanceTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function triggerScheduleTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/triggerScheduleTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $cronSchedule = 'cronSchedule206244136'; - $timeZone = 'timeZone36848094'; - $expectedResponse = new Schedule(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setCronSchedule($cronSchedule); - $expectedResponse->setTimeZone($timeZone); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/triggerScheduleTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->scheduleName('[PROJECT]', '[LOCATION]', '[SCHEDULE]'); - $request = (new TriggerScheduleRequest()) - ->setName($formattedName); - $response = $gapicClient->triggerSchedule($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.notebooks.v1.NotebookService/TriggerSchedule', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/triggerScheduleTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function triggerScheduleExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/triggerScheduleTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->scheduleName('[PROJECT]', '[LOCATION]', '[SCHEDULE]'); - $request = (new TriggerScheduleRequest()) - ->setName($formattedName); - $response = $gapicClient->triggerSchedule($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/triggerScheduleTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateInstanceConfigTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateInstanceConfigTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $postStartupScript = 'postStartupScript355382860'; - $proxyUri = 'proxyUri-475670501'; - $serviceAccount = 'serviceAccount-1948028253'; - $machineType = 'machineType1838323762'; - $installGpuDriver = false; - $customGpuDriverPath = 'customGpuDriverPath1863223803'; - $bootDiskSizeGb = 1398920548; - $dataDiskSizeGb = 1668379732; - $noRemoveDataDisk = false; - $kmsKey = 'kmsKey-591635343'; - $noPublicIp = false; - $noProxyAccess = false; - $network = 'network1843485230'; - $subnet = 'subnet-891534499'; - $creator = 'creator1028554796'; - $canIpForward = true; - $expectedResponse = new Instance(); - $expectedResponse->setName($name2); - $expectedResponse->setPostStartupScript($postStartupScript); - $expectedResponse->setProxyUri($proxyUri); - $expectedResponse->setServiceAccount($serviceAccount); - $expectedResponse->setMachineType($machineType); - $expectedResponse->setInstallGpuDriver($installGpuDriver); - $expectedResponse->setCustomGpuDriverPath($customGpuDriverPath); - $expectedResponse->setBootDiskSizeGb($bootDiskSizeGb); - $expectedResponse->setDataDiskSizeGb($dataDiskSizeGb); - $expectedResponse->setNoRemoveDataDisk($noRemoveDataDisk); - $expectedResponse->setKmsKey($kmsKey); - $expectedResponse->setNoPublicIp($noPublicIp); - $expectedResponse->setNoProxyAccess($noProxyAccess); - $expectedResponse->setNetwork($network); - $expectedResponse->setSubnet($subnet); - $expectedResponse->setCreator($creator); - $expectedResponse->setCanIpForward($canIpForward); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateInstanceConfigTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $name = 'name3373707'; - $request = (new UpdateInstanceConfigRequest()) - ->setName($name); - $response = $gapicClient->updateInstanceConfig($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.notebooks.v1.NotebookService/UpdateInstanceConfig', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateInstanceConfigTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateInstanceConfigExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateInstanceConfigTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $name = 'name3373707'; - $request = (new UpdateInstanceConfigRequest()) - ->setName($name); - $response = $gapicClient->updateInstanceConfig($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateInstanceConfigTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateInstanceMetadataItemsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new UpdateInstanceMetadataItemsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $request = (new UpdateInstanceMetadataItemsRequest()) - ->setName($name); - $response = $gapicClient->updateInstanceMetadataItems($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.notebooks.v1.NotebookService/UpdateInstanceMetadataItems', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateInstanceMetadataItemsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $name = 'name3373707'; - $request = (new UpdateInstanceMetadataItemsRequest()) - ->setName($name); - try { - $gapicClient->updateInstanceMetadataItems($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateShieldedInstanceConfigTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateShieldedInstanceConfigTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $postStartupScript = 'postStartupScript355382860'; - $proxyUri = 'proxyUri-475670501'; - $serviceAccount = 'serviceAccount-1948028253'; - $machineType = 'machineType1838323762'; - $installGpuDriver = false; - $customGpuDriverPath = 'customGpuDriverPath1863223803'; - $bootDiskSizeGb = 1398920548; - $dataDiskSizeGb = 1668379732; - $noRemoveDataDisk = false; - $kmsKey = 'kmsKey-591635343'; - $noPublicIp = false; - $noProxyAccess = false; - $network = 'network1843485230'; - $subnet = 'subnet-891534499'; - $creator = 'creator1028554796'; - $canIpForward = true; - $expectedResponse = new Instance(); - $expectedResponse->setName($name2); - $expectedResponse->setPostStartupScript($postStartupScript); - $expectedResponse->setProxyUri($proxyUri); - $expectedResponse->setServiceAccount($serviceAccount); - $expectedResponse->setMachineType($machineType); - $expectedResponse->setInstallGpuDriver($installGpuDriver); - $expectedResponse->setCustomGpuDriverPath($customGpuDriverPath); - $expectedResponse->setBootDiskSizeGb($bootDiskSizeGb); - $expectedResponse->setDataDiskSizeGb($dataDiskSizeGb); - $expectedResponse->setNoRemoveDataDisk($noRemoveDataDisk); - $expectedResponse->setKmsKey($kmsKey); - $expectedResponse->setNoPublicIp($noPublicIp); - $expectedResponse->setNoProxyAccess($noProxyAccess); - $expectedResponse->setNetwork($network); - $expectedResponse->setSubnet($subnet); - $expectedResponse->setCreator($creator); - $expectedResponse->setCanIpForward($canIpForward); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateShieldedInstanceConfigTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $name = 'name3373707'; - $request = (new UpdateShieldedInstanceConfigRequest()) - ->setName($name); - $response = $gapicClient->updateShieldedInstanceConfig($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.notebooks.v1.NotebookService/UpdateShieldedInstanceConfig', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateShieldedInstanceConfigTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateShieldedInstanceConfigExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateShieldedInstanceConfigTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $name = 'name3373707'; - $request = (new UpdateShieldedInstanceConfigRequest()) - ->setName($name); - $response = $gapicClient->updateShieldedInstanceConfig($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateShieldedInstanceConfigTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function upgradeInstanceTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/upgradeInstanceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $postStartupScript = 'postStartupScript355382860'; - $proxyUri = 'proxyUri-475670501'; - $serviceAccount = 'serviceAccount-1948028253'; - $machineType = 'machineType1838323762'; - $installGpuDriver = false; - $customGpuDriverPath = 'customGpuDriverPath1863223803'; - $bootDiskSizeGb = 1398920548; - $dataDiskSizeGb = 1668379732; - $noRemoveDataDisk = false; - $kmsKey = 'kmsKey-591635343'; - $noPublicIp = false; - $noProxyAccess = false; - $network = 'network1843485230'; - $subnet = 'subnet-891534499'; - $creator = 'creator1028554796'; - $canIpForward = true; - $expectedResponse = new Instance(); - $expectedResponse->setName($name2); - $expectedResponse->setPostStartupScript($postStartupScript); - $expectedResponse->setProxyUri($proxyUri); - $expectedResponse->setServiceAccount($serviceAccount); - $expectedResponse->setMachineType($machineType); - $expectedResponse->setInstallGpuDriver($installGpuDriver); - $expectedResponse->setCustomGpuDriverPath($customGpuDriverPath); - $expectedResponse->setBootDiskSizeGb($bootDiskSizeGb); - $expectedResponse->setDataDiskSizeGb($dataDiskSizeGb); - $expectedResponse->setNoRemoveDataDisk($noRemoveDataDisk); - $expectedResponse->setKmsKey($kmsKey); - $expectedResponse->setNoPublicIp($noPublicIp); - $expectedResponse->setNoProxyAccess($noProxyAccess); - $expectedResponse->setNetwork($network); - $expectedResponse->setSubnet($subnet); - $expectedResponse->setCreator($creator); - $expectedResponse->setCanIpForward($canIpForward); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/upgradeInstanceTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $name = 'name3373707'; - $request = (new UpgradeInstanceRequest()) - ->setName($name); - $response = $gapicClient->upgradeInstance($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.notebooks.v1.NotebookService/UpgradeInstance', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/upgradeInstanceTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function upgradeInstanceExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/upgradeInstanceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $name = 'name3373707'; - $request = (new UpgradeInstanceRequest()) - ->setName($name); - $response = $gapicClient->upgradeInstance($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/upgradeInstanceTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function upgradeInstanceInternalTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/upgradeInstanceInternalTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $postStartupScript = 'postStartupScript355382860'; - $proxyUri = 'proxyUri-475670501'; - $serviceAccount = 'serviceAccount-1948028253'; - $machineType = 'machineType1838323762'; - $installGpuDriver = false; - $customGpuDriverPath = 'customGpuDriverPath1863223803'; - $bootDiskSizeGb = 1398920548; - $dataDiskSizeGb = 1668379732; - $noRemoveDataDisk = false; - $kmsKey = 'kmsKey-591635343'; - $noPublicIp = false; - $noProxyAccess = false; - $network = 'network1843485230'; - $subnet = 'subnet-891534499'; - $creator = 'creator1028554796'; - $canIpForward = true; - $expectedResponse = new Instance(); - $expectedResponse->setName($name2); - $expectedResponse->setPostStartupScript($postStartupScript); - $expectedResponse->setProxyUri($proxyUri); - $expectedResponse->setServiceAccount($serviceAccount); - $expectedResponse->setMachineType($machineType); - $expectedResponse->setInstallGpuDriver($installGpuDriver); - $expectedResponse->setCustomGpuDriverPath($customGpuDriverPath); - $expectedResponse->setBootDiskSizeGb($bootDiskSizeGb); - $expectedResponse->setDataDiskSizeGb($dataDiskSizeGb); - $expectedResponse->setNoRemoveDataDisk($noRemoveDataDisk); - $expectedResponse->setKmsKey($kmsKey); - $expectedResponse->setNoPublicIp($noPublicIp); - $expectedResponse->setNoProxyAccess($noProxyAccess); - $expectedResponse->setNetwork($network); - $expectedResponse->setSubnet($subnet); - $expectedResponse->setCreator($creator); - $expectedResponse->setCanIpForward($canIpForward); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/upgradeInstanceInternalTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $name = 'name3373707'; - $vmId = 'vmId112317347'; - $request = (new UpgradeInstanceInternalRequest()) - ->setName($name) - ->setVmId($vmId); - $response = $gapicClient->upgradeInstanceInternal($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.notebooks.v1.NotebookService/UpgradeInstanceInternal', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $actualValue = $actualApiRequestObject->getVmId(); - $this->assertProtobufEquals($vmId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/upgradeInstanceInternalTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function upgradeInstanceInternalExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/upgradeInstanceInternalTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $name = 'name3373707'; - $vmId = 'vmId112317347'; - $request = (new UpgradeInstanceInternalRequest()) - ->setName($name) - ->setVmId($vmId); - $response = $gapicClient->upgradeInstanceInternal($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/upgradeInstanceInternalTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getLocationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $locationId = 'locationId552319461'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Location(); - $expectedResponse->setName($name2); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - $request = new GetLocationRequest(); - $response = $gapicClient->getLocation($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new GetLocationRequest(); - try { - $gapicClient->getLocation($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $locationsElement = new Location(); - $locations = [ - $locationsElement, - ]; - $expectedResponse = new ListLocationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLocations($locations); - $transport->addResponse($expectedResponse); - $request = new ListLocationsRequest(); - $response = $gapicClient->listLocations($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new ListLocationsRequest(); - try { - $gapicClient->listLocations($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); - $response = $gapicClient->getIamPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); - try { - $gapicClient->getIamPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); - $response = $gapicClient->setIamPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPolicy(); - $this->assertProtobufEquals($policy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); - try { - $gapicClient->setIamPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new TestIamPermissionsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); - $response = $gapicClient->testIamPermissions($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPermissions(); - $this->assertProtobufEquals($permissions, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); - try { - $gapicClient->testIamPermissions($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createEnvironmentAsyncTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createEnvironmentTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $postStartupScript = 'postStartupScript355382860'; - $expectedResponse = new Environment(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setPostStartupScript($postStartupScript); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createEnvironmentTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $parent = 'parent-995424086'; - $environmentId = 'environmentId608412359'; - $environment = new Environment(); - $request = (new CreateEnvironmentRequest()) - ->setParent($parent) - ->setEnvironmentId($environmentId) - ->setEnvironment($environment); - $response = $gapicClient->createEnvironmentAsync($request)->wait(); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.notebooks.v1.NotebookService/CreateEnvironment', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); - $actualValue = $actualApiRequestObject->getEnvironmentId(); - $this->assertProtobufEquals($environmentId, $actualValue); - $actualValue = $actualApiRequestObject->getEnvironment(); - $this->assertProtobufEquals($environment, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createEnvironmentTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } -} diff --git a/owl-bot-staging/Notebooks/v2/proto/src/GPBMetadata/Google/Cloud/Notebooks/V2/DiagnosticConfig.php b/owl-bot-staging/Notebooks/v2/proto/src/GPBMetadata/Google/Cloud/Notebooks/V2/DiagnosticConfig.php deleted file mode 100644 index d6ac249f6025..000000000000 --- a/owl-bot-staging/Notebooks/v2/proto/src/GPBMetadata/Google/Cloud/Notebooks/V2/DiagnosticConfig.php +++ /dev/null @@ -1,35 +0,0 @@ -internalAddGeneratedFile( - ' -ã -1google/cloud/notebooks/v2/diagnostic_config.protogoogle.cloud.notebooks.v2"» -DiagnosticConfig - -gcs_bucket ( BàA - relative_path ( BàA -enable_repair_flag (BàA\' -enable_packet_capture_flag (BàA( -enable_copy_home_files_flag (BàABÌ -com.google.cloud.notebooks.v2BDiagnosticConfigProtoPZ;cloud.google.com/go/notebooks/apiv2/notebookspb;notebookspbªGoogle.Cloud.Notebooks.V2ÊGoogle\\Cloud\\Notebooks\\V2êGoogle::Cloud::Notebooks::V2bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Notebooks/v2/proto/src/GPBMetadata/Google/Cloud/Notebooks/V2/Event.php b/owl-bot-staging/Notebooks/v2/proto/src/GPBMetadata/Google/Cloud/Notebooks/V2/Event.php deleted file mode 100644 index d1f43dcbf3cf94c932a049488ab7f123afc63617..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1327 zcma)6(QeZ)6s7Gts0*wL651*dW(=)EER_lmD5apZ^}0%1R*g^z6sdAkx3iYUk>gY< zXy3s<@E5%D6}<4mSKv5pR%x3c4~di9bA0agx%ch+;4A>oV2AjGV?jo6IEUhlz<@Ks zT;{=HG#(QUT{aDTYM110OGE;1 zf!iZ#Tk3_IIhd0h?*Egaox~$w@VO!>>)`I{N395Q=VY!jC}{UUeulj$QCKjtZ!+5) z6qJ})hE@g-Q6E|M!2Z-jgOApS9%^+Dx~N^crQHE*-S!bGWh6`C5SgcT6Pb1?s{ybs zUytm=Qcl|d#bdK;*~l`j7Amc255UGTvdy+>n}gP&X?0L3-~5pQk7e86oLv(rP0CEY z%;$Pi!R5)aX?4O@1_2JJoCWDo2gCZx`g?Y(qeg(PMu47<0KH%Px%}rW=EKT>kQ3rh q_E7>g423m}6l@s%+HhU@;MH#G)t5=|^3Mf`BNr2*V5sr4E=}P#fs@M{x|n@x;c3j%PHoymq#+C5(btP^)8&ycXcZYis~P~b znwcDc(brv9DI28DaNuW9@XsE$`_xcePxtWW9(6TpQjh9=`V$87T3$)&=>>+qAVuNxxGd$NGp` zPBuG@Y6`-G`sM}oL&$eJ6OZ@sV7DeVn8o|>*CuTL>l2l3h^=XU`02^vr$?F8A0bFq ziTB=ePI&sdcVN|7c-4Mjy4$Po88j68e5&)S!4!A)Pny13_1Z>$Y0 zWH8I2W{+2w*qLg=db#$d*{I9_WjpYltL30}fF z*C(dojBUo$@-j!+{s$CwqEHC1uEXldz|~I3SYAPlSRhFKj=>Z#`ONyFU~>O47|v-I zL?T%1|3$Ji7sJ}IZmz-=eM&RP1B_<`Qatl;!KuuUgXjQJ<@=Cyh07Y^GM`;6;K)`yvnVn1 zQ3|9SL`MUSQ>o0-63?U-xa0FTS4D2Fz&eH^xYx&Eg|^rWjAMqa11KyL*2)?yTwZDM zg*6{ko(SR@0GolhvMaChL@ewWzX^r*TaaC!ZEyq#?J7%ElMbH>8>9k?2>r>%7@=e_Q97;Uai?Z1SL8S)b~E+=>bA1ny=4ApXT zU+lozoD)(UB8-E0PvPCOJkt9^e^SVXpN1y$zylQ$jFP5QCf$acrAqykrdEqb?`k-j zRL{&TQCKR!R$t+?f?q}U6@FkKRr|ckt}qU8!ML*y@mfi%H}cg|{-}fq04r>vUcw7m z2n+dxe6@(fQG^XgC{*7zj?~v`a;flJ2)@Lp!RM1xSPRaCPtmo|4>>U;1~Z&B*y&j_ z?*-ka_+*%jkajya^Zjf1Mw!17()^W>p1cy$&CJI@*7BbaGj9ldMEn`PB~-InuA9wH kl(X4proF=7CQt59=HQ27GM^dbKRd+ponq8Jg;RjP0UUG(lmGw# diff --git a/owl-bot-staging/Notebooks/v2/proto/src/GPBMetadata/Google/Cloud/Notebooks/V2/Instance.php b/owl-bot-staging/Notebooks/v2/proto/src/GPBMetadata/Google/Cloud/Notebooks/V2/Instance.php deleted file mode 100644 index 221db623c43c67d0211289da348f1231e681454c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2907 zcma)8ZExCE6fTeuIHXDHb{)++)k&*0tyZJaPMVx%lL>@)qksZLT7_g?%mutUwq+Z- ztjgcmkJ!ikglV7lEBd+rVbadM*EXzqY4Roa?Kzy6=R7_yfAA(AJe2Fyp*{)eP#&Dh z;e^Vb?}o1F+VWsJ8c|<1-4oBUsjtX#wIw%OUAb1(yITki+^KI;RUW(U*rp}ZcBjLV zb#3AtyBOh)LyoyYh;LWJp5NuXB8VpW*w>7~elG?*f=M z2?AM~g=EfwN@QzaU?lXY~&(Y7Z-PLS~lhtLi+exsl7D zM>MM6wNd8_)UTVggHC(b|LG*BT?@Gol9NlYycW;Cx1!8z!(o!>1Ek|lk{Xt%$MDw% z>|B?J(mnA~;fz%h#wxS&W^`2|o>lUr3<>sbKDpff*rZ0l@(?|J5IyCzM*@|?I9Tyu z``--Q?s;RM4C$d2Ae~NYPUxRXpFu8gh!;%Uu$YolJNZiHy_RCfvlGKQA!Axh&yVlJ zy6HM0v9N`s+syp-F62i(Hr!j+e^XqVpWlI%8TA9~g5vW0^bnRAS7|YeXKUpb%B49{ zE^u7wFf4O6BfWrv=~LVqEb8J4+AEYdV|#H*l%)O)wJiMzS;AYhnBxw78w1W4=|TrI z4i@S90@gy}V{aO9p!p=w?E_fm&SFw;b-G%&X7rk!c5Poj&}-F=8&UyQ@c5{Uo0N1D z@}1uPeyvu;ZCV1z9%y<4*O~2I$co>T?t-N4clB2Dyro{dexy}vXlWI4N3BMqqV4~* zk>37&1#+>dNw;8$3FExr8EFsl38#3)3+0DbBqVM_9{%AC^eB&c{`J(D`c^TaL`Hf5 z>#-yo?ptI{fW*ik%d+paB}O#l2Ctp#&$+=W`af>SS9r3(g9fZm1;vet;5c$2gIrLq zz+b>E!K!sgTSLwb-V+%~gVhNob~rHvZ&``g%3ob!`;b3h@bDEBA`_M~a*M#ddwzw5 zxMYejr6Y>>t#I)p;uo$%eBLfo55I#^yR2RhwFP&ERzLEI^#-iAk6Ooi2fLr0aEV}Ia9rES zu%7R9TkSTxSrWp6J5-NlwyD+{HKsCIrZPe(*uxcORB!5CU2EvC*-1`X1L*Wnq?%Q> z&kI@Nd&I-jw@_H%wsaqghc&IyJv1)SH*x#3(6?SQ-lnC`;kH(s_Je@z(_lJa!j`Ml3tdjR_gN!S2HP zkMzAdpA{88iYU!^R#cA5|HOCwXpmf(Byp7dkiIXVs>-pdnt)aHxID-rr9$`l<7BM( ZTFhq);~bM2%e-Ke<1fX)bp~eu{{fr=c&-2d diff --git a/owl-bot-staging/Notebooks/v2/proto/src/GPBMetadata/Google/Cloud/Notebooks/V2/Service.php b/owl-bot-staging/Notebooks/v2/proto/src/GPBMetadata/Google/Cloud/Notebooks/V2/Service.php deleted file mode 100644 index 2989a2c79582..000000000000 --- a/owl-bot-staging/Notebooks/v2/proto/src/GPBMetadata/Google/Cloud/Notebooks/V2/Service.php +++ /dev/null @@ -1,123 +0,0 @@ -internalAddGeneratedFile( - ' -Î& -\'google/cloud/notebooks/v2/service.protogoogle.cloud.notebooks.v2google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto1google/cloud/notebooks/v2/diagnostic_config.proto(google/cloud/notebooks/v2/instance.proto#google/longrunning/operations.protogoogle/protobuf/empty.proto google/protobuf/field_mask.protogoogle/protobuf/timestamp.proto"ï -OperationMetadata/ - create_time ( 2.google.protobuf.Timestamp, -end_time ( 2.google.protobuf.Timestamp -target (  -verb (  -status_message (  -requested_cancellation ( - api_version (  -endpoint ( "® -ListInstancesRequest9 -parent ( B)àAúA#!notebooks.googleapis.com/Instance - page_size (BàA - -page_token ( BàA -order_by ( BàA -filter ( BàA"} -ListInstancesResponse6 - instances ( 2#.google.cloud.notebooks.v2.Instance -next_page_token (  - unreachable ( "M -GetInstanceRequest7 -name ( B)àAúA# -!notebooks.googleapis.com/Instance"Á -CreateInstanceRequest9 -parent ( B)àAúA#!notebooks.googleapis.com/Instance - instance_id ( BàA: -instance ( 2#.google.cloud.notebooks.v2.InstanceBàA - -request_id ( BàA"¢ -UpdateInstanceRequest: -instance ( 2#.google.cloud.notebooks.v2.InstanceBàA4 - update_mask ( 2.google.protobuf.FieldMaskBàA - -request_id ( BàA"i -DeleteInstanceRequest7 -name ( B)àAúA# -!notebooks.googleapis.com/Instance - -request_id ( BàA") -StartInstanceRequest -name ( BàA"( -StopInstanceRequest -name ( BàA") -ResetInstanceRequest -name ( BàA"C -!CheckInstanceUpgradabilityRequest -notebook_instance ( BàA" -"CheckInstanceUpgradabilityResponse - upgradeable ( -upgrade_version (  - upgrade_info (  - upgrade_image ( "+ -UpgradeInstanceRequest -name ( BàA" -RollbackInstanceRequest7 -name ( B)àAúA# -!notebooks.googleapis.com/Instance -target_snapshot ( BàA - revision_id ( BàAàA"½ -DiagnoseInstanceRequest7 -name ( B)àAúA# -!notebooks.googleapis.com/InstanceK -diagnostic_config ( 2+.google.cloud.notebooks.v2.DiagnosticConfigBàA -timeout_minutes (BàA2ú -NotebookService² - ListInstances/.google.cloud.notebooks.v2.ListInstancesRequest0.google.cloud.notebooks.v2.ListInstancesResponse">ÚAparent‚Óä“/-/v2/{parent=projects/*/locations/*}/instancesŸ - GetInstance-.google.cloud.notebooks.v2.GetInstanceRequest#.google.cloud.notebooks.v2.Instance"<ÚAname‚Óä“/-/v2/{name=projects/*/locations/*/instances/*}à -CreateInstance0.google.cloud.notebooks.v2.CreateInstanceRequest.google.longrunning.Operation"}ÊA -InstanceOperationMetadataÚAparent,instance,instance_id‚Óä“9"-/v2/{parent=projects/*/locations/*}/instances:instanceâ -UpdateInstance0.google.cloud.notebooks.v2.UpdateInstanceRequest.google.longrunning.Operation"ÊA -InstanceOperationMetadataÚAinstance,update_mask‚Óä“B26/v2/{instance.name=projects/*/locations/*/instances/*}:instanceÌ -DeleteInstance0.google.cloud.notebooks.v2.DeleteInstanceRequest.google.longrunning.Operation"iÊA* -google.protobuf.EmptyOperationMetadataÚAname‚Óä“/*-/v2/{name=projects/*/locations/*/instances/*}¿ - StartInstance/.google.cloud.notebooks.v2.StartInstanceRequest.google.longrunning.Operation"^ÊA -InstanceOperationMetadata‚Óä“8"3/v2/{name=projects/*/locations/*/instances/*}:start:*¼ - StopInstance..google.cloud.notebooks.v2.StopInstanceRequest.google.longrunning.Operation"]ÊA -InstanceOperationMetadata‚Óä“7"2/v2/{name=projects/*/locations/*/instances/*}:stop:*¿ - ResetInstance/.google.cloud.notebooks.v2.ResetInstanceRequest.google.longrunning.Operation"^ÊA -InstanceOperationMetadata‚Óä“8"3/v2/{name=projects/*/locations/*/instances/*}:reset:*ð -CheckInstanceUpgradability<.google.cloud.notebooks.v2.CheckInstanceUpgradabilityRequest=.google.cloud.notebooks.v2.CheckInstanceUpgradabilityResponse"U‚Óä“OM/v2/{notebook_instance=projects/*/locations/*/instances/*}:checkUpgradabilityÅ -UpgradeInstance1.google.cloud.notebooks.v2.UpgradeInstanceRequest.google.longrunning.Operation"`ÊA -InstanceOperationMetadata‚Óä“:"5/v2/{name=projects/*/locations/*/instances/*}:upgrade:*È -RollbackInstance2.google.cloud.notebooks.v2.RollbackInstanceRequest.google.longrunning.Operation"aÊA -InstanceOperationMetadata‚Óä“;"6/v2/{name=projects/*/locations/*/instances/*}:rollback:*á -DiagnoseInstance2.google.cloud.notebooks.v2.DiagnoseInstanceRequest.google.longrunning.Operation"zÊA -InstanceOperationMetadataÚAname,diagnostic_config‚Óä“;"6/v2/{name=projects/*/locations/*/instances/*}:diagnose:*LÊAnotebooks.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformBÃ -com.google.cloud.notebooks.v2B ServiceProtoPZ;cloud.google.com/go/notebooks/apiv2/notebookspb;notebookspbªGoogle.Cloud.Notebooks.V2ÊGoogle\\Cloud\\Notebooks\\V2êGoogle::Cloud::Notebooks::V2bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/AcceleratorConfig.php b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/AcceleratorConfig.php deleted file mode 100644 index bef92e9d19fb..000000000000 --- a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/AcceleratorConfig.php +++ /dev/null @@ -1,106 +0,0 @@ -google.cloud.notebooks.v2.AcceleratorConfig - */ -class AcceleratorConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Type of this accelerator. - * - * Generated from protobuf field .google.cloud.notebooks.v2.AcceleratorConfig.AcceleratorType type = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $type = 0; - /** - * Optional. Count of cores of this accelerator. - * - * Generated from protobuf field int64 core_count = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $core_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $type - * Optional. Type of this accelerator. - * @type int|string $core_count - * Optional. Count of cores of this accelerator. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V2\GceSetup::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Type of this accelerator. - * - * Generated from protobuf field .google.cloud.notebooks.v2.AcceleratorConfig.AcceleratorType type = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Optional. Type of this accelerator. - * - * Generated from protobuf field .google.cloud.notebooks.v2.AcceleratorConfig.AcceleratorType type = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Notebooks\V2\AcceleratorConfig\AcceleratorType::class); - $this->type = $var; - - return $this; - } - - /** - * Optional. Count of cores of this accelerator. - * - * Generated from protobuf field int64 core_count = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int|string - */ - public function getCoreCount() - { - return $this->core_count; - } - - /** - * Optional. Count of cores of this accelerator. - * - * Generated from protobuf field int64 core_count = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int|string $var - * @return $this - */ - public function setCoreCount($var) - { - GPBUtil::checkInt64($var); - $this->core_count = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/AcceleratorConfig/AcceleratorType.php b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/AcceleratorConfig/AcceleratorType.php deleted file mode 100644 index c1f2b8471a7f..000000000000 --- a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/AcceleratorConfig/AcceleratorType.php +++ /dev/null @@ -1,121 +0,0 @@ -google.cloud.notebooks.v2.AcceleratorConfig.AcceleratorType - */ -class AcceleratorType -{ - /** - * Accelerator type is not specified. - * - * Generated from protobuf enum ACCELERATOR_TYPE_UNSPECIFIED = 0; - */ - const ACCELERATOR_TYPE_UNSPECIFIED = 0; - /** - * Accelerator type is Nvidia Tesla P100. - * - * Generated from protobuf enum NVIDIA_TESLA_P100 = 2; - */ - const NVIDIA_TESLA_P100 = 2; - /** - * Accelerator type is Nvidia Tesla V100. - * - * Generated from protobuf enum NVIDIA_TESLA_V100 = 3; - */ - const NVIDIA_TESLA_V100 = 3; - /** - * Accelerator type is Nvidia Tesla P4. - * - * Generated from protobuf enum NVIDIA_TESLA_P4 = 4; - */ - const NVIDIA_TESLA_P4 = 4; - /** - * Accelerator type is Nvidia Tesla T4. - * - * Generated from protobuf enum NVIDIA_TESLA_T4 = 5; - */ - const NVIDIA_TESLA_T4 = 5; - /** - * Accelerator type is Nvidia Tesla A100 - 40GB. - * - * Generated from protobuf enum NVIDIA_TESLA_A100 = 11; - */ - const NVIDIA_TESLA_A100 = 11; - /** - * Accelerator type is Nvidia Tesla A100 - 80GB. - * - * Generated from protobuf enum NVIDIA_A100_80GB = 12; - */ - const NVIDIA_A100_80GB = 12; - /** - * Accelerator type is Nvidia Tesla L4. - * - * Generated from protobuf enum NVIDIA_L4 = 13; - */ - const NVIDIA_L4 = 13; - /** - * Accelerator type is NVIDIA Tesla T4 Virtual Workstations. - * - * Generated from protobuf enum NVIDIA_TESLA_T4_VWS = 8; - */ - const NVIDIA_TESLA_T4_VWS = 8; - /** - * Accelerator type is NVIDIA Tesla P100 Virtual Workstations. - * - * Generated from protobuf enum NVIDIA_TESLA_P100_VWS = 9; - */ - const NVIDIA_TESLA_P100_VWS = 9; - /** - * Accelerator type is NVIDIA Tesla P4 Virtual Workstations. - * - * Generated from protobuf enum NVIDIA_TESLA_P4_VWS = 10; - */ - const NVIDIA_TESLA_P4_VWS = 10; - - private static $valueToName = [ - self::ACCELERATOR_TYPE_UNSPECIFIED => 'ACCELERATOR_TYPE_UNSPECIFIED', - self::NVIDIA_TESLA_P100 => 'NVIDIA_TESLA_P100', - self::NVIDIA_TESLA_V100 => 'NVIDIA_TESLA_V100', - self::NVIDIA_TESLA_P4 => 'NVIDIA_TESLA_P4', - self::NVIDIA_TESLA_T4 => 'NVIDIA_TESLA_T4', - self::NVIDIA_TESLA_A100 => 'NVIDIA_TESLA_A100', - self::NVIDIA_A100_80GB => 'NVIDIA_A100_80GB', - self::NVIDIA_L4 => 'NVIDIA_L4', - self::NVIDIA_TESLA_T4_VWS => 'NVIDIA_TESLA_T4_VWS', - self::NVIDIA_TESLA_P100_VWS => 'NVIDIA_TESLA_P100_VWS', - self::NVIDIA_TESLA_P4_VWS => 'NVIDIA_TESLA_P4_VWS', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(AcceleratorType::class, \Google\Cloud\Notebooks\V2\AcceleratorConfig_AcceleratorType::class); - diff --git a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/BootDisk.php b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/BootDisk.php deleted file mode 100644 index fde8f7d94633..000000000000 --- a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/BootDisk.php +++ /dev/null @@ -1,193 +0,0 @@ -google.cloud.notebooks.v2.BootDisk - */ -class BootDisk extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The size of the boot disk in GB attached to this instance, up to - * a maximum of 64000 GB (64 TB). If not specified, this defaults to the - * recommended value of 150GB. - * - * Generated from protobuf field int64 disk_size_gb = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $disk_size_gb = 0; - /** - * Optional. Indicates the type of the disk. - * - * Generated from protobuf field .google.cloud.notebooks.v2.DiskType disk_type = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $disk_type = 0; - /** - * Optional. Input only. Disk encryption method used on the boot and data - * disks, defaults to GMEK. - * - * Generated from protobuf field .google.cloud.notebooks.v2.DiskEncryption disk_encryption = 3 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; - */ - protected $disk_encryption = 0; - /** - * Optional. Input only. The KMS key used to encrypt the disks, only - * applicable if disk_encryption is CMEK. Format: - * `projects/{project_id}/locations/{location}/keyRings/{key_ring_id}/cryptoKeys/{key_id}` - * Learn more about using your own encryption keys. - * - * Generated from protobuf field string kms_key = 4 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; - */ - protected $kms_key = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $disk_size_gb - * Optional. The size of the boot disk in GB attached to this instance, up to - * a maximum of 64000 GB (64 TB). If not specified, this defaults to the - * recommended value of 150GB. - * @type int $disk_type - * Optional. Indicates the type of the disk. - * @type int $disk_encryption - * Optional. Input only. Disk encryption method used on the boot and data - * disks, defaults to GMEK. - * @type string $kms_key - * Optional. Input only. The KMS key used to encrypt the disks, only - * applicable if disk_encryption is CMEK. Format: - * `projects/{project_id}/locations/{location}/keyRings/{key_ring_id}/cryptoKeys/{key_id}` - * Learn more about using your own encryption keys. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V2\GceSetup::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The size of the boot disk in GB attached to this instance, up to - * a maximum of 64000 GB (64 TB). If not specified, this defaults to the - * recommended value of 150GB. - * - * Generated from protobuf field int64 disk_size_gb = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return int|string - */ - public function getDiskSizeGb() - { - return $this->disk_size_gb; - } - - /** - * Optional. The size of the boot disk in GB attached to this instance, up to - * a maximum of 64000 GB (64 TB). If not specified, this defaults to the - * recommended value of 150GB. - * - * Generated from protobuf field int64 disk_size_gb = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param int|string $var - * @return $this - */ - public function setDiskSizeGb($var) - { - GPBUtil::checkInt64($var); - $this->disk_size_gb = $var; - - return $this; - } - - /** - * Optional. Indicates the type of the disk. - * - * Generated from protobuf field .google.cloud.notebooks.v2.DiskType disk_type = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getDiskType() - { - return $this->disk_type; - } - - /** - * Optional. Indicates the type of the disk. - * - * Generated from protobuf field .google.cloud.notebooks.v2.DiskType disk_type = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setDiskType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Notebooks\V2\DiskType::class); - $this->disk_type = $var; - - return $this; - } - - /** - * Optional. Input only. Disk encryption method used on the boot and data - * disks, defaults to GMEK. - * - * Generated from protobuf field .google.cloud.notebooks.v2.DiskEncryption disk_encryption = 3 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getDiskEncryption() - { - return $this->disk_encryption; - } - - /** - * Optional. Input only. Disk encryption method used on the boot and data - * disks, defaults to GMEK. - * - * Generated from protobuf field .google.cloud.notebooks.v2.DiskEncryption disk_encryption = 3 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setDiskEncryption($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Notebooks\V2\DiskEncryption::class); - $this->disk_encryption = $var; - - return $this; - } - - /** - * Optional. Input only. The KMS key used to encrypt the disks, only - * applicable if disk_encryption is CMEK. Format: - * `projects/{project_id}/locations/{location}/keyRings/{key_ring_id}/cryptoKeys/{key_id}` - * Learn more about using your own encryption keys. - * - * Generated from protobuf field string kms_key = 4 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getKmsKey() - { - return $this->kms_key; - } - - /** - * Optional. Input only. The KMS key used to encrypt the disks, only - * applicable if disk_encryption is CMEK. Format: - * `projects/{project_id}/locations/{location}/keyRings/{key_ring_id}/cryptoKeys/{key_id}` - * Learn more about using your own encryption keys. - * - * Generated from protobuf field string kms_key = 4 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setKmsKey($var) - { - GPBUtil::checkString($var, True); - $this->kms_key = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/CheckInstanceUpgradabilityRequest.php b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/CheckInstanceUpgradabilityRequest.php deleted file mode 100644 index 14ad3c7b8c7b..000000000000 --- a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/CheckInstanceUpgradabilityRequest.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.notebooks.v2.CheckInstanceUpgradabilityRequest - */ -class CheckInstanceUpgradabilityRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * - * Generated from protobuf field string notebook_instance = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $notebook_instance = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $notebook_instance - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V2\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * - * Generated from protobuf field string notebook_instance = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getNotebookInstance() - { - return $this->notebook_instance; - } - - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * - * Generated from protobuf field string notebook_instance = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setNotebookInstance($var) - { - GPBUtil::checkString($var, True); - $this->notebook_instance = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/CheckInstanceUpgradabilityResponse.php b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/CheckInstanceUpgradabilityResponse.php deleted file mode 100644 index fa10bb6afe87..000000000000 --- a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/CheckInstanceUpgradabilityResponse.php +++ /dev/null @@ -1,181 +0,0 @@ -google.cloud.notebooks.v2.CheckInstanceUpgradabilityResponse - */ -class CheckInstanceUpgradabilityResponse extends \Google\Protobuf\Internal\Message -{ - /** - * If an instance is upgradeable. - * - * Generated from protobuf field bool upgradeable = 1; - */ - protected $upgradeable = false; - /** - * The version this instance will be upgraded to if calling the upgrade - * endpoint. This field will only be populated if field upgradeable is true. - * - * Generated from protobuf field string upgrade_version = 2; - */ - protected $upgrade_version = ''; - /** - * Additional information about upgrade. - * - * Generated from protobuf field string upgrade_info = 3; - */ - protected $upgrade_info = ''; - /** - * The new image self link this instance will be upgraded to if calling the - * upgrade endpoint. This field will only be populated if field upgradeable - * is true. - * - * Generated from protobuf field string upgrade_image = 4; - */ - protected $upgrade_image = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $upgradeable - * If an instance is upgradeable. - * @type string $upgrade_version - * The version this instance will be upgraded to if calling the upgrade - * endpoint. This field will only be populated if field upgradeable is true. - * @type string $upgrade_info - * Additional information about upgrade. - * @type string $upgrade_image - * The new image self link this instance will be upgraded to if calling the - * upgrade endpoint. This field will only be populated if field upgradeable - * is true. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V2\Service::initOnce(); - parent::__construct($data); - } - - /** - * If an instance is upgradeable. - * - * Generated from protobuf field bool upgradeable = 1; - * @return bool - */ - public function getUpgradeable() - { - return $this->upgradeable; - } - - /** - * If an instance is upgradeable. - * - * Generated from protobuf field bool upgradeable = 1; - * @param bool $var - * @return $this - */ - public function setUpgradeable($var) - { - GPBUtil::checkBool($var); - $this->upgradeable = $var; - - return $this; - } - - /** - * The version this instance will be upgraded to if calling the upgrade - * endpoint. This field will only be populated if field upgradeable is true. - * - * Generated from protobuf field string upgrade_version = 2; - * @return string - */ - public function getUpgradeVersion() - { - return $this->upgrade_version; - } - - /** - * The version this instance will be upgraded to if calling the upgrade - * endpoint. This field will only be populated if field upgradeable is true. - * - * Generated from protobuf field string upgrade_version = 2; - * @param string $var - * @return $this - */ - public function setUpgradeVersion($var) - { - GPBUtil::checkString($var, True); - $this->upgrade_version = $var; - - return $this; - } - - /** - * Additional information about upgrade. - * - * Generated from protobuf field string upgrade_info = 3; - * @return string - */ - public function getUpgradeInfo() - { - return $this->upgrade_info; - } - - /** - * Additional information about upgrade. - * - * Generated from protobuf field string upgrade_info = 3; - * @param string $var - * @return $this - */ - public function setUpgradeInfo($var) - { - GPBUtil::checkString($var, True); - $this->upgrade_info = $var; - - return $this; - } - - /** - * The new image self link this instance will be upgraded to if calling the - * upgrade endpoint. This field will only be populated if field upgradeable - * is true. - * - * Generated from protobuf field string upgrade_image = 4; - * @return string - */ - public function getUpgradeImage() - { - return $this->upgrade_image; - } - - /** - * The new image self link this instance will be upgraded to if calling the - * upgrade endpoint. This field will only be populated if field upgradeable - * is true. - * - * Generated from protobuf field string upgrade_image = 4; - * @param string $var - * @return $this - */ - public function setUpgradeImage($var) - { - GPBUtil::checkString($var, True); - $this->upgrade_image = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/ContainerImage.php b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/ContainerImage.php deleted file mode 100644 index 72e77b2eb0b6..000000000000 --- a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/ContainerImage.php +++ /dev/null @@ -1,110 +0,0 @@ -google.cloud.notebooks.v2.ContainerImage - */ -class ContainerImage extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The path to the container image repository. For example: - * `gcr.io/{project_id}/{image_name}` - * - * Generated from protobuf field string repository = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $repository = ''; - /** - * Optional. The tag of the container image. If not specified, this defaults - * to the latest tag. - * - * Generated from protobuf field string tag = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $tag = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $repository - * Required. The path to the container image repository. For example: - * `gcr.io/{project_id}/{image_name}` - * @type string $tag - * Optional. The tag of the container image. If not specified, this defaults - * to the latest tag. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V2\GceSetup::initOnce(); - parent::__construct($data); - } - - /** - * Required. The path to the container image repository. For example: - * `gcr.io/{project_id}/{image_name}` - * - * Generated from protobuf field string repository = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getRepository() - { - return $this->repository; - } - - /** - * Required. The path to the container image repository. For example: - * `gcr.io/{project_id}/{image_name}` - * - * Generated from protobuf field string repository = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setRepository($var) - { - GPBUtil::checkString($var, True); - $this->repository = $var; - - return $this; - } - - /** - * Optional. The tag of the container image. If not specified, this defaults - * to the latest tag. - * - * Generated from protobuf field string tag = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getTag() - { - return $this->tag; - } - - /** - * Optional. The tag of the container image. If not specified, this defaults - * to the latest tag. - * - * Generated from protobuf field string tag = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setTag($var) - { - GPBUtil::checkString($var, True); - $this->tag = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/CreateInstanceRequest.php b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/CreateInstanceRequest.php deleted file mode 100644 index 305567395f86..000000000000 --- a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/CreateInstanceRequest.php +++ /dev/null @@ -1,202 +0,0 @@ -google.cloud.notebooks.v2.CreateInstanceRequest - */ -class CreateInstanceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Format: - * `parent=projects/{project_id}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. User-defined unique ID of this instance. - * - * Generated from protobuf field string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $instance_id = ''; - /** - * Required. The instance to be created. - * - * Generated from protobuf field .google.cloud.notebooks.v2.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $instance = null; - /** - * Optional. Idempotent request UUID. - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param string $parent Required. Format: - * `parent=projects/{project_id}/locations/{location}` - * Please see {@see NotebookServiceClient::locationName()} for help formatting this field. - * @param \Google\Cloud\Notebooks\V2\Instance $instance Required. The instance to be created. - * @param string $instanceId Required. User-defined unique ID of this instance. - * - * @return \Google\Cloud\Notebooks\V2\CreateInstanceRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Notebooks\V2\Instance $instance, string $instanceId): self - { - return (new self()) - ->setParent($parent) - ->setInstance($instance) - ->setInstanceId($instanceId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Format: - * `parent=projects/{project_id}/locations/{location}` - * @type string $instance_id - * Required. User-defined unique ID of this instance. - * @type \Google\Cloud\Notebooks\V2\Instance $instance - * Required. The instance to be created. - * @type string $request_id - * Optional. Idempotent request UUID. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V2\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. Format: - * `parent=projects/{project_id}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Format: - * `parent=projects/{project_id}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. User-defined unique ID of this instance. - * - * Generated from protobuf field string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getInstanceId() - { - return $this->instance_id; - } - - /** - * Required. User-defined unique ID of this instance. - * - * Generated from protobuf field string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setInstanceId($var) - { - GPBUtil::checkString($var, True); - $this->instance_id = $var; - - return $this; - } - - /** - * Required. The instance to be created. - * - * Generated from protobuf field .google.cloud.notebooks.v2.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Notebooks\V2\Instance|null - */ - public function getInstance() - { - return $this->instance; - } - - public function hasInstance() - { - return isset($this->instance); - } - - public function clearInstance() - { - unset($this->instance); - } - - /** - * Required. The instance to be created. - * - * Generated from protobuf field .google.cloud.notebooks.v2.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Notebooks\V2\Instance $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V2\Instance::class); - $this->instance = $var; - - return $this; - } - - /** - * Optional. Idempotent request UUID. - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. Idempotent request UUID. - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/DataDisk.php b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/DataDisk.php deleted file mode 100644 index 670f178b50a0..000000000000 --- a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/DataDisk.php +++ /dev/null @@ -1,189 +0,0 @@ -google.cloud.notebooks.v2.DataDisk - */ -class DataDisk extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The size of the disk in GB attached to this VM instance, up to a - * maximum of 64000 GB (64 TB). If not specified, this defaults to 100. - * - * Generated from protobuf field int64 disk_size_gb = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $disk_size_gb = 0; - /** - * Optional. Input only. Indicates the type of the disk. - * - * Generated from protobuf field .google.cloud.notebooks.v2.DiskType disk_type = 2 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; - */ - protected $disk_type = 0; - /** - * Optional. Input only. Disk encryption method used on the boot and data - * disks, defaults to GMEK. - * - * Generated from protobuf field .google.cloud.notebooks.v2.DiskEncryption disk_encryption = 5 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; - */ - protected $disk_encryption = 0; - /** - * Optional. Input only. The KMS key used to encrypt the disks, only - * applicable if disk_encryption is CMEK. Format: - * `projects/{project_id}/locations/{location}/keyRings/{key_ring_id}/cryptoKeys/{key_id}` - * Learn more about using your own encryption keys. - * - * Generated from protobuf field string kms_key = 6 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; - */ - protected $kms_key = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $disk_size_gb - * Optional. The size of the disk in GB attached to this VM instance, up to a - * maximum of 64000 GB (64 TB). If not specified, this defaults to 100. - * @type int $disk_type - * Optional. Input only. Indicates the type of the disk. - * @type int $disk_encryption - * Optional. Input only. Disk encryption method used on the boot and data - * disks, defaults to GMEK. - * @type string $kms_key - * Optional. Input only. The KMS key used to encrypt the disks, only - * applicable if disk_encryption is CMEK. Format: - * `projects/{project_id}/locations/{location}/keyRings/{key_ring_id}/cryptoKeys/{key_id}` - * Learn more about using your own encryption keys. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V2\GceSetup::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The size of the disk in GB attached to this VM instance, up to a - * maximum of 64000 GB (64 TB). If not specified, this defaults to 100. - * - * Generated from protobuf field int64 disk_size_gb = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return int|string - */ - public function getDiskSizeGb() - { - return $this->disk_size_gb; - } - - /** - * Optional. The size of the disk in GB attached to this VM instance, up to a - * maximum of 64000 GB (64 TB). If not specified, this defaults to 100. - * - * Generated from protobuf field int64 disk_size_gb = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param int|string $var - * @return $this - */ - public function setDiskSizeGb($var) - { - GPBUtil::checkInt64($var); - $this->disk_size_gb = $var; - - return $this; - } - - /** - * Optional. Input only. Indicates the type of the disk. - * - * Generated from protobuf field .google.cloud.notebooks.v2.DiskType disk_type = 2 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getDiskType() - { - return $this->disk_type; - } - - /** - * Optional. Input only. Indicates the type of the disk. - * - * Generated from protobuf field .google.cloud.notebooks.v2.DiskType disk_type = 2 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setDiskType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Notebooks\V2\DiskType::class); - $this->disk_type = $var; - - return $this; - } - - /** - * Optional. Input only. Disk encryption method used on the boot and data - * disks, defaults to GMEK. - * - * Generated from protobuf field .google.cloud.notebooks.v2.DiskEncryption disk_encryption = 5 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getDiskEncryption() - { - return $this->disk_encryption; - } - - /** - * Optional. Input only. Disk encryption method used on the boot and data - * disks, defaults to GMEK. - * - * Generated from protobuf field .google.cloud.notebooks.v2.DiskEncryption disk_encryption = 5 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setDiskEncryption($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Notebooks\V2\DiskEncryption::class); - $this->disk_encryption = $var; - - return $this; - } - - /** - * Optional. Input only. The KMS key used to encrypt the disks, only - * applicable if disk_encryption is CMEK. Format: - * `projects/{project_id}/locations/{location}/keyRings/{key_ring_id}/cryptoKeys/{key_id}` - * Learn more about using your own encryption keys. - * - * Generated from protobuf field string kms_key = 6 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getKmsKey() - { - return $this->kms_key; - } - - /** - * Optional. Input only. The KMS key used to encrypt the disks, only - * applicable if disk_encryption is CMEK. Format: - * `projects/{project_id}/locations/{location}/keyRings/{key_ring_id}/cryptoKeys/{key_id}` - * Learn more about using your own encryption keys. - * - * Generated from protobuf field string kms_key = 6 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setKmsKey($var) - { - GPBUtil::checkString($var, True); - $this->kms_key = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/DeleteInstanceRequest.php b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/DeleteInstanceRequest.php deleted file mode 100644 index 6eb1f755fd45..000000000000 --- a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/DeleteInstanceRequest.php +++ /dev/null @@ -1,120 +0,0 @@ -google.cloud.notebooks.v2.DeleteInstanceRequest - */ -class DeleteInstanceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. Idempotent request UUID. - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param string $name Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * Please see {@see NotebookServiceClient::instanceName()} for help formatting this field. - * - * @return \Google\Cloud\Notebooks\V2\DeleteInstanceRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * @type string $request_id - * Optional. Idempotent request UUID. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V2\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. Idempotent request UUID. - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. Idempotent request UUID. - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/DiagnoseInstanceRequest.php b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/DiagnoseInstanceRequest.php deleted file mode 100644 index bf8021ecb723..000000000000 --- a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/DiagnoseInstanceRequest.php +++ /dev/null @@ -1,166 +0,0 @@ -google.cloud.notebooks.v2.DiagnoseInstanceRequest - */ -class DiagnoseInstanceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. Defines flags that are used to run the diagnostic tool - * - * Generated from protobuf field .google.cloud.notebooks.v2.DiagnosticConfig diagnostic_config = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $diagnostic_config = null; - /** - * Optional. Maxmium amount of time in minutes before the operation times out. - * - * Generated from protobuf field int32 timeout_minutes = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $timeout_minutes = 0; - - /** - * @param string $name Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * Please see {@see NotebookServiceClient::instanceName()} for help formatting this field. - * @param \Google\Cloud\Notebooks\V2\DiagnosticConfig $diagnosticConfig Required. Defines flags that are used to run the diagnostic tool - * - * @return \Google\Cloud\Notebooks\V2\DiagnoseInstanceRequest - * - * @experimental - */ - public static function build(string $name, \Google\Cloud\Notebooks\V2\DiagnosticConfig $diagnosticConfig): self - { - return (new self()) - ->setName($name) - ->setDiagnosticConfig($diagnosticConfig); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * @type \Google\Cloud\Notebooks\V2\DiagnosticConfig $diagnostic_config - * Required. Defines flags that are used to run the diagnostic tool - * @type int $timeout_minutes - * Optional. Maxmium amount of time in minutes before the operation times out. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V2\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. Defines flags that are used to run the diagnostic tool - * - * Generated from protobuf field .google.cloud.notebooks.v2.DiagnosticConfig diagnostic_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Notebooks\V2\DiagnosticConfig|null - */ - public function getDiagnosticConfig() - { - return $this->diagnostic_config; - } - - public function hasDiagnosticConfig() - { - return isset($this->diagnostic_config); - } - - public function clearDiagnosticConfig() - { - unset($this->diagnostic_config); - } - - /** - * Required. Defines flags that are used to run the diagnostic tool - * - * Generated from protobuf field .google.cloud.notebooks.v2.DiagnosticConfig diagnostic_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Notebooks\V2\DiagnosticConfig $var - * @return $this - */ - public function setDiagnosticConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V2\DiagnosticConfig::class); - $this->diagnostic_config = $var; - - return $this; - } - - /** - * Optional. Maxmium amount of time in minutes before the operation times out. - * - * Generated from protobuf field int32 timeout_minutes = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getTimeoutMinutes() - { - return $this->timeout_minutes; - } - - /** - * Optional. Maxmium amount of time in minutes before the operation times out. - * - * Generated from protobuf field int32 timeout_minutes = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setTimeoutMinutes($var) - { - GPBUtil::checkInt32($var); - $this->timeout_minutes = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/DiagnosticConfig.php b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/DiagnosticConfig.php deleted file mode 100644 index 23d388e99653..000000000000 --- a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/DiagnosticConfig.php +++ /dev/null @@ -1,259 +0,0 @@ -google.cloud.notebooks.v2.DiagnosticConfig - */ -class DiagnosticConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Required. User Cloud Storage bucket location (REQUIRED). - * Must be formatted with path prefix (`gs://$GCS_BUCKET`). - * Permissions: - * User Managed Notebooks: - * - storage.buckets.writer: Must be given to the project's service account - * attached to VM. - * Google Managed Notebooks: - * - storage.buckets.writer: Must be given to the project's service account or - * user credentials attached to VM depending on authentication mode. - * Cloud Storage bucket Log file will be written to - * `gs://$GCS_BUCKET/$RELATIVE_PATH/$VM_DATE_$TIME.tar.gz` - * - * Generated from protobuf field string gcs_bucket = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $gcs_bucket = ''; - /** - * Optional. Defines the relative storage path in the Cloud Storage bucket - * where the diagnostic logs will be written: Default path will be the root - * directory of the Cloud Storage bucket - * (`gs://$GCS_BUCKET/$DATE_$TIME.tar.gz`) Example of full path where Log file - * will be written: `gs://$GCS_BUCKET/$RELATIVE_PATH/` - * - * Generated from protobuf field string relative_path = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $relative_path = ''; - /** - * Optional. Enables flag to repair service for instance - * - * Generated from protobuf field bool enable_repair_flag = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $enable_repair_flag = false; - /** - * Optional. Enables flag to capture packets from the instance for 30 seconds - * - * Generated from protobuf field bool enable_packet_capture_flag = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $enable_packet_capture_flag = false; - /** - * Optional. Enables flag to copy all `/home/jupyter` folder contents - * - * Generated from protobuf field bool enable_copy_home_files_flag = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $enable_copy_home_files_flag = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $gcs_bucket - * Required. User Cloud Storage bucket location (REQUIRED). - * Must be formatted with path prefix (`gs://$GCS_BUCKET`). - * Permissions: - * User Managed Notebooks: - * - storage.buckets.writer: Must be given to the project's service account - * attached to VM. - * Google Managed Notebooks: - * - storage.buckets.writer: Must be given to the project's service account or - * user credentials attached to VM depending on authentication mode. - * Cloud Storage bucket Log file will be written to - * `gs://$GCS_BUCKET/$RELATIVE_PATH/$VM_DATE_$TIME.tar.gz` - * @type string $relative_path - * Optional. Defines the relative storage path in the Cloud Storage bucket - * where the diagnostic logs will be written: Default path will be the root - * directory of the Cloud Storage bucket - * (`gs://$GCS_BUCKET/$DATE_$TIME.tar.gz`) Example of full path where Log file - * will be written: `gs://$GCS_BUCKET/$RELATIVE_PATH/` - * @type bool $enable_repair_flag - * Optional. Enables flag to repair service for instance - * @type bool $enable_packet_capture_flag - * Optional. Enables flag to capture packets from the instance for 30 seconds - * @type bool $enable_copy_home_files_flag - * Optional. Enables flag to copy all `/home/jupyter` folder contents - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V2\DiagnosticConfig::initOnce(); - parent::__construct($data); - } - - /** - * Required. User Cloud Storage bucket location (REQUIRED). - * Must be formatted with path prefix (`gs://$GCS_BUCKET`). - * Permissions: - * User Managed Notebooks: - * - storage.buckets.writer: Must be given to the project's service account - * attached to VM. - * Google Managed Notebooks: - * - storage.buckets.writer: Must be given to the project's service account or - * user credentials attached to VM depending on authentication mode. - * Cloud Storage bucket Log file will be written to - * `gs://$GCS_BUCKET/$RELATIVE_PATH/$VM_DATE_$TIME.tar.gz` - * - * Generated from protobuf field string gcs_bucket = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getGcsBucket() - { - return $this->gcs_bucket; - } - - /** - * Required. User Cloud Storage bucket location (REQUIRED). - * Must be formatted with path prefix (`gs://$GCS_BUCKET`). - * Permissions: - * User Managed Notebooks: - * - storage.buckets.writer: Must be given to the project's service account - * attached to VM. - * Google Managed Notebooks: - * - storage.buckets.writer: Must be given to the project's service account or - * user credentials attached to VM depending on authentication mode. - * Cloud Storage bucket Log file will be written to - * `gs://$GCS_BUCKET/$RELATIVE_PATH/$VM_DATE_$TIME.tar.gz` - * - * Generated from protobuf field string gcs_bucket = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setGcsBucket($var) - { - GPBUtil::checkString($var, True); - $this->gcs_bucket = $var; - - return $this; - } - - /** - * Optional. Defines the relative storage path in the Cloud Storage bucket - * where the diagnostic logs will be written: Default path will be the root - * directory of the Cloud Storage bucket - * (`gs://$GCS_BUCKET/$DATE_$TIME.tar.gz`) Example of full path where Log file - * will be written: `gs://$GCS_BUCKET/$RELATIVE_PATH/` - * - * Generated from protobuf field string relative_path = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRelativePath() - { - return $this->relative_path; - } - - /** - * Optional. Defines the relative storage path in the Cloud Storage bucket - * where the diagnostic logs will be written: Default path will be the root - * directory of the Cloud Storage bucket - * (`gs://$GCS_BUCKET/$DATE_$TIME.tar.gz`) Example of full path where Log file - * will be written: `gs://$GCS_BUCKET/$RELATIVE_PATH/` - * - * Generated from protobuf field string relative_path = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRelativePath($var) - { - GPBUtil::checkString($var, True); - $this->relative_path = $var; - - return $this; - } - - /** - * Optional. Enables flag to repair service for instance - * - * Generated from protobuf field bool enable_repair_flag = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getEnableRepairFlag() - { - return $this->enable_repair_flag; - } - - /** - * Optional. Enables flag to repair service for instance - * - * Generated from protobuf field bool enable_repair_flag = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setEnableRepairFlag($var) - { - GPBUtil::checkBool($var); - $this->enable_repair_flag = $var; - - return $this; - } - - /** - * Optional. Enables flag to capture packets from the instance for 30 seconds - * - * Generated from protobuf field bool enable_packet_capture_flag = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getEnablePacketCaptureFlag() - { - return $this->enable_packet_capture_flag; - } - - /** - * Optional. Enables flag to capture packets from the instance for 30 seconds - * - * Generated from protobuf field bool enable_packet_capture_flag = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setEnablePacketCaptureFlag($var) - { - GPBUtil::checkBool($var); - $this->enable_packet_capture_flag = $var; - - return $this; - } - - /** - * Optional. Enables flag to copy all `/home/jupyter` folder contents - * - * Generated from protobuf field bool enable_copy_home_files_flag = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getEnableCopyHomeFilesFlag() - { - return $this->enable_copy_home_files_flag; - } - - /** - * Optional. Enables flag to copy all `/home/jupyter` folder contents - * - * Generated from protobuf field bool enable_copy_home_files_flag = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setEnableCopyHomeFilesFlag($var) - { - GPBUtil::checkBool($var); - $this->enable_copy_home_files_flag = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/DiskEncryption.php b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/DiskEncryption.php deleted file mode 100644 index 279b7d57bf0a..000000000000 --- a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/DiskEncryption.php +++ /dev/null @@ -1,61 +0,0 @@ -google.cloud.notebooks.v2.DiskEncryption - */ -class DiskEncryption -{ - /** - * Disk encryption is not specified. - * - * Generated from protobuf enum DISK_ENCRYPTION_UNSPECIFIED = 0; - */ - const DISK_ENCRYPTION_UNSPECIFIED = 0; - /** - * Use Google managed encryption keys to encrypt the boot disk. - * - * Generated from protobuf enum GMEK = 1; - */ - const GMEK = 1; - /** - * Use customer managed encryption keys to encrypt the boot disk. - * - * Generated from protobuf enum CMEK = 2; - */ - const CMEK = 2; - - private static $valueToName = [ - self::DISK_ENCRYPTION_UNSPECIFIED => 'DISK_ENCRYPTION_UNSPECIFIED', - self::GMEK => 'GMEK', - self::CMEK => 'CMEK', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/DiskType.php b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/DiskType.php deleted file mode 100644 index 791c8ff13d74..000000000000 --- a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/DiskType.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.notebooks.v2.DiskType - */ -class DiskType -{ - /** - * Disk type not set. - * - * Generated from protobuf enum DISK_TYPE_UNSPECIFIED = 0; - */ - const DISK_TYPE_UNSPECIFIED = 0; - /** - * Standard persistent disk type. - * - * Generated from protobuf enum PD_STANDARD = 1; - */ - const PD_STANDARD = 1; - /** - * SSD persistent disk type. - * - * Generated from protobuf enum PD_SSD = 2; - */ - const PD_SSD = 2; - /** - * Balanced persistent disk type. - * - * Generated from protobuf enum PD_BALANCED = 3; - */ - const PD_BALANCED = 3; - /** - * Extreme persistent disk type. - * - * Generated from protobuf enum PD_EXTREME = 4; - */ - const PD_EXTREME = 4; - - private static $valueToName = [ - self::DISK_TYPE_UNSPECIFIED => 'DISK_TYPE_UNSPECIFIED', - self::PD_STANDARD => 'PD_STANDARD', - self::PD_SSD => 'PD_SSD', - self::PD_BALANCED => 'PD_BALANCED', - self::PD_EXTREME => 'PD_EXTREME', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/Event.php b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/Event.php deleted file mode 100644 index 9214bd704974..000000000000 --- a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/Event.php +++ /dev/null @@ -1,145 +0,0 @@ -google.cloud.notebooks.v2.Event - */ -class Event extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Event report time. - * - * Generated from protobuf field .google.protobuf.Timestamp report_time = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $report_time = null; - /** - * Optional. Event type. - * - * Generated from protobuf field .google.cloud.notebooks.v2.Event.EventType type = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $type = 0; - /** - * Optional. Event details. This field is used to pass event information. - * - * Generated from protobuf field map details = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $details; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $report_time - * Optional. Event report time. - * @type int $type - * Optional. Event type. - * @type array|\Google\Protobuf\Internal\MapField $details - * Optional. Event details. This field is used to pass event information. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V2\Event::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Event report time. - * - * Generated from protobuf field .google.protobuf.Timestamp report_time = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getReportTime() - { - return $this->report_time; - } - - public function hasReportTime() - { - return isset($this->report_time); - } - - public function clearReportTime() - { - unset($this->report_time); - } - - /** - * Optional. Event report time. - * - * Generated from protobuf field .google.protobuf.Timestamp report_time = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setReportTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->report_time = $var; - - return $this; - } - - /** - * Optional. Event type. - * - * Generated from protobuf field .google.cloud.notebooks.v2.Event.EventType type = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Optional. Event type. - * - * Generated from protobuf field .google.cloud.notebooks.v2.Event.EventType type = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Notebooks\V2\Event\EventType::class); - $this->type = $var; - - return $this; - } - - /** - * Optional. Event details. This field is used to pass event information. - * - * Generated from protobuf field map details = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getDetails() - { - return $this->details; - } - - /** - * Optional. Event details. This field is used to pass event information. - * - * Generated from protobuf field map details = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setDetails($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->details = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/Event/EventType.php b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/Event/EventType.php deleted file mode 100644 index d99ae420a4ac..000000000000 --- a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/Event/EventType.php +++ /dev/null @@ -1,93 +0,0 @@ -google.cloud.notebooks.v2.Event.EventType - */ -class EventType -{ - /** - * Event is not specified. - * - * Generated from protobuf enum EVENT_TYPE_UNSPECIFIED = 0; - */ - const EVENT_TYPE_UNSPECIFIED = 0; - /** - * The instance / runtime is idle - * - * Generated from protobuf enum IDLE = 1; - */ - const IDLE = 1; - /** - * The instance / runtime is available. - * This event indicates that instance / runtime underlying compute is - * operational. - * - * Generated from protobuf enum HEARTBEAT = 2; - */ - const HEARTBEAT = 2; - /** - * The instance / runtime health is available. - * This event indicates that instance / runtime health information. - * - * Generated from protobuf enum HEALTH = 3; - */ - const HEALTH = 3; - /** - * The instance / runtime is available. - * This event allows instance / runtime to send Host maintenance - * information to Control Plane. - * https://cloud.google.com/compute/docs/gpus/gpu-host-maintenance - * - * Generated from protobuf enum MAINTENANCE = 4; - */ - const MAINTENANCE = 4; - /** - * The instance / runtime is available. - * This event indicates that the instance had metadata that needs to be - * modified. - * - * Generated from protobuf enum METADATA_CHANGE = 5; - */ - const METADATA_CHANGE = 5; - - private static $valueToName = [ - self::EVENT_TYPE_UNSPECIFIED => 'EVENT_TYPE_UNSPECIFIED', - self::IDLE => 'IDLE', - self::HEARTBEAT => 'HEARTBEAT', - self::HEALTH => 'HEALTH', - self::MAINTENANCE => 'MAINTENANCE', - self::METADATA_CHANGE => 'METADATA_CHANGE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(EventType::class, \Google\Cloud\Notebooks\V2\Event_EventType::class); - diff --git a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/GPUDriverConfig.php b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/GPUDriverConfig.php deleted file mode 100644 index e7b276edeb92..000000000000 --- a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/GPUDriverConfig.php +++ /dev/null @@ -1,117 +0,0 @@ -google.cloud.notebooks.v2.GPUDriverConfig - */ -class GPUDriverConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Whether the end user authorizes Google Cloud to install GPU - * driver on this VM instance. If this field is empty or set to false, the GPU - * driver won't be installed. Only applicable to instances with GPUs. - * - * Generated from protobuf field bool enable_gpu_driver = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $enable_gpu_driver = false; - /** - * Optional. Specify a custom Cloud Storage path where the GPU driver is - * stored. If not specified, we'll automatically choose from official GPU - * drivers. - * - * Generated from protobuf field string custom_gpu_driver_path = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $custom_gpu_driver_path = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $enable_gpu_driver - * Optional. Whether the end user authorizes Google Cloud to install GPU - * driver on this VM instance. If this field is empty or set to false, the GPU - * driver won't be installed. Only applicable to instances with GPUs. - * @type string $custom_gpu_driver_path - * Optional. Specify a custom Cloud Storage path where the GPU driver is - * stored. If not specified, we'll automatically choose from official GPU - * drivers. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V2\GceSetup::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Whether the end user authorizes Google Cloud to install GPU - * driver on this VM instance. If this field is empty or set to false, the GPU - * driver won't be installed. Only applicable to instances with GPUs. - * - * Generated from protobuf field bool enable_gpu_driver = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getEnableGpuDriver() - { - return $this->enable_gpu_driver; - } - - /** - * Optional. Whether the end user authorizes Google Cloud to install GPU - * driver on this VM instance. If this field is empty or set to false, the GPU - * driver won't be installed. Only applicable to instances with GPUs. - * - * Generated from protobuf field bool enable_gpu_driver = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setEnableGpuDriver($var) - { - GPBUtil::checkBool($var); - $this->enable_gpu_driver = $var; - - return $this; - } - - /** - * Optional. Specify a custom Cloud Storage path where the GPU driver is - * stored. If not specified, we'll automatically choose from official GPU - * drivers. - * - * Generated from protobuf field string custom_gpu_driver_path = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getCustomGpuDriverPath() - { - return $this->custom_gpu_driver_path; - } - - /** - * Optional. Specify a custom Cloud Storage path where the GPU driver is - * stored. If not specified, we'll automatically choose from official GPU - * drivers. - * - * Generated from protobuf field string custom_gpu_driver_path = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setCustomGpuDriverPath($var) - { - GPBUtil::checkString($var, True); - $this->custom_gpu_driver_path = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/GceSetup.php b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/GceSetup.php deleted file mode 100644 index 4865a23b99cd..000000000000 --- a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/GceSetup.php +++ /dev/null @@ -1,595 +0,0 @@ -google.cloud.notebooks.v2.GceSetup - */ -class GceSetup extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The machine type of the VM instance. - * https://cloud.google.com/compute/docs/machine-resource - * - * Generated from protobuf field string machine_type = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $machine_type = ''; - /** - * Optional. The hardware accelerators used on this instance. If you use - * accelerators, make sure that your configuration has - * [enough vCPUs and memory to support the `machine_type` you have - * selected](https://cloud.google.com/compute/docs/gpus/#gpus-list). - * Currently supports only one accelerator configuration. - * - * Generated from protobuf field repeated .google.cloud.notebooks.v2.AcceleratorConfig accelerator_configs = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $accelerator_configs; - /** - * Optional. The service account that serves as an identity for the VM - * instance. Currently supports only one service account. - * - * Generated from protobuf field repeated .google.cloud.notebooks.v2.ServiceAccount service_accounts = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $service_accounts; - /** - * Optional. The boot disk for the VM. - * - * Generated from protobuf field .google.cloud.notebooks.v2.BootDisk boot_disk = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $boot_disk = null; - /** - * Optional. Data disks attached to the VM instance. - * Currently supports only one data disk. - * - * Generated from protobuf field repeated .google.cloud.notebooks.v2.DataDisk data_disks = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $data_disks; - /** - * Optional. Shielded VM configuration. - * [Images using supported Shielded VM - * features](https://cloud.google.com/compute/docs/instances/modifying-shielded-vm). - * - * Generated from protobuf field .google.cloud.notebooks.v2.ShieldedInstanceConfig shielded_instance_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $shielded_instance_config = null; - /** - * Optional. The network interfaces for the VM. - * Supports only one interface. - * - * Generated from protobuf field repeated .google.cloud.notebooks.v2.NetworkInterface network_interfaces = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $network_interfaces; - /** - * Optional. If true, no external IP will be assigned to this VM instance. - * - * Generated from protobuf field bool disable_public_ip = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $disable_public_ip = false; - /** - * Optional. The Compute Engine tags to add to runtime (see [Tagging - * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)). - * - * Generated from protobuf field repeated string tags = 11 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $tags; - /** - * Optional. Custom metadata to apply to this instance. - * - * Generated from protobuf field map metadata = 12 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $metadata; - /** - * Optional. Flag to enable ip forwarding or not, default false/off. - * https://cloud.google.com/vpc/docs/using-routes#canipforward - * - * Generated from protobuf field bool enable_ip_forwarding = 13 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $enable_ip_forwarding = false; - /** - * Optional. Configuration for GPU drivers. - * - * Generated from protobuf field .google.cloud.notebooks.v2.GPUDriverConfig gpu_driver_config = 14 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $gpu_driver_config = null; - protected $image; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $machine_type - * Optional. The machine type of the VM instance. - * https://cloud.google.com/compute/docs/machine-resource - * @type array<\Google\Cloud\Notebooks\V2\AcceleratorConfig>|\Google\Protobuf\Internal\RepeatedField $accelerator_configs - * Optional. The hardware accelerators used on this instance. If you use - * accelerators, make sure that your configuration has - * [enough vCPUs and memory to support the `machine_type` you have - * selected](https://cloud.google.com/compute/docs/gpus/#gpus-list). - * Currently supports only one accelerator configuration. - * @type array<\Google\Cloud\Notebooks\V2\ServiceAccount>|\Google\Protobuf\Internal\RepeatedField $service_accounts - * Optional. The service account that serves as an identity for the VM - * instance. Currently supports only one service account. - * @type \Google\Cloud\Notebooks\V2\VmImage $vm_image - * Optional. Use a Compute Engine VM image to start the notebook instance. - * @type \Google\Cloud\Notebooks\V2\ContainerImage $container_image - * Optional. Use a container image to start the notebook instance. - * @type \Google\Cloud\Notebooks\V2\BootDisk $boot_disk - * Optional. The boot disk for the VM. - * @type array<\Google\Cloud\Notebooks\V2\DataDisk>|\Google\Protobuf\Internal\RepeatedField $data_disks - * Optional. Data disks attached to the VM instance. - * Currently supports only one data disk. - * @type \Google\Cloud\Notebooks\V2\ShieldedInstanceConfig $shielded_instance_config - * Optional. Shielded VM configuration. - * [Images using supported Shielded VM - * features](https://cloud.google.com/compute/docs/instances/modifying-shielded-vm). - * @type array<\Google\Cloud\Notebooks\V2\NetworkInterface>|\Google\Protobuf\Internal\RepeatedField $network_interfaces - * Optional. The network interfaces for the VM. - * Supports only one interface. - * @type bool $disable_public_ip - * Optional. If true, no external IP will be assigned to this VM instance. - * @type array|\Google\Protobuf\Internal\RepeatedField $tags - * Optional. The Compute Engine tags to add to runtime (see [Tagging - * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)). - * @type array|\Google\Protobuf\Internal\MapField $metadata - * Optional. Custom metadata to apply to this instance. - * @type bool $enable_ip_forwarding - * Optional. Flag to enable ip forwarding or not, default false/off. - * https://cloud.google.com/vpc/docs/using-routes#canipforward - * @type \Google\Cloud\Notebooks\V2\GPUDriverConfig $gpu_driver_config - * Optional. Configuration for GPU drivers. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V2\GceSetup::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The machine type of the VM instance. - * https://cloud.google.com/compute/docs/machine-resource - * - * Generated from protobuf field string machine_type = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getMachineType() - { - return $this->machine_type; - } - - /** - * Optional. The machine type of the VM instance. - * https://cloud.google.com/compute/docs/machine-resource - * - * Generated from protobuf field string machine_type = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setMachineType($var) - { - GPBUtil::checkString($var, True); - $this->machine_type = $var; - - return $this; - } - - /** - * Optional. The hardware accelerators used on this instance. If you use - * accelerators, make sure that your configuration has - * [enough vCPUs and memory to support the `machine_type` you have - * selected](https://cloud.google.com/compute/docs/gpus/#gpus-list). - * Currently supports only one accelerator configuration. - * - * Generated from protobuf field repeated .google.cloud.notebooks.v2.AcceleratorConfig accelerator_configs = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAcceleratorConfigs() - { - return $this->accelerator_configs; - } - - /** - * Optional. The hardware accelerators used on this instance. If you use - * accelerators, make sure that your configuration has - * [enough vCPUs and memory to support the `machine_type` you have - * selected](https://cloud.google.com/compute/docs/gpus/#gpus-list). - * Currently supports only one accelerator configuration. - * - * Generated from protobuf field repeated .google.cloud.notebooks.v2.AcceleratorConfig accelerator_configs = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\Notebooks\V2\AcceleratorConfig>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAcceleratorConfigs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Notebooks\V2\AcceleratorConfig::class); - $this->accelerator_configs = $arr; - - return $this; - } - - /** - * Optional. The service account that serves as an identity for the VM - * instance. Currently supports only one service account. - * - * Generated from protobuf field repeated .google.cloud.notebooks.v2.ServiceAccount service_accounts = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getServiceAccounts() - { - return $this->service_accounts; - } - - /** - * Optional. The service account that serves as an identity for the VM - * instance. Currently supports only one service account. - * - * Generated from protobuf field repeated .google.cloud.notebooks.v2.ServiceAccount service_accounts = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\Notebooks\V2\ServiceAccount>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setServiceAccounts($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Notebooks\V2\ServiceAccount::class); - $this->service_accounts = $arr; - - return $this; - } - - /** - * Optional. Use a Compute Engine VM image to start the notebook instance. - * - * Generated from protobuf field .google.cloud.notebooks.v2.VmImage vm_image = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Notebooks\V2\VmImage|null - */ - public function getVmImage() - { - return $this->readOneof(4); - } - - public function hasVmImage() - { - return $this->hasOneof(4); - } - - /** - * Optional. Use a Compute Engine VM image to start the notebook instance. - * - * Generated from protobuf field .google.cloud.notebooks.v2.VmImage vm_image = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Notebooks\V2\VmImage $var - * @return $this - */ - public function setVmImage($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V2\VmImage::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Optional. Use a container image to start the notebook instance. - * - * Generated from protobuf field .google.cloud.notebooks.v2.ContainerImage container_image = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Notebooks\V2\ContainerImage|null - */ - public function getContainerImage() - { - return $this->readOneof(5); - } - - public function hasContainerImage() - { - return $this->hasOneof(5); - } - - /** - * Optional. Use a container image to start the notebook instance. - * - * Generated from protobuf field .google.cloud.notebooks.v2.ContainerImage container_image = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Notebooks\V2\ContainerImage $var - * @return $this - */ - public function setContainerImage($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V2\ContainerImage::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * Optional. The boot disk for the VM. - * - * Generated from protobuf field .google.cloud.notebooks.v2.BootDisk boot_disk = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Notebooks\V2\BootDisk|null - */ - public function getBootDisk() - { - return $this->boot_disk; - } - - public function hasBootDisk() - { - return isset($this->boot_disk); - } - - public function clearBootDisk() - { - unset($this->boot_disk); - } - - /** - * Optional. The boot disk for the VM. - * - * Generated from protobuf field .google.cloud.notebooks.v2.BootDisk boot_disk = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Notebooks\V2\BootDisk $var - * @return $this - */ - public function setBootDisk($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V2\BootDisk::class); - $this->boot_disk = $var; - - return $this; - } - - /** - * Optional. Data disks attached to the VM instance. - * Currently supports only one data disk. - * - * Generated from protobuf field repeated .google.cloud.notebooks.v2.DataDisk data_disks = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDataDisks() - { - return $this->data_disks; - } - - /** - * Optional. Data disks attached to the VM instance. - * Currently supports only one data disk. - * - * Generated from protobuf field repeated .google.cloud.notebooks.v2.DataDisk data_disks = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\Notebooks\V2\DataDisk>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDataDisks($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Notebooks\V2\DataDisk::class); - $this->data_disks = $arr; - - return $this; - } - - /** - * Optional. Shielded VM configuration. - * [Images using supported Shielded VM - * features](https://cloud.google.com/compute/docs/instances/modifying-shielded-vm). - * - * Generated from protobuf field .google.cloud.notebooks.v2.ShieldedInstanceConfig shielded_instance_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Notebooks\V2\ShieldedInstanceConfig|null - */ - public function getShieldedInstanceConfig() - { - return $this->shielded_instance_config; - } - - public function hasShieldedInstanceConfig() - { - return isset($this->shielded_instance_config); - } - - public function clearShieldedInstanceConfig() - { - unset($this->shielded_instance_config); - } - - /** - * Optional. Shielded VM configuration. - * [Images using supported Shielded VM - * features](https://cloud.google.com/compute/docs/instances/modifying-shielded-vm). - * - * Generated from protobuf field .google.cloud.notebooks.v2.ShieldedInstanceConfig shielded_instance_config = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Notebooks\V2\ShieldedInstanceConfig $var - * @return $this - */ - public function setShieldedInstanceConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V2\ShieldedInstanceConfig::class); - $this->shielded_instance_config = $var; - - return $this; - } - - /** - * Optional. The network interfaces for the VM. - * Supports only one interface. - * - * Generated from protobuf field repeated .google.cloud.notebooks.v2.NetworkInterface network_interfaces = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNetworkInterfaces() - { - return $this->network_interfaces; - } - - /** - * Optional. The network interfaces for the VM. - * Supports only one interface. - * - * Generated from protobuf field repeated .google.cloud.notebooks.v2.NetworkInterface network_interfaces = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\Notebooks\V2\NetworkInterface>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNetworkInterfaces($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Notebooks\V2\NetworkInterface::class); - $this->network_interfaces = $arr; - - return $this; - } - - /** - * Optional. If true, no external IP will be assigned to this VM instance. - * - * Generated from protobuf field bool disable_public_ip = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getDisablePublicIp() - { - return $this->disable_public_ip; - } - - /** - * Optional. If true, no external IP will be assigned to this VM instance. - * - * Generated from protobuf field bool disable_public_ip = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setDisablePublicIp($var) - { - GPBUtil::checkBool($var); - $this->disable_public_ip = $var; - - return $this; - } - - /** - * Optional. The Compute Engine tags to add to runtime (see [Tagging - * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)). - * - * Generated from protobuf field repeated string tags = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTags() - { - return $this->tags; - } - - /** - * Optional. The Compute Engine tags to add to runtime (see [Tagging - * instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)). - * - * Generated from protobuf field repeated string tags = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTags($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->tags = $arr; - - return $this; - } - - /** - * Optional. Custom metadata to apply to this instance. - * - * Generated from protobuf field map metadata = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getMetadata() - { - return $this->metadata; - } - - /** - * Optional. Custom metadata to apply to this instance. - * - * Generated from protobuf field map metadata = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setMetadata($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->metadata = $arr; - - return $this; - } - - /** - * Optional. Flag to enable ip forwarding or not, default false/off. - * https://cloud.google.com/vpc/docs/using-routes#canipforward - * - * Generated from protobuf field bool enable_ip_forwarding = 13 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getEnableIpForwarding() - { - return $this->enable_ip_forwarding; - } - - /** - * Optional. Flag to enable ip forwarding or not, default false/off. - * https://cloud.google.com/vpc/docs/using-routes#canipforward - * - * Generated from protobuf field bool enable_ip_forwarding = 13 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setEnableIpForwarding($var) - { - GPBUtil::checkBool($var); - $this->enable_ip_forwarding = $var; - - return $this; - } - - /** - * Optional. Configuration for GPU drivers. - * - * Generated from protobuf field .google.cloud.notebooks.v2.GPUDriverConfig gpu_driver_config = 14 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Notebooks\V2\GPUDriverConfig|null - */ - public function getGpuDriverConfig() - { - return $this->gpu_driver_config; - } - - public function hasGpuDriverConfig() - { - return isset($this->gpu_driver_config); - } - - public function clearGpuDriverConfig() - { - unset($this->gpu_driver_config); - } - - /** - * Optional. Configuration for GPU drivers. - * - * Generated from protobuf field .google.cloud.notebooks.v2.GPUDriverConfig gpu_driver_config = 14 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Notebooks\V2\GPUDriverConfig $var - * @return $this - */ - public function setGpuDriverConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V2\GPUDriverConfig::class); - $this->gpu_driver_config = $var; - - return $this; - } - - /** - * @return string - */ - public function getImage() - { - return $this->whichOneof("image"); - } - -} - diff --git a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/GetInstanceRequest.php b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/GetInstanceRequest.php deleted file mode 100644 index c33d67eee7dd..000000000000 --- a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/GetInstanceRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.notebooks.v2.GetInstanceRequest - */ -class GetInstanceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * Please see {@see NotebookServiceClient::instanceName()} for help formatting this field. - * - * @return \Google\Cloud\Notebooks\V2\GetInstanceRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V2\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/HealthState.php b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/HealthState.php deleted file mode 100644 index c40fc6741f0a..000000000000 --- a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/HealthState.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.notebooks.v2.HealthState - */ -class HealthState -{ - /** - * The instance substate is unknown. - * - * Generated from protobuf enum HEALTH_STATE_UNSPECIFIED = 0; - */ - const HEALTH_STATE_UNSPECIFIED = 0; - /** - * The instance is known to be in an healthy state - * (for example, critical daemons are running) - * Applies to ACTIVE state. - * - * Generated from protobuf enum HEALTHY = 1; - */ - const HEALTHY = 1; - /** - * The instance is known to be in an unhealthy state - * (for example, critical daemons are not running) - * Applies to ACTIVE state. - * - * Generated from protobuf enum UNHEALTHY = 2; - */ - const UNHEALTHY = 2; - /** - * The instance has not installed health monitoring agent. - * Applies to ACTIVE state. - * - * Generated from protobuf enum AGENT_NOT_INSTALLED = 3; - */ - const AGENT_NOT_INSTALLED = 3; - /** - * The instance health monitoring agent is not running. - * Applies to ACTIVE state. - * - * Generated from protobuf enum AGENT_NOT_RUNNING = 4; - */ - const AGENT_NOT_RUNNING = 4; - - private static $valueToName = [ - self::HEALTH_STATE_UNSPECIFIED => 'HEALTH_STATE_UNSPECIFIED', - self::HEALTHY => 'HEALTHY', - self::UNHEALTHY => 'UNHEALTHY', - self::AGENT_NOT_INSTALLED => 'AGENT_NOT_INSTALLED', - self::AGENT_NOT_RUNNING => 'AGENT_NOT_RUNNING', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/Instance.php b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/Instance.php deleted file mode 100644 index fac652448bdc..000000000000 --- a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/Instance.php +++ /dev/null @@ -1,604 +0,0 @@ -google.cloud.notebooks.v2.Instance - */ -class Instance extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The name of this notebook instance. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. The proxy endpoint that is used to access the Jupyter - * notebook. - * - * Generated from protobuf field string proxy_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $proxy_uri = ''; - /** - * Optional. Input only. The owner of this instance after creation. Format: - * `alias@example.com` - * Currently supports one owner only. If not specified, all of the service - * account users of your VM instance's service account can use - * the instance. - * - * Generated from protobuf field repeated string instance_owners = 4 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; - */ - private $instance_owners; - /** - * Output only. Email address of entity that sent original CreateInstance - * request. - * - * Generated from protobuf field string creator = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $creator = ''; - /** - * Output only. The state of this instance. - * - * Generated from protobuf field .google.cloud.notebooks.v2.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. The upgrade history of this instance. - * - * Generated from protobuf field repeated .google.cloud.notebooks.v2.UpgradeHistoryEntry upgrade_history = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $upgrade_history; - /** - * Output only. Unique ID of the resource. - * - * Generated from protobuf field string id = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $id = ''; - /** - * Output only. Instance health_state. - * - * Generated from protobuf field .google.cloud.notebooks.v2.HealthState health_state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $health_state = 0; - /** - * Output only. Additional information about instance health. - * Example: - * healthInfo": { - * "docker_proxy_agent_status": "1", - * "docker_status": "1", - * "jupyterlab_api_status": "-1", - * "jupyterlab_status": "-1", - * "updated": "2020-10-18 09:40:03.573409" - * } - * - * Generated from protobuf field map health_info = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $health_info; - /** - * Output only. Instance creation time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. Instance update time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Optional. If true, the notebook instance will not register with the proxy. - * - * Generated from protobuf field bool disable_proxy_access = 13 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $disable_proxy_access = false; - /** - * Optional. Labels to apply to this instance. - * These can be later modified by the UpdateInstance method. - * - * Generated from protobuf field map labels = 14 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - protected $infrastructure; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The name of this notebook instance. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * @type \Google\Cloud\Notebooks\V2\GceSetup $gce_setup - * Optional. Compute Engine setup for the notebook. Uses notebook-defined - * fields. - * @type string $proxy_uri - * Output only. The proxy endpoint that is used to access the Jupyter - * notebook. - * @type array|\Google\Protobuf\Internal\RepeatedField $instance_owners - * Optional. Input only. The owner of this instance after creation. Format: - * `alias@example.com` - * Currently supports one owner only. If not specified, all of the service - * account users of your VM instance's service account can use - * the instance. - * @type string $creator - * Output only. Email address of entity that sent original CreateInstance - * request. - * @type int $state - * Output only. The state of this instance. - * @type array<\Google\Cloud\Notebooks\V2\UpgradeHistoryEntry>|\Google\Protobuf\Internal\RepeatedField $upgrade_history - * Output only. The upgrade history of this instance. - * @type string $id - * Output only. Unique ID of the resource. - * @type int $health_state - * Output only. Instance health_state. - * @type array|\Google\Protobuf\Internal\MapField $health_info - * Output only. Additional information about instance health. - * Example: - * healthInfo": { - * "docker_proxy_agent_status": "1", - * "docker_status": "1", - * "jupyterlab_api_status": "-1", - * "jupyterlab_status": "-1", - * "updated": "2020-10-18 09:40:03.573409" - * } - * @type \Google\Protobuf\Timestamp $create_time - * Output only. Instance creation time. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. Instance update time. - * @type bool $disable_proxy_access - * Optional. If true, the notebook instance will not register with the proxy. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. Labels to apply to this instance. - * These can be later modified by the UpdateInstance method. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V2\Instance::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The name of this notebook instance. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The name of this notebook instance. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. Compute Engine setup for the notebook. Uses notebook-defined - * fields. - * - * Generated from protobuf field .google.cloud.notebooks.v2.GceSetup gce_setup = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Notebooks\V2\GceSetup|null - */ - public function getGceSetup() - { - return $this->readOneof(2); - } - - public function hasGceSetup() - { - return $this->hasOneof(2); - } - - /** - * Optional. Compute Engine setup for the notebook. Uses notebook-defined - * fields. - * - * Generated from protobuf field .google.cloud.notebooks.v2.GceSetup gce_setup = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Notebooks\V2\GceSetup $var - * @return $this - */ - public function setGceSetup($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V2\GceSetup::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Output only. The proxy endpoint that is used to access the Jupyter - * notebook. - * - * Generated from protobuf field string proxy_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getProxyUri() - { - return $this->proxy_uri; - } - - /** - * Output only. The proxy endpoint that is used to access the Jupyter - * notebook. - * - * Generated from protobuf field string proxy_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setProxyUri($var) - { - GPBUtil::checkString($var, True); - $this->proxy_uri = $var; - - return $this; - } - - /** - * Optional. Input only. The owner of this instance after creation. Format: - * `alias@example.com` - * Currently supports one owner only. If not specified, all of the service - * account users of your VM instance's service account can use - * the instance. - * - * Generated from protobuf field repeated string instance_owners = 4 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getInstanceOwners() - { - return $this->instance_owners; - } - - /** - * Optional. Input only. The owner of this instance after creation. Format: - * `alias@example.com` - * Currently supports one owner only. If not specified, all of the service - * account users of your VM instance's service account can use - * the instance. - * - * Generated from protobuf field repeated string instance_owners = 4 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setInstanceOwners($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->instance_owners = $arr; - - return $this; - } - - /** - * Output only. Email address of entity that sent original CreateInstance - * request. - * - * Generated from protobuf field string creator = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getCreator() - { - return $this->creator; - } - - /** - * Output only. Email address of entity that sent original CreateInstance - * request. - * - * Generated from protobuf field string creator = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setCreator($var) - { - GPBUtil::checkString($var, True); - $this->creator = $var; - - return $this; - } - - /** - * Output only. The state of this instance. - * - * Generated from protobuf field .google.cloud.notebooks.v2.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The state of this instance. - * - * Generated from protobuf field .google.cloud.notebooks.v2.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Notebooks\V2\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. The upgrade history of this instance. - * - * Generated from protobuf field repeated .google.cloud.notebooks.v2.UpgradeHistoryEntry upgrade_history = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUpgradeHistory() - { - return $this->upgrade_history; - } - - /** - * Output only. The upgrade history of this instance. - * - * Generated from protobuf field repeated .google.cloud.notebooks.v2.UpgradeHistoryEntry upgrade_history = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\Notebooks\V2\UpgradeHistoryEntry>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUpgradeHistory($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Notebooks\V2\UpgradeHistoryEntry::class); - $this->upgrade_history = $arr; - - return $this; - } - - /** - * Output only. Unique ID of the resource. - * - * Generated from protobuf field string id = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * Output only. Unique ID of the resource. - * - * Generated from protobuf field string id = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setId($var) - { - GPBUtil::checkString($var, True); - $this->id = $var; - - return $this; - } - - /** - * Output only. Instance health_state. - * - * Generated from protobuf field .google.cloud.notebooks.v2.HealthState health_state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getHealthState() - { - return $this->health_state; - } - - /** - * Output only. Instance health_state. - * - * Generated from protobuf field .google.cloud.notebooks.v2.HealthState health_state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setHealthState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Notebooks\V2\HealthState::class); - $this->health_state = $var; - - return $this; - } - - /** - * Output only. Additional information about instance health. - * Example: - * healthInfo": { - * "docker_proxy_agent_status": "1", - * "docker_status": "1", - * "jupyterlab_api_status": "-1", - * "jupyterlab_status": "-1", - * "updated": "2020-10-18 09:40:03.573409" - * } - * - * Generated from protobuf field map health_info = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getHealthInfo() - { - return $this->health_info; - } - - /** - * Output only. Additional information about instance health. - * Example: - * healthInfo": { - * "docker_proxy_agent_status": "1", - * "docker_status": "1", - * "jupyterlab_api_status": "-1", - * "jupyterlab_status": "-1", - * "updated": "2020-10-18 09:40:03.573409" - * } - * - * Generated from protobuf field map health_info = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setHealthInfo($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->health_info = $arr; - - return $this; - } - - /** - * Output only. Instance creation time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. Instance creation time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. Instance update time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. Instance update time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Optional. If true, the notebook instance will not register with the proxy. - * - * Generated from protobuf field bool disable_proxy_access = 13 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getDisableProxyAccess() - { - return $this->disable_proxy_access; - } - - /** - * Optional. If true, the notebook instance will not register with the proxy. - * - * Generated from protobuf field bool disable_proxy_access = 13 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setDisableProxyAccess($var) - { - GPBUtil::checkBool($var); - $this->disable_proxy_access = $var; - - return $this; - } - - /** - * Optional. Labels to apply to this instance. - * These can be later modified by the UpdateInstance method. - * - * Generated from protobuf field map labels = 14 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. Labels to apply to this instance. - * These can be later modified by the UpdateInstance method. - * - * Generated from protobuf field map labels = 14 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * @return string - */ - public function getInfrastructure() - { - return $this->whichOneof("infrastructure"); - } - -} - diff --git a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/ListInstancesRequest.php b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/ListInstancesRequest.php deleted file mode 100644 index debdf1761f08..000000000000 --- a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/ListInstancesRequest.php +++ /dev/null @@ -1,230 +0,0 @@ -google.cloud.notebooks.v2.ListInstancesRequest - */ -class ListInstancesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Format: - * `parent=projects/{project_id}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Maximum return size of the list call. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. A previous returned page token that can be used to continue - * listing from the last result. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. Sort results. Supported values are "name", "name desc" or "" - * (unsorted). - * - * Generated from protobuf field string order_by = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - /** - * Optional. List filter. - * - * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - - /** - * @param string $parent Required. Format: - * `parent=projects/{project_id}/locations/{location}` - * Please see {@see NotebookServiceClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\Notebooks\V2\ListInstancesRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Format: - * `parent=projects/{project_id}/locations/{location}` - * @type int $page_size - * Optional. Maximum return size of the list call. - * @type string $page_token - * Optional. A previous returned page token that can be used to continue - * listing from the last result. - * @type string $order_by - * Optional. Sort results. Supported values are "name", "name desc" or "" - * (unsorted). - * @type string $filter - * Optional. List filter. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V2\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. Format: - * `parent=projects/{project_id}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Format: - * `parent=projects/{project_id}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. Maximum return size of the list call. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. Maximum return size of the list call. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. A previous returned page token that can be used to continue - * listing from the last result. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. A previous returned page token that can be used to continue - * listing from the last result. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Optional. Sort results. Supported values are "name", "name desc" or "" - * (unsorted). - * - * Generated from protobuf field string order_by = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Optional. Sort results. Supported values are "name", "name desc" or "" - * (unsorted). - * - * Generated from protobuf field string order_by = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - - /** - * Optional. List filter. - * - * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. List filter. - * - * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/ListInstancesResponse.php b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/ListInstancesResponse.php deleted file mode 100644 index 0a01d401ae79..000000000000 --- a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/ListInstancesResponse.php +++ /dev/null @@ -1,147 +0,0 @@ -google.cloud.notebooks.v2.ListInstancesResponse - */ -class ListInstancesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of returned instances. - * - * Generated from protobuf field repeated .google.cloud.notebooks.v2.Instance instances = 1; - */ - private $instances; - /** - * Page token that can be used to continue listing from the last result in the - * next list call. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Locations that could not be reached. For example, - * ['us-west1-a', 'us-central1-b']. - * A ListInstancesResponse will only contain either instances or unreachables, - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Notebooks\V2\Instance>|\Google\Protobuf\Internal\RepeatedField $instances - * A list of returned instances. - * @type string $next_page_token - * Page token that can be used to continue listing from the last result in the - * next list call. - * @type array|\Google\Protobuf\Internal\RepeatedField $unreachable - * Locations that could not be reached. For example, - * ['us-west1-a', 'us-central1-b']. - * A ListInstancesResponse will only contain either instances or unreachables, - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V2\Service::initOnce(); - parent::__construct($data); - } - - /** - * A list of returned instances. - * - * Generated from protobuf field repeated .google.cloud.notebooks.v2.Instance instances = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getInstances() - { - return $this->instances; - } - - /** - * A list of returned instances. - * - * Generated from protobuf field repeated .google.cloud.notebooks.v2.Instance instances = 1; - * @param array<\Google\Cloud\Notebooks\V2\Instance>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setInstances($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Notebooks\V2\Instance::class); - $this->instances = $arr; - - return $this; - } - - /** - * Page token that can be used to continue listing from the last result in the - * next list call. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Page token that can be used to continue listing from the last result in the - * next list call. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Locations that could not be reached. For example, - * ['us-west1-a', 'us-central1-b']. - * A ListInstancesResponse will only contain either instances or unreachables, - * - * Generated from protobuf field repeated string unreachable = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached. For example, - * ['us-west1-a', 'us-central1-b']. - * A ListInstancesResponse will only contain either instances or unreachables, - * - * Generated from protobuf field repeated string unreachable = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/NetworkInterface.php b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/NetworkInterface.php deleted file mode 100644 index 66f44bc6a3bf..000000000000 --- a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/NetworkInterface.php +++ /dev/null @@ -1,155 +0,0 @@ -google.cloud.notebooks.v2.NetworkInterface - */ -class NetworkInterface extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The name of the VPC that this VM instance is in. - * Format: - * `projects/{project_id}/global/networks/{network_id}` - * - * Generated from protobuf field string network = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $network = ''; - /** - * Optional. The name of the subnet that this VM instance is in. - * Format: - * `projects/{project_id}/regions/{region}/subnetworks/{subnetwork_id}` - * - * Generated from protobuf field string subnet = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $subnet = ''; - /** - * Optional. The type of vNIC to be used on this interface. This may be gVNIC - * or VirtioNet. - * - * Generated from protobuf field .google.cloud.notebooks.v2.NetworkInterface.NicType nic_type = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $nic_type = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $network - * Optional. The name of the VPC that this VM instance is in. - * Format: - * `projects/{project_id}/global/networks/{network_id}` - * @type string $subnet - * Optional. The name of the subnet that this VM instance is in. - * Format: - * `projects/{project_id}/regions/{region}/subnetworks/{subnetwork_id}` - * @type int $nic_type - * Optional. The type of vNIC to be used on this interface. This may be gVNIC - * or VirtioNet. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V2\GceSetup::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The name of the VPC that this VM instance is in. - * Format: - * `projects/{project_id}/global/networks/{network_id}` - * - * Generated from protobuf field string network = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getNetwork() - { - return $this->network; - } - - /** - * Optional. The name of the VPC that this VM instance is in. - * Format: - * `projects/{project_id}/global/networks/{network_id}` - * - * Generated from protobuf field string network = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setNetwork($var) - { - GPBUtil::checkString($var, True); - $this->network = $var; - - return $this; - } - - /** - * Optional. The name of the subnet that this VM instance is in. - * Format: - * `projects/{project_id}/regions/{region}/subnetworks/{subnetwork_id}` - * - * Generated from protobuf field string subnet = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getSubnet() - { - return $this->subnet; - } - - /** - * Optional. The name of the subnet that this VM instance is in. - * Format: - * `projects/{project_id}/regions/{region}/subnetworks/{subnetwork_id}` - * - * Generated from protobuf field string subnet = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setSubnet($var) - { - GPBUtil::checkString($var, True); - $this->subnet = $var; - - return $this; - } - - /** - * Optional. The type of vNIC to be used on this interface. This may be gVNIC - * or VirtioNet. - * - * Generated from protobuf field .google.cloud.notebooks.v2.NetworkInterface.NicType nic_type = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getNicType() - { - return $this->nic_type; - } - - /** - * Optional. The type of vNIC to be used on this interface. This may be gVNIC - * or VirtioNet. - * - * Generated from protobuf field .google.cloud.notebooks.v2.NetworkInterface.NicType nic_type = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setNicType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Notebooks\V2\NetworkInterface\NicType::class); - $this->nic_type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/NetworkInterface/NicType.php b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/NetworkInterface/NicType.php deleted file mode 100644 index d8ddfee35971..000000000000 --- a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/NetworkInterface/NicType.php +++ /dev/null @@ -1,65 +0,0 @@ -google.cloud.notebooks.v2.NetworkInterface.NicType - */ -class NicType -{ - /** - * No type specified. - * - * Generated from protobuf enum NIC_TYPE_UNSPECIFIED = 0; - */ - const NIC_TYPE_UNSPECIFIED = 0; - /** - * VIRTIO - * - * Generated from protobuf enum VIRTIO_NET = 1; - */ - const VIRTIO_NET = 1; - /** - * GVNIC - * - * Generated from protobuf enum GVNIC = 2; - */ - const GVNIC = 2; - - private static $valueToName = [ - self::NIC_TYPE_UNSPECIFIED => 'NIC_TYPE_UNSPECIFIED', - self::VIRTIO_NET => 'VIRTIO_NET', - self::GVNIC => 'GVNIC', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(NicType::class, \Google\Cloud\Notebooks\V2\NetworkInterface_NicType::class); - diff --git a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/OperationMetadata.php b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/OperationMetadata.php deleted file mode 100644 index 501b362e7d4f..000000000000 --- a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/OperationMetadata.php +++ /dev/null @@ -1,341 +0,0 @@ -google.cloud.notebooks.v2.OperationMetadata - */ -class OperationMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; - */ - protected $create_time = null; - /** - * The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - */ - protected $end_time = null; - /** - * Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3; - */ - protected $target = ''; - /** - * Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4; - */ - protected $verb = ''; - /** - * Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_message = 5; - */ - protected $status_message = ''; - /** - * Identifies whether the user has requested cancellation - * of the operation. Operations that have successfully been cancelled - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. - * - * Generated from protobuf field bool requested_cancellation = 6; - */ - protected $requested_cancellation = false; - /** - * API version used to start the operation. - * - * Generated from protobuf field string api_version = 7; - */ - protected $api_version = ''; - /** - * API endpoint name of this operation. - * - * Generated from protobuf field string endpoint = 8; - */ - protected $endpoint = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $create_time - * The time the operation was created. - * @type \Google\Protobuf\Timestamp $end_time - * The time the operation finished running. - * @type string $target - * Server-defined resource path for the target of the operation. - * @type string $verb - * Name of the verb executed by the operation. - * @type string $status_message - * Human-readable status of the operation, if any. - * @type bool $requested_cancellation - * Identifies whether the user has requested cancellation - * of the operation. Operations that have successfully been cancelled - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. - * @type string $api_version - * API version used to start the operation. - * @type string $endpoint - * API endpoint name of this operation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V2\Service::initOnce(); - parent::__construct($data); - } - - /** - * The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3; - * @return string - */ - public function getTarget() - { - return $this->target; - } - - /** - * Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3; - * @param string $var - * @return $this - */ - public function setTarget($var) - { - GPBUtil::checkString($var, True); - $this->target = $var; - - return $this; - } - - /** - * Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4; - * @return string - */ - public function getVerb() - { - return $this->verb; - } - - /** - * Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4; - * @param string $var - * @return $this - */ - public function setVerb($var) - { - GPBUtil::checkString($var, True); - $this->verb = $var; - - return $this; - } - - /** - * Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_message = 5; - * @return string - */ - public function getStatusMessage() - { - return $this->status_message; - } - - /** - * Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_message = 5; - * @param string $var - * @return $this - */ - public function setStatusMessage($var) - { - GPBUtil::checkString($var, True); - $this->status_message = $var; - - return $this; - } - - /** - * Identifies whether the user has requested cancellation - * of the operation. Operations that have successfully been cancelled - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. - * - * Generated from protobuf field bool requested_cancellation = 6; - * @return bool - */ - public function getRequestedCancellation() - { - return $this->requested_cancellation; - } - - /** - * Identifies whether the user has requested cancellation - * of the operation. Operations that have successfully been cancelled - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. - * - * Generated from protobuf field bool requested_cancellation = 6; - * @param bool $var - * @return $this - */ - public function setRequestedCancellation($var) - { - GPBUtil::checkBool($var); - $this->requested_cancellation = $var; - - return $this; - } - - /** - * API version used to start the operation. - * - * Generated from protobuf field string api_version = 7; - * @return string - */ - public function getApiVersion() - { - return $this->api_version; - } - - /** - * API version used to start the operation. - * - * Generated from protobuf field string api_version = 7; - * @param string $var - * @return $this - */ - public function setApiVersion($var) - { - GPBUtil::checkString($var, True); - $this->api_version = $var; - - return $this; - } - - /** - * API endpoint name of this operation. - * - * Generated from protobuf field string endpoint = 8; - * @return string - */ - public function getEndpoint() - { - return $this->endpoint; - } - - /** - * API endpoint name of this operation. - * - * Generated from protobuf field string endpoint = 8; - * @param string $var - * @return $this - */ - public function setEndpoint($var) - { - GPBUtil::checkString($var, True); - $this->endpoint = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/ResetInstanceRequest.php b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/ResetInstanceRequest.php deleted file mode 100644 index b76c5142315b..000000000000 --- a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/ResetInstanceRequest.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.notebooks.v2.ResetInstanceRequest - */ -class ResetInstanceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V2\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/RollbackInstanceRequest.php b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/RollbackInstanceRequest.php deleted file mode 100644 index 77824123e24e..000000000000 --- a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/RollbackInstanceRequest.php +++ /dev/null @@ -1,143 +0,0 @@ -google.cloud.notebooks.v2.RollbackInstanceRequest - */ -class RollbackInstanceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. The snapshot for rollback. - * Example: "projects/test-project/global/snapshots/krwlzipynril". - * - * Generated from protobuf field string target_snapshot = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $target_snapshot = ''; - /** - * Required. Output only. Revision Id - * - * Generated from protobuf field string revision_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = REQUIRED]; - */ - protected $revision_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * @type string $target_snapshot - * Required. The snapshot for rollback. - * Example: "projects/test-project/global/snapshots/krwlzipynril". - * @type string $revision_id - * Required. Output only. Revision Id - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V2\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. The snapshot for rollback. - * Example: "projects/test-project/global/snapshots/krwlzipynril". - * - * Generated from protobuf field string target_snapshot = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getTargetSnapshot() - { - return $this->target_snapshot; - } - - /** - * Required. The snapshot for rollback. - * Example: "projects/test-project/global/snapshots/krwlzipynril". - * - * Generated from protobuf field string target_snapshot = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setTargetSnapshot($var) - { - GPBUtil::checkString($var, True); - $this->target_snapshot = $var; - - return $this; - } - - /** - * Required. Output only. Revision Id - * - * Generated from protobuf field string revision_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getRevisionId() - { - return $this->revision_id; - } - - /** - * Required. Output only. Revision Id - * - * Generated from protobuf field string revision_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setRevisionId($var) - { - GPBUtil::checkString($var, True); - $this->revision_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/ServiceAccount.php b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/ServiceAccount.php deleted file mode 100644 index 8016666a9a2f..000000000000 --- a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/ServiceAccount.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.notebooks.v2.ServiceAccount - */ -class ServiceAccount extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Email address of the service account. - * - * Generated from protobuf field string email = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $email = ''; - /** - * Output only. The list of scopes to be made available for this service - * account. Set by the CLH to https://www.googleapis.com/auth/cloud-platform - * - * Generated from protobuf field repeated string scopes = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $scopes; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $email - * Optional. Email address of the service account. - * @type array|\Google\Protobuf\Internal\RepeatedField $scopes - * Output only. The list of scopes to be made available for this service - * account. Set by the CLH to https://www.googleapis.com/auth/cloud-platform - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V2\GceSetup::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Email address of the service account. - * - * Generated from protobuf field string email = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getEmail() - { - return $this->email; - } - - /** - * Optional. Email address of the service account. - * - * Generated from protobuf field string email = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setEmail($var) - { - GPBUtil::checkString($var, True); - $this->email = $var; - - return $this; - } - - /** - * Output only. The list of scopes to be made available for this service - * account. Set by the CLH to https://www.googleapis.com/auth/cloud-platform - * - * Generated from protobuf field repeated string scopes = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getScopes() - { - return $this->scopes; - } - - /** - * Output only. The list of scopes to be made available for this service - * account. Set by the CLH to https://www.googleapis.com/auth/cloud-platform - * - * Generated from protobuf field repeated string scopes = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setScopes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->scopes = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/ShieldedInstanceConfig.php b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/ShieldedInstanceConfig.php deleted file mode 100644 index 911a41c87c93..000000000000 --- a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/ShieldedInstanceConfig.php +++ /dev/null @@ -1,170 +0,0 @@ -google.cloud.notebooks.v2.ShieldedInstanceConfig - */ -class ShieldedInstanceConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Defines whether the VM instance has Secure Boot enabled. - * Secure Boot helps ensure that the system only runs authentic software by - * verifying the digital signature of all boot components, and halting the - * boot process if signature verification fails. Disabled by default. - * - * Generated from protobuf field bool enable_secure_boot = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $enable_secure_boot = false; - /** - * Optional. Defines whether the VM instance has the vTPM enabled. Enabled by - * default. - * - * Generated from protobuf field bool enable_vtpm = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $enable_vtpm = false; - /** - * Optional. Defines whether the VM instance has integrity monitoring enabled. - * Enables monitoring and attestation of the boot integrity of the VM - * instance. The attestation is performed against the integrity policy - * baseline. This baseline is initially derived from the implicitly trusted - * boot image when the VM instance is created. Enabled by default. - * - * Generated from protobuf field bool enable_integrity_monitoring = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $enable_integrity_monitoring = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $enable_secure_boot - * Optional. Defines whether the VM instance has Secure Boot enabled. - * Secure Boot helps ensure that the system only runs authentic software by - * verifying the digital signature of all boot components, and halting the - * boot process if signature verification fails. Disabled by default. - * @type bool $enable_vtpm - * Optional. Defines whether the VM instance has the vTPM enabled. Enabled by - * default. - * @type bool $enable_integrity_monitoring - * Optional. Defines whether the VM instance has integrity monitoring enabled. - * Enables monitoring and attestation of the boot integrity of the VM - * instance. The attestation is performed against the integrity policy - * baseline. This baseline is initially derived from the implicitly trusted - * boot image when the VM instance is created. Enabled by default. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V2\GceSetup::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Defines whether the VM instance has Secure Boot enabled. - * Secure Boot helps ensure that the system only runs authentic software by - * verifying the digital signature of all boot components, and halting the - * boot process if signature verification fails. Disabled by default. - * - * Generated from protobuf field bool enable_secure_boot = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getEnableSecureBoot() - { - return $this->enable_secure_boot; - } - - /** - * Optional. Defines whether the VM instance has Secure Boot enabled. - * Secure Boot helps ensure that the system only runs authentic software by - * verifying the digital signature of all boot components, and halting the - * boot process if signature verification fails. Disabled by default. - * - * Generated from protobuf field bool enable_secure_boot = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setEnableSecureBoot($var) - { - GPBUtil::checkBool($var); - $this->enable_secure_boot = $var; - - return $this; - } - - /** - * Optional. Defines whether the VM instance has the vTPM enabled. Enabled by - * default. - * - * Generated from protobuf field bool enable_vtpm = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getEnableVtpm() - { - return $this->enable_vtpm; - } - - /** - * Optional. Defines whether the VM instance has the vTPM enabled. Enabled by - * default. - * - * Generated from protobuf field bool enable_vtpm = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setEnableVtpm($var) - { - GPBUtil::checkBool($var); - $this->enable_vtpm = $var; - - return $this; - } - - /** - * Optional. Defines whether the VM instance has integrity monitoring enabled. - * Enables monitoring and attestation of the boot integrity of the VM - * instance. The attestation is performed against the integrity policy - * baseline. This baseline is initially derived from the implicitly trusted - * boot image when the VM instance is created. Enabled by default. - * - * Generated from protobuf field bool enable_integrity_monitoring = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getEnableIntegrityMonitoring() - { - return $this->enable_integrity_monitoring; - } - - /** - * Optional. Defines whether the VM instance has integrity monitoring enabled. - * Enables monitoring and attestation of the boot integrity of the VM - * instance. The attestation is performed against the integrity policy - * baseline. This baseline is initially derived from the implicitly trusted - * boot image when the VM instance is created. Enabled by default. - * - * Generated from protobuf field bool enable_integrity_monitoring = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setEnableIntegrityMonitoring($var) - { - GPBUtil::checkBool($var); - $this->enable_integrity_monitoring = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/StartInstanceRequest.php b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/StartInstanceRequest.php deleted file mode 100644 index 41021273b9d3..000000000000 --- a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/StartInstanceRequest.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.notebooks.v2.StartInstanceRequest - */ -class StartInstanceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V2\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/State.php b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/State.php deleted file mode 100644 index 2a3e87827fa6..000000000000 --- a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/State.php +++ /dev/null @@ -1,118 +0,0 @@ -google.cloud.notebooks.v2.State - */ -class State -{ - /** - * State is not specified. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The control logic is starting the instance. - * - * Generated from protobuf enum STARTING = 1; - */ - const STARTING = 1; - /** - * The control logic is installing required frameworks and registering the - * instance with notebook proxy - * - * Generated from protobuf enum PROVISIONING = 2; - */ - const PROVISIONING = 2; - /** - * The instance is running. - * - * Generated from protobuf enum ACTIVE = 3; - */ - const ACTIVE = 3; - /** - * The control logic is stopping the instance. - * - * Generated from protobuf enum STOPPING = 4; - */ - const STOPPING = 4; - /** - * The instance is stopped. - * - * Generated from protobuf enum STOPPED = 5; - */ - const STOPPED = 5; - /** - * The instance is deleted. - * - * Generated from protobuf enum DELETED = 6; - */ - const DELETED = 6; - /** - * The instance is upgrading. - * - * Generated from protobuf enum UPGRADING = 7; - */ - const UPGRADING = 7; - /** - * The instance is being created. - * - * Generated from protobuf enum INITIALIZING = 8; - */ - const INITIALIZING = 8; - /** - * The instance is suspending. - * - * Generated from protobuf enum SUSPENDING = 9; - */ - const SUSPENDING = 9; - /** - * The instance is suspended. - * - * Generated from protobuf enum SUSPENDED = 10; - */ - const SUSPENDED = 10; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::STARTING => 'STARTING', - self::PROVISIONING => 'PROVISIONING', - self::ACTIVE => 'ACTIVE', - self::STOPPING => 'STOPPING', - self::STOPPED => 'STOPPED', - self::DELETED => 'DELETED', - self::UPGRADING => 'UPGRADING', - self::INITIALIZING => 'INITIALIZING', - self::SUSPENDING => 'SUSPENDING', - self::SUSPENDED => 'SUSPENDED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/StopInstanceRequest.php b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/StopInstanceRequest.php deleted file mode 100644 index b3ae64046da9..000000000000 --- a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/StopInstanceRequest.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.notebooks.v2.StopInstanceRequest - */ -class StopInstanceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V2\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/UpdateInstanceRequest.php b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/UpdateInstanceRequest.php deleted file mode 100644 index 7ded465f5ce2..000000000000 --- a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/UpdateInstanceRequest.php +++ /dev/null @@ -1,170 +0,0 @@ -google.cloud.notebooks.v2.UpdateInstanceRequest - */ -class UpdateInstanceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A representation of an instance. - * - * Generated from protobuf field .google.cloud.notebooks.v2.Instance instance = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $instance = null; - /** - * Required. Mask used to update an instance - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * Optional. Idempotent request UUID. - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param \Google\Cloud\Notebooks\V2\Instance $instance Required. A representation of an instance. - * @param \Google\Protobuf\FieldMask $updateMask Required. Mask used to update an instance - * - * @return \Google\Cloud\Notebooks\V2\UpdateInstanceRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Notebooks\V2\Instance $instance, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setInstance($instance) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Notebooks\V2\Instance $instance - * Required. A representation of an instance. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Mask used to update an instance - * @type string $request_id - * Optional. Idempotent request UUID. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V2\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. A representation of an instance. - * - * Generated from protobuf field .google.cloud.notebooks.v2.Instance instance = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Notebooks\V2\Instance|null - */ - public function getInstance() - { - return $this->instance; - } - - public function hasInstance() - { - return isset($this->instance); - } - - public function clearInstance() - { - unset($this->instance); - } - - /** - * Required. A representation of an instance. - * - * Generated from protobuf field .google.cloud.notebooks.v2.Instance instance = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Notebooks\V2\Instance $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Notebooks\V2\Instance::class); - $this->instance = $var; - - return $this; - } - - /** - * Required. Mask used to update an instance - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Required. Mask used to update an instance - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * Optional. Idempotent request UUID. - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. Idempotent request UUID. - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/UpgradeHistoryEntry.php b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/UpgradeHistoryEntry.php deleted file mode 100644 index 01fdd5a03451..000000000000 --- a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/UpgradeHistoryEntry.php +++ /dev/null @@ -1,353 +0,0 @@ -google.cloud.notebooks.v2.UpgradeHistoryEntry - */ -class UpgradeHistoryEntry extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The snapshot of the boot disk of this notebook instance before - * upgrade. - * - * Generated from protobuf field string snapshot = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $snapshot = ''; - /** - * Optional. The VM image before this instance upgrade. - * - * Generated from protobuf field string vm_image = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $vm_image = ''; - /** - * Optional. The container image before this instance upgrade. - * - * Generated from protobuf field string container_image = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $container_image = ''; - /** - * Optional. The framework of this notebook instance. - * - * Generated from protobuf field string framework = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $framework = ''; - /** - * Optional. The version of the notebook instance before this upgrade. - * - * Generated from protobuf field string version = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $version = ''; - /** - * Output only. The state of this instance upgrade history entry. - * - * Generated from protobuf field .google.cloud.notebooks.v2.UpgradeHistoryEntry.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Immutable. The time that this instance upgrade history entry is created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $create_time = null; - /** - * Optional. Action. Rolloback or Upgrade. - * - * Generated from protobuf field .google.cloud.notebooks.v2.UpgradeHistoryEntry.Action action = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $action = 0; - /** - * Optional. Target VM Version, like m63. - * - * Generated from protobuf field string target_version = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $target_version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $snapshot - * Optional. The snapshot of the boot disk of this notebook instance before - * upgrade. - * @type string $vm_image - * Optional. The VM image before this instance upgrade. - * @type string $container_image - * Optional. The container image before this instance upgrade. - * @type string $framework - * Optional. The framework of this notebook instance. - * @type string $version - * Optional. The version of the notebook instance before this upgrade. - * @type int $state - * Output only. The state of this instance upgrade history entry. - * @type \Google\Protobuf\Timestamp $create_time - * Immutable. The time that this instance upgrade history entry is created. - * @type int $action - * Optional. Action. Rolloback or Upgrade. - * @type string $target_version - * Optional. Target VM Version, like m63. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V2\Instance::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The snapshot of the boot disk of this notebook instance before - * upgrade. - * - * Generated from protobuf field string snapshot = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getSnapshot() - { - return $this->snapshot; - } - - /** - * Optional. The snapshot of the boot disk of this notebook instance before - * upgrade. - * - * Generated from protobuf field string snapshot = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setSnapshot($var) - { - GPBUtil::checkString($var, True); - $this->snapshot = $var; - - return $this; - } - - /** - * Optional. The VM image before this instance upgrade. - * - * Generated from protobuf field string vm_image = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getVmImage() - { - return $this->vm_image; - } - - /** - * Optional. The VM image before this instance upgrade. - * - * Generated from protobuf field string vm_image = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setVmImage($var) - { - GPBUtil::checkString($var, True); - $this->vm_image = $var; - - return $this; - } - - /** - * Optional. The container image before this instance upgrade. - * - * Generated from protobuf field string container_image = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getContainerImage() - { - return $this->container_image; - } - - /** - * Optional. The container image before this instance upgrade. - * - * Generated from protobuf field string container_image = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setContainerImage($var) - { - GPBUtil::checkString($var, True); - $this->container_image = $var; - - return $this; - } - - /** - * Optional. The framework of this notebook instance. - * - * Generated from protobuf field string framework = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFramework() - { - return $this->framework; - } - - /** - * Optional. The framework of this notebook instance. - * - * Generated from protobuf field string framework = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFramework($var) - { - GPBUtil::checkString($var, True); - $this->framework = $var; - - return $this; - } - - /** - * Optional. The version of the notebook instance before this upgrade. - * - * Generated from protobuf field string version = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * Optional. The version of the notebook instance before this upgrade. - * - * Generated from protobuf field string version = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkString($var, True); - $this->version = $var; - - return $this; - } - - /** - * Output only. The state of this instance upgrade history entry. - * - * Generated from protobuf field .google.cloud.notebooks.v2.UpgradeHistoryEntry.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The state of this instance upgrade history entry. - * - * Generated from protobuf field .google.cloud.notebooks.v2.UpgradeHistoryEntry.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Notebooks\V2\UpgradeHistoryEntry\State::class); - $this->state = $var; - - return $this; - } - - /** - * Immutable. The time that this instance upgrade history entry is created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = IMMUTABLE]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Immutable. The time that this instance upgrade history entry is created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = IMMUTABLE]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Optional. Action. Rolloback or Upgrade. - * - * Generated from protobuf field .google.cloud.notebooks.v2.UpgradeHistoryEntry.Action action = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getAction() - { - return $this->action; - } - - /** - * Optional. Action. Rolloback or Upgrade. - * - * Generated from protobuf field .google.cloud.notebooks.v2.UpgradeHistoryEntry.Action action = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setAction($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Notebooks\V2\UpgradeHistoryEntry\Action::class); - $this->action = $var; - - return $this; - } - - /** - * Optional. Target VM Version, like m63. - * - * Generated from protobuf field string target_version = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getTargetVersion() - { - return $this->target_version; - } - - /** - * Optional. Target VM Version, like m63. - * - * Generated from protobuf field string target_version = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setTargetVersion($var) - { - GPBUtil::checkString($var, True); - $this->target_version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/UpgradeHistoryEntry/Action.php b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/UpgradeHistoryEntry/Action.php deleted file mode 100644 index 563ca0f0e2ef..000000000000 --- a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/UpgradeHistoryEntry/Action.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.notebooks.v2.UpgradeHistoryEntry.Action - */ -class Action -{ - /** - * Operation is not specified. - * - * Generated from protobuf enum ACTION_UNSPECIFIED = 0; - */ - const ACTION_UNSPECIFIED = 0; - /** - * Upgrade. - * - * Generated from protobuf enum UPGRADE = 1; - */ - const UPGRADE = 1; - /** - * Rollback. - * - * Generated from protobuf enum ROLLBACK = 2; - */ - const ROLLBACK = 2; - - private static $valueToName = [ - self::ACTION_UNSPECIFIED => 'ACTION_UNSPECIFIED', - self::UPGRADE => 'UPGRADE', - self::ROLLBACK => 'ROLLBACK', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Action::class, \Google\Cloud\Notebooks\V2\UpgradeHistoryEntry_Action::class); - diff --git a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/UpgradeHistoryEntry/State.php b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/UpgradeHistoryEntry/State.php deleted file mode 100644 index b1760831b649..000000000000 --- a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/UpgradeHistoryEntry/State.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.notebooks.v2.UpgradeHistoryEntry.State - */ -class State -{ - /** - * State is not specified. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The instance upgrade is started. - * - * Generated from protobuf enum STARTED = 1; - */ - const STARTED = 1; - /** - * The instance upgrade is succeeded. - * - * Generated from protobuf enum SUCCEEDED = 2; - */ - const SUCCEEDED = 2; - /** - * The instance upgrade is failed. - * - * Generated from protobuf enum FAILED = 3; - */ - const FAILED = 3; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::STARTED => 'STARTED', - self::SUCCEEDED => 'SUCCEEDED', - self::FAILED => 'FAILED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\Notebooks\V2\UpgradeHistoryEntry_State::class); - diff --git a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/UpgradeInstanceRequest.php b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/UpgradeInstanceRequest.php deleted file mode 100644 index 7335c3fdaa52..000000000000 --- a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/UpgradeInstanceRequest.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.notebooks.v2.UpgradeInstanceRequest - */ -class UpgradeInstanceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V2\Service::initOnce(); - parent::__construct($data); - } - - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Format: - * `projects/{project_id}/locations/{location}/instances/{instance_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/VmImage.php b/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/VmImage.php deleted file mode 100644 index e1b2043b1087..000000000000 --- a/owl-bot-staging/Notebooks/v2/proto/src/Google/Cloud/Notebooks/V2/VmImage.php +++ /dev/null @@ -1,150 +0,0 @@ -google.cloud.notebooks.v2.VmImage - */ -class VmImage extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the Google Cloud project that this VM image belongs - * to. Format: `{project_id}` - * - * Generated from protobuf field string project = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $project = ''; - protected $image; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $project - * Required. The name of the Google Cloud project that this VM image belongs - * to. Format: `{project_id}` - * @type string $name - * Optional. Use VM image name to find the image. - * @type string $family - * Optional. Use this VM image family to find the image; the newest image in - * this family will be used. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Notebooks\V2\GceSetup::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the Google Cloud project that this VM image belongs - * to. Format: `{project_id}` - * - * Generated from protobuf field string project = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getProject() - { - return $this->project; - } - - /** - * Required. The name of the Google Cloud project that this VM image belongs - * to. Format: `{project_id}` - * - * Generated from protobuf field string project = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setProject($var) - { - GPBUtil::checkString($var, True); - $this->project = $var; - - return $this; - } - - /** - * Optional. Use VM image name to find the image. - * - * Generated from protobuf field string name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getName() - { - return $this->readOneof(2); - } - - public function hasName() - { - return $this->hasOneof(2); - } - - /** - * Optional. Use VM image name to find the image. - * - * Generated from protobuf field string name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Optional. Use this VM image family to find the image; the newest image in - * this family will be used. - * - * Generated from protobuf field string family = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFamily() - { - return $this->readOneof(3); - } - - public function hasFamily() - { - return $this->hasOneof(3); - } - - /** - * Optional. Use this VM image family to find the image; the newest image in - * this family will be used. - * - * Generated from protobuf field string family = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFamily($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * @return string - */ - public function getImage() - { - return $this->whichOneof("image"); - } - -} - diff --git a/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/check_instance_upgradability.php b/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/check_instance_upgradability.php deleted file mode 100644 index c5103127231e..000000000000 --- a/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/check_instance_upgradability.php +++ /dev/null @@ -1,71 +0,0 @@ -setNotebookInstance($notebookInstance); - - // Call the API and handle any network failures. - try { - /** @var CheckInstanceUpgradabilityResponse $response */ - $response = $notebookServiceClient->checkInstanceUpgradability($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $notebookInstance = '[NOTEBOOK_INSTANCE]'; - - check_instance_upgradability_sample($notebookInstance); -} -// [END notebooks_v2_generated_NotebookService_CheckInstanceUpgradability_sync] diff --git a/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/create_instance.php b/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/create_instance.php deleted file mode 100644 index 29d7d630614e..000000000000 --- a/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/create_instance.php +++ /dev/null @@ -1,89 +0,0 @@ -setParent($formattedParent) - ->setInstanceId($instanceId) - ->setInstance($instance); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $notebookServiceClient->createInstance($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Instance $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = NotebookServiceClient::locationName('[PROJECT]', '[LOCATION]'); - $instanceId = '[INSTANCE_ID]'; - - create_instance_sample($formattedParent, $instanceId); -} -// [END notebooks_v2_generated_NotebookService_CreateInstance_sync] diff --git a/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/delete_instance.php b/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/delete_instance.php deleted file mode 100644 index 36b6deb597c2..000000000000 --- a/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/delete_instance.php +++ /dev/null @@ -1,81 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $notebookServiceClient->deleteInstance($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = NotebookServiceClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - - delete_instance_sample($formattedName); -} -// [END notebooks_v2_generated_NotebookService_DeleteInstance_sync] diff --git a/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/diagnose_instance.php b/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/diagnose_instance.php deleted file mode 100644 index 188de47652ee..000000000000 --- a/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/diagnose_instance.php +++ /dev/null @@ -1,102 +0,0 @@ -setGcsBucket($diagnosticConfigGcsBucket); - $request = (new DiagnoseInstanceRequest()) - ->setName($formattedName) - ->setDiagnosticConfig($diagnosticConfig); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $notebookServiceClient->diagnoseInstance($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Instance $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = NotebookServiceClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $diagnosticConfigGcsBucket = '[GCS_BUCKET]'; - - diagnose_instance_sample($formattedName, $diagnosticConfigGcsBucket); -} -// [END notebooks_v2_generated_NotebookService_DiagnoseInstance_sync] diff --git a/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/get_iam_policy.php b/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/get_iam_policy.php deleted file mode 100644 index fe98d25db90e..000000000000 --- a/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/get_iam_policy.php +++ /dev/null @@ -1,72 +0,0 @@ -setResource($resource); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $notebookServiceClient->getIamPolicy($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - - get_iam_policy_sample($resource); -} -// [END notebooks_v2_generated_NotebookService_GetIamPolicy_sync] diff --git a/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/get_instance.php b/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/get_instance.php deleted file mode 100644 index 77d56d6d2529..000000000000 --- a/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/get_instance.php +++ /dev/null @@ -1,72 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Instance $response */ - $response = $notebookServiceClient->getInstance($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = NotebookServiceClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - - get_instance_sample($formattedName); -} -// [END notebooks_v2_generated_NotebookService_GetInstance_sync] diff --git a/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/get_location.php b/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/get_location.php deleted file mode 100644 index e4fffc83196c..000000000000 --- a/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/get_location.php +++ /dev/null @@ -1,57 +0,0 @@ -getLocation($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END notebooks_v2_generated_NotebookService_GetLocation_sync] diff --git a/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/list_instances.php b/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/list_instances.php deleted file mode 100644 index 4aaeb887ad69..000000000000 --- a/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/list_instances.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $notebookServiceClient->listInstances($request); - - /** @var Instance $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = NotebookServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - list_instances_sample($formattedParent); -} -// [END notebooks_v2_generated_NotebookService_ListInstances_sync] diff --git a/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/list_locations.php b/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/list_locations.php deleted file mode 100644 index 5b17097a0908..000000000000 --- a/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/list_locations.php +++ /dev/null @@ -1,62 +0,0 @@ -listLocations($request); - - /** @var Location $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END notebooks_v2_generated_NotebookService_ListLocations_sync] diff --git a/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/reset_instance.php b/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/reset_instance.php deleted file mode 100644 index d19193397abc..000000000000 --- a/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/reset_instance.php +++ /dev/null @@ -1,83 +0,0 @@ -setName($name); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $notebookServiceClient->resetInstance($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Instance $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $name = '[NAME]'; - - reset_instance_sample($name); -} -// [END notebooks_v2_generated_NotebookService_ResetInstance_sync] diff --git a/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/rollback_instance.php b/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/rollback_instance.php deleted file mode 100644 index 8e0e74dbc651..000000000000 --- a/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/rollback_instance.php +++ /dev/null @@ -1,94 +0,0 @@ -setName($formattedName) - ->setTargetSnapshot($targetSnapshot) - ->setRevisionId($revisionId); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $notebookServiceClient->rollbackInstance($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Instance $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = NotebookServiceClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $targetSnapshot = '[TARGET_SNAPSHOT]'; - $revisionId = '[REVISION_ID]'; - - rollback_instance_sample($formattedName, $targetSnapshot, $revisionId); -} -// [END notebooks_v2_generated_NotebookService_RollbackInstance_sync] diff --git a/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/set_iam_policy.php b/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/set_iam_policy.php deleted file mode 100644 index 87352e35233c..000000000000 --- a/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/set_iam_policy.php +++ /dev/null @@ -1,77 +0,0 @@ -setResource($resource) - ->setPolicy($policy); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $notebookServiceClient->setIamPolicy($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - - set_iam_policy_sample($resource); -} -// [END notebooks_v2_generated_NotebookService_SetIamPolicy_sync] diff --git a/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/start_instance.php b/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/start_instance.php deleted file mode 100644 index 904dde7fe569..000000000000 --- a/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/start_instance.php +++ /dev/null @@ -1,83 +0,0 @@ -setName($name); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $notebookServiceClient->startInstance($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Instance $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $name = '[NAME]'; - - start_instance_sample($name); -} -// [END notebooks_v2_generated_NotebookService_StartInstance_sync] diff --git a/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/stop_instance.php b/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/stop_instance.php deleted file mode 100644 index d77777e9afb8..000000000000 --- a/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/stop_instance.php +++ /dev/null @@ -1,83 +0,0 @@ -setName($name); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $notebookServiceClient->stopInstance($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Instance $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $name = '[NAME]'; - - stop_instance_sample($name); -} -// [END notebooks_v2_generated_NotebookService_StopInstance_sync] diff --git a/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/test_iam_permissions.php b/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/test_iam_permissions.php deleted file mode 100644 index 7a87de458106..000000000000 --- a/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/test_iam_permissions.php +++ /dev/null @@ -1,84 +0,0 @@ -setResource($resource) - ->setPermissions($permissions); - - // Call the API and handle any network failures. - try { - /** @var TestIamPermissionsResponse $response */ - $response = $notebookServiceClient->testIamPermissions($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resource = '[RESOURCE]'; - $permissionsElement = '[PERMISSIONS]'; - - test_iam_permissions_sample($resource, $permissionsElement); -} -// [END notebooks_v2_generated_NotebookService_TestIamPermissions_sync] diff --git a/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/update_instance.php b/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/update_instance.php deleted file mode 100644 index 36d1de28baab..000000000000 --- a/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/update_instance.php +++ /dev/null @@ -1,74 +0,0 @@ -setInstance($instance) - ->setUpdateMask($updateMask); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $notebookServiceClient->updateInstance($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Instance $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END notebooks_v2_generated_NotebookService_UpdateInstance_sync] diff --git a/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/upgrade_instance.php b/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/upgrade_instance.php deleted file mode 100644 index ad762b17b778..000000000000 --- a/owl-bot-staging/Notebooks/v2/samples/V2/NotebookServiceClient/upgrade_instance.php +++ /dev/null @@ -1,83 +0,0 @@ -setName($name); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $notebookServiceClient->upgradeInstance($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Instance $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $name = '[NAME]'; - - upgrade_instance_sample($name); -} -// [END notebooks_v2_generated_NotebookService_UpgradeInstance_sync] diff --git a/owl-bot-staging/Notebooks/v2/src/V2/Client/NotebookServiceClient.php b/owl-bot-staging/Notebooks/v2/src/V2/Client/NotebookServiceClient.php deleted file mode 100644 index 1726bc4528aa..000000000000 --- a/owl-bot-staging/Notebooks/v2/src/V2/Client/NotebookServiceClient.php +++ /dev/null @@ -1,780 +0,0 @@ - checkInstanceUpgradabilityAsync(CheckInstanceUpgradabilityRequest $request, array $optionalArgs = []) - * @method PromiseInterface createInstanceAsync(CreateInstanceRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteInstanceAsync(DeleteInstanceRequest $request, array $optionalArgs = []) - * @method PromiseInterface diagnoseInstanceAsync(DiagnoseInstanceRequest $request, array $optionalArgs = []) - * @method PromiseInterface getInstanceAsync(GetInstanceRequest $request, array $optionalArgs = []) - * @method PromiseInterface listInstancesAsync(ListInstancesRequest $request, array $optionalArgs = []) - * @method PromiseInterface resetInstanceAsync(ResetInstanceRequest $request, array $optionalArgs = []) - * @method PromiseInterface rollbackInstanceAsync(RollbackInstanceRequest $request, array $optionalArgs = []) - * @method PromiseInterface startInstanceAsync(StartInstanceRequest $request, array $optionalArgs = []) - * @method PromiseInterface stopInstanceAsync(StopInstanceRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateInstanceAsync(UpdateInstanceRequest $request, array $optionalArgs = []) - * @method PromiseInterface upgradeInstanceAsync(UpgradeInstanceRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) - * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface setIamPolicyAsync(SetIamPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) - */ -final class NotebookServiceClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.notebooks.v2.NotebookService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'notebooks.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'notebooks.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/notebook_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/notebook_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/notebook_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/notebook_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Create the default operation client for the service. - * - * @param array $options ClientOptions for the client. - * - * @return OperationsClient - */ - private function createOperationsClient(array $options) - { - // Unset client-specific configuration options - unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); - - if (isset($options['operationsClient'])) { - return $options['operationsClient']; - } - - return new OperationsClient($options); - } - - /** - * Formats a string containing the fully-qualified path to represent a instance - * resource. - * - * @param string $project - * @param string $location - * @param string $instance - * - * @return string The formatted instance resource. - */ - public static function instanceName(string $project, string $location, string $instance): string - { - return self::getPathTemplate('instance')->render([ - 'project' => $project, - 'location' => $location, - 'instance' => $instance, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a location - * resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted location resource. - */ - public static function locationName(string $project, string $location): string - { - return self::getPathTemplate('location')->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - instance: projects/{project}/locations/{location}/instances/{instance} - * - location: projects/{project}/locations/{location} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param ?string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, ?string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'notebooks.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Checks whether a notebook instance is upgradable. - * - * The async variant is - * {@see NotebookServiceClient::checkInstanceUpgradabilityAsync()} . - * - * @example samples/V2/NotebookServiceClient/check_instance_upgradability.php - * - * @param CheckInstanceUpgradabilityRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return CheckInstanceUpgradabilityResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function checkInstanceUpgradability(CheckInstanceUpgradabilityRequest $request, array $callOptions = []): CheckInstanceUpgradabilityResponse - { - return $this->startApiCall('CheckInstanceUpgradability', $request, $callOptions)->wait(); - } - - /** - * Creates a new Instance in a given project and location. - * - * The async variant is {@see NotebookServiceClient::createInstanceAsync()} . - * - * @example samples/V2/NotebookServiceClient/create_instance.php - * - * @param CreateInstanceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createInstance(CreateInstanceRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateInstance', $request, $callOptions)->wait(); - } - - /** - * Deletes a single Instance. - * - * The async variant is {@see NotebookServiceClient::deleteInstanceAsync()} . - * - * @example samples/V2/NotebookServiceClient/delete_instance.php - * - * @param DeleteInstanceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteInstance(DeleteInstanceRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteInstance', $request, $callOptions)->wait(); - } - - /** - * Creates a Diagnostic File and runs Diagnostic Tool given an Instance. - * - * The async variant is {@see NotebookServiceClient::diagnoseInstanceAsync()} . - * - * @example samples/V2/NotebookServiceClient/diagnose_instance.php - * - * @param DiagnoseInstanceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function diagnoseInstance(DiagnoseInstanceRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DiagnoseInstance', $request, $callOptions)->wait(); - } - - /** - * Gets details of a single Instance. - * - * The async variant is {@see NotebookServiceClient::getInstanceAsync()} . - * - * @example samples/V2/NotebookServiceClient/get_instance.php - * - * @param GetInstanceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Instance - * - * @throws ApiException Thrown if the API call fails. - */ - public function getInstance(GetInstanceRequest $request, array $callOptions = []): Instance - { - return $this->startApiCall('GetInstance', $request, $callOptions)->wait(); - } - - /** - * Lists instances in a given project and location. - * - * The async variant is {@see NotebookServiceClient::listInstancesAsync()} . - * - * @example samples/V2/NotebookServiceClient/list_instances.php - * - * @param ListInstancesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listInstances(ListInstancesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListInstances', $request, $callOptions); - } - - /** - * Resets a notebook instance. - * - * The async variant is {@see NotebookServiceClient::resetInstanceAsync()} . - * - * @example samples/V2/NotebookServiceClient/reset_instance.php - * - * @param ResetInstanceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function resetInstance(ResetInstanceRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('ResetInstance', $request, $callOptions)->wait(); - } - - /** - * Rollbacks a notebook instance to the previous version. - * - * The async variant is {@see NotebookServiceClient::rollbackInstanceAsync()} . - * - * @example samples/V2/NotebookServiceClient/rollback_instance.php - * - * @param RollbackInstanceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function rollbackInstance(RollbackInstanceRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('RollbackInstance', $request, $callOptions)->wait(); - } - - /** - * Starts a notebook instance. - * - * The async variant is {@see NotebookServiceClient::startInstanceAsync()} . - * - * @example samples/V2/NotebookServiceClient/start_instance.php - * - * @param StartInstanceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function startInstance(StartInstanceRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('StartInstance', $request, $callOptions)->wait(); - } - - /** - * Stops a notebook instance. - * - * The async variant is {@see NotebookServiceClient::stopInstanceAsync()} . - * - * @example samples/V2/NotebookServiceClient/stop_instance.php - * - * @param StopInstanceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function stopInstance(StopInstanceRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('StopInstance', $request, $callOptions)->wait(); - } - - /** - * UpdateInstance updates an Instance. - * - * The async variant is {@see NotebookServiceClient::updateInstanceAsync()} . - * - * @example samples/V2/NotebookServiceClient/update_instance.php - * - * @param UpdateInstanceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateInstance(UpdateInstanceRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateInstance', $request, $callOptions)->wait(); - } - - /** - * Upgrades a notebook instance to the latest version. - * - * The async variant is {@see NotebookServiceClient::upgradeInstanceAsync()} . - * - * @example samples/V2/NotebookServiceClient/upgrade_instance.php - * - * @param UpgradeInstanceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function upgradeInstance(UpgradeInstanceRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpgradeInstance', $request, $callOptions)->wait(); - } - - /** - * Gets information about a location. - * - * The async variant is {@see NotebookServiceClient::getLocationAsync()} . - * - * @example samples/V2/NotebookServiceClient/get_location.php - * - * @param GetLocationRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Location - * - * @throws ApiException Thrown if the API call fails. - */ - public function getLocation(GetLocationRequest $request, array $callOptions = []): Location - { - return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * The async variant is {@see NotebookServiceClient::listLocationsAsync()} . - * - * @example samples/V2/NotebookServiceClient/list_locations.php - * - * @param ListLocationsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListLocations', $request, $callOptions); - } - - /** - * Gets the access control policy for a resource. Returns an empty policy - if the resource exists and does not have a policy set. - * - * The async variant is {@see NotebookServiceClient::getIamPolicyAsync()} . - * - * @example samples/V2/NotebookServiceClient/get_iam_policy.php - * - * @param GetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * Sets the access control policy on the specified resource. Replaces - any existing policy. - - Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` - errors. - * - * The async variant is {@see NotebookServiceClient::setIamPolicyAsync()} . - * - * @example samples/V2/NotebookServiceClient/set_iam_policy.php - * - * @param SetIamPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * Returns permissions that a caller has on the specified resource. If the - resource does not exist, this will return an empty set of - permissions, not a `NOT_FOUND` error. - - Note: This operation is designed to be used for building - permission-aware UIs and command-line tools, not for authorization - checking. This operation may "fail open" without warning. - * - * The async variant is {@see NotebookServiceClient::testIamPermissionsAsync()} . - * - * @example samples/V2/NotebookServiceClient/test_iam_permissions.php - * - * @param TestIamPermissionsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return TestIamPermissionsResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse - { - return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/Notebooks/v2/src/V2/gapic_metadata.json b/owl-bot-staging/Notebooks/v2/src/V2/gapic_metadata.json deleted file mode 100644 index 317ec3e3b9e9..000000000000 --- a/owl-bot-staging/Notebooks/v2/src/V2/gapic_metadata.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.notebooks.v2", - "libraryPackage": "Google\\Cloud\\Notebooks\\V2", - "services": { - "NotebookService": { - "clients": { - "grpc": { - "libraryClient": "NotebookServiceGapicClient", - "rpcs": { - "CheckInstanceUpgradability": { - "methods": [ - "checkInstanceUpgradability" - ] - }, - "CreateInstance": { - "methods": [ - "createInstance" - ] - }, - "DeleteInstance": { - "methods": [ - "deleteInstance" - ] - }, - "DiagnoseInstance": { - "methods": [ - "diagnoseInstance" - ] - }, - "GetInstance": { - "methods": [ - "getInstance" - ] - }, - "ListInstances": { - "methods": [ - "listInstances" - ] - }, - "ResetInstance": { - "methods": [ - "resetInstance" - ] - }, - "RollbackInstance": { - "methods": [ - "rollbackInstance" - ] - }, - "StartInstance": { - "methods": [ - "startInstance" - ] - }, - "StopInstance": { - "methods": [ - "stopInstance" - ] - }, - "UpdateInstance": { - "methods": [ - "updateInstance" - ] - }, - "UpgradeInstance": { - "methods": [ - "upgradeInstance" - ] - }, - "GetLocation": { - "methods": [ - "getLocation" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - }, - "GetIamPolicy": { - "methods": [ - "getIamPolicy" - ] - }, - "SetIamPolicy": { - "methods": [ - "setIamPolicy" - ] - }, - "TestIamPermissions": { - "methods": [ - "testIamPermissions" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/Notebooks/v2/src/V2/resources/notebook_service_client_config.json b/owl-bot-staging/Notebooks/v2/src/V2/resources/notebook_service_client_config.json deleted file mode 100644 index 48d5fad231d9..000000000000 --- a/owl-bot-staging/Notebooks/v2/src/V2/resources/notebook_service_client_config.json +++ /dev/null @@ -1,129 +0,0 @@ -{ - "interfaces": { - "google.cloud.notebooks.v2.NotebookService": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE" - ], - "no_retry_1_codes": [] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "retry_policy_1_params": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - }, - "no_retry_1_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": { - "CheckInstanceUpgradability": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "CreateInstance": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteInstance": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DiagnoseInstance": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetInstance": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListInstances": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ResetInstance": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "RollbackInstance": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "StartInstance": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "StopInstance": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateInstance": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpgradeInstance": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetLocation": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListLocations": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "SetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "TestIamPermissions": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/Notebooks/v2/src/V2/resources/notebook_service_descriptor_config.php b/owl-bot-staging/Notebooks/v2/src/V2/resources/notebook_service_descriptor_config.php deleted file mode 100644 index 185207fc5d5a..000000000000 --- a/owl-bot-staging/Notebooks/v2/src/V2/resources/notebook_service_descriptor_config.php +++ /dev/null @@ -1,321 +0,0 @@ - [ - 'google.cloud.notebooks.v2.NotebookService' => [ - 'CreateInstance' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Notebooks\V2\Instance', - 'metadataReturnType' => '\Google\Cloud\Notebooks\V2\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteInstance' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\Notebooks\V2\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DiagnoseInstance' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Notebooks\V2\Instance', - 'metadataReturnType' => '\Google\Cloud\Notebooks\V2\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ResetInstance' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Notebooks\V2\Instance', - 'metadataReturnType' => '\Google\Cloud\Notebooks\V2\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'RollbackInstance' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Notebooks\V2\Instance', - 'metadataReturnType' => '\Google\Cloud\Notebooks\V2\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'StartInstance' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Notebooks\V2\Instance', - 'metadataReturnType' => '\Google\Cloud\Notebooks\V2\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'StopInstance' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Notebooks\V2\Instance', - 'metadataReturnType' => '\Google\Cloud\Notebooks\V2\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateInstance' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Notebooks\V2\Instance', - 'metadataReturnType' => '\Google\Cloud\Notebooks\V2\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'instance.name', - 'fieldAccessors' => [ - 'getInstance', - 'getName', - ], - ], - ], - ], - 'UpgradeInstance' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Notebooks\V2\Instance', - 'metadataReturnType' => '\Google\Cloud\Notebooks\V2\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'CheckInstanceUpgradability' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Notebooks\V2\CheckInstanceUpgradabilityResponse', - 'headerParams' => [ - [ - 'keyName' => 'notebook_instance', - 'fieldAccessors' => [ - 'getNotebookInstance', - ], - ], - ], - ], - 'GetInstance' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Notebooks\V2\Instance', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListInstances' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getInstances', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Notebooks\V2\ListInstancesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'GetLocation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Location\Location', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'ListLocations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLocations', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'GetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'SetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'TestIamPermissions' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - 'interfaceOverride' => 'google.iam.v1.IAMPolicy', - ], - 'templateMap' => [ - 'instance' => 'projects/{project}/locations/{location}/instances/{instance}', - 'location' => 'projects/{project}/locations/{location}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Notebooks/v2/src/V2/resources/notebook_service_rest_client_config.php b/owl-bot-staging/Notebooks/v2/src/V2/resources/notebook_service_rest_client_config.php deleted file mode 100644 index 36b52b12ea7a..000000000000 --- a/owl-bot-staging/Notebooks/v2/src/V2/resources/notebook_service_rest_client_config.php +++ /dev/null @@ -1,284 +0,0 @@ - [ - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.cloud.notebooks.v2.NotebookService' => [ - 'CheckInstanceUpgradability' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{notebook_instance=projects/*/locations/*/instances/*}:checkUpgradability', - 'placeholders' => [ - 'notebook_instance' => [ - 'getters' => [ - 'getNotebookInstance', - ], - ], - ], - ], - 'CreateInstance' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/instances', - 'body' => 'instance', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'instance_id', - ], - ], - 'DeleteInstance' => [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/instances/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DiagnoseInstance' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/instances/*}:diagnose', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetInstance' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/instances/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListInstances' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/instances', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ResetInstance' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/instances/*}:reset', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'RollbackInstance' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/instances/*}:rollback', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'StartInstance' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/instances/*}:start', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'StopInstance' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/instances/*}:stop', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'UpdateInstance' => [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{instance.name=projects/*/locations/*/instances/*}', - 'body' => 'instance', - 'placeholders' => [ - 'instance.name' => [ - 'getters' => [ - 'getInstance', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpgradeInstance' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/instances/*}:upgrade', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.iam.v1.IAMPolicy' => [ - 'GetIamPolicy' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{resource=projects/*/locations/*/instances/*}:getIamPolicy', - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{resource=projects/*/locations/*/instances/*}:setIamPolicy', - 'body' => '*', - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{resource=projects/*/locations/*/instances/*}:testIamPermissions', - 'body' => '*', - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}:cancel', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Notebooks/v2/tests/Unit/V2/Client/NotebookServiceClientTest.php b/owl-bot-staging/Notebooks/v2/tests/Unit/V2/Client/NotebookServiceClientTest.php deleted file mode 100644 index ca8f29ac3b5a..000000000000 --- a/owl-bot-staging/Notebooks/v2/tests/Unit/V2/Client/NotebookServiceClientTest.php +++ /dev/null @@ -1,1879 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return NotebookServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new NotebookServiceClient($options); - } - - /** @test */ - public function checkInstanceUpgradabilityTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $upgradeable = true; - $upgradeVersion = 'upgradeVersion1040155061'; - $upgradeInfo = 'upgradeInfo-1337232143'; - $upgradeImage = 'upgradeImage1495441784'; - $expectedResponse = new CheckInstanceUpgradabilityResponse(); - $expectedResponse->setUpgradeable($upgradeable); - $expectedResponse->setUpgradeVersion($upgradeVersion); - $expectedResponse->setUpgradeInfo($upgradeInfo); - $expectedResponse->setUpgradeImage($upgradeImage); - $transport->addResponse($expectedResponse); - // Mock request - $notebookInstance = 'notebookInstance-1078982023'; - $request = (new CheckInstanceUpgradabilityRequest()) - ->setNotebookInstance($notebookInstance); - $response = $gapicClient->checkInstanceUpgradability($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.notebooks.v2.NotebookService/CheckInstanceUpgradability', $actualFuncCall); - $actualValue = $actualRequestObject->getNotebookInstance(); - $this->assertProtobufEquals($notebookInstance, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function checkInstanceUpgradabilityExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $notebookInstance = 'notebookInstance-1078982023'; - $request = (new CheckInstanceUpgradabilityRequest()) - ->setNotebookInstance($notebookInstance); - try { - $gapicClient->checkInstanceUpgradability($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createInstanceTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createInstanceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $proxyUri = 'proxyUri-475670501'; - $creator = 'creator1028554796'; - $id = 'id3355'; - $disableProxyAccess = true; - $expectedResponse = new Instance(); - $expectedResponse->setName($name); - $expectedResponse->setProxyUri($proxyUri); - $expectedResponse->setCreator($creator); - $expectedResponse->setId($id); - $expectedResponse->setDisableProxyAccess($disableProxyAccess); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createInstanceTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $instanceId = 'instanceId-2101995259'; - $instance = new Instance(); - $request = (new CreateInstanceRequest()) - ->setParent($formattedParent) - ->setInstanceId($instanceId) - ->setInstance($instance); - $response = $gapicClient->createInstance($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.notebooks.v2.NotebookService/CreateInstance', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getInstanceId(); - $this->assertProtobufEquals($instanceId, $actualValue); - $actualValue = $actualApiRequestObject->getInstance(); - $this->assertProtobufEquals($instance, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createInstanceTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createInstanceExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createInstanceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $instanceId = 'instanceId-2101995259'; - $instance = new Instance(); - $request = (new CreateInstanceRequest()) - ->setParent($formattedParent) - ->setInstanceId($instanceId) - ->setInstance($instance); - $response = $gapicClient->createInstance($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createInstanceTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteInstanceTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteInstanceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteInstanceTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $request = (new DeleteInstanceRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteInstance($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.notebooks.v2.NotebookService/DeleteInstance', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteInstanceTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteInstanceExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteInstanceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $request = (new DeleteInstanceRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteInstance($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteInstanceTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function diagnoseInstanceTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/diagnoseInstanceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $proxyUri = 'proxyUri-475670501'; - $creator = 'creator1028554796'; - $id = 'id3355'; - $disableProxyAccess = true; - $expectedResponse = new Instance(); - $expectedResponse->setName($name2); - $expectedResponse->setProxyUri($proxyUri); - $expectedResponse->setCreator($creator); - $expectedResponse->setId($id); - $expectedResponse->setDisableProxyAccess($disableProxyAccess); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/diagnoseInstanceTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $diagnosticConfig = new DiagnosticConfig(); - $diagnosticConfigGcsBucket = 'diagnosticConfigGcsBucket-1116063720'; - $diagnosticConfig->setGcsBucket($diagnosticConfigGcsBucket); - $request = (new DiagnoseInstanceRequest()) - ->setName($formattedName) - ->setDiagnosticConfig($diagnosticConfig); - $response = $gapicClient->diagnoseInstance($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.notebooks.v2.NotebookService/DiagnoseInstance', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualApiRequestObject->getDiagnosticConfig(); - $this->assertProtobufEquals($diagnosticConfig, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/diagnoseInstanceTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function diagnoseInstanceExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/diagnoseInstanceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $diagnosticConfig = new DiagnosticConfig(); - $diagnosticConfigGcsBucket = 'diagnosticConfigGcsBucket-1116063720'; - $diagnosticConfig->setGcsBucket($diagnosticConfigGcsBucket); - $request = (new DiagnoseInstanceRequest()) - ->setName($formattedName) - ->setDiagnosticConfig($diagnosticConfig); - $response = $gapicClient->diagnoseInstance($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/diagnoseInstanceTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getInstanceTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $proxyUri = 'proxyUri-475670501'; - $creator = 'creator1028554796'; - $id = 'id3355'; - $disableProxyAccess = true; - $expectedResponse = new Instance(); - $expectedResponse->setName($name2); - $expectedResponse->setProxyUri($proxyUri); - $expectedResponse->setCreator($creator); - $expectedResponse->setId($id); - $expectedResponse->setDisableProxyAccess($disableProxyAccess); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $request = (new GetInstanceRequest()) - ->setName($formattedName); - $response = $gapicClient->getInstance($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.notebooks.v2.NotebookService/GetInstance', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getInstanceExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $request = (new GetInstanceRequest()) - ->setName($formattedName); - try { - $gapicClient->getInstance($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listInstancesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $instancesElement = new Instance(); - $instances = [ - $instancesElement, - ]; - $expectedResponse = new ListInstancesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setInstances($instances); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListInstancesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listInstances($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getInstances()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.notebooks.v2.NotebookService/ListInstances', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listInstancesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListInstancesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listInstances($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function resetInstanceTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/resetInstanceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $proxyUri = 'proxyUri-475670501'; - $creator = 'creator1028554796'; - $id = 'id3355'; - $disableProxyAccess = true; - $expectedResponse = new Instance(); - $expectedResponse->setName($name2); - $expectedResponse->setProxyUri($proxyUri); - $expectedResponse->setCreator($creator); - $expectedResponse->setId($id); - $expectedResponse->setDisableProxyAccess($disableProxyAccess); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/resetInstanceTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $name = 'name3373707'; - $request = (new ResetInstanceRequest()) - ->setName($name); - $response = $gapicClient->resetInstance($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.notebooks.v2.NotebookService/ResetInstance', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/resetInstanceTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function resetInstanceExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/resetInstanceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $name = 'name3373707'; - $request = (new ResetInstanceRequest()) - ->setName($name); - $response = $gapicClient->resetInstance($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/resetInstanceTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function rollbackInstanceTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/rollbackInstanceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $proxyUri = 'proxyUri-475670501'; - $creator = 'creator1028554796'; - $id = 'id3355'; - $disableProxyAccess = true; - $expectedResponse = new Instance(); - $expectedResponse->setName($name2); - $expectedResponse->setProxyUri($proxyUri); - $expectedResponse->setCreator($creator); - $expectedResponse->setId($id); - $expectedResponse->setDisableProxyAccess($disableProxyAccess); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/rollbackInstanceTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $targetSnapshot = 'targetSnapshot556386482'; - $revisionId = 'revisionId513861631'; - $request = (new RollbackInstanceRequest()) - ->setName($formattedName) - ->setTargetSnapshot($targetSnapshot) - ->setRevisionId($revisionId); - $response = $gapicClient->rollbackInstance($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.notebooks.v2.NotebookService/RollbackInstance', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualApiRequestObject->getTargetSnapshot(); - $this->assertProtobufEquals($targetSnapshot, $actualValue); - $actualValue = $actualApiRequestObject->getRevisionId(); - $this->assertProtobufEquals($revisionId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/rollbackInstanceTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function rollbackInstanceExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/rollbackInstanceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $targetSnapshot = 'targetSnapshot556386482'; - $revisionId = 'revisionId513861631'; - $request = (new RollbackInstanceRequest()) - ->setName($formattedName) - ->setTargetSnapshot($targetSnapshot) - ->setRevisionId($revisionId); - $response = $gapicClient->rollbackInstance($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/rollbackInstanceTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function startInstanceTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/startInstanceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $proxyUri = 'proxyUri-475670501'; - $creator = 'creator1028554796'; - $id = 'id3355'; - $disableProxyAccess = true; - $expectedResponse = new Instance(); - $expectedResponse->setName($name2); - $expectedResponse->setProxyUri($proxyUri); - $expectedResponse->setCreator($creator); - $expectedResponse->setId($id); - $expectedResponse->setDisableProxyAccess($disableProxyAccess); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/startInstanceTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $name = 'name3373707'; - $request = (new StartInstanceRequest()) - ->setName($name); - $response = $gapicClient->startInstance($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.notebooks.v2.NotebookService/StartInstance', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/startInstanceTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function startInstanceExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/startInstanceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $name = 'name3373707'; - $request = (new StartInstanceRequest()) - ->setName($name); - $response = $gapicClient->startInstance($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/startInstanceTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function stopInstanceTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/stopInstanceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $proxyUri = 'proxyUri-475670501'; - $creator = 'creator1028554796'; - $id = 'id3355'; - $disableProxyAccess = true; - $expectedResponse = new Instance(); - $expectedResponse->setName($name2); - $expectedResponse->setProxyUri($proxyUri); - $expectedResponse->setCreator($creator); - $expectedResponse->setId($id); - $expectedResponse->setDisableProxyAccess($disableProxyAccess); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/stopInstanceTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $name = 'name3373707'; - $request = (new StopInstanceRequest()) - ->setName($name); - $response = $gapicClient->stopInstance($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.notebooks.v2.NotebookService/StopInstance', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/stopInstanceTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function stopInstanceExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/stopInstanceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $name = 'name3373707'; - $request = (new StopInstanceRequest()) - ->setName($name); - $response = $gapicClient->stopInstance($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/stopInstanceTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateInstanceTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateInstanceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $proxyUri = 'proxyUri-475670501'; - $creator = 'creator1028554796'; - $id = 'id3355'; - $disableProxyAccess = true; - $expectedResponse = new Instance(); - $expectedResponse->setName($name); - $expectedResponse->setProxyUri($proxyUri); - $expectedResponse->setCreator($creator); - $expectedResponse->setId($id); - $expectedResponse->setDisableProxyAccess($disableProxyAccess); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateInstanceTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $instance = new Instance(); - $updateMask = new FieldMask(); - $request = (new UpdateInstanceRequest()) - ->setInstance($instance) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateInstance($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.notebooks.v2.NotebookService/UpdateInstance', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getInstance(); - $this->assertProtobufEquals($instance, $actualValue); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateInstanceTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateInstanceExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateInstanceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $instance = new Instance(); - $updateMask = new FieldMask(); - $request = (new UpdateInstanceRequest()) - ->setInstance($instance) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateInstance($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateInstanceTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function upgradeInstanceTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/upgradeInstanceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $proxyUri = 'proxyUri-475670501'; - $creator = 'creator1028554796'; - $id = 'id3355'; - $disableProxyAccess = true; - $expectedResponse = new Instance(); - $expectedResponse->setName($name2); - $expectedResponse->setProxyUri($proxyUri); - $expectedResponse->setCreator($creator); - $expectedResponse->setId($id); - $expectedResponse->setDisableProxyAccess($disableProxyAccess); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/upgradeInstanceTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $name = 'name3373707'; - $request = (new UpgradeInstanceRequest()) - ->setName($name); - $response = $gapicClient->upgradeInstance($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.notebooks.v2.NotebookService/UpgradeInstance', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/upgradeInstanceTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function upgradeInstanceExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/upgradeInstanceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $name = 'name3373707'; - $request = (new UpgradeInstanceRequest()) - ->setName($name); - $response = $gapicClient->upgradeInstance($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/upgradeInstanceTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getLocationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $locationId = 'locationId552319461'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Location(); - $expectedResponse->setName($name2); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - $request = new GetLocationRequest(); - $response = $gapicClient->getLocation($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new GetLocationRequest(); - try { - $gapicClient->getLocation($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $locationsElement = new Location(); - $locations = [ - $locationsElement, - ]; - $expectedResponse = new ListLocationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLocations($locations); - $transport->addResponse($expectedResponse); - $request = new ListLocationsRequest(); - $response = $gapicClient->listLocations($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new ListLocationsRequest(); - try { - $gapicClient->listLocations($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); - $response = $gapicClient->getIamPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); - try { - $gapicClient->getIamPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); - $response = $gapicClient->setIamPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPolicy(); - $this->assertProtobufEquals($policy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); - try { - $gapicClient->setIamPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new TestIamPermissionsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); - $response = $gapicClient->testIamPermissions($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPermissions(); - $this->assertProtobufEquals($permissions, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); - try { - $gapicClient->testIamPermissions($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function checkInstanceUpgradabilityAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $upgradeable = true; - $upgradeVersion = 'upgradeVersion1040155061'; - $upgradeInfo = 'upgradeInfo-1337232143'; - $upgradeImage = 'upgradeImage1495441784'; - $expectedResponse = new CheckInstanceUpgradabilityResponse(); - $expectedResponse->setUpgradeable($upgradeable); - $expectedResponse->setUpgradeVersion($upgradeVersion); - $expectedResponse->setUpgradeInfo($upgradeInfo); - $expectedResponse->setUpgradeImage($upgradeImage); - $transport->addResponse($expectedResponse); - // Mock request - $notebookInstance = 'notebookInstance-1078982023'; - $request = (new CheckInstanceUpgradabilityRequest()) - ->setNotebookInstance($notebookInstance); - $response = $gapicClient->checkInstanceUpgradabilityAsync($request)->wait(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.notebooks.v2.NotebookService/CheckInstanceUpgradability', $actualFuncCall); - $actualValue = $actualRequestObject->getNotebookInstance(); - $this->assertProtobufEquals($notebookInstance, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Optimization/v1/proto/src/GPBMetadata/Google/Cloud/Optimization/V1/AsyncModel.php b/owl-bot-staging/Optimization/v1/proto/src/GPBMetadata/Google/Cloud/Optimization/V1/AsyncModel.php deleted file mode 100644 index 2746ec6deb03bfaa8fa3002b7b2e6bb93a221158..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1677 zcmbtU+iuf95N(p)GNBhNA*upm36+|n;;2R9AthAKl^~i#O~M1R6m6VMx{~9y>~*CU z^)vVcp7<%A_zrg0v6IrM2$3h-nRDjM%$a$2>R!0;64i-AJj}@u4XzNsAjtI?XBM;3 zAQ+8^hb%U6sZBf`p-KxiTU}JGG`cSY)MtTbkpdbsHnvILvRN?9Gndl|y~dm}Cx3aA z$NrUL^(SmdY+X?UICw&Q7h43?+odzY@ep%t))k9cmMms#j>Y_ZbOK=6*!Phk+0G;x zd<7(aZZNQ^g?ug&T4;~@edn;IhZE1iwpk&*3YE z0y3W+A&>CDb54|QNpKTCnG2d`xYVpsVh>B?0$)<*6$-PeW+aQCabaC5ro!>WU5r%? zdHtSF%QuF@xZ0YqM=sVU)$YTuHPHXf7uwS>UROTS=Y6DK9_>D#vMCRVLF9$aLcO7_ zvfmPrX*h1c%ghhQ)j;?;6W?kGi7zylFEicK6TWhOywQk&o0yn(?yv7m$)G+ zobhF!K{~Eq+lEx&QKc(gO8qpF*(_|{7O)`ZM-sHzibkugRbfS%pD4P`D?$t{5L?h2P=_+ zhn=p`t@eA(PPw_L7!?wew!H*=W|c6WRu(JH2wbTCIrxlJd1|G|SabpTuiQ z16ZvY4f(wM>J(sR80`r>t{7dTUu&J88QniJti$rhPOB;C1wp5KE>k5-;#`UA996n- zZ%SLUcB)lxC%#m|$Y|ZzBtK@i?>2U+INkFr=nhV9zYbPaXW#6{i+>oNvAL@!r$wy= O7f(focj*Rh0Dc2hSQUc+ diff --git a/owl-bot-staging/Optimization/v1/proto/src/GPBMetadata/Google/Cloud/Optimization/V1/FleetRouting.php b/owl-bot-staging/Optimization/v1/proto/src/GPBMetadata/Google/Cloud/Optimization/V1/FleetRouting.php deleted file mode 100644 index 1efcb19516f8b5cf90b2b65ef71c6b3f917e3c0a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 18781 zcmeHPNo*r$b~d&1QETedVlBtd2n404+U2nGQHWVsD;&n1@}0!)wqnOt%l1anA`OD;Jk$oKxGSVd7qsy)sr zeQB}kfA9bQ_rLwUzdrhQ^QcL8lb_mkyJfZQYI6TH**>z9%~qq`s5ENH{m#LG-AYy( z$4#eZx6;XEZZo;DSx)A2h4LMMx{Xe&Vy`3*8;!%7y;!L=I@QHSv+W!^-?!RMqrP~u zw0Kan?Y7x!blOh+FfEW1)vaUOZCVvO`RP`6-ELb|t8MLlD)8*BGM>FnAD+G4r4NZJ zHOqCAYm9GOqN5*B691Z={hCurx@}BaNxtH^rc-y?j#YEMk8ORNJg{o64FqS$9(3vz zUTBg5HtQAp{)42%$zxw>Hb91tlX_uWOc_vRuTXE>t-4j)%h_(Ft+OBd4KKoAzP;D>}Bfp z22-I?cUM-rd+MS%4{){S*!A|sVAdSFR?XT+)``<-4G-G)c=s~yX}z-EsM?_7unR9X z>W8gPy$;3#yD%4DY~$W}<~kB~_^Cb6vI9amab{n-5aJC>; zd<-aNmp=(d(Qg~+l0?I3jctm#w$-W}Nu(13>BldERA3P}OLW_*|CU{W1u+ktmfJS5 za47pmT_}CqjZY>=L8u|O&zjvfzDqYfq#n8ov|77mK`i1^f}-z-ue_j^1qz7uta|Xq zXLPk?AGB=u$gINpI5k%R)xO|K?Yu~Q9al*={j9YYt zcjHv;7ACf;CiZo3;8fx<@j5|9v(fB;Pi?c=sGZiFI_Nkp-rb{H-a9}6iJ*0N*o+wV z9;K~Xt?>-=whnFV(yB5R{NXkopcN}_bzo%qpd9yUd{)5SrmG#-HV}Phf^&-FX_j)oQfd z_&COlKZ@{}85$RKi7((;6w-Cuzqb>+X1Z;=>7&7AUPN{z9!Wi+7!H;tM6lrk&E)cH znVn+UENvEd^Ybqmc(j`-7IK+#-rU?MKADdguTV0VFXvZz(0bl1Y^>!or9!rtH%pHS zTkH9aa%p}f^(9fM%iuTYS}C8|UVUV)Z|3sm&PHh~zgk!;;}I>mPn~8HLhUNWrhDy%(5B|yhGzmG}df3Cx~>@?P_(O9q~3Zpd_5Z8_!dnmHrEGqFC21L3XPGZORQThgnTEq78SXH zacQ&OrG>*JbF5}p!^ z?FZq=HB~qqD+ExS8c!$@oP%wo)3Vt?cjGf+?e7kco!$2L$H8x-4b+168qaPA^2lnAp7&bWl(`^N}f)qzY8qm*f^)p(|z zjRE>Txaj^E)7y<_#&x&}%C;%dvkry2izZfSlt;WlQO%%w@{r(bmL_1F;hhQ{9!dOD zgl2na7N?jDSe$y*el9ewQUh3wdgH=ju0dP0PK9GMg>_C#R~Kx@P{KS*XBO&Fzw&_z z^=K^9T;t%tMS!69piJxeTgcARw2G+2R9WayBllU!?gY_3?~XbjFw*0C}Ct2#>C%5XgVaZhT5v zdR!s;RmSTpw4huYAFPbr2g1HX)5lJ|dtlOPh8!4Y2ogVu(4{^bLpH!*Z1RXaCXm}0 zfYbO6#o2I)n5`GXpfrS_!wQ_)>{YrfVv8R8m-_8#n$mJ=Pyoan?`_Bg0*#s}OsP!babr>t|lEj0$K@e~cUN(tSx+ zv)%A?irKQko$QPt3jvdF){r`v*^P+QDWCNPv-U-Hp$9CA&4ebTzJt_(INQJ)*w0rJ zb8;dS1ER%%T@?9>Xg7@K6h+j4?sX39jg}2d$=Qxon$+hvDhyLP{QOoelm?vk>E|7* z-p2pJBK`R|O$T`FO`5k_EeCGDS!+~8hC%4?*zzTfp523V(P|g#hmav}_%rKN_^v{E z$Cd~9osZRMW08!ijg%mg@*tR=Qfh_1Q)c}D-lWWP!%sR*W5S(c9*i2F(6l(NXJ9V2 z!OVWK<@+H zFH!7-)rausWF+ZhD$a>T{Y)ftbT7h0Ce5FjJP=1BXWNYXCrh&pH)A97~wU`lC%j?<0)MZI^Cx-q0F{u zc6og`p6D}Ay2lS^havSN7}P$`IhR-1SlwLT%9IP)La|VO(l0@Ghi;){X>R4W*EYA; z^Eos7#4Kfyo!iYnDy$asNZGwgDIQYT2)r;$g>_^TGaLEMof49VBdLEIK_*Zo!+7z2 zul{wq%gzj({BFWbMkg>fTq|TPugRCBI1~v&MMM+bbdMx3+sdc`c2Vd!;*i8;MKimc zAD+0r^`(7(3!?r>gywplAw0gho&S8Nu$|{bXg^}!qU&LVOwsLLB4$AP!s=%`TPpu4 zPc2AjjLGGTh28x26FF)$)u35X2*6q$RGC^XsxdL^q~Rbf)u&Y@v)R?C!kwf8Z11C44@JNlW?`~?#CvCv+mM=^5 zIyd9tkQvM2aonT0Vhn9W&Ern3?KEq)aDY#dJR^9%RZ>fIF(aTyO~`ckTTFr zw4c!y&=aGqnl@D?tKXR?e`HJt;MDMwR=ecWuH#zh4Od7;ZvI6O*9 z*Y^sbW6J|V1x=@%DgulBp}5JZCKlTsoL65QXTe*hN|q@{`I+@z!|IXsJhR0OE0RxB~)eO@KTj6i%@w#ag2!ezSd&ArBf*WX#E_rucQS@V(c< zRget8Ij`gu=xzYe@7dqP?Jh!liadz5~d8UeV=2;8Nyx9x*ZN?XLS?fQ@ zfrx|Qrs;6-z3|=ih7$$us{puI;V$R2S=j~f%KX{az?=B{5sG@UXI!Bv4&ZqfVNXV7 zx|zeN#sTcRe#d5Q6gKjvCu|)wCYjcL12Li=DvVqNg|$n4XrjtJ14`qXfxH#M^O8g{ zO0;l>ASze&!blTKH04bIe;bJqNd~CZ@2+F$wXbmVT4&4x_>X^WG26dpI)Q_m^h3*_m-An;X+a*Ei8 zKx!6#4qYdoa~L=(wkMLh(?q5Rloh}9(9|EX)>Mv*bV9BXF(y?R;Uz0ebWF? znM0UsrM^DLlNL;i9M^0$=xE9$-Gv-YC`jbqty9$`cfNv5{Z53Y9_#Gp3Qc(tpHwLW z!nmT!fIfN&%^FkaTtGR~sY>$T85$b6zs+oL1OT^(`F4uaRC*SX9!YJ}ltu)Tj=hn@>b?1@8FFi7GZD6{Ksw{>QQ_kyT*Sc#jM{ zy2mVq+r)QhUc&{9Q#e$HCPaj&`(~HI*;FSa#l~cs9o?;*z*6c>_lOJ#W`cOS+R?a6 zH;ybe`^IgN0L#`A?jRLaoUSZZk(f)<&bx0GUW zc*kEy#;7p*lYXjPg&uC`F6zN^*!f=*GnU)N$ zQwYSevhgCEU89AwcmoNTwO|5f$X*O1Bk z(L|NTrKt~|u#}Fl6TXNkNc=-Y=aJYZ2HGeF%HcJd^Mbky3gB5Tlmhs5xKNn2B~*X; z%81V`37m1CcKZJrqq*L@9T?^}gm)Mjxv$$pMYn`mX%PKn$IuUs{OzDl?C7~}wKH0+|n zr8<*D>?#BQ6f*r|0_kOBhtA#*nkCxU^mQBDrI&O0^~^@j%zv?(&*w_|ow=IX%B-S| zVSWVNVoR%;4emv#HE!E(kr2eBt6S(766&J}zwJHXoPfCyZ-!N$-MpiK|kZk8z=DQe1%2WDguo z>R-lb;p`O}STQurBXM}lDH`pd$*VIgn&bU!=OEY5IAfF8cMJ1(|Bq}XET8nZJj?e@ z7|ZiL2iXd?CG(Ne)JW%Uz$MZ%=ayc#p8E{fdhim_O1Na7#n#nhBJc=a=i>e`d7bNs zW`gqul-{q?uwCq`(w|OHBILH}*Sg@>_a>k0$i3iAzGLnY(2d%nb@jREy431@K;PH- z8-z~QXt&{SO00<=kJ06RFN|Y^pi-&oiAp-Fn0^3LRmCxmCVdqIlpa|A8qGLk2Z@r)VP)@-Demq zUJ31Gc{W(RFeA7TeOW4=H5eG6i5u{^yz_7w+WAa_n&|Dlac+@5`SOj2l68g zALCvt-@JDhA1>+&1OEPMr6Io~Bfssi5_$OL!_>Y0aA(IFe>g(M*=vo)fSBhjgx>Bg ztrUD;yGVPVE=m1m7#bL>8>m;K7018=jEc+X&=cC2EB>OQJej@ zEIw}oI8C9xz3kZqKM!v4_jtAad@aO)7xEcNS hYu?vY-jJW<@qNJu=_fRI^!a*^7%9K9^A&wX^uH*A;#&X! diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/AggregatedMetrics.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/AggregatedMetrics.php deleted file mode 100644 index 22976ce6c208..000000000000 --- a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/AggregatedMetrics.php +++ /dev/null @@ -1,554 +0,0 @@ -google.cloud.optimization.v1.AggregatedMetrics - */ -class AggregatedMetrics extends \Google\Protobuf\Internal\Message -{ - /** - * Number of shipments performed. Note that a pickup and delivery pair only - * counts once. - * - * Generated from protobuf field int32 performed_shipment_count = 1; - */ - protected $performed_shipment_count = 0; - /** - * Total travel duration for a route or a solution. - * - * Generated from protobuf field .google.protobuf.Duration travel_duration = 2; - */ - protected $travel_duration = null; - /** - * Total wait duration for a route or a solution. - * - * Generated from protobuf field .google.protobuf.Duration wait_duration = 3; - */ - protected $wait_duration = null; - /** - * Total delay duration for a route or a solution. - * - * Generated from protobuf field .google.protobuf.Duration delay_duration = 4; - */ - protected $delay_duration = null; - /** - * Total break duration for a route or a solution. - * - * Generated from protobuf field .google.protobuf.Duration break_duration = 5; - */ - protected $break_duration = null; - /** - * Total visit duration for a route or a solution. - * - * Generated from protobuf field .google.protobuf.Duration visit_duration = 6; - */ - protected $visit_duration = null; - /** - * The total duration should be equal to the sum of all durations above. - * For routes, it also corresponds to: - * [ShipmentRoute.vehicle_end_time][google.cloud.optimization.v1.ShipmentRoute.vehicle_end_time] - * `-` - * [ShipmentRoute.vehicle_start_time][google.cloud.optimization.v1.ShipmentRoute.vehicle_start_time] - * - * Generated from protobuf field .google.protobuf.Duration total_duration = 7; - */ - protected $total_duration = null; - /** - * Total travel distance for a route or a solution. - * - * Generated from protobuf field double travel_distance_meters = 8; - */ - protected $travel_distance_meters = 0.0; - /** - * Maximum load achieved over the entire route (resp. solution), for each of - * the quantities on this route (resp. solution), computed as the maximum over - * all - * [Transition.vehicle_loads][google.cloud.optimization.v1.ShipmentRoute.Transition.vehicle_loads] - * (resp. - * [ShipmentRoute.metrics.max_loads][google.cloud.optimization.v1.AggregatedMetrics.max_loads]. - * - * Generated from protobuf field map max_loads = 9; - */ - private $max_loads; - /** - * Deprecated: Use - * [ShipmentRoute.route_costs][google.cloud.optimization.v1.ShipmentRoute.route_costs] - * and - * [OptimizeToursResponse.Metrics.costs][google.cloud.optimization.v1.OptimizeToursResponse.Metrics.costs] - * instead. - * - * Generated from protobuf field map costs = 10 [deprecated = true]; - * @deprecated - */ - private $costs; - /** - * Deprecated: Use - * [ShipmentRoute.route_total_cost][google.cloud.optimization.v1.ShipmentRoute.route_total_cost] - * and - * [OptimizeToursResponse.Metrics.total_cost][google.cloud.optimization.v1.OptimizeToursResponse.Metrics.total_cost] - * instead. - * - * Generated from protobuf field double total_cost = 11 [deprecated = true]; - * @deprecated - */ - protected $total_cost = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $performed_shipment_count - * Number of shipments performed. Note that a pickup and delivery pair only - * counts once. - * @type \Google\Protobuf\Duration $travel_duration - * Total travel duration for a route or a solution. - * @type \Google\Protobuf\Duration $wait_duration - * Total wait duration for a route or a solution. - * @type \Google\Protobuf\Duration $delay_duration - * Total delay duration for a route or a solution. - * @type \Google\Protobuf\Duration $break_duration - * Total break duration for a route or a solution. - * @type \Google\Protobuf\Duration $visit_duration - * Total visit duration for a route or a solution. - * @type \Google\Protobuf\Duration $total_duration - * The total duration should be equal to the sum of all durations above. - * For routes, it also corresponds to: - * [ShipmentRoute.vehicle_end_time][google.cloud.optimization.v1.ShipmentRoute.vehicle_end_time] - * `-` - * [ShipmentRoute.vehicle_start_time][google.cloud.optimization.v1.ShipmentRoute.vehicle_start_time] - * @type float $travel_distance_meters - * Total travel distance for a route or a solution. - * @type array|\Google\Protobuf\Internal\MapField $max_loads - * Maximum load achieved over the entire route (resp. solution), for each of - * the quantities on this route (resp. solution), computed as the maximum over - * all - * [Transition.vehicle_loads][google.cloud.optimization.v1.ShipmentRoute.Transition.vehicle_loads] - * (resp. - * [ShipmentRoute.metrics.max_loads][google.cloud.optimization.v1.AggregatedMetrics.max_loads]. - * @type array|\Google\Protobuf\Internal\MapField $costs - * Deprecated: Use - * [ShipmentRoute.route_costs][google.cloud.optimization.v1.ShipmentRoute.route_costs] - * and - * [OptimizeToursResponse.Metrics.costs][google.cloud.optimization.v1.OptimizeToursResponse.Metrics.costs] - * instead. - * @type float $total_cost - * Deprecated: Use - * [ShipmentRoute.route_total_cost][google.cloud.optimization.v1.ShipmentRoute.route_total_cost] - * and - * [OptimizeToursResponse.Metrics.total_cost][google.cloud.optimization.v1.OptimizeToursResponse.Metrics.total_cost] - * instead. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); - parent::__construct($data); - } - - /** - * Number of shipments performed. Note that a pickup and delivery pair only - * counts once. - * - * Generated from protobuf field int32 performed_shipment_count = 1; - * @return int - */ - public function getPerformedShipmentCount() - { - return $this->performed_shipment_count; - } - - /** - * Number of shipments performed. Note that a pickup and delivery pair only - * counts once. - * - * Generated from protobuf field int32 performed_shipment_count = 1; - * @param int $var - * @return $this - */ - public function setPerformedShipmentCount($var) - { - GPBUtil::checkInt32($var); - $this->performed_shipment_count = $var; - - return $this; - } - - /** - * Total travel duration for a route or a solution. - * - * Generated from protobuf field .google.protobuf.Duration travel_duration = 2; - * @return \Google\Protobuf\Duration|null - */ - public function getTravelDuration() - { - return $this->travel_duration; - } - - public function hasTravelDuration() - { - return isset($this->travel_duration); - } - - public function clearTravelDuration() - { - unset($this->travel_duration); - } - - /** - * Total travel duration for a route or a solution. - * - * Generated from protobuf field .google.protobuf.Duration travel_duration = 2; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setTravelDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->travel_duration = $var; - - return $this; - } - - /** - * Total wait duration for a route or a solution. - * - * Generated from protobuf field .google.protobuf.Duration wait_duration = 3; - * @return \Google\Protobuf\Duration|null - */ - public function getWaitDuration() - { - return $this->wait_duration; - } - - public function hasWaitDuration() - { - return isset($this->wait_duration); - } - - public function clearWaitDuration() - { - unset($this->wait_duration); - } - - /** - * Total wait duration for a route or a solution. - * - * Generated from protobuf field .google.protobuf.Duration wait_duration = 3; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setWaitDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->wait_duration = $var; - - return $this; - } - - /** - * Total delay duration for a route or a solution. - * - * Generated from protobuf field .google.protobuf.Duration delay_duration = 4; - * @return \Google\Protobuf\Duration|null - */ - public function getDelayDuration() - { - return $this->delay_duration; - } - - public function hasDelayDuration() - { - return isset($this->delay_duration); - } - - public function clearDelayDuration() - { - unset($this->delay_duration); - } - - /** - * Total delay duration for a route or a solution. - * - * Generated from protobuf field .google.protobuf.Duration delay_duration = 4; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setDelayDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->delay_duration = $var; - - return $this; - } - - /** - * Total break duration for a route or a solution. - * - * Generated from protobuf field .google.protobuf.Duration break_duration = 5; - * @return \Google\Protobuf\Duration|null - */ - public function getBreakDuration() - { - return $this->break_duration; - } - - public function hasBreakDuration() - { - return isset($this->break_duration); - } - - public function clearBreakDuration() - { - unset($this->break_duration); - } - - /** - * Total break duration for a route or a solution. - * - * Generated from protobuf field .google.protobuf.Duration break_duration = 5; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setBreakDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->break_duration = $var; - - return $this; - } - - /** - * Total visit duration for a route or a solution. - * - * Generated from protobuf field .google.protobuf.Duration visit_duration = 6; - * @return \Google\Protobuf\Duration|null - */ - public function getVisitDuration() - { - return $this->visit_duration; - } - - public function hasVisitDuration() - { - return isset($this->visit_duration); - } - - public function clearVisitDuration() - { - unset($this->visit_duration); - } - - /** - * Total visit duration for a route or a solution. - * - * Generated from protobuf field .google.protobuf.Duration visit_duration = 6; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setVisitDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->visit_duration = $var; - - return $this; - } - - /** - * The total duration should be equal to the sum of all durations above. - * For routes, it also corresponds to: - * [ShipmentRoute.vehicle_end_time][google.cloud.optimization.v1.ShipmentRoute.vehicle_end_time] - * `-` - * [ShipmentRoute.vehicle_start_time][google.cloud.optimization.v1.ShipmentRoute.vehicle_start_time] - * - * Generated from protobuf field .google.protobuf.Duration total_duration = 7; - * @return \Google\Protobuf\Duration|null - */ - public function getTotalDuration() - { - return $this->total_duration; - } - - public function hasTotalDuration() - { - return isset($this->total_duration); - } - - public function clearTotalDuration() - { - unset($this->total_duration); - } - - /** - * The total duration should be equal to the sum of all durations above. - * For routes, it also corresponds to: - * [ShipmentRoute.vehicle_end_time][google.cloud.optimization.v1.ShipmentRoute.vehicle_end_time] - * `-` - * [ShipmentRoute.vehicle_start_time][google.cloud.optimization.v1.ShipmentRoute.vehicle_start_time] - * - * Generated from protobuf field .google.protobuf.Duration total_duration = 7; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setTotalDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->total_duration = $var; - - return $this; - } - - /** - * Total travel distance for a route or a solution. - * - * Generated from protobuf field double travel_distance_meters = 8; - * @return float - */ - public function getTravelDistanceMeters() - { - return $this->travel_distance_meters; - } - - /** - * Total travel distance for a route or a solution. - * - * Generated from protobuf field double travel_distance_meters = 8; - * @param float $var - * @return $this - */ - public function setTravelDistanceMeters($var) - { - GPBUtil::checkDouble($var); - $this->travel_distance_meters = $var; - - return $this; - } - - /** - * Maximum load achieved over the entire route (resp. solution), for each of - * the quantities on this route (resp. solution), computed as the maximum over - * all - * [Transition.vehicle_loads][google.cloud.optimization.v1.ShipmentRoute.Transition.vehicle_loads] - * (resp. - * [ShipmentRoute.metrics.max_loads][google.cloud.optimization.v1.AggregatedMetrics.max_loads]. - * - * Generated from protobuf field map max_loads = 9; - * @return \Google\Protobuf\Internal\MapField - */ - public function getMaxLoads() - { - return $this->max_loads; - } - - /** - * Maximum load achieved over the entire route (resp. solution), for each of - * the quantities on this route (resp. solution), computed as the maximum over - * all - * [Transition.vehicle_loads][google.cloud.optimization.v1.ShipmentRoute.Transition.vehicle_loads] - * (resp. - * [ShipmentRoute.metrics.max_loads][google.cloud.optimization.v1.AggregatedMetrics.max_loads]. - * - * Generated from protobuf field map max_loads = 9; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setMaxLoads($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\ShipmentRoute\VehicleLoad::class); - $this->max_loads = $arr; - - return $this; - } - - /** - * Deprecated: Use - * [ShipmentRoute.route_costs][google.cloud.optimization.v1.ShipmentRoute.route_costs] - * and - * [OptimizeToursResponse.Metrics.costs][google.cloud.optimization.v1.OptimizeToursResponse.Metrics.costs] - * instead. - * - * Generated from protobuf field map costs = 10 [deprecated = true]; - * @return \Google\Protobuf\Internal\MapField - * @deprecated - */ - public function getCosts() - { - @trigger_error('costs is deprecated.', E_USER_DEPRECATED); - return $this->costs; - } - - /** - * Deprecated: Use - * [ShipmentRoute.route_costs][google.cloud.optimization.v1.ShipmentRoute.route_costs] - * and - * [OptimizeToursResponse.Metrics.costs][google.cloud.optimization.v1.OptimizeToursResponse.Metrics.costs] - * instead. - * - * Generated from protobuf field map costs = 10 [deprecated = true]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - * @deprecated - */ - public function setCosts($var) - { - @trigger_error('costs is deprecated.', E_USER_DEPRECATED); - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::DOUBLE); - $this->costs = $arr; - - return $this; - } - - /** - * Deprecated: Use - * [ShipmentRoute.route_total_cost][google.cloud.optimization.v1.ShipmentRoute.route_total_cost] - * and - * [OptimizeToursResponse.Metrics.total_cost][google.cloud.optimization.v1.OptimizeToursResponse.Metrics.total_cost] - * instead. - * - * Generated from protobuf field double total_cost = 11 [deprecated = true]; - * @return float - * @deprecated - */ - public function getTotalCost() - { - @trigger_error('total_cost is deprecated.', E_USER_DEPRECATED); - return $this->total_cost; - } - - /** - * Deprecated: Use - * [ShipmentRoute.route_total_cost][google.cloud.optimization.v1.ShipmentRoute.route_total_cost] - * and - * [OptimizeToursResponse.Metrics.total_cost][google.cloud.optimization.v1.OptimizeToursResponse.Metrics.total_cost] - * instead. - * - * Generated from protobuf field double total_cost = 11 [deprecated = true]; - * @param float $var - * @return $this - * @deprecated - */ - public function setTotalCost($var) - { - @trigger_error('total_cost is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkDouble($var); - $this->total_cost = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/AsyncModelMetadata.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/AsyncModelMetadata.php deleted file mode 100644 index a2578dd38100..000000000000 --- a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/AsyncModelMetadata.php +++ /dev/null @@ -1,193 +0,0 @@ -google.cloud.optimization.v1.AsyncModelMetadata - */ -class AsyncModelMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The state of the current operation. - * - * Generated from protobuf field .google.cloud.optimization.v1.AsyncModelMetadata.State state = 1; - */ - protected $state = 0; - /** - * A message providing more details about the current state of the operation. - * For example, the error message if the operation is failed. - * - * Generated from protobuf field string state_message = 2; - */ - protected $state_message = ''; - /** - * The creation time of the operation. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; - */ - protected $create_time = null; - /** - * The last update time of the operation. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4; - */ - protected $update_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $state - * The state of the current operation. - * @type string $state_message - * A message providing more details about the current state of the operation. - * For example, the error message if the operation is failed. - * @type \Google\Protobuf\Timestamp $create_time - * The creation time of the operation. - * @type \Google\Protobuf\Timestamp $update_time - * The last update time of the operation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Optimization\V1\AsyncModel::initOnce(); - parent::__construct($data); - } - - /** - * The state of the current operation. - * - * Generated from protobuf field .google.cloud.optimization.v1.AsyncModelMetadata.State state = 1; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * The state of the current operation. - * - * Generated from protobuf field .google.cloud.optimization.v1.AsyncModelMetadata.State state = 1; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Optimization\V1\AsyncModelMetadata\State::class); - $this->state = $var; - - return $this; - } - - /** - * A message providing more details about the current state of the operation. - * For example, the error message if the operation is failed. - * - * Generated from protobuf field string state_message = 2; - * @return string - */ - public function getStateMessage() - { - return $this->state_message; - } - - /** - * A message providing more details about the current state of the operation. - * For example, the error message if the operation is failed. - * - * Generated from protobuf field string state_message = 2; - * @param string $var - * @return $this - */ - public function setStateMessage($var) - { - GPBUtil::checkString($var, True); - $this->state_message = $var; - - return $this; - } - - /** - * The creation time of the operation. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * The creation time of the operation. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * The last update time of the operation. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * The last update time of the operation. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/AsyncModelMetadata/State.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/AsyncModelMetadata/State.php deleted file mode 100644 index 72004fd5de80..000000000000 --- a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/AsyncModelMetadata/State.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.optimization.v1.AsyncModelMetadata.State - */ -class State -{ - /** - * The default value. This value is used if the state is omitted. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Request is being processed. - * - * Generated from protobuf enum RUNNING = 1; - */ - const RUNNING = 1; - /** - * The operation completed successfully. - * - * Generated from protobuf enum SUCCEEDED = 2; - */ - const SUCCEEDED = 2; - /** - * The operation was cancelled. - * - * Generated from protobuf enum CANCELLED = 3; - */ - const CANCELLED = 3; - /** - * The operation has failed. - * - * Generated from protobuf enum FAILED = 4; - */ - const FAILED = 4; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::RUNNING => 'RUNNING', - self::SUCCEEDED => 'SUCCEEDED', - self::CANCELLED => 'CANCELLED', - self::FAILED => 'FAILED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\Optimization\V1\AsyncModelMetadata_State::class); - diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/BatchOptimizeToursRequest.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/BatchOptimizeToursRequest.php deleted file mode 100644 index a1c21c85233e..000000000000 --- a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/BatchOptimizeToursRequest.php +++ /dev/null @@ -1,117 +0,0 @@ -google.cloud.optimization.v1.BatchOptimizeToursRequest - */ -class BatchOptimizeToursRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Target project and location to make a call. - * Format: `projects/{project-id}/locations/{location-id}`. - * If no location is specified, a region will be chosen automatically. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $parent = ''; - /** - * Required. Input/Output information each purchase model, such as file paths - * and data formats. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.BatchOptimizeToursRequest.AsyncModelConfig model_configs = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private $model_configs; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Target project and location to make a call. - * Format: `projects/{project-id}/locations/{location-id}`. - * If no location is specified, a region will be chosen automatically. - * @type array<\Google\Cloud\Optimization\V1\BatchOptimizeToursRequest\AsyncModelConfig>|\Google\Protobuf\Internal\RepeatedField $model_configs - * Required. Input/Output information each purchase model, such as file paths - * and data formats. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); - parent::__construct($data); - } - - /** - * Required. Target project and location to make a call. - * Format: `projects/{project-id}/locations/{location-id}`. - * If no location is specified, a region will be chosen automatically. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Target project and location to make a call. - * Format: `projects/{project-id}/locations/{location-id}`. - * If no location is specified, a region will be chosen automatically. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. Input/Output information each purchase model, such as file paths - * and data formats. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.BatchOptimizeToursRequest.AsyncModelConfig model_configs = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getModelConfigs() - { - return $this->model_configs; - } - - /** - * Required. Input/Output information each purchase model, such as file paths - * and data formats. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.BatchOptimizeToursRequest.AsyncModelConfig model_configs = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param array<\Google\Cloud\Optimization\V1\BatchOptimizeToursRequest\AsyncModelConfig>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setModelConfigs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\BatchOptimizeToursRequest\AsyncModelConfig::class); - $this->model_configs = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/BatchOptimizeToursRequest/AsyncModelConfig.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/BatchOptimizeToursRequest/AsyncModelConfig.php deleted file mode 100644 index b2479e9efec5..000000000000 --- a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/BatchOptimizeToursRequest/AsyncModelConfig.php +++ /dev/null @@ -1,224 +0,0 @@ -google.cloud.optimization.v1.BatchOptimizeToursRequest.AsyncModelConfig - */ -class AsyncModelConfig extends \Google\Protobuf\Internal\Message -{ - /** - * User defined model name, can be used as alias by users to keep track of - * models. - * - * Generated from protobuf field string display_name = 1; - */ - protected $display_name = ''; - /** - * Required. Information about the input model. - * - * Generated from protobuf field .google.cloud.optimization.v1.InputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $input_config = null; - /** - * Required. The desired output location information. - * - * Generated from protobuf field .google.cloud.optimization.v1.OutputConfig output_config = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $output_config = null; - /** - * If this is set, the model will be solved in the checkpoint mode. In this - * mode, the input model can have a deadline longer than 30 mins without the - * risk of interruption. The model will be solved in multiple short-running - * stages. Each stage generates an intermediate checkpoint - * and stores it in the user's Cloud Storage buckets. The checkpoint - * mode should be preferred over - * allow_large_deadline_despite_interruption_risk since it prevents the risk - * of interruption. - * - * Generated from protobuf field bool enable_checkpoints = 4; - */ - protected $enable_checkpoints = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $display_name - * User defined model name, can be used as alias by users to keep track of - * models. - * @type \Google\Cloud\Optimization\V1\InputConfig $input_config - * Required. Information about the input model. - * @type \Google\Cloud\Optimization\V1\OutputConfig $output_config - * Required. The desired output location information. - * @type bool $enable_checkpoints - * If this is set, the model will be solved in the checkpoint mode. In this - * mode, the input model can have a deadline longer than 30 mins without the - * risk of interruption. The model will be solved in multiple short-running - * stages. Each stage generates an intermediate checkpoint - * and stores it in the user's Cloud Storage buckets. The checkpoint - * mode should be preferred over - * allow_large_deadline_despite_interruption_risk since it prevents the risk - * of interruption. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); - parent::__construct($data); - } - - /** - * User defined model name, can be used as alias by users to keep track of - * models. - * - * Generated from protobuf field string display_name = 1; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * User defined model name, can be used as alias by users to keep track of - * models. - * - * Generated from protobuf field string display_name = 1; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Required. Information about the input model. - * - * Generated from protobuf field .google.cloud.optimization.v1.InputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Optimization\V1\InputConfig|null - */ - public function getInputConfig() - { - return $this->input_config; - } - - public function hasInputConfig() - { - return isset($this->input_config); - } - - public function clearInputConfig() - { - unset($this->input_config); - } - - /** - * Required. Information about the input model. - * - * Generated from protobuf field .google.cloud.optimization.v1.InputConfig input_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Optimization\V1\InputConfig $var - * @return $this - */ - public function setInputConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Optimization\V1\InputConfig::class); - $this->input_config = $var; - - return $this; - } - - /** - * Required. The desired output location information. - * - * Generated from protobuf field .google.cloud.optimization.v1.OutputConfig output_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Optimization\V1\OutputConfig|null - */ - public function getOutputConfig() - { - return $this->output_config; - } - - public function hasOutputConfig() - { - return isset($this->output_config); - } - - public function clearOutputConfig() - { - unset($this->output_config); - } - - /** - * Required. The desired output location information. - * - * Generated from protobuf field .google.cloud.optimization.v1.OutputConfig output_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Optimization\V1\OutputConfig $var - * @return $this - */ - public function setOutputConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Optimization\V1\OutputConfig::class); - $this->output_config = $var; - - return $this; - } - - /** - * If this is set, the model will be solved in the checkpoint mode. In this - * mode, the input model can have a deadline longer than 30 mins without the - * risk of interruption. The model will be solved in multiple short-running - * stages. Each stage generates an intermediate checkpoint - * and stores it in the user's Cloud Storage buckets. The checkpoint - * mode should be preferred over - * allow_large_deadline_despite_interruption_risk since it prevents the risk - * of interruption. - * - * Generated from protobuf field bool enable_checkpoints = 4; - * @return bool - */ - public function getEnableCheckpoints() - { - return $this->enable_checkpoints; - } - - /** - * If this is set, the model will be solved in the checkpoint mode. In this - * mode, the input model can have a deadline longer than 30 mins without the - * risk of interruption. The model will be solved in multiple short-running - * stages. Each stage generates an intermediate checkpoint - * and stores it in the user's Cloud Storage buckets. The checkpoint - * mode should be preferred over - * allow_large_deadline_despite_interruption_risk since it prevents the risk - * of interruption. - * - * Generated from protobuf field bool enable_checkpoints = 4; - * @param bool $var - * @return $this - */ - public function setEnableCheckpoints($var) - { - GPBUtil::checkBool($var); - $this->enable_checkpoints = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(AsyncModelConfig::class, \Google\Cloud\Optimization\V1\BatchOptimizeToursRequest_AsyncModelConfig::class); - diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/BatchOptimizeToursResponse.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/BatchOptimizeToursResponse.php deleted file mode 100644 index bafba7b88603..000000000000 --- a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/BatchOptimizeToursResponse.php +++ /dev/null @@ -1,34 +0,0 @@ -google.cloud.optimization.v1.BatchOptimizeToursResponse - */ -class BatchOptimizeToursResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/BreakRule.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/BreakRule.php deleted file mode 100644 index b284a82824c1..000000000000 --- a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/BreakRule.php +++ /dev/null @@ -1,113 +0,0 @@ -google.cloud.optimization.v1.BreakRule - */ -class BreakRule extends \Google\Protobuf\Internal\Message -{ - /** - * Sequence of breaks. See the `BreakRequest` message. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.BreakRule.BreakRequest break_requests = 1; - */ - private $break_requests; - /** - * Several `FrequencyConstraint` may apply. They must all be satisfied by - * the `BreakRequest`s of this `BreakRule`. See `FrequencyConstraint`. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.BreakRule.FrequencyConstraint frequency_constraints = 2; - */ - private $frequency_constraints; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Optimization\V1\BreakRule\BreakRequest>|\Google\Protobuf\Internal\RepeatedField $break_requests - * Sequence of breaks. See the `BreakRequest` message. - * @type array<\Google\Cloud\Optimization\V1\BreakRule\FrequencyConstraint>|\Google\Protobuf\Internal\RepeatedField $frequency_constraints - * Several `FrequencyConstraint` may apply. They must all be satisfied by - * the `BreakRequest`s of this `BreakRule`. See `FrequencyConstraint`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); - parent::__construct($data); - } - - /** - * Sequence of breaks. See the `BreakRequest` message. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.BreakRule.BreakRequest break_requests = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getBreakRequests() - { - return $this->break_requests; - } - - /** - * Sequence of breaks. See the `BreakRequest` message. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.BreakRule.BreakRequest break_requests = 1; - * @param array<\Google\Cloud\Optimization\V1\BreakRule\BreakRequest>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setBreakRequests($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\BreakRule\BreakRequest::class); - $this->break_requests = $arr; - - return $this; - } - - /** - * Several `FrequencyConstraint` may apply. They must all be satisfied by - * the `BreakRequest`s of this `BreakRule`. See `FrequencyConstraint`. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.BreakRule.FrequencyConstraint frequency_constraints = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFrequencyConstraints() - { - return $this->frequency_constraints; - } - - /** - * Several `FrequencyConstraint` may apply. They must all be satisfied by - * the `BreakRequest`s of this `BreakRule`. See `FrequencyConstraint`. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.BreakRule.FrequencyConstraint frequency_constraints = 2; - * @param array<\Google\Cloud\Optimization\V1\BreakRule\FrequencyConstraint>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFrequencyConstraints($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\BreakRule\FrequencyConstraint::class); - $this->frequency_constraints = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/BreakRule/BreakRequest.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/BreakRule/BreakRequest.php deleted file mode 100644 index 1519bc5e0923..000000000000 --- a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/BreakRule/BreakRequest.php +++ /dev/null @@ -1,172 +0,0 @@ -google.cloud.optimization.v1.BreakRule.BreakRequest - */ -class BreakRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Lower bound (inclusive) on the start of the break. - * - * Generated from protobuf field .google.protobuf.Timestamp earliest_start_time = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $earliest_start_time = null; - /** - * Required. Upper bound (inclusive) on the start of the break. - * - * Generated from protobuf field .google.protobuf.Timestamp latest_start_time = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $latest_start_time = null; - /** - * Required. Minimum duration of the break. Must be positive. - * - * Generated from protobuf field .google.protobuf.Duration min_duration = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $min_duration = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $earliest_start_time - * Required. Lower bound (inclusive) on the start of the break. - * @type \Google\Protobuf\Timestamp $latest_start_time - * Required. Upper bound (inclusive) on the start of the break. - * @type \Google\Protobuf\Duration $min_duration - * Required. Minimum duration of the break. Must be positive. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); - parent::__construct($data); - } - - /** - * Required. Lower bound (inclusive) on the start of the break. - * - * Generated from protobuf field .google.protobuf.Timestamp earliest_start_time = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEarliestStartTime() - { - return $this->earliest_start_time; - } - - public function hasEarliestStartTime() - { - return isset($this->earliest_start_time); - } - - public function clearEarliestStartTime() - { - unset($this->earliest_start_time); - } - - /** - * Required. Lower bound (inclusive) on the start of the break. - * - * Generated from protobuf field .google.protobuf.Timestamp earliest_start_time = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEarliestStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->earliest_start_time = $var; - - return $this; - } - - /** - * Required. Upper bound (inclusive) on the start of the break. - * - * Generated from protobuf field .google.protobuf.Timestamp latest_start_time = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getLatestStartTime() - { - return $this->latest_start_time; - } - - public function hasLatestStartTime() - { - return isset($this->latest_start_time); - } - - public function clearLatestStartTime() - { - unset($this->latest_start_time); - } - - /** - * Required. Upper bound (inclusive) on the start of the break. - * - * Generated from protobuf field .google.protobuf.Timestamp latest_start_time = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setLatestStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->latest_start_time = $var; - - return $this; - } - - /** - * Required. Minimum duration of the break. Must be positive. - * - * Generated from protobuf field .google.protobuf.Duration min_duration = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Duration|null - */ - public function getMinDuration() - { - return $this->min_duration; - } - - public function hasMinDuration() - { - return isset($this->min_duration); - } - - public function clearMinDuration() - { - unset($this->min_duration); - } - - /** - * Required. Minimum duration of the break. Must be positive. - * - * Generated from protobuf field .google.protobuf.Duration min_duration = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setMinDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->min_duration = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(BreakRequest::class, \Google\Cloud\Optimization\V1\BreakRule_BreakRequest::class); - diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/BreakRule/FrequencyConstraint.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/BreakRule/FrequencyConstraint.php deleted file mode 100644 index 6c2a3960a6a0..000000000000 --- a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/BreakRule/FrequencyConstraint.php +++ /dev/null @@ -1,166 +0,0 @@ -google.cloud.optimization.v1.BreakRule.FrequencyConstraint - */ -class FrequencyConstraint extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Minimum break duration for this constraint. Nonnegative. - * See description of `FrequencyConstraint`. - * - * Generated from protobuf field .google.protobuf.Duration min_break_duration = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $min_break_duration = null; - /** - * Required. Maximum allowed span of any interval of time in the route that - * does not include at least partially a break of `duration >= - * min_break_duration`. Must be positive. - * - * Generated from protobuf field .google.protobuf.Duration max_inter_break_duration = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $max_inter_break_duration = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Duration $min_break_duration - * Required. Minimum break duration for this constraint. Nonnegative. - * See description of `FrequencyConstraint`. - * @type \Google\Protobuf\Duration $max_inter_break_duration - * Required. Maximum allowed span of any interval of time in the route that - * does not include at least partially a break of `duration >= - * min_break_duration`. Must be positive. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); - parent::__construct($data); - } - - /** - * Required. Minimum break duration for this constraint. Nonnegative. - * See description of `FrequencyConstraint`. - * - * Generated from protobuf field .google.protobuf.Duration min_break_duration = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Duration|null - */ - public function getMinBreakDuration() - { - return $this->min_break_duration; - } - - public function hasMinBreakDuration() - { - return isset($this->min_break_duration); - } - - public function clearMinBreakDuration() - { - unset($this->min_break_duration); - } - - /** - * Required. Minimum break duration for this constraint. Nonnegative. - * See description of `FrequencyConstraint`. - * - * Generated from protobuf field .google.protobuf.Duration min_break_duration = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setMinBreakDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->min_break_duration = $var; - - return $this; - } - - /** - * Required. Maximum allowed span of any interval of time in the route that - * does not include at least partially a break of `duration >= - * min_break_duration`. Must be positive. - * - * Generated from protobuf field .google.protobuf.Duration max_inter_break_duration = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Duration|null - */ - public function getMaxInterBreakDuration() - { - return $this->max_inter_break_duration; - } - - public function hasMaxInterBreakDuration() - { - return isset($this->max_inter_break_duration); - } - - public function clearMaxInterBreakDuration() - { - unset($this->max_inter_break_duration); - } - - /** - * Required. Maximum allowed span of any interval of time in the route that - * does not include at least partially a break of `duration >= - * min_break_duration`. Must be positive. - * - * Generated from protobuf field .google.protobuf.Duration max_inter_break_duration = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setMaxInterBreakDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->max_inter_break_duration = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(FrequencyConstraint::class, \Google\Cloud\Optimization\V1\BreakRule_FrequencyConstraint::class); - diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/CapacityQuantity.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/CapacityQuantity.php deleted file mode 100644 index a9c5183dc909..000000000000 --- a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/CapacityQuantity.php +++ /dev/null @@ -1,90 +0,0 @@ -google.cloud.optimization.v1.CapacityQuantity - */ -class CapacityQuantity extends \Google\Protobuf\Internal\Message -{ - /** - * Generated from protobuf field string type = 1; - */ - protected $type = ''; - /** - * Generated from protobuf field int64 value = 2; - */ - protected $value = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $type - * @type int|string $value - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); - parent::__construct($data); - } - - /** - * Generated from protobuf field string type = 1; - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * Generated from protobuf field string type = 1; - * @param string $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkString($var, True); - $this->type = $var; - - return $this; - } - - /** - * Generated from protobuf field int64 value = 2; - * @return int|string - */ - public function getValue() - { - return $this->value; - } - - /** - * Generated from protobuf field int64 value = 2; - * @param int|string $var - * @return $this - */ - public function setValue($var) - { - GPBUtil::checkInt64($var); - $this->value = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/CapacityQuantityInterval.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/CapacityQuantityInterval.php deleted file mode 100644 index 020743277a3d..000000000000 --- a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/CapacityQuantityInterval.php +++ /dev/null @@ -1,137 +0,0 @@ -google.cloud.optimization.v1.CapacityQuantityInterval - */ -class CapacityQuantityInterval extends \Google\Protobuf\Internal\Message -{ - /** - * Generated from protobuf field string type = 1; - */ - protected $type = ''; - /** - * Generated from protobuf field optional int64 min_value = 2; - */ - protected $min_value = null; - /** - * Generated from protobuf field optional int64 max_value = 3; - */ - protected $max_value = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $type - * @type int|string $min_value - * @type int|string $max_value - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); - parent::__construct($data); - } - - /** - * Generated from protobuf field string type = 1; - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * Generated from protobuf field string type = 1; - * @param string $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkString($var, True); - $this->type = $var; - - return $this; - } - - /** - * Generated from protobuf field optional int64 min_value = 2; - * @return int|string - */ - public function getMinValue() - { - return isset($this->min_value) ? $this->min_value : 0; - } - - public function hasMinValue() - { - return isset($this->min_value); - } - - public function clearMinValue() - { - unset($this->min_value); - } - - /** - * Generated from protobuf field optional int64 min_value = 2; - * @param int|string $var - * @return $this - */ - public function setMinValue($var) - { - GPBUtil::checkInt64($var); - $this->min_value = $var; - - return $this; - } - - /** - * Generated from protobuf field optional int64 max_value = 3; - * @return int|string - */ - public function getMaxValue() - { - return isset($this->max_value) ? $this->max_value : 0; - } - - public function hasMaxValue() - { - return isset($this->max_value); - } - - public function clearMaxValue() - { - unset($this->max_value); - } - - /** - * Generated from protobuf field optional int64 max_value = 3; - * @param int|string $var - * @return $this - */ - public function setMaxValue($var) - { - GPBUtil::checkInt64($var); - $this->max_value = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/DataFormat.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/DataFormat.php deleted file mode 100644 index 9e77bfe52a85..000000000000 --- a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/DataFormat.php +++ /dev/null @@ -1,61 +0,0 @@ -google.cloud.optimization.v1.DataFormat - */ -class DataFormat -{ - /** - * Default value. - * - * Generated from protobuf enum DATA_FORMAT_UNSPECIFIED = 0; - */ - const DATA_FORMAT_UNSPECIFIED = 0; - /** - * Input data in json format. - * - * Generated from protobuf enum JSON = 1; - */ - const JSON = 1; - /** - * Input data in string format. - * - * Generated from protobuf enum STRING = 2; - */ - const STRING = 2; - - private static $valueToName = [ - self::DATA_FORMAT_UNSPECIFIED => 'DATA_FORMAT_UNSPECIFIED', - self::JSON => 'JSON', - self::STRING => 'STRING', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/DistanceLimit.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/DistanceLimit.php deleted file mode 100644 index 70ad9af40a26..000000000000 --- a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/DistanceLimit.php +++ /dev/null @@ -1,284 +0,0 @@ -google.cloud.optimization.v1.DistanceLimit - */ -class DistanceLimit extends \Google\Protobuf\Internal\Message -{ - /** - * A hard limit constraining the distance to be at most max_meters. The limit - * must be nonnegative. - * - * Generated from protobuf field optional int64 max_meters = 1; - */ - protected $max_meters = null; - /** - * A soft limit not enforcing a maximum distance limit, but when violated - * results in a cost which adds up to other costs defined in the model, - * with the same unit. - * If defined soft_max_meters must be less than max_meters and must be - * nonnegative. - * - * Generated from protobuf field optional int64 soft_max_meters = 2; - */ - protected $soft_max_meters = null; - /** - * Cost per kilometer incurred, increasing up to `soft_max_meters`, with - * formula: - * ``` - * min(distance_meters, soft_max_meters) / 1000.0 * - * cost_per_kilometer_below_soft_max. - * ``` - * This cost is not supported in `route_distance_limit`. - * - * Generated from protobuf field optional double cost_per_kilometer_below_soft_max = 4; - */ - protected $cost_per_kilometer_below_soft_max = null; - /** - * Cost per kilometer incurred if distance is above `soft_max_meters` limit. - * The additional cost is 0 if the distance is under the limit, otherwise the - * formula used to compute the cost is the following: - * ``` - * (distance_meters - soft_max_meters) / 1000.0 * - * cost_per_kilometer_above_soft_max. - * ``` - * The cost must be nonnegative. - * - * Generated from protobuf field optional double cost_per_kilometer_above_soft_max = 3; - */ - protected $cost_per_kilometer_above_soft_max = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $max_meters - * A hard limit constraining the distance to be at most max_meters. The limit - * must be nonnegative. - * @type int|string $soft_max_meters - * A soft limit not enforcing a maximum distance limit, but when violated - * results in a cost which adds up to other costs defined in the model, - * with the same unit. - * If defined soft_max_meters must be less than max_meters and must be - * nonnegative. - * @type float $cost_per_kilometer_below_soft_max - * Cost per kilometer incurred, increasing up to `soft_max_meters`, with - * formula: - * ``` - * min(distance_meters, soft_max_meters) / 1000.0 * - * cost_per_kilometer_below_soft_max. - * ``` - * This cost is not supported in `route_distance_limit`. - * @type float $cost_per_kilometer_above_soft_max - * Cost per kilometer incurred if distance is above `soft_max_meters` limit. - * The additional cost is 0 if the distance is under the limit, otherwise the - * formula used to compute the cost is the following: - * ``` - * (distance_meters - soft_max_meters) / 1000.0 * - * cost_per_kilometer_above_soft_max. - * ``` - * The cost must be nonnegative. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); - parent::__construct($data); - } - - /** - * A hard limit constraining the distance to be at most max_meters. The limit - * must be nonnegative. - * - * Generated from protobuf field optional int64 max_meters = 1; - * @return int|string - */ - public function getMaxMeters() - { - return isset($this->max_meters) ? $this->max_meters : 0; - } - - public function hasMaxMeters() - { - return isset($this->max_meters); - } - - public function clearMaxMeters() - { - unset($this->max_meters); - } - - /** - * A hard limit constraining the distance to be at most max_meters. The limit - * must be nonnegative. - * - * Generated from protobuf field optional int64 max_meters = 1; - * @param int|string $var - * @return $this - */ - public function setMaxMeters($var) - { - GPBUtil::checkInt64($var); - $this->max_meters = $var; - - return $this; - } - - /** - * A soft limit not enforcing a maximum distance limit, but when violated - * results in a cost which adds up to other costs defined in the model, - * with the same unit. - * If defined soft_max_meters must be less than max_meters and must be - * nonnegative. - * - * Generated from protobuf field optional int64 soft_max_meters = 2; - * @return int|string - */ - public function getSoftMaxMeters() - { - return isset($this->soft_max_meters) ? $this->soft_max_meters : 0; - } - - public function hasSoftMaxMeters() - { - return isset($this->soft_max_meters); - } - - public function clearSoftMaxMeters() - { - unset($this->soft_max_meters); - } - - /** - * A soft limit not enforcing a maximum distance limit, but when violated - * results in a cost which adds up to other costs defined in the model, - * with the same unit. - * If defined soft_max_meters must be less than max_meters and must be - * nonnegative. - * - * Generated from protobuf field optional int64 soft_max_meters = 2; - * @param int|string $var - * @return $this - */ - public function setSoftMaxMeters($var) - { - GPBUtil::checkInt64($var); - $this->soft_max_meters = $var; - - return $this; - } - - /** - * Cost per kilometer incurred, increasing up to `soft_max_meters`, with - * formula: - * ``` - * min(distance_meters, soft_max_meters) / 1000.0 * - * cost_per_kilometer_below_soft_max. - * ``` - * This cost is not supported in `route_distance_limit`. - * - * Generated from protobuf field optional double cost_per_kilometer_below_soft_max = 4; - * @return float - */ - public function getCostPerKilometerBelowSoftMax() - { - return isset($this->cost_per_kilometer_below_soft_max) ? $this->cost_per_kilometer_below_soft_max : 0.0; - } - - public function hasCostPerKilometerBelowSoftMax() - { - return isset($this->cost_per_kilometer_below_soft_max); - } - - public function clearCostPerKilometerBelowSoftMax() - { - unset($this->cost_per_kilometer_below_soft_max); - } - - /** - * Cost per kilometer incurred, increasing up to `soft_max_meters`, with - * formula: - * ``` - * min(distance_meters, soft_max_meters) / 1000.0 * - * cost_per_kilometer_below_soft_max. - * ``` - * This cost is not supported in `route_distance_limit`. - * - * Generated from protobuf field optional double cost_per_kilometer_below_soft_max = 4; - * @param float $var - * @return $this - */ - public function setCostPerKilometerBelowSoftMax($var) - { - GPBUtil::checkDouble($var); - $this->cost_per_kilometer_below_soft_max = $var; - - return $this; - } - - /** - * Cost per kilometer incurred if distance is above `soft_max_meters` limit. - * The additional cost is 0 if the distance is under the limit, otherwise the - * formula used to compute the cost is the following: - * ``` - * (distance_meters - soft_max_meters) / 1000.0 * - * cost_per_kilometer_above_soft_max. - * ``` - * The cost must be nonnegative. - * - * Generated from protobuf field optional double cost_per_kilometer_above_soft_max = 3; - * @return float - */ - public function getCostPerKilometerAboveSoftMax() - { - return isset($this->cost_per_kilometer_above_soft_max) ? $this->cost_per_kilometer_above_soft_max : 0.0; - } - - public function hasCostPerKilometerAboveSoftMax() - { - return isset($this->cost_per_kilometer_above_soft_max); - } - - public function clearCostPerKilometerAboveSoftMax() - { - unset($this->cost_per_kilometer_above_soft_max); - } - - /** - * Cost per kilometer incurred if distance is above `soft_max_meters` limit. - * The additional cost is 0 if the distance is under the limit, otherwise the - * formula used to compute the cost is the following: - * ``` - * (distance_meters - soft_max_meters) / 1000.0 * - * cost_per_kilometer_above_soft_max. - * ``` - * The cost must be nonnegative. - * - * Generated from protobuf field optional double cost_per_kilometer_above_soft_max = 3; - * @param float $var - * @return $this - */ - public function setCostPerKilometerAboveSoftMax($var) - { - GPBUtil::checkDouble($var); - $this->cost_per_kilometer_above_soft_max = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/GcsDestination.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/GcsDestination.php deleted file mode 100644 index 3ccb29cfd250..000000000000 --- a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/GcsDestination.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.optimization.v1.GcsDestination - */ -class GcsDestination extends \Google\Protobuf\Internal\Message -{ - /** - * Required. URI of the Google Cloud Storage location. - * - * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $uri = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $uri - * Required. URI of the Google Cloud Storage location. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Optimization\V1\AsyncModel::initOnce(); - parent::__construct($data); - } - - /** - * Required. URI of the Google Cloud Storage location. - * - * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * Required. URI of the Google Cloud Storage location. - * - * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/GcsSource.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/GcsSource.php deleted file mode 100644 index 9ddec1cbc0f7..000000000000 --- a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/GcsSource.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.optimization.v1.GcsSource - */ -class GcsSource extends \Google\Protobuf\Internal\Message -{ - /** - * Required. URI of the Google Cloud Storage location. - * - * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $uri = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $uri - * Required. URI of the Google Cloud Storage location. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Optimization\V1\AsyncModel::initOnce(); - parent::__construct($data); - } - - /** - * Required. URI of the Google Cloud Storage location. - * - * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * Required. URI of the Google Cloud Storage location. - * - * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/InjectedSolutionConstraint.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/InjectedSolutionConstraint.php deleted file mode 100644 index 24875c1d2acd..000000000000 --- a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/InjectedSolutionConstraint.php +++ /dev/null @@ -1,156 +0,0 @@ -google.cloud.optimization.v1.InjectedSolutionConstraint - */ -class InjectedSolutionConstraint extends \Google\Protobuf\Internal\Message -{ - /** - * Routes of the solution to inject. Some routes may be omitted from the - * original solution. The routes and skipped shipments must satisfy the basic - * validity assumptions listed for `injected_first_solution_routes`. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.ShipmentRoute routes = 1; - */ - private $routes; - /** - * Skipped shipments of the solution to inject. Some may be omitted from the - * original solution. See the `routes` field. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.SkippedShipment skipped_shipments = 2; - */ - private $skipped_shipments; - /** - * For zero or more groups of vehicles, specifies when and how much to relax - * constraints. If this field is empty, all non-empty vehicle routes are - * fully constrained. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation constraint_relaxations = 3; - */ - private $constraint_relaxations; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Optimization\V1\ShipmentRoute>|\Google\Protobuf\Internal\RepeatedField $routes - * Routes of the solution to inject. Some routes may be omitted from the - * original solution. The routes and skipped shipments must satisfy the basic - * validity assumptions listed for `injected_first_solution_routes`. - * @type array<\Google\Cloud\Optimization\V1\SkippedShipment>|\Google\Protobuf\Internal\RepeatedField $skipped_shipments - * Skipped shipments of the solution to inject. Some may be omitted from the - * original solution. See the `routes` field. - * @type array<\Google\Cloud\Optimization\V1\InjectedSolutionConstraint\ConstraintRelaxation>|\Google\Protobuf\Internal\RepeatedField $constraint_relaxations - * For zero or more groups of vehicles, specifies when and how much to relax - * constraints. If this field is empty, all non-empty vehicle routes are - * fully constrained. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); - parent::__construct($data); - } - - /** - * Routes of the solution to inject. Some routes may be omitted from the - * original solution. The routes and skipped shipments must satisfy the basic - * validity assumptions listed for `injected_first_solution_routes`. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.ShipmentRoute routes = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRoutes() - { - return $this->routes; - } - - /** - * Routes of the solution to inject. Some routes may be omitted from the - * original solution. The routes and skipped shipments must satisfy the basic - * validity assumptions listed for `injected_first_solution_routes`. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.ShipmentRoute routes = 1; - * @param array<\Google\Cloud\Optimization\V1\ShipmentRoute>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRoutes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\ShipmentRoute::class); - $this->routes = $arr; - - return $this; - } - - /** - * Skipped shipments of the solution to inject. Some may be omitted from the - * original solution. See the `routes` field. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.SkippedShipment skipped_shipments = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSkippedShipments() - { - return $this->skipped_shipments; - } - - /** - * Skipped shipments of the solution to inject. Some may be omitted from the - * original solution. See the `routes` field. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.SkippedShipment skipped_shipments = 2; - * @param array<\Google\Cloud\Optimization\V1\SkippedShipment>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSkippedShipments($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\SkippedShipment::class); - $this->skipped_shipments = $arr; - - return $this; - } - - /** - * For zero or more groups of vehicles, specifies when and how much to relax - * constraints. If this field is empty, all non-empty vehicle routes are - * fully constrained. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation constraint_relaxations = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getConstraintRelaxations() - { - return $this->constraint_relaxations; - } - - /** - * For zero or more groups of vehicles, specifies when and how much to relax - * constraints. If this field is empty, all non-empty vehicle routes are - * fully constrained. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation constraint_relaxations = 3; - * @param array<\Google\Cloud\Optimization\V1\InjectedSolutionConstraint\ConstraintRelaxation>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setConstraintRelaxations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\InjectedSolutionConstraint\ConstraintRelaxation::class); - $this->constraint_relaxations = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/InjectedSolutionConstraint/ConstraintRelaxation.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/InjectedSolutionConstraint/ConstraintRelaxation.php deleted file mode 100644 index 0a9ea36e234a..000000000000 --- a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/InjectedSolutionConstraint/ConstraintRelaxation.php +++ /dev/null @@ -1,151 +0,0 @@ -google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation - */ -class ConstraintRelaxation extends \Google\Protobuf\Internal\Message -{ - /** - * All the visit constraint relaxations that will apply to visits on - * routes with vehicles in `vehicle_indices`. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.Relaxation relaxations = 1; - */ - private $relaxations; - /** - * Specifies the vehicle indices to which the visit constraint - * `relaxations` apply. If empty, this is considered the default and the - * `relaxations` apply to all vehicles that are not specified in other - * `constraint_relaxations`. There can be at most one default, i.e., at - * most one constraint relaxation field is allowed empty - * `vehicle_indices`. A vehicle index can only be listed once, even within - * several `constraint_relaxations`. - * A vehicle index is mapped the same as - * [ShipmentRoute.vehicle_index][google.cloud.optimization.v1.ShipmentRoute.vehicle_index], - * if `interpret_injected_solutions_using_labels` is true (see `fields` - * comment). - * - * Generated from protobuf field repeated int32 vehicle_indices = 2; - */ - private $vehicle_indices; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Optimization\V1\InjectedSolutionConstraint\ConstraintRelaxation\Relaxation>|\Google\Protobuf\Internal\RepeatedField $relaxations - * All the visit constraint relaxations that will apply to visits on - * routes with vehicles in `vehicle_indices`. - * @type array|\Google\Protobuf\Internal\RepeatedField $vehicle_indices - * Specifies the vehicle indices to which the visit constraint - * `relaxations` apply. If empty, this is considered the default and the - * `relaxations` apply to all vehicles that are not specified in other - * `constraint_relaxations`. There can be at most one default, i.e., at - * most one constraint relaxation field is allowed empty - * `vehicle_indices`. A vehicle index can only be listed once, even within - * several `constraint_relaxations`. - * A vehicle index is mapped the same as - * [ShipmentRoute.vehicle_index][google.cloud.optimization.v1.ShipmentRoute.vehicle_index], - * if `interpret_injected_solutions_using_labels` is true (see `fields` - * comment). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); - parent::__construct($data); - } - - /** - * All the visit constraint relaxations that will apply to visits on - * routes with vehicles in `vehicle_indices`. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.Relaxation relaxations = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRelaxations() - { - return $this->relaxations; - } - - /** - * All the visit constraint relaxations that will apply to visits on - * routes with vehicles in `vehicle_indices`. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.Relaxation relaxations = 1; - * @param array<\Google\Cloud\Optimization\V1\InjectedSolutionConstraint\ConstraintRelaxation\Relaxation>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRelaxations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\InjectedSolutionConstraint\ConstraintRelaxation\Relaxation::class); - $this->relaxations = $arr; - - return $this; - } - - /** - * Specifies the vehicle indices to which the visit constraint - * `relaxations` apply. If empty, this is considered the default and the - * `relaxations` apply to all vehicles that are not specified in other - * `constraint_relaxations`. There can be at most one default, i.e., at - * most one constraint relaxation field is allowed empty - * `vehicle_indices`. A vehicle index can only be listed once, even within - * several `constraint_relaxations`. - * A vehicle index is mapped the same as - * [ShipmentRoute.vehicle_index][google.cloud.optimization.v1.ShipmentRoute.vehicle_index], - * if `interpret_injected_solutions_using_labels` is true (see `fields` - * comment). - * - * Generated from protobuf field repeated int32 vehicle_indices = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getVehicleIndices() - { - return $this->vehicle_indices; - } - - /** - * Specifies the vehicle indices to which the visit constraint - * `relaxations` apply. If empty, this is considered the default and the - * `relaxations` apply to all vehicles that are not specified in other - * `constraint_relaxations`. There can be at most one default, i.e., at - * most one constraint relaxation field is allowed empty - * `vehicle_indices`. A vehicle index can only be listed once, even within - * several `constraint_relaxations`. - * A vehicle index is mapped the same as - * [ShipmentRoute.vehicle_index][google.cloud.optimization.v1.ShipmentRoute.vehicle_index], - * if `interpret_injected_solutions_using_labels` is true (see `fields` - * comment). - * - * Generated from protobuf field repeated int32 vehicle_indices = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setVehicleIndices($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); - $this->vehicle_indices = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ConstraintRelaxation::class, \Google\Cloud\Optimization\V1\InjectedSolutionConstraint_ConstraintRelaxation::class); - diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/InjectedSolutionConstraint/ConstraintRelaxation/Relaxation.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/InjectedSolutionConstraint/ConstraintRelaxation/Relaxation.php deleted file mode 100644 index 751a516bfd34..000000000000 --- a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/InjectedSolutionConstraint/ConstraintRelaxation/Relaxation.php +++ /dev/null @@ -1,204 +0,0 @@ -= relaxations(i).threshold_time` AND - * * `j + 1 >= relaxations(i).threshold_visit_count` - * Similarly, the vehicle start is relaxed to `relaxations(i).level` if it - * satisfies: - * * `vehicle_start_time >= relaxations(i).threshold_time` AND - * * `relaxations(i).threshold_visit_count == 0` - * and the vehicle end is relaxed to `relaxations(i).level` if it satisfies: - * * `vehicle_end_time >= relaxations(i).threshold_time` AND - * * `route.visits_size() + 1 >= relaxations(i).threshold_visit_count` - * To apply a relaxation level if a visit meets the `threshold_visit_count` - * OR the `threshold_time` add two `relaxations` with the same `level`: - * one with only `threshold_visit_count` set and the other with only - * `threshold_time` set. If a visit satisfies the conditions of multiple - * `relaxations`, the most relaxed level applies. As a result, from the - * vehicle start through the route visits in order to the vehicle end, the - * relaxation level becomes more relaxed: i.e., the relaxation level is - * non-decreasing as the route progresses. - * The timing and sequence of route visits that do not satisfy the - * threshold conditions of any `relaxations` are fully constrained - * and no visits may be inserted into these sequences. Also, if a - * vehicle start or end does not satisfy the conditions of any - * relaxation the time is fixed, unless the vehicle is empty. - * - * Generated from protobuf message google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.Relaxation - */ -class Relaxation extends \Google\Protobuf\Internal\Message -{ - /** - * The constraint relaxation level that applies when the conditions - * at or after `threshold_time` AND at least `threshold_visit_count` are - * satisfied. - * - * Generated from protobuf field .google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.Relaxation.Level level = 1; - */ - protected $level = 0; - /** - * The time at or after which the relaxation `level` may be applied. - * - * Generated from protobuf field .google.protobuf.Timestamp threshold_time = 2; - */ - protected $threshold_time = null; - /** - * The number of visits at or after which the relaxation `level` may be - * applied. If `threshold_visit_count` is 0 (or unset), the `level` may be - * applied directly at the vehicle start. - * If it is `route.visits_size() + 1`, the `level` may only be applied to - * the vehicle end. If it is more than `route.visits_size() + 1`, - * `level` is not applied at all for that route. - * - * Generated from protobuf field int32 threshold_visit_count = 3; - */ - protected $threshold_visit_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $level - * The constraint relaxation level that applies when the conditions - * at or after `threshold_time` AND at least `threshold_visit_count` are - * satisfied. - * @type \Google\Protobuf\Timestamp $threshold_time - * The time at or after which the relaxation `level` may be applied. - * @type int $threshold_visit_count - * The number of visits at or after which the relaxation `level` may be - * applied. If `threshold_visit_count` is 0 (or unset), the `level` may be - * applied directly at the vehicle start. - * If it is `route.visits_size() + 1`, the `level` may only be applied to - * the vehicle end. If it is more than `route.visits_size() + 1`, - * `level` is not applied at all for that route. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); - parent::__construct($data); - } - - /** - * The constraint relaxation level that applies when the conditions - * at or after `threshold_time` AND at least `threshold_visit_count` are - * satisfied. - * - * Generated from protobuf field .google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.Relaxation.Level level = 1; - * @return int - */ - public function getLevel() - { - return $this->level; - } - - /** - * The constraint relaxation level that applies when the conditions - * at or after `threshold_time` AND at least `threshold_visit_count` are - * satisfied. - * - * Generated from protobuf field .google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.Relaxation.Level level = 1; - * @param int $var - * @return $this - */ - public function setLevel($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Optimization\V1\InjectedSolutionConstraint\ConstraintRelaxation\Relaxation\Level::class); - $this->level = $var; - - return $this; - } - - /** - * The time at or after which the relaxation `level` may be applied. - * - * Generated from protobuf field .google.protobuf.Timestamp threshold_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getThresholdTime() - { - return $this->threshold_time; - } - - public function hasThresholdTime() - { - return isset($this->threshold_time); - } - - public function clearThresholdTime() - { - unset($this->threshold_time); - } - - /** - * The time at or after which the relaxation `level` may be applied. - * - * Generated from protobuf field .google.protobuf.Timestamp threshold_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setThresholdTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->threshold_time = $var; - - return $this; - } - - /** - * The number of visits at or after which the relaxation `level` may be - * applied. If `threshold_visit_count` is 0 (or unset), the `level` may be - * applied directly at the vehicle start. - * If it is `route.visits_size() + 1`, the `level` may only be applied to - * the vehicle end. If it is more than `route.visits_size() + 1`, - * `level` is not applied at all for that route. - * - * Generated from protobuf field int32 threshold_visit_count = 3; - * @return int - */ - public function getThresholdVisitCount() - { - return $this->threshold_visit_count; - } - - /** - * The number of visits at or after which the relaxation `level` may be - * applied. If `threshold_visit_count` is 0 (or unset), the `level` may be - * applied directly at the vehicle start. - * If it is `route.visits_size() + 1`, the `level` may only be applied to - * the vehicle end. If it is more than `route.visits_size() + 1`, - * `level` is not applied at all for that route. - * - * Generated from protobuf field int32 threshold_visit_count = 3; - * @param int $var - * @return $this - */ - public function setThresholdVisitCount($var) - { - GPBUtil::checkInt32($var); - $this->threshold_visit_count = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Relaxation::class, \Google\Cloud\Optimization\V1\InjectedSolutionConstraint_ConstraintRelaxation_Relaxation::class); - diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/InjectedSolutionConstraint/ConstraintRelaxation/Relaxation/Level.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/InjectedSolutionConstraint/ConstraintRelaxation/Relaxation/Level.php deleted file mode 100644 index 7f06698f5872..000000000000 --- a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/InjectedSolutionConstraint/ConstraintRelaxation/Relaxation/Level.php +++ /dev/null @@ -1,83 +0,0 @@ -google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.Relaxation.Level - */ -class Level -{ - /** - * Implicit default relaxation level: no constraints are relaxed, - * i.e., all visits are fully constrained. - * This value must not be explicitly used in `level`. - * - * Generated from protobuf enum LEVEL_UNSPECIFIED = 0; - */ - const LEVEL_UNSPECIFIED = 0; - /** - * Visit start times and vehicle start/end times will be relaxed, but - * each visit remains bound to the same vehicle and the visit sequence - * must be observed: no visit can be inserted between them or before - * them. - * - * Generated from protobuf enum RELAX_VISIT_TIMES_AFTER_THRESHOLD = 1; - */ - const RELAX_VISIT_TIMES_AFTER_THRESHOLD = 1; - /** - * Same as `RELAX_VISIT_TIMES_AFTER_THRESHOLD`, but the visit sequence - * is also relaxed: visits can only be performed by this vehicle, but - * can potentially become unperformed. - * - * Generated from protobuf enum RELAX_VISIT_TIMES_AND_SEQUENCE_AFTER_THRESHOLD = 2; - */ - const RELAX_VISIT_TIMES_AND_SEQUENCE_AFTER_THRESHOLD = 2; - /** - * Same as `RELAX_VISIT_TIMES_AND_SEQUENCE_AFTER_THRESHOLD`, but the - * vehicle is also relaxed: visits are completely free at or after the - * threshold time and can potentially become unperformed. - * - * Generated from protobuf enum RELAX_ALL_AFTER_THRESHOLD = 3; - */ - const RELAX_ALL_AFTER_THRESHOLD = 3; - - private static $valueToName = [ - self::LEVEL_UNSPECIFIED => 'LEVEL_UNSPECIFIED', - self::RELAX_VISIT_TIMES_AFTER_THRESHOLD => 'RELAX_VISIT_TIMES_AFTER_THRESHOLD', - self::RELAX_VISIT_TIMES_AND_SEQUENCE_AFTER_THRESHOLD => 'RELAX_VISIT_TIMES_AND_SEQUENCE_AFTER_THRESHOLD', - self::RELAX_ALL_AFTER_THRESHOLD => 'RELAX_ALL_AFTER_THRESHOLD', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Level::class, \Google\Cloud\Optimization\V1\InjectedSolutionConstraint_ConstraintRelaxation_Relaxation_Level::class); - diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/InputConfig.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/InputConfig.php deleted file mode 100644 index b6c65c213d2a..000000000000 --- a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/InputConfig.php +++ /dev/null @@ -1,112 +0,0 @@ -google.cloud.optimization.v1.InputConfig - */ -class InputConfig extends \Google\Protobuf\Internal\Message -{ - /** - * The input data format that used to store the model in Cloud Storage. - * - * Generated from protobuf field .google.cloud.optimization.v1.DataFormat data_format = 2; - */ - protected $data_format = 0; - protected $source; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Optimization\V1\GcsSource $gcs_source - * The Google Cloud Storage location to read the input from. This must be a - * single file. - * @type int $data_format - * The input data format that used to store the model in Cloud Storage. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Optimization\V1\AsyncModel::initOnce(); - parent::__construct($data); - } - - /** - * The Google Cloud Storage location to read the input from. This must be a - * single file. - * - * Generated from protobuf field .google.cloud.optimization.v1.GcsSource gcs_source = 1; - * @return \Google\Cloud\Optimization\V1\GcsSource|null - */ - public function getGcsSource() - { - return $this->readOneof(1); - } - - public function hasGcsSource() - { - return $this->hasOneof(1); - } - - /** - * The Google Cloud Storage location to read the input from. This must be a - * single file. - * - * Generated from protobuf field .google.cloud.optimization.v1.GcsSource gcs_source = 1; - * @param \Google\Cloud\Optimization\V1\GcsSource $var - * @return $this - */ - public function setGcsSource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Optimization\V1\GcsSource::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * The input data format that used to store the model in Cloud Storage. - * - * Generated from protobuf field .google.cloud.optimization.v1.DataFormat data_format = 2; - * @return int - */ - public function getDataFormat() - { - return $this->data_format; - } - - /** - * The input data format that used to store the model in Cloud Storage. - * - * Generated from protobuf field .google.cloud.optimization.v1.DataFormat data_format = 2; - * @param int $var - * @return $this - */ - public function setDataFormat($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Optimization\V1\DataFormat::class); - $this->data_format = $var; - - return $this; - } - - /** - * @return string - */ - public function getSource() - { - return $this->whichOneof("source"); - } - -} - diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/Location.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/Location.php deleted file mode 100644 index cb4cfc3a20de..000000000000 --- a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/Location.php +++ /dev/null @@ -1,133 +0,0 @@ -google.cloud.optimization.v1.Location - */ -class Location extends \Google\Protobuf\Internal\Message -{ - /** - * The waypoint's geographic coordinates. - * - * Generated from protobuf field .google.type.LatLng lat_lng = 1; - */ - protected $lat_lng = null; - /** - * The compass heading associated with the direction of the flow of traffic. - * This value is used to specify the side of the road to use for pickup and - * drop-off. Heading values can be from 0 to 360, where 0 specifies a heading - * of due North, 90 specifies a heading of due East, etc. - * - * Generated from protobuf field optional int32 heading = 2; - */ - protected $heading = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Type\LatLng $lat_lng - * The waypoint's geographic coordinates. - * @type int $heading - * The compass heading associated with the direction of the flow of traffic. - * This value is used to specify the side of the road to use for pickup and - * drop-off. Heading values can be from 0 to 360, where 0 specifies a heading - * of due North, 90 specifies a heading of due East, etc. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); - parent::__construct($data); - } - - /** - * The waypoint's geographic coordinates. - * - * Generated from protobuf field .google.type.LatLng lat_lng = 1; - * @return \Google\Type\LatLng|null - */ - public function getLatLng() - { - return $this->lat_lng; - } - - public function hasLatLng() - { - return isset($this->lat_lng); - } - - public function clearLatLng() - { - unset($this->lat_lng); - } - - /** - * The waypoint's geographic coordinates. - * - * Generated from protobuf field .google.type.LatLng lat_lng = 1; - * @param \Google\Type\LatLng $var - * @return $this - */ - public function setLatLng($var) - { - GPBUtil::checkMessage($var, \Google\Type\LatLng::class); - $this->lat_lng = $var; - - return $this; - } - - /** - * The compass heading associated with the direction of the flow of traffic. - * This value is used to specify the side of the road to use for pickup and - * drop-off. Heading values can be from 0 to 360, where 0 specifies a heading - * of due North, 90 specifies a heading of due East, etc. - * - * Generated from protobuf field optional int32 heading = 2; - * @return int - */ - public function getHeading() - { - return isset($this->heading) ? $this->heading : 0; - } - - public function hasHeading() - { - return isset($this->heading); - } - - public function clearHeading() - { - unset($this->heading); - } - - /** - * The compass heading associated with the direction of the flow of traffic. - * This value is used to specify the side of the road to use for pickup and - * drop-off. Heading values can be from 0 to 360, where 0 specifies a heading - * of due North, 90 specifies a heading of due East, etc. - * - * Generated from protobuf field optional int32 heading = 2; - * @param int $var - * @return $this - */ - public function setHeading($var) - { - GPBUtil::checkInt32($var); - $this->heading = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/OptimizeToursRequest.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/OptimizeToursRequest.php deleted file mode 100644 index 97f382a04375..000000000000 --- a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/OptimizeToursRequest.php +++ /dev/null @@ -1,1237 +0,0 @@ -google.cloud.optimization.v1.OptimizeToursRequest - */ -class OptimizeToursRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Target project and location to make a call. - * Format: `projects/{project-id}/locations/{location-id}`. - * If no location is specified, a region will be chosen automatically. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $parent = ''; - /** - * If this timeout is set, the server returns a response before the timeout - * period has elapsed or the server deadline for synchronous requests is - * reached, whichever is sooner. - * For asynchronous requests, the server will generate a solution (if - * possible) before the timeout has elapsed. - * - * Generated from protobuf field .google.protobuf.Duration timeout = 2; - */ - protected $timeout = null; - /** - * Shipment model to solve. - * - * Generated from protobuf field .google.cloud.optimization.v1.ShipmentModel model = 3; - */ - protected $model = null; - /** - * By default, the solving mode is `DEFAULT_SOLVE` (0). - * - * Generated from protobuf field .google.cloud.optimization.v1.OptimizeToursRequest.SolvingMode solving_mode = 4; - */ - protected $solving_mode = 0; - /** - * Search mode used to solve the request. - * - * Generated from protobuf field .google.cloud.optimization.v1.OptimizeToursRequest.SearchMode search_mode = 6; - */ - protected $search_mode = 0; - /** - * Guide the optimization algorithm in finding a first solution that is - * similar to a previous solution. - * The model is constrained when the first solution is built. - * Any shipments not performed on a route are implicitly skipped in the first - * solution, but they may be performed in successive solutions. - * The solution must satisfy some basic validity assumptions: - * * for all routes, `vehicle_index` must be in range and not be duplicated. - * * for all visits, `shipment_index` and `visit_request_index` must be - * in range. - * * a shipment may only be referenced on one route. - * * the pickup of a pickup-delivery shipment must be performed before - * the delivery. - * * no more than one pickup alternative or delivery alternative of - * a shipment may be performed. - * * for all routes, times are increasing (i.e., `vehicle_start_time - * <= visits[0].start_time <= visits[1].start_time ... - * <= vehicle_end_time`). - * * a shipment may only be performed on a vehicle that is allowed. A - * vehicle is allowed if - * [Shipment.allowed_vehicle_indices][google.cloud.optimization.v1.Shipment.allowed_vehicle_indices] - * is empty or its `vehicle_index` is included in - * [Shipment.allowed_vehicle_indices][google.cloud.optimization.v1.Shipment.allowed_vehicle_indices]. - * If the injected solution is not feasible, a validation error is not - * necessarily returned and an error indicating infeasibility may be returned - * instead. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.ShipmentRoute injected_first_solution_routes = 7; - */ - private $injected_first_solution_routes; - /** - * Constrain the optimization algorithm to find a final solution that is - * similar to a previous solution. For example, this may be used to freeze - * portions of routes which have already been completed or which are to be - * completed but must not be modified. - * If the injected solution is not feasible, a validation error is not - * necessarily returned and an error indicating infeasibility may be returned - * instead. - * - * Generated from protobuf field .google.cloud.optimization.v1.InjectedSolutionConstraint injected_solution_constraint = 8; - */ - protected $injected_solution_constraint = null; - /** - * If non-empty, the given routes will be refreshed, without modifying their - * underlying sequence of visits or travel times: only other details will be - * updated. This does not solve the model. - * As of 2020/11, this only populates the polylines of non-empty routes and - * requires that `populate_polylines` is true. - * The `route_polyline` fields of the passed-in routes may be inconsistent - * with route `transitions`. - * This field must not be used together with `injected_first_solution_routes` - * or `injected_solution_constraint`. - * `Shipment.ignore` and `Vehicle.ignore` have no effect on the behavior. - * Polylines are still populated between all visits in all non-empty routes - * regardless of whether the related shipments or vehicles are ignored. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.ShipmentRoute refresh_details_routes = 9; - */ - private $refresh_details_routes; - /** - * If true: - * * uses - * [ShipmentRoute.vehicle_label][google.cloud.optimization.v1.ShipmentRoute.vehicle_label] - * instead of `vehicle_index` to - * match routes in an injected solution with vehicles in the request; - * reuses the mapping of original - * [ShipmentRoute.vehicle_index][google.cloud.optimization.v1.ShipmentRoute.vehicle_index] - * to new - * [ShipmentRoute.vehicle_index][google.cloud.optimization.v1.ShipmentRoute.vehicle_index] - * to update - * [ConstraintRelaxation.vehicle_indices][google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.vehicle_indices] - * if non-empty, but the mapping must be unambiguous (i.e., multiple - * `ShipmentRoute`s must not share the same original `vehicle_index`). - * * uses - * [ShipmentRoute.Visit.shipment_label][google.cloud.optimization.v1.ShipmentRoute.Visit.shipment_label] - * instead of `shipment_index` - * to match visits in an injected solution with shipments in the request; - * * uses - * [SkippedShipment.label][google.cloud.optimization.v1.SkippedShipment.label] - * instead of - * [SkippedShipment.index][google.cloud.optimization.v1.SkippedShipment.index] - * to - * match skipped shipments in the injected solution with request - * shipments. - * This interpretation applies to the `injected_first_solution_routes`, - * `injected_solution_constraint`, and `refresh_details_routes` fields. - * It can be used when shipment or vehicle indices in the request have - * changed since the solution was created, perhaps because shipments or - * vehicles have been removed from or added to the request. - * If true, labels in the following categories must appear at most once in - * their category: - * * [Vehicle.label][google.cloud.optimization.v1.Vehicle.label] in the - * request; - * * [Shipment.label][google.cloud.optimization.v1.Shipment.label] in the - * request; - * * [ShipmentRoute.vehicle_label][google.cloud.optimization.v1.ShipmentRoute.vehicle_label] in the injected solution; - * * [SkippedShipment.label][google.cloud.optimization.v1.SkippedShipment.label] and [ShipmentRoute.Visit.shipment_label][google.cloud.optimization.v1.ShipmentRoute.Visit.shipment_label] in - * the injected solution (except pickup/delivery visit pairs, whose - * `shipment_label` must appear twice). - * If a `vehicle_label` in the injected solution does not correspond to a - * request vehicle, the corresponding route is removed from the solution - * along with its visits. If a `shipment_label` in the injected solution does - * not correspond to a request shipment, the corresponding visit is removed - * from the solution. If a - * [SkippedShipment.label][google.cloud.optimization.v1.SkippedShipment.label] - * in the injected solution does not correspond to a request shipment, the - * `SkippedShipment` is removed from the solution. - * Removing route visits or entire routes from an injected solution may - * have an effect on the implied constraints, which may lead to change in - * solution, validation errors, or infeasibility. - * NOTE: The caller must ensure that each - * [Vehicle.label][google.cloud.optimization.v1.Vehicle.label] (resp. - * [Shipment.label][google.cloud.optimization.v1.Shipment.label]) uniquely - * identifies a vehicle (resp. shipment) entity used across the two relevant - * requests: the past request that produced the `OptimizeToursResponse` used - * in the injected solution and the current request that includes the injected - * solution. The uniqueness checks described above are not enough to guarantee - * this requirement. - * - * Generated from protobuf field bool interpret_injected_solutions_using_labels = 10; - */ - protected $interpret_injected_solutions_using_labels = false; - /** - * Consider traffic estimation in calculating `ShipmentRoute` fields - * [Transition.travel_duration][google.cloud.optimization.v1.ShipmentRoute.Transition.travel_duration], - * [Visit.start_time][google.cloud.optimization.v1.ShipmentRoute.Visit.start_time], - * and `vehicle_end_time`; in setting the - * [ShipmentRoute.has_traffic_infeasibilities][google.cloud.optimization.v1.ShipmentRoute.has_traffic_infeasibilities] - * field, and in calculating the - * [OptimizeToursResponse.total_cost][google.cloud.optimization.v1.OptimizeToursResponse.total_cost] - * field. - * - * Generated from protobuf field bool consider_road_traffic = 11; - */ - protected $consider_road_traffic = false; - /** - * If true, polylines will be populated in response `ShipmentRoute`s. - * - * Generated from protobuf field bool populate_polylines = 12; - */ - protected $populate_polylines = false; - /** - * If true, polylines will be populated in response - * [ShipmentRoute.transitions][google.cloud.optimization.v1.ShipmentRoute.transitions]. - * Note that in this case, the polylines will also be populated in the - * deprecated `travel_steps`. - * - * Generated from protobuf field bool populate_transition_polylines = 13; - */ - protected $populate_transition_polylines = false; - /** - * If this is set, then the request can have a deadline - * (see https://grpc.io/blog/deadlines) of up to 60 minutes. - * Otherwise, the maximum deadline is only 30 minutes. - * Note that long-lived requests have a significantly larger (but still small) - * risk of interruption. - * - * Generated from protobuf field bool allow_large_deadline_despite_interruption_risk = 14; - */ - protected $allow_large_deadline_despite_interruption_risk = false; - /** - * If true, travel distances will be computed using geodesic distances instead - * of Google Maps distances, and travel times will be computed using geodesic - * distances with a speed defined by `geodesic_meters_per_second`. - * - * Generated from protobuf field bool use_geodesic_distances = 15; - */ - protected $use_geodesic_distances = false; - /** - * When `use_geodesic_distances` is true, this field must be set and defines - * the speed applied to compute travel times. Its value must be at least 1.0 - * meters/seconds. - * - * Generated from protobuf field optional double geodesic_meters_per_second = 16; - */ - protected $geodesic_meters_per_second = null; - /** - * Truncates the number of validation errors returned. These errors are - * typically attached to an INVALID_ARGUMENT error payload as a BadRequest - * error detail (https://cloud.google.com/apis/design/errors#error_details), - * unless solving_mode=VALIDATE_ONLY: see the - * [OptimizeToursResponse.validation_errors][google.cloud.optimization.v1.OptimizeToursResponse.validation_errors] - * field. - * This defaults to 100 and is capped at 10,000. - * - * Generated from protobuf field optional int32 max_validation_errors = 5; - */ - protected $max_validation_errors = null; - /** - * Label that may be used to identify this request, reported back in the - * [OptimizeToursResponse.request_label][google.cloud.optimization.v1.OptimizeToursResponse.request_label]. - * - * Generated from protobuf field string label = 17; - */ - protected $label = ''; - /** - * Deprecated: Use - * [OptimizeToursRequest.populate_transition_polylines][google.cloud.optimization.v1.OptimizeToursRequest.populate_transition_polylines] - * instead. If true, polylines will be populated in response - * [ShipmentRoute.transitions][google.cloud.optimization.v1.ShipmentRoute.transitions]. - * Note that in this case, the polylines will also be populated in the - * deprecated `travel_steps`. - * - * Generated from protobuf field bool populate_travel_step_polylines = 20 [deprecated = true]; - * @deprecated - */ - protected $populate_travel_step_polylines = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Target project and location to make a call. - * Format: `projects/{project-id}/locations/{location-id}`. - * If no location is specified, a region will be chosen automatically. - * @type \Google\Protobuf\Duration $timeout - * If this timeout is set, the server returns a response before the timeout - * period has elapsed or the server deadline for synchronous requests is - * reached, whichever is sooner. - * For asynchronous requests, the server will generate a solution (if - * possible) before the timeout has elapsed. - * @type \Google\Cloud\Optimization\V1\ShipmentModel $model - * Shipment model to solve. - * @type int $solving_mode - * By default, the solving mode is `DEFAULT_SOLVE` (0). - * @type int $search_mode - * Search mode used to solve the request. - * @type array<\Google\Cloud\Optimization\V1\ShipmentRoute>|\Google\Protobuf\Internal\RepeatedField $injected_first_solution_routes - * Guide the optimization algorithm in finding a first solution that is - * similar to a previous solution. - * The model is constrained when the first solution is built. - * Any shipments not performed on a route are implicitly skipped in the first - * solution, but they may be performed in successive solutions. - * The solution must satisfy some basic validity assumptions: - * * for all routes, `vehicle_index` must be in range and not be duplicated. - * * for all visits, `shipment_index` and `visit_request_index` must be - * in range. - * * a shipment may only be referenced on one route. - * * the pickup of a pickup-delivery shipment must be performed before - * the delivery. - * * no more than one pickup alternative or delivery alternative of - * a shipment may be performed. - * * for all routes, times are increasing (i.e., `vehicle_start_time - * <= visits[0].start_time <= visits[1].start_time ... - * <= vehicle_end_time`). - * * a shipment may only be performed on a vehicle that is allowed. A - * vehicle is allowed if - * [Shipment.allowed_vehicle_indices][google.cloud.optimization.v1.Shipment.allowed_vehicle_indices] - * is empty or its `vehicle_index` is included in - * [Shipment.allowed_vehicle_indices][google.cloud.optimization.v1.Shipment.allowed_vehicle_indices]. - * If the injected solution is not feasible, a validation error is not - * necessarily returned and an error indicating infeasibility may be returned - * instead. - * @type \Google\Cloud\Optimization\V1\InjectedSolutionConstraint $injected_solution_constraint - * Constrain the optimization algorithm to find a final solution that is - * similar to a previous solution. For example, this may be used to freeze - * portions of routes which have already been completed or which are to be - * completed but must not be modified. - * If the injected solution is not feasible, a validation error is not - * necessarily returned and an error indicating infeasibility may be returned - * instead. - * @type array<\Google\Cloud\Optimization\V1\ShipmentRoute>|\Google\Protobuf\Internal\RepeatedField $refresh_details_routes - * If non-empty, the given routes will be refreshed, without modifying their - * underlying sequence of visits or travel times: only other details will be - * updated. This does not solve the model. - * As of 2020/11, this only populates the polylines of non-empty routes and - * requires that `populate_polylines` is true. - * The `route_polyline` fields of the passed-in routes may be inconsistent - * with route `transitions`. - * This field must not be used together with `injected_first_solution_routes` - * or `injected_solution_constraint`. - * `Shipment.ignore` and `Vehicle.ignore` have no effect on the behavior. - * Polylines are still populated between all visits in all non-empty routes - * regardless of whether the related shipments or vehicles are ignored. - * @type bool $interpret_injected_solutions_using_labels - * If true: - * * uses - * [ShipmentRoute.vehicle_label][google.cloud.optimization.v1.ShipmentRoute.vehicle_label] - * instead of `vehicle_index` to - * match routes in an injected solution with vehicles in the request; - * reuses the mapping of original - * [ShipmentRoute.vehicle_index][google.cloud.optimization.v1.ShipmentRoute.vehicle_index] - * to new - * [ShipmentRoute.vehicle_index][google.cloud.optimization.v1.ShipmentRoute.vehicle_index] - * to update - * [ConstraintRelaxation.vehicle_indices][google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.vehicle_indices] - * if non-empty, but the mapping must be unambiguous (i.e., multiple - * `ShipmentRoute`s must not share the same original `vehicle_index`). - * * uses - * [ShipmentRoute.Visit.shipment_label][google.cloud.optimization.v1.ShipmentRoute.Visit.shipment_label] - * instead of `shipment_index` - * to match visits in an injected solution with shipments in the request; - * * uses - * [SkippedShipment.label][google.cloud.optimization.v1.SkippedShipment.label] - * instead of - * [SkippedShipment.index][google.cloud.optimization.v1.SkippedShipment.index] - * to - * match skipped shipments in the injected solution with request - * shipments. - * This interpretation applies to the `injected_first_solution_routes`, - * `injected_solution_constraint`, and `refresh_details_routes` fields. - * It can be used when shipment or vehicle indices in the request have - * changed since the solution was created, perhaps because shipments or - * vehicles have been removed from or added to the request. - * If true, labels in the following categories must appear at most once in - * their category: - * * [Vehicle.label][google.cloud.optimization.v1.Vehicle.label] in the - * request; - * * [Shipment.label][google.cloud.optimization.v1.Shipment.label] in the - * request; - * * [ShipmentRoute.vehicle_label][google.cloud.optimization.v1.ShipmentRoute.vehicle_label] in the injected solution; - * * [SkippedShipment.label][google.cloud.optimization.v1.SkippedShipment.label] and [ShipmentRoute.Visit.shipment_label][google.cloud.optimization.v1.ShipmentRoute.Visit.shipment_label] in - * the injected solution (except pickup/delivery visit pairs, whose - * `shipment_label` must appear twice). - * If a `vehicle_label` in the injected solution does not correspond to a - * request vehicle, the corresponding route is removed from the solution - * along with its visits. If a `shipment_label` in the injected solution does - * not correspond to a request shipment, the corresponding visit is removed - * from the solution. If a - * [SkippedShipment.label][google.cloud.optimization.v1.SkippedShipment.label] - * in the injected solution does not correspond to a request shipment, the - * `SkippedShipment` is removed from the solution. - * Removing route visits or entire routes from an injected solution may - * have an effect on the implied constraints, which may lead to change in - * solution, validation errors, or infeasibility. - * NOTE: The caller must ensure that each - * [Vehicle.label][google.cloud.optimization.v1.Vehicle.label] (resp. - * [Shipment.label][google.cloud.optimization.v1.Shipment.label]) uniquely - * identifies a vehicle (resp. shipment) entity used across the two relevant - * requests: the past request that produced the `OptimizeToursResponse` used - * in the injected solution and the current request that includes the injected - * solution. The uniqueness checks described above are not enough to guarantee - * this requirement. - * @type bool $consider_road_traffic - * Consider traffic estimation in calculating `ShipmentRoute` fields - * [Transition.travel_duration][google.cloud.optimization.v1.ShipmentRoute.Transition.travel_duration], - * [Visit.start_time][google.cloud.optimization.v1.ShipmentRoute.Visit.start_time], - * and `vehicle_end_time`; in setting the - * [ShipmentRoute.has_traffic_infeasibilities][google.cloud.optimization.v1.ShipmentRoute.has_traffic_infeasibilities] - * field, and in calculating the - * [OptimizeToursResponse.total_cost][google.cloud.optimization.v1.OptimizeToursResponse.total_cost] - * field. - * @type bool $populate_polylines - * If true, polylines will be populated in response `ShipmentRoute`s. - * @type bool $populate_transition_polylines - * If true, polylines will be populated in response - * [ShipmentRoute.transitions][google.cloud.optimization.v1.ShipmentRoute.transitions]. - * Note that in this case, the polylines will also be populated in the - * deprecated `travel_steps`. - * @type bool $allow_large_deadline_despite_interruption_risk - * If this is set, then the request can have a deadline - * (see https://grpc.io/blog/deadlines) of up to 60 minutes. - * Otherwise, the maximum deadline is only 30 minutes. - * Note that long-lived requests have a significantly larger (but still small) - * risk of interruption. - * @type bool $use_geodesic_distances - * If true, travel distances will be computed using geodesic distances instead - * of Google Maps distances, and travel times will be computed using geodesic - * distances with a speed defined by `geodesic_meters_per_second`. - * @type float $geodesic_meters_per_second - * When `use_geodesic_distances` is true, this field must be set and defines - * the speed applied to compute travel times. Its value must be at least 1.0 - * meters/seconds. - * @type int $max_validation_errors - * Truncates the number of validation errors returned. These errors are - * typically attached to an INVALID_ARGUMENT error payload as a BadRequest - * error detail (https://cloud.google.com/apis/design/errors#error_details), - * unless solving_mode=VALIDATE_ONLY: see the - * [OptimizeToursResponse.validation_errors][google.cloud.optimization.v1.OptimizeToursResponse.validation_errors] - * field. - * This defaults to 100 and is capped at 10,000. - * @type string $label - * Label that may be used to identify this request, reported back in the - * [OptimizeToursResponse.request_label][google.cloud.optimization.v1.OptimizeToursResponse.request_label]. - * @type bool $populate_travel_step_polylines - * Deprecated: Use - * [OptimizeToursRequest.populate_transition_polylines][google.cloud.optimization.v1.OptimizeToursRequest.populate_transition_polylines] - * instead. If true, polylines will be populated in response - * [ShipmentRoute.transitions][google.cloud.optimization.v1.ShipmentRoute.transitions]. - * Note that in this case, the polylines will also be populated in the - * deprecated `travel_steps`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); - parent::__construct($data); - } - - /** - * Required. Target project and location to make a call. - * Format: `projects/{project-id}/locations/{location-id}`. - * If no location is specified, a region will be chosen automatically. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Target project and location to make a call. - * Format: `projects/{project-id}/locations/{location-id}`. - * If no location is specified, a region will be chosen automatically. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * If this timeout is set, the server returns a response before the timeout - * period has elapsed or the server deadline for synchronous requests is - * reached, whichever is sooner. - * For asynchronous requests, the server will generate a solution (if - * possible) before the timeout has elapsed. - * - * Generated from protobuf field .google.protobuf.Duration timeout = 2; - * @return \Google\Protobuf\Duration|null - */ - public function getTimeout() - { - return $this->timeout; - } - - public function hasTimeout() - { - return isset($this->timeout); - } - - public function clearTimeout() - { - unset($this->timeout); - } - - /** - * If this timeout is set, the server returns a response before the timeout - * period has elapsed or the server deadline for synchronous requests is - * reached, whichever is sooner. - * For asynchronous requests, the server will generate a solution (if - * possible) before the timeout has elapsed. - * - * Generated from protobuf field .google.protobuf.Duration timeout = 2; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setTimeout($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->timeout = $var; - - return $this; - } - - /** - * Shipment model to solve. - * - * Generated from protobuf field .google.cloud.optimization.v1.ShipmentModel model = 3; - * @return \Google\Cloud\Optimization\V1\ShipmentModel|null - */ - public function getModel() - { - return $this->model; - } - - public function hasModel() - { - return isset($this->model); - } - - public function clearModel() - { - unset($this->model); - } - - /** - * Shipment model to solve. - * - * Generated from protobuf field .google.cloud.optimization.v1.ShipmentModel model = 3; - * @param \Google\Cloud\Optimization\V1\ShipmentModel $var - * @return $this - */ - public function setModel($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Optimization\V1\ShipmentModel::class); - $this->model = $var; - - return $this; - } - - /** - * By default, the solving mode is `DEFAULT_SOLVE` (0). - * - * Generated from protobuf field .google.cloud.optimization.v1.OptimizeToursRequest.SolvingMode solving_mode = 4; - * @return int - */ - public function getSolvingMode() - { - return $this->solving_mode; - } - - /** - * By default, the solving mode is `DEFAULT_SOLVE` (0). - * - * Generated from protobuf field .google.cloud.optimization.v1.OptimizeToursRequest.SolvingMode solving_mode = 4; - * @param int $var - * @return $this - */ - public function setSolvingMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Optimization\V1\OptimizeToursRequest\SolvingMode::class); - $this->solving_mode = $var; - - return $this; - } - - /** - * Search mode used to solve the request. - * - * Generated from protobuf field .google.cloud.optimization.v1.OptimizeToursRequest.SearchMode search_mode = 6; - * @return int - */ - public function getSearchMode() - { - return $this->search_mode; - } - - /** - * Search mode used to solve the request. - * - * Generated from protobuf field .google.cloud.optimization.v1.OptimizeToursRequest.SearchMode search_mode = 6; - * @param int $var - * @return $this - */ - public function setSearchMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Optimization\V1\OptimizeToursRequest\SearchMode::class); - $this->search_mode = $var; - - return $this; - } - - /** - * Guide the optimization algorithm in finding a first solution that is - * similar to a previous solution. - * The model is constrained when the first solution is built. - * Any shipments not performed on a route are implicitly skipped in the first - * solution, but they may be performed in successive solutions. - * The solution must satisfy some basic validity assumptions: - * * for all routes, `vehicle_index` must be in range and not be duplicated. - * * for all visits, `shipment_index` and `visit_request_index` must be - * in range. - * * a shipment may only be referenced on one route. - * * the pickup of a pickup-delivery shipment must be performed before - * the delivery. - * * no more than one pickup alternative or delivery alternative of - * a shipment may be performed. - * * for all routes, times are increasing (i.e., `vehicle_start_time - * <= visits[0].start_time <= visits[1].start_time ... - * <= vehicle_end_time`). - * * a shipment may only be performed on a vehicle that is allowed. A - * vehicle is allowed if - * [Shipment.allowed_vehicle_indices][google.cloud.optimization.v1.Shipment.allowed_vehicle_indices] - * is empty or its `vehicle_index` is included in - * [Shipment.allowed_vehicle_indices][google.cloud.optimization.v1.Shipment.allowed_vehicle_indices]. - * If the injected solution is not feasible, a validation error is not - * necessarily returned and an error indicating infeasibility may be returned - * instead. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.ShipmentRoute injected_first_solution_routes = 7; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getInjectedFirstSolutionRoutes() - { - return $this->injected_first_solution_routes; - } - - /** - * Guide the optimization algorithm in finding a first solution that is - * similar to a previous solution. - * The model is constrained when the first solution is built. - * Any shipments not performed on a route are implicitly skipped in the first - * solution, but they may be performed in successive solutions. - * The solution must satisfy some basic validity assumptions: - * * for all routes, `vehicle_index` must be in range and not be duplicated. - * * for all visits, `shipment_index` and `visit_request_index` must be - * in range. - * * a shipment may only be referenced on one route. - * * the pickup of a pickup-delivery shipment must be performed before - * the delivery. - * * no more than one pickup alternative or delivery alternative of - * a shipment may be performed. - * * for all routes, times are increasing (i.e., `vehicle_start_time - * <= visits[0].start_time <= visits[1].start_time ... - * <= vehicle_end_time`). - * * a shipment may only be performed on a vehicle that is allowed. A - * vehicle is allowed if - * [Shipment.allowed_vehicle_indices][google.cloud.optimization.v1.Shipment.allowed_vehicle_indices] - * is empty or its `vehicle_index` is included in - * [Shipment.allowed_vehicle_indices][google.cloud.optimization.v1.Shipment.allowed_vehicle_indices]. - * If the injected solution is not feasible, a validation error is not - * necessarily returned and an error indicating infeasibility may be returned - * instead. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.ShipmentRoute injected_first_solution_routes = 7; - * @param array<\Google\Cloud\Optimization\V1\ShipmentRoute>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setInjectedFirstSolutionRoutes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\ShipmentRoute::class); - $this->injected_first_solution_routes = $arr; - - return $this; - } - - /** - * Constrain the optimization algorithm to find a final solution that is - * similar to a previous solution. For example, this may be used to freeze - * portions of routes which have already been completed or which are to be - * completed but must not be modified. - * If the injected solution is not feasible, a validation error is not - * necessarily returned and an error indicating infeasibility may be returned - * instead. - * - * Generated from protobuf field .google.cloud.optimization.v1.InjectedSolutionConstraint injected_solution_constraint = 8; - * @return \Google\Cloud\Optimization\V1\InjectedSolutionConstraint|null - */ - public function getInjectedSolutionConstraint() - { - return $this->injected_solution_constraint; - } - - public function hasInjectedSolutionConstraint() - { - return isset($this->injected_solution_constraint); - } - - public function clearInjectedSolutionConstraint() - { - unset($this->injected_solution_constraint); - } - - /** - * Constrain the optimization algorithm to find a final solution that is - * similar to a previous solution. For example, this may be used to freeze - * portions of routes which have already been completed or which are to be - * completed but must not be modified. - * If the injected solution is not feasible, a validation error is not - * necessarily returned and an error indicating infeasibility may be returned - * instead. - * - * Generated from protobuf field .google.cloud.optimization.v1.InjectedSolutionConstraint injected_solution_constraint = 8; - * @param \Google\Cloud\Optimization\V1\InjectedSolutionConstraint $var - * @return $this - */ - public function setInjectedSolutionConstraint($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Optimization\V1\InjectedSolutionConstraint::class); - $this->injected_solution_constraint = $var; - - return $this; - } - - /** - * If non-empty, the given routes will be refreshed, without modifying their - * underlying sequence of visits or travel times: only other details will be - * updated. This does not solve the model. - * As of 2020/11, this only populates the polylines of non-empty routes and - * requires that `populate_polylines` is true. - * The `route_polyline` fields of the passed-in routes may be inconsistent - * with route `transitions`. - * This field must not be used together with `injected_first_solution_routes` - * or `injected_solution_constraint`. - * `Shipment.ignore` and `Vehicle.ignore` have no effect on the behavior. - * Polylines are still populated between all visits in all non-empty routes - * regardless of whether the related shipments or vehicles are ignored. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.ShipmentRoute refresh_details_routes = 9; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRefreshDetailsRoutes() - { - return $this->refresh_details_routes; - } - - /** - * If non-empty, the given routes will be refreshed, without modifying their - * underlying sequence of visits or travel times: only other details will be - * updated. This does not solve the model. - * As of 2020/11, this only populates the polylines of non-empty routes and - * requires that `populate_polylines` is true. - * The `route_polyline` fields of the passed-in routes may be inconsistent - * with route `transitions`. - * This field must not be used together with `injected_first_solution_routes` - * or `injected_solution_constraint`. - * `Shipment.ignore` and `Vehicle.ignore` have no effect on the behavior. - * Polylines are still populated between all visits in all non-empty routes - * regardless of whether the related shipments or vehicles are ignored. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.ShipmentRoute refresh_details_routes = 9; - * @param array<\Google\Cloud\Optimization\V1\ShipmentRoute>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRefreshDetailsRoutes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\ShipmentRoute::class); - $this->refresh_details_routes = $arr; - - return $this; - } - - /** - * If true: - * * uses - * [ShipmentRoute.vehicle_label][google.cloud.optimization.v1.ShipmentRoute.vehicle_label] - * instead of `vehicle_index` to - * match routes in an injected solution with vehicles in the request; - * reuses the mapping of original - * [ShipmentRoute.vehicle_index][google.cloud.optimization.v1.ShipmentRoute.vehicle_index] - * to new - * [ShipmentRoute.vehicle_index][google.cloud.optimization.v1.ShipmentRoute.vehicle_index] - * to update - * [ConstraintRelaxation.vehicle_indices][google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.vehicle_indices] - * if non-empty, but the mapping must be unambiguous (i.e., multiple - * `ShipmentRoute`s must not share the same original `vehicle_index`). - * * uses - * [ShipmentRoute.Visit.shipment_label][google.cloud.optimization.v1.ShipmentRoute.Visit.shipment_label] - * instead of `shipment_index` - * to match visits in an injected solution with shipments in the request; - * * uses - * [SkippedShipment.label][google.cloud.optimization.v1.SkippedShipment.label] - * instead of - * [SkippedShipment.index][google.cloud.optimization.v1.SkippedShipment.index] - * to - * match skipped shipments in the injected solution with request - * shipments. - * This interpretation applies to the `injected_first_solution_routes`, - * `injected_solution_constraint`, and `refresh_details_routes` fields. - * It can be used when shipment or vehicle indices in the request have - * changed since the solution was created, perhaps because shipments or - * vehicles have been removed from or added to the request. - * If true, labels in the following categories must appear at most once in - * their category: - * * [Vehicle.label][google.cloud.optimization.v1.Vehicle.label] in the - * request; - * * [Shipment.label][google.cloud.optimization.v1.Shipment.label] in the - * request; - * * [ShipmentRoute.vehicle_label][google.cloud.optimization.v1.ShipmentRoute.vehicle_label] in the injected solution; - * * [SkippedShipment.label][google.cloud.optimization.v1.SkippedShipment.label] and [ShipmentRoute.Visit.shipment_label][google.cloud.optimization.v1.ShipmentRoute.Visit.shipment_label] in - * the injected solution (except pickup/delivery visit pairs, whose - * `shipment_label` must appear twice). - * If a `vehicle_label` in the injected solution does not correspond to a - * request vehicle, the corresponding route is removed from the solution - * along with its visits. If a `shipment_label` in the injected solution does - * not correspond to a request shipment, the corresponding visit is removed - * from the solution. If a - * [SkippedShipment.label][google.cloud.optimization.v1.SkippedShipment.label] - * in the injected solution does not correspond to a request shipment, the - * `SkippedShipment` is removed from the solution. - * Removing route visits or entire routes from an injected solution may - * have an effect on the implied constraints, which may lead to change in - * solution, validation errors, or infeasibility. - * NOTE: The caller must ensure that each - * [Vehicle.label][google.cloud.optimization.v1.Vehicle.label] (resp. - * [Shipment.label][google.cloud.optimization.v1.Shipment.label]) uniquely - * identifies a vehicle (resp. shipment) entity used across the two relevant - * requests: the past request that produced the `OptimizeToursResponse` used - * in the injected solution and the current request that includes the injected - * solution. The uniqueness checks described above are not enough to guarantee - * this requirement. - * - * Generated from protobuf field bool interpret_injected_solutions_using_labels = 10; - * @return bool - */ - public function getInterpretInjectedSolutionsUsingLabels() - { - return $this->interpret_injected_solutions_using_labels; - } - - /** - * If true: - * * uses - * [ShipmentRoute.vehicle_label][google.cloud.optimization.v1.ShipmentRoute.vehicle_label] - * instead of `vehicle_index` to - * match routes in an injected solution with vehicles in the request; - * reuses the mapping of original - * [ShipmentRoute.vehicle_index][google.cloud.optimization.v1.ShipmentRoute.vehicle_index] - * to new - * [ShipmentRoute.vehicle_index][google.cloud.optimization.v1.ShipmentRoute.vehicle_index] - * to update - * [ConstraintRelaxation.vehicle_indices][google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.vehicle_indices] - * if non-empty, but the mapping must be unambiguous (i.e., multiple - * `ShipmentRoute`s must not share the same original `vehicle_index`). - * * uses - * [ShipmentRoute.Visit.shipment_label][google.cloud.optimization.v1.ShipmentRoute.Visit.shipment_label] - * instead of `shipment_index` - * to match visits in an injected solution with shipments in the request; - * * uses - * [SkippedShipment.label][google.cloud.optimization.v1.SkippedShipment.label] - * instead of - * [SkippedShipment.index][google.cloud.optimization.v1.SkippedShipment.index] - * to - * match skipped shipments in the injected solution with request - * shipments. - * This interpretation applies to the `injected_first_solution_routes`, - * `injected_solution_constraint`, and `refresh_details_routes` fields. - * It can be used when shipment or vehicle indices in the request have - * changed since the solution was created, perhaps because shipments or - * vehicles have been removed from or added to the request. - * If true, labels in the following categories must appear at most once in - * their category: - * * [Vehicle.label][google.cloud.optimization.v1.Vehicle.label] in the - * request; - * * [Shipment.label][google.cloud.optimization.v1.Shipment.label] in the - * request; - * * [ShipmentRoute.vehicle_label][google.cloud.optimization.v1.ShipmentRoute.vehicle_label] in the injected solution; - * * [SkippedShipment.label][google.cloud.optimization.v1.SkippedShipment.label] and [ShipmentRoute.Visit.shipment_label][google.cloud.optimization.v1.ShipmentRoute.Visit.shipment_label] in - * the injected solution (except pickup/delivery visit pairs, whose - * `shipment_label` must appear twice). - * If a `vehicle_label` in the injected solution does not correspond to a - * request vehicle, the corresponding route is removed from the solution - * along with its visits. If a `shipment_label` in the injected solution does - * not correspond to a request shipment, the corresponding visit is removed - * from the solution. If a - * [SkippedShipment.label][google.cloud.optimization.v1.SkippedShipment.label] - * in the injected solution does not correspond to a request shipment, the - * `SkippedShipment` is removed from the solution. - * Removing route visits or entire routes from an injected solution may - * have an effect on the implied constraints, which may lead to change in - * solution, validation errors, or infeasibility. - * NOTE: The caller must ensure that each - * [Vehicle.label][google.cloud.optimization.v1.Vehicle.label] (resp. - * [Shipment.label][google.cloud.optimization.v1.Shipment.label]) uniquely - * identifies a vehicle (resp. shipment) entity used across the two relevant - * requests: the past request that produced the `OptimizeToursResponse` used - * in the injected solution and the current request that includes the injected - * solution. The uniqueness checks described above are not enough to guarantee - * this requirement. - * - * Generated from protobuf field bool interpret_injected_solutions_using_labels = 10; - * @param bool $var - * @return $this - */ - public function setInterpretInjectedSolutionsUsingLabels($var) - { - GPBUtil::checkBool($var); - $this->interpret_injected_solutions_using_labels = $var; - - return $this; - } - - /** - * Consider traffic estimation in calculating `ShipmentRoute` fields - * [Transition.travel_duration][google.cloud.optimization.v1.ShipmentRoute.Transition.travel_duration], - * [Visit.start_time][google.cloud.optimization.v1.ShipmentRoute.Visit.start_time], - * and `vehicle_end_time`; in setting the - * [ShipmentRoute.has_traffic_infeasibilities][google.cloud.optimization.v1.ShipmentRoute.has_traffic_infeasibilities] - * field, and in calculating the - * [OptimizeToursResponse.total_cost][google.cloud.optimization.v1.OptimizeToursResponse.total_cost] - * field. - * - * Generated from protobuf field bool consider_road_traffic = 11; - * @return bool - */ - public function getConsiderRoadTraffic() - { - return $this->consider_road_traffic; - } - - /** - * Consider traffic estimation in calculating `ShipmentRoute` fields - * [Transition.travel_duration][google.cloud.optimization.v1.ShipmentRoute.Transition.travel_duration], - * [Visit.start_time][google.cloud.optimization.v1.ShipmentRoute.Visit.start_time], - * and `vehicle_end_time`; in setting the - * [ShipmentRoute.has_traffic_infeasibilities][google.cloud.optimization.v1.ShipmentRoute.has_traffic_infeasibilities] - * field, and in calculating the - * [OptimizeToursResponse.total_cost][google.cloud.optimization.v1.OptimizeToursResponse.total_cost] - * field. - * - * Generated from protobuf field bool consider_road_traffic = 11; - * @param bool $var - * @return $this - */ - public function setConsiderRoadTraffic($var) - { - GPBUtil::checkBool($var); - $this->consider_road_traffic = $var; - - return $this; - } - - /** - * If true, polylines will be populated in response `ShipmentRoute`s. - * - * Generated from protobuf field bool populate_polylines = 12; - * @return bool - */ - public function getPopulatePolylines() - { - return $this->populate_polylines; - } - - /** - * If true, polylines will be populated in response `ShipmentRoute`s. - * - * Generated from protobuf field bool populate_polylines = 12; - * @param bool $var - * @return $this - */ - public function setPopulatePolylines($var) - { - GPBUtil::checkBool($var); - $this->populate_polylines = $var; - - return $this; - } - - /** - * If true, polylines will be populated in response - * [ShipmentRoute.transitions][google.cloud.optimization.v1.ShipmentRoute.transitions]. - * Note that in this case, the polylines will also be populated in the - * deprecated `travel_steps`. - * - * Generated from protobuf field bool populate_transition_polylines = 13; - * @return bool - */ - public function getPopulateTransitionPolylines() - { - return $this->populate_transition_polylines; - } - - /** - * If true, polylines will be populated in response - * [ShipmentRoute.transitions][google.cloud.optimization.v1.ShipmentRoute.transitions]. - * Note that in this case, the polylines will also be populated in the - * deprecated `travel_steps`. - * - * Generated from protobuf field bool populate_transition_polylines = 13; - * @param bool $var - * @return $this - */ - public function setPopulateTransitionPolylines($var) - { - GPBUtil::checkBool($var); - $this->populate_transition_polylines = $var; - - return $this; - } - - /** - * If this is set, then the request can have a deadline - * (see https://grpc.io/blog/deadlines) of up to 60 minutes. - * Otherwise, the maximum deadline is only 30 minutes. - * Note that long-lived requests have a significantly larger (but still small) - * risk of interruption. - * - * Generated from protobuf field bool allow_large_deadline_despite_interruption_risk = 14; - * @return bool - */ - public function getAllowLargeDeadlineDespiteInterruptionRisk() - { - return $this->allow_large_deadline_despite_interruption_risk; - } - - /** - * If this is set, then the request can have a deadline - * (see https://grpc.io/blog/deadlines) of up to 60 minutes. - * Otherwise, the maximum deadline is only 30 minutes. - * Note that long-lived requests have a significantly larger (but still small) - * risk of interruption. - * - * Generated from protobuf field bool allow_large_deadline_despite_interruption_risk = 14; - * @param bool $var - * @return $this - */ - public function setAllowLargeDeadlineDespiteInterruptionRisk($var) - { - GPBUtil::checkBool($var); - $this->allow_large_deadline_despite_interruption_risk = $var; - - return $this; - } - - /** - * If true, travel distances will be computed using geodesic distances instead - * of Google Maps distances, and travel times will be computed using geodesic - * distances with a speed defined by `geodesic_meters_per_second`. - * - * Generated from protobuf field bool use_geodesic_distances = 15; - * @return bool - */ - public function getUseGeodesicDistances() - { - return $this->use_geodesic_distances; - } - - /** - * If true, travel distances will be computed using geodesic distances instead - * of Google Maps distances, and travel times will be computed using geodesic - * distances with a speed defined by `geodesic_meters_per_second`. - * - * Generated from protobuf field bool use_geodesic_distances = 15; - * @param bool $var - * @return $this - */ - public function setUseGeodesicDistances($var) - { - GPBUtil::checkBool($var); - $this->use_geodesic_distances = $var; - - return $this; - } - - /** - * When `use_geodesic_distances` is true, this field must be set and defines - * the speed applied to compute travel times. Its value must be at least 1.0 - * meters/seconds. - * - * Generated from protobuf field optional double geodesic_meters_per_second = 16; - * @return float - */ - public function getGeodesicMetersPerSecond() - { - return isset($this->geodesic_meters_per_second) ? $this->geodesic_meters_per_second : 0.0; - } - - public function hasGeodesicMetersPerSecond() - { - return isset($this->geodesic_meters_per_second); - } - - public function clearGeodesicMetersPerSecond() - { - unset($this->geodesic_meters_per_second); - } - - /** - * When `use_geodesic_distances` is true, this field must be set and defines - * the speed applied to compute travel times. Its value must be at least 1.0 - * meters/seconds. - * - * Generated from protobuf field optional double geodesic_meters_per_second = 16; - * @param float $var - * @return $this - */ - public function setGeodesicMetersPerSecond($var) - { - GPBUtil::checkDouble($var); - $this->geodesic_meters_per_second = $var; - - return $this; - } - - /** - * Truncates the number of validation errors returned. These errors are - * typically attached to an INVALID_ARGUMENT error payload as a BadRequest - * error detail (https://cloud.google.com/apis/design/errors#error_details), - * unless solving_mode=VALIDATE_ONLY: see the - * [OptimizeToursResponse.validation_errors][google.cloud.optimization.v1.OptimizeToursResponse.validation_errors] - * field. - * This defaults to 100 and is capped at 10,000. - * - * Generated from protobuf field optional int32 max_validation_errors = 5; - * @return int - */ - public function getMaxValidationErrors() - { - return isset($this->max_validation_errors) ? $this->max_validation_errors : 0; - } - - public function hasMaxValidationErrors() - { - return isset($this->max_validation_errors); - } - - public function clearMaxValidationErrors() - { - unset($this->max_validation_errors); - } - - /** - * Truncates the number of validation errors returned. These errors are - * typically attached to an INVALID_ARGUMENT error payload as a BadRequest - * error detail (https://cloud.google.com/apis/design/errors#error_details), - * unless solving_mode=VALIDATE_ONLY: see the - * [OptimizeToursResponse.validation_errors][google.cloud.optimization.v1.OptimizeToursResponse.validation_errors] - * field. - * This defaults to 100 and is capped at 10,000. - * - * Generated from protobuf field optional int32 max_validation_errors = 5; - * @param int $var - * @return $this - */ - public function setMaxValidationErrors($var) - { - GPBUtil::checkInt32($var); - $this->max_validation_errors = $var; - - return $this; - } - - /** - * Label that may be used to identify this request, reported back in the - * [OptimizeToursResponse.request_label][google.cloud.optimization.v1.OptimizeToursResponse.request_label]. - * - * Generated from protobuf field string label = 17; - * @return string - */ - public function getLabel() - { - return $this->label; - } - - /** - * Label that may be used to identify this request, reported back in the - * [OptimizeToursResponse.request_label][google.cloud.optimization.v1.OptimizeToursResponse.request_label]. - * - * Generated from protobuf field string label = 17; - * @param string $var - * @return $this - */ - public function setLabel($var) - { - GPBUtil::checkString($var, True); - $this->label = $var; - - return $this; - } - - /** - * Deprecated: Use - * [OptimizeToursRequest.populate_transition_polylines][google.cloud.optimization.v1.OptimizeToursRequest.populate_transition_polylines] - * instead. If true, polylines will be populated in response - * [ShipmentRoute.transitions][google.cloud.optimization.v1.ShipmentRoute.transitions]. - * Note that in this case, the polylines will also be populated in the - * deprecated `travel_steps`. - * - * Generated from protobuf field bool populate_travel_step_polylines = 20 [deprecated = true]; - * @return bool - * @deprecated - */ - public function getPopulateTravelStepPolylines() - { - @trigger_error('populate_travel_step_polylines is deprecated.', E_USER_DEPRECATED); - return $this->populate_travel_step_polylines; - } - - /** - * Deprecated: Use - * [OptimizeToursRequest.populate_transition_polylines][google.cloud.optimization.v1.OptimizeToursRequest.populate_transition_polylines] - * instead. If true, polylines will be populated in response - * [ShipmentRoute.transitions][google.cloud.optimization.v1.ShipmentRoute.transitions]. - * Note that in this case, the polylines will also be populated in the - * deprecated `travel_steps`. - * - * Generated from protobuf field bool populate_travel_step_polylines = 20 [deprecated = true]; - * @param bool $var - * @return $this - * @deprecated - */ - public function setPopulateTravelStepPolylines($var) - { - @trigger_error('populate_travel_step_polylines is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkBool($var); - $this->populate_travel_step_polylines = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/OptimizeToursRequest/SearchMode.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/OptimizeToursRequest/SearchMode.php deleted file mode 100644 index 45c8c781f948..000000000000 --- a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/OptimizeToursRequest/SearchMode.php +++ /dev/null @@ -1,65 +0,0 @@ -google.cloud.optimization.v1.OptimizeToursRequest.SearchMode - */ -class SearchMode -{ - /** - * Unspecified search mode, equivalent to `RETURN_FAST`. - * - * Generated from protobuf enum SEARCH_MODE_UNSPECIFIED = 0; - */ - const SEARCH_MODE_UNSPECIFIED = 0; - /** - * Stop the search after finding the first good solution. - * - * Generated from protobuf enum RETURN_FAST = 1; - */ - const RETURN_FAST = 1; - /** - * Spend all the available time to search for better solutions. - * - * Generated from protobuf enum CONSUME_ALL_AVAILABLE_TIME = 2; - */ - const CONSUME_ALL_AVAILABLE_TIME = 2; - - private static $valueToName = [ - self::SEARCH_MODE_UNSPECIFIED => 'SEARCH_MODE_UNSPECIFIED', - self::RETURN_FAST => 'RETURN_FAST', - self::CONSUME_ALL_AVAILABLE_TIME => 'CONSUME_ALL_AVAILABLE_TIME', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SearchMode::class, \Google\Cloud\Optimization\V1\OptimizeToursRequest_SearchMode::class); - diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/OptimizeToursRequest/SolvingMode.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/OptimizeToursRequest/SolvingMode.php deleted file mode 100644 index 432442abb9eb..000000000000 --- a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/OptimizeToursRequest/SolvingMode.php +++ /dev/null @@ -1,83 +0,0 @@ -google.cloud.optimization.v1.OptimizeToursRequest.SolvingMode - */ -class SolvingMode -{ - /** - * Solve the model. - * - * Generated from protobuf enum DEFAULT_SOLVE = 0; - */ - const DEFAULT_SOLVE = 0; - /** - * Only validates the model without solving it: populates as many - * [OptimizeToursResponse.validation_errors][google.cloud.optimization.v1.OptimizeToursResponse.validation_errors] - * as possible. - * - * Generated from protobuf enum VALIDATE_ONLY = 1; - */ - const VALIDATE_ONLY = 1; - /** - * Only populates - * [OptimizeToursResponse.validation_errors][google.cloud.optimization.v1.OptimizeToursResponse.validation_errors] - * or - * [OptimizeToursResponse.skipped_shipments][google.cloud.optimization.v1.OptimizeToursResponse.skipped_shipments], - * and doesn't actually solve the rest of the request (`status` and `routes` - * are unset in the response). - * If infeasibilities in `injected_solution_constraint` routes are detected - * they are populated in the - * [OptimizeToursResponse.validation_errors][google.cloud.optimization.v1.OptimizeToursResponse.validation_errors] - * field and - * [OptimizeToursResponse.skipped_shipments][google.cloud.optimization.v1.OptimizeToursResponse.skipped_shipments] - * is left empty. - * *IMPORTANT*: not all infeasible shipments are returned here, but only the - * ones that are detected as infeasible during preprocessing. - * - * Generated from protobuf enum DETECT_SOME_INFEASIBLE_SHIPMENTS = 2; - */ - const DETECT_SOME_INFEASIBLE_SHIPMENTS = 2; - - private static $valueToName = [ - self::DEFAULT_SOLVE => 'DEFAULT_SOLVE', - self::VALIDATE_ONLY => 'VALIDATE_ONLY', - self::DETECT_SOME_INFEASIBLE_SHIPMENTS => 'DETECT_SOME_INFEASIBLE_SHIPMENTS', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SolvingMode::class, \Google\Cloud\Optimization\V1\OptimizeToursRequest_SolvingMode::class); - diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/OptimizeToursResponse.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/OptimizeToursResponse.php deleted file mode 100644 index 14b27b295c28..000000000000 --- a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/OptimizeToursResponse.php +++ /dev/null @@ -1,294 +0,0 @@ -google.cloud.optimization.v1.OptimizeToursResponse - */ -class OptimizeToursResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Routes computed for each vehicle; the i-th route corresponds to the i-th - * vehicle in the model. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.ShipmentRoute routes = 1; - */ - private $routes; - /** - * Copy of the - * [OptimizeToursRequest.label][google.cloud.optimization.v1.OptimizeToursRequest.label], - * if a label was specified in the request. - * - * Generated from protobuf field string request_label = 3; - */ - protected $request_label = ''; - /** - * The list of all shipments skipped. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.SkippedShipment skipped_shipments = 4; - */ - private $skipped_shipments; - /** - * List of all the validation errors that we were able to detect - * independently. See the "MULTIPLE ERRORS" explanation for the - * [OptimizeToursValidationError][google.cloud.optimization.v1.OptimizeToursValidationError] - * message. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.OptimizeToursValidationError validation_errors = 5; - */ - private $validation_errors; - /** - * Duration, distance and usage metrics for this solution. - * - * Generated from protobuf field .google.cloud.optimization.v1.OptimizeToursResponse.Metrics metrics = 6; - */ - protected $metrics = null; - /** - * Deprecated: Use - * [Metrics.total_cost][google.cloud.optimization.v1.OptimizeToursResponse.Metrics.total_cost] - * instead. Total cost of the solution. This takes into account all costs: - * costs per per hour and travel hour, fixed vehicle costs, unperformed - * shipment penalty costs, global duration cost, etc. - * - * Generated from protobuf field double total_cost = 2 [deprecated = true]; - * @deprecated - */ - protected $total_cost = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Optimization\V1\ShipmentRoute>|\Google\Protobuf\Internal\RepeatedField $routes - * Routes computed for each vehicle; the i-th route corresponds to the i-th - * vehicle in the model. - * @type string $request_label - * Copy of the - * [OptimizeToursRequest.label][google.cloud.optimization.v1.OptimizeToursRequest.label], - * if a label was specified in the request. - * @type array<\Google\Cloud\Optimization\V1\SkippedShipment>|\Google\Protobuf\Internal\RepeatedField $skipped_shipments - * The list of all shipments skipped. - * @type array<\Google\Cloud\Optimization\V1\OptimizeToursValidationError>|\Google\Protobuf\Internal\RepeatedField $validation_errors - * List of all the validation errors that we were able to detect - * independently. See the "MULTIPLE ERRORS" explanation for the - * [OptimizeToursValidationError][google.cloud.optimization.v1.OptimizeToursValidationError] - * message. - * @type \Google\Cloud\Optimization\V1\OptimizeToursResponse\Metrics $metrics - * Duration, distance and usage metrics for this solution. - * @type float $total_cost - * Deprecated: Use - * [Metrics.total_cost][google.cloud.optimization.v1.OptimizeToursResponse.Metrics.total_cost] - * instead. Total cost of the solution. This takes into account all costs: - * costs per per hour and travel hour, fixed vehicle costs, unperformed - * shipment penalty costs, global duration cost, etc. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); - parent::__construct($data); - } - - /** - * Routes computed for each vehicle; the i-th route corresponds to the i-th - * vehicle in the model. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.ShipmentRoute routes = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRoutes() - { - return $this->routes; - } - - /** - * Routes computed for each vehicle; the i-th route corresponds to the i-th - * vehicle in the model. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.ShipmentRoute routes = 1; - * @param array<\Google\Cloud\Optimization\V1\ShipmentRoute>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRoutes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\ShipmentRoute::class); - $this->routes = $arr; - - return $this; - } - - /** - * Copy of the - * [OptimizeToursRequest.label][google.cloud.optimization.v1.OptimizeToursRequest.label], - * if a label was specified in the request. - * - * Generated from protobuf field string request_label = 3; - * @return string - */ - public function getRequestLabel() - { - return $this->request_label; - } - - /** - * Copy of the - * [OptimizeToursRequest.label][google.cloud.optimization.v1.OptimizeToursRequest.label], - * if a label was specified in the request. - * - * Generated from protobuf field string request_label = 3; - * @param string $var - * @return $this - */ - public function setRequestLabel($var) - { - GPBUtil::checkString($var, True); - $this->request_label = $var; - - return $this; - } - - /** - * The list of all shipments skipped. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.SkippedShipment skipped_shipments = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSkippedShipments() - { - return $this->skipped_shipments; - } - - /** - * The list of all shipments skipped. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.SkippedShipment skipped_shipments = 4; - * @param array<\Google\Cloud\Optimization\V1\SkippedShipment>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSkippedShipments($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\SkippedShipment::class); - $this->skipped_shipments = $arr; - - return $this; - } - - /** - * List of all the validation errors that we were able to detect - * independently. See the "MULTIPLE ERRORS" explanation for the - * [OptimizeToursValidationError][google.cloud.optimization.v1.OptimizeToursValidationError] - * message. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.OptimizeToursValidationError validation_errors = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getValidationErrors() - { - return $this->validation_errors; - } - - /** - * List of all the validation errors that we were able to detect - * independently. See the "MULTIPLE ERRORS" explanation for the - * [OptimizeToursValidationError][google.cloud.optimization.v1.OptimizeToursValidationError] - * message. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.OptimizeToursValidationError validation_errors = 5; - * @param array<\Google\Cloud\Optimization\V1\OptimizeToursValidationError>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setValidationErrors($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\OptimizeToursValidationError::class); - $this->validation_errors = $arr; - - return $this; - } - - /** - * Duration, distance and usage metrics for this solution. - * - * Generated from protobuf field .google.cloud.optimization.v1.OptimizeToursResponse.Metrics metrics = 6; - * @return \Google\Cloud\Optimization\V1\OptimizeToursResponse\Metrics|null - */ - public function getMetrics() - { - return $this->metrics; - } - - public function hasMetrics() - { - return isset($this->metrics); - } - - public function clearMetrics() - { - unset($this->metrics); - } - - /** - * Duration, distance and usage metrics for this solution. - * - * Generated from protobuf field .google.cloud.optimization.v1.OptimizeToursResponse.Metrics metrics = 6; - * @param \Google\Cloud\Optimization\V1\OptimizeToursResponse\Metrics $var - * @return $this - */ - public function setMetrics($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Optimization\V1\OptimizeToursResponse\Metrics::class); - $this->metrics = $var; - - return $this; - } - - /** - * Deprecated: Use - * [Metrics.total_cost][google.cloud.optimization.v1.OptimizeToursResponse.Metrics.total_cost] - * instead. Total cost of the solution. This takes into account all costs: - * costs per per hour and travel hour, fixed vehicle costs, unperformed - * shipment penalty costs, global duration cost, etc. - * - * Generated from protobuf field double total_cost = 2 [deprecated = true]; - * @return float - * @deprecated - */ - public function getTotalCost() - { - @trigger_error('total_cost is deprecated.', E_USER_DEPRECATED); - return $this->total_cost; - } - - /** - * Deprecated: Use - * [Metrics.total_cost][google.cloud.optimization.v1.OptimizeToursResponse.Metrics.total_cost] - * instead. Total cost of the solution. This takes into account all costs: - * costs per per hour and travel hour, fixed vehicle costs, unperformed - * shipment penalty costs, global duration cost, etc. - * - * Generated from protobuf field double total_cost = 2 [deprecated = true]; - * @param float $var - * @return $this - * @deprecated - */ - public function setTotalCost($var) - { - @trigger_error('total_cost is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkDouble($var); - $this->total_cost = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/OptimizeToursResponse/Metrics.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/OptimizeToursResponse/Metrics.php deleted file mode 100644 index b4e2c006dd75..000000000000 --- a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/OptimizeToursResponse/Metrics.php +++ /dev/null @@ -1,372 +0,0 @@ -google.cloud.optimization.v1.OptimizeToursResponse.Metrics - */ -class Metrics extends \Google\Protobuf\Internal\Message -{ - /** - * Aggregated over the routes. Each metric is the sum (or max, for loads) - * over all - * [ShipmentRoute.metrics][google.cloud.optimization.v1.ShipmentRoute.metrics] - * fields of the same name. - * - * Generated from protobuf field .google.cloud.optimization.v1.AggregatedMetrics aggregated_route_metrics = 1; - */ - protected $aggregated_route_metrics = null; - /** - * Number of mandatory shipments skipped. - * - * Generated from protobuf field int32 skipped_mandatory_shipment_count = 2; - */ - protected $skipped_mandatory_shipment_count = 0; - /** - * Number of vehicles used. Note: if a vehicle route is empty and - * [Vehicle.used_if_route_is_empty][google.cloud.optimization.v1.Vehicle.used_if_route_is_empty] - * is true, the vehicle is considered used. - * - * Generated from protobuf field int32 used_vehicle_count = 3; - */ - protected $used_vehicle_count = 0; - /** - * The earliest start time for a used vehicle, computed as the minimum over - * all used vehicles of - * [ShipmentRoute.vehicle_start_time][google.cloud.optimization.v1.ShipmentRoute.vehicle_start_time]. - * - * Generated from protobuf field .google.protobuf.Timestamp earliest_vehicle_start_time = 4; - */ - protected $earliest_vehicle_start_time = null; - /** - * The latest end time for a used vehicle, computed as the maximum over all - * used vehicles of - * [ShipmentRoute.vehicle_end_time][google.cloud.optimization.v1.ShipmentRoute.vehicle_end_time]. - * - * Generated from protobuf field .google.protobuf.Timestamp latest_vehicle_end_time = 5; - */ - protected $latest_vehicle_end_time = null; - /** - * Cost of the solution, broken down by cost-related request fields. - * The keys are proto paths, relative to the input OptimizeToursRequest, - * e.g. "model.shipments.pickups.cost", and the values are the total cost - * generated by the corresponding cost field, aggregated over the whole - * solution. In other words, costs["model.shipments.pickups.cost"] is the - * sum of all pickup costs over the solution. All costs defined in the model - * are reported in detail here with the exception of costs related to - * TransitionAttributes that are only reported in an aggregated way as of - * 2022/01. - * - * Generated from protobuf field map costs = 10; - */ - private $costs; - /** - * Total cost of the solution. The sum of all values in the costs map. - * - * Generated from protobuf field double total_cost = 6; - */ - protected $total_cost = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Optimization\V1\AggregatedMetrics $aggregated_route_metrics - * Aggregated over the routes. Each metric is the sum (or max, for loads) - * over all - * [ShipmentRoute.metrics][google.cloud.optimization.v1.ShipmentRoute.metrics] - * fields of the same name. - * @type int $skipped_mandatory_shipment_count - * Number of mandatory shipments skipped. - * @type int $used_vehicle_count - * Number of vehicles used. Note: if a vehicle route is empty and - * [Vehicle.used_if_route_is_empty][google.cloud.optimization.v1.Vehicle.used_if_route_is_empty] - * is true, the vehicle is considered used. - * @type \Google\Protobuf\Timestamp $earliest_vehicle_start_time - * The earliest start time for a used vehicle, computed as the minimum over - * all used vehicles of - * [ShipmentRoute.vehicle_start_time][google.cloud.optimization.v1.ShipmentRoute.vehicle_start_time]. - * @type \Google\Protobuf\Timestamp $latest_vehicle_end_time - * The latest end time for a used vehicle, computed as the maximum over all - * used vehicles of - * [ShipmentRoute.vehicle_end_time][google.cloud.optimization.v1.ShipmentRoute.vehicle_end_time]. - * @type array|\Google\Protobuf\Internal\MapField $costs - * Cost of the solution, broken down by cost-related request fields. - * The keys are proto paths, relative to the input OptimizeToursRequest, - * e.g. "model.shipments.pickups.cost", and the values are the total cost - * generated by the corresponding cost field, aggregated over the whole - * solution. In other words, costs["model.shipments.pickups.cost"] is the - * sum of all pickup costs over the solution. All costs defined in the model - * are reported in detail here with the exception of costs related to - * TransitionAttributes that are only reported in an aggregated way as of - * 2022/01. - * @type float $total_cost - * Total cost of the solution. The sum of all values in the costs map. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); - parent::__construct($data); - } - - /** - * Aggregated over the routes. Each metric is the sum (or max, for loads) - * over all - * [ShipmentRoute.metrics][google.cloud.optimization.v1.ShipmentRoute.metrics] - * fields of the same name. - * - * Generated from protobuf field .google.cloud.optimization.v1.AggregatedMetrics aggregated_route_metrics = 1; - * @return \Google\Cloud\Optimization\V1\AggregatedMetrics|null - */ - public function getAggregatedRouteMetrics() - { - return $this->aggregated_route_metrics; - } - - public function hasAggregatedRouteMetrics() - { - return isset($this->aggregated_route_metrics); - } - - public function clearAggregatedRouteMetrics() - { - unset($this->aggregated_route_metrics); - } - - /** - * Aggregated over the routes. Each metric is the sum (or max, for loads) - * over all - * [ShipmentRoute.metrics][google.cloud.optimization.v1.ShipmentRoute.metrics] - * fields of the same name. - * - * Generated from protobuf field .google.cloud.optimization.v1.AggregatedMetrics aggregated_route_metrics = 1; - * @param \Google\Cloud\Optimization\V1\AggregatedMetrics $var - * @return $this - */ - public function setAggregatedRouteMetrics($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Optimization\V1\AggregatedMetrics::class); - $this->aggregated_route_metrics = $var; - - return $this; - } - - /** - * Number of mandatory shipments skipped. - * - * Generated from protobuf field int32 skipped_mandatory_shipment_count = 2; - * @return int - */ - public function getSkippedMandatoryShipmentCount() - { - return $this->skipped_mandatory_shipment_count; - } - - /** - * Number of mandatory shipments skipped. - * - * Generated from protobuf field int32 skipped_mandatory_shipment_count = 2; - * @param int $var - * @return $this - */ - public function setSkippedMandatoryShipmentCount($var) - { - GPBUtil::checkInt32($var); - $this->skipped_mandatory_shipment_count = $var; - - return $this; - } - - /** - * Number of vehicles used. Note: if a vehicle route is empty and - * [Vehicle.used_if_route_is_empty][google.cloud.optimization.v1.Vehicle.used_if_route_is_empty] - * is true, the vehicle is considered used. - * - * Generated from protobuf field int32 used_vehicle_count = 3; - * @return int - */ - public function getUsedVehicleCount() - { - return $this->used_vehicle_count; - } - - /** - * Number of vehicles used. Note: if a vehicle route is empty and - * [Vehicle.used_if_route_is_empty][google.cloud.optimization.v1.Vehicle.used_if_route_is_empty] - * is true, the vehicle is considered used. - * - * Generated from protobuf field int32 used_vehicle_count = 3; - * @param int $var - * @return $this - */ - public function setUsedVehicleCount($var) - { - GPBUtil::checkInt32($var); - $this->used_vehicle_count = $var; - - return $this; - } - - /** - * The earliest start time for a used vehicle, computed as the minimum over - * all used vehicles of - * [ShipmentRoute.vehicle_start_time][google.cloud.optimization.v1.ShipmentRoute.vehicle_start_time]. - * - * Generated from protobuf field .google.protobuf.Timestamp earliest_vehicle_start_time = 4; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEarliestVehicleStartTime() - { - return $this->earliest_vehicle_start_time; - } - - public function hasEarliestVehicleStartTime() - { - return isset($this->earliest_vehicle_start_time); - } - - public function clearEarliestVehicleStartTime() - { - unset($this->earliest_vehicle_start_time); - } - - /** - * The earliest start time for a used vehicle, computed as the minimum over - * all used vehicles of - * [ShipmentRoute.vehicle_start_time][google.cloud.optimization.v1.ShipmentRoute.vehicle_start_time]. - * - * Generated from protobuf field .google.protobuf.Timestamp earliest_vehicle_start_time = 4; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEarliestVehicleStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->earliest_vehicle_start_time = $var; - - return $this; - } - - /** - * The latest end time for a used vehicle, computed as the maximum over all - * used vehicles of - * [ShipmentRoute.vehicle_end_time][google.cloud.optimization.v1.ShipmentRoute.vehicle_end_time]. - * - * Generated from protobuf field .google.protobuf.Timestamp latest_vehicle_end_time = 5; - * @return \Google\Protobuf\Timestamp|null - */ - public function getLatestVehicleEndTime() - { - return $this->latest_vehicle_end_time; - } - - public function hasLatestVehicleEndTime() - { - return isset($this->latest_vehicle_end_time); - } - - public function clearLatestVehicleEndTime() - { - unset($this->latest_vehicle_end_time); - } - - /** - * The latest end time for a used vehicle, computed as the maximum over all - * used vehicles of - * [ShipmentRoute.vehicle_end_time][google.cloud.optimization.v1.ShipmentRoute.vehicle_end_time]. - * - * Generated from protobuf field .google.protobuf.Timestamp latest_vehicle_end_time = 5; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setLatestVehicleEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->latest_vehicle_end_time = $var; - - return $this; - } - - /** - * Cost of the solution, broken down by cost-related request fields. - * The keys are proto paths, relative to the input OptimizeToursRequest, - * e.g. "model.shipments.pickups.cost", and the values are the total cost - * generated by the corresponding cost field, aggregated over the whole - * solution. In other words, costs["model.shipments.pickups.cost"] is the - * sum of all pickup costs over the solution. All costs defined in the model - * are reported in detail here with the exception of costs related to - * TransitionAttributes that are only reported in an aggregated way as of - * 2022/01. - * - * Generated from protobuf field map costs = 10; - * @return \Google\Protobuf\Internal\MapField - */ - public function getCosts() - { - return $this->costs; - } - - /** - * Cost of the solution, broken down by cost-related request fields. - * The keys are proto paths, relative to the input OptimizeToursRequest, - * e.g. "model.shipments.pickups.cost", and the values are the total cost - * generated by the corresponding cost field, aggregated over the whole - * solution. In other words, costs["model.shipments.pickups.cost"] is the - * sum of all pickup costs over the solution. All costs defined in the model - * are reported in detail here with the exception of costs related to - * TransitionAttributes that are only reported in an aggregated way as of - * 2022/01. - * - * Generated from protobuf field map costs = 10; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setCosts($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::DOUBLE); - $this->costs = $arr; - - return $this; - } - - /** - * Total cost of the solution. The sum of all values in the costs map. - * - * Generated from protobuf field double total_cost = 6; - * @return float - */ - public function getTotalCost() - { - return $this->total_cost; - } - - /** - * Total cost of the solution. The sum of all values in the costs map. - * - * Generated from protobuf field double total_cost = 6; - * @param float $var - * @return $this - */ - public function setTotalCost($var) - { - GPBUtil::checkDouble($var); - $this->total_cost = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Metrics::class, \Google\Cloud\Optimization\V1\OptimizeToursResponse_Metrics::class); - diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/OptimizeToursValidationError.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/OptimizeToursValidationError.php deleted file mode 100644 index bb7ec123e7f8..000000000000 --- a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/OptimizeToursValidationError.php +++ /dev/null @@ -1,1207 +0,0 @@ -google.cloud.optimization.v1.OptimizeToursValidationError - */ -class OptimizeToursValidationError extends \Google\Protobuf\Internal\Message -{ - /** - * A validation error is defined by the pair (`code`, `display_name`) which - * are always present. - * Other fields (below) provide more context about the error. - * *MULTIPLE ERRORS*: - * When there are multiple errors, the validation process tries to output - * several of them. Much like a compiler, this is an imperfect process. Some - * validation errors will be "fatal", meaning that they stop the entire - * validation process. This is the case for `display_name="UNSPECIFIED"` - * errors, among others. Some may cause the validation process to skip other - * errors. - * *STABILITY*: - * `code` and `display_name` should be very stable. But new codes and - * display names may appear over time, which may cause a given (invalid) - * request to yield a different (`code`, `display_name`) pair because the new - * error hid the old one (see "MULTIPLE ERRORS"). - * *REFERENCE*: A list of all (code, name) pairs: - * * UNSPECIFIED = 0; - * * VALIDATION_TIMEOUT_ERROR = 10; Validation couldn't be completed within - * the deadline. - * * REQUEST_OPTIONS_ERROR = 12; - * * REQUEST_OPTIONS_INVALID_SOLVING_MODE = 1201; - * * REQUEST_OPTIONS_INVALID_MAX_VALIDATION_ERRORS = 1203; - * * REQUEST_OPTIONS_INVALID_GEODESIC_METERS_PER_SECOND = 1204; - * * REQUEST_OPTIONS_GEODESIC_METERS_PER_SECOND_TOO_SMALL = 1205; - * * REQUEST_OPTIONS_MISSING_GEODESIC_METERS_PER_SECOND = 1206; - * * REQUEST_OPTIONS_POPULATE_PATHFINDER_TRIPS_AND_GEODESIC_DISTANCE - * = 1207; - * * REQUEST_OPTIONS_COST_MODEL_OPTIONS_AND_GEODESIC_DISTANCE = 1208; - * * REQUEST_OPTIONS_TRAVEL_MODE_INCOMPATIBLE_WITH_TRAFFIC = 1211; - * * REQUEST_OPTIONS_MULTIPLE_TRAFFIC_FLAVORS = 1212; - * * REQUEST_OPTIONS_INVALID_TRAFFIC_FLAVOR = 1213; - * * REQUEST_OPTIONS_TRAFFIC_ENABLED_WITHOUT_GLOBAL_START_TIME = 1214; - * * REQUEST_OPTIONS_TRAFFIC_ENABLED_WITH_PRECEDENCES = 1215; - * * REQUEST_OPTIONS_TRAFFIC_PREFILL_MODE_INVALID = 1216; - * * REQUEST_OPTIONS_TRAFFIC_PREFILL_ENABLED_WITHOUT_TRAFFIC = 1217; - * * INJECTED_SOLUTION_ERROR = 20; - * * INJECTED_SOLUTION_MISSING_LABEL = 2000; - * * INJECTED_SOLUTION_DUPLICATE_LABEL = 2001; - * * INJECTED_SOLUTION_AMBIGUOUS_INDEX = 2002; - * * INJECTED_SOLUTION_INFEASIBLE_AFTER_GETTING_TRAVEL_TIMES = 2003; - * * INJECTED_SOLUTION_TRANSITION_INCONSISTENT_WITH_ACTUAL_TRAVEL = 2004; - * * INJECTED_SOLUTION_CONCURRENT_SOLUTION_TYPES = 2005; - * * INJECTED_SOLUTION_MORE_THAN_ONE_PER_TYPE = 2006; - * * INJECTED_SOLUTION_REFRESH_WITHOUT_POPULATE = 2008; - * * INJECTED_SOLUTION_CONSTRAINED_ROUTE_PORTION_INFEASIBLE = 2010; - * * SHIPMENT_MODEL_ERROR = 22; - * * SHIPMENT_MODEL_TOO_LARGE = 2200; - * * SHIPMENT_MODEL_TOO_MANY_CAPACITY_TYPES = 2201; - * * SHIPMENT_MODEL_GLOBAL_START_TIME_NEGATIVE_OR_NAN = 2202; - * * SHIPMENT_MODEL_GLOBAL_END_TIME_TOO_LARGE_OR_NAN = 2203; - * * SHIPMENT_MODEL_GLOBAL_START_TIME_AFTER_GLOBAL_END_TIME = 2204; - * * SHIPMENT_MODEL_GLOBAL_DURATION_TOO_LONG = 2205; - * * SHIPMENT_MODEL_MAX_ACTIVE_VEHICLES_NOT_POSITIVE = 2206; - * * SHIPMENT_MODEL_DURATION_MATRIX_TOO_LARGE = 2207; - * * INDEX_ERROR = 24; - * * TAG_ERROR = 26; - * * TIME_WINDOW_ERROR = 28; - * * TIME_WINDOW_INVALID_START_TIME = 2800; - * * TIME_WINDOW_INVALID_END_TIME = 2801; - * * TIME_WINDOW_INVALID_SOFT_START_TIME = 2802; - * * TIME_WINDOW_INVALID_SOFT_END_TIME = 2803; - * * TIME_WINDOW_OUTSIDE_GLOBAL_TIME_WINDOW = 2804; - * * TIME_WINDOW_START_TIME_AFTER_END_TIME = 2805; - * * TIME_WINDOW_INVALID_COST_PER_HOUR_BEFORE_SOFT_START_TIME = 2806; - * * TIME_WINDOW_INVALID_COST_PER_HOUR_AFTER_SOFT_END_TIME = 2807; - * * TIME_WINDOW_COST_BEFORE_SOFT_START_TIME_WITHOUT_SOFT_START_TIME - * = 2808; - * * TIME_WINDOW_COST_AFTER_SOFT_END_TIME_WITHOUT_SOFT_END_TIME = 2809; - * * TIME_WINDOW_SOFT_START_TIME_WITHOUT_COST_BEFORE_SOFT_START_TIME - * = 2810; - * * TIME_WINDOW_SOFT_END_TIME_WITHOUT_COST_AFTER_SOFT_END_TIME = 2811; - * * TIME_WINDOW_OVERLAPPING_ADJACENT_OR_EARLIER_THAN_PREVIOUS = 2812; - * * TIME_WINDOW_START_TIME_AFTER_SOFT_START_TIME = 2813; - * * TIME_WINDOW_SOFT_START_TIME_AFTER_END_TIME = 2814; - * * TIME_WINDOW_START_TIME_AFTER_SOFT_END_TIME = 2815; - * * TIME_WINDOW_SOFT_END_TIME_AFTER_END_TIME = 2816; - * * TIME_WINDOW_COST_BEFORE_SOFT_START_TIME_SET_AND_MULTIPLE_WINDOWS - * = 2817; - * * TIME_WINDOW_COST_AFTER_SOFT_END_TIME_SET_AND_MULTIPLE_WINDOWS = 2818; - * * TRANSITION_ATTRIBUTES_ERROR = 30; - * * TRANSITION_ATTRIBUTES_INVALID_COST = 3000; - * * TRANSITION_ATTRIBUTES_INVALID_COST_PER_KILOMETER = 3001; - * * TRANSITION_ATTRIBUTES_DUPLICATE_TAG_PAIR = 3002; - * * TRANSITION_ATTRIBUTES_DISTANCE_LIMIT_MAX_METERS_UNSUPPORTED = 3003; - * * TRANSITION_ATTRIBUTES_UNSPECIFIED_SOURCE_TAGS = 3004; - * * TRANSITION_ATTRIBUTES_CONFLICTING_SOURCE_TAGS_FIELDS = 3005; - * * TRANSITION_ATTRIBUTES_UNSPECIFIED_DESTINATION_TAGS = 3006; - * * TRANSITION_ATTRIBUTES_CONFLICTING_DESTINATION_TAGS_FIELDS = 3007; - * * TRANSITION_ATTRIBUTES_DELAY_DURATION_NEGATIVE_OR_NAN = 3008; - * * TRANSITION_ATTRIBUTES_DELAY_DURATION_EXCEEDS_GLOBAL_DURATION = 3009; - * * AMOUNT_ERROR = 31; - * * AMOUNT_NEGATIVE_VALUE = 3100; - * * LOAD_LIMIT_ERROR = 33; - * * LOAD_LIMIT_INVALID_COST_ABOVE_SOFT_MAX = 3303; - * * LOAD_LIMIT_SOFT_MAX_WITHOUT_COST_ABOVE_SOFT_MAX = 3304; - * * LOAD_LIMIT_COST_ABOVE_SOFT_MAX_WITHOUT_SOFT_MAX = 3305; - * * LOAD_LIMIT_NEGATIVE_SOFT_MAX = 3306; - * * LOAD_LIMIT_MIXED_DEMAND_TYPE = 3307; - * * LOAD_LIMIT_MAX_LOAD_NEGATIVE_VALUE = 3308; - * * LOAD_LIMIT_SOFT_MAX_ABOVE_MAX = 3309; - * * INTERVAL_ERROR = 34; - * * INTERVAL_MIN_EXCEEDS_MAX = 3401; - * * INTERVAL_NEGATIVE_MIN = 3402; - * * INTERVAL_NEGATIVE_MAX = 3403; - * * INTERVAL_MIN_EXCEEDS_CAPACITY = 3404; - * * INTERVAL_MAX_EXCEEDS_CAPACITY = 3405; - * * DISTANCE_LIMIT_ERROR = 36; - * * DISTANCE_LIMIT_INVALID_COST_AFTER_SOFT_MAX = 3601; - * * DISTANCE_LIMIT_SOFT_MAX_WITHOUT_COST_AFTER_SOFT_MAX = 3602; - * * DISTANCE_LIMIT_COST_AFTER_SOFT_MAX_WITHOUT_SOFT_MAX = 3603; - * * DISTANCE_LIMIT_NEGATIVE_MAX = 3604; - * * DISTANCE_LIMIT_NEGATIVE_SOFT_MAX = 3605; - * * DISTANCE_LIMIT_SOFT_MAX_LARGER_THAN_MAX = 3606; - * * DURATION_LIMIT_ERROR = 38; - * * DURATION_LIMIT_MAX_DURATION_NEGATIVE_OR_NAN = 3800; - * * DURATION_LIMIT_SOFT_MAX_DURATION_NEGATIVE_OR_NAN = 3801; - * * DURATION_LIMIT_INVALID_COST_PER_HOUR_AFTER_SOFT_MAX = 3802; - * * DURATION_LIMIT_SOFT_MAX_WITHOUT_COST_AFTER_SOFT_MAX = 3803; - * * DURATION_LIMIT_COST_AFTER_SOFT_MAX_WITHOUT_SOFT_MAX = 3804; - * * DURATION_LIMIT_QUADRATIC_SOFT_MAX_DURATION_NEGATIVE_OR_NAN = 3805; - * * DURATION_LIMIT_INVALID_COST_AFTER_QUADRATIC_SOFT_MAX = 3806; - * * DURATION_LIMIT_QUADRATIC_SOFT_MAX_WITHOUT_COST_PER_SQUARE_HOUR - * = 3807; - * * DURATION_LIMIT_COST_PER_SQUARE_HOUR_WITHOUT_QUADRATIC_SOFT_MAX - * = 3808; - * * DURATION_LIMIT_QUADRATIC_SOFT_MAX_WITHOUT_MAX = 3809; - * * DURATION_LIMIT_SOFT_MAX_LARGER_THAN_MAX = 3810; - * * DURATION_LIMIT_QUADRATIC_SOFT_MAX_LARGER_THAN_MAX = 3811; - * * DURATION_LIMIT_DIFF_BETWEEN_MAX_AND_QUADRATIC_SOFT_MAX_TOO_LARGE - * = 3812; - * * DURATION_LIMIT_MAX_DURATION_EXCEEDS_GLOBAL_DURATION = 3813; - * * DURATION_LIMIT_SOFT_MAX_DURATION_EXCEEDS_GLOBAL_DURATION = 3814; - * * DURATION_LIMIT_QUADRATIC_SOFT_MAX_DURATION_EXCEEDS_GLOBAL_DURATION - * = 3815; - * * SHIPMENT_ERROR = 40; - * * SHIPMENT_PD_LIMIT_WITHOUT_PICKUP_AND_DELIVERY = 4014; - * * SHIPMENT_PD_ABSOLUTE_DETOUR_LIMIT_DURATION_NEGATIVE_OR_NAN = 4000; - * * SHIPMENT_PD_ABSOLUTE_DETOUR_LIMIT_DURATION_EXCEEDS_GLOBAL_DURATION - * = 4001; - * * SHIPMENT_PD_RELATIVE_DETOUR_LIMIT_INVALID = 4015; - * * SHIPMENT_PD_DETOUR_LIMIT_AND_EXTRA_VISIT_DURATION = 4016; - * * SHIPMENT_PD_TIME_LIMIT_DURATION_NEGATIVE_OR_NAN = 4002; - * * SHIPMENT_PD_TIME_LIMIT_DURATION_EXCEEDS_GLOBAL_DURATION = 4003; - * * SHIPMENT_EMPTY_SHIPMENT_TYPE = 4004; - * * SHIPMENT_NO_PICKUP_NO_DELIVERY = 4005; - * * SHIPMENT_INVALID_PENALTY_COST = 4006; - * * SHIPMENT_ALLOWED_VEHICLE_INDEX_OUT_OF_BOUNDS = 4007; - * * SHIPMENT_DUPLICATE_ALLOWED_VEHICLE_INDEX = 4008; - * * SHIPMENT_INCONSISTENT_COST_FOR_VEHICLE_SIZE_WITHOUT_INDEX = 4009; - * * SHIPMENT_INCONSISTENT_COST_FOR_VEHICLE_SIZE_WITH_INDEX = 4010; - * * SHIPMENT_INVALID_COST_FOR_VEHICLE = 4011; - * * SHIPMENT_COST_FOR_VEHICLE_INDEX_OUT_OF_BOUNDS = 4012; - * * SHIPMENT_DUPLICATE_COST_FOR_VEHICLE_INDEX = 4013; - * * VEHICLE_ERROR = 42; - * * VEHICLE_EMPTY_REQUIRED_OPERATOR_TYPE = 4200; - * * VEHICLE_DUPLICATE_REQUIRED_OPERATOR_TYPE = 4201; - * * VEHICLE_NO_OPERATOR_WITH_REQUIRED_OPERATOR_TYPE = 4202; - * * VEHICLE_EMPTY_START_TAG = 4203; - * * VEHICLE_DUPLICATE_START_TAG = 4204; - * * VEHICLE_EMPTY_END_TAG = 4205; - * * VEHICLE_DUPLICATE_END_TAG = 4206; - * * VEHICLE_EXTRA_VISIT_DURATION_NEGATIVE_OR_NAN = 4207; - * * VEHICLE_EXTRA_VISIT_DURATION_EXCEEDS_GLOBAL_DURATION = 4208; - * * VEHICLE_EXTRA_VISIT_DURATION_EMPTY_KEY = 4209; - * * VEHICLE_FIRST_SHIPMENT_INDEX_OUT_OF_BOUNDS = 4210; - * * VEHICLE_FIRST_SHIPMENT_IGNORED = 4211; - * * VEHICLE_FIRST_SHIPMENT_NOT_BOUND = 4212; - * * VEHICLE_LAST_SHIPMENT_INDEX_OUT_OF_BOUNDS = 4213; - * * VEHICLE_LAST_SHIPMENT_IGNORED = 4214; - * * VEHICLE_LAST_SHIPMENT_NOT_BOUND = 4215; - * * VEHICLE_IGNORED_WITH_USED_IF_ROUTE_IS_EMPTY = 4216; - * * VEHICLE_INVALID_COST_PER_KILOMETER = 4217; - * * VEHICLE_INVALID_COST_PER_HOUR = 4218; - * * VEHICLE_INVALID_COST_PER_TRAVELED_HOUR = 4219; - * * VEHICLE_INVALID_FIXED_COST = 4220; - * * VEHICLE_INVALID_TRAVEL_DURATION_MULTIPLE = 4221; - * * VEHICLE_TRAVEL_DURATION_MULTIPLE_WITH_SHIPMENT_PD_DETOUR_LIMITS - * = 4223; - * * VEHICLE_MATRIX_INDEX_WITH_SHIPMENT_PD_DETOUR_LIMITS = 4224; - * * VEHICLE_MINIMUM_DURATION_LONGER_THAN_DURATION_LIMIT = 4222; - * * VISIT_REQUEST_ERROR = 44; - * * VISIT_REQUEST_EMPTY_TAG = 4400; - * * VISIT_REQUEST_DUPLICATE_TAG = 4401; - * * VISIT_REQUEST_DURATION_NEGATIVE_OR_NAN = 4404; - * * VISIT_REQUEST_DURATION_EXCEEDS_GLOBAL_DURATION = 4405; - * * PRECEDENCE_ERROR = 46; - * * PRECEDENCE_RULE_MISSING_FIRST_INDEX = 4600; - * * PRECEDENCE_RULE_MISSING_SECOND_INDEX = 4601; - * * PRECEDENCE_RULE_FIRST_INDEX_OUT_OF_BOUNDS = 4602; - * * PRECEDENCE_RULE_SECOND_INDEX_OUT_OF_BOUNDS = 4603; - * * PRECEDENCE_RULE_DUPLICATE_INDEX = 4604; - * * PRECEDENCE_RULE_INEXISTENT_FIRST_VISIT_REQUEST = 4605; - * * PRECEDENCE_RULE_INEXISTENT_SECOND_VISIT_REQUEST = 4606; - * * BREAK_ERROR = 48; - * * BREAK_RULE_EMPTY = 4800; - * * BREAK_REQUEST_UNSPECIFIED_DURATION = 4801; - * * BREAK_REQUEST_UNSPECIFIED_EARLIEST_START_TIME = 4802; - * * BREAK_REQUEST_UNSPECIFIED_LATEST_START_TIME = 4803; - * * BREAK_REQUEST_DURATION_NEGATIVE_OR_NAN = 4804; = 4804; - * * BREAK_REQUEST_LATEST_START_TIME_BEFORE_EARLIEST_START_TIME = 4805; - * * BREAK_REQUEST_EARLIEST_START_TIME_BEFORE_GLOBAL_START_TIME = 4806; - * * BREAK_REQUEST_LATEST_END_TIME_AFTER_GLOBAL_END_TIME = 4807; - * * BREAK_REQUEST_NON_SCHEDULABLE = 4808; - * * BREAK_FREQUENCY_MAX_INTER_BREAK_DURATION_NEGATIVE_OR_NAN = 4809; - * * BREAK_FREQUENCY_MIN_BREAK_DURATION_NEGATIVE_OR_NAN = 4810; - * * BREAK_FREQUENCY_MIN_BREAK_DURATION_EXCEEDS_GLOBAL_DURATION = 4811; - * * BREAK_FREQUENCY_MAX_INTER_BREAK_DURATION_EXCEEDS_GLOBAL_DURATION - * = 4812; - * * BREAK_REQUEST_DURATION_EXCEEDS_GLOBAL_DURATION = 4813; - * * BREAK_FREQUENCY_MISSING_MAX_INTER_BREAK_DURATION = 4814; - * * BREAK_FREQUENCY_MISSING_MIN_BREAK_DURATION = 4815; - * * SHIPMENT_TYPE_INCOMPATIBILITY_ERROR = 50; - * * SHIPMENT_TYPE_INCOMPATIBILITY_EMPTY_TYPE = 5001; - * * SHIPMENT_TYPE_INCOMPATIBILITY_LESS_THAN_TWO_TYPES = 5002; - * * SHIPMENT_TYPE_INCOMPATIBILITY_DUPLICATE_TYPE = 5003; - * * SHIPMENT_TYPE_INCOMPATIBILITY_INVALID_INCOMPATIBILITY_MODE = 5004; - * * SHIPMENT_TYPE_INCOMPATIBILITY_TOO_MANY_INCOMPATIBILITIES = 5005; - * * SHIPMENT_TYPE_REQUIREMENT_ERROR = 52; - * * SHIPMENT_TYPE_REQUIREMENT_NO_REQUIRED_TYPE = 52001; - * * SHIPMENT_TYPE_REQUIREMENT_NO_DEPENDENT_TYPE = 52002; - * * SHIPMENT_TYPE_REQUIREMENT_INVALID_REQUIREMENT_MODE = 52003; - * * SHIPMENT_TYPE_REQUIREMENT_TOO_MANY_REQUIREMENTS = 52004; - * * SHIPMENT_TYPE_REQUIREMENT_EMPTY_REQUIRED_TYPE = 52005; - * * SHIPMENT_TYPE_REQUIREMENT_DUPLICATE_REQUIRED_TYPE = 52006; - * * SHIPMENT_TYPE_REQUIREMENT_NO_REQUIRED_TYPE_FOUND = 52007; - * * SHIPMENT_TYPE_REQUIREMENT_EMPTY_DEPENDENT_TYPE = 52008; - * * SHIPMENT_TYPE_REQUIREMENT_DUPLICATE_DEPENDENT_TYPE = 52009; - * * SHIPMENT_TYPE_REQUIREMENT_SELF_DEPENDENT_TYPE = 52010; - * * SHIPMENT_TYPE_REQUIREMENT_GRAPH_HAS_CYCLES = 52011; - * * VEHICLE_OPERATOR_ERROR = 54; - * * VEHICLE_OPERATOR_EMPTY_TYPE = 5400; - * * VEHICLE_OPERATOR_MULTIPLE_START_TIME_WINDOWS = 5401; - * * VEHICLE_OPERATOR_SOFT_START_TIME_WINDOW = 5402; - * * VEHICLE_OPERATOR_MULTIPLE_END_TIME_WINDOWS = 5403; - * * VEHICLE_OPERATOR_SOFT_END_TIME_WINDOW = 5404; - * * DURATION_SECONDS_MATRIX_ERROR = 56; - * * DURATION_SECONDS_MATRIX_DURATION_NEGATIVE_OR_NAN = 5600; - * * DURATION_SECONDS_MATRIX_DURATION_EXCEEDS_GLOBAL_DURATION = 5601; - * - * Generated from protobuf field int32 code = 1; - */ - protected $code = 0; - /** - * The error display name. - * - * Generated from protobuf field string display_name = 2; - */ - protected $display_name = ''; - /** - * An error context may involve 0, 1 (most of the time) or more fields. For - * example, referring to vehicle #4 and shipment #2's first pickup can be - * done as follows: - * ``` - * fields { name: "vehicles" index: 4} - * fields { name: "shipments" index: 2 sub_field {name: "pickups" index: 0} } - * ``` - * Note, however, that the cardinality of `fields` should not change for a - * given error code. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.OptimizeToursValidationError.FieldReference fields = 3; - */ - private $fields; - /** - * Human-readable string describing the error. There is a 1:1 mapping - * between `code` and `error_message` (when code != "UNSPECIFIED"). - * *STABILITY*: Not stable: the error message associated to a given `code` may - * change (hopefully to clarify it) over time. Please rely on the - * `display_name` and `code` instead. - * - * Generated from protobuf field string error_message = 4; - */ - protected $error_message = ''; - /** - * May contain the value(s) of the field(s). This is not always available. You - * should absolutely not rely on it and use it only for manual model - * debugging. - * - * Generated from protobuf field string offending_values = 5; - */ - protected $offending_values = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $code - * A validation error is defined by the pair (`code`, `display_name`) which - * are always present. - * Other fields (below) provide more context about the error. - * *MULTIPLE ERRORS*: - * When there are multiple errors, the validation process tries to output - * several of them. Much like a compiler, this is an imperfect process. Some - * validation errors will be "fatal", meaning that they stop the entire - * validation process. This is the case for `display_name="UNSPECIFIED"` - * errors, among others. Some may cause the validation process to skip other - * errors. - * *STABILITY*: - * `code` and `display_name` should be very stable. But new codes and - * display names may appear over time, which may cause a given (invalid) - * request to yield a different (`code`, `display_name`) pair because the new - * error hid the old one (see "MULTIPLE ERRORS"). - * *REFERENCE*: A list of all (code, name) pairs: - * * UNSPECIFIED = 0; - * * VALIDATION_TIMEOUT_ERROR = 10; Validation couldn't be completed within - * the deadline. - * * REQUEST_OPTIONS_ERROR = 12; - * * REQUEST_OPTIONS_INVALID_SOLVING_MODE = 1201; - * * REQUEST_OPTIONS_INVALID_MAX_VALIDATION_ERRORS = 1203; - * * REQUEST_OPTIONS_INVALID_GEODESIC_METERS_PER_SECOND = 1204; - * * REQUEST_OPTIONS_GEODESIC_METERS_PER_SECOND_TOO_SMALL = 1205; - * * REQUEST_OPTIONS_MISSING_GEODESIC_METERS_PER_SECOND = 1206; - * * REQUEST_OPTIONS_POPULATE_PATHFINDER_TRIPS_AND_GEODESIC_DISTANCE - * = 1207; - * * REQUEST_OPTIONS_COST_MODEL_OPTIONS_AND_GEODESIC_DISTANCE = 1208; - * * REQUEST_OPTIONS_TRAVEL_MODE_INCOMPATIBLE_WITH_TRAFFIC = 1211; - * * REQUEST_OPTIONS_MULTIPLE_TRAFFIC_FLAVORS = 1212; - * * REQUEST_OPTIONS_INVALID_TRAFFIC_FLAVOR = 1213; - * * REQUEST_OPTIONS_TRAFFIC_ENABLED_WITHOUT_GLOBAL_START_TIME = 1214; - * * REQUEST_OPTIONS_TRAFFIC_ENABLED_WITH_PRECEDENCES = 1215; - * * REQUEST_OPTIONS_TRAFFIC_PREFILL_MODE_INVALID = 1216; - * * REQUEST_OPTIONS_TRAFFIC_PREFILL_ENABLED_WITHOUT_TRAFFIC = 1217; - * * INJECTED_SOLUTION_ERROR = 20; - * * INJECTED_SOLUTION_MISSING_LABEL = 2000; - * * INJECTED_SOLUTION_DUPLICATE_LABEL = 2001; - * * INJECTED_SOLUTION_AMBIGUOUS_INDEX = 2002; - * * INJECTED_SOLUTION_INFEASIBLE_AFTER_GETTING_TRAVEL_TIMES = 2003; - * * INJECTED_SOLUTION_TRANSITION_INCONSISTENT_WITH_ACTUAL_TRAVEL = 2004; - * * INJECTED_SOLUTION_CONCURRENT_SOLUTION_TYPES = 2005; - * * INJECTED_SOLUTION_MORE_THAN_ONE_PER_TYPE = 2006; - * * INJECTED_SOLUTION_REFRESH_WITHOUT_POPULATE = 2008; - * * INJECTED_SOLUTION_CONSTRAINED_ROUTE_PORTION_INFEASIBLE = 2010; - * * SHIPMENT_MODEL_ERROR = 22; - * * SHIPMENT_MODEL_TOO_LARGE = 2200; - * * SHIPMENT_MODEL_TOO_MANY_CAPACITY_TYPES = 2201; - * * SHIPMENT_MODEL_GLOBAL_START_TIME_NEGATIVE_OR_NAN = 2202; - * * SHIPMENT_MODEL_GLOBAL_END_TIME_TOO_LARGE_OR_NAN = 2203; - * * SHIPMENT_MODEL_GLOBAL_START_TIME_AFTER_GLOBAL_END_TIME = 2204; - * * SHIPMENT_MODEL_GLOBAL_DURATION_TOO_LONG = 2205; - * * SHIPMENT_MODEL_MAX_ACTIVE_VEHICLES_NOT_POSITIVE = 2206; - * * SHIPMENT_MODEL_DURATION_MATRIX_TOO_LARGE = 2207; - * * INDEX_ERROR = 24; - * * TAG_ERROR = 26; - * * TIME_WINDOW_ERROR = 28; - * * TIME_WINDOW_INVALID_START_TIME = 2800; - * * TIME_WINDOW_INVALID_END_TIME = 2801; - * * TIME_WINDOW_INVALID_SOFT_START_TIME = 2802; - * * TIME_WINDOW_INVALID_SOFT_END_TIME = 2803; - * * TIME_WINDOW_OUTSIDE_GLOBAL_TIME_WINDOW = 2804; - * * TIME_WINDOW_START_TIME_AFTER_END_TIME = 2805; - * * TIME_WINDOW_INVALID_COST_PER_HOUR_BEFORE_SOFT_START_TIME = 2806; - * * TIME_WINDOW_INVALID_COST_PER_HOUR_AFTER_SOFT_END_TIME = 2807; - * * TIME_WINDOW_COST_BEFORE_SOFT_START_TIME_WITHOUT_SOFT_START_TIME - * = 2808; - * * TIME_WINDOW_COST_AFTER_SOFT_END_TIME_WITHOUT_SOFT_END_TIME = 2809; - * * TIME_WINDOW_SOFT_START_TIME_WITHOUT_COST_BEFORE_SOFT_START_TIME - * = 2810; - * * TIME_WINDOW_SOFT_END_TIME_WITHOUT_COST_AFTER_SOFT_END_TIME = 2811; - * * TIME_WINDOW_OVERLAPPING_ADJACENT_OR_EARLIER_THAN_PREVIOUS = 2812; - * * TIME_WINDOW_START_TIME_AFTER_SOFT_START_TIME = 2813; - * * TIME_WINDOW_SOFT_START_TIME_AFTER_END_TIME = 2814; - * * TIME_WINDOW_START_TIME_AFTER_SOFT_END_TIME = 2815; - * * TIME_WINDOW_SOFT_END_TIME_AFTER_END_TIME = 2816; - * * TIME_WINDOW_COST_BEFORE_SOFT_START_TIME_SET_AND_MULTIPLE_WINDOWS - * = 2817; - * * TIME_WINDOW_COST_AFTER_SOFT_END_TIME_SET_AND_MULTIPLE_WINDOWS = 2818; - * * TRANSITION_ATTRIBUTES_ERROR = 30; - * * TRANSITION_ATTRIBUTES_INVALID_COST = 3000; - * * TRANSITION_ATTRIBUTES_INVALID_COST_PER_KILOMETER = 3001; - * * TRANSITION_ATTRIBUTES_DUPLICATE_TAG_PAIR = 3002; - * * TRANSITION_ATTRIBUTES_DISTANCE_LIMIT_MAX_METERS_UNSUPPORTED = 3003; - * * TRANSITION_ATTRIBUTES_UNSPECIFIED_SOURCE_TAGS = 3004; - * * TRANSITION_ATTRIBUTES_CONFLICTING_SOURCE_TAGS_FIELDS = 3005; - * * TRANSITION_ATTRIBUTES_UNSPECIFIED_DESTINATION_TAGS = 3006; - * * TRANSITION_ATTRIBUTES_CONFLICTING_DESTINATION_TAGS_FIELDS = 3007; - * * TRANSITION_ATTRIBUTES_DELAY_DURATION_NEGATIVE_OR_NAN = 3008; - * * TRANSITION_ATTRIBUTES_DELAY_DURATION_EXCEEDS_GLOBAL_DURATION = 3009; - * * AMOUNT_ERROR = 31; - * * AMOUNT_NEGATIVE_VALUE = 3100; - * * LOAD_LIMIT_ERROR = 33; - * * LOAD_LIMIT_INVALID_COST_ABOVE_SOFT_MAX = 3303; - * * LOAD_LIMIT_SOFT_MAX_WITHOUT_COST_ABOVE_SOFT_MAX = 3304; - * * LOAD_LIMIT_COST_ABOVE_SOFT_MAX_WITHOUT_SOFT_MAX = 3305; - * * LOAD_LIMIT_NEGATIVE_SOFT_MAX = 3306; - * * LOAD_LIMIT_MIXED_DEMAND_TYPE = 3307; - * * LOAD_LIMIT_MAX_LOAD_NEGATIVE_VALUE = 3308; - * * LOAD_LIMIT_SOFT_MAX_ABOVE_MAX = 3309; - * * INTERVAL_ERROR = 34; - * * INTERVAL_MIN_EXCEEDS_MAX = 3401; - * * INTERVAL_NEGATIVE_MIN = 3402; - * * INTERVAL_NEGATIVE_MAX = 3403; - * * INTERVAL_MIN_EXCEEDS_CAPACITY = 3404; - * * INTERVAL_MAX_EXCEEDS_CAPACITY = 3405; - * * DISTANCE_LIMIT_ERROR = 36; - * * DISTANCE_LIMIT_INVALID_COST_AFTER_SOFT_MAX = 3601; - * * DISTANCE_LIMIT_SOFT_MAX_WITHOUT_COST_AFTER_SOFT_MAX = 3602; - * * DISTANCE_LIMIT_COST_AFTER_SOFT_MAX_WITHOUT_SOFT_MAX = 3603; - * * DISTANCE_LIMIT_NEGATIVE_MAX = 3604; - * * DISTANCE_LIMIT_NEGATIVE_SOFT_MAX = 3605; - * * DISTANCE_LIMIT_SOFT_MAX_LARGER_THAN_MAX = 3606; - * * DURATION_LIMIT_ERROR = 38; - * * DURATION_LIMIT_MAX_DURATION_NEGATIVE_OR_NAN = 3800; - * * DURATION_LIMIT_SOFT_MAX_DURATION_NEGATIVE_OR_NAN = 3801; - * * DURATION_LIMIT_INVALID_COST_PER_HOUR_AFTER_SOFT_MAX = 3802; - * * DURATION_LIMIT_SOFT_MAX_WITHOUT_COST_AFTER_SOFT_MAX = 3803; - * * DURATION_LIMIT_COST_AFTER_SOFT_MAX_WITHOUT_SOFT_MAX = 3804; - * * DURATION_LIMIT_QUADRATIC_SOFT_MAX_DURATION_NEGATIVE_OR_NAN = 3805; - * * DURATION_LIMIT_INVALID_COST_AFTER_QUADRATIC_SOFT_MAX = 3806; - * * DURATION_LIMIT_QUADRATIC_SOFT_MAX_WITHOUT_COST_PER_SQUARE_HOUR - * = 3807; - * * DURATION_LIMIT_COST_PER_SQUARE_HOUR_WITHOUT_QUADRATIC_SOFT_MAX - * = 3808; - * * DURATION_LIMIT_QUADRATIC_SOFT_MAX_WITHOUT_MAX = 3809; - * * DURATION_LIMIT_SOFT_MAX_LARGER_THAN_MAX = 3810; - * * DURATION_LIMIT_QUADRATIC_SOFT_MAX_LARGER_THAN_MAX = 3811; - * * DURATION_LIMIT_DIFF_BETWEEN_MAX_AND_QUADRATIC_SOFT_MAX_TOO_LARGE - * = 3812; - * * DURATION_LIMIT_MAX_DURATION_EXCEEDS_GLOBAL_DURATION = 3813; - * * DURATION_LIMIT_SOFT_MAX_DURATION_EXCEEDS_GLOBAL_DURATION = 3814; - * * DURATION_LIMIT_QUADRATIC_SOFT_MAX_DURATION_EXCEEDS_GLOBAL_DURATION - * = 3815; - * * SHIPMENT_ERROR = 40; - * * SHIPMENT_PD_LIMIT_WITHOUT_PICKUP_AND_DELIVERY = 4014; - * * SHIPMENT_PD_ABSOLUTE_DETOUR_LIMIT_DURATION_NEGATIVE_OR_NAN = 4000; - * * SHIPMENT_PD_ABSOLUTE_DETOUR_LIMIT_DURATION_EXCEEDS_GLOBAL_DURATION - * = 4001; - * * SHIPMENT_PD_RELATIVE_DETOUR_LIMIT_INVALID = 4015; - * * SHIPMENT_PD_DETOUR_LIMIT_AND_EXTRA_VISIT_DURATION = 4016; - * * SHIPMENT_PD_TIME_LIMIT_DURATION_NEGATIVE_OR_NAN = 4002; - * * SHIPMENT_PD_TIME_LIMIT_DURATION_EXCEEDS_GLOBAL_DURATION = 4003; - * * SHIPMENT_EMPTY_SHIPMENT_TYPE = 4004; - * * SHIPMENT_NO_PICKUP_NO_DELIVERY = 4005; - * * SHIPMENT_INVALID_PENALTY_COST = 4006; - * * SHIPMENT_ALLOWED_VEHICLE_INDEX_OUT_OF_BOUNDS = 4007; - * * SHIPMENT_DUPLICATE_ALLOWED_VEHICLE_INDEX = 4008; - * * SHIPMENT_INCONSISTENT_COST_FOR_VEHICLE_SIZE_WITHOUT_INDEX = 4009; - * * SHIPMENT_INCONSISTENT_COST_FOR_VEHICLE_SIZE_WITH_INDEX = 4010; - * * SHIPMENT_INVALID_COST_FOR_VEHICLE = 4011; - * * SHIPMENT_COST_FOR_VEHICLE_INDEX_OUT_OF_BOUNDS = 4012; - * * SHIPMENT_DUPLICATE_COST_FOR_VEHICLE_INDEX = 4013; - * * VEHICLE_ERROR = 42; - * * VEHICLE_EMPTY_REQUIRED_OPERATOR_TYPE = 4200; - * * VEHICLE_DUPLICATE_REQUIRED_OPERATOR_TYPE = 4201; - * * VEHICLE_NO_OPERATOR_WITH_REQUIRED_OPERATOR_TYPE = 4202; - * * VEHICLE_EMPTY_START_TAG = 4203; - * * VEHICLE_DUPLICATE_START_TAG = 4204; - * * VEHICLE_EMPTY_END_TAG = 4205; - * * VEHICLE_DUPLICATE_END_TAG = 4206; - * * VEHICLE_EXTRA_VISIT_DURATION_NEGATIVE_OR_NAN = 4207; - * * VEHICLE_EXTRA_VISIT_DURATION_EXCEEDS_GLOBAL_DURATION = 4208; - * * VEHICLE_EXTRA_VISIT_DURATION_EMPTY_KEY = 4209; - * * VEHICLE_FIRST_SHIPMENT_INDEX_OUT_OF_BOUNDS = 4210; - * * VEHICLE_FIRST_SHIPMENT_IGNORED = 4211; - * * VEHICLE_FIRST_SHIPMENT_NOT_BOUND = 4212; - * * VEHICLE_LAST_SHIPMENT_INDEX_OUT_OF_BOUNDS = 4213; - * * VEHICLE_LAST_SHIPMENT_IGNORED = 4214; - * * VEHICLE_LAST_SHIPMENT_NOT_BOUND = 4215; - * * VEHICLE_IGNORED_WITH_USED_IF_ROUTE_IS_EMPTY = 4216; - * * VEHICLE_INVALID_COST_PER_KILOMETER = 4217; - * * VEHICLE_INVALID_COST_PER_HOUR = 4218; - * * VEHICLE_INVALID_COST_PER_TRAVELED_HOUR = 4219; - * * VEHICLE_INVALID_FIXED_COST = 4220; - * * VEHICLE_INVALID_TRAVEL_DURATION_MULTIPLE = 4221; - * * VEHICLE_TRAVEL_DURATION_MULTIPLE_WITH_SHIPMENT_PD_DETOUR_LIMITS - * = 4223; - * * VEHICLE_MATRIX_INDEX_WITH_SHIPMENT_PD_DETOUR_LIMITS = 4224; - * * VEHICLE_MINIMUM_DURATION_LONGER_THAN_DURATION_LIMIT = 4222; - * * VISIT_REQUEST_ERROR = 44; - * * VISIT_REQUEST_EMPTY_TAG = 4400; - * * VISIT_REQUEST_DUPLICATE_TAG = 4401; - * * VISIT_REQUEST_DURATION_NEGATIVE_OR_NAN = 4404; - * * VISIT_REQUEST_DURATION_EXCEEDS_GLOBAL_DURATION = 4405; - * * PRECEDENCE_ERROR = 46; - * * PRECEDENCE_RULE_MISSING_FIRST_INDEX = 4600; - * * PRECEDENCE_RULE_MISSING_SECOND_INDEX = 4601; - * * PRECEDENCE_RULE_FIRST_INDEX_OUT_OF_BOUNDS = 4602; - * * PRECEDENCE_RULE_SECOND_INDEX_OUT_OF_BOUNDS = 4603; - * * PRECEDENCE_RULE_DUPLICATE_INDEX = 4604; - * * PRECEDENCE_RULE_INEXISTENT_FIRST_VISIT_REQUEST = 4605; - * * PRECEDENCE_RULE_INEXISTENT_SECOND_VISIT_REQUEST = 4606; - * * BREAK_ERROR = 48; - * * BREAK_RULE_EMPTY = 4800; - * * BREAK_REQUEST_UNSPECIFIED_DURATION = 4801; - * * BREAK_REQUEST_UNSPECIFIED_EARLIEST_START_TIME = 4802; - * * BREAK_REQUEST_UNSPECIFIED_LATEST_START_TIME = 4803; - * * BREAK_REQUEST_DURATION_NEGATIVE_OR_NAN = 4804; = 4804; - * * BREAK_REQUEST_LATEST_START_TIME_BEFORE_EARLIEST_START_TIME = 4805; - * * BREAK_REQUEST_EARLIEST_START_TIME_BEFORE_GLOBAL_START_TIME = 4806; - * * BREAK_REQUEST_LATEST_END_TIME_AFTER_GLOBAL_END_TIME = 4807; - * * BREAK_REQUEST_NON_SCHEDULABLE = 4808; - * * BREAK_FREQUENCY_MAX_INTER_BREAK_DURATION_NEGATIVE_OR_NAN = 4809; - * * BREAK_FREQUENCY_MIN_BREAK_DURATION_NEGATIVE_OR_NAN = 4810; - * * BREAK_FREQUENCY_MIN_BREAK_DURATION_EXCEEDS_GLOBAL_DURATION = 4811; - * * BREAK_FREQUENCY_MAX_INTER_BREAK_DURATION_EXCEEDS_GLOBAL_DURATION - * = 4812; - * * BREAK_REQUEST_DURATION_EXCEEDS_GLOBAL_DURATION = 4813; - * * BREAK_FREQUENCY_MISSING_MAX_INTER_BREAK_DURATION = 4814; - * * BREAK_FREQUENCY_MISSING_MIN_BREAK_DURATION = 4815; - * * SHIPMENT_TYPE_INCOMPATIBILITY_ERROR = 50; - * * SHIPMENT_TYPE_INCOMPATIBILITY_EMPTY_TYPE = 5001; - * * SHIPMENT_TYPE_INCOMPATIBILITY_LESS_THAN_TWO_TYPES = 5002; - * * SHIPMENT_TYPE_INCOMPATIBILITY_DUPLICATE_TYPE = 5003; - * * SHIPMENT_TYPE_INCOMPATIBILITY_INVALID_INCOMPATIBILITY_MODE = 5004; - * * SHIPMENT_TYPE_INCOMPATIBILITY_TOO_MANY_INCOMPATIBILITIES = 5005; - * * SHIPMENT_TYPE_REQUIREMENT_ERROR = 52; - * * SHIPMENT_TYPE_REQUIREMENT_NO_REQUIRED_TYPE = 52001; - * * SHIPMENT_TYPE_REQUIREMENT_NO_DEPENDENT_TYPE = 52002; - * * SHIPMENT_TYPE_REQUIREMENT_INVALID_REQUIREMENT_MODE = 52003; - * * SHIPMENT_TYPE_REQUIREMENT_TOO_MANY_REQUIREMENTS = 52004; - * * SHIPMENT_TYPE_REQUIREMENT_EMPTY_REQUIRED_TYPE = 52005; - * * SHIPMENT_TYPE_REQUIREMENT_DUPLICATE_REQUIRED_TYPE = 52006; - * * SHIPMENT_TYPE_REQUIREMENT_NO_REQUIRED_TYPE_FOUND = 52007; - * * SHIPMENT_TYPE_REQUIREMENT_EMPTY_DEPENDENT_TYPE = 52008; - * * SHIPMENT_TYPE_REQUIREMENT_DUPLICATE_DEPENDENT_TYPE = 52009; - * * SHIPMENT_TYPE_REQUIREMENT_SELF_DEPENDENT_TYPE = 52010; - * * SHIPMENT_TYPE_REQUIREMENT_GRAPH_HAS_CYCLES = 52011; - * * VEHICLE_OPERATOR_ERROR = 54; - * * VEHICLE_OPERATOR_EMPTY_TYPE = 5400; - * * VEHICLE_OPERATOR_MULTIPLE_START_TIME_WINDOWS = 5401; - * * VEHICLE_OPERATOR_SOFT_START_TIME_WINDOW = 5402; - * * VEHICLE_OPERATOR_MULTIPLE_END_TIME_WINDOWS = 5403; - * * VEHICLE_OPERATOR_SOFT_END_TIME_WINDOW = 5404; - * * DURATION_SECONDS_MATRIX_ERROR = 56; - * * DURATION_SECONDS_MATRIX_DURATION_NEGATIVE_OR_NAN = 5600; - * * DURATION_SECONDS_MATRIX_DURATION_EXCEEDS_GLOBAL_DURATION = 5601; - * @type string $display_name - * The error display name. - * @type array<\Google\Cloud\Optimization\V1\OptimizeToursValidationError\FieldReference>|\Google\Protobuf\Internal\RepeatedField $fields - * An error context may involve 0, 1 (most of the time) or more fields. For - * example, referring to vehicle #4 and shipment #2's first pickup can be - * done as follows: - * ``` - * fields { name: "vehicles" index: 4} - * fields { name: "shipments" index: 2 sub_field {name: "pickups" index: 0} } - * ``` - * Note, however, that the cardinality of `fields` should not change for a - * given error code. - * @type string $error_message - * Human-readable string describing the error. There is a 1:1 mapping - * between `code` and `error_message` (when code != "UNSPECIFIED"). - * *STABILITY*: Not stable: the error message associated to a given `code` may - * change (hopefully to clarify it) over time. Please rely on the - * `display_name` and `code` instead. - * @type string $offending_values - * May contain the value(s) of the field(s). This is not always available. You - * should absolutely not rely on it and use it only for manual model - * debugging. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); - parent::__construct($data); - } - - /** - * A validation error is defined by the pair (`code`, `display_name`) which - * are always present. - * Other fields (below) provide more context about the error. - * *MULTIPLE ERRORS*: - * When there are multiple errors, the validation process tries to output - * several of them. Much like a compiler, this is an imperfect process. Some - * validation errors will be "fatal", meaning that they stop the entire - * validation process. This is the case for `display_name="UNSPECIFIED"` - * errors, among others. Some may cause the validation process to skip other - * errors. - * *STABILITY*: - * `code` and `display_name` should be very stable. But new codes and - * display names may appear over time, which may cause a given (invalid) - * request to yield a different (`code`, `display_name`) pair because the new - * error hid the old one (see "MULTIPLE ERRORS"). - * *REFERENCE*: A list of all (code, name) pairs: - * * UNSPECIFIED = 0; - * * VALIDATION_TIMEOUT_ERROR = 10; Validation couldn't be completed within - * the deadline. - * * REQUEST_OPTIONS_ERROR = 12; - * * REQUEST_OPTIONS_INVALID_SOLVING_MODE = 1201; - * * REQUEST_OPTIONS_INVALID_MAX_VALIDATION_ERRORS = 1203; - * * REQUEST_OPTIONS_INVALID_GEODESIC_METERS_PER_SECOND = 1204; - * * REQUEST_OPTIONS_GEODESIC_METERS_PER_SECOND_TOO_SMALL = 1205; - * * REQUEST_OPTIONS_MISSING_GEODESIC_METERS_PER_SECOND = 1206; - * * REQUEST_OPTIONS_POPULATE_PATHFINDER_TRIPS_AND_GEODESIC_DISTANCE - * = 1207; - * * REQUEST_OPTIONS_COST_MODEL_OPTIONS_AND_GEODESIC_DISTANCE = 1208; - * * REQUEST_OPTIONS_TRAVEL_MODE_INCOMPATIBLE_WITH_TRAFFIC = 1211; - * * REQUEST_OPTIONS_MULTIPLE_TRAFFIC_FLAVORS = 1212; - * * REQUEST_OPTIONS_INVALID_TRAFFIC_FLAVOR = 1213; - * * REQUEST_OPTIONS_TRAFFIC_ENABLED_WITHOUT_GLOBAL_START_TIME = 1214; - * * REQUEST_OPTIONS_TRAFFIC_ENABLED_WITH_PRECEDENCES = 1215; - * * REQUEST_OPTIONS_TRAFFIC_PREFILL_MODE_INVALID = 1216; - * * REQUEST_OPTIONS_TRAFFIC_PREFILL_ENABLED_WITHOUT_TRAFFIC = 1217; - * * INJECTED_SOLUTION_ERROR = 20; - * * INJECTED_SOLUTION_MISSING_LABEL = 2000; - * * INJECTED_SOLUTION_DUPLICATE_LABEL = 2001; - * * INJECTED_SOLUTION_AMBIGUOUS_INDEX = 2002; - * * INJECTED_SOLUTION_INFEASIBLE_AFTER_GETTING_TRAVEL_TIMES = 2003; - * * INJECTED_SOLUTION_TRANSITION_INCONSISTENT_WITH_ACTUAL_TRAVEL = 2004; - * * INJECTED_SOLUTION_CONCURRENT_SOLUTION_TYPES = 2005; - * * INJECTED_SOLUTION_MORE_THAN_ONE_PER_TYPE = 2006; - * * INJECTED_SOLUTION_REFRESH_WITHOUT_POPULATE = 2008; - * * INJECTED_SOLUTION_CONSTRAINED_ROUTE_PORTION_INFEASIBLE = 2010; - * * SHIPMENT_MODEL_ERROR = 22; - * * SHIPMENT_MODEL_TOO_LARGE = 2200; - * * SHIPMENT_MODEL_TOO_MANY_CAPACITY_TYPES = 2201; - * * SHIPMENT_MODEL_GLOBAL_START_TIME_NEGATIVE_OR_NAN = 2202; - * * SHIPMENT_MODEL_GLOBAL_END_TIME_TOO_LARGE_OR_NAN = 2203; - * * SHIPMENT_MODEL_GLOBAL_START_TIME_AFTER_GLOBAL_END_TIME = 2204; - * * SHIPMENT_MODEL_GLOBAL_DURATION_TOO_LONG = 2205; - * * SHIPMENT_MODEL_MAX_ACTIVE_VEHICLES_NOT_POSITIVE = 2206; - * * SHIPMENT_MODEL_DURATION_MATRIX_TOO_LARGE = 2207; - * * INDEX_ERROR = 24; - * * TAG_ERROR = 26; - * * TIME_WINDOW_ERROR = 28; - * * TIME_WINDOW_INVALID_START_TIME = 2800; - * * TIME_WINDOW_INVALID_END_TIME = 2801; - * * TIME_WINDOW_INVALID_SOFT_START_TIME = 2802; - * * TIME_WINDOW_INVALID_SOFT_END_TIME = 2803; - * * TIME_WINDOW_OUTSIDE_GLOBAL_TIME_WINDOW = 2804; - * * TIME_WINDOW_START_TIME_AFTER_END_TIME = 2805; - * * TIME_WINDOW_INVALID_COST_PER_HOUR_BEFORE_SOFT_START_TIME = 2806; - * * TIME_WINDOW_INVALID_COST_PER_HOUR_AFTER_SOFT_END_TIME = 2807; - * * TIME_WINDOW_COST_BEFORE_SOFT_START_TIME_WITHOUT_SOFT_START_TIME - * = 2808; - * * TIME_WINDOW_COST_AFTER_SOFT_END_TIME_WITHOUT_SOFT_END_TIME = 2809; - * * TIME_WINDOW_SOFT_START_TIME_WITHOUT_COST_BEFORE_SOFT_START_TIME - * = 2810; - * * TIME_WINDOW_SOFT_END_TIME_WITHOUT_COST_AFTER_SOFT_END_TIME = 2811; - * * TIME_WINDOW_OVERLAPPING_ADJACENT_OR_EARLIER_THAN_PREVIOUS = 2812; - * * TIME_WINDOW_START_TIME_AFTER_SOFT_START_TIME = 2813; - * * TIME_WINDOW_SOFT_START_TIME_AFTER_END_TIME = 2814; - * * TIME_WINDOW_START_TIME_AFTER_SOFT_END_TIME = 2815; - * * TIME_WINDOW_SOFT_END_TIME_AFTER_END_TIME = 2816; - * * TIME_WINDOW_COST_BEFORE_SOFT_START_TIME_SET_AND_MULTIPLE_WINDOWS - * = 2817; - * * TIME_WINDOW_COST_AFTER_SOFT_END_TIME_SET_AND_MULTIPLE_WINDOWS = 2818; - * * TRANSITION_ATTRIBUTES_ERROR = 30; - * * TRANSITION_ATTRIBUTES_INVALID_COST = 3000; - * * TRANSITION_ATTRIBUTES_INVALID_COST_PER_KILOMETER = 3001; - * * TRANSITION_ATTRIBUTES_DUPLICATE_TAG_PAIR = 3002; - * * TRANSITION_ATTRIBUTES_DISTANCE_LIMIT_MAX_METERS_UNSUPPORTED = 3003; - * * TRANSITION_ATTRIBUTES_UNSPECIFIED_SOURCE_TAGS = 3004; - * * TRANSITION_ATTRIBUTES_CONFLICTING_SOURCE_TAGS_FIELDS = 3005; - * * TRANSITION_ATTRIBUTES_UNSPECIFIED_DESTINATION_TAGS = 3006; - * * TRANSITION_ATTRIBUTES_CONFLICTING_DESTINATION_TAGS_FIELDS = 3007; - * * TRANSITION_ATTRIBUTES_DELAY_DURATION_NEGATIVE_OR_NAN = 3008; - * * TRANSITION_ATTRIBUTES_DELAY_DURATION_EXCEEDS_GLOBAL_DURATION = 3009; - * * AMOUNT_ERROR = 31; - * * AMOUNT_NEGATIVE_VALUE = 3100; - * * LOAD_LIMIT_ERROR = 33; - * * LOAD_LIMIT_INVALID_COST_ABOVE_SOFT_MAX = 3303; - * * LOAD_LIMIT_SOFT_MAX_WITHOUT_COST_ABOVE_SOFT_MAX = 3304; - * * LOAD_LIMIT_COST_ABOVE_SOFT_MAX_WITHOUT_SOFT_MAX = 3305; - * * LOAD_LIMIT_NEGATIVE_SOFT_MAX = 3306; - * * LOAD_LIMIT_MIXED_DEMAND_TYPE = 3307; - * * LOAD_LIMIT_MAX_LOAD_NEGATIVE_VALUE = 3308; - * * LOAD_LIMIT_SOFT_MAX_ABOVE_MAX = 3309; - * * INTERVAL_ERROR = 34; - * * INTERVAL_MIN_EXCEEDS_MAX = 3401; - * * INTERVAL_NEGATIVE_MIN = 3402; - * * INTERVAL_NEGATIVE_MAX = 3403; - * * INTERVAL_MIN_EXCEEDS_CAPACITY = 3404; - * * INTERVAL_MAX_EXCEEDS_CAPACITY = 3405; - * * DISTANCE_LIMIT_ERROR = 36; - * * DISTANCE_LIMIT_INVALID_COST_AFTER_SOFT_MAX = 3601; - * * DISTANCE_LIMIT_SOFT_MAX_WITHOUT_COST_AFTER_SOFT_MAX = 3602; - * * DISTANCE_LIMIT_COST_AFTER_SOFT_MAX_WITHOUT_SOFT_MAX = 3603; - * * DISTANCE_LIMIT_NEGATIVE_MAX = 3604; - * * DISTANCE_LIMIT_NEGATIVE_SOFT_MAX = 3605; - * * DISTANCE_LIMIT_SOFT_MAX_LARGER_THAN_MAX = 3606; - * * DURATION_LIMIT_ERROR = 38; - * * DURATION_LIMIT_MAX_DURATION_NEGATIVE_OR_NAN = 3800; - * * DURATION_LIMIT_SOFT_MAX_DURATION_NEGATIVE_OR_NAN = 3801; - * * DURATION_LIMIT_INVALID_COST_PER_HOUR_AFTER_SOFT_MAX = 3802; - * * DURATION_LIMIT_SOFT_MAX_WITHOUT_COST_AFTER_SOFT_MAX = 3803; - * * DURATION_LIMIT_COST_AFTER_SOFT_MAX_WITHOUT_SOFT_MAX = 3804; - * * DURATION_LIMIT_QUADRATIC_SOFT_MAX_DURATION_NEGATIVE_OR_NAN = 3805; - * * DURATION_LIMIT_INVALID_COST_AFTER_QUADRATIC_SOFT_MAX = 3806; - * * DURATION_LIMIT_QUADRATIC_SOFT_MAX_WITHOUT_COST_PER_SQUARE_HOUR - * = 3807; - * * DURATION_LIMIT_COST_PER_SQUARE_HOUR_WITHOUT_QUADRATIC_SOFT_MAX - * = 3808; - * * DURATION_LIMIT_QUADRATIC_SOFT_MAX_WITHOUT_MAX = 3809; - * * DURATION_LIMIT_SOFT_MAX_LARGER_THAN_MAX = 3810; - * * DURATION_LIMIT_QUADRATIC_SOFT_MAX_LARGER_THAN_MAX = 3811; - * * DURATION_LIMIT_DIFF_BETWEEN_MAX_AND_QUADRATIC_SOFT_MAX_TOO_LARGE - * = 3812; - * * DURATION_LIMIT_MAX_DURATION_EXCEEDS_GLOBAL_DURATION = 3813; - * * DURATION_LIMIT_SOFT_MAX_DURATION_EXCEEDS_GLOBAL_DURATION = 3814; - * * DURATION_LIMIT_QUADRATIC_SOFT_MAX_DURATION_EXCEEDS_GLOBAL_DURATION - * = 3815; - * * SHIPMENT_ERROR = 40; - * * SHIPMENT_PD_LIMIT_WITHOUT_PICKUP_AND_DELIVERY = 4014; - * * SHIPMENT_PD_ABSOLUTE_DETOUR_LIMIT_DURATION_NEGATIVE_OR_NAN = 4000; - * * SHIPMENT_PD_ABSOLUTE_DETOUR_LIMIT_DURATION_EXCEEDS_GLOBAL_DURATION - * = 4001; - * * SHIPMENT_PD_RELATIVE_DETOUR_LIMIT_INVALID = 4015; - * * SHIPMENT_PD_DETOUR_LIMIT_AND_EXTRA_VISIT_DURATION = 4016; - * * SHIPMENT_PD_TIME_LIMIT_DURATION_NEGATIVE_OR_NAN = 4002; - * * SHIPMENT_PD_TIME_LIMIT_DURATION_EXCEEDS_GLOBAL_DURATION = 4003; - * * SHIPMENT_EMPTY_SHIPMENT_TYPE = 4004; - * * SHIPMENT_NO_PICKUP_NO_DELIVERY = 4005; - * * SHIPMENT_INVALID_PENALTY_COST = 4006; - * * SHIPMENT_ALLOWED_VEHICLE_INDEX_OUT_OF_BOUNDS = 4007; - * * SHIPMENT_DUPLICATE_ALLOWED_VEHICLE_INDEX = 4008; - * * SHIPMENT_INCONSISTENT_COST_FOR_VEHICLE_SIZE_WITHOUT_INDEX = 4009; - * * SHIPMENT_INCONSISTENT_COST_FOR_VEHICLE_SIZE_WITH_INDEX = 4010; - * * SHIPMENT_INVALID_COST_FOR_VEHICLE = 4011; - * * SHIPMENT_COST_FOR_VEHICLE_INDEX_OUT_OF_BOUNDS = 4012; - * * SHIPMENT_DUPLICATE_COST_FOR_VEHICLE_INDEX = 4013; - * * VEHICLE_ERROR = 42; - * * VEHICLE_EMPTY_REQUIRED_OPERATOR_TYPE = 4200; - * * VEHICLE_DUPLICATE_REQUIRED_OPERATOR_TYPE = 4201; - * * VEHICLE_NO_OPERATOR_WITH_REQUIRED_OPERATOR_TYPE = 4202; - * * VEHICLE_EMPTY_START_TAG = 4203; - * * VEHICLE_DUPLICATE_START_TAG = 4204; - * * VEHICLE_EMPTY_END_TAG = 4205; - * * VEHICLE_DUPLICATE_END_TAG = 4206; - * * VEHICLE_EXTRA_VISIT_DURATION_NEGATIVE_OR_NAN = 4207; - * * VEHICLE_EXTRA_VISIT_DURATION_EXCEEDS_GLOBAL_DURATION = 4208; - * * VEHICLE_EXTRA_VISIT_DURATION_EMPTY_KEY = 4209; - * * VEHICLE_FIRST_SHIPMENT_INDEX_OUT_OF_BOUNDS = 4210; - * * VEHICLE_FIRST_SHIPMENT_IGNORED = 4211; - * * VEHICLE_FIRST_SHIPMENT_NOT_BOUND = 4212; - * * VEHICLE_LAST_SHIPMENT_INDEX_OUT_OF_BOUNDS = 4213; - * * VEHICLE_LAST_SHIPMENT_IGNORED = 4214; - * * VEHICLE_LAST_SHIPMENT_NOT_BOUND = 4215; - * * VEHICLE_IGNORED_WITH_USED_IF_ROUTE_IS_EMPTY = 4216; - * * VEHICLE_INVALID_COST_PER_KILOMETER = 4217; - * * VEHICLE_INVALID_COST_PER_HOUR = 4218; - * * VEHICLE_INVALID_COST_PER_TRAVELED_HOUR = 4219; - * * VEHICLE_INVALID_FIXED_COST = 4220; - * * VEHICLE_INVALID_TRAVEL_DURATION_MULTIPLE = 4221; - * * VEHICLE_TRAVEL_DURATION_MULTIPLE_WITH_SHIPMENT_PD_DETOUR_LIMITS - * = 4223; - * * VEHICLE_MATRIX_INDEX_WITH_SHIPMENT_PD_DETOUR_LIMITS = 4224; - * * VEHICLE_MINIMUM_DURATION_LONGER_THAN_DURATION_LIMIT = 4222; - * * VISIT_REQUEST_ERROR = 44; - * * VISIT_REQUEST_EMPTY_TAG = 4400; - * * VISIT_REQUEST_DUPLICATE_TAG = 4401; - * * VISIT_REQUEST_DURATION_NEGATIVE_OR_NAN = 4404; - * * VISIT_REQUEST_DURATION_EXCEEDS_GLOBAL_DURATION = 4405; - * * PRECEDENCE_ERROR = 46; - * * PRECEDENCE_RULE_MISSING_FIRST_INDEX = 4600; - * * PRECEDENCE_RULE_MISSING_SECOND_INDEX = 4601; - * * PRECEDENCE_RULE_FIRST_INDEX_OUT_OF_BOUNDS = 4602; - * * PRECEDENCE_RULE_SECOND_INDEX_OUT_OF_BOUNDS = 4603; - * * PRECEDENCE_RULE_DUPLICATE_INDEX = 4604; - * * PRECEDENCE_RULE_INEXISTENT_FIRST_VISIT_REQUEST = 4605; - * * PRECEDENCE_RULE_INEXISTENT_SECOND_VISIT_REQUEST = 4606; - * * BREAK_ERROR = 48; - * * BREAK_RULE_EMPTY = 4800; - * * BREAK_REQUEST_UNSPECIFIED_DURATION = 4801; - * * BREAK_REQUEST_UNSPECIFIED_EARLIEST_START_TIME = 4802; - * * BREAK_REQUEST_UNSPECIFIED_LATEST_START_TIME = 4803; - * * BREAK_REQUEST_DURATION_NEGATIVE_OR_NAN = 4804; = 4804; - * * BREAK_REQUEST_LATEST_START_TIME_BEFORE_EARLIEST_START_TIME = 4805; - * * BREAK_REQUEST_EARLIEST_START_TIME_BEFORE_GLOBAL_START_TIME = 4806; - * * BREAK_REQUEST_LATEST_END_TIME_AFTER_GLOBAL_END_TIME = 4807; - * * BREAK_REQUEST_NON_SCHEDULABLE = 4808; - * * BREAK_FREQUENCY_MAX_INTER_BREAK_DURATION_NEGATIVE_OR_NAN = 4809; - * * BREAK_FREQUENCY_MIN_BREAK_DURATION_NEGATIVE_OR_NAN = 4810; - * * BREAK_FREQUENCY_MIN_BREAK_DURATION_EXCEEDS_GLOBAL_DURATION = 4811; - * * BREAK_FREQUENCY_MAX_INTER_BREAK_DURATION_EXCEEDS_GLOBAL_DURATION - * = 4812; - * * BREAK_REQUEST_DURATION_EXCEEDS_GLOBAL_DURATION = 4813; - * * BREAK_FREQUENCY_MISSING_MAX_INTER_BREAK_DURATION = 4814; - * * BREAK_FREQUENCY_MISSING_MIN_BREAK_DURATION = 4815; - * * SHIPMENT_TYPE_INCOMPATIBILITY_ERROR = 50; - * * SHIPMENT_TYPE_INCOMPATIBILITY_EMPTY_TYPE = 5001; - * * SHIPMENT_TYPE_INCOMPATIBILITY_LESS_THAN_TWO_TYPES = 5002; - * * SHIPMENT_TYPE_INCOMPATIBILITY_DUPLICATE_TYPE = 5003; - * * SHIPMENT_TYPE_INCOMPATIBILITY_INVALID_INCOMPATIBILITY_MODE = 5004; - * * SHIPMENT_TYPE_INCOMPATIBILITY_TOO_MANY_INCOMPATIBILITIES = 5005; - * * SHIPMENT_TYPE_REQUIREMENT_ERROR = 52; - * * SHIPMENT_TYPE_REQUIREMENT_NO_REQUIRED_TYPE = 52001; - * * SHIPMENT_TYPE_REQUIREMENT_NO_DEPENDENT_TYPE = 52002; - * * SHIPMENT_TYPE_REQUIREMENT_INVALID_REQUIREMENT_MODE = 52003; - * * SHIPMENT_TYPE_REQUIREMENT_TOO_MANY_REQUIREMENTS = 52004; - * * SHIPMENT_TYPE_REQUIREMENT_EMPTY_REQUIRED_TYPE = 52005; - * * SHIPMENT_TYPE_REQUIREMENT_DUPLICATE_REQUIRED_TYPE = 52006; - * * SHIPMENT_TYPE_REQUIREMENT_NO_REQUIRED_TYPE_FOUND = 52007; - * * SHIPMENT_TYPE_REQUIREMENT_EMPTY_DEPENDENT_TYPE = 52008; - * * SHIPMENT_TYPE_REQUIREMENT_DUPLICATE_DEPENDENT_TYPE = 52009; - * * SHIPMENT_TYPE_REQUIREMENT_SELF_DEPENDENT_TYPE = 52010; - * * SHIPMENT_TYPE_REQUIREMENT_GRAPH_HAS_CYCLES = 52011; - * * VEHICLE_OPERATOR_ERROR = 54; - * * VEHICLE_OPERATOR_EMPTY_TYPE = 5400; - * * VEHICLE_OPERATOR_MULTIPLE_START_TIME_WINDOWS = 5401; - * * VEHICLE_OPERATOR_SOFT_START_TIME_WINDOW = 5402; - * * VEHICLE_OPERATOR_MULTIPLE_END_TIME_WINDOWS = 5403; - * * VEHICLE_OPERATOR_SOFT_END_TIME_WINDOW = 5404; - * * DURATION_SECONDS_MATRIX_ERROR = 56; - * * DURATION_SECONDS_MATRIX_DURATION_NEGATIVE_OR_NAN = 5600; - * * DURATION_SECONDS_MATRIX_DURATION_EXCEEDS_GLOBAL_DURATION = 5601; - * - * Generated from protobuf field int32 code = 1; - * @return int - */ - public function getCode() - { - return $this->code; - } - - /** - * A validation error is defined by the pair (`code`, `display_name`) which - * are always present. - * Other fields (below) provide more context about the error. - * *MULTIPLE ERRORS*: - * When there are multiple errors, the validation process tries to output - * several of them. Much like a compiler, this is an imperfect process. Some - * validation errors will be "fatal", meaning that they stop the entire - * validation process. This is the case for `display_name="UNSPECIFIED"` - * errors, among others. Some may cause the validation process to skip other - * errors. - * *STABILITY*: - * `code` and `display_name` should be very stable. But new codes and - * display names may appear over time, which may cause a given (invalid) - * request to yield a different (`code`, `display_name`) pair because the new - * error hid the old one (see "MULTIPLE ERRORS"). - * *REFERENCE*: A list of all (code, name) pairs: - * * UNSPECIFIED = 0; - * * VALIDATION_TIMEOUT_ERROR = 10; Validation couldn't be completed within - * the deadline. - * * REQUEST_OPTIONS_ERROR = 12; - * * REQUEST_OPTIONS_INVALID_SOLVING_MODE = 1201; - * * REQUEST_OPTIONS_INVALID_MAX_VALIDATION_ERRORS = 1203; - * * REQUEST_OPTIONS_INVALID_GEODESIC_METERS_PER_SECOND = 1204; - * * REQUEST_OPTIONS_GEODESIC_METERS_PER_SECOND_TOO_SMALL = 1205; - * * REQUEST_OPTIONS_MISSING_GEODESIC_METERS_PER_SECOND = 1206; - * * REQUEST_OPTIONS_POPULATE_PATHFINDER_TRIPS_AND_GEODESIC_DISTANCE - * = 1207; - * * REQUEST_OPTIONS_COST_MODEL_OPTIONS_AND_GEODESIC_DISTANCE = 1208; - * * REQUEST_OPTIONS_TRAVEL_MODE_INCOMPATIBLE_WITH_TRAFFIC = 1211; - * * REQUEST_OPTIONS_MULTIPLE_TRAFFIC_FLAVORS = 1212; - * * REQUEST_OPTIONS_INVALID_TRAFFIC_FLAVOR = 1213; - * * REQUEST_OPTIONS_TRAFFIC_ENABLED_WITHOUT_GLOBAL_START_TIME = 1214; - * * REQUEST_OPTIONS_TRAFFIC_ENABLED_WITH_PRECEDENCES = 1215; - * * REQUEST_OPTIONS_TRAFFIC_PREFILL_MODE_INVALID = 1216; - * * REQUEST_OPTIONS_TRAFFIC_PREFILL_ENABLED_WITHOUT_TRAFFIC = 1217; - * * INJECTED_SOLUTION_ERROR = 20; - * * INJECTED_SOLUTION_MISSING_LABEL = 2000; - * * INJECTED_SOLUTION_DUPLICATE_LABEL = 2001; - * * INJECTED_SOLUTION_AMBIGUOUS_INDEX = 2002; - * * INJECTED_SOLUTION_INFEASIBLE_AFTER_GETTING_TRAVEL_TIMES = 2003; - * * INJECTED_SOLUTION_TRANSITION_INCONSISTENT_WITH_ACTUAL_TRAVEL = 2004; - * * INJECTED_SOLUTION_CONCURRENT_SOLUTION_TYPES = 2005; - * * INJECTED_SOLUTION_MORE_THAN_ONE_PER_TYPE = 2006; - * * INJECTED_SOLUTION_REFRESH_WITHOUT_POPULATE = 2008; - * * INJECTED_SOLUTION_CONSTRAINED_ROUTE_PORTION_INFEASIBLE = 2010; - * * SHIPMENT_MODEL_ERROR = 22; - * * SHIPMENT_MODEL_TOO_LARGE = 2200; - * * SHIPMENT_MODEL_TOO_MANY_CAPACITY_TYPES = 2201; - * * SHIPMENT_MODEL_GLOBAL_START_TIME_NEGATIVE_OR_NAN = 2202; - * * SHIPMENT_MODEL_GLOBAL_END_TIME_TOO_LARGE_OR_NAN = 2203; - * * SHIPMENT_MODEL_GLOBAL_START_TIME_AFTER_GLOBAL_END_TIME = 2204; - * * SHIPMENT_MODEL_GLOBAL_DURATION_TOO_LONG = 2205; - * * SHIPMENT_MODEL_MAX_ACTIVE_VEHICLES_NOT_POSITIVE = 2206; - * * SHIPMENT_MODEL_DURATION_MATRIX_TOO_LARGE = 2207; - * * INDEX_ERROR = 24; - * * TAG_ERROR = 26; - * * TIME_WINDOW_ERROR = 28; - * * TIME_WINDOW_INVALID_START_TIME = 2800; - * * TIME_WINDOW_INVALID_END_TIME = 2801; - * * TIME_WINDOW_INVALID_SOFT_START_TIME = 2802; - * * TIME_WINDOW_INVALID_SOFT_END_TIME = 2803; - * * TIME_WINDOW_OUTSIDE_GLOBAL_TIME_WINDOW = 2804; - * * TIME_WINDOW_START_TIME_AFTER_END_TIME = 2805; - * * TIME_WINDOW_INVALID_COST_PER_HOUR_BEFORE_SOFT_START_TIME = 2806; - * * TIME_WINDOW_INVALID_COST_PER_HOUR_AFTER_SOFT_END_TIME = 2807; - * * TIME_WINDOW_COST_BEFORE_SOFT_START_TIME_WITHOUT_SOFT_START_TIME - * = 2808; - * * TIME_WINDOW_COST_AFTER_SOFT_END_TIME_WITHOUT_SOFT_END_TIME = 2809; - * * TIME_WINDOW_SOFT_START_TIME_WITHOUT_COST_BEFORE_SOFT_START_TIME - * = 2810; - * * TIME_WINDOW_SOFT_END_TIME_WITHOUT_COST_AFTER_SOFT_END_TIME = 2811; - * * TIME_WINDOW_OVERLAPPING_ADJACENT_OR_EARLIER_THAN_PREVIOUS = 2812; - * * TIME_WINDOW_START_TIME_AFTER_SOFT_START_TIME = 2813; - * * TIME_WINDOW_SOFT_START_TIME_AFTER_END_TIME = 2814; - * * TIME_WINDOW_START_TIME_AFTER_SOFT_END_TIME = 2815; - * * TIME_WINDOW_SOFT_END_TIME_AFTER_END_TIME = 2816; - * * TIME_WINDOW_COST_BEFORE_SOFT_START_TIME_SET_AND_MULTIPLE_WINDOWS - * = 2817; - * * TIME_WINDOW_COST_AFTER_SOFT_END_TIME_SET_AND_MULTIPLE_WINDOWS = 2818; - * * TRANSITION_ATTRIBUTES_ERROR = 30; - * * TRANSITION_ATTRIBUTES_INVALID_COST = 3000; - * * TRANSITION_ATTRIBUTES_INVALID_COST_PER_KILOMETER = 3001; - * * TRANSITION_ATTRIBUTES_DUPLICATE_TAG_PAIR = 3002; - * * TRANSITION_ATTRIBUTES_DISTANCE_LIMIT_MAX_METERS_UNSUPPORTED = 3003; - * * TRANSITION_ATTRIBUTES_UNSPECIFIED_SOURCE_TAGS = 3004; - * * TRANSITION_ATTRIBUTES_CONFLICTING_SOURCE_TAGS_FIELDS = 3005; - * * TRANSITION_ATTRIBUTES_UNSPECIFIED_DESTINATION_TAGS = 3006; - * * TRANSITION_ATTRIBUTES_CONFLICTING_DESTINATION_TAGS_FIELDS = 3007; - * * TRANSITION_ATTRIBUTES_DELAY_DURATION_NEGATIVE_OR_NAN = 3008; - * * TRANSITION_ATTRIBUTES_DELAY_DURATION_EXCEEDS_GLOBAL_DURATION = 3009; - * * AMOUNT_ERROR = 31; - * * AMOUNT_NEGATIVE_VALUE = 3100; - * * LOAD_LIMIT_ERROR = 33; - * * LOAD_LIMIT_INVALID_COST_ABOVE_SOFT_MAX = 3303; - * * LOAD_LIMIT_SOFT_MAX_WITHOUT_COST_ABOVE_SOFT_MAX = 3304; - * * LOAD_LIMIT_COST_ABOVE_SOFT_MAX_WITHOUT_SOFT_MAX = 3305; - * * LOAD_LIMIT_NEGATIVE_SOFT_MAX = 3306; - * * LOAD_LIMIT_MIXED_DEMAND_TYPE = 3307; - * * LOAD_LIMIT_MAX_LOAD_NEGATIVE_VALUE = 3308; - * * LOAD_LIMIT_SOFT_MAX_ABOVE_MAX = 3309; - * * INTERVAL_ERROR = 34; - * * INTERVAL_MIN_EXCEEDS_MAX = 3401; - * * INTERVAL_NEGATIVE_MIN = 3402; - * * INTERVAL_NEGATIVE_MAX = 3403; - * * INTERVAL_MIN_EXCEEDS_CAPACITY = 3404; - * * INTERVAL_MAX_EXCEEDS_CAPACITY = 3405; - * * DISTANCE_LIMIT_ERROR = 36; - * * DISTANCE_LIMIT_INVALID_COST_AFTER_SOFT_MAX = 3601; - * * DISTANCE_LIMIT_SOFT_MAX_WITHOUT_COST_AFTER_SOFT_MAX = 3602; - * * DISTANCE_LIMIT_COST_AFTER_SOFT_MAX_WITHOUT_SOFT_MAX = 3603; - * * DISTANCE_LIMIT_NEGATIVE_MAX = 3604; - * * DISTANCE_LIMIT_NEGATIVE_SOFT_MAX = 3605; - * * DISTANCE_LIMIT_SOFT_MAX_LARGER_THAN_MAX = 3606; - * * DURATION_LIMIT_ERROR = 38; - * * DURATION_LIMIT_MAX_DURATION_NEGATIVE_OR_NAN = 3800; - * * DURATION_LIMIT_SOFT_MAX_DURATION_NEGATIVE_OR_NAN = 3801; - * * DURATION_LIMIT_INVALID_COST_PER_HOUR_AFTER_SOFT_MAX = 3802; - * * DURATION_LIMIT_SOFT_MAX_WITHOUT_COST_AFTER_SOFT_MAX = 3803; - * * DURATION_LIMIT_COST_AFTER_SOFT_MAX_WITHOUT_SOFT_MAX = 3804; - * * DURATION_LIMIT_QUADRATIC_SOFT_MAX_DURATION_NEGATIVE_OR_NAN = 3805; - * * DURATION_LIMIT_INVALID_COST_AFTER_QUADRATIC_SOFT_MAX = 3806; - * * DURATION_LIMIT_QUADRATIC_SOFT_MAX_WITHOUT_COST_PER_SQUARE_HOUR - * = 3807; - * * DURATION_LIMIT_COST_PER_SQUARE_HOUR_WITHOUT_QUADRATIC_SOFT_MAX - * = 3808; - * * DURATION_LIMIT_QUADRATIC_SOFT_MAX_WITHOUT_MAX = 3809; - * * DURATION_LIMIT_SOFT_MAX_LARGER_THAN_MAX = 3810; - * * DURATION_LIMIT_QUADRATIC_SOFT_MAX_LARGER_THAN_MAX = 3811; - * * DURATION_LIMIT_DIFF_BETWEEN_MAX_AND_QUADRATIC_SOFT_MAX_TOO_LARGE - * = 3812; - * * DURATION_LIMIT_MAX_DURATION_EXCEEDS_GLOBAL_DURATION = 3813; - * * DURATION_LIMIT_SOFT_MAX_DURATION_EXCEEDS_GLOBAL_DURATION = 3814; - * * DURATION_LIMIT_QUADRATIC_SOFT_MAX_DURATION_EXCEEDS_GLOBAL_DURATION - * = 3815; - * * SHIPMENT_ERROR = 40; - * * SHIPMENT_PD_LIMIT_WITHOUT_PICKUP_AND_DELIVERY = 4014; - * * SHIPMENT_PD_ABSOLUTE_DETOUR_LIMIT_DURATION_NEGATIVE_OR_NAN = 4000; - * * SHIPMENT_PD_ABSOLUTE_DETOUR_LIMIT_DURATION_EXCEEDS_GLOBAL_DURATION - * = 4001; - * * SHIPMENT_PD_RELATIVE_DETOUR_LIMIT_INVALID = 4015; - * * SHIPMENT_PD_DETOUR_LIMIT_AND_EXTRA_VISIT_DURATION = 4016; - * * SHIPMENT_PD_TIME_LIMIT_DURATION_NEGATIVE_OR_NAN = 4002; - * * SHIPMENT_PD_TIME_LIMIT_DURATION_EXCEEDS_GLOBAL_DURATION = 4003; - * * SHIPMENT_EMPTY_SHIPMENT_TYPE = 4004; - * * SHIPMENT_NO_PICKUP_NO_DELIVERY = 4005; - * * SHIPMENT_INVALID_PENALTY_COST = 4006; - * * SHIPMENT_ALLOWED_VEHICLE_INDEX_OUT_OF_BOUNDS = 4007; - * * SHIPMENT_DUPLICATE_ALLOWED_VEHICLE_INDEX = 4008; - * * SHIPMENT_INCONSISTENT_COST_FOR_VEHICLE_SIZE_WITHOUT_INDEX = 4009; - * * SHIPMENT_INCONSISTENT_COST_FOR_VEHICLE_SIZE_WITH_INDEX = 4010; - * * SHIPMENT_INVALID_COST_FOR_VEHICLE = 4011; - * * SHIPMENT_COST_FOR_VEHICLE_INDEX_OUT_OF_BOUNDS = 4012; - * * SHIPMENT_DUPLICATE_COST_FOR_VEHICLE_INDEX = 4013; - * * VEHICLE_ERROR = 42; - * * VEHICLE_EMPTY_REQUIRED_OPERATOR_TYPE = 4200; - * * VEHICLE_DUPLICATE_REQUIRED_OPERATOR_TYPE = 4201; - * * VEHICLE_NO_OPERATOR_WITH_REQUIRED_OPERATOR_TYPE = 4202; - * * VEHICLE_EMPTY_START_TAG = 4203; - * * VEHICLE_DUPLICATE_START_TAG = 4204; - * * VEHICLE_EMPTY_END_TAG = 4205; - * * VEHICLE_DUPLICATE_END_TAG = 4206; - * * VEHICLE_EXTRA_VISIT_DURATION_NEGATIVE_OR_NAN = 4207; - * * VEHICLE_EXTRA_VISIT_DURATION_EXCEEDS_GLOBAL_DURATION = 4208; - * * VEHICLE_EXTRA_VISIT_DURATION_EMPTY_KEY = 4209; - * * VEHICLE_FIRST_SHIPMENT_INDEX_OUT_OF_BOUNDS = 4210; - * * VEHICLE_FIRST_SHIPMENT_IGNORED = 4211; - * * VEHICLE_FIRST_SHIPMENT_NOT_BOUND = 4212; - * * VEHICLE_LAST_SHIPMENT_INDEX_OUT_OF_BOUNDS = 4213; - * * VEHICLE_LAST_SHIPMENT_IGNORED = 4214; - * * VEHICLE_LAST_SHIPMENT_NOT_BOUND = 4215; - * * VEHICLE_IGNORED_WITH_USED_IF_ROUTE_IS_EMPTY = 4216; - * * VEHICLE_INVALID_COST_PER_KILOMETER = 4217; - * * VEHICLE_INVALID_COST_PER_HOUR = 4218; - * * VEHICLE_INVALID_COST_PER_TRAVELED_HOUR = 4219; - * * VEHICLE_INVALID_FIXED_COST = 4220; - * * VEHICLE_INVALID_TRAVEL_DURATION_MULTIPLE = 4221; - * * VEHICLE_TRAVEL_DURATION_MULTIPLE_WITH_SHIPMENT_PD_DETOUR_LIMITS - * = 4223; - * * VEHICLE_MATRIX_INDEX_WITH_SHIPMENT_PD_DETOUR_LIMITS = 4224; - * * VEHICLE_MINIMUM_DURATION_LONGER_THAN_DURATION_LIMIT = 4222; - * * VISIT_REQUEST_ERROR = 44; - * * VISIT_REQUEST_EMPTY_TAG = 4400; - * * VISIT_REQUEST_DUPLICATE_TAG = 4401; - * * VISIT_REQUEST_DURATION_NEGATIVE_OR_NAN = 4404; - * * VISIT_REQUEST_DURATION_EXCEEDS_GLOBAL_DURATION = 4405; - * * PRECEDENCE_ERROR = 46; - * * PRECEDENCE_RULE_MISSING_FIRST_INDEX = 4600; - * * PRECEDENCE_RULE_MISSING_SECOND_INDEX = 4601; - * * PRECEDENCE_RULE_FIRST_INDEX_OUT_OF_BOUNDS = 4602; - * * PRECEDENCE_RULE_SECOND_INDEX_OUT_OF_BOUNDS = 4603; - * * PRECEDENCE_RULE_DUPLICATE_INDEX = 4604; - * * PRECEDENCE_RULE_INEXISTENT_FIRST_VISIT_REQUEST = 4605; - * * PRECEDENCE_RULE_INEXISTENT_SECOND_VISIT_REQUEST = 4606; - * * BREAK_ERROR = 48; - * * BREAK_RULE_EMPTY = 4800; - * * BREAK_REQUEST_UNSPECIFIED_DURATION = 4801; - * * BREAK_REQUEST_UNSPECIFIED_EARLIEST_START_TIME = 4802; - * * BREAK_REQUEST_UNSPECIFIED_LATEST_START_TIME = 4803; - * * BREAK_REQUEST_DURATION_NEGATIVE_OR_NAN = 4804; = 4804; - * * BREAK_REQUEST_LATEST_START_TIME_BEFORE_EARLIEST_START_TIME = 4805; - * * BREAK_REQUEST_EARLIEST_START_TIME_BEFORE_GLOBAL_START_TIME = 4806; - * * BREAK_REQUEST_LATEST_END_TIME_AFTER_GLOBAL_END_TIME = 4807; - * * BREAK_REQUEST_NON_SCHEDULABLE = 4808; - * * BREAK_FREQUENCY_MAX_INTER_BREAK_DURATION_NEGATIVE_OR_NAN = 4809; - * * BREAK_FREQUENCY_MIN_BREAK_DURATION_NEGATIVE_OR_NAN = 4810; - * * BREAK_FREQUENCY_MIN_BREAK_DURATION_EXCEEDS_GLOBAL_DURATION = 4811; - * * BREAK_FREQUENCY_MAX_INTER_BREAK_DURATION_EXCEEDS_GLOBAL_DURATION - * = 4812; - * * BREAK_REQUEST_DURATION_EXCEEDS_GLOBAL_DURATION = 4813; - * * BREAK_FREQUENCY_MISSING_MAX_INTER_BREAK_DURATION = 4814; - * * BREAK_FREQUENCY_MISSING_MIN_BREAK_DURATION = 4815; - * * SHIPMENT_TYPE_INCOMPATIBILITY_ERROR = 50; - * * SHIPMENT_TYPE_INCOMPATIBILITY_EMPTY_TYPE = 5001; - * * SHIPMENT_TYPE_INCOMPATIBILITY_LESS_THAN_TWO_TYPES = 5002; - * * SHIPMENT_TYPE_INCOMPATIBILITY_DUPLICATE_TYPE = 5003; - * * SHIPMENT_TYPE_INCOMPATIBILITY_INVALID_INCOMPATIBILITY_MODE = 5004; - * * SHIPMENT_TYPE_INCOMPATIBILITY_TOO_MANY_INCOMPATIBILITIES = 5005; - * * SHIPMENT_TYPE_REQUIREMENT_ERROR = 52; - * * SHIPMENT_TYPE_REQUIREMENT_NO_REQUIRED_TYPE = 52001; - * * SHIPMENT_TYPE_REQUIREMENT_NO_DEPENDENT_TYPE = 52002; - * * SHIPMENT_TYPE_REQUIREMENT_INVALID_REQUIREMENT_MODE = 52003; - * * SHIPMENT_TYPE_REQUIREMENT_TOO_MANY_REQUIREMENTS = 52004; - * * SHIPMENT_TYPE_REQUIREMENT_EMPTY_REQUIRED_TYPE = 52005; - * * SHIPMENT_TYPE_REQUIREMENT_DUPLICATE_REQUIRED_TYPE = 52006; - * * SHIPMENT_TYPE_REQUIREMENT_NO_REQUIRED_TYPE_FOUND = 52007; - * * SHIPMENT_TYPE_REQUIREMENT_EMPTY_DEPENDENT_TYPE = 52008; - * * SHIPMENT_TYPE_REQUIREMENT_DUPLICATE_DEPENDENT_TYPE = 52009; - * * SHIPMENT_TYPE_REQUIREMENT_SELF_DEPENDENT_TYPE = 52010; - * * SHIPMENT_TYPE_REQUIREMENT_GRAPH_HAS_CYCLES = 52011; - * * VEHICLE_OPERATOR_ERROR = 54; - * * VEHICLE_OPERATOR_EMPTY_TYPE = 5400; - * * VEHICLE_OPERATOR_MULTIPLE_START_TIME_WINDOWS = 5401; - * * VEHICLE_OPERATOR_SOFT_START_TIME_WINDOW = 5402; - * * VEHICLE_OPERATOR_MULTIPLE_END_TIME_WINDOWS = 5403; - * * VEHICLE_OPERATOR_SOFT_END_TIME_WINDOW = 5404; - * * DURATION_SECONDS_MATRIX_ERROR = 56; - * * DURATION_SECONDS_MATRIX_DURATION_NEGATIVE_OR_NAN = 5600; - * * DURATION_SECONDS_MATRIX_DURATION_EXCEEDS_GLOBAL_DURATION = 5601; - * - * Generated from protobuf field int32 code = 1; - * @param int $var - * @return $this - */ - public function setCode($var) - { - GPBUtil::checkInt32($var); - $this->code = $var; - - return $this; - } - - /** - * The error display name. - * - * Generated from protobuf field string display_name = 2; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * The error display name. - * - * Generated from protobuf field string display_name = 2; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * An error context may involve 0, 1 (most of the time) or more fields. For - * example, referring to vehicle #4 and shipment #2's first pickup can be - * done as follows: - * ``` - * fields { name: "vehicles" index: 4} - * fields { name: "shipments" index: 2 sub_field {name: "pickups" index: 0} } - * ``` - * Note, however, that the cardinality of `fields` should not change for a - * given error code. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.OptimizeToursValidationError.FieldReference fields = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFields() - { - return $this->fields; - } - - /** - * An error context may involve 0, 1 (most of the time) or more fields. For - * example, referring to vehicle #4 and shipment #2's first pickup can be - * done as follows: - * ``` - * fields { name: "vehicles" index: 4} - * fields { name: "shipments" index: 2 sub_field {name: "pickups" index: 0} } - * ``` - * Note, however, that the cardinality of `fields` should not change for a - * given error code. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.OptimizeToursValidationError.FieldReference fields = 3; - * @param array<\Google\Cloud\Optimization\V1\OptimizeToursValidationError\FieldReference>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFields($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\OptimizeToursValidationError\FieldReference::class); - $this->fields = $arr; - - return $this; - } - - /** - * Human-readable string describing the error. There is a 1:1 mapping - * between `code` and `error_message` (when code != "UNSPECIFIED"). - * *STABILITY*: Not stable: the error message associated to a given `code` may - * change (hopefully to clarify it) over time. Please rely on the - * `display_name` and `code` instead. - * - * Generated from protobuf field string error_message = 4; - * @return string - */ - public function getErrorMessage() - { - return $this->error_message; - } - - /** - * Human-readable string describing the error. There is a 1:1 mapping - * between `code` and `error_message` (when code != "UNSPECIFIED"). - * *STABILITY*: Not stable: the error message associated to a given `code` may - * change (hopefully to clarify it) over time. Please rely on the - * `display_name` and `code` instead. - * - * Generated from protobuf field string error_message = 4; - * @param string $var - * @return $this - */ - public function setErrorMessage($var) - { - GPBUtil::checkString($var, True); - $this->error_message = $var; - - return $this; - } - - /** - * May contain the value(s) of the field(s). This is not always available. You - * should absolutely not rely on it and use it only for manual model - * debugging. - * - * Generated from protobuf field string offending_values = 5; - * @return string - */ - public function getOffendingValues() - { - return $this->offending_values; - } - - /** - * May contain the value(s) of the field(s). This is not always available. You - * should absolutely not rely on it and use it only for manual model - * debugging. - * - * Generated from protobuf field string offending_values = 5; - * @param string $var - * @return $this - */ - public function setOffendingValues($var) - { - GPBUtil::checkString($var, True); - $this->offending_values = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/OptimizeToursValidationError/FieldReference.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/OptimizeToursValidationError/FieldReference.php deleted file mode 100644 index 6054ab294a5e..000000000000 --- a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/OptimizeToursValidationError/FieldReference.php +++ /dev/null @@ -1,197 +0,0 @@ -google.cloud.optimization.v1.OptimizeToursValidationError.FieldReference - */ -class FieldReference extends \Google\Protobuf\Internal\Message -{ - /** - * Name of the field, e.g., "vehicles". - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Recursively nested sub-field, if needed. - * - * Generated from protobuf field .google.cloud.optimization.v1.OptimizeToursValidationError.FieldReference sub_field = 3; - */ - protected $sub_field = null; - protected $index_or_key; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Name of the field, e.g., "vehicles". - * @type int $index - * Index of the field if repeated. - * @type string $key - * Key if the field is a map. - * @type \Google\Cloud\Optimization\V1\OptimizeToursValidationError\FieldReference $sub_field - * Recursively nested sub-field, if needed. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); - parent::__construct($data); - } - - /** - * Name of the field, e.g., "vehicles". - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Name of the field, e.g., "vehicles". - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Index of the field if repeated. - * - * Generated from protobuf field int32 index = 2; - * @return int - */ - public function getIndex() - { - return $this->readOneof(2); - } - - public function hasIndex() - { - return $this->hasOneof(2); - } - - /** - * Index of the field if repeated. - * - * Generated from protobuf field int32 index = 2; - * @param int $var - * @return $this - */ - public function setIndex($var) - { - GPBUtil::checkInt32($var); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Key if the field is a map. - * - * Generated from protobuf field string key = 4; - * @return string - */ - public function getKey() - { - return $this->readOneof(4); - } - - public function hasKey() - { - return $this->hasOneof(4); - } - - /** - * Key if the field is a map. - * - * Generated from protobuf field string key = 4; - * @param string $var - * @return $this - */ - public function setKey($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Recursively nested sub-field, if needed. - * - * Generated from protobuf field .google.cloud.optimization.v1.OptimizeToursValidationError.FieldReference sub_field = 3; - * @return \Google\Cloud\Optimization\V1\OptimizeToursValidationError\FieldReference|null - */ - public function getSubField() - { - return $this->sub_field; - } - - public function hasSubField() - { - return isset($this->sub_field); - } - - public function clearSubField() - { - unset($this->sub_field); - } - - /** - * Recursively nested sub-field, if needed. - * - * Generated from protobuf field .google.cloud.optimization.v1.OptimizeToursValidationError.FieldReference sub_field = 3; - * @param \Google\Cloud\Optimization\V1\OptimizeToursValidationError\FieldReference $var - * @return $this - */ - public function setSubField($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Optimization\V1\OptimizeToursValidationError\FieldReference::class); - $this->sub_field = $var; - - return $this; - } - - /** - * @return string - */ - public function getIndexOrKey() - { - return $this->whichOneof("index_or_key"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(FieldReference::class, \Google\Cloud\Optimization\V1\OptimizeToursValidationError_FieldReference::class); - diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/OutputConfig.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/OutputConfig.php deleted file mode 100644 index b8b6565a9842..000000000000 --- a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/OutputConfig.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.optimization.v1.OutputConfig - */ -class OutputConfig extends \Google\Protobuf\Internal\Message -{ - /** - * The output data format that used to store the results in Cloud Storage. - * - * Generated from protobuf field .google.cloud.optimization.v1.DataFormat data_format = 2; - */ - protected $data_format = 0; - protected $destination; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Optimization\V1\GcsDestination $gcs_destination - * The Google Cloud Storage location to write the output to. - * @type int $data_format - * The output data format that used to store the results in Cloud Storage. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Optimization\V1\AsyncModel::initOnce(); - parent::__construct($data); - } - - /** - * The Google Cloud Storage location to write the output to. - * - * Generated from protobuf field .google.cloud.optimization.v1.GcsDestination gcs_destination = 1; - * @return \Google\Cloud\Optimization\V1\GcsDestination|null - */ - public function getGcsDestination() - { - return $this->readOneof(1); - } - - public function hasGcsDestination() - { - return $this->hasOneof(1); - } - - /** - * The Google Cloud Storage location to write the output to. - * - * Generated from protobuf field .google.cloud.optimization.v1.GcsDestination gcs_destination = 1; - * @param \Google\Cloud\Optimization\V1\GcsDestination $var - * @return $this - */ - public function setGcsDestination($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Optimization\V1\GcsDestination::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * The output data format that used to store the results in Cloud Storage. - * - * Generated from protobuf field .google.cloud.optimization.v1.DataFormat data_format = 2; - * @return int - */ - public function getDataFormat() - { - return $this->data_format; - } - - /** - * The output data format that used to store the results in Cloud Storage. - * - * Generated from protobuf field .google.cloud.optimization.v1.DataFormat data_format = 2; - * @param int $var - * @return $this - */ - public function setDataFormat($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Optimization\V1\DataFormat::class); - $this->data_format = $var; - - return $this; - } - - /** - * @return string - */ - public function getDestination() - { - return $this->whichOneof("destination"); - } - -} - diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/RouteModifiers.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/RouteModifiers.php deleted file mode 100644 index 0a3309db7946..000000000000 --- a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/RouteModifiers.php +++ /dev/null @@ -1,204 +0,0 @@ -google.cloud.optimization.v1.RouteModifiers - */ -class RouteModifiers extends \Google\Protobuf\Internal\Message -{ - /** - * Specifies whether to avoid toll roads where reasonable. Preference will be - * given to routes not containing toll roads. Applies only to motorized travel - * modes. - * - * Generated from protobuf field bool avoid_tolls = 2; - */ - protected $avoid_tolls = false; - /** - * Specifies whether to avoid highways where reasonable. Preference will be - * given to routes not containing highways. Applies only to motorized travel - * modes. - * - * Generated from protobuf field bool avoid_highways = 3; - */ - protected $avoid_highways = false; - /** - * Specifies whether to avoid ferries where reasonable. Preference will be - * given to routes not containing travel by ferries. Applies only to motorized - * travel modes. - * - * Generated from protobuf field bool avoid_ferries = 4; - */ - protected $avoid_ferries = false; - /** - * Optional. Specifies whether to avoid navigating indoors where reasonable. - * Preference will be given to routes not containing indoor navigation. - * Applies only to the `WALKING` travel mode. - * - * Generated from protobuf field bool avoid_indoor = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $avoid_indoor = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $avoid_tolls - * Specifies whether to avoid toll roads where reasonable. Preference will be - * given to routes not containing toll roads. Applies only to motorized travel - * modes. - * @type bool $avoid_highways - * Specifies whether to avoid highways where reasonable. Preference will be - * given to routes not containing highways. Applies only to motorized travel - * modes. - * @type bool $avoid_ferries - * Specifies whether to avoid ferries where reasonable. Preference will be - * given to routes not containing travel by ferries. Applies only to motorized - * travel modes. - * @type bool $avoid_indoor - * Optional. Specifies whether to avoid navigating indoors where reasonable. - * Preference will be given to routes not containing indoor navigation. - * Applies only to the `WALKING` travel mode. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); - parent::__construct($data); - } - - /** - * Specifies whether to avoid toll roads where reasonable. Preference will be - * given to routes not containing toll roads. Applies only to motorized travel - * modes. - * - * Generated from protobuf field bool avoid_tolls = 2; - * @return bool - */ - public function getAvoidTolls() - { - return $this->avoid_tolls; - } - - /** - * Specifies whether to avoid toll roads where reasonable. Preference will be - * given to routes not containing toll roads. Applies only to motorized travel - * modes. - * - * Generated from protobuf field bool avoid_tolls = 2; - * @param bool $var - * @return $this - */ - public function setAvoidTolls($var) - { - GPBUtil::checkBool($var); - $this->avoid_tolls = $var; - - return $this; - } - - /** - * Specifies whether to avoid highways where reasonable. Preference will be - * given to routes not containing highways. Applies only to motorized travel - * modes. - * - * Generated from protobuf field bool avoid_highways = 3; - * @return bool - */ - public function getAvoidHighways() - { - return $this->avoid_highways; - } - - /** - * Specifies whether to avoid highways where reasonable. Preference will be - * given to routes not containing highways. Applies only to motorized travel - * modes. - * - * Generated from protobuf field bool avoid_highways = 3; - * @param bool $var - * @return $this - */ - public function setAvoidHighways($var) - { - GPBUtil::checkBool($var); - $this->avoid_highways = $var; - - return $this; - } - - /** - * Specifies whether to avoid ferries where reasonable. Preference will be - * given to routes not containing travel by ferries. Applies only to motorized - * travel modes. - * - * Generated from protobuf field bool avoid_ferries = 4; - * @return bool - */ - public function getAvoidFerries() - { - return $this->avoid_ferries; - } - - /** - * Specifies whether to avoid ferries where reasonable. Preference will be - * given to routes not containing travel by ferries. Applies only to motorized - * travel modes. - * - * Generated from protobuf field bool avoid_ferries = 4; - * @param bool $var - * @return $this - */ - public function setAvoidFerries($var) - { - GPBUtil::checkBool($var); - $this->avoid_ferries = $var; - - return $this; - } - - /** - * Optional. Specifies whether to avoid navigating indoors where reasonable. - * Preference will be given to routes not containing indoor navigation. - * Applies only to the `WALKING` travel mode. - * - * Generated from protobuf field bool avoid_indoor = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getAvoidIndoor() - { - return $this->avoid_indoor; - } - - /** - * Optional. Specifies whether to avoid navigating indoors where reasonable. - * Preference will be given to routes not containing indoor navigation. - * Applies only to the `WALKING` travel mode. - * - * Generated from protobuf field bool avoid_indoor = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setAvoidIndoor($var) - { - GPBUtil::checkBool($var); - $this->avoid_indoor = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/Shipment.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/Shipment.php deleted file mode 100644 index 652069078d66..000000000000 --- a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/Shipment.php +++ /dev/null @@ -1,850 +0,0 @@ -google.cloud.optimization.v1.Shipment - */ -class Shipment extends \Google\Protobuf\Internal\Message -{ - /** - * Set of pickup alternatives associated to the shipment. If not specified, - * the vehicle only needs to visit a location corresponding to the deliveries. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.Shipment.VisitRequest pickups = 1; - */ - private $pickups; - /** - * Set of delivery alternatives associated to the shipment. If not specified, - * the vehicle only needs to visit a location corresponding to the pickups. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.Shipment.VisitRequest deliveries = 2; - */ - private $deliveries; - /** - * Load demands of the shipment (for example weight, volume, number of - * pallets etc). The keys in the map should be identifiers describing the type - * of the corresponding load, ideally also including the units. - * For example: "weight_kg", "volume_gallons", "pallet_count", etc. - * If a given key does not appear in the map, the corresponding load is - * considered as null. - * - * Generated from protobuf field map load_demands = 14; - */ - private $load_demands; - /** - * If the shipment is not completed, this penalty is added to the overall - * cost of the routes. A shipment is considered completed if one of its pickup - * and delivery alternatives is visited. The cost may be expressed in the - * same unit used for all other cost-related fields in the model and must be - * positive. - * *IMPORTANT*: If this penalty is not specified, it is considered infinite, - * i.e. the shipment must be completed. - * - * Generated from protobuf field optional double penalty_cost = 4; - */ - protected $penalty_cost = null; - /** - * The set of vehicles that may perform this shipment. If empty, all vehicles - * may perform it. Vehicles are given by their index in the `ShipmentModel`'s - * `vehicles` list. - * - * Generated from protobuf field repeated int32 allowed_vehicle_indices = 5; - */ - private $allowed_vehicle_indices; - /** - * Specifies the cost that is incurred when this shipment is delivered by each - * vehicle. If specified, it must have EITHER: - * * the same number of elements as `costs_per_vehicle_indices`. - * `costs_per_vehicle[i]` corresponds to vehicle - * `costs_per_vehicle_indices[i]` of the model. - * * the same number of elements as there are vehicles in the model. The - * i-th element corresponds to vehicle #i of the model. - * These costs must be in the same unit as `penalty_cost` and must not be - * negative. Leave this field empty, if there are no such costs. - * - * Generated from protobuf field repeated double costs_per_vehicle = 6; - */ - private $costs_per_vehicle; - /** - * Indices of the vehicles to which `costs_per_vehicle` applies. If non-empty, - * it must have the same number of elements as `costs_per_vehicle`. A vehicle - * index may not be specified more than once. If a vehicle is excluded from - * `costs_per_vehicle_indices`, its cost is zero. - * - * Generated from protobuf field repeated int32 costs_per_vehicle_indices = 7; - */ - private $costs_per_vehicle_indices; - /** - * Specifies the maximum relative detour time compared to the shortest path - * from pickup to delivery. If specified, it must be nonnegative, and the - * shipment must contain at least a pickup and a delivery. - * For example, let t be the shortest time taken to go from the selected - * pickup alternative directly to the selected delivery alternative. Then - * setting `pickup_to_delivery_relative_detour_limit` enforces: - * ``` - * start_time(delivery) - start_time(pickup) <= - * std::ceil(t * (1.0 + pickup_to_delivery_relative_detour_limit)) - * ``` - * If both relative and absolute limits are specified on the same shipment, - * the more constraining limit is used for each possible pickup/delivery pair. - * As of 2017/10, detours are only supported when travel durations do not - * depend on vehicles. - * - * Generated from protobuf field optional double pickup_to_delivery_relative_detour_limit = 8; - */ - protected $pickup_to_delivery_relative_detour_limit = null; - /** - * Specifies the maximum absolute detour time compared to the shortest path - * from pickup to delivery. If specified, it must be nonnegative, and the - * shipment must contain at least a pickup and a delivery. - * For example, let t be the shortest time taken to go from the selected - * pickup alternative directly to the selected delivery alternative. Then - * setting `pickup_to_delivery_absolute_detour_limit` enforces: - * ``` - * start_time(delivery) - start_time(pickup) <= - * t + pickup_to_delivery_absolute_detour_limit - * ``` - * If both relative and absolute limits are specified on the same shipment, - * the more constraining limit is used for each possible pickup/delivery pair. - * As of 2017/10, detours are only supported when travel durations do not - * depend on vehicles. - * - * Generated from protobuf field .google.protobuf.Duration pickup_to_delivery_absolute_detour_limit = 9; - */ - protected $pickup_to_delivery_absolute_detour_limit = null; - /** - * Specifies the maximum duration from start of pickup to start of delivery of - * a shipment. If specified, it must be nonnegative, and the shipment must - * contain at least a pickup and a delivery. This does not depend on which - * alternatives are selected for pickup and delivery, nor on vehicle speed. - * This can be specified alongside maximum detour constraints: the solution - * will respect both specifications. - * - * Generated from protobuf field .google.protobuf.Duration pickup_to_delivery_time_limit = 10; - */ - protected $pickup_to_delivery_time_limit = null; - /** - * Non-empty string specifying a "type" for this shipment. - * This feature can be used to define incompatibilities or requirements - * between `shipment_types` (see `shipment_type_incompatibilities` and - * `shipment_type_requirements` in `ShipmentModel`). - * Differs from `visit_types` which is specified for a single visit: All - * pickup/deliveries belonging to the same shipment share the same - * `shipment_type`. - * - * Generated from protobuf field string shipment_type = 11; - */ - protected $shipment_type = ''; - /** - * Specifies a label for this shipment. This label is reported in the response - * in the `shipment_label` of the corresponding - * [ShipmentRoute.Visit][google.cloud.optimization.v1.ShipmentRoute.Visit]. - * - * Generated from protobuf field string label = 12; - */ - protected $label = ''; - /** - * If true, skip this shipment, but don't apply a `penalty_cost`. - * Ignoring a shipment results in a validation error when there are any - * `shipment_type_requirements` in the model. - * Ignoring a shipment that is performed in `injected_first_solution_routes` - * or `injected_solution_constraint` is permitted; the solver removes the - * related pickup/delivery visits from the performing route. - * `precedence_rules` that reference ignored shipments will also be ignored. - * - * Generated from protobuf field bool ignore = 13; - */ - protected $ignore = false; - /** - * Deprecated: Use - * [Shipment.load_demands][google.cloud.optimization.v1.Shipment.load_demands] - * instead. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.CapacityQuantity demands = 3 [deprecated = true]; - * @deprecated - */ - private $demands; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Optimization\V1\Shipment\VisitRequest>|\Google\Protobuf\Internal\RepeatedField $pickups - * Set of pickup alternatives associated to the shipment. If not specified, - * the vehicle only needs to visit a location corresponding to the deliveries. - * @type array<\Google\Cloud\Optimization\V1\Shipment\VisitRequest>|\Google\Protobuf\Internal\RepeatedField $deliveries - * Set of delivery alternatives associated to the shipment. If not specified, - * the vehicle only needs to visit a location corresponding to the pickups. - * @type array|\Google\Protobuf\Internal\MapField $load_demands - * Load demands of the shipment (for example weight, volume, number of - * pallets etc). The keys in the map should be identifiers describing the type - * of the corresponding load, ideally also including the units. - * For example: "weight_kg", "volume_gallons", "pallet_count", etc. - * If a given key does not appear in the map, the corresponding load is - * considered as null. - * @type float $penalty_cost - * If the shipment is not completed, this penalty is added to the overall - * cost of the routes. A shipment is considered completed if one of its pickup - * and delivery alternatives is visited. The cost may be expressed in the - * same unit used for all other cost-related fields in the model and must be - * positive. - * *IMPORTANT*: If this penalty is not specified, it is considered infinite, - * i.e. the shipment must be completed. - * @type array|\Google\Protobuf\Internal\RepeatedField $allowed_vehicle_indices - * The set of vehicles that may perform this shipment. If empty, all vehicles - * may perform it. Vehicles are given by their index in the `ShipmentModel`'s - * `vehicles` list. - * @type array|\Google\Protobuf\Internal\RepeatedField $costs_per_vehicle - * Specifies the cost that is incurred when this shipment is delivered by each - * vehicle. If specified, it must have EITHER: - * * the same number of elements as `costs_per_vehicle_indices`. - * `costs_per_vehicle[i]` corresponds to vehicle - * `costs_per_vehicle_indices[i]` of the model. - * * the same number of elements as there are vehicles in the model. The - * i-th element corresponds to vehicle #i of the model. - * These costs must be in the same unit as `penalty_cost` and must not be - * negative. Leave this field empty, if there are no such costs. - * @type array|\Google\Protobuf\Internal\RepeatedField $costs_per_vehicle_indices - * Indices of the vehicles to which `costs_per_vehicle` applies. If non-empty, - * it must have the same number of elements as `costs_per_vehicle`. A vehicle - * index may not be specified more than once. If a vehicle is excluded from - * `costs_per_vehicle_indices`, its cost is zero. - * @type float $pickup_to_delivery_relative_detour_limit - * Specifies the maximum relative detour time compared to the shortest path - * from pickup to delivery. If specified, it must be nonnegative, and the - * shipment must contain at least a pickup and a delivery. - * For example, let t be the shortest time taken to go from the selected - * pickup alternative directly to the selected delivery alternative. Then - * setting `pickup_to_delivery_relative_detour_limit` enforces: - * ``` - * start_time(delivery) - start_time(pickup) <= - * std::ceil(t * (1.0 + pickup_to_delivery_relative_detour_limit)) - * ``` - * If both relative and absolute limits are specified on the same shipment, - * the more constraining limit is used for each possible pickup/delivery pair. - * As of 2017/10, detours are only supported when travel durations do not - * depend on vehicles. - * @type \Google\Protobuf\Duration $pickup_to_delivery_absolute_detour_limit - * Specifies the maximum absolute detour time compared to the shortest path - * from pickup to delivery. If specified, it must be nonnegative, and the - * shipment must contain at least a pickup and a delivery. - * For example, let t be the shortest time taken to go from the selected - * pickup alternative directly to the selected delivery alternative. Then - * setting `pickup_to_delivery_absolute_detour_limit` enforces: - * ``` - * start_time(delivery) - start_time(pickup) <= - * t + pickup_to_delivery_absolute_detour_limit - * ``` - * If both relative and absolute limits are specified on the same shipment, - * the more constraining limit is used for each possible pickup/delivery pair. - * As of 2017/10, detours are only supported when travel durations do not - * depend on vehicles. - * @type \Google\Protobuf\Duration $pickup_to_delivery_time_limit - * Specifies the maximum duration from start of pickup to start of delivery of - * a shipment. If specified, it must be nonnegative, and the shipment must - * contain at least a pickup and a delivery. This does not depend on which - * alternatives are selected for pickup and delivery, nor on vehicle speed. - * This can be specified alongside maximum detour constraints: the solution - * will respect both specifications. - * @type string $shipment_type - * Non-empty string specifying a "type" for this shipment. - * This feature can be used to define incompatibilities or requirements - * between `shipment_types` (see `shipment_type_incompatibilities` and - * `shipment_type_requirements` in `ShipmentModel`). - * Differs from `visit_types` which is specified for a single visit: All - * pickup/deliveries belonging to the same shipment share the same - * `shipment_type`. - * @type string $label - * Specifies a label for this shipment. This label is reported in the response - * in the `shipment_label` of the corresponding - * [ShipmentRoute.Visit][google.cloud.optimization.v1.ShipmentRoute.Visit]. - * @type bool $ignore - * If true, skip this shipment, but don't apply a `penalty_cost`. - * Ignoring a shipment results in a validation error when there are any - * `shipment_type_requirements` in the model. - * Ignoring a shipment that is performed in `injected_first_solution_routes` - * or `injected_solution_constraint` is permitted; the solver removes the - * related pickup/delivery visits from the performing route. - * `precedence_rules` that reference ignored shipments will also be ignored. - * @type array<\Google\Cloud\Optimization\V1\CapacityQuantity>|\Google\Protobuf\Internal\RepeatedField $demands - * Deprecated: Use - * [Shipment.load_demands][google.cloud.optimization.v1.Shipment.load_demands] - * instead. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); - parent::__construct($data); - } - - /** - * Set of pickup alternatives associated to the shipment. If not specified, - * the vehicle only needs to visit a location corresponding to the deliveries. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.Shipment.VisitRequest pickups = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPickups() - { - return $this->pickups; - } - - /** - * Set of pickup alternatives associated to the shipment. If not specified, - * the vehicle only needs to visit a location corresponding to the deliveries. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.Shipment.VisitRequest pickups = 1; - * @param array<\Google\Cloud\Optimization\V1\Shipment\VisitRequest>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPickups($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\Shipment\VisitRequest::class); - $this->pickups = $arr; - - return $this; - } - - /** - * Set of delivery alternatives associated to the shipment. If not specified, - * the vehicle only needs to visit a location corresponding to the pickups. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.Shipment.VisitRequest deliveries = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDeliveries() - { - return $this->deliveries; - } - - /** - * Set of delivery alternatives associated to the shipment. If not specified, - * the vehicle only needs to visit a location corresponding to the pickups. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.Shipment.VisitRequest deliveries = 2; - * @param array<\Google\Cloud\Optimization\V1\Shipment\VisitRequest>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDeliveries($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\Shipment\VisitRequest::class); - $this->deliveries = $arr; - - return $this; - } - - /** - * Load demands of the shipment (for example weight, volume, number of - * pallets etc). The keys in the map should be identifiers describing the type - * of the corresponding load, ideally also including the units. - * For example: "weight_kg", "volume_gallons", "pallet_count", etc. - * If a given key does not appear in the map, the corresponding load is - * considered as null. - * - * Generated from protobuf field map load_demands = 14; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLoadDemands() - { - return $this->load_demands; - } - - /** - * Load demands of the shipment (for example weight, volume, number of - * pallets etc). The keys in the map should be identifiers describing the type - * of the corresponding load, ideally also including the units. - * For example: "weight_kg", "volume_gallons", "pallet_count", etc. - * If a given key does not appear in the map, the corresponding load is - * considered as null. - * - * Generated from protobuf field map load_demands = 14; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLoadDemands($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\Shipment\Load::class); - $this->load_demands = $arr; - - return $this; - } - - /** - * If the shipment is not completed, this penalty is added to the overall - * cost of the routes. A shipment is considered completed if one of its pickup - * and delivery alternatives is visited. The cost may be expressed in the - * same unit used for all other cost-related fields in the model and must be - * positive. - * *IMPORTANT*: If this penalty is not specified, it is considered infinite, - * i.e. the shipment must be completed. - * - * Generated from protobuf field optional double penalty_cost = 4; - * @return float - */ - public function getPenaltyCost() - { - return isset($this->penalty_cost) ? $this->penalty_cost : 0.0; - } - - public function hasPenaltyCost() - { - return isset($this->penalty_cost); - } - - public function clearPenaltyCost() - { - unset($this->penalty_cost); - } - - /** - * If the shipment is not completed, this penalty is added to the overall - * cost of the routes. A shipment is considered completed if one of its pickup - * and delivery alternatives is visited. The cost may be expressed in the - * same unit used for all other cost-related fields in the model and must be - * positive. - * *IMPORTANT*: If this penalty is not specified, it is considered infinite, - * i.e. the shipment must be completed. - * - * Generated from protobuf field optional double penalty_cost = 4; - * @param float $var - * @return $this - */ - public function setPenaltyCost($var) - { - GPBUtil::checkDouble($var); - $this->penalty_cost = $var; - - return $this; - } - - /** - * The set of vehicles that may perform this shipment. If empty, all vehicles - * may perform it. Vehicles are given by their index in the `ShipmentModel`'s - * `vehicles` list. - * - * Generated from protobuf field repeated int32 allowed_vehicle_indices = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAllowedVehicleIndices() - { - return $this->allowed_vehicle_indices; - } - - /** - * The set of vehicles that may perform this shipment. If empty, all vehicles - * may perform it. Vehicles are given by their index in the `ShipmentModel`'s - * `vehicles` list. - * - * Generated from protobuf field repeated int32 allowed_vehicle_indices = 5; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAllowedVehicleIndices($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); - $this->allowed_vehicle_indices = $arr; - - return $this; - } - - /** - * Specifies the cost that is incurred when this shipment is delivered by each - * vehicle. If specified, it must have EITHER: - * * the same number of elements as `costs_per_vehicle_indices`. - * `costs_per_vehicle[i]` corresponds to vehicle - * `costs_per_vehicle_indices[i]` of the model. - * * the same number of elements as there are vehicles in the model. The - * i-th element corresponds to vehicle #i of the model. - * These costs must be in the same unit as `penalty_cost` and must not be - * negative. Leave this field empty, if there are no such costs. - * - * Generated from protobuf field repeated double costs_per_vehicle = 6; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCostsPerVehicle() - { - return $this->costs_per_vehicle; - } - - /** - * Specifies the cost that is incurred when this shipment is delivered by each - * vehicle. If specified, it must have EITHER: - * * the same number of elements as `costs_per_vehicle_indices`. - * `costs_per_vehicle[i]` corresponds to vehicle - * `costs_per_vehicle_indices[i]` of the model. - * * the same number of elements as there are vehicles in the model. The - * i-th element corresponds to vehicle #i of the model. - * These costs must be in the same unit as `penalty_cost` and must not be - * negative. Leave this field empty, if there are no such costs. - * - * Generated from protobuf field repeated double costs_per_vehicle = 6; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCostsPerVehicle($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::DOUBLE); - $this->costs_per_vehicle = $arr; - - return $this; - } - - /** - * Indices of the vehicles to which `costs_per_vehicle` applies. If non-empty, - * it must have the same number of elements as `costs_per_vehicle`. A vehicle - * index may not be specified more than once. If a vehicle is excluded from - * `costs_per_vehicle_indices`, its cost is zero. - * - * Generated from protobuf field repeated int32 costs_per_vehicle_indices = 7; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCostsPerVehicleIndices() - { - return $this->costs_per_vehicle_indices; - } - - /** - * Indices of the vehicles to which `costs_per_vehicle` applies. If non-empty, - * it must have the same number of elements as `costs_per_vehicle`. A vehicle - * index may not be specified more than once. If a vehicle is excluded from - * `costs_per_vehicle_indices`, its cost is zero. - * - * Generated from protobuf field repeated int32 costs_per_vehicle_indices = 7; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCostsPerVehicleIndices($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); - $this->costs_per_vehicle_indices = $arr; - - return $this; - } - - /** - * Specifies the maximum relative detour time compared to the shortest path - * from pickup to delivery. If specified, it must be nonnegative, and the - * shipment must contain at least a pickup and a delivery. - * For example, let t be the shortest time taken to go from the selected - * pickup alternative directly to the selected delivery alternative. Then - * setting `pickup_to_delivery_relative_detour_limit` enforces: - * ``` - * start_time(delivery) - start_time(pickup) <= - * std::ceil(t * (1.0 + pickup_to_delivery_relative_detour_limit)) - * ``` - * If both relative and absolute limits are specified on the same shipment, - * the more constraining limit is used for each possible pickup/delivery pair. - * As of 2017/10, detours are only supported when travel durations do not - * depend on vehicles. - * - * Generated from protobuf field optional double pickup_to_delivery_relative_detour_limit = 8; - * @return float - */ - public function getPickupToDeliveryRelativeDetourLimit() - { - return isset($this->pickup_to_delivery_relative_detour_limit) ? $this->pickup_to_delivery_relative_detour_limit : 0.0; - } - - public function hasPickupToDeliveryRelativeDetourLimit() - { - return isset($this->pickup_to_delivery_relative_detour_limit); - } - - public function clearPickupToDeliveryRelativeDetourLimit() - { - unset($this->pickup_to_delivery_relative_detour_limit); - } - - /** - * Specifies the maximum relative detour time compared to the shortest path - * from pickup to delivery. If specified, it must be nonnegative, and the - * shipment must contain at least a pickup and a delivery. - * For example, let t be the shortest time taken to go from the selected - * pickup alternative directly to the selected delivery alternative. Then - * setting `pickup_to_delivery_relative_detour_limit` enforces: - * ``` - * start_time(delivery) - start_time(pickup) <= - * std::ceil(t * (1.0 + pickup_to_delivery_relative_detour_limit)) - * ``` - * If both relative and absolute limits are specified on the same shipment, - * the more constraining limit is used for each possible pickup/delivery pair. - * As of 2017/10, detours are only supported when travel durations do not - * depend on vehicles. - * - * Generated from protobuf field optional double pickup_to_delivery_relative_detour_limit = 8; - * @param float $var - * @return $this - */ - public function setPickupToDeliveryRelativeDetourLimit($var) - { - GPBUtil::checkDouble($var); - $this->pickup_to_delivery_relative_detour_limit = $var; - - return $this; - } - - /** - * Specifies the maximum absolute detour time compared to the shortest path - * from pickup to delivery. If specified, it must be nonnegative, and the - * shipment must contain at least a pickup and a delivery. - * For example, let t be the shortest time taken to go from the selected - * pickup alternative directly to the selected delivery alternative. Then - * setting `pickup_to_delivery_absolute_detour_limit` enforces: - * ``` - * start_time(delivery) - start_time(pickup) <= - * t + pickup_to_delivery_absolute_detour_limit - * ``` - * If both relative and absolute limits are specified on the same shipment, - * the more constraining limit is used for each possible pickup/delivery pair. - * As of 2017/10, detours are only supported when travel durations do not - * depend on vehicles. - * - * Generated from protobuf field .google.protobuf.Duration pickup_to_delivery_absolute_detour_limit = 9; - * @return \Google\Protobuf\Duration|null - */ - public function getPickupToDeliveryAbsoluteDetourLimit() - { - return $this->pickup_to_delivery_absolute_detour_limit; - } - - public function hasPickupToDeliveryAbsoluteDetourLimit() - { - return isset($this->pickup_to_delivery_absolute_detour_limit); - } - - public function clearPickupToDeliveryAbsoluteDetourLimit() - { - unset($this->pickup_to_delivery_absolute_detour_limit); - } - - /** - * Specifies the maximum absolute detour time compared to the shortest path - * from pickup to delivery. If specified, it must be nonnegative, and the - * shipment must contain at least a pickup and a delivery. - * For example, let t be the shortest time taken to go from the selected - * pickup alternative directly to the selected delivery alternative. Then - * setting `pickup_to_delivery_absolute_detour_limit` enforces: - * ``` - * start_time(delivery) - start_time(pickup) <= - * t + pickup_to_delivery_absolute_detour_limit - * ``` - * If both relative and absolute limits are specified on the same shipment, - * the more constraining limit is used for each possible pickup/delivery pair. - * As of 2017/10, detours are only supported when travel durations do not - * depend on vehicles. - * - * Generated from protobuf field .google.protobuf.Duration pickup_to_delivery_absolute_detour_limit = 9; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setPickupToDeliveryAbsoluteDetourLimit($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->pickup_to_delivery_absolute_detour_limit = $var; - - return $this; - } - - /** - * Specifies the maximum duration from start of pickup to start of delivery of - * a shipment. If specified, it must be nonnegative, and the shipment must - * contain at least a pickup and a delivery. This does not depend on which - * alternatives are selected for pickup and delivery, nor on vehicle speed. - * This can be specified alongside maximum detour constraints: the solution - * will respect both specifications. - * - * Generated from protobuf field .google.protobuf.Duration pickup_to_delivery_time_limit = 10; - * @return \Google\Protobuf\Duration|null - */ - public function getPickupToDeliveryTimeLimit() - { - return $this->pickup_to_delivery_time_limit; - } - - public function hasPickupToDeliveryTimeLimit() - { - return isset($this->pickup_to_delivery_time_limit); - } - - public function clearPickupToDeliveryTimeLimit() - { - unset($this->pickup_to_delivery_time_limit); - } - - /** - * Specifies the maximum duration from start of pickup to start of delivery of - * a shipment. If specified, it must be nonnegative, and the shipment must - * contain at least a pickup and a delivery. This does not depend on which - * alternatives are selected for pickup and delivery, nor on vehicle speed. - * This can be specified alongside maximum detour constraints: the solution - * will respect both specifications. - * - * Generated from protobuf field .google.protobuf.Duration pickup_to_delivery_time_limit = 10; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setPickupToDeliveryTimeLimit($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->pickup_to_delivery_time_limit = $var; - - return $this; - } - - /** - * Non-empty string specifying a "type" for this shipment. - * This feature can be used to define incompatibilities or requirements - * between `shipment_types` (see `shipment_type_incompatibilities` and - * `shipment_type_requirements` in `ShipmentModel`). - * Differs from `visit_types` which is specified for a single visit: All - * pickup/deliveries belonging to the same shipment share the same - * `shipment_type`. - * - * Generated from protobuf field string shipment_type = 11; - * @return string - */ - public function getShipmentType() - { - return $this->shipment_type; - } - - /** - * Non-empty string specifying a "type" for this shipment. - * This feature can be used to define incompatibilities or requirements - * between `shipment_types` (see `shipment_type_incompatibilities` and - * `shipment_type_requirements` in `ShipmentModel`). - * Differs from `visit_types` which is specified for a single visit: All - * pickup/deliveries belonging to the same shipment share the same - * `shipment_type`. - * - * Generated from protobuf field string shipment_type = 11; - * @param string $var - * @return $this - */ - public function setShipmentType($var) - { - GPBUtil::checkString($var, True); - $this->shipment_type = $var; - - return $this; - } - - /** - * Specifies a label for this shipment. This label is reported in the response - * in the `shipment_label` of the corresponding - * [ShipmentRoute.Visit][google.cloud.optimization.v1.ShipmentRoute.Visit]. - * - * Generated from protobuf field string label = 12; - * @return string - */ - public function getLabel() - { - return $this->label; - } - - /** - * Specifies a label for this shipment. This label is reported in the response - * in the `shipment_label` of the corresponding - * [ShipmentRoute.Visit][google.cloud.optimization.v1.ShipmentRoute.Visit]. - * - * Generated from protobuf field string label = 12; - * @param string $var - * @return $this - */ - public function setLabel($var) - { - GPBUtil::checkString($var, True); - $this->label = $var; - - return $this; - } - - /** - * If true, skip this shipment, but don't apply a `penalty_cost`. - * Ignoring a shipment results in a validation error when there are any - * `shipment_type_requirements` in the model. - * Ignoring a shipment that is performed in `injected_first_solution_routes` - * or `injected_solution_constraint` is permitted; the solver removes the - * related pickup/delivery visits from the performing route. - * `precedence_rules` that reference ignored shipments will also be ignored. - * - * Generated from protobuf field bool ignore = 13; - * @return bool - */ - public function getIgnore() - { - return $this->ignore; - } - - /** - * If true, skip this shipment, but don't apply a `penalty_cost`. - * Ignoring a shipment results in a validation error when there are any - * `shipment_type_requirements` in the model. - * Ignoring a shipment that is performed in `injected_first_solution_routes` - * or `injected_solution_constraint` is permitted; the solver removes the - * related pickup/delivery visits from the performing route. - * `precedence_rules` that reference ignored shipments will also be ignored. - * - * Generated from protobuf field bool ignore = 13; - * @param bool $var - * @return $this - */ - public function setIgnore($var) - { - GPBUtil::checkBool($var); - $this->ignore = $var; - - return $this; - } - - /** - * Deprecated: Use - * [Shipment.load_demands][google.cloud.optimization.v1.Shipment.load_demands] - * instead. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.CapacityQuantity demands = 3 [deprecated = true]; - * @return \Google\Protobuf\Internal\RepeatedField - * @deprecated - */ - public function getDemands() - { - @trigger_error('demands is deprecated.', E_USER_DEPRECATED); - return $this->demands; - } - - /** - * Deprecated: Use - * [Shipment.load_demands][google.cloud.optimization.v1.Shipment.load_demands] - * instead. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.CapacityQuantity demands = 3 [deprecated = true]; - * @param array<\Google\Cloud\Optimization\V1\CapacityQuantity>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - * @deprecated - */ - public function setDemands($var) - { - @trigger_error('demands is deprecated.', E_USER_DEPRECATED); - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\CapacityQuantity::class); - $this->demands = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/Shipment/Load.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/Shipment/Load.php deleted file mode 100644 index cd27300e83b7..000000000000 --- a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/Shipment/Load.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.optimization.v1.Shipment.Load - */ -class Load extends \Google\Protobuf\Internal\Message -{ - /** - * The amount by which the load of the vehicle performing the corresponding - * visit will vary. Since it is an integer, users are advised to choose an - * appropriate unit to avoid loss of precision. Must be ≥ 0. - * - * Generated from protobuf field int64 amount = 2; - */ - protected $amount = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $amount - * The amount by which the load of the vehicle performing the corresponding - * visit will vary. Since it is an integer, users are advised to choose an - * appropriate unit to avoid loss of precision. Must be ≥ 0. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); - parent::__construct($data); - } - - /** - * The amount by which the load of the vehicle performing the corresponding - * visit will vary. Since it is an integer, users are advised to choose an - * appropriate unit to avoid loss of precision. Must be ≥ 0. - * - * Generated from protobuf field int64 amount = 2; - * @return int|string - */ - public function getAmount() - { - return $this->amount; - } - - /** - * The amount by which the load of the vehicle performing the corresponding - * visit will vary. Since it is an integer, users are advised to choose an - * appropriate unit to avoid loss of precision. Must be ≥ 0. - * - * Generated from protobuf field int64 amount = 2; - * @param int|string $var - * @return $this - */ - public function setAmount($var) - { - GPBUtil::checkInt64($var); - $this->amount = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Load::class, \Google\Cloud\Optimization\V1\Shipment_Load::class); - diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/Shipment/VisitRequest.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/Shipment/VisitRequest.php deleted file mode 100644 index e21379e56c9c..000000000000 --- a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/Shipment/VisitRequest.php +++ /dev/null @@ -1,658 +0,0 @@ -google.cloud.optimization.v1.Shipment.VisitRequest - */ -class VisitRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The geo-location where the vehicle arrives when performing this - * `VisitRequest`. If the shipment model has duration distance matrices, - * `arrival_location` must not be specified. - * - * Generated from protobuf field .google.type.LatLng arrival_location = 1; - */ - protected $arrival_location = null; - /** - * The waypoint where the vehicle arrives when performing this - * `VisitRequest`. If the shipment model has duration distance matrices, - * `arrival_waypoint` must not be specified. - * - * Generated from protobuf field .google.cloud.optimization.v1.Waypoint arrival_waypoint = 2; - */ - protected $arrival_waypoint = null; - /** - * The geo-location where the vehicle departs after completing this - * `VisitRequest`. Can be omitted if it is the same as `arrival_location`. - * If the shipment model has duration distance matrices, - * `departure_location` must not be specified. - * - * Generated from protobuf field .google.type.LatLng departure_location = 3; - */ - protected $departure_location = null; - /** - * The waypoint where the vehicle departs after completing this - * `VisitRequest`. Can be omitted if it is the same as `arrival_waypoint`. - * If the shipment model has duration distance matrices, - * `departure_waypoint` must not be specified. - * - * Generated from protobuf field .google.cloud.optimization.v1.Waypoint departure_waypoint = 4; - */ - protected $departure_waypoint = null; - /** - * Specifies tags attached to the visit request. - * Empty or duplicate strings are not allowed. - * - * Generated from protobuf field repeated string tags = 5; - */ - private $tags; - /** - * Time windows which constrain the arrival time at a visit. - * Note that a vehicle may depart outside of the arrival time window, i.e. - * arrival time + duration do not need to be inside a time window. This can - * result in waiting time if the vehicle arrives before - * [TimeWindow.start_time][google.cloud.optimization.v1.TimeWindow.start_time]. - * The absence of `TimeWindow` means that the vehicle can perform this visit - * at any time. - * Time windows must be disjoint, i.e. no time window must overlap with or - * be adjacent to another, and they must be in increasing order. - * `cost_per_hour_after_soft_end_time` and `soft_end_time` can only - * be set if there is a single time window. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.TimeWindow time_windows = 6; - */ - private $time_windows; - /** - * Duration of the visit, i.e. time spent by the vehicle between arrival - * and departure (to be added to the possible waiting time; see - * `time_windows`). - * - * Generated from protobuf field .google.protobuf.Duration duration = 7; - */ - protected $duration = null; - /** - * Cost to service this visit request on a vehicle route. This can be used - * to pay different costs for each alternative pickup or delivery of a - * shipment. This cost must be in the same unit as `Shipment.penalty_cost` - * and must not be negative. - * - * Generated from protobuf field double cost = 8; - */ - protected $cost = 0.0; - /** - * Load demands of this visit request. This is just like - * [Shipment.load_demands][google.cloud.optimization.v1.Shipment.load_demands] - * field, except that it only applies to this - * [VisitRequest][google.cloud.optimization.v1.Shipment.VisitRequest] - * instead of the whole [Shipment][google.cloud.optimization.v1.Shipment]. - * The demands listed here are added to the demands listed in - * [Shipment.load_demands][google.cloud.optimization.v1.Shipment.load_demands]. - * - * Generated from protobuf field map load_demands = 12; - */ - private $load_demands; - /** - * Specifies the types of the visit. This may be used to allocate additional - * time required for a vehicle to complete this visit (see - * [Vehicle.extra_visit_duration_for_visit_type][google.cloud.optimization.v1.Vehicle.extra_visit_duration_for_visit_type]). - * A type can only appear once. - * - * Generated from protobuf field repeated string visit_types = 10; - */ - private $visit_types; - /** - * Specifies a label for this `VisitRequest`. This label is reported in the - * response as `visit_label` in the corresponding - * [ShipmentRoute.Visit][google.cloud.optimization.v1.ShipmentRoute.Visit]. - * - * Generated from protobuf field string label = 11; - */ - protected $label = ''; - /** - * Deprecated: Use - * [VisitRequest.load_demands][google.cloud.optimization.v1.Shipment.VisitRequest.load_demands] - * instead. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.CapacityQuantity demands = 9 [deprecated = true]; - * @deprecated - */ - private $demands; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Type\LatLng $arrival_location - * The geo-location where the vehicle arrives when performing this - * `VisitRequest`. If the shipment model has duration distance matrices, - * `arrival_location` must not be specified. - * @type \Google\Cloud\Optimization\V1\Waypoint $arrival_waypoint - * The waypoint where the vehicle arrives when performing this - * `VisitRequest`. If the shipment model has duration distance matrices, - * `arrival_waypoint` must not be specified. - * @type \Google\Type\LatLng $departure_location - * The geo-location where the vehicle departs after completing this - * `VisitRequest`. Can be omitted if it is the same as `arrival_location`. - * If the shipment model has duration distance matrices, - * `departure_location` must not be specified. - * @type \Google\Cloud\Optimization\V1\Waypoint $departure_waypoint - * The waypoint where the vehicle departs after completing this - * `VisitRequest`. Can be omitted if it is the same as `arrival_waypoint`. - * If the shipment model has duration distance matrices, - * `departure_waypoint` must not be specified. - * @type array|\Google\Protobuf\Internal\RepeatedField $tags - * Specifies tags attached to the visit request. - * Empty or duplicate strings are not allowed. - * @type array<\Google\Cloud\Optimization\V1\TimeWindow>|\Google\Protobuf\Internal\RepeatedField $time_windows - * Time windows which constrain the arrival time at a visit. - * Note that a vehicle may depart outside of the arrival time window, i.e. - * arrival time + duration do not need to be inside a time window. This can - * result in waiting time if the vehicle arrives before - * [TimeWindow.start_time][google.cloud.optimization.v1.TimeWindow.start_time]. - * The absence of `TimeWindow` means that the vehicle can perform this visit - * at any time. - * Time windows must be disjoint, i.e. no time window must overlap with or - * be adjacent to another, and they must be in increasing order. - * `cost_per_hour_after_soft_end_time` and `soft_end_time` can only - * be set if there is a single time window. - * @type \Google\Protobuf\Duration $duration - * Duration of the visit, i.e. time spent by the vehicle between arrival - * and departure (to be added to the possible waiting time; see - * `time_windows`). - * @type float $cost - * Cost to service this visit request on a vehicle route. This can be used - * to pay different costs for each alternative pickup or delivery of a - * shipment. This cost must be in the same unit as `Shipment.penalty_cost` - * and must not be negative. - * @type array|\Google\Protobuf\Internal\MapField $load_demands - * Load demands of this visit request. This is just like - * [Shipment.load_demands][google.cloud.optimization.v1.Shipment.load_demands] - * field, except that it only applies to this - * [VisitRequest][google.cloud.optimization.v1.Shipment.VisitRequest] - * instead of the whole [Shipment][google.cloud.optimization.v1.Shipment]. - * The demands listed here are added to the demands listed in - * [Shipment.load_demands][google.cloud.optimization.v1.Shipment.load_demands]. - * @type array|\Google\Protobuf\Internal\RepeatedField $visit_types - * Specifies the types of the visit. This may be used to allocate additional - * time required for a vehicle to complete this visit (see - * [Vehicle.extra_visit_duration_for_visit_type][google.cloud.optimization.v1.Vehicle.extra_visit_duration_for_visit_type]). - * A type can only appear once. - * @type string $label - * Specifies a label for this `VisitRequest`. This label is reported in the - * response as `visit_label` in the corresponding - * [ShipmentRoute.Visit][google.cloud.optimization.v1.ShipmentRoute.Visit]. - * @type array<\Google\Cloud\Optimization\V1\CapacityQuantity>|\Google\Protobuf\Internal\RepeatedField $demands - * Deprecated: Use - * [VisitRequest.load_demands][google.cloud.optimization.v1.Shipment.VisitRequest.load_demands] - * instead. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); - parent::__construct($data); - } - - /** - * The geo-location where the vehicle arrives when performing this - * `VisitRequest`. If the shipment model has duration distance matrices, - * `arrival_location` must not be specified. - * - * Generated from protobuf field .google.type.LatLng arrival_location = 1; - * @return \Google\Type\LatLng|null - */ - public function getArrivalLocation() - { - return $this->arrival_location; - } - - public function hasArrivalLocation() - { - return isset($this->arrival_location); - } - - public function clearArrivalLocation() - { - unset($this->arrival_location); - } - - /** - * The geo-location where the vehicle arrives when performing this - * `VisitRequest`. If the shipment model has duration distance matrices, - * `arrival_location` must not be specified. - * - * Generated from protobuf field .google.type.LatLng arrival_location = 1; - * @param \Google\Type\LatLng $var - * @return $this - */ - public function setArrivalLocation($var) - { - GPBUtil::checkMessage($var, \Google\Type\LatLng::class); - $this->arrival_location = $var; - - return $this; - } - - /** - * The waypoint where the vehicle arrives when performing this - * `VisitRequest`. If the shipment model has duration distance matrices, - * `arrival_waypoint` must not be specified. - * - * Generated from protobuf field .google.cloud.optimization.v1.Waypoint arrival_waypoint = 2; - * @return \Google\Cloud\Optimization\V1\Waypoint|null - */ - public function getArrivalWaypoint() - { - return $this->arrival_waypoint; - } - - public function hasArrivalWaypoint() - { - return isset($this->arrival_waypoint); - } - - public function clearArrivalWaypoint() - { - unset($this->arrival_waypoint); - } - - /** - * The waypoint where the vehicle arrives when performing this - * `VisitRequest`. If the shipment model has duration distance matrices, - * `arrival_waypoint` must not be specified. - * - * Generated from protobuf field .google.cloud.optimization.v1.Waypoint arrival_waypoint = 2; - * @param \Google\Cloud\Optimization\V1\Waypoint $var - * @return $this - */ - public function setArrivalWaypoint($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Optimization\V1\Waypoint::class); - $this->arrival_waypoint = $var; - - return $this; - } - - /** - * The geo-location where the vehicle departs after completing this - * `VisitRequest`. Can be omitted if it is the same as `arrival_location`. - * If the shipment model has duration distance matrices, - * `departure_location` must not be specified. - * - * Generated from protobuf field .google.type.LatLng departure_location = 3; - * @return \Google\Type\LatLng|null - */ - public function getDepartureLocation() - { - return $this->departure_location; - } - - public function hasDepartureLocation() - { - return isset($this->departure_location); - } - - public function clearDepartureLocation() - { - unset($this->departure_location); - } - - /** - * The geo-location where the vehicle departs after completing this - * `VisitRequest`. Can be omitted if it is the same as `arrival_location`. - * If the shipment model has duration distance matrices, - * `departure_location` must not be specified. - * - * Generated from protobuf field .google.type.LatLng departure_location = 3; - * @param \Google\Type\LatLng $var - * @return $this - */ - public function setDepartureLocation($var) - { - GPBUtil::checkMessage($var, \Google\Type\LatLng::class); - $this->departure_location = $var; - - return $this; - } - - /** - * The waypoint where the vehicle departs after completing this - * `VisitRequest`. Can be omitted if it is the same as `arrival_waypoint`. - * If the shipment model has duration distance matrices, - * `departure_waypoint` must not be specified. - * - * Generated from protobuf field .google.cloud.optimization.v1.Waypoint departure_waypoint = 4; - * @return \Google\Cloud\Optimization\V1\Waypoint|null - */ - public function getDepartureWaypoint() - { - return $this->departure_waypoint; - } - - public function hasDepartureWaypoint() - { - return isset($this->departure_waypoint); - } - - public function clearDepartureWaypoint() - { - unset($this->departure_waypoint); - } - - /** - * The waypoint where the vehicle departs after completing this - * `VisitRequest`. Can be omitted if it is the same as `arrival_waypoint`. - * If the shipment model has duration distance matrices, - * `departure_waypoint` must not be specified. - * - * Generated from protobuf field .google.cloud.optimization.v1.Waypoint departure_waypoint = 4; - * @param \Google\Cloud\Optimization\V1\Waypoint $var - * @return $this - */ - public function setDepartureWaypoint($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Optimization\V1\Waypoint::class); - $this->departure_waypoint = $var; - - return $this; - } - - /** - * Specifies tags attached to the visit request. - * Empty or duplicate strings are not allowed. - * - * Generated from protobuf field repeated string tags = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTags() - { - return $this->tags; - } - - /** - * Specifies tags attached to the visit request. - * Empty or duplicate strings are not allowed. - * - * Generated from protobuf field repeated string tags = 5; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTags($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->tags = $arr; - - return $this; - } - - /** - * Time windows which constrain the arrival time at a visit. - * Note that a vehicle may depart outside of the arrival time window, i.e. - * arrival time + duration do not need to be inside a time window. This can - * result in waiting time if the vehicle arrives before - * [TimeWindow.start_time][google.cloud.optimization.v1.TimeWindow.start_time]. - * The absence of `TimeWindow` means that the vehicle can perform this visit - * at any time. - * Time windows must be disjoint, i.e. no time window must overlap with or - * be adjacent to another, and they must be in increasing order. - * `cost_per_hour_after_soft_end_time` and `soft_end_time` can only - * be set if there is a single time window. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.TimeWindow time_windows = 6; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTimeWindows() - { - return $this->time_windows; - } - - /** - * Time windows which constrain the arrival time at a visit. - * Note that a vehicle may depart outside of the arrival time window, i.e. - * arrival time + duration do not need to be inside a time window. This can - * result in waiting time if the vehicle arrives before - * [TimeWindow.start_time][google.cloud.optimization.v1.TimeWindow.start_time]. - * The absence of `TimeWindow` means that the vehicle can perform this visit - * at any time. - * Time windows must be disjoint, i.e. no time window must overlap with or - * be adjacent to another, and they must be in increasing order. - * `cost_per_hour_after_soft_end_time` and `soft_end_time` can only - * be set if there is a single time window. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.TimeWindow time_windows = 6; - * @param array<\Google\Cloud\Optimization\V1\TimeWindow>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTimeWindows($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\TimeWindow::class); - $this->time_windows = $arr; - - return $this; - } - - /** - * Duration of the visit, i.e. time spent by the vehicle between arrival - * and departure (to be added to the possible waiting time; see - * `time_windows`). - * - * Generated from protobuf field .google.protobuf.Duration duration = 7; - * @return \Google\Protobuf\Duration|null - */ - public function getDuration() - { - return $this->duration; - } - - public function hasDuration() - { - return isset($this->duration); - } - - public function clearDuration() - { - unset($this->duration); - } - - /** - * Duration of the visit, i.e. time spent by the vehicle between arrival - * and departure (to be added to the possible waiting time; see - * `time_windows`). - * - * Generated from protobuf field .google.protobuf.Duration duration = 7; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->duration = $var; - - return $this; - } - - /** - * Cost to service this visit request on a vehicle route. This can be used - * to pay different costs for each alternative pickup or delivery of a - * shipment. This cost must be in the same unit as `Shipment.penalty_cost` - * and must not be negative. - * - * Generated from protobuf field double cost = 8; - * @return float - */ - public function getCost() - { - return $this->cost; - } - - /** - * Cost to service this visit request on a vehicle route. This can be used - * to pay different costs for each alternative pickup or delivery of a - * shipment. This cost must be in the same unit as `Shipment.penalty_cost` - * and must not be negative. - * - * Generated from protobuf field double cost = 8; - * @param float $var - * @return $this - */ - public function setCost($var) - { - GPBUtil::checkDouble($var); - $this->cost = $var; - - return $this; - } - - /** - * Load demands of this visit request. This is just like - * [Shipment.load_demands][google.cloud.optimization.v1.Shipment.load_demands] - * field, except that it only applies to this - * [VisitRequest][google.cloud.optimization.v1.Shipment.VisitRequest] - * instead of the whole [Shipment][google.cloud.optimization.v1.Shipment]. - * The demands listed here are added to the demands listed in - * [Shipment.load_demands][google.cloud.optimization.v1.Shipment.load_demands]. - * - * Generated from protobuf field map load_demands = 12; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLoadDemands() - { - return $this->load_demands; - } - - /** - * Load demands of this visit request. This is just like - * [Shipment.load_demands][google.cloud.optimization.v1.Shipment.load_demands] - * field, except that it only applies to this - * [VisitRequest][google.cloud.optimization.v1.Shipment.VisitRequest] - * instead of the whole [Shipment][google.cloud.optimization.v1.Shipment]. - * The demands listed here are added to the demands listed in - * [Shipment.load_demands][google.cloud.optimization.v1.Shipment.load_demands]. - * - * Generated from protobuf field map load_demands = 12; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLoadDemands($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\Shipment\Load::class); - $this->load_demands = $arr; - - return $this; - } - - /** - * Specifies the types of the visit. This may be used to allocate additional - * time required for a vehicle to complete this visit (see - * [Vehicle.extra_visit_duration_for_visit_type][google.cloud.optimization.v1.Vehicle.extra_visit_duration_for_visit_type]). - * A type can only appear once. - * - * Generated from protobuf field repeated string visit_types = 10; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getVisitTypes() - { - return $this->visit_types; - } - - /** - * Specifies the types of the visit. This may be used to allocate additional - * time required for a vehicle to complete this visit (see - * [Vehicle.extra_visit_duration_for_visit_type][google.cloud.optimization.v1.Vehicle.extra_visit_duration_for_visit_type]). - * A type can only appear once. - * - * Generated from protobuf field repeated string visit_types = 10; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setVisitTypes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->visit_types = $arr; - - return $this; - } - - /** - * Specifies a label for this `VisitRequest`. This label is reported in the - * response as `visit_label` in the corresponding - * [ShipmentRoute.Visit][google.cloud.optimization.v1.ShipmentRoute.Visit]. - * - * Generated from protobuf field string label = 11; - * @return string - */ - public function getLabel() - { - return $this->label; - } - - /** - * Specifies a label for this `VisitRequest`. This label is reported in the - * response as `visit_label` in the corresponding - * [ShipmentRoute.Visit][google.cloud.optimization.v1.ShipmentRoute.Visit]. - * - * Generated from protobuf field string label = 11; - * @param string $var - * @return $this - */ - public function setLabel($var) - { - GPBUtil::checkString($var, True); - $this->label = $var; - - return $this; - } - - /** - * Deprecated: Use - * [VisitRequest.load_demands][google.cloud.optimization.v1.Shipment.VisitRequest.load_demands] - * instead. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.CapacityQuantity demands = 9 [deprecated = true]; - * @return \Google\Protobuf\Internal\RepeatedField - * @deprecated - */ - public function getDemands() - { - @trigger_error('demands is deprecated.', E_USER_DEPRECATED); - return $this->demands; - } - - /** - * Deprecated: Use - * [VisitRequest.load_demands][google.cloud.optimization.v1.Shipment.VisitRequest.load_demands] - * instead. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.CapacityQuantity demands = 9 [deprecated = true]; - * @param array<\Google\Cloud\Optimization\V1\CapacityQuantity>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - * @deprecated - */ - public function setDemands($var) - { - @trigger_error('demands is deprecated.', E_USER_DEPRECATED); - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\CapacityQuantity::class); - $this->demands = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(VisitRequest::class, \Google\Cloud\Optimization\V1\Shipment_VisitRequest::class); - diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentModel.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentModel.php deleted file mode 100644 index 058949f5a9bd..000000000000 --- a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentModel.php +++ /dev/null @@ -1,1057 +0,0 @@ -google.cloud.optimization.v1.ShipmentModel - */ -class ShipmentModel extends \Google\Protobuf\Internal\Message -{ - /** - * Set of shipments which must be performed in the model. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.Shipment shipments = 1; - */ - private $shipments; - /** - * Set of vehicles which can be used to perform visits. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.Vehicle vehicles = 2; - */ - private $vehicles; - /** - * Constrains the maximum number of active vehicles. A vehicle is active if - * its route performs at least one shipment. This can be used to limit the - * number of routes in the case where there are fewer drivers than - * vehicles and that the fleet of vehicles is heterogeneous. The optimization - * will then select the best subset of vehicles to use. - * Must be strictly positive. - * - * Generated from protobuf field optional int32 max_active_vehicles = 4; - */ - protected $max_active_vehicles = null; - /** - * Global start and end time of the model: no times outside of this range - * can be considered valid. - * The model's time span must be less than a year, i.e. the `global_end_time` - * and the `global_start_time` must be within 31536000 seconds of each other. - * When using `cost_per_*hour` fields, you might want to set this window to a - * smaller interval to increase performance (eg. if you model a single day, - * you should set the global time limits to that day). - * If unset, 00:00:00 UTC, January 1, 1970 (i.e. seconds: 0, nanos: 0) is used - * as default. - * - * Generated from protobuf field .google.protobuf.Timestamp global_start_time = 5; - */ - protected $global_start_time = null; - /** - * If unset, 00:00:00 UTC, January 1, 1971 (i.e. seconds: 31536000, nanos: 0) - * is used as default. - * - * Generated from protobuf field .google.protobuf.Timestamp global_end_time = 6; - */ - protected $global_end_time = null; - /** - * The "global duration" of the overall plan is the difference between the - * earliest effective start time and the latest effective end time of - * all vehicles. Users can assign a cost per hour to that quantity to try - * and optimize for earliest job completion, for example. This cost must be in - * the same unit as - * [Shipment.penalty_cost][google.cloud.optimization.v1.Shipment.penalty_cost]. - * - * Generated from protobuf field double global_duration_cost_per_hour = 7; - */ - protected $global_duration_cost_per_hour = 0.0; - /** - * Specifies duration and distance matrices used in the model. If this field - * is empty, Google Maps or geodesic distances will be used instead, depending - * on the value of the `use_geodesic_distances` field. If it is not empty, - * `use_geodesic_distances` cannot be true and neither - * `duration_distance_matrix_src_tags` nor `duration_distance_matrix_dst_tags` - * can be empty. - * Usage examples: - * * There are two locations: locA and locB. - * * 1 vehicle starting its route at locA and ending it at locA. - * * 1 pickup visit request at locB. - * ``` - * model { - * vehicles { start_tags: "locA" end_tags: "locA" } - * shipments { pickups { tags: "locB" } } - * duration_distance_matrix_src_tags: "locA" - * duration_distance_matrix_src_tags: "locB" - * duration_distance_matrix_dst_tags: "locA" - * duration_distance_matrix_dst_tags: "locB" - * duration_distance_matrices { - * rows { # from: locA - * durations { seconds: 0 } meters: 0 # to: locA - * durations { seconds: 100 } meters: 1000 # to: locB - * } - * rows { # from: locB - * durations { seconds: 102 } meters: 990 # to: locA - * durations { seconds: 0 } meters: 0 # to: locB - * } - * } - * } - * ``` - * * There are three locations: locA, locB and locC. - * * 1 vehicle starting its route at locA and ending it at locB, using - * matrix "fast". - * * 1 vehicle starting its route at locB and ending it at locB, using - * matrix "slow". - * * 1 vehicle starting its route at locB and ending it at locB, using - * matrix "fast". - * * 1 pickup visit request at locC. - * ``` - * model { - * vehicles { start_tags: "locA" end_tags: "locB" start_tags: "fast" } - * vehicles { start_tags: "locB" end_tags: "locB" start_tags: "slow" } - * vehicles { start_tags: "locB" end_tags: "locB" start_tags: "fast" } - * shipments { pickups { tags: "locC" } } - * duration_distance_matrix_src_tags: "locA" - * duration_distance_matrix_src_tags: "locB" - * duration_distance_matrix_src_tags: "locC" - * duration_distance_matrix_dst_tags: "locB" - * duration_distance_matrix_dst_tags: "locC" - * duration_distance_matrices { - * vehicle_start_tag: "fast" - * rows { # from: locA - * durations { seconds: 1000 } meters: 2000 # to: locB - * durations { seconds: 600 } meters: 1000 # to: locC - * } - * rows { # from: locB - * durations { seconds: 0 } meters: 0 # to: locB - * durations { seconds: 700 } meters: 1200 # to: locC - * } - * rows { # from: locC - * durations { seconds: 702 } meters: 1190 # to: locB - * durations { seconds: 0 } meters: 0 # to: locC - * } - * } - * duration_distance_matrices { - * vehicle_start_tag: "slow" - * rows { # from: locA - * durations { seconds: 1800 } meters: 2001 # to: locB - * durations { seconds: 900 } meters: 1002 # to: locC - * } - * rows { # from: locB - * durations { seconds: 0 } meters: 0 # to: locB - * durations { seconds: 1000 } meters: 1202 # to: locC - * } - * rows { # from: locC - * durations { seconds: 1001 } meters: 1195 # to: locB - * durations { seconds: 0 } meters: 0 # to: locC - * } - * } - * } - * ``` - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix duration_distance_matrices = 8; - */ - private $duration_distance_matrices; - /** - * Tags defining the sources of the duration and distance matrices; - * `duration_distance_matrices(i).rows(j)` defines durations and distances - * from visits with tag `duration_distance_matrix_src_tags(j)` to other visits - * in matrix i. - * Tags correspond to - * [VisitRequest.tags][google.cloud.optimization.v1.Shipment.VisitRequest.tags] - * or [Vehicle.start_tags][google.cloud.optimization.v1.Vehicle.start_tags]. - * A given `VisitRequest` or `Vehicle` must match exactly one tag in this - * field. Note that a `Vehicle`'s source, destination and matrix tags may be - * the same; similarly a `VisitRequest`'s source and destination tags may be - * the same. All tags must be different and cannot be empty strings. If this - * field is not empty, then `duration_distance_matrices` must not be empty. - * - * Generated from protobuf field repeated string duration_distance_matrix_src_tags = 9; - */ - private $duration_distance_matrix_src_tags; - /** - * Tags defining the destinations of the duration and distance matrices; - * `duration_distance_matrices(i).rows(j).durations(k)` (resp. - * `duration_distance_matrices(i).rows(j).meters(k))` defines the duration - * (resp. the distance) of the travel from visits with tag - * `duration_distance_matrix_src_tags(j)` to visits with tag - * `duration_distance_matrix_dst_tags(k)` in matrix i. - * Tags correspond to - * [VisitRequest.tags][google.cloud.optimization.v1.Shipment.VisitRequest.tags] - * or [Vehicle.start_tags][google.cloud.optimization.v1.Vehicle.start_tags]. - * A given `VisitRequest` or `Vehicle` must match exactly one tag in this - * field. Note that a `Vehicle`'s source, destination and matrix tags may be - * the same; similarly a `VisitRequest`'s source and destination tags may be - * the same. All tags must be different and cannot be empty strings. If this - * field is not empty, then `duration_distance_matrices` must not be empty. - * - * Generated from protobuf field repeated string duration_distance_matrix_dst_tags = 10; - */ - private $duration_distance_matrix_dst_tags; - /** - * Transition attributes added to the model. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.TransitionAttributes transition_attributes = 11; - */ - private $transition_attributes; - /** - * Sets of incompatible shipment_types (see `ShipmentTypeIncompatibility`). - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.ShipmentTypeIncompatibility shipment_type_incompatibilities = 12; - */ - private $shipment_type_incompatibilities; - /** - * Sets of `shipment_type` requirements (see `ShipmentTypeRequirement`). - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.ShipmentTypeRequirement shipment_type_requirements = 13; - */ - private $shipment_type_requirements; - /** - * Set of precedence rules which must be enforced in the model. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.ShipmentModel.PrecedenceRule precedence_rules = 14; - */ - private $precedence_rules; - /** - * Deprecated: No longer used. - * Set of break rules used in the model. - * Each vehicle specifies the `BreakRule` that applies to it via the - * [Vehicle.break_rule_indices][google.cloud.optimization.v1.Vehicle.break_rule_indices] - * field (which must be a singleton). - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule break_rules = 15 [deprecated = true]; - * @deprecated - */ - private $break_rules; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Optimization\V1\Shipment>|\Google\Protobuf\Internal\RepeatedField $shipments - * Set of shipments which must be performed in the model. - * @type array<\Google\Cloud\Optimization\V1\Vehicle>|\Google\Protobuf\Internal\RepeatedField $vehicles - * Set of vehicles which can be used to perform visits. - * @type int $max_active_vehicles - * Constrains the maximum number of active vehicles. A vehicle is active if - * its route performs at least one shipment. This can be used to limit the - * number of routes in the case where there are fewer drivers than - * vehicles and that the fleet of vehicles is heterogeneous. The optimization - * will then select the best subset of vehicles to use. - * Must be strictly positive. - * @type \Google\Protobuf\Timestamp $global_start_time - * Global start and end time of the model: no times outside of this range - * can be considered valid. - * The model's time span must be less than a year, i.e. the `global_end_time` - * and the `global_start_time` must be within 31536000 seconds of each other. - * When using `cost_per_*hour` fields, you might want to set this window to a - * smaller interval to increase performance (eg. if you model a single day, - * you should set the global time limits to that day). - * If unset, 00:00:00 UTC, January 1, 1970 (i.e. seconds: 0, nanos: 0) is used - * as default. - * @type \Google\Protobuf\Timestamp $global_end_time - * If unset, 00:00:00 UTC, January 1, 1971 (i.e. seconds: 31536000, nanos: 0) - * is used as default. - * @type float $global_duration_cost_per_hour - * The "global duration" of the overall plan is the difference between the - * earliest effective start time and the latest effective end time of - * all vehicles. Users can assign a cost per hour to that quantity to try - * and optimize for earliest job completion, for example. This cost must be in - * the same unit as - * [Shipment.penalty_cost][google.cloud.optimization.v1.Shipment.penalty_cost]. - * @type array<\Google\Cloud\Optimization\V1\ShipmentModel\DurationDistanceMatrix>|\Google\Protobuf\Internal\RepeatedField $duration_distance_matrices - * Specifies duration and distance matrices used in the model. If this field - * is empty, Google Maps or geodesic distances will be used instead, depending - * on the value of the `use_geodesic_distances` field. If it is not empty, - * `use_geodesic_distances` cannot be true and neither - * `duration_distance_matrix_src_tags` nor `duration_distance_matrix_dst_tags` - * can be empty. - * Usage examples: - * * There are two locations: locA and locB. - * * 1 vehicle starting its route at locA and ending it at locA. - * * 1 pickup visit request at locB. - * ``` - * model { - * vehicles { start_tags: "locA" end_tags: "locA" } - * shipments { pickups { tags: "locB" } } - * duration_distance_matrix_src_tags: "locA" - * duration_distance_matrix_src_tags: "locB" - * duration_distance_matrix_dst_tags: "locA" - * duration_distance_matrix_dst_tags: "locB" - * duration_distance_matrices { - * rows { # from: locA - * durations { seconds: 0 } meters: 0 # to: locA - * durations { seconds: 100 } meters: 1000 # to: locB - * } - * rows { # from: locB - * durations { seconds: 102 } meters: 990 # to: locA - * durations { seconds: 0 } meters: 0 # to: locB - * } - * } - * } - * ``` - * * There are three locations: locA, locB and locC. - * * 1 vehicle starting its route at locA and ending it at locB, using - * matrix "fast". - * * 1 vehicle starting its route at locB and ending it at locB, using - * matrix "slow". - * * 1 vehicle starting its route at locB and ending it at locB, using - * matrix "fast". - * * 1 pickup visit request at locC. - * ``` - * model { - * vehicles { start_tags: "locA" end_tags: "locB" start_tags: "fast" } - * vehicles { start_tags: "locB" end_tags: "locB" start_tags: "slow" } - * vehicles { start_tags: "locB" end_tags: "locB" start_tags: "fast" } - * shipments { pickups { tags: "locC" } } - * duration_distance_matrix_src_tags: "locA" - * duration_distance_matrix_src_tags: "locB" - * duration_distance_matrix_src_tags: "locC" - * duration_distance_matrix_dst_tags: "locB" - * duration_distance_matrix_dst_tags: "locC" - * duration_distance_matrices { - * vehicle_start_tag: "fast" - * rows { # from: locA - * durations { seconds: 1000 } meters: 2000 # to: locB - * durations { seconds: 600 } meters: 1000 # to: locC - * } - * rows { # from: locB - * durations { seconds: 0 } meters: 0 # to: locB - * durations { seconds: 700 } meters: 1200 # to: locC - * } - * rows { # from: locC - * durations { seconds: 702 } meters: 1190 # to: locB - * durations { seconds: 0 } meters: 0 # to: locC - * } - * } - * duration_distance_matrices { - * vehicle_start_tag: "slow" - * rows { # from: locA - * durations { seconds: 1800 } meters: 2001 # to: locB - * durations { seconds: 900 } meters: 1002 # to: locC - * } - * rows { # from: locB - * durations { seconds: 0 } meters: 0 # to: locB - * durations { seconds: 1000 } meters: 1202 # to: locC - * } - * rows { # from: locC - * durations { seconds: 1001 } meters: 1195 # to: locB - * durations { seconds: 0 } meters: 0 # to: locC - * } - * } - * } - * ``` - * @type array|\Google\Protobuf\Internal\RepeatedField $duration_distance_matrix_src_tags - * Tags defining the sources of the duration and distance matrices; - * `duration_distance_matrices(i).rows(j)` defines durations and distances - * from visits with tag `duration_distance_matrix_src_tags(j)` to other visits - * in matrix i. - * Tags correspond to - * [VisitRequest.tags][google.cloud.optimization.v1.Shipment.VisitRequest.tags] - * or [Vehicle.start_tags][google.cloud.optimization.v1.Vehicle.start_tags]. - * A given `VisitRequest` or `Vehicle` must match exactly one tag in this - * field. Note that a `Vehicle`'s source, destination and matrix tags may be - * the same; similarly a `VisitRequest`'s source and destination tags may be - * the same. All tags must be different and cannot be empty strings. If this - * field is not empty, then `duration_distance_matrices` must not be empty. - * @type array|\Google\Protobuf\Internal\RepeatedField $duration_distance_matrix_dst_tags - * Tags defining the destinations of the duration and distance matrices; - * `duration_distance_matrices(i).rows(j).durations(k)` (resp. - * `duration_distance_matrices(i).rows(j).meters(k))` defines the duration - * (resp. the distance) of the travel from visits with tag - * `duration_distance_matrix_src_tags(j)` to visits with tag - * `duration_distance_matrix_dst_tags(k)` in matrix i. - * Tags correspond to - * [VisitRequest.tags][google.cloud.optimization.v1.Shipment.VisitRequest.tags] - * or [Vehicle.start_tags][google.cloud.optimization.v1.Vehicle.start_tags]. - * A given `VisitRequest` or `Vehicle` must match exactly one tag in this - * field. Note that a `Vehicle`'s source, destination and matrix tags may be - * the same; similarly a `VisitRequest`'s source and destination tags may be - * the same. All tags must be different and cannot be empty strings. If this - * field is not empty, then `duration_distance_matrices` must not be empty. - * @type array<\Google\Cloud\Optimization\V1\TransitionAttributes>|\Google\Protobuf\Internal\RepeatedField $transition_attributes - * Transition attributes added to the model. - * @type array<\Google\Cloud\Optimization\V1\ShipmentTypeIncompatibility>|\Google\Protobuf\Internal\RepeatedField $shipment_type_incompatibilities - * Sets of incompatible shipment_types (see `ShipmentTypeIncompatibility`). - * @type array<\Google\Cloud\Optimization\V1\ShipmentTypeRequirement>|\Google\Protobuf\Internal\RepeatedField $shipment_type_requirements - * Sets of `shipment_type` requirements (see `ShipmentTypeRequirement`). - * @type array<\Google\Cloud\Optimization\V1\ShipmentModel\PrecedenceRule>|\Google\Protobuf\Internal\RepeatedField $precedence_rules - * Set of precedence rules which must be enforced in the model. - * @type array<\Google\Cloud\Optimization\V1\ShipmentModel\BreakRule>|\Google\Protobuf\Internal\RepeatedField $break_rules - * Deprecated: No longer used. - * Set of break rules used in the model. - * Each vehicle specifies the `BreakRule` that applies to it via the - * [Vehicle.break_rule_indices][google.cloud.optimization.v1.Vehicle.break_rule_indices] - * field (which must be a singleton). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); - parent::__construct($data); - } - - /** - * Set of shipments which must be performed in the model. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.Shipment shipments = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getShipments() - { - return $this->shipments; - } - - /** - * Set of shipments which must be performed in the model. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.Shipment shipments = 1; - * @param array<\Google\Cloud\Optimization\V1\Shipment>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setShipments($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\Shipment::class); - $this->shipments = $arr; - - return $this; - } - - /** - * Set of vehicles which can be used to perform visits. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.Vehicle vehicles = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getVehicles() - { - return $this->vehicles; - } - - /** - * Set of vehicles which can be used to perform visits. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.Vehicle vehicles = 2; - * @param array<\Google\Cloud\Optimization\V1\Vehicle>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setVehicles($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\Vehicle::class); - $this->vehicles = $arr; - - return $this; - } - - /** - * Constrains the maximum number of active vehicles. A vehicle is active if - * its route performs at least one shipment. This can be used to limit the - * number of routes in the case where there are fewer drivers than - * vehicles and that the fleet of vehicles is heterogeneous. The optimization - * will then select the best subset of vehicles to use. - * Must be strictly positive. - * - * Generated from protobuf field optional int32 max_active_vehicles = 4; - * @return int - */ - public function getMaxActiveVehicles() - { - return isset($this->max_active_vehicles) ? $this->max_active_vehicles : 0; - } - - public function hasMaxActiveVehicles() - { - return isset($this->max_active_vehicles); - } - - public function clearMaxActiveVehicles() - { - unset($this->max_active_vehicles); - } - - /** - * Constrains the maximum number of active vehicles. A vehicle is active if - * its route performs at least one shipment. This can be used to limit the - * number of routes in the case where there are fewer drivers than - * vehicles and that the fleet of vehicles is heterogeneous. The optimization - * will then select the best subset of vehicles to use. - * Must be strictly positive. - * - * Generated from protobuf field optional int32 max_active_vehicles = 4; - * @param int $var - * @return $this - */ - public function setMaxActiveVehicles($var) - { - GPBUtil::checkInt32($var); - $this->max_active_vehicles = $var; - - return $this; - } - - /** - * Global start and end time of the model: no times outside of this range - * can be considered valid. - * The model's time span must be less than a year, i.e. the `global_end_time` - * and the `global_start_time` must be within 31536000 seconds of each other. - * When using `cost_per_*hour` fields, you might want to set this window to a - * smaller interval to increase performance (eg. if you model a single day, - * you should set the global time limits to that day). - * If unset, 00:00:00 UTC, January 1, 1970 (i.e. seconds: 0, nanos: 0) is used - * as default. - * - * Generated from protobuf field .google.protobuf.Timestamp global_start_time = 5; - * @return \Google\Protobuf\Timestamp|null - */ - public function getGlobalStartTime() - { - return $this->global_start_time; - } - - public function hasGlobalStartTime() - { - return isset($this->global_start_time); - } - - public function clearGlobalStartTime() - { - unset($this->global_start_time); - } - - /** - * Global start and end time of the model: no times outside of this range - * can be considered valid. - * The model's time span must be less than a year, i.e. the `global_end_time` - * and the `global_start_time` must be within 31536000 seconds of each other. - * When using `cost_per_*hour` fields, you might want to set this window to a - * smaller interval to increase performance (eg. if you model a single day, - * you should set the global time limits to that day). - * If unset, 00:00:00 UTC, January 1, 1970 (i.e. seconds: 0, nanos: 0) is used - * as default. - * - * Generated from protobuf field .google.protobuf.Timestamp global_start_time = 5; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setGlobalStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->global_start_time = $var; - - return $this; - } - - /** - * If unset, 00:00:00 UTC, January 1, 1971 (i.e. seconds: 31536000, nanos: 0) - * is used as default. - * - * Generated from protobuf field .google.protobuf.Timestamp global_end_time = 6; - * @return \Google\Protobuf\Timestamp|null - */ - public function getGlobalEndTime() - { - return $this->global_end_time; - } - - public function hasGlobalEndTime() - { - return isset($this->global_end_time); - } - - public function clearGlobalEndTime() - { - unset($this->global_end_time); - } - - /** - * If unset, 00:00:00 UTC, January 1, 1971 (i.e. seconds: 31536000, nanos: 0) - * is used as default. - * - * Generated from protobuf field .google.protobuf.Timestamp global_end_time = 6; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setGlobalEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->global_end_time = $var; - - return $this; - } - - /** - * The "global duration" of the overall plan is the difference between the - * earliest effective start time and the latest effective end time of - * all vehicles. Users can assign a cost per hour to that quantity to try - * and optimize for earliest job completion, for example. This cost must be in - * the same unit as - * [Shipment.penalty_cost][google.cloud.optimization.v1.Shipment.penalty_cost]. - * - * Generated from protobuf field double global_duration_cost_per_hour = 7; - * @return float - */ - public function getGlobalDurationCostPerHour() - { - return $this->global_duration_cost_per_hour; - } - - /** - * The "global duration" of the overall plan is the difference between the - * earliest effective start time and the latest effective end time of - * all vehicles. Users can assign a cost per hour to that quantity to try - * and optimize for earliest job completion, for example. This cost must be in - * the same unit as - * [Shipment.penalty_cost][google.cloud.optimization.v1.Shipment.penalty_cost]. - * - * Generated from protobuf field double global_duration_cost_per_hour = 7; - * @param float $var - * @return $this - */ - public function setGlobalDurationCostPerHour($var) - { - GPBUtil::checkDouble($var); - $this->global_duration_cost_per_hour = $var; - - return $this; - } - - /** - * Specifies duration and distance matrices used in the model. If this field - * is empty, Google Maps or geodesic distances will be used instead, depending - * on the value of the `use_geodesic_distances` field. If it is not empty, - * `use_geodesic_distances` cannot be true and neither - * `duration_distance_matrix_src_tags` nor `duration_distance_matrix_dst_tags` - * can be empty. - * Usage examples: - * * There are two locations: locA and locB. - * * 1 vehicle starting its route at locA and ending it at locA. - * * 1 pickup visit request at locB. - * ``` - * model { - * vehicles { start_tags: "locA" end_tags: "locA" } - * shipments { pickups { tags: "locB" } } - * duration_distance_matrix_src_tags: "locA" - * duration_distance_matrix_src_tags: "locB" - * duration_distance_matrix_dst_tags: "locA" - * duration_distance_matrix_dst_tags: "locB" - * duration_distance_matrices { - * rows { # from: locA - * durations { seconds: 0 } meters: 0 # to: locA - * durations { seconds: 100 } meters: 1000 # to: locB - * } - * rows { # from: locB - * durations { seconds: 102 } meters: 990 # to: locA - * durations { seconds: 0 } meters: 0 # to: locB - * } - * } - * } - * ``` - * * There are three locations: locA, locB and locC. - * * 1 vehicle starting its route at locA and ending it at locB, using - * matrix "fast". - * * 1 vehicle starting its route at locB and ending it at locB, using - * matrix "slow". - * * 1 vehicle starting its route at locB and ending it at locB, using - * matrix "fast". - * * 1 pickup visit request at locC. - * ``` - * model { - * vehicles { start_tags: "locA" end_tags: "locB" start_tags: "fast" } - * vehicles { start_tags: "locB" end_tags: "locB" start_tags: "slow" } - * vehicles { start_tags: "locB" end_tags: "locB" start_tags: "fast" } - * shipments { pickups { tags: "locC" } } - * duration_distance_matrix_src_tags: "locA" - * duration_distance_matrix_src_tags: "locB" - * duration_distance_matrix_src_tags: "locC" - * duration_distance_matrix_dst_tags: "locB" - * duration_distance_matrix_dst_tags: "locC" - * duration_distance_matrices { - * vehicle_start_tag: "fast" - * rows { # from: locA - * durations { seconds: 1000 } meters: 2000 # to: locB - * durations { seconds: 600 } meters: 1000 # to: locC - * } - * rows { # from: locB - * durations { seconds: 0 } meters: 0 # to: locB - * durations { seconds: 700 } meters: 1200 # to: locC - * } - * rows { # from: locC - * durations { seconds: 702 } meters: 1190 # to: locB - * durations { seconds: 0 } meters: 0 # to: locC - * } - * } - * duration_distance_matrices { - * vehicle_start_tag: "slow" - * rows { # from: locA - * durations { seconds: 1800 } meters: 2001 # to: locB - * durations { seconds: 900 } meters: 1002 # to: locC - * } - * rows { # from: locB - * durations { seconds: 0 } meters: 0 # to: locB - * durations { seconds: 1000 } meters: 1202 # to: locC - * } - * rows { # from: locC - * durations { seconds: 1001 } meters: 1195 # to: locB - * durations { seconds: 0 } meters: 0 # to: locC - * } - * } - * } - * ``` - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix duration_distance_matrices = 8; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDurationDistanceMatrices() - { - return $this->duration_distance_matrices; - } - - /** - * Specifies duration and distance matrices used in the model. If this field - * is empty, Google Maps or geodesic distances will be used instead, depending - * on the value of the `use_geodesic_distances` field. If it is not empty, - * `use_geodesic_distances` cannot be true and neither - * `duration_distance_matrix_src_tags` nor `duration_distance_matrix_dst_tags` - * can be empty. - * Usage examples: - * * There are two locations: locA and locB. - * * 1 vehicle starting its route at locA and ending it at locA. - * * 1 pickup visit request at locB. - * ``` - * model { - * vehicles { start_tags: "locA" end_tags: "locA" } - * shipments { pickups { tags: "locB" } } - * duration_distance_matrix_src_tags: "locA" - * duration_distance_matrix_src_tags: "locB" - * duration_distance_matrix_dst_tags: "locA" - * duration_distance_matrix_dst_tags: "locB" - * duration_distance_matrices { - * rows { # from: locA - * durations { seconds: 0 } meters: 0 # to: locA - * durations { seconds: 100 } meters: 1000 # to: locB - * } - * rows { # from: locB - * durations { seconds: 102 } meters: 990 # to: locA - * durations { seconds: 0 } meters: 0 # to: locB - * } - * } - * } - * ``` - * * There are three locations: locA, locB and locC. - * * 1 vehicle starting its route at locA and ending it at locB, using - * matrix "fast". - * * 1 vehicle starting its route at locB and ending it at locB, using - * matrix "slow". - * * 1 vehicle starting its route at locB and ending it at locB, using - * matrix "fast". - * * 1 pickup visit request at locC. - * ``` - * model { - * vehicles { start_tags: "locA" end_tags: "locB" start_tags: "fast" } - * vehicles { start_tags: "locB" end_tags: "locB" start_tags: "slow" } - * vehicles { start_tags: "locB" end_tags: "locB" start_tags: "fast" } - * shipments { pickups { tags: "locC" } } - * duration_distance_matrix_src_tags: "locA" - * duration_distance_matrix_src_tags: "locB" - * duration_distance_matrix_src_tags: "locC" - * duration_distance_matrix_dst_tags: "locB" - * duration_distance_matrix_dst_tags: "locC" - * duration_distance_matrices { - * vehicle_start_tag: "fast" - * rows { # from: locA - * durations { seconds: 1000 } meters: 2000 # to: locB - * durations { seconds: 600 } meters: 1000 # to: locC - * } - * rows { # from: locB - * durations { seconds: 0 } meters: 0 # to: locB - * durations { seconds: 700 } meters: 1200 # to: locC - * } - * rows { # from: locC - * durations { seconds: 702 } meters: 1190 # to: locB - * durations { seconds: 0 } meters: 0 # to: locC - * } - * } - * duration_distance_matrices { - * vehicle_start_tag: "slow" - * rows { # from: locA - * durations { seconds: 1800 } meters: 2001 # to: locB - * durations { seconds: 900 } meters: 1002 # to: locC - * } - * rows { # from: locB - * durations { seconds: 0 } meters: 0 # to: locB - * durations { seconds: 1000 } meters: 1202 # to: locC - * } - * rows { # from: locC - * durations { seconds: 1001 } meters: 1195 # to: locB - * durations { seconds: 0 } meters: 0 # to: locC - * } - * } - * } - * ``` - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix duration_distance_matrices = 8; - * @param array<\Google\Cloud\Optimization\V1\ShipmentModel\DurationDistanceMatrix>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDurationDistanceMatrices($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\ShipmentModel\DurationDistanceMatrix::class); - $this->duration_distance_matrices = $arr; - - return $this; - } - - /** - * Tags defining the sources of the duration and distance matrices; - * `duration_distance_matrices(i).rows(j)` defines durations and distances - * from visits with tag `duration_distance_matrix_src_tags(j)` to other visits - * in matrix i. - * Tags correspond to - * [VisitRequest.tags][google.cloud.optimization.v1.Shipment.VisitRequest.tags] - * or [Vehicle.start_tags][google.cloud.optimization.v1.Vehicle.start_tags]. - * A given `VisitRequest` or `Vehicle` must match exactly one tag in this - * field. Note that a `Vehicle`'s source, destination and matrix tags may be - * the same; similarly a `VisitRequest`'s source and destination tags may be - * the same. All tags must be different and cannot be empty strings. If this - * field is not empty, then `duration_distance_matrices` must not be empty. - * - * Generated from protobuf field repeated string duration_distance_matrix_src_tags = 9; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDurationDistanceMatrixSrcTags() - { - return $this->duration_distance_matrix_src_tags; - } - - /** - * Tags defining the sources of the duration and distance matrices; - * `duration_distance_matrices(i).rows(j)` defines durations and distances - * from visits with tag `duration_distance_matrix_src_tags(j)` to other visits - * in matrix i. - * Tags correspond to - * [VisitRequest.tags][google.cloud.optimization.v1.Shipment.VisitRequest.tags] - * or [Vehicle.start_tags][google.cloud.optimization.v1.Vehicle.start_tags]. - * A given `VisitRequest` or `Vehicle` must match exactly one tag in this - * field. Note that a `Vehicle`'s source, destination and matrix tags may be - * the same; similarly a `VisitRequest`'s source and destination tags may be - * the same. All tags must be different and cannot be empty strings. If this - * field is not empty, then `duration_distance_matrices` must not be empty. - * - * Generated from protobuf field repeated string duration_distance_matrix_src_tags = 9; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDurationDistanceMatrixSrcTags($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->duration_distance_matrix_src_tags = $arr; - - return $this; - } - - /** - * Tags defining the destinations of the duration and distance matrices; - * `duration_distance_matrices(i).rows(j).durations(k)` (resp. - * `duration_distance_matrices(i).rows(j).meters(k))` defines the duration - * (resp. the distance) of the travel from visits with tag - * `duration_distance_matrix_src_tags(j)` to visits with tag - * `duration_distance_matrix_dst_tags(k)` in matrix i. - * Tags correspond to - * [VisitRequest.tags][google.cloud.optimization.v1.Shipment.VisitRequest.tags] - * or [Vehicle.start_tags][google.cloud.optimization.v1.Vehicle.start_tags]. - * A given `VisitRequest` or `Vehicle` must match exactly one tag in this - * field. Note that a `Vehicle`'s source, destination and matrix tags may be - * the same; similarly a `VisitRequest`'s source and destination tags may be - * the same. All tags must be different and cannot be empty strings. If this - * field is not empty, then `duration_distance_matrices` must not be empty. - * - * Generated from protobuf field repeated string duration_distance_matrix_dst_tags = 10; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDurationDistanceMatrixDstTags() - { - return $this->duration_distance_matrix_dst_tags; - } - - /** - * Tags defining the destinations of the duration and distance matrices; - * `duration_distance_matrices(i).rows(j).durations(k)` (resp. - * `duration_distance_matrices(i).rows(j).meters(k))` defines the duration - * (resp. the distance) of the travel from visits with tag - * `duration_distance_matrix_src_tags(j)` to visits with tag - * `duration_distance_matrix_dst_tags(k)` in matrix i. - * Tags correspond to - * [VisitRequest.tags][google.cloud.optimization.v1.Shipment.VisitRequest.tags] - * or [Vehicle.start_tags][google.cloud.optimization.v1.Vehicle.start_tags]. - * A given `VisitRequest` or `Vehicle` must match exactly one tag in this - * field. Note that a `Vehicle`'s source, destination and matrix tags may be - * the same; similarly a `VisitRequest`'s source and destination tags may be - * the same. All tags must be different and cannot be empty strings. If this - * field is not empty, then `duration_distance_matrices` must not be empty. - * - * Generated from protobuf field repeated string duration_distance_matrix_dst_tags = 10; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDurationDistanceMatrixDstTags($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->duration_distance_matrix_dst_tags = $arr; - - return $this; - } - - /** - * Transition attributes added to the model. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.TransitionAttributes transition_attributes = 11; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTransitionAttributes() - { - return $this->transition_attributes; - } - - /** - * Transition attributes added to the model. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.TransitionAttributes transition_attributes = 11; - * @param array<\Google\Cloud\Optimization\V1\TransitionAttributes>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTransitionAttributes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\TransitionAttributes::class); - $this->transition_attributes = $arr; - - return $this; - } - - /** - * Sets of incompatible shipment_types (see `ShipmentTypeIncompatibility`). - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.ShipmentTypeIncompatibility shipment_type_incompatibilities = 12; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getShipmentTypeIncompatibilities() - { - return $this->shipment_type_incompatibilities; - } - - /** - * Sets of incompatible shipment_types (see `ShipmentTypeIncompatibility`). - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.ShipmentTypeIncompatibility shipment_type_incompatibilities = 12; - * @param array<\Google\Cloud\Optimization\V1\ShipmentTypeIncompatibility>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setShipmentTypeIncompatibilities($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\ShipmentTypeIncompatibility::class); - $this->shipment_type_incompatibilities = $arr; - - return $this; - } - - /** - * Sets of `shipment_type` requirements (see `ShipmentTypeRequirement`). - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.ShipmentTypeRequirement shipment_type_requirements = 13; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getShipmentTypeRequirements() - { - return $this->shipment_type_requirements; - } - - /** - * Sets of `shipment_type` requirements (see `ShipmentTypeRequirement`). - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.ShipmentTypeRequirement shipment_type_requirements = 13; - * @param array<\Google\Cloud\Optimization\V1\ShipmentTypeRequirement>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setShipmentTypeRequirements($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\ShipmentTypeRequirement::class); - $this->shipment_type_requirements = $arr; - - return $this; - } - - /** - * Set of precedence rules which must be enforced in the model. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.ShipmentModel.PrecedenceRule precedence_rules = 14; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPrecedenceRules() - { - return $this->precedence_rules; - } - - /** - * Set of precedence rules which must be enforced in the model. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.ShipmentModel.PrecedenceRule precedence_rules = 14; - * @param array<\Google\Cloud\Optimization\V1\ShipmentModel\PrecedenceRule>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPrecedenceRules($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\ShipmentModel\PrecedenceRule::class); - $this->precedence_rules = $arr; - - return $this; - } - - /** - * Deprecated: No longer used. - * Set of break rules used in the model. - * Each vehicle specifies the `BreakRule` that applies to it via the - * [Vehicle.break_rule_indices][google.cloud.optimization.v1.Vehicle.break_rule_indices] - * field (which must be a singleton). - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule break_rules = 15 [deprecated = true]; - * @return \Google\Protobuf\Internal\RepeatedField - * @deprecated - */ - public function getBreakRules() - { - @trigger_error('break_rules is deprecated.', E_USER_DEPRECATED); - return $this->break_rules; - } - - /** - * Deprecated: No longer used. - * Set of break rules used in the model. - * Each vehicle specifies the `BreakRule` that applies to it via the - * [Vehicle.break_rule_indices][google.cloud.optimization.v1.Vehicle.break_rule_indices] - * field (which must be a singleton). - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule break_rules = 15 [deprecated = true]; - * @param array<\Google\Cloud\Optimization\V1\ShipmentModel\BreakRule>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - * @deprecated - */ - public function setBreakRules($var) - { - @trigger_error('break_rules is deprecated.', E_USER_DEPRECATED); - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\ShipmentModel\BreakRule::class); - $this->break_rules = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentModel/BreakRule.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentModel/BreakRule.php deleted file mode 100644 index 3559aee5e021..000000000000 --- a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentModel/BreakRule.php +++ /dev/null @@ -1,120 +0,0 @@ -google.cloud.optimization.v1.ShipmentModel.BreakRule - */ -class BreakRule extends \Google\Protobuf\Internal\Message -{ - /** - * Sequence of breaks. See the `BreakRequest` message. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest break_requests = 1; - */ - private $break_requests; - /** - * Several `FrequencyConstraint` may apply. They must all be satisfied by - * the `BreakRequest`s of this `BreakRule`. See `FrequencyConstraint`. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint frequency_constraints = 2; - */ - private $frequency_constraints; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Optimization\V1\ShipmentModel\BreakRule\BreakRequest>|\Google\Protobuf\Internal\RepeatedField $break_requests - * Sequence of breaks. See the `BreakRequest` message. - * @type array<\Google\Cloud\Optimization\V1\ShipmentModel\BreakRule\FrequencyConstraint>|\Google\Protobuf\Internal\RepeatedField $frequency_constraints - * Several `FrequencyConstraint` may apply. They must all be satisfied by - * the `BreakRequest`s of this `BreakRule`. See `FrequencyConstraint`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); - parent::__construct($data); - } - - /** - * Sequence of breaks. See the `BreakRequest` message. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest break_requests = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getBreakRequests() - { - return $this->break_requests; - } - - /** - * Sequence of breaks. See the `BreakRequest` message. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest break_requests = 1; - * @param array<\Google\Cloud\Optimization\V1\ShipmentModel\BreakRule\BreakRequest>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setBreakRequests($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\ShipmentModel\BreakRule\BreakRequest::class); - $this->break_requests = $arr; - - return $this; - } - - /** - * Several `FrequencyConstraint` may apply. They must all be satisfied by - * the `BreakRequest`s of this `BreakRule`. See `FrequencyConstraint`. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint frequency_constraints = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFrequencyConstraints() - { - return $this->frequency_constraints; - } - - /** - * Several `FrequencyConstraint` may apply. They must all be satisfied by - * the `BreakRequest`s of this `BreakRule`. See `FrequencyConstraint`. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint frequency_constraints = 2; - * @param array<\Google\Cloud\Optimization\V1\ShipmentModel\BreakRule\FrequencyConstraint>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFrequencyConstraints($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\ShipmentModel\BreakRule\FrequencyConstraint::class); - $this->frequency_constraints = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(BreakRule::class, \Google\Cloud\Optimization\V1\ShipmentModel_BreakRule::class); - diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentModel/BreakRule/BreakRequest.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentModel/BreakRule/BreakRequest.php deleted file mode 100644 index 67f86f1f4e7a..000000000000 --- a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentModel/BreakRule/BreakRequest.php +++ /dev/null @@ -1,172 +0,0 @@ -google.cloud.optimization.v1.ShipmentModel.BreakRule.BreakRequest - */ -class BreakRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Lower bound (inclusive) on the start of the break. - * - * Generated from protobuf field .google.protobuf.Timestamp earliest_start_time = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $earliest_start_time = null; - /** - * Required. Upper bound (inclusive) on the start of the break. - * - * Generated from protobuf field .google.protobuf.Timestamp latest_start_time = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $latest_start_time = null; - /** - * Required. Minimum duration of the break. Must be positive. - * - * Generated from protobuf field .google.protobuf.Duration min_duration = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $min_duration = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $earliest_start_time - * Required. Lower bound (inclusive) on the start of the break. - * @type \Google\Protobuf\Timestamp $latest_start_time - * Required. Upper bound (inclusive) on the start of the break. - * @type \Google\Protobuf\Duration $min_duration - * Required. Minimum duration of the break. Must be positive. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); - parent::__construct($data); - } - - /** - * Required. Lower bound (inclusive) on the start of the break. - * - * Generated from protobuf field .google.protobuf.Timestamp earliest_start_time = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEarliestStartTime() - { - return $this->earliest_start_time; - } - - public function hasEarliestStartTime() - { - return isset($this->earliest_start_time); - } - - public function clearEarliestStartTime() - { - unset($this->earliest_start_time); - } - - /** - * Required. Lower bound (inclusive) on the start of the break. - * - * Generated from protobuf field .google.protobuf.Timestamp earliest_start_time = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEarliestStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->earliest_start_time = $var; - - return $this; - } - - /** - * Required. Upper bound (inclusive) on the start of the break. - * - * Generated from protobuf field .google.protobuf.Timestamp latest_start_time = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getLatestStartTime() - { - return $this->latest_start_time; - } - - public function hasLatestStartTime() - { - return isset($this->latest_start_time); - } - - public function clearLatestStartTime() - { - unset($this->latest_start_time); - } - - /** - * Required. Upper bound (inclusive) on the start of the break. - * - * Generated from protobuf field .google.protobuf.Timestamp latest_start_time = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setLatestStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->latest_start_time = $var; - - return $this; - } - - /** - * Required. Minimum duration of the break. Must be positive. - * - * Generated from protobuf field .google.protobuf.Duration min_duration = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Duration|null - */ - public function getMinDuration() - { - return $this->min_duration; - } - - public function hasMinDuration() - { - return isset($this->min_duration); - } - - public function clearMinDuration() - { - unset($this->min_duration); - } - - /** - * Required. Minimum duration of the break. Must be positive. - * - * Generated from protobuf field .google.protobuf.Duration min_duration = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setMinDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->min_duration = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(BreakRequest::class, \Google\Cloud\Optimization\V1\ShipmentModel_BreakRule_BreakRequest::class); - diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentModel/BreakRule/FrequencyConstraint.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentModel/BreakRule/FrequencyConstraint.php deleted file mode 100644 index 39bf3659c306..000000000000 --- a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentModel/BreakRule/FrequencyConstraint.php +++ /dev/null @@ -1,166 +0,0 @@ -google.cloud.optimization.v1.ShipmentModel.BreakRule.FrequencyConstraint - */ -class FrequencyConstraint extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Minimum break duration for this constraint. Nonnegative. - * See description of `FrequencyConstraint`. - * - * Generated from protobuf field .google.protobuf.Duration min_break_duration = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $min_break_duration = null; - /** - * Required. Maximum allowed span of any interval of time in the route - * that does not include at least partially a break of `duration >= - * min_break_duration`. Must be positive. - * - * Generated from protobuf field .google.protobuf.Duration max_inter_break_duration = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $max_inter_break_duration = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Duration $min_break_duration - * Required. Minimum break duration for this constraint. Nonnegative. - * See description of `FrequencyConstraint`. - * @type \Google\Protobuf\Duration $max_inter_break_duration - * Required. Maximum allowed span of any interval of time in the route - * that does not include at least partially a break of `duration >= - * min_break_duration`. Must be positive. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); - parent::__construct($data); - } - - /** - * Required. Minimum break duration for this constraint. Nonnegative. - * See description of `FrequencyConstraint`. - * - * Generated from protobuf field .google.protobuf.Duration min_break_duration = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Duration|null - */ - public function getMinBreakDuration() - { - return $this->min_break_duration; - } - - public function hasMinBreakDuration() - { - return isset($this->min_break_duration); - } - - public function clearMinBreakDuration() - { - unset($this->min_break_duration); - } - - /** - * Required. Minimum break duration for this constraint. Nonnegative. - * See description of `FrequencyConstraint`. - * - * Generated from protobuf field .google.protobuf.Duration min_break_duration = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setMinBreakDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->min_break_duration = $var; - - return $this; - } - - /** - * Required. Maximum allowed span of any interval of time in the route - * that does not include at least partially a break of `duration >= - * min_break_duration`. Must be positive. - * - * Generated from protobuf field .google.protobuf.Duration max_inter_break_duration = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Duration|null - */ - public function getMaxInterBreakDuration() - { - return $this->max_inter_break_duration; - } - - public function hasMaxInterBreakDuration() - { - return isset($this->max_inter_break_duration); - } - - public function clearMaxInterBreakDuration() - { - unset($this->max_inter_break_duration); - } - - /** - * Required. Maximum allowed span of any interval of time in the route - * that does not include at least partially a break of `duration >= - * min_break_duration`. Must be positive. - * - * Generated from protobuf field .google.protobuf.Duration max_inter_break_duration = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setMaxInterBreakDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->max_inter_break_duration = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(FrequencyConstraint::class, \Google\Cloud\Optimization\V1\ShipmentModel_BreakRule_FrequencyConstraint::class); - diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentModel/DurationDistanceMatrix.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentModel/DurationDistanceMatrix.php deleted file mode 100644 index 24e614413ac5..000000000000 --- a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentModel/DurationDistanceMatrix.php +++ /dev/null @@ -1,137 +0,0 @@ -google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix - */ -class DurationDistanceMatrix extends \Google\Protobuf\Internal\Message -{ - /** - * Specifies the rows of the duration and distance matrix. It must have as - * many elements as - * [ShipmentModel.duration_distance_matrix_src_tags][google.cloud.optimization.v1.ShipmentModel.duration_distance_matrix_src_tags]. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row rows = 1; - */ - private $rows; - /** - * Tag defining to which vehicles this duration and distance matrix applies. - * If empty, this applies to all vehicles, and there can only be a single - * matrix. - * Each vehicle start must match exactly one matrix, i.e. exactly one of - * their `start_tags` field must match the `vehicle_start_tag` of a matrix - * (and of that matrix only). - * All matrices must have a different `vehicle_start_tag`. - * - * Generated from protobuf field string vehicle_start_tag = 2; - */ - protected $vehicle_start_tag = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Optimization\V1\ShipmentModel\DurationDistanceMatrix\Row>|\Google\Protobuf\Internal\RepeatedField $rows - * Specifies the rows of the duration and distance matrix. It must have as - * many elements as - * [ShipmentModel.duration_distance_matrix_src_tags][google.cloud.optimization.v1.ShipmentModel.duration_distance_matrix_src_tags]. - * @type string $vehicle_start_tag - * Tag defining to which vehicles this duration and distance matrix applies. - * If empty, this applies to all vehicles, and there can only be a single - * matrix. - * Each vehicle start must match exactly one matrix, i.e. exactly one of - * their `start_tags` field must match the `vehicle_start_tag` of a matrix - * (and of that matrix only). - * All matrices must have a different `vehicle_start_tag`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); - parent::__construct($data); - } - - /** - * Specifies the rows of the duration and distance matrix. It must have as - * many elements as - * [ShipmentModel.duration_distance_matrix_src_tags][google.cloud.optimization.v1.ShipmentModel.duration_distance_matrix_src_tags]. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row rows = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRows() - { - return $this->rows; - } - - /** - * Specifies the rows of the duration and distance matrix. It must have as - * many elements as - * [ShipmentModel.duration_distance_matrix_src_tags][google.cloud.optimization.v1.ShipmentModel.duration_distance_matrix_src_tags]. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row rows = 1; - * @param array<\Google\Cloud\Optimization\V1\ShipmentModel\DurationDistanceMatrix\Row>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRows($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\ShipmentModel\DurationDistanceMatrix\Row::class); - $this->rows = $arr; - - return $this; - } - - /** - * Tag defining to which vehicles this duration and distance matrix applies. - * If empty, this applies to all vehicles, and there can only be a single - * matrix. - * Each vehicle start must match exactly one matrix, i.e. exactly one of - * their `start_tags` field must match the `vehicle_start_tag` of a matrix - * (and of that matrix only). - * All matrices must have a different `vehicle_start_tag`. - * - * Generated from protobuf field string vehicle_start_tag = 2; - * @return string - */ - public function getVehicleStartTag() - { - return $this->vehicle_start_tag; - } - - /** - * Tag defining to which vehicles this duration and distance matrix applies. - * If empty, this applies to all vehicles, and there can only be a single - * matrix. - * Each vehicle start must match exactly one matrix, i.e. exactly one of - * their `start_tags` field must match the `vehicle_start_tag` of a matrix - * (and of that matrix only). - * All matrices must have a different `vehicle_start_tag`. - * - * Generated from protobuf field string vehicle_start_tag = 2; - * @param string $var - * @return $this - */ - public function setVehicleStartTag($var) - { - GPBUtil::checkString($var, True); - $this->vehicle_start_tag = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DurationDistanceMatrix::class, \Google\Cloud\Optimization\V1\ShipmentModel_DurationDistanceMatrix::class); - diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentModel/DurationDistanceMatrix/Row.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentModel/DurationDistanceMatrix/Row.php deleted file mode 100644 index bbe790501808..000000000000 --- a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentModel/DurationDistanceMatrix/Row.php +++ /dev/null @@ -1,116 +0,0 @@ -google.cloud.optimization.v1.ShipmentModel.DurationDistanceMatrix.Row - */ -class Row extends \Google\Protobuf\Internal\Message -{ - /** - * Duration values for a given row. It must have as many elements as - * [ShipmentModel.duration_distance_matrix_dst_tags][google.cloud.optimization.v1.ShipmentModel.duration_distance_matrix_dst_tags]. - * - * Generated from protobuf field repeated .google.protobuf.Duration durations = 1; - */ - private $durations; - /** - * Distance values for a given row. If no costs or constraints refer to - * distances in the model, this can be left empty; otherwise it must have - * as many elements as `durations`. - * - * Generated from protobuf field repeated double meters = 2; - */ - private $meters; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Protobuf\Duration>|\Google\Protobuf\Internal\RepeatedField $durations - * Duration values for a given row. It must have as many elements as - * [ShipmentModel.duration_distance_matrix_dst_tags][google.cloud.optimization.v1.ShipmentModel.duration_distance_matrix_dst_tags]. - * @type array|\Google\Protobuf\Internal\RepeatedField $meters - * Distance values for a given row. If no costs or constraints refer to - * distances in the model, this can be left empty; otherwise it must have - * as many elements as `durations`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); - parent::__construct($data); - } - - /** - * Duration values for a given row. It must have as many elements as - * [ShipmentModel.duration_distance_matrix_dst_tags][google.cloud.optimization.v1.ShipmentModel.duration_distance_matrix_dst_tags]. - * - * Generated from protobuf field repeated .google.protobuf.Duration durations = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDurations() - { - return $this->durations; - } - - /** - * Duration values for a given row. It must have as many elements as - * [ShipmentModel.duration_distance_matrix_dst_tags][google.cloud.optimization.v1.ShipmentModel.duration_distance_matrix_dst_tags]. - * - * Generated from protobuf field repeated .google.protobuf.Duration durations = 1; - * @param array<\Google\Protobuf\Duration>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDurations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Duration::class); - $this->durations = $arr; - - return $this; - } - - /** - * Distance values for a given row. If no costs or constraints refer to - * distances in the model, this can be left empty; otherwise it must have - * as many elements as `durations`. - * - * Generated from protobuf field repeated double meters = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMeters() - { - return $this->meters; - } - - /** - * Distance values for a given row. If no costs or constraints refer to - * distances in the model, this can be left empty; otherwise it must have - * as many elements as `durations`. - * - * Generated from protobuf field repeated double meters = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMeters($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::DOUBLE); - $this->meters = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Row::class, \Google\Cloud\Optimization\V1\ShipmentModel_DurationDistanceMatrix_Row::class); - diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentModel/PrecedenceRule.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentModel/PrecedenceRule.php deleted file mode 100644 index 646693dcbc35..000000000000 --- a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentModel/PrecedenceRule.php +++ /dev/null @@ -1,243 +0,0 @@ -google.cloud.optimization.v1.ShipmentModel.PrecedenceRule - */ -class PrecedenceRule extends \Google\Protobuf\Internal\Message -{ - /** - * Shipment index of the "first" event. This field must be specified. - * - * Generated from protobuf field optional int32 first_index = 1; - */ - protected $first_index = null; - /** - * Indicates if the "first" event is a delivery. - * - * Generated from protobuf field bool first_is_delivery = 3; - */ - protected $first_is_delivery = false; - /** - * Shipment index of the "second" event. This field must be specified. - * - * Generated from protobuf field optional int32 second_index = 2; - */ - protected $second_index = null; - /** - * Indicates if the "second" event is a delivery. - * - * Generated from protobuf field bool second_is_delivery = 4; - */ - protected $second_is_delivery = false; - /** - * The offset between the "first" and "second" event. It can be negative. - * - * Generated from protobuf field .google.protobuf.Duration offset_duration = 5; - */ - protected $offset_duration = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $first_index - * Shipment index of the "first" event. This field must be specified. - * @type bool $first_is_delivery - * Indicates if the "first" event is a delivery. - * @type int $second_index - * Shipment index of the "second" event. This field must be specified. - * @type bool $second_is_delivery - * Indicates if the "second" event is a delivery. - * @type \Google\Protobuf\Duration $offset_duration - * The offset between the "first" and "second" event. It can be negative. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); - parent::__construct($data); - } - - /** - * Shipment index of the "first" event. This field must be specified. - * - * Generated from protobuf field optional int32 first_index = 1; - * @return int - */ - public function getFirstIndex() - { - return isset($this->first_index) ? $this->first_index : 0; - } - - public function hasFirstIndex() - { - return isset($this->first_index); - } - - public function clearFirstIndex() - { - unset($this->first_index); - } - - /** - * Shipment index of the "first" event. This field must be specified. - * - * Generated from protobuf field optional int32 first_index = 1; - * @param int $var - * @return $this - */ - public function setFirstIndex($var) - { - GPBUtil::checkInt32($var); - $this->first_index = $var; - - return $this; - } - - /** - * Indicates if the "first" event is a delivery. - * - * Generated from protobuf field bool first_is_delivery = 3; - * @return bool - */ - public function getFirstIsDelivery() - { - return $this->first_is_delivery; - } - - /** - * Indicates if the "first" event is a delivery. - * - * Generated from protobuf field bool first_is_delivery = 3; - * @param bool $var - * @return $this - */ - public function setFirstIsDelivery($var) - { - GPBUtil::checkBool($var); - $this->first_is_delivery = $var; - - return $this; - } - - /** - * Shipment index of the "second" event. This field must be specified. - * - * Generated from protobuf field optional int32 second_index = 2; - * @return int - */ - public function getSecondIndex() - { - return isset($this->second_index) ? $this->second_index : 0; - } - - public function hasSecondIndex() - { - return isset($this->second_index); - } - - public function clearSecondIndex() - { - unset($this->second_index); - } - - /** - * Shipment index of the "second" event. This field must be specified. - * - * Generated from protobuf field optional int32 second_index = 2; - * @param int $var - * @return $this - */ - public function setSecondIndex($var) - { - GPBUtil::checkInt32($var); - $this->second_index = $var; - - return $this; - } - - /** - * Indicates if the "second" event is a delivery. - * - * Generated from protobuf field bool second_is_delivery = 4; - * @return bool - */ - public function getSecondIsDelivery() - { - return $this->second_is_delivery; - } - - /** - * Indicates if the "second" event is a delivery. - * - * Generated from protobuf field bool second_is_delivery = 4; - * @param bool $var - * @return $this - */ - public function setSecondIsDelivery($var) - { - GPBUtil::checkBool($var); - $this->second_is_delivery = $var; - - return $this; - } - - /** - * The offset between the "first" and "second" event. It can be negative. - * - * Generated from protobuf field .google.protobuf.Duration offset_duration = 5; - * @return \Google\Protobuf\Duration|null - */ - public function getOffsetDuration() - { - return $this->offset_duration; - } - - public function hasOffsetDuration() - { - return isset($this->offset_duration); - } - - public function clearOffsetDuration() - { - unset($this->offset_duration); - } - - /** - * The offset between the "first" and "second" event. It can be negative. - * - * Generated from protobuf field .google.protobuf.Duration offset_duration = 5; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setOffsetDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->offset_duration = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(PrecedenceRule::class, \Google\Cloud\Optimization\V1\ShipmentModel_PrecedenceRule::class); - diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentRoute.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentRoute.php deleted file mode 100644 index 05da325cf562..000000000000 --- a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentRoute.php +++ /dev/null @@ -1,954 +0,0 @@ - - * | TRANSITION[i] | VISIT[i] | - * | | | - * | * TRAVEL: the vehicle moves from | PERFORM the visit: | - * | VISIT[i-1].departure_location to | | - * | VISIT[i].arrival_location, which | * Spend some time: | - * | takes a given travel duration | the "visit duration". | - * | and distance | | - * | | * Load or unload | - * | * BREAKS: the driver may have | some quantities from the | - * | breaks (e.g. lunch break). | vehicle: the "demand". | - * | | | - * | * WAIT: the driver/vehicle does | | - * | nothing. This can happen for | | - * | many reasons, for example when | | - * | the vehicle reaches the next | | - * | event's destination before the | | - * | start of its time window | | - * | | | - * | * DELAY: *right before* the next | | - * | arrival. E.g. the vehicle and/or | | - * | driver spends time unloading. | | - * | | | - * ---+-------------------------------------+-----------------------------+--> - * ^ ^ ^ - * V[i-1].end V[i].start V[i].end - * ``` - * Lastly, here is how the TRAVEL, BREAKS, DELAY and WAIT can be arranged - * during a transition. - * * They don't overlap. - * * The DELAY is unique and *must* be a contiguous period of time right - * before the next visit (or vehicle end). Thus, it suffice to know the - * delay duration to know its start and end time. - * * The BREAKS are contiguous, non-overlapping periods of time. The - * response specifies the start time and duration of each break. - * * TRAVEL and WAIT are "preemptable": they can be interrupted several times - * during this transition. Clients can assume that travel happens "as soon as - * possible" and that "wait" fills the remaining time. - * A (complex) example: - * ``` - * TRANSITION[i] - * --++-----+-----------------------------------------------------------++--> - * || | | | | | | || - * || T | B | T | | B | | D || - * || r | r | r | W | r | W | e || - * || a | e | a | a | e | a | l || - * || v | a | v | i | a | i | a || - * || e | k | e | t | k | t | y || - * || l | | l | | | | || - * || | | | | | | || - * --++-----------------------------------------------------------------++--> - * ``` - * - * Generated from protobuf message google.cloud.optimization.v1.ShipmentRoute - */ -class ShipmentRoute extends \Google\Protobuf\Internal\Message -{ - /** - * Vehicle performing the route, identified by its index in the source - * `ShipmentModel`. - * - * Generated from protobuf field int32 vehicle_index = 1; - */ - protected $vehicle_index = 0; - /** - * Label of the vehicle performing this route, equal to - * `ShipmentModel.vehicles(vehicle_index).label`, if specified. - * - * Generated from protobuf field string vehicle_label = 2; - */ - protected $vehicle_label = ''; - /** - * Time at which the vehicle starts its route. - * - * Generated from protobuf field .google.protobuf.Timestamp vehicle_start_time = 5; - */ - protected $vehicle_start_time = null; - /** - * Time at which the vehicle finishes its route. - * - * Generated from protobuf field .google.protobuf.Timestamp vehicle_end_time = 6; - */ - protected $vehicle_end_time = null; - /** - * Ordered sequence of visits representing a route. - * visits[i] is the i-th visit in the route. - * If this field is empty, the vehicle is considered as unused. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.ShipmentRoute.Visit visits = 7; - */ - private $visits; - /** - * Ordered list of transitions for the route. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.ShipmentRoute.Transition transitions = 8; - */ - private $transitions; - /** - * When - * [OptimizeToursRequest.consider_road_traffic][google.cloud.optimization.v1.OptimizeToursRequest.consider_road_traffic], - * is set to true, this field indicates that inconsistencies in route timings - * are predicted using traffic-based travel duration estimates. There may be - * insufficient time to complete traffic-adjusted travel, delays, and breaks - * between visits, before the first visit, or after the last visit, while - * still satisfying the visit and vehicle time windows. For example, - * ``` - * start_time(previous_visit) + duration(previous_visit) + - * travel_duration(previous_visit, next_visit) > start_time(next_visit) - * ``` - * Arrival at next_visit will likely happen later than its current - * time window due the increased estimate of travel time - * `travel_duration(previous_visit, next_visit)` due to traffic. Also, a break - * may be forced to overlap with a visit due to an increase in travel time - * estimates and visit or break time window restrictions. - * - * Generated from protobuf field bool has_traffic_infeasibilities = 9; - */ - protected $has_traffic_infeasibilities = false; - /** - * The encoded polyline representation of the route. - * This field is only populated if - * [OptimizeToursRequest.populate_polylines][google.cloud.optimization.v1.OptimizeToursRequest.populate_polylines] - * is set to true. - * - * Generated from protobuf field .google.cloud.optimization.v1.ShipmentRoute.EncodedPolyline route_polyline = 10; - */ - protected $route_polyline = null; - /** - * Breaks scheduled for the vehicle performing this route. - * The `breaks` sequence represents time intervals, each starting at the - * corresponding `start_time` and lasting `duration` seconds. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.ShipmentRoute.Break breaks = 11; - */ - private $breaks; - /** - * Duration, distance and load metrics for this route. The fields of - * [AggregatedMetrics][google.cloud.optimization.v1.AggregatedMetrics] are - * summed over all - * [ShipmentRoute.transitions][google.cloud.optimization.v1.ShipmentRoute.transitions] - * or - * [ShipmentRoute.visits][google.cloud.optimization.v1.ShipmentRoute.visits], - * depending on the context. - * - * Generated from protobuf field .google.cloud.optimization.v1.AggregatedMetrics metrics = 12; - */ - protected $metrics = null; - /** - * Cost of the route, broken down by cost-related request fields. - * The keys are proto paths, relative to the input OptimizeToursRequest, e.g. - * "model.shipments.pickups.cost", and the values are the total cost - * generated by the corresponding cost field, aggregated over the whole route. - * In other words, costs["model.shipments.pickups.cost"] is the sum of all - * pickup costs over the route. All costs defined in the model are reported in - * detail here with the exception of costs related to TransitionAttributes - * that are only reported in an aggregated way as of 2022/01. - * - * Generated from protobuf field map route_costs = 17; - */ - private $route_costs; - /** - * Total cost of the route. The sum of all costs in the cost map. - * - * Generated from protobuf field double route_total_cost = 18; - */ - protected $route_total_cost = 0.0; - /** - * Deprecated: Use - * [Transition.vehicle_loads][google.cloud.optimization.v1.ShipmentRoute.Transition.vehicle_loads] - * instead. Vehicle loads upon arrival at its end location, for each type - * specified in - * [Vehicle.capacities][google.cloud.optimization.v1.Vehicle.capacities], - * `start_load_intervals`, `end_load_intervals` or demands. Exception: we omit - * loads for quantity types unconstrained by intervals and that don't have any - * non-zero demand on the route. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.CapacityQuantity end_loads = 13 [deprecated = true]; - * @deprecated - */ - private $end_loads; - /** - * Deprecated: Use - * [ShipmentRoute.transitions][google.cloud.optimization.v1.ShipmentRoute.transitions] - * instead. Ordered list of travel steps for the route. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.ShipmentRoute.TravelStep travel_steps = 14 [deprecated = true]; - * @deprecated - */ - private $travel_steps; - /** - * Deprecated: No longer used. - * This field will only be populated at the - * [ShipmentRoute.Visit][google.cloud.optimization.v1.ShipmentRoute.Visit] - * level. - * This field is the extra detour time due to the shipments visited on the - * route. - * It is equal to `vehicle_end_time` - `vehicle_start_time` - travel duration - * from the vehicle's start_location to its `end_location`. - * - * Generated from protobuf field .google.protobuf.Duration vehicle_detour = 15 [deprecated = true]; - * @deprecated - */ - protected $vehicle_detour = null; - /** - * Deprecated: Delay occurring before the vehicle end. See - * [TransitionAttributes.delay][google.cloud.optimization.v1.TransitionAttributes.delay]. - * - * Generated from protobuf field .google.cloud.optimization.v1.ShipmentRoute.Delay delay_before_vehicle_end = 16 [deprecated = true]; - * @deprecated - */ - protected $delay_before_vehicle_end = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $vehicle_index - * Vehicle performing the route, identified by its index in the source - * `ShipmentModel`. - * @type string $vehicle_label - * Label of the vehicle performing this route, equal to - * `ShipmentModel.vehicles(vehicle_index).label`, if specified. - * @type \Google\Protobuf\Timestamp $vehicle_start_time - * Time at which the vehicle starts its route. - * @type \Google\Protobuf\Timestamp $vehicle_end_time - * Time at which the vehicle finishes its route. - * @type array<\Google\Cloud\Optimization\V1\ShipmentRoute\Visit>|\Google\Protobuf\Internal\RepeatedField $visits - * Ordered sequence of visits representing a route. - * visits[i] is the i-th visit in the route. - * If this field is empty, the vehicle is considered as unused. - * @type array<\Google\Cloud\Optimization\V1\ShipmentRoute\Transition>|\Google\Protobuf\Internal\RepeatedField $transitions - * Ordered list of transitions for the route. - * @type bool $has_traffic_infeasibilities - * When - * [OptimizeToursRequest.consider_road_traffic][google.cloud.optimization.v1.OptimizeToursRequest.consider_road_traffic], - * is set to true, this field indicates that inconsistencies in route timings - * are predicted using traffic-based travel duration estimates. There may be - * insufficient time to complete traffic-adjusted travel, delays, and breaks - * between visits, before the first visit, or after the last visit, while - * still satisfying the visit and vehicle time windows. For example, - * ``` - * start_time(previous_visit) + duration(previous_visit) + - * travel_duration(previous_visit, next_visit) > start_time(next_visit) - * ``` - * Arrival at next_visit will likely happen later than its current - * time window due the increased estimate of travel time - * `travel_duration(previous_visit, next_visit)` due to traffic. Also, a break - * may be forced to overlap with a visit due to an increase in travel time - * estimates and visit or break time window restrictions. - * @type \Google\Cloud\Optimization\V1\ShipmentRoute\EncodedPolyline $route_polyline - * The encoded polyline representation of the route. - * This field is only populated if - * [OptimizeToursRequest.populate_polylines][google.cloud.optimization.v1.OptimizeToursRequest.populate_polylines] - * is set to true. - * @type array<\Google\Cloud\Optimization\V1\ShipmentRoute\PBBreak>|\Google\Protobuf\Internal\RepeatedField $breaks - * Breaks scheduled for the vehicle performing this route. - * The `breaks` sequence represents time intervals, each starting at the - * corresponding `start_time` and lasting `duration` seconds. - * @type \Google\Cloud\Optimization\V1\AggregatedMetrics $metrics - * Duration, distance and load metrics for this route. The fields of - * [AggregatedMetrics][google.cloud.optimization.v1.AggregatedMetrics] are - * summed over all - * [ShipmentRoute.transitions][google.cloud.optimization.v1.ShipmentRoute.transitions] - * or - * [ShipmentRoute.visits][google.cloud.optimization.v1.ShipmentRoute.visits], - * depending on the context. - * @type array|\Google\Protobuf\Internal\MapField $route_costs - * Cost of the route, broken down by cost-related request fields. - * The keys are proto paths, relative to the input OptimizeToursRequest, e.g. - * "model.shipments.pickups.cost", and the values are the total cost - * generated by the corresponding cost field, aggregated over the whole route. - * In other words, costs["model.shipments.pickups.cost"] is the sum of all - * pickup costs over the route. All costs defined in the model are reported in - * detail here with the exception of costs related to TransitionAttributes - * that are only reported in an aggregated way as of 2022/01. - * @type float $route_total_cost - * Total cost of the route. The sum of all costs in the cost map. - * @type array<\Google\Cloud\Optimization\V1\CapacityQuantity>|\Google\Protobuf\Internal\RepeatedField $end_loads - * Deprecated: Use - * [Transition.vehicle_loads][google.cloud.optimization.v1.ShipmentRoute.Transition.vehicle_loads] - * instead. Vehicle loads upon arrival at its end location, for each type - * specified in - * [Vehicle.capacities][google.cloud.optimization.v1.Vehicle.capacities], - * `start_load_intervals`, `end_load_intervals` or demands. Exception: we omit - * loads for quantity types unconstrained by intervals and that don't have any - * non-zero demand on the route. - * @type array<\Google\Cloud\Optimization\V1\ShipmentRoute\TravelStep>|\Google\Protobuf\Internal\RepeatedField $travel_steps - * Deprecated: Use - * [ShipmentRoute.transitions][google.cloud.optimization.v1.ShipmentRoute.transitions] - * instead. Ordered list of travel steps for the route. - * @type \Google\Protobuf\Duration $vehicle_detour - * Deprecated: No longer used. - * This field will only be populated at the - * [ShipmentRoute.Visit][google.cloud.optimization.v1.ShipmentRoute.Visit] - * level. - * This field is the extra detour time due to the shipments visited on the - * route. - * It is equal to `vehicle_end_time` - `vehicle_start_time` - travel duration - * from the vehicle's start_location to its `end_location`. - * @type \Google\Cloud\Optimization\V1\ShipmentRoute\Delay $delay_before_vehicle_end - * Deprecated: Delay occurring before the vehicle end. See - * [TransitionAttributes.delay][google.cloud.optimization.v1.TransitionAttributes.delay]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); - parent::__construct($data); - } - - /** - * Vehicle performing the route, identified by its index in the source - * `ShipmentModel`. - * - * Generated from protobuf field int32 vehicle_index = 1; - * @return int - */ - public function getVehicleIndex() - { - return $this->vehicle_index; - } - - /** - * Vehicle performing the route, identified by its index in the source - * `ShipmentModel`. - * - * Generated from protobuf field int32 vehicle_index = 1; - * @param int $var - * @return $this - */ - public function setVehicleIndex($var) - { - GPBUtil::checkInt32($var); - $this->vehicle_index = $var; - - return $this; - } - - /** - * Label of the vehicle performing this route, equal to - * `ShipmentModel.vehicles(vehicle_index).label`, if specified. - * - * Generated from protobuf field string vehicle_label = 2; - * @return string - */ - public function getVehicleLabel() - { - return $this->vehicle_label; - } - - /** - * Label of the vehicle performing this route, equal to - * `ShipmentModel.vehicles(vehicle_index).label`, if specified. - * - * Generated from protobuf field string vehicle_label = 2; - * @param string $var - * @return $this - */ - public function setVehicleLabel($var) - { - GPBUtil::checkString($var, True); - $this->vehicle_label = $var; - - return $this; - } - - /** - * Time at which the vehicle starts its route. - * - * Generated from protobuf field .google.protobuf.Timestamp vehicle_start_time = 5; - * @return \Google\Protobuf\Timestamp|null - */ - public function getVehicleStartTime() - { - return $this->vehicle_start_time; - } - - public function hasVehicleStartTime() - { - return isset($this->vehicle_start_time); - } - - public function clearVehicleStartTime() - { - unset($this->vehicle_start_time); - } - - /** - * Time at which the vehicle starts its route. - * - * Generated from protobuf field .google.protobuf.Timestamp vehicle_start_time = 5; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setVehicleStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->vehicle_start_time = $var; - - return $this; - } - - /** - * Time at which the vehicle finishes its route. - * - * Generated from protobuf field .google.protobuf.Timestamp vehicle_end_time = 6; - * @return \Google\Protobuf\Timestamp|null - */ - public function getVehicleEndTime() - { - return $this->vehicle_end_time; - } - - public function hasVehicleEndTime() - { - return isset($this->vehicle_end_time); - } - - public function clearVehicleEndTime() - { - unset($this->vehicle_end_time); - } - - /** - * Time at which the vehicle finishes its route. - * - * Generated from protobuf field .google.protobuf.Timestamp vehicle_end_time = 6; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setVehicleEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->vehicle_end_time = $var; - - return $this; - } - - /** - * Ordered sequence of visits representing a route. - * visits[i] is the i-th visit in the route. - * If this field is empty, the vehicle is considered as unused. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.ShipmentRoute.Visit visits = 7; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getVisits() - { - return $this->visits; - } - - /** - * Ordered sequence of visits representing a route. - * visits[i] is the i-th visit in the route. - * If this field is empty, the vehicle is considered as unused. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.ShipmentRoute.Visit visits = 7; - * @param array<\Google\Cloud\Optimization\V1\ShipmentRoute\Visit>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setVisits($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\ShipmentRoute\Visit::class); - $this->visits = $arr; - - return $this; - } - - /** - * Ordered list of transitions for the route. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.ShipmentRoute.Transition transitions = 8; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTransitions() - { - return $this->transitions; - } - - /** - * Ordered list of transitions for the route. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.ShipmentRoute.Transition transitions = 8; - * @param array<\Google\Cloud\Optimization\V1\ShipmentRoute\Transition>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTransitions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\ShipmentRoute\Transition::class); - $this->transitions = $arr; - - return $this; - } - - /** - * When - * [OptimizeToursRequest.consider_road_traffic][google.cloud.optimization.v1.OptimizeToursRequest.consider_road_traffic], - * is set to true, this field indicates that inconsistencies in route timings - * are predicted using traffic-based travel duration estimates. There may be - * insufficient time to complete traffic-adjusted travel, delays, and breaks - * between visits, before the first visit, or after the last visit, while - * still satisfying the visit and vehicle time windows. For example, - * ``` - * start_time(previous_visit) + duration(previous_visit) + - * travel_duration(previous_visit, next_visit) > start_time(next_visit) - * ``` - * Arrival at next_visit will likely happen later than its current - * time window due the increased estimate of travel time - * `travel_duration(previous_visit, next_visit)` due to traffic. Also, a break - * may be forced to overlap with a visit due to an increase in travel time - * estimates and visit or break time window restrictions. - * - * Generated from protobuf field bool has_traffic_infeasibilities = 9; - * @return bool - */ - public function getHasTrafficInfeasibilities() - { - return $this->has_traffic_infeasibilities; - } - - /** - * When - * [OptimizeToursRequest.consider_road_traffic][google.cloud.optimization.v1.OptimizeToursRequest.consider_road_traffic], - * is set to true, this field indicates that inconsistencies in route timings - * are predicted using traffic-based travel duration estimates. There may be - * insufficient time to complete traffic-adjusted travel, delays, and breaks - * between visits, before the first visit, or after the last visit, while - * still satisfying the visit and vehicle time windows. For example, - * ``` - * start_time(previous_visit) + duration(previous_visit) + - * travel_duration(previous_visit, next_visit) > start_time(next_visit) - * ``` - * Arrival at next_visit will likely happen later than its current - * time window due the increased estimate of travel time - * `travel_duration(previous_visit, next_visit)` due to traffic. Also, a break - * may be forced to overlap with a visit due to an increase in travel time - * estimates and visit or break time window restrictions. - * - * Generated from protobuf field bool has_traffic_infeasibilities = 9; - * @param bool $var - * @return $this - */ - public function setHasTrafficInfeasibilities($var) - { - GPBUtil::checkBool($var); - $this->has_traffic_infeasibilities = $var; - - return $this; - } - - /** - * The encoded polyline representation of the route. - * This field is only populated if - * [OptimizeToursRequest.populate_polylines][google.cloud.optimization.v1.OptimizeToursRequest.populate_polylines] - * is set to true. - * - * Generated from protobuf field .google.cloud.optimization.v1.ShipmentRoute.EncodedPolyline route_polyline = 10; - * @return \Google\Cloud\Optimization\V1\ShipmentRoute\EncodedPolyline|null - */ - public function getRoutePolyline() - { - return $this->route_polyline; - } - - public function hasRoutePolyline() - { - return isset($this->route_polyline); - } - - public function clearRoutePolyline() - { - unset($this->route_polyline); - } - - /** - * The encoded polyline representation of the route. - * This field is only populated if - * [OptimizeToursRequest.populate_polylines][google.cloud.optimization.v1.OptimizeToursRequest.populate_polylines] - * is set to true. - * - * Generated from protobuf field .google.cloud.optimization.v1.ShipmentRoute.EncodedPolyline route_polyline = 10; - * @param \Google\Cloud\Optimization\V1\ShipmentRoute\EncodedPolyline $var - * @return $this - */ - public function setRoutePolyline($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Optimization\V1\ShipmentRoute\EncodedPolyline::class); - $this->route_polyline = $var; - - return $this; - } - - /** - * Breaks scheduled for the vehicle performing this route. - * The `breaks` sequence represents time intervals, each starting at the - * corresponding `start_time` and lasting `duration` seconds. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.ShipmentRoute.Break breaks = 11; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getBreaks() - { - return $this->breaks; - } - - /** - * Breaks scheduled for the vehicle performing this route. - * The `breaks` sequence represents time intervals, each starting at the - * corresponding `start_time` and lasting `duration` seconds. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.ShipmentRoute.Break breaks = 11; - * @param array<\Google\Cloud\Optimization\V1\ShipmentRoute\PBBreak>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setBreaks($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\ShipmentRoute\PBBreak::class); - $this->breaks = $arr; - - return $this; - } - - /** - * Duration, distance and load metrics for this route. The fields of - * [AggregatedMetrics][google.cloud.optimization.v1.AggregatedMetrics] are - * summed over all - * [ShipmentRoute.transitions][google.cloud.optimization.v1.ShipmentRoute.transitions] - * or - * [ShipmentRoute.visits][google.cloud.optimization.v1.ShipmentRoute.visits], - * depending on the context. - * - * Generated from protobuf field .google.cloud.optimization.v1.AggregatedMetrics metrics = 12; - * @return \Google\Cloud\Optimization\V1\AggregatedMetrics|null - */ - public function getMetrics() - { - return $this->metrics; - } - - public function hasMetrics() - { - return isset($this->metrics); - } - - public function clearMetrics() - { - unset($this->metrics); - } - - /** - * Duration, distance and load metrics for this route. The fields of - * [AggregatedMetrics][google.cloud.optimization.v1.AggregatedMetrics] are - * summed over all - * [ShipmentRoute.transitions][google.cloud.optimization.v1.ShipmentRoute.transitions] - * or - * [ShipmentRoute.visits][google.cloud.optimization.v1.ShipmentRoute.visits], - * depending on the context. - * - * Generated from protobuf field .google.cloud.optimization.v1.AggregatedMetrics metrics = 12; - * @param \Google\Cloud\Optimization\V1\AggregatedMetrics $var - * @return $this - */ - public function setMetrics($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Optimization\V1\AggregatedMetrics::class); - $this->metrics = $var; - - return $this; - } - - /** - * Cost of the route, broken down by cost-related request fields. - * The keys are proto paths, relative to the input OptimizeToursRequest, e.g. - * "model.shipments.pickups.cost", and the values are the total cost - * generated by the corresponding cost field, aggregated over the whole route. - * In other words, costs["model.shipments.pickups.cost"] is the sum of all - * pickup costs over the route. All costs defined in the model are reported in - * detail here with the exception of costs related to TransitionAttributes - * that are only reported in an aggregated way as of 2022/01. - * - * Generated from protobuf field map route_costs = 17; - * @return \Google\Protobuf\Internal\MapField - */ - public function getRouteCosts() - { - return $this->route_costs; - } - - /** - * Cost of the route, broken down by cost-related request fields. - * The keys are proto paths, relative to the input OptimizeToursRequest, e.g. - * "model.shipments.pickups.cost", and the values are the total cost - * generated by the corresponding cost field, aggregated over the whole route. - * In other words, costs["model.shipments.pickups.cost"] is the sum of all - * pickup costs over the route. All costs defined in the model are reported in - * detail here with the exception of costs related to TransitionAttributes - * that are only reported in an aggregated way as of 2022/01. - * - * Generated from protobuf field map route_costs = 17; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setRouteCosts($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::DOUBLE); - $this->route_costs = $arr; - - return $this; - } - - /** - * Total cost of the route. The sum of all costs in the cost map. - * - * Generated from protobuf field double route_total_cost = 18; - * @return float - */ - public function getRouteTotalCost() - { - return $this->route_total_cost; - } - - /** - * Total cost of the route. The sum of all costs in the cost map. - * - * Generated from protobuf field double route_total_cost = 18; - * @param float $var - * @return $this - */ - public function setRouteTotalCost($var) - { - GPBUtil::checkDouble($var); - $this->route_total_cost = $var; - - return $this; - } - - /** - * Deprecated: Use - * [Transition.vehicle_loads][google.cloud.optimization.v1.ShipmentRoute.Transition.vehicle_loads] - * instead. Vehicle loads upon arrival at its end location, for each type - * specified in - * [Vehicle.capacities][google.cloud.optimization.v1.Vehicle.capacities], - * `start_load_intervals`, `end_load_intervals` or demands. Exception: we omit - * loads for quantity types unconstrained by intervals and that don't have any - * non-zero demand on the route. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.CapacityQuantity end_loads = 13 [deprecated = true]; - * @return \Google\Protobuf\Internal\RepeatedField - * @deprecated - */ - public function getEndLoads() - { - @trigger_error('end_loads is deprecated.', E_USER_DEPRECATED); - return $this->end_loads; - } - - /** - * Deprecated: Use - * [Transition.vehicle_loads][google.cloud.optimization.v1.ShipmentRoute.Transition.vehicle_loads] - * instead. Vehicle loads upon arrival at its end location, for each type - * specified in - * [Vehicle.capacities][google.cloud.optimization.v1.Vehicle.capacities], - * `start_load_intervals`, `end_load_intervals` or demands. Exception: we omit - * loads for quantity types unconstrained by intervals and that don't have any - * non-zero demand on the route. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.CapacityQuantity end_loads = 13 [deprecated = true]; - * @param array<\Google\Cloud\Optimization\V1\CapacityQuantity>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - * @deprecated - */ - public function setEndLoads($var) - { - @trigger_error('end_loads is deprecated.', E_USER_DEPRECATED); - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\CapacityQuantity::class); - $this->end_loads = $arr; - - return $this; - } - - /** - * Deprecated: Use - * [ShipmentRoute.transitions][google.cloud.optimization.v1.ShipmentRoute.transitions] - * instead. Ordered list of travel steps for the route. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.ShipmentRoute.TravelStep travel_steps = 14 [deprecated = true]; - * @return \Google\Protobuf\Internal\RepeatedField - * @deprecated - */ - public function getTravelSteps() - { - @trigger_error('travel_steps is deprecated.', E_USER_DEPRECATED); - return $this->travel_steps; - } - - /** - * Deprecated: Use - * [ShipmentRoute.transitions][google.cloud.optimization.v1.ShipmentRoute.transitions] - * instead. Ordered list of travel steps for the route. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.ShipmentRoute.TravelStep travel_steps = 14 [deprecated = true]; - * @param array<\Google\Cloud\Optimization\V1\ShipmentRoute\TravelStep>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - * @deprecated - */ - public function setTravelSteps($var) - { - @trigger_error('travel_steps is deprecated.', E_USER_DEPRECATED); - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\ShipmentRoute\TravelStep::class); - $this->travel_steps = $arr; - - return $this; - } - - /** - * Deprecated: No longer used. - * This field will only be populated at the - * [ShipmentRoute.Visit][google.cloud.optimization.v1.ShipmentRoute.Visit] - * level. - * This field is the extra detour time due to the shipments visited on the - * route. - * It is equal to `vehicle_end_time` - `vehicle_start_time` - travel duration - * from the vehicle's start_location to its `end_location`. - * - * Generated from protobuf field .google.protobuf.Duration vehicle_detour = 15 [deprecated = true]; - * @return \Google\Protobuf\Duration|null - * @deprecated - */ - public function getVehicleDetour() - { - @trigger_error('vehicle_detour is deprecated.', E_USER_DEPRECATED); - return $this->vehicle_detour; - } - - public function hasVehicleDetour() - { - @trigger_error('vehicle_detour is deprecated.', E_USER_DEPRECATED); - return isset($this->vehicle_detour); - } - - public function clearVehicleDetour() - { - @trigger_error('vehicle_detour is deprecated.', E_USER_DEPRECATED); - unset($this->vehicle_detour); - } - - /** - * Deprecated: No longer used. - * This field will only be populated at the - * [ShipmentRoute.Visit][google.cloud.optimization.v1.ShipmentRoute.Visit] - * level. - * This field is the extra detour time due to the shipments visited on the - * route. - * It is equal to `vehicle_end_time` - `vehicle_start_time` - travel duration - * from the vehicle's start_location to its `end_location`. - * - * Generated from protobuf field .google.protobuf.Duration vehicle_detour = 15 [deprecated = true]; - * @param \Google\Protobuf\Duration $var - * @return $this - * @deprecated - */ - public function setVehicleDetour($var) - { - @trigger_error('vehicle_detour is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->vehicle_detour = $var; - - return $this; - } - - /** - * Deprecated: Delay occurring before the vehicle end. See - * [TransitionAttributes.delay][google.cloud.optimization.v1.TransitionAttributes.delay]. - * - * Generated from protobuf field .google.cloud.optimization.v1.ShipmentRoute.Delay delay_before_vehicle_end = 16 [deprecated = true]; - * @return \Google\Cloud\Optimization\V1\ShipmentRoute\Delay|null - * @deprecated - */ - public function getDelayBeforeVehicleEnd() - { - @trigger_error('delay_before_vehicle_end is deprecated.', E_USER_DEPRECATED); - return $this->delay_before_vehicle_end; - } - - public function hasDelayBeforeVehicleEnd() - { - @trigger_error('delay_before_vehicle_end is deprecated.', E_USER_DEPRECATED); - return isset($this->delay_before_vehicle_end); - } - - public function clearDelayBeforeVehicleEnd() - { - @trigger_error('delay_before_vehicle_end is deprecated.', E_USER_DEPRECATED); - unset($this->delay_before_vehicle_end); - } - - /** - * Deprecated: Delay occurring before the vehicle end. See - * [TransitionAttributes.delay][google.cloud.optimization.v1.TransitionAttributes.delay]. - * - * Generated from protobuf field .google.cloud.optimization.v1.ShipmentRoute.Delay delay_before_vehicle_end = 16 [deprecated = true]; - * @param \Google\Cloud\Optimization\V1\ShipmentRoute\Delay $var - * @return $this - * @deprecated - */ - public function setDelayBeforeVehicleEnd($var) - { - @trigger_error('delay_before_vehicle_end is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkMessage($var, \Google\Cloud\Optimization\V1\ShipmentRoute\Delay::class); - $this->delay_before_vehicle_end = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentRoute/Delay.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentRoute/Delay.php deleted file mode 100644 index 02ed72580a45..000000000000 --- a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentRoute/Delay.php +++ /dev/null @@ -1,128 +0,0 @@ -google.cloud.optimization.v1.ShipmentRoute.Delay - */ -class Delay extends \Google\Protobuf\Internal\Message -{ - /** - * Start of the delay. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - */ - protected $start_time = null; - /** - * Duration of the delay. - * - * Generated from protobuf field .google.protobuf.Duration duration = 2; - */ - protected $duration = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $start_time - * Start of the delay. - * @type \Google\Protobuf\Duration $duration - * Duration of the delay. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); - parent::__construct($data); - } - - /** - * Start of the delay. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStartTime() - { - return $this->start_time; - } - - public function hasStartTime() - { - return isset($this->start_time); - } - - public function clearStartTime() - { - unset($this->start_time); - } - - /** - * Start of the delay. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * Duration of the delay. - * - * Generated from protobuf field .google.protobuf.Duration duration = 2; - * @return \Google\Protobuf\Duration|null - */ - public function getDuration() - { - return $this->duration; - } - - public function hasDuration() - { - return isset($this->duration); - } - - public function clearDuration() - { - unset($this->duration); - } - - /** - * Duration of the delay. - * - * Generated from protobuf field .google.protobuf.Duration duration = 2; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->duration = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Delay::class, \Google\Cloud\Optimization\V1\ShipmentRoute_Delay::class); - diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentRoute/EncodedPolyline.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentRoute/EncodedPolyline.php deleted file mode 100644 index 4de0fee0843c..000000000000 --- a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentRoute/EncodedPolyline.php +++ /dev/null @@ -1,73 +0,0 @@ -google.cloud.optimization.v1.ShipmentRoute.EncodedPolyline - */ -class EncodedPolyline extends \Google\Protobuf\Internal\Message -{ - /** - * String representing encoded points of the polyline. - * - * Generated from protobuf field string points = 1; - */ - protected $points = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $points - * String representing encoded points of the polyline. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); - parent::__construct($data); - } - - /** - * String representing encoded points of the polyline. - * - * Generated from protobuf field string points = 1; - * @return string - */ - public function getPoints() - { - return $this->points; - } - - /** - * String representing encoded points of the polyline. - * - * Generated from protobuf field string points = 1; - * @param string $var - * @return $this - */ - public function setPoints($var) - { - GPBUtil::checkString($var, True); - $this->points = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(EncodedPolyline::class, \Google\Cloud\Optimization\V1\ShipmentRoute_EncodedPolyline::class); - diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentRoute/PBBreak.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentRoute/PBBreak.php deleted file mode 100644 index 1a108699e4c5..000000000000 --- a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentRoute/PBBreak.php +++ /dev/null @@ -1,124 +0,0 @@ -google.cloud.optimization.v1.ShipmentRoute.Break - */ -class PBBreak extends \Google\Protobuf\Internal\Message -{ - /** - * Start time of a break. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - */ - protected $start_time = null; - /** - * Duration of a break. - * - * Generated from protobuf field .google.protobuf.Duration duration = 2; - */ - protected $duration = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $start_time - * Start time of a break. - * @type \Google\Protobuf\Duration $duration - * Duration of a break. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); - parent::__construct($data); - } - - /** - * Start time of a break. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStartTime() - { - return $this->start_time; - } - - public function hasStartTime() - { - return isset($this->start_time); - } - - public function clearStartTime() - { - unset($this->start_time); - } - - /** - * Start time of a break. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * Duration of a break. - * - * Generated from protobuf field .google.protobuf.Duration duration = 2; - * @return \Google\Protobuf\Duration|null - */ - public function getDuration() - { - return $this->duration; - } - - public function hasDuration() - { - return isset($this->duration); - } - - public function clearDuration() - { - unset($this->duration); - } - - /** - * Duration of a break. - * - * Generated from protobuf field .google.protobuf.Duration duration = 2; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->duration = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(PBBreak::class, \Google\Cloud\Optimization\V1\ShipmentRoute_Break::class); - diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentRoute/Transition.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentRoute/Transition.php deleted file mode 100644 index 1fa03752d95d..000000000000 --- a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentRoute/Transition.php +++ /dev/null @@ -1,620 +0,0 @@ -google.cloud.optimization.v1.ShipmentRoute.Transition - */ -class Transition extends \Google\Protobuf\Internal\Message -{ - /** - * Travel duration during this transition. - * - * Generated from protobuf field .google.protobuf.Duration travel_duration = 1; - */ - protected $travel_duration = null; - /** - * Distance traveled during the transition. - * - * Generated from protobuf field double travel_distance_meters = 2; - */ - protected $travel_distance_meters = 0.0; - /** - * When traffic is requested via - * [OptimizeToursRequest.consider_road_traffic] - * [google.cloud.optimization.v1.OptimizeToursRequest.consider_road_traffic], - * and the traffic info couldn't be retrieved for a `Transition`, this - * boolean is set to true. This may be temporary (rare hiccup in the - * realtime traffic servers) or permanent (no data for this location). - * - * Generated from protobuf field bool traffic_info_unavailable = 3; - */ - protected $traffic_info_unavailable = false; - /** - * Sum of the delay durations applied to this transition. If any, the delay - * starts exactly `delay_duration` seconds before the next event (visit or - * vehicle end). See - * [TransitionAttributes.delay][google.cloud.optimization.v1.TransitionAttributes.delay]. - * - * Generated from protobuf field .google.protobuf.Duration delay_duration = 4; - */ - protected $delay_duration = null; - /** - * Sum of the duration of the breaks occurring during this transition, if - * any. Details about each break's start time and duration are stored in - * [ShipmentRoute.breaks][google.cloud.optimization.v1.ShipmentRoute.breaks]. - * - * Generated from protobuf field .google.protobuf.Duration break_duration = 5; - */ - protected $break_duration = null; - /** - * Time spent waiting during this transition. Wait duration corresponds to - * idle time and does not include break time. Also note that this wait time - * may be split into several non-contiguous intervals. - * - * Generated from protobuf field .google.protobuf.Duration wait_duration = 6; - */ - protected $wait_duration = null; - /** - * Total duration of the transition, provided for convenience. It is equal - * to: - * * next visit `start_time` (or `vehicle_end_time` if this is the last - * transition) - this transition's `start_time`; - * * if `ShipmentRoute.has_traffic_infeasibilities` is false, the following - * additionally holds: `total_duration = travel_duration + delay_duration - * + break_duration + wait_duration`. - * - * Generated from protobuf field .google.protobuf.Duration total_duration = 7; - */ - protected $total_duration = null; - /** - * Start time of this transition. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 8; - */ - protected $start_time = null; - /** - * The encoded polyline representation of the route followed during the - * transition. - * This field is only populated if [populate_transition_polylines] - * [google.cloud.optimization.v1.OptimizeToursRequest.populate_transition_polylines] - * is set to true. - * - * Generated from protobuf field .google.cloud.optimization.v1.ShipmentRoute.EncodedPolyline route_polyline = 9; - */ - protected $route_polyline = null; - /** - * Vehicle loads during this transition, for each type that either appears - * in this vehicle's - * [Vehicle.load_limits][google.cloud.optimization.v1.Vehicle.load_limits], - * or that have non-zero - * [Shipment.load_demands][google.cloud.optimization.v1.Shipment.load_demands] - * on some shipment performed on this route. - * The loads during the first transition are the starting loads of the - * vehicle route. Then, after each visit, the visit's `load_demands` are - * either added or subtracted to get the next transition's loads, depending - * on whether the visit was a pickup or a delivery. - * - * Generated from protobuf field map vehicle_loads = 11; - */ - private $vehicle_loads; - /** - * Deprecated: Use - * [Transition.vehicle_loads][google.cloud.optimization.v1.ShipmentRoute.Transition.vehicle_loads] - * instead. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.CapacityQuantity loads = 10 [deprecated = true]; - * @deprecated - */ - private $loads; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Duration $travel_duration - * Travel duration during this transition. - * @type float $travel_distance_meters - * Distance traveled during the transition. - * @type bool $traffic_info_unavailable - * When traffic is requested via - * [OptimizeToursRequest.consider_road_traffic] - * [google.cloud.optimization.v1.OptimizeToursRequest.consider_road_traffic], - * and the traffic info couldn't be retrieved for a `Transition`, this - * boolean is set to true. This may be temporary (rare hiccup in the - * realtime traffic servers) or permanent (no data for this location). - * @type \Google\Protobuf\Duration $delay_duration - * Sum of the delay durations applied to this transition. If any, the delay - * starts exactly `delay_duration` seconds before the next event (visit or - * vehicle end). See - * [TransitionAttributes.delay][google.cloud.optimization.v1.TransitionAttributes.delay]. - * @type \Google\Protobuf\Duration $break_duration - * Sum of the duration of the breaks occurring during this transition, if - * any. Details about each break's start time and duration are stored in - * [ShipmentRoute.breaks][google.cloud.optimization.v1.ShipmentRoute.breaks]. - * @type \Google\Protobuf\Duration $wait_duration - * Time spent waiting during this transition. Wait duration corresponds to - * idle time and does not include break time. Also note that this wait time - * may be split into several non-contiguous intervals. - * @type \Google\Protobuf\Duration $total_duration - * Total duration of the transition, provided for convenience. It is equal - * to: - * * next visit `start_time` (or `vehicle_end_time` if this is the last - * transition) - this transition's `start_time`; - * * if `ShipmentRoute.has_traffic_infeasibilities` is false, the following - * additionally holds: `total_duration = travel_duration + delay_duration - * + break_duration + wait_duration`. - * @type \Google\Protobuf\Timestamp $start_time - * Start time of this transition. - * @type \Google\Cloud\Optimization\V1\ShipmentRoute\EncodedPolyline $route_polyline - * The encoded polyline representation of the route followed during the - * transition. - * This field is only populated if [populate_transition_polylines] - * [google.cloud.optimization.v1.OptimizeToursRequest.populate_transition_polylines] - * is set to true. - * @type array|\Google\Protobuf\Internal\MapField $vehicle_loads - * Vehicle loads during this transition, for each type that either appears - * in this vehicle's - * [Vehicle.load_limits][google.cloud.optimization.v1.Vehicle.load_limits], - * or that have non-zero - * [Shipment.load_demands][google.cloud.optimization.v1.Shipment.load_demands] - * on some shipment performed on this route. - * The loads during the first transition are the starting loads of the - * vehicle route. Then, after each visit, the visit's `load_demands` are - * either added or subtracted to get the next transition's loads, depending - * on whether the visit was a pickup or a delivery. - * @type array<\Google\Cloud\Optimization\V1\CapacityQuantity>|\Google\Protobuf\Internal\RepeatedField $loads - * Deprecated: Use - * [Transition.vehicle_loads][google.cloud.optimization.v1.ShipmentRoute.Transition.vehicle_loads] - * instead. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); - parent::__construct($data); - } - - /** - * Travel duration during this transition. - * - * Generated from protobuf field .google.protobuf.Duration travel_duration = 1; - * @return \Google\Protobuf\Duration|null - */ - public function getTravelDuration() - { - return $this->travel_duration; - } - - public function hasTravelDuration() - { - return isset($this->travel_duration); - } - - public function clearTravelDuration() - { - unset($this->travel_duration); - } - - /** - * Travel duration during this transition. - * - * Generated from protobuf field .google.protobuf.Duration travel_duration = 1; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setTravelDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->travel_duration = $var; - - return $this; - } - - /** - * Distance traveled during the transition. - * - * Generated from protobuf field double travel_distance_meters = 2; - * @return float - */ - public function getTravelDistanceMeters() - { - return $this->travel_distance_meters; - } - - /** - * Distance traveled during the transition. - * - * Generated from protobuf field double travel_distance_meters = 2; - * @param float $var - * @return $this - */ - public function setTravelDistanceMeters($var) - { - GPBUtil::checkDouble($var); - $this->travel_distance_meters = $var; - - return $this; - } - - /** - * When traffic is requested via - * [OptimizeToursRequest.consider_road_traffic] - * [google.cloud.optimization.v1.OptimizeToursRequest.consider_road_traffic], - * and the traffic info couldn't be retrieved for a `Transition`, this - * boolean is set to true. This may be temporary (rare hiccup in the - * realtime traffic servers) or permanent (no data for this location). - * - * Generated from protobuf field bool traffic_info_unavailable = 3; - * @return bool - */ - public function getTrafficInfoUnavailable() - { - return $this->traffic_info_unavailable; - } - - /** - * When traffic is requested via - * [OptimizeToursRequest.consider_road_traffic] - * [google.cloud.optimization.v1.OptimizeToursRequest.consider_road_traffic], - * and the traffic info couldn't be retrieved for a `Transition`, this - * boolean is set to true. This may be temporary (rare hiccup in the - * realtime traffic servers) or permanent (no data for this location). - * - * Generated from protobuf field bool traffic_info_unavailable = 3; - * @param bool $var - * @return $this - */ - public function setTrafficInfoUnavailable($var) - { - GPBUtil::checkBool($var); - $this->traffic_info_unavailable = $var; - - return $this; - } - - /** - * Sum of the delay durations applied to this transition. If any, the delay - * starts exactly `delay_duration` seconds before the next event (visit or - * vehicle end). See - * [TransitionAttributes.delay][google.cloud.optimization.v1.TransitionAttributes.delay]. - * - * Generated from protobuf field .google.protobuf.Duration delay_duration = 4; - * @return \Google\Protobuf\Duration|null - */ - public function getDelayDuration() - { - return $this->delay_duration; - } - - public function hasDelayDuration() - { - return isset($this->delay_duration); - } - - public function clearDelayDuration() - { - unset($this->delay_duration); - } - - /** - * Sum of the delay durations applied to this transition. If any, the delay - * starts exactly `delay_duration` seconds before the next event (visit or - * vehicle end). See - * [TransitionAttributes.delay][google.cloud.optimization.v1.TransitionAttributes.delay]. - * - * Generated from protobuf field .google.protobuf.Duration delay_duration = 4; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setDelayDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->delay_duration = $var; - - return $this; - } - - /** - * Sum of the duration of the breaks occurring during this transition, if - * any. Details about each break's start time and duration are stored in - * [ShipmentRoute.breaks][google.cloud.optimization.v1.ShipmentRoute.breaks]. - * - * Generated from protobuf field .google.protobuf.Duration break_duration = 5; - * @return \Google\Protobuf\Duration|null - */ - public function getBreakDuration() - { - return $this->break_duration; - } - - public function hasBreakDuration() - { - return isset($this->break_duration); - } - - public function clearBreakDuration() - { - unset($this->break_duration); - } - - /** - * Sum of the duration of the breaks occurring during this transition, if - * any. Details about each break's start time and duration are stored in - * [ShipmentRoute.breaks][google.cloud.optimization.v1.ShipmentRoute.breaks]. - * - * Generated from protobuf field .google.protobuf.Duration break_duration = 5; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setBreakDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->break_duration = $var; - - return $this; - } - - /** - * Time spent waiting during this transition. Wait duration corresponds to - * idle time and does not include break time. Also note that this wait time - * may be split into several non-contiguous intervals. - * - * Generated from protobuf field .google.protobuf.Duration wait_duration = 6; - * @return \Google\Protobuf\Duration|null - */ - public function getWaitDuration() - { - return $this->wait_duration; - } - - public function hasWaitDuration() - { - return isset($this->wait_duration); - } - - public function clearWaitDuration() - { - unset($this->wait_duration); - } - - /** - * Time spent waiting during this transition. Wait duration corresponds to - * idle time and does not include break time. Also note that this wait time - * may be split into several non-contiguous intervals. - * - * Generated from protobuf field .google.protobuf.Duration wait_duration = 6; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setWaitDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->wait_duration = $var; - - return $this; - } - - /** - * Total duration of the transition, provided for convenience. It is equal - * to: - * * next visit `start_time` (or `vehicle_end_time` if this is the last - * transition) - this transition's `start_time`; - * * if `ShipmentRoute.has_traffic_infeasibilities` is false, the following - * additionally holds: `total_duration = travel_duration + delay_duration - * + break_duration + wait_duration`. - * - * Generated from protobuf field .google.protobuf.Duration total_duration = 7; - * @return \Google\Protobuf\Duration|null - */ - public function getTotalDuration() - { - return $this->total_duration; - } - - public function hasTotalDuration() - { - return isset($this->total_duration); - } - - public function clearTotalDuration() - { - unset($this->total_duration); - } - - /** - * Total duration of the transition, provided for convenience. It is equal - * to: - * * next visit `start_time` (or `vehicle_end_time` if this is the last - * transition) - this transition's `start_time`; - * * if `ShipmentRoute.has_traffic_infeasibilities` is false, the following - * additionally holds: `total_duration = travel_duration + delay_duration - * + break_duration + wait_duration`. - * - * Generated from protobuf field .google.protobuf.Duration total_duration = 7; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setTotalDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->total_duration = $var; - - return $this; - } - - /** - * Start time of this transition. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 8; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStartTime() - { - return $this->start_time; - } - - public function hasStartTime() - { - return isset($this->start_time); - } - - public function clearStartTime() - { - unset($this->start_time); - } - - /** - * Start time of this transition. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 8; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * The encoded polyline representation of the route followed during the - * transition. - * This field is only populated if [populate_transition_polylines] - * [google.cloud.optimization.v1.OptimizeToursRequest.populate_transition_polylines] - * is set to true. - * - * Generated from protobuf field .google.cloud.optimization.v1.ShipmentRoute.EncodedPolyline route_polyline = 9; - * @return \Google\Cloud\Optimization\V1\ShipmentRoute\EncodedPolyline|null - */ - public function getRoutePolyline() - { - return $this->route_polyline; - } - - public function hasRoutePolyline() - { - return isset($this->route_polyline); - } - - public function clearRoutePolyline() - { - unset($this->route_polyline); - } - - /** - * The encoded polyline representation of the route followed during the - * transition. - * This field is only populated if [populate_transition_polylines] - * [google.cloud.optimization.v1.OptimizeToursRequest.populate_transition_polylines] - * is set to true. - * - * Generated from protobuf field .google.cloud.optimization.v1.ShipmentRoute.EncodedPolyline route_polyline = 9; - * @param \Google\Cloud\Optimization\V1\ShipmentRoute\EncodedPolyline $var - * @return $this - */ - public function setRoutePolyline($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Optimization\V1\ShipmentRoute\EncodedPolyline::class); - $this->route_polyline = $var; - - return $this; - } - - /** - * Vehicle loads during this transition, for each type that either appears - * in this vehicle's - * [Vehicle.load_limits][google.cloud.optimization.v1.Vehicle.load_limits], - * or that have non-zero - * [Shipment.load_demands][google.cloud.optimization.v1.Shipment.load_demands] - * on some shipment performed on this route. - * The loads during the first transition are the starting loads of the - * vehicle route. Then, after each visit, the visit's `load_demands` are - * either added or subtracted to get the next transition's loads, depending - * on whether the visit was a pickup or a delivery. - * - * Generated from protobuf field map vehicle_loads = 11; - * @return \Google\Protobuf\Internal\MapField - */ - public function getVehicleLoads() - { - return $this->vehicle_loads; - } - - /** - * Vehicle loads during this transition, for each type that either appears - * in this vehicle's - * [Vehicle.load_limits][google.cloud.optimization.v1.Vehicle.load_limits], - * or that have non-zero - * [Shipment.load_demands][google.cloud.optimization.v1.Shipment.load_demands] - * on some shipment performed on this route. - * The loads during the first transition are the starting loads of the - * vehicle route. Then, after each visit, the visit's `load_demands` are - * either added or subtracted to get the next transition's loads, depending - * on whether the visit was a pickup or a delivery. - * - * Generated from protobuf field map vehicle_loads = 11; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setVehicleLoads($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\ShipmentRoute\VehicleLoad::class); - $this->vehicle_loads = $arr; - - return $this; - } - - /** - * Deprecated: Use - * [Transition.vehicle_loads][google.cloud.optimization.v1.ShipmentRoute.Transition.vehicle_loads] - * instead. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.CapacityQuantity loads = 10 [deprecated = true]; - * @return \Google\Protobuf\Internal\RepeatedField - * @deprecated - */ - public function getLoads() - { - @trigger_error('loads is deprecated.', E_USER_DEPRECATED); - return $this->loads; - } - - /** - * Deprecated: Use - * [Transition.vehicle_loads][google.cloud.optimization.v1.ShipmentRoute.Transition.vehicle_loads] - * instead. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.CapacityQuantity loads = 10 [deprecated = true]; - * @param array<\Google\Cloud\Optimization\V1\CapacityQuantity>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - * @deprecated - */ - public function setLoads($var) - { - @trigger_error('loads is deprecated.', E_USER_DEPRECATED); - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\CapacityQuantity::class); - $this->loads = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Transition::class, \Google\Cloud\Optimization\V1\ShipmentRoute_Transition::class); - diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentRoute/TravelStep.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentRoute/TravelStep.php deleted file mode 100644 index 88fab128ce88..000000000000 --- a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentRoute/TravelStep.php +++ /dev/null @@ -1,236 +0,0 @@ -google.cloud.optimization.v1.ShipmentRoute.TravelStep - */ -class TravelStep extends \Google\Protobuf\Internal\Message -{ - /** - * Duration of the travel step. - * - * Generated from protobuf field .google.protobuf.Duration duration = 1; - */ - protected $duration = null; - /** - * Distance traveled during the step. - * - * Generated from protobuf field double distance_meters = 2; - */ - protected $distance_meters = 0.0; - /** - * When traffic is requested via - * [OptimizeToursRequest.consider_road_traffic][google.cloud.optimization.v1.OptimizeToursRequest.consider_road_traffic], - * and the traffic info couldn't be retrieved for a TravelStep, this boolean - * is set to true. This may be temporary (rare hiccup in the realtime - * traffic servers) or permanent (no data for this location). - * - * Generated from protobuf field bool traffic_info_unavailable = 3; - */ - protected $traffic_info_unavailable = false; - /** - * The encoded polyline representation of the route followed during the - * step. - * This field is only populated if - * [OptimizeToursRequest.populate_travel_step_polylines][google.cloud.optimization.v1.OptimizeToursRequest.populate_travel_step_polylines] - * is set to true. - * - * Generated from protobuf field .google.cloud.optimization.v1.ShipmentRoute.EncodedPolyline route_polyline = 4; - */ - protected $route_polyline = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Duration $duration - * Duration of the travel step. - * @type float $distance_meters - * Distance traveled during the step. - * @type bool $traffic_info_unavailable - * When traffic is requested via - * [OptimizeToursRequest.consider_road_traffic][google.cloud.optimization.v1.OptimizeToursRequest.consider_road_traffic], - * and the traffic info couldn't be retrieved for a TravelStep, this boolean - * is set to true. This may be temporary (rare hiccup in the realtime - * traffic servers) or permanent (no data for this location). - * @type \Google\Cloud\Optimization\V1\ShipmentRoute\EncodedPolyline $route_polyline - * The encoded polyline representation of the route followed during the - * step. - * This field is only populated if - * [OptimizeToursRequest.populate_travel_step_polylines][google.cloud.optimization.v1.OptimizeToursRequest.populate_travel_step_polylines] - * is set to true. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); - parent::__construct($data); - } - - /** - * Duration of the travel step. - * - * Generated from protobuf field .google.protobuf.Duration duration = 1; - * @return \Google\Protobuf\Duration|null - */ - public function getDuration() - { - return $this->duration; - } - - public function hasDuration() - { - return isset($this->duration); - } - - public function clearDuration() - { - unset($this->duration); - } - - /** - * Duration of the travel step. - * - * Generated from protobuf field .google.protobuf.Duration duration = 1; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->duration = $var; - - return $this; - } - - /** - * Distance traveled during the step. - * - * Generated from protobuf field double distance_meters = 2; - * @return float - */ - public function getDistanceMeters() - { - return $this->distance_meters; - } - - /** - * Distance traveled during the step. - * - * Generated from protobuf field double distance_meters = 2; - * @param float $var - * @return $this - */ - public function setDistanceMeters($var) - { - GPBUtil::checkDouble($var); - $this->distance_meters = $var; - - return $this; - } - - /** - * When traffic is requested via - * [OptimizeToursRequest.consider_road_traffic][google.cloud.optimization.v1.OptimizeToursRequest.consider_road_traffic], - * and the traffic info couldn't be retrieved for a TravelStep, this boolean - * is set to true. This may be temporary (rare hiccup in the realtime - * traffic servers) or permanent (no data for this location). - * - * Generated from protobuf field bool traffic_info_unavailable = 3; - * @return bool - */ - public function getTrafficInfoUnavailable() - { - return $this->traffic_info_unavailable; - } - - /** - * When traffic is requested via - * [OptimizeToursRequest.consider_road_traffic][google.cloud.optimization.v1.OptimizeToursRequest.consider_road_traffic], - * and the traffic info couldn't be retrieved for a TravelStep, this boolean - * is set to true. This may be temporary (rare hiccup in the realtime - * traffic servers) or permanent (no data for this location). - * - * Generated from protobuf field bool traffic_info_unavailable = 3; - * @param bool $var - * @return $this - */ - public function setTrafficInfoUnavailable($var) - { - GPBUtil::checkBool($var); - $this->traffic_info_unavailable = $var; - - return $this; - } - - /** - * The encoded polyline representation of the route followed during the - * step. - * This field is only populated if - * [OptimizeToursRequest.populate_travel_step_polylines][google.cloud.optimization.v1.OptimizeToursRequest.populate_travel_step_polylines] - * is set to true. - * - * Generated from protobuf field .google.cloud.optimization.v1.ShipmentRoute.EncodedPolyline route_polyline = 4; - * @return \Google\Cloud\Optimization\V1\ShipmentRoute\EncodedPolyline|null - */ - public function getRoutePolyline() - { - return $this->route_polyline; - } - - public function hasRoutePolyline() - { - return isset($this->route_polyline); - } - - public function clearRoutePolyline() - { - unset($this->route_polyline); - } - - /** - * The encoded polyline representation of the route followed during the - * step. - * This field is only populated if - * [OptimizeToursRequest.populate_travel_step_polylines][google.cloud.optimization.v1.OptimizeToursRequest.populate_travel_step_polylines] - * is set to true. - * - * Generated from protobuf field .google.cloud.optimization.v1.ShipmentRoute.EncodedPolyline route_polyline = 4; - * @param \Google\Cloud\Optimization\V1\ShipmentRoute\EncodedPolyline $var - * @return $this - */ - public function setRoutePolyline($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Optimization\V1\ShipmentRoute\EncodedPolyline::class); - $this->route_polyline = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(TravelStep::class, \Google\Cloud\Optimization\V1\ShipmentRoute_TravelStep::class); - diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentRoute/VehicleLoad.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentRoute/VehicleLoad.php deleted file mode 100644 index 022084ba07c1..000000000000 --- a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentRoute/VehicleLoad.php +++ /dev/null @@ -1,80 +0,0 @@ -google.cloud.optimization.v1.ShipmentRoute.VehicleLoad - */ -class VehicleLoad extends \Google\Protobuf\Internal\Message -{ - /** - * The amount of load on the vehicle, for the given type. The unit of load - * is usually indicated by the type. See - * [Transition.vehicle_loads][google.cloud.optimization.v1.ShipmentRoute.Transition.vehicle_loads]. - * - * Generated from protobuf field int64 amount = 1; - */ - protected $amount = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $amount - * The amount of load on the vehicle, for the given type. The unit of load - * is usually indicated by the type. See - * [Transition.vehicle_loads][google.cloud.optimization.v1.ShipmentRoute.Transition.vehicle_loads]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); - parent::__construct($data); - } - - /** - * The amount of load on the vehicle, for the given type. The unit of load - * is usually indicated by the type. See - * [Transition.vehicle_loads][google.cloud.optimization.v1.ShipmentRoute.Transition.vehicle_loads]. - * - * Generated from protobuf field int64 amount = 1; - * @return int|string - */ - public function getAmount() - { - return $this->amount; - } - - /** - * The amount of load on the vehicle, for the given type. The unit of load - * is usually indicated by the type. See - * [Transition.vehicle_loads][google.cloud.optimization.v1.ShipmentRoute.Transition.vehicle_loads]. - * - * Generated from protobuf field int64 amount = 1; - * @param int|string $var - * @return $this - */ - public function setAmount($var) - { - GPBUtil::checkInt64($var); - $this->amount = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(VehicleLoad::class, \Google\Cloud\Optimization\V1\ShipmentRoute_VehicleLoad::class); - diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentRoute/Visit.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentRoute/Visit.php deleted file mode 100644 index fbca6c632c18..000000000000 --- a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentRoute/Visit.php +++ /dev/null @@ -1,606 +0,0 @@ -google.cloud.optimization.v1.ShipmentRoute.Visit - */ -class Visit extends \Google\Protobuf\Internal\Message -{ - /** - * Index of the `shipments` field in the source - * [ShipmentModel][google.cloud.optimization.v1.ShipmentModel]. - * - * Generated from protobuf field int32 shipment_index = 1; - */ - protected $shipment_index = 0; - /** - * If true the visit corresponds to a pickup of a `Shipment`. Otherwise, it - * corresponds to a delivery. - * - * Generated from protobuf field bool is_pickup = 2; - */ - protected $is_pickup = false; - /** - * Index of `VisitRequest` in either the pickup or delivery field of the - * `Shipment` (see `is_pickup`). - * - * Generated from protobuf field int32 visit_request_index = 3; - */ - protected $visit_request_index = 0; - /** - * Time at which the visit starts. Note that the vehicle may arrive earlier - * than this at the visit location. Times are consistent with the - * `ShipmentModel`. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 4; - */ - protected $start_time = null; - /** - * Total visit load demand as the sum of the shipment and the visit request - * `load_demands`. The values are negative if the visit is a delivery. - * Demands are reported for the same types as the - * [Transition.loads][google.cloud.optimization.v1.ShipmentRoute.Transition] - * (see this field). - * - * Generated from protobuf field map load_demands = 11; - */ - private $load_demands; - /** - * Extra detour time due to the shipments visited on the route before the - * visit and to the potential waiting time induced by time windows. - * If the visit is a delivery, the detour is computed from the corresponding - * pickup visit and is equal to: - * ``` - * start_time(delivery) - start_time(pickup) - * - (duration(pickup) + travel duration from the pickup location - * to the delivery location). - * ``` - * Otherwise, it is computed from the vehicle `start_location` and is equal - * to: - * ``` - * start_time - vehicle_start_time - travel duration from - * the vehicle's `start_location` to the visit. - * ``` - * - * Generated from protobuf field .google.protobuf.Duration detour = 6; - */ - protected $detour = null; - /** - * Copy of the corresponding `Shipment.label`, if specified in the - * `Shipment`. - * - * Generated from protobuf field string shipment_label = 7; - */ - protected $shipment_label = ''; - /** - * Copy of the corresponding - * [VisitRequest.label][google.cloud.optimization.v1.Shipment.VisitRequest.label], - * if specified in the `VisitRequest`. - * - * Generated from protobuf field string visit_label = 8; - */ - protected $visit_label = ''; - /** - * Deprecated: Use - * [Transition.vehicle_loads][google.cloud.optimization.v1.ShipmentRoute.Transition.vehicle_loads] - * instead. Vehicle loads upon arrival at the visit location, for each type - * specified in - * [Vehicle.capacities][google.cloud.optimization.v1.Vehicle.capacities], - * `start_load_intervals`, `end_load_intervals` or `demands`. - * Exception: we omit loads for quantity types unconstrained by intervals - * and that don't have any non-zero demand on the route. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.CapacityQuantity arrival_loads = 9 [deprecated = true]; - * @deprecated - */ - private $arrival_loads; - /** - * Deprecated: Use - * [ShipmentRoute.Transition.delay_duration][google.cloud.optimization.v1.ShipmentRoute.Transition.delay_duration] - * instead. Delay occurring before the visit starts. - * - * Generated from protobuf field .google.cloud.optimization.v1.ShipmentRoute.Delay delay_before_start = 10 [deprecated = true]; - * @deprecated - */ - protected $delay_before_start = null; - /** - * Deprecated: Use - * [Visit.load_demands][google.cloud.optimization.v1.ShipmentRoute.Visit.load_demands] - * instead. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.CapacityQuantity demands = 5 [deprecated = true]; - * @deprecated - */ - private $demands; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $shipment_index - * Index of the `shipments` field in the source - * [ShipmentModel][google.cloud.optimization.v1.ShipmentModel]. - * @type bool $is_pickup - * If true the visit corresponds to a pickup of a `Shipment`. Otherwise, it - * corresponds to a delivery. - * @type int $visit_request_index - * Index of `VisitRequest` in either the pickup or delivery field of the - * `Shipment` (see `is_pickup`). - * @type \Google\Protobuf\Timestamp $start_time - * Time at which the visit starts. Note that the vehicle may arrive earlier - * than this at the visit location. Times are consistent with the - * `ShipmentModel`. - * @type array|\Google\Protobuf\Internal\MapField $load_demands - * Total visit load demand as the sum of the shipment and the visit request - * `load_demands`. The values are negative if the visit is a delivery. - * Demands are reported for the same types as the - * [Transition.loads][google.cloud.optimization.v1.ShipmentRoute.Transition] - * (see this field). - * @type \Google\Protobuf\Duration $detour - * Extra detour time due to the shipments visited on the route before the - * visit and to the potential waiting time induced by time windows. - * If the visit is a delivery, the detour is computed from the corresponding - * pickup visit and is equal to: - * ``` - * start_time(delivery) - start_time(pickup) - * - (duration(pickup) + travel duration from the pickup location - * to the delivery location). - * ``` - * Otherwise, it is computed from the vehicle `start_location` and is equal - * to: - * ``` - * start_time - vehicle_start_time - travel duration from - * the vehicle's `start_location` to the visit. - * ``` - * @type string $shipment_label - * Copy of the corresponding `Shipment.label`, if specified in the - * `Shipment`. - * @type string $visit_label - * Copy of the corresponding - * [VisitRequest.label][google.cloud.optimization.v1.Shipment.VisitRequest.label], - * if specified in the `VisitRequest`. - * @type array<\Google\Cloud\Optimization\V1\CapacityQuantity>|\Google\Protobuf\Internal\RepeatedField $arrival_loads - * Deprecated: Use - * [Transition.vehicle_loads][google.cloud.optimization.v1.ShipmentRoute.Transition.vehicle_loads] - * instead. Vehicle loads upon arrival at the visit location, for each type - * specified in - * [Vehicle.capacities][google.cloud.optimization.v1.Vehicle.capacities], - * `start_load_intervals`, `end_load_intervals` or `demands`. - * Exception: we omit loads for quantity types unconstrained by intervals - * and that don't have any non-zero demand on the route. - * @type \Google\Cloud\Optimization\V1\ShipmentRoute\Delay $delay_before_start - * Deprecated: Use - * [ShipmentRoute.Transition.delay_duration][google.cloud.optimization.v1.ShipmentRoute.Transition.delay_duration] - * instead. Delay occurring before the visit starts. - * @type array<\Google\Cloud\Optimization\V1\CapacityQuantity>|\Google\Protobuf\Internal\RepeatedField $demands - * Deprecated: Use - * [Visit.load_demands][google.cloud.optimization.v1.ShipmentRoute.Visit.load_demands] - * instead. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); - parent::__construct($data); - } - - /** - * Index of the `shipments` field in the source - * [ShipmentModel][google.cloud.optimization.v1.ShipmentModel]. - * - * Generated from protobuf field int32 shipment_index = 1; - * @return int - */ - public function getShipmentIndex() - { - return $this->shipment_index; - } - - /** - * Index of the `shipments` field in the source - * [ShipmentModel][google.cloud.optimization.v1.ShipmentModel]. - * - * Generated from protobuf field int32 shipment_index = 1; - * @param int $var - * @return $this - */ - public function setShipmentIndex($var) - { - GPBUtil::checkInt32($var); - $this->shipment_index = $var; - - return $this; - } - - /** - * If true the visit corresponds to a pickup of a `Shipment`. Otherwise, it - * corresponds to a delivery. - * - * Generated from protobuf field bool is_pickup = 2; - * @return bool - */ - public function getIsPickup() - { - return $this->is_pickup; - } - - /** - * If true the visit corresponds to a pickup of a `Shipment`. Otherwise, it - * corresponds to a delivery. - * - * Generated from protobuf field bool is_pickup = 2; - * @param bool $var - * @return $this - */ - public function setIsPickup($var) - { - GPBUtil::checkBool($var); - $this->is_pickup = $var; - - return $this; - } - - /** - * Index of `VisitRequest` in either the pickup or delivery field of the - * `Shipment` (see `is_pickup`). - * - * Generated from protobuf field int32 visit_request_index = 3; - * @return int - */ - public function getVisitRequestIndex() - { - return $this->visit_request_index; - } - - /** - * Index of `VisitRequest` in either the pickup or delivery field of the - * `Shipment` (see `is_pickup`). - * - * Generated from protobuf field int32 visit_request_index = 3; - * @param int $var - * @return $this - */ - public function setVisitRequestIndex($var) - { - GPBUtil::checkInt32($var); - $this->visit_request_index = $var; - - return $this; - } - - /** - * Time at which the visit starts. Note that the vehicle may arrive earlier - * than this at the visit location. Times are consistent with the - * `ShipmentModel`. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 4; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStartTime() - { - return $this->start_time; - } - - public function hasStartTime() - { - return isset($this->start_time); - } - - public function clearStartTime() - { - unset($this->start_time); - } - - /** - * Time at which the visit starts. Note that the vehicle may arrive earlier - * than this at the visit location. Times are consistent with the - * `ShipmentModel`. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 4; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * Total visit load demand as the sum of the shipment and the visit request - * `load_demands`. The values are negative if the visit is a delivery. - * Demands are reported for the same types as the - * [Transition.loads][google.cloud.optimization.v1.ShipmentRoute.Transition] - * (see this field). - * - * Generated from protobuf field map load_demands = 11; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLoadDemands() - { - return $this->load_demands; - } - - /** - * Total visit load demand as the sum of the shipment and the visit request - * `load_demands`. The values are negative if the visit is a delivery. - * Demands are reported for the same types as the - * [Transition.loads][google.cloud.optimization.v1.ShipmentRoute.Transition] - * (see this field). - * - * Generated from protobuf field map load_demands = 11; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLoadDemands($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\Shipment\Load::class); - $this->load_demands = $arr; - - return $this; - } - - /** - * Extra detour time due to the shipments visited on the route before the - * visit and to the potential waiting time induced by time windows. - * If the visit is a delivery, the detour is computed from the corresponding - * pickup visit and is equal to: - * ``` - * start_time(delivery) - start_time(pickup) - * - (duration(pickup) + travel duration from the pickup location - * to the delivery location). - * ``` - * Otherwise, it is computed from the vehicle `start_location` and is equal - * to: - * ``` - * start_time - vehicle_start_time - travel duration from - * the vehicle's `start_location` to the visit. - * ``` - * - * Generated from protobuf field .google.protobuf.Duration detour = 6; - * @return \Google\Protobuf\Duration|null - */ - public function getDetour() - { - return $this->detour; - } - - public function hasDetour() - { - return isset($this->detour); - } - - public function clearDetour() - { - unset($this->detour); - } - - /** - * Extra detour time due to the shipments visited on the route before the - * visit and to the potential waiting time induced by time windows. - * If the visit is a delivery, the detour is computed from the corresponding - * pickup visit and is equal to: - * ``` - * start_time(delivery) - start_time(pickup) - * - (duration(pickup) + travel duration from the pickup location - * to the delivery location). - * ``` - * Otherwise, it is computed from the vehicle `start_location` and is equal - * to: - * ``` - * start_time - vehicle_start_time - travel duration from - * the vehicle's `start_location` to the visit. - * ``` - * - * Generated from protobuf field .google.protobuf.Duration detour = 6; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setDetour($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->detour = $var; - - return $this; - } - - /** - * Copy of the corresponding `Shipment.label`, if specified in the - * `Shipment`. - * - * Generated from protobuf field string shipment_label = 7; - * @return string - */ - public function getShipmentLabel() - { - return $this->shipment_label; - } - - /** - * Copy of the corresponding `Shipment.label`, if specified in the - * `Shipment`. - * - * Generated from protobuf field string shipment_label = 7; - * @param string $var - * @return $this - */ - public function setShipmentLabel($var) - { - GPBUtil::checkString($var, True); - $this->shipment_label = $var; - - return $this; - } - - /** - * Copy of the corresponding - * [VisitRequest.label][google.cloud.optimization.v1.Shipment.VisitRequest.label], - * if specified in the `VisitRequest`. - * - * Generated from protobuf field string visit_label = 8; - * @return string - */ - public function getVisitLabel() - { - return $this->visit_label; - } - - /** - * Copy of the corresponding - * [VisitRequest.label][google.cloud.optimization.v1.Shipment.VisitRequest.label], - * if specified in the `VisitRequest`. - * - * Generated from protobuf field string visit_label = 8; - * @param string $var - * @return $this - */ - public function setVisitLabel($var) - { - GPBUtil::checkString($var, True); - $this->visit_label = $var; - - return $this; - } - - /** - * Deprecated: Use - * [Transition.vehicle_loads][google.cloud.optimization.v1.ShipmentRoute.Transition.vehicle_loads] - * instead. Vehicle loads upon arrival at the visit location, for each type - * specified in - * [Vehicle.capacities][google.cloud.optimization.v1.Vehicle.capacities], - * `start_load_intervals`, `end_load_intervals` or `demands`. - * Exception: we omit loads for quantity types unconstrained by intervals - * and that don't have any non-zero demand on the route. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.CapacityQuantity arrival_loads = 9 [deprecated = true]; - * @return \Google\Protobuf\Internal\RepeatedField - * @deprecated - */ - public function getArrivalLoads() - { - @trigger_error('arrival_loads is deprecated.', E_USER_DEPRECATED); - return $this->arrival_loads; - } - - /** - * Deprecated: Use - * [Transition.vehicle_loads][google.cloud.optimization.v1.ShipmentRoute.Transition.vehicle_loads] - * instead. Vehicle loads upon arrival at the visit location, for each type - * specified in - * [Vehicle.capacities][google.cloud.optimization.v1.Vehicle.capacities], - * `start_load_intervals`, `end_load_intervals` or `demands`. - * Exception: we omit loads for quantity types unconstrained by intervals - * and that don't have any non-zero demand on the route. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.CapacityQuantity arrival_loads = 9 [deprecated = true]; - * @param array<\Google\Cloud\Optimization\V1\CapacityQuantity>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - * @deprecated - */ - public function setArrivalLoads($var) - { - @trigger_error('arrival_loads is deprecated.', E_USER_DEPRECATED); - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\CapacityQuantity::class); - $this->arrival_loads = $arr; - - return $this; - } - - /** - * Deprecated: Use - * [ShipmentRoute.Transition.delay_duration][google.cloud.optimization.v1.ShipmentRoute.Transition.delay_duration] - * instead. Delay occurring before the visit starts. - * - * Generated from protobuf field .google.cloud.optimization.v1.ShipmentRoute.Delay delay_before_start = 10 [deprecated = true]; - * @return \Google\Cloud\Optimization\V1\ShipmentRoute\Delay|null - * @deprecated - */ - public function getDelayBeforeStart() - { - @trigger_error('delay_before_start is deprecated.', E_USER_DEPRECATED); - return $this->delay_before_start; - } - - public function hasDelayBeforeStart() - { - @trigger_error('delay_before_start is deprecated.', E_USER_DEPRECATED); - return isset($this->delay_before_start); - } - - public function clearDelayBeforeStart() - { - @trigger_error('delay_before_start is deprecated.', E_USER_DEPRECATED); - unset($this->delay_before_start); - } - - /** - * Deprecated: Use - * [ShipmentRoute.Transition.delay_duration][google.cloud.optimization.v1.ShipmentRoute.Transition.delay_duration] - * instead. Delay occurring before the visit starts. - * - * Generated from protobuf field .google.cloud.optimization.v1.ShipmentRoute.Delay delay_before_start = 10 [deprecated = true]; - * @param \Google\Cloud\Optimization\V1\ShipmentRoute\Delay $var - * @return $this - * @deprecated - */ - public function setDelayBeforeStart($var) - { - @trigger_error('delay_before_start is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkMessage($var, \Google\Cloud\Optimization\V1\ShipmentRoute\Delay::class); - $this->delay_before_start = $var; - - return $this; - } - - /** - * Deprecated: Use - * [Visit.load_demands][google.cloud.optimization.v1.ShipmentRoute.Visit.load_demands] - * instead. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.CapacityQuantity demands = 5 [deprecated = true]; - * @return \Google\Protobuf\Internal\RepeatedField - * @deprecated - */ - public function getDemands() - { - @trigger_error('demands is deprecated.', E_USER_DEPRECATED); - return $this->demands; - } - - /** - * Deprecated: Use - * [Visit.load_demands][google.cloud.optimization.v1.ShipmentRoute.Visit.load_demands] - * instead. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.CapacityQuantity demands = 5 [deprecated = true]; - * @param array<\Google\Cloud\Optimization\V1\CapacityQuantity>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - * @deprecated - */ - public function setDemands($var) - { - @trigger_error('demands is deprecated.', E_USER_DEPRECATED); - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\CapacityQuantity::class); - $this->demands = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Visit::class, \Google\Cloud\Optimization\V1\ShipmentRoute_Visit::class); - diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentTypeIncompatibility.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentTypeIncompatibility.php deleted file mode 100644 index b42f828a6d3c..000000000000 --- a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentTypeIncompatibility.php +++ /dev/null @@ -1,107 +0,0 @@ -google.cloud.optimization.v1.ShipmentTypeIncompatibility - */ -class ShipmentTypeIncompatibility extends \Google\Protobuf\Internal\Message -{ - /** - * List of incompatible types. Two shipments having different `shipment_types` - * among those listed are "incompatible". - * - * Generated from protobuf field repeated string types = 1; - */ - private $types; - /** - * Mode applied to the incompatibility. - * - * Generated from protobuf field .google.cloud.optimization.v1.ShipmentTypeIncompatibility.IncompatibilityMode incompatibility_mode = 2; - */ - protected $incompatibility_mode = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $types - * List of incompatible types. Two shipments having different `shipment_types` - * among those listed are "incompatible". - * @type int $incompatibility_mode - * Mode applied to the incompatibility. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); - parent::__construct($data); - } - - /** - * List of incompatible types. Two shipments having different `shipment_types` - * among those listed are "incompatible". - * - * Generated from protobuf field repeated string types = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTypes() - { - return $this->types; - } - - /** - * List of incompatible types. Two shipments having different `shipment_types` - * among those listed are "incompatible". - * - * Generated from protobuf field repeated string types = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTypes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->types = $arr; - - return $this; - } - - /** - * Mode applied to the incompatibility. - * - * Generated from protobuf field .google.cloud.optimization.v1.ShipmentTypeIncompatibility.IncompatibilityMode incompatibility_mode = 2; - * @return int - */ - public function getIncompatibilityMode() - { - return $this->incompatibility_mode; - } - - /** - * Mode applied to the incompatibility. - * - * Generated from protobuf field .google.cloud.optimization.v1.ShipmentTypeIncompatibility.IncompatibilityMode incompatibility_mode = 2; - * @param int $var - * @return $this - */ - public function setIncompatibilityMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Optimization\V1\ShipmentTypeIncompatibility\IncompatibilityMode::class); - $this->incompatibility_mode = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentTypeIncompatibility/IncompatibilityMode.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentTypeIncompatibility/IncompatibilityMode.php deleted file mode 100644 index 127c5c8ba17e..000000000000 --- a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentTypeIncompatibility/IncompatibilityMode.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.optimization.v1.ShipmentTypeIncompatibility.IncompatibilityMode - */ -class IncompatibilityMode -{ - /** - * Unspecified incompatibility mode. This value should never be used. - * - * Generated from protobuf enum INCOMPATIBILITY_MODE_UNSPECIFIED = 0; - */ - const INCOMPATIBILITY_MODE_UNSPECIFIED = 0; - /** - * In this mode, two shipments with incompatible types can never share the - * same vehicle. - * - * Generated from protobuf enum NOT_PERFORMED_BY_SAME_VEHICLE = 1; - */ - const NOT_PERFORMED_BY_SAME_VEHICLE = 1; - /** - * For two shipments with incompatible types with the - * `NOT_IN_SAME_VEHICLE_SIMULTANEOUSLY` incompatibility mode: - * * If both are pickups only (no deliveries) or deliveries only (no - * pickups), they cannot share the same vehicle at all. - * * If one of the shipments has a delivery and the other a pickup, the two - * shipments can share the same vehicle iff the former shipment is - * delivered before the latter is picked up. - * - * Generated from protobuf enum NOT_IN_SAME_VEHICLE_SIMULTANEOUSLY = 2; - */ - const NOT_IN_SAME_VEHICLE_SIMULTANEOUSLY = 2; - - private static $valueToName = [ - self::INCOMPATIBILITY_MODE_UNSPECIFIED => 'INCOMPATIBILITY_MODE_UNSPECIFIED', - self::NOT_PERFORMED_BY_SAME_VEHICLE => 'NOT_PERFORMED_BY_SAME_VEHICLE', - self::NOT_IN_SAME_VEHICLE_SIMULTANEOUSLY => 'NOT_IN_SAME_VEHICLE_SIMULTANEOUSLY', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(IncompatibilityMode::class, \Google\Cloud\Optimization\V1\ShipmentTypeIncompatibility_IncompatibilityMode::class); - diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentTypeRequirement.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentTypeRequirement.php deleted file mode 100644 index 1b6005011b9b..000000000000 --- a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentTypeRequirement.php +++ /dev/null @@ -1,156 +0,0 @@ -google.cloud.optimization.v1.ShipmentTypeRequirement - */ -class ShipmentTypeRequirement extends \Google\Protobuf\Internal\Message -{ - /** - * List of alternative shipment types required by the - * `dependent_shipment_types`. - * - * Generated from protobuf field repeated string required_shipment_type_alternatives = 1; - */ - private $required_shipment_type_alternatives; - /** - * All shipments with a type in the `dependent_shipment_types` field require - * at least one shipment of type `required_shipment_type_alternatives` to be - * visited on the same route. - * NOTE: Chains of requirements such that a `shipment_type` depends on itself - * are not allowed. - * - * Generated from protobuf field repeated string dependent_shipment_types = 2; - */ - private $dependent_shipment_types; - /** - * Mode applied to the requirement. - * - * Generated from protobuf field .google.cloud.optimization.v1.ShipmentTypeRequirement.RequirementMode requirement_mode = 3; - */ - protected $requirement_mode = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $required_shipment_type_alternatives - * List of alternative shipment types required by the - * `dependent_shipment_types`. - * @type array|\Google\Protobuf\Internal\RepeatedField $dependent_shipment_types - * All shipments with a type in the `dependent_shipment_types` field require - * at least one shipment of type `required_shipment_type_alternatives` to be - * visited on the same route. - * NOTE: Chains of requirements such that a `shipment_type` depends on itself - * are not allowed. - * @type int $requirement_mode - * Mode applied to the requirement. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); - parent::__construct($data); - } - - /** - * List of alternative shipment types required by the - * `dependent_shipment_types`. - * - * Generated from protobuf field repeated string required_shipment_type_alternatives = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRequiredShipmentTypeAlternatives() - { - return $this->required_shipment_type_alternatives; - } - - /** - * List of alternative shipment types required by the - * `dependent_shipment_types`. - * - * Generated from protobuf field repeated string required_shipment_type_alternatives = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRequiredShipmentTypeAlternatives($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->required_shipment_type_alternatives = $arr; - - return $this; - } - - /** - * All shipments with a type in the `dependent_shipment_types` field require - * at least one shipment of type `required_shipment_type_alternatives` to be - * visited on the same route. - * NOTE: Chains of requirements such that a `shipment_type` depends on itself - * are not allowed. - * - * Generated from protobuf field repeated string dependent_shipment_types = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDependentShipmentTypes() - { - return $this->dependent_shipment_types; - } - - /** - * All shipments with a type in the `dependent_shipment_types` field require - * at least one shipment of type `required_shipment_type_alternatives` to be - * visited on the same route. - * NOTE: Chains of requirements such that a `shipment_type` depends on itself - * are not allowed. - * - * Generated from protobuf field repeated string dependent_shipment_types = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDependentShipmentTypes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->dependent_shipment_types = $arr; - - return $this; - } - - /** - * Mode applied to the requirement. - * - * Generated from protobuf field .google.cloud.optimization.v1.ShipmentTypeRequirement.RequirementMode requirement_mode = 3; - * @return int - */ - public function getRequirementMode() - { - return $this->requirement_mode; - } - - /** - * Mode applied to the requirement. - * - * Generated from protobuf field .google.cloud.optimization.v1.ShipmentTypeRequirement.RequirementMode requirement_mode = 3; - * @param int $var - * @return $this - */ - public function setRequirementMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Optimization\V1\ShipmentTypeRequirement\RequirementMode::class); - $this->requirement_mode = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentTypeRequirement/RequirementMode.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentTypeRequirement/RequirementMode.php deleted file mode 100644 index 8c6df3589e36..000000000000 --- a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/ShipmentTypeRequirement/RequirementMode.php +++ /dev/null @@ -1,80 +0,0 @@ -google.cloud.optimization.v1.ShipmentTypeRequirement.RequirementMode - */ -class RequirementMode -{ - /** - * Unspecified requirement mode. This value should never be used. - * - * Generated from protobuf enum REQUIREMENT_MODE_UNSPECIFIED = 0; - */ - const REQUIREMENT_MODE_UNSPECIFIED = 0; - /** - * In this mode, all "dependent" shipments must share the same vehicle as at - * least one of their "required" shipments. - * - * Generated from protobuf enum PERFORMED_BY_SAME_VEHICLE = 1; - */ - const PERFORMED_BY_SAME_VEHICLE = 1; - /** - * With the `IN_SAME_VEHICLE_AT_PICKUP_TIME` mode, all "dependent" - * shipments need to have at least one "required" shipment on their vehicle - * at the time of their pickup. - * A "dependent" shipment pickup must therefore have either: - * * A delivery-only "required" shipment delivered on the route after, or - * * A "required" shipment picked up on the route before it, and if the - * "required" shipment has a delivery, this delivery must be performed - * after the "dependent" shipment's pickup. - * - * Generated from protobuf enum IN_SAME_VEHICLE_AT_PICKUP_TIME = 2; - */ - const IN_SAME_VEHICLE_AT_PICKUP_TIME = 2; - /** - * Same as before, except the "dependent" shipments need to have a - * "required" shipment on their vehicle at the time of their *delivery*. - * - * Generated from protobuf enum IN_SAME_VEHICLE_AT_DELIVERY_TIME = 3; - */ - const IN_SAME_VEHICLE_AT_DELIVERY_TIME = 3; - - private static $valueToName = [ - self::REQUIREMENT_MODE_UNSPECIFIED => 'REQUIREMENT_MODE_UNSPECIFIED', - self::PERFORMED_BY_SAME_VEHICLE => 'PERFORMED_BY_SAME_VEHICLE', - self::IN_SAME_VEHICLE_AT_PICKUP_TIME => 'IN_SAME_VEHICLE_AT_PICKUP_TIME', - self::IN_SAME_VEHICLE_AT_DELIVERY_TIME => 'IN_SAME_VEHICLE_AT_DELIVERY_TIME', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(RequirementMode::class, \Google\Cloud\Optimization\V1\ShipmentTypeRequirement_RequirementMode::class); - diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/SkippedShipment.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/SkippedShipment.php deleted file mode 100644 index 90c4eeab9d8a..000000000000 --- a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/SkippedShipment.php +++ /dev/null @@ -1,153 +0,0 @@ -google.cloud.optimization.v1.SkippedShipment - */ -class SkippedShipment extends \Google\Protobuf\Internal\Message -{ - /** - * The index corresponds to the index of the shipment in the source - * `ShipmentModel`. - * - * Generated from protobuf field int32 index = 1; - */ - protected $index = 0; - /** - * Copy of the corresponding - * [Shipment.label][google.cloud.optimization.v1.Shipment.label], if specified - * in the `Shipment`. - * - * Generated from protobuf field string label = 2; - */ - protected $label = ''; - /** - * A list of reasons that explain why the shipment was skipped. See comment - * above `Reason`. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.SkippedShipment.Reason reasons = 3; - */ - private $reasons; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $index - * The index corresponds to the index of the shipment in the source - * `ShipmentModel`. - * @type string $label - * Copy of the corresponding - * [Shipment.label][google.cloud.optimization.v1.Shipment.label], if specified - * in the `Shipment`. - * @type array<\Google\Cloud\Optimization\V1\SkippedShipment\Reason>|\Google\Protobuf\Internal\RepeatedField $reasons - * A list of reasons that explain why the shipment was skipped. See comment - * above `Reason`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); - parent::__construct($data); - } - - /** - * The index corresponds to the index of the shipment in the source - * `ShipmentModel`. - * - * Generated from protobuf field int32 index = 1; - * @return int - */ - public function getIndex() - { - return $this->index; - } - - /** - * The index corresponds to the index of the shipment in the source - * `ShipmentModel`. - * - * Generated from protobuf field int32 index = 1; - * @param int $var - * @return $this - */ - public function setIndex($var) - { - GPBUtil::checkInt32($var); - $this->index = $var; - - return $this; - } - - /** - * Copy of the corresponding - * [Shipment.label][google.cloud.optimization.v1.Shipment.label], if specified - * in the `Shipment`. - * - * Generated from protobuf field string label = 2; - * @return string - */ - public function getLabel() - { - return $this->label; - } - - /** - * Copy of the corresponding - * [Shipment.label][google.cloud.optimization.v1.Shipment.label], if specified - * in the `Shipment`. - * - * Generated from protobuf field string label = 2; - * @param string $var - * @return $this - */ - public function setLabel($var) - { - GPBUtil::checkString($var, True); - $this->label = $var; - - return $this; - } - - /** - * A list of reasons that explain why the shipment was skipped. See comment - * above `Reason`. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.SkippedShipment.Reason reasons = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getReasons() - { - return $this->reasons; - } - - /** - * A list of reasons that explain why the shipment was skipped. See comment - * above `Reason`. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.SkippedShipment.Reason reasons = 3; - * @param array<\Google\Cloud\Optimization\V1\SkippedShipment\Reason>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setReasons($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\SkippedShipment\Reason::class); - $this->reasons = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/SkippedShipment/Reason.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/SkippedShipment/Reason.php deleted file mode 100644 index 530f04abb7a8..000000000000 --- a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/SkippedShipment/Reason.php +++ /dev/null @@ -1,181 +0,0 @@ -google.cloud.optimization.v1.SkippedShipment.Reason - */ -class Reason extends \Google\Protobuf\Internal\Message -{ - /** - * Refer to the comments of Code. - * - * Generated from protobuf field .google.cloud.optimization.v1.SkippedShipment.Reason.Code code = 1; - */ - protected $code = 0; - /** - * If the reason is related to a shipment-vehicle incompatibility, this - * field provides the index of one relevant vehicle. - * - * Generated from protobuf field optional int32 example_vehicle_index = 2; - */ - protected $example_vehicle_index = null; - /** - * If the reason code is `DEMAND_EXCEEDS_VEHICLE_CAPACITY`, documents one - * capacity type that is exceeded. - * - * Generated from protobuf field string example_exceeded_capacity_type = 3; - */ - protected $example_exceeded_capacity_type = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $code - * Refer to the comments of Code. - * @type int $example_vehicle_index - * If the reason is related to a shipment-vehicle incompatibility, this - * field provides the index of one relevant vehicle. - * @type string $example_exceeded_capacity_type - * If the reason code is `DEMAND_EXCEEDS_VEHICLE_CAPACITY`, documents one - * capacity type that is exceeded. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); - parent::__construct($data); - } - - /** - * Refer to the comments of Code. - * - * Generated from protobuf field .google.cloud.optimization.v1.SkippedShipment.Reason.Code code = 1; - * @return int - */ - public function getCode() - { - return $this->code; - } - - /** - * Refer to the comments of Code. - * - * Generated from protobuf field .google.cloud.optimization.v1.SkippedShipment.Reason.Code code = 1; - * @param int $var - * @return $this - */ - public function setCode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Optimization\V1\SkippedShipment\Reason\Code::class); - $this->code = $var; - - return $this; - } - - /** - * If the reason is related to a shipment-vehicle incompatibility, this - * field provides the index of one relevant vehicle. - * - * Generated from protobuf field optional int32 example_vehicle_index = 2; - * @return int - */ - public function getExampleVehicleIndex() - { - return isset($this->example_vehicle_index) ? $this->example_vehicle_index : 0; - } - - public function hasExampleVehicleIndex() - { - return isset($this->example_vehicle_index); - } - - public function clearExampleVehicleIndex() - { - unset($this->example_vehicle_index); - } - - /** - * If the reason is related to a shipment-vehicle incompatibility, this - * field provides the index of one relevant vehicle. - * - * Generated from protobuf field optional int32 example_vehicle_index = 2; - * @param int $var - * @return $this - */ - public function setExampleVehicleIndex($var) - { - GPBUtil::checkInt32($var); - $this->example_vehicle_index = $var; - - return $this; - } - - /** - * If the reason code is `DEMAND_EXCEEDS_VEHICLE_CAPACITY`, documents one - * capacity type that is exceeded. - * - * Generated from protobuf field string example_exceeded_capacity_type = 3; - * @return string - */ - public function getExampleExceededCapacityType() - { - return $this->example_exceeded_capacity_type; - } - - /** - * If the reason code is `DEMAND_EXCEEDS_VEHICLE_CAPACITY`, documents one - * capacity type that is exceeded. - * - * Generated from protobuf field string example_exceeded_capacity_type = 3; - * @param string $var - * @return $this - */ - public function setExampleExceededCapacityType($var) - { - GPBUtil::checkString($var, True); - $this->example_exceeded_capacity_type = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Reason::class, \Google\Cloud\Optimization\V1\SkippedShipment_Reason::class); - diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/SkippedShipment/Reason/Code.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/SkippedShipment/Reason/Code.php deleted file mode 100644 index 0bed0964ff65..000000000000 --- a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/SkippedShipment/Reason/Code.php +++ /dev/null @@ -1,116 +0,0 @@ -google.cloud.optimization.v1.SkippedShipment.Reason.Code - */ -class Code -{ - /** - * This should never be used. If we are unable to understand why a - * shipment was skipped, we simply return an empty set of reasons. - * - * Generated from protobuf enum CODE_UNSPECIFIED = 0; - */ - const CODE_UNSPECIFIED = 0; - /** - * There is no vehicle in the model making all shipments infeasible. - * - * Generated from protobuf enum NO_VEHICLE = 1; - */ - const NO_VEHICLE = 1; - /** - * The demand of the shipment exceeds a vehicle's capacity for some - * capacity types, one of which is `example_exceeded_capacity_type`. - * - * Generated from protobuf enum DEMAND_EXCEEDS_VEHICLE_CAPACITY = 2; - */ - const DEMAND_EXCEEDS_VEHICLE_CAPACITY = 2; - /** - * The minimum distance necessary to perform this shipment, i.e. from - * the vehicle's `start_location` to the shipment's pickup and/or delivery - * locations and to the vehicle's end location exceeds the vehicle's - * `route_distance_limit`. - * Note that for this computation we use the geodesic distances. - * - * Generated from protobuf enum CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DISTANCE_LIMIT = 3; - */ - const CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DISTANCE_LIMIT = 3; - /** - * The minimum time necessary to perform this shipment, including travel - * time, wait time and service time exceeds the vehicle's - * `route_duration_limit`. - * Note: travel time is computed in the best-case scenario, namely as - * geodesic distance x 36 m/s (roughly 130 km/hour). - * - * Generated from protobuf enum CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DURATION_LIMIT = 4; - */ - const CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DURATION_LIMIT = 4; - /** - * Same as above but we only compare minimum travel time and the - * vehicle's `travel_duration_limit`. - * - * Generated from protobuf enum CANNOT_BE_PERFORMED_WITHIN_VEHICLE_TRAVEL_DURATION_LIMIT = 5; - */ - const CANNOT_BE_PERFORMED_WITHIN_VEHICLE_TRAVEL_DURATION_LIMIT = 5; - /** - * The vehicle cannot perform this shipment in the best-case scenario - * (see `CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DURATION_LIMIT` for time - * computation) if it starts at its earliest start time: the total time - * would make the vehicle end after its latest end time. - * - * Generated from protobuf enum CANNOT_BE_PERFORMED_WITHIN_VEHICLE_TIME_WINDOWS = 6; - */ - const CANNOT_BE_PERFORMED_WITHIN_VEHICLE_TIME_WINDOWS = 6; - /** - * The `allowed_vehicle_indices` field of the shipment is not empty and - * this vehicle does not belong to it. - * - * Generated from protobuf enum VEHICLE_NOT_ALLOWED = 7; - */ - const VEHICLE_NOT_ALLOWED = 7; - - private static $valueToName = [ - self::CODE_UNSPECIFIED => 'CODE_UNSPECIFIED', - self::NO_VEHICLE => 'NO_VEHICLE', - self::DEMAND_EXCEEDS_VEHICLE_CAPACITY => 'DEMAND_EXCEEDS_VEHICLE_CAPACITY', - self::CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DISTANCE_LIMIT => 'CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DISTANCE_LIMIT', - self::CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DURATION_LIMIT => 'CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DURATION_LIMIT', - self::CANNOT_BE_PERFORMED_WITHIN_VEHICLE_TRAVEL_DURATION_LIMIT => 'CANNOT_BE_PERFORMED_WITHIN_VEHICLE_TRAVEL_DURATION_LIMIT', - self::CANNOT_BE_PERFORMED_WITHIN_VEHICLE_TIME_WINDOWS => 'CANNOT_BE_PERFORMED_WITHIN_VEHICLE_TIME_WINDOWS', - self::VEHICLE_NOT_ALLOWED => 'VEHICLE_NOT_ALLOWED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Code::class, \Google\Cloud\Optimization\V1\SkippedShipment_Reason_Code::class); - diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/TimeWindow.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/TimeWindow.php deleted file mode 100644 index 33c8cc767a0b..000000000000 --- a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/TimeWindow.php +++ /dev/null @@ -1,388 +0,0 @@ -google.cloud.optimization.v1.TimeWindow - */ -class TimeWindow extends \Google\Protobuf\Internal\Message -{ - /** - * The hard time window start time. If unspecified it will be set to - * `ShipmentModel.global_start_time`. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - */ - protected $start_time = null; - /** - * The hard time window end time. If unspecified it will be set to - * `ShipmentModel.global_end_time`. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - */ - protected $end_time = null; - /** - * The soft start time of the time window. - * - * Generated from protobuf field .google.protobuf.Timestamp soft_start_time = 3; - */ - protected $soft_start_time = null; - /** - * The soft end time of the time window. - * - * Generated from protobuf field .google.protobuf.Timestamp soft_end_time = 4; - */ - protected $soft_end_time = null; - /** - * A cost per hour added to other costs in the model if the event occurs - * before soft_start_time, computed as: - * ``` - * max(0, soft_start_time - t.seconds) - * * cost_per_hour_before_soft_start_time / 3600, - * t being the time of the event. - * ``` - * This cost must be positive, and the field can only be set if - * soft_start_time has been set. - * - * Generated from protobuf field optional double cost_per_hour_before_soft_start_time = 5; - */ - protected $cost_per_hour_before_soft_start_time = null; - /** - * A cost per hour added to other costs in the model if the event occurs after - * `soft_end_time`, computed as: - * ``` - * max(0, t.seconds - soft_end_time.seconds) - * * cost_per_hour_after_soft_end_time / 3600, - * t being the time of the event. - * ``` - * This cost must be positive, and the field can only be set if - * `soft_end_time` has been set. - * - * Generated from protobuf field optional double cost_per_hour_after_soft_end_time = 6; - */ - protected $cost_per_hour_after_soft_end_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $start_time - * The hard time window start time. If unspecified it will be set to - * `ShipmentModel.global_start_time`. - * @type \Google\Protobuf\Timestamp $end_time - * The hard time window end time. If unspecified it will be set to - * `ShipmentModel.global_end_time`. - * @type \Google\Protobuf\Timestamp $soft_start_time - * The soft start time of the time window. - * @type \Google\Protobuf\Timestamp $soft_end_time - * The soft end time of the time window. - * @type float $cost_per_hour_before_soft_start_time - * A cost per hour added to other costs in the model if the event occurs - * before soft_start_time, computed as: - * ``` - * max(0, soft_start_time - t.seconds) - * * cost_per_hour_before_soft_start_time / 3600, - * t being the time of the event. - * ``` - * This cost must be positive, and the field can only be set if - * soft_start_time has been set. - * @type float $cost_per_hour_after_soft_end_time - * A cost per hour added to other costs in the model if the event occurs after - * `soft_end_time`, computed as: - * ``` - * max(0, t.seconds - soft_end_time.seconds) - * * cost_per_hour_after_soft_end_time / 3600, - * t being the time of the event. - * ``` - * This cost must be positive, and the field can only be set if - * `soft_end_time` has been set. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); - parent::__construct($data); - } - - /** - * The hard time window start time. If unspecified it will be set to - * `ShipmentModel.global_start_time`. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStartTime() - { - return $this->start_time; - } - - public function hasStartTime() - { - return isset($this->start_time); - } - - public function clearStartTime() - { - unset($this->start_time); - } - - /** - * The hard time window start time. If unspecified it will be set to - * `ShipmentModel.global_start_time`. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * The hard time window end time. If unspecified it will be set to - * `ShipmentModel.global_end_time`. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * The hard time window end time. If unspecified it will be set to - * `ShipmentModel.global_end_time`. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * The soft start time of the time window. - * - * Generated from protobuf field .google.protobuf.Timestamp soft_start_time = 3; - * @return \Google\Protobuf\Timestamp|null - */ - public function getSoftStartTime() - { - return $this->soft_start_time; - } - - public function hasSoftStartTime() - { - return isset($this->soft_start_time); - } - - public function clearSoftStartTime() - { - unset($this->soft_start_time); - } - - /** - * The soft start time of the time window. - * - * Generated from protobuf field .google.protobuf.Timestamp soft_start_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setSoftStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->soft_start_time = $var; - - return $this; - } - - /** - * The soft end time of the time window. - * - * Generated from protobuf field .google.protobuf.Timestamp soft_end_time = 4; - * @return \Google\Protobuf\Timestamp|null - */ - public function getSoftEndTime() - { - return $this->soft_end_time; - } - - public function hasSoftEndTime() - { - return isset($this->soft_end_time); - } - - public function clearSoftEndTime() - { - unset($this->soft_end_time); - } - - /** - * The soft end time of the time window. - * - * Generated from protobuf field .google.protobuf.Timestamp soft_end_time = 4; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setSoftEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->soft_end_time = $var; - - return $this; - } - - /** - * A cost per hour added to other costs in the model if the event occurs - * before soft_start_time, computed as: - * ``` - * max(0, soft_start_time - t.seconds) - * * cost_per_hour_before_soft_start_time / 3600, - * t being the time of the event. - * ``` - * This cost must be positive, and the field can only be set if - * soft_start_time has been set. - * - * Generated from protobuf field optional double cost_per_hour_before_soft_start_time = 5; - * @return float - */ - public function getCostPerHourBeforeSoftStartTime() - { - return isset($this->cost_per_hour_before_soft_start_time) ? $this->cost_per_hour_before_soft_start_time : 0.0; - } - - public function hasCostPerHourBeforeSoftStartTime() - { - return isset($this->cost_per_hour_before_soft_start_time); - } - - public function clearCostPerHourBeforeSoftStartTime() - { - unset($this->cost_per_hour_before_soft_start_time); - } - - /** - * A cost per hour added to other costs in the model if the event occurs - * before soft_start_time, computed as: - * ``` - * max(0, soft_start_time - t.seconds) - * * cost_per_hour_before_soft_start_time / 3600, - * t being the time of the event. - * ``` - * This cost must be positive, and the field can only be set if - * soft_start_time has been set. - * - * Generated from protobuf field optional double cost_per_hour_before_soft_start_time = 5; - * @param float $var - * @return $this - */ - public function setCostPerHourBeforeSoftStartTime($var) - { - GPBUtil::checkDouble($var); - $this->cost_per_hour_before_soft_start_time = $var; - - return $this; - } - - /** - * A cost per hour added to other costs in the model if the event occurs after - * `soft_end_time`, computed as: - * ``` - * max(0, t.seconds - soft_end_time.seconds) - * * cost_per_hour_after_soft_end_time / 3600, - * t being the time of the event. - * ``` - * This cost must be positive, and the field can only be set if - * `soft_end_time` has been set. - * - * Generated from protobuf field optional double cost_per_hour_after_soft_end_time = 6; - * @return float - */ - public function getCostPerHourAfterSoftEndTime() - { - return isset($this->cost_per_hour_after_soft_end_time) ? $this->cost_per_hour_after_soft_end_time : 0.0; - } - - public function hasCostPerHourAfterSoftEndTime() - { - return isset($this->cost_per_hour_after_soft_end_time); - } - - public function clearCostPerHourAfterSoftEndTime() - { - unset($this->cost_per_hour_after_soft_end_time); - } - - /** - * A cost per hour added to other costs in the model if the event occurs after - * `soft_end_time`, computed as: - * ``` - * max(0, t.seconds - soft_end_time.seconds) - * * cost_per_hour_after_soft_end_time / 3600, - * t being the time of the event. - * ``` - * This cost must be positive, and the field can only be set if - * `soft_end_time` has been set. - * - * Generated from protobuf field optional double cost_per_hour_after_soft_end_time = 6; - * @param float $var - * @return $this - */ - public function setCostPerHourAfterSoftEndTime($var) - { - GPBUtil::checkDouble($var); - $this->cost_per_hour_after_soft_end_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/TransitionAttributes.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/TransitionAttributes.php deleted file mode 100644 index a5182bd35dfb..000000000000 --- a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/TransitionAttributes.php +++ /dev/null @@ -1,408 +0,0 @@ -google.cloud.optimization.v1.TransitionAttributes - */ -class TransitionAttributes extends \Google\Protobuf\Internal\Message -{ - /** - * Tags defining the set of (src->dst) transitions these attributes apply to. - * A source visit or vehicle start matches iff its - * [VisitRequest.tags][google.cloud.optimization.v1.Shipment.VisitRequest.tags] - * or [Vehicle.start_tags][google.cloud.optimization.v1.Vehicle.start_tags] - * either contains `src_tag` or does not contain `excluded_src_tag` (depending - * on which of these two fields is non-empty). - * - * Generated from protobuf field string src_tag = 1; - */ - protected $src_tag = ''; - /** - * See `src_tag`. Exactly one of `src_tag` and `excluded_src_tag` must be - * non-empty. - * - * Generated from protobuf field string excluded_src_tag = 2; - */ - protected $excluded_src_tag = ''; - /** - * A destination visit or vehicle end matches iff its - * [VisitRequest.tags][google.cloud.optimization.v1.Shipment.VisitRequest.tags] - * or [Vehicle.end_tags][google.cloud.optimization.v1.Vehicle.end_tags] either - * contains `dst_tag` or does not contain `excluded_dst_tag` (depending on - * which of these two fields is non-empty). - * - * Generated from protobuf field string dst_tag = 3; - */ - protected $dst_tag = ''; - /** - * See `dst_tag`. Exactly one of `dst_tag` and `excluded_dst_tag` must be - * non-empty. - * - * Generated from protobuf field string excluded_dst_tag = 4; - */ - protected $excluded_dst_tag = ''; - /** - * Specifies a cost for performing this transition. This is in the same unit - * as all other costs in the model and must not be negative. It is applied on - * top of all other existing costs. - * - * Generated from protobuf field double cost = 5; - */ - protected $cost = 0.0; - /** - * Specifies a cost per kilometer applied to the distance traveled while - * performing this transition. It adds up to any - * [Vehicle.cost_per_kilometer][google.cloud.optimization.v1.Vehicle.cost_per_kilometer] - * specified on vehicles. - * - * Generated from protobuf field double cost_per_kilometer = 6; - */ - protected $cost_per_kilometer = 0.0; - /** - * Specifies a limit on the distance traveled while performing this - * transition. - * As of 2021/06, only soft limits are supported. - * - * Generated from protobuf field .google.cloud.optimization.v1.DistanceLimit distance_limit = 7; - */ - protected $distance_limit = null; - /** - * Specifies a delay incurred when performing this transition. - * This delay always occurs *after* finishing the source visit and *before* - * starting the destination visit. - * - * Generated from protobuf field .google.protobuf.Duration delay = 8; - */ - protected $delay = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $src_tag - * Tags defining the set of (src->dst) transitions these attributes apply to. - * A source visit or vehicle start matches iff its - * [VisitRequest.tags][google.cloud.optimization.v1.Shipment.VisitRequest.tags] - * or [Vehicle.start_tags][google.cloud.optimization.v1.Vehicle.start_tags] - * either contains `src_tag` or does not contain `excluded_src_tag` (depending - * on which of these two fields is non-empty). - * @type string $excluded_src_tag - * See `src_tag`. Exactly one of `src_tag` and `excluded_src_tag` must be - * non-empty. - * @type string $dst_tag - * A destination visit or vehicle end matches iff its - * [VisitRequest.tags][google.cloud.optimization.v1.Shipment.VisitRequest.tags] - * or [Vehicle.end_tags][google.cloud.optimization.v1.Vehicle.end_tags] either - * contains `dst_tag` or does not contain `excluded_dst_tag` (depending on - * which of these two fields is non-empty). - * @type string $excluded_dst_tag - * See `dst_tag`. Exactly one of `dst_tag` and `excluded_dst_tag` must be - * non-empty. - * @type float $cost - * Specifies a cost for performing this transition. This is in the same unit - * as all other costs in the model and must not be negative. It is applied on - * top of all other existing costs. - * @type float $cost_per_kilometer - * Specifies a cost per kilometer applied to the distance traveled while - * performing this transition. It adds up to any - * [Vehicle.cost_per_kilometer][google.cloud.optimization.v1.Vehicle.cost_per_kilometer] - * specified on vehicles. - * @type \Google\Cloud\Optimization\V1\DistanceLimit $distance_limit - * Specifies a limit on the distance traveled while performing this - * transition. - * As of 2021/06, only soft limits are supported. - * @type \Google\Protobuf\Duration $delay - * Specifies a delay incurred when performing this transition. - * This delay always occurs *after* finishing the source visit and *before* - * starting the destination visit. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); - parent::__construct($data); - } - - /** - * Tags defining the set of (src->dst) transitions these attributes apply to. - * A source visit or vehicle start matches iff its - * [VisitRequest.tags][google.cloud.optimization.v1.Shipment.VisitRequest.tags] - * or [Vehicle.start_tags][google.cloud.optimization.v1.Vehicle.start_tags] - * either contains `src_tag` or does not contain `excluded_src_tag` (depending - * on which of these two fields is non-empty). - * - * Generated from protobuf field string src_tag = 1; - * @return string - */ - public function getSrcTag() - { - return $this->src_tag; - } - - /** - * Tags defining the set of (src->dst) transitions these attributes apply to. - * A source visit or vehicle start matches iff its - * [VisitRequest.tags][google.cloud.optimization.v1.Shipment.VisitRequest.tags] - * or [Vehicle.start_tags][google.cloud.optimization.v1.Vehicle.start_tags] - * either contains `src_tag` or does not contain `excluded_src_tag` (depending - * on which of these two fields is non-empty). - * - * Generated from protobuf field string src_tag = 1; - * @param string $var - * @return $this - */ - public function setSrcTag($var) - { - GPBUtil::checkString($var, True); - $this->src_tag = $var; - - return $this; - } - - /** - * See `src_tag`. Exactly one of `src_tag` and `excluded_src_tag` must be - * non-empty. - * - * Generated from protobuf field string excluded_src_tag = 2; - * @return string - */ - public function getExcludedSrcTag() - { - return $this->excluded_src_tag; - } - - /** - * See `src_tag`. Exactly one of `src_tag` and `excluded_src_tag` must be - * non-empty. - * - * Generated from protobuf field string excluded_src_tag = 2; - * @param string $var - * @return $this - */ - public function setExcludedSrcTag($var) - { - GPBUtil::checkString($var, True); - $this->excluded_src_tag = $var; - - return $this; - } - - /** - * A destination visit or vehicle end matches iff its - * [VisitRequest.tags][google.cloud.optimization.v1.Shipment.VisitRequest.tags] - * or [Vehicle.end_tags][google.cloud.optimization.v1.Vehicle.end_tags] either - * contains `dst_tag` or does not contain `excluded_dst_tag` (depending on - * which of these two fields is non-empty). - * - * Generated from protobuf field string dst_tag = 3; - * @return string - */ - public function getDstTag() - { - return $this->dst_tag; - } - - /** - * A destination visit or vehicle end matches iff its - * [VisitRequest.tags][google.cloud.optimization.v1.Shipment.VisitRequest.tags] - * or [Vehicle.end_tags][google.cloud.optimization.v1.Vehicle.end_tags] either - * contains `dst_tag` or does not contain `excluded_dst_tag` (depending on - * which of these two fields is non-empty). - * - * Generated from protobuf field string dst_tag = 3; - * @param string $var - * @return $this - */ - public function setDstTag($var) - { - GPBUtil::checkString($var, True); - $this->dst_tag = $var; - - return $this; - } - - /** - * See `dst_tag`. Exactly one of `dst_tag` and `excluded_dst_tag` must be - * non-empty. - * - * Generated from protobuf field string excluded_dst_tag = 4; - * @return string - */ - public function getExcludedDstTag() - { - return $this->excluded_dst_tag; - } - - /** - * See `dst_tag`. Exactly one of `dst_tag` and `excluded_dst_tag` must be - * non-empty. - * - * Generated from protobuf field string excluded_dst_tag = 4; - * @param string $var - * @return $this - */ - public function setExcludedDstTag($var) - { - GPBUtil::checkString($var, True); - $this->excluded_dst_tag = $var; - - return $this; - } - - /** - * Specifies a cost for performing this transition. This is in the same unit - * as all other costs in the model and must not be negative. It is applied on - * top of all other existing costs. - * - * Generated from protobuf field double cost = 5; - * @return float - */ - public function getCost() - { - return $this->cost; - } - - /** - * Specifies a cost for performing this transition. This is in the same unit - * as all other costs in the model and must not be negative. It is applied on - * top of all other existing costs. - * - * Generated from protobuf field double cost = 5; - * @param float $var - * @return $this - */ - public function setCost($var) - { - GPBUtil::checkDouble($var); - $this->cost = $var; - - return $this; - } - - /** - * Specifies a cost per kilometer applied to the distance traveled while - * performing this transition. It adds up to any - * [Vehicle.cost_per_kilometer][google.cloud.optimization.v1.Vehicle.cost_per_kilometer] - * specified on vehicles. - * - * Generated from protobuf field double cost_per_kilometer = 6; - * @return float - */ - public function getCostPerKilometer() - { - return $this->cost_per_kilometer; - } - - /** - * Specifies a cost per kilometer applied to the distance traveled while - * performing this transition. It adds up to any - * [Vehicle.cost_per_kilometer][google.cloud.optimization.v1.Vehicle.cost_per_kilometer] - * specified on vehicles. - * - * Generated from protobuf field double cost_per_kilometer = 6; - * @param float $var - * @return $this - */ - public function setCostPerKilometer($var) - { - GPBUtil::checkDouble($var); - $this->cost_per_kilometer = $var; - - return $this; - } - - /** - * Specifies a limit on the distance traveled while performing this - * transition. - * As of 2021/06, only soft limits are supported. - * - * Generated from protobuf field .google.cloud.optimization.v1.DistanceLimit distance_limit = 7; - * @return \Google\Cloud\Optimization\V1\DistanceLimit|null - */ - public function getDistanceLimit() - { - return $this->distance_limit; - } - - public function hasDistanceLimit() - { - return isset($this->distance_limit); - } - - public function clearDistanceLimit() - { - unset($this->distance_limit); - } - - /** - * Specifies a limit on the distance traveled while performing this - * transition. - * As of 2021/06, only soft limits are supported. - * - * Generated from protobuf field .google.cloud.optimization.v1.DistanceLimit distance_limit = 7; - * @param \Google\Cloud\Optimization\V1\DistanceLimit $var - * @return $this - */ - public function setDistanceLimit($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Optimization\V1\DistanceLimit::class); - $this->distance_limit = $var; - - return $this; - } - - /** - * Specifies a delay incurred when performing this transition. - * This delay always occurs *after* finishing the source visit and *before* - * starting the destination visit. - * - * Generated from protobuf field .google.protobuf.Duration delay = 8; - * @return \Google\Protobuf\Duration|null - */ - public function getDelay() - { - return $this->delay; - } - - public function hasDelay() - { - return isset($this->delay); - } - - public function clearDelay() - { - unset($this->delay); - } - - /** - * Specifies a delay incurred when performing this transition. - * This delay always occurs *after* finishing the source visit and *before* - * starting the destination visit. - * - * Generated from protobuf field .google.protobuf.Duration delay = 8; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setDelay($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->delay = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/Vehicle.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/Vehicle.php deleted file mode 100644 index 90af4115a7c0..000000000000 --- a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/Vehicle.php +++ /dev/null @@ -1,1581 +0,0 @@ -google.cloud.optimization.v1.Vehicle - */ -class Vehicle extends \Google\Protobuf\Internal\Message -{ - /** - * The travel mode which affects the roads usable by the vehicle and its - * speed. See also `travel_duration_multiple`. - * - * Generated from protobuf field .google.cloud.optimization.v1.Vehicle.TravelMode travel_mode = 1; - */ - protected $travel_mode = 0; - /** - * Optional. A set of conditions to satisfy that affect the way routes are - * calculated for the given vehicle. - * - * Generated from protobuf field .google.cloud.optimization.v1.RouteModifiers route_modifiers = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $route_modifiers = null; - /** - * Geographic location where the vehicle starts before picking up any - * shipments. If not specified, the vehicle starts at its first pickup. - * If the shipment model has duration and distance matrices, `start_location` - * must not be specified. - * - * Generated from protobuf field .google.type.LatLng start_location = 3; - */ - protected $start_location = null; - /** - * Waypoint representing a geographic location where the vehicle starts before - * picking up any shipments. If neither `start_waypoint` nor `start_location` - * is specified, the vehicle starts at its first pickup. - * If the shipment model has duration and distance matrices, `start_waypoint` - * must not be specified. - * - * Generated from protobuf field .google.cloud.optimization.v1.Waypoint start_waypoint = 4; - */ - protected $start_waypoint = null; - /** - * Geographic location where the vehicle ends after it has completed its last - * `VisitRequest`. If not specified the vehicle's `ShipmentRoute` ends - * immediately when it completes its last `VisitRequest`. - * If the shipment model has duration and distance matrices, `end_location` - * must not be specified. - * - * Generated from protobuf field .google.type.LatLng end_location = 5; - */ - protected $end_location = null; - /** - * Waypoint representing a geographic location where the vehicle ends after - * it has completed its last `VisitRequest`. If neither `end_waypoint` nor - * `end_location` is specified, the vehicle's `ShipmentRoute` ends immediately - * when it completes its last `VisitRequest`. - * If the shipment model has duration and distance matrices, `end_waypoint` - * must not be specified. - * - * Generated from protobuf field .google.cloud.optimization.v1.Waypoint end_waypoint = 6; - */ - protected $end_waypoint = null; - /** - * Specifies tags attached to the start of the vehicle's route. - * Empty or duplicate strings are not allowed. - * - * Generated from protobuf field repeated string start_tags = 7; - */ - private $start_tags; - /** - * Specifies tags attached to the end of the vehicle's route. - * Empty or duplicate strings are not allowed. - * - * Generated from protobuf field repeated string end_tags = 8; - */ - private $end_tags; - /** - * Time windows during which the vehicle may depart its start location. - * They must be within the global time limits (see - * [ShipmentModel.global_*][google.cloud.optimization.v1.ShipmentModel.global_start_time] - * fields). If unspecified, there is no limitation besides those global time - * limits. - * Time windows belonging to the same repeated field must be disjoint, i.e. no - * time window can overlap with or be adjacent to another, and they must be in - * chronological order. - * `cost_per_hour_after_soft_end_time` and `soft_end_time` can only be set if - * there is a single time window. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.TimeWindow start_time_windows = 9; - */ - private $start_time_windows; - /** - * Time windows during which the vehicle may arrive at its end location. - * They must be within the global time limits (see - * [ShipmentModel.global_*][google.cloud.optimization.v1.ShipmentModel.global_start_time] - * fields). If unspecified, there is no limitation besides those global time - * limits. - * Time windows belonging to the same repeated field must be disjoint, i.e. no - * time window can overlap with or be adjacent to another, and they must be in - * chronological order. - * `cost_per_hour_after_soft_end_time` and `soft_end_time` can only be set if - * there is a single time window. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.TimeWindow end_time_windows = 10; - */ - private $end_time_windows; - /** - * Specifies a multiplicative factor that can be used to increase or decrease - * travel times of this vehicle. For example, setting this to 2.0 means - * that this vehicle is slower and has travel times that are twice what they - * are for standard vehicles. This multiple does not affect visit durations. - * It does affect cost if `cost_per_hour` or `cost_per_traveled_hour` are - * specified. This must be in the range [0.001, 1000.0]. If unset, the vehicle - * is standard, and this multiple is considered 1.0. - * WARNING: Travel times will be rounded to the nearest second after this - * multiple is applied but before performing any numerical operations, thus, - * a small multiple may result in a loss of precision. - * See also `extra_visit_duration_for_visit_type` below. - * - * Generated from protobuf field optional double travel_duration_multiple = 11; - */ - protected $travel_duration_multiple = null; - /** - * Unloading policy enforced on the vehicle. - * - * Generated from protobuf field .google.cloud.optimization.v1.Vehicle.UnloadingPolicy unloading_policy = 12; - */ - protected $unloading_policy = 0; - /** - * Capacities of the vehicle (weight, volume, # of pallets for example). - * The keys in the map are the identifiers of the type of load, consistent - * with the keys of the - * [Shipment.load_demands][google.cloud.optimization.v1.Shipment.load_demands] - * field. If a given key is absent from this map, the corresponding capacity - * is considered to be limitless. - * - * Generated from protobuf field map load_limits = 30; - */ - private $load_limits; - /** - * Vehicle costs: all costs add up and must be in the same unit as - * [Shipment.penalty_cost][google.cloud.optimization.v1.Shipment.penalty_cost]. - * Cost per hour of the vehicle route. This cost is applied to the total time - * taken by the route, and includes travel time, waiting time, and visit time. - * Using `cost_per_hour` instead of just `cost_per_traveled_hour` may result - * in additional latency. - * - * Generated from protobuf field double cost_per_hour = 16; - */ - protected $cost_per_hour = 0.0; - /** - * Cost per traveled hour of the vehicle route. This cost is applied only to - * travel time taken by the route (i.e., that reported in - * [ShipmentRoute.transitions][google.cloud.optimization.v1.ShipmentRoute.transitions]), - * and excludes waiting time and visit time. - * - * Generated from protobuf field double cost_per_traveled_hour = 17; - */ - protected $cost_per_traveled_hour = 0.0; - /** - * Cost per kilometer of the vehicle route. This cost is applied to the - * distance reported in the - * [ShipmentRoute.transitions][google.cloud.optimization.v1.ShipmentRoute.transitions] - * and does not apply to any distance implicitly traveled from the - * `arrival_location` to the `departure_location` of a single `VisitRequest`. - * - * Generated from protobuf field double cost_per_kilometer = 18; - */ - protected $cost_per_kilometer = 0.0; - /** - * Fixed cost applied if this vehicle is used to handle a shipment. - * - * Generated from protobuf field double fixed_cost = 19; - */ - protected $fixed_cost = 0.0; - /** - * This field only applies to vehicles when their route does not serve any - * shipments. It indicates if the vehicle should be considered as used or not - * in this case. - * If true, the vehicle goes from its start to its end location even if it - * doesn't serve any shipments, and time and distance costs resulting from its - * start --> end travel are taken into account. - * Otherwise, it doesn't travel from its start to its end location, and no - * `break_rule` or delay (from `TransitionAttributes`) are scheduled for this - * vehicle. In this case, the vehicle's `ShipmentRoute` doesn't contain any - * information except for the vehicle index and label. - * - * Generated from protobuf field bool used_if_route_is_empty = 20; - */ - protected $used_if_route_is_empty = false; - /** - * Limit applied to the total duration of the vehicle's route. In a given - * `OptimizeToursResponse`, the route duration of a vehicle is the - * difference between its `vehicle_end_time` and `vehicle_start_time`. - * - * Generated from protobuf field .google.cloud.optimization.v1.Vehicle.DurationLimit route_duration_limit = 21; - */ - protected $route_duration_limit = null; - /** - * Limit applied to the travel duration of the vehicle's route. In a given - * `OptimizeToursResponse`, the route travel duration is the sum of all its - * [transitions.travel_duration][google.cloud.optimization.v1.ShipmentRoute.Transition.travel_duration]. - * - * Generated from protobuf field .google.cloud.optimization.v1.Vehicle.DurationLimit travel_duration_limit = 22; - */ - protected $travel_duration_limit = null; - /** - * Limit applied to the total distance of the vehicle's route. In a given - * `OptimizeToursResponse`, the route distance is the sum of all its - * [transitions.travel_distance_meters][google.cloud.optimization.v1.ShipmentRoute.Transition.travel_distance_meters]. - * - * Generated from protobuf field .google.cloud.optimization.v1.DistanceLimit route_distance_limit = 23; - */ - protected $route_distance_limit = null; - /** - * Specifies a map from visit_types strings to durations. The duration is time - * in addition to - * [VisitRequest.duration][google.cloud.optimization.v1.Shipment.VisitRequest.duration] - * to be taken at visits with the specified `visit_types`. This extra visit - * duration adds cost if `cost_per_hour` is specified. Keys (i.e. - * `visit_types`) cannot be empty strings. - * If a visit request has multiple types, a duration will be added for each - * type in the map. - * - * Generated from protobuf field map extra_visit_duration_for_visit_type = 24; - */ - private $extra_visit_duration_for_visit_type; - /** - * Describes the break schedule to be enforced on this vehicle. - * If empty, no breaks will be scheduled for this vehicle. - * - * Generated from protobuf field .google.cloud.optimization.v1.BreakRule break_rule = 25; - */ - protected $break_rule = null; - /** - * Specifies a label for this vehicle. This label is reported in the response - * as the `vehicle_label` of the corresponding - * [ShipmentRoute][google.cloud.optimization.v1.ShipmentRoute]. - * - * Generated from protobuf field string label = 27; - */ - protected $label = ''; - /** - * If true, `used_if_route_is_empty` must be false, and this vehicle will - * remain unused. - * If a shipment is performed by an ignored vehicle in - * `injected_first_solution_routes`, it is skipped in the first solution but - * is free to be performed in the response. - * If a shipment is performed by an ignored vehicle in - * `injected_solution_constraint` and any related pickup/delivery is - * constrained to remain on the vehicle (i.e., not relaxed to level - * `RELAX_ALL_AFTER_THRESHOLD`), it is skipped in the response. - * If a shipment has a non-empty `allowed_vehicle_indices` field and all of - * the allowed vehicles are ignored, it is skipped in the response. - * - * Generated from protobuf field bool ignore = 28; - */ - protected $ignore = false; - /** - * Deprecated: No longer used. - * Indices in the `break_rule` field in the source - * [ShipmentModel][google.cloud.optimization.v1.ShipmentModel]. They - * correspond to break rules enforced on the vehicle. - * As of 2018/03, at most one rule index per vehicle can be specified. - * - * Generated from protobuf field repeated int32 break_rule_indices = 29 [deprecated = true]; - * @deprecated - */ - private $break_rule_indices; - /** - * Deprecated: Use - * [Vehicle.load_limits][google.cloud.optimization.v1.Vehicle.load_limits] - * instead. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.CapacityQuantity capacities = 13 [deprecated = true]; - * @deprecated - */ - private $capacities; - /** - * Deprecated: Use - * [Vehicle.LoadLimit.start_load_interval][google.cloud.optimization.v1.Vehicle.LoadLimit.start_load_interval] - * instead. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.CapacityQuantityInterval start_load_intervals = 14 [deprecated = true]; - * @deprecated - */ - private $start_load_intervals; - /** - * Deprecated: Use - * [Vehicle.LoadLimit.end_load_interval][google.cloud.optimization.v1.Vehicle.LoadLimit.end_load_interval] - * instead. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.CapacityQuantityInterval end_load_intervals = 15 [deprecated = true]; - * @deprecated - */ - private $end_load_intervals; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $travel_mode - * The travel mode which affects the roads usable by the vehicle and its - * speed. See also `travel_duration_multiple`. - * @type \Google\Cloud\Optimization\V1\RouteModifiers $route_modifiers - * Optional. A set of conditions to satisfy that affect the way routes are - * calculated for the given vehicle. - * @type \Google\Type\LatLng $start_location - * Geographic location where the vehicle starts before picking up any - * shipments. If not specified, the vehicle starts at its first pickup. - * If the shipment model has duration and distance matrices, `start_location` - * must not be specified. - * @type \Google\Cloud\Optimization\V1\Waypoint $start_waypoint - * Waypoint representing a geographic location where the vehicle starts before - * picking up any shipments. If neither `start_waypoint` nor `start_location` - * is specified, the vehicle starts at its first pickup. - * If the shipment model has duration and distance matrices, `start_waypoint` - * must not be specified. - * @type \Google\Type\LatLng $end_location - * Geographic location where the vehicle ends after it has completed its last - * `VisitRequest`. If not specified the vehicle's `ShipmentRoute` ends - * immediately when it completes its last `VisitRequest`. - * If the shipment model has duration and distance matrices, `end_location` - * must not be specified. - * @type \Google\Cloud\Optimization\V1\Waypoint $end_waypoint - * Waypoint representing a geographic location where the vehicle ends after - * it has completed its last `VisitRequest`. If neither `end_waypoint` nor - * `end_location` is specified, the vehicle's `ShipmentRoute` ends immediately - * when it completes its last `VisitRequest`. - * If the shipment model has duration and distance matrices, `end_waypoint` - * must not be specified. - * @type array|\Google\Protobuf\Internal\RepeatedField $start_tags - * Specifies tags attached to the start of the vehicle's route. - * Empty or duplicate strings are not allowed. - * @type array|\Google\Protobuf\Internal\RepeatedField $end_tags - * Specifies tags attached to the end of the vehicle's route. - * Empty or duplicate strings are not allowed. - * @type array<\Google\Cloud\Optimization\V1\TimeWindow>|\Google\Protobuf\Internal\RepeatedField $start_time_windows - * Time windows during which the vehicle may depart its start location. - * They must be within the global time limits (see - * [ShipmentModel.global_*][google.cloud.optimization.v1.ShipmentModel.global_start_time] - * fields). If unspecified, there is no limitation besides those global time - * limits. - * Time windows belonging to the same repeated field must be disjoint, i.e. no - * time window can overlap with or be adjacent to another, and they must be in - * chronological order. - * `cost_per_hour_after_soft_end_time` and `soft_end_time` can only be set if - * there is a single time window. - * @type array<\Google\Cloud\Optimization\V1\TimeWindow>|\Google\Protobuf\Internal\RepeatedField $end_time_windows - * Time windows during which the vehicle may arrive at its end location. - * They must be within the global time limits (see - * [ShipmentModel.global_*][google.cloud.optimization.v1.ShipmentModel.global_start_time] - * fields). If unspecified, there is no limitation besides those global time - * limits. - * Time windows belonging to the same repeated field must be disjoint, i.e. no - * time window can overlap with or be adjacent to another, and they must be in - * chronological order. - * `cost_per_hour_after_soft_end_time` and `soft_end_time` can only be set if - * there is a single time window. - * @type float $travel_duration_multiple - * Specifies a multiplicative factor that can be used to increase or decrease - * travel times of this vehicle. For example, setting this to 2.0 means - * that this vehicle is slower and has travel times that are twice what they - * are for standard vehicles. This multiple does not affect visit durations. - * It does affect cost if `cost_per_hour` or `cost_per_traveled_hour` are - * specified. This must be in the range [0.001, 1000.0]. If unset, the vehicle - * is standard, and this multiple is considered 1.0. - * WARNING: Travel times will be rounded to the nearest second after this - * multiple is applied but before performing any numerical operations, thus, - * a small multiple may result in a loss of precision. - * See also `extra_visit_duration_for_visit_type` below. - * @type int $unloading_policy - * Unloading policy enforced on the vehicle. - * @type array|\Google\Protobuf\Internal\MapField $load_limits - * Capacities of the vehicle (weight, volume, # of pallets for example). - * The keys in the map are the identifiers of the type of load, consistent - * with the keys of the - * [Shipment.load_demands][google.cloud.optimization.v1.Shipment.load_demands] - * field. If a given key is absent from this map, the corresponding capacity - * is considered to be limitless. - * @type float $cost_per_hour - * Vehicle costs: all costs add up and must be in the same unit as - * [Shipment.penalty_cost][google.cloud.optimization.v1.Shipment.penalty_cost]. - * Cost per hour of the vehicle route. This cost is applied to the total time - * taken by the route, and includes travel time, waiting time, and visit time. - * Using `cost_per_hour` instead of just `cost_per_traveled_hour` may result - * in additional latency. - * @type float $cost_per_traveled_hour - * Cost per traveled hour of the vehicle route. This cost is applied only to - * travel time taken by the route (i.e., that reported in - * [ShipmentRoute.transitions][google.cloud.optimization.v1.ShipmentRoute.transitions]), - * and excludes waiting time and visit time. - * @type float $cost_per_kilometer - * Cost per kilometer of the vehicle route. This cost is applied to the - * distance reported in the - * [ShipmentRoute.transitions][google.cloud.optimization.v1.ShipmentRoute.transitions] - * and does not apply to any distance implicitly traveled from the - * `arrival_location` to the `departure_location` of a single `VisitRequest`. - * @type float $fixed_cost - * Fixed cost applied if this vehicle is used to handle a shipment. - * @type bool $used_if_route_is_empty - * This field only applies to vehicles when their route does not serve any - * shipments. It indicates if the vehicle should be considered as used or not - * in this case. - * If true, the vehicle goes from its start to its end location even if it - * doesn't serve any shipments, and time and distance costs resulting from its - * start --> end travel are taken into account. - * Otherwise, it doesn't travel from its start to its end location, and no - * `break_rule` or delay (from `TransitionAttributes`) are scheduled for this - * vehicle. In this case, the vehicle's `ShipmentRoute` doesn't contain any - * information except for the vehicle index and label. - * @type \Google\Cloud\Optimization\V1\Vehicle\DurationLimit $route_duration_limit - * Limit applied to the total duration of the vehicle's route. In a given - * `OptimizeToursResponse`, the route duration of a vehicle is the - * difference between its `vehicle_end_time` and `vehicle_start_time`. - * @type \Google\Cloud\Optimization\V1\Vehicle\DurationLimit $travel_duration_limit - * Limit applied to the travel duration of the vehicle's route. In a given - * `OptimizeToursResponse`, the route travel duration is the sum of all its - * [transitions.travel_duration][google.cloud.optimization.v1.ShipmentRoute.Transition.travel_duration]. - * @type \Google\Cloud\Optimization\V1\DistanceLimit $route_distance_limit - * Limit applied to the total distance of the vehicle's route. In a given - * `OptimizeToursResponse`, the route distance is the sum of all its - * [transitions.travel_distance_meters][google.cloud.optimization.v1.ShipmentRoute.Transition.travel_distance_meters]. - * @type array|\Google\Protobuf\Internal\MapField $extra_visit_duration_for_visit_type - * Specifies a map from visit_types strings to durations. The duration is time - * in addition to - * [VisitRequest.duration][google.cloud.optimization.v1.Shipment.VisitRequest.duration] - * to be taken at visits with the specified `visit_types`. This extra visit - * duration adds cost if `cost_per_hour` is specified. Keys (i.e. - * `visit_types`) cannot be empty strings. - * If a visit request has multiple types, a duration will be added for each - * type in the map. - * @type \Google\Cloud\Optimization\V1\BreakRule $break_rule - * Describes the break schedule to be enforced on this vehicle. - * If empty, no breaks will be scheduled for this vehicle. - * @type string $label - * Specifies a label for this vehicle. This label is reported in the response - * as the `vehicle_label` of the corresponding - * [ShipmentRoute][google.cloud.optimization.v1.ShipmentRoute]. - * @type bool $ignore - * If true, `used_if_route_is_empty` must be false, and this vehicle will - * remain unused. - * If a shipment is performed by an ignored vehicle in - * `injected_first_solution_routes`, it is skipped in the first solution but - * is free to be performed in the response. - * If a shipment is performed by an ignored vehicle in - * `injected_solution_constraint` and any related pickup/delivery is - * constrained to remain on the vehicle (i.e., not relaxed to level - * `RELAX_ALL_AFTER_THRESHOLD`), it is skipped in the response. - * If a shipment has a non-empty `allowed_vehicle_indices` field and all of - * the allowed vehicles are ignored, it is skipped in the response. - * @type array|\Google\Protobuf\Internal\RepeatedField $break_rule_indices - * Deprecated: No longer used. - * Indices in the `break_rule` field in the source - * [ShipmentModel][google.cloud.optimization.v1.ShipmentModel]. They - * correspond to break rules enforced on the vehicle. - * As of 2018/03, at most one rule index per vehicle can be specified. - * @type array<\Google\Cloud\Optimization\V1\CapacityQuantity>|\Google\Protobuf\Internal\RepeatedField $capacities - * Deprecated: Use - * [Vehicle.load_limits][google.cloud.optimization.v1.Vehicle.load_limits] - * instead. - * @type array<\Google\Cloud\Optimization\V1\CapacityQuantityInterval>|\Google\Protobuf\Internal\RepeatedField $start_load_intervals - * Deprecated: Use - * [Vehicle.LoadLimit.start_load_interval][google.cloud.optimization.v1.Vehicle.LoadLimit.start_load_interval] - * instead. - * @type array<\Google\Cloud\Optimization\V1\CapacityQuantityInterval>|\Google\Protobuf\Internal\RepeatedField $end_load_intervals - * Deprecated: Use - * [Vehicle.LoadLimit.end_load_interval][google.cloud.optimization.v1.Vehicle.LoadLimit.end_load_interval] - * instead. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); - parent::__construct($data); - } - - /** - * The travel mode which affects the roads usable by the vehicle and its - * speed. See also `travel_duration_multiple`. - * - * Generated from protobuf field .google.cloud.optimization.v1.Vehicle.TravelMode travel_mode = 1; - * @return int - */ - public function getTravelMode() - { - return $this->travel_mode; - } - - /** - * The travel mode which affects the roads usable by the vehicle and its - * speed. See also `travel_duration_multiple`. - * - * Generated from protobuf field .google.cloud.optimization.v1.Vehicle.TravelMode travel_mode = 1; - * @param int $var - * @return $this - */ - public function setTravelMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Optimization\V1\Vehicle\TravelMode::class); - $this->travel_mode = $var; - - return $this; - } - - /** - * Optional. A set of conditions to satisfy that affect the way routes are - * calculated for the given vehicle. - * - * Generated from protobuf field .google.cloud.optimization.v1.RouteModifiers route_modifiers = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Optimization\V1\RouteModifiers|null - */ - public function getRouteModifiers() - { - return $this->route_modifiers; - } - - public function hasRouteModifiers() - { - return isset($this->route_modifiers); - } - - public function clearRouteModifiers() - { - unset($this->route_modifiers); - } - - /** - * Optional. A set of conditions to satisfy that affect the way routes are - * calculated for the given vehicle. - * - * Generated from protobuf field .google.cloud.optimization.v1.RouteModifiers route_modifiers = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Optimization\V1\RouteModifiers $var - * @return $this - */ - public function setRouteModifiers($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Optimization\V1\RouteModifiers::class); - $this->route_modifiers = $var; - - return $this; - } - - /** - * Geographic location where the vehicle starts before picking up any - * shipments. If not specified, the vehicle starts at its first pickup. - * If the shipment model has duration and distance matrices, `start_location` - * must not be specified. - * - * Generated from protobuf field .google.type.LatLng start_location = 3; - * @return \Google\Type\LatLng|null - */ - public function getStartLocation() - { - return $this->start_location; - } - - public function hasStartLocation() - { - return isset($this->start_location); - } - - public function clearStartLocation() - { - unset($this->start_location); - } - - /** - * Geographic location where the vehicle starts before picking up any - * shipments. If not specified, the vehicle starts at its first pickup. - * If the shipment model has duration and distance matrices, `start_location` - * must not be specified. - * - * Generated from protobuf field .google.type.LatLng start_location = 3; - * @param \Google\Type\LatLng $var - * @return $this - */ - public function setStartLocation($var) - { - GPBUtil::checkMessage($var, \Google\Type\LatLng::class); - $this->start_location = $var; - - return $this; - } - - /** - * Waypoint representing a geographic location where the vehicle starts before - * picking up any shipments. If neither `start_waypoint` nor `start_location` - * is specified, the vehicle starts at its first pickup. - * If the shipment model has duration and distance matrices, `start_waypoint` - * must not be specified. - * - * Generated from protobuf field .google.cloud.optimization.v1.Waypoint start_waypoint = 4; - * @return \Google\Cloud\Optimization\V1\Waypoint|null - */ - public function getStartWaypoint() - { - return $this->start_waypoint; - } - - public function hasStartWaypoint() - { - return isset($this->start_waypoint); - } - - public function clearStartWaypoint() - { - unset($this->start_waypoint); - } - - /** - * Waypoint representing a geographic location where the vehicle starts before - * picking up any shipments. If neither `start_waypoint` nor `start_location` - * is specified, the vehicle starts at its first pickup. - * If the shipment model has duration and distance matrices, `start_waypoint` - * must not be specified. - * - * Generated from protobuf field .google.cloud.optimization.v1.Waypoint start_waypoint = 4; - * @param \Google\Cloud\Optimization\V1\Waypoint $var - * @return $this - */ - public function setStartWaypoint($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Optimization\V1\Waypoint::class); - $this->start_waypoint = $var; - - return $this; - } - - /** - * Geographic location where the vehicle ends after it has completed its last - * `VisitRequest`. If not specified the vehicle's `ShipmentRoute` ends - * immediately when it completes its last `VisitRequest`. - * If the shipment model has duration and distance matrices, `end_location` - * must not be specified. - * - * Generated from protobuf field .google.type.LatLng end_location = 5; - * @return \Google\Type\LatLng|null - */ - public function getEndLocation() - { - return $this->end_location; - } - - public function hasEndLocation() - { - return isset($this->end_location); - } - - public function clearEndLocation() - { - unset($this->end_location); - } - - /** - * Geographic location where the vehicle ends after it has completed its last - * `VisitRequest`. If not specified the vehicle's `ShipmentRoute` ends - * immediately when it completes its last `VisitRequest`. - * If the shipment model has duration and distance matrices, `end_location` - * must not be specified. - * - * Generated from protobuf field .google.type.LatLng end_location = 5; - * @param \Google\Type\LatLng $var - * @return $this - */ - public function setEndLocation($var) - { - GPBUtil::checkMessage($var, \Google\Type\LatLng::class); - $this->end_location = $var; - - return $this; - } - - /** - * Waypoint representing a geographic location where the vehicle ends after - * it has completed its last `VisitRequest`. If neither `end_waypoint` nor - * `end_location` is specified, the vehicle's `ShipmentRoute` ends immediately - * when it completes its last `VisitRequest`. - * If the shipment model has duration and distance matrices, `end_waypoint` - * must not be specified. - * - * Generated from protobuf field .google.cloud.optimization.v1.Waypoint end_waypoint = 6; - * @return \Google\Cloud\Optimization\V1\Waypoint|null - */ - public function getEndWaypoint() - { - return $this->end_waypoint; - } - - public function hasEndWaypoint() - { - return isset($this->end_waypoint); - } - - public function clearEndWaypoint() - { - unset($this->end_waypoint); - } - - /** - * Waypoint representing a geographic location where the vehicle ends after - * it has completed its last `VisitRequest`. If neither `end_waypoint` nor - * `end_location` is specified, the vehicle's `ShipmentRoute` ends immediately - * when it completes its last `VisitRequest`. - * If the shipment model has duration and distance matrices, `end_waypoint` - * must not be specified. - * - * Generated from protobuf field .google.cloud.optimization.v1.Waypoint end_waypoint = 6; - * @param \Google\Cloud\Optimization\V1\Waypoint $var - * @return $this - */ - public function setEndWaypoint($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Optimization\V1\Waypoint::class); - $this->end_waypoint = $var; - - return $this; - } - - /** - * Specifies tags attached to the start of the vehicle's route. - * Empty or duplicate strings are not allowed. - * - * Generated from protobuf field repeated string start_tags = 7; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getStartTags() - { - return $this->start_tags; - } - - /** - * Specifies tags attached to the start of the vehicle's route. - * Empty or duplicate strings are not allowed. - * - * Generated from protobuf field repeated string start_tags = 7; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setStartTags($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->start_tags = $arr; - - return $this; - } - - /** - * Specifies tags attached to the end of the vehicle's route. - * Empty or duplicate strings are not allowed. - * - * Generated from protobuf field repeated string end_tags = 8; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEndTags() - { - return $this->end_tags; - } - - /** - * Specifies tags attached to the end of the vehicle's route. - * Empty or duplicate strings are not allowed. - * - * Generated from protobuf field repeated string end_tags = 8; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEndTags($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->end_tags = $arr; - - return $this; - } - - /** - * Time windows during which the vehicle may depart its start location. - * They must be within the global time limits (see - * [ShipmentModel.global_*][google.cloud.optimization.v1.ShipmentModel.global_start_time] - * fields). If unspecified, there is no limitation besides those global time - * limits. - * Time windows belonging to the same repeated field must be disjoint, i.e. no - * time window can overlap with or be adjacent to another, and they must be in - * chronological order. - * `cost_per_hour_after_soft_end_time` and `soft_end_time` can only be set if - * there is a single time window. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.TimeWindow start_time_windows = 9; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getStartTimeWindows() - { - return $this->start_time_windows; - } - - /** - * Time windows during which the vehicle may depart its start location. - * They must be within the global time limits (see - * [ShipmentModel.global_*][google.cloud.optimization.v1.ShipmentModel.global_start_time] - * fields). If unspecified, there is no limitation besides those global time - * limits. - * Time windows belonging to the same repeated field must be disjoint, i.e. no - * time window can overlap with or be adjacent to another, and they must be in - * chronological order. - * `cost_per_hour_after_soft_end_time` and `soft_end_time` can only be set if - * there is a single time window. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.TimeWindow start_time_windows = 9; - * @param array<\Google\Cloud\Optimization\V1\TimeWindow>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setStartTimeWindows($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\TimeWindow::class); - $this->start_time_windows = $arr; - - return $this; - } - - /** - * Time windows during which the vehicle may arrive at its end location. - * They must be within the global time limits (see - * [ShipmentModel.global_*][google.cloud.optimization.v1.ShipmentModel.global_start_time] - * fields). If unspecified, there is no limitation besides those global time - * limits. - * Time windows belonging to the same repeated field must be disjoint, i.e. no - * time window can overlap with or be adjacent to another, and they must be in - * chronological order. - * `cost_per_hour_after_soft_end_time` and `soft_end_time` can only be set if - * there is a single time window. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.TimeWindow end_time_windows = 10; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEndTimeWindows() - { - return $this->end_time_windows; - } - - /** - * Time windows during which the vehicle may arrive at its end location. - * They must be within the global time limits (see - * [ShipmentModel.global_*][google.cloud.optimization.v1.ShipmentModel.global_start_time] - * fields). If unspecified, there is no limitation besides those global time - * limits. - * Time windows belonging to the same repeated field must be disjoint, i.e. no - * time window can overlap with or be adjacent to another, and they must be in - * chronological order. - * `cost_per_hour_after_soft_end_time` and `soft_end_time` can only be set if - * there is a single time window. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.TimeWindow end_time_windows = 10; - * @param array<\Google\Cloud\Optimization\V1\TimeWindow>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEndTimeWindows($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\TimeWindow::class); - $this->end_time_windows = $arr; - - return $this; - } - - /** - * Specifies a multiplicative factor that can be used to increase or decrease - * travel times of this vehicle. For example, setting this to 2.0 means - * that this vehicle is slower and has travel times that are twice what they - * are for standard vehicles. This multiple does not affect visit durations. - * It does affect cost if `cost_per_hour` or `cost_per_traveled_hour` are - * specified. This must be in the range [0.001, 1000.0]. If unset, the vehicle - * is standard, and this multiple is considered 1.0. - * WARNING: Travel times will be rounded to the nearest second after this - * multiple is applied but before performing any numerical operations, thus, - * a small multiple may result in a loss of precision. - * See also `extra_visit_duration_for_visit_type` below. - * - * Generated from protobuf field optional double travel_duration_multiple = 11; - * @return float - */ - public function getTravelDurationMultiple() - { - return isset($this->travel_duration_multiple) ? $this->travel_duration_multiple : 0.0; - } - - public function hasTravelDurationMultiple() - { - return isset($this->travel_duration_multiple); - } - - public function clearTravelDurationMultiple() - { - unset($this->travel_duration_multiple); - } - - /** - * Specifies a multiplicative factor that can be used to increase or decrease - * travel times of this vehicle. For example, setting this to 2.0 means - * that this vehicle is slower and has travel times that are twice what they - * are for standard vehicles. This multiple does not affect visit durations. - * It does affect cost if `cost_per_hour` or `cost_per_traveled_hour` are - * specified. This must be in the range [0.001, 1000.0]. If unset, the vehicle - * is standard, and this multiple is considered 1.0. - * WARNING: Travel times will be rounded to the nearest second after this - * multiple is applied but before performing any numerical operations, thus, - * a small multiple may result in a loss of precision. - * See also `extra_visit_duration_for_visit_type` below. - * - * Generated from protobuf field optional double travel_duration_multiple = 11; - * @param float $var - * @return $this - */ - public function setTravelDurationMultiple($var) - { - GPBUtil::checkDouble($var); - $this->travel_duration_multiple = $var; - - return $this; - } - - /** - * Unloading policy enforced on the vehicle. - * - * Generated from protobuf field .google.cloud.optimization.v1.Vehicle.UnloadingPolicy unloading_policy = 12; - * @return int - */ - public function getUnloadingPolicy() - { - return $this->unloading_policy; - } - - /** - * Unloading policy enforced on the vehicle. - * - * Generated from protobuf field .google.cloud.optimization.v1.Vehicle.UnloadingPolicy unloading_policy = 12; - * @param int $var - * @return $this - */ - public function setUnloadingPolicy($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Optimization\V1\Vehicle\UnloadingPolicy::class); - $this->unloading_policy = $var; - - return $this; - } - - /** - * Capacities of the vehicle (weight, volume, # of pallets for example). - * The keys in the map are the identifiers of the type of load, consistent - * with the keys of the - * [Shipment.load_demands][google.cloud.optimization.v1.Shipment.load_demands] - * field. If a given key is absent from this map, the corresponding capacity - * is considered to be limitless. - * - * Generated from protobuf field map load_limits = 30; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLoadLimits() - { - return $this->load_limits; - } - - /** - * Capacities of the vehicle (weight, volume, # of pallets for example). - * The keys in the map are the identifiers of the type of load, consistent - * with the keys of the - * [Shipment.load_demands][google.cloud.optimization.v1.Shipment.load_demands] - * field. If a given key is absent from this map, the corresponding capacity - * is considered to be limitless. - * - * Generated from protobuf field map load_limits = 30; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLoadLimits($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\Vehicle\LoadLimit::class); - $this->load_limits = $arr; - - return $this; - } - - /** - * Vehicle costs: all costs add up and must be in the same unit as - * [Shipment.penalty_cost][google.cloud.optimization.v1.Shipment.penalty_cost]. - * Cost per hour of the vehicle route. This cost is applied to the total time - * taken by the route, and includes travel time, waiting time, and visit time. - * Using `cost_per_hour` instead of just `cost_per_traveled_hour` may result - * in additional latency. - * - * Generated from protobuf field double cost_per_hour = 16; - * @return float - */ - public function getCostPerHour() - { - return $this->cost_per_hour; - } - - /** - * Vehicle costs: all costs add up and must be in the same unit as - * [Shipment.penalty_cost][google.cloud.optimization.v1.Shipment.penalty_cost]. - * Cost per hour of the vehicle route. This cost is applied to the total time - * taken by the route, and includes travel time, waiting time, and visit time. - * Using `cost_per_hour` instead of just `cost_per_traveled_hour` may result - * in additional latency. - * - * Generated from protobuf field double cost_per_hour = 16; - * @param float $var - * @return $this - */ - public function setCostPerHour($var) - { - GPBUtil::checkDouble($var); - $this->cost_per_hour = $var; - - return $this; - } - - /** - * Cost per traveled hour of the vehicle route. This cost is applied only to - * travel time taken by the route (i.e., that reported in - * [ShipmentRoute.transitions][google.cloud.optimization.v1.ShipmentRoute.transitions]), - * and excludes waiting time and visit time. - * - * Generated from protobuf field double cost_per_traveled_hour = 17; - * @return float - */ - public function getCostPerTraveledHour() - { - return $this->cost_per_traveled_hour; - } - - /** - * Cost per traveled hour of the vehicle route. This cost is applied only to - * travel time taken by the route (i.e., that reported in - * [ShipmentRoute.transitions][google.cloud.optimization.v1.ShipmentRoute.transitions]), - * and excludes waiting time and visit time. - * - * Generated from protobuf field double cost_per_traveled_hour = 17; - * @param float $var - * @return $this - */ - public function setCostPerTraveledHour($var) - { - GPBUtil::checkDouble($var); - $this->cost_per_traveled_hour = $var; - - return $this; - } - - /** - * Cost per kilometer of the vehicle route. This cost is applied to the - * distance reported in the - * [ShipmentRoute.transitions][google.cloud.optimization.v1.ShipmentRoute.transitions] - * and does not apply to any distance implicitly traveled from the - * `arrival_location` to the `departure_location` of a single `VisitRequest`. - * - * Generated from protobuf field double cost_per_kilometer = 18; - * @return float - */ - public function getCostPerKilometer() - { - return $this->cost_per_kilometer; - } - - /** - * Cost per kilometer of the vehicle route. This cost is applied to the - * distance reported in the - * [ShipmentRoute.transitions][google.cloud.optimization.v1.ShipmentRoute.transitions] - * and does not apply to any distance implicitly traveled from the - * `arrival_location` to the `departure_location` of a single `VisitRequest`. - * - * Generated from protobuf field double cost_per_kilometer = 18; - * @param float $var - * @return $this - */ - public function setCostPerKilometer($var) - { - GPBUtil::checkDouble($var); - $this->cost_per_kilometer = $var; - - return $this; - } - - /** - * Fixed cost applied if this vehicle is used to handle a shipment. - * - * Generated from protobuf field double fixed_cost = 19; - * @return float - */ - public function getFixedCost() - { - return $this->fixed_cost; - } - - /** - * Fixed cost applied if this vehicle is used to handle a shipment. - * - * Generated from protobuf field double fixed_cost = 19; - * @param float $var - * @return $this - */ - public function setFixedCost($var) - { - GPBUtil::checkDouble($var); - $this->fixed_cost = $var; - - return $this; - } - - /** - * This field only applies to vehicles when their route does not serve any - * shipments. It indicates if the vehicle should be considered as used or not - * in this case. - * If true, the vehicle goes from its start to its end location even if it - * doesn't serve any shipments, and time and distance costs resulting from its - * start --> end travel are taken into account. - * Otherwise, it doesn't travel from its start to its end location, and no - * `break_rule` or delay (from `TransitionAttributes`) are scheduled for this - * vehicle. In this case, the vehicle's `ShipmentRoute` doesn't contain any - * information except for the vehicle index and label. - * - * Generated from protobuf field bool used_if_route_is_empty = 20; - * @return bool - */ - public function getUsedIfRouteIsEmpty() - { - return $this->used_if_route_is_empty; - } - - /** - * This field only applies to vehicles when their route does not serve any - * shipments. It indicates if the vehicle should be considered as used or not - * in this case. - * If true, the vehicle goes from its start to its end location even if it - * doesn't serve any shipments, and time and distance costs resulting from its - * start --> end travel are taken into account. - * Otherwise, it doesn't travel from its start to its end location, and no - * `break_rule` or delay (from `TransitionAttributes`) are scheduled for this - * vehicle. In this case, the vehicle's `ShipmentRoute` doesn't contain any - * information except for the vehicle index and label. - * - * Generated from protobuf field bool used_if_route_is_empty = 20; - * @param bool $var - * @return $this - */ - public function setUsedIfRouteIsEmpty($var) - { - GPBUtil::checkBool($var); - $this->used_if_route_is_empty = $var; - - return $this; - } - - /** - * Limit applied to the total duration of the vehicle's route. In a given - * `OptimizeToursResponse`, the route duration of a vehicle is the - * difference between its `vehicle_end_time` and `vehicle_start_time`. - * - * Generated from protobuf field .google.cloud.optimization.v1.Vehicle.DurationLimit route_duration_limit = 21; - * @return \Google\Cloud\Optimization\V1\Vehicle\DurationLimit|null - */ - public function getRouteDurationLimit() - { - return $this->route_duration_limit; - } - - public function hasRouteDurationLimit() - { - return isset($this->route_duration_limit); - } - - public function clearRouteDurationLimit() - { - unset($this->route_duration_limit); - } - - /** - * Limit applied to the total duration of the vehicle's route. In a given - * `OptimizeToursResponse`, the route duration of a vehicle is the - * difference between its `vehicle_end_time` and `vehicle_start_time`. - * - * Generated from protobuf field .google.cloud.optimization.v1.Vehicle.DurationLimit route_duration_limit = 21; - * @param \Google\Cloud\Optimization\V1\Vehicle\DurationLimit $var - * @return $this - */ - public function setRouteDurationLimit($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Optimization\V1\Vehicle\DurationLimit::class); - $this->route_duration_limit = $var; - - return $this; - } - - /** - * Limit applied to the travel duration of the vehicle's route. In a given - * `OptimizeToursResponse`, the route travel duration is the sum of all its - * [transitions.travel_duration][google.cloud.optimization.v1.ShipmentRoute.Transition.travel_duration]. - * - * Generated from protobuf field .google.cloud.optimization.v1.Vehicle.DurationLimit travel_duration_limit = 22; - * @return \Google\Cloud\Optimization\V1\Vehicle\DurationLimit|null - */ - public function getTravelDurationLimit() - { - return $this->travel_duration_limit; - } - - public function hasTravelDurationLimit() - { - return isset($this->travel_duration_limit); - } - - public function clearTravelDurationLimit() - { - unset($this->travel_duration_limit); - } - - /** - * Limit applied to the travel duration of the vehicle's route. In a given - * `OptimizeToursResponse`, the route travel duration is the sum of all its - * [transitions.travel_duration][google.cloud.optimization.v1.ShipmentRoute.Transition.travel_duration]. - * - * Generated from protobuf field .google.cloud.optimization.v1.Vehicle.DurationLimit travel_duration_limit = 22; - * @param \Google\Cloud\Optimization\V1\Vehicle\DurationLimit $var - * @return $this - */ - public function setTravelDurationLimit($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Optimization\V1\Vehicle\DurationLimit::class); - $this->travel_duration_limit = $var; - - return $this; - } - - /** - * Limit applied to the total distance of the vehicle's route. In a given - * `OptimizeToursResponse`, the route distance is the sum of all its - * [transitions.travel_distance_meters][google.cloud.optimization.v1.ShipmentRoute.Transition.travel_distance_meters]. - * - * Generated from protobuf field .google.cloud.optimization.v1.DistanceLimit route_distance_limit = 23; - * @return \Google\Cloud\Optimization\V1\DistanceLimit|null - */ - public function getRouteDistanceLimit() - { - return $this->route_distance_limit; - } - - public function hasRouteDistanceLimit() - { - return isset($this->route_distance_limit); - } - - public function clearRouteDistanceLimit() - { - unset($this->route_distance_limit); - } - - /** - * Limit applied to the total distance of the vehicle's route. In a given - * `OptimizeToursResponse`, the route distance is the sum of all its - * [transitions.travel_distance_meters][google.cloud.optimization.v1.ShipmentRoute.Transition.travel_distance_meters]. - * - * Generated from protobuf field .google.cloud.optimization.v1.DistanceLimit route_distance_limit = 23; - * @param \Google\Cloud\Optimization\V1\DistanceLimit $var - * @return $this - */ - public function setRouteDistanceLimit($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Optimization\V1\DistanceLimit::class); - $this->route_distance_limit = $var; - - return $this; - } - - /** - * Specifies a map from visit_types strings to durations. The duration is time - * in addition to - * [VisitRequest.duration][google.cloud.optimization.v1.Shipment.VisitRequest.duration] - * to be taken at visits with the specified `visit_types`. This extra visit - * duration adds cost if `cost_per_hour` is specified. Keys (i.e. - * `visit_types`) cannot be empty strings. - * If a visit request has multiple types, a duration will be added for each - * type in the map. - * - * Generated from protobuf field map extra_visit_duration_for_visit_type = 24; - * @return \Google\Protobuf\Internal\MapField - */ - public function getExtraVisitDurationForVisitType() - { - return $this->extra_visit_duration_for_visit_type; - } - - /** - * Specifies a map from visit_types strings to durations. The duration is time - * in addition to - * [VisitRequest.duration][google.cloud.optimization.v1.Shipment.VisitRequest.duration] - * to be taken at visits with the specified `visit_types`. This extra visit - * duration adds cost if `cost_per_hour` is specified. Keys (i.e. - * `visit_types`) cannot be empty strings. - * If a visit request has multiple types, a duration will be added for each - * type in the map. - * - * Generated from protobuf field map extra_visit_duration_for_visit_type = 24; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setExtraVisitDurationForVisitType($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Duration::class); - $this->extra_visit_duration_for_visit_type = $arr; - - return $this; - } - - /** - * Describes the break schedule to be enforced on this vehicle. - * If empty, no breaks will be scheduled for this vehicle. - * - * Generated from protobuf field .google.cloud.optimization.v1.BreakRule break_rule = 25; - * @return \Google\Cloud\Optimization\V1\BreakRule|null - */ - public function getBreakRule() - { - return $this->break_rule; - } - - public function hasBreakRule() - { - return isset($this->break_rule); - } - - public function clearBreakRule() - { - unset($this->break_rule); - } - - /** - * Describes the break schedule to be enforced on this vehicle. - * If empty, no breaks will be scheduled for this vehicle. - * - * Generated from protobuf field .google.cloud.optimization.v1.BreakRule break_rule = 25; - * @param \Google\Cloud\Optimization\V1\BreakRule $var - * @return $this - */ - public function setBreakRule($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Optimization\V1\BreakRule::class); - $this->break_rule = $var; - - return $this; - } - - /** - * Specifies a label for this vehicle. This label is reported in the response - * as the `vehicle_label` of the corresponding - * [ShipmentRoute][google.cloud.optimization.v1.ShipmentRoute]. - * - * Generated from protobuf field string label = 27; - * @return string - */ - public function getLabel() - { - return $this->label; - } - - /** - * Specifies a label for this vehicle. This label is reported in the response - * as the `vehicle_label` of the corresponding - * [ShipmentRoute][google.cloud.optimization.v1.ShipmentRoute]. - * - * Generated from protobuf field string label = 27; - * @param string $var - * @return $this - */ - public function setLabel($var) - { - GPBUtil::checkString($var, True); - $this->label = $var; - - return $this; - } - - /** - * If true, `used_if_route_is_empty` must be false, and this vehicle will - * remain unused. - * If a shipment is performed by an ignored vehicle in - * `injected_first_solution_routes`, it is skipped in the first solution but - * is free to be performed in the response. - * If a shipment is performed by an ignored vehicle in - * `injected_solution_constraint` and any related pickup/delivery is - * constrained to remain on the vehicle (i.e., not relaxed to level - * `RELAX_ALL_AFTER_THRESHOLD`), it is skipped in the response. - * If a shipment has a non-empty `allowed_vehicle_indices` field and all of - * the allowed vehicles are ignored, it is skipped in the response. - * - * Generated from protobuf field bool ignore = 28; - * @return bool - */ - public function getIgnore() - { - return $this->ignore; - } - - /** - * If true, `used_if_route_is_empty` must be false, and this vehicle will - * remain unused. - * If a shipment is performed by an ignored vehicle in - * `injected_first_solution_routes`, it is skipped in the first solution but - * is free to be performed in the response. - * If a shipment is performed by an ignored vehicle in - * `injected_solution_constraint` and any related pickup/delivery is - * constrained to remain on the vehicle (i.e., not relaxed to level - * `RELAX_ALL_AFTER_THRESHOLD`), it is skipped in the response. - * If a shipment has a non-empty `allowed_vehicle_indices` field and all of - * the allowed vehicles are ignored, it is skipped in the response. - * - * Generated from protobuf field bool ignore = 28; - * @param bool $var - * @return $this - */ - public function setIgnore($var) - { - GPBUtil::checkBool($var); - $this->ignore = $var; - - return $this; - } - - /** - * Deprecated: No longer used. - * Indices in the `break_rule` field in the source - * [ShipmentModel][google.cloud.optimization.v1.ShipmentModel]. They - * correspond to break rules enforced on the vehicle. - * As of 2018/03, at most one rule index per vehicle can be specified. - * - * Generated from protobuf field repeated int32 break_rule_indices = 29 [deprecated = true]; - * @return \Google\Protobuf\Internal\RepeatedField - * @deprecated - */ - public function getBreakRuleIndices() - { - @trigger_error('break_rule_indices is deprecated.', E_USER_DEPRECATED); - return $this->break_rule_indices; - } - - /** - * Deprecated: No longer used. - * Indices in the `break_rule` field in the source - * [ShipmentModel][google.cloud.optimization.v1.ShipmentModel]. They - * correspond to break rules enforced on the vehicle. - * As of 2018/03, at most one rule index per vehicle can be specified. - * - * Generated from protobuf field repeated int32 break_rule_indices = 29 [deprecated = true]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - * @deprecated - */ - public function setBreakRuleIndices($var) - { - @trigger_error('break_rule_indices is deprecated.', E_USER_DEPRECATED); - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); - $this->break_rule_indices = $arr; - - return $this; - } - - /** - * Deprecated: Use - * [Vehicle.load_limits][google.cloud.optimization.v1.Vehicle.load_limits] - * instead. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.CapacityQuantity capacities = 13 [deprecated = true]; - * @return \Google\Protobuf\Internal\RepeatedField - * @deprecated - */ - public function getCapacities() - { - @trigger_error('capacities is deprecated.', E_USER_DEPRECATED); - return $this->capacities; - } - - /** - * Deprecated: Use - * [Vehicle.load_limits][google.cloud.optimization.v1.Vehicle.load_limits] - * instead. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.CapacityQuantity capacities = 13 [deprecated = true]; - * @param array<\Google\Cloud\Optimization\V1\CapacityQuantity>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - * @deprecated - */ - public function setCapacities($var) - { - @trigger_error('capacities is deprecated.', E_USER_DEPRECATED); - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\CapacityQuantity::class); - $this->capacities = $arr; - - return $this; - } - - /** - * Deprecated: Use - * [Vehicle.LoadLimit.start_load_interval][google.cloud.optimization.v1.Vehicle.LoadLimit.start_load_interval] - * instead. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.CapacityQuantityInterval start_load_intervals = 14 [deprecated = true]; - * @return \Google\Protobuf\Internal\RepeatedField - * @deprecated - */ - public function getStartLoadIntervals() - { - @trigger_error('start_load_intervals is deprecated.', E_USER_DEPRECATED); - return $this->start_load_intervals; - } - - /** - * Deprecated: Use - * [Vehicle.LoadLimit.start_load_interval][google.cloud.optimization.v1.Vehicle.LoadLimit.start_load_interval] - * instead. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.CapacityQuantityInterval start_load_intervals = 14 [deprecated = true]; - * @param array<\Google\Cloud\Optimization\V1\CapacityQuantityInterval>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - * @deprecated - */ - public function setStartLoadIntervals($var) - { - @trigger_error('start_load_intervals is deprecated.', E_USER_DEPRECATED); - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\CapacityQuantityInterval::class); - $this->start_load_intervals = $arr; - - return $this; - } - - /** - * Deprecated: Use - * [Vehicle.LoadLimit.end_load_interval][google.cloud.optimization.v1.Vehicle.LoadLimit.end_load_interval] - * instead. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.CapacityQuantityInterval end_load_intervals = 15 [deprecated = true]; - * @return \Google\Protobuf\Internal\RepeatedField - * @deprecated - */ - public function getEndLoadIntervals() - { - @trigger_error('end_load_intervals is deprecated.', E_USER_DEPRECATED); - return $this->end_load_intervals; - } - - /** - * Deprecated: Use - * [Vehicle.LoadLimit.end_load_interval][google.cloud.optimization.v1.Vehicle.LoadLimit.end_load_interval] - * instead. - * - * Generated from protobuf field repeated .google.cloud.optimization.v1.CapacityQuantityInterval end_load_intervals = 15 [deprecated = true]; - * @param array<\Google\Cloud\Optimization\V1\CapacityQuantityInterval>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - * @deprecated - */ - public function setEndLoadIntervals($var) - { - @trigger_error('end_load_intervals is deprecated.', E_USER_DEPRECATED); - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Optimization\V1\CapacityQuantityInterval::class); - $this->end_load_intervals = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/Vehicle/DurationLimit.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/Vehicle/DurationLimit.php deleted file mode 100644 index 0bfb4a37982b..000000000000 --- a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/Vehicle/DurationLimit.php +++ /dev/null @@ -1,359 +0,0 @@ -google.cloud.optimization.v1.Vehicle.DurationLimit - */ -class DurationLimit extends \Google\Protobuf\Internal\Message -{ - /** - * A hard limit constraining the duration to be at most max_duration. - * - * Generated from protobuf field .google.protobuf.Duration max_duration = 1; - */ - protected $max_duration = null; - /** - * A soft limit not enforcing a maximum duration limit, but when violated - * makes the route incur a cost. This cost adds up to other costs defined in - * the model, with the same unit. - * If defined, `soft_max_duration` must be nonnegative. If max_duration is - * also defined, `soft_max_duration` must be less than max_duration. - * - * Generated from protobuf field .google.protobuf.Duration soft_max_duration = 2; - */ - protected $soft_max_duration = null; - /** - * Cost per hour incurred if the `soft_max_duration` threshold is violated. - * The additional cost is 0 if the duration is under the threshold, - * otherwise the cost depends on the duration as follows: - * ``` - * cost_per_hour_after_soft_max * (duration - soft_max_duration) - * ``` - * The cost must be nonnegative. - * - * Generated from protobuf field optional double cost_per_hour_after_soft_max = 3; - */ - protected $cost_per_hour_after_soft_max = null; - /** - * A soft limit not enforcing a maximum duration limit, but when violated - * makes the route incur a cost, quadratic in the duration. This cost adds - * up to other costs defined in the model, with the same unit. - * If defined, `quadratic_soft_max_duration` must be nonnegative. If - * `max_duration` is also defined, `quadratic_soft_max_duration` must be - * less than `max_duration`, and the difference must be no larger than one - * day: - * `max_duration - quadratic_soft_max_duration <= 86400 seconds` - * - * Generated from protobuf field .google.protobuf.Duration quadratic_soft_max_duration = 4; - */ - protected $quadratic_soft_max_duration = null; - /** - * Cost per square hour incurred if the - * `quadratic_soft_max_duration` threshold is violated. - * The additional cost is 0 if the duration is under the threshold, - * otherwise the cost depends on the duration as follows: - * ``` - * cost_per_square_hour_after_quadratic_soft_max * - * (duration - quadratic_soft_max_duration)^2 - * ``` - * The cost must be nonnegative. - * - * Generated from protobuf field optional double cost_per_square_hour_after_quadratic_soft_max = 5; - */ - protected $cost_per_square_hour_after_quadratic_soft_max = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Duration $max_duration - * A hard limit constraining the duration to be at most max_duration. - * @type \Google\Protobuf\Duration $soft_max_duration - * A soft limit not enforcing a maximum duration limit, but when violated - * makes the route incur a cost. This cost adds up to other costs defined in - * the model, with the same unit. - * If defined, `soft_max_duration` must be nonnegative. If max_duration is - * also defined, `soft_max_duration` must be less than max_duration. - * @type float $cost_per_hour_after_soft_max - * Cost per hour incurred if the `soft_max_duration` threshold is violated. - * The additional cost is 0 if the duration is under the threshold, - * otherwise the cost depends on the duration as follows: - * ``` - * cost_per_hour_after_soft_max * (duration - soft_max_duration) - * ``` - * The cost must be nonnegative. - * @type \Google\Protobuf\Duration $quadratic_soft_max_duration - * A soft limit not enforcing a maximum duration limit, but when violated - * makes the route incur a cost, quadratic in the duration. This cost adds - * up to other costs defined in the model, with the same unit. - * If defined, `quadratic_soft_max_duration` must be nonnegative. If - * `max_duration` is also defined, `quadratic_soft_max_duration` must be - * less than `max_duration`, and the difference must be no larger than one - * day: - * `max_duration - quadratic_soft_max_duration <= 86400 seconds` - * @type float $cost_per_square_hour_after_quadratic_soft_max - * Cost per square hour incurred if the - * `quadratic_soft_max_duration` threshold is violated. - * The additional cost is 0 if the duration is under the threshold, - * otherwise the cost depends on the duration as follows: - * ``` - * cost_per_square_hour_after_quadratic_soft_max * - * (duration - quadratic_soft_max_duration)^2 - * ``` - * The cost must be nonnegative. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); - parent::__construct($data); - } - - /** - * A hard limit constraining the duration to be at most max_duration. - * - * Generated from protobuf field .google.protobuf.Duration max_duration = 1; - * @return \Google\Protobuf\Duration|null - */ - public function getMaxDuration() - { - return $this->max_duration; - } - - public function hasMaxDuration() - { - return isset($this->max_duration); - } - - public function clearMaxDuration() - { - unset($this->max_duration); - } - - /** - * A hard limit constraining the duration to be at most max_duration. - * - * Generated from protobuf field .google.protobuf.Duration max_duration = 1; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setMaxDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->max_duration = $var; - - return $this; - } - - /** - * A soft limit not enforcing a maximum duration limit, but when violated - * makes the route incur a cost. This cost adds up to other costs defined in - * the model, with the same unit. - * If defined, `soft_max_duration` must be nonnegative. If max_duration is - * also defined, `soft_max_duration` must be less than max_duration. - * - * Generated from protobuf field .google.protobuf.Duration soft_max_duration = 2; - * @return \Google\Protobuf\Duration|null - */ - public function getSoftMaxDuration() - { - return $this->soft_max_duration; - } - - public function hasSoftMaxDuration() - { - return isset($this->soft_max_duration); - } - - public function clearSoftMaxDuration() - { - unset($this->soft_max_duration); - } - - /** - * A soft limit not enforcing a maximum duration limit, but when violated - * makes the route incur a cost. This cost adds up to other costs defined in - * the model, with the same unit. - * If defined, `soft_max_duration` must be nonnegative. If max_duration is - * also defined, `soft_max_duration` must be less than max_duration. - * - * Generated from protobuf field .google.protobuf.Duration soft_max_duration = 2; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setSoftMaxDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->soft_max_duration = $var; - - return $this; - } - - /** - * Cost per hour incurred if the `soft_max_duration` threshold is violated. - * The additional cost is 0 if the duration is under the threshold, - * otherwise the cost depends on the duration as follows: - * ``` - * cost_per_hour_after_soft_max * (duration - soft_max_duration) - * ``` - * The cost must be nonnegative. - * - * Generated from protobuf field optional double cost_per_hour_after_soft_max = 3; - * @return float - */ - public function getCostPerHourAfterSoftMax() - { - return isset($this->cost_per_hour_after_soft_max) ? $this->cost_per_hour_after_soft_max : 0.0; - } - - public function hasCostPerHourAfterSoftMax() - { - return isset($this->cost_per_hour_after_soft_max); - } - - public function clearCostPerHourAfterSoftMax() - { - unset($this->cost_per_hour_after_soft_max); - } - - /** - * Cost per hour incurred if the `soft_max_duration` threshold is violated. - * The additional cost is 0 if the duration is under the threshold, - * otherwise the cost depends on the duration as follows: - * ``` - * cost_per_hour_after_soft_max * (duration - soft_max_duration) - * ``` - * The cost must be nonnegative. - * - * Generated from protobuf field optional double cost_per_hour_after_soft_max = 3; - * @param float $var - * @return $this - */ - public function setCostPerHourAfterSoftMax($var) - { - GPBUtil::checkDouble($var); - $this->cost_per_hour_after_soft_max = $var; - - return $this; - } - - /** - * A soft limit not enforcing a maximum duration limit, but when violated - * makes the route incur a cost, quadratic in the duration. This cost adds - * up to other costs defined in the model, with the same unit. - * If defined, `quadratic_soft_max_duration` must be nonnegative. If - * `max_duration` is also defined, `quadratic_soft_max_duration` must be - * less than `max_duration`, and the difference must be no larger than one - * day: - * `max_duration - quadratic_soft_max_duration <= 86400 seconds` - * - * Generated from protobuf field .google.protobuf.Duration quadratic_soft_max_duration = 4; - * @return \Google\Protobuf\Duration|null - */ - public function getQuadraticSoftMaxDuration() - { - return $this->quadratic_soft_max_duration; - } - - public function hasQuadraticSoftMaxDuration() - { - return isset($this->quadratic_soft_max_duration); - } - - public function clearQuadraticSoftMaxDuration() - { - unset($this->quadratic_soft_max_duration); - } - - /** - * A soft limit not enforcing a maximum duration limit, but when violated - * makes the route incur a cost, quadratic in the duration. This cost adds - * up to other costs defined in the model, with the same unit. - * If defined, `quadratic_soft_max_duration` must be nonnegative. If - * `max_duration` is also defined, `quadratic_soft_max_duration` must be - * less than `max_duration`, and the difference must be no larger than one - * day: - * `max_duration - quadratic_soft_max_duration <= 86400 seconds` - * - * Generated from protobuf field .google.protobuf.Duration quadratic_soft_max_duration = 4; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setQuadraticSoftMaxDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->quadratic_soft_max_duration = $var; - - return $this; - } - - /** - * Cost per square hour incurred if the - * `quadratic_soft_max_duration` threshold is violated. - * The additional cost is 0 if the duration is under the threshold, - * otherwise the cost depends on the duration as follows: - * ``` - * cost_per_square_hour_after_quadratic_soft_max * - * (duration - quadratic_soft_max_duration)^2 - * ``` - * The cost must be nonnegative. - * - * Generated from protobuf field optional double cost_per_square_hour_after_quadratic_soft_max = 5; - * @return float - */ - public function getCostPerSquareHourAfterQuadraticSoftMax() - { - return isset($this->cost_per_square_hour_after_quadratic_soft_max) ? $this->cost_per_square_hour_after_quadratic_soft_max : 0.0; - } - - public function hasCostPerSquareHourAfterQuadraticSoftMax() - { - return isset($this->cost_per_square_hour_after_quadratic_soft_max); - } - - public function clearCostPerSquareHourAfterQuadraticSoftMax() - { - unset($this->cost_per_square_hour_after_quadratic_soft_max); - } - - /** - * Cost per square hour incurred if the - * `quadratic_soft_max_duration` threshold is violated. - * The additional cost is 0 if the duration is under the threshold, - * otherwise the cost depends on the duration as follows: - * ``` - * cost_per_square_hour_after_quadratic_soft_max * - * (duration - quadratic_soft_max_duration)^2 - * ``` - * The cost must be nonnegative. - * - * Generated from protobuf field optional double cost_per_square_hour_after_quadratic_soft_max = 5; - * @param float $var - * @return $this - */ - public function setCostPerSquareHourAfterQuadraticSoftMax($var) - { - GPBUtil::checkDouble($var); - $this->cost_per_square_hour_after_quadratic_soft_max = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DurationLimit::class, \Google\Cloud\Optimization\V1\Vehicle_DurationLimit::class); - diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/Vehicle/LoadLimit.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/Vehicle/LoadLimit.php deleted file mode 100644 index 6f2a88d5ecac..000000000000 --- a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/Vehicle/LoadLimit.php +++ /dev/null @@ -1,270 +0,0 @@ -google.cloud.optimization.v1.Vehicle.LoadLimit - */ -class LoadLimit extends \Google\Protobuf\Internal\Message -{ - /** - * The maximum acceptable amount of load. - * - * Generated from protobuf field optional int64 max_load = 1; - */ - protected $max_load = null; - /** - * A soft limit of the load. See - * [cost_per_unit_above_soft_max][google.cloud.optimization.v1.Vehicle.LoadLimit.cost_per_unit_above_soft_max]. - * - * Generated from protobuf field int64 soft_max_load = 2; - */ - protected $soft_max_load = 0; - /** - * If the load ever exceeds - * [soft_max_load][google.cloud.optimization.v1.Vehicle.LoadLimit.soft_max_load] - * along this vehicle's route, the following cost penalty applies (only once - * per vehicle): (load - - * [soft_max_load][google.cloud.optimization.v1.Vehicle.LoadLimit.soft_max_load]) - * * [cost_per_unit_above_soft_max][google.cloud.optimization.v1.Vehicle.LoadLimit.cost_per_unit_above_soft_max]. All costs - * add up and must be in the same unit as - * [Shipment.penalty_cost][google.cloud.optimization.v1.Shipment.penalty_cost]. - * - * Generated from protobuf field double cost_per_unit_above_soft_max = 3; - */ - protected $cost_per_unit_above_soft_max = 0.0; - /** - * The acceptable load interval of the vehicle at the start of the route. - * - * Generated from protobuf field .google.cloud.optimization.v1.Vehicle.LoadLimit.Interval start_load_interval = 4; - */ - protected $start_load_interval = null; - /** - * The acceptable load interval of the vehicle at the end of the route. - * - * Generated from protobuf field .google.cloud.optimization.v1.Vehicle.LoadLimit.Interval end_load_interval = 5; - */ - protected $end_load_interval = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $max_load - * The maximum acceptable amount of load. - * @type int|string $soft_max_load - * A soft limit of the load. See - * [cost_per_unit_above_soft_max][google.cloud.optimization.v1.Vehicle.LoadLimit.cost_per_unit_above_soft_max]. - * @type float $cost_per_unit_above_soft_max - * If the load ever exceeds - * [soft_max_load][google.cloud.optimization.v1.Vehicle.LoadLimit.soft_max_load] - * along this vehicle's route, the following cost penalty applies (only once - * per vehicle): (load - - * [soft_max_load][google.cloud.optimization.v1.Vehicle.LoadLimit.soft_max_load]) - * * [cost_per_unit_above_soft_max][google.cloud.optimization.v1.Vehicle.LoadLimit.cost_per_unit_above_soft_max]. All costs - * add up and must be in the same unit as - * [Shipment.penalty_cost][google.cloud.optimization.v1.Shipment.penalty_cost]. - * @type \Google\Cloud\Optimization\V1\Vehicle\LoadLimit\Interval $start_load_interval - * The acceptable load interval of the vehicle at the start of the route. - * @type \Google\Cloud\Optimization\V1\Vehicle\LoadLimit\Interval $end_load_interval - * The acceptable load interval of the vehicle at the end of the route. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); - parent::__construct($data); - } - - /** - * The maximum acceptable amount of load. - * - * Generated from protobuf field optional int64 max_load = 1; - * @return int|string - */ - public function getMaxLoad() - { - return isset($this->max_load) ? $this->max_load : 0; - } - - public function hasMaxLoad() - { - return isset($this->max_load); - } - - public function clearMaxLoad() - { - unset($this->max_load); - } - - /** - * The maximum acceptable amount of load. - * - * Generated from protobuf field optional int64 max_load = 1; - * @param int|string $var - * @return $this - */ - public function setMaxLoad($var) - { - GPBUtil::checkInt64($var); - $this->max_load = $var; - - return $this; - } - - /** - * A soft limit of the load. See - * [cost_per_unit_above_soft_max][google.cloud.optimization.v1.Vehicle.LoadLimit.cost_per_unit_above_soft_max]. - * - * Generated from protobuf field int64 soft_max_load = 2; - * @return int|string - */ - public function getSoftMaxLoad() - { - return $this->soft_max_load; - } - - /** - * A soft limit of the load. See - * [cost_per_unit_above_soft_max][google.cloud.optimization.v1.Vehicle.LoadLimit.cost_per_unit_above_soft_max]. - * - * Generated from protobuf field int64 soft_max_load = 2; - * @param int|string $var - * @return $this - */ - public function setSoftMaxLoad($var) - { - GPBUtil::checkInt64($var); - $this->soft_max_load = $var; - - return $this; - } - - /** - * If the load ever exceeds - * [soft_max_load][google.cloud.optimization.v1.Vehicle.LoadLimit.soft_max_load] - * along this vehicle's route, the following cost penalty applies (only once - * per vehicle): (load - - * [soft_max_load][google.cloud.optimization.v1.Vehicle.LoadLimit.soft_max_load]) - * * [cost_per_unit_above_soft_max][google.cloud.optimization.v1.Vehicle.LoadLimit.cost_per_unit_above_soft_max]. All costs - * add up and must be in the same unit as - * [Shipment.penalty_cost][google.cloud.optimization.v1.Shipment.penalty_cost]. - * - * Generated from protobuf field double cost_per_unit_above_soft_max = 3; - * @return float - */ - public function getCostPerUnitAboveSoftMax() - { - return $this->cost_per_unit_above_soft_max; - } - - /** - * If the load ever exceeds - * [soft_max_load][google.cloud.optimization.v1.Vehicle.LoadLimit.soft_max_load] - * along this vehicle's route, the following cost penalty applies (only once - * per vehicle): (load - - * [soft_max_load][google.cloud.optimization.v1.Vehicle.LoadLimit.soft_max_load]) - * * [cost_per_unit_above_soft_max][google.cloud.optimization.v1.Vehicle.LoadLimit.cost_per_unit_above_soft_max]. All costs - * add up and must be in the same unit as - * [Shipment.penalty_cost][google.cloud.optimization.v1.Shipment.penalty_cost]. - * - * Generated from protobuf field double cost_per_unit_above_soft_max = 3; - * @param float $var - * @return $this - */ - public function setCostPerUnitAboveSoftMax($var) - { - GPBUtil::checkDouble($var); - $this->cost_per_unit_above_soft_max = $var; - - return $this; - } - - /** - * The acceptable load interval of the vehicle at the start of the route. - * - * Generated from protobuf field .google.cloud.optimization.v1.Vehicle.LoadLimit.Interval start_load_interval = 4; - * @return \Google\Cloud\Optimization\V1\Vehicle\LoadLimit\Interval|null - */ - public function getStartLoadInterval() - { - return $this->start_load_interval; - } - - public function hasStartLoadInterval() - { - return isset($this->start_load_interval); - } - - public function clearStartLoadInterval() - { - unset($this->start_load_interval); - } - - /** - * The acceptable load interval of the vehicle at the start of the route. - * - * Generated from protobuf field .google.cloud.optimization.v1.Vehicle.LoadLimit.Interval start_load_interval = 4; - * @param \Google\Cloud\Optimization\V1\Vehicle\LoadLimit\Interval $var - * @return $this - */ - public function setStartLoadInterval($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Optimization\V1\Vehicle\LoadLimit\Interval::class); - $this->start_load_interval = $var; - - return $this; - } - - /** - * The acceptable load interval of the vehicle at the end of the route. - * - * Generated from protobuf field .google.cloud.optimization.v1.Vehicle.LoadLimit.Interval end_load_interval = 5; - * @return \Google\Cloud\Optimization\V1\Vehicle\LoadLimit\Interval|null - */ - public function getEndLoadInterval() - { - return $this->end_load_interval; - } - - public function hasEndLoadInterval() - { - return isset($this->end_load_interval); - } - - public function clearEndLoadInterval() - { - unset($this->end_load_interval); - } - - /** - * The acceptable load interval of the vehicle at the end of the route. - * - * Generated from protobuf field .google.cloud.optimization.v1.Vehicle.LoadLimit.Interval end_load_interval = 5; - * @param \Google\Cloud\Optimization\V1\Vehicle\LoadLimit\Interval $var - * @return $this - */ - public function setEndLoadInterval($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Optimization\V1\Vehicle\LoadLimit\Interval::class); - $this->end_load_interval = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(LoadLimit::class, \Google\Cloud\Optimization\V1\Vehicle_LoadLimit::class); - diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/Vehicle/LoadLimit/Interval.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/Vehicle/LoadLimit/Interval.php deleted file mode 100644 index 18061c0b196f..000000000000 --- a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/Vehicle/LoadLimit/Interval.php +++ /dev/null @@ -1,150 +0,0 @@ -google.cloud.optimization.v1.Vehicle.LoadLimit.Interval - */ -class Interval extends \Google\Protobuf\Internal\Message -{ - /** - * A minimum acceptable load. Must be ≥ 0. - * If they're both specified, - * [min][google.cloud.optimization.v1.Vehicle.LoadLimit.Interval.min] must - * be ≤ - * [max][google.cloud.optimization.v1.Vehicle.LoadLimit.Interval.max]. - * - * Generated from protobuf field int64 min = 1; - */ - protected $min = 0; - /** - * A maximum acceptable load. Must be ≥ 0. If unspecified, the maximum - * load is unrestricted by this message. - * If they're both specified, - * [min][google.cloud.optimization.v1.Vehicle.LoadLimit.Interval.min] must - * be ≤ - * [max][google.cloud.optimization.v1.Vehicle.LoadLimit.Interval.max]. - * - * Generated from protobuf field optional int64 max = 2; - */ - protected $max = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $min - * A minimum acceptable load. Must be ≥ 0. - * If they're both specified, - * [min][google.cloud.optimization.v1.Vehicle.LoadLimit.Interval.min] must - * be ≤ - * [max][google.cloud.optimization.v1.Vehicle.LoadLimit.Interval.max]. - * @type int|string $max - * A maximum acceptable load. Must be ≥ 0. If unspecified, the maximum - * load is unrestricted by this message. - * If they're both specified, - * [min][google.cloud.optimization.v1.Vehicle.LoadLimit.Interval.min] must - * be ≤ - * [max][google.cloud.optimization.v1.Vehicle.LoadLimit.Interval.max]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); - parent::__construct($data); - } - - /** - * A minimum acceptable load. Must be ≥ 0. - * If they're both specified, - * [min][google.cloud.optimization.v1.Vehicle.LoadLimit.Interval.min] must - * be ≤ - * [max][google.cloud.optimization.v1.Vehicle.LoadLimit.Interval.max]. - * - * Generated from protobuf field int64 min = 1; - * @return int|string - */ - public function getMin() - { - return $this->min; - } - - /** - * A minimum acceptable load. Must be ≥ 0. - * If they're both specified, - * [min][google.cloud.optimization.v1.Vehicle.LoadLimit.Interval.min] must - * be ≤ - * [max][google.cloud.optimization.v1.Vehicle.LoadLimit.Interval.max]. - * - * Generated from protobuf field int64 min = 1; - * @param int|string $var - * @return $this - */ - public function setMin($var) - { - GPBUtil::checkInt64($var); - $this->min = $var; - - return $this; - } - - /** - * A maximum acceptable load. Must be ≥ 0. If unspecified, the maximum - * load is unrestricted by this message. - * If they're both specified, - * [min][google.cloud.optimization.v1.Vehicle.LoadLimit.Interval.min] must - * be ≤ - * [max][google.cloud.optimization.v1.Vehicle.LoadLimit.Interval.max]. - * - * Generated from protobuf field optional int64 max = 2; - * @return int|string - */ - public function getMax() - { - return isset($this->max) ? $this->max : 0; - } - - public function hasMax() - { - return isset($this->max); - } - - public function clearMax() - { - unset($this->max); - } - - /** - * A maximum acceptable load. Must be ≥ 0. If unspecified, the maximum - * load is unrestricted by this message. - * If they're both specified, - * [min][google.cloud.optimization.v1.Vehicle.LoadLimit.Interval.min] must - * be ≤ - * [max][google.cloud.optimization.v1.Vehicle.LoadLimit.Interval.max]. - * - * Generated from protobuf field optional int64 max = 2; - * @param int|string $var - * @return $this - */ - public function setMax($var) - { - GPBUtil::checkInt64($var); - $this->max = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Interval::class, \Google\Cloud\Optimization\V1\Vehicle_LoadLimit_Interval::class); - diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/Vehicle/TravelMode.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/Vehicle/TravelMode.php deleted file mode 100644 index 122a2cee877e..000000000000 --- a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/Vehicle/TravelMode.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.optimization.v1.Vehicle.TravelMode - */ -class TravelMode -{ - /** - * Unspecified travel mode, equivalent to `DRIVING`. - * - * Generated from protobuf enum TRAVEL_MODE_UNSPECIFIED = 0; - */ - const TRAVEL_MODE_UNSPECIFIED = 0; - /** - * Travel mode corresponding to driving directions (car, ...). - * - * Generated from protobuf enum DRIVING = 1; - */ - const DRIVING = 1; - /** - * Travel mode corresponding to walking directions. - * - * Generated from protobuf enum WALKING = 2; - */ - const WALKING = 2; - - private static $valueToName = [ - self::TRAVEL_MODE_UNSPECIFIED => 'TRAVEL_MODE_UNSPECIFIED', - self::DRIVING => 'DRIVING', - self::WALKING => 'WALKING', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(TravelMode::class, \Google\Cloud\Optimization\V1\Vehicle_TravelMode::class); - diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/Vehicle/UnloadingPolicy.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/Vehicle/UnloadingPolicy.php deleted file mode 100644 index eaee7ca2ca7c..000000000000 --- a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/Vehicle/UnloadingPolicy.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.optimization.v1.Vehicle.UnloadingPolicy - */ -class UnloadingPolicy -{ - /** - * Unspecified unloading policy; deliveries must just occur after their - * corresponding pickups. - * - * Generated from protobuf enum UNLOADING_POLICY_UNSPECIFIED = 0; - */ - const UNLOADING_POLICY_UNSPECIFIED = 0; - /** - * Deliveries must occur in reverse order of pickups - * - * Generated from protobuf enum LAST_IN_FIRST_OUT = 1; - */ - const LAST_IN_FIRST_OUT = 1; - /** - * Deliveries must occur in the same order as pickups - * - * Generated from protobuf enum FIRST_IN_FIRST_OUT = 2; - */ - const FIRST_IN_FIRST_OUT = 2; - - private static $valueToName = [ - self::UNLOADING_POLICY_UNSPECIFIED => 'UNLOADING_POLICY_UNSPECIFIED', - self::LAST_IN_FIRST_OUT => 'LAST_IN_FIRST_OUT', - self::FIRST_IN_FIRST_OUT => 'FIRST_IN_FIRST_OUT', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(UnloadingPolicy::class, \Google\Cloud\Optimization\V1\Vehicle_UnloadingPolicy::class); - diff --git a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/Waypoint.php b/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/Waypoint.php deleted file mode 100644 index 3c51fbabc2fe..000000000000 --- a/owl-bot-staging/Optimization/v1/proto/src/Google/Cloud/Optimization/V1/Waypoint.php +++ /dev/null @@ -1,166 +0,0 @@ -google.cloud.optimization.v1.Waypoint - */ -class Waypoint extends \Google\Protobuf\Internal\Message -{ - /** - * Indicates that the location of this waypoint is meant to have a preference - * for the vehicle to stop at a particular side of road. When you set this - * value, the route will pass through the location so that the vehicle can - * stop at the side of road that the location is biased towards from the - * center of the road. This option works only for the 'DRIVING' travel mode, - * and when the 'location_type' is set to 'location'. - * - * Generated from protobuf field bool side_of_road = 3; - */ - protected $side_of_road = false; - protected $location_type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Optimization\V1\Location $location - * A point specified using geographic coordinates, including an optional - * heading. - * @type string $place_id - * The POI Place ID associated with the waypoint. - * @type bool $side_of_road - * Indicates that the location of this waypoint is meant to have a preference - * for the vehicle to stop at a particular side of road. When you set this - * value, the route will pass through the location so that the vehicle can - * stop at the side of road that the location is biased towards from the - * center of the road. This option works only for the 'DRIVING' travel mode, - * and when the 'location_type' is set to 'location'. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Optimization\V1\FleetRouting::initOnce(); - parent::__construct($data); - } - - /** - * A point specified using geographic coordinates, including an optional - * heading. - * - * Generated from protobuf field .google.cloud.optimization.v1.Location location = 1; - * @return \Google\Cloud\Optimization\V1\Location|null - */ - public function getLocation() - { - return $this->readOneof(1); - } - - public function hasLocation() - { - return $this->hasOneof(1); - } - - /** - * A point specified using geographic coordinates, including an optional - * heading. - * - * Generated from protobuf field .google.cloud.optimization.v1.Location location = 1; - * @param \Google\Cloud\Optimization\V1\Location $var - * @return $this - */ - public function setLocation($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Optimization\V1\Location::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * The POI Place ID associated with the waypoint. - * - * Generated from protobuf field string place_id = 2; - * @return string - */ - public function getPlaceId() - { - return $this->readOneof(2); - } - - public function hasPlaceId() - { - return $this->hasOneof(2); - } - - /** - * The POI Place ID associated with the waypoint. - * - * Generated from protobuf field string place_id = 2; - * @param string $var - * @return $this - */ - public function setPlaceId($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Indicates that the location of this waypoint is meant to have a preference - * for the vehicle to stop at a particular side of road. When you set this - * value, the route will pass through the location so that the vehicle can - * stop at the side of road that the location is biased towards from the - * center of the road. This option works only for the 'DRIVING' travel mode, - * and when the 'location_type' is set to 'location'. - * - * Generated from protobuf field bool side_of_road = 3; - * @return bool - */ - public function getSideOfRoad() - { - return $this->side_of_road; - } - - /** - * Indicates that the location of this waypoint is meant to have a preference - * for the vehicle to stop at a particular side of road. When you set this - * value, the route will pass through the location so that the vehicle can - * stop at the side of road that the location is biased towards from the - * center of the road. This option works only for the 'DRIVING' travel mode, - * and when the 'location_type' is set to 'location'. - * - * Generated from protobuf field bool side_of_road = 3; - * @param bool $var - * @return $this - */ - public function setSideOfRoad($var) - { - GPBUtil::checkBool($var); - $this->side_of_road = $var; - - return $this; - } - - /** - * @return string - */ - public function getLocationType() - { - return $this->whichOneof("location_type"); - } - -} - diff --git a/owl-bot-staging/Optimization/v1/samples/V1/FleetRoutingClient/batch_optimize_tours.php b/owl-bot-staging/Optimization/v1/samples/V1/FleetRoutingClient/batch_optimize_tours.php deleted file mode 100644 index 83ea8a5c60c2..000000000000 --- a/owl-bot-staging/Optimization/v1/samples/V1/FleetRoutingClient/batch_optimize_tours.php +++ /dev/null @@ -1,105 +0,0 @@ -setInputConfig($modelConfigsInputConfig) - ->setOutputConfig($modelConfigsOutputConfig); - $modelConfigs = [$asyncModelConfig,]; - $request = (new BatchOptimizeToursRequest()) - ->setParent($parent) - ->setModelConfigs($modelConfigs); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $fleetRoutingClient->batchOptimizeTours($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var BatchOptimizeToursResponse $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $parent = '[PARENT]'; - - batch_optimize_tours_sample($parent); -} -// [END cloudoptimization_v1_generated_FleetRouting_BatchOptimizeTours_sync] diff --git a/owl-bot-staging/Optimization/v1/samples/V1/FleetRoutingClient/optimize_tours.php b/owl-bot-staging/Optimization/v1/samples/V1/FleetRoutingClient/optimize_tours.php deleted file mode 100644 index 331506093b2d..000000000000 --- a/owl-bot-staging/Optimization/v1/samples/V1/FleetRoutingClient/optimize_tours.php +++ /dev/null @@ -1,87 +0,0 @@ -setParent($parent); - - // Call the API and handle any network failures. - try { - /** @var OptimizeToursResponse $response */ - $response = $fleetRoutingClient->optimizeTours($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $parent = '[PARENT]'; - - optimize_tours_sample($parent); -} -// [END cloudoptimization_v1_generated_FleetRouting_OptimizeTours_sync] diff --git a/owl-bot-staging/Optimization/v1/src/V1/Client/FleetRoutingClient.php b/owl-bot-staging/Optimization/v1/src/V1/Client/FleetRoutingClient.php deleted file mode 100644 index 5f73931e2f21..000000000000 --- a/owl-bot-staging/Optimization/v1/src/V1/Client/FleetRoutingClient.php +++ /dev/null @@ -1,314 +0,0 @@ - batchOptimizeToursAsync(BatchOptimizeToursRequest $request, array $optionalArgs = []) - * @method PromiseInterface optimizeToursAsync(OptimizeToursRequest $request, array $optionalArgs = []) - */ -final class FleetRoutingClient -{ - use GapicClientTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.optimization.v1.FleetRouting'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'cloudoptimization.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'cloudoptimization.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/fleet_routing_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/fleet_routing_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/fleet_routing_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/fleet_routing_rest_client_config.php', - ], - ], - ]; - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Create the default operation client for the service. - * - * @param array $options ClientOptions for the client. - * - * @return OperationsClient - */ - private function createOperationsClient(array $options) - { - // Unset client-specific configuration options - unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); - - if (isset($options['operationsClient'])) { - return $options['operationsClient']; - } - - return new OperationsClient($options); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'cloudoptimization.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Optimizes vehicle tours for one or more `OptimizeToursRequest` - * messages as a batch. - * - * This method is a Long Running Operation (LRO). The inputs for optimization - * (`OptimizeToursRequest` messages) and outputs (`OptimizeToursResponse` - * messages) are read/written from/to Cloud Storage in user-specified - * format. Like the `OptimizeTours` method, each `OptimizeToursRequest` - * contains a `ShipmentModel` and returns an `OptimizeToursResponse` - * containing `ShipmentRoute`s, which are a set of routes to be performed by - * vehicles minimizing the overall cost. - * - * The async variant is {@see FleetRoutingClient::batchOptimizeToursAsync()} . - * - * @example samples/V1/FleetRoutingClient/batch_optimize_tours.php - * - * @param BatchOptimizeToursRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function batchOptimizeTours(BatchOptimizeToursRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('BatchOptimizeTours', $request, $callOptions)->wait(); - } - - /** - * Sends an `OptimizeToursRequest` containing a `ShipmentModel` and returns an - * `OptimizeToursResponse` containing `ShipmentRoute`s, which are a set of - * routes to be performed by vehicles minimizing the overall cost. - * - * A `ShipmentModel` model consists mainly of `Shipment`s that need to be - * carried out and `Vehicle`s that can be used to transport the `Shipment`s. - * The `ShipmentRoute`s assign `Shipment`s to `Vehicle`s. More specifically, - * they assign a series of `Visit`s to each vehicle, where a `Visit` - * corresponds to a `VisitRequest`, which is a pickup or delivery for a - * `Shipment`. - * - * The goal is to provide an assignment of `ShipmentRoute`s to `Vehicle`s that - * minimizes the total cost where cost has many components defined in the - * `ShipmentModel`. - * - * The async variant is {@see FleetRoutingClient::optimizeToursAsync()} . - * - * @example samples/V1/FleetRoutingClient/optimize_tours.php - * - * @param OptimizeToursRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OptimizeToursResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function optimizeTours(OptimizeToursRequest $request, array $callOptions = []): OptimizeToursResponse - { - return $this->startApiCall('OptimizeTours', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/Optimization/v1/src/V1/gapic_metadata.json b/owl-bot-staging/Optimization/v1/src/V1/gapic_metadata.json deleted file mode 100644 index 007133ea9599..000000000000 --- a/owl-bot-staging/Optimization/v1/src/V1/gapic_metadata.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.optimization.v1", - "libraryPackage": "Google\\Cloud\\Optimization\\V1", - "services": { - "FleetRouting": { - "clients": { - "grpc": { - "libraryClient": "FleetRoutingGapicClient", - "rpcs": { - "BatchOptimizeTours": { - "methods": [ - "batchOptimizeTours" - ] - }, - "OptimizeTours": { - "methods": [ - "optimizeTours" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/Optimization/v1/src/V1/resources/fleet_routing_client_config.json b/owl-bot-staging/Optimization/v1/src/V1/resources/fleet_routing_client_config.json deleted file mode 100644 index b86bf37650c5..000000000000 --- a/owl-bot-staging/Optimization/v1/src/V1/resources/fleet_routing_client_config.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "interfaces": { - "google.cloud.optimization.v1.FleetRouting": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE" - ], - "retry_policy_2_codes": [ - "UNAVAILABLE" - ] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "retry_policy_1_params": { - "initial_retry_delay_millis": 1000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 10000, - "initial_rpc_timeout_millis": 3600000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 3600000, - "total_timeout_millis": 3600000 - }, - "retry_policy_2_params": { - "initial_retry_delay_millis": 1000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 10000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": { - "BatchOptimizeTours": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_2_codes", - "retry_params_name": "retry_policy_2_params" - }, - "OptimizeTours": { - "timeout_millis": 3600000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/Optimization/v1/src/V1/resources/fleet_routing_descriptor_config.php b/owl-bot-staging/Optimization/v1/src/V1/resources/fleet_routing_descriptor_config.php deleted file mode 100644 index e640229844c2..000000000000 --- a/owl-bot-staging/Optimization/v1/src/V1/resources/fleet_routing_descriptor_config.php +++ /dev/null @@ -1,59 +0,0 @@ - [ - 'google.cloud.optimization.v1.FleetRouting' => [ - 'BatchOptimizeTours' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Optimization\V1\BatchOptimizeToursResponse', - 'metadataReturnType' => '\Google\Cloud\Optimization\V1\AsyncModelMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'OptimizeTours' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Optimization\V1\OptimizeToursResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - ], - ], -]; diff --git a/owl-bot-staging/Optimization/v1/src/V1/resources/fleet_routing_rest_client_config.php b/owl-bot-staging/Optimization/v1/src/V1/resources/fleet_routing_rest_client_config.php deleted file mode 100644 index 770f33a8d635..000000000000 --- a/owl-bot-staging/Optimization/v1/src/V1/resources/fleet_routing_rest_client_config.php +++ /dev/null @@ -1,86 +0,0 @@ - [ - 'google.cloud.optimization.v1.FleetRouting' => [ - 'BatchOptimizeTours' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}:batchOptimizeTours', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*}:batchOptimizeTours', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'OptimizeTours' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}:optimizeTours', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*}:optimizeTours', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/operations/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Optimization/v1/tests/Unit/V1/Client/FleetRoutingClientTest.php b/owl-bot-staging/Optimization/v1/tests/Unit/V1/Client/FleetRoutingClientTest.php deleted file mode 100644 index 7a8102d9d6c3..000000000000 --- a/owl-bot-staging/Optimization/v1/tests/Unit/V1/Client/FleetRoutingClientTest.php +++ /dev/null @@ -1,329 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return FleetRoutingClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new FleetRoutingClient($options); - } - - /** @test */ - public function batchOptimizeToursTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/batchOptimizeToursTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new BatchOptimizeToursResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/batchOptimizeToursTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $parent = 'parent-995424086'; - $modelConfigs = []; - $request = (new BatchOptimizeToursRequest()) - ->setParent($parent) - ->setModelConfigs($modelConfigs); - $response = $gapicClient->batchOptimizeTours($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.optimization.v1.FleetRouting/BatchOptimizeTours', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); - $actualValue = $actualApiRequestObject->getModelConfigs(); - $this->assertProtobufEquals($modelConfigs, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/batchOptimizeToursTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function batchOptimizeToursExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/batchOptimizeToursTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $parent = 'parent-995424086'; - $modelConfigs = []; - $request = (new BatchOptimizeToursRequest()) - ->setParent($parent) - ->setModelConfigs($modelConfigs); - $response = $gapicClient->batchOptimizeTours($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/batchOptimizeToursTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function optimizeToursTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $requestLabel = 'requestLabel1739091268'; - $totalCost = -7.0589032E7; - $expectedResponse = new OptimizeToursResponse(); - $expectedResponse->setRequestLabel($requestLabel); - $expectedResponse->setTotalCost($totalCost); - $transport->addResponse($expectedResponse); - // Mock request - $parent = 'parent-995424086'; - $request = (new OptimizeToursRequest()) - ->setParent($parent); - $response = $gapicClient->optimizeTours($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.optimization.v1.FleetRouting/OptimizeTours', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function optimizeToursExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $parent = 'parent-995424086'; - $request = (new OptimizeToursRequest()) - ->setParent($parent); - try { - $gapicClient->optimizeTours($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function batchOptimizeToursAsyncTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/batchOptimizeToursTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new BatchOptimizeToursResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/batchOptimizeToursTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $parent = 'parent-995424086'; - $modelConfigs = []; - $request = (new BatchOptimizeToursRequest()) - ->setParent($parent) - ->setModelConfigs($modelConfigs); - $response = $gapicClient->batchOptimizeToursAsync($request)->wait(); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.optimization.v1.FleetRouting/BatchOptimizeTours', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); - $actualValue = $actualApiRequestObject->getModelConfigs(); - $this->assertProtobufEquals($modelConfigs, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/batchOptimizeToursTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } -} diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/GPBMetadata/Google/Cloud/Oracledatabase/V1/AutonomousDatabase.php b/owl-bot-staging/OracleDatabase/v1/proto/src/GPBMetadata/Google/Cloud/Oracledatabase/V1/AutonomousDatabase.php deleted file mode 100644 index e15e0496296feadfd8e3c67ddfcf402552bd1c18..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 10121 zcmc&)OLN;+mTrocEnU4~TZZHpO*@J0Bvh>K=_E?h2}D8?6N+H?kXtEbP#_6PXoCP7 z0F`KZyqKz4%)jVWZ!$Hr=*|3xuIm5L>)y?FR`Z>E@sdb|PBc~Hjm3MKIh`o z&j%+1_Bgj|I;Lj?W;fS9%LON9Zs56r+i~q&d)VulUasTz2bOJmgy)cL$70Q<&ItV*fuvhwma-@xSr9m&8`s`ZNoP=PG4*o!@zaizB}~wXt}_NFyf zUewOPQwr>K>C~R-&bOOtDa&$m*I_A@7If0X4pA1}x<+EJG zV2vaNDIJxa!1Nr$J}Q}h$Fl~3>(v0dwRLO;v3zOe>9de5p|g6qr-H|=tq~?a%LU%h zOjFP0JTn-2&L^C2Lhw5N>u8Mll!0}$W0`h$+dMH&E!W%HN^X@Px$J1&4AuL_r!LXg zQPJ)9UFXfI$6_rFVVKay&p6t&U|50CAH4b5=GnkJDj8>P?>p0c^%Kt#J-632&c>hP zmh=8^tk6!BZZ|fI9r)JMSdpaGci10y*+)OusiX(uWP!V5;k-K*PG79Ag_wuGf{XN1GX`#Tf27FulMsefb79<~Bbqh)Z6k zjl$?PVE!Qvx3u*?$z_4^H$NR^p~4ZUPT-vhq#v>yjv3$vujE;NgSY>t zO#P3NV-G0Y4+AqK0weJYSlXxxXp(Wq>UuJZ?mZ>_ip_OA6DdR|J;@9F;_DHYk@^ed zBHSg3gY5eIY%ax>G{>^9%rl`nX@O0j8uri>D%+a+D6{qF%-@y&%&-qG*t3vs%;l&w zrLV!j@61l%Z~P(r>-C21c6eaHTJ-1ZRGNy?3AT+m$Hcko_4Av_Y7Dw5jV|W@>j}Fz z%2J|WlBNrBCKj8O*4aX+0=?r7oq)?=N@xw{*BK14?wR2x8Sb>$e8g^%sp~$nk8y13 zKC+!2wB>6PK#tq;=LtxO&2`&48HVi|!uA(8pGV5PB&HNf+b_ct#LJXqG6pPW7g^VJ zxQ{GuRwg0&F-a97L8}6%xH8G=#6W?7^sD=301pX0KO@~^OOAeiS6DiCsvNsH@T^lZ zTGQzcTtsHw8YEVokshG^ce`DEh>yMwZWOhWfNC_J2F&@tL5 zjO0Z?%?SSAV-EopDQqnCQUcv!^C)Xf$A?-GGUa7#EpF~zNvsutkaC~UoW@ohbv zJ!ALUM(5RVfL(CP;SjSew~Huo=F1-gH1x{%Sq>r`8n!<4P1+vgp|=5^A!%i$x7nIu z^OywS$S@*LUQOV>X7k3t{9f;(X10(T?qF+f^VdIJG77K=(wpEEaRo--H@q{Q*!a%2 zd~^oz44<*^PTQ^Q23vx1jI5_rC5+E!68pwCZ*Kt z2OgZ$m+u4B+-7kSgQKPeV-HQGAy5hS|B)@Fs0=;m=m973#Z^eOfJfk0+5H}F8<~`6 zc3fQcOpl5%`5~va7Ez1Sa8y(aH22wZ-|V|Mh<*)%J8t`O4kx+wW~Ha>E&>$Uqb*GL zcxZUtIFvmCq%a5RBlfNUGrGqj?h$*$lioLAr)2lG>jRn9w*vWbLPKZE;v_7^>9%o& zw)})M|1(4d10o!aVV{gx+;M~D!#l!9bx}aT!+Dvb57FrHTfdcX^e-89FTAtm8}I-R zejdt~N8YyqySRA}$@a3WIBG0O>MvACsHG5pJwzWxqO5enmPD*DdWeGDhmPLiWWT%; zS<0gg;7oZMLN1Y_b{)EMP&@F-R}g*5X3LsA0tmu|CY_7-gWf8+co89oSJ&2 z8*0F|4`f35I$NW1T9kX31NheQNkBQ5qSA9t?!!ssfH6c+4$r6fm)YFFq`1^ZMDpc# zlR)!|E#qL{@~Jq`ZS&N$<@Y$ntCd2v7-@xY#*TckT#?@gu`uX?7tidW-8CQ2^9p%zzq=QDe3BAb#tx&q15mR z4)9(iD;3$gV}2hXsH3(;i0ns)coX<30OvL*HG$ISY&Bi&wQ(;;bdk!NA^42lN+Uom zFOF}&(eb>&mZIPkHWpHj-76_gWm{>eIt@C@T2*gV8#T39-YKi4tr7@k&=Rh0 z*UQyi{ZMPwb?s$U4}pOG=!o69q@GMK6=)uO65ihF9QRT)comQAZly>bX@ zbL>W4-ECErI?#97+NFs~dXGJ=Xho%>m&y&LfxGKK@D5Jez^U zw=04#h?D=~Of9fkl9kxYO1K0u6zyM=Zn7o8jaVZL(`0YqVsiF+zQkq_Q+TGsIP11n zQ>*&ER=OxBP^_y;N!O}exm-&4`LbSas*rq(EnP?_r5s74 zSuYoxxD{7ut6Ep%m8pD{Eu~^LWd=f9S9bulhwH1Cu&T70+P=~(7l9R;fuLJT1#BL& zlzq4@9WSW9C}}=hn~S5fBO*j z1$dzjwM14>En$^wG_>uaRy%}!QLv~gwZz1eur@!((sUGCC8pS9Pl~b;^xF6X9D5^IOAA% z38|3W#ff!FcwIJk;`)K!bG^P1a2YOcPV5pU@vsM!I~=260Cg@}K~Z@aHrGqo`srK+ z{LPSS<_%_2lZZnV9G@WFWAnZ#s%T!g(#(Bv^Q$ZBxzG?ele+bUE%;{`d3_&=l4kgC zFu0s_n+8Xk7N*A}8Z)8RI-&8Am`3yI<>KboSG`xW(tw+%5DO_v(NH}egJzN57tYxl z20H6St=eeqBbo2kHRR~?@oUyO@%| zL9{9zqTk&&VmTtu}DJ@eV2#Mfbfm$}S zYrJiv-T2iZoB!)rd7)rQO{FjuU9k-`O?VJX=5->sPMX(^9k`~X84p}Zgg-L}u z^HrFASEKkzqdL4BooT(7*cCx=gE5RFydZt0^9SgeQtRQEI8eazMc@tuykPpr;Gb`^ z`RHk%hIte&5CzpbbueQZK5B|872(DW6sZ*y<)o3$I9UcG08y>!;)SI+5O&th2sQq#kVFnA=sf~&j0Dgl2 zTGa&gjC6Q3W3WDbgNbkT^Mn?NO>gP-KGgFiEa?06Zc#ezl-RE_~8{g%&Yz4o>JXC z&xVBO=h;?mx2}|k&`s)BA)jKAvImLxmJp~Y`ENg`t}&kO_~#~s)HR|pgYt2K2ISR1 z?rb*x|GLKKRmPIHT9QI(TYst5zp7|x3P)1CRzWuBskrn~qkB2!Hd5{07v1+W#QLl5y%lfFZ=t{BY|XVi(}c^I*(>+>)=KE m`hW`5U%nH6xAUI(Tr2f;7s3n*yD?vOaY*s~)ob>evHt}Yuuu~K diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/GPBMetadata/Google/Cloud/Oracledatabase/V1/AutonomousDatabaseCharacterSet.php b/owl-bot-staging/OracleDatabase/v1/proto/src/GPBMetadata/Google/Cloud/Oracledatabase/V1/AutonomousDatabaseCharacterSet.php deleted file mode 100644 index 7d1b0380150d0737d5944a2946a7f10355898c78..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1639 zcmb_c&2G~`7{o~hWd$hsRC);8v{C~CTPZiU1v!Zmf*_6(Qwe0r+BlnJ!S!19x>Bif z=LvWS9)+jiTyfw9kXZjVNz-s4m#kN_^L^j!>>R!FrXJXZZR}znF+769bI7I`dOl^; zrVbp2<1zN3O;0`IU|)i;sl%>rK&{y^cKFeNhQ5szIH7dnVA*zPIFhN4YzL1JLqil` z`K%_RkWrVO(lD^HZOfh_j$_!j0?eeiBmgct#es)x4BNf>JIqi7H`_70*@)OpeSzIP zsT~4fJ17XCnpbJ2wHsND0cPL=K>qW>p+jsKFvR%Z9tkYs5=M|izHkAK;TSmq=9Jg5 zK4zis9>#q~1haf)u8>moh}k088P)L=oe}CQ z%GFd?BsU%HYzAF-V9NU;y4MITCM zwe3e~9pn+&PiIK1SNXaD%IggzJ_H+)Keq%ZRPWY{Kh;gq1LA^@Eq3nVtpW!;IMAi_ z-AL=pN%Q74IBit1C~kxM3l+DDSvSQ>AC#64i4{<8yjJ^a!_fNHKr<}kLr=5bcLzPK z(P?$GX6crA4{SD7L#?X=tt3QWUDfF5UG;6Lp!^mt)n5WQS`srEjq4alJRRiqqllmR z^ZtZw7RVRrY9>3>=1-8id@ozh=7M6?6XsBqzwsNAWcKv&6=o&LL3ur({zm{6KGZ+1 zufDr}=r{m+!pAp>88a_%u_kmmBDsz{B^M?3hKI`=-wWk-9EDOGg_0geVK$_6Qu~ns z%rq?1w9FtTkIT!#PC}w6F^i%s(kRMFZFrks6QeKo^QZbOiJZBFx-p$%WRf8>FazK( Dp-VEd diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/GPBMetadata/Google/Cloud/Oracledatabase/V1/AutonomousDbBackup.php b/owl-bot-staging/OracleDatabase/v1/proto/src/GPBMetadata/Google/Cloud/Oracledatabase/V1/AutonomousDbBackup.php deleted file mode 100644 index 2d04a934634711619c2b9d633d217888bf79364c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2777 zcmbVOOK;mo5Uw7!o-tU z(@q&57FfJle-^nFa8`$`hcRl}wIH_%_j_#IJ0U*fJ>S`qaSMQp;Zy5|@)bR+wQDik zEU`1%w_IP-Mp=zOZZkb(QGf4jH7rNd!me`K^=|ek%lQ0jD=J#iG>0|X#YtNqW+ifb z3V$xZSN9$<}ZDCKZE*B(V8Ijh*_0*~_w74mE~! zQ&wTtv;xnj16_Jd#U2yN_W&5Z$9!(FAeTnL%w|db?~4wHeTzB!=>PUFSZZmhA zDF62q^dPr9*KUUw#|4BMq&*4 zyc_631?^@=f=8glf+!)OFgsFs2#dDWVa5P&HQmG;%EEb{i{&Y$0}CU$U~`t6N9p|L zxA#2_qhqEX3B0g!%P0?NuQaZP68^4fqvZyh$xfVx&LoM$qbx6!1 z<_2V#V}>S+cQbhbfJyp1G*a$n^aj#=;IZ5is?Tp$+C;c8hZV^5Y0s7; zyo~sgY7_Y`OvvIXE3kOfEH*3p@%~YxvQyiwRm$0qlv&8^99D|W+I}^gPyi;2JI&fj zC7TqIa;098k`yw}l>CQAX`!}Ttkv;(Qm7p_$|1m1eizarBxM=0&DV{q&K6*%wvX=i zD*Mf19sOk>y?b1*qqjMjt{?1I^=9R8FPkd;m4G~+%MVnj^k9q_qSXhdhP#c#oA1J^ z#uSe?#;JRCDZ|SI_p-}m>9x16zW62iuqrn(Rc>PHf!xGm22)QqevK7c(XJLPYq3fT zx3%}l$03NONfb@H45Mi$8|_Isp)Z~eZ~o82?PqLR5=YB2ZdjD0X1LB=zy-j+NPvC2 diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/GPBMetadata/Google/Cloud/Oracledatabase/V1/AutonomousDbVersion.php b/owl-bot-staging/OracleDatabase/v1/proto/src/GPBMetadata/Google/Cloud/Oracledatabase/V1/AutonomousDbVersion.php deleted file mode 100644 index 8b0e4dffb543..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/GPBMetadata/Google/Cloud/Oracledatabase/V1/AutonomousDbVersion.php +++ /dev/null @@ -1,36 +0,0 @@ -internalAddGeneratedFile( - ' -‹ -:google/cloud/oracledatabase/v1/autonomous_db_version.protogoogle.cloud.oracledatabase.v1google/api/resource.proto8google/cloud/oracledatabase/v1/autonomous_database.proto"Ú -AutonomousDbVersion -name ( BàA -version ( BàAD - db_workload (2*.google.cloud.oracledatabase.v1.DBWorkloadBàA - workload_uri ( BàA:¸êA´ -1oracledatabase.googleapis.com/AutonomousDbVersionTprojects/{project}/locations/{location}/autonomousDbVersions/{autonomous_db_version}*autonomousDbVersions2autonomousDbVersionBò -"com.google.cloud.oracledatabase.v1BAutonomousDbVersionProtoPZJcloud.google.com/go/oracledatabase/apiv1/oracledatabasepb;oracledatabasepbªGoogle.Cloud.OracleDatabase.V1ÊGoogle\\Cloud\\OracleDatabase\\V1ê!Google::Cloud::OracleDatabase::V1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/GPBMetadata/Google/Cloud/Oracledatabase/V1/Common.php b/owl-bot-staging/OracleDatabase/v1/proto/src/GPBMetadata/Google/Cloud/Oracledatabase/V1/Common.php deleted file mode 100644 index 8f8157a7009f..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/GPBMetadata/Google/Cloud/Oracledatabase/V1/Common.php +++ /dev/null @@ -1,30 +0,0 @@ -internalAddGeneratedFile( - ' -ä -+google/cloud/oracledatabase/v1/common.protogoogle.cloud.oracledatabase.v1"% -CustomerContact -email ( BàABå -"com.google.cloud.oracledatabase.v1B CommonProtoPZJcloud.google.com/go/oracledatabase/apiv1/oracledatabasepb;oracledatabasepbªGoogle.Cloud.OracleDatabase.V1ÊGoogle\\Cloud\\OracleDatabase\\V1ê!Google::Cloud::OracleDatabase::V1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/GPBMetadata/Google/Cloud/Oracledatabase/V1/DbNode.php b/owl-bot-staging/OracleDatabase/v1/proto/src/GPBMetadata/Google/Cloud/Oracledatabase/V1/DbNode.php deleted file mode 100644 index 6a60fe7e86573220b03afaf4061edbd342acf122..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1729 zcmb7E&2HO95H2N4mdB~95N+fBAlNttq7*4rxj+we-GZ`Yfk7e>mZC#JfZ)$cWDb*XTJGn_M7?k`{XKt`(!|4%3VPN z;yowgijssg!F(1GFPqIMCq7#wVMMt`NN+@jqY3Hv%*j0rOW zao3M%;0o7sQ`%m3+JWc9ETCEr3=q2unkKGK$-wG9rNWiI_8`Zw&n1REx`ts-JEs7C z_&Evrali7!MKI4x<033(?@A(JuK5oxNt^V z1xHCxlax@%S|7Edf@Wll_L48A)hggft4e^vYd^jO+Tgsx8RdLN96g zjBkv}Tk++0VOh8l1e-c9P!z2VGs*J-{MLX+@1h3vZsD!v+R?6SM_YD2{iH;5ld#Q8 zriGA>ey%{hkb`;~cBHBf6{58Ey4AmphH3(!-V(}1NYleAUhJQIrTup{t$@SlF5@JW zqW`MAG=5Rw_y)TI3yGx~j!3(tV%wPZN9v2T{h~ar+7a_nqAW(+`nW2_Wx6G(2&&><7-)p|7HsO|aIhvYdb2K!EgQlXs4|~ScFrOIRC;etc zy#ZlBFroZdqa3K97Cr!7(bDroTeUAz$MiOexR{8~jvCa{_1 zXxkqpc>o1V@#^gmGAvRS@9Vr3!D4xGKhd;KLfj*Qqp*w5(VS3b+htWH$#tQxasDbl z8KqnC&G#fPyc34YI*+6t7QLBhHFXYX?;6U)!`~0+MMKq8i zrm?gY$3-?&&V?S4K|EoIORWS_8(6}0zdW3IrSMnX3psb$q)6a$1Q#zhm*%~CaoqW< z3d|z6vNF|A8j!H;XVrWF01cAV3uqdPhU#WbH^6)Z?#$4Ix8hVCU2)-lguDS@HIrm@X9{W>XWj?*PRE_GW8nL&UkRr-!{zKV6$`9860=I$If=eybHG8oRo&DLie0wN252)EpSu+ zlSH-dKL*&5s{5Zhy0=%}yr3iF?T^_U7DFj@JEd3mx|FnB?dxh!{QawjUn`IMdaql0 zuUkXC*L(Tb!8&XISpeL8^XIF-fVgt^f2cgkNNiiP*!DV&ZJ)LM8*+{W{r1^%8@dF$nb^&W-wk8)~0linternalAddGeneratedFile( - ' -° -4google/cloud/oracledatabase/v1/db_system_shape.protogoogle.cloud.oracledatabase.v1google/api/resource.proto"Å - DbSystemShape -name ( BàA -shape ( BàA -min_node_count (BàA -max_node_count (BàA -min_storage_count (BàA -max_storage_count (BàA* -available_core_count_per_node (BàA) -available_memory_per_node_gb (BàA& -available_data_storage_tb (BàA$ -min_core_count_per_node - (BàA# -min_memory_per_node_gb (BàA, -min_db_node_storage_per_node_gb (BàA:šêA– -+oracledatabase.googleapis.com/DbSystemShapeHprojects/{project}/locations/{location}/dbSystemShapes/{db_system_shape}*dbSystemShapes2 dbSystemShapeBì -"com.google.cloud.oracledatabase.v1BDbSystemShapeProtoPZJcloud.google.com/go/oracledatabase/apiv1/oracledatabasepb;oracledatabasepbªGoogle.Cloud.OracleDatabase.V1ÊGoogle\\Cloud\\OracleDatabase\\V1ê!Google::Cloud::OracleDatabase::V1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/GPBMetadata/Google/Cloud/Oracledatabase/V1/Entitlement.php b/owl-bot-staging/OracleDatabase/v1/proto/src/GPBMetadata/Google/Cloud/Oracledatabase/V1/Entitlement.php deleted file mode 100644 index ca0d3439b8c4c862564ed545168126e307acd581..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1722 zcmb7ET~pIQ6eTS%xF`crw4lQ*m675{YT+%2PQNJiqwPTH1CyCdnr_?GG@IFM7?tU} zmuk- z!iY&M*!0?MM4?G~4z>_gAS_g2rCNu@Lb<-qOI_ko6REI6NXJ5H(;{9gO{ig7sAVvt zX}BnTnn@#@VP>Ho|0)6;0Ndyx*D*{4OSRlP#0)=QD+wGe@8f9IF&wRt*#*F~4A+Il z5gs@LkpCR7X<-w(%wYVpfn6Qjm|?@hpZUG^VB4@<#Op8SwmsWqnAp%SsM;nHI;;8Aa9Xso%@DN>ODiDPq}XAE)_AI_b`Tp9>PJ#r;jum(Zo^d2qpDtL zat|` z_7aB|&$e2_d+u{}q=udOeQtv9bKv>^%0gZXDik3kWn4(gX=ZgLL^K?nreU{%qLM%3 zU_PP?c?nGW8cRq}O5MoCe`n|9L$EA>b;C4?XEVLUb%!lC5#u@Y+dIm?PgjI2vq5bk zD3$Mng^0R!+)Bg;2gc!O~GZTQBOz zm7`iQU*0bl3yV|oT_9)k`RZ|{uJgyKzb#kZ@VGP?&*tmpMsYDF127w|@sY3hC=Wt zj?C>~>Wd_C&^rU2m=uZY>3*I+%K+~{;(56TU{${oHFpmz4^N50EyMz?68v0r$Z)PmyeDc@Ay=m=I&(RM{KPmJU0-xQWc(C2)$crWPS}2w9u79 zTOOon+?UT|>j8+Wipit_o+!8 z!l))U`!efL*>)^usg@x(y;h4lvTAj0-JniJmJ3z6QmxCyLaBZiU0us_RGO39men?B zRy8b7%UTXm4XP1Fn#85q-d2{rA^cxOH(L(L2zmgMbg63-mCF0Ioib$t(%2VFja|;v zsE#o;j<+5Is0MLex#%;NI3c_P8GmfAY3Qo#GQ#lBy6)m~I@5`vzr{~`BDaX)QY4tf zwmeg1x@F4Tp=zphZ zNKdz%TyFSPLz0VJ4{5NaSN6JKry9Ffw`-YKUwx3)x{kVFq-$T@x8ApDqd@vr>oujX zKG3ghnXGfZkJ$Rnr+To_c}*Ma>mC-w#$YG-zTAgDlCb^Zl_1^reKMkYGUL^g>20M} z15RS=Str;Zzlc%~FIf&N7dIgQ-wD8?{!qYK7G^pCtOWpu>C9?jIs@a%s1Zq7$2X*Z zibG0>V6-M()Uk@XrP2~yXi_9M7kw1T{S|qi|1$!Q&M3^!5Q@vqpj@&SXGCgZ zAU{%-x!HHY(`nYQRP48wiSNS4Q~w+|R}KghGFQfqgn?R4KVK8(^L@8d7aP;R0<2#g z`*1h8AT1T8GZ17`?HF_d$5kqDG3gMbF5#WVBzOWTuXR(iUZd8yjJHB1i0_|l5t;JP z^F%oMvHt*Ze$@DaTG)Pe8O>GlmpS5$LV%Kl{2gMC)M!+?3DcNf#dD10ECw%1J|->0 ztZI8fb|L)g2+w?%yita>L}-giSnXZfwVb{Zrgbhf4jcmjrhGoM#iVsu(VB{BX_EQhJ(O~bLp!olJU?8Xpw82Cuc7ec;L9}`}tM!5N?a}%s`<9m3}5^sbM;>oI~*B4y+Au>7OGI7nLI2 zf~BK+zFt&bRE}!J-O^sESXlf>T7)aTVu0x_;JS>+g{)=nU0zmiz`Qj45)E+wH^AuLjN;zMu)QgpTWw)r5Dhe*O ze^@*^TAWV*5{IRUej&B^=}B?gr`UZ&Z(P_eUzW}Zn#o2~8<6_RZrq0{kw6!lY;0p; zTM8H9Q%9!E2MZsG<r_uXKrmoRS=rgn6*jd5sUGkqGab>*I%sRcA;WEo^5 z<%?P2&A~E72$qLMshh4CeS#=9LB<=+`B*$M@Nm&Yznu}p=^m_2Y|d~iq)m7*Dv*;> zrBFRVkrelehea-#ajl|+cV8UUtK|_03U&$RE7j3g(e!gv^~hIBpTKG@U*G)}MXZ#o zg|oy7m_Do?9QgW2iC3x>C43Rx`6mKtJeMy?^v<3CJhqrsi@bd1Z&El6;+WI6&fZgT z0>Z26_;6%5AD?~kTlDt6xTE^BW2P$ZsDpV4Jp?p@TWoNR4IvG@$G(r=^+|F$ t5qvH;PLsinternalAddGeneratedFile( - ' -ž -/google/cloud/oracledatabase/v1/gi_version.protogoogle.cloud.oracledatabase.v1google/api/resource.proto"¼ - GiVersion -name ( BàA -version ( BàA:…êA -\'oracledatabase.googleapis.com/GiVersion?projects/{project}/locations/{location}/giVersions/{gi_version}* -giVersions2 giVersionBè -"com.google.cloud.oracledatabase.v1BGiVersionProtoPZJcloud.google.com/go/oracledatabase/apiv1/oracledatabasepb;oracledatabasepbªGoogle.Cloud.OracleDatabase.V1ÊGoogle\\Cloud\\OracleDatabase\\V1ê!Google::Cloud::OracleDatabase::V1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/GPBMetadata/Google/Cloud/Oracledatabase/V1/LocationMetadata.php b/owl-bot-staging/OracleDatabase/v1/proto/src/GPBMetadata/Google/Cloud/Oracledatabase/V1/LocationMetadata.php deleted file mode 100644 index 21f60a25d537..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/GPBMetadata/Google/Cloud/Oracledatabase/V1/LocationMetadata.php +++ /dev/null @@ -1,30 +0,0 @@ -internalAddGeneratedFile( - ' -… -6google/cloud/oracledatabase/v1/location_metadata.protogoogle.cloud.oracledatabase.v1"1 -LocationMetadata -gcp_oracle_zones ( BàABï -"com.google.cloud.oracledatabase.v1BLocationMetadataProtoPZJcloud.google.com/go/oracledatabase/apiv1/oracledatabasepb;oracledatabasepbªGoogle.Cloud.OracleDatabase.V1ÊGoogle\\Cloud\\OracleDatabase\\V1ê!Google::Cloud::OracleDatabase::V1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/GPBMetadata/Google/Cloud/Oracledatabase/V1/Oracledatabase.php b/owl-bot-staging/OracleDatabase/v1/proto/src/GPBMetadata/Google/Cloud/Oracledatabase/V1/Oracledatabase.php deleted file mode 100644 index 34be06d5bb94..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/GPBMetadata/Google/Cloud/Oracledatabase/V1/Oracledatabase.php +++ /dev/null @@ -1,236 +0,0 @@ -internalAddGeneratedFile( - ' -‰a -3google/cloud/oracledatabase/v1/oracledatabase.protogoogle.cloud.oracledatabase.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/field_info.protogoogle/api/resource.proto8google/cloud/oracledatabase/v1/autonomous_database.protoFgoogle/cloud/oracledatabase/v1/autonomous_database_character_set.proto9google/cloud/oracledatabase/v1/autonomous_db_backup.proto:google/cloud/oracledatabase/v1/autonomous_db_version.proto,google/cloud/oracledatabase/v1/db_node.proto.google/cloud/oracledatabase/v1/db_server.proto4google/cloud/oracledatabase/v1/db_system_shape.proto0google/cloud/oracledatabase/v1/entitlement.proto2google/cloud/oracledatabase/v1/exadata_infra.proto/google/cloud/oracledatabase/v1/gi_version.proto/google/cloud/oracledatabase/v1/vm_cluster.proto#google/longrunning/operations.protogoogle/protobuf/empty.protogoogle/protobuf/timestamp.proto"« -&ListCloudExadataInfrastructuresRequestP -parent ( B@àAúA:8oracledatabase.googleapis.com/CloudExadataInfrastructure - page_size (BàA - -page_token ( BàA"¥ -\'ListCloudExadataInfrastructuresResponsea -cloud_exadata_infrastructures ( 2:.google.cloud.oracledatabase.v1.CloudExadataInfrastructure -next_page_token ( "v -$GetCloudExadataInfrastructureRequestN -name ( B@àAúA: -8oracledatabase.googleapis.com/CloudExadataInfrastructure"± -\'CreateCloudExadataInfrastructureRequestP -parent ( B@àAúA:8oracledatabase.googleapis.com/CloudExadataInfrastructure, -cloud_exadata_infrastructure_id ( BàAe -cloud_exadata_infrastructure ( 2:.google.cloud.oracledatabase.v1.CloudExadataInfrastructureBàA - -request_id ( B àAâŒÏ×"® -\'DeleteCloudExadataInfrastructureRequestN -name ( B@àAúA: -8oracledatabase.googleapis.com/CloudExadataInfrastructure - -request_id ( B àAâŒÏ× -force (BàA"¨ -ListCloudVmClustersRequestD -parent ( B4àAúA.,oracledatabase.googleapis.com/CloudVmCluster - page_size (BàA - -page_token ( BàA -filter ( BàA" -ListCloudVmClustersResponseI -cloud_vm_clusters ( 2..google.cloud.oracledatabase.v1.CloudVmCluster -next_page_token ( "^ -GetCloudVmClusterRequestB -name ( B4àAúA. -,oracledatabase.googleapis.com/CloudVmCluster"õ -CreateCloudVmClusterRequestD -parent ( B4àAúA.,oracledatabase.googleapis.com/CloudVmCluster -cloud_vm_cluster_id ( BàAM -cloud_vm_cluster ( 2..google.cloud.oracledatabase.v1.CloudVmClusterBàA - -request_id ( B àAâŒÏ×"– -DeleteCloudVmClusterRequestB -name ( B4àAúA. -,oracledatabase.googleapis.com/CloudVmCluster - -request_id ( B àAâŒÏ× -force (BàA" -ListEntitlementsRequestA -parent ( B1àAúA+)oracledatabase.googleapis.com/Entitlement - page_size (BàA - -page_token ( BàA"v -ListEntitlementsResponseA - entitlements ( 2+.google.cloud.oracledatabase.v1.Entitlement -next_page_token ( "‡ -ListDbServersRequest> -parent ( B.àAúA(&oracledatabase.googleapis.com/DbServer - page_size (BàA - -page_token ( BàA"n -ListDbServersResponse< - -db_servers ( 2(.google.cloud.oracledatabase.v1.DbServer -next_page_token ( "ƒ -ListDbNodesRequest< -parent ( B,àAúA&$oracledatabase.googleapis.com/DbNode - page_size (BàA - -page_token ( BàA"h -ListDbNodesResponse8 -db_nodes ( 2&.google.cloud.oracledatabase.v1.DbNode -next_page_token ( "‰ -ListGiVersionsRequest? -parent ( B/àAúA)\'oracledatabase.googleapis.com/GiVersion - page_size (BàA - -page_token ( BàA"q -ListGiVersionsResponse> - gi_versions ( 2).google.cloud.oracledatabase.v1.GiVersion -next_page_token ( "‘ -ListDbSystemShapesRequestC -parent ( B3àAúA-+oracledatabase.googleapis.com/DbSystemShape - page_size (BàA - -page_token ( BàA"~ -ListDbSystemShapesResponseG -db_system_shapes ( 2-.google.cloud.oracledatabase.v1.DbSystemShape -next_page_token ( "Ÿ -OperationMetadata4 - create_time ( 2.google.protobuf.TimestampBàA1 -end_time ( 2.google.protobuf.TimestampBàA -target ( BàA -verb ( BàA -status_message ( BàA# -requested_cancellation (BàA - api_version ( BàA -percent_complete (BàA"Ç -ListAutonomousDatabasesRequestH -parent ( B8àAúA20oracledatabase.googleapis.com/AutonomousDatabase - page_size (BàA - -page_token ( BàA -filter ( BàA -order_by ( BàA"Œ -ListAutonomousDatabasesResponseP -autonomous_databases ( 22.google.cloud.oracledatabase.v1.AutonomousDatabase -next_page_token ( "f -GetAutonomousDatabaseRequestF -name ( B8àAúA2 -0oracledatabase.googleapis.com/AutonomousDatabase"‡ -CreateAutonomousDatabaseRequestH -parent ( B8àAúA20oracledatabase.googleapis.com/AutonomousDatabase# -autonomous_database_id ( BàAT -autonomous_database ( 22.google.cloud.oracledatabase.v1.AutonomousDatabaseBàA - -request_id ( B àAâŒÏ×"Š -DeleteAutonomousDatabaseRequestF -name ( B8àAúA2 -0oracledatabase.googleapis.com/AutonomousDatabase - -request_id ( B àAâŒÏ×"¡ - RestoreAutonomousDatabaseRequestF -name ( B8àAúA2 -0oracledatabase.googleapis.com/AutonomousDatabase5 - restore_time ( 2.google.protobuf.TimestampBàA"ã -\'GenerateAutonomousDatabaseWalletRequestF -name ( B8àAúA2 -0oracledatabase.googleapis.com/AutonomousDatabase? -type (2,.google.cloud.oracledatabase.v1.GenerateTypeBàA - is_regional (BàA -password ( BàA"H -(GenerateAutonomousDatabaseWalletResponse -archive_content ( BàA" -ListAutonomousDbVersionsRequestI -parent ( B9àAúA31oracledatabase.googleapis.com/AutonomousDbVersion - page_size (BàA - -page_token ( BàA" - ListAutonomousDbVersionsResponseS -autonomous_db_versions ( 23.google.cloud.oracledatabase.v1.AutonomousDbVersion -next_page_token ( "È -*ListAutonomousDatabaseCharacterSetsRequestT -parent ( BDàAúA>.google.cloud.oracledatabase.v1.AutonomousDatabaseCharacterSet -next_page_token ( "¼ -$ListAutonomousDatabaseBackupsRequestN -parent ( B>àAúA86oracledatabase.googleapis.com/AutonomousDatabaseBackup -filter ( BàA - page_size (BàA - -page_token ( BàA"Ÿ -%ListAutonomousDatabaseBackupsResponse] -autonomous_database_backups ( 28.google.cloud.oracledatabase.v1.AutonomousDatabaseBackup -next_page_token ( 2Œ+ -OracleDatabase„ -ListCloudExadataInfrastructuresF.google.cloud.oracledatabase.v1.ListCloudExadataInfrastructuresRequestG.google.cloud.oracledatabase.v1.ListCloudExadataInfrastructuresResponse"PÚAparent‚Óä“A?/v1/{parent=projects/*/locations/*}/cloudExadataInfrastructuresñ -GetCloudExadataInfrastructureD.google.cloud.oracledatabase.v1.GetCloudExadataInfrastructureRequest:.google.cloud.oracledatabase.v1.CloudExadataInfrastructure"NÚAname‚Óä“A?/v1/{name=projects/*/locations/*/cloudExadataInfrastructures/*}ê - CreateCloudExadataInfrastructureG.google.cloud.oracledatabase.v1.CreateCloudExadataInfrastructureRequest.google.longrunning.Operation"ÝÊA/ -CloudExadataInfrastructureOperationMetadataÚACparent,cloud_exadata_infrastructure,cloud_exadata_infrastructure_id‚Óä“_"?/v1/{parent=projects/*/locations/*}/cloudExadataInfrastructures:cloud_exadata_infrastructure‡ - DeleteCloudExadataInfrastructureG.google.cloud.oracledatabase.v1.DeleteCloudExadataInfrastructureRequest.google.longrunning.Operation"{ÊA* -google.protobuf.EmptyOperationMetadataÚAname‚Óä“A*?/v1/{name=projects/*/locations/*/cloudExadataInfrastructures/*}Ô -ListCloudVmClusters:.google.cloud.oracledatabase.v1.ListCloudVmClustersRequest;.google.cloud.oracledatabase.v1.ListCloudVmClustersResponse"DÚAparent‚Óä“53/v1/{parent=projects/*/locations/*}/cloudVmClustersÁ -GetCloudVmCluster8.google.cloud.oracledatabase.v1.GetCloudVmClusterRequest..google.cloud.oracledatabase.v1.CloudVmCluster"BÚAname‚Óä“53/v1/{name=projects/*/locations/*/cloudVmClusters/*}– -CreateCloudVmCluster;.google.cloud.oracledatabase.v1.CreateCloudVmClusterRequest.google.longrunning.Operation"¡ÊA# -CloudVmClusterOperationMetadataÚA+parent,cloud_vm_cluster,cloud_vm_cluster_id‚Óä“G"3/v1/{parent=projects/*/locations/*}/cloudVmClusters:cloud_vm_clusterã -DeleteCloudVmCluster;.google.cloud.oracledatabase.v1.DeleteCloudVmClusterRequest.google.longrunning.Operation"oÊA* -google.protobuf.EmptyOperationMetadataÚAname‚Óä“5*3/v1/{name=projects/*/locations/*/cloudVmClusters/*}È -ListEntitlements7.google.cloud.oracledatabase.v1.ListEntitlementsRequest8.google.cloud.oracledatabase.v1.ListEntitlementsResponse"AÚAparent‚Óä“20/v1/{parent=projects/*/locations/*}/entitlementsÚ - ListDbServers4.google.cloud.oracledatabase.v1.ListDbServersRequest5.google.cloud.oracledatabase.v1.ListDbServersResponse"\\ÚAparent‚Óä“MK/v1/{parent=projects/*/locations/*/cloudExadataInfrastructures/*}/dbServersÆ - ListDbNodes2.google.cloud.oracledatabase.v1.ListDbNodesRequest3.google.cloud.oracledatabase.v1.ListDbNodesResponse"NÚAparent‚Óä“?=/v1/{parent=projects/*/locations/*/cloudVmClusters/*}/dbNodesÀ -ListGiVersions5.google.cloud.oracledatabase.v1.ListGiVersionsRequest6.google.cloud.oracledatabase.v1.ListGiVersionsResponse"?ÚAparent‚Óä“0./v1/{parent=projects/*/locations/*}/giVersionsÐ -ListDbSystemShapes9.google.cloud.oracledatabase.v1.ListDbSystemShapesRequest:.google.cloud.oracledatabase.v1.ListDbSystemShapesResponse"CÚAparent‚Óä“42/v1/{parent=projects/*/locations/*}/dbSystemShapesä -ListAutonomousDatabases>.google.cloud.oracledatabase.v1.ListAutonomousDatabasesRequest?.google.cloud.oracledatabase.v1.ListAutonomousDatabasesResponse"HÚAparent‚Óä“97/v1/{parent=projects/*/locations/*}/autonomousDatabasesÑ -GetAutonomousDatabase<.google.cloud.oracledatabase.v1.GetAutonomousDatabaseRequest2.google.cloud.oracledatabase.v1.AutonomousDatabase"FÚAname‚Óä“97/v1/{name=projects/*/locations/*/autonomousDatabases/*}¯ -CreateAutonomousDatabase?.google.cloud.oracledatabase.v1.CreateAutonomousDatabaseRequest.google.longrunning.Operation"²ÊA\' -AutonomousDatabaseOperationMetadataÚA1parent,autonomous_database,autonomous_database_id‚Óä“N"7/v1/{parent=projects/*/locations/*}/autonomousDatabases:autonomous_databaseï -DeleteAutonomousDatabase?.google.cloud.oracledatabase.v1.DeleteAutonomousDatabaseRequest.google.longrunning.Operation"sÊA* -google.protobuf.EmptyOperationMetadataÚAname‚Óä“9*7/v1/{name=projects/*/locations/*/autonomousDatabases/*}‡ -RestoreAutonomousDatabase@.google.cloud.oracledatabase.v1.RestoreAutonomousDatabaseRequest.google.longrunning.Operation"ˆÊA\' -AutonomousDatabaseOperationMetadataÚAname,restore_time‚Óä“D"?/v1/{name=projects/*/locations/*/autonomousDatabases/*}:restore:*© - GenerateAutonomousDatabaseWalletG.google.cloud.oracledatabase.v1.GenerateAutonomousDatabaseWalletRequestH.google.cloud.oracledatabase.v1.GenerateAutonomousDatabaseWalletResponse"rÚAname,type,is_regional,password‚Óä“K"F/v1/{name=projects/*/locations/*/autonomousDatabases/*}:generateWallet:*è -ListAutonomousDbVersions?.google.cloud.oracledatabase.v1.ListAutonomousDbVersionsRequest@.google.cloud.oracledatabase.v1.ListAutonomousDbVersionsResponse"IÚAparent‚Óä“:8/v1/{parent=projects/*/locations/*}/autonomousDbVersions” -#ListAutonomousDatabaseCharacterSetsJ.google.cloud.oracledatabase.v1.ListAutonomousDatabaseCharacterSetsRequestK.google.cloud.oracledatabase.v1.ListAutonomousDatabaseCharacterSetsResponse"TÚAparent‚Óä“EC/v1/{parent=projects/*/locations/*}/autonomousDatabaseCharacterSetsü -ListAutonomousDatabaseBackupsD.google.cloud.oracledatabase.v1.ListAutonomousDatabaseBackupsRequestE.google.cloud.oracledatabase.v1.ListAutonomousDatabaseBackupsResponse"NÚAparent‚Óä“?=/v1/{parent=projects/*/locations/*}/autonomousDatabaseBackupsQÊAoracledatabase.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformB¶ -"com.google.cloud.oracledatabase.v1B V1mainProtoPZJcloud.google.com/go/oracledatabase/apiv1/oracledatabasepb;oracledatabasepbªGoogle.Cloud.OracleDatabase.V1ÊGoogle\\Cloud\\OracleDatabase\\V1ê!Google::Cloud::OracleDatabase::V1êAN -compute.googleapis.com/Network,projects/{project}/global/networks/{network}bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/GPBMetadata/Google/Cloud/Oracledatabase/V1/VmCluster.php b/owl-bot-staging/OracleDatabase/v1/proto/src/GPBMetadata/Google/Cloud/Oracledatabase/V1/VmCluster.php deleted file mode 100644 index aaa29be08bb6421461b4ef2fb0003fb4104ffccc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3650 zcmb7H-Ez}L6s~RZcM_Z+NDzU72q}aP*psxKGNRBrv13ewojOiBFz#$+Y2&EKT8&mt z2~6Ig_q}LmdfVxv^Z|O!H8XvIUiIv*WW^yFz&Fg!-HfEz}Y`ZTm6 z>KL5^Bif@z5VDBb%riRu-CY_QHtPkhN5g_)lp999(K0IKTI)Kha@G%RY8qX}x*jds z9_u?r7FxDP9V@ar7N^Di<>G#i*j}GU2qCcne5*%!VA<5DZmvF|ktM|2RSDBx6EN+@ z5KMb#`96T{S)3a?y)}gfufV`x(C>JzZScs7@Nd!O#P!|CwLJGF2KB($wLDHy`)%3X zzHdh^^9`ZU@NK$u+fbN7b}?X>ga=0A*QUq|=A>QoF%;kO+GWb^&Z}Ek|9!a3;vvg;s?@DyQ&lllDCCn-WK+k=P$*8R^S%HI6sQP^Vi}n$!Fw5Q3N8B z5DU!50ue@9M0U$a)!xECBaoLQA23-v2WLc2=ourkG_jg{T^iSZggN>`HU{!}H?%l1 z#70I?Ju8L2d0oo>S2E$=F~^l*^qCj1bBoeYMFG`@aI{M><+wcXtOFvA=Mv)??FvkH z?SLp~@{;*fpGtOf+IIjLctFF*rCcAyjmedJ1!efOY!-$iM)t(|BHE1BfKkutP><_l zMh@Z34}&XgNaczjg$D}obC|S4iiszpH2S!7ay~&#>Q)$#S7_x#9cL^l&d#oWem6~CTBmQvC%PmY4E=(SATbqR3 zb9$gCpq+)0eaq{|#Wu6|GUgwdH>KY)aOXYhof7LYM*0)ABVK$Je;pP*X5*-2KCUI7 zhiZ5a^l(dd1xaW3;iuDbDV15t4=*hIJ_Y(|WfrMrn7WkWIgP*+PHyUREE4vKBzAtK zoD@l-zulLoGO4hkz{GSB<;-dq0lF^Pry<91^&|Yg3loACirHr*H)a#F!WGGjXGnWR zCTs`J_lP=a2v&*fBS=%(sTpC#XAUJc>-&*xhY_Ww!3f{8FtD+NEjb~~?4TbD3tDEC z@MXyNXpe;lgyX?Qx*bWv7-lt{JC<)B=w}fizfw(-^T9PKBVKa=r_6i;I-dR^mR(ruh76mF z`c?<84SF8!jVm#9Sn$&$asMSE)2RqXyvKMX#uo`fy6e8sXK*(zOc!oAuGRHX!nHY( z(c{I&!+tVWspHJ|!8gB9f^t3lqB9w6&%7CI=Qf1IjbfH52!q#t_v)pQl>j{U%Ch`mk3SmFA$1T-Uj5u?`%qaO7m z0cZ@X`aDgm8|XLET|5)xyQ(@97n7~b!VfsE(*c7=q`pyGtJJqDr1f;OLbmH$o0YZN zdaY8P`AE9}Gs$kPzP7Pl#?_2A4|A){TD?l1Hny9j@qL}dLNnQgD&&WI1#@$`T-*AV zG%Mxpdbw0zdwR^sIGlM@t3E$Y904&2BtQfjh)(7 ztx-p3Q2i`Sly*wBjne8yWhSdl!T9!OxzrMyIc*vyTb1UMT3s!i(eePv0!B3=jIX0I zeve}6FFq;N>a9v0{jHE%ouH{|v$C}{Gq&(c24+v}B2Do4XsgnFEF2#U1#vBkhr&&` zv_~y3+9N%Nw{{k~es>@zZbq@(0?fKT5oB~Q__1_FEAW`1Yt*htXYS)Nu zW}ZD(voN{#;9aZBj=z5J%*O}N@QEFC?jK+HD|@vnA3y4BD>UTeN2E%;p$a?8egoogle.cloud.oracledatabase.v1.AllConnectionStrings - */ -class AllConnectionStrings extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The database service provides the highest level of resources - * to each SQL statement. - * - * Generated from protobuf field string high = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $high = ''; - /** - * Output only. The database service provides the least level of resources to - * each SQL statement. - * - * Generated from protobuf field string low = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $low = ''; - /** - * Output only. The database service provides a lower level of resources to - * each SQL statement. - * - * Generated from protobuf field string medium = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $medium = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $high - * Output only. The database service provides the highest level of resources - * to each SQL statement. - * @type string $low - * Output only. The database service provides the least level of resources to - * each SQL statement. - * @type string $medium - * Output only. The database service provides a lower level of resources to - * each SQL statement. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Oracledatabase\V1\AutonomousDatabase::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The database service provides the highest level of resources - * to each SQL statement. - * - * Generated from protobuf field string high = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getHigh() - { - return $this->high; - } - - /** - * Output only. The database service provides the highest level of resources - * to each SQL statement. - * - * Generated from protobuf field string high = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setHigh($var) - { - GPBUtil::checkString($var, True); - $this->high = $var; - - return $this; - } - - /** - * Output only. The database service provides the least level of resources to - * each SQL statement. - * - * Generated from protobuf field string low = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getLow() - { - return $this->low; - } - - /** - * Output only. The database service provides the least level of resources to - * each SQL statement. - * - * Generated from protobuf field string low = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setLow($var) - { - GPBUtil::checkString($var, True); - $this->low = $var; - - return $this; - } - - /** - * Output only. The database service provides a lower level of resources to - * each SQL statement. - * - * Generated from protobuf field string medium = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getMedium() - { - return $this->medium; - } - - /** - * Output only. The database service provides a lower level of resources to - * each SQL statement. - * - * Generated from protobuf field string medium = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setMedium($var) - { - GPBUtil::checkString($var, True); - $this->medium = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabase.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabase.php deleted file mode 100644 index fe496b5489b7..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabase.php +++ /dev/null @@ -1,422 +0,0 @@ -google.cloud.oracledatabase.v1.AutonomousDatabase - */ -class AutonomousDatabase extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. The name of the Autonomous Database resource in the following - * format: - * projects/{project}/locations/{region}/autonomousDatabases/{autonomous_database} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Optional. The name of the Autonomous Database. The database name must be - * unique in the project. The name must begin with a letter and can contain a - * maximum of 30 alphanumeric characters. - * - * Generated from protobuf field string database = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $database = ''; - /** - * Optional. The display name for the Autonomous Database. The name does not - * have to be unique within your project. - * - * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $display_name = ''; - /** - * Output only. The ID of the subscription entitlement associated with the - * Autonomous Database. - * - * Generated from protobuf field string entitlement_id = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $entitlement_id = ''; - /** - * Optional. The password for the default ADMIN user. - * - * Generated from protobuf field string admin_password = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $admin_password = ''; - /** - * Optional. The properties of the Autonomous Database. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseProperties properties = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $properties = null; - /** - * Optional. The labels or tags associated with the Autonomous Database. - * - * Generated from protobuf field map labels = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - /** - * Required. The name of the VPC network used by the Autonomous Database in - * the following format: projects/{project}/global/networks/{network} - * - * Generated from protobuf field string network = 9 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $network = ''; - /** - * Required. The subnet CIDR range for the Autonmous Database. - * - * Generated from protobuf field string cidr = 10 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $cidr = ''; - /** - * Output only. The date and time that the Autonomous Database was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. The name of the Autonomous Database resource in the following - * format: - * projects/{project}/locations/{region}/autonomousDatabases/{autonomous_database} - * @type string $database - * Optional. The name of the Autonomous Database. The database name must be - * unique in the project. The name must begin with a letter and can contain a - * maximum of 30 alphanumeric characters. - * @type string $display_name - * Optional. The display name for the Autonomous Database. The name does not - * have to be unique within your project. - * @type string $entitlement_id - * Output only. The ID of the subscription entitlement associated with the - * Autonomous Database. - * @type string $admin_password - * Optional. The password for the default ADMIN user. - * @type \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseProperties $properties - * Optional. The properties of the Autonomous Database. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. The labels or tags associated with the Autonomous Database. - * @type string $network - * Required. The name of the VPC network used by the Autonomous Database in - * the following format: projects/{project}/global/networks/{network} - * @type string $cidr - * Required. The subnet CIDR range for the Autonmous Database. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The date and time that the Autonomous Database was created. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Oracledatabase\V1\AutonomousDatabase::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. The name of the Autonomous Database resource in the following - * format: - * projects/{project}/locations/{region}/autonomousDatabases/{autonomous_database} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. The name of the Autonomous Database resource in the following - * format: - * projects/{project}/locations/{region}/autonomousDatabases/{autonomous_database} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. The name of the Autonomous Database. The database name must be - * unique in the project. The name must begin with a letter and can contain a - * maximum of 30 alphanumeric characters. - * - * Generated from protobuf field string database = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDatabase() - { - return $this->database; - } - - /** - * Optional. The name of the Autonomous Database. The database name must be - * unique in the project. The name must begin with a letter and can contain a - * maximum of 30 alphanumeric characters. - * - * Generated from protobuf field string database = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDatabase($var) - { - GPBUtil::checkString($var, True); - $this->database = $var; - - return $this; - } - - /** - * Optional. The display name for the Autonomous Database. The name does not - * have to be unique within your project. - * - * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Optional. The display name for the Autonomous Database. The name does not - * have to be unique within your project. - * - * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Output only. The ID of the subscription entitlement associated with the - * Autonomous Database. - * - * Generated from protobuf field string entitlement_id = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getEntitlementId() - { - return $this->entitlement_id; - } - - /** - * Output only. The ID of the subscription entitlement associated with the - * Autonomous Database. - * - * Generated from protobuf field string entitlement_id = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setEntitlementId($var) - { - GPBUtil::checkString($var, True); - $this->entitlement_id = $var; - - return $this; - } - - /** - * Optional. The password for the default ADMIN user. - * - * Generated from protobuf field string admin_password = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getAdminPassword() - { - return $this->admin_password; - } - - /** - * Optional. The password for the default ADMIN user. - * - * Generated from protobuf field string admin_password = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setAdminPassword($var) - { - GPBUtil::checkString($var, True); - $this->admin_password = $var; - - return $this; - } - - /** - * Optional. The properties of the Autonomous Database. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseProperties properties = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseProperties|null - */ - public function getProperties() - { - return $this->properties; - } - - public function hasProperties() - { - return isset($this->properties); - } - - public function clearProperties() - { - unset($this->properties); - } - - /** - * Optional. The properties of the Autonomous Database. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseProperties properties = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseProperties $var - * @return $this - */ - public function setProperties($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseProperties::class); - $this->properties = $var; - - return $this; - } - - /** - * Optional. The labels or tags associated with the Autonomous Database. - * - * Generated from protobuf field map labels = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. The labels or tags associated with the Autonomous Database. - * - * Generated from protobuf field map labels = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Required. The name of the VPC network used by the Autonomous Database in - * the following format: projects/{project}/global/networks/{network} - * - * Generated from protobuf field string network = 9 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getNetwork() - { - return $this->network; - } - - /** - * Required. The name of the VPC network used by the Autonomous Database in - * the following format: projects/{project}/global/networks/{network} - * - * Generated from protobuf field string network = 9 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setNetwork($var) - { - GPBUtil::checkString($var, True); - $this->network = $var; - - return $this; - } - - /** - * Required. The subnet CIDR range for the Autonmous Database. - * - * Generated from protobuf field string cidr = 10 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getCidr() - { - return $this->cidr; - } - - /** - * Required. The subnet CIDR range for the Autonmous Database. - * - * Generated from protobuf field string cidr = 10 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setCidr($var) - { - GPBUtil::checkString($var, True); - $this->cidr = $var; - - return $this; - } - - /** - * Output only. The date and time that the Autonomous Database was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The date and time that the Autonomous Database was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseApex.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseApex.php deleted file mode 100644 index 72636fdbd348..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseApex.php +++ /dev/null @@ -1,102 +0,0 @@ -google.cloud.oracledatabase.v1.AutonomousDatabaseApex - */ -class AutonomousDatabaseApex extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The Oracle APEX Application Development version. - * - * Generated from protobuf field string apex_version = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $apex_version = ''; - /** - * Output only. The Oracle REST Data Services (ORDS) version. - * - * Generated from protobuf field string ords_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $ords_version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $apex_version - * Output only. The Oracle APEX Application Development version. - * @type string $ords_version - * Output only. The Oracle REST Data Services (ORDS) version. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Oracledatabase\V1\AutonomousDatabase::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The Oracle APEX Application Development version. - * - * Generated from protobuf field string apex_version = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getApexVersion() - { - return $this->apex_version; - } - - /** - * Output only. The Oracle APEX Application Development version. - * - * Generated from protobuf field string apex_version = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setApexVersion($var) - { - GPBUtil::checkString($var, True); - $this->apex_version = $var; - - return $this; - } - - /** - * Output only. The Oracle REST Data Services (ORDS) version. - * - * Generated from protobuf field string ords_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getOrdsVersion() - { - return $this->ords_version; - } - - /** - * Output only. The Oracle REST Data Services (ORDS) version. - * - * Generated from protobuf field string ords_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setOrdsVersion($var) - { - GPBUtil::checkString($var, True); - $this->ords_version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseBackup.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseBackup.php deleted file mode 100644 index a19e4245197b..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseBackup.php +++ /dev/null @@ -1,234 +0,0 @@ -google.cloud.oracledatabase.v1.AutonomousDatabaseBackup - */ -class AutonomousDatabaseBackup extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. The name of the Autonomous Database Backup resource with the - * format: - * projects/{project}/locations/{region}/autonomousDatabaseBackups/{autonomous_database_backup} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Required. The name of the Autonomous Database resource for which the backup - * is being created. Format: - * projects/{project}/locations/{region}/autonomousDatabases/{autonomous_database} - * - * Generated from protobuf field string autonomous_database = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $autonomous_database = ''; - /** - * Optional. User friendly name for the Backup. The name does not have to be - * unique. - * - * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $display_name = ''; - /** - * Optional. Various properties of the backup. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseBackupProperties properties = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $properties = null; - /** - * Optional. labels or tags associated with the resource. - * - * Generated from protobuf field map labels = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. The name of the Autonomous Database Backup resource with the - * format: - * projects/{project}/locations/{region}/autonomousDatabaseBackups/{autonomous_database_backup} - * @type string $autonomous_database - * Required. The name of the Autonomous Database resource for which the backup - * is being created. Format: - * projects/{project}/locations/{region}/autonomousDatabases/{autonomous_database} - * @type string $display_name - * Optional. User friendly name for the Backup. The name does not have to be - * unique. - * @type \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseBackupProperties $properties - * Optional. Various properties of the backup. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. labels or tags associated with the resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Oracledatabase\V1\AutonomousDbBackup::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. The name of the Autonomous Database Backup resource with the - * format: - * projects/{project}/locations/{region}/autonomousDatabaseBackups/{autonomous_database_backup} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. The name of the Autonomous Database Backup resource with the - * format: - * projects/{project}/locations/{region}/autonomousDatabaseBackups/{autonomous_database_backup} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. The name of the Autonomous Database resource for which the backup - * is being created. Format: - * projects/{project}/locations/{region}/autonomousDatabases/{autonomous_database} - * - * Generated from protobuf field string autonomous_database = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getAutonomousDatabase() - { - return $this->autonomous_database; - } - - /** - * Required. The name of the Autonomous Database resource for which the backup - * is being created. Format: - * projects/{project}/locations/{region}/autonomousDatabases/{autonomous_database} - * - * Generated from protobuf field string autonomous_database = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setAutonomousDatabase($var) - { - GPBUtil::checkString($var, True); - $this->autonomous_database = $var; - - return $this; - } - - /** - * Optional. User friendly name for the Backup. The name does not have to be - * unique. - * - * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Optional. User friendly name for the Backup. The name does not have to be - * unique. - * - * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Optional. Various properties of the backup. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseBackupProperties properties = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseBackupProperties|null - */ - public function getProperties() - { - return $this->properties; - } - - public function hasProperties() - { - return isset($this->properties); - } - - public function clearProperties() - { - unset($this->properties); - } - - /** - * Optional. Various properties of the backup. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseBackupProperties properties = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseBackupProperties $var - * @return $this - */ - public function setProperties($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseBackupProperties::class); - $this->properties = $var; - - return $this; - } - - /** - * Optional. labels or tags associated with the resource. - * - * Generated from protobuf field map labels = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. labels or tags associated with the resource. - * - * Generated from protobuf field map labels = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseBackupProperties.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseBackupProperties.php deleted file mode 100644 index ac444dd278f7..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseBackupProperties.php +++ /dev/null @@ -1,775 +0,0 @@ -google.cloud.oracledatabase.v1.AutonomousDatabaseBackupProperties - */ -class AutonomousDatabaseBackupProperties extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. OCID of the Autonomous Database backup. - * https://docs.oracle.com/en-us/iaas/Content/General/Concepts/identifiers.htm#Oracle - * - * Generated from protobuf field string ocid = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $ocid = ''; - /** - * Optional. Retention period in days for the backup. - * - * Generated from protobuf field int32 retention_period_days = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $retention_period_days = 0; - /** - * Output only. The OCID of the compartment. - * - * Generated from protobuf field string compartment_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $compartment_id = ''; - /** - * Output only. The quantity of data in the database, in terabytes. - * - * Generated from protobuf field float database_size_tb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $database_size_tb = 0.0; - /** - * Output only. A valid Oracle Database version for Autonomous Database. - * - * Generated from protobuf field string db_version = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $db_version = ''; - /** - * Output only. Indicates if the backup is long term backup. - * - * Generated from protobuf field bool is_long_term_backup = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $is_long_term_backup = false; - /** - * Output only. Indicates if the backup is automatic or user initiated. - * - * Generated from protobuf field bool is_automatic_backup = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $is_automatic_backup = false; - /** - * Output only. Indicates if the backup can be used to restore the Autonomous - * Database. - * - * Generated from protobuf field bool is_restorable = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $is_restorable = false; - /** - * Optional. The OCID of the key store of Oracle Vault. - * - * Generated from protobuf field string key_store_id = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $key_store_id = ''; - /** - * Optional. The wallet name for Oracle Key Vault. - * - * Generated from protobuf field string key_store_wallet = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $key_store_wallet = ''; - /** - * Optional. The OCID of the key container that is used as the master - * encryption key in database transparent data encryption (TDE) operations. - * - * Generated from protobuf field string kms_key_id = 11 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $kms_key_id = ''; - /** - * Optional. The OCID of the key container version that is used in database - * transparent data encryption (TDE) operations KMS Key can have multiple key - * versions. If none is specified, the current key version (latest) of the Key - * Id is used for the operation. Autonomous Database Serverless does not use - * key versions, hence is not applicable for Autonomous Database Serverless - * instances. - * - * Generated from protobuf field string kms_key_version_id = 12 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $kms_key_version_id = ''; - /** - * Output only. Additional information about the current lifecycle state. - * - * Generated from protobuf field string lifecycle_details = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $lifecycle_details = ''; - /** - * Output only. The lifecycle state of the backup. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseBackupProperties.State lifecycle_state = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $lifecycle_state = 0; - /** - * Output only. The backup size in terabytes. - * - * Generated from protobuf field float size_tb = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $size_tb = 0.0; - /** - * Output only. Timestamp until when the backup will be available. - * - * Generated from protobuf field .google.protobuf.Timestamp available_till_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $available_till_time = null; - /** - * Output only. The date and time the backup completed. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $end_time = null; - /** - * Output only. The date and time the backup started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $start_time = null; - /** - * Output only. The type of the backup. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseBackupProperties.Type type = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $type = 0; - /** - * Optional. The OCID of the vault. - * - * Generated from protobuf field string vault_id = 20 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $vault_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $ocid - * Output only. OCID of the Autonomous Database backup. - * https://docs.oracle.com/en-us/iaas/Content/General/Concepts/identifiers.htm#Oracle - * @type int $retention_period_days - * Optional. Retention period in days for the backup. - * @type string $compartment_id - * Output only. The OCID of the compartment. - * @type float $database_size_tb - * Output only. The quantity of data in the database, in terabytes. - * @type string $db_version - * Output only. A valid Oracle Database version for Autonomous Database. - * @type bool $is_long_term_backup - * Output only. Indicates if the backup is long term backup. - * @type bool $is_automatic_backup - * Output only. Indicates if the backup is automatic or user initiated. - * @type bool $is_restorable - * Output only. Indicates if the backup can be used to restore the Autonomous - * Database. - * @type string $key_store_id - * Optional. The OCID of the key store of Oracle Vault. - * @type string $key_store_wallet - * Optional. The wallet name for Oracle Key Vault. - * @type string $kms_key_id - * Optional. The OCID of the key container that is used as the master - * encryption key in database transparent data encryption (TDE) operations. - * @type string $kms_key_version_id - * Optional. The OCID of the key container version that is used in database - * transparent data encryption (TDE) operations KMS Key can have multiple key - * versions. If none is specified, the current key version (latest) of the Key - * Id is used for the operation. Autonomous Database Serverless does not use - * key versions, hence is not applicable for Autonomous Database Serverless - * instances. - * @type string $lifecycle_details - * Output only. Additional information about the current lifecycle state. - * @type int $lifecycle_state - * Output only. The lifecycle state of the backup. - * @type float $size_tb - * Output only. The backup size in terabytes. - * @type \Google\Protobuf\Timestamp $available_till_time - * Output only. Timestamp until when the backup will be available. - * @type \Google\Protobuf\Timestamp $end_time - * Output only. The date and time the backup completed. - * @type \Google\Protobuf\Timestamp $start_time - * Output only. The date and time the backup started. - * @type int $type - * Output only. The type of the backup. - * @type string $vault_id - * Optional. The OCID of the vault. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Oracledatabase\V1\AutonomousDbBackup::initOnce(); - parent::__construct($data); - } - - /** - * Output only. OCID of the Autonomous Database backup. - * https://docs.oracle.com/en-us/iaas/Content/General/Concepts/identifiers.htm#Oracle - * - * Generated from protobuf field string ocid = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getOcid() - { - return $this->ocid; - } - - /** - * Output only. OCID of the Autonomous Database backup. - * https://docs.oracle.com/en-us/iaas/Content/General/Concepts/identifiers.htm#Oracle - * - * Generated from protobuf field string ocid = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setOcid($var) - { - GPBUtil::checkString($var, True); - $this->ocid = $var; - - return $this; - } - - /** - * Optional. Retention period in days for the backup. - * - * Generated from protobuf field int32 retention_period_days = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getRetentionPeriodDays() - { - return $this->retention_period_days; - } - - /** - * Optional. Retention period in days for the backup. - * - * Generated from protobuf field int32 retention_period_days = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setRetentionPeriodDays($var) - { - GPBUtil::checkInt32($var); - $this->retention_period_days = $var; - - return $this; - } - - /** - * Output only. The OCID of the compartment. - * - * Generated from protobuf field string compartment_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getCompartmentId() - { - return $this->compartment_id; - } - - /** - * Output only. The OCID of the compartment. - * - * Generated from protobuf field string compartment_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setCompartmentId($var) - { - GPBUtil::checkString($var, True); - $this->compartment_id = $var; - - return $this; - } - - /** - * Output only. The quantity of data in the database, in terabytes. - * - * Generated from protobuf field float database_size_tb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return float - */ - public function getDatabaseSizeTb() - { - return $this->database_size_tb; - } - - /** - * Output only. The quantity of data in the database, in terabytes. - * - * Generated from protobuf field float database_size_tb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param float $var - * @return $this - */ - public function setDatabaseSizeTb($var) - { - GPBUtil::checkFloat($var); - $this->database_size_tb = $var; - - return $this; - } - - /** - * Output only. A valid Oracle Database version for Autonomous Database. - * - * Generated from protobuf field string db_version = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getDbVersion() - { - return $this->db_version; - } - - /** - * Output only. A valid Oracle Database version for Autonomous Database. - * - * Generated from protobuf field string db_version = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setDbVersion($var) - { - GPBUtil::checkString($var, True); - $this->db_version = $var; - - return $this; - } - - /** - * Output only. Indicates if the backup is long term backup. - * - * Generated from protobuf field bool is_long_term_backup = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getIsLongTermBackup() - { - return $this->is_long_term_backup; - } - - /** - * Output only. Indicates if the backup is long term backup. - * - * Generated from protobuf field bool is_long_term_backup = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setIsLongTermBackup($var) - { - GPBUtil::checkBool($var); - $this->is_long_term_backup = $var; - - return $this; - } - - /** - * Output only. Indicates if the backup is automatic or user initiated. - * - * Generated from protobuf field bool is_automatic_backup = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getIsAutomaticBackup() - { - return $this->is_automatic_backup; - } - - /** - * Output only. Indicates if the backup is automatic or user initiated. - * - * Generated from protobuf field bool is_automatic_backup = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setIsAutomaticBackup($var) - { - GPBUtil::checkBool($var); - $this->is_automatic_backup = $var; - - return $this; - } - - /** - * Output only. Indicates if the backup can be used to restore the Autonomous - * Database. - * - * Generated from protobuf field bool is_restorable = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getIsRestorable() - { - return $this->is_restorable; - } - - /** - * Output only. Indicates if the backup can be used to restore the Autonomous - * Database. - * - * Generated from protobuf field bool is_restorable = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setIsRestorable($var) - { - GPBUtil::checkBool($var); - $this->is_restorable = $var; - - return $this; - } - - /** - * Optional. The OCID of the key store of Oracle Vault. - * - * Generated from protobuf field string key_store_id = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getKeyStoreId() - { - return $this->key_store_id; - } - - /** - * Optional. The OCID of the key store of Oracle Vault. - * - * Generated from protobuf field string key_store_id = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setKeyStoreId($var) - { - GPBUtil::checkString($var, True); - $this->key_store_id = $var; - - return $this; - } - - /** - * Optional. The wallet name for Oracle Key Vault. - * - * Generated from protobuf field string key_store_wallet = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getKeyStoreWallet() - { - return $this->key_store_wallet; - } - - /** - * Optional. The wallet name for Oracle Key Vault. - * - * Generated from protobuf field string key_store_wallet = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setKeyStoreWallet($var) - { - GPBUtil::checkString($var, True); - $this->key_store_wallet = $var; - - return $this; - } - - /** - * Optional. The OCID of the key container that is used as the master - * encryption key in database transparent data encryption (TDE) operations. - * - * Generated from protobuf field string kms_key_id = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getKmsKeyId() - { - return $this->kms_key_id; - } - - /** - * Optional. The OCID of the key container that is used as the master - * encryption key in database transparent data encryption (TDE) operations. - * - * Generated from protobuf field string kms_key_id = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setKmsKeyId($var) - { - GPBUtil::checkString($var, True); - $this->kms_key_id = $var; - - return $this; - } - - /** - * Optional. The OCID of the key container version that is used in database - * transparent data encryption (TDE) operations KMS Key can have multiple key - * versions. If none is specified, the current key version (latest) of the Key - * Id is used for the operation. Autonomous Database Serverless does not use - * key versions, hence is not applicable for Autonomous Database Serverless - * instances. - * - * Generated from protobuf field string kms_key_version_id = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getKmsKeyVersionId() - { - return $this->kms_key_version_id; - } - - /** - * Optional. The OCID of the key container version that is used in database - * transparent data encryption (TDE) operations KMS Key can have multiple key - * versions. If none is specified, the current key version (latest) of the Key - * Id is used for the operation. Autonomous Database Serverless does not use - * key versions, hence is not applicable for Autonomous Database Serverless - * instances. - * - * Generated from protobuf field string kms_key_version_id = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setKmsKeyVersionId($var) - { - GPBUtil::checkString($var, True); - $this->kms_key_version_id = $var; - - return $this; - } - - /** - * Output only. Additional information about the current lifecycle state. - * - * Generated from protobuf field string lifecycle_details = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getLifecycleDetails() - { - return $this->lifecycle_details; - } - - /** - * Output only. Additional information about the current lifecycle state. - * - * Generated from protobuf field string lifecycle_details = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setLifecycleDetails($var) - { - GPBUtil::checkString($var, True); - $this->lifecycle_details = $var; - - return $this; - } - - /** - * Output only. The lifecycle state of the backup. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseBackupProperties.State lifecycle_state = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getLifecycleState() - { - return $this->lifecycle_state; - } - - /** - * Output only. The lifecycle state of the backup. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseBackupProperties.State lifecycle_state = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setLifecycleState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseBackupProperties\State::class); - $this->lifecycle_state = $var; - - return $this; - } - - /** - * Output only. The backup size in terabytes. - * - * Generated from protobuf field float size_tb = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return float - */ - public function getSizeTb() - { - return $this->size_tb; - } - - /** - * Output only. The backup size in terabytes. - * - * Generated from protobuf field float size_tb = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param float $var - * @return $this - */ - public function setSizeTb($var) - { - GPBUtil::checkFloat($var); - $this->size_tb = $var; - - return $this; - } - - /** - * Output only. Timestamp until when the backup will be available. - * - * Generated from protobuf field .google.protobuf.Timestamp available_till_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getAvailableTillTime() - { - return $this->available_till_time; - } - - public function hasAvailableTillTime() - { - return isset($this->available_till_time); - } - - public function clearAvailableTillTime() - { - unset($this->available_till_time); - } - - /** - * Output only. Timestamp until when the backup will be available. - * - * Generated from protobuf field .google.protobuf.Timestamp available_till_time = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setAvailableTillTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->available_till_time = $var; - - return $this; - } - - /** - * Output only. The date and time the backup completed. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * Output only. The date and time the backup completed. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * Output only. The date and time the backup started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStartTime() - { - return $this->start_time; - } - - public function hasStartTime() - { - return isset($this->start_time); - } - - public function clearStartTime() - { - unset($this->start_time); - } - - /** - * Output only. The date and time the backup started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * Output only. The type of the backup. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseBackupProperties.Type type = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Output only. The type of the backup. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseBackupProperties.Type type = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseBackupProperties\Type::class); - $this->type = $var; - - return $this; - } - - /** - * Optional. The OCID of the vault. - * - * Generated from protobuf field string vault_id = 20 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getVaultId() - { - return $this->vault_id; - } - - /** - * Optional. The OCID of the vault. - * - * Generated from protobuf field string vault_id = 20 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setVaultId($var) - { - GPBUtil::checkString($var, True); - $this->vault_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseBackupProperties/State.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseBackupProperties/State.php deleted file mode 100644 index ea7dfe519e53..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseBackupProperties/State.php +++ /dev/null @@ -1,92 +0,0 @@ -google.cloud.oracledatabase.v1.AutonomousDatabaseBackupProperties.State - */ -class State -{ - /** - * Default unspecified value. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Indicates that the resource is in creating state. - * - * Generated from protobuf enum CREATING = 1; - */ - const CREATING = 1; - /** - * Indicates that the resource is in active state. - * - * Generated from protobuf enum ACTIVE = 2; - */ - const ACTIVE = 2; - /** - * Indicates that the resource is in deleting state. - * - * Generated from protobuf enum DELETING = 3; - */ - const DELETING = 3; - /** - * Indicates that the resource is in deleted state. - * - * Generated from protobuf enum DELETED = 4; - */ - const DELETED = 4; - /** - * Indicates that the resource is in failed state. - * - * Generated from protobuf enum FAILED = 6; - */ - const FAILED = 6; - /** - * Indicates that the resource is in updating state. - * - * Generated from protobuf enum UPDATING = 7; - */ - const UPDATING = 7; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::CREATING => 'CREATING', - self::ACTIVE => 'ACTIVE', - self::DELETING => 'DELETING', - self::DELETED => 'DELETED', - self::FAILED => 'FAILED', - self::UPDATING => 'UPDATING', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseBackupProperties_State::class); - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseBackupProperties/Type.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseBackupProperties/Type.php deleted file mode 100644 index 4f5c2fd88ce8..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseBackupProperties/Type.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.oracledatabase.v1.AutonomousDatabaseBackupProperties.Type - */ -class Type -{ - /** - * Default unspecified value. - * - * Generated from protobuf enum TYPE_UNSPECIFIED = 0; - */ - const TYPE_UNSPECIFIED = 0; - /** - * Incremental backups. - * - * Generated from protobuf enum INCREMENTAL = 1; - */ - const INCREMENTAL = 1; - /** - * Full backups. - * - * Generated from protobuf enum FULL = 2; - */ - const FULL = 2; - /** - * Long term backups. - * - * Generated from protobuf enum LONG_TERM = 3; - */ - const LONG_TERM = 3; - - private static $valueToName = [ - self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', - self::INCREMENTAL => 'INCREMENTAL', - self::FULL => 'FULL', - self::LONG_TERM => 'LONG_TERM', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Type::class, \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseBackupProperties_Type::class); - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseCharacterSet.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseCharacterSet.php deleted file mode 100644 index 638716a2eaf4..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseCharacterSet.php +++ /dev/null @@ -1,148 +0,0 @@ -google.cloud.oracledatabase.v1.AutonomousDatabaseCharacterSet - */ -class AutonomousDatabaseCharacterSet extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. The name of the Autonomous Database Character Set resource in - * the following format: - * projects/{project}/locations/{region}/autonomousDatabaseCharacterSets/{autonomous_database_character_set} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Output only. The character set type for the Autonomous Database. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseCharacterSet.CharacterSetType character_set_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $character_set_type = 0; - /** - * Output only. The character set name for the Autonomous Database which is - * the ID in the resource name. - * - * Generated from protobuf field string character_set = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $character_set = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. The name of the Autonomous Database Character Set resource in - * the following format: - * projects/{project}/locations/{region}/autonomousDatabaseCharacterSets/{autonomous_database_character_set} - * @type int $character_set_type - * Output only. The character set type for the Autonomous Database. - * @type string $character_set - * Output only. The character set name for the Autonomous Database which is - * the ID in the resource name. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Oracledatabase\V1\AutonomousDatabaseCharacterSet::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. The name of the Autonomous Database Character Set resource in - * the following format: - * projects/{project}/locations/{region}/autonomousDatabaseCharacterSets/{autonomous_database_character_set} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. The name of the Autonomous Database Character Set resource in - * the following format: - * projects/{project}/locations/{region}/autonomousDatabaseCharacterSets/{autonomous_database_character_set} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. The character set type for the Autonomous Database. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseCharacterSet.CharacterSetType character_set_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getCharacterSetType() - { - return $this->character_set_type; - } - - /** - * Output only. The character set type for the Autonomous Database. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseCharacterSet.CharacterSetType character_set_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setCharacterSetType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseCharacterSet\CharacterSetType::class); - $this->character_set_type = $var; - - return $this; - } - - /** - * Output only. The character set name for the Autonomous Database which is - * the ID in the resource name. - * - * Generated from protobuf field string character_set = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getCharacterSet() - { - return $this->character_set; - } - - /** - * Output only. The character set name for the Autonomous Database which is - * the ID in the resource name. - * - * Generated from protobuf field string character_set = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setCharacterSet($var) - { - GPBUtil::checkString($var, True); - $this->character_set = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseCharacterSet/CharacterSetType.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseCharacterSet/CharacterSetType.php deleted file mode 100644 index fd0be0808cca..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseCharacterSet/CharacterSetType.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.oracledatabase.v1.AutonomousDatabaseCharacterSet.CharacterSetType - */ -class CharacterSetType -{ - /** - * Character set type is not specified. - * - * Generated from protobuf enum CHARACTER_SET_TYPE_UNSPECIFIED = 0; - */ - const CHARACTER_SET_TYPE_UNSPECIFIED = 0; - /** - * Character set type is set to database. - * - * Generated from protobuf enum DATABASE = 1; - */ - const DATABASE = 1; - /** - * Character set type is set to national. - * - * Generated from protobuf enum NATIONAL = 2; - */ - const NATIONAL = 2; - - private static $valueToName = [ - self::CHARACTER_SET_TYPE_UNSPECIFIED => 'CHARACTER_SET_TYPE_UNSPECIFIED', - self::DATABASE => 'DATABASE', - self::NATIONAL => 'NATIONAL', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CharacterSetType::class, \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseCharacterSet_CharacterSetType::class); - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseConnectionStrings.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseConnectionStrings.php deleted file mode 100644 index 3684fe56deea..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseConnectionStrings.php +++ /dev/null @@ -1,276 +0,0 @@ -google.cloud.oracledatabase.v1.AutonomousDatabaseConnectionStrings - */ -class AutonomousDatabaseConnectionStrings extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Returns all connection strings that can be used to connect to - * the Autonomous Database. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.AllConnectionStrings all_connection_strings = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $all_connection_strings = null; - /** - * Output only. The database service provides the least level of resources to - * each SQL statement, but supports the most number of concurrent SQL - * statements. - * - * Generated from protobuf field string dedicated = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $dedicated = ''; - /** - * Output only. The database service provides the highest level of resources - * to each SQL statement. - * - * Generated from protobuf field string high = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $high = ''; - /** - * Output only. The database service provides the least level of resources to - * each SQL statement. - * - * Generated from protobuf field string low = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $low = ''; - /** - * Output only. The database service provides a lower level of resources to - * each SQL statement. - * - * Generated from protobuf field string medium = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $medium = ''; - /** - * Output only. A list of connection string profiles to allow clients to - * group, filter, and select values based on the structured metadata. - * - * Generated from protobuf field repeated .google.cloud.oracledatabase.v1.DatabaseConnectionStringProfile profiles = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $profiles; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\OracleDatabase\V1\AllConnectionStrings $all_connection_strings - * Output only. Returns all connection strings that can be used to connect to - * the Autonomous Database. - * @type string $dedicated - * Output only. The database service provides the least level of resources to - * each SQL statement, but supports the most number of concurrent SQL - * statements. - * @type string $high - * Output only. The database service provides the highest level of resources - * to each SQL statement. - * @type string $low - * Output only. The database service provides the least level of resources to - * each SQL statement. - * @type string $medium - * Output only. The database service provides a lower level of resources to - * each SQL statement. - * @type array<\Google\Cloud\OracleDatabase\V1\DatabaseConnectionStringProfile>|\Google\Protobuf\Internal\RepeatedField $profiles - * Output only. A list of connection string profiles to allow clients to - * group, filter, and select values based on the structured metadata. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Oracledatabase\V1\AutonomousDatabase::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Returns all connection strings that can be used to connect to - * the Autonomous Database. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.AllConnectionStrings all_connection_strings = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\OracleDatabase\V1\AllConnectionStrings|null - */ - public function getAllConnectionStrings() - { - return $this->all_connection_strings; - } - - public function hasAllConnectionStrings() - { - return isset($this->all_connection_strings); - } - - public function clearAllConnectionStrings() - { - unset($this->all_connection_strings); - } - - /** - * Output only. Returns all connection strings that can be used to connect to - * the Autonomous Database. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.AllConnectionStrings all_connection_strings = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\OracleDatabase\V1\AllConnectionStrings $var - * @return $this - */ - public function setAllConnectionStrings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OracleDatabase\V1\AllConnectionStrings::class); - $this->all_connection_strings = $var; - - return $this; - } - - /** - * Output only. The database service provides the least level of resources to - * each SQL statement, but supports the most number of concurrent SQL - * statements. - * - * Generated from protobuf field string dedicated = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getDedicated() - { - return $this->dedicated; - } - - /** - * Output only. The database service provides the least level of resources to - * each SQL statement, but supports the most number of concurrent SQL - * statements. - * - * Generated from protobuf field string dedicated = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setDedicated($var) - { - GPBUtil::checkString($var, True); - $this->dedicated = $var; - - return $this; - } - - /** - * Output only. The database service provides the highest level of resources - * to each SQL statement. - * - * Generated from protobuf field string high = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getHigh() - { - return $this->high; - } - - /** - * Output only. The database service provides the highest level of resources - * to each SQL statement. - * - * Generated from protobuf field string high = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setHigh($var) - { - GPBUtil::checkString($var, True); - $this->high = $var; - - return $this; - } - - /** - * Output only. The database service provides the least level of resources to - * each SQL statement. - * - * Generated from protobuf field string low = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getLow() - { - return $this->low; - } - - /** - * Output only. The database service provides the least level of resources to - * each SQL statement. - * - * Generated from protobuf field string low = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setLow($var) - { - GPBUtil::checkString($var, True); - $this->low = $var; - - return $this; - } - - /** - * Output only. The database service provides a lower level of resources to - * each SQL statement. - * - * Generated from protobuf field string medium = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getMedium() - { - return $this->medium; - } - - /** - * Output only. The database service provides a lower level of resources to - * each SQL statement. - * - * Generated from protobuf field string medium = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setMedium($var) - { - GPBUtil::checkString($var, True); - $this->medium = $var; - - return $this; - } - - /** - * Output only. A list of connection string profiles to allow clients to - * group, filter, and select values based on the structured metadata. - * - * Generated from protobuf field repeated .google.cloud.oracledatabase.v1.DatabaseConnectionStringProfile profiles = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getProfiles() - { - return $this->profiles; - } - - /** - * Output only. A list of connection string profiles to allow clients to - * group, filter, and select values based on the structured metadata. - * - * Generated from protobuf field repeated .google.cloud.oracledatabase.v1.DatabaseConnectionStringProfile profiles = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\OracleDatabase\V1\DatabaseConnectionStringProfile>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setProfiles($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\OracleDatabase\V1\DatabaseConnectionStringProfile::class); - $this->profiles = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseConnectionUrls.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseConnectionUrls.php deleted file mode 100644 index fe73d1ecf700..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseConnectionUrls.php +++ /dev/null @@ -1,327 +0,0 @@ -google.cloud.oracledatabase.v1.AutonomousDatabaseConnectionUrls - */ -class AutonomousDatabaseConnectionUrls extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Oracle Application Express (APEX) URL. - * - * Generated from protobuf field string apex_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $apex_uri = ''; - /** - * Output only. The URL of the Database Transforms for the Autonomous - * Database. - * - * Generated from protobuf field string database_transforms_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $database_transforms_uri = ''; - /** - * Output only. The URL of the Graph Studio for the Autonomous Database. - * - * Generated from protobuf field string graph_studio_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $graph_studio_uri = ''; - /** - * Output only. The URL of the Oracle Machine Learning (OML) Notebook for the - * Autonomous Database. - * - * Generated from protobuf field string machine_learning_notebook_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $machine_learning_notebook_uri = ''; - /** - * Output only. The URL of Machine Learning user management the Autonomous - * Database. - * - * Generated from protobuf field string machine_learning_user_management_uri = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $machine_learning_user_management_uri = ''; - /** - * Output only. The URL of the MongoDB API for the Autonomous Database. - * - * Generated from protobuf field string mongo_db_uri = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $mongo_db_uri = ''; - /** - * Output only. The Oracle REST Data Services (ORDS) URL of the Web Access for - * the Autonomous Database. - * - * Generated from protobuf field string ords_uri = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $ords_uri = ''; - /** - * Output only. The URL of the Oracle SQL Developer Web for the Autonomous - * Database. - * - * Generated from protobuf field string sql_dev_web_uri = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $sql_dev_web_uri = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $apex_uri - * Output only. Oracle Application Express (APEX) URL. - * @type string $database_transforms_uri - * Output only. The URL of the Database Transforms for the Autonomous - * Database. - * @type string $graph_studio_uri - * Output only. The URL of the Graph Studio for the Autonomous Database. - * @type string $machine_learning_notebook_uri - * Output only. The URL of the Oracle Machine Learning (OML) Notebook for the - * Autonomous Database. - * @type string $machine_learning_user_management_uri - * Output only. The URL of Machine Learning user management the Autonomous - * Database. - * @type string $mongo_db_uri - * Output only. The URL of the MongoDB API for the Autonomous Database. - * @type string $ords_uri - * Output only. The Oracle REST Data Services (ORDS) URL of the Web Access for - * the Autonomous Database. - * @type string $sql_dev_web_uri - * Output only. The URL of the Oracle SQL Developer Web for the Autonomous - * Database. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Oracledatabase\V1\AutonomousDatabase::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Oracle Application Express (APEX) URL. - * - * Generated from protobuf field string apex_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getApexUri() - { - return $this->apex_uri; - } - - /** - * Output only. Oracle Application Express (APEX) URL. - * - * Generated from protobuf field string apex_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setApexUri($var) - { - GPBUtil::checkString($var, True); - $this->apex_uri = $var; - - return $this; - } - - /** - * Output only. The URL of the Database Transforms for the Autonomous - * Database. - * - * Generated from protobuf field string database_transforms_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getDatabaseTransformsUri() - { - return $this->database_transforms_uri; - } - - /** - * Output only. The URL of the Database Transforms for the Autonomous - * Database. - * - * Generated from protobuf field string database_transforms_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setDatabaseTransformsUri($var) - { - GPBUtil::checkString($var, True); - $this->database_transforms_uri = $var; - - return $this; - } - - /** - * Output only. The URL of the Graph Studio for the Autonomous Database. - * - * Generated from protobuf field string graph_studio_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getGraphStudioUri() - { - return $this->graph_studio_uri; - } - - /** - * Output only. The URL of the Graph Studio for the Autonomous Database. - * - * Generated from protobuf field string graph_studio_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setGraphStudioUri($var) - { - GPBUtil::checkString($var, True); - $this->graph_studio_uri = $var; - - return $this; - } - - /** - * Output only. The URL of the Oracle Machine Learning (OML) Notebook for the - * Autonomous Database. - * - * Generated from protobuf field string machine_learning_notebook_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getMachineLearningNotebookUri() - { - return $this->machine_learning_notebook_uri; - } - - /** - * Output only. The URL of the Oracle Machine Learning (OML) Notebook for the - * Autonomous Database. - * - * Generated from protobuf field string machine_learning_notebook_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setMachineLearningNotebookUri($var) - { - GPBUtil::checkString($var, True); - $this->machine_learning_notebook_uri = $var; - - return $this; - } - - /** - * Output only. The URL of Machine Learning user management the Autonomous - * Database. - * - * Generated from protobuf field string machine_learning_user_management_uri = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getMachineLearningUserManagementUri() - { - return $this->machine_learning_user_management_uri; - } - - /** - * Output only. The URL of Machine Learning user management the Autonomous - * Database. - * - * Generated from protobuf field string machine_learning_user_management_uri = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setMachineLearningUserManagementUri($var) - { - GPBUtil::checkString($var, True); - $this->machine_learning_user_management_uri = $var; - - return $this; - } - - /** - * Output only. The URL of the MongoDB API for the Autonomous Database. - * - * Generated from protobuf field string mongo_db_uri = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getMongoDbUri() - { - return $this->mongo_db_uri; - } - - /** - * Output only. The URL of the MongoDB API for the Autonomous Database. - * - * Generated from protobuf field string mongo_db_uri = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setMongoDbUri($var) - { - GPBUtil::checkString($var, True); - $this->mongo_db_uri = $var; - - return $this; - } - - /** - * Output only. The Oracle REST Data Services (ORDS) URL of the Web Access for - * the Autonomous Database. - * - * Generated from protobuf field string ords_uri = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getOrdsUri() - { - return $this->ords_uri; - } - - /** - * Output only. The Oracle REST Data Services (ORDS) URL of the Web Access for - * the Autonomous Database. - * - * Generated from protobuf field string ords_uri = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setOrdsUri($var) - { - GPBUtil::checkString($var, True); - $this->ords_uri = $var; - - return $this; - } - - /** - * Output only. The URL of the Oracle SQL Developer Web for the Autonomous - * Database. - * - * Generated from protobuf field string sql_dev_web_uri = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getSqlDevWebUri() - { - return $this->sql_dev_web_uri; - } - - /** - * Output only. The URL of the Oracle SQL Developer Web for the Autonomous - * Database. - * - * Generated from protobuf field string sql_dev_web_uri = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setSqlDevWebUri($var) - { - GPBUtil::checkString($var, True); - $this->sql_dev_web_uri = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseProperties.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseProperties.php deleted file mode 100644 index 84d85890f412..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseProperties.php +++ /dev/null @@ -1,2197 +0,0 @@ -google.cloud.oracledatabase.v1.AutonomousDatabaseProperties - */ -class AutonomousDatabaseProperties extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. OCID of the Autonomous Database. - * https://docs.oracle.com/en-us/iaas/Content/General/Concepts/identifiers.htm#Oracle - * - * Generated from protobuf field string ocid = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $ocid = ''; - /** - * Optional. The number of compute servers for the Autonomous Database. - * - * Generated from protobuf field float compute_count = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $compute_count = 0.0; - /** - * Optional. The number of CPU cores to be made available to the database. - * - * Generated from protobuf field int32 cpu_core_count = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $cpu_core_count = 0; - /** - * Optional. The size of the data stored in the database, in terabytes. - * - * Generated from protobuf field int32 data_storage_size_tb = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $data_storage_size_tb = 0; - /** - * Optional. The size of the data stored in the database, in gigabytes. - * - * Generated from protobuf field int32 data_storage_size_gb = 63 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $data_storage_size_gb = 0; - /** - * Required. The workload type of the Autonomous Database. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.DBWorkload db_workload = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $db_workload = 0; - /** - * Optional. The edition of the Autonomous Databases. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.DatabaseEdition db_edition = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $db_edition = 0; - /** - * Optional. The character set for the Autonomous Database. The default is - * AL32UTF8. - * - * Generated from protobuf field string character_set = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $character_set = ''; - /** - * Optional. The national character set for the Autonomous Database. The - * default is AL16UTF16. - * - * Generated from protobuf field string n_character_set = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $n_character_set = ''; - /** - * Optional. The private endpoint IP address for the Autonomous Database. - * - * Generated from protobuf field string private_endpoint_ip = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $private_endpoint_ip = ''; - /** - * Optional. The private endpoint label for the Autonomous Database. - * - * Generated from protobuf field string private_endpoint_label = 11 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $private_endpoint_label = ''; - /** - * Optional. The Oracle Database version for the Autonomous Database. - * - * Generated from protobuf field string db_version = 12 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $db_version = ''; - /** - * Optional. This field indicates if auto scaling is enabled for the - * Autonomous Database CPU core count. - * - * Generated from protobuf field bool is_auto_scaling_enabled = 14 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $is_auto_scaling_enabled = false; - /** - * Optional. This field indicates if auto scaling is enabled for the - * Autonomous Database storage. - * - * Generated from protobuf field bool is_storage_auto_scaling_enabled = 15 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $is_storage_auto_scaling_enabled = false; - /** - * Required. The license type used for the Autonomous Database. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.LicenseType license_type = 16 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $license_type = 0; - /** - * Optional. The list of customer contacts. - * - * Generated from protobuf field repeated .google.cloud.oracledatabase.v1.CustomerContact customer_contacts = 17 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $customer_contacts; - /** - * Optional. The ID of the Oracle Cloud Infrastructure vault secret. - * - * Generated from protobuf field string secret_id = 18 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $secret_id = ''; - /** - * Optional. The ID of the Oracle Cloud Infrastructure vault. - * - * Generated from protobuf field string vault_id = 19 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $vault_id = ''; - /** - * Optional. The maintenance schedule of the Autonomous Database. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.MaintenanceScheduleType maintenance_schedule_type = 20 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $maintenance_schedule_type = 0; - /** - * Optional. This field specifies if the Autonomous Database requires mTLS - * connections. - * - * Generated from protobuf field bool mtls_connection_required = 34 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $mtls_connection_required = false; - /** - * Optional. The retention period for the Autonomous Database. This field is - * specified in days, can range from 1 day to 60 days, and has a default value - * of 60 days. - * - * Generated from protobuf field int32 backup_retention_period_days = 57 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $backup_retention_period_days = 0; - /** - * Output only. The amount of storage currently being used for user and system - * data, in terabytes. - * - * Generated from protobuf field double actual_used_data_storage_size_tb = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $actual_used_data_storage_size_tb = 0.0; - /** - * Output only. The amount of storage currently allocated for the database - * tables and billed for, rounded up in terabytes. - * - * Generated from protobuf field double allocated_storage_size_tb = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $allocated_storage_size_tb = 0.0; - /** - * Output only. The details for the Oracle APEX Application Development. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseApex apex_details = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $apex_details = null; - /** - * Output only. This field indicates the status of Data Guard and Access - * control for the Autonomous Database. The field's value is null if Data - * Guard is disabled or Access Control is disabled. The field's value is TRUE - * if both Data Guard and Access Control are enabled, and the Autonomous - * Database is using primary IP access control list (ACL) for standby. The - * field's value is FALSE if both Data Guard and Access Control are enabled, - * and the Autonomous Database is using a different IP access control list - * (ACL) for standby compared to primary. - * - * Generated from protobuf field optional bool are_primary_allowlisted_ips_used = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $are_primary_allowlisted_ips_used = null; - /** - * Output only. The details of the current lifestyle state of the Autonomous - * Database. - * - * Generated from protobuf field string lifecycle_details = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $lifecycle_details = ''; - /** - * Output only. The current lifecycle state of the Autonomous Database. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.State state = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. The Autonomous Container Database OCID. - * - * Generated from protobuf field string autonomous_container_database_id = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $autonomous_container_database_id = ''; - /** - * Output only. The list of available Oracle Database upgrade versions for an - * Autonomous Database. - * - * Generated from protobuf field repeated string available_upgrade_versions = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $available_upgrade_versions; - /** - * Output only. The connection strings used to connect to an Autonomous - * Database. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseConnectionStrings connection_strings = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $connection_strings = null; - /** - * Output only. The Oracle Connection URLs for an Autonomous Database. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseConnectionUrls connection_urls = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $connection_urls = null; - /** - * Output only. This field indicates the number of seconds of data loss during - * a Data Guard failover. - * - * Generated from protobuf field .google.protobuf.Duration failed_data_recovery_duration = 31 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $failed_data_recovery_duration = null; - /** - * Output only. The memory assigned to in-memory tables in an Autonomous - * Database. - * - * Generated from protobuf field int32 memory_table_gbs = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $memory_table_gbs = 0; - /** - * Output only. This field indicates whether the Autonomous Database has local - * (in-region) Data Guard enabled. - * - * Generated from protobuf field bool is_local_data_guard_enabled = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $is_local_data_guard_enabled = false; - /** - * Output only. This field indicates the maximum data loss limit for an - * Autonomous Database, in seconds. - * - * Generated from protobuf field int32 local_adg_auto_failover_max_data_loss_limit = 35 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $local_adg_auto_failover_max_data_loss_limit = 0; - /** - * Output only. The details of the Autonomous Data Guard standby database. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseStandbySummary local_standby_db = 36 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $local_standby_db = null; - /** - * Output only. The amount of memory enabled per ECPU, in gigabytes. - * - * Generated from protobuf field int32 memory_per_oracle_compute_unit_gbs = 37 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $memory_per_oracle_compute_unit_gbs = 0; - /** - * Output only. This field indicates the local disaster recovery (DR) type of - * an Autonomous Database. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.LocalDisasterRecoveryType local_disaster_recovery_type = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $local_disaster_recovery_type = 0; - /** - * Output only. The current state of the Data Safe registration for the - * Autonomous Database. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.DataSafeState data_safe_state = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $data_safe_state = 0; - /** - * Output only. The current state of database management for the Autonomous - * Database. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.DatabaseManagementState database_management_state = 40 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $database_management_state = 0; - /** - * Output only. This field indicates the current mode of the Autonomous - * Database. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.OpenMode open_mode = 41 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $open_mode = 0; - /** - * Output only. This field indicates the state of Operations Insights for the - * Autonomous Database. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.OperationsInsightsState operations_insights_state = 42 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $operations_insights_state = 0; - /** - * Output only. The list of OCIDs of standby databases located in Autonomous - * Data Guard remote regions that are associated with the source database. - * - * Generated from protobuf field repeated string peer_db_ids = 43 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $peer_db_ids; - /** - * Output only. The permission level of the Autonomous Database. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.PermissionLevel permission_level = 44 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $permission_level = 0; - /** - * Output only. The private endpoint for the Autonomous Database. - * - * Generated from protobuf field string private_endpoint = 45 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $private_endpoint = ''; - /** - * Output only. The refresh mode of the cloned Autonomous Database. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.RefreshableMode refreshable_mode = 46 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $refreshable_mode = 0; - /** - * Output only. The refresh State of the clone. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.RefreshableState refreshable_state = 47 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $refreshable_state = 0; - /** - * Output only. The Data Guard role of the Autonomous Database. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.Role role = 48 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $role = 0; - /** - * Output only. The list and details of the scheduled operations of the - * Autonomous Database. - * - * Generated from protobuf field repeated .google.cloud.oracledatabase.v1.ScheduledOperationDetails scheduled_operation_details = 64 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $scheduled_operation_details; - /** - * Output only. The SQL Web Developer URL for the Autonomous Database. - * - * Generated from protobuf field string sql_web_developer_url = 50 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $sql_web_developer_url = ''; - /** - * Output only. The list of available regions that can be used to create a - * clone for the Autonomous Database. - * - * Generated from protobuf field repeated string supported_clone_regions = 51 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $supported_clone_regions; - /** - * Output only. The storage space used by Autonomous Database, in gigabytes. - * - * Generated from protobuf field int32 used_data_storage_size_tbs = 53 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $used_data_storage_size_tbs = 0; - /** - * Output only. The Oracle Cloud Infrastructure link for the Autonomous - * Database. - * - * Generated from protobuf field string oci_url = 54 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $oci_url = ''; - /** - * Output only. The storage space used by automatic backups of Autonomous - * Database, in gigabytes. - * - * Generated from protobuf field float total_auto_backup_storage_size_gbs = 59 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $total_auto_backup_storage_size_gbs = 0.0; - /** - * Output only. The long term backup schedule of the Autonomous Database. - * - * Generated from protobuf field .google.protobuf.Timestamp next_long_term_backup_time = 60 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $next_long_term_backup_time = null; - /** - * Output only. The date and time when maintenance will begin. - * - * Generated from protobuf field .google.protobuf.Timestamp maintenance_begin_time = 65 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $maintenance_begin_time = null; - /** - * Output only. The date and time when maintenance will end. - * - * Generated from protobuf field .google.protobuf.Timestamp maintenance_end_time = 66 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $maintenance_end_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $ocid - * Output only. OCID of the Autonomous Database. - * https://docs.oracle.com/en-us/iaas/Content/General/Concepts/identifiers.htm#Oracle - * @type float $compute_count - * Optional. The number of compute servers for the Autonomous Database. - * @type int $cpu_core_count - * Optional. The number of CPU cores to be made available to the database. - * @type int $data_storage_size_tb - * Optional. The size of the data stored in the database, in terabytes. - * @type int $data_storage_size_gb - * Optional. The size of the data stored in the database, in gigabytes. - * @type int $db_workload - * Required. The workload type of the Autonomous Database. - * @type int $db_edition - * Optional. The edition of the Autonomous Databases. - * @type string $character_set - * Optional. The character set for the Autonomous Database. The default is - * AL32UTF8. - * @type string $n_character_set - * Optional. The national character set for the Autonomous Database. The - * default is AL16UTF16. - * @type string $private_endpoint_ip - * Optional. The private endpoint IP address for the Autonomous Database. - * @type string $private_endpoint_label - * Optional. The private endpoint label for the Autonomous Database. - * @type string $db_version - * Optional. The Oracle Database version for the Autonomous Database. - * @type bool $is_auto_scaling_enabled - * Optional. This field indicates if auto scaling is enabled for the - * Autonomous Database CPU core count. - * @type bool $is_storage_auto_scaling_enabled - * Optional. This field indicates if auto scaling is enabled for the - * Autonomous Database storage. - * @type int $license_type - * Required. The license type used for the Autonomous Database. - * @type array<\Google\Cloud\OracleDatabase\V1\CustomerContact>|\Google\Protobuf\Internal\RepeatedField $customer_contacts - * Optional. The list of customer contacts. - * @type string $secret_id - * Optional. The ID of the Oracle Cloud Infrastructure vault secret. - * @type string $vault_id - * Optional. The ID of the Oracle Cloud Infrastructure vault. - * @type int $maintenance_schedule_type - * Optional. The maintenance schedule of the Autonomous Database. - * @type bool $mtls_connection_required - * Optional. This field specifies if the Autonomous Database requires mTLS - * connections. - * @type int $backup_retention_period_days - * Optional. The retention period for the Autonomous Database. This field is - * specified in days, can range from 1 day to 60 days, and has a default value - * of 60 days. - * @type float $actual_used_data_storage_size_tb - * Output only. The amount of storage currently being used for user and system - * data, in terabytes. - * @type float $allocated_storage_size_tb - * Output only. The amount of storage currently allocated for the database - * tables and billed for, rounded up in terabytes. - * @type \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseApex $apex_details - * Output only. The details for the Oracle APEX Application Development. - * @type bool $are_primary_allowlisted_ips_used - * Output only. This field indicates the status of Data Guard and Access - * control for the Autonomous Database. The field's value is null if Data - * Guard is disabled or Access Control is disabled. The field's value is TRUE - * if both Data Guard and Access Control are enabled, and the Autonomous - * Database is using primary IP access control list (ACL) for standby. The - * field's value is FALSE if both Data Guard and Access Control are enabled, - * and the Autonomous Database is using a different IP access control list - * (ACL) for standby compared to primary. - * @type string $lifecycle_details - * Output only. The details of the current lifestyle state of the Autonomous - * Database. - * @type int $state - * Output only. The current lifecycle state of the Autonomous Database. - * @type string $autonomous_container_database_id - * Output only. The Autonomous Container Database OCID. - * @type array|\Google\Protobuf\Internal\RepeatedField $available_upgrade_versions - * Output only. The list of available Oracle Database upgrade versions for an - * Autonomous Database. - * @type \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseConnectionStrings $connection_strings - * Output only. The connection strings used to connect to an Autonomous - * Database. - * @type \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseConnectionUrls $connection_urls - * Output only. The Oracle Connection URLs for an Autonomous Database. - * @type \Google\Protobuf\Duration $failed_data_recovery_duration - * Output only. This field indicates the number of seconds of data loss during - * a Data Guard failover. - * @type int $memory_table_gbs - * Output only. The memory assigned to in-memory tables in an Autonomous - * Database. - * @type bool $is_local_data_guard_enabled - * Output only. This field indicates whether the Autonomous Database has local - * (in-region) Data Guard enabled. - * @type int $local_adg_auto_failover_max_data_loss_limit - * Output only. This field indicates the maximum data loss limit for an - * Autonomous Database, in seconds. - * @type \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseStandbySummary $local_standby_db - * Output only. The details of the Autonomous Data Guard standby database. - * @type int $memory_per_oracle_compute_unit_gbs - * Output only. The amount of memory enabled per ECPU, in gigabytes. - * @type int $local_disaster_recovery_type - * Output only. This field indicates the local disaster recovery (DR) type of - * an Autonomous Database. - * @type int $data_safe_state - * Output only. The current state of the Data Safe registration for the - * Autonomous Database. - * @type int $database_management_state - * Output only. The current state of database management for the Autonomous - * Database. - * @type int $open_mode - * Output only. This field indicates the current mode of the Autonomous - * Database. - * @type int $operations_insights_state - * Output only. This field indicates the state of Operations Insights for the - * Autonomous Database. - * @type array|\Google\Protobuf\Internal\RepeatedField $peer_db_ids - * Output only. The list of OCIDs of standby databases located in Autonomous - * Data Guard remote regions that are associated with the source database. - * @type int $permission_level - * Output only. The permission level of the Autonomous Database. - * @type string $private_endpoint - * Output only. The private endpoint for the Autonomous Database. - * @type int $refreshable_mode - * Output only. The refresh mode of the cloned Autonomous Database. - * @type int $refreshable_state - * Output only. The refresh State of the clone. - * @type int $role - * Output only. The Data Guard role of the Autonomous Database. - * @type array<\Google\Cloud\OracleDatabase\V1\ScheduledOperationDetails>|\Google\Protobuf\Internal\RepeatedField $scheduled_operation_details - * Output only. The list and details of the scheduled operations of the - * Autonomous Database. - * @type string $sql_web_developer_url - * Output only. The SQL Web Developer URL for the Autonomous Database. - * @type array|\Google\Protobuf\Internal\RepeatedField $supported_clone_regions - * Output only. The list of available regions that can be used to create a - * clone for the Autonomous Database. - * @type int $used_data_storage_size_tbs - * Output only. The storage space used by Autonomous Database, in gigabytes. - * @type string $oci_url - * Output only. The Oracle Cloud Infrastructure link for the Autonomous - * Database. - * @type float $total_auto_backup_storage_size_gbs - * Output only. The storage space used by automatic backups of Autonomous - * Database, in gigabytes. - * @type \Google\Protobuf\Timestamp $next_long_term_backup_time - * Output only. The long term backup schedule of the Autonomous Database. - * @type \Google\Protobuf\Timestamp $maintenance_begin_time - * Output only. The date and time when maintenance will begin. - * @type \Google\Protobuf\Timestamp $maintenance_end_time - * Output only. The date and time when maintenance will end. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Oracledatabase\V1\AutonomousDatabase::initOnce(); - parent::__construct($data); - } - - /** - * Output only. OCID of the Autonomous Database. - * https://docs.oracle.com/en-us/iaas/Content/General/Concepts/identifiers.htm#Oracle - * - * Generated from protobuf field string ocid = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getOcid() - { - return $this->ocid; - } - - /** - * Output only. OCID of the Autonomous Database. - * https://docs.oracle.com/en-us/iaas/Content/General/Concepts/identifiers.htm#Oracle - * - * Generated from protobuf field string ocid = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setOcid($var) - { - GPBUtil::checkString($var, True); - $this->ocid = $var; - - return $this; - } - - /** - * Optional. The number of compute servers for the Autonomous Database. - * - * Generated from protobuf field float compute_count = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return float - */ - public function getComputeCount() - { - return $this->compute_count; - } - - /** - * Optional. The number of compute servers for the Autonomous Database. - * - * Generated from protobuf field float compute_count = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param float $var - * @return $this - */ - public function setComputeCount($var) - { - GPBUtil::checkFloat($var); - $this->compute_count = $var; - - return $this; - } - - /** - * Optional. The number of CPU cores to be made available to the database. - * - * Generated from protobuf field int32 cpu_core_count = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getCpuCoreCount() - { - return $this->cpu_core_count; - } - - /** - * Optional. The number of CPU cores to be made available to the database. - * - * Generated from protobuf field int32 cpu_core_count = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setCpuCoreCount($var) - { - GPBUtil::checkInt32($var); - $this->cpu_core_count = $var; - - return $this; - } - - /** - * Optional. The size of the data stored in the database, in terabytes. - * - * Generated from protobuf field int32 data_storage_size_tb = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getDataStorageSizeTb() - { - return $this->data_storage_size_tb; - } - - /** - * Optional. The size of the data stored in the database, in terabytes. - * - * Generated from protobuf field int32 data_storage_size_tb = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setDataStorageSizeTb($var) - { - GPBUtil::checkInt32($var); - $this->data_storage_size_tb = $var; - - return $this; - } - - /** - * Optional. The size of the data stored in the database, in gigabytes. - * - * Generated from protobuf field int32 data_storage_size_gb = 63 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getDataStorageSizeGb() - { - return $this->data_storage_size_gb; - } - - /** - * Optional. The size of the data stored in the database, in gigabytes. - * - * Generated from protobuf field int32 data_storage_size_gb = 63 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setDataStorageSizeGb($var) - { - GPBUtil::checkInt32($var); - $this->data_storage_size_gb = $var; - - return $this; - } - - /** - * Required. The workload type of the Autonomous Database. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.DBWorkload db_workload = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getDbWorkload() - { - return $this->db_workload; - } - - /** - * Required. The workload type of the Autonomous Database. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.DBWorkload db_workload = 5 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setDbWorkload($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\OracleDatabase\V1\DBWorkload::class); - $this->db_workload = $var; - - return $this; - } - - /** - * Optional. The edition of the Autonomous Databases. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.DatabaseEdition db_edition = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getDbEdition() - { - return $this->db_edition; - } - - /** - * Optional. The edition of the Autonomous Databases. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.DatabaseEdition db_edition = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setDbEdition($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseProperties\DatabaseEdition::class); - $this->db_edition = $var; - - return $this; - } - - /** - * Optional. The character set for the Autonomous Database. The default is - * AL32UTF8. - * - * Generated from protobuf field string character_set = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getCharacterSet() - { - return $this->character_set; - } - - /** - * Optional. The character set for the Autonomous Database. The default is - * AL32UTF8. - * - * Generated from protobuf field string character_set = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setCharacterSet($var) - { - GPBUtil::checkString($var, True); - $this->character_set = $var; - - return $this; - } - - /** - * Optional. The national character set for the Autonomous Database. The - * default is AL16UTF16. - * - * Generated from protobuf field string n_character_set = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getNCharacterSet() - { - return $this->n_character_set; - } - - /** - * Optional. The national character set for the Autonomous Database. The - * default is AL16UTF16. - * - * Generated from protobuf field string n_character_set = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setNCharacterSet($var) - { - GPBUtil::checkString($var, True); - $this->n_character_set = $var; - - return $this; - } - - /** - * Optional. The private endpoint IP address for the Autonomous Database. - * - * Generated from protobuf field string private_endpoint_ip = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPrivateEndpointIp() - { - return $this->private_endpoint_ip; - } - - /** - * Optional. The private endpoint IP address for the Autonomous Database. - * - * Generated from protobuf field string private_endpoint_ip = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPrivateEndpointIp($var) - { - GPBUtil::checkString($var, True); - $this->private_endpoint_ip = $var; - - return $this; - } - - /** - * Optional. The private endpoint label for the Autonomous Database. - * - * Generated from protobuf field string private_endpoint_label = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPrivateEndpointLabel() - { - return $this->private_endpoint_label; - } - - /** - * Optional. The private endpoint label for the Autonomous Database. - * - * Generated from protobuf field string private_endpoint_label = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPrivateEndpointLabel($var) - { - GPBUtil::checkString($var, True); - $this->private_endpoint_label = $var; - - return $this; - } - - /** - * Optional. The Oracle Database version for the Autonomous Database. - * - * Generated from protobuf field string db_version = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDbVersion() - { - return $this->db_version; - } - - /** - * Optional. The Oracle Database version for the Autonomous Database. - * - * Generated from protobuf field string db_version = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDbVersion($var) - { - GPBUtil::checkString($var, True); - $this->db_version = $var; - - return $this; - } - - /** - * Optional. This field indicates if auto scaling is enabled for the - * Autonomous Database CPU core count. - * - * Generated from protobuf field bool is_auto_scaling_enabled = 14 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getIsAutoScalingEnabled() - { - return $this->is_auto_scaling_enabled; - } - - /** - * Optional. This field indicates if auto scaling is enabled for the - * Autonomous Database CPU core count. - * - * Generated from protobuf field bool is_auto_scaling_enabled = 14 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setIsAutoScalingEnabled($var) - { - GPBUtil::checkBool($var); - $this->is_auto_scaling_enabled = $var; - - return $this; - } - - /** - * Optional. This field indicates if auto scaling is enabled for the - * Autonomous Database storage. - * - * Generated from protobuf field bool is_storage_auto_scaling_enabled = 15 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getIsStorageAutoScalingEnabled() - { - return $this->is_storage_auto_scaling_enabled; - } - - /** - * Optional. This field indicates if auto scaling is enabled for the - * Autonomous Database storage. - * - * Generated from protobuf field bool is_storage_auto_scaling_enabled = 15 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setIsStorageAutoScalingEnabled($var) - { - GPBUtil::checkBool($var); - $this->is_storage_auto_scaling_enabled = $var; - - return $this; - } - - /** - * Required. The license type used for the Autonomous Database. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.LicenseType license_type = 16 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getLicenseType() - { - return $this->license_type; - } - - /** - * Required. The license type used for the Autonomous Database. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.LicenseType license_type = 16 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setLicenseType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseProperties\LicenseType::class); - $this->license_type = $var; - - return $this; - } - - /** - * Optional. The list of customer contacts. - * - * Generated from protobuf field repeated .google.cloud.oracledatabase.v1.CustomerContact customer_contacts = 17 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCustomerContacts() - { - return $this->customer_contacts; - } - - /** - * Optional. The list of customer contacts. - * - * Generated from protobuf field repeated .google.cloud.oracledatabase.v1.CustomerContact customer_contacts = 17 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\OracleDatabase\V1\CustomerContact>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCustomerContacts($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\OracleDatabase\V1\CustomerContact::class); - $this->customer_contacts = $arr; - - return $this; - } - - /** - * Optional. The ID of the Oracle Cloud Infrastructure vault secret. - * - * Generated from protobuf field string secret_id = 18 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getSecretId() - { - return $this->secret_id; - } - - /** - * Optional. The ID of the Oracle Cloud Infrastructure vault secret. - * - * Generated from protobuf field string secret_id = 18 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setSecretId($var) - { - GPBUtil::checkString($var, True); - $this->secret_id = $var; - - return $this; - } - - /** - * Optional. The ID of the Oracle Cloud Infrastructure vault. - * - * Generated from protobuf field string vault_id = 19 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getVaultId() - { - return $this->vault_id; - } - - /** - * Optional. The ID of the Oracle Cloud Infrastructure vault. - * - * Generated from protobuf field string vault_id = 19 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setVaultId($var) - { - GPBUtil::checkString($var, True); - $this->vault_id = $var; - - return $this; - } - - /** - * Optional. The maintenance schedule of the Autonomous Database. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.MaintenanceScheduleType maintenance_schedule_type = 20 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getMaintenanceScheduleType() - { - return $this->maintenance_schedule_type; - } - - /** - * Optional. The maintenance schedule of the Autonomous Database. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.MaintenanceScheduleType maintenance_schedule_type = 20 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setMaintenanceScheduleType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseProperties\MaintenanceScheduleType::class); - $this->maintenance_schedule_type = $var; - - return $this; - } - - /** - * Optional. This field specifies if the Autonomous Database requires mTLS - * connections. - * - * Generated from protobuf field bool mtls_connection_required = 34 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getMtlsConnectionRequired() - { - return $this->mtls_connection_required; - } - - /** - * Optional. This field specifies if the Autonomous Database requires mTLS - * connections. - * - * Generated from protobuf field bool mtls_connection_required = 34 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setMtlsConnectionRequired($var) - { - GPBUtil::checkBool($var); - $this->mtls_connection_required = $var; - - return $this; - } - - /** - * Optional. The retention period for the Autonomous Database. This field is - * specified in days, can range from 1 day to 60 days, and has a default value - * of 60 days. - * - * Generated from protobuf field int32 backup_retention_period_days = 57 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getBackupRetentionPeriodDays() - { - return $this->backup_retention_period_days; - } - - /** - * Optional. The retention period for the Autonomous Database. This field is - * specified in days, can range from 1 day to 60 days, and has a default value - * of 60 days. - * - * Generated from protobuf field int32 backup_retention_period_days = 57 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setBackupRetentionPeriodDays($var) - { - GPBUtil::checkInt32($var); - $this->backup_retention_period_days = $var; - - return $this; - } - - /** - * Output only. The amount of storage currently being used for user and system - * data, in terabytes. - * - * Generated from protobuf field double actual_used_data_storage_size_tb = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return float - */ - public function getActualUsedDataStorageSizeTb() - { - return $this->actual_used_data_storage_size_tb; - } - - /** - * Output only. The amount of storage currently being used for user and system - * data, in terabytes. - * - * Generated from protobuf field double actual_used_data_storage_size_tb = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param float $var - * @return $this - */ - public function setActualUsedDataStorageSizeTb($var) - { - GPBUtil::checkDouble($var); - $this->actual_used_data_storage_size_tb = $var; - - return $this; - } - - /** - * Output only. The amount of storage currently allocated for the database - * tables and billed for, rounded up in terabytes. - * - * Generated from protobuf field double allocated_storage_size_tb = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return float - */ - public function getAllocatedStorageSizeTb() - { - return $this->allocated_storage_size_tb; - } - - /** - * Output only. The amount of storage currently allocated for the database - * tables and billed for, rounded up in terabytes. - * - * Generated from protobuf field double allocated_storage_size_tb = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param float $var - * @return $this - */ - public function setAllocatedStorageSizeTb($var) - { - GPBUtil::checkDouble($var); - $this->allocated_storage_size_tb = $var; - - return $this; - } - - /** - * Output only. The details for the Oracle APEX Application Development. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseApex apex_details = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseApex|null - */ - public function getApexDetails() - { - return $this->apex_details; - } - - public function hasApexDetails() - { - return isset($this->apex_details); - } - - public function clearApexDetails() - { - unset($this->apex_details); - } - - /** - * Output only. The details for the Oracle APEX Application Development. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseApex apex_details = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseApex $var - * @return $this - */ - public function setApexDetails($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseApex::class); - $this->apex_details = $var; - - return $this; - } - - /** - * Output only. This field indicates the status of Data Guard and Access - * control for the Autonomous Database. The field's value is null if Data - * Guard is disabled or Access Control is disabled. The field's value is TRUE - * if both Data Guard and Access Control are enabled, and the Autonomous - * Database is using primary IP access control list (ACL) for standby. The - * field's value is FALSE if both Data Guard and Access Control are enabled, - * and the Autonomous Database is using a different IP access control list - * (ACL) for standby compared to primary. - * - * Generated from protobuf field optional bool are_primary_allowlisted_ips_used = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getArePrimaryAllowlistedIpsUsed() - { - return isset($this->are_primary_allowlisted_ips_used) ? $this->are_primary_allowlisted_ips_used : false; - } - - public function hasArePrimaryAllowlistedIpsUsed() - { - return isset($this->are_primary_allowlisted_ips_used); - } - - public function clearArePrimaryAllowlistedIpsUsed() - { - unset($this->are_primary_allowlisted_ips_used); - } - - /** - * Output only. This field indicates the status of Data Guard and Access - * control for the Autonomous Database. The field's value is null if Data - * Guard is disabled or Access Control is disabled. The field's value is TRUE - * if both Data Guard and Access Control are enabled, and the Autonomous - * Database is using primary IP access control list (ACL) for standby. The - * field's value is FALSE if both Data Guard and Access Control are enabled, - * and the Autonomous Database is using a different IP access control list - * (ACL) for standby compared to primary. - * - * Generated from protobuf field optional bool are_primary_allowlisted_ips_used = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setArePrimaryAllowlistedIpsUsed($var) - { - GPBUtil::checkBool($var); - $this->are_primary_allowlisted_ips_used = $var; - - return $this; - } - - /** - * Output only. The details of the current lifestyle state of the Autonomous - * Database. - * - * Generated from protobuf field string lifecycle_details = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getLifecycleDetails() - { - return $this->lifecycle_details; - } - - /** - * Output only. The details of the current lifestyle state of the Autonomous - * Database. - * - * Generated from protobuf field string lifecycle_details = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setLifecycleDetails($var) - { - GPBUtil::checkString($var, True); - $this->lifecycle_details = $var; - - return $this; - } - - /** - * Output only. The current lifecycle state of the Autonomous Database. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.State state = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The current lifecycle state of the Autonomous Database. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.State state = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\OracleDatabase\V1\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. The Autonomous Container Database OCID. - * - * Generated from protobuf field string autonomous_container_database_id = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getAutonomousContainerDatabaseId() - { - return $this->autonomous_container_database_id; - } - - /** - * Output only. The Autonomous Container Database OCID. - * - * Generated from protobuf field string autonomous_container_database_id = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setAutonomousContainerDatabaseId($var) - { - GPBUtil::checkString($var, True); - $this->autonomous_container_database_id = $var; - - return $this; - } - - /** - * Output only. The list of available Oracle Database upgrade versions for an - * Autonomous Database. - * - * Generated from protobuf field repeated string available_upgrade_versions = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAvailableUpgradeVersions() - { - return $this->available_upgrade_versions; - } - - /** - * Output only. The list of available Oracle Database upgrade versions for an - * Autonomous Database. - * - * Generated from protobuf field repeated string available_upgrade_versions = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAvailableUpgradeVersions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->available_upgrade_versions = $arr; - - return $this; - } - - /** - * Output only. The connection strings used to connect to an Autonomous - * Database. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseConnectionStrings connection_strings = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseConnectionStrings|null - */ - public function getConnectionStrings() - { - return $this->connection_strings; - } - - public function hasConnectionStrings() - { - return isset($this->connection_strings); - } - - public function clearConnectionStrings() - { - unset($this->connection_strings); - } - - /** - * Output only. The connection strings used to connect to an Autonomous - * Database. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseConnectionStrings connection_strings = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseConnectionStrings $var - * @return $this - */ - public function setConnectionStrings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseConnectionStrings::class); - $this->connection_strings = $var; - - return $this; - } - - /** - * Output only. The Oracle Connection URLs for an Autonomous Database. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseConnectionUrls connection_urls = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseConnectionUrls|null - */ - public function getConnectionUrls() - { - return $this->connection_urls; - } - - public function hasConnectionUrls() - { - return isset($this->connection_urls); - } - - public function clearConnectionUrls() - { - unset($this->connection_urls); - } - - /** - * Output only. The Oracle Connection URLs for an Autonomous Database. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseConnectionUrls connection_urls = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseConnectionUrls $var - * @return $this - */ - public function setConnectionUrls($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseConnectionUrls::class); - $this->connection_urls = $var; - - return $this; - } - - /** - * Output only. This field indicates the number of seconds of data loss during - * a Data Guard failover. - * - * Generated from protobuf field .google.protobuf.Duration failed_data_recovery_duration = 31 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Duration|null - */ - public function getFailedDataRecoveryDuration() - { - return $this->failed_data_recovery_duration; - } - - public function hasFailedDataRecoveryDuration() - { - return isset($this->failed_data_recovery_duration); - } - - public function clearFailedDataRecoveryDuration() - { - unset($this->failed_data_recovery_duration); - } - - /** - * Output only. This field indicates the number of seconds of data loss during - * a Data Guard failover. - * - * Generated from protobuf field .google.protobuf.Duration failed_data_recovery_duration = 31 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setFailedDataRecoveryDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->failed_data_recovery_duration = $var; - - return $this; - } - - /** - * Output only. The memory assigned to in-memory tables in an Autonomous - * Database. - * - * Generated from protobuf field int32 memory_table_gbs = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getMemoryTableGbs() - { - return $this->memory_table_gbs; - } - - /** - * Output only. The memory assigned to in-memory tables in an Autonomous - * Database. - * - * Generated from protobuf field int32 memory_table_gbs = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setMemoryTableGbs($var) - { - GPBUtil::checkInt32($var); - $this->memory_table_gbs = $var; - - return $this; - } - - /** - * Output only. This field indicates whether the Autonomous Database has local - * (in-region) Data Guard enabled. - * - * Generated from protobuf field bool is_local_data_guard_enabled = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getIsLocalDataGuardEnabled() - { - return $this->is_local_data_guard_enabled; - } - - /** - * Output only. This field indicates whether the Autonomous Database has local - * (in-region) Data Guard enabled. - * - * Generated from protobuf field bool is_local_data_guard_enabled = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setIsLocalDataGuardEnabled($var) - { - GPBUtil::checkBool($var); - $this->is_local_data_guard_enabled = $var; - - return $this; - } - - /** - * Output only. This field indicates the maximum data loss limit for an - * Autonomous Database, in seconds. - * - * Generated from protobuf field int32 local_adg_auto_failover_max_data_loss_limit = 35 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getLocalAdgAutoFailoverMaxDataLossLimit() - { - return $this->local_adg_auto_failover_max_data_loss_limit; - } - - /** - * Output only. This field indicates the maximum data loss limit for an - * Autonomous Database, in seconds. - * - * Generated from protobuf field int32 local_adg_auto_failover_max_data_loss_limit = 35 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setLocalAdgAutoFailoverMaxDataLossLimit($var) - { - GPBUtil::checkInt32($var); - $this->local_adg_auto_failover_max_data_loss_limit = $var; - - return $this; - } - - /** - * Output only. The details of the Autonomous Data Guard standby database. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseStandbySummary local_standby_db = 36 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseStandbySummary|null - */ - public function getLocalStandbyDb() - { - return $this->local_standby_db; - } - - public function hasLocalStandbyDb() - { - return isset($this->local_standby_db); - } - - public function clearLocalStandbyDb() - { - unset($this->local_standby_db); - } - - /** - * Output only. The details of the Autonomous Data Guard standby database. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseStandbySummary local_standby_db = 36 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseStandbySummary $var - * @return $this - */ - public function setLocalStandbyDb($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseStandbySummary::class); - $this->local_standby_db = $var; - - return $this; - } - - /** - * Output only. The amount of memory enabled per ECPU, in gigabytes. - * - * Generated from protobuf field int32 memory_per_oracle_compute_unit_gbs = 37 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getMemoryPerOracleComputeUnitGbs() - { - return $this->memory_per_oracle_compute_unit_gbs; - } - - /** - * Output only. The amount of memory enabled per ECPU, in gigabytes. - * - * Generated from protobuf field int32 memory_per_oracle_compute_unit_gbs = 37 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setMemoryPerOracleComputeUnitGbs($var) - { - GPBUtil::checkInt32($var); - $this->memory_per_oracle_compute_unit_gbs = $var; - - return $this; - } - - /** - * Output only. This field indicates the local disaster recovery (DR) type of - * an Autonomous Database. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.LocalDisasterRecoveryType local_disaster_recovery_type = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getLocalDisasterRecoveryType() - { - return $this->local_disaster_recovery_type; - } - - /** - * Output only. This field indicates the local disaster recovery (DR) type of - * an Autonomous Database. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.LocalDisasterRecoveryType local_disaster_recovery_type = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setLocalDisasterRecoveryType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseProperties\LocalDisasterRecoveryType::class); - $this->local_disaster_recovery_type = $var; - - return $this; - } - - /** - * Output only. The current state of the Data Safe registration for the - * Autonomous Database. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.DataSafeState data_safe_state = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getDataSafeState() - { - return $this->data_safe_state; - } - - /** - * Output only. The current state of the Data Safe registration for the - * Autonomous Database. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.DataSafeState data_safe_state = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setDataSafeState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseProperties\DataSafeState::class); - $this->data_safe_state = $var; - - return $this; - } - - /** - * Output only. The current state of database management for the Autonomous - * Database. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.DatabaseManagementState database_management_state = 40 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getDatabaseManagementState() - { - return $this->database_management_state; - } - - /** - * Output only. The current state of database management for the Autonomous - * Database. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.DatabaseManagementState database_management_state = 40 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setDatabaseManagementState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseProperties\DatabaseManagementState::class); - $this->database_management_state = $var; - - return $this; - } - - /** - * Output only. This field indicates the current mode of the Autonomous - * Database. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.OpenMode open_mode = 41 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getOpenMode() - { - return $this->open_mode; - } - - /** - * Output only. This field indicates the current mode of the Autonomous - * Database. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.OpenMode open_mode = 41 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setOpenMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseProperties\OpenMode::class); - $this->open_mode = $var; - - return $this; - } - - /** - * Output only. This field indicates the state of Operations Insights for the - * Autonomous Database. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.OperationsInsightsState operations_insights_state = 42 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getOperationsInsightsState() - { - return $this->operations_insights_state; - } - - /** - * Output only. This field indicates the state of Operations Insights for the - * Autonomous Database. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.OperationsInsightsState operations_insights_state = 42 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setOperationsInsightsState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\OracleDatabase\V1\OperationsInsightsState::class); - $this->operations_insights_state = $var; - - return $this; - } - - /** - * Output only. The list of OCIDs of standby databases located in Autonomous - * Data Guard remote regions that are associated with the source database. - * - * Generated from protobuf field repeated string peer_db_ids = 43 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPeerDbIds() - { - return $this->peer_db_ids; - } - - /** - * Output only. The list of OCIDs of standby databases located in Autonomous - * Data Guard remote regions that are associated with the source database. - * - * Generated from protobuf field repeated string peer_db_ids = 43 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPeerDbIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->peer_db_ids = $arr; - - return $this; - } - - /** - * Output only. The permission level of the Autonomous Database. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.PermissionLevel permission_level = 44 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getPermissionLevel() - { - return $this->permission_level; - } - - /** - * Output only. The permission level of the Autonomous Database. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.PermissionLevel permission_level = 44 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setPermissionLevel($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseProperties\PermissionLevel::class); - $this->permission_level = $var; - - return $this; - } - - /** - * Output only. The private endpoint for the Autonomous Database. - * - * Generated from protobuf field string private_endpoint = 45 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getPrivateEndpoint() - { - return $this->private_endpoint; - } - - /** - * Output only. The private endpoint for the Autonomous Database. - * - * Generated from protobuf field string private_endpoint = 45 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setPrivateEndpoint($var) - { - GPBUtil::checkString($var, True); - $this->private_endpoint = $var; - - return $this; - } - - /** - * Output only. The refresh mode of the cloned Autonomous Database. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.RefreshableMode refreshable_mode = 46 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getRefreshableMode() - { - return $this->refreshable_mode; - } - - /** - * Output only. The refresh mode of the cloned Autonomous Database. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.RefreshableMode refreshable_mode = 46 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setRefreshableMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseProperties\RefreshableMode::class); - $this->refreshable_mode = $var; - - return $this; - } - - /** - * Output only. The refresh State of the clone. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.RefreshableState refreshable_state = 47 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getRefreshableState() - { - return $this->refreshable_state; - } - - /** - * Output only. The refresh State of the clone. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.RefreshableState refreshable_state = 47 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setRefreshableState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseProperties\RefreshableState::class); - $this->refreshable_state = $var; - - return $this; - } - - /** - * Output only. The Data Guard role of the Autonomous Database. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.Role role = 48 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getRole() - { - return $this->role; - } - - /** - * Output only. The Data Guard role of the Autonomous Database. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.Role role = 48 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setRole($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseProperties\Role::class); - $this->role = $var; - - return $this; - } - - /** - * Output only. The list and details of the scheduled operations of the - * Autonomous Database. - * - * Generated from protobuf field repeated .google.cloud.oracledatabase.v1.ScheduledOperationDetails scheduled_operation_details = 64 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getScheduledOperationDetails() - { - return $this->scheduled_operation_details; - } - - /** - * Output only. The list and details of the scheduled operations of the - * Autonomous Database. - * - * Generated from protobuf field repeated .google.cloud.oracledatabase.v1.ScheduledOperationDetails scheduled_operation_details = 64 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\OracleDatabase\V1\ScheduledOperationDetails>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setScheduledOperationDetails($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\OracleDatabase\V1\ScheduledOperationDetails::class); - $this->scheduled_operation_details = $arr; - - return $this; - } - - /** - * Output only. The SQL Web Developer URL for the Autonomous Database. - * - * Generated from protobuf field string sql_web_developer_url = 50 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getSqlWebDeveloperUrl() - { - return $this->sql_web_developer_url; - } - - /** - * Output only. The SQL Web Developer URL for the Autonomous Database. - * - * Generated from protobuf field string sql_web_developer_url = 50 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setSqlWebDeveloperUrl($var) - { - GPBUtil::checkString($var, True); - $this->sql_web_developer_url = $var; - - return $this; - } - - /** - * Output only. The list of available regions that can be used to create a - * clone for the Autonomous Database. - * - * Generated from protobuf field repeated string supported_clone_regions = 51 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSupportedCloneRegions() - { - return $this->supported_clone_regions; - } - - /** - * Output only. The list of available regions that can be used to create a - * clone for the Autonomous Database. - * - * Generated from protobuf field repeated string supported_clone_regions = 51 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSupportedCloneRegions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->supported_clone_regions = $arr; - - return $this; - } - - /** - * Output only. The storage space used by Autonomous Database, in gigabytes. - * - * Generated from protobuf field int32 used_data_storage_size_tbs = 53 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getUsedDataStorageSizeTbs() - { - return $this->used_data_storage_size_tbs; - } - - /** - * Output only. The storage space used by Autonomous Database, in gigabytes. - * - * Generated from protobuf field int32 used_data_storage_size_tbs = 53 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setUsedDataStorageSizeTbs($var) - { - GPBUtil::checkInt32($var); - $this->used_data_storage_size_tbs = $var; - - return $this; - } - - /** - * Output only. The Oracle Cloud Infrastructure link for the Autonomous - * Database. - * - * Generated from protobuf field string oci_url = 54 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getOciUrl() - { - return $this->oci_url; - } - - /** - * Output only. The Oracle Cloud Infrastructure link for the Autonomous - * Database. - * - * Generated from protobuf field string oci_url = 54 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setOciUrl($var) - { - GPBUtil::checkString($var, True); - $this->oci_url = $var; - - return $this; - } - - /** - * Output only. The storage space used by automatic backups of Autonomous - * Database, in gigabytes. - * - * Generated from protobuf field float total_auto_backup_storage_size_gbs = 59 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return float - */ - public function getTotalAutoBackupStorageSizeGbs() - { - return $this->total_auto_backup_storage_size_gbs; - } - - /** - * Output only. The storage space used by automatic backups of Autonomous - * Database, in gigabytes. - * - * Generated from protobuf field float total_auto_backup_storage_size_gbs = 59 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param float $var - * @return $this - */ - public function setTotalAutoBackupStorageSizeGbs($var) - { - GPBUtil::checkFloat($var); - $this->total_auto_backup_storage_size_gbs = $var; - - return $this; - } - - /** - * Output only. The long term backup schedule of the Autonomous Database. - * - * Generated from protobuf field .google.protobuf.Timestamp next_long_term_backup_time = 60 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getNextLongTermBackupTime() - { - return $this->next_long_term_backup_time; - } - - public function hasNextLongTermBackupTime() - { - return isset($this->next_long_term_backup_time); - } - - public function clearNextLongTermBackupTime() - { - unset($this->next_long_term_backup_time); - } - - /** - * Output only. The long term backup schedule of the Autonomous Database. - * - * Generated from protobuf field .google.protobuf.Timestamp next_long_term_backup_time = 60 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setNextLongTermBackupTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->next_long_term_backup_time = $var; - - return $this; - } - - /** - * Output only. The date and time when maintenance will begin. - * - * Generated from protobuf field .google.protobuf.Timestamp maintenance_begin_time = 65 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getMaintenanceBeginTime() - { - return $this->maintenance_begin_time; - } - - public function hasMaintenanceBeginTime() - { - return isset($this->maintenance_begin_time); - } - - public function clearMaintenanceBeginTime() - { - unset($this->maintenance_begin_time); - } - - /** - * Output only. The date and time when maintenance will begin. - * - * Generated from protobuf field .google.protobuf.Timestamp maintenance_begin_time = 65 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setMaintenanceBeginTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->maintenance_begin_time = $var; - - return $this; - } - - /** - * Output only. The date and time when maintenance will end. - * - * Generated from protobuf field .google.protobuf.Timestamp maintenance_end_time = 66 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getMaintenanceEndTime() - { - return $this->maintenance_end_time; - } - - public function hasMaintenanceEndTime() - { - return isset($this->maintenance_end_time); - } - - public function clearMaintenanceEndTime() - { - unset($this->maintenance_end_time); - } - - /** - * Output only. The date and time when maintenance will end. - * - * Generated from protobuf field .google.protobuf.Timestamp maintenance_end_time = 66 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setMaintenanceEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->maintenance_end_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseProperties/DataSafeState.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseProperties/DataSafeState.php deleted file mode 100644 index 156d722b5854..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseProperties/DataSafeState.php +++ /dev/null @@ -1,85 +0,0 @@ -google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.DataSafeState - */ -class DataSafeState -{ - /** - * Default unspecified value. - * - * Generated from protobuf enum DATA_SAFE_STATE_UNSPECIFIED = 0; - */ - const DATA_SAFE_STATE_UNSPECIFIED = 0; - /** - * Registering data safe state. - * - * Generated from protobuf enum REGISTERING = 1; - */ - const REGISTERING = 1; - /** - * Registered data safe state. - * - * Generated from protobuf enum REGISTERED = 2; - */ - const REGISTERED = 2; - /** - * Deregistering data safe state. - * - * Generated from protobuf enum DEREGISTERING = 3; - */ - const DEREGISTERING = 3; - /** - * Not registered data safe state. - * - * Generated from protobuf enum NOT_REGISTERED = 4; - */ - const NOT_REGISTERED = 4; - /** - * Failed data safe state. - * - * Generated from protobuf enum FAILED = 5; - */ - const FAILED = 5; - - private static $valueToName = [ - self::DATA_SAFE_STATE_UNSPECIFIED => 'DATA_SAFE_STATE_UNSPECIFIED', - self::REGISTERING => 'REGISTERING', - self::REGISTERED => 'REGISTERED', - self::DEREGISTERING => 'DEREGISTERING', - self::NOT_REGISTERED => 'NOT_REGISTERED', - self::FAILED => 'FAILED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DataSafeState::class, \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseProperties_DataSafeState::class); - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseProperties/DatabaseEdition.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseProperties/DatabaseEdition.php deleted file mode 100644 index 23aaf036fc31..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseProperties/DatabaseEdition.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.DatabaseEdition - */ -class DatabaseEdition -{ - /** - * Default unspecified value. - * - * Generated from protobuf enum DATABASE_EDITION_UNSPECIFIED = 0; - */ - const DATABASE_EDITION_UNSPECIFIED = 0; - /** - * Standard Database Edition - * - * Generated from protobuf enum STANDARD_EDITION = 1; - */ - const STANDARD_EDITION = 1; - /** - * Enterprise Database Edition - * - * Generated from protobuf enum ENTERPRISE_EDITION = 2; - */ - const ENTERPRISE_EDITION = 2; - - private static $valueToName = [ - self::DATABASE_EDITION_UNSPECIFIED => 'DATABASE_EDITION_UNSPECIFIED', - self::STANDARD_EDITION => 'STANDARD_EDITION', - self::ENTERPRISE_EDITION => 'ENTERPRISE_EDITION', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DatabaseEdition::class, \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseProperties_DatabaseEdition::class); - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseProperties/DatabaseManagementState.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseProperties/DatabaseManagementState.php deleted file mode 100644 index b88dab5a98e7..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseProperties/DatabaseManagementState.php +++ /dev/null @@ -1,92 +0,0 @@ -google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.DatabaseManagementState - */ -class DatabaseManagementState -{ - /** - * Default unspecified value. - * - * Generated from protobuf enum DATABASE_MANAGEMENT_STATE_UNSPECIFIED = 0; - */ - const DATABASE_MANAGEMENT_STATE_UNSPECIFIED = 0; - /** - * Enabling Database Management state - * - * Generated from protobuf enum ENABLING = 1; - */ - const ENABLING = 1; - /** - * Enabled Database Management state - * - * Generated from protobuf enum ENABLED = 2; - */ - const ENABLED = 2; - /** - * Disabling Database Management state - * - * Generated from protobuf enum DISABLING = 3; - */ - const DISABLING = 3; - /** - * Not Enabled Database Management state - * - * Generated from protobuf enum NOT_ENABLED = 4; - */ - const NOT_ENABLED = 4; - /** - * Failed enabling Database Management state - * - * Generated from protobuf enum FAILED_ENABLING = 5; - */ - const FAILED_ENABLING = 5; - /** - * Failed disabling Database Management state - * - * Generated from protobuf enum FAILED_DISABLING = 6; - */ - const FAILED_DISABLING = 6; - - private static $valueToName = [ - self::DATABASE_MANAGEMENT_STATE_UNSPECIFIED => 'DATABASE_MANAGEMENT_STATE_UNSPECIFIED', - self::ENABLING => 'ENABLING', - self::ENABLED => 'ENABLED', - self::DISABLING => 'DISABLING', - self::NOT_ENABLED => 'NOT_ENABLED', - self::FAILED_ENABLING => 'FAILED_ENABLING', - self::FAILED_DISABLING => 'FAILED_DISABLING', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DatabaseManagementState::class, \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseProperties_DatabaseManagementState::class); - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseProperties/LicenseType.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseProperties/LicenseType.php deleted file mode 100644 index fc1207bc5641..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseProperties/LicenseType.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.LicenseType - */ -class LicenseType -{ - /** - * Unspecified - * - * Generated from protobuf enum LICENSE_TYPE_UNSPECIFIED = 0; - */ - const LICENSE_TYPE_UNSPECIFIED = 0; - /** - * License included part of offer - * - * Generated from protobuf enum LICENSE_INCLUDED = 1; - */ - const LICENSE_INCLUDED = 1; - /** - * Bring your own license - * - * Generated from protobuf enum BRING_YOUR_OWN_LICENSE = 2; - */ - const BRING_YOUR_OWN_LICENSE = 2; - - private static $valueToName = [ - self::LICENSE_TYPE_UNSPECIFIED => 'LICENSE_TYPE_UNSPECIFIED', - self::LICENSE_INCLUDED => 'LICENSE_INCLUDED', - self::BRING_YOUR_OWN_LICENSE => 'BRING_YOUR_OWN_LICENSE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(LicenseType::class, \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseProperties_LicenseType::class); - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseProperties/LocalDisasterRecoveryType.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseProperties/LocalDisasterRecoveryType.php deleted file mode 100644 index 84a02743cd88..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseProperties/LocalDisasterRecoveryType.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.LocalDisasterRecoveryType - */ -class LocalDisasterRecoveryType -{ - /** - * Default unspecified value. - * - * Generated from protobuf enum LOCAL_DISASTER_RECOVERY_TYPE_UNSPECIFIED = 0; - */ - const LOCAL_DISASTER_RECOVERY_TYPE_UNSPECIFIED = 0; - /** - * Autonomous Data Guard recovery. - * - * Generated from protobuf enum ADG = 1; - */ - const ADG = 1; - /** - * Backup based recovery. - * - * Generated from protobuf enum BACKUP_BASED = 2; - */ - const BACKUP_BASED = 2; - - private static $valueToName = [ - self::LOCAL_DISASTER_RECOVERY_TYPE_UNSPECIFIED => 'LOCAL_DISASTER_RECOVERY_TYPE_UNSPECIFIED', - self::ADG => 'ADG', - self::BACKUP_BASED => 'BACKUP_BASED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(LocalDisasterRecoveryType::class, \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseProperties_LocalDisasterRecoveryType::class); - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseProperties/MaintenanceScheduleType.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseProperties/MaintenanceScheduleType.php deleted file mode 100644 index 5ef0262bff50..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseProperties/MaintenanceScheduleType.php +++ /dev/null @@ -1,65 +0,0 @@ -google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.MaintenanceScheduleType - */ -class MaintenanceScheduleType -{ - /** - * Default unspecified value. - * - * Generated from protobuf enum MAINTENANCE_SCHEDULE_TYPE_UNSPECIFIED = 0; - */ - const MAINTENANCE_SCHEDULE_TYPE_UNSPECIFIED = 0; - /** - * An EARLY maintenance schedule patches the database before - * the regular scheduled maintenance. - * - * Generated from protobuf enum EARLY = 1; - */ - const EARLY = 1; - /** - * A REGULAR maintenance schedule follows the normal maintenance cycle. - * - * Generated from protobuf enum REGULAR = 2; - */ - const REGULAR = 2; - - private static $valueToName = [ - self::MAINTENANCE_SCHEDULE_TYPE_UNSPECIFIED => 'MAINTENANCE_SCHEDULE_TYPE_UNSPECIFIED', - self::EARLY => 'EARLY', - self::REGULAR => 'REGULAR', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(MaintenanceScheduleType::class, \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseProperties_MaintenanceScheduleType::class); - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseProperties/OpenMode.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseProperties/OpenMode.php deleted file mode 100644 index dd509ef1210d..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseProperties/OpenMode.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.OpenMode - */ -class OpenMode -{ - /** - * Default unspecified value. - * - * Generated from protobuf enum OPEN_MODE_UNSPECIFIED = 0; - */ - const OPEN_MODE_UNSPECIFIED = 0; - /** - * Read Only Mode - * - * Generated from protobuf enum READ_ONLY = 1; - */ - const READ_ONLY = 1; - /** - * Read Write Mode - * - * Generated from protobuf enum READ_WRITE = 2; - */ - const READ_WRITE = 2; - - private static $valueToName = [ - self::OPEN_MODE_UNSPECIFIED => 'OPEN_MODE_UNSPECIFIED', - self::READ_ONLY => 'READ_ONLY', - self::READ_WRITE => 'READ_WRITE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(OpenMode::class, \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseProperties_OpenMode::class); - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseProperties/PermissionLevel.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseProperties/PermissionLevel.php deleted file mode 100644 index f500235b4607..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseProperties/PermissionLevel.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.PermissionLevel - */ -class PermissionLevel -{ - /** - * Default unspecified value. - * - * Generated from protobuf enum PERMISSION_LEVEL_UNSPECIFIED = 0; - */ - const PERMISSION_LEVEL_UNSPECIFIED = 0; - /** - * Restricted mode allows access only by admin users. - * - * Generated from protobuf enum RESTRICTED = 1; - */ - const RESTRICTED = 1; - /** - * Normal access. - * - * Generated from protobuf enum UNRESTRICTED = 2; - */ - const UNRESTRICTED = 2; - - private static $valueToName = [ - self::PERMISSION_LEVEL_UNSPECIFIED => 'PERMISSION_LEVEL_UNSPECIFIED', - self::RESTRICTED => 'RESTRICTED', - self::UNRESTRICTED => 'UNRESTRICTED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(PermissionLevel::class, \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseProperties_PermissionLevel::class); - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseProperties/RefreshableMode.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseProperties/RefreshableMode.php deleted file mode 100644 index c3a92917eccf..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseProperties/RefreshableMode.php +++ /dev/null @@ -1,66 +0,0 @@ -google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.RefreshableMode - */ -class RefreshableMode -{ - /** - * The default unspecified value. - * - * Generated from protobuf enum REFRESHABLE_MODE_UNSPECIFIED = 0; - */ - const REFRESHABLE_MODE_UNSPECIFIED = 0; - /** - * AUTOMATIC indicates that the cloned database is automatically - * refreshed with data from the source Autonomous Database. - * - * Generated from protobuf enum AUTOMATIC = 1; - */ - const AUTOMATIC = 1; - /** - * MANUAL indicates that the cloned database is manually refreshed with - * data from the source Autonomous Database. - * - * Generated from protobuf enum MANUAL = 2; - */ - const MANUAL = 2; - - private static $valueToName = [ - self::REFRESHABLE_MODE_UNSPECIFIED => 'REFRESHABLE_MODE_UNSPECIFIED', - self::AUTOMATIC => 'AUTOMATIC', - self::MANUAL => 'MANUAL', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(RefreshableMode::class, \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseProperties_RefreshableMode::class); - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseProperties/RefreshableState.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseProperties/RefreshableState.php deleted file mode 100644 index b6c0f8ba9bd7..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseProperties/RefreshableState.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.RefreshableState - */ -class RefreshableState -{ - /** - * Default unspecified value. - * - * Generated from protobuf enum REFRESHABLE_STATE_UNSPECIFIED = 0; - */ - const REFRESHABLE_STATE_UNSPECIFIED = 0; - /** - * Refreshing - * - * Generated from protobuf enum REFRESHING = 1; - */ - const REFRESHING = 1; - /** - * Not refreshed - * - * Generated from protobuf enum NOT_REFRESHING = 2; - */ - const NOT_REFRESHING = 2; - - private static $valueToName = [ - self::REFRESHABLE_STATE_UNSPECIFIED => 'REFRESHABLE_STATE_UNSPECIFIED', - self::REFRESHING => 'REFRESHING', - self::NOT_REFRESHING => 'NOT_REFRESHING', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(RefreshableState::class, \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseProperties_RefreshableState::class); - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseProperties/Role.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseProperties/Role.php deleted file mode 100644 index 3e70e82b862a..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseProperties/Role.php +++ /dev/null @@ -1,85 +0,0 @@ -google.cloud.oracledatabase.v1.AutonomousDatabaseProperties.Role - */ -class Role -{ - /** - * Default unspecified value. - * - * Generated from protobuf enum ROLE_UNSPECIFIED = 0; - */ - const ROLE_UNSPECIFIED = 0; - /** - * Primary role - * - * Generated from protobuf enum PRIMARY = 1; - */ - const PRIMARY = 1; - /** - * Standby role - * - * Generated from protobuf enum STANDBY = 2; - */ - const STANDBY = 2; - /** - * Disabled standby role - * - * Generated from protobuf enum DISABLED_STANDBY = 3; - */ - const DISABLED_STANDBY = 3; - /** - * Backup copy role - * - * Generated from protobuf enum BACKUP_COPY = 4; - */ - const BACKUP_COPY = 4; - /** - * Snapshot standby role - * - * Generated from protobuf enum SNAPSHOT_STANDBY = 5; - */ - const SNAPSHOT_STANDBY = 5; - - private static $valueToName = [ - self::ROLE_UNSPECIFIED => 'ROLE_UNSPECIFIED', - self::PRIMARY => 'PRIMARY', - self::STANDBY => 'STANDBY', - self::DISABLED_STANDBY => 'DISABLED_STANDBY', - self::BACKUP_COPY => 'BACKUP_COPY', - self::SNAPSHOT_STANDBY => 'SNAPSHOT_STANDBY', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Role::class, \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseProperties_Role::class); - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseStandbySummary.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseStandbySummary.php deleted file mode 100644 index 424aeff56287..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDatabaseStandbySummary.php +++ /dev/null @@ -1,250 +0,0 @@ -google.cloud.oracledatabase.v1.AutonomousDatabaseStandbySummary - */ -class AutonomousDatabaseStandbySummary extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The amount of time, in seconds, that the data of the standby - * database lags in comparison to the data of the primary database. - * - * Generated from protobuf field .google.protobuf.Duration lag_time_duration = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $lag_time_duration = null; - /** - * Output only. The additional details about the current lifecycle state of - * the Autonomous Database. - * - * Generated from protobuf field string lifecycle_details = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $lifecycle_details = ''; - /** - * Output only. The current lifecycle state of the Autonomous Database. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. The date and time the Autonomous Data Guard role was switched - * for the standby Autonomous Database. - * - * Generated from protobuf field .google.protobuf.Timestamp data_guard_role_changed_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $data_guard_role_changed_time = null; - /** - * Output only. The date and time the Disaster Recovery role was switched for - * the standby Autonomous Database. - * - * Generated from protobuf field .google.protobuf.Timestamp disaster_recovery_role_changed_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $disaster_recovery_role_changed_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Duration $lag_time_duration - * Output only. The amount of time, in seconds, that the data of the standby - * database lags in comparison to the data of the primary database. - * @type string $lifecycle_details - * Output only. The additional details about the current lifecycle state of - * the Autonomous Database. - * @type int $state - * Output only. The current lifecycle state of the Autonomous Database. - * @type \Google\Protobuf\Timestamp $data_guard_role_changed_time - * Output only. The date and time the Autonomous Data Guard role was switched - * for the standby Autonomous Database. - * @type \Google\Protobuf\Timestamp $disaster_recovery_role_changed_time - * Output only. The date and time the Disaster Recovery role was switched for - * the standby Autonomous Database. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Oracledatabase\V1\AutonomousDatabase::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The amount of time, in seconds, that the data of the standby - * database lags in comparison to the data of the primary database. - * - * Generated from protobuf field .google.protobuf.Duration lag_time_duration = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Duration|null - */ - public function getLagTimeDuration() - { - return $this->lag_time_duration; - } - - public function hasLagTimeDuration() - { - return isset($this->lag_time_duration); - } - - public function clearLagTimeDuration() - { - unset($this->lag_time_duration); - } - - /** - * Output only. The amount of time, in seconds, that the data of the standby - * database lags in comparison to the data of the primary database. - * - * Generated from protobuf field .google.protobuf.Duration lag_time_duration = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setLagTimeDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->lag_time_duration = $var; - - return $this; - } - - /** - * Output only. The additional details about the current lifecycle state of - * the Autonomous Database. - * - * Generated from protobuf field string lifecycle_details = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getLifecycleDetails() - { - return $this->lifecycle_details; - } - - /** - * Output only. The additional details about the current lifecycle state of - * the Autonomous Database. - * - * Generated from protobuf field string lifecycle_details = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setLifecycleDetails($var) - { - GPBUtil::checkString($var, True); - $this->lifecycle_details = $var; - - return $this; - } - - /** - * Output only. The current lifecycle state of the Autonomous Database. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The current lifecycle state of the Autonomous Database. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\OracleDatabase\V1\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. The date and time the Autonomous Data Guard role was switched - * for the standby Autonomous Database. - * - * Generated from protobuf field .google.protobuf.Timestamp data_guard_role_changed_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getDataGuardRoleChangedTime() - { - return $this->data_guard_role_changed_time; - } - - public function hasDataGuardRoleChangedTime() - { - return isset($this->data_guard_role_changed_time); - } - - public function clearDataGuardRoleChangedTime() - { - unset($this->data_guard_role_changed_time); - } - - /** - * Output only. The date and time the Autonomous Data Guard role was switched - * for the standby Autonomous Database. - * - * Generated from protobuf field .google.protobuf.Timestamp data_guard_role_changed_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setDataGuardRoleChangedTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->data_guard_role_changed_time = $var; - - return $this; - } - - /** - * Output only. The date and time the Disaster Recovery role was switched for - * the standby Autonomous Database. - * - * Generated from protobuf field .google.protobuf.Timestamp disaster_recovery_role_changed_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getDisasterRecoveryRoleChangedTime() - { - return $this->disaster_recovery_role_changed_time; - } - - public function hasDisasterRecoveryRoleChangedTime() - { - return isset($this->disaster_recovery_role_changed_time); - } - - public function clearDisasterRecoveryRoleChangedTime() - { - unset($this->disaster_recovery_role_changed_time); - } - - /** - * Output only. The date and time the Disaster Recovery role was switched for - * the standby Autonomous Database. - * - * Generated from protobuf field .google.protobuf.Timestamp disaster_recovery_role_changed_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setDisasterRecoveryRoleChangedTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->disaster_recovery_role_changed_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDbVersion.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDbVersion.php deleted file mode 100644 index a303b6b0ead7..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/AutonomousDbVersion.php +++ /dev/null @@ -1,182 +0,0 @@ -google.cloud.oracledatabase.v1.AutonomousDbVersion - */ -class AutonomousDbVersion extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. The name of the Autonomous Database Version resource with the - * format: - * projects/{project}/locations/{region}/autonomousDbVersions/{autonomous_db_version} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Output only. An Oracle Database version for Autonomous Database. - * - * Generated from protobuf field string version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $version = ''; - /** - * Output only. The Autonomous Database workload type. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.DBWorkload db_workload = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $db_workload = 0; - /** - * Output only. A URL that points to a detailed description of the Autonomous - * Database version. - * - * Generated from protobuf field string workload_uri = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $workload_uri = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. The name of the Autonomous Database Version resource with the - * format: - * projects/{project}/locations/{region}/autonomousDbVersions/{autonomous_db_version} - * @type string $version - * Output only. An Oracle Database version for Autonomous Database. - * @type int $db_workload - * Output only. The Autonomous Database workload type. - * @type string $workload_uri - * Output only. A URL that points to a detailed description of the Autonomous - * Database version. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Oracledatabase\V1\AutonomousDbVersion::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. The name of the Autonomous Database Version resource with the - * format: - * projects/{project}/locations/{region}/autonomousDbVersions/{autonomous_db_version} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. The name of the Autonomous Database Version resource with the - * format: - * projects/{project}/locations/{region}/autonomousDbVersions/{autonomous_db_version} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. An Oracle Database version for Autonomous Database. - * - * Generated from protobuf field string version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * Output only. An Oracle Database version for Autonomous Database. - * - * Generated from protobuf field string version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkString($var, True); - $this->version = $var; - - return $this; - } - - /** - * Output only. The Autonomous Database workload type. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.DBWorkload db_workload = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getDbWorkload() - { - return $this->db_workload; - } - - /** - * Output only. The Autonomous Database workload type. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.DBWorkload db_workload = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setDbWorkload($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\OracleDatabase\V1\DBWorkload::class); - $this->db_workload = $var; - - return $this; - } - - /** - * Output only. A URL that points to a detailed description of the Autonomous - * Database version. - * - * Generated from protobuf field string workload_uri = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getWorkloadUri() - { - return $this->workload_uri; - } - - /** - * Output only. A URL that points to a detailed description of the Autonomous - * Database version. - * - * Generated from protobuf field string workload_uri = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setWorkloadUri($var) - { - GPBUtil::checkString($var, True); - $this->workload_uri = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CloudAccountDetails.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CloudAccountDetails.php deleted file mode 100644 index 3d7419e5588c..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CloudAccountDetails.php +++ /dev/null @@ -1,189 +0,0 @@ -google.cloud.oracledatabase.v1.CloudAccountDetails - */ -class CloudAccountDetails extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. OCI account name. - * - * Generated from protobuf field string cloud_account = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $cloud_account = ''; - /** - * Output only. OCI account home region. - * - * Generated from protobuf field string cloud_account_home_region = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $cloud_account_home_region = ''; - /** - * Output only. URL to link an existing account. - * - * Generated from protobuf field optional string link_existing_account_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $link_existing_account_uri = null; - /** - * Output only. URL to create a new account and link. - * - * Generated from protobuf field optional string account_creation_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $account_creation_uri = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $cloud_account - * Output only. OCI account name. - * @type string $cloud_account_home_region - * Output only. OCI account home region. - * @type string $link_existing_account_uri - * Output only. URL to link an existing account. - * @type string $account_creation_uri - * Output only. URL to create a new account and link. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Oracledatabase\V1\Entitlement::initOnce(); - parent::__construct($data); - } - - /** - * Output only. OCI account name. - * - * Generated from protobuf field string cloud_account = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getCloudAccount() - { - return $this->cloud_account; - } - - /** - * Output only. OCI account name. - * - * Generated from protobuf field string cloud_account = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setCloudAccount($var) - { - GPBUtil::checkString($var, True); - $this->cloud_account = $var; - - return $this; - } - - /** - * Output only. OCI account home region. - * - * Generated from protobuf field string cloud_account_home_region = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getCloudAccountHomeRegion() - { - return $this->cloud_account_home_region; - } - - /** - * Output only. OCI account home region. - * - * Generated from protobuf field string cloud_account_home_region = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setCloudAccountHomeRegion($var) - { - GPBUtil::checkString($var, True); - $this->cloud_account_home_region = $var; - - return $this; - } - - /** - * Output only. URL to link an existing account. - * - * Generated from protobuf field optional string link_existing_account_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getLinkExistingAccountUri() - { - return isset($this->link_existing_account_uri) ? $this->link_existing_account_uri : ''; - } - - public function hasLinkExistingAccountUri() - { - return isset($this->link_existing_account_uri); - } - - public function clearLinkExistingAccountUri() - { - unset($this->link_existing_account_uri); - } - - /** - * Output only. URL to link an existing account. - * - * Generated from protobuf field optional string link_existing_account_uri = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setLinkExistingAccountUri($var) - { - GPBUtil::checkString($var, True); - $this->link_existing_account_uri = $var; - - return $this; - } - - /** - * Output only. URL to create a new account and link. - * - * Generated from protobuf field optional string account_creation_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getAccountCreationUri() - { - return isset($this->account_creation_uri) ? $this->account_creation_uri : ''; - } - - public function hasAccountCreationUri() - { - return isset($this->account_creation_uri); - } - - public function clearAccountCreationUri() - { - unset($this->account_creation_uri); - } - - /** - * Output only. URL to create a new account and link. - * - * Generated from protobuf field optional string account_creation_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setAccountCreationUri($var) - { - GPBUtil::checkString($var, True); - $this->account_creation_uri = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CloudExadataInfrastructure.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CloudExadataInfrastructure.php deleted file mode 100644 index 2f3453a3469f..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CloudExadataInfrastructure.php +++ /dev/null @@ -1,304 +0,0 @@ -google.cloud.oracledatabase.v1.CloudExadataInfrastructure - */ -class CloudExadataInfrastructure extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. The name of the Exadata Infrastructure resource with the - * format: - * projects/{project}/locations/{region}/cloudExadataInfrastructures/{cloud_exadata_infrastructure} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Optional. User friendly name for this resource. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $display_name = ''; - /** - * Optional. Google Cloud Platform location where Oracle Exadata is hosted. - * - * Generated from protobuf field string gcp_oracle_zone = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $gcp_oracle_zone = ''; - /** - * Output only. Entitlement ID of the private offer against which this - * infrastructure resource is provisioned. - * - * Generated from protobuf field string entitlement_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $entitlement_id = ''; - /** - * Optional. Various properties of the infra. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.CloudExadataInfrastructureProperties properties = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $properties = null; - /** - * Optional. Labels or tags associated with the resource. - * - * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - /** - * Output only. The date and time that the Exadata Infrastructure was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. The name of the Exadata Infrastructure resource with the - * format: - * projects/{project}/locations/{region}/cloudExadataInfrastructures/{cloud_exadata_infrastructure} - * @type string $display_name - * Optional. User friendly name for this resource. - * @type string $gcp_oracle_zone - * Optional. Google Cloud Platform location where Oracle Exadata is hosted. - * @type string $entitlement_id - * Output only. Entitlement ID of the private offer against which this - * infrastructure resource is provisioned. - * @type \Google\Cloud\OracleDatabase\V1\CloudExadataInfrastructureProperties $properties - * Optional. Various properties of the infra. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. Labels or tags associated with the resource. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The date and time that the Exadata Infrastructure was created. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Oracledatabase\V1\ExadataInfra::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. The name of the Exadata Infrastructure resource with the - * format: - * projects/{project}/locations/{region}/cloudExadataInfrastructures/{cloud_exadata_infrastructure} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. The name of the Exadata Infrastructure resource with the - * format: - * projects/{project}/locations/{region}/cloudExadataInfrastructures/{cloud_exadata_infrastructure} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. User friendly name for this resource. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Optional. User friendly name for this resource. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Optional. Google Cloud Platform location where Oracle Exadata is hosted. - * - * Generated from protobuf field string gcp_oracle_zone = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getGcpOracleZone() - { - return $this->gcp_oracle_zone; - } - - /** - * Optional. Google Cloud Platform location where Oracle Exadata is hosted. - * - * Generated from protobuf field string gcp_oracle_zone = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setGcpOracleZone($var) - { - GPBUtil::checkString($var, True); - $this->gcp_oracle_zone = $var; - - return $this; - } - - /** - * Output only. Entitlement ID of the private offer against which this - * infrastructure resource is provisioned. - * - * Generated from protobuf field string entitlement_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getEntitlementId() - { - return $this->entitlement_id; - } - - /** - * Output only. Entitlement ID of the private offer against which this - * infrastructure resource is provisioned. - * - * Generated from protobuf field string entitlement_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setEntitlementId($var) - { - GPBUtil::checkString($var, True); - $this->entitlement_id = $var; - - return $this; - } - - /** - * Optional. Various properties of the infra. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.CloudExadataInfrastructureProperties properties = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\OracleDatabase\V1\CloudExadataInfrastructureProperties|null - */ - public function getProperties() - { - return $this->properties; - } - - public function hasProperties() - { - return isset($this->properties); - } - - public function clearProperties() - { - unset($this->properties); - } - - /** - * Optional. Various properties of the infra. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.CloudExadataInfrastructureProperties properties = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\OracleDatabase\V1\CloudExadataInfrastructureProperties $var - * @return $this - */ - public function setProperties($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OracleDatabase\V1\CloudExadataInfrastructureProperties::class); - $this->properties = $var; - - return $this; - } - - /** - * Optional. Labels or tags associated with the resource. - * - * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. Labels or tags associated with the resource. - * - * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Output only. The date and time that the Exadata Infrastructure was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The date and time that the Exadata Infrastructure was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CloudExadataInfrastructureProperties.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CloudExadataInfrastructureProperties.php deleted file mode 100644 index 97d78c5bb6bd..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CloudExadataInfrastructureProperties.php +++ /dev/null @@ -1,1025 +0,0 @@ -google.cloud.oracledatabase.v1.CloudExadataInfrastructureProperties - */ -class CloudExadataInfrastructureProperties extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. OCID of created infra. - * https://docs.oracle.com/en-us/iaas/Content/General/Concepts/identifiers.htm#Oracle - * - * Generated from protobuf field string ocid = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $ocid = ''; - /** - * Optional. The number of compute servers for the Exadata Infrastructure. - * - * Generated from protobuf field int32 compute_count = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $compute_count = 0; - /** - * Optional. The number of Cloud Exadata storage servers for the Exadata - * Infrastructure. - * - * Generated from protobuf field int32 storage_count = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $storage_count = 0; - /** - * Optional. The total storage allocated to the Exadata Infrastructure - * resource, in gigabytes (GB). - * - * Generated from protobuf field int32 total_storage_size_gb = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $total_storage_size_gb = 0; - /** - * Output only. The available storage can be allocated to the Exadata - * Infrastructure resource, in gigabytes (GB). - * - * Generated from protobuf field int32 available_storage_size_gb = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $available_storage_size_gb = 0; - /** - * Optional. Maintenance window for repair. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.MaintenanceWindow maintenance_window = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $maintenance_window = null; - /** - * Output only. The current lifecycle state of the Exadata Infrastructure. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.CloudExadataInfrastructureProperties.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Required. The shape of the Exadata Infrastructure. The shape determines the - * amount of CPU, storage, and memory resources allocated to the instance. - * - * Generated from protobuf field string shape = 8 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $shape = ''; - /** - * Output only. Deep link to the OCI console to view this resource. - * - * Generated from protobuf field string oci_url = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $oci_url = ''; - /** - * Optional. The number of enabled CPU cores. - * - * Generated from protobuf field int32 cpu_count = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $cpu_count = 0; - /** - * Output only. The total number of CPU cores available. - * - * Generated from protobuf field int32 max_cpu_count = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $max_cpu_count = 0; - /** - * Optional. The memory allocated in GBs. - * - * Generated from protobuf field int32 memory_size_gb = 12 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $memory_size_gb = 0; - /** - * Output only. The total memory available in GBs. - * - * Generated from protobuf field int32 max_memory_gb = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $max_memory_gb = 0; - /** - * Optional. The local node storage allocated in GBs. - * - * Generated from protobuf field int32 db_node_storage_size_gb = 14 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $db_node_storage_size_gb = 0; - /** - * Output only. The total local node storage available in GBs. - * - * Generated from protobuf field int32 max_db_node_storage_size_gb = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $max_db_node_storage_size_gb = 0; - /** - * Output only. Size, in terabytes, of the DATA disk group. - * - * Generated from protobuf field double data_storage_size_tb = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $data_storage_size_tb = 0.0; - /** - * Output only. The total available DATA disk group size. - * - * Generated from protobuf field double max_data_storage_tb = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $max_data_storage_tb = 0.0; - /** - * Output only. The requested number of additional storage servers activated - * for the Exadata Infrastructure. - * - * Generated from protobuf field int32 activated_storage_count = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $activated_storage_count = 0; - /** - * Output only. The requested number of additional storage servers for the - * Exadata Infrastructure. - * - * Generated from protobuf field int32 additional_storage_count = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $additional_storage_count = 0; - /** - * Output only. The software version of the database servers (dom0) in the - * Exadata Infrastructure. - * - * Generated from protobuf field string db_server_version = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $db_server_version = ''; - /** - * Output only. The software version of the storage servers (cells) in the - * Exadata Infrastructure. - * - * Generated from protobuf field string storage_server_version = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $storage_server_version = ''; - /** - * Output only. The OCID of the next maintenance run. - * - * Generated from protobuf field string next_maintenance_run_id = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $next_maintenance_run_id = ''; - /** - * Output only. The time when the next maintenance run will occur. - * - * Generated from protobuf field .google.protobuf.Timestamp next_maintenance_run_time = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $next_maintenance_run_time = null; - /** - * Output only. The time when the next security maintenance run will occur. - * - * Generated from protobuf field .google.protobuf.Timestamp next_security_maintenance_run_time = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $next_security_maintenance_run_time = null; - /** - * Optional. The list of customer contacts. - * - * Generated from protobuf field repeated .google.cloud.oracledatabase.v1.CustomerContact customer_contacts = 25 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $customer_contacts; - /** - * Output only. The monthly software version of the storage servers (cells) - * in the Exadata Infrastructure. Example: 20.1.15 - * - * Generated from protobuf field string monthly_storage_server_version = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $monthly_storage_server_version = ''; - /** - * Output only. The monthly software version of the database servers (dom0) - * in the Exadata Infrastructure. Example: 20.1.15 - * - * Generated from protobuf field string monthly_db_server_version = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $monthly_db_server_version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $ocid - * Output only. OCID of created infra. - * https://docs.oracle.com/en-us/iaas/Content/General/Concepts/identifiers.htm#Oracle - * @type int $compute_count - * Optional. The number of compute servers for the Exadata Infrastructure. - * @type int $storage_count - * Optional. The number of Cloud Exadata storage servers for the Exadata - * Infrastructure. - * @type int $total_storage_size_gb - * Optional. The total storage allocated to the Exadata Infrastructure - * resource, in gigabytes (GB). - * @type int $available_storage_size_gb - * Output only. The available storage can be allocated to the Exadata - * Infrastructure resource, in gigabytes (GB). - * @type \Google\Cloud\OracleDatabase\V1\MaintenanceWindow $maintenance_window - * Optional. Maintenance window for repair. - * @type int $state - * Output only. The current lifecycle state of the Exadata Infrastructure. - * @type string $shape - * Required. The shape of the Exadata Infrastructure. The shape determines the - * amount of CPU, storage, and memory resources allocated to the instance. - * @type string $oci_url - * Output only. Deep link to the OCI console to view this resource. - * @type int $cpu_count - * Optional. The number of enabled CPU cores. - * @type int $max_cpu_count - * Output only. The total number of CPU cores available. - * @type int $memory_size_gb - * Optional. The memory allocated in GBs. - * @type int $max_memory_gb - * Output only. The total memory available in GBs. - * @type int $db_node_storage_size_gb - * Optional. The local node storage allocated in GBs. - * @type int $max_db_node_storage_size_gb - * Output only. The total local node storage available in GBs. - * @type float $data_storage_size_tb - * Output only. Size, in terabytes, of the DATA disk group. - * @type float $max_data_storage_tb - * Output only. The total available DATA disk group size. - * @type int $activated_storage_count - * Output only. The requested number of additional storage servers activated - * for the Exadata Infrastructure. - * @type int $additional_storage_count - * Output only. The requested number of additional storage servers for the - * Exadata Infrastructure. - * @type string $db_server_version - * Output only. The software version of the database servers (dom0) in the - * Exadata Infrastructure. - * @type string $storage_server_version - * Output only. The software version of the storage servers (cells) in the - * Exadata Infrastructure. - * @type string $next_maintenance_run_id - * Output only. The OCID of the next maintenance run. - * @type \Google\Protobuf\Timestamp $next_maintenance_run_time - * Output only. The time when the next maintenance run will occur. - * @type \Google\Protobuf\Timestamp $next_security_maintenance_run_time - * Output only. The time when the next security maintenance run will occur. - * @type array<\Google\Cloud\OracleDatabase\V1\CustomerContact>|\Google\Protobuf\Internal\RepeatedField $customer_contacts - * Optional. The list of customer contacts. - * @type string $monthly_storage_server_version - * Output only. The monthly software version of the storage servers (cells) - * in the Exadata Infrastructure. Example: 20.1.15 - * @type string $monthly_db_server_version - * Output only. The monthly software version of the database servers (dom0) - * in the Exadata Infrastructure. Example: 20.1.15 - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Oracledatabase\V1\ExadataInfra::initOnce(); - parent::__construct($data); - } - - /** - * Output only. OCID of created infra. - * https://docs.oracle.com/en-us/iaas/Content/General/Concepts/identifiers.htm#Oracle - * - * Generated from protobuf field string ocid = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getOcid() - { - return $this->ocid; - } - - /** - * Output only. OCID of created infra. - * https://docs.oracle.com/en-us/iaas/Content/General/Concepts/identifiers.htm#Oracle - * - * Generated from protobuf field string ocid = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setOcid($var) - { - GPBUtil::checkString($var, True); - $this->ocid = $var; - - return $this; - } - - /** - * Optional. The number of compute servers for the Exadata Infrastructure. - * - * Generated from protobuf field int32 compute_count = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getComputeCount() - { - return $this->compute_count; - } - - /** - * Optional. The number of compute servers for the Exadata Infrastructure. - * - * Generated from protobuf field int32 compute_count = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setComputeCount($var) - { - GPBUtil::checkInt32($var); - $this->compute_count = $var; - - return $this; - } - - /** - * Optional. The number of Cloud Exadata storage servers for the Exadata - * Infrastructure. - * - * Generated from protobuf field int32 storage_count = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getStorageCount() - { - return $this->storage_count; - } - - /** - * Optional. The number of Cloud Exadata storage servers for the Exadata - * Infrastructure. - * - * Generated from protobuf field int32 storage_count = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setStorageCount($var) - { - GPBUtil::checkInt32($var); - $this->storage_count = $var; - - return $this; - } - - /** - * Optional. The total storage allocated to the Exadata Infrastructure - * resource, in gigabytes (GB). - * - * Generated from protobuf field int32 total_storage_size_gb = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getTotalStorageSizeGb() - { - return $this->total_storage_size_gb; - } - - /** - * Optional. The total storage allocated to the Exadata Infrastructure - * resource, in gigabytes (GB). - * - * Generated from protobuf field int32 total_storage_size_gb = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setTotalStorageSizeGb($var) - { - GPBUtil::checkInt32($var); - $this->total_storage_size_gb = $var; - - return $this; - } - - /** - * Output only. The available storage can be allocated to the Exadata - * Infrastructure resource, in gigabytes (GB). - * - * Generated from protobuf field int32 available_storage_size_gb = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getAvailableStorageSizeGb() - { - return $this->available_storage_size_gb; - } - - /** - * Output only. The available storage can be allocated to the Exadata - * Infrastructure resource, in gigabytes (GB). - * - * Generated from protobuf field int32 available_storage_size_gb = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setAvailableStorageSizeGb($var) - { - GPBUtil::checkInt32($var); - $this->available_storage_size_gb = $var; - - return $this; - } - - /** - * Optional. Maintenance window for repair. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.MaintenanceWindow maintenance_window = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\OracleDatabase\V1\MaintenanceWindow|null - */ - public function getMaintenanceWindow() - { - return $this->maintenance_window; - } - - public function hasMaintenanceWindow() - { - return isset($this->maintenance_window); - } - - public function clearMaintenanceWindow() - { - unset($this->maintenance_window); - } - - /** - * Optional. Maintenance window for repair. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.MaintenanceWindow maintenance_window = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\OracleDatabase\V1\MaintenanceWindow $var - * @return $this - */ - public function setMaintenanceWindow($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OracleDatabase\V1\MaintenanceWindow::class); - $this->maintenance_window = $var; - - return $this; - } - - /** - * Output only. The current lifecycle state of the Exadata Infrastructure. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.CloudExadataInfrastructureProperties.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The current lifecycle state of the Exadata Infrastructure. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.CloudExadataInfrastructureProperties.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\OracleDatabase\V1\CloudExadataInfrastructureProperties\State::class); - $this->state = $var; - - return $this; - } - - /** - * Required. The shape of the Exadata Infrastructure. The shape determines the - * amount of CPU, storage, and memory resources allocated to the instance. - * - * Generated from protobuf field string shape = 8 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getShape() - { - return $this->shape; - } - - /** - * Required. The shape of the Exadata Infrastructure. The shape determines the - * amount of CPU, storage, and memory resources allocated to the instance. - * - * Generated from protobuf field string shape = 8 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setShape($var) - { - GPBUtil::checkString($var, True); - $this->shape = $var; - - return $this; - } - - /** - * Output only. Deep link to the OCI console to view this resource. - * - * Generated from protobuf field string oci_url = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getOciUrl() - { - return $this->oci_url; - } - - /** - * Output only. Deep link to the OCI console to view this resource. - * - * Generated from protobuf field string oci_url = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setOciUrl($var) - { - GPBUtil::checkString($var, True); - $this->oci_url = $var; - - return $this; - } - - /** - * Optional. The number of enabled CPU cores. - * - * Generated from protobuf field int32 cpu_count = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getCpuCount() - { - return $this->cpu_count; - } - - /** - * Optional. The number of enabled CPU cores. - * - * Generated from protobuf field int32 cpu_count = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setCpuCount($var) - { - GPBUtil::checkInt32($var); - $this->cpu_count = $var; - - return $this; - } - - /** - * Output only. The total number of CPU cores available. - * - * Generated from protobuf field int32 max_cpu_count = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getMaxCpuCount() - { - return $this->max_cpu_count; - } - - /** - * Output only. The total number of CPU cores available. - * - * Generated from protobuf field int32 max_cpu_count = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setMaxCpuCount($var) - { - GPBUtil::checkInt32($var); - $this->max_cpu_count = $var; - - return $this; - } - - /** - * Optional. The memory allocated in GBs. - * - * Generated from protobuf field int32 memory_size_gb = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getMemorySizeGb() - { - return $this->memory_size_gb; - } - - /** - * Optional. The memory allocated in GBs. - * - * Generated from protobuf field int32 memory_size_gb = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setMemorySizeGb($var) - { - GPBUtil::checkInt32($var); - $this->memory_size_gb = $var; - - return $this; - } - - /** - * Output only. The total memory available in GBs. - * - * Generated from protobuf field int32 max_memory_gb = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getMaxMemoryGb() - { - return $this->max_memory_gb; - } - - /** - * Output only. The total memory available in GBs. - * - * Generated from protobuf field int32 max_memory_gb = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setMaxMemoryGb($var) - { - GPBUtil::checkInt32($var); - $this->max_memory_gb = $var; - - return $this; - } - - /** - * Optional. The local node storage allocated in GBs. - * - * Generated from protobuf field int32 db_node_storage_size_gb = 14 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getDbNodeStorageSizeGb() - { - return $this->db_node_storage_size_gb; - } - - /** - * Optional. The local node storage allocated in GBs. - * - * Generated from protobuf field int32 db_node_storage_size_gb = 14 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setDbNodeStorageSizeGb($var) - { - GPBUtil::checkInt32($var); - $this->db_node_storage_size_gb = $var; - - return $this; - } - - /** - * Output only. The total local node storage available in GBs. - * - * Generated from protobuf field int32 max_db_node_storage_size_gb = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getMaxDbNodeStorageSizeGb() - { - return $this->max_db_node_storage_size_gb; - } - - /** - * Output only. The total local node storage available in GBs. - * - * Generated from protobuf field int32 max_db_node_storage_size_gb = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setMaxDbNodeStorageSizeGb($var) - { - GPBUtil::checkInt32($var); - $this->max_db_node_storage_size_gb = $var; - - return $this; - } - - /** - * Output only. Size, in terabytes, of the DATA disk group. - * - * Generated from protobuf field double data_storage_size_tb = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return float - */ - public function getDataStorageSizeTb() - { - return $this->data_storage_size_tb; - } - - /** - * Output only. Size, in terabytes, of the DATA disk group. - * - * Generated from protobuf field double data_storage_size_tb = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param float $var - * @return $this - */ - public function setDataStorageSizeTb($var) - { - GPBUtil::checkDouble($var); - $this->data_storage_size_tb = $var; - - return $this; - } - - /** - * Output only. The total available DATA disk group size. - * - * Generated from protobuf field double max_data_storage_tb = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return float - */ - public function getMaxDataStorageTb() - { - return $this->max_data_storage_tb; - } - - /** - * Output only. The total available DATA disk group size. - * - * Generated from protobuf field double max_data_storage_tb = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param float $var - * @return $this - */ - public function setMaxDataStorageTb($var) - { - GPBUtil::checkDouble($var); - $this->max_data_storage_tb = $var; - - return $this; - } - - /** - * Output only. The requested number of additional storage servers activated - * for the Exadata Infrastructure. - * - * Generated from protobuf field int32 activated_storage_count = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getActivatedStorageCount() - { - return $this->activated_storage_count; - } - - /** - * Output only. The requested number of additional storage servers activated - * for the Exadata Infrastructure. - * - * Generated from protobuf field int32 activated_storage_count = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setActivatedStorageCount($var) - { - GPBUtil::checkInt32($var); - $this->activated_storage_count = $var; - - return $this; - } - - /** - * Output only. The requested number of additional storage servers for the - * Exadata Infrastructure. - * - * Generated from protobuf field int32 additional_storage_count = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getAdditionalStorageCount() - { - return $this->additional_storage_count; - } - - /** - * Output only. The requested number of additional storage servers for the - * Exadata Infrastructure. - * - * Generated from protobuf field int32 additional_storage_count = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setAdditionalStorageCount($var) - { - GPBUtil::checkInt32($var); - $this->additional_storage_count = $var; - - return $this; - } - - /** - * Output only. The software version of the database servers (dom0) in the - * Exadata Infrastructure. - * - * Generated from protobuf field string db_server_version = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getDbServerVersion() - { - return $this->db_server_version; - } - - /** - * Output only. The software version of the database servers (dom0) in the - * Exadata Infrastructure. - * - * Generated from protobuf field string db_server_version = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setDbServerVersion($var) - { - GPBUtil::checkString($var, True); - $this->db_server_version = $var; - - return $this; - } - - /** - * Output only. The software version of the storage servers (cells) in the - * Exadata Infrastructure. - * - * Generated from protobuf field string storage_server_version = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getStorageServerVersion() - { - return $this->storage_server_version; - } - - /** - * Output only. The software version of the storage servers (cells) in the - * Exadata Infrastructure. - * - * Generated from protobuf field string storage_server_version = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setStorageServerVersion($var) - { - GPBUtil::checkString($var, True); - $this->storage_server_version = $var; - - return $this; - } - - /** - * Output only. The OCID of the next maintenance run. - * - * Generated from protobuf field string next_maintenance_run_id = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getNextMaintenanceRunId() - { - return $this->next_maintenance_run_id; - } - - /** - * Output only. The OCID of the next maintenance run. - * - * Generated from protobuf field string next_maintenance_run_id = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setNextMaintenanceRunId($var) - { - GPBUtil::checkString($var, True); - $this->next_maintenance_run_id = $var; - - return $this; - } - - /** - * Output only. The time when the next maintenance run will occur. - * - * Generated from protobuf field .google.protobuf.Timestamp next_maintenance_run_time = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getNextMaintenanceRunTime() - { - return $this->next_maintenance_run_time; - } - - public function hasNextMaintenanceRunTime() - { - return isset($this->next_maintenance_run_time); - } - - public function clearNextMaintenanceRunTime() - { - unset($this->next_maintenance_run_time); - } - - /** - * Output only. The time when the next maintenance run will occur. - * - * Generated from protobuf field .google.protobuf.Timestamp next_maintenance_run_time = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setNextMaintenanceRunTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->next_maintenance_run_time = $var; - - return $this; - } - - /** - * Output only. The time when the next security maintenance run will occur. - * - * Generated from protobuf field .google.protobuf.Timestamp next_security_maintenance_run_time = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getNextSecurityMaintenanceRunTime() - { - return $this->next_security_maintenance_run_time; - } - - public function hasNextSecurityMaintenanceRunTime() - { - return isset($this->next_security_maintenance_run_time); - } - - public function clearNextSecurityMaintenanceRunTime() - { - unset($this->next_security_maintenance_run_time); - } - - /** - * Output only. The time when the next security maintenance run will occur. - * - * Generated from protobuf field .google.protobuf.Timestamp next_security_maintenance_run_time = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setNextSecurityMaintenanceRunTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->next_security_maintenance_run_time = $var; - - return $this; - } - - /** - * Optional. The list of customer contacts. - * - * Generated from protobuf field repeated .google.cloud.oracledatabase.v1.CustomerContact customer_contacts = 25 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCustomerContacts() - { - return $this->customer_contacts; - } - - /** - * Optional. The list of customer contacts. - * - * Generated from protobuf field repeated .google.cloud.oracledatabase.v1.CustomerContact customer_contacts = 25 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Cloud\OracleDatabase\V1\CustomerContact>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCustomerContacts($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\OracleDatabase\V1\CustomerContact::class); - $this->customer_contacts = $arr; - - return $this; - } - - /** - * Output only. The monthly software version of the storage servers (cells) - * in the Exadata Infrastructure. Example: 20.1.15 - * - * Generated from protobuf field string monthly_storage_server_version = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getMonthlyStorageServerVersion() - { - return $this->monthly_storage_server_version; - } - - /** - * Output only. The monthly software version of the storage servers (cells) - * in the Exadata Infrastructure. Example: 20.1.15 - * - * Generated from protobuf field string monthly_storage_server_version = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setMonthlyStorageServerVersion($var) - { - GPBUtil::checkString($var, True); - $this->monthly_storage_server_version = $var; - - return $this; - } - - /** - * Output only. The monthly software version of the database servers (dom0) - * in the Exadata Infrastructure. Example: 20.1.15 - * - * Generated from protobuf field string monthly_db_server_version = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getMonthlyDbServerVersion() - { - return $this->monthly_db_server_version; - } - - /** - * Output only. The monthly software version of the database servers (dom0) - * in the Exadata Infrastructure. Example: 20.1.15 - * - * Generated from protobuf field string monthly_db_server_version = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setMonthlyDbServerVersion($var) - { - GPBUtil::checkString($var, True); - $this->monthly_db_server_version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CloudExadataInfrastructureProperties/State.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CloudExadataInfrastructureProperties/State.php deleted file mode 100644 index 4b754316302c..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CloudExadataInfrastructureProperties/State.php +++ /dev/null @@ -1,99 +0,0 @@ -google.cloud.oracledatabase.v1.CloudExadataInfrastructureProperties.State - */ -class State -{ - /** - * Default unspecified value. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The Exadata Infrastructure is being provisioned. - * - * Generated from protobuf enum PROVISIONING = 1; - */ - const PROVISIONING = 1; - /** - * The Exadata Infrastructure is available for use. - * - * Generated from protobuf enum AVAILABLE = 2; - */ - const AVAILABLE = 2; - /** - * The Exadata Infrastructure is being updated. - * - * Generated from protobuf enum UPDATING = 3; - */ - const UPDATING = 3; - /** - * The Exadata Infrastructure is being terminated. - * - * Generated from protobuf enum TERMINATING = 4; - */ - const TERMINATING = 4; - /** - * The Exadata Infrastructure is terminated. - * - * Generated from protobuf enum TERMINATED = 5; - */ - const TERMINATED = 5; - /** - * The Exadata Infrastructure is in failed state. - * - * Generated from protobuf enum FAILED = 6; - */ - const FAILED = 6; - /** - * The Exadata Infrastructure is in maintenance. - * - * Generated from protobuf enum MAINTENANCE_IN_PROGRESS = 7; - */ - const MAINTENANCE_IN_PROGRESS = 7; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::PROVISIONING => 'PROVISIONING', - self::AVAILABLE => 'AVAILABLE', - self::UPDATING => 'UPDATING', - self::TERMINATING => 'TERMINATING', - self::TERMINATED => 'TERMINATED', - self::FAILED => 'FAILED', - self::MAINTENANCE_IN_PROGRESS => 'MAINTENANCE_IN_PROGRESS', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\OracleDatabase\V1\CloudExadataInfrastructureProperties_State::class); - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CloudVmCluster.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CloudVmCluster.php deleted file mode 100644 index 56840d098dfc..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CloudVmCluster.php +++ /dev/null @@ -1,414 +0,0 @@ -google.cloud.oracledatabase.v1.CloudVmCluster - */ -class CloudVmCluster extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. The name of the VM Cluster resource with the format: - * projects/{project}/locations/{region}/cloudVmClusters/{cloud_vm_cluster} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Required. The name of the Exadata Infrastructure resource on which VM - * cluster resource is created, in the following format: - * projects/{project}/locations/{region}/cloudExadataInfrastuctures/{cloud_extradata_infrastructure} - * - * Generated from protobuf field string exadata_infrastructure = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $exadata_infrastructure = ''; - /** - * Optional. User friendly name for this resource. - * - * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $display_name = ''; - /** - * Output only. Google Cloud Platform location where Oracle Exadata is hosted. - * It is same as Google Cloud Platform Oracle zone of Exadata infrastructure. - * - * Generated from protobuf field string gcp_oracle_zone = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $gcp_oracle_zone = ''; - /** - * Optional. Various properties of the VM Cluster. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.CloudVmClusterProperties properties = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $properties = null; - /** - * Optional. Labels or tags associated with the VM Cluster. - * - * Generated from protobuf field map labels = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - /** - * Output only. The date and time that the VM cluster was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Required. Network settings. CIDR to use for cluster IP allocation. - * - * Generated from protobuf field string cidr = 9 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $cidr = ''; - /** - * Required. CIDR range of the backup subnet. - * - * Generated from protobuf field string backup_subnet_cidr = 10 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $backup_subnet_cidr = ''; - /** - * Required. The name of the VPC network. - * Format: projects/{project}/global/networks/{network} - * - * Generated from protobuf field string network = 11 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $network = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. The name of the VM Cluster resource with the format: - * projects/{project}/locations/{region}/cloudVmClusters/{cloud_vm_cluster} - * @type string $exadata_infrastructure - * Required. The name of the Exadata Infrastructure resource on which VM - * cluster resource is created, in the following format: - * projects/{project}/locations/{region}/cloudExadataInfrastuctures/{cloud_extradata_infrastructure} - * @type string $display_name - * Optional. User friendly name for this resource. - * @type string $gcp_oracle_zone - * Output only. Google Cloud Platform location where Oracle Exadata is hosted. - * It is same as Google Cloud Platform Oracle zone of Exadata infrastructure. - * @type \Google\Cloud\OracleDatabase\V1\CloudVmClusterProperties $properties - * Optional. Various properties of the VM Cluster. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. Labels or tags associated with the VM Cluster. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The date and time that the VM cluster was created. - * @type string $cidr - * Required. Network settings. CIDR to use for cluster IP allocation. - * @type string $backup_subnet_cidr - * Required. CIDR range of the backup subnet. - * @type string $network - * Required. The name of the VPC network. - * Format: projects/{project}/global/networks/{network} - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Oracledatabase\V1\VmCluster::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. The name of the VM Cluster resource with the format: - * projects/{project}/locations/{region}/cloudVmClusters/{cloud_vm_cluster} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. The name of the VM Cluster resource with the format: - * projects/{project}/locations/{region}/cloudVmClusters/{cloud_vm_cluster} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. The name of the Exadata Infrastructure resource on which VM - * cluster resource is created, in the following format: - * projects/{project}/locations/{region}/cloudExadataInfrastuctures/{cloud_extradata_infrastructure} - * - * Generated from protobuf field string exadata_infrastructure = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getExadataInfrastructure() - { - return $this->exadata_infrastructure; - } - - /** - * Required. The name of the Exadata Infrastructure resource on which VM - * cluster resource is created, in the following format: - * projects/{project}/locations/{region}/cloudExadataInfrastuctures/{cloud_extradata_infrastructure} - * - * Generated from protobuf field string exadata_infrastructure = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setExadataInfrastructure($var) - { - GPBUtil::checkString($var, True); - $this->exadata_infrastructure = $var; - - return $this; - } - - /** - * Optional. User friendly name for this resource. - * - * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Optional. User friendly name for this resource. - * - * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Output only. Google Cloud Platform location where Oracle Exadata is hosted. - * It is same as Google Cloud Platform Oracle zone of Exadata infrastructure. - * - * Generated from protobuf field string gcp_oracle_zone = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getGcpOracleZone() - { - return $this->gcp_oracle_zone; - } - - /** - * Output only. Google Cloud Platform location where Oracle Exadata is hosted. - * It is same as Google Cloud Platform Oracle zone of Exadata infrastructure. - * - * Generated from protobuf field string gcp_oracle_zone = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setGcpOracleZone($var) - { - GPBUtil::checkString($var, True); - $this->gcp_oracle_zone = $var; - - return $this; - } - - /** - * Optional. Various properties of the VM Cluster. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.CloudVmClusterProperties properties = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\OracleDatabase\V1\CloudVmClusterProperties|null - */ - public function getProperties() - { - return $this->properties; - } - - public function hasProperties() - { - return isset($this->properties); - } - - public function clearProperties() - { - unset($this->properties); - } - - /** - * Optional. Various properties of the VM Cluster. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.CloudVmClusterProperties properties = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\OracleDatabase\V1\CloudVmClusterProperties $var - * @return $this - */ - public function setProperties($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OracleDatabase\V1\CloudVmClusterProperties::class); - $this->properties = $var; - - return $this; - } - - /** - * Optional. Labels or tags associated with the VM Cluster. - * - * Generated from protobuf field map labels = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. Labels or tags associated with the VM Cluster. - * - * Generated from protobuf field map labels = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Output only. The date and time that the VM cluster was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The date and time that the VM cluster was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Required. Network settings. CIDR to use for cluster IP allocation. - * - * Generated from protobuf field string cidr = 9 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getCidr() - { - return $this->cidr; - } - - /** - * Required. Network settings. CIDR to use for cluster IP allocation. - * - * Generated from protobuf field string cidr = 9 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setCidr($var) - { - GPBUtil::checkString($var, True); - $this->cidr = $var; - - return $this; - } - - /** - * Required. CIDR range of the backup subnet. - * - * Generated from protobuf field string backup_subnet_cidr = 10 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getBackupSubnetCidr() - { - return $this->backup_subnet_cidr; - } - - /** - * Required. CIDR range of the backup subnet. - * - * Generated from protobuf field string backup_subnet_cidr = 10 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setBackupSubnetCidr($var) - { - GPBUtil::checkString($var, True); - $this->backup_subnet_cidr = $var; - - return $this; - } - - /** - * Required. The name of the VPC network. - * Format: projects/{project}/global/networks/{network} - * - * Generated from protobuf field string network = 11 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getNetwork() - { - return $this->network; - } - - /** - * Required. The name of the VPC network. - * Format: projects/{project}/global/networks/{network} - * - * Generated from protobuf field string network = 11 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setNetwork($var) - { - GPBUtil::checkString($var, True); - $this->network = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CloudVmClusterProperties.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CloudVmClusterProperties.php deleted file mode 100644 index 205d69e8c506..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CloudVmClusterProperties.php +++ /dev/null @@ -1,1157 +0,0 @@ -google.cloud.oracledatabase.v1.CloudVmClusterProperties - */ -class CloudVmClusterProperties extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Oracle Cloud Infrastructure ID of VM Cluster. - * - * Generated from protobuf field string ocid = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $ocid = ''; - /** - * Required. License type of VM Cluster. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.CloudVmClusterProperties.LicenseType license_type = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $license_type = 0; - /** - * Optional. Grid Infrastructure Version. - * - * Generated from protobuf field string gi_version = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $gi_version = ''; - /** - * Optional. Time zone of VM Cluster to set. Defaults to UTC if not specified. - * - * Generated from protobuf field .google.type.TimeZone time_zone = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $time_zone = null; - /** - * Optional. SSH public keys to be stored with cluster. - * - * Generated from protobuf field repeated string ssh_public_keys = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $ssh_public_keys; - /** - * Optional. Number of database servers. - * - * Generated from protobuf field int32 node_count = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $node_count = 0; - /** - * Output only. Shape of VM Cluster. - * - * Generated from protobuf field string shape = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $shape = ''; - /** - * Optional. OCPU count per VM. Minimum is 0.1. - * - * Generated from protobuf field float ocpu_count = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $ocpu_count = 0.0; - /** - * Optional. Memory allocated in GBs. - * - * Generated from protobuf field int32 memory_size_gb = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $memory_size_gb = 0; - /** - * Optional. Local storage per VM. - * - * Generated from protobuf field int32 db_node_storage_size_gb = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $db_node_storage_size_gb = 0; - /** - * Output only. The storage allocation for the disk group, in gigabytes (GB). - * - * Generated from protobuf field int32 storage_size_gb = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $storage_size_gb = 0; - /** - * Optional. The data disk group size to be allocated in TBs. - * - * Generated from protobuf field double data_storage_size_tb = 12 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $data_storage_size_tb = 0.0; - /** - * Optional. The type of redundancy. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.CloudVmClusterProperties.DiskRedundancy disk_redundancy = 13 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $disk_redundancy = 0; - /** - * Optional. Use exadata sparse snapshots. - * - * Generated from protobuf field bool sparse_diskgroup_enabled = 14 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $sparse_diskgroup_enabled = false; - /** - * Optional. Use local backup. - * - * Generated from protobuf field bool local_backup_enabled = 15 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $local_backup_enabled = false; - /** - * Optional. Prefix for VM cluster host names. - * - * Generated from protobuf field string hostname_prefix = 16 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $hostname_prefix = ''; - /** - * Optional. Data collection options for diagnostics. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.DataCollectionOptions diagnostics_data_collection_options = 19 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $diagnostics_data_collection_options = null; - /** - * Output only. State of the cluster. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.CloudVmClusterProperties.State state = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. SCAN listener port - TCP - * - * Generated from protobuf field int32 scan_listener_port_tcp = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $scan_listener_port_tcp = 0; - /** - * Output only. SCAN listener port - TLS - * - * Generated from protobuf field int32 scan_listener_port_tcp_ssl = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $scan_listener_port_tcp_ssl = 0; - /** - * Output only. Parent DNS domain where SCAN DNS and hosts names are - * qualified. ex: ocispdelegated.ocisp10jvnet.oraclevcn.com - * - * Generated from protobuf field string domain = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $domain = ''; - /** - * Output only. SCAN DNS name. - * ex: sp2-yi0xq-scan.ocispdelegated.ocisp10jvnet.oraclevcn.com - * - * Generated from protobuf field string scan_dns = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $scan_dns = ''; - /** - * Output only. host name without domain. - * format: "-" with some suffix. - * ex: sp2-yi0xq where "sp2" is the hostname_prefix. - * - * Generated from protobuf field string hostname = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $hostname = ''; - /** - * Required. Number of enabled CPU cores. - * - * Generated from protobuf field int32 cpu_core_count = 26 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $cpu_core_count = 0; - /** - * Output only. Operating system version of the image. - * - * Generated from protobuf field string system_version = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $system_version = ''; - /** - * Output only. OCIDs of scan IPs. - * - * Generated from protobuf field repeated string scan_ip_ids = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $scan_ip_ids; - /** - * Output only. OCID of scan DNS record. - * - * Generated from protobuf field string scan_dns_record_id = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $scan_dns_record_id = ''; - /** - * Output only. Deep link to the OCI console to view this resource. - * - * Generated from protobuf field string oci_url = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $oci_url = ''; - /** - * Optional. OCID of database servers. - * - * Generated from protobuf field repeated string db_server_ocids = 31 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $db_server_ocids; - /** - * Output only. Compartment ID of cluster. - * - * Generated from protobuf field string compartment_id = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $compartment_id = ''; - /** - * Output only. DNS listener IP. - * - * Generated from protobuf field string dns_listener_ip = 35 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $dns_listener_ip = ''; - /** - * Optional. OCI Cluster name. - * - * Generated from protobuf field string cluster_name = 36 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $cluster_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $ocid - * Output only. Oracle Cloud Infrastructure ID of VM Cluster. - * @type int $license_type - * Required. License type of VM Cluster. - * @type string $gi_version - * Optional. Grid Infrastructure Version. - * @type \Google\Type\TimeZone $time_zone - * Optional. Time zone of VM Cluster to set. Defaults to UTC if not specified. - * @type array|\Google\Protobuf\Internal\RepeatedField $ssh_public_keys - * Optional. SSH public keys to be stored with cluster. - * @type int $node_count - * Optional. Number of database servers. - * @type string $shape - * Output only. Shape of VM Cluster. - * @type float $ocpu_count - * Optional. OCPU count per VM. Minimum is 0.1. - * @type int $memory_size_gb - * Optional. Memory allocated in GBs. - * @type int $db_node_storage_size_gb - * Optional. Local storage per VM. - * @type int $storage_size_gb - * Output only. The storage allocation for the disk group, in gigabytes (GB). - * @type float $data_storage_size_tb - * Optional. The data disk group size to be allocated in TBs. - * @type int $disk_redundancy - * Optional. The type of redundancy. - * @type bool $sparse_diskgroup_enabled - * Optional. Use exadata sparse snapshots. - * @type bool $local_backup_enabled - * Optional. Use local backup. - * @type string $hostname_prefix - * Optional. Prefix for VM cluster host names. - * @type \Google\Cloud\OracleDatabase\V1\DataCollectionOptions $diagnostics_data_collection_options - * Optional. Data collection options for diagnostics. - * @type int $state - * Output only. State of the cluster. - * @type int $scan_listener_port_tcp - * Output only. SCAN listener port - TCP - * @type int $scan_listener_port_tcp_ssl - * Output only. SCAN listener port - TLS - * @type string $domain - * Output only. Parent DNS domain where SCAN DNS and hosts names are - * qualified. ex: ocispdelegated.ocisp10jvnet.oraclevcn.com - * @type string $scan_dns - * Output only. SCAN DNS name. - * ex: sp2-yi0xq-scan.ocispdelegated.ocisp10jvnet.oraclevcn.com - * @type string $hostname - * Output only. host name without domain. - * format: "-" with some suffix. - * ex: sp2-yi0xq where "sp2" is the hostname_prefix. - * @type int $cpu_core_count - * Required. Number of enabled CPU cores. - * @type string $system_version - * Output only. Operating system version of the image. - * @type array|\Google\Protobuf\Internal\RepeatedField $scan_ip_ids - * Output only. OCIDs of scan IPs. - * @type string $scan_dns_record_id - * Output only. OCID of scan DNS record. - * @type string $oci_url - * Output only. Deep link to the OCI console to view this resource. - * @type array|\Google\Protobuf\Internal\RepeatedField $db_server_ocids - * Optional. OCID of database servers. - * @type string $compartment_id - * Output only. Compartment ID of cluster. - * @type string $dns_listener_ip - * Output only. DNS listener IP. - * @type string $cluster_name - * Optional. OCI Cluster name. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Oracledatabase\V1\VmCluster::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Oracle Cloud Infrastructure ID of VM Cluster. - * - * Generated from protobuf field string ocid = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getOcid() - { - return $this->ocid; - } - - /** - * Output only. Oracle Cloud Infrastructure ID of VM Cluster. - * - * Generated from protobuf field string ocid = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setOcid($var) - { - GPBUtil::checkString($var, True); - $this->ocid = $var; - - return $this; - } - - /** - * Required. License type of VM Cluster. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.CloudVmClusterProperties.LicenseType license_type = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getLicenseType() - { - return $this->license_type; - } - - /** - * Required. License type of VM Cluster. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.CloudVmClusterProperties.LicenseType license_type = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setLicenseType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\OracleDatabase\V1\CloudVmClusterProperties\LicenseType::class); - $this->license_type = $var; - - return $this; - } - - /** - * Optional. Grid Infrastructure Version. - * - * Generated from protobuf field string gi_version = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getGiVersion() - { - return $this->gi_version; - } - - /** - * Optional. Grid Infrastructure Version. - * - * Generated from protobuf field string gi_version = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setGiVersion($var) - { - GPBUtil::checkString($var, True); - $this->gi_version = $var; - - return $this; - } - - /** - * Optional. Time zone of VM Cluster to set. Defaults to UTC if not specified. - * - * Generated from protobuf field .google.type.TimeZone time_zone = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Type\TimeZone|null - */ - public function getTimeZone() - { - return $this->time_zone; - } - - public function hasTimeZone() - { - return isset($this->time_zone); - } - - public function clearTimeZone() - { - unset($this->time_zone); - } - - /** - * Optional. Time zone of VM Cluster to set. Defaults to UTC if not specified. - * - * Generated from protobuf field .google.type.TimeZone time_zone = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Type\TimeZone $var - * @return $this - */ - public function setTimeZone($var) - { - GPBUtil::checkMessage($var, \Google\Type\TimeZone::class); - $this->time_zone = $var; - - return $this; - } - - /** - * Optional. SSH public keys to be stored with cluster. - * - * Generated from protobuf field repeated string ssh_public_keys = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSshPublicKeys() - { - return $this->ssh_public_keys; - } - - /** - * Optional. SSH public keys to be stored with cluster. - * - * Generated from protobuf field repeated string ssh_public_keys = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSshPublicKeys($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->ssh_public_keys = $arr; - - return $this; - } - - /** - * Optional. Number of database servers. - * - * Generated from protobuf field int32 node_count = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getNodeCount() - { - return $this->node_count; - } - - /** - * Optional. Number of database servers. - * - * Generated from protobuf field int32 node_count = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setNodeCount($var) - { - GPBUtil::checkInt32($var); - $this->node_count = $var; - - return $this; - } - - /** - * Output only. Shape of VM Cluster. - * - * Generated from protobuf field string shape = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getShape() - { - return $this->shape; - } - - /** - * Output only. Shape of VM Cluster. - * - * Generated from protobuf field string shape = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setShape($var) - { - GPBUtil::checkString($var, True); - $this->shape = $var; - - return $this; - } - - /** - * Optional. OCPU count per VM. Minimum is 0.1. - * - * Generated from protobuf field float ocpu_count = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return float - */ - public function getOcpuCount() - { - return $this->ocpu_count; - } - - /** - * Optional. OCPU count per VM. Minimum is 0.1. - * - * Generated from protobuf field float ocpu_count = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param float $var - * @return $this - */ - public function setOcpuCount($var) - { - GPBUtil::checkFloat($var); - $this->ocpu_count = $var; - - return $this; - } - - /** - * Optional. Memory allocated in GBs. - * - * Generated from protobuf field int32 memory_size_gb = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getMemorySizeGb() - { - return $this->memory_size_gb; - } - - /** - * Optional. Memory allocated in GBs. - * - * Generated from protobuf field int32 memory_size_gb = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setMemorySizeGb($var) - { - GPBUtil::checkInt32($var); - $this->memory_size_gb = $var; - - return $this; - } - - /** - * Optional. Local storage per VM. - * - * Generated from protobuf field int32 db_node_storage_size_gb = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getDbNodeStorageSizeGb() - { - return $this->db_node_storage_size_gb; - } - - /** - * Optional. Local storage per VM. - * - * Generated from protobuf field int32 db_node_storage_size_gb = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setDbNodeStorageSizeGb($var) - { - GPBUtil::checkInt32($var); - $this->db_node_storage_size_gb = $var; - - return $this; - } - - /** - * Output only. The storage allocation for the disk group, in gigabytes (GB). - * - * Generated from protobuf field int32 storage_size_gb = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getStorageSizeGb() - { - return $this->storage_size_gb; - } - - /** - * Output only. The storage allocation for the disk group, in gigabytes (GB). - * - * Generated from protobuf field int32 storage_size_gb = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setStorageSizeGb($var) - { - GPBUtil::checkInt32($var); - $this->storage_size_gb = $var; - - return $this; - } - - /** - * Optional. The data disk group size to be allocated in TBs. - * - * Generated from protobuf field double data_storage_size_tb = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @return float - */ - public function getDataStorageSizeTb() - { - return $this->data_storage_size_tb; - } - - /** - * Optional. The data disk group size to be allocated in TBs. - * - * Generated from protobuf field double data_storage_size_tb = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @param float $var - * @return $this - */ - public function setDataStorageSizeTb($var) - { - GPBUtil::checkDouble($var); - $this->data_storage_size_tb = $var; - - return $this; - } - - /** - * Optional. The type of redundancy. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.CloudVmClusterProperties.DiskRedundancy disk_redundancy = 13 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getDiskRedundancy() - { - return $this->disk_redundancy; - } - - /** - * Optional. The type of redundancy. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.CloudVmClusterProperties.DiskRedundancy disk_redundancy = 13 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setDiskRedundancy($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\OracleDatabase\V1\CloudVmClusterProperties\DiskRedundancy::class); - $this->disk_redundancy = $var; - - return $this; - } - - /** - * Optional. Use exadata sparse snapshots. - * - * Generated from protobuf field bool sparse_diskgroup_enabled = 14 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getSparseDiskgroupEnabled() - { - return $this->sparse_diskgroup_enabled; - } - - /** - * Optional. Use exadata sparse snapshots. - * - * Generated from protobuf field bool sparse_diskgroup_enabled = 14 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setSparseDiskgroupEnabled($var) - { - GPBUtil::checkBool($var); - $this->sparse_diskgroup_enabled = $var; - - return $this; - } - - /** - * Optional. Use local backup. - * - * Generated from protobuf field bool local_backup_enabled = 15 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getLocalBackupEnabled() - { - return $this->local_backup_enabled; - } - - /** - * Optional. Use local backup. - * - * Generated from protobuf field bool local_backup_enabled = 15 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setLocalBackupEnabled($var) - { - GPBUtil::checkBool($var); - $this->local_backup_enabled = $var; - - return $this; - } - - /** - * Optional. Prefix for VM cluster host names. - * - * Generated from protobuf field string hostname_prefix = 16 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getHostnamePrefix() - { - return $this->hostname_prefix; - } - - /** - * Optional. Prefix for VM cluster host names. - * - * Generated from protobuf field string hostname_prefix = 16 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setHostnamePrefix($var) - { - GPBUtil::checkString($var, True); - $this->hostname_prefix = $var; - - return $this; - } - - /** - * Optional. Data collection options for diagnostics. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.DataCollectionOptions diagnostics_data_collection_options = 19 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\OracleDatabase\V1\DataCollectionOptions|null - */ - public function getDiagnosticsDataCollectionOptions() - { - return $this->diagnostics_data_collection_options; - } - - public function hasDiagnosticsDataCollectionOptions() - { - return isset($this->diagnostics_data_collection_options); - } - - public function clearDiagnosticsDataCollectionOptions() - { - unset($this->diagnostics_data_collection_options); - } - - /** - * Optional. Data collection options for diagnostics. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.DataCollectionOptions diagnostics_data_collection_options = 19 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\OracleDatabase\V1\DataCollectionOptions $var - * @return $this - */ - public function setDiagnosticsDataCollectionOptions($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OracleDatabase\V1\DataCollectionOptions::class); - $this->diagnostics_data_collection_options = $var; - - return $this; - } - - /** - * Output only. State of the cluster. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.CloudVmClusterProperties.State state = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. State of the cluster. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.CloudVmClusterProperties.State state = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\OracleDatabase\V1\CloudVmClusterProperties\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. SCAN listener port - TCP - * - * Generated from protobuf field int32 scan_listener_port_tcp = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getScanListenerPortTcp() - { - return $this->scan_listener_port_tcp; - } - - /** - * Output only. SCAN listener port - TCP - * - * Generated from protobuf field int32 scan_listener_port_tcp = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setScanListenerPortTcp($var) - { - GPBUtil::checkInt32($var); - $this->scan_listener_port_tcp = $var; - - return $this; - } - - /** - * Output only. SCAN listener port - TLS - * - * Generated from protobuf field int32 scan_listener_port_tcp_ssl = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getScanListenerPortTcpSsl() - { - return $this->scan_listener_port_tcp_ssl; - } - - /** - * Output only. SCAN listener port - TLS - * - * Generated from protobuf field int32 scan_listener_port_tcp_ssl = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setScanListenerPortTcpSsl($var) - { - GPBUtil::checkInt32($var); - $this->scan_listener_port_tcp_ssl = $var; - - return $this; - } - - /** - * Output only. Parent DNS domain where SCAN DNS and hosts names are - * qualified. ex: ocispdelegated.ocisp10jvnet.oraclevcn.com - * - * Generated from protobuf field string domain = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getDomain() - { - return $this->domain; - } - - /** - * Output only. Parent DNS domain where SCAN DNS and hosts names are - * qualified. ex: ocispdelegated.ocisp10jvnet.oraclevcn.com - * - * Generated from protobuf field string domain = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setDomain($var) - { - GPBUtil::checkString($var, True); - $this->domain = $var; - - return $this; - } - - /** - * Output only. SCAN DNS name. - * ex: sp2-yi0xq-scan.ocispdelegated.ocisp10jvnet.oraclevcn.com - * - * Generated from protobuf field string scan_dns = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getScanDns() - { - return $this->scan_dns; - } - - /** - * Output only. SCAN DNS name. - * ex: sp2-yi0xq-scan.ocispdelegated.ocisp10jvnet.oraclevcn.com - * - * Generated from protobuf field string scan_dns = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setScanDns($var) - { - GPBUtil::checkString($var, True); - $this->scan_dns = $var; - - return $this; - } - - /** - * Output only. host name without domain. - * format: "-" with some suffix. - * ex: sp2-yi0xq where "sp2" is the hostname_prefix. - * - * Generated from protobuf field string hostname = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getHostname() - { - return $this->hostname; - } - - /** - * Output only. host name without domain. - * format: "-" with some suffix. - * ex: sp2-yi0xq where "sp2" is the hostname_prefix. - * - * Generated from protobuf field string hostname = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setHostname($var) - { - GPBUtil::checkString($var, True); - $this->hostname = $var; - - return $this; - } - - /** - * Required. Number of enabled CPU cores. - * - * Generated from protobuf field int32 cpu_core_count = 26 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getCpuCoreCount() - { - return $this->cpu_core_count; - } - - /** - * Required. Number of enabled CPU cores. - * - * Generated from protobuf field int32 cpu_core_count = 26 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setCpuCoreCount($var) - { - GPBUtil::checkInt32($var); - $this->cpu_core_count = $var; - - return $this; - } - - /** - * Output only. Operating system version of the image. - * - * Generated from protobuf field string system_version = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getSystemVersion() - { - return $this->system_version; - } - - /** - * Output only. Operating system version of the image. - * - * Generated from protobuf field string system_version = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setSystemVersion($var) - { - GPBUtil::checkString($var, True); - $this->system_version = $var; - - return $this; - } - - /** - * Output only. OCIDs of scan IPs. - * - * Generated from protobuf field repeated string scan_ip_ids = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getScanIpIds() - { - return $this->scan_ip_ids; - } - - /** - * Output only. OCIDs of scan IPs. - * - * Generated from protobuf field repeated string scan_ip_ids = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setScanIpIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->scan_ip_ids = $arr; - - return $this; - } - - /** - * Output only. OCID of scan DNS record. - * - * Generated from protobuf field string scan_dns_record_id = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getScanDnsRecordId() - { - return $this->scan_dns_record_id; - } - - /** - * Output only. OCID of scan DNS record. - * - * Generated from protobuf field string scan_dns_record_id = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setScanDnsRecordId($var) - { - GPBUtil::checkString($var, True); - $this->scan_dns_record_id = $var; - - return $this; - } - - /** - * Output only. Deep link to the OCI console to view this resource. - * - * Generated from protobuf field string oci_url = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getOciUrl() - { - return $this->oci_url; - } - - /** - * Output only. Deep link to the OCI console to view this resource. - * - * Generated from protobuf field string oci_url = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setOciUrl($var) - { - GPBUtil::checkString($var, True); - $this->oci_url = $var; - - return $this; - } - - /** - * Optional. OCID of database servers. - * - * Generated from protobuf field repeated string db_server_ocids = 31 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDbServerOcids() - { - return $this->db_server_ocids; - } - - /** - * Optional. OCID of database servers. - * - * Generated from protobuf field repeated string db_server_ocids = 31 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDbServerOcids($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->db_server_ocids = $arr; - - return $this; - } - - /** - * Output only. Compartment ID of cluster. - * - * Generated from protobuf field string compartment_id = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getCompartmentId() - { - return $this->compartment_id; - } - - /** - * Output only. Compartment ID of cluster. - * - * Generated from protobuf field string compartment_id = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setCompartmentId($var) - { - GPBUtil::checkString($var, True); - $this->compartment_id = $var; - - return $this; - } - - /** - * Output only. DNS listener IP. - * - * Generated from protobuf field string dns_listener_ip = 35 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getDnsListenerIp() - { - return $this->dns_listener_ip; - } - - /** - * Output only. DNS listener IP. - * - * Generated from protobuf field string dns_listener_ip = 35 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setDnsListenerIp($var) - { - GPBUtil::checkString($var, True); - $this->dns_listener_ip = $var; - - return $this; - } - - /** - * Optional. OCI Cluster name. - * - * Generated from protobuf field string cluster_name = 36 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getClusterName() - { - return $this->cluster_name; - } - - /** - * Optional. OCI Cluster name. - * - * Generated from protobuf field string cluster_name = 36 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setClusterName($var) - { - GPBUtil::checkString($var, True); - $this->cluster_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CloudVmClusterProperties/DiskRedundancy.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CloudVmClusterProperties/DiskRedundancy.php deleted file mode 100644 index b386169f41a2..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CloudVmClusterProperties/DiskRedundancy.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.oracledatabase.v1.CloudVmClusterProperties.DiskRedundancy - */ -class DiskRedundancy -{ - /** - * Unspecified. - * - * Generated from protobuf enum DISK_REDUNDANCY_UNSPECIFIED = 0; - */ - const DISK_REDUNDANCY_UNSPECIFIED = 0; - /** - * High - 3 way mirror. - * - * Generated from protobuf enum HIGH = 1; - */ - const HIGH = 1; - /** - * Normal - 2 way mirror. - * - * Generated from protobuf enum NORMAL = 2; - */ - const NORMAL = 2; - - private static $valueToName = [ - self::DISK_REDUNDANCY_UNSPECIFIED => 'DISK_REDUNDANCY_UNSPECIFIED', - self::HIGH => 'HIGH', - self::NORMAL => 'NORMAL', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DiskRedundancy::class, \Google\Cloud\OracleDatabase\V1\CloudVmClusterProperties_DiskRedundancy::class); - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CloudVmClusterProperties/LicenseType.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CloudVmClusterProperties/LicenseType.php deleted file mode 100644 index 2a21b015c8bc..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CloudVmClusterProperties/LicenseType.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.oracledatabase.v1.CloudVmClusterProperties.LicenseType - */ -class LicenseType -{ - /** - * Unspecified - * - * Generated from protobuf enum LICENSE_TYPE_UNSPECIFIED = 0; - */ - const LICENSE_TYPE_UNSPECIFIED = 0; - /** - * License included part of offer - * - * Generated from protobuf enum LICENSE_INCLUDED = 1; - */ - const LICENSE_INCLUDED = 1; - /** - * Bring your own license - * - * Generated from protobuf enum BRING_YOUR_OWN_LICENSE = 2; - */ - const BRING_YOUR_OWN_LICENSE = 2; - - private static $valueToName = [ - self::LICENSE_TYPE_UNSPECIFIED => 'LICENSE_TYPE_UNSPECIFIED', - self::LICENSE_INCLUDED => 'LICENSE_INCLUDED', - self::BRING_YOUR_OWN_LICENSE => 'BRING_YOUR_OWN_LICENSE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(LicenseType::class, \Google\Cloud\OracleDatabase\V1\CloudVmClusterProperties_LicenseType::class); - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CloudVmClusterProperties/State.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CloudVmClusterProperties/State.php deleted file mode 100644 index 4ae5c9489a27..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CloudVmClusterProperties/State.php +++ /dev/null @@ -1,99 +0,0 @@ -google.cloud.oracledatabase.v1.CloudVmClusterProperties.State - */ -class State -{ - /** - * Default unspecified value. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Indicates that the resource is in provisioning state. - * - * Generated from protobuf enum PROVISIONING = 1; - */ - const PROVISIONING = 1; - /** - * Indicates that the resource is in available state. - * - * Generated from protobuf enum AVAILABLE = 2; - */ - const AVAILABLE = 2; - /** - * Indicates that the resource is in updating state. - * - * Generated from protobuf enum UPDATING = 3; - */ - const UPDATING = 3; - /** - * Indicates that the resource is in terminating state. - * - * Generated from protobuf enum TERMINATING = 4; - */ - const TERMINATING = 4; - /** - * Indicates that the resource is in terminated state. - * - * Generated from protobuf enum TERMINATED = 5; - */ - const TERMINATED = 5; - /** - * Indicates that the resource is in failed state. - * - * Generated from protobuf enum FAILED = 6; - */ - const FAILED = 6; - /** - * Indicates that the resource is in maintenance in progress state. - * - * Generated from protobuf enum MAINTENANCE_IN_PROGRESS = 7; - */ - const MAINTENANCE_IN_PROGRESS = 7; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::PROVISIONING => 'PROVISIONING', - self::AVAILABLE => 'AVAILABLE', - self::UPDATING => 'UPDATING', - self::TERMINATING => 'TERMINATING', - self::TERMINATED => 'TERMINATED', - self::FAILED => 'FAILED', - self::MAINTENANCE_IN_PROGRESS => 'MAINTENANCE_IN_PROGRESS', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\OracleDatabase\V1\CloudVmClusterProperties_State::class); - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CreateAutonomousDatabaseRequest.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CreateAutonomousDatabaseRequest.php deleted file mode 100644 index 5e4dc3542c9f..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CreateAutonomousDatabaseRequest.php +++ /dev/null @@ -1,241 +0,0 @@ -google.cloud.oracledatabase.v1.CreateAutonomousDatabaseRequest - */ -class CreateAutonomousDatabaseRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the parent in the following format: - * projects/{project}/locations/{location}. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The ID of the Autonomous Database to create. This value is - * restricted to (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$) and must be a maximum of - * 63 characters in length. The value must start with a letter and end with a - * letter or a number. - * - * Generated from protobuf field string autonomous_database_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $autonomous_database_id = ''; - /** - * Required. The Autonomous Database being created. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabase autonomous_database = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $autonomous_database = null; - /** - * Optional. An optional ID to identify the request. This value is used to - * identify duplicate requests. If you make a request with the same request ID - * and the original request is still in progress or completed, the server - * ignores the second request. This prevents clients from - * accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - */ - protected $request_id = ''; - - /** - * @param string $parent Required. The name of the parent in the following format: - * projects/{project}/locations/{location}. Please see - * {@see OracleDatabaseClient::locationName()} for help formatting this field. - * @param \Google\Cloud\OracleDatabase\V1\AutonomousDatabase $autonomousDatabase Required. The Autonomous Database being created. - * @param string $autonomousDatabaseId Required. The ID of the Autonomous Database to create. This value is - * restricted to (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$) and must be a maximum of - * 63 characters in length. The value must start with a letter and end with a - * letter or a number. - * - * @return \Google\Cloud\OracleDatabase\V1\CreateAutonomousDatabaseRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\OracleDatabase\V1\AutonomousDatabase $autonomousDatabase, string $autonomousDatabaseId): self - { - return (new self()) - ->setParent($parent) - ->setAutonomousDatabase($autonomousDatabase) - ->setAutonomousDatabaseId($autonomousDatabaseId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The name of the parent in the following format: - * projects/{project}/locations/{location}. - * @type string $autonomous_database_id - * Required. The ID of the Autonomous Database to create. This value is - * restricted to (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$) and must be a maximum of - * 63 characters in length. The value must start with a letter and end with a - * letter or a number. - * @type \Google\Cloud\OracleDatabase\V1\AutonomousDatabase $autonomous_database - * Required. The Autonomous Database being created. - * @type string $request_id - * Optional. An optional ID to identify the request. This value is used to - * identify duplicate requests. If you make a request with the same request ID - * and the original request is still in progress or completed, the server - * ignores the second request. This prevents clients from - * accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Oracledatabase\V1\Oracledatabase::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the parent in the following format: - * projects/{project}/locations/{location}. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The name of the parent in the following format: - * projects/{project}/locations/{location}. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The ID of the Autonomous Database to create. This value is - * restricted to (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$) and must be a maximum of - * 63 characters in length. The value must start with a letter and end with a - * letter or a number. - * - * Generated from protobuf field string autonomous_database_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getAutonomousDatabaseId() - { - return $this->autonomous_database_id; - } - - /** - * Required. The ID of the Autonomous Database to create. This value is - * restricted to (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$) and must be a maximum of - * 63 characters in length. The value must start with a letter and end with a - * letter or a number. - * - * Generated from protobuf field string autonomous_database_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setAutonomousDatabaseId($var) - { - GPBUtil::checkString($var, True); - $this->autonomous_database_id = $var; - - return $this; - } - - /** - * Required. The Autonomous Database being created. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabase autonomous_database = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\OracleDatabase\V1\AutonomousDatabase|null - */ - public function getAutonomousDatabase() - { - return $this->autonomous_database; - } - - public function hasAutonomousDatabase() - { - return isset($this->autonomous_database); - } - - public function clearAutonomousDatabase() - { - unset($this->autonomous_database); - } - - /** - * Required. The Autonomous Database being created. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.AutonomousDatabase autonomous_database = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\OracleDatabase\V1\AutonomousDatabase $var - * @return $this - */ - public function setAutonomousDatabase($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OracleDatabase\V1\AutonomousDatabase::class); - $this->autonomous_database = $var; - - return $this; - } - - /** - * Optional. An optional ID to identify the request. This value is used to - * identify duplicate requests. If you make a request with the same request ID - * and the original request is still in progress or completed, the server - * ignores the second request. This prevents clients from - * accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional ID to identify the request. This value is used to - * identify duplicate requests. If you make a request with the same request ID - * and the original request is still in progress or completed, the server - * ignores the second request. This prevents clients from - * accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CreateCloudExadataInfrastructureRequest.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CreateCloudExadataInfrastructureRequest.php deleted file mode 100644 index 51f846ed3a8f..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CreateCloudExadataInfrastructureRequest.php +++ /dev/null @@ -1,241 +0,0 @@ -google.cloud.oracledatabase.v1.CreateCloudExadataInfrastructureRequest - */ -class CreateCloudExadataInfrastructureRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent value for CloudExadataInfrastructure in the following - * format: projects/{project}/locations/{location}. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The ID of the Exadata Infrastructure to create. This value is - * restricted to (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$) and must be a maximum of - * 63 characters in length. The value must start with a letter and end with a - * letter or a number. - * - * Generated from protobuf field string cloud_exadata_infrastructure_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $cloud_exadata_infrastructure_id = ''; - /** - * Required. Details of the Exadata Infrastructure instance to create. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.CloudExadataInfrastructure cloud_exadata_infrastructure = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $cloud_exadata_infrastructure = null; - /** - * Optional. An optional ID to identify the request. This value is used to - * identify duplicate requests. If you make a request with the same request ID - * and the original request is still in progress or completed, the server - * ignores the second request. This prevents clients from - * accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - */ - protected $request_id = ''; - - /** - * @param string $parent Required. The parent value for CloudExadataInfrastructure in the following - * format: projects/{project}/locations/{location}. Please see - * {@see OracleDatabaseClient::locationName()} for help formatting this field. - * @param \Google\Cloud\OracleDatabase\V1\CloudExadataInfrastructure $cloudExadataInfrastructure Required. Details of the Exadata Infrastructure instance to create. - * @param string $cloudExadataInfrastructureId Required. The ID of the Exadata Infrastructure to create. This value is - * restricted to (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$) and must be a maximum of - * 63 characters in length. The value must start with a letter and end with a - * letter or a number. - * - * @return \Google\Cloud\OracleDatabase\V1\CreateCloudExadataInfrastructureRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\OracleDatabase\V1\CloudExadataInfrastructure $cloudExadataInfrastructure, string $cloudExadataInfrastructureId): self - { - return (new self()) - ->setParent($parent) - ->setCloudExadataInfrastructure($cloudExadataInfrastructure) - ->setCloudExadataInfrastructureId($cloudExadataInfrastructureId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent value for CloudExadataInfrastructure in the following - * format: projects/{project}/locations/{location}. - * @type string $cloud_exadata_infrastructure_id - * Required. The ID of the Exadata Infrastructure to create. This value is - * restricted to (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$) and must be a maximum of - * 63 characters in length. The value must start with a letter and end with a - * letter or a number. - * @type \Google\Cloud\OracleDatabase\V1\CloudExadataInfrastructure $cloud_exadata_infrastructure - * Required. Details of the Exadata Infrastructure instance to create. - * @type string $request_id - * Optional. An optional ID to identify the request. This value is used to - * identify duplicate requests. If you make a request with the same request ID - * and the original request is still in progress or completed, the server - * ignores the second request. This prevents clients from - * accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Oracledatabase\V1\Oracledatabase::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent value for CloudExadataInfrastructure in the following - * format: projects/{project}/locations/{location}. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent value for CloudExadataInfrastructure in the following - * format: projects/{project}/locations/{location}. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The ID of the Exadata Infrastructure to create. This value is - * restricted to (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$) and must be a maximum of - * 63 characters in length. The value must start with a letter and end with a - * letter or a number. - * - * Generated from protobuf field string cloud_exadata_infrastructure_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getCloudExadataInfrastructureId() - { - return $this->cloud_exadata_infrastructure_id; - } - - /** - * Required. The ID of the Exadata Infrastructure to create. This value is - * restricted to (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$) and must be a maximum of - * 63 characters in length. The value must start with a letter and end with a - * letter or a number. - * - * Generated from protobuf field string cloud_exadata_infrastructure_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setCloudExadataInfrastructureId($var) - { - GPBUtil::checkString($var, True); - $this->cloud_exadata_infrastructure_id = $var; - - return $this; - } - - /** - * Required. Details of the Exadata Infrastructure instance to create. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.CloudExadataInfrastructure cloud_exadata_infrastructure = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\OracleDatabase\V1\CloudExadataInfrastructure|null - */ - public function getCloudExadataInfrastructure() - { - return $this->cloud_exadata_infrastructure; - } - - public function hasCloudExadataInfrastructure() - { - return isset($this->cloud_exadata_infrastructure); - } - - public function clearCloudExadataInfrastructure() - { - unset($this->cloud_exadata_infrastructure); - } - - /** - * Required. Details of the Exadata Infrastructure instance to create. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.CloudExadataInfrastructure cloud_exadata_infrastructure = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\OracleDatabase\V1\CloudExadataInfrastructure $var - * @return $this - */ - public function setCloudExadataInfrastructure($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OracleDatabase\V1\CloudExadataInfrastructure::class); - $this->cloud_exadata_infrastructure = $var; - - return $this; - } - - /** - * Optional. An optional ID to identify the request. This value is used to - * identify duplicate requests. If you make a request with the same request ID - * and the original request is still in progress or completed, the server - * ignores the second request. This prevents clients from - * accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional ID to identify the request. This value is used to - * identify duplicate requests. If you make a request with the same request ID - * and the original request is still in progress or completed, the server - * ignores the second request. This prevents clients from - * accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CreateCloudVmClusterRequest.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CreateCloudVmClusterRequest.php deleted file mode 100644 index fa1b9db56ffd..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CreateCloudVmClusterRequest.php +++ /dev/null @@ -1,241 +0,0 @@ -google.cloud.oracledatabase.v1.CreateCloudVmClusterRequest - */ -class CreateCloudVmClusterRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the parent in the following format: - * projects/{project}/locations/{location}. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The ID of the VM Cluster to create. This value is restricted - * to (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$) and must be a maximum of 63 - * characters in length. The value must start with a letter and end with - * a letter or a number. - * - * Generated from protobuf field string cloud_vm_cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $cloud_vm_cluster_id = ''; - /** - * Required. The resource being created - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.CloudVmCluster cloud_vm_cluster = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $cloud_vm_cluster = null; - /** - * Optional. An optional ID to identify the request. This value is used to - * identify duplicate requests. If you make a request with the same request ID - * and the original request is still in progress or completed, the server - * ignores the second request. This prevents clients from - * accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - */ - protected $request_id = ''; - - /** - * @param string $parent Required. The name of the parent in the following format: - * projects/{project}/locations/{location}. Please see - * {@see OracleDatabaseClient::locationName()} for help formatting this field. - * @param \Google\Cloud\OracleDatabase\V1\CloudVmCluster $cloudVmCluster Required. The resource being created - * @param string $cloudVmClusterId Required. The ID of the VM Cluster to create. This value is restricted - * to (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$) and must be a maximum of 63 - * characters in length. The value must start with a letter and end with - * a letter or a number. - * - * @return \Google\Cloud\OracleDatabase\V1\CreateCloudVmClusterRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\OracleDatabase\V1\CloudVmCluster $cloudVmCluster, string $cloudVmClusterId): self - { - return (new self()) - ->setParent($parent) - ->setCloudVmCluster($cloudVmCluster) - ->setCloudVmClusterId($cloudVmClusterId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The name of the parent in the following format: - * projects/{project}/locations/{location}. - * @type string $cloud_vm_cluster_id - * Required. The ID of the VM Cluster to create. This value is restricted - * to (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$) and must be a maximum of 63 - * characters in length. The value must start with a letter and end with - * a letter or a number. - * @type \Google\Cloud\OracleDatabase\V1\CloudVmCluster $cloud_vm_cluster - * Required. The resource being created - * @type string $request_id - * Optional. An optional ID to identify the request. This value is used to - * identify duplicate requests. If you make a request with the same request ID - * and the original request is still in progress or completed, the server - * ignores the second request. This prevents clients from - * accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Oracledatabase\V1\Oracledatabase::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the parent in the following format: - * projects/{project}/locations/{location}. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The name of the parent in the following format: - * projects/{project}/locations/{location}. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The ID of the VM Cluster to create. This value is restricted - * to (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$) and must be a maximum of 63 - * characters in length. The value must start with a letter and end with - * a letter or a number. - * - * Generated from protobuf field string cloud_vm_cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getCloudVmClusterId() - { - return $this->cloud_vm_cluster_id; - } - - /** - * Required. The ID of the VM Cluster to create. This value is restricted - * to (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$) and must be a maximum of 63 - * characters in length. The value must start with a letter and end with - * a letter or a number. - * - * Generated from protobuf field string cloud_vm_cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setCloudVmClusterId($var) - { - GPBUtil::checkString($var, True); - $this->cloud_vm_cluster_id = $var; - - return $this; - } - - /** - * Required. The resource being created - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.CloudVmCluster cloud_vm_cluster = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\OracleDatabase\V1\CloudVmCluster|null - */ - public function getCloudVmCluster() - { - return $this->cloud_vm_cluster; - } - - public function hasCloudVmCluster() - { - return isset($this->cloud_vm_cluster); - } - - public function clearCloudVmCluster() - { - unset($this->cloud_vm_cluster); - } - - /** - * Required. The resource being created - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.CloudVmCluster cloud_vm_cluster = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\OracleDatabase\V1\CloudVmCluster $var - * @return $this - */ - public function setCloudVmCluster($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OracleDatabase\V1\CloudVmCluster::class); - $this->cloud_vm_cluster = $var; - - return $this; - } - - /** - * Optional. An optional ID to identify the request. This value is used to - * identify duplicate requests. If you make a request with the same request ID - * and the original request is still in progress or completed, the server - * ignores the second request. This prevents clients from - * accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional ID to identify the request. This value is used to - * identify duplicate requests. If you make a request with the same request ID - * and the original request is still in progress or completed, the server - * ignores the second request. This prevents clients from - * accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CustomerContact.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CustomerContact.php deleted file mode 100644 index 0fa28d175e71..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/CustomerContact.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.oracledatabase.v1.CustomerContact - */ -class CustomerContact extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The email address used by Oracle to send notifications regarding - * databases and infrastructure. - * - * Generated from protobuf field string email = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $email = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $email - * Required. The email address used by Oracle to send notifications regarding - * databases and infrastructure. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Oracledatabase\V1\Common::initOnce(); - parent::__construct($data); - } - - /** - * Required. The email address used by Oracle to send notifications regarding - * databases and infrastructure. - * - * Generated from protobuf field string email = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getEmail() - { - return $this->email; - } - - /** - * Required. The email address used by Oracle to send notifications regarding - * databases and infrastructure. - * - * Generated from protobuf field string email = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setEmail($var) - { - GPBUtil::checkString($var, True); - $this->email = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DBWorkload.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DBWorkload.php deleted file mode 100644 index 72cf4268477a..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DBWorkload.php +++ /dev/null @@ -1,76 +0,0 @@ -google.cloud.oracledatabase.v1.DBWorkload - */ -class DBWorkload -{ - /** - * Default unspecified value. - * - * Generated from protobuf enum DB_WORKLOAD_UNSPECIFIED = 0; - */ - const DB_WORKLOAD_UNSPECIFIED = 0; - /** - * Autonomous Transaction Processing database. - * - * Generated from protobuf enum OLTP = 1; - */ - const OLTP = 1; - /** - * Autonomous Data Warehouse database. - * - * Generated from protobuf enum DW = 2; - */ - const DW = 2; - /** - * Autonomous JSON Database. - * - * Generated from protobuf enum AJD = 3; - */ - const AJD = 3; - /** - * Autonomous Database with the Oracle APEX Application Development workload - * type. - * - * Generated from protobuf enum APEX = 4; - */ - const APEX = 4; - - private static $valueToName = [ - self::DB_WORKLOAD_UNSPECIFIED => 'DB_WORKLOAD_UNSPECIFIED', - self::OLTP => 'OLTP', - self::DW => 'DW', - self::AJD => 'AJD', - self::APEX => 'APEX', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DataCollectionOptions.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DataCollectionOptions.php deleted file mode 100644 index d7c34a0fe64c..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DataCollectionOptions.php +++ /dev/null @@ -1,143 +0,0 @@ -google.cloud.oracledatabase.v1.DataCollectionOptions - */ -class DataCollectionOptions extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Indicates whether diagnostic collection is enabled for the VM - * cluster - * - * Generated from protobuf field bool diagnostics_events_enabled = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $diagnostics_events_enabled = false; - /** - * Optional. Indicates whether health monitoring is enabled for the VM cluster - * - * Generated from protobuf field bool health_monitoring_enabled = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $health_monitoring_enabled = false; - /** - * Optional. Indicates whether incident logs and trace collection are enabled - * for the VM cluster - * - * Generated from protobuf field bool incident_logs_enabled = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $incident_logs_enabled = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $diagnostics_events_enabled - * Optional. Indicates whether diagnostic collection is enabled for the VM - * cluster - * @type bool $health_monitoring_enabled - * Optional. Indicates whether health monitoring is enabled for the VM cluster - * @type bool $incident_logs_enabled - * Optional. Indicates whether incident logs and trace collection are enabled - * for the VM cluster - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Oracledatabase\V1\VmCluster::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Indicates whether diagnostic collection is enabled for the VM - * cluster - * - * Generated from protobuf field bool diagnostics_events_enabled = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getDiagnosticsEventsEnabled() - { - return $this->diagnostics_events_enabled; - } - - /** - * Optional. Indicates whether diagnostic collection is enabled for the VM - * cluster - * - * Generated from protobuf field bool diagnostics_events_enabled = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setDiagnosticsEventsEnabled($var) - { - GPBUtil::checkBool($var); - $this->diagnostics_events_enabled = $var; - - return $this; - } - - /** - * Optional. Indicates whether health monitoring is enabled for the VM cluster - * - * Generated from protobuf field bool health_monitoring_enabled = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getHealthMonitoringEnabled() - { - return $this->health_monitoring_enabled; - } - - /** - * Optional. Indicates whether health monitoring is enabled for the VM cluster - * - * Generated from protobuf field bool health_monitoring_enabled = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setHealthMonitoringEnabled($var) - { - GPBUtil::checkBool($var); - $this->health_monitoring_enabled = $var; - - return $this; - } - - /** - * Optional. Indicates whether incident logs and trace collection are enabled - * for the VM cluster - * - * Generated from protobuf field bool incident_logs_enabled = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getIncidentLogsEnabled() - { - return $this->incident_logs_enabled; - } - - /** - * Optional. Indicates whether incident logs and trace collection are enabled - * for the VM cluster - * - * Generated from protobuf field bool incident_logs_enabled = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setIncidentLogsEnabled($var) - { - GPBUtil::checkBool($var); - $this->incident_logs_enabled = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DatabaseConnectionStringProfile.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DatabaseConnectionStringProfile.php deleted file mode 100644 index 8b1f70647671..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DatabaseConnectionStringProfile.php +++ /dev/null @@ -1,352 +0,0 @@ -google.cloud.oracledatabase.v1.DatabaseConnectionStringProfile - */ -class DatabaseConnectionStringProfile extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The current consumer group being used by the connection. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.DatabaseConnectionStringProfile.ConsumerGroup consumer_group = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $consumer_group = 0; - /** - * Output only. The display name for the database connection. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $display_name = ''; - /** - * Output only. The host name format being currently used in connection - * string. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.DatabaseConnectionStringProfile.HostFormat host_format = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $host_format = 0; - /** - * Output only. This field indicates if the connection string is regional and - * is only applicable for cross-region Data Guard. - * - * Generated from protobuf field bool is_regional = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $is_regional = false; - /** - * Output only. The protocol being used by the connection. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.DatabaseConnectionStringProfile.Protocol protocol = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $protocol = 0; - /** - * Output only. The current session mode of the connection. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.DatabaseConnectionStringProfile.SessionMode session_mode = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $session_mode = 0; - /** - * Output only. The syntax of the connection string. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.DatabaseConnectionStringProfile.SyntaxFormat syntax_format = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $syntax_format = 0; - /** - * Output only. This field indicates the TLS authentication type of the - * connection. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.DatabaseConnectionStringProfile.TLSAuthentication tls_authentication = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $tls_authentication = 0; - /** - * Output only. The value of the connection string. - * - * Generated from protobuf field string value = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $value = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $consumer_group - * Output only. The current consumer group being used by the connection. - * @type string $display_name - * Output only. The display name for the database connection. - * @type int $host_format - * Output only. The host name format being currently used in connection - * string. - * @type bool $is_regional - * Output only. This field indicates if the connection string is regional and - * is only applicable for cross-region Data Guard. - * @type int $protocol - * Output only. The protocol being used by the connection. - * @type int $session_mode - * Output only. The current session mode of the connection. - * @type int $syntax_format - * Output only. The syntax of the connection string. - * @type int $tls_authentication - * Output only. This field indicates the TLS authentication type of the - * connection. - * @type string $value - * Output only. The value of the connection string. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Oracledatabase\V1\AutonomousDatabase::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The current consumer group being used by the connection. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.DatabaseConnectionStringProfile.ConsumerGroup consumer_group = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getConsumerGroup() - { - return $this->consumer_group; - } - - /** - * Output only. The current consumer group being used by the connection. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.DatabaseConnectionStringProfile.ConsumerGroup consumer_group = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setConsumerGroup($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\OracleDatabase\V1\DatabaseConnectionStringProfile\ConsumerGroup::class); - $this->consumer_group = $var; - - return $this; - } - - /** - * Output only. The display name for the database connection. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Output only. The display name for the database connection. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Output only. The host name format being currently used in connection - * string. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.DatabaseConnectionStringProfile.HostFormat host_format = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getHostFormat() - { - return $this->host_format; - } - - /** - * Output only. The host name format being currently used in connection - * string. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.DatabaseConnectionStringProfile.HostFormat host_format = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setHostFormat($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\OracleDatabase\V1\DatabaseConnectionStringProfile\HostFormat::class); - $this->host_format = $var; - - return $this; - } - - /** - * Output only. This field indicates if the connection string is regional and - * is only applicable for cross-region Data Guard. - * - * Generated from protobuf field bool is_regional = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getIsRegional() - { - return $this->is_regional; - } - - /** - * Output only. This field indicates if the connection string is regional and - * is only applicable for cross-region Data Guard. - * - * Generated from protobuf field bool is_regional = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setIsRegional($var) - { - GPBUtil::checkBool($var); - $this->is_regional = $var; - - return $this; - } - - /** - * Output only. The protocol being used by the connection. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.DatabaseConnectionStringProfile.Protocol protocol = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getProtocol() - { - return $this->protocol; - } - - /** - * Output only. The protocol being used by the connection. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.DatabaseConnectionStringProfile.Protocol protocol = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setProtocol($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\OracleDatabase\V1\DatabaseConnectionStringProfile\Protocol::class); - $this->protocol = $var; - - return $this; - } - - /** - * Output only. The current session mode of the connection. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.DatabaseConnectionStringProfile.SessionMode session_mode = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getSessionMode() - { - return $this->session_mode; - } - - /** - * Output only. The current session mode of the connection. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.DatabaseConnectionStringProfile.SessionMode session_mode = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setSessionMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\OracleDatabase\V1\DatabaseConnectionStringProfile\SessionMode::class); - $this->session_mode = $var; - - return $this; - } - - /** - * Output only. The syntax of the connection string. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.DatabaseConnectionStringProfile.SyntaxFormat syntax_format = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getSyntaxFormat() - { - return $this->syntax_format; - } - - /** - * Output only. The syntax of the connection string. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.DatabaseConnectionStringProfile.SyntaxFormat syntax_format = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setSyntaxFormat($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\OracleDatabase\V1\DatabaseConnectionStringProfile\SyntaxFormat::class); - $this->syntax_format = $var; - - return $this; - } - - /** - * Output only. This field indicates the TLS authentication type of the - * connection. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.DatabaseConnectionStringProfile.TLSAuthentication tls_authentication = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getTlsAuthentication() - { - return $this->tls_authentication; - } - - /** - * Output only. This field indicates the TLS authentication type of the - * connection. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.DatabaseConnectionStringProfile.TLSAuthentication tls_authentication = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setTlsAuthentication($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\OracleDatabase\V1\DatabaseConnectionStringProfile\TLSAuthentication::class); - $this->tls_authentication = $var; - - return $this; - } - - /** - * Output only. The value of the connection string. - * - * Generated from protobuf field string value = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getValue() - { - return $this->value; - } - - /** - * Output only. The value of the connection string. - * - * Generated from protobuf field string value = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setValue($var) - { - GPBUtil::checkString($var, True); - $this->value = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DatabaseConnectionStringProfile/ConsumerGroup.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DatabaseConnectionStringProfile/ConsumerGroup.php deleted file mode 100644 index 929945ac2ebc..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DatabaseConnectionStringProfile/ConsumerGroup.php +++ /dev/null @@ -1,85 +0,0 @@ -google.cloud.oracledatabase.v1.DatabaseConnectionStringProfile.ConsumerGroup - */ -class ConsumerGroup -{ - /** - * Default unspecified value. - * - * Generated from protobuf enum CONSUMER_GROUP_UNSPECIFIED = 0; - */ - const CONSUMER_GROUP_UNSPECIFIED = 0; - /** - * High consumer group. - * - * Generated from protobuf enum HIGH = 1; - */ - const HIGH = 1; - /** - * Medium consumer group. - * - * Generated from protobuf enum MEDIUM = 2; - */ - const MEDIUM = 2; - /** - * Low consumer group. - * - * Generated from protobuf enum LOW = 3; - */ - const LOW = 3; - /** - * TP consumer group. - * - * Generated from protobuf enum TP = 4; - */ - const TP = 4; - /** - * TPURGENT consumer group. - * - * Generated from protobuf enum TPURGENT = 5; - */ - const TPURGENT = 5; - - private static $valueToName = [ - self::CONSUMER_GROUP_UNSPECIFIED => 'CONSUMER_GROUP_UNSPECIFIED', - self::HIGH => 'HIGH', - self::MEDIUM => 'MEDIUM', - self::LOW => 'LOW', - self::TP => 'TP', - self::TPURGENT => 'TPURGENT', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ConsumerGroup::class, \Google\Cloud\OracleDatabase\V1\DatabaseConnectionStringProfile_ConsumerGroup::class); - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DatabaseConnectionStringProfile/HostFormat.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DatabaseConnectionStringProfile/HostFormat.php deleted file mode 100644 index 4c80de56aed5..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DatabaseConnectionStringProfile/HostFormat.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.oracledatabase.v1.DatabaseConnectionStringProfile.HostFormat - */ -class HostFormat -{ - /** - * Default unspecified value. - * - * Generated from protobuf enum HOST_FORMAT_UNSPECIFIED = 0; - */ - const HOST_FORMAT_UNSPECIFIED = 0; - /** - * FQDN - * - * Generated from protobuf enum FQDN = 1; - */ - const FQDN = 1; - /** - * IP - * - * Generated from protobuf enum IP = 2; - */ - const IP = 2; - - private static $valueToName = [ - self::HOST_FORMAT_UNSPECIFIED => 'HOST_FORMAT_UNSPECIFIED', - self::FQDN => 'FQDN', - self::IP => 'IP', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(HostFormat::class, \Google\Cloud\OracleDatabase\V1\DatabaseConnectionStringProfile_HostFormat::class); - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DatabaseConnectionStringProfile/Protocol.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DatabaseConnectionStringProfile/Protocol.php deleted file mode 100644 index b997f9c87ff6..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DatabaseConnectionStringProfile/Protocol.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.oracledatabase.v1.DatabaseConnectionStringProfile.Protocol - */ -class Protocol -{ - /** - * Default unspecified value. - * - * Generated from protobuf enum PROTOCOL_UNSPECIFIED = 0; - */ - const PROTOCOL_UNSPECIFIED = 0; - /** - * Tcp - * - * Generated from protobuf enum TCP = 1; - */ - const TCP = 1; - /** - * Tcps - * - * Generated from protobuf enum TCPS = 2; - */ - const TCPS = 2; - - private static $valueToName = [ - self::PROTOCOL_UNSPECIFIED => 'PROTOCOL_UNSPECIFIED', - self::TCP => 'TCP', - self::TCPS => 'TCPS', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Protocol::class, \Google\Cloud\OracleDatabase\V1\DatabaseConnectionStringProfile_Protocol::class); - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DatabaseConnectionStringProfile/SessionMode.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DatabaseConnectionStringProfile/SessionMode.php deleted file mode 100644 index 03776dd82981..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DatabaseConnectionStringProfile/SessionMode.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.oracledatabase.v1.DatabaseConnectionStringProfile.SessionMode - */ -class SessionMode -{ - /** - * Default unspecified value. - * - * Generated from protobuf enum SESSION_MODE_UNSPECIFIED = 0; - */ - const SESSION_MODE_UNSPECIFIED = 0; - /** - * Direct - * - * Generated from protobuf enum DIRECT = 1; - */ - const DIRECT = 1; - /** - * Indirect - * - * Generated from protobuf enum INDIRECT = 2; - */ - const INDIRECT = 2; - - private static $valueToName = [ - self::SESSION_MODE_UNSPECIFIED => 'SESSION_MODE_UNSPECIFIED', - self::DIRECT => 'DIRECT', - self::INDIRECT => 'INDIRECT', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SessionMode::class, \Google\Cloud\OracleDatabase\V1\DatabaseConnectionStringProfile_SessionMode::class); - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DatabaseConnectionStringProfile/SyntaxFormat.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DatabaseConnectionStringProfile/SyntaxFormat.php deleted file mode 100644 index 1aec22587f72..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DatabaseConnectionStringProfile/SyntaxFormat.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.oracledatabase.v1.DatabaseConnectionStringProfile.SyntaxFormat - */ -class SyntaxFormat -{ - /** - * Default unspecified value. - * - * Generated from protobuf enum SYNTAX_FORMAT_UNSPECIFIED = 0; - */ - const SYNTAX_FORMAT_UNSPECIFIED = 0; - /** - * Long - * - * Generated from protobuf enum LONG = 1; - */ - const LONG = 1; - /** - * Ezconnect - * - * Generated from protobuf enum EZCONNECT = 2; - */ - const EZCONNECT = 2; - /** - * Ezconnectplus - * - * Generated from protobuf enum EZCONNECTPLUS = 3; - */ - const EZCONNECTPLUS = 3; - - private static $valueToName = [ - self::SYNTAX_FORMAT_UNSPECIFIED => 'SYNTAX_FORMAT_UNSPECIFIED', - self::LONG => 'LONG', - self::EZCONNECT => 'EZCONNECT', - self::EZCONNECTPLUS => 'EZCONNECTPLUS', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SyntaxFormat::class, \Google\Cloud\OracleDatabase\V1\DatabaseConnectionStringProfile_SyntaxFormat::class); - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DatabaseConnectionStringProfile/TLSAuthentication.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DatabaseConnectionStringProfile/TLSAuthentication.php deleted file mode 100644 index e94024b177f3..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DatabaseConnectionStringProfile/TLSAuthentication.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.oracledatabase.v1.DatabaseConnectionStringProfile.TLSAuthentication - */ -class TLSAuthentication -{ - /** - * Default unspecified value. - * - * Generated from protobuf enum TLS_AUTHENTICATION_UNSPECIFIED = 0; - */ - const TLS_AUTHENTICATION_UNSPECIFIED = 0; - /** - * Server - * - * Generated from protobuf enum SERVER = 1; - */ - const SERVER = 1; - /** - * Mutual - * - * Generated from protobuf enum MUTUAL = 2; - */ - const MUTUAL = 2; - - private static $valueToName = [ - self::TLS_AUTHENTICATION_UNSPECIFIED => 'TLS_AUTHENTICATION_UNSPECIFIED', - self::SERVER => 'SERVER', - self::MUTUAL => 'MUTUAL', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(TLSAuthentication::class, \Google\Cloud\OracleDatabase\V1\DatabaseConnectionStringProfile_TLSAuthentication::class); - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DbNode.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DbNode.php deleted file mode 100644 index fadef514cd96..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DbNode.php +++ /dev/null @@ -1,116 +0,0 @@ -google.cloud.oracledatabase.v1.DbNode - */ -class DbNode extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. The name of the database node resource in the following format: - * projects/{project}/locations/{location}/cloudVmClusters/{cloud_vm_cluster}/dbNodes/{db_node} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Optional. Various properties of the database node. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.DbNodeProperties properties = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $properties = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. The name of the database node resource in the following format: - * projects/{project}/locations/{location}/cloudVmClusters/{cloud_vm_cluster}/dbNodes/{db_node} - * @type \Google\Cloud\OracleDatabase\V1\DbNodeProperties $properties - * Optional. Various properties of the database node. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Oracledatabase\V1\DbNode::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. The name of the database node resource in the following format: - * projects/{project}/locations/{location}/cloudVmClusters/{cloud_vm_cluster}/dbNodes/{db_node} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. The name of the database node resource in the following format: - * projects/{project}/locations/{location}/cloudVmClusters/{cloud_vm_cluster}/dbNodes/{db_node} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. Various properties of the database node. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.DbNodeProperties properties = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\OracleDatabase\V1\DbNodeProperties|null - */ - public function getProperties() - { - return $this->properties; - } - - public function hasProperties() - { - return isset($this->properties); - } - - public function clearProperties() - { - unset($this->properties); - } - - /** - * Optional. Various properties of the database node. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.DbNodeProperties properties = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\OracleDatabase\V1\DbNodeProperties $var - * @return $this - */ - public function setProperties($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OracleDatabase\V1\DbNodeProperties::class); - $this->properties = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DbNodeProperties.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DbNodeProperties.php deleted file mode 100644 index 039b98065d2c..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DbNodeProperties.php +++ /dev/null @@ -1,305 +0,0 @@ -google.cloud.oracledatabase.v1.DbNodeProperties - */ -class DbNodeProperties extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. OCID of database node. - * - * Generated from protobuf field string ocid = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $ocid = ''; - /** - * Optional. OCPU count per database node. - * - * Generated from protobuf field int32 ocpu_count = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $ocpu_count = 0; - /** - * Memory allocated in GBs. - * - * Generated from protobuf field int32 memory_size_gb = 3; - */ - protected $memory_size_gb = 0; - /** - * Optional. Local storage per database node. - * - * Generated from protobuf field int32 db_node_storage_size_gb = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $db_node_storage_size_gb = 0; - /** - * Optional. Database server OCID. - * - * Generated from protobuf field string db_server_ocid = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $db_server_ocid = ''; - /** - * Optional. DNS - * - * Generated from protobuf field string hostname = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $hostname = ''; - /** - * Output only. State of the database node. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.DbNodeProperties.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Total CPU core count of the database node. - * - * Generated from protobuf field int32 total_cpu_core_count = 10; - */ - protected $total_cpu_core_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $ocid - * Output only. OCID of database node. - * @type int $ocpu_count - * Optional. OCPU count per database node. - * @type int $memory_size_gb - * Memory allocated in GBs. - * @type int $db_node_storage_size_gb - * Optional. Local storage per database node. - * @type string $db_server_ocid - * Optional. Database server OCID. - * @type string $hostname - * Optional. DNS - * @type int $state - * Output only. State of the database node. - * @type int $total_cpu_core_count - * Total CPU core count of the database node. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Oracledatabase\V1\DbNode::initOnce(); - parent::__construct($data); - } - - /** - * Output only. OCID of database node. - * - * Generated from protobuf field string ocid = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getOcid() - { - return $this->ocid; - } - - /** - * Output only. OCID of database node. - * - * Generated from protobuf field string ocid = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setOcid($var) - { - GPBUtil::checkString($var, True); - $this->ocid = $var; - - return $this; - } - - /** - * Optional. OCPU count per database node. - * - * Generated from protobuf field int32 ocpu_count = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getOcpuCount() - { - return $this->ocpu_count; - } - - /** - * Optional. OCPU count per database node. - * - * Generated from protobuf field int32 ocpu_count = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setOcpuCount($var) - { - GPBUtil::checkInt32($var); - $this->ocpu_count = $var; - - return $this; - } - - /** - * Memory allocated in GBs. - * - * Generated from protobuf field int32 memory_size_gb = 3; - * @return int - */ - public function getMemorySizeGb() - { - return $this->memory_size_gb; - } - - /** - * Memory allocated in GBs. - * - * Generated from protobuf field int32 memory_size_gb = 3; - * @param int $var - * @return $this - */ - public function setMemorySizeGb($var) - { - GPBUtil::checkInt32($var); - $this->memory_size_gb = $var; - - return $this; - } - - /** - * Optional. Local storage per database node. - * - * Generated from protobuf field int32 db_node_storage_size_gb = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getDbNodeStorageSizeGb() - { - return $this->db_node_storage_size_gb; - } - - /** - * Optional. Local storage per database node. - * - * Generated from protobuf field int32 db_node_storage_size_gb = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setDbNodeStorageSizeGb($var) - { - GPBUtil::checkInt32($var); - $this->db_node_storage_size_gb = $var; - - return $this; - } - - /** - * Optional. Database server OCID. - * - * Generated from protobuf field string db_server_ocid = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDbServerOcid() - { - return $this->db_server_ocid; - } - - /** - * Optional. Database server OCID. - * - * Generated from protobuf field string db_server_ocid = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDbServerOcid($var) - { - GPBUtil::checkString($var, True); - $this->db_server_ocid = $var; - - return $this; - } - - /** - * Optional. DNS - * - * Generated from protobuf field string hostname = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getHostname() - { - return $this->hostname; - } - - /** - * Optional. DNS - * - * Generated from protobuf field string hostname = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setHostname($var) - { - GPBUtil::checkString($var, True); - $this->hostname = $var; - - return $this; - } - - /** - * Output only. State of the database node. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.DbNodeProperties.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. State of the database node. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.DbNodeProperties.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\OracleDatabase\V1\DbNodeProperties\State::class); - $this->state = $var; - - return $this; - } - - /** - * Total CPU core count of the database node. - * - * Generated from protobuf field int32 total_cpu_core_count = 10; - * @return int - */ - public function getTotalCpuCoreCount() - { - return $this->total_cpu_core_count; - } - - /** - * Total CPU core count of the database node. - * - * Generated from protobuf field int32 total_cpu_core_count = 10; - * @param int $var - * @return $this - */ - public function setTotalCpuCoreCount($var) - { - GPBUtil::checkInt32($var); - $this->total_cpu_core_count = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DbNodeProperties/State.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DbNodeProperties/State.php deleted file mode 100644 index dc053f553afc..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DbNodeProperties/State.php +++ /dev/null @@ -1,113 +0,0 @@ -google.cloud.oracledatabase.v1.DbNodeProperties.State - */ -class State -{ - /** - * Default unspecified value. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Indicates that the resource is in provisioning state. - * - * Generated from protobuf enum PROVISIONING = 1; - */ - const PROVISIONING = 1; - /** - * Indicates that the resource is in available state. - * - * Generated from protobuf enum AVAILABLE = 2; - */ - const AVAILABLE = 2; - /** - * Indicates that the resource is in updating state. - * - * Generated from protobuf enum UPDATING = 3; - */ - const UPDATING = 3; - /** - * Indicates that the resource is in stopping state. - * - * Generated from protobuf enum STOPPING = 4; - */ - const STOPPING = 4; - /** - * Indicates that the resource is in stopped state. - * - * Generated from protobuf enum STOPPED = 5; - */ - const STOPPED = 5; - /** - * Indicates that the resource is in starting state. - * - * Generated from protobuf enum STARTING = 6; - */ - const STARTING = 6; - /** - * Indicates that the resource is in terminating state. - * - * Generated from protobuf enum TERMINATING = 7; - */ - const TERMINATING = 7; - /** - * Indicates that the resource is in terminated state. - * - * Generated from protobuf enum TERMINATED = 8; - */ - const TERMINATED = 8; - /** - * Indicates that the resource is in failed state. - * - * Generated from protobuf enum FAILED = 9; - */ - const FAILED = 9; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::PROVISIONING => 'PROVISIONING', - self::AVAILABLE => 'AVAILABLE', - self::UPDATING => 'UPDATING', - self::STOPPING => 'STOPPING', - self::STOPPED => 'STOPPED', - self::STARTING => 'STARTING', - self::TERMINATING => 'TERMINATING', - self::TERMINATED => 'TERMINATED', - self::FAILED => 'FAILED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\OracleDatabase\V1\DbNodeProperties_State::class); - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DbServer.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DbServer.php deleted file mode 100644 index c0ffe3f99517..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DbServer.php +++ /dev/null @@ -1,150 +0,0 @@ -google.cloud.oracledatabase.v1.DbServer - */ -class DbServer extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. The name of the database server resource with the format: - * projects/{project}/locations/{location}/cloudExadataInfrastructures/{cloud_exadata_infrastructure}/dbServers/{db_server} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Optional. User friendly name for this resource. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $display_name = ''; - /** - * Optional. Various properties of the database server. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.DbServerProperties properties = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $properties = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. The name of the database server resource with the format: - * projects/{project}/locations/{location}/cloudExadataInfrastructures/{cloud_exadata_infrastructure}/dbServers/{db_server} - * @type string $display_name - * Optional. User friendly name for this resource. - * @type \Google\Cloud\OracleDatabase\V1\DbServerProperties $properties - * Optional. Various properties of the database server. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Oracledatabase\V1\DbServer::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. The name of the database server resource with the format: - * projects/{project}/locations/{location}/cloudExadataInfrastructures/{cloud_exadata_infrastructure}/dbServers/{db_server} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. The name of the database server resource with the format: - * projects/{project}/locations/{location}/cloudExadataInfrastructures/{cloud_exadata_infrastructure}/dbServers/{db_server} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. User friendly name for this resource. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Optional. User friendly name for this resource. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Optional. Various properties of the database server. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.DbServerProperties properties = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\OracleDatabase\V1\DbServerProperties|null - */ - public function getProperties() - { - return $this->properties; - } - - public function hasProperties() - { - return isset($this->properties); - } - - public function clearProperties() - { - unset($this->properties); - } - - /** - * Optional. Various properties of the database server. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.DbServerProperties properties = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\OracleDatabase\V1\DbServerProperties $var - * @return $this - */ - public function setProperties($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OracleDatabase\V1\DbServerProperties::class); - $this->properties = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DbServerProperties.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DbServerProperties.php deleted file mode 100644 index 61585de65cca..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DbServerProperties.php +++ /dev/null @@ -1,373 +0,0 @@ -google.cloud.oracledatabase.v1.DbServerProperties - */ -class DbServerProperties extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. OCID of database server. - * - * Generated from protobuf field string ocid = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $ocid = ''; - /** - * Optional. OCPU count per database. - * - * Generated from protobuf field int32 ocpu_count = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $ocpu_count = 0; - /** - * Optional. Maximum OCPU count per database. - * - * Generated from protobuf field int32 max_ocpu_count = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $max_ocpu_count = 0; - /** - * Optional. Memory allocated in GBs. - * - * Generated from protobuf field int32 memory_size_gb = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $memory_size_gb = 0; - /** - * Optional. Maximum memory allocated in GBs. - * - * Generated from protobuf field int32 max_memory_size_gb = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $max_memory_size_gb = 0; - /** - * Optional. Local storage per VM. - * - * Generated from protobuf field int32 db_node_storage_size_gb = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $db_node_storage_size_gb = 0; - /** - * Optional. Maximum local storage per VM. - * - * Generated from protobuf field int32 max_db_node_storage_size_gb = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $max_db_node_storage_size_gb = 0; - /** - * Optional. Vm count per database. - * - * Generated from protobuf field int32 vm_count = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $vm_count = 0; - /** - * Output only. State of the database server. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.DbServerProperties.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. OCID of database nodes associated with the database server. - * - * Generated from protobuf field repeated string db_node_ids = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $db_node_ids; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $ocid - * Output only. OCID of database server. - * @type int $ocpu_count - * Optional. OCPU count per database. - * @type int $max_ocpu_count - * Optional. Maximum OCPU count per database. - * @type int $memory_size_gb - * Optional. Memory allocated in GBs. - * @type int $max_memory_size_gb - * Optional. Maximum memory allocated in GBs. - * @type int $db_node_storage_size_gb - * Optional. Local storage per VM. - * @type int $max_db_node_storage_size_gb - * Optional. Maximum local storage per VM. - * @type int $vm_count - * Optional. Vm count per database. - * @type int $state - * Output only. State of the database server. - * @type array|\Google\Protobuf\Internal\RepeatedField $db_node_ids - * Output only. OCID of database nodes associated with the database server. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Oracledatabase\V1\DbServer::initOnce(); - parent::__construct($data); - } - - /** - * Output only. OCID of database server. - * - * Generated from protobuf field string ocid = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getOcid() - { - return $this->ocid; - } - - /** - * Output only. OCID of database server. - * - * Generated from protobuf field string ocid = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setOcid($var) - { - GPBUtil::checkString($var, True); - $this->ocid = $var; - - return $this; - } - - /** - * Optional. OCPU count per database. - * - * Generated from protobuf field int32 ocpu_count = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getOcpuCount() - { - return $this->ocpu_count; - } - - /** - * Optional. OCPU count per database. - * - * Generated from protobuf field int32 ocpu_count = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setOcpuCount($var) - { - GPBUtil::checkInt32($var); - $this->ocpu_count = $var; - - return $this; - } - - /** - * Optional. Maximum OCPU count per database. - * - * Generated from protobuf field int32 max_ocpu_count = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getMaxOcpuCount() - { - return $this->max_ocpu_count; - } - - /** - * Optional. Maximum OCPU count per database. - * - * Generated from protobuf field int32 max_ocpu_count = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setMaxOcpuCount($var) - { - GPBUtil::checkInt32($var); - $this->max_ocpu_count = $var; - - return $this; - } - - /** - * Optional. Memory allocated in GBs. - * - * Generated from protobuf field int32 memory_size_gb = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getMemorySizeGb() - { - return $this->memory_size_gb; - } - - /** - * Optional. Memory allocated in GBs. - * - * Generated from protobuf field int32 memory_size_gb = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setMemorySizeGb($var) - { - GPBUtil::checkInt32($var); - $this->memory_size_gb = $var; - - return $this; - } - - /** - * Optional. Maximum memory allocated in GBs. - * - * Generated from protobuf field int32 max_memory_size_gb = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getMaxMemorySizeGb() - { - return $this->max_memory_size_gb; - } - - /** - * Optional. Maximum memory allocated in GBs. - * - * Generated from protobuf field int32 max_memory_size_gb = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setMaxMemorySizeGb($var) - { - GPBUtil::checkInt32($var); - $this->max_memory_size_gb = $var; - - return $this; - } - - /** - * Optional. Local storage per VM. - * - * Generated from protobuf field int32 db_node_storage_size_gb = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getDbNodeStorageSizeGb() - { - return $this->db_node_storage_size_gb; - } - - /** - * Optional. Local storage per VM. - * - * Generated from protobuf field int32 db_node_storage_size_gb = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setDbNodeStorageSizeGb($var) - { - GPBUtil::checkInt32($var); - $this->db_node_storage_size_gb = $var; - - return $this; - } - - /** - * Optional. Maximum local storage per VM. - * - * Generated from protobuf field int32 max_db_node_storage_size_gb = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getMaxDbNodeStorageSizeGb() - { - return $this->max_db_node_storage_size_gb; - } - - /** - * Optional. Maximum local storage per VM. - * - * Generated from protobuf field int32 max_db_node_storage_size_gb = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setMaxDbNodeStorageSizeGb($var) - { - GPBUtil::checkInt32($var); - $this->max_db_node_storage_size_gb = $var; - - return $this; - } - - /** - * Optional. Vm count per database. - * - * Generated from protobuf field int32 vm_count = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getVmCount() - { - return $this->vm_count; - } - - /** - * Optional. Vm count per database. - * - * Generated from protobuf field int32 vm_count = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setVmCount($var) - { - GPBUtil::checkInt32($var); - $this->vm_count = $var; - - return $this; - } - - /** - * Output only. State of the database server. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.DbServerProperties.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. State of the database server. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.DbServerProperties.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\OracleDatabase\V1\DbServerProperties\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. OCID of database nodes associated with the database server. - * - * Generated from protobuf field repeated string db_node_ids = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDbNodeIds() - { - return $this->db_node_ids; - } - - /** - * Output only. OCID of database nodes associated with the database server. - * - * Generated from protobuf field repeated string db_node_ids = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDbNodeIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->db_node_ids = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DbServerProperties/State.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DbServerProperties/State.php deleted file mode 100644 index 9418d0c58bd2..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DbServerProperties/State.php +++ /dev/null @@ -1,85 +0,0 @@ -google.cloud.oracledatabase.v1.DbServerProperties.State - */ -class State -{ - /** - * Default unspecified value. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Indicates that the resource is in creating state. - * - * Generated from protobuf enum CREATING = 1; - */ - const CREATING = 1; - /** - * Indicates that the resource is in available state. - * - * Generated from protobuf enum AVAILABLE = 2; - */ - const AVAILABLE = 2; - /** - * Indicates that the resource is in unavailable state. - * - * Generated from protobuf enum UNAVAILABLE = 3; - */ - const UNAVAILABLE = 3; - /** - * Indicates that the resource is in deleting state. - * - * Generated from protobuf enum DELETING = 4; - */ - const DELETING = 4; - /** - * Indicates that the resource is in deleted state. - * - * Generated from protobuf enum DELETED = 5; - */ - const DELETED = 5; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::CREATING => 'CREATING', - self::AVAILABLE => 'AVAILABLE', - self::UNAVAILABLE => 'UNAVAILABLE', - self::DELETING => 'DELETING', - self::DELETED => 'DELETED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\OracleDatabase\V1\DbServerProperties_State::class); - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DbSystemShape.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DbSystemShape.php deleted file mode 100644 index 9d22965d8b40..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DbSystemShape.php +++ /dev/null @@ -1,446 +0,0 @@ -google.cloud.oracledatabase.v1.DbSystemShape - */ -class DbSystemShape extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. The name of the Database System Shape resource with the format: - * projects/{project}/locations/{region}/dbSystemShapes/{db_system_shape} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Optional. shape - * - * Generated from protobuf field string shape = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $shape = ''; - /** - * Optional. Minimum number of database servers. - * - * Generated from protobuf field int32 min_node_count = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $min_node_count = 0; - /** - * Optional. Maximum number of database servers. - * - * Generated from protobuf field int32 max_node_count = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $max_node_count = 0; - /** - * Optional. Minimum number of storage servers. - * - * Generated from protobuf field int32 min_storage_count = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $min_storage_count = 0; - /** - * Optional. Maximum number of storage servers. - * - * Generated from protobuf field int32 max_storage_count = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $max_storage_count = 0; - /** - * Optional. Number of cores per node. - * - * Generated from protobuf field int32 available_core_count_per_node = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $available_core_count_per_node = 0; - /** - * Optional. Memory per database server node in gigabytes. - * - * Generated from protobuf field int32 available_memory_per_node_gb = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $available_memory_per_node_gb = 0; - /** - * Optional. Storage per storage server in terabytes. - * - * Generated from protobuf field int32 available_data_storage_tb = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $available_data_storage_tb = 0; - /** - * Optional. Minimum core count per node. - * - * Generated from protobuf field int32 min_core_count_per_node = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $min_core_count_per_node = 0; - /** - * Optional. Minimum memory per node in gigabytes. - * - * Generated from protobuf field int32 min_memory_per_node_gb = 11 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $min_memory_per_node_gb = 0; - /** - * Optional. Minimum node storage per database server in gigabytes. - * - * Generated from protobuf field int32 min_db_node_storage_per_node_gb = 12 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $min_db_node_storage_per_node_gb = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. The name of the Database System Shape resource with the format: - * projects/{project}/locations/{region}/dbSystemShapes/{db_system_shape} - * @type string $shape - * Optional. shape - * @type int $min_node_count - * Optional. Minimum number of database servers. - * @type int $max_node_count - * Optional. Maximum number of database servers. - * @type int $min_storage_count - * Optional. Minimum number of storage servers. - * @type int $max_storage_count - * Optional. Maximum number of storage servers. - * @type int $available_core_count_per_node - * Optional. Number of cores per node. - * @type int $available_memory_per_node_gb - * Optional. Memory per database server node in gigabytes. - * @type int $available_data_storage_tb - * Optional. Storage per storage server in terabytes. - * @type int $min_core_count_per_node - * Optional. Minimum core count per node. - * @type int $min_memory_per_node_gb - * Optional. Minimum memory per node in gigabytes. - * @type int $min_db_node_storage_per_node_gb - * Optional. Minimum node storage per database server in gigabytes. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Oracledatabase\V1\DbSystemShape::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. The name of the Database System Shape resource with the format: - * projects/{project}/locations/{region}/dbSystemShapes/{db_system_shape} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. The name of the Database System Shape resource with the format: - * projects/{project}/locations/{region}/dbSystemShapes/{db_system_shape} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. shape - * - * Generated from protobuf field string shape = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getShape() - { - return $this->shape; - } - - /** - * Optional. shape - * - * Generated from protobuf field string shape = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setShape($var) - { - GPBUtil::checkString($var, True); - $this->shape = $var; - - return $this; - } - - /** - * Optional. Minimum number of database servers. - * - * Generated from protobuf field int32 min_node_count = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getMinNodeCount() - { - return $this->min_node_count; - } - - /** - * Optional. Minimum number of database servers. - * - * Generated from protobuf field int32 min_node_count = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setMinNodeCount($var) - { - GPBUtil::checkInt32($var); - $this->min_node_count = $var; - - return $this; - } - - /** - * Optional. Maximum number of database servers. - * - * Generated from protobuf field int32 max_node_count = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getMaxNodeCount() - { - return $this->max_node_count; - } - - /** - * Optional. Maximum number of database servers. - * - * Generated from protobuf field int32 max_node_count = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setMaxNodeCount($var) - { - GPBUtil::checkInt32($var); - $this->max_node_count = $var; - - return $this; - } - - /** - * Optional. Minimum number of storage servers. - * - * Generated from protobuf field int32 min_storage_count = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getMinStorageCount() - { - return $this->min_storage_count; - } - - /** - * Optional. Minimum number of storage servers. - * - * Generated from protobuf field int32 min_storage_count = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setMinStorageCount($var) - { - GPBUtil::checkInt32($var); - $this->min_storage_count = $var; - - return $this; - } - - /** - * Optional. Maximum number of storage servers. - * - * Generated from protobuf field int32 max_storage_count = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getMaxStorageCount() - { - return $this->max_storage_count; - } - - /** - * Optional. Maximum number of storage servers. - * - * Generated from protobuf field int32 max_storage_count = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setMaxStorageCount($var) - { - GPBUtil::checkInt32($var); - $this->max_storage_count = $var; - - return $this; - } - - /** - * Optional. Number of cores per node. - * - * Generated from protobuf field int32 available_core_count_per_node = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getAvailableCoreCountPerNode() - { - return $this->available_core_count_per_node; - } - - /** - * Optional. Number of cores per node. - * - * Generated from protobuf field int32 available_core_count_per_node = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setAvailableCoreCountPerNode($var) - { - GPBUtil::checkInt32($var); - $this->available_core_count_per_node = $var; - - return $this; - } - - /** - * Optional. Memory per database server node in gigabytes. - * - * Generated from protobuf field int32 available_memory_per_node_gb = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getAvailableMemoryPerNodeGb() - { - return $this->available_memory_per_node_gb; - } - - /** - * Optional. Memory per database server node in gigabytes. - * - * Generated from protobuf field int32 available_memory_per_node_gb = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setAvailableMemoryPerNodeGb($var) - { - GPBUtil::checkInt32($var); - $this->available_memory_per_node_gb = $var; - - return $this; - } - - /** - * Optional. Storage per storage server in terabytes. - * - * Generated from protobuf field int32 available_data_storage_tb = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getAvailableDataStorageTb() - { - return $this->available_data_storage_tb; - } - - /** - * Optional. Storage per storage server in terabytes. - * - * Generated from protobuf field int32 available_data_storage_tb = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setAvailableDataStorageTb($var) - { - GPBUtil::checkInt32($var); - $this->available_data_storage_tb = $var; - - return $this; - } - - /** - * Optional. Minimum core count per node. - * - * Generated from protobuf field int32 min_core_count_per_node = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getMinCoreCountPerNode() - { - return $this->min_core_count_per_node; - } - - /** - * Optional. Minimum core count per node. - * - * Generated from protobuf field int32 min_core_count_per_node = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setMinCoreCountPerNode($var) - { - GPBUtil::checkInt32($var); - $this->min_core_count_per_node = $var; - - return $this; - } - - /** - * Optional. Minimum memory per node in gigabytes. - * - * Generated from protobuf field int32 min_memory_per_node_gb = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getMinMemoryPerNodeGb() - { - return $this->min_memory_per_node_gb; - } - - /** - * Optional. Minimum memory per node in gigabytes. - * - * Generated from protobuf field int32 min_memory_per_node_gb = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setMinMemoryPerNodeGb($var) - { - GPBUtil::checkInt32($var); - $this->min_memory_per_node_gb = $var; - - return $this; - } - - /** - * Optional. Minimum node storage per database server in gigabytes. - * - * Generated from protobuf field int32 min_db_node_storage_per_node_gb = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getMinDbNodeStoragePerNodeGb() - { - return $this->min_db_node_storage_per_node_gb; - } - - /** - * Optional. Minimum node storage per database server in gigabytes. - * - * Generated from protobuf field int32 min_db_node_storage_per_node_gb = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setMinDbNodeStoragePerNodeGb($var) - { - GPBUtil::checkInt32($var); - $this->min_db_node_storage_per_node_gb = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DeleteAutonomousDatabaseRequest.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DeleteAutonomousDatabaseRequest.php deleted file mode 100644 index 178fadebc4ff..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DeleteAutonomousDatabaseRequest.php +++ /dev/null @@ -1,144 +0,0 @@ -google.cloud.oracledatabase.v1.DeleteAutonomousDatabaseRequest - */ -class DeleteAutonomousDatabaseRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the resource in the following format: - * projects/{project}/locations/{location}/autonomousDatabases/{autonomous_database}. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. An optional ID to identify the request. This value is used to - * identify duplicate requests. If you make a request with the same request ID - * and the original request is still in progress or completed, the server - * ignores the second request. This prevents clients from - * accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - */ - protected $request_id = ''; - - /** - * @param string $name Required. The name of the resource in the following format: - * projects/{project}/locations/{location}/autonomousDatabases/{autonomous_database}. Please see - * {@see OracleDatabaseClient::autonomousDatabaseName()} for help formatting this field. - * - * @return \Google\Cloud\OracleDatabase\V1\DeleteAutonomousDatabaseRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the resource in the following format: - * projects/{project}/locations/{location}/autonomousDatabases/{autonomous_database}. - * @type string $request_id - * Optional. An optional ID to identify the request. This value is used to - * identify duplicate requests. If you make a request with the same request ID - * and the original request is still in progress or completed, the server - * ignores the second request. This prevents clients from - * accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Oracledatabase\V1\Oracledatabase::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the resource in the following format: - * projects/{project}/locations/{location}/autonomousDatabases/{autonomous_database}. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the resource in the following format: - * projects/{project}/locations/{location}/autonomousDatabases/{autonomous_database}. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. An optional ID to identify the request. This value is used to - * identify duplicate requests. If you make a request with the same request ID - * and the original request is still in progress or completed, the server - * ignores the second request. This prevents clients from - * accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional ID to identify the request. This value is used to - * identify duplicate requests. If you make a request with the same request ID - * and the original request is still in progress or completed, the server - * ignores the second request. This prevents clients from - * accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DeleteCloudExadataInfrastructureRequest.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DeleteCloudExadataInfrastructureRequest.php deleted file mode 100644 index 6501036f4549..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DeleteCloudExadataInfrastructureRequest.php +++ /dev/null @@ -1,191 +0,0 @@ -google.cloud.oracledatabase.v1.DeleteCloudExadataInfrastructureRequest - */ -class DeleteCloudExadataInfrastructureRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the Cloud Exadata Infrastructure in the following - * format: - * projects/{project}/locations/{location}/cloudExadataInfrastructures/{cloud_exadata_infrastructure}. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. An optional ID to identify the request. This value is used to - * identify duplicate requests. If you make a request with the same request ID - * and the original request is still in progress or completed, the server - * ignores the second request. This prevents clients from - * accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - */ - protected $request_id = ''; - /** - * Optional. If set to true, all VM clusters for this Exadata Infrastructure - * will be deleted. An Exadata Infrastructure can only be deleted once all its - * VM clusters have been deleted. - * - * Generated from protobuf field bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $force = false; - - /** - * @param string $name Required. The name of the Cloud Exadata Infrastructure in the following - * format: - * projects/{project}/locations/{location}/cloudExadataInfrastructures/{cloud_exadata_infrastructure}. Please see - * {@see OracleDatabaseClient::cloudExadataInfrastructureName()} for help formatting this field. - * - * @return \Google\Cloud\OracleDatabase\V1\DeleteCloudExadataInfrastructureRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the Cloud Exadata Infrastructure in the following - * format: - * projects/{project}/locations/{location}/cloudExadataInfrastructures/{cloud_exadata_infrastructure}. - * @type string $request_id - * Optional. An optional ID to identify the request. This value is used to - * identify duplicate requests. If you make a request with the same request ID - * and the original request is still in progress or completed, the server - * ignores the second request. This prevents clients from - * accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @type bool $force - * Optional. If set to true, all VM clusters for this Exadata Infrastructure - * will be deleted. An Exadata Infrastructure can only be deleted once all its - * VM clusters have been deleted. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Oracledatabase\V1\Oracledatabase::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the Cloud Exadata Infrastructure in the following - * format: - * projects/{project}/locations/{location}/cloudExadataInfrastructures/{cloud_exadata_infrastructure}. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the Cloud Exadata Infrastructure in the following - * format: - * projects/{project}/locations/{location}/cloudExadataInfrastructures/{cloud_exadata_infrastructure}. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. An optional ID to identify the request. This value is used to - * identify duplicate requests. If you make a request with the same request ID - * and the original request is still in progress or completed, the server - * ignores the second request. This prevents clients from - * accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional ID to identify the request. This value is used to - * identify duplicate requests. If you make a request with the same request ID - * and the original request is still in progress or completed, the server - * ignores the second request. This prevents clients from - * accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - - /** - * Optional. If set to true, all VM clusters for this Exadata Infrastructure - * will be deleted. An Exadata Infrastructure can only be deleted once all its - * VM clusters have been deleted. - * - * Generated from protobuf field bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getForce() - { - return $this->force; - } - - /** - * Optional. If set to true, all VM clusters for this Exadata Infrastructure - * will be deleted. An Exadata Infrastructure can only be deleted once all its - * VM clusters have been deleted. - * - * Generated from protobuf field bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setForce($var) - { - GPBUtil::checkBool($var); - $this->force = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DeleteCloudVmClusterRequest.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DeleteCloudVmClusterRequest.php deleted file mode 100644 index 6618b7516b25..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/DeleteCloudVmClusterRequest.php +++ /dev/null @@ -1,186 +0,0 @@ -google.cloud.oracledatabase.v1.DeleteCloudVmClusterRequest - */ -class DeleteCloudVmClusterRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the Cloud VM Cluster in the following format: - * projects/{project}/locations/{location}/cloudVmClusters/{cloud_vm_cluster}. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. An optional ID to identify the request. This value is used to - * identify duplicate requests. If you make a request with the same request ID - * and the original request is still in progress or completed, the server - * ignores the second request. This prevents clients from - * accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - */ - protected $request_id = ''; - /** - * Optional. If set to true, all child resources for the VM Cluster will be - * deleted. A VM Cluster can only be deleted once all its child resources have - * been deleted. - * - * Generated from protobuf field bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $force = false; - - /** - * @param string $name Required. The name of the Cloud VM Cluster in the following format: - * projects/{project}/locations/{location}/cloudVmClusters/{cloud_vm_cluster}. Please see - * {@see OracleDatabaseClient::cloudVmClusterName()} for help formatting this field. - * - * @return \Google\Cloud\OracleDatabase\V1\DeleteCloudVmClusterRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the Cloud VM Cluster in the following format: - * projects/{project}/locations/{location}/cloudVmClusters/{cloud_vm_cluster}. - * @type string $request_id - * Optional. An optional ID to identify the request. This value is used to - * identify duplicate requests. If you make a request with the same request ID - * and the original request is still in progress or completed, the server - * ignores the second request. This prevents clients from - * accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @type bool $force - * Optional. If set to true, all child resources for the VM Cluster will be - * deleted. A VM Cluster can only be deleted once all its child resources have - * been deleted. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Oracledatabase\V1\Oracledatabase::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the Cloud VM Cluster in the following format: - * projects/{project}/locations/{location}/cloudVmClusters/{cloud_vm_cluster}. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the Cloud VM Cluster in the following format: - * projects/{project}/locations/{location}/cloudVmClusters/{cloud_vm_cluster}. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. An optional ID to identify the request. This value is used to - * identify duplicate requests. If you make a request with the same request ID - * and the original request is still in progress or completed, the server - * ignores the second request. This prevents clients from - * accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional ID to identify the request. This value is used to - * identify duplicate requests. If you make a request with the same request ID - * and the original request is still in progress or completed, the server - * ignores the second request. This prevents clients from - * accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - - /** - * Optional. If set to true, all child resources for the VM Cluster will be - * deleted. A VM Cluster can only be deleted once all its child resources have - * been deleted. - * - * Generated from protobuf field bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getForce() - { - return $this->force; - } - - /** - * Optional. If set to true, all child resources for the VM Cluster will be - * deleted. A VM Cluster can only be deleted once all its child resources have - * been deleted. - * - * Generated from protobuf field bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setForce($var) - { - GPBUtil::checkBool($var); - $this->force = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/Entitlement.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/Entitlement.php deleted file mode 100644 index d534ed0dc088..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/Entitlement.php +++ /dev/null @@ -1,183 +0,0 @@ -google.cloud.oracledatabase.v1.Entitlement - */ -class Entitlement extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. The name of the Entitlement resource with the format: - * projects/{project}/locations/{region}/entitlements/{entitlement} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Details of the OCI Cloud Account. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.CloudAccountDetails cloud_account_details = 2; - */ - protected $cloud_account_details = null; - /** - * Output only. Google Cloud Marketplace order ID (aka entitlement ID) - * - * Generated from protobuf field string entitlement_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $entitlement_id = ''; - /** - * Output only. Entitlement State. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.Entitlement.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. The name of the Entitlement resource with the format: - * projects/{project}/locations/{region}/entitlements/{entitlement} - * @type \Google\Cloud\OracleDatabase\V1\CloudAccountDetails $cloud_account_details - * Details of the OCI Cloud Account. - * @type string $entitlement_id - * Output only. Google Cloud Marketplace order ID (aka entitlement ID) - * @type int $state - * Output only. Entitlement State. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Oracledatabase\V1\Entitlement::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. The name of the Entitlement resource with the format: - * projects/{project}/locations/{region}/entitlements/{entitlement} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. The name of the Entitlement resource with the format: - * projects/{project}/locations/{region}/entitlements/{entitlement} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Details of the OCI Cloud Account. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.CloudAccountDetails cloud_account_details = 2; - * @return \Google\Cloud\OracleDatabase\V1\CloudAccountDetails|null - */ - public function getCloudAccountDetails() - { - return $this->cloud_account_details; - } - - public function hasCloudAccountDetails() - { - return isset($this->cloud_account_details); - } - - public function clearCloudAccountDetails() - { - unset($this->cloud_account_details); - } - - /** - * Details of the OCI Cloud Account. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.CloudAccountDetails cloud_account_details = 2; - * @param \Google\Cloud\OracleDatabase\V1\CloudAccountDetails $var - * @return $this - */ - public function setCloudAccountDetails($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OracleDatabase\V1\CloudAccountDetails::class); - $this->cloud_account_details = $var; - - return $this; - } - - /** - * Output only. Google Cloud Marketplace order ID (aka entitlement ID) - * - * Generated from protobuf field string entitlement_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getEntitlementId() - { - return $this->entitlement_id; - } - - /** - * Output only. Google Cloud Marketplace order ID (aka entitlement ID) - * - * Generated from protobuf field string entitlement_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setEntitlementId($var) - { - GPBUtil::checkString($var, True); - $this->entitlement_id = $var; - - return $this; - } - - /** - * Output only. Entitlement State. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.Entitlement.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. Entitlement State. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.Entitlement.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\OracleDatabase\V1\Entitlement\State::class); - $this->state = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/Entitlement/State.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/Entitlement/State.php deleted file mode 100644 index 5f4dde2882bc..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/Entitlement/State.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.oracledatabase.v1.Entitlement.State - */ -class State -{ - /** - * Default unspecified value. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Account not linked. - * - * Generated from protobuf enum ACCOUNT_NOT_LINKED = 1; - */ - const ACCOUNT_NOT_LINKED = 1; - /** - * Account is linked but not active. - * - * Generated from protobuf enum ACCOUNT_NOT_ACTIVE = 2; - */ - const ACCOUNT_NOT_ACTIVE = 2; - /** - * Entitlement and Account are active. - * - * Generated from protobuf enum ACTIVE = 3; - */ - const ACTIVE = 3; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::ACCOUNT_NOT_LINKED => 'ACCOUNT_NOT_LINKED', - self::ACCOUNT_NOT_ACTIVE => 'ACCOUNT_NOT_ACTIVE', - self::ACTIVE => 'ACTIVE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\OracleDatabase\V1\Entitlement_State::class); - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/GenerateAutonomousDatabaseWalletRequest.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/GenerateAutonomousDatabaseWalletRequest.php deleted file mode 100644 index ed1220a99486..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/GenerateAutonomousDatabaseWalletRequest.php +++ /dev/null @@ -1,210 +0,0 @@ -google.cloud.oracledatabase.v1.GenerateAutonomousDatabaseWalletRequest - */ -class GenerateAutonomousDatabaseWalletRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the Autonomous Database in the following format: - * projects/{project}/locations/{location}/autonomousDatabases/{autonomous_database}. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. The type of wallet generation for the Autonomous Database. The - * default value is SINGLE. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.GenerateType type = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $type = 0; - /** - * Optional. True when requesting regional connection strings in PDB connect - * info, applicable to cross-region Data Guard only. - * - * Generated from protobuf field bool is_regional = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $is_regional = false; - /** - * Required. The password used to encrypt the keys inside the wallet. The - * password must be a minimum of 8 characters. - * - * Generated from protobuf field string password = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $password = ''; - - /** - * @param string $name Required. The name of the Autonomous Database in the following format: - * projects/{project}/locations/{location}/autonomousDatabases/{autonomous_database}. Please see - * {@see OracleDatabaseClient::autonomousDatabaseName()} for help formatting this field. - * @param int $type Optional. The type of wallet generation for the Autonomous Database. The - * default value is SINGLE. - * For allowed values, use constants defined on {@see \Google\Cloud\OracleDatabase\V1\GenerateType} - * @param bool $isRegional Optional. True when requesting regional connection strings in PDB connect - * info, applicable to cross-region Data Guard only. - * @param string $password Required. The password used to encrypt the keys inside the wallet. The - * password must be a minimum of 8 characters. - * - * @return \Google\Cloud\OracleDatabase\V1\GenerateAutonomousDatabaseWalletRequest - * - * @experimental - */ - public static function build(string $name, int $type, bool $isRegional, string $password): self - { - return (new self()) - ->setName($name) - ->setType($type) - ->setIsRegional($isRegional) - ->setPassword($password); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the Autonomous Database in the following format: - * projects/{project}/locations/{location}/autonomousDatabases/{autonomous_database}. - * @type int $type - * Optional. The type of wallet generation for the Autonomous Database. The - * default value is SINGLE. - * @type bool $is_regional - * Optional. True when requesting regional connection strings in PDB connect - * info, applicable to cross-region Data Guard only. - * @type string $password - * Required. The password used to encrypt the keys inside the wallet. The - * password must be a minimum of 8 characters. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Oracledatabase\V1\Oracledatabase::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the Autonomous Database in the following format: - * projects/{project}/locations/{location}/autonomousDatabases/{autonomous_database}. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the Autonomous Database in the following format: - * projects/{project}/locations/{location}/autonomousDatabases/{autonomous_database}. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. The type of wallet generation for the Autonomous Database. The - * default value is SINGLE. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.GenerateType type = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Optional. The type of wallet generation for the Autonomous Database. The - * default value is SINGLE. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.GenerateType type = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\OracleDatabase\V1\GenerateType::class); - $this->type = $var; - - return $this; - } - - /** - * Optional. True when requesting regional connection strings in PDB connect - * info, applicable to cross-region Data Guard only. - * - * Generated from protobuf field bool is_regional = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getIsRegional() - { - return $this->is_regional; - } - - /** - * Optional. True when requesting regional connection strings in PDB connect - * info, applicable to cross-region Data Guard only. - * - * Generated from protobuf field bool is_regional = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setIsRegional($var) - { - GPBUtil::checkBool($var); - $this->is_regional = $var; - - return $this; - } - - /** - * Required. The password used to encrypt the keys inside the wallet. The - * password must be a minimum of 8 characters. - * - * Generated from protobuf field string password = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getPassword() - { - return $this->password; - } - - /** - * Required. The password used to encrypt the keys inside the wallet. The - * password must be a minimum of 8 characters. - * - * Generated from protobuf field string password = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setPassword($var) - { - GPBUtil::checkString($var, True); - $this->password = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/GenerateAutonomousDatabaseWalletResponse.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/GenerateAutonomousDatabaseWalletResponse.php deleted file mode 100644 index 24215559cd7a..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/GenerateAutonomousDatabaseWalletResponse.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.oracledatabase.v1.GenerateAutonomousDatabaseWalletResponse - */ -class GenerateAutonomousDatabaseWalletResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The base64 encoded wallet files. - * - * Generated from protobuf field bytes archive_content = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $archive_content = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $archive_content - * Output only. The base64 encoded wallet files. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Oracledatabase\V1\Oracledatabase::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The base64 encoded wallet files. - * - * Generated from protobuf field bytes archive_content = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getArchiveContent() - { - return $this->archive_content; - } - - /** - * Output only. The base64 encoded wallet files. - * - * Generated from protobuf field bytes archive_content = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setArchiveContent($var) - { - GPBUtil::checkString($var, False); - $this->archive_content = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/GenerateType.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/GenerateType.php deleted file mode 100644 index d89621248279..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/GenerateType.php +++ /dev/null @@ -1,61 +0,0 @@ -google.cloud.oracledatabase.v1.GenerateType - */ -class GenerateType -{ - /** - * Default unspecified value. - * - * Generated from protobuf enum GENERATE_TYPE_UNSPECIFIED = 0; - */ - const GENERATE_TYPE_UNSPECIFIED = 0; - /** - * Used to generate wallet for all databases in the region. - * - * Generated from protobuf enum ALL = 1; - */ - const ALL = 1; - /** - * Used to generate wallet for a single database. - * - * Generated from protobuf enum SINGLE = 2; - */ - const SINGLE = 2; - - private static $valueToName = [ - self::GENERATE_TYPE_UNSPECIFIED => 'GENERATE_TYPE_UNSPECIFIED', - self::ALL => 'ALL', - self::SINGLE => 'SINGLE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/GetAutonomousDatabaseRequest.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/GetAutonomousDatabaseRequest.php deleted file mode 100644 index ef3ff3dfa6fe..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/GetAutonomousDatabaseRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.oracledatabase.v1.GetAutonomousDatabaseRequest - */ -class GetAutonomousDatabaseRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the Autonomous Database in the following format: - * projects/{project}/locations/{location}/autonomousDatabases/{autonomous_database}. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the Autonomous Database in the following format: - * projects/{project}/locations/{location}/autonomousDatabases/{autonomous_database}. Please see - * {@see OracleDatabaseClient::autonomousDatabaseName()} for help formatting this field. - * - * @return \Google\Cloud\OracleDatabase\V1\GetAutonomousDatabaseRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the Autonomous Database in the following format: - * projects/{project}/locations/{location}/autonomousDatabases/{autonomous_database}. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Oracledatabase\V1\Oracledatabase::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the Autonomous Database in the following format: - * projects/{project}/locations/{location}/autonomousDatabases/{autonomous_database}. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the Autonomous Database in the following format: - * projects/{project}/locations/{location}/autonomousDatabases/{autonomous_database}. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/GetCloudExadataInfrastructureRequest.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/GetCloudExadataInfrastructureRequest.php deleted file mode 100644 index b432c93d58f3..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/GetCloudExadataInfrastructureRequest.php +++ /dev/null @@ -1,91 +0,0 @@ -google.cloud.oracledatabase.v1.GetCloudExadataInfrastructureRequest - */ -class GetCloudExadataInfrastructureRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the Cloud Exadata Infrastructure in the following - * format: - * projects/{project}/locations/{location}/cloudExadataInfrastructures/{cloud_exadata_infrastructure}. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the Cloud Exadata Infrastructure in the following - * format: - * projects/{project}/locations/{location}/cloudExadataInfrastructures/{cloud_exadata_infrastructure}. Please see - * {@see OracleDatabaseClient::cloudExadataInfrastructureName()} for help formatting this field. - * - * @return \Google\Cloud\OracleDatabase\V1\GetCloudExadataInfrastructureRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the Cloud Exadata Infrastructure in the following - * format: - * projects/{project}/locations/{location}/cloudExadataInfrastructures/{cloud_exadata_infrastructure}. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Oracledatabase\V1\Oracledatabase::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the Cloud Exadata Infrastructure in the following - * format: - * projects/{project}/locations/{location}/cloudExadataInfrastructures/{cloud_exadata_infrastructure}. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the Cloud Exadata Infrastructure in the following - * format: - * projects/{project}/locations/{location}/cloudExadataInfrastructures/{cloud_exadata_infrastructure}. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/GetCloudVmClusterRequest.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/GetCloudVmClusterRequest.php deleted file mode 100644 index abc510235f45..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/GetCloudVmClusterRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.oracledatabase.v1.GetCloudVmClusterRequest - */ -class GetCloudVmClusterRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the Cloud VM Cluster in the following format: - * projects/{project}/locations/{location}/cloudVmClusters/{cloud_vm_cluster}. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the Cloud VM Cluster in the following format: - * projects/{project}/locations/{location}/cloudVmClusters/{cloud_vm_cluster}. Please see - * {@see OracleDatabaseClient::cloudVmClusterName()} for help formatting this field. - * - * @return \Google\Cloud\OracleDatabase\V1\GetCloudVmClusterRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the Cloud VM Cluster in the following format: - * projects/{project}/locations/{location}/cloudVmClusters/{cloud_vm_cluster}. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Oracledatabase\V1\Oracledatabase::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the Cloud VM Cluster in the following format: - * projects/{project}/locations/{location}/cloudVmClusters/{cloud_vm_cluster}. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the Cloud VM Cluster in the following format: - * projects/{project}/locations/{location}/cloudVmClusters/{cloud_vm_cluster}. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/GiVersion.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/GiVersion.php deleted file mode 100644 index 16f041648764..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/GiVersion.php +++ /dev/null @@ -1,110 +0,0 @@ -google.cloud.oracledatabase.v1.GiVersion - */ -class GiVersion extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. The name of the Oracle Grid Infrastructure (GI) version - * resource with the format: - * projects/{project}/locations/{region}/giVersions/{gi_versions} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Optional. version - * - * Generated from protobuf field string version = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. The name of the Oracle Grid Infrastructure (GI) version - * resource with the format: - * projects/{project}/locations/{region}/giVersions/{gi_versions} - * @type string $version - * Optional. version - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Oracledatabase\V1\GiVersion::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. The name of the Oracle Grid Infrastructure (GI) version - * resource with the format: - * projects/{project}/locations/{region}/giVersions/{gi_versions} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. The name of the Oracle Grid Infrastructure (GI) version - * resource with the format: - * projects/{project}/locations/{region}/giVersions/{gi_versions} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. version - * - * Generated from protobuf field string version = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * Optional. version - * - * Generated from protobuf field string version = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkString($var, True); - $this->version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListAutonomousDatabaseBackupsRequest.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListAutonomousDatabaseBackupsRequest.php deleted file mode 100644 index 18b0e3b66671..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListAutonomousDatabaseBackupsRequest.php +++ /dev/null @@ -1,220 +0,0 @@ -google.cloud.oracledatabase.v1.ListAutonomousDatabaseBackupsRequest - */ -class ListAutonomousDatabaseBackupsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent value for ListAutonomousDatabaseBackups in the - * following format: projects/{project}/locations/{location}. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. An expression for filtering the results of the request. Only the - * **autonomous_database_id** field is supported in the following format: - * `autonomous_database_id="{autonomous_database_id}"`. The accepted values - * must be a valid Autonomous Database ID, limited to the naming - * restrictions of the ID: ^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$). - * The ID must start with a letter, end with a letter or a number, and be - * a maximum of 63 characters. - * - * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. The maximum number of items to return. - * If unspecified, at most 50 Autonomous DB Backups will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The parent value for ListAutonomousDatabaseBackups in the - * following format: projects/{project}/locations/{location}. Please see - * {@see OracleDatabaseClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\OracleDatabase\V1\ListAutonomousDatabaseBackupsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent value for ListAutonomousDatabaseBackups in the - * following format: projects/{project}/locations/{location}. - * @type string $filter - * Optional. An expression for filtering the results of the request. Only the - * **autonomous_database_id** field is supported in the following format: - * `autonomous_database_id="{autonomous_database_id}"`. The accepted values - * must be a valid Autonomous Database ID, limited to the naming - * restrictions of the ID: ^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$). - * The ID must start with a letter, end with a letter or a number, and be - * a maximum of 63 characters. - * @type int $page_size - * Optional. The maximum number of items to return. - * If unspecified, at most 50 Autonomous DB Backups will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * @type string $page_token - * Optional. A token identifying a page of results the server should return. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Oracledatabase\V1\Oracledatabase::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent value for ListAutonomousDatabaseBackups in the - * following format: projects/{project}/locations/{location}. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent value for ListAutonomousDatabaseBackups in the - * following format: projects/{project}/locations/{location}. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. An expression for filtering the results of the request. Only the - * **autonomous_database_id** field is supported in the following format: - * `autonomous_database_id="{autonomous_database_id}"`. The accepted values - * must be a valid Autonomous Database ID, limited to the naming - * restrictions of the ID: ^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$). - * The ID must start with a letter, end with a letter or a number, and be - * a maximum of 63 characters. - * - * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. An expression for filtering the results of the request. Only the - * **autonomous_database_id** field is supported in the following format: - * `autonomous_database_id="{autonomous_database_id}"`. The accepted values - * must be a valid Autonomous Database ID, limited to the naming - * restrictions of the ID: ^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$). - * The ID must start with a letter, end with a letter or a number, and be - * a maximum of 63 characters. - * - * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Optional. The maximum number of items to return. - * If unspecified, at most 50 Autonomous DB Backups will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of items to return. - * If unspecified, at most 50 Autonomous DB Backups will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListAutonomousDatabaseBackupsResponse.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListAutonomousDatabaseBackupsResponse.php deleted file mode 100644 index 4350618c2c3d..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListAutonomousDatabaseBackupsResponse.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.oracledatabase.v1.ListAutonomousDatabaseBackupsResponse - */ -class ListAutonomousDatabaseBackupsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of Autonomous Database Backups. - * - * Generated from protobuf field repeated .google.cloud.oracledatabase.v1.AutonomousDatabaseBackup autonomous_database_backups = 1; - */ - private $autonomous_database_backups; - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\OracleDatabase\V1\AutonomousDatabaseBackup>|\Google\Protobuf\Internal\RepeatedField $autonomous_database_backups - * The list of Autonomous Database Backups. - * @type string $next_page_token - * A token identifying a page of results the server should return. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Oracledatabase\V1\Oracledatabase::initOnce(); - parent::__construct($data); - } - - /** - * The list of Autonomous Database Backups. - * - * Generated from protobuf field repeated .google.cloud.oracledatabase.v1.AutonomousDatabaseBackup autonomous_database_backups = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAutonomousDatabaseBackups() - { - return $this->autonomous_database_backups; - } - - /** - * The list of Autonomous Database Backups. - * - * Generated from protobuf field repeated .google.cloud.oracledatabase.v1.AutonomousDatabaseBackup autonomous_database_backups = 1; - * @param array<\Google\Cloud\OracleDatabase\V1\AutonomousDatabaseBackup>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAutonomousDatabaseBackups($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseBackup::class); - $this->autonomous_database_backups = $arr; - - return $this; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListAutonomousDatabaseCharacterSetsRequest.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListAutonomousDatabaseCharacterSetsRequest.php deleted file mode 100644 index 4c2d224e314a..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListAutonomousDatabaseCharacterSetsRequest.php +++ /dev/null @@ -1,208 +0,0 @@ -google.cloud.oracledatabase.v1.ListAutonomousDatabaseCharacterSetsRequest - */ -class ListAutonomousDatabaseCharacterSetsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent value for the Autonomous Database in the following - * format: projects/{project}/locations/{location}. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The maximum number of items to return. - * If unspecified, at most 50 Autonomous DB Character Sets will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. An expression for filtering the results of the request. Only the - * **character_set_type** field is supported in the following format: - * `character_set_type="{characterSetType}"`. Accepted values include - * `DATABASE` and `NATIONAL`. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - - /** - * @param string $parent Required. The parent value for the Autonomous Database in the following - * format: projects/{project}/locations/{location}. Please see - * {@see OracleDatabaseClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\OracleDatabase\V1\ListAutonomousDatabaseCharacterSetsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent value for the Autonomous Database in the following - * format: projects/{project}/locations/{location}. - * @type int $page_size - * Optional. The maximum number of items to return. - * If unspecified, at most 50 Autonomous DB Character Sets will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * @type string $page_token - * Optional. A token identifying a page of results the server should return. - * @type string $filter - * Optional. An expression for filtering the results of the request. Only the - * **character_set_type** field is supported in the following format: - * `character_set_type="{characterSetType}"`. Accepted values include - * `DATABASE` and `NATIONAL`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Oracledatabase\V1\Oracledatabase::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent value for the Autonomous Database in the following - * format: projects/{project}/locations/{location}. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent value for the Autonomous Database in the following - * format: projects/{project}/locations/{location}. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. The maximum number of items to return. - * If unspecified, at most 50 Autonomous DB Character Sets will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of items to return. - * If unspecified, at most 50 Autonomous DB Character Sets will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Optional. An expression for filtering the results of the request. Only the - * **character_set_type** field is supported in the following format: - * `character_set_type="{characterSetType}"`. Accepted values include - * `DATABASE` and `NATIONAL`. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. An expression for filtering the results of the request. Only the - * **character_set_type** field is supported in the following format: - * `character_set_type="{characterSetType}"`. Accepted values include - * `DATABASE` and `NATIONAL`. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListAutonomousDatabaseCharacterSetsResponse.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListAutonomousDatabaseCharacterSetsResponse.php deleted file mode 100644 index 7466b5277d9a..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListAutonomousDatabaseCharacterSetsResponse.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.oracledatabase.v1.ListAutonomousDatabaseCharacterSetsResponse - */ -class ListAutonomousDatabaseCharacterSetsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of Autonomous Database Character Sets. - * - * Generated from protobuf field repeated .google.cloud.oracledatabase.v1.AutonomousDatabaseCharacterSet autonomous_database_character_sets = 1; - */ - private $autonomous_database_character_sets; - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\OracleDatabase\V1\AutonomousDatabaseCharacterSet>|\Google\Protobuf\Internal\RepeatedField $autonomous_database_character_sets - * The list of Autonomous Database Character Sets. - * @type string $next_page_token - * A token identifying a page of results the server should return. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Oracledatabase\V1\Oracledatabase::initOnce(); - parent::__construct($data); - } - - /** - * The list of Autonomous Database Character Sets. - * - * Generated from protobuf field repeated .google.cloud.oracledatabase.v1.AutonomousDatabaseCharacterSet autonomous_database_character_sets = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAutonomousDatabaseCharacterSets() - { - return $this->autonomous_database_character_sets; - } - - /** - * The list of Autonomous Database Character Sets. - * - * Generated from protobuf field repeated .google.cloud.oracledatabase.v1.AutonomousDatabaseCharacterSet autonomous_database_character_sets = 1; - * @param array<\Google\Cloud\OracleDatabase\V1\AutonomousDatabaseCharacterSet>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAutonomousDatabaseCharacterSets($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\OracleDatabase\V1\AutonomousDatabaseCharacterSet::class); - $this->autonomous_database_character_sets = $arr; - - return $this; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListAutonomousDatabasesRequest.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListAutonomousDatabasesRequest.php deleted file mode 100644 index 38e445f51d6b..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListAutonomousDatabasesRequest.php +++ /dev/null @@ -1,230 +0,0 @@ -google.cloud.oracledatabase.v1.ListAutonomousDatabasesRequest - */ -class ListAutonomousDatabasesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent value for the Autonomous Database in the following - * format: projects/{project}/locations/{location}. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The maximum number of items to return. - * If unspecified, at most 50 Autonomous Database will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. An expression for filtering the results of the request. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. An expression for ordering the results of the request. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The parent value for the Autonomous Database in the following - * format: projects/{project}/locations/{location}. Please see - * {@see OracleDatabaseClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\OracleDatabase\V1\ListAutonomousDatabasesRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent value for the Autonomous Database in the following - * format: projects/{project}/locations/{location}. - * @type int $page_size - * Optional. The maximum number of items to return. - * If unspecified, at most 50 Autonomous Database will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * @type string $page_token - * Optional. A token identifying a page of results the server should return. - * @type string $filter - * Optional. An expression for filtering the results of the request. - * @type string $order_by - * Optional. An expression for ordering the results of the request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Oracledatabase\V1\Oracledatabase::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent value for the Autonomous Database in the following - * format: projects/{project}/locations/{location}. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent value for the Autonomous Database in the following - * format: projects/{project}/locations/{location}. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. The maximum number of items to return. - * If unspecified, at most 50 Autonomous Database will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of items to return. - * If unspecified, at most 50 Autonomous Database will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Optional. An expression for filtering the results of the request. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. An expression for filtering the results of the request. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Optional. An expression for ordering the results of the request. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Optional. An expression for ordering the results of the request. - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListAutonomousDatabasesResponse.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListAutonomousDatabasesResponse.php deleted file mode 100644 index 0c570e1c3539..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListAutonomousDatabasesResponse.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.oracledatabase.v1.ListAutonomousDatabasesResponse - */ -class ListAutonomousDatabasesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of Autonomous Databases. - * - * Generated from protobuf field repeated .google.cloud.oracledatabase.v1.AutonomousDatabase autonomous_databases = 1; - */ - private $autonomous_databases; - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\OracleDatabase\V1\AutonomousDatabase>|\Google\Protobuf\Internal\RepeatedField $autonomous_databases - * The list of Autonomous Databases. - * @type string $next_page_token - * A token identifying a page of results the server should return. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Oracledatabase\V1\Oracledatabase::initOnce(); - parent::__construct($data); - } - - /** - * The list of Autonomous Databases. - * - * Generated from protobuf field repeated .google.cloud.oracledatabase.v1.AutonomousDatabase autonomous_databases = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAutonomousDatabases() - { - return $this->autonomous_databases; - } - - /** - * The list of Autonomous Databases. - * - * Generated from protobuf field repeated .google.cloud.oracledatabase.v1.AutonomousDatabase autonomous_databases = 1; - * @param array<\Google\Cloud\OracleDatabase\V1\AutonomousDatabase>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAutonomousDatabases($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\OracleDatabase\V1\AutonomousDatabase::class); - $this->autonomous_databases = $arr; - - return $this; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListAutonomousDbVersionsRequest.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListAutonomousDbVersionsRequest.php deleted file mode 100644 index 7acc6d2b594d..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListAutonomousDbVersionsRequest.php +++ /dev/null @@ -1,162 +0,0 @@ -google.cloud.oracledatabase.v1.ListAutonomousDbVersionsRequest - */ -class ListAutonomousDbVersionsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent value for the Autonomous Database in the following - * format: projects/{project}/locations/{location}. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The maximum number of items to return. - * If unspecified, at most 50 Autonomous DB Versions will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The parent value for the Autonomous Database in the following - * format: projects/{project}/locations/{location}. Please see - * {@see OracleDatabaseClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\OracleDatabase\V1\ListAutonomousDbVersionsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent value for the Autonomous Database in the following - * format: projects/{project}/locations/{location}. - * @type int $page_size - * Optional. The maximum number of items to return. - * If unspecified, at most 50 Autonomous DB Versions will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * @type string $page_token - * Optional. A token identifying a page of results the server should return. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Oracledatabase\V1\Oracledatabase::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent value for the Autonomous Database in the following - * format: projects/{project}/locations/{location}. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent value for the Autonomous Database in the following - * format: projects/{project}/locations/{location}. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. The maximum number of items to return. - * If unspecified, at most 50 Autonomous DB Versions will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of items to return. - * If unspecified, at most 50 Autonomous DB Versions will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListAutonomousDbVersionsResponse.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListAutonomousDbVersionsResponse.php deleted file mode 100644 index a4d26a12226a..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListAutonomousDbVersionsResponse.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.oracledatabase.v1.ListAutonomousDbVersionsResponse - */ -class ListAutonomousDbVersionsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of Autonomous Database versions. - * - * Generated from protobuf field repeated .google.cloud.oracledatabase.v1.AutonomousDbVersion autonomous_db_versions = 1; - */ - private $autonomous_db_versions; - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\OracleDatabase\V1\AutonomousDbVersion>|\Google\Protobuf\Internal\RepeatedField $autonomous_db_versions - * The list of Autonomous Database versions. - * @type string $next_page_token - * A token identifying a page of results the server should return. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Oracledatabase\V1\Oracledatabase::initOnce(); - parent::__construct($data); - } - - /** - * The list of Autonomous Database versions. - * - * Generated from protobuf field repeated .google.cloud.oracledatabase.v1.AutonomousDbVersion autonomous_db_versions = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAutonomousDbVersions() - { - return $this->autonomous_db_versions; - } - - /** - * The list of Autonomous Database versions. - * - * Generated from protobuf field repeated .google.cloud.oracledatabase.v1.AutonomousDbVersion autonomous_db_versions = 1; - * @param array<\Google\Cloud\OracleDatabase\V1\AutonomousDbVersion>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAutonomousDbVersions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\OracleDatabase\V1\AutonomousDbVersion::class); - $this->autonomous_db_versions = $arr; - - return $this; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListCloudExadataInfrastructuresRequest.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListCloudExadataInfrastructuresRequest.php deleted file mode 100644 index 0f0045bf050e..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListCloudExadataInfrastructuresRequest.php +++ /dev/null @@ -1,162 +0,0 @@ -google.cloud.oracledatabase.v1.ListCloudExadataInfrastructuresRequest - */ -class ListCloudExadataInfrastructuresRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent value for CloudExadataInfrastructure in the following - * format: projects/{project}/locations/{location}. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The maximum number of items to return. - * If unspecified, at most 50 Exadata infrastructures will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The parent value for CloudExadataInfrastructure in the following - * format: projects/{project}/locations/{location}. Please see - * {@see OracleDatabaseClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\OracleDatabase\V1\ListCloudExadataInfrastructuresRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent value for CloudExadataInfrastructure in the following - * format: projects/{project}/locations/{location}. - * @type int $page_size - * Optional. The maximum number of items to return. - * If unspecified, at most 50 Exadata infrastructures will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * @type string $page_token - * Optional. A token identifying a page of results the server should return. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Oracledatabase\V1\Oracledatabase::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent value for CloudExadataInfrastructure in the following - * format: projects/{project}/locations/{location}. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent value for CloudExadataInfrastructure in the following - * format: projects/{project}/locations/{location}. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. The maximum number of items to return. - * If unspecified, at most 50 Exadata infrastructures will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of items to return. - * If unspecified, at most 50 Exadata infrastructures will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListCloudExadataInfrastructuresResponse.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListCloudExadataInfrastructuresResponse.php deleted file mode 100644 index c54cb824f6a0..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListCloudExadataInfrastructuresResponse.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.oracledatabase.v1.ListCloudExadataInfrastructuresResponse - */ -class ListCloudExadataInfrastructuresResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of Exadata Infrastructures. - * - * Generated from protobuf field repeated .google.cloud.oracledatabase.v1.CloudExadataInfrastructure cloud_exadata_infrastructures = 1; - */ - private $cloud_exadata_infrastructures; - /** - * A token for fetching next page of response. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\OracleDatabase\V1\CloudExadataInfrastructure>|\Google\Protobuf\Internal\RepeatedField $cloud_exadata_infrastructures - * The list of Exadata Infrastructures. - * @type string $next_page_token - * A token for fetching next page of response. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Oracledatabase\V1\Oracledatabase::initOnce(); - parent::__construct($data); - } - - /** - * The list of Exadata Infrastructures. - * - * Generated from protobuf field repeated .google.cloud.oracledatabase.v1.CloudExadataInfrastructure cloud_exadata_infrastructures = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCloudExadataInfrastructures() - { - return $this->cloud_exadata_infrastructures; - } - - /** - * The list of Exadata Infrastructures. - * - * Generated from protobuf field repeated .google.cloud.oracledatabase.v1.CloudExadataInfrastructure cloud_exadata_infrastructures = 1; - * @param array<\Google\Cloud\OracleDatabase\V1\CloudExadataInfrastructure>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCloudExadataInfrastructures($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\OracleDatabase\V1\CloudExadataInfrastructure::class); - $this->cloud_exadata_infrastructures = $arr; - - return $this; - } - - /** - * A token for fetching next page of response. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token for fetching next page of response. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListCloudVmClustersRequest.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListCloudVmClustersRequest.php deleted file mode 100644 index 91204da83c5f..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListCloudVmClustersRequest.php +++ /dev/null @@ -1,196 +0,0 @@ -google.cloud.oracledatabase.v1.ListCloudVmClustersRequest - */ -class ListCloudVmClustersRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the parent in the following format: - * projects/{project}/locations/{location}. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The number of VM clusters to return. - * If unspecified, at most 50 VM clusters will be returned. - * The maximum value is 1,000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. A token identifying the page of results the server returns. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. An expression for filtering the results of the request. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - - /** - * @param string $parent Required. The name of the parent in the following format: - * projects/{project}/locations/{location}. Please see - * {@see OracleDatabaseClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\OracleDatabase\V1\ListCloudVmClustersRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The name of the parent in the following format: - * projects/{project}/locations/{location}. - * @type int $page_size - * Optional. The number of VM clusters to return. - * If unspecified, at most 50 VM clusters will be returned. - * The maximum value is 1,000. - * @type string $page_token - * Optional. A token identifying the page of results the server returns. - * @type string $filter - * Optional. An expression for filtering the results of the request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Oracledatabase\V1\Oracledatabase::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the parent in the following format: - * projects/{project}/locations/{location}. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The name of the parent in the following format: - * projects/{project}/locations/{location}. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. The number of VM clusters to return. - * If unspecified, at most 50 VM clusters will be returned. - * The maximum value is 1,000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The number of VM clusters to return. - * If unspecified, at most 50 VM clusters will be returned. - * The maximum value is 1,000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. A token identifying the page of results the server returns. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. A token identifying the page of results the server returns. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Optional. An expression for filtering the results of the request. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. An expression for filtering the results of the request. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListCloudVmClustersResponse.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListCloudVmClustersResponse.php deleted file mode 100644 index b42cbec7c465..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListCloudVmClustersResponse.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.oracledatabase.v1.ListCloudVmClustersResponse - */ -class ListCloudVmClustersResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of VM Clusters. - * - * Generated from protobuf field repeated .google.cloud.oracledatabase.v1.CloudVmCluster cloud_vm_clusters = 1; - */ - private $cloud_vm_clusters; - /** - * A token to fetch the next page of results. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\OracleDatabase\V1\CloudVmCluster>|\Google\Protobuf\Internal\RepeatedField $cloud_vm_clusters - * The list of VM Clusters. - * @type string $next_page_token - * A token to fetch the next page of results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Oracledatabase\V1\Oracledatabase::initOnce(); - parent::__construct($data); - } - - /** - * The list of VM Clusters. - * - * Generated from protobuf field repeated .google.cloud.oracledatabase.v1.CloudVmCluster cloud_vm_clusters = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCloudVmClusters() - { - return $this->cloud_vm_clusters; - } - - /** - * The list of VM Clusters. - * - * Generated from protobuf field repeated .google.cloud.oracledatabase.v1.CloudVmCluster cloud_vm_clusters = 1; - * @param array<\Google\Cloud\OracleDatabase\V1\CloudVmCluster>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCloudVmClusters($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\OracleDatabase\V1\CloudVmCluster::class); - $this->cloud_vm_clusters = $arr; - - return $this; - } - - /** - * A token to fetch the next page of results. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token to fetch the next page of results. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListDbNodesRequest.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListDbNodesRequest.php deleted file mode 100644 index aeda44f15653..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListDbNodesRequest.php +++ /dev/null @@ -1,162 +0,0 @@ -google.cloud.oracledatabase.v1.ListDbNodesRequest - */ -class ListDbNodesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent value for database node in the following format: - * projects/{project}/locations/{location}/cloudVmClusters/{cloudVmCluster}. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The maximum number of items to return. - * If unspecified, at most 50 db nodes will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. A token identifying a page of results the node should return. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The parent value for database node in the following format: - * projects/{project}/locations/{location}/cloudVmClusters/{cloudVmCluster}. Please see - * {@see OracleDatabaseClient::cloudVmClusterName()} for help formatting this field. - * - * @return \Google\Cloud\OracleDatabase\V1\ListDbNodesRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent value for database node in the following format: - * projects/{project}/locations/{location}/cloudVmClusters/{cloudVmCluster}. - * @type int $page_size - * Optional. The maximum number of items to return. - * If unspecified, at most 50 db nodes will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * @type string $page_token - * Optional. A token identifying a page of results the node should return. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Oracledatabase\V1\Oracledatabase::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent value for database node in the following format: - * projects/{project}/locations/{location}/cloudVmClusters/{cloudVmCluster}. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent value for database node in the following format: - * projects/{project}/locations/{location}/cloudVmClusters/{cloudVmCluster}. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. The maximum number of items to return. - * If unspecified, at most 50 db nodes will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of items to return. - * If unspecified, at most 50 db nodes will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. A token identifying a page of results the node should return. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. A token identifying a page of results the node should return. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListDbNodesResponse.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListDbNodesResponse.php deleted file mode 100644 index 88f95f531ea8..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListDbNodesResponse.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.oracledatabase.v1.ListDbNodesResponse - */ -class ListDbNodesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of DB Nodes - * - * Generated from protobuf field repeated .google.cloud.oracledatabase.v1.DbNode db_nodes = 1; - */ - private $db_nodes; - /** - * A token identifying a page of results the node should return. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\OracleDatabase\V1\DbNode>|\Google\Protobuf\Internal\RepeatedField $db_nodes - * The list of DB Nodes - * @type string $next_page_token - * A token identifying a page of results the node should return. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Oracledatabase\V1\Oracledatabase::initOnce(); - parent::__construct($data); - } - - /** - * The list of DB Nodes - * - * Generated from protobuf field repeated .google.cloud.oracledatabase.v1.DbNode db_nodes = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDbNodes() - { - return $this->db_nodes; - } - - /** - * The list of DB Nodes - * - * Generated from protobuf field repeated .google.cloud.oracledatabase.v1.DbNode db_nodes = 1; - * @param array<\Google\Cloud\OracleDatabase\V1\DbNode>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDbNodes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\OracleDatabase\V1\DbNode::class); - $this->db_nodes = $arr; - - return $this; - } - - /** - * A token identifying a page of results the node should return. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token identifying a page of results the node should return. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListDbServersRequest.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListDbServersRequest.php deleted file mode 100644 index 18561a941cde..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListDbServersRequest.php +++ /dev/null @@ -1,162 +0,0 @@ -google.cloud.oracledatabase.v1.ListDbServersRequest - */ -class ListDbServersRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent value for database server in the following format: - * projects/{project}/locations/{location}/cloudExadataInfrastructures/{cloudExadataInfrastructure}. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The maximum number of items to return. - * If unspecified, a maximum of 50 db servers will be returned. - * The maximum value is 1000; values above 1000 will be reset to 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The parent value for database server in the following format: - * projects/{project}/locations/{location}/cloudExadataInfrastructures/{cloudExadataInfrastructure}. Please see - * {@see OracleDatabaseClient::cloudExadataInfrastructureName()} for help formatting this field. - * - * @return \Google\Cloud\OracleDatabase\V1\ListDbServersRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent value for database server in the following format: - * projects/{project}/locations/{location}/cloudExadataInfrastructures/{cloudExadataInfrastructure}. - * @type int $page_size - * Optional. The maximum number of items to return. - * If unspecified, a maximum of 50 db servers will be returned. - * The maximum value is 1000; values above 1000 will be reset to 1000. - * @type string $page_token - * Optional. A token identifying a page of results the server should return. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Oracledatabase\V1\Oracledatabase::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent value for database server in the following format: - * projects/{project}/locations/{location}/cloudExadataInfrastructures/{cloudExadataInfrastructure}. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent value for database server in the following format: - * projects/{project}/locations/{location}/cloudExadataInfrastructures/{cloudExadataInfrastructure}. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. The maximum number of items to return. - * If unspecified, a maximum of 50 db servers will be returned. - * The maximum value is 1000; values above 1000 will be reset to 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of items to return. - * If unspecified, a maximum of 50 db servers will be returned. - * The maximum value is 1000; values above 1000 will be reset to 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListDbServersResponse.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListDbServersResponse.php deleted file mode 100644 index dbad0dea9b22..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListDbServersResponse.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.oracledatabase.v1.ListDbServersResponse - */ -class ListDbServersResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of database servers. - * - * Generated from protobuf field repeated .google.cloud.oracledatabase.v1.DbServer db_servers = 1; - */ - private $db_servers; - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\OracleDatabase\V1\DbServer>|\Google\Protobuf\Internal\RepeatedField $db_servers - * The list of database servers. - * @type string $next_page_token - * A token identifying a page of results the server should return. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Oracledatabase\V1\Oracledatabase::initOnce(); - parent::__construct($data); - } - - /** - * The list of database servers. - * - * Generated from protobuf field repeated .google.cloud.oracledatabase.v1.DbServer db_servers = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDbServers() - { - return $this->db_servers; - } - - /** - * The list of database servers. - * - * Generated from protobuf field repeated .google.cloud.oracledatabase.v1.DbServer db_servers = 1; - * @param array<\Google\Cloud\OracleDatabase\V1\DbServer>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDbServers($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\OracleDatabase\V1\DbServer::class); - $this->db_servers = $arr; - - return $this; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListDbSystemShapesRequest.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListDbSystemShapesRequest.php deleted file mode 100644 index 9c19cfa0fa24..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListDbSystemShapesRequest.php +++ /dev/null @@ -1,162 +0,0 @@ -google.cloud.oracledatabase.v1.ListDbSystemShapesRequest - */ -class ListDbSystemShapesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent value for Database System Shapes in the following - * format: projects/{project}/locations/{location}. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The maximum number of items to return. - * If unspecified, at most 50 database system shapes will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The parent value for Database System Shapes in the following - * format: projects/{project}/locations/{location}. Please see - * {@see OracleDatabaseClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\OracleDatabase\V1\ListDbSystemShapesRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent value for Database System Shapes in the following - * format: projects/{project}/locations/{location}. - * @type int $page_size - * Optional. The maximum number of items to return. - * If unspecified, at most 50 database system shapes will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * @type string $page_token - * Optional. A token identifying a page of results the server should return. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Oracledatabase\V1\Oracledatabase::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent value for Database System Shapes in the following - * format: projects/{project}/locations/{location}. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent value for Database System Shapes in the following - * format: projects/{project}/locations/{location}. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. The maximum number of items to return. - * If unspecified, at most 50 database system shapes will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of items to return. - * If unspecified, at most 50 database system shapes will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListDbSystemShapesResponse.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListDbSystemShapesResponse.php deleted file mode 100644 index 550a89a04c2f..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListDbSystemShapesResponse.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.oracledatabase.v1.ListDbSystemShapesResponse - */ -class ListDbSystemShapesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of Database System shapes. - * - * Generated from protobuf field repeated .google.cloud.oracledatabase.v1.DbSystemShape db_system_shapes = 1; - */ - private $db_system_shapes; - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\OracleDatabase\V1\DbSystemShape>|\Google\Protobuf\Internal\RepeatedField $db_system_shapes - * The list of Database System shapes. - * @type string $next_page_token - * A token identifying a page of results the server should return. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Oracledatabase\V1\Oracledatabase::initOnce(); - parent::__construct($data); - } - - /** - * The list of Database System shapes. - * - * Generated from protobuf field repeated .google.cloud.oracledatabase.v1.DbSystemShape db_system_shapes = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDbSystemShapes() - { - return $this->db_system_shapes; - } - - /** - * The list of Database System shapes. - * - * Generated from protobuf field repeated .google.cloud.oracledatabase.v1.DbSystemShape db_system_shapes = 1; - * @param array<\Google\Cloud\OracleDatabase\V1\DbSystemShape>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDbSystemShapes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\OracleDatabase\V1\DbSystemShape::class); - $this->db_system_shapes = $arr; - - return $this; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListEntitlementsRequest.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListEntitlementsRequest.php deleted file mode 100644 index 47ff2ed941d7..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListEntitlementsRequest.php +++ /dev/null @@ -1,162 +0,0 @@ -google.cloud.oracledatabase.v1.ListEntitlementsRequest - */ -class ListEntitlementsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent value for the entitlement in the following format: - * projects/{project}/locations/{location}. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The maximum number of items to return. - * If unspecified, a maximum of 50 entitlements will be returned. - * The maximum value is 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The parent value for the entitlement in the following format: - * projects/{project}/locations/{location}. Please see - * {@see OracleDatabaseClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\OracleDatabase\V1\ListEntitlementsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent value for the entitlement in the following format: - * projects/{project}/locations/{location}. - * @type int $page_size - * Optional. The maximum number of items to return. - * If unspecified, a maximum of 50 entitlements will be returned. - * The maximum value is 1000. - * @type string $page_token - * Optional. A token identifying a page of results the server should return. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Oracledatabase\V1\Oracledatabase::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent value for the entitlement in the following format: - * projects/{project}/locations/{location}. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent value for the entitlement in the following format: - * projects/{project}/locations/{location}. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. The maximum number of items to return. - * If unspecified, a maximum of 50 entitlements will be returned. - * The maximum value is 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of items to return. - * If unspecified, a maximum of 50 entitlements will be returned. - * The maximum value is 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListEntitlementsResponse.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListEntitlementsResponse.php deleted file mode 100644 index d0c5b817d87c..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListEntitlementsResponse.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.oracledatabase.v1.ListEntitlementsResponse - */ -class ListEntitlementsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of Entitlements - * - * Generated from protobuf field repeated .google.cloud.oracledatabase.v1.Entitlement entitlements = 1; - */ - private $entitlements; - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\OracleDatabase\V1\Entitlement>|\Google\Protobuf\Internal\RepeatedField $entitlements - * The list of Entitlements - * @type string $next_page_token - * A token identifying a page of results the server should return. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Oracledatabase\V1\Oracledatabase::initOnce(); - parent::__construct($data); - } - - /** - * The list of Entitlements - * - * Generated from protobuf field repeated .google.cloud.oracledatabase.v1.Entitlement entitlements = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEntitlements() - { - return $this->entitlements; - } - - /** - * The list of Entitlements - * - * Generated from protobuf field repeated .google.cloud.oracledatabase.v1.Entitlement entitlements = 1; - * @param array<\Google\Cloud\OracleDatabase\V1\Entitlement>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEntitlements($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\OracleDatabase\V1\Entitlement::class); - $this->entitlements = $arr; - - return $this; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListGiVersionsRequest.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListGiVersionsRequest.php deleted file mode 100644 index 05e7af358083..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListGiVersionsRequest.php +++ /dev/null @@ -1,166 +0,0 @@ -google.cloud.oracledatabase.v1.ListGiVersionsRequest - */ -class ListGiVersionsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent value for Grid Infrastructure Version in the following - * format: Format: projects/{project}/locations/{location}. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The maximum number of items to return. - * If unspecified, a maximum of 50 Oracle Grid Infrastructure (GI) versions - * will be returned. The maximum value is 1000; values above 1000 will be - * reset to 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The parent value for Grid Infrastructure Version in the following - * format: Format: projects/{project}/locations/{location}. Please see - * {@see OracleDatabaseClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\OracleDatabase\V1\ListGiVersionsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent value for Grid Infrastructure Version in the following - * format: Format: projects/{project}/locations/{location}. - * @type int $page_size - * Optional. The maximum number of items to return. - * If unspecified, a maximum of 50 Oracle Grid Infrastructure (GI) versions - * will be returned. The maximum value is 1000; values above 1000 will be - * reset to 1000. - * @type string $page_token - * Optional. A token identifying a page of results the server should return. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Oracledatabase\V1\Oracledatabase::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent value for Grid Infrastructure Version in the following - * format: Format: projects/{project}/locations/{location}. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent value for Grid Infrastructure Version in the following - * format: Format: projects/{project}/locations/{location}. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. The maximum number of items to return. - * If unspecified, a maximum of 50 Oracle Grid Infrastructure (GI) versions - * will be returned. The maximum value is 1000; values above 1000 will be - * reset to 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of items to return. - * If unspecified, a maximum of 50 Oracle Grid Infrastructure (GI) versions - * will be returned. The maximum value is 1000; values above 1000 will be - * reset to 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListGiVersionsResponse.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListGiVersionsResponse.php deleted file mode 100644 index 6f80f31c0455..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ListGiVersionsResponse.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.oracledatabase.v1.ListGiVersionsResponse - */ -class ListGiVersionsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of Oracle Grid Infrastructure (GI) versions. - * - * Generated from protobuf field repeated .google.cloud.oracledatabase.v1.GiVersion gi_versions = 1; - */ - private $gi_versions; - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\OracleDatabase\V1\GiVersion>|\Google\Protobuf\Internal\RepeatedField $gi_versions - * The list of Oracle Grid Infrastructure (GI) versions. - * @type string $next_page_token - * A token identifying a page of results the server should return. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Oracledatabase\V1\Oracledatabase::initOnce(); - parent::__construct($data); - } - - /** - * The list of Oracle Grid Infrastructure (GI) versions. - * - * Generated from protobuf field repeated .google.cloud.oracledatabase.v1.GiVersion gi_versions = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getGiVersions() - { - return $this->gi_versions; - } - - /** - * The list of Oracle Grid Infrastructure (GI) versions. - * - * Generated from protobuf field repeated .google.cloud.oracledatabase.v1.GiVersion gi_versions = 1; - * @param array<\Google\Cloud\OracleDatabase\V1\GiVersion>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setGiVersions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\OracleDatabase\V1\GiVersion::class); - $this->gi_versions = $arr; - - return $this; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/LocationMetadata.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/LocationMetadata.php deleted file mode 100644 index d843ad111c9a..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/LocationMetadata.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.oracledatabase.v1.LocationMetadata - */ -class LocationMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Google Cloud Platform Oracle zones in a location. - * - * Generated from protobuf field repeated string gcp_oracle_zones = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $gcp_oracle_zones; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $gcp_oracle_zones - * Output only. Google Cloud Platform Oracle zones in a location. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Oracledatabase\V1\LocationMetadata::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Google Cloud Platform Oracle zones in a location. - * - * Generated from protobuf field repeated string gcp_oracle_zones = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getGcpOracleZones() - { - return $this->gcp_oracle_zones; - } - - /** - * Output only. Google Cloud Platform Oracle zones in a location. - * - * Generated from protobuf field repeated string gcp_oracle_zones = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setGcpOracleZones($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->gcp_oracle_zones = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/MaintenanceWindow.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/MaintenanceWindow.php deleted file mode 100644 index 0eff7f6bc701..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/MaintenanceWindow.php +++ /dev/null @@ -1,404 +0,0 @@ -google.cloud.oracledatabase.v1.MaintenanceWindow - */ -class MaintenanceWindow extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The maintenance window scheduling preference. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.MaintenanceWindow.MaintenanceWindowPreference preference = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $preference = 0; - /** - * Optional. Months during the year when maintenance should be performed. - * - * Generated from protobuf field repeated .google.type.Month months = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $months; - /** - * Optional. Weeks during the month when maintenance should be performed. - * Weeks start on the 1st, 8th, 15th, and 22nd days of the month, and have a - * duration of 7 days. Weeks start and end based on calendar dates, not days - * of the week. - * - * Generated from protobuf field repeated int32 weeks_of_month = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $weeks_of_month; - /** - * Optional. Days during the week when maintenance should be performed. - * - * Generated from protobuf field repeated .google.type.DayOfWeek days_of_week = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $days_of_week; - /** - * Optional. The window of hours during the day when maintenance should be - * performed. The window is a 4 hour slot. Valid values are: - * 0 - represents time slot 0:00 - 3:59 UTC - * 4 - represents time slot 4:00 - 7:59 UTC - * 8 - represents time slot 8:00 - 11:59 UTC - * 12 - represents time slot 12:00 - 15:59 UTC - * 16 - represents time slot 16:00 - 19:59 UTC - * 20 - represents time slot 20:00 - 23:59 UTC - * - * Generated from protobuf field repeated int32 hours_of_day = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $hours_of_day; - /** - * Optional. Lead time window allows user to set a lead time to prepare for a - * down time. The lead time is in weeks and valid value is between 1 to 4. - * - * Generated from protobuf field int32 lead_time_week = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $lead_time_week = 0; - /** - * Optional. Cloud CloudExadataInfrastructure node patching method, either - * "ROLLING" - * or "NONROLLING". Default value is ROLLING. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.MaintenanceWindow.PatchingMode patching_mode = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $patching_mode = 0; - /** - * Optional. Determines the amount of time the system will wait before the - * start of each database server patching operation. Custom action timeout is - * in minutes and valid value is between 15 to 120 (inclusive). - * - * Generated from protobuf field int32 custom_action_timeout_mins = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $custom_action_timeout_mins = 0; - /** - * Optional. If true, enables the configuration of a custom action timeout - * (waiting period) between database server patching operations. - * - * Generated from protobuf field bool is_custom_action_timeout_enabled = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $is_custom_action_timeout_enabled = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $preference - * Optional. The maintenance window scheduling preference. - * @type array|\Google\Protobuf\Internal\RepeatedField $months - * Optional. Months during the year when maintenance should be performed. - * @type array|\Google\Protobuf\Internal\RepeatedField $weeks_of_month - * Optional. Weeks during the month when maintenance should be performed. - * Weeks start on the 1st, 8th, 15th, and 22nd days of the month, and have a - * duration of 7 days. Weeks start and end based on calendar dates, not days - * of the week. - * @type array|\Google\Protobuf\Internal\RepeatedField $days_of_week - * Optional. Days during the week when maintenance should be performed. - * @type array|\Google\Protobuf\Internal\RepeatedField $hours_of_day - * Optional. The window of hours during the day when maintenance should be - * performed. The window is a 4 hour slot. Valid values are: - * 0 - represents time slot 0:00 - 3:59 UTC - * 4 - represents time slot 4:00 - 7:59 UTC - * 8 - represents time slot 8:00 - 11:59 UTC - * 12 - represents time slot 12:00 - 15:59 UTC - * 16 - represents time slot 16:00 - 19:59 UTC - * 20 - represents time slot 20:00 - 23:59 UTC - * @type int $lead_time_week - * Optional. Lead time window allows user to set a lead time to prepare for a - * down time. The lead time is in weeks and valid value is between 1 to 4. - * @type int $patching_mode - * Optional. Cloud CloudExadataInfrastructure node patching method, either - * "ROLLING" - * or "NONROLLING". Default value is ROLLING. - * @type int $custom_action_timeout_mins - * Optional. Determines the amount of time the system will wait before the - * start of each database server patching operation. Custom action timeout is - * in minutes and valid value is between 15 to 120 (inclusive). - * @type bool $is_custom_action_timeout_enabled - * Optional. If true, enables the configuration of a custom action timeout - * (waiting period) between database server patching operations. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Oracledatabase\V1\ExadataInfra::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The maintenance window scheduling preference. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.MaintenanceWindow.MaintenanceWindowPreference preference = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPreference() - { - return $this->preference; - } - - /** - * Optional. The maintenance window scheduling preference. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.MaintenanceWindow.MaintenanceWindowPreference preference = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPreference($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\OracleDatabase\V1\MaintenanceWindow\MaintenanceWindowPreference::class); - $this->preference = $var; - - return $this; - } - - /** - * Optional. Months during the year when maintenance should be performed. - * - * Generated from protobuf field repeated .google.type.Month months = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMonths() - { - return $this->months; - } - - /** - * Optional. Months during the year when maintenance should be performed. - * - * Generated from protobuf field repeated .google.type.Month months = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMonths($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Type\Month::class); - $this->months = $arr; - - return $this; - } - - /** - * Optional. Weeks during the month when maintenance should be performed. - * Weeks start on the 1st, 8th, 15th, and 22nd days of the month, and have a - * duration of 7 days. Weeks start and end based on calendar dates, not days - * of the week. - * - * Generated from protobuf field repeated int32 weeks_of_month = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getWeeksOfMonth() - { - return $this->weeks_of_month; - } - - /** - * Optional. Weeks during the month when maintenance should be performed. - * Weeks start on the 1st, 8th, 15th, and 22nd days of the month, and have a - * duration of 7 days. Weeks start and end based on calendar dates, not days - * of the week. - * - * Generated from protobuf field repeated int32 weeks_of_month = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setWeeksOfMonth($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); - $this->weeks_of_month = $arr; - - return $this; - } - - /** - * Optional. Days during the week when maintenance should be performed. - * - * Generated from protobuf field repeated .google.type.DayOfWeek days_of_week = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDaysOfWeek() - { - return $this->days_of_week; - } - - /** - * Optional. Days during the week when maintenance should be performed. - * - * Generated from protobuf field repeated .google.type.DayOfWeek days_of_week = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDaysOfWeek($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Type\DayOfWeek::class); - $this->days_of_week = $arr; - - return $this; - } - - /** - * Optional. The window of hours during the day when maintenance should be - * performed. The window is a 4 hour slot. Valid values are: - * 0 - represents time slot 0:00 - 3:59 UTC - * 4 - represents time slot 4:00 - 7:59 UTC - * 8 - represents time slot 8:00 - 11:59 UTC - * 12 - represents time slot 12:00 - 15:59 UTC - * 16 - represents time slot 16:00 - 19:59 UTC - * 20 - represents time slot 20:00 - 23:59 UTC - * - * Generated from protobuf field repeated int32 hours_of_day = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getHoursOfDay() - { - return $this->hours_of_day; - } - - /** - * Optional. The window of hours during the day when maintenance should be - * performed. The window is a 4 hour slot. Valid values are: - * 0 - represents time slot 0:00 - 3:59 UTC - * 4 - represents time slot 4:00 - 7:59 UTC - * 8 - represents time slot 8:00 - 11:59 UTC - * 12 - represents time slot 12:00 - 15:59 UTC - * 16 - represents time slot 16:00 - 19:59 UTC - * 20 - represents time slot 20:00 - 23:59 UTC - * - * Generated from protobuf field repeated int32 hours_of_day = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setHoursOfDay($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); - $this->hours_of_day = $arr; - - return $this; - } - - /** - * Optional. Lead time window allows user to set a lead time to prepare for a - * down time. The lead time is in weeks and valid value is between 1 to 4. - * - * Generated from protobuf field int32 lead_time_week = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getLeadTimeWeek() - { - return $this->lead_time_week; - } - - /** - * Optional. Lead time window allows user to set a lead time to prepare for a - * down time. The lead time is in weeks and valid value is between 1 to 4. - * - * Generated from protobuf field int32 lead_time_week = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setLeadTimeWeek($var) - { - GPBUtil::checkInt32($var); - $this->lead_time_week = $var; - - return $this; - } - - /** - * Optional. Cloud CloudExadataInfrastructure node patching method, either - * "ROLLING" - * or "NONROLLING". Default value is ROLLING. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.MaintenanceWindow.PatchingMode patching_mode = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPatchingMode() - { - return $this->patching_mode; - } - - /** - * Optional. Cloud CloudExadataInfrastructure node patching method, either - * "ROLLING" - * or "NONROLLING". Default value is ROLLING. - * - * Generated from protobuf field .google.cloud.oracledatabase.v1.MaintenanceWindow.PatchingMode patching_mode = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPatchingMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\OracleDatabase\V1\MaintenanceWindow\PatchingMode::class); - $this->patching_mode = $var; - - return $this; - } - - /** - * Optional. Determines the amount of time the system will wait before the - * start of each database server patching operation. Custom action timeout is - * in minutes and valid value is between 15 to 120 (inclusive). - * - * Generated from protobuf field int32 custom_action_timeout_mins = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getCustomActionTimeoutMins() - { - return $this->custom_action_timeout_mins; - } - - /** - * Optional. Determines the amount of time the system will wait before the - * start of each database server patching operation. Custom action timeout is - * in minutes and valid value is between 15 to 120 (inclusive). - * - * Generated from protobuf field int32 custom_action_timeout_mins = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setCustomActionTimeoutMins($var) - { - GPBUtil::checkInt32($var); - $this->custom_action_timeout_mins = $var; - - return $this; - } - - /** - * Optional. If true, enables the configuration of a custom action timeout - * (waiting period) between database server patching operations. - * - * Generated from protobuf field bool is_custom_action_timeout_enabled = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getIsCustomActionTimeoutEnabled() - { - return $this->is_custom_action_timeout_enabled; - } - - /** - * Optional. If true, enables the configuration of a custom action timeout - * (waiting period) between database server patching operations. - * - * Generated from protobuf field bool is_custom_action_timeout_enabled = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setIsCustomActionTimeoutEnabled($var) - { - GPBUtil::checkBool($var); - $this->is_custom_action_timeout_enabled = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/MaintenanceWindow/MaintenanceWindowPreference.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/MaintenanceWindow/MaintenanceWindowPreference.php deleted file mode 100644 index b191c6814368..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/MaintenanceWindow/MaintenanceWindowPreference.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.oracledatabase.v1.MaintenanceWindow.MaintenanceWindowPreference - */ -class MaintenanceWindowPreference -{ - /** - * Default unspecified value. - * - * Generated from protobuf enum MAINTENANCE_WINDOW_PREFERENCE_UNSPECIFIED = 0; - */ - const MAINTENANCE_WINDOW_PREFERENCE_UNSPECIFIED = 0; - /** - * Custom preference. - * - * Generated from protobuf enum CUSTOM_PREFERENCE = 1; - */ - const CUSTOM_PREFERENCE = 1; - /** - * No preference. - * - * Generated from protobuf enum NO_PREFERENCE = 2; - */ - const NO_PREFERENCE = 2; - - private static $valueToName = [ - self::MAINTENANCE_WINDOW_PREFERENCE_UNSPECIFIED => 'MAINTENANCE_WINDOW_PREFERENCE_UNSPECIFIED', - self::CUSTOM_PREFERENCE => 'CUSTOM_PREFERENCE', - self::NO_PREFERENCE => 'NO_PREFERENCE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(MaintenanceWindowPreference::class, \Google\Cloud\OracleDatabase\V1\MaintenanceWindow_MaintenanceWindowPreference::class); - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/MaintenanceWindow/PatchingMode.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/MaintenanceWindow/PatchingMode.php deleted file mode 100644 index 862cc6250890..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/MaintenanceWindow/PatchingMode.php +++ /dev/null @@ -1,65 +0,0 @@ -google.cloud.oracledatabase.v1.MaintenanceWindow.PatchingMode - */ -class PatchingMode -{ - /** - * Default unspecified value. - * - * Generated from protobuf enum PATCHING_MODE_UNSPECIFIED = 0; - */ - const PATCHING_MODE_UNSPECIFIED = 0; - /** - * Updates the Cloud Exadata database server hosts in a rolling fashion. - * - * Generated from protobuf enum ROLLING = 1; - */ - const ROLLING = 1; - /** - * The non-rolling maintenance method first updates your storage servers at - * the same time, then your database servers at the same time. - * - * Generated from protobuf enum NON_ROLLING = 2; - */ - const NON_ROLLING = 2; - - private static $valueToName = [ - self::PATCHING_MODE_UNSPECIFIED => 'PATCHING_MODE_UNSPECIFIED', - self::ROLLING => 'ROLLING', - self::NON_ROLLING => 'NON_ROLLING', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(PatchingMode::class, \Google\Cloud\OracleDatabase\V1\MaintenanceWindow_PatchingMode::class); - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/OperationMetadata.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/OperationMetadata.php deleted file mode 100644 index d170cd2d8f0a..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/OperationMetadata.php +++ /dev/null @@ -1,345 +0,0 @@ -google.cloud.oracledatabase.v1.OperationMetadata - */ -class OperationMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $end_time = null; - /** - * Output only. Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $target = ''; - /** - * Output only. Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $verb = ''; - /** - * Output only. The status of the operation. - * - * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $status_message = ''; - /** - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have been cancelled successfully - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. - * - * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $requested_cancellation = false; - /** - * Output only. API version used to start the operation. - * - * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $api_version = ''; - /** - * Output only. An estimated percentage of the operation that has been - * completed at a given moment of time, between 0 and 100. - * - * Generated from protobuf field double percent_complete = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $percent_complete = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time the operation was created. - * @type \Google\Protobuf\Timestamp $end_time - * Output only. The time the operation finished running. - * @type string $target - * Output only. Server-defined resource path for the target of the operation. - * @type string $verb - * Output only. Name of the verb executed by the operation. - * @type string $status_message - * Output only. The status of the operation. - * @type bool $requested_cancellation - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have been cancelled successfully - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. - * @type string $api_version - * Output only. API version used to start the operation. - * @type float $percent_complete - * Output only. An estimated percentage of the operation that has been - * completed at a given moment of time, between 0 and 100. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Oracledatabase\V1\Oracledatabase::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * Output only. The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * Output only. Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getTarget() - { - return $this->target; - } - - /** - * Output only. Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setTarget($var) - { - GPBUtil::checkString($var, True); - $this->target = $var; - - return $this; - } - - /** - * Output only. Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getVerb() - { - return $this->verb; - } - - /** - * Output only. Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setVerb($var) - { - GPBUtil::checkString($var, True); - $this->verb = $var; - - return $this; - } - - /** - * Output only. The status of the operation. - * - * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getStatusMessage() - { - return $this->status_message; - } - - /** - * Output only. The status of the operation. - * - * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setStatusMessage($var) - { - GPBUtil::checkString($var, True); - $this->status_message = $var; - - return $this; - } - - /** - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have been cancelled successfully - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. - * - * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getRequestedCancellation() - { - return $this->requested_cancellation; - } - - /** - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have been cancelled successfully - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. - * - * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setRequestedCancellation($var) - { - GPBUtil::checkBool($var); - $this->requested_cancellation = $var; - - return $this; - } - - /** - * Output only. API version used to start the operation. - * - * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getApiVersion() - { - return $this->api_version; - } - - /** - * Output only. API version used to start the operation. - * - * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setApiVersion($var) - { - GPBUtil::checkString($var, True); - $this->api_version = $var; - - return $this; - } - - /** - * Output only. An estimated percentage of the operation that has been - * completed at a given moment of time, between 0 and 100. - * - * Generated from protobuf field double percent_complete = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return float - */ - public function getPercentComplete() - { - return $this->percent_complete; - } - - /** - * Output only. An estimated percentage of the operation that has been - * completed at a given moment of time, between 0 and 100. - * - * Generated from protobuf field double percent_complete = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param float $var - * @return $this - */ - public function setPercentComplete($var) - { - GPBUtil::checkDouble($var); - $this->percent_complete = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/OperationsInsightsState.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/OperationsInsightsState.php deleted file mode 100644 index 7dc7914c8613..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/OperationsInsightsState.php +++ /dev/null @@ -1,89 +0,0 @@ -google.cloud.oracledatabase.v1.OperationsInsightsState - */ -class OperationsInsightsState -{ - /** - * Default unspecified value. - * - * Generated from protobuf enum OPERATIONS_INSIGHTS_STATE_UNSPECIFIED = 0; - */ - const OPERATIONS_INSIGHTS_STATE_UNSPECIFIED = 0; - /** - * Enabling status for operation insights. - * - * Generated from protobuf enum ENABLING = 1; - */ - const ENABLING = 1; - /** - * Enabled status for operation insights. - * - * Generated from protobuf enum ENABLED = 2; - */ - const ENABLED = 2; - /** - * Disabling status for operation insights. - * - * Generated from protobuf enum DISABLING = 3; - */ - const DISABLING = 3; - /** - * Not Enabled status for operation insights. - * - * Generated from protobuf enum NOT_ENABLED = 4; - */ - const NOT_ENABLED = 4; - /** - * Failed enabling status for operation insights. - * - * Generated from protobuf enum FAILED_ENABLING = 5; - */ - const FAILED_ENABLING = 5; - /** - * Failed disabling status for operation insights. - * - * Generated from protobuf enum FAILED_DISABLING = 6; - */ - const FAILED_DISABLING = 6; - - private static $valueToName = [ - self::OPERATIONS_INSIGHTS_STATE_UNSPECIFIED => 'OPERATIONS_INSIGHTS_STATE_UNSPECIFIED', - self::ENABLING => 'ENABLING', - self::ENABLED => 'ENABLED', - self::DISABLING => 'DISABLING', - self::NOT_ENABLED => 'NOT_ENABLED', - self::FAILED_ENABLING => 'FAILED_ENABLING', - self::FAILED_DISABLING => 'FAILED_DISABLING', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/RestoreAutonomousDatabaseRequest.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/RestoreAutonomousDatabaseRequest.php deleted file mode 100644 index 42a50fa6066e..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/RestoreAutonomousDatabaseRequest.php +++ /dev/null @@ -1,132 +0,0 @@ -google.cloud.oracledatabase.v1.RestoreAutonomousDatabaseRequest - */ -class RestoreAutonomousDatabaseRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the Autonomous Database in the following format: - * projects/{project}/locations/{location}/autonomousDatabases/{autonomous_database}. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. The time and date to restore the database to. - * - * Generated from protobuf field .google.protobuf.Timestamp restore_time = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $restore_time = null; - - /** - * @param string $name Required. The name of the Autonomous Database in the following format: - * projects/{project}/locations/{location}/autonomousDatabases/{autonomous_database}. Please see - * {@see OracleDatabaseClient::autonomousDatabaseName()} for help formatting this field. - * @param \Google\Protobuf\Timestamp $restoreTime Required. The time and date to restore the database to. - * - * @return \Google\Cloud\OracleDatabase\V1\RestoreAutonomousDatabaseRequest - * - * @experimental - */ - public static function build(string $name, \Google\Protobuf\Timestamp $restoreTime): self - { - return (new self()) - ->setName($name) - ->setRestoreTime($restoreTime); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the Autonomous Database in the following format: - * projects/{project}/locations/{location}/autonomousDatabases/{autonomous_database}. - * @type \Google\Protobuf\Timestamp $restore_time - * Required. The time and date to restore the database to. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Oracledatabase\V1\Oracledatabase::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the Autonomous Database in the following format: - * projects/{project}/locations/{location}/autonomousDatabases/{autonomous_database}. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the Autonomous Database in the following format: - * projects/{project}/locations/{location}/autonomousDatabases/{autonomous_database}. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. The time and date to restore the database to. - * - * Generated from protobuf field .google.protobuf.Timestamp restore_time = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getRestoreTime() - { - return $this->restore_time; - } - - public function hasRestoreTime() - { - return isset($this->restore_time); - } - - public function clearRestoreTime() - { - unset($this->restore_time); - } - - /** - * Required. The time and date to restore the database to. - * - * Generated from protobuf field .google.protobuf.Timestamp restore_time = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setRestoreTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->restore_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ScheduledOperationDetails.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ScheduledOperationDetails.php deleted file mode 100644 index 47023e1d5ec0..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/ScheduledOperationDetails.php +++ /dev/null @@ -1,156 +0,0 @@ -google.cloud.oracledatabase.v1.ScheduledOperationDetails - */ -class ScheduledOperationDetails extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Day of week. - * - * Generated from protobuf field .google.type.DayOfWeek day_of_week = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $day_of_week = 0; - /** - * Output only. Auto start time. - * - * Generated from protobuf field .google.type.TimeOfDay start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $start_time = null; - /** - * Output only. Auto stop time. - * - * Generated from protobuf field .google.type.TimeOfDay stop_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $stop_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $day_of_week - * Output only. Day of week. - * @type \Google\Type\TimeOfDay $start_time - * Output only. Auto start time. - * @type \Google\Type\TimeOfDay $stop_time - * Output only. Auto stop time. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Oracledatabase\V1\AutonomousDatabase::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Day of week. - * - * Generated from protobuf field .google.type.DayOfWeek day_of_week = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getDayOfWeek() - { - return $this->day_of_week; - } - - /** - * Output only. Day of week. - * - * Generated from protobuf field .google.type.DayOfWeek day_of_week = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setDayOfWeek($var) - { - GPBUtil::checkEnum($var, \Google\Type\DayOfWeek::class); - $this->day_of_week = $var; - - return $this; - } - - /** - * Output only. Auto start time. - * - * Generated from protobuf field .google.type.TimeOfDay start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Type\TimeOfDay|null - */ - public function getStartTime() - { - return $this->start_time; - } - - public function hasStartTime() - { - return isset($this->start_time); - } - - public function clearStartTime() - { - unset($this->start_time); - } - - /** - * Output only. Auto start time. - * - * Generated from protobuf field .google.type.TimeOfDay start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Type\TimeOfDay $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Type\TimeOfDay::class); - $this->start_time = $var; - - return $this; - } - - /** - * Output only. Auto stop time. - * - * Generated from protobuf field .google.type.TimeOfDay stop_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Type\TimeOfDay|null - */ - public function getStopTime() - { - return $this->stop_time; - } - - public function hasStopTime() - { - return isset($this->stop_time); - } - - public function clearStopTime() - { - unset($this->stop_time); - } - - /** - * Output only. Auto stop time. - * - * Generated from protobuf field .google.type.TimeOfDay stop_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Type\TimeOfDay $var - * @return $this - */ - public function setStopTime($var) - { - GPBUtil::checkMessage($var, \Google\Type\TimeOfDay::class); - $this->stop_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/State.php b/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/State.php deleted file mode 100644 index a66420d3d463..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/proto/src/Google/Cloud/OracleDatabase/V1/State.php +++ /dev/null @@ -1,195 +0,0 @@ -google.cloud.oracledatabase.v1.State - */ -class State -{ - /** - * Default unspecified value. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Indicates that the Autonomous Database is in provisioning state. - * - * Generated from protobuf enum PROVISIONING = 1; - */ - const PROVISIONING = 1; - /** - * Indicates that the Autonomous Database is in available state. - * - * Generated from protobuf enum AVAILABLE = 2; - */ - const AVAILABLE = 2; - /** - * Indicates that the Autonomous Database is in stopping state. - * - * Generated from protobuf enum STOPPING = 3; - */ - const STOPPING = 3; - /** - * Indicates that the Autonomous Database is in stopped state. - * - * Generated from protobuf enum STOPPED = 4; - */ - const STOPPED = 4; - /** - * Indicates that the Autonomous Database is in starting state. - * - * Generated from protobuf enum STARTING = 5; - */ - const STARTING = 5; - /** - * Indicates that the Autonomous Database is in terminating state. - * - * Generated from protobuf enum TERMINATING = 6; - */ - const TERMINATING = 6; - /** - * Indicates that the Autonomous Database is in terminated state. - * - * Generated from protobuf enum TERMINATED = 7; - */ - const TERMINATED = 7; - /** - * Indicates that the Autonomous Database is in unavailable state. - * - * Generated from protobuf enum UNAVAILABLE = 8; - */ - const UNAVAILABLE = 8; - /** - * Indicates that the Autonomous Database restore is in progress. - * - * Generated from protobuf enum RESTORE_IN_PROGRESS = 9; - */ - const RESTORE_IN_PROGRESS = 9; - /** - * Indicates that the Autonomous Database failed to restore. - * - * Generated from protobuf enum RESTORE_FAILED = 10; - */ - const RESTORE_FAILED = 10; - /** - * Indicates that the Autonomous Database backup is in progress. - * - * Generated from protobuf enum BACKUP_IN_PROGRESS = 11; - */ - const BACKUP_IN_PROGRESS = 11; - /** - * Indicates that the Autonomous Database scale is in progress. - * - * Generated from protobuf enum SCALE_IN_PROGRESS = 12; - */ - const SCALE_IN_PROGRESS = 12; - /** - * Indicates that the Autonomous Database is available but needs attention - * state. - * - * Generated from protobuf enum AVAILABLE_NEEDS_ATTENTION = 13; - */ - const AVAILABLE_NEEDS_ATTENTION = 13; - /** - * Indicates that the Autonomous Database is in updating state. - * - * Generated from protobuf enum UPDATING = 14; - */ - const UPDATING = 14; - /** - * Indicates that the Autonomous Database's maintenance is in progress state. - * - * Generated from protobuf enum MAINTENANCE_IN_PROGRESS = 15; - */ - const MAINTENANCE_IN_PROGRESS = 15; - /** - * Indicates that the Autonomous Database is in restarting state. - * - * Generated from protobuf enum RESTARTING = 16; - */ - const RESTARTING = 16; - /** - * Indicates that the Autonomous Database is in recreating state. - * - * Generated from protobuf enum RECREATING = 17; - */ - const RECREATING = 17; - /** - * Indicates that the Autonomous Database's role change is in progress state. - * - * Generated from protobuf enum ROLE_CHANGE_IN_PROGRESS = 18; - */ - const ROLE_CHANGE_IN_PROGRESS = 18; - /** - * Indicates that the Autonomous Database is in upgrading state. - * - * Generated from protobuf enum UPGRADING = 19; - */ - const UPGRADING = 19; - /** - * Indicates that the Autonomous Database is in inaccessible state. - * - * Generated from protobuf enum INACCESSIBLE = 20; - */ - const INACCESSIBLE = 20; - /** - * Indicates that the Autonomous Database is in standby state. - * - * Generated from protobuf enum STANDBY = 21; - */ - const STANDBY = 21; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::PROVISIONING => 'PROVISIONING', - self::AVAILABLE => 'AVAILABLE', - self::STOPPING => 'STOPPING', - self::STOPPED => 'STOPPED', - self::STARTING => 'STARTING', - self::TERMINATING => 'TERMINATING', - self::TERMINATED => 'TERMINATED', - self::UNAVAILABLE => 'UNAVAILABLE', - self::RESTORE_IN_PROGRESS => 'RESTORE_IN_PROGRESS', - self::RESTORE_FAILED => 'RESTORE_FAILED', - self::BACKUP_IN_PROGRESS => 'BACKUP_IN_PROGRESS', - self::SCALE_IN_PROGRESS => 'SCALE_IN_PROGRESS', - self::AVAILABLE_NEEDS_ATTENTION => 'AVAILABLE_NEEDS_ATTENTION', - self::UPDATING => 'UPDATING', - self::MAINTENANCE_IN_PROGRESS => 'MAINTENANCE_IN_PROGRESS', - self::RESTARTING => 'RESTARTING', - self::RECREATING => 'RECREATING', - self::ROLE_CHANGE_IN_PROGRESS => 'ROLE_CHANGE_IN_PROGRESS', - self::UPGRADING => 'UPGRADING', - self::INACCESSIBLE => 'INACCESSIBLE', - self::STANDBY => 'STANDBY', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/create_autonomous_database.php b/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/create_autonomous_database.php deleted file mode 100644 index f74530e4c64d..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/create_autonomous_database.php +++ /dev/null @@ -1,109 +0,0 @@ -setNetwork($formattedAutonomousDatabaseNetwork) - ->setCidr($autonomousDatabaseCidr); - $request = (new CreateAutonomousDatabaseRequest()) - ->setParent($formattedParent) - ->setAutonomousDatabaseId($autonomousDatabaseId) - ->setAutonomousDatabase($autonomousDatabase); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $oracleDatabaseClient->createAutonomousDatabase($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var AutonomousDatabase $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = OracleDatabaseClient::locationName('[PROJECT]', '[LOCATION]'); - $autonomousDatabaseId = '[AUTONOMOUS_DATABASE_ID]'; - $formattedAutonomousDatabaseNetwork = OracleDatabaseClient::networkName('[PROJECT]', '[NETWORK]'); - $autonomousDatabaseCidr = '[CIDR]'; - - create_autonomous_database_sample( - $formattedParent, - $autonomousDatabaseId, - $formattedAutonomousDatabaseNetwork, - $autonomousDatabaseCidr - ); -} -// [END oracledatabase_v1_generated_OracleDatabase_CreateAutonomousDatabase_sync] diff --git a/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/create_cloud_exadata_infrastructure.php b/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/create_cloud_exadata_infrastructure.php deleted file mode 100644 index 7c933aeb610f..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/create_cloud_exadata_infrastructure.php +++ /dev/null @@ -1,94 +0,0 @@ -setParent($formattedParent) - ->setCloudExadataInfrastructureId($cloudExadataInfrastructureId) - ->setCloudExadataInfrastructure($cloudExadataInfrastructure); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $oracleDatabaseClient->createCloudExadataInfrastructure($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var CloudExadataInfrastructure $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = OracleDatabaseClient::locationName('[PROJECT]', '[LOCATION]'); - $cloudExadataInfrastructureId = '[CLOUD_EXADATA_INFRASTRUCTURE_ID]'; - - create_cloud_exadata_infrastructure_sample($formattedParent, $cloudExadataInfrastructureId); -} -// [END oracledatabase_v1_generated_OracleDatabase_CreateCloudExadataInfrastructure_sync] diff --git a/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/create_cloud_vm_cluster.php b/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/create_cloud_vm_cluster.php deleted file mode 100644 index 948ffd02e119..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/create_cloud_vm_cluster.php +++ /dev/null @@ -1,126 +0,0 @@ -setExadataInfrastructure($formattedCloudVmClusterExadataInfrastructure) - ->setCidr($cloudVmClusterCidr) - ->setBackupSubnetCidr($cloudVmClusterBackupSubnetCidr) - ->setNetwork($formattedCloudVmClusterNetwork); - $request = (new CreateCloudVmClusterRequest()) - ->setParent($formattedParent) - ->setCloudVmClusterId($cloudVmClusterId) - ->setCloudVmCluster($cloudVmCluster); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $oracleDatabaseClient->createCloudVmCluster($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var CloudVmCluster $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = OracleDatabaseClient::locationName('[PROJECT]', '[LOCATION]'); - $cloudVmClusterId = '[CLOUD_VM_CLUSTER_ID]'; - $formattedCloudVmClusterExadataInfrastructure = OracleDatabaseClient::cloudExadataInfrastructureName( - '[PROJECT]', - '[LOCATION]', - '[CLOUD_EXADATA_INFRASTRUCTURE]' - ); - $cloudVmClusterCidr = '[CIDR]'; - $cloudVmClusterBackupSubnetCidr = '[BACKUP_SUBNET_CIDR]'; - $formattedCloudVmClusterNetwork = OracleDatabaseClient::networkName('[PROJECT]', '[NETWORK]'); - - create_cloud_vm_cluster_sample( - $formattedParent, - $cloudVmClusterId, - $formattedCloudVmClusterExadataInfrastructure, - $cloudVmClusterCidr, - $cloudVmClusterBackupSubnetCidr, - $formattedCloudVmClusterNetwork - ); -} -// [END oracledatabase_v1_generated_OracleDatabase_CreateCloudVmCluster_sync] diff --git a/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/delete_autonomous_database.php b/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/delete_autonomous_database.php deleted file mode 100644 index 640fdef87a17..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/delete_autonomous_database.php +++ /dev/null @@ -1,85 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $oracleDatabaseClient->deleteAutonomousDatabase($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = OracleDatabaseClient::autonomousDatabaseName( - '[PROJECT]', - '[LOCATION]', - '[AUTONOMOUS_DATABASE]' - ); - - delete_autonomous_database_sample($formattedName); -} -// [END oracledatabase_v1_generated_OracleDatabase_DeleteAutonomousDatabase_sync] diff --git a/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/delete_cloud_exadata_infrastructure.php b/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/delete_cloud_exadata_infrastructure.php deleted file mode 100644 index 390896e787e6..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/delete_cloud_exadata_infrastructure.php +++ /dev/null @@ -1,86 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $oracleDatabaseClient->deleteCloudExadataInfrastructure($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = OracleDatabaseClient::cloudExadataInfrastructureName( - '[PROJECT]', - '[LOCATION]', - '[CLOUD_EXADATA_INFRASTRUCTURE]' - ); - - delete_cloud_exadata_infrastructure_sample($formattedName); -} -// [END oracledatabase_v1_generated_OracleDatabase_DeleteCloudExadataInfrastructure_sync] diff --git a/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/delete_cloud_vm_cluster.php b/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/delete_cloud_vm_cluster.php deleted file mode 100644 index 3524a13161c1..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/delete_cloud_vm_cluster.php +++ /dev/null @@ -1,85 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $oracleDatabaseClient->deleteCloudVmCluster($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = OracleDatabaseClient::cloudVmClusterName( - '[PROJECT]', - '[LOCATION]', - '[CLOUD_VM_CLUSTER]' - ); - - delete_cloud_vm_cluster_sample($formattedName); -} -// [END oracledatabase_v1_generated_OracleDatabase_DeleteCloudVmCluster_sync] diff --git a/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/generate_autonomous_database_wallet.php b/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/generate_autonomous_database_wallet.php deleted file mode 100644 index f16b542bfe2b..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/generate_autonomous_database_wallet.php +++ /dev/null @@ -1,80 +0,0 @@ -setName($formattedName) - ->setPassword($password); - - // Call the API and handle any network failures. - try { - /** @var GenerateAutonomousDatabaseWalletResponse $response */ - $response = $oracleDatabaseClient->generateAutonomousDatabaseWallet($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = OracleDatabaseClient::autonomousDatabaseName( - '[PROJECT]', - '[LOCATION]', - '[AUTONOMOUS_DATABASE]' - ); - $password = '[PASSWORD]'; - - generate_autonomous_database_wallet_sample($formattedName, $password); -} -// [END oracledatabase_v1_generated_OracleDatabase_GenerateAutonomousDatabaseWallet_sync] diff --git a/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/get_autonomous_database.php b/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/get_autonomous_database.php deleted file mode 100644 index eca95808ea65..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/get_autonomous_database.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var AutonomousDatabase $response */ - $response = $oracleDatabaseClient->getAutonomousDatabase($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = OracleDatabaseClient::autonomousDatabaseName( - '[PROJECT]', - '[LOCATION]', - '[AUTONOMOUS_DATABASE]' - ); - - get_autonomous_database_sample($formattedName); -} -// [END oracledatabase_v1_generated_OracleDatabase_GetAutonomousDatabase_sync] diff --git a/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/get_cloud_exadata_infrastructure.php b/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/get_cloud_exadata_infrastructure.php deleted file mode 100644 index 4b3fc1fd9ead..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/get_cloud_exadata_infrastructure.php +++ /dev/null @@ -1,77 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var CloudExadataInfrastructure $response */ - $response = $oracleDatabaseClient->getCloudExadataInfrastructure($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = OracleDatabaseClient::cloudExadataInfrastructureName( - '[PROJECT]', - '[LOCATION]', - '[CLOUD_EXADATA_INFRASTRUCTURE]' - ); - - get_cloud_exadata_infrastructure_sample($formattedName); -} -// [END oracledatabase_v1_generated_OracleDatabase_GetCloudExadataInfrastructure_sync] diff --git a/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/get_cloud_vm_cluster.php b/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/get_cloud_vm_cluster.php deleted file mode 100644 index bc24707483c9..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/get_cloud_vm_cluster.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var CloudVmCluster $response */ - $response = $oracleDatabaseClient->getCloudVmCluster($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = OracleDatabaseClient::cloudVmClusterName( - '[PROJECT]', - '[LOCATION]', - '[CLOUD_VM_CLUSTER]' - ); - - get_cloud_vm_cluster_sample($formattedName); -} -// [END oracledatabase_v1_generated_OracleDatabase_GetCloudVmCluster_sync] diff --git a/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/get_location.php b/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/get_location.php deleted file mode 100644 index cf2353306d42..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/get_location.php +++ /dev/null @@ -1,57 +0,0 @@ -getLocation($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END oracledatabase_v1_generated_OracleDatabase_GetLocation_sync] diff --git a/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/list_autonomous_database_backups.php b/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/list_autonomous_database_backups.php deleted file mode 100644 index 642341a84282..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/list_autonomous_database_backups.php +++ /dev/null @@ -1,75 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $oracleDatabaseClient->listAutonomousDatabaseBackups($request); - - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = OracleDatabaseClient::locationName('[PROJECT]', '[LOCATION]'); - - list_autonomous_database_backups_sample($formattedParent); -} -// [END oracledatabase_v1_generated_OracleDatabase_ListAutonomousDatabaseBackups_sync] diff --git a/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/list_autonomous_database_character_sets.php b/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/list_autonomous_database_character_sets.php deleted file mode 100644 index 50ed7338d96c..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/list_autonomous_database_character_sets.php +++ /dev/null @@ -1,75 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $oracleDatabaseClient->listAutonomousDatabaseCharacterSets($request); - - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = OracleDatabaseClient::locationName('[PROJECT]', '[LOCATION]'); - - list_autonomous_database_character_sets_sample($formattedParent); -} -// [END oracledatabase_v1_generated_OracleDatabase_ListAutonomousDatabaseCharacterSets_sync] diff --git a/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/list_autonomous_databases.php b/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/list_autonomous_databases.php deleted file mode 100644 index c6efbdf9795f..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/list_autonomous_databases.php +++ /dev/null @@ -1,75 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $oracleDatabaseClient->listAutonomousDatabases($request); - - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = OracleDatabaseClient::locationName('[PROJECT]', '[LOCATION]'); - - list_autonomous_databases_sample($formattedParent); -} -// [END oracledatabase_v1_generated_OracleDatabase_ListAutonomousDatabases_sync] diff --git a/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/list_autonomous_db_versions.php b/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/list_autonomous_db_versions.php deleted file mode 100644 index afdd69e1e9d4..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/list_autonomous_db_versions.php +++ /dev/null @@ -1,76 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $oracleDatabaseClient->listAutonomousDbVersions($request); - - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = OracleDatabaseClient::locationName('[PROJECT]', '[LOCATION]'); - - list_autonomous_db_versions_sample($formattedParent); -} -// [END oracledatabase_v1_generated_OracleDatabase_ListAutonomousDbVersions_sync] diff --git a/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/list_cloud_exadata_infrastructures.php b/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/list_cloud_exadata_infrastructures.php deleted file mode 100644 index f582d8f1d73e..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/list_cloud_exadata_infrastructures.php +++ /dev/null @@ -1,75 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $oracleDatabaseClient->listCloudExadataInfrastructures($request); - - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = OracleDatabaseClient::locationName('[PROJECT]', '[LOCATION]'); - - list_cloud_exadata_infrastructures_sample($formattedParent); -} -// [END oracledatabase_v1_generated_OracleDatabase_ListCloudExadataInfrastructures_sync] diff --git a/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/list_cloud_vm_clusters.php b/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/list_cloud_vm_clusters.php deleted file mode 100644 index a1a4c49fefd3..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/list_cloud_vm_clusters.php +++ /dev/null @@ -1,75 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $oracleDatabaseClient->listCloudVmClusters($request); - - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = OracleDatabaseClient::locationName('[PROJECT]', '[LOCATION]'); - - list_cloud_vm_clusters_sample($formattedParent); -} -// [END oracledatabase_v1_generated_OracleDatabase_ListCloudVmClusters_sync] diff --git a/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/list_db_nodes.php b/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/list_db_nodes.php deleted file mode 100644 index 70d725693466..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/list_db_nodes.php +++ /dev/null @@ -1,79 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $oracleDatabaseClient->listDbNodes($request); - - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = OracleDatabaseClient::cloudVmClusterName( - '[PROJECT]', - '[LOCATION]', - '[CLOUD_VM_CLUSTER]' - ); - - list_db_nodes_sample($formattedParent); -} -// [END oracledatabase_v1_generated_OracleDatabase_ListDbNodes_sync] diff --git a/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/list_db_servers.php b/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/list_db_servers.php deleted file mode 100644 index 37abee89b707..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/list_db_servers.php +++ /dev/null @@ -1,79 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $oracleDatabaseClient->listDbServers($request); - - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = OracleDatabaseClient::cloudExadataInfrastructureName( - '[PROJECT]', - '[LOCATION]', - '[CLOUD_EXADATA_INFRASTRUCTURE]' - ); - - list_db_servers_sample($formattedParent); -} -// [END oracledatabase_v1_generated_OracleDatabase_ListDbServers_sync] diff --git a/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/list_db_system_shapes.php b/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/list_db_system_shapes.php deleted file mode 100644 index 76017f17defa..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/list_db_system_shapes.php +++ /dev/null @@ -1,75 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $oracleDatabaseClient->listDbSystemShapes($request); - - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = OracleDatabaseClient::locationName('[PROJECT]', '[LOCATION]'); - - list_db_system_shapes_sample($formattedParent); -} -// [END oracledatabase_v1_generated_OracleDatabase_ListDbSystemShapes_sync] diff --git a/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/list_entitlements.php b/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/list_entitlements.php deleted file mode 100644 index 7823a57eb30a..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/list_entitlements.php +++ /dev/null @@ -1,75 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $oracleDatabaseClient->listEntitlements($request); - - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = OracleDatabaseClient::locationName('[PROJECT]', '[LOCATION]'); - - list_entitlements_sample($formattedParent); -} -// [END oracledatabase_v1_generated_OracleDatabase_ListEntitlements_sync] diff --git a/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/list_gi_versions.php b/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/list_gi_versions.php deleted file mode 100644 index 40bcf44570f3..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/list_gi_versions.php +++ /dev/null @@ -1,76 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $oracleDatabaseClient->listGiVersions($request); - - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = OracleDatabaseClient::locationName('[PROJECT]', '[LOCATION]'); - - list_gi_versions_sample($formattedParent); -} -// [END oracledatabase_v1_generated_OracleDatabase_ListGiVersions_sync] diff --git a/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/list_locations.php b/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/list_locations.php deleted file mode 100644 index b9e866565369..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/list_locations.php +++ /dev/null @@ -1,60 +0,0 @@ -listLocations($request); - - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END oracledatabase_v1_generated_OracleDatabase_ListLocations_sync] diff --git a/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/restore_autonomous_database.php b/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/restore_autonomous_database.php deleted file mode 100644 index 5d0754532160..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/samples/V1/OracleDatabaseClient/restore_autonomous_database.php +++ /dev/null @@ -1,91 +0,0 @@ -setName($formattedName) - ->setRestoreTime($restoreTime); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $oracleDatabaseClient->restoreAutonomousDatabase($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var AutonomousDatabase $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = OracleDatabaseClient::autonomousDatabaseName( - '[PROJECT]', - '[LOCATION]', - '[AUTONOMOUS_DATABASE]' - ); - - restore_autonomous_database_sample($formattedName); -} -// [END oracledatabase_v1_generated_OracleDatabase_RestoreAutonomousDatabase_sync] diff --git a/owl-bot-staging/OracleDatabase/v1/src/V1/Client/OracleDatabaseClient.php b/owl-bot-staging/OracleDatabase/v1/src/V1/Client/OracleDatabaseClient.php deleted file mode 100644 index cf956f26c37c..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/src/V1/Client/OracleDatabaseClient.php +++ /dev/null @@ -1,1047 +0,0 @@ - createAutonomousDatabaseAsync(CreateAutonomousDatabaseRequest $request, array $optionalArgs = []) - * @method PromiseInterface createCloudExadataInfrastructureAsync(CreateCloudExadataInfrastructureRequest $request, array $optionalArgs = []) - * @method PromiseInterface createCloudVmClusterAsync(CreateCloudVmClusterRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteAutonomousDatabaseAsync(DeleteAutonomousDatabaseRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteCloudExadataInfrastructureAsync(DeleteCloudExadataInfrastructureRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteCloudVmClusterAsync(DeleteCloudVmClusterRequest $request, array $optionalArgs = []) - * @method PromiseInterface generateAutonomousDatabaseWalletAsync(GenerateAutonomousDatabaseWalletRequest $request, array $optionalArgs = []) - * @method PromiseInterface getAutonomousDatabaseAsync(GetAutonomousDatabaseRequest $request, array $optionalArgs = []) - * @method PromiseInterface getCloudExadataInfrastructureAsync(GetCloudExadataInfrastructureRequest $request, array $optionalArgs = []) - * @method PromiseInterface getCloudVmClusterAsync(GetCloudVmClusterRequest $request, array $optionalArgs = []) - * @method PromiseInterface listAutonomousDatabaseBackupsAsync(ListAutonomousDatabaseBackupsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listAutonomousDatabaseCharacterSetsAsync(ListAutonomousDatabaseCharacterSetsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listAutonomousDatabasesAsync(ListAutonomousDatabasesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listAutonomousDbVersionsAsync(ListAutonomousDbVersionsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listCloudExadataInfrastructuresAsync(ListCloudExadataInfrastructuresRequest $request, array $optionalArgs = []) - * @method PromiseInterface listCloudVmClustersAsync(ListCloudVmClustersRequest $request, array $optionalArgs = []) - * @method PromiseInterface listDbNodesAsync(ListDbNodesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listDbServersAsync(ListDbServersRequest $request, array $optionalArgs = []) - * @method PromiseInterface listDbSystemShapesAsync(ListDbSystemShapesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listEntitlementsAsync(ListEntitlementsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listGiVersionsAsync(ListGiVersionsRequest $request, array $optionalArgs = []) - * @method PromiseInterface restoreAutonomousDatabaseAsync(RestoreAutonomousDatabaseRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) - */ -final class OracleDatabaseClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.oracledatabase.v1.OracleDatabase'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'oracledatabase.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'oracledatabase.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/oracle_database_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/oracle_database_descriptor_config.php', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - 'useJwtAccessWithScope' => false, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/oracle_database_rest_client_config.php', - ], - ], - ]; - } - - /** Implements GapicClientTrait::defaultTransport. */ - private static function defaultTransport() - { - return 'rest'; - } - - /** Implements ClientOptionsTrait::supportedTransports. */ - private static function supportedTransports() - { - return [ - 'rest', - ]; - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Create the default operation client for the service. - * - * @param array $options ClientOptions for the client. - * - * @return OperationsClient - */ - private function createOperationsClient(array $options) - { - // Unset client-specific configuration options - unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); - - if (isset($options['operationsClient'])) { - return $options['operationsClient']; - } - - return new OperationsClient($options); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * autonomous_database resource. - * - * @param string $project - * @param string $location - * @param string $autonomousDatabase - * - * @return string The formatted autonomous_database resource. - */ - public static function autonomousDatabaseName(string $project, string $location, string $autonomousDatabase): string - { - return self::getPathTemplate('autonomousDatabase')->render([ - 'project' => $project, - 'location' => $location, - 'autonomous_database' => $autonomousDatabase, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * cloud_exadata_infrastructure resource. - * - * @param string $project - * @param string $location - * @param string $cloudExadataInfrastructure - * - * @return string The formatted cloud_exadata_infrastructure resource. - */ - public static function cloudExadataInfrastructureName(string $project, string $location, string $cloudExadataInfrastructure): string - { - return self::getPathTemplate('cloudExadataInfrastructure')->render([ - 'project' => $project, - 'location' => $location, - 'cloud_exadata_infrastructure' => $cloudExadataInfrastructure, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * cloud_vm_cluster resource. - * - * @param string $project - * @param string $location - * @param string $cloudVmCluster - * - * @return string The formatted cloud_vm_cluster resource. - */ - public static function cloudVmClusterName(string $project, string $location, string $cloudVmCluster): string - { - return self::getPathTemplate('cloudVmCluster')->render([ - 'project' => $project, - 'location' => $location, - 'cloud_vm_cluster' => $cloudVmCluster, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a location - * resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted location resource. - */ - public static function locationName(string $project, string $location): string - { - return self::getPathTemplate('location')->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a network - * resource. - * - * @param string $project - * @param string $network - * - * @return string The formatted network resource. - */ - public static function networkName(string $project, string $network): string - { - return self::getPathTemplate('network')->render([ - 'project' => $project, - 'network' => $network, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - autonomousDatabase: projects/{project}/locations/{location}/autonomousDatabases/{autonomous_database} - * - cloudExadataInfrastructure: projects/{project}/locations/{location}/cloudExadataInfrastructures/{cloud_exadata_infrastructure} - * - cloudVmCluster: projects/{project}/locations/{location}/cloudVmClusters/{cloud_vm_cluster} - * - location: projects/{project}/locations/{location} - * - network: projects/{project}/global/networks/{network} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param ?string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, ?string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'oracledatabase.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. At the moment, supports only - * `rest`. *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\RestTransport::build()} method for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Creates a new Autonomous Database in a given project and location. - * - * The async variant is - * {@see OracleDatabaseClient::createAutonomousDatabaseAsync()} . - * - * @example samples/V1/OracleDatabaseClient/create_autonomous_database.php - * - * @param CreateAutonomousDatabaseRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createAutonomousDatabase(CreateAutonomousDatabaseRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateAutonomousDatabase', $request, $callOptions)->wait(); - } - - /** - * Creates a new Exadata Infrastructure in a given project and location. - * - * The async variant is - * {@see OracleDatabaseClient::createCloudExadataInfrastructureAsync()} . - * - * @example samples/V1/OracleDatabaseClient/create_cloud_exadata_infrastructure.php - * - * @param CreateCloudExadataInfrastructureRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createCloudExadataInfrastructure(CreateCloudExadataInfrastructureRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateCloudExadataInfrastructure', $request, $callOptions)->wait(); - } - - /** - * Creates a new VM Cluster in a given project and location. - * - * The async variant is {@see OracleDatabaseClient::createCloudVmClusterAsync()} . - * - * @example samples/V1/OracleDatabaseClient/create_cloud_vm_cluster.php - * - * @param CreateCloudVmClusterRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createCloudVmCluster(CreateCloudVmClusterRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateCloudVmCluster', $request, $callOptions)->wait(); - } - - /** - * Deletes a single Autonomous Database. - * - * The async variant is - * {@see OracleDatabaseClient::deleteAutonomousDatabaseAsync()} . - * - * @example samples/V1/OracleDatabaseClient/delete_autonomous_database.php - * - * @param DeleteAutonomousDatabaseRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteAutonomousDatabase(DeleteAutonomousDatabaseRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteAutonomousDatabase', $request, $callOptions)->wait(); - } - - /** - * Deletes a single Exadata Infrastructure. - * - * The async variant is - * {@see OracleDatabaseClient::deleteCloudExadataInfrastructureAsync()} . - * - * @example samples/V1/OracleDatabaseClient/delete_cloud_exadata_infrastructure.php - * - * @param DeleteCloudExadataInfrastructureRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteCloudExadataInfrastructure(DeleteCloudExadataInfrastructureRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteCloudExadataInfrastructure', $request, $callOptions)->wait(); - } - - /** - * Deletes a single VM Cluster. - * - * The async variant is {@see OracleDatabaseClient::deleteCloudVmClusterAsync()} . - * - * @example samples/V1/OracleDatabaseClient/delete_cloud_vm_cluster.php - * - * @param DeleteCloudVmClusterRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteCloudVmCluster(DeleteCloudVmClusterRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteCloudVmCluster', $request, $callOptions)->wait(); - } - - /** - * Generates a wallet for an Autonomous Database. - * - * The async variant is - * {@see OracleDatabaseClient::generateAutonomousDatabaseWalletAsync()} . - * - * @example samples/V1/OracleDatabaseClient/generate_autonomous_database_wallet.php - * - * @param GenerateAutonomousDatabaseWalletRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return GenerateAutonomousDatabaseWalletResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function generateAutonomousDatabaseWallet(GenerateAutonomousDatabaseWalletRequest $request, array $callOptions = []): GenerateAutonomousDatabaseWalletResponse - { - return $this->startApiCall('GenerateAutonomousDatabaseWallet', $request, $callOptions)->wait(); - } - - /** - * Gets the details of a single Autonomous Database. - * - * The async variant is {@see OracleDatabaseClient::getAutonomousDatabaseAsync()} . - * - * @example samples/V1/OracleDatabaseClient/get_autonomous_database.php - * - * @param GetAutonomousDatabaseRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return AutonomousDatabase - * - * @throws ApiException Thrown if the API call fails. - */ - public function getAutonomousDatabase(GetAutonomousDatabaseRequest $request, array $callOptions = []): AutonomousDatabase - { - return $this->startApiCall('GetAutonomousDatabase', $request, $callOptions)->wait(); - } - - /** - * Gets details of a single Exadata Infrastructure. - * - * The async variant is - * {@see OracleDatabaseClient::getCloudExadataInfrastructureAsync()} . - * - * @example samples/V1/OracleDatabaseClient/get_cloud_exadata_infrastructure.php - * - * @param GetCloudExadataInfrastructureRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return CloudExadataInfrastructure - * - * @throws ApiException Thrown if the API call fails. - */ - public function getCloudExadataInfrastructure(GetCloudExadataInfrastructureRequest $request, array $callOptions = []): CloudExadataInfrastructure - { - return $this->startApiCall('GetCloudExadataInfrastructure', $request, $callOptions)->wait(); - } - - /** - * Gets details of a single VM Cluster. - * - * The async variant is {@see OracleDatabaseClient::getCloudVmClusterAsync()} . - * - * @example samples/V1/OracleDatabaseClient/get_cloud_vm_cluster.php - * - * @param GetCloudVmClusterRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return CloudVmCluster - * - * @throws ApiException Thrown if the API call fails. - */ - public function getCloudVmCluster(GetCloudVmClusterRequest $request, array $callOptions = []): CloudVmCluster - { - return $this->startApiCall('GetCloudVmCluster', $request, $callOptions)->wait(); - } - - /** - * Lists the long-term and automatic backups of an Autonomous Database. - * - * The async variant is - * {@see OracleDatabaseClient::listAutonomousDatabaseBackupsAsync()} . - * - * @example samples/V1/OracleDatabaseClient/list_autonomous_database_backups.php - * - * @param ListAutonomousDatabaseBackupsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listAutonomousDatabaseBackups(ListAutonomousDatabaseBackupsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListAutonomousDatabaseBackups', $request, $callOptions); - } - - /** - * Lists Autonomous Database Character Sets in a given project and location. - * - * The async variant is - * {@see OracleDatabaseClient::listAutonomousDatabaseCharacterSetsAsync()} . - * - * @example samples/V1/OracleDatabaseClient/list_autonomous_database_character_sets.php - * - * @param ListAutonomousDatabaseCharacterSetsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listAutonomousDatabaseCharacterSets(ListAutonomousDatabaseCharacterSetsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListAutonomousDatabaseCharacterSets', $request, $callOptions); - } - - /** - * Lists the Autonomous Databases in a given project and location. - * - * The async variant is {@see OracleDatabaseClient::listAutonomousDatabasesAsync()} - * . - * - * @example samples/V1/OracleDatabaseClient/list_autonomous_databases.php - * - * @param ListAutonomousDatabasesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listAutonomousDatabases(ListAutonomousDatabasesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListAutonomousDatabases', $request, $callOptions); - } - - /** - * Lists all the available Autonomous Database versions for a project and - * location. - * - * The async variant is - * {@see OracleDatabaseClient::listAutonomousDbVersionsAsync()} . - * - * @example samples/V1/OracleDatabaseClient/list_autonomous_db_versions.php - * - * @param ListAutonomousDbVersionsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listAutonomousDbVersions(ListAutonomousDbVersionsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListAutonomousDbVersions', $request, $callOptions); - } - - /** - * Lists Exadata Infrastructures in a given project and location. - * - * The async variant is - * {@see OracleDatabaseClient::listCloudExadataInfrastructuresAsync()} . - * - * @example samples/V1/OracleDatabaseClient/list_cloud_exadata_infrastructures.php - * - * @param ListCloudExadataInfrastructuresRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listCloudExadataInfrastructures(ListCloudExadataInfrastructuresRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListCloudExadataInfrastructures', $request, $callOptions); - } - - /** - * Lists the VM Clusters in a given project and location. - * - * The async variant is {@see OracleDatabaseClient::listCloudVmClustersAsync()} . - * - * @example samples/V1/OracleDatabaseClient/list_cloud_vm_clusters.php - * - * @param ListCloudVmClustersRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listCloudVmClusters(ListCloudVmClustersRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListCloudVmClusters', $request, $callOptions); - } - - /** - * Lists the database nodes of a VM Cluster. - * - * The async variant is {@see OracleDatabaseClient::listDbNodesAsync()} . - * - * @example samples/V1/OracleDatabaseClient/list_db_nodes.php - * - * @param ListDbNodesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listDbNodes(ListDbNodesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListDbNodes', $request, $callOptions); - } - - /** - * Lists the database servers of an Exadata Infrastructure instance. - * - * The async variant is {@see OracleDatabaseClient::listDbServersAsync()} . - * - * @example samples/V1/OracleDatabaseClient/list_db_servers.php - * - * @param ListDbServersRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listDbServers(ListDbServersRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListDbServers', $request, $callOptions); - } - - /** - * Lists the database system shapes available for the project and location. - * - * The async variant is {@see OracleDatabaseClient::listDbSystemShapesAsync()} . - * - * @example samples/V1/OracleDatabaseClient/list_db_system_shapes.php - * - * @param ListDbSystemShapesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listDbSystemShapes(ListDbSystemShapesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListDbSystemShapes', $request, $callOptions); - } - - /** - * Lists the entitlements in a given project. - * - * The async variant is {@see OracleDatabaseClient::listEntitlementsAsync()} . - * - * @example samples/V1/OracleDatabaseClient/list_entitlements.php - * - * @param ListEntitlementsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listEntitlements(ListEntitlementsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListEntitlements', $request, $callOptions); - } - - /** - * Lists all the valid Oracle Grid Infrastructure (GI) versions for the given - * project and location. - * - * The async variant is {@see OracleDatabaseClient::listGiVersionsAsync()} . - * - * @example samples/V1/OracleDatabaseClient/list_gi_versions.php - * - * @param ListGiVersionsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listGiVersions(ListGiVersionsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListGiVersions', $request, $callOptions); - } - - /** - * Restores a single Autonomous Database. - * - * The async variant is - * {@see OracleDatabaseClient::restoreAutonomousDatabaseAsync()} . - * - * @example samples/V1/OracleDatabaseClient/restore_autonomous_database.php - * - * @param RestoreAutonomousDatabaseRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function restoreAutonomousDatabase(RestoreAutonomousDatabaseRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('RestoreAutonomousDatabase', $request, $callOptions)->wait(); - } - - /** - * Gets information about a location. - * - * The async variant is {@see OracleDatabaseClient::getLocationAsync()} . - * - * @example samples/V1/OracleDatabaseClient/get_location.php - * - * @param GetLocationRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Location - * - * @throws ApiException Thrown if the API call fails. - */ - public function getLocation(GetLocationRequest $request, array $callOptions = []): Location - { - return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * The async variant is {@see OracleDatabaseClient::listLocationsAsync()} . - * - * @example samples/V1/OracleDatabaseClient/list_locations.php - * - * @param ListLocationsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListLocations', $request, $callOptions); - } -} diff --git a/owl-bot-staging/OracleDatabase/v1/src/V1/gapic_metadata.json b/owl-bot-staging/OracleDatabase/v1/src/V1/gapic_metadata.json deleted file mode 100644 index 8cf55064f966..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/src/V1/gapic_metadata.json +++ /dev/null @@ -1,138 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.oracledatabase.v1", - "libraryPackage": "Google\\Cloud\\OracleDatabase\\V1", - "services": { - "OracleDatabase": { - "clients": { - "grpc": { - "libraryClient": "OracleDatabaseGapicClient", - "rpcs": { - "CreateAutonomousDatabase": { - "methods": [ - "createAutonomousDatabase" - ] - }, - "CreateCloudExadataInfrastructure": { - "methods": [ - "createCloudExadataInfrastructure" - ] - }, - "CreateCloudVmCluster": { - "methods": [ - "createCloudVmCluster" - ] - }, - "DeleteAutonomousDatabase": { - "methods": [ - "deleteAutonomousDatabase" - ] - }, - "DeleteCloudExadataInfrastructure": { - "methods": [ - "deleteCloudExadataInfrastructure" - ] - }, - "DeleteCloudVmCluster": { - "methods": [ - "deleteCloudVmCluster" - ] - }, - "GenerateAutonomousDatabaseWallet": { - "methods": [ - "generateAutonomousDatabaseWallet" - ] - }, - "GetAutonomousDatabase": { - "methods": [ - "getAutonomousDatabase" - ] - }, - "GetCloudExadataInfrastructure": { - "methods": [ - "getCloudExadataInfrastructure" - ] - }, - "GetCloudVmCluster": { - "methods": [ - "getCloudVmCluster" - ] - }, - "ListAutonomousDatabaseBackups": { - "methods": [ - "listAutonomousDatabaseBackups" - ] - }, - "ListAutonomousDatabaseCharacterSets": { - "methods": [ - "listAutonomousDatabaseCharacterSets" - ] - }, - "ListAutonomousDatabases": { - "methods": [ - "listAutonomousDatabases" - ] - }, - "ListAutonomousDbVersions": { - "methods": [ - "listAutonomousDbVersions" - ] - }, - "ListCloudExadataInfrastructures": { - "methods": [ - "listCloudExadataInfrastructures" - ] - }, - "ListCloudVmClusters": { - "methods": [ - "listCloudVmClusters" - ] - }, - "ListDbNodes": { - "methods": [ - "listDbNodes" - ] - }, - "ListDbServers": { - "methods": [ - "listDbServers" - ] - }, - "ListDbSystemShapes": { - "methods": [ - "listDbSystemShapes" - ] - }, - "ListEntitlements": { - "methods": [ - "listEntitlements" - ] - }, - "ListGiVersions": { - "methods": [ - "listGiVersions" - ] - }, - "RestoreAutonomousDatabase": { - "methods": [ - "restoreAutonomousDatabase" - ] - }, - "GetLocation": { - "methods": [ - "getLocation" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/OracleDatabase/v1/src/V1/resources/oracle_database_client_config.json b/owl-bot-staging/OracleDatabase/v1/src/V1/resources/oracle_database_client_config.json deleted file mode 100644 index 396a3c007940..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/src/V1/resources/oracle_database_client_config.json +++ /dev/null @@ -1,167 +0,0 @@ -{ - "interfaces": { - "google.cloud.oracledatabase.v1.OracleDatabase": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "RESOURCE_EXHAUSTED", - "UNAVAILABLE", - "INTERNAL", - "DEADLINE_EXCEEDED" - ], - "no_retry_1_codes": [] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "retry_policy_1_params": { - "initial_retry_delay_millis": 1000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 10000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - }, - "no_retry_1_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": { - "CreateAutonomousDatabase": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateCloudExadataInfrastructure": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateCloudVmCluster": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteAutonomousDatabase": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteCloudExadataInfrastructure": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteCloudVmCluster": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GenerateAutonomousDatabaseWallet": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetAutonomousDatabase": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetCloudExadataInfrastructure": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetCloudVmCluster": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListAutonomousDatabaseBackups": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListAutonomousDatabaseCharacterSets": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListAutonomousDatabases": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListAutonomousDbVersions": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListCloudExadataInfrastructures": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListCloudVmClusters": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListDbNodes": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListDbServers": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListDbSystemShapes": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListEntitlements": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListGiVersions": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "RestoreAutonomousDatabase": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetLocation": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListLocations": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/OracleDatabase/v1/src/V1/resources/oracle_database_descriptor_config.php b/owl-bot-staging/OracleDatabase/v1/src/V1/resources/oracle_database_descriptor_config.php deleted file mode 100644 index 9f1099d49d15..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/src/V1/resources/oracle_database_descriptor_config.php +++ /dev/null @@ -1,470 +0,0 @@ - [ - 'google.cloud.oracledatabase.v1.OracleDatabase' => [ - 'CreateAutonomousDatabase' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\OracleDatabase\V1\AutonomousDatabase', - 'metadataReturnType' => '\Google\Cloud\OracleDatabase\V1\OperationMetadata', - 'initialPollDelayMillis' => '60000', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '600000', - 'totalPollTimeoutMillis' => '432000000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateCloudExadataInfrastructure' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\OracleDatabase\V1\CloudExadataInfrastructure', - 'metadataReturnType' => '\Google\Cloud\OracleDatabase\V1\OperationMetadata', - 'initialPollDelayMillis' => '60000', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '600000', - 'totalPollTimeoutMillis' => '432000000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateCloudVmCluster' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\OracleDatabase\V1\CloudVmCluster', - 'metadataReturnType' => '\Google\Cloud\OracleDatabase\V1\OperationMetadata', - 'initialPollDelayMillis' => '60000', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '600000', - 'totalPollTimeoutMillis' => '432000000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteAutonomousDatabase' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\OracleDatabase\V1\OperationMetadata', - 'initialPollDelayMillis' => '60000', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '600000', - 'totalPollTimeoutMillis' => '432000000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteCloudExadataInfrastructure' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\OracleDatabase\V1\OperationMetadata', - 'initialPollDelayMillis' => '60000', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '600000', - 'totalPollTimeoutMillis' => '432000000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteCloudVmCluster' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\OracleDatabase\V1\OperationMetadata', - 'initialPollDelayMillis' => '60000', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '600000', - 'totalPollTimeoutMillis' => '432000000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'RestoreAutonomousDatabase' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\OracleDatabase\V1\AutonomousDatabase', - 'metadataReturnType' => '\Google\Cloud\OracleDatabase\V1\OperationMetadata', - 'initialPollDelayMillis' => '60000', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '600000', - 'totalPollTimeoutMillis' => '432000000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GenerateAutonomousDatabaseWallet' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\OracleDatabase\V1\GenerateAutonomousDatabaseWalletResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetAutonomousDatabase' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\OracleDatabase\V1\AutonomousDatabase', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetCloudExadataInfrastructure' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\OracleDatabase\V1\CloudExadataInfrastructure', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetCloudVmCluster' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\OracleDatabase\V1\CloudVmCluster', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListAutonomousDatabaseBackups' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getAutonomousDatabaseBackups', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\OracleDatabase\V1\ListAutonomousDatabaseBackupsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListAutonomousDatabaseCharacterSets' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getAutonomousDatabaseCharacterSets', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\OracleDatabase\V1\ListAutonomousDatabaseCharacterSetsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListAutonomousDatabases' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getAutonomousDatabases', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\OracleDatabase\V1\ListAutonomousDatabasesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListAutonomousDbVersions' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getAutonomousDbVersions', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\OracleDatabase\V1\ListAutonomousDbVersionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListCloudExadataInfrastructures' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getCloudExadataInfrastructures', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\OracleDatabase\V1\ListCloudExadataInfrastructuresResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListCloudVmClusters' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getCloudVmClusters', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\OracleDatabase\V1\ListCloudVmClustersResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListDbNodes' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getDbNodes', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\OracleDatabase\V1\ListDbNodesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListDbServers' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getDbServers', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\OracleDatabase\V1\ListDbServersResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListDbSystemShapes' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getDbSystemShapes', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\OracleDatabase\V1\ListDbSystemShapesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListEntitlements' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getEntitlements', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\OracleDatabase\V1\ListEntitlementsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListGiVersions' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getGiVersions', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\OracleDatabase\V1\ListGiVersionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'GetLocation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Location\Location', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'ListLocations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLocations', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'templateMap' => [ - 'autonomousDatabase' => 'projects/{project}/locations/{location}/autonomousDatabases/{autonomous_database}', - 'cloudExadataInfrastructure' => 'projects/{project}/locations/{location}/cloudExadataInfrastructures/{cloud_exadata_infrastructure}', - 'cloudVmCluster' => 'projects/{project}/locations/{location}/cloudVmClusters/{cloud_vm_cluster}', - 'location' => 'projects/{project}/locations/{location}', - 'network' => 'projects/{project}/global/networks/{network}', - ], - ], - ], -]; diff --git a/owl-bot-staging/OracleDatabase/v1/src/V1/resources/oracle_database_rest_client_config.php b/owl-bot-staging/OracleDatabase/v1/src/V1/resources/oracle_database_rest_client_config.php deleted file mode 100644 index e0a3cf1977c9..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/src/V1/resources/oracle_database_rest_client_config.php +++ /dev/null @@ -1,356 +0,0 @@ - [ - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.cloud.oracledatabase.v1.OracleDatabase' => [ - 'CreateAutonomousDatabase' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/autonomousDatabases', - 'body' => 'autonomous_database', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'autonomous_database_id', - ], - ], - 'CreateCloudExadataInfrastructure' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/cloudExadataInfrastructures', - 'body' => 'cloud_exadata_infrastructure', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'cloud_exadata_infrastructure_id', - ], - ], - 'CreateCloudVmCluster' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/cloudVmClusters', - 'body' => 'cloud_vm_cluster', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'cloud_vm_cluster_id', - ], - ], - 'DeleteAutonomousDatabase' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/autonomousDatabases/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteCloudExadataInfrastructure' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/cloudExadataInfrastructures/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteCloudVmCluster' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/cloudVmClusters/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GenerateAutonomousDatabaseWallet' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/autonomousDatabases/*}:generateWallet', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetAutonomousDatabase' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/autonomousDatabases/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetCloudExadataInfrastructure' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/cloudExadataInfrastructures/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetCloudVmCluster' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/cloudVmClusters/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListAutonomousDatabaseBackups' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/autonomousDatabaseBackups', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListAutonomousDatabaseCharacterSets' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/autonomousDatabaseCharacterSets', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListAutonomousDatabases' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/autonomousDatabases', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListAutonomousDbVersions' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/autonomousDbVersions', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListCloudExadataInfrastructures' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/cloudExadataInfrastructures', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListCloudVmClusters' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/cloudVmClusters', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListDbNodes' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/cloudVmClusters/*}/dbNodes', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListDbServers' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/cloudExadataInfrastructures/*}/dbServers', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListDbSystemShapes' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/dbSystemShapes', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListEntitlements' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/entitlements', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListGiVersions' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/giVersions', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'RestoreAutonomousDatabase' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/autonomousDatabases/*}:restore', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/OracleDatabase/v1/tests/Unit/V1/Client/OracleDatabaseClientTest.php b/owl-bot-staging/OracleDatabase/v1/tests/Unit/V1/Client/OracleDatabaseClientTest.php deleted file mode 100644 index 2292ebf9d836..000000000000 --- a/owl-bot-staging/OracleDatabase/v1/tests/Unit/V1/Client/OracleDatabaseClientTest.php +++ /dev/null @@ -1,2376 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return OracleDatabaseClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new OracleDatabaseClient($options); - } - - /** @test */ - public function createAutonomousDatabaseTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createAutonomousDatabaseTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $database = 'database1789464955'; - $displayName = 'displayName1615086568'; - $entitlementId = 'entitlementId-1715775123'; - $adminPassword = 'adminPassword1579561355'; - $network = 'network1843485230'; - $cidr = 'cidr3053428'; - $expectedResponse = new AutonomousDatabase(); - $expectedResponse->setName($name); - $expectedResponse->setDatabase($database); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setEntitlementId($entitlementId); - $expectedResponse->setAdminPassword($adminPassword); - $expectedResponse->setNetwork($network); - $expectedResponse->setCidr($cidr); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createAutonomousDatabaseTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $autonomousDatabaseId = 'autonomousDatabaseId-1188134896'; - $autonomousDatabase = new AutonomousDatabase(); - $autonomousDatabaseNetwork = $gapicClient->networkName('[PROJECT]', '[NETWORK]'); - $autonomousDatabase->setNetwork($autonomousDatabaseNetwork); - $autonomousDatabaseCidr = 'autonomousDatabaseCidr-1677675745'; - $autonomousDatabase->setCidr($autonomousDatabaseCidr); - $request = (new CreateAutonomousDatabaseRequest()) - ->setParent($formattedParent) - ->setAutonomousDatabaseId($autonomousDatabaseId) - ->setAutonomousDatabase($autonomousDatabase); - $response = $gapicClient->createAutonomousDatabase($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.oracledatabase.v1.OracleDatabase/CreateAutonomousDatabase', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getAutonomousDatabaseId(); - $this->assertProtobufEquals($autonomousDatabaseId, $actualValue); - $actualValue = $actualApiRequestObject->getAutonomousDatabase(); - $this->assertProtobufEquals($autonomousDatabase, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createAutonomousDatabaseTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createAutonomousDatabaseExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createAutonomousDatabaseTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $autonomousDatabaseId = 'autonomousDatabaseId-1188134896'; - $autonomousDatabase = new AutonomousDatabase(); - $autonomousDatabaseNetwork = $gapicClient->networkName('[PROJECT]', '[NETWORK]'); - $autonomousDatabase->setNetwork($autonomousDatabaseNetwork); - $autonomousDatabaseCidr = 'autonomousDatabaseCidr-1677675745'; - $autonomousDatabase->setCidr($autonomousDatabaseCidr); - $request = (new CreateAutonomousDatabaseRequest()) - ->setParent($formattedParent) - ->setAutonomousDatabaseId($autonomousDatabaseId) - ->setAutonomousDatabase($autonomousDatabase); - $response = $gapicClient->createAutonomousDatabase($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createAutonomousDatabaseTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createCloudExadataInfrastructureTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createCloudExadataInfrastructureTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $gcpOracleZone = 'gcpOracleZone1763347746'; - $entitlementId = 'entitlementId-1715775123'; - $expectedResponse = new CloudExadataInfrastructure(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setGcpOracleZone($gcpOracleZone); - $expectedResponse->setEntitlementId($entitlementId); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createCloudExadataInfrastructureTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $cloudExadataInfrastructureId = 'cloudExadataInfrastructureId642023910'; - $cloudExadataInfrastructure = new CloudExadataInfrastructure(); - $request = (new CreateCloudExadataInfrastructureRequest()) - ->setParent($formattedParent) - ->setCloudExadataInfrastructureId($cloudExadataInfrastructureId) - ->setCloudExadataInfrastructure($cloudExadataInfrastructure); - $response = $gapicClient->createCloudExadataInfrastructure($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.oracledatabase.v1.OracleDatabase/CreateCloudExadataInfrastructure', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getCloudExadataInfrastructureId(); - $this->assertProtobufEquals($cloudExadataInfrastructureId, $actualValue); - $actualValue = $actualApiRequestObject->getCloudExadataInfrastructure(); - $this->assertProtobufEquals($cloudExadataInfrastructure, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createCloudExadataInfrastructureTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createCloudExadataInfrastructureExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createCloudExadataInfrastructureTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $cloudExadataInfrastructureId = 'cloudExadataInfrastructureId642023910'; - $cloudExadataInfrastructure = new CloudExadataInfrastructure(); - $request = (new CreateCloudExadataInfrastructureRequest()) - ->setParent($formattedParent) - ->setCloudExadataInfrastructureId($cloudExadataInfrastructureId) - ->setCloudExadataInfrastructure($cloudExadataInfrastructure); - $response = $gapicClient->createCloudExadataInfrastructure($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createCloudExadataInfrastructureTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createCloudVmClusterTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createCloudVmClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $exadataInfrastructure = 'exadataInfrastructure94104074'; - $displayName = 'displayName1615086568'; - $gcpOracleZone = 'gcpOracleZone1763347746'; - $cidr = 'cidr3053428'; - $backupSubnetCidr = 'backupSubnetCidr-1604198375'; - $network = 'network1843485230'; - $expectedResponse = new CloudVmCluster(); - $expectedResponse->setName($name); - $expectedResponse->setExadataInfrastructure($exadataInfrastructure); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setGcpOracleZone($gcpOracleZone); - $expectedResponse->setCidr($cidr); - $expectedResponse->setBackupSubnetCidr($backupSubnetCidr); - $expectedResponse->setNetwork($network); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createCloudVmClusterTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $cloudVmClusterId = 'cloudVmClusterId-117615746'; - $cloudVmCluster = new CloudVmCluster(); - $cloudVmClusterExadataInfrastructure = $gapicClient->cloudExadataInfrastructureName('[PROJECT]', '[LOCATION]', '[CLOUD_EXADATA_INFRASTRUCTURE]'); - $cloudVmCluster->setExadataInfrastructure($cloudVmClusterExadataInfrastructure); - $cloudVmClusterCidr = 'cloudVmClusterCidr-1405325022'; - $cloudVmCluster->setCidr($cloudVmClusterCidr); - $cloudVmClusterBackupSubnetCidr = 'cloudVmClusterBackupSubnetCidr1861461121'; - $cloudVmCluster->setBackupSubnetCidr($cloudVmClusterBackupSubnetCidr); - $cloudVmClusterNetwork = $gapicClient->networkName('[PROJECT]', '[NETWORK]'); - $cloudVmCluster->setNetwork($cloudVmClusterNetwork); - $request = (new CreateCloudVmClusterRequest()) - ->setParent($formattedParent) - ->setCloudVmClusterId($cloudVmClusterId) - ->setCloudVmCluster($cloudVmCluster); - $response = $gapicClient->createCloudVmCluster($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.oracledatabase.v1.OracleDatabase/CreateCloudVmCluster', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getCloudVmClusterId(); - $this->assertProtobufEquals($cloudVmClusterId, $actualValue); - $actualValue = $actualApiRequestObject->getCloudVmCluster(); - $this->assertProtobufEquals($cloudVmCluster, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createCloudVmClusterTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createCloudVmClusterExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createCloudVmClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $cloudVmClusterId = 'cloudVmClusterId-117615746'; - $cloudVmCluster = new CloudVmCluster(); - $cloudVmClusterExadataInfrastructure = $gapicClient->cloudExadataInfrastructureName('[PROJECT]', '[LOCATION]', '[CLOUD_EXADATA_INFRASTRUCTURE]'); - $cloudVmCluster->setExadataInfrastructure($cloudVmClusterExadataInfrastructure); - $cloudVmClusterCidr = 'cloudVmClusterCidr-1405325022'; - $cloudVmCluster->setCidr($cloudVmClusterCidr); - $cloudVmClusterBackupSubnetCidr = 'cloudVmClusterBackupSubnetCidr1861461121'; - $cloudVmCluster->setBackupSubnetCidr($cloudVmClusterBackupSubnetCidr); - $cloudVmClusterNetwork = $gapicClient->networkName('[PROJECT]', '[NETWORK]'); - $cloudVmCluster->setNetwork($cloudVmClusterNetwork); - $request = (new CreateCloudVmClusterRequest()) - ->setParent($formattedParent) - ->setCloudVmClusterId($cloudVmClusterId) - ->setCloudVmCluster($cloudVmCluster); - $response = $gapicClient->createCloudVmCluster($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createCloudVmClusterTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteAutonomousDatabaseTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteAutonomousDatabaseTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteAutonomousDatabaseTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->autonomousDatabaseName('[PROJECT]', '[LOCATION]', '[AUTONOMOUS_DATABASE]'); - $request = (new DeleteAutonomousDatabaseRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteAutonomousDatabase($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.oracledatabase.v1.OracleDatabase/DeleteAutonomousDatabase', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteAutonomousDatabaseTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteAutonomousDatabaseExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteAutonomousDatabaseTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->autonomousDatabaseName('[PROJECT]', '[LOCATION]', '[AUTONOMOUS_DATABASE]'); - $request = (new DeleteAutonomousDatabaseRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteAutonomousDatabase($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteAutonomousDatabaseTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteCloudExadataInfrastructureTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteCloudExadataInfrastructureTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteCloudExadataInfrastructureTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->cloudExadataInfrastructureName('[PROJECT]', '[LOCATION]', '[CLOUD_EXADATA_INFRASTRUCTURE]'); - $request = (new DeleteCloudExadataInfrastructureRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteCloudExadataInfrastructure($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.oracledatabase.v1.OracleDatabase/DeleteCloudExadataInfrastructure', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteCloudExadataInfrastructureTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteCloudExadataInfrastructureExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteCloudExadataInfrastructureTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->cloudExadataInfrastructureName('[PROJECT]', '[LOCATION]', '[CLOUD_EXADATA_INFRASTRUCTURE]'); - $request = (new DeleteCloudExadataInfrastructureRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteCloudExadataInfrastructure($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteCloudExadataInfrastructureTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteCloudVmClusterTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteCloudVmClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteCloudVmClusterTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->cloudVmClusterName('[PROJECT]', '[LOCATION]', '[CLOUD_VM_CLUSTER]'); - $request = (new DeleteCloudVmClusterRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteCloudVmCluster($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.oracledatabase.v1.OracleDatabase/DeleteCloudVmCluster', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteCloudVmClusterTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteCloudVmClusterExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteCloudVmClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->cloudVmClusterName('[PROJECT]', '[LOCATION]', '[CLOUD_VM_CLUSTER]'); - $request = (new DeleteCloudVmClusterRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteCloudVmCluster($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteCloudVmClusterTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function generateAutonomousDatabaseWalletTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $archiveContent = '-4'; - $expectedResponse = new GenerateAutonomousDatabaseWalletResponse(); - $expectedResponse->setArchiveContent($archiveContent); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->autonomousDatabaseName('[PROJECT]', '[LOCATION]', '[AUTONOMOUS_DATABASE]'); - $password = 'password1216985755'; - $request = (new GenerateAutonomousDatabaseWalletRequest()) - ->setName($formattedName) - ->setPassword($password); - $response = $gapicClient->generateAutonomousDatabaseWallet($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.oracledatabase.v1.OracleDatabase/GenerateAutonomousDatabaseWallet', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getPassword(); - $this->assertProtobufEquals($password, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function generateAutonomousDatabaseWalletExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->autonomousDatabaseName('[PROJECT]', '[LOCATION]', '[AUTONOMOUS_DATABASE]'); - $password = 'password1216985755'; - $request = (new GenerateAutonomousDatabaseWalletRequest()) - ->setName($formattedName) - ->setPassword($password); - try { - $gapicClient->generateAutonomousDatabaseWallet($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAutonomousDatabaseTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $database = 'database1789464955'; - $displayName = 'displayName1615086568'; - $entitlementId = 'entitlementId-1715775123'; - $adminPassword = 'adminPassword1579561355'; - $network = 'network1843485230'; - $cidr = 'cidr3053428'; - $expectedResponse = new AutonomousDatabase(); - $expectedResponse->setName($name2); - $expectedResponse->setDatabase($database); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setEntitlementId($entitlementId); - $expectedResponse->setAdminPassword($adminPassword); - $expectedResponse->setNetwork($network); - $expectedResponse->setCidr($cidr); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->autonomousDatabaseName('[PROJECT]', '[LOCATION]', '[AUTONOMOUS_DATABASE]'); - $request = (new GetAutonomousDatabaseRequest()) - ->setName($formattedName); - $response = $gapicClient->getAutonomousDatabase($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.oracledatabase.v1.OracleDatabase/GetAutonomousDatabase', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAutonomousDatabaseExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->autonomousDatabaseName('[PROJECT]', '[LOCATION]', '[AUTONOMOUS_DATABASE]'); - $request = (new GetAutonomousDatabaseRequest()) - ->setName($formattedName); - try { - $gapicClient->getAutonomousDatabase($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getCloudExadataInfrastructureTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $gcpOracleZone = 'gcpOracleZone1763347746'; - $entitlementId = 'entitlementId-1715775123'; - $expectedResponse = new CloudExadataInfrastructure(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setGcpOracleZone($gcpOracleZone); - $expectedResponse->setEntitlementId($entitlementId); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->cloudExadataInfrastructureName('[PROJECT]', '[LOCATION]', '[CLOUD_EXADATA_INFRASTRUCTURE]'); - $request = (new GetCloudExadataInfrastructureRequest()) - ->setName($formattedName); - $response = $gapicClient->getCloudExadataInfrastructure($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.oracledatabase.v1.OracleDatabase/GetCloudExadataInfrastructure', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getCloudExadataInfrastructureExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->cloudExadataInfrastructureName('[PROJECT]', '[LOCATION]', '[CLOUD_EXADATA_INFRASTRUCTURE]'); - $request = (new GetCloudExadataInfrastructureRequest()) - ->setName($formattedName); - try { - $gapicClient->getCloudExadataInfrastructure($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getCloudVmClusterTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $exadataInfrastructure = 'exadataInfrastructure94104074'; - $displayName = 'displayName1615086568'; - $gcpOracleZone = 'gcpOracleZone1763347746'; - $cidr = 'cidr3053428'; - $backupSubnetCidr = 'backupSubnetCidr-1604198375'; - $network = 'network1843485230'; - $expectedResponse = new CloudVmCluster(); - $expectedResponse->setName($name2); - $expectedResponse->setExadataInfrastructure($exadataInfrastructure); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setGcpOracleZone($gcpOracleZone); - $expectedResponse->setCidr($cidr); - $expectedResponse->setBackupSubnetCidr($backupSubnetCidr); - $expectedResponse->setNetwork($network); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->cloudVmClusterName('[PROJECT]', '[LOCATION]', '[CLOUD_VM_CLUSTER]'); - $request = (new GetCloudVmClusterRequest()) - ->setName($formattedName); - $response = $gapicClient->getCloudVmCluster($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.oracledatabase.v1.OracleDatabase/GetCloudVmCluster', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getCloudVmClusterExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->cloudVmClusterName('[PROJECT]', '[LOCATION]', '[CLOUD_VM_CLUSTER]'); - $request = (new GetCloudVmClusterRequest()) - ->setName($formattedName); - try { - $gapicClient->getCloudVmCluster($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAutonomousDatabaseBackupsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $autonomousDatabaseBackupsElement = new AutonomousDatabaseBackup(); - $autonomousDatabaseBackups = [ - $autonomousDatabaseBackupsElement, - ]; - $expectedResponse = new ListAutonomousDatabaseBackupsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setAutonomousDatabaseBackups($autonomousDatabaseBackups); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListAutonomousDatabaseBackupsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listAutonomousDatabaseBackups($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getAutonomousDatabaseBackups()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.oracledatabase.v1.OracleDatabase/ListAutonomousDatabaseBackups', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAutonomousDatabaseBackupsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListAutonomousDatabaseBackupsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listAutonomousDatabaseBackups($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAutonomousDatabaseCharacterSetsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $autonomousDatabaseCharacterSetsElement = new AutonomousDatabaseCharacterSet(); - $autonomousDatabaseCharacterSets = [ - $autonomousDatabaseCharacterSetsElement, - ]; - $expectedResponse = new ListAutonomousDatabaseCharacterSetsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setAutonomousDatabaseCharacterSets($autonomousDatabaseCharacterSets); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListAutonomousDatabaseCharacterSetsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listAutonomousDatabaseCharacterSets($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getAutonomousDatabaseCharacterSets()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.oracledatabase.v1.OracleDatabase/ListAutonomousDatabaseCharacterSets', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAutonomousDatabaseCharacterSetsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListAutonomousDatabaseCharacterSetsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listAutonomousDatabaseCharacterSets($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAutonomousDatabasesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $autonomousDatabasesElement = new AutonomousDatabase(); - $autonomousDatabases = [ - $autonomousDatabasesElement, - ]; - $expectedResponse = new ListAutonomousDatabasesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setAutonomousDatabases($autonomousDatabases); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListAutonomousDatabasesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listAutonomousDatabases($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getAutonomousDatabases()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.oracledatabase.v1.OracleDatabase/ListAutonomousDatabases', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAutonomousDatabasesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListAutonomousDatabasesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listAutonomousDatabases($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAutonomousDbVersionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $autonomousDbVersionsElement = new AutonomousDbVersion(); - $autonomousDbVersions = [ - $autonomousDbVersionsElement, - ]; - $expectedResponse = new ListAutonomousDbVersionsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setAutonomousDbVersions($autonomousDbVersions); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListAutonomousDbVersionsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listAutonomousDbVersions($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getAutonomousDbVersions()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.oracledatabase.v1.OracleDatabase/ListAutonomousDbVersions', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAutonomousDbVersionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListAutonomousDbVersionsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listAutonomousDbVersions($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listCloudExadataInfrastructuresTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $cloudExadataInfrastructuresElement = new CloudExadataInfrastructure(); - $cloudExadataInfrastructures = [ - $cloudExadataInfrastructuresElement, - ]; - $expectedResponse = new ListCloudExadataInfrastructuresResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setCloudExadataInfrastructures($cloudExadataInfrastructures); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListCloudExadataInfrastructuresRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listCloudExadataInfrastructures($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getCloudExadataInfrastructures()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.oracledatabase.v1.OracleDatabase/ListCloudExadataInfrastructures', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listCloudExadataInfrastructuresExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListCloudExadataInfrastructuresRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listCloudExadataInfrastructures($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listCloudVmClustersTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $cloudVmClustersElement = new CloudVmCluster(); - $cloudVmClusters = [ - $cloudVmClustersElement, - ]; - $expectedResponse = new ListCloudVmClustersResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setCloudVmClusters($cloudVmClusters); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListCloudVmClustersRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listCloudVmClusters($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getCloudVmClusters()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.oracledatabase.v1.OracleDatabase/ListCloudVmClusters', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listCloudVmClustersExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListCloudVmClustersRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listCloudVmClusters($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDbNodesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $dbNodesElement = new DbNode(); - $dbNodes = [ - $dbNodesElement, - ]; - $expectedResponse = new ListDbNodesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setDbNodes($dbNodes); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->cloudVmClusterName('[PROJECT]', '[LOCATION]', '[CLOUD_VM_CLUSTER]'); - $request = (new ListDbNodesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listDbNodes($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getDbNodes()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.oracledatabase.v1.OracleDatabase/ListDbNodes', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDbNodesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->cloudVmClusterName('[PROJECT]', '[LOCATION]', '[CLOUD_VM_CLUSTER]'); - $request = (new ListDbNodesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listDbNodes($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDbServersTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $dbServersElement = new DbServer(); - $dbServers = [ - $dbServersElement, - ]; - $expectedResponse = new ListDbServersResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setDbServers($dbServers); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->cloudExadataInfrastructureName('[PROJECT]', '[LOCATION]', '[CLOUD_EXADATA_INFRASTRUCTURE]'); - $request = (new ListDbServersRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listDbServers($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getDbServers()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.oracledatabase.v1.OracleDatabase/ListDbServers', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDbServersExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->cloudExadataInfrastructureName('[PROJECT]', '[LOCATION]', '[CLOUD_EXADATA_INFRASTRUCTURE]'); - $request = (new ListDbServersRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listDbServers($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDbSystemShapesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $dbSystemShapesElement = new DbSystemShape(); - $dbSystemShapes = [ - $dbSystemShapesElement, - ]; - $expectedResponse = new ListDbSystemShapesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setDbSystemShapes($dbSystemShapes); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListDbSystemShapesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listDbSystemShapes($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getDbSystemShapes()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.oracledatabase.v1.OracleDatabase/ListDbSystemShapes', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDbSystemShapesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListDbSystemShapesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listDbSystemShapes($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listEntitlementsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $entitlementsElement = new Entitlement(); - $entitlements = [ - $entitlementsElement, - ]; - $expectedResponse = new ListEntitlementsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setEntitlements($entitlements); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListEntitlementsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listEntitlements($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getEntitlements()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.oracledatabase.v1.OracleDatabase/ListEntitlements', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listEntitlementsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListEntitlementsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listEntitlements($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listGiVersionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $giVersionsElement = new GiVersion(); - $giVersions = [ - $giVersionsElement, - ]; - $expectedResponse = new ListGiVersionsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setGiVersions($giVersions); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListGiVersionsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listGiVersions($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getGiVersions()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.oracledatabase.v1.OracleDatabase/ListGiVersions', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listGiVersionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListGiVersionsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listGiVersions($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function restoreAutonomousDatabaseTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/restoreAutonomousDatabaseTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $database = 'database1789464955'; - $displayName = 'displayName1615086568'; - $entitlementId = 'entitlementId-1715775123'; - $adminPassword = 'adminPassword1579561355'; - $network = 'network1843485230'; - $cidr = 'cidr3053428'; - $expectedResponse = new AutonomousDatabase(); - $expectedResponse->setName($name2); - $expectedResponse->setDatabase($database); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setEntitlementId($entitlementId); - $expectedResponse->setAdminPassword($adminPassword); - $expectedResponse->setNetwork($network); - $expectedResponse->setCidr($cidr); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/restoreAutonomousDatabaseTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->autonomousDatabaseName('[PROJECT]', '[LOCATION]', '[AUTONOMOUS_DATABASE]'); - $restoreTime = new Timestamp(); - $request = (new RestoreAutonomousDatabaseRequest()) - ->setName($formattedName) - ->setRestoreTime($restoreTime); - $response = $gapicClient->restoreAutonomousDatabase($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.oracledatabase.v1.OracleDatabase/RestoreAutonomousDatabase', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualApiRequestObject->getRestoreTime(); - $this->assertProtobufEquals($restoreTime, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/restoreAutonomousDatabaseTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function restoreAutonomousDatabaseExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/restoreAutonomousDatabaseTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->autonomousDatabaseName('[PROJECT]', '[LOCATION]', '[AUTONOMOUS_DATABASE]'); - $restoreTime = new Timestamp(); - $request = (new RestoreAutonomousDatabaseRequest()) - ->setName($formattedName) - ->setRestoreTime($restoreTime); - $response = $gapicClient->restoreAutonomousDatabase($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/restoreAutonomousDatabaseTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getLocationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $locationId = 'locationId552319461'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Location(); - $expectedResponse->setName($name2); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - $request = new GetLocationRequest(); - $response = $gapicClient->getLocation($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new GetLocationRequest(); - try { - $gapicClient->getLocation($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $locationsElement = new Location(); - $locations = [ - $locationsElement, - ]; - $expectedResponse = new ListLocationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLocations($locations); - $transport->addResponse($expectedResponse); - $request = new ListLocationsRequest(); - $response = $gapicClient->listLocations($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new ListLocationsRequest(); - try { - $gapicClient->listLocations($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createAutonomousDatabaseAsyncTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createAutonomousDatabaseTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $database = 'database1789464955'; - $displayName = 'displayName1615086568'; - $entitlementId = 'entitlementId-1715775123'; - $adminPassword = 'adminPassword1579561355'; - $network = 'network1843485230'; - $cidr = 'cidr3053428'; - $expectedResponse = new AutonomousDatabase(); - $expectedResponse->setName($name); - $expectedResponse->setDatabase($database); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setEntitlementId($entitlementId); - $expectedResponse->setAdminPassword($adminPassword); - $expectedResponse->setNetwork($network); - $expectedResponse->setCidr($cidr); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createAutonomousDatabaseTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $autonomousDatabaseId = 'autonomousDatabaseId-1188134896'; - $autonomousDatabase = new AutonomousDatabase(); - $autonomousDatabaseNetwork = $gapicClient->networkName('[PROJECT]', '[NETWORK]'); - $autonomousDatabase->setNetwork($autonomousDatabaseNetwork); - $autonomousDatabaseCidr = 'autonomousDatabaseCidr-1677675745'; - $autonomousDatabase->setCidr($autonomousDatabaseCidr); - $request = (new CreateAutonomousDatabaseRequest()) - ->setParent($formattedParent) - ->setAutonomousDatabaseId($autonomousDatabaseId) - ->setAutonomousDatabase($autonomousDatabase); - $response = $gapicClient->createAutonomousDatabaseAsync($request)->wait(); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.oracledatabase.v1.OracleDatabase/CreateAutonomousDatabase', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getAutonomousDatabaseId(); - $this->assertProtobufEquals($autonomousDatabaseId, $actualValue); - $actualValue = $actualApiRequestObject->getAutonomousDatabase(); - $this->assertProtobufEquals($autonomousDatabase, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createAutonomousDatabaseTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } -} diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/GPBMetadata/Google/Cloud/Orchestration/Airflow/Service/V1/Environments.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/GPBMetadata/Google/Cloud/Orchestration/Airflow/Service/V1/Environments.php deleted file mode 100644 index 8a9a31b8e84af106526616bcbf86e22d9f5aa381..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 23403 zcmd5^-ESOOR^M*Nj(wascEw-mB$G}hGn36E?TrU^S+U<_h8@s!w+fF7k-mPtS zm+cz2yK1Vcop?faVPFv;1iP?EfDi}?2`y+J5JK<|poIk<*pU#7cBNSfkl6nKc;TG; zQC-zl?YL|QHcw8~t#j@@=XcIMANTeb-mtbTxRPGfTe@9y^+tMqFYRvWY0EZUvu-xi z>+OvV-A>od9m{Cyb|#%(D5Z;~m2`fguyPqcbiW#?tr@+wYuILMM{l`KhA{(Z)pm5ps@3)MVtIa9cWaHB zTU%RXbk}l3cdg{7yO!m2*Q%WE+WlLv0o0o{$4TdX^x+Al@t@URZyNQq8pmL z87;##YE9zsa4mneLBr)(%7q(iE_G~mNPAr=um8H zg_f(^ty*(!L3ir5VY#MV#-Vd_o4V@>oSt0!v|vl*jE(d)KF7Ja&?IlCUAwLOxu?^% z?zZjLYi!;`;Hmf5T7(?4ma&#?wM>$N*>dLQI&12X==EW)X`sU5eRIdqn~iyWtF~*H zcDzq3x&YUKCwVZGtd%T6d%X28nXOH`-D(-F%|m_f!2*?%-?7}igUiDEl*w|r=4>D0 z+Z6+?%dPEL(cdx@-+bK=n9VjC9z^e;;a~GWMG$)#e)OFLym?fUS8j3&8Rj%H0jH4> zP9r0nMrQX`YDzGySqAzUf+BYvsY|{W8-zD)T>wrDIOiK+3si|$uZvd)bX=wf9r67Y z@qM#{kD1V*^I{P5bm$vqbV7ijAYG^Tk}qKg^(;on^?4&)sZ2gVeFD=tTSo`(^LrKj z{WfY`8G!+-W}~pC6Y0dYA*BSvKJPo7#D~MPa~VFv1F9n99ALqz{-BTQcA*;5jYYw_*Ho<;H0bq|@b6ams_t8q!uP0zSOwzH?ujxt| zPWhJU;3WEvwoYXV&b0K$uI8Hu32#Wf2Ga|AQ;(E>PzHaBGhVfDUyD+d9Lk7xtBG`X zBsD2BFx+OWH9{5>;qYuq>Rm!B{)U9;_4Z5L%pGWx{?oGY8n=Ksmmr(u-Ay=k;`t<~OH*KM|n ze)Xdyq@t!Fmhok8*4*Zb5@QE*^O@eHGfOxZLJyaUrVEq}Dmo15j|~??x(!o6yK;PN z^GLdYlv6k01e*dv-!B$|e!s$?kNYQjS_TjtJt)6a(50~n*3AajZhr@s+>3lS0cq~U zS8>mKVA|VFv(|8`dL1J?X>+dyo%#GLpJbE&oqZ9mP=IdYcVf}FMLHRLHsf>4$_7ld zaftRv($*YCoK1Ilc0Q)SBBnXthx1X_;UaDb5wGPcvi^->{#CYyoA64nHAGNSe?3Jn2hO#Fu&p!txQ|%^y7{9(*PAUz?-pP>9K@A3Lat{a z0N~Fu0DlI^;3ADMpahSY`kM(*Lm2j6|3AU_Td2|q7<k4m4vztS0Vr% zn$__r=9l{5Y(Qt+38NGD1+;{gK}CZTRHk4X^ziJ`QE5!%sdf)J)LQqb)Fy3 zJduAs4b*IAp7?_6r!!=qT{{+%>#|zD**v{I9yNOQY{XOb57DQFEQHGm%|pZ+>o6I~ zNyhxg;8c6Z{=eS`ldJyKdytGm%X$DUrK6z5<8vgy{15^2uZg&xOW8ec%y_E_!=~;z z`={5Z0wC#pG|Ld+A<%oFejB}62teNJ4u%X!bz!K(R^sS*+*xlZ{cZxrX|CQfq^mvB z?in|ZQO?4^hS9{#jHgRHxcQrtFwr$PVSQULqx?xoY+jIIC=^$^*;$1 z4ULxBG*3%6;e@+qaaTDq`|!C;a0MAC77S4Jw(W>4)c9YWh-tpMc5k)${jC z3;Jm?JmDCbedoE&MQ2k{&cg^_yoR+#2P-%{5#lee!c+r``dCbCXkDXN3e85T7*URQ zuZ9WsB~Wvv<#MT-uV@cSm3vF2?1HxPu$%|Cvmn@zQ?6Y+(ui9#Hdewp!cOtF4;lY?)qO8ClCY2V;&Hr^zsYYgD}n<3TdQ z8(i61z+>tYd~dAC93C3u0273F5l+{IFn(eRC9l^f+EOt5jA zb*#`}gr?O^Ymdkbu)@wHy6(XGxIEMhOi}c9 z?$)>DfU-?>X4lZYOySLlid?J`f%;Xr)RTu$G1i4F+t{hud)j7Q*FKQtsv#u>3dVS5 zs}Xp|wf7=i#M;(|kb!3F7B=H*T5T7fkY2dz)T?kB3uHEGmT%Iu8?CqN+q$S;laolO zACAD7udv|_9p2p5wR*Gd(C)<@|0IkwYMVGyN3(2w!+6XAOhu#?mSRwiZLHUj1L{}a zg)@%1;XcA@IXtEIohQ zHkdOXQeJ>D`EY&DG#VPc8pml2(MNsCQ@D&R6!bA#t?h1^HXR_4rofDVfHTIVvK({T z*xW_BS&ytR1;;NWGy)slEZX0mRDr^n#WjM8pyDUKL&P0}x~mAG9jaEJWeSL!tcDeU z3A>=XjAXg|u^vhWjr#%B&3$$;!B!MEbtki~NK(FKQ3!U%HzNXolE(g4@qVFFDlX@X zD_XViPIu6ig2~W`>T-5z31cvf9z*YzG2mNW#=tDn7X`w+k=cC_1*((vsaN5e83>m%|of)mHm=vc@v zDz9RL)2-RAMooD(JgTkg9lsz_N#zy{V)KfBLeoFMC)jvEvv1qj%Ex}9mog>Qzd8vc z!H5I#cN!x!?4YBQa7e^Hso_}x>D}tQwBp6Qs0nJ4$4!re%rjYjEQ^c3gfn3AG%IOh z3+i+re8+VV$GFa=i(?rxg0e^mJU+OQbfSI?O^l=v%QJw6Zi5I=#0$9ZJKr|!n3_HC+#`<)NMGwA1gNim(~V0w>YAE09w%$T`wDADnZnJ-eoLZe&T zbkJmJYy-xb+T@%yi>Y*)rzzQ(1|7x*pZ#SR#~>fmX2J-@qVH>H?dW4Dn-DO$2IuRd zf+}NEt>(J8mC~VGmKBHvWZ<$lQl9@qxrIjx+}S9nPe!^v`` zaGwf)R6;CZASft|Ce^R^!*s8-oQWzVcCQxTmplozYvg*{Xf_VD{r?CvRa1$s&rr>kuW$s8#j{=v0=o5JWz11ZESApw&=DU zU2rRsUXYUsr>P8zZCfhT;ZaClf2_u|fP89Eml>I?WL*AchCWmRlJY@-~pN1jtKNKEg&}=np{@Mt&QaTf2Mm(gx ziUCmXWHegd>Yoh2u&+oLb%16S1_FUd+_JWhJceu-&~Qy+4Bu|!nQ|6x;L&^0HYW^^ z%pQS9hPQd~=skl6mawQs#C>o0=)G4X@}1RZ9}wpDtq@`BY5?14degx&0~I>%#KeP7 zE}11ph}Ac^bg-J_AhsR6mx5ii4=B|UF-jj*n*8q!)-YlA)2BS7;{dFgCnFJ_1$`mr zaL%H!CWPuUE#4fw$&@EMb=hNVtO~YT3+C< z`sjZPc)EZMJke>n_s=zdoHY)13VZ(OXQ$MAa5lH4*SA+KEblaQ*;2;3s@`b>vVE4t zg;bF4DhPIRE%m?p@W@4gn&|Z6M=U=;=eNmvAYK)*Px%^_u&^_ST_S`8HRQ2XfW5NrKpKe(zQV}aT{(oT|z(~RxBZ*tRli$(jUJF8aZ*QSuOZzGowm<4kjXBJQK!cmT3A!Arj3yONHDD zbq7|LR=SSE5VA`}HUNuIn06LRlvwfyN%hx~a5kc8qG0HASyqYhnhv{)8*b9@eL8Ls zDe8dohOgJJ;l(e%TQ(u(;$0=epA+WJQ_;AdZUqT0Aw7?+k0FU;s>cAO4X30xV{I{F zAOB2M59%5DT=+V#aH@U)XCvNWHmt5>tM{~}(qdJs;<=^lVr1*+3S7!9l~xyMAQmha zwQO-g<4?p_2#ZNjf`dxMrH5E|_)Ze89zYeZI8kt85iTtveSW2u)mwC;8Cz5E6zl;+pv4r^VT|98@I6-I2DTvz!r!MZO7Z$GpJqz(hN}8!iSK2L!I0{Wc-K5VTGCiQ&MN#e z=?&jT^WjJT_FKs})X&hx{wMtPZEusi?mJ9=J$Q(G&c9nJA7Pddyho}m$n~)@$TKep zXM&$gDIMi*>l+_u*^z&?#94(ek?t4vSYYsw{Pm~Ge_(l%&bRvX?tAW9U-(3xs;;YHMt$hbYLUJ_G81`8=S0ffVfr`i*wy0xbvqY-~gX zLH|1_wb0$+*is8oIH1&i52f}tObDNVCd+=fBEx>3Ksmar@LA6F*m6>EFP@0J5v<&c z=@ufXND;+7rPhO(Fr>E`EGp_U^MyVic|d!D@T?>^W2wx74ErKwK!-^n^(s7Bv3f=Q25&UNYP6w__ zC~;dcfv@Gl<8HKFM8ukxgS*J<$`_s;5p-{uGgNeE7oU}XNWv+9R;9!}4d(w?uJjrE z$iJXR#GjRzj~6Bd8F6VG*?%${DyR#GwV}E%r6=h8brR0;NOBc>sa_?Y-=Dhxz1$t6?O3tI3s#pLU87y@5d`2CSkJsPOy+$-0dTp z%yA0szCUCwC|ouN4_Tw{a$+R=+e!XwD-nuvl(>C$av)KJq#)wLu{S;8o8AukCMlPF zBixX0io%TYU9_u+3)6?RtDcmkWRAnGzJ+!b4RvNvyQwcRgQDezek>w$bSU*QvmfBk zn?zjlKBOdjQj(IKlmSmL@Ku8bbp6;22=}uK5pI*$pYX>Ll(>iQ_9G@2c|4a^)o&nT z($Sun3b4i|{TKrS&!&j_j$m1yM4Y+azx<&5I@(>gH}$@Zy`S}@bj*T$==aV`3XhNv zYf|2Fof&k{f0TstAwSp|qP!*Xe!yzVKD4Az;v#lmlEPEJ8}!stM#q9Dti+Dd` zQpCM{dC=UhAE&uddg8wW8#_Jme=OJWT+)*uqo0uU#PQuiru2lw>Ayl7Tb%xnpQ|{7 zjDAAINh!0uT}|TrK@vvgO&WRgICkB+o4^6Z`Uxh{zmkAE@sj8;v*Q%)vU>NhiF8BU zIF(`~@qQB_Mjt$9XGY=Nlxsq57T6ySdWThCM} diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/GPBMetadata/Google/Cloud/Orchestration/Airflow/Service/V1/ImageVersions.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/GPBMetadata/Google/Cloud/Orchestration/Airflow/Service/V1/ImageVersions.php deleted file mode 100644 index 6fc6f07f032c..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/GPBMetadata/Google/Cloud/Orchestration/Airflow/Service/V1/ImageVersions.php +++ /dev/null @@ -1,49 +0,0 @@ -internalAddGeneratedFile( - ' -» -Bgoogle/cloud/orchestration/airflow/service/v1/image_versions.proto-google.cloud.orchestration.airflow.service.v1google/api/client.protogoogle/type/date.proto"p -ListImageVersionsRequest -parent (  - page_size ( - -page_token (  -include_past_releases ("‰ -ListImageVersionsResponseS -image_versions ( 2;.google.cloud.orchestration.airflow.service.v1.ImageVersion -next_page_token ( "½ - ImageVersion -image_version_id (  - -is_default (! -supported_python_versions ( \' - release_date ( 2.google.type.Date -creation_disabled ( -upgrade_disabled (2É - ImageVersionsê -ListImageVersionsG.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequestH.google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse"BÚAparent‚Óä“31/v1/{parent=projects/*/locations/*}/imageVersionsKÊAcomposer.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformB‚ -1com.google.cloud.orchestration.airflow.service.v1PZKcloud.google.com/go/orchestration/airflow/service/apiv1/servicepb;servicepbbproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/GPBMetadata/Google/Cloud/Orchestration/Airflow/Service/V1/Operations.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/GPBMetadata/Google/Cloud/Orchestration/Airflow/Service/V1/Operations.php deleted file mode 100644 index 2c420a66cb0d18c2d1a4cd39b94e5fd9a5d640be..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1505 zcmbtU%}(1u5N;p|un6i{MT$6WDH1^fTcNj5sGQgd5ov5;2dR~-$Z^kI?t&uALZKkZ6TZv*Vd>{=S)a@1v^-yn!7QBI+?ThNBzEt`LkUVZUCWuk%-5C#!4CrfY6(vIP!c1J67`pV&2$ep4&-L-IhRg&HJdXmZ7?KhU#9{ zj{)!lFOH#^ql0e%@-Iq80rp|ccuXJe;&_Nd%&-^Wue|0HIProQarcL|lO*&-o=`ZL zp^s|&FvAqKyAk0%I)RHkEzvgKGPfHtL_;rdbrky)M~qO5n>HF##PVhfO>KW3R>0v2 ztYtYi8V`~@fs7{Tesl;aVhIh8)4T=1Z7#WwbTQA)!MxYZn?;SrU0HW1X;p`(cwU1x z9_J~yISFcc5D{_@{3?Uf=S^Qe%>0#KQReJX=Il|f>pMS-ppwsc!4-J`N}_qF zT7ZSx=22VuFHq$HpkfO&`7_we**au55vnew_{OvG9S$Z-V3ne5iK@#Scun2{8w<@a zN$|K@Ow}q__bK8T4H+L_wZxU{N85`e(k-s?XICqFXVNwVi|qC+wVvP@wgcD`{J=AZ-6y>&}tcm&JCC4O#srTZMO$K z{sy4j*1A3ZueiM=6?VQCKryZS6_A{d*57fsdF#U9@p%|7>qgJu@{*7TmM-+m@){_$ z&WzT%RFo@V!`3d1q21Rk`^c}pwYRcmUtF%-#|m&S#(()>{Xb$;0v zJ^VNJHDBgTiPMd;3ZKq1*9GCoOr4S^j-VG|eh25Ijz-71G%BaFe7l#g*+I7X_YQ^N RIrbkp5~*dj$+zGZfZtZo+D!le diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/AirflowMetadataRetentionPolicyConfig.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/AirflowMetadataRetentionPolicyConfig.php deleted file mode 100644 index b5e79403dcb3..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/AirflowMetadataRetentionPolicyConfig.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig - */ -class AirflowMetadataRetentionPolicyConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Retention can be either enabled or disabled. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig.RetentionMode retention_mode = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $retention_mode = 0; - /** - * Optional. How many days data should be retained for. - * - * Generated from protobuf field int32 retention_days = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $retention_days = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $retention_mode - * Optional. Retention can be either enabled or disabled. - * @type int $retention_days - * Optional. How many days data should be retained for. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Retention can be either enabled or disabled. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig.RetentionMode retention_mode = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getRetentionMode() - { - return $this->retention_mode; - } - - /** - * Optional. Retention can be either enabled or disabled. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig.RetentionMode retention_mode = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setRetentionMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Orchestration\Airflow\Service\V1\AirflowMetadataRetentionPolicyConfig\RetentionMode::class); - $this->retention_mode = $var; - - return $this; - } - - /** - * Optional. How many days data should be retained for. - * - * Generated from protobuf field int32 retention_days = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getRetentionDays() - { - return $this->retention_days; - } - - /** - * Optional. How many days data should be retained for. - * - * Generated from protobuf field int32 retention_days = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setRetentionDays($var) - { - GPBUtil::checkInt32($var); - $this->retention_days = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/AirflowMetadataRetentionPolicyConfig/RetentionMode.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/AirflowMetadataRetentionPolicyConfig/RetentionMode.php deleted file mode 100644 index 170ce188ab09..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/AirflowMetadataRetentionPolicyConfig/RetentionMode.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig.RetentionMode - */ -class RetentionMode -{ - /** - * Default mode doesn't change environment parameters. - * - * Generated from protobuf enum RETENTION_MODE_UNSPECIFIED = 0; - */ - const RETENTION_MODE_UNSPECIFIED = 0; - /** - * Retention policy is enabled. - * - * Generated from protobuf enum RETENTION_MODE_ENABLED = 1; - */ - const RETENTION_MODE_ENABLED = 1; - /** - * Retention policy is disabled. - * - * Generated from protobuf enum RETENTION_MODE_DISABLED = 2; - */ - const RETENTION_MODE_DISABLED = 2; - - private static $valueToName = [ - self::RETENTION_MODE_UNSPECIFIED => 'RETENTION_MODE_UNSPECIFIED', - self::RETENTION_MODE_ENABLED => 'RETENTION_MODE_ENABLED', - self::RETENTION_MODE_DISABLED => 'RETENTION_MODE_DISABLED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(RetentionMode::class, \Google\Cloud\Orchestration\Airflow\Service\V1\AirflowMetadataRetentionPolicyConfig_RetentionMode::class); - diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/CheckUpgradeRequest.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/CheckUpgradeRequest.php deleted file mode 100644 index bafe6650d072..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/CheckUpgradeRequest.php +++ /dev/null @@ -1,185 +0,0 @@ -google.cloud.orchestration.airflow.service.v1.CheckUpgradeRequest - */ -class CheckUpgradeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the environment to check upgrade for, in the - * form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * - * Generated from protobuf field string environment = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $environment = ''; - /** - * Optional. The version of the software running in the environment. - * This encapsulates both the version of Cloud Composer functionality and the - * version of Apache Airflow. It must match the regular expression - * `composer-([0-9]+(\.[0-9]+\.[0-9]+(-preview\.[0-9]+)?)?|latest)-airflow-([0-9]+(\.[0-9]+(\.[0-9]+)?)?)`. - * When used as input, the server also checks if the provided version is - * supported and denies the request for an unsupported version. - * The Cloud Composer portion of the image version is a full - * [semantic version](https://semver.org), or an alias in the form of major - * version number or `latest`. When an alias is provided, the server replaces - * it with the current Cloud Composer version that satisfies the alias. - * The Apache Airflow portion of the image version is a full semantic version - * that points to one of the supported Apache Airflow versions, or an alias in - * the form of only major or major.minor versions specified. When an alias is - * provided, the server replaces it with the latest Apache Airflow version - * that satisfies the alias and is supported in the given Cloud Composer - * version. - * In all cases, the resolved image version is stored in the same field. - * See also [version - * list](/composer/docs/concepts/versioning/composer-versions) and [versioning - * overview](/composer/docs/concepts/versioning/composer-versioning-overview). - * - * Generated from protobuf field string image_version = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $image_version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $environment - * Required. The resource name of the environment to check upgrade for, in the - * form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * @type string $image_version - * Optional. The version of the software running in the environment. - * This encapsulates both the version of Cloud Composer functionality and the - * version of Apache Airflow. It must match the regular expression - * `composer-([0-9]+(\.[0-9]+\.[0-9]+(-preview\.[0-9]+)?)?|latest)-airflow-([0-9]+(\.[0-9]+(\.[0-9]+)?)?)`. - * When used as input, the server also checks if the provided version is - * supported and denies the request for an unsupported version. - * The Cloud Composer portion of the image version is a full - * [semantic version](https://semver.org), or an alias in the form of major - * version number or `latest`. When an alias is provided, the server replaces - * it with the current Cloud Composer version that satisfies the alias. - * The Apache Airflow portion of the image version is a full semantic version - * that points to one of the supported Apache Airflow versions, or an alias in - * the form of only major or major.minor versions specified. When an alias is - * provided, the server replaces it with the latest Apache Airflow version - * that satisfies the alias and is supported in the given Cloud Composer - * version. - * In all cases, the resolved image version is stored in the same field. - * See also [version - * list](/composer/docs/concepts/versioning/composer-versions) and [versioning - * overview](/composer/docs/concepts/versioning/composer-versioning-overview). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the environment to check upgrade for, in the - * form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * - * Generated from protobuf field string environment = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getEnvironment() - { - return $this->environment; - } - - /** - * Required. The resource name of the environment to check upgrade for, in the - * form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * - * Generated from protobuf field string environment = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setEnvironment($var) - { - GPBUtil::checkString($var, True); - $this->environment = $var; - - return $this; - } - - /** - * Optional. The version of the software running in the environment. - * This encapsulates both the version of Cloud Composer functionality and the - * version of Apache Airflow. It must match the regular expression - * `composer-([0-9]+(\.[0-9]+\.[0-9]+(-preview\.[0-9]+)?)?|latest)-airflow-([0-9]+(\.[0-9]+(\.[0-9]+)?)?)`. - * When used as input, the server also checks if the provided version is - * supported and denies the request for an unsupported version. - * The Cloud Composer portion of the image version is a full - * [semantic version](https://semver.org), or an alias in the form of major - * version number or `latest`. When an alias is provided, the server replaces - * it with the current Cloud Composer version that satisfies the alias. - * The Apache Airflow portion of the image version is a full semantic version - * that points to one of the supported Apache Airflow versions, or an alias in - * the form of only major or major.minor versions specified. When an alias is - * provided, the server replaces it with the latest Apache Airflow version - * that satisfies the alias and is supported in the given Cloud Composer - * version. - * In all cases, the resolved image version is stored in the same field. - * See also [version - * list](/composer/docs/concepts/versioning/composer-versions) and [versioning - * overview](/composer/docs/concepts/versioning/composer-versioning-overview). - * - * Generated from protobuf field string image_version = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getImageVersion() - { - return $this->image_version; - } - - /** - * Optional. The version of the software running in the environment. - * This encapsulates both the version of Cloud Composer functionality and the - * version of Apache Airflow. It must match the regular expression - * `composer-([0-9]+(\.[0-9]+\.[0-9]+(-preview\.[0-9]+)?)?|latest)-airflow-([0-9]+(\.[0-9]+(\.[0-9]+)?)?)`. - * When used as input, the server also checks if the provided version is - * supported and denies the request for an unsupported version. - * The Cloud Composer portion of the image version is a full - * [semantic version](https://semver.org), or an alias in the form of major - * version number or `latest`. When an alias is provided, the server replaces - * it with the current Cloud Composer version that satisfies the alias. - * The Apache Airflow portion of the image version is a full semantic version - * that points to one of the supported Apache Airflow versions, or an alias in - * the form of only major or major.minor versions specified. When an alias is - * provided, the server replaces it with the latest Apache Airflow version - * that satisfies the alias and is supported in the given Cloud Composer - * version. - * In all cases, the resolved image version is stored in the same field. - * See also [version - * list](/composer/docs/concepts/versioning/composer-versions) and [versioning - * overview](/composer/docs/concepts/versioning/composer-versioning-overview). - * - * Generated from protobuf field string image_version = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setImageVersion($var) - { - GPBUtil::checkString($var, True); - $this->image_version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/CheckUpgradeResponse.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/CheckUpgradeResponse.php deleted file mode 100644 index e62502ad25a1..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/CheckUpgradeResponse.php +++ /dev/null @@ -1,212 +0,0 @@ -google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse - */ -class CheckUpgradeResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Url for a docker build log of an upgraded image. - * - * Generated from protobuf field string build_log_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $build_log_uri = ''; - /** - * Output only. Whether build has succeeded or failed on modules conflicts. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse.ConflictResult contains_pypi_modules_conflict = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $contains_pypi_modules_conflict = 0; - /** - * Output only. Extract from a docker image build log containing information - * about pypi modules conflicts. - * - * Generated from protobuf field string pypi_conflict_build_log_extract = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $pypi_conflict_build_log_extract = ''; - /** - * Composer image for which the build was happening. - * - * Generated from protobuf field string image_version = 5; - */ - protected $image_version = ''; - /** - * Pypi dependencies specified in the environment configuration, at the time - * when the build was triggered. - * - * Generated from protobuf field map pypi_dependencies = 6; - */ - private $pypi_dependencies; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $build_log_uri - * Output only. Url for a docker build log of an upgraded image. - * @type int $contains_pypi_modules_conflict - * Output only. Whether build has succeeded or failed on modules conflicts. - * @type string $pypi_conflict_build_log_extract - * Output only. Extract from a docker image build log containing information - * about pypi modules conflicts. - * @type string $image_version - * Composer image for which the build was happening. - * @type array|\Google\Protobuf\Internal\MapField $pypi_dependencies - * Pypi dependencies specified in the environment configuration, at the time - * when the build was triggered. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Url for a docker build log of an upgraded image. - * - * Generated from protobuf field string build_log_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getBuildLogUri() - { - return $this->build_log_uri; - } - - /** - * Output only. Url for a docker build log of an upgraded image. - * - * Generated from protobuf field string build_log_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setBuildLogUri($var) - { - GPBUtil::checkString($var, True); - $this->build_log_uri = $var; - - return $this; - } - - /** - * Output only. Whether build has succeeded or failed on modules conflicts. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse.ConflictResult contains_pypi_modules_conflict = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getContainsPypiModulesConflict() - { - return $this->contains_pypi_modules_conflict; - } - - /** - * Output only. Whether build has succeeded or failed on modules conflicts. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse.ConflictResult contains_pypi_modules_conflict = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setContainsPypiModulesConflict($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Orchestration\Airflow\Service\V1\CheckUpgradeResponse\ConflictResult::class); - $this->contains_pypi_modules_conflict = $var; - - return $this; - } - - /** - * Output only. Extract from a docker image build log containing information - * about pypi modules conflicts. - * - * Generated from protobuf field string pypi_conflict_build_log_extract = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getPypiConflictBuildLogExtract() - { - return $this->pypi_conflict_build_log_extract; - } - - /** - * Output only. Extract from a docker image build log containing information - * about pypi modules conflicts. - * - * Generated from protobuf field string pypi_conflict_build_log_extract = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setPypiConflictBuildLogExtract($var) - { - GPBUtil::checkString($var, True); - $this->pypi_conflict_build_log_extract = $var; - - return $this; - } - - /** - * Composer image for which the build was happening. - * - * Generated from protobuf field string image_version = 5; - * @return string - */ - public function getImageVersion() - { - return $this->image_version; - } - - /** - * Composer image for which the build was happening. - * - * Generated from protobuf field string image_version = 5; - * @param string $var - * @return $this - */ - public function setImageVersion($var) - { - GPBUtil::checkString($var, True); - $this->image_version = $var; - - return $this; - } - - /** - * Pypi dependencies specified in the environment configuration, at the time - * when the build was triggered. - * - * Generated from protobuf field map pypi_dependencies = 6; - * @return \Google\Protobuf\Internal\MapField - */ - public function getPypiDependencies() - { - return $this->pypi_dependencies; - } - - /** - * Pypi dependencies specified in the environment configuration, at the time - * when the build was triggered. - * - * Generated from protobuf field map pypi_dependencies = 6; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setPypiDependencies($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->pypi_dependencies = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/CheckUpgradeResponse/ConflictResult.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/CheckUpgradeResponse/ConflictResult.php deleted file mode 100644 index 967c0ca021fa..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/CheckUpgradeResponse/ConflictResult.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse.ConflictResult - */ -class ConflictResult -{ - /** - * It is unknown whether build had conflicts or not. - * - * Generated from protobuf enum CONFLICT_RESULT_UNSPECIFIED = 0; - */ - const CONFLICT_RESULT_UNSPECIFIED = 0; - /** - * There were python packages conflicts. - * - * Generated from protobuf enum CONFLICT = 1; - */ - const CONFLICT = 1; - /** - * There were no python packages conflicts. - * - * Generated from protobuf enum NO_CONFLICT = 2; - */ - const NO_CONFLICT = 2; - - private static $valueToName = [ - self::CONFLICT_RESULT_UNSPECIFIED => 'CONFLICT_RESULT_UNSPECIFIED', - self::CONFLICT => 'CONFLICT', - self::NO_CONFLICT => 'NO_CONFLICT', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ConflictResult::class, \Google\Cloud\Orchestration\Airflow\Service\V1\CheckUpgradeResponse_ConflictResult::class); - diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/CloudDataLineageIntegration.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/CloudDataLineageIntegration.php deleted file mode 100644 index 40148f22a1c0..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/CloudDataLineageIntegration.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.orchestration.airflow.service.v1.CloudDataLineageIntegration - */ -class CloudDataLineageIntegration extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Whether or not Cloud Data Lineage integration is enabled. - * - * Generated from protobuf field bool enabled = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $enabled = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $enabled - * Optional. Whether or not Cloud Data Lineage integration is enabled. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Whether or not Cloud Data Lineage integration is enabled. - * - * Generated from protobuf field bool enabled = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getEnabled() - { - return $this->enabled; - } - - /** - * Optional. Whether or not Cloud Data Lineage integration is enabled. - * - * Generated from protobuf field bool enabled = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setEnabled($var) - { - GPBUtil::checkBool($var); - $this->enabled = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/CreateEnvironmentRequest.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/CreateEnvironmentRequest.php deleted file mode 100644 index c18885d24d38..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/CreateEnvironmentRequest.php +++ /dev/null @@ -1,131 +0,0 @@ -google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest - */ -class CreateEnvironmentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The parent must be of the form - * "projects/{projectId}/locations/{locationId}". - * - * Generated from protobuf field string parent = 1; - */ - protected $parent = ''; - /** - * The environment to create. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.Environment environment = 2; - */ - protected $environment = null; - - /** - * @param string $parent The parent must be of the form - * "projects/{projectId}/locations/{locationId}". - * @param \Google\Cloud\Orchestration\Airflow\Service\V1\Environment $environment The environment to create. - * - * @return \Google\Cloud\Orchestration\Airflow\Service\V1\CreateEnvironmentRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Orchestration\Airflow\Service\V1\Environment $environment): self - { - return (new self()) - ->setParent($parent) - ->setEnvironment($environment); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * The parent must be of the form - * "projects/{projectId}/locations/{locationId}". - * @type \Google\Cloud\Orchestration\Airflow\Service\V1\Environment $environment - * The environment to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); - parent::__construct($data); - } - - /** - * The parent must be of the form - * "projects/{projectId}/locations/{locationId}". - * - * Generated from protobuf field string parent = 1; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * The parent must be of the form - * "projects/{projectId}/locations/{locationId}". - * - * Generated from protobuf field string parent = 1; - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * The environment to create. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.Environment environment = 2; - * @return \Google\Cloud\Orchestration\Airflow\Service\V1\Environment|null - */ - public function getEnvironment() - { - return $this->environment; - } - - public function hasEnvironment() - { - return isset($this->environment); - } - - public function clearEnvironment() - { - unset($this->environment); - } - - /** - * The environment to create. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.Environment environment = 2; - * @param \Google\Cloud\Orchestration\Airflow\Service\V1\Environment $var - * @return $this - */ - public function setEnvironment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Orchestration\Airflow\Service\V1\Environment::class); - $this->environment = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/CreateUserWorkloadsConfigMapRequest.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/CreateUserWorkloadsConfigMapRequest.php deleted file mode 100644 index 3c9d6d95fcba..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/CreateUserWorkloadsConfigMapRequest.php +++ /dev/null @@ -1,132 +0,0 @@ -google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsConfigMapRequest - */ -class CreateUserWorkloadsConfigMapRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The environment name to create a ConfigMap for, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. User workloads ConfigMap to create. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap user_workloads_config_map = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $user_workloads_config_map = null; - - /** - * @param string $parent Required. The environment name to create a ConfigMap for, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * Please see {@see EnvironmentsClient::environmentName()} for help formatting this field. - * @param \Google\Cloud\Orchestration\Airflow\Service\V1\UserWorkloadsConfigMap $userWorkloadsConfigMap Required. User workloads ConfigMap to create. - * - * @return \Google\Cloud\Orchestration\Airflow\Service\V1\CreateUserWorkloadsConfigMapRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Orchestration\Airflow\Service\V1\UserWorkloadsConfigMap $userWorkloadsConfigMap): self - { - return (new self()) - ->setParent($parent) - ->setUserWorkloadsConfigMap($userWorkloadsConfigMap); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The environment name to create a ConfigMap for, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * @type \Google\Cloud\Orchestration\Airflow\Service\V1\UserWorkloadsConfigMap $user_workloads_config_map - * Required. User workloads ConfigMap to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); - parent::__construct($data); - } - - /** - * Required. The environment name to create a ConfigMap for, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The environment name to create a ConfigMap for, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. User workloads ConfigMap to create. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap user_workloads_config_map = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Orchestration\Airflow\Service\V1\UserWorkloadsConfigMap|null - */ - public function getUserWorkloadsConfigMap() - { - return $this->user_workloads_config_map; - } - - public function hasUserWorkloadsConfigMap() - { - return isset($this->user_workloads_config_map); - } - - public function clearUserWorkloadsConfigMap() - { - unset($this->user_workloads_config_map); - } - - /** - * Required. User workloads ConfigMap to create. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap user_workloads_config_map = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Orchestration\Airflow\Service\V1\UserWorkloadsConfigMap $var - * @return $this - */ - public function setUserWorkloadsConfigMap($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Orchestration\Airflow\Service\V1\UserWorkloadsConfigMap::class); - $this->user_workloads_config_map = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/CreateUserWorkloadsSecretRequest.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/CreateUserWorkloadsSecretRequest.php deleted file mode 100644 index 483f8bb4f3c3..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/CreateUserWorkloadsSecretRequest.php +++ /dev/null @@ -1,132 +0,0 @@ -google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsSecretRequest - */ -class CreateUserWorkloadsSecretRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The environment name to create a Secret for, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. User workloads Secret to create. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret user_workloads_secret = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $user_workloads_secret = null; - - /** - * @param string $parent Required. The environment name to create a Secret for, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * Please see {@see EnvironmentsClient::environmentName()} for help formatting this field. - * @param \Google\Cloud\Orchestration\Airflow\Service\V1\UserWorkloadsSecret $userWorkloadsSecret Required. User workloads Secret to create. - * - * @return \Google\Cloud\Orchestration\Airflow\Service\V1\CreateUserWorkloadsSecretRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Orchestration\Airflow\Service\V1\UserWorkloadsSecret $userWorkloadsSecret): self - { - return (new self()) - ->setParent($parent) - ->setUserWorkloadsSecret($userWorkloadsSecret); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The environment name to create a Secret for, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * @type \Google\Cloud\Orchestration\Airflow\Service\V1\UserWorkloadsSecret $user_workloads_secret - * Required. User workloads Secret to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); - parent::__construct($data); - } - - /** - * Required. The environment name to create a Secret for, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The environment name to create a Secret for, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. User workloads Secret to create. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret user_workloads_secret = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Orchestration\Airflow\Service\V1\UserWorkloadsSecret|null - */ - public function getUserWorkloadsSecret() - { - return $this->user_workloads_secret; - } - - public function hasUserWorkloadsSecret() - { - return isset($this->user_workloads_secret); - } - - public function clearUserWorkloadsSecret() - { - unset($this->user_workloads_secret); - } - - /** - * Required. User workloads Secret to create. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret user_workloads_secret = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Orchestration\Airflow\Service\V1\UserWorkloadsSecret $var - * @return $this - */ - public function setUserWorkloadsSecret($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Orchestration\Airflow\Service\V1\UserWorkloadsSecret::class); - $this->user_workloads_secret = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/DataRetentionConfig.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/DataRetentionConfig.php deleted file mode 100644 index c5d884f8ebc9..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/DataRetentionConfig.php +++ /dev/null @@ -1,121 +0,0 @@ -google.cloud.orchestration.airflow.service.v1.DataRetentionConfig - */ -class DataRetentionConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The retention policy for airflow metadata database. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig airflow_metadata_retention_config = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $airflow_metadata_retention_config = null; - /** - * Optional. The configuration settings for task logs retention - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig task_logs_retention_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $task_logs_retention_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Orchestration\Airflow\Service\V1\AirflowMetadataRetentionPolicyConfig $airflow_metadata_retention_config - * Optional. The retention policy for airflow metadata database. - * @type \Google\Cloud\Orchestration\Airflow\Service\V1\TaskLogsRetentionConfig $task_logs_retention_config - * Optional. The configuration settings for task logs retention - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The retention policy for airflow metadata database. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig airflow_metadata_retention_config = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Orchestration\Airflow\Service\V1\AirflowMetadataRetentionPolicyConfig|null - */ - public function getAirflowMetadataRetentionConfig() - { - return $this->airflow_metadata_retention_config; - } - - public function hasAirflowMetadataRetentionConfig() - { - return isset($this->airflow_metadata_retention_config); - } - - public function clearAirflowMetadataRetentionConfig() - { - unset($this->airflow_metadata_retention_config); - } - - /** - * Optional. The retention policy for airflow metadata database. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig airflow_metadata_retention_config = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Orchestration\Airflow\Service\V1\AirflowMetadataRetentionPolicyConfig $var - * @return $this - */ - public function setAirflowMetadataRetentionConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Orchestration\Airflow\Service\V1\AirflowMetadataRetentionPolicyConfig::class); - $this->airflow_metadata_retention_config = $var; - - return $this; - } - - /** - * Optional. The configuration settings for task logs retention - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig task_logs_retention_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Orchestration\Airflow\Service\V1\TaskLogsRetentionConfig|null - */ - public function getTaskLogsRetentionConfig() - { - return $this->task_logs_retention_config; - } - - public function hasTaskLogsRetentionConfig() - { - return isset($this->task_logs_retention_config); - } - - public function clearTaskLogsRetentionConfig() - { - unset($this->task_logs_retention_config); - } - - /** - * Optional. The configuration settings for task logs retention - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig task_logs_retention_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Orchestration\Airflow\Service\V1\TaskLogsRetentionConfig $var - * @return $this - */ - public function setTaskLogsRetentionConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Orchestration\Airflow\Service\V1\TaskLogsRetentionConfig::class); - $this->task_logs_retention_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/DatabaseConfig.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/DatabaseConfig.php deleted file mode 100644 index bc15000dc1a5..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/DatabaseConfig.php +++ /dev/null @@ -1,134 +0,0 @@ -google.cloud.orchestration.airflow.service.v1.DatabaseConfig - */ -class DatabaseConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Cloud SQL machine type used by Airflow database. - * It has to be one of: db-n1-standard-2, db-n1-standard-4, db-n1-standard-8 - * or db-n1-standard-16. If not specified, db-n1-standard-2 will be used. - * Supported for Cloud Composer environments in versions - * composer-1.*.*-airflow-*.*.*. - * - * Generated from protobuf field string machine_type = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $machine_type = ''; - /** - * Optional. The Compute Engine zone where the Airflow database is created. If - * zone is provided, it must be in the region selected for the environment. If - * zone is not provided, a zone is automatically selected. The zone can only - * be set during environment creation. Supported for Cloud Composer - * environments in versions composer-2.*.*-airflow-*.*.*. - * - * Generated from protobuf field string zone = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $zone = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $machine_type - * Optional. Cloud SQL machine type used by Airflow database. - * It has to be one of: db-n1-standard-2, db-n1-standard-4, db-n1-standard-8 - * or db-n1-standard-16. If not specified, db-n1-standard-2 will be used. - * Supported for Cloud Composer environments in versions - * composer-1.*.*-airflow-*.*.*. - * @type string $zone - * Optional. The Compute Engine zone where the Airflow database is created. If - * zone is provided, it must be in the region selected for the environment. If - * zone is not provided, a zone is automatically selected. The zone can only - * be set during environment creation. Supported for Cloud Composer - * environments in versions composer-2.*.*-airflow-*.*.*. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Cloud SQL machine type used by Airflow database. - * It has to be one of: db-n1-standard-2, db-n1-standard-4, db-n1-standard-8 - * or db-n1-standard-16. If not specified, db-n1-standard-2 will be used. - * Supported for Cloud Composer environments in versions - * composer-1.*.*-airflow-*.*.*. - * - * Generated from protobuf field string machine_type = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getMachineType() - { - return $this->machine_type; - } - - /** - * Optional. Cloud SQL machine type used by Airflow database. - * It has to be one of: db-n1-standard-2, db-n1-standard-4, db-n1-standard-8 - * or db-n1-standard-16. If not specified, db-n1-standard-2 will be used. - * Supported for Cloud Composer environments in versions - * composer-1.*.*-airflow-*.*.*. - * - * Generated from protobuf field string machine_type = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setMachineType($var) - { - GPBUtil::checkString($var, True); - $this->machine_type = $var; - - return $this; - } - - /** - * Optional. The Compute Engine zone where the Airflow database is created. If - * zone is provided, it must be in the region selected for the environment. If - * zone is not provided, a zone is automatically selected. The zone can only - * be set during environment creation. Supported for Cloud Composer - * environments in versions composer-2.*.*-airflow-*.*.*. - * - * Generated from protobuf field string zone = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getZone() - { - return $this->zone; - } - - /** - * Optional. The Compute Engine zone where the Airflow database is created. If - * zone is provided, it must be in the region selected for the environment. If - * zone is not provided, a zone is automatically selected. The zone can only - * be set during environment creation. Supported for Cloud Composer - * environments in versions composer-2.*.*-airflow-*.*.*. - * - * Generated from protobuf field string zone = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setZone($var) - { - GPBUtil::checkString($var, True); - $this->zone = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/DatabaseFailoverRequest.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/DatabaseFailoverRequest.php deleted file mode 100644 index ab6e640265f2..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/DatabaseFailoverRequest.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest - */ -class DatabaseFailoverRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Target environment: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * - * Generated from protobuf field string environment = 1; - */ - protected $environment = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $environment - * Target environment: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); - parent::__construct($data); - } - - /** - * Target environment: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * - * Generated from protobuf field string environment = 1; - * @return string - */ - public function getEnvironment() - { - return $this->environment; - } - - /** - * Target environment: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * - * Generated from protobuf field string environment = 1; - * @param string $var - * @return $this - */ - public function setEnvironment($var) - { - GPBUtil::checkString($var, True); - $this->environment = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/DatabaseFailoverResponse.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/DatabaseFailoverResponse.php deleted file mode 100644 index 87249c1f5d8a..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/DatabaseFailoverResponse.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse - */ -class DatabaseFailoverResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/DeleteEnvironmentRequest.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/DeleteEnvironmentRequest.php deleted file mode 100644 index dbecadf7a50f..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/DeleteEnvironmentRequest.php +++ /dev/null @@ -1,85 +0,0 @@ -google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest - */ -class DeleteEnvironmentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The environment to delete, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - - /** - * @param string $name The environment to delete, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * - * @return \Google\Cloud\Orchestration\Airflow\Service\V1\DeleteEnvironmentRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The environment to delete, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); - parent::__construct($data); - } - - /** - * The environment to delete, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The environment to delete, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/DeleteUserWorkloadsConfigMapRequest.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/DeleteUserWorkloadsConfigMapRequest.php deleted file mode 100644 index 45de5167d11a..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/DeleteUserWorkloadsConfigMapRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsConfigMapRequest - */ -class DeleteUserWorkloadsConfigMapRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The ConfigMap to delete, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsConfigMaps/{userWorkloadsConfigMapId}" - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The ConfigMap to delete, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsConfigMaps/{userWorkloadsConfigMapId}" - * Please see {@see EnvironmentsClient::userWorkloadsConfigMapName()} for help formatting this field. - * - * @return \Google\Cloud\Orchestration\Airflow\Service\V1\DeleteUserWorkloadsConfigMapRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The ConfigMap to delete, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsConfigMaps/{userWorkloadsConfigMapId}" - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); - parent::__construct($data); - } - - /** - * Required. The ConfigMap to delete, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsConfigMaps/{userWorkloadsConfigMapId}" - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The ConfigMap to delete, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsConfigMaps/{userWorkloadsConfigMapId}" - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/DeleteUserWorkloadsSecretRequest.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/DeleteUserWorkloadsSecretRequest.php deleted file mode 100644 index eca0bab9c9fb..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/DeleteUserWorkloadsSecretRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsSecretRequest - */ -class DeleteUserWorkloadsSecretRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The Secret to delete, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsSecrets/{userWorkloadsSecretId}" - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The Secret to delete, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsSecrets/{userWorkloadsSecretId}" - * Please see {@see EnvironmentsClient::userWorkloadsSecretName()} for help formatting this field. - * - * @return \Google\Cloud\Orchestration\Airflow\Service\V1\DeleteUserWorkloadsSecretRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The Secret to delete, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsSecrets/{userWorkloadsSecretId}" - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); - parent::__construct($data); - } - - /** - * Required. The Secret to delete, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsSecrets/{userWorkloadsSecretId}" - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The Secret to delete, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsSecrets/{userWorkloadsSecretId}" - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/EncryptionConfig.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/EncryptionConfig.php deleted file mode 100644 index c8d5d8e29fc8..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/EncryptionConfig.php +++ /dev/null @@ -1,77 +0,0 @@ -google.cloud.orchestration.airflow.service.v1.EncryptionConfig - */ -class EncryptionConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Customer-managed Encryption Key available through Google's Key - * Management Service. Cannot be updated. If not specified, Google-managed key - * will be used. - * - * Generated from protobuf field string kms_key_name = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $kms_key_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $kms_key_name - * Optional. Customer-managed Encryption Key available through Google's Key - * Management Service. Cannot be updated. If not specified, Google-managed key - * will be used. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Customer-managed Encryption Key available through Google's Key - * Management Service. Cannot be updated. If not specified, Google-managed key - * will be used. - * - * Generated from protobuf field string kms_key_name = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getKmsKeyName() - { - return $this->kms_key_name; - } - - /** - * Optional. Customer-managed Encryption Key available through Google's Key - * Management Service. Cannot be updated. If not specified, Google-managed key - * will be used. - * - * Generated from protobuf field string kms_key_name = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setKmsKeyName($var) - { - GPBUtil::checkString($var, True); - $this->kms_key_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/Environment.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/Environment.php deleted file mode 100644 index 9173036393bc..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/Environment.php +++ /dev/null @@ -1,453 +0,0 @@ -google.cloud.orchestration.airflow.service.v1.Environment - */ -class Environment extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. The resource name of the environment, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * EnvironmentId must start with a lowercase letter followed by up to 63 - * lowercase letters, numbers, or hyphens, and cannot end with a hyphen. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Optional. Configuration parameters for this environment. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.EnvironmentConfig config = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $config = null; - /** - * Output only. The UUID (Universally Unique IDentifier) associated with this - * environment. This value is generated when the environment is created. - * - * Generated from protobuf field string uuid = 3; - */ - protected $uuid = ''; - /** - * The current state of the environment. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.Environment.State state = 4; - */ - protected $state = 0; - /** - * Output only. The time at which this environment was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 5; - */ - protected $create_time = null; - /** - * Output only. The time at which this environment was last modified. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 6; - */ - protected $update_time = null; - /** - * Optional. User-defined labels for this environment. - * The labels map can contain no more than 64 entries. Entries of the labels - * map are UTF8 strings that comply with the following restrictions: - * * Keys must conform to regexp: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62} - * * Values must conform to regexp: [\p{Ll}\p{Lo}\p{N}_-]{0,63} - * * Both keys and values are additionally constrained to be <= 128 bytes in - * size. - * - * Generated from protobuf field map labels = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - /** - * Output only. Reserved for future use. - * - * Generated from protobuf field bool satisfies_pzs = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $satisfies_pzs = false; - /** - * Output only. Reserved for future use. - * - * Generated from protobuf field bool satisfies_pzi = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $satisfies_pzi = false; - /** - * Optional. Storage configuration for this environment. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.StorageConfig storage_config = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $storage_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. The resource name of the environment, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * EnvironmentId must start with a lowercase letter followed by up to 63 - * lowercase letters, numbers, or hyphens, and cannot end with a hyphen. - * @type \Google\Cloud\Orchestration\Airflow\Service\V1\EnvironmentConfig $config - * Optional. Configuration parameters for this environment. - * @type string $uuid - * Output only. The UUID (Universally Unique IDentifier) associated with this - * environment. This value is generated when the environment is created. - * @type int $state - * The current state of the environment. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time at which this environment was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The time at which this environment was last modified. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. User-defined labels for this environment. - * The labels map can contain no more than 64 entries. Entries of the labels - * map are UTF8 strings that comply with the following restrictions: - * * Keys must conform to regexp: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62} - * * Values must conform to regexp: [\p{Ll}\p{Lo}\p{N}_-]{0,63} - * * Both keys and values are additionally constrained to be <= 128 bytes in - * size. - * @type bool $satisfies_pzs - * Output only. Reserved for future use. - * @type bool $satisfies_pzi - * Output only. Reserved for future use. - * @type \Google\Cloud\Orchestration\Airflow\Service\V1\StorageConfig $storage_config - * Optional. Storage configuration for this environment. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. The resource name of the environment, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * EnvironmentId must start with a lowercase letter followed by up to 63 - * lowercase letters, numbers, or hyphens, and cannot end with a hyphen. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. The resource name of the environment, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * EnvironmentId must start with a lowercase letter followed by up to 63 - * lowercase letters, numbers, or hyphens, and cannot end with a hyphen. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. Configuration parameters for this environment. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.EnvironmentConfig config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Orchestration\Airflow\Service\V1\EnvironmentConfig|null - */ - public function getConfig() - { - return $this->config; - } - - public function hasConfig() - { - return isset($this->config); - } - - public function clearConfig() - { - unset($this->config); - } - - /** - * Optional. Configuration parameters for this environment. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.EnvironmentConfig config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Orchestration\Airflow\Service\V1\EnvironmentConfig $var - * @return $this - */ - public function setConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Orchestration\Airflow\Service\V1\EnvironmentConfig::class); - $this->config = $var; - - return $this; - } - - /** - * Output only. The UUID (Universally Unique IDentifier) associated with this - * environment. This value is generated when the environment is created. - * - * Generated from protobuf field string uuid = 3; - * @return string - */ - public function getUuid() - { - return $this->uuid; - } - - /** - * Output only. The UUID (Universally Unique IDentifier) associated with this - * environment. This value is generated when the environment is created. - * - * Generated from protobuf field string uuid = 3; - * @param string $var - * @return $this - */ - public function setUuid($var) - { - GPBUtil::checkString($var, True); - $this->uuid = $var; - - return $this; - } - - /** - * The current state of the environment. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.Environment.State state = 4; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * The current state of the environment. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.Environment.State state = 4; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Orchestration\Airflow\Service\V1\Environment\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. The time at which this environment was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 5; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The time at which this environment was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 5; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The time at which this environment was last modified. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 6; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The time at which this environment was last modified. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 6; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Optional. User-defined labels for this environment. - * The labels map can contain no more than 64 entries. Entries of the labels - * map are UTF8 strings that comply with the following restrictions: - * * Keys must conform to regexp: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62} - * * Values must conform to regexp: [\p{Ll}\p{Lo}\p{N}_-]{0,63} - * * Both keys and values are additionally constrained to be <= 128 bytes in - * size. - * - * Generated from protobuf field map labels = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. User-defined labels for this environment. - * The labels map can contain no more than 64 entries. Entries of the labels - * map are UTF8 strings that comply with the following restrictions: - * * Keys must conform to regexp: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62} - * * Values must conform to regexp: [\p{Ll}\p{Lo}\p{N}_-]{0,63} - * * Both keys and values are additionally constrained to be <= 128 bytes in - * size. - * - * Generated from protobuf field map labels = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Output only. Reserved for future use. - * - * Generated from protobuf field bool satisfies_pzs = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getSatisfiesPzs() - { - return $this->satisfies_pzs; - } - - /** - * Output only. Reserved for future use. - * - * Generated from protobuf field bool satisfies_pzs = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setSatisfiesPzs($var) - { - GPBUtil::checkBool($var); - $this->satisfies_pzs = $var; - - return $this; - } - - /** - * Output only. Reserved for future use. - * - * Generated from protobuf field bool satisfies_pzi = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getSatisfiesPzi() - { - return $this->satisfies_pzi; - } - - /** - * Output only. Reserved for future use. - * - * Generated from protobuf field bool satisfies_pzi = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setSatisfiesPzi($var) - { - GPBUtil::checkBool($var); - $this->satisfies_pzi = $var; - - return $this; - } - - /** - * Optional. Storage configuration for this environment. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.StorageConfig storage_config = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Orchestration\Airflow\Service\V1\StorageConfig|null - */ - public function getStorageConfig() - { - return $this->storage_config; - } - - public function hasStorageConfig() - { - return isset($this->storage_config); - } - - public function clearStorageConfig() - { - unset($this->storage_config); - } - - /** - * Optional. Storage configuration for this environment. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.StorageConfig storage_config = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Orchestration\Airflow\Service\V1\StorageConfig $var - * @return $this - */ - public function setStorageConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Orchestration\Airflow\Service\V1\StorageConfig::class); - $this->storage_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/Environment/State.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/Environment/State.php deleted file mode 100644 index eb7f15efa845..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/Environment/State.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.orchestration.airflow.service.v1.Environment.State - */ -class State -{ - /** - * The state of the environment is unknown. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The environment is in the process of being created. - * - * Generated from protobuf enum CREATING = 1; - */ - const CREATING = 1; - /** - * The environment is currently running and healthy. It is ready for use. - * - * Generated from protobuf enum RUNNING = 2; - */ - const RUNNING = 2; - /** - * The environment is being updated. It remains usable but cannot receive - * additional update requests or be deleted at this time. - * - * Generated from protobuf enum UPDATING = 3; - */ - const UPDATING = 3; - /** - * The environment is undergoing deletion. It cannot be used. - * - * Generated from protobuf enum DELETING = 4; - */ - const DELETING = 4; - /** - * The environment has encountered an error and cannot be used. - * - * Generated from protobuf enum ERROR = 5; - */ - const ERROR = 5; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::CREATING => 'CREATING', - self::RUNNING => 'RUNNING', - self::UPDATING => 'UPDATING', - self::DELETING => 'DELETING', - self::ERROR => 'ERROR', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\Orchestration\Airflow\Service\V1\Environment_State::class); - diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/EnvironmentConfig.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/EnvironmentConfig.php deleted file mode 100644 index 81fdfdb3e32b..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/EnvironmentConfig.php +++ /dev/null @@ -1,979 +0,0 @@ -google.cloud.orchestration.airflow.service.v1.EnvironmentConfig - */ -class EnvironmentConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The Kubernetes Engine cluster used to run this environment. - * - * Generated from protobuf field string gke_cluster = 1; - */ - protected $gke_cluster = ''; - /** - * Output only. The Cloud Storage prefix of the DAGs for this environment. - * Although Cloud Storage objects reside in a flat namespace, a hierarchical - * file tree can be simulated using "/"-delimited object name prefixes. DAG - * objects for this environment reside in a simulated directory with the given - * prefix. - * - * Generated from protobuf field string dag_gcs_prefix = 2; - */ - protected $dag_gcs_prefix = ''; - /** - * The number of nodes in the Kubernetes Engine cluster that will be - * used to run this environment. - * This field is supported for Cloud Composer environments in versions - * composer-1.*.*-airflow-*.*.*. - * - * Generated from protobuf field int32 node_count = 3; - */ - protected $node_count = 0; - /** - * Optional. The configuration settings for software inside the environment. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.SoftwareConfig software_config = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $software_config = null; - /** - * Optional. The configuration used for the Kubernetes Engine cluster. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.NodeConfig node_config = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $node_config = null; - /** - * Optional. The configuration used for the Private IP Cloud Composer - * environment. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig private_environment_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $private_environment_config = null; - /** - * Optional. The network-level access control policy for the Airflow web - * server. If unspecified, no network-level access restrictions will be - * applied. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl web_server_network_access_control = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $web_server_network_access_control = null; - /** - * Optional. The configuration settings for Cloud SQL instance used internally - * by Apache Airflow software. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.DatabaseConfig database_config = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $database_config = null; - /** - * Optional. The configuration settings for the Airflow web server App Engine - * instance. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.WebServerConfig web_server_config = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $web_server_config = null; - /** - * Optional. The encryption options for the Cloud Composer environment - * and its dependencies. Cannot be updated. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.EncryptionConfig encryption_config = 11 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $encryption_config = null; - /** - * Optional. The maintenance window is the period when Cloud Composer - * components may undergo maintenance. It is defined so that maintenance is - * not executed during peak hours or critical time periods. - * The system will not be under maintenance for every occurrence of this - * window, but when maintenance is planned, it will be scheduled - * during the window. - * The maintenance window period must encompass at least 12 hours per week. - * This may be split into multiple chunks, each with a size of - * at least 4 hours. - * If this value is omitted, the default value for maintenance window is - * applied. By default, maintenance windows are from 00:00:00 to 04:00:00 - * (GMT) on Friday, Saturday, and Sunday every week. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.MaintenanceWindow maintenance_window = 12 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $maintenance_window = null; - /** - * Optional. The workloads configuration settings for the GKE cluster - * associated with the Cloud Composer environment. The GKE cluster runs - * Airflow scheduler, web server and workers workloads. - * This field is supported for Cloud Composer environments in versions - * composer-2.*.*-airflow-*.*.* and newer. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.WorkloadsConfig workloads_config = 15 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $workloads_config = null; - /** - * Optional. The size of the Cloud Composer environment. - * This field is supported for Cloud Composer environments in versions - * composer-2.*.*-airflow-*.*.* and newer. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.EnvironmentSize environment_size = 16 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $environment_size = 0; - /** - * Output only. The URI of the Apache Airflow Web UI hosted within this - * environment (see [Airflow web - * interface](/composer/docs/how-to/accessing/airflow-web-interface)). - * - * Generated from protobuf field string airflow_uri = 6; - */ - protected $airflow_uri = ''; - /** - * Output only. The 'bring your own identity' variant of the URI of the Apache - * Airflow Web UI hosted within this environment, to be accessed with external - * identities using workforce identity federation (see [Access environments - * with workforce identity - * federation](/composer/docs/composer-2/access-environments-with-workforce-identity-federation)). - * - * Generated from protobuf field string airflow_byoid_uri = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $airflow_byoid_uri = ''; - /** - * Optional. The configuration options for GKE cluster master authorized - * networks. By default master authorized networks feature is: - * - in case of private environment: enabled with no external networks - * allowlisted. - * - in case of public environment: disabled. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig master_authorized_networks_config = 17 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $master_authorized_networks_config = null; - /** - * Optional. The Recovery settings configuration of an environment. - * This field is supported for Cloud Composer environments in versions - * composer-2.*.*-airflow-*.*.* and newer. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.RecoveryConfig recovery_config = 18 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $recovery_config = null; - /** - * Optional. Resilience mode of the Cloud Composer Environment. - * This field is supported for Cloud Composer environments in versions - * composer-2.2.0-airflow-*.*.* and newer. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.ResilienceMode resilience_mode = 19 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $resilience_mode = 0; - /** - * Optional. The configuration setting for Airflow database data retention - * mechanism. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.DataRetentionConfig data_retention_config = 21 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $data_retention_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $gke_cluster - * Output only. The Kubernetes Engine cluster used to run this environment. - * @type string $dag_gcs_prefix - * Output only. The Cloud Storage prefix of the DAGs for this environment. - * Although Cloud Storage objects reside in a flat namespace, a hierarchical - * file tree can be simulated using "/"-delimited object name prefixes. DAG - * objects for this environment reside in a simulated directory with the given - * prefix. - * @type int $node_count - * The number of nodes in the Kubernetes Engine cluster that will be - * used to run this environment. - * This field is supported for Cloud Composer environments in versions - * composer-1.*.*-airflow-*.*.*. - * @type \Google\Cloud\Orchestration\Airflow\Service\V1\SoftwareConfig $software_config - * Optional. The configuration settings for software inside the environment. - * @type \Google\Cloud\Orchestration\Airflow\Service\V1\NodeConfig $node_config - * Optional. The configuration used for the Kubernetes Engine cluster. - * @type \Google\Cloud\Orchestration\Airflow\Service\V1\PrivateEnvironmentConfig $private_environment_config - * Optional. The configuration used for the Private IP Cloud Composer - * environment. - * @type \Google\Cloud\Orchestration\Airflow\Service\V1\WebServerNetworkAccessControl $web_server_network_access_control - * Optional. The network-level access control policy for the Airflow web - * server. If unspecified, no network-level access restrictions will be - * applied. - * @type \Google\Cloud\Orchestration\Airflow\Service\V1\DatabaseConfig $database_config - * Optional. The configuration settings for Cloud SQL instance used internally - * by Apache Airflow software. - * @type \Google\Cloud\Orchestration\Airflow\Service\V1\WebServerConfig $web_server_config - * Optional. The configuration settings for the Airflow web server App Engine - * instance. - * @type \Google\Cloud\Orchestration\Airflow\Service\V1\EncryptionConfig $encryption_config - * Optional. The encryption options for the Cloud Composer environment - * and its dependencies. Cannot be updated. - * @type \Google\Cloud\Orchestration\Airflow\Service\V1\MaintenanceWindow $maintenance_window - * Optional. The maintenance window is the period when Cloud Composer - * components may undergo maintenance. It is defined so that maintenance is - * not executed during peak hours or critical time periods. - * The system will not be under maintenance for every occurrence of this - * window, but when maintenance is planned, it will be scheduled - * during the window. - * The maintenance window period must encompass at least 12 hours per week. - * This may be split into multiple chunks, each with a size of - * at least 4 hours. - * If this value is omitted, the default value for maintenance window is - * applied. By default, maintenance windows are from 00:00:00 to 04:00:00 - * (GMT) on Friday, Saturday, and Sunday every week. - * @type \Google\Cloud\Orchestration\Airflow\Service\V1\WorkloadsConfig $workloads_config - * Optional. The workloads configuration settings for the GKE cluster - * associated with the Cloud Composer environment. The GKE cluster runs - * Airflow scheduler, web server and workers workloads. - * This field is supported for Cloud Composer environments in versions - * composer-2.*.*-airflow-*.*.* and newer. - * @type int $environment_size - * Optional. The size of the Cloud Composer environment. - * This field is supported for Cloud Composer environments in versions - * composer-2.*.*-airflow-*.*.* and newer. - * @type string $airflow_uri - * Output only. The URI of the Apache Airflow Web UI hosted within this - * environment (see [Airflow web - * interface](/composer/docs/how-to/accessing/airflow-web-interface)). - * @type string $airflow_byoid_uri - * Output only. The 'bring your own identity' variant of the URI of the Apache - * Airflow Web UI hosted within this environment, to be accessed with external - * identities using workforce identity federation (see [Access environments - * with workforce identity - * federation](/composer/docs/composer-2/access-environments-with-workforce-identity-federation)). - * @type \Google\Cloud\Orchestration\Airflow\Service\V1\MasterAuthorizedNetworksConfig $master_authorized_networks_config - * Optional. The configuration options for GKE cluster master authorized - * networks. By default master authorized networks feature is: - * - in case of private environment: enabled with no external networks - * allowlisted. - * - in case of public environment: disabled. - * @type \Google\Cloud\Orchestration\Airflow\Service\V1\RecoveryConfig $recovery_config - * Optional. The Recovery settings configuration of an environment. - * This field is supported for Cloud Composer environments in versions - * composer-2.*.*-airflow-*.*.* and newer. - * @type int $resilience_mode - * Optional. Resilience mode of the Cloud Composer Environment. - * This field is supported for Cloud Composer environments in versions - * composer-2.2.0-airflow-*.*.* and newer. - * @type \Google\Cloud\Orchestration\Airflow\Service\V1\DataRetentionConfig $data_retention_config - * Optional. The configuration setting for Airflow database data retention - * mechanism. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The Kubernetes Engine cluster used to run this environment. - * - * Generated from protobuf field string gke_cluster = 1; - * @return string - */ - public function getGkeCluster() - { - return $this->gke_cluster; - } - - /** - * Output only. The Kubernetes Engine cluster used to run this environment. - * - * Generated from protobuf field string gke_cluster = 1; - * @param string $var - * @return $this - */ - public function setGkeCluster($var) - { - GPBUtil::checkString($var, True); - $this->gke_cluster = $var; - - return $this; - } - - /** - * Output only. The Cloud Storage prefix of the DAGs for this environment. - * Although Cloud Storage objects reside in a flat namespace, a hierarchical - * file tree can be simulated using "/"-delimited object name prefixes. DAG - * objects for this environment reside in a simulated directory with the given - * prefix. - * - * Generated from protobuf field string dag_gcs_prefix = 2; - * @return string - */ - public function getDagGcsPrefix() - { - return $this->dag_gcs_prefix; - } - - /** - * Output only. The Cloud Storage prefix of the DAGs for this environment. - * Although Cloud Storage objects reside in a flat namespace, a hierarchical - * file tree can be simulated using "/"-delimited object name prefixes. DAG - * objects for this environment reside in a simulated directory with the given - * prefix. - * - * Generated from protobuf field string dag_gcs_prefix = 2; - * @param string $var - * @return $this - */ - public function setDagGcsPrefix($var) - { - GPBUtil::checkString($var, True); - $this->dag_gcs_prefix = $var; - - return $this; - } - - /** - * The number of nodes in the Kubernetes Engine cluster that will be - * used to run this environment. - * This field is supported for Cloud Composer environments in versions - * composer-1.*.*-airflow-*.*.*. - * - * Generated from protobuf field int32 node_count = 3; - * @return int - */ - public function getNodeCount() - { - return $this->node_count; - } - - /** - * The number of nodes in the Kubernetes Engine cluster that will be - * used to run this environment. - * This field is supported for Cloud Composer environments in versions - * composer-1.*.*-airflow-*.*.*. - * - * Generated from protobuf field int32 node_count = 3; - * @param int $var - * @return $this - */ - public function setNodeCount($var) - { - GPBUtil::checkInt32($var); - $this->node_count = $var; - - return $this; - } - - /** - * Optional. The configuration settings for software inside the environment. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.SoftwareConfig software_config = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Orchestration\Airflow\Service\V1\SoftwareConfig|null - */ - public function getSoftwareConfig() - { - return $this->software_config; - } - - public function hasSoftwareConfig() - { - return isset($this->software_config); - } - - public function clearSoftwareConfig() - { - unset($this->software_config); - } - - /** - * Optional. The configuration settings for software inside the environment. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.SoftwareConfig software_config = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Orchestration\Airflow\Service\V1\SoftwareConfig $var - * @return $this - */ - public function setSoftwareConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Orchestration\Airflow\Service\V1\SoftwareConfig::class); - $this->software_config = $var; - - return $this; - } - - /** - * Optional. The configuration used for the Kubernetes Engine cluster. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.NodeConfig node_config = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Orchestration\Airflow\Service\V1\NodeConfig|null - */ - public function getNodeConfig() - { - return $this->node_config; - } - - public function hasNodeConfig() - { - return isset($this->node_config); - } - - public function clearNodeConfig() - { - unset($this->node_config); - } - - /** - * Optional. The configuration used for the Kubernetes Engine cluster. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.NodeConfig node_config = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Orchestration\Airflow\Service\V1\NodeConfig $var - * @return $this - */ - public function setNodeConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Orchestration\Airflow\Service\V1\NodeConfig::class); - $this->node_config = $var; - - return $this; - } - - /** - * Optional. The configuration used for the Private IP Cloud Composer - * environment. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig private_environment_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Orchestration\Airflow\Service\V1\PrivateEnvironmentConfig|null - */ - public function getPrivateEnvironmentConfig() - { - return $this->private_environment_config; - } - - public function hasPrivateEnvironmentConfig() - { - return isset($this->private_environment_config); - } - - public function clearPrivateEnvironmentConfig() - { - unset($this->private_environment_config); - } - - /** - * Optional. The configuration used for the Private IP Cloud Composer - * environment. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig private_environment_config = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Orchestration\Airflow\Service\V1\PrivateEnvironmentConfig $var - * @return $this - */ - public function setPrivateEnvironmentConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Orchestration\Airflow\Service\V1\PrivateEnvironmentConfig::class); - $this->private_environment_config = $var; - - return $this; - } - - /** - * Optional. The network-level access control policy for the Airflow web - * server. If unspecified, no network-level access restrictions will be - * applied. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl web_server_network_access_control = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Orchestration\Airflow\Service\V1\WebServerNetworkAccessControl|null - */ - public function getWebServerNetworkAccessControl() - { - return $this->web_server_network_access_control; - } - - public function hasWebServerNetworkAccessControl() - { - return isset($this->web_server_network_access_control); - } - - public function clearWebServerNetworkAccessControl() - { - unset($this->web_server_network_access_control); - } - - /** - * Optional. The network-level access control policy for the Airflow web - * server. If unspecified, no network-level access restrictions will be - * applied. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl web_server_network_access_control = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Orchestration\Airflow\Service\V1\WebServerNetworkAccessControl $var - * @return $this - */ - public function setWebServerNetworkAccessControl($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Orchestration\Airflow\Service\V1\WebServerNetworkAccessControl::class); - $this->web_server_network_access_control = $var; - - return $this; - } - - /** - * Optional. The configuration settings for Cloud SQL instance used internally - * by Apache Airflow software. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.DatabaseConfig database_config = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Orchestration\Airflow\Service\V1\DatabaseConfig|null - */ - public function getDatabaseConfig() - { - return $this->database_config; - } - - public function hasDatabaseConfig() - { - return isset($this->database_config); - } - - public function clearDatabaseConfig() - { - unset($this->database_config); - } - - /** - * Optional. The configuration settings for Cloud SQL instance used internally - * by Apache Airflow software. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.DatabaseConfig database_config = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Orchestration\Airflow\Service\V1\DatabaseConfig $var - * @return $this - */ - public function setDatabaseConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Orchestration\Airflow\Service\V1\DatabaseConfig::class); - $this->database_config = $var; - - return $this; - } - - /** - * Optional. The configuration settings for the Airflow web server App Engine - * instance. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.WebServerConfig web_server_config = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Orchestration\Airflow\Service\V1\WebServerConfig|null - */ - public function getWebServerConfig() - { - return $this->web_server_config; - } - - public function hasWebServerConfig() - { - return isset($this->web_server_config); - } - - public function clearWebServerConfig() - { - unset($this->web_server_config); - } - - /** - * Optional. The configuration settings for the Airflow web server App Engine - * instance. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.WebServerConfig web_server_config = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Orchestration\Airflow\Service\V1\WebServerConfig $var - * @return $this - */ - public function setWebServerConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Orchestration\Airflow\Service\V1\WebServerConfig::class); - $this->web_server_config = $var; - - return $this; - } - - /** - * Optional. The encryption options for the Cloud Composer environment - * and its dependencies. Cannot be updated. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.EncryptionConfig encryption_config = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Orchestration\Airflow\Service\V1\EncryptionConfig|null - */ - public function getEncryptionConfig() - { - return $this->encryption_config; - } - - public function hasEncryptionConfig() - { - return isset($this->encryption_config); - } - - public function clearEncryptionConfig() - { - unset($this->encryption_config); - } - - /** - * Optional. The encryption options for the Cloud Composer environment - * and its dependencies. Cannot be updated. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.EncryptionConfig encryption_config = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Orchestration\Airflow\Service\V1\EncryptionConfig $var - * @return $this - */ - public function setEncryptionConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Orchestration\Airflow\Service\V1\EncryptionConfig::class); - $this->encryption_config = $var; - - return $this; - } - - /** - * Optional. The maintenance window is the period when Cloud Composer - * components may undergo maintenance. It is defined so that maintenance is - * not executed during peak hours or critical time periods. - * The system will not be under maintenance for every occurrence of this - * window, but when maintenance is planned, it will be scheduled - * during the window. - * The maintenance window period must encompass at least 12 hours per week. - * This may be split into multiple chunks, each with a size of - * at least 4 hours. - * If this value is omitted, the default value for maintenance window is - * applied. By default, maintenance windows are from 00:00:00 to 04:00:00 - * (GMT) on Friday, Saturday, and Sunday every week. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.MaintenanceWindow maintenance_window = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Orchestration\Airflow\Service\V1\MaintenanceWindow|null - */ - public function getMaintenanceWindow() - { - return $this->maintenance_window; - } - - public function hasMaintenanceWindow() - { - return isset($this->maintenance_window); - } - - public function clearMaintenanceWindow() - { - unset($this->maintenance_window); - } - - /** - * Optional. The maintenance window is the period when Cloud Composer - * components may undergo maintenance. It is defined so that maintenance is - * not executed during peak hours or critical time periods. - * The system will not be under maintenance for every occurrence of this - * window, but when maintenance is planned, it will be scheduled - * during the window. - * The maintenance window period must encompass at least 12 hours per week. - * This may be split into multiple chunks, each with a size of - * at least 4 hours. - * If this value is omitted, the default value for maintenance window is - * applied. By default, maintenance windows are from 00:00:00 to 04:00:00 - * (GMT) on Friday, Saturday, and Sunday every week. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.MaintenanceWindow maintenance_window = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Orchestration\Airflow\Service\V1\MaintenanceWindow $var - * @return $this - */ - public function setMaintenanceWindow($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Orchestration\Airflow\Service\V1\MaintenanceWindow::class); - $this->maintenance_window = $var; - - return $this; - } - - /** - * Optional. The workloads configuration settings for the GKE cluster - * associated with the Cloud Composer environment. The GKE cluster runs - * Airflow scheduler, web server and workers workloads. - * This field is supported for Cloud Composer environments in versions - * composer-2.*.*-airflow-*.*.* and newer. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.WorkloadsConfig workloads_config = 15 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Orchestration\Airflow\Service\V1\WorkloadsConfig|null - */ - public function getWorkloadsConfig() - { - return $this->workloads_config; - } - - public function hasWorkloadsConfig() - { - return isset($this->workloads_config); - } - - public function clearWorkloadsConfig() - { - unset($this->workloads_config); - } - - /** - * Optional. The workloads configuration settings for the GKE cluster - * associated with the Cloud Composer environment. The GKE cluster runs - * Airflow scheduler, web server and workers workloads. - * This field is supported for Cloud Composer environments in versions - * composer-2.*.*-airflow-*.*.* and newer. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.WorkloadsConfig workloads_config = 15 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Orchestration\Airflow\Service\V1\WorkloadsConfig $var - * @return $this - */ - public function setWorkloadsConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Orchestration\Airflow\Service\V1\WorkloadsConfig::class); - $this->workloads_config = $var; - - return $this; - } - - /** - * Optional. The size of the Cloud Composer environment. - * This field is supported for Cloud Composer environments in versions - * composer-2.*.*-airflow-*.*.* and newer. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.EnvironmentSize environment_size = 16 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getEnvironmentSize() - { - return $this->environment_size; - } - - /** - * Optional. The size of the Cloud Composer environment. - * This field is supported for Cloud Composer environments in versions - * composer-2.*.*-airflow-*.*.* and newer. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.EnvironmentSize environment_size = 16 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setEnvironmentSize($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Orchestration\Airflow\Service\V1\EnvironmentConfig\EnvironmentSize::class); - $this->environment_size = $var; - - return $this; - } - - /** - * Output only. The URI of the Apache Airflow Web UI hosted within this - * environment (see [Airflow web - * interface](/composer/docs/how-to/accessing/airflow-web-interface)). - * - * Generated from protobuf field string airflow_uri = 6; - * @return string - */ - public function getAirflowUri() - { - return $this->airflow_uri; - } - - /** - * Output only. The URI of the Apache Airflow Web UI hosted within this - * environment (see [Airflow web - * interface](/composer/docs/how-to/accessing/airflow-web-interface)). - * - * Generated from protobuf field string airflow_uri = 6; - * @param string $var - * @return $this - */ - public function setAirflowUri($var) - { - GPBUtil::checkString($var, True); - $this->airflow_uri = $var; - - return $this; - } - - /** - * Output only. The 'bring your own identity' variant of the URI of the Apache - * Airflow Web UI hosted within this environment, to be accessed with external - * identities using workforce identity federation (see [Access environments - * with workforce identity - * federation](/composer/docs/composer-2/access-environments-with-workforce-identity-federation)). - * - * Generated from protobuf field string airflow_byoid_uri = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getAirflowByoidUri() - { - return $this->airflow_byoid_uri; - } - - /** - * Output only. The 'bring your own identity' variant of the URI of the Apache - * Airflow Web UI hosted within this environment, to be accessed with external - * identities using workforce identity federation (see [Access environments - * with workforce identity - * federation](/composer/docs/composer-2/access-environments-with-workforce-identity-federation)). - * - * Generated from protobuf field string airflow_byoid_uri = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setAirflowByoidUri($var) - { - GPBUtil::checkString($var, True); - $this->airflow_byoid_uri = $var; - - return $this; - } - - /** - * Optional. The configuration options for GKE cluster master authorized - * networks. By default master authorized networks feature is: - * - in case of private environment: enabled with no external networks - * allowlisted. - * - in case of public environment: disabled. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig master_authorized_networks_config = 17 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Orchestration\Airflow\Service\V1\MasterAuthorizedNetworksConfig|null - */ - public function getMasterAuthorizedNetworksConfig() - { - return $this->master_authorized_networks_config; - } - - public function hasMasterAuthorizedNetworksConfig() - { - return isset($this->master_authorized_networks_config); - } - - public function clearMasterAuthorizedNetworksConfig() - { - unset($this->master_authorized_networks_config); - } - - /** - * Optional. The configuration options for GKE cluster master authorized - * networks. By default master authorized networks feature is: - * - in case of private environment: enabled with no external networks - * allowlisted. - * - in case of public environment: disabled. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig master_authorized_networks_config = 17 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Orchestration\Airflow\Service\V1\MasterAuthorizedNetworksConfig $var - * @return $this - */ - public function setMasterAuthorizedNetworksConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Orchestration\Airflow\Service\V1\MasterAuthorizedNetworksConfig::class); - $this->master_authorized_networks_config = $var; - - return $this; - } - - /** - * Optional. The Recovery settings configuration of an environment. - * This field is supported for Cloud Composer environments in versions - * composer-2.*.*-airflow-*.*.* and newer. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.RecoveryConfig recovery_config = 18 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Orchestration\Airflow\Service\V1\RecoveryConfig|null - */ - public function getRecoveryConfig() - { - return $this->recovery_config; - } - - public function hasRecoveryConfig() - { - return isset($this->recovery_config); - } - - public function clearRecoveryConfig() - { - unset($this->recovery_config); - } - - /** - * Optional. The Recovery settings configuration of an environment. - * This field is supported for Cloud Composer environments in versions - * composer-2.*.*-airflow-*.*.* and newer. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.RecoveryConfig recovery_config = 18 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Orchestration\Airflow\Service\V1\RecoveryConfig $var - * @return $this - */ - public function setRecoveryConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Orchestration\Airflow\Service\V1\RecoveryConfig::class); - $this->recovery_config = $var; - - return $this; - } - - /** - * Optional. Resilience mode of the Cloud Composer Environment. - * This field is supported for Cloud Composer environments in versions - * composer-2.2.0-airflow-*.*.* and newer. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.ResilienceMode resilience_mode = 19 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getResilienceMode() - { - return $this->resilience_mode; - } - - /** - * Optional. Resilience mode of the Cloud Composer Environment. - * This field is supported for Cloud Composer environments in versions - * composer-2.2.0-airflow-*.*.* and newer. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.ResilienceMode resilience_mode = 19 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setResilienceMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Orchestration\Airflow\Service\V1\EnvironmentConfig\ResilienceMode::class); - $this->resilience_mode = $var; - - return $this; - } - - /** - * Optional. The configuration setting for Airflow database data retention - * mechanism. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.DataRetentionConfig data_retention_config = 21 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Orchestration\Airflow\Service\V1\DataRetentionConfig|null - */ - public function getDataRetentionConfig() - { - return $this->data_retention_config; - } - - public function hasDataRetentionConfig() - { - return isset($this->data_retention_config); - } - - public function clearDataRetentionConfig() - { - unset($this->data_retention_config); - } - - /** - * Optional. The configuration setting for Airflow database data retention - * mechanism. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.DataRetentionConfig data_retention_config = 21 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Orchestration\Airflow\Service\V1\DataRetentionConfig $var - * @return $this - */ - public function setDataRetentionConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Orchestration\Airflow\Service\V1\DataRetentionConfig::class); - $this->data_retention_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/EnvironmentConfig/EnvironmentSize.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/EnvironmentConfig/EnvironmentSize.php deleted file mode 100644 index 024e1e477770..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/EnvironmentConfig/EnvironmentSize.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.EnvironmentSize - */ -class EnvironmentSize -{ - /** - * The size of the environment is unspecified. - * - * Generated from protobuf enum ENVIRONMENT_SIZE_UNSPECIFIED = 0; - */ - const ENVIRONMENT_SIZE_UNSPECIFIED = 0; - /** - * The environment size is small. - * - * Generated from protobuf enum ENVIRONMENT_SIZE_SMALL = 1; - */ - const ENVIRONMENT_SIZE_SMALL = 1; - /** - * The environment size is medium. - * - * Generated from protobuf enum ENVIRONMENT_SIZE_MEDIUM = 2; - */ - const ENVIRONMENT_SIZE_MEDIUM = 2; - /** - * The environment size is large. - * - * Generated from protobuf enum ENVIRONMENT_SIZE_LARGE = 3; - */ - const ENVIRONMENT_SIZE_LARGE = 3; - - private static $valueToName = [ - self::ENVIRONMENT_SIZE_UNSPECIFIED => 'ENVIRONMENT_SIZE_UNSPECIFIED', - self::ENVIRONMENT_SIZE_SMALL => 'ENVIRONMENT_SIZE_SMALL', - self::ENVIRONMENT_SIZE_MEDIUM => 'ENVIRONMENT_SIZE_MEDIUM', - self::ENVIRONMENT_SIZE_LARGE => 'ENVIRONMENT_SIZE_LARGE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(EnvironmentSize::class, \Google\Cloud\Orchestration\Airflow\Service\V1\EnvironmentConfig_EnvironmentSize::class); - diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/EnvironmentConfig/ResilienceMode.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/EnvironmentConfig/ResilienceMode.php deleted file mode 100644 index 1b8f10ce252e..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/EnvironmentConfig/ResilienceMode.php +++ /dev/null @@ -1,57 +0,0 @@ -google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.ResilienceMode - */ -class ResilienceMode -{ - /** - * Default mode doesn't change environment parameters. - * - * Generated from protobuf enum RESILIENCE_MODE_UNSPECIFIED = 0; - */ - const RESILIENCE_MODE_UNSPECIFIED = 0; - /** - * Enabled High Resilience mode, including Cloud SQL HA. - * - * Generated from protobuf enum HIGH_RESILIENCE = 1; - */ - const HIGH_RESILIENCE = 1; - - private static $valueToName = [ - self::RESILIENCE_MODE_UNSPECIFIED => 'RESILIENCE_MODE_UNSPECIFIED', - self::HIGH_RESILIENCE => 'HIGH_RESILIENCE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ResilienceMode::class, \Google\Cloud\Orchestration\Airflow\Service\V1\EnvironmentConfig_ResilienceMode::class); - diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ExecuteAirflowCommandRequest.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ExecuteAirflowCommandRequest.php deleted file mode 100644 index b8834cb19c0a..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ExecuteAirflowCommandRequest.php +++ /dev/null @@ -1,185 +0,0 @@ -google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest - */ -class ExecuteAirflowCommandRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the environment in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}". - * - * Generated from protobuf field string environment = 1; - */ - protected $environment = ''; - /** - * Airflow command. - * - * Generated from protobuf field string command = 2; - */ - protected $command = ''; - /** - * Airflow subcommand. - * - * Generated from protobuf field string subcommand = 3; - */ - protected $subcommand = ''; - /** - * Parameters for the Airflow command/subcommand as an array of arguments. - * It may contain positional arguments like `["my-dag-id"]`, key-value - * parameters like `["--foo=bar"]` or `["--foo","bar"]`, - * or other flags like `["-f"]`. - * - * Generated from protobuf field repeated string parameters = 4; - */ - private $parameters; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $environment - * The resource name of the environment in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}". - * @type string $command - * Airflow command. - * @type string $subcommand - * Airflow subcommand. - * @type array|\Google\Protobuf\Internal\RepeatedField $parameters - * Parameters for the Airflow command/subcommand as an array of arguments. - * It may contain positional arguments like `["my-dag-id"]`, key-value - * parameters like `["--foo=bar"]` or `["--foo","bar"]`, - * or other flags like `["-f"]`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the environment in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}". - * - * Generated from protobuf field string environment = 1; - * @return string - */ - public function getEnvironment() - { - return $this->environment; - } - - /** - * The resource name of the environment in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}". - * - * Generated from protobuf field string environment = 1; - * @param string $var - * @return $this - */ - public function setEnvironment($var) - { - GPBUtil::checkString($var, True); - $this->environment = $var; - - return $this; - } - - /** - * Airflow command. - * - * Generated from protobuf field string command = 2; - * @return string - */ - public function getCommand() - { - return $this->command; - } - - /** - * Airflow command. - * - * Generated from protobuf field string command = 2; - * @param string $var - * @return $this - */ - public function setCommand($var) - { - GPBUtil::checkString($var, True); - $this->command = $var; - - return $this; - } - - /** - * Airflow subcommand. - * - * Generated from protobuf field string subcommand = 3; - * @return string - */ - public function getSubcommand() - { - return $this->subcommand; - } - - /** - * Airflow subcommand. - * - * Generated from protobuf field string subcommand = 3; - * @param string $var - * @return $this - */ - public function setSubcommand($var) - { - GPBUtil::checkString($var, True); - $this->subcommand = $var; - - return $this; - } - - /** - * Parameters for the Airflow command/subcommand as an array of arguments. - * It may contain positional arguments like `["my-dag-id"]`, key-value - * parameters like `["--foo=bar"]` or `["--foo","bar"]`, - * or other flags like `["-f"]`. - * - * Generated from protobuf field repeated string parameters = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getParameters() - { - return $this->parameters; - } - - /** - * Parameters for the Airflow command/subcommand as an array of arguments. - * It may contain positional arguments like `["my-dag-id"]`, key-value - * parameters like `["--foo=bar"]` or `["--foo","bar"]`, - * or other flags like `["-f"]`. - * - * Generated from protobuf field repeated string parameters = 4; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setParameters($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->parameters = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ExecuteAirflowCommandResponse.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ExecuteAirflowCommandResponse.php deleted file mode 100644 index 7652aa34183c..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ExecuteAirflowCommandResponse.php +++ /dev/null @@ -1,169 +0,0 @@ -google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse - */ -class ExecuteAirflowCommandResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The unique ID of the command execution for polling. - * - * Generated from protobuf field string execution_id = 1; - */ - protected $execution_id = ''; - /** - * The name of the pod where the command is executed. - * - * Generated from protobuf field string pod = 2; - */ - protected $pod = ''; - /** - * The namespace of the pod where the command is executed. - * - * Generated from protobuf field string pod_namespace = 3; - */ - protected $pod_namespace = ''; - /** - * Error message. Empty if there was no error. - * - * Generated from protobuf field string error = 4; - */ - protected $error = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $execution_id - * The unique ID of the command execution for polling. - * @type string $pod - * The name of the pod where the command is executed. - * @type string $pod_namespace - * The namespace of the pod where the command is executed. - * @type string $error - * Error message. Empty if there was no error. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); - parent::__construct($data); - } - - /** - * The unique ID of the command execution for polling. - * - * Generated from protobuf field string execution_id = 1; - * @return string - */ - public function getExecutionId() - { - return $this->execution_id; - } - - /** - * The unique ID of the command execution for polling. - * - * Generated from protobuf field string execution_id = 1; - * @param string $var - * @return $this - */ - public function setExecutionId($var) - { - GPBUtil::checkString($var, True); - $this->execution_id = $var; - - return $this; - } - - /** - * The name of the pod where the command is executed. - * - * Generated from protobuf field string pod = 2; - * @return string - */ - public function getPod() - { - return $this->pod; - } - - /** - * The name of the pod where the command is executed. - * - * Generated from protobuf field string pod = 2; - * @param string $var - * @return $this - */ - public function setPod($var) - { - GPBUtil::checkString($var, True); - $this->pod = $var; - - return $this; - } - - /** - * The namespace of the pod where the command is executed. - * - * Generated from protobuf field string pod_namespace = 3; - * @return string - */ - public function getPodNamespace() - { - return $this->pod_namespace; - } - - /** - * The namespace of the pod where the command is executed. - * - * Generated from protobuf field string pod_namespace = 3; - * @param string $var - * @return $this - */ - public function setPodNamespace($var) - { - GPBUtil::checkString($var, True); - $this->pod_namespace = $var; - - return $this; - } - - /** - * Error message. Empty if there was no error. - * - * Generated from protobuf field string error = 4; - * @return string - */ - public function getError() - { - return $this->error; - } - - /** - * Error message. Empty if there was no error. - * - * Generated from protobuf field string error = 4; - * @param string $var - * @return $this - */ - public function setError($var) - { - GPBUtil::checkString($var, True); - $this->error = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/FetchDatabasePropertiesRequest.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/FetchDatabasePropertiesRequest.php deleted file mode 100644 index ac136a7d9c93..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/FetchDatabasePropertiesRequest.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest - */ -class FetchDatabasePropertiesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the environment, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * - * Generated from protobuf field string environment = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $environment = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $environment - * Required. The resource name of the environment, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the environment, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * - * Generated from protobuf field string environment = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getEnvironment() - { - return $this->environment; - } - - /** - * Required. The resource name of the environment, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * - * Generated from protobuf field string environment = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setEnvironment($var) - { - GPBUtil::checkString($var, True); - $this->environment = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/FetchDatabasePropertiesResponse.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/FetchDatabasePropertiesResponse.php deleted file mode 100644 index a2c147998912..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/FetchDatabasePropertiesResponse.php +++ /dev/null @@ -1,147 +0,0 @@ -google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse - */ -class FetchDatabasePropertiesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The Compute Engine zone that the instance is currently serving from. - * - * Generated from protobuf field string primary_gce_zone = 1; - */ - protected $primary_gce_zone = ''; - /** - * The Compute Engine zone that the failover instance is currently serving - * from for a regional Cloud SQL instance. - * - * Generated from protobuf field string secondary_gce_zone = 2; - */ - protected $secondary_gce_zone = ''; - /** - * The availability status of the failover replica. A false status indicates - * that the failover replica is out of sync. The primary instance can only - * fail over to the failover replica when the status is true. - * - * Generated from protobuf field bool is_failover_replica_available = 3; - */ - protected $is_failover_replica_available = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $primary_gce_zone - * The Compute Engine zone that the instance is currently serving from. - * @type string $secondary_gce_zone - * The Compute Engine zone that the failover instance is currently serving - * from for a regional Cloud SQL instance. - * @type bool $is_failover_replica_available - * The availability status of the failover replica. A false status indicates - * that the failover replica is out of sync. The primary instance can only - * fail over to the failover replica when the status is true. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); - parent::__construct($data); - } - - /** - * The Compute Engine zone that the instance is currently serving from. - * - * Generated from protobuf field string primary_gce_zone = 1; - * @return string - */ - public function getPrimaryGceZone() - { - return $this->primary_gce_zone; - } - - /** - * The Compute Engine zone that the instance is currently serving from. - * - * Generated from protobuf field string primary_gce_zone = 1; - * @param string $var - * @return $this - */ - public function setPrimaryGceZone($var) - { - GPBUtil::checkString($var, True); - $this->primary_gce_zone = $var; - - return $this; - } - - /** - * The Compute Engine zone that the failover instance is currently serving - * from for a regional Cloud SQL instance. - * - * Generated from protobuf field string secondary_gce_zone = 2; - * @return string - */ - public function getSecondaryGceZone() - { - return $this->secondary_gce_zone; - } - - /** - * The Compute Engine zone that the failover instance is currently serving - * from for a regional Cloud SQL instance. - * - * Generated from protobuf field string secondary_gce_zone = 2; - * @param string $var - * @return $this - */ - public function setSecondaryGceZone($var) - { - GPBUtil::checkString($var, True); - $this->secondary_gce_zone = $var; - - return $this; - } - - /** - * The availability status of the failover replica. A false status indicates - * that the failover replica is out of sync. The primary instance can only - * fail over to the failover replica when the status is true. - * - * Generated from protobuf field bool is_failover_replica_available = 3; - * @return bool - */ - public function getIsFailoverReplicaAvailable() - { - return $this->is_failover_replica_available; - } - - /** - * The availability status of the failover replica. A false status indicates - * that the failover replica is out of sync. The primary instance can only - * fail over to the failover replica when the status is true. - * - * Generated from protobuf field bool is_failover_replica_available = 3; - * @param bool $var - * @return $this - */ - public function setIsFailoverReplicaAvailable($var) - { - GPBUtil::checkBool($var); - $this->is_failover_replica_available = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/GetEnvironmentRequest.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/GetEnvironmentRequest.php deleted file mode 100644 index fc67aee19860..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/GetEnvironmentRequest.php +++ /dev/null @@ -1,85 +0,0 @@ -google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest - */ -class GetEnvironmentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the environment to get, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - - /** - * @param string $name The resource name of the environment to get, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * - * @return \Google\Cloud\Orchestration\Airflow\Service\V1\GetEnvironmentRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The resource name of the environment to get, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the environment to get, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource name of the environment to get, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/GetUserWorkloadsConfigMapRequest.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/GetUserWorkloadsConfigMapRequest.php deleted file mode 100644 index bd1ec8a5330a..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/GetUserWorkloadsConfigMapRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsConfigMapRequest - */ -class GetUserWorkloadsConfigMapRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the ConfigMap to get, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsConfigMaps/{userWorkloadsConfigMapId}" - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The resource name of the ConfigMap to get, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsConfigMaps/{userWorkloadsConfigMapId}" - * Please see {@see EnvironmentsClient::userWorkloadsConfigMapName()} for help formatting this field. - * - * @return \Google\Cloud\Orchestration\Airflow\Service\V1\GetUserWorkloadsConfigMapRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the ConfigMap to get, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsConfigMaps/{userWorkloadsConfigMapId}" - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the ConfigMap to get, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsConfigMaps/{userWorkloadsConfigMapId}" - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the ConfigMap to get, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsConfigMaps/{userWorkloadsConfigMapId}" - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/GetUserWorkloadsSecretRequest.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/GetUserWorkloadsSecretRequest.php deleted file mode 100644 index e1cdc05d0b68..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/GetUserWorkloadsSecretRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsSecretRequest - */ -class GetUserWorkloadsSecretRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the Secret to get, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsSecrets/{userWorkloadsSecretId}" - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The resource name of the Secret to get, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsSecrets/{userWorkloadsSecretId}" - * Please see {@see EnvironmentsClient::userWorkloadsSecretName()} for help formatting this field. - * - * @return \Google\Cloud\Orchestration\Airflow\Service\V1\GetUserWorkloadsSecretRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the Secret to get, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsSecrets/{userWorkloadsSecretId}" - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the Secret to get, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsSecrets/{userWorkloadsSecretId}" - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the Secret to get, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsSecrets/{userWorkloadsSecretId}" - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/IPAllocationPolicy.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/IPAllocationPolicy.php deleted file mode 100644 index 184b6d0ef50e..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/IPAllocationPolicy.php +++ /dev/null @@ -1,318 +0,0 @@ -google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy - */ -class IPAllocationPolicy extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Whether or not to enable Alias IPs in the GKE cluster. - * If `true`, a VPC-native cluster is created. - * This field is only supported for Cloud Composer environments in versions - * composer-1.*.*-airflow-*.*.*. Environments in newer versions always use - * VPC-native GKE clusters. - * - * Generated from protobuf field bool use_ip_aliases = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $use_ip_aliases = false; - protected $cluster_ip_allocation; - protected $services_ip_allocation; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $use_ip_aliases - * Optional. Whether or not to enable Alias IPs in the GKE cluster. - * If `true`, a VPC-native cluster is created. - * This field is only supported for Cloud Composer environments in versions - * composer-1.*.*-airflow-*.*.*. Environments in newer versions always use - * VPC-native GKE clusters. - * @type string $cluster_secondary_range_name - * Optional. The name of the GKE cluster's secondary range used to allocate - * IP addresses to pods. - * For Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*, - * this field is applicable only when `use_ip_aliases` is true. - * @type string $cluster_ipv4_cidr_block - * Optional. The IP address range used to allocate IP addresses to pods in - * the GKE cluster. - * For Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*, - * this field is applicable only when `use_ip_aliases` is true. - * Set to blank to have GKE choose a range with the default size. - * Set to /netmask (e.g. `/14`) to have GKE choose a range with a specific - * netmask. - * Set to a - * [CIDR](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) - * notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g. - * `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range - * to use. - * @type string $services_secondary_range_name - * Optional. The name of the services' secondary range used to allocate - * IP addresses to the GKE cluster. - * For Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*, - * this field is applicable only when `use_ip_aliases` is true. - * @type string $services_ipv4_cidr_block - * Optional. The IP address range of the services IP addresses in this - * GKE cluster. - * For Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*, - * this field is applicable only when `use_ip_aliases` is true. - * Set to blank to have GKE choose a range with the default size. - * Set to /netmask (e.g. `/14`) to have GKE choose a range with a specific - * netmask. - * Set to a - * [CIDR](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) - * notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g. - * `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range - * to use. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Whether or not to enable Alias IPs in the GKE cluster. - * If `true`, a VPC-native cluster is created. - * This field is only supported for Cloud Composer environments in versions - * composer-1.*.*-airflow-*.*.*. Environments in newer versions always use - * VPC-native GKE clusters. - * - * Generated from protobuf field bool use_ip_aliases = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getUseIpAliases() - { - return $this->use_ip_aliases; - } - - /** - * Optional. Whether or not to enable Alias IPs in the GKE cluster. - * If `true`, a VPC-native cluster is created. - * This field is only supported for Cloud Composer environments in versions - * composer-1.*.*-airflow-*.*.*. Environments in newer versions always use - * VPC-native GKE clusters. - * - * Generated from protobuf field bool use_ip_aliases = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setUseIpAliases($var) - { - GPBUtil::checkBool($var); - $this->use_ip_aliases = $var; - - return $this; - } - - /** - * Optional. The name of the GKE cluster's secondary range used to allocate - * IP addresses to pods. - * For Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*, - * this field is applicable only when `use_ip_aliases` is true. - * - * Generated from protobuf field string cluster_secondary_range_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getClusterSecondaryRangeName() - { - return $this->readOneof(2); - } - - public function hasClusterSecondaryRangeName() - { - return $this->hasOneof(2); - } - - /** - * Optional. The name of the GKE cluster's secondary range used to allocate - * IP addresses to pods. - * For Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*, - * this field is applicable only when `use_ip_aliases` is true. - * - * Generated from protobuf field string cluster_secondary_range_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setClusterSecondaryRangeName($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Optional. The IP address range used to allocate IP addresses to pods in - * the GKE cluster. - * For Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*, - * this field is applicable only when `use_ip_aliases` is true. - * Set to blank to have GKE choose a range with the default size. - * Set to /netmask (e.g. `/14`) to have GKE choose a range with a specific - * netmask. - * Set to a - * [CIDR](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) - * notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g. - * `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range - * to use. - * - * Generated from protobuf field string cluster_ipv4_cidr_block = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getClusterIpv4CidrBlock() - { - return $this->readOneof(4); - } - - public function hasClusterIpv4CidrBlock() - { - return $this->hasOneof(4); - } - - /** - * Optional. The IP address range used to allocate IP addresses to pods in - * the GKE cluster. - * For Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*, - * this field is applicable only when `use_ip_aliases` is true. - * Set to blank to have GKE choose a range with the default size. - * Set to /netmask (e.g. `/14`) to have GKE choose a range with a specific - * netmask. - * Set to a - * [CIDR](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) - * notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g. - * `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range - * to use. - * - * Generated from protobuf field string cluster_ipv4_cidr_block = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setClusterIpv4CidrBlock($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Optional. The name of the services' secondary range used to allocate - * IP addresses to the GKE cluster. - * For Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*, - * this field is applicable only when `use_ip_aliases` is true. - * - * Generated from protobuf field string services_secondary_range_name = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getServicesSecondaryRangeName() - { - return $this->readOneof(3); - } - - public function hasServicesSecondaryRangeName() - { - return $this->hasOneof(3); - } - - /** - * Optional. The name of the services' secondary range used to allocate - * IP addresses to the GKE cluster. - * For Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*, - * this field is applicable only when `use_ip_aliases` is true. - * - * Generated from protobuf field string services_secondary_range_name = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setServicesSecondaryRangeName($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Optional. The IP address range of the services IP addresses in this - * GKE cluster. - * For Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*, - * this field is applicable only when `use_ip_aliases` is true. - * Set to blank to have GKE choose a range with the default size. - * Set to /netmask (e.g. `/14`) to have GKE choose a range with a specific - * netmask. - * Set to a - * [CIDR](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) - * notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g. - * `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range - * to use. - * - * Generated from protobuf field string services_ipv4_cidr_block = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getServicesIpv4CidrBlock() - { - return $this->readOneof(5); - } - - public function hasServicesIpv4CidrBlock() - { - return $this->hasOneof(5); - } - - /** - * Optional. The IP address range of the services IP addresses in this - * GKE cluster. - * For Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*, - * this field is applicable only when `use_ip_aliases` is true. - * Set to blank to have GKE choose a range with the default size. - * Set to /netmask (e.g. `/14`) to have GKE choose a range with a specific - * netmask. - * Set to a - * [CIDR](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) - * notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g. - * `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range - * to use. - * - * Generated from protobuf field string services_ipv4_cidr_block = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setServicesIpv4CidrBlock($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * @return string - */ - public function getClusterIpAllocation() - { - return $this->whichOneof("cluster_ip_allocation"); - } - - /** - * @return string - */ - public function getServicesIpAllocation() - { - return $this->whichOneof("services_ip_allocation"); - } - -} - diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ImageVersion.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ImageVersion.php deleted file mode 100644 index 405feff4278e..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ImageVersion.php +++ /dev/null @@ -1,259 +0,0 @@ -google.cloud.orchestration.airflow.service.v1.ImageVersion - */ -class ImageVersion extends \Google\Protobuf\Internal\Message -{ - /** - * The string identifier of the ImageVersion, in the form: - * "composer-x.y.z-airflow-a.b.c" - * - * Generated from protobuf field string image_version_id = 1; - */ - protected $image_version_id = ''; - /** - * Whether this is the default ImageVersion used by Composer during - * environment creation if no input ImageVersion is specified. - * - * Generated from protobuf field bool is_default = 2; - */ - protected $is_default = false; - /** - * supported python versions - * - * Generated from protobuf field repeated string supported_python_versions = 3; - */ - private $supported_python_versions; - /** - * The date of the version release. - * - * Generated from protobuf field .google.type.Date release_date = 4; - */ - protected $release_date = null; - /** - * Whether it is impossible to create an environment with the image version. - * - * Generated from protobuf field bool creation_disabled = 5; - */ - protected $creation_disabled = false; - /** - * Whether it is impossible to upgrade an environment running with the image - * version. - * - * Generated from protobuf field bool upgrade_disabled = 6; - */ - protected $upgrade_disabled = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $image_version_id - * The string identifier of the ImageVersion, in the form: - * "composer-x.y.z-airflow-a.b.c" - * @type bool $is_default - * Whether this is the default ImageVersion used by Composer during - * environment creation if no input ImageVersion is specified. - * @type array|\Google\Protobuf\Internal\RepeatedField $supported_python_versions - * supported python versions - * @type \Google\Type\Date $release_date - * The date of the version release. - * @type bool $creation_disabled - * Whether it is impossible to create an environment with the image version. - * @type bool $upgrade_disabled - * Whether it is impossible to upgrade an environment running with the image - * version. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\ImageVersions::initOnce(); - parent::__construct($data); - } - - /** - * The string identifier of the ImageVersion, in the form: - * "composer-x.y.z-airflow-a.b.c" - * - * Generated from protobuf field string image_version_id = 1; - * @return string - */ - public function getImageVersionId() - { - return $this->image_version_id; - } - - /** - * The string identifier of the ImageVersion, in the form: - * "composer-x.y.z-airflow-a.b.c" - * - * Generated from protobuf field string image_version_id = 1; - * @param string $var - * @return $this - */ - public function setImageVersionId($var) - { - GPBUtil::checkString($var, True); - $this->image_version_id = $var; - - return $this; - } - - /** - * Whether this is the default ImageVersion used by Composer during - * environment creation if no input ImageVersion is specified. - * - * Generated from protobuf field bool is_default = 2; - * @return bool - */ - public function getIsDefault() - { - return $this->is_default; - } - - /** - * Whether this is the default ImageVersion used by Composer during - * environment creation if no input ImageVersion is specified. - * - * Generated from protobuf field bool is_default = 2; - * @param bool $var - * @return $this - */ - public function setIsDefault($var) - { - GPBUtil::checkBool($var); - $this->is_default = $var; - - return $this; - } - - /** - * supported python versions - * - * Generated from protobuf field repeated string supported_python_versions = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSupportedPythonVersions() - { - return $this->supported_python_versions; - } - - /** - * supported python versions - * - * Generated from protobuf field repeated string supported_python_versions = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSupportedPythonVersions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->supported_python_versions = $arr; - - return $this; - } - - /** - * The date of the version release. - * - * Generated from protobuf field .google.type.Date release_date = 4; - * @return \Google\Type\Date|null - */ - public function getReleaseDate() - { - return $this->release_date; - } - - public function hasReleaseDate() - { - return isset($this->release_date); - } - - public function clearReleaseDate() - { - unset($this->release_date); - } - - /** - * The date of the version release. - * - * Generated from protobuf field .google.type.Date release_date = 4; - * @param \Google\Type\Date $var - * @return $this - */ - public function setReleaseDate($var) - { - GPBUtil::checkMessage($var, \Google\Type\Date::class); - $this->release_date = $var; - - return $this; - } - - /** - * Whether it is impossible to create an environment with the image version. - * - * Generated from protobuf field bool creation_disabled = 5; - * @return bool - */ - public function getCreationDisabled() - { - return $this->creation_disabled; - } - - /** - * Whether it is impossible to create an environment with the image version. - * - * Generated from protobuf field bool creation_disabled = 5; - * @param bool $var - * @return $this - */ - public function setCreationDisabled($var) - { - GPBUtil::checkBool($var); - $this->creation_disabled = $var; - - return $this; - } - - /** - * Whether it is impossible to upgrade an environment running with the image - * version. - * - * Generated from protobuf field bool upgrade_disabled = 6; - * @return bool - */ - public function getUpgradeDisabled() - { - return $this->upgrade_disabled; - } - - /** - * Whether it is impossible to upgrade an environment running with the image - * version. - * - * Generated from protobuf field bool upgrade_disabled = 6; - * @param bool $var - * @return $this - */ - public function setUpgradeDisabled($var) - { - GPBUtil::checkBool($var); - $this->upgrade_disabled = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListEnvironmentsRequest.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListEnvironmentsRequest.php deleted file mode 100644 index d22e4dcd17d4..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListEnvironmentsRequest.php +++ /dev/null @@ -1,153 +0,0 @@ -google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest - */ -class ListEnvironmentsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * List environments in the given project and location, in the form: - * "projects/{projectId}/locations/{locationId}" - * - * Generated from protobuf field string parent = 1; - */ - protected $parent = ''; - /** - * The maximum number of environments to return. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The next_page_token value returned from a previous List request, if any. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent List environments in the given project and location, in the form: - * "projects/{projectId}/locations/{locationId}" - * - * @return \Google\Cloud\Orchestration\Airflow\Service\V1\ListEnvironmentsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * List environments in the given project and location, in the form: - * "projects/{projectId}/locations/{locationId}" - * @type int $page_size - * The maximum number of environments to return. - * @type string $page_token - * The next_page_token value returned from a previous List request, if any. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); - parent::__construct($data); - } - - /** - * List environments in the given project and location, in the form: - * "projects/{projectId}/locations/{locationId}" - * - * Generated from protobuf field string parent = 1; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * List environments in the given project and location, in the form: - * "projects/{projectId}/locations/{locationId}" - * - * Generated from protobuf field string parent = 1; - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * The maximum number of environments to return. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of environments to return. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * The next_page_token value returned from a previous List request, if any. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The next_page_token value returned from a previous List request, if any. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListEnvironmentsResponse.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListEnvironmentsResponse.php deleted file mode 100644 index 11adef627138..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListEnvironmentsResponse.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse - */ -class ListEnvironmentsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of environments returned by a ListEnvironmentsRequest. - * - * Generated from protobuf field repeated .google.cloud.orchestration.airflow.service.v1.Environment environments = 1; - */ - private $environments; - /** - * The page token used to query for the next page if one exists. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Orchestration\Airflow\Service\V1\Environment>|\Google\Protobuf\Internal\RepeatedField $environments - * The list of environments returned by a ListEnvironmentsRequest. - * @type string $next_page_token - * The page token used to query for the next page if one exists. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); - parent::__construct($data); - } - - /** - * The list of environments returned by a ListEnvironmentsRequest. - * - * Generated from protobuf field repeated .google.cloud.orchestration.airflow.service.v1.Environment environments = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEnvironments() - { - return $this->environments; - } - - /** - * The list of environments returned by a ListEnvironmentsRequest. - * - * Generated from protobuf field repeated .google.cloud.orchestration.airflow.service.v1.Environment environments = 1; - * @param array<\Google\Cloud\Orchestration\Airflow\Service\V1\Environment>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEnvironments($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Orchestration\Airflow\Service\V1\Environment::class); - $this->environments = $arr; - - return $this; - } - - /** - * The page token used to query for the next page if one exists. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * The page token used to query for the next page if one exists. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListImageVersionsRequest.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListImageVersionsRequest.php deleted file mode 100644 index a89e8c354f52..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListImageVersionsRequest.php +++ /dev/null @@ -1,187 +0,0 @@ -google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest - */ -class ListImageVersionsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * List ImageVersions in the given project and location, in the form: - * "projects/{projectId}/locations/{locationId}" - * - * Generated from protobuf field string parent = 1; - */ - protected $parent = ''; - /** - * The maximum number of image_versions to return. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The next_page_token value returned from a previous List request, if any. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * Whether or not image versions from old releases should be included. - * - * Generated from protobuf field bool include_past_releases = 4; - */ - protected $include_past_releases = false; - - /** - * @param string $parent List ImageVersions in the given project and location, in the form: - * "projects/{projectId}/locations/{locationId}" - * - * @return \Google\Cloud\Orchestration\Airflow\Service\V1\ListImageVersionsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * List ImageVersions in the given project and location, in the form: - * "projects/{projectId}/locations/{locationId}" - * @type int $page_size - * The maximum number of image_versions to return. - * @type string $page_token - * The next_page_token value returned from a previous List request, if any. - * @type bool $include_past_releases - * Whether or not image versions from old releases should be included. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\ImageVersions::initOnce(); - parent::__construct($data); - } - - /** - * List ImageVersions in the given project and location, in the form: - * "projects/{projectId}/locations/{locationId}" - * - * Generated from protobuf field string parent = 1; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * List ImageVersions in the given project and location, in the form: - * "projects/{projectId}/locations/{locationId}" - * - * Generated from protobuf field string parent = 1; - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * The maximum number of image_versions to return. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of image_versions to return. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * The next_page_token value returned from a previous List request, if any. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The next_page_token value returned from a previous List request, if any. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Whether or not image versions from old releases should be included. - * - * Generated from protobuf field bool include_past_releases = 4; - * @return bool - */ - public function getIncludePastReleases() - { - return $this->include_past_releases; - } - - /** - * Whether or not image versions from old releases should be included. - * - * Generated from protobuf field bool include_past_releases = 4; - * @param bool $var - * @return $this - */ - public function setIncludePastReleases($var) - { - GPBUtil::checkBool($var); - $this->include_past_releases = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListImageVersionsResponse.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListImageVersionsResponse.php deleted file mode 100644 index 96b637d44898..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListImageVersionsResponse.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse - */ -class ListImageVersionsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of supported ImageVersions in a location. - * - * Generated from protobuf field repeated .google.cloud.orchestration.airflow.service.v1.ImageVersion image_versions = 1; - */ - private $image_versions; - /** - * The page token used to query for the next page if one exists. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Orchestration\Airflow\Service\V1\ImageVersion>|\Google\Protobuf\Internal\RepeatedField $image_versions - * The list of supported ImageVersions in a location. - * @type string $next_page_token - * The page token used to query for the next page if one exists. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\ImageVersions::initOnce(); - parent::__construct($data); - } - - /** - * The list of supported ImageVersions in a location. - * - * Generated from protobuf field repeated .google.cloud.orchestration.airflow.service.v1.ImageVersion image_versions = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getImageVersions() - { - return $this->image_versions; - } - - /** - * The list of supported ImageVersions in a location. - * - * Generated from protobuf field repeated .google.cloud.orchestration.airflow.service.v1.ImageVersion image_versions = 1; - * @param array<\Google\Cloud\Orchestration\Airflow\Service\V1\ImageVersion>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setImageVersions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Orchestration\Airflow\Service\V1\ImageVersion::class); - $this->image_versions = $arr; - - return $this; - } - - /** - * The page token used to query for the next page if one exists. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * The page token used to query for the next page if one exists. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListUserWorkloadsConfigMapsRequest.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListUserWorkloadsConfigMapsRequest.php deleted file mode 100644 index 2046af856140..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListUserWorkloadsConfigMapsRequest.php +++ /dev/null @@ -1,158 +0,0 @@ -google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest - */ -class ListUserWorkloadsConfigMapsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. List ConfigMaps in the given environment, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The maximum number of ConfigMaps to return. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. The next_page_token value returned from a previous List request, - * if any. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. List ConfigMaps in the given environment, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * Please see {@see EnvironmentsClient::environmentName()} for help formatting this field. - * - * @return \Google\Cloud\Orchestration\Airflow\Service\V1\ListUserWorkloadsConfigMapsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. List ConfigMaps in the given environment, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * @type int $page_size - * Optional. The maximum number of ConfigMaps to return. - * @type string $page_token - * Optional. The next_page_token value returned from a previous List request, - * if any. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); - parent::__construct($data); - } - - /** - * Required. List ConfigMaps in the given environment, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. List ConfigMaps in the given environment, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. The maximum number of ConfigMaps to return. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of ConfigMaps to return. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. The next_page_token value returned from a previous List request, - * if any. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. The next_page_token value returned from a previous List request, - * if any. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListUserWorkloadsConfigMapsResponse.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListUserWorkloadsConfigMapsResponse.php deleted file mode 100644 index 2f724620a158..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListUserWorkloadsConfigMapsResponse.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsResponse - */ -class ListUserWorkloadsConfigMapsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of ConfigMaps returned by a ListUserWorkloadsConfigMapsRequest. - * - * Generated from protobuf field repeated .google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap user_workloads_config_maps = 1; - */ - private $user_workloads_config_maps; - /** - * The page token used to query for the next page if one exists. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Orchestration\Airflow\Service\V1\UserWorkloadsConfigMap>|\Google\Protobuf\Internal\RepeatedField $user_workloads_config_maps - * The list of ConfigMaps returned by a ListUserWorkloadsConfigMapsRequest. - * @type string $next_page_token - * The page token used to query for the next page if one exists. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); - parent::__construct($data); - } - - /** - * The list of ConfigMaps returned by a ListUserWorkloadsConfigMapsRequest. - * - * Generated from protobuf field repeated .google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap user_workloads_config_maps = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUserWorkloadsConfigMaps() - { - return $this->user_workloads_config_maps; - } - - /** - * The list of ConfigMaps returned by a ListUserWorkloadsConfigMapsRequest. - * - * Generated from protobuf field repeated .google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap user_workloads_config_maps = 1; - * @param array<\Google\Cloud\Orchestration\Airflow\Service\V1\UserWorkloadsConfigMap>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUserWorkloadsConfigMaps($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Orchestration\Airflow\Service\V1\UserWorkloadsConfigMap::class); - $this->user_workloads_config_maps = $arr; - - return $this; - } - - /** - * The page token used to query for the next page if one exists. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * The page token used to query for the next page if one exists. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListUserWorkloadsSecretsRequest.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListUserWorkloadsSecretsRequest.php deleted file mode 100644 index 2033ac139f94..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListUserWorkloadsSecretsRequest.php +++ /dev/null @@ -1,158 +0,0 @@ -google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest - */ -class ListUserWorkloadsSecretsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. List Secrets in the given environment, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The maximum number of Secrets to return. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. The next_page_token value returned from a previous List request, - * if any. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. List Secrets in the given environment, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * Please see {@see EnvironmentsClient::environmentName()} for help formatting this field. - * - * @return \Google\Cloud\Orchestration\Airflow\Service\V1\ListUserWorkloadsSecretsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. List Secrets in the given environment, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * @type int $page_size - * Optional. The maximum number of Secrets to return. - * @type string $page_token - * Optional. The next_page_token value returned from a previous List request, - * if any. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); - parent::__construct($data); - } - - /** - * Required. List Secrets in the given environment, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. List Secrets in the given environment, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. The maximum number of Secrets to return. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of Secrets to return. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. The next_page_token value returned from a previous List request, - * if any. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. The next_page_token value returned from a previous List request, - * if any. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListUserWorkloadsSecretsResponse.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListUserWorkloadsSecretsResponse.php deleted file mode 100644 index 0719870695d3..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListUserWorkloadsSecretsResponse.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsResponse - */ -class ListUserWorkloadsSecretsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of Secrets returned by a ListUserWorkloadsSecretsRequest. - * - * Generated from protobuf field repeated .google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret user_workloads_secrets = 1; - */ - private $user_workloads_secrets; - /** - * The page token used to query for the next page if one exists. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Orchestration\Airflow\Service\V1\UserWorkloadsSecret>|\Google\Protobuf\Internal\RepeatedField $user_workloads_secrets - * The list of Secrets returned by a ListUserWorkloadsSecretsRequest. - * @type string $next_page_token - * The page token used to query for the next page if one exists. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); - parent::__construct($data); - } - - /** - * The list of Secrets returned by a ListUserWorkloadsSecretsRequest. - * - * Generated from protobuf field repeated .google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret user_workloads_secrets = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getUserWorkloadsSecrets() - { - return $this->user_workloads_secrets; - } - - /** - * The list of Secrets returned by a ListUserWorkloadsSecretsRequest. - * - * Generated from protobuf field repeated .google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret user_workloads_secrets = 1; - * @param array<\Google\Cloud\Orchestration\Airflow\Service\V1\UserWorkloadsSecret>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setUserWorkloadsSecrets($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Orchestration\Airflow\Service\V1\UserWorkloadsSecret::class); - $this->user_workloads_secrets = $arr; - - return $this; - } - - /** - * The page token used to query for the next page if one exists. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * The page token used to query for the next page if one exists. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListWorkloadsRequest.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListWorkloadsRequest.php deleted file mode 100644 index b52f55294277..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListWorkloadsRequest.php +++ /dev/null @@ -1,212 +0,0 @@ -google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest - */ -class ListWorkloadsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The environment name to get workloads for, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The maximum number of environments to return. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. The next_page_token value returned from a previous List request, - * if any. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. The list filter. - * Currently only supports equality on the type field. The value of a field - * specified in the filter expression must be one ComposerWorkloadType enum - * option. It's possible to get multiple types using "OR" operator, e.g.: - * "type=SCHEDULER OR type=CELERY_WORKER". If not specified, all items are - * returned. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - - /** - * @param string $parent Required. The environment name to get workloads for, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * Please see {@see EnvironmentsClient::environmentName()} for help formatting this field. - * - * @return \Google\Cloud\Orchestration\Airflow\Service\V1\ListWorkloadsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The environment name to get workloads for, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * @type int $page_size - * Optional. The maximum number of environments to return. - * @type string $page_token - * Optional. The next_page_token value returned from a previous List request, - * if any. - * @type string $filter - * Optional. The list filter. - * Currently only supports equality on the type field. The value of a field - * specified in the filter expression must be one ComposerWorkloadType enum - * option. It's possible to get multiple types using "OR" operator, e.g.: - * "type=SCHEDULER OR type=CELERY_WORKER". If not specified, all items are - * returned. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); - parent::__construct($data); - } - - /** - * Required. The environment name to get workloads for, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The environment name to get workloads for, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. The maximum number of environments to return. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of environments to return. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. The next_page_token value returned from a previous List request, - * if any. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. The next_page_token value returned from a previous List request, - * if any. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Optional. The list filter. - * Currently only supports equality on the type field. The value of a field - * specified in the filter expression must be one ComposerWorkloadType enum - * option. It's possible to get multiple types using "OR" operator, e.g.: - * "type=SCHEDULER OR type=CELERY_WORKER". If not specified, all items are - * returned. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. The list filter. - * Currently only supports equality on the type field. The value of a field - * specified in the filter expression must be one ComposerWorkloadType enum - * option. It's possible to get multiple types using "OR" operator, e.g.: - * "type=SCHEDULER OR type=CELERY_WORKER". If not specified, all items are - * returned. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListWorkloadsResponse.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListWorkloadsResponse.php deleted file mode 100644 index 4e83ea12af70..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListWorkloadsResponse.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse - */ -class ListWorkloadsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of environment workloads. - * - * Generated from protobuf field repeated .google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload workloads = 1; - */ - private $workloads; - /** - * The page token used to query for the next page if one exists. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Orchestration\Airflow\Service\V1\ListWorkloadsResponse\ComposerWorkload>|\Google\Protobuf\Internal\RepeatedField $workloads - * The list of environment workloads. - * @type string $next_page_token - * The page token used to query for the next page if one exists. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); - parent::__construct($data); - } - - /** - * The list of environment workloads. - * - * Generated from protobuf field repeated .google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload workloads = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getWorkloads() - { - return $this->workloads; - } - - /** - * The list of environment workloads. - * - * Generated from protobuf field repeated .google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload workloads = 1; - * @param array<\Google\Cloud\Orchestration\Airflow\Service\V1\ListWorkloadsResponse\ComposerWorkload>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setWorkloads($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Orchestration\Airflow\Service\V1\ListWorkloadsResponse\ComposerWorkload::class); - $this->workloads = $arr; - - return $this; - } - - /** - * The page token used to query for the next page if one exists. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * The page token used to query for the next page if one exists. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListWorkloadsResponse/ComposerWorkload.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListWorkloadsResponse/ComposerWorkload.php deleted file mode 100644 index aff0aa24b1c9..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListWorkloadsResponse/ComposerWorkload.php +++ /dev/null @@ -1,148 +0,0 @@ -google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload - */ -class ComposerWorkload extends \Google\Protobuf\Internal\Message -{ - /** - * Name of a workload. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Type of a workload. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadType type = 2; - */ - protected $type = 0; - /** - * Output only. Status of a workload. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadStatus status = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $status = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Name of a workload. - * @type int $type - * Type of a workload. - * @type \Google\Cloud\Orchestration\Airflow\Service\V1\ListWorkloadsResponse\ComposerWorkloadStatus $status - * Output only. Status of a workload. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); - parent::__construct($data); - } - - /** - * Name of a workload. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Name of a workload. - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Type of a workload. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadType type = 2; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Type of a workload. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadType type = 2; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Orchestration\Airflow\Service\V1\ListWorkloadsResponse\ComposerWorkloadType::class); - $this->type = $var; - - return $this; - } - - /** - * Output only. Status of a workload. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadStatus status = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Orchestration\Airflow\Service\V1\ListWorkloadsResponse\ComposerWorkloadStatus|null - */ - public function getStatus() - { - return $this->status; - } - - public function hasStatus() - { - return isset($this->status); - } - - public function clearStatus() - { - unset($this->status); - } - - /** - * Output only. Status of a workload. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadStatus status = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Orchestration\Airflow\Service\V1\ListWorkloadsResponse\ComposerWorkloadStatus $var - * @return $this - */ - public function setStatus($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Orchestration\Airflow\Service\V1\ListWorkloadsResponse\ComposerWorkloadStatus::class); - $this->status = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ComposerWorkload::class, \Google\Cloud\Orchestration\Airflow\Service\V1\ListWorkloadsResponse_ComposerWorkload::class); - diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListWorkloadsResponse/ComposerWorkloadState.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListWorkloadsResponse/ComposerWorkloadState.php deleted file mode 100644 index 51209700fb83..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListWorkloadsResponse/ComposerWorkloadState.php +++ /dev/null @@ -1,92 +0,0 @@ -google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadState - */ -class ComposerWorkloadState -{ - /** - * Not able to determine the status of the workload. - * - * Generated from protobuf enum COMPOSER_WORKLOAD_STATE_UNSPECIFIED = 0; - */ - const COMPOSER_WORKLOAD_STATE_UNSPECIFIED = 0; - /** - * Workload is in pending state and has not yet started. - * - * Generated from protobuf enum PENDING = 1; - */ - const PENDING = 1; - /** - * Workload is running fine. - * - * Generated from protobuf enum OK = 2; - */ - const OK = 2; - /** - * Workload is running but there are some non-critical problems. - * - * Generated from protobuf enum WARNING = 3; - */ - const WARNING = 3; - /** - * Workload is not running due to an error. - * - * Generated from protobuf enum ERROR = 4; - */ - const ERROR = 4; - /** - * Workload has finished execution with success. - * - * Generated from protobuf enum SUCCEEDED = 5; - */ - const SUCCEEDED = 5; - /** - * Workload has finished execution with failure. - * - * Generated from protobuf enum FAILED = 6; - */ - const FAILED = 6; - - private static $valueToName = [ - self::COMPOSER_WORKLOAD_STATE_UNSPECIFIED => 'COMPOSER_WORKLOAD_STATE_UNSPECIFIED', - self::PENDING => 'PENDING', - self::OK => 'OK', - self::WARNING => 'WARNING', - self::ERROR => 'ERROR', - self::SUCCEEDED => 'SUCCEEDED', - self::FAILED => 'FAILED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ComposerWorkloadState::class, \Google\Cloud\Orchestration\Airflow\Service\V1\ListWorkloadsResponse_ComposerWorkloadState::class); - diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListWorkloadsResponse/ComposerWorkloadStatus.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListWorkloadsResponse/ComposerWorkloadStatus.php deleted file mode 100644 index 836548218d32..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListWorkloadsResponse/ComposerWorkloadStatus.php +++ /dev/null @@ -1,138 +0,0 @@ -google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadStatus - */ -class ComposerWorkloadStatus extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Workload state. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadState state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. Text to provide more descriptive status. - * - * Generated from protobuf field string status_message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $status_message = ''; - /** - * Output only. Detailed message of the status. - * - * Generated from protobuf field string detailed_status_message = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $detailed_status_message = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $state - * Output only. Workload state. - * @type string $status_message - * Output only. Text to provide more descriptive status. - * @type string $detailed_status_message - * Output only. Detailed message of the status. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Workload state. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadState state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. Workload state. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadState state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Orchestration\Airflow\Service\V1\ListWorkloadsResponse\ComposerWorkloadState::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. Text to provide more descriptive status. - * - * Generated from protobuf field string status_message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getStatusMessage() - { - return $this->status_message; - } - - /** - * Output only. Text to provide more descriptive status. - * - * Generated from protobuf field string status_message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setStatusMessage($var) - { - GPBUtil::checkString($var, True); - $this->status_message = $var; - - return $this; - } - - /** - * Output only. Detailed message of the status. - * - * Generated from protobuf field string detailed_status_message = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getDetailedStatusMessage() - { - return $this->detailed_status_message; - } - - /** - * Output only. Detailed message of the status. - * - * Generated from protobuf field string detailed_status_message = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setDetailedStatusMessage($var) - { - GPBUtil::checkString($var, True); - $this->detailed_status_message = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ComposerWorkloadStatus::class, \Google\Cloud\Orchestration\Airflow\Service\V1\ListWorkloadsResponse_ComposerWorkloadStatus::class); - diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListWorkloadsResponse/ComposerWorkloadType.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListWorkloadsResponse/ComposerWorkloadType.php deleted file mode 100644 index 2753ce300497..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ListWorkloadsResponse/ComposerWorkloadType.php +++ /dev/null @@ -1,106 +0,0 @@ -google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadType - */ -class ComposerWorkloadType -{ - /** - * Not able to determine the type of the workload. - * - * Generated from protobuf enum COMPOSER_WORKLOAD_TYPE_UNSPECIFIED = 0; - */ - const COMPOSER_WORKLOAD_TYPE_UNSPECIFIED = 0; - /** - * Celery worker. - * - * Generated from protobuf enum CELERY_WORKER = 1; - */ - const CELERY_WORKER = 1; - /** - * Kubernetes worker. - * - * Generated from protobuf enum KUBERNETES_WORKER = 2; - */ - const KUBERNETES_WORKER = 2; - /** - * Workload created by Kubernetes Pod Operator. - * - * Generated from protobuf enum KUBERNETES_OPERATOR_POD = 3; - */ - const KUBERNETES_OPERATOR_POD = 3; - /** - * Airflow scheduler. - * - * Generated from protobuf enum SCHEDULER = 4; - */ - const SCHEDULER = 4; - /** - * Airflow Dag processor. - * - * Generated from protobuf enum DAG_PROCESSOR = 5; - */ - const DAG_PROCESSOR = 5; - /** - * Airflow triggerer. - * - * Generated from protobuf enum TRIGGERER = 6; - */ - const TRIGGERER = 6; - /** - * Airflow web server UI. - * - * Generated from protobuf enum WEB_SERVER = 7; - */ - const WEB_SERVER = 7; - /** - * Redis. - * - * Generated from protobuf enum REDIS = 8; - */ - const REDIS = 8; - - private static $valueToName = [ - self::COMPOSER_WORKLOAD_TYPE_UNSPECIFIED => 'COMPOSER_WORKLOAD_TYPE_UNSPECIFIED', - self::CELERY_WORKER => 'CELERY_WORKER', - self::KUBERNETES_WORKER => 'KUBERNETES_WORKER', - self::KUBERNETES_OPERATOR_POD => 'KUBERNETES_OPERATOR_POD', - self::SCHEDULER => 'SCHEDULER', - self::DAG_PROCESSOR => 'DAG_PROCESSOR', - self::TRIGGERER => 'TRIGGERER', - self::WEB_SERVER => 'WEB_SERVER', - self::REDIS => 'REDIS', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ComposerWorkloadType::class, \Google\Cloud\Orchestration\Airflow\Service\V1\ListWorkloadsResponse_ComposerWorkloadType::class); - diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/LoadSnapshotRequest.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/LoadSnapshotRequest.php deleted file mode 100644 index fe4126d9df59..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/LoadSnapshotRequest.php +++ /dev/null @@ -1,261 +0,0 @@ -google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest - */ -class LoadSnapshotRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the target environment in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * - * Generated from protobuf field string environment = 1; - */ - protected $environment = ''; - /** - * A Cloud Storage path to a snapshot to load, e.g.: - * "gs://my-bucket/snapshots/project_location_environment_timestamp". - * - * Generated from protobuf field string snapshot_path = 2; - */ - protected $snapshot_path = ''; - /** - * Whether or not to skip installing Pypi packages when loading the - * environment's state. - * - * Generated from protobuf field bool skip_pypi_packages_installation = 3; - */ - protected $skip_pypi_packages_installation = false; - /** - * Whether or not to skip setting environment variables when loading the - * environment's state. - * - * Generated from protobuf field bool skip_environment_variables_setting = 4; - */ - protected $skip_environment_variables_setting = false; - /** - * Whether or not to skip setting Airflow overrides when loading the - * environment's state. - * - * Generated from protobuf field bool skip_airflow_overrides_setting = 5; - */ - protected $skip_airflow_overrides_setting = false; - /** - * Whether or not to skip copying Cloud Storage data when loading the - * environment's state. - * - * Generated from protobuf field bool skip_gcs_data_copying = 6; - */ - protected $skip_gcs_data_copying = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $environment - * The resource name of the target environment in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * @type string $snapshot_path - * A Cloud Storage path to a snapshot to load, e.g.: - * "gs://my-bucket/snapshots/project_location_environment_timestamp". - * @type bool $skip_pypi_packages_installation - * Whether or not to skip installing Pypi packages when loading the - * environment's state. - * @type bool $skip_environment_variables_setting - * Whether or not to skip setting environment variables when loading the - * environment's state. - * @type bool $skip_airflow_overrides_setting - * Whether or not to skip setting Airflow overrides when loading the - * environment's state. - * @type bool $skip_gcs_data_copying - * Whether or not to skip copying Cloud Storage data when loading the - * environment's state. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the target environment in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * - * Generated from protobuf field string environment = 1; - * @return string - */ - public function getEnvironment() - { - return $this->environment; - } - - /** - * The resource name of the target environment in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * - * Generated from protobuf field string environment = 1; - * @param string $var - * @return $this - */ - public function setEnvironment($var) - { - GPBUtil::checkString($var, True); - $this->environment = $var; - - return $this; - } - - /** - * A Cloud Storage path to a snapshot to load, e.g.: - * "gs://my-bucket/snapshots/project_location_environment_timestamp". - * - * Generated from protobuf field string snapshot_path = 2; - * @return string - */ - public function getSnapshotPath() - { - return $this->snapshot_path; - } - - /** - * A Cloud Storage path to a snapshot to load, e.g.: - * "gs://my-bucket/snapshots/project_location_environment_timestamp". - * - * Generated from protobuf field string snapshot_path = 2; - * @param string $var - * @return $this - */ - public function setSnapshotPath($var) - { - GPBUtil::checkString($var, True); - $this->snapshot_path = $var; - - return $this; - } - - /** - * Whether or not to skip installing Pypi packages when loading the - * environment's state. - * - * Generated from protobuf field bool skip_pypi_packages_installation = 3; - * @return bool - */ - public function getSkipPypiPackagesInstallation() - { - return $this->skip_pypi_packages_installation; - } - - /** - * Whether or not to skip installing Pypi packages when loading the - * environment's state. - * - * Generated from protobuf field bool skip_pypi_packages_installation = 3; - * @param bool $var - * @return $this - */ - public function setSkipPypiPackagesInstallation($var) - { - GPBUtil::checkBool($var); - $this->skip_pypi_packages_installation = $var; - - return $this; - } - - /** - * Whether or not to skip setting environment variables when loading the - * environment's state. - * - * Generated from protobuf field bool skip_environment_variables_setting = 4; - * @return bool - */ - public function getSkipEnvironmentVariablesSetting() - { - return $this->skip_environment_variables_setting; - } - - /** - * Whether or not to skip setting environment variables when loading the - * environment's state. - * - * Generated from protobuf field bool skip_environment_variables_setting = 4; - * @param bool $var - * @return $this - */ - public function setSkipEnvironmentVariablesSetting($var) - { - GPBUtil::checkBool($var); - $this->skip_environment_variables_setting = $var; - - return $this; - } - - /** - * Whether or not to skip setting Airflow overrides when loading the - * environment's state. - * - * Generated from protobuf field bool skip_airflow_overrides_setting = 5; - * @return bool - */ - public function getSkipAirflowOverridesSetting() - { - return $this->skip_airflow_overrides_setting; - } - - /** - * Whether or not to skip setting Airflow overrides when loading the - * environment's state. - * - * Generated from protobuf field bool skip_airflow_overrides_setting = 5; - * @param bool $var - * @return $this - */ - public function setSkipAirflowOverridesSetting($var) - { - GPBUtil::checkBool($var); - $this->skip_airflow_overrides_setting = $var; - - return $this; - } - - /** - * Whether or not to skip copying Cloud Storage data when loading the - * environment's state. - * - * Generated from protobuf field bool skip_gcs_data_copying = 6; - * @return bool - */ - public function getSkipGcsDataCopying() - { - return $this->skip_gcs_data_copying; - } - - /** - * Whether or not to skip copying Cloud Storage data when loading the - * environment's state. - * - * Generated from protobuf field bool skip_gcs_data_copying = 6; - * @param bool $var - * @return $this - */ - public function setSkipGcsDataCopying($var) - { - GPBUtil::checkBool($var); - $this->skip_gcs_data_copying = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/LoadSnapshotResponse.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/LoadSnapshotResponse.php deleted file mode 100644 index 1ab2fa70867e..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/LoadSnapshotResponse.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.orchestration.airflow.service.v1.LoadSnapshotResponse - */ -class LoadSnapshotResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/MaintenanceWindow.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/MaintenanceWindow.php deleted file mode 100644 index da4c28d1f6e9..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/MaintenanceWindow.php +++ /dev/null @@ -1,185 +0,0 @@ -google.cloud.orchestration.airflow.service.v1.MaintenanceWindow - */ -class MaintenanceWindow extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Start time of the first recurrence of the maintenance window. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $start_time = null; - /** - * Required. Maintenance window end time. It is used only to calculate the - * duration of the maintenance window. The value for end-time must be in the - * future, relative to `start_time`. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $end_time = null; - /** - * Required. Maintenance window recurrence. Format is a subset of - * [RFC-5545](https://tools.ietf.org/html/rfc5545) `RRULE`. The only allowed - * values for `FREQ` field are `FREQ=DAILY` and `FREQ=WEEKLY;BYDAY=...` - * Example values: `FREQ=WEEKLY;BYDAY=TU,WE`, `FREQ=DAILY`. - * - * Generated from protobuf field string recurrence = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $recurrence = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $start_time - * Required. Start time of the first recurrence of the maintenance window. - * @type \Google\Protobuf\Timestamp $end_time - * Required. Maintenance window end time. It is used only to calculate the - * duration of the maintenance window. The value for end-time must be in the - * future, relative to `start_time`. - * @type string $recurrence - * Required. Maintenance window recurrence. Format is a subset of - * [RFC-5545](https://tools.ietf.org/html/rfc5545) `RRULE`. The only allowed - * values for `FREQ` field are `FREQ=DAILY` and `FREQ=WEEKLY;BYDAY=...` - * Example values: `FREQ=WEEKLY;BYDAY=TU,WE`, `FREQ=DAILY`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); - parent::__construct($data); - } - - /** - * Required. Start time of the first recurrence of the maintenance window. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStartTime() - { - return $this->start_time; - } - - public function hasStartTime() - { - return isset($this->start_time); - } - - public function clearStartTime() - { - unset($this->start_time); - } - - /** - * Required. Start time of the first recurrence of the maintenance window. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * Required. Maintenance window end time. It is used only to calculate the - * duration of the maintenance window. The value for end-time must be in the - * future, relative to `start_time`. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * Required. Maintenance window end time. It is used only to calculate the - * duration of the maintenance window. The value for end-time must be in the - * future, relative to `start_time`. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * Required. Maintenance window recurrence. Format is a subset of - * [RFC-5545](https://tools.ietf.org/html/rfc5545) `RRULE`. The only allowed - * values for `FREQ` field are `FREQ=DAILY` and `FREQ=WEEKLY;BYDAY=...` - * Example values: `FREQ=WEEKLY;BYDAY=TU,WE`, `FREQ=DAILY`. - * - * Generated from protobuf field string recurrence = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getRecurrence() - { - return $this->recurrence; - } - - /** - * Required. Maintenance window recurrence. Format is a subset of - * [RFC-5545](https://tools.ietf.org/html/rfc5545) `RRULE`. The only allowed - * values for `FREQ` field are `FREQ=DAILY` and `FREQ=WEEKLY;BYDAY=...` - * Example values: `FREQ=WEEKLY;BYDAY=TU,WE`, `FREQ=DAILY`. - * - * Generated from protobuf field string recurrence = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setRecurrence($var) - { - GPBUtil::checkString($var, True); - $this->recurrence = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/MasterAuthorizedNetworksConfig.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/MasterAuthorizedNetworksConfig.php deleted file mode 100644 index e7c09c6da662..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/MasterAuthorizedNetworksConfig.php +++ /dev/null @@ -1,108 +0,0 @@ -google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig - */ -class MasterAuthorizedNetworksConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Whether or not master authorized networks feature is enabled. - * - * Generated from protobuf field bool enabled = 1; - */ - protected $enabled = false; - /** - * Up to 50 external networks that could access Kubernetes master through - * HTTPS. - * - * Generated from protobuf field repeated .google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.CidrBlock cidr_blocks = 2; - */ - private $cidr_blocks; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $enabled - * Whether or not master authorized networks feature is enabled. - * @type array<\Google\Cloud\Orchestration\Airflow\Service\V1\MasterAuthorizedNetworksConfig\CidrBlock>|\Google\Protobuf\Internal\RepeatedField $cidr_blocks - * Up to 50 external networks that could access Kubernetes master through - * HTTPS. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); - parent::__construct($data); - } - - /** - * Whether or not master authorized networks feature is enabled. - * - * Generated from protobuf field bool enabled = 1; - * @return bool - */ - public function getEnabled() - { - return $this->enabled; - } - - /** - * Whether or not master authorized networks feature is enabled. - * - * Generated from protobuf field bool enabled = 1; - * @param bool $var - * @return $this - */ - public function setEnabled($var) - { - GPBUtil::checkBool($var); - $this->enabled = $var; - - return $this; - } - - /** - * Up to 50 external networks that could access Kubernetes master through - * HTTPS. - * - * Generated from protobuf field repeated .google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.CidrBlock cidr_blocks = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCidrBlocks() - { - return $this->cidr_blocks; - } - - /** - * Up to 50 external networks that could access Kubernetes master through - * HTTPS. - * - * Generated from protobuf field repeated .google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.CidrBlock cidr_blocks = 2; - * @param array<\Google\Cloud\Orchestration\Airflow\Service\V1\MasterAuthorizedNetworksConfig\CidrBlock>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCidrBlocks($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Orchestration\Airflow\Service\V1\MasterAuthorizedNetworksConfig\CidrBlock::class); - $this->cidr_blocks = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/MasterAuthorizedNetworksConfig/CidrBlock.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/MasterAuthorizedNetworksConfig/CidrBlock.php deleted file mode 100644 index b93272c13e12..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/MasterAuthorizedNetworksConfig/CidrBlock.php +++ /dev/null @@ -1,104 +0,0 @@ -google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.CidrBlock - */ -class CidrBlock extends \Google\Protobuf\Internal\Message -{ - /** - * User-defined name that identifies the CIDR block. - * - * Generated from protobuf field string display_name = 1; - */ - protected $display_name = ''; - /** - * CIDR block that must be specified in CIDR notation. - * - * Generated from protobuf field string cidr_block = 2; - */ - protected $cidr_block = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $display_name - * User-defined name that identifies the CIDR block. - * @type string $cidr_block - * CIDR block that must be specified in CIDR notation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); - parent::__construct($data); - } - - /** - * User-defined name that identifies the CIDR block. - * - * Generated from protobuf field string display_name = 1; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * User-defined name that identifies the CIDR block. - * - * Generated from protobuf field string display_name = 1; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * CIDR block that must be specified in CIDR notation. - * - * Generated from protobuf field string cidr_block = 2; - * @return string - */ - public function getCidrBlock() - { - return $this->cidr_block; - } - - /** - * CIDR block that must be specified in CIDR notation. - * - * Generated from protobuf field string cidr_block = 2; - * @param string $var - * @return $this - */ - public function setCidrBlock($var) - { - GPBUtil::checkString($var, True); - $this->cidr_block = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CidrBlock::class, \Google\Cloud\Orchestration\Airflow\Service\V1\MasterAuthorizedNetworksConfig_CidrBlock::class); - diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/NetworkingConfig.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/NetworkingConfig.php deleted file mode 100644 index 104b52d25dc8..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/NetworkingConfig.php +++ /dev/null @@ -1,76 +0,0 @@ -google.cloud.orchestration.airflow.service.v1.NetworkingConfig - */ -class NetworkingConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Indicates the user requested specifc connection type between - * Tenant and Customer projects. You cannot set networking connection type in - * public IP environment. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.NetworkingConfig.ConnectionType connection_type = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $connection_type = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $connection_type - * Optional. Indicates the user requested specifc connection type between - * Tenant and Customer projects. You cannot set networking connection type in - * public IP environment. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Indicates the user requested specifc connection type between - * Tenant and Customer projects. You cannot set networking connection type in - * public IP environment. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.NetworkingConfig.ConnectionType connection_type = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getConnectionType() - { - return $this->connection_type; - } - - /** - * Optional. Indicates the user requested specifc connection type between - * Tenant and Customer projects. You cannot set networking connection type in - * public IP environment. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.NetworkingConfig.ConnectionType connection_type = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setConnectionType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Orchestration\Airflow\Service\V1\NetworkingConfig\ConnectionType::class); - $this->connection_type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/NetworkingConfig/ConnectionType.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/NetworkingConfig/ConnectionType.php deleted file mode 100644 index 605bfc310b9c..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/NetworkingConfig/ConnectionType.php +++ /dev/null @@ -1,69 +0,0 @@ -google.cloud.orchestration.airflow.service.v1.NetworkingConfig.ConnectionType - */ -class ConnectionType -{ - /** - * No specific connection type was requested, so the environment uses - * the default value corresponding to the rest of its configuration. - * - * Generated from protobuf enum CONNECTION_TYPE_UNSPECIFIED = 0; - */ - const CONNECTION_TYPE_UNSPECIFIED = 0; - /** - * Requests the use of VPC peerings for connecting the Customer and Tenant - * projects. - * - * Generated from protobuf enum VPC_PEERING = 1; - */ - const VPC_PEERING = 1; - /** - * Requests the use of Private Service Connect for connecting the Customer - * and Tenant projects. - * - * Generated from protobuf enum PRIVATE_SERVICE_CONNECT = 2; - */ - const PRIVATE_SERVICE_CONNECT = 2; - - private static $valueToName = [ - self::CONNECTION_TYPE_UNSPECIFIED => 'CONNECTION_TYPE_UNSPECIFIED', - self::VPC_PEERING => 'VPC_PEERING', - self::PRIVATE_SERVICE_CONNECT => 'PRIVATE_SERVICE_CONNECT', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ConnectionType::class, \Google\Cloud\Orchestration\Airflow\Service\V1\NetworkingConfig_ConnectionType::class); - diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/NodeConfig.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/NodeConfig.php deleted file mode 100644 index c9834b267eb0..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/NodeConfig.php +++ /dev/null @@ -1,776 +0,0 @@ -google.cloud.orchestration.airflow.service.v1.NodeConfig - */ -class NodeConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The Compute Engine [zone](/compute/docs/regions-zones) in which - * to deploy the VMs used to run the Apache Airflow software, specified as a - * [relative resource - * name](/apis/design/resource_names#relative_resource_name). For example: - * "projects/{projectId}/zones/{zoneId}". - * This `location` must belong to the enclosing environment's project and - * location. If both this field and `nodeConfig.machineType` are specified, - * `nodeConfig.machineType` must belong to this `location`; if both are - * unspecified, the service will pick a zone in the Compute Engine region - * corresponding to the Cloud Composer location, and propagate that choice to - * both fields. If only one field (`location` or `nodeConfig.machineType`) is - * specified, the location information from the specified field will be - * propagated to the unspecified field. - * This field is supported for Cloud Composer environments in versions - * composer-1.*.*-airflow-*.*.*. - * - * Generated from protobuf field string location = 1; - */ - protected $location = ''; - /** - * Optional. The Compute Engine - * [machine type](/compute/docs/machine-types) used for cluster instances, - * specified as a - * [relative resource - * name](/apis/design/resource_names#relative_resource_name). For example: - * "projects/{projectId}/zones/{zoneId}/machineTypes/{machineTypeId}". - * The `machineType` must belong to the enclosing environment's project and - * location. If both this field and `nodeConfig.location` are specified, - * this `machineType` must belong to the `nodeConfig.location`; if both are - * unspecified, the service will pick a zone in the Compute Engine region - * corresponding to the Cloud Composer location, and propagate that choice to - * both fields. If exactly one of this field and `nodeConfig.location` is - * specified, the location information from the specified field will be - * propagated to the unspecified field. - * The `machineTypeId` must not be a [shared-core machine - * type](/compute/docs/machine-types#sharedcore). - * If this field is unspecified, the `machineTypeId` defaults - * to "n1-standard-1". - * This field is supported for Cloud Composer environments in versions - * composer-1.*.*-airflow-*.*.*. - * - * Generated from protobuf field string machine_type = 2; - */ - protected $machine_type = ''; - /** - * Optional. The Compute Engine network to be used for machine - * communications, specified as a - * [relative resource - * name](/apis/design/resource_names#relative_resource_name). For example: - * "projects/{projectId}/global/networks/{networkId}". - * If unspecified, the "default" network ID in the environment's project is - * used. If a [Custom Subnet Network](/vpc/docs/vpc#vpc_networks_and_subnets) - * is provided, `nodeConfig.subnetwork` must also be provided. For - * [Shared VPC](/vpc/docs/shared-vpc) subnetwork requirements, see - * `nodeConfig.subnetwork`. - * - * Generated from protobuf field string network = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $network = ''; - /** - * Optional. The Compute Engine subnetwork to be used for machine - * communications, specified as a - * [relative resource - * name](/apis/design/resource_names#relative_resource_name). For example: - * "projects/{projectId}/regions/{regionId}/subnetworks/{subnetworkId}" - * If a subnetwork is provided, `nodeConfig.network` must also be provided, - * and the subnetwork must belong to the enclosing environment's project and - * location. - * - * Generated from protobuf field string subnetwork = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $subnetwork = ''; - /** - * Optional. The disk size in GB used for node VMs. Minimum size is 30GB. - * If unspecified, defaults to 100GB. Cannot be updated. - * This field is supported for Cloud Composer environments in versions - * composer-1.*.*-airflow-*.*.*. - * - * Generated from protobuf field int32 disk_size_gb = 5; - */ - protected $disk_size_gb = 0; - /** - * Optional. The set of Google API scopes to be made available on all - * node VMs. If `oauth_scopes` is empty, defaults to - * ["https://www.googleapis.com/auth/cloud-platform"]. Cannot be updated. - * This field is supported for Cloud Composer environments in versions - * composer-1.*.*-airflow-*.*.*. - * - * Generated from protobuf field repeated string oauth_scopes = 6; - */ - private $oauth_scopes; - /** - * Optional. The Google Cloud Platform Service Account to be used by the node - * VMs. If a service account is not specified, the "default" Compute Engine - * service account is used. Cannot be updated. - * - * Generated from protobuf field string service_account = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $service_account = ''; - /** - * Optional. The list of instance tags applied to all node VMs. Tags are used - * to identify valid sources or targets for network firewalls. Each tag within - * the list must comply with [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). - * Cannot be updated. - * - * Generated from protobuf field repeated string tags = 8; - */ - private $tags; - /** - * Optional. The configuration for controlling how IPs are allocated in the - * GKE cluster. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy ip_allocation_policy = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $ip_allocation_policy = null; - /** - * Optional. Deploys 'ip-masq-agent' daemon set in the GKE cluster and defines - * nonMasqueradeCIDRs equals to pod IP range so IP masquerading is used for - * all destination addresses, except between pods traffic. - * See: - * https://cloud.google.com/kubernetes-engine/docs/how-to/ip-masquerade-agent - * - * Generated from protobuf field bool enable_ip_masq_agent = 11 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $enable_ip_masq_agent = false; - /** - * Optional. Network Attachment that Cloud Composer environment is connected - * to, which provides connectivity with a user's VPC network. Takes precedence - * over network and subnetwork settings. If not provided, but network and - * subnetwork are defined during environment, it will be provisioned. If not - * provided and network and subnetwork are also empty, then connectivity to - * user's VPC network is disabled. Network attachment must be provided in - * format - * projects/{project}/regions/{region}/networkAttachments/{networkAttachment}. - * This field is supported for Cloud Composer environments in versions - * composer-3.*.*-airflow-*.*.* and newer. - * - * Generated from protobuf field string composer_network_attachment = 12 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $composer_network_attachment = ''; - /** - * Optional. The IP range in CIDR notation to use internally by Cloud - * Composer. IP addresses are not reserved - and the same range can be used by - * multiple Cloud Composer environments. In case of overlap, IPs from this - * range will not be accessible in the user's VPC network. Cannot be updated. - * If not specified, the default value of '100.64.128.0/20' is used. - * This field is supported for Cloud Composer environments in versions - * composer-3.*.*-airflow-*.*.* and newer. - * - * Generated from protobuf field string composer_internal_ipv4_cidr_block = 13 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $composer_internal_ipv4_cidr_block = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $location - * Optional. The Compute Engine [zone](/compute/docs/regions-zones) in which - * to deploy the VMs used to run the Apache Airflow software, specified as a - * [relative resource - * name](/apis/design/resource_names#relative_resource_name). For example: - * "projects/{projectId}/zones/{zoneId}". - * This `location` must belong to the enclosing environment's project and - * location. If both this field and `nodeConfig.machineType` are specified, - * `nodeConfig.machineType` must belong to this `location`; if both are - * unspecified, the service will pick a zone in the Compute Engine region - * corresponding to the Cloud Composer location, and propagate that choice to - * both fields. If only one field (`location` or `nodeConfig.machineType`) is - * specified, the location information from the specified field will be - * propagated to the unspecified field. - * This field is supported for Cloud Composer environments in versions - * composer-1.*.*-airflow-*.*.*. - * @type string $machine_type - * Optional. The Compute Engine - * [machine type](/compute/docs/machine-types) used for cluster instances, - * specified as a - * [relative resource - * name](/apis/design/resource_names#relative_resource_name). For example: - * "projects/{projectId}/zones/{zoneId}/machineTypes/{machineTypeId}". - * The `machineType` must belong to the enclosing environment's project and - * location. If both this field and `nodeConfig.location` are specified, - * this `machineType` must belong to the `nodeConfig.location`; if both are - * unspecified, the service will pick a zone in the Compute Engine region - * corresponding to the Cloud Composer location, and propagate that choice to - * both fields. If exactly one of this field and `nodeConfig.location` is - * specified, the location information from the specified field will be - * propagated to the unspecified field. - * The `machineTypeId` must not be a [shared-core machine - * type](/compute/docs/machine-types#sharedcore). - * If this field is unspecified, the `machineTypeId` defaults - * to "n1-standard-1". - * This field is supported for Cloud Composer environments in versions - * composer-1.*.*-airflow-*.*.*. - * @type string $network - * Optional. The Compute Engine network to be used for machine - * communications, specified as a - * [relative resource - * name](/apis/design/resource_names#relative_resource_name). For example: - * "projects/{projectId}/global/networks/{networkId}". - * If unspecified, the "default" network ID in the environment's project is - * used. If a [Custom Subnet Network](/vpc/docs/vpc#vpc_networks_and_subnets) - * is provided, `nodeConfig.subnetwork` must also be provided. For - * [Shared VPC](/vpc/docs/shared-vpc) subnetwork requirements, see - * `nodeConfig.subnetwork`. - * @type string $subnetwork - * Optional. The Compute Engine subnetwork to be used for machine - * communications, specified as a - * [relative resource - * name](/apis/design/resource_names#relative_resource_name). For example: - * "projects/{projectId}/regions/{regionId}/subnetworks/{subnetworkId}" - * If a subnetwork is provided, `nodeConfig.network` must also be provided, - * and the subnetwork must belong to the enclosing environment's project and - * location. - * @type int $disk_size_gb - * Optional. The disk size in GB used for node VMs. Minimum size is 30GB. - * If unspecified, defaults to 100GB. Cannot be updated. - * This field is supported for Cloud Composer environments in versions - * composer-1.*.*-airflow-*.*.*. - * @type array|\Google\Protobuf\Internal\RepeatedField $oauth_scopes - * Optional. The set of Google API scopes to be made available on all - * node VMs. If `oauth_scopes` is empty, defaults to - * ["https://www.googleapis.com/auth/cloud-platform"]. Cannot be updated. - * This field is supported for Cloud Composer environments in versions - * composer-1.*.*-airflow-*.*.*. - * @type string $service_account - * Optional. The Google Cloud Platform Service Account to be used by the node - * VMs. If a service account is not specified, the "default" Compute Engine - * service account is used. Cannot be updated. - * @type array|\Google\Protobuf\Internal\RepeatedField $tags - * Optional. The list of instance tags applied to all node VMs. Tags are used - * to identify valid sources or targets for network firewalls. Each tag within - * the list must comply with [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). - * Cannot be updated. - * @type \Google\Cloud\Orchestration\Airflow\Service\V1\IPAllocationPolicy $ip_allocation_policy - * Optional. The configuration for controlling how IPs are allocated in the - * GKE cluster. - * @type bool $enable_ip_masq_agent - * Optional. Deploys 'ip-masq-agent' daemon set in the GKE cluster and defines - * nonMasqueradeCIDRs equals to pod IP range so IP masquerading is used for - * all destination addresses, except between pods traffic. - * See: - * https://cloud.google.com/kubernetes-engine/docs/how-to/ip-masquerade-agent - * @type string $composer_network_attachment - * Optional. Network Attachment that Cloud Composer environment is connected - * to, which provides connectivity with a user's VPC network. Takes precedence - * over network and subnetwork settings. If not provided, but network and - * subnetwork are defined during environment, it will be provisioned. If not - * provided and network and subnetwork are also empty, then connectivity to - * user's VPC network is disabled. Network attachment must be provided in - * format - * projects/{project}/regions/{region}/networkAttachments/{networkAttachment}. - * This field is supported for Cloud Composer environments in versions - * composer-3.*.*-airflow-*.*.* and newer. - * @type string $composer_internal_ipv4_cidr_block - * Optional. The IP range in CIDR notation to use internally by Cloud - * Composer. IP addresses are not reserved - and the same range can be used by - * multiple Cloud Composer environments. In case of overlap, IPs from this - * range will not be accessible in the user's VPC network. Cannot be updated. - * If not specified, the default value of '100.64.128.0/20' is used. - * This field is supported for Cloud Composer environments in versions - * composer-3.*.*-airflow-*.*.* and newer. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The Compute Engine [zone](/compute/docs/regions-zones) in which - * to deploy the VMs used to run the Apache Airflow software, specified as a - * [relative resource - * name](/apis/design/resource_names#relative_resource_name). For example: - * "projects/{projectId}/zones/{zoneId}". - * This `location` must belong to the enclosing environment's project and - * location. If both this field and `nodeConfig.machineType` are specified, - * `nodeConfig.machineType` must belong to this `location`; if both are - * unspecified, the service will pick a zone in the Compute Engine region - * corresponding to the Cloud Composer location, and propagate that choice to - * both fields. If only one field (`location` or `nodeConfig.machineType`) is - * specified, the location information from the specified field will be - * propagated to the unspecified field. - * This field is supported for Cloud Composer environments in versions - * composer-1.*.*-airflow-*.*.*. - * - * Generated from protobuf field string location = 1; - * @return string - */ - public function getLocation() - { - return $this->location; - } - - /** - * Optional. The Compute Engine [zone](/compute/docs/regions-zones) in which - * to deploy the VMs used to run the Apache Airflow software, specified as a - * [relative resource - * name](/apis/design/resource_names#relative_resource_name). For example: - * "projects/{projectId}/zones/{zoneId}". - * This `location` must belong to the enclosing environment's project and - * location. If both this field and `nodeConfig.machineType` are specified, - * `nodeConfig.machineType` must belong to this `location`; if both are - * unspecified, the service will pick a zone in the Compute Engine region - * corresponding to the Cloud Composer location, and propagate that choice to - * both fields. If only one field (`location` or `nodeConfig.machineType`) is - * specified, the location information from the specified field will be - * propagated to the unspecified field. - * This field is supported for Cloud Composer environments in versions - * composer-1.*.*-airflow-*.*.*. - * - * Generated from protobuf field string location = 1; - * @param string $var - * @return $this - */ - public function setLocation($var) - { - GPBUtil::checkString($var, True); - $this->location = $var; - - return $this; - } - - /** - * Optional. The Compute Engine - * [machine type](/compute/docs/machine-types) used for cluster instances, - * specified as a - * [relative resource - * name](/apis/design/resource_names#relative_resource_name). For example: - * "projects/{projectId}/zones/{zoneId}/machineTypes/{machineTypeId}". - * The `machineType` must belong to the enclosing environment's project and - * location. If both this field and `nodeConfig.location` are specified, - * this `machineType` must belong to the `nodeConfig.location`; if both are - * unspecified, the service will pick a zone in the Compute Engine region - * corresponding to the Cloud Composer location, and propagate that choice to - * both fields. If exactly one of this field and `nodeConfig.location` is - * specified, the location information from the specified field will be - * propagated to the unspecified field. - * The `machineTypeId` must not be a [shared-core machine - * type](/compute/docs/machine-types#sharedcore). - * If this field is unspecified, the `machineTypeId` defaults - * to "n1-standard-1". - * This field is supported for Cloud Composer environments in versions - * composer-1.*.*-airflow-*.*.*. - * - * Generated from protobuf field string machine_type = 2; - * @return string - */ - public function getMachineType() - { - return $this->machine_type; - } - - /** - * Optional. The Compute Engine - * [machine type](/compute/docs/machine-types) used for cluster instances, - * specified as a - * [relative resource - * name](/apis/design/resource_names#relative_resource_name). For example: - * "projects/{projectId}/zones/{zoneId}/machineTypes/{machineTypeId}". - * The `machineType` must belong to the enclosing environment's project and - * location. If both this field and `nodeConfig.location` are specified, - * this `machineType` must belong to the `nodeConfig.location`; if both are - * unspecified, the service will pick a zone in the Compute Engine region - * corresponding to the Cloud Composer location, and propagate that choice to - * both fields. If exactly one of this field and `nodeConfig.location` is - * specified, the location information from the specified field will be - * propagated to the unspecified field. - * The `machineTypeId` must not be a [shared-core machine - * type](/compute/docs/machine-types#sharedcore). - * If this field is unspecified, the `machineTypeId` defaults - * to "n1-standard-1". - * This field is supported for Cloud Composer environments in versions - * composer-1.*.*-airflow-*.*.*. - * - * Generated from protobuf field string machine_type = 2; - * @param string $var - * @return $this - */ - public function setMachineType($var) - { - GPBUtil::checkString($var, True); - $this->machine_type = $var; - - return $this; - } - - /** - * Optional. The Compute Engine network to be used for machine - * communications, specified as a - * [relative resource - * name](/apis/design/resource_names#relative_resource_name). For example: - * "projects/{projectId}/global/networks/{networkId}". - * If unspecified, the "default" network ID in the environment's project is - * used. If a [Custom Subnet Network](/vpc/docs/vpc#vpc_networks_and_subnets) - * is provided, `nodeConfig.subnetwork` must also be provided. For - * [Shared VPC](/vpc/docs/shared-vpc) subnetwork requirements, see - * `nodeConfig.subnetwork`. - * - * Generated from protobuf field string network = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getNetwork() - { - return $this->network; - } - - /** - * Optional. The Compute Engine network to be used for machine - * communications, specified as a - * [relative resource - * name](/apis/design/resource_names#relative_resource_name). For example: - * "projects/{projectId}/global/networks/{networkId}". - * If unspecified, the "default" network ID in the environment's project is - * used. If a [Custom Subnet Network](/vpc/docs/vpc#vpc_networks_and_subnets) - * is provided, `nodeConfig.subnetwork` must also be provided. For - * [Shared VPC](/vpc/docs/shared-vpc) subnetwork requirements, see - * `nodeConfig.subnetwork`. - * - * Generated from protobuf field string network = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setNetwork($var) - { - GPBUtil::checkString($var, True); - $this->network = $var; - - return $this; - } - - /** - * Optional. The Compute Engine subnetwork to be used for machine - * communications, specified as a - * [relative resource - * name](/apis/design/resource_names#relative_resource_name). For example: - * "projects/{projectId}/regions/{regionId}/subnetworks/{subnetworkId}" - * If a subnetwork is provided, `nodeConfig.network` must also be provided, - * and the subnetwork must belong to the enclosing environment's project and - * location. - * - * Generated from protobuf field string subnetwork = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getSubnetwork() - { - return $this->subnetwork; - } - - /** - * Optional. The Compute Engine subnetwork to be used for machine - * communications, specified as a - * [relative resource - * name](/apis/design/resource_names#relative_resource_name). For example: - * "projects/{projectId}/regions/{regionId}/subnetworks/{subnetworkId}" - * If a subnetwork is provided, `nodeConfig.network` must also be provided, - * and the subnetwork must belong to the enclosing environment's project and - * location. - * - * Generated from protobuf field string subnetwork = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setSubnetwork($var) - { - GPBUtil::checkString($var, True); - $this->subnetwork = $var; - - return $this; - } - - /** - * Optional. The disk size in GB used for node VMs. Minimum size is 30GB. - * If unspecified, defaults to 100GB. Cannot be updated. - * This field is supported for Cloud Composer environments in versions - * composer-1.*.*-airflow-*.*.*. - * - * Generated from protobuf field int32 disk_size_gb = 5; - * @return int - */ - public function getDiskSizeGb() - { - return $this->disk_size_gb; - } - - /** - * Optional. The disk size in GB used for node VMs. Minimum size is 30GB. - * If unspecified, defaults to 100GB. Cannot be updated. - * This field is supported for Cloud Composer environments in versions - * composer-1.*.*-airflow-*.*.*. - * - * Generated from protobuf field int32 disk_size_gb = 5; - * @param int $var - * @return $this - */ - public function setDiskSizeGb($var) - { - GPBUtil::checkInt32($var); - $this->disk_size_gb = $var; - - return $this; - } - - /** - * Optional. The set of Google API scopes to be made available on all - * node VMs. If `oauth_scopes` is empty, defaults to - * ["https://www.googleapis.com/auth/cloud-platform"]. Cannot be updated. - * This field is supported for Cloud Composer environments in versions - * composer-1.*.*-airflow-*.*.*. - * - * Generated from protobuf field repeated string oauth_scopes = 6; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getOauthScopes() - { - return $this->oauth_scopes; - } - - /** - * Optional. The set of Google API scopes to be made available on all - * node VMs. If `oauth_scopes` is empty, defaults to - * ["https://www.googleapis.com/auth/cloud-platform"]. Cannot be updated. - * This field is supported for Cloud Composer environments in versions - * composer-1.*.*-airflow-*.*.*. - * - * Generated from protobuf field repeated string oauth_scopes = 6; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setOauthScopes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->oauth_scopes = $arr; - - return $this; - } - - /** - * Optional. The Google Cloud Platform Service Account to be used by the node - * VMs. If a service account is not specified, the "default" Compute Engine - * service account is used. Cannot be updated. - * - * Generated from protobuf field string service_account = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getServiceAccount() - { - return $this->service_account; - } - - /** - * Optional. The Google Cloud Platform Service Account to be used by the node - * VMs. If a service account is not specified, the "default" Compute Engine - * service account is used. Cannot be updated. - * - * Generated from protobuf field string service_account = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setServiceAccount($var) - { - GPBUtil::checkString($var, True); - $this->service_account = $var; - - return $this; - } - - /** - * Optional. The list of instance tags applied to all node VMs. Tags are used - * to identify valid sources or targets for network firewalls. Each tag within - * the list must comply with [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). - * Cannot be updated. - * - * Generated from protobuf field repeated string tags = 8; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTags() - { - return $this->tags; - } - - /** - * Optional. The list of instance tags applied to all node VMs. Tags are used - * to identify valid sources or targets for network firewalls. Each tag within - * the list must comply with [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). - * Cannot be updated. - * - * Generated from protobuf field repeated string tags = 8; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTags($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->tags = $arr; - - return $this; - } - - /** - * Optional. The configuration for controlling how IPs are allocated in the - * GKE cluster. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy ip_allocation_policy = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Orchestration\Airflow\Service\V1\IPAllocationPolicy|null - */ - public function getIpAllocationPolicy() - { - return $this->ip_allocation_policy; - } - - public function hasIpAllocationPolicy() - { - return isset($this->ip_allocation_policy); - } - - public function clearIpAllocationPolicy() - { - unset($this->ip_allocation_policy); - } - - /** - * Optional. The configuration for controlling how IPs are allocated in the - * GKE cluster. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy ip_allocation_policy = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Orchestration\Airflow\Service\V1\IPAllocationPolicy $var - * @return $this - */ - public function setIpAllocationPolicy($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Orchestration\Airflow\Service\V1\IPAllocationPolicy::class); - $this->ip_allocation_policy = $var; - - return $this; - } - - /** - * Optional. Deploys 'ip-masq-agent' daemon set in the GKE cluster and defines - * nonMasqueradeCIDRs equals to pod IP range so IP masquerading is used for - * all destination addresses, except between pods traffic. - * See: - * https://cloud.google.com/kubernetes-engine/docs/how-to/ip-masquerade-agent - * - * Generated from protobuf field bool enable_ip_masq_agent = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getEnableIpMasqAgent() - { - return $this->enable_ip_masq_agent; - } - - /** - * Optional. Deploys 'ip-masq-agent' daemon set in the GKE cluster and defines - * nonMasqueradeCIDRs equals to pod IP range so IP masquerading is used for - * all destination addresses, except between pods traffic. - * See: - * https://cloud.google.com/kubernetes-engine/docs/how-to/ip-masquerade-agent - * - * Generated from protobuf field bool enable_ip_masq_agent = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setEnableIpMasqAgent($var) - { - GPBUtil::checkBool($var); - $this->enable_ip_masq_agent = $var; - - return $this; - } - - /** - * Optional. Network Attachment that Cloud Composer environment is connected - * to, which provides connectivity with a user's VPC network. Takes precedence - * over network and subnetwork settings. If not provided, but network and - * subnetwork are defined during environment, it will be provisioned. If not - * provided and network and subnetwork are also empty, then connectivity to - * user's VPC network is disabled. Network attachment must be provided in - * format - * projects/{project}/regions/{region}/networkAttachments/{networkAttachment}. - * This field is supported for Cloud Composer environments in versions - * composer-3.*.*-airflow-*.*.* and newer. - * - * Generated from protobuf field string composer_network_attachment = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getComposerNetworkAttachment() - { - return $this->composer_network_attachment; - } - - /** - * Optional. Network Attachment that Cloud Composer environment is connected - * to, which provides connectivity with a user's VPC network. Takes precedence - * over network and subnetwork settings. If not provided, but network and - * subnetwork are defined during environment, it will be provisioned. If not - * provided and network and subnetwork are also empty, then connectivity to - * user's VPC network is disabled. Network attachment must be provided in - * format - * projects/{project}/regions/{region}/networkAttachments/{networkAttachment}. - * This field is supported for Cloud Composer environments in versions - * composer-3.*.*-airflow-*.*.* and newer. - * - * Generated from protobuf field string composer_network_attachment = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setComposerNetworkAttachment($var) - { - GPBUtil::checkString($var, True); - $this->composer_network_attachment = $var; - - return $this; - } - - /** - * Optional. The IP range in CIDR notation to use internally by Cloud - * Composer. IP addresses are not reserved - and the same range can be used by - * multiple Cloud Composer environments. In case of overlap, IPs from this - * range will not be accessible in the user's VPC network. Cannot be updated. - * If not specified, the default value of '100.64.128.0/20' is used. - * This field is supported for Cloud Composer environments in versions - * composer-3.*.*-airflow-*.*.* and newer. - * - * Generated from protobuf field string composer_internal_ipv4_cidr_block = 13 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getComposerInternalIpv4CidrBlock() - { - return $this->composer_internal_ipv4_cidr_block; - } - - /** - * Optional. The IP range in CIDR notation to use internally by Cloud - * Composer. IP addresses are not reserved - and the same range can be used by - * multiple Cloud Composer environments. In case of overlap, IPs from this - * range will not be accessible in the user's VPC network. Cannot be updated. - * If not specified, the default value of '100.64.128.0/20' is used. - * This field is supported for Cloud Composer environments in versions - * composer-3.*.*-airflow-*.*.* and newer. - * - * Generated from protobuf field string composer_internal_ipv4_cidr_block = 13 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setComposerInternalIpv4CidrBlock($var) - { - GPBUtil::checkString($var, True); - $this->composer_internal_ipv4_cidr_block = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/OperationMetadata.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/OperationMetadata.php deleted file mode 100644 index ae698a9c0bd0..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/OperationMetadata.php +++ /dev/null @@ -1,265 +0,0 @@ -google.cloud.orchestration.airflow.service.v1.OperationMetadata - */ -class OperationMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The current operation state. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.OperationMetadata.State state = 1; - */ - protected $state = 0; - /** - * Output only. The type of operation being performed. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.OperationMetadata.Type operation_type = 2; - */ - protected $operation_type = 0; - /** - * Output only. The resource being operated on, as a [relative resource name]( - * /apis/design/resource_names#relative_resource_name). - * - * Generated from protobuf field string resource = 3; - */ - protected $resource = ''; - /** - * Output only. The UUID of the resource being operated on. - * - * Generated from protobuf field string resource_uuid = 4; - */ - protected $resource_uuid = ''; - /** - * Output only. The time the operation was submitted to the server. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 5; - */ - protected $create_time = null; - /** - * Output only. The time when the operation terminated, regardless of its - * success. This field is unset if the operation is still ongoing. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 6; - */ - protected $end_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $state - * Output only. The current operation state. - * @type int $operation_type - * Output only. The type of operation being performed. - * @type string $resource - * Output only. The resource being operated on, as a [relative resource name]( - * /apis/design/resource_names#relative_resource_name). - * @type string $resource_uuid - * Output only. The UUID of the resource being operated on. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time the operation was submitted to the server. - * @type \Google\Protobuf\Timestamp $end_time - * Output only. The time when the operation terminated, regardless of its - * success. This field is unset if the operation is still ongoing. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Operations::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The current operation state. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.OperationMetadata.State state = 1; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The current operation state. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.OperationMetadata.State state = 1; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Orchestration\Airflow\Service\V1\OperationMetadata\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. The type of operation being performed. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.OperationMetadata.Type operation_type = 2; - * @return int - */ - public function getOperationType() - { - return $this->operation_type; - } - - /** - * Output only. The type of operation being performed. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.OperationMetadata.Type operation_type = 2; - * @param int $var - * @return $this - */ - public function setOperationType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Orchestration\Airflow\Service\V1\OperationMetadata\Type::class); - $this->operation_type = $var; - - return $this; - } - - /** - * Output only. The resource being operated on, as a [relative resource name]( - * /apis/design/resource_names#relative_resource_name). - * - * Generated from protobuf field string resource = 3; - * @return string - */ - public function getResource() - { - return $this->resource; - } - - /** - * Output only. The resource being operated on, as a [relative resource name]( - * /apis/design/resource_names#relative_resource_name). - * - * Generated from protobuf field string resource = 3; - * @param string $var - * @return $this - */ - public function setResource($var) - { - GPBUtil::checkString($var, True); - $this->resource = $var; - - return $this; - } - - /** - * Output only. The UUID of the resource being operated on. - * - * Generated from protobuf field string resource_uuid = 4; - * @return string - */ - public function getResourceUuid() - { - return $this->resource_uuid; - } - - /** - * Output only. The UUID of the resource being operated on. - * - * Generated from protobuf field string resource_uuid = 4; - * @param string $var - * @return $this - */ - public function setResourceUuid($var) - { - GPBUtil::checkString($var, True); - $this->resource_uuid = $var; - - return $this; - } - - /** - * Output only. The time the operation was submitted to the server. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 5; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The time the operation was submitted to the server. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 5; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The time when the operation terminated, regardless of its - * success. This field is unset if the operation is still ongoing. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 6; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * Output only. The time when the operation terminated, regardless of its - * success. This field is unset if the operation is still ongoing. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 6; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/OperationMetadata/State.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/OperationMetadata/State.php deleted file mode 100644 index 71b3cde48793..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/OperationMetadata/State.php +++ /dev/null @@ -1,83 +0,0 @@ -google.cloud.orchestration.airflow.service.v1.OperationMetadata.State - */ -class State -{ - /** - * Unused. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The operation has been created but is not yet started. - * - * Generated from protobuf enum PENDING = 1; - */ - const PENDING = 1; - /** - * The operation is underway. - * - * Generated from protobuf enum RUNNING = 2; - */ - const RUNNING = 2; - /** - * The operation completed successfully. - * - * Generated from protobuf enum SUCCEEDED = 3; - */ - const SUCCEEDED = 3; - /** - * Generated from protobuf enum SUCCESSFUL = 3; - */ - const SUCCESSFUL = 3; - /** - * The operation is no longer running but did not succeed. - * - * Generated from protobuf enum FAILED = 4; - */ - const FAILED = 4; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::PENDING => 'PENDING', - self::RUNNING => 'RUNNING', - self::SUCCEEDED => 'SUCCEEDED', - self::SUCCESSFUL => 'SUCCESSFUL', - self::FAILED => 'FAILED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\Orchestration\Airflow\Service\V1\OperationMetadata_State::class); - diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/OperationMetadata/Type.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/OperationMetadata/Type.php deleted file mode 100644 index ffa8d17415f1..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/OperationMetadata/Type.php +++ /dev/null @@ -1,100 +0,0 @@ -google.cloud.orchestration.airflow.service.v1.OperationMetadata.Type - */ -class Type -{ - /** - * Unused. - * - * Generated from protobuf enum TYPE_UNSPECIFIED = 0; - */ - const TYPE_UNSPECIFIED = 0; - /** - * A resource creation operation. - * - * Generated from protobuf enum CREATE = 1; - */ - const CREATE = 1; - /** - * A resource deletion operation. - * - * Generated from protobuf enum DELETE = 2; - */ - const DELETE = 2; - /** - * A resource update operation. - * - * Generated from protobuf enum UPDATE = 3; - */ - const UPDATE = 3; - /** - * A resource check operation. - * - * Generated from protobuf enum CHECK = 4; - */ - const CHECK = 4; - /** - * Saves snapshot of the resource operation. - * - * Generated from protobuf enum SAVE_SNAPSHOT = 5; - */ - const SAVE_SNAPSHOT = 5; - /** - * Loads snapshot of the resource operation. - * - * Generated from protobuf enum LOAD_SNAPSHOT = 6; - */ - const LOAD_SNAPSHOT = 6; - /** - * Triggers failover of environment's Cloud SQL instance (only for highly - * resilient environments). - * - * Generated from protobuf enum DATABASE_FAILOVER = 7; - */ - const DATABASE_FAILOVER = 7; - - private static $valueToName = [ - self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', - self::CREATE => 'CREATE', - self::DELETE => 'DELETE', - self::UPDATE => 'UPDATE', - self::CHECK => 'CHECK', - self::SAVE_SNAPSHOT => 'SAVE_SNAPSHOT', - self::LOAD_SNAPSHOT => 'LOAD_SNAPSHOT', - self::DATABASE_FAILOVER => 'DATABASE_FAILOVER', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Type::class, \Google\Cloud\Orchestration\Airflow\Service\V1\OperationMetadata_Type::class); - diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/PollAirflowCommandRequest.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/PollAirflowCommandRequest.php deleted file mode 100644 index e7ed7e645030..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/PollAirflowCommandRequest.php +++ /dev/null @@ -1,207 +0,0 @@ -google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest - */ -class PollAirflowCommandRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the environment in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * - * Generated from protobuf field string environment = 1; - */ - protected $environment = ''; - /** - * The unique ID of the command execution. - * - * Generated from protobuf field string execution_id = 2; - */ - protected $execution_id = ''; - /** - * The name of the pod where the command is executed. - * - * Generated from protobuf field string pod = 3; - */ - protected $pod = ''; - /** - * The namespace of the pod where the command is executed. - * - * Generated from protobuf field string pod_namespace = 4; - */ - protected $pod_namespace = ''; - /** - * Line number from which new logs should be fetched. - * - * Generated from protobuf field int32 next_line_number = 5; - */ - protected $next_line_number = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $environment - * The resource name of the environment in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * @type string $execution_id - * The unique ID of the command execution. - * @type string $pod - * The name of the pod where the command is executed. - * @type string $pod_namespace - * The namespace of the pod where the command is executed. - * @type int $next_line_number - * Line number from which new logs should be fetched. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the environment in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * - * Generated from protobuf field string environment = 1; - * @return string - */ - public function getEnvironment() - { - return $this->environment; - } - - /** - * The resource name of the environment in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * - * Generated from protobuf field string environment = 1; - * @param string $var - * @return $this - */ - public function setEnvironment($var) - { - GPBUtil::checkString($var, True); - $this->environment = $var; - - return $this; - } - - /** - * The unique ID of the command execution. - * - * Generated from protobuf field string execution_id = 2; - * @return string - */ - public function getExecutionId() - { - return $this->execution_id; - } - - /** - * The unique ID of the command execution. - * - * Generated from protobuf field string execution_id = 2; - * @param string $var - * @return $this - */ - public function setExecutionId($var) - { - GPBUtil::checkString($var, True); - $this->execution_id = $var; - - return $this; - } - - /** - * The name of the pod where the command is executed. - * - * Generated from protobuf field string pod = 3; - * @return string - */ - public function getPod() - { - return $this->pod; - } - - /** - * The name of the pod where the command is executed. - * - * Generated from protobuf field string pod = 3; - * @param string $var - * @return $this - */ - public function setPod($var) - { - GPBUtil::checkString($var, True); - $this->pod = $var; - - return $this; - } - - /** - * The namespace of the pod where the command is executed. - * - * Generated from protobuf field string pod_namespace = 4; - * @return string - */ - public function getPodNamespace() - { - return $this->pod_namespace; - } - - /** - * The namespace of the pod where the command is executed. - * - * Generated from protobuf field string pod_namespace = 4; - * @param string $var - * @return $this - */ - public function setPodNamespace($var) - { - GPBUtil::checkString($var, True); - $this->pod_namespace = $var; - - return $this; - } - - /** - * Line number from which new logs should be fetched. - * - * Generated from protobuf field int32 next_line_number = 5; - * @return int - */ - public function getNextLineNumber() - { - return $this->next_line_number; - } - - /** - * Line number from which new logs should be fetched. - * - * Generated from protobuf field int32 next_line_number = 5; - * @param int $var - * @return $this - */ - public function setNextLineNumber($var) - { - GPBUtil::checkInt32($var); - $this->next_line_number = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/PollAirflowCommandResponse.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/PollAirflowCommandResponse.php deleted file mode 100644 index b08a1b04456c..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/PollAirflowCommandResponse.php +++ /dev/null @@ -1,149 +0,0 @@ -google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse - */ -class PollAirflowCommandResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Output from the command execution. It may not contain the full output - * and the caller may need to poll for more lines. - * - * Generated from protobuf field repeated .google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line output = 1; - */ - private $output; - /** - * Whether the command execution has finished and there is no more output. - * - * Generated from protobuf field bool output_end = 2; - */ - protected $output_end = false; - /** - * The result exit status of the command. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo exit_info = 3; - */ - protected $exit_info = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Orchestration\Airflow\Service\V1\PollAirflowCommandResponse\Line>|\Google\Protobuf\Internal\RepeatedField $output - * Output from the command execution. It may not contain the full output - * and the caller may need to poll for more lines. - * @type bool $output_end - * Whether the command execution has finished and there is no more output. - * @type \Google\Cloud\Orchestration\Airflow\Service\V1\PollAirflowCommandResponse\ExitInfo $exit_info - * The result exit status of the command. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); - parent::__construct($data); - } - - /** - * Output from the command execution. It may not contain the full output - * and the caller may need to poll for more lines. - * - * Generated from protobuf field repeated .google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line output = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getOutput() - { - return $this->output; - } - - /** - * Output from the command execution. It may not contain the full output - * and the caller may need to poll for more lines. - * - * Generated from protobuf field repeated .google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line output = 1; - * @param array<\Google\Cloud\Orchestration\Airflow\Service\V1\PollAirflowCommandResponse\Line>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setOutput($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Orchestration\Airflow\Service\V1\PollAirflowCommandResponse\Line::class); - $this->output = $arr; - - return $this; - } - - /** - * Whether the command execution has finished and there is no more output. - * - * Generated from protobuf field bool output_end = 2; - * @return bool - */ - public function getOutputEnd() - { - return $this->output_end; - } - - /** - * Whether the command execution has finished and there is no more output. - * - * Generated from protobuf field bool output_end = 2; - * @param bool $var - * @return $this - */ - public function setOutputEnd($var) - { - GPBUtil::checkBool($var); - $this->output_end = $var; - - return $this; - } - - /** - * The result exit status of the command. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo exit_info = 3; - * @return \Google\Cloud\Orchestration\Airflow\Service\V1\PollAirflowCommandResponse\ExitInfo|null - */ - public function getExitInfo() - { - return $this->exit_info; - } - - public function hasExitInfo() - { - return isset($this->exit_info); - } - - public function clearExitInfo() - { - unset($this->exit_info); - } - - /** - * The result exit status of the command. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo exit_info = 3; - * @param \Google\Cloud\Orchestration\Airflow\Service\V1\PollAirflowCommandResponse\ExitInfo $var - * @return $this - */ - public function setExitInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Orchestration\Airflow\Service\V1\PollAirflowCommandResponse\ExitInfo::class); - $this->exit_info = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/PollAirflowCommandResponse/ExitInfo.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/PollAirflowCommandResponse/ExitInfo.php deleted file mode 100644 index b1f0102c2162..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/PollAirflowCommandResponse/ExitInfo.php +++ /dev/null @@ -1,104 +0,0 @@ -google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo - */ -class ExitInfo extends \Google\Protobuf\Internal\Message -{ - /** - * The exit code from the command execution. - * - * Generated from protobuf field int32 exit_code = 1; - */ - protected $exit_code = 0; - /** - * Error message. Empty if there was no error. - * - * Generated from protobuf field string error = 2; - */ - protected $error = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $exit_code - * The exit code from the command execution. - * @type string $error - * Error message. Empty if there was no error. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); - parent::__construct($data); - } - - /** - * The exit code from the command execution. - * - * Generated from protobuf field int32 exit_code = 1; - * @return int - */ - public function getExitCode() - { - return $this->exit_code; - } - - /** - * The exit code from the command execution. - * - * Generated from protobuf field int32 exit_code = 1; - * @param int $var - * @return $this - */ - public function setExitCode($var) - { - GPBUtil::checkInt32($var); - $this->exit_code = $var; - - return $this; - } - - /** - * Error message. Empty if there was no error. - * - * Generated from protobuf field string error = 2; - * @return string - */ - public function getError() - { - return $this->error; - } - - /** - * Error message. Empty if there was no error. - * - * Generated from protobuf field string error = 2; - * @param string $var - * @return $this - */ - public function setError($var) - { - GPBUtil::checkString($var, True); - $this->error = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ExitInfo::class, \Google\Cloud\Orchestration\Airflow\Service\V1\PollAirflowCommandResponse_ExitInfo::class); - diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/PollAirflowCommandResponse/Line.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/PollAirflowCommandResponse/Line.php deleted file mode 100644 index fc810160dcee..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/PollAirflowCommandResponse/Line.php +++ /dev/null @@ -1,104 +0,0 @@ -google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line - */ -class Line extends \Google\Protobuf\Internal\Message -{ - /** - * Number of the line. - * - * Generated from protobuf field int32 line_number = 1; - */ - protected $line_number = 0; - /** - * Text content of the log line. - * - * Generated from protobuf field string content = 2; - */ - protected $content = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $line_number - * Number of the line. - * @type string $content - * Text content of the log line. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); - parent::__construct($data); - } - - /** - * Number of the line. - * - * Generated from protobuf field int32 line_number = 1; - * @return int - */ - public function getLineNumber() - { - return $this->line_number; - } - - /** - * Number of the line. - * - * Generated from protobuf field int32 line_number = 1; - * @param int $var - * @return $this - */ - public function setLineNumber($var) - { - GPBUtil::checkInt32($var); - $this->line_number = $var; - - return $this; - } - - /** - * Text content of the log line. - * - * Generated from protobuf field string content = 2; - * @return string - */ - public function getContent() - { - return $this->content; - } - - /** - * Text content of the log line. - * - * Generated from protobuf field string content = 2; - * @param string $var - * @return $this - */ - public function setContent($var) - { - GPBUtil::checkString($var, True); - $this->content = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Line::class, \Google\Cloud\Orchestration\Airflow\Service\V1\PollAirflowCommandResponse_Line::class); - diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/PrivateClusterConfig.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/PrivateClusterConfig.php deleted file mode 100644 index 0748584cbe17..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/PrivateClusterConfig.php +++ /dev/null @@ -1,160 +0,0 @@ -google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig - */ -class PrivateClusterConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. If `true`, access to the public endpoint of the GKE cluster is - * denied. - * - * Generated from protobuf field bool enable_private_endpoint = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $enable_private_endpoint = false; - /** - * Optional. The CIDR block from which IPv4 range for GKE master will be - * reserved. If left blank, the default value of '172.16.0.0/23' is used. - * - * Generated from protobuf field string master_ipv4_cidr_block = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $master_ipv4_cidr_block = ''; - /** - * Output only. The IP range in CIDR notation to use for the hosted master - * network. This range is used for assigning internal IP addresses to the GKE - * cluster master or set of masters and to the internal load balancer virtual - * IP. This range must not overlap with any other ranges in use within the - * cluster's network. - * - * Generated from protobuf field string master_ipv4_reserved_range = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $master_ipv4_reserved_range = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $enable_private_endpoint - * Optional. If `true`, access to the public endpoint of the GKE cluster is - * denied. - * @type string $master_ipv4_cidr_block - * Optional. The CIDR block from which IPv4 range for GKE master will be - * reserved. If left blank, the default value of '172.16.0.0/23' is used. - * @type string $master_ipv4_reserved_range - * Output only. The IP range in CIDR notation to use for the hosted master - * network. This range is used for assigning internal IP addresses to the GKE - * cluster master or set of masters and to the internal load balancer virtual - * IP. This range must not overlap with any other ranges in use within the - * cluster's network. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); - parent::__construct($data); - } - - /** - * Optional. If `true`, access to the public endpoint of the GKE cluster is - * denied. - * - * Generated from protobuf field bool enable_private_endpoint = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getEnablePrivateEndpoint() - { - return $this->enable_private_endpoint; - } - - /** - * Optional. If `true`, access to the public endpoint of the GKE cluster is - * denied. - * - * Generated from protobuf field bool enable_private_endpoint = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setEnablePrivateEndpoint($var) - { - GPBUtil::checkBool($var); - $this->enable_private_endpoint = $var; - - return $this; - } - - /** - * Optional. The CIDR block from which IPv4 range for GKE master will be - * reserved. If left blank, the default value of '172.16.0.0/23' is used. - * - * Generated from protobuf field string master_ipv4_cidr_block = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getMasterIpv4CidrBlock() - { - return $this->master_ipv4_cidr_block; - } - - /** - * Optional. The CIDR block from which IPv4 range for GKE master will be - * reserved. If left blank, the default value of '172.16.0.0/23' is used. - * - * Generated from protobuf field string master_ipv4_cidr_block = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setMasterIpv4CidrBlock($var) - { - GPBUtil::checkString($var, True); - $this->master_ipv4_cidr_block = $var; - - return $this; - } - - /** - * Output only. The IP range in CIDR notation to use for the hosted master - * network. This range is used for assigning internal IP addresses to the GKE - * cluster master or set of masters and to the internal load balancer virtual - * IP. This range must not overlap with any other ranges in use within the - * cluster's network. - * - * Generated from protobuf field string master_ipv4_reserved_range = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getMasterIpv4ReservedRange() - { - return $this->master_ipv4_reserved_range; - } - - /** - * Output only. The IP range in CIDR notation to use for the hosted master - * network. This range is used for assigning internal IP addresses to the GKE - * cluster master or set of masters and to the internal load balancer virtual - * IP. This range must not overlap with any other ranges in use within the - * cluster's network. - * - * Generated from protobuf field string master_ipv4_reserved_range = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setMasterIpv4ReservedRange($var) - { - GPBUtil::checkString($var, True); - $this->master_ipv4_reserved_range = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/PrivateEnvironmentConfig.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/PrivateEnvironmentConfig.php deleted file mode 100644 index 0ede8e0f8b6b..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/PrivateEnvironmentConfig.php +++ /dev/null @@ -1,564 +0,0 @@ -google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig - */ -class PrivateEnvironmentConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. If `true`, a Private IP Cloud Composer environment is created. - * If this field is set to true, `IPAllocationPolicy.use_ip_aliases` must be - * set to true for Cloud Composer environments in versions - * composer-1.*.*-airflow-*.*.*. - * - * Generated from protobuf field bool enable_private_environment = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $enable_private_environment = false; - /** - * Optional. If `true`, builds performed during operations that install Python - * packages have only private connectivity to Google services (including - * Artifact Registry) and VPC network (if either `NodeConfig.network` and - * `NodeConfig.subnetwork` fields or `NodeConfig.composer_network_attachment` - * field are specified). If `false`, the builds also have access to the - * internet. - * This field is supported for Cloud Composer environments in versions - * composer-3.*.*-airflow-*.*.* and newer. - * - * Generated from protobuf field bool enable_private_builds_only = 11 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $enable_private_builds_only = false; - /** - * Optional. Configuration for the private GKE cluster for a Private IP - * Cloud Composer environment. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig private_cluster_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $private_cluster_config = null; - /** - * Optional. The CIDR block from which IP range for web server will be - * reserved. Needs to be disjoint from - * `private_cluster_config.master_ipv4_cidr_block` and - * `cloud_sql_ipv4_cidr_block`. - * This field is supported for Cloud Composer environments in versions - * composer-1.*.*-airflow-*.*.*. - * - * Generated from protobuf field string web_server_ipv4_cidr_block = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $web_server_ipv4_cidr_block = ''; - /** - * Optional. The CIDR block from which IP range in tenant project will be - * reserved for Cloud SQL. Needs to be disjoint from - * `web_server_ipv4_cidr_block`. - * - * Generated from protobuf field string cloud_sql_ipv4_cidr_block = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $cloud_sql_ipv4_cidr_block = ''; - /** - * Output only. The IP range reserved for the tenant project's App Engine VMs. - * This field is supported for Cloud Composer environments in versions - * composer-1.*.*-airflow-*.*.*. - * - * Generated from protobuf field string web_server_ipv4_reserved_range = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $web_server_ipv4_reserved_range = ''; - /** - * Optional. The CIDR block from which IP range for Cloud Composer Network in - * tenant project will be reserved. Needs to be disjoint from - * private_cluster_config.master_ipv4_cidr_block and - * cloud_sql_ipv4_cidr_block. - * This field is supported for Cloud Composer environments in versions - * composer-2.*.*-airflow-*.*.* and newer. - * - * Generated from protobuf field string cloud_composer_network_ipv4_cidr_block = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $cloud_composer_network_ipv4_cidr_block = ''; - /** - * Output only. The IP range reserved for the tenant project's Cloud Composer - * network. - * This field is supported for Cloud Composer environments in versions - * composer-2.*.*-airflow-*.*.* and newer. - * - * Generated from protobuf field string cloud_composer_network_ipv4_reserved_range = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $cloud_composer_network_ipv4_reserved_range = ''; - /** - * Optional. When enabled, IPs from public (non-RFC1918) ranges can be used - * for `IPAllocationPolicy.cluster_ipv4_cidr_block` and - * `IPAllocationPolicy.service_ipv4_cidr_block`. - * - * Generated from protobuf field bool enable_privately_used_public_ips = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $enable_privately_used_public_ips = false; - /** - * Optional. When specified, the environment will use Private Service Connect - * instead of VPC peerings to connect to Cloud SQL in the Tenant Project, - * and the PSC endpoint in the Customer Project will use an IP address from - * this subnetwork. - * - * Generated from protobuf field string cloud_composer_connection_subnetwork = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $cloud_composer_connection_subnetwork = ''; - /** - * Optional. Configuration for the network connections configuration in the - * environment. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.NetworkingConfig networking_config = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $networking_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $enable_private_environment - * Optional. If `true`, a Private IP Cloud Composer environment is created. - * If this field is set to true, `IPAllocationPolicy.use_ip_aliases` must be - * set to true for Cloud Composer environments in versions - * composer-1.*.*-airflow-*.*.*. - * @type bool $enable_private_builds_only - * Optional. If `true`, builds performed during operations that install Python - * packages have only private connectivity to Google services (including - * Artifact Registry) and VPC network (if either `NodeConfig.network` and - * `NodeConfig.subnetwork` fields or `NodeConfig.composer_network_attachment` - * field are specified). If `false`, the builds also have access to the - * internet. - * This field is supported for Cloud Composer environments in versions - * composer-3.*.*-airflow-*.*.* and newer. - * @type \Google\Cloud\Orchestration\Airflow\Service\V1\PrivateClusterConfig $private_cluster_config - * Optional. Configuration for the private GKE cluster for a Private IP - * Cloud Composer environment. - * @type string $web_server_ipv4_cidr_block - * Optional. The CIDR block from which IP range for web server will be - * reserved. Needs to be disjoint from - * `private_cluster_config.master_ipv4_cidr_block` and - * `cloud_sql_ipv4_cidr_block`. - * This field is supported for Cloud Composer environments in versions - * composer-1.*.*-airflow-*.*.*. - * @type string $cloud_sql_ipv4_cidr_block - * Optional. The CIDR block from which IP range in tenant project will be - * reserved for Cloud SQL. Needs to be disjoint from - * `web_server_ipv4_cidr_block`. - * @type string $web_server_ipv4_reserved_range - * Output only. The IP range reserved for the tenant project's App Engine VMs. - * This field is supported for Cloud Composer environments in versions - * composer-1.*.*-airflow-*.*.*. - * @type string $cloud_composer_network_ipv4_cidr_block - * Optional. The CIDR block from which IP range for Cloud Composer Network in - * tenant project will be reserved. Needs to be disjoint from - * private_cluster_config.master_ipv4_cidr_block and - * cloud_sql_ipv4_cidr_block. - * This field is supported for Cloud Composer environments in versions - * composer-2.*.*-airflow-*.*.* and newer. - * @type string $cloud_composer_network_ipv4_reserved_range - * Output only. The IP range reserved for the tenant project's Cloud Composer - * network. - * This field is supported for Cloud Composer environments in versions - * composer-2.*.*-airflow-*.*.* and newer. - * @type bool $enable_privately_used_public_ips - * Optional. When enabled, IPs from public (non-RFC1918) ranges can be used - * for `IPAllocationPolicy.cluster_ipv4_cidr_block` and - * `IPAllocationPolicy.service_ipv4_cidr_block`. - * @type string $cloud_composer_connection_subnetwork - * Optional. When specified, the environment will use Private Service Connect - * instead of VPC peerings to connect to Cloud SQL in the Tenant Project, - * and the PSC endpoint in the Customer Project will use an IP address from - * this subnetwork. - * @type \Google\Cloud\Orchestration\Airflow\Service\V1\NetworkingConfig $networking_config - * Optional. Configuration for the network connections configuration in the - * environment. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); - parent::__construct($data); - } - - /** - * Optional. If `true`, a Private IP Cloud Composer environment is created. - * If this field is set to true, `IPAllocationPolicy.use_ip_aliases` must be - * set to true for Cloud Composer environments in versions - * composer-1.*.*-airflow-*.*.*. - * - * Generated from protobuf field bool enable_private_environment = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getEnablePrivateEnvironment() - { - return $this->enable_private_environment; - } - - /** - * Optional. If `true`, a Private IP Cloud Composer environment is created. - * If this field is set to true, `IPAllocationPolicy.use_ip_aliases` must be - * set to true for Cloud Composer environments in versions - * composer-1.*.*-airflow-*.*.*. - * - * Generated from protobuf field bool enable_private_environment = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setEnablePrivateEnvironment($var) - { - GPBUtil::checkBool($var); - $this->enable_private_environment = $var; - - return $this; - } - - /** - * Optional. If `true`, builds performed during operations that install Python - * packages have only private connectivity to Google services (including - * Artifact Registry) and VPC network (if either `NodeConfig.network` and - * `NodeConfig.subnetwork` fields or `NodeConfig.composer_network_attachment` - * field are specified). If `false`, the builds also have access to the - * internet. - * This field is supported for Cloud Composer environments in versions - * composer-3.*.*-airflow-*.*.* and newer. - * - * Generated from protobuf field bool enable_private_builds_only = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getEnablePrivateBuildsOnly() - { - return $this->enable_private_builds_only; - } - - /** - * Optional. If `true`, builds performed during operations that install Python - * packages have only private connectivity to Google services (including - * Artifact Registry) and VPC network (if either `NodeConfig.network` and - * `NodeConfig.subnetwork` fields or `NodeConfig.composer_network_attachment` - * field are specified). If `false`, the builds also have access to the - * internet. - * This field is supported for Cloud Composer environments in versions - * composer-3.*.*-airflow-*.*.* and newer. - * - * Generated from protobuf field bool enable_private_builds_only = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setEnablePrivateBuildsOnly($var) - { - GPBUtil::checkBool($var); - $this->enable_private_builds_only = $var; - - return $this; - } - - /** - * Optional. Configuration for the private GKE cluster for a Private IP - * Cloud Composer environment. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig private_cluster_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Orchestration\Airflow\Service\V1\PrivateClusterConfig|null - */ - public function getPrivateClusterConfig() - { - return $this->private_cluster_config; - } - - public function hasPrivateClusterConfig() - { - return isset($this->private_cluster_config); - } - - public function clearPrivateClusterConfig() - { - unset($this->private_cluster_config); - } - - /** - * Optional. Configuration for the private GKE cluster for a Private IP - * Cloud Composer environment. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig private_cluster_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Orchestration\Airflow\Service\V1\PrivateClusterConfig $var - * @return $this - */ - public function setPrivateClusterConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Orchestration\Airflow\Service\V1\PrivateClusterConfig::class); - $this->private_cluster_config = $var; - - return $this; - } - - /** - * Optional. The CIDR block from which IP range for web server will be - * reserved. Needs to be disjoint from - * `private_cluster_config.master_ipv4_cidr_block` and - * `cloud_sql_ipv4_cidr_block`. - * This field is supported for Cloud Composer environments in versions - * composer-1.*.*-airflow-*.*.*. - * - * Generated from protobuf field string web_server_ipv4_cidr_block = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getWebServerIpv4CidrBlock() - { - return $this->web_server_ipv4_cidr_block; - } - - /** - * Optional. The CIDR block from which IP range for web server will be - * reserved. Needs to be disjoint from - * `private_cluster_config.master_ipv4_cidr_block` and - * `cloud_sql_ipv4_cidr_block`. - * This field is supported for Cloud Composer environments in versions - * composer-1.*.*-airflow-*.*.*. - * - * Generated from protobuf field string web_server_ipv4_cidr_block = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setWebServerIpv4CidrBlock($var) - { - GPBUtil::checkString($var, True); - $this->web_server_ipv4_cidr_block = $var; - - return $this; - } - - /** - * Optional. The CIDR block from which IP range in tenant project will be - * reserved for Cloud SQL. Needs to be disjoint from - * `web_server_ipv4_cidr_block`. - * - * Generated from protobuf field string cloud_sql_ipv4_cidr_block = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getCloudSqlIpv4CidrBlock() - { - return $this->cloud_sql_ipv4_cidr_block; - } - - /** - * Optional. The CIDR block from which IP range in tenant project will be - * reserved for Cloud SQL. Needs to be disjoint from - * `web_server_ipv4_cidr_block`. - * - * Generated from protobuf field string cloud_sql_ipv4_cidr_block = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setCloudSqlIpv4CidrBlock($var) - { - GPBUtil::checkString($var, True); - $this->cloud_sql_ipv4_cidr_block = $var; - - return $this; - } - - /** - * Output only. The IP range reserved for the tenant project's App Engine VMs. - * This field is supported for Cloud Composer environments in versions - * composer-1.*.*-airflow-*.*.*. - * - * Generated from protobuf field string web_server_ipv4_reserved_range = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getWebServerIpv4ReservedRange() - { - return $this->web_server_ipv4_reserved_range; - } - - /** - * Output only. The IP range reserved for the tenant project's App Engine VMs. - * This field is supported for Cloud Composer environments in versions - * composer-1.*.*-airflow-*.*.*. - * - * Generated from protobuf field string web_server_ipv4_reserved_range = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setWebServerIpv4ReservedRange($var) - { - GPBUtil::checkString($var, True); - $this->web_server_ipv4_reserved_range = $var; - - return $this; - } - - /** - * Optional. The CIDR block from which IP range for Cloud Composer Network in - * tenant project will be reserved. Needs to be disjoint from - * private_cluster_config.master_ipv4_cidr_block and - * cloud_sql_ipv4_cidr_block. - * This field is supported for Cloud Composer environments in versions - * composer-2.*.*-airflow-*.*.* and newer. - * - * Generated from protobuf field string cloud_composer_network_ipv4_cidr_block = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getCloudComposerNetworkIpv4CidrBlock() - { - return $this->cloud_composer_network_ipv4_cidr_block; - } - - /** - * Optional. The CIDR block from which IP range for Cloud Composer Network in - * tenant project will be reserved. Needs to be disjoint from - * private_cluster_config.master_ipv4_cidr_block and - * cloud_sql_ipv4_cidr_block. - * This field is supported for Cloud Composer environments in versions - * composer-2.*.*-airflow-*.*.* and newer. - * - * Generated from protobuf field string cloud_composer_network_ipv4_cidr_block = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setCloudComposerNetworkIpv4CidrBlock($var) - { - GPBUtil::checkString($var, True); - $this->cloud_composer_network_ipv4_cidr_block = $var; - - return $this; - } - - /** - * Output only. The IP range reserved for the tenant project's Cloud Composer - * network. - * This field is supported for Cloud Composer environments in versions - * composer-2.*.*-airflow-*.*.* and newer. - * - * Generated from protobuf field string cloud_composer_network_ipv4_reserved_range = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getCloudComposerNetworkIpv4ReservedRange() - { - return $this->cloud_composer_network_ipv4_reserved_range; - } - - /** - * Output only. The IP range reserved for the tenant project's Cloud Composer - * network. - * This field is supported for Cloud Composer environments in versions - * composer-2.*.*-airflow-*.*.* and newer. - * - * Generated from protobuf field string cloud_composer_network_ipv4_reserved_range = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setCloudComposerNetworkIpv4ReservedRange($var) - { - GPBUtil::checkString($var, True); - $this->cloud_composer_network_ipv4_reserved_range = $var; - - return $this; - } - - /** - * Optional. When enabled, IPs from public (non-RFC1918) ranges can be used - * for `IPAllocationPolicy.cluster_ipv4_cidr_block` and - * `IPAllocationPolicy.service_ipv4_cidr_block`. - * - * Generated from protobuf field bool enable_privately_used_public_ips = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getEnablePrivatelyUsedPublicIps() - { - return $this->enable_privately_used_public_ips; - } - - /** - * Optional. When enabled, IPs from public (non-RFC1918) ranges can be used - * for `IPAllocationPolicy.cluster_ipv4_cidr_block` and - * `IPAllocationPolicy.service_ipv4_cidr_block`. - * - * Generated from protobuf field bool enable_privately_used_public_ips = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setEnablePrivatelyUsedPublicIps($var) - { - GPBUtil::checkBool($var); - $this->enable_privately_used_public_ips = $var; - - return $this; - } - - /** - * Optional. When specified, the environment will use Private Service Connect - * instead of VPC peerings to connect to Cloud SQL in the Tenant Project, - * and the PSC endpoint in the Customer Project will use an IP address from - * this subnetwork. - * - * Generated from protobuf field string cloud_composer_connection_subnetwork = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getCloudComposerConnectionSubnetwork() - { - return $this->cloud_composer_connection_subnetwork; - } - - /** - * Optional. When specified, the environment will use Private Service Connect - * instead of VPC peerings to connect to Cloud SQL in the Tenant Project, - * and the PSC endpoint in the Customer Project will use an IP address from - * this subnetwork. - * - * Generated from protobuf field string cloud_composer_connection_subnetwork = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setCloudComposerConnectionSubnetwork($var) - { - GPBUtil::checkString($var, True); - $this->cloud_composer_connection_subnetwork = $var; - - return $this; - } - - /** - * Optional. Configuration for the network connections configuration in the - * environment. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.NetworkingConfig networking_config = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Orchestration\Airflow\Service\V1\NetworkingConfig|null - */ - public function getNetworkingConfig() - { - return $this->networking_config; - } - - public function hasNetworkingConfig() - { - return isset($this->networking_config); - } - - public function clearNetworkingConfig() - { - unset($this->networking_config); - } - - /** - * Optional. Configuration for the network connections configuration in the - * environment. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.NetworkingConfig networking_config = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Orchestration\Airflow\Service\V1\NetworkingConfig $var - * @return $this - */ - public function setNetworkingConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Orchestration\Airflow\Service\V1\NetworkingConfig::class); - $this->networking_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/RecoveryConfig.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/RecoveryConfig.php deleted file mode 100644 index 28d0684e7aad..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/RecoveryConfig.php +++ /dev/null @@ -1,77 +0,0 @@ -google.cloud.orchestration.airflow.service.v1.RecoveryConfig - */ -class RecoveryConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The configuration for scheduled snapshot creation mechanism. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.ScheduledSnapshotsConfig scheduled_snapshots_config = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $scheduled_snapshots_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Orchestration\Airflow\Service\V1\ScheduledSnapshotsConfig $scheduled_snapshots_config - * Optional. The configuration for scheduled snapshot creation mechanism. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The configuration for scheduled snapshot creation mechanism. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.ScheduledSnapshotsConfig scheduled_snapshots_config = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Orchestration\Airflow\Service\V1\ScheduledSnapshotsConfig|null - */ - public function getScheduledSnapshotsConfig() - { - return $this->scheduled_snapshots_config; - } - - public function hasScheduledSnapshotsConfig() - { - return isset($this->scheduled_snapshots_config); - } - - public function clearScheduledSnapshotsConfig() - { - unset($this->scheduled_snapshots_config); - } - - /** - * Optional. The configuration for scheduled snapshot creation mechanism. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.ScheduledSnapshotsConfig scheduled_snapshots_config = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Orchestration\Airflow\Service\V1\ScheduledSnapshotsConfig $var - * @return $this - */ - public function setScheduledSnapshotsConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Orchestration\Airflow\Service\V1\ScheduledSnapshotsConfig::class); - $this->scheduled_snapshots_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/SaveSnapshotRequest.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/SaveSnapshotRequest.php deleted file mode 100644 index ceda45d81c94..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/SaveSnapshotRequest.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.orchestration.airflow.service.v1.SaveSnapshotRequest - */ -class SaveSnapshotRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the source environment in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * - * Generated from protobuf field string environment = 1; - */ - protected $environment = ''; - /** - * Location in a Cloud Storage where the snapshot is going to be stored, e.g.: - * "gs://my-bucket/snapshots". - * - * Generated from protobuf field string snapshot_location = 2; - */ - protected $snapshot_location = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $environment - * The resource name of the source environment in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * @type string $snapshot_location - * Location in a Cloud Storage where the snapshot is going to be stored, e.g.: - * "gs://my-bucket/snapshots". - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the source environment in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * - * Generated from protobuf field string environment = 1; - * @return string - */ - public function getEnvironment() - { - return $this->environment; - } - - /** - * The resource name of the source environment in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * - * Generated from protobuf field string environment = 1; - * @param string $var - * @return $this - */ - public function setEnvironment($var) - { - GPBUtil::checkString($var, True); - $this->environment = $var; - - return $this; - } - - /** - * Location in a Cloud Storage where the snapshot is going to be stored, e.g.: - * "gs://my-bucket/snapshots". - * - * Generated from protobuf field string snapshot_location = 2; - * @return string - */ - public function getSnapshotLocation() - { - return $this->snapshot_location; - } - - /** - * Location in a Cloud Storage where the snapshot is going to be stored, e.g.: - * "gs://my-bucket/snapshots". - * - * Generated from protobuf field string snapshot_location = 2; - * @param string $var - * @return $this - */ - public function setSnapshotLocation($var) - { - GPBUtil::checkString($var, True); - $this->snapshot_location = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/SaveSnapshotResponse.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/SaveSnapshotResponse.php deleted file mode 100644 index 769393e4eae8..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/SaveSnapshotResponse.php +++ /dev/null @@ -1,79 +0,0 @@ -google.cloud.orchestration.airflow.service.v1.SaveSnapshotResponse - */ -class SaveSnapshotResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The fully-resolved Cloud Storage path of the created snapshot, - * e.g.: - * "gs://my-bucket/snapshots/project_location_environment_timestamp". - * This field is populated only if the snapshot creation was successful. - * - * Generated from protobuf field string snapshot_path = 1; - */ - protected $snapshot_path = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $snapshot_path - * The fully-resolved Cloud Storage path of the created snapshot, - * e.g.: - * "gs://my-bucket/snapshots/project_location_environment_timestamp". - * This field is populated only if the snapshot creation was successful. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); - parent::__construct($data); - } - - /** - * The fully-resolved Cloud Storage path of the created snapshot, - * e.g.: - * "gs://my-bucket/snapshots/project_location_environment_timestamp". - * This field is populated only if the snapshot creation was successful. - * - * Generated from protobuf field string snapshot_path = 1; - * @return string - */ - public function getSnapshotPath() - { - return $this->snapshot_path; - } - - /** - * The fully-resolved Cloud Storage path of the created snapshot, - * e.g.: - * "gs://my-bucket/snapshots/project_location_environment_timestamp". - * This field is populated only if the snapshot creation was successful. - * - * Generated from protobuf field string snapshot_path = 1; - * @param string $var - * @return $this - */ - public function setSnapshotPath($var) - { - GPBUtil::checkString($var, True); - $this->snapshot_path = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ScheduledSnapshotsConfig.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ScheduledSnapshotsConfig.php deleted file mode 100644 index ee16abe92c52..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/ScheduledSnapshotsConfig.php +++ /dev/null @@ -1,185 +0,0 @@ -google.cloud.orchestration.airflow.service.v1.ScheduledSnapshotsConfig - */ -class ScheduledSnapshotsConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Whether scheduled snapshots creation is enabled. - * - * Generated from protobuf field bool enabled = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $enabled = false; - /** - * Optional. The Cloud Storage location for storing automatically created - * snapshots. - * - * Generated from protobuf field string snapshot_location = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $snapshot_location = ''; - /** - * Optional. The cron expression representing the time when snapshots creation - * mechanism runs. This field is subject to additional validation around - * frequency of execution. - * - * Generated from protobuf field string snapshot_creation_schedule = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $snapshot_creation_schedule = ''; - /** - * Optional. Time zone that sets the context to interpret - * snapshot_creation_schedule. - * - * Generated from protobuf field string time_zone = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $time_zone = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $enabled - * Optional. Whether scheduled snapshots creation is enabled. - * @type string $snapshot_location - * Optional. The Cloud Storage location for storing automatically created - * snapshots. - * @type string $snapshot_creation_schedule - * Optional. The cron expression representing the time when snapshots creation - * mechanism runs. This field is subject to additional validation around - * frequency of execution. - * @type string $time_zone - * Optional. Time zone that sets the context to interpret - * snapshot_creation_schedule. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Whether scheduled snapshots creation is enabled. - * - * Generated from protobuf field bool enabled = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getEnabled() - { - return $this->enabled; - } - - /** - * Optional. Whether scheduled snapshots creation is enabled. - * - * Generated from protobuf field bool enabled = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setEnabled($var) - { - GPBUtil::checkBool($var); - $this->enabled = $var; - - return $this; - } - - /** - * Optional. The Cloud Storage location for storing automatically created - * snapshots. - * - * Generated from protobuf field string snapshot_location = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getSnapshotLocation() - { - return $this->snapshot_location; - } - - /** - * Optional. The Cloud Storage location for storing automatically created - * snapshots. - * - * Generated from protobuf field string snapshot_location = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setSnapshotLocation($var) - { - GPBUtil::checkString($var, True); - $this->snapshot_location = $var; - - return $this; - } - - /** - * Optional. The cron expression representing the time when snapshots creation - * mechanism runs. This field is subject to additional validation around - * frequency of execution. - * - * Generated from protobuf field string snapshot_creation_schedule = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getSnapshotCreationSchedule() - { - return $this->snapshot_creation_schedule; - } - - /** - * Optional. The cron expression representing the time when snapshots creation - * mechanism runs. This field is subject to additional validation around - * frequency of execution. - * - * Generated from protobuf field string snapshot_creation_schedule = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setSnapshotCreationSchedule($var) - { - GPBUtil::checkString($var, True); - $this->snapshot_creation_schedule = $var; - - return $this; - } - - /** - * Optional. Time zone that sets the context to interpret - * snapshot_creation_schedule. - * - * Generated from protobuf field string time_zone = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getTimeZone() - { - return $this->time_zone; - } - - /** - * Optional. Time zone that sets the context to interpret - * snapshot_creation_schedule. - * - * Generated from protobuf field string time_zone = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setTimeZone($var) - { - GPBUtil::checkString($var, True); - $this->time_zone = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/SoftwareConfig.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/SoftwareConfig.php deleted file mode 100644 index ea2277a07c3e..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/SoftwareConfig.php +++ /dev/null @@ -1,583 +0,0 @@ -google.cloud.orchestration.airflow.service.v1.SoftwareConfig - */ -class SoftwareConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The version of the software running in the environment. - * This encapsulates both the version of Cloud Composer functionality and the - * version of Apache Airflow. It must match the regular expression - * `composer-([0-9]+(\.[0-9]+\.[0-9]+(-preview\.[0-9]+)?)?|latest)-airflow-([0-9]+(\.[0-9]+(\.[0-9]+)?)?)`. - * When used as input, the server also checks if the provided version is - * supported and denies the request for an unsupported version. - * The Cloud Composer portion of the image version is a full - * [semantic version](https://semver.org), or an alias in the form of major - * version number or `latest`. When an alias is provided, the server replaces - * it with the current Cloud Composer version that satisfies the alias. - * The Apache Airflow portion of the image version is a full semantic version - * that points to one of the supported Apache Airflow versions, or an alias in - * the form of only major or major.minor versions specified. When an alias is - * provided, the server replaces it with the latest Apache Airflow version - * that satisfies the alias and is supported in the given Cloud Composer - * version. - * In all cases, the resolved image version is stored in the same field. - * See also [version - * list](/composer/docs/concepts/versioning/composer-versions) and [versioning - * overview](/composer/docs/concepts/versioning/composer-versioning-overview). - * - * Generated from protobuf field string image_version = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $image_version = ''; - /** - * Optional. Apache Airflow configuration properties to override. - * Property keys contain the section and property names, separated by a - * hyphen, for example "core-dags_are_paused_at_creation". Section names must - * not contain hyphens ("-"), opening square brackets ("["), or closing - * square brackets ("]"). The property name must not be empty and must not - * contain an equals sign ("=") or semicolon (";"). Section and property names - * must not contain a period ("."). Apache Airflow configuration property - * names must be written in - * [snake_case](https://en.wikipedia.org/wiki/Snake_case). Property values can - * contain any character, and can be written in any lower/upper case format. - * Certain Apache Airflow configuration property values are - * [blocked](/composer/docs/concepts/airflow-configurations), - * and cannot be overridden. - * - * Generated from protobuf field map airflow_config_overrides = 2; - */ - private $airflow_config_overrides; - /** - * Optional. Custom Python Package Index (PyPI) packages to be installed in - * the environment. - * Keys refer to the lowercase package name such as "numpy" - * and values are the lowercase extras and version specifier such as - * "==1.12.0", "[devel,gcp_api]", or "[devel]>=1.8.2, <1.9.2". To specify a - * package without pinning it to a version specifier, use the empty string as - * the value. - * - * Generated from protobuf field map pypi_packages = 3; - */ - private $pypi_packages; - /** - * Optional. Additional environment variables to provide to the Apache Airflow - * scheduler, worker, and webserver processes. - * Environment variable names must match the regular expression - * `[a-zA-Z_][a-zA-Z0-9_]*`. They cannot specify Apache Airflow - * software configuration overrides (they cannot match the regular expression - * `AIRFLOW__[A-Z0-9_]+__[A-Z0-9_]+`), and they cannot match any of the - * following reserved names: - * * `AIRFLOW_HOME` - * * `C_FORCE_ROOT` - * * `CONTAINER_NAME` - * * `DAGS_FOLDER` - * * `GCP_PROJECT` - * * `GCS_BUCKET` - * * `GKE_CLUSTER_NAME` - * * `SQL_DATABASE` - * * `SQL_INSTANCE` - * * `SQL_PASSWORD` - * * `SQL_PROJECT` - * * `SQL_REGION` - * * `SQL_USER` - * - * Generated from protobuf field map env_variables = 4; - */ - private $env_variables; - /** - * Optional. The major version of Python used to run the Apache Airflow - * scheduler, worker, and webserver processes. - * Can be set to '2' or '3'. If not specified, the default is '3'. Cannot be - * updated. - * This field is only supported for Cloud Composer environments in versions - * composer-1.*.*-airflow-*.*.*. Environments in newer versions always use - * Python major version 3. - * - * Generated from protobuf field string python_version = 6; - */ - protected $python_version = ''; - /** - * Optional. The number of schedulers for Airflow. - * This field is supported for Cloud Composer environments in versions - * composer-1.*.*-airflow-2.*.*. - * - * Generated from protobuf field int32 scheduler_count = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $scheduler_count = 0; - /** - * Optional. The configuration for Cloud Data Lineage integration. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.CloudDataLineageIntegration cloud_data_lineage_integration = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $cloud_data_lineage_integration = null; - /** - * Optional. Whether or not the web server uses custom plugins. - * If unspecified, the field defaults to `PLUGINS_ENABLED`. - * This field is supported for Cloud Composer environments in versions - * composer-3.*.*-airflow-*.*.* and newer. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.SoftwareConfig.WebServerPluginsMode web_server_plugins_mode = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $web_server_plugins_mode = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $image_version - * Optional. The version of the software running in the environment. - * This encapsulates both the version of Cloud Composer functionality and the - * version of Apache Airflow. It must match the regular expression - * `composer-([0-9]+(\.[0-9]+\.[0-9]+(-preview\.[0-9]+)?)?|latest)-airflow-([0-9]+(\.[0-9]+(\.[0-9]+)?)?)`. - * When used as input, the server also checks if the provided version is - * supported and denies the request for an unsupported version. - * The Cloud Composer portion of the image version is a full - * [semantic version](https://semver.org), or an alias in the form of major - * version number or `latest`. When an alias is provided, the server replaces - * it with the current Cloud Composer version that satisfies the alias. - * The Apache Airflow portion of the image version is a full semantic version - * that points to one of the supported Apache Airflow versions, or an alias in - * the form of only major or major.minor versions specified. When an alias is - * provided, the server replaces it with the latest Apache Airflow version - * that satisfies the alias and is supported in the given Cloud Composer - * version. - * In all cases, the resolved image version is stored in the same field. - * See also [version - * list](/composer/docs/concepts/versioning/composer-versions) and [versioning - * overview](/composer/docs/concepts/versioning/composer-versioning-overview). - * @type array|\Google\Protobuf\Internal\MapField $airflow_config_overrides - * Optional. Apache Airflow configuration properties to override. - * Property keys contain the section and property names, separated by a - * hyphen, for example "core-dags_are_paused_at_creation". Section names must - * not contain hyphens ("-"), opening square brackets ("["), or closing - * square brackets ("]"). The property name must not be empty and must not - * contain an equals sign ("=") or semicolon (";"). Section and property names - * must not contain a period ("."). Apache Airflow configuration property - * names must be written in - * [snake_case](https://en.wikipedia.org/wiki/Snake_case). Property values can - * contain any character, and can be written in any lower/upper case format. - * Certain Apache Airflow configuration property values are - * [blocked](/composer/docs/concepts/airflow-configurations), - * and cannot be overridden. - * @type array|\Google\Protobuf\Internal\MapField $pypi_packages - * Optional. Custom Python Package Index (PyPI) packages to be installed in - * the environment. - * Keys refer to the lowercase package name such as "numpy" - * and values are the lowercase extras and version specifier such as - * "==1.12.0", "[devel,gcp_api]", or "[devel]>=1.8.2, <1.9.2". To specify a - * package without pinning it to a version specifier, use the empty string as - * the value. - * @type array|\Google\Protobuf\Internal\MapField $env_variables - * Optional. Additional environment variables to provide to the Apache Airflow - * scheduler, worker, and webserver processes. - * Environment variable names must match the regular expression - * `[a-zA-Z_][a-zA-Z0-9_]*`. They cannot specify Apache Airflow - * software configuration overrides (they cannot match the regular expression - * `AIRFLOW__[A-Z0-9_]+__[A-Z0-9_]+`), and they cannot match any of the - * following reserved names: - * * `AIRFLOW_HOME` - * * `C_FORCE_ROOT` - * * `CONTAINER_NAME` - * * `DAGS_FOLDER` - * * `GCP_PROJECT` - * * `GCS_BUCKET` - * * `GKE_CLUSTER_NAME` - * * `SQL_DATABASE` - * * `SQL_INSTANCE` - * * `SQL_PASSWORD` - * * `SQL_PROJECT` - * * `SQL_REGION` - * * `SQL_USER` - * @type string $python_version - * Optional. The major version of Python used to run the Apache Airflow - * scheduler, worker, and webserver processes. - * Can be set to '2' or '3'. If not specified, the default is '3'. Cannot be - * updated. - * This field is only supported for Cloud Composer environments in versions - * composer-1.*.*-airflow-*.*.*. Environments in newer versions always use - * Python major version 3. - * @type int $scheduler_count - * Optional. The number of schedulers for Airflow. - * This field is supported for Cloud Composer environments in versions - * composer-1.*.*-airflow-2.*.*. - * @type \Google\Cloud\Orchestration\Airflow\Service\V1\CloudDataLineageIntegration $cloud_data_lineage_integration - * Optional. The configuration for Cloud Data Lineage integration. - * @type int $web_server_plugins_mode - * Optional. Whether or not the web server uses custom plugins. - * If unspecified, the field defaults to `PLUGINS_ENABLED`. - * This field is supported for Cloud Composer environments in versions - * composer-3.*.*-airflow-*.*.* and newer. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The version of the software running in the environment. - * This encapsulates both the version of Cloud Composer functionality and the - * version of Apache Airflow. It must match the regular expression - * `composer-([0-9]+(\.[0-9]+\.[0-9]+(-preview\.[0-9]+)?)?|latest)-airflow-([0-9]+(\.[0-9]+(\.[0-9]+)?)?)`. - * When used as input, the server also checks if the provided version is - * supported and denies the request for an unsupported version. - * The Cloud Composer portion of the image version is a full - * [semantic version](https://semver.org), or an alias in the form of major - * version number or `latest`. When an alias is provided, the server replaces - * it with the current Cloud Composer version that satisfies the alias. - * The Apache Airflow portion of the image version is a full semantic version - * that points to one of the supported Apache Airflow versions, or an alias in - * the form of only major or major.minor versions specified. When an alias is - * provided, the server replaces it with the latest Apache Airflow version - * that satisfies the alias and is supported in the given Cloud Composer - * version. - * In all cases, the resolved image version is stored in the same field. - * See also [version - * list](/composer/docs/concepts/versioning/composer-versions) and [versioning - * overview](/composer/docs/concepts/versioning/composer-versioning-overview). - * - * Generated from protobuf field string image_version = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getImageVersion() - { - return $this->image_version; - } - - /** - * Optional. The version of the software running in the environment. - * This encapsulates both the version of Cloud Composer functionality and the - * version of Apache Airflow. It must match the regular expression - * `composer-([0-9]+(\.[0-9]+\.[0-9]+(-preview\.[0-9]+)?)?|latest)-airflow-([0-9]+(\.[0-9]+(\.[0-9]+)?)?)`. - * When used as input, the server also checks if the provided version is - * supported and denies the request for an unsupported version. - * The Cloud Composer portion of the image version is a full - * [semantic version](https://semver.org), or an alias in the form of major - * version number or `latest`. When an alias is provided, the server replaces - * it with the current Cloud Composer version that satisfies the alias. - * The Apache Airflow portion of the image version is a full semantic version - * that points to one of the supported Apache Airflow versions, or an alias in - * the form of only major or major.minor versions specified. When an alias is - * provided, the server replaces it with the latest Apache Airflow version - * that satisfies the alias and is supported in the given Cloud Composer - * version. - * In all cases, the resolved image version is stored in the same field. - * See also [version - * list](/composer/docs/concepts/versioning/composer-versions) and [versioning - * overview](/composer/docs/concepts/versioning/composer-versioning-overview). - * - * Generated from protobuf field string image_version = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setImageVersion($var) - { - GPBUtil::checkString($var, True); - $this->image_version = $var; - - return $this; - } - - /** - * Optional. Apache Airflow configuration properties to override. - * Property keys contain the section and property names, separated by a - * hyphen, for example "core-dags_are_paused_at_creation". Section names must - * not contain hyphens ("-"), opening square brackets ("["), or closing - * square brackets ("]"). The property name must not be empty and must not - * contain an equals sign ("=") or semicolon (";"). Section and property names - * must not contain a period ("."). Apache Airflow configuration property - * names must be written in - * [snake_case](https://en.wikipedia.org/wiki/Snake_case). Property values can - * contain any character, and can be written in any lower/upper case format. - * Certain Apache Airflow configuration property values are - * [blocked](/composer/docs/concepts/airflow-configurations), - * and cannot be overridden. - * - * Generated from protobuf field map airflow_config_overrides = 2; - * @return \Google\Protobuf\Internal\MapField - */ - public function getAirflowConfigOverrides() - { - return $this->airflow_config_overrides; - } - - /** - * Optional. Apache Airflow configuration properties to override. - * Property keys contain the section and property names, separated by a - * hyphen, for example "core-dags_are_paused_at_creation". Section names must - * not contain hyphens ("-"), opening square brackets ("["), or closing - * square brackets ("]"). The property name must not be empty and must not - * contain an equals sign ("=") or semicolon (";"). Section and property names - * must not contain a period ("."). Apache Airflow configuration property - * names must be written in - * [snake_case](https://en.wikipedia.org/wiki/Snake_case). Property values can - * contain any character, and can be written in any lower/upper case format. - * Certain Apache Airflow configuration property values are - * [blocked](/composer/docs/concepts/airflow-configurations), - * and cannot be overridden. - * - * Generated from protobuf field map airflow_config_overrides = 2; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setAirflowConfigOverrides($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->airflow_config_overrides = $arr; - - return $this; - } - - /** - * Optional. Custom Python Package Index (PyPI) packages to be installed in - * the environment. - * Keys refer to the lowercase package name such as "numpy" - * and values are the lowercase extras and version specifier such as - * "==1.12.0", "[devel,gcp_api]", or "[devel]>=1.8.2, <1.9.2". To specify a - * package without pinning it to a version specifier, use the empty string as - * the value. - * - * Generated from protobuf field map pypi_packages = 3; - * @return \Google\Protobuf\Internal\MapField - */ - public function getPypiPackages() - { - return $this->pypi_packages; - } - - /** - * Optional. Custom Python Package Index (PyPI) packages to be installed in - * the environment. - * Keys refer to the lowercase package name such as "numpy" - * and values are the lowercase extras and version specifier such as - * "==1.12.0", "[devel,gcp_api]", or "[devel]>=1.8.2, <1.9.2". To specify a - * package without pinning it to a version specifier, use the empty string as - * the value. - * - * Generated from protobuf field map pypi_packages = 3; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setPypiPackages($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->pypi_packages = $arr; - - return $this; - } - - /** - * Optional. Additional environment variables to provide to the Apache Airflow - * scheduler, worker, and webserver processes. - * Environment variable names must match the regular expression - * `[a-zA-Z_][a-zA-Z0-9_]*`. They cannot specify Apache Airflow - * software configuration overrides (they cannot match the regular expression - * `AIRFLOW__[A-Z0-9_]+__[A-Z0-9_]+`), and they cannot match any of the - * following reserved names: - * * `AIRFLOW_HOME` - * * `C_FORCE_ROOT` - * * `CONTAINER_NAME` - * * `DAGS_FOLDER` - * * `GCP_PROJECT` - * * `GCS_BUCKET` - * * `GKE_CLUSTER_NAME` - * * `SQL_DATABASE` - * * `SQL_INSTANCE` - * * `SQL_PASSWORD` - * * `SQL_PROJECT` - * * `SQL_REGION` - * * `SQL_USER` - * - * Generated from protobuf field map env_variables = 4; - * @return \Google\Protobuf\Internal\MapField - */ - public function getEnvVariables() - { - return $this->env_variables; - } - - /** - * Optional. Additional environment variables to provide to the Apache Airflow - * scheduler, worker, and webserver processes. - * Environment variable names must match the regular expression - * `[a-zA-Z_][a-zA-Z0-9_]*`. They cannot specify Apache Airflow - * software configuration overrides (they cannot match the regular expression - * `AIRFLOW__[A-Z0-9_]+__[A-Z0-9_]+`), and they cannot match any of the - * following reserved names: - * * `AIRFLOW_HOME` - * * `C_FORCE_ROOT` - * * `CONTAINER_NAME` - * * `DAGS_FOLDER` - * * `GCP_PROJECT` - * * `GCS_BUCKET` - * * `GKE_CLUSTER_NAME` - * * `SQL_DATABASE` - * * `SQL_INSTANCE` - * * `SQL_PASSWORD` - * * `SQL_PROJECT` - * * `SQL_REGION` - * * `SQL_USER` - * - * Generated from protobuf field map env_variables = 4; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setEnvVariables($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->env_variables = $arr; - - return $this; - } - - /** - * Optional. The major version of Python used to run the Apache Airflow - * scheduler, worker, and webserver processes. - * Can be set to '2' or '3'. If not specified, the default is '3'. Cannot be - * updated. - * This field is only supported for Cloud Composer environments in versions - * composer-1.*.*-airflow-*.*.*. Environments in newer versions always use - * Python major version 3. - * - * Generated from protobuf field string python_version = 6; - * @return string - */ - public function getPythonVersion() - { - return $this->python_version; - } - - /** - * Optional. The major version of Python used to run the Apache Airflow - * scheduler, worker, and webserver processes. - * Can be set to '2' or '3'. If not specified, the default is '3'. Cannot be - * updated. - * This field is only supported for Cloud Composer environments in versions - * composer-1.*.*-airflow-*.*.*. Environments in newer versions always use - * Python major version 3. - * - * Generated from protobuf field string python_version = 6; - * @param string $var - * @return $this - */ - public function setPythonVersion($var) - { - GPBUtil::checkString($var, True); - $this->python_version = $var; - - return $this; - } - - /** - * Optional. The number of schedulers for Airflow. - * This field is supported for Cloud Composer environments in versions - * composer-1.*.*-airflow-2.*.*. - * - * Generated from protobuf field int32 scheduler_count = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getSchedulerCount() - { - return $this->scheduler_count; - } - - /** - * Optional. The number of schedulers for Airflow. - * This field is supported for Cloud Composer environments in versions - * composer-1.*.*-airflow-2.*.*. - * - * Generated from protobuf field int32 scheduler_count = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setSchedulerCount($var) - { - GPBUtil::checkInt32($var); - $this->scheduler_count = $var; - - return $this; - } - - /** - * Optional. The configuration for Cloud Data Lineage integration. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.CloudDataLineageIntegration cloud_data_lineage_integration = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Orchestration\Airflow\Service\V1\CloudDataLineageIntegration|null - */ - public function getCloudDataLineageIntegration() - { - return $this->cloud_data_lineage_integration; - } - - public function hasCloudDataLineageIntegration() - { - return isset($this->cloud_data_lineage_integration); - } - - public function clearCloudDataLineageIntegration() - { - unset($this->cloud_data_lineage_integration); - } - - /** - * Optional. The configuration for Cloud Data Lineage integration. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.CloudDataLineageIntegration cloud_data_lineage_integration = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Orchestration\Airflow\Service\V1\CloudDataLineageIntegration $var - * @return $this - */ - public function setCloudDataLineageIntegration($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Orchestration\Airflow\Service\V1\CloudDataLineageIntegration::class); - $this->cloud_data_lineage_integration = $var; - - return $this; - } - - /** - * Optional. Whether or not the web server uses custom plugins. - * If unspecified, the field defaults to `PLUGINS_ENABLED`. - * This field is supported for Cloud Composer environments in versions - * composer-3.*.*-airflow-*.*.* and newer. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.SoftwareConfig.WebServerPluginsMode web_server_plugins_mode = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getWebServerPluginsMode() - { - return $this->web_server_plugins_mode; - } - - /** - * Optional. Whether or not the web server uses custom plugins. - * If unspecified, the field defaults to `PLUGINS_ENABLED`. - * This field is supported for Cloud Composer environments in versions - * composer-3.*.*-airflow-*.*.* and newer. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.SoftwareConfig.WebServerPluginsMode web_server_plugins_mode = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setWebServerPluginsMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Orchestration\Airflow\Service\V1\SoftwareConfig\WebServerPluginsMode::class); - $this->web_server_plugins_mode = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/SoftwareConfig/WebServerPluginsMode.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/SoftwareConfig/WebServerPluginsMode.php deleted file mode 100644 index 05096507030c..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/SoftwareConfig/WebServerPluginsMode.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.orchestration.airflow.service.v1.SoftwareConfig.WebServerPluginsMode - */ -class WebServerPluginsMode -{ - /** - * Default mode. - * - * Generated from protobuf enum WEB_SERVER_PLUGINS_MODE_UNSPECIFIED = 0; - */ - const WEB_SERVER_PLUGINS_MODE_UNSPECIFIED = 0; - /** - * Web server plugins are not supported. - * - * Generated from protobuf enum PLUGINS_DISABLED = 1; - */ - const PLUGINS_DISABLED = 1; - /** - * Web server plugins are supported. - * - * Generated from protobuf enum PLUGINS_ENABLED = 2; - */ - const PLUGINS_ENABLED = 2; - - private static $valueToName = [ - self::WEB_SERVER_PLUGINS_MODE_UNSPECIFIED => 'WEB_SERVER_PLUGINS_MODE_UNSPECIFIED', - self::PLUGINS_DISABLED => 'PLUGINS_DISABLED', - self::PLUGINS_ENABLED => 'PLUGINS_ENABLED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(WebServerPluginsMode::class, \Google\Cloud\Orchestration\Airflow\Service\V1\SoftwareConfig_WebServerPluginsMode::class); - diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/StopAirflowCommandRequest.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/StopAirflowCommandRequest.php deleted file mode 100644 index 01cc5c8be841..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/StopAirflowCommandRequest.php +++ /dev/null @@ -1,211 +0,0 @@ -google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest - */ -class StopAirflowCommandRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the environment in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}". - * - * Generated from protobuf field string environment = 1; - */ - protected $environment = ''; - /** - * The unique ID of the command execution. - * - * Generated from protobuf field string execution_id = 2; - */ - protected $execution_id = ''; - /** - * The name of the pod where the command is executed. - * - * Generated from protobuf field string pod = 3; - */ - protected $pod = ''; - /** - * The namespace of the pod where the command is executed. - * - * Generated from protobuf field string pod_namespace = 4; - */ - protected $pod_namespace = ''; - /** - * If true, the execution is terminated forcefully (SIGKILL). If false, the - * execution is stopped gracefully, giving it time for cleanup. - * - * Generated from protobuf field bool force = 5; - */ - protected $force = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $environment - * The resource name of the environment in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}". - * @type string $execution_id - * The unique ID of the command execution. - * @type string $pod - * The name of the pod where the command is executed. - * @type string $pod_namespace - * The namespace of the pod where the command is executed. - * @type bool $force - * If true, the execution is terminated forcefully (SIGKILL). If false, the - * execution is stopped gracefully, giving it time for cleanup. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the environment in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}". - * - * Generated from protobuf field string environment = 1; - * @return string - */ - public function getEnvironment() - { - return $this->environment; - } - - /** - * The resource name of the environment in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}". - * - * Generated from protobuf field string environment = 1; - * @param string $var - * @return $this - */ - public function setEnvironment($var) - { - GPBUtil::checkString($var, True); - $this->environment = $var; - - return $this; - } - - /** - * The unique ID of the command execution. - * - * Generated from protobuf field string execution_id = 2; - * @return string - */ - public function getExecutionId() - { - return $this->execution_id; - } - - /** - * The unique ID of the command execution. - * - * Generated from protobuf field string execution_id = 2; - * @param string $var - * @return $this - */ - public function setExecutionId($var) - { - GPBUtil::checkString($var, True); - $this->execution_id = $var; - - return $this; - } - - /** - * The name of the pod where the command is executed. - * - * Generated from protobuf field string pod = 3; - * @return string - */ - public function getPod() - { - return $this->pod; - } - - /** - * The name of the pod where the command is executed. - * - * Generated from protobuf field string pod = 3; - * @param string $var - * @return $this - */ - public function setPod($var) - { - GPBUtil::checkString($var, True); - $this->pod = $var; - - return $this; - } - - /** - * The namespace of the pod where the command is executed. - * - * Generated from protobuf field string pod_namespace = 4; - * @return string - */ - public function getPodNamespace() - { - return $this->pod_namespace; - } - - /** - * The namespace of the pod where the command is executed. - * - * Generated from protobuf field string pod_namespace = 4; - * @param string $var - * @return $this - */ - public function setPodNamespace($var) - { - GPBUtil::checkString($var, True); - $this->pod_namespace = $var; - - return $this; - } - - /** - * If true, the execution is terminated forcefully (SIGKILL). If false, the - * execution is stopped gracefully, giving it time for cleanup. - * - * Generated from protobuf field bool force = 5; - * @return bool - */ - public function getForce() - { - return $this->force; - } - - /** - * If true, the execution is terminated forcefully (SIGKILL). If false, the - * execution is stopped gracefully, giving it time for cleanup. - * - * Generated from protobuf field bool force = 5; - * @param bool $var - * @return $this - */ - public function setForce($var) - { - GPBUtil::checkBool($var); - $this->force = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/StopAirflowCommandResponse.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/StopAirflowCommandResponse.php deleted file mode 100644 index 89e52c6e0492..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/StopAirflowCommandResponse.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse - */ -class StopAirflowCommandResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Whether the execution is still running. - * - * Generated from protobuf field bool is_done = 1; - */ - protected $is_done = false; - /** - * Output message from stopping execution request. - * - * Generated from protobuf field repeated string output = 2; - */ - private $output; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $is_done - * Whether the execution is still running. - * @type array|\Google\Protobuf\Internal\RepeatedField $output - * Output message from stopping execution request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); - parent::__construct($data); - } - - /** - * Whether the execution is still running. - * - * Generated from protobuf field bool is_done = 1; - * @return bool - */ - public function getIsDone() - { - return $this->is_done; - } - - /** - * Whether the execution is still running. - * - * Generated from protobuf field bool is_done = 1; - * @param bool $var - * @return $this - */ - public function setIsDone($var) - { - GPBUtil::checkBool($var); - $this->is_done = $var; - - return $this; - } - - /** - * Output message from stopping execution request. - * - * Generated from protobuf field repeated string output = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getOutput() - { - return $this->output; - } - - /** - * Output message from stopping execution request. - * - * Generated from protobuf field repeated string output = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setOutput($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->output = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/StorageConfig.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/StorageConfig.php deleted file mode 100644 index 20976333720f..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/StorageConfig.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.orchestration.airflow.service.v1.StorageConfig - */ -class StorageConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The name of the Cloud Storage bucket used by the environment. No - * `gs://` prefix. - * - * Generated from protobuf field string bucket = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $bucket = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $bucket - * Optional. The name of the Cloud Storage bucket used by the environment. No - * `gs://` prefix. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The name of the Cloud Storage bucket used by the environment. No - * `gs://` prefix. - * - * Generated from protobuf field string bucket = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getBucket() - { - return $this->bucket; - } - - /** - * Optional. The name of the Cloud Storage bucket used by the environment. No - * `gs://` prefix. - * - * Generated from protobuf field string bucket = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setBucket($var) - { - GPBUtil::checkString($var, True); - $this->bucket = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/TaskLogsRetentionConfig.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/TaskLogsRetentionConfig.php deleted file mode 100644 index bd0d655b9bd1..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/TaskLogsRetentionConfig.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig - */ -class TaskLogsRetentionConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The mode of storage for Airflow workers task logs. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig.TaskLogsStorageMode storage_mode = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $storage_mode = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $storage_mode - * Optional. The mode of storage for Airflow workers task logs. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The mode of storage for Airflow workers task logs. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig.TaskLogsStorageMode storage_mode = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getStorageMode() - { - return $this->storage_mode; - } - - /** - * Optional. The mode of storage for Airflow workers task logs. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig.TaskLogsStorageMode storage_mode = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setStorageMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Orchestration\Airflow\Service\V1\TaskLogsRetentionConfig\TaskLogsStorageMode::class); - $this->storage_mode = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/TaskLogsRetentionConfig/TaskLogsStorageMode.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/TaskLogsRetentionConfig/TaskLogsStorageMode.php deleted file mode 100644 index 1f4db54b8b6b..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/TaskLogsRetentionConfig/TaskLogsStorageMode.php +++ /dev/null @@ -1,65 +0,0 @@ -google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig.TaskLogsStorageMode - */ -class TaskLogsStorageMode -{ - /** - * This configuration is not specified by the user. - * - * Generated from protobuf enum TASK_LOGS_STORAGE_MODE_UNSPECIFIED = 0; - */ - const TASK_LOGS_STORAGE_MODE_UNSPECIFIED = 0; - /** - * Store task logs in Cloud Logging and in the environment's Cloud Storage - * bucket. - * - * Generated from protobuf enum CLOUD_LOGGING_AND_CLOUD_STORAGE = 1; - */ - const CLOUD_LOGGING_AND_CLOUD_STORAGE = 1; - /** - * Store task logs in Cloud Logging only. - * - * Generated from protobuf enum CLOUD_LOGGING_ONLY = 2; - */ - const CLOUD_LOGGING_ONLY = 2; - - private static $valueToName = [ - self::TASK_LOGS_STORAGE_MODE_UNSPECIFIED => 'TASK_LOGS_STORAGE_MODE_UNSPECIFIED', - self::CLOUD_LOGGING_AND_CLOUD_STORAGE => 'CLOUD_LOGGING_AND_CLOUD_STORAGE', - self::CLOUD_LOGGING_ONLY => 'CLOUD_LOGGING_ONLY', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(TaskLogsStorageMode::class, \Google\Cloud\Orchestration\Airflow\Service\V1\TaskLogsRetentionConfig_TaskLogsStorageMode::class); - diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/UpdateEnvironmentRequest.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/UpdateEnvironmentRequest.php deleted file mode 100644 index 5dc8e78f5eef..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/UpdateEnvironmentRequest.php +++ /dev/null @@ -1,756 +0,0 @@ -google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest - */ -class UpdateEnvironmentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The relative resource name of the environment to update, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * - * Generated from protobuf field string name = 2; - */ - protected $name = ''; - /** - * A patch environment. Fields specified by the `updateMask` will be copied - * from the patch environment into the environment under update. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.Environment environment = 1; - */ - protected $environment = null; - /** - * Required. A comma-separated list of paths, relative to `Environment`, of - * fields to update. - * For example, to set the version of scikit-learn to install in the - * environment to 0.19.0 and to remove an existing installation of - * numpy, the `updateMask` parameter would include the following two - * `paths` values: "config.softwareConfig.pypiPackages.scikit-learn" and - * "config.softwareConfig.pypiPackages.numpy". The included patch - * environment would specify the scikit-learn version as follows: - * { - * "config":{ - * "softwareConfig":{ - * "pypiPackages":{ - * "scikit-learn":"==0.19.0" - * } - * } - * } - * } - * Note that in the above example, any existing PyPI packages - * other than scikit-learn and numpy will be unaffected. - * Only one update type may be included in a single request's `updateMask`. - * For example, one cannot update both the PyPI packages and - * labels in the same request. However, it is possible to update multiple - * members of a map field simultaneously in the same request. For example, - * to set the labels "label1" and "label2" while clearing "label3" (assuming - * it already exists), one can - * provide the paths "labels.label1", "labels.label2", and "labels.label3" - * and populate the patch environment as follows: - * { - * "labels":{ - * "label1":"new-label1-value" - * "label2":"new-label2-value" - * } - * } - * Note that in the above example, any existing labels that are not - * included in the `updateMask` will be unaffected. - * It is also possible to replace an entire map field by providing the - * map field's path in the `updateMask`. The new value of the field will - * be that which is provided in the patch environment. For example, to - * delete all pre-existing user-specified PyPI packages and - * install botocore at version 1.7.14, the `updateMask` would contain - * the path "config.softwareConfig.pypiPackages", and - * the patch environment would be the following: - * { - * "config":{ - * "softwareConfig":{ - * "pypiPackages":{ - * "botocore":"==1.7.14" - * } - * } - * } - * } - * **Note:** Only the following fields can be updated: - * * `config.softwareConfig.pypiPackages` - * * Replace all custom custom PyPI packages. If a replacement - * package map is not included in `environment`, all custom - * PyPI packages are cleared. It is an error to provide both - * this mask and a mask specifying an individual package. - * * `config.softwareConfig.pypiPackages.`packagename - * * Update the custom PyPI package *packagename*, - * preserving other packages. To delete the package, include it in - * `updateMask`, and omit the mapping for it in - * `environment.config.softwareConfig.pypiPackages`. It is an error - * to provide both a mask of this form and the - * `config.softwareConfig.pypiPackages` mask. - * * `labels` - * * Replace all environment labels. If a replacement labels map is not - * included in `environment`, all labels are cleared. It is an error to - * provide both this mask and a mask specifying one or more individual - * labels. - * * `labels.`labelName - * * Set the label named *labelName*, while preserving other - * labels. To delete the label, include it in `updateMask` and omit its - * mapping in `environment.labels`. It is an error to provide both a - * mask of this form and the `labels` mask. - * * `config.nodeCount` - * * Horizontally scale the number of nodes in the environment. An integer - * greater than or equal to 3 must be provided in the `config.nodeCount` - * field. Supported for Cloud Composer environments in versions - * composer-1.*.*-airflow-*.*.*. - * * `config.webServerNetworkAccessControl` - * * Replace the environment's current `WebServerNetworkAccessControl`. - * * `config.softwareConfig.airflowConfigOverrides` - * * Replace all Apache Airflow config overrides. If a replacement config - * overrides map is not included in `environment`, all config overrides - * are cleared. - * It is an error to provide both this mask and a mask specifying one or - * more individual config overrides. - * * `config.softwareConfig.airflowConfigOverrides.`section-name - * * Override the Apache Airflow config property *name* in the - * section named *section*, preserving other properties. To - * delete the property override, include it in `updateMask` and omit its - * mapping in - * `environment.config.softwareConfig.airflowConfigOverrides`. - * It is an error to provide both a mask of this form and the - * `config.softwareConfig.airflowConfigOverrides` mask. - * * `config.softwareConfig.envVariables` - * * Replace all environment variables. If a replacement environment - * variable map is not included in `environment`, all custom environment - * variables are cleared. - * * `config.softwareConfig.schedulerCount` - * * Horizontally scale the number of schedulers in Airflow. A positive - * integer not greater than the number of nodes must be provided in the - * `config.softwareConfig.schedulerCount` field. Supported for Cloud - * Composer environments in versions composer-1.*.*-airflow-2.*.*. - * * `config.databaseConfig.machineType` - * * Cloud SQL machine type used by Airflow database. - * It has to be one of: db-n1-standard-2, db-n1-standard-4, - * db-n1-standard-8 or db-n1-standard-16. Supported for Cloud Composer - * environments in versions composer-1.*.*-airflow-*.*.*. - * * `config.webServerConfig.machineType` - * * Machine type on which Airflow web server is running. - * It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4 - * or composer-n1-webserver-8. Supported for Cloud Composer environments - * in versions composer-1.*.*-airflow-*.*.*. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3; - */ - protected $update_mask = null; - - /** - * @param string $name The relative resource name of the environment to update, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * @param \Google\Cloud\Orchestration\Airflow\Service\V1\Environment $environment A patch environment. Fields specified by the `updateMask` will be copied - * from the patch environment into the environment under update. - * @param \Google\Protobuf\FieldMask $updateMask Required. A comma-separated list of paths, relative to `Environment`, of - * fields to update. - * For example, to set the version of scikit-learn to install in the - * environment to 0.19.0 and to remove an existing installation of - * numpy, the `updateMask` parameter would include the following two - * `paths` values: "config.softwareConfig.pypiPackages.scikit-learn" and - * "config.softwareConfig.pypiPackages.numpy". The included patch - * environment would specify the scikit-learn version as follows: - * - * { - * "config":{ - * "softwareConfig":{ - * "pypiPackages":{ - * "scikit-learn":"==0.19.0" - * } - * } - * } - * } - * - * Note that in the above example, any existing PyPI packages - * other than scikit-learn and numpy will be unaffected. - * - * Only one update type may be included in a single request's `updateMask`. - * For example, one cannot update both the PyPI packages and - * labels in the same request. However, it is possible to update multiple - * members of a map field simultaneously in the same request. For example, - * to set the labels "label1" and "label2" while clearing "label3" (assuming - * it already exists), one can - * provide the paths "labels.label1", "labels.label2", and "labels.label3" - * and populate the patch environment as follows: - * - * { - * "labels":{ - * "label1":"new-label1-value" - * "label2":"new-label2-value" - * } - * } - * - * Note that in the above example, any existing labels that are not - * included in the `updateMask` will be unaffected. - * - * It is also possible to replace an entire map field by providing the - * map field's path in the `updateMask`. The new value of the field will - * be that which is provided in the patch environment. For example, to - * delete all pre-existing user-specified PyPI packages and - * install botocore at version 1.7.14, the `updateMask` would contain - * the path "config.softwareConfig.pypiPackages", and - * the patch environment would be the following: - * - * { - * "config":{ - * "softwareConfig":{ - * "pypiPackages":{ - * "botocore":"==1.7.14" - * } - * } - * } - * } - * - * **Note:** Only the following fields can be updated: - * - * * `config.softwareConfig.pypiPackages` - * * Replace all custom custom PyPI packages. If a replacement - * package map is not included in `environment`, all custom - * PyPI packages are cleared. It is an error to provide both - * this mask and a mask specifying an individual package. - * * `config.softwareConfig.pypiPackages.`packagename - * * Update the custom PyPI package *packagename*, - * preserving other packages. To delete the package, include it in - * `updateMask`, and omit the mapping for it in - * `environment.config.softwareConfig.pypiPackages`. It is an error - * to provide both a mask of this form and the - * `config.softwareConfig.pypiPackages` mask. - * * `labels` - * * Replace all environment labels. If a replacement labels map is not - * included in `environment`, all labels are cleared. It is an error to - * provide both this mask and a mask specifying one or more individual - * labels. - * * `labels.`labelName - * * Set the label named *labelName*, while preserving other - * labels. To delete the label, include it in `updateMask` and omit its - * mapping in `environment.labels`. It is an error to provide both a - * mask of this form and the `labels` mask. - * * `config.nodeCount` - * * Horizontally scale the number of nodes in the environment. An integer - * greater than or equal to 3 must be provided in the `config.nodeCount` - * field. Supported for Cloud Composer environments in versions - * composer-1.*.*-airflow-*.*.*. - * * `config.webServerNetworkAccessControl` - * * Replace the environment's current `WebServerNetworkAccessControl`. - * * `config.softwareConfig.airflowConfigOverrides` - * * Replace all Apache Airflow config overrides. If a replacement config - * overrides map is not included in `environment`, all config overrides - * are cleared. - * It is an error to provide both this mask and a mask specifying one or - * more individual config overrides. - * * `config.softwareConfig.airflowConfigOverrides.`section-name - * * Override the Apache Airflow config property *name* in the - * section named *section*, preserving other properties. To - * delete the property override, include it in `updateMask` and omit its - * mapping in - * `environment.config.softwareConfig.airflowConfigOverrides`. - * It is an error to provide both a mask of this form and the - * `config.softwareConfig.airflowConfigOverrides` mask. - * * `config.softwareConfig.envVariables` - * * Replace all environment variables. If a replacement environment - * variable map is not included in `environment`, all custom environment - * variables are cleared. - * * `config.softwareConfig.schedulerCount` - * * Horizontally scale the number of schedulers in Airflow. A positive - * integer not greater than the number of nodes must be provided in the - * `config.softwareConfig.schedulerCount` field. Supported for Cloud - * Composer environments in versions composer-1.*.*-airflow-2.*.*. - * * `config.databaseConfig.machineType` - * * Cloud SQL machine type used by Airflow database. - * It has to be one of: db-n1-standard-2, db-n1-standard-4, - * db-n1-standard-8 or db-n1-standard-16. Supported for Cloud Composer - * environments in versions composer-1.*.*-airflow-*.*.*. - * * `config.webServerConfig.machineType` - * * Machine type on which Airflow web server is running. - * It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4 - * or composer-n1-webserver-8. Supported for Cloud Composer environments - * in versions composer-1.*.*-airflow-*.*.*. - * - * @return \Google\Cloud\Orchestration\Airflow\Service\V1\UpdateEnvironmentRequest - * - * @experimental - */ - public static function build(string $name, \Google\Cloud\Orchestration\Airflow\Service\V1\Environment $environment, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setName($name) - ->setEnvironment($environment) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The relative resource name of the environment to update, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * @type \Google\Cloud\Orchestration\Airflow\Service\V1\Environment $environment - * A patch environment. Fields specified by the `updateMask` will be copied - * from the patch environment into the environment under update. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. A comma-separated list of paths, relative to `Environment`, of - * fields to update. - * For example, to set the version of scikit-learn to install in the - * environment to 0.19.0 and to remove an existing installation of - * numpy, the `updateMask` parameter would include the following two - * `paths` values: "config.softwareConfig.pypiPackages.scikit-learn" and - * "config.softwareConfig.pypiPackages.numpy". The included patch - * environment would specify the scikit-learn version as follows: - * { - * "config":{ - * "softwareConfig":{ - * "pypiPackages":{ - * "scikit-learn":"==0.19.0" - * } - * } - * } - * } - * Note that in the above example, any existing PyPI packages - * other than scikit-learn and numpy will be unaffected. - * Only one update type may be included in a single request's `updateMask`. - * For example, one cannot update both the PyPI packages and - * labels in the same request. However, it is possible to update multiple - * members of a map field simultaneously in the same request. For example, - * to set the labels "label1" and "label2" while clearing "label3" (assuming - * it already exists), one can - * provide the paths "labels.label1", "labels.label2", and "labels.label3" - * and populate the patch environment as follows: - * { - * "labels":{ - * "label1":"new-label1-value" - * "label2":"new-label2-value" - * } - * } - * Note that in the above example, any existing labels that are not - * included in the `updateMask` will be unaffected. - * It is also possible to replace an entire map field by providing the - * map field's path in the `updateMask`. The new value of the field will - * be that which is provided in the patch environment. For example, to - * delete all pre-existing user-specified PyPI packages and - * install botocore at version 1.7.14, the `updateMask` would contain - * the path "config.softwareConfig.pypiPackages", and - * the patch environment would be the following: - * { - * "config":{ - * "softwareConfig":{ - * "pypiPackages":{ - * "botocore":"==1.7.14" - * } - * } - * } - * } - * **Note:** Only the following fields can be updated: - * * `config.softwareConfig.pypiPackages` - * * Replace all custom custom PyPI packages. If a replacement - * package map is not included in `environment`, all custom - * PyPI packages are cleared. It is an error to provide both - * this mask and a mask specifying an individual package. - * * `config.softwareConfig.pypiPackages.`packagename - * * Update the custom PyPI package *packagename*, - * preserving other packages. To delete the package, include it in - * `updateMask`, and omit the mapping for it in - * `environment.config.softwareConfig.pypiPackages`. It is an error - * to provide both a mask of this form and the - * `config.softwareConfig.pypiPackages` mask. - * * `labels` - * * Replace all environment labels. If a replacement labels map is not - * included in `environment`, all labels are cleared. It is an error to - * provide both this mask and a mask specifying one or more individual - * labels. - * * `labels.`labelName - * * Set the label named *labelName*, while preserving other - * labels. To delete the label, include it in `updateMask` and omit its - * mapping in `environment.labels`. It is an error to provide both a - * mask of this form and the `labels` mask. - * * `config.nodeCount` - * * Horizontally scale the number of nodes in the environment. An integer - * greater than or equal to 3 must be provided in the `config.nodeCount` - * field. Supported for Cloud Composer environments in versions - * composer-1.*.*-airflow-*.*.*. - * * `config.webServerNetworkAccessControl` - * * Replace the environment's current `WebServerNetworkAccessControl`. - * * `config.softwareConfig.airflowConfigOverrides` - * * Replace all Apache Airflow config overrides. If a replacement config - * overrides map is not included in `environment`, all config overrides - * are cleared. - * It is an error to provide both this mask and a mask specifying one or - * more individual config overrides. - * * `config.softwareConfig.airflowConfigOverrides.`section-name - * * Override the Apache Airflow config property *name* in the - * section named *section*, preserving other properties. To - * delete the property override, include it in `updateMask` and omit its - * mapping in - * `environment.config.softwareConfig.airflowConfigOverrides`. - * It is an error to provide both a mask of this form and the - * `config.softwareConfig.airflowConfigOverrides` mask. - * * `config.softwareConfig.envVariables` - * * Replace all environment variables. If a replacement environment - * variable map is not included in `environment`, all custom environment - * variables are cleared. - * * `config.softwareConfig.schedulerCount` - * * Horizontally scale the number of schedulers in Airflow. A positive - * integer not greater than the number of nodes must be provided in the - * `config.softwareConfig.schedulerCount` field. Supported for Cloud - * Composer environments in versions composer-1.*.*-airflow-2.*.*. - * * `config.databaseConfig.machineType` - * * Cloud SQL machine type used by Airflow database. - * It has to be one of: db-n1-standard-2, db-n1-standard-4, - * db-n1-standard-8 or db-n1-standard-16. Supported for Cloud Composer - * environments in versions composer-1.*.*-airflow-*.*.*. - * * `config.webServerConfig.machineType` - * * Machine type on which Airflow web server is running. - * It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4 - * or composer-n1-webserver-8. Supported for Cloud Composer environments - * in versions composer-1.*.*-airflow-*.*.*. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); - parent::__construct($data); - } - - /** - * The relative resource name of the environment to update, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * - * Generated from protobuf field string name = 2; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The relative resource name of the environment to update, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * - * Generated from protobuf field string name = 2; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * A patch environment. Fields specified by the `updateMask` will be copied - * from the patch environment into the environment under update. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.Environment environment = 1; - * @return \Google\Cloud\Orchestration\Airflow\Service\V1\Environment|null - */ - public function getEnvironment() - { - return $this->environment; - } - - public function hasEnvironment() - { - return isset($this->environment); - } - - public function clearEnvironment() - { - unset($this->environment); - } - - /** - * A patch environment. Fields specified by the `updateMask` will be copied - * from the patch environment into the environment under update. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.Environment environment = 1; - * @param \Google\Cloud\Orchestration\Airflow\Service\V1\Environment $var - * @return $this - */ - public function setEnvironment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Orchestration\Airflow\Service\V1\Environment::class); - $this->environment = $var; - - return $this; - } - - /** - * Required. A comma-separated list of paths, relative to `Environment`, of - * fields to update. - * For example, to set the version of scikit-learn to install in the - * environment to 0.19.0 and to remove an existing installation of - * numpy, the `updateMask` parameter would include the following two - * `paths` values: "config.softwareConfig.pypiPackages.scikit-learn" and - * "config.softwareConfig.pypiPackages.numpy". The included patch - * environment would specify the scikit-learn version as follows: - * { - * "config":{ - * "softwareConfig":{ - * "pypiPackages":{ - * "scikit-learn":"==0.19.0" - * } - * } - * } - * } - * Note that in the above example, any existing PyPI packages - * other than scikit-learn and numpy will be unaffected. - * Only one update type may be included in a single request's `updateMask`. - * For example, one cannot update both the PyPI packages and - * labels in the same request. However, it is possible to update multiple - * members of a map field simultaneously in the same request. For example, - * to set the labels "label1" and "label2" while clearing "label3" (assuming - * it already exists), one can - * provide the paths "labels.label1", "labels.label2", and "labels.label3" - * and populate the patch environment as follows: - * { - * "labels":{ - * "label1":"new-label1-value" - * "label2":"new-label2-value" - * } - * } - * Note that in the above example, any existing labels that are not - * included in the `updateMask` will be unaffected. - * It is also possible to replace an entire map field by providing the - * map field's path in the `updateMask`. The new value of the field will - * be that which is provided in the patch environment. For example, to - * delete all pre-existing user-specified PyPI packages and - * install botocore at version 1.7.14, the `updateMask` would contain - * the path "config.softwareConfig.pypiPackages", and - * the patch environment would be the following: - * { - * "config":{ - * "softwareConfig":{ - * "pypiPackages":{ - * "botocore":"==1.7.14" - * } - * } - * } - * } - * **Note:** Only the following fields can be updated: - * * `config.softwareConfig.pypiPackages` - * * Replace all custom custom PyPI packages. If a replacement - * package map is not included in `environment`, all custom - * PyPI packages are cleared. It is an error to provide both - * this mask and a mask specifying an individual package. - * * `config.softwareConfig.pypiPackages.`packagename - * * Update the custom PyPI package *packagename*, - * preserving other packages. To delete the package, include it in - * `updateMask`, and omit the mapping for it in - * `environment.config.softwareConfig.pypiPackages`. It is an error - * to provide both a mask of this form and the - * `config.softwareConfig.pypiPackages` mask. - * * `labels` - * * Replace all environment labels. If a replacement labels map is not - * included in `environment`, all labels are cleared. It is an error to - * provide both this mask and a mask specifying one or more individual - * labels. - * * `labels.`labelName - * * Set the label named *labelName*, while preserving other - * labels. To delete the label, include it in `updateMask` and omit its - * mapping in `environment.labels`. It is an error to provide both a - * mask of this form and the `labels` mask. - * * `config.nodeCount` - * * Horizontally scale the number of nodes in the environment. An integer - * greater than or equal to 3 must be provided in the `config.nodeCount` - * field. Supported for Cloud Composer environments in versions - * composer-1.*.*-airflow-*.*.*. - * * `config.webServerNetworkAccessControl` - * * Replace the environment's current `WebServerNetworkAccessControl`. - * * `config.softwareConfig.airflowConfigOverrides` - * * Replace all Apache Airflow config overrides. If a replacement config - * overrides map is not included in `environment`, all config overrides - * are cleared. - * It is an error to provide both this mask and a mask specifying one or - * more individual config overrides. - * * `config.softwareConfig.airflowConfigOverrides.`section-name - * * Override the Apache Airflow config property *name* in the - * section named *section*, preserving other properties. To - * delete the property override, include it in `updateMask` and omit its - * mapping in - * `environment.config.softwareConfig.airflowConfigOverrides`. - * It is an error to provide both a mask of this form and the - * `config.softwareConfig.airflowConfigOverrides` mask. - * * `config.softwareConfig.envVariables` - * * Replace all environment variables. If a replacement environment - * variable map is not included in `environment`, all custom environment - * variables are cleared. - * * `config.softwareConfig.schedulerCount` - * * Horizontally scale the number of schedulers in Airflow. A positive - * integer not greater than the number of nodes must be provided in the - * `config.softwareConfig.schedulerCount` field. Supported for Cloud - * Composer environments in versions composer-1.*.*-airflow-2.*.*. - * * `config.databaseConfig.machineType` - * * Cloud SQL machine type used by Airflow database. - * It has to be one of: db-n1-standard-2, db-n1-standard-4, - * db-n1-standard-8 or db-n1-standard-16. Supported for Cloud Composer - * environments in versions composer-1.*.*-airflow-*.*.*. - * * `config.webServerConfig.machineType` - * * Machine type on which Airflow web server is running. - * It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4 - * or composer-n1-webserver-8. Supported for Cloud Composer environments - * in versions composer-1.*.*-airflow-*.*.*. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Required. A comma-separated list of paths, relative to `Environment`, of - * fields to update. - * For example, to set the version of scikit-learn to install in the - * environment to 0.19.0 and to remove an existing installation of - * numpy, the `updateMask` parameter would include the following two - * `paths` values: "config.softwareConfig.pypiPackages.scikit-learn" and - * "config.softwareConfig.pypiPackages.numpy". The included patch - * environment would specify the scikit-learn version as follows: - * { - * "config":{ - * "softwareConfig":{ - * "pypiPackages":{ - * "scikit-learn":"==0.19.0" - * } - * } - * } - * } - * Note that in the above example, any existing PyPI packages - * other than scikit-learn and numpy will be unaffected. - * Only one update type may be included in a single request's `updateMask`. - * For example, one cannot update both the PyPI packages and - * labels in the same request. However, it is possible to update multiple - * members of a map field simultaneously in the same request. For example, - * to set the labels "label1" and "label2" while clearing "label3" (assuming - * it already exists), one can - * provide the paths "labels.label1", "labels.label2", and "labels.label3" - * and populate the patch environment as follows: - * { - * "labels":{ - * "label1":"new-label1-value" - * "label2":"new-label2-value" - * } - * } - * Note that in the above example, any existing labels that are not - * included in the `updateMask` will be unaffected. - * It is also possible to replace an entire map field by providing the - * map field's path in the `updateMask`. The new value of the field will - * be that which is provided in the patch environment. For example, to - * delete all pre-existing user-specified PyPI packages and - * install botocore at version 1.7.14, the `updateMask` would contain - * the path "config.softwareConfig.pypiPackages", and - * the patch environment would be the following: - * { - * "config":{ - * "softwareConfig":{ - * "pypiPackages":{ - * "botocore":"==1.7.14" - * } - * } - * } - * } - * **Note:** Only the following fields can be updated: - * * `config.softwareConfig.pypiPackages` - * * Replace all custom custom PyPI packages. If a replacement - * package map is not included in `environment`, all custom - * PyPI packages are cleared. It is an error to provide both - * this mask and a mask specifying an individual package. - * * `config.softwareConfig.pypiPackages.`packagename - * * Update the custom PyPI package *packagename*, - * preserving other packages. To delete the package, include it in - * `updateMask`, and omit the mapping for it in - * `environment.config.softwareConfig.pypiPackages`. It is an error - * to provide both a mask of this form and the - * `config.softwareConfig.pypiPackages` mask. - * * `labels` - * * Replace all environment labels. If a replacement labels map is not - * included in `environment`, all labels are cleared. It is an error to - * provide both this mask and a mask specifying one or more individual - * labels. - * * `labels.`labelName - * * Set the label named *labelName*, while preserving other - * labels. To delete the label, include it in `updateMask` and omit its - * mapping in `environment.labels`. It is an error to provide both a - * mask of this form and the `labels` mask. - * * `config.nodeCount` - * * Horizontally scale the number of nodes in the environment. An integer - * greater than or equal to 3 must be provided in the `config.nodeCount` - * field. Supported for Cloud Composer environments in versions - * composer-1.*.*-airflow-*.*.*. - * * `config.webServerNetworkAccessControl` - * * Replace the environment's current `WebServerNetworkAccessControl`. - * * `config.softwareConfig.airflowConfigOverrides` - * * Replace all Apache Airflow config overrides. If a replacement config - * overrides map is not included in `environment`, all config overrides - * are cleared. - * It is an error to provide both this mask and a mask specifying one or - * more individual config overrides. - * * `config.softwareConfig.airflowConfigOverrides.`section-name - * * Override the Apache Airflow config property *name* in the - * section named *section*, preserving other properties. To - * delete the property override, include it in `updateMask` and omit its - * mapping in - * `environment.config.softwareConfig.airflowConfigOverrides`. - * It is an error to provide both a mask of this form and the - * `config.softwareConfig.airflowConfigOverrides` mask. - * * `config.softwareConfig.envVariables` - * * Replace all environment variables. If a replacement environment - * variable map is not included in `environment`, all custom environment - * variables are cleared. - * * `config.softwareConfig.schedulerCount` - * * Horizontally scale the number of schedulers in Airflow. A positive - * integer not greater than the number of nodes must be provided in the - * `config.softwareConfig.schedulerCount` field. Supported for Cloud - * Composer environments in versions composer-1.*.*-airflow-2.*.*. - * * `config.databaseConfig.machineType` - * * Cloud SQL machine type used by Airflow database. - * It has to be one of: db-n1-standard-2, db-n1-standard-4, - * db-n1-standard-8 or db-n1-standard-16. Supported for Cloud Composer - * environments in versions composer-1.*.*-airflow-*.*.*. - * * `config.webServerConfig.machineType` - * * Machine type on which Airflow web server is running. - * It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4 - * or composer-n1-webserver-8. Supported for Cloud Composer environments - * in versions composer-1.*.*-airflow-*.*.*. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/UpdateUserWorkloadsConfigMapRequest.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/UpdateUserWorkloadsConfigMapRequest.php deleted file mode 100644 index 7da8153668e4..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/UpdateUserWorkloadsConfigMapRequest.php +++ /dev/null @@ -1,90 +0,0 @@ -google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsConfigMapRequest - */ -class UpdateUserWorkloadsConfigMapRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. User workloads ConfigMap to override. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap user_workloads_config_map = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $user_workloads_config_map = null; - - /** - * @param \Google\Cloud\Orchestration\Airflow\Service\V1\UserWorkloadsConfigMap $userWorkloadsConfigMap Optional. User workloads ConfigMap to override. - * - * @return \Google\Cloud\Orchestration\Airflow\Service\V1\UpdateUserWorkloadsConfigMapRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Orchestration\Airflow\Service\V1\UserWorkloadsConfigMap $userWorkloadsConfigMap): self - { - return (new self()) - ->setUserWorkloadsConfigMap($userWorkloadsConfigMap); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Orchestration\Airflow\Service\V1\UserWorkloadsConfigMap $user_workloads_config_map - * Optional. User workloads ConfigMap to override. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); - parent::__construct($data); - } - - /** - * Optional. User workloads ConfigMap to override. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap user_workloads_config_map = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Orchestration\Airflow\Service\V1\UserWorkloadsConfigMap|null - */ - public function getUserWorkloadsConfigMap() - { - return $this->user_workloads_config_map; - } - - public function hasUserWorkloadsConfigMap() - { - return isset($this->user_workloads_config_map); - } - - public function clearUserWorkloadsConfigMap() - { - unset($this->user_workloads_config_map); - } - - /** - * Optional. User workloads ConfigMap to override. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap user_workloads_config_map = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Orchestration\Airflow\Service\V1\UserWorkloadsConfigMap $var - * @return $this - */ - public function setUserWorkloadsConfigMap($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Orchestration\Airflow\Service\V1\UserWorkloadsConfigMap::class); - $this->user_workloads_config_map = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/UpdateUserWorkloadsSecretRequest.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/UpdateUserWorkloadsSecretRequest.php deleted file mode 100644 index 66845f93f36b..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/UpdateUserWorkloadsSecretRequest.php +++ /dev/null @@ -1,90 +0,0 @@ -google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsSecretRequest - */ -class UpdateUserWorkloadsSecretRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. User workloads Secret to override. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret user_workloads_secret = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $user_workloads_secret = null; - - /** - * @param \Google\Cloud\Orchestration\Airflow\Service\V1\UserWorkloadsSecret $userWorkloadsSecret Optional. User workloads Secret to override. - * - * @return \Google\Cloud\Orchestration\Airflow\Service\V1\UpdateUserWorkloadsSecretRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Orchestration\Airflow\Service\V1\UserWorkloadsSecret $userWorkloadsSecret): self - { - return (new self()) - ->setUserWorkloadsSecret($userWorkloadsSecret); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Orchestration\Airflow\Service\V1\UserWorkloadsSecret $user_workloads_secret - * Optional. User workloads Secret to override. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); - parent::__construct($data); - } - - /** - * Optional. User workloads Secret to override. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret user_workloads_secret = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Orchestration\Airflow\Service\V1\UserWorkloadsSecret|null - */ - public function getUserWorkloadsSecret() - { - return $this->user_workloads_secret; - } - - public function hasUserWorkloadsSecret() - { - return isset($this->user_workloads_secret); - } - - public function clearUserWorkloadsSecret() - { - unset($this->user_workloads_secret); - } - - /** - * Optional. User workloads Secret to override. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret user_workloads_secret = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Orchestration\Airflow\Service\V1\UserWorkloadsSecret $var - * @return $this - */ - public function setUserWorkloadsSecret($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Orchestration\Airflow\Service\V1\UserWorkloadsSecret::class); - $this->user_workloads_secret = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/UserWorkloadsConfigMap.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/UserWorkloadsConfigMap.php deleted file mode 100644 index 942b7506ece2..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/UserWorkloadsConfigMap.php +++ /dev/null @@ -1,134 +0,0 @@ -google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap - */ -class UserWorkloadsConfigMap extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. The resource name of the ConfigMap, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsConfigMaps/{userWorkloadsConfigMapId}" - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Optional. The "data" field of Kubernetes ConfigMap, organized in key-value - * pairs. For details see: - * https://kubernetes.io/docs/concepts/configuration/configmap/ - * Example: - * { - * "example_key": "example_value", - * "another_key": "another_value" - * } - * - * Generated from protobuf field map data = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $data; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. The resource name of the ConfigMap, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsConfigMaps/{userWorkloadsConfigMapId}" - * @type array|\Google\Protobuf\Internal\MapField $data - * Optional. The "data" field of Kubernetes ConfigMap, organized in key-value - * pairs. For details see: - * https://kubernetes.io/docs/concepts/configuration/configmap/ - * Example: - * { - * "example_key": "example_value", - * "another_key": "another_value" - * } - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. The resource name of the ConfigMap, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsConfigMaps/{userWorkloadsConfigMapId}" - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. The resource name of the ConfigMap, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsConfigMaps/{userWorkloadsConfigMapId}" - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. The "data" field of Kubernetes ConfigMap, organized in key-value - * pairs. For details see: - * https://kubernetes.io/docs/concepts/configuration/configmap/ - * Example: - * { - * "example_key": "example_value", - * "another_key": "another_value" - * } - * - * Generated from protobuf field map data = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getData() - { - return $this->data; - } - - /** - * Optional. The "data" field of Kubernetes ConfigMap, organized in key-value - * pairs. For details see: - * https://kubernetes.io/docs/concepts/configuration/configmap/ - * Example: - * { - * "example_key": "example_value", - * "another_key": "another_value" - * } - * - * Generated from protobuf field map data = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setData($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->data = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/UserWorkloadsSecret.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/UserWorkloadsSecret.php deleted file mode 100644 index ff9358356170..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/UserWorkloadsSecret.php +++ /dev/null @@ -1,138 +0,0 @@ -google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret - */ -class UserWorkloadsSecret extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. The resource name of the Secret, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsSecrets/{userWorkloadsSecretId}" - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Optional. The "data" field of Kubernetes Secret, organized in key-value - * pairs, which can contain sensitive values such as a password, a token, or a - * key. The values for all keys have to be base64-encoded strings. For details - * see: https://kubernetes.io/docs/concepts/configuration/secret/ - * Example: - * { - * "example": "ZXhhbXBsZV92YWx1ZQ==", - * "another-example": "YW5vdGhlcl9leGFtcGxlX3ZhbHVl" - * } - * - * Generated from protobuf field map data = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $data; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. The resource name of the Secret, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsSecrets/{userWorkloadsSecretId}" - * @type array|\Google\Protobuf\Internal\MapField $data - * Optional. The "data" field of Kubernetes Secret, organized in key-value - * pairs, which can contain sensitive values such as a password, a token, or a - * key. The values for all keys have to be base64-encoded strings. For details - * see: https://kubernetes.io/docs/concepts/configuration/secret/ - * Example: - * { - * "example": "ZXhhbXBsZV92YWx1ZQ==", - * "another-example": "YW5vdGhlcl9leGFtcGxlX3ZhbHVl" - * } - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. The resource name of the Secret, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsSecrets/{userWorkloadsSecretId}" - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. The resource name of the Secret, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsSecrets/{userWorkloadsSecretId}" - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. The "data" field of Kubernetes Secret, organized in key-value - * pairs, which can contain sensitive values such as a password, a token, or a - * key. The values for all keys have to be base64-encoded strings. For details - * see: https://kubernetes.io/docs/concepts/configuration/secret/ - * Example: - * { - * "example": "ZXhhbXBsZV92YWx1ZQ==", - * "another-example": "YW5vdGhlcl9leGFtcGxlX3ZhbHVl" - * } - * - * Generated from protobuf field map data = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getData() - { - return $this->data; - } - - /** - * Optional. The "data" field of Kubernetes Secret, organized in key-value - * pairs, which can contain sensitive values such as a password, a token, or a - * key. The values for all keys have to be base64-encoded strings. For details - * see: https://kubernetes.io/docs/concepts/configuration/secret/ - * Example: - * { - * "example": "ZXhhbXBsZV92YWx1ZQ==", - * "another-example": "YW5vdGhlcl9leGFtcGxlX3ZhbHVl" - * } - * - * Generated from protobuf field map data = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setData($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->data = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/WebServerConfig.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/WebServerConfig.php deleted file mode 100644 index 8b4cdd4debb2..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/WebServerConfig.php +++ /dev/null @@ -1,89 +0,0 @@ -google.cloud.orchestration.airflow.service.v1.WebServerConfig - */ -class WebServerConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Machine type on which Airflow web server is running. - * It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4 or - * composer-n1-webserver-8. - * If not specified, composer-n1-webserver-2 will be used. - * Value custom is returned only in response, if Airflow web server parameters - * were manually changed to a non-standard values. - * - * Generated from protobuf field string machine_type = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $machine_type = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $machine_type - * Optional. Machine type on which Airflow web server is running. - * It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4 or - * composer-n1-webserver-8. - * If not specified, composer-n1-webserver-2 will be used. - * Value custom is returned only in response, if Airflow web server parameters - * were manually changed to a non-standard values. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Machine type on which Airflow web server is running. - * It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4 or - * composer-n1-webserver-8. - * If not specified, composer-n1-webserver-2 will be used. - * Value custom is returned only in response, if Airflow web server parameters - * were manually changed to a non-standard values. - * - * Generated from protobuf field string machine_type = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getMachineType() - { - return $this->machine_type; - } - - /** - * Optional. Machine type on which Airflow web server is running. - * It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4 or - * composer-n1-webserver-8. - * If not specified, composer-n1-webserver-2 will be used. - * Value custom is returned only in response, if Airflow web server parameters - * were manually changed to a non-standard values. - * - * Generated from protobuf field string machine_type = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setMachineType($var) - { - GPBUtil::checkString($var, True); - $this->machine_type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/WebServerNetworkAccessControl.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/WebServerNetworkAccessControl.php deleted file mode 100644 index 04c469c125e2..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/WebServerNetworkAccessControl.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl - */ -class WebServerNetworkAccessControl extends \Google\Protobuf\Internal\Message -{ - /** - * A collection of allowed IP ranges with descriptions. - * - * Generated from protobuf field repeated .google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange allowed_ip_ranges = 1; - */ - private $allowed_ip_ranges; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Orchestration\Airflow\Service\V1\WebServerNetworkAccessControl\AllowedIpRange>|\Google\Protobuf\Internal\RepeatedField $allowed_ip_ranges - * A collection of allowed IP ranges with descriptions. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); - parent::__construct($data); - } - - /** - * A collection of allowed IP ranges with descriptions. - * - * Generated from protobuf field repeated .google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange allowed_ip_ranges = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAllowedIpRanges() - { - return $this->allowed_ip_ranges; - } - - /** - * A collection of allowed IP ranges with descriptions. - * - * Generated from protobuf field repeated .google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange allowed_ip_ranges = 1; - * @param array<\Google\Cloud\Orchestration\Airflow\Service\V1\WebServerNetworkAccessControl\AllowedIpRange>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAllowedIpRanges($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Orchestration\Airflow\Service\V1\WebServerNetworkAccessControl\AllowedIpRange::class); - $this->allowed_ip_ranges = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/WebServerNetworkAccessControl/AllowedIpRange.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/WebServerNetworkAccessControl/AllowedIpRange.php deleted file mode 100644 index 196292682450..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/WebServerNetworkAccessControl/AllowedIpRange.php +++ /dev/null @@ -1,132 +0,0 @@ -google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange - */ -class AllowedIpRange extends \Google\Protobuf\Internal\Message -{ - /** - * IP address or range, defined using CIDR notation, of requests that this - * rule applies to. - * Examples: `192.168.1.1` or `192.168.0.0/16` or `2001:db8::/32` - * or `2001:0db8:0000:0042:0000:8a2e:0370:7334`. - * IP range prefixes should be properly truncated. For example, - * `1.2.3.4/24` should be truncated to `1.2.3.0/24`. Similarly, for IPv6, - * `2001:db8::1/32` should be truncated to `2001:db8::/32`. - * - * Generated from protobuf field string value = 1; - */ - protected $value = ''; - /** - * Optional. User-provided description. It must contain at most 300 - * characters. - * - * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $value - * IP address or range, defined using CIDR notation, of requests that this - * rule applies to. - * Examples: `192.168.1.1` or `192.168.0.0/16` or `2001:db8::/32` - * or `2001:0db8:0000:0042:0000:8a2e:0370:7334`. - * IP range prefixes should be properly truncated. For example, - * `1.2.3.4/24` should be truncated to `1.2.3.0/24`. Similarly, for IPv6, - * `2001:db8::1/32` should be truncated to `2001:db8::/32`. - * @type string $description - * Optional. User-provided description. It must contain at most 300 - * characters. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); - parent::__construct($data); - } - - /** - * IP address or range, defined using CIDR notation, of requests that this - * rule applies to. - * Examples: `192.168.1.1` or `192.168.0.0/16` or `2001:db8::/32` - * or `2001:0db8:0000:0042:0000:8a2e:0370:7334`. - * IP range prefixes should be properly truncated. For example, - * `1.2.3.4/24` should be truncated to `1.2.3.0/24`. Similarly, for IPv6, - * `2001:db8::1/32` should be truncated to `2001:db8::/32`. - * - * Generated from protobuf field string value = 1; - * @return string - */ - public function getValue() - { - return $this->value; - } - - /** - * IP address or range, defined using CIDR notation, of requests that this - * rule applies to. - * Examples: `192.168.1.1` or `192.168.0.0/16` or `2001:db8::/32` - * or `2001:0db8:0000:0042:0000:8a2e:0370:7334`. - * IP range prefixes should be properly truncated. For example, - * `1.2.3.4/24` should be truncated to `1.2.3.0/24`. Similarly, for IPv6, - * `2001:db8::1/32` should be truncated to `2001:db8::/32`. - * - * Generated from protobuf field string value = 1; - * @param string $var - * @return $this - */ - public function setValue($var) - { - GPBUtil::checkString($var, True); - $this->value = $var; - - return $this; - } - - /** - * Optional. User-provided description. It must contain at most 300 - * characters. - * - * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. User-provided description. It must contain at most 300 - * characters. - * - * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(AllowedIpRange::class, \Google\Cloud\Orchestration\Airflow\Service\V1\WebServerNetworkAccessControl_AllowedIpRange::class); - diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/WorkloadsConfig.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/WorkloadsConfig.php deleted file mode 100644 index e12719b0b73b..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/WorkloadsConfig.php +++ /dev/null @@ -1,263 +0,0 @@ -google.cloud.orchestration.airflow.service.v1.WorkloadsConfig - */ -class WorkloadsConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Resources used by Airflow schedulers. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.SchedulerResource scheduler = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $scheduler = null; - /** - * Optional. Resources used by Airflow web server. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WebServerResource web_server = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $web_server = null; - /** - * Optional. Resources used by Airflow workers. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WorkerResource worker = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $worker = null; - /** - * Optional. Resources used by Airflow triggerers. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.TriggererResource triggerer = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $triggerer = null; - /** - * Optional. Resources used by Airflow DAG processors. - * This field is supported for Cloud Composer environments in versions - * composer-3.*.*-airflow-*.*.* and newer. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.DagProcessorResource dag_processor = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $dag_processor = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Orchestration\Airflow\Service\V1\WorkloadsConfig\SchedulerResource $scheduler - * Optional. Resources used by Airflow schedulers. - * @type \Google\Cloud\Orchestration\Airflow\Service\V1\WorkloadsConfig\WebServerResource $web_server - * Optional. Resources used by Airflow web server. - * @type \Google\Cloud\Orchestration\Airflow\Service\V1\WorkloadsConfig\WorkerResource $worker - * Optional. Resources used by Airflow workers. - * @type \Google\Cloud\Orchestration\Airflow\Service\V1\WorkloadsConfig\TriggererResource $triggerer - * Optional. Resources used by Airflow triggerers. - * @type \Google\Cloud\Orchestration\Airflow\Service\V1\WorkloadsConfig\DagProcessorResource $dag_processor - * Optional. Resources used by Airflow DAG processors. - * This field is supported for Cloud Composer environments in versions - * composer-3.*.*-airflow-*.*.* and newer. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Resources used by Airflow schedulers. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.SchedulerResource scheduler = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Orchestration\Airflow\Service\V1\WorkloadsConfig\SchedulerResource|null - */ - public function getScheduler() - { - return $this->scheduler; - } - - public function hasScheduler() - { - return isset($this->scheduler); - } - - public function clearScheduler() - { - unset($this->scheduler); - } - - /** - * Optional. Resources used by Airflow schedulers. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.SchedulerResource scheduler = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Orchestration\Airflow\Service\V1\WorkloadsConfig\SchedulerResource $var - * @return $this - */ - public function setScheduler($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Orchestration\Airflow\Service\V1\WorkloadsConfig\SchedulerResource::class); - $this->scheduler = $var; - - return $this; - } - - /** - * Optional. Resources used by Airflow web server. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WebServerResource web_server = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Orchestration\Airflow\Service\V1\WorkloadsConfig\WebServerResource|null - */ - public function getWebServer() - { - return $this->web_server; - } - - public function hasWebServer() - { - return isset($this->web_server); - } - - public function clearWebServer() - { - unset($this->web_server); - } - - /** - * Optional. Resources used by Airflow web server. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WebServerResource web_server = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Orchestration\Airflow\Service\V1\WorkloadsConfig\WebServerResource $var - * @return $this - */ - public function setWebServer($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Orchestration\Airflow\Service\V1\WorkloadsConfig\WebServerResource::class); - $this->web_server = $var; - - return $this; - } - - /** - * Optional. Resources used by Airflow workers. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WorkerResource worker = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Orchestration\Airflow\Service\V1\WorkloadsConfig\WorkerResource|null - */ - public function getWorker() - { - return $this->worker; - } - - public function hasWorker() - { - return isset($this->worker); - } - - public function clearWorker() - { - unset($this->worker); - } - - /** - * Optional. Resources used by Airflow workers. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WorkerResource worker = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Orchestration\Airflow\Service\V1\WorkloadsConfig\WorkerResource $var - * @return $this - */ - public function setWorker($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Orchestration\Airflow\Service\V1\WorkloadsConfig\WorkerResource::class); - $this->worker = $var; - - return $this; - } - - /** - * Optional. Resources used by Airflow triggerers. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.TriggererResource triggerer = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Orchestration\Airflow\Service\V1\WorkloadsConfig\TriggererResource|null - */ - public function getTriggerer() - { - return $this->triggerer; - } - - public function hasTriggerer() - { - return isset($this->triggerer); - } - - public function clearTriggerer() - { - unset($this->triggerer); - } - - /** - * Optional. Resources used by Airflow triggerers. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.TriggererResource triggerer = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Orchestration\Airflow\Service\V1\WorkloadsConfig\TriggererResource $var - * @return $this - */ - public function setTriggerer($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Orchestration\Airflow\Service\V1\WorkloadsConfig\TriggererResource::class); - $this->triggerer = $var; - - return $this; - } - - /** - * Optional. Resources used by Airflow DAG processors. - * This field is supported for Cloud Composer environments in versions - * composer-3.*.*-airflow-*.*.* and newer. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.DagProcessorResource dag_processor = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Orchestration\Airflow\Service\V1\WorkloadsConfig\DagProcessorResource|null - */ - public function getDagProcessor() - { - return $this->dag_processor; - } - - public function hasDagProcessor() - { - return isset($this->dag_processor); - } - - public function clearDagProcessor() - { - unset($this->dag_processor); - } - - /** - * Optional. Resources used by Airflow DAG processors. - * This field is supported for Cloud Composer environments in versions - * composer-3.*.*-airflow-*.*.* and newer. - * - * Generated from protobuf field .google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.DagProcessorResource dag_processor = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Orchestration\Airflow\Service\V1\WorkloadsConfig\DagProcessorResource $var - * @return $this - */ - public function setDagProcessor($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Orchestration\Airflow\Service\V1\WorkloadsConfig\DagProcessorResource::class); - $this->dag_processor = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/WorkloadsConfig/DagProcessorResource.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/WorkloadsConfig/DagProcessorResource.php deleted file mode 100644 index 3600af65614f..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/WorkloadsConfig/DagProcessorResource.php +++ /dev/null @@ -1,190 +0,0 @@ -google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.DagProcessorResource - */ -class DagProcessorResource extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. CPU request and limit for a single Airflow DAG processor - * replica. - * - * Generated from protobuf field float cpu = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $cpu = 0.0; - /** - * Optional. Memory (GB) request and limit for a single Airflow DAG - * processor replica. - * - * Generated from protobuf field float memory_gb = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $memory_gb = 0.0; - /** - * Optional. Storage (GB) request and limit for a single Airflow DAG - * processor replica. - * - * Generated from protobuf field float storage_gb = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $storage_gb = 0.0; - /** - * Optional. The number of DAG processors. If not provided or set to 0, a - * single DAG processor instance will be created. - * - * Generated from protobuf field int32 count = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $cpu - * Optional. CPU request and limit for a single Airflow DAG processor - * replica. - * @type float $memory_gb - * Optional. Memory (GB) request and limit for a single Airflow DAG - * processor replica. - * @type float $storage_gb - * Optional. Storage (GB) request and limit for a single Airflow DAG - * processor replica. - * @type int $count - * Optional. The number of DAG processors. If not provided or set to 0, a - * single DAG processor instance will be created. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); - parent::__construct($data); - } - - /** - * Optional. CPU request and limit for a single Airflow DAG processor - * replica. - * - * Generated from protobuf field float cpu = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return float - */ - public function getCpu() - { - return $this->cpu; - } - - /** - * Optional. CPU request and limit for a single Airflow DAG processor - * replica. - * - * Generated from protobuf field float cpu = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param float $var - * @return $this - */ - public function setCpu($var) - { - GPBUtil::checkFloat($var); - $this->cpu = $var; - - return $this; - } - - /** - * Optional. Memory (GB) request and limit for a single Airflow DAG - * processor replica. - * - * Generated from protobuf field float memory_gb = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return float - */ - public function getMemoryGb() - { - return $this->memory_gb; - } - - /** - * Optional. Memory (GB) request and limit for a single Airflow DAG - * processor replica. - * - * Generated from protobuf field float memory_gb = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param float $var - * @return $this - */ - public function setMemoryGb($var) - { - GPBUtil::checkFloat($var); - $this->memory_gb = $var; - - return $this; - } - - /** - * Optional. Storage (GB) request and limit for a single Airflow DAG - * processor replica. - * - * Generated from protobuf field float storage_gb = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return float - */ - public function getStorageGb() - { - return $this->storage_gb; - } - - /** - * Optional. Storage (GB) request and limit for a single Airflow DAG - * processor replica. - * - * Generated from protobuf field float storage_gb = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param float $var - * @return $this - */ - public function setStorageGb($var) - { - GPBUtil::checkFloat($var); - $this->storage_gb = $var; - - return $this; - } - - /** - * Optional. The number of DAG processors. If not provided or set to 0, a - * single DAG processor instance will be created. - * - * Generated from protobuf field int32 count = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getCount() - { - return $this->count; - } - - /** - * Optional. The number of DAG processors. If not provided or set to 0, a - * single DAG processor instance will be created. - * - * Generated from protobuf field int32 count = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setCount($var) - { - GPBUtil::checkInt32($var); - $this->count = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DagProcessorResource::class, \Google\Cloud\Orchestration\Airflow\Service\V1\WorkloadsConfig_DagProcessorResource::class); - diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/WorkloadsConfig/SchedulerResource.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/WorkloadsConfig/SchedulerResource.php deleted file mode 100644 index c0e536aac762..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/WorkloadsConfig/SchedulerResource.php +++ /dev/null @@ -1,180 +0,0 @@ -google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.SchedulerResource - */ -class SchedulerResource extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. CPU request and limit for a single Airflow scheduler replica. - * - * Generated from protobuf field float cpu = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $cpu = 0.0; - /** - * Optional. Memory (GB) request and limit for a single Airflow scheduler - * replica. - * - * Generated from protobuf field float memory_gb = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $memory_gb = 0.0; - /** - * Optional. Storage (GB) request and limit for a single Airflow scheduler - * replica. - * - * Generated from protobuf field float storage_gb = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $storage_gb = 0.0; - /** - * Optional. The number of schedulers. - * - * Generated from protobuf field int32 count = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $cpu - * Optional. CPU request and limit for a single Airflow scheduler replica. - * @type float $memory_gb - * Optional. Memory (GB) request and limit for a single Airflow scheduler - * replica. - * @type float $storage_gb - * Optional. Storage (GB) request and limit for a single Airflow scheduler - * replica. - * @type int $count - * Optional. The number of schedulers. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); - parent::__construct($data); - } - - /** - * Optional. CPU request and limit for a single Airflow scheduler replica. - * - * Generated from protobuf field float cpu = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return float - */ - public function getCpu() - { - return $this->cpu; - } - - /** - * Optional. CPU request and limit for a single Airflow scheduler replica. - * - * Generated from protobuf field float cpu = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param float $var - * @return $this - */ - public function setCpu($var) - { - GPBUtil::checkFloat($var); - $this->cpu = $var; - - return $this; - } - - /** - * Optional. Memory (GB) request and limit for a single Airflow scheduler - * replica. - * - * Generated from protobuf field float memory_gb = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return float - */ - public function getMemoryGb() - { - return $this->memory_gb; - } - - /** - * Optional. Memory (GB) request and limit for a single Airflow scheduler - * replica. - * - * Generated from protobuf field float memory_gb = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param float $var - * @return $this - */ - public function setMemoryGb($var) - { - GPBUtil::checkFloat($var); - $this->memory_gb = $var; - - return $this; - } - - /** - * Optional. Storage (GB) request and limit for a single Airflow scheduler - * replica. - * - * Generated from protobuf field float storage_gb = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return float - */ - public function getStorageGb() - { - return $this->storage_gb; - } - - /** - * Optional. Storage (GB) request and limit for a single Airflow scheduler - * replica. - * - * Generated from protobuf field float storage_gb = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param float $var - * @return $this - */ - public function setStorageGb($var) - { - GPBUtil::checkFloat($var); - $this->storage_gb = $var; - - return $this; - } - - /** - * Optional. The number of schedulers. - * - * Generated from protobuf field int32 count = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getCount() - { - return $this->count; - } - - /** - * Optional. The number of schedulers. - * - * Generated from protobuf field int32 count = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setCount($var) - { - GPBUtil::checkInt32($var); - $this->count = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SchedulerResource::class, \Google\Cloud\Orchestration\Airflow\Service\V1\WorkloadsConfig_SchedulerResource::class); - diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/WorkloadsConfig/TriggererResource.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/WorkloadsConfig/TriggererResource.php deleted file mode 100644 index 785a114fe90e..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/WorkloadsConfig/TriggererResource.php +++ /dev/null @@ -1,142 +0,0 @@ -google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.TriggererResource - */ -class TriggererResource extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The number of triggerers. - * - * Generated from protobuf field int32 count = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $count = 0; - /** - * Optional. CPU request and limit for a single Airflow triggerer replica. - * - * Generated from protobuf field float cpu = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $cpu = 0.0; - /** - * Optional. Memory (GB) request and limit for a single Airflow triggerer - * replica. - * - * Generated from protobuf field float memory_gb = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $memory_gb = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $count - * Optional. The number of triggerers. - * @type float $cpu - * Optional. CPU request and limit for a single Airflow triggerer replica. - * @type float $memory_gb - * Optional. Memory (GB) request and limit for a single Airflow triggerer - * replica. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The number of triggerers. - * - * Generated from protobuf field int32 count = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getCount() - { - return $this->count; - } - - /** - * Optional. The number of triggerers. - * - * Generated from protobuf field int32 count = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setCount($var) - { - GPBUtil::checkInt32($var); - $this->count = $var; - - return $this; - } - - /** - * Optional. CPU request and limit for a single Airflow triggerer replica. - * - * Generated from protobuf field float cpu = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return float - */ - public function getCpu() - { - return $this->cpu; - } - - /** - * Optional. CPU request and limit for a single Airflow triggerer replica. - * - * Generated from protobuf field float cpu = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param float $var - * @return $this - */ - public function setCpu($var) - { - GPBUtil::checkFloat($var); - $this->cpu = $var; - - return $this; - } - - /** - * Optional. Memory (GB) request and limit for a single Airflow triggerer - * replica. - * - * Generated from protobuf field float memory_gb = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return float - */ - public function getMemoryGb() - { - return $this->memory_gb; - } - - /** - * Optional. Memory (GB) request and limit for a single Airflow triggerer - * replica. - * - * Generated from protobuf field float memory_gb = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param float $var - * @return $this - */ - public function setMemoryGb($var) - { - GPBUtil::checkFloat($var); - $this->memory_gb = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(TriggererResource::class, \Google\Cloud\Orchestration\Airflow\Service\V1\WorkloadsConfig_TriggererResource::class); - diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/WorkloadsConfig/WebServerResource.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/WorkloadsConfig/WebServerResource.php deleted file mode 100644 index 13b80734e6ba..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/WorkloadsConfig/WebServerResource.php +++ /dev/null @@ -1,138 +0,0 @@ -google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WebServerResource - */ -class WebServerResource extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. CPU request and limit for Airflow web server. - * - * Generated from protobuf field float cpu = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $cpu = 0.0; - /** - * Optional. Memory (GB) request and limit for Airflow web server. - * - * Generated from protobuf field float memory_gb = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $memory_gb = 0.0; - /** - * Optional. Storage (GB) request and limit for Airflow web server. - * - * Generated from protobuf field float storage_gb = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $storage_gb = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $cpu - * Optional. CPU request and limit for Airflow web server. - * @type float $memory_gb - * Optional. Memory (GB) request and limit for Airflow web server. - * @type float $storage_gb - * Optional. Storage (GB) request and limit for Airflow web server. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); - parent::__construct($data); - } - - /** - * Optional. CPU request and limit for Airflow web server. - * - * Generated from protobuf field float cpu = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return float - */ - public function getCpu() - { - return $this->cpu; - } - - /** - * Optional. CPU request and limit for Airflow web server. - * - * Generated from protobuf field float cpu = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param float $var - * @return $this - */ - public function setCpu($var) - { - GPBUtil::checkFloat($var); - $this->cpu = $var; - - return $this; - } - - /** - * Optional. Memory (GB) request and limit for Airflow web server. - * - * Generated from protobuf field float memory_gb = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return float - */ - public function getMemoryGb() - { - return $this->memory_gb; - } - - /** - * Optional. Memory (GB) request and limit for Airflow web server. - * - * Generated from protobuf field float memory_gb = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param float $var - * @return $this - */ - public function setMemoryGb($var) - { - GPBUtil::checkFloat($var); - $this->memory_gb = $var; - - return $this; - } - - /** - * Optional. Storage (GB) request and limit for Airflow web server. - * - * Generated from protobuf field float storage_gb = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return float - */ - public function getStorageGb() - { - return $this->storage_gb; - } - - /** - * Optional. Storage (GB) request and limit for Airflow web server. - * - * Generated from protobuf field float storage_gb = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param float $var - * @return $this - */ - public function setStorageGb($var) - { - GPBUtil::checkFloat($var); - $this->storage_gb = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(WebServerResource::class, \Google\Cloud\Orchestration\Airflow\Service\V1\WorkloadsConfig_WebServerResource::class); - diff --git a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/WorkloadsConfig/WorkerResource.php b/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/WorkloadsConfig/WorkerResource.php deleted file mode 100644 index 0f3882cc780a..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/proto/src/Google/Cloud/Orchestration/Airflow/Service/V1/WorkloadsConfig/WorkerResource.php +++ /dev/null @@ -1,214 +0,0 @@ -google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WorkerResource - */ -class WorkerResource extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. CPU request and limit for a single Airflow worker replica. - * - * Generated from protobuf field float cpu = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $cpu = 0.0; - /** - * Optional. Memory (GB) request and limit for a single Airflow worker - * replica. - * - * Generated from protobuf field float memory_gb = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $memory_gb = 0.0; - /** - * Optional. Storage (GB) request and limit for a single Airflow worker - * replica. - * - * Generated from protobuf field float storage_gb = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $storage_gb = 0.0; - /** - * Optional. Minimum number of workers for autoscaling. - * - * Generated from protobuf field int32 min_count = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $min_count = 0; - /** - * Optional. Maximum number of workers for autoscaling. - * - * Generated from protobuf field int32 max_count = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $max_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $cpu - * Optional. CPU request and limit for a single Airflow worker replica. - * @type float $memory_gb - * Optional. Memory (GB) request and limit for a single Airflow worker - * replica. - * @type float $storage_gb - * Optional. Storage (GB) request and limit for a single Airflow worker - * replica. - * @type int $min_count - * Optional. Minimum number of workers for autoscaling. - * @type int $max_count - * Optional. Maximum number of workers for autoscaling. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orchestration\Airflow\Service\V1\Environments::initOnce(); - parent::__construct($data); - } - - /** - * Optional. CPU request and limit for a single Airflow worker replica. - * - * Generated from protobuf field float cpu = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return float - */ - public function getCpu() - { - return $this->cpu; - } - - /** - * Optional. CPU request and limit for a single Airflow worker replica. - * - * Generated from protobuf field float cpu = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param float $var - * @return $this - */ - public function setCpu($var) - { - GPBUtil::checkFloat($var); - $this->cpu = $var; - - return $this; - } - - /** - * Optional. Memory (GB) request and limit for a single Airflow worker - * replica. - * - * Generated from protobuf field float memory_gb = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return float - */ - public function getMemoryGb() - { - return $this->memory_gb; - } - - /** - * Optional. Memory (GB) request and limit for a single Airflow worker - * replica. - * - * Generated from protobuf field float memory_gb = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param float $var - * @return $this - */ - public function setMemoryGb($var) - { - GPBUtil::checkFloat($var); - $this->memory_gb = $var; - - return $this; - } - - /** - * Optional. Storage (GB) request and limit for a single Airflow worker - * replica. - * - * Generated from protobuf field float storage_gb = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return float - */ - public function getStorageGb() - { - return $this->storage_gb; - } - - /** - * Optional. Storage (GB) request and limit for a single Airflow worker - * replica. - * - * Generated from protobuf field float storage_gb = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param float $var - * @return $this - */ - public function setStorageGb($var) - { - GPBUtil::checkFloat($var); - $this->storage_gb = $var; - - return $this; - } - - /** - * Optional. Minimum number of workers for autoscaling. - * - * Generated from protobuf field int32 min_count = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getMinCount() - { - return $this->min_count; - } - - /** - * Optional. Minimum number of workers for autoscaling. - * - * Generated from protobuf field int32 min_count = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setMinCount($var) - { - GPBUtil::checkInt32($var); - $this->min_count = $var; - - return $this; - } - - /** - * Optional. Maximum number of workers for autoscaling. - * - * Generated from protobuf field int32 max_count = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getMaxCount() - { - return $this->max_count; - } - - /** - * Optional. Maximum number of workers for autoscaling. - * - * Generated from protobuf field int32 max_count = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setMaxCount($var) - { - GPBUtil::checkInt32($var); - $this->max_count = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(WorkerResource::class, \Google\Cloud\Orchestration\Airflow\Service\V1\WorkloadsConfig_WorkerResource::class); - diff --git a/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/check_upgrade.php b/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/check_upgrade.php deleted file mode 100644 index 90a3c9bfb574..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/check_upgrade.php +++ /dev/null @@ -1,86 +0,0 @@ -setEnvironment($environment); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $environmentsClient->checkUpgrade($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var CheckUpgradeResponse $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $environment = '[ENVIRONMENT]'; - - check_upgrade_sample($environment); -} -// [END composer_v1_generated_Environments_CheckUpgrade_sync] diff --git a/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/create_environment.php b/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/create_environment.php deleted file mode 100644 index ee30baa2854b..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/create_environment.php +++ /dev/null @@ -1,69 +0,0 @@ -createEnvironment($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Environment $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END composer_v1_generated_Environments_CreateEnvironment_sync] diff --git a/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/create_user_workloads_config_map.php b/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/create_user_workloads_config_map.php deleted file mode 100644 index d206b5e40636..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/create_user_workloads_config_map.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent) - ->setUserWorkloadsConfigMap($userWorkloadsConfigMap); - - // Call the API and handle any network failures. - try { - /** @var UserWorkloadsConfigMap $response */ - $response = $environmentsClient->createUserWorkloadsConfigMap($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = EnvironmentsClient::environmentName('[PROJECT]', '[LOCATION]', '[ENVIRONMENT]'); - - create_user_workloads_config_map_sample($formattedParent); -} -// [END composer_v1_generated_Environments_CreateUserWorkloadsConfigMap_sync] diff --git a/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/create_user_workloads_secret.php b/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/create_user_workloads_secret.php deleted file mode 100644 index b4195478a2ae..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/create_user_workloads_secret.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent) - ->setUserWorkloadsSecret($userWorkloadsSecret); - - // Call the API and handle any network failures. - try { - /** @var UserWorkloadsSecret $response */ - $response = $environmentsClient->createUserWorkloadsSecret($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = EnvironmentsClient::environmentName('[PROJECT]', '[LOCATION]', '[ENVIRONMENT]'); - - create_user_workloads_secret_sample($formattedParent); -} -// [END composer_v1_generated_Environments_CreateUserWorkloadsSecret_sync] diff --git a/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/database_failover.php b/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/database_failover.php deleted file mode 100644 index f8403349490f..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/database_failover.php +++ /dev/null @@ -1,69 +0,0 @@ -databaseFailover($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var DatabaseFailoverResponse $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END composer_v1_generated_Environments_DatabaseFailover_sync] diff --git a/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/delete_environment.php b/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/delete_environment.php deleted file mode 100644 index 9b9d127a89ed..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/delete_environment.php +++ /dev/null @@ -1,66 +0,0 @@ -deleteEnvironment($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END composer_v1_generated_Environments_DeleteEnvironment_sync] diff --git a/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/delete_user_workloads_config_map.php b/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/delete_user_workloads_config_map.php deleted file mode 100644 index 88060b4c37ba..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/delete_user_workloads_config_map.php +++ /dev/null @@ -1,78 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $environmentsClient->deleteUserWorkloadsConfigMap($request); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = EnvironmentsClient::userWorkloadsConfigMapName( - '[PROJECT]', - '[LOCATION]', - '[ENVIRONMENT]', - '[USER_WORKLOADS_CONFIG_MAP]' - ); - - delete_user_workloads_config_map_sample($formattedName); -} -// [END composer_v1_generated_Environments_DeleteUserWorkloadsConfigMap_sync] diff --git a/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/delete_user_workloads_secret.php b/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/delete_user_workloads_secret.php deleted file mode 100644 index dec8d0259b76..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/delete_user_workloads_secret.php +++ /dev/null @@ -1,78 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $environmentsClient->deleteUserWorkloadsSecret($request); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = EnvironmentsClient::userWorkloadsSecretName( - '[PROJECT]', - '[LOCATION]', - '[ENVIRONMENT]', - '[USER_WORKLOADS_SECRET]' - ); - - delete_user_workloads_secret_sample($formattedName); -} -// [END composer_v1_generated_Environments_DeleteUserWorkloadsSecret_sync] diff --git a/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/execute_airflow_command.php b/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/execute_airflow_command.php deleted file mode 100644 index 80aeedc42126..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/execute_airflow_command.php +++ /dev/null @@ -1,57 +0,0 @@ -executeAirflowCommand($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END composer_v1_generated_Environments_ExecuteAirflowCommand_sync] diff --git a/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/fetch_database_properties.php b/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/fetch_database_properties.php deleted file mode 100644 index 4c4f0aede5e3..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/fetch_database_properties.php +++ /dev/null @@ -1,76 +0,0 @@ -setEnvironment($formattedEnvironment); - - // Call the API and handle any network failures. - try { - /** @var FetchDatabasePropertiesResponse $response */ - $response = $environmentsClient->fetchDatabaseProperties($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedEnvironment = EnvironmentsClient::environmentName( - '[PROJECT]', - '[LOCATION]', - '[ENVIRONMENT]' - ); - - fetch_database_properties_sample($formattedEnvironment); -} -// [END composer_v1_generated_Environments_FetchDatabaseProperties_sync] diff --git a/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/get_environment.php b/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/get_environment.php deleted file mode 100644 index 9dc51c95458f..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/get_environment.php +++ /dev/null @@ -1,57 +0,0 @@ -getEnvironment($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END composer_v1_generated_Environments_GetEnvironment_sync] diff --git a/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/get_user_workloads_config_map.php b/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/get_user_workloads_config_map.php deleted file mode 100644 index 84af11fc5311..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/get_user_workloads_config_map.php +++ /dev/null @@ -1,80 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var UserWorkloadsConfigMap $response */ - $response = $environmentsClient->getUserWorkloadsConfigMap($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = EnvironmentsClient::userWorkloadsConfigMapName( - '[PROJECT]', - '[LOCATION]', - '[ENVIRONMENT]', - '[USER_WORKLOADS_CONFIG_MAP]' - ); - - get_user_workloads_config_map_sample($formattedName); -} -// [END composer_v1_generated_Environments_GetUserWorkloadsConfigMap_sync] diff --git a/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/get_user_workloads_secret.php b/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/get_user_workloads_secret.php deleted file mode 100644 index 4b40f9c8cb89..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/get_user_workloads_secret.php +++ /dev/null @@ -1,81 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var UserWorkloadsSecret $response */ - $response = $environmentsClient->getUserWorkloadsSecret($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = EnvironmentsClient::userWorkloadsSecretName( - '[PROJECT]', - '[LOCATION]', - '[ENVIRONMENT]', - '[USER_WORKLOADS_SECRET]' - ); - - get_user_workloads_secret_sample($formattedName); -} -// [END composer_v1_generated_Environments_GetUserWorkloadsSecret_sync] diff --git a/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/list_environments.php b/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/list_environments.php deleted file mode 100644 index a0c2bb2bc35b..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/list_environments.php +++ /dev/null @@ -1,62 +0,0 @@ -listEnvironments($request); - - /** @var Environment $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END composer_v1_generated_Environments_ListEnvironments_sync] diff --git a/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/list_user_workloads_config_maps.php b/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/list_user_workloads_config_maps.php deleted file mode 100644 index 53debb71c1c2..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/list_user_workloads_config_maps.php +++ /dev/null @@ -1,80 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $environmentsClient->listUserWorkloadsConfigMaps($request); - - /** @var UserWorkloadsConfigMap $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = EnvironmentsClient::environmentName('[PROJECT]', '[LOCATION]', '[ENVIRONMENT]'); - - list_user_workloads_config_maps_sample($formattedParent); -} -// [END composer_v1_generated_Environments_ListUserWorkloadsConfigMaps_sync] diff --git a/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/list_user_workloads_secrets.php b/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/list_user_workloads_secrets.php deleted file mode 100644 index d44c6ed37253..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/list_user_workloads_secrets.php +++ /dev/null @@ -1,80 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $environmentsClient->listUserWorkloadsSecrets($request); - - /** @var UserWorkloadsSecret $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = EnvironmentsClient::environmentName('[PROJECT]', '[LOCATION]', '[ENVIRONMENT]'); - - list_user_workloads_secrets_sample($formattedParent); -} -// [END composer_v1_generated_Environments_ListUserWorkloadsSecrets_sync] diff --git a/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/list_workloads.php b/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/list_workloads.php deleted file mode 100644 index c951151b3718..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/list_workloads.php +++ /dev/null @@ -1,81 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $environmentsClient->listWorkloads($request); - - /** @var ComposerWorkload $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = EnvironmentsClient::environmentName('[PROJECT]', '[LOCATION]', '[ENVIRONMENT]'); - - list_workloads_sample($formattedParent); -} -// [END composer_v1_generated_Environments_ListWorkloads_sync] diff --git a/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/load_snapshot.php b/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/load_snapshot.php deleted file mode 100644 index 9776228d8a78..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/load_snapshot.php +++ /dev/null @@ -1,72 +0,0 @@ -loadSnapshot($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var LoadSnapshotResponse $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END composer_v1_generated_Environments_LoadSnapshot_sync] diff --git a/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/poll_airflow_command.php b/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/poll_airflow_command.php deleted file mode 100644 index 3ca41a15e0c0..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/poll_airflow_command.php +++ /dev/null @@ -1,57 +0,0 @@ -pollAirflowCommand($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END composer_v1_generated_Environments_PollAirflowCommand_sync] diff --git a/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/save_snapshot.php b/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/save_snapshot.php deleted file mode 100644 index 3bea6a1a071e..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/save_snapshot.php +++ /dev/null @@ -1,72 +0,0 @@ -saveSnapshot($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var SaveSnapshotResponse $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END composer_v1_generated_Environments_SaveSnapshot_sync] diff --git a/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/stop_airflow_command.php b/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/stop_airflow_command.php deleted file mode 100644 index 77d9b55899ac..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/stop_airflow_command.php +++ /dev/null @@ -1,57 +0,0 @@ -stopAirflowCommand($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END composer_v1_generated_Environments_StopAirflowCommand_sync] diff --git a/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/update_environment.php b/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/update_environment.php deleted file mode 100644 index a5f3651541cb..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/update_environment.php +++ /dev/null @@ -1,69 +0,0 @@ -updateEnvironment($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Environment $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END composer_v1_generated_Environments_UpdateEnvironment_sync] diff --git a/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/update_user_workloads_config_map.php b/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/update_user_workloads_config_map.php deleted file mode 100644 index d9ddca84e5da..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/update_user_workloads_config_map.php +++ /dev/null @@ -1,60 +0,0 @@ -updateUserWorkloadsConfigMap($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END composer_v1_generated_Environments_UpdateUserWorkloadsConfigMap_sync] diff --git a/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/update_user_workloads_secret.php b/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/update_user_workloads_secret.php deleted file mode 100644 index 91f1d7fd8e62..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/EnvironmentsClient/update_user_workloads_secret.php +++ /dev/null @@ -1,60 +0,0 @@ -updateUserWorkloadsSecret($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END composer_v1_generated_Environments_UpdateUserWorkloadsSecret_sync] diff --git a/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/ImageVersionsClient/list_image_versions.php b/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/ImageVersionsClient/list_image_versions.php deleted file mode 100644 index c05f61e5d64a..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/samples/V1/ImageVersionsClient/list_image_versions.php +++ /dev/null @@ -1,62 +0,0 @@ -listImageVersions($request); - - /** @var ImageVersion $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END composer_v1_generated_ImageVersions_ListImageVersions_sync] diff --git a/owl-bot-staging/OrchestrationAirflow/v1/src/V1/Client/EnvironmentsClient.php b/owl-bot-staging/OrchestrationAirflow/v1/src/V1/Client/EnvironmentsClient.php deleted file mode 100644 index 77a8bf2b18b5..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/src/V1/Client/EnvironmentsClient.php +++ /dev/null @@ -1,1040 +0,0 @@ - checkUpgradeAsync(CheckUpgradeRequest $request, array $optionalArgs = []) - * @method PromiseInterface createEnvironmentAsync(CreateEnvironmentRequest $request, array $optionalArgs = []) - * @method PromiseInterface createUserWorkloadsConfigMapAsync(CreateUserWorkloadsConfigMapRequest $request, array $optionalArgs = []) - * @method PromiseInterface createUserWorkloadsSecretAsync(CreateUserWorkloadsSecretRequest $request, array $optionalArgs = []) - * @method PromiseInterface databaseFailoverAsync(DatabaseFailoverRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteEnvironmentAsync(DeleteEnvironmentRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteUserWorkloadsConfigMapAsync(DeleteUserWorkloadsConfigMapRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteUserWorkloadsSecretAsync(DeleteUserWorkloadsSecretRequest $request, array $optionalArgs = []) - * @method PromiseInterface executeAirflowCommandAsync(ExecuteAirflowCommandRequest $request, array $optionalArgs = []) - * @method PromiseInterface fetchDatabasePropertiesAsync(FetchDatabasePropertiesRequest $request, array $optionalArgs = []) - * @method PromiseInterface getEnvironmentAsync(GetEnvironmentRequest $request, array $optionalArgs = []) - * @method PromiseInterface getUserWorkloadsConfigMapAsync(GetUserWorkloadsConfigMapRequest $request, array $optionalArgs = []) - * @method PromiseInterface getUserWorkloadsSecretAsync(GetUserWorkloadsSecretRequest $request, array $optionalArgs = []) - * @method PromiseInterface listEnvironmentsAsync(ListEnvironmentsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listUserWorkloadsConfigMapsAsync(ListUserWorkloadsConfigMapsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listUserWorkloadsSecretsAsync(ListUserWorkloadsSecretsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listWorkloadsAsync(ListWorkloadsRequest $request, array $optionalArgs = []) - * @method PromiseInterface loadSnapshotAsync(LoadSnapshotRequest $request, array $optionalArgs = []) - * @method PromiseInterface pollAirflowCommandAsync(PollAirflowCommandRequest $request, array $optionalArgs = []) - * @method PromiseInterface saveSnapshotAsync(SaveSnapshotRequest $request, array $optionalArgs = []) - * @method PromiseInterface stopAirflowCommandAsync(StopAirflowCommandRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateEnvironmentAsync(UpdateEnvironmentRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateUserWorkloadsConfigMapAsync(UpdateUserWorkloadsConfigMapRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateUserWorkloadsSecretAsync(UpdateUserWorkloadsSecretRequest $request, array $optionalArgs = []) - */ -final class EnvironmentsClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.orchestration.airflow.service.v1.Environments'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'composer.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'composer.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/environments_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/environments_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/environments_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/environments_rest_client_config.php', - ], - ], - ]; - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Create the default operation client for the service. - * - * @param array $options ClientOptions for the client. - * - * @return OperationsClient - */ - private function createOperationsClient(array $options) - { - // Unset client-specific configuration options - unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); - - if (isset($options['operationsClient'])) { - return $options['operationsClient']; - } - - return new OperationsClient($options); - } - - /** - * Formats a string containing the fully-qualified path to represent a environment - * resource. - * - * @param string $project - * @param string $location - * @param string $environment - * - * @return string The formatted environment resource. - */ - public static function environmentName(string $project, string $location, string $environment): string - { - return self::getPathTemplate('environment')->render([ - 'project' => $project, - 'location' => $location, - 'environment' => $environment, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * user_workloads_config_map resource. - * - * @param string $project - * @param string $location - * @param string $environment - * @param string $userWorkloadsConfigMap - * - * @return string The formatted user_workloads_config_map resource. - */ - public static function userWorkloadsConfigMapName(string $project, string $location, string $environment, string $userWorkloadsConfigMap): string - { - return self::getPathTemplate('userWorkloadsConfigMap')->render([ - 'project' => $project, - 'location' => $location, - 'environment' => $environment, - 'user_workloads_config_map' => $userWorkloadsConfigMap, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * user_workloads_secret resource. - * - * @param string $project - * @param string $location - * @param string $environment - * @param string $userWorkloadsSecret - * - * @return string The formatted user_workloads_secret resource. - */ - public static function userWorkloadsSecretName(string $project, string $location, string $environment, string $userWorkloadsSecret): string - { - return self::getPathTemplate('userWorkloadsSecret')->render([ - 'project' => $project, - 'location' => $location, - 'environment' => $environment, - 'user_workloads_secret' => $userWorkloadsSecret, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - environment: projects/{project}/locations/{location}/environments/{environment} - * - userWorkloadsConfigMap: projects/{project}/locations/{location}/environments/{environment}/userWorkloadsConfigMaps/{user_workloads_config_map} - * - userWorkloadsSecret: projects/{project}/locations/{location}/environments/{environment}/userWorkloadsSecrets/{user_workloads_secret} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param ?string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, ?string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'composer.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Check if an upgrade operation on the environment will succeed. - * - * In case of problems detailed info can be found in the returned Operation. - * - * The async variant is {@see EnvironmentsClient::checkUpgradeAsync()} . - * - * @example samples/V1/EnvironmentsClient/check_upgrade.php - * - * @param CheckUpgradeRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function checkUpgrade(CheckUpgradeRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CheckUpgrade', $request, $callOptions)->wait(); - } - - /** - * Create a new environment. - * - * The async variant is {@see EnvironmentsClient::createEnvironmentAsync()} . - * - * @example samples/V1/EnvironmentsClient/create_environment.php - * - * @param CreateEnvironmentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createEnvironment(CreateEnvironmentRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateEnvironment', $request, $callOptions)->wait(); - } - - /** - * Creates a user workloads ConfigMap. - * - * This method is supported for Cloud Composer environments in versions - * composer-3.*.*-airflow-*.*.* and newer. - * - * The async variant is - * {@see EnvironmentsClient::createUserWorkloadsConfigMapAsync()} . - * - * @example samples/V1/EnvironmentsClient/create_user_workloads_config_map.php - * - * @param CreateUserWorkloadsConfigMapRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return UserWorkloadsConfigMap - * - * @throws ApiException Thrown if the API call fails. - */ - public function createUserWorkloadsConfigMap(CreateUserWorkloadsConfigMapRequest $request, array $callOptions = []): UserWorkloadsConfigMap - { - return $this->startApiCall('CreateUserWorkloadsConfigMap', $request, $callOptions)->wait(); - } - - /** - * Creates a user workloads Secret. - * - * This method is supported for Cloud Composer environments in versions - * composer-3.*.*-airflow-*.*.* and newer. - * - * The async variant is {@see EnvironmentsClient::createUserWorkloadsSecretAsync()} - * . - * - * @example samples/V1/EnvironmentsClient/create_user_workloads_secret.php - * - * @param CreateUserWorkloadsSecretRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return UserWorkloadsSecret - * - * @throws ApiException Thrown if the API call fails. - */ - public function createUserWorkloadsSecret(CreateUserWorkloadsSecretRequest $request, array $callOptions = []): UserWorkloadsSecret - { - return $this->startApiCall('CreateUserWorkloadsSecret', $request, $callOptions)->wait(); - } - - /** - * Triggers database failover (only for highly resilient environments). - * - * The async variant is {@see EnvironmentsClient::databaseFailoverAsync()} . - * - * @example samples/V1/EnvironmentsClient/database_failover.php - * - * @param DatabaseFailoverRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function databaseFailover(DatabaseFailoverRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DatabaseFailover', $request, $callOptions)->wait(); - } - - /** - * Delete an environment. - * - * The async variant is {@see EnvironmentsClient::deleteEnvironmentAsync()} . - * - * @example samples/V1/EnvironmentsClient/delete_environment.php - * - * @param DeleteEnvironmentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteEnvironment(DeleteEnvironmentRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteEnvironment', $request, $callOptions)->wait(); - } - - /** - * Deletes a user workloads ConfigMap. - * - * This method is supported for Cloud Composer environments in versions - * composer-3.*.*-airflow-*.*.* and newer. - * - * The async variant is - * {@see EnvironmentsClient::deleteUserWorkloadsConfigMapAsync()} . - * - * @example samples/V1/EnvironmentsClient/delete_user_workloads_config_map.php - * - * @param DeleteUserWorkloadsConfigMapRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteUserWorkloadsConfigMap(DeleteUserWorkloadsConfigMapRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteUserWorkloadsConfigMap', $request, $callOptions)->wait(); - } - - /** - * Deletes a user workloads Secret. - * - * This method is supported for Cloud Composer environments in versions - * composer-3.*.*-airflow-*.*.* and newer. - * - * The async variant is {@see EnvironmentsClient::deleteUserWorkloadsSecretAsync()} - * . - * - * @example samples/V1/EnvironmentsClient/delete_user_workloads_secret.php - * - * @param DeleteUserWorkloadsSecretRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteUserWorkloadsSecret(DeleteUserWorkloadsSecretRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteUserWorkloadsSecret', $request, $callOptions)->wait(); - } - - /** - * Executes Airflow CLI command. - * - * The async variant is {@see EnvironmentsClient::executeAirflowCommandAsync()} . - * - * @example samples/V1/EnvironmentsClient/execute_airflow_command.php - * - * @param ExecuteAirflowCommandRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return ExecuteAirflowCommandResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function executeAirflowCommand(ExecuteAirflowCommandRequest $request, array $callOptions = []): ExecuteAirflowCommandResponse - { - return $this->startApiCall('ExecuteAirflowCommand', $request, $callOptions)->wait(); - } - - /** - * Fetches database properties. - * - * The async variant is {@see EnvironmentsClient::fetchDatabasePropertiesAsync()} . - * - * @example samples/V1/EnvironmentsClient/fetch_database_properties.php - * - * @param FetchDatabasePropertiesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return FetchDatabasePropertiesResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function fetchDatabaseProperties(FetchDatabasePropertiesRequest $request, array $callOptions = []): FetchDatabasePropertiesResponse - { - return $this->startApiCall('FetchDatabaseProperties', $request, $callOptions)->wait(); - } - - /** - * Get an existing environment. - * - * The async variant is {@see EnvironmentsClient::getEnvironmentAsync()} . - * - * @example samples/V1/EnvironmentsClient/get_environment.php - * - * @param GetEnvironmentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Environment - * - * @throws ApiException Thrown if the API call fails. - */ - public function getEnvironment(GetEnvironmentRequest $request, array $callOptions = []): Environment - { - return $this->startApiCall('GetEnvironment', $request, $callOptions)->wait(); - } - - /** - * Gets an existing user workloads ConfigMap. - * - * This method is supported for Cloud Composer environments in versions - * composer-3.*.*-airflow-*.*.* and newer. - * - * The async variant is {@see EnvironmentsClient::getUserWorkloadsConfigMapAsync()} - * . - * - * @example samples/V1/EnvironmentsClient/get_user_workloads_config_map.php - * - * @param GetUserWorkloadsConfigMapRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return UserWorkloadsConfigMap - * - * @throws ApiException Thrown if the API call fails. - */ - public function getUserWorkloadsConfigMap(GetUserWorkloadsConfigMapRequest $request, array $callOptions = []): UserWorkloadsConfigMap - { - return $this->startApiCall('GetUserWorkloadsConfigMap', $request, $callOptions)->wait(); - } - - /** - * Gets an existing user workloads Secret. - * Values of the "data" field in the response are cleared. - * - * This method is supported for Cloud Composer environments in versions - * composer-3.*.*-airflow-*.*.* and newer. - * - * The async variant is {@see EnvironmentsClient::getUserWorkloadsSecretAsync()} . - * - * @example samples/V1/EnvironmentsClient/get_user_workloads_secret.php - * - * @param GetUserWorkloadsSecretRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return UserWorkloadsSecret - * - * @throws ApiException Thrown if the API call fails. - */ - public function getUserWorkloadsSecret(GetUserWorkloadsSecretRequest $request, array $callOptions = []): UserWorkloadsSecret - { - return $this->startApiCall('GetUserWorkloadsSecret', $request, $callOptions)->wait(); - } - - /** - * List environments. - * - * The async variant is {@see EnvironmentsClient::listEnvironmentsAsync()} . - * - * @example samples/V1/EnvironmentsClient/list_environments.php - * - * @param ListEnvironmentsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listEnvironments(ListEnvironmentsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListEnvironments', $request, $callOptions); - } - - /** - * Lists user workloads ConfigMaps. - * - * This method is supported for Cloud Composer environments in versions - * composer-3.*.*-airflow-*.*.* and newer. - * - * The async variant is - * {@see EnvironmentsClient::listUserWorkloadsConfigMapsAsync()} . - * - * @example samples/V1/EnvironmentsClient/list_user_workloads_config_maps.php - * - * @param ListUserWorkloadsConfigMapsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listUserWorkloadsConfigMaps(ListUserWorkloadsConfigMapsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListUserWorkloadsConfigMaps', $request, $callOptions); - } - - /** - * Lists user workloads Secrets. - * - * This method is supported for Cloud Composer environments in versions - * composer-3.*.*-airflow-*.*.* and newer. - * - * The async variant is {@see EnvironmentsClient::listUserWorkloadsSecretsAsync()} - * . - * - * @example samples/V1/EnvironmentsClient/list_user_workloads_secrets.php - * - * @param ListUserWorkloadsSecretsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listUserWorkloadsSecrets(ListUserWorkloadsSecretsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListUserWorkloadsSecrets', $request, $callOptions); - } - - /** - * Lists workloads in a Cloud Composer environment. Workload is a unit that - * runs a single Composer component. - * - * This method is supported for Cloud Composer environments in versions - * composer-3.*.*-airflow-*.*.* and newer. - * - * The async variant is {@see EnvironmentsClient::listWorkloadsAsync()} . - * - * @example samples/V1/EnvironmentsClient/list_workloads.php - * - * @param ListWorkloadsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listWorkloads(ListWorkloadsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListWorkloads', $request, $callOptions); - } - - /** - * Loads a snapshot of a Cloud Composer environment. - * - * As a result of this operation, a snapshot of environment's specified in - * LoadSnapshotRequest is loaded into the environment. - * - * The async variant is {@see EnvironmentsClient::loadSnapshotAsync()} . - * - * @example samples/V1/EnvironmentsClient/load_snapshot.php - * - * @param LoadSnapshotRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function loadSnapshot(LoadSnapshotRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('LoadSnapshot', $request, $callOptions)->wait(); - } - - /** - * Polls Airflow CLI command execution and fetches logs. - * - * The async variant is {@see EnvironmentsClient::pollAirflowCommandAsync()} . - * - * @example samples/V1/EnvironmentsClient/poll_airflow_command.php - * - * @param PollAirflowCommandRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PollAirflowCommandResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function pollAirflowCommand(PollAirflowCommandRequest $request, array $callOptions = []): PollAirflowCommandResponse - { - return $this->startApiCall('PollAirflowCommand', $request, $callOptions)->wait(); - } - - /** - * Creates a snapshots of a Cloud Composer environment. - * - * As a result of this operation, snapshot of environment's state is stored - * in a location specified in the SaveSnapshotRequest. - * - * The async variant is {@see EnvironmentsClient::saveSnapshotAsync()} . - * - * @example samples/V1/EnvironmentsClient/save_snapshot.php - * - * @param SaveSnapshotRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function saveSnapshot(SaveSnapshotRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('SaveSnapshot', $request, $callOptions)->wait(); - } - - /** - * Stops Airflow CLI command execution. - * - * The async variant is {@see EnvironmentsClient::stopAirflowCommandAsync()} . - * - * @example samples/V1/EnvironmentsClient/stop_airflow_command.php - * - * @param StopAirflowCommandRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return StopAirflowCommandResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function stopAirflowCommand(StopAirflowCommandRequest $request, array $callOptions = []): StopAirflowCommandResponse - { - return $this->startApiCall('StopAirflowCommand', $request, $callOptions)->wait(); - } - - /** - * Update an environment. - * - * The async variant is {@see EnvironmentsClient::updateEnvironmentAsync()} . - * - * @example samples/V1/EnvironmentsClient/update_environment.php - * - * @param UpdateEnvironmentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateEnvironment(UpdateEnvironmentRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateEnvironment', $request, $callOptions)->wait(); - } - - /** - * Updates a user workloads ConfigMap. - * - * This method is supported for Cloud Composer environments in versions - * composer-3.*.*-airflow-*.*.* and newer. - * - * The async variant is - * {@see EnvironmentsClient::updateUserWorkloadsConfigMapAsync()} . - * - * @example samples/V1/EnvironmentsClient/update_user_workloads_config_map.php - * - * @param UpdateUserWorkloadsConfigMapRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return UserWorkloadsConfigMap - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateUserWorkloadsConfigMap(UpdateUserWorkloadsConfigMapRequest $request, array $callOptions = []): UserWorkloadsConfigMap - { - return $this->startApiCall('UpdateUserWorkloadsConfigMap', $request, $callOptions)->wait(); - } - - /** - * Updates a user workloads Secret. - * - * This method is supported for Cloud Composer environments in versions - * composer-3.*.*-airflow-*.*.* and newer. - * - * The async variant is {@see EnvironmentsClient::updateUserWorkloadsSecretAsync()} - * . - * - * @example samples/V1/EnvironmentsClient/update_user_workloads_secret.php - * - * @param UpdateUserWorkloadsSecretRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return UserWorkloadsSecret - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateUserWorkloadsSecret(UpdateUserWorkloadsSecretRequest $request, array $callOptions = []): UserWorkloadsSecret - { - return $this->startApiCall('UpdateUserWorkloadsSecret', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/OrchestrationAirflow/v1/src/V1/Client/ImageVersionsClient.php b/owl-bot-staging/OrchestrationAirflow/v1/src/V1/Client/ImageVersionsClient.php deleted file mode 100644 index 55875e67dd39..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/src/V1/Client/ImageVersionsClient.php +++ /dev/null @@ -1,193 +0,0 @@ - listImageVersionsAsync(ListImageVersionsRequest $request, array $optionalArgs = []) - */ -final class ImageVersionsClient -{ - use GapicClientTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.orchestration.airflow.service.v1.ImageVersions'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'composer.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'composer.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/image_versions_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/image_versions_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/image_versions_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/image_versions_rest_client_config.php', - ], - ], - ]; - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'composer.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * List ImageVersions for provided location. - * - * The async variant is {@see ImageVersionsClient::listImageVersionsAsync()} . - * - * @example samples/V1/ImageVersionsClient/list_image_versions.php - * - * @param ListImageVersionsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listImageVersions(ListImageVersionsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListImageVersions', $request, $callOptions); - } -} diff --git a/owl-bot-staging/OrchestrationAirflow/v1/src/V1/gapic_metadata.json b/owl-bot-staging/OrchestrationAirflow/v1/src/V1/gapic_metadata.json deleted file mode 100644 index 818abc4a7eb4..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/src/V1/gapic_metadata.json +++ /dev/null @@ -1,152 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.orchestration.airflow.service.v1", - "libraryPackage": "Google\\Cloud\\Orchestration\\Airflow\\Service\\V1", - "services": { - "Environments": { - "clients": { - "grpc": { - "libraryClient": "EnvironmentsGapicClient", - "rpcs": { - "CheckUpgrade": { - "methods": [ - "checkUpgrade" - ] - }, - "CreateEnvironment": { - "methods": [ - "createEnvironment" - ] - }, - "CreateUserWorkloadsConfigMap": { - "methods": [ - "createUserWorkloadsConfigMap" - ] - }, - "CreateUserWorkloadsSecret": { - "methods": [ - "createUserWorkloadsSecret" - ] - }, - "DatabaseFailover": { - "methods": [ - "databaseFailover" - ] - }, - "DeleteEnvironment": { - "methods": [ - "deleteEnvironment" - ] - }, - "DeleteUserWorkloadsConfigMap": { - "methods": [ - "deleteUserWorkloadsConfigMap" - ] - }, - "DeleteUserWorkloadsSecret": { - "methods": [ - "deleteUserWorkloadsSecret" - ] - }, - "ExecuteAirflowCommand": { - "methods": [ - "executeAirflowCommand" - ] - }, - "FetchDatabaseProperties": { - "methods": [ - "fetchDatabaseProperties" - ] - }, - "GetEnvironment": { - "methods": [ - "getEnvironment" - ] - }, - "GetUserWorkloadsConfigMap": { - "methods": [ - "getUserWorkloadsConfigMap" - ] - }, - "GetUserWorkloadsSecret": { - "methods": [ - "getUserWorkloadsSecret" - ] - }, - "ListEnvironments": { - "methods": [ - "listEnvironments" - ] - }, - "ListUserWorkloadsConfigMaps": { - "methods": [ - "listUserWorkloadsConfigMaps" - ] - }, - "ListUserWorkloadsSecrets": { - "methods": [ - "listUserWorkloadsSecrets" - ] - }, - "ListWorkloads": { - "methods": [ - "listWorkloads" - ] - }, - "LoadSnapshot": { - "methods": [ - "loadSnapshot" - ] - }, - "PollAirflowCommand": { - "methods": [ - "pollAirflowCommand" - ] - }, - "SaveSnapshot": { - "methods": [ - "saveSnapshot" - ] - }, - "StopAirflowCommand": { - "methods": [ - "stopAirflowCommand" - ] - }, - "UpdateEnvironment": { - "methods": [ - "updateEnvironment" - ] - }, - "UpdateUserWorkloadsConfigMap": { - "methods": [ - "updateUserWorkloadsConfigMap" - ] - }, - "UpdateUserWorkloadsSecret": { - "methods": [ - "updateUserWorkloadsSecret" - ] - } - } - } - } - }, - "ImageVersions": { - "clients": { - "grpc": { - "libraryClient": "ImageVersionsGapicClient", - "rpcs": { - "ListImageVersions": { - "methods": [ - "listImageVersions" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/OrchestrationAirflow/v1/src/V1/resources/environments_client_config.json b/owl-bot-staging/OrchestrationAirflow/v1/src/V1/resources/environments_client_config.json deleted file mode 100644 index 0f0a01172887..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/src/V1/resources/environments_client_config.json +++ /dev/null @@ -1,142 +0,0 @@ -{ - "interfaces": { - "google.cloud.orchestration.airflow.service.v1.Environments": { - "retry_codes": { - "no_retry_codes": [] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - } - }, - "methods": { - "CheckUpgrade": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "CreateEnvironment": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "CreateUserWorkloadsConfigMap": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "CreateUserWorkloadsSecret": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "DatabaseFailover": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "DeleteEnvironment": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "DeleteUserWorkloadsConfigMap": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "DeleteUserWorkloadsSecret": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ExecuteAirflowCommand": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "FetchDatabaseProperties": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetEnvironment": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetUserWorkloadsConfigMap": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetUserWorkloadsSecret": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListEnvironments": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListUserWorkloadsConfigMaps": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListUserWorkloadsSecrets": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListWorkloads": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "LoadSnapshot": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "PollAirflowCommand": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "SaveSnapshot": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "StopAirflowCommand": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "UpdateEnvironment": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "UpdateUserWorkloadsConfigMap": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "UpdateUserWorkloadsSecret": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - } - } - } - } -} diff --git a/owl-bot-staging/OrchestrationAirflow/v1/src/V1/resources/environments_descriptor_config.php b/owl-bot-staging/OrchestrationAirflow/v1/src/V1/resources/environments_descriptor_config.php deleted file mode 100644 index 3865c7a2b3d0..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/src/V1/resources/environments_descriptor_config.php +++ /dev/null @@ -1,404 +0,0 @@ - [ - 'google.cloud.orchestration.airflow.service.v1.Environments' => [ - 'CheckUpgrade' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Orchestration\Airflow\Service\V1\CheckUpgradeResponse', - 'metadataReturnType' => '\Google\Cloud\Orchestration\Airflow\Service\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'environment', - 'fieldAccessors' => [ - 'getEnvironment', - ], - ], - ], - ], - 'CreateEnvironment' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Orchestration\Airflow\Service\V1\Environment', - 'metadataReturnType' => '\Google\Cloud\Orchestration\Airflow\Service\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DatabaseFailover' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Orchestration\Airflow\Service\V1\DatabaseFailoverResponse', - 'metadataReturnType' => '\Google\Cloud\Orchestration\Airflow\Service\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'environment', - 'fieldAccessors' => [ - 'getEnvironment', - ], - ], - ], - ], - 'DeleteEnvironment' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\Orchestration\Airflow\Service\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'LoadSnapshot' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Orchestration\Airflow\Service\V1\LoadSnapshotResponse', - 'metadataReturnType' => '\Google\Cloud\Orchestration\Airflow\Service\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'environment', - 'fieldAccessors' => [ - 'getEnvironment', - ], - ], - ], - ], - 'SaveSnapshot' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Orchestration\Airflow\Service\V1\SaveSnapshotResponse', - 'metadataReturnType' => '\Google\Cloud\Orchestration\Airflow\Service\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'environment', - 'fieldAccessors' => [ - 'getEnvironment', - ], - ], - ], - ], - 'UpdateEnvironment' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Orchestration\Airflow\Service\V1\Environment', - 'metadataReturnType' => '\Google\Cloud\Orchestration\Airflow\Service\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'CreateUserWorkloadsConfigMap' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Orchestration\Airflow\Service\V1\UserWorkloadsConfigMap', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateUserWorkloadsSecret' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Orchestration\Airflow\Service\V1\UserWorkloadsSecret', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteUserWorkloadsConfigMap' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteUserWorkloadsSecret' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ExecuteAirflowCommand' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Orchestration\Airflow\Service\V1\ExecuteAirflowCommandResponse', - 'headerParams' => [ - [ - 'keyName' => 'environment', - 'fieldAccessors' => [ - 'getEnvironment', - ], - ], - ], - ], - 'FetchDatabaseProperties' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Orchestration\Airflow\Service\V1\FetchDatabasePropertiesResponse', - 'headerParams' => [ - [ - 'keyName' => 'environment', - 'fieldAccessors' => [ - 'getEnvironment', - ], - ], - ], - ], - 'GetEnvironment' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Orchestration\Airflow\Service\V1\Environment', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetUserWorkloadsConfigMap' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Orchestration\Airflow\Service\V1\UserWorkloadsConfigMap', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetUserWorkloadsSecret' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Orchestration\Airflow\Service\V1\UserWorkloadsSecret', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListEnvironments' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getEnvironments', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Orchestration\Airflow\Service\V1\ListEnvironmentsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListUserWorkloadsConfigMaps' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getUserWorkloadsConfigMaps', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Orchestration\Airflow\Service\V1\ListUserWorkloadsConfigMapsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListUserWorkloadsSecrets' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getUserWorkloadsSecrets', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Orchestration\Airflow\Service\V1\ListUserWorkloadsSecretsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListWorkloads' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getWorkloads', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Orchestration\Airflow\Service\V1\ListWorkloadsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'PollAirflowCommand' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Orchestration\Airflow\Service\V1\PollAirflowCommandResponse', - 'headerParams' => [ - [ - 'keyName' => 'environment', - 'fieldAccessors' => [ - 'getEnvironment', - ], - ], - ], - ], - 'StopAirflowCommand' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Orchestration\Airflow\Service\V1\StopAirflowCommandResponse', - 'headerParams' => [ - [ - 'keyName' => 'environment', - 'fieldAccessors' => [ - 'getEnvironment', - ], - ], - ], - ], - 'UpdateUserWorkloadsConfigMap' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Orchestration\Airflow\Service\V1\UserWorkloadsConfigMap', - 'headerParams' => [ - [ - 'keyName' => 'user_workloads_config_map.name', - 'fieldAccessors' => [ - 'getUserWorkloadsConfigMap', - 'getName', - ], - ], - ], - ], - 'UpdateUserWorkloadsSecret' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Orchestration\Airflow\Service\V1\UserWorkloadsSecret', - 'headerParams' => [ - [ - 'keyName' => 'user_workloads_secret.name', - 'fieldAccessors' => [ - 'getUserWorkloadsSecret', - 'getName', - ], - ], - ], - ], - 'templateMap' => [ - 'environment' => 'projects/{project}/locations/{location}/environments/{environment}', - 'userWorkloadsConfigMap' => 'projects/{project}/locations/{location}/environments/{environment}/userWorkloadsConfigMaps/{user_workloads_config_map}', - 'userWorkloadsSecret' => 'projects/{project}/locations/{location}/environments/{environment}/userWorkloadsSecrets/{user_workloads_secret}', - ], - ], - ], -]; diff --git a/owl-bot-staging/OrchestrationAirflow/v1/src/V1/resources/environments_rest_client_config.php b/owl-bot-staging/OrchestrationAirflow/v1/src/V1/resources/environments_rest_client_config.php deleted file mode 100644 index bed86b569fa3..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/src/V1/resources/environments_rest_client_config.php +++ /dev/null @@ -1,343 +0,0 @@ - [ - 'google.cloud.orchestration.airflow.service.v1.Environments' => [ - 'CheckUpgrade' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{environment=projects/*/locations/*/environments/*}:checkUpgrade', - 'body' => '*', - 'placeholders' => [ - 'environment' => [ - 'getters' => [ - 'getEnvironment', - ], - ], - ], - ], - 'CreateEnvironment' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/environments', - 'body' => 'environment', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CreateUserWorkloadsConfigMap' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/environments/*}/userWorkloadsConfigMaps', - 'body' => 'user_workloads_config_map', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CreateUserWorkloadsSecret' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/environments/*}/userWorkloadsSecrets', - 'body' => 'user_workloads_secret', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DatabaseFailover' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{environment=projects/*/locations/*/environments/*}:databaseFailover', - 'body' => '*', - 'placeholders' => [ - 'environment' => [ - 'getters' => [ - 'getEnvironment', - ], - ], - ], - ], - 'DeleteEnvironment' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/environments/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteUserWorkloadsConfigMap' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/environments/*/userWorkloadsConfigMaps/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteUserWorkloadsSecret' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/environments/*/userWorkloadsSecrets/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ExecuteAirflowCommand' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{environment=projects/*/locations/*/environments/*}:executeAirflowCommand', - 'body' => '*', - 'placeholders' => [ - 'environment' => [ - 'getters' => [ - 'getEnvironment', - ], - ], - ], - ], - 'FetchDatabaseProperties' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{environment=projects/*/locations/*/environments/*}:fetchDatabaseProperties', - 'placeholders' => [ - 'environment' => [ - 'getters' => [ - 'getEnvironment', - ], - ], - ], - ], - 'GetEnvironment' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/environments/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetUserWorkloadsConfigMap' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/environments/*/userWorkloadsConfigMaps/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetUserWorkloadsSecret' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/environments/*/userWorkloadsSecrets/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListEnvironments' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/environments', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListUserWorkloadsConfigMaps' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/environments/*}/userWorkloadsConfigMaps', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListUserWorkloadsSecrets' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/environments/*}/userWorkloadsSecrets', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListWorkloads' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/environments/*}/workloads', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'LoadSnapshot' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{environment=projects/*/locations/*/environments/*}:loadSnapshot', - 'body' => '*', - 'placeholders' => [ - 'environment' => [ - 'getters' => [ - 'getEnvironment', - ], - ], - ], - ], - 'PollAirflowCommand' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{environment=projects/*/locations/*/environments/*}:pollAirflowCommand', - 'body' => '*', - 'placeholders' => [ - 'environment' => [ - 'getters' => [ - 'getEnvironment', - ], - ], - ], - ], - 'SaveSnapshot' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{environment=projects/*/locations/*/environments/*}:saveSnapshot', - 'body' => '*', - 'placeholders' => [ - 'environment' => [ - 'getters' => [ - 'getEnvironment', - ], - ], - ], - ], - 'StopAirflowCommand' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{environment=projects/*/locations/*/environments/*}:stopAirflowCommand', - 'body' => '*', - 'placeholders' => [ - 'environment' => [ - 'getters' => [ - 'getEnvironment', - ], - ], - ], - ], - 'UpdateEnvironment' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/environments/*}', - 'body' => 'environment', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'UpdateUserWorkloadsConfigMap' => [ - 'method' => 'put', - 'uriTemplate' => '/v1/{user_workloads_config_map.name=projects/*/locations/*/environments/*/userWorkloadsConfigMaps/*}', - 'body' => 'user_workloads_config_map', - 'placeholders' => [ - 'user_workloads_config_map.name' => [ - 'getters' => [ - 'getUserWorkloadsConfigMap', - 'getName', - ], - ], - ], - ], - 'UpdateUserWorkloadsSecret' => [ - 'method' => 'put', - 'uriTemplate' => '/v1/{user_workloads_secret.name=projects/*/locations/*/environments/*/userWorkloadsSecrets/*}', - 'body' => 'user_workloads_secret', - 'placeholders' => [ - 'user_workloads_secret.name' => [ - 'getters' => [ - 'getUserWorkloadsSecret', - 'getName', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/OrchestrationAirflow/v1/src/V1/resources/image_versions_client_config.json b/owl-bot-staging/OrchestrationAirflow/v1/src/V1/resources/image_versions_client_config.json deleted file mode 100644 index 8dcb3d85d715..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/src/V1/resources/image_versions_client_config.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "interfaces": { - "google.cloud.orchestration.airflow.service.v1.ImageVersions": { - "retry_codes": { - "no_retry_codes": [] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - } - }, - "methods": { - "ListImageVersions": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - } - } - } - } -} diff --git a/owl-bot-staging/OrchestrationAirflow/v1/src/V1/resources/image_versions_descriptor_config.php b/owl-bot-staging/OrchestrationAirflow/v1/src/V1/resources/image_versions_descriptor_config.php deleted file mode 100644 index 1eb232f5660d..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/src/V1/resources/image_versions_descriptor_config.php +++ /dev/null @@ -1,48 +0,0 @@ - [ - 'google.cloud.orchestration.airflow.service.v1.ImageVersions' => [ - 'ListImageVersions' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getImageVersions', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Orchestration\Airflow\Service\V1\ListImageVersionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - ], - ], -]; diff --git a/owl-bot-staging/OrchestrationAirflow/v1/src/V1/resources/image_versions_rest_client_config.php b/owl-bot-staging/OrchestrationAirflow/v1/src/V1/resources/image_versions_rest_client_config.php deleted file mode 100644 index e999b9722e51..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/src/V1/resources/image_versions_rest_client_config.php +++ /dev/null @@ -1,75 +0,0 @@ - [ - 'google.cloud.orchestration.airflow.service.v1.ImageVersions' => [ - 'ListImageVersions' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/imageVersions', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/OrchestrationAirflow/v1/tests/Unit/V1/Client/EnvironmentsClientTest.php b/owl-bot-staging/OrchestrationAirflow/v1/tests/Unit/V1/Client/EnvironmentsClientTest.php deleted file mode 100644 index a116aac0468b..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/tests/Unit/V1/Client/EnvironmentsClientTest.php +++ /dev/null @@ -1,2084 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return EnvironmentsClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new EnvironmentsClient($options); - } - - /** @test */ - public function checkUpgradeTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/checkUpgradeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $buildLogUri = 'buildLogUri2127590688'; - $pypiConflictBuildLogExtract = 'pypiConflictBuildLogExtract-575404123'; - $imageVersion2 = 'imageVersion2-1876344665'; - $expectedResponse = new CheckUpgradeResponse(); - $expectedResponse->setBuildLogUri($buildLogUri); - $expectedResponse->setPypiConflictBuildLogExtract($pypiConflictBuildLogExtract); - $expectedResponse->setImageVersion($imageVersion2); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/checkUpgradeTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $environment = 'environment-85904877'; - $request = (new CheckUpgradeRequest()) - ->setEnvironment($environment); - $response = $gapicClient->checkUpgrade($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.orchestration.airflow.service.v1.Environments/CheckUpgrade', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getEnvironment(); - $this->assertProtobufEquals($environment, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/checkUpgradeTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function checkUpgradeExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/checkUpgradeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $environment = 'environment-85904877'; - $request = (new CheckUpgradeRequest()) - ->setEnvironment($environment); - $response = $gapicClient->checkUpgrade($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/checkUpgradeTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createEnvironmentTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createEnvironmentTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uuid = 'uuid3601339'; - $satisfiesPzs = false; - $satisfiesPzi = false; - $expectedResponse = new Environment(); - $expectedResponse->setName($name); - $expectedResponse->setUuid($uuid); - $expectedResponse->setSatisfiesPzs($satisfiesPzs); - $expectedResponse->setSatisfiesPzi($satisfiesPzi); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createEnvironmentTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - $request = new CreateEnvironmentRequest(); - $response = $gapicClient->createEnvironment($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.orchestration.airflow.service.v1.Environments/CreateEnvironment', $actualApiFuncCall); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createEnvironmentTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createEnvironmentExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createEnvironmentTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - $request = new CreateEnvironmentRequest(); - $response = $gapicClient->createEnvironment($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createEnvironmentTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createUserWorkloadsConfigMapTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $expectedResponse = new UserWorkloadsConfigMap(); - $expectedResponse->setName($name); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->environmentName('[PROJECT]', '[LOCATION]', '[ENVIRONMENT]'); - $userWorkloadsConfigMap = new UserWorkloadsConfigMap(); - $request = (new CreateUserWorkloadsConfigMapRequest()) - ->setParent($formattedParent) - ->setUserWorkloadsConfigMap($userWorkloadsConfigMap); - $response = $gapicClient->createUserWorkloadsConfigMap($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.orchestration.airflow.service.v1.Environments/CreateUserWorkloadsConfigMap', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getUserWorkloadsConfigMap(); - $this->assertProtobufEquals($userWorkloadsConfigMap, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createUserWorkloadsConfigMapExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->environmentName('[PROJECT]', '[LOCATION]', '[ENVIRONMENT]'); - $userWorkloadsConfigMap = new UserWorkloadsConfigMap(); - $request = (new CreateUserWorkloadsConfigMapRequest()) - ->setParent($formattedParent) - ->setUserWorkloadsConfigMap($userWorkloadsConfigMap); - try { - $gapicClient->createUserWorkloadsConfigMap($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createUserWorkloadsSecretTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $expectedResponse = new UserWorkloadsSecret(); - $expectedResponse->setName($name); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->environmentName('[PROJECT]', '[LOCATION]', '[ENVIRONMENT]'); - $userWorkloadsSecret = new UserWorkloadsSecret(); - $request = (new CreateUserWorkloadsSecretRequest()) - ->setParent($formattedParent) - ->setUserWorkloadsSecret($userWorkloadsSecret); - $response = $gapicClient->createUserWorkloadsSecret($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.orchestration.airflow.service.v1.Environments/CreateUserWorkloadsSecret', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getUserWorkloadsSecret(); - $this->assertProtobufEquals($userWorkloadsSecret, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createUserWorkloadsSecretExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->environmentName('[PROJECT]', '[LOCATION]', '[ENVIRONMENT]'); - $userWorkloadsSecret = new UserWorkloadsSecret(); - $request = (new CreateUserWorkloadsSecretRequest()) - ->setParent($formattedParent) - ->setUserWorkloadsSecret($userWorkloadsSecret); - try { - $gapicClient->createUserWorkloadsSecret($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function databaseFailoverTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/databaseFailoverTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new DatabaseFailoverResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/databaseFailoverTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - $request = new DatabaseFailoverRequest(); - $response = $gapicClient->databaseFailover($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.orchestration.airflow.service.v1.Environments/DatabaseFailover', $actualApiFuncCall); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/databaseFailoverTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function databaseFailoverExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/databaseFailoverTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - $request = new DatabaseFailoverRequest(); - $response = $gapicClient->databaseFailover($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/databaseFailoverTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteEnvironmentTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteEnvironmentTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteEnvironmentTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - $request = new DeleteEnvironmentRequest(); - $response = $gapicClient->deleteEnvironment($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.orchestration.airflow.service.v1.Environments/DeleteEnvironment', $actualApiFuncCall); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteEnvironmentTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteEnvironmentExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteEnvironmentTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - $request = new DeleteEnvironmentRequest(); - $response = $gapicClient->deleteEnvironment($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteEnvironmentTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteUserWorkloadsConfigMapTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->userWorkloadsConfigMapName('[PROJECT]', '[LOCATION]', '[ENVIRONMENT]', '[USER_WORKLOADS_CONFIG_MAP]'); - $request = (new DeleteUserWorkloadsConfigMapRequest()) - ->setName($formattedName); - $gapicClient->deleteUserWorkloadsConfigMap($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.orchestration.airflow.service.v1.Environments/DeleteUserWorkloadsConfigMap', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteUserWorkloadsConfigMapExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->userWorkloadsConfigMapName('[PROJECT]', '[LOCATION]', '[ENVIRONMENT]', '[USER_WORKLOADS_CONFIG_MAP]'); - $request = (new DeleteUserWorkloadsConfigMapRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteUserWorkloadsConfigMap($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteUserWorkloadsSecretTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->userWorkloadsSecretName('[PROJECT]', '[LOCATION]', '[ENVIRONMENT]', '[USER_WORKLOADS_SECRET]'); - $request = (new DeleteUserWorkloadsSecretRequest()) - ->setName($formattedName); - $gapicClient->deleteUserWorkloadsSecret($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.orchestration.airflow.service.v1.Environments/DeleteUserWorkloadsSecret', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteUserWorkloadsSecretExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->userWorkloadsSecretName('[PROJECT]', '[LOCATION]', '[ENVIRONMENT]', '[USER_WORKLOADS_SECRET]'); - $request = (new DeleteUserWorkloadsSecretRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteUserWorkloadsSecret($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function executeAirflowCommandTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $executionId = 'executionId-1217171550'; - $pod = 'pod111173'; - $podNamespace = 'podNamespace-896290847'; - $error = 'error96784904'; - $expectedResponse = new ExecuteAirflowCommandResponse(); - $expectedResponse->setExecutionId($executionId); - $expectedResponse->setPod($pod); - $expectedResponse->setPodNamespace($podNamespace); - $expectedResponse->setError($error); - $transport->addResponse($expectedResponse); - $request = new ExecuteAirflowCommandRequest(); - $response = $gapicClient->executeAirflowCommand($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.orchestration.airflow.service.v1.Environments/ExecuteAirflowCommand', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function executeAirflowCommandExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new ExecuteAirflowCommandRequest(); - try { - $gapicClient->executeAirflowCommand($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function fetchDatabasePropertiesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $primaryGceZone = 'primaryGceZone-1946545985'; - $secondaryGceZone = 'secondaryGceZone826699149'; - $isFailoverReplicaAvailable = true; - $expectedResponse = new FetchDatabasePropertiesResponse(); - $expectedResponse->setPrimaryGceZone($primaryGceZone); - $expectedResponse->setSecondaryGceZone($secondaryGceZone); - $expectedResponse->setIsFailoverReplicaAvailable($isFailoverReplicaAvailable); - $transport->addResponse($expectedResponse); - // Mock request - $formattedEnvironment = $gapicClient->environmentName('[PROJECT]', '[LOCATION]', '[ENVIRONMENT]'); - $request = (new FetchDatabasePropertiesRequest()) - ->setEnvironment($formattedEnvironment); - $response = $gapicClient->fetchDatabaseProperties($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.orchestration.airflow.service.v1.Environments/FetchDatabaseProperties', $actualFuncCall); - $actualValue = $actualRequestObject->getEnvironment(); - $this->assertProtobufEquals($formattedEnvironment, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function fetchDatabasePropertiesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedEnvironment = $gapicClient->environmentName('[PROJECT]', '[LOCATION]', '[ENVIRONMENT]'); - $request = (new FetchDatabasePropertiesRequest()) - ->setEnvironment($formattedEnvironment); - try { - $gapicClient->fetchDatabaseProperties($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getEnvironmentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $uuid = 'uuid3601339'; - $satisfiesPzs = false; - $satisfiesPzi = false; - $expectedResponse = new Environment(); - $expectedResponse->setName($name2); - $expectedResponse->setUuid($uuid); - $expectedResponse->setSatisfiesPzs($satisfiesPzs); - $expectedResponse->setSatisfiesPzi($satisfiesPzi); - $transport->addResponse($expectedResponse); - $request = new GetEnvironmentRequest(); - $response = $gapicClient->getEnvironment($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.orchestration.airflow.service.v1.Environments/GetEnvironment', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getEnvironmentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new GetEnvironmentRequest(); - try { - $gapicClient->getEnvironment($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getUserWorkloadsConfigMapTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new UserWorkloadsConfigMap(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->userWorkloadsConfigMapName('[PROJECT]', '[LOCATION]', '[ENVIRONMENT]', '[USER_WORKLOADS_CONFIG_MAP]'); - $request = (new GetUserWorkloadsConfigMapRequest()) - ->setName($formattedName); - $response = $gapicClient->getUserWorkloadsConfigMap($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.orchestration.airflow.service.v1.Environments/GetUserWorkloadsConfigMap', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getUserWorkloadsConfigMapExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->userWorkloadsConfigMapName('[PROJECT]', '[LOCATION]', '[ENVIRONMENT]', '[USER_WORKLOADS_CONFIG_MAP]'); - $request = (new GetUserWorkloadsConfigMapRequest()) - ->setName($formattedName); - try { - $gapicClient->getUserWorkloadsConfigMap($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getUserWorkloadsSecretTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new UserWorkloadsSecret(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->userWorkloadsSecretName('[PROJECT]', '[LOCATION]', '[ENVIRONMENT]', '[USER_WORKLOADS_SECRET]'); - $request = (new GetUserWorkloadsSecretRequest()) - ->setName($formattedName); - $response = $gapicClient->getUserWorkloadsSecret($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.orchestration.airflow.service.v1.Environments/GetUserWorkloadsSecret', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getUserWorkloadsSecretExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->userWorkloadsSecretName('[PROJECT]', '[LOCATION]', '[ENVIRONMENT]', '[USER_WORKLOADS_SECRET]'); - $request = (new GetUserWorkloadsSecretRequest()) - ->setName($formattedName); - try { - $gapicClient->getUserWorkloadsSecret($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listEnvironmentsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $environmentsElement = new Environment(); - $environments = [ - $environmentsElement, - ]; - $expectedResponse = new ListEnvironmentsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setEnvironments($environments); - $transport->addResponse($expectedResponse); - $request = new ListEnvironmentsRequest(); - $response = $gapicClient->listEnvironments($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getEnvironments()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.orchestration.airflow.service.v1.Environments/ListEnvironments', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listEnvironmentsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new ListEnvironmentsRequest(); - try { - $gapicClient->listEnvironments($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listUserWorkloadsConfigMapsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $userWorkloadsConfigMapsElement = new UserWorkloadsConfigMap(); - $userWorkloadsConfigMaps = [ - $userWorkloadsConfigMapsElement, - ]; - $expectedResponse = new ListUserWorkloadsConfigMapsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setUserWorkloadsConfigMaps($userWorkloadsConfigMaps); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->environmentName('[PROJECT]', '[LOCATION]', '[ENVIRONMENT]'); - $request = (new ListUserWorkloadsConfigMapsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listUserWorkloadsConfigMaps($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getUserWorkloadsConfigMaps()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.orchestration.airflow.service.v1.Environments/ListUserWorkloadsConfigMaps', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listUserWorkloadsConfigMapsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->environmentName('[PROJECT]', '[LOCATION]', '[ENVIRONMENT]'); - $request = (new ListUserWorkloadsConfigMapsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listUserWorkloadsConfigMaps($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listUserWorkloadsSecretsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $userWorkloadsSecretsElement = new UserWorkloadsSecret(); - $userWorkloadsSecrets = [ - $userWorkloadsSecretsElement, - ]; - $expectedResponse = new ListUserWorkloadsSecretsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setUserWorkloadsSecrets($userWorkloadsSecrets); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->environmentName('[PROJECT]', '[LOCATION]', '[ENVIRONMENT]'); - $request = (new ListUserWorkloadsSecretsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listUserWorkloadsSecrets($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getUserWorkloadsSecrets()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.orchestration.airflow.service.v1.Environments/ListUserWorkloadsSecrets', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listUserWorkloadsSecretsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->environmentName('[PROJECT]', '[LOCATION]', '[ENVIRONMENT]'); - $request = (new ListUserWorkloadsSecretsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listUserWorkloadsSecrets($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listWorkloadsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $workloadsElement = new ComposerWorkload(); - $workloads = [ - $workloadsElement, - ]; - $expectedResponse = new ListWorkloadsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setWorkloads($workloads); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->environmentName('[PROJECT]', '[LOCATION]', '[ENVIRONMENT]'); - $request = (new ListWorkloadsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listWorkloads($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getWorkloads()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.orchestration.airflow.service.v1.Environments/ListWorkloads', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listWorkloadsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->environmentName('[PROJECT]', '[LOCATION]', '[ENVIRONMENT]'); - $request = (new ListWorkloadsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listWorkloads($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function loadSnapshotTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/loadSnapshotTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new LoadSnapshotResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/loadSnapshotTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - $request = new LoadSnapshotRequest(); - $response = $gapicClient->loadSnapshot($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.orchestration.airflow.service.v1.Environments/LoadSnapshot', $actualApiFuncCall); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/loadSnapshotTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function loadSnapshotExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/loadSnapshotTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - $request = new LoadSnapshotRequest(); - $response = $gapicClient->loadSnapshot($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/loadSnapshotTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function pollAirflowCommandTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $outputEnd = false; - $expectedResponse = new PollAirflowCommandResponse(); - $expectedResponse->setOutputEnd($outputEnd); - $transport->addResponse($expectedResponse); - $request = new PollAirflowCommandRequest(); - $response = $gapicClient->pollAirflowCommand($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.orchestration.airflow.service.v1.Environments/PollAirflowCommand', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function pollAirflowCommandExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new PollAirflowCommandRequest(); - try { - $gapicClient->pollAirflowCommand($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function saveSnapshotTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/saveSnapshotTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $snapshotPath = 'snapshotPath1197949376'; - $expectedResponse = new SaveSnapshotResponse(); - $expectedResponse->setSnapshotPath($snapshotPath); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/saveSnapshotTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - $request = new SaveSnapshotRequest(); - $response = $gapicClient->saveSnapshot($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.orchestration.airflow.service.v1.Environments/SaveSnapshot', $actualApiFuncCall); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/saveSnapshotTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function saveSnapshotExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/saveSnapshotTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - $request = new SaveSnapshotRequest(); - $response = $gapicClient->saveSnapshot($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/saveSnapshotTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function stopAirflowCommandTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $isDone = false; - $expectedResponse = new StopAirflowCommandResponse(); - $expectedResponse->setIsDone($isDone); - $transport->addResponse($expectedResponse); - $request = new StopAirflowCommandRequest(); - $response = $gapicClient->stopAirflowCommand($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.orchestration.airflow.service.v1.Environments/StopAirflowCommand', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function stopAirflowCommandExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new StopAirflowCommandRequest(); - try { - $gapicClient->stopAirflowCommand($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateEnvironmentTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateEnvironmentTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $uuid = 'uuid3601339'; - $satisfiesPzs = false; - $satisfiesPzi = false; - $expectedResponse = new Environment(); - $expectedResponse->setName($name2); - $expectedResponse->setUuid($uuid); - $expectedResponse->setSatisfiesPzs($satisfiesPzs); - $expectedResponse->setSatisfiesPzi($satisfiesPzi); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateEnvironmentTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - $request = new UpdateEnvironmentRequest(); - $response = $gapicClient->updateEnvironment($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.orchestration.airflow.service.v1.Environments/UpdateEnvironment', $actualApiFuncCall); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateEnvironmentTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateEnvironmentExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateEnvironmentTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - $request = new UpdateEnvironmentRequest(); - $response = $gapicClient->updateEnvironment($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateEnvironmentTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateUserWorkloadsConfigMapTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $expectedResponse = new UserWorkloadsConfigMap(); - $expectedResponse->setName($name); - $transport->addResponse($expectedResponse); - $request = new UpdateUserWorkloadsConfigMapRequest(); - $response = $gapicClient->updateUserWorkloadsConfigMap($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.orchestration.airflow.service.v1.Environments/UpdateUserWorkloadsConfigMap', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateUserWorkloadsConfigMapExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new UpdateUserWorkloadsConfigMapRequest(); - try { - $gapicClient->updateUserWorkloadsConfigMap($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateUserWorkloadsSecretTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $expectedResponse = new UserWorkloadsSecret(); - $expectedResponse->setName($name); - $transport->addResponse($expectedResponse); - $request = new UpdateUserWorkloadsSecretRequest(); - $response = $gapicClient->updateUserWorkloadsSecret($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.orchestration.airflow.service.v1.Environments/UpdateUserWorkloadsSecret', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateUserWorkloadsSecretExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new UpdateUserWorkloadsSecretRequest(); - try { - $gapicClient->updateUserWorkloadsSecret($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function checkUpgradeAsyncTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/checkUpgradeTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $buildLogUri = 'buildLogUri2127590688'; - $pypiConflictBuildLogExtract = 'pypiConflictBuildLogExtract-575404123'; - $imageVersion2 = 'imageVersion2-1876344665'; - $expectedResponse = new CheckUpgradeResponse(); - $expectedResponse->setBuildLogUri($buildLogUri); - $expectedResponse->setPypiConflictBuildLogExtract($pypiConflictBuildLogExtract); - $expectedResponse->setImageVersion($imageVersion2); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/checkUpgradeTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $environment = 'environment-85904877'; - $request = (new CheckUpgradeRequest()) - ->setEnvironment($environment); - $response = $gapicClient->checkUpgradeAsync($request)->wait(); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.orchestration.airflow.service.v1.Environments/CheckUpgrade', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getEnvironment(); - $this->assertProtobufEquals($environment, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/checkUpgradeTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } -} diff --git a/owl-bot-staging/OrchestrationAirflow/v1/tests/Unit/V1/Client/ImageVersionsClientTest.php b/owl-bot-staging/OrchestrationAirflow/v1/tests/Unit/V1/Client/ImageVersionsClientTest.php deleted file mode 100644 index e1effad02bf3..000000000000 --- a/owl-bot-staging/OrchestrationAirflow/v1/tests/Unit/V1/Client/ImageVersionsClientTest.php +++ /dev/null @@ -1,159 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return ImageVersionsClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new ImageVersionsClient($options); - } - - /** @test */ - public function listImageVersionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $imageVersionsElement = new ImageVersion(); - $imageVersions = [ - $imageVersionsElement, - ]; - $expectedResponse = new ListImageVersionsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setImageVersions($imageVersions); - $transport->addResponse($expectedResponse); - $request = new ListImageVersionsRequest(); - $response = $gapicClient->listImageVersions($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getImageVersions()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.orchestration.airflow.service.v1.ImageVersions/ListImageVersions', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listImageVersionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new ListImageVersionsRequest(); - try { - $gapicClient->listImageVersions($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listImageVersionsAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $imageVersionsElement = new ImageVersion(); - $imageVersions = [ - $imageVersionsElement, - ]; - $expectedResponse = new ListImageVersionsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setImageVersions($imageVersions); - $transport->addResponse($expectedResponse); - $request = new ListImageVersionsRequest(); - $response = $gapicClient->listImageVersionsAsync($request)->wait(); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getImageVersions()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.orchestration.airflow.service.v1.ImageVersions/ListImageVersions', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/OrgPolicy/v2/proto/src/GPBMetadata/Google/Cloud/Orgpolicy/V2/Constraint.php b/owl-bot-staging/OrgPolicy/v2/proto/src/GPBMetadata/Google/Cloud/Orgpolicy/V2/Constraint.php deleted file mode 100644 index a350fd91db0526422a7db1d8c3e1f0224e835a00..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2426 zcmb7G&2HO95RNR{wMVWkGexU7{n;u3V)usv)U*ZYIt3-sicnb;WZFdv0R%;^WEM0@ zkV^xOp_l2g=N|e5J@nQ$=-DsOYllmTWGp*ybkTBW=9{1WW_Ex0(LeLy329T81_q-R z8C?=~Mu{JI%riZQjH2o@1MrwTpVq^xTjIhV3$u!veU*ISqZoq@>+%98qRi1~Z0jjxcP-2t##_Fg&gA z1DK8xhNPJy!4(kv`OyfykdPS+|DM{RZo4+K4aa_sxg3zO;e-^;7j?&xYckt&No=6H zCf(g531+PO)b}v=12T`PAD075G3>aE2Cm@@TQoES+h<zK%nvDm^jC22XkGzauzrd5{MUyQnt!?Hu)F)np3T8c%&Lnv7@QXsD?MZS3qLPmexqGKa+SY;VyoAvL-I};GI0CLM# zVlJq#<=7$9Gvvw&B9`jU?}yk$OtgI-b2u}odei>Gl;l)sjltvYOe_&!e+V|xfTs7ajDmK9>Vs5ziJn@Gw<_K zRpHa7+B?<;a;K;1E#*)?>1z5(@3^ltJBJ;mRem6>!;0MPsy~+t!Wt~Ml-{fIlJsZc zTK=N|Pcm91hlPv^MVyAU%$M*ba_LuUvaohFTTOFA4|mOUZcT-~vFBhWxSK5AqWUd5 zH(dKQ4mSj-UFARTHfwCdR_0J=mp-ljw+!WG6f*BT7xpd8ehi!QcHxF07Q8s8eHS*) zDLeD5nW%`O&H8t597>UoR}j_XSx{NS%~E}5p4WU(i0QD4r$Djl1LV?q3?CgS+Do;i zYp?ps4Tb@%HV2BVDM&F~pY&VtdMRGFl&*s7qELp7fpVmtDtdb$_q6h|umz;NO?&2v-0saRa diff --git a/owl-bot-staging/OrgPolicy/v2/proto/src/GPBMetadata/Google/Cloud/Orgpolicy/V2/Orgpolicy.php b/owl-bot-staging/OrgPolicy/v2/proto/src/GPBMetadata/Google/Cloud/Orgpolicy/V2/Orgpolicy.php deleted file mode 100644 index 79aba35bded0aa976957ab736f9ee2ddb0085ec3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7185 zcmb_hy>r~w5f6?M&3mNe=rN`!+8RR;6@EwtM~{(TpZ`$dP3goXcFmyLU%K zAbyf%~|G}ecpc;C;phZlz>v>&=7%j)^wGA)m`krIAj*Np^@*ka9MaZ@GN$6WG zqHb=ly+b0aZADgNlNo5NQv;1HX`u1Awt`U0vBFS|7tt|N;g8?jg+0_TvLg6r-VU3# zYe%-_*dG9rRkdR|Apz~YY^Ue8BHMFSs<7p@$l{X9ZBp5J-vi{Us&r|a1_J`oc;H4P za4n~CpM0(%5+49}r?j z(pSC>QDBs;x7#rT--1eAj5$LYw17T0(9+N)imz}{omI0QSF?Ulo4YKmSiTL#PT9lD zdhX@agAS!gb60Rg2neGF)eHm?#G~cGuC?N93)vTiENdoEl?I{t6c1$^iXU=M_91IR zLb@4CL^3r(U`E)FApQn{`15t`7h`CAn>96j37w-oY*tZ~#p>GF7xnY_4mub5q%~WC zrODb2of|0#pw4Z)3&MBtV`L%#9C!m!7FI09UL`-p4((ToEyal zzyck(J9}PYQOw^cU)DcT(922QIT}b@sKZHMh%n4U41YvgQD_{CUnho7BV-f0#A0=V zwT|bsNdPPSN0AJrnC03Z@D^qqr~g|ZukE1ef?(i_Xxy=&weRuFoGB^V-^LJ10*t3b zd|0mWT{PMA;kY7AN*j^wIhixbDLpQCN{%sn51kKs4hbR0W5ABvQa)c^DRzjT4?z*X zh^B3Kj|6tq>;&F^)3*XByjhy)348&plaNF#g%fj6E7E_ax`oCMET;#XQv{Q>)loOs z-;Dy>?LKBkzWX&iO-bu`hfVmK1z-XeF`8%-_lT`gBGa`?=sDtcJeUr+qp&oOs!-2u zIHWz7xjR|AB>kcFrqg~mw~D6Hd*T^%k?ly@%^1qqVimuDF2JUCvRr}iR@cVSxhJ;U z)_#I!-nPRiIWEG7jN2|7y(#S-|CWP2vY{be;&{y zwiJ0!h|3DOs=4TLZuiiKW=61yCX=p4^Fm2c)-qDNUq;Wn|V)jcH6Hu^^Yz5?VOG$DI|KzL1NdLZrbKy(k#*Eb0VcO;>` z*4Kq4uv6QX_7GhGTN^Of!VGvoc&&d`qfZqyy&e$g4E^@b9{<-NbF77mli~F6(PmT8 zeu}2wV=b!Rk;EMD14Ej_M%?k}Au4>ycf5Ew(wb=cK5$?GMpa&i6sPebw~VKAAz)t)R>68Gl$o&$9@}gK>yoEn#FvR*-J4 zHi`;Qo%U3DRu?Dd&p!L-uPTT5I(@-E=7;HOJPt0O7)jBDJM&mei^+K~Bejed(^BaX zFf{sQ@xK)`MRBo^z-foe#^$u3L~opeUK)lMR(57tfrk!BlpDwyaQ)!S|$ZM z7HKTt8)=ywXeo*Rp`dDf0^%~3#!?dN>78CXepY91G%TwU8-2w|(hcG#OBu!n+v?2Z!z*6F-|;Hv{MOhig{&cNjr`Bv8bU9 z$A77Se+e;2k2j?;NDGb-gFmu1$7U}E{v)N^(=L1n?Rv@W7X7ZB zzU}gNS7LYl-9J>WY_bb3eVtx#>9KMBaqVOItRZf{==Ik&J8Bwm|Mg|%C9Z0kOxHBy k$ENwXwmZ(+_ML_Ji~lWtr6Sb2|7XOe>F9^i~s-t diff --git a/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/AlternatePolicySpec.php b/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/AlternatePolicySpec.php deleted file mode 100644 index 4d3a507f2019..000000000000 --- a/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/AlternatePolicySpec.php +++ /dev/null @@ -1,120 +0,0 @@ -google.cloud.orgpolicy.v2.AlternatePolicySpec - */ -class AlternatePolicySpec extends \Google\Protobuf\Internal\Message -{ - /** - * Reference to the launch that will be used while audit logging and to - * control the launch. - * Should be set only in the alternate policy. - * - * Generated from protobuf field string launch = 1; - */ - protected $launch = ''; - /** - * Specify constraint for configurations of Google Cloud resources. - * - * Generated from protobuf field .google.cloud.orgpolicy.v2.PolicySpec spec = 2; - */ - protected $spec = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $launch - * Reference to the launch that will be used while audit logging and to - * control the launch. - * Should be set only in the alternate policy. - * @type \Google\Cloud\OrgPolicy\V2\PolicySpec $spec - * Specify constraint for configurations of Google Cloud resources. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orgpolicy\V2\Orgpolicy::initOnce(); - parent::__construct($data); - } - - /** - * Reference to the launch that will be used while audit logging and to - * control the launch. - * Should be set only in the alternate policy. - * - * Generated from protobuf field string launch = 1; - * @return string - */ - public function getLaunch() - { - return $this->launch; - } - - /** - * Reference to the launch that will be used while audit logging and to - * control the launch. - * Should be set only in the alternate policy. - * - * Generated from protobuf field string launch = 1; - * @param string $var - * @return $this - */ - public function setLaunch($var) - { - GPBUtil::checkString($var, True); - $this->launch = $var; - - return $this; - } - - /** - * Specify constraint for configurations of Google Cloud resources. - * - * Generated from protobuf field .google.cloud.orgpolicy.v2.PolicySpec spec = 2; - * @return \Google\Cloud\OrgPolicy\V2\PolicySpec|null - */ - public function getSpec() - { - return $this->spec; - } - - public function hasSpec() - { - return isset($this->spec); - } - - public function clearSpec() - { - unset($this->spec); - } - - /** - * Specify constraint for configurations of Google Cloud resources. - * - * Generated from protobuf field .google.cloud.orgpolicy.v2.PolicySpec spec = 2; - * @param \Google\Cloud\OrgPolicy\V2\PolicySpec $var - * @return $this - */ - public function setSpec($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OrgPolicy\V2\PolicySpec::class); - $this->spec = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/Constraint.php b/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/Constraint.php deleted file mode 100644 index 4b0d15284a17..000000000000 --- a/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/Constraint.php +++ /dev/null @@ -1,322 +0,0 @@ -google.cloud.orgpolicy.v2.Constraint - */ -class Constraint extends \Google\Protobuf\Internal\Message -{ - /** - * Immutable. The resource name of the constraint. Must be in one of - * the following forms: - * * `projects/{project_number}/constraints/{constraint_name}` - * * `folders/{folder_id}/constraints/{constraint_name}` - * * `organizations/{organization_id}/constraints/{constraint_name}` - * For example, "/projects/123/constraints/compute.disableSerialPortAccess". - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $name = ''; - /** - * The human readable name. - * Mutable. - * - * Generated from protobuf field string display_name = 2; - */ - protected $display_name = ''; - /** - * Detailed description of what this constraint controls as well as how and - * where it is enforced. - * Mutable. - * - * Generated from protobuf field string description = 3; - */ - protected $description = ''; - /** - * The evaluation behavior of this constraint in the absence of a policy. - * - * Generated from protobuf field .google.cloud.orgpolicy.v2.Constraint.ConstraintDefault constraint_default = 4; - */ - protected $constraint_default = 0; - /** - * Shows if dry run is supported for this constraint or not. - * - * Generated from protobuf field bool supports_dry_run = 7; - */ - protected $supports_dry_run = false; - protected $constraint_type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Immutable. The resource name of the constraint. Must be in one of - * the following forms: - * * `projects/{project_number}/constraints/{constraint_name}` - * * `folders/{folder_id}/constraints/{constraint_name}` - * * `organizations/{organization_id}/constraints/{constraint_name}` - * For example, "/projects/123/constraints/compute.disableSerialPortAccess". - * @type string $display_name - * The human readable name. - * Mutable. - * @type string $description - * Detailed description of what this constraint controls as well as how and - * where it is enforced. - * Mutable. - * @type int $constraint_default - * The evaluation behavior of this constraint in the absence of a policy. - * @type \Google\Cloud\OrgPolicy\V2\Constraint\ListConstraint $list_constraint - * Defines this constraint as being a ListConstraint. - * @type \Google\Cloud\OrgPolicy\V2\Constraint\BooleanConstraint $boolean_constraint - * Defines this constraint as being a BooleanConstraint. - * @type bool $supports_dry_run - * Shows if dry run is supported for this constraint or not. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orgpolicy\V2\Constraint::initOnce(); - parent::__construct($data); - } - - /** - * Immutable. The resource name of the constraint. Must be in one of - * the following forms: - * * `projects/{project_number}/constraints/{constraint_name}` - * * `folders/{folder_id}/constraints/{constraint_name}` - * * `organizations/{organization_id}/constraints/{constraint_name}` - * For example, "/projects/123/constraints/compute.disableSerialPortAccess". - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Immutable. The resource name of the constraint. Must be in one of - * the following forms: - * * `projects/{project_number}/constraints/{constraint_name}` - * * `folders/{folder_id}/constraints/{constraint_name}` - * * `organizations/{organization_id}/constraints/{constraint_name}` - * For example, "/projects/123/constraints/compute.disableSerialPortAccess". - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The human readable name. - * Mutable. - * - * Generated from protobuf field string display_name = 2; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * The human readable name. - * Mutable. - * - * Generated from protobuf field string display_name = 2; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Detailed description of what this constraint controls as well as how and - * where it is enforced. - * Mutable. - * - * Generated from protobuf field string description = 3; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Detailed description of what this constraint controls as well as how and - * where it is enforced. - * Mutable. - * - * Generated from protobuf field string description = 3; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * The evaluation behavior of this constraint in the absence of a policy. - * - * Generated from protobuf field .google.cloud.orgpolicy.v2.Constraint.ConstraintDefault constraint_default = 4; - * @return int - */ - public function getConstraintDefault() - { - return $this->constraint_default; - } - - /** - * The evaluation behavior of this constraint in the absence of a policy. - * - * Generated from protobuf field .google.cloud.orgpolicy.v2.Constraint.ConstraintDefault constraint_default = 4; - * @param int $var - * @return $this - */ - public function setConstraintDefault($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\OrgPolicy\V2\Constraint\ConstraintDefault::class); - $this->constraint_default = $var; - - return $this; - } - - /** - * Defines this constraint as being a ListConstraint. - * - * Generated from protobuf field .google.cloud.orgpolicy.v2.Constraint.ListConstraint list_constraint = 5; - * @return \Google\Cloud\OrgPolicy\V2\Constraint\ListConstraint|null - */ - public function getListConstraint() - { - return $this->readOneof(5); - } - - public function hasListConstraint() - { - return $this->hasOneof(5); - } - - /** - * Defines this constraint as being a ListConstraint. - * - * Generated from protobuf field .google.cloud.orgpolicy.v2.Constraint.ListConstraint list_constraint = 5; - * @param \Google\Cloud\OrgPolicy\V2\Constraint\ListConstraint $var - * @return $this - */ - public function setListConstraint($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OrgPolicy\V2\Constraint\ListConstraint::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * Defines this constraint as being a BooleanConstraint. - * - * Generated from protobuf field .google.cloud.orgpolicy.v2.Constraint.BooleanConstraint boolean_constraint = 6; - * @return \Google\Cloud\OrgPolicy\V2\Constraint\BooleanConstraint|null - */ - public function getBooleanConstraint() - { - return $this->readOneof(6); - } - - public function hasBooleanConstraint() - { - return $this->hasOneof(6); - } - - /** - * Defines this constraint as being a BooleanConstraint. - * - * Generated from protobuf field .google.cloud.orgpolicy.v2.Constraint.BooleanConstraint boolean_constraint = 6; - * @param \Google\Cloud\OrgPolicy\V2\Constraint\BooleanConstraint $var - * @return $this - */ - public function setBooleanConstraint($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OrgPolicy\V2\Constraint\BooleanConstraint::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * Shows if dry run is supported for this constraint or not. - * - * Generated from protobuf field bool supports_dry_run = 7; - * @return bool - */ - public function getSupportsDryRun() - { - return $this->supports_dry_run; - } - - /** - * Shows if dry run is supported for this constraint or not. - * - * Generated from protobuf field bool supports_dry_run = 7; - * @param bool $var - * @return $this - */ - public function setSupportsDryRun($var) - { - GPBUtil::checkBool($var); - $this->supports_dry_run = $var; - - return $this; - } - - /** - * @return string - */ - public function getConstraintType() - { - return $this->whichOneof("constraint_type"); - } - -} - diff --git a/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/Constraint/BooleanConstraint.php b/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/Constraint/BooleanConstraint.php deleted file mode 100644 index 0302a06ca9cf..000000000000 --- a/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/Constraint/BooleanConstraint.php +++ /dev/null @@ -1,39 +0,0 @@ -google.cloud.orgpolicy.v2.Constraint.BooleanConstraint - */ -class BooleanConstraint extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orgpolicy\V2\Constraint::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(BooleanConstraint::class, \Google\Cloud\OrgPolicy\V2\Constraint_BooleanConstraint::class); - diff --git a/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/Constraint/ConstraintDefault.php b/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/Constraint/ConstraintDefault.php deleted file mode 100644 index b7eaebc4f0ca..000000000000 --- a/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/Constraint/ConstraintDefault.php +++ /dev/null @@ -1,69 +0,0 @@ -google.cloud.orgpolicy.v2.Constraint.ConstraintDefault - */ -class ConstraintDefault -{ - /** - * This is only used for distinguishing unset values and should never be - * used. - * - * Generated from protobuf enum CONSTRAINT_DEFAULT_UNSPECIFIED = 0; - */ - const CONSTRAINT_DEFAULT_UNSPECIFIED = 0; - /** - * Indicate that all values are allowed for list constraints. - * Indicate that enforcement is off for boolean constraints. - * - * Generated from protobuf enum ALLOW = 1; - */ - const ALLOW = 1; - /** - * Indicate that all values are denied for list constraints. - * Indicate that enforcement is on for boolean constraints. - * - * Generated from protobuf enum DENY = 2; - */ - const DENY = 2; - - private static $valueToName = [ - self::CONSTRAINT_DEFAULT_UNSPECIFIED => 'CONSTRAINT_DEFAULT_UNSPECIFIED', - self::ALLOW => 'ALLOW', - self::DENY => 'DENY', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ConstraintDefault::class, \Google\Cloud\OrgPolicy\V2\Constraint_ConstraintDefault::class); - diff --git a/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/Constraint/ListConstraint.php b/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/Constraint/ListConstraint.php deleted file mode 100644 index c37b41858aed..000000000000 --- a/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/Constraint/ListConstraint.php +++ /dev/null @@ -1,125 +0,0 @@ -google.cloud.orgpolicy.v2.Constraint.ListConstraint - */ -class ListConstraint extends \Google\Protobuf\Internal\Message -{ - /** - * Indicates whether values grouped into categories can be used in - * `Policy.allowed_values` and `Policy.denied_values`. For example, - * `"in:Python"` would match any value in the 'Python' group. - * - * Generated from protobuf field bool supports_in = 1; - */ - protected $supports_in = false; - /** - * Indicates whether subtrees of the Resource Manager resource hierarchy - * can be used in `Policy.allowed_values` and `Policy.denied_values`. For - * example, `"under:folders/123"` would match any resource under the - * 'folders/123' folder. - * - * Generated from protobuf field bool supports_under = 2; - */ - protected $supports_under = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $supports_in - * Indicates whether values grouped into categories can be used in - * `Policy.allowed_values` and `Policy.denied_values`. For example, - * `"in:Python"` would match any value in the 'Python' group. - * @type bool $supports_under - * Indicates whether subtrees of the Resource Manager resource hierarchy - * can be used in `Policy.allowed_values` and `Policy.denied_values`. For - * example, `"under:folders/123"` would match any resource under the - * 'folders/123' folder. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orgpolicy\V2\Constraint::initOnce(); - parent::__construct($data); - } - - /** - * Indicates whether values grouped into categories can be used in - * `Policy.allowed_values` and `Policy.denied_values`. For example, - * `"in:Python"` would match any value in the 'Python' group. - * - * Generated from protobuf field bool supports_in = 1; - * @return bool - */ - public function getSupportsIn() - { - return $this->supports_in; - } - - /** - * Indicates whether values grouped into categories can be used in - * `Policy.allowed_values` and `Policy.denied_values`. For example, - * `"in:Python"` would match any value in the 'Python' group. - * - * Generated from protobuf field bool supports_in = 1; - * @param bool $var - * @return $this - */ - public function setSupportsIn($var) - { - GPBUtil::checkBool($var); - $this->supports_in = $var; - - return $this; - } - - /** - * Indicates whether subtrees of the Resource Manager resource hierarchy - * can be used in `Policy.allowed_values` and `Policy.denied_values`. For - * example, `"under:folders/123"` would match any resource under the - * 'folders/123' folder. - * - * Generated from protobuf field bool supports_under = 2; - * @return bool - */ - public function getSupportsUnder() - { - return $this->supports_under; - } - - /** - * Indicates whether subtrees of the Resource Manager resource hierarchy - * can be used in `Policy.allowed_values` and `Policy.denied_values`. For - * example, `"under:folders/123"` would match any resource under the - * 'folders/123' folder. - * - * Generated from protobuf field bool supports_under = 2; - * @param bool $var - * @return $this - */ - public function setSupportsUnder($var) - { - GPBUtil::checkBool($var); - $this->supports_under = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ListConstraint::class, \Google\Cloud\OrgPolicy\V2\Constraint_ListConstraint::class); - diff --git a/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/CreateCustomConstraintRequest.php b/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/CreateCustomConstraintRequest.php deleted file mode 100644 index 4a0a404d1671..000000000000 --- a/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/CreateCustomConstraintRequest.php +++ /dev/null @@ -1,134 +0,0 @@ -google.cloud.orgpolicy.v2.CreateCustomConstraintRequest - */ -class CreateCustomConstraintRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Must be in the following form: - * * `organizations/{organization_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Custom constraint to create. - * - * Generated from protobuf field .google.cloud.orgpolicy.v2.CustomConstraint custom_constraint = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $custom_constraint = null; - - /** - * @param string $parent Required. Must be in the following form: - * - * * `organizations/{organization_id}` - * Please see {@see OrgPolicyClient::organizationName()} for help formatting this field. - * @param \Google\Cloud\OrgPolicy\V2\CustomConstraint $customConstraint Required. Custom constraint to create. - * - * @return \Google\Cloud\OrgPolicy\V2\CreateCustomConstraintRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\OrgPolicy\V2\CustomConstraint $customConstraint): self - { - return (new self()) - ->setParent($parent) - ->setCustomConstraint($customConstraint); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Must be in the following form: - * * `organizations/{organization_id}` - * @type \Google\Cloud\OrgPolicy\V2\CustomConstraint $custom_constraint - * Required. Custom constraint to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orgpolicy\V2\Orgpolicy::initOnce(); - parent::__construct($data); - } - - /** - * Required. Must be in the following form: - * * `organizations/{organization_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Must be in the following form: - * * `organizations/{organization_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. Custom constraint to create. - * - * Generated from protobuf field .google.cloud.orgpolicy.v2.CustomConstraint custom_constraint = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\OrgPolicy\V2\CustomConstraint|null - */ - public function getCustomConstraint() - { - return $this->custom_constraint; - } - - public function hasCustomConstraint() - { - return isset($this->custom_constraint); - } - - public function clearCustomConstraint() - { - unset($this->custom_constraint); - } - - /** - * Required. Custom constraint to create. - * - * Generated from protobuf field .google.cloud.orgpolicy.v2.CustomConstraint custom_constraint = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\OrgPolicy\V2\CustomConstraint $var - * @return $this - */ - public function setCustomConstraint($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OrgPolicy\V2\CustomConstraint::class); - $this->custom_constraint = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/CreatePolicyRequest.php b/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/CreatePolicyRequest.php deleted file mode 100644 index adbbed633510..000000000000 --- a/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/CreatePolicyRequest.php +++ /dev/null @@ -1,154 +0,0 @@ -google.cloud.orgpolicy.v2.CreatePolicyRequest - */ -class CreatePolicyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The Google Cloud resource that will parent the new policy. Must - * be in one of the following forms: - * * `projects/{project_number}` - * * `projects/{project_id}` - * * `folders/{folder_id}` - * * `organizations/{organization_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Policy to create. - * - * Generated from protobuf field .google.cloud.orgpolicy.v2.Policy policy = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $policy = null; - - /** - * @param string $parent Required. The Google Cloud resource that will parent the new policy. Must - * be in one of the following forms: - * - * * `projects/{project_number}` - * * `projects/{project_id}` - * * `folders/{folder_id}` - * * `organizations/{organization_id}` - * Please see {@see OrgPolicyClient::projectName()} for help formatting this field. - * @param \Google\Cloud\OrgPolicy\V2\Policy $policy Required. Policy to create. - * - * @return \Google\Cloud\OrgPolicy\V2\CreatePolicyRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\OrgPolicy\V2\Policy $policy): self - { - return (new self()) - ->setParent($parent) - ->setPolicy($policy); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The Google Cloud resource that will parent the new policy. Must - * be in one of the following forms: - * * `projects/{project_number}` - * * `projects/{project_id}` - * * `folders/{folder_id}` - * * `organizations/{organization_id}` - * @type \Google\Cloud\OrgPolicy\V2\Policy $policy - * Required. Policy to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orgpolicy\V2\Orgpolicy::initOnce(); - parent::__construct($data); - } - - /** - * Required. The Google Cloud resource that will parent the new policy. Must - * be in one of the following forms: - * * `projects/{project_number}` - * * `projects/{project_id}` - * * `folders/{folder_id}` - * * `organizations/{organization_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The Google Cloud resource that will parent the new policy. Must - * be in one of the following forms: - * * `projects/{project_number}` - * * `projects/{project_id}` - * * `folders/{folder_id}` - * * `organizations/{organization_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. Policy to create. - * - * Generated from protobuf field .google.cloud.orgpolicy.v2.Policy policy = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\OrgPolicy\V2\Policy|null - */ - public function getPolicy() - { - return $this->policy; - } - - public function hasPolicy() - { - return isset($this->policy); - } - - public function clearPolicy() - { - unset($this->policy); - } - - /** - * Required. Policy to create. - * - * Generated from protobuf field .google.cloud.orgpolicy.v2.Policy policy = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\OrgPolicy\V2\Policy $var - * @return $this - */ - public function setPolicy($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OrgPolicy\V2\Policy::class); - $this->policy = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/CustomConstraint.php b/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/CustomConstraint.php deleted file mode 100644 index db6db0d97896..000000000000 --- a/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/CustomConstraint.php +++ /dev/null @@ -1,375 +0,0 @@ -google.cloud.orgpolicy.v2.CustomConstraint - */ -class CustomConstraint extends \Google\Protobuf\Internal\Message -{ - /** - * Immutable. Name of the constraint. This is unique within the organization. - * Format of the name should be - * * `organizations/{organization_id}/customConstraints/{custom_constraint_id}` - * Example: `organizations/123/customConstraints/custom.createOnlyE2TypeVms` - * The max length is 70 characters and the minimum length is 1. Note that the - * prefix `organizations/{organization_id}/customConstraints/` is not counted. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $name = ''; - /** - * Immutable. The resource instance type on which this policy applies. Format - * will be of the form : `/` Example: - * * `compute.googleapis.com/Instance`. - * - * Generated from protobuf field repeated string resource_types = 2 [(.google.api.field_behavior) = IMMUTABLE]; - */ - private $resource_types; - /** - * All the operations being applied for this constraint. - * - * Generated from protobuf field repeated .google.cloud.orgpolicy.v2.CustomConstraint.MethodType method_types = 3; - */ - private $method_types; - /** - * Org policy condition/expression. For example: - * `resource.instanceName.matches("[production|test]_.*_(\d)+")` or, - * `resource.management.auto_upgrade == true` - * The max length of the condition is 1000 characters. - * - * Generated from protobuf field string condition = 4; - */ - protected $condition = ''; - /** - * Allow or deny type. - * - * Generated from protobuf field .google.cloud.orgpolicy.v2.CustomConstraint.ActionType action_type = 5; - */ - protected $action_type = 0; - /** - * One line display name for the UI. - * The max length of the display_name is 200 characters. - * - * Generated from protobuf field string display_name = 6; - */ - protected $display_name = ''; - /** - * Detailed information about this custom policy constraint. - * The max length of the description is 2000 characters. - * - * Generated from protobuf field string description = 7; - */ - protected $description = ''; - /** - * Output only. The last time this custom constraint was updated. This - * represents the last time that the `CreateCustomConstraint` or - * `UpdateCustomConstraint` RPC was called - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Immutable. Name of the constraint. This is unique within the organization. - * Format of the name should be - * * `organizations/{organization_id}/customConstraints/{custom_constraint_id}` - * Example: `organizations/123/customConstraints/custom.createOnlyE2TypeVms` - * The max length is 70 characters and the minimum length is 1. Note that the - * prefix `organizations/{organization_id}/customConstraints/` is not counted. - * @type array|\Google\Protobuf\Internal\RepeatedField $resource_types - * Immutable. The resource instance type on which this policy applies. Format - * will be of the form : `/` Example: - * * `compute.googleapis.com/Instance`. - * @type array|\Google\Protobuf\Internal\RepeatedField $method_types - * All the operations being applied for this constraint. - * @type string $condition - * Org policy condition/expression. For example: - * `resource.instanceName.matches("[production|test]_.*_(\d)+")` or, - * `resource.management.auto_upgrade == true` - * The max length of the condition is 1000 characters. - * @type int $action_type - * Allow or deny type. - * @type string $display_name - * One line display name for the UI. - * The max length of the display_name is 200 characters. - * @type string $description - * Detailed information about this custom policy constraint. - * The max length of the description is 2000 characters. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The last time this custom constraint was updated. This - * represents the last time that the `CreateCustomConstraint` or - * `UpdateCustomConstraint` RPC was called - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orgpolicy\V2\Constraint::initOnce(); - parent::__construct($data); - } - - /** - * Immutable. Name of the constraint. This is unique within the organization. - * Format of the name should be - * * `organizations/{organization_id}/customConstraints/{custom_constraint_id}` - * Example: `organizations/123/customConstraints/custom.createOnlyE2TypeVms` - * The max length is 70 characters and the minimum length is 1. Note that the - * prefix `organizations/{organization_id}/customConstraints/` is not counted. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Immutable. Name of the constraint. This is unique within the organization. - * Format of the name should be - * * `organizations/{organization_id}/customConstraints/{custom_constraint_id}` - * Example: `organizations/123/customConstraints/custom.createOnlyE2TypeVms` - * The max length is 70 characters and the minimum length is 1. Note that the - * prefix `organizations/{organization_id}/customConstraints/` is not counted. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Immutable. The resource instance type on which this policy applies. Format - * will be of the form : `/` Example: - * * `compute.googleapis.com/Instance`. - * - * Generated from protobuf field repeated string resource_types = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getResourceTypes() - { - return $this->resource_types; - } - - /** - * Immutable. The resource instance type on which this policy applies. Format - * will be of the form : `/` Example: - * * `compute.googleapis.com/Instance`. - * - * Generated from protobuf field repeated string resource_types = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setResourceTypes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->resource_types = $arr; - - return $this; - } - - /** - * All the operations being applied for this constraint. - * - * Generated from protobuf field repeated .google.cloud.orgpolicy.v2.CustomConstraint.MethodType method_types = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMethodTypes() - { - return $this->method_types; - } - - /** - * All the operations being applied for this constraint. - * - * Generated from protobuf field repeated .google.cloud.orgpolicy.v2.CustomConstraint.MethodType method_types = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMethodTypes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\OrgPolicy\V2\CustomConstraint\MethodType::class); - $this->method_types = $arr; - - return $this; - } - - /** - * Org policy condition/expression. For example: - * `resource.instanceName.matches("[production|test]_.*_(\d)+")` or, - * `resource.management.auto_upgrade == true` - * The max length of the condition is 1000 characters. - * - * Generated from protobuf field string condition = 4; - * @return string - */ - public function getCondition() - { - return $this->condition; - } - - /** - * Org policy condition/expression. For example: - * `resource.instanceName.matches("[production|test]_.*_(\d)+")` or, - * `resource.management.auto_upgrade == true` - * The max length of the condition is 1000 characters. - * - * Generated from protobuf field string condition = 4; - * @param string $var - * @return $this - */ - public function setCondition($var) - { - GPBUtil::checkString($var, True); - $this->condition = $var; - - return $this; - } - - /** - * Allow or deny type. - * - * Generated from protobuf field .google.cloud.orgpolicy.v2.CustomConstraint.ActionType action_type = 5; - * @return int - */ - public function getActionType() - { - return $this->action_type; - } - - /** - * Allow or deny type. - * - * Generated from protobuf field .google.cloud.orgpolicy.v2.CustomConstraint.ActionType action_type = 5; - * @param int $var - * @return $this - */ - public function setActionType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\OrgPolicy\V2\CustomConstraint\ActionType::class); - $this->action_type = $var; - - return $this; - } - - /** - * One line display name for the UI. - * The max length of the display_name is 200 characters. - * - * Generated from protobuf field string display_name = 6; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * One line display name for the UI. - * The max length of the display_name is 200 characters. - * - * Generated from protobuf field string display_name = 6; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Detailed information about this custom policy constraint. - * The max length of the description is 2000 characters. - * - * Generated from protobuf field string description = 7; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Detailed information about this custom policy constraint. - * The max length of the description is 2000 characters. - * - * Generated from protobuf field string description = 7; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Output only. The last time this custom constraint was updated. This - * represents the last time that the `CreateCustomConstraint` or - * `UpdateCustomConstraint` RPC was called - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The last time this custom constraint was updated. This - * represents the last time that the `CreateCustomConstraint` or - * `UpdateCustomConstraint` RPC was called - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/CustomConstraint/ActionType.php b/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/CustomConstraint/ActionType.php deleted file mode 100644 index b86b75e0c8ae..000000000000 --- a/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/CustomConstraint/ActionType.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.orgpolicy.v2.CustomConstraint.ActionType - */ -class ActionType -{ - /** - * Unspecified. Results in an error. - * - * Generated from protobuf enum ACTION_TYPE_UNSPECIFIED = 0; - */ - const ACTION_TYPE_UNSPECIFIED = 0; - /** - * Allowed action type. - * - * Generated from protobuf enum ALLOW = 1; - */ - const ALLOW = 1; - /** - * Deny action type. - * - * Generated from protobuf enum DENY = 2; - */ - const DENY = 2; - - private static $valueToName = [ - self::ACTION_TYPE_UNSPECIFIED => 'ACTION_TYPE_UNSPECIFIED', - self::ALLOW => 'ALLOW', - self::DENY => 'DENY', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ActionType::class, \Google\Cloud\OrgPolicy\V2\CustomConstraint_ActionType::class); - diff --git a/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/CustomConstraint/MethodType.php b/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/CustomConstraint/MethodType.php deleted file mode 100644 index d1077ce64749..000000000000 --- a/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/CustomConstraint/MethodType.php +++ /dev/null @@ -1,91 +0,0 @@ -google.cloud.orgpolicy.v2.CustomConstraint.MethodType - */ -class MethodType -{ - /** - * Unspecified. Results in an error. - * - * Generated from protobuf enum METHOD_TYPE_UNSPECIFIED = 0; - */ - const METHOD_TYPE_UNSPECIFIED = 0; - /** - * Constraint applied when creating the resource. - * - * Generated from protobuf enum CREATE = 1; - */ - const CREATE = 1; - /** - * Constraint applied when updating the resource. - * - * Generated from protobuf enum UPDATE = 2; - */ - const UPDATE = 2; - /** - * Constraint applied when deleting the resource. - * Not supported yet. - * - * Generated from protobuf enum DELETE = 3; - */ - const DELETE = 3; - /** - * Constraint applied when removing an IAM grant. - * - * Generated from protobuf enum REMOVE_GRANT = 4; - */ - const REMOVE_GRANT = 4; - /** - * Constraint applied when enforcing forced tagging. - * - * Generated from protobuf enum GOVERN_TAGS = 5; - */ - const GOVERN_TAGS = 5; - - private static $valueToName = [ - self::METHOD_TYPE_UNSPECIFIED => 'METHOD_TYPE_UNSPECIFIED', - self::CREATE => 'CREATE', - self::UPDATE => 'UPDATE', - self::DELETE => 'DELETE', - self::REMOVE_GRANT => 'REMOVE_GRANT', - self::GOVERN_TAGS => 'GOVERN_TAGS', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(MethodType::class, \Google\Cloud\OrgPolicy\V2\CustomConstraint_MethodType::class); - diff --git a/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/DeleteCustomConstraintRequest.php b/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/DeleteCustomConstraintRequest.php deleted file mode 100644 index 76d93c9521c7..000000000000 --- a/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/DeleteCustomConstraintRequest.php +++ /dev/null @@ -1,87 +0,0 @@ -google.cloud.orgpolicy.v2.DeleteCustomConstraintRequest - */ -class DeleteCustomConstraintRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the custom constraint to delete. - * See the custom constraint entry for naming rules. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Name of the custom constraint to delete. - * See the custom constraint entry for naming rules. Please see - * {@see OrgPolicyClient::customConstraintName()} for help formatting this field. - * - * @return \Google\Cloud\OrgPolicy\V2\DeleteCustomConstraintRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the custom constraint to delete. - * See the custom constraint entry for naming rules. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orgpolicy\V2\Orgpolicy::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the custom constraint to delete. - * See the custom constraint entry for naming rules. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the custom constraint to delete. - * See the custom constraint entry for naming rules. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/DeletePolicyRequest.php b/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/DeletePolicyRequest.php deleted file mode 100644 index 05b6ac45c430..000000000000 --- a/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/DeletePolicyRequest.php +++ /dev/null @@ -1,129 +0,0 @@ -google.cloud.orgpolicy.v2.DeletePolicyRequest - */ -class DeletePolicyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the policy to delete. - * See the policy entry for naming rules. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. The current etag of policy. If an etag is provided and does not - * match the current etag of the policy, deletion will be blocked and an - * ABORTED error will be returned. - * - * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $etag = ''; - - /** - * @param string $name Required. Name of the policy to delete. - * See the policy entry for naming rules. Please see - * {@see OrgPolicyClient::policyName()} for help formatting this field. - * - * @return \Google\Cloud\OrgPolicy\V2\DeletePolicyRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the policy to delete. - * See the policy entry for naming rules. - * @type string $etag - * Optional. The current etag of policy. If an etag is provided and does not - * match the current etag of the policy, deletion will be blocked and an - * ABORTED error will be returned. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orgpolicy\V2\Orgpolicy::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the policy to delete. - * See the policy entry for naming rules. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the policy to delete. - * See the policy entry for naming rules. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. The current etag of policy. If an etag is provided and does not - * match the current etag of the policy, deletion will be blocked and an - * ABORTED error will be returned. - * - * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * Optional. The current etag of policy. If an etag is provided and does not - * match the current etag of the policy, deletion will be blocked and an - * ABORTED error will be returned. - * - * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/GetCustomConstraintRequest.php b/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/GetCustomConstraintRequest.php deleted file mode 100644 index f169a5d51f9c..000000000000 --- a/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/GetCustomConstraintRequest.php +++ /dev/null @@ -1,87 +0,0 @@ -google.cloud.orgpolicy.v2.GetCustomConstraintRequest - */ -class GetCustomConstraintRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource name of the custom constraint. See the custom constraint - * entry for naming requirements. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Resource name of the custom constraint. See the custom constraint - * entry for naming requirements. Please see - * {@see OrgPolicyClient::customConstraintName()} for help formatting this field. - * - * @return \Google\Cloud\OrgPolicy\V2\GetCustomConstraintRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Resource name of the custom constraint. See the custom constraint - * entry for naming requirements. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orgpolicy\V2\Orgpolicy::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource name of the custom constraint. See the custom constraint - * entry for naming requirements. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Resource name of the custom constraint. See the custom constraint - * entry for naming requirements. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/GetEffectivePolicyRequest.php b/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/GetEffectivePolicyRequest.php deleted file mode 100644 index 338899f8a5e9..000000000000 --- a/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/GetEffectivePolicyRequest.php +++ /dev/null @@ -1,87 +0,0 @@ -google.cloud.orgpolicy.v2.GetEffectivePolicyRequest - */ -class GetEffectivePolicyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The effective policy to compute. See - * [Policy][google.cloud.orgpolicy.v2.Policy] for naming requirements. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The effective policy to compute. See - * [Policy][google.cloud.orgpolicy.v2.Policy] for naming requirements. Please see - * {@see OrgPolicyClient::policyName()} for help formatting this field. - * - * @return \Google\Cloud\OrgPolicy\V2\GetEffectivePolicyRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The effective policy to compute. See - * [Policy][google.cloud.orgpolicy.v2.Policy] for naming requirements. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orgpolicy\V2\Orgpolicy::initOnce(); - parent::__construct($data); - } - - /** - * Required. The effective policy to compute. See - * [Policy][google.cloud.orgpolicy.v2.Policy] for naming requirements. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The effective policy to compute. See - * [Policy][google.cloud.orgpolicy.v2.Policy] for naming requirements. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/GetPolicyRequest.php b/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/GetPolicyRequest.php deleted file mode 100644 index f48f61f6804a..000000000000 --- a/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/GetPolicyRequest.php +++ /dev/null @@ -1,87 +0,0 @@ -google.cloud.orgpolicy.v2.GetPolicyRequest - */ -class GetPolicyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource name of the policy. See - * [Policy][google.cloud.orgpolicy.v2.Policy] for naming requirements. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Resource name of the policy. See - * [Policy][google.cloud.orgpolicy.v2.Policy] for naming requirements. Please see - * {@see OrgPolicyClient::policyName()} for help formatting this field. - * - * @return \Google\Cloud\OrgPolicy\V2\GetPolicyRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Resource name of the policy. See - * [Policy][google.cloud.orgpolicy.v2.Policy] for naming requirements. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orgpolicy\V2\Orgpolicy::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource name of the policy. See - * [Policy][google.cloud.orgpolicy.v2.Policy] for naming requirements. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Resource name of the policy. See - * [Policy][google.cloud.orgpolicy.v2.Policy] for naming requirements. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/ListConstraintsRequest.php b/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/ListConstraintsRequest.php deleted file mode 100644 index f0f09385397f..000000000000 --- a/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/ListConstraintsRequest.php +++ /dev/null @@ -1,188 +0,0 @@ -google.cloud.orgpolicy.v2.ListConstraintsRequest - */ -class ListConstraintsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The Google Cloud resource that parents the constraint. Must be in - * one of the following forms: - * * `projects/{project_number}` - * * `projects/{project_id}` - * * `folders/{folder_id}` - * * `organizations/{organization_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Size of the pages to be returned. This is currently unsupported and will - * be ignored. The server may at any point start using this field to limit - * page size. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * Page token used to retrieve the next page. This is currently unsupported - * and will be ignored. The server may at any point start using this field. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The Google Cloud resource that parents the constraint. Must be in - * one of the following forms: - * - * * `projects/{project_number}` - * * `projects/{project_id}` - * * `folders/{folder_id}` - * * `organizations/{organization_id}` - * Please see {@see OrgPolicyClient::projectName()} for help formatting this field. - * - * @return \Google\Cloud\OrgPolicy\V2\ListConstraintsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The Google Cloud resource that parents the constraint. Must be in - * one of the following forms: - * * `projects/{project_number}` - * * `projects/{project_id}` - * * `folders/{folder_id}` - * * `organizations/{organization_id}` - * @type int $page_size - * Size of the pages to be returned. This is currently unsupported and will - * be ignored. The server may at any point start using this field to limit - * page size. - * @type string $page_token - * Page token used to retrieve the next page. This is currently unsupported - * and will be ignored. The server may at any point start using this field. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orgpolicy\V2\Orgpolicy::initOnce(); - parent::__construct($data); - } - - /** - * Required. The Google Cloud resource that parents the constraint. Must be in - * one of the following forms: - * * `projects/{project_number}` - * * `projects/{project_id}` - * * `folders/{folder_id}` - * * `organizations/{organization_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The Google Cloud resource that parents the constraint. Must be in - * one of the following forms: - * * `projects/{project_number}` - * * `projects/{project_id}` - * * `folders/{folder_id}` - * * `organizations/{organization_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Size of the pages to be returned. This is currently unsupported and will - * be ignored. The server may at any point start using this field to limit - * page size. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Size of the pages to be returned. This is currently unsupported and will - * be ignored. The server may at any point start using this field to limit - * page size. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Page token used to retrieve the next page. This is currently unsupported - * and will be ignored. The server may at any point start using this field. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Page token used to retrieve the next page. This is currently unsupported - * and will be ignored. The server may at any point start using this field. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/ListConstraintsResponse.php b/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/ListConstraintsResponse.php deleted file mode 100644 index 26bd82b66fd3..000000000000 --- a/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/ListConstraintsResponse.php +++ /dev/null @@ -1,102 +0,0 @@ -google.cloud.orgpolicy.v2.ListConstraintsResponse - */ -class ListConstraintsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The collection of constraints that are available on the targeted resource. - * - * Generated from protobuf field repeated .google.cloud.orgpolicy.v2.Constraint constraints = 1; - */ - private $constraints; - /** - * Page token used to retrieve the next page. This is currently not used. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\OrgPolicy\V2\Constraint>|\Google\Protobuf\Internal\RepeatedField $constraints - * The collection of constraints that are available on the targeted resource. - * @type string $next_page_token - * Page token used to retrieve the next page. This is currently not used. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orgpolicy\V2\Orgpolicy::initOnce(); - parent::__construct($data); - } - - /** - * The collection of constraints that are available on the targeted resource. - * - * Generated from protobuf field repeated .google.cloud.orgpolicy.v2.Constraint constraints = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getConstraints() - { - return $this->constraints; - } - - /** - * The collection of constraints that are available on the targeted resource. - * - * Generated from protobuf field repeated .google.cloud.orgpolicy.v2.Constraint constraints = 1; - * @param array<\Google\Cloud\OrgPolicy\V2\Constraint>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setConstraints($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\OrgPolicy\V2\Constraint::class); - $this->constraints = $arr; - - return $this; - } - - /** - * Page token used to retrieve the next page. This is currently not used. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Page token used to retrieve the next page. This is currently not used. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/ListCustomConstraintsRequest.php b/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/ListCustomConstraintsRequest.php deleted file mode 100644 index b04e17ab5b9c..000000000000 --- a/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/ListCustomConstraintsRequest.php +++ /dev/null @@ -1,178 +0,0 @@ -google.cloud.orgpolicy.v2.ListCustomConstraintsRequest - */ -class ListCustomConstraintsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The target Google Cloud resource that parents the set of custom - * constraints that will be returned from this call. Must be in one of the - * following forms: - * * `organizations/{organization_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Size of the pages to be returned. This is currently unsupported and will - * be ignored. The server may at any point start using this field to limit - * page size. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * Page token used to retrieve the next page. This is currently unsupported - * and will be ignored. The server may at any point start using this field. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The target Google Cloud resource that parents the set of custom - * constraints that will be returned from this call. Must be in one of the - * following forms: - * - * * `organizations/{organization_id}` - * Please see {@see OrgPolicyClient::organizationName()} for help formatting this field. - * - * @return \Google\Cloud\OrgPolicy\V2\ListCustomConstraintsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The target Google Cloud resource that parents the set of custom - * constraints that will be returned from this call. Must be in one of the - * following forms: - * * `organizations/{organization_id}` - * @type int $page_size - * Size of the pages to be returned. This is currently unsupported and will - * be ignored. The server may at any point start using this field to limit - * page size. - * @type string $page_token - * Page token used to retrieve the next page. This is currently unsupported - * and will be ignored. The server may at any point start using this field. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orgpolicy\V2\Orgpolicy::initOnce(); - parent::__construct($data); - } - - /** - * Required. The target Google Cloud resource that parents the set of custom - * constraints that will be returned from this call. Must be in one of the - * following forms: - * * `organizations/{organization_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The target Google Cloud resource that parents the set of custom - * constraints that will be returned from this call. Must be in one of the - * following forms: - * * `organizations/{organization_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Size of the pages to be returned. This is currently unsupported and will - * be ignored. The server may at any point start using this field to limit - * page size. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Size of the pages to be returned. This is currently unsupported and will - * be ignored. The server may at any point start using this field to limit - * page size. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Page token used to retrieve the next page. This is currently unsupported - * and will be ignored. The server may at any point start using this field. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Page token used to retrieve the next page. This is currently unsupported - * and will be ignored. The server may at any point start using this field. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/ListCustomConstraintsResponse.php b/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/ListCustomConstraintsResponse.php deleted file mode 100644 index 98b10425eb16..000000000000 --- a/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/ListCustomConstraintsResponse.php +++ /dev/null @@ -1,111 +0,0 @@ -google.cloud.orgpolicy.v2.ListCustomConstraintsResponse - */ -class ListCustomConstraintsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * All custom constraints that exist on the organization resource. It will be - * empty if no custom constraints are set. - * - * Generated from protobuf field repeated .google.cloud.orgpolicy.v2.CustomConstraint custom_constraints = 1; - */ - private $custom_constraints; - /** - * Page token used to retrieve the next page. This is currently not used, but - * the server may at any point start supplying a valid token. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\OrgPolicy\V2\CustomConstraint>|\Google\Protobuf\Internal\RepeatedField $custom_constraints - * All custom constraints that exist on the organization resource. It will be - * empty if no custom constraints are set. - * @type string $next_page_token - * Page token used to retrieve the next page. This is currently not used, but - * the server may at any point start supplying a valid token. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orgpolicy\V2\Orgpolicy::initOnce(); - parent::__construct($data); - } - - /** - * All custom constraints that exist on the organization resource. It will be - * empty if no custom constraints are set. - * - * Generated from protobuf field repeated .google.cloud.orgpolicy.v2.CustomConstraint custom_constraints = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCustomConstraints() - { - return $this->custom_constraints; - } - - /** - * All custom constraints that exist on the organization resource. It will be - * empty if no custom constraints are set. - * - * Generated from protobuf field repeated .google.cloud.orgpolicy.v2.CustomConstraint custom_constraints = 1; - * @param array<\Google\Cloud\OrgPolicy\V2\CustomConstraint>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCustomConstraints($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\OrgPolicy\V2\CustomConstraint::class); - $this->custom_constraints = $arr; - - return $this; - } - - /** - * Page token used to retrieve the next page. This is currently not used, but - * the server may at any point start supplying a valid token. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Page token used to retrieve the next page. This is currently not used, but - * the server may at any point start supplying a valid token. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/ListPoliciesRequest.php b/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/ListPoliciesRequest.php deleted file mode 100644 index a604c24236bb..000000000000 --- a/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/ListPoliciesRequest.php +++ /dev/null @@ -1,193 +0,0 @@ -google.cloud.orgpolicy.v2.ListPoliciesRequest - */ -class ListPoliciesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The target Google Cloud resource that parents the set of - * constraints and policies that will be returned from this call. Must be in - * one of the following forms: - * * `projects/{project_number}` - * * `projects/{project_id}` - * * `folders/{folder_id}` - * * `organizations/{organization_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Size of the pages to be returned. This is currently unsupported and will - * be ignored. The server may at any point start using this field to limit - * page size. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * Page token used to retrieve the next page. This is currently unsupported - * and will be ignored. The server may at any point start using this field. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The target Google Cloud resource that parents the set of - * constraints and policies that will be returned from this call. Must be in - * one of the following forms: - * - * * `projects/{project_number}` - * * `projects/{project_id}` - * * `folders/{folder_id}` - * * `organizations/{organization_id}` - * Please see {@see OrgPolicyClient::projectName()} for help formatting this field. - * - * @return \Google\Cloud\OrgPolicy\V2\ListPoliciesRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The target Google Cloud resource that parents the set of - * constraints and policies that will be returned from this call. Must be in - * one of the following forms: - * * `projects/{project_number}` - * * `projects/{project_id}` - * * `folders/{folder_id}` - * * `organizations/{organization_id}` - * @type int $page_size - * Size of the pages to be returned. This is currently unsupported and will - * be ignored. The server may at any point start using this field to limit - * page size. - * @type string $page_token - * Page token used to retrieve the next page. This is currently unsupported - * and will be ignored. The server may at any point start using this field. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orgpolicy\V2\Orgpolicy::initOnce(); - parent::__construct($data); - } - - /** - * Required. The target Google Cloud resource that parents the set of - * constraints and policies that will be returned from this call. Must be in - * one of the following forms: - * * `projects/{project_number}` - * * `projects/{project_id}` - * * `folders/{folder_id}` - * * `organizations/{organization_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The target Google Cloud resource that parents the set of - * constraints and policies that will be returned from this call. Must be in - * one of the following forms: - * * `projects/{project_number}` - * * `projects/{project_id}` - * * `folders/{folder_id}` - * * `organizations/{organization_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Size of the pages to be returned. This is currently unsupported and will - * be ignored. The server may at any point start using this field to limit - * page size. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Size of the pages to be returned. This is currently unsupported and will - * be ignored. The server may at any point start using this field to limit - * page size. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Page token used to retrieve the next page. This is currently unsupported - * and will be ignored. The server may at any point start using this field. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Page token used to retrieve the next page. This is currently unsupported - * and will be ignored. The server may at any point start using this field. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/ListPoliciesResponse.php b/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/ListPoliciesResponse.php deleted file mode 100644 index d60a6f2158e1..000000000000 --- a/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/ListPoliciesResponse.php +++ /dev/null @@ -1,111 +0,0 @@ -google.cloud.orgpolicy.v2.ListPoliciesResponse - */ -class ListPoliciesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * All policies that exist on the resource. It will be empty if no - * policies are set. - * - * Generated from protobuf field repeated .google.cloud.orgpolicy.v2.Policy policies = 1; - */ - private $policies; - /** - * Page token used to retrieve the next page. This is currently not used, but - * the server may at any point start supplying a valid token. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\OrgPolicy\V2\Policy>|\Google\Protobuf\Internal\RepeatedField $policies - * All policies that exist on the resource. It will be empty if no - * policies are set. - * @type string $next_page_token - * Page token used to retrieve the next page. This is currently not used, but - * the server may at any point start supplying a valid token. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orgpolicy\V2\Orgpolicy::initOnce(); - parent::__construct($data); - } - - /** - * All policies that exist on the resource. It will be empty if no - * policies are set. - * - * Generated from protobuf field repeated .google.cloud.orgpolicy.v2.Policy policies = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPolicies() - { - return $this->policies; - } - - /** - * All policies that exist on the resource. It will be empty if no - * policies are set. - * - * Generated from protobuf field repeated .google.cloud.orgpolicy.v2.Policy policies = 1; - * @param array<\Google\Cloud\OrgPolicy\V2\Policy>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPolicies($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\OrgPolicy\V2\Policy::class); - $this->policies = $arr; - - return $this; - } - - /** - * Page token used to retrieve the next page. This is currently not used, but - * the server may at any point start supplying a valid token. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Page token used to retrieve the next page. This is currently not used, but - * the server may at any point start supplying a valid token. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/Policy.php b/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/Policy.php deleted file mode 100644 index 804da4a74295..000000000000 --- a/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/Policy.php +++ /dev/null @@ -1,297 +0,0 @@ -google.cloud.orgpolicy.v2.Policy - */ -class Policy extends \Google\Protobuf\Internal\Message -{ - /** - * Immutable. The resource name of the policy. Must be one of the following - * forms, where `constraint_name` is the name of the constraint which this - * policy configures: - * * `projects/{project_number}/policies/{constraint_name}` - * * `folders/{folder_id}/policies/{constraint_name}` - * * `organizations/{organization_id}/policies/{constraint_name}` - * For example, `projects/123/policies/compute.disableSerialPortAccess`. - * Note: `projects/{project_id}/policies/{constraint_name}` is also an - * acceptable name for API requests, but responses will return the name using - * the equivalent project number. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $name = ''; - /** - * Basic information about the Organization Policy. - * - * Generated from protobuf field .google.cloud.orgpolicy.v2.PolicySpec spec = 2; - */ - protected $spec = null; - /** - * Deprecated. - * - * Generated from protobuf field .google.cloud.orgpolicy.v2.AlternatePolicySpec alternate = 3 [deprecated = true]; - * @deprecated - */ - protected $alternate = null; - /** - * Dry-run policy. - * Audit-only policy, can be used to monitor how the policy would have - * impacted the existing and future resources if it's enforced. - * - * Generated from protobuf field .google.cloud.orgpolicy.v2.PolicySpec dry_run_spec = 4; - */ - protected $dry_run_spec = null; - /** - * Optional. An opaque tag indicating the current state of the policy, used - * for concurrency control. This 'etag' is computed by the server based on the - * value of other fields, and may be sent on update and delete requests to - * ensure the client has an up-to-date value before proceeding. - * - * Generated from protobuf field string etag = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $etag = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Immutable. The resource name of the policy. Must be one of the following - * forms, where `constraint_name` is the name of the constraint which this - * policy configures: - * * `projects/{project_number}/policies/{constraint_name}` - * * `folders/{folder_id}/policies/{constraint_name}` - * * `organizations/{organization_id}/policies/{constraint_name}` - * For example, `projects/123/policies/compute.disableSerialPortAccess`. - * Note: `projects/{project_id}/policies/{constraint_name}` is also an - * acceptable name for API requests, but responses will return the name using - * the equivalent project number. - * @type \Google\Cloud\OrgPolicy\V2\PolicySpec $spec - * Basic information about the Organization Policy. - * @type \Google\Cloud\OrgPolicy\V2\AlternatePolicySpec $alternate - * Deprecated. - * @type \Google\Cloud\OrgPolicy\V2\PolicySpec $dry_run_spec - * Dry-run policy. - * Audit-only policy, can be used to monitor how the policy would have - * impacted the existing and future resources if it's enforced. - * @type string $etag - * Optional. An opaque tag indicating the current state of the policy, used - * for concurrency control. This 'etag' is computed by the server based on the - * value of other fields, and may be sent on update and delete requests to - * ensure the client has an up-to-date value before proceeding. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orgpolicy\V2\Orgpolicy::initOnce(); - parent::__construct($data); - } - - /** - * Immutable. The resource name of the policy. Must be one of the following - * forms, where `constraint_name` is the name of the constraint which this - * policy configures: - * * `projects/{project_number}/policies/{constraint_name}` - * * `folders/{folder_id}/policies/{constraint_name}` - * * `organizations/{organization_id}/policies/{constraint_name}` - * For example, `projects/123/policies/compute.disableSerialPortAccess`. - * Note: `projects/{project_id}/policies/{constraint_name}` is also an - * acceptable name for API requests, but responses will return the name using - * the equivalent project number. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Immutable. The resource name of the policy. Must be one of the following - * forms, where `constraint_name` is the name of the constraint which this - * policy configures: - * * `projects/{project_number}/policies/{constraint_name}` - * * `folders/{folder_id}/policies/{constraint_name}` - * * `organizations/{organization_id}/policies/{constraint_name}` - * For example, `projects/123/policies/compute.disableSerialPortAccess`. - * Note: `projects/{project_id}/policies/{constraint_name}` is also an - * acceptable name for API requests, but responses will return the name using - * the equivalent project number. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Basic information about the Organization Policy. - * - * Generated from protobuf field .google.cloud.orgpolicy.v2.PolicySpec spec = 2; - * @return \Google\Cloud\OrgPolicy\V2\PolicySpec|null - */ - public function getSpec() - { - return $this->spec; - } - - public function hasSpec() - { - return isset($this->spec); - } - - public function clearSpec() - { - unset($this->spec); - } - - /** - * Basic information about the Organization Policy. - * - * Generated from protobuf field .google.cloud.orgpolicy.v2.PolicySpec spec = 2; - * @param \Google\Cloud\OrgPolicy\V2\PolicySpec $var - * @return $this - */ - public function setSpec($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OrgPolicy\V2\PolicySpec::class); - $this->spec = $var; - - return $this; - } - - /** - * Deprecated. - * - * Generated from protobuf field .google.cloud.orgpolicy.v2.AlternatePolicySpec alternate = 3 [deprecated = true]; - * @return \Google\Cloud\OrgPolicy\V2\AlternatePolicySpec|null - * @deprecated - */ - public function getAlternate() - { - @trigger_error('alternate is deprecated.', E_USER_DEPRECATED); - return $this->alternate; - } - - public function hasAlternate() - { - @trigger_error('alternate is deprecated.', E_USER_DEPRECATED); - return isset($this->alternate); - } - - public function clearAlternate() - { - @trigger_error('alternate is deprecated.', E_USER_DEPRECATED); - unset($this->alternate); - } - - /** - * Deprecated. - * - * Generated from protobuf field .google.cloud.orgpolicy.v2.AlternatePolicySpec alternate = 3 [deprecated = true]; - * @param \Google\Cloud\OrgPolicy\V2\AlternatePolicySpec $var - * @return $this - * @deprecated - */ - public function setAlternate($var) - { - @trigger_error('alternate is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkMessage($var, \Google\Cloud\OrgPolicy\V2\AlternatePolicySpec::class); - $this->alternate = $var; - - return $this; - } - - /** - * Dry-run policy. - * Audit-only policy, can be used to monitor how the policy would have - * impacted the existing and future resources if it's enforced. - * - * Generated from protobuf field .google.cloud.orgpolicy.v2.PolicySpec dry_run_spec = 4; - * @return \Google\Cloud\OrgPolicy\V2\PolicySpec|null - */ - public function getDryRunSpec() - { - return $this->dry_run_spec; - } - - public function hasDryRunSpec() - { - return isset($this->dry_run_spec); - } - - public function clearDryRunSpec() - { - unset($this->dry_run_spec); - } - - /** - * Dry-run policy. - * Audit-only policy, can be used to monitor how the policy would have - * impacted the existing and future resources if it's enforced. - * - * Generated from protobuf field .google.cloud.orgpolicy.v2.PolicySpec dry_run_spec = 4; - * @param \Google\Cloud\OrgPolicy\V2\PolicySpec $var - * @return $this - */ - public function setDryRunSpec($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OrgPolicy\V2\PolicySpec::class); - $this->dry_run_spec = $var; - - return $this; - } - - /** - * Optional. An opaque tag indicating the current state of the policy, used - * for concurrency control. This 'etag' is computed by the server based on the - * value of other fields, and may be sent on update and delete requests to - * ensure the client has an up-to-date value before proceeding. - * - * Generated from protobuf field string etag = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * Optional. An opaque tag indicating the current state of the policy, used - * for concurrency control. This 'etag' is computed by the server based on the - * value of other fields, and may be sent on update and delete requests to - * ensure the client has an up-to-date value before proceeding. - * - * Generated from protobuf field string etag = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/PolicySpec.php b/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/PolicySpec.php deleted file mode 100644 index 88ddcb36ab79..000000000000 --- a/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/PolicySpec.php +++ /dev/null @@ -1,310 +0,0 @@ -google.cloud.orgpolicy.v2.PolicySpec - */ -class PolicySpec extends \Google\Protobuf\Internal\Message -{ - /** - * An opaque tag indicating the current version of the policySpec, used for - * concurrency control. - * This field is ignored if used in a `CreatePolicy` request. - * When the policy is returned from either a `GetPolicy` or a - * `ListPolicies` request, this `etag` indicates the version of the - * current policySpec to use when executing a read-modify-write loop. - * When the policy is returned from a `GetEffectivePolicy` request, the - * `etag` will be unset. - * - * Generated from protobuf field string etag = 1; - */ - protected $etag = ''; - /** - * Output only. The time stamp this was previously updated. This - * represents the last time a call to `CreatePolicy` or `UpdatePolicy` was - * made for that policy. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * In policies for boolean constraints, the following requirements apply: - * - There must be one and only one policy rule where condition is unset. - * - Boolean policy rules with conditions must set `enforced` to the - * opposite of the policy rule without a condition. - * - During policy evaluation, policy rules with conditions that are - * true for a target resource take precedence. - * - * Generated from protobuf field repeated .google.cloud.orgpolicy.v2.PolicySpec.PolicyRule rules = 3; - */ - private $rules; - /** - * Determines the inheritance behavior for this policy. - * If `inherit_from_parent` is true, policy rules set higher up in the - * hierarchy (up to the closest root) are inherited and present in the - * effective policy. If it is false, then no rules are inherited, and this - * policy becomes the new root for evaluation. - * This field can be set only for policies which configure list constraints. - * - * Generated from protobuf field bool inherit_from_parent = 4; - */ - protected $inherit_from_parent = false; - /** - * Ignores policies set above this resource and restores the - * `constraint_default` enforcement behavior of the specific constraint at - * this resource. - * This field can be set in policies for either list or boolean - * constraints. If set, `rules` must be empty and `inherit_from_parent` - * must be set to false. - * - * Generated from protobuf field bool reset = 5; - */ - protected $reset = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $etag - * An opaque tag indicating the current version of the policySpec, used for - * concurrency control. - * This field is ignored if used in a `CreatePolicy` request. - * When the policy is returned from either a `GetPolicy` or a - * `ListPolicies` request, this `etag` indicates the version of the - * current policySpec to use when executing a read-modify-write loop. - * When the policy is returned from a `GetEffectivePolicy` request, the - * `etag` will be unset. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The time stamp this was previously updated. This - * represents the last time a call to `CreatePolicy` or `UpdatePolicy` was - * made for that policy. - * @type array<\Google\Cloud\OrgPolicy\V2\PolicySpec\PolicyRule>|\Google\Protobuf\Internal\RepeatedField $rules - * In policies for boolean constraints, the following requirements apply: - * - There must be one and only one policy rule where condition is unset. - * - Boolean policy rules with conditions must set `enforced` to the - * opposite of the policy rule without a condition. - * - During policy evaluation, policy rules with conditions that are - * true for a target resource take precedence. - * @type bool $inherit_from_parent - * Determines the inheritance behavior for this policy. - * If `inherit_from_parent` is true, policy rules set higher up in the - * hierarchy (up to the closest root) are inherited and present in the - * effective policy. If it is false, then no rules are inherited, and this - * policy becomes the new root for evaluation. - * This field can be set only for policies which configure list constraints. - * @type bool $reset - * Ignores policies set above this resource and restores the - * `constraint_default` enforcement behavior of the specific constraint at - * this resource. - * This field can be set in policies for either list or boolean - * constraints. If set, `rules` must be empty and `inherit_from_parent` - * must be set to false. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orgpolicy\V2\Orgpolicy::initOnce(); - parent::__construct($data); - } - - /** - * An opaque tag indicating the current version of the policySpec, used for - * concurrency control. - * This field is ignored if used in a `CreatePolicy` request. - * When the policy is returned from either a `GetPolicy` or a - * `ListPolicies` request, this `etag` indicates the version of the - * current policySpec to use when executing a read-modify-write loop. - * When the policy is returned from a `GetEffectivePolicy` request, the - * `etag` will be unset. - * - * Generated from protobuf field string etag = 1; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * An opaque tag indicating the current version of the policySpec, used for - * concurrency control. - * This field is ignored if used in a `CreatePolicy` request. - * When the policy is returned from either a `GetPolicy` or a - * `ListPolicies` request, this `etag` indicates the version of the - * current policySpec to use when executing a read-modify-write loop. - * When the policy is returned from a `GetEffectivePolicy` request, the - * `etag` will be unset. - * - * Generated from protobuf field string etag = 1; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - - /** - * Output only. The time stamp this was previously updated. This - * represents the last time a call to `CreatePolicy` or `UpdatePolicy` was - * made for that policy. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The time stamp this was previously updated. This - * represents the last time a call to `CreatePolicy` or `UpdatePolicy` was - * made for that policy. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * In policies for boolean constraints, the following requirements apply: - * - There must be one and only one policy rule where condition is unset. - * - Boolean policy rules with conditions must set `enforced` to the - * opposite of the policy rule without a condition. - * - During policy evaluation, policy rules with conditions that are - * true for a target resource take precedence. - * - * Generated from protobuf field repeated .google.cloud.orgpolicy.v2.PolicySpec.PolicyRule rules = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRules() - { - return $this->rules; - } - - /** - * In policies for boolean constraints, the following requirements apply: - * - There must be one and only one policy rule where condition is unset. - * - Boolean policy rules with conditions must set `enforced` to the - * opposite of the policy rule without a condition. - * - During policy evaluation, policy rules with conditions that are - * true for a target resource take precedence. - * - * Generated from protobuf field repeated .google.cloud.orgpolicy.v2.PolicySpec.PolicyRule rules = 3; - * @param array<\Google\Cloud\OrgPolicy\V2\PolicySpec\PolicyRule>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRules($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\OrgPolicy\V2\PolicySpec\PolicyRule::class); - $this->rules = $arr; - - return $this; - } - - /** - * Determines the inheritance behavior for this policy. - * If `inherit_from_parent` is true, policy rules set higher up in the - * hierarchy (up to the closest root) are inherited and present in the - * effective policy. If it is false, then no rules are inherited, and this - * policy becomes the new root for evaluation. - * This field can be set only for policies which configure list constraints. - * - * Generated from protobuf field bool inherit_from_parent = 4; - * @return bool - */ - public function getInheritFromParent() - { - return $this->inherit_from_parent; - } - - /** - * Determines the inheritance behavior for this policy. - * If `inherit_from_parent` is true, policy rules set higher up in the - * hierarchy (up to the closest root) are inherited and present in the - * effective policy. If it is false, then no rules are inherited, and this - * policy becomes the new root for evaluation. - * This field can be set only for policies which configure list constraints. - * - * Generated from protobuf field bool inherit_from_parent = 4; - * @param bool $var - * @return $this - */ - public function setInheritFromParent($var) - { - GPBUtil::checkBool($var); - $this->inherit_from_parent = $var; - - return $this; - } - - /** - * Ignores policies set above this resource and restores the - * `constraint_default` enforcement behavior of the specific constraint at - * this resource. - * This field can be set in policies for either list or boolean - * constraints. If set, `rules` must be empty and `inherit_from_parent` - * must be set to false. - * - * Generated from protobuf field bool reset = 5; - * @return bool - */ - public function getReset() - { - return $this->reset; - } - - /** - * Ignores policies set above this resource and restores the - * `constraint_default` enforcement behavior of the specific constraint at - * this resource. - * This field can be set in policies for either list or boolean - * constraints. If set, `rules` must be empty and `inherit_from_parent` - * must be set to false. - * - * Generated from protobuf field bool reset = 5; - * @param bool $var - * @return $this - */ - public function setReset($var) - { - GPBUtil::checkBool($var); - $this->reset = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/PolicySpec/PolicyRule.php b/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/PolicySpec/PolicyRule.php deleted file mode 100644 index 64212ae4b572..000000000000 --- a/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/PolicySpec/PolicyRule.php +++ /dev/null @@ -1,280 +0,0 @@ -google.cloud.orgpolicy.v2.PolicySpec.PolicyRule - */ -class PolicyRule extends \Google\Protobuf\Internal\Message -{ - /** - * A condition which determines whether this rule is used - * in the evaluation of the policy. When set, the `expression` field in - * the `Expr' must include from 1 to 10 subexpressions, joined by the "||" - * or "&&" operators. Each subexpression must be of the form - * "resource.matchTag('/tag_key_short_name, - * 'tag_value_short_name')". or "resource.matchTagId('tagKeys/key_id', - * 'tagValues/value_id')". where key_name and value_name are the resource - * names for Label Keys and Values. These names are available from the Tag - * Manager Service. An example expression is: - * "resource.matchTag('123456789/environment, - * 'prod')". or "resource.matchTagId('tagKeys/123', - * 'tagValues/456')". - * - * Generated from protobuf field .google.type.Expr condition = 5; - */ - protected $condition = null; - protected $kind; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\OrgPolicy\V2\PolicySpec\PolicyRule\StringValues $values - * List of values to be used for this policy rule. This field can be set - * only in policies for list constraints. - * @type bool $allow_all - * Setting this to true means that all values are allowed. This field can - * be set only in policies for list constraints. - * @type bool $deny_all - * Setting this to true means that all values are denied. This field can - * be set only in policies for list constraints. - * @type bool $enforce - * If `true`, then the policy is enforced. If `false`, then any - * configuration is acceptable. - * This field can be set only in policies for boolean constraints. - * @type \Google\Type\Expr $condition - * A condition which determines whether this rule is used - * in the evaluation of the policy. When set, the `expression` field in - * the `Expr' must include from 1 to 10 subexpressions, joined by the "||" - * or "&&" operators. Each subexpression must be of the form - * "resource.matchTag('/tag_key_short_name, - * 'tag_value_short_name')". or "resource.matchTagId('tagKeys/key_id', - * 'tagValues/value_id')". where key_name and value_name are the resource - * names for Label Keys and Values. These names are available from the Tag - * Manager Service. An example expression is: - * "resource.matchTag('123456789/environment, - * 'prod')". or "resource.matchTagId('tagKeys/123', - * 'tagValues/456')". - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orgpolicy\V2\Orgpolicy::initOnce(); - parent::__construct($data); - } - - /** - * List of values to be used for this policy rule. This field can be set - * only in policies for list constraints. - * - * Generated from protobuf field .google.cloud.orgpolicy.v2.PolicySpec.PolicyRule.StringValues values = 1; - * @return \Google\Cloud\OrgPolicy\V2\PolicySpec\PolicyRule\StringValues|null - */ - public function getValues() - { - return $this->readOneof(1); - } - - public function hasValues() - { - return $this->hasOneof(1); - } - - /** - * List of values to be used for this policy rule. This field can be set - * only in policies for list constraints. - * - * Generated from protobuf field .google.cloud.orgpolicy.v2.PolicySpec.PolicyRule.StringValues values = 1; - * @param \Google\Cloud\OrgPolicy\V2\PolicySpec\PolicyRule\StringValues $var - * @return $this - */ - public function setValues($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OrgPolicy\V2\PolicySpec\PolicyRule\StringValues::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Setting this to true means that all values are allowed. This field can - * be set only in policies for list constraints. - * - * Generated from protobuf field bool allow_all = 2; - * @return bool - */ - public function getAllowAll() - { - return $this->readOneof(2); - } - - public function hasAllowAll() - { - return $this->hasOneof(2); - } - - /** - * Setting this to true means that all values are allowed. This field can - * be set only in policies for list constraints. - * - * Generated from protobuf field bool allow_all = 2; - * @param bool $var - * @return $this - */ - public function setAllowAll($var) - { - GPBUtil::checkBool($var); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Setting this to true means that all values are denied. This field can - * be set only in policies for list constraints. - * - * Generated from protobuf field bool deny_all = 3; - * @return bool - */ - public function getDenyAll() - { - return $this->readOneof(3); - } - - public function hasDenyAll() - { - return $this->hasOneof(3); - } - - /** - * Setting this to true means that all values are denied. This field can - * be set only in policies for list constraints. - * - * Generated from protobuf field bool deny_all = 3; - * @param bool $var - * @return $this - */ - public function setDenyAll($var) - { - GPBUtil::checkBool($var); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * If `true`, then the policy is enforced. If `false`, then any - * configuration is acceptable. - * This field can be set only in policies for boolean constraints. - * - * Generated from protobuf field bool enforce = 4; - * @return bool - */ - public function getEnforce() - { - return $this->readOneof(4); - } - - public function hasEnforce() - { - return $this->hasOneof(4); - } - - /** - * If `true`, then the policy is enforced. If `false`, then any - * configuration is acceptable. - * This field can be set only in policies for boolean constraints. - * - * Generated from protobuf field bool enforce = 4; - * @param bool $var - * @return $this - */ - public function setEnforce($var) - { - GPBUtil::checkBool($var); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * A condition which determines whether this rule is used - * in the evaluation of the policy. When set, the `expression` field in - * the `Expr' must include from 1 to 10 subexpressions, joined by the "||" - * or "&&" operators. Each subexpression must be of the form - * "resource.matchTag('/tag_key_short_name, - * 'tag_value_short_name')". or "resource.matchTagId('tagKeys/key_id', - * 'tagValues/value_id')". where key_name and value_name are the resource - * names for Label Keys and Values. These names are available from the Tag - * Manager Service. An example expression is: - * "resource.matchTag('123456789/environment, - * 'prod')". or "resource.matchTagId('tagKeys/123', - * 'tagValues/456')". - * - * Generated from protobuf field .google.type.Expr condition = 5; - * @return \Google\Type\Expr|null - */ - public function getCondition() - { - return $this->condition; - } - - public function hasCondition() - { - return isset($this->condition); - } - - public function clearCondition() - { - unset($this->condition); - } - - /** - * A condition which determines whether this rule is used - * in the evaluation of the policy. When set, the `expression` field in - * the `Expr' must include from 1 to 10 subexpressions, joined by the "||" - * or "&&" operators. Each subexpression must be of the form - * "resource.matchTag('/tag_key_short_name, - * 'tag_value_short_name')". or "resource.matchTagId('tagKeys/key_id', - * 'tagValues/value_id')". where key_name and value_name are the resource - * names for Label Keys and Values. These names are available from the Tag - * Manager Service. An example expression is: - * "resource.matchTag('123456789/environment, - * 'prod')". or "resource.matchTagId('tagKeys/123', - * 'tagValues/456')". - * - * Generated from protobuf field .google.type.Expr condition = 5; - * @param \Google\Type\Expr $var - * @return $this - */ - public function setCondition($var) - { - GPBUtil::checkMessage($var, \Google\Type\Expr::class); - $this->condition = $var; - - return $this; - } - - /** - * @return string - */ - public function getKind() - { - return $this->whichOneof("kind"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(PolicyRule::class, \Google\Cloud\OrgPolicy\V2\PolicySpec_PolicyRule::class); - diff --git a/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/PolicySpec/PolicyRule/StringValues.php b/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/PolicySpec/PolicyRule/StringValues.php deleted file mode 100644 index 389de6430399..000000000000 --- a/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/PolicySpec/PolicyRule/StringValues.php +++ /dev/null @@ -1,118 +0,0 @@ -` (for example, `projects/tokyo-rain-123`) - * - `folders/` (for example, `folders/1234`) - * - `organizations/` (for example, `organizations/1234`) - * The `supports_under` field of the associated `Constraint` defines - * whether ancestry prefixes can be used. - * - * Generated from protobuf message google.cloud.orgpolicy.v2.PolicySpec.PolicyRule.StringValues - */ -class StringValues extends \Google\Protobuf\Internal\Message -{ - /** - * List of values allowed at this resource. - * - * Generated from protobuf field repeated string allowed_values = 1; - */ - private $allowed_values; - /** - * List of values denied at this resource. - * - * Generated from protobuf field repeated string denied_values = 2; - */ - private $denied_values; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $allowed_values - * List of values allowed at this resource. - * @type array|\Google\Protobuf\Internal\RepeatedField $denied_values - * List of values denied at this resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orgpolicy\V2\Orgpolicy::initOnce(); - parent::__construct($data); - } - - /** - * List of values allowed at this resource. - * - * Generated from protobuf field repeated string allowed_values = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAllowedValues() - { - return $this->allowed_values; - } - - /** - * List of values allowed at this resource. - * - * Generated from protobuf field repeated string allowed_values = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAllowedValues($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->allowed_values = $arr; - - return $this; - } - - /** - * List of values denied at this resource. - * - * Generated from protobuf field repeated string denied_values = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDeniedValues() - { - return $this->denied_values; - } - - /** - * List of values denied at this resource. - * - * Generated from protobuf field repeated string denied_values = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDeniedValues($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->denied_values = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(StringValues::class, \Google\Cloud\OrgPolicy\V2\PolicySpec_PolicyRule_StringValues::class); - diff --git a/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/UpdateCustomConstraintRequest.php b/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/UpdateCustomConstraintRequest.php deleted file mode 100644 index f9ba7c3c1e59..000000000000 --- a/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/UpdateCustomConstraintRequest.php +++ /dev/null @@ -1,91 +0,0 @@ -google.cloud.orgpolicy.v2.UpdateCustomConstraintRequest - */ -class UpdateCustomConstraintRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. `CustomConstraint` to update. - * - * Generated from protobuf field .google.cloud.orgpolicy.v2.CustomConstraint custom_constraint = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $custom_constraint = null; - - /** - * @param \Google\Cloud\OrgPolicy\V2\CustomConstraint $customConstraint Required. `CustomConstraint` to update. - * - * @return \Google\Cloud\OrgPolicy\V2\UpdateCustomConstraintRequest - * - * @experimental - */ - public static function build(\Google\Cloud\OrgPolicy\V2\CustomConstraint $customConstraint): self - { - return (new self()) - ->setCustomConstraint($customConstraint); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\OrgPolicy\V2\CustomConstraint $custom_constraint - * Required. `CustomConstraint` to update. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orgpolicy\V2\Orgpolicy::initOnce(); - parent::__construct($data); - } - - /** - * Required. `CustomConstraint` to update. - * - * Generated from protobuf field .google.cloud.orgpolicy.v2.CustomConstraint custom_constraint = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\OrgPolicy\V2\CustomConstraint|null - */ - public function getCustomConstraint() - { - return $this->custom_constraint; - } - - public function hasCustomConstraint() - { - return isset($this->custom_constraint); - } - - public function clearCustomConstraint() - { - unset($this->custom_constraint); - } - - /** - * Required. `CustomConstraint` to update. - * - * Generated from protobuf field .google.cloud.orgpolicy.v2.CustomConstraint custom_constraint = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\OrgPolicy\V2\CustomConstraint $var - * @return $this - */ - public function setCustomConstraint($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OrgPolicy\V2\CustomConstraint::class); - $this->custom_constraint = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/UpdatePolicyRequest.php b/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/UpdatePolicyRequest.php deleted file mode 100644 index 0c67e5957f80..000000000000 --- a/owl-bot-staging/OrgPolicy/v2/proto/src/Google/Cloud/OrgPolicy/V2/UpdatePolicyRequest.php +++ /dev/null @@ -1,143 +0,0 @@ -google.cloud.orgpolicy.v2.UpdatePolicyRequest - */ -class UpdatePolicyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Policy to update. - * - * Generated from protobuf field .google.cloud.orgpolicy.v2.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $policy = null; - /** - * Field mask used to specify the fields to be overwritten in the policy - * by the set. The fields specified in the update_mask are relative to the - * policy, not the full request. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\OrgPolicy\V2\Policy $policy Required. Policy to update. - * - * @return \Google\Cloud\OrgPolicy\V2\UpdatePolicyRequest - * - * @experimental - */ - public static function build(\Google\Cloud\OrgPolicy\V2\Policy $policy): self - { - return (new self()) - ->setPolicy($policy); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\OrgPolicy\V2\Policy $policy - * Required. Policy to update. - * @type \Google\Protobuf\FieldMask $update_mask - * Field mask used to specify the fields to be overwritten in the policy - * by the set. The fields specified in the update_mask are relative to the - * policy, not the full request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Orgpolicy\V2\Orgpolicy::initOnce(); - parent::__construct($data); - } - - /** - * Required. Policy to update. - * - * Generated from protobuf field .google.cloud.orgpolicy.v2.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\OrgPolicy\V2\Policy|null - */ - public function getPolicy() - { - return $this->policy; - } - - public function hasPolicy() - { - return isset($this->policy); - } - - public function clearPolicy() - { - unset($this->policy); - } - - /** - * Required. Policy to update. - * - * Generated from protobuf field .google.cloud.orgpolicy.v2.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\OrgPolicy\V2\Policy $var - * @return $this - */ - public function setPolicy($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OrgPolicy\V2\Policy::class); - $this->policy = $var; - - return $this; - } - - /** - * Field mask used to specify the fields to be overwritten in the policy - * by the set. The fields specified in the update_mask are relative to the - * policy, not the full request. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Field mask used to specify the fields to be overwritten in the policy - * by the set. The fields specified in the update_mask are relative to the - * policy, not the full request. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OrgPolicy/v2/samples/V2/OrgPolicyClient/create_custom_constraint.php b/owl-bot-staging/OrgPolicy/v2/samples/V2/OrgPolicyClient/create_custom_constraint.php deleted file mode 100644 index f0950603e92a..000000000000 --- a/owl-bot-staging/OrgPolicy/v2/samples/V2/OrgPolicyClient/create_custom_constraint.php +++ /dev/null @@ -1,80 +0,0 @@ -setParent($formattedParent) - ->setCustomConstraint($customConstraint); - - // Call the API and handle any network failures. - try { - /** @var CustomConstraint $response */ - $response = $orgPolicyClient->createCustomConstraint($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = OrgPolicyClient::organizationName('[ORGANIZATION]'); - - create_custom_constraint_sample($formattedParent); -} -// [END orgpolicy_v2_generated_OrgPolicy_CreateCustomConstraint_sync] diff --git a/owl-bot-staging/OrgPolicy/v2/samples/V2/OrgPolicyClient/create_policy.php b/owl-bot-staging/OrgPolicy/v2/samples/V2/OrgPolicyClient/create_policy.php deleted file mode 100644 index 82a510091b53..000000000000 --- a/owl-bot-staging/OrgPolicy/v2/samples/V2/OrgPolicyClient/create_policy.php +++ /dev/null @@ -1,84 +0,0 @@ -setParent($formattedParent) - ->setPolicy($policy); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $orgPolicyClient->createPolicy($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = OrgPolicyClient::projectName('[PROJECT]'); - - create_policy_sample($formattedParent); -} -// [END orgpolicy_v2_generated_OrgPolicy_CreatePolicy_sync] diff --git a/owl-bot-staging/OrgPolicy/v2/samples/V2/OrgPolicyClient/delete_custom_constraint.php b/owl-bot-staging/OrgPolicy/v2/samples/V2/OrgPolicyClient/delete_custom_constraint.php deleted file mode 100644 index 76cf1119445a..000000000000 --- a/owl-bot-staging/OrgPolicy/v2/samples/V2/OrgPolicyClient/delete_custom_constraint.php +++ /dev/null @@ -1,73 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $orgPolicyClient->deleteCustomConstraint($request); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = OrgPolicyClient::customConstraintName('[ORGANIZATION]', '[CUSTOM_CONSTRAINT]'); - - delete_custom_constraint_sample($formattedName); -} -// [END orgpolicy_v2_generated_OrgPolicy_DeleteCustomConstraint_sync] diff --git a/owl-bot-staging/OrgPolicy/v2/samples/V2/OrgPolicyClient/delete_policy.php b/owl-bot-staging/OrgPolicy/v2/samples/V2/OrgPolicyClient/delete_policy.php deleted file mode 100644 index d84bae5cfd51..000000000000 --- a/owl-bot-staging/OrgPolicy/v2/samples/V2/OrgPolicyClient/delete_policy.php +++ /dev/null @@ -1,73 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $orgPolicyClient->deletePolicy($request); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = OrgPolicyClient::policyName('[PROJECT]', '[POLICY]'); - - delete_policy_sample($formattedName); -} -// [END orgpolicy_v2_generated_OrgPolicy_DeletePolicy_sync] diff --git a/owl-bot-staging/OrgPolicy/v2/samples/V2/OrgPolicyClient/get_custom_constraint.php b/owl-bot-staging/OrgPolicy/v2/samples/V2/OrgPolicyClient/get_custom_constraint.php deleted file mode 100644 index a0f1ed7310b9..000000000000 --- a/owl-bot-staging/OrgPolicy/v2/samples/V2/OrgPolicyClient/get_custom_constraint.php +++ /dev/null @@ -1,75 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var CustomConstraint $response */ - $response = $orgPolicyClient->getCustomConstraint($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = OrgPolicyClient::customConstraintName('[ORGANIZATION]', '[CUSTOM_CONSTRAINT]'); - - get_custom_constraint_sample($formattedName); -} -// [END orgpolicy_v2_generated_OrgPolicy_GetCustomConstraint_sync] diff --git a/owl-bot-staging/OrgPolicy/v2/samples/V2/OrgPolicyClient/get_effective_policy.php b/owl-bot-staging/OrgPolicy/v2/samples/V2/OrgPolicyClient/get_effective_policy.php deleted file mode 100644 index 59330c3ed041..000000000000 --- a/owl-bot-staging/OrgPolicy/v2/samples/V2/OrgPolicyClient/get_effective_policy.php +++ /dev/null @@ -1,77 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $orgPolicyClient->getEffectivePolicy($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = OrgPolicyClient::policyName('[PROJECT]', '[POLICY]'); - - get_effective_policy_sample($formattedName); -} -// [END orgpolicy_v2_generated_OrgPolicy_GetEffectivePolicy_sync] diff --git a/owl-bot-staging/OrgPolicy/v2/samples/V2/OrgPolicyClient/get_policy.php b/owl-bot-staging/OrgPolicy/v2/samples/V2/OrgPolicyClient/get_policy.php deleted file mode 100644 index 13e35d202f5e..000000000000 --- a/owl-bot-staging/OrgPolicy/v2/samples/V2/OrgPolicyClient/get_policy.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $orgPolicyClient->getPolicy($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = OrgPolicyClient::policyName('[PROJECT]', '[POLICY]'); - - get_policy_sample($formattedName); -} -// [END orgpolicy_v2_generated_OrgPolicy_GetPolicy_sync] diff --git a/owl-bot-staging/OrgPolicy/v2/samples/V2/OrgPolicyClient/list_constraints.php b/owl-bot-staging/OrgPolicy/v2/samples/V2/OrgPolicyClient/list_constraints.php deleted file mode 100644 index 5be4c9f8f89e..000000000000 --- a/owl-bot-staging/OrgPolicy/v2/samples/V2/OrgPolicyClient/list_constraints.php +++ /dev/null @@ -1,82 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $orgPolicyClient->listConstraints($request); - - /** @var Constraint $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = OrgPolicyClient::projectName('[PROJECT]'); - - list_constraints_sample($formattedParent); -} -// [END orgpolicy_v2_generated_OrgPolicy_ListConstraints_sync] diff --git a/owl-bot-staging/OrgPolicy/v2/samples/V2/OrgPolicyClient/list_custom_constraints.php b/owl-bot-staging/OrgPolicy/v2/samples/V2/OrgPolicyClient/list_custom_constraints.php deleted file mode 100644 index 9ec51a811064..000000000000 --- a/owl-bot-staging/OrgPolicy/v2/samples/V2/OrgPolicyClient/list_custom_constraints.php +++ /dev/null @@ -1,81 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $orgPolicyClient->listCustomConstraints($request); - - /** @var CustomConstraint $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = OrgPolicyClient::organizationName('[ORGANIZATION]'); - - list_custom_constraints_sample($formattedParent); -} -// [END orgpolicy_v2_generated_OrgPolicy_ListCustomConstraints_sync] diff --git a/owl-bot-staging/OrgPolicy/v2/samples/V2/OrgPolicyClient/list_policies.php b/owl-bot-staging/OrgPolicy/v2/samples/V2/OrgPolicyClient/list_policies.php deleted file mode 100644 index 75b3053adf31..000000000000 --- a/owl-bot-staging/OrgPolicy/v2/samples/V2/OrgPolicyClient/list_policies.php +++ /dev/null @@ -1,83 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $orgPolicyClient->listPolicies($request); - - /** @var Policy $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = OrgPolicyClient::projectName('[PROJECT]'); - - list_policies_sample($formattedParent); -} -// [END orgpolicy_v2_generated_OrgPolicy_ListPolicies_sync] diff --git a/owl-bot-staging/OrgPolicy/v2/samples/V2/OrgPolicyClient/update_custom_constraint.php b/owl-bot-staging/OrgPolicy/v2/samples/V2/OrgPolicyClient/update_custom_constraint.php deleted file mode 100644 index 7029b5e6e71b..000000000000 --- a/owl-bot-staging/OrgPolicy/v2/samples/V2/OrgPolicyClient/update_custom_constraint.php +++ /dev/null @@ -1,65 +0,0 @@ -setCustomConstraint($customConstraint); - - // Call the API and handle any network failures. - try { - /** @var CustomConstraint $response */ - $response = $orgPolicyClient->updateCustomConstraint($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END orgpolicy_v2_generated_OrgPolicy_UpdateCustomConstraint_sync] diff --git a/owl-bot-staging/OrgPolicy/v2/samples/V2/OrgPolicyClient/update_policy.php b/owl-bot-staging/OrgPolicy/v2/samples/V2/OrgPolicyClient/update_policy.php deleted file mode 100644 index 3a03a88a6f4a..000000000000 --- a/owl-bot-staging/OrgPolicy/v2/samples/V2/OrgPolicyClient/update_policy.php +++ /dev/null @@ -1,67 +0,0 @@ -setPolicy($policy); - - // Call the API and handle any network failures. - try { - /** @var Policy $response */ - $response = $orgPolicyClient->updatePolicy($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END orgpolicy_v2_generated_OrgPolicy_UpdatePolicy_sync] diff --git a/owl-bot-staging/OrgPolicy/v2/src/V2/Client/OrgPolicyClient.php b/owl-bot-staging/OrgPolicy/v2/src/V2/Client/OrgPolicyClient.php deleted file mode 100644 index cf96ec33cf34..000000000000 --- a/owl-bot-staging/OrgPolicy/v2/src/V2/Client/OrgPolicyClient.php +++ /dev/null @@ -1,729 +0,0 @@ - createCustomConstraintAsync(CreateCustomConstraintRequest $request, array $optionalArgs = []) - * @method PromiseInterface createPolicyAsync(CreatePolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteCustomConstraintAsync(DeleteCustomConstraintRequest $request, array $optionalArgs = []) - * @method PromiseInterface deletePolicyAsync(DeletePolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface getCustomConstraintAsync(GetCustomConstraintRequest $request, array $optionalArgs = []) - * @method PromiseInterface getEffectivePolicyAsync(GetEffectivePolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface getPolicyAsync(GetPolicyRequest $request, array $optionalArgs = []) - * @method PromiseInterface listConstraintsAsync(ListConstraintsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listCustomConstraintsAsync(ListCustomConstraintsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listPoliciesAsync(ListPoliciesRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateCustomConstraintAsync(UpdateCustomConstraintRequest $request, array $optionalArgs = []) - * @method PromiseInterface updatePolicyAsync(UpdatePolicyRequest $request, array $optionalArgs = []) - */ -final class OrgPolicyClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.orgpolicy.v2.OrgPolicy'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'orgpolicy.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'orgpolicy.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/org_policy_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/org_policy_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/org_policy_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/org_policy_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a - * custom_constraint resource. - * - * @param string $organization - * @param string $customConstraint - * - * @return string The formatted custom_constraint resource. - */ - public static function customConstraintName(string $organization, string $customConstraint): string - { - return self::getPathTemplate('customConstraint')->render([ - 'organization' => $organization, - 'custom_constraint' => $customConstraint, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a folder - * resource. - * - * @param string $folder - * - * @return string The formatted folder resource. - */ - public static function folderName(string $folder): string - { - return self::getPathTemplate('folder')->render([ - 'folder' => $folder, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * folder_policy resource. - * - * @param string $folder - * @param string $policy - * - * @return string The formatted folder_policy resource. - */ - public static function folderPolicyName(string $folder, string $policy): string - { - return self::getPathTemplate('folderPolicy')->render([ - 'folder' => $folder, - 'policy' => $policy, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a organization - * resource. - * - * @param string $organization - * - * @return string The formatted organization resource. - */ - public static function organizationName(string $organization): string - { - return self::getPathTemplate('organization')->render([ - 'organization' => $organization, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_policy resource. - * - * @param string $organization - * @param string $policy - * - * @return string The formatted organization_policy resource. - */ - public static function organizationPolicyName(string $organization, string $policy): string - { - return self::getPathTemplate('organizationPolicy')->render([ - 'organization' => $organization, - 'policy' => $policy, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a policy - * resource. - * - * @param string $project - * @param string $policy - * - * @return string The formatted policy resource. - */ - public static function policyName(string $project, string $policy): string - { - return self::getPathTemplate('policy')->render([ - 'project' => $project, - 'policy' => $policy, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a project - * resource. - * - * @param string $project - * - * @return string The formatted project resource. - */ - public static function projectName(string $project): string - { - return self::getPathTemplate('project')->render([ - 'project' => $project, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_policy resource. - * - * @param string $project - * @param string $policy - * - * @return string The formatted project_policy resource. - */ - public static function projectPolicyName(string $project, string $policy): string - { - return self::getPathTemplate('projectPolicy')->render([ - 'project' => $project, - 'policy' => $policy, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - customConstraint: organizations/{organization}/customConstraints/{custom_constraint} - * - folder: folders/{folder} - * - folderPolicy: folders/{folder}/policies/{policy} - * - organization: organizations/{organization} - * - organizationPolicy: organizations/{organization}/policies/{policy} - * - policy: projects/{project}/policies/{policy} - * - project: projects/{project} - * - projectPolicy: projects/{project}/policies/{policy} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param ?string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, ?string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'orgpolicy.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Creates a custom constraint. - * - * Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the - * organization does not exist. - * Returns a `google.rpc.Status` with `google.rpc.Code.ALREADY_EXISTS` if the - * constraint already exists on the given organization. - * - * The async variant is {@see OrgPolicyClient::createCustomConstraintAsync()} . - * - * @example samples/V2/OrgPolicyClient/create_custom_constraint.php - * - * @param CreateCustomConstraintRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return CustomConstraint - * - * @throws ApiException Thrown if the API call fails. - */ - public function createCustomConstraint(CreateCustomConstraintRequest $request, array $callOptions = []): CustomConstraint - { - return $this->startApiCall('CreateCustomConstraint', $request, $callOptions)->wait(); - } - - /** - * Creates a policy. - * - * Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the - * constraint does not exist. - * Returns a `google.rpc.Status` with `google.rpc.Code.ALREADY_EXISTS` if the - * policy already exists on the given Google Cloud resource. - * - * The async variant is {@see OrgPolicyClient::createPolicyAsync()} . - * - * @example samples/V2/OrgPolicyClient/create_policy.php - * - * @param CreatePolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function createPolicy(CreatePolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('CreatePolicy', $request, $callOptions)->wait(); - } - - /** - * Deletes a custom constraint. - * - * Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the - * constraint does not exist. - * - * The async variant is {@see OrgPolicyClient::deleteCustomConstraintAsync()} . - * - * @example samples/V2/OrgPolicyClient/delete_custom_constraint.php - * - * @param DeleteCustomConstraintRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteCustomConstraint(DeleteCustomConstraintRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteCustomConstraint', $request, $callOptions)->wait(); - } - - /** - * Deletes a policy. - * - * Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the - * constraint or organization policy does not exist. - * - * The async variant is {@see OrgPolicyClient::deletePolicyAsync()} . - * - * @example samples/V2/OrgPolicyClient/delete_policy.php - * - * @param DeletePolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException Thrown if the API call fails. - */ - public function deletePolicy(DeletePolicyRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeletePolicy', $request, $callOptions)->wait(); - } - - /** - * Gets a custom constraint. - * - * Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the - * custom constraint does not exist. - * - * The async variant is {@see OrgPolicyClient::getCustomConstraintAsync()} . - * - * @example samples/V2/OrgPolicyClient/get_custom_constraint.php - * - * @param GetCustomConstraintRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return CustomConstraint - * - * @throws ApiException Thrown if the API call fails. - */ - public function getCustomConstraint(GetCustomConstraintRequest $request, array $callOptions = []): CustomConstraint - { - return $this->startApiCall('GetCustomConstraint', $request, $callOptions)->wait(); - } - - /** - * Gets the effective policy on a resource. This is the result of merging - * policies in the resource hierarchy and evaluating conditions. The - * returned policy will not have an `etag` or `condition` set because it is - * an evaluated policy across multiple resources. - * Subtrees of Resource Manager resource hierarchy with 'under:' prefix will - * not be expanded. - * - * The async variant is {@see OrgPolicyClient::getEffectivePolicyAsync()} . - * - * @example samples/V2/OrgPolicyClient/get_effective_policy.php - * - * @param GetEffectivePolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function getEffectivePolicy(GetEffectivePolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('GetEffectivePolicy', $request, $callOptions)->wait(); - } - - /** - * Gets a policy on a resource. - * - * If no policy is set on the resource, `NOT_FOUND` is returned. The - * `etag` value can be used with `UpdatePolicy()` to update a - * policy during read-modify-write. - * - * The async variant is {@see OrgPolicyClient::getPolicyAsync()} . - * - * @example samples/V2/OrgPolicyClient/get_policy.php - * - * @param GetPolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function getPolicy(GetPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('GetPolicy', $request, $callOptions)->wait(); - } - - /** - * Lists constraints that could be applied on the specified resource. - * - * The async variant is {@see OrgPolicyClient::listConstraintsAsync()} . - * - * @example samples/V2/OrgPolicyClient/list_constraints.php - * - * @param ListConstraintsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listConstraints(ListConstraintsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListConstraints', $request, $callOptions); - } - - /** - * Retrieves all of the custom constraints that exist on a particular - * organization resource. - * - * The async variant is {@see OrgPolicyClient::listCustomConstraintsAsync()} . - * - * @example samples/V2/OrgPolicyClient/list_custom_constraints.php - * - * @param ListCustomConstraintsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listCustomConstraints(ListCustomConstraintsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListCustomConstraints', $request, $callOptions); - } - - /** - * Retrieves all of the policies that exist on a particular resource. - * - * The async variant is {@see OrgPolicyClient::listPoliciesAsync()} . - * - * @example samples/V2/OrgPolicyClient/list_policies.php - * - * @param ListPoliciesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listPolicies(ListPoliciesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListPolicies', $request, $callOptions); - } - - /** - * Updates a custom constraint. - * - * Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the - * constraint does not exist. - * - * Note: the supplied policy will perform a full overwrite of all - * fields. - * - * The async variant is {@see OrgPolicyClient::updateCustomConstraintAsync()} . - * - * @example samples/V2/OrgPolicyClient/update_custom_constraint.php - * - * @param UpdateCustomConstraintRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return CustomConstraint - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateCustomConstraint(UpdateCustomConstraintRequest $request, array $callOptions = []): CustomConstraint - { - return $this->startApiCall('UpdateCustomConstraint', $request, $callOptions)->wait(); - } - - /** - * Updates a policy. - * - * Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the - * constraint or the policy do not exist. - * Returns a `google.rpc.Status` with `google.rpc.Code.ABORTED` if the etag - * supplied in the request does not match the persisted etag of the policy - * - * Note: the supplied policy will perform a full overwrite of all - * fields. - * - * The async variant is {@see OrgPolicyClient::updatePolicyAsync()} . - * - * @example samples/V2/OrgPolicyClient/update_policy.php - * - * @param UpdatePolicyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function updatePolicy(UpdatePolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('UpdatePolicy', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/OrgPolicy/v2/src/V2/gapic_metadata.json b/owl-bot-staging/OrgPolicy/v2/src/V2/gapic_metadata.json deleted file mode 100644 index cf604abda85c..000000000000 --- a/owl-bot-staging/OrgPolicy/v2/src/V2/gapic_metadata.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.orgpolicy.v2", - "libraryPackage": "Google\\Cloud\\OrgPolicy\\V2", - "services": { - "OrgPolicy": { - "clients": { - "grpc": { - "libraryClient": "OrgPolicyGapicClient", - "rpcs": { - "CreateCustomConstraint": { - "methods": [ - "createCustomConstraint" - ] - }, - "CreatePolicy": { - "methods": [ - "createPolicy" - ] - }, - "DeleteCustomConstraint": { - "methods": [ - "deleteCustomConstraint" - ] - }, - "DeletePolicy": { - "methods": [ - "deletePolicy" - ] - }, - "GetCustomConstraint": { - "methods": [ - "getCustomConstraint" - ] - }, - "GetEffectivePolicy": { - "methods": [ - "getEffectivePolicy" - ] - }, - "GetPolicy": { - "methods": [ - "getPolicy" - ] - }, - "ListConstraints": { - "methods": [ - "listConstraints" - ] - }, - "ListCustomConstraints": { - "methods": [ - "listCustomConstraints" - ] - }, - "ListPolicies": { - "methods": [ - "listPolicies" - ] - }, - "UpdateCustomConstraint": { - "methods": [ - "updateCustomConstraint" - ] - }, - "UpdatePolicy": { - "methods": [ - "updatePolicy" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/OrgPolicy/v2/src/V2/resources/org_policy_client_config.json b/owl-bot-staging/OrgPolicy/v2/src/V2/resources/org_policy_client_config.json deleted file mode 100644 index 70d2bff64dc2..000000000000 --- a/owl-bot-staging/OrgPolicy/v2/src/V2/resources/org_policy_client_config.json +++ /dev/null @@ -1,95 +0,0 @@ -{ - "interfaces": { - "google.cloud.orgpolicy.v2.OrgPolicy": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE", - "DEADLINE_EXCEEDED" - ] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "retry_policy_1_params": { - "initial_retry_delay_millis": 1000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 10000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": { - "CreateCustomConstraint": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "CreatePolicy": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "DeleteCustomConstraint": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "DeletePolicy": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetCustomConstraint": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetEffectivePolicy": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListConstraints": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListCustomConstraints": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListPolicies": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateCustomConstraint": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdatePolicy": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/OrgPolicy/v2/src/V2/resources/org_policy_descriptor_config.php b/owl-bot-staging/OrgPolicy/v2/src/V2/resources/org_policy_descriptor_config.php deleted file mode 100644 index 797825a2e765..000000000000 --- a/owl-bot-staging/OrgPolicy/v2/src/V2/resources/org_policy_descriptor_config.php +++ /dev/null @@ -1,208 +0,0 @@ - [ - 'google.cloud.orgpolicy.v2.OrgPolicy' => [ - 'CreateCustomConstraint' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\OrgPolicy\V2\CustomConstraint', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreatePolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\OrgPolicy\V2\Policy', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteCustomConstraint' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeletePolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetCustomConstraint' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\OrgPolicy\V2\CustomConstraint', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetEffectivePolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\OrgPolicy\V2\Policy', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\OrgPolicy\V2\Policy', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListConstraints' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getConstraints', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\OrgPolicy\V2\ListConstraintsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListCustomConstraints' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getCustomConstraints', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\OrgPolicy\V2\ListCustomConstraintsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListPolicies' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getPolicies', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\OrgPolicy\V2\ListPoliciesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateCustomConstraint' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\OrgPolicy\V2\CustomConstraint', - 'headerParams' => [ - [ - 'keyName' => 'custom_constraint.name', - 'fieldAccessors' => [ - 'getCustomConstraint', - 'getName', - ], - ], - ], - ], - 'UpdatePolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\OrgPolicy\V2\Policy', - 'headerParams' => [ - [ - 'keyName' => 'policy.name', - 'fieldAccessors' => [ - 'getPolicy', - 'getName', - ], - ], - ], - ], - 'templateMap' => [ - 'customConstraint' => 'organizations/{organization}/customConstraints/{custom_constraint}', - 'folder' => 'folders/{folder}', - 'folderPolicy' => 'folders/{folder}/policies/{policy}', - 'organization' => 'organizations/{organization}', - 'organizationPolicy' => 'organizations/{organization}/policies/{policy}', - 'policy' => 'projects/{project}/policies/{policy}', - 'project' => 'projects/{project}', - 'projectPolicy' => 'projects/{project}/policies/{policy}', - ], - ], - ], -]; diff --git a/owl-bot-staging/OrgPolicy/v2/src/V2/resources/org_policy_rest_client_config.php b/owl-bot-staging/OrgPolicy/v2/src/V2/resources/org_policy_rest_client_config.php deleted file mode 100644 index cb54175b8f87..000000000000 --- a/owl-bot-staging/OrgPolicy/v2/src/V2/resources/org_policy_rest_client_config.php +++ /dev/null @@ -1,241 +0,0 @@ - [ - 'google.cloud.orgpolicy.v2.OrgPolicy' => [ - 'CreateCustomConstraint' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=organizations/*}/customConstraints', - 'body' => 'custom_constraint', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CreatePolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*}/policies', - 'body' => 'policy', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=folders/*}/policies', - 'body' => 'policy', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=organizations/*}/policies', - 'body' => 'policy', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteCustomConstraint' => [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=organizations/*/customConstraints/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeletePolicy' => [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=projects/*/policies/*}', - 'additionalBindings' => [ - [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=folders/*/policies/*}', - ], - [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=organizations/*/policies/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetCustomConstraint' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=organizations/*/customConstraints/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetEffectivePolicy' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/policies/*}:getEffectivePolicy', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=folders/*/policies/*}:getEffectivePolicy', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=organizations/*/policies/*}:getEffectivePolicy', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetPolicy' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/policies/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=folders/*/policies/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=organizations/*/policies/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListConstraints' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*}/constraints', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=folders/*}/constraints', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=organizations/*}/constraints', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListCustomConstraints' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=organizations/*}/customConstraints', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListPolicies' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*}/policies', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=folders/*}/policies', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=organizations/*}/policies', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateCustomConstraint' => [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{custom_constraint.name=organizations/*/customConstraints/*}', - 'body' => 'custom_constraint', - 'placeholders' => [ - 'custom_constraint.name' => [ - 'getters' => [ - 'getCustomConstraint', - 'getName', - ], - ], - ], - ], - 'UpdatePolicy' => [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{policy.name=projects/*/policies/*}', - 'body' => 'policy', - 'additionalBindings' => [ - [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{policy.name=folders/*/policies/*}', - 'body' => 'policy', - ], - [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{policy.name=organizations/*/policies/*}', - 'body' => 'policy', - ], - ], - 'placeholders' => [ - 'policy.name' => [ - 'getters' => [ - 'getPolicy', - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/OrgPolicy/v2/tests/Unit/V2/Client/OrgPolicyClientTest.php b/owl-bot-staging/OrgPolicy/v2/tests/Unit/V2/Client/OrgPolicyClientTest.php deleted file mode 100644 index 40bcc9e397c2..000000000000 --- a/owl-bot-staging/OrgPolicy/v2/tests/Unit/V2/Client/OrgPolicyClientTest.php +++ /dev/null @@ -1,942 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return OrgPolicyClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new OrgPolicyClient($options); - } - - /** @test */ - public function createCustomConstraintTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $condition = 'condition-861311717'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $expectedResponse = new CustomConstraint(); - $expectedResponse->setName($name); - $expectedResponse->setCondition($condition); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->organizationName('[ORGANIZATION]'); - $customConstraint = new CustomConstraint(); - $request = (new CreateCustomConstraintRequest()) - ->setParent($formattedParent) - ->setCustomConstraint($customConstraint); - $response = $gapicClient->createCustomConstraint($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.orgpolicy.v2.OrgPolicy/CreateCustomConstraint', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getCustomConstraint(); - $this->assertProtobufEquals($customConstraint, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createCustomConstraintExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->organizationName('[ORGANIZATION]'); - $customConstraint = new CustomConstraint(); - $request = (new CreateCustomConstraintRequest()) - ->setParent($formattedParent) - ->setCustomConstraint($customConstraint); - try { - $gapicClient->createCustomConstraint($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $etag = 'etag3123477'; - $expectedResponse = new Policy(); - $expectedResponse->setName($name); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $policy = new Policy(); - $request = (new CreatePolicyRequest()) - ->setParent($formattedParent) - ->setPolicy($policy); - $response = $gapicClient->createPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.orgpolicy.v2.OrgPolicy/CreatePolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getPolicy(); - $this->assertProtobufEquals($policy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $policy = new Policy(); - $request = (new CreatePolicyRequest()) - ->setParent($formattedParent) - ->setPolicy($policy); - try { - $gapicClient->createPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteCustomConstraintTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->customConstraintName('[ORGANIZATION]', '[CUSTOM_CONSTRAINT]'); - $request = (new DeleteCustomConstraintRequest()) - ->setName($formattedName); - $gapicClient->deleteCustomConstraint($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.orgpolicy.v2.OrgPolicy/DeleteCustomConstraint', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteCustomConstraintExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->customConstraintName('[ORGANIZATION]', '[CUSTOM_CONSTRAINT]'); - $request = (new DeleteCustomConstraintRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteCustomConstraint($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deletePolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->policyName('[PROJECT]', '[POLICY]'); - $request = (new DeletePolicyRequest()) - ->setName($formattedName); - $gapicClient->deletePolicy($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.orgpolicy.v2.OrgPolicy/DeletePolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deletePolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->policyName('[PROJECT]', '[POLICY]'); - $request = (new DeletePolicyRequest()) - ->setName($formattedName); - try { - $gapicClient->deletePolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getCustomConstraintTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $condition = 'condition-861311717'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $expectedResponse = new CustomConstraint(); - $expectedResponse->setName($name2); - $expectedResponse->setCondition($condition); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->customConstraintName('[ORGANIZATION]', '[CUSTOM_CONSTRAINT]'); - $request = (new GetCustomConstraintRequest()) - ->setName($formattedName); - $response = $gapicClient->getCustomConstraint($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.orgpolicy.v2.OrgPolicy/GetCustomConstraint', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getCustomConstraintExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->customConstraintName('[ORGANIZATION]', '[CUSTOM_CONSTRAINT]'); - $request = (new GetCustomConstraintRequest()) - ->setName($formattedName); - try { - $gapicClient->getCustomConstraint($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getEffectivePolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $etag = 'etag3123477'; - $expectedResponse = new Policy(); - $expectedResponse->setName($name2); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->policyName('[PROJECT]', '[POLICY]'); - $request = (new GetEffectivePolicyRequest()) - ->setName($formattedName); - $response = $gapicClient->getEffectivePolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.orgpolicy.v2.OrgPolicy/GetEffectivePolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getEffectivePolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->policyName('[PROJECT]', '[POLICY]'); - $request = (new GetEffectivePolicyRequest()) - ->setName($formattedName); - try { - $gapicClient->getEffectivePolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $etag = 'etag3123477'; - $expectedResponse = new Policy(); - $expectedResponse->setName($name2); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->policyName('[PROJECT]', '[POLICY]'); - $request = (new GetPolicyRequest()) - ->setName($formattedName); - $response = $gapicClient->getPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.orgpolicy.v2.OrgPolicy/GetPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getPolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->policyName('[PROJECT]', '[POLICY]'); - $request = (new GetPolicyRequest()) - ->setName($formattedName); - try { - $gapicClient->getPolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listConstraintsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $constraintsElement = new Constraint(); - $constraints = [ - $constraintsElement, - ]; - $expectedResponse = new ListConstraintsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setConstraints($constraints); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $request = (new ListConstraintsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listConstraints($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getConstraints()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.orgpolicy.v2.OrgPolicy/ListConstraints', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listConstraintsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $request = (new ListConstraintsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listConstraints($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listCustomConstraintsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $customConstraintsElement = new CustomConstraint(); - $customConstraints = [ - $customConstraintsElement, - ]; - $expectedResponse = new ListCustomConstraintsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setCustomConstraints($customConstraints); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->organizationName('[ORGANIZATION]'); - $request = (new ListCustomConstraintsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listCustomConstraints($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getCustomConstraints()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.orgpolicy.v2.OrgPolicy/ListCustomConstraints', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listCustomConstraintsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->organizationName('[ORGANIZATION]'); - $request = (new ListCustomConstraintsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listCustomConstraints($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listPoliciesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $policiesElement = new Policy(); - $policies = [ - $policiesElement, - ]; - $expectedResponse = new ListPoliciesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setPolicies($policies); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $request = (new ListPoliciesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listPolicies($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getPolicies()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.orgpolicy.v2.OrgPolicy/ListPolicies', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listPoliciesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $request = (new ListPoliciesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listPolicies($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateCustomConstraintTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $condition = 'condition-861311717'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $expectedResponse = new CustomConstraint(); - $expectedResponse->setName($name); - $expectedResponse->setCondition($condition); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $customConstraint = new CustomConstraint(); - $request = (new UpdateCustomConstraintRequest()) - ->setCustomConstraint($customConstraint); - $response = $gapicClient->updateCustomConstraint($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.orgpolicy.v2.OrgPolicy/UpdateCustomConstraint', $actualFuncCall); - $actualValue = $actualRequestObject->getCustomConstraint(); - $this->assertProtobufEquals($customConstraint, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateCustomConstraintExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $customConstraint = new CustomConstraint(); - $request = (new UpdateCustomConstraintRequest()) - ->setCustomConstraint($customConstraint); - try { - $gapicClient->updateCustomConstraint($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updatePolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $etag = 'etag3123477'; - $expectedResponse = new Policy(); - $expectedResponse->setName($name); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $policy = new Policy(); - $request = (new UpdatePolicyRequest()) - ->setPolicy($policy); - $response = $gapicClient->updatePolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.orgpolicy.v2.OrgPolicy/UpdatePolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getPolicy(); - $this->assertProtobufEquals($policy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updatePolicyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $policy = new Policy(); - $request = (new UpdatePolicyRequest()) - ->setPolicy($policy); - try { - $gapicClient->updatePolicy($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createCustomConstraintAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $condition = 'condition-861311717'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $expectedResponse = new CustomConstraint(); - $expectedResponse->setName($name); - $expectedResponse->setCondition($condition); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->organizationName('[ORGANIZATION]'); - $customConstraint = new CustomConstraint(); - $request = (new CreateCustomConstraintRequest()) - ->setParent($formattedParent) - ->setCustomConstraint($customConstraint); - $response = $gapicClient->createCustomConstraintAsync($request)->wait(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.orgpolicy.v2.OrgPolicy/CreateCustomConstraint', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getCustomConstraint(); - $this->assertProtobufEquals($customConstraint, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/OsConfig/v1/proto/src/GPBMetadata/Google/Cloud/Osconfig/V1/Inventory.php b/owl-bot-staging/OsConfig/v1/proto/src/GPBMetadata/Google/Cloud/Osconfig/V1/Inventory.php deleted file mode 100644 index 5d339f5b4ca1f94aa05a0206c3ebe3b023254fc2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4419 zcmbtYOLG%P5JvI~^%`R@U=%^Y+E8Uf1t~Tpxa2sLWXnduu@pZBoHi#BSMeN7*1I zaWs$Am0DNvT12rO%d>RLP-=doK^#T5+BP+alU9_qlCo9WRSIjx-5C^hE#J{eR%u#R z(;yk$u>5+)a&^mW&}OEykfCOWn4aZy(_ATlskMn~YdTRj%K7hzr`0u2t8Q@l>ME13 zmIC=|WnmdWH#FB(ilH8O3kv?(e$Ak|;(D5g|L#&(r6%>LX3#h2$BNR>440tv@x2Y- z)IDmM3KJ-qI+?$x2%T*2UE4yxSCr7AGJ^tPs1{9+IHqP)*NCe-)JC7mxHX$?5-$Rf zt<2vGj%Dg-Lzx#gX0ykPTv0s7C;g`@ibFi#F_*dBOu=FFt9k-nIh$73DKYAK($YHA zaCQsxvp|Pt(~J|qA*hrT!Dw*) zBwTD+uE%{!FrU!FgkhOYl`qBlk__OsEXNaT+;#afjCF|P;??7)CgiIyt~q)Oz0r~M zBss!Gr(t3rZyGVwaQEnub%z*4b4hZHuit{{Frcc|#AFl6U1Z-=?}lNR`Hv>WX`KU} zke`BNIkZVll?4x>jLlChJ`7PfMw7lMFjeUimt};OGa%^>iST4+N{eUU$prcXz#u$Z zU>SzFkqn-R#Rmf$$;~Un6gBap8V0GWn0EIOq9g-U8qD1ttKl7J4k-)Krx#?@sC6`I zXf=aG8d)gLt8w-TKp&tt;CgAhxKZ3vcVCnX>fY8)xv*MXFBaA&FCb+mi(8e#)^2J0 zg}PlRm$r8&W3%7FFn1Qeo*;7#rixoTySdHH!kSvntv<_b6eeRbF6Sz_;$|+tS%{Y7 z`2>vBu_{r+P5nIrmyh@_KLe@jw7cd3uZAc4;v)2y`#GUu6x&kbotS4ty>0QjmFR z5IxVSS+@?{J)Zx1VW?I?det~e=E5gv{NAVf{yKeKFfpYN;!v~MQ;$*BG2Pq2_00s@XQSK-m9aLKRu$t4}aF*OPvFp`Z07m^?~VmZ<~tMM7sxIG(>n>hDYQ zJnyF}AoT@M#yo7ZND56N=VMJlM@SRPZomFTsdMJ%a?f{t8I-pl4%H2`g*ZSc(%Vaq$FJO1C}%zK=MR{>Y5gz!RBOvYM(n z*r8&oq;(e!A41&FAlJ8TRvvxFNJ<<`+}ySt+=extExUL@*k&xQLAk)%wqbSKtQP7m&1?p>9(X=Dqc)`$;M&Qq^w-YuprPSF zrhbmWOdxamEnvaZG1W2rS<2)X91jXoqh)z&gT6+zg0O!9<3Rxv4GSa8ne{UDOAO?| zqCS!{4%ew`8(LQ|PuPK2hO1$_AqaxF^BKc!A-tl2sm}FmVI5S^JWYkPVO2WK8eA5% z7BOtqpys}4Yw#98Ul%69&_3w~SUiT2j%N6x4Urb-Lw*0%hGgSQv8?$aw+}O62NZ~6 zH|wTxYRg33qr8r--4EDkxtX`YufvRCiS&VM;m<>y*sxu|u?QE#pKLK0<7R(~!Icf- zMT)n{D<3BT`EkGs4r~72`&|5=+?_!T`x1sblpF*-Saogy?<=@}_Kz4$Z&Ek11n+Ur zmQfpf7Sj^|=c{wvoEf;yCRraFbf-px*)k&X9J_kfJ_$SC z2^eiq0|!Y#idh4$A9KOAEz>3P5=bHFEJMY3hPpEVI5JY&B(GW7j!x&4zP|>SqOdUt z=%eGc_(nBxJxF) zR$bB;dsERJ5z(?u*VIfy?0JI$u|>@sTe?APNfav$vEJy2a;4gN1GhS+XKSP&4o!1t zkUN@Tdi^`5qnVR|KD=|hg})WcG<0n$F;IYsIwp>#YDC;^mTJUR`>LyUciH}KneOj4 z{Qcd7tp@;_p*oJ(aGDGTz5x;cSzZr8MaNZL{O_jjDEdTqb=A9;p66R*831_CuH6UaihI&q0TQH^eeIGU|nu4y;%(?VfL z+!=rL&E{?YSPG{P#7!<^p>R&fZPB$o5Rv!s(bBs+Ix+es zGE$Fq(=HTFZgm2}F7@t1-M>Py-=9gmgKFKJok35$1%GeA=8Ni6$nq~GrgkAuud9Y(ex*!I~o~chD zY8?$3L#h0OIqo7gRqaR}k^p+|lF$LLiDf!Em6p+*%0HY3vNhWsLfwNH`I=}*_Y%^5 ze;zy;_nk%>phYrj=R~5Ge1eqwB?2+}N~l8ICS%j(T1e$ToJTy0AhpuI3=f6#&E3R70^;cf?eX#J8`(DmONL;t&#%S|1Pa>#Q4HA?Dz(NY{@ z?$jc=?~<@~#*le$}+V*BP_TI9-47!sG#w#L~w^UZ~% zY&Cr;X;en5T4s<7Nx5s9yTs*EjvYOlSX|0lySjHNr$7{yB*+lw8G*ULe5pX9&d)7z z9g>!37)qaDQlY6Tk;_69tx8yj*qI1Vk4C2c-=ooBE;{-;#JS#|v&iYbXz>e(B5^NE zXpARV?V%;RI-!I`H+PmouI^OjO6HP~hGeyl z3;X-{xFn=txh2;c2lx;vWnk5rIxZPw3}qQE_v11M=TnpLIj{&q%Z^lje;#)_4<;2Y z_v9^_EP_+_r{=IY_@OsG1+LCw0gc9~d}Bf3xmlb#0_8_X_QThr-ATjfjyqeS|Y&d=9Tn{p5mHyJt zxCiM|ioYPT@VdnaRU4(1a1omOCkiX!DiG6P;u!llYzu>uZF?Rg31dn0fh)HT%VaVz zv03#!b}`W0&sbklbm3!&4KPvs*93!sB!fwcwUnGBe6s>E)gC&iV2qrC1}WCMS=bz6 zaX{;h)qHg!P9)aOazM^c7BZ&iTAr)W+wkI)HaN+R2Bbn?3)kUlwce3i&6bRR&qVD6 z#OjT@jK-dX%k4dRe?JouRsougPvsVWj+PQZQqKJrffbr%gS!1Ckhu=aIDBx?g=cJH zjy|ci`E3v3GA~>?nesejh6TQ$YQ@GD6W>^OXoKhY0prPh$q%y~(%Y8n9b^(9UM#WS z5kY{}as%0~ciKv=*eUO2LUfkaAZ-U7Fst3aUxIYNE$eKB8m#L$#GB&m$M!R_Ij54)Gp3XyS1ZL%wNXbp)*vO< zcN(p-T%-I%Nmnm{%ICK;W_(Mre8_N^B;bY7QMP54sMJuFr zr=jB+j!X|Q3>SvsAAmoF8LphUaOoewp(ozz(~WIPDe=WS+THhl@3+5w@9o>~x_d6X zDs2*ncm^XqY4<>4dqi?Q%BV?gX?NJ~6HhYfzH8aUlO?IHNlmRIsr5$Z72N96p=T0B z8c;g0Ny)V7uvenKNu9nmDBWAbvF=jaG7oga_pO1mPaLLu#HAkd<-iYsW9$>(HB2IH zwyIl%89jp;-Oa#cx5iC&wa8?5XKfw8w9%NP`K`cmB{94m+Jy%o;m;lJqGQQt2E)Hq z%hxT(VwPcBUt*{?rM_YN1g%Z3?GGK3S=5pE2F)=^@v0Qss{8 zgo;O8VsT92f`Sc&O~SPHbR}++FNR2gxB+uq<2gYRiVM{ne^fG$D`mKzfC#;ye_zI{ zR+?q5@UsA`cPxLVKR0N6G+2iIUn1O^(`lN zRy+%fm}N0n4;|g=<>onW`M&_fID|3dE3lM?fQtj2ixjeHI66;pp?;RjcVoX3mob5U zIH@NSsarW6wz+ZfGMqo`5KE2WQzz2t*8*HhfyQ@TPdCM+fBOFbjH!x~XbL$0=p^K4 zPm3>)iy{GHDw@u4u~ym@|DF1tsLD`obn zQV7zM_`Lut5#cY7Tpa0$PugPJZ4b~T;DpD|2;EJ6$!=P3NXhG+^~== zm%kE@9Oa}$V=!_Dfr#heH1Ry@=~(K0tP)|0EPR7NgZUN6c0OvU`rT%`rPdl74Yi&< zhV=t>Dt8+7N~fVUvjXPnvvsxI*jDR$yHn|?dhM24yPeJ8HMsEPgxcKDwrlE^+U#VH zi$z#{ayrAcko(gjCRFE~l7Q8;>owZ-% zsc!U)z;{GA*~N#%qs&X;MnwsBDoQ-7C^%ce6!BmBrB9BO@!fee&*+<1lJ@vo_(T|c UQSef0nNwa9!OF1bAHfLVZ%TKx6gNrfpA%Zj0pn>Jij z%ETm&=8=xl-d4O#qS%h*S-NE??f%9FaTML^+0-CTT2YEMWwo}Zl!}$L3n=PZeMcub zrE6JTgJg8W>UT1ht6Syn@L^qk7aOlLrDo8bGZ>EZ!4bDC&Q;JibK4YdMTMa<=5^WIQtNWH3aTU5vxM=?;kHZi&DpLUxTJt39n}kC)|Ky7m$EnUn8yLZU2VkflP`GDlyA@6N&X z!$g-P3#l}Z$#f8t>8*vt86QuxX~yxLEkZJpdihcQ&h!g*3csnCHqdeY{ zNDVp4CvQPKNK}-#a!iS(;@PBs#Ze2UgHx7bPx4XeGdM;~^f+b>b%Pq15#$Mkjb|5M zjxfk!>57kmEIf*Ik+L0&O&Dly!x(z48 z72P3N3RGrWd5RyI2#yR~lMWd!#L>W*ySwrm0&IgZFPI6arW8K8{tF|_88 zEqukB3_u)m3Z~ndOAKlf84z(=OrM0Q4lxK8FF8J#J;~P<)ed@d5HD#^0PQ2 zE}!@*0@GEkO^hb-q)%beU}G2A!Z?sWkk$cAnh)HP={ehpYY-p$l;RM3NVa`4&ccx` z&FB+B!(8-6B=Jua=ALH)6VVKVi%d&3n5U+0^tl^-U87vr_Yb8j10;`j0g3=PB;W&x zQ*#UJyydW9n&8Tn4y4@k2EfP=aNCJRmrhH;aci?!3x=!C_1ww82J6N!}h2z=O-l{IsN2F78>I9n}(-SA%gyTJGs$Xl= zQ-hqw4~%Ee1V~}z1SN@!CJi_`OmyiSoN3gm)!O=++FZ-8mDKgsX1!FXELTd!`8T9v z5U;GN^+v7SC^eh&5or#fkY6p7s@2MBc|I!5!i@io`(y00xn3xgN=5vf$o&v`n*TNe z?}nv7c{CP-?7Fq9go_?JZY+{|Ntw39I`omW+y3x+$`=Iu_qxE!R^;ofg2 z`D6kvjviIBSqqB32--kt1x}6w5RtQ#d6vI=psRcifHzfp#M`tw+&^>Ka^Ro+Wd2N(7VZY2S6iI#o zXUoLfTg^{~Te77rH~oRaIr)7A-mX%2%o*-~;NjyiV{2Way7;@1-}wkDD16GZ9uiZy zCHW(IWKShr+cI4u-Gfu(d>b?v2V#qK8jhLdk*5x6!W-D+uMv1>ye195^*FADX@gBzk0iPFr= za@QI>s9-MQZz|#kmfc_qYC~!7mF=? zR(TqIO9SLZV_)hWQumd{){{m1e B3(f!l diff --git a/owl-bot-staging/OsConfig/v1/proto/src/GPBMetadata/Google/Cloud/Osconfig/V1/OsconfigCommon.php b/owl-bot-staging/OsConfig/v1/proto/src/GPBMetadata/Google/Cloud/Osconfig/V1/OsconfigCommon.php deleted file mode 100644 index 56df5d202f1f7c2b6971af95aa1f6ae72966706f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 889 zcmb7CO^Xvj5H-P#&eZWi@9eF<(c}dzQKDfMGf2OJy+P1MS;bWWX_e<_ zfUB(*1)2z85yPkW3f?a+ub#QlQdNc{g^g010!O@1RW?#3S27oy(e1eXzIGg2B_mHw zh-6zVHRA}&)$Ai$mNCncrDsXzHA@ojSd#U4LI^KdSwd5rdouE!fO~Y67J@@*nRTyY zQC){8d&ozSx3;DeIShkFN)JR%!I}#9w*wfom5~##yC%46zr3`(Ve7^KusQrdJWU60eA aPwwlJ_O>sBWqS_)(_N1YM&6M-LjD51`yht^ diff --git a/owl-bot-staging/OsConfig/v1/proto/src/GPBMetadata/Google/Cloud/Osconfig/V1/OsconfigService.php b/owl-bot-staging/OsConfig/v1/proto/src/GPBMetadata/Google/Cloud/Osconfig/V1/OsconfigService.php deleted file mode 100644 index 82c4921ead68..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/GPBMetadata/Google/Cloud/Osconfig/V1/OsconfigService.php +++ /dev/null @@ -1,47 +0,0 @@ -internalAddGeneratedFile( - ' -Œ -/google/cloud/osconfig/v1/osconfig_service.protogoogle.cloud.osconfig.v1google/api/resource.proto0google/cloud/osconfig/v1/patch_deployments.proto)google/cloud/osconfig/v1/patch_jobs.protogoogle/protobuf/empty.protogoogle/api/annotations.proto2¬ -OsConfigService -ExecutePatchJob0.google.cloud.osconfig.v1.ExecutePatchJobRequest".google.cloud.osconfig.v1.PatchJob"4‚Óä“.")/v1/{parent=projects/*}/patchJobs:execute:*‘ - GetPatchJob,.google.cloud.osconfig.v1.GetPatchJobRequest".google.cloud.osconfig.v1.PatchJob"0ÚAname‚Óä“#!/v1/{name=projects/*/patchJobs/*}š -CancelPatchJob/.google.cloud.osconfig.v1.CancelPatchJobRequest".google.cloud.osconfig.v1.PatchJob"3‚Óä“-"(/v1/{name=projects/*/patchJobs/*}:cancel:*¤ - ListPatchJobs..google.cloud.osconfig.v1.ListPatchJobsRequest/.google.cloud.osconfig.v1.ListPatchJobsResponse"2ÚAparent‚Óä“#!/v1/{parent=projects/*}/patchJobsà -ListPatchJobInstanceDetails<.google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest=.google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse"DÚAparent‚Óä“53/v1/{parent=projects/*/patchJobs/*}/instanceDetailsì -CreatePatchDeployment6.google.cloud.osconfig.v1.CreatePatchDeploymentRequest).google.cloud.osconfig.v1.PatchDeployment"pÚA+parent,patch_deployment,patch_deployment_id‚Óä“<"(/v1/{parent=projects/*}/patchDeployments:patch_deployment­ -GetPatchDeployment3.google.cloud.osconfig.v1.GetPatchDeploymentRequest).google.cloud.osconfig.v1.PatchDeployment"7ÚAname‚Óä“*(/v1/{name=projects/*/patchDeployments/*}À -ListPatchDeployments5.google.cloud.osconfig.v1.ListPatchDeploymentsRequest6.google.cloud.osconfig.v1.ListPatchDeploymentsResponse"9ÚAparent‚Óä“*(/v1/{parent=projects/*}/patchDeployments  -DeletePatchDeployment6.google.cloud.osconfig.v1.DeletePatchDeploymentRequest.google.protobuf.Empty"7ÚAname‚Óä“**(/v1/{name=projects/*/patchDeployments/*}î -UpdatePatchDeployment6.google.cloud.osconfig.v1.UpdatePatchDeploymentRequest).google.cloud.osconfig.v1.PatchDeployment"rÚApatch_deployment,update_mask‚Óä“M29/v1/{patch_deployment.name=projects/*/patchDeployments/*}:patch_deploymentº -PausePatchDeployment5.google.cloud.osconfig.v1.PausePatchDeploymentRequest).google.cloud.osconfig.v1.PatchDeployment"@ÚAname‚Óä“3"./v1/{name=projects/*/patchDeployments/*}:pause:*½ -ResumePatchDeployment6.google.cloud.osconfig.v1.ResumePatchDeploymentRequest).google.cloud.osconfig.v1.PatchDeployment"AÚAname‚Óä“4"//v1/{name=projects/*/patchDeployments/*}:resume:*KÊAosconfig.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformBÔ -com.google.cloud.osconfig.v1B OsConfigProtoZ8cloud.google.com/go/osconfig/apiv1/osconfigpb;osconfigpbªGoogle.Cloud.OsConfig.V1ÊGoogle\\Cloud\\OsConfig\\V1êGoogle::Cloud::OsConfig::V1êA• -compute.googleapis.com/Instance4projects/{project}/zones/{zone}/instances/{instance}internalAddGeneratedFile( - ' -Ý -5google/cloud/osconfig/v1/osconfig_zonal_service.protogoogle.cloud.osconfig.v1google/api/client.proto(google/cloud/osconfig/v1/inventory.proto;google/cloud/osconfig/v1/os_policy_assignment_reports.proto4google/cloud/osconfig/v1/os_policy_assignments.proto,google/cloud/osconfig/v1/vulnerability.proto#google/longrunning/operations.proto2¬ -OsConfigZonalService¾ -CreateOSPolicyAssignment9.google.cloud.osconfig.v1.CreateOSPolicyAssignmentRequest.google.longrunning.Operation"ÇÊA9 -OSPolicyAssignment#OSPolicyAssignmentOperationMetadataÚA3parent,os_policy_assignment,os_policy_assignment_id‚Óä“O"7/v1/{parent=projects/*/locations/*}/osPolicyAssignments:os_policy_assignmentÀ -UpdateOSPolicyAssignment9.google.cloud.osconfig.v1.UpdateOSPolicyAssignmentRequest.google.longrunning.Operation"ÉÊA9 -OSPolicyAssignment#OSPolicyAssignmentOperationMetadataÚA os_policy_assignment,update_mask‚Óä“d2L/v1/{os_policy_assignment.name=projects/*/locations/*/osPolicyAssignments/*}:os_policy_assignmentÅ -GetOSPolicyAssignment6.google.cloud.osconfig.v1.GetOSPolicyAssignmentRequest,.google.cloud.osconfig.v1.OSPolicyAssignment"FÚAname‚Óä“97/v1/{name=projects/*/locations/*/osPolicyAssignments/*}Ø -ListOSPolicyAssignments8.google.cloud.osconfig.v1.ListOSPolicyAssignmentsRequest9.google.cloud.osconfig.v1.ListOSPolicyAssignmentsResponse"HÚAparent‚Óä“97/v1/{parent=projects/*/locations/*}/osPolicyAssignmentsü -ListOSPolicyAssignmentRevisions@.google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsRequestA.google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsResponse"TÚAname‚Óä“GE/v1/{name=projects/*/locations/*/osPolicyAssignments/*}:listRevisionsü -DeleteOSPolicyAssignment9.google.cloud.osconfig.v1.DeleteOSPolicyAssignmentRequest.google.longrunning.Operation"…ÊA< -google.protobuf.Empty#OSPolicyAssignmentOperationMetadataÚAname‚Óä“9*7/v1/{name=projects/*/locations/*/osPolicyAssignments/*}ê -GetOSPolicyAssignmentReport<.google.cloud.osconfig.v1.GetOSPolicyAssignmentReportRequest2.google.cloud.osconfig.v1.OSPolicyAssignmentReport"YÚAname‚Óä“LJ/v1/{name=projects/*/locations/*/instances/*/osPolicyAssignments/*/report}€ -ListOSPolicyAssignmentReports>.google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsRequest?.google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsResponse"^ÚAparent‚Óä“OM/v1/{parent=projects/*/locations/*/instances/*/osPolicyAssignments/*}/reportsª - GetInventory-.google.cloud.osconfig.v1.GetInventoryRequest#.google.cloud.osconfig.v1.Inventory"FÚAname‚Óä“97/v1/{name=projects/*/locations/*/instances/*/inventory}Ä -ListInventories0.google.cloud.osconfig.v1.ListInventoriesRequest1.google.cloud.osconfig.v1.ListInventoriesResponse"LÚAparent‚Óä“=;/v1/{parent=projects/*/locations/*/instances/*}/inventoriesÒ -GetVulnerabilityReport7.google.cloud.osconfig.v1.GetVulnerabilityReportRequest-.google.cloud.osconfig.v1.VulnerabilityReport"PÚAname‚Óä“CA/v1/{name=projects/*/locations/*/instances/*/vulnerabilityReport}è -ListVulnerabilityReports9.google.cloud.osconfig.v1.ListVulnerabilityReportsRequest:.google.cloud.osconfig.v1.ListVulnerabilityReportsResponse"UÚAparent‚Óä“FD/v1/{parent=projects/*/locations/*/instances/*}/vulnerabilityReportsKÊAosconfig.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformBÉ -com.google.cloud.osconfig.v1BOsConfigZonalServiceProtoPZ8cloud.google.com/go/osconfig/apiv1/osconfigpb;osconfigpbªGoogle.Cloud.OsConfig.V1ÊGoogle\\Cloud\\OsConfig\\V1êGoogle::Cloud::OsConfig::V1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/GPBMetadata/Google/Cloud/Osconfig/V1/PatchDeployments.php b/owl-bot-staging/OsConfig/v1/proto/src/GPBMetadata/Google/Cloud/Osconfig/V1/PatchDeployments.php deleted file mode 100644 index 39309081323defe69e250901dfd5dd527826407c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4584 zcmcIo-BQ~|6s}G9@iD`XI!O&=TGdS(m=rmXCeu+uQ~&Xk1Wdt@NyZ(Ikk+6?mQ+cm zaWdSt5766AAD|D>2k1>-q1Tx{L9crDtYm|1f|F^uLDuf~?b&m_bM|QO-FJ^%_)K17 zHuJQA8S+6}4vv`YdQRZzjwK(o8V%;jy3=$`i+PGHmn!mBr7D+88`Vz{>N_n@XR3VY zIENO?>6X(na*nS%cEdc(9WUivEzpnZ26HW^-DGy)D?|=pYfa|6n$G04?ZPGtG(!ut z+8XiHikzob33+P!OLqZuOY?nsoAZ^rbnpsf{Bv6emZ{5rpauBvn(5a~+YC(2GGF4h zR^*0e`3y;V=Qdil9+-|Tb3nz`+5CbmIQiUbu7hq^kt4&lxo6NTwGBI9o~>E667zM> zbOXoR#;K}$$bybP`J4HLa9K`gHspC>qpJ28xgrN%i=AFwmOU13FKz-Bp+5Jm?M!!#OajCr&kr&jaVcAAISKPfIOSA%@}|ptS2v z&42z5*s6(2478>@IJVk$S*?UA6Cn1jVQr`JBV%u2DlNy&bQ*@%?!O)>b@3ZB)Mef< zIx<|v+@0?Ths)?X{5l6W-!^Hbj6f)q=1P?2%JI_dOvt6VX3h&`Br<(=;eutJp;*GH zABR(^L|~TXj8GBbcvNOO;|(tMdK2Rw&iEwGzyn0V4JXWo69SB24oeP2FdUmZI~Ini z-ymnDSct*wKO-<1t4z{3T;eq@laLehDJcVKBdipt@Jy1wEDZgfPe>18(zMY;EIsvx zX<=E(4B=>cc~KGe^txN2wKhT&h8IDcEGc~p<1STPQGqj;i0ShSn2J=cg*i82Eb@A0 zn9ws3I&!-bC2F*RX~$-D?vuK&A2Fk4vCIfT7b0knVw8%_xT1GM0GYr3fwTpZ$Mlxx znf76qZIsw$H@4ztqk}kvaZZ%&m*Y~z|x68$i)s1p#>H`U2BwwsODiVwy5hLZxoSfsA(I!wm&Bi)Aa zGk)i3mtMXg(#h;k!!X?=9%&I$BTCff&bo|88>3vuU~`|73@4V)MjPW?X>b^YC;M{(CSzWc9>6q*bHQ*b z@_s1k3!+ElL`UpcoHLLjJgJY%d^j8_Ou+c*1+vFtH(d(!*f`nYc!r66GnpXZ@r`og zH*Zw>2tX{?@L52|B~c}^e9~Ylrx~6E9_=a!E3L7_U!t)94=RNogIX;xoci{SAVTnJi-Z6lT^~5F3hivvRt} zDCB4_3xn6<>@NwJdt~}?dOza-U%Yh%QZ9P4?&G%@`AEcy2a(9})!4CfG5-NC(!%TH1*IAsHMW!dlHYKd7aVDHK4zoAC=sJl34fqvo< z$JyZ9Bk`Q-V|b5D&hK|Jb-tcBDv_<#U~XG$`R~gC=wSTRY&G8#f8h^wFm@j2o=t_R znB)DYUyH*qYPhj&Idr=B7}(3;RYug{xCeK;kH04~YjkI!6#1QnQt?GIt?V!T84cCK z`wYC$5Q8OqFwp{IVM%f*=OHfIpvUBDu#W?&<07@9Un~ zPk-y~yYQC0&1~iw0UOA@13B1dvgG?&j6~H!z%y*4Gleb%& z_gG*IjKJ90<_dPIq+myl6ztr;c^jZ_8NM&KNYNLl2fhUv|G8n$GW)V07y>UW`+@1$G6|@5pRHe)g-%-gw(H=*Ka*pNTI37#!%p1} zm}eW-PL26}&vXOFYvIyzd5;An57Nl`^=MmCXYR`D!p3rW%E-^;zzf;QKonQH@0bJhRkPfJVWpI>Vu3pMC$4 zV{0KMAI9S)L^~$tQeX_-<7Ig)Z+vb>k*f>_qd;w8KCh2lOOCzgULqA6AuSDxPb}$P!29dL(`Ky!jLF^H+ zpzwzzTvDE~ei*PAK^pryM6XFzSac1K*+D)bC)U%OAN*9Adr`Ro@ADJIh7S$f*hA=x zjqpf*5iQ)n=zYcdfpi`+g9r~8!u%X*lJ3HaX=7XvTl%hPA#U>La3WK>5viGWT9I2< zkEAdbDm=%Q3d%lSNU$Naw-+XsWh>=&;V(h1(RX; z2k1QsAbl93^(`8igOWAaaNChRo1d$RAW=baz>F*#vf<^>r-4BOD!#jv5^OG~2K88j_ zXl{6r%Lig>E29pbjvy&3;fc)fP%Rf0!d7PBqgTlahYFm!M zt>E5b)M29(74M*N%HH^^rj`KIwz$!;3Bc<^fYBpQhFUO82!i7vy?>KAmW38j@5qh_>@dZ z=^c2(MWPl7g;l_vTt-+;O7FrI*YT+=5%(Rpj>st~VNYs1I%YAZEkXxdtZCCISCdp{ z7X(3Egw=MZ(oytov)xjv^{u*6%e^9H;2aKX9sH5NK5eDm#GlQoqBm6aZnu@2L$*w{ zDxK<`dUHFMl$Igg?pCXcQbUP(=`vibs`pwA1r_KI>YY2fqG_tu&MlB!l{7VQ;UdX( z>i2Mw+U?}dmDQgsjnmr~X&w77>LC4%Z==7Si_0S2@o+4z5zh-h&O@d}Kck+m4$D#C zqmGbJku8-@p%fuq)OZF)s!EVF+#q866PU2#25lBl-ue>C9E8Ku+t7#Ma9jra=cofc zVV`Zs8OdPd_RWEd6vms;%t-~~5nnfw+=lE^(?$UMx+qam_q{ROLl4CIF0W`KMIS;YFfj#z9Hpp|9FMJ70M?&`o zT-KCLRqg0iwYgQ_o=*OnvQ_CeI+*+biR&-%6&!4B@6$WgH%kxg}=`M z@GKLUdJUUJf`&c=SuLemBiJMe4E1KE+Ns}H1f=kNL_jb(4#9csV9wXn2hE0BAxWL9 zR|rlQAXjO%8V|=uIjqD1X`6FL(V0S4yF3D`9yvl&zUlCFu~ZEb6n8iu~`d&rDq z9(VNd-tC#e0k=0roy!nkXNHEwuL-FmM)8ej7&Xt0T87LRKNS9$fb0bDu@ib~2K&0> z(t8SSL(G_>J31eZ$bfo;6kX-|*uCyKo*5sT#(egKp~*DHcRga`0(abHSRHp95;HDd zJqv&&Q*Yw5+QbTqsHbzy$Z|SR*h=7rZyT_oKvJs4CT^= z?-Gz2@#`J9WSMsOOlQcrqLmmcgeMk?SVvU;zJPpOD5i8#miz);h41DdJE8spfaUZJ zi<+K&o{Q-_uSlN&?Dc)!=~4CPK**Hdnw}>?e_7z1dN;mWE`fO=Jl2Yx|DUp!C3m zXsHhrP5hqQTmm4+hJn$uSfLB)(P z4u?HF9Pi`#eBmE+aGn!xT+77k8In^Hy%ljl6PEToCvIj?;96Cx#V@x2<$}?pC7k?*uIIgGWzxn5^?d%rNf6Z0Y?| zY>K3c_fQ0%S6A`z&%DM*-wC30KjH4bg&rEHUQ66u3pJSM%CHdKQ)`oj2pQ#( z+Enz-hdTX_35e^k9YTWAs5H|c_B@+^O~C7T2cBvDW||+GI`2of#3QD7?&VLtd(Pn( z9ejqwk2>+?*zMgu{PX*{JeDW?3WN-eA90GRA9dXKZ~il$+KE2!;70>7xr3j0ex7?x z2$suSvRsa5%jNqwdyD*`_JeDq$NFE1uO?$3S@2ehAAyefz`|FG&mhm?Il%t_45mn# diff --git a/owl-bot-staging/OsConfig/v1/proto/src/GPBMetadata/Google/Cloud/Osconfig/V1/Vulnerability.php b/owl-bot-staging/OsConfig/v1/proto/src/GPBMetadata/Google/Cloud/Osconfig/V1/Vulnerability.php deleted file mode 100644 index 963f576352ef69f9320a894bd89461bed5adce0a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3891 zcmbtX&2kz?5DuUp(^wWBSvJOUd5v8WuGkPsNhO8iBnS{%TLJfgkn{wRGUJnC^qk+s--)oLUTf2 z*ZUgHDw^(ev%00|gPz*Y4%f0nM`Pd}Ra5QP84e6EkPoP3$O;w8wXHpB%U#))+hvZ? zE-;LC)x&7F);0kYO|~qdHI4;uK)^r4>1e7VShj5Azx%2ssRPwkWljAK{dp|(WX+<8 za9XzK3=~_{2Le;54iuVxAh?)J_P(K`|BnUVsu~LkhNCSGY-$c7^8 z<@(ef1(L0#A9%+yIJGCFT^n<`Q${`(Y}29Rrwf8fZO0sJa=RJ8(der^A!d0)ZEveo z>u%8(@=(>yT<+MbV~}a8b?W8uKWmM`(Nr;&wtQerK9Ps<(dVicw0yTaiqSSQDn0Uw z`M3&yC*a{ls6-O3bcPcz;}b74Tua{caAZTxnx20y|B`pSEzU;FY1a0ga0OC-UV^0n z+3M8LO`BYW8AjbiNC>5)TamZ<2zd^R;}ln^l?V%wbZmVyGtIQj1nA(J3;hwq90MzZ zO3c1Q1P_g^Cw*Ao_{=B+Tr2s*94rJ5AWfL>VvVVq#SM?G7krFUQ45;kdL3NL6kRBi zh81;ynb$Ph#hM$^0an6mNww*Lq;}mXM7P3;5R;ULc)Z-v=p@Mq#>8+O^L|KT5K)F6JIFFDC_~GVhU*fxGLs@L zLg_GBgL!v(!%L_z-GoA`(HL%!I9#&mkeb*)6D%ZAvIMcN*L|>oC79b$A_JHdyEVmD z=KHrd9X!C1vof8j`>4q@L`Odedh3{)TMOh0%(*RuyBSR$!3+xzxd*q-V2P)ULT3=f zMP%{psfWll#h{X7syuvAat$s!hGipb4kX-n1C;wA^e+EBd@$+^<>^FNQW+#eR>>>K~{C_5a#n%ronI&iy8?Fnbq=_?1D zCdmid$;R7!_@Dfv3t64|DFkv<{qYE*Y+`r(tJ>%&~W7)j%d zG^=%KztX6c3gWg{D#qU2^Qk6|iR@ON1xy^<+7Zh;@o?(r z5ReJPy9ak_b+IMxmdd4uR4;wCFV;)N6GyHQxcvjnB7xbzE2o~ZJ2erz6@6zg=(#I0(l7* z{pG?=zEVa?gs?3yxQqT$I8}!^kLuTfh$a~SkA!&1;8f^e%tmMP`17}LqRdCY3?BhA zRja_q$V_YPFMq4;jfXfNx|?kr5Z{Gwxr(_Q*UaVo-CVA<)|ul^<&D+RtntvDx5mb^ PsiPT}bO)#-I0E<=E0xZ) diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/AptSettings.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/AptSettings.php deleted file mode 100644 index d764127ec017..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/AptSettings.php +++ /dev/null @@ -1,152 +0,0 @@ -google.cloud.osconfig.v1.AptSettings - */ -class AptSettings extends \Google\Protobuf\Internal\Message -{ - /** - * By changing the type to DIST, the patching is performed - * using `apt-get dist-upgrade` instead. - * - * Generated from protobuf field .google.cloud.osconfig.v1.AptSettings.Type type = 1; - */ - protected $type = 0; - /** - * List of packages to exclude from update. These packages will be excluded - * - * Generated from protobuf field repeated string excludes = 2; - */ - private $excludes; - /** - * An exclusive list of packages to be updated. These are the only packages - * that will be updated. If these packages are not installed, they will be - * ignored. This field cannot be specified with any other patch configuration - * fields. - * - * Generated from protobuf field repeated string exclusive_packages = 3; - */ - private $exclusive_packages; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $type - * By changing the type to DIST, the patching is performed - * using `apt-get dist-upgrade` instead. - * @type array|\Google\Protobuf\Internal\RepeatedField $excludes - * List of packages to exclude from update. These packages will be excluded - * @type array|\Google\Protobuf\Internal\RepeatedField $exclusive_packages - * An exclusive list of packages to be updated. These are the only packages - * that will be updated. If these packages are not installed, they will be - * ignored. This field cannot be specified with any other patch configuration - * fields. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\PatchJobs::initOnce(); - parent::__construct($data); - } - - /** - * By changing the type to DIST, the patching is performed - * using `apt-get dist-upgrade` instead. - * - * Generated from protobuf field .google.cloud.osconfig.v1.AptSettings.Type type = 1; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * By changing the type to DIST, the patching is performed - * using `apt-get dist-upgrade` instead. - * - * Generated from protobuf field .google.cloud.osconfig.v1.AptSettings.Type type = 1; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\OsConfig\V1\AptSettings\Type::class); - $this->type = $var; - - return $this; - } - - /** - * List of packages to exclude from update. These packages will be excluded - * - * Generated from protobuf field repeated string excludes = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getExcludes() - { - return $this->excludes; - } - - /** - * List of packages to exclude from update. These packages will be excluded - * - * Generated from protobuf field repeated string excludes = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setExcludes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->excludes = $arr; - - return $this; - } - - /** - * An exclusive list of packages to be updated. These are the only packages - * that will be updated. If these packages are not installed, they will be - * ignored. This field cannot be specified with any other patch configuration - * fields. - * - * Generated from protobuf field repeated string exclusive_packages = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getExclusivePackages() - { - return $this->exclusive_packages; - } - - /** - * An exclusive list of packages to be updated. These are the only packages - * that will be updated. If these packages are not installed, they will be - * ignored. This field cannot be specified with any other patch configuration - * fields. - * - * Generated from protobuf field repeated string exclusive_packages = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setExclusivePackages($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->exclusive_packages = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/AptSettings/Type.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/AptSettings/Type.php deleted file mode 100644 index 35532d7ee4df..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/AptSettings/Type.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.osconfig.v1.AptSettings.Type - */ -class Type -{ - /** - * By default, upgrade will be performed. - * - * Generated from protobuf enum TYPE_UNSPECIFIED = 0; - */ - const TYPE_UNSPECIFIED = 0; - /** - * Runs `apt-get dist-upgrade`. - * - * Generated from protobuf enum DIST = 1; - */ - const DIST = 1; - /** - * Runs `apt-get upgrade`. - * - * Generated from protobuf enum UPGRADE = 2; - */ - const UPGRADE = 2; - - private static $valueToName = [ - self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', - self::DIST => 'DIST', - self::UPGRADE => 'UPGRADE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Type::class, \Google\Cloud\OsConfig\V1\AptSettings_Type::class); - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/CVSSv3.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/CVSSv3.php deleted file mode 100644 index ac3e56bdc493..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/CVSSv3.php +++ /dev/null @@ -1,460 +0,0 @@ -google.cloud.osconfig.v1.CVSSv3 - */ -class CVSSv3 extends \Google\Protobuf\Internal\Message -{ - /** - * The base score is a function of the base metric scores. - * https://www.first.org/cvss/specification-document#Base-Metrics - * - * Generated from protobuf field float base_score = 1; - */ - protected $base_score = 0.0; - /** - * The Exploitability sub-score equation is derived from the Base - * Exploitability metrics. - * https://www.first.org/cvss/specification-document#2-1-Exploitability-Metrics - * - * Generated from protobuf field float exploitability_score = 2; - */ - protected $exploitability_score = 0.0; - /** - * The Impact sub-score equation is derived from the Base Impact metrics. - * - * Generated from protobuf field float impact_score = 3; - */ - protected $impact_score = 0.0; - /** - * This metric reflects the context by which vulnerability exploitation is - * possible. - * - * Generated from protobuf field .google.cloud.osconfig.v1.CVSSv3.AttackVector attack_vector = 5; - */ - protected $attack_vector = 0; - /** - * This metric describes the conditions beyond the attacker's control that - * must exist in order to exploit the vulnerability. - * - * Generated from protobuf field .google.cloud.osconfig.v1.CVSSv3.AttackComplexity attack_complexity = 6; - */ - protected $attack_complexity = 0; - /** - * This metric describes the level of privileges an attacker must possess - * before successfully exploiting the vulnerability. - * - * Generated from protobuf field .google.cloud.osconfig.v1.CVSSv3.PrivilegesRequired privileges_required = 7; - */ - protected $privileges_required = 0; - /** - * This metric captures the requirement for a human user, other than the - * attacker, to participate in the successful compromise of the vulnerable - * component. - * - * Generated from protobuf field .google.cloud.osconfig.v1.CVSSv3.UserInteraction user_interaction = 8; - */ - protected $user_interaction = 0; - /** - * The Scope metric captures whether a vulnerability in one vulnerable - * component impacts resources in components beyond its security scope. - * - * Generated from protobuf field .google.cloud.osconfig.v1.CVSSv3.Scope scope = 9; - */ - protected $scope = 0; - /** - * This metric measures the impact to the confidentiality of the information - * resources managed by a software component due to a successfully exploited - * vulnerability. - * - * Generated from protobuf field .google.cloud.osconfig.v1.CVSSv3.Impact confidentiality_impact = 10; - */ - protected $confidentiality_impact = 0; - /** - * This metric measures the impact to integrity of a successfully exploited - * vulnerability. - * - * Generated from protobuf field .google.cloud.osconfig.v1.CVSSv3.Impact integrity_impact = 11; - */ - protected $integrity_impact = 0; - /** - * This metric measures the impact to the availability of the impacted - * component resulting from a successfully exploited vulnerability. - * - * Generated from protobuf field .google.cloud.osconfig.v1.CVSSv3.Impact availability_impact = 12; - */ - protected $availability_impact = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $base_score - * The base score is a function of the base metric scores. - * https://www.first.org/cvss/specification-document#Base-Metrics - * @type float $exploitability_score - * The Exploitability sub-score equation is derived from the Base - * Exploitability metrics. - * https://www.first.org/cvss/specification-document#2-1-Exploitability-Metrics - * @type float $impact_score - * The Impact sub-score equation is derived from the Base Impact metrics. - * @type int $attack_vector - * This metric reflects the context by which vulnerability exploitation is - * possible. - * @type int $attack_complexity - * This metric describes the conditions beyond the attacker's control that - * must exist in order to exploit the vulnerability. - * @type int $privileges_required - * This metric describes the level of privileges an attacker must possess - * before successfully exploiting the vulnerability. - * @type int $user_interaction - * This metric captures the requirement for a human user, other than the - * attacker, to participate in the successful compromise of the vulnerable - * component. - * @type int $scope - * The Scope metric captures whether a vulnerability in one vulnerable - * component impacts resources in components beyond its security scope. - * @type int $confidentiality_impact - * This metric measures the impact to the confidentiality of the information - * resources managed by a software component due to a successfully exploited - * vulnerability. - * @type int $integrity_impact - * This metric measures the impact to integrity of a successfully exploited - * vulnerability. - * @type int $availability_impact - * This metric measures the impact to the availability of the impacted - * component resulting from a successfully exploited vulnerability. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\Vulnerability::initOnce(); - parent::__construct($data); - } - - /** - * The base score is a function of the base metric scores. - * https://www.first.org/cvss/specification-document#Base-Metrics - * - * Generated from protobuf field float base_score = 1; - * @return float - */ - public function getBaseScore() - { - return $this->base_score; - } - - /** - * The base score is a function of the base metric scores. - * https://www.first.org/cvss/specification-document#Base-Metrics - * - * Generated from protobuf field float base_score = 1; - * @param float $var - * @return $this - */ - public function setBaseScore($var) - { - GPBUtil::checkFloat($var); - $this->base_score = $var; - - return $this; - } - - /** - * The Exploitability sub-score equation is derived from the Base - * Exploitability metrics. - * https://www.first.org/cvss/specification-document#2-1-Exploitability-Metrics - * - * Generated from protobuf field float exploitability_score = 2; - * @return float - */ - public function getExploitabilityScore() - { - return $this->exploitability_score; - } - - /** - * The Exploitability sub-score equation is derived from the Base - * Exploitability metrics. - * https://www.first.org/cvss/specification-document#2-1-Exploitability-Metrics - * - * Generated from protobuf field float exploitability_score = 2; - * @param float $var - * @return $this - */ - public function setExploitabilityScore($var) - { - GPBUtil::checkFloat($var); - $this->exploitability_score = $var; - - return $this; - } - - /** - * The Impact sub-score equation is derived from the Base Impact metrics. - * - * Generated from protobuf field float impact_score = 3; - * @return float - */ - public function getImpactScore() - { - return $this->impact_score; - } - - /** - * The Impact sub-score equation is derived from the Base Impact metrics. - * - * Generated from protobuf field float impact_score = 3; - * @param float $var - * @return $this - */ - public function setImpactScore($var) - { - GPBUtil::checkFloat($var); - $this->impact_score = $var; - - return $this; - } - - /** - * This metric reflects the context by which vulnerability exploitation is - * possible. - * - * Generated from protobuf field .google.cloud.osconfig.v1.CVSSv3.AttackVector attack_vector = 5; - * @return int - */ - public function getAttackVector() - { - return $this->attack_vector; - } - - /** - * This metric reflects the context by which vulnerability exploitation is - * possible. - * - * Generated from protobuf field .google.cloud.osconfig.v1.CVSSv3.AttackVector attack_vector = 5; - * @param int $var - * @return $this - */ - public function setAttackVector($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\OsConfig\V1\CVSSv3\AttackVector::class); - $this->attack_vector = $var; - - return $this; - } - - /** - * This metric describes the conditions beyond the attacker's control that - * must exist in order to exploit the vulnerability. - * - * Generated from protobuf field .google.cloud.osconfig.v1.CVSSv3.AttackComplexity attack_complexity = 6; - * @return int - */ - public function getAttackComplexity() - { - return $this->attack_complexity; - } - - /** - * This metric describes the conditions beyond the attacker's control that - * must exist in order to exploit the vulnerability. - * - * Generated from protobuf field .google.cloud.osconfig.v1.CVSSv3.AttackComplexity attack_complexity = 6; - * @param int $var - * @return $this - */ - public function setAttackComplexity($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\OsConfig\V1\CVSSv3\AttackComplexity::class); - $this->attack_complexity = $var; - - return $this; - } - - /** - * This metric describes the level of privileges an attacker must possess - * before successfully exploiting the vulnerability. - * - * Generated from protobuf field .google.cloud.osconfig.v1.CVSSv3.PrivilegesRequired privileges_required = 7; - * @return int - */ - public function getPrivilegesRequired() - { - return $this->privileges_required; - } - - /** - * This metric describes the level of privileges an attacker must possess - * before successfully exploiting the vulnerability. - * - * Generated from protobuf field .google.cloud.osconfig.v1.CVSSv3.PrivilegesRequired privileges_required = 7; - * @param int $var - * @return $this - */ - public function setPrivilegesRequired($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\OsConfig\V1\CVSSv3\PrivilegesRequired::class); - $this->privileges_required = $var; - - return $this; - } - - /** - * This metric captures the requirement for a human user, other than the - * attacker, to participate in the successful compromise of the vulnerable - * component. - * - * Generated from protobuf field .google.cloud.osconfig.v1.CVSSv3.UserInteraction user_interaction = 8; - * @return int - */ - public function getUserInteraction() - { - return $this->user_interaction; - } - - /** - * This metric captures the requirement for a human user, other than the - * attacker, to participate in the successful compromise of the vulnerable - * component. - * - * Generated from protobuf field .google.cloud.osconfig.v1.CVSSv3.UserInteraction user_interaction = 8; - * @param int $var - * @return $this - */ - public function setUserInteraction($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\OsConfig\V1\CVSSv3\UserInteraction::class); - $this->user_interaction = $var; - - return $this; - } - - /** - * The Scope metric captures whether a vulnerability in one vulnerable - * component impacts resources in components beyond its security scope. - * - * Generated from protobuf field .google.cloud.osconfig.v1.CVSSv3.Scope scope = 9; - * @return int - */ - public function getScope() - { - return $this->scope; - } - - /** - * The Scope metric captures whether a vulnerability in one vulnerable - * component impacts resources in components beyond its security scope. - * - * Generated from protobuf field .google.cloud.osconfig.v1.CVSSv3.Scope scope = 9; - * @param int $var - * @return $this - */ - public function setScope($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\OsConfig\V1\CVSSv3\Scope::class); - $this->scope = $var; - - return $this; - } - - /** - * This metric measures the impact to the confidentiality of the information - * resources managed by a software component due to a successfully exploited - * vulnerability. - * - * Generated from protobuf field .google.cloud.osconfig.v1.CVSSv3.Impact confidentiality_impact = 10; - * @return int - */ - public function getConfidentialityImpact() - { - return $this->confidentiality_impact; - } - - /** - * This metric measures the impact to the confidentiality of the information - * resources managed by a software component due to a successfully exploited - * vulnerability. - * - * Generated from protobuf field .google.cloud.osconfig.v1.CVSSv3.Impact confidentiality_impact = 10; - * @param int $var - * @return $this - */ - public function setConfidentialityImpact($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\OsConfig\V1\CVSSv3\Impact::class); - $this->confidentiality_impact = $var; - - return $this; - } - - /** - * This metric measures the impact to integrity of a successfully exploited - * vulnerability. - * - * Generated from protobuf field .google.cloud.osconfig.v1.CVSSv3.Impact integrity_impact = 11; - * @return int - */ - public function getIntegrityImpact() - { - return $this->integrity_impact; - } - - /** - * This metric measures the impact to integrity of a successfully exploited - * vulnerability. - * - * Generated from protobuf field .google.cloud.osconfig.v1.CVSSv3.Impact integrity_impact = 11; - * @param int $var - * @return $this - */ - public function setIntegrityImpact($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\OsConfig\V1\CVSSv3\Impact::class); - $this->integrity_impact = $var; - - return $this; - } - - /** - * This metric measures the impact to the availability of the impacted - * component resulting from a successfully exploited vulnerability. - * - * Generated from protobuf field .google.cloud.osconfig.v1.CVSSv3.Impact availability_impact = 12; - * @return int - */ - public function getAvailabilityImpact() - { - return $this->availability_impact; - } - - /** - * This metric measures the impact to the availability of the impacted - * component resulting from a successfully exploited vulnerability. - * - * Generated from protobuf field .google.cloud.osconfig.v1.CVSSv3.Impact availability_impact = 12; - * @param int $var - * @return $this - */ - public function setAvailabilityImpact($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\OsConfig\V1\CVSSv3\Impact::class); - $this->availability_impact = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/CVSSv3/AttackComplexity.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/CVSSv3/AttackComplexity.php deleted file mode 100644 index 0eb983c0c6f1..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/CVSSv3/AttackComplexity.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.osconfig.v1.CVSSv3.AttackComplexity - */ -class AttackComplexity -{ - /** - * Invalid value. - * - * Generated from protobuf enum ATTACK_COMPLEXITY_UNSPECIFIED = 0; - */ - const ATTACK_COMPLEXITY_UNSPECIFIED = 0; - /** - * Specialized access conditions or extenuating circumstances do not exist. - * An attacker can expect repeatable success when attacking the vulnerable - * component. - * - * Generated from protobuf enum ATTACK_COMPLEXITY_LOW = 1; - */ - const ATTACK_COMPLEXITY_LOW = 1; - /** - * A successful attack depends on conditions beyond the attacker's control. - * That is, a successful attack cannot be accomplished at will, but requires - * the attacker to invest in some measurable amount of effort in preparation - * or execution against the vulnerable component before a successful attack - * can be expected. - * - * Generated from protobuf enum ATTACK_COMPLEXITY_HIGH = 2; - */ - const ATTACK_COMPLEXITY_HIGH = 2; - - private static $valueToName = [ - self::ATTACK_COMPLEXITY_UNSPECIFIED => 'ATTACK_COMPLEXITY_UNSPECIFIED', - self::ATTACK_COMPLEXITY_LOW => 'ATTACK_COMPLEXITY_LOW', - self::ATTACK_COMPLEXITY_HIGH => 'ATTACK_COMPLEXITY_HIGH', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(AttackComplexity::class, \Google\Cloud\OsConfig\V1\CVSSv3_AttackComplexity::class); - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/CVSSv3/AttackVector.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/CVSSv3/AttackVector.php deleted file mode 100644 index 7f9c2e812631..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/CVSSv3/AttackVector.php +++ /dev/null @@ -1,84 +0,0 @@ -google.cloud.osconfig.v1.CVSSv3.AttackVector - */ -class AttackVector -{ - /** - * Invalid value. - * - * Generated from protobuf enum ATTACK_VECTOR_UNSPECIFIED = 0; - */ - const ATTACK_VECTOR_UNSPECIFIED = 0; - /** - * The vulnerable component is bound to the network stack and the set of - * possible attackers extends beyond the other options listed below, up to - * and including the entire Internet. - * - * Generated from protobuf enum ATTACK_VECTOR_NETWORK = 1; - */ - const ATTACK_VECTOR_NETWORK = 1; - /** - * The vulnerable component is bound to the network stack, but the attack is - * limited at the protocol level to a logically adjacent topology. - * - * Generated from protobuf enum ATTACK_VECTOR_ADJACENT = 2; - */ - const ATTACK_VECTOR_ADJACENT = 2; - /** - * The vulnerable component is not bound to the network stack and the - * attacker's path is via read/write/execute capabilities. - * - * Generated from protobuf enum ATTACK_VECTOR_LOCAL = 3; - */ - const ATTACK_VECTOR_LOCAL = 3; - /** - * The attack requires the attacker to physically touch or manipulate the - * vulnerable component. - * - * Generated from protobuf enum ATTACK_VECTOR_PHYSICAL = 4; - */ - const ATTACK_VECTOR_PHYSICAL = 4; - - private static $valueToName = [ - self::ATTACK_VECTOR_UNSPECIFIED => 'ATTACK_VECTOR_UNSPECIFIED', - self::ATTACK_VECTOR_NETWORK => 'ATTACK_VECTOR_NETWORK', - self::ATTACK_VECTOR_ADJACENT => 'ATTACK_VECTOR_ADJACENT', - self::ATTACK_VECTOR_LOCAL => 'ATTACK_VECTOR_LOCAL', - self::ATTACK_VECTOR_PHYSICAL => 'ATTACK_VECTOR_PHYSICAL', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(AttackVector::class, \Google\Cloud\OsConfig\V1\CVSSv3_AttackVector::class); - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/CVSSv3/Impact.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/CVSSv3/Impact.php deleted file mode 100644 index 4657a7871ef7..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/CVSSv3/Impact.php +++ /dev/null @@ -1,73 +0,0 @@ -google.cloud.osconfig.v1.CVSSv3.Impact - */ -class Impact -{ - /** - * Invalid value. - * - * Generated from protobuf enum IMPACT_UNSPECIFIED = 0; - */ - const IMPACT_UNSPECIFIED = 0; - /** - * High impact. - * - * Generated from protobuf enum IMPACT_HIGH = 1; - */ - const IMPACT_HIGH = 1; - /** - * Low impact. - * - * Generated from protobuf enum IMPACT_LOW = 2; - */ - const IMPACT_LOW = 2; - /** - * No impact. - * - * Generated from protobuf enum IMPACT_NONE = 3; - */ - const IMPACT_NONE = 3; - - private static $valueToName = [ - self::IMPACT_UNSPECIFIED => 'IMPACT_UNSPECIFIED', - self::IMPACT_HIGH => 'IMPACT_HIGH', - self::IMPACT_LOW => 'IMPACT_LOW', - self::IMPACT_NONE => 'IMPACT_NONE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Impact::class, \Google\Cloud\OsConfig\V1\CVSSv3_Impact::class); - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/CVSSv3/PrivilegesRequired.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/CVSSv3/PrivilegesRequired.php deleted file mode 100644 index f50e27e6d4ca..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/CVSSv3/PrivilegesRequired.php +++ /dev/null @@ -1,79 +0,0 @@ -google.cloud.osconfig.v1.CVSSv3.PrivilegesRequired - */ -class PrivilegesRequired -{ - /** - * Invalid value. - * - * Generated from protobuf enum PRIVILEGES_REQUIRED_UNSPECIFIED = 0; - */ - const PRIVILEGES_REQUIRED_UNSPECIFIED = 0; - /** - * The attacker is unauthorized prior to attack, and therefore does not - * require any access to settings or files of the vulnerable system to - * carry out an attack. - * - * Generated from protobuf enum PRIVILEGES_REQUIRED_NONE = 1; - */ - const PRIVILEGES_REQUIRED_NONE = 1; - /** - * The attacker requires privileges that provide basic user capabilities - * that could normally affect only settings and files owned by a user. - * Alternatively, an attacker with Low privileges has the ability to access - * only non-sensitive resources. - * - * Generated from protobuf enum PRIVILEGES_REQUIRED_LOW = 2; - */ - const PRIVILEGES_REQUIRED_LOW = 2; - /** - * The attacker requires privileges that provide significant (e.g., - * administrative) control over the vulnerable component allowing access to - * component-wide settings and files. - * - * Generated from protobuf enum PRIVILEGES_REQUIRED_HIGH = 3; - */ - const PRIVILEGES_REQUIRED_HIGH = 3; - - private static $valueToName = [ - self::PRIVILEGES_REQUIRED_UNSPECIFIED => 'PRIVILEGES_REQUIRED_UNSPECIFIED', - self::PRIVILEGES_REQUIRED_NONE => 'PRIVILEGES_REQUIRED_NONE', - self::PRIVILEGES_REQUIRED_LOW => 'PRIVILEGES_REQUIRED_LOW', - self::PRIVILEGES_REQUIRED_HIGH => 'PRIVILEGES_REQUIRED_HIGH', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(PrivilegesRequired::class, \Google\Cloud\OsConfig\V1\CVSSv3_PrivilegesRequired::class); - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/CVSSv3/Scope.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/CVSSv3/Scope.php deleted file mode 100644 index 55824469cbac..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/CVSSv3/Scope.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.osconfig.v1.CVSSv3.Scope - */ -class Scope -{ - /** - * Invalid value. - * - * Generated from protobuf enum SCOPE_UNSPECIFIED = 0; - */ - const SCOPE_UNSPECIFIED = 0; - /** - * An exploited vulnerability can only affect resources managed by the same - * security authority. - * - * Generated from protobuf enum SCOPE_UNCHANGED = 1; - */ - const SCOPE_UNCHANGED = 1; - /** - * An exploited vulnerability can affect resources beyond the security scope - * managed by the security authority of the vulnerable component. - * - * Generated from protobuf enum SCOPE_CHANGED = 2; - */ - const SCOPE_CHANGED = 2; - - private static $valueToName = [ - self::SCOPE_UNSPECIFIED => 'SCOPE_UNSPECIFIED', - self::SCOPE_UNCHANGED => 'SCOPE_UNCHANGED', - self::SCOPE_CHANGED => 'SCOPE_CHANGED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Scope::class, \Google\Cloud\OsConfig\V1\CVSSv3_Scope::class); - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/CVSSv3/UserInteraction.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/CVSSv3/UserInteraction.php deleted file mode 100644 index c2b9f2a5fa2a..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/CVSSv3/UserInteraction.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.osconfig.v1.CVSSv3.UserInteraction - */ -class UserInteraction -{ - /** - * Invalid value. - * - * Generated from protobuf enum USER_INTERACTION_UNSPECIFIED = 0; - */ - const USER_INTERACTION_UNSPECIFIED = 0; - /** - * The vulnerable system can be exploited without interaction from any user. - * - * Generated from protobuf enum USER_INTERACTION_NONE = 1; - */ - const USER_INTERACTION_NONE = 1; - /** - * Successful exploitation of this vulnerability requires a user to take - * some action before the vulnerability can be exploited. - * - * Generated from protobuf enum USER_INTERACTION_REQUIRED = 2; - */ - const USER_INTERACTION_REQUIRED = 2; - - private static $valueToName = [ - self::USER_INTERACTION_UNSPECIFIED => 'USER_INTERACTION_UNSPECIFIED', - self::USER_INTERACTION_NONE => 'USER_INTERACTION_NONE', - self::USER_INTERACTION_REQUIRED => 'USER_INTERACTION_REQUIRED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(UserInteraction::class, \Google\Cloud\OsConfig\V1\CVSSv3_UserInteraction::class); - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/CancelPatchJobRequest.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/CancelPatchJobRequest.php deleted file mode 100644 index 9e59bb209634..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/CancelPatchJobRequest.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.osconfig.v1.CancelPatchJobRequest - */ -class CancelPatchJobRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the patch in the form `projects/*/patchJobs/*` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the patch in the form `projects/*/patchJobs/*` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\PatchJobs::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the patch in the form `projects/*/patchJobs/*` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the patch in the form `projects/*/patchJobs/*` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/CreateOSPolicyAssignmentRequest.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/CreateOSPolicyAssignmentRequest.php deleted file mode 100644 index 69af19a5623f..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/CreateOSPolicyAssignmentRequest.php +++ /dev/null @@ -1,199 +0,0 @@ -google.cloud.osconfig.v1.CreateOSPolicyAssignmentRequest - */ -class CreateOSPolicyAssignmentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource name in the form: - * projects/{project}/locations/{location} - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The OS policy assignment to be created. - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicyAssignment os_policy_assignment = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $os_policy_assignment = null; - /** - * Required. The logical name of the OS policy assignment in the project - * with the following restrictions: - * * Must contain only lowercase letters, numbers, and hyphens. - * * Must start with a letter. - * * Must be between 1-63 characters. - * * Must end with a number or a letter. - * * Must be unique within the project. - * - * Generated from protobuf field string os_policy_assignment_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $os_policy_assignment_id = ''; - - /** - * @param string $parent Required. The parent resource name in the form: - * projects/{project}/locations/{location} - * Please see {@see OsConfigZonalServiceClient::locationName()} for help formatting this field. - * @param \Google\Cloud\OsConfig\V1\OSPolicyAssignment $osPolicyAssignment Required. The OS policy assignment to be created. - * @param string $osPolicyAssignmentId Required. The logical name of the OS policy assignment in the project - * with the following restrictions: - * - * * Must contain only lowercase letters, numbers, and hyphens. - * * Must start with a letter. - * * Must be between 1-63 characters. - * * Must end with a number or a letter. - * * Must be unique within the project. - * - * @return \Google\Cloud\OsConfig\V1\CreateOSPolicyAssignmentRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\OsConfig\V1\OSPolicyAssignment $osPolicyAssignment, string $osPolicyAssignmentId): self - { - return (new self()) - ->setParent($parent) - ->setOsPolicyAssignment($osPolicyAssignment) - ->setOsPolicyAssignmentId($osPolicyAssignmentId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource name in the form: - * projects/{project}/locations/{location} - * @type \Google\Cloud\OsConfig\V1\OSPolicyAssignment $os_policy_assignment - * Required. The OS policy assignment to be created. - * @type string $os_policy_assignment_id - * Required. The logical name of the OS policy assignment in the project - * with the following restrictions: - * * Must contain only lowercase letters, numbers, and hyphens. - * * Must start with a letter. - * * Must be between 1-63 characters. - * * Must end with a number or a letter. - * * Must be unique within the project. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\OsPolicyAssignments::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource name in the form: - * projects/{project}/locations/{location} - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource name in the form: - * projects/{project}/locations/{location} - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The OS policy assignment to be created. - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicyAssignment os_policy_assignment = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\OsConfig\V1\OSPolicyAssignment|null - */ - public function getOsPolicyAssignment() - { - return $this->os_policy_assignment; - } - - public function hasOsPolicyAssignment() - { - return isset($this->os_policy_assignment); - } - - public function clearOsPolicyAssignment() - { - unset($this->os_policy_assignment); - } - - /** - * Required. The OS policy assignment to be created. - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicyAssignment os_policy_assignment = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\OsConfig\V1\OSPolicyAssignment $var - * @return $this - */ - public function setOsPolicyAssignment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\OSPolicyAssignment::class); - $this->os_policy_assignment = $var; - - return $this; - } - - /** - * Required. The logical name of the OS policy assignment in the project - * with the following restrictions: - * * Must contain only lowercase letters, numbers, and hyphens. - * * Must start with a letter. - * * Must be between 1-63 characters. - * * Must end with a number or a letter. - * * Must be unique within the project. - * - * Generated from protobuf field string os_policy_assignment_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getOsPolicyAssignmentId() - { - return $this->os_policy_assignment_id; - } - - /** - * Required. The logical name of the OS policy assignment in the project - * with the following restrictions: - * * Must contain only lowercase letters, numbers, and hyphens. - * * Must start with a letter. - * * Must be between 1-63 characters. - * * Must end with a number or a letter. - * * Must be unique within the project. - * - * Generated from protobuf field string os_policy_assignment_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setOsPolicyAssignmentId($var) - { - GPBUtil::checkString($var, True); - $this->os_policy_assignment_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/CreatePatchDeploymentRequest.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/CreatePatchDeploymentRequest.php deleted file mode 100644 index 433d6c41edff..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/CreatePatchDeploymentRequest.php +++ /dev/null @@ -1,198 +0,0 @@ -google.cloud.osconfig.v1.CreatePatchDeploymentRequest - */ -class CreatePatchDeploymentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project to apply this patch deployment to in the form - * `projects/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. A name for the patch deployment in the project. When creating a - * name the following rules apply: - * * Must contain only lowercase letters, numbers, and hyphens. - * * Must start with a letter. - * * Must be between 1-63 characters. - * * Must end with a number or a letter. - * * Must be unique within the project. - * - * Generated from protobuf field string patch_deployment_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $patch_deployment_id = ''; - /** - * Required. The patch deployment to create. - * - * Generated from protobuf field .google.cloud.osconfig.v1.PatchDeployment patch_deployment = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $patch_deployment = null; - - /** - * @param string $parent Required. The project to apply this patch deployment to in the form - * `projects/*`. Please see - * {@see OsConfigServiceClient::projectName()} for help formatting this field. - * @param \Google\Cloud\OsConfig\V1\PatchDeployment $patchDeployment Required. The patch deployment to create. - * @param string $patchDeploymentId Required. A name for the patch deployment in the project. When creating a - * name the following rules apply: - * * Must contain only lowercase letters, numbers, and hyphens. - * * Must start with a letter. - * * Must be between 1-63 characters. - * * Must end with a number or a letter. - * * Must be unique within the project. - * - * @return \Google\Cloud\OsConfig\V1\CreatePatchDeploymentRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\OsConfig\V1\PatchDeployment $patchDeployment, string $patchDeploymentId): self - { - return (new self()) - ->setParent($parent) - ->setPatchDeployment($patchDeployment) - ->setPatchDeploymentId($patchDeploymentId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The project to apply this patch deployment to in the form - * `projects/*`. - * @type string $patch_deployment_id - * Required. A name for the patch deployment in the project. When creating a - * name the following rules apply: - * * Must contain only lowercase letters, numbers, and hyphens. - * * Must start with a letter. - * * Must be between 1-63 characters. - * * Must end with a number or a letter. - * * Must be unique within the project. - * @type \Google\Cloud\OsConfig\V1\PatchDeployment $patch_deployment - * Required. The patch deployment to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\PatchDeployments::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project to apply this patch deployment to in the form - * `projects/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The project to apply this patch deployment to in the form - * `projects/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. A name for the patch deployment in the project. When creating a - * name the following rules apply: - * * Must contain only lowercase letters, numbers, and hyphens. - * * Must start with a letter. - * * Must be between 1-63 characters. - * * Must end with a number or a letter. - * * Must be unique within the project. - * - * Generated from protobuf field string patch_deployment_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getPatchDeploymentId() - { - return $this->patch_deployment_id; - } - - /** - * Required. A name for the patch deployment in the project. When creating a - * name the following rules apply: - * * Must contain only lowercase letters, numbers, and hyphens. - * * Must start with a letter. - * * Must be between 1-63 characters. - * * Must end with a number or a letter. - * * Must be unique within the project. - * - * Generated from protobuf field string patch_deployment_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setPatchDeploymentId($var) - { - GPBUtil::checkString($var, True); - $this->patch_deployment_id = $var; - - return $this; - } - - /** - * Required. The patch deployment to create. - * - * Generated from protobuf field .google.cloud.osconfig.v1.PatchDeployment patch_deployment = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\OsConfig\V1\PatchDeployment|null - */ - public function getPatchDeployment() - { - return $this->patch_deployment; - } - - public function hasPatchDeployment() - { - return isset($this->patch_deployment); - } - - public function clearPatchDeployment() - { - unset($this->patch_deployment); - } - - /** - * Required. The patch deployment to create. - * - * Generated from protobuf field .google.cloud.osconfig.v1.PatchDeployment patch_deployment = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\OsConfig\V1\PatchDeployment $var - * @return $this - */ - public function setPatchDeployment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\PatchDeployment::class); - $this->patch_deployment = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/DeleteOSPolicyAssignmentRequest.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/DeleteOSPolicyAssignmentRequest.php deleted file mode 100644 index aebd165577c3..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/DeleteOSPolicyAssignmentRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.osconfig.v1.DeleteOSPolicyAssignmentRequest - */ -class DeleteOSPolicyAssignmentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the OS policy assignment to be deleted - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the OS policy assignment to be deleted - * Please see {@see OsConfigZonalServiceClient::oSPolicyAssignmentName()} for help formatting this field. - * - * @return \Google\Cloud\OsConfig\V1\DeleteOSPolicyAssignmentRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the OS policy assignment to be deleted - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\OsPolicyAssignments::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the OS policy assignment to be deleted - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the OS policy assignment to be deleted - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/DeletePatchDeploymentRequest.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/DeletePatchDeploymentRequest.php deleted file mode 100644 index 4232078984a5..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/DeletePatchDeploymentRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.osconfig.v1.DeletePatchDeploymentRequest - */ -class DeletePatchDeploymentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the patch deployment in the form - * `projects/*/patchDeployments/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The resource name of the patch deployment in the form - * `projects/*/patchDeployments/*`. Please see - * {@see OsConfigServiceClient::patchDeploymentName()} for help formatting this field. - * - * @return \Google\Cloud\OsConfig\V1\DeletePatchDeploymentRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the patch deployment in the form - * `projects/*/patchDeployments/*`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\PatchDeployments::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the patch deployment in the form - * `projects/*/patchDeployments/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the patch deployment in the form - * `projects/*/patchDeployments/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ExecStep.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ExecStep.php deleted file mode 100644 index 51a9368b6a5f..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ExecStep.php +++ /dev/null @@ -1,121 +0,0 @@ -google.cloud.osconfig.v1.ExecStep - */ -class ExecStep extends \Google\Protobuf\Internal\Message -{ - /** - * The ExecStepConfig for all Linux VMs targeted by the PatchJob. - * - * Generated from protobuf field .google.cloud.osconfig.v1.ExecStepConfig linux_exec_step_config = 1; - */ - protected $linux_exec_step_config = null; - /** - * The ExecStepConfig for all Windows VMs targeted by the PatchJob. - * - * Generated from protobuf field .google.cloud.osconfig.v1.ExecStepConfig windows_exec_step_config = 2; - */ - protected $windows_exec_step_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\OsConfig\V1\ExecStepConfig $linux_exec_step_config - * The ExecStepConfig for all Linux VMs targeted by the PatchJob. - * @type \Google\Cloud\OsConfig\V1\ExecStepConfig $windows_exec_step_config - * The ExecStepConfig for all Windows VMs targeted by the PatchJob. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\PatchJobs::initOnce(); - parent::__construct($data); - } - - /** - * The ExecStepConfig for all Linux VMs targeted by the PatchJob. - * - * Generated from protobuf field .google.cloud.osconfig.v1.ExecStepConfig linux_exec_step_config = 1; - * @return \Google\Cloud\OsConfig\V1\ExecStepConfig|null - */ - public function getLinuxExecStepConfig() - { - return $this->linux_exec_step_config; - } - - public function hasLinuxExecStepConfig() - { - return isset($this->linux_exec_step_config); - } - - public function clearLinuxExecStepConfig() - { - unset($this->linux_exec_step_config); - } - - /** - * The ExecStepConfig for all Linux VMs targeted by the PatchJob. - * - * Generated from protobuf field .google.cloud.osconfig.v1.ExecStepConfig linux_exec_step_config = 1; - * @param \Google\Cloud\OsConfig\V1\ExecStepConfig $var - * @return $this - */ - public function setLinuxExecStepConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\ExecStepConfig::class); - $this->linux_exec_step_config = $var; - - return $this; - } - - /** - * The ExecStepConfig for all Windows VMs targeted by the PatchJob. - * - * Generated from protobuf field .google.cloud.osconfig.v1.ExecStepConfig windows_exec_step_config = 2; - * @return \Google\Cloud\OsConfig\V1\ExecStepConfig|null - */ - public function getWindowsExecStepConfig() - { - return $this->windows_exec_step_config; - } - - public function hasWindowsExecStepConfig() - { - return isset($this->windows_exec_step_config); - } - - public function clearWindowsExecStepConfig() - { - unset($this->windows_exec_step_config); - } - - /** - * The ExecStepConfig for all Windows VMs targeted by the PatchJob. - * - * Generated from protobuf field .google.cloud.osconfig.v1.ExecStepConfig windows_exec_step_config = 2; - * @param \Google\Cloud\OsConfig\V1\ExecStepConfig $var - * @return $this - */ - public function setWindowsExecStepConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\ExecStepConfig::class); - $this->windows_exec_step_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ExecStepConfig.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ExecStepConfig.php deleted file mode 100644 index 9c1079efc867..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ExecStepConfig.php +++ /dev/null @@ -1,192 +0,0 @@ -google.cloud.osconfig.v1.ExecStepConfig - */ -class ExecStepConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Defaults to [0]. A list of possible return values that the - * execution can return to indicate a success. - * - * Generated from protobuf field repeated int32 allowed_success_codes = 3; - */ - private $allowed_success_codes; - /** - * The script interpreter to use to run the script. If no interpreter is - * specified the script will be executed directly, which will likely - * only succeed for scripts with [shebang lines] - * (https://en.wikipedia.org/wiki/Shebang_\(Unix\)). - * - * Generated from protobuf field .google.cloud.osconfig.v1.ExecStepConfig.Interpreter interpreter = 4; - */ - protected $interpreter = 0; - protected $executable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $local_path - * An absolute path to the executable on the VM. - * @type \Google\Cloud\OsConfig\V1\GcsObject $gcs_object - * A Cloud Storage object containing the executable. - * @type array|\Google\Protobuf\Internal\RepeatedField $allowed_success_codes - * Defaults to [0]. A list of possible return values that the - * execution can return to indicate a success. - * @type int $interpreter - * The script interpreter to use to run the script. If no interpreter is - * specified the script will be executed directly, which will likely - * only succeed for scripts with [shebang lines] - * (https://en.wikipedia.org/wiki/Shebang_\(Unix\)). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\PatchJobs::initOnce(); - parent::__construct($data); - } - - /** - * An absolute path to the executable on the VM. - * - * Generated from protobuf field string local_path = 1; - * @return string - */ - public function getLocalPath() - { - return $this->readOneof(1); - } - - public function hasLocalPath() - { - return $this->hasOneof(1); - } - - /** - * An absolute path to the executable on the VM. - * - * Generated from protobuf field string local_path = 1; - * @param string $var - * @return $this - */ - public function setLocalPath($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * A Cloud Storage object containing the executable. - * - * Generated from protobuf field .google.cloud.osconfig.v1.GcsObject gcs_object = 2; - * @return \Google\Cloud\OsConfig\V1\GcsObject|null - */ - public function getGcsObject() - { - return $this->readOneof(2); - } - - public function hasGcsObject() - { - return $this->hasOneof(2); - } - - /** - * A Cloud Storage object containing the executable. - * - * Generated from protobuf field .google.cloud.osconfig.v1.GcsObject gcs_object = 2; - * @param \Google\Cloud\OsConfig\V1\GcsObject $var - * @return $this - */ - public function setGcsObject($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\GcsObject::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Defaults to [0]. A list of possible return values that the - * execution can return to indicate a success. - * - * Generated from protobuf field repeated int32 allowed_success_codes = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAllowedSuccessCodes() - { - return $this->allowed_success_codes; - } - - /** - * Defaults to [0]. A list of possible return values that the - * execution can return to indicate a success. - * - * Generated from protobuf field repeated int32 allowed_success_codes = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAllowedSuccessCodes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); - $this->allowed_success_codes = $arr; - - return $this; - } - - /** - * The script interpreter to use to run the script. If no interpreter is - * specified the script will be executed directly, which will likely - * only succeed for scripts with [shebang lines] - * (https://en.wikipedia.org/wiki/Shebang_\(Unix\)). - * - * Generated from protobuf field .google.cloud.osconfig.v1.ExecStepConfig.Interpreter interpreter = 4; - * @return int - */ - public function getInterpreter() - { - return $this->interpreter; - } - - /** - * The script interpreter to use to run the script. If no interpreter is - * specified the script will be executed directly, which will likely - * only succeed for scripts with [shebang lines] - * (https://en.wikipedia.org/wiki/Shebang_\(Unix\)). - * - * Generated from protobuf field .google.cloud.osconfig.v1.ExecStepConfig.Interpreter interpreter = 4; - * @param int $var - * @return $this - */ - public function setInterpreter($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\OsConfig\V1\ExecStepConfig\Interpreter::class); - $this->interpreter = $var; - - return $this; - } - - /** - * @return string - */ - public function getExecutable() - { - return $this->whichOneof("executable"); - } - -} - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ExecStepConfig/Interpreter.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ExecStepConfig/Interpreter.php deleted file mode 100644 index 80a6e85c88f0..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ExecStepConfig/Interpreter.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.osconfig.v1.ExecStepConfig.Interpreter - */ -class Interpreter -{ - /** - * Invalid for a Windows ExecStepConfig. For a Linux ExecStepConfig, the - * interpreter will be parsed from the shebang line of the script if - * unspecified. - * - * Generated from protobuf enum INTERPRETER_UNSPECIFIED = 0; - */ - const INTERPRETER_UNSPECIFIED = 0; - /** - * Indicates that the script is run with `/bin/sh` on Linux and `cmd` - * on Windows. - * - * Generated from protobuf enum SHELL = 1; - */ - const SHELL = 1; - /** - * Indicates that the file is run with PowerShell flags - * `-NonInteractive`, `-NoProfile`, and `-ExecutionPolicy Bypass`. - * - * Generated from protobuf enum POWERSHELL = 2; - */ - const POWERSHELL = 2; - - private static $valueToName = [ - self::INTERPRETER_UNSPECIFIED => 'INTERPRETER_UNSPECIFIED', - self::SHELL => 'SHELL', - self::POWERSHELL => 'POWERSHELL', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Interpreter::class, \Google\Cloud\OsConfig\V1\ExecStepConfig_Interpreter::class); - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ExecutePatchJobRequest.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ExecutePatchJobRequest.php deleted file mode 100644 index 481824d2f193..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ExecutePatchJobRequest.php +++ /dev/null @@ -1,366 +0,0 @@ -google.cloud.osconfig.v1.ExecutePatchJobRequest - */ -class ExecutePatchJobRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project in which to run this patch in the form `projects/*` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Description of the patch job. Length of the description is limited - * to 1024 characters. - * - * Generated from protobuf field string description = 2; - */ - protected $description = ''; - /** - * Required. Instances to patch, either explicitly or filtered by some - * criteria such as zone or labels. - * - * Generated from protobuf field .google.cloud.osconfig.v1.PatchInstanceFilter instance_filter = 7 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $instance_filter = null; - /** - * Patch configuration being applied. If omitted, instances are - * patched using the default configurations. - * - * Generated from protobuf field .google.cloud.osconfig.v1.PatchConfig patch_config = 4; - */ - protected $patch_config = null; - /** - * Duration of the patch job. After the duration ends, the patch job - * times out. - * - * Generated from protobuf field .google.protobuf.Duration duration = 5; - */ - protected $duration = null; - /** - * If this patch is a dry-run only, instances are contacted but - * will do nothing. - * - * Generated from protobuf field bool dry_run = 6; - */ - protected $dry_run = false; - /** - * Display name for this patch job. This does not have to be unique. - * - * Generated from protobuf field string display_name = 8; - */ - protected $display_name = ''; - /** - * Rollout strategy of the patch job. - * - * Generated from protobuf field .google.cloud.osconfig.v1.PatchRollout rollout = 9; - */ - protected $rollout = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The project in which to run this patch in the form `projects/*` - * @type string $description - * Description of the patch job. Length of the description is limited - * to 1024 characters. - * @type \Google\Cloud\OsConfig\V1\PatchInstanceFilter $instance_filter - * Required. Instances to patch, either explicitly or filtered by some - * criteria such as zone or labels. - * @type \Google\Cloud\OsConfig\V1\PatchConfig $patch_config - * Patch configuration being applied. If omitted, instances are - * patched using the default configurations. - * @type \Google\Protobuf\Duration $duration - * Duration of the patch job. After the duration ends, the patch job - * times out. - * @type bool $dry_run - * If this patch is a dry-run only, instances are contacted but - * will do nothing. - * @type string $display_name - * Display name for this patch job. This does not have to be unique. - * @type \Google\Cloud\OsConfig\V1\PatchRollout $rollout - * Rollout strategy of the patch job. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\PatchJobs::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project in which to run this patch in the form `projects/*` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The project in which to run this patch in the form `projects/*` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Description of the patch job. Length of the description is limited - * to 1024 characters. - * - * Generated from protobuf field string description = 2; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Description of the patch job. Length of the description is limited - * to 1024 characters. - * - * Generated from protobuf field string description = 2; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Required. Instances to patch, either explicitly or filtered by some - * criteria such as zone or labels. - * - * Generated from protobuf field .google.cloud.osconfig.v1.PatchInstanceFilter instance_filter = 7 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\OsConfig\V1\PatchInstanceFilter|null - */ - public function getInstanceFilter() - { - return $this->instance_filter; - } - - public function hasInstanceFilter() - { - return isset($this->instance_filter); - } - - public function clearInstanceFilter() - { - unset($this->instance_filter); - } - - /** - * Required. Instances to patch, either explicitly or filtered by some - * criteria such as zone or labels. - * - * Generated from protobuf field .google.cloud.osconfig.v1.PatchInstanceFilter instance_filter = 7 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\OsConfig\V1\PatchInstanceFilter $var - * @return $this - */ - public function setInstanceFilter($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\PatchInstanceFilter::class); - $this->instance_filter = $var; - - return $this; - } - - /** - * Patch configuration being applied. If omitted, instances are - * patched using the default configurations. - * - * Generated from protobuf field .google.cloud.osconfig.v1.PatchConfig patch_config = 4; - * @return \Google\Cloud\OsConfig\V1\PatchConfig|null - */ - public function getPatchConfig() - { - return $this->patch_config; - } - - public function hasPatchConfig() - { - return isset($this->patch_config); - } - - public function clearPatchConfig() - { - unset($this->patch_config); - } - - /** - * Patch configuration being applied. If omitted, instances are - * patched using the default configurations. - * - * Generated from protobuf field .google.cloud.osconfig.v1.PatchConfig patch_config = 4; - * @param \Google\Cloud\OsConfig\V1\PatchConfig $var - * @return $this - */ - public function setPatchConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\PatchConfig::class); - $this->patch_config = $var; - - return $this; - } - - /** - * Duration of the patch job. After the duration ends, the patch job - * times out. - * - * Generated from protobuf field .google.protobuf.Duration duration = 5; - * @return \Google\Protobuf\Duration|null - */ - public function getDuration() - { - return $this->duration; - } - - public function hasDuration() - { - return isset($this->duration); - } - - public function clearDuration() - { - unset($this->duration); - } - - /** - * Duration of the patch job. After the duration ends, the patch job - * times out. - * - * Generated from protobuf field .google.protobuf.Duration duration = 5; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->duration = $var; - - return $this; - } - - /** - * If this patch is a dry-run only, instances are contacted but - * will do nothing. - * - * Generated from protobuf field bool dry_run = 6; - * @return bool - */ - public function getDryRun() - { - return $this->dry_run; - } - - /** - * If this patch is a dry-run only, instances are contacted but - * will do nothing. - * - * Generated from protobuf field bool dry_run = 6; - * @param bool $var - * @return $this - */ - public function setDryRun($var) - { - GPBUtil::checkBool($var); - $this->dry_run = $var; - - return $this; - } - - /** - * Display name for this patch job. This does not have to be unique. - * - * Generated from protobuf field string display_name = 8; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Display name for this patch job. This does not have to be unique. - * - * Generated from protobuf field string display_name = 8; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Rollout strategy of the patch job. - * - * Generated from protobuf field .google.cloud.osconfig.v1.PatchRollout rollout = 9; - * @return \Google\Cloud\OsConfig\V1\PatchRollout|null - */ - public function getRollout() - { - return $this->rollout; - } - - public function hasRollout() - { - return isset($this->rollout); - } - - public function clearRollout() - { - unset($this->rollout); - } - - /** - * Rollout strategy of the patch job. - * - * Generated from protobuf field .google.cloud.osconfig.v1.PatchRollout rollout = 9; - * @param \Google\Cloud\OsConfig\V1\PatchRollout $var - * @return $this - */ - public function setRollout($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\PatchRollout::class); - $this->rollout = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/FixedOrPercent.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/FixedOrPercent.php deleted file mode 100644 index 2f1c0b9df9be..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/FixedOrPercent.php +++ /dev/null @@ -1,112 +0,0 @@ -google.cloud.osconfig.v1.FixedOrPercent - */ -class FixedOrPercent extends \Google\Protobuf\Internal\Message -{ - protected $mode; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $fixed - * Specifies a fixed value. - * @type int $percent - * Specifies the relative value defined as a percentage, which will be - * multiplied by a reference value. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\OsconfigCommon::initOnce(); - parent::__construct($data); - } - - /** - * Specifies a fixed value. - * - * Generated from protobuf field int32 fixed = 1; - * @return int - */ - public function getFixed() - { - return $this->readOneof(1); - } - - public function hasFixed() - { - return $this->hasOneof(1); - } - - /** - * Specifies a fixed value. - * - * Generated from protobuf field int32 fixed = 1; - * @param int $var - * @return $this - */ - public function setFixed($var) - { - GPBUtil::checkInt32($var); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Specifies the relative value defined as a percentage, which will be - * multiplied by a reference value. - * - * Generated from protobuf field int32 percent = 2; - * @return int - */ - public function getPercent() - { - return $this->readOneof(2); - } - - public function hasPercent() - { - return $this->hasOneof(2); - } - - /** - * Specifies the relative value defined as a percentage, which will be - * multiplied by a reference value. - * - * Generated from protobuf field int32 percent = 2; - * @param int $var - * @return $this - */ - public function setPercent($var) - { - GPBUtil::checkInt32($var); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * @return string - */ - public function getMode() - { - return $this->whichOneof("mode"); - } - -} - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/GcsObject.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/GcsObject.php deleted file mode 100644 index e6ecdb9d9728..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/GcsObject.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.osconfig.v1.GcsObject - */ -class GcsObject extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Bucket of the Cloud Storage object. - * - * Generated from protobuf field string bucket = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $bucket = ''; - /** - * Required. Name of the Cloud Storage object. - * - * Generated from protobuf field string object = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $object = ''; - /** - * Required. Generation number of the Cloud Storage object. This is used to - * ensure that the ExecStep specified by this PatchJob does not change. - * - * Generated from protobuf field int64 generation_number = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $generation_number = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $bucket - * Required. Bucket of the Cloud Storage object. - * @type string $object - * Required. Name of the Cloud Storage object. - * @type int|string $generation_number - * Required. Generation number of the Cloud Storage object. This is used to - * ensure that the ExecStep specified by this PatchJob does not change. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\PatchJobs::initOnce(); - parent::__construct($data); - } - - /** - * Required. Bucket of the Cloud Storage object. - * - * Generated from protobuf field string bucket = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getBucket() - { - return $this->bucket; - } - - /** - * Required. Bucket of the Cloud Storage object. - * - * Generated from protobuf field string bucket = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setBucket($var) - { - GPBUtil::checkString($var, True); - $this->bucket = $var; - - return $this; - } - - /** - * Required. Name of the Cloud Storage object. - * - * Generated from protobuf field string object = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getObject() - { - return $this->object; - } - - /** - * Required. Name of the Cloud Storage object. - * - * Generated from protobuf field string object = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setObject($var) - { - GPBUtil::checkString($var, True); - $this->object = $var; - - return $this; - } - - /** - * Required. Generation number of the Cloud Storage object. This is used to - * ensure that the ExecStep specified by this PatchJob does not change. - * - * Generated from protobuf field int64 generation_number = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return int|string - */ - public function getGenerationNumber() - { - return $this->generation_number; - } - - /** - * Required. Generation number of the Cloud Storage object. This is used to - * ensure that the ExecStep specified by this PatchJob does not change. - * - * Generated from protobuf field int64 generation_number = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param int|string $var - * @return $this - */ - public function setGenerationNumber($var) - { - GPBUtil::checkInt64($var); - $this->generation_number = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/GetInventoryRequest.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/GetInventoryRequest.php deleted file mode 100644 index a79edf7dabb8..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/GetInventoryRequest.php +++ /dev/null @@ -1,146 +0,0 @@ -google.cloud.osconfig.v1.GetInventoryRequest - */ -class GetInventoryRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. API resource name for inventory resource. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/inventory` - * For `{project}`, either `project-number` or `project-id` can be provided. - * For `{instance}`, either Compute Engine `instance-id` or `instance-name` - * can be provided. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Inventory view indicating what information should be included in the - * inventory resource. If unspecified, the default view is BASIC. - * - * Generated from protobuf field .google.cloud.osconfig.v1.InventoryView view = 2; - */ - protected $view = 0; - - /** - * @param string $name Required. API resource name for inventory resource. - * - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/inventory` - * - * For `{project}`, either `project-number` or `project-id` can be provided. - * For `{instance}`, either Compute Engine `instance-id` or `instance-name` - * can be provided. Please see - * {@see OsConfigZonalServiceClient::inventoryName()} for help formatting this field. - * - * @return \Google\Cloud\OsConfig\V1\GetInventoryRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. API resource name for inventory resource. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/inventory` - * For `{project}`, either `project-number` or `project-id` can be provided. - * For `{instance}`, either Compute Engine `instance-id` or `instance-name` - * can be provided. - * @type int $view - * Inventory view indicating what information should be included in the - * inventory resource. If unspecified, the default view is BASIC. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\Inventory::initOnce(); - parent::__construct($data); - } - - /** - * Required. API resource name for inventory resource. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/inventory` - * For `{project}`, either `project-number` or `project-id` can be provided. - * For `{instance}`, either Compute Engine `instance-id` or `instance-name` - * can be provided. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. API resource name for inventory resource. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/inventory` - * For `{project}`, either `project-number` or `project-id` can be provided. - * For `{instance}`, either Compute Engine `instance-id` or `instance-name` - * can be provided. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Inventory view indicating what information should be included in the - * inventory resource. If unspecified, the default view is BASIC. - * - * Generated from protobuf field .google.cloud.osconfig.v1.InventoryView view = 2; - * @return int - */ - public function getView() - { - return $this->view; - } - - /** - * Inventory view indicating what information should be included in the - * inventory resource. If unspecified, the default view is BASIC. - * - * Generated from protobuf field .google.cloud.osconfig.v1.InventoryView view = 2; - * @param int $var - * @return $this - */ - public function setView($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\OsConfig\V1\InventoryView::class); - $this->view = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/GetOSPolicyAssignmentReportRequest.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/GetOSPolicyAssignmentReportRequest.php deleted file mode 100644 index 6cabb4d835d6..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/GetOSPolicyAssignmentReportRequest.php +++ /dev/null @@ -1,113 +0,0 @@ -google.cloud.osconfig.v1.GetOSPolicyAssignmentReportRequest - */ -class GetOSPolicyAssignmentReportRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. API resource name for OS policy assignment report. - * Format: - * `/projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}/report` - * For `{project}`, either `project-number` or `project-id` can be provided. - * For `{instance_id}`, either Compute Engine `instance-id` or `instance-name` - * can be provided. - * For `{assignment_id}`, the OSPolicyAssignment id must be provided. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. API resource name for OS policy assignment report. - * - * Format: - * `/projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}/report` - * - * For `{project}`, either `project-number` or `project-id` can be provided. - * For `{instance_id}`, either Compute Engine `instance-id` or `instance-name` - * can be provided. - * For `{assignment_id}`, the OSPolicyAssignment id must be provided. Please see - * {@see OsConfigZonalServiceClient::oSPolicyAssignmentReportName()} for help formatting this field. - * - * @return \Google\Cloud\OsConfig\V1\GetOSPolicyAssignmentReportRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. API resource name for OS policy assignment report. - * Format: - * `/projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}/report` - * For `{project}`, either `project-number` or `project-id` can be provided. - * For `{instance_id}`, either Compute Engine `instance-id` or `instance-name` - * can be provided. - * For `{assignment_id}`, the OSPolicyAssignment id must be provided. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\OsPolicyAssignmentReports::initOnce(); - parent::__construct($data); - } - - /** - * Required. API resource name for OS policy assignment report. - * Format: - * `/projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}/report` - * For `{project}`, either `project-number` or `project-id` can be provided. - * For `{instance_id}`, either Compute Engine `instance-id` or `instance-name` - * can be provided. - * For `{assignment_id}`, the OSPolicyAssignment id must be provided. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. API resource name for OS policy assignment report. - * Format: - * `/projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}/report` - * For `{project}`, either `project-number` or `project-id` can be provided. - * For `{instance_id}`, either Compute Engine `instance-id` or `instance-name` - * can be provided. - * For `{assignment_id}`, the OSPolicyAssignment id must be provided. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/GetOSPolicyAssignmentRequest.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/GetOSPolicyAssignmentRequest.php deleted file mode 100644 index 1c54186081b4..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/GetOSPolicyAssignmentRequest.php +++ /dev/null @@ -1,92 +0,0 @@ -google.cloud.osconfig.v1.GetOSPolicyAssignmentRequest - */ -class GetOSPolicyAssignmentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of OS policy assignment. - * Format: - * `projects/{project}/locations/{location}/osPolicyAssignments/{os_policy_assignment}@{revisionId}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The resource name of OS policy assignment. - * - * Format: - * `projects/{project}/locations/{location}/osPolicyAssignments/{os_policy_assignment}@{revisionId}` - * Please see {@see OsConfigZonalServiceClient::oSPolicyAssignmentName()} for help formatting this field. - * - * @return \Google\Cloud\OsConfig\V1\GetOSPolicyAssignmentRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of OS policy assignment. - * Format: - * `projects/{project}/locations/{location}/osPolicyAssignments/{os_policy_assignment}@{revisionId}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\OsPolicyAssignments::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of OS policy assignment. - * Format: - * `projects/{project}/locations/{location}/osPolicyAssignments/{os_policy_assignment}@{revisionId}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of OS policy assignment. - * Format: - * `projects/{project}/locations/{location}/osPolicyAssignments/{os_policy_assignment}@{revisionId}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/GetPatchDeploymentRequest.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/GetPatchDeploymentRequest.php deleted file mode 100644 index c31502242f26..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/GetPatchDeploymentRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.osconfig.v1.GetPatchDeploymentRequest - */ -class GetPatchDeploymentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the patch deployment in the form - * `projects/*/patchDeployments/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The resource name of the patch deployment in the form - * `projects/*/patchDeployments/*`. Please see - * {@see OsConfigServiceClient::patchDeploymentName()} for help formatting this field. - * - * @return \Google\Cloud\OsConfig\V1\GetPatchDeploymentRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the patch deployment in the form - * `projects/*/patchDeployments/*`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\PatchDeployments::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the patch deployment in the form - * `projects/*/patchDeployments/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the patch deployment in the form - * `projects/*/patchDeployments/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/GetPatchJobRequest.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/GetPatchJobRequest.php deleted file mode 100644 index 2f45f2829ae3..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/GetPatchJobRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.osconfig.v1.GetPatchJobRequest - */ -class GetPatchJobRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the patch in the form `projects/*/patchJobs/*` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Name of the patch in the form `projects/*/patchJobs/*` - * Please see {@see OsConfigServiceClient::patchJobName()} for help formatting this field. - * - * @return \Google\Cloud\OsConfig\V1\GetPatchJobRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the patch in the form `projects/*/patchJobs/*` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\PatchJobs::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the patch in the form `projects/*/patchJobs/*` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the patch in the form `projects/*/patchJobs/*` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/GetVulnerabilityReportRequest.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/GetVulnerabilityReportRequest.php deleted file mode 100644 index 7ee6c21429f9..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/GetVulnerabilityReportRequest.php +++ /dev/null @@ -1,108 +0,0 @@ -google.cloud.osconfig.v1.GetVulnerabilityReportRequest - */ -class GetVulnerabilityReportRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. API resource name for vulnerability resource. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/vulnerabilityReport` - * For `{project}`, either `project-number` or `project-id` can be provided. - * For `{instance}`, either Compute Engine `instance-id` or `instance-name` - * can be provided. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. API resource name for vulnerability resource. - * - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/vulnerabilityReport` - * - * For `{project}`, either `project-number` or `project-id` can be provided. - * For `{instance}`, either Compute Engine `instance-id` or `instance-name` - * can be provided. Please see - * {@see OsConfigZonalServiceClient::vulnerabilityReportName()} for help formatting this field. - * - * @return \Google\Cloud\OsConfig\V1\GetVulnerabilityReportRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. API resource name for vulnerability resource. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/vulnerabilityReport` - * For `{project}`, either `project-number` or `project-id` can be provided. - * For `{instance}`, either Compute Engine `instance-id` or `instance-name` - * can be provided. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\Vulnerability::initOnce(); - parent::__construct($data); - } - - /** - * Required. API resource name for vulnerability resource. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/vulnerabilityReport` - * For `{project}`, either `project-number` or `project-id` can be provided. - * For `{instance}`, either Compute Engine `instance-id` or `instance-name` - * can be provided. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. API resource name for vulnerability resource. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/vulnerabilityReport` - * For `{project}`, either `project-number` or `project-id` can be provided. - * For `{instance}`, either Compute Engine `instance-id` or `instance-name` - * can be provided. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/GooSettings.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/GooSettings.php deleted file mode 100644 index be0a25aff2b6..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/GooSettings.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.osconfig.v1.GooSettings - */ -class GooSettings extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\PatchJobs::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Instance.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Instance.php deleted file mode 100644 index 2844a3c225ca..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Instance.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.osconfig.v1.Instance - */ -class Instance extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\PatchJobs::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Instance/PatchState.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Instance/PatchState.php deleted file mode 100644 index aeb4f3dd80b8..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Instance/PatchState.php +++ /dev/null @@ -1,157 +0,0 @@ -google.cloud.osconfig.v1.Instance.PatchState - */ -class PatchState -{ - /** - * Unspecified. - * - * Generated from protobuf enum PATCH_STATE_UNSPECIFIED = 0; - */ - const PATCH_STATE_UNSPECIFIED = 0; - /** - * The instance is not yet notified. - * - * Generated from protobuf enum PENDING = 1; - */ - const PENDING = 1; - /** - * Instance is inactive and cannot be patched. - * - * Generated from protobuf enum INACTIVE = 2; - */ - const INACTIVE = 2; - /** - * The instance is notified that it should be patched. - * - * Generated from protobuf enum NOTIFIED = 3; - */ - const NOTIFIED = 3; - /** - * The instance has started the patching process. - * - * Generated from protobuf enum STARTED = 4; - */ - const STARTED = 4; - /** - * The instance is downloading patches. - * - * Generated from protobuf enum DOWNLOADING_PATCHES = 5; - */ - const DOWNLOADING_PATCHES = 5; - /** - * The instance is applying patches. - * - * Generated from protobuf enum APPLYING_PATCHES = 6; - */ - const APPLYING_PATCHES = 6; - /** - * The instance is rebooting. - * - * Generated from protobuf enum REBOOTING = 7; - */ - const REBOOTING = 7; - /** - * The instance has completed applying patches. - * - * Generated from protobuf enum SUCCEEDED = 8; - */ - const SUCCEEDED = 8; - /** - * The instance has completed applying patches but a reboot is required. - * - * Generated from protobuf enum SUCCEEDED_REBOOT_REQUIRED = 9; - */ - const SUCCEEDED_REBOOT_REQUIRED = 9; - /** - * The instance has failed to apply the patch. - * - * Generated from protobuf enum FAILED = 10; - */ - const FAILED = 10; - /** - * The instance acked the notification and will start shortly. - * - * Generated from protobuf enum ACKED = 11; - */ - const ACKED = 11; - /** - * The instance exceeded the time out while applying the patch. - * - * Generated from protobuf enum TIMED_OUT = 12; - */ - const TIMED_OUT = 12; - /** - * The instance is running the pre-patch step. - * - * Generated from protobuf enum RUNNING_PRE_PATCH_STEP = 13; - */ - const RUNNING_PRE_PATCH_STEP = 13; - /** - * The instance is running the post-patch step. - * - * Generated from protobuf enum RUNNING_POST_PATCH_STEP = 14; - */ - const RUNNING_POST_PATCH_STEP = 14; - /** - * The service could not detect the presence of the agent. Check to ensure - * that the agent is installed, running, and able to communicate with the - * service. - * - * Generated from protobuf enum NO_AGENT_DETECTED = 15; - */ - const NO_AGENT_DETECTED = 15; - - private static $valueToName = [ - self::PATCH_STATE_UNSPECIFIED => 'PATCH_STATE_UNSPECIFIED', - self::PENDING => 'PENDING', - self::INACTIVE => 'INACTIVE', - self::NOTIFIED => 'NOTIFIED', - self::STARTED => 'STARTED', - self::DOWNLOADING_PATCHES => 'DOWNLOADING_PATCHES', - self::APPLYING_PATCHES => 'APPLYING_PATCHES', - self::REBOOTING => 'REBOOTING', - self::SUCCEEDED => 'SUCCEEDED', - self::SUCCEEDED_REBOOT_REQUIRED => 'SUCCEEDED_REBOOT_REQUIRED', - self::FAILED => 'FAILED', - self::ACKED => 'ACKED', - self::TIMED_OUT => 'TIMED_OUT', - self::RUNNING_PRE_PATCH_STEP => 'RUNNING_PRE_PATCH_STEP', - self::RUNNING_POST_PATCH_STEP => 'RUNNING_POST_PATCH_STEP', - self::NO_AGENT_DETECTED => 'NO_AGENT_DETECTED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(PatchState::class, \Google\Cloud\OsConfig\V1\Instance_PatchState::class); - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Inventory.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Inventory.php deleted file mode 100644 index a8c9f5fb7e3d..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Inventory.php +++ /dev/null @@ -1,213 +0,0 @@ -google.cloud.osconfig.v1.Inventory - */ -class Inventory extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The `Inventory` API resource name. - * Format: - * `projects/{project_number}/locations/{location}/instances/{instance_id}/inventory` - * - * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Base level operating system information for the VM. - * - * Generated from protobuf field .google.cloud.osconfig.v1.Inventory.OsInfo os_info = 1; - */ - protected $os_info = null; - /** - * Inventory items related to the VM keyed by an opaque unique identifier for - * each inventory item. The identifier is unique to each distinct and - * addressable inventory item and will change, when there is a new package - * version. - * - * Generated from protobuf field map items = 2; - */ - private $items; - /** - * Output only. Timestamp of the last reported inventory for the VM. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The `Inventory` API resource name. - * Format: - * `projects/{project_number}/locations/{location}/instances/{instance_id}/inventory` - * @type \Google\Cloud\OsConfig\V1\Inventory\OsInfo $os_info - * Base level operating system information for the VM. - * @type array|\Google\Protobuf\Internal\MapField $items - * Inventory items related to the VM keyed by an opaque unique identifier for - * each inventory item. The identifier is unique to each distinct and - * addressable inventory item and will change, when there is a new package - * version. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. Timestamp of the last reported inventory for the VM. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\Inventory::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The `Inventory` API resource name. - * Format: - * `projects/{project_number}/locations/{location}/instances/{instance_id}/inventory` - * - * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The `Inventory` API resource name. - * Format: - * `projects/{project_number}/locations/{location}/instances/{instance_id}/inventory` - * - * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Base level operating system information for the VM. - * - * Generated from protobuf field .google.cloud.osconfig.v1.Inventory.OsInfo os_info = 1; - * @return \Google\Cloud\OsConfig\V1\Inventory\OsInfo|null - */ - public function getOsInfo() - { - return $this->os_info; - } - - public function hasOsInfo() - { - return isset($this->os_info); - } - - public function clearOsInfo() - { - unset($this->os_info); - } - - /** - * Base level operating system information for the VM. - * - * Generated from protobuf field .google.cloud.osconfig.v1.Inventory.OsInfo os_info = 1; - * @param \Google\Cloud\OsConfig\V1\Inventory\OsInfo $var - * @return $this - */ - public function setOsInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\Inventory\OsInfo::class); - $this->os_info = $var; - - return $this; - } - - /** - * Inventory items related to the VM keyed by an opaque unique identifier for - * each inventory item. The identifier is unique to each distinct and - * addressable inventory item and will change, when there is a new package - * version. - * - * Generated from protobuf field map items = 2; - * @return \Google\Protobuf\Internal\MapField - */ - public function getItems() - { - return $this->items; - } - - /** - * Inventory items related to the VM keyed by an opaque unique identifier for - * each inventory item. The identifier is unique to each distinct and - * addressable inventory item and will change, when there is a new package - * version. - * - * Generated from protobuf field map items = 2; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setItems($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\OsConfig\V1\Inventory\Item::class); - $this->items = $arr; - - return $this; - } - - /** - * Output only. Timestamp of the last reported inventory for the VM. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. Timestamp of the last reported inventory for the VM. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Inventory/Item.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Inventory/Item.php deleted file mode 100644 index e1d306f6f07c..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Inventory/Item.php +++ /dev/null @@ -1,301 +0,0 @@ -google.cloud.osconfig.v1.Inventory.Item - */ -class Item extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier for this item, unique across items for this VM. - * - * Generated from protobuf field string id = 1; - */ - protected $id = ''; - /** - * The origin of this inventory item. - * - * Generated from protobuf field .google.cloud.osconfig.v1.Inventory.Item.OriginType origin_type = 2; - */ - protected $origin_type = 0; - /** - * When this inventory item was first detected. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 8; - */ - protected $create_time = null; - /** - * When this inventory item was last modified. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 9; - */ - protected $update_time = null; - /** - * The specific type of inventory, correlating to its specific details. - * - * Generated from protobuf field .google.cloud.osconfig.v1.Inventory.Item.Type type = 5; - */ - protected $type = 0; - protected $details; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $id - * Identifier for this item, unique across items for this VM. - * @type int $origin_type - * The origin of this inventory item. - * @type \Google\Protobuf\Timestamp $create_time - * When this inventory item was first detected. - * @type \Google\Protobuf\Timestamp $update_time - * When this inventory item was last modified. - * @type int $type - * The specific type of inventory, correlating to its specific details. - * @type \Google\Cloud\OsConfig\V1\Inventory\SoftwarePackage $installed_package - * Software package present on the VM instance. - * @type \Google\Cloud\OsConfig\V1\Inventory\SoftwarePackage $available_package - * Software package available to be installed on the VM instance. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\Inventory::initOnce(); - parent::__construct($data); - } - - /** - * Identifier for this item, unique across items for this VM. - * - * Generated from protobuf field string id = 1; - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * Identifier for this item, unique across items for this VM. - * - * Generated from protobuf field string id = 1; - * @param string $var - * @return $this - */ - public function setId($var) - { - GPBUtil::checkString($var, True); - $this->id = $var; - - return $this; - } - - /** - * The origin of this inventory item. - * - * Generated from protobuf field .google.cloud.osconfig.v1.Inventory.Item.OriginType origin_type = 2; - * @return int - */ - public function getOriginType() - { - return $this->origin_type; - } - - /** - * The origin of this inventory item. - * - * Generated from protobuf field .google.cloud.osconfig.v1.Inventory.Item.OriginType origin_type = 2; - * @param int $var - * @return $this - */ - public function setOriginType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\OsConfig\V1\Inventory\Item\OriginType::class); - $this->origin_type = $var; - - return $this; - } - - /** - * When this inventory item was first detected. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 8; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * When this inventory item was first detected. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 8; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * When this inventory item was last modified. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 9; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * When this inventory item was last modified. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 9; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * The specific type of inventory, correlating to its specific details. - * - * Generated from protobuf field .google.cloud.osconfig.v1.Inventory.Item.Type type = 5; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * The specific type of inventory, correlating to its specific details. - * - * Generated from protobuf field .google.cloud.osconfig.v1.Inventory.Item.Type type = 5; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\OsConfig\V1\Inventory\Item\Type::class); - $this->type = $var; - - return $this; - } - - /** - * Software package present on the VM instance. - * - * Generated from protobuf field .google.cloud.osconfig.v1.Inventory.SoftwarePackage installed_package = 6; - * @return \Google\Cloud\OsConfig\V1\Inventory\SoftwarePackage|null - */ - public function getInstalledPackage() - { - return $this->readOneof(6); - } - - public function hasInstalledPackage() - { - return $this->hasOneof(6); - } - - /** - * Software package present on the VM instance. - * - * Generated from protobuf field .google.cloud.osconfig.v1.Inventory.SoftwarePackage installed_package = 6; - * @param \Google\Cloud\OsConfig\V1\Inventory\SoftwarePackage $var - * @return $this - */ - public function setInstalledPackage($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\Inventory\SoftwarePackage::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * Software package available to be installed on the VM instance. - * - * Generated from protobuf field .google.cloud.osconfig.v1.Inventory.SoftwarePackage available_package = 7; - * @return \Google\Cloud\OsConfig\V1\Inventory\SoftwarePackage|null - */ - public function getAvailablePackage() - { - return $this->readOneof(7); - } - - public function hasAvailablePackage() - { - return $this->hasOneof(7); - } - - /** - * Software package available to be installed on the VM instance. - * - * Generated from protobuf field .google.cloud.osconfig.v1.Inventory.SoftwarePackage available_package = 7; - * @param \Google\Cloud\OsConfig\V1\Inventory\SoftwarePackage $var - * @return $this - */ - public function setAvailablePackage($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\Inventory\SoftwarePackage::class); - $this->writeOneof(7, $var); - - return $this; - } - - /** - * @return string - */ - public function getDetails() - { - return $this->whichOneof("details"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Item::class, \Google\Cloud\OsConfig\V1\Inventory_Item::class); - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Inventory/Item/OriginType.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Inventory/Item/OriginType.php deleted file mode 100644 index 8e2be71c247c..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Inventory/Item/OriginType.php +++ /dev/null @@ -1,58 +0,0 @@ -google.cloud.osconfig.v1.Inventory.Item.OriginType - */ -class OriginType -{ - /** - * Invalid. An origin type must be specified. - * - * Generated from protobuf enum ORIGIN_TYPE_UNSPECIFIED = 0; - */ - const ORIGIN_TYPE_UNSPECIFIED = 0; - /** - * This inventory item was discovered as the result of the agent - * reporting inventory via the reporting API. - * - * Generated from protobuf enum INVENTORY_REPORT = 1; - */ - const INVENTORY_REPORT = 1; - - private static $valueToName = [ - self::ORIGIN_TYPE_UNSPECIFIED => 'ORIGIN_TYPE_UNSPECIFIED', - self::INVENTORY_REPORT => 'INVENTORY_REPORT', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(OriginType::class, \Google\Cloud\OsConfig\V1\Inventory_Item_OriginType::class); - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Inventory/Item/Type.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Inventory/Item/Type.php deleted file mode 100644 index a4a78404f590..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Inventory/Item/Type.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.osconfig.v1.Inventory.Item.Type - */ -class Type -{ - /** - * Invalid. An type must be specified. - * - * Generated from protobuf enum TYPE_UNSPECIFIED = 0; - */ - const TYPE_UNSPECIFIED = 0; - /** - * This represents a package that is installed on the VM. - * - * Generated from protobuf enum INSTALLED_PACKAGE = 1; - */ - const INSTALLED_PACKAGE = 1; - /** - * This represents an update that is available for a package. - * - * Generated from protobuf enum AVAILABLE_PACKAGE = 2; - */ - const AVAILABLE_PACKAGE = 2; - - private static $valueToName = [ - self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', - self::INSTALLED_PACKAGE => 'INSTALLED_PACKAGE', - self::AVAILABLE_PACKAGE => 'AVAILABLE_PACKAGE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Type::class, \Google\Cloud\OsConfig\V1\Inventory_Item_Type::class); - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Inventory/OsInfo.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Inventory/OsInfo.php deleted file mode 100644 index 8afe5a671bb1..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Inventory/OsInfo.php +++ /dev/null @@ -1,320 +0,0 @@ -google.cloud.osconfig.v1.Inventory.OsInfo - */ -class OsInfo extends \Google\Protobuf\Internal\Message -{ - /** - * The VM hostname. - * - * Generated from protobuf field string hostname = 9; - */ - protected $hostname = ''; - /** - * The operating system long name. - * For example 'Debian GNU/Linux 9' or 'Microsoft Window Server 2019 - * Datacenter'. - * - * Generated from protobuf field string long_name = 2; - */ - protected $long_name = ''; - /** - * The operating system short name. - * For example, 'windows' or 'debian'. - * - * Generated from protobuf field string short_name = 3; - */ - protected $short_name = ''; - /** - * The version of the operating system. - * - * Generated from protobuf field string version = 4; - */ - protected $version = ''; - /** - * The system architecture of the operating system. - * - * Generated from protobuf field string architecture = 5; - */ - protected $architecture = ''; - /** - * The kernel version of the operating system. - * - * Generated from protobuf field string kernel_version = 6; - */ - protected $kernel_version = ''; - /** - * The kernel release of the operating system. - * - * Generated from protobuf field string kernel_release = 7; - */ - protected $kernel_release = ''; - /** - * The current version of the OS Config agent running on the VM. - * - * Generated from protobuf field string osconfig_agent_version = 8; - */ - protected $osconfig_agent_version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $hostname - * The VM hostname. - * @type string $long_name - * The operating system long name. - * For example 'Debian GNU/Linux 9' or 'Microsoft Window Server 2019 - * Datacenter'. - * @type string $short_name - * The operating system short name. - * For example, 'windows' or 'debian'. - * @type string $version - * The version of the operating system. - * @type string $architecture - * The system architecture of the operating system. - * @type string $kernel_version - * The kernel version of the operating system. - * @type string $kernel_release - * The kernel release of the operating system. - * @type string $osconfig_agent_version - * The current version of the OS Config agent running on the VM. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\Inventory::initOnce(); - parent::__construct($data); - } - - /** - * The VM hostname. - * - * Generated from protobuf field string hostname = 9; - * @return string - */ - public function getHostname() - { - return $this->hostname; - } - - /** - * The VM hostname. - * - * Generated from protobuf field string hostname = 9; - * @param string $var - * @return $this - */ - public function setHostname($var) - { - GPBUtil::checkString($var, True); - $this->hostname = $var; - - return $this; - } - - /** - * The operating system long name. - * For example 'Debian GNU/Linux 9' or 'Microsoft Window Server 2019 - * Datacenter'. - * - * Generated from protobuf field string long_name = 2; - * @return string - */ - public function getLongName() - { - return $this->long_name; - } - - /** - * The operating system long name. - * For example 'Debian GNU/Linux 9' or 'Microsoft Window Server 2019 - * Datacenter'. - * - * Generated from protobuf field string long_name = 2; - * @param string $var - * @return $this - */ - public function setLongName($var) - { - GPBUtil::checkString($var, True); - $this->long_name = $var; - - return $this; - } - - /** - * The operating system short name. - * For example, 'windows' or 'debian'. - * - * Generated from protobuf field string short_name = 3; - * @return string - */ - public function getShortName() - { - return $this->short_name; - } - - /** - * The operating system short name. - * For example, 'windows' or 'debian'. - * - * Generated from protobuf field string short_name = 3; - * @param string $var - * @return $this - */ - public function setShortName($var) - { - GPBUtil::checkString($var, True); - $this->short_name = $var; - - return $this; - } - - /** - * The version of the operating system. - * - * Generated from protobuf field string version = 4; - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * The version of the operating system. - * - * Generated from protobuf field string version = 4; - * @param string $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkString($var, True); - $this->version = $var; - - return $this; - } - - /** - * The system architecture of the operating system. - * - * Generated from protobuf field string architecture = 5; - * @return string - */ - public function getArchitecture() - { - return $this->architecture; - } - - /** - * The system architecture of the operating system. - * - * Generated from protobuf field string architecture = 5; - * @param string $var - * @return $this - */ - public function setArchitecture($var) - { - GPBUtil::checkString($var, True); - $this->architecture = $var; - - return $this; - } - - /** - * The kernel version of the operating system. - * - * Generated from protobuf field string kernel_version = 6; - * @return string - */ - public function getKernelVersion() - { - return $this->kernel_version; - } - - /** - * The kernel version of the operating system. - * - * Generated from protobuf field string kernel_version = 6; - * @param string $var - * @return $this - */ - public function setKernelVersion($var) - { - GPBUtil::checkString($var, True); - $this->kernel_version = $var; - - return $this; - } - - /** - * The kernel release of the operating system. - * - * Generated from protobuf field string kernel_release = 7; - * @return string - */ - public function getKernelRelease() - { - return $this->kernel_release; - } - - /** - * The kernel release of the operating system. - * - * Generated from protobuf field string kernel_release = 7; - * @param string $var - * @return $this - */ - public function setKernelRelease($var) - { - GPBUtil::checkString($var, True); - $this->kernel_release = $var; - - return $this; - } - - /** - * The current version of the OS Config agent running on the VM. - * - * Generated from protobuf field string osconfig_agent_version = 8; - * @return string - */ - public function getOsconfigAgentVersion() - { - return $this->osconfig_agent_version; - } - - /** - * The current version of the OS Config agent running on the VM. - * - * Generated from protobuf field string osconfig_agent_version = 8; - * @param string $var - * @return $this - */ - public function setOsconfigAgentVersion($var) - { - GPBUtil::checkString($var, True); - $this->osconfig_agent_version = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(OsInfo::class, \Google\Cloud\OsConfig\V1\Inventory_OsInfo::class); - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Inventory/SoftwarePackage.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Inventory/SoftwarePackage.php deleted file mode 100644 index 0c1efa777998..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Inventory/SoftwarePackage.php +++ /dev/null @@ -1,387 +0,0 @@ -google.cloud.osconfig.v1.Inventory.SoftwarePackage - */ -class SoftwarePackage extends \Google\Protobuf\Internal\Message -{ - protected $details; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\OsConfig\V1\Inventory\VersionedPackage $yum_package - * Yum package info. - * For details about the yum package manager, see - * https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/deployment_guide/ch-yum. - * @type \Google\Cloud\OsConfig\V1\Inventory\VersionedPackage $apt_package - * Details of an APT package. - * For details about the apt package manager, see - * https://wiki.debian.org/Apt. - * @type \Google\Cloud\OsConfig\V1\Inventory\VersionedPackage $zypper_package - * Details of a Zypper package. - * For details about the Zypper package manager, see - * https://en.opensuse.org/SDB:Zypper_manual. - * @type \Google\Cloud\OsConfig\V1\Inventory\VersionedPackage $googet_package - * Details of a Googet package. - * For details about the googet package manager, see - * https://github.com/google/googet. - * @type \Google\Cloud\OsConfig\V1\Inventory\ZypperPatch $zypper_patch - * Details of a Zypper patch. - * For details about the Zypper package manager, see - * https://en.opensuse.org/SDB:Zypper_manual. - * @type \Google\Cloud\OsConfig\V1\Inventory\WindowsUpdatePackage $wua_package - * Details of a Windows Update package. - * See https://docs.microsoft.com/en-us/windows/win32/api/_wua/ for - * information about Windows Update. - * @type \Google\Cloud\OsConfig\V1\Inventory\WindowsQuickFixEngineeringPackage $qfe_package - * Details of a Windows Quick Fix engineering package. - * See - * https://docs.microsoft.com/en-us/windows/win32/cimwin32prov/win32-quickfixengineering - * for info in Windows Quick Fix Engineering. - * @type \Google\Cloud\OsConfig\V1\Inventory\VersionedPackage $cos_package - * Details of a COS package. - * @type \Google\Cloud\OsConfig\V1\Inventory\WindowsApplication $windows_application - * Details of Windows Application. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\Inventory::initOnce(); - parent::__construct($data); - } - - /** - * Yum package info. - * For details about the yum package manager, see - * https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/deployment_guide/ch-yum. - * - * Generated from protobuf field .google.cloud.osconfig.v1.Inventory.VersionedPackage yum_package = 1; - * @return \Google\Cloud\OsConfig\V1\Inventory\VersionedPackage|null - */ - public function getYumPackage() - { - return $this->readOneof(1); - } - - public function hasYumPackage() - { - return $this->hasOneof(1); - } - - /** - * Yum package info. - * For details about the yum package manager, see - * https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/deployment_guide/ch-yum. - * - * Generated from protobuf field .google.cloud.osconfig.v1.Inventory.VersionedPackage yum_package = 1; - * @param \Google\Cloud\OsConfig\V1\Inventory\VersionedPackage $var - * @return $this - */ - public function setYumPackage($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\Inventory\VersionedPackage::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Details of an APT package. - * For details about the apt package manager, see - * https://wiki.debian.org/Apt. - * - * Generated from protobuf field .google.cloud.osconfig.v1.Inventory.VersionedPackage apt_package = 2; - * @return \Google\Cloud\OsConfig\V1\Inventory\VersionedPackage|null - */ - public function getAptPackage() - { - return $this->readOneof(2); - } - - public function hasAptPackage() - { - return $this->hasOneof(2); - } - - /** - * Details of an APT package. - * For details about the apt package manager, see - * https://wiki.debian.org/Apt. - * - * Generated from protobuf field .google.cloud.osconfig.v1.Inventory.VersionedPackage apt_package = 2; - * @param \Google\Cloud\OsConfig\V1\Inventory\VersionedPackage $var - * @return $this - */ - public function setAptPackage($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\Inventory\VersionedPackage::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Details of a Zypper package. - * For details about the Zypper package manager, see - * https://en.opensuse.org/SDB:Zypper_manual. - * - * Generated from protobuf field .google.cloud.osconfig.v1.Inventory.VersionedPackage zypper_package = 3; - * @return \Google\Cloud\OsConfig\V1\Inventory\VersionedPackage|null - */ - public function getZypperPackage() - { - return $this->readOneof(3); - } - - public function hasZypperPackage() - { - return $this->hasOneof(3); - } - - /** - * Details of a Zypper package. - * For details about the Zypper package manager, see - * https://en.opensuse.org/SDB:Zypper_manual. - * - * Generated from protobuf field .google.cloud.osconfig.v1.Inventory.VersionedPackage zypper_package = 3; - * @param \Google\Cloud\OsConfig\V1\Inventory\VersionedPackage $var - * @return $this - */ - public function setZypperPackage($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\Inventory\VersionedPackage::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Details of a Googet package. - * For details about the googet package manager, see - * https://github.com/google/googet. - * - * Generated from protobuf field .google.cloud.osconfig.v1.Inventory.VersionedPackage googet_package = 4; - * @return \Google\Cloud\OsConfig\V1\Inventory\VersionedPackage|null - */ - public function getGoogetPackage() - { - return $this->readOneof(4); - } - - public function hasGoogetPackage() - { - return $this->hasOneof(4); - } - - /** - * Details of a Googet package. - * For details about the googet package manager, see - * https://github.com/google/googet. - * - * Generated from protobuf field .google.cloud.osconfig.v1.Inventory.VersionedPackage googet_package = 4; - * @param \Google\Cloud\OsConfig\V1\Inventory\VersionedPackage $var - * @return $this - */ - public function setGoogetPackage($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\Inventory\VersionedPackage::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Details of a Zypper patch. - * For details about the Zypper package manager, see - * https://en.opensuse.org/SDB:Zypper_manual. - * - * Generated from protobuf field .google.cloud.osconfig.v1.Inventory.ZypperPatch zypper_patch = 5; - * @return \Google\Cloud\OsConfig\V1\Inventory\ZypperPatch|null - */ - public function getZypperPatch() - { - return $this->readOneof(5); - } - - public function hasZypperPatch() - { - return $this->hasOneof(5); - } - - /** - * Details of a Zypper patch. - * For details about the Zypper package manager, see - * https://en.opensuse.org/SDB:Zypper_manual. - * - * Generated from protobuf field .google.cloud.osconfig.v1.Inventory.ZypperPatch zypper_patch = 5; - * @param \Google\Cloud\OsConfig\V1\Inventory\ZypperPatch $var - * @return $this - */ - public function setZypperPatch($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\Inventory\ZypperPatch::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * Details of a Windows Update package. - * See https://docs.microsoft.com/en-us/windows/win32/api/_wua/ for - * information about Windows Update. - * - * Generated from protobuf field .google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage wua_package = 6; - * @return \Google\Cloud\OsConfig\V1\Inventory\WindowsUpdatePackage|null - */ - public function getWuaPackage() - { - return $this->readOneof(6); - } - - public function hasWuaPackage() - { - return $this->hasOneof(6); - } - - /** - * Details of a Windows Update package. - * See https://docs.microsoft.com/en-us/windows/win32/api/_wua/ for - * information about Windows Update. - * - * Generated from protobuf field .google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage wua_package = 6; - * @param \Google\Cloud\OsConfig\V1\Inventory\WindowsUpdatePackage $var - * @return $this - */ - public function setWuaPackage($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\Inventory\WindowsUpdatePackage::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * Details of a Windows Quick Fix engineering package. - * See - * https://docs.microsoft.com/en-us/windows/win32/cimwin32prov/win32-quickfixengineering - * for info in Windows Quick Fix Engineering. - * - * Generated from protobuf field .google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage qfe_package = 7; - * @return \Google\Cloud\OsConfig\V1\Inventory\WindowsQuickFixEngineeringPackage|null - */ - public function getQfePackage() - { - return $this->readOneof(7); - } - - public function hasQfePackage() - { - return $this->hasOneof(7); - } - - /** - * Details of a Windows Quick Fix engineering package. - * See - * https://docs.microsoft.com/en-us/windows/win32/cimwin32prov/win32-quickfixengineering - * for info in Windows Quick Fix Engineering. - * - * Generated from protobuf field .google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage qfe_package = 7; - * @param \Google\Cloud\OsConfig\V1\Inventory\WindowsQuickFixEngineeringPackage $var - * @return $this - */ - public function setQfePackage($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\Inventory\WindowsQuickFixEngineeringPackage::class); - $this->writeOneof(7, $var); - - return $this; - } - - /** - * Details of a COS package. - * - * Generated from protobuf field .google.cloud.osconfig.v1.Inventory.VersionedPackage cos_package = 8; - * @return \Google\Cloud\OsConfig\V1\Inventory\VersionedPackage|null - */ - public function getCosPackage() - { - return $this->readOneof(8); - } - - public function hasCosPackage() - { - return $this->hasOneof(8); - } - - /** - * Details of a COS package. - * - * Generated from protobuf field .google.cloud.osconfig.v1.Inventory.VersionedPackage cos_package = 8; - * @param \Google\Cloud\OsConfig\V1\Inventory\VersionedPackage $var - * @return $this - */ - public function setCosPackage($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\Inventory\VersionedPackage::class); - $this->writeOneof(8, $var); - - return $this; - } - - /** - * Details of Windows Application. - * - * Generated from protobuf field .google.cloud.osconfig.v1.Inventory.WindowsApplication windows_application = 9; - * @return \Google\Cloud\OsConfig\V1\Inventory\WindowsApplication|null - */ - public function getWindowsApplication() - { - return $this->readOneof(9); - } - - public function hasWindowsApplication() - { - return $this->hasOneof(9); - } - - /** - * Details of Windows Application. - * - * Generated from protobuf field .google.cloud.osconfig.v1.Inventory.WindowsApplication windows_application = 9; - * @param \Google\Cloud\OsConfig\V1\Inventory\WindowsApplication $var - * @return $this - */ - public function setWindowsApplication($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\Inventory\WindowsApplication::class); - $this->writeOneof(9, $var); - - return $this; - } - - /** - * @return string - */ - public function getDetails() - { - return $this->whichOneof("details"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SoftwarePackage::class, \Google\Cloud\OsConfig\V1\Inventory_SoftwarePackage::class); - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Inventory/VersionedPackage.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Inventory/VersionedPackage.php deleted file mode 100644 index 619a13761ab7..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Inventory/VersionedPackage.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.osconfig.v1.Inventory.VersionedPackage - */ -class VersionedPackage extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the package. - * - * Generated from protobuf field string package_name = 4; - */ - protected $package_name = ''; - /** - * The system architecture this package is intended for. - * - * Generated from protobuf field string architecture = 2; - */ - protected $architecture = ''; - /** - * The version of the package. - * - * Generated from protobuf field string version = 3; - */ - protected $version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $package_name - * The name of the package. - * @type string $architecture - * The system architecture this package is intended for. - * @type string $version - * The version of the package. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\Inventory::initOnce(); - parent::__construct($data); - } - - /** - * The name of the package. - * - * Generated from protobuf field string package_name = 4; - * @return string - */ - public function getPackageName() - { - return $this->package_name; - } - - /** - * The name of the package. - * - * Generated from protobuf field string package_name = 4; - * @param string $var - * @return $this - */ - public function setPackageName($var) - { - GPBUtil::checkString($var, True); - $this->package_name = $var; - - return $this; - } - - /** - * The system architecture this package is intended for. - * - * Generated from protobuf field string architecture = 2; - * @return string - */ - public function getArchitecture() - { - return $this->architecture; - } - - /** - * The system architecture this package is intended for. - * - * Generated from protobuf field string architecture = 2; - * @param string $var - * @return $this - */ - public function setArchitecture($var) - { - GPBUtil::checkString($var, True); - $this->architecture = $var; - - return $this; - } - - /** - * The version of the package. - * - * Generated from protobuf field string version = 3; - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * The version of the package. - * - * Generated from protobuf field string version = 3; - * @param string $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkString($var, True); - $this->version = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(VersionedPackage::class, \Google\Cloud\OsConfig\V1\Inventory_VersionedPackage::class); - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Inventory/WindowsApplication.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Inventory/WindowsApplication.php deleted file mode 100644 index 6f2fe764f0a0..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Inventory/WindowsApplication.php +++ /dev/null @@ -1,226 +0,0 @@ -google.cloud.osconfig.v1.Inventory.WindowsApplication - */ -class WindowsApplication extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the application or product. - * - * Generated from protobuf field string display_name = 1; - */ - protected $display_name = ''; - /** - * The version of the product or application in string format. - * - * Generated from protobuf field string display_version = 2; - */ - protected $display_version = ''; - /** - * The name of the manufacturer for the product or application. - * - * Generated from protobuf field string publisher = 3; - */ - protected $publisher = ''; - /** - * The last time this product received service. The value of this property - * is replaced each time a patch is applied or removed from the product or - * the command-line option is used to repair the product. - * - * Generated from protobuf field .google.type.Date install_date = 4; - */ - protected $install_date = null; - /** - * The internet address for technical support. - * - * Generated from protobuf field string help_link = 5; - */ - protected $help_link = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $display_name - * The name of the application or product. - * @type string $display_version - * The version of the product or application in string format. - * @type string $publisher - * The name of the manufacturer for the product or application. - * @type \Google\Type\Date $install_date - * The last time this product received service. The value of this property - * is replaced each time a patch is applied or removed from the product or - * the command-line option is used to repair the product. - * @type string $help_link - * The internet address for technical support. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\Inventory::initOnce(); - parent::__construct($data); - } - - /** - * The name of the application or product. - * - * Generated from protobuf field string display_name = 1; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * The name of the application or product. - * - * Generated from protobuf field string display_name = 1; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * The version of the product or application in string format. - * - * Generated from protobuf field string display_version = 2; - * @return string - */ - public function getDisplayVersion() - { - return $this->display_version; - } - - /** - * The version of the product or application in string format. - * - * Generated from protobuf field string display_version = 2; - * @param string $var - * @return $this - */ - public function setDisplayVersion($var) - { - GPBUtil::checkString($var, True); - $this->display_version = $var; - - return $this; - } - - /** - * The name of the manufacturer for the product or application. - * - * Generated from protobuf field string publisher = 3; - * @return string - */ - public function getPublisher() - { - return $this->publisher; - } - - /** - * The name of the manufacturer for the product or application. - * - * Generated from protobuf field string publisher = 3; - * @param string $var - * @return $this - */ - public function setPublisher($var) - { - GPBUtil::checkString($var, True); - $this->publisher = $var; - - return $this; - } - - /** - * The last time this product received service. The value of this property - * is replaced each time a patch is applied or removed from the product or - * the command-line option is used to repair the product. - * - * Generated from protobuf field .google.type.Date install_date = 4; - * @return \Google\Type\Date|null - */ - public function getInstallDate() - { - return $this->install_date; - } - - public function hasInstallDate() - { - return isset($this->install_date); - } - - public function clearInstallDate() - { - unset($this->install_date); - } - - /** - * The last time this product received service. The value of this property - * is replaced each time a patch is applied or removed from the product or - * the command-line option is used to repair the product. - * - * Generated from protobuf field .google.type.Date install_date = 4; - * @param \Google\Type\Date $var - * @return $this - */ - public function setInstallDate($var) - { - GPBUtil::checkMessage($var, \Google\Type\Date::class); - $this->install_date = $var; - - return $this; - } - - /** - * The internet address for technical support. - * - * Generated from protobuf field string help_link = 5; - * @return string - */ - public function getHelpLink() - { - return $this->help_link; - } - - /** - * The internet address for technical support. - * - * Generated from protobuf field string help_link = 5; - * @param string $var - * @return $this - */ - public function setHelpLink($var) - { - GPBUtil::checkString($var, True); - $this->help_link = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(WindowsApplication::class, \Google\Cloud\OsConfig\V1\Inventory_WindowsApplication::class); - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Inventory/WindowsQuickFixEngineeringPackage.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Inventory/WindowsQuickFixEngineeringPackage.php deleted file mode 100644 index bd21553ac6e7..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Inventory/WindowsQuickFixEngineeringPackage.php +++ /dev/null @@ -1,185 +0,0 @@ -google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage - */ -class WindowsQuickFixEngineeringPackage extends \Google\Protobuf\Internal\Message -{ - /** - * A short textual description of the QFE update. - * - * Generated from protobuf field string caption = 1; - */ - protected $caption = ''; - /** - * A textual description of the QFE update. - * - * Generated from protobuf field string description = 2; - */ - protected $description = ''; - /** - * Unique identifier associated with a particular QFE update. - * - * Generated from protobuf field string hot_fix_id = 3; - */ - protected $hot_fix_id = ''; - /** - * Date that the QFE update was installed. Mapped from installed_on field. - * - * Generated from protobuf field .google.protobuf.Timestamp install_time = 5; - */ - protected $install_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $caption - * A short textual description of the QFE update. - * @type string $description - * A textual description of the QFE update. - * @type string $hot_fix_id - * Unique identifier associated with a particular QFE update. - * @type \Google\Protobuf\Timestamp $install_time - * Date that the QFE update was installed. Mapped from installed_on field. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\Inventory::initOnce(); - parent::__construct($data); - } - - /** - * A short textual description of the QFE update. - * - * Generated from protobuf field string caption = 1; - * @return string - */ - public function getCaption() - { - return $this->caption; - } - - /** - * A short textual description of the QFE update. - * - * Generated from protobuf field string caption = 1; - * @param string $var - * @return $this - */ - public function setCaption($var) - { - GPBUtil::checkString($var, True); - $this->caption = $var; - - return $this; - } - - /** - * A textual description of the QFE update. - * - * Generated from protobuf field string description = 2; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * A textual description of the QFE update. - * - * Generated from protobuf field string description = 2; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Unique identifier associated with a particular QFE update. - * - * Generated from protobuf field string hot_fix_id = 3; - * @return string - */ - public function getHotFixId() - { - return $this->hot_fix_id; - } - - /** - * Unique identifier associated with a particular QFE update. - * - * Generated from protobuf field string hot_fix_id = 3; - * @param string $var - * @return $this - */ - public function setHotFixId($var) - { - GPBUtil::checkString($var, True); - $this->hot_fix_id = $var; - - return $this; - } - - /** - * Date that the QFE update was installed. Mapped from installed_on field. - * - * Generated from protobuf field .google.protobuf.Timestamp install_time = 5; - * @return \Google\Protobuf\Timestamp|null - */ - public function getInstallTime() - { - return $this->install_time; - } - - public function hasInstallTime() - { - return isset($this->install_time); - } - - public function clearInstallTime() - { - unset($this->install_time); - } - - /** - * Date that the QFE update was installed. Mapped from installed_on field. - * - * Generated from protobuf field .google.protobuf.Timestamp install_time = 5; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setInstallTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->install_time = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(WindowsQuickFixEngineeringPackage::class, \Google\Cloud\OsConfig\V1\Inventory_WindowsQuickFixEngineeringPackage::class); - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Inventory/WindowsUpdatePackage.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Inventory/WindowsUpdatePackage.php deleted file mode 100644 index 60bd4b135eb6..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Inventory/WindowsUpdatePackage.php +++ /dev/null @@ -1,368 +0,0 @@ -google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage - */ -class WindowsUpdatePackage extends \Google\Protobuf\Internal\Message -{ - /** - * The localized title of the update package. - * - * Generated from protobuf field string title = 1; - */ - protected $title = ''; - /** - * The localized description of the update package. - * - * Generated from protobuf field string description = 2; - */ - protected $description = ''; - /** - * The categories that are associated with this update package. - * - * Generated from protobuf field repeated .google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory categories = 3; - */ - private $categories; - /** - * A collection of Microsoft Knowledge Base article IDs that are associated - * with the update package. - * - * Generated from protobuf field repeated string kb_article_ids = 4; - */ - private $kb_article_ids; - /** - * A hyperlink to the language-specific support information for the update. - * - * Generated from protobuf field string support_url = 11; - */ - protected $support_url = ''; - /** - * A collection of URLs that provide more information about the update - * package. - * - * Generated from protobuf field repeated string more_info_urls = 5; - */ - private $more_info_urls; - /** - * Gets the identifier of an update package. Stays the same across - * revisions. - * - * Generated from protobuf field string update_id = 6; - */ - protected $update_id = ''; - /** - * The revision number of this update package. - * - * Generated from protobuf field int32 revision_number = 7; - */ - protected $revision_number = 0; - /** - * The last published date of the update, in (UTC) date and time. - * - * Generated from protobuf field .google.protobuf.Timestamp last_deployment_change_time = 10; - */ - protected $last_deployment_change_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $title - * The localized title of the update package. - * @type string $description - * The localized description of the update package. - * @type array<\Google\Cloud\OsConfig\V1\Inventory\WindowsUpdatePackage\WindowsUpdateCategory>|\Google\Protobuf\Internal\RepeatedField $categories - * The categories that are associated with this update package. - * @type array|\Google\Protobuf\Internal\RepeatedField $kb_article_ids - * A collection of Microsoft Knowledge Base article IDs that are associated - * with the update package. - * @type string $support_url - * A hyperlink to the language-specific support information for the update. - * @type array|\Google\Protobuf\Internal\RepeatedField $more_info_urls - * A collection of URLs that provide more information about the update - * package. - * @type string $update_id - * Gets the identifier of an update package. Stays the same across - * revisions. - * @type int $revision_number - * The revision number of this update package. - * @type \Google\Protobuf\Timestamp $last_deployment_change_time - * The last published date of the update, in (UTC) date and time. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\Inventory::initOnce(); - parent::__construct($data); - } - - /** - * The localized title of the update package. - * - * Generated from protobuf field string title = 1; - * @return string - */ - public function getTitle() - { - return $this->title; - } - - /** - * The localized title of the update package. - * - * Generated from protobuf field string title = 1; - * @param string $var - * @return $this - */ - public function setTitle($var) - { - GPBUtil::checkString($var, True); - $this->title = $var; - - return $this; - } - - /** - * The localized description of the update package. - * - * Generated from protobuf field string description = 2; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * The localized description of the update package. - * - * Generated from protobuf field string description = 2; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * The categories that are associated with this update package. - * - * Generated from protobuf field repeated .google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory categories = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCategories() - { - return $this->categories; - } - - /** - * The categories that are associated with this update package. - * - * Generated from protobuf field repeated .google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory categories = 3; - * @param array<\Google\Cloud\OsConfig\V1\Inventory\WindowsUpdatePackage\WindowsUpdateCategory>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCategories($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\OsConfig\V1\Inventory\WindowsUpdatePackage\WindowsUpdateCategory::class); - $this->categories = $arr; - - return $this; - } - - /** - * A collection of Microsoft Knowledge Base article IDs that are associated - * with the update package. - * - * Generated from protobuf field repeated string kb_article_ids = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getKbArticleIds() - { - return $this->kb_article_ids; - } - - /** - * A collection of Microsoft Knowledge Base article IDs that are associated - * with the update package. - * - * Generated from protobuf field repeated string kb_article_ids = 4; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setKbArticleIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->kb_article_ids = $arr; - - return $this; - } - - /** - * A hyperlink to the language-specific support information for the update. - * - * Generated from protobuf field string support_url = 11; - * @return string - */ - public function getSupportUrl() - { - return $this->support_url; - } - - /** - * A hyperlink to the language-specific support information for the update. - * - * Generated from protobuf field string support_url = 11; - * @param string $var - * @return $this - */ - public function setSupportUrl($var) - { - GPBUtil::checkString($var, True); - $this->support_url = $var; - - return $this; - } - - /** - * A collection of URLs that provide more information about the update - * package. - * - * Generated from protobuf field repeated string more_info_urls = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMoreInfoUrls() - { - return $this->more_info_urls; - } - - /** - * A collection of URLs that provide more information about the update - * package. - * - * Generated from protobuf field repeated string more_info_urls = 5; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMoreInfoUrls($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->more_info_urls = $arr; - - return $this; - } - - /** - * Gets the identifier of an update package. Stays the same across - * revisions. - * - * Generated from protobuf field string update_id = 6; - * @return string - */ - public function getUpdateId() - { - return $this->update_id; - } - - /** - * Gets the identifier of an update package. Stays the same across - * revisions. - * - * Generated from protobuf field string update_id = 6; - * @param string $var - * @return $this - */ - public function setUpdateId($var) - { - GPBUtil::checkString($var, True); - $this->update_id = $var; - - return $this; - } - - /** - * The revision number of this update package. - * - * Generated from protobuf field int32 revision_number = 7; - * @return int - */ - public function getRevisionNumber() - { - return $this->revision_number; - } - - /** - * The revision number of this update package. - * - * Generated from protobuf field int32 revision_number = 7; - * @param int $var - * @return $this - */ - public function setRevisionNumber($var) - { - GPBUtil::checkInt32($var); - $this->revision_number = $var; - - return $this; - } - - /** - * The last published date of the update, in (UTC) date and time. - * - * Generated from protobuf field .google.protobuf.Timestamp last_deployment_change_time = 10; - * @return \Google\Protobuf\Timestamp|null - */ - public function getLastDeploymentChangeTime() - { - return $this->last_deployment_change_time; - } - - public function hasLastDeploymentChangeTime() - { - return isset($this->last_deployment_change_time); - } - - public function clearLastDeploymentChangeTime() - { - unset($this->last_deployment_change_time); - } - - /** - * The last published date of the update, in (UTC) date and time. - * - * Generated from protobuf field .google.protobuf.Timestamp last_deployment_change_time = 10; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setLastDeploymentChangeTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->last_deployment_change_time = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(WindowsUpdatePackage::class, \Google\Cloud\OsConfig\V1\Inventory_WindowsUpdatePackage::class); - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Inventory/WindowsUpdatePackage/WindowsUpdateCategory.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Inventory/WindowsUpdatePackage/WindowsUpdateCategory.php deleted file mode 100644 index 9b3288f0412d..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Inventory/WindowsUpdatePackage/WindowsUpdateCategory.php +++ /dev/null @@ -1,104 +0,0 @@ -google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory - */ -class WindowsUpdateCategory extends \Google\Protobuf\Internal\Message -{ - /** - * The identifier of the windows update category. - * - * Generated from protobuf field string id = 1; - */ - protected $id = ''; - /** - * The name of the windows update category. - * - * Generated from protobuf field string name = 2; - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $id - * The identifier of the windows update category. - * @type string $name - * The name of the windows update category. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\Inventory::initOnce(); - parent::__construct($data); - } - - /** - * The identifier of the windows update category. - * - * Generated from protobuf field string id = 1; - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * The identifier of the windows update category. - * - * Generated from protobuf field string id = 1; - * @param string $var - * @return $this - */ - public function setId($var) - { - GPBUtil::checkString($var, True); - $this->id = $var; - - return $this; - } - - /** - * The name of the windows update category. - * - * Generated from protobuf field string name = 2; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The name of the windows update category. - * - * Generated from protobuf field string name = 2; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(WindowsUpdateCategory::class, \Google\Cloud\OsConfig\V1\Inventory_WindowsUpdatePackage_WindowsUpdateCategory::class); - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Inventory/ZypperPatch.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Inventory/ZypperPatch.php deleted file mode 100644 index dc876af0d8c4..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/Inventory/ZypperPatch.php +++ /dev/null @@ -1,172 +0,0 @@ -google.cloud.osconfig.v1.Inventory.ZypperPatch - */ -class ZypperPatch extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the patch. - * - * Generated from protobuf field string patch_name = 5; - */ - protected $patch_name = ''; - /** - * The category of the patch. - * - * Generated from protobuf field string category = 2; - */ - protected $category = ''; - /** - * The severity specified for this patch - * - * Generated from protobuf field string severity = 3; - */ - protected $severity = ''; - /** - * Any summary information provided about this patch. - * - * Generated from protobuf field string summary = 4; - */ - protected $summary = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $patch_name - * The name of the patch. - * @type string $category - * The category of the patch. - * @type string $severity - * The severity specified for this patch - * @type string $summary - * Any summary information provided about this patch. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\Inventory::initOnce(); - parent::__construct($data); - } - - /** - * The name of the patch. - * - * Generated from protobuf field string patch_name = 5; - * @return string - */ - public function getPatchName() - { - return $this->patch_name; - } - - /** - * The name of the patch. - * - * Generated from protobuf field string patch_name = 5; - * @param string $var - * @return $this - */ - public function setPatchName($var) - { - GPBUtil::checkString($var, True); - $this->patch_name = $var; - - return $this; - } - - /** - * The category of the patch. - * - * Generated from protobuf field string category = 2; - * @return string - */ - public function getCategory() - { - return $this->category; - } - - /** - * The category of the patch. - * - * Generated from protobuf field string category = 2; - * @param string $var - * @return $this - */ - public function setCategory($var) - { - GPBUtil::checkString($var, True); - $this->category = $var; - - return $this; - } - - /** - * The severity specified for this patch - * - * Generated from protobuf field string severity = 3; - * @return string - */ - public function getSeverity() - { - return $this->severity; - } - - /** - * The severity specified for this patch - * - * Generated from protobuf field string severity = 3; - * @param string $var - * @return $this - */ - public function setSeverity($var) - { - GPBUtil::checkString($var, True); - $this->severity = $var; - - return $this; - } - - /** - * Any summary information provided about this patch. - * - * Generated from protobuf field string summary = 4; - * @return string - */ - public function getSummary() - { - return $this->summary; - } - - /** - * Any summary information provided about this patch. - * - * Generated from protobuf field string summary = 4; - * @param string $var - * @return $this - */ - public function setSummary($var) - { - GPBUtil::checkString($var, True); - $this->summary = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ZypperPatch::class, \Google\Cloud\OsConfig\V1\Inventory_ZypperPatch::class); - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/InventoryView.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/InventoryView.php deleted file mode 100644 index eb6194d6c526..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/InventoryView.php +++ /dev/null @@ -1,62 +0,0 @@ -google.cloud.osconfig.v1.InventoryView - */ -class InventoryView -{ - /** - * The default value. - * The API defaults to the BASIC view. - * - * Generated from protobuf enum INVENTORY_VIEW_UNSPECIFIED = 0; - */ - const INVENTORY_VIEW_UNSPECIFIED = 0; - /** - * Returns the basic inventory information that includes `os_info`. - * - * Generated from protobuf enum BASIC = 1; - */ - const BASIC = 1; - /** - * Returns all fields. - * - * Generated from protobuf enum FULL = 2; - */ - const FULL = 2; - - private static $valueToName = [ - self::INVENTORY_VIEW_UNSPECIFIED => 'INVENTORY_VIEW_UNSPECIFIED', - self::BASIC => 'BASIC', - self::FULL => 'FULL', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListInventoriesRequest.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListInventoriesRequest.php deleted file mode 100644 index 10f17a2d79a4..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListInventoriesRequest.php +++ /dev/null @@ -1,246 +0,0 @@ -google.cloud.osconfig.v1.ListInventoriesRequest - */ -class ListInventoriesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource name. - * Format: `projects/{project}/locations/{location}/instances/-` - * For `{project}`, either `project-number` or `project-id` can be provided. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Inventory view indicating what information should be included in the - * inventory resource. If unspecified, the default view is BASIC. - * - * Generated from protobuf field .google.cloud.osconfig.v1.InventoryView view = 2; - */ - protected $view = 0; - /** - * The maximum number of results to return. - * - * Generated from protobuf field int32 page_size = 3; - */ - protected $page_size = 0; - /** - * A pagination token returned from a previous call to - * `ListInventories` that indicates where this listing - * should continue from. - * - * Generated from protobuf field string page_token = 4; - */ - protected $page_token = ''; - /** - * If provided, this field specifies the criteria that must be met by a - * `Inventory` API resource to be included in the response. - * - * Generated from protobuf field string filter = 5; - */ - protected $filter = ''; - - /** - * @param string $parent Required. The parent resource name. - * - * Format: `projects/{project}/locations/{location}/instances/-` - * - * For `{project}`, either `project-number` or `project-id` can be provided. Please see - * {@see OsConfigZonalServiceClient::instanceName()} for help formatting this field. - * - * @return \Google\Cloud\OsConfig\V1\ListInventoriesRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource name. - * Format: `projects/{project}/locations/{location}/instances/-` - * For `{project}`, either `project-number` or `project-id` can be provided. - * @type int $view - * Inventory view indicating what information should be included in the - * inventory resource. If unspecified, the default view is BASIC. - * @type int $page_size - * The maximum number of results to return. - * @type string $page_token - * A pagination token returned from a previous call to - * `ListInventories` that indicates where this listing - * should continue from. - * @type string $filter - * If provided, this field specifies the criteria that must be met by a - * `Inventory` API resource to be included in the response. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\Inventory::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource name. - * Format: `projects/{project}/locations/{location}/instances/-` - * For `{project}`, either `project-number` or `project-id` can be provided. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource name. - * Format: `projects/{project}/locations/{location}/instances/-` - * For `{project}`, either `project-number` or `project-id` can be provided. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Inventory view indicating what information should be included in the - * inventory resource. If unspecified, the default view is BASIC. - * - * Generated from protobuf field .google.cloud.osconfig.v1.InventoryView view = 2; - * @return int - */ - public function getView() - { - return $this->view; - } - - /** - * Inventory view indicating what information should be included in the - * inventory resource. If unspecified, the default view is BASIC. - * - * Generated from protobuf field .google.cloud.osconfig.v1.InventoryView view = 2; - * @param int $var - * @return $this - */ - public function setView($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\OsConfig\V1\InventoryView::class); - $this->view = $var; - - return $this; - } - - /** - * The maximum number of results to return. - * - * Generated from protobuf field int32 page_size = 3; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of results to return. - * - * Generated from protobuf field int32 page_size = 3; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A pagination token returned from a previous call to - * `ListInventories` that indicates where this listing - * should continue from. - * - * Generated from protobuf field string page_token = 4; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A pagination token returned from a previous call to - * `ListInventories` that indicates where this listing - * should continue from. - * - * Generated from protobuf field string page_token = 4; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * If provided, this field specifies the criteria that must be met by a - * `Inventory` API resource to be included in the response. - * - * Generated from protobuf field string filter = 5; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * If provided, this field specifies the criteria that must be met by a - * `Inventory` API resource to be included in the response. - * - * Generated from protobuf field string filter = 5; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListInventoriesResponse.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListInventoriesResponse.php deleted file mode 100644 index c1d0aa692768..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListInventoriesResponse.php +++ /dev/null @@ -1,102 +0,0 @@ -google.cloud.osconfig.v1.ListInventoriesResponse - */ -class ListInventoriesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * List of inventory objects. - * - * Generated from protobuf field repeated .google.cloud.osconfig.v1.Inventory inventories = 1; - */ - private $inventories; - /** - * The pagination token to retrieve the next page of inventory objects. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\OsConfig\V1\Inventory>|\Google\Protobuf\Internal\RepeatedField $inventories - * List of inventory objects. - * @type string $next_page_token - * The pagination token to retrieve the next page of inventory objects. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\Inventory::initOnce(); - parent::__construct($data); - } - - /** - * List of inventory objects. - * - * Generated from protobuf field repeated .google.cloud.osconfig.v1.Inventory inventories = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getInventories() - { - return $this->inventories; - } - - /** - * List of inventory objects. - * - * Generated from protobuf field repeated .google.cloud.osconfig.v1.Inventory inventories = 1; - * @param array<\Google\Cloud\OsConfig\V1\Inventory>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setInventories($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\OsConfig\V1\Inventory::class); - $this->inventories = $arr; - - return $this; - } - - /** - * The pagination token to retrieve the next page of inventory objects. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * The pagination token to retrieve the next page of inventory objects. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListOSPolicyAssignmentReportsRequest.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListOSPolicyAssignmentReportsRequest.php deleted file mode 100644 index aa3cd3257a0f..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListOSPolicyAssignmentReportsRequest.php +++ /dev/null @@ -1,283 +0,0 @@ -google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsRequest - */ -class ListOSPolicyAssignmentReportsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource name. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}/reports` - * For `{project}`, either `project-number` or `project-id` can be provided. - * For `{instance}`, either `instance-name`, `instance-id`, or `-` can be - * provided. If '-' is provided, the response will include - * OSPolicyAssignmentReports for all instances in the project/location. - * For `{assignment}`, either `assignment-id` or `-` can be provided. If '-' - * is provided, the response will include OSPolicyAssignmentReports for all - * OSPolicyAssignments in the project/location. - * Either {instance} or {assignment} must be `-`. - * For example: - * `projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/-/reports` - * returns all reports for the instance - * `projects/{project}/locations/{location}/instances/-/osPolicyAssignments/{assignment-id}/reports` - * returns all the reports for the given assignment across all instances. - * `projects/{project}/locations/{location}/instances/-/osPolicyAssignments/-/reports` - * returns all the reports for all assignments across all instances. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of results to return. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * If provided, this field specifies the criteria that must be met by the - * `OSPolicyAssignmentReport` API resource that is included in the response. - * - * Generated from protobuf field string filter = 3; - */ - protected $filter = ''; - /** - * A pagination token returned from a previous call to the - * `ListOSPolicyAssignmentReports` method that indicates where this listing - * should continue from. - * - * Generated from protobuf field string page_token = 4; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The parent resource name. - * - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}/reports` - * - * For `{project}`, either `project-number` or `project-id` can be provided. - * For `{instance}`, either `instance-name`, `instance-id`, or `-` can be - * provided. If '-' is provided, the response will include - * OSPolicyAssignmentReports for all instances in the project/location. - * For `{assignment}`, either `assignment-id` or `-` can be provided. If '-' - * is provided, the response will include OSPolicyAssignmentReports for all - * OSPolicyAssignments in the project/location. - * Either {instance} or {assignment} must be `-`. - * - * For example: - * `projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/-/reports` - * returns all reports for the instance - * `projects/{project}/locations/{location}/instances/-/osPolicyAssignments/{assignment-id}/reports` - * returns all the reports for the given assignment across all instances. - * `projects/{project}/locations/{location}/instances/-/osPolicyAssignments/-/reports` - * returns all the reports for all assignments across all instances. Please see - * {@see OsConfigZonalServiceClient::instanceOSPolicyAssignmentName()} for help formatting this field. - * - * @return \Google\Cloud\OsConfig\V1\ListOSPolicyAssignmentReportsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource name. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}/reports` - * For `{project}`, either `project-number` or `project-id` can be provided. - * For `{instance}`, either `instance-name`, `instance-id`, or `-` can be - * provided. If '-' is provided, the response will include - * OSPolicyAssignmentReports for all instances in the project/location. - * For `{assignment}`, either `assignment-id` or `-` can be provided. If '-' - * is provided, the response will include OSPolicyAssignmentReports for all - * OSPolicyAssignments in the project/location. - * Either {instance} or {assignment} must be `-`. - * For example: - * `projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/-/reports` - * returns all reports for the instance - * `projects/{project}/locations/{location}/instances/-/osPolicyAssignments/{assignment-id}/reports` - * returns all the reports for the given assignment across all instances. - * `projects/{project}/locations/{location}/instances/-/osPolicyAssignments/-/reports` - * returns all the reports for all assignments across all instances. - * @type int $page_size - * The maximum number of results to return. - * @type string $filter - * If provided, this field specifies the criteria that must be met by the - * `OSPolicyAssignmentReport` API resource that is included in the response. - * @type string $page_token - * A pagination token returned from a previous call to the - * `ListOSPolicyAssignmentReports` method that indicates where this listing - * should continue from. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\OsPolicyAssignmentReports::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource name. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}/reports` - * For `{project}`, either `project-number` or `project-id` can be provided. - * For `{instance}`, either `instance-name`, `instance-id`, or `-` can be - * provided. If '-' is provided, the response will include - * OSPolicyAssignmentReports for all instances in the project/location. - * For `{assignment}`, either `assignment-id` or `-` can be provided. If '-' - * is provided, the response will include OSPolicyAssignmentReports for all - * OSPolicyAssignments in the project/location. - * Either {instance} or {assignment} must be `-`. - * For example: - * `projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/-/reports` - * returns all reports for the instance - * `projects/{project}/locations/{location}/instances/-/osPolicyAssignments/{assignment-id}/reports` - * returns all the reports for the given assignment across all instances. - * `projects/{project}/locations/{location}/instances/-/osPolicyAssignments/-/reports` - * returns all the reports for all assignments across all instances. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource name. - * Format: - * `projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}/reports` - * For `{project}`, either `project-number` or `project-id` can be provided. - * For `{instance}`, either `instance-name`, `instance-id`, or `-` can be - * provided. If '-' is provided, the response will include - * OSPolicyAssignmentReports for all instances in the project/location. - * For `{assignment}`, either `assignment-id` or `-` can be provided. If '-' - * is provided, the response will include OSPolicyAssignmentReports for all - * OSPolicyAssignments in the project/location. - * Either {instance} or {assignment} must be `-`. - * For example: - * `projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/-/reports` - * returns all reports for the instance - * `projects/{project}/locations/{location}/instances/-/osPolicyAssignments/{assignment-id}/reports` - * returns all the reports for the given assignment across all instances. - * `projects/{project}/locations/{location}/instances/-/osPolicyAssignments/-/reports` - * returns all the reports for all assignments across all instances. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * The maximum number of results to return. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of results to return. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * If provided, this field specifies the criteria that must be met by the - * `OSPolicyAssignmentReport` API resource that is included in the response. - * - * Generated from protobuf field string filter = 3; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * If provided, this field specifies the criteria that must be met by the - * `OSPolicyAssignmentReport` API resource that is included in the response. - * - * Generated from protobuf field string filter = 3; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * A pagination token returned from a previous call to the - * `ListOSPolicyAssignmentReports` method that indicates where this listing - * should continue from. - * - * Generated from protobuf field string page_token = 4; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A pagination token returned from a previous call to the - * `ListOSPolicyAssignmentReports` method that indicates where this listing - * should continue from. - * - * Generated from protobuf field string page_token = 4; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListOSPolicyAssignmentReportsResponse.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListOSPolicyAssignmentReportsResponse.php deleted file mode 100644 index 332138efc2c5..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListOSPolicyAssignmentReportsResponse.php +++ /dev/null @@ -1,106 +0,0 @@ -google.cloud.osconfig.v1.ListOSPolicyAssignmentReportsResponse - */ -class ListOSPolicyAssignmentReportsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * List of OS policy assignment reports. - * - * Generated from protobuf field repeated .google.cloud.osconfig.v1.OSPolicyAssignmentReport os_policy_assignment_reports = 1; - */ - private $os_policy_assignment_reports; - /** - * The pagination token to retrieve the next page of OS policy assignment - * report objects. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\OsConfig\V1\OSPolicyAssignmentReport>|\Google\Protobuf\Internal\RepeatedField $os_policy_assignment_reports - * List of OS policy assignment reports. - * @type string $next_page_token - * The pagination token to retrieve the next page of OS policy assignment - * report objects. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\OsPolicyAssignmentReports::initOnce(); - parent::__construct($data); - } - - /** - * List of OS policy assignment reports. - * - * Generated from protobuf field repeated .google.cloud.osconfig.v1.OSPolicyAssignmentReport os_policy_assignment_reports = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getOsPolicyAssignmentReports() - { - return $this->os_policy_assignment_reports; - } - - /** - * List of OS policy assignment reports. - * - * Generated from protobuf field repeated .google.cloud.osconfig.v1.OSPolicyAssignmentReport os_policy_assignment_reports = 1; - * @param array<\Google\Cloud\OsConfig\V1\OSPolicyAssignmentReport>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setOsPolicyAssignmentReports($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\OsConfig\V1\OSPolicyAssignmentReport::class); - $this->os_policy_assignment_reports = $arr; - - return $this; - } - - /** - * The pagination token to retrieve the next page of OS policy assignment - * report objects. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * The pagination token to retrieve the next page of OS policy assignment - * report objects. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListOSPolicyAssignmentRevisionsRequest.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListOSPolicyAssignmentRevisionsRequest.php deleted file mode 100644 index f447e8890ede..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListOSPolicyAssignmentRevisionsRequest.php +++ /dev/null @@ -1,157 +0,0 @@ -google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsRequest - */ -class ListOSPolicyAssignmentRevisionsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the OS policy assignment to list revisions for. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * The maximum number of revisions to return. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A pagination token returned from a previous call to - * `ListOSPolicyAssignmentRevisions` that indicates where this listing should - * continue from. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $name Required. The name of the OS policy assignment to list revisions for. Please see - * {@see OsConfigZonalServiceClient::oSPolicyAssignmentName()} for help formatting this field. - * - * @return \Google\Cloud\OsConfig\V1\ListOSPolicyAssignmentRevisionsRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the OS policy assignment to list revisions for. - * @type int $page_size - * The maximum number of revisions to return. - * @type string $page_token - * A pagination token returned from a previous call to - * `ListOSPolicyAssignmentRevisions` that indicates where this listing should - * continue from. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\OsPolicyAssignments::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the OS policy assignment to list revisions for. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the OS policy assignment to list revisions for. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The maximum number of revisions to return. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of revisions to return. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A pagination token returned from a previous call to - * `ListOSPolicyAssignmentRevisions` that indicates where this listing should - * continue from. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A pagination token returned from a previous call to - * `ListOSPolicyAssignmentRevisions` that indicates where this listing should - * continue from. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListOSPolicyAssignmentRevisionsResponse.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListOSPolicyAssignmentRevisionsResponse.php deleted file mode 100644 index d51a61e1ad48..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListOSPolicyAssignmentRevisionsResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.osconfig.v1.ListOSPolicyAssignmentRevisionsResponse - */ -class ListOSPolicyAssignmentRevisionsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The OS policy assignment revisions - * - * Generated from protobuf field repeated .google.cloud.osconfig.v1.OSPolicyAssignment os_policy_assignments = 1; - */ - private $os_policy_assignments; - /** - * The pagination token to retrieve the next page of OS policy assignment - * revisions. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\OsConfig\V1\OSPolicyAssignment>|\Google\Protobuf\Internal\RepeatedField $os_policy_assignments - * The OS policy assignment revisions - * @type string $next_page_token - * The pagination token to retrieve the next page of OS policy assignment - * revisions. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\OsPolicyAssignments::initOnce(); - parent::__construct($data); - } - - /** - * The OS policy assignment revisions - * - * Generated from protobuf field repeated .google.cloud.osconfig.v1.OSPolicyAssignment os_policy_assignments = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getOsPolicyAssignments() - { - return $this->os_policy_assignments; - } - - /** - * The OS policy assignment revisions - * - * Generated from protobuf field repeated .google.cloud.osconfig.v1.OSPolicyAssignment os_policy_assignments = 1; - * @param array<\Google\Cloud\OsConfig\V1\OSPolicyAssignment>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setOsPolicyAssignments($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\OsConfig\V1\OSPolicyAssignment::class); - $this->os_policy_assignments = $arr; - - return $this; - } - - /** - * The pagination token to retrieve the next page of OS policy assignment - * revisions. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * The pagination token to retrieve the next page of OS policy assignment - * revisions. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListOSPolicyAssignmentsRequest.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListOSPolicyAssignmentsRequest.php deleted file mode 100644 index acce0b60f54b..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListOSPolicyAssignmentsRequest.php +++ /dev/null @@ -1,157 +0,0 @@ -google.cloud.osconfig.v1.ListOSPolicyAssignmentsRequest - */ -class ListOSPolicyAssignmentsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource name. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of assignments to return. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A pagination token returned from a previous call to - * `ListOSPolicyAssignments` that indicates where this listing should continue - * from. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The parent resource name. Please see - * {@see OsConfigZonalServiceClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\OsConfig\V1\ListOSPolicyAssignmentsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource name. - * @type int $page_size - * The maximum number of assignments to return. - * @type string $page_token - * A pagination token returned from a previous call to - * `ListOSPolicyAssignments` that indicates where this listing should continue - * from. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\OsPolicyAssignments::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource name. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource name. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * The maximum number of assignments to return. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of assignments to return. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A pagination token returned from a previous call to - * `ListOSPolicyAssignments` that indicates where this listing should continue - * from. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A pagination token returned from a previous call to - * `ListOSPolicyAssignments` that indicates where this listing should continue - * from. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListOSPolicyAssignmentsResponse.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListOSPolicyAssignmentsResponse.php deleted file mode 100644 index 9b8390e7c544..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListOSPolicyAssignmentsResponse.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.osconfig.v1.ListOSPolicyAssignmentsResponse - */ -class ListOSPolicyAssignmentsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of assignments - * - * Generated from protobuf field repeated .google.cloud.osconfig.v1.OSPolicyAssignment os_policy_assignments = 1; - */ - private $os_policy_assignments; - /** - * The pagination token to retrieve the next page of OS policy assignments. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\OsConfig\V1\OSPolicyAssignment>|\Google\Protobuf\Internal\RepeatedField $os_policy_assignments - * The list of assignments - * @type string $next_page_token - * The pagination token to retrieve the next page of OS policy assignments. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\OsPolicyAssignments::initOnce(); - parent::__construct($data); - } - - /** - * The list of assignments - * - * Generated from protobuf field repeated .google.cloud.osconfig.v1.OSPolicyAssignment os_policy_assignments = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getOsPolicyAssignments() - { - return $this->os_policy_assignments; - } - - /** - * The list of assignments - * - * Generated from protobuf field repeated .google.cloud.osconfig.v1.OSPolicyAssignment os_policy_assignments = 1; - * @param array<\Google\Cloud\OsConfig\V1\OSPolicyAssignment>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setOsPolicyAssignments($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\OsConfig\V1\OSPolicyAssignment::class); - $this->os_policy_assignments = $arr; - - return $this; - } - - /** - * The pagination token to retrieve the next page of OS policy assignments. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * The pagination token to retrieve the next page of OS policy assignments. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListPatchDeploymentsRequest.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListPatchDeploymentsRequest.php deleted file mode 100644 index 7ad08e78f343..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListPatchDeploymentsRequest.php +++ /dev/null @@ -1,161 +0,0 @@ -google.cloud.osconfig.v1.ListPatchDeploymentsRequest - */ -class ListPatchDeploymentsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the parent in the form `projects/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The maximum number of patch deployments to return. Default is - * 100. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. A pagination token returned from a previous call to - * ListPatchDeployments that indicates where this listing should continue - * from. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The resource name of the parent in the form `projects/*`. Please see - * {@see OsConfigServiceClient::projectName()} for help formatting this field. - * - * @return \Google\Cloud\OsConfig\V1\ListPatchDeploymentsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the parent in the form `projects/*`. - * @type int $page_size - * Optional. The maximum number of patch deployments to return. Default is - * 100. - * @type string $page_token - * Optional. A pagination token returned from a previous call to - * ListPatchDeployments that indicates where this listing should continue - * from. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\PatchDeployments::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the parent in the form `projects/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The resource name of the parent in the form `projects/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. The maximum number of patch deployments to return. Default is - * 100. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of patch deployments to return. Default is - * 100. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. A pagination token returned from a previous call to - * ListPatchDeployments that indicates where this listing should continue - * from. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. A pagination token returned from a previous call to - * ListPatchDeployments that indicates where this listing should continue - * from. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListPatchDeploymentsResponse.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListPatchDeploymentsResponse.php deleted file mode 100644 index e17162ddb232..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListPatchDeploymentsResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.osconfig.v1.ListPatchDeploymentsResponse - */ -class ListPatchDeploymentsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of patch deployments. - * - * Generated from protobuf field repeated .google.cloud.osconfig.v1.PatchDeployment patch_deployments = 1; - */ - private $patch_deployments; - /** - * A pagination token that can be used to get the next page of patch - * deployments. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\OsConfig\V1\PatchDeployment>|\Google\Protobuf\Internal\RepeatedField $patch_deployments - * The list of patch deployments. - * @type string $next_page_token - * A pagination token that can be used to get the next page of patch - * deployments. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\PatchDeployments::initOnce(); - parent::__construct($data); - } - - /** - * The list of patch deployments. - * - * Generated from protobuf field repeated .google.cloud.osconfig.v1.PatchDeployment patch_deployments = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPatchDeployments() - { - return $this->patch_deployments; - } - - /** - * The list of patch deployments. - * - * Generated from protobuf field repeated .google.cloud.osconfig.v1.PatchDeployment patch_deployments = 1; - * @param array<\Google\Cloud\OsConfig\V1\PatchDeployment>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPatchDeployments($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\OsConfig\V1\PatchDeployment::class); - $this->patch_deployments = $arr; - - return $this; - } - - /** - * A pagination token that can be used to get the next page of patch - * deployments. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A pagination token that can be used to get the next page of patch - * deployments. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListPatchJobInstanceDetailsRequest.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListPatchJobInstanceDetailsRequest.php deleted file mode 100644 index 73a61e1c1ffc..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListPatchJobInstanceDetailsRequest.php +++ /dev/null @@ -1,200 +0,0 @@ -google.cloud.osconfig.v1.ListPatchJobInstanceDetailsRequest - */ -class ListPatchJobInstanceDetailsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent for the instances are in the form of - * `projects/*/patchJobs/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of instance details records to return. Default is 100. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A pagination token returned from a previous call - * that indicates where this listing should continue from. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * A filter expression that filters results listed in the response. This - * field supports filtering results by instance zone, name, state, or - * `failure_reason`. - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - - /** - * @param string $parent Required. The parent for the instances are in the form of - * `projects/*/patchJobs/*`. Please see - * {@see OsConfigServiceClient::patchJobName()} for help formatting this field. - * - * @return \Google\Cloud\OsConfig\V1\ListPatchJobInstanceDetailsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent for the instances are in the form of - * `projects/*/patchJobs/*`. - * @type int $page_size - * The maximum number of instance details records to return. Default is 100. - * @type string $page_token - * A pagination token returned from a previous call - * that indicates where this listing should continue from. - * @type string $filter - * A filter expression that filters results listed in the response. This - * field supports filtering results by instance zone, name, state, or - * `failure_reason`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\PatchJobs::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent for the instances are in the form of - * `projects/*/patchJobs/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent for the instances are in the form of - * `projects/*/patchJobs/*`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * The maximum number of instance details records to return. Default is 100. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of instance details records to return. Default is 100. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A pagination token returned from a previous call - * that indicates where this listing should continue from. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A pagination token returned from a previous call - * that indicates where this listing should continue from. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * A filter expression that filters results listed in the response. This - * field supports filtering results by instance zone, name, state, or - * `failure_reason`. - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * A filter expression that filters results listed in the response. This - * field supports filtering results by instance zone, name, state, or - * `failure_reason`. - * - * Generated from protobuf field string filter = 4; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListPatchJobInstanceDetailsResponse.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListPatchJobInstanceDetailsResponse.php deleted file mode 100644 index d6cb6f297b8e..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListPatchJobInstanceDetailsResponse.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.osconfig.v1.ListPatchJobInstanceDetailsResponse - */ -class ListPatchJobInstanceDetailsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of instance status. - * - * Generated from protobuf field repeated .google.cloud.osconfig.v1.PatchJobInstanceDetails patch_job_instance_details = 1; - */ - private $patch_job_instance_details; - /** - * A pagination token that can be used to get the next page of results. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\OsConfig\V1\PatchJobInstanceDetails>|\Google\Protobuf\Internal\RepeatedField $patch_job_instance_details - * A list of instance status. - * @type string $next_page_token - * A pagination token that can be used to get the next page of results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\PatchJobs::initOnce(); - parent::__construct($data); - } - - /** - * A list of instance status. - * - * Generated from protobuf field repeated .google.cloud.osconfig.v1.PatchJobInstanceDetails patch_job_instance_details = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPatchJobInstanceDetails() - { - return $this->patch_job_instance_details; - } - - /** - * A list of instance status. - * - * Generated from protobuf field repeated .google.cloud.osconfig.v1.PatchJobInstanceDetails patch_job_instance_details = 1; - * @param array<\Google\Cloud\OsConfig\V1\PatchJobInstanceDetails>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPatchJobInstanceDetails($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\OsConfig\V1\PatchJobInstanceDetails::class); - $this->patch_job_instance_details = $arr; - - return $this; - } - - /** - * A pagination token that can be used to get the next page of results. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A pagination token that can be used to get the next page of results. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListPatchJobsRequest.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListPatchJobsRequest.php deleted file mode 100644 index 768d9cfd5652..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListPatchJobsRequest.php +++ /dev/null @@ -1,195 +0,0 @@ -google.cloud.osconfig.v1.ListPatchJobsRequest - */ -class ListPatchJobsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. In the form of `projects/*` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of instance status to return. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A pagination token returned from a previous call - * that indicates where this listing should continue from. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * If provided, this field specifies the criteria that must be met by patch - * jobs to be included in the response. - * Currently, filtering is only available on the patch_deployment field. - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - - /** - * @param string $parent Required. In the form of `projects/*` - * Please see {@see OsConfigServiceClient::projectName()} for help formatting this field. - * - * @return \Google\Cloud\OsConfig\V1\ListPatchJobsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. In the form of `projects/*` - * @type int $page_size - * The maximum number of instance status to return. - * @type string $page_token - * A pagination token returned from a previous call - * that indicates where this listing should continue from. - * @type string $filter - * If provided, this field specifies the criteria that must be met by patch - * jobs to be included in the response. - * Currently, filtering is only available on the patch_deployment field. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\PatchJobs::initOnce(); - parent::__construct($data); - } - - /** - * Required. In the form of `projects/*` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. In the form of `projects/*` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * The maximum number of instance status to return. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of instance status to return. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A pagination token returned from a previous call - * that indicates where this listing should continue from. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A pagination token returned from a previous call - * that indicates where this listing should continue from. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * If provided, this field specifies the criteria that must be met by patch - * jobs to be included in the response. - * Currently, filtering is only available on the patch_deployment field. - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * If provided, this field specifies the criteria that must be met by patch - * jobs to be included in the response. - * Currently, filtering is only available on the patch_deployment field. - * - * Generated from protobuf field string filter = 4; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListPatchJobsResponse.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListPatchJobsResponse.php deleted file mode 100644 index 481d0a0b4932..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListPatchJobsResponse.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.osconfig.v1.ListPatchJobsResponse - */ -class ListPatchJobsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of patch jobs. - * - * Generated from protobuf field repeated .google.cloud.osconfig.v1.PatchJob patch_jobs = 1; - */ - private $patch_jobs; - /** - * A pagination token that can be used to get the next page of results. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\OsConfig\V1\PatchJob>|\Google\Protobuf\Internal\RepeatedField $patch_jobs - * The list of patch jobs. - * @type string $next_page_token - * A pagination token that can be used to get the next page of results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\PatchJobs::initOnce(); - parent::__construct($data); - } - - /** - * The list of patch jobs. - * - * Generated from protobuf field repeated .google.cloud.osconfig.v1.PatchJob patch_jobs = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPatchJobs() - { - return $this->patch_jobs; - } - - /** - * The list of patch jobs. - * - * Generated from protobuf field repeated .google.cloud.osconfig.v1.PatchJob patch_jobs = 1; - * @param array<\Google\Cloud\OsConfig\V1\PatchJob>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPatchJobs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\OsConfig\V1\PatchJob::class); - $this->patch_jobs = $arr; - - return $this; - } - - /** - * A pagination token that can be used to get the next page of results. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A pagination token that can be used to get the next page of results. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListVulnerabilityReportsRequest.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListVulnerabilityReportsRequest.php deleted file mode 100644 index aa81a0eb353d..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListVulnerabilityReportsRequest.php +++ /dev/null @@ -1,208 +0,0 @@ -google.cloud.osconfig.v1.ListVulnerabilityReportsRequest - */ -class ListVulnerabilityReportsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource name. - * Format: `projects/{project}/locations/{location}/instances/-` - * For `{project}`, either `project-number` or `project-id` can be provided. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of results to return. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A pagination token returned from a previous call to - * `ListVulnerabilityReports` that indicates where this listing - * should continue from. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * If provided, this field specifies the criteria that must be met by a - * `vulnerabilityReport` API resource to be included in the response. - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - - /** - * @param string $parent Required. The parent resource name. - * - * Format: `projects/{project}/locations/{location}/instances/-` - * - * For `{project}`, either `project-number` or `project-id` can be provided. Please see - * {@see OsConfigZonalServiceClient::instanceName()} for help formatting this field. - * - * @return \Google\Cloud\OsConfig\V1\ListVulnerabilityReportsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource name. - * Format: `projects/{project}/locations/{location}/instances/-` - * For `{project}`, either `project-number` or `project-id` can be provided. - * @type int $page_size - * The maximum number of results to return. - * @type string $page_token - * A pagination token returned from a previous call to - * `ListVulnerabilityReports` that indicates where this listing - * should continue from. - * @type string $filter - * If provided, this field specifies the criteria that must be met by a - * `vulnerabilityReport` API resource to be included in the response. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\Vulnerability::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource name. - * Format: `projects/{project}/locations/{location}/instances/-` - * For `{project}`, either `project-number` or `project-id` can be provided. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource name. - * Format: `projects/{project}/locations/{location}/instances/-` - * For `{project}`, either `project-number` or `project-id` can be provided. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * The maximum number of results to return. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of results to return. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A pagination token returned from a previous call to - * `ListVulnerabilityReports` that indicates where this listing - * should continue from. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A pagination token returned from a previous call to - * `ListVulnerabilityReports` that indicates where this listing - * should continue from. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * If provided, this field specifies the criteria that must be met by a - * `vulnerabilityReport` API resource to be included in the response. - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * If provided, this field specifies the criteria that must be met by a - * `vulnerabilityReport` API resource to be included in the response. - * - * Generated from protobuf field string filter = 4; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListVulnerabilityReportsResponse.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListVulnerabilityReportsResponse.php deleted file mode 100644 index eea4419f54bc..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ListVulnerabilityReportsResponse.php +++ /dev/null @@ -1,106 +0,0 @@ -google.cloud.osconfig.v1.ListVulnerabilityReportsResponse - */ -class ListVulnerabilityReportsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * List of vulnerabilityReport objects. - * - * Generated from protobuf field repeated .google.cloud.osconfig.v1.VulnerabilityReport vulnerability_reports = 1; - */ - private $vulnerability_reports; - /** - * The pagination token to retrieve the next page of vulnerabilityReports - * object. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\OsConfig\V1\VulnerabilityReport>|\Google\Protobuf\Internal\RepeatedField $vulnerability_reports - * List of vulnerabilityReport objects. - * @type string $next_page_token - * The pagination token to retrieve the next page of vulnerabilityReports - * object. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\Vulnerability::initOnce(); - parent::__construct($data); - } - - /** - * List of vulnerabilityReport objects. - * - * Generated from protobuf field repeated .google.cloud.osconfig.v1.VulnerabilityReport vulnerability_reports = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getVulnerabilityReports() - { - return $this->vulnerability_reports; - } - - /** - * List of vulnerabilityReport objects. - * - * Generated from protobuf field repeated .google.cloud.osconfig.v1.VulnerabilityReport vulnerability_reports = 1; - * @param array<\Google\Cloud\OsConfig\V1\VulnerabilityReport>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setVulnerabilityReports($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\OsConfig\V1\VulnerabilityReport::class); - $this->vulnerability_reports = $arr; - - return $this; - } - - /** - * The pagination token to retrieve the next page of vulnerabilityReports - * object. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * The pagination token to retrieve the next page of vulnerabilityReports - * object. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/MonthlySchedule.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/MonthlySchedule.php deleted file mode 100644 index eabc69adbd0f..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/MonthlySchedule.php +++ /dev/null @@ -1,118 +0,0 @@ -google.cloud.osconfig.v1.MonthlySchedule - */ -class MonthlySchedule extends \Google\Protobuf\Internal\Message -{ - protected $day_of_month; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\OsConfig\V1\WeekDayOfMonth $week_day_of_month - * Required. Week day in a month. - * @type int $month_day - * Required. One day of the month. 1-31 indicates the 1st to the 31st day. - * -1 indicates the last day of the month. Months without the target day - * will be skipped. For example, a schedule to run "every month on the 31st" - * will not run in February, April, June, etc. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\PatchDeployments::initOnce(); - parent::__construct($data); - } - - /** - * Required. Week day in a month. - * - * Generated from protobuf field .google.cloud.osconfig.v1.WeekDayOfMonth week_day_of_month = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\OsConfig\V1\WeekDayOfMonth|null - */ - public function getWeekDayOfMonth() - { - return $this->readOneof(1); - } - - public function hasWeekDayOfMonth() - { - return $this->hasOneof(1); - } - - /** - * Required. Week day in a month. - * - * Generated from protobuf field .google.cloud.osconfig.v1.WeekDayOfMonth week_day_of_month = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\OsConfig\V1\WeekDayOfMonth $var - * @return $this - */ - public function setWeekDayOfMonth($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\WeekDayOfMonth::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Required. One day of the month. 1-31 indicates the 1st to the 31st day. - * -1 indicates the last day of the month. Months without the target day - * will be skipped. For example, a schedule to run "every month on the 31st" - * will not run in February, April, June, etc. - * - * Generated from protobuf field int32 month_day = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getMonthDay() - { - return $this->readOneof(2); - } - - public function hasMonthDay() - { - return $this->hasOneof(2); - } - - /** - * Required. One day of the month. 1-31 indicates the 1st to the 31st day. - * -1 indicates the last day of the month. Months without the target day - * will be skipped. For example, a schedule to run "every month on the 31st" - * will not run in February, April, June, etc. - * - * Generated from protobuf field int32 month_day = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setMonthDay($var) - { - GPBUtil::checkInt32($var); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * @return string - */ - public function getDayOfMonth() - { - return $this->whichOneof("day_of_month"); - } - -} - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy.php deleted file mode 100644 index 2c98bbe13e28..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy.php +++ /dev/null @@ -1,263 +0,0 @@ -google.cloud.osconfig.v1.OSPolicy - */ -class OSPolicy extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The id of the OS policy with the following restrictions: - * * Must contain only lowercase letters, numbers, and hyphens. - * * Must start with a letter. - * * Must be between 1-63 characters. - * * Must end with a number or a letter. - * * Must be unique within the assignment. - * - * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $id = ''; - /** - * Policy description. - * Length of the description is limited to 1024 characters. - * - * Generated from protobuf field string description = 2; - */ - protected $description = ''; - /** - * Required. Policy mode - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Mode mode = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $mode = 0; - /** - * Required. List of resource groups for the policy. - * For a particular VM, resource groups are evaluated in the order specified - * and the first resource group that is applicable is selected and the rest - * are ignored. - * If none of the resource groups are applicable for a VM, the VM is - * considered to be non-compliant w.r.t this policy. This behavior can be - * toggled by the flag `allow_no_resource_group_match` - * - * Generated from protobuf field repeated .google.cloud.osconfig.v1.OSPolicy.ResourceGroup resource_groups = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - private $resource_groups; - /** - * This flag determines the OS policy compliance status when none of the - * resource groups within the policy are applicable for a VM. Set this value - * to `true` if the policy needs to be reported as compliant even if the - * policy has nothing to validate or enforce. - * - * Generated from protobuf field bool allow_no_resource_group_match = 5; - */ - protected $allow_no_resource_group_match = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $id - * Required. The id of the OS policy with the following restrictions: - * * Must contain only lowercase letters, numbers, and hyphens. - * * Must start with a letter. - * * Must be between 1-63 characters. - * * Must end with a number or a letter. - * * Must be unique within the assignment. - * @type string $description - * Policy description. - * Length of the description is limited to 1024 characters. - * @type int $mode - * Required. Policy mode - * @type array<\Google\Cloud\OsConfig\V1\OSPolicy\ResourceGroup>|\Google\Protobuf\Internal\RepeatedField $resource_groups - * Required. List of resource groups for the policy. - * For a particular VM, resource groups are evaluated in the order specified - * and the first resource group that is applicable is selected and the rest - * are ignored. - * If none of the resource groups are applicable for a VM, the VM is - * considered to be non-compliant w.r.t this policy. This behavior can be - * toggled by the flag `allow_no_resource_group_match` - * @type bool $allow_no_resource_group_match - * This flag determines the OS policy compliance status when none of the - * resource groups within the policy are applicable for a VM. Set this value - * to `true` if the policy needs to be reported as compliant even if the - * policy has nothing to validate or enforce. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\OsPolicy::initOnce(); - parent::__construct($data); - } - - /** - * Required. The id of the OS policy with the following restrictions: - * * Must contain only lowercase letters, numbers, and hyphens. - * * Must start with a letter. - * * Must be between 1-63 characters. - * * Must end with a number or a letter. - * * Must be unique within the assignment. - * - * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * Required. The id of the OS policy with the following restrictions: - * * Must contain only lowercase letters, numbers, and hyphens. - * * Must start with a letter. - * * Must be between 1-63 characters. - * * Must end with a number or a letter. - * * Must be unique within the assignment. - * - * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setId($var) - { - GPBUtil::checkString($var, True); - $this->id = $var; - - return $this; - } - - /** - * Policy description. - * Length of the description is limited to 1024 characters. - * - * Generated from protobuf field string description = 2; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Policy description. - * Length of the description is limited to 1024 characters. - * - * Generated from protobuf field string description = 2; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Required. Policy mode - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Mode mode = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getMode() - { - return $this->mode; - } - - /** - * Required. Policy mode - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Mode mode = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\OsConfig\V1\OSPolicy\Mode::class); - $this->mode = $var; - - return $this; - } - - /** - * Required. List of resource groups for the policy. - * For a particular VM, resource groups are evaluated in the order specified - * and the first resource group that is applicable is selected and the rest - * are ignored. - * If none of the resource groups are applicable for a VM, the VM is - * considered to be non-compliant w.r.t this policy. This behavior can be - * toggled by the flag `allow_no_resource_group_match` - * - * Generated from protobuf field repeated .google.cloud.osconfig.v1.OSPolicy.ResourceGroup resource_groups = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getResourceGroups() - { - return $this->resource_groups; - } - - /** - * Required. List of resource groups for the policy. - * For a particular VM, resource groups are evaluated in the order specified - * and the first resource group that is applicable is selected and the rest - * are ignored. - * If none of the resource groups are applicable for a VM, the VM is - * considered to be non-compliant w.r.t this policy. This behavior can be - * toggled by the flag `allow_no_resource_group_match` - * - * Generated from protobuf field repeated .google.cloud.osconfig.v1.OSPolicy.ResourceGroup resource_groups = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param array<\Google\Cloud\OsConfig\V1\OSPolicy\ResourceGroup>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setResourceGroups($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\OsConfig\V1\OSPolicy\ResourceGroup::class); - $this->resource_groups = $arr; - - return $this; - } - - /** - * This flag determines the OS policy compliance status when none of the - * resource groups within the policy are applicable for a VM. Set this value - * to `true` if the policy needs to be reported as compliant even if the - * policy has nothing to validate or enforce. - * - * Generated from protobuf field bool allow_no_resource_group_match = 5; - * @return bool - */ - public function getAllowNoResourceGroupMatch() - { - return $this->allow_no_resource_group_match; - } - - /** - * This flag determines the OS policy compliance status when none of the - * resource groups within the policy are applicable for a VM. Set this value - * to `true` if the policy needs to be reported as compliant even if the - * policy has nothing to validate or enforce. - * - * Generated from protobuf field bool allow_no_resource_group_match = 5; - * @param bool $var - * @return $this - */ - public function setAllowNoResourceGroupMatch($var) - { - GPBUtil::checkBool($var); - $this->allow_no_resource_group_match = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/InventoryFilter.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/InventoryFilter.php deleted file mode 100644 index 3e129a0b56bb..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/InventoryFilter.php +++ /dev/null @@ -1,120 +0,0 @@ -google.cloud.osconfig.v1.OSPolicy.InventoryFilter - */ -class InventoryFilter extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The OS short name - * - * Generated from protobuf field string os_short_name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $os_short_name = ''; - /** - * The OS version - * Prefix matches are supported if asterisk(*) is provided as the - * last character. For example, to match all versions with a major - * version of `7`, specify the following value for this field `7.*` - * An empty string matches all OS versions. - * - * Generated from protobuf field string os_version = 2; - */ - protected $os_version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $os_short_name - * Required. The OS short name - * @type string $os_version - * The OS version - * Prefix matches are supported if asterisk(*) is provided as the - * last character. For example, to match all versions with a major - * version of `7`, specify the following value for this field `7.*` - * An empty string matches all OS versions. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\OsPolicy::initOnce(); - parent::__construct($data); - } - - /** - * Required. The OS short name - * - * Generated from protobuf field string os_short_name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getOsShortName() - { - return $this->os_short_name; - } - - /** - * Required. The OS short name - * - * Generated from protobuf field string os_short_name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setOsShortName($var) - { - GPBUtil::checkString($var, True); - $this->os_short_name = $var; - - return $this; - } - - /** - * The OS version - * Prefix matches are supported if asterisk(*) is provided as the - * last character. For example, to match all versions with a major - * version of `7`, specify the following value for this field `7.*` - * An empty string matches all OS versions. - * - * Generated from protobuf field string os_version = 2; - * @return string - */ - public function getOsVersion() - { - return $this->os_version; - } - - /** - * The OS version - * Prefix matches are supported if asterisk(*) is provided as the - * last character. For example, to match all versions with a major - * version of `7`, specify the following value for this field `7.*` - * An empty string matches all OS versions. - * - * Generated from protobuf field string os_version = 2; - * @param string $var - * @return $this - */ - public function setOsVersion($var) - { - GPBUtil::checkString($var, True); - $this->os_version = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(InventoryFilter::class, \Google\Cloud\OsConfig\V1\OSPolicy_InventoryFilter::class); - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Mode.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Mode.php deleted file mode 100644 index 98985cc0839d..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Mode.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.osconfig.v1.OSPolicy.Mode - */ -class Mode -{ - /** - * Invalid mode - * - * Generated from protobuf enum MODE_UNSPECIFIED = 0; - */ - const MODE_UNSPECIFIED = 0; - /** - * This mode checks if the configuration resources in the policy are in - * their desired state. No actions are performed if they are not in the - * desired state. This mode is used for reporting purposes. - * - * Generated from protobuf enum VALIDATION = 1; - */ - const VALIDATION = 1; - /** - * This mode checks if the configuration resources in the policy are in - * their desired state, and if not, enforces the desired state. - * - * Generated from protobuf enum ENFORCEMENT = 2; - */ - const ENFORCEMENT = 2; - - private static $valueToName = [ - self::MODE_UNSPECIFIED => 'MODE_UNSPECIFIED', - self::VALIDATION => 'VALIDATION', - self::ENFORCEMENT => 'ENFORCEMENT', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Mode::class, \Google\Cloud\OsConfig\V1\OSPolicy_Mode::class); - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource.php deleted file mode 100644 index 48d1375aec6c..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource.php +++ /dev/null @@ -1,235 +0,0 @@ -google.cloud.osconfig.v1.OSPolicy.Resource - */ -class Resource extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The id of the resource with the following restrictions: - * * Must contain only lowercase letters, numbers, and hyphens. - * * Must start with a letter. - * * Must be between 1-63 characters. - * * Must end with a number or a letter. - * * Must be unique within the OS policy. - * - * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $id = ''; - protected $resource_type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $id - * Required. The id of the resource with the following restrictions: - * * Must contain only lowercase letters, numbers, and hyphens. - * * Must start with a letter. - * * Must be between 1-63 characters. - * * Must end with a number or a letter. - * * Must be unique within the OS policy. - * @type \Google\Cloud\OsConfig\V1\OSPolicy\Resource\PackageResource $pkg - * Package resource - * @type \Google\Cloud\OsConfig\V1\OSPolicy\Resource\RepositoryResource $repository - * Package repository resource - * @type \Google\Cloud\OsConfig\V1\OSPolicy\Resource\ExecResource $exec - * Exec resource - * @type \Google\Cloud\OsConfig\V1\OSPolicy\Resource\FileResource $file - * File resource - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\OsPolicy::initOnce(); - parent::__construct($data); - } - - /** - * Required. The id of the resource with the following restrictions: - * * Must contain only lowercase letters, numbers, and hyphens. - * * Must start with a letter. - * * Must be between 1-63 characters. - * * Must end with a number or a letter. - * * Must be unique within the OS policy. - * - * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * Required. The id of the resource with the following restrictions: - * * Must contain only lowercase letters, numbers, and hyphens. - * * Must start with a letter. - * * Must be between 1-63 characters. - * * Must end with a number or a letter. - * * Must be unique within the OS policy. - * - * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setId($var) - { - GPBUtil::checkString($var, True); - $this->id = $var; - - return $this; - } - - /** - * Package resource - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource pkg = 2; - * @return \Google\Cloud\OsConfig\V1\OSPolicy\Resource\PackageResource|null - */ - public function getPkg() - { - return $this->readOneof(2); - } - - public function hasPkg() - { - return $this->hasOneof(2); - } - - /** - * Package resource - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource pkg = 2; - * @param \Google\Cloud\OsConfig\V1\OSPolicy\Resource\PackageResource $var - * @return $this - */ - public function setPkg($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\OSPolicy\Resource\PackageResource::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Package repository resource - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource repository = 3; - * @return \Google\Cloud\OsConfig\V1\OSPolicy\Resource\RepositoryResource|null - */ - public function getRepository() - { - return $this->readOneof(3); - } - - public function hasRepository() - { - return $this->hasOneof(3); - } - - /** - * Package repository resource - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource repository = 3; - * @param \Google\Cloud\OsConfig\V1\OSPolicy\Resource\RepositoryResource $var - * @return $this - */ - public function setRepository($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\OSPolicy\Resource\RepositoryResource::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Exec resource - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource exec = 4; - * @return \Google\Cloud\OsConfig\V1\OSPolicy\Resource\ExecResource|null - */ - public function getExec() - { - return $this->readOneof(4); - } - - public function hasExec() - { - return $this->hasOneof(4); - } - - /** - * Exec resource - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource exec = 4; - * @param \Google\Cloud\OsConfig\V1\OSPolicy\Resource\ExecResource $var - * @return $this - */ - public function setExec($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\OSPolicy\Resource\ExecResource::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * File resource - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.FileResource file = 5; - * @return \Google\Cloud\OsConfig\V1\OSPolicy\Resource\FileResource|null - */ - public function getFile() - { - return $this->readOneof(5); - } - - public function hasFile() - { - return $this->hasOneof(5); - } - - /** - * File resource - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.FileResource file = 5; - * @param \Google\Cloud\OsConfig\V1\OSPolicy\Resource\FileResource $var - * @return $this - */ - public function setFile($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\OSPolicy\Resource\FileResource::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * @return string - */ - public function getResourceType() - { - return $this->whichOneof("resource_type"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Resource::class, \Google\Cloud\OsConfig\V1\OSPolicy_Resource::class); - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/ExecResource.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/ExecResource.php deleted file mode 100644 index 306c2035cad5..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/ExecResource.php +++ /dev/null @@ -1,165 +0,0 @@ -google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource - */ -class ExecResource extends \Google\Protobuf\Internal\Message -{ - /** - * Required. What to run to validate this resource is in the desired - * state. An exit code of 100 indicates "in desired state", and exit code - * of 101 indicates "not in desired state". Any other exit code indicates - * a failure running validate. - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.Exec validate = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $validate = null; - /** - * What to run to bring this resource into the desired state. - * An exit code of 100 indicates "success", any other exit code indicates - * a failure running enforce. - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.Exec enforce = 2; - */ - protected $enforce = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\OsConfig\V1\OSPolicy\Resource\ExecResource\Exec $validate - * Required. What to run to validate this resource is in the desired - * state. An exit code of 100 indicates "in desired state", and exit code - * of 101 indicates "not in desired state". Any other exit code indicates - * a failure running validate. - * @type \Google\Cloud\OsConfig\V1\OSPolicy\Resource\ExecResource\Exec $enforce - * What to run to bring this resource into the desired state. - * An exit code of 100 indicates "success", any other exit code indicates - * a failure running enforce. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\OsPolicy::initOnce(); - parent::__construct($data); - } - - /** - * Required. What to run to validate this resource is in the desired - * state. An exit code of 100 indicates "in desired state", and exit code - * of 101 indicates "not in desired state". Any other exit code indicates - * a failure running validate. - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.Exec validate = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\OsConfig\V1\OSPolicy\Resource\ExecResource\Exec|null - */ - public function getValidate() - { - return $this->validate; - } - - public function hasValidate() - { - return isset($this->validate); - } - - public function clearValidate() - { - unset($this->validate); - } - - /** - * Required. What to run to validate this resource is in the desired - * state. An exit code of 100 indicates "in desired state", and exit code - * of 101 indicates "not in desired state". Any other exit code indicates - * a failure running validate. - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.Exec validate = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\OsConfig\V1\OSPolicy\Resource\ExecResource\Exec $var - * @return $this - */ - public function setValidate($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\OSPolicy\Resource\ExecResource\Exec::class); - $this->validate = $var; - - return $this; - } - - /** - * What to run to bring this resource into the desired state. - * An exit code of 100 indicates "success", any other exit code indicates - * a failure running enforce. - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.Exec enforce = 2; - * @return \Google\Cloud\OsConfig\V1\OSPolicy\Resource\ExecResource\Exec|null - */ - public function getEnforce() - { - return $this->enforce; - } - - public function hasEnforce() - { - return isset($this->enforce); - } - - public function clearEnforce() - { - unset($this->enforce); - } - - /** - * What to run to bring this resource into the desired state. - * An exit code of 100 indicates "success", any other exit code indicates - * a failure running enforce. - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.Exec enforce = 2; - * @param \Google\Cloud\OsConfig\V1\OSPolicy\Resource\ExecResource\Exec $var - * @return $this - */ - public function setEnforce($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\OSPolicy\Resource\ExecResource\Exec::class); - $this->enforce = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ExecResource::class, \Google\Cloud\OsConfig\V1\OSPolicy_Resource_ExecResource::class); - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/ExecResource/Exec.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/ExecResource/Exec.php deleted file mode 100644 index ab90ad3dc940..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/ExecResource/Exec.php +++ /dev/null @@ -1,236 +0,0 @@ -google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.Exec - */ -class Exec extends \Google\Protobuf\Internal\Message -{ - /** - * Optional arguments to pass to the source during execution. - * - * Generated from protobuf field repeated string args = 3; - */ - private $args; - /** - * Required. The script interpreter to use. - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.Exec.Interpreter interpreter = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $interpreter = 0; - /** - * Only recorded for enforce Exec. - * Path to an output file (that is created by this Exec) whose - * content will be recorded in OSPolicyResourceCompliance after a - * successful run. Absence or failure to read this file will result in - * this ExecResource being non-compliant. Output file size is limited to - * 100K bytes. - * - * Generated from protobuf field string output_file_path = 5; - */ - protected $output_file_path = ''; - protected $source; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\OsConfig\V1\OSPolicy\Resource\File $file - * A remote or local file. - * @type string $script - * An inline script. - * The size of the script is limited to 1024 characters. - * @type array|\Google\Protobuf\Internal\RepeatedField $args - * Optional arguments to pass to the source during execution. - * @type int $interpreter - * Required. The script interpreter to use. - * @type string $output_file_path - * Only recorded for enforce Exec. - * Path to an output file (that is created by this Exec) whose - * content will be recorded in OSPolicyResourceCompliance after a - * successful run. Absence or failure to read this file will result in - * this ExecResource being non-compliant. Output file size is limited to - * 100K bytes. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\OsPolicy::initOnce(); - parent::__construct($data); - } - - /** - * A remote or local file. - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.File file = 1; - * @return \Google\Cloud\OsConfig\V1\OSPolicy\Resource\File|null - */ - public function getFile() - { - return $this->readOneof(1); - } - - public function hasFile() - { - return $this->hasOneof(1); - } - - /** - * A remote or local file. - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.File file = 1; - * @param \Google\Cloud\OsConfig\V1\OSPolicy\Resource\File $var - * @return $this - */ - public function setFile($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\OSPolicy\Resource\File::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * An inline script. - * The size of the script is limited to 1024 characters. - * - * Generated from protobuf field string script = 2; - * @return string - */ - public function getScript() - { - return $this->readOneof(2); - } - - public function hasScript() - { - return $this->hasOneof(2); - } - - /** - * An inline script. - * The size of the script is limited to 1024 characters. - * - * Generated from protobuf field string script = 2; - * @param string $var - * @return $this - */ - public function setScript($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Optional arguments to pass to the source during execution. - * - * Generated from protobuf field repeated string args = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getArgs() - { - return $this->args; - } - - /** - * Optional arguments to pass to the source during execution. - * - * Generated from protobuf field repeated string args = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setArgs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->args = $arr; - - return $this; - } - - /** - * Required. The script interpreter to use. - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.Exec.Interpreter interpreter = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getInterpreter() - { - return $this->interpreter; - } - - /** - * Required. The script interpreter to use. - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.Exec.Interpreter interpreter = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setInterpreter($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\OsConfig\V1\OSPolicy\Resource\ExecResource\Exec\Interpreter::class); - $this->interpreter = $var; - - return $this; - } - - /** - * Only recorded for enforce Exec. - * Path to an output file (that is created by this Exec) whose - * content will be recorded in OSPolicyResourceCompliance after a - * successful run. Absence or failure to read this file will result in - * this ExecResource being non-compliant. Output file size is limited to - * 100K bytes. - * - * Generated from protobuf field string output_file_path = 5; - * @return string - */ - public function getOutputFilePath() - { - return $this->output_file_path; - } - - /** - * Only recorded for enforce Exec. - * Path to an output file (that is created by this Exec) whose - * content will be recorded in OSPolicyResourceCompliance after a - * successful run. Absence or failure to read this file will result in - * this ExecResource being non-compliant. Output file size is limited to - * 100K bytes. - * - * Generated from protobuf field string output_file_path = 5; - * @param string $var - * @return $this - */ - public function setOutputFilePath($var) - { - GPBUtil::checkString($var, True); - $this->output_file_path = $var; - - return $this; - } - - /** - * @return string - */ - public function getSource() - { - return $this->whichOneof("source"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Exec::class, \Google\Cloud\OsConfig\V1\OSPolicy_Resource_ExecResource_Exec::class); - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/ExecResource/Exec/Interpreter.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/ExecResource/Exec/Interpreter.php deleted file mode 100644 index 24420319356e..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/ExecResource/Exec/Interpreter.php +++ /dev/null @@ -1,76 +0,0 @@ -google.cloud.osconfig.v1.OSPolicy.Resource.ExecResource.Exec.Interpreter - */ -class Interpreter -{ - /** - * Invalid value, the request will return validation error. - * - * Generated from protobuf enum INTERPRETER_UNSPECIFIED = 0; - */ - const INTERPRETER_UNSPECIFIED = 0; - /** - * If an interpreter is not specified, the - * source is executed directly. This execution, without an - * interpreter, only succeeds for executables and scripts that have shebang lines. - * - * Generated from protobuf enum NONE = 1; - */ - const NONE = 1; - /** - * Indicates that the script runs with `/bin/sh` on Linux and - * `cmd.exe` on Windows. - * - * Generated from protobuf enum SHELL = 2; - */ - const SHELL = 2; - /** - * Indicates that the script runs with PowerShell. - * - * Generated from protobuf enum POWERSHELL = 3; - */ - const POWERSHELL = 3; - - private static $valueToName = [ - self::INTERPRETER_UNSPECIFIED => 'INTERPRETER_UNSPECIFIED', - self::NONE => 'NONE', - self::SHELL => 'SHELL', - self::POWERSHELL => 'POWERSHELL', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Interpreter::class, \Google\Cloud\OsConfig\V1\OSPolicy_Resource_ExecResource_Exec_Interpreter::class); - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/File.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/File.php deleted file mode 100644 index d66bed31db32..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/File.php +++ /dev/null @@ -1,190 +0,0 @@ -google.cloud.osconfig.v1.OSPolicy.Resource.File - */ -class File extends \Google\Protobuf\Internal\Message -{ - /** - * Defaults to false. When false, files are subject to validations - * based on the file type: - * Remote: A checksum must be specified. - * Cloud Storage: An object generation number must be specified. - * - * Generated from protobuf field bool allow_insecure = 4; - */ - protected $allow_insecure = false; - protected $type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\OsConfig\V1\OSPolicy\Resource\File\Remote $remote - * A generic remote file. - * @type \Google\Cloud\OsConfig\V1\OSPolicy\Resource\File\Gcs $gcs - * A Cloud Storage object. - * @type string $local_path - * A local path within the VM to use. - * @type bool $allow_insecure - * Defaults to false. When false, files are subject to validations - * based on the file type: - * Remote: A checksum must be specified. - * Cloud Storage: An object generation number must be specified. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\OsPolicy::initOnce(); - parent::__construct($data); - } - - /** - * A generic remote file. - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.File.Remote remote = 1; - * @return \Google\Cloud\OsConfig\V1\OSPolicy\Resource\File\Remote|null - */ - public function getRemote() - { - return $this->readOneof(1); - } - - public function hasRemote() - { - return $this->hasOneof(1); - } - - /** - * A generic remote file. - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.File.Remote remote = 1; - * @param \Google\Cloud\OsConfig\V1\OSPolicy\Resource\File\Remote $var - * @return $this - */ - public function setRemote($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\OSPolicy\Resource\File\Remote::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * A Cloud Storage object. - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.File.Gcs gcs = 2; - * @return \Google\Cloud\OsConfig\V1\OSPolicy\Resource\File\Gcs|null - */ - public function getGcs() - { - return $this->readOneof(2); - } - - public function hasGcs() - { - return $this->hasOneof(2); - } - - /** - * A Cloud Storage object. - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.File.Gcs gcs = 2; - * @param \Google\Cloud\OsConfig\V1\OSPolicy\Resource\File\Gcs $var - * @return $this - */ - public function setGcs($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\OSPolicy\Resource\File\Gcs::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * A local path within the VM to use. - * - * Generated from protobuf field string local_path = 3; - * @return string - */ - public function getLocalPath() - { - return $this->readOneof(3); - } - - public function hasLocalPath() - { - return $this->hasOneof(3); - } - - /** - * A local path within the VM to use. - * - * Generated from protobuf field string local_path = 3; - * @param string $var - * @return $this - */ - public function setLocalPath($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Defaults to false. When false, files are subject to validations - * based on the file type: - * Remote: A checksum must be specified. - * Cloud Storage: An object generation number must be specified. - * - * Generated from protobuf field bool allow_insecure = 4; - * @return bool - */ - public function getAllowInsecure() - { - return $this->allow_insecure; - } - - /** - * Defaults to false. When false, files are subject to validations - * based on the file type: - * Remote: A checksum must be specified. - * Cloud Storage: An object generation number must be specified. - * - * Generated from protobuf field bool allow_insecure = 4; - * @param bool $var - * @return $this - */ - public function setAllowInsecure($var) - { - GPBUtil::checkBool($var); - $this->allow_insecure = $var; - - return $this; - } - - /** - * @return string - */ - public function getType() - { - return $this->whichOneof("type"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(File::class, \Google\Cloud\OsConfig\V1\OSPolicy_Resource_File::class); - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/File/Gcs.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/File/Gcs.php deleted file mode 100644 index e68947115368..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/File/Gcs.php +++ /dev/null @@ -1,138 +0,0 @@ -google.cloud.osconfig.v1.OSPolicy.Resource.File.Gcs - */ -class Gcs extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Bucket of the Cloud Storage object. - * - * Generated from protobuf field string bucket = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $bucket = ''; - /** - * Required. Name of the Cloud Storage object. - * - * Generated from protobuf field string object = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $object = ''; - /** - * Generation number of the Cloud Storage object. - * - * Generated from protobuf field int64 generation = 3; - */ - protected $generation = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $bucket - * Required. Bucket of the Cloud Storage object. - * @type string $object - * Required. Name of the Cloud Storage object. - * @type int|string $generation - * Generation number of the Cloud Storage object. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\OsPolicy::initOnce(); - parent::__construct($data); - } - - /** - * Required. Bucket of the Cloud Storage object. - * - * Generated from protobuf field string bucket = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getBucket() - { - return $this->bucket; - } - - /** - * Required. Bucket of the Cloud Storage object. - * - * Generated from protobuf field string bucket = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setBucket($var) - { - GPBUtil::checkString($var, True); - $this->bucket = $var; - - return $this; - } - - /** - * Required. Name of the Cloud Storage object. - * - * Generated from protobuf field string object = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getObject() - { - return $this->object; - } - - /** - * Required. Name of the Cloud Storage object. - * - * Generated from protobuf field string object = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setObject($var) - { - GPBUtil::checkString($var, True); - $this->object = $var; - - return $this; - } - - /** - * Generation number of the Cloud Storage object. - * - * Generated from protobuf field int64 generation = 3; - * @return int|string - */ - public function getGeneration() - { - return $this->generation; - } - - /** - * Generation number of the Cloud Storage object. - * - * Generated from protobuf field int64 generation = 3; - * @param int|string $var - * @return $this - */ - public function setGeneration($var) - { - GPBUtil::checkInt64($var); - $this->generation = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Gcs::class, \Google\Cloud\OsConfig\V1\OSPolicy_Resource_File_Gcs::class); - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/File/Remote.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/File/Remote.php deleted file mode 100644 index d955b52e4a9d..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/File/Remote.php +++ /dev/null @@ -1,108 +0,0 @@ -google.cloud.osconfig.v1.OSPolicy.Resource.File.Remote - */ -class Remote extends \Google\Protobuf\Internal\Message -{ - /** - * Required. URI from which to fetch the object. It should contain both - * the protocol and path following the format `{protocol}://{location}`. - * - * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $uri = ''; - /** - * SHA256 checksum of the remote file. - * - * Generated from protobuf field string sha256_checksum = 2; - */ - protected $sha256_checksum = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $uri - * Required. URI from which to fetch the object. It should contain both - * the protocol and path following the format `{protocol}://{location}`. - * @type string $sha256_checksum - * SHA256 checksum of the remote file. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\OsPolicy::initOnce(); - parent::__construct($data); - } - - /** - * Required. URI from which to fetch the object. It should contain both - * the protocol and path following the format `{protocol}://{location}`. - * - * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * Required. URI from which to fetch the object. It should contain both - * the protocol and path following the format `{protocol}://{location}`. - * - * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - - /** - * SHA256 checksum of the remote file. - * - * Generated from protobuf field string sha256_checksum = 2; - * @return string - */ - public function getSha256Checksum() - { - return $this->sha256_checksum; - } - - /** - * SHA256 checksum of the remote file. - * - * Generated from protobuf field string sha256_checksum = 2; - * @param string $var - * @return $this - */ - public function setSha256Checksum($var) - { - GPBUtil::checkString($var, True); - $this->sha256_checksum = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Remote::class, \Google\Cloud\OsConfig\V1\OSPolicy_Resource_File_Remote::class); - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/FileResource.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/FileResource.php deleted file mode 100644 index 8fc050d3997f..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/FileResource.php +++ /dev/null @@ -1,260 +0,0 @@ -google.cloud.osconfig.v1.OSPolicy.Resource.FileResource - */ -class FileResource extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The absolute path of the file within the VM. - * - * Generated from protobuf field string path = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $path = ''; - /** - * Required. Desired state of the file. - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.FileResource.DesiredState state = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $state = 0; - /** - * Consists of three octal digits which represent, in - * order, the permissions of the owner, group, and other users for the - * file (similarly to the numeric mode used in the linux chmod - * utility). Each digit represents a three bit number with the 4 bit - * corresponding to the read permissions, the 2 bit corresponds to the - * write bit, and the one bit corresponds to the execute permission. - * Default behavior is 755. - * Below are some examples of permissions and their associated values: - * read, write, and execute: 7 - * read and execute: 5 - * read and write: 6 - * read only: 4 - * - * Generated from protobuf field string permissions = 5; - */ - protected $permissions = ''; - protected $source; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\OsConfig\V1\OSPolicy\Resource\File $file - * A remote or local source. - * @type string $content - * A a file with this content. - * The size of the content is limited to 1024 characters. - * @type string $path - * Required. The absolute path of the file within the VM. - * @type int $state - * Required. Desired state of the file. - * @type string $permissions - * Consists of three octal digits which represent, in - * order, the permissions of the owner, group, and other users for the - * file (similarly to the numeric mode used in the linux chmod - * utility). Each digit represents a three bit number with the 4 bit - * corresponding to the read permissions, the 2 bit corresponds to the - * write bit, and the one bit corresponds to the execute permission. - * Default behavior is 755. - * Below are some examples of permissions and their associated values: - * read, write, and execute: 7 - * read and execute: 5 - * read and write: 6 - * read only: 4 - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\OsPolicy::initOnce(); - parent::__construct($data); - } - - /** - * A remote or local source. - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.File file = 1; - * @return \Google\Cloud\OsConfig\V1\OSPolicy\Resource\File|null - */ - public function getFile() - { - return $this->readOneof(1); - } - - public function hasFile() - { - return $this->hasOneof(1); - } - - /** - * A remote or local source. - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.File file = 1; - * @param \Google\Cloud\OsConfig\V1\OSPolicy\Resource\File $var - * @return $this - */ - public function setFile($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\OSPolicy\Resource\File::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * A a file with this content. - * The size of the content is limited to 1024 characters. - * - * Generated from protobuf field string content = 2; - * @return string - */ - public function getContent() - { - return $this->readOneof(2); - } - - public function hasContent() - { - return $this->hasOneof(2); - } - - /** - * A a file with this content. - * The size of the content is limited to 1024 characters. - * - * Generated from protobuf field string content = 2; - * @param string $var - * @return $this - */ - public function setContent($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Required. The absolute path of the file within the VM. - * - * Generated from protobuf field string path = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getPath() - { - return $this->path; - } - - /** - * Required. The absolute path of the file within the VM. - * - * Generated from protobuf field string path = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setPath($var) - { - GPBUtil::checkString($var, True); - $this->path = $var; - - return $this; - } - - /** - * Required. Desired state of the file. - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.FileResource.DesiredState state = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Required. Desired state of the file. - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.FileResource.DesiredState state = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\OsConfig\V1\OSPolicy\Resource\FileResource\DesiredState::class); - $this->state = $var; - - return $this; - } - - /** - * Consists of three octal digits which represent, in - * order, the permissions of the owner, group, and other users for the - * file (similarly to the numeric mode used in the linux chmod - * utility). Each digit represents a three bit number with the 4 bit - * corresponding to the read permissions, the 2 bit corresponds to the - * write bit, and the one bit corresponds to the execute permission. - * Default behavior is 755. - * Below are some examples of permissions and their associated values: - * read, write, and execute: 7 - * read and execute: 5 - * read and write: 6 - * read only: 4 - * - * Generated from protobuf field string permissions = 5; - * @return string - */ - public function getPermissions() - { - return $this->permissions; - } - - /** - * Consists of three octal digits which represent, in - * order, the permissions of the owner, group, and other users for the - * file (similarly to the numeric mode used in the linux chmod - * utility). Each digit represents a three bit number with the 4 bit - * corresponding to the read permissions, the 2 bit corresponds to the - * write bit, and the one bit corresponds to the execute permission. - * Default behavior is 755. - * Below are some examples of permissions and their associated values: - * read, write, and execute: 7 - * read and execute: 5 - * read and write: 6 - * read only: 4 - * - * Generated from protobuf field string permissions = 5; - * @param string $var - * @return $this - */ - public function setPermissions($var) - { - GPBUtil::checkString($var, True); - $this->permissions = $var; - - return $this; - } - - /** - * @return string - */ - public function getSource() - { - return $this->whichOneof("source"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(FileResource::class, \Google\Cloud\OsConfig\V1\OSPolicy_Resource_FileResource::class); - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/FileResource/DesiredState.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/FileResource/DesiredState.php deleted file mode 100644 index 6d49442e7819..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/FileResource/DesiredState.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.osconfig.v1.OSPolicy.Resource.FileResource.DesiredState - */ -class DesiredState -{ - /** - * Unspecified is invalid. - * - * Generated from protobuf enum DESIRED_STATE_UNSPECIFIED = 0; - */ - const DESIRED_STATE_UNSPECIFIED = 0; - /** - * Ensure file at path is present. - * - * Generated from protobuf enum PRESENT = 1; - */ - const PRESENT = 1; - /** - * Ensure file at path is absent. - * - * Generated from protobuf enum ABSENT = 2; - */ - const ABSENT = 2; - /** - * Ensure the contents of the file at path matches. If the file does - * not exist it will be created. - * - * Generated from protobuf enum CONTENTS_MATCH = 3; - */ - const CONTENTS_MATCH = 3; - - private static $valueToName = [ - self::DESIRED_STATE_UNSPECIFIED => 'DESIRED_STATE_UNSPECIFIED', - self::PRESENT => 'PRESENT', - self::ABSENT => 'ABSENT', - self::CONTENTS_MATCH => 'CONTENTS_MATCH', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DesiredState::class, \Google\Cloud\OsConfig\V1\OSPolicy_Resource_FileResource_DesiredState::class); - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/PackageResource.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/PackageResource.php deleted file mode 100644 index 297104e99c60..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/PackageResource.php +++ /dev/null @@ -1,310 +0,0 @@ -google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource - */ -class PackageResource extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The desired state the agent should maintain for this package. - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.DesiredState desired_state = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $desired_state = 0; - protected $system_package; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $desired_state - * Required. The desired state the agent should maintain for this package. - * @type \Google\Cloud\OsConfig\V1\OSPolicy\Resource\PackageResource\APT $apt - * A package managed by Apt. - * @type \Google\Cloud\OsConfig\V1\OSPolicy\Resource\PackageResource\Deb $deb - * A deb package file. - * @type \Google\Cloud\OsConfig\V1\OSPolicy\Resource\PackageResource\YUM $yum - * A package managed by YUM. - * @type \Google\Cloud\OsConfig\V1\OSPolicy\Resource\PackageResource\Zypper $zypper - * A package managed by Zypper. - * @type \Google\Cloud\OsConfig\V1\OSPolicy\Resource\PackageResource\RPM $rpm - * An rpm package file. - * @type \Google\Cloud\OsConfig\V1\OSPolicy\Resource\PackageResource\GooGet $googet - * A package managed by GooGet. - * @type \Google\Cloud\OsConfig\V1\OSPolicy\Resource\PackageResource\MSI $msi - * An MSI package. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\OsPolicy::initOnce(); - parent::__construct($data); - } - - /** - * Required. The desired state the agent should maintain for this package. - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.DesiredState desired_state = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getDesiredState() - { - return $this->desired_state; - } - - /** - * Required. The desired state the agent should maintain for this package. - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.DesiredState desired_state = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setDesiredState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\OsConfig\V1\OSPolicy\Resource\PackageResource\DesiredState::class); - $this->desired_state = $var; - - return $this; - } - - /** - * A package managed by Apt. - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.APT apt = 2; - * @return \Google\Cloud\OsConfig\V1\OSPolicy\Resource\PackageResource\APT|null - */ - public function getApt() - { - return $this->readOneof(2); - } - - public function hasApt() - { - return $this->hasOneof(2); - } - - /** - * A package managed by Apt. - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.APT apt = 2; - * @param \Google\Cloud\OsConfig\V1\OSPolicy\Resource\PackageResource\APT $var - * @return $this - */ - public function setApt($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\OSPolicy\Resource\PackageResource\APT::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * A deb package file. - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.Deb deb = 3; - * @return \Google\Cloud\OsConfig\V1\OSPolicy\Resource\PackageResource\Deb|null - */ - public function getDeb() - { - return $this->readOneof(3); - } - - public function hasDeb() - { - return $this->hasOneof(3); - } - - /** - * A deb package file. - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.Deb deb = 3; - * @param \Google\Cloud\OsConfig\V1\OSPolicy\Resource\PackageResource\Deb $var - * @return $this - */ - public function setDeb($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\OSPolicy\Resource\PackageResource\Deb::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * A package managed by YUM. - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.YUM yum = 4; - * @return \Google\Cloud\OsConfig\V1\OSPolicy\Resource\PackageResource\YUM|null - */ - public function getYum() - { - return $this->readOneof(4); - } - - public function hasYum() - { - return $this->hasOneof(4); - } - - /** - * A package managed by YUM. - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.YUM yum = 4; - * @param \Google\Cloud\OsConfig\V1\OSPolicy\Resource\PackageResource\YUM $var - * @return $this - */ - public function setYum($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\OSPolicy\Resource\PackageResource\YUM::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * A package managed by Zypper. - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.Zypper zypper = 5; - * @return \Google\Cloud\OsConfig\V1\OSPolicy\Resource\PackageResource\Zypper|null - */ - public function getZypper() - { - return $this->readOneof(5); - } - - public function hasZypper() - { - return $this->hasOneof(5); - } - - /** - * A package managed by Zypper. - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.Zypper zypper = 5; - * @param \Google\Cloud\OsConfig\V1\OSPolicy\Resource\PackageResource\Zypper $var - * @return $this - */ - public function setZypper($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\OSPolicy\Resource\PackageResource\Zypper::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * An rpm package file. - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.RPM rpm = 6; - * @return \Google\Cloud\OsConfig\V1\OSPolicy\Resource\PackageResource\RPM|null - */ - public function getRpm() - { - return $this->readOneof(6); - } - - public function hasRpm() - { - return $this->hasOneof(6); - } - - /** - * An rpm package file. - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.RPM rpm = 6; - * @param \Google\Cloud\OsConfig\V1\OSPolicy\Resource\PackageResource\RPM $var - * @return $this - */ - public function setRpm($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\OSPolicy\Resource\PackageResource\RPM::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * A package managed by GooGet. - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.GooGet googet = 7; - * @return \Google\Cloud\OsConfig\V1\OSPolicy\Resource\PackageResource\GooGet|null - */ - public function getGooget() - { - return $this->readOneof(7); - } - - public function hasGooget() - { - return $this->hasOneof(7); - } - - /** - * A package managed by GooGet. - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.GooGet googet = 7; - * @param \Google\Cloud\OsConfig\V1\OSPolicy\Resource\PackageResource\GooGet $var - * @return $this - */ - public function setGooget($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\OSPolicy\Resource\PackageResource\GooGet::class); - $this->writeOneof(7, $var); - - return $this; - } - - /** - * An MSI package. - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.MSI msi = 8; - * @return \Google\Cloud\OsConfig\V1\OSPolicy\Resource\PackageResource\MSI|null - */ - public function getMsi() - { - return $this->readOneof(8); - } - - public function hasMsi() - { - return $this->hasOneof(8); - } - - /** - * An MSI package. - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.MSI msi = 8; - * @param \Google\Cloud\OsConfig\V1\OSPolicy\Resource\PackageResource\MSI $var - * @return $this - */ - public function setMsi($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\OSPolicy\Resource\PackageResource\MSI::class); - $this->writeOneof(8, $var); - - return $this; - } - - /** - * @return string - */ - public function getSystemPackage() - { - return $this->whichOneof("system_package"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(PackageResource::class, \Google\Cloud\OsConfig\V1\OSPolicy_Resource_PackageResource::class); - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/PackageResource/APT.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/PackageResource/APT.php deleted file mode 100644 index 502ce367c6e3..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/PackageResource/APT.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.APT - */ -class APT extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Package name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Package name. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\OsPolicy::initOnce(); - parent::__construct($data); - } - - /** - * Required. Package name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Package name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(APT::class, \Google\Cloud\OsConfig\V1\OSPolicy_Resource_PackageResource_APT::class); - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/PackageResource/Deb.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/PackageResource/Deb.php deleted file mode 100644 index 658389864d0f..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/PackageResource/Deb.php +++ /dev/null @@ -1,126 +0,0 @@ -google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.Deb - */ -class Deb extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A deb package. - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.File source = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $source = null; - /** - * Whether dependencies should also be installed. - * - install when false: `dpkg -i package` - * - install when true: `apt-get update && apt-get -y install - * package.deb` - * - * Generated from protobuf field bool pull_deps = 2; - */ - protected $pull_deps = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\OsConfig\V1\OSPolicy\Resource\File $source - * Required. A deb package. - * @type bool $pull_deps - * Whether dependencies should also be installed. - * - install when false: `dpkg -i package` - * - install when true: `apt-get update && apt-get -y install - * package.deb` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\OsPolicy::initOnce(); - parent::__construct($data); - } - - /** - * Required. A deb package. - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.File source = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\OsConfig\V1\OSPolicy\Resource\File|null - */ - public function getSource() - { - return $this->source; - } - - public function hasSource() - { - return isset($this->source); - } - - public function clearSource() - { - unset($this->source); - } - - /** - * Required. A deb package. - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.File source = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\OsConfig\V1\OSPolicy\Resource\File $var - * @return $this - */ - public function setSource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\OSPolicy\Resource\File::class); - $this->source = $var; - - return $this; - } - - /** - * Whether dependencies should also be installed. - * - install when false: `dpkg -i package` - * - install when true: `apt-get update && apt-get -y install - * package.deb` - * - * Generated from protobuf field bool pull_deps = 2; - * @return bool - */ - public function getPullDeps() - { - return $this->pull_deps; - } - - /** - * Whether dependencies should also be installed. - * - install when false: `dpkg -i package` - * - install when true: `apt-get update && apt-get -y install - * package.deb` - * - * Generated from protobuf field bool pull_deps = 2; - * @param bool $var - * @return $this - */ - public function setPullDeps($var) - { - GPBUtil::checkBool($var); - $this->pull_deps = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Deb::class, \Google\Cloud\OsConfig\V1\OSPolicy_Resource_PackageResource_Deb::class); - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/PackageResource/DesiredState.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/PackageResource/DesiredState.php deleted file mode 100644 index 63d1bbe9bbc5..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/PackageResource/DesiredState.php +++ /dev/null @@ -1,65 +0,0 @@ -google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.DesiredState - */ -class DesiredState -{ - /** - * Unspecified is invalid. - * - * Generated from protobuf enum DESIRED_STATE_UNSPECIFIED = 0; - */ - const DESIRED_STATE_UNSPECIFIED = 0; - /** - * Ensure that the package is installed. - * - * Generated from protobuf enum INSTALLED = 1; - */ - const INSTALLED = 1; - /** - * The agent ensures that the package is not installed and - * uninstalls it if detected. - * - * Generated from protobuf enum REMOVED = 2; - */ - const REMOVED = 2; - - private static $valueToName = [ - self::DESIRED_STATE_UNSPECIFIED => 'DESIRED_STATE_UNSPECIFIED', - self::INSTALLED => 'INSTALLED', - self::REMOVED => 'REMOVED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DesiredState::class, \Google\Cloud\OsConfig\V1\OSPolicy_Resource_PackageResource_DesiredState::class); - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/PackageResource/GooGet.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/PackageResource/GooGet.php deleted file mode 100644 index 5f6fe0353cce..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/PackageResource/GooGet.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.GooGet - */ -class GooGet extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Package name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Package name. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\OsPolicy::initOnce(); - parent::__construct($data); - } - - /** - * Required. Package name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Package name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(GooGet::class, \Google\Cloud\OsConfig\V1\OSPolicy_Resource_PackageResource_GooGet::class); - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/PackageResource/MSI.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/PackageResource/MSI.php deleted file mode 100644 index 74941501dbc7..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/PackageResource/MSI.php +++ /dev/null @@ -1,126 +0,0 @@ -google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.MSI - */ -class MSI extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The MSI package. - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.File source = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $source = null; - /** - * Additional properties to use during installation. - * This should be in the format of Property=Setting. - * Appended to the defaults of `ACTION=INSTALL - * REBOOT=ReallySuppress`. - * - * Generated from protobuf field repeated string properties = 2; - */ - private $properties; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\OsConfig\V1\OSPolicy\Resource\File $source - * Required. The MSI package. - * @type array|\Google\Protobuf\Internal\RepeatedField $properties - * Additional properties to use during installation. - * This should be in the format of Property=Setting. - * Appended to the defaults of `ACTION=INSTALL - * REBOOT=ReallySuppress`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\OsPolicy::initOnce(); - parent::__construct($data); - } - - /** - * Required. The MSI package. - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.File source = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\OsConfig\V1\OSPolicy\Resource\File|null - */ - public function getSource() - { - return $this->source; - } - - public function hasSource() - { - return isset($this->source); - } - - public function clearSource() - { - unset($this->source); - } - - /** - * Required. The MSI package. - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.File source = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\OsConfig\V1\OSPolicy\Resource\File $var - * @return $this - */ - public function setSource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\OSPolicy\Resource\File::class); - $this->source = $var; - - return $this; - } - - /** - * Additional properties to use during installation. - * This should be in the format of Property=Setting. - * Appended to the defaults of `ACTION=INSTALL - * REBOOT=ReallySuppress`. - * - * Generated from protobuf field repeated string properties = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getProperties() - { - return $this->properties; - } - - /** - * Additional properties to use during installation. - * This should be in the format of Property=Setting. - * Appended to the defaults of `ACTION=INSTALL - * REBOOT=ReallySuppress`. - * - * Generated from protobuf field repeated string properties = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setProperties($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->properties = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(MSI::class, \Google\Cloud\OsConfig\V1\OSPolicy_Resource_PackageResource_MSI::class); - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/PackageResource/RPM.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/PackageResource/RPM.php deleted file mode 100644 index 2ee83503a01b..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/PackageResource/RPM.php +++ /dev/null @@ -1,126 +0,0 @@ -google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.RPM - */ -class RPM extends \Google\Protobuf\Internal\Message -{ - /** - * Required. An rpm package. - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.File source = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $source = null; - /** - * Whether dependencies should also be installed. - * - install when false: `rpm --upgrade --replacepkgs package.rpm` - * - install when true: `yum -y install package.rpm` or - * `zypper -y install package.rpm` - * - * Generated from protobuf field bool pull_deps = 2; - */ - protected $pull_deps = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\OsConfig\V1\OSPolicy\Resource\File $source - * Required. An rpm package. - * @type bool $pull_deps - * Whether dependencies should also be installed. - * - install when false: `rpm --upgrade --replacepkgs package.rpm` - * - install when true: `yum -y install package.rpm` or - * `zypper -y install package.rpm` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\OsPolicy::initOnce(); - parent::__construct($data); - } - - /** - * Required. An rpm package. - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.File source = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\OsConfig\V1\OSPolicy\Resource\File|null - */ - public function getSource() - { - return $this->source; - } - - public function hasSource() - { - return isset($this->source); - } - - public function clearSource() - { - unset($this->source); - } - - /** - * Required. An rpm package. - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.File source = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\OsConfig\V1\OSPolicy\Resource\File $var - * @return $this - */ - public function setSource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\OSPolicy\Resource\File::class); - $this->source = $var; - - return $this; - } - - /** - * Whether dependencies should also be installed. - * - install when false: `rpm --upgrade --replacepkgs package.rpm` - * - install when true: `yum -y install package.rpm` or - * `zypper -y install package.rpm` - * - * Generated from protobuf field bool pull_deps = 2; - * @return bool - */ - public function getPullDeps() - { - return $this->pull_deps; - } - - /** - * Whether dependencies should also be installed. - * - install when false: `rpm --upgrade --replacepkgs package.rpm` - * - install when true: `yum -y install package.rpm` or - * `zypper -y install package.rpm` - * - * Generated from protobuf field bool pull_deps = 2; - * @param bool $var - * @return $this - */ - public function setPullDeps($var) - { - GPBUtil::checkBool($var); - $this->pull_deps = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(RPM::class, \Google\Cloud\OsConfig\V1\OSPolicy_Resource_PackageResource_RPM::class); - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/PackageResource/YUM.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/PackageResource/YUM.php deleted file mode 100644 index 3a6368593dc7..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/PackageResource/YUM.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.YUM - */ -class YUM extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Package name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Package name. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\OsPolicy::initOnce(); - parent::__construct($data); - } - - /** - * Required. Package name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Package name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(YUM::class, \Google\Cloud\OsConfig\V1\OSPolicy_Resource_PackageResource_YUM::class); - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/PackageResource/Zypper.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/PackageResource/Zypper.php deleted file mode 100644 index 4632c0902cca..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/PackageResource/Zypper.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.osconfig.v1.OSPolicy.Resource.PackageResource.Zypper - */ -class Zypper extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Package name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Package name. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\OsPolicy::initOnce(); - parent::__construct($data); - } - - /** - * Required. Package name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Package name. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Zypper::class, \Google\Cloud\OsConfig\V1\OSPolicy_Resource_PackageResource_Zypper::class); - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/RepositoryResource.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/RepositoryResource.php deleted file mode 100644 index 84d4c5756091..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/RepositoryResource.php +++ /dev/null @@ -1,177 +0,0 @@ -google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource - */ -class RepositoryResource extends \Google\Protobuf\Internal\Message -{ - protected $repository; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\OsConfig\V1\OSPolicy\Resource\RepositoryResource\AptRepository $apt - * An Apt Repository. - * @type \Google\Cloud\OsConfig\V1\OSPolicy\Resource\RepositoryResource\YumRepository $yum - * A Yum Repository. - * @type \Google\Cloud\OsConfig\V1\OSPolicy\Resource\RepositoryResource\ZypperRepository $zypper - * A Zypper Repository. - * @type \Google\Cloud\OsConfig\V1\OSPolicy\Resource\RepositoryResource\GooRepository $goo - * A Goo Repository. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\OsPolicy::initOnce(); - parent::__construct($data); - } - - /** - * An Apt Repository. - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.AptRepository apt = 1; - * @return \Google\Cloud\OsConfig\V1\OSPolicy\Resource\RepositoryResource\AptRepository|null - */ - public function getApt() - { - return $this->readOneof(1); - } - - public function hasApt() - { - return $this->hasOneof(1); - } - - /** - * An Apt Repository. - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.AptRepository apt = 1; - * @param \Google\Cloud\OsConfig\V1\OSPolicy\Resource\RepositoryResource\AptRepository $var - * @return $this - */ - public function setApt($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\OSPolicy\Resource\RepositoryResource\AptRepository::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * A Yum Repository. - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.YumRepository yum = 2; - * @return \Google\Cloud\OsConfig\V1\OSPolicy\Resource\RepositoryResource\YumRepository|null - */ - public function getYum() - { - return $this->readOneof(2); - } - - public function hasYum() - { - return $this->hasOneof(2); - } - - /** - * A Yum Repository. - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.YumRepository yum = 2; - * @param \Google\Cloud\OsConfig\V1\OSPolicy\Resource\RepositoryResource\YumRepository $var - * @return $this - */ - public function setYum($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\OSPolicy\Resource\RepositoryResource\YumRepository::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * A Zypper Repository. - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.ZypperRepository zypper = 3; - * @return \Google\Cloud\OsConfig\V1\OSPolicy\Resource\RepositoryResource\ZypperRepository|null - */ - public function getZypper() - { - return $this->readOneof(3); - } - - public function hasZypper() - { - return $this->hasOneof(3); - } - - /** - * A Zypper Repository. - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.ZypperRepository zypper = 3; - * @param \Google\Cloud\OsConfig\V1\OSPolicy\Resource\RepositoryResource\ZypperRepository $var - * @return $this - */ - public function setZypper($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\OSPolicy\Resource\RepositoryResource\ZypperRepository::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * A Goo Repository. - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.GooRepository goo = 4; - * @return \Google\Cloud\OsConfig\V1\OSPolicy\Resource\RepositoryResource\GooRepository|null - */ - public function getGoo() - { - return $this->readOneof(4); - } - - public function hasGoo() - { - return $this->hasOneof(4); - } - - /** - * A Goo Repository. - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.GooRepository goo = 4; - * @param \Google\Cloud\OsConfig\V1\OSPolicy\Resource\RepositoryResource\GooRepository $var - * @return $this - */ - public function setGoo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\OSPolicy\Resource\RepositoryResource\GooRepository::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * @return string - */ - public function getRepository() - { - return $this->whichOneof("repository"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(RepositoryResource::class, \Google\Cloud\OsConfig\V1\OSPolicy_Resource_RepositoryResource::class); - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/RepositoryResource/AptRepository.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/RepositoryResource/AptRepository.php deleted file mode 100644 index 6e82b088317a..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/RepositoryResource/AptRepository.php +++ /dev/null @@ -1,216 +0,0 @@ -google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.AptRepository - */ -class AptRepository extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Type of archive files in this repository. - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.AptRepository.ArchiveType archive_type = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $archive_type = 0; - /** - * Required. URI for this repository. - * - * Generated from protobuf field string uri = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $uri = ''; - /** - * Required. Distribution of this repository. - * - * Generated from protobuf field string distribution = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $distribution = ''; - /** - * Required. List of components for this repository. Must contain at - * least one item. - * - * Generated from protobuf field repeated string components = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - private $components; - /** - * URI of the key file for this repository. The agent maintains a - * keyring at `/etc/apt/trusted.gpg.d/osconfig_agent_managed.gpg`. - * - * Generated from protobuf field string gpg_key = 5; - */ - protected $gpg_key = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $archive_type - * Required. Type of archive files in this repository. - * @type string $uri - * Required. URI for this repository. - * @type string $distribution - * Required. Distribution of this repository. - * @type array|\Google\Protobuf\Internal\RepeatedField $components - * Required. List of components for this repository. Must contain at - * least one item. - * @type string $gpg_key - * URI of the key file for this repository. The agent maintains a - * keyring at `/etc/apt/trusted.gpg.d/osconfig_agent_managed.gpg`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\OsPolicy::initOnce(); - parent::__construct($data); - } - - /** - * Required. Type of archive files in this repository. - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.AptRepository.ArchiveType archive_type = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getArchiveType() - { - return $this->archive_type; - } - - /** - * Required. Type of archive files in this repository. - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.AptRepository.ArchiveType archive_type = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setArchiveType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\OsConfig\V1\OSPolicy\Resource\RepositoryResource\AptRepository\ArchiveType::class); - $this->archive_type = $var; - - return $this; - } - - /** - * Required. URI for this repository. - * - * Generated from protobuf field string uri = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * Required. URI for this repository. - * - * Generated from protobuf field string uri = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - - /** - * Required. Distribution of this repository. - * - * Generated from protobuf field string distribution = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDistribution() - { - return $this->distribution; - } - - /** - * Required. Distribution of this repository. - * - * Generated from protobuf field string distribution = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDistribution($var) - { - GPBUtil::checkString($var, True); - $this->distribution = $var; - - return $this; - } - - /** - * Required. List of components for this repository. Must contain at - * least one item. - * - * Generated from protobuf field repeated string components = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getComponents() - { - return $this->components; - } - - /** - * Required. List of components for this repository. Must contain at - * least one item. - * - * Generated from protobuf field repeated string components = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setComponents($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->components = $arr; - - return $this; - } - - /** - * URI of the key file for this repository. The agent maintains a - * keyring at `/etc/apt/trusted.gpg.d/osconfig_agent_managed.gpg`. - * - * Generated from protobuf field string gpg_key = 5; - * @return string - */ - public function getGpgKey() - { - return $this->gpg_key; - } - - /** - * URI of the key file for this repository. The agent maintains a - * keyring at `/etc/apt/trusted.gpg.d/osconfig_agent_managed.gpg`. - * - * Generated from protobuf field string gpg_key = 5; - * @param string $var - * @return $this - */ - public function setGpgKey($var) - { - GPBUtil::checkString($var, True); - $this->gpg_key = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(AptRepository::class, \Google\Cloud\OsConfig\V1\OSPolicy_Resource_RepositoryResource_AptRepository::class); - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/RepositoryResource/AptRepository/ArchiveType.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/RepositoryResource/AptRepository/ArchiveType.php deleted file mode 100644 index 19a12732314d..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/RepositoryResource/AptRepository/ArchiveType.php +++ /dev/null @@ -1,64 +0,0 @@ -google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.AptRepository.ArchiveType - */ -class ArchiveType -{ - /** - * Unspecified is invalid. - * - * Generated from protobuf enum ARCHIVE_TYPE_UNSPECIFIED = 0; - */ - const ARCHIVE_TYPE_UNSPECIFIED = 0; - /** - * Deb indicates that the archive contains binary files. - * - * Generated from protobuf enum DEB = 1; - */ - const DEB = 1; - /** - * Deb-src indicates that the archive contains source files. - * - * Generated from protobuf enum DEB_SRC = 2; - */ - const DEB_SRC = 2; - - private static $valueToName = [ - self::ARCHIVE_TYPE_UNSPECIFIED => 'ARCHIVE_TYPE_UNSPECIFIED', - self::DEB => 'DEB', - self::DEB_SRC => 'DEB_SRC', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ArchiveType::class, \Google\Cloud\OsConfig\V1\OSPolicy_Resource_RepositoryResource_AptRepository_ArchiveType::class); - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/RepositoryResource/GooRepository.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/RepositoryResource/GooRepository.php deleted file mode 100644 index 74f227b80549..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/RepositoryResource/GooRepository.php +++ /dev/null @@ -1,106 +0,0 @@ -google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.GooRepository - */ -class GooRepository extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the repository. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Required. The url of the repository. - * - * Generated from protobuf field string url = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $url = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the repository. - * @type string $url - * Required. The url of the repository. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\OsPolicy::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the repository. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the repository. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. The url of the repository. - * - * Generated from protobuf field string url = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getUrl() - { - return $this->url; - } - - /** - * Required. The url of the repository. - * - * Generated from protobuf field string url = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setUrl($var) - { - GPBUtil::checkString($var, True); - $this->url = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(GooRepository::class, \Google\Cloud\OsConfig\V1\OSPolicy_Resource_RepositoryResource_GooRepository::class); - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/RepositoryResource/YumRepository.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/RepositoryResource/YumRepository.php deleted file mode 100644 index 172da077406a..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/RepositoryResource/YumRepository.php +++ /dev/null @@ -1,186 +0,0 @@ -google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.YumRepository - */ -class YumRepository extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A one word, unique name for this repository. This is the - * `repo id` in the yum config file and also the `display_name` if - * `display_name` is omitted. This id is also used as the unique - * identifier when checking for resource conflicts. - * - * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $id = ''; - /** - * The display name of the repository. - * - * Generated from protobuf field string display_name = 2; - */ - protected $display_name = ''; - /** - * Required. The location of the repository directory. - * - * Generated from protobuf field string base_url = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $base_url = ''; - /** - * URIs of GPG keys. - * - * Generated from protobuf field repeated string gpg_keys = 4; - */ - private $gpg_keys; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $id - * Required. A one word, unique name for this repository. This is the - * `repo id` in the yum config file and also the `display_name` if - * `display_name` is omitted. This id is also used as the unique - * identifier when checking for resource conflicts. - * @type string $display_name - * The display name of the repository. - * @type string $base_url - * Required. The location of the repository directory. - * @type array|\Google\Protobuf\Internal\RepeatedField $gpg_keys - * URIs of GPG keys. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\OsPolicy::initOnce(); - parent::__construct($data); - } - - /** - * Required. A one word, unique name for this repository. This is the - * `repo id` in the yum config file and also the `display_name` if - * `display_name` is omitted. This id is also used as the unique - * identifier when checking for resource conflicts. - * - * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * Required. A one word, unique name for this repository. This is the - * `repo id` in the yum config file and also the `display_name` if - * `display_name` is omitted. This id is also used as the unique - * identifier when checking for resource conflicts. - * - * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setId($var) - { - GPBUtil::checkString($var, True); - $this->id = $var; - - return $this; - } - - /** - * The display name of the repository. - * - * Generated from protobuf field string display_name = 2; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * The display name of the repository. - * - * Generated from protobuf field string display_name = 2; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Required. The location of the repository directory. - * - * Generated from protobuf field string base_url = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getBaseUrl() - { - return $this->base_url; - } - - /** - * Required. The location of the repository directory. - * - * Generated from protobuf field string base_url = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setBaseUrl($var) - { - GPBUtil::checkString($var, True); - $this->base_url = $var; - - return $this; - } - - /** - * URIs of GPG keys. - * - * Generated from protobuf field repeated string gpg_keys = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getGpgKeys() - { - return $this->gpg_keys; - } - - /** - * URIs of GPG keys. - * - * Generated from protobuf field repeated string gpg_keys = 4; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setGpgKeys($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->gpg_keys = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(YumRepository::class, \Google\Cloud\OsConfig\V1\OSPolicy_Resource_RepositoryResource_YumRepository::class); - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/RepositoryResource/ZypperRepository.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/RepositoryResource/ZypperRepository.php deleted file mode 100644 index 645ac80d006b..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/Resource/RepositoryResource/ZypperRepository.php +++ /dev/null @@ -1,186 +0,0 @@ -google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.ZypperRepository - */ -class ZypperRepository extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A one word, unique name for this repository. This is the - * `repo id` in the zypper config file and also the `display_name` if - * `display_name` is omitted. This id is also used as the unique - * identifier when checking for GuestPolicy conflicts. - * - * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $id = ''; - /** - * The display name of the repository. - * - * Generated from protobuf field string display_name = 2; - */ - protected $display_name = ''; - /** - * Required. The location of the repository directory. - * - * Generated from protobuf field string base_url = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $base_url = ''; - /** - * URIs of GPG keys. - * - * Generated from protobuf field repeated string gpg_keys = 4; - */ - private $gpg_keys; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $id - * Required. A one word, unique name for this repository. This is the - * `repo id` in the zypper config file and also the `display_name` if - * `display_name` is omitted. This id is also used as the unique - * identifier when checking for GuestPolicy conflicts. - * @type string $display_name - * The display name of the repository. - * @type string $base_url - * Required. The location of the repository directory. - * @type array|\Google\Protobuf\Internal\RepeatedField $gpg_keys - * URIs of GPG keys. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\OsPolicy::initOnce(); - parent::__construct($data); - } - - /** - * Required. A one word, unique name for this repository. This is the - * `repo id` in the zypper config file and also the `display_name` if - * `display_name` is omitted. This id is also used as the unique - * identifier when checking for GuestPolicy conflicts. - * - * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * Required. A one word, unique name for this repository. This is the - * `repo id` in the zypper config file and also the `display_name` if - * `display_name` is omitted. This id is also used as the unique - * identifier when checking for GuestPolicy conflicts. - * - * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setId($var) - { - GPBUtil::checkString($var, True); - $this->id = $var; - - return $this; - } - - /** - * The display name of the repository. - * - * Generated from protobuf field string display_name = 2; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * The display name of the repository. - * - * Generated from protobuf field string display_name = 2; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Required. The location of the repository directory. - * - * Generated from protobuf field string base_url = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getBaseUrl() - { - return $this->base_url; - } - - /** - * Required. The location of the repository directory. - * - * Generated from protobuf field string base_url = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setBaseUrl($var) - { - GPBUtil::checkString($var, True); - $this->base_url = $var; - - return $this; - } - - /** - * URIs of GPG keys. - * - * Generated from protobuf field repeated string gpg_keys = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getGpgKeys() - { - return $this->gpg_keys; - } - - /** - * URIs of GPG keys. - * - * Generated from protobuf field repeated string gpg_keys = 4; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setGpgKeys($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->gpg_keys = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ZypperRepository::class, \Google\Cloud\OsConfig\V1\OSPolicy_Resource_RepositoryResource_ZypperRepository::class); - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/ResourceGroup.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/ResourceGroup.php deleted file mode 100644 index 808e7902a376..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicy/ResourceGroup.php +++ /dev/null @@ -1,149 +0,0 @@ -google.cloud.osconfig.v1.OSPolicy.ResourceGroup - */ -class ResourceGroup extends \Google\Protobuf\Internal\Message -{ - /** - * List of inventory filters for the resource group. - * The resources in this resource group are applied to the target VM if it - * satisfies at least one of the following inventory filters. - * For example, to apply this resource group to VMs running either `RHEL` or - * `CentOS` operating systems, specify 2 items for the list with following - * values: - * inventory_filters[0].os_short_name='rhel' and - * inventory_filters[1].os_short_name='centos' - * If the list is empty, this resource group will be applied to the target - * VM unconditionally. - * - * Generated from protobuf field repeated .google.cloud.osconfig.v1.OSPolicy.InventoryFilter inventory_filters = 1; - */ - private $inventory_filters; - /** - * Required. List of resources configured for this resource group. - * The resources are executed in the exact order specified here. - * - * Generated from protobuf field repeated .google.cloud.osconfig.v1.OSPolicy.Resource resources = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private $resources; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\OsConfig\V1\OSPolicy\InventoryFilter>|\Google\Protobuf\Internal\RepeatedField $inventory_filters - * List of inventory filters for the resource group. - * The resources in this resource group are applied to the target VM if it - * satisfies at least one of the following inventory filters. - * For example, to apply this resource group to VMs running either `RHEL` or - * `CentOS` operating systems, specify 2 items for the list with following - * values: - * inventory_filters[0].os_short_name='rhel' and - * inventory_filters[1].os_short_name='centos' - * If the list is empty, this resource group will be applied to the target - * VM unconditionally. - * @type array<\Google\Cloud\OsConfig\V1\OSPolicy\Resource>|\Google\Protobuf\Internal\RepeatedField $resources - * Required. List of resources configured for this resource group. - * The resources are executed in the exact order specified here. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\OsPolicy::initOnce(); - parent::__construct($data); - } - - /** - * List of inventory filters for the resource group. - * The resources in this resource group are applied to the target VM if it - * satisfies at least one of the following inventory filters. - * For example, to apply this resource group to VMs running either `RHEL` or - * `CentOS` operating systems, specify 2 items for the list with following - * values: - * inventory_filters[0].os_short_name='rhel' and - * inventory_filters[1].os_short_name='centos' - * If the list is empty, this resource group will be applied to the target - * VM unconditionally. - * - * Generated from protobuf field repeated .google.cloud.osconfig.v1.OSPolicy.InventoryFilter inventory_filters = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getInventoryFilters() - { - return $this->inventory_filters; - } - - /** - * List of inventory filters for the resource group. - * The resources in this resource group are applied to the target VM if it - * satisfies at least one of the following inventory filters. - * For example, to apply this resource group to VMs running either `RHEL` or - * `CentOS` operating systems, specify 2 items for the list with following - * values: - * inventory_filters[0].os_short_name='rhel' and - * inventory_filters[1].os_short_name='centos' - * If the list is empty, this resource group will be applied to the target - * VM unconditionally. - * - * Generated from protobuf field repeated .google.cloud.osconfig.v1.OSPolicy.InventoryFilter inventory_filters = 1; - * @param array<\Google\Cloud\OsConfig\V1\OSPolicy\InventoryFilter>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setInventoryFilters($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\OsConfig\V1\OSPolicy\InventoryFilter::class); - $this->inventory_filters = $arr; - - return $this; - } - - /** - * Required. List of resources configured for this resource group. - * The resources are executed in the exact order specified here. - * - * Generated from protobuf field repeated .google.cloud.osconfig.v1.OSPolicy.Resource resources = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getResources() - { - return $this->resources; - } - - /** - * Required. List of resources configured for this resource group. - * The resources are executed in the exact order specified here. - * - * Generated from protobuf field repeated .google.cloud.osconfig.v1.OSPolicy.Resource resources = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param array<\Google\Cloud\OsConfig\V1\OSPolicy\Resource>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setResources($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\OsConfig\V1\OSPolicy\Resource::class); - $this->resources = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ResourceGroup::class, \Google\Cloud\OsConfig\V1\OSPolicy_ResourceGroup::class); - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignment.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignment.php deleted file mode 100644 index a03e2dc4d4e0..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignment.php +++ /dev/null @@ -1,597 +0,0 @@ -google.cloud.osconfig.v1.OSPolicyAssignment - */ -class OSPolicyAssignment extends \Google\Protobuf\Internal\Message -{ - /** - * Resource name. - * Format: - * `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id}` - * This field is ignored when you create an OS policy assignment. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * OS policy assignment description. - * Length of the description is limited to 1024 characters. - * - * Generated from protobuf field string description = 2; - */ - protected $description = ''; - /** - * Required. List of OS policies to be applied to the VMs. - * - * Generated from protobuf field repeated .google.cloud.osconfig.v1.OSPolicy os_policies = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - private $os_policies; - /** - * Required. Filter to select VMs. - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter instance_filter = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $instance_filter = null; - /** - * Required. Rollout to deploy the OS policy assignment. - * A rollout is triggered in the following situations: - * 1) OSPolicyAssignment is created. - * 2) OSPolicyAssignment is updated and the update contains changes to one of - * the following fields: - * - instance_filter - * - os_policies - * 3) OSPolicyAssignment is deleted. - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicyAssignment.Rollout rollout = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $rollout = null; - /** - * Output only. The assignment revision ID - * A new revision is committed whenever a rollout is triggered for a OS policy - * assignment - * - * Generated from protobuf field string revision_id = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $revision_id = ''; - /** - * Output only. The timestamp that the revision was created. - * - * Generated from protobuf field .google.protobuf.Timestamp revision_create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $revision_create_time = null; - /** - * The etag for this OS policy assignment. - * If this is provided on update, it must match the server's etag. - * - * Generated from protobuf field string etag = 8; - */ - protected $etag = ''; - /** - * Output only. OS policy assignment rollout state - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicyAssignment.RolloutState rollout_state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $rollout_state = 0; - /** - * Output only. Indicates that this revision has been successfully rolled out - * in this zone and new VMs will be assigned OS policies from this revision. - * For a given OS policy assignment, there is only one revision with a value - * of `true` for this field. - * - * Generated from protobuf field bool baseline = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $baseline = false; - /** - * Output only. Indicates that this revision deletes the OS policy assignment. - * - * Generated from protobuf field bool deleted = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $deleted = false; - /** - * Output only. Indicates that reconciliation is in progress for the revision. - * This value is `true` when the `rollout_state` is one of: - * * IN_PROGRESS - * * CANCELLING - * - * Generated from protobuf field bool reconciling = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $reconciling = false; - /** - * Output only. Server generated unique id for the OS policy assignment - * resource. - * - * Generated from protobuf field string uid = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Resource name. - * Format: - * `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id}` - * This field is ignored when you create an OS policy assignment. - * @type string $description - * OS policy assignment description. - * Length of the description is limited to 1024 characters. - * @type array<\Google\Cloud\OsConfig\V1\OSPolicy>|\Google\Protobuf\Internal\RepeatedField $os_policies - * Required. List of OS policies to be applied to the VMs. - * @type \Google\Cloud\OsConfig\V1\OSPolicyAssignment\InstanceFilter $instance_filter - * Required. Filter to select VMs. - * @type \Google\Cloud\OsConfig\V1\OSPolicyAssignment\Rollout $rollout - * Required. Rollout to deploy the OS policy assignment. - * A rollout is triggered in the following situations: - * 1) OSPolicyAssignment is created. - * 2) OSPolicyAssignment is updated and the update contains changes to one of - * the following fields: - * - instance_filter - * - os_policies - * 3) OSPolicyAssignment is deleted. - * @type string $revision_id - * Output only. The assignment revision ID - * A new revision is committed whenever a rollout is triggered for a OS policy - * assignment - * @type \Google\Protobuf\Timestamp $revision_create_time - * Output only. The timestamp that the revision was created. - * @type string $etag - * The etag for this OS policy assignment. - * If this is provided on update, it must match the server's etag. - * @type int $rollout_state - * Output only. OS policy assignment rollout state - * @type bool $baseline - * Output only. Indicates that this revision has been successfully rolled out - * in this zone and new VMs will be assigned OS policies from this revision. - * For a given OS policy assignment, there is only one revision with a value - * of `true` for this field. - * @type bool $deleted - * Output only. Indicates that this revision deletes the OS policy assignment. - * @type bool $reconciling - * Output only. Indicates that reconciliation is in progress for the revision. - * This value is `true` when the `rollout_state` is one of: - * * IN_PROGRESS - * * CANCELLING - * @type string $uid - * Output only. Server generated unique id for the OS policy assignment - * resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\OsPolicyAssignments::initOnce(); - parent::__construct($data); - } - - /** - * Resource name. - * Format: - * `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id}` - * This field is ignored when you create an OS policy assignment. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Resource name. - * Format: - * `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id}` - * This field is ignored when you create an OS policy assignment. - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * OS policy assignment description. - * Length of the description is limited to 1024 characters. - * - * Generated from protobuf field string description = 2; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * OS policy assignment description. - * Length of the description is limited to 1024 characters. - * - * Generated from protobuf field string description = 2; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Required. List of OS policies to be applied to the VMs. - * - * Generated from protobuf field repeated .google.cloud.osconfig.v1.OSPolicy os_policies = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getOsPolicies() - { - return $this->os_policies; - } - - /** - * Required. List of OS policies to be applied to the VMs. - * - * Generated from protobuf field repeated .google.cloud.osconfig.v1.OSPolicy os_policies = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param array<\Google\Cloud\OsConfig\V1\OSPolicy>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setOsPolicies($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\OsConfig\V1\OSPolicy::class); - $this->os_policies = $arr; - - return $this; - } - - /** - * Required. Filter to select VMs. - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter instance_filter = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\OsConfig\V1\OSPolicyAssignment\InstanceFilter|null - */ - public function getInstanceFilter() - { - return $this->instance_filter; - } - - public function hasInstanceFilter() - { - return isset($this->instance_filter); - } - - public function clearInstanceFilter() - { - unset($this->instance_filter); - } - - /** - * Required. Filter to select VMs. - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter instance_filter = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\OsConfig\V1\OSPolicyAssignment\InstanceFilter $var - * @return $this - */ - public function setInstanceFilter($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\OSPolicyAssignment\InstanceFilter::class); - $this->instance_filter = $var; - - return $this; - } - - /** - * Required. Rollout to deploy the OS policy assignment. - * A rollout is triggered in the following situations: - * 1) OSPolicyAssignment is created. - * 2) OSPolicyAssignment is updated and the update contains changes to one of - * the following fields: - * - instance_filter - * - os_policies - * 3) OSPolicyAssignment is deleted. - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicyAssignment.Rollout rollout = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\OsConfig\V1\OSPolicyAssignment\Rollout|null - */ - public function getRollout() - { - return $this->rollout; - } - - public function hasRollout() - { - return isset($this->rollout); - } - - public function clearRollout() - { - unset($this->rollout); - } - - /** - * Required. Rollout to deploy the OS policy assignment. - * A rollout is triggered in the following situations: - * 1) OSPolicyAssignment is created. - * 2) OSPolicyAssignment is updated and the update contains changes to one of - * the following fields: - * - instance_filter - * - os_policies - * 3) OSPolicyAssignment is deleted. - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicyAssignment.Rollout rollout = 5 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\OsConfig\V1\OSPolicyAssignment\Rollout $var - * @return $this - */ - public function setRollout($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\OSPolicyAssignment\Rollout::class); - $this->rollout = $var; - - return $this; - } - - /** - * Output only. The assignment revision ID - * A new revision is committed whenever a rollout is triggered for a OS policy - * assignment - * - * Generated from protobuf field string revision_id = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getRevisionId() - { - return $this->revision_id; - } - - /** - * Output only. The assignment revision ID - * A new revision is committed whenever a rollout is triggered for a OS policy - * assignment - * - * Generated from protobuf field string revision_id = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setRevisionId($var) - { - GPBUtil::checkString($var, True); - $this->revision_id = $var; - - return $this; - } - - /** - * Output only. The timestamp that the revision was created. - * - * Generated from protobuf field .google.protobuf.Timestamp revision_create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getRevisionCreateTime() - { - return $this->revision_create_time; - } - - public function hasRevisionCreateTime() - { - return isset($this->revision_create_time); - } - - public function clearRevisionCreateTime() - { - unset($this->revision_create_time); - } - - /** - * Output only. The timestamp that the revision was created. - * - * Generated from protobuf field .google.protobuf.Timestamp revision_create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setRevisionCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->revision_create_time = $var; - - return $this; - } - - /** - * The etag for this OS policy assignment. - * If this is provided on update, it must match the server's etag. - * - * Generated from protobuf field string etag = 8; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * The etag for this OS policy assignment. - * If this is provided on update, it must match the server's etag. - * - * Generated from protobuf field string etag = 8; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - - /** - * Output only. OS policy assignment rollout state - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicyAssignment.RolloutState rollout_state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getRolloutState() - { - return $this->rollout_state; - } - - /** - * Output only. OS policy assignment rollout state - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicyAssignment.RolloutState rollout_state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setRolloutState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\OsConfig\V1\OSPolicyAssignment\RolloutState::class); - $this->rollout_state = $var; - - return $this; - } - - /** - * Output only. Indicates that this revision has been successfully rolled out - * in this zone and new VMs will be assigned OS policies from this revision. - * For a given OS policy assignment, there is only one revision with a value - * of `true` for this field. - * - * Generated from protobuf field bool baseline = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getBaseline() - { - return $this->baseline; - } - - /** - * Output only. Indicates that this revision has been successfully rolled out - * in this zone and new VMs will be assigned OS policies from this revision. - * For a given OS policy assignment, there is only one revision with a value - * of `true` for this field. - * - * Generated from protobuf field bool baseline = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setBaseline($var) - { - GPBUtil::checkBool($var); - $this->baseline = $var; - - return $this; - } - - /** - * Output only. Indicates that this revision deletes the OS policy assignment. - * - * Generated from protobuf field bool deleted = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getDeleted() - { - return $this->deleted; - } - - /** - * Output only. Indicates that this revision deletes the OS policy assignment. - * - * Generated from protobuf field bool deleted = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setDeleted($var) - { - GPBUtil::checkBool($var); - $this->deleted = $var; - - return $this; - } - - /** - * Output only. Indicates that reconciliation is in progress for the revision. - * This value is `true` when the `rollout_state` is one of: - * * IN_PROGRESS - * * CANCELLING - * - * Generated from protobuf field bool reconciling = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getReconciling() - { - return $this->reconciling; - } - - /** - * Output only. Indicates that reconciliation is in progress for the revision. - * This value is `true` when the `rollout_state` is one of: - * * IN_PROGRESS - * * CANCELLING - * - * Generated from protobuf field bool reconciling = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setReconciling($var) - { - GPBUtil::checkBool($var); - $this->reconciling = $var; - - return $this; - } - - /** - * Output only. Server generated unique id for the OS policy assignment - * resource. - * - * Generated from protobuf field string uid = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. Server generated unique id for the OS policy assignment - * resource. - * - * Generated from protobuf field string uid = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkString($var, True); - $this->uid = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignment/InstanceFilter.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignment/InstanceFilter.php deleted file mode 100644 index 1f00e56ba059..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignment/InstanceFilter.php +++ /dev/null @@ -1,202 +0,0 @@ -google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter - */ -class InstanceFilter extends \Google\Protobuf\Internal\Message -{ - /** - * Target all VMs in the project. If true, no other criteria is - * permitted. - * - * Generated from protobuf field bool all = 1; - */ - protected $all = false; - /** - * List of label sets used for VM inclusion. - * If the list has more than one `LabelSet`, the VM is included if any - * of the label sets are applicable for the VM. - * - * Generated from protobuf field repeated .google.cloud.osconfig.v1.OSPolicyAssignment.LabelSet inclusion_labels = 2; - */ - private $inclusion_labels; - /** - * List of label sets used for VM exclusion. - * If the list has more than one label set, the VM is excluded if any - * of the label sets are applicable for the VM. - * - * Generated from protobuf field repeated .google.cloud.osconfig.v1.OSPolicyAssignment.LabelSet exclusion_labels = 3; - */ - private $exclusion_labels; - /** - * List of inventories to select VMs. - * A VM is selected if its inventory data matches at least one of the - * following inventories. - * - * Generated from protobuf field repeated .google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter.Inventory inventories = 4; - */ - private $inventories; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $all - * Target all VMs in the project. If true, no other criteria is - * permitted. - * @type array<\Google\Cloud\OsConfig\V1\OSPolicyAssignment\LabelSet>|\Google\Protobuf\Internal\RepeatedField $inclusion_labels - * List of label sets used for VM inclusion. - * If the list has more than one `LabelSet`, the VM is included if any - * of the label sets are applicable for the VM. - * @type array<\Google\Cloud\OsConfig\V1\OSPolicyAssignment\LabelSet>|\Google\Protobuf\Internal\RepeatedField $exclusion_labels - * List of label sets used for VM exclusion. - * If the list has more than one label set, the VM is excluded if any - * of the label sets are applicable for the VM. - * @type array<\Google\Cloud\OsConfig\V1\OSPolicyAssignment\InstanceFilter\Inventory>|\Google\Protobuf\Internal\RepeatedField $inventories - * List of inventories to select VMs. - * A VM is selected if its inventory data matches at least one of the - * following inventories. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\OsPolicyAssignments::initOnce(); - parent::__construct($data); - } - - /** - * Target all VMs in the project. If true, no other criteria is - * permitted. - * - * Generated from protobuf field bool all = 1; - * @return bool - */ - public function getAll() - { - return $this->all; - } - - /** - * Target all VMs in the project. If true, no other criteria is - * permitted. - * - * Generated from protobuf field bool all = 1; - * @param bool $var - * @return $this - */ - public function setAll($var) - { - GPBUtil::checkBool($var); - $this->all = $var; - - return $this; - } - - /** - * List of label sets used for VM inclusion. - * If the list has more than one `LabelSet`, the VM is included if any - * of the label sets are applicable for the VM. - * - * Generated from protobuf field repeated .google.cloud.osconfig.v1.OSPolicyAssignment.LabelSet inclusion_labels = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getInclusionLabels() - { - return $this->inclusion_labels; - } - - /** - * List of label sets used for VM inclusion. - * If the list has more than one `LabelSet`, the VM is included if any - * of the label sets are applicable for the VM. - * - * Generated from protobuf field repeated .google.cloud.osconfig.v1.OSPolicyAssignment.LabelSet inclusion_labels = 2; - * @param array<\Google\Cloud\OsConfig\V1\OSPolicyAssignment\LabelSet>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setInclusionLabels($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\OsConfig\V1\OSPolicyAssignment\LabelSet::class); - $this->inclusion_labels = $arr; - - return $this; - } - - /** - * List of label sets used for VM exclusion. - * If the list has more than one label set, the VM is excluded if any - * of the label sets are applicable for the VM. - * - * Generated from protobuf field repeated .google.cloud.osconfig.v1.OSPolicyAssignment.LabelSet exclusion_labels = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getExclusionLabels() - { - return $this->exclusion_labels; - } - - /** - * List of label sets used for VM exclusion. - * If the list has more than one label set, the VM is excluded if any - * of the label sets are applicable for the VM. - * - * Generated from protobuf field repeated .google.cloud.osconfig.v1.OSPolicyAssignment.LabelSet exclusion_labels = 3; - * @param array<\Google\Cloud\OsConfig\V1\OSPolicyAssignment\LabelSet>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setExclusionLabels($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\OsConfig\V1\OSPolicyAssignment\LabelSet::class); - $this->exclusion_labels = $arr; - - return $this; - } - - /** - * List of inventories to select VMs. - * A VM is selected if its inventory data matches at least one of the - * following inventories. - * - * Generated from protobuf field repeated .google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter.Inventory inventories = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getInventories() - { - return $this->inventories; - } - - /** - * List of inventories to select VMs. - * A VM is selected if its inventory data matches at least one of the - * following inventories. - * - * Generated from protobuf field repeated .google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter.Inventory inventories = 4; - * @param array<\Google\Cloud\OsConfig\V1\OSPolicyAssignment\InstanceFilter\Inventory>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setInventories($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\OsConfig\V1\OSPolicyAssignment\InstanceFilter\Inventory::class); - $this->inventories = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(InstanceFilter::class, \Google\Cloud\OsConfig\V1\OSPolicyAssignment_InstanceFilter::class); - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignment/InstanceFilter/Inventory.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignment/InstanceFilter/Inventory.php deleted file mode 100644 index aad0aa22658a..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignment/InstanceFilter/Inventory.php +++ /dev/null @@ -1,120 +0,0 @@ -google.cloud.osconfig.v1.OSPolicyAssignment.InstanceFilter.Inventory - */ -class Inventory extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The OS short name - * - * Generated from protobuf field string os_short_name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $os_short_name = ''; - /** - * The OS version - * Prefix matches are supported if asterisk(*) is provided as the - * last character. For example, to match all versions with a major - * version of `7`, specify the following value for this field `7.*` - * An empty string matches all OS versions. - * - * Generated from protobuf field string os_version = 2; - */ - protected $os_version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $os_short_name - * Required. The OS short name - * @type string $os_version - * The OS version - * Prefix matches are supported if asterisk(*) is provided as the - * last character. For example, to match all versions with a major - * version of `7`, specify the following value for this field `7.*` - * An empty string matches all OS versions. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\OsPolicyAssignments::initOnce(); - parent::__construct($data); - } - - /** - * Required. The OS short name - * - * Generated from protobuf field string os_short_name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getOsShortName() - { - return $this->os_short_name; - } - - /** - * Required. The OS short name - * - * Generated from protobuf field string os_short_name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setOsShortName($var) - { - GPBUtil::checkString($var, True); - $this->os_short_name = $var; - - return $this; - } - - /** - * The OS version - * Prefix matches are supported if asterisk(*) is provided as the - * last character. For example, to match all versions with a major - * version of `7`, specify the following value for this field `7.*` - * An empty string matches all OS versions. - * - * Generated from protobuf field string os_version = 2; - * @return string - */ - public function getOsVersion() - { - return $this->os_version; - } - - /** - * The OS version - * Prefix matches are supported if asterisk(*) is provided as the - * last character. For example, to match all versions with a major - * version of `7`, specify the following value for this field `7.*` - * An empty string matches all OS versions. - * - * Generated from protobuf field string os_version = 2; - * @param string $var - * @return $this - */ - public function setOsVersion($var) - { - GPBUtil::checkString($var, True); - $this->os_version = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Inventory::class, \Google\Cloud\OsConfig\V1\OSPolicyAssignment_InstanceFilter_Inventory::class); - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignment/LabelSet.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignment/LabelSet.php deleted file mode 100644 index 2e255e18bbd5..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignment/LabelSet.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.osconfig.v1.OSPolicyAssignment.LabelSet - */ -class LabelSet extends \Google\Protobuf\Internal\Message -{ - /** - * Labels are identified by key/value pairs in this map. - * A VM should contain all the key/value pairs specified in this - * map to be selected. - * - * Generated from protobuf field map labels = 1; - */ - private $labels; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\MapField $labels - * Labels are identified by key/value pairs in this map. - * A VM should contain all the key/value pairs specified in this - * map to be selected. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\OsPolicyAssignments::initOnce(); - parent::__construct($data); - } - - /** - * Labels are identified by key/value pairs in this map. - * A VM should contain all the key/value pairs specified in this - * map to be selected. - * - * Generated from protobuf field map labels = 1; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Labels are identified by key/value pairs in this map. - * A VM should contain all the key/value pairs specified in this - * map to be selected. - * - * Generated from protobuf field map labels = 1; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(LabelSet::class, \Google\Cloud\OsConfig\V1\OSPolicyAssignment_LabelSet::class); - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignment/Rollout.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignment/Rollout.php deleted file mode 100644 index a222fc7776b0..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignment/Rollout.php +++ /dev/null @@ -1,145 +0,0 @@ -google.cloud.osconfig.v1.OSPolicyAssignment.Rollout - */ -class Rollout extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The maximum number (or percentage) of VMs per zone to disrupt - * at any given moment. - * - * Generated from protobuf field .google.cloud.osconfig.v1.FixedOrPercent disruption_budget = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $disruption_budget = null; - /** - * Required. This determines the minimum duration of time to wait after the - * configuration changes are applied through the current rollout. A - * VM continues to count towards the `disruption_budget` at least - * until this duration of time has passed after configuration changes are - * applied. - * - * Generated from protobuf field .google.protobuf.Duration min_wait_duration = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $min_wait_duration = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\OsConfig\V1\FixedOrPercent $disruption_budget - * Required. The maximum number (or percentage) of VMs per zone to disrupt - * at any given moment. - * @type \Google\Protobuf\Duration $min_wait_duration - * Required. This determines the minimum duration of time to wait after the - * configuration changes are applied through the current rollout. A - * VM continues to count towards the `disruption_budget` at least - * until this duration of time has passed after configuration changes are - * applied. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\OsPolicyAssignments::initOnce(); - parent::__construct($data); - } - - /** - * Required. The maximum number (or percentage) of VMs per zone to disrupt - * at any given moment. - * - * Generated from protobuf field .google.cloud.osconfig.v1.FixedOrPercent disruption_budget = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\OsConfig\V1\FixedOrPercent|null - */ - public function getDisruptionBudget() - { - return $this->disruption_budget; - } - - public function hasDisruptionBudget() - { - return isset($this->disruption_budget); - } - - public function clearDisruptionBudget() - { - unset($this->disruption_budget); - } - - /** - * Required. The maximum number (or percentage) of VMs per zone to disrupt - * at any given moment. - * - * Generated from protobuf field .google.cloud.osconfig.v1.FixedOrPercent disruption_budget = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\OsConfig\V1\FixedOrPercent $var - * @return $this - */ - public function setDisruptionBudget($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\FixedOrPercent::class); - $this->disruption_budget = $var; - - return $this; - } - - /** - * Required. This determines the minimum duration of time to wait after the - * configuration changes are applied through the current rollout. A - * VM continues to count towards the `disruption_budget` at least - * until this duration of time has passed after configuration changes are - * applied. - * - * Generated from protobuf field .google.protobuf.Duration min_wait_duration = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Duration|null - */ - public function getMinWaitDuration() - { - return $this->min_wait_duration; - } - - public function hasMinWaitDuration() - { - return isset($this->min_wait_duration); - } - - public function clearMinWaitDuration() - { - unset($this->min_wait_duration); - } - - /** - * Required. This determines the minimum duration of time to wait after the - * configuration changes are applied through the current rollout. A - * VM continues to count towards the `disruption_budget` at least - * until this duration of time has passed after configuration changes are - * applied. - * - * Generated from protobuf field .google.protobuf.Duration min_wait_duration = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setMinWaitDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->min_wait_duration = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Rollout::class, \Google\Cloud\OsConfig\V1\OSPolicyAssignment_Rollout::class); - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignment/RolloutState.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignment/RolloutState.php deleted file mode 100644 index 87b485b15645..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignment/RolloutState.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.osconfig.v1.OSPolicyAssignment.RolloutState - */ -class RolloutState -{ - /** - * Invalid value - * - * Generated from protobuf enum ROLLOUT_STATE_UNSPECIFIED = 0; - */ - const ROLLOUT_STATE_UNSPECIFIED = 0; - /** - * The rollout is in progress. - * - * Generated from protobuf enum IN_PROGRESS = 1; - */ - const IN_PROGRESS = 1; - /** - * The rollout is being cancelled. - * - * Generated from protobuf enum CANCELLING = 2; - */ - const CANCELLING = 2; - /** - * The rollout is cancelled. - * - * Generated from protobuf enum CANCELLED = 3; - */ - const CANCELLED = 3; - /** - * The rollout has completed successfully. - * - * Generated from protobuf enum SUCCEEDED = 4; - */ - const SUCCEEDED = 4; - - private static $valueToName = [ - self::ROLLOUT_STATE_UNSPECIFIED => 'ROLLOUT_STATE_UNSPECIFIED', - self::IN_PROGRESS => 'IN_PROGRESS', - self::CANCELLING => 'CANCELLING', - self::CANCELLED => 'CANCELLED', - self::SUCCEEDED => 'SUCCEEDED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(RolloutState::class, \Google\Cloud\OsConfig\V1\OSPolicyAssignment_RolloutState::class); - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignmentOperationMetadata.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignmentOperationMetadata.php deleted file mode 100644 index fc63cafcd101..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignmentOperationMetadata.php +++ /dev/null @@ -1,232 +0,0 @@ -google.cloud.osconfig.v1.OSPolicyAssignmentOperationMetadata - */ -class OSPolicyAssignmentOperationMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Reference to the `OSPolicyAssignment` API resource. - * Format: - * `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id@revision_id}` - * - * Generated from protobuf field string os_policy_assignment = 1 [(.google.api.resource_reference) = { - */ - protected $os_policy_assignment = ''; - /** - * The OS policy assignment API method. - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicyAssignmentOperationMetadata.APIMethod api_method = 2; - */ - protected $api_method = 0; - /** - * State of the rollout - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicyAssignmentOperationMetadata.RolloutState rollout_state = 3; - */ - protected $rollout_state = 0; - /** - * Rollout start time - * - * Generated from protobuf field .google.protobuf.Timestamp rollout_start_time = 4; - */ - protected $rollout_start_time = null; - /** - * Rollout update time - * - * Generated from protobuf field .google.protobuf.Timestamp rollout_update_time = 5; - */ - protected $rollout_update_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $os_policy_assignment - * Reference to the `OSPolicyAssignment` API resource. - * Format: - * `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id@revision_id}` - * @type int $api_method - * The OS policy assignment API method. - * @type int $rollout_state - * State of the rollout - * @type \Google\Protobuf\Timestamp $rollout_start_time - * Rollout start time - * @type \Google\Protobuf\Timestamp $rollout_update_time - * Rollout update time - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\OsPolicyAssignments::initOnce(); - parent::__construct($data); - } - - /** - * Reference to the `OSPolicyAssignment` API resource. - * Format: - * `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id@revision_id}` - * - * Generated from protobuf field string os_policy_assignment = 1 [(.google.api.resource_reference) = { - * @return string - */ - public function getOsPolicyAssignment() - { - return $this->os_policy_assignment; - } - - /** - * Reference to the `OSPolicyAssignment` API resource. - * Format: - * `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id@revision_id}` - * - * Generated from protobuf field string os_policy_assignment = 1 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setOsPolicyAssignment($var) - { - GPBUtil::checkString($var, True); - $this->os_policy_assignment = $var; - - return $this; - } - - /** - * The OS policy assignment API method. - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicyAssignmentOperationMetadata.APIMethod api_method = 2; - * @return int - */ - public function getApiMethod() - { - return $this->api_method; - } - - /** - * The OS policy assignment API method. - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicyAssignmentOperationMetadata.APIMethod api_method = 2; - * @param int $var - * @return $this - */ - public function setApiMethod($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\OsConfig\V1\OSPolicyAssignmentOperationMetadata\APIMethod::class); - $this->api_method = $var; - - return $this; - } - - /** - * State of the rollout - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicyAssignmentOperationMetadata.RolloutState rollout_state = 3; - * @return int - */ - public function getRolloutState() - { - return $this->rollout_state; - } - - /** - * State of the rollout - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicyAssignmentOperationMetadata.RolloutState rollout_state = 3; - * @param int $var - * @return $this - */ - public function setRolloutState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\OsConfig\V1\OSPolicyAssignmentOperationMetadata\RolloutState::class); - $this->rollout_state = $var; - - return $this; - } - - /** - * Rollout start time - * - * Generated from protobuf field .google.protobuf.Timestamp rollout_start_time = 4; - * @return \Google\Protobuf\Timestamp|null - */ - public function getRolloutStartTime() - { - return $this->rollout_start_time; - } - - public function hasRolloutStartTime() - { - return isset($this->rollout_start_time); - } - - public function clearRolloutStartTime() - { - unset($this->rollout_start_time); - } - - /** - * Rollout start time - * - * Generated from protobuf field .google.protobuf.Timestamp rollout_start_time = 4; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setRolloutStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->rollout_start_time = $var; - - return $this; - } - - /** - * Rollout update time - * - * Generated from protobuf field .google.protobuf.Timestamp rollout_update_time = 5; - * @return \Google\Protobuf\Timestamp|null - */ - public function getRolloutUpdateTime() - { - return $this->rollout_update_time; - } - - public function hasRolloutUpdateTime() - { - return isset($this->rollout_update_time); - } - - public function clearRolloutUpdateTime() - { - unset($this->rollout_update_time); - } - - /** - * Rollout update time - * - * Generated from protobuf field .google.protobuf.Timestamp rollout_update_time = 5; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setRolloutUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->rollout_update_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignmentOperationMetadata/APIMethod.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignmentOperationMetadata/APIMethod.php deleted file mode 100644 index bfc5ecbce745..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignmentOperationMetadata/APIMethod.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.osconfig.v1.OSPolicyAssignmentOperationMetadata.APIMethod - */ -class APIMethod -{ - /** - * Invalid value - * - * Generated from protobuf enum API_METHOD_UNSPECIFIED = 0; - */ - const API_METHOD_UNSPECIFIED = 0; - /** - * Create OS policy assignment API method - * - * Generated from protobuf enum CREATE = 1; - */ - const CREATE = 1; - /** - * Update OS policy assignment API method - * - * Generated from protobuf enum UPDATE = 2; - */ - const UPDATE = 2; - /** - * Delete OS policy assignment API method - * - * Generated from protobuf enum DELETE = 3; - */ - const DELETE = 3; - - private static $valueToName = [ - self::API_METHOD_UNSPECIFIED => 'API_METHOD_UNSPECIFIED', - self::CREATE => 'CREATE', - self::UPDATE => 'UPDATE', - self::DELETE => 'DELETE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(APIMethod::class, \Google\Cloud\OsConfig\V1\OSPolicyAssignmentOperationMetadata_APIMethod::class); - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignmentOperationMetadata/RolloutState.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignmentOperationMetadata/RolloutState.php deleted file mode 100644 index cc058a19eb50..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignmentOperationMetadata/RolloutState.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.osconfig.v1.OSPolicyAssignmentOperationMetadata.RolloutState - */ -class RolloutState -{ - /** - * Invalid value - * - * Generated from protobuf enum ROLLOUT_STATE_UNSPECIFIED = 0; - */ - const ROLLOUT_STATE_UNSPECIFIED = 0; - /** - * The rollout is in progress. - * - * Generated from protobuf enum IN_PROGRESS = 1; - */ - const IN_PROGRESS = 1; - /** - * The rollout is being cancelled. - * - * Generated from protobuf enum CANCELLING = 2; - */ - const CANCELLING = 2; - /** - * The rollout is cancelled. - * - * Generated from protobuf enum CANCELLED = 3; - */ - const CANCELLED = 3; - /** - * The rollout has completed successfully. - * - * Generated from protobuf enum SUCCEEDED = 4; - */ - const SUCCEEDED = 4; - - private static $valueToName = [ - self::ROLLOUT_STATE_UNSPECIFIED => 'ROLLOUT_STATE_UNSPECIFIED', - self::IN_PROGRESS => 'IN_PROGRESS', - self::CANCELLING => 'CANCELLING', - self::CANCELLED => 'CANCELLED', - self::SUCCEEDED => 'SUCCEEDED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(RolloutState::class, \Google\Cloud\OsConfig\V1\OSPolicyAssignmentOperationMetadata_RolloutState::class); - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignmentReport.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignmentReport.php deleted file mode 100644 index e98ff0ef9fd1..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignmentReport.php +++ /dev/null @@ -1,287 +0,0 @@ -google.cloud.osconfig.v1.OSPolicyAssignmentReport - */ -class OSPolicyAssignmentReport extends \Google\Protobuf\Internal\Message -{ - /** - * The `OSPolicyAssignmentReport` API resource name. - * Format: - * `projects/{project_number}/locations/{location}/instances/{instance_id}/osPolicyAssignments/{os_policy_assignment_id}/report` - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The Compute Engine VM instance name. - * - * Generated from protobuf field string instance = 2; - */ - protected $instance = ''; - /** - * Reference to the `OSPolicyAssignment` API resource that the `OSPolicy` - * belongs to. - * Format: - * `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id@revision_id}` - * - * Generated from protobuf field string os_policy_assignment = 3 [(.google.api.resource_reference) = { - */ - protected $os_policy_assignment = ''; - /** - * Compliance data for each `OSPolicy` that is applied to the VM. - * - * Generated from protobuf field repeated .google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance os_policy_compliances = 4; - */ - private $os_policy_compliances; - /** - * Timestamp for when the report was last generated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 5; - */ - protected $update_time = null; - /** - * Unique identifier of the last attempted run to apply the OS policies - * associated with this assignment on the VM. - * This ID is logged by the OS Config agent while applying the OS - * policies associated with this assignment on the VM. - * NOTE: If the service is unable to successfully connect to the agent for - * this run, then this id will not be available in the agent logs. - * - * Generated from protobuf field string last_run_id = 6; - */ - protected $last_run_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The `OSPolicyAssignmentReport` API resource name. - * Format: - * `projects/{project_number}/locations/{location}/instances/{instance_id}/osPolicyAssignments/{os_policy_assignment_id}/report` - * @type string $instance - * The Compute Engine VM instance name. - * @type string $os_policy_assignment - * Reference to the `OSPolicyAssignment` API resource that the `OSPolicy` - * belongs to. - * Format: - * `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id@revision_id}` - * @type array<\Google\Cloud\OsConfig\V1\OSPolicyAssignmentReport\OSPolicyCompliance>|\Google\Protobuf\Internal\RepeatedField $os_policy_compliances - * Compliance data for each `OSPolicy` that is applied to the VM. - * @type \Google\Protobuf\Timestamp $update_time - * Timestamp for when the report was last generated. - * @type string $last_run_id - * Unique identifier of the last attempted run to apply the OS policies - * associated with this assignment on the VM. - * This ID is logged by the OS Config agent while applying the OS - * policies associated with this assignment on the VM. - * NOTE: If the service is unable to successfully connect to the agent for - * this run, then this id will not be available in the agent logs. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\OsPolicyAssignmentReports::initOnce(); - parent::__construct($data); - } - - /** - * The `OSPolicyAssignmentReport` API resource name. - * Format: - * `projects/{project_number}/locations/{location}/instances/{instance_id}/osPolicyAssignments/{os_policy_assignment_id}/report` - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The `OSPolicyAssignmentReport` API resource name. - * Format: - * `projects/{project_number}/locations/{location}/instances/{instance_id}/osPolicyAssignments/{os_policy_assignment_id}/report` - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The Compute Engine VM instance name. - * - * Generated from protobuf field string instance = 2; - * @return string - */ - public function getInstance() - { - return $this->instance; - } - - /** - * The Compute Engine VM instance name. - * - * Generated from protobuf field string instance = 2; - * @param string $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkString($var, True); - $this->instance = $var; - - return $this; - } - - /** - * Reference to the `OSPolicyAssignment` API resource that the `OSPolicy` - * belongs to. - * Format: - * `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id@revision_id}` - * - * Generated from protobuf field string os_policy_assignment = 3 [(.google.api.resource_reference) = { - * @return string - */ - public function getOsPolicyAssignment() - { - return $this->os_policy_assignment; - } - - /** - * Reference to the `OSPolicyAssignment` API resource that the `OSPolicy` - * belongs to. - * Format: - * `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id@revision_id}` - * - * Generated from protobuf field string os_policy_assignment = 3 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setOsPolicyAssignment($var) - { - GPBUtil::checkString($var, True); - $this->os_policy_assignment = $var; - - return $this; - } - - /** - * Compliance data for each `OSPolicy` that is applied to the VM. - * - * Generated from protobuf field repeated .google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance os_policy_compliances = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getOsPolicyCompliances() - { - return $this->os_policy_compliances; - } - - /** - * Compliance data for each `OSPolicy` that is applied to the VM. - * - * Generated from protobuf field repeated .google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance os_policy_compliances = 4; - * @param array<\Google\Cloud\OsConfig\V1\OSPolicyAssignmentReport\OSPolicyCompliance>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setOsPolicyCompliances($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\OsConfig\V1\OSPolicyAssignmentReport\OSPolicyCompliance::class); - $this->os_policy_compliances = $arr; - - return $this; - } - - /** - * Timestamp for when the report was last generated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 5; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Timestamp for when the report was last generated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 5; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Unique identifier of the last attempted run to apply the OS policies - * associated with this assignment on the VM. - * This ID is logged by the OS Config agent while applying the OS - * policies associated with this assignment on the VM. - * NOTE: If the service is unable to successfully connect to the agent for - * this run, then this id will not be available in the agent logs. - * - * Generated from protobuf field string last_run_id = 6; - * @return string - */ - public function getLastRunId() - { - return $this->last_run_id; - } - - /** - * Unique identifier of the last attempted run to apply the OS policies - * associated with this assignment on the VM. - * This ID is logged by the OS Config agent while applying the OS - * policies associated with this assignment on the VM. - * NOTE: If the service is unable to successfully connect to the agent for - * this run, then this id will not be available in the agent logs. - * - * Generated from protobuf field string last_run_id = 6; - * @param string $var - * @return $this - */ - public function setLastRunId($var) - { - GPBUtil::checkString($var, True); - $this->last_run_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignmentReport/OSPolicyCompliance.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignmentReport/OSPolicyCompliance.php deleted file mode 100644 index 8daa097eb7ca..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignmentReport/OSPolicyCompliance.php +++ /dev/null @@ -1,244 +0,0 @@ -google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance - */ -class OSPolicyCompliance extends \Google\Protobuf\Internal\Message -{ - /** - * The OS policy id - * - * Generated from protobuf field string os_policy_id = 1; - */ - protected $os_policy_id = ''; - /** - * The compliance state of the OS policy. - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.ComplianceState compliance_state = 2; - */ - protected $compliance_state = 0; - /** - * The reason for the OS policy to be in an unknown compliance state. - * This field is always populated when `compliance_state` is `UNKNOWN`. - * If populated, the field can contain one of the following values: - * * `vm-not-running`: The VM was not running. - * * `os-policies-not-supported-by-agent`: The version of the OS Config - * agent running on the VM does not support running OS policies. - * * `no-agent-detected`: The OS Config agent is not detected for the VM. - * * `resource-execution-errors`: The OS Config agent encountered errors - * while executing one or more resources in the policy. See - * `os_policy_resource_compliances` for details. - * * `task-timeout`: The task sent to the agent to apply the policy timed - * out. - * * `unexpected-agent-state`: The OS Config agent did not report the final - * status of the task that attempted to apply the policy. Instead, the agent - * unexpectedly started working on a different task. This mostly happens - * when the agent or VM unexpectedly restarts while applying OS policies. - * * `internal-service-errors`: Internal service errors were encountered - * while attempting to apply the policy. - * - * Generated from protobuf field string compliance_state_reason = 3; - */ - protected $compliance_state_reason = ''; - /** - * Compliance data for each resource within the policy that is applied to - * the VM. - * - * Generated from protobuf field repeated .google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance os_policy_resource_compliances = 4; - */ - private $os_policy_resource_compliances; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $os_policy_id - * The OS policy id - * @type int $compliance_state - * The compliance state of the OS policy. - * @type string $compliance_state_reason - * The reason for the OS policy to be in an unknown compliance state. - * This field is always populated when `compliance_state` is `UNKNOWN`. - * If populated, the field can contain one of the following values: - * * `vm-not-running`: The VM was not running. - * * `os-policies-not-supported-by-agent`: The version of the OS Config - * agent running on the VM does not support running OS policies. - * * `no-agent-detected`: The OS Config agent is not detected for the VM. - * * `resource-execution-errors`: The OS Config agent encountered errors - * while executing one or more resources in the policy. See - * `os_policy_resource_compliances` for details. - * * `task-timeout`: The task sent to the agent to apply the policy timed - * out. - * * `unexpected-agent-state`: The OS Config agent did not report the final - * status of the task that attempted to apply the policy. Instead, the agent - * unexpectedly started working on a different task. This mostly happens - * when the agent or VM unexpectedly restarts while applying OS policies. - * * `internal-service-errors`: Internal service errors were encountered - * while attempting to apply the policy. - * @type array<\Google\Cloud\OsConfig\V1\OSPolicyAssignmentReport\OSPolicyCompliance\OSPolicyResourceCompliance>|\Google\Protobuf\Internal\RepeatedField $os_policy_resource_compliances - * Compliance data for each resource within the policy that is applied to - * the VM. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\OsPolicyAssignmentReports::initOnce(); - parent::__construct($data); - } - - /** - * The OS policy id - * - * Generated from protobuf field string os_policy_id = 1; - * @return string - */ - public function getOsPolicyId() - { - return $this->os_policy_id; - } - - /** - * The OS policy id - * - * Generated from protobuf field string os_policy_id = 1; - * @param string $var - * @return $this - */ - public function setOsPolicyId($var) - { - GPBUtil::checkString($var, True); - $this->os_policy_id = $var; - - return $this; - } - - /** - * The compliance state of the OS policy. - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.ComplianceState compliance_state = 2; - * @return int - */ - public function getComplianceState() - { - return $this->compliance_state; - } - - /** - * The compliance state of the OS policy. - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.ComplianceState compliance_state = 2; - * @param int $var - * @return $this - */ - public function setComplianceState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\OsConfig\V1\OSPolicyAssignmentReport\OSPolicyCompliance\ComplianceState::class); - $this->compliance_state = $var; - - return $this; - } - - /** - * The reason for the OS policy to be in an unknown compliance state. - * This field is always populated when `compliance_state` is `UNKNOWN`. - * If populated, the field can contain one of the following values: - * * `vm-not-running`: The VM was not running. - * * `os-policies-not-supported-by-agent`: The version of the OS Config - * agent running on the VM does not support running OS policies. - * * `no-agent-detected`: The OS Config agent is not detected for the VM. - * * `resource-execution-errors`: The OS Config agent encountered errors - * while executing one or more resources in the policy. See - * `os_policy_resource_compliances` for details. - * * `task-timeout`: The task sent to the agent to apply the policy timed - * out. - * * `unexpected-agent-state`: The OS Config agent did not report the final - * status of the task that attempted to apply the policy. Instead, the agent - * unexpectedly started working on a different task. This mostly happens - * when the agent or VM unexpectedly restarts while applying OS policies. - * * `internal-service-errors`: Internal service errors were encountered - * while attempting to apply the policy. - * - * Generated from protobuf field string compliance_state_reason = 3; - * @return string - */ - public function getComplianceStateReason() - { - return $this->compliance_state_reason; - } - - /** - * The reason for the OS policy to be in an unknown compliance state. - * This field is always populated when `compliance_state` is `UNKNOWN`. - * If populated, the field can contain one of the following values: - * * `vm-not-running`: The VM was not running. - * * `os-policies-not-supported-by-agent`: The version of the OS Config - * agent running on the VM does not support running OS policies. - * * `no-agent-detected`: The OS Config agent is not detected for the VM. - * * `resource-execution-errors`: The OS Config agent encountered errors - * while executing one or more resources in the policy. See - * `os_policy_resource_compliances` for details. - * * `task-timeout`: The task sent to the agent to apply the policy timed - * out. - * * `unexpected-agent-state`: The OS Config agent did not report the final - * status of the task that attempted to apply the policy. Instead, the agent - * unexpectedly started working on a different task. This mostly happens - * when the agent or VM unexpectedly restarts while applying OS policies. - * * `internal-service-errors`: Internal service errors were encountered - * while attempting to apply the policy. - * - * Generated from protobuf field string compliance_state_reason = 3; - * @param string $var - * @return $this - */ - public function setComplianceStateReason($var) - { - GPBUtil::checkString($var, True); - $this->compliance_state_reason = $var; - - return $this; - } - - /** - * Compliance data for each resource within the policy that is applied to - * the VM. - * - * Generated from protobuf field repeated .google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance os_policy_resource_compliances = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getOsPolicyResourceCompliances() - { - return $this->os_policy_resource_compliances; - } - - /** - * Compliance data for each resource within the policy that is applied to - * the VM. - * - * Generated from protobuf field repeated .google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance os_policy_resource_compliances = 4; - * @param array<\Google\Cloud\OsConfig\V1\OSPolicyAssignmentReport\OSPolicyCompliance\OSPolicyResourceCompliance>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setOsPolicyResourceCompliances($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\OsConfig\V1\OSPolicyAssignmentReport\OSPolicyCompliance\OSPolicyResourceCompliance::class); - $this->os_policy_resource_compliances = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(OSPolicyCompliance::class, \Google\Cloud\OsConfig\V1\OSPolicyAssignmentReport_OSPolicyCompliance::class); - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignmentReport/OSPolicyCompliance/ComplianceState.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignmentReport/OSPolicyCompliance/ComplianceState.php deleted file mode 100644 index 64a1bb18fa65..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignmentReport/OSPolicyCompliance/ComplianceState.php +++ /dev/null @@ -1,70 +0,0 @@ -google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.ComplianceState - */ -class ComplianceState -{ - /** - * The policy is in an unknown compliance state. - * Refer to the field `compliance_state_reason` to learn the exact reason - * for the policy to be in this compliance state. - * - * Generated from protobuf enum UNKNOWN = 0; - */ - const UNKNOWN = 0; - /** - * Policy is compliant. - * The policy is compliant if all the underlying resources are also - * compliant. - * - * Generated from protobuf enum COMPLIANT = 1; - */ - const COMPLIANT = 1; - /** - * Policy is non-compliant. - * The policy is non-compliant if one or more underlying resources are - * non-compliant. - * - * Generated from protobuf enum NON_COMPLIANT = 2; - */ - const NON_COMPLIANT = 2; - - private static $valueToName = [ - self::UNKNOWN => 'UNKNOWN', - self::COMPLIANT => 'COMPLIANT', - self::NON_COMPLIANT => 'NON_COMPLIANT', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ComplianceState::class, \Google\Cloud\OsConfig\V1\OSPolicyAssignmentReport_OSPolicyCompliance_ComplianceState::class); - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignmentReport/OSPolicyCompliance/OSPolicyResourceCompliance.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignmentReport/OSPolicyCompliance/OSPolicyResourceCompliance.php deleted file mode 100644 index 5c6d0c077f01..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignmentReport/OSPolicyCompliance/OSPolicyResourceCompliance.php +++ /dev/null @@ -1,262 +0,0 @@ -google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance - */ -class OSPolicyResourceCompliance extends \Google\Protobuf\Internal\Message -{ - /** - * The ID of the OS policy resource. - * - * Generated from protobuf field string os_policy_resource_id = 1; - */ - protected $os_policy_resource_id = ''; - /** - * Ordered list of configuration completed by the agent for the OS policy - * resource. - * - * Generated from protobuf field repeated .google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep config_steps = 2; - */ - private $config_steps; - /** - * The compliance state of the resource. - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ComplianceState compliance_state = 3; - */ - protected $compliance_state = 0; - /** - * A reason for the resource to be in the given compliance state. - * This field is always populated when `compliance_state` is `UNKNOWN`. - * The following values are supported when `compliance_state == UNKNOWN` - * * `execution-errors`: Errors were encountered by the agent while - * executing the resource and the compliance state couldn't be - * determined. - * * `execution-skipped-by-agent`: Resource execution was skipped by the - * agent because errors were encountered while executing prior resources - * in the OS policy. - * * `os-policy-execution-attempt-failed`: The execution of the OS policy - * containing this resource failed and the compliance state couldn't be - * determined. - * - * Generated from protobuf field string compliance_state_reason = 4; - */ - protected $compliance_state_reason = ''; - protected $output; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $os_policy_resource_id - * The ID of the OS policy resource. - * @type array<\Google\Cloud\OsConfig\V1\OSPolicyAssignmentReport\OSPolicyCompliance\OSPolicyResourceCompliance\OSPolicyResourceConfigStep>|\Google\Protobuf\Internal\RepeatedField $config_steps - * Ordered list of configuration completed by the agent for the OS policy - * resource. - * @type int $compliance_state - * The compliance state of the resource. - * @type string $compliance_state_reason - * A reason for the resource to be in the given compliance state. - * This field is always populated when `compliance_state` is `UNKNOWN`. - * The following values are supported when `compliance_state == UNKNOWN` - * * `execution-errors`: Errors were encountered by the agent while - * executing the resource and the compliance state couldn't be - * determined. - * * `execution-skipped-by-agent`: Resource execution was skipped by the - * agent because errors were encountered while executing prior resources - * in the OS policy. - * * `os-policy-execution-attempt-failed`: The execution of the OS policy - * containing this resource failed and the compliance state couldn't be - * determined. - * @type \Google\Cloud\OsConfig\V1\OSPolicyAssignmentReport\OSPolicyCompliance\OSPolicyResourceCompliance\ExecResourceOutput $exec_resource_output - * ExecResource specific output. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\OsPolicyAssignmentReports::initOnce(); - parent::__construct($data); - } - - /** - * The ID of the OS policy resource. - * - * Generated from protobuf field string os_policy_resource_id = 1; - * @return string - */ - public function getOsPolicyResourceId() - { - return $this->os_policy_resource_id; - } - - /** - * The ID of the OS policy resource. - * - * Generated from protobuf field string os_policy_resource_id = 1; - * @param string $var - * @return $this - */ - public function setOsPolicyResourceId($var) - { - GPBUtil::checkString($var, True); - $this->os_policy_resource_id = $var; - - return $this; - } - - /** - * Ordered list of configuration completed by the agent for the OS policy - * resource. - * - * Generated from protobuf field repeated .google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep config_steps = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getConfigSteps() - { - return $this->config_steps; - } - - /** - * Ordered list of configuration completed by the agent for the OS policy - * resource. - * - * Generated from protobuf field repeated .google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep config_steps = 2; - * @param array<\Google\Cloud\OsConfig\V1\OSPolicyAssignmentReport\OSPolicyCompliance\OSPolicyResourceCompliance\OSPolicyResourceConfigStep>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setConfigSteps($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\OsConfig\V1\OSPolicyAssignmentReport\OSPolicyCompliance\OSPolicyResourceCompliance\OSPolicyResourceConfigStep::class); - $this->config_steps = $arr; - - return $this; - } - - /** - * The compliance state of the resource. - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ComplianceState compliance_state = 3; - * @return int - */ - public function getComplianceState() - { - return $this->compliance_state; - } - - /** - * The compliance state of the resource. - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ComplianceState compliance_state = 3; - * @param int $var - * @return $this - */ - public function setComplianceState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\OsConfig\V1\OSPolicyAssignmentReport\OSPolicyCompliance\OSPolicyResourceCompliance\ComplianceState::class); - $this->compliance_state = $var; - - return $this; - } - - /** - * A reason for the resource to be in the given compliance state. - * This field is always populated when `compliance_state` is `UNKNOWN`. - * The following values are supported when `compliance_state == UNKNOWN` - * * `execution-errors`: Errors were encountered by the agent while - * executing the resource and the compliance state couldn't be - * determined. - * * `execution-skipped-by-agent`: Resource execution was skipped by the - * agent because errors were encountered while executing prior resources - * in the OS policy. - * * `os-policy-execution-attempt-failed`: The execution of the OS policy - * containing this resource failed and the compliance state couldn't be - * determined. - * - * Generated from protobuf field string compliance_state_reason = 4; - * @return string - */ - public function getComplianceStateReason() - { - return $this->compliance_state_reason; - } - - /** - * A reason for the resource to be in the given compliance state. - * This field is always populated when `compliance_state` is `UNKNOWN`. - * The following values are supported when `compliance_state == UNKNOWN` - * * `execution-errors`: Errors were encountered by the agent while - * executing the resource and the compliance state couldn't be - * determined. - * * `execution-skipped-by-agent`: Resource execution was skipped by the - * agent because errors were encountered while executing prior resources - * in the OS policy. - * * `os-policy-execution-attempt-failed`: The execution of the OS policy - * containing this resource failed and the compliance state couldn't be - * determined. - * - * Generated from protobuf field string compliance_state_reason = 4; - * @param string $var - * @return $this - */ - public function setComplianceStateReason($var) - { - GPBUtil::checkString($var, True); - $this->compliance_state_reason = $var; - - return $this; - } - - /** - * ExecResource specific output. - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput exec_resource_output = 5; - * @return \Google\Cloud\OsConfig\V1\OSPolicyAssignmentReport\OSPolicyCompliance\OSPolicyResourceCompliance\ExecResourceOutput|null - */ - public function getExecResourceOutput() - { - return $this->readOneof(5); - } - - public function hasExecResourceOutput() - { - return $this->hasOneof(5); - } - - /** - * ExecResource specific output. - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput exec_resource_output = 5; - * @param \Google\Cloud\OsConfig\V1\OSPolicyAssignmentReport\OSPolicyCompliance\OSPolicyResourceCompliance\ExecResourceOutput $var - * @return $this - */ - public function setExecResourceOutput($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\OSPolicyAssignmentReport\OSPolicyCompliance\OSPolicyResourceCompliance\ExecResourceOutput::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * @return string - */ - public function getOutput() - { - return $this->whichOneof("output"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(OSPolicyResourceCompliance::class, \Google\Cloud\OsConfig\V1\OSPolicyAssignmentReport_OSPolicyCompliance_OSPolicyResourceCompliance::class); - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignmentReport/OSPolicyCompliance/OSPolicyResourceCompliance/ComplianceState.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignmentReport/OSPolicyCompliance/OSPolicyResourceCompliance/ComplianceState.php deleted file mode 100644 index 08bbcffb989c..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignmentReport/OSPolicyCompliance/OSPolicyResourceCompliance/ComplianceState.php +++ /dev/null @@ -1,66 +0,0 @@ -google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ComplianceState - */ -class ComplianceState -{ - /** - * The resource is in an unknown compliance state. - * To get more details about why the policy is in this state, review - * the output of the `compliance_state_reason` field. - * - * Generated from protobuf enum UNKNOWN = 0; - */ - const UNKNOWN = 0; - /** - * Resource is compliant. - * - * Generated from protobuf enum COMPLIANT = 1; - */ - const COMPLIANT = 1; - /** - * Resource is non-compliant. - * - * Generated from protobuf enum NON_COMPLIANT = 2; - */ - const NON_COMPLIANT = 2; - - private static $valueToName = [ - self::UNKNOWN => 'UNKNOWN', - self::COMPLIANT => 'COMPLIANT', - self::NON_COMPLIANT => 'NON_COMPLIANT', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ComplianceState::class, \Google\Cloud\OsConfig\V1\OSPolicyAssignmentReport_OSPolicyCompliance_OSPolicyResourceCompliance_ComplianceState::class); - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignmentReport/OSPolicyCompliance/OSPolicyResourceCompliance/ExecResourceOutput.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignmentReport/OSPolicyCompliance/OSPolicyResourceCompliance/ExecResourceOutput.php deleted file mode 100644 index 8506100def1c..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignmentReport/OSPolicyCompliance/OSPolicyResourceCompliance/ExecResourceOutput.php +++ /dev/null @@ -1,74 +0,0 @@ -google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput - */ -class ExecResourceOutput extends \Google\Protobuf\Internal\Message -{ - /** - * Output from enforcement phase output file (if run). - * Output size is limited to 100K bytes. - * - * Generated from protobuf field bytes enforcement_output = 2; - */ - protected $enforcement_output = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $enforcement_output - * Output from enforcement phase output file (if run). - * Output size is limited to 100K bytes. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\OsPolicyAssignmentReports::initOnce(); - parent::__construct($data); - } - - /** - * Output from enforcement phase output file (if run). - * Output size is limited to 100K bytes. - * - * Generated from protobuf field bytes enforcement_output = 2; - * @return string - */ - public function getEnforcementOutput() - { - return $this->enforcement_output; - } - - /** - * Output from enforcement phase output file (if run). - * Output size is limited to 100K bytes. - * - * Generated from protobuf field bytes enforcement_output = 2; - * @param string $var - * @return $this - */ - public function setEnforcementOutput($var) - { - GPBUtil::checkString($var, False); - $this->enforcement_output = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ExecResourceOutput::class, \Google\Cloud\OsConfig\V1\OSPolicyAssignmentReport_OSPolicyCompliance_OSPolicyResourceCompliance_ExecResourceOutput::class); - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignmentReport/OSPolicyCompliance/OSPolicyResourceCompliance/OSPolicyResourceConfigStep.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignmentReport/OSPolicyCompliance/OSPolicyResourceCompliance/OSPolicyResourceConfigStep.php deleted file mode 100644 index 0889e4a8a502..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignmentReport/OSPolicyCompliance/OSPolicyResourceCompliance/OSPolicyResourceConfigStep.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep - */ -class OSPolicyResourceConfigStep extends \Google\Protobuf\Internal\Message -{ - /** - * Configuration step type. - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep.Type type = 1; - */ - protected $type = 0; - /** - * An error message recorded during the execution of this step. - * Only populated if errors were encountered during this step execution. - * - * Generated from protobuf field string error_message = 2; - */ - protected $error_message = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $type - * Configuration step type. - * @type string $error_message - * An error message recorded during the execution of this step. - * Only populated if errors were encountered during this step execution. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\OsPolicyAssignmentReports::initOnce(); - parent::__construct($data); - } - - /** - * Configuration step type. - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep.Type type = 1; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Configuration step type. - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep.Type type = 1; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\OsConfig\V1\OSPolicyAssignmentReport\OSPolicyCompliance\OSPolicyResourceCompliance\OSPolicyResourceConfigStep\Type::class); - $this->type = $var; - - return $this; - } - - /** - * An error message recorded during the execution of this step. - * Only populated if errors were encountered during this step execution. - * - * Generated from protobuf field string error_message = 2; - * @return string - */ - public function getErrorMessage() - { - return $this->error_message; - } - - /** - * An error message recorded during the execution of this step. - * Only populated if errors were encountered during this step execution. - * - * Generated from protobuf field string error_message = 2; - * @param string $var - * @return $this - */ - public function setErrorMessage($var) - { - GPBUtil::checkString($var, True); - $this->error_message = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(OSPolicyResourceConfigStep::class, \Google\Cloud\OsConfig\V1\OSPolicyAssignmentReport_OSPolicyCompliance_OSPolicyResourceCompliance_OSPolicyResourceConfigStep::class); - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignmentReport/OSPolicyCompliance/OSPolicyResourceCompliance/OSPolicyResourceConfigStep/Type.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignmentReport/OSPolicyCompliance/OSPolicyResourceCompliance/OSPolicyResourceConfigStep/Type.php deleted file mode 100644 index 8e851817718e..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OSPolicyAssignmentReport/OSPolicyCompliance/OSPolicyResourceCompliance/OSPolicyResourceConfigStep/Type.php +++ /dev/null @@ -1,84 +0,0 @@ -google.cloud.osconfig.v1.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep.Type - */ -class Type -{ - /** - * Default value. This value is unused. - * - * Generated from protobuf enum TYPE_UNSPECIFIED = 0; - */ - const TYPE_UNSPECIFIED = 0; - /** - * Checks for resource conflicts such as schema errors. - * - * Generated from protobuf enum VALIDATION = 1; - */ - const VALIDATION = 1; - /** - * Checks the current status of the desired state for a resource. - * - * Generated from protobuf enum DESIRED_STATE_CHECK = 2; - */ - const DESIRED_STATE_CHECK = 2; - /** - * Enforces the desired state for a resource that is not in desired - * state. - * - * Generated from protobuf enum DESIRED_STATE_ENFORCEMENT = 3; - */ - const DESIRED_STATE_ENFORCEMENT = 3; - /** - * Re-checks the status of the desired state. This check is done - * for a resource after the enforcement of all OS policies. - * This step is used to determine the final desired state status for - * the resource. It accounts for any resources that might have drifted - * from their desired state due to side effects from executing other - * resources. - * - * Generated from protobuf enum DESIRED_STATE_CHECK_POST_ENFORCEMENT = 4; - */ - const DESIRED_STATE_CHECK_POST_ENFORCEMENT = 4; - - private static $valueToName = [ - self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', - self::VALIDATION => 'VALIDATION', - self::DESIRED_STATE_CHECK => 'DESIRED_STATE_CHECK', - self::DESIRED_STATE_ENFORCEMENT => 'DESIRED_STATE_ENFORCEMENT', - self::DESIRED_STATE_CHECK_POST_ENFORCEMENT => 'DESIRED_STATE_CHECK_POST_ENFORCEMENT', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Type::class, \Google\Cloud\OsConfig\V1\OSPolicyAssignmentReport_OSPolicyCompliance_OSPolicyResourceCompliance_OSPolicyResourceConfigStep_Type::class); - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OneTimeSchedule.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OneTimeSchedule.php deleted file mode 100644 index df8040508dee..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/OneTimeSchedule.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.osconfig.v1.OneTimeSchedule - */ -class OneTimeSchedule extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The desired patch job execution time. - * - * Generated from protobuf field .google.protobuf.Timestamp execute_time = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $execute_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $execute_time - * Required. The desired patch job execution time. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\PatchDeployments::initOnce(); - parent::__construct($data); - } - - /** - * Required. The desired patch job execution time. - * - * Generated from protobuf field .google.protobuf.Timestamp execute_time = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getExecuteTime() - { - return $this->execute_time; - } - - public function hasExecuteTime() - { - return isset($this->execute_time); - } - - public function clearExecuteTime() - { - unset($this->execute_time); - } - - /** - * Required. The desired patch job execution time. - * - * Generated from protobuf field .google.protobuf.Timestamp execute_time = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setExecuteTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->execute_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PatchConfig.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PatchConfig.php deleted file mode 100644 index c8bdadd845fb..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PatchConfig.php +++ /dev/null @@ -1,426 +0,0 @@ -google.cloud.osconfig.v1.PatchConfig - */ -class PatchConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Post-patch reboot settings. - * - * Generated from protobuf field .google.cloud.osconfig.v1.PatchConfig.RebootConfig reboot_config = 1; - */ - protected $reboot_config = 0; - /** - * Apt update settings. Use this setting to override the default `apt` patch - * rules. - * - * Generated from protobuf field .google.cloud.osconfig.v1.AptSettings apt = 3; - */ - protected $apt = null; - /** - * Yum update settings. Use this setting to override the default `yum` patch - * rules. - * - * Generated from protobuf field .google.cloud.osconfig.v1.YumSettings yum = 4; - */ - protected $yum = null; - /** - * Goo update settings. Use this setting to override the default `goo` patch - * rules. - * - * Generated from protobuf field .google.cloud.osconfig.v1.GooSettings goo = 5; - */ - protected $goo = null; - /** - * Zypper update settings. Use this setting to override the default `zypper` - * patch rules. - * - * Generated from protobuf field .google.cloud.osconfig.v1.ZypperSettings zypper = 6; - */ - protected $zypper = null; - /** - * Windows update settings. Use this override the default windows patch rules. - * - * Generated from protobuf field .google.cloud.osconfig.v1.WindowsUpdateSettings windows_update = 7; - */ - protected $windows_update = null; - /** - * The `ExecStep` to run before the patch update. - * - * Generated from protobuf field .google.cloud.osconfig.v1.ExecStep pre_step = 8; - */ - protected $pre_step = null; - /** - * The `ExecStep` to run after the patch update. - * - * Generated from protobuf field .google.cloud.osconfig.v1.ExecStep post_step = 9; - */ - protected $post_step = null; - /** - * Allows the patch job to run on Managed instance groups (MIGs). - * - * Generated from protobuf field bool mig_instances_allowed = 10; - */ - protected $mig_instances_allowed = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $reboot_config - * Post-patch reboot settings. - * @type \Google\Cloud\OsConfig\V1\AptSettings $apt - * Apt update settings. Use this setting to override the default `apt` patch - * rules. - * @type \Google\Cloud\OsConfig\V1\YumSettings $yum - * Yum update settings. Use this setting to override the default `yum` patch - * rules. - * @type \Google\Cloud\OsConfig\V1\GooSettings $goo - * Goo update settings. Use this setting to override the default `goo` patch - * rules. - * @type \Google\Cloud\OsConfig\V1\ZypperSettings $zypper - * Zypper update settings. Use this setting to override the default `zypper` - * patch rules. - * @type \Google\Cloud\OsConfig\V1\WindowsUpdateSettings $windows_update - * Windows update settings. Use this override the default windows patch rules. - * @type \Google\Cloud\OsConfig\V1\ExecStep $pre_step - * The `ExecStep` to run before the patch update. - * @type \Google\Cloud\OsConfig\V1\ExecStep $post_step - * The `ExecStep` to run after the patch update. - * @type bool $mig_instances_allowed - * Allows the patch job to run on Managed instance groups (MIGs). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\PatchJobs::initOnce(); - parent::__construct($data); - } - - /** - * Post-patch reboot settings. - * - * Generated from protobuf field .google.cloud.osconfig.v1.PatchConfig.RebootConfig reboot_config = 1; - * @return int - */ - public function getRebootConfig() - { - return $this->reboot_config; - } - - /** - * Post-patch reboot settings. - * - * Generated from protobuf field .google.cloud.osconfig.v1.PatchConfig.RebootConfig reboot_config = 1; - * @param int $var - * @return $this - */ - public function setRebootConfig($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\OsConfig\V1\PatchConfig\RebootConfig::class); - $this->reboot_config = $var; - - return $this; - } - - /** - * Apt update settings. Use this setting to override the default `apt` patch - * rules. - * - * Generated from protobuf field .google.cloud.osconfig.v1.AptSettings apt = 3; - * @return \Google\Cloud\OsConfig\V1\AptSettings|null - */ - public function getApt() - { - return $this->apt; - } - - public function hasApt() - { - return isset($this->apt); - } - - public function clearApt() - { - unset($this->apt); - } - - /** - * Apt update settings. Use this setting to override the default `apt` patch - * rules. - * - * Generated from protobuf field .google.cloud.osconfig.v1.AptSettings apt = 3; - * @param \Google\Cloud\OsConfig\V1\AptSettings $var - * @return $this - */ - public function setApt($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\AptSettings::class); - $this->apt = $var; - - return $this; - } - - /** - * Yum update settings. Use this setting to override the default `yum` patch - * rules. - * - * Generated from protobuf field .google.cloud.osconfig.v1.YumSettings yum = 4; - * @return \Google\Cloud\OsConfig\V1\YumSettings|null - */ - public function getYum() - { - return $this->yum; - } - - public function hasYum() - { - return isset($this->yum); - } - - public function clearYum() - { - unset($this->yum); - } - - /** - * Yum update settings. Use this setting to override the default `yum` patch - * rules. - * - * Generated from protobuf field .google.cloud.osconfig.v1.YumSettings yum = 4; - * @param \Google\Cloud\OsConfig\V1\YumSettings $var - * @return $this - */ - public function setYum($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\YumSettings::class); - $this->yum = $var; - - return $this; - } - - /** - * Goo update settings. Use this setting to override the default `goo` patch - * rules. - * - * Generated from protobuf field .google.cloud.osconfig.v1.GooSettings goo = 5; - * @return \Google\Cloud\OsConfig\V1\GooSettings|null - */ - public function getGoo() - { - return $this->goo; - } - - public function hasGoo() - { - return isset($this->goo); - } - - public function clearGoo() - { - unset($this->goo); - } - - /** - * Goo update settings. Use this setting to override the default `goo` patch - * rules. - * - * Generated from protobuf field .google.cloud.osconfig.v1.GooSettings goo = 5; - * @param \Google\Cloud\OsConfig\V1\GooSettings $var - * @return $this - */ - public function setGoo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\GooSettings::class); - $this->goo = $var; - - return $this; - } - - /** - * Zypper update settings. Use this setting to override the default `zypper` - * patch rules. - * - * Generated from protobuf field .google.cloud.osconfig.v1.ZypperSettings zypper = 6; - * @return \Google\Cloud\OsConfig\V1\ZypperSettings|null - */ - public function getZypper() - { - return $this->zypper; - } - - public function hasZypper() - { - return isset($this->zypper); - } - - public function clearZypper() - { - unset($this->zypper); - } - - /** - * Zypper update settings. Use this setting to override the default `zypper` - * patch rules. - * - * Generated from protobuf field .google.cloud.osconfig.v1.ZypperSettings zypper = 6; - * @param \Google\Cloud\OsConfig\V1\ZypperSettings $var - * @return $this - */ - public function setZypper($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\ZypperSettings::class); - $this->zypper = $var; - - return $this; - } - - /** - * Windows update settings. Use this override the default windows patch rules. - * - * Generated from protobuf field .google.cloud.osconfig.v1.WindowsUpdateSettings windows_update = 7; - * @return \Google\Cloud\OsConfig\V1\WindowsUpdateSettings|null - */ - public function getWindowsUpdate() - { - return $this->windows_update; - } - - public function hasWindowsUpdate() - { - return isset($this->windows_update); - } - - public function clearWindowsUpdate() - { - unset($this->windows_update); - } - - /** - * Windows update settings. Use this override the default windows patch rules. - * - * Generated from protobuf field .google.cloud.osconfig.v1.WindowsUpdateSettings windows_update = 7; - * @param \Google\Cloud\OsConfig\V1\WindowsUpdateSettings $var - * @return $this - */ - public function setWindowsUpdate($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\WindowsUpdateSettings::class); - $this->windows_update = $var; - - return $this; - } - - /** - * The `ExecStep` to run before the patch update. - * - * Generated from protobuf field .google.cloud.osconfig.v1.ExecStep pre_step = 8; - * @return \Google\Cloud\OsConfig\V1\ExecStep|null - */ - public function getPreStep() - { - return $this->pre_step; - } - - public function hasPreStep() - { - return isset($this->pre_step); - } - - public function clearPreStep() - { - unset($this->pre_step); - } - - /** - * The `ExecStep` to run before the patch update. - * - * Generated from protobuf field .google.cloud.osconfig.v1.ExecStep pre_step = 8; - * @param \Google\Cloud\OsConfig\V1\ExecStep $var - * @return $this - */ - public function setPreStep($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\ExecStep::class); - $this->pre_step = $var; - - return $this; - } - - /** - * The `ExecStep` to run after the patch update. - * - * Generated from protobuf field .google.cloud.osconfig.v1.ExecStep post_step = 9; - * @return \Google\Cloud\OsConfig\V1\ExecStep|null - */ - public function getPostStep() - { - return $this->post_step; - } - - public function hasPostStep() - { - return isset($this->post_step); - } - - public function clearPostStep() - { - unset($this->post_step); - } - - /** - * The `ExecStep` to run after the patch update. - * - * Generated from protobuf field .google.cloud.osconfig.v1.ExecStep post_step = 9; - * @param \Google\Cloud\OsConfig\V1\ExecStep $var - * @return $this - */ - public function setPostStep($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\ExecStep::class); - $this->post_step = $var; - - return $this; - } - - /** - * Allows the patch job to run on Managed instance groups (MIGs). - * - * Generated from protobuf field bool mig_instances_allowed = 10; - * @return bool - */ - public function getMigInstancesAllowed() - { - return $this->mig_instances_allowed; - } - - /** - * Allows the patch job to run on Managed instance groups (MIGs). - * - * Generated from protobuf field bool mig_instances_allowed = 10; - * @param bool $var - * @return $this - */ - public function setMigInstancesAllowed($var) - { - GPBUtil::checkBool($var); - $this->mig_instances_allowed = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PatchConfig/RebootConfig.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PatchConfig/RebootConfig.php deleted file mode 100644 index 7448831d19a5..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PatchConfig/RebootConfig.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.osconfig.v1.PatchConfig.RebootConfig - */ -class RebootConfig -{ - /** - * The default behavior is DEFAULT. - * - * Generated from protobuf enum REBOOT_CONFIG_UNSPECIFIED = 0; - */ - const REBOOT_CONFIG_UNSPECIFIED = 0; - /** - * The agent decides if a reboot is necessary by checking signals such as - * registry keys on Windows or `/var/run/reboot-required` on APT based - * systems. On RPM based systems, a set of core system package install times - * are compared with system boot time. - * - * Generated from protobuf enum DEFAULT = 1; - */ - const PBDEFAULT = 1; - /** - * Always reboot the machine after the update completes. - * - * Generated from protobuf enum ALWAYS = 2; - */ - const ALWAYS = 2; - /** - * Never reboot the machine after the update completes. - * - * Generated from protobuf enum NEVER = 3; - */ - const NEVER = 3; - - private static $valueToName = [ - self::REBOOT_CONFIG_UNSPECIFIED => 'REBOOT_CONFIG_UNSPECIFIED', - self::PBDEFAULT => 'DEFAULT', - self::ALWAYS => 'ALWAYS', - self::NEVER => 'NEVER', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - $pbconst = __CLASS__. '::PB' . strtoupper($name); - if (!defined($pbconst)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($pbconst); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(RebootConfig::class, \Google\Cloud\OsConfig\V1\PatchConfig_RebootConfig::class); - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PatchDeployment.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PatchDeployment.php deleted file mode 100644 index ed3802a67ee2..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PatchDeployment.php +++ /dev/null @@ -1,558 +0,0 @@ -google.cloud.osconfig.v1.PatchDeployment - */ -class PatchDeployment extends \Google\Protobuf\Internal\Message -{ - /** - * Unique name for the patch deployment resource in a project. The patch - * deployment name is in the form: - * `projects/{project_id}/patchDeployments/{patch_deployment_id}`. - * This field is ignored when you create a new patch deployment. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Optional. Description of the patch deployment. Length of the description is - * limited to 1024 characters. - * - * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Required. VM instances to patch. - * - * Generated from protobuf field .google.cloud.osconfig.v1.PatchInstanceFilter instance_filter = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $instance_filter = null; - /** - * Optional. Patch configuration that is applied. - * - * Generated from protobuf field .google.cloud.osconfig.v1.PatchConfig patch_config = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $patch_config = null; - /** - * Optional. Duration of the patch. After the duration ends, the patch times - * out. - * - * Generated from protobuf field .google.protobuf.Duration duration = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $duration = null; - /** - * Output only. Time the patch deployment was created. Timestamp is in - * [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. Time the patch deployment was last updated. Timestamp is in - * [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Output only. The last time a patch job was started by this deployment. - * Timestamp is in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text - * format. - * - * Generated from protobuf field .google.protobuf.Timestamp last_execute_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $last_execute_time = null; - /** - * Optional. Rollout strategy of the patch job. - * - * Generated from protobuf field .google.cloud.osconfig.v1.PatchRollout rollout = 11 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $rollout = null; - /** - * Output only. Current state of the patch deployment. - * - * Generated from protobuf field .google.cloud.osconfig.v1.PatchDeployment.State state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - protected $schedule; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Unique name for the patch deployment resource in a project. The patch - * deployment name is in the form: - * `projects/{project_id}/patchDeployments/{patch_deployment_id}`. - * This field is ignored when you create a new patch deployment. - * @type string $description - * Optional. Description of the patch deployment. Length of the description is - * limited to 1024 characters. - * @type \Google\Cloud\OsConfig\V1\PatchInstanceFilter $instance_filter - * Required. VM instances to patch. - * @type \Google\Cloud\OsConfig\V1\PatchConfig $patch_config - * Optional. Patch configuration that is applied. - * @type \Google\Protobuf\Duration $duration - * Optional. Duration of the patch. After the duration ends, the patch times - * out. - * @type \Google\Cloud\OsConfig\V1\OneTimeSchedule $one_time_schedule - * Required. Schedule a one-time execution. - * @type \Google\Cloud\OsConfig\V1\RecurringSchedule $recurring_schedule - * Required. Schedule recurring executions. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. Time the patch deployment was created. Timestamp is in - * [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. Time the patch deployment was last updated. Timestamp is in - * [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. - * @type \Google\Protobuf\Timestamp $last_execute_time - * Output only. The last time a patch job was started by this deployment. - * Timestamp is in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text - * format. - * @type \Google\Cloud\OsConfig\V1\PatchRollout $rollout - * Optional. Rollout strategy of the patch job. - * @type int $state - * Output only. Current state of the patch deployment. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\PatchDeployments::initOnce(); - parent::__construct($data); - } - - /** - * Unique name for the patch deployment resource in a project. The patch - * deployment name is in the form: - * `projects/{project_id}/patchDeployments/{patch_deployment_id}`. - * This field is ignored when you create a new patch deployment. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Unique name for the patch deployment resource in a project. The patch - * deployment name is in the form: - * `projects/{project_id}/patchDeployments/{patch_deployment_id}`. - * This field is ignored when you create a new patch deployment. - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. Description of the patch deployment. Length of the description is - * limited to 1024 characters. - * - * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. Description of the patch deployment. Length of the description is - * limited to 1024 characters. - * - * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Required. VM instances to patch. - * - * Generated from protobuf field .google.cloud.osconfig.v1.PatchInstanceFilter instance_filter = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\OsConfig\V1\PatchInstanceFilter|null - */ - public function getInstanceFilter() - { - return $this->instance_filter; - } - - public function hasInstanceFilter() - { - return isset($this->instance_filter); - } - - public function clearInstanceFilter() - { - unset($this->instance_filter); - } - - /** - * Required. VM instances to patch. - * - * Generated from protobuf field .google.cloud.osconfig.v1.PatchInstanceFilter instance_filter = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\OsConfig\V1\PatchInstanceFilter $var - * @return $this - */ - public function setInstanceFilter($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\PatchInstanceFilter::class); - $this->instance_filter = $var; - - return $this; - } - - /** - * Optional. Patch configuration that is applied. - * - * Generated from protobuf field .google.cloud.osconfig.v1.PatchConfig patch_config = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\OsConfig\V1\PatchConfig|null - */ - public function getPatchConfig() - { - return $this->patch_config; - } - - public function hasPatchConfig() - { - return isset($this->patch_config); - } - - public function clearPatchConfig() - { - unset($this->patch_config); - } - - /** - * Optional. Patch configuration that is applied. - * - * Generated from protobuf field .google.cloud.osconfig.v1.PatchConfig patch_config = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\OsConfig\V1\PatchConfig $var - * @return $this - */ - public function setPatchConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\PatchConfig::class); - $this->patch_config = $var; - - return $this; - } - - /** - * Optional. Duration of the patch. After the duration ends, the patch times - * out. - * - * Generated from protobuf field .google.protobuf.Duration duration = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Duration|null - */ - public function getDuration() - { - return $this->duration; - } - - public function hasDuration() - { - return isset($this->duration); - } - - public function clearDuration() - { - unset($this->duration); - } - - /** - * Optional. Duration of the patch. After the duration ends, the patch times - * out. - * - * Generated from protobuf field .google.protobuf.Duration duration = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->duration = $var; - - return $this; - } - - /** - * Required. Schedule a one-time execution. - * - * Generated from protobuf field .google.cloud.osconfig.v1.OneTimeSchedule one_time_schedule = 6 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\OsConfig\V1\OneTimeSchedule|null - */ - public function getOneTimeSchedule() - { - return $this->readOneof(6); - } - - public function hasOneTimeSchedule() - { - return $this->hasOneof(6); - } - - /** - * Required. Schedule a one-time execution. - * - * Generated from protobuf field .google.cloud.osconfig.v1.OneTimeSchedule one_time_schedule = 6 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\OsConfig\V1\OneTimeSchedule $var - * @return $this - */ - public function setOneTimeSchedule($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\OneTimeSchedule::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * Required. Schedule recurring executions. - * - * Generated from protobuf field .google.cloud.osconfig.v1.RecurringSchedule recurring_schedule = 7 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\OsConfig\V1\RecurringSchedule|null - */ - public function getRecurringSchedule() - { - return $this->readOneof(7); - } - - public function hasRecurringSchedule() - { - return $this->hasOneof(7); - } - - /** - * Required. Schedule recurring executions. - * - * Generated from protobuf field .google.cloud.osconfig.v1.RecurringSchedule recurring_schedule = 7 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\OsConfig\V1\RecurringSchedule $var - * @return $this - */ - public function setRecurringSchedule($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\RecurringSchedule::class); - $this->writeOneof(7, $var); - - return $this; - } - - /** - * Output only. Time the patch deployment was created. Timestamp is in - * [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. Time the patch deployment was created. Timestamp is in - * [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. Time the patch deployment was last updated. Timestamp is in - * [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. Time the patch deployment was last updated. Timestamp is in - * [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Output only. The last time a patch job was started by this deployment. - * Timestamp is in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text - * format. - * - * Generated from protobuf field .google.protobuf.Timestamp last_execute_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getLastExecuteTime() - { - return $this->last_execute_time; - } - - public function hasLastExecuteTime() - { - return isset($this->last_execute_time); - } - - public function clearLastExecuteTime() - { - unset($this->last_execute_time); - } - - /** - * Output only. The last time a patch job was started by this deployment. - * Timestamp is in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text - * format. - * - * Generated from protobuf field .google.protobuf.Timestamp last_execute_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setLastExecuteTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->last_execute_time = $var; - - return $this; - } - - /** - * Optional. Rollout strategy of the patch job. - * - * Generated from protobuf field .google.cloud.osconfig.v1.PatchRollout rollout = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\OsConfig\V1\PatchRollout|null - */ - public function getRollout() - { - return $this->rollout; - } - - public function hasRollout() - { - return isset($this->rollout); - } - - public function clearRollout() - { - unset($this->rollout); - } - - /** - * Optional. Rollout strategy of the patch job. - * - * Generated from protobuf field .google.cloud.osconfig.v1.PatchRollout rollout = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\OsConfig\V1\PatchRollout $var - * @return $this - */ - public function setRollout($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\PatchRollout::class); - $this->rollout = $var; - - return $this; - } - - /** - * Output only. Current state of the patch deployment. - * - * Generated from protobuf field .google.cloud.osconfig.v1.PatchDeployment.State state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. Current state of the patch deployment. - * - * Generated from protobuf field .google.cloud.osconfig.v1.PatchDeployment.State state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\OsConfig\V1\PatchDeployment\State::class); - $this->state = $var; - - return $this; - } - - /** - * @return string - */ - public function getSchedule() - { - return $this->whichOneof("schedule"); - } - -} - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PatchDeployment/State.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PatchDeployment/State.php deleted file mode 100644 index 5b4375fab273..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PatchDeployment/State.php +++ /dev/null @@ -1,65 +0,0 @@ -google.cloud.osconfig.v1.PatchDeployment.State - */ -class State -{ - /** - * The default value. This value is used if the state is omitted. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Active value means that patch deployment generates Patch Jobs. - * - * Generated from protobuf enum ACTIVE = 1; - */ - const ACTIVE = 1; - /** - * Paused value means that patch deployment does not generate - * Patch jobs. Requires user action to move in and out from this state. - * - * Generated from protobuf enum PAUSED = 2; - */ - const PAUSED = 2; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::ACTIVE => 'ACTIVE', - self::PAUSED => 'PAUSED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\OsConfig\V1\PatchDeployment_State::class); - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PatchInstanceFilter.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PatchInstanceFilter.php deleted file mode 100644 index 81bb99323274..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PatchInstanceFilter.php +++ /dev/null @@ -1,238 +0,0 @@ -google.cloud.osconfig.v1.PatchInstanceFilter - */ -class PatchInstanceFilter extends \Google\Protobuf\Internal\Message -{ - /** - * Target all VM instances in the project. If true, no other criteria is - * permitted. - * - * Generated from protobuf field bool all = 1; - */ - protected $all = false; - /** - * Targets VM instances matching ANY of these GroupLabels. This allows - * targeting of disparate groups of VM instances. - * - * Generated from protobuf field repeated .google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel group_labels = 2; - */ - private $group_labels; - /** - * Targets VM instances in ANY of these zones. Leave empty to target VM - * instances in any zone. - * - * Generated from protobuf field repeated string zones = 3; - */ - private $zones; - /** - * Targets any of the VM instances specified. Instances are specified by their - * URI in the form `zones/[ZONE]/instances/[INSTANCE_NAME]`, - * `projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]`, or - * `https://www.googleapis.com/compute/v1/projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]` - * - * Generated from protobuf field repeated string instances = 4; - */ - private $instances; - /** - * Targets VMs whose name starts with one of these prefixes. Similar to - * labels, this is another way to group VMs when targeting configs, for - * example prefix="prod-". - * - * Generated from protobuf field repeated string instance_name_prefixes = 5; - */ - private $instance_name_prefixes; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $all - * Target all VM instances in the project. If true, no other criteria is - * permitted. - * @type array<\Google\Cloud\OsConfig\V1\PatchInstanceFilter\GroupLabel>|\Google\Protobuf\Internal\RepeatedField $group_labels - * Targets VM instances matching ANY of these GroupLabels. This allows - * targeting of disparate groups of VM instances. - * @type array|\Google\Protobuf\Internal\RepeatedField $zones - * Targets VM instances in ANY of these zones. Leave empty to target VM - * instances in any zone. - * @type array|\Google\Protobuf\Internal\RepeatedField $instances - * Targets any of the VM instances specified. Instances are specified by their - * URI in the form `zones/[ZONE]/instances/[INSTANCE_NAME]`, - * `projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]`, or - * `https://www.googleapis.com/compute/v1/projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]` - * @type array|\Google\Protobuf\Internal\RepeatedField $instance_name_prefixes - * Targets VMs whose name starts with one of these prefixes. Similar to - * labels, this is another way to group VMs when targeting configs, for - * example prefix="prod-". - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\PatchJobs::initOnce(); - parent::__construct($data); - } - - /** - * Target all VM instances in the project. If true, no other criteria is - * permitted. - * - * Generated from protobuf field bool all = 1; - * @return bool - */ - public function getAll() - { - return $this->all; - } - - /** - * Target all VM instances in the project. If true, no other criteria is - * permitted. - * - * Generated from protobuf field bool all = 1; - * @param bool $var - * @return $this - */ - public function setAll($var) - { - GPBUtil::checkBool($var); - $this->all = $var; - - return $this; - } - - /** - * Targets VM instances matching ANY of these GroupLabels. This allows - * targeting of disparate groups of VM instances. - * - * Generated from protobuf field repeated .google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel group_labels = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getGroupLabels() - { - return $this->group_labels; - } - - /** - * Targets VM instances matching ANY of these GroupLabels. This allows - * targeting of disparate groups of VM instances. - * - * Generated from protobuf field repeated .google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel group_labels = 2; - * @param array<\Google\Cloud\OsConfig\V1\PatchInstanceFilter\GroupLabel>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setGroupLabels($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\OsConfig\V1\PatchInstanceFilter\GroupLabel::class); - $this->group_labels = $arr; - - return $this; - } - - /** - * Targets VM instances in ANY of these zones. Leave empty to target VM - * instances in any zone. - * - * Generated from protobuf field repeated string zones = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getZones() - { - return $this->zones; - } - - /** - * Targets VM instances in ANY of these zones. Leave empty to target VM - * instances in any zone. - * - * Generated from protobuf field repeated string zones = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setZones($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->zones = $arr; - - return $this; - } - - /** - * Targets any of the VM instances specified. Instances are specified by their - * URI in the form `zones/[ZONE]/instances/[INSTANCE_NAME]`, - * `projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]`, or - * `https://www.googleapis.com/compute/v1/projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]` - * - * Generated from protobuf field repeated string instances = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getInstances() - { - return $this->instances; - } - - /** - * Targets any of the VM instances specified. Instances are specified by their - * URI in the form `zones/[ZONE]/instances/[INSTANCE_NAME]`, - * `projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]`, or - * `https://www.googleapis.com/compute/v1/projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]` - * - * Generated from protobuf field repeated string instances = 4; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setInstances($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->instances = $arr; - - return $this; - } - - /** - * Targets VMs whose name starts with one of these prefixes. Similar to - * labels, this is another way to group VMs when targeting configs, for - * example prefix="prod-". - * - * Generated from protobuf field repeated string instance_name_prefixes = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getInstanceNamePrefixes() - { - return $this->instance_name_prefixes; - } - - /** - * Targets VMs whose name starts with one of these prefixes. Similar to - * labels, this is another way to group VMs when targeting configs, for - * example prefix="prod-". - * - * Generated from protobuf field repeated string instance_name_prefixes = 5; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setInstanceNamePrefixes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->instance_name_prefixes = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PatchInstanceFilter/GroupLabel.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PatchInstanceFilter/GroupLabel.php deleted file mode 100644 index 7a50a5d80ec0..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PatchInstanceFilter/GroupLabel.php +++ /dev/null @@ -1,80 +0,0 @@ -google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel - */ -class GroupLabel extends \Google\Protobuf\Internal\Message -{ - /** - * Compute Engine instance labels that must be present for a VM - * instance to be targeted by this filter. - * - * Generated from protobuf field map labels = 1; - */ - private $labels; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\MapField $labels - * Compute Engine instance labels that must be present for a VM - * instance to be targeted by this filter. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\PatchJobs::initOnce(); - parent::__construct($data); - } - - /** - * Compute Engine instance labels that must be present for a VM - * instance to be targeted by this filter. - * - * Generated from protobuf field map labels = 1; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Compute Engine instance labels that must be present for a VM - * instance to be targeted by this filter. - * - * Generated from protobuf field map labels = 1; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(GroupLabel::class, \Google\Cloud\OsConfig\V1\PatchInstanceFilter_GroupLabel::class); - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PatchJob.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PatchJob.php deleted file mode 100644 index be710e1e9926..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PatchJob.php +++ /dev/null @@ -1,643 +0,0 @@ -google.cloud.osconfig.v1.PatchJob - */ -class PatchJob extends \Google\Protobuf\Internal\Message -{ - /** - * Unique identifier for this patch job in the form - * `projects/*/patchJobs/*` - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Display name for this patch job. This is not a unique identifier. - * - * Generated from protobuf field string display_name = 14; - */ - protected $display_name = ''; - /** - * Description of the patch job. Length of the description is limited - * to 1024 characters. - * - * Generated from protobuf field string description = 2; - */ - protected $description = ''; - /** - * Time this patch job was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; - */ - protected $create_time = null; - /** - * Last time this patch job was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4; - */ - protected $update_time = null; - /** - * The current state of the PatchJob. - * - * Generated from protobuf field .google.cloud.osconfig.v1.PatchJob.State state = 5; - */ - protected $state = 0; - /** - * Instances to patch. - * - * Generated from protobuf field .google.cloud.osconfig.v1.PatchInstanceFilter instance_filter = 13; - */ - protected $instance_filter = null; - /** - * Patch configuration being applied. - * - * Generated from protobuf field .google.cloud.osconfig.v1.PatchConfig patch_config = 7; - */ - protected $patch_config = null; - /** - * Duration of the patch job. After the duration ends, the - * patch job times out. - * - * Generated from protobuf field .google.protobuf.Duration duration = 8; - */ - protected $duration = null; - /** - * Summary of instance details. - * - * Generated from protobuf field .google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary instance_details_summary = 9; - */ - protected $instance_details_summary = null; - /** - * If this patch job is a dry run, the agent reports that it has - * finished without running any updates on the VM instance. - * - * Generated from protobuf field bool dry_run = 10; - */ - protected $dry_run = false; - /** - * If this patch job failed, this message provides information about the - * failure. - * - * Generated from protobuf field string error_message = 11; - */ - protected $error_message = ''; - /** - * Reflects the overall progress of the patch job in the range of - * 0.0 being no progress to 100.0 being complete. - * - * Generated from protobuf field double percent_complete = 12; - */ - protected $percent_complete = 0.0; - /** - * Output only. Name of the patch deployment that created this patch job. - * - * Generated from protobuf field string patch_deployment = 15 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $patch_deployment = ''; - /** - * Rollout strategy being applied. - * - * Generated from protobuf field .google.cloud.osconfig.v1.PatchRollout rollout = 16; - */ - protected $rollout = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Unique identifier for this patch job in the form - * `projects/*/patchJobs/*` - * @type string $display_name - * Display name for this patch job. This is not a unique identifier. - * @type string $description - * Description of the patch job. Length of the description is limited - * to 1024 characters. - * @type \Google\Protobuf\Timestamp $create_time - * Time this patch job was created. - * @type \Google\Protobuf\Timestamp $update_time - * Last time this patch job was updated. - * @type int $state - * The current state of the PatchJob. - * @type \Google\Cloud\OsConfig\V1\PatchInstanceFilter $instance_filter - * Instances to patch. - * @type \Google\Cloud\OsConfig\V1\PatchConfig $patch_config - * Patch configuration being applied. - * @type \Google\Protobuf\Duration $duration - * Duration of the patch job. After the duration ends, the - * patch job times out. - * @type \Google\Cloud\OsConfig\V1\PatchJob\InstanceDetailsSummary $instance_details_summary - * Summary of instance details. - * @type bool $dry_run - * If this patch job is a dry run, the agent reports that it has - * finished without running any updates on the VM instance. - * @type string $error_message - * If this patch job failed, this message provides information about the - * failure. - * @type float $percent_complete - * Reflects the overall progress of the patch job in the range of - * 0.0 being no progress to 100.0 being complete. - * @type string $patch_deployment - * Output only. Name of the patch deployment that created this patch job. - * @type \Google\Cloud\OsConfig\V1\PatchRollout $rollout - * Rollout strategy being applied. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\PatchJobs::initOnce(); - parent::__construct($data); - } - - /** - * Unique identifier for this patch job in the form - * `projects/*/patchJobs/*` - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Unique identifier for this patch job in the form - * `projects/*/patchJobs/*` - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Display name for this patch job. This is not a unique identifier. - * - * Generated from protobuf field string display_name = 14; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Display name for this patch job. This is not a unique identifier. - * - * Generated from protobuf field string display_name = 14; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Description of the patch job. Length of the description is limited - * to 1024 characters. - * - * Generated from protobuf field string description = 2; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Description of the patch job. Length of the description is limited - * to 1024 characters. - * - * Generated from protobuf field string description = 2; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Time this patch job was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Time this patch job was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Last time this patch job was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Last time this patch job was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * The current state of the PatchJob. - * - * Generated from protobuf field .google.cloud.osconfig.v1.PatchJob.State state = 5; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * The current state of the PatchJob. - * - * Generated from protobuf field .google.cloud.osconfig.v1.PatchJob.State state = 5; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\OsConfig\V1\PatchJob\State::class); - $this->state = $var; - - return $this; - } - - /** - * Instances to patch. - * - * Generated from protobuf field .google.cloud.osconfig.v1.PatchInstanceFilter instance_filter = 13; - * @return \Google\Cloud\OsConfig\V1\PatchInstanceFilter|null - */ - public function getInstanceFilter() - { - return $this->instance_filter; - } - - public function hasInstanceFilter() - { - return isset($this->instance_filter); - } - - public function clearInstanceFilter() - { - unset($this->instance_filter); - } - - /** - * Instances to patch. - * - * Generated from protobuf field .google.cloud.osconfig.v1.PatchInstanceFilter instance_filter = 13; - * @param \Google\Cloud\OsConfig\V1\PatchInstanceFilter $var - * @return $this - */ - public function setInstanceFilter($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\PatchInstanceFilter::class); - $this->instance_filter = $var; - - return $this; - } - - /** - * Patch configuration being applied. - * - * Generated from protobuf field .google.cloud.osconfig.v1.PatchConfig patch_config = 7; - * @return \Google\Cloud\OsConfig\V1\PatchConfig|null - */ - public function getPatchConfig() - { - return $this->patch_config; - } - - public function hasPatchConfig() - { - return isset($this->patch_config); - } - - public function clearPatchConfig() - { - unset($this->patch_config); - } - - /** - * Patch configuration being applied. - * - * Generated from protobuf field .google.cloud.osconfig.v1.PatchConfig patch_config = 7; - * @param \Google\Cloud\OsConfig\V1\PatchConfig $var - * @return $this - */ - public function setPatchConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\PatchConfig::class); - $this->patch_config = $var; - - return $this; - } - - /** - * Duration of the patch job. After the duration ends, the - * patch job times out. - * - * Generated from protobuf field .google.protobuf.Duration duration = 8; - * @return \Google\Protobuf\Duration|null - */ - public function getDuration() - { - return $this->duration; - } - - public function hasDuration() - { - return isset($this->duration); - } - - public function clearDuration() - { - unset($this->duration); - } - - /** - * Duration of the patch job. After the duration ends, the - * patch job times out. - * - * Generated from protobuf field .google.protobuf.Duration duration = 8; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->duration = $var; - - return $this; - } - - /** - * Summary of instance details. - * - * Generated from protobuf field .google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary instance_details_summary = 9; - * @return \Google\Cloud\OsConfig\V1\PatchJob\InstanceDetailsSummary|null - */ - public function getInstanceDetailsSummary() - { - return $this->instance_details_summary; - } - - public function hasInstanceDetailsSummary() - { - return isset($this->instance_details_summary); - } - - public function clearInstanceDetailsSummary() - { - unset($this->instance_details_summary); - } - - /** - * Summary of instance details. - * - * Generated from protobuf field .google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary instance_details_summary = 9; - * @param \Google\Cloud\OsConfig\V1\PatchJob\InstanceDetailsSummary $var - * @return $this - */ - public function setInstanceDetailsSummary($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\PatchJob\InstanceDetailsSummary::class); - $this->instance_details_summary = $var; - - return $this; - } - - /** - * If this patch job is a dry run, the agent reports that it has - * finished without running any updates on the VM instance. - * - * Generated from protobuf field bool dry_run = 10; - * @return bool - */ - public function getDryRun() - { - return $this->dry_run; - } - - /** - * If this patch job is a dry run, the agent reports that it has - * finished without running any updates on the VM instance. - * - * Generated from protobuf field bool dry_run = 10; - * @param bool $var - * @return $this - */ - public function setDryRun($var) - { - GPBUtil::checkBool($var); - $this->dry_run = $var; - - return $this; - } - - /** - * If this patch job failed, this message provides information about the - * failure. - * - * Generated from protobuf field string error_message = 11; - * @return string - */ - public function getErrorMessage() - { - return $this->error_message; - } - - /** - * If this patch job failed, this message provides information about the - * failure. - * - * Generated from protobuf field string error_message = 11; - * @param string $var - * @return $this - */ - public function setErrorMessage($var) - { - GPBUtil::checkString($var, True); - $this->error_message = $var; - - return $this; - } - - /** - * Reflects the overall progress of the patch job in the range of - * 0.0 being no progress to 100.0 being complete. - * - * Generated from protobuf field double percent_complete = 12; - * @return float - */ - public function getPercentComplete() - { - return $this->percent_complete; - } - - /** - * Reflects the overall progress of the patch job in the range of - * 0.0 being no progress to 100.0 being complete. - * - * Generated from protobuf field double percent_complete = 12; - * @param float $var - * @return $this - */ - public function setPercentComplete($var) - { - GPBUtil::checkDouble($var); - $this->percent_complete = $var; - - return $this; - } - - /** - * Output only. Name of the patch deployment that created this patch job. - * - * Generated from protobuf field string patch_deployment = 15 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getPatchDeployment() - { - return $this->patch_deployment; - } - - /** - * Output only. Name of the patch deployment that created this patch job. - * - * Generated from protobuf field string patch_deployment = 15 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setPatchDeployment($var) - { - GPBUtil::checkString($var, True); - $this->patch_deployment = $var; - - return $this; - } - - /** - * Rollout strategy being applied. - * - * Generated from protobuf field .google.cloud.osconfig.v1.PatchRollout rollout = 16; - * @return \Google\Cloud\OsConfig\V1\PatchRollout|null - */ - public function getRollout() - { - return $this->rollout; - } - - public function hasRollout() - { - return isset($this->rollout); - } - - public function clearRollout() - { - unset($this->rollout); - } - - /** - * Rollout strategy being applied. - * - * Generated from protobuf field .google.cloud.osconfig.v1.PatchRollout rollout = 16; - * @param \Google\Cloud\OsConfig\V1\PatchRollout $var - * @return $this - */ - public function setRollout($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\PatchRollout::class); - $this->rollout = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PatchJob/InstanceDetailsSummary.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PatchJob/InstanceDetailsSummary.php deleted file mode 100644 index 303233add89a..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PatchJob/InstanceDetailsSummary.php +++ /dev/null @@ -1,557 +0,0 @@ -google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary - */ -class InstanceDetailsSummary extends \Google\Protobuf\Internal\Message -{ - /** - * Number of instances pending patch job. - * - * Generated from protobuf field int64 pending_instance_count = 1; - */ - protected $pending_instance_count = 0; - /** - * Number of instances that are inactive. - * - * Generated from protobuf field int64 inactive_instance_count = 2; - */ - protected $inactive_instance_count = 0; - /** - * Number of instances notified about patch job. - * - * Generated from protobuf field int64 notified_instance_count = 3; - */ - protected $notified_instance_count = 0; - /** - * Number of instances that have started. - * - * Generated from protobuf field int64 started_instance_count = 4; - */ - protected $started_instance_count = 0; - /** - * Number of instances that are downloading patches. - * - * Generated from protobuf field int64 downloading_patches_instance_count = 5; - */ - protected $downloading_patches_instance_count = 0; - /** - * Number of instances that are applying patches. - * - * Generated from protobuf field int64 applying_patches_instance_count = 6; - */ - protected $applying_patches_instance_count = 0; - /** - * Number of instances rebooting. - * - * Generated from protobuf field int64 rebooting_instance_count = 7; - */ - protected $rebooting_instance_count = 0; - /** - * Number of instances that have completed successfully. - * - * Generated from protobuf field int64 succeeded_instance_count = 8; - */ - protected $succeeded_instance_count = 0; - /** - * Number of instances that require reboot. - * - * Generated from protobuf field int64 succeeded_reboot_required_instance_count = 9; - */ - protected $succeeded_reboot_required_instance_count = 0; - /** - * Number of instances that failed. - * - * Generated from protobuf field int64 failed_instance_count = 10; - */ - protected $failed_instance_count = 0; - /** - * Number of instances that have acked and will start shortly. - * - * Generated from protobuf field int64 acked_instance_count = 11; - */ - protected $acked_instance_count = 0; - /** - * Number of instances that exceeded the time out while applying the patch. - * - * Generated from protobuf field int64 timed_out_instance_count = 12; - */ - protected $timed_out_instance_count = 0; - /** - * Number of instances that are running the pre-patch step. - * - * Generated from protobuf field int64 pre_patch_step_instance_count = 13; - */ - protected $pre_patch_step_instance_count = 0; - /** - * Number of instances that are running the post-patch step. - * - * Generated from protobuf field int64 post_patch_step_instance_count = 14; - */ - protected $post_patch_step_instance_count = 0; - /** - * Number of instances that do not appear to be running the agent. Check to - * ensure that the agent is installed, running, and able to communicate with - * the service. - * - * Generated from protobuf field int64 no_agent_detected_instance_count = 15; - */ - protected $no_agent_detected_instance_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $pending_instance_count - * Number of instances pending patch job. - * @type int|string $inactive_instance_count - * Number of instances that are inactive. - * @type int|string $notified_instance_count - * Number of instances notified about patch job. - * @type int|string $started_instance_count - * Number of instances that have started. - * @type int|string $downloading_patches_instance_count - * Number of instances that are downloading patches. - * @type int|string $applying_patches_instance_count - * Number of instances that are applying patches. - * @type int|string $rebooting_instance_count - * Number of instances rebooting. - * @type int|string $succeeded_instance_count - * Number of instances that have completed successfully. - * @type int|string $succeeded_reboot_required_instance_count - * Number of instances that require reboot. - * @type int|string $failed_instance_count - * Number of instances that failed. - * @type int|string $acked_instance_count - * Number of instances that have acked and will start shortly. - * @type int|string $timed_out_instance_count - * Number of instances that exceeded the time out while applying the patch. - * @type int|string $pre_patch_step_instance_count - * Number of instances that are running the pre-patch step. - * @type int|string $post_patch_step_instance_count - * Number of instances that are running the post-patch step. - * @type int|string $no_agent_detected_instance_count - * Number of instances that do not appear to be running the agent. Check to - * ensure that the agent is installed, running, and able to communicate with - * the service. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\PatchJobs::initOnce(); - parent::__construct($data); - } - - /** - * Number of instances pending patch job. - * - * Generated from protobuf field int64 pending_instance_count = 1; - * @return int|string - */ - public function getPendingInstanceCount() - { - return $this->pending_instance_count; - } - - /** - * Number of instances pending patch job. - * - * Generated from protobuf field int64 pending_instance_count = 1; - * @param int|string $var - * @return $this - */ - public function setPendingInstanceCount($var) - { - GPBUtil::checkInt64($var); - $this->pending_instance_count = $var; - - return $this; - } - - /** - * Number of instances that are inactive. - * - * Generated from protobuf field int64 inactive_instance_count = 2; - * @return int|string - */ - public function getInactiveInstanceCount() - { - return $this->inactive_instance_count; - } - - /** - * Number of instances that are inactive. - * - * Generated from protobuf field int64 inactive_instance_count = 2; - * @param int|string $var - * @return $this - */ - public function setInactiveInstanceCount($var) - { - GPBUtil::checkInt64($var); - $this->inactive_instance_count = $var; - - return $this; - } - - /** - * Number of instances notified about patch job. - * - * Generated from protobuf field int64 notified_instance_count = 3; - * @return int|string - */ - public function getNotifiedInstanceCount() - { - return $this->notified_instance_count; - } - - /** - * Number of instances notified about patch job. - * - * Generated from protobuf field int64 notified_instance_count = 3; - * @param int|string $var - * @return $this - */ - public function setNotifiedInstanceCount($var) - { - GPBUtil::checkInt64($var); - $this->notified_instance_count = $var; - - return $this; - } - - /** - * Number of instances that have started. - * - * Generated from protobuf field int64 started_instance_count = 4; - * @return int|string - */ - public function getStartedInstanceCount() - { - return $this->started_instance_count; - } - - /** - * Number of instances that have started. - * - * Generated from protobuf field int64 started_instance_count = 4; - * @param int|string $var - * @return $this - */ - public function setStartedInstanceCount($var) - { - GPBUtil::checkInt64($var); - $this->started_instance_count = $var; - - return $this; - } - - /** - * Number of instances that are downloading patches. - * - * Generated from protobuf field int64 downloading_patches_instance_count = 5; - * @return int|string - */ - public function getDownloadingPatchesInstanceCount() - { - return $this->downloading_patches_instance_count; - } - - /** - * Number of instances that are downloading patches. - * - * Generated from protobuf field int64 downloading_patches_instance_count = 5; - * @param int|string $var - * @return $this - */ - public function setDownloadingPatchesInstanceCount($var) - { - GPBUtil::checkInt64($var); - $this->downloading_patches_instance_count = $var; - - return $this; - } - - /** - * Number of instances that are applying patches. - * - * Generated from protobuf field int64 applying_patches_instance_count = 6; - * @return int|string - */ - public function getApplyingPatchesInstanceCount() - { - return $this->applying_patches_instance_count; - } - - /** - * Number of instances that are applying patches. - * - * Generated from protobuf field int64 applying_patches_instance_count = 6; - * @param int|string $var - * @return $this - */ - public function setApplyingPatchesInstanceCount($var) - { - GPBUtil::checkInt64($var); - $this->applying_patches_instance_count = $var; - - return $this; - } - - /** - * Number of instances rebooting. - * - * Generated from protobuf field int64 rebooting_instance_count = 7; - * @return int|string - */ - public function getRebootingInstanceCount() - { - return $this->rebooting_instance_count; - } - - /** - * Number of instances rebooting. - * - * Generated from protobuf field int64 rebooting_instance_count = 7; - * @param int|string $var - * @return $this - */ - public function setRebootingInstanceCount($var) - { - GPBUtil::checkInt64($var); - $this->rebooting_instance_count = $var; - - return $this; - } - - /** - * Number of instances that have completed successfully. - * - * Generated from protobuf field int64 succeeded_instance_count = 8; - * @return int|string - */ - public function getSucceededInstanceCount() - { - return $this->succeeded_instance_count; - } - - /** - * Number of instances that have completed successfully. - * - * Generated from protobuf field int64 succeeded_instance_count = 8; - * @param int|string $var - * @return $this - */ - public function setSucceededInstanceCount($var) - { - GPBUtil::checkInt64($var); - $this->succeeded_instance_count = $var; - - return $this; - } - - /** - * Number of instances that require reboot. - * - * Generated from protobuf field int64 succeeded_reboot_required_instance_count = 9; - * @return int|string - */ - public function getSucceededRebootRequiredInstanceCount() - { - return $this->succeeded_reboot_required_instance_count; - } - - /** - * Number of instances that require reboot. - * - * Generated from protobuf field int64 succeeded_reboot_required_instance_count = 9; - * @param int|string $var - * @return $this - */ - public function setSucceededRebootRequiredInstanceCount($var) - { - GPBUtil::checkInt64($var); - $this->succeeded_reboot_required_instance_count = $var; - - return $this; - } - - /** - * Number of instances that failed. - * - * Generated from protobuf field int64 failed_instance_count = 10; - * @return int|string - */ - public function getFailedInstanceCount() - { - return $this->failed_instance_count; - } - - /** - * Number of instances that failed. - * - * Generated from protobuf field int64 failed_instance_count = 10; - * @param int|string $var - * @return $this - */ - public function setFailedInstanceCount($var) - { - GPBUtil::checkInt64($var); - $this->failed_instance_count = $var; - - return $this; - } - - /** - * Number of instances that have acked and will start shortly. - * - * Generated from protobuf field int64 acked_instance_count = 11; - * @return int|string - */ - public function getAckedInstanceCount() - { - return $this->acked_instance_count; - } - - /** - * Number of instances that have acked and will start shortly. - * - * Generated from protobuf field int64 acked_instance_count = 11; - * @param int|string $var - * @return $this - */ - public function setAckedInstanceCount($var) - { - GPBUtil::checkInt64($var); - $this->acked_instance_count = $var; - - return $this; - } - - /** - * Number of instances that exceeded the time out while applying the patch. - * - * Generated from protobuf field int64 timed_out_instance_count = 12; - * @return int|string - */ - public function getTimedOutInstanceCount() - { - return $this->timed_out_instance_count; - } - - /** - * Number of instances that exceeded the time out while applying the patch. - * - * Generated from protobuf field int64 timed_out_instance_count = 12; - * @param int|string $var - * @return $this - */ - public function setTimedOutInstanceCount($var) - { - GPBUtil::checkInt64($var); - $this->timed_out_instance_count = $var; - - return $this; - } - - /** - * Number of instances that are running the pre-patch step. - * - * Generated from protobuf field int64 pre_patch_step_instance_count = 13; - * @return int|string - */ - public function getPrePatchStepInstanceCount() - { - return $this->pre_patch_step_instance_count; - } - - /** - * Number of instances that are running the pre-patch step. - * - * Generated from protobuf field int64 pre_patch_step_instance_count = 13; - * @param int|string $var - * @return $this - */ - public function setPrePatchStepInstanceCount($var) - { - GPBUtil::checkInt64($var); - $this->pre_patch_step_instance_count = $var; - - return $this; - } - - /** - * Number of instances that are running the post-patch step. - * - * Generated from protobuf field int64 post_patch_step_instance_count = 14; - * @return int|string - */ - public function getPostPatchStepInstanceCount() - { - return $this->post_patch_step_instance_count; - } - - /** - * Number of instances that are running the post-patch step. - * - * Generated from protobuf field int64 post_patch_step_instance_count = 14; - * @param int|string $var - * @return $this - */ - public function setPostPatchStepInstanceCount($var) - { - GPBUtil::checkInt64($var); - $this->post_patch_step_instance_count = $var; - - return $this; - } - - /** - * Number of instances that do not appear to be running the agent. Check to - * ensure that the agent is installed, running, and able to communicate with - * the service. - * - * Generated from protobuf field int64 no_agent_detected_instance_count = 15; - * @return int|string - */ - public function getNoAgentDetectedInstanceCount() - { - return $this->no_agent_detected_instance_count; - } - - /** - * Number of instances that do not appear to be running the agent. Check to - * ensure that the agent is installed, running, and able to communicate with - * the service. - * - * Generated from protobuf field int64 no_agent_detected_instance_count = 15; - * @param int|string $var - * @return $this - */ - public function setNoAgentDetectedInstanceCount($var) - { - GPBUtil::checkInt64($var); - $this->no_agent_detected_instance_count = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(InstanceDetailsSummary::class, \Google\Cloud\OsConfig\V1\PatchJob_InstanceDetailsSummary::class); - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PatchJob/State.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PatchJob/State.php deleted file mode 100644 index 3e8662e82774..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PatchJob/State.php +++ /dev/null @@ -1,100 +0,0 @@ -google.cloud.osconfig.v1.PatchJob.State - */ -class State -{ - /** - * State must be specified. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The patch job was successfully initiated. - * - * Generated from protobuf enum STARTED = 1; - */ - const STARTED = 1; - /** - * The patch job is looking up instances to run the patch on. - * - * Generated from protobuf enum INSTANCE_LOOKUP = 2; - */ - const INSTANCE_LOOKUP = 2; - /** - * Instances are being patched. - * - * Generated from protobuf enum PATCHING = 3; - */ - const PATCHING = 3; - /** - * Patch job completed successfully. - * - * Generated from protobuf enum SUCCEEDED = 4; - */ - const SUCCEEDED = 4; - /** - * Patch job completed but there were errors. - * - * Generated from protobuf enum COMPLETED_WITH_ERRORS = 5; - */ - const COMPLETED_WITH_ERRORS = 5; - /** - * The patch job was canceled. - * - * Generated from protobuf enum CANCELED = 6; - */ - const CANCELED = 6; - /** - * The patch job timed out. - * - * Generated from protobuf enum TIMED_OUT = 7; - */ - const TIMED_OUT = 7; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::STARTED => 'STARTED', - self::INSTANCE_LOOKUP => 'INSTANCE_LOOKUP', - self::PATCHING => 'PATCHING', - self::SUCCEEDED => 'SUCCEEDED', - self::COMPLETED_WITH_ERRORS => 'COMPLETED_WITH_ERRORS', - self::CANCELED => 'CANCELED', - self::TIMED_OUT => 'TIMED_OUT', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\OsConfig\V1\PatchJob_State::class); - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PatchJobInstanceDetails.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PatchJobInstanceDetails.php deleted file mode 100644 index 6fa552d169e6..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PatchJobInstanceDetails.php +++ /dev/null @@ -1,210 +0,0 @@ -google.cloud.osconfig.v1.PatchJobInstanceDetails - */ -class PatchJobInstanceDetails extends \Google\Protobuf\Internal\Message -{ - /** - * The instance name in the form `projects/*/zones/*/instances/*` - * - * Generated from protobuf field string name = 1 [(.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * The unique identifier for the instance. This identifier is - * defined by the server. - * - * Generated from protobuf field string instance_system_id = 2; - */ - protected $instance_system_id = ''; - /** - * Current state of instance patch. - * - * Generated from protobuf field .google.cloud.osconfig.v1.Instance.PatchState state = 3; - */ - protected $state = 0; - /** - * If the patch fails, this field provides the reason. - * - * Generated from protobuf field string failure_reason = 4; - */ - protected $failure_reason = ''; - /** - * The number of times the agent that the agent attempts to apply the patch. - * - * Generated from protobuf field int64 attempt_count = 5; - */ - protected $attempt_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The instance name in the form `projects/*/zones/*/instances/*` - * @type string $instance_system_id - * The unique identifier for the instance. This identifier is - * defined by the server. - * @type int $state - * Current state of instance patch. - * @type string $failure_reason - * If the patch fails, this field provides the reason. - * @type int|string $attempt_count - * The number of times the agent that the agent attempts to apply the patch. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\PatchJobs::initOnce(); - parent::__construct($data); - } - - /** - * The instance name in the form `projects/*/zones/*/instances/*` - * - * Generated from protobuf field string name = 1 [(.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The instance name in the form `projects/*/zones/*/instances/*` - * - * Generated from protobuf field string name = 1 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The unique identifier for the instance. This identifier is - * defined by the server. - * - * Generated from protobuf field string instance_system_id = 2; - * @return string - */ - public function getInstanceSystemId() - { - return $this->instance_system_id; - } - - /** - * The unique identifier for the instance. This identifier is - * defined by the server. - * - * Generated from protobuf field string instance_system_id = 2; - * @param string $var - * @return $this - */ - public function setInstanceSystemId($var) - { - GPBUtil::checkString($var, True); - $this->instance_system_id = $var; - - return $this; - } - - /** - * Current state of instance patch. - * - * Generated from protobuf field .google.cloud.osconfig.v1.Instance.PatchState state = 3; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Current state of instance patch. - * - * Generated from protobuf field .google.cloud.osconfig.v1.Instance.PatchState state = 3; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\OsConfig\V1\Instance\PatchState::class); - $this->state = $var; - - return $this; - } - - /** - * If the patch fails, this field provides the reason. - * - * Generated from protobuf field string failure_reason = 4; - * @return string - */ - public function getFailureReason() - { - return $this->failure_reason; - } - - /** - * If the patch fails, this field provides the reason. - * - * Generated from protobuf field string failure_reason = 4; - * @param string $var - * @return $this - */ - public function setFailureReason($var) - { - GPBUtil::checkString($var, True); - $this->failure_reason = $var; - - return $this; - } - - /** - * The number of times the agent that the agent attempts to apply the patch. - * - * Generated from protobuf field int64 attempt_count = 5; - * @return int|string - */ - public function getAttemptCount() - { - return $this->attempt_count; - } - - /** - * The number of times the agent that the agent attempts to apply the patch. - * - * Generated from protobuf field int64 attempt_count = 5; - * @param int|string $var - * @return $this - */ - public function setAttemptCount($var) - { - GPBUtil::checkInt64($var); - $this->attempt_count = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PatchRollout.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PatchRollout.php deleted file mode 100644 index 3cc4ed4b6103..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PatchRollout.php +++ /dev/null @@ -1,184 +0,0 @@ -google.cloud.osconfig.v1.PatchRollout - */ -class PatchRollout extends \Google\Protobuf\Internal\Message -{ - /** - * Mode of the patch rollout. - * - * Generated from protobuf field .google.cloud.osconfig.v1.PatchRollout.Mode mode = 1; - */ - protected $mode = 0; - /** - * The maximum number (or percentage) of VMs per zone to disrupt at any given - * moment. The number of VMs calculated from multiplying the percentage by the - * total number of VMs in a zone is rounded up. - * During patching, a VM is considered disrupted from the time the agent is - * notified to begin until patching has completed. This disruption time - * includes the time to complete reboot and any post-patch steps. - * A VM contributes to the disruption budget if its patching operation fails - * either when applying the patches, running pre or post patch steps, or if it - * fails to respond with a success notification before timing out. VMs that - * are not running or do not have an active agent do not count toward this - * disruption budget. - * For zone-by-zone rollouts, if the disruption budget in a zone is exceeded, - * the patch job stops, because continuing to the next zone requires - * completion of the patch process in the previous zone. - * For example, if the disruption budget has a fixed value of `10`, and 8 VMs - * fail to patch in the current zone, the patch job continues to patch 2 VMs - * at a time until the zone is completed. When that zone is completed - * successfully, patching begins with 10 VMs at a time in the next zone. If 10 - * VMs in the next zone fail to patch, the patch job stops. - * - * Generated from protobuf field .google.cloud.osconfig.v1.FixedOrPercent disruption_budget = 2; - */ - protected $disruption_budget = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $mode - * Mode of the patch rollout. - * @type \Google\Cloud\OsConfig\V1\FixedOrPercent $disruption_budget - * The maximum number (or percentage) of VMs per zone to disrupt at any given - * moment. The number of VMs calculated from multiplying the percentage by the - * total number of VMs in a zone is rounded up. - * During patching, a VM is considered disrupted from the time the agent is - * notified to begin until patching has completed. This disruption time - * includes the time to complete reboot and any post-patch steps. - * A VM contributes to the disruption budget if its patching operation fails - * either when applying the patches, running pre or post patch steps, or if it - * fails to respond with a success notification before timing out. VMs that - * are not running or do not have an active agent do not count toward this - * disruption budget. - * For zone-by-zone rollouts, if the disruption budget in a zone is exceeded, - * the patch job stops, because continuing to the next zone requires - * completion of the patch process in the previous zone. - * For example, if the disruption budget has a fixed value of `10`, and 8 VMs - * fail to patch in the current zone, the patch job continues to patch 2 VMs - * at a time until the zone is completed. When that zone is completed - * successfully, patching begins with 10 VMs at a time in the next zone. If 10 - * VMs in the next zone fail to patch, the patch job stops. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\PatchJobs::initOnce(); - parent::__construct($data); - } - - /** - * Mode of the patch rollout. - * - * Generated from protobuf field .google.cloud.osconfig.v1.PatchRollout.Mode mode = 1; - * @return int - */ - public function getMode() - { - return $this->mode; - } - - /** - * Mode of the patch rollout. - * - * Generated from protobuf field .google.cloud.osconfig.v1.PatchRollout.Mode mode = 1; - * @param int $var - * @return $this - */ - public function setMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\OsConfig\V1\PatchRollout\Mode::class); - $this->mode = $var; - - return $this; - } - - /** - * The maximum number (or percentage) of VMs per zone to disrupt at any given - * moment. The number of VMs calculated from multiplying the percentage by the - * total number of VMs in a zone is rounded up. - * During patching, a VM is considered disrupted from the time the agent is - * notified to begin until patching has completed. This disruption time - * includes the time to complete reboot and any post-patch steps. - * A VM contributes to the disruption budget if its patching operation fails - * either when applying the patches, running pre or post patch steps, or if it - * fails to respond with a success notification before timing out. VMs that - * are not running or do not have an active agent do not count toward this - * disruption budget. - * For zone-by-zone rollouts, if the disruption budget in a zone is exceeded, - * the patch job stops, because continuing to the next zone requires - * completion of the patch process in the previous zone. - * For example, if the disruption budget has a fixed value of `10`, and 8 VMs - * fail to patch in the current zone, the patch job continues to patch 2 VMs - * at a time until the zone is completed. When that zone is completed - * successfully, patching begins with 10 VMs at a time in the next zone. If 10 - * VMs in the next zone fail to patch, the patch job stops. - * - * Generated from protobuf field .google.cloud.osconfig.v1.FixedOrPercent disruption_budget = 2; - * @return \Google\Cloud\OsConfig\V1\FixedOrPercent|null - */ - public function getDisruptionBudget() - { - return $this->disruption_budget; - } - - public function hasDisruptionBudget() - { - return isset($this->disruption_budget); - } - - public function clearDisruptionBudget() - { - unset($this->disruption_budget); - } - - /** - * The maximum number (or percentage) of VMs per zone to disrupt at any given - * moment. The number of VMs calculated from multiplying the percentage by the - * total number of VMs in a zone is rounded up. - * During patching, a VM is considered disrupted from the time the agent is - * notified to begin until patching has completed. This disruption time - * includes the time to complete reboot and any post-patch steps. - * A VM contributes to the disruption budget if its patching operation fails - * either when applying the patches, running pre or post patch steps, or if it - * fails to respond with a success notification before timing out. VMs that - * are not running or do not have an active agent do not count toward this - * disruption budget. - * For zone-by-zone rollouts, if the disruption budget in a zone is exceeded, - * the patch job stops, because continuing to the next zone requires - * completion of the patch process in the previous zone. - * For example, if the disruption budget has a fixed value of `10`, and 8 VMs - * fail to patch in the current zone, the patch job continues to patch 2 VMs - * at a time until the zone is completed. When that zone is completed - * successfully, patching begins with 10 VMs at a time in the next zone. If 10 - * VMs in the next zone fail to patch, the patch job stops. - * - * Generated from protobuf field .google.cloud.osconfig.v1.FixedOrPercent disruption_budget = 2; - * @param \Google\Cloud\OsConfig\V1\FixedOrPercent $var - * @return $this - */ - public function setDisruptionBudget($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\FixedOrPercent::class); - $this->disruption_budget = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PatchRollout/Mode.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PatchRollout/Mode.php deleted file mode 100644 index 91da69901a93..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PatchRollout/Mode.php +++ /dev/null @@ -1,69 +0,0 @@ -google.cloud.osconfig.v1.PatchRollout.Mode - */ -class Mode -{ - /** - * Mode must be specified. - * - * Generated from protobuf enum MODE_UNSPECIFIED = 0; - */ - const MODE_UNSPECIFIED = 0; - /** - * Patches are applied one zone at a time. The patch job begins in the - * region with the lowest number of targeted VMs. Within the region, - * patching begins in the zone with the lowest number of targeted VMs. If - * multiple regions (or zones within a region) have the same number of - * targeted VMs, a tie-breaker is achieved by sorting the regions or zones - * in alphabetical order. - * - * Generated from protobuf enum ZONE_BY_ZONE = 1; - */ - const ZONE_BY_ZONE = 1; - /** - * Patches are applied to VMs in all zones at the same time. - * - * Generated from protobuf enum CONCURRENT_ZONES = 2; - */ - const CONCURRENT_ZONES = 2; - - private static $valueToName = [ - self::MODE_UNSPECIFIED => 'MODE_UNSPECIFIED', - self::ZONE_BY_ZONE => 'ZONE_BY_ZONE', - self::CONCURRENT_ZONES => 'CONCURRENT_ZONES', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Mode::class, \Google\Cloud\OsConfig\V1\PatchRollout_Mode::class); - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PausePatchDeploymentRequest.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PausePatchDeploymentRequest.php deleted file mode 100644 index c8b8a56b512b..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/PausePatchDeploymentRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.osconfig.v1.PausePatchDeploymentRequest - */ -class PausePatchDeploymentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the patch deployment in the form - * `projects/*/patchDeployments/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The resource name of the patch deployment in the form - * `projects/*/patchDeployments/*`. Please see - * {@see OsConfigServiceClient::patchDeploymentName()} for help formatting this field. - * - * @return \Google\Cloud\OsConfig\V1\PausePatchDeploymentRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the patch deployment in the form - * `projects/*/patchDeployments/*`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\PatchDeployments::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the patch deployment in the form - * `projects/*/patchDeployments/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the patch deployment in the form - * `projects/*/patchDeployments/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/RecurringSchedule.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/RecurringSchedule.php deleted file mode 100644 index d8a873ab6c48..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/RecurringSchedule.php +++ /dev/null @@ -1,418 +0,0 @@ -google.cloud.osconfig.v1.RecurringSchedule - */ -class RecurringSchedule extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Defines the time zone that `time_of_day` is relative to. - * The rules for daylight saving time are determined by the chosen time zone. - * - * Generated from protobuf field .google.type.TimeZone time_zone = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $time_zone = null; - /** - * Optional. The time that the recurring schedule becomes effective. - * Defaults to `create_time` of the patch deployment. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $start_time = null; - /** - * Optional. The end time at which a recurring patch deployment schedule is no - * longer active. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $end_time = null; - /** - * Required. Time of the day to run a recurring deployment. - * - * Generated from protobuf field .google.type.TimeOfDay time_of_day = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $time_of_day = null; - /** - * Required. The frequency unit of this recurring schedule. - * - * Generated from protobuf field .google.cloud.osconfig.v1.RecurringSchedule.Frequency frequency = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $frequency = 0; - /** - * Output only. The time the last patch job ran successfully. - * - * Generated from protobuf field .google.protobuf.Timestamp last_execute_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $last_execute_time = null; - /** - * Output only. The time the next patch job is scheduled to run. - * - * Generated from protobuf field .google.protobuf.Timestamp next_execute_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $next_execute_time = null; - protected $schedule_config; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Type\TimeZone $time_zone - * Required. Defines the time zone that `time_of_day` is relative to. - * The rules for daylight saving time are determined by the chosen time zone. - * @type \Google\Protobuf\Timestamp $start_time - * Optional. The time that the recurring schedule becomes effective. - * Defaults to `create_time` of the patch deployment. - * @type \Google\Protobuf\Timestamp $end_time - * Optional. The end time at which a recurring patch deployment schedule is no - * longer active. - * @type \Google\Type\TimeOfDay $time_of_day - * Required. Time of the day to run a recurring deployment. - * @type int $frequency - * Required. The frequency unit of this recurring schedule. - * @type \Google\Cloud\OsConfig\V1\WeeklySchedule $weekly - * Required. Schedule with weekly executions. - * @type \Google\Cloud\OsConfig\V1\MonthlySchedule $monthly - * Required. Schedule with monthly executions. - * @type \Google\Protobuf\Timestamp $last_execute_time - * Output only. The time the last patch job ran successfully. - * @type \Google\Protobuf\Timestamp $next_execute_time - * Output only. The time the next patch job is scheduled to run. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\PatchDeployments::initOnce(); - parent::__construct($data); - } - - /** - * Required. Defines the time zone that `time_of_day` is relative to. - * The rules for daylight saving time are determined by the chosen time zone. - * - * Generated from protobuf field .google.type.TimeZone time_zone = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Type\TimeZone|null - */ - public function getTimeZone() - { - return $this->time_zone; - } - - public function hasTimeZone() - { - return isset($this->time_zone); - } - - public function clearTimeZone() - { - unset($this->time_zone); - } - - /** - * Required. Defines the time zone that `time_of_day` is relative to. - * The rules for daylight saving time are determined by the chosen time zone. - * - * Generated from protobuf field .google.type.TimeZone time_zone = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Type\TimeZone $var - * @return $this - */ - public function setTimeZone($var) - { - GPBUtil::checkMessage($var, \Google\Type\TimeZone::class); - $this->time_zone = $var; - - return $this; - } - - /** - * Optional. The time that the recurring schedule becomes effective. - * Defaults to `create_time` of the patch deployment. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStartTime() - { - return $this->start_time; - } - - public function hasStartTime() - { - return isset($this->start_time); - } - - public function clearStartTime() - { - unset($this->start_time); - } - - /** - * Optional. The time that the recurring schedule becomes effective. - * Defaults to `create_time` of the patch deployment. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * Optional. The end time at which a recurring patch deployment schedule is no - * longer active. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * Optional. The end time at which a recurring patch deployment schedule is no - * longer active. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * Required. Time of the day to run a recurring deployment. - * - * Generated from protobuf field .google.type.TimeOfDay time_of_day = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Type\TimeOfDay|null - */ - public function getTimeOfDay() - { - return $this->time_of_day; - } - - public function hasTimeOfDay() - { - return isset($this->time_of_day); - } - - public function clearTimeOfDay() - { - unset($this->time_of_day); - } - - /** - * Required. Time of the day to run a recurring deployment. - * - * Generated from protobuf field .google.type.TimeOfDay time_of_day = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Type\TimeOfDay $var - * @return $this - */ - public function setTimeOfDay($var) - { - GPBUtil::checkMessage($var, \Google\Type\TimeOfDay::class); - $this->time_of_day = $var; - - return $this; - } - - /** - * Required. The frequency unit of this recurring schedule. - * - * Generated from protobuf field .google.cloud.osconfig.v1.RecurringSchedule.Frequency frequency = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getFrequency() - { - return $this->frequency; - } - - /** - * Required. The frequency unit of this recurring schedule. - * - * Generated from protobuf field .google.cloud.osconfig.v1.RecurringSchedule.Frequency frequency = 5 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setFrequency($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\OsConfig\V1\RecurringSchedule\Frequency::class); - $this->frequency = $var; - - return $this; - } - - /** - * Required. Schedule with weekly executions. - * - * Generated from protobuf field .google.cloud.osconfig.v1.WeeklySchedule weekly = 6 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\OsConfig\V1\WeeklySchedule|null - */ - public function getWeekly() - { - return $this->readOneof(6); - } - - public function hasWeekly() - { - return $this->hasOneof(6); - } - - /** - * Required. Schedule with weekly executions. - * - * Generated from protobuf field .google.cloud.osconfig.v1.WeeklySchedule weekly = 6 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\OsConfig\V1\WeeklySchedule $var - * @return $this - */ - public function setWeekly($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\WeeklySchedule::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * Required. Schedule with monthly executions. - * - * Generated from protobuf field .google.cloud.osconfig.v1.MonthlySchedule monthly = 7 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\OsConfig\V1\MonthlySchedule|null - */ - public function getMonthly() - { - return $this->readOneof(7); - } - - public function hasMonthly() - { - return $this->hasOneof(7); - } - - /** - * Required. Schedule with monthly executions. - * - * Generated from protobuf field .google.cloud.osconfig.v1.MonthlySchedule monthly = 7 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\OsConfig\V1\MonthlySchedule $var - * @return $this - */ - public function setMonthly($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\MonthlySchedule::class); - $this->writeOneof(7, $var); - - return $this; - } - - /** - * Output only. The time the last patch job ran successfully. - * - * Generated from protobuf field .google.protobuf.Timestamp last_execute_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getLastExecuteTime() - { - return $this->last_execute_time; - } - - public function hasLastExecuteTime() - { - return isset($this->last_execute_time); - } - - public function clearLastExecuteTime() - { - unset($this->last_execute_time); - } - - /** - * Output only. The time the last patch job ran successfully. - * - * Generated from protobuf field .google.protobuf.Timestamp last_execute_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setLastExecuteTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->last_execute_time = $var; - - return $this; - } - - /** - * Output only. The time the next patch job is scheduled to run. - * - * Generated from protobuf field .google.protobuf.Timestamp next_execute_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getNextExecuteTime() - { - return $this->next_execute_time; - } - - public function hasNextExecuteTime() - { - return isset($this->next_execute_time); - } - - public function clearNextExecuteTime() - { - unset($this->next_execute_time); - } - - /** - * Output only. The time the next patch job is scheduled to run. - * - * Generated from protobuf field .google.protobuf.Timestamp next_execute_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setNextExecuteTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->next_execute_time = $var; - - return $this; - } - - /** - * @return string - */ - public function getScheduleConfig() - { - return $this->whichOneof("schedule_config"); - } - -} - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/RecurringSchedule/Frequency.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/RecurringSchedule/Frequency.php deleted file mode 100644 index 790abdbd75ac..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/RecurringSchedule/Frequency.php +++ /dev/null @@ -1,74 +0,0 @@ -google.cloud.osconfig.v1.RecurringSchedule.Frequency - */ -class Frequency -{ - /** - * Invalid. A frequency must be specified. - * - * Generated from protobuf enum FREQUENCY_UNSPECIFIED = 0; - */ - const FREQUENCY_UNSPECIFIED = 0; - /** - * Indicates that the frequency of recurrence should be expressed in terms - * of weeks. - * - * Generated from protobuf enum WEEKLY = 1; - */ - const WEEKLY = 1; - /** - * Indicates that the frequency of recurrence should be expressed in terms - * of months. - * - * Generated from protobuf enum MONTHLY = 2; - */ - const MONTHLY = 2; - /** - * Indicates that the frequency of recurrence should be expressed in terms - * of days. - * - * Generated from protobuf enum DAILY = 3; - */ - const DAILY = 3; - - private static $valueToName = [ - self::FREQUENCY_UNSPECIFIED => 'FREQUENCY_UNSPECIFIED', - self::WEEKLY => 'WEEKLY', - self::MONTHLY => 'MONTHLY', - self::DAILY => 'DAILY', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Frequency::class, \Google\Cloud\OsConfig\V1\RecurringSchedule_Frequency::class); - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ResumePatchDeploymentRequest.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ResumePatchDeploymentRequest.php deleted file mode 100644 index 08fcc27a915f..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ResumePatchDeploymentRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.osconfig.v1.ResumePatchDeploymentRequest - */ -class ResumePatchDeploymentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the patch deployment in the form - * `projects/*/patchDeployments/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The resource name of the patch deployment in the form - * `projects/*/patchDeployments/*`. Please see - * {@see OsConfigServiceClient::patchDeploymentName()} for help formatting this field. - * - * @return \Google\Cloud\OsConfig\V1\ResumePatchDeploymentRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the patch deployment in the form - * `projects/*/patchDeployments/*`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\PatchDeployments::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the patch deployment in the form - * `projects/*/patchDeployments/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the patch deployment in the form - * `projects/*/patchDeployments/*`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/UpdateOSPolicyAssignmentRequest.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/UpdateOSPolicyAssignmentRequest.php deleted file mode 100644 index 0fb7755dbd4d..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/UpdateOSPolicyAssignmentRequest.php +++ /dev/null @@ -1,141 +0,0 @@ -google.cloud.osconfig.v1.UpdateOSPolicyAssignmentRequest - */ -class UpdateOSPolicyAssignmentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The updated OS policy assignment. - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicyAssignment os_policy_assignment = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $os_policy_assignment = null; - /** - * Optional. Field mask that controls which fields of the assignment should be - * updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\OsConfig\V1\OSPolicyAssignment $osPolicyAssignment Required. The updated OS policy assignment. - * @param \Google\Protobuf\FieldMask $updateMask Optional. Field mask that controls which fields of the assignment should be - * updated. - * - * @return \Google\Cloud\OsConfig\V1\UpdateOSPolicyAssignmentRequest - * - * @experimental - */ - public static function build(\Google\Cloud\OsConfig\V1\OSPolicyAssignment $osPolicyAssignment, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setOsPolicyAssignment($osPolicyAssignment) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\OsConfig\V1\OSPolicyAssignment $os_policy_assignment - * Required. The updated OS policy assignment. - * @type \Google\Protobuf\FieldMask $update_mask - * Optional. Field mask that controls which fields of the assignment should be - * updated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\OsPolicyAssignments::initOnce(); - parent::__construct($data); - } - - /** - * Required. The updated OS policy assignment. - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicyAssignment os_policy_assignment = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\OsConfig\V1\OSPolicyAssignment|null - */ - public function getOsPolicyAssignment() - { - return $this->os_policy_assignment; - } - - public function hasOsPolicyAssignment() - { - return isset($this->os_policy_assignment); - } - - public function clearOsPolicyAssignment() - { - unset($this->os_policy_assignment); - } - - /** - * Required. The updated OS policy assignment. - * - * Generated from protobuf field .google.cloud.osconfig.v1.OSPolicyAssignment os_policy_assignment = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\OsConfig\V1\OSPolicyAssignment $var - * @return $this - */ - public function setOsPolicyAssignment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\OSPolicyAssignment::class); - $this->os_policy_assignment = $var; - - return $this; - } - - /** - * Optional. Field mask that controls which fields of the assignment should be - * updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Optional. Field mask that controls which fields of the assignment should be - * updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/UpdatePatchDeploymentRequest.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/UpdatePatchDeploymentRequest.php deleted file mode 100644 index fdcd8821bb29..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/UpdatePatchDeploymentRequest.php +++ /dev/null @@ -1,141 +0,0 @@ -google.cloud.osconfig.v1.UpdatePatchDeploymentRequest - */ -class UpdatePatchDeploymentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The patch deployment to Update. - * - * Generated from protobuf field .google.cloud.osconfig.v1.PatchDeployment patch_deployment = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $patch_deployment = null; - /** - * Optional. Field mask that controls which fields of the patch deployment - * should be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\OsConfig\V1\PatchDeployment $patchDeployment Required. The patch deployment to Update. - * @param \Google\Protobuf\FieldMask $updateMask Optional. Field mask that controls which fields of the patch deployment - * should be updated. - * - * @return \Google\Cloud\OsConfig\V1\UpdatePatchDeploymentRequest - * - * @experimental - */ - public static function build(\Google\Cloud\OsConfig\V1\PatchDeployment $patchDeployment, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setPatchDeployment($patchDeployment) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\OsConfig\V1\PatchDeployment $patch_deployment - * Required. The patch deployment to Update. - * @type \Google\Protobuf\FieldMask $update_mask - * Optional. Field mask that controls which fields of the patch deployment - * should be updated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\PatchDeployments::initOnce(); - parent::__construct($data); - } - - /** - * Required. The patch deployment to Update. - * - * Generated from protobuf field .google.cloud.osconfig.v1.PatchDeployment patch_deployment = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\OsConfig\V1\PatchDeployment|null - */ - public function getPatchDeployment() - { - return $this->patch_deployment; - } - - public function hasPatchDeployment() - { - return isset($this->patch_deployment); - } - - public function clearPatchDeployment() - { - unset($this->patch_deployment); - } - - /** - * Required. The patch deployment to Update. - * - * Generated from protobuf field .google.cloud.osconfig.v1.PatchDeployment patch_deployment = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\OsConfig\V1\PatchDeployment $var - * @return $this - */ - public function setPatchDeployment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\PatchDeployment::class); - $this->patch_deployment = $var; - - return $this; - } - - /** - * Optional. Field mask that controls which fields of the patch deployment - * should be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Optional. Field mask that controls which fields of the patch deployment - * should be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/VulnerabilityReport.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/VulnerabilityReport.php deleted file mode 100644 index 44ac2be6bef7..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/VulnerabilityReport.php +++ /dev/null @@ -1,160 +0,0 @@ -google.cloud.osconfig.v1.VulnerabilityReport - */ -class VulnerabilityReport extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The `vulnerabilityReport` API resource name. - * Format: - * `projects/{project_number}/locations/{location}/instances/{instance_id}/vulnerabilityReport` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. List of vulnerabilities affecting the VM. - * - * Generated from protobuf field repeated .google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability vulnerabilities = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $vulnerabilities; - /** - * Output only. The timestamp for when the last vulnerability report was generated for the - * VM. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The `vulnerabilityReport` API resource name. - * Format: - * `projects/{project_number}/locations/{location}/instances/{instance_id}/vulnerabilityReport` - * @type array<\Google\Cloud\OsConfig\V1\VulnerabilityReport\Vulnerability>|\Google\Protobuf\Internal\RepeatedField $vulnerabilities - * Output only. List of vulnerabilities affecting the VM. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The timestamp for when the last vulnerability report was generated for the - * VM. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\Vulnerability::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The `vulnerabilityReport` API resource name. - * Format: - * `projects/{project_number}/locations/{location}/instances/{instance_id}/vulnerabilityReport` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The `vulnerabilityReport` API resource name. - * Format: - * `projects/{project_number}/locations/{location}/instances/{instance_id}/vulnerabilityReport` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. List of vulnerabilities affecting the VM. - * - * Generated from protobuf field repeated .google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability vulnerabilities = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getVulnerabilities() - { - return $this->vulnerabilities; - } - - /** - * Output only. List of vulnerabilities affecting the VM. - * - * Generated from protobuf field repeated .google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability vulnerabilities = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\OsConfig\V1\VulnerabilityReport\Vulnerability>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setVulnerabilities($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\OsConfig\V1\VulnerabilityReport\Vulnerability::class); - $this->vulnerabilities = $arr; - - return $this; - } - - /** - * Output only. The timestamp for when the last vulnerability report was generated for the - * VM. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The timestamp for when the last vulnerability report was generated for the - * VM. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/VulnerabilityReport/Vulnerability.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/VulnerabilityReport/Vulnerability.php deleted file mode 100644 index 1e51cba7df9d..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/VulnerabilityReport/Vulnerability.php +++ /dev/null @@ -1,320 +0,0 @@ -google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability - */ -class Vulnerability extends \Google\Protobuf\Internal\Message -{ - /** - * Contains metadata as per the upstream feed of the operating system and - * NVD. - * - * Generated from protobuf field .google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details details = 1; - */ - protected $details = null; - /** - * Corresponds to the `INSTALLED_PACKAGE` inventory item on the VM. - * This field displays the inventory items affected by this vulnerability. - * If the vulnerability report was not updated after the VM inventory - * update, these values might not display in VM inventory. For some distros, - * this field may be empty. - * - * Generated from protobuf field repeated string installed_inventory_item_ids = 2 [deprecated = true]; - * @deprecated - */ - private $installed_inventory_item_ids; - /** - * Corresponds to the `AVAILABLE_PACKAGE` inventory item on the VM. - * If the vulnerability report was not updated after the VM inventory - * update, these values might not display in VM inventory. If there is no - * available fix, the field is empty. The `inventory_item` value specifies - * the latest `SoftwarePackage` available to the VM that fixes the - * vulnerability. - * - * Generated from protobuf field repeated string available_inventory_item_ids = 3 [deprecated = true]; - * @deprecated - */ - private $available_inventory_item_ids; - /** - * The timestamp for when the vulnerability was first detected. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4; - */ - protected $create_time = null; - /** - * The timestamp for when the vulnerability was last modified. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 5; - */ - protected $update_time = null; - /** - * List of items affected by the vulnerability. - * - * Generated from protobuf field repeated .google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Item items = 6; - */ - private $items; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\OsConfig\V1\VulnerabilityReport\Vulnerability\Details $details - * Contains metadata as per the upstream feed of the operating system and - * NVD. - * @type array|\Google\Protobuf\Internal\RepeatedField $installed_inventory_item_ids - * Corresponds to the `INSTALLED_PACKAGE` inventory item on the VM. - * This field displays the inventory items affected by this vulnerability. - * If the vulnerability report was not updated after the VM inventory - * update, these values might not display in VM inventory. For some distros, - * this field may be empty. - * @type array|\Google\Protobuf\Internal\RepeatedField $available_inventory_item_ids - * Corresponds to the `AVAILABLE_PACKAGE` inventory item on the VM. - * If the vulnerability report was not updated after the VM inventory - * update, these values might not display in VM inventory. If there is no - * available fix, the field is empty. The `inventory_item` value specifies - * the latest `SoftwarePackage` available to the VM that fixes the - * vulnerability. - * @type \Google\Protobuf\Timestamp $create_time - * The timestamp for when the vulnerability was first detected. - * @type \Google\Protobuf\Timestamp $update_time - * The timestamp for when the vulnerability was last modified. - * @type array<\Google\Cloud\OsConfig\V1\VulnerabilityReport\Vulnerability\Item>|\Google\Protobuf\Internal\RepeatedField $items - * List of items affected by the vulnerability. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\Vulnerability::initOnce(); - parent::__construct($data); - } - - /** - * Contains metadata as per the upstream feed of the operating system and - * NVD. - * - * Generated from protobuf field .google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details details = 1; - * @return \Google\Cloud\OsConfig\V1\VulnerabilityReport\Vulnerability\Details|null - */ - public function getDetails() - { - return $this->details; - } - - public function hasDetails() - { - return isset($this->details); - } - - public function clearDetails() - { - unset($this->details); - } - - /** - * Contains metadata as per the upstream feed of the operating system and - * NVD. - * - * Generated from protobuf field .google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details details = 1; - * @param \Google\Cloud\OsConfig\V1\VulnerabilityReport\Vulnerability\Details $var - * @return $this - */ - public function setDetails($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\VulnerabilityReport\Vulnerability\Details::class); - $this->details = $var; - - return $this; - } - - /** - * Corresponds to the `INSTALLED_PACKAGE` inventory item on the VM. - * This field displays the inventory items affected by this vulnerability. - * If the vulnerability report was not updated after the VM inventory - * update, these values might not display in VM inventory. For some distros, - * this field may be empty. - * - * Generated from protobuf field repeated string installed_inventory_item_ids = 2 [deprecated = true]; - * @return \Google\Protobuf\Internal\RepeatedField - * @deprecated - */ - public function getInstalledInventoryItemIds() - { - @trigger_error('installed_inventory_item_ids is deprecated.', E_USER_DEPRECATED); - return $this->installed_inventory_item_ids; - } - - /** - * Corresponds to the `INSTALLED_PACKAGE` inventory item on the VM. - * This field displays the inventory items affected by this vulnerability. - * If the vulnerability report was not updated after the VM inventory - * update, these values might not display in VM inventory. For some distros, - * this field may be empty. - * - * Generated from protobuf field repeated string installed_inventory_item_ids = 2 [deprecated = true]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - * @deprecated - */ - public function setInstalledInventoryItemIds($var) - { - @trigger_error('installed_inventory_item_ids is deprecated.', E_USER_DEPRECATED); - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->installed_inventory_item_ids = $arr; - - return $this; - } - - /** - * Corresponds to the `AVAILABLE_PACKAGE` inventory item on the VM. - * If the vulnerability report was not updated after the VM inventory - * update, these values might not display in VM inventory. If there is no - * available fix, the field is empty. The `inventory_item` value specifies - * the latest `SoftwarePackage` available to the VM that fixes the - * vulnerability. - * - * Generated from protobuf field repeated string available_inventory_item_ids = 3 [deprecated = true]; - * @return \Google\Protobuf\Internal\RepeatedField - * @deprecated - */ - public function getAvailableInventoryItemIds() - { - @trigger_error('available_inventory_item_ids is deprecated.', E_USER_DEPRECATED); - return $this->available_inventory_item_ids; - } - - /** - * Corresponds to the `AVAILABLE_PACKAGE` inventory item on the VM. - * If the vulnerability report was not updated after the VM inventory - * update, these values might not display in VM inventory. If there is no - * available fix, the field is empty. The `inventory_item` value specifies - * the latest `SoftwarePackage` available to the VM that fixes the - * vulnerability. - * - * Generated from protobuf field repeated string available_inventory_item_ids = 3 [deprecated = true]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - * @deprecated - */ - public function setAvailableInventoryItemIds($var) - { - @trigger_error('available_inventory_item_ids is deprecated.', E_USER_DEPRECATED); - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->available_inventory_item_ids = $arr; - - return $this; - } - - /** - * The timestamp for when the vulnerability was first detected. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * The timestamp for when the vulnerability was first detected. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * The timestamp for when the vulnerability was last modified. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 5; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * The timestamp for when the vulnerability was last modified. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 5; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * List of items affected by the vulnerability. - * - * Generated from protobuf field repeated .google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Item items = 6; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getItems() - { - return $this->items; - } - - /** - * List of items affected by the vulnerability. - * - * Generated from protobuf field repeated .google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Item items = 6; - * @param array<\Google\Cloud\OsConfig\V1\VulnerabilityReport\Vulnerability\Item>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setItems($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\OsConfig\V1\VulnerabilityReport\Vulnerability\Item::class); - $this->items = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Vulnerability::class, \Google\Cloud\OsConfig\V1\VulnerabilityReport_Vulnerability::class); - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/VulnerabilityReport/Vulnerability/Details.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/VulnerabilityReport/Vulnerability/Details.php deleted file mode 100644 index 395df6446c9c..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/VulnerabilityReport/Vulnerability/Details.php +++ /dev/null @@ -1,263 +0,0 @@ -google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details - */ -class Details extends \Google\Protobuf\Internal\Message -{ - /** - * The CVE of the vulnerability. CVE cannot be - * empty and the combination of should be unique - * across vulnerabilities for a VM. - * - * Generated from protobuf field string cve = 1; - */ - protected $cve = ''; - /** - * The CVSS V2 score of this vulnerability. CVSS V2 score is on a scale of - * 0 - 10 where 0 indicates low severity and 10 indicates high severity. - * - * Generated from protobuf field float cvss_v2_score = 2; - */ - protected $cvss_v2_score = 0.0; - /** - * The full description of the CVSSv3 for this vulnerability from NVD. - * - * Generated from protobuf field .google.cloud.osconfig.v1.CVSSv3 cvss_v3 = 3; - */ - protected $cvss_v3 = null; - /** - * Assigned severity/impact ranking from the distro. - * - * Generated from protobuf field string severity = 4; - */ - protected $severity = ''; - /** - * The note or description describing the vulnerability from the distro. - * - * Generated from protobuf field string description = 5; - */ - protected $description = ''; - /** - * Corresponds to the references attached to the `VulnerabilityDetails`. - * - * Generated from protobuf field repeated .google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details.Reference references = 6; - */ - private $references; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $cve - * The CVE of the vulnerability. CVE cannot be - * empty and the combination of should be unique - * across vulnerabilities for a VM. - * @type float $cvss_v2_score - * The CVSS V2 score of this vulnerability. CVSS V2 score is on a scale of - * 0 - 10 where 0 indicates low severity and 10 indicates high severity. - * @type \Google\Cloud\OsConfig\V1\CVSSv3 $cvss_v3 - * The full description of the CVSSv3 for this vulnerability from NVD. - * @type string $severity - * Assigned severity/impact ranking from the distro. - * @type string $description - * The note or description describing the vulnerability from the distro. - * @type array<\Google\Cloud\OsConfig\V1\VulnerabilityReport\Vulnerability\Details\Reference>|\Google\Protobuf\Internal\RepeatedField $references - * Corresponds to the references attached to the `VulnerabilityDetails`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\Vulnerability::initOnce(); - parent::__construct($data); - } - - /** - * The CVE of the vulnerability. CVE cannot be - * empty and the combination of should be unique - * across vulnerabilities for a VM. - * - * Generated from protobuf field string cve = 1; - * @return string - */ - public function getCve() - { - return $this->cve; - } - - /** - * The CVE of the vulnerability. CVE cannot be - * empty and the combination of should be unique - * across vulnerabilities for a VM. - * - * Generated from protobuf field string cve = 1; - * @param string $var - * @return $this - */ - public function setCve($var) - { - GPBUtil::checkString($var, True); - $this->cve = $var; - - return $this; - } - - /** - * The CVSS V2 score of this vulnerability. CVSS V2 score is on a scale of - * 0 - 10 where 0 indicates low severity and 10 indicates high severity. - * - * Generated from protobuf field float cvss_v2_score = 2; - * @return float - */ - public function getCvssV2Score() - { - return $this->cvss_v2_score; - } - - /** - * The CVSS V2 score of this vulnerability. CVSS V2 score is on a scale of - * 0 - 10 where 0 indicates low severity and 10 indicates high severity. - * - * Generated from protobuf field float cvss_v2_score = 2; - * @param float $var - * @return $this - */ - public function setCvssV2Score($var) - { - GPBUtil::checkFloat($var); - $this->cvss_v2_score = $var; - - return $this; - } - - /** - * The full description of the CVSSv3 for this vulnerability from NVD. - * - * Generated from protobuf field .google.cloud.osconfig.v1.CVSSv3 cvss_v3 = 3; - * @return \Google\Cloud\OsConfig\V1\CVSSv3|null - */ - public function getCvssV3() - { - return $this->cvss_v3; - } - - public function hasCvssV3() - { - return isset($this->cvss_v3); - } - - public function clearCvssV3() - { - unset($this->cvss_v3); - } - - /** - * The full description of the CVSSv3 for this vulnerability from NVD. - * - * Generated from protobuf field .google.cloud.osconfig.v1.CVSSv3 cvss_v3 = 3; - * @param \Google\Cloud\OsConfig\V1\CVSSv3 $var - * @return $this - */ - public function setCvssV3($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OsConfig\V1\CVSSv3::class); - $this->cvss_v3 = $var; - - return $this; - } - - /** - * Assigned severity/impact ranking from the distro. - * - * Generated from protobuf field string severity = 4; - * @return string - */ - public function getSeverity() - { - return $this->severity; - } - - /** - * Assigned severity/impact ranking from the distro. - * - * Generated from protobuf field string severity = 4; - * @param string $var - * @return $this - */ - public function setSeverity($var) - { - GPBUtil::checkString($var, True); - $this->severity = $var; - - return $this; - } - - /** - * The note or description describing the vulnerability from the distro. - * - * Generated from protobuf field string description = 5; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * The note or description describing the vulnerability from the distro. - * - * Generated from protobuf field string description = 5; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Corresponds to the references attached to the `VulnerabilityDetails`. - * - * Generated from protobuf field repeated .google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details.Reference references = 6; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getReferences() - { - return $this->references; - } - - /** - * Corresponds to the references attached to the `VulnerabilityDetails`. - * - * Generated from protobuf field repeated .google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details.Reference references = 6; - * @param array<\Google\Cloud\OsConfig\V1\VulnerabilityReport\Vulnerability\Details\Reference>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setReferences($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\OsConfig\V1\VulnerabilityReport\Vulnerability\Details\Reference::class); - $this->references = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Details::class, \Google\Cloud\OsConfig\V1\VulnerabilityReport_Vulnerability_Details::class); - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/VulnerabilityReport/Vulnerability/Details/Reference.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/VulnerabilityReport/Vulnerability/Details/Reference.php deleted file mode 100644 index 1baf7f3ead4c..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/VulnerabilityReport/Vulnerability/Details/Reference.php +++ /dev/null @@ -1,104 +0,0 @@ -google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Details.Reference - */ -class Reference extends \Google\Protobuf\Internal\Message -{ - /** - * The url of the reference. - * - * Generated from protobuf field string url = 1; - */ - protected $url = ''; - /** - * The source of the reference e.g. NVD. - * - * Generated from protobuf field string source = 2; - */ - protected $source = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $url - * The url of the reference. - * @type string $source - * The source of the reference e.g. NVD. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\Vulnerability::initOnce(); - parent::__construct($data); - } - - /** - * The url of the reference. - * - * Generated from protobuf field string url = 1; - * @return string - */ - public function getUrl() - { - return $this->url; - } - - /** - * The url of the reference. - * - * Generated from protobuf field string url = 1; - * @param string $var - * @return $this - */ - public function setUrl($var) - { - GPBUtil::checkString($var, True); - $this->url = $var; - - return $this; - } - - /** - * The source of the reference e.g. NVD. - * - * Generated from protobuf field string source = 2; - * @return string - */ - public function getSource() - { - return $this->source; - } - - /** - * The source of the reference e.g. NVD. - * - * Generated from protobuf field string source = 2; - * @param string $var - * @return $this - */ - public function setSource($var) - { - GPBUtil::checkString($var, True); - $this->source = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Reference::class, \Google\Cloud\OsConfig\V1\VulnerabilityReport_Vulnerability_Details_Reference::class); - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/VulnerabilityReport/Vulnerability/Item.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/VulnerabilityReport/Vulnerability/Item.php deleted file mode 100644 index cf61b3d6f807..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/VulnerabilityReport/Vulnerability/Item.php +++ /dev/null @@ -1,213 +0,0 @@ -google.cloud.osconfig.v1.VulnerabilityReport.Vulnerability.Item - */ -class Item extends \Google\Protobuf\Internal\Message -{ - /** - * Corresponds to the `INSTALLED_PACKAGE` inventory item on the VM. - * This field displays the inventory items affected by this vulnerability. - * If the vulnerability report was not updated after the VM inventory - * update, these values might not display in VM inventory. For some - * operating systems, this field might be empty. - * - * Generated from protobuf field string installed_inventory_item_id = 1; - */ - protected $installed_inventory_item_id = ''; - /** - * Corresponds to the `AVAILABLE_PACKAGE` inventory item on the VM. - * If the vulnerability report was not updated after the VM inventory - * update, these values might not display in VM inventory. If there is no - * available fix, the field is empty. The `inventory_item` value specifies - * the latest `SoftwarePackage` available to the VM that fixes the - * vulnerability. - * - * Generated from protobuf field string available_inventory_item_id = 2; - */ - protected $available_inventory_item_id = ''; - /** - * The recommended [CPE URI](https://cpe.mitre.org/specification/) update - * that contains a fix for this vulnerability. - * - * Generated from protobuf field string fixed_cpe_uri = 3; - */ - protected $fixed_cpe_uri = ''; - /** - * The upstream OS patch, packages or KB that fixes the vulnerability. - * - * Generated from protobuf field string upstream_fix = 4; - */ - protected $upstream_fix = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $installed_inventory_item_id - * Corresponds to the `INSTALLED_PACKAGE` inventory item on the VM. - * This field displays the inventory items affected by this vulnerability. - * If the vulnerability report was not updated after the VM inventory - * update, these values might not display in VM inventory. For some - * operating systems, this field might be empty. - * @type string $available_inventory_item_id - * Corresponds to the `AVAILABLE_PACKAGE` inventory item on the VM. - * If the vulnerability report was not updated after the VM inventory - * update, these values might not display in VM inventory. If there is no - * available fix, the field is empty. The `inventory_item` value specifies - * the latest `SoftwarePackage` available to the VM that fixes the - * vulnerability. - * @type string $fixed_cpe_uri - * The recommended [CPE URI](https://cpe.mitre.org/specification/) update - * that contains a fix for this vulnerability. - * @type string $upstream_fix - * The upstream OS patch, packages or KB that fixes the vulnerability. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\Vulnerability::initOnce(); - parent::__construct($data); - } - - /** - * Corresponds to the `INSTALLED_PACKAGE` inventory item on the VM. - * This field displays the inventory items affected by this vulnerability. - * If the vulnerability report was not updated after the VM inventory - * update, these values might not display in VM inventory. For some - * operating systems, this field might be empty. - * - * Generated from protobuf field string installed_inventory_item_id = 1; - * @return string - */ - public function getInstalledInventoryItemId() - { - return $this->installed_inventory_item_id; - } - - /** - * Corresponds to the `INSTALLED_PACKAGE` inventory item on the VM. - * This field displays the inventory items affected by this vulnerability. - * If the vulnerability report was not updated after the VM inventory - * update, these values might not display in VM inventory. For some - * operating systems, this field might be empty. - * - * Generated from protobuf field string installed_inventory_item_id = 1; - * @param string $var - * @return $this - */ - public function setInstalledInventoryItemId($var) - { - GPBUtil::checkString($var, True); - $this->installed_inventory_item_id = $var; - - return $this; - } - - /** - * Corresponds to the `AVAILABLE_PACKAGE` inventory item on the VM. - * If the vulnerability report was not updated after the VM inventory - * update, these values might not display in VM inventory. If there is no - * available fix, the field is empty. The `inventory_item` value specifies - * the latest `SoftwarePackage` available to the VM that fixes the - * vulnerability. - * - * Generated from protobuf field string available_inventory_item_id = 2; - * @return string - */ - public function getAvailableInventoryItemId() - { - return $this->available_inventory_item_id; - } - - /** - * Corresponds to the `AVAILABLE_PACKAGE` inventory item on the VM. - * If the vulnerability report was not updated after the VM inventory - * update, these values might not display in VM inventory. If there is no - * available fix, the field is empty. The `inventory_item` value specifies - * the latest `SoftwarePackage` available to the VM that fixes the - * vulnerability. - * - * Generated from protobuf field string available_inventory_item_id = 2; - * @param string $var - * @return $this - */ - public function setAvailableInventoryItemId($var) - { - GPBUtil::checkString($var, True); - $this->available_inventory_item_id = $var; - - return $this; - } - - /** - * The recommended [CPE URI](https://cpe.mitre.org/specification/) update - * that contains a fix for this vulnerability. - * - * Generated from protobuf field string fixed_cpe_uri = 3; - * @return string - */ - public function getFixedCpeUri() - { - return $this->fixed_cpe_uri; - } - - /** - * The recommended [CPE URI](https://cpe.mitre.org/specification/) update - * that contains a fix for this vulnerability. - * - * Generated from protobuf field string fixed_cpe_uri = 3; - * @param string $var - * @return $this - */ - public function setFixedCpeUri($var) - { - GPBUtil::checkString($var, True); - $this->fixed_cpe_uri = $var; - - return $this; - } - - /** - * The upstream OS patch, packages or KB that fixes the vulnerability. - * - * Generated from protobuf field string upstream_fix = 4; - * @return string - */ - public function getUpstreamFix() - { - return $this->upstream_fix; - } - - /** - * The upstream OS patch, packages or KB that fixes the vulnerability. - * - * Generated from protobuf field string upstream_fix = 4; - * @param string $var - * @return $this - */ - public function setUpstreamFix($var) - { - GPBUtil::checkString($var, True); - $this->upstream_fix = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Item::class, \Google\Cloud\OsConfig\V1\VulnerabilityReport_Vulnerability_Item::class); - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/WeekDayOfMonth.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/WeekDayOfMonth.php deleted file mode 100644 index ade13fa6ec0d..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/WeekDayOfMonth.php +++ /dev/null @@ -1,163 +0,0 @@ -google.cloud.osconfig.v1.WeekDayOfMonth - */ -class WeekDayOfMonth extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Week number in a month. 1-4 indicates the 1st to 4th week of the - * month. -1 indicates the last week of the month. - * - * Generated from protobuf field int32 week_ordinal = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $week_ordinal = 0; - /** - * Required. A day of the week. - * - * Generated from protobuf field .google.type.DayOfWeek day_of_week = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $day_of_week = 0; - /** - * Optional. Represents the number of days before or after the given week day - * of month that the patch deployment is scheduled for. For example if - * `week_ordinal` and `day_of_week` values point to the second day of the - * month and this `day_offset` value is set to `3`, the patch deployment takes - * place three days after the second Tuesday of the month. If this value is - * negative, for example -5, the patches are deployed five days before before - * the second Tuesday of the month. Allowed values are in range [-30, 30]. - * - * Generated from protobuf field int32 day_offset = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $day_offset = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $week_ordinal - * Required. Week number in a month. 1-4 indicates the 1st to 4th week of the - * month. -1 indicates the last week of the month. - * @type int $day_of_week - * Required. A day of the week. - * @type int $day_offset - * Optional. Represents the number of days before or after the given week day - * of month that the patch deployment is scheduled for. For example if - * `week_ordinal` and `day_of_week` values point to the second day of the - * month and this `day_offset` value is set to `3`, the patch deployment takes - * place three days after the second Tuesday of the month. If this value is - * negative, for example -5, the patches are deployed five days before before - * the second Tuesday of the month. Allowed values are in range [-30, 30]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\PatchDeployments::initOnce(); - parent::__construct($data); - } - - /** - * Required. Week number in a month. 1-4 indicates the 1st to 4th week of the - * month. -1 indicates the last week of the month. - * - * Generated from protobuf field int32 week_ordinal = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getWeekOrdinal() - { - return $this->week_ordinal; - } - - /** - * Required. Week number in a month. 1-4 indicates the 1st to 4th week of the - * month. -1 indicates the last week of the month. - * - * Generated from protobuf field int32 week_ordinal = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setWeekOrdinal($var) - { - GPBUtil::checkInt32($var); - $this->week_ordinal = $var; - - return $this; - } - - /** - * Required. A day of the week. - * - * Generated from protobuf field .google.type.DayOfWeek day_of_week = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getDayOfWeek() - { - return $this->day_of_week; - } - - /** - * Required. A day of the week. - * - * Generated from protobuf field .google.type.DayOfWeek day_of_week = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setDayOfWeek($var) - { - GPBUtil::checkEnum($var, \Google\Type\DayOfWeek::class); - $this->day_of_week = $var; - - return $this; - } - - /** - * Optional. Represents the number of days before or after the given week day - * of month that the patch deployment is scheduled for. For example if - * `week_ordinal` and `day_of_week` values point to the second day of the - * month and this `day_offset` value is set to `3`, the patch deployment takes - * place three days after the second Tuesday of the month. If this value is - * negative, for example -5, the patches are deployed five days before before - * the second Tuesday of the month. Allowed values are in range [-30, 30]. - * - * Generated from protobuf field int32 day_offset = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getDayOffset() - { - return $this->day_offset; - } - - /** - * Optional. Represents the number of days before or after the given week day - * of month that the patch deployment is scheduled for. For example if - * `week_ordinal` and `day_of_week` values point to the second day of the - * month and this `day_offset` value is set to `3`, the patch deployment takes - * place three days after the second Tuesday of the month. If this value is - * negative, for example -5, the patches are deployed five days before before - * the second Tuesday of the month. Allowed values are in range [-30, 30]. - * - * Generated from protobuf field int32 day_offset = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setDayOffset($var) - { - GPBUtil::checkInt32($var); - $this->day_offset = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/WeeklySchedule.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/WeeklySchedule.php deleted file mode 100644 index 4090800c3937..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/WeeklySchedule.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.osconfig.v1.WeeklySchedule - */ -class WeeklySchedule extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Day of the week. - * - * Generated from protobuf field .google.type.DayOfWeek day_of_week = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $day_of_week = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $day_of_week - * Required. Day of the week. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\PatchDeployments::initOnce(); - parent::__construct($data); - } - - /** - * Required. Day of the week. - * - * Generated from protobuf field .google.type.DayOfWeek day_of_week = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getDayOfWeek() - { - return $this->day_of_week; - } - - /** - * Required. Day of the week. - * - * Generated from protobuf field .google.type.DayOfWeek day_of_week = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setDayOfWeek($var) - { - GPBUtil::checkEnum($var, \Google\Type\DayOfWeek::class); - $this->day_of_week = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/WindowsUpdateSettings.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/WindowsUpdateSettings.php deleted file mode 100644 index 86dcae33129a..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/WindowsUpdateSettings.php +++ /dev/null @@ -1,147 +0,0 @@ -google.cloud.osconfig.v1.WindowsUpdateSettings - */ -class WindowsUpdateSettings extends \Google\Protobuf\Internal\Message -{ - /** - * Only apply updates of these windows update classifications. If empty, all - * updates are applied. - * - * Generated from protobuf field repeated .google.cloud.osconfig.v1.WindowsUpdateSettings.Classification classifications = 1; - */ - private $classifications; - /** - * List of KBs to exclude from update. - * - * Generated from protobuf field repeated string excludes = 2; - */ - private $excludes; - /** - * An exclusive list of kbs to be updated. These are the only patches - * that will be updated. This field must not be used with other - * patch configurations. - * - * Generated from protobuf field repeated string exclusive_patches = 3; - */ - private $exclusive_patches; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $classifications - * Only apply updates of these windows update classifications. If empty, all - * updates are applied. - * @type array|\Google\Protobuf\Internal\RepeatedField $excludes - * List of KBs to exclude from update. - * @type array|\Google\Protobuf\Internal\RepeatedField $exclusive_patches - * An exclusive list of kbs to be updated. These are the only patches - * that will be updated. This field must not be used with other - * patch configurations. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\PatchJobs::initOnce(); - parent::__construct($data); - } - - /** - * Only apply updates of these windows update classifications. If empty, all - * updates are applied. - * - * Generated from protobuf field repeated .google.cloud.osconfig.v1.WindowsUpdateSettings.Classification classifications = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getClassifications() - { - return $this->classifications; - } - - /** - * Only apply updates of these windows update classifications. If empty, all - * updates are applied. - * - * Generated from protobuf field repeated .google.cloud.osconfig.v1.WindowsUpdateSettings.Classification classifications = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setClassifications($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\OsConfig\V1\WindowsUpdateSettings\Classification::class); - $this->classifications = $arr; - - return $this; - } - - /** - * List of KBs to exclude from update. - * - * Generated from protobuf field repeated string excludes = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getExcludes() - { - return $this->excludes; - } - - /** - * List of KBs to exclude from update. - * - * Generated from protobuf field repeated string excludes = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setExcludes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->excludes = $arr; - - return $this; - } - - /** - * An exclusive list of kbs to be updated. These are the only patches - * that will be updated. This field must not be used with other - * patch configurations. - * - * Generated from protobuf field repeated string exclusive_patches = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getExclusivePatches() - { - return $this->exclusive_patches; - } - - /** - * An exclusive list of kbs to be updated. These are the only patches - * that will be updated. This field must not be used with other - * patch configurations. - * - * Generated from protobuf field repeated string exclusive_patches = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setExclusivePatches($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->exclusive_patches = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/WindowsUpdateSettings/Classification.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/WindowsUpdateSettings/Classification.php deleted file mode 100644 index 4aaae34a6a96..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/WindowsUpdateSettings/Classification.php +++ /dev/null @@ -1,132 +0,0 @@ -google.cloud.osconfig.v1.WindowsUpdateSettings.Classification - */ -class Classification -{ - /** - * Invalid. If classifications are included, they must be specified. - * - * Generated from protobuf enum CLASSIFICATION_UNSPECIFIED = 0; - */ - const CLASSIFICATION_UNSPECIFIED = 0; - /** - * "A widely released fix for a specific problem that addresses a critical, - * non-security-related bug." [1] - * - * Generated from protobuf enum CRITICAL = 1; - */ - const CRITICAL = 1; - /** - * "A widely released fix for a product-specific, security-related - * vulnerability. Security vulnerabilities are rated by their severity. The - * severity rating is indicated in the Microsoft security bulletin as - * critical, important, moderate, or low." [1] - * - * Generated from protobuf enum SECURITY = 2; - */ - const SECURITY = 2; - /** - * "A widely released and frequent software update that contains additions - * to a product's definition database. Definition databases are often used - * to detect objects that have specific attributes, such as malicious code, - * phishing websites, or junk mail." [1] - * - * Generated from protobuf enum DEFINITION = 3; - */ - const DEFINITION = 3; - /** - * "Software that controls the input and output of a device." [1] - * - * Generated from protobuf enum DRIVER = 4; - */ - const DRIVER = 4; - /** - * "New product functionality that is first distributed outside the context - * of a product release and that is typically included in the next full - * product release." [1] - * - * Generated from protobuf enum FEATURE_PACK = 5; - */ - const FEATURE_PACK = 5; - /** - * "A tested, cumulative set of all hotfixes, security updates, critical - * updates, and updates. Additionally, service packs may contain additional - * fixes for problems that are found internally since the release of the - * product. Service packs my also contain a limited number of - * customer-requested design changes or features." [1] - * - * Generated from protobuf enum SERVICE_PACK = 6; - */ - const SERVICE_PACK = 6; - /** - * "A utility or feature that helps complete a task or set of tasks." [1] - * - * Generated from protobuf enum TOOL = 7; - */ - const TOOL = 7; - /** - * "A tested, cumulative set of hotfixes, security updates, critical - * updates, and updates that are packaged together for easy deployment. A - * rollup generally targets a specific area, such as security, or a - * component of a product, such as Internet Information Services (IIS)." [1] - * - * Generated from protobuf enum UPDATE_ROLLUP = 8; - */ - const UPDATE_ROLLUP = 8; - /** - * "A widely released fix for a specific problem. An update addresses a - * noncritical, non-security-related bug." [1] - * - * Generated from protobuf enum UPDATE = 9; - */ - const UPDATE = 9; - - private static $valueToName = [ - self::CLASSIFICATION_UNSPECIFIED => 'CLASSIFICATION_UNSPECIFIED', - self::CRITICAL => 'CRITICAL', - self::SECURITY => 'SECURITY', - self::DEFINITION => 'DEFINITION', - self::DRIVER => 'DRIVER', - self::FEATURE_PACK => 'FEATURE_PACK', - self::SERVICE_PACK => 'SERVICE_PACK', - self::TOOL => 'TOOL', - self::UPDATE_ROLLUP => 'UPDATE_ROLLUP', - self::UPDATE => 'UPDATE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Classification::class, \Google\Cloud\OsConfig\V1\WindowsUpdateSettings_Classification::class); - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/YumSettings.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/YumSettings.php deleted file mode 100644 index e40067eea438..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/YumSettings.php +++ /dev/null @@ -1,191 +0,0 @@ -google.cloud.osconfig.v1.YumSettings - */ -class YumSettings extends \Google\Protobuf\Internal\Message -{ - /** - * Adds the `--security` flag to `yum update`. Not supported on - * all platforms. - * - * Generated from protobuf field bool security = 1; - */ - protected $security = false; - /** - * Will cause patch to run `yum update-minimal` instead. - * - * Generated from protobuf field bool minimal = 2; - */ - protected $minimal = false; - /** - * List of packages to exclude from update. These packages are excluded by - * using the yum `--exclude` flag. - * - * Generated from protobuf field repeated string excludes = 3; - */ - private $excludes; - /** - * An exclusive list of packages to be updated. These are the only packages - * that will be updated. If these packages are not installed, they will be - * ignored. This field must not be specified with any other patch - * configuration fields. - * - * Generated from protobuf field repeated string exclusive_packages = 4; - */ - private $exclusive_packages; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $security - * Adds the `--security` flag to `yum update`. Not supported on - * all platforms. - * @type bool $minimal - * Will cause patch to run `yum update-minimal` instead. - * @type array|\Google\Protobuf\Internal\RepeatedField $excludes - * List of packages to exclude from update. These packages are excluded by - * using the yum `--exclude` flag. - * @type array|\Google\Protobuf\Internal\RepeatedField $exclusive_packages - * An exclusive list of packages to be updated. These are the only packages - * that will be updated. If these packages are not installed, they will be - * ignored. This field must not be specified with any other patch - * configuration fields. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\PatchJobs::initOnce(); - parent::__construct($data); - } - - /** - * Adds the `--security` flag to `yum update`. Not supported on - * all platforms. - * - * Generated from protobuf field bool security = 1; - * @return bool - */ - public function getSecurity() - { - return $this->security; - } - - /** - * Adds the `--security` flag to `yum update`. Not supported on - * all platforms. - * - * Generated from protobuf field bool security = 1; - * @param bool $var - * @return $this - */ - public function setSecurity($var) - { - GPBUtil::checkBool($var); - $this->security = $var; - - return $this; - } - - /** - * Will cause patch to run `yum update-minimal` instead. - * - * Generated from protobuf field bool minimal = 2; - * @return bool - */ - public function getMinimal() - { - return $this->minimal; - } - - /** - * Will cause patch to run `yum update-minimal` instead. - * - * Generated from protobuf field bool minimal = 2; - * @param bool $var - * @return $this - */ - public function setMinimal($var) - { - GPBUtil::checkBool($var); - $this->minimal = $var; - - return $this; - } - - /** - * List of packages to exclude from update. These packages are excluded by - * using the yum `--exclude` flag. - * - * Generated from protobuf field repeated string excludes = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getExcludes() - { - return $this->excludes; - } - - /** - * List of packages to exclude from update. These packages are excluded by - * using the yum `--exclude` flag. - * - * Generated from protobuf field repeated string excludes = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setExcludes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->excludes = $arr; - - return $this; - } - - /** - * An exclusive list of packages to be updated. These are the only packages - * that will be updated. If these packages are not installed, they will be - * ignored. This field must not be specified with any other patch - * configuration fields. - * - * Generated from protobuf field repeated string exclusive_packages = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getExclusivePackages() - { - return $this->exclusive_packages; - } - - /** - * An exclusive list of packages to be updated. These are the only packages - * that will be updated. If these packages are not installed, they will be - * ignored. This field must not be specified with any other patch - * configuration fields. - * - * Generated from protobuf field repeated string exclusive_packages = 4; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setExclusivePackages($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->exclusive_packages = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ZypperSettings.php b/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ZypperSettings.php deleted file mode 100644 index e69961934d6e..000000000000 --- a/owl-bot-staging/OsConfig/v1/proto/src/Google/Cloud/OsConfig/V1/ZypperSettings.php +++ /dev/null @@ -1,254 +0,0 @@ -google.cloud.osconfig.v1.ZypperSettings - */ -class ZypperSettings extends \Google\Protobuf\Internal\Message -{ - /** - * Adds the `--with-optional` flag to `zypper patch`. - * - * Generated from protobuf field bool with_optional = 1; - */ - protected $with_optional = false; - /** - * Adds the `--with-update` flag, to `zypper patch`. - * - * Generated from protobuf field bool with_update = 2; - */ - protected $with_update = false; - /** - * Install only patches with these categories. - * Common categories include security, recommended, and feature. - * - * Generated from protobuf field repeated string categories = 3; - */ - private $categories; - /** - * Install only patches with these severities. - * Common severities include critical, important, moderate, and low. - * - * Generated from protobuf field repeated string severities = 4; - */ - private $severities; - /** - * List of patches to exclude from update. - * - * Generated from protobuf field repeated string excludes = 5; - */ - private $excludes; - /** - * An exclusive list of patches to be updated. These are the only patches - * that will be installed using 'zypper patch patch:' command. - * This field must not be used with any other patch configuration fields. - * - * Generated from protobuf field repeated string exclusive_patches = 6; - */ - private $exclusive_patches; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $with_optional - * Adds the `--with-optional` flag to `zypper patch`. - * @type bool $with_update - * Adds the `--with-update` flag, to `zypper patch`. - * @type array|\Google\Protobuf\Internal\RepeatedField $categories - * Install only patches with these categories. - * Common categories include security, recommended, and feature. - * @type array|\Google\Protobuf\Internal\RepeatedField $severities - * Install only patches with these severities. - * Common severities include critical, important, moderate, and low. - * @type array|\Google\Protobuf\Internal\RepeatedField $excludes - * List of patches to exclude from update. - * @type array|\Google\Protobuf\Internal\RepeatedField $exclusive_patches - * An exclusive list of patches to be updated. These are the only patches - * that will be installed using 'zypper patch patch:' command. - * This field must not be used with any other patch configuration fields. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Osconfig\V1\PatchJobs::initOnce(); - parent::__construct($data); - } - - /** - * Adds the `--with-optional` flag to `zypper patch`. - * - * Generated from protobuf field bool with_optional = 1; - * @return bool - */ - public function getWithOptional() - { - return $this->with_optional; - } - - /** - * Adds the `--with-optional` flag to `zypper patch`. - * - * Generated from protobuf field bool with_optional = 1; - * @param bool $var - * @return $this - */ - public function setWithOptional($var) - { - GPBUtil::checkBool($var); - $this->with_optional = $var; - - return $this; - } - - /** - * Adds the `--with-update` flag, to `zypper patch`. - * - * Generated from protobuf field bool with_update = 2; - * @return bool - */ - public function getWithUpdate() - { - return $this->with_update; - } - - /** - * Adds the `--with-update` flag, to `zypper patch`. - * - * Generated from protobuf field bool with_update = 2; - * @param bool $var - * @return $this - */ - public function setWithUpdate($var) - { - GPBUtil::checkBool($var); - $this->with_update = $var; - - return $this; - } - - /** - * Install only patches with these categories. - * Common categories include security, recommended, and feature. - * - * Generated from protobuf field repeated string categories = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCategories() - { - return $this->categories; - } - - /** - * Install only patches with these categories. - * Common categories include security, recommended, and feature. - * - * Generated from protobuf field repeated string categories = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCategories($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->categories = $arr; - - return $this; - } - - /** - * Install only patches with these severities. - * Common severities include critical, important, moderate, and low. - * - * Generated from protobuf field repeated string severities = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSeverities() - { - return $this->severities; - } - - /** - * Install only patches with these severities. - * Common severities include critical, important, moderate, and low. - * - * Generated from protobuf field repeated string severities = 4; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSeverities($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->severities = $arr; - - return $this; - } - - /** - * List of patches to exclude from update. - * - * Generated from protobuf field repeated string excludes = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getExcludes() - { - return $this->excludes; - } - - /** - * List of patches to exclude from update. - * - * Generated from protobuf field repeated string excludes = 5; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setExcludes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->excludes = $arr; - - return $this; - } - - /** - * An exclusive list of patches to be updated. These are the only patches - * that will be installed using 'zypper patch patch:' command. - * This field must not be used with any other patch configuration fields. - * - * Generated from protobuf field repeated string exclusive_patches = 6; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getExclusivePatches() - { - return $this->exclusive_patches; - } - - /** - * An exclusive list of patches to be updated. These are the only patches - * that will be installed using 'zypper patch patch:' command. - * This field must not be used with any other patch configuration fields. - * - * Generated from protobuf field repeated string exclusive_patches = 6; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setExclusivePatches($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->exclusive_patches = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigServiceClient/cancel_patch_job.php b/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigServiceClient/cancel_patch_job.php deleted file mode 100644 index 800390b484f3..000000000000 --- a/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigServiceClient/cancel_patch_job.php +++ /dev/null @@ -1,72 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var PatchJob $response */ - $response = $osConfigServiceClient->cancelPatchJob($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = OsConfigServiceClient::patchJobName('[PROJECT]', '[PATCH_JOB]'); - - cancel_patch_job_sample($formattedName); -} -// [END osconfig_v1_generated_OsConfigService_CancelPatchJob_sync] diff --git a/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigServiceClient/create_patch_deployment.php b/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigServiceClient/create_patch_deployment.php deleted file mode 100644 index 0f9f877f3669..000000000000 --- a/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigServiceClient/create_patch_deployment.php +++ /dev/null @@ -1,92 +0,0 @@ -setExecuteTime($patchDeploymentOneTimeScheduleExecuteTime); - $patchDeployment = (new PatchDeployment()) - ->setInstanceFilter($patchDeploymentInstanceFilter) - ->setOneTimeSchedule($patchDeploymentOneTimeSchedule); - $request = (new CreatePatchDeploymentRequest()) - ->setParent($formattedParent) - ->setPatchDeploymentId($patchDeploymentId) - ->setPatchDeployment($patchDeployment); - - // Call the API and handle any network failures. - try { - /** @var PatchDeployment $response */ - $response = $osConfigServiceClient->createPatchDeployment($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = OsConfigServiceClient::projectName('[PROJECT]'); - $patchDeploymentId = '[PATCH_DEPLOYMENT_ID]'; - - create_patch_deployment_sample($formattedParent, $patchDeploymentId); -} -// [END osconfig_v1_generated_OsConfigService_CreatePatchDeployment_sync] diff --git a/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigServiceClient/delete_patch_deployment.php b/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigServiceClient/delete_patch_deployment.php deleted file mode 100644 index 5b70ab855314..000000000000 --- a/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigServiceClient/delete_patch_deployment.php +++ /dev/null @@ -1,70 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $osConfigServiceClient->deletePatchDeployment($request); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = OsConfigServiceClient::patchDeploymentName('[PROJECT]', '[PATCH_DEPLOYMENT]'); - - delete_patch_deployment_sample($formattedName); -} -// [END osconfig_v1_generated_OsConfigService_DeletePatchDeployment_sync] diff --git a/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigServiceClient/execute_patch_job.php b/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigServiceClient/execute_patch_job.php deleted file mode 100644 index 4432b5f9b33d..000000000000 --- a/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigServiceClient/execute_patch_job.php +++ /dev/null @@ -1,74 +0,0 @@ -setParent($formattedParent) - ->setInstanceFilter($instanceFilter); - - // Call the API and handle any network failures. - try { - /** @var PatchJob $response */ - $response = $osConfigServiceClient->executePatchJob($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = OsConfigServiceClient::projectName('[PROJECT]'); - - execute_patch_job_sample($formattedParent); -} -// [END osconfig_v1_generated_OsConfigService_ExecutePatchJob_sync] diff --git a/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigServiceClient/get_patch_deployment.php b/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigServiceClient/get_patch_deployment.php deleted file mode 100644 index ae48156f11d4..000000000000 --- a/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigServiceClient/get_patch_deployment.php +++ /dev/null @@ -1,72 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var PatchDeployment $response */ - $response = $osConfigServiceClient->getPatchDeployment($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = OsConfigServiceClient::patchDeploymentName('[PROJECT]', '[PATCH_DEPLOYMENT]'); - - get_patch_deployment_sample($formattedName); -} -// [END osconfig_v1_generated_OsConfigService_GetPatchDeployment_sync] diff --git a/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigServiceClient/get_patch_job.php b/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigServiceClient/get_patch_job.php deleted file mode 100644 index cd14116f66c3..000000000000 --- a/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigServiceClient/get_patch_job.php +++ /dev/null @@ -1,72 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var PatchJob $response */ - $response = $osConfigServiceClient->getPatchJob($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = OsConfigServiceClient::patchJobName('[PROJECT]', '[PATCH_JOB]'); - - get_patch_job_sample($formattedName); -} -// [END osconfig_v1_generated_OsConfigService_GetPatchJob_sync] diff --git a/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigServiceClient/list_patch_deployments.php b/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigServiceClient/list_patch_deployments.php deleted file mode 100644 index 0eeaf8a48221..000000000000 --- a/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigServiceClient/list_patch_deployments.php +++ /dev/null @@ -1,76 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $osConfigServiceClient->listPatchDeployments($request); - - /** @var PatchDeployment $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = OsConfigServiceClient::projectName('[PROJECT]'); - - list_patch_deployments_sample($formattedParent); -} -// [END osconfig_v1_generated_OsConfigService_ListPatchDeployments_sync] diff --git a/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigServiceClient/list_patch_job_instance_details.php b/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigServiceClient/list_patch_job_instance_details.php deleted file mode 100644 index 039c88439e8c..000000000000 --- a/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigServiceClient/list_patch_job_instance_details.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $osConfigServiceClient->listPatchJobInstanceDetails($request); - - /** @var PatchJobInstanceDetails $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = OsConfigServiceClient::patchJobName('[PROJECT]', '[PATCH_JOB]'); - - list_patch_job_instance_details_sample($formattedParent); -} -// [END osconfig_v1_generated_OsConfigService_ListPatchJobInstanceDetails_sync] diff --git a/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigServiceClient/list_patch_jobs.php b/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigServiceClient/list_patch_jobs.php deleted file mode 100644 index d2a825d6944e..000000000000 --- a/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigServiceClient/list_patch_jobs.php +++ /dev/null @@ -1,76 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $osConfigServiceClient->listPatchJobs($request); - - /** @var PatchJob $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = OsConfigServiceClient::projectName('[PROJECT]'); - - list_patch_jobs_sample($formattedParent); -} -// [END osconfig_v1_generated_OsConfigService_ListPatchJobs_sync] diff --git a/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigServiceClient/pause_patch_deployment.php b/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigServiceClient/pause_patch_deployment.php deleted file mode 100644 index 866ec8e1c20d..000000000000 --- a/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigServiceClient/pause_patch_deployment.php +++ /dev/null @@ -1,73 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var PatchDeployment $response */ - $response = $osConfigServiceClient->pausePatchDeployment($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = OsConfigServiceClient::patchDeploymentName('[PROJECT]', '[PATCH_DEPLOYMENT]'); - - pause_patch_deployment_sample($formattedName); -} -// [END osconfig_v1_generated_OsConfigService_PausePatchDeployment_sync] diff --git a/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigServiceClient/resume_patch_deployment.php b/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigServiceClient/resume_patch_deployment.php deleted file mode 100644 index ede7e714299d..000000000000 --- a/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigServiceClient/resume_patch_deployment.php +++ /dev/null @@ -1,73 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var PatchDeployment $response */ - $response = $osConfigServiceClient->resumePatchDeployment($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = OsConfigServiceClient::patchDeploymentName('[PROJECT]', '[PATCH_DEPLOYMENT]'); - - resume_patch_deployment_sample($formattedName); -} -// [END osconfig_v1_generated_OsConfigService_ResumePatchDeployment_sync] diff --git a/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigServiceClient/update_patch_deployment.php b/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigServiceClient/update_patch_deployment.php deleted file mode 100644 index 8b5a5497d8ce..000000000000 --- a/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigServiceClient/update_patch_deployment.php +++ /dev/null @@ -1,68 +0,0 @@ -setExecuteTime($patchDeploymentOneTimeScheduleExecuteTime); - $patchDeployment = (new PatchDeployment()) - ->setInstanceFilter($patchDeploymentInstanceFilter) - ->setOneTimeSchedule($patchDeploymentOneTimeSchedule); - $request = (new UpdatePatchDeploymentRequest()) - ->setPatchDeployment($patchDeployment); - - // Call the API and handle any network failures. - try { - /** @var PatchDeployment $response */ - $response = $osConfigServiceClient->updatePatchDeployment($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END osconfig_v1_generated_OsConfigService_UpdatePatchDeployment_sync] diff --git a/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigZonalServiceClient/create_os_policy_assignment.php b/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigZonalServiceClient/create_os_policy_assignment.php deleted file mode 100644 index 5e1ed5052894..000000000000 --- a/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigZonalServiceClient/create_os_policy_assignment.php +++ /dev/null @@ -1,161 +0,0 @@ -setId($osPolicyAssignmentOsPoliciesResourceGroupsResourcesId); - $osPolicyAssignmentOsPoliciesResourceGroupsResources = [$resource,]; - $resourceGroup = (new ResourceGroup()) - ->setResources($osPolicyAssignmentOsPoliciesResourceGroupsResources); - $osPolicyAssignmentOsPoliciesResourceGroups = [$resourceGroup,]; - $oSPolicy = (new OSPolicy()) - ->setId($osPolicyAssignmentOsPoliciesId) - ->setMode($osPolicyAssignmentOsPoliciesMode) - ->setResourceGroups($osPolicyAssignmentOsPoliciesResourceGroups); - $osPolicyAssignmentOsPolicies = [$oSPolicy,]; - $osPolicyAssignmentInstanceFilter = new InstanceFilter(); - $osPolicyAssignmentRolloutDisruptionBudget = new FixedOrPercent(); - $osPolicyAssignmentRolloutMinWaitDuration = new Duration(); - $osPolicyAssignmentRollout = (new Rollout()) - ->setDisruptionBudget($osPolicyAssignmentRolloutDisruptionBudget) - ->setMinWaitDuration($osPolicyAssignmentRolloutMinWaitDuration); - $osPolicyAssignment = (new OSPolicyAssignment()) - ->setOsPolicies($osPolicyAssignmentOsPolicies) - ->setInstanceFilter($osPolicyAssignmentInstanceFilter) - ->setRollout($osPolicyAssignmentRollout); - $request = (new CreateOSPolicyAssignmentRequest()) - ->setParent($formattedParent) - ->setOsPolicyAssignment($osPolicyAssignment) - ->setOsPolicyAssignmentId($osPolicyAssignmentId); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $osConfigZonalServiceClient->createOSPolicyAssignment($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var OSPolicyAssignment $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = OsConfigZonalServiceClient::locationName('[PROJECT]', '[LOCATION]'); - $osPolicyAssignmentOsPoliciesId = '[ID]'; - $osPolicyAssignmentOsPoliciesMode = Mode::MODE_UNSPECIFIED; - $osPolicyAssignmentOsPoliciesResourceGroupsResourcesId = '[ID]'; - $osPolicyAssignmentId = '[OS_POLICY_ASSIGNMENT_ID]'; - - create_os_policy_assignment_sample( - $formattedParent, - $osPolicyAssignmentOsPoliciesId, - $osPolicyAssignmentOsPoliciesMode, - $osPolicyAssignmentOsPoliciesResourceGroupsResourcesId, - $osPolicyAssignmentId - ); -} -// [END osconfig_v1_generated_OsConfigZonalService_CreateOSPolicyAssignment_sync] diff --git a/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigZonalServiceClient/delete_os_policy_assignment.php b/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigZonalServiceClient/delete_os_policy_assignment.php deleted file mode 100644 index ee64a498c4a8..000000000000 --- a/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigZonalServiceClient/delete_os_policy_assignment.php +++ /dev/null @@ -1,95 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $osConfigZonalServiceClient->deleteOSPolicyAssignment($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = OsConfigZonalServiceClient::oSPolicyAssignmentName( - '[PROJECT]', - '[LOCATION]', - '[OS_POLICY_ASSIGNMENT]' - ); - - delete_os_policy_assignment_sample($formattedName); -} -// [END osconfig_v1_generated_OsConfigZonalService_DeleteOSPolicyAssignment_sync] diff --git a/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigZonalServiceClient/get_inventory.php b/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigZonalServiceClient/get_inventory.php deleted file mode 100644 index 5d2e9b2a5ae0..000000000000 --- a/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigZonalServiceClient/get_inventory.php +++ /dev/null @@ -1,79 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Inventory $response */ - $response = $osConfigZonalServiceClient->getInventory($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = OsConfigZonalServiceClient::inventoryName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - - get_inventory_sample($formattedName); -} -// [END osconfig_v1_generated_OsConfigZonalService_GetInventory_sync] diff --git a/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigZonalServiceClient/get_os_policy_assignment.php b/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigZonalServiceClient/get_os_policy_assignment.php deleted file mode 100644 index b02485a4c3da..000000000000 --- a/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigZonalServiceClient/get_os_policy_assignment.php +++ /dev/null @@ -1,82 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OSPolicyAssignment $response */ - $response = $osConfigZonalServiceClient->getOSPolicyAssignment($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = OsConfigZonalServiceClient::oSPolicyAssignmentName( - '[PROJECT]', - '[LOCATION]', - '[OS_POLICY_ASSIGNMENT]' - ); - - get_os_policy_assignment_sample($formattedName); -} -// [END osconfig_v1_generated_OsConfigZonalService_GetOSPolicyAssignment_sync] diff --git a/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigZonalServiceClient/get_os_policy_assignment_report.php b/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigZonalServiceClient/get_os_policy_assignment_report.php deleted file mode 100644 index 9b1b7534b1fa..000000000000 --- a/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigZonalServiceClient/get_os_policy_assignment_report.php +++ /dev/null @@ -1,85 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OSPolicyAssignmentReport $response */ - $response = $osConfigZonalServiceClient->getOSPolicyAssignmentReport($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = OsConfigZonalServiceClient::oSPolicyAssignmentReportName( - '[PROJECT]', - '[LOCATION]', - '[INSTANCE]', - '[ASSIGNMENT]' - ); - - get_os_policy_assignment_report_sample($formattedName); -} -// [END osconfig_v1_generated_OsConfigZonalService_GetOSPolicyAssignmentReport_sync] diff --git a/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigZonalServiceClient/get_vulnerability_report.php b/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigZonalServiceClient/get_vulnerability_report.php deleted file mode 100644 index 65e01e501cc3..000000000000 --- a/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigZonalServiceClient/get_vulnerability_report.php +++ /dev/null @@ -1,83 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var VulnerabilityReport $response */ - $response = $osConfigZonalServiceClient->getVulnerabilityReport($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = OsConfigZonalServiceClient::vulnerabilityReportName( - '[PROJECT]', - '[LOCATION]', - '[INSTANCE]' - ); - - get_vulnerability_report_sample($formattedName); -} -// [END osconfig_v1_generated_OsConfigZonalService_GetVulnerabilityReport_sync] diff --git a/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigZonalServiceClient/list_inventories.php b/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigZonalServiceClient/list_inventories.php deleted file mode 100644 index 6c195d5bb409..000000000000 --- a/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigZonalServiceClient/list_inventories.php +++ /dev/null @@ -1,80 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $osConfigZonalServiceClient->listInventories($request); - - /** @var Inventory $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = OsConfigZonalServiceClient::instanceName('[PROJECT]', '[ZONE]', '[INSTANCE]'); - - list_inventories_sample($formattedParent); -} -// [END osconfig_v1_generated_OsConfigZonalService_ListInventories_sync] diff --git a/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigZonalServiceClient/list_os_policy_assignment_reports.php b/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigZonalServiceClient/list_os_policy_assignment_reports.php deleted file mode 100644 index e8cf9d742d37..000000000000 --- a/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigZonalServiceClient/list_os_policy_assignment_reports.php +++ /dev/null @@ -1,102 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $osConfigZonalServiceClient->listOSPolicyAssignmentReports($request); - - /** @var OSPolicyAssignmentReport $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = OsConfigZonalServiceClient::instanceOSPolicyAssignmentName( - '[PROJECT]', - '[LOCATION]', - '[INSTANCE]', - '[ASSIGNMENT]' - ); - - list_os_policy_assignment_reports_sample($formattedParent); -} -// [END osconfig_v1_generated_OsConfigZonalService_ListOSPolicyAssignmentReports_sync] diff --git a/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigZonalServiceClient/list_os_policy_assignment_revisions.php b/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigZonalServiceClient/list_os_policy_assignment_revisions.php deleted file mode 100644 index 3ca9daab02a4..000000000000 --- a/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigZonalServiceClient/list_os_policy_assignment_revisions.php +++ /dev/null @@ -1,80 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $osConfigZonalServiceClient->listOSPolicyAssignmentRevisions($request); - - /** @var OSPolicyAssignment $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = OsConfigZonalServiceClient::oSPolicyAssignmentName( - '[PROJECT]', - '[LOCATION]', - '[OS_POLICY_ASSIGNMENT]' - ); - - list_os_policy_assignment_revisions_sample($formattedName); -} -// [END osconfig_v1_generated_OsConfigZonalService_ListOSPolicyAssignmentRevisions_sync] diff --git a/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigZonalServiceClient/list_os_policy_assignments.php b/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigZonalServiceClient/list_os_policy_assignments.php deleted file mode 100644 index 1f42899d05c0..000000000000 --- a/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigZonalServiceClient/list_os_policy_assignments.php +++ /dev/null @@ -1,78 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $osConfigZonalServiceClient->listOSPolicyAssignments($request); - - /** @var OSPolicyAssignment $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = OsConfigZonalServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - list_os_policy_assignments_sample($formattedParent); -} -// [END osconfig_v1_generated_OsConfigZonalService_ListOSPolicyAssignments_sync] diff --git a/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigZonalServiceClient/list_vulnerability_reports.php b/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigZonalServiceClient/list_vulnerability_reports.php deleted file mode 100644 index 57a319a2820d..000000000000 --- a/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigZonalServiceClient/list_vulnerability_reports.php +++ /dev/null @@ -1,80 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $osConfigZonalServiceClient->listVulnerabilityReports($request); - - /** @var VulnerabilityReport $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = OsConfigZonalServiceClient::instanceName('[PROJECT]', '[ZONE]', '[INSTANCE]'); - - list_vulnerability_reports_sample($formattedParent); -} -// [END osconfig_v1_generated_OsConfigZonalService_ListVulnerabilityReports_sync] diff --git a/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigZonalServiceClient/update_os_policy_assignment.php b/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigZonalServiceClient/update_os_policy_assignment.php deleted file mode 100644 index 489a3eda0d73..000000000000 --- a/owl-bot-staging/OsConfig/v1/samples/V1/OsConfigZonalServiceClient/update_os_policy_assignment.php +++ /dev/null @@ -1,142 +0,0 @@ -setId($osPolicyAssignmentOsPoliciesResourceGroupsResourcesId); - $osPolicyAssignmentOsPoliciesResourceGroupsResources = [$resource,]; - $resourceGroup = (new ResourceGroup()) - ->setResources($osPolicyAssignmentOsPoliciesResourceGroupsResources); - $osPolicyAssignmentOsPoliciesResourceGroups = [$resourceGroup,]; - $oSPolicy = (new OSPolicy()) - ->setId($osPolicyAssignmentOsPoliciesId) - ->setMode($osPolicyAssignmentOsPoliciesMode) - ->setResourceGroups($osPolicyAssignmentOsPoliciesResourceGroups); - $osPolicyAssignmentOsPolicies = [$oSPolicy,]; - $osPolicyAssignmentInstanceFilter = new InstanceFilter(); - $osPolicyAssignmentRolloutDisruptionBudget = new FixedOrPercent(); - $osPolicyAssignmentRolloutMinWaitDuration = new Duration(); - $osPolicyAssignmentRollout = (new Rollout()) - ->setDisruptionBudget($osPolicyAssignmentRolloutDisruptionBudget) - ->setMinWaitDuration($osPolicyAssignmentRolloutMinWaitDuration); - $osPolicyAssignment = (new OSPolicyAssignment()) - ->setOsPolicies($osPolicyAssignmentOsPolicies) - ->setInstanceFilter($osPolicyAssignmentInstanceFilter) - ->setRollout($osPolicyAssignmentRollout); - $request = (new UpdateOSPolicyAssignmentRequest()) - ->setOsPolicyAssignment($osPolicyAssignment); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $osConfigZonalServiceClient->updateOSPolicyAssignment($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var OSPolicyAssignment $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $osPolicyAssignmentOsPoliciesId = '[ID]'; - $osPolicyAssignmentOsPoliciesMode = Mode::MODE_UNSPECIFIED; - $osPolicyAssignmentOsPoliciesResourceGroupsResourcesId = '[ID]'; - - update_os_policy_assignment_sample( - $osPolicyAssignmentOsPoliciesId, - $osPolicyAssignmentOsPoliciesMode, - $osPolicyAssignmentOsPoliciesResourceGroupsResourcesId - ); -} -// [END osconfig_v1_generated_OsConfigZonalService_UpdateOSPolicyAssignment_sync] diff --git a/owl-bot-staging/OsConfig/v1/src/V1/Client/OsConfigServiceClient.php b/owl-bot-staging/OsConfig/v1/src/V1/Client/OsConfigServiceClient.php deleted file mode 100644 index 25a3a5f7ecf3..000000000000 --- a/owl-bot-staging/OsConfig/v1/src/V1/Client/OsConfigServiceClient.php +++ /dev/null @@ -1,595 +0,0 @@ - cancelPatchJobAsync(CancelPatchJobRequest $request, array $optionalArgs = []) - * @method PromiseInterface createPatchDeploymentAsync(CreatePatchDeploymentRequest $request, array $optionalArgs = []) - * @method PromiseInterface deletePatchDeploymentAsync(DeletePatchDeploymentRequest $request, array $optionalArgs = []) - * @method PromiseInterface executePatchJobAsync(ExecutePatchJobRequest $request, array $optionalArgs = []) - * @method PromiseInterface getPatchDeploymentAsync(GetPatchDeploymentRequest $request, array $optionalArgs = []) - * @method PromiseInterface getPatchJobAsync(GetPatchJobRequest $request, array $optionalArgs = []) - * @method PromiseInterface listPatchDeploymentsAsync(ListPatchDeploymentsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listPatchJobInstanceDetailsAsync(ListPatchJobInstanceDetailsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listPatchJobsAsync(ListPatchJobsRequest $request, array $optionalArgs = []) - * @method PromiseInterface pausePatchDeploymentAsync(PausePatchDeploymentRequest $request, array $optionalArgs = []) - * @method PromiseInterface resumePatchDeploymentAsync(ResumePatchDeploymentRequest $request, array $optionalArgs = []) - * @method PromiseInterface updatePatchDeploymentAsync(UpdatePatchDeploymentRequest $request, array $optionalArgs = []) - */ -final class OsConfigServiceClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.osconfig.v1.OsConfigService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'osconfig.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'osconfig.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/os_config_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/os_config_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/os_config_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/os_config_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a - * patch_deployment resource. - * - * @param string $project - * @param string $patchDeployment - * - * @return string The formatted patch_deployment resource. - */ - public static function patchDeploymentName(string $project, string $patchDeployment): string - { - return self::getPathTemplate('patchDeployment')->render([ - 'project' => $project, - 'patch_deployment' => $patchDeployment, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a patch_job - * resource. - * - * @param string $project - * @param string $patchJob - * - * @return string The formatted patch_job resource. - */ - public static function patchJobName(string $project, string $patchJob): string - { - return self::getPathTemplate('patchJob')->render([ - 'project' => $project, - 'patch_job' => $patchJob, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a project - * resource. - * - * @param string $project - * - * @return string The formatted project resource. - */ - public static function projectName(string $project): string - { - return self::getPathTemplate('project')->render([ - 'project' => $project, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - patchDeployment: projects/{project}/patchDeployments/{patch_deployment} - * - patchJob: projects/{project}/patchJobs/{patch_job} - * - project: projects/{project} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param ?string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, ?string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'osconfig.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Cancel a patch job. The patch job must be active. Canceled patch jobs - * cannot be restarted. - * - * The async variant is {@see OsConfigServiceClient::cancelPatchJobAsync()} . - * - * @example samples/V1/OsConfigServiceClient/cancel_patch_job.php - * - * @param CancelPatchJobRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PatchJob - * - * @throws ApiException Thrown if the API call fails. - */ - public function cancelPatchJob(CancelPatchJobRequest $request, array $callOptions = []): PatchJob - { - return $this->startApiCall('CancelPatchJob', $request, $callOptions)->wait(); - } - - /** - * Create an OS Config patch deployment. - * - * The async variant is {@see OsConfigServiceClient::createPatchDeploymentAsync()} - * . - * - * @example samples/V1/OsConfigServiceClient/create_patch_deployment.php - * - * @param CreatePatchDeploymentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PatchDeployment - * - * @throws ApiException Thrown if the API call fails. - */ - public function createPatchDeployment(CreatePatchDeploymentRequest $request, array $callOptions = []): PatchDeployment - { - return $this->startApiCall('CreatePatchDeployment', $request, $callOptions)->wait(); - } - - /** - * Delete an OS Config patch deployment. - * - * The async variant is {@see OsConfigServiceClient::deletePatchDeploymentAsync()} - * . - * - * @example samples/V1/OsConfigServiceClient/delete_patch_deployment.php - * - * @param DeletePatchDeploymentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException Thrown if the API call fails. - */ - public function deletePatchDeployment(DeletePatchDeploymentRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeletePatchDeployment', $request, $callOptions)->wait(); - } - - /** - * Patch VM instances by creating and running a patch job. - * - * The async variant is {@see OsConfigServiceClient::executePatchJobAsync()} . - * - * @example samples/V1/OsConfigServiceClient/execute_patch_job.php - * - * @param ExecutePatchJobRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PatchJob - * - * @throws ApiException Thrown if the API call fails. - */ - public function executePatchJob(ExecutePatchJobRequest $request, array $callOptions = []): PatchJob - { - return $this->startApiCall('ExecutePatchJob', $request, $callOptions)->wait(); - } - - /** - * Get an OS Config patch deployment. - * - * The async variant is {@see OsConfigServiceClient::getPatchDeploymentAsync()} . - * - * @example samples/V1/OsConfigServiceClient/get_patch_deployment.php - * - * @param GetPatchDeploymentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PatchDeployment - * - * @throws ApiException Thrown if the API call fails. - */ - public function getPatchDeployment(GetPatchDeploymentRequest $request, array $callOptions = []): PatchDeployment - { - return $this->startApiCall('GetPatchDeployment', $request, $callOptions)->wait(); - } - - /** - * Get the patch job. This can be used to track the progress of an - * ongoing patch job or review the details of completed jobs. - * - * The async variant is {@see OsConfigServiceClient::getPatchJobAsync()} . - * - * @example samples/V1/OsConfigServiceClient/get_patch_job.php - * - * @param GetPatchJobRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PatchJob - * - * @throws ApiException Thrown if the API call fails. - */ - public function getPatchJob(GetPatchJobRequest $request, array $callOptions = []): PatchJob - { - return $this->startApiCall('GetPatchJob', $request, $callOptions)->wait(); - } - - /** - * Get a page of OS Config patch deployments. - * - * The async variant is {@see OsConfigServiceClient::listPatchDeploymentsAsync()} . - * - * @example samples/V1/OsConfigServiceClient/list_patch_deployments.php - * - * @param ListPatchDeploymentsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listPatchDeployments(ListPatchDeploymentsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListPatchDeployments', $request, $callOptions); - } - - /** - * Get a list of instance details for a given patch job. - * - * The async variant is - * {@see OsConfigServiceClient::listPatchJobInstanceDetailsAsync()} . - * - * @example samples/V1/OsConfigServiceClient/list_patch_job_instance_details.php - * - * @param ListPatchJobInstanceDetailsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listPatchJobInstanceDetails(ListPatchJobInstanceDetailsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListPatchJobInstanceDetails', $request, $callOptions); - } - - /** - * Get a list of patch jobs. - * - * The async variant is {@see OsConfigServiceClient::listPatchJobsAsync()} . - * - * @example samples/V1/OsConfigServiceClient/list_patch_jobs.php - * - * @param ListPatchJobsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listPatchJobs(ListPatchJobsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListPatchJobs', $request, $callOptions); - } - - /** - * Change state of patch deployment to "PAUSED". - * Patch deployment in paused state doesn't generate patch jobs. - * - * The async variant is {@see OsConfigServiceClient::pausePatchDeploymentAsync()} . - * - * @example samples/V1/OsConfigServiceClient/pause_patch_deployment.php - * - * @param PausePatchDeploymentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PatchDeployment - * - * @throws ApiException Thrown if the API call fails. - */ - public function pausePatchDeployment(PausePatchDeploymentRequest $request, array $callOptions = []): PatchDeployment - { - return $this->startApiCall('PausePatchDeployment', $request, $callOptions)->wait(); - } - - /** - * Change state of patch deployment back to "ACTIVE". - * Patch deployment in active state continues to generate patch jobs. - * - * The async variant is {@see OsConfigServiceClient::resumePatchDeploymentAsync()} - * . - * - * @example samples/V1/OsConfigServiceClient/resume_patch_deployment.php - * - * @param ResumePatchDeploymentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PatchDeployment - * - * @throws ApiException Thrown if the API call fails. - */ - public function resumePatchDeployment(ResumePatchDeploymentRequest $request, array $callOptions = []): PatchDeployment - { - return $this->startApiCall('ResumePatchDeployment', $request, $callOptions)->wait(); - } - - /** - * Update an OS Config patch deployment. - * - * The async variant is {@see OsConfigServiceClient::updatePatchDeploymentAsync()} - * . - * - * @example samples/V1/OsConfigServiceClient/update_patch_deployment.php - * - * @param UpdatePatchDeploymentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PatchDeployment - * - * @throws ApiException Thrown if the API call fails. - */ - public function updatePatchDeployment(UpdatePatchDeploymentRequest $request, array $callOptions = []): PatchDeployment - { - return $this->startApiCall('UpdatePatchDeployment', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/OsConfig/v1/src/V1/Client/OsConfigZonalServiceClient.php b/owl-bot-staging/OsConfig/v1/src/V1/Client/OsConfigZonalServiceClient.php deleted file mode 100644 index c96ac054c68d..000000000000 --- a/owl-bot-staging/OsConfig/v1/src/V1/Client/OsConfigZonalServiceClient.php +++ /dev/null @@ -1,821 +0,0 @@ - createOSPolicyAssignmentAsync(CreateOSPolicyAssignmentRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteOSPolicyAssignmentAsync(DeleteOSPolicyAssignmentRequest $request, array $optionalArgs = []) - * @method PromiseInterface getInventoryAsync(GetInventoryRequest $request, array $optionalArgs = []) - * @method PromiseInterface getOSPolicyAssignmentAsync(GetOSPolicyAssignmentRequest $request, array $optionalArgs = []) - * @method PromiseInterface getOSPolicyAssignmentReportAsync(GetOSPolicyAssignmentReportRequest $request, array $optionalArgs = []) - * @method PromiseInterface getVulnerabilityReportAsync(GetVulnerabilityReportRequest $request, array $optionalArgs = []) - * @method PromiseInterface listInventoriesAsync(ListInventoriesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listOSPolicyAssignmentReportsAsync(ListOSPolicyAssignmentReportsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listOSPolicyAssignmentRevisionsAsync(ListOSPolicyAssignmentRevisionsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listOSPolicyAssignmentsAsync(ListOSPolicyAssignmentsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listVulnerabilityReportsAsync(ListVulnerabilityReportsRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateOSPolicyAssignmentAsync(UpdateOSPolicyAssignmentRequest $request, array $optionalArgs = []) - */ -final class OsConfigZonalServiceClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.osconfig.v1.OsConfigZonalService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'osconfig.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'osconfig.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/os_config_zonal_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/os_config_zonal_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/os_config_zonal_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/os_config_zonal_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Create the default operation client for the service. - * - * @param array $options ClientOptions for the client. - * - * @return OperationsClient - */ - private function createOperationsClient(array $options) - { - // Unset client-specific configuration options - unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); - - if (isset($options['operationsClient'])) { - return $options['operationsClient']; - } - - return new OperationsClient($options); - } - - /** - * Formats a string containing the fully-qualified path to represent a instance - * resource. - * - * @param string $project - * @param string $zone - * @param string $instance - * - * @return string The formatted instance resource. - */ - public static function instanceName(string $project, string $zone, string $instance): string - { - return self::getPathTemplate('instance')->render([ - 'project' => $project, - 'zone' => $zone, - 'instance' => $instance, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * instance_os_policy_assignment resource. - * - * @param string $project - * @param string $location - * @param string $instance - * @param string $assignment - * - * @return string The formatted instance_os_policy_assignment resource. - */ - public static function instanceOSPolicyAssignmentName(string $project, string $location, string $instance, string $assignment): string - { - return self::getPathTemplate('instanceOSPolicyAssignment')->render([ - 'project' => $project, - 'location' => $location, - 'instance' => $instance, - 'assignment' => $assignment, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a inventory - * resource. - * - * @param string $project - * @param string $location - * @param string $instance - * - * @return string The formatted inventory resource. - */ - public static function inventoryName(string $project, string $location, string $instance): string - { - return self::getPathTemplate('inventory')->render([ - 'project' => $project, - 'location' => $location, - 'instance' => $instance, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a location - * resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted location resource. - */ - public static function locationName(string $project, string $location): string - { - return self::getPathTemplate('location')->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * os_policy_assignment resource. - * - * @param string $project - * @param string $location - * @param string $osPolicyAssignment - * - * @return string The formatted os_policy_assignment resource. - */ - public static function oSPolicyAssignmentName(string $project, string $location, string $osPolicyAssignment): string - { - return self::getPathTemplate('oSPolicyAssignment')->render([ - 'project' => $project, - 'location' => $location, - 'os_policy_assignment' => $osPolicyAssignment, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * os_policy_assignment_report resource. - * - * @param string $project - * @param string $location - * @param string $instance - * @param string $assignment - * - * @return string The formatted os_policy_assignment_report resource. - */ - public static function oSPolicyAssignmentReportName(string $project, string $location, string $instance, string $assignment): string - { - return self::getPathTemplate('oSPolicyAssignmentReport')->render([ - 'project' => $project, - 'location' => $location, - 'instance' => $instance, - 'assignment' => $assignment, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_instance resource. - * - * @param string $project - * @param string $location - * @param string $instance - * - * @return string The formatted project_location_instance resource. - */ - public static function projectLocationInstanceName(string $project, string $location, string $instance): string - { - return self::getPathTemplate('projectLocationInstance')->render([ - 'project' => $project, - 'location' => $location, - 'instance' => $instance, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_zone_instance resource. - * - * @param string $project - * @param string $zone - * @param string $instance - * - * @return string The formatted project_zone_instance resource. - */ - public static function projectZoneInstanceName(string $project, string $zone, string $instance): string - { - return self::getPathTemplate('projectZoneInstance')->render([ - 'project' => $project, - 'zone' => $zone, - 'instance' => $instance, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * vulnerability_report resource. - * - * @param string $project - * @param string $location - * @param string $instance - * - * @return string The formatted vulnerability_report resource. - */ - public static function vulnerabilityReportName(string $project, string $location, string $instance): string - { - return self::getPathTemplate('vulnerabilityReport')->render([ - 'project' => $project, - 'location' => $location, - 'instance' => $instance, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - instance: projects/{project}/zones/{zone}/instances/{instance} - * - instanceOSPolicyAssignment: projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment} - * - inventory: projects/{project}/locations/{location}/instances/{instance}/inventory - * - location: projects/{project}/locations/{location} - * - oSPolicyAssignment: projects/{project}/locations/{location}/osPolicyAssignments/{os_policy_assignment} - * - oSPolicyAssignmentReport: projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}/report - * - projectLocationInstance: projects/{project}/locations/{location}/instances/{instance} - * - projectZoneInstance: projects/{project}/zones/{zone}/instances/{instance} - * - vulnerabilityReport: projects/{project}/locations/{location}/instances/{instance}/vulnerabilityReport - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param ?string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, ?string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'osconfig.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Create an OS policy assignment. - * - * This method also creates the first revision of the OS policy assignment. - * - * This method returns a long running operation (LRO) that contains the - * rollout details. The rollout can be cancelled by cancelling the LRO. - * - * For more information, see [Method: - * projects.locations.osPolicyAssignments.operations.cancel](https://cloud.google.com/compute/docs/osconfig/rest/v1/projects.locations.osPolicyAssignments.operations/cancel). - * - * The async variant is - * {@see OsConfigZonalServiceClient::createOSPolicyAssignmentAsync()} . - * - * @example samples/V1/OsConfigZonalServiceClient/create_os_policy_assignment.php - * - * @param CreateOSPolicyAssignmentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createOSPolicyAssignment(CreateOSPolicyAssignmentRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateOSPolicyAssignment', $request, $callOptions)->wait(); - } - - /** - * Delete the OS policy assignment. - * - * This method creates a new revision of the OS policy assignment. - * - * This method returns a long running operation (LRO) that contains the - * rollout details. The rollout can be cancelled by cancelling the LRO. - * - * If the LRO completes and is not cancelled, all revisions associated with - * the OS policy assignment are deleted. - * - * For more information, see [Method: - * projects.locations.osPolicyAssignments.operations.cancel](https://cloud.google.com/compute/docs/osconfig/rest/v1/projects.locations.osPolicyAssignments.operations/cancel). - * - * The async variant is - * {@see OsConfigZonalServiceClient::deleteOSPolicyAssignmentAsync()} . - * - * @example samples/V1/OsConfigZonalServiceClient/delete_os_policy_assignment.php - * - * @param DeleteOSPolicyAssignmentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteOSPolicyAssignment(DeleteOSPolicyAssignmentRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteOSPolicyAssignment', $request, $callOptions)->wait(); - } - - /** - * Get inventory data for the specified VM instance. If the VM has no - * associated inventory, the message `NOT_FOUND` is returned. - * - * The async variant is {@see OsConfigZonalServiceClient::getInventoryAsync()} . - * - * @example samples/V1/OsConfigZonalServiceClient/get_inventory.php - * - * @param GetInventoryRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Inventory - * - * @throws ApiException Thrown if the API call fails. - */ - public function getInventory(GetInventoryRequest $request, array $callOptions = []): Inventory - { - return $this->startApiCall('GetInventory', $request, $callOptions)->wait(); - } - - /** - * Retrieve an existing OS policy assignment. - * - * This method always returns the latest revision. In order to retrieve a - * previous revision of the assignment, also provide the revision ID in the - * `name` parameter. - * - * The async variant is - * {@see OsConfigZonalServiceClient::getOSPolicyAssignmentAsync()} . - * - * @example samples/V1/OsConfigZonalServiceClient/get_os_policy_assignment.php - * - * @param GetOSPolicyAssignmentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OSPolicyAssignment - * - * @throws ApiException Thrown if the API call fails. - */ - public function getOSPolicyAssignment(GetOSPolicyAssignmentRequest $request, array $callOptions = []): OSPolicyAssignment - { - return $this->startApiCall('GetOSPolicyAssignment', $request, $callOptions)->wait(); - } - - /** - * Get the OS policy asssignment report for the specified Compute Engine VM - * instance. - * - * The async variant is - * {@see OsConfigZonalServiceClient::getOSPolicyAssignmentReportAsync()} . - * - * @example samples/V1/OsConfigZonalServiceClient/get_os_policy_assignment_report.php - * - * @param GetOSPolicyAssignmentReportRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OSPolicyAssignmentReport - * - * @throws ApiException Thrown if the API call fails. - */ - public function getOSPolicyAssignmentReport(GetOSPolicyAssignmentReportRequest $request, array $callOptions = []): OSPolicyAssignmentReport - { - return $this->startApiCall('GetOSPolicyAssignmentReport', $request, $callOptions)->wait(); - } - - /** - * Gets the vulnerability report for the specified VM instance. Only VMs with - * inventory data have vulnerability reports associated with them. - * - * The async variant is - * {@see OsConfigZonalServiceClient::getVulnerabilityReportAsync()} . - * - * @example samples/V1/OsConfigZonalServiceClient/get_vulnerability_report.php - * - * @param GetVulnerabilityReportRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return VulnerabilityReport - * - * @throws ApiException Thrown if the API call fails. - */ - public function getVulnerabilityReport(GetVulnerabilityReportRequest $request, array $callOptions = []): VulnerabilityReport - { - return $this->startApiCall('GetVulnerabilityReport', $request, $callOptions)->wait(); - } - - /** - * List inventory data for all VM instances in the specified zone. - * - * The async variant is {@see OsConfigZonalServiceClient::listInventoriesAsync()} . - * - * @example samples/V1/OsConfigZonalServiceClient/list_inventories.php - * - * @param ListInventoriesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listInventories(ListInventoriesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListInventories', $request, $callOptions); - } - - /** - * List OS policy asssignment reports for all Compute Engine VM instances in - * the specified zone. - * - * The async variant is - * {@see OsConfigZonalServiceClient::listOSPolicyAssignmentReportsAsync()} . - * - * @example samples/V1/OsConfigZonalServiceClient/list_os_policy_assignment_reports.php - * - * @param ListOSPolicyAssignmentReportsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listOSPolicyAssignmentReports(ListOSPolicyAssignmentReportsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListOSPolicyAssignmentReports', $request, $callOptions); - } - - /** - * List the OS policy assignment revisions for a given OS policy assignment. - * - * The async variant is - * {@see OsConfigZonalServiceClient::listOSPolicyAssignmentRevisionsAsync()} . - * - * @example samples/V1/OsConfigZonalServiceClient/list_os_policy_assignment_revisions.php - * - * @param ListOSPolicyAssignmentRevisionsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listOSPolicyAssignmentRevisions(ListOSPolicyAssignmentRevisionsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListOSPolicyAssignmentRevisions', $request, $callOptions); - } - - /** - * List the OS policy assignments under the parent resource. - * - * For each OS policy assignment, the latest revision is returned. - * - * The async variant is - * {@see OsConfigZonalServiceClient::listOSPolicyAssignmentsAsync()} . - * - * @example samples/V1/OsConfigZonalServiceClient/list_os_policy_assignments.php - * - * @param ListOSPolicyAssignmentsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listOSPolicyAssignments(ListOSPolicyAssignmentsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListOSPolicyAssignments', $request, $callOptions); - } - - /** - * List vulnerability reports for all VM instances in the specified zone. - * - * The async variant is - * {@see OsConfigZonalServiceClient::listVulnerabilityReportsAsync()} . - * - * @example samples/V1/OsConfigZonalServiceClient/list_vulnerability_reports.php - * - * @param ListVulnerabilityReportsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listVulnerabilityReports(ListVulnerabilityReportsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListVulnerabilityReports', $request, $callOptions); - } - - /** - * Update an existing OS policy assignment. - * - * This method creates a new revision of the OS policy assignment. - * - * This method returns a long running operation (LRO) that contains the - * rollout details. The rollout can be cancelled by cancelling the LRO. - * - * For more information, see [Method: - * projects.locations.osPolicyAssignments.operations.cancel](https://cloud.google.com/compute/docs/osconfig/rest/v1/projects.locations.osPolicyAssignments.operations/cancel). - * - * The async variant is - * {@see OsConfigZonalServiceClient::updateOSPolicyAssignmentAsync()} . - * - * @example samples/V1/OsConfigZonalServiceClient/update_os_policy_assignment.php - * - * @param UpdateOSPolicyAssignmentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateOSPolicyAssignment(UpdateOSPolicyAssignmentRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateOSPolicyAssignment', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/OsConfig/v1/src/V1/gapic_metadata.json b/owl-bot-staging/OsConfig/v1/src/V1/gapic_metadata.json deleted file mode 100644 index 247dd1093fab..000000000000 --- a/owl-bot-staging/OsConfig/v1/src/V1/gapic_metadata.json +++ /dev/null @@ -1,147 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.osconfig.v1", - "libraryPackage": "Google\\Cloud\\OsConfig\\V1", - "services": { - "OsConfigService": { - "clients": { - "grpc": { - "libraryClient": "OsConfigServiceGapicClient", - "rpcs": { - "CancelPatchJob": { - "methods": [ - "cancelPatchJob" - ] - }, - "CreatePatchDeployment": { - "methods": [ - "createPatchDeployment" - ] - }, - "DeletePatchDeployment": { - "methods": [ - "deletePatchDeployment" - ] - }, - "ExecutePatchJob": { - "methods": [ - "executePatchJob" - ] - }, - "GetPatchDeployment": { - "methods": [ - "getPatchDeployment" - ] - }, - "GetPatchJob": { - "methods": [ - "getPatchJob" - ] - }, - "ListPatchDeployments": { - "methods": [ - "listPatchDeployments" - ] - }, - "ListPatchJobInstanceDetails": { - "methods": [ - "listPatchJobInstanceDetails" - ] - }, - "ListPatchJobs": { - "methods": [ - "listPatchJobs" - ] - }, - "PausePatchDeployment": { - "methods": [ - "pausePatchDeployment" - ] - }, - "ResumePatchDeployment": { - "methods": [ - "resumePatchDeployment" - ] - }, - "UpdatePatchDeployment": { - "methods": [ - "updatePatchDeployment" - ] - } - } - } - } - }, - "OsConfigZonalService": { - "clients": { - "grpc": { - "libraryClient": "OsConfigZonalServiceGapicClient", - "rpcs": { - "CreateOSPolicyAssignment": { - "methods": [ - "createOSPolicyAssignment" - ] - }, - "DeleteOSPolicyAssignment": { - "methods": [ - "deleteOSPolicyAssignment" - ] - }, - "GetInventory": { - "methods": [ - "getInventory" - ] - }, - "GetOSPolicyAssignment": { - "methods": [ - "getOSPolicyAssignment" - ] - }, - "GetOSPolicyAssignmentReport": { - "methods": [ - "getOSPolicyAssignmentReport" - ] - }, - "GetVulnerabilityReport": { - "methods": [ - "getVulnerabilityReport" - ] - }, - "ListInventories": { - "methods": [ - "listInventories" - ] - }, - "ListOSPolicyAssignmentReports": { - "methods": [ - "listOSPolicyAssignmentReports" - ] - }, - "ListOSPolicyAssignmentRevisions": { - "methods": [ - "listOSPolicyAssignmentRevisions" - ] - }, - "ListOSPolicyAssignments": { - "methods": [ - "listOSPolicyAssignments" - ] - }, - "ListVulnerabilityReports": { - "methods": [ - "listVulnerabilityReports" - ] - }, - "UpdateOSPolicyAssignment": { - "methods": [ - "updateOSPolicyAssignment" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/OsConfig/v1/src/V1/resources/os_config_service_client_config.json b/owl-bot-staging/OsConfig/v1/src/V1/resources/os_config_service_client_config.json deleted file mode 100644 index 46ee0df83ec8..000000000000 --- a/owl-bot-staging/OsConfig/v1/src/V1/resources/os_config_service_client_config.json +++ /dev/null @@ -1,94 +0,0 @@ -{ - "interfaces": { - "google.cloud.osconfig.v1.OsConfigService": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE" - ] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "retry_policy_1_params": { - "initial_retry_delay_millis": 1000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": { - "CancelPatchJob": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "CreatePatchDeployment": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "DeletePatchDeployment": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ExecutePatchJob": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetPatchDeployment": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetPatchJob": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListPatchDeployments": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListPatchJobInstanceDetails": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListPatchJobs": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "PausePatchDeployment": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ResumePatchDeployment": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdatePatchDeployment": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/OsConfig/v1/src/V1/resources/os_config_service_descriptor_config.php b/owl-bot-staging/OsConfig/v1/src/V1/resources/os_config_service_descriptor_config.php deleted file mode 100644 index 9ea9f6165176..000000000000 --- a/owl-bot-staging/OsConfig/v1/src/V1/resources/os_config_service_descriptor_config.php +++ /dev/null @@ -1,202 +0,0 @@ - [ - 'google.cloud.osconfig.v1.OsConfigService' => [ - 'CancelPatchJob' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\OsConfig\V1\PatchJob', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'CreatePatchDeployment' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\OsConfig\V1\PatchDeployment', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeletePatchDeployment' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ExecutePatchJob' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\OsConfig\V1\PatchJob', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'GetPatchDeployment' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\OsConfig\V1\PatchDeployment', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetPatchJob' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\OsConfig\V1\PatchJob', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListPatchDeployments' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getPatchDeployments', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\OsConfig\V1\ListPatchDeploymentsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListPatchJobInstanceDetails' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getPatchJobInstanceDetails', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\OsConfig\V1\ListPatchJobInstanceDetailsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListPatchJobs' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getPatchJobs', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\OsConfig\V1\ListPatchJobsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'PausePatchDeployment' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\OsConfig\V1\PatchDeployment', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ResumePatchDeployment' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\OsConfig\V1\PatchDeployment', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdatePatchDeployment' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\OsConfig\V1\PatchDeployment', - 'headerParams' => [ - [ - 'keyName' => 'patch_deployment.name', - 'fieldAccessors' => [ - 'getPatchDeployment', - 'getName', - ], - ], - ], - ], - 'templateMap' => [ - 'patchDeployment' => 'projects/{project}/patchDeployments/{patch_deployment}', - 'patchJob' => 'projects/{project}/patchJobs/{patch_job}', - 'project' => 'projects/{project}', - ], - ], - ], -]; diff --git a/owl-bot-staging/OsConfig/v1/src/V1/resources/os_config_service_rest_client_config.php b/owl-bot-staging/OsConfig/v1/src/V1/resources/os_config_service_rest_client_config.php deleted file mode 100644 index eefb6ab786c2..000000000000 --- a/owl-bot-staging/OsConfig/v1/src/V1/resources/os_config_service_rest_client_config.php +++ /dev/null @@ -1,196 +0,0 @@ - [ - 'google.cloud.osconfig.v1.OsConfigService' => [ - 'CancelPatchJob' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/patchJobs/*}:cancel', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'CreatePatchDeployment' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*}/patchDeployments', - 'body' => 'patch_deployment', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'patch_deployment_id', - ], - ], - 'DeletePatchDeployment' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/patchDeployments/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ExecutePatchJob' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*}/patchJobs:execute', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'GetPatchDeployment' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/patchDeployments/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetPatchJob' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/patchJobs/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListPatchDeployments' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*}/patchDeployments', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListPatchJobInstanceDetails' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/patchJobs/*}/instanceDetails', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListPatchJobs' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*}/patchJobs', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'PausePatchDeployment' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/patchDeployments/*}:pause', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ResumePatchDeployment' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/patchDeployments/*}:resume', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'UpdatePatchDeployment' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{patch_deployment.name=projects/*/patchDeployments/*}', - 'body' => 'patch_deployment', - 'placeholders' => [ - 'patch_deployment.name' => [ - 'getters' => [ - 'getPatchDeployment', - 'getName', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/osPolicyAssignments/*/operations/*}:cancel', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/osPolicyAssignments/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/OsConfig/v1/src/V1/resources/os_config_zonal_service_client_config.json b/owl-bot-staging/OsConfig/v1/src/V1/resources/os_config_zonal_service_client_config.json deleted file mode 100644 index 2c7785e13e2c..000000000000 --- a/owl-bot-staging/OsConfig/v1/src/V1/resources/os_config_zonal_service_client_config.json +++ /dev/null @@ -1,94 +0,0 @@ -{ - "interfaces": { - "google.cloud.osconfig.v1.OsConfigZonalService": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE" - ] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "retry_policy_1_params": { - "initial_retry_delay_millis": 1000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": { - "CreateOSPolicyAssignment": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "DeleteOSPolicyAssignment": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetInventory": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetOSPolicyAssignment": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetOSPolicyAssignmentReport": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetVulnerabilityReport": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListInventories": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListOSPolicyAssignmentReports": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListOSPolicyAssignmentRevisions": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListOSPolicyAssignments": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListVulnerabilityReports": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateOSPolicyAssignment": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/OsConfig/v1/src/V1/resources/os_config_zonal_service_descriptor_config.php b/owl-bot-staging/OsConfig/v1/src/V1/resources/os_config_zonal_service_descriptor_config.php deleted file mode 100644 index c02c4e8d16c9..000000000000 --- a/owl-bot-staging/OsConfig/v1/src/V1/resources/os_config_zonal_service_descriptor_config.php +++ /dev/null @@ -1,245 +0,0 @@ - [ - 'google.cloud.osconfig.v1.OsConfigZonalService' => [ - 'CreateOSPolicyAssignment' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\OsConfig\V1\OSPolicyAssignment', - 'metadataReturnType' => '\Google\Cloud\OsConfig\V1\OSPolicyAssignmentOperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteOSPolicyAssignment' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\OsConfig\V1\OSPolicyAssignmentOperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateOSPolicyAssignment' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\OsConfig\V1\OSPolicyAssignment', - 'metadataReturnType' => '\Google\Cloud\OsConfig\V1\OSPolicyAssignmentOperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'os_policy_assignment.name', - 'fieldAccessors' => [ - 'getOsPolicyAssignment', - 'getName', - ], - ], - ], - ], - 'GetInventory' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\OsConfig\V1\Inventory', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetOSPolicyAssignment' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\OsConfig\V1\OSPolicyAssignment', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetOSPolicyAssignmentReport' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\OsConfig\V1\OSPolicyAssignmentReport', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetVulnerabilityReport' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\OsConfig\V1\VulnerabilityReport', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListInventories' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getInventories', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\OsConfig\V1\ListInventoriesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListOSPolicyAssignmentReports' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getOsPolicyAssignmentReports', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\OsConfig\V1\ListOSPolicyAssignmentReportsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListOSPolicyAssignmentRevisions' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getOsPolicyAssignments', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\OsConfig\V1\ListOSPolicyAssignmentRevisionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListOSPolicyAssignments' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getOsPolicyAssignments', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\OsConfig\V1\ListOSPolicyAssignmentsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListVulnerabilityReports' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getVulnerabilityReports', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\OsConfig\V1\ListVulnerabilityReportsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'templateMap' => [ - 'instance' => 'projects/{project}/zones/{zone}/instances/{instance}', - 'instanceOSPolicyAssignment' => 'projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}', - 'inventory' => 'projects/{project}/locations/{location}/instances/{instance}/inventory', - 'location' => 'projects/{project}/locations/{location}', - 'oSPolicyAssignment' => 'projects/{project}/locations/{location}/osPolicyAssignments/{os_policy_assignment}', - 'oSPolicyAssignmentReport' => 'projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}/report', - 'projectLocationInstance' => 'projects/{project}/locations/{location}/instances/{instance}', - 'projectZoneInstance' => 'projects/{project}/zones/{zone}/instances/{instance}', - 'vulnerabilityReport' => 'projects/{project}/locations/{location}/instances/{instance}/vulnerabilityReport', - ], - ], - ], -]; diff --git a/owl-bot-staging/OsConfig/v1/src/V1/resources/os_config_zonal_service_rest_client_config.php b/owl-bot-staging/OsConfig/v1/src/V1/resources/os_config_zonal_service_rest_client_config.php deleted file mode 100644 index 5ac6fb548708..000000000000 --- a/owl-bot-staging/OsConfig/v1/src/V1/resources/os_config_zonal_service_rest_client_config.php +++ /dev/null @@ -1,192 +0,0 @@ - [ - 'google.cloud.osconfig.v1.OsConfigZonalService' => [ - 'CreateOSPolicyAssignment' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/osPolicyAssignments', - 'body' => 'os_policy_assignment', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'os_policy_assignment_id', - ], - ], - 'DeleteOSPolicyAssignment' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/osPolicyAssignments/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetInventory' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/inventory}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOSPolicyAssignment' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/osPolicyAssignments/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOSPolicyAssignmentReport' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/osPolicyAssignments/*/report}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetVulnerabilityReport' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*/vulnerabilityReport}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListInventories' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/instances/*}/inventories', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListOSPolicyAssignmentReports' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/instances/*/osPolicyAssignments/*}/reports', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListOSPolicyAssignmentRevisions' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/osPolicyAssignments/*}:listRevisions', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOSPolicyAssignments' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/osPolicyAssignments', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListVulnerabilityReports' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/instances/*}/vulnerabilityReports', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateOSPolicyAssignment' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{os_policy_assignment.name=projects/*/locations/*/osPolicyAssignments/*}', - 'body' => 'os_policy_assignment', - 'placeholders' => [ - 'os_policy_assignment.name' => [ - 'getters' => [ - 'getOsPolicyAssignment', - 'getName', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/osPolicyAssignments/*/operations/*}:cancel', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/osPolicyAssignments/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/OsConfig/v1/tests/Unit/V1/Client/OsConfigServiceClientTest.php b/owl-bot-staging/OsConfig/v1/tests/Unit/V1/Client/OsConfigServiceClientTest.php deleted file mode 100644 index bc99c9315760..000000000000 --- a/owl-bot-staging/OsConfig/v1/tests/Unit/V1/Client/OsConfigServiceClientTest.php +++ /dev/null @@ -1,1000 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return OsConfigServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new OsConfigServiceClient($options); - } - - /** @test */ - public function cancelPatchJobTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $dryRun = false; - $errorMessage = 'errorMessage-1938755376'; - $percentComplete = -1.96096922E8; - $patchDeployment = 'patchDeployment633565980'; - $expectedResponse = new PatchJob(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setDryRun($dryRun); - $expectedResponse->setErrorMessage($errorMessage); - $expectedResponse->setPercentComplete($percentComplete); - $expectedResponse->setPatchDeployment($patchDeployment); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->patchJobName('[PROJECT]', '[PATCH_JOB]'); - $request = (new CancelPatchJobRequest()) - ->setName($formattedName); - $response = $gapicClient->cancelPatchJob($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.osconfig.v1.OsConfigService/CancelPatchJob', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function cancelPatchJobExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->patchJobName('[PROJECT]', '[PATCH_JOB]'); - $request = (new CancelPatchJobRequest()) - ->setName($formattedName); - try { - $gapicClient->cancelPatchJob($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createPatchDeploymentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $description = 'description-1724546052'; - $expectedResponse = new PatchDeployment(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $patchDeploymentId = 'patchDeploymentId-1817061090'; - $patchDeployment = new PatchDeployment(); - $patchDeploymentInstanceFilter = new PatchInstanceFilter(); - $patchDeployment->setInstanceFilter($patchDeploymentInstanceFilter); - $patchDeploymentOneTimeSchedule = new OneTimeSchedule(); - $oneTimeScheduleExecuteTime = new Timestamp(); - $patchDeploymentOneTimeSchedule->setExecuteTime($oneTimeScheduleExecuteTime); - $patchDeployment->setOneTimeSchedule($patchDeploymentOneTimeSchedule); - $request = (new CreatePatchDeploymentRequest()) - ->setParent($formattedParent) - ->setPatchDeploymentId($patchDeploymentId) - ->setPatchDeployment($patchDeployment); - $response = $gapicClient->createPatchDeployment($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.osconfig.v1.OsConfigService/CreatePatchDeployment', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getPatchDeploymentId(); - $this->assertProtobufEquals($patchDeploymentId, $actualValue); - $actualValue = $actualRequestObject->getPatchDeployment(); - $this->assertProtobufEquals($patchDeployment, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createPatchDeploymentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $patchDeploymentId = 'patchDeploymentId-1817061090'; - $patchDeployment = new PatchDeployment(); - $patchDeploymentInstanceFilter = new PatchInstanceFilter(); - $patchDeployment->setInstanceFilter($patchDeploymentInstanceFilter); - $patchDeploymentOneTimeSchedule = new OneTimeSchedule(); - $oneTimeScheduleExecuteTime = new Timestamp(); - $patchDeploymentOneTimeSchedule->setExecuteTime($oneTimeScheduleExecuteTime); - $patchDeployment->setOneTimeSchedule($patchDeploymentOneTimeSchedule); - $request = (new CreatePatchDeploymentRequest()) - ->setParent($formattedParent) - ->setPatchDeploymentId($patchDeploymentId) - ->setPatchDeployment($patchDeployment); - try { - $gapicClient->createPatchDeployment($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deletePatchDeploymentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->patchDeploymentName('[PROJECT]', '[PATCH_DEPLOYMENT]'); - $request = (new DeletePatchDeploymentRequest()) - ->setName($formattedName); - $gapicClient->deletePatchDeployment($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.osconfig.v1.OsConfigService/DeletePatchDeployment', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deletePatchDeploymentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->patchDeploymentName('[PROJECT]', '[PATCH_DEPLOYMENT]'); - $request = (new DeletePatchDeploymentRequest()) - ->setName($formattedName); - try { - $gapicClient->deletePatchDeployment($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function executePatchJobTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName2 = 'displayName21615000987'; - $description2 = 'description2568623279'; - $dryRun2 = true; - $errorMessage = 'errorMessage-1938755376'; - $percentComplete = -1.96096922E8; - $patchDeployment = 'patchDeployment633565980'; - $expectedResponse = new PatchJob(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName2); - $expectedResponse->setDescription($description2); - $expectedResponse->setDryRun($dryRun2); - $expectedResponse->setErrorMessage($errorMessage); - $expectedResponse->setPercentComplete($percentComplete); - $expectedResponse->setPatchDeployment($patchDeployment); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $instanceFilter = new PatchInstanceFilter(); - $request = (new ExecutePatchJobRequest()) - ->setParent($formattedParent) - ->setInstanceFilter($instanceFilter); - $response = $gapicClient->executePatchJob($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.osconfig.v1.OsConfigService/ExecutePatchJob', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getInstanceFilter(); - $this->assertProtobufEquals($instanceFilter, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function executePatchJobExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $instanceFilter = new PatchInstanceFilter(); - $request = (new ExecutePatchJobRequest()) - ->setParent($formattedParent) - ->setInstanceFilter($instanceFilter); - try { - $gapicClient->executePatchJob($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getPatchDeploymentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $expectedResponse = new PatchDeployment(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->patchDeploymentName('[PROJECT]', '[PATCH_DEPLOYMENT]'); - $request = (new GetPatchDeploymentRequest()) - ->setName($formattedName); - $response = $gapicClient->getPatchDeployment($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.osconfig.v1.OsConfigService/GetPatchDeployment', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getPatchDeploymentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->patchDeploymentName('[PROJECT]', '[PATCH_DEPLOYMENT]'); - $request = (new GetPatchDeploymentRequest()) - ->setName($formattedName); - try { - $gapicClient->getPatchDeployment($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getPatchJobTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $dryRun = false; - $errorMessage = 'errorMessage-1938755376'; - $percentComplete = -1.96096922E8; - $patchDeployment = 'patchDeployment633565980'; - $expectedResponse = new PatchJob(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setDryRun($dryRun); - $expectedResponse->setErrorMessage($errorMessage); - $expectedResponse->setPercentComplete($percentComplete); - $expectedResponse->setPatchDeployment($patchDeployment); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->patchJobName('[PROJECT]', '[PATCH_JOB]'); - $request = (new GetPatchJobRequest()) - ->setName($formattedName); - $response = $gapicClient->getPatchJob($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.osconfig.v1.OsConfigService/GetPatchJob', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getPatchJobExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->patchJobName('[PROJECT]', '[PATCH_JOB]'); - $request = (new GetPatchJobRequest()) - ->setName($formattedName); - try { - $gapicClient->getPatchJob($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listPatchDeploymentsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $patchDeploymentsElement = new PatchDeployment(); - $patchDeployments = [ - $patchDeploymentsElement, - ]; - $expectedResponse = new ListPatchDeploymentsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setPatchDeployments($patchDeployments); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $request = (new ListPatchDeploymentsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listPatchDeployments($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getPatchDeployments()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.osconfig.v1.OsConfigService/ListPatchDeployments', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listPatchDeploymentsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $request = (new ListPatchDeploymentsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listPatchDeployments($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listPatchJobInstanceDetailsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $patchJobInstanceDetailsElement = new PatchJobInstanceDetails(); - $patchJobInstanceDetails = [ - $patchJobInstanceDetailsElement, - ]; - $expectedResponse = new ListPatchJobInstanceDetailsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setPatchJobInstanceDetails($patchJobInstanceDetails); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->patchJobName('[PROJECT]', '[PATCH_JOB]'); - $request = (new ListPatchJobInstanceDetailsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listPatchJobInstanceDetails($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getPatchJobInstanceDetails()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.osconfig.v1.OsConfigService/ListPatchJobInstanceDetails', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listPatchJobInstanceDetailsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->patchJobName('[PROJECT]', '[PATCH_JOB]'); - $request = (new ListPatchJobInstanceDetailsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listPatchJobInstanceDetails($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listPatchJobsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $patchJobsElement = new PatchJob(); - $patchJobs = [ - $patchJobsElement, - ]; - $expectedResponse = new ListPatchJobsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setPatchJobs($patchJobs); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $request = (new ListPatchJobsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listPatchJobs($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getPatchJobs()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.osconfig.v1.OsConfigService/ListPatchJobs', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listPatchJobsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $request = (new ListPatchJobsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listPatchJobs($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function pausePatchDeploymentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $expectedResponse = new PatchDeployment(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->patchDeploymentName('[PROJECT]', '[PATCH_DEPLOYMENT]'); - $request = (new PausePatchDeploymentRequest()) - ->setName($formattedName); - $response = $gapicClient->pausePatchDeployment($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.osconfig.v1.OsConfigService/PausePatchDeployment', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function pausePatchDeploymentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->patchDeploymentName('[PROJECT]', '[PATCH_DEPLOYMENT]'); - $request = (new PausePatchDeploymentRequest()) - ->setName($formattedName); - try { - $gapicClient->pausePatchDeployment($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function resumePatchDeploymentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $expectedResponse = new PatchDeployment(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->patchDeploymentName('[PROJECT]', '[PATCH_DEPLOYMENT]'); - $request = (new ResumePatchDeploymentRequest()) - ->setName($formattedName); - $response = $gapicClient->resumePatchDeployment($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.osconfig.v1.OsConfigService/ResumePatchDeployment', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function resumePatchDeploymentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->patchDeploymentName('[PROJECT]', '[PATCH_DEPLOYMENT]'); - $request = (new ResumePatchDeploymentRequest()) - ->setName($formattedName); - try { - $gapicClient->resumePatchDeployment($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updatePatchDeploymentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $description = 'description-1724546052'; - $expectedResponse = new PatchDeployment(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $patchDeployment = new PatchDeployment(); - $patchDeploymentInstanceFilter = new PatchInstanceFilter(); - $patchDeployment->setInstanceFilter($patchDeploymentInstanceFilter); - $patchDeploymentOneTimeSchedule = new OneTimeSchedule(); - $oneTimeScheduleExecuteTime = new Timestamp(); - $patchDeploymentOneTimeSchedule->setExecuteTime($oneTimeScheduleExecuteTime); - $patchDeployment->setOneTimeSchedule($patchDeploymentOneTimeSchedule); - $request = (new UpdatePatchDeploymentRequest()) - ->setPatchDeployment($patchDeployment); - $response = $gapicClient->updatePatchDeployment($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.osconfig.v1.OsConfigService/UpdatePatchDeployment', $actualFuncCall); - $actualValue = $actualRequestObject->getPatchDeployment(); - $this->assertProtobufEquals($patchDeployment, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updatePatchDeploymentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $patchDeployment = new PatchDeployment(); - $patchDeploymentInstanceFilter = new PatchInstanceFilter(); - $patchDeployment->setInstanceFilter($patchDeploymentInstanceFilter); - $patchDeploymentOneTimeSchedule = new OneTimeSchedule(); - $oneTimeScheduleExecuteTime = new Timestamp(); - $patchDeploymentOneTimeSchedule->setExecuteTime($oneTimeScheduleExecuteTime); - $patchDeployment->setOneTimeSchedule($patchDeploymentOneTimeSchedule); - $request = (new UpdatePatchDeploymentRequest()) - ->setPatchDeployment($patchDeployment); - try { - $gapicClient->updatePatchDeployment($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function cancelPatchJobAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $dryRun = false; - $errorMessage = 'errorMessage-1938755376'; - $percentComplete = -1.96096922E8; - $patchDeployment = 'patchDeployment633565980'; - $expectedResponse = new PatchJob(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setDryRun($dryRun); - $expectedResponse->setErrorMessage($errorMessage); - $expectedResponse->setPercentComplete($percentComplete); - $expectedResponse->setPatchDeployment($patchDeployment); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->patchJobName('[PROJECT]', '[PATCH_JOB]'); - $request = (new CancelPatchJobRequest()) - ->setName($formattedName); - $response = $gapicClient->cancelPatchJobAsync($request)->wait(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.osconfig.v1.OsConfigService/CancelPatchJob', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/OsConfig/v1/tests/Unit/V1/Client/OsConfigZonalServiceClientTest.php b/owl-bot-staging/OsConfig/v1/tests/Unit/V1/Client/OsConfigZonalServiceClientTest.php deleted file mode 100644 index 4782dbbc2903..000000000000 --- a/owl-bot-staging/OsConfig/v1/tests/Unit/V1/Client/OsConfigZonalServiceClientTest.php +++ /dev/null @@ -1,1271 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return OsConfigZonalServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new OsConfigZonalServiceClient($options); - } - - /** @test */ - public function createOSPolicyAssignmentTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createOSPolicyAssignmentTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $revisionId = 'revisionId513861631'; - $etag = 'etag3123477'; - $baseline = false; - $deleted = false; - $reconciling = false; - $uid = 'uid115792'; - $expectedResponse = new OSPolicyAssignment(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setRevisionId($revisionId); - $expectedResponse->setEtag($etag); - $expectedResponse->setBaseline($baseline); - $expectedResponse->setDeleted($deleted); - $expectedResponse->setReconciling($reconciling); - $expectedResponse->setUid($uid); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createOSPolicyAssignmentTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $osPolicyAssignment = new OSPolicyAssignment(); - $osPolicyAssignmentOsPolicies = []; - $osPolicyAssignment->setOsPolicies($osPolicyAssignmentOsPolicies); - $osPolicyAssignmentInstanceFilter = new InstanceFilter(); - $osPolicyAssignment->setInstanceFilter($osPolicyAssignmentInstanceFilter); - $osPolicyAssignmentRollout = new Rollout(); - $rolloutDisruptionBudget = new FixedOrPercent(); - $osPolicyAssignmentRollout->setDisruptionBudget($rolloutDisruptionBudget); - $rolloutMinWaitDuration = new Duration(); - $osPolicyAssignmentRollout->setMinWaitDuration($rolloutMinWaitDuration); - $osPolicyAssignment->setRollout($osPolicyAssignmentRollout); - $osPolicyAssignmentId = 'osPolicyAssignmentId-1092208901'; - $request = (new CreateOSPolicyAssignmentRequest()) - ->setParent($formattedParent) - ->setOsPolicyAssignment($osPolicyAssignment) - ->setOsPolicyAssignmentId($osPolicyAssignmentId); - $response = $gapicClient->createOSPolicyAssignment($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.osconfig.v1.OsConfigZonalService/CreateOSPolicyAssignment', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getOsPolicyAssignment(); - $this->assertProtobufEquals($osPolicyAssignment, $actualValue); - $actualValue = $actualApiRequestObject->getOsPolicyAssignmentId(); - $this->assertProtobufEquals($osPolicyAssignmentId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createOSPolicyAssignmentTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createOSPolicyAssignmentExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createOSPolicyAssignmentTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $osPolicyAssignment = new OSPolicyAssignment(); - $osPolicyAssignmentOsPolicies = []; - $osPolicyAssignment->setOsPolicies($osPolicyAssignmentOsPolicies); - $osPolicyAssignmentInstanceFilter = new InstanceFilter(); - $osPolicyAssignment->setInstanceFilter($osPolicyAssignmentInstanceFilter); - $osPolicyAssignmentRollout = new Rollout(); - $rolloutDisruptionBudget = new FixedOrPercent(); - $osPolicyAssignmentRollout->setDisruptionBudget($rolloutDisruptionBudget); - $rolloutMinWaitDuration = new Duration(); - $osPolicyAssignmentRollout->setMinWaitDuration($rolloutMinWaitDuration); - $osPolicyAssignment->setRollout($osPolicyAssignmentRollout); - $osPolicyAssignmentId = 'osPolicyAssignmentId-1092208901'; - $request = (new CreateOSPolicyAssignmentRequest()) - ->setParent($formattedParent) - ->setOsPolicyAssignment($osPolicyAssignment) - ->setOsPolicyAssignmentId($osPolicyAssignmentId); - $response = $gapicClient->createOSPolicyAssignment($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createOSPolicyAssignmentTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteOSPolicyAssignmentTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteOSPolicyAssignmentTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteOSPolicyAssignmentTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->oSPolicyAssignmentName('[PROJECT]', '[LOCATION]', '[OS_POLICY_ASSIGNMENT]'); - $request = (new DeleteOSPolicyAssignmentRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteOSPolicyAssignment($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.osconfig.v1.OsConfigZonalService/DeleteOSPolicyAssignment', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteOSPolicyAssignmentTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteOSPolicyAssignmentExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteOSPolicyAssignmentTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->oSPolicyAssignmentName('[PROJECT]', '[LOCATION]', '[OS_POLICY_ASSIGNMENT]'); - $request = (new DeleteOSPolicyAssignmentRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteOSPolicyAssignment($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteOSPolicyAssignmentTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getInventoryTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new Inventory(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->inventoryName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $request = (new GetInventoryRequest()) - ->setName($formattedName); - $response = $gapicClient->getInventory($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.osconfig.v1.OsConfigZonalService/GetInventory', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getInventoryExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->inventoryName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $request = (new GetInventoryRequest()) - ->setName($formattedName); - try { - $gapicClient->getInventory($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getOSPolicyAssignmentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $revisionId = 'revisionId513861631'; - $etag = 'etag3123477'; - $baseline = false; - $deleted = false; - $reconciling = false; - $uid = 'uid115792'; - $expectedResponse = new OSPolicyAssignment(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setRevisionId($revisionId); - $expectedResponse->setEtag($etag); - $expectedResponse->setBaseline($baseline); - $expectedResponse->setDeleted($deleted); - $expectedResponse->setReconciling($reconciling); - $expectedResponse->setUid($uid); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->oSPolicyAssignmentName('[PROJECT]', '[LOCATION]', '[OS_POLICY_ASSIGNMENT]'); - $request = (new GetOSPolicyAssignmentRequest()) - ->setName($formattedName); - $response = $gapicClient->getOSPolicyAssignment($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.osconfig.v1.OsConfigZonalService/GetOSPolicyAssignment', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getOSPolicyAssignmentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->oSPolicyAssignmentName('[PROJECT]', '[LOCATION]', '[OS_POLICY_ASSIGNMENT]'); - $request = (new GetOSPolicyAssignmentRequest()) - ->setName($formattedName); - try { - $gapicClient->getOSPolicyAssignment($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getOSPolicyAssignmentReportTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $instance = 'instance555127957'; - $osPolicyAssignment = 'osPolicyAssignment-945935777'; - $lastRunId = 'lastRunId2008161560'; - $expectedResponse = new OSPolicyAssignmentReport(); - $expectedResponse->setName($name2); - $expectedResponse->setInstance($instance); - $expectedResponse->setOsPolicyAssignment($osPolicyAssignment); - $expectedResponse->setLastRunId($lastRunId); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->oSPolicyAssignmentReportName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[ASSIGNMENT]'); - $request = (new GetOSPolicyAssignmentReportRequest()) - ->setName($formattedName); - $response = $gapicClient->getOSPolicyAssignmentReport($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.osconfig.v1.OsConfigZonalService/GetOSPolicyAssignmentReport', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getOSPolicyAssignmentReportExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->oSPolicyAssignmentReportName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[ASSIGNMENT]'); - $request = (new GetOSPolicyAssignmentReportRequest()) - ->setName($formattedName); - try { - $gapicClient->getOSPolicyAssignmentReport($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getVulnerabilityReportTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new VulnerabilityReport(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->vulnerabilityReportName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $request = (new GetVulnerabilityReportRequest()) - ->setName($formattedName); - $response = $gapicClient->getVulnerabilityReport($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.osconfig.v1.OsConfigZonalService/GetVulnerabilityReport', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getVulnerabilityReportExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->vulnerabilityReportName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $request = (new GetVulnerabilityReportRequest()) - ->setName($formattedName); - try { - $gapicClient->getVulnerabilityReport($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listInventoriesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $inventoriesElement = new Inventory(); - $inventories = [ - $inventoriesElement, - ]; - $expectedResponse = new ListInventoriesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setInventories($inventories); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->instanceName('[PROJECT]', '[ZONE]', '[INSTANCE]'); - $request = (new ListInventoriesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listInventories($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getInventories()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.osconfig.v1.OsConfigZonalService/ListInventories', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listInventoriesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->instanceName('[PROJECT]', '[ZONE]', '[INSTANCE]'); - $request = (new ListInventoriesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listInventories($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listOSPolicyAssignmentReportsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $osPolicyAssignmentReportsElement = new OSPolicyAssignmentReport(); - $osPolicyAssignmentReports = [ - $osPolicyAssignmentReportsElement, - ]; - $expectedResponse = new ListOSPolicyAssignmentReportsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setOsPolicyAssignmentReports($osPolicyAssignmentReports); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->instanceOSPolicyAssignmentName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[ASSIGNMENT]'); - $request = (new ListOSPolicyAssignmentReportsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listOSPolicyAssignmentReports($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getOsPolicyAssignmentReports()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.osconfig.v1.OsConfigZonalService/ListOSPolicyAssignmentReports', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listOSPolicyAssignmentReportsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->instanceOSPolicyAssignmentName('[PROJECT]', '[LOCATION]', '[INSTANCE]', '[ASSIGNMENT]'); - $request = (new ListOSPolicyAssignmentReportsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listOSPolicyAssignmentReports($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listOSPolicyAssignmentRevisionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $osPolicyAssignmentsElement = new OSPolicyAssignment(); - $osPolicyAssignments = [ - $osPolicyAssignmentsElement, - ]; - $expectedResponse = new ListOSPolicyAssignmentRevisionsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setOsPolicyAssignments($osPolicyAssignments); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->oSPolicyAssignmentName('[PROJECT]', '[LOCATION]', '[OS_POLICY_ASSIGNMENT]'); - $request = (new ListOSPolicyAssignmentRevisionsRequest()) - ->setName($formattedName); - $response = $gapicClient->listOSPolicyAssignmentRevisions($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getOsPolicyAssignments()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.osconfig.v1.OsConfigZonalService/ListOSPolicyAssignmentRevisions', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listOSPolicyAssignmentRevisionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->oSPolicyAssignmentName('[PROJECT]', '[LOCATION]', '[OS_POLICY_ASSIGNMENT]'); - $request = (new ListOSPolicyAssignmentRevisionsRequest()) - ->setName($formattedName); - try { - $gapicClient->listOSPolicyAssignmentRevisions($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listOSPolicyAssignmentsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $osPolicyAssignmentsElement = new OSPolicyAssignment(); - $osPolicyAssignments = [ - $osPolicyAssignmentsElement, - ]; - $expectedResponse = new ListOSPolicyAssignmentsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setOsPolicyAssignments($osPolicyAssignments); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListOSPolicyAssignmentsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listOSPolicyAssignments($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getOsPolicyAssignments()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.osconfig.v1.OsConfigZonalService/ListOSPolicyAssignments', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listOSPolicyAssignmentsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListOSPolicyAssignmentsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listOSPolicyAssignments($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listVulnerabilityReportsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $vulnerabilityReportsElement = new VulnerabilityReport(); - $vulnerabilityReports = [ - $vulnerabilityReportsElement, - ]; - $expectedResponse = new ListVulnerabilityReportsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setVulnerabilityReports($vulnerabilityReports); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->instanceName('[PROJECT]', '[ZONE]', '[INSTANCE]'); - $request = (new ListVulnerabilityReportsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listVulnerabilityReports($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getVulnerabilityReports()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.osconfig.v1.OsConfigZonalService/ListVulnerabilityReports', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listVulnerabilityReportsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->instanceName('[PROJECT]', '[ZONE]', '[INSTANCE]'); - $request = (new ListVulnerabilityReportsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listVulnerabilityReports($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateOSPolicyAssignmentTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateOSPolicyAssignmentTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $revisionId = 'revisionId513861631'; - $etag = 'etag3123477'; - $baseline = false; - $deleted = false; - $reconciling = false; - $uid = 'uid115792'; - $expectedResponse = new OSPolicyAssignment(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setRevisionId($revisionId); - $expectedResponse->setEtag($etag); - $expectedResponse->setBaseline($baseline); - $expectedResponse->setDeleted($deleted); - $expectedResponse->setReconciling($reconciling); - $expectedResponse->setUid($uid); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateOSPolicyAssignmentTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $osPolicyAssignment = new OSPolicyAssignment(); - $osPolicyAssignmentOsPolicies = []; - $osPolicyAssignment->setOsPolicies($osPolicyAssignmentOsPolicies); - $osPolicyAssignmentInstanceFilter = new InstanceFilter(); - $osPolicyAssignment->setInstanceFilter($osPolicyAssignmentInstanceFilter); - $osPolicyAssignmentRollout = new Rollout(); - $rolloutDisruptionBudget = new FixedOrPercent(); - $osPolicyAssignmentRollout->setDisruptionBudget($rolloutDisruptionBudget); - $rolloutMinWaitDuration = new Duration(); - $osPolicyAssignmentRollout->setMinWaitDuration($rolloutMinWaitDuration); - $osPolicyAssignment->setRollout($osPolicyAssignmentRollout); - $request = (new UpdateOSPolicyAssignmentRequest()) - ->setOsPolicyAssignment($osPolicyAssignment); - $response = $gapicClient->updateOSPolicyAssignment($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.osconfig.v1.OsConfigZonalService/UpdateOSPolicyAssignment', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getOsPolicyAssignment(); - $this->assertProtobufEquals($osPolicyAssignment, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateOSPolicyAssignmentTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateOSPolicyAssignmentExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateOSPolicyAssignmentTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $osPolicyAssignment = new OSPolicyAssignment(); - $osPolicyAssignmentOsPolicies = []; - $osPolicyAssignment->setOsPolicies($osPolicyAssignmentOsPolicies); - $osPolicyAssignmentInstanceFilter = new InstanceFilter(); - $osPolicyAssignment->setInstanceFilter($osPolicyAssignmentInstanceFilter); - $osPolicyAssignmentRollout = new Rollout(); - $rolloutDisruptionBudget = new FixedOrPercent(); - $osPolicyAssignmentRollout->setDisruptionBudget($rolloutDisruptionBudget); - $rolloutMinWaitDuration = new Duration(); - $osPolicyAssignmentRollout->setMinWaitDuration($rolloutMinWaitDuration); - $osPolicyAssignment->setRollout($osPolicyAssignmentRollout); - $request = (new UpdateOSPolicyAssignmentRequest()) - ->setOsPolicyAssignment($osPolicyAssignment); - $response = $gapicClient->updateOSPolicyAssignment($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateOSPolicyAssignmentTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createOSPolicyAssignmentAsyncTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createOSPolicyAssignmentTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $revisionId = 'revisionId513861631'; - $etag = 'etag3123477'; - $baseline = false; - $deleted = false; - $reconciling = false; - $uid = 'uid115792'; - $expectedResponse = new OSPolicyAssignment(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setRevisionId($revisionId); - $expectedResponse->setEtag($etag); - $expectedResponse->setBaseline($baseline); - $expectedResponse->setDeleted($deleted); - $expectedResponse->setReconciling($reconciling); - $expectedResponse->setUid($uid); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createOSPolicyAssignmentTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $osPolicyAssignment = new OSPolicyAssignment(); - $osPolicyAssignmentOsPolicies = []; - $osPolicyAssignment->setOsPolicies($osPolicyAssignmentOsPolicies); - $osPolicyAssignmentInstanceFilter = new InstanceFilter(); - $osPolicyAssignment->setInstanceFilter($osPolicyAssignmentInstanceFilter); - $osPolicyAssignmentRollout = new Rollout(); - $rolloutDisruptionBudget = new FixedOrPercent(); - $osPolicyAssignmentRollout->setDisruptionBudget($rolloutDisruptionBudget); - $rolloutMinWaitDuration = new Duration(); - $osPolicyAssignmentRollout->setMinWaitDuration($rolloutMinWaitDuration); - $osPolicyAssignment->setRollout($osPolicyAssignmentRollout); - $osPolicyAssignmentId = 'osPolicyAssignmentId-1092208901'; - $request = (new CreateOSPolicyAssignmentRequest()) - ->setParent($formattedParent) - ->setOsPolicyAssignment($osPolicyAssignment) - ->setOsPolicyAssignmentId($osPolicyAssignmentId); - $response = $gapicClient->createOSPolicyAssignmentAsync($request)->wait(); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.osconfig.v1.OsConfigZonalService/CreateOSPolicyAssignment', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getOsPolicyAssignment(); - $this->assertProtobufEquals($osPolicyAssignment, $actualValue); - $actualValue = $actualApiRequestObject->getOsPolicyAssignmentId(); - $this->assertProtobufEquals($osPolicyAssignmentId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createOSPolicyAssignmentTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } -} diff --git a/owl-bot-staging/OsLogin/v1/proto/src/GPBMetadata/Google/Cloud/Oslogin/Common/Common.php b/owl-bot-staging/OsLogin/v1/proto/src/GPBMetadata/Google/Cloud/Oslogin/Common/Common.php deleted file mode 100644 index 58e5d425988ea0d4b0b5b1d94b5cba370ed0c736..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1639 zcma)6UvC>l5XW}Y#FNmbM*%|+-TqTupl1X;T?ojI9m}HiS+S#1bdq&GukD5N?P+%p z)l~jMd;~rMFMI(Wc+L|af!W=&>!?YEU-o7_znS0sW_G^)KAoj-pR{R0MX2bQj21-A zC`koZJmN7KWs?aNB;xaw#Z0&&D+_V?Jd` z4PkS>I$RSJAPMJGreQ=$yVrO|RX7e+7_<#OIM(>UxA@@L;12o_8lFqRadZ~9KMBvOngL<9UJqSeR5#?-zKQjT>Wkrkt! zmI7r6I*Fnp3FDwiWh7Xtxags)=S`_v3#f0ZkMp!T9Gj4;<>+~DkUSzvWOOq-A%dz* zB!`B#4zOH*1()bmPg!unXgqGvS@mX`FT6e;uj@R) zX{fH5X`YYZuWhLQ-!X6wtfy-R#?1%DwFC3J`gMWsLr)g5Oab~33uHK&y#-jtnPC}nJ1DWOr)#uSZf#`pkk%=nxR$4t-& z8@i}$8N|D=C1*5_E7w=%ltx@uwvBlU%5otUoewe4j=A~}Ahd+^U0L5XO8?YLjt}qi zR6j13Oous2EmB$m^ttiXm+o71aQzjsZ_*7A=iGv8rnKF44zF`wKY{xz4Q)V_PHH)8 z7sR@wm65eq`dHTRLH>+oqn&>(@BLALy}q3F%;WljF0@>~P%CZO`2=p$mnqZL@MNeM zDuQI}*E+2aI^FiL|Dr!=JsS>Q^jgESZok($?woX5&HZM~ Z`qBE0e_?mk#%jBAtr<_de3q~T_z!@54Br3% diff --git a/owl-bot-staging/OsLogin/v1/proto/src/GPBMetadata/Google/Cloud/Oslogin/V1/Oslogin.php b/owl-bot-staging/OsLogin/v1/proto/src/GPBMetadata/Google/Cloud/Oslogin/V1/Oslogin.php deleted file mode 100644 index 8c82c08fb98d..000000000000 --- a/owl-bot-staging/OsLogin/v1/proto/src/GPBMetadata/Google/Cloud/Oslogin/V1/Oslogin.php +++ /dev/null @@ -1,80 +0,0 @@ -internalAddGeneratedFile( - ' -’ -%google/cloud/oslogin/v1/oslogin.protogoogle.cloud.oslogin.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto(google/cloud/oslogin/common/common.protogoogle/protobuf/empty.proto google/protobuf/field_mask.proto"˜ - LoginProfile -name ( BàAA -posix_accounts ( 2).google.cloud.oslogin.common.PosixAccountQ -ssh_public_keys ( 28.google.cloud.oslogin.v1.LoginProfile.SshPublicKeysEntry_ -SshPublicKeysEntry -key ( 8 -value ( 2).google.cloud.oslogin.common.SshPublicKey:8"  -CreateSshPublicKeyRequest; -parent ( B+àAúA%#oslogin.googleapis.com/SshPublicKeyF -ssh_public_key ( 2).google.cloud.oslogin.common.SshPublicKeyBàA"V -DeletePosixAccountRequest9 -name ( B+àAúA% -#oslogin.googleapis.com/PosixAccount"V -DeleteSshPublicKeyRequest9 -name ( B+àAúA% -#oslogin.googleapis.com/SshPublicKey"z -GetLoginProfileRequest9 -name ( B+àAúA%#oslogin.googleapis.com/PosixAccount - -project_id (  - system_id ( "S -GetSshPublicKeyRequest9 -name ( B+àAúA% -#oslogin.googleapis.com/SshPublicKey"Ê -ImportSshPublicKeyRequest; -parent ( B+àAúA%#oslogin.googleapis.com/SshPublicKeyF -ssh_public_key ( 2).google.cloud.oslogin.common.SshPublicKeyBàA - -project_id (  -regions ( BàA"k -ImportSshPublicKeyResponse< - login_profile ( 2%.google.cloud.oslogin.v1.LoginProfile -details ( "Ï -UpdateSshPublicKeyRequest9 -name ( B+àAúA% -#oslogin.googleapis.com/SshPublicKeyF -ssh_public_key ( 2).google.cloud.oslogin.common.SshPublicKeyBàA/ - update_mask ( 2.google.protobuf.FieldMask2† -OsLoginServiceÇ -CreateSshPublicKey2.google.cloud.oslogin.v1.CreateSshPublicKeyRequest).google.cloud.oslogin.common.SshPublicKey"RÚAparent,ssh_public_key‚Óä“4""/v1/{parent=users/*}/sshPublicKeys:ssh_public_keyŽ -DeletePosixAccount2.google.cloud.oslogin.v1.DeletePosixAccountRequest.google.protobuf.Empty",ÚAname‚Óä“*/v1/{name=users/*/projects/*}“ -DeleteSshPublicKey2.google.cloud.oslogin.v1.DeleteSshPublicKeyRequest.google.protobuf.Empty"1ÚAname‚Óä“$*"/v1/{name=users/*/sshPublicKeys/*}™ -GetLoginProfile/.google.cloud.oslogin.v1.GetLoginProfileRequest%.google.cloud.oslogin.v1.LoginProfile".ÚAname‚Óä“!/v1/{name=users/*}/loginProfile  -GetSshPublicKey/.google.cloud.oslogin.v1.GetSshPublicKeyRequest).google.cloud.oslogin.common.SshPublicKey"1ÚAname‚Óä“$"/v1/{name=users/*/sshPublicKeys/*}ù -ImportSshPublicKey2.google.cloud.oslogin.v1.ImportSshPublicKeyRequest3.google.cloud.oslogin.v1.ImportSshPublicKeyResponse"zÚAparent,ssh_public_keyÚA parent,ssh_public_key,project_id‚Óä“9"\'/v1/{parent=users/*}:importSshPublicKey:ssh_public_keyç -UpdateSshPublicKey2.google.cloud.oslogin.v1.UpdateSshPublicKeyRequest).google.cloud.oslogin.common.SshPublicKey"rÚAname,ssh_public_keyÚAname,ssh_public_key,update_mask‚Óä“42"/v1/{name=users/*/sshPublicKeys/*}:ssh_public_keyÝÊAoslogin.googleapis.comÒAÀhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/compute,https://www.googleapis.com/auth/compute.readonlyBµ -com.google.cloud.oslogin.v1B OsLoginProtoPZ5cloud.google.com/go/oslogin/apiv1/osloginpb;osloginpbªGoogle.Cloud.OsLogin.V1ÊGoogle\\Cloud\\OsLogin\\V1êGoogle::Cloud::OsLogin::V1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/OsLogin/v1/proto/src/Google/Cloud/OsLogin/Common/OperatingSystemType.php b/owl-bot-staging/OsLogin/v1/proto/src/Google/Cloud/OsLogin/Common/OperatingSystemType.php deleted file mode 100644 index dea57253ea7e..000000000000 --- a/owl-bot-staging/OsLogin/v1/proto/src/Google/Cloud/OsLogin/Common/OperatingSystemType.php +++ /dev/null @@ -1,62 +0,0 @@ -google.cloud.oslogin.common.OperatingSystemType - */ -class OperatingSystemType -{ - /** - * The operating system type associated with the user account information is - * unspecified. - * - * Generated from protobuf enum OPERATING_SYSTEM_TYPE_UNSPECIFIED = 0; - */ - const OPERATING_SYSTEM_TYPE_UNSPECIFIED = 0; - /** - * Linux user account information. - * - * Generated from protobuf enum LINUX = 1; - */ - const LINUX = 1; - /** - * Windows user account information. - * - * Generated from protobuf enum WINDOWS = 2; - */ - const WINDOWS = 2; - - private static $valueToName = [ - self::OPERATING_SYSTEM_TYPE_UNSPECIFIED => 'OPERATING_SYSTEM_TYPE_UNSPECIFIED', - self::LINUX => 'LINUX', - self::WINDOWS => 'WINDOWS', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/OsLogin/v1/proto/src/Google/Cloud/OsLogin/Common/PosixAccount.php b/owl-bot-staging/OsLogin/v1/proto/src/Google/Cloud/OsLogin/Common/PosixAccount.php deleted file mode 100644 index 99d5713285c0..000000000000 --- a/owl-bot-staging/OsLogin/v1/proto/src/Google/Cloud/OsLogin/Common/PosixAccount.php +++ /dev/null @@ -1,411 +0,0 @@ -google.cloud.oslogin.common.PosixAccount - */ -class PosixAccount extends \Google\Protobuf\Internal\Message -{ - /** - * Only one POSIX account can be marked as primary. - * - * Generated from protobuf field bool primary = 1; - */ - protected $primary = false; - /** - * The username of the POSIX account. - * - * Generated from protobuf field string username = 2; - */ - protected $username = ''; - /** - * The user ID. - * - * Generated from protobuf field int64 uid = 3; - */ - protected $uid = 0; - /** - * The default group ID. - * - * Generated from protobuf field int64 gid = 4; - */ - protected $gid = 0; - /** - * The path to the home directory for this account. - * - * Generated from protobuf field string home_directory = 5; - */ - protected $home_directory = ''; - /** - * The path to the logic shell for this account. - * - * Generated from protobuf field string shell = 6; - */ - protected $shell = ''; - /** - * The GECOS (user information) entry for this account. - * - * Generated from protobuf field string gecos = 7; - */ - protected $gecos = ''; - /** - * System identifier for which account the username or uid applies to. - * By default, the empty value is used. - * - * Generated from protobuf field string system_id = 8; - */ - protected $system_id = ''; - /** - * Output only. A POSIX account identifier. - * - * Generated from protobuf field string account_id = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $account_id = ''; - /** - * The operating system type where this account applies. - * - * Generated from protobuf field .google.cloud.oslogin.common.OperatingSystemType operating_system_type = 10; - */ - protected $operating_system_type = 0; - /** - * Output only. The canonical resource name. - * - * Generated from protobuf field string name = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $primary - * Only one POSIX account can be marked as primary. - * @type string $username - * The username of the POSIX account. - * @type int|string $uid - * The user ID. - * @type int|string $gid - * The default group ID. - * @type string $home_directory - * The path to the home directory for this account. - * @type string $shell - * The path to the logic shell for this account. - * @type string $gecos - * The GECOS (user information) entry for this account. - * @type string $system_id - * System identifier for which account the username or uid applies to. - * By default, the empty value is used. - * @type string $account_id - * Output only. A POSIX account identifier. - * @type int $operating_system_type - * The operating system type where this account applies. - * @type string $name - * Output only. The canonical resource name. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Oslogin\Common\Common::initOnce(); - parent::__construct($data); - } - - /** - * Only one POSIX account can be marked as primary. - * - * Generated from protobuf field bool primary = 1; - * @return bool - */ - public function getPrimary() - { - return $this->primary; - } - - /** - * Only one POSIX account can be marked as primary. - * - * Generated from protobuf field bool primary = 1; - * @param bool $var - * @return $this - */ - public function setPrimary($var) - { - GPBUtil::checkBool($var); - $this->primary = $var; - - return $this; - } - - /** - * The username of the POSIX account. - * - * Generated from protobuf field string username = 2; - * @return string - */ - public function getUsername() - { - return $this->username; - } - - /** - * The username of the POSIX account. - * - * Generated from protobuf field string username = 2; - * @param string $var - * @return $this - */ - public function setUsername($var) - { - GPBUtil::checkString($var, True); - $this->username = $var; - - return $this; - } - - /** - * The user ID. - * - * Generated from protobuf field int64 uid = 3; - * @return int|string - */ - public function getUid() - { - return $this->uid; - } - - /** - * The user ID. - * - * Generated from protobuf field int64 uid = 3; - * @param int|string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkInt64($var); - $this->uid = $var; - - return $this; - } - - /** - * The default group ID. - * - * Generated from protobuf field int64 gid = 4; - * @return int|string - */ - public function getGid() - { - return $this->gid; - } - - /** - * The default group ID. - * - * Generated from protobuf field int64 gid = 4; - * @param int|string $var - * @return $this - */ - public function setGid($var) - { - GPBUtil::checkInt64($var); - $this->gid = $var; - - return $this; - } - - /** - * The path to the home directory for this account. - * - * Generated from protobuf field string home_directory = 5; - * @return string - */ - public function getHomeDirectory() - { - return $this->home_directory; - } - - /** - * The path to the home directory for this account. - * - * Generated from protobuf field string home_directory = 5; - * @param string $var - * @return $this - */ - public function setHomeDirectory($var) - { - GPBUtil::checkString($var, True); - $this->home_directory = $var; - - return $this; - } - - /** - * The path to the logic shell for this account. - * - * Generated from protobuf field string shell = 6; - * @return string - */ - public function getShell() - { - return $this->shell; - } - - /** - * The path to the logic shell for this account. - * - * Generated from protobuf field string shell = 6; - * @param string $var - * @return $this - */ - public function setShell($var) - { - GPBUtil::checkString($var, True); - $this->shell = $var; - - return $this; - } - - /** - * The GECOS (user information) entry for this account. - * - * Generated from protobuf field string gecos = 7; - * @return string - */ - public function getGecos() - { - return $this->gecos; - } - - /** - * The GECOS (user information) entry for this account. - * - * Generated from protobuf field string gecos = 7; - * @param string $var - * @return $this - */ - public function setGecos($var) - { - GPBUtil::checkString($var, True); - $this->gecos = $var; - - return $this; - } - - /** - * System identifier for which account the username or uid applies to. - * By default, the empty value is used. - * - * Generated from protobuf field string system_id = 8; - * @return string - */ - public function getSystemId() - { - return $this->system_id; - } - - /** - * System identifier for which account the username or uid applies to. - * By default, the empty value is used. - * - * Generated from protobuf field string system_id = 8; - * @param string $var - * @return $this - */ - public function setSystemId($var) - { - GPBUtil::checkString($var, True); - $this->system_id = $var; - - return $this; - } - - /** - * Output only. A POSIX account identifier. - * - * Generated from protobuf field string account_id = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getAccountId() - { - return $this->account_id; - } - - /** - * Output only. A POSIX account identifier. - * - * Generated from protobuf field string account_id = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setAccountId($var) - { - GPBUtil::checkString($var, True); - $this->account_id = $var; - - return $this; - } - - /** - * The operating system type where this account applies. - * - * Generated from protobuf field .google.cloud.oslogin.common.OperatingSystemType operating_system_type = 10; - * @return int - */ - public function getOperatingSystemType() - { - return $this->operating_system_type; - } - - /** - * The operating system type where this account applies. - * - * Generated from protobuf field .google.cloud.oslogin.common.OperatingSystemType operating_system_type = 10; - * @param int $var - * @return $this - */ - public function setOperatingSystemType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\OsLogin\Common\OperatingSystemType::class); - $this->operating_system_type = $var; - - return $this; - } - - /** - * Output only. The canonical resource name. - * - * Generated from protobuf field string name = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The canonical resource name. - * - * Generated from protobuf field string name = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OsLogin/v1/proto/src/Google/Cloud/OsLogin/Common/SshPublicKey.php b/owl-bot-staging/OsLogin/v1/proto/src/Google/Cloud/OsLogin/Common/SshPublicKey.php deleted file mode 100644 index 185588081e3e..000000000000 --- a/owl-bot-staging/OsLogin/v1/proto/src/Google/Cloud/OsLogin/Common/SshPublicKey.php +++ /dev/null @@ -1,177 +0,0 @@ -google.cloud.oslogin.common.SshPublicKey - */ -class SshPublicKey extends \Google\Protobuf\Internal\Message -{ - /** - * Public key text in SSH format, defined by - * RFC4253 - * section 6.6. - * - * Generated from protobuf field string key = 1; - */ - protected $key = ''; - /** - * An expiration time in microseconds since epoch. - * - * Generated from protobuf field int64 expiration_time_usec = 2; - */ - protected $expiration_time_usec = 0; - /** - * Output only. The SHA-256 fingerprint of the SSH public key. - * - * Generated from protobuf field string fingerprint = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $fingerprint = ''; - /** - * Output only. The canonical resource name. - * - * Generated from protobuf field string name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $key - * Public key text in SSH format, defined by - * RFC4253 - * section 6.6. - * @type int|string $expiration_time_usec - * An expiration time in microseconds since epoch. - * @type string $fingerprint - * Output only. The SHA-256 fingerprint of the SSH public key. - * @type string $name - * Output only. The canonical resource name. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Oslogin\Common\Common::initOnce(); - parent::__construct($data); - } - - /** - * Public key text in SSH format, defined by - * RFC4253 - * section 6.6. - * - * Generated from protobuf field string key = 1; - * @return string - */ - public function getKey() - { - return $this->key; - } - - /** - * Public key text in SSH format, defined by - * RFC4253 - * section 6.6. - * - * Generated from protobuf field string key = 1; - * @param string $var - * @return $this - */ - public function setKey($var) - { - GPBUtil::checkString($var, True); - $this->key = $var; - - return $this; - } - - /** - * An expiration time in microseconds since epoch. - * - * Generated from protobuf field int64 expiration_time_usec = 2; - * @return int|string - */ - public function getExpirationTimeUsec() - { - return $this->expiration_time_usec; - } - - /** - * An expiration time in microseconds since epoch. - * - * Generated from protobuf field int64 expiration_time_usec = 2; - * @param int|string $var - * @return $this - */ - public function setExpirationTimeUsec($var) - { - GPBUtil::checkInt64($var); - $this->expiration_time_usec = $var; - - return $this; - } - - /** - * Output only. The SHA-256 fingerprint of the SSH public key. - * - * Generated from protobuf field string fingerprint = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getFingerprint() - { - return $this->fingerprint; - } - - /** - * Output only. The SHA-256 fingerprint of the SSH public key. - * - * Generated from protobuf field string fingerprint = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setFingerprint($var) - { - GPBUtil::checkString($var, True); - $this->fingerprint = $var; - - return $this; - } - - /** - * Output only. The canonical resource name. - * - * Generated from protobuf field string name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The canonical resource name. - * - * Generated from protobuf field string name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OsLogin/v1/proto/src/Google/Cloud/OsLogin/V1/CreateSshPublicKeyRequest.php b/owl-bot-staging/OsLogin/v1/proto/src/Google/Cloud/OsLogin/V1/CreateSshPublicKeyRequest.php deleted file mode 100644 index 76728c29f5e7..000000000000 --- a/owl-bot-staging/OsLogin/v1/proto/src/Google/Cloud/OsLogin/V1/CreateSshPublicKeyRequest.php +++ /dev/null @@ -1,127 +0,0 @@ -google.cloud.oslogin.v1.CreateSshPublicKeyRequest - */ -class CreateSshPublicKeyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The unique ID for the user in format `users/{user}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The SSH public key and expiration time. - * - * Generated from protobuf field .google.cloud.oslogin.common.SshPublicKey ssh_public_key = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $ssh_public_key = null; - - /** - * @param string $parent Required. The unique ID for the user in format `users/{user}`. Please see - * {@see OsLoginServiceClient::userName()} for help formatting this field. - * @param \Google\Cloud\OsLogin\Common\SshPublicKey $sshPublicKey Required. The SSH public key and expiration time. - * - * @return \Google\Cloud\OsLogin\V1\CreateSshPublicKeyRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\OsLogin\Common\SshPublicKey $sshPublicKey): self - { - return (new self()) - ->setParent($parent) - ->setSshPublicKey($sshPublicKey); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The unique ID for the user in format `users/{user}`. - * @type \Google\Cloud\OsLogin\Common\SshPublicKey $ssh_public_key - * Required. The SSH public key and expiration time. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Oslogin\V1\Oslogin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The unique ID for the user in format `users/{user}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The unique ID for the user in format `users/{user}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The SSH public key and expiration time. - * - * Generated from protobuf field .google.cloud.oslogin.common.SshPublicKey ssh_public_key = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\OsLogin\Common\SshPublicKey|null - */ - public function getSshPublicKey() - { - return $this->ssh_public_key; - } - - public function hasSshPublicKey() - { - return isset($this->ssh_public_key); - } - - public function clearSshPublicKey() - { - unset($this->ssh_public_key); - } - - /** - * Required. The SSH public key and expiration time. - * - * Generated from protobuf field .google.cloud.oslogin.common.SshPublicKey ssh_public_key = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\OsLogin\Common\SshPublicKey $var - * @return $this - */ - public function setSshPublicKey($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OsLogin\Common\SshPublicKey::class); - $this->ssh_public_key = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OsLogin/v1/proto/src/Google/Cloud/OsLogin/V1/DeletePosixAccountRequest.php b/owl-bot-staging/OsLogin/v1/proto/src/Google/Cloud/OsLogin/V1/DeletePosixAccountRequest.php deleted file mode 100644 index 965160ab977f..000000000000 --- a/owl-bot-staging/OsLogin/v1/proto/src/Google/Cloud/OsLogin/V1/DeletePosixAccountRequest.php +++ /dev/null @@ -1,91 +0,0 @@ -google.cloud.oslogin.v1.DeletePosixAccountRequest - */ -class DeletePosixAccountRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A reference to the POSIX account to update. POSIX accounts are - * identified by the project ID they are associated with. A reference to the - * POSIX account is in format `users/{user}/projects/{project}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. A reference to the POSIX account to update. POSIX accounts are - * identified by the project ID they are associated with. A reference to the - * POSIX account is in format `users/{user}/projects/{project}`. Please see - * {@see OsLoginServiceClient::posixAccountName()} for help formatting this field. - * - * @return \Google\Cloud\OsLogin\V1\DeletePosixAccountRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. A reference to the POSIX account to update. POSIX accounts are - * identified by the project ID they are associated with. A reference to the - * POSIX account is in format `users/{user}/projects/{project}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Oslogin\V1\Oslogin::initOnce(); - parent::__construct($data); - } - - /** - * Required. A reference to the POSIX account to update. POSIX accounts are - * identified by the project ID they are associated with. A reference to the - * POSIX account is in format `users/{user}/projects/{project}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. A reference to the POSIX account to update. POSIX accounts are - * identified by the project ID they are associated with. A reference to the - * POSIX account is in format `users/{user}/projects/{project}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OsLogin/v1/proto/src/Google/Cloud/OsLogin/V1/DeleteSshPublicKeyRequest.php b/owl-bot-staging/OsLogin/v1/proto/src/Google/Cloud/OsLogin/V1/DeleteSshPublicKeyRequest.php deleted file mode 100644 index 11383a19392f..000000000000 --- a/owl-bot-staging/OsLogin/v1/proto/src/Google/Cloud/OsLogin/V1/DeleteSshPublicKeyRequest.php +++ /dev/null @@ -1,91 +0,0 @@ -google.cloud.oslogin.v1.DeleteSshPublicKeyRequest - */ -class DeleteSshPublicKeyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The fingerprint of the public key to update. Public keys are - * identified by their SHA-256 fingerprint. The fingerprint of the public key - * is in format `users/{user}/sshPublicKeys/{fingerprint}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The fingerprint of the public key to update. Public keys are - * identified by their SHA-256 fingerprint. The fingerprint of the public key - * is in format `users/{user}/sshPublicKeys/{fingerprint}`. Please see - * {@see OsLoginServiceClient::sshPublicKeyName()} for help formatting this field. - * - * @return \Google\Cloud\OsLogin\V1\DeleteSshPublicKeyRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The fingerprint of the public key to update. Public keys are - * identified by their SHA-256 fingerprint. The fingerprint of the public key - * is in format `users/{user}/sshPublicKeys/{fingerprint}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Oslogin\V1\Oslogin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The fingerprint of the public key to update. Public keys are - * identified by their SHA-256 fingerprint. The fingerprint of the public key - * is in format `users/{user}/sshPublicKeys/{fingerprint}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The fingerprint of the public key to update. Public keys are - * identified by their SHA-256 fingerprint. The fingerprint of the public key - * is in format `users/{user}/sshPublicKeys/{fingerprint}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OsLogin/v1/proto/src/Google/Cloud/OsLogin/V1/GetLoginProfileRequest.php b/owl-bot-staging/OsLogin/v1/proto/src/Google/Cloud/OsLogin/V1/GetLoginProfileRequest.php deleted file mode 100644 index 85992364fab9..000000000000 --- a/owl-bot-staging/OsLogin/v1/proto/src/Google/Cloud/OsLogin/V1/GetLoginProfileRequest.php +++ /dev/null @@ -1,149 +0,0 @@ -google.cloud.oslogin.v1.GetLoginProfileRequest - */ -class GetLoginProfileRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The unique ID for the user in format `users/{user}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * The project ID of the Google Cloud Platform project. - * - * Generated from protobuf field string project_id = 2; - */ - protected $project_id = ''; - /** - * A system ID for filtering the results of the request. - * - * Generated from protobuf field string system_id = 3; - */ - protected $system_id = ''; - - /** - * @param string $name Required. The unique ID for the user in format `users/{user}`. Please see - * {@see OsLoginServiceClient::userName()} for help formatting this field. - * - * @return \Google\Cloud\OsLogin\V1\GetLoginProfileRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The unique ID for the user in format `users/{user}`. - * @type string $project_id - * The project ID of the Google Cloud Platform project. - * @type string $system_id - * A system ID for filtering the results of the request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Oslogin\V1\Oslogin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The unique ID for the user in format `users/{user}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The unique ID for the user in format `users/{user}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The project ID of the Google Cloud Platform project. - * - * Generated from protobuf field string project_id = 2; - * @return string - */ - public function getProjectId() - { - return $this->project_id; - } - - /** - * The project ID of the Google Cloud Platform project. - * - * Generated from protobuf field string project_id = 2; - * @param string $var - * @return $this - */ - public function setProjectId($var) - { - GPBUtil::checkString($var, True); - $this->project_id = $var; - - return $this; - } - - /** - * A system ID for filtering the results of the request. - * - * Generated from protobuf field string system_id = 3; - * @return string - */ - public function getSystemId() - { - return $this->system_id; - } - - /** - * A system ID for filtering the results of the request. - * - * Generated from protobuf field string system_id = 3; - * @param string $var - * @return $this - */ - public function setSystemId($var) - { - GPBUtil::checkString($var, True); - $this->system_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OsLogin/v1/proto/src/Google/Cloud/OsLogin/V1/GetSshPublicKeyRequest.php b/owl-bot-staging/OsLogin/v1/proto/src/Google/Cloud/OsLogin/V1/GetSshPublicKeyRequest.php deleted file mode 100644 index 6e6de1d0ec84..000000000000 --- a/owl-bot-staging/OsLogin/v1/proto/src/Google/Cloud/OsLogin/V1/GetSshPublicKeyRequest.php +++ /dev/null @@ -1,91 +0,0 @@ -google.cloud.oslogin.v1.GetSshPublicKeyRequest - */ -class GetSshPublicKeyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The fingerprint of the public key to retrieve. Public keys are - * identified by their SHA-256 fingerprint. The fingerprint of the public key - * is in format `users/{user}/sshPublicKeys/{fingerprint}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The fingerprint of the public key to retrieve. Public keys are - * identified by their SHA-256 fingerprint. The fingerprint of the public key - * is in format `users/{user}/sshPublicKeys/{fingerprint}`. Please see - * {@see OsLoginServiceClient::sshPublicKeyName()} for help formatting this field. - * - * @return \Google\Cloud\OsLogin\V1\GetSshPublicKeyRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The fingerprint of the public key to retrieve. Public keys are - * identified by their SHA-256 fingerprint. The fingerprint of the public key - * is in format `users/{user}/sshPublicKeys/{fingerprint}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Oslogin\V1\Oslogin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The fingerprint of the public key to retrieve. Public keys are - * identified by their SHA-256 fingerprint. The fingerprint of the public key - * is in format `users/{user}/sshPublicKeys/{fingerprint}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The fingerprint of the public key to retrieve. Public keys are - * identified by their SHA-256 fingerprint. The fingerprint of the public key - * is in format `users/{user}/sshPublicKeys/{fingerprint}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OsLogin/v1/proto/src/Google/Cloud/OsLogin/V1/ImportSshPublicKeyRequest.php b/owl-bot-staging/OsLogin/v1/proto/src/Google/Cloud/OsLogin/V1/ImportSshPublicKeyRequest.php deleted file mode 100644 index 122ed6f2f131..000000000000 --- a/owl-bot-staging/OsLogin/v1/proto/src/Google/Cloud/OsLogin/V1/ImportSshPublicKeyRequest.php +++ /dev/null @@ -1,221 +0,0 @@ -google.cloud.oslogin.v1.ImportSshPublicKeyRequest - */ -class ImportSshPublicKeyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The unique ID for the user in format `users/{user}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The SSH public key and expiration time. - * - * Generated from protobuf field .google.cloud.oslogin.common.SshPublicKey ssh_public_key = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $ssh_public_key = null; - /** - * The project ID of the Google Cloud Platform project. - * - * Generated from protobuf field string project_id = 3; - */ - protected $project_id = ''; - /** - * Optional. The regions to which to assert that the key was written. - * If unspecified, defaults to all regions. - * Regions are listed at https://cloud.google.com/about/locations#region. - * - * Generated from protobuf field repeated string regions = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $regions; - - /** - * @param string $parent Required. The unique ID for the user in format `users/{user}`. Please see - * {@see OsLoginServiceClient::userName()} for help formatting this field. - * @param \Google\Cloud\OsLogin\Common\SshPublicKey $sshPublicKey Optional. The SSH public key and expiration time. - * - * @return \Google\Cloud\OsLogin\V1\ImportSshPublicKeyRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\OsLogin\Common\SshPublicKey $sshPublicKey): self - { - return (new self()) - ->setParent($parent) - ->setSshPublicKey($sshPublicKey); - } - - /** - * @param string $parent Required. The unique ID for the user in format `users/{user}`. Please see - * {@see OsLoginServiceClient::userName()} for help formatting this field. - * @param \Google\Cloud\OsLogin\Common\SshPublicKey $sshPublicKey Optional. The SSH public key and expiration time. - * @param string $projectId The project ID of the Google Cloud Platform project. - * - * @return \Google\Cloud\OsLogin\V1\ImportSshPublicKeyRequest - * - * @experimental - */ - public static function buildFromParentSshPublicKeyProjectId(string $parent, \Google\Cloud\OsLogin\Common\SshPublicKey $sshPublicKey, string $projectId): self - { - return (new self()) - ->setParent($parent) - ->setSshPublicKey($sshPublicKey) - ->setProjectId($projectId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The unique ID for the user in format `users/{user}`. - * @type \Google\Cloud\OsLogin\Common\SshPublicKey $ssh_public_key - * Optional. The SSH public key and expiration time. - * @type string $project_id - * The project ID of the Google Cloud Platform project. - * @type array|\Google\Protobuf\Internal\RepeatedField $regions - * Optional. The regions to which to assert that the key was written. - * If unspecified, defaults to all regions. - * Regions are listed at https://cloud.google.com/about/locations#region. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Oslogin\V1\Oslogin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The unique ID for the user in format `users/{user}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The unique ID for the user in format `users/{user}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. The SSH public key and expiration time. - * - * Generated from protobuf field .google.cloud.oslogin.common.SshPublicKey ssh_public_key = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\OsLogin\Common\SshPublicKey|null - */ - public function getSshPublicKey() - { - return $this->ssh_public_key; - } - - public function hasSshPublicKey() - { - return isset($this->ssh_public_key); - } - - public function clearSshPublicKey() - { - unset($this->ssh_public_key); - } - - /** - * Optional. The SSH public key and expiration time. - * - * Generated from protobuf field .google.cloud.oslogin.common.SshPublicKey ssh_public_key = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\OsLogin\Common\SshPublicKey $var - * @return $this - */ - public function setSshPublicKey($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OsLogin\Common\SshPublicKey::class); - $this->ssh_public_key = $var; - - return $this; - } - - /** - * The project ID of the Google Cloud Platform project. - * - * Generated from protobuf field string project_id = 3; - * @return string - */ - public function getProjectId() - { - return $this->project_id; - } - - /** - * The project ID of the Google Cloud Platform project. - * - * Generated from protobuf field string project_id = 3; - * @param string $var - * @return $this - */ - public function setProjectId($var) - { - GPBUtil::checkString($var, True); - $this->project_id = $var; - - return $this; - } - - /** - * Optional. The regions to which to assert that the key was written. - * If unspecified, defaults to all regions. - * Regions are listed at https://cloud.google.com/about/locations#region. - * - * Generated from protobuf field repeated string regions = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRegions() - { - return $this->regions; - } - - /** - * Optional. The regions to which to assert that the key was written. - * If unspecified, defaults to all regions. - * Regions are listed at https://cloud.google.com/about/locations#region. - * - * Generated from protobuf field repeated string regions = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRegions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->regions = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/OsLogin/v1/proto/src/Google/Cloud/OsLogin/V1/ImportSshPublicKeyResponse.php b/owl-bot-staging/OsLogin/v1/proto/src/Google/Cloud/OsLogin/V1/ImportSshPublicKeyResponse.php deleted file mode 100644 index c9c749a53bee..000000000000 --- a/owl-bot-staging/OsLogin/v1/proto/src/Google/Cloud/OsLogin/V1/ImportSshPublicKeyResponse.php +++ /dev/null @@ -1,111 +0,0 @@ -google.cloud.oslogin.v1.ImportSshPublicKeyResponse - */ -class ImportSshPublicKeyResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The login profile information for the user. - * - * Generated from protobuf field .google.cloud.oslogin.v1.LoginProfile login_profile = 1; - */ - protected $login_profile = null; - /** - * Detailed information about import results. - * - * Generated from protobuf field string details = 2; - */ - protected $details = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\OsLogin\V1\LoginProfile $login_profile - * The login profile information for the user. - * @type string $details - * Detailed information about import results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Oslogin\V1\Oslogin::initOnce(); - parent::__construct($data); - } - - /** - * The login profile information for the user. - * - * Generated from protobuf field .google.cloud.oslogin.v1.LoginProfile login_profile = 1; - * @return \Google\Cloud\OsLogin\V1\LoginProfile|null - */ - public function getLoginProfile() - { - return $this->login_profile; - } - - public function hasLoginProfile() - { - return isset($this->login_profile); - } - - public function clearLoginProfile() - { - unset($this->login_profile); - } - - /** - * The login profile information for the user. - * - * Generated from protobuf field .google.cloud.oslogin.v1.LoginProfile login_profile = 1; - * @param \Google\Cloud\OsLogin\V1\LoginProfile $var - * @return $this - */ - public function setLoginProfile($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OsLogin\V1\LoginProfile::class); - $this->login_profile = $var; - - return $this; - } - - /** - * Detailed information about import results. - * - * Generated from protobuf field string details = 2; - * @return string - */ - public function getDetails() - { - return $this->details; - } - - /** - * Detailed information about import results. - * - * Generated from protobuf field string details = 2; - * @param string $var - * @return $this - */ - public function setDetails($var) - { - GPBUtil::checkString($var, True); - $this->details = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OsLogin/v1/proto/src/Google/Cloud/OsLogin/V1/LoginProfile.php b/owl-bot-staging/OsLogin/v1/proto/src/Google/Cloud/OsLogin/V1/LoginProfile.php deleted file mode 100644 index 6abe567377c1..000000000000 --- a/owl-bot-staging/OsLogin/v1/proto/src/Google/Cloud/OsLogin/V1/LoginProfile.php +++ /dev/null @@ -1,136 +0,0 @@ -google.cloud.oslogin.v1.LoginProfile - */ -class LoginProfile extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A unique user ID. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * The list of POSIX accounts associated with the user. - * - * Generated from protobuf field repeated .google.cloud.oslogin.common.PosixAccount posix_accounts = 2; - */ - private $posix_accounts; - /** - * A map from SSH public key fingerprint to the associated key object. - * - * Generated from protobuf field map ssh_public_keys = 3; - */ - private $ssh_public_keys; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. A unique user ID. - * @type array<\Google\Cloud\OsLogin\Common\PosixAccount>|\Google\Protobuf\Internal\RepeatedField $posix_accounts - * The list of POSIX accounts associated with the user. - * @type array|\Google\Protobuf\Internal\MapField $ssh_public_keys - * A map from SSH public key fingerprint to the associated key object. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Oslogin\V1\Oslogin::initOnce(); - parent::__construct($data); - } - - /** - * Required. A unique user ID. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. A unique user ID. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The list of POSIX accounts associated with the user. - * - * Generated from protobuf field repeated .google.cloud.oslogin.common.PosixAccount posix_accounts = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getPosixAccounts() - { - return $this->posix_accounts; - } - - /** - * The list of POSIX accounts associated with the user. - * - * Generated from protobuf field repeated .google.cloud.oslogin.common.PosixAccount posix_accounts = 2; - * @param array<\Google\Cloud\OsLogin\Common\PosixAccount>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setPosixAccounts($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\OsLogin\Common\PosixAccount::class); - $this->posix_accounts = $arr; - - return $this; - } - - /** - * A map from SSH public key fingerprint to the associated key object. - * - * Generated from protobuf field map ssh_public_keys = 3; - * @return \Google\Protobuf\Internal\MapField - */ - public function getSshPublicKeys() - { - return $this->ssh_public_keys; - } - - /** - * A map from SSH public key fingerprint to the associated key object. - * - * Generated from protobuf field map ssh_public_keys = 3; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setSshPublicKeys($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\OsLogin\Common\SshPublicKey::class); - $this->ssh_public_keys = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/OsLogin/v1/proto/src/Google/Cloud/OsLogin/V1/UpdateSshPublicKeyRequest.php b/owl-bot-staging/OsLogin/v1/proto/src/Google/Cloud/OsLogin/V1/UpdateSshPublicKeyRequest.php deleted file mode 100644 index 421c2a2586c5..000000000000 --- a/owl-bot-staging/OsLogin/v1/proto/src/Google/Cloud/OsLogin/V1/UpdateSshPublicKeyRequest.php +++ /dev/null @@ -1,201 +0,0 @@ -google.cloud.oslogin.v1.UpdateSshPublicKeyRequest - */ -class UpdateSshPublicKeyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The fingerprint of the public key to update. Public keys are - * identified by their SHA-256 fingerprint. The fingerprint of the public key - * is in format `users/{user}/sshPublicKeys/{fingerprint}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. The SSH public key and expiration time. - * - * Generated from protobuf field .google.cloud.oslogin.common.SshPublicKey ssh_public_key = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $ssh_public_key = null; - /** - * Mask to control which fields get updated. Updates all if not present. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3; - */ - protected $update_mask = null; - - /** - * @param string $name Required. The fingerprint of the public key to update. Public keys are - * identified by their SHA-256 fingerprint. The fingerprint of the public key - * is in format `users/{user}/sshPublicKeys/{fingerprint}`. Please see - * {@see OsLoginServiceClient::sshPublicKeyName()} for help formatting this field. - * @param \Google\Cloud\OsLogin\Common\SshPublicKey $sshPublicKey Required. The SSH public key and expiration time. - * - * @return \Google\Cloud\OsLogin\V1\UpdateSshPublicKeyRequest - * - * @experimental - */ - public static function build(string $name, \Google\Cloud\OsLogin\Common\SshPublicKey $sshPublicKey): self - { - return (new self()) - ->setName($name) - ->setSshPublicKey($sshPublicKey); - } - - /** - * @param string $name Required. The fingerprint of the public key to update. Public keys are - * identified by their SHA-256 fingerprint. The fingerprint of the public key - * is in format `users/{user}/sshPublicKeys/{fingerprint}`. Please see - * {@see OsLoginServiceClient::sshPublicKeyName()} for help formatting this field. - * @param \Google\Cloud\OsLogin\Common\SshPublicKey $sshPublicKey Required. The SSH public key and expiration time. - * @param \Google\Protobuf\FieldMask $updateMask Mask to control which fields get updated. Updates all if not present. - * - * @return \Google\Cloud\OsLogin\V1\UpdateSshPublicKeyRequest - * - * @experimental - */ - public static function buildFromNameSshPublicKeyUpdateMask(string $name, \Google\Cloud\OsLogin\Common\SshPublicKey $sshPublicKey, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setName($name) - ->setSshPublicKey($sshPublicKey) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The fingerprint of the public key to update. Public keys are - * identified by their SHA-256 fingerprint. The fingerprint of the public key - * is in format `users/{user}/sshPublicKeys/{fingerprint}`. - * @type \Google\Cloud\OsLogin\Common\SshPublicKey $ssh_public_key - * Required. The SSH public key and expiration time. - * @type \Google\Protobuf\FieldMask $update_mask - * Mask to control which fields get updated. Updates all if not present. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Oslogin\V1\Oslogin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The fingerprint of the public key to update. Public keys are - * identified by their SHA-256 fingerprint. The fingerprint of the public key - * is in format `users/{user}/sshPublicKeys/{fingerprint}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The fingerprint of the public key to update. Public keys are - * identified by their SHA-256 fingerprint. The fingerprint of the public key - * is in format `users/{user}/sshPublicKeys/{fingerprint}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. The SSH public key and expiration time. - * - * Generated from protobuf field .google.cloud.oslogin.common.SshPublicKey ssh_public_key = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\OsLogin\Common\SshPublicKey|null - */ - public function getSshPublicKey() - { - return $this->ssh_public_key; - } - - public function hasSshPublicKey() - { - return isset($this->ssh_public_key); - } - - public function clearSshPublicKey() - { - unset($this->ssh_public_key); - } - - /** - * Required. The SSH public key and expiration time. - * - * Generated from protobuf field .google.cloud.oslogin.common.SshPublicKey ssh_public_key = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\OsLogin\Common\SshPublicKey $var - * @return $this - */ - public function setSshPublicKey($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\OsLogin\Common\SshPublicKey::class); - $this->ssh_public_key = $var; - - return $this; - } - - /** - * Mask to control which fields get updated. Updates all if not present. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Mask to control which fields get updated. Updates all if not present. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/OsLogin/v1/samples/V1/OsLoginServiceClient/create_ssh_public_key.php b/owl-bot-staging/OsLogin/v1/samples/V1/OsLoginServiceClient/create_ssh_public_key.php deleted file mode 100644 index 648a5ea7645f..000000000000 --- a/owl-bot-staging/OsLogin/v1/samples/V1/OsLoginServiceClient/create_ssh_public_key.php +++ /dev/null @@ -1,73 +0,0 @@ -setParent($formattedParent) - ->setSshPublicKey($sshPublicKey); - - // Call the API and handle any network failures. - try { - /** @var SshPublicKey $response */ - $response = $osLoginServiceClient->createSshPublicKey($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = OsLoginServiceClient::userName('[USER]'); - - create_ssh_public_key_sample($formattedParent); -} -// [END oslogin_v1_generated_OsLoginService_CreateSshPublicKey_sync] diff --git a/owl-bot-staging/OsLogin/v1/samples/V1/OsLoginServiceClient/delete_posix_account.php b/owl-bot-staging/OsLogin/v1/samples/V1/OsLoginServiceClient/delete_posix_account.php deleted file mode 100644 index cec102d70eed..000000000000 --- a/owl-bot-staging/OsLogin/v1/samples/V1/OsLoginServiceClient/delete_posix_account.php +++ /dev/null @@ -1,71 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $osLoginServiceClient->deletePosixAccount($request); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = OsLoginServiceClient::posixAccountName('[USER]', '[PROJECT]'); - - delete_posix_account_sample($formattedName); -} -// [END oslogin_v1_generated_OsLoginService_DeletePosixAccount_sync] diff --git a/owl-bot-staging/OsLogin/v1/samples/V1/OsLoginServiceClient/delete_ssh_public_key.php b/owl-bot-staging/OsLogin/v1/samples/V1/OsLoginServiceClient/delete_ssh_public_key.php deleted file mode 100644 index e7398c7d3fc4..000000000000 --- a/owl-bot-staging/OsLogin/v1/samples/V1/OsLoginServiceClient/delete_ssh_public_key.php +++ /dev/null @@ -1,71 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $osLoginServiceClient->deleteSshPublicKey($request); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = OsLoginServiceClient::sshPublicKeyName('[USER]', '[FINGERPRINT]'); - - delete_ssh_public_key_sample($formattedName); -} -// [END oslogin_v1_generated_OsLoginService_DeleteSshPublicKey_sync] diff --git a/owl-bot-staging/OsLogin/v1/samples/V1/OsLoginServiceClient/get_login_profile.php b/owl-bot-staging/OsLogin/v1/samples/V1/OsLoginServiceClient/get_login_profile.php deleted file mode 100644 index 6b97dcf8279b..000000000000 --- a/owl-bot-staging/OsLogin/v1/samples/V1/OsLoginServiceClient/get_login_profile.php +++ /dev/null @@ -1,72 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var LoginProfile $response */ - $response = $osLoginServiceClient->getLoginProfile($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = OsLoginServiceClient::userName('[USER]'); - - get_login_profile_sample($formattedName); -} -// [END oslogin_v1_generated_OsLoginService_GetLoginProfile_sync] diff --git a/owl-bot-staging/OsLogin/v1/samples/V1/OsLoginServiceClient/get_ssh_public_key.php b/owl-bot-staging/OsLogin/v1/samples/V1/OsLoginServiceClient/get_ssh_public_key.php deleted file mode 100644 index a7570bc0d15d..000000000000 --- a/owl-bot-staging/OsLogin/v1/samples/V1/OsLoginServiceClient/get_ssh_public_key.php +++ /dev/null @@ -1,73 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var SshPublicKey $response */ - $response = $osLoginServiceClient->getSshPublicKey($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = OsLoginServiceClient::sshPublicKeyName('[USER]', '[FINGERPRINT]'); - - get_ssh_public_key_sample($formattedName); -} -// [END oslogin_v1_generated_OsLoginService_GetSshPublicKey_sync] diff --git a/owl-bot-staging/OsLogin/v1/samples/V1/OsLoginServiceClient/import_ssh_public_key.php b/owl-bot-staging/OsLogin/v1/samples/V1/OsLoginServiceClient/import_ssh_public_key.php deleted file mode 100644 index a631d81efa91..000000000000 --- a/owl-bot-staging/OsLogin/v1/samples/V1/OsLoginServiceClient/import_ssh_public_key.php +++ /dev/null @@ -1,73 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var ImportSshPublicKeyResponse $response */ - $response = $osLoginServiceClient->importSshPublicKey($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = OsLoginServiceClient::userName('[USER]'); - - import_ssh_public_key_sample($formattedParent); -} -// [END oslogin_v1_generated_OsLoginService_ImportSshPublicKey_sync] diff --git a/owl-bot-staging/OsLogin/v1/samples/V1/OsLoginServiceClient/update_ssh_public_key.php b/owl-bot-staging/OsLogin/v1/samples/V1/OsLoginServiceClient/update_ssh_public_key.php deleted file mode 100644 index a742735ea2a3..000000000000 --- a/owl-bot-staging/OsLogin/v1/samples/V1/OsLoginServiceClient/update_ssh_public_key.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName) - ->setSshPublicKey($sshPublicKey); - - // Call the API and handle any network failures. - try { - /** @var SshPublicKey $response */ - $response = $osLoginServiceClient->updateSshPublicKey($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = OsLoginServiceClient::sshPublicKeyName('[USER]', '[FINGERPRINT]'); - - update_ssh_public_key_sample($formattedName); -} -// [END oslogin_v1_generated_OsLoginService_UpdateSshPublicKey_sync] diff --git a/owl-bot-staging/OsLogin/v1/src/V1/Client/OsLoginServiceClient.php b/owl-bot-staging/OsLogin/v1/src/V1/Client/OsLoginServiceClient.php deleted file mode 100644 index 6dff5896fee0..000000000000 --- a/owl-bot-staging/OsLogin/v1/src/V1/Client/OsLoginServiceClient.php +++ /dev/null @@ -1,451 +0,0 @@ - createSshPublicKeyAsync(CreateSshPublicKeyRequest $request, array $optionalArgs = []) - * @method PromiseInterface deletePosixAccountAsync(DeletePosixAccountRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteSshPublicKeyAsync(DeleteSshPublicKeyRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLoginProfileAsync(GetLoginProfileRequest $request, array $optionalArgs = []) - * @method PromiseInterface getSshPublicKeyAsync(GetSshPublicKeyRequest $request, array $optionalArgs = []) - * @method PromiseInterface importSshPublicKeyAsync(ImportSshPublicKeyRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateSshPublicKeyAsync(UpdateSshPublicKeyRequest $request, array $optionalArgs = []) - */ -final class OsLoginServiceClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.oslogin.v1.OsLoginService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'oslogin.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'oslogin.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - 'https://www.googleapis.com/auth/cloud-platform.read-only', - 'https://www.googleapis.com/auth/compute', - 'https://www.googleapis.com/auth/compute.readonly', - ]; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/os_login_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/os_login_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/os_login_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/os_login_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a - * posix_account resource. - * - * @param string $user - * @param string $project - * - * @return string The formatted posix_account resource. - */ - public static function posixAccountName(string $user, string $project): string - { - return self::getPathTemplate('posixAccount')->render([ - 'user' => $user, - 'project' => $project, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * ssh_public_key resource. - * - * @param string $user - * @param string $fingerprint - * - * @return string The formatted ssh_public_key resource. - */ - public static function sshPublicKeyName(string $user, string $fingerprint): string - { - return self::getPathTemplate('sshPublicKey')->render([ - 'user' => $user, - 'fingerprint' => $fingerprint, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a user - * resource. - * - * @param string $user - * - * @return string The formatted user resource. - */ - public static function userName(string $user): string - { - return self::getPathTemplate('user')->render([ - 'user' => $user, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - posixAccount: users/{user}/projects/{project} - * - sshPublicKey: users/{user}/sshPublicKeys/{fingerprint} - * - user: users/{user} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param ?string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, ?string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'oslogin.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Create an SSH public key - * - * The async variant is {@see OsLoginServiceClient::createSshPublicKeyAsync()} . - * - * @example samples/V1/OsLoginServiceClient/create_ssh_public_key.php - * - * @param CreateSshPublicKeyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return SshPublicKey - * - * @throws ApiException Thrown if the API call fails. - */ - public function createSshPublicKey(CreateSshPublicKeyRequest $request, array $callOptions = []): SshPublicKey - { - return $this->startApiCall('CreateSshPublicKey', $request, $callOptions)->wait(); - } - - /** - * Deletes a POSIX account. - * - * The async variant is {@see OsLoginServiceClient::deletePosixAccountAsync()} . - * - * @example samples/V1/OsLoginServiceClient/delete_posix_account.php - * - * @param DeletePosixAccountRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException Thrown if the API call fails. - */ - public function deletePosixAccount(DeletePosixAccountRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeletePosixAccount', $request, $callOptions)->wait(); - } - - /** - * Deletes an SSH public key. - * - * The async variant is {@see OsLoginServiceClient::deleteSshPublicKeyAsync()} . - * - * @example samples/V1/OsLoginServiceClient/delete_ssh_public_key.php - * - * @param DeleteSshPublicKeyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteSshPublicKey(DeleteSshPublicKeyRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteSshPublicKey', $request, $callOptions)->wait(); - } - - /** - * Retrieves the profile information used for logging in to a virtual machine - * on Google Compute Engine. - * - * The async variant is {@see OsLoginServiceClient::getLoginProfileAsync()} . - * - * @example samples/V1/OsLoginServiceClient/get_login_profile.php - * - * @param GetLoginProfileRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return LoginProfile - * - * @throws ApiException Thrown if the API call fails. - */ - public function getLoginProfile(GetLoginProfileRequest $request, array $callOptions = []): LoginProfile - { - return $this->startApiCall('GetLoginProfile', $request, $callOptions)->wait(); - } - - /** - * Retrieves an SSH public key. - * - * The async variant is {@see OsLoginServiceClient::getSshPublicKeyAsync()} . - * - * @example samples/V1/OsLoginServiceClient/get_ssh_public_key.php - * - * @param GetSshPublicKeyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return SshPublicKey - * - * @throws ApiException Thrown if the API call fails. - */ - public function getSshPublicKey(GetSshPublicKeyRequest $request, array $callOptions = []): SshPublicKey - { - return $this->startApiCall('GetSshPublicKey', $request, $callOptions)->wait(); - } - - /** - * Adds an SSH public key and returns the profile information. Default POSIX - * account information is set when no username and UID exist as part of the - * login profile. - * - * The async variant is {@see OsLoginServiceClient::importSshPublicKeyAsync()} . - * - * @example samples/V1/OsLoginServiceClient/import_ssh_public_key.php - * - * @param ImportSshPublicKeyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return ImportSshPublicKeyResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function importSshPublicKey(ImportSshPublicKeyRequest $request, array $callOptions = []): ImportSshPublicKeyResponse - { - return $this->startApiCall('ImportSshPublicKey', $request, $callOptions)->wait(); - } - - /** - * Updates an SSH public key and returns the profile information. This method - * supports patch semantics. - * - * The async variant is {@see OsLoginServiceClient::updateSshPublicKeyAsync()} . - * - * @example samples/V1/OsLoginServiceClient/update_ssh_public_key.php - * - * @param UpdateSshPublicKeyRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return SshPublicKey - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateSshPublicKey(UpdateSshPublicKeyRequest $request, array $callOptions = []): SshPublicKey - { - return $this->startApiCall('UpdateSshPublicKey', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/OsLogin/v1/src/V1/gapic_metadata.json b/owl-bot-staging/OsLogin/v1/src/V1/gapic_metadata.json deleted file mode 100644 index 1d9c47c89831..000000000000 --- a/owl-bot-staging/OsLogin/v1/src/V1/gapic_metadata.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.oslogin.v1", - "libraryPackage": "Google\\Cloud\\OsLogin\\V1", - "services": { - "OsLoginService": { - "clients": { - "grpc": { - "libraryClient": "OsLoginServiceGapicClient", - "rpcs": { - "CreateSshPublicKey": { - "methods": [ - "createSshPublicKey" - ] - }, - "DeletePosixAccount": { - "methods": [ - "deletePosixAccount" - ] - }, - "DeleteSshPublicKey": { - "methods": [ - "deleteSshPublicKey" - ] - }, - "GetLoginProfile": { - "methods": [ - "getLoginProfile" - ] - }, - "GetSshPublicKey": { - "methods": [ - "getSshPublicKey" - ] - }, - "ImportSshPublicKey": { - "methods": [ - "importSshPublicKey" - ] - }, - "UpdateSshPublicKey": { - "methods": [ - "updateSshPublicKey" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/OsLogin/v1/src/V1/resources/os_login_service_client_config.json b/owl-bot-staging/OsLogin/v1/src/V1/resources/os_login_service_client_config.json deleted file mode 100644 index 71f41f61790d..000000000000 --- a/owl-bot-staging/OsLogin/v1/src/V1/resources/os_login_service_client_config.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "interfaces": { - "google.cloud.oslogin.v1.OsLoginService": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE", - "DEADLINE_EXCEEDED" - ] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "retry_policy_1_params": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 10000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 10000, - "total_timeout_millis": 10000 - } - }, - "methods": { - "CreateSshPublicKey": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "DeletePosixAccount": { - "timeout_millis": 10000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "DeleteSshPublicKey": { - "timeout_millis": 10000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetLoginProfile": { - "timeout_millis": 10000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetSshPublicKey": { - "timeout_millis": 10000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ImportSshPublicKey": { - "timeout_millis": 10000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateSshPublicKey": { - "timeout_millis": 10000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/OsLogin/v1/src/V1/resources/os_login_service_descriptor_config.php b/owl-bot-staging/OsLogin/v1/src/V1/resources/os_login_service_descriptor_config.php deleted file mode 100644 index f76e9c8d302a..000000000000 --- a/owl-bot-staging/OsLogin/v1/src/V1/resources/os_login_service_descriptor_config.php +++ /dev/null @@ -1,117 +0,0 @@ - [ - 'google.cloud.oslogin.v1.OsLoginService' => [ - 'CreateSshPublicKey' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\OsLogin\Common\SshPublicKey', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeletePosixAccount' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteSshPublicKey' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetLoginProfile' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\OsLogin\V1\LoginProfile', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetSshPublicKey' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\OsLogin\Common\SshPublicKey', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ImportSshPublicKey' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\OsLogin\V1\ImportSshPublicKeyResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateSshPublicKey' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\OsLogin\Common\SshPublicKey', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'templateMap' => [ - 'posixAccount' => 'users/{user}/projects/{project}', - 'sshPublicKey' => 'users/{user}/sshPublicKeys/{fingerprint}', - 'user' => 'users/{user}', - ], - ], - ], -]; diff --git a/owl-bot-staging/OsLogin/v1/src/V1/resources/os_login_service_rest_client_config.php b/owl-bot-staging/OsLogin/v1/src/V1/resources/os_login_service_rest_client_config.php deleted file mode 100644 index 6eaa81999f32..000000000000 --- a/owl-bot-staging/OsLogin/v1/src/V1/resources/os_login_service_rest_client_config.php +++ /dev/null @@ -1,109 +0,0 @@ - [ - 'google.cloud.oslogin.v1.OsLoginService' => [ - 'CreateSshPublicKey' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=users/*}/sshPublicKeys', - 'body' => 'ssh_public_key', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeletePosixAccount' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=users/*/projects/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteSshPublicKey' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=users/*/sshPublicKeys/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetLoginProfile' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=users/*}/loginProfile', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetSshPublicKey' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=users/*/sshPublicKeys/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ImportSshPublicKey' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=users/*}:importSshPublicKey', - 'body' => 'ssh_public_key', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateSshPublicKey' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{name=users/*/sshPublicKeys/*}', - 'body' => 'ssh_public_key', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/OsLogin/v1/tests/Unit/V1/Client/OsLoginServiceClientTest.php b/owl-bot-staging/OsLogin/v1/tests/Unit/V1/Client/OsLoginServiceClientTest.php deleted file mode 100644 index ec2cc9b6eb64..000000000000 --- a/owl-bot-staging/OsLogin/v1/tests/Unit/V1/Client/OsLoginServiceClientTest.php +++ /dev/null @@ -1,582 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return OsLoginServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new OsLoginServiceClient($options); - } - - /** @test */ - public function createSshPublicKeyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $key = 'key106079'; - $expirationTimeUsec = 2058878882; - $fingerprint = 'fingerprint-1375934236'; - $name = 'name3373707'; - $expectedResponse = new SshPublicKey(); - $expectedResponse->setKey($key); - $expectedResponse->setExpirationTimeUsec($expirationTimeUsec); - $expectedResponse->setFingerprint($fingerprint); - $expectedResponse->setName($name); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->userName('[USER]'); - $sshPublicKey = new SshPublicKey(); - $request = (new CreateSshPublicKeyRequest()) - ->setParent($formattedParent) - ->setSshPublicKey($sshPublicKey); - $response = $gapicClient->createSshPublicKey($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.oslogin.v1.OsLoginService/CreateSshPublicKey', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getSshPublicKey(); - $this->assertProtobufEquals($sshPublicKey, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createSshPublicKeyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->userName('[USER]'); - $sshPublicKey = new SshPublicKey(); - $request = (new CreateSshPublicKeyRequest()) - ->setParent($formattedParent) - ->setSshPublicKey($sshPublicKey); - try { - $gapicClient->createSshPublicKey($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deletePosixAccountTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->posixAccountName('[USER]', '[PROJECT]'); - $request = (new DeletePosixAccountRequest()) - ->setName($formattedName); - $gapicClient->deletePosixAccount($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.oslogin.v1.OsLoginService/DeletePosixAccount', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deletePosixAccountExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->posixAccountName('[USER]', '[PROJECT]'); - $request = (new DeletePosixAccountRequest()) - ->setName($formattedName); - try { - $gapicClient->deletePosixAccount($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteSshPublicKeyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->sshPublicKeyName('[USER]', '[FINGERPRINT]'); - $request = (new DeleteSshPublicKeyRequest()) - ->setName($formattedName); - $gapicClient->deleteSshPublicKey($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.oslogin.v1.OsLoginService/DeleteSshPublicKey', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteSshPublicKeyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->sshPublicKeyName('[USER]', '[FINGERPRINT]'); - $request = (new DeleteSshPublicKeyRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteSshPublicKey($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLoginProfileTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new LoginProfile(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->userName('[USER]'); - $request = (new GetLoginProfileRequest()) - ->setName($formattedName); - $response = $gapicClient->getLoginProfile($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.oslogin.v1.OsLoginService/GetLoginProfile', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLoginProfileExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->userName('[USER]'); - $request = (new GetLoginProfileRequest()) - ->setName($formattedName); - try { - $gapicClient->getLoginProfile($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getSshPublicKeyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $key = 'key106079'; - $expirationTimeUsec = 2058878882; - $fingerprint = 'fingerprint-1375934236'; - $name2 = 'name2-1052831874'; - $expectedResponse = new SshPublicKey(); - $expectedResponse->setKey($key); - $expectedResponse->setExpirationTimeUsec($expirationTimeUsec); - $expectedResponse->setFingerprint($fingerprint); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->sshPublicKeyName('[USER]', '[FINGERPRINT]'); - $request = (new GetSshPublicKeyRequest()) - ->setName($formattedName); - $response = $gapicClient->getSshPublicKey($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.oslogin.v1.OsLoginService/GetSshPublicKey', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getSshPublicKeyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->sshPublicKeyName('[USER]', '[FINGERPRINT]'); - $request = (new GetSshPublicKeyRequest()) - ->setName($formattedName); - try { - $gapicClient->getSshPublicKey($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function importSshPublicKeyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $details = 'details1557721666'; - $expectedResponse = new ImportSshPublicKeyResponse(); - $expectedResponse->setDetails($details); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->userName('[USER]'); - $request = (new ImportSshPublicKeyRequest()) - ->setParent($formattedParent); - $response = $gapicClient->importSshPublicKey($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.oslogin.v1.OsLoginService/ImportSshPublicKey', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function importSshPublicKeyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->userName('[USER]'); - $request = (new ImportSshPublicKeyRequest()) - ->setParent($formattedParent); - try { - $gapicClient->importSshPublicKey($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateSshPublicKeyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $key = 'key106079'; - $expirationTimeUsec = 2058878882; - $fingerprint = 'fingerprint-1375934236'; - $name2 = 'name2-1052831874'; - $expectedResponse = new SshPublicKey(); - $expectedResponse->setKey($key); - $expectedResponse->setExpirationTimeUsec($expirationTimeUsec); - $expectedResponse->setFingerprint($fingerprint); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->sshPublicKeyName('[USER]', '[FINGERPRINT]'); - $sshPublicKey = new SshPublicKey(); - $request = (new UpdateSshPublicKeyRequest()) - ->setName($formattedName) - ->setSshPublicKey($sshPublicKey); - $response = $gapicClient->updateSshPublicKey($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.oslogin.v1.OsLoginService/UpdateSshPublicKey', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getSshPublicKey(); - $this->assertProtobufEquals($sshPublicKey, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateSshPublicKeyExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->sshPublicKeyName('[USER]', '[FINGERPRINT]'); - $sshPublicKey = new SshPublicKey(); - $request = (new UpdateSshPublicKeyRequest()) - ->setName($formattedName) - ->setSshPublicKey($sshPublicKey); - try { - $gapicClient->updateSshPublicKey($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createSshPublicKeyAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $key = 'key106079'; - $expirationTimeUsec = 2058878882; - $fingerprint = 'fingerprint-1375934236'; - $name = 'name3373707'; - $expectedResponse = new SshPublicKey(); - $expectedResponse->setKey($key); - $expectedResponse->setExpirationTimeUsec($expirationTimeUsec); - $expectedResponse->setFingerprint($fingerprint); - $expectedResponse->setName($name); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->userName('[USER]'); - $sshPublicKey = new SshPublicKey(); - $request = (new CreateSshPublicKeyRequest()) - ->setParent($formattedParent) - ->setSshPublicKey($sshPublicKey); - $response = $gapicClient->createSshPublicKeyAsync($request)->wait(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.oslogin.v1.OsLoginService/CreateSshPublicKey', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getSshPublicKey(); - $this->assertProtobufEquals($sshPublicKey, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -}